diff --git a/.github/workflows/all-nodejs-packages-publish.yaml b/.github/workflows/all-nodejs-packages-publish.yaml index 62375735b5..3dd0f1c195 100644 --- a/.github/workflows/all-nodejs-packages-publish.yaml +++ b/.github/workflows/all-nodejs-packages-publish.yaml @@ -21,6 +21,8 @@ concurrency: jobs: build-and-publish-packages: runs-on: ubuntu-22.04 + permissions: + id-token: write steps: - name: Print Workflow inputs.GIT_TAG_TO_PUBLISH run: | @@ -47,9 +49,10 @@ jobs: run: ./tools/ci.sh env: DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: false + FULL_BUILD_DISABLED: true JEST_TEST_RUNNER_DISABLED: true TAPE_TEST_RUNNER_DISABLED: true + YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Check npm whoami with --registry set to npmjs continue-on-error: true @@ -57,51 +60,52 @@ jobs: - name: lerna-publish-npm env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_TEST }} + NPM_CONFIG_PROVENANCE: true run: | git config --global user.email "npm-ci@hyperledger.org" git config --global user.name "hyperledger-ghci" npm whoami yarn lerna publish from-git --yes --loglevel=debug --ignore-scripts - - run: cat /home/runner/work/_temp/.npmrc + # - run: cat /home/runner/work/_temp/.npmrc - # Reset the .npmrc by deleting it. Invoking the setup-node action again below - # will set it up from scratch again but with a different registry configuration - # so that we can publish to both registries instead of having to choose. - - run: rm /home/runner/work/_temp/.npmrc + # # Reset the .npmrc by deleting it. Invoking the setup-node action again below + # # will set it up from scratch again but with a different registry configuration + # # so that we can publish to both registries instead of having to choose. + # - run: rm /home/runner/work/_temp/.npmrc - - uses: actions/setup-node@v4.0.3 - with: - always-auth: true - node-version: ${{ env.NODEJS_VERSION }} - registry-url: "https://npm.pkg.github.com/" - scope: "@hyperledger" + # - uses: actions/setup-node@v4.0.3 + # with: + # always-auth: true + # node-version: ${{ env.NODEJS_VERSION }} + # registry-url: "https://npm.pkg.github.com/" + # scope: "@hyperledger" - - run: cat /home/runner/work/_temp/.npmrc + # - run: cat /home/runner/work/_temp/.npmrc - # Re-initialize the registries so that the @iroha2 scope gets configured in .npmrc - - run: yarn run init-registries + # # Re-initialize the registries so that the @iroha2 scope gets configured in .npmrc + # - run: yarn run init-registries - - run: cat /home/runner/work/_temp/.npmrc + # - run: cat /home/runner/work/_temp/.npmrc - - name: Check npm whoami with no --registry parameter. - continue-on-error: true - run: npm whoami + # - name: Check npm whoami with no --registry parameter. + # continue-on-error: true + # run: npm whoami - - name: Check npm whoami with --registry set to GHCR - continue-on-error: true - run: npm whoami --registry=https://npm.pkg.github.com/ + # - name: Check npm whoami with --registry set to GHCR + # continue-on-error: true + # run: npm whoami --registry=https://npm.pkg.github.com/ - - name: Configure git user and email - run: | - git config --global user.email "npm-ci@hyperledger.org" - git config --global user.name "hyperledger-ghci" + # - name: Configure git user and email + # run: | + # git config --global user.email "npm-ci@hyperledger.org" + # git config --global user.name "hyperledger-ghci" - # We run the publish script a second time after having reconfigured the registry to be GHCR - # instead of npmjs.org so that we can publish the packages everywhere. - - name: lerna-publish-ghcr - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - yarn lerna publish from-git --yes --loglevel=debug --ignore-scripts + # # We run the publish script a second time after having reconfigured the registry to be GHCR + # # instead of npmjs.org so that we can publish the packages everywhere. + # - name: lerna-publish-ghcr + # env: + # NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # run: | + # yarn lerna publish from-git --yes --loglevel=debug --ignore-scripts diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 145abd651b..d4510b920b 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -19,6 +19,8 @@ jobs: build-and-publish-packages: runs-on: ubuntu-22.04 + permissions: + id-token: write steps: - uses: actions/checkout@v4.1.7 with: @@ -28,19 +30,22 @@ jobs: with: always-auth: true node-version: ${{ env.NODEJS_VERSION }} - registry-url: 'https://registry.npmjs.org' + registry-url: 'https://registry.npmjs.org/' - name: ./tools/ci.sh run: ./tools/ci.sh env: DEV_BUILD_DISABLED: false - FULL_BUILD_DISABLED: false + FULL_BUILD_DISABLED: true JEST_TEST_RUNNER_DISABLED: true TAPE_TEST_RUNNER_DISABLED: true + YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: lerna-publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_TEST }} + NPM_CONFIG_PROVENANCE: true run: | - git config --global user.email "npm-ci@hyperledger.org" - git config --global user.name "hyperledger-ghci" + echo "The NPM token is: ${{ secrets.NPM_TOKEN_TEST }}" + git config --global user.email "adrianbatuto" + git config --global user.name "adrianbatuto" npm whoami yarn lerna publish from-git --yes --loglevel=debug diff --git a/examples/cactus-common-example-server/CHANGELOG.md b/examples/cactus-common-example-server/CHANGELOG.md deleted file mode 100644 index 3e0b8e7732..0000000000 --- a/examples/cactus-common-example-server/CHANGELOG.md +++ /dev/null @@ -1,136 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-common-example-server - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-common-example-server - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -### Features - -* **cmd-socketio-server:** move to examples as deprecated ([4de8069](https://github.com/hyperledger/cacti/commit/4de806974f0066359cca422561042a55173d3655)) - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-socketio-server - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-socketio-server - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-socketio-server - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **cactus-plugin-ledger-connector-fabric-socketio:** remove fabric-socketio connector ([704e201](https://github.com/hyperledger/cacti/commit/704e201d6bd6bf7a38f0de7da60723118e18cea7)), closes [#2644](https://github.com/hyperledger/cacti/issues/2644) -* **indy-sdk:** replace indy SDK with AFJ ([3291dcc](https://github.com/hyperledger/cacti/commit/3291dcc57e9e4eb04e0b9abab4134e1a5e2b0bbf)), closes [#2859](https://github.com/hyperledger/cacti/issues/2859) [#2860](https://github.com/hyperledger/cacti/issues/2860) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** the CVE-2022-2421 - upgrade socket.io-parser to >=4.2.1 ([9172172](https://github.com/hyperledger/cacti/commit/917217227a3fa53a00429f047cd6318862e6ab8d)), closes [#2229](https://github.com/hyperledger/cacti/issues/2229) [#2228](https://github.com/hyperledger/cacti/issues/2228) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-socketio-server - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-socketio-server - -# [1.2.0](https://github.com/hyperledger/cacti/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-socketio-server - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -### Features - -* **cmd-socketio-server:** support multiple BLP in single server ([0f67085](https://github.com/hyperledger/cactus/commit/0f670855b0fa0fd33f71bf5a1814fb6fcac2c7b6)), closes [#2102](https://github.com/hyperledger/cactus/issues/2102) [#2030](https://github.com/hyperledger/cactus/issues/2030) - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-socketio-server - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-socketio-server - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Bug Fixes - -* **cactus-example-discounted-asset-trade:** enable ([12e972e](https://github.com/hyperledger/cactus/commit/12e972e9cac63fd03a0ba3c7c8a29dc9ca544b9d)), closes [#2145](https://github.com/hyperledger/cactus/issues/2145) -* **cactus-example-electricity-trade:** enable tsconfig strict flag an… ([f7e726c](https://github.com/hyperledger/cactus/commit/f7e726c2720ed21bc4a582f6c4f345d0b2c65af7)), closes [#2144](https://github.com/hyperledger/cactus/issues/2144) -* resolve some CodeQL warnings ([824f5c8](https://github.com/hyperledger/cactus/commit/824f5c80ce5efbd9765699fdd635ab1d7f29cea2)) -* **security:** mitigate Cross-Site Scripting attack (XSS) ([2cb68c3](https://github.com/hyperledger/cactus/commit/2cb68c3e9899691b1e0abeb6993c37c97a61dcdb)) - -### Code Refactoring - -* **examples:** include sample apps in monorepo build ([51ac163](https://github.com/hyperledger/cactus/commit/51ac1630f53ca3ac881341c7f8847b6ae581b220)) - -### Features - -* **socketio-server:** cross site scripting attack ([a5303ed](https://github.com/hyperledger/cactus/commit/a5303ed3a161477313646fc1f24220e53a20f7a4)) - -### BREAKING CHANGES - -* **examples:** 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 - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* **cmd-api-server:** upgrade socket.io - CVE-2022-21676 ([8e1c69e](https://github.com/hyperledger/cactus/commit/8e1c69e7b8ab5e4ccc31a0ec183a9777ccc22cdc)), closes [#1914](https://github.com/hyperledger/cactus/issues/1914) -* **plugin-ledger-connector-fabric-socketio:** upgrade Fabric due to jsrsasign ([a9ecb19](https://github.com/hyperledger/cactus/commit/a9ecb192cb32661c5bdd9ea684f35a90c7948f6a)), closes [#1754](https://github.com/hyperledger/cactus/issues/1754) [#1799](https://github.com/hyperledger/cactus/issues/1799) -* remove jade dependencies ([f4ce09e](https://github.com/hyperledger/cactus/commit/f4ce09e8c07949aa08e4bfd404e4468e6c3544a8)), closes [#1662](https://github.com/hyperledger/cactus/issues/1662) -* **security:** address CVE-2019-5413 ([212b770](https://github.com/hyperledger/cactus/commit/212b770c705c279dcc766b7230d7519ed9a98748)), closes [#1777](https://github.com/hyperledger/cactus/issues/1777) - -### Features - -* **cactus-api-client:** common verifier-factory ([2f70a64](https://github.com/hyperledger/cactus/commit/2f70a6473f30446859427335f2d3602bddca636d)), closes [#1878](https://github.com/hyperledger/cactus/issues/1878) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* **security:** upgrade fabric-common to 2.2.10 or later ([45c4a69](https://github.com/hyperledger/cactus/commit/45c4a69fb86964bc4e7018c31c5914a0063c7638)), closes [#1600](https://github.com/hyperledger/cactus/issues/1600) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-socket-server - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **cmd-socker-server:** delete unnecessary files on cmd-socker-server ([20e15cd](https://github.com/hyperledger/cactus/commit/20e15cd257628fe392818e14728851304a76c7cb)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Bug Fixes - -* **validators:** add some missing parts ([9a8f7db](https://github.com/hyperledger/cactus/commit/9a8f7db746e2a41708e2fe9d5277561d6abac3d4)) diff --git a/examples/cactus-common-example-server/Dockerfile b/examples/cactus-common-example-server/Dockerfile deleted file mode 100644 index 2997c6bd8c..0000000000 --- a/examples/cactus-common-example-server/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM node:16 - -ENV CACTUS_CMD_SOCKETIO_PATH=/opt/cactus-common-example-server - -WORKDIR ${CACTUS_CMD_SOCKETIO_PATH} - -# CMake is required by one of npm dependencies (install other packages in this step as well in the future) -RUN apt-get update && apt-get install -y cmake && rm -rf /var/lib/apt/lists/* - -COPY ./dist/yarn.lock ./package.json ./ -RUN yarn install --production --ignore-engines --non-interactive --cache-folder ./.yarnCache && \ - rm -rf ./.yarnCache - -COPY ./dist ./dist -COPY ./config /etc/cactus/ - -EXPOSE 5034 -VOLUME ["/etc/cactus/"] - -CMD ["node", "./dist/src/main/typescript/routing-interface/www.js"] diff --git a/examples/cactus-common-example-server/README.md b/examples/cactus-common-example-server/README.md deleted file mode 100644 index 700b2e8f68..0000000000 --- a/examples/cactus-common-example-server/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# `@hyperledger/cactus-common-example-server` - -This is a module for common server setup used by some sample application. Do not use on production. - -## Usage samples - - [cactus-example-electricity-trade](../../examples/cactus-example-electricity-trade) - - [cactus-example-discounted-asset-trade](../../examples/cactus-example-discounted-asset-trade) - -## Docker -- Docker image of this package is used mostly as a base for other applications and plugins (BLP, socketio connectors). -- Docker build process will use artifacts from the latest build. Make sure `./dist` contains the version you want to dockerize. - -``` -# Build -docker build . -t cactus-common-example-server -``` diff --git a/examples/cactus-common-example-server/config/contractInfo.yaml b/examples/cactus-common-example-server/config/contractInfo.yaml deleted file mode 100644 index 0bf7762210..0000000000 --- a/examples/cactus-common-example-server/config/contractInfo.yaml +++ /dev/null @@ -1,3 +0,0 @@ -# Smart contract definitions -# Check examples/cactus-example-discounted-asset-trade/config for working example -contractInfo: [] \ No newline at end of file diff --git a/examples/cactus-common-example-server/config/default.yaml b/examples/cactus-common-example-server/config/default.yaml deleted file mode 100644 index 6acf28ab7f..0000000000 --- a/examples/cactus-common-example-server/config/default.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Default cactus-common-example-server configuration -# Do not change this, update the settings in usersetting.yaml -# Check examples/cactus-example-discounted-asset-trade/config for working example - -# List of Bussiness Logic Plugin and it's validators -blpRegistry: [] - -# log4js log levels used by cactus-common-example-server and smaple BLPs -logLevel: info - -# Connection info -applicationHostInfo: - hostName: 0.0.0.0 - hostPort: 5034 - -# Socket.IO Manager options -socketOptions: - rejectUnauthorized: false - reconnection: false - timeout: 20000 - -# Verifier component configuration -verifier: - maxCounterRequestID: 100 - syncFunctionTimeoutMillisecond: 5000 - -# API route path and JS file to handle that route logic -appRouters: [] diff --git a/examples/cactus-common-example-server/config/usersetting.yaml b/examples/cactus-common-example-server/config/usersetting.yaml deleted file mode 100644 index dca2069b96..0000000000 --- a/examples/cactus-common-example-server/config/usersetting.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# User settings overwrites default settings from default.yaml -# Check examples/cactus-example-discounted-asset-trade/config for working example - -{} \ No newline at end of file diff --git a/examples/cactus-common-example-server/config/validator-registry-config.yaml b/examples/cactus-common-example-server/config/validator-registry-config.yaml deleted file mode 100644 index 598fddfc0e..0000000000 --- a/examples/cactus-common-example-server/config/validator-registry-config.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# Cactus validator configuration -# Check examples/cactus-example-discounted-asset-trade/config for working example - -ledgerPluginInfo: [] -signTxInfo: {} \ No newline at end of file diff --git a/examples/cactus-common-example-server/package.json b/examples/cactus-common-example-server/package.json deleted file mode 100644 index 309a57f081..0000000000 --- a/examples/cactus-common-example-server/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "@hyperledger/cactus-common-example-server", - "version": "2.0.0", - "description": "Allows Cactus nodes to interact with HTLC ETH contracts", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "build": "npm run build-ts && npm run build:dev:backend:postbuild", - "build-ts": "tsc", - "build:dev:backend:postbuild": "cp -f ../../yarn.lock ./dist/" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@types/node": "18.11.9", - "body-parser": "1.20.3", - "config": "3.3.7", - "cookie-parser": "1.4.5", - "debug": "3.1.0", - "escape-html": "1.0.3", - "ethereumjs-common": "1.5.2", - "ethereumjs-tx": "2.1.2", - "express": "4.21.0", - "fabric-network": "2.2.20", - "http-errors": "1.6.3", - "js-yaml": "3.14.1", - "jsonwebtoken": "9.0.2", - "log4js": "6.4.1", - "morgan": "1.10.0", - "shelljs": "0.8.5", - "socket.io": "4.6.2", - "socket.io-client-fixed-types": "4.5.4", - "web3": "1.6.1", - "xmlhttprequest": "1.8.0" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/config": "3.3.0", - "@types/cookie-parser": "1.4.5", - "@types/debug": "4.1.8", - "@types/escape-html": "1.0.1", - "@types/express": "5.0.0", - "@types/http-errors": "1.6.3", - "@types/js-yaml": "4.0.5", - "@types/jsonwebtoken": "9.0.6", - "@types/lodash": "4.14.195", - "@types/morgan": "1.9.1", - "@types/node": "18.11.9", - "@types/shelljs": "0.8.11", - "http-terminator": "3.2.0", - "lodash": "4.17.21", - "ts-node": "8.9.1" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/BLP_config.ts b/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/BLP_config.ts deleted file mode 100644 index 1e47e669f4..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/BLP_config.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * BLP_config.ts - */ - -import { BusinessLogicPlugin } from "./BusinessLogicPlugin"; - -// Singleton of BLPs -const _blpMapping = new Map(); - -export function getTargetBLPInstance( - businessLogicID: string, -): BusinessLogicPlugin | null { - return _blpMapping.get(businessLogicID) ?? null; -} - -export function setTargetBLPInstance( - businessLogicID: string, - blp: BusinessLogicPlugin, -) { - _blpMapping.set(businessLogicID, blp); -} - -export function deleteTargetBLPInstance(businessLogicID: string) { - return _blpMapping.delete(businessLogicID); -} diff --git a/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/BusinessLogicBase.ts b/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/BusinessLogicBase.ts deleted file mode 100644 index d3a486b0eb..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/BusinessLogicBase.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * BusinessLogicBase.ts - */ - -import { Request } from "express"; -import { BusinessLogicPlugin } from "./BusinessLogicPlugin"; -import { LedgerEvent } from "../verifier/LedgerPlugin"; -import { json2str } from "../verifier/DriverCommon"; -import { ConfigUtil } from "../routing-interface/util/ConfigUtil"; - -const fs = require("fs"); -const path = require("path"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "BusinessLogicBase"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class BusinessLogicBase implements BusinessLogicPlugin { - eventFilter: object | null = null; - - startTransaction( - req: Request, - businessLogicID: string, - tradeID: string, - ): void { - // NOTE: This method implements the BisinessLogcPlugin operation(* Override by subclass) - } - - executeNextTransaction(txInfo: object, txId: string): void { - // NOTE: This method implements the BisinessLogcPlugin operation(* Override by subclass) - } - - getOperationStatus(tradeID: string): object { - // NOTE: This method implements the BisinessLogcPlugin operation(* Override by subclass) - return {}; - } - - setConfig(data: []): object { - // NOTE: This method implements the BisinessLogcPlugin operation(* Override by subclass) - return {}; - } - - onEvent(ledgerEvent: LedgerEvent, targetIndex: number): void { - // NOTE: This method implements the BisinessLogcPlugin operation(* Override by subclass) - } - - getEventFilter(): object | null { - if (this.eventFilter) { - logger.debug(`##called getEventFilter: ${json2str(this.eventFilter)}`); - } - - return this.eventFilter; - } - - setEventFilter(filter: object): void { - let eventFilterStr = "unset"; - if (this.eventFilter) { - eventFilterStr = json2str(this.eventFilter) || "(could not be parsed)"; - } - logger.debug("##called setEventFilter(before):", eventFilterStr); - - this.eventFilter = filter; - - logger.debug( - `##called setEventFilter(after): ${json2str(this.eventFilter)}`, - ); - } - - getEventDataNum(ledgerEvent: LedgerEvent): number { - // NOTE: This method implements the BisinessLogcPlugin operation(* Override by subclass) - return 0; - } - - getTxIDFromEvent( - ledgerEvent: LedgerEvent, - targetIndex: number, - ): string | null { - // NOTE: This method implements the BisinessLogcPlugin operation(* Override by subclass) - return null; - } - - // This function is optional in setup with single BLP, - // that's why value true is returned (to indicate that given Tx always belong to this BLP) - hasTxIDInTransactions(txID: string): boolean { - // NOTE: This method implements the BisinessLogcPlugin operation(* Override by subclass) - return true; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/BusinessLogicPlugin.ts b/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/BusinessLogicPlugin.ts deleted file mode 100644 index ccda229303..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/BusinessLogicPlugin.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * BusinessLogicPlugin.ts - */ - -import { Request } from "express"; -import { LedgerEvent } from "../verifier/LedgerPlugin"; - -export interface BusinessLogicPlugin { - startTransaction( - req: Request, - businessLogicID: string, - tradeID: string, - ): void; - getOperationStatus(tradeID: string): object; - setConfig(data: []): object; - onEvent(ledgerEvent: LedgerEvent, targetIndex: number): void; - getEventDataNum(ledgerEvent: LedgerEvent): number; - getTxIDFromEvent( - ledgerEvent: LedgerEvent, - targetIndex: number, - ): string | null; - hasTxIDInTransactions(txID: string): boolean; -} diff --git a/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/LedgerOperation.ts b/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/LedgerOperation.ts deleted file mode 100644 index ef5ab17ec6..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/LedgerOperation.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * LedgerOperation.ts - */ - -export class LedgerOperation { - apiType: string; - progress: string; - data: {}; - - constructor(apiType: string, progress: string, data: {}) { - this.apiType = apiType; - this.progress = progress; - this.data = data; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/app.ts b/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/app.ts deleted file mode 100644 index d9a4b6cd57..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/app.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * app.ts - */ - -import { NextFunction, Request, Response } from "express"; - -import createError = require("http-errors"); -import express = require("express"); -import type { RequestHandler } from "express"; -import path = require("path"); -import cookieParser = require("cookie-parser"); -import logger = require("morgan"); -import bodyParser = require("body-parser"); - -import indexRouter from "../routing-interface/routes/index"; -import loginRouter from "../routing-interface/routes/login"; -import { ConfigUtil } from "../routing-interface/util/ConfigUtil"; - -const config: any = ConfigUtil.getConfig(); - -export const app: express.Express = express(); - -export function runExpressApp() { - app.use(logger("dev")); - app.use(express.json()); - app.use(express.urlencoded({ extended: false })); - app.use(cookieParser() as RequestHandler); - app.use(express.static(path.join(__dirname, "public"))); - app.use(bodyParser.urlencoded({ extended: true })); - app.use(bodyParser.json()); - - app.use("/", indexRouter); - app.use("/api/v1/bl/login/", loginRouter); - - // Dynamic loading - console.debug(`start Dynamic loading.`); - for (const appRouter of config.appRouters) { - console.debug(`path: ${appRouter.path}, routerJs: ${appRouter.routerJs}`); - app.use(appRouter.path, require(appRouter.routerJs).default); - } - - // catch 404 and forward to error handler - app.use((req: Request, res: Response, next: NextFunction) => { - next(createError(404)); - }); - - // error handler - app.use( - ( - err: { message: string; status?: number }, - req: Request, - res: Response, - next: NextFunction, - ) => { - // set locals, only providing error in development - res.locals.message = err.message; - res.locals.error = req.app.get("env") === "development" ? err : {}; - - // set erreor response - const errorResponse: {} = { - statusCode: err.status || 500, - message: err.message, - }; - - // render the error page - res.status(err.status || 500); - res.send(errorResponse); - }, - ); -} diff --git a/examples/cactus-common-example-server/src/main/typescript/common/core/config/default.ts b/examples/cactus-common-example-server/src/main/typescript/common/core/config/default.ts deleted file mode 100644 index 2a7b29ff7d..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/common/core/config/default.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * NOTE! - * This configuration file is overwritten in the validator. - * Used by ../verifier/ValidatorAuthentication.ts - */ - -export const config = { - logLevel: "silent", - validatorKeyPath: "key.pem", -}; diff --git a/examples/cactus-common-example-server/src/main/typescript/index.ts b/examples/cactus-common-example-server/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/examples/cactus-common-example-server/src/main/typescript/public-api.ts b/examples/cactus-common-example-server/src/main/typescript/public-api.ts deleted file mode 100644 index c0e2ac630d..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/public-api.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Verifier -export { Verifier } from "./verifier/Verifier"; -export { LedgerEvent } from "./verifier/LedgerPlugin"; -export { json2str } from "./verifier/DriverCommon"; -export { signMessageJwt } from "./verifier/validator-authentication"; - -// Routing Interface -export { RIFError } from "./routing-interface/RIFError"; -export { ConfigUtil } from "./routing-interface/util/ConfigUtil"; -export { RequestInfo } from "./routing-interface/RequestInfo"; -export { LPInfoHolder } from "./routing-interface/util/LPInfoHolder"; -export { TransactionManagement } from "./routing-interface/TransactionManagement"; -export { ContractInfoHolder } from "./routing-interface/util/ContractInfoHolder"; -export { TradeInfo } from "./routing-interface/TradeInfo"; -export { transactionManagement as routesTransactionManagement } from "./routing-interface/routes/index"; -export { verifierFactory as routesVerifierFactory } from "./routing-interface/routes/index"; -export { - startCactusSocketIOServer, - BLPConfig, -} from "./routing-interface/CactusSocketIOServer"; - -// Business Logic Plugin -export { BusinessLogicPlugin } from "./business-logic-plugin/BusinessLogicPlugin"; -export { BusinessLogicBase } from "./business-logic-plugin/BusinessLogicBase"; -export { LedgerOperation } from "./business-logic-plugin/LedgerOperation"; - -// Util -export { TransactionSigner } from "./util/TransactionSigner"; -export { configRead } from "./util/config"; diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/CactusSocketIOServer.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/CactusSocketIOServer.ts deleted file mode 100644 index 675306b999..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/CactusSocketIOServer.ts +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env node - -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * www.ts - */ - -/** - * Module dependencies. - */ - -import { app, runExpressApp } from "../business-logic-plugin/app"; -import debugModule = require("debug"); -import http = require("http"); -import { ConfigUtil } from "./util/ConfigUtil"; - -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -import { BusinessLogicPlugin } from "../business-logic-plugin/BusinessLogicPlugin"; -import { setTargetBLPInstance } from "../business-logic-plugin/BLP_config"; -const moduleName = "www"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export type BLPConfig = { - id: string; - plugin: BusinessLogicPlugin; -}; - -export function startCactusSocketIOServer( - blp?: BLPConfig | BLPConfig[], - onListening?: () => void, -) { - if (blp) { - // Support both single and multiple BLPs - if (!Array.isArray(blp)) { - blp = [blp]; - } - - blp.forEach((cfg) => { - logger.info("Using BLP with id =", cfg.id); - setTargetBLPInstance(cfg.id, cfg.plugin); - }); - } - - runExpressApp(); - - /** - * Get port from environment and store in Express. - */ - const port = normalizePort( - process.env.CACTUS_PORT || config.applicationHostInfo.hostPort, - ); - - const hostname: string = - process.env.CACTUS_HOSTNAME || - config.applicationHostInfo.hostName || - "127.0.0.1"; - logger.info(`listening on ${hostname}:${port}`); - app.set("port", port); - - /** - * Create HTTP server. - */ - const server = http.createServer(app); - - /** - * Event listener for HTTP server "error" event. - */ - - function onError(error: any): void { - if (error.syscall !== "listen") { - throw error; - } - - const bind = typeof port === "string" ? "Pipe " + port : "Port " + port; - - // handle specific listen errors with friendly messages - switch (error.code) { - case "EACCES": - logger.error(bind + " requires elevated privileges"); - process.exit(1); - break; - case "EADDRINUSE": - logger.error(bind + " is already in use"); - process.exit(1); - break; - default: - throw error; - } - } - - /** - * Event listener for HTTP server "listening" event. - */ - if (!onListening) { - onListening = () => { - const addr = server.address(); - if (addr) { - const bind = - typeof addr === "string" ? "pipe " + addr : "port " + addr.port; - debugModule("Listening on " + bind); - } else { - throw new Error("Could not get server address!"); - } - }; - } - - /** - * Listen on provided port, on all network interfaces. - */ - server.listen(port as number, hostname); - server.on("error", onError); - server.on("listening", onListening); - - return server; -} - -/** - * Normalize a port into a number, string, or false. - */ -function normalizePort(val: string): number | string | boolean { - const nport = parseInt(val, 10); - - if (isNaN(nport)) { - // named pipe - return val; - } - - if (nport >= 0) { - // port number - return nport; - } - - return false; -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/RIFError.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/RIFError.ts deleted file mode 100644 index 4fa79ebb7c..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/RIFError.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * RIFError.ts - */ - -export class RIFError extends Error { - statusCode = 500; - - constructor(e?: string) { - super(e); - this.name = new.target.name; - // The following line is only required if TypeScript's output target is older than ES 2015 (ES3, ES5) - Object.setPrototypeOf(this, new.target.prototype); - } -} - -export class BadRequestError extends RIFError { - constructor(e?: string) { - super(e); - this.statusCode = 400; - } -} - -export class InternalServerError extends RIFError { - constructor(e?: string) { - super(e); - this.statusCode = 500; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/RequestInfo.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/RequestInfo.ts deleted file mode 100644 index 40a6be9ba9..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/RequestInfo.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * RequestInfo.ts - */ - -// transaction information - -export class TradeInfo { - ethereumAccountFrom: string = ""; - ethereumAccountTo: string = ""; - fabricAccountFrom: string = ""; - fabricAccountTo: string = ""; - tradingValue: string = ""; - assetID: string = ""; - indyAgentConId: string = ""; -} - -// authorization information -class AuthInfo { - company: string = ""; -} - -// request information -export class RequestInfo { - businessLogicID: string = ""; - tradeID: string = ""; - tradeInfo: TradeInfo; - authInfo: AuthInfo; - constructor() { - this.tradeInfo = new TradeInfo(); - this.authInfo = new AuthInfo(); - } - - setTradeID(tradeID: string) { - this.tradeID = tradeID; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/TradeInfo.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/TradeInfo.ts deleted file mode 100644 index 1b0cc0ee29..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/TradeInfo.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * TradeInfo.ts - */ - -export class TradeInfo { - businessLogicID: string; - tradeID: string; - - constructor(businessLogicID: string, tradeID: string) { - this.businessLogicID = businessLogicID; - this.tradeID = tradeID; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/TransactionManagement.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/TransactionManagement.ts deleted file mode 100644 index 286db0d646..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/TransactionManagement.ts +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * TransactionManagement.ts - */ - -import type { Request } from "express"; -import { BusinessLogicPlugin } from "../business-logic-plugin/BusinessLogicPlugin"; -import { BLPRegistry } from "./util/BLPRegistry"; -import { IVerifierEventListener, LedgerEvent } from "../verifier/LedgerPlugin"; -import { getTargetBLPInstance } from "../business-logic-plugin/BLP_config"; -import { ConfigUtil } from "./util/ConfigUtil"; - -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "TransactionManagement"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class TransactionManagement implements IVerifierEventListener { - private blpRegistry: BLPRegistry; // Verifier information used in business logic - // private connectInfo: LPInfoHolder = null; // connection information - // private verifierArray: [] = []; // Verifier - // private txIDMapInfo: Map = null; - private tradeIDMapInfo: Map; - - constructor() { - this.blpRegistry = new BLPRegistry(); - // this.connectInfo = new LPInfoHolder(); - // this.blpMap = new Map(); - // this.txIDMapInfo = new Map(); - this.tradeIDMapInfo = new Map(); - } - - // Start business logic - startBusinessLogic(req: Request): string | undefined { - // businessLogicID - const businessLogicID = req.body.businessLogicID; - logger.info(`businessLogicID: ${businessLogicID}`); - // tradeID Numbering/Setup - const tradeID = this.createTradeID(); - logger.info(`tradeID: ${tradeID}`); - - // object judgment - if (this.blpRegistry.getBusinessLogicIDList().includes(businessLogicID)) { - const blp = getTargetBLPInstance(businessLogicID); - if (blp === null) { - logger.warn( - `##startBusinessLogic(): not found BusinessLogicPlugin. businessLogicID: ${businessLogicID}`, - ); - return undefined; - } - - logger.debug("created instance"); - - // Start BLP - this.setTradeIDMapInfo(tradeID, businessLogicID); - blp.startTransaction(req, businessLogicID, tradeID); - logger.debug("start BLP"); - } - - return tradeID; - } - - createTradeID(): string { - // NOTE: tradeID is "(GMT date when the API was accepted) - (serial number)" - - // TODO: Trailing number-generating part not implemented - // NOTE: The last serial number is fixed "001" for 2020/9 months. - const currentTime: Date = new Date(); - const tradeID: string = - currentTime.getFullYear() + - ("0" + (currentTime.getMonth() + 1)).slice(-2) + - ("0" + currentTime.getDate()).slice(-2) + - ("0" + currentTime.getHours()).slice(-2) + - ("0" + currentTime.getMinutes()).slice(-2) + - ("0" + currentTime.getSeconds()).slice(-2) + - ("00" + currentTime.getMilliseconds()).slice(-3) + - "-001"; // NOTE: Serial number for the same time. Since the priority is low, it is fixed at "001" at this time. - return tradeID; - } - - // Get state of operation - getOperationStatus(tradeID: string): object | undefined { - const businessLogicID = this.getBusinessLoginIDByTradeID(tradeID); - if (!businessLogicID) { - logger.warn( - `##getOperationStatus(): not found BusinessLogicPlugin. tradeID: ${tradeID}`, - ); - return undefined; - } - - const blp = getTargetBLPInstance(businessLogicID); - if (blp === null) { - logger.warn( - `##getOperationStatus(): not found BusinessLogicPlugin. businessLogicID: ${businessLogicID}`, - ); - return undefined; - } - - const transactionStatusData = blp.getOperationStatus(tradeID); - - return transactionStatusData; - } - - // Set business logic config - setBusinessLogicConfig(req: Request): object | undefined { - // businessLogicID - const businessLogicID = req.body.businessLogicID; - logger.info(`businessLogicID: ${businessLogicID}`); - - // object judgment - let result: {} = {}; - const blp = getTargetBLPInstance(businessLogicID); - if (blp === null) { - logger.warn( - `##startBusinessLogic(): not found BusinessLogicPlugin. businessLogicID: ${businessLogicID}`, - ); - return undefined; - } - - logger.debug("created instance"); - - // Set business logic config - logger.debug(`meterParams = ${req.body.meterParams}`); - result = blp.setConfig(req.body.meterParams); - logger.debug("set business logic config"); - - return result; - } - - /* - // Get Verifier - getVerifier(validatorId: string, monitorOptions = {}): Verifier { - - // Return Verifier - // If you have already made it, please reply. If you haven't made it yet, make it and reply. - if (this.verifierArray[validatorId]) { - return this.verifierArray[validatorId]; - } - else { - const ledgerPluginInfo: string = this.connectInfo.getLegerPluginInfo(validatorId); - // TODO: I want to manage an instance using the validatorId as a key instead of a dedicated member variable - this.verifierArray[validatorId] = new Verifier(ledgerPluginInfo); - logger.debug("##startMonitor"); - this.verifierArray[validatorId].setEventListener(this); - this.verifierArray[validatorId].startMonitor(monitorOptions); - return this.verifierArray[validatorId]; - } - - } -*/ - - // Get validator to use - getValidatorToUse(businessLogicId: string): string { - return this.blpRegistry.getBLPRegistryInfo(businessLogicId); - } - - // interface IVerifierEventListener - onEvent(ledgerEvent: LedgerEvent): void { - // logger.debug(`####in onEvent: event: ${json2str(ledgerEvent)}`); - const eventNum = this.getEventNum(ledgerEvent); - if (eventNum === 0) { - logger.warn( - `onEvent(): invalid event, event num is zero., ledgerEvent.verifierId: ${ledgerEvent.verifierId}`, - ); - return; - } - - for (let i = 0; i < eventNum; i++) { - const blp = this.getBLPInstanceFromEvent(ledgerEvent, i); - if (blp !== null) { - logger.debug(`onEvent: call BLP#onEvent()`); - blp.onEvent(ledgerEvent, i); - } - } - } - - private getEventNum(ledgerEvent: LedgerEvent): number { - // logger.debug(`##getEventNum: event: ${ledgerEvent}`); - for (const businessLogicID of this.blpRegistry.getBusinessLogicIDList()) { - logger.debug(`####getEventNum(): businessLogicID: ${businessLogicID}`); - const blp = getTargetBLPInstance(businessLogicID); - if (blp === null) { - logger.warn( - `getEventNum(): not found, businessLogicID: ${businessLogicID}`, - ); - continue; - } - - const eventNum = blp.getEventDataNum(ledgerEvent); - if (eventNum !== 0) { - logger.debug( - `##getEventNum: target businessLogicID: ${businessLogicID}`, - ); - return eventNum; - } - } - - // not found. - logger.warn( - `getEventNum(): not found(The corresponding BLP does not exist.)`, - ); - return 0; - } - - private getBLPInstanceFromEvent( - ledgerEvent: LedgerEvent, - targetIndex: number, - ): BusinessLogicPlugin | null { - const txID = this.getTxIDFromEvent(ledgerEvent, targetIndex); - if (txID === null) { - logger.warn(`getBLPInstanceFromEvent: not found txID`); - return null; - } - logger.debug(`getBLPInstanceFromEvent: txID: ${txID}`); - - return this.getBLPInstanceFromTxID(txID); - } - - private getTxIDFromEvent( - ledgerEvent: LedgerEvent, - targetIndex: number, - ): string | null { - // logger.debug(`##getTxIDFromEvent: event: ${ledgerEvent}`); - for (const businessLogicID of this.blpRegistry.getBusinessLogicIDList()) { - logger.debug( - `####getTxIDFromEvent(): businessLogicID: ${businessLogicID}`, - ); - const blp = getTargetBLPInstance(businessLogicID); - if (blp === null) { - logger.warn( - `getTxIDFromEvent(): not found, businessLogicID: ${businessLogicID}`, - ); - continue; - } - - const txID = blp.getTxIDFromEvent(ledgerEvent, targetIndex); - if (txID !== null) { - logger.debug(`##getTxIDFromEvent: target blp: ${txID}`); - return txID; - } - } - - // not found. - logger.warn( - `getTxIDFromEvent(): not found(The corresponding BLP does not exist.)`, - ); - return null; - } - - private getBLPInstanceFromTxID(txID: string): BusinessLogicPlugin | null { - logger.debug(`##getBLPInstanceFromTxID: txID: ${txID}`); - for (const businessLogicID of this.blpRegistry.getBusinessLogicIDList()) { - logger.debug( - `####getBLPInstanceFromTxID(): businessLogicID: ${businessLogicID}`, - ); - const blp = getTargetBLPInstance(businessLogicID); - if (blp === null) { - logger.warn( - `getBLPInstanceFromTxID(): not found, businessLogicID: ${businessLogicID}`, - ); - continue; - } - - if (blp.hasTxIDInTransactions(txID)) { - logger.debug( - `####getBLPInstanceFromTxID(): found!, businessLogicID: ${businessLogicID}`, - ); - return blp; - } - } - - // not found. - logger.warn( - `getBLPInstanceFromTxID(): not found(The corresponding BLP does not exist.)`, - ); - return null; - } - - private setTradeIDMapInfo(tradeID: string, businessLogicID: string): void { - this.tradeIDMapInfo.set(tradeID, businessLogicID); - } - - private getBusinessLoginIDByTradeID(tradeID: string): string | undefined { - if (this.tradeIDMapInfo.has(tradeID)) { - return this.tradeIDMapInfo.get(tradeID); - } - - return undefined; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/routes/index.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/routes/index.ts deleted file mode 100644 index 0018288100..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/routes/index.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * index.ts - */ - -import { Router, NextFunction, Request, Response } from "express"; -import { TransactionManagement } from "../TransactionManagement"; -import { VerifierFactory } from "../../verifier/VerifierFactory"; -import escapeHtml from "escape-html"; - -const router: Router = Router(); -export const transactionManagement: TransactionManagement = - new TransactionManagement(); -export const verifierFactory: VerifierFactory = new VerifierFactory( - transactionManagement, -); - -/* GET home page. */ -router.get("/", (req: Request, res: Response, next: NextFunction) => { - try { - res.render("index", { title: "Express" }); - } catch (err) { - next(err); - } -}); - -// Show Business Logics -router.get( - "/api/v1/bl/logics/", - (req: Request, res: Response, next: NextFunction) => { - try { - res.render("Not Implemented (Show Business Logics)\n"); - } catch (err) { - next(err); - } - }, -); - -// Show Specification of Business Logic -router.get( - "/api/v1/bl/logics/:id", - (req: Request, res: Response, next: NextFunction) => { - try { - res.render( - "Not Implemented (Show Specification of Business Logic" + - ", id=" + - escapeHtml(req.params.id) + - ")\n", - ); - } catch (err) { - next(err); - } - }, -); - -// Register a Wallet -router.post( - "/api/v1/bl/wallets/", - (req: Request, res: Response, next: NextFunction) => { - try { - res.render("Not Implemented (Register a Wallet)\n"); - } catch (err) { - next(err); - } - }, -); - -// Show Wallet List -router.get( - "/api/v1/bl/wallets/", - (req: Request, res: Response, next: NextFunction) => { - try { - res.render("Not Implemented (Show Wallet List)\n"); - } catch (err) { - next(err); - } - }, -); - -// Update Existing Wallets -router.put( - "/api/v1/bl/wallets/:id", - (req: Request, res: Response, next: NextFunction) => { - try { - res.render( - "Not Implemented (Update Existing Wallets" + - ", id=" + - escapeHtml(req.params.id) + - ")\n", - ); - } catch (err) { - next(err); - } - }, -); - -// Delete a Wallet -router.delete( - "/api/v1/bl/wallets/:id", - (req: Request, res: Response, next: NextFunction) => { - try { - const walletIdEsc = escapeHtml(req.params.id); - const out = "Not Implemented (Delete a Wallet, id=" + walletIdEsc + ")\n"; - res.status(501).send(out); - } catch (err) { - next(err); - } - }, -); - -export default router; diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/routes/login.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/routes/login.ts deleted file mode 100644 index 984d11e4bd..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/routes/login.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * login.ts - */ - -import { Router, NextFunction, Request, Response } from "express"; -import { RIFUtil } from "../util/RIFUtil"; -import { ConfigUtil } from "../util/ConfigUtil"; -import { RIFError, BadRequestError, InternalServerError } from "../RIFError"; - -const fs = require("fs"); -const path = require("path"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "login"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const router: Router = Router(); - -/* POST login. */ -router.post("/", (req: Request, res: Response, next: NextFunction) => { - try { - const userId = req.body.userid; - const userPwd = req.body.pwd; - logger.debug(`##in login: userid=${userId}, pwd=${userPwd}`); - - if (userId === undefined) { - const msg = `invalid param. userid`; - logger.warn(msg); - throw new BadRequestError(msg); - } - if (userPwd === undefined) { - const msg = `invalid param. pwd`; - logger.warn(msg); - throw new BadRequestError(msg); - } - - const authToken = RIFUtil.createToken(userId); - logger.debug(`##authToken=${authToken}`); - - const respData = { authToken: authToken }; - - res.status(201); - res.send(respData); - } catch (err: any) { - 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 login: ${err}`); - next(err); - } -}); - -export default router; diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/BLPRegistry.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/BLPRegistry.ts deleted file mode 100644 index c5216e1b93..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/BLPRegistry.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * BLPRegistry.ts - */ - -import { DBAccess } from "./DBAccess"; -import { ConfigUtil } from "../util/ConfigUtil"; - -const fs = require("fs"); -const path = require("path"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "BLPRegistry"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class BLPRegistry { - blpRegistryInfo: [] = []; - - constructor() { - const dbAccess: DBAccess = new DBAccess(); - this.blpRegistryInfo = dbAccess.getBLPRegistryInfo(); - } - - getBLPRegistryInfo(businessLogicId?: string): string { - if (businessLogicId) { - let ret = ""; - this.blpRegistryInfo.forEach((info) => { - if (info["businessLogicID"] === businessLogicId) { - ret = JSON.stringify(info); - } - }); - if (ret === "") { - logger.warn( - "BLPRegistryInfo is Not Found : businessLogicId = " + businessLogicId, - ); - } - return ret; - } else { - return JSON.stringify(this.blpRegistryInfo); - } - } - - getBusinessLogicIDList(): string[] { - const businessLogicIDList: string[] = []; - this.blpRegistryInfo.forEach((info) => { - businessLogicIDList.push(info["businessLogicID"]); - }); - - return businessLogicIDList; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/ConfigUtil.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/ConfigUtil.ts deleted file mode 100644 index b55575c21d..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/ConfigUtil.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * ConfigUtil.ts - */ - -const fs = require("fs"); -const yaml = require("js-yaml"); - -function readConfig(path: string, encoding = "utf8"): object { - try { - return yaml.safeLoad(fs.readFileSync(path, encoding)); - } catch (err: unknown) { - return {}; - } -} - -export class ConfigUtil { - /** - * Get configuration object - * - * @return {object} Configuration object - */ - static getConfig(): object { - const configCommon = readConfig("/etc/cactus/default.yaml", "utf8"); - const configAppli = readConfig("/etc/cactus/usersetting.yaml", "utf8"); - return ConfigUtil.mergeObjects(configCommon, configAppli); - } - - /** - * Merge objects - * - * @param {object} target - Target object - * @param {object} source - Source object - * @return {object} Merged objects - */ - private static mergeObjects(target: object, source: object): object { - const isObject = (obj: unknown) => - obj && typeof obj === "object" && !Array.isArray(obj); - const mergeObject = Object.assign({}, target); - if (isObject(target) && isObject(source)) { - for (const [sourceKey, sourceValue] of Object.entries(source)) { - const targetValue = (target as { [key: string]: any })[sourceKey]; - if (isObject(sourceValue) && target.hasOwnProperty(sourceKey)) { - (mergeObject as { [key: string]: any })[sourceKey] = - ConfigUtil.mergeObjects(targetValue, sourceValue); - } else { - Object.assign(mergeObject, { [sourceKey]: sourceValue }); - } - } - } - return mergeObject; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/ContractInfoHolder.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/ContractInfoHolder.ts deleted file mode 100644 index ad24871eba..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/ContractInfoHolder.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * ContractInfoHolder.ts - */ - -import { DBAccess } from "./DBAccess"; -import { ConfigUtil } from "../util/ConfigUtil"; - -const fs = require("fs"); -const path = require("path"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "ContractInfoHolder"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class ContractInfoHolder { - contractInfo: [] = []; - - constructor() { - // TODO: Get contract information for all contracts - const dbAccess: DBAccess = new DBAccess(); - this.contractInfo = dbAccess.getContractInfo(); - } - - getContractInfo(contractName?: string): string { - // TODO: Get information about the specified LedgerPlugin - - if (contractName) { - let ret = ""; - this.contractInfo.forEach((info) => { - if (info["contractName"] === contractName) { - ret = JSON.stringify(info); - } - }); - if (ret === "") { - logger.warn( - "ContractInfo is Not Found : contractName = " + contractName, - ); - } - return ret; - } else { - return JSON.stringify(this.contractInfo); - } - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/DBAccess.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/DBAccess.ts deleted file mode 100644 index 324de11af3..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/DBAccess.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * DBAccess.ts - */ - -import { ConfigUtil } from "../util/ConfigUtil"; -import { - ValidatorRegistry, - LedgerPluginInfo, -} from "../../verifier/validator-registry"; - -const fs = require("fs"); -const path = require("path"); -const yaml = require("js-yaml"); -const configDefault: any = ConfigUtil.getConfig(); - -import { getLogger } from "log4js"; -const logger = getLogger("DBAccess"); -logger.level = configDefault.logLevel; - -export class DBAccess { - ledgerPluginInfo: LedgerPluginInfo[] = []; - contractInfo: [] = []; - blpRegistryInfo: [] = []; - - constructor() { - // TODO: DB Access Initialization - } - - getLedgerPluginInfo(): LedgerPluginInfo[] { - try { - const configVerifier: ValidatorRegistry = new ValidatorRegistry( - path.resolve(__dirname, "/etc/cactus/validator-registry-config.yaml"), - ); - this.ledgerPluginInfo = configVerifier.ledgerPluginInfo; - } catch (error) { - logger.info("Could not get ledger plugin info"); - logger.debug(error); - } - - return this.ledgerPluginInfo; - } - - getContractInfo(): [] { - try { - const configContract: any = yaml.safeLoad( - fs.readFileSync("/etc/cactus/contractInfo.yaml", "utf8"), - ); - - this.contractInfo = configContract.contractInfo; - } catch (error) { - logger.info("Could not get contract info"); - logger.debug(error); - } - - return this.contractInfo; - } - - getBLPRegistryInfo(): [] { - // TODO: Future access to DB for business logic plugin information - - this.blpRegistryInfo = configDefault.blpRegistry; - return this.blpRegistryInfo; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/LPInfoHolder.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/LPInfoHolder.ts deleted file mode 100644 index 98d7b21ab1..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/LPInfoHolder.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * LPInfoHolder.ts - */ - -import { DBAccess } from "./DBAccess"; -import { ConfigUtil } from "../util/ConfigUtil"; -import { LedgerPluginInfo } from "../../verifier/validator-registry"; - -const fs = require("fs"); -const path = require("path"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "LPInfoHolder"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class LPInfoHolder { - ledgerPluginInfo: LedgerPluginInfo[]; - - constructor() { - // TODO: Get connection information for all LedgerPlugins - const dbAccess: DBAccess = new DBAccess(); - this.ledgerPluginInfo = dbAccess.getLedgerPluginInfo(); - } - - getLegerPluginInfo(validatorId?: string): string { - // TODO: Get information about the specified LedgerPlugin - - if (validatorId) { - let ret = ""; - this.ledgerPluginInfo.forEach((info) => { - if (info["validatorID"] === validatorId) { - ret = JSON.stringify(info); - } - }); - if (ret === "") { - logger.warn( - "LegerPluginInfo is Not Found : validatorId = " + validatorId, - ); - } - return ret; - } else { - return JSON.stringify(this.ledgerPluginInfo); - } - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/RIFUtil.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/RIFUtil.ts deleted file mode 100644 index 6fe110ee7c..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/RIFUtil.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * RIFUtil.ts - */ - -import { ConfigUtil } from "./ConfigUtil"; - -const fs = require("fs"); -const path = require("path"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "RIFUtil"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class RIFUtil { - /** - * Convert JSON object to string - * - * @param {Object} jsonObj - JSON object. - * @return {String} The converted string. Returns null if the conversion fails. - */ - static json2str(jsonObj: object): string | null { - try { - return JSON.stringify(jsonObj); - } catch (error) { - return null; - } - } - - /** - * Convert a JSON string to an object - * - * @param {String} jsonObj - JSON string. - * @return {Object} The converted object. Returns null if the conversion fails. - */ - static str2json(jsonStr: string): object | null { - try { - return JSON.parse(jsonStr); - } catch (error) { - logger.error(error); - return null; - } - } - - /** - * Get the authentication token - * - * @param {req} req - req object. - * @return {string} If no authentication token is specified, returns undefined. - */ - static getTokenByReq(req: any): string | undefined { - return req.query.token; - } - - /** - * Get the authentication token - * - * @param {string} userId - The target user ID. - * @return {string} Returns the authentication token. Format: tk_{userid}_{YYYYMMDDhhmm(UTC)} - */ - static createToken(userId: string): string { - logger.debug(`##in createToken`); - const now = new Date(); - const year = now.getUTCFullYear(); - const month = RIFUtil.getdoubleDigestNumerStr(now.getUTCMonth() + 1); - const day = RIFUtil.getdoubleDigestNumerStr(now.getUTCDate()); - const hour = RIFUtil.getdoubleDigestNumerStr(now.getUTCHours()); - const min = RIFUtil.getdoubleDigestNumerStr(now.getUTCMinutes()); - const strTimestamp = `${year}${month}${day}${hour}${min}`; - - const retToken = `tk_${userId}_${strTimestamp}`; - logger.debug(`retToken=${retToken}`); - - return retToken; - } - - /** - * Convert a number to a two-digit string - * - * @param {number} val - The number to convert - * @return {string} Return a two-digit string. - */ - static getdoubleDigestNumerStr(val: number): string { - return ("0" + val).slice(-2); - } - - /** - * Obtain a user ID from an authentication token - * - * @param {string} token - The authentication token. - * @return {string} Returns the user ID. Returns undefined if the authentication token is incorrect. - */ - static getUserIdByToken(token: string): string | undefined { - // NOTE: The authentication token is "tk_userid_YYYYYMMDDhhmm". - if (!RIFUtil.isValidToken(token)) { - return undefined; - } - - return token.substr(3, token.length - 16); - } - - /** - * Get a timestamp (YYYYMMDDhhmm) string from an authentication token - * - * @param {string} token - The authentication token. - * @return {string} Return a timestamp (YYYYMMDDhhmm) string. Returns undefined if the authentication token is incorrect. - */ - static getTimestampByToken(token: string): string | undefined { - // NOTE: The authentication token is "tk_userid_YYYYYMMDDhhmm". - if (!RIFUtil.isValidToken(token)) { - return undefined; - } - - return token.substr(token.length - 12); - } - - /** - * Validating Authentication Tokens - * - * @param {string} token - The authentication token. - * @return {boolean} true: correct, false: incorrect - */ - private static isValidToken(token: string): boolean { - if (token === undefined) { - logger.warn(`invalid token: ${token}`); - return false; - } - - // NOTE: The authentication token is "tk_userid_YYYYYMMDDhhmm". - if (token.length <= 17) { - logger.warn(`invalid token: ${token}`); - return false; - } - - const prefix = token.substr(0, 3); - if (prefix !== "tk_") { - logger.warn(`invalid token: ${token}`); - return false; - } - - return true; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/__mocks__/ConfigUtil.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/__mocks__/ConfigUtil.ts deleted file mode 100644 index e815c2c05f..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/util/__mocks__/ConfigUtil.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * ConfigUtil.ts - */ - -export const __configMock = { - logLevel: "silent", -}; - -export class ConfigUtil { - static getConfig(): object { - return __configMock; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/routing-interface/www.ts b/examples/cactus-common-example-server/src/main/typescript/routing-interface/www.ts deleted file mode 100644 index 6d7592dab4..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/routing-interface/www.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { startCactusSocketIOServer } from "./CactusSocketIOServer"; - -startCactusSocketIOServer(); diff --git a/examples/cactus-common-example-server/src/main/typescript/util/TransactionSigner.ts b/examples/cactus-common-example-server/src/main/typescript/util/TransactionSigner.ts deleted file mode 100644 index 15d2a1dfa1..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/util/TransactionSigner.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * TransactionSigner.ts - */ - -import path from "path"; -import ethJsCommon from "ethereumjs-common"; -import { Transaction as EthTransaction } from "ethereumjs-tx"; -import { getLogger } from "log4js"; -import { ConfigUtil } from "../routing-interface/util/ConfigUtil"; -import { ValidatorRegistry } from "../verifier/validator-registry"; - -const config: any = ConfigUtil.getConfig(); -const configVerifier: ValidatorRegistry = new ValidatorRegistry( - path.resolve(__dirname, "/etc/cactus/validator-registry-config.yaml"), -); - -const moduleName = "TransactionEthereum"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class TransactionSigner { - static signTxEthereum(rawTx: object, signPkey: string) { - logger.debug(`####in signTxEthereum()`); - - if (!configVerifier.signTxInfo) { - throw new Error("Missing configVerifier.signTxInfo"); - } - - // ethereumjs-tx2.1.2_support - const customCommon = ethJsCommon.forCustomChain( - configVerifier.signTxInfo.ethereum.network, - { - name: configVerifier.signTxInfo.ethereum.chainName, - networkId: parseInt(configVerifier.signTxInfo.ethereum.networkID, 10), - chainId: parseInt(configVerifier.signTxInfo.ethereum.chainID, 10), - }, - configVerifier.signTxInfo.ethereum.hardfork, - ); - - const privKey: Buffer = Buffer.from(signPkey, "hex"); - const tx = new EthTransaction(rawTx, { common: customCommon }); - tx.sign(privKey); - - // Get Transaction ID - const hash: Buffer = tx.hash(true); - const txId: string = "0x" + hash.toString("hex"); - logger.debug("##txId=" + txId); - - const serializedTx: Buffer = tx.serialize(); - const serializedTxHex: string = "0x" + serializedTx.toString("hex"); - logger.debug("##serializedTxHex=" + serializedTxHex); - - const signedTx = { - serializedTx: serializedTxHex, - txId: txId, - }; - - return signedTx; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/util/config.ts b/examples/cactus-common-example-server/src/main/typescript/util/config.ts deleted file mode 100644 index f8030e00b4..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/util/config.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * NOTE: Be sure that NODE_CONFIG_DIR env variable points to the location - * of current module config files before loading this. - * - * config.js - */ - -import config from "config"; - -/** - * Get configuration entry (uses node-config setup) - * - * @param key : Key to retrieve - * @param defaultValue : Value to return if key is not present in the config. - * @returns : Configuration value - */ -export function configRead(key: string, defaultValue?: T): T { - if (config.has(key)) { - return config.get(key); - } - - if (defaultValue) { - return defaultValue; - } - - throw Error( - `Missing configuration entry '${key}', config dir = ${process.env["NODE_CONFIG_DIR"]}`, - ); -} diff --git a/examples/cactus-common-example-server/src/main/typescript/verifier/DriverCommon.ts b/examples/cactus-common-example-server/src/main/typescript/verifier/DriverCommon.ts deleted file mode 100644 index 59c73f7618..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/verifier/DriverCommon.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * DriverCommon.ts - */ - -import { ApiInfo, RequestedData } from "./LedgerPlugin"; -import { ConfigUtil } from "../routing-interface/util/ConfigUtil"; - -const fs = require("fs"); -const path = require("path"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "DriverCommon"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -// for debug -export function json2str(jsonObj: unknown) { - try { - return JSON.stringify(jsonObj); - } catch (error) { - logger.warn("invalid json format."); - return null; - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/verifier/LedgerPlugin.ts b/examples/cactus-common-example-server/src/main/typescript/verifier/LedgerPlugin.ts deleted file mode 100644 index 553a33625b..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/verifier/LedgerPlugin.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * LedgerPlugin.ts - */ - -export { - IVerifier, - LedgerEvent, - IVerifierEventListener, -} from "@hyperledger/cactus-core-api"; - -export class ApiInfo { - apiType = ""; - requestedData: RequestedData[] = []; -} - -export class RequestedData { - dataName = ""; - dataType = ""; -} diff --git a/examples/cactus-common-example-server/src/main/typescript/verifier/Verifier.ts b/examples/cactus-common-example-server/src/main/typescript/verifier/Verifier.ts deleted file mode 100644 index 527f67fe9b..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/verifier/Verifier.ts +++ /dev/null @@ -1,492 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * Verifier.ts - */ - -import { - IVerifier, - ApiInfo, - LedgerEvent, - IVerifierEventListener, -} from "./LedgerPlugin"; -import { json2str } from "./DriverCommon"; -import { LedgerOperation } from "../business-logic-plugin/LedgerOperation"; -import { LedgerPluginInfo } from "./validator-registry"; -import { ConfigUtil } from "../routing-interface/util/ConfigUtil"; -import { VerifierAuthentication } from "./VerifierAuthentication"; -const XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; - -import { Socket, io } from "socket.io-client-fixed-types"; - -const fs = require("fs"); -const path = require("path"); -const yaml = require("js-yaml"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "Verifier"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const VALIDATOR_TYPE = { - SOCKET: "socketio", - OPENAPI: "openapi", -} as const; -type VALIDATOR_TYPE = (typeof VALIDATOR_TYPE)[keyof typeof VALIDATOR_TYPE]; // 'socketio' | 'openapi' - -// abolish template-trade -// const validatorRregistryConf: any = yaml.safeLoad(fs.readFileSync("/etc/cactus/validator-registry.yaml", 'utf8')); - -export class Verifier implements IVerifier { - validatorID = ""; - validatorType = ""; - validatorUrl = ""; - validatorKeyPath = ""; - apiInfo: Array = []; - counterReqID = 1; - eventListenerHash: { [key: string]: IVerifierEventListener } = {}; // Listeners for events from Ledger - static mapUrlSocket: Map = new Map(); - checkValidator: (key: string, data: string) => Promise = - VerifierAuthentication.verify; - - constructor(ledgerInfo: string) { - // TODO: Configure the Verifier based on the connection information - const ledgerInfoObj = JSON.parse(ledgerInfo) as LedgerPluginInfo; - this.validatorID = ledgerInfoObj.validatorID; - this.validatorType = ledgerInfoObj.validatorType; - this.validatorUrl = ledgerInfoObj.validatorURL; - this.validatorKeyPath = ledgerInfoObj.validatorKeyPath; - this.apiInfo = ledgerInfoObj.apiInfo; - - if (VALIDATOR_TYPE.SOCKET === this.validatorType) { - // create socket instance assosiated with validatorUrl if it has not created yet - if (!Verifier.mapUrlSocket.has(this.validatorID)) { - const socketOptions: {} = { - rejectUnauthorized: config.socketOptions.rejectUnauthorized, // temporary avoidance since self-signed certificates are used - reconnection: config.socketOptions.reconnection, - timeout: config.socketOptions.timeout, - }; - logger.debug(`socketOptions = ${JSON.stringify(socketOptions)}`); - Verifier.mapUrlSocket.set( - this.validatorID, - io(this.validatorUrl, socketOptions), - ); - } - } - } - - // NOTE: asynchronous command - public sendAsyncRequest( - contract: object, - method: object, - args: any, - ): Promise { - return new Promise((resolve, reject) => { - logger.debug( - `call: sendAsyncRequest, contract = ${JSON.stringify( - contract, - )}, method = ${JSON.stringify(method)}, args = ${args}`, - ); - try { - // verifier comunicate with socket - if (VALIDATOR_TYPE.SOCKET === this.validatorType) { - this.requestLedgerOperationNeo(contract, method, args); - resolve(); - // verifier comunicate with http - } else if (VALIDATOR_TYPE.OPENAPI === this.validatorType) { - this.requestLedgerOperationHttp( - contract, - method, - args as { args: any }, - ) - .then(() => { - resolve(); - }) - .catch((err) => { - logger.error(err); - reject(err); - }); - } else { - const emsg = `invalid validator type : ${this.validatorType}`; - logger.error(emsg); - const retObj = { - resObj: { - status: 504, - errorDetail: emsg, - }, - }; - reject(retObj); - } - } catch (err) { - logger.error(err); - reject(err); - } - }); - } - - // NOTE: asynchronous command (repaired version) - // TODO: Method name confirmation - private requestLedgerOperationNeo( - contract: object, - method: object, - args: object, - ): void { - logger.debug("call : requestLedgerOperation"); - try { - const socket = Verifier.mapUrlSocket.get(this.validatorID); - if (socket === undefined) { - throw Error(`No socket for validator with ID ${this.validatorID}`); - } - - const requestData: {} = { - contract: contract, - method: method, - args: args, - }; - // logger.debug('requestData : ' + JSON.stringify(requestData)); - socket.emit("request2", requestData); - } catch (err) { - logger.error("requestLedgerOperation faild : " + err); - throw err; - } - } - - // NOTE: Synchronous command (entrance) - public sendSyncRequest( - contract: object, - method: object, - args: object, - ): Promise { - return new Promise((resolve, reject) => { - logger.debug("call : sendSyncRequest"); - try { - logger.debug( - "##in sendSyncRequest, contract:", - contract, - "method:", - method, - "args:", - args, - ); - let responseFlag = false; - - // reqID generation - const reqID = this.genarateReqID(); - logger.debug(`##sendSyncRequest, reqID = ${reqID}`); - - // Preparing socket - const socket = Verifier.mapUrlSocket.get(this.validatorID); - if (socket === undefined) { - throw Error(`No socket for validator with ID ${this.validatorID}`); - } - - socket.on("connect_error", (err: object) => { - logger.error("##connect_error:", err); - // end communication - socket.disconnect(); - reject(err); - }); - socket.on("connect_timeout", (err: object) => { - logger.error("####Error:", err); - // end communication - socket.disconnect(); - reject(err); - }); - socket.on("error", (err: object) => { - logger.error("####Error:", err); - socket.disconnect(); - reject(err); - }); - socket.on("response", (result: any) => { - logger.debug("#[recv]response, res:", result); - if (reqID === result.id) { - responseFlag = true; - - this.checkValidator(this.validatorKeyPath, result.resObj.data) - .then((decodedData) => { - const resultObj = { - status: result.resObj.status, - data: decodedData.result, - }; - logger.debug("resultObj =", resultObj); - // Result reply - resolve(resultObj); - }) - .catch((err) => { - responseFlag = false; - logger.error(err); - }); - } - }); - - // Call Validator - const requestData: {} = { - contract: contract, - method: method, - args: args, - reqID: reqID, - }; - logger.debug("requestData:", requestData); - socket.emit("request2", requestData); - logger.debug("set timeout"); - - // Time-out setting - setTimeout(() => { - if (responseFlag === false) { - logger.debug("requestTimeout reqID:", reqID); - resolve({ status: 504, amount: 0 }); - } - }, config.verifier.syncFunctionTimeoutMillisecond); - } catch (err) { - logger.error("##Error: sendSyncRequest:", err); - reject(err); - } - }); - } - - private requestLedgerOperationHttp( - contract: object, - method: object, - args: { args: any }, - ): Promise { - return new Promise((resolve, reject) => { - try { - logger.debug( - `##in requestLedgerOperationHttp, contract = ${JSON.stringify( - contract, - )}, method = ${JSON.stringify(method)}, args = ${JSON.stringify( - args, - )}`, - ); - const eventListenerHash = this.eventListenerHash; - const validatorID = this.validatorID; - - const httpReq = new XMLHttpRequest(); - httpReq.onload = function () { - try { - // TODO: responding in JSON format? - logger.debug(`responseObj = ${httpReq.responseText}`); - const responseObj = JSON.parse(httpReq.responseText); - logger.debug(`responseObj = ${JSON.stringify(responseObj)}`); - - logger.debug(`##make event`); - const event = Verifier.makeOpenApiEvent(responseObj, validatorID); - logger.debug(`##event: ${JSON.stringify(event)}`); - let eventListener = null; - if (Object.keys(eventListenerHash).length > 0) { - logger.debug(`##requestLedgerOperationHttp`); - for (const key in eventListenerHash) { - logger.debug( - `key : ${key}, eventListenerHash[key] : ${JSON.stringify( - eventListenerHash[key], - )}`, - ); - eventListener = eventListenerHash[key]; - eventListener.onEvent(event); - } - } else { - logger.debug( - `##requestLedgerOperationHttp eventListener does not exist`, - ); - } - logger.debug(`##after onEvent()`); - - // resolve(responseObj); - } catch (err) { - logger.error( - `##Error: requestLedgerOperationHttp#httpReq.onload, ${err}`, - ); - } - }; - httpReq.onerror = function () { - logger.error(`##Error: requestLedgerOperationHttp#httpReq.onerror`); - }; - - logger.debug(`validatorUrl: ${this.validatorUrl}`); - httpReq.open("POST", this.validatorUrl + (method as any).command); - // httpReq.setRequestHeader('content-type', 'application/json'); - httpReq.setRequestHeader("Content-Type", "application/json"); - // httpReq.send(args['args']); - logger.debug(`args['args']: ${JSON.stringify(args.args)}`); - httpReq.send(JSON.stringify(args.args)); - - resolve(); - } catch (err) { - logger.error(`##Error: requestLedgerOperationHttp, ${err}`); - reject(err); - } - }); - } - - static makeOpenApiEvent(resp: object, validatorID: string): LedgerEvent { - logger.debug(`##in makeOpenApiEvent, resp = ${JSON.stringify(resp)}`); - - const event: LedgerEvent = { - id: "", - verifierId: validatorID, - data: { txId: "openapi-txid-00001", blockData: [resp] }, - }; - logger.debug(`##event: ${JSON.stringify(event)}`); - return event; - } - - public startMonitor( - id: string, - options: Object, - eventListener: IVerifierEventListener, - ): Promise { - return new Promise((resolve, reject) => { - logger.debug("call : startMonitor"); - try { - this.setEventListener(id, eventListener); - - if (Object.keys(this.eventListenerHash).length > 0) { - logger.debug( - `##in startMonitor, validatorUrl = ${this.validatorUrl}`, - ); - - const socket = Verifier.mapUrlSocket.get(this.validatorID); - if (socket === undefined) { - throw Error(`No socket for validator with ID ${this.validatorID}`); - } - - socket.on("connect_error", (err: object) => { - logger.error("##connect_error:", err); - // end communication - socket.disconnect(); - reject(err); - }); - - socket.on("monitor_error", (err: object) => { - logger.error("##monitor_error:", err); - // end communication - socket.disconnect(); - reject(err); - }); - - socket.on("connect_timeout", (err: object) => { - logger.error("####Error:", err); - // end communication - socket.disconnect(); - reject(err); - }); - - socket.on("error", (err: object) => { - logger.error("####Error:", err); - socket.disconnect(); - reject(err); - }); - - socket.on("eventReceived", (res: any) => { - // output the data received from the client - logger.debug("#[recv]eventReceived, res: " + json2str(res)); - logger.debug( - `##eventReceived Object.keys(this.eventListenerHash).length : ${ - Object.keys(this.eventListenerHash).length - }`, - ); - if (Object.keys(this.eventListenerHash).length > 0) { - this.checkValidator(this.validatorKeyPath, res.blockData) - .then((decodedData) => { - const resultObj = { - status: res.status, - blockData: decodedData.blockData, - }; - logger.debug("resultObj =", resultObj); - const event: LedgerEvent = { - id: "", - verifierId: this.validatorID, - data: resultObj, - }; - logger.debug(`##event.verifierId: ${event.verifierId}`); - for (const key in this.eventListenerHash) { - const eventListener = this.eventListenerHash[key]; - if (eventListener != null) { - logger.debug( - `##set eventListener: ${eventListener}, ${this.constructor.name}, ${this.validatorID}`, - ); - eventListener.onEvent(event); - } else { - logger.warn(`##skip eventListener`); - logger.warn(`##eventListener key: ${key}`); - logger.warn(`##eventListener: ${eventListener}`); - } - } - }) - .catch((err) => { - logger.error(err); - }); - } - }); - - socket.on("connect", () => { - logger.debug("#connect"); - logger.debug("##emit: startMonitor"); - if (Object.keys(this.eventListenerHash).length > 0) { - if (Object.keys(options).length === 0) { - socket.emit("startMonitor"); - } else { - socket.emit("startMonitor", options); - } - } - }); - } - } catch (err) { - logger.error(`##Error: startMonitor, ${err}`); - reject(err); - } - }); - } - - public stopMonitor(id?: string): void { - logger.debug(`##call : stopMonitor, id = ${id}`); - try { - if (id === undefined) { - // if the id is not specified, delete all eventListeners - for (const key in this.eventListenerHash) { - delete this.eventListenerHash[key]; - } - } else { - // if the id is specified, delete eventListener defined by "id" - delete this.eventListenerHash[id]; - } - if (Object.keys(this.eventListenerHash).length === 0) { - const socket = Verifier.mapUrlSocket.get(this.validatorID); - if (socket === undefined) { - throw Error(`No socket for validator with ID ${this.validatorID}`); - } - logger.debug("##emit: stopMonitor"); - socket.emit("stopMonitor"); - } - } catch (err) { - logger.error(`##Error: stopMonitor, ${err}`); - } - } - - private setEventListener( - appId: string, - eventListener: IVerifierEventListener | null, - ): void { - logger.debug(`##call : setEventListener`); - if (eventListener) { - this.eventListenerHash[appId] = eventListener; - } - return; - } - - // Request ID generation - private genarateReqID(): string { - if (this.counterReqID > config.verifier.maxCounterRequestID) { - // Counter initialization - this.counterReqID = 1; - } - return `${this.validatorID}_${this.counterReqID++}`; - } - - // Validator -> Verifier - // NOTE: The following methods are not implemented this time - // connect(): void; - // disconnect(): void; - // getVerifierInfo(): VerifierInfo[]; -} diff --git a/examples/cactus-common-example-server/src/main/typescript/verifier/VerifierAuthentication.ts b/examples/cactus-common-example-server/src/main/typescript/verifier/VerifierAuthentication.ts deleted file mode 100644 index dbbfe58813..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/verifier/VerifierAuthentication.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * VerifierAuthentication.ts - */ - -import { ConfigUtil } from "../routing-interface/util/ConfigUtil"; -const fs = require("fs"); -const path = require("path"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "VerifierAuthentication"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; -const jwt = require("jsonwebtoken"); - -export class VerifierAuthentication { - static verify(keyPath: string, targetData: string): Promise { - return new Promise((resolve, reject) => { - const publicKey = fs.readFileSync(path.resolve(__dirname, keyPath)); - - const option = { - algorithms: "ES256", - }; - - jwt.verify( - targetData, - publicKey, - option, - function (err: any, decoded: any) { - if (err) { - // Authentication NG - logger.debug(`Authentication NG : error = ${err}`); - reject(err); - } else { - // Authentication OK - // logger.debug(`Authentication OK : decoded = ${JSON.stringify(decoded)}`); - logger.debug(`Authentication OK`); - resolve(decoded); - } - }, - ); - }); - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/verifier/VerifierFactory.ts b/examples/cactus-common-example-server/src/main/typescript/verifier/VerifierFactory.ts deleted file mode 100644 index 4580dc212d..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/verifier/VerifierFactory.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * VerifierFactory.ts - */ - -import { Verifier } from "./Verifier"; -import { LPInfoHolder } from "../routing-interface/util/LPInfoHolder"; -import { ConfigUtil } from "../routing-interface/util/ConfigUtil"; - -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -import { IVerifierEventListener } from "./LedgerPlugin"; -const moduleName = "VerifierFactory"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class VerifierFactory { - static verifierHash: { [key: string]: Verifier } = {}; // Verifier - - constructor( - private eventListener: IVerifierEventListener, - private connectInfo = new LPInfoHolder(), - ) {} - - // Get Verifier - getVerifier( - validatorId: string, - appId = "", - monitorOptions: {} = {}, - monitorMode = true, - ): Verifier { - // Return Verifier - // If you have already made it, please reply. If you haven't made it yet, make it and reply. - if (VerifierFactory.verifierHash[validatorId]) { - return VerifierFactory.verifierHash[validatorId]; - } else { - const ledgerPluginInfo: string = - this.connectInfo.getLegerPluginInfo(validatorId); - // TODO: I want to manage an instance using the validatorId as a key instead of a dedicated member variable - VerifierFactory.verifierHash[validatorId] = new Verifier( - ledgerPluginInfo, - ); - logger.debug("##startMonitor"); - logger.debug(`##getVerifier validatorId :${validatorId}`); - logger.debug(`##getVerifier appId :${appId}`); - logger.debug(`##getVerifier monitorOptions :${monitorOptions}`); - logger.debug(`##getVerifier monitorMode :${monitorMode}`); - - if (monitorMode && appId) { - VerifierFactory.verifierHash[validatorId].startMonitor( - appId, - monitorOptions, - this.eventListener, - ); - } - return VerifierFactory.verifierHash[validatorId]; - } - } -} diff --git a/examples/cactus-common-example-server/src/main/typescript/verifier/validator-authentication.ts b/examples/cactus-common-example-server/src/main/typescript/verifier/validator-authentication.ts deleted file mode 100644 index fe2fca3134..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/verifier/validator-authentication.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import fs from "fs"; -import jwt from "jsonwebtoken"; -import crypto from "crypto"; -import { configRead } from "../util/config"; - -type PayloadType = Parameters[0]; - -const DEFAULT_EXPIRATION_TIME = 60 * 15; // 15 minutes - -const supportedJwtAlgos: jwt.Algorithm[] = [ - "ES256", - "ES384", - "ES512", - "RS256", - "RS384", - "RS512", -]; - -// Will keep the private key once it's succesfully read -let privateKey: string; - -/** - * Sign a message to be sent from socketio connector (validator) to a client. - * - * @param privateKey - Validator private key. Only ECDSA and RSA keys are supported. - * @param payload - Message to be encoded. - * @param jwtAlgo - JWT algorithm to use. Must match key used (ES*** or RS***) - * @param expirationTime - JWT expiration time - * @returns JWT signed message that can be sent over the wire. - */ -export function signValidatorMessageJwt( - privateKey: jwt.Secret, - payload: PayloadType, - jwtAlgo: jwt.Algorithm = "ES256", - expirationTime: number = DEFAULT_EXPIRATION_TIME, -): string { - if (!supportedJwtAlgos.includes(jwtAlgo)) { - throw new Error( - `Wrong JWT Algorithm. Supported algos: ${supportedJwtAlgos.toString()}`, - ); - } - - const privateKeyStr = privateKey.toString(); - // Check if key supported and JWT algorithm matches the provided key type - const keyType = crypto.createPrivateKey(privateKeyStr).asymmetricKeyType; - if ( - !( - (keyType === "rsa" && jwtAlgo.startsWith("RS")) || - (keyType === "ec" && jwtAlgo.startsWith("ES")) - ) - ) { - throw new Error(`Not supported combination ${keyType}/${jwtAlgo}.`); - } - - const option: jwt.SignOptions = { - algorithm: jwtAlgo, - expiresIn: expirationTime, - }; - - return jwt.sign(payload, privateKey, option); -} - -/** - * Validator-side function to sign message to be sent to the client. - * Will read the private key either as value in validator config `sslParam.keyValue`, - * or read from filesystem under path `sslParam.key`. - * - * @param payload - Message to sign - * @returns Signed message - */ -export function signMessageJwt(payload: object): string { - if (!privateKey) { - try { - privateKey = configRead("sslParam.keyValue"); - } catch { - privateKey = fs.readFileSync(configRead("sslParam.key"), "ascii"); - } - } - const jwtAlgo = configRead("sslParam.jwtAlgo", "ES256"); - return signValidatorMessageJwt(privateKey, payload, jwtAlgo); -} diff --git a/examples/cactus-common-example-server/src/main/typescript/verifier/validator-registry.ts b/examples/cactus-common-example-server/src/main/typescript/verifier/validator-registry.ts deleted file mode 100644 index 145e2b85f1..0000000000 --- a/examples/cactus-common-example-server/src/main/typescript/verifier/validator-registry.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * validator-registry.ts - */ - -const fs = require("fs"); -const yaml = require("js-yaml"); - -type RequestedData = { - dataName: string; - dataType: string; -}; - -type ApiInfo = { - apiType: string; - requestedData: Array; -}; - -export type LedgerPluginInfo = { - validatorID: string; - validatorType: string; - validatorURL: string; - validatorKeyPath: string; - ledgerInfo: { - ledgerAbstract: string; - }; - apiInfo: Array; -}; - -type Peer = { - name: string; - requests: string; -}; - -type SignTxInfo = { - ethereum: { - chainName: string; - networkID: string; - chainID: string; - network: string; - hardfork: string; - }; - fabric: { - mspID: string; - peers: Array; - orderer: { - URL: string; - }; - ca: { - name: string; - URL: string; - }; - submitter: { - name: string; - secret: string; - }; - channelName: string; - chaincodeID: string; - }; -}; - -export class ValidatorRegistry { - ledgerPluginInfo: Array = []; - signTxInfo: SignTxInfo | undefined; - - constructor(path: string) { - try { - const yamlText = fs.readFileSync(path, "utf8"); - const yamlObj = yaml.safeLoad(yamlText); - this.ledgerPluginInfo = yamlObj.ledgerPluginInfo; - this.signTxInfo = yamlObj.signTxInfo; - } catch (error) { - console.log("Could not read validator registry"); - } - } -} diff --git a/examples/cactus-common-example-server/src/test/typescript/unit/DriverCommon.test.ts b/examples/cactus-common-example-server/src/test/typescript/unit/DriverCommon.test.ts deleted file mode 100644 index 7bb9e1f5ae..0000000000 --- a/examples/cactus-common-example-server/src/test/typescript/unit/DriverCommon.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* verifier/DriverCommon.ts Unit Tests - */ - -////////////////////////// -// TEST CONSTANTS -///////////////////////// - -import "jest-extended"; - -jest.mock("../../../main/typescript/routing-interface/util/ConfigUtil"); -import * as DriverCommon from "../../../main/typescript/verifier/DriverCommon"; - -////////////////////////// -// UNIT TESTS -///////////////////////// - -test("json2str return stringified JSON", () => { - const input = { - testKey: "testVal", - listing: [ - { - abc: 123, - cba: 321, - }, - ], - }; - - expect(DriverCommon.json2str(input)).toEqual(JSON.stringify(input)); -}); - -test("json2str return null when given wrong input", () => { - // Circular reference input - const input = {}; - (input as any)["field"] = input; - expect(DriverCommon.json2str(input)).toBeNull(); - - // Undefined input - // TODO - BUG? Returns undefined - // expect(DriverCommon.json2str(undefined)).toBeNull(); -}); diff --git a/examples/cactus-common-example-server/src/test/typescript/unit/Verifier.test.ts b/examples/cactus-common-example-server/src/test/typescript/unit/Verifier.test.ts deleted file mode 100644 index c25dda9064..0000000000 --- a/examples/cactus-common-example-server/src/test/typescript/unit/Verifier.test.ts +++ /dev/null @@ -1,657 +0,0 @@ -/* verifier/Verifier.ts Unit Tests - * Note: - * Don't use jest timer mocks here, they do not work well with node http module. - * With timer mocks tests will either hang or report open timeout handle. - */ - -////////////////////////// -// TEST CONSTANTS -///////////////////////// - -const testTimeout = 1000 * 5; // 5 second timeout per test -const setupTimeout = 1000 * 60; // 1 minute timeout for setup - -const defaultConfig = { - socketOptions: { - rejectUnauthorized: false, - reconnection: false, - timeout: 55555, - }, - logLevel: "silent", // will change level of logs from verifier - verifier: { - maxCounterRequestID: 3, - syncFunctionTimeoutMillisecond: 50, // used by validator functions! - }, -}; - -const defaultLedgerData = { - validatorID: "123validatorId321", - validatorType: "socketio", - validatorURL: "https://example:1234", - validatorKeyPath: "./nonexistent/path/somekey.crt", - ledgerInfo: { ledgerAbstract: "Test ledger" }, - apiInfo: [ - { - apiType: "getNumericBalance", - requestedData: [ - { - dataName: "referedAddress", - dataType: "string", - }, - ], - }, - ], -}; - -import "jest-extended"; -import { cloneDeep } from "lodash"; - -// Mock default config -import * as ConfigUtil from "../../../main/typescript/routing-interface/util/ConfigUtil"; -jest.mock("../../../main/typescript/routing-interface/util/ConfigUtil"); -(ConfigUtil as any)["__configMock"] = defaultConfig; - -const XMLHttpRequest = require("xmlhttprequest"); -jest.mock("xmlhttprequest"); - -// Init test logger -import { - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -const logLevel: LogLevelDesc = "info"; -const log: Logger = LoggerProvider.getOrCreate({ - label: "test-cmd-socketio-verifier", - level: logLevel, -}); - -import { Verifier } from "../../../main/typescript/verifier/Verifier"; - -import { - LedgerEvent, - IVerifierEventListener, -} from "../../../main/typescript/verifier/LedgerPlugin"; - -import { SocketIOTestSetupHelpers } from "@hyperledger/cactus-test-tooling"; - -////////////////////////////// -// TEST TIMEOUT -////////////////////////////// - -jest.setTimeout(testTimeout); - -////////////////////////////// -// CONSTRUCTOR TESTS -////////////////////////////// - -describe("Construction Tests", () => { - let testLedgerData: typeof defaultLedgerData; - - beforeEach(() => { - testLedgerData = cloneDeep(defaultLedgerData); - }, setupTimeout); - - afterEach(() => { - Verifier.mapUrlSocket.clear(); - }, setupTimeout); - - test("Fields set from passed ledger info", () => { - const sut = new Verifier(JSON.stringify(testLedgerData)); - expect(sut.validatorID).toEqual(testLedgerData.validatorID); - expect(sut.validatorType).toEqual(testLedgerData.validatorType); - expect(sut.validatorUrl).toEqual(testLedgerData.validatorURL); - expect(sut.validatorKeyPath).toEqual(testLedgerData.validatorKeyPath); - expect(sut.apiInfo).toEqual(testLedgerData.apiInfo); - }); - - test("Fails on wrong ledger data", () => { - expect(() => new Verifier("")).toThrow(); // Empty - expect(() => new Verifier('{"key": "val')).toThrow(); // Illformed JSON - - // Missing fields - // TODO: Bug? validatorID is undefined now - // let missingFieldInput = cloneDeep(testLedgerData); - // delete missingFieldInput.validatorID; - // expect(() => new Verifier(JSON.stringify(missingFieldInput))).toThrow(); - }); - - test("Stores new socket for each socketio validator in lookup map", () => { - expect(Verifier.mapUrlSocket.size).toEqual(0); - - // first validator - expect(new Verifier(JSON.stringify(testLedgerData))).toBeTruthy(); - expect(Verifier.mapUrlSocket.size).toEqual(1); - expect(Verifier.mapUrlSocket.has(testLedgerData.validatorID)).toBeTrue(); - expect(Verifier.mapUrlSocket.get(testLedgerData.validatorID)).toBeTruthy(); - - //second validator - testLedgerData.validatorID = "123abc"; - expect(new Verifier(JSON.stringify(testLedgerData))).toBeTruthy(); - expect(Verifier.mapUrlSocket.size).toEqual(2); - expect(Verifier.mapUrlSocket.has(testLedgerData.validatorID)).toBeTrue(); - expect(Verifier.mapUrlSocket.get(testLedgerData.validatorID)).toBeTruthy(); - }); - - test("Reuse socket for same socketio validator", () => { - expect(Verifier.mapUrlSocket.size).toEqual(0); - - expect(new Verifier(JSON.stringify(testLedgerData))).toBeTruthy(); - expect(new Verifier(JSON.stringify(testLedgerData))).toBeTruthy(); - - expect(Verifier.mapUrlSocket.size).toEqual(1); - expect(Verifier.mapUrlSocket.has(testLedgerData.validatorID)).toBeTrue(); - }); - - test("Doesn't store socket for openapi validator", () => { - expect(Verifier.mapUrlSocket.size).toEqual(0); - - testLedgerData.validatorType = "openapi"; - expect(new Verifier(JSON.stringify(testLedgerData))).toBeTruthy(); - - expect(Verifier.mapUrlSocket.size).toEqual(0); - }); -}); - -////////////////////////////// -// SOCKETIO TESTS -////////////////////////////// - -describe("SocketIO Validator Tests", function () { - const reqContract = {}; - const reqMethod = { type: "web3Eth", command: "getBalance" }; - const reqArgs = ["06fc56347d91c6ad2dae0c3ba38eb12ab0d72e97"]; - - let testServer: SocketIOTestSetupHelpers.Server; - let testServerPort: string; - let clientSocket: SocketIOTestSetupHelpers.ClientSocket; - let serverSocket: SocketIOTestSetupHelpers.ServerSocket; - let sut: Verifier; - - beforeAll(async () => { - [testServer, testServerPort] = - await SocketIOTestSetupHelpers.createListeningMockServer(); - }, setupTimeout); - - afterAll((done) => { - testServer.close(() => { - log.debug("Test server closed"); - done(); - }); - }, setupTimeout); - - beforeEach(async () => { - clientSocket = SocketIOTestSetupHelpers.createClientSocket(testServerPort); - - // Mock client socket in verifier - sut = new Verifier(JSON.stringify(defaultLedgerData)); - Verifier.mapUrlSocket.set(defaultLedgerData.validatorID, clientSocket); - }, setupTimeout); - - afterEach(() => { - if (clientSocket) { - clientSocket.close(); - } - - if (serverSocket) { - serverSocket.disconnect(true); - } - - testServer.sockets.removeAllListeners(); - - Verifier.mapUrlSocket.clear(); - }, setupTimeout); - - ////////////////////////////// - // SYNC REQUEST - ////////////////////////////// - - describe("Sync Request Tests", function () { - beforeEach(async () => { - // Connect client and server sockets - testServer.on("connection", (socket) => { - log.debug("Server socket connected", socket.id); - serverSocket = socket; - }); - - await SocketIOTestSetupHelpers.connectTestClient(clientSocket); - expect(clientSocket.connected).toBeTrue(); - expect(serverSocket.connected).toBeTrue(); - }, setupTimeout); - - test("Returns 504 on request timeout", async () => { - const reqPromise = sut.sendSyncRequest(reqContract, reqMethod, reqArgs); - await expect(reqPromise).resolves.toEqual({ status: 504, amount: 0 }); // timeout - }); - - test("Sends request2 with valid arguments", () => { - const reqReceived = new Promise((resolve) => { - serverSocket.on("request2", (req: any) => resolve(req)); - }); - - const responseReceived = sut.sendSyncRequest( - reqContract, - reqMethod, - reqArgs, - ); - - return Promise.all([ - expect(responseReceived).resolves.toEqual({ status: 504, amount: 0 }), // timeout - reqReceived.then((req: any) => { - expect(req.contract).toEqual(reqContract); - expect(req.method).toEqual(reqMethod); - expect(req.args).toEqual(reqArgs); - expect(req.reqID).toBeString(); - expect(req.reqID.length).toBeGreaterThan(0); - }), - ]); - }); - - test("Sends unique request id until maxCounterRequestID", (done) => { - const seenReqID = new Set(); - let calledTimes = 0; - - serverSocket.on("request2", (req: any) => { - expect(seenReqID).not.toContain(req.reqID); - seenReqID.add(req.reqID); - calledTimes++; - if (calledTimes === defaultConfig.verifier.maxCounterRequestID) { - expect(seenReqID.size).toEqual( - defaultConfig.verifier.maxCounterRequestID, - ); - done(); - } - }); - - // Send maxCounterRequestID requests - for (let i = 0; i < defaultConfig.verifier.maxCounterRequestID; i++) { - expect( - sut.sendSyncRequest(reqContract, reqMethod, reqArgs), - ).resolves.toEqual({ status: 504, amount: 0 }); // timeout - } - }); - - test("Returns decoded response from the validator", () => { - const encryptedData = "abcXXX123"; - const decryptedData = "1234"; - const responseStatus = 200; - - serverSocket.on("request2", (req: any) => { - serverSocket.emit("response", { - id: req.reqID, - resObj: { - data: encryptedData, - status: responseStatus, - }, - }); - }); - - const verifyMock = jest.fn(); - verifyMock.mockResolvedValue({ - result: decryptedData, - iat: 3333333333, - exp: 7777777777, - }); - sut.checkValidator = verifyMock; - - return expect(sut.sendSyncRequest(reqContract, reqMethod, reqArgs)) - .resolves.toEqual({ status: responseStatus, data: decryptedData }) - .then(() => { - expect(verifyMock).toHaveBeenCalledTimes(1); - expect(verifyMock).toBeCalledWith( - defaultLedgerData.validatorKeyPath, - encryptedData, - ); - }); - }); - - test("Doesn't process message from not verified validator", () => { - serverSocket.on("request2", (req: any) => { - serverSocket.emit("response", { - id: req.reqID, - resObj: { - data: "abcXXX123", - status: 200, - }, - }); - }); - - const verifyMock = jest.fn(); - verifyMock.mockRejectedValue({ message: "mock verify error" }); - sut.checkValidator = verifyMock; - - return expect( - sut.sendSyncRequest(reqContract, reqMethod, reqArgs), - ).resolves.toEqual({ status: 504, amount: 0 }); // timeout - }); - - test("Process only requests with matching ID", () => { - serverSocket.on("request2", (req: any) => { - serverSocket.emit("response", { - id: "not_existing_id", - resObj: { - data: "abcXXX123", - status: 200, - }, - }); - }); - - const verifyMock = jest.fn(); - sut.checkValidator = verifyMock; - - return expect(sut.sendSyncRequest(reqContract, reqMethod, reqArgs)) - .resolves.toEqual({ status: 504, amount: 0 }) // timeout - .then(() => { - expect(verifyMock).not.toBeCalled(); - }); - }); - }); - - ////////////////////////////// - // MONITORING - ////////////////////////////// - - describe("Monitoring Tests", function () { - const appId = "TestTrade"; - const options = { opt: "yes" }; - const onEventMock = jest.fn(); - const listenerMock: IVerifierEventListener = { - onEvent: onEventMock, - }; - - test("Triggers monitoring on validator", () => { - // Connect client and server sockets - expect.assertions(4); - testServer.on("connection", (socket) => { - log.debug("Server socket connected", socket.id); - serverSocket = socket; - - serverSocket.on("startMonitor", (inOpts: typeof options) => { - // Assert options passed - expect(inOpts).toEqual(options); - - // Assert listener was saved - expect(Object.keys(sut.eventListenerHash).length).toEqual(1); - expect(sut.eventListenerHash[appId]).toBe(listenerMock); - - // Connection error for monitor exit - serverSocket.emit("monitor_error", { - code: 123, - message: "Force exit error", - }); - }); - }); - - return expect(sut.startMonitor(appId, options, listenerMock)).toReject(); - }); - - test("Triggers listener callbacks when received a message from a validator", (done) => { - const decryptedBlockData = "fooDecrypted321"; - const eventStatus = 200; - - // 4 asserts * 2 listeners * 2 monitors - expect.assertions(4 * 2 * 2); - - // Setup listener mock - let onEventCalledTimes = 0; - const onEventMock = (ev: LedgerEvent) => { - onEventCalledTimes++; - expect(ev.id).toEqual(""); - expect(ev.verifierId).toEqual(defaultLedgerData.validatorID); - - if (!ev.data) { - done("Event data is empty or null!"); - } else { - expect(ev.data.status).toEqual(eventStatus); - expect(ev.data.blockData).toEqual(decryptedBlockData); - } - - if (onEventCalledTimes === 2) { - done(); - } - }; - - // Two listeners - const listenerMockFirst: IVerifierEventListener = { - onEvent: onEventMock, - }; - const listenerMockSecond: IVerifierEventListener = { - onEvent: onEventMock, - }; - - // Server side logic for sending events - testServer.on("connection", (socket) => { - log.debug("Server socket connected", socket.id); - serverSocket = socket; - - serverSocket.once("startMonitor", () => { - serverSocket.emit("eventReceived", { - // TODO - BUG?? why the monitor_error not handled by verifier? - status: eventStatus, - blockData: "fooSignedBlockData123xxx", - }); - }); - }); - - // Setup validator (success result) - const verifyMock = jest.fn(); - verifyMock.mockResolvedValue({ - blockData: decryptedBlockData, - }); - sut.checkValidator = verifyMock; - - // Should call onEvent for each listener - sut - .startMonitor("Trade1", options, listenerMockFirst) - .catch((err) => done(err)); - sut - .startMonitor("Trade2", options, listenerMockSecond) - .catch((err) => done(err)); - }); - - test("Doesn't call listener callback when response not validated correctly", () => { - testServer.on("connection", (socket) => { - log.debug("Server socket connected", socket.id); - serverSocket = socket; - - serverSocket.on("startMonitor", () => { - serverSocket.emit("eventReceived", { - status: 200, - blockData: "fooSignedBlockData123xxx", - }); - - setTimeout( - () => - serverSocket.emit("monitor_error", { - message: "Force close", - }), - 150, - ); - }); - }); - - // Setup validator (failing result) - const verifyMock = jest.fn(); - verifyMock.mockRejectedValue("Mock verify error"); - sut.checkValidator = verifyMock; - - expect.assertions(1); - return sut.startMonitor(appId, options, listenerMock).catch(() => { - expect(onEventMock).not.toBeCalled(); - }); - }); - - test("Stopping monitoring removes listener and sends stopMonitor event if no listener left", (done) => { - testServer.on("connection", (socket) => { - log.debug("Server socket connected", socket.id); - serverSocket = socket; - - serverSocket.on("stopMonitor", () => { - log.debug("stopMonitor received"); - done(); - }); - }); - - expect.assertions(4); - - // Start 3 monitors for separate appIDs - sut - .startMonitor("Trade1", options, listenerMock) - .catch((err) => done(err)); - sut - .startMonitor("Trade2", options, listenerMock) - .catch((err) => done(err)); - sut - .startMonitor("Trade3", options, listenerMock) - .catch((err) => done(err)); - expect(Object.keys(sut.eventListenerHash).length).toEqual(3); - - // Stop one monitor - sut.stopMonitor("Trade1"); - expect(Object.keys(sut.eventListenerHash).length).toEqual(2); - expect(sut.eventListenerHash).not.toContain("Trade1"); - - // Stop all - should emit stopMonitor event - sut.stopMonitor(); - expect(Object.keys(sut.eventListenerHash).length).toEqual(0); - - // TODO - shouldn't stopMonitor() cancel promise created by assiciated startMonitor()? - }); - }); - - ////////////////////////////// - // ASYNC REQUEST - ////////////////////////////// - - describe("Send SocketIO Async Request Tests", function () { - beforeEach(async () => { - // Connect client and server sockets - testServer.on("connection", (socket) => { - log.debug("Server socket connected", socket.id); - serverSocket = socket; - }); - - await SocketIOTestSetupHelpers.connectTestClient(clientSocket); - expect(clientSocket.connected).toBeTrue(); - expect(serverSocket.connected).toBeTrue(); - }, setupTimeout); - - test("Sends request2 with valid args for socketio verifier", () => { - const reqReceived = new Promise((resolve) => { - serverSocket.on("request2", (req: any) => resolve(req)); - }); - - const responseReceived = sut.sendAsyncRequest( - reqContract, - reqMethod, - reqArgs, - ); - - return Promise.all([ - expect(responseReceived).toResolve(), - reqReceived.then((req: any) => { - expect(req.contract).toEqual(reqContract); - expect(req.method).toEqual(reqMethod); - expect(req.args).toEqual(reqArgs); - }), - ]); - }); - }); -}); - -////////////////////////////// -// OPEN API ASYNC REQ TESTS -////////////////////////////// - -test("makeOpenApiEvent creates valid ledger event", () => { - const response = { data: "Some mock response" }; - const validatorId = "TestVal"; - - const event = Verifier.makeOpenApiEvent(response, validatorId); - - expect(event.id).toEqual(""); - expect(event.verifierId).toEqual(validatorId); - expect(event.data!.txId!.length).toBeGreaterThan(0); - expect(event.data!.blockData.length).toEqual(1); - expect(event.data!.blockData[0]).toEqual(response); -}); - -describe("OpenAPI Async Request Tests", function () { - const reqContract = {}; - const reqMethod = { type: "web3Eth", command: "sendRawTransaction" }; - const reqArgs = { args: [{ arg1: "val1" }, { arg2: "val2" }] }; - const responseObject = { - someKey: "someVal", - }; - const XMLReqMock = { - open: jest.fn(), - send: jest.fn(), - setRequestHeader: jest.fn(), - responseText: JSON.stringify(responseObject), - onload: () => - log.warn("Placeholder onload was not replaced in the test code"), - }; - let sut: Verifier; - - beforeAll(async () => { - (XMLHttpRequest.XMLHttpRequest as jest.Mock).mockImplementation( - () => XMLReqMock, - ); - }, setupTimeout); - - beforeEach(async () => { - sut = new Verifier(JSON.stringify(defaultLedgerData)); - sut.validatorType = "openapi"; - }, setupTimeout); - - test("Sends valid HTTP request for openapi verifier", async () => { - sut.validatorUrl = "https://example:1234/"; // TODO - bug - fails when URL without trailing backslash - const expectedUrl = "https://example:1234/sendRawTransaction"; - - await expect( - sut.sendAsyncRequest(reqContract, reqMethod, reqArgs), - ).toResolve(); - - expect(XMLReqMock.open).toBeCalledWith("POST", expectedUrl); - expect(XMLReqMock.setRequestHeader).toBeCalledWith( - "Content-Type", - "application/json", - ); - expect(XMLReqMock.send).toBeCalledWith(JSON.stringify(reqArgs.args)); - }); - - test("Sends event from ledger to listeners for openapi verifier", async () => { - const onEventMock = jest.fn(); - const listenerMock: IVerifierEventListener = { - onEvent: onEventMock, - }; - sut.eventListenerHash["TestApp"] = listenerMock; - - await expect( - sut.sendAsyncRequest(reqContract, reqMethod, reqArgs), - ).toResolve(); - - XMLReqMock.onload(); - expect(onEventMock).toHaveBeenCalledWith({ - id: "", - verifierId: "123validatorId321", - data: { - txId: "openapi-txid-00001", // hardcoded in implementation - blockData: [{ someKey: "someVal" }], - }, - }); - }); - - test("Returns an error for unknown validator type", () => { - sut.validatorType = "unknown_type"; - - return expect( - sut.sendAsyncRequest(reqContract, reqMethod, reqArgs), - ).rejects.toMatchObject({ - resObj: { - status: 504, - }, - }); - }); -}); diff --git a/examples/cactus-common-example-server/src/test/typescript/unit/VerifierAuthentication.test.ts b/examples/cactus-common-example-server/src/test/typescript/unit/VerifierAuthentication.test.ts deleted file mode 100644 index fad4e6c8be..0000000000 --- a/examples/cactus-common-example-server/src/test/typescript/unit/VerifierAuthentication.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* verifier/VerifierAuthentication.ts Unit Tests - */ - -////////////////////////// -// TEST CONSTANTS -///////////////////////// - -import "jest-extended"; -import jwt from "jsonwebtoken"; - -// Mock config -jest.mock("../../../main/typescript/routing-interface/util/ConfigUtil"); - -// Init test logger -import { - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -const logLevel: LogLevelDesc = "info"; -const log: Logger = LoggerProvider.getOrCreate({ - label: "test-cmd-socketio-verifier", - level: logLevel, -}); - -// Generate private / public keys for test purposes -import { generateKeyPairSync } from "crypto"; -const { publicKey, privateKey } = generateKeyPairSync("ec", { - namedCurve: "P-256", -}); - -// Mock public key reading -import { readFileSync } from "fs"; -jest.mock("fs"); -(readFileSync as jest.Mock).mockReturnValue( - publicKey.export({ type: "spki", format: "pem" }), -); - -import { VerifierAuthentication } from "../../../main/typescript/verifier/VerifierAuthentication"; - -////////////////////////// -// UNIT TESTS -///////////////////////// - -describe("Verifier verify message tests", () => { - const mockKeyPath = "someKeyPath.pem"; - const message = { - message: "Hello", - from: "Someone", - }; - let signedMessage: string = ""; - - beforeAll(() => { - log.debug("input message:", message); - - // Encrypt the message (from validator) - signedMessage = jwt.sign( - message, - privateKey.export({ type: "sec1", format: "pem" }), - { - algorithm: "ES256", - expiresIn: "1 day", - }, - ); - expect(signedMessage).toBeTruthy(); - log.debug("signedMessage:", signedMessage); - }); - - test("Decrypts the payload from the validator using it's public key", async () => { - // Verify (decrypt) - const decryptedMessage = await VerifierAuthentication.verify( - mockKeyPath, - signedMessage, - ); - - // Assert decrypted message - log.debug("decryptedMessage:", decryptedMessage); - expect(decryptedMessage).toMatchObject(message); - const decryptedJwt = decryptedMessage as jwt.JwtPayload; - expect(decryptedJwt.iat).toBeNumber(); - expect(decryptedJwt.exp).toBeNumber(); - - // Assert reading correct public key - expect((readFileSync as jest.Mock).mock.calls.length).toBe(1); - expect((readFileSync as jest.Mock).mock.calls[0][0]).toContain(mockKeyPath); - }); - - test("Rejects malicious message", () => { - // Reverse original message to produce wrong input - const maliciousMessage = signedMessage.split("").reverse().join(""); - log.debug("maliciousMessage", maliciousMessage); - - // Verify (decrypt) - return expect( - VerifierAuthentication.verify(mockKeyPath, maliciousMessage), - ).toReject(); - }); - - test("Rejects expired message", (done) => { - // Encrypt the message (from validator) with short expiration time - signedMessage = jwt.sign( - message, - privateKey.export({ type: "sec1", format: "pem" }), - { - algorithm: "ES256", - expiresIn: "1", - }, - ); - expect(signedMessage).toBeTruthy(); - - setTimeout(async () => { - // Verify after short timeout - await expect( - VerifierAuthentication.verify(mockKeyPath, signedMessage), - ).toReject(); - done(); - }, 100); - }); -}); diff --git a/examples/cactus-common-example-server/src/test/typescript/unit/VerifierFactory.test.ts b/examples/cactus-common-example-server/src/test/typescript/unit/VerifierFactory.test.ts deleted file mode 100644 index c01d40b059..0000000000 --- a/examples/cactus-common-example-server/src/test/typescript/unit/VerifierFactory.test.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* verifier/VerifierAuthentication.ts Unit Tests - */ - -////////////////////////// -// TEST CONSTANTS -///////////////////////// - -import "jest-extended"; - -// Mock config -jest.mock("../../../main/typescript/routing-interface/util/ConfigUtil"); - -// Init test logger -import { - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -const logLevel: LogLevelDesc = "info"; -const log: Logger = LoggerProvider.getOrCreate({ - label: "test-cmd-socketio-verifier", - level: logLevel, -}); - -// Mock ledger data -jest.mock("fs"); -import { LPInfoHolder } from "../../../main/typescript/routing-interface/util/LPInfoHolder"; -jest.mock("../../../main/typescript/routing-interface/util/LPInfoHolder"); -const mockLedgerData = "{mockLedgerData}"; -const mockGetLegerPluginInfo = jest.fn().mockReturnValue(mockLedgerData); -(LPInfoHolder as jest.Mock).mockImplementation(() => { - return { - getLegerPluginInfo: mockGetLegerPluginInfo, - }; -}); - -// Mock Verifier -import { Verifier } from "../../../main/typescript/verifier/Verifier"; -jest.mock("../../../main/typescript/verifier/Verifier"); - -import { VerifierFactory } from "../../../main/typescript/verifier/VerifierFactory"; -import { IVerifierEventListener } from "../../../main/typescript/verifier/LedgerPlugin"; - -////////////////////////// -// UNIT TESTS -///////////////////////// - -describe("VerifierFactory getVerifier tests", () => { - const listenerMock: IVerifierEventListener = { - onEvent: () => log.warn("listenerMock::onEvent() called!"), - }; - const mockInfoHolder = new LPInfoHolder(); - let sut: VerifierFactory; - - beforeEach(() => { - sut = new VerifierFactory(listenerMock, mockInfoHolder); - expect(Object.keys(VerifierFactory.verifierHash).length).toBe(0); - }); - - afterEach(() => { - VerifierFactory.verifierHash = {}; - }); - - test("Adds newly seen verifier to internal hash", () => { - const verifierId = "someVerifierId"; - - const newVerifier = sut.getVerifier(verifierId); - - expect(mockGetLegerPluginInfo).toBeCalledWith(verifierId); - expect(Verifier).toBeCalledWith(mockLedgerData); - expect(Object.keys(VerifierFactory.verifierHash).length).toBe(1); - expect(VerifierFactory.verifierHash[verifierId]).toBe(newVerifier); - }); - - test("Starts monitoring when requested on newly added verifier", () => { - const verifierId = "someVerifierId"; - const appId = "myAppId"; - const monitorOptions = { name: "debug", debug: true }; - - const newVerifier = sut.getVerifier( - verifierId, - appId, - monitorOptions, - true, - ); - - expect(Object.keys(VerifierFactory.verifierHash).length).toBe(1); - expect(newVerifier.startMonitor).toBeCalledWith( - appId, - monitorOptions, - listenerMock, - ); - }); - - test("Reuses already seen verifier from the hash", () => { - // Add first verifier - const verifierId = "someVerifierId"; - const newVerifier = sut.getVerifier(verifierId); - expect(Object.keys(VerifierFactory.verifierHash).length).toBe(1); - - // Add another verifier - const anotherVerifierId = "anotherVerifierId"; - const anotherVerifier = sut.getVerifier(anotherVerifierId); - expect(Object.keys(VerifierFactory.verifierHash).length).toBe(2); - expect(anotherVerifier).not.toBe(newVerifier); - - // Add first verifier again - const newVerifierAgain = sut.getVerifier(verifierId); - expect(Object.keys(VerifierFactory.verifierHash).length).toBe(2); - expect(newVerifierAgain).toBe(newVerifier); - }); -}); diff --git a/examples/cactus-common-example-server/src/test/typescript/unit/cmd-socketio-blp-plugin.test.ts b/examples/cactus-common-example-server/src/test/typescript/unit/cmd-socketio-blp-plugin.test.ts deleted file mode 100644 index 8a98315eed..0000000000 --- a/examples/cactus-common-example-server/src/test/typescript/unit/cmd-socketio-blp-plugin.test.ts +++ /dev/null @@ -1,399 +0,0 @@ -/** - * Tests to check the BLP framework functions included in this package. - * Client applications can use this framework when developing own client side apps (BLP). - */ - -// Contants -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; -const setupTimeout = 1000 * 60; // 1 minute timeout for setup -const firstServiceName = "firstBLPServiceID"; -const secondServiceName = "secondBLPServiceID"; - -/** - * Mock cmd-socketio-server configuration that will be used by the test. - * Normally, this would come from parsing config files in `/etc/cactus/` - */ -const mockAppConfig = { - blpRegistry: [ - { - businessLogicID: firstServiceName, - validatorID: [], - }, - { - businessLogicID: secondServiceName, - validatorID: [], - }, - ], - logLevel: sutLogLevel, - applicationHostInfo: { hostName: "127.0.0.1", hostPort: 0 }, - socketOptions: { - rejectUnauthorized: false, - reconnection: false, - timeout: 20000, - }, - verifier: { maxCounterRequestID: 100, syncFunctionTimeoutMillisecond: 5000 }, - appRouters: [], -}; - -// Must be mocked before loading cactus-common-example-server -import * as ConfigUtil from "../../../main/typescript/routing-interface/util/ConfigUtil"; -jest.mock("../../../main/typescript/routing-interface/util/ConfigUtil"); -(ConfigUtil as any)["__configMock"] = mockAppConfig; - -jest.mock("fs"); - -import { BusinessLogicBase } from "../../../main/typescript/business-logic-plugin/BusinessLogicBase"; -import { LedgerEvent } from "../../../main/typescript/verifier/LedgerPlugin"; -import { TransactionManagement } from "../../../main/typescript/routing-interface/TransactionManagement"; -import { startCactusSocketIOServer } from "../../../main/typescript/routing-interface/CactusSocketIOServer"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { createHttpTerminator } from "http-terminator"; -import { Request } from "express"; -import http from "http"; -import "jest-extended"; - -// Unit Test logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "cmd-socketio-blp-plugin.test", - level: testLogLevel, -}); - -////////////////////////////// -// Mock BLP Class -////////////////////////////// - -/** - * Returns predefined responses for certain operations that can be then validated in by the test suite. - * Performs some validations of the input parameters as well. - */ -export class TestBLPService extends BusinessLogicBase { - blpClassName: string; - - /** - * Mocked value of ledger transaction ID that belongs to this BLP logic. - * Assume it was received from another call to the ledger (`sendTransaction()` or something similar). - */ - txName: string; - - /** - * List of tradeID generated by the TransactionManagement component. - * Should correspond to each `startBusinessLogic()` call. - */ - transactions: string[] = []; - - /** - * List of received event IDs by `onEvent()` function. - */ - receivedEvents: string[] = []; - - constructor(public businessLogicID: string) { - super(); - this.blpClassName = this.constructor.name; - this.txName = `${businessLogicID}_TxID1`; - log.debug(`${this.blpClassName} of ${businessLogicID} created.`); - } - - /** - * Called after receiving startBusinessLogic request in TransactionManagement. - * Should register new trade start. - * - * @param req HTTP request that triggered this operation. - * @param businessLogicID should be equal to this plugin ID. - * @param tradeID New trade ID generated by TransactionManagement. - */ - startTransaction(req: Request, businessLogicID: string, tradeID: string) { - log.info( - `${this.blpClassName}: [startTransaction] businessLogicID: ${businessLogicID}, tradeID: ${tradeID}`, - ); - expect(req).toBeTruthy(); - expect(businessLogicID).toBeTruthy(); - expect(businessLogicID).toEqual(this.businessLogicID); - expect(tradeID).toBeTruthy(); - this.transactions.push(tradeID); - log.debug( - "Added new transaction (trade). Current transactions:", - this.transactions, - ); - } - - /** - * Should return status of the trade given in argument. - * - * @param tradeID Status we want to get. - * @returns response: true if routed to correct BLP, businessLogicID: this BLP id - */ - getOperationStatus(tradeID: string) { - log.info( - `${this.blpClassName}: [getOperationStatus] businessLogicID: ${this.businessLogicID}, tradeID: ${tradeID}`, - ); - expect(tradeID).toBeTruthy(); - const isIncluded = this.transactions.includes(tradeID); - expect(isIncluded).toBeTrue(); - return { response: isIncluded, businessLogicID: this.businessLogicID }; - } - - /** - * Should be used for BLP logic setup by the client. - * @param meterParams some BLP options. - * @returns meterParams: received in input, businessLogicID: this BLP id - */ - setConfig(meterParams: string[]): any { - log.info( - `${this.blpClassName}: [setConfig] businessLogicID: ${this.businessLogicID}, meterParams: ${meterParams}`, - ); - expect(meterParams).toBeTruthy(); - return { meterParams, businessLogicID: this.businessLogicID }; - } - - /** - * Used to receive events from the verifier. Events should be routed correctly based on responses - * from other methods in this BLP. Pushes new event to `receivedEvents`. - * - * Current flow of the event while being routed to the BLP (implemented in TransactionManagement, - * but described here for test setup clarity): - * 1. `getEventDataNum(ledgerEvent)` is called for each registered BLP, until one of them returns event count different from `0`. - * 2. `getTxIDFromEvent(ledgerEvent, targetIndex)` is called for each registered BLP, until one of them returns - * transaction id different from `null`. - * 3. `hasTxIDInTransactions(txID)` is called for each registered BLP, until one of them confirms it's - * an owner of given transaction. For single-BLP, this function can be ommited and will return true (for backward compatibility). - * 4. `onEvent(ledgerEvent, targetIndex)` - this function is called. - * - * @param ledgerEvent Event that belong to this BLP. - * @param targetIndex Index of the event (starting from `0`). - */ - onEvent(ledgerEvent: LedgerEvent, targetIndex: number): void { - log.info( - `${this.blpClassName}: [onEvent] businessLogicID: ${this.businessLogicID}, ledgerEvent: ${ledgerEvent}, targetIndex: ${targetIndex}`, - ); - expect(ledgerEvent).toBeTruthy(); - expect(targetIndex).toEqual(0); - expect(ledgerEvent.data).toEqual(this.businessLogicID); - this.receivedEvents.push(ledgerEvent.id); - log.debug("Added new event. Current event IDs:", this.receivedEvents); - } - - /** - * Should return number of events from given LedgerEvent. - * This test implementation always returns 1. - * - * @returns 1 - */ - getEventDataNum() { - log.info( - `${this.blpClassName}: [getEventDataNum] businessLogicID: ${this.businessLogicID}`, - ); - return 1; - } - - /** - * Should read ledger transaction id from given LedgerEvent. - * It returns either predefined `this.txName` if event matches this BLP, or `null` if not. - * @param ledgerEvent - * @returns - */ - getTxIDFromEvent(ledgerEvent: LedgerEvent) { - log.info( - `${this.blpClassName}: [getTxIDFromEvent] businessLogicID: ${this.businessLogicID}, ledgerEvent: ${ledgerEvent}`, - ); - - if (ledgerEvent.data === this.businessLogicID) { - log.debug("Event matches, return txName"); - return this.txName; - } else { - return null; - } - } - - /** - * Should return true if given ledger transaction belongs to this BLP. - * - * @param txID ledger transaction ID. - * @returns `true` if given txID matches predefined `this.txName`, `false` otherwise. - */ - hasTxIDInTransactions(txID: string) { - return txID === this.txName; - } -} - -////////////////////////////// -// Test Suite -////////////////////////////// - -describe("Test multiple Bussiness Logic Plugins (BLP) running as a single service", () => { - const firstService = new TestBLPService(firstServiceName); - const secondService = new TestBLPService(secondServiceName); - let transactionManagement: TransactionManagement; - let cmdServer: http.Server; - - ////////////////////////////// - // Setup - ////////////////////////////// - - beforeAll((done) => { - transactionManagement = new TransactionManagement(); - - const blpConfig = [ - { - id: firstServiceName, - plugin: firstService, - }, - { - id: secondServiceName, - plugin: secondService, - }, - ]; - log.info( - "Create CMD SocketIO Server with the following BLP config:", - blpConfig, - ); - - cmdServer = startCactusSocketIOServer(blpConfig, () => { - expect(cmdServer).toBeTruthy(); - const addr = cmdServer.address(); - expect(addr).toBeTruthy(); - const bind = - typeof addr === "string" ? "pipe " + addr : "port " + addr!.port; - log.info("Test CMD SocketIO Server started at", bind); - done(); - }); - }, setupTimeout); - - afterAll(async () => { - if (cmdServer) { - log.info("Stop CMD SocketIO Server"); - const httpTerminator = createHttpTerminator({ - server: cmdServer, - }); - await httpTerminator.terminate(); - } - - log.info("Cleanup done."); - }, setupTimeout); - - ////////////////////////////// - // Tests - ////////////////////////////// - - test("Start bussiness logic creates new trade and calls correct BLP", () => { - // First BLP - const reqMockFirst = { - body: { - businessLogicID: firstServiceName, - }, - }; - const firstTradeID = transactionManagement.startBusinessLogic( - reqMockFirst as any, - ); - expect(firstTradeID).toBeTruthy(); - expect(firstService.transactions).toInclude(firstTradeID as string); - - // Second BLP - const reqMockSecond = { - body: { - businessLogicID: secondServiceName, - }, - }; - const secondTradeID = transactionManagement.startBusinessLogic( - reqMockSecond as any, - ); - expect(secondTradeID).toBeTruthy(); - expect(secondService.transactions).toInclude(secondTradeID as string); - }); - - test("Calling getOperationStatus gets status from correct BLP", () => { - // First BLP - const reqMockFirst = { - body: { - businessLogicID: firstServiceName, - }, - }; - const firstTradeID = transactionManagement.startBusinessLogic( - reqMockFirst as any, - ) as any; - const firstTradeStatus = transactionManagement.getOperationStatus( - firstTradeID, - ) as any; - expect(firstTradeStatus).toBeTruthy(); - expect(firstTradeStatus.businessLogicID).toEqual(firstServiceName); - expect(firstTradeStatus.response).toBeTrue(); - - // Second BLP - const reqMockSecond = { - body: { - businessLogicID: secondServiceName, - }, - }; - const secondTradeID = transactionManagement.startBusinessLogic( - reqMockSecond as any, - ) as any; - const secondTradeStatus = transactionManagement.getOperationStatus( - secondTradeID, - ) as any; - expect(secondTradeStatus).toBeTruthy(); - expect(secondTradeStatus.businessLogicID).toEqual(secondServiceName); - expect(secondTradeStatus.response).toBeTrue(); - }); - - test("Calling setBusinessLogicConfig sends request to correct BLP", () => { - // First BLP - const firstMeterParams = ["a", "b", "c"]; - const reqMockFirst = { - body: { - businessLogicID: firstServiceName, - meterParams: firstMeterParams, - }, - }; - const firstSetResponse = transactionManagement.setBusinessLogicConfig( - reqMockFirst as any, - ) as any; - expect(firstSetResponse).toBeTruthy(); - expect(firstSetResponse.businessLogicID).toEqual(firstServiceName); - expect(firstSetResponse.meterParams).toEqual(firstMeterParams); - - // Second BLP - const secondMeterParams = ["x", "y", "z"]; - const reqMockSecond = { - body: { - businessLogicID: secondServiceName, - meterParams: secondMeterParams, - }, - }; - const secondSetResponse = transactionManagement.setBusinessLogicConfig( - reqMockSecond as any, - ) as any; - expect(secondSetResponse).toBeTruthy(); - expect(secondSetResponse.businessLogicID).toEqual(secondServiceName); - expect(secondSetResponse.meterParams).toEqual(secondMeterParams); - }); - - test("Events are routed to the correct BLP", () => { - // First BLP - const firstEventId = "someEventForFirstService"; - const firstLedgerEvent = { - id: firstEventId, - verifierId: "someVerifier", - data: firstServiceName, - }; - transactionManagement.onEvent(firstLedgerEvent); - expect(firstService.receivedEvents.length).toBeGreaterThan(0); - expect(firstService.receivedEvents[0]).toEqual(firstEventId); - - // Second BLP - const secondEventId = "someEventForSecondService"; - const secondLedgerEvent = { - id: secondEventId, - verifierId: "someVerifier", - data: secondServiceName, - }; - transactionManagement.onEvent(secondLedgerEvent); - expect(secondService.receivedEvents.length).toBeGreaterThan(0); - expect(secondService.receivedEvents[0]).toEqual(secondEventId); - }); -}); diff --git a/examples/cactus-common-example-server/src/test/typescript/unit/rif-util.test.ts b/examples/cactus-common-example-server/src/test/typescript/unit/rif-util.test.ts deleted file mode 100644 index 96ef76390d..0000000000 --- a/examples/cactus-common-example-server/src/test/typescript/unit/rif-util.test.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * rif-util.test.ts - */ - -import { RIFUtil } from "../../../main/typescript/routing-interface/util/RIFUtil"; - -test("test", () => { - const objJson = { aaa: "abc", bbb: "def" }; - const strJson = JSON.stringify(objJson); - expect(RIFUtil.json2str(objJson)).toBe(strJson); - expect(RIFUtil.json2str(RIFUtil.str2json(strJson) as object)).toBe(strJson); - expect(RIFUtil.str2json("abc")).toBeNull(); // for invalid value. -}); diff --git a/examples/cactus-common-example-server/src/test/typescript/unit/validator-authentication.test.ts b/examples/cactus-common-example-server/src/test/typescript/unit/validator-authentication.test.ts deleted file mode 100644 index 4ee180a123..0000000000 --- a/examples/cactus-common-example-server/src/test/typescript/unit/validator-authentication.test.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* verifier/ValidatorAuthentication.ts Unit Tests - */ - -////////////////////////// -// TEST CONSTANTS -///////////////////////// - -import "jest-extended"; -import jwt from "jsonwebtoken"; - -// Init test logger -import { - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -const logLevel: LogLevelDesc = "info"; -const log: Logger = LoggerProvider.getOrCreate({ - label: "test-cmd-socketio-verifier", - level: logLevel, -}); - -// Generate private / public keys for test purposes -import { generateKeyPairSync } from "crypto"; -const { publicKey, privateKey } = generateKeyPairSync("ec", { - namedCurve: "P-256", -}); - -const mockConfig = { - sslParam: { - port: 0, - keyValue: privateKey.export({ type: "sec1", format: "pem" }), - certValue: publicKey, - jwtAlgo: "ES256", - }, - logLevel: logLevel, -}; - -jest.mock("config"); -import config from "config"; -(config.has as jest.Mock).mockImplementation(() => true); -(config.get as jest.Mock).mockImplementation((keyPath: string) => { - let entry = mockConfig as any; - keyPath.split(".").forEach((key: string) => (entry = entry[key])); - return entry; -}); - -import { signMessageJwt } from "../../../main/typescript/verifier/validator-authentication"; - -////////////////////////// -// UNIT TESTS -///////////////////////// - -test("Static method sign encrypts payload using private key", () => { - const message = { - message: "Hello", - from: "Someone", - }; - - // Call sign - const signedMessage = signMessageJwt(message); - - // Assert signed message - log.debug("signedMessage:", signedMessage); - expect(signedMessage).toBeString(); - expect(signedMessage.length).toBeGreaterThan(0); - expect(signedMessage).not.toContain(message.message); - expect(signedMessage).not.toContain(message.from); - - // Decrypt the message - const decryptedMessage = jwt.verify( - signedMessage, - publicKey.export({ type: "spki", format: "pem" }), - { algorithms: ["ES256"] }, - ); - log.debug("decryptedMessage:", decryptedMessage); - expect(decryptedMessage).toMatchObject(message); - - const decryptedJwt = decryptedMessage as { iat: number; exp: number }; - - // Assert issue at - expect(decryptedJwt.iat).toBeNumber(); - const iatDate = new Date(decryptedJwt.iat * 1000); - log.debug("now:", new Date(Date.now())); - log.debug("iat:", iatDate); - expect(iatDate).toBeValidDate(); - expect(iatDate <= new Date(Date.now())).toBeTrue(); - - // Assert expire at - expect(decryptedJwt.exp).toBeNumber(); - const expDate = new Date(decryptedJwt.exp * 1000); - log.debug("exp:", expDate); - expect(expDate).toBeValidDate(); - expect(expDate >= new Date(Date.now())).toBeTrue(); -}); diff --git a/examples/cactus-common-example-server/src/test/typescript/unit/validator-registry.test.ts b/examples/cactus-common-example-server/src/test/typescript/unit/validator-registry.test.ts deleted file mode 100644 index ae62281abc..0000000000 --- a/examples/cactus-common-example-server/src/test/typescript/unit/validator-registry.test.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* verifier/validator-registry.ts Unit Tests - */ - -////////////////////////// -// TEST CONSTANTS -///////////////////////// - -import "jest-extended"; -import { dump } from "js-yaml"; - -import { readFileSync } from "fs"; -jest.mock("fs"); - -jest.mock("../../../main/typescript/routing-interface/util/ConfigUtil"); -import { ValidatorRegistry } from "../../../main/typescript/verifier/validator-registry"; - -////////////////////////// -// UNIT TESTS -///////////////////////// - -test("ValidatorRegistry constructor parses required fields", () => { - // Setup config file mock - const mockLedgerPluginInfo = { - validatorID: "abc123", - validatorType: "socketio", - validatorURL: "https://127.0.0.1:1234", - validatorKeyPath: "./path/to/validator/key.crt", - ledgerInfo: { - ledgerAbstract: "Test ledger input", - }, - apiInfo: [ - { - apiType: "getNumericBalance", - requestedData: [ - { - dataName: "referedAddress", - dataType: "string", - }, - ], - }, - ], - }; - - const mockSignTxInfo = { - ethereum: { - chainName: "chain", - networkID: "123", - chainID: "123", - network: "testNet", - hardfork: "foo", - }, - fabric: { - mspID: "id", - peers: [ - { - name: "peer.test.com", - requests: "grpc://127.0.0.1/1234", - }, - ], - orderer: { - URL: "grpc://127.0.0.1/1234", - }, - ca: { - name: "myca.test.com", - URL: "http://127.0.0.1/1234", - }, - submitter: { - name: "admin", - secret: "password", - }, - channelName: "channel", - chaincodeID: "chainId", - }, - }; - - const mockConfigObj = { - ledgerPluginInfo: mockLedgerPluginInfo, - signTxInfo: mockSignTxInfo, - }; - - const pathToConfig = "/foo/bar/path/config.txt"; - - // Setup mock return - (readFileSync as jest.Mock).mockReturnValue(dump(mockConfigObj)); - - // Act - const sut = new ValidatorRegistry(pathToConfig); - - // Assert - expect(sut).toBeTruthy(); - expect(sut.ledgerPluginInfo).toEqual(mockLedgerPluginInfo); - expect(sut.signTxInfo).toEqual(mockSignTxInfo); - expect(readFileSync).toBeCalledWith(pathToConfig, "utf8"); -}); - -test("ValidatorRegistry constructor fails on malformed config data", () => { - // Setup mock return - (readFileSync as jest.Mock).mockReturnValue(dump("foo bar baz")); - - // Act - const sut = new ValidatorRegistry("/foo/bar/path/config.txt"); - - // Assert - // TODO BUG? Shouldn't throw an error instead of silently setting undefined? - expect(sut).toBeTruthy(); - expect(sut.ledgerPluginInfo).toBeUndefined(); - expect(sut.signTxInfo).toBeUndefined(); -}); diff --git a/examples/cactus-common-example-server/tsconfig.json b/examples/cactus-common-example-server/tsconfig.json deleted file mode 100644 index 2dcdb43628..0000000000 --- a/examples/cactus-common-example-server/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-common-example-server.tsbuildinfo" - }, - "include": [ - "./src/main/typescript/business-logic-plugin/*.ts", - "./config/*.ts", - "./src/main/typescript/*.ts", - "./src/main/typescript/verifier/*.ts", - "./src/main/typescript/util/*.ts", - "./src/main/typescript/routing-interface/**/*.ts" - ], - "exclude": ["copyStaticAssets.ts"], - "references": [ - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../../packages/cactus-test-tooling/tsconfig.json" - } - ] -} diff --git a/examples/cactus-example-carbon-accounting-backend/CHANGELOG.md b/examples/cactus-example-carbon-accounting-backend/CHANGELOG.md deleted file mode 100644 index 9249c5d0d1..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/CHANGELOG.md +++ /dev/null @@ -1,164 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** upgrade fabric 2.x deps to 2.2.18 ([36988a5](https://github.com/hyperledger/cacti/commit/36988a5edbf9856a1bcc960a3b9afe443536733e)), closes [#2610](https://github.com/hyperledger/cacti/issues/2610) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Code Refactoring - -* **cmd-api-server:** clean up configuration parameters [#720](https://github.com/hyperledger/cacti/issues/720) ([b8e8388](https://github.com/hyperledger/cacti/commit/b8e8388306b6708c7d3156e005b1ee9693b35a22)) - -### BREAKING CHANGES - -* **cmd-api-server:** Removed the `keyPairPem` parameter from the API server -configuration. - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **security:** upgrade express-jwt to v8.4.1 ([e251168](https://github.com/hyperledger/cactus/commit/e251168fb4067a8036a5168709e57154c0c02fe4)), closes [#2231](https://github.com/hyperledger/cactus/issues/2231) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Features - -* **connector-xdai:** remove hard dependency on keychain ([da793c5](https://github.com/hyperledger/cactus/commit/da793c568260fd70b80f855833bc60c116099a65)), closes [#1162](https://github.com/hyperledger/cactus/issues/1162) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* **security:** upgrade fabric-common to 2.2.10 or later ([45c4a69](https://github.com/hyperledger/cactus/commit/45c4a69fb86964bc4e7018c31c5914a0063c7638)), closes [#1600](https://github.com/hyperledger/cactus/issues/1600) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Bug Fixes - -* **test:** flaky fabric AIO container boot [#876](https://github.com/hyperledger/cactus/issues/876) ([beefcef](https://github.com/hyperledger/cactus/commit/beefcefbebbdb9a22d08118b6fb2e667493504cf)), closes [#718](https://github.com/hyperledger/cactus/issues/718) [#320](https://github.com/hyperledger/cactus/issues/320) [#319](https://github.com/hyperledger/cactus/issues/319) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) -* **cmd-api-server:** support grpc web services [#1189](https://github.com/hyperledger/cactus/issues/1189) ([4cace1d](https://github.com/hyperledger/cactus/commit/4cace1dca3377e09d2ed37fdadeec6b125d47896)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) - -### Features - -* **cmd-api-server:** add Socket.IO as transport [#297](https://github.com/hyperledger/cactus/issues/297) ([51c586a](https://github.com/hyperledger/cactus/commit/51c586aa01bff3e75f0e87be43f0764b30d8222c)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-backend diff --git a/examples/cactus-example-carbon-accounting-backend/example-config.json b/examples/cactus-example-carbon-accounting-backend/example-config.json deleted file mode 100644 index eaa5ec4995..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/example-config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "configFile": ".config.json", - "authorizationConfigJson" : {}, - "logLevel": "debug", - "minNodeVersion": "12.0.0", - "tlsDefaultMaxVersion": "TLSv1.3", - "authorizationProtocol": "NONE", - "apiHost": "127.0.0.1", - "apiPort": 4000, - "apiCorsDomainCsv": "", - "apiMtlsEnabled": false, - "cockpitApiProxyRejectUnauthorized": true, - "apiTlsEnabled": true, - "apiTlsCertPem": "-----BEGIN CERTIFICATE-----\r\nMIIGjjCCBHagAwIBAgIKDv1M8Cl8RNkaBDANBgkqhkiG9w0BAQ0FADCBrzESMBAG\r\nA1UEAxMJbG9jYWxob3N0MREwDwYDVQQGEwhVbml2ZXJzZTESMBAGA1UECBMJTWls\r\na3kgV2F5MRUwEwYDVQQHEwxQbGFuZXQgRWFydGgxFDASBgNVBAoTC0h5cGVybGVk\r\nZ2VyMQ8wDQYDVQQLEwZDYWN0dXMxNDAyBgkqhkiG9w0BCQITJUNhY3R1cyBEdW1t\r\neSBTZWxmIFNpZ25lZCBDZXJ0aWZpY2F0ZXMwHhcNMjEwNDE0MDYwOTU2WhcNMjIw\r\nNDE0MDYwOTU2WjCBrzESMBAGA1UEAxMJbG9jYWxob3N0MREwDwYDVQQGEwhVbml2\r\nZXJzZTESMBAGA1UECBMJTWlsa3kgV2F5MRUwEwYDVQQHEwxQbGFuZXQgRWFydGgx\r\nFDASBgNVBAoTC0h5cGVybGVkZ2VyMQ8wDQYDVQQLEwZDYWN0dXMxNDAyBgkqhkiG\r\n9w0BCQITJUNhY3R1cyBEdW1teSBTZWxmIFNpZ25lZCBDZXJ0aWZpY2F0ZXMwggIi\r\nMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCyV5sVXZm5J/8Sx8MhoCPeybfw\r\nJ7Iqxsi1rl1cawbAPRLfxXixU5ByzXlXxFh6vMMc8P4jPV2SEhU7sT1Ms97GuEdu\r\nLTRaCr5LBRxDNF3XrCWTFZ4r5z4tF4SLLx7833mApShu0lfpzoX4zkEg7Jlm6P4p\r\nV7DCFEP1wVsI6uK8IDNXtkA3adosR/8TeS6KY84E5rkhjGMongLXC4xdpYY0mn2R\r\nLBtgVuWpykTJ/QiE9gmmwIwarDAxeZJavkwTrxhApD/au+/y53s4pXPypLAmsVqy\r\nd2hS2VnhrP58xEy1UFTALXGrhI7trl+KJySVpnZnb6ghwaNHuYZMtaA9ylC0Lwie\r\nc/jl24X4H5D4/QK4O3C5Jrn9kV4zinxLaDTXCJoBTBZYDoG54oJaFhz8/k3WLHFs\r\nJijyFpvGJ/b/IP0bZs1LQmUu5PEujy4gmrqd35j3Iaxf6fHbMuOyHo7ALcyI3aNS\r\n/Cp/7gHlrdwRdER+4GVg6i2iDg6ZbU3g3xg2V/wEn4CXNU2P8Ua1paIcC7dAb2f7\r\nRgRu567B8TPmgk59koJ53nlw4Q2jTdux6v7GIhpAYWXqtlvgvv5mTynjmyCCRlCt\r\ndnQx0gZ+P1dDTXKZr31kvNBvherH0vCYGpR7rsebtMBEExD7SfafV5iVnhEIkb5g\r\nX0d8qkyncS6JRfOcjwIDAQABo4GpMIGmMAwGA1UdEwQFMAMBAf8wCwYDVR0PBAQD\r\nAgL0MDsGA1UdJQQ0MDIGCCsGAQUFBwMBBggrBgEFBQcDAgYIKwYBBQUHAwMGCCsG\r\nAQUFBwMEBggrBgEFBQcDCDARBglghkgBhvhCAQEEBAMCAPcwGgYDVR0RBBMwEYYJ\r\nbG9jYWxob3N0hwR/AAABMB0GA1UdDgQWBBSNc0D8/jL/P6n9mRr9mAp/Vu2csjAN\r\nBgkqhkiG9w0BAQ0FAAOCAgEAnQXIYTnZ1ZFmU+KZDwyttVk3StCMiECmZTlxOf6d\r\na5y3wH+OyJsTPoXBWQaWfqtUnQ2SOvwEDejvFqiDTIcOjYm6vI3iGqXQ7zxGmsh0\r\n/+YBu8awa8f1HP3ZTAp68+FH1NlatjfXJdrrw1afkNUQGOwg6SNZhsOvZV8VjC1g\r\nCuCdVwNk/9vA+u6NPIB2G1JCS3qRdXiK9MO14QYyvxhQWztLRpoilkYyBJvjMXxI\r\nsP7JatcbgkzgXvH2aZo1QD59ZONvM3eWJ7ychFUxC98uCNSaCE1h6fPNVodcSQtC\r\n2wuVEVVc4331yf9P6moNe0dwbDcOUyP9yjV1hyCFNygyND4YafHSU4FSDM8MGRl4\r\n7UoqT3hX3SXCzmLLeyvcguRcK1JqRpX4jDchSJln75Qdb+wk4cLQPsTiFm4BLdRr\r\nyvYugmrz3REtRiT5X5lLmti+tqRaq6JkvDiBd9DirXIklq42evOP2UBVTvYO9nR4\r\n8U1VbT3fb3PwzWnBEmLvp6TO0gXa3UkcJ62dX+V8lV/SQ4WGkXuC33QyoN3Q/ozX\r\nPf2rp9o9qnPLrx0hx0rHgFRozxNbzoQ46CODVkyrE0qUv/Y0HjiYVKfCHpbe7vyX\r\nIXnGMPk+K7ijX7+htrIg8oREKKeMlW9SPuqyJaXmLheW4ovvrMT+Aod5AS1ikD6Q\r\nCJ8=\r\n-----END CERTIFICATE-----\r\n", - "apiTlsKeyPem": "-----BEGIN RSA PRIVATE KEY-----\r\nMIIJKAIBAAKCAgEAslebFV2ZuSf/EsfDIaAj3sm38CeyKsbIta5dXGsGwD0S38V4\r\nsVOQcs15V8RYerzDHPD+Iz1dkhIVO7E9TLPexrhHbi00Wgq+SwUcQzRd16wlkxWe\r\nK+c+LReEiy8e/N95gKUobtJX6c6F+M5BIOyZZuj+KVewwhRD9cFbCOrivCAzV7ZA\r\nN2naLEf/E3kuimPOBOa5IYxjKJ4C1wuMXaWGNJp9kSwbYFblqcpEyf0IhPYJpsCM\r\nGqwwMXmSWr5ME68YQKQ/2rvv8ud7OKVz8qSwJrFasndoUtlZ4az+fMRMtVBUwC1x\r\nq4SO7a5fiicklaZ2Z2+oIcGjR7mGTLWgPcpQtC8InnP45duF+B+Q+P0CuDtwuSa5\r\n/ZFeM4p8S2g01wiaAUwWWA6BueKCWhYc/P5N1ixxbCYo8habxif2/yD9G2bNS0Jl\r\nLuTxLo8uIJq6nd+Y9yGsX+nx2zLjsh6OwC3MiN2jUvwqf+4B5a3cEXREfuBlYOot\r\nog4OmW1N4N8YNlf8BJ+AlzVNj/FGtaWiHAu3QG9n+0YEbueuwfEz5oJOfZKCed55\r\ncOENo03bser+xiIaQGFl6rZb4L7+Zk8p45sggkZQrXZ0MdIGfj9XQ01yma99ZLzQ\r\nb4Xqx9LwmBqUe67Hm7TARBMQ+0n2n1eYlZ4RCJG+YF9HfKpMp3EuiUXznI8CAwEA\r\nAQKCAgBl6oKJty++DAlMZjQw5x8YlhYze7vpjiftC3P2+IKnIT/D+Ul7rNGDicCq\r\nU15s5apqw5237b2nWAYiUqtBRhktXuoTIGomerU8kfMQxMBMG+htIZF+bWuuwR3R\r\nnGANCniY98kfa70ptAgDo3q8ofkYQlXcsmwkvQgJTTIE6pYgBBbTLSeNg0RWwd4W\r\n9s2N8HMvgdqSPXP9Ji9hTQwuCAWl0hOn/pi2eXJNkXW2KI/Ry/i//pESPQxdeagV\r\ni2JWbV1is3p6OaRqH7bfLE4Sf+Laecfm7S4FCoi+2umjy1o602lbWZz384zqbxfS\r\nD4RssPBBNCHVCJ+SwYbqF3E3XoK3QUCayxdQ9lFraqUM5tzME9LVoPSMz2/t6vEJ\r\nll2yofxksW9DfiU+YCwxpZwZAIZgWFgF79JJu9v9vHuX/csN80ZhrAtpIcGxFEp7\r\nZcIt22LIg1zKOvji9W2L343d2Ngn5xwP2LgNw7p5PvRbWj5loAUV01iMUp/LcGJ+\r\nTUF9C20rK8D6OXg8vqPyr+en8mbwifTuu3SMKrItIvug5TpgLnUbUFsFZ0tusaQn\r\nzP4QuGeqHCsphTI4oe2ro2QlefpqjDR6eL8eyepBRrwsZgnThsIQwjcxJRP0fVrd\r\nspbTNfptBZWrd685YpitSSEV6RkH6KmV6+IHDnPAH1vW3zx6YQKCAQEA3NYrCtan\r\n9c7kKfCeQMYgzxyJbaefPrScGrTsSpulv5kWiffahC6NPEsz6LqSxJxyfvP4YbKc\r\n3RqaWS5S6Tq3YNNgLI+J0D/9O0gi+s+vd47bqYBURxo2X3bly9IbUlMmc+pa+uGD\r\ndoufg7ywvjW+TJkaaykBZlfc0sIBxdrDEJCD62FdR41Vdm2Pvmi6sFqEYyIq+hXA\r\nHbX2M3/CC43XoHDIkX7Rgy0NHVUq+wasGKRUNVPIgMCBd0B8G936kGGvawSmGAQ4\r\n9e5HSUT9jqv1KziMCZ8TEYrabSAxmL56b/amz06XTND4v59astMCWo8w657NL+Xv\r\n7HJw853Z7beQgwKCAQEAzr1DnpmBeYkF0so3thK9GIG6Sru17PlIgkvWmk8B/Hsd\r\nruzw4pspVM0+D8LwxPnBveR8w471BaAqaPtVZgcoIRHO9iNegQcir7b3Fp/ai7BK\r\nZoAcNO9V++ofmS85KtVUT0iMBwcMaIgmHD/YCi0MNxdXzOzzsopR3FE0iwKYZxgC\r\nyfeKPeZa3C4I7Awvf7v5CoNF4/T5U9cAsaQJ/cVJY2s5c8LHYQsP4UUWsScQH1TS\r\nat2uRz565PDQdvD3TL+46zdsFlOYOiuM/6iMU4bYBj2FsFKA7TCkk/GghCgLfjXa\r\nrPARdunZWfWawe3bKEg6Az0kFfsimRYE0Rgey6zuBQKCAQAZPDwE7AybcT3vcPiU\r\njE95e1hU+H+hCcCA6MXLrMefAl5p+7GzwyIOjsVqxc85umr3COgMOf3k4kJbCIke\r\n77++x8jIrspfysAkQxUENjFl5yRA1VJMIbmu5QZTaToICUpumow0+QotxLzAsBI+\r\nWiPZ2vEC59eqG0Y3q0XKlzoNLYZ1olWndIYcl16CsrMKrf1M2r2wgEXI3183+VRy\r\nP44xXlH9FlHYvJAwFuhncRa/Zh/dTCqwU883kl3cTVxxnUgPYaOdQPZFXCo3PDQB\r\nVrMYckjGXLAwI/7b0373ZmTVYIklTWTKuWKDezFBGA2/zXcYpbfqzkrBaT5xCEu7\r\n92sDAoIBAFe3GZ+LBdIo/t2Gisinfq+NKxtWNUQMKGWQA8eIyhDzs45qXXHn30tp\r\noXFShpEsXrVQ4laeqvruD9BnAr69Ppt5UNRCAXDBNEhVWtSwkis+avK+XDlhapvt\r\no+Z8kMbJqHHTGAZLSUp4qaLGu8TlhA9Dyi7aQjN4WG8fzSlFup/TIivK6U6GE/rj\r\nVUnBic2qVWnOdLLZV4fo6xRzwwF22UJjVgb1l15nMR+lDpGvPznr5TMOR0lXCxFj\r\n0y8D4gkgNzclVqjKYwYbQEGgo5k01ycep0A+YRFB2DIlDLPFwcqU0ukZGm/XnC58\r\n9GJfpuKacnK5WDwzR2SoYPbOQxKrlnkCggEBANJLCqOibsezhhNa1vg+JpCL777C\r\nKAkE8bQd7rPoEZIFQqDDdapez0ZrzVWL4L8pgnpjyywxXe0p77PR5A2HRN5z1cFD\r\nDz5Kd0ZDL++5/IQ6KJgQ9EjftIy1zW+XnzBXThY+rpH0RZ15DwFoJxw+PCejjLC5\r\n7zYa2EOJ698N9WryGsxGkfPuViTbIDJKBed+4kXgLTT1hCTq53JFTJtHsO57gRkK\r\ngrPsa0O10EsJtKODFNFHzAiqwfmNxrVVcmUNmKYG4WXuJci+kw1VEJDD6GiSFyx2\r\n1MBhF3x64UtKdsj/7Cskdr6xnrxC9NHsRoZlmGGMZsSFL+MLovZv9MKl6W0=\r\n-----END RSA PRIVATE KEY-----\r\n", - "apiTlsClientCaPem": "-", - "cockpitHost": "127.0.0.1", - "cockpitPort": 3000, - "cockpitWwwRoot": "packages/cactus-cmd-api-server/node_modules/@hyperledger/cactus-cockpit/www/", - "cockpitCorsDomainCsv": "", - "cockpitMtlsEnabled": false, - "cockpitTlsEnabled": true, - "cockpitTlsCertPem": "-----BEGIN CERTIFICATE-----\r\nMIIGjjCCBHagAwIBAgIKDv1M8Cl8RNkaBDANBgkqhkiG9w0BAQ0FADCBrzESMBAG\r\nA1UEAxMJbG9jYWxob3N0MREwDwYDVQQGEwhVbml2ZXJzZTESMBAGA1UECBMJTWls\r\na3kgV2F5MRUwEwYDVQQHEwxQbGFuZXQgRWFydGgxFDASBgNVBAoTC0h5cGVybGVk\r\nZ2VyMQ8wDQYDVQQLEwZDYWN0dXMxNDAyBgkqhkiG9w0BCQITJUNhY3R1cyBEdW1t\r\neSBTZWxmIFNpZ25lZCBDZXJ0aWZpY2F0ZXMwHhcNMjEwNDE0MDYwOTU2WhcNMjIw\r\nNDE0MDYwOTU2WjCBrzESMBAGA1UEAxMJbG9jYWxob3N0MREwDwYDVQQGEwhVbml2\r\nZXJzZTESMBAGA1UECBMJTWlsa3kgV2F5MRUwEwYDVQQHEwxQbGFuZXQgRWFydGgx\r\nFDASBgNVBAoTC0h5cGVybGVkZ2VyMQ8wDQYDVQQLEwZDYWN0dXMxNDAyBgkqhkiG\r\n9w0BCQITJUNhY3R1cyBEdW1teSBTZWxmIFNpZ25lZCBDZXJ0aWZpY2F0ZXMwggIi\r\nMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCyV5sVXZm5J/8Sx8MhoCPeybfw\r\nJ7Iqxsi1rl1cawbAPRLfxXixU5ByzXlXxFh6vMMc8P4jPV2SEhU7sT1Ms97GuEdu\r\nLTRaCr5LBRxDNF3XrCWTFZ4r5z4tF4SLLx7833mApShu0lfpzoX4zkEg7Jlm6P4p\r\nV7DCFEP1wVsI6uK8IDNXtkA3adosR/8TeS6KY84E5rkhjGMongLXC4xdpYY0mn2R\r\nLBtgVuWpykTJ/QiE9gmmwIwarDAxeZJavkwTrxhApD/au+/y53s4pXPypLAmsVqy\r\nd2hS2VnhrP58xEy1UFTALXGrhI7trl+KJySVpnZnb6ghwaNHuYZMtaA9ylC0Lwie\r\nc/jl24X4H5D4/QK4O3C5Jrn9kV4zinxLaDTXCJoBTBZYDoG54oJaFhz8/k3WLHFs\r\nJijyFpvGJ/b/IP0bZs1LQmUu5PEujy4gmrqd35j3Iaxf6fHbMuOyHo7ALcyI3aNS\r\n/Cp/7gHlrdwRdER+4GVg6i2iDg6ZbU3g3xg2V/wEn4CXNU2P8Ua1paIcC7dAb2f7\r\nRgRu567B8TPmgk59koJ53nlw4Q2jTdux6v7GIhpAYWXqtlvgvv5mTynjmyCCRlCt\r\ndnQx0gZ+P1dDTXKZr31kvNBvherH0vCYGpR7rsebtMBEExD7SfafV5iVnhEIkb5g\r\nX0d8qkyncS6JRfOcjwIDAQABo4GpMIGmMAwGA1UdEwQFMAMBAf8wCwYDVR0PBAQD\r\nAgL0MDsGA1UdJQQ0MDIGCCsGAQUFBwMBBggrBgEFBQcDAgYIKwYBBQUHAwMGCCsG\r\nAQUFBwMEBggrBgEFBQcDCDARBglghkgBhvhCAQEEBAMCAPcwGgYDVR0RBBMwEYYJ\r\nbG9jYWxob3N0hwR/AAABMB0GA1UdDgQWBBSNc0D8/jL/P6n9mRr9mAp/Vu2csjAN\r\nBgkqhkiG9w0BAQ0FAAOCAgEAnQXIYTnZ1ZFmU+KZDwyttVk3StCMiECmZTlxOf6d\r\na5y3wH+OyJsTPoXBWQaWfqtUnQ2SOvwEDejvFqiDTIcOjYm6vI3iGqXQ7zxGmsh0\r\n/+YBu8awa8f1HP3ZTAp68+FH1NlatjfXJdrrw1afkNUQGOwg6SNZhsOvZV8VjC1g\r\nCuCdVwNk/9vA+u6NPIB2G1JCS3qRdXiK9MO14QYyvxhQWztLRpoilkYyBJvjMXxI\r\nsP7JatcbgkzgXvH2aZo1QD59ZONvM3eWJ7ychFUxC98uCNSaCE1h6fPNVodcSQtC\r\n2wuVEVVc4331yf9P6moNe0dwbDcOUyP9yjV1hyCFNygyND4YafHSU4FSDM8MGRl4\r\n7UoqT3hX3SXCzmLLeyvcguRcK1JqRpX4jDchSJln75Qdb+wk4cLQPsTiFm4BLdRr\r\nyvYugmrz3REtRiT5X5lLmti+tqRaq6JkvDiBd9DirXIklq42evOP2UBVTvYO9nR4\r\n8U1VbT3fb3PwzWnBEmLvp6TO0gXa3UkcJ62dX+V8lV/SQ4WGkXuC33QyoN3Q/ozX\r\nPf2rp9o9qnPLrx0hx0rHgFRozxNbzoQ46CODVkyrE0qUv/Y0HjiYVKfCHpbe7vyX\r\nIXnGMPk+K7ijX7+htrIg8oREKKeMlW9SPuqyJaXmLheW4ovvrMT+Aod5AS1ikD6Q\r\nCJ8=\r\n-----END CERTIFICATE-----\r\n", - "cockpitTlsKeyPem": "-----BEGIN RSA PRIVATE KEY-----\r\nMIIJKAIBAAKCAgEAslebFV2ZuSf/EsfDIaAj3sm38CeyKsbIta5dXGsGwD0S38V4\r\nsVOQcs15V8RYerzDHPD+Iz1dkhIVO7E9TLPexrhHbi00Wgq+SwUcQzRd16wlkxWe\r\nK+c+LReEiy8e/N95gKUobtJX6c6F+M5BIOyZZuj+KVewwhRD9cFbCOrivCAzV7ZA\r\nN2naLEf/E3kuimPOBOa5IYxjKJ4C1wuMXaWGNJp9kSwbYFblqcpEyf0IhPYJpsCM\r\nGqwwMXmSWr5ME68YQKQ/2rvv8ud7OKVz8qSwJrFasndoUtlZ4az+fMRMtVBUwC1x\r\nq4SO7a5fiicklaZ2Z2+oIcGjR7mGTLWgPcpQtC8InnP45duF+B+Q+P0CuDtwuSa5\r\n/ZFeM4p8S2g01wiaAUwWWA6BueKCWhYc/P5N1ixxbCYo8habxif2/yD9G2bNS0Jl\r\nLuTxLo8uIJq6nd+Y9yGsX+nx2zLjsh6OwC3MiN2jUvwqf+4B5a3cEXREfuBlYOot\r\nog4OmW1N4N8YNlf8BJ+AlzVNj/FGtaWiHAu3QG9n+0YEbueuwfEz5oJOfZKCed55\r\ncOENo03bser+xiIaQGFl6rZb4L7+Zk8p45sggkZQrXZ0MdIGfj9XQ01yma99ZLzQ\r\nb4Xqx9LwmBqUe67Hm7TARBMQ+0n2n1eYlZ4RCJG+YF9HfKpMp3EuiUXznI8CAwEA\r\nAQKCAgBl6oKJty++DAlMZjQw5x8YlhYze7vpjiftC3P2+IKnIT/D+Ul7rNGDicCq\r\nU15s5apqw5237b2nWAYiUqtBRhktXuoTIGomerU8kfMQxMBMG+htIZF+bWuuwR3R\r\nnGANCniY98kfa70ptAgDo3q8ofkYQlXcsmwkvQgJTTIE6pYgBBbTLSeNg0RWwd4W\r\n9s2N8HMvgdqSPXP9Ji9hTQwuCAWl0hOn/pi2eXJNkXW2KI/Ry/i//pESPQxdeagV\r\ni2JWbV1is3p6OaRqH7bfLE4Sf+Laecfm7S4FCoi+2umjy1o602lbWZz384zqbxfS\r\nD4RssPBBNCHVCJ+SwYbqF3E3XoK3QUCayxdQ9lFraqUM5tzME9LVoPSMz2/t6vEJ\r\nll2yofxksW9DfiU+YCwxpZwZAIZgWFgF79JJu9v9vHuX/csN80ZhrAtpIcGxFEp7\r\nZcIt22LIg1zKOvji9W2L343d2Ngn5xwP2LgNw7p5PvRbWj5loAUV01iMUp/LcGJ+\r\nTUF9C20rK8D6OXg8vqPyr+en8mbwifTuu3SMKrItIvug5TpgLnUbUFsFZ0tusaQn\r\nzP4QuGeqHCsphTI4oe2ro2QlefpqjDR6eL8eyepBRrwsZgnThsIQwjcxJRP0fVrd\r\nspbTNfptBZWrd685YpitSSEV6RkH6KmV6+IHDnPAH1vW3zx6YQKCAQEA3NYrCtan\r\n9c7kKfCeQMYgzxyJbaefPrScGrTsSpulv5kWiffahC6NPEsz6LqSxJxyfvP4YbKc\r\n3RqaWS5S6Tq3YNNgLI+J0D/9O0gi+s+vd47bqYBURxo2X3bly9IbUlMmc+pa+uGD\r\ndoufg7ywvjW+TJkaaykBZlfc0sIBxdrDEJCD62FdR41Vdm2Pvmi6sFqEYyIq+hXA\r\nHbX2M3/CC43XoHDIkX7Rgy0NHVUq+wasGKRUNVPIgMCBd0B8G936kGGvawSmGAQ4\r\n9e5HSUT9jqv1KziMCZ8TEYrabSAxmL56b/amz06XTND4v59astMCWo8w657NL+Xv\r\n7HJw853Z7beQgwKCAQEAzr1DnpmBeYkF0so3thK9GIG6Sru17PlIgkvWmk8B/Hsd\r\nruzw4pspVM0+D8LwxPnBveR8w471BaAqaPtVZgcoIRHO9iNegQcir7b3Fp/ai7BK\r\nZoAcNO9V++ofmS85KtVUT0iMBwcMaIgmHD/YCi0MNxdXzOzzsopR3FE0iwKYZxgC\r\nyfeKPeZa3C4I7Awvf7v5CoNF4/T5U9cAsaQJ/cVJY2s5c8LHYQsP4UUWsScQH1TS\r\nat2uRz565PDQdvD3TL+46zdsFlOYOiuM/6iMU4bYBj2FsFKA7TCkk/GghCgLfjXa\r\nrPARdunZWfWawe3bKEg6Az0kFfsimRYE0Rgey6zuBQKCAQAZPDwE7AybcT3vcPiU\r\njE95e1hU+H+hCcCA6MXLrMefAl5p+7GzwyIOjsVqxc85umr3COgMOf3k4kJbCIke\r\n77++x8jIrspfysAkQxUENjFl5yRA1VJMIbmu5QZTaToICUpumow0+QotxLzAsBI+\r\nWiPZ2vEC59eqG0Y3q0XKlzoNLYZ1olWndIYcl16CsrMKrf1M2r2wgEXI3183+VRy\r\nP44xXlH9FlHYvJAwFuhncRa/Zh/dTCqwU883kl3cTVxxnUgPYaOdQPZFXCo3PDQB\r\nVrMYckjGXLAwI/7b0373ZmTVYIklTWTKuWKDezFBGA2/zXcYpbfqzkrBaT5xCEu7\r\n92sDAoIBAFe3GZ+LBdIo/t2Gisinfq+NKxtWNUQMKGWQA8eIyhDzs45qXXHn30tp\r\noXFShpEsXrVQ4laeqvruD9BnAr69Ppt5UNRCAXDBNEhVWtSwkis+avK+XDlhapvt\r\no+Z8kMbJqHHTGAZLSUp4qaLGu8TlhA9Dyi7aQjN4WG8fzSlFup/TIivK6U6GE/rj\r\nVUnBic2qVWnOdLLZV4fo6xRzwwF22UJjVgb1l15nMR+lDpGvPznr5TMOR0lXCxFj\r\n0y8D4gkgNzclVqjKYwYbQEGgo5k01ycep0A+YRFB2DIlDLPFwcqU0ukZGm/XnC58\r\n9GJfpuKacnK5WDwzR2SoYPbOQxKrlnkCggEBANJLCqOibsezhhNa1vg+JpCL777C\r\nKAkE8bQd7rPoEZIFQqDDdapez0ZrzVWL4L8pgnpjyywxXe0p77PR5A2HRN5z1cFD\r\nDz5Kd0ZDL++5/IQ6KJgQ9EjftIy1zW+XnzBXThY+rpH0RZ15DwFoJxw+PCejjLC5\r\n7zYa2EOJ698N9WryGsxGkfPuViTbIDJKBed+4kXgLTT1hCTq53JFTJtHsO57gRkK\r\ngrPsa0O10EsJtKODFNFHzAiqwfmNxrVVcmUNmKYG4WXuJci+kw1VEJDD6GiSFyx2\r\n1MBhF3x64UtKdsj/7Cskdr6xnrxC9NHsRoZlmGGMZsSFL+MLovZv9MKl6W0=\r\n-----END RSA PRIVATE KEY-----\r\n", - "cockpitTlsClientCaPem": "-", - "plugins": [ - { - "packageName": "@hyperledger/cactus-plugin-keychain-memory", - "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", - "options": { - "instanceId": "3ea23ac8-cf20-460a-99db-d56713c9c74e", - "keychainId": "046c1903-22f3-4fa5-962d-e981f49a66d1" - } - }, - { - "packageName": "@hyperledger/cactus-plugin-consortium-manual", - "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", - "options": { - "instanceId": "0b8c0ade-03d1-4cb6-a9dd-440633c4ca2a", - "keyPairPem": "-----BEGIN PRIVATE KEY-----\nMIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgHy0hDxj3Uhz16F8aLiWq\nhf6bcqRU3fqAv2u2YvYdSF+hRANCAAQpvM3dbCigeGLDKs0JUTi0yf5UHGC2eSRD\nd3Dk1WpBjbJDLKGdSGVGE0h1Zys8o3Den3Xag8Y1EcTxDHDInMEc\n-----END PRIVATE KEY-----\n", - "consortiumDatabase": { - "cactusNode": [ - { - "consortiumId": "Cactus_Example_Consortium", - "id": "Cactus_Example_Consortium_Node_1", - "ledgerIds": [], - "memberId": "Cactus_Example_Consortium_Member_1", - "pluginInstanceIds": [], - "nodeApiHost": "https://127.0.0.1:4000", - "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEKbzN3WwooHhiwyrNCVE4tMn+VBxgtnkk\nQ3dw5NVqQY2yQyyhnUhlRhNIdWcrPKNw3p912oPGNRHE8QxwyJzBHA==\n-----END PUBLIC KEY-----\n" - } - ], - "consortiumMember": [ - { - "id": "Cactus_Example_Consortium_Member_1", - "name": "Example Cactus Consortium Member 1", - "nodeIds": [ - "Cactus_Example_Consortium_Node_1" - ] - } - ], - "ledger": [], - "pluginInstance": [], - "consortium": [ - { - "name": "Example Cactus Consortium", - "id": "d40a9893-15b4-4d77-8129-6eccc65903a3", - "mainApiHost": "https://127.0.0.1:4000", - "memberIds": [ - "Cactus_Example_Consortium_Member_1" - ] - } - ] - } - } - } - ] -} diff --git a/examples/cactus-example-carbon-accounting-backend/hardhat.config.js b/examples/cactus-example-carbon-accounting-backend/hardhat.config.js deleted file mode 100644 index 34c8fe9e8c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/hardhat.config.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @type import('hardhat/config').HardhatUserConfig - */ -module.exports = { - solidity: { - compilers: [ - { - version: "0.7.0", - settings: { - optimizer: { - enabled: true, - runs: 200, - }, - }, - }, - ], - }, - paths: { - sources: "./src/main/solidity", - artifacts: "./src/main/json/generated/", - cache: "./dist/.cache/hardhat/", - }, -}; diff --git a/examples/cactus-example-carbon-accounting-backend/package.json b/examples/cactus-example-carbon-accounting-backend/package.json deleted file mode 100644 index ee4b2185a9..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "name": "@hyperledger/cactus-example-carbon-accounting-backend", - "version": "2.0.0", - "description": "An example application showing how to use Cactus when implementing a Carbon Accounting Application where two or more blockchains are sharing data with each other to achieve a certain business outcome beneficial to multiple parties (business organizations).", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-example-carbon-accounting-backend.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "solidity": "hardhat compile", - "start": "CONFIG_FILE=./example-config.json node dist/lib/main/typescript/carbon-accounting-app-cli.js", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-example-carbon-accounting-business-logic-plugin": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@openzeppelin/contracts": "4.9.6", - "@openzeppelin/contracts-upgradeable": "4.9.6", - "async-exit-hook": "2.0.1", - "fabric-network": "2.2.20", - "fs-extra": "11.2.0", - "openapi-types": "12.1.3", - "typescript-optional": "2.0.1", - "uuid": "10.0.0", - "web3-core": "1.6.1", - "web3-utils": "1.6.1" - }, - "devDependencies": { - "@types/express": "5.0.0", - "@types/fs-extra": "11.0.4", - "@types/json-stable-stringify": "1.0.34", - "@types/qs": "6.9.14", - "@types/uuid": "10.0.0", - "express-jwt": "8.4.1", - "hardhat": "2.17.2", - "http-cache-semantics": "4.1.1", - "http-status-codes": "2.1.4", - "jose": "4.15.5", - "json-stable-stringify": "1.0.2", - "qs": "6.13.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-example-carbon-accounting-backend.web.umd.min.js", - "mainMinified": "dist/cactus-example-carbon-accounting-backend.node.umd.min.js", - "watch": { - "solidity": { - "patterns": [ - "./src/main/solidity/" - ], - "extensions": "sol" - } - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.dbg.json deleted file mode 100644 index 0b546f5c8c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.json deleted file mode 100644 index 02c18d9491..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "AccessControlUpgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.dbg.json deleted file mode 100644 index 0b546f5c8c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.json deleted file mode 100644 index 26578db61b..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC165Upgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.dbg.json deleted file mode 100644 index 0b546f5c8c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.json deleted file mode 100644 index 1f9c642fa5..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC165Upgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol/SafeMathUpgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol/SafeMathUpgradeable.dbg.json deleted file mode 100644 index 0b546f5c8c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol/SafeMathUpgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol/SafeMathUpgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol/SafeMathUpgradeable.json deleted file mode 100644 index 9f4a19becc..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol/SafeMathUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SafeMathUpgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol", - "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200620e9f101c640d717111c8d8e0ccf896bc085b0cd34802ad72cd7a9fcee99a264736f6c63430007000033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200620e9f101c640d717111c8d8e0ccf896bc085b0cd34802ad72cd7a9fcee99a264736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/proxy/Initializable.sol/Initializable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/proxy/Initializable.sol/Initializable.dbg.json deleted file mode 100644 index 0b546f5c8c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/proxy/Initializable.sol/Initializable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/proxy/Initializable.sol/Initializable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/proxy/Initializable.sol/Initializable.json deleted file mode 100644 index c5bbe824da..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/proxy/Initializable.sol/Initializable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Initializable", - "sourceName": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol", - "abi": [], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol/ERC1155Upgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol/ERC1155Upgradeable.dbg.json deleted file mode 100644 index e8691a42b8..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol/ERC1155Upgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol/ERC1155Upgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol/ERC1155Upgradeable.json deleted file mode 100644 index 0f21f3a1b1..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol/ERC1155Upgradeable.json +++ /dev/null @@ -1,323 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1155Upgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506115b2806100206000396000f3fe608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461035a578063a22cb465146104cd578063e985e9c5146104fb578063f242432a1461052957610087565b8062fdd58e1461008c57806301ffc9a7146100ca5780630e89341c146101055780632eb2c2d614610197575b600080fd5b6100b8600480360360408110156100a257600080fd5b506001600160a01b0381351690602001356105f2565b60408051918252519081900360200190f35b6100f1600480360360208110156100e057600080fd5b50356001600160e01b031916610661565b604080519115158252519081900360200190f35b6101226004803603602081101561011b57600080fd5b5035610680565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015c578181015183820152602001610144565b50505050905090810190601f1680156101895780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610358600480360360a08110156101ad57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156101e057600080fd5b8201836020820111156101f257600080fd5b803590602001918460208302840111600160201b8311171561021357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561026257600080fd5b82018360208201111561027457600080fd5b803590602001918460208302840111600160201b8311171561029557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156102e457600080fd5b8201836020820111156102f657600080fd5b803590602001918460018302840111600160201b8311171561031757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610718945050505050565b005b61047d6004803603604081101561037057600080fd5b810190602081018135600160201b81111561038a57600080fd5b82018360208201111561039c57600080fd5b803590602001918460208302840111600160201b831117156103bd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561040c57600080fd5b82018360208201111561041e57600080fd5b803590602001918460208302840111600160201b8311171561043f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610a1b945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104b95781810151838201526020016104a1565b505050509050019250505060405180910390f35b610358600480360360408110156104e357600080fd5b506001600160a01b0381351690602001351515610b07565b6100f16004803603604081101561051157600080fd5b506001600160a01b0381358116916020013516610bf6565b610358600480360360a081101561053f57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b81111561057e57600080fd5b82018360208201111561059057600080fd5b803590602001918460018302840111600160201b831117156105b157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c24945050505050565b60006001600160a01b0383166106395760405162461bcd60e51b815260040180806020018281038252602b81526020018061142e602b913960400191505060405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b6001600160e01b03191660009081526033602052604090205460ff1690565b60678054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561070c5780601f106106e15761010080835404028352916020019161070c565b820191906000526020600020905b8154815290600101906020018083116106ef57829003601f168201915b50505050509050919050565b81518351146107585760405162461bcd60e51b81526004018080602001828103825260288152602001806115556028913960400191505060405180910390fd5b6001600160a01b03841661079d5760405162461bcd60e51b81526004018080602001828103825260258152602001806114826025913960400191505060405180910390fd5b6107a5610def565b6001600160a01b0316856001600160a01b031614806107d057506107d0856107cb610def565b610bf6565b61080b5760405162461bcd60e51b81526004018080602001828103825260328152602001806114a76032913960400191505060405180910390fd5b6000610815610def565b9050610825818787878787610a13565b60005b845181101561092b57600085828151811061083f57fe5b60200260200101519050600085838151811061085757fe5b602002602001015190506108c4816040518060600160405280602a81526020016114d9602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054610df49092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a16815220546108fb9082610e8b565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610828565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156109b1578181015183820152602001610999565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156109f05781810151838201526020016109d8565b5050505090500194505050505060405180910390a4610a13818787878787610eec565b505050505050565b60608151835114610a5d5760405162461bcd60e51b815260040180806020018281038252602981526020018061152c6029913960400191505060405180910390fd5b6060835167ffffffffffffffff81118015610a7757600080fd5b50604051908082528060200260200182016040528015610aa1578160200160208202803683370190505b50905060005b8451811015610aff57610ae0858281518110610abf57fe5b6020026020010151858381518110610ad357fe5b60200260200101516105f2565b828281518110610aec57fe5b6020908102919091010152600101610aa7565b509392505050565b816001600160a01b0316610b19610def565b6001600160a01b03161415610b5f5760405162461bcd60e51b81526004018080602001828103825260298152602001806115036029913960400191505060405180910390fd5b8060666000610b6c610def565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610bb0610def565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b6001600160a01b038416610c695760405162461bcd60e51b81526004018080602001828103825260258152602001806114826025913960400191505060405180910390fd5b610c71610def565b6001600160a01b0316856001600160a01b03161480610c975750610c97856107cb610def565b610cd25760405162461bcd60e51b81526004018080602001828103825260298152602001806114596029913960400191505060405180910390fd5b6000610cdc610def565b9050610cfc818787610ced8861116b565b610cf68861116b565b87610a13565b610d43836040518060600160405280602a81526020016114d9602a913960008781526065602090815260408083206001600160a01b038d1684529091529020549190610df4565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054610d7a9084610e8b565b60008581526065602090815260408083206001600160a01b03808b168086529184529382902094909455805188815291820187905280518a8416938616927fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6292908290030190a4610a138187878787876111af565b335b90565b60008184841115610e835760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e48578181015183820152602001610e30565b50505050905090810190601f168015610e755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610ee5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b610efe846001600160a01b0316611320565b15610a1357836001600160a01b031663bc197c8187878686866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b03168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610f8c578181015183820152602001610f74565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015610fcb578181015183820152602001610fb3565b50505050905001848103825285818151815260200191508051906020019080838360005b83811015611007578181015183820152602001610fef565b50505050905090810190601f1680156110345780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b15801561105957600080fd5b505af192505050801561107e57506040513d602081101561107957600080fd5b505160015b6111135761108a61132c565b8061109557506110dc565b60405162461bcd60e51b8152602060048201818152835160248401528351849391928392604401919085019080838360008315610e48578181015183820152602001610e30565b60405162461bcd60e51b81526004018080602001828103825260348152602001806113d26034913960400191505060405180910390fd5b6001600160e01b0319811663bc197c8160e01b146111625760405162461bcd60e51b81526004018080602001828103825260288152602001806114066028913960400191505060405180910390fd5b50505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061119e57fe5b602090810291909101015292915050565b6111c1846001600160a01b0316611320565b15610a1357836001600160a01b031663f23a6e6187878686866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611250578181015183820152602001611238565b50505050905090810190601f16801561127d5780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b1580156112a057600080fd5b505af19250505080156112c557506040513d60208110156112c057600080fd5b505160015b6112d15761108a61132c565b6001600160e01b0319811663f23a6e6160e01b146111625760405162461bcd60e51b81526004018080602001828103825260288152602001806114066028913960400191505060405180910390fd5b3b151590565b60e01c90565b600060443d101561133c57610df1565b600481823e6308c379a06113508251611326565b1461135a57610df1565b6040513d600319016004823e80513d67ffffffffffffffff816024840111818411171561138a5750505050610df1565b828401925082519150808211156113a45750505050610df1565b503d830160208284010111156113bc57505050610df1565b601f01601f191681016020016040529150509056fe455243313135353a207472616e7366657220746f206e6f6e2045524331313535526563656976657220696d706c656d656e746572455243313135353a204552433131353552656365697665722072656a656374656420746f6b656e73455243313135353a2062616c616e636520717565727920666f7220746865207a65726f2061646472657373455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243313135353a207472616e7366657220746f20746865207a65726f2061646472657373455243313135353a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e73666572455243313135353a2073657474696e6720617070726f76616c2073746174757320666f722073656c66455243313135353a206163636f756e747320616e6420696473206c656e677468206d69736d61746368455243313135353a2069647320616e6420616d6f756e7473206c656e677468206d69736d61746368a26469706673582212207c70ed70cea82b85cd7c682fcd1e7ad44a9b39559a4cb7fa844e59ecb68daaab64736f6c63430007000033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461035a578063a22cb465146104cd578063e985e9c5146104fb578063f242432a1461052957610087565b8062fdd58e1461008c57806301ffc9a7146100ca5780630e89341c146101055780632eb2c2d614610197575b600080fd5b6100b8600480360360408110156100a257600080fd5b506001600160a01b0381351690602001356105f2565b60408051918252519081900360200190f35b6100f1600480360360208110156100e057600080fd5b50356001600160e01b031916610661565b604080519115158252519081900360200190f35b6101226004803603602081101561011b57600080fd5b5035610680565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015c578181015183820152602001610144565b50505050905090810190601f1680156101895780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610358600480360360a08110156101ad57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156101e057600080fd5b8201836020820111156101f257600080fd5b803590602001918460208302840111600160201b8311171561021357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561026257600080fd5b82018360208201111561027457600080fd5b803590602001918460208302840111600160201b8311171561029557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156102e457600080fd5b8201836020820111156102f657600080fd5b803590602001918460018302840111600160201b8311171561031757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610718945050505050565b005b61047d6004803603604081101561037057600080fd5b810190602081018135600160201b81111561038a57600080fd5b82018360208201111561039c57600080fd5b803590602001918460208302840111600160201b831117156103bd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561040c57600080fd5b82018360208201111561041e57600080fd5b803590602001918460208302840111600160201b8311171561043f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610a1b945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104b95781810151838201526020016104a1565b505050509050019250505060405180910390f35b610358600480360360408110156104e357600080fd5b506001600160a01b0381351690602001351515610b07565b6100f16004803603604081101561051157600080fd5b506001600160a01b0381358116916020013516610bf6565b610358600480360360a081101561053f57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b81111561057e57600080fd5b82018360208201111561059057600080fd5b803590602001918460018302840111600160201b831117156105b157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c24945050505050565b60006001600160a01b0383166106395760405162461bcd60e51b815260040180806020018281038252602b81526020018061142e602b913960400191505060405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b6001600160e01b03191660009081526033602052604090205460ff1690565b60678054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561070c5780601f106106e15761010080835404028352916020019161070c565b820191906000526020600020905b8154815290600101906020018083116106ef57829003601f168201915b50505050509050919050565b81518351146107585760405162461bcd60e51b81526004018080602001828103825260288152602001806115556028913960400191505060405180910390fd5b6001600160a01b03841661079d5760405162461bcd60e51b81526004018080602001828103825260258152602001806114826025913960400191505060405180910390fd5b6107a5610def565b6001600160a01b0316856001600160a01b031614806107d057506107d0856107cb610def565b610bf6565b61080b5760405162461bcd60e51b81526004018080602001828103825260328152602001806114a76032913960400191505060405180910390fd5b6000610815610def565b9050610825818787878787610a13565b60005b845181101561092b57600085828151811061083f57fe5b60200260200101519050600085838151811061085757fe5b602002602001015190506108c4816040518060600160405280602a81526020016114d9602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054610df49092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a16815220546108fb9082610e8b565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610828565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156109b1578181015183820152602001610999565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156109f05781810151838201526020016109d8565b5050505090500194505050505060405180910390a4610a13818787878787610eec565b505050505050565b60608151835114610a5d5760405162461bcd60e51b815260040180806020018281038252602981526020018061152c6029913960400191505060405180910390fd5b6060835167ffffffffffffffff81118015610a7757600080fd5b50604051908082528060200260200182016040528015610aa1578160200160208202803683370190505b50905060005b8451811015610aff57610ae0858281518110610abf57fe5b6020026020010151858381518110610ad357fe5b60200260200101516105f2565b828281518110610aec57fe5b6020908102919091010152600101610aa7565b509392505050565b816001600160a01b0316610b19610def565b6001600160a01b03161415610b5f5760405162461bcd60e51b81526004018080602001828103825260298152602001806115036029913960400191505060405180910390fd5b8060666000610b6c610def565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610bb0610def565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b6001600160a01b038416610c695760405162461bcd60e51b81526004018080602001828103825260258152602001806114826025913960400191505060405180910390fd5b610c71610def565b6001600160a01b0316856001600160a01b03161480610c975750610c97856107cb610def565b610cd25760405162461bcd60e51b81526004018080602001828103825260298152602001806114596029913960400191505060405180910390fd5b6000610cdc610def565b9050610cfc818787610ced8861116b565b610cf68861116b565b87610a13565b610d43836040518060600160405280602a81526020016114d9602a913960008781526065602090815260408083206001600160a01b038d1684529091529020549190610df4565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054610d7a9084610e8b565b60008581526065602090815260408083206001600160a01b03808b168086529184529382902094909455805188815291820187905280518a8416938616927fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6292908290030190a4610a138187878787876111af565b335b90565b60008184841115610e835760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e48578181015183820152602001610e30565b50505050905090810190601f168015610e755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610ee5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b610efe846001600160a01b0316611320565b15610a1357836001600160a01b031663bc197c8187878686866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b03168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610f8c578181015183820152602001610f74565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015610fcb578181015183820152602001610fb3565b50505050905001848103825285818151815260200191508051906020019080838360005b83811015611007578181015183820152602001610fef565b50505050905090810190601f1680156110345780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b15801561105957600080fd5b505af192505050801561107e57506040513d602081101561107957600080fd5b505160015b6111135761108a61132c565b8061109557506110dc565b60405162461bcd60e51b8152602060048201818152835160248401528351849391928392604401919085019080838360008315610e48578181015183820152602001610e30565b60405162461bcd60e51b81526004018080602001828103825260348152602001806113d26034913960400191505060405180910390fd5b6001600160e01b0319811663bc197c8160e01b146111625760405162461bcd60e51b81526004018080602001828103825260288152602001806114066028913960400191505060405180910390fd5b50505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061119e57fe5b602090810291909101015292915050565b6111c1846001600160a01b0316611320565b15610a1357836001600160a01b031663f23a6e6187878686866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611250578181015183820152602001611238565b50505050905090810190601f16801561127d5780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b1580156112a057600080fd5b505af19250505080156112c557506040513d60208110156112c057600080fd5b505160015b6112d15761108a61132c565b6001600160e01b0319811663f23a6e6160e01b146111625760405162461bcd60e51b81526004018080602001828103825260288152602001806114066028913960400191505060405180910390fd5b3b151590565b60e01c90565b600060443d101561133c57610df1565b600481823e6308c379a06113508251611326565b1461135a57610df1565b6040513d600319016004823e80513d67ffffffffffffffff816024840111818411171561138a5750505050610df1565b828401925082519150808211156113a45750505050610df1565b503d830160208284010111156113bc57505050610df1565b601f01601f191681016020016040529150509056fe455243313135353a207472616e7366657220746f206e6f6e2045524331313535526563656976657220696d706c656d656e746572455243313135353a204552433131353552656365697665722072656a656374656420746f6b656e73455243313135353a2062616c616e636520717565727920666f7220746865207a65726f2061646472657373455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243313135353a207472616e7366657220746f20746865207a65726f2061646472657373455243313135353a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e73666572455243313135353a2073657474696e6720617070726f76616c2073746174757320666f722073656c66455243313135353a206163636f756e747320616e6420696473206c656e677468206d69736d61746368455243313135353a2069647320616e6420616d6f756e7473206c656e677468206d69736d61746368a26469706673582212207c70ed70cea82b85cd7c682fcd1e7ad44a9b39559a4cb7fa844e59ecb68daaab64736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol/IERC1155MetadataURIUpgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol/IERC1155MetadataURIUpgradeable.dbg.json deleted file mode 100644 index e8691a42b8..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol/IERC1155MetadataURIUpgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol/IERC1155MetadataURIUpgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol/IERC1155MetadataURIUpgradeable.json deleted file mode 100644 index 1919e51ecd..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol/IERC1155MetadataURIUpgradeable.json +++ /dev/null @@ -1,323 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC1155MetadataURIUpgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol/IERC1155ReceiverUpgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol/IERC1155ReceiverUpgradeable.dbg.json deleted file mode 100644 index e8691a42b8..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol/IERC1155ReceiverUpgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol/IERC1155ReceiverUpgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol/IERC1155ReceiverUpgradeable.json deleted file mode 100644 index 898ecee63e..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol/IERC1155ReceiverUpgradeable.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC1155ReceiverUpgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol/IERC1155Upgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol/IERC1155Upgradeable.dbg.json deleted file mode 100644 index e8691a42b8..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol/IERC1155Upgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol/IERC1155Upgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol/IERC1155Upgradeable.json deleted file mode 100644 index 39ebe80a89..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol/IERC1155Upgradeable.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC1155Upgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json deleted file mode 100644 index 0b546f5c8c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json deleted file mode 100644 index a9bed638a5..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "AddressUpgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol", - "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ef8db8ba80199c2e00b48aaa23f5a3dfa1f6bf81c43264af150453b95d6732ca64736f6c63430007000033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ef8db8ba80199c2e00b48aaa23f5a3dfa1f6bf81c43264af150453b95d6732ca64736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json deleted file mode 100644 index 0b546f5c8c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json deleted file mode 100644 index 113c89e097..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ContextUpgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol", - "abi": [], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol/CountersUpgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol/CountersUpgradeable.dbg.json deleted file mode 100644 index 0b546f5c8c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol/CountersUpgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol/CountersUpgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol/CountersUpgradeable.json deleted file mode 100644 index 94890cd842..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol/CountersUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CountersUpgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol", - "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208747e29286b42499e93d77989bfd0696da2f9d290887e0570062170e6586ec9064736f6c63430007000033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208747e29286b42499e93d77989bfd0696da2f9d290887e0570062170e6586ec9064736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.dbg.json deleted file mode 100644 index 0b546f5c8c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.json deleted file mode 100644 index 6fb5d82eb9..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "EnumerableSetUpgradeable", - "sourceName": "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol", - "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204289511de4d750a50544cf2879fc5fd2114e4e936901fde5c9d8cd93a9013ede64736f6c63430007000033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204289511de4d750a50544cf2879fc5fd2114e4e936901fde5c9d8cd93a9013ede64736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.dbg.json deleted file mode 100644 index 0cb01669b5..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/61309ed03e4f8b47380b5532e69fda9e.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.json deleted file mode 100644 index 25faaeabd7..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/@openzeppelin/contracts/math/SafeMath.sol/SafeMath.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SafeMath", - "sourceName": "@openzeppelin/contracts/math/SafeMath.sol", - "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207bf6d34365e28c914b16f5470af29854d9b761a6ff3bb9456d1a636132780d2364736f6c63430007000033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207bf6d34365e28c914b16f5470af29854d9b761a6ff3bb9456d1a636132780d2364736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/4434e8dbd23bd8c59e3ee61547429623.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/4434e8dbd23bd8c59e3ee61547429623.json deleted file mode 100644 index d106bcf223..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/4434e8dbd23bd8c59e3ee61547429623.json +++ /dev/null @@ -1,16179 +0,0 @@ -{ - "id": "4434e8dbd23bd8c59e3ee61547429623", - "_format": "hh-sol-build-info-1", - "solcVersion": "0.7.0", - "solcLongVersion": "0.7.0+commit.9e61f92b", - "input": { - "language": "Solidity", - "sources": { - "src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol": { - "content": "pragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n// SPDX-License-Identifier: BSD-3-Clause\n\n/* Copyright 2021 Compound Labs, Inc.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n3. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n// Original work from Compound: https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol\n// Modified to work in the NetEmissionsTokenNetwork system\n\ncontract DAOToken {\n /// @notice EIP-20 token name for this token\n string public constant name = \"Climate DAO Token\";\n\n /// @notice EIP-20 token symbol for this token\n string public constant symbol = \"dCLM8\";\n\n /// @notice EIP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public totalSupply = 10000000e18; // 10 million dCLM8\n\n /// @notice Initial holder of all DAO tokens\n address public initialHolder;\n\n /// @notice Governor to be set after deploy for permissions to burn tokens (only set once)\n address public governor = address(0);\n\n /// @dev Allowance amounts on behalf of others\n mapping (address => mapping (address => uint96)) internal allowances;\n\n /// @dev Official record of token balances for each account\n mapping (address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping (address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping (address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH = keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH = keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping (address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard EIP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard EIP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new dCLM8 token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) {\n balances[account] = uint96(totalSupply);\n initialHolder = account;\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"dCLM8::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external returns (bool) {\n uint96 amount = safe96(rawAmount, \"dCLM8::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"dCLM8::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(spenderAllowance, amount, \"dCLM8::transferFrom: transfer amount exceeds spender allowance\");\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public {\n bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this)));\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"dCLM8::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"dCLM8::delegateBySig: invalid nonce\");\n require(block.timestamp <= expiry, \"dCLM8::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"dCLM8::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _burn(address account, uint96 amount) external {\n require(account != address(0), \"dCLM8::_burn: burn from the zero address\");\n require(msg.sender == governor, \"dCLM8::_burn: must be governor\");\n\n uint96 accountBalance = balances[account];\n require(accountBalance >= amount, \"dCLM8::_burn: burn amount exceeds balance\");\n balances[account] = accountBalance - amount;\n totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"dCLM8::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"dCLM8::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"dCLM8::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"dCLM8::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n // If dst address has no delgatees, automatically set to self. Otherwise, transfer to dst's delegates\n if (delegates[dst] == address(0)) {\n _delegate(dst, dst);\n } else {\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"dCLM8::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"dCLM8::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"dCLM8::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2**32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2**96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly { chainId := chainid() }\n return chainId;\n }\n\n function getTotalSupply() external view returns (uint) {\n return totalSupply;\n }\n\n function getInitialHolder() external view returns (address) {\n return initialHolder;\n }\n\n function setGovernor(address newGovernor) public {\n require(msg.sender == initialHolder, \"dCLM8::setGovernor: must be initial holder\");\n require(governor == address(0), \"dCLM::setGovernor: governor can only be set once\");\n governor = newGovernor;\n }\n\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers" - ], - "": [ - "ast" - ] - } - } - } - }, - "output": { - "contracts": { - "src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol": { - "DAOToken": { - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "amount", - "type": "uint96" - } - ], - "name": "_burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getInitialHolder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialHolder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newGovernor", - "type": "address" - } - ], - "name": "setGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "60806040526a084595161401484a000000600055600280546001600160a01b031916905534801561002f57600080fd5b5060405162001d2c38038062001d2c833981016040819052610050916100dc565b600080546001600160a01b0383168083526004602052604080842080546001600160601b0319166001600160601b0390941693909317909255600180546001600160a01b03191682179055825491519092917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef916100ce919061010a565b60405180910390a350610113565b6000602082840312156100ed578081fd5b81516001600160a01b0381168114610103578182fd5b9392505050565b90815260200190565b611c0980620001236000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c8063782d6fe1116100de578063b72218e311610097578063c4e41b2211610071578063c4e41b2214610315578063dd62ed3e1461031d578063e7a324dc14610330578063f1127ed81461033857610173565b8063b72218e3146102e7578063c3cda520146102ef578063c42cf5351461030257610173565b8063782d6fe11461027e5780637ecebe001461029e57806395d89b41146102b1578063a9059cbb146102b9578063ae80d9de146102cc578063b4b5ea57146102d457610173565b8063313ce56711610130578063313ce567146101fb578063587cde1e146102105780635c19a95c146102235780636fcfff451461023857806370a082311461025857806372d3ee9e1461026b57610173565b806306fdde0314610178578063095ea7b3146101965780630c340a24146101b657806318160ddd146101cb57806320606b70146101e057806323b872dd146101e8575b600080fd5b610180610359565b60405161018d9190611651565b60405180910390f35b6101a96101a43660046114a9565b610386565b60405161018d91906115d7565b6101be610445565b60405161018d91906115c3565b6101d3610454565b60405161018d91906115e2565b6101d361045a565b6101a96101f6366004611469565b61047e565b6102036105c5565b60405161018d9190611a09565b6101be61021e36600461141a565b6105ca565b61023661023136600461141a565b6105e5565b005b61024b61024636600461141a565b6105f2565b60405161018d91906119d9565b6101d361026636600461141a565b61060a565b610236610279366004611571565b61062e565b61029161028c3660046114a9565b61074e565b60405161018d9190611a17565b6101d36102ac36600461141a565b61095c565b61018061096e565b6101a96102c73660046114a9565b61098f565b6101be6109cb565b6102916102e236600461141a565b6109da565b6101be610a4b565b6102366102fd3660046114d3565b610a5a565b61023661031036600461141a565b610c69565b6101d3610cde565b6101d361032b366004611435565b610ce4565b6101d3610d18565b61034b610346366004611532565b610d3c565b60405161018d9291906119ea565b6040518060400160405280601181526020017021b634b6b0ba32902220a7902a37b5b2b760791b81525081565b60008060001983141561039c57506000196103c1565b6103be83604051806060016040528060268152602001611b5060269139610d71565b90505b3360008181526003602090815260408083206001600160a01b03891680855292529182902080546001600160601b0319166001600160601b03861617905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610431908590611a17565b60405180910390a360019150505b92915050565b6002546001600160a01b031681565b60005481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6001600160a01b03831660009081526003602090815260408083203380855290835281842054825160608101909352602680845291936001600160601b039091169285926104d69288929190611b5090830139610d71565b9050866001600160a01b0316836001600160a01b03161415801561050357506001600160601b0382811614155b156105ad57600061052d83836040518060600160405280603e8152602001611b12603e9139610da0565b6001600160a01b038981166000818152600360209081526040808320948a16808452949091529081902080546001600160601b0319166001600160601b0386161790555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906105a3908590611a17565b60405180910390a3505b6105b8878783610ddf565b5060019695505050505050565b601281565b6005602052600090815260409020546001600160a01b031681565b6105ef3382610fb8565b50565b60076020526000908152604090205463ffffffff1681565b6001600160a01b03166000908152600460205260409020546001600160601b031690565b6001600160a01b03821661065d5760405162461bcd60e51b815260040161065490611991565b60405180910390fd5b6002546001600160a01b031633146106875760405162461bcd60e51b81526004016106549061195a565b6001600160a01b0382166000908152600460205260409020546001600160601b039081169082168110156106cd5760405162461bcd60e51b8152600401610654906116a4565b6001600160a01b03831660008181526004602052604080822080546001600160601b0319168686036001600160601b0390811691909117909155825490861690038255519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610741908690611a17565b60405180910390a3505050565b600043821061076f5760405162461bcd60e51b81526004016106549061182b565b6001600160a01b03831660009081526007602052604090205463ffffffff168061079d57600091505061043f565b6001600160a01b038416600090815260066020908152604080832063ffffffff600019860181168552925290912054168310610819576001600160a01b03841660009081526006602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b0316905061043f565b6001600160a01b038416600090815260066020908152604080832083805290915290205463ffffffff1683101561085457600091505061043f565b600060001982015b8163ffffffff168163ffffffff16111561091757600282820363ffffffff160481036108866113ec565b506001600160a01b038716600090815260066020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b031691810191909152908714156108f25760200151945061043f9350505050565b805163ffffffff1687111561090957819350610910565b6001820392505b505061085c565b506001600160a01b038516600090815260066020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b60086020526000908152604090205481565b604051806040016040528060058152602001640c886989a760db1b81525081565b6000806109b483604051806060016040528060278152602001611aeb60279139610d71565b90506109c1338583610ddf565b5060019392505050565b6001546001600160a01b031690565b6001600160a01b03811660009081526007602052604081205463ffffffff1680610a05576000610a44565b6001600160a01b0383166000908152600660209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03165b9392505050565b6001546001600160a01b031681565b60408051808201909152601181527021b634b6b0ba32902220a7902a37b5b2b760791b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f7c75c83381dcf4c0e5ba36df2cc653b50dcd8f69236256411bc04c9f677ed4c0610acf611042565b30604051602001610ae3949392919061160f565b60405160208183030381529060405280519060200120905060007fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf888888604051602001610b3494939291906115eb565b60405160208183030381529060405280519060200120905060008282604051602001610b619291906115a8565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610b9e9493929190611633565b6020604051602081039080840390855afa158015610bc0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bf35760405162461bcd60e51b815260040161065490611787565b6001600160a01b03811660009081526008602052604090208054600181019091558914610c325760405162461bcd60e51b815260040161065490611873565b87421115610c525760405162461bcd60e51b815260040161065490611913565b610c5c818b610fb8565b505050505b505050505050565b6001546001600160a01b03163314610c935760405162461bcd60e51b81526004016106549061173d565b6002546001600160a01b031615610cbc5760405162461bcd60e51b8152600401610654906116ed565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60005490565b6001600160a01b0391821660009081526003602090815260408083209390941682529190915220546001600160601b031690565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600660209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b600081600160601b8410610d985760405162461bcd60e51b81526004016106549190611651565b509192915050565b6000836001600160601b0316836001600160601b031611158290610dd75760405162461bcd60e51b81526004016106549190611651565b505050900390565b6001600160a01b038316610e055760405162461bcd60e51b8152600401610654906118b6565b6001600160a01b038216610e2b5760405162461bcd60e51b8152600401610654906117ce565b6001600160a01b038316600090815260046020908152604091829020548251606081019093526037808452610e76936001600160601b039092169285929190611a8390830139610da0565b6001600160a01b03848116600090815260046020908152604080832080546001600160601b0319166001600160601b03968716179055928616825290829020548251606081019093526031808452610ede9491909116928592909190611aba90830139611046565b6001600160a01b038381166000818152600460205260409081902080546001600160601b0319166001600160601b0395909516949094179093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610f4b908590611a17565b60405180910390a36001600160a01b0382811660009081526005602052604090205416610f8157610f7c8283610fb8565b610fb3565b6001600160a01b03808416600090815260056020526040808220548584168352912054610fb392918216911683611082565b505050565b6001600160a01b03808316600081815260056020818152604080842080546004845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461103c828483611082565b50505050565b4690565b6000838301826001600160601b0380871690831610156110795760405162461bcd60e51b81526004016106549190611651565b50949350505050565b816001600160a01b0316836001600160a01b0316141580156110ad57506000816001600160601b0316115b15610fb3576001600160a01b03831615611165576001600160a01b03831660009081526007602052604081205463ffffffff1690816110ed57600061112c565b6001600160a01b0385166000908152600660209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006111538285604051806060016040528060298152602001611b7660299139610da0565b905061116186848484611210565b5050505b6001600160a01b03821615610fb3576001600160a01b03821660009081526007602052604081205463ffffffff1690816111a05760006111df565b6001600160a01b0384166000908152600660209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006112068285604051806060016040528060288152602001611a5b60289139611046565b9050610c61858484845b600061123443604051806060016040528060358152602001611b9f603591396113c5565b905060008463ffffffff1611801561127d57506001600160a01b038516600090815260066020908152604080832063ffffffff6000198901811685529252909120548282169116145b156112dc576001600160a01b0385166000908152600660209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b0385160217905561137b565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600683528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600790935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72484846040516113b6929190611a2b565b60405180910390a25050505050565b600081600160201b8410610d985760405162461bcd60e51b81526004016106549190611651565b604080518082019091526000808252602082015290565b80356001600160a01b038116811461043f57600080fd5b60006020828403121561142b578081fd5b610a448383611403565b60008060408385031215611447578081fd5b6114518484611403565b91506114608460208501611403565b90509250929050565b60008060006060848603121561147d578081fd5b833561148881611a45565b9250602084013561149881611a45565b929592945050506040919091013590565b600080604083850312156114bb578182fd5b6114c58484611403565b946020939093013593505050565b60008060008060008060c087890312156114eb578182fd5b6114f58888611403565b95506020870135945060408701359350606087013560ff81168114611518578283fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215611544578182fd5b61154e8484611403565b9150602083013563ffffffff81168114611566578182fd5b809150509250929050565b60008060408385031215611583578182fd5b61158d8484611403565b915060208301356001600160601b0381168114611566578182fd5b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b901515815260200190565b90815260200190565b9384526001600160a01b039290921660208401526040830152606082015260800190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b8181101561167d57858101830151858201604001528201611661565b8181111561168e5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526029908201527f64434c4d383a3a5f6275726e3a206275726e20616d6f756e7420657863656564604082015268732062616c616e636560b81b606082015260800190565b60208082526030908201527f64434c4d3a3a736574476f7665726e6f723a20676f7665726e6f722063616e2060408201526f6f6e6c7920626520736574206f6e636560801b606082015260800190565b6020808252602a908201527f64434c4d383a3a736574476f7665726e6f723a206d75737420626520696e697460408201526934b0b6103437b63232b960b11b606082015260800190565b60208082526027908201527f64434c4d383a3a64656c656761746542795369673a20696e76616c6964207369604082015266676e617475726560c81b606082015260800190565b6020808252603b908201527f64434c4d383a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460408201527f72616e7366657220746f20746865207a65726f20616464726573730000000000606082015260800190565b60208082526028908201527f64434c4d383a3a6765745072696f72566f7465733a206e6f74207965742064656040820152671d195c9b5a5b995960c21b606082015260800190565b60208082526023908201527f64434c4d383a3a64656c656761746542795369673a20696e76616c6964206e6f6040820152626e636560e81b606082015260800190565b6020808252603d908201527f64434c4d383a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460408201527f72616e736665722066726f6d20746865207a65726f2061646472657373000000606082015260800190565b60208082526027908201527f64434c4d383a3a64656c656761746542795369673a207369676e617475726520604082015266195e1c1a5c995960ca1b606082015260800190565b6020808252601e908201527f64434c4d383a3a5f6275726e3a206d75737420626520676f7665726e6f720000604082015260600190565b60208082526028908201527f64434c4d383a3a5f6275726e3a206275726e2066726f6d20746865207a65726f604082015267206164647265737360c01b606082015260800190565b63ffffffff91909116815260200190565b63ffffffff9290921682526001600160601b0316602082015260400190565b60ff91909116815260200190565b6001600160601b0391909116815260200190565b6001600160601b0392831681529116602082015260400190565b6001600160a01b03811681146105ef57600080fdfe64434c4d383a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f777364434c4d383a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e636564434c4d383a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f777364434c4d383a3a7472616e736665723a20616d6f756e742065786365656473203936206269747364434c4d383a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e636564434c4d383a3a617070726f76653a20616d6f756e742065786365656473203936206269747364434c4d383a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f777364434c4d383a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473a2646970667358221220edee2084fa807746006b92bb48109b74d61bb21d709f2a72dc5e627327355d0064736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH11 0x84595161401484A000000 PUSH1 0x0 SSTORE PUSH1 0x2 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE CALLVALUE DUP1 ISZERO PUSH2 0x2F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x1D2C CODESIZE SUB DUP1 PUSH3 0x1D2C DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x50 SWAP2 PUSH2 0xDC JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND DUP1 DUP4 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 OR SWAP1 SWAP3 SSTORE PUSH1 0x1 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND DUP3 OR SWAP1 SSTORE DUP3 SLOAD SWAP2 MLOAD SWAP1 SWAP3 SWAP2 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP2 PUSH2 0xCE SWAP2 SWAP1 PUSH2 0x10A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP PUSH2 0x113 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xED JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x103 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH2 0x1C09 DUP1 PUSH3 0x123 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x173 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x782D6FE1 GT PUSH2 0xDE JUMPI DUP1 PUSH4 0xB72218E3 GT PUSH2 0x97 JUMPI DUP1 PUSH4 0xC4E41B22 GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xC4E41B22 EQ PUSH2 0x315 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x31D JUMPI DUP1 PUSH4 0xE7A324DC EQ PUSH2 0x330 JUMPI DUP1 PUSH4 0xF1127ED8 EQ PUSH2 0x338 JUMPI PUSH2 0x173 JUMP JUMPDEST DUP1 PUSH4 0xB72218E3 EQ PUSH2 0x2E7 JUMPI DUP1 PUSH4 0xC3CDA520 EQ PUSH2 0x2EF JUMPI DUP1 PUSH4 0xC42CF535 EQ PUSH2 0x302 JUMPI PUSH2 0x173 JUMP JUMPDEST DUP1 PUSH4 0x782D6FE1 EQ PUSH2 0x27E JUMPI DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x29E JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x2B1 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x2B9 JUMPI DUP1 PUSH4 0xAE80D9DE EQ PUSH2 0x2CC JUMPI DUP1 PUSH4 0xB4B5EA57 EQ PUSH2 0x2D4 JUMPI PUSH2 0x173 JUMP JUMPDEST DUP1 PUSH4 0x313CE567 GT PUSH2 0x130 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1FB JUMPI DUP1 PUSH4 0x587CDE1E EQ PUSH2 0x210 JUMPI DUP1 PUSH4 0x5C19A95C EQ PUSH2 0x223 JUMPI DUP1 PUSH4 0x6FCFFF45 EQ PUSH2 0x238 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x258 JUMPI DUP1 PUSH4 0x72D3EE9E EQ PUSH2 0x26B JUMPI PUSH2 0x173 JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x178 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x196 JUMPI DUP1 PUSH4 0xC340A24 EQ PUSH2 0x1B6 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x1CB JUMPI DUP1 PUSH4 0x20606B70 EQ PUSH2 0x1E0 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1E8 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x180 PUSH2 0x359 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x1651 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1A9 PUSH2 0x1A4 CALLDATASIZE PUSH1 0x4 PUSH2 0x14A9 JUMP JUMPDEST PUSH2 0x386 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x15D7 JUMP JUMPDEST PUSH2 0x1BE PUSH2 0x445 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x15C3 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0x454 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x15E2 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0x45A JUMP JUMPDEST PUSH2 0x1A9 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0x1469 JUMP JUMPDEST PUSH2 0x47E JUMP JUMPDEST PUSH2 0x203 PUSH2 0x5C5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x1A09 JUMP JUMPDEST PUSH2 0x1BE PUSH2 0x21E CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x5CA JUMP JUMPDEST PUSH2 0x236 PUSH2 0x231 CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x5E5 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x24B PUSH2 0x246 CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x5F2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x19D9 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0x266 CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x60A JUMP JUMPDEST PUSH2 0x236 PUSH2 0x279 CALLDATASIZE PUSH1 0x4 PUSH2 0x1571 JUMP JUMPDEST PUSH2 0x62E JUMP JUMPDEST PUSH2 0x291 PUSH2 0x28C CALLDATASIZE PUSH1 0x4 PUSH2 0x14A9 JUMP JUMPDEST PUSH2 0x74E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x1A17 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0x2AC CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x95C JUMP JUMPDEST PUSH2 0x180 PUSH2 0x96E JUMP JUMPDEST PUSH2 0x1A9 PUSH2 0x2C7 CALLDATASIZE PUSH1 0x4 PUSH2 0x14A9 JUMP JUMPDEST PUSH2 0x98F JUMP JUMPDEST PUSH2 0x1BE PUSH2 0x9CB JUMP JUMPDEST PUSH2 0x291 PUSH2 0x2E2 CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x9DA JUMP JUMPDEST PUSH2 0x1BE PUSH2 0xA4B JUMP JUMPDEST PUSH2 0x236 PUSH2 0x2FD CALLDATASIZE PUSH1 0x4 PUSH2 0x14D3 JUMP JUMPDEST PUSH2 0xA5A JUMP JUMPDEST PUSH2 0x236 PUSH2 0x310 CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0xC69 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0xCDE JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0x32B CALLDATASIZE PUSH1 0x4 PUSH2 0x1435 JUMP JUMPDEST PUSH2 0xCE4 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0xD18 JUMP JUMPDEST PUSH2 0x34B PUSH2 0x346 CALLDATASIZE PUSH1 0x4 PUSH2 0x1532 JUMP JUMPDEST PUSH2 0xD3C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP3 SWAP2 SWAP1 PUSH2 0x19EA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x11 DUP2 MSTORE PUSH1 0x20 ADD PUSH17 0x21B634B6B0BA32902220A7902A37B5B2B7 PUSH1 0x79 SHL DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 NOT DUP4 EQ ISZERO PUSH2 0x39C JUMPI POP PUSH1 0x0 NOT PUSH2 0x3C1 JUMP JUMPDEST PUSH2 0x3BE DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x26 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1B50 PUSH1 0x26 SWAP2 CODECOPY PUSH2 0xD71 JUMP JUMPDEST SWAP1 POP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP2 DUP3 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP7 AND OR SWAP1 SSTORE SWAP1 MLOAD SWAP1 SWAP2 SWAP1 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0x431 SWAP1 DUP6 SWAP1 PUSH2 0x1A17 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH32 0x8CAD95687BA82C2CE50E74F7B754645E5117C3A5BEC8151C0726D5857980A866 DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE DUP2 DUP5 KECCAK256 SLOAD DUP3 MLOAD PUSH1 0x60 DUP2 ADD SWAP1 SWAP4 MSTORE PUSH1 0x26 DUP1 DUP5 MSTORE SWAP2 SWAP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 SWAP2 AND SWAP3 DUP6 SWAP3 PUSH2 0x4D6 SWAP3 DUP9 SWAP3 SWAP2 SWAP1 PUSH2 0x1B50 SWAP1 DUP4 ADD CODECOPY PUSH2 0xD71 JUMP JUMPDEST SWAP1 POP DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x503 JUMPI POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP3 DUP2 AND EQ ISZERO JUMPDEST ISZERO PUSH2 0x5AD JUMPI PUSH1 0x0 PUSH2 0x52D DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x3E DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1B12 PUSH1 0x3E SWAP2 CODECOPY PUSH2 0xDA0 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP11 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP7 AND OR SWAP1 SSTORE MLOAD SWAP3 SWAP4 POP SWAP1 SWAP2 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0x5A3 SWAP1 DUP6 SWAP1 PUSH2 0x1A17 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP JUMPDEST PUSH2 0x5B8 DUP8 DUP8 DUP4 PUSH2 0xDDF JUMP JUMPDEST POP PUSH1 0x1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x12 DUP2 JUMP JUMPDEST PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH2 0x5EF CALLER DUP3 PUSH2 0xFB8 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x65D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x1991 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x687 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x195A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 DUP2 AND SWAP1 DUP3 AND DUP2 LT ISZERO PUSH2 0x6CD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x16A4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND DUP7 DUP7 SUB PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 DUP2 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SWAP2 SSTORE DUP3 SLOAD SWAP1 DUP7 AND SWAP1 SUB DUP3 SSTORE MLOAD SWAP1 SWAP2 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x741 SWAP1 DUP7 SWAP1 PUSH2 0x1A17 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 NUMBER DUP3 LT PUSH2 0x76F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x182B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND DUP1 PUSH2 0x79D JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x43F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH4 0xFFFFFFFF PUSH1 0x0 NOT DUP7 ADD DUP2 AND DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD AND DUP4 LT PUSH2 0x819 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x0 NOT SWAP5 SWAP1 SWAP5 ADD PUSH4 0xFFFFFFFF AND DUP4 MSTORE SWAP3 SWAP1 MSTORE KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x20 SHL SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP1 POP PUSH2 0x43F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP4 DUP1 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND DUP4 LT ISZERO PUSH2 0x854 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x43F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 NOT DUP3 ADD JUMPDEST DUP2 PUSH4 0xFFFFFFFF AND DUP2 PUSH4 0xFFFFFFFF AND GT ISZERO PUSH2 0x917 JUMPI PUSH1 0x2 DUP3 DUP3 SUB PUSH4 0xFFFFFFFF AND DIV DUP2 SUB PUSH2 0x886 PUSH2 0x13EC JUMP JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH4 0xFFFFFFFF DUP6 DUP2 AND DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 DUP2 MLOAD DUP1 DUP4 ADD SWAP1 SWAP3 MSTORE SLOAD SWAP3 DUP4 AND DUP1 DUP3 MSTORE PUSH1 0x1 PUSH1 0x20 SHL SWAP1 SWAP4 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 DUP8 EQ ISZERO PUSH2 0x8F2 JUMPI PUSH1 0x20 ADD MLOAD SWAP5 POP PUSH2 0x43F SWAP4 POP POP POP POP JUMP JUMPDEST DUP1 MLOAD PUSH4 0xFFFFFFFF AND DUP8 GT ISZERO PUSH2 0x909 JUMPI DUP2 SWAP4 POP PUSH2 0x910 JUMP JUMPDEST PUSH1 0x1 DUP3 SUB SWAP3 POP JUMPDEST POP POP PUSH2 0x85C JUMP JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH4 0xFFFFFFFF SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB PUSH1 0x1 PUSH1 0x20 SHL SWAP1 SWAP2 DIV AND SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH5 0xC886989A7 PUSH1 0xDB SHL DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x9B4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1AEB PUSH1 0x27 SWAP2 CODECOPY PUSH2 0xD71 JUMP JUMPDEST SWAP1 POP PUSH2 0x9C1 CALLER DUP6 DUP4 PUSH2 0xDDF JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND DUP1 PUSH2 0xA05 JUMPI PUSH1 0x0 PUSH2 0xA44 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x0 NOT DUP6 ADD PUSH4 0xFFFFFFFF AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x20 SHL SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH17 0x21B634B6B0BA32902220A7902A37B5B2B7 PUSH1 0x79 SHL PUSH1 0x20 SWAP1 SWAP2 ADD MSTORE PUSH1 0x0 PUSH32 0x8CAD95687BA82C2CE50E74F7B754645E5117C3A5BEC8151C0726D5857980A866 PUSH32 0x7C75C83381DCF4C0E5BA36DF2CC653B50DCD8F69236256411BC04C9F677ED4C0 PUSH2 0xACF PUSH2 0x1042 JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xAE3 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x160F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH32 0xE48329057BFD03D55E49B547132E39CFFD9C1820AD7B9D4C5307691425D15ADF DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xB34 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x15EB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xB61 SWAP3 SWAP2 SWAP1 PUSH2 0x15A8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0xB9E SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1633 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xBC0 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0xBF3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x1787 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP2 ADD SWAP1 SWAP2 SSTORE DUP10 EQ PUSH2 0xC32 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x1873 JUMP JUMPDEST DUP8 TIMESTAMP GT ISZERO PUSH2 0xC52 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x1913 JUMP JUMPDEST PUSH2 0xC5C DUP2 DUP12 PUSH2 0xFB8 JUMP JUMPDEST POP POP POP POP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xC93 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x173D JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO PUSH2 0xCBC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x16ED JUMP JUMPDEST PUSH1 0x2 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH32 0xE48329057BFD03D55E49B547132E39CFFD9C1820AD7B9D4C5307691425D15ADF DUP2 JUMP JUMPDEST PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP1 SWAP2 MSTORE SWAP1 DUP3 MSTORE SWAP1 KECCAK256 SLOAD PUSH4 0xFFFFFFFF DUP2 AND SWAP1 PUSH1 0x1 PUSH1 0x20 SHL SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND DUP3 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0x60 SHL DUP5 LT PUSH2 0xD98 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP2 SWAP1 PUSH2 0x1651 JUMP JUMPDEST POP SWAP2 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND GT ISZERO DUP3 SWAP1 PUSH2 0xDD7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP2 SWAP1 PUSH2 0x1651 JUMP JUMPDEST POP POP POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0xE05 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x18B6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0xE2B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x17CE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SLOAD DUP3 MLOAD PUSH1 0x60 DUP2 ADD SWAP1 SWAP4 MSTORE PUSH1 0x37 DUP1 DUP5 MSTORE PUSH2 0xE76 SWAP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 SWAP3 AND SWAP3 DUP6 SWAP3 SWAP2 SWAP1 PUSH2 0x1A83 SWAP1 DUP4 ADD CODECOPY PUSH2 0xDA0 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP7 DUP8 AND OR SWAP1 SSTORE SWAP3 DUP7 AND DUP3 MSTORE SWAP1 DUP3 SWAP1 KECCAK256 SLOAD DUP3 MLOAD PUSH1 0x60 DUP2 ADD SWAP1 SWAP4 MSTORE PUSH1 0x31 DUP1 DUP5 MSTORE PUSH2 0xEDE SWAP5 SWAP2 SWAP1 SWAP2 AND SWAP3 DUP6 SWAP3 SWAP1 SWAP2 SWAP1 PUSH2 0x1ABA SWAP1 DUP4 ADD CODECOPY PUSH2 0x1046 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP6 SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 OR SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 DUP6 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0xF4B SWAP1 DUP6 SWAP1 PUSH2 0x1A17 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD AND PUSH2 0xF81 JUMPI PUSH2 0xF7C DUP3 DUP4 PUSH2 0xFB8 JUMP JUMPDEST PUSH2 0xFB3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SLOAD DUP6 DUP5 AND DUP4 MSTORE SWAP2 KECCAK256 SLOAD PUSH2 0xFB3 SWAP3 SWAP2 DUP3 AND SWAP2 AND DUP4 PUSH2 0x1082 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 DUP1 SLOAD PUSH1 0x4 DUP5 MSTORE DUP3 DUP7 KECCAK256 SLOAD SWAP5 SWAP1 SWAP4 MSTORE DUP8 DUP8 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP5 AND DUP2 OR SWAP1 SWAP2 SSTORE SWAP1 MLOAD SWAP2 SWAP1 SWAP6 AND SWAP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 SWAP3 AND SWAP4 SWAP2 SWAP3 DUP6 SWAP3 SWAP2 PUSH32 0x3134E8A2E6D97E929A7E54011EA5485D7D196DD5F0BA4D4EF95803E8E3FC257F SWAP2 SWAP1 LOG4 PUSH2 0x103C DUP3 DUP5 DUP4 PUSH2 0x1082 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP4 ADD DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP1 DUP8 AND SWAP1 DUP4 AND LT ISZERO PUSH2 0x1079 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP2 SWAP1 PUSH2 0x1651 JUMP JUMPDEST POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x10AD JUMPI POP PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND GT JUMPDEST ISZERO PUSH2 0xFB3 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND ISZERO PUSH2 0x1165 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND SWAP1 DUP2 PUSH2 0x10ED JUMPI PUSH1 0x0 PUSH2 0x112C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x0 NOT DUP7 ADD PUSH4 0xFFFFFFFF AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x20 SHL SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1153 DUP3 DUP6 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1B76 PUSH1 0x29 SWAP2 CODECOPY PUSH2 0xDA0 JUMP JUMPDEST SWAP1 POP PUSH2 0x1161 DUP7 DUP5 DUP5 DUP5 PUSH2 0x1210 JUMP JUMPDEST POP POP POP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO PUSH2 0xFB3 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND SWAP1 DUP2 PUSH2 0x11A0 JUMPI PUSH1 0x0 PUSH2 0x11DF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x0 NOT DUP7 ADD PUSH4 0xFFFFFFFF AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x20 SHL SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1206 DUP3 DUP6 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1A5B PUSH1 0x28 SWAP2 CODECOPY PUSH2 0x1046 JUMP JUMPDEST SWAP1 POP PUSH2 0xC61 DUP6 DUP5 DUP5 DUP5 JUMPDEST PUSH1 0x0 PUSH2 0x1234 NUMBER PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x35 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1B9F PUSH1 0x35 SWAP2 CODECOPY PUSH2 0x13C5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP5 PUSH4 0xFFFFFFFF AND GT DUP1 ISZERO PUSH2 0x127D JUMPI POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH4 0xFFFFFFFF PUSH1 0x0 NOT DUP10 ADD DUP2 AND DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD DUP3 DUP3 AND SWAP2 AND EQ JUMPDEST ISZERO PUSH2 0x12DC JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x0 NOT DUP9 ADD PUSH4 0xFFFFFFFF AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 DUP1 SLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFF00000000 NOT AND PUSH1 0x1 PUSH1 0x20 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP6 AND MUL OR SWAP1 SSTORE PUSH2 0x137B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH4 0xFFFFFFFF DUP1 DUP5 AND DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP1 DUP7 AND PUSH1 0x20 DUP1 DUP6 ADD SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x6 DUP4 MSTORE DUP8 DUP2 KECCAK256 DUP13 DUP8 AND DUP3 MSTORE DUP4 MSTORE DUP8 DUP2 KECCAK256 SWAP7 MLOAD DUP8 SLOAD SWAP5 MLOAD SWAP1 SWAP6 AND PUSH1 0x1 PUSH1 0x20 SHL MUL PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFF00000000 NOT SWAP6 DUP8 AND PUSH4 0xFFFFFFFF NOT SWAP6 DUP7 AND OR SWAP6 SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 OR SWAP1 SWAP6 SSTORE SWAP4 DUP3 MSTORE PUSH1 0x7 SWAP1 SWAP4 MSTORE SWAP3 SWAP1 SWAP3 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP9 ADD SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP2 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMPDEST DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0xDEC2BACDD2F05B59DE34DA9B523DFF8BE42E5E38E818C82FDB0BAE774387A724 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH2 0x13B6 SWAP3 SWAP2 SWAP1 PUSH2 0x1A2B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0x20 SHL DUP5 LT PUSH2 0xD98 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP2 SWAP1 PUSH2 0x1651 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x43F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x142B JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0xA44 DUP4 DUP4 PUSH2 0x1403 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1447 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x1451 DUP5 DUP5 PUSH2 0x1403 JUMP JUMPDEST SWAP2 POP PUSH2 0x1460 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x1403 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x147D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x1488 DUP2 PUSH2 0x1A45 JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x1498 DUP2 PUSH2 0x1A45 JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x14BB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x14C5 DUP5 DUP5 PUSH2 0x1403 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x14EB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x14F5 DUP9 DUP9 PUSH2 0x1403 JUMP JUMPDEST SWAP6 POP PUSH1 0x20 DUP8 ADD CALLDATALOAD SWAP5 POP PUSH1 0x40 DUP8 ADD CALLDATALOAD SWAP4 POP PUSH1 0x60 DUP8 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x1518 JUMPI DUP3 DUP4 REVERT JUMPDEST SWAP6 SWAP9 SWAP5 SWAP8 POP SWAP3 SWAP6 PUSH1 0x80 DUP2 ADD CALLDATALOAD SWAP5 PUSH1 0xA0 SWAP1 SWAP2 ADD CALLDATALOAD SWAP4 POP SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1544 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x154E DUP5 DUP5 PUSH2 0x1403 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x1566 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1583 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x158D DUP5 DUP5 PUSH2 0x1403 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x1566 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x167D JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x1661 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x168E JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A5F6275726E3A206275726E20616D6F756E7420657863656564 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x732062616C616E6365 PUSH1 0xB8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D3A3A736574476F7665726E6F723A20676F7665726E6F722063616E20 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x6F6E6C7920626520736574206F6E6365 PUSH1 0x80 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2A SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A736574476F7665726E6F723A206D75737420626520696E6974 PUSH1 0x40 DUP3 ADD MSTORE PUSH10 0x34B0B6103437B63232B9 PUSH1 0xB1 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x27 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A64656C656761746542795369673A20696E76616C6964207369 PUSH1 0x40 DUP3 ADD MSTORE PUSH7 0x676E6174757265 PUSH1 0xC8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3B SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A5F7472616E73666572546F6B656E733A2063616E6E6F742074 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x72616E7366657220746F20746865207A65726F20616464726573730000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A6765745072696F72566F7465733A206E6F7420796574206465 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x1D195C9B5A5B9959 PUSH1 0xC2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x23 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A64656C656761746542795369673A20696E76616C6964206E6F PUSH1 0x40 DUP3 ADD MSTORE PUSH3 0x6E6365 PUSH1 0xE8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3D SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A5F7472616E73666572546F6B656E733A2063616E6E6F742074 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x72616E736665722066726F6D20746865207A65726F2061646472657373000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x27 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A64656C656761746542795369673A207369676E617475726520 PUSH1 0x40 DUP3 ADD MSTORE PUSH7 0x195E1C1A5C9959 PUSH1 0xCA SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1E SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A5F6275726E3A206D75737420626520676F7665726E6F720000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A5F6275726E3A206275726E2066726F6D20746865207A65726F PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x2061646472657373 PUSH1 0xC0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0xFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x5EF JUMPI PUSH1 0x0 DUP1 REVERT INVALID PUSH5 0x434C4D383A GASPRICE 0x5F PUSH14 0x6F7665566F7465733A20766F7465 KECCAK256 PUSH2 0x6D6F PUSH22 0x6E74206F766572666C6F777364434C4D383A3A5F7472 PUSH2 0x6E73 PUSH7 0x6572546F6B656E PUSH20 0x3A207472616E7366657220616D6F756E74206578 PUSH4 0x65656473 KECCAK256 PUSH3 0x616C61 PUSH15 0x636564434C4D383A3A5F7472616E73 PUSH7 0x6572546F6B656E PUSH20 0x3A207472616E7366657220616D6F756E74206F76 PUSH6 0x72666C6F7773 PUSH5 0x434C4D383A GASPRICE PUSH21 0x72616E736665723A20616D6F756E74206578636565 PUSH5 0x7320393620 PUSH3 0x697473 PUSH5 0x434C4D383A GASPRICE PUSH21 0x72616E7366657246726F6D3A207472616E73666572 KECCAK256 PUSH2 0x6D6F PUSH22 0x6E742065786365656473207370656E64657220616C6C PUSH16 0x77616E636564434C4D383A3A61707072 PUSH16 0x76653A20616D6F756E74206578636565 PUSH5 0x7320393620 PUSH3 0x697473 PUSH5 0x434C4D383A GASPRICE 0x5F PUSH14 0x6F7665566F7465733A20766F7465 KECCAK256 PUSH2 0x6D6F PUSH22 0x6E7420756E646572666C6F777364434C4D383A3A5F77 PUSH19 0x697465436865636B706F696E743A20626C6F63 PUSH12 0x206E756D6265722065786365 PUSH6 0x647320333220 PUSH3 0x697473 LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xED 0xEE KECCAK256 DUP5 STATICCALL DUP1 PUSH24 0x46006B92BB48109B74D61BB21D709F2A72DC5E627327355D STOP PUSH5 0x736F6C6343 STOP SMOD STOP STOP CALLER ", - "sourceMap": "1755:14013:0:-:0;;;2156:11;2130:37;;2373:36;;;-1:-1:-1;;;;;;2373:36:0;;;4462:175;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4528:11;;;-1:-1:-1;;;;;4501:17:0;;;;;:8;:17;;;;;;:39;;-1:-1:-1;;;;;;4501:39:0;-1:-1:-1;;;;;4501:39:0;;;;;;;;;;-1:-1:-1;4550:23:0;;-1:-1:-1;;;;;;4550:23:0;;;;;4618:11;;4588:42;;4501:17;;4528:11;4588:42;;;;4618:11;4588:42;:::i;:::-;;;;;;;;4462:175;1755:14013;;146:263:-1;;261:2;249:9;240:7;236:23;232:32;229:2;;;-1:-1;;267:12;229:2;83:13;;-1:-1;;;;;925:54;;1129:35;;1119:2;;-1:-1;;1168:12;1119:2;319:74;223:186;-1:-1;;;223:186::o;536:222::-;487:37;;;663:2;648:18;;634:124::o;:::-;1755:14013:0;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "608060405234801561001057600080fd5b50600436106101735760003560e01c8063782d6fe1116100de578063b72218e311610097578063c4e41b2211610071578063c4e41b2214610315578063dd62ed3e1461031d578063e7a324dc14610330578063f1127ed81461033857610173565b8063b72218e3146102e7578063c3cda520146102ef578063c42cf5351461030257610173565b8063782d6fe11461027e5780637ecebe001461029e57806395d89b41146102b1578063a9059cbb146102b9578063ae80d9de146102cc578063b4b5ea57146102d457610173565b8063313ce56711610130578063313ce567146101fb578063587cde1e146102105780635c19a95c146102235780636fcfff451461023857806370a082311461025857806372d3ee9e1461026b57610173565b806306fdde0314610178578063095ea7b3146101965780630c340a24146101b657806318160ddd146101cb57806320606b70146101e057806323b872dd146101e8575b600080fd5b610180610359565b60405161018d9190611651565b60405180910390f35b6101a96101a43660046114a9565b610386565b60405161018d91906115d7565b6101be610445565b60405161018d91906115c3565b6101d3610454565b60405161018d91906115e2565b6101d361045a565b6101a96101f6366004611469565b61047e565b6102036105c5565b60405161018d9190611a09565b6101be61021e36600461141a565b6105ca565b61023661023136600461141a565b6105e5565b005b61024b61024636600461141a565b6105f2565b60405161018d91906119d9565b6101d361026636600461141a565b61060a565b610236610279366004611571565b61062e565b61029161028c3660046114a9565b61074e565b60405161018d9190611a17565b6101d36102ac36600461141a565b61095c565b61018061096e565b6101a96102c73660046114a9565b61098f565b6101be6109cb565b6102916102e236600461141a565b6109da565b6101be610a4b565b6102366102fd3660046114d3565b610a5a565b61023661031036600461141a565b610c69565b6101d3610cde565b6101d361032b366004611435565b610ce4565b6101d3610d18565b61034b610346366004611532565b610d3c565b60405161018d9291906119ea565b6040518060400160405280601181526020017021b634b6b0ba32902220a7902a37b5b2b760791b81525081565b60008060001983141561039c57506000196103c1565b6103be83604051806060016040528060268152602001611b5060269139610d71565b90505b3360008181526003602090815260408083206001600160a01b03891680855292529182902080546001600160601b0319166001600160601b03861617905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610431908590611a17565b60405180910390a360019150505b92915050565b6002546001600160a01b031681565b60005481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6001600160a01b03831660009081526003602090815260408083203380855290835281842054825160608101909352602680845291936001600160601b039091169285926104d69288929190611b5090830139610d71565b9050866001600160a01b0316836001600160a01b03161415801561050357506001600160601b0382811614155b156105ad57600061052d83836040518060600160405280603e8152602001611b12603e9139610da0565b6001600160a01b038981166000818152600360209081526040808320948a16808452949091529081902080546001600160601b0319166001600160601b0386161790555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906105a3908590611a17565b60405180910390a3505b6105b8878783610ddf565b5060019695505050505050565b601281565b6005602052600090815260409020546001600160a01b031681565b6105ef3382610fb8565b50565b60076020526000908152604090205463ffffffff1681565b6001600160a01b03166000908152600460205260409020546001600160601b031690565b6001600160a01b03821661065d5760405162461bcd60e51b815260040161065490611991565b60405180910390fd5b6002546001600160a01b031633146106875760405162461bcd60e51b81526004016106549061195a565b6001600160a01b0382166000908152600460205260409020546001600160601b039081169082168110156106cd5760405162461bcd60e51b8152600401610654906116a4565b6001600160a01b03831660008181526004602052604080822080546001600160601b0319168686036001600160601b0390811691909117909155825490861690038255519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610741908690611a17565b60405180910390a3505050565b600043821061076f5760405162461bcd60e51b81526004016106549061182b565b6001600160a01b03831660009081526007602052604090205463ffffffff168061079d57600091505061043f565b6001600160a01b038416600090815260066020908152604080832063ffffffff600019860181168552925290912054168310610819576001600160a01b03841660009081526006602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b0316905061043f565b6001600160a01b038416600090815260066020908152604080832083805290915290205463ffffffff1683101561085457600091505061043f565b600060001982015b8163ffffffff168163ffffffff16111561091757600282820363ffffffff160481036108866113ec565b506001600160a01b038716600090815260066020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b031691810191909152908714156108f25760200151945061043f9350505050565b805163ffffffff1687111561090957819350610910565b6001820392505b505061085c565b506001600160a01b038516600090815260066020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b60086020526000908152604090205481565b604051806040016040528060058152602001640c886989a760db1b81525081565b6000806109b483604051806060016040528060278152602001611aeb60279139610d71565b90506109c1338583610ddf565b5060019392505050565b6001546001600160a01b031690565b6001600160a01b03811660009081526007602052604081205463ffffffff1680610a05576000610a44565b6001600160a01b0383166000908152600660209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03165b9392505050565b6001546001600160a01b031681565b60408051808201909152601181527021b634b6b0ba32902220a7902a37b5b2b760791b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f7c75c83381dcf4c0e5ba36df2cc653b50dcd8f69236256411bc04c9f677ed4c0610acf611042565b30604051602001610ae3949392919061160f565b60405160208183030381529060405280519060200120905060007fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf888888604051602001610b3494939291906115eb565b60405160208183030381529060405280519060200120905060008282604051602001610b619291906115a8565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610b9e9493929190611633565b6020604051602081039080840390855afa158015610bc0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bf35760405162461bcd60e51b815260040161065490611787565b6001600160a01b03811660009081526008602052604090208054600181019091558914610c325760405162461bcd60e51b815260040161065490611873565b87421115610c525760405162461bcd60e51b815260040161065490611913565b610c5c818b610fb8565b505050505b505050505050565b6001546001600160a01b03163314610c935760405162461bcd60e51b81526004016106549061173d565b6002546001600160a01b031615610cbc5760405162461bcd60e51b8152600401610654906116ed565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60005490565b6001600160a01b0391821660009081526003602090815260408083209390941682529190915220546001600160601b031690565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600660209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b600081600160601b8410610d985760405162461bcd60e51b81526004016106549190611651565b509192915050565b6000836001600160601b0316836001600160601b031611158290610dd75760405162461bcd60e51b81526004016106549190611651565b505050900390565b6001600160a01b038316610e055760405162461bcd60e51b8152600401610654906118b6565b6001600160a01b038216610e2b5760405162461bcd60e51b8152600401610654906117ce565b6001600160a01b038316600090815260046020908152604091829020548251606081019093526037808452610e76936001600160601b039092169285929190611a8390830139610da0565b6001600160a01b03848116600090815260046020908152604080832080546001600160601b0319166001600160601b03968716179055928616825290829020548251606081019093526031808452610ede9491909116928592909190611aba90830139611046565b6001600160a01b038381166000818152600460205260409081902080546001600160601b0319166001600160601b0395909516949094179093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610f4b908590611a17565b60405180910390a36001600160a01b0382811660009081526005602052604090205416610f8157610f7c8283610fb8565b610fb3565b6001600160a01b03808416600090815260056020526040808220548584168352912054610fb392918216911683611082565b505050565b6001600160a01b03808316600081815260056020818152604080842080546004845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461103c828483611082565b50505050565b4690565b6000838301826001600160601b0380871690831610156110795760405162461bcd60e51b81526004016106549190611651565b50949350505050565b816001600160a01b0316836001600160a01b0316141580156110ad57506000816001600160601b0316115b15610fb3576001600160a01b03831615611165576001600160a01b03831660009081526007602052604081205463ffffffff1690816110ed57600061112c565b6001600160a01b0385166000908152600660209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006111538285604051806060016040528060298152602001611b7660299139610da0565b905061116186848484611210565b5050505b6001600160a01b03821615610fb3576001600160a01b03821660009081526007602052604081205463ffffffff1690816111a05760006111df565b6001600160a01b0384166000908152600660209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006112068285604051806060016040528060288152602001611a5b60289139611046565b9050610c61858484845b600061123443604051806060016040528060358152602001611b9f603591396113c5565b905060008463ffffffff1611801561127d57506001600160a01b038516600090815260066020908152604080832063ffffffff6000198901811685529252909120548282169116145b156112dc576001600160a01b0385166000908152600660209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b0385160217905561137b565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600683528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600790935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72484846040516113b6929190611a2b565b60405180910390a25050505050565b600081600160201b8410610d985760405162461bcd60e51b81526004016106549190611651565b604080518082019091526000808252602082015290565b80356001600160a01b038116811461043f57600080fd5b60006020828403121561142b578081fd5b610a448383611403565b60008060408385031215611447578081fd5b6114518484611403565b91506114608460208501611403565b90509250929050565b60008060006060848603121561147d578081fd5b833561148881611a45565b9250602084013561149881611a45565b929592945050506040919091013590565b600080604083850312156114bb578182fd5b6114c58484611403565b946020939093013593505050565b60008060008060008060c087890312156114eb578182fd5b6114f58888611403565b95506020870135945060408701359350606087013560ff81168114611518578283fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215611544578182fd5b61154e8484611403565b9150602083013563ffffffff81168114611566578182fd5b809150509250929050565b60008060408385031215611583578182fd5b61158d8484611403565b915060208301356001600160601b0381168114611566578182fd5b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b901515815260200190565b90815260200190565b9384526001600160a01b039290921660208401526040830152606082015260800190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b8181101561167d57858101830151858201604001528201611661565b8181111561168e5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526029908201527f64434c4d383a3a5f6275726e3a206275726e20616d6f756e7420657863656564604082015268732062616c616e636560b81b606082015260800190565b60208082526030908201527f64434c4d3a3a736574476f7665726e6f723a20676f7665726e6f722063616e2060408201526f6f6e6c7920626520736574206f6e636560801b606082015260800190565b6020808252602a908201527f64434c4d383a3a736574476f7665726e6f723a206d75737420626520696e697460408201526934b0b6103437b63232b960b11b606082015260800190565b60208082526027908201527f64434c4d383a3a64656c656761746542795369673a20696e76616c6964207369604082015266676e617475726560c81b606082015260800190565b6020808252603b908201527f64434c4d383a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460408201527f72616e7366657220746f20746865207a65726f20616464726573730000000000606082015260800190565b60208082526028908201527f64434c4d383a3a6765745072696f72566f7465733a206e6f74207965742064656040820152671d195c9b5a5b995960c21b606082015260800190565b60208082526023908201527f64434c4d383a3a64656c656761746542795369673a20696e76616c6964206e6f6040820152626e636560e81b606082015260800190565b6020808252603d908201527f64434c4d383a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460408201527f72616e736665722066726f6d20746865207a65726f2061646472657373000000606082015260800190565b60208082526027908201527f64434c4d383a3a64656c656761746542795369673a207369676e617475726520604082015266195e1c1a5c995960ca1b606082015260800190565b6020808252601e908201527f64434c4d383a3a5f6275726e3a206d75737420626520676f7665726e6f720000604082015260600190565b60208082526028908201527f64434c4d383a3a5f6275726e3a206275726e2066726f6d20746865207a65726f604082015267206164647265737360c01b606082015260800190565b63ffffffff91909116815260200190565b63ffffffff9290921682526001600160601b0316602082015260400190565b60ff91909116815260200190565b6001600160601b0391909116815260200190565b6001600160601b0392831681529116602082015260400190565b6001600160a01b03811681146105ef57600080fdfe64434c4d383a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f777364434c4d383a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e636564434c4d383a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f777364434c4d383a3a7472616e736665723a20616d6f756e742065786365656473203936206269747364434c4d383a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e636564434c4d383a3a617070726f76653a20616d6f756e742065786365656473203936206269747364434c4d383a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f777364434c4d383a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473a2646970667358221220edee2084fa807746006b92bb48109b74d61bb21d709f2a72dc5e627327355d0064736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x173 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x782D6FE1 GT PUSH2 0xDE JUMPI DUP1 PUSH4 0xB72218E3 GT PUSH2 0x97 JUMPI DUP1 PUSH4 0xC4E41B22 GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xC4E41B22 EQ PUSH2 0x315 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x31D JUMPI DUP1 PUSH4 0xE7A324DC EQ PUSH2 0x330 JUMPI DUP1 PUSH4 0xF1127ED8 EQ PUSH2 0x338 JUMPI PUSH2 0x173 JUMP JUMPDEST DUP1 PUSH4 0xB72218E3 EQ PUSH2 0x2E7 JUMPI DUP1 PUSH4 0xC3CDA520 EQ PUSH2 0x2EF JUMPI DUP1 PUSH4 0xC42CF535 EQ PUSH2 0x302 JUMPI PUSH2 0x173 JUMP JUMPDEST DUP1 PUSH4 0x782D6FE1 EQ PUSH2 0x27E JUMPI DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x29E JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x2B1 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x2B9 JUMPI DUP1 PUSH4 0xAE80D9DE EQ PUSH2 0x2CC JUMPI DUP1 PUSH4 0xB4B5EA57 EQ PUSH2 0x2D4 JUMPI PUSH2 0x173 JUMP JUMPDEST DUP1 PUSH4 0x313CE567 GT PUSH2 0x130 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1FB JUMPI DUP1 PUSH4 0x587CDE1E EQ PUSH2 0x210 JUMPI DUP1 PUSH4 0x5C19A95C EQ PUSH2 0x223 JUMPI DUP1 PUSH4 0x6FCFFF45 EQ PUSH2 0x238 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x258 JUMPI DUP1 PUSH4 0x72D3EE9E EQ PUSH2 0x26B JUMPI PUSH2 0x173 JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x178 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x196 JUMPI DUP1 PUSH4 0xC340A24 EQ PUSH2 0x1B6 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x1CB JUMPI DUP1 PUSH4 0x20606B70 EQ PUSH2 0x1E0 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1E8 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x180 PUSH2 0x359 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x1651 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1A9 PUSH2 0x1A4 CALLDATASIZE PUSH1 0x4 PUSH2 0x14A9 JUMP JUMPDEST PUSH2 0x386 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x15D7 JUMP JUMPDEST PUSH2 0x1BE PUSH2 0x445 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x15C3 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0x454 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x15E2 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0x45A JUMP JUMPDEST PUSH2 0x1A9 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0x1469 JUMP JUMPDEST PUSH2 0x47E JUMP JUMPDEST PUSH2 0x203 PUSH2 0x5C5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x1A09 JUMP JUMPDEST PUSH2 0x1BE PUSH2 0x21E CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x5CA JUMP JUMPDEST PUSH2 0x236 PUSH2 0x231 CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x5E5 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x24B PUSH2 0x246 CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x5F2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x19D9 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0x266 CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x60A JUMP JUMPDEST PUSH2 0x236 PUSH2 0x279 CALLDATASIZE PUSH1 0x4 PUSH2 0x1571 JUMP JUMPDEST PUSH2 0x62E JUMP JUMPDEST PUSH2 0x291 PUSH2 0x28C CALLDATASIZE PUSH1 0x4 PUSH2 0x14A9 JUMP JUMPDEST PUSH2 0x74E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP2 SWAP1 PUSH2 0x1A17 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0x2AC CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x95C JUMP JUMPDEST PUSH2 0x180 PUSH2 0x96E JUMP JUMPDEST PUSH2 0x1A9 PUSH2 0x2C7 CALLDATASIZE PUSH1 0x4 PUSH2 0x14A9 JUMP JUMPDEST PUSH2 0x98F JUMP JUMPDEST PUSH2 0x1BE PUSH2 0x9CB JUMP JUMPDEST PUSH2 0x291 PUSH2 0x2E2 CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0x9DA JUMP JUMPDEST PUSH2 0x1BE PUSH2 0xA4B JUMP JUMPDEST PUSH2 0x236 PUSH2 0x2FD CALLDATASIZE PUSH1 0x4 PUSH2 0x14D3 JUMP JUMPDEST PUSH2 0xA5A JUMP JUMPDEST PUSH2 0x236 PUSH2 0x310 CALLDATASIZE PUSH1 0x4 PUSH2 0x141A JUMP JUMPDEST PUSH2 0xC69 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0xCDE JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0x32B CALLDATASIZE PUSH1 0x4 PUSH2 0x1435 JUMP JUMPDEST PUSH2 0xCE4 JUMP JUMPDEST PUSH2 0x1D3 PUSH2 0xD18 JUMP JUMPDEST PUSH2 0x34B PUSH2 0x346 CALLDATASIZE PUSH1 0x4 PUSH2 0x1532 JUMP JUMPDEST PUSH2 0xD3C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x18D SWAP3 SWAP2 SWAP1 PUSH2 0x19EA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x11 DUP2 MSTORE PUSH1 0x20 ADD PUSH17 0x21B634B6B0BA32902220A7902A37B5B2B7 PUSH1 0x79 SHL DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 NOT DUP4 EQ ISZERO PUSH2 0x39C JUMPI POP PUSH1 0x0 NOT PUSH2 0x3C1 JUMP JUMPDEST PUSH2 0x3BE DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x26 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1B50 PUSH1 0x26 SWAP2 CODECOPY PUSH2 0xD71 JUMP JUMPDEST SWAP1 POP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP2 DUP3 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP7 AND OR SWAP1 SSTORE SWAP1 MLOAD SWAP1 SWAP2 SWAP1 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0x431 SWAP1 DUP6 SWAP1 PUSH2 0x1A17 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH32 0x8CAD95687BA82C2CE50E74F7B754645E5117C3A5BEC8151C0726D5857980A866 DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE DUP2 DUP5 KECCAK256 SLOAD DUP3 MLOAD PUSH1 0x60 DUP2 ADD SWAP1 SWAP4 MSTORE PUSH1 0x26 DUP1 DUP5 MSTORE SWAP2 SWAP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 SWAP2 AND SWAP3 DUP6 SWAP3 PUSH2 0x4D6 SWAP3 DUP9 SWAP3 SWAP2 SWAP1 PUSH2 0x1B50 SWAP1 DUP4 ADD CODECOPY PUSH2 0xD71 JUMP JUMPDEST SWAP1 POP DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x503 JUMPI POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP3 DUP2 AND EQ ISZERO JUMPDEST ISZERO PUSH2 0x5AD JUMPI PUSH1 0x0 PUSH2 0x52D DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x3E DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1B12 PUSH1 0x3E SWAP2 CODECOPY PUSH2 0xDA0 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP11 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP7 AND OR SWAP1 SSTORE MLOAD SWAP3 SWAP4 POP SWAP1 SWAP2 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0x5A3 SWAP1 DUP6 SWAP1 PUSH2 0x1A17 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP JUMPDEST PUSH2 0x5B8 DUP8 DUP8 DUP4 PUSH2 0xDDF JUMP JUMPDEST POP PUSH1 0x1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x12 DUP2 JUMP JUMPDEST PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH2 0x5EF CALLER DUP3 PUSH2 0xFB8 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x65D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x1991 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x687 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x195A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 DUP2 AND SWAP1 DUP3 AND DUP2 LT ISZERO PUSH2 0x6CD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x16A4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND DUP7 DUP7 SUB PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 DUP2 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SWAP2 SSTORE DUP3 SLOAD SWAP1 DUP7 AND SWAP1 SUB DUP3 SSTORE MLOAD SWAP1 SWAP2 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x741 SWAP1 DUP7 SWAP1 PUSH2 0x1A17 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 NUMBER DUP3 LT PUSH2 0x76F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x182B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND DUP1 PUSH2 0x79D JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x43F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH4 0xFFFFFFFF PUSH1 0x0 NOT DUP7 ADD DUP2 AND DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD AND DUP4 LT PUSH2 0x819 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x0 NOT SWAP5 SWAP1 SWAP5 ADD PUSH4 0xFFFFFFFF AND DUP4 MSTORE SWAP3 SWAP1 MSTORE KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x20 SHL SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP1 POP PUSH2 0x43F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP4 DUP1 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND DUP4 LT ISZERO PUSH2 0x854 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x43F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 NOT DUP3 ADD JUMPDEST DUP2 PUSH4 0xFFFFFFFF AND DUP2 PUSH4 0xFFFFFFFF AND GT ISZERO PUSH2 0x917 JUMPI PUSH1 0x2 DUP3 DUP3 SUB PUSH4 0xFFFFFFFF AND DIV DUP2 SUB PUSH2 0x886 PUSH2 0x13EC JUMP JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH4 0xFFFFFFFF DUP6 DUP2 AND DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 DUP2 MLOAD DUP1 DUP4 ADD SWAP1 SWAP3 MSTORE SLOAD SWAP3 DUP4 AND DUP1 DUP3 MSTORE PUSH1 0x1 PUSH1 0x20 SHL SWAP1 SWAP4 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 DUP8 EQ ISZERO PUSH2 0x8F2 JUMPI PUSH1 0x20 ADD MLOAD SWAP5 POP PUSH2 0x43F SWAP4 POP POP POP POP JUMP JUMPDEST DUP1 MLOAD PUSH4 0xFFFFFFFF AND DUP8 GT ISZERO PUSH2 0x909 JUMPI DUP2 SWAP4 POP PUSH2 0x910 JUMP JUMPDEST PUSH1 0x1 DUP3 SUB SWAP3 POP JUMPDEST POP POP PUSH2 0x85C JUMP JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH4 0xFFFFFFFF SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB PUSH1 0x1 PUSH1 0x20 SHL SWAP1 SWAP2 DIV AND SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH5 0xC886989A7 PUSH1 0xDB SHL DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x9B4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1AEB PUSH1 0x27 SWAP2 CODECOPY PUSH2 0xD71 JUMP JUMPDEST SWAP1 POP PUSH2 0x9C1 CALLER DUP6 DUP4 PUSH2 0xDDF JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND DUP1 PUSH2 0xA05 JUMPI PUSH1 0x0 PUSH2 0xA44 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x0 NOT DUP6 ADD PUSH4 0xFFFFFFFF AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x20 SHL SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH17 0x21B634B6B0BA32902220A7902A37B5B2B7 PUSH1 0x79 SHL PUSH1 0x20 SWAP1 SWAP2 ADD MSTORE PUSH1 0x0 PUSH32 0x8CAD95687BA82C2CE50E74F7B754645E5117C3A5BEC8151C0726D5857980A866 PUSH32 0x7C75C83381DCF4C0E5BA36DF2CC653B50DCD8F69236256411BC04C9F677ED4C0 PUSH2 0xACF PUSH2 0x1042 JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xAE3 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x160F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH32 0xE48329057BFD03D55E49B547132E39CFFD9C1820AD7B9D4C5307691425D15ADF DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xB34 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x15EB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xB61 SWAP3 SWAP2 SWAP1 PUSH2 0x15A8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0xB9E SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1633 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xBC0 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0xBF3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x1787 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP2 ADD SWAP1 SWAP2 SSTORE DUP10 EQ PUSH2 0xC32 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x1873 JUMP JUMPDEST DUP8 TIMESTAMP GT ISZERO PUSH2 0xC52 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x1913 JUMP JUMPDEST PUSH2 0xC5C DUP2 DUP12 PUSH2 0xFB8 JUMP JUMPDEST POP POP POP POP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xC93 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x173D JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO PUSH2 0xCBC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x16ED JUMP JUMPDEST PUSH1 0x2 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH32 0xE48329057BFD03D55E49B547132E39CFFD9C1820AD7B9D4C5307691425D15ADF DUP2 JUMP JUMPDEST PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP1 SWAP2 MSTORE SWAP1 DUP3 MSTORE SWAP1 KECCAK256 SLOAD PUSH4 0xFFFFFFFF DUP2 AND SWAP1 PUSH1 0x1 PUSH1 0x20 SHL SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND DUP3 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0x60 SHL DUP5 LT PUSH2 0xD98 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP2 SWAP1 PUSH2 0x1651 JUMP JUMPDEST POP SWAP2 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND GT ISZERO DUP3 SWAP1 PUSH2 0xDD7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP2 SWAP1 PUSH2 0x1651 JUMP JUMPDEST POP POP POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0xE05 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x18B6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0xE2B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP1 PUSH2 0x17CE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SLOAD DUP3 MLOAD PUSH1 0x60 DUP2 ADD SWAP1 SWAP4 MSTORE PUSH1 0x37 DUP1 DUP5 MSTORE PUSH2 0xE76 SWAP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 SWAP3 AND SWAP3 DUP6 SWAP3 SWAP2 SWAP1 PUSH2 0x1A83 SWAP1 DUP4 ADD CODECOPY PUSH2 0xDA0 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP7 DUP8 AND OR SWAP1 SSTORE SWAP3 DUP7 AND DUP3 MSTORE SWAP1 DUP3 SWAP1 KECCAK256 SLOAD DUP3 MLOAD PUSH1 0x60 DUP2 ADD SWAP1 SWAP4 MSTORE PUSH1 0x31 DUP1 DUP5 MSTORE PUSH2 0xEDE SWAP5 SWAP2 SWAP1 SWAP2 AND SWAP3 DUP6 SWAP3 SWAP1 SWAP2 SWAP1 PUSH2 0x1ABA SWAP1 DUP4 ADD CODECOPY PUSH2 0x1046 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP6 SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 OR SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 DUP6 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0xF4B SWAP1 DUP6 SWAP1 PUSH2 0x1A17 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD AND PUSH2 0xF81 JUMPI PUSH2 0xF7C DUP3 DUP4 PUSH2 0xFB8 JUMP JUMPDEST PUSH2 0xFB3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SLOAD DUP6 DUP5 AND DUP4 MSTORE SWAP2 KECCAK256 SLOAD PUSH2 0xFB3 SWAP3 SWAP2 DUP3 AND SWAP2 AND DUP4 PUSH2 0x1082 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 DUP1 SLOAD PUSH1 0x4 DUP5 MSTORE DUP3 DUP7 KECCAK256 SLOAD SWAP5 SWAP1 SWAP4 MSTORE DUP8 DUP8 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP5 AND DUP2 OR SWAP1 SWAP2 SSTORE SWAP1 MLOAD SWAP2 SWAP1 SWAP6 AND SWAP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP1 SWAP3 AND SWAP4 SWAP2 SWAP3 DUP6 SWAP3 SWAP2 PUSH32 0x3134E8A2E6D97E929A7E54011EA5485D7D196DD5F0BA4D4EF95803E8E3FC257F SWAP2 SWAP1 LOG4 PUSH2 0x103C DUP3 DUP5 DUP4 PUSH2 0x1082 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP4 ADD DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP1 DUP8 AND SWAP1 DUP4 AND LT ISZERO PUSH2 0x1079 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP2 SWAP1 PUSH2 0x1651 JUMP JUMPDEST POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x10AD JUMPI POP PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND GT JUMPDEST ISZERO PUSH2 0xFB3 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND ISZERO PUSH2 0x1165 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND SWAP1 DUP2 PUSH2 0x10ED JUMPI PUSH1 0x0 PUSH2 0x112C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x0 NOT DUP7 ADD PUSH4 0xFFFFFFFF AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x20 SHL SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1153 DUP3 DUP6 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1B76 PUSH1 0x29 SWAP2 CODECOPY PUSH2 0xDA0 JUMP JUMPDEST SWAP1 POP PUSH2 0x1161 DUP7 DUP5 DUP5 DUP5 PUSH2 0x1210 JUMP JUMPDEST POP POP POP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO PUSH2 0xFB3 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH4 0xFFFFFFFF AND SWAP1 DUP2 PUSH2 0x11A0 JUMPI PUSH1 0x0 PUSH2 0x11DF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x0 NOT DUP7 ADD PUSH4 0xFFFFFFFF AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0x1 PUSH1 0x20 SHL SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1206 DUP3 DUP6 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1A5B PUSH1 0x28 SWAP2 CODECOPY PUSH2 0x1046 JUMP JUMPDEST SWAP1 POP PUSH2 0xC61 DUP6 DUP5 DUP5 DUP5 JUMPDEST PUSH1 0x0 PUSH2 0x1234 NUMBER PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x35 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1B9F PUSH1 0x35 SWAP2 CODECOPY PUSH2 0x13C5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP5 PUSH4 0xFFFFFFFF AND GT DUP1 ISZERO PUSH2 0x127D JUMPI POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH4 0xFFFFFFFF PUSH1 0x0 NOT DUP10 ADD DUP2 AND DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD DUP3 DUP3 AND SWAP2 AND EQ JUMPDEST ISZERO PUSH2 0x12DC JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x6 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x0 NOT DUP9 ADD PUSH4 0xFFFFFFFF AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 DUP1 SLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFF00000000 NOT AND PUSH1 0x1 PUSH1 0x20 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP6 AND MUL OR SWAP1 SSTORE PUSH2 0x137B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH4 0xFFFFFFFF DUP1 DUP5 AND DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP1 DUP7 AND PUSH1 0x20 DUP1 DUP6 ADD SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x6 DUP4 MSTORE DUP8 DUP2 KECCAK256 DUP13 DUP8 AND DUP3 MSTORE DUP4 MSTORE DUP8 DUP2 KECCAK256 SWAP7 MLOAD DUP8 SLOAD SWAP5 MLOAD SWAP1 SWAP6 AND PUSH1 0x1 PUSH1 0x20 SHL MUL PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFF00000000 NOT SWAP6 DUP8 AND PUSH4 0xFFFFFFFF NOT SWAP6 DUP7 AND OR SWAP6 SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 OR SWAP1 SWAP6 SSTORE SWAP4 DUP3 MSTORE PUSH1 0x7 SWAP1 SWAP4 MSTORE SWAP3 SWAP1 SWAP3 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP9 ADD SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP2 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMPDEST DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0xDEC2BACDD2F05B59DE34DA9B523DFF8BE42E5E38E818C82FDB0BAE774387A724 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH2 0x13B6 SWAP3 SWAP2 SWAP1 PUSH2 0x1A2B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0x20 SHL DUP5 LT PUSH2 0xD98 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x654 SWAP2 SWAP1 PUSH2 0x1651 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x43F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x142B JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0xA44 DUP4 DUP4 PUSH2 0x1403 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1447 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x1451 DUP5 DUP5 PUSH2 0x1403 JUMP JUMPDEST SWAP2 POP PUSH2 0x1460 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x1403 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x147D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x1488 DUP2 PUSH2 0x1A45 JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x1498 DUP2 PUSH2 0x1A45 JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x14BB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x14C5 DUP5 DUP5 PUSH2 0x1403 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x14EB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x14F5 DUP9 DUP9 PUSH2 0x1403 JUMP JUMPDEST SWAP6 POP PUSH1 0x20 DUP8 ADD CALLDATALOAD SWAP5 POP PUSH1 0x40 DUP8 ADD CALLDATALOAD SWAP4 POP PUSH1 0x60 DUP8 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x1518 JUMPI DUP3 DUP4 REVERT JUMPDEST SWAP6 SWAP9 SWAP5 SWAP8 POP SWAP3 SWAP6 PUSH1 0x80 DUP2 ADD CALLDATALOAD SWAP5 PUSH1 0xA0 SWAP1 SWAP2 ADD CALLDATALOAD SWAP4 POP SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1544 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x154E DUP5 DUP5 PUSH2 0x1403 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x1566 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1583 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x158D DUP5 DUP5 PUSH2 0x1403 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x1566 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x167D JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x1661 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x168E JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A5F6275726E3A206275726E20616D6F756E7420657863656564 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x732062616C616E6365 PUSH1 0xB8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D3A3A736574476F7665726E6F723A20676F7665726E6F722063616E20 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x6F6E6C7920626520736574206F6E6365 PUSH1 0x80 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2A SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A736574476F7665726E6F723A206D75737420626520696E6974 PUSH1 0x40 DUP3 ADD MSTORE PUSH10 0x34B0B6103437B63232B9 PUSH1 0xB1 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x27 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A64656C656761746542795369673A20696E76616C6964207369 PUSH1 0x40 DUP3 ADD MSTORE PUSH7 0x676E6174757265 PUSH1 0xC8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3B SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A5F7472616E73666572546F6B656E733A2063616E6E6F742074 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x72616E7366657220746F20746865207A65726F20616464726573730000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A6765745072696F72566F7465733A206E6F7420796574206465 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x1D195C9B5A5B9959 PUSH1 0xC2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x23 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A64656C656761746542795369673A20696E76616C6964206E6F PUSH1 0x40 DUP3 ADD MSTORE PUSH3 0x6E6365 PUSH1 0xE8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3D SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A5F7472616E73666572546F6B656E733A2063616E6E6F742074 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x72616E736665722066726F6D20746865207A65726F2061646472657373000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x27 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A64656C656761746542795369673A207369676E617475726520 PUSH1 0x40 DUP3 ADD MSTORE PUSH7 0x195E1C1A5C9959 PUSH1 0xCA SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1E SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A5F6275726E3A206D75737420626520676F7665726E6F720000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x64434C4D383A3A5F6275726E3A206275726E2066726F6D20746865207A65726F PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x2061646472657373 PUSH1 0xC0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0xFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x5EF JUMPI PUSH1 0x0 DUP1 REVERT INVALID PUSH5 0x434C4D383A GASPRICE 0x5F PUSH14 0x6F7665566F7465733A20766F7465 KECCAK256 PUSH2 0x6D6F PUSH22 0x6E74206F766572666C6F777364434C4D383A3A5F7472 PUSH2 0x6E73 PUSH7 0x6572546F6B656E PUSH20 0x3A207472616E7366657220616D6F756E74206578 PUSH4 0x65656473 KECCAK256 PUSH3 0x616C61 PUSH15 0x636564434C4D383A3A5F7472616E73 PUSH7 0x6572546F6B656E PUSH20 0x3A207472616E7366657220616D6F756E74206F76 PUSH6 0x72666C6F7773 PUSH5 0x434C4D383A GASPRICE PUSH21 0x72616E736665723A20616D6F756E74206578636565 PUSH5 0x7320393620 PUSH3 0x697473 PUSH5 0x434C4D383A GASPRICE PUSH21 0x72616E7366657246726F6D3A207472616E73666572 KECCAK256 PUSH2 0x6D6F PUSH22 0x6E742065786365656473207370656E64657220616C6C PUSH16 0x77616E636564434C4D383A3A61707072 PUSH16 0x76653A20616D6F756E74206578636565 PUSH5 0x7320393620 PUSH3 0x697473 PUSH5 0x434C4D383A GASPRICE 0x5F PUSH14 0x6F7665566F7465733A20766F7465 KECCAK256 PUSH2 0x6D6F PUSH22 0x6E7420756E646572666C6F777364434C4D383A3A5F77 PUSH19 0x697465436865636B706F696E743A20626C6F63 PUSH12 0x206E756D6265722065786365 PUSH6 0x647320333220 PUSH3 0x697473 LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xED 0xEE KECCAK256 DUP5 STATICCALL DUP1 PUSH24 0x46006B92BB48109B74D61BB21D709F2A72DC5E627327355D STOP PUSH5 0x736F6C6343 STOP SMOD STOP STOP CALLER ", - "sourceMap": "1755:14013:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1828:49;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5535:408;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;2373:36::-;;;:::i;:::-;;;;;;;:::i;2130:37::-;;;:::i;:::-;;;;;;;:::i;3244:122::-;;;:::i;7037:660::-;;;;;;:::i;:::-;;:::i;2034:35::-;;;:::i;:::-;;;;;;;:::i;2709:45::-;;;;;;:::i;:::-;;:::i;7839:100::-;;;;;;:::i;:::-;;:::i;:::-;;3125:49;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;6139:106::-;;;;;;:::i;:::-;;:::i;11185:499::-;;;;;;:::i;:::-;;:::i;9992:1187::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3652:39::-;;;;;;:::i;:::-;;:::i;1935:::-;;;:::i;6501:235::-;;;;;;:::i;:::-;;:::i;15389:97::-;;;:::i;9351:219::-;;;;;;:::i;:::-;;:::i;2243:28::-;;;:::i;8362:795::-;;;;;;:::i;:::-;;:::i;15492:273::-;;;;;;:::i;:::-;;:::i;15293:90::-;;;:::i;4933:134::-;;;;;;:::i;:::-;;:::i;3457:117::-;;;:::i;2989:70::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;1828:49::-;;;;;;;;;;;;;;-1:-1:-1;;;1828:49:0;;;;:::o;5535:408::-;5603:4;5619:13;-1:-1:-1;;5646:9:0;:21;5642:170;;;-1:-1:-1;;;5642:170:0;;;5742:59;5749:9;5742:59;;;;;;;;;;;;;;;;;:6;:59::i;:::-;5733:68;;5642:170;5833:10;5822:22;;;;:10;:22;;;;;;;;-1:-1:-1;;;;;5822:31:0;;;;;;;;;;;:40;;-1:-1:-1;;;;;;5822:40:0;-1:-1:-1;;;;;5822:40:0;;;;;5878:37;;5822:31;;5833:10;5878:37;;;;5822:40;;5878:37;:::i;:::-;;;;;;;;5932:4;5925:11;;;5535:408;;;;;:::o;2373:36::-;;;-1:-1:-1;;;;;2373:36:0;;:::o;2130:37::-;;;;:::o;3244:122::-;3286:80;3244:122;:::o;7037:660::-;-1:-1:-1;;;;;7199:15:0;;7119:4;7199:15;;;:10;:15;;;;;;;;7153:10;7199:24;;;;;;;;;;7249:59;;;;;;;;;;;;7153:10;;-1:-1:-1;;;;;7199:24:0;;;;7119:4;;7249:59;;7256:9;;7249:59;;;;;;;:6;:59::i;:::-;7233:75;;7334:3;-1:-1:-1;;;;;7323:14:0;:7;-1:-1:-1;;;;;7323:14:0;;;:48;;;;-1:-1:-1;;;;;;7341:30:0;;;;;7323:48;7319:307;;;7387:19;7409:97;7415:16;7433:6;7409:97;;;;;;;;;;;;;;;;;:5;:97::i;:::-;-1:-1:-1;;;;;7520:15:0;;;;;;;:10;:15;;;;;;;;:24;;;;;;;;;;;;;;:39;;-1:-1:-1;;;;;;7520:39:0;-1:-1:-1;;;;;7520:39:0;;;;;7579:36;7520:39;;-1:-1:-1;7520:24:0;;7579:36;;;;7520:39;;7579:36;:::i;:::-;;;;;;;;7319:307;;7636:33;7652:3;7657;7662:6;7636:15;:33::i;:::-;-1:-1:-1;7686:4:0;;7037:660;-1:-1:-1;;;;;;7037:660:0:o;2034:35::-;2067:2;2034:35;:::o;2709:45::-;;;;;;;;;;;;-1:-1:-1;;;;;2709:45:0;;:::o;7839:100::-;7900:32;7910:10;7922:9;7900;:32::i;:::-;7839:100;:::o;3125:49::-;;;;;;;;;;;;;;;:::o;6139:106::-;-1:-1:-1;;;;;6221:17:0;6198:4;6221:17;;;:8;:17;;;;;;-1:-1:-1;;;;;6221:17:0;;6139:106::o;11185:499::-;-1:-1:-1;;;;;11259:21:0;;11251:74;;;;-1:-1:-1;;;11251:74:0;;;;;;;:::i;:::-;;;;;;;;;11357:8;;-1:-1:-1;;;;;11357:8:0;11343:10;:22;11335:65;;;;-1:-1:-1;;;11335:65:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;11435:17:0;;11411:21;11435:17;;;:8;:17;;;;;;-1:-1:-1;;;;;11435:17:0;;;;11470:24;;;;;11462:78;;;;-1:-1:-1;;;11462:78:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;11550:17:0;;;;;;:8;:17;;;;;;:43;;-1:-1:-1;;;;;;11550:43:0;11570:23;;;-1:-1:-1;;;;;11550:43:0;;;;;;;;;;11603:21;;;;;;;;;11640:37;11550:17;;;11640:37;;;;11570:23;;11640:37;:::i;:::-;;;;;;;;11185:499;;;:::o;9992:1187::-;10071:6;10111:12;10097:11;:26;10089:79;;;;-1:-1:-1;;;10089:79:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;10201:23:0;;10179:19;10201:23;;;:14;:23;;;;;;;;10238:17;10234:56;;10278:1;10271:8;;;;;10234:56;-1:-1:-1;;;;;10347:20:0;;;;;;:11;:20;;;;;;;;:38;-1:-1:-1;;10368:16:0;;10347:38;;;;;;;;;:48;;:63;-1:-1:-1;10343:145:0;;-1:-1:-1;;;;;10433:20:0;;;;;;:11;:20;;;;;;;;-1:-1:-1;;10454:16:0;;;;10433:38;;;;;;;;:44;-1:-1:-1;;;10433:44:0;;-1:-1:-1;;;;;10433:44:0;;-1:-1:-1;10426:51:0;;10343:145;-1:-1:-1;;;;;10546:20:0;;;;;;:11;:20;;;;;;;;:23;;;;;;;;:33;:23;:33;:47;-1:-1:-1;10542:86:0;;;10616:1;10609:8;;;;;10542:86;10638:12;-1:-1:-1;;10679:16:0;;10705:418;10720:5;10712:13;;:5;:13;;;10705:418;;;10783:1;10766:13;;;10765:19;;;10757:27;;10825:20;;:::i;:::-;-1:-1:-1;;;;;;10848:20:0;;;;;;:11;:20;;;;;;;;:28;;;;;;;;;;;;;10825:51;;;;;;;;;;;;;;;-1:-1:-1;;;10825:51:0;;;-1:-1:-1;;;;;10825:51:0;;;;;;;;;10894:27;;10890:223;;;10948:8;;;;-1:-1:-1;10941:15:0;;-1:-1:-1;;;;10941:15:0;10890:223;10981:12;;:26;;;-1:-1:-1;10977:136:0;;;11035:6;11027:14;;10977:136;;;11097:1;11088:6;:10;11080:18;;10977:136;10705:418;;;;;-1:-1:-1;;;;;;11139:20:0;;;;;;:11;:20;;;;;;;;:27;;;;;;;;;;:33;-1:-1:-1;;;;;;;;11139:33:0;;;;;-1:-1:-1;;9992:1187:0;;;;:::o;3652:39::-;;;;;;;;;;;;;:::o;1935:::-;;;;;;;;;;;;;;-1:-1:-1;;;1935:39:0;;;;:::o;6501:235::-;6566:4;6582:13;6598:60;6605:9;6598:60;;;;;;;;;;;;;;;;;:6;:60::i;:::-;6582:76;;6668:40;6684:10;6696:3;6701:6;6668:15;:40::i;:::-;-1:-1:-1;6725:4:0;;6501:235;-1:-1:-1;;;6501:235:0:o;15389:97::-;15466:13;;-1:-1:-1;;;;;15466:13:0;15389:97;:::o;9351:219::-;-1:-1:-1;;;;;9456:23:0;;9416:6;9456:23;;;:14;:23;;;;;;;;9496:16;:67;;9562:1;9496:67;;;-1:-1:-1;;;;;9515:20:0;;;;;;:11;:20;;;;;;;;-1:-1:-1;;9536:16:0;;9515:38;;;;;;;;;:44;-1:-1:-1;;;9515:44:0;;-1:-1:-1;;;;;9515:44:0;9496:67;9489:74;9351:219;-1:-1:-1;;;9351:219:0:o;2243:28::-;;;-1:-1:-1;;;;;2243:28:0;;:::o;8362:795::-;8557:4;;;;;;;;;;;;-1:-1:-1;;;8557:4:0;;;;;8477:23;3286:80;8541:22;8565:12;:10;:12::i;:::-;8587:4;8513:80;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8503:91;;;;;;8477:117;;8604:18;3503:71;8667:9;8678:5;8685:6;8635:57;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8625:68;;;;;;8604:89;;8703:14;8759:15;8776:10;8730:57;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8720:68;;;;;;8703:85;;8798:17;8818:26;8828:6;8836:1;8839;8842;8818:26;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8818:26:0;;-1:-1:-1;;8818:26:0;;;-1:-1:-1;;;;;;;8862:23:0;;8854:75;;;;-1:-1:-1;;;8854:75:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;8956:17:0;;;;;;:6;:17;;;;;:19;;;;;;;;8947:28;;8939:76;;;;-1:-1:-1;;;8939:76:0;;;;;;;:::i;:::-;9052:6;9033:15;:25;;9025:77;;;;-1:-1:-1;;;9025:77:0;;;;;;;:::i;:::-;9119:31;9129:9;9140;9119;:31::i;:::-;9112:38;;;;8362:795;;;;;;;:::o;15492:273::-;15573:13;;-1:-1:-1;;;;;15573:13:0;15559:10;:27;15551:82;;;;-1:-1:-1;;;15551:82:0;;;;;;;:::i;:::-;15651:8;;-1:-1:-1;;;;;15651:8:0;:22;15643:83;;;;-1:-1:-1;;;15643:83:0;;;;;;;:::i;:::-;15736:8;:22;;-1:-1:-1;;;;;;15736:22:0;-1:-1:-1;;;;;15736:22:0;;;;;;;;;;15492:273::o;15293:90::-;15342:4;15365:11;15293:90;:::o;4933:134::-;-1:-1:-1;;;;;5032:19:0;;;5009:4;5032:19;;;:10;:19;;;;;;;;:28;;;;;;;;;;;;-1:-1:-1;;;;;5032:28:0;;4933:134::o;3457:117::-;3503:71;3457:117;:::o;2989:70::-;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2989:70:0;;-1:-1:-1;;;;;2989:70:0;;:::o;14616:158::-;14691:6;14728:12;-1:-1:-1;;;14717:9:0;;14709:32;;;;-1:-1:-1;;;14709:32:0;;;;;;;;:::i;:::-;-1:-1:-1;14765:1:0;;14616:158;-1:-1:-1;;14616:158:0:o;14970:162::-;15056:6;15087:1;-1:-1:-1;;;;;15082:6:0;:1;-1:-1:-1;;;;;15082:6:0;;;15090:12;15074:29;;;;;-1:-1:-1;;;15074:29:0;;;;;;;;:::i;:::-;-1:-1:-1;;;15120:5:0;;;14970:162::o;12063:827::-;-1:-1:-1;;;;;12156:17:0;;12148:91;;;;-1:-1:-1;;;12148:91:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;12257:17:0;;12249:89;;;;-1:-1:-1;;;12249:89:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;12371:13:0;;;;;;:8;:13;;;;;;;;;;12365:87;;;;;;;;;;;;;;-1:-1:-1;;;;;12371:13:0;;;;12386:6;;12365:87;;;;;;;:5;:87::i;:::-;-1:-1:-1;;;;;12349:13:0;;;;;;;:8;:13;;;;;;;;:103;;-1:-1:-1;;;;;;12349:103:0;-1:-1:-1;;;;;12349:103:0;;;;;;12484:13;;;;;;;;;;12478:81;;;;;;;;;;;;;;12484:13;;;;;12499:6;;12478:81;;;;;;;;:5;:81::i;:::-;-1:-1:-1;;;;;12462:13:0;;;;;;;:8;:13;;;;;;;:97;;-1:-1:-1;;;;;;12462:97:0;-1:-1:-1;;;;;12462:97:0;;;;;;;;;;;12574:26;;;;;;;;;;12593:6;;12574:26;:::i;:::-;;;;;;;;-1:-1:-1;;;;;12725:14:0;;;12751:1;12725:14;;;:9;:14;;;;;;;12721:163;;12769:19;12779:3;12784;12769:9;:19::i;:::-;12721:163;;;-1:-1:-1;;;;;12834:14:0;;;;;;;:9;:14;;;;;;;12850;;;;;;;;12819:54;;12834:14;;;;12850;12866:6;12819:14;:54::i;:::-;12063:827;;;:::o;11690:367::-;-1:-1:-1;;;;;11792:20:0;;;11766:23;11792:20;;;:9;:20;;;;;;;;;;11848:8;:19;;;;;;11877:20;;;;:32;;;-1:-1:-1;;;;;;11877:32:0;;;;;;;11925:54;;11792:20;;;;;-1:-1:-1;;;;;11848:19:0;;;;11877:32;;11792:20;;;11925:54;;11766:23;11925:54;11990:60;12005:15;12022:9;12033:16;11990:14;:60::i;:::-;11690:367;;;;:::o;15138:149::-;15246:9;15138:149;:::o;14780:184::-;14866:6;14895:5;;;14926:12;-1:-1:-1;;;;;14918:6:0;;;;;;;;14910:29;;;;-1:-1:-1;;;14910:29:0;;;;;;;;:::i;:::-;-1:-1:-1;14956:1:0;14780:184;-1:-1:-1;;;;14780:184:0:o;12896:925::-;13000:6;-1:-1:-1;;;;;12990:16:0;:6;-1:-1:-1;;;;;12990:16:0;;;:30;;;;;13019:1;13010:6;-1:-1:-1;;;;;13010:10:0;;12990:30;12986:829;;;-1:-1:-1;;;;;13040:20:0;;;13036:378;;-1:-1:-1;;;;;13099:22:0;;13080:16;13099:22;;;:14;:22;;;;;;;;;13158:13;:60;;13217:1;13158:60;;;-1:-1:-1;;;;;13174:19:0;;;;;;:11;:19;;;;;;;;-1:-1:-1;;13194:13:0;;13174:34;;;;;;;;;:40;-1:-1:-1;;;13174:40:0;;-1:-1:-1;;;;;13174:40:0;13158:60;13139:79;;13236:16;13255:69;13261:9;13272:6;13255:69;;;;;;;;;;;;;;;;;:5;:69::i;:::-;13236:88;;13342:57;13359:6;13367:9;13378;13389;13342:16;:57::i;:::-;13036:378;;;;-1:-1:-1;;;;;13432:20:0;;;13428:377;;-1:-1:-1;;;;;13491:22:0;;13472:16;13491:22;;;:14;:22;;;;;;;;;13550:13;:60;;13609:1;13550:60;;;-1:-1:-1;;;;;13566:19:0;;;;;;:11;:19;;;;;;;;-1:-1:-1;;13586:13:0;;13566:34;;;;;;;;;:40;-1:-1:-1;;;13566:40:0;;-1:-1:-1;;;;;13566:40:0;13550:60;13531:79;;13628:16;13647:68;13653:9;13664:6;13647:68;;;;;;;;;;;;;;;;;:5;:68::i;:::-;13628:87;;13733:57;13750:6;13758:9;13769;13780;13827:619;13944:18;13965:77;13972:12;13965:77;;;;;;;;;;;;;;;;;:6;:77::i;:::-;13944:98;;14070:1;14055:12;:16;;;:85;;;;-1:-1:-1;;;;;;14075:22:0;;;;;;:11;:22;;;;;;;;:65;-1:-1:-1;;14098:16:0;;14075:40;;;;;;;;;:50;:65;;;:50;;:65;14055:85;14051:324;;;-1:-1:-1;;;;;14154:22:0;;;;;;:11;:22;;;;;;;;-1:-1:-1;;14177:16:0;;14154:40;;;;;;;;;:57;;-1:-1:-1;;14154:57:0;-1:-1:-1;;;;;;;;14154:57:0;;;;;;14051:324;;;14277:33;;;;;;;;;;;;;;-1:-1:-1;;;;;14277:33:0;;;;;;;;;;-1:-1:-1;;;;;14238:22:0;;-1:-1:-1;14238:22:0;;;:11;:22;;;;;:36;;;;;;;;;;:72;;;;;;;;;-1:-1:-1;;;14238:72:0;-1:-1:-1;;14238:72:0;;;-1:-1:-1;;14238:72:0;;;;;;;;;;;;;;;14322:25;;;:14;:25;;;;;;;:44;;14238:72;14350:16;;14322:44;;;;;;;;;;;;;14051:324;14409:9;-1:-1:-1;;;;;14388:51:0;;14420:8;14430;14388:51;;;;;;;:::i;:::-;;;;;;;;13827:619;;;;;:::o;14452:158::-;14527:6;14564:12;-1:-1:-1;;;14553:9:0;;14545:32;;;;-1:-1:-1;;;14545:32:0;;;;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;:::o;5:130::-;72:20;;-1:-1;;;;;20611:54;;21685:35;;21675:2;;21734:1;;21724:12;819:241;;923:2;911:9;902:7;898:23;894:32;891:2;;;-1:-1;;929:12;891:2;991:53;1036:7;1012:22;991:53;:::i;1067:366::-;;;1188:2;1176:9;1167:7;1163:23;1159:32;1156:2;;;-1:-1;;1194:12;1156:2;1256:53;1301:7;1277:22;1256:53;:::i;:::-;1246:63;;1364:53;1409:7;1346:2;1389:9;1385:22;1364:53;:::i;:::-;1354:63;;1150:283;;;;;:::o;1440:491::-;;;;1578:2;1566:9;1557:7;1553:23;1549:32;1546:2;;;-1:-1;;1584:12;1546:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;1636:63;-1:-1;1736:2;1775:22;;72:20;97:33;72:20;97:33;:::i;:::-;1540:391;;1744:63;;-1:-1;;;1844:2;1883:22;;;;346:20;;1540:391::o;1938:366::-;;;2059:2;2047:9;2038:7;2034:23;2030:32;2027:2;;;-1:-1;;2065:12;2027:2;2127:53;2172:7;2148:22;2127:53;:::i;:::-;2117:63;2217:2;2256:22;;;;346:20;;-1:-1;;;2021:283::o;2311:865::-;;;;;;;2498:3;2486:9;2477:7;2473:23;2469:33;2466:2;;;-1:-1;;2505:12;2466:2;2567:53;2612:7;2588:22;2567:53;:::i;:::-;2557:63;;2657:2;2700:9;2696:22;346:20;2665:63;;2765:2;2808:9;2804:22;346:20;2773:63;;2873:2;2914:9;2910:22;616:20;20922:4;22203:5;20911:16;22180:5;22177:33;22167:2;;-1:-1;;22214:12;22167:2;2460:716;;;;-1:-1;2460:716;;2979:3;3019:22;;209:20;;3088:3;3128:22;;;209:20;;-1:-1;2460:716;-1:-1;;2460:716::o;3183:364::-;;;3303:2;3291:9;3282:7;3278:23;3274:32;3271:2;;;-1:-1;;3309:12;3271:2;3371:53;3416:7;3392:22;3371:53;:::i;:::-;3361:63;;3461:2;3503:9;3499:22;482:20;20828:10;22083:5;20817:22;22059:5;22056:34;22046:2;;-1:-1;;22094:12;22046:2;3469:62;;;;3265:282;;;;;:::o;3554:364::-;;;3674:2;3662:9;3653:7;3649:23;3645:32;3642:2;;;-1:-1;;3680:12;3642:2;3742:53;3787:7;3763:22;3742:53;:::i;:::-;3732:63;;3832:2;3874:9;3870:22;750:20;-1:-1;;;;;22325:5;21000:38;22301:5;22298:34;22288:2;;-1:-1;;22336:12;10038:659;-1:-1;;;6234:87;;6219:1;6340:11;;4227:37;;;;10549:12;;;4227:37;10660:12;;;10283:414::o;10704:222::-;-1:-1;;;;;20611:54;;;;3996:37;;10831:2;10816:18;;10802:124::o;10933:210::-;20444:13;;20437:21;4110:34;;11054:2;11039:18;;11025:118::o;11150:222::-;4227:37;;;11277:2;11262:18;;11248:124::o;11379:556::-;4227:37;;;-1:-1;;;;;20611:54;;;;11755:2;11740:18;;3996:37;11838:2;11823:18;;4227:37;11921:2;11906:18;;4227:37;11590:3;11575:19;;11561:374::o;11942:556::-;4227:37;;;12318:2;12303:18;;4227:37;;;;12401:2;12386:18;;4227:37;-1:-1;;;;;20611:54;12484:2;12469:18;;3996:37;12153:3;12138:19;;12124:374::o;12505:548::-;4227:37;;;20922:4;20911:16;;;;12873:2;12858:18;;9743:35;12956:2;12941:18;;4227:37;13039:2;13024:18;;4227:37;12712:3;12697:19;;12683:370::o;13060:310::-;;13207:2;;13228:17;13221:47;4580:5;19913:12;20070:6;13207:2;13196:9;13192:18;20058:19;-1:-1;21236:101;21250:6;21247:1;21244:13;21236:101;;;21317:11;;;;;21311:18;21298:11;;;20098:14;21298:11;21291:39;21265:10;;21236:101;;;21352:6;21349:1;21346:13;21343:2;;;-1:-1;20098:14;21408:6;13196:9;21399:16;;21392:27;21343:2;-1:-1;21605:7;21589:14;-1:-1;;21585:28;4738:39;;;;20098:14;4738:39;;13178:192;-1:-1;;;13178:192::o;13377:416::-;13577:2;13591:47;;;5014:2;13562:18;;;20058:19;5050:34;20098:14;;;5030:55;-1:-1;;;5105:12;;;5098:33;5150:12;;;13548:245::o;13800:416::-;14000:2;14014:47;;;5401:2;13985:18;;;20058:19;5437:34;20098:14;;;5417:55;-1:-1;;;5492:12;;;5485:40;5544:12;;;13971:245::o;14223:416::-;14423:2;14437:47;;;5795:2;14408:18;;;20058:19;5831:34;20098:14;;;5811:55;-1:-1;;;5886:12;;;5879:34;5932:12;;;14394:245::o;14646:416::-;14846:2;14860:47;;;6590:2;14831:18;;;20058:19;6626:34;20098:14;;;6606:55;-1:-1;;;6681:12;;;6674:31;6724:12;;;14817:245::o;15069:416::-;15269:2;15283:47;;;6975:2;15254:18;;;20058:19;7011:34;20098:14;;;6991:55;7080:29;7066:12;;;7059:51;7129:12;;;15240:245::o;15492:416::-;15692:2;15706:47;;;7380:2;15677:18;;;20058:19;7416:34;20098:14;;;7396:55;-1:-1;;;7471:12;;;7464:32;7515:12;;;15663:245::o;15915:416::-;16115:2;16129:47;;;7766:2;16100:18;;;20058:19;7802:34;20098:14;;;7782:55;-1:-1;;;7857:12;;;7850:27;7896:12;;;16086:245::o;16338:416::-;16538:2;16552:47;;;8147:2;16523:18;;;20058:19;8183:34;20098:14;;;8163:55;8252:31;8238:12;;;8231:53;8303:12;;;16509:245::o;16761:416::-;16961:2;16975:47;;;8554:2;16946:18;;;20058:19;8590:34;20098:14;;;8570:55;-1:-1;;;8645:12;;;8638:31;8688:12;;;16932:245::o;17184:416::-;17384:2;17398:47;;;8939:2;17369:18;;;20058:19;8975:32;20098:14;;;8955:53;9027:12;;;17355:245::o;17607:416::-;17807:2;17821:47;;;9278:2;17792:18;;;20058:19;9314:34;20098:14;;;9294:55;-1:-1;;;9369:12;;;9362:32;9413:12;;;17778:245::o;18259:218::-;20828:10;20817:22;;;;9628:36;;18384:2;18369:18;;18355:122::o;18484:325::-;20828:10;20817:22;;;;9628:36;;-1:-1;;;;;21000:38;18795:2;18780:18;;9990:36;18635:2;18620:18;;18606:203::o;18816:214::-;20922:4;20911:16;;;;9743:35;;18939:2;18924:18;;18910:120::o;19037:220::-;-1:-1;;;;;21000:38;;;;9860:49;;19163:2;19148:18;;19134:123::o;19489:329::-;-1:-1;;;;;21000:38;;;9860:49;;21000:38;;19804:2;19789:18;;9860:49;19642:2;19627:18;;19613:205::o;21626:117::-;-1:-1;;;;;20611:54;;21685:35;;21675:2;;21734:1;;21724:12" - }, - "methodIdentifiers": { - "DELEGATION_TYPEHASH()": "e7a324dc", - "DOMAIN_TYPEHASH()": "20606b70", - "_burn(address,uint96)": "72d3ee9e", - "allowance(address,address)": "dd62ed3e", - "approve(address,uint256)": "095ea7b3", - "balanceOf(address)": "70a08231", - "checkpoints(address,uint32)": "f1127ed8", - "decimals()": "313ce567", - "delegate(address)": "5c19a95c", - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": "c3cda520", - "delegates(address)": "587cde1e", - "getCurrentVotes(address)": "b4b5ea57", - "getInitialHolder()": "ae80d9de", - "getPriorVotes(address,uint256)": "782d6fe1", - "getTotalSupply()": "c4e41b22", - "governor()": "0c340a24", - "initialHolder()": "b72218e3", - "name()": "06fdde03", - "nonces(address)": "7ecebe00", - "numCheckpoints(address)": "6fcfff45", - "setGovernor(address)": "c42cf535", - "symbol()": "95d89b41", - "totalSupply()": "18160ddd", - "transfer(address,uint256)": "a9059cbb", - "transferFrom(address,address,uint256)": "23b872dd" - } - } - } - } - }, - "sources": { - "src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol": { - "ast": { - "absolutePath": "src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol", - "exportedSymbols": { - "DAOToken": [ - 1132 - ] - }, - "id": 1133, - "license": "BSD-3-Clause", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "0:23:0" - }, - { - "id": 2, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1132, - "linearizedBaseContracts": [ - 1132 - ], - "name": "DAOToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "documentation": { - "id": 3, - "nodeType": "StructuredDocumentation", - "src": "1779:44:0", - "text": "@notice EIP-20 token name for this token" - }, - "functionSelector": "06fdde03", - "id": 6, - "mutability": "constant", - "name": "name", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "1828:49:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1828:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "436c696d6174652044414f20546f6b656e", - "id": 5, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1858:19:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7c75c83381dcf4c0e5ba36df2cc653b50dcd8f69236256411bc04c9f677ed4c0", - "typeString": "literal_string \"Climate DAO Token\"" - }, - "value": "Climate DAO Token" - }, - "visibility": "public" - }, - { - "constant": true, - "documentation": { - "id": 7, - "nodeType": "StructuredDocumentation", - "src": "1884:46:0", - "text": "@notice EIP-20 token symbol for this token" - }, - "functionSelector": "95d89b41", - "id": 10, - "mutability": "constant", - "name": "symbol", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "1935:39:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 8, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1935:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "64434c4d38", - "id": 9, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1967:7:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1726c2ec8bf5f3af9535b4f358462c01940da5c9d6c6bf0075924c96f97dc1d2", - "typeString": "literal_string \"dCLM8\"" - }, - "value": "dCLM8" - }, - "visibility": "public" - }, - { - "constant": true, - "documentation": { - "id": 11, - "nodeType": "StructuredDocumentation", - "src": "1981:48:0", - "text": "@notice EIP-20 token decimals for this token" - }, - "functionSelector": "313ce567", - "id": 14, - "mutability": "constant", - "name": "decimals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "2034:35:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 12, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2034:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3138", - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2067:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 15, - "nodeType": "StructuredDocumentation", - "src": "2076:49:0", - "text": "@notice Total number of tokens in circulation" - }, - "functionSelector": "18160ddd", - "id": 18, - "mutability": "mutable", - "name": "totalSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "2130:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2130:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3130303030303030653138", - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2156:11:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000000000000000000_by_1", - "typeString": "int_const 10000000000000000000000000" - }, - "value": "10000000e18" - }, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 19, - "nodeType": "StructuredDocumentation", - "src": "2194:44:0", - "text": "@notice Initial holder of all DAO tokens" - }, - "functionSelector": "b72218e3", - "id": 21, - "mutability": "mutable", - "name": "initialHolder", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "2243:28:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 20, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2243:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 22, - "nodeType": "StructuredDocumentation", - "src": "2278:90:0", - "text": "@notice Governor to be set after deploy for permissions to burn tokens (only set once)" - }, - "functionSelector": "0c340a24", - "id": 28, - "mutability": "mutable", - "name": "governor", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "2373:36:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 23, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2373:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 26, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2407:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2399:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 24, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2399:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2399:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 29, - "nodeType": "StructuredDocumentation", - "src": "2416:46:0", - "text": "@dev Allowance amounts on behalf of others" - }, - "id": 35, - "mutability": "mutable", - "name": "allowances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "2467:68:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint96_$_$", - "typeString": "mapping(address => mapping(address => uint96))" - }, - "typeName": { - "id": 34, - "keyType": { - "id": 30, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2476:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2467:48:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint96_$_$", - "typeString": "mapping(address => mapping(address => uint96))" - }, - "valueType": { - "id": 33, - "keyType": { - "id": 31, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2496:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2487:27:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - }, - "valueType": { - "id": 32, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "2507:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "documentation": { - "id": 36, - "nodeType": "StructuredDocumentation", - "src": "2542:59:0", - "text": "@dev Official record of token balances for each account" - }, - "id": 40, - "mutability": "mutable", - "name": "balances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "2606:45:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - }, - "typeName": { - "id": 39, - "keyType": { - "id": 37, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2615:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2606:27:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - }, - "valueType": { - "id": 38, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "2626:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "documentation": { - "id": 41, - "nodeType": "StructuredDocumentation", - "src": "2658:46:0", - "text": "@notice A record of each accounts delegate" - }, - "functionSelector": "587cde1e", - "id": 45, - "mutability": "mutable", - "name": "delegates", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "2709:45:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - }, - "typeName": { - "id": 44, - "keyType": { - "id": 42, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2718:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2709:28:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - }, - "valueType": { - "id": 43, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2729:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "DAOToken.Checkpoint", - "id": 50, - "members": [ - { - "constant": false, - "id": 47, - "mutability": "mutable", - "name": "fromBlock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 50, - "src": "2865:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 46, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "2865:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 49, - "mutability": "mutable", - "name": "votes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 50, - "src": "2891:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 48, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "2891:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Checkpoint", - "nodeType": "StructDefinition", - "scope": 1132, - "src": "2837:73:0", - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 51, - "nodeType": "StructuredDocumentation", - "src": "2916:68:0", - "text": "@notice A record of votes checkpoints for each account, by index" - }, - "functionSelector": "f1127ed8", - "id": 57, - "mutability": "mutable", - "name": "checkpoints", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "2989:70:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint))" - }, - "typeName": { - "id": 56, - "keyType": { - "id": 52, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2998:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2989:51:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint))" - }, - "valueType": { - "id": 55, - "keyType": { - "id": 53, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3018:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Mapping", - "src": "3009:30:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint)" - }, - "valueType": { - "contractScope": null, - "id": 54, - "name": "Checkpoint", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 50, - "src": "3028:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage_ptr", - "typeString": "struct DAOToken.Checkpoint" - } - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 58, - "nodeType": "StructuredDocumentation", - "src": "3066:54:0", - "text": "@notice The number of checkpoints for each account" - }, - "functionSelector": "6fcfff45", - "id": 62, - "mutability": "mutable", - "name": "numCheckpoints", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "3125:49:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - }, - "typeName": { - "id": 61, - "keyType": { - "id": 59, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3134:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3125:27:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - }, - "valueType": { - "id": 60, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3145:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "documentation": { - "id": 63, - "nodeType": "StructuredDocumentation", - "src": "3181:58:0", - "text": "@notice The EIP-712 typehash for the contract's domain" - }, - "functionSelector": "20606b70", - "id": 68, - "mutability": "constant", - "name": "DOMAIN_TYPEHASH", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "3244:122:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 64, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3244:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", - "id": 66, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3296:69:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - }, - "value": "EIP712Domain(string name,uint256 chainId,address verifyingContract)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - } - ], - "id": 65, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "3286:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 67, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3286:80:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "documentation": { - "id": 69, - "nodeType": "StructuredDocumentation", - "src": "3373:79:0", - "text": "@notice The EIP-712 typehash for the delegation struct used by the contract" - }, - "functionSelector": "e7a324dc", - "id": 74, - "mutability": "constant", - "name": "DELEGATION_TYPEHASH", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "3457:117:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 70, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3457:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "44656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929", - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3513:60:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf", - "typeString": "literal_string \"Delegation(address delegatee,uint256 nonce,uint256 expiry)\"" - }, - "value": "Delegation(address delegatee,uint256 nonce,uint256 expiry)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf", - "typeString": "literal_string \"Delegation(address delegatee,uint256 nonce,uint256 expiry)\"" - } - ], - "id": 71, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "3503:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 73, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3503:71:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 75, - "nodeType": "StructuredDocumentation", - "src": "3581:66:0", - "text": "@notice A record of states for signing / validating signatures" - }, - "functionSelector": "7ecebe00", - "id": 79, - "mutability": "mutable", - "name": "nonces", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1132, - "src": "3652:39:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 78, - "keyType": { - "id": 76, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3661:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3652:25:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 77, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3672:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": { - "id": 80, - "nodeType": "StructuredDocumentation", - "src": "3698:71:0", - "text": "@notice An event thats emitted when an account changes its delegate" - }, - "id": 88, - "name": "DelegateChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 87, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 82, - "indexed": true, - "mutability": "mutable", - "name": "delegator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 88, - "src": "3796:25:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3796:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 84, - "indexed": true, - "mutability": "mutable", - "name": "fromDelegate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 88, - "src": "3823:28:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 83, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3823:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 86, - "indexed": true, - "mutability": "mutable", - "name": "toDelegate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 88, - "src": "3853:26:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 85, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3853:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3795:85:0" - }, - "src": "3774:107:0" - }, - { - "anonymous": false, - "documentation": { - "id": 89, - "nodeType": "StructuredDocumentation", - "src": "3887:81:0", - "text": "@notice An event thats emitted when a delegate account's vote balance changes" - }, - "id": 97, - "name": "DelegateVotesChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 96, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 91, - "indexed": true, - "mutability": "mutable", - "name": "delegate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 97, - "src": "4000:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 90, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4000:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 93, - "indexed": false, - "mutability": "mutable", - "name": "previousBalance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 97, - "src": "4026:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 92, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4026:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 95, - "indexed": false, - "mutability": "mutable", - "name": "newBalance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 97, - "src": "4048:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 94, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4048:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3999:65:0" - }, - "src": "3973:92:0" - }, - { - "anonymous": false, - "documentation": { - "id": 98, - "nodeType": "StructuredDocumentation", - "src": "4071:46:0", - "text": "@notice The standard EIP-20 transfer event" - }, - "id": 106, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 105, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 100, - "indexed": true, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 106, - "src": "4137:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 99, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4137:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 102, - "indexed": true, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 106, - "src": "4159:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 101, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4159:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 104, - "indexed": false, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 106, - "src": "4179:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 103, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4179:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4136:58:0" - }, - "src": "4122:73:0" - }, - { - "anonymous": false, - "documentation": { - "id": 107, - "nodeType": "StructuredDocumentation", - "src": "4201:46:0", - "text": "@notice The standard EIP-20 approval event" - }, - "id": 115, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 109, - "indexed": true, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 115, - "src": "4267:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 108, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4267:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 111, - "indexed": true, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 115, - "src": "4290:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 110, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4290:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 113, - "indexed": false, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 115, - "src": "4315:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 112, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4315:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4266:64:0" - }, - "src": "4252:79:0" - }, - { - "body": { - "id": 143, - "nodeType": "Block", - "src": "4491:146:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 121, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "4501:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 123, - "indexExpression": { - "argumentTypes": null, - "id": 122, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4510:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4501:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 126, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "4528:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4521:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint96_$", - "typeString": "type(uint96)" - }, - "typeName": { - "id": 124, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "4521:6:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4521:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "4501:39:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "id": 129, - "nodeType": "ExpressionStatement", - "src": "4501:39:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 130, - "name": "initialHolder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "4550:13:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 131, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4566:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4550:23:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 133, - "nodeType": "ExpressionStatement", - "src": "4550:23:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4605:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 136, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4597:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 135, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4597:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4597:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 139, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4609:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 140, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "4618:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 134, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "4588:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4588:42:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 142, - "nodeType": "EmitStatement", - "src": "4583:47:0" - } - ] - }, - "documentation": { - "id": 116, - "nodeType": "StructuredDocumentation", - "src": "4337:120:0", - "text": " @notice Construct a new dCLM8 token\n @param account The initial account to grant all the tokens" - }, - "id": 144, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 119, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 118, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 144, - "src": "4474:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 117, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4474:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4473:17:0" - }, - "returnParameters": { - "id": 120, - "nodeType": "ParameterList", - "parameters": [], - "src": "4491:0:0" - }, - "scope": 1132, - "src": "4462:175:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 160, - "nodeType": "Block", - "src": "5015:52:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 154, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "5032:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint96_$_$", - "typeString": "mapping(address => mapping(address => uint96))" - } - }, - "id": 156, - "indexExpression": { - "argumentTypes": null, - "id": 155, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 147, - "src": "5043:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5032:19:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 158, - "indexExpression": { - "argumentTypes": null, - "id": 157, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 149, - "src": "5052:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5032:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "functionReturnParameters": 153, - "id": 159, - "nodeType": "Return", - "src": "5025:35:0" - } - ] - }, - "documentation": { - "id": 145, - "nodeType": "StructuredDocumentation", - "src": "4643:285:0", - "text": " @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n @param account The address of the account holding the funds\n @param spender The address of the account spending the funds\n @return The number of tokens approved" - }, - "functionSelector": "dd62ed3e", - "id": 161, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 150, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 147, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 161, - "src": "4952:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 146, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4952:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 149, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 161, - "src": "4969:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 148, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4969:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4951:34:0" - }, - "returnParameters": { - "id": 153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 152, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 161, - "src": "5009:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 151, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5009:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5008:6:0" - }, - "scope": 1132, - "src": "4933:134:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 217, - "nodeType": "Block", - "src": "5609:334:0", - "statements": [ - { - "assignments": [ - 172 - ], - "declarations": [ - { - "constant": false, - "id": 172, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 217, - "src": "5619:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 171, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "5619:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 173, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5619:13:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 174, - "name": "rawAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 166, - "src": "5646:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "5664:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 177, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5665:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 176, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5659:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 175, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5659:4:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5659:8:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5646:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 197, - "nodeType": "Block", - "src": "5719:93:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 190, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 172, - "src": "5733:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 192, - "name": "rawAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 166, - "src": "5749:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a617070726f76653a20616d6f756e7420657863656564732039362062697473", - "id": 193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5760:40:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a495d09abcd660fafcc6eb770f1763d36dc42f7495a66af0226a99d6ebc6ff6c", - "typeString": "literal_string \"dCLM8::approve: amount exceeds 96 bits\"" - }, - "value": "dCLM8::approve: amount exceeds 96 bits" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_a495d09abcd660fafcc6eb770f1763d36dc42f7495a66af0226a99d6ebc6ff6c", - "typeString": "literal_string \"dCLM8::approve: amount exceeds 96 bits\"" - } - ], - "id": 191, - "name": "safe96", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "5742:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint96_$", - "typeString": "function (uint256,string memory) pure returns (uint96)" - } - }, - "id": 194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5742:59:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "5733:68:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "id": 196, - "nodeType": "ExpressionStatement", - "src": "5733:68:0" - } - ] - }, - "id": 198, - "nodeType": "IfStatement", - "src": "5642:170:0", - "trueBody": { - "id": 189, - "nodeType": "Block", - "src": "5669:44:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 181, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 172, - "src": "5683:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "5699:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5700:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 183, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5692:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint96_$", - "typeString": "type(uint96)" - }, - "typeName": { - "id": 182, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "5692:6:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 186, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5692:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "5683:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "id": 188, - "nodeType": "ExpressionStatement", - "src": "5683:19:0" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 199, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "5822:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint96_$_$", - "typeString": "mapping(address => mapping(address => uint96))" - } - }, - "id": 203, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 200, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5833:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5833:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5822:22:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 204, - "indexExpression": { - "argumentTypes": null, - "id": 202, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 164, - "src": "5845:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5822:31:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 205, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 172, - "src": "5856:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "5822:40:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "id": 207, - "nodeType": "ExpressionStatement", - "src": "5822:40:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 209, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5887:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5887:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 211, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 164, - "src": "5899:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 212, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 172, - "src": "5908:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 208, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "5878:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5878:37:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 214, - "nodeType": "EmitStatement", - "src": "5873:42:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5932:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 170, - "id": 216, - "nodeType": "Return", - "src": "5925:11:0" - } - ] - }, - "documentation": { - "id": 162, - "nodeType": "StructuredDocumentation", - "src": "5073:457:0", - "text": " @notice Approve `spender` to transfer up to `amount` from `src`\n @dev This will overwrite the approval amount for `spender`\n and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n @param spender The address of the account which may transfer tokens\n @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n @return Whether or not the approval succeeded" - }, - "functionSelector": "095ea7b3", - "id": 218, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 167, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 164, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 218, - "src": "5552:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 163, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5552:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 166, - "mutability": "mutable", - "name": "rawAmount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 218, - "src": "5569:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 165, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5569:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5551:33:0" - }, - "returnParameters": { - "id": 170, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 169, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 218, - "src": "5603:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 168, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5603:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5602:6:0" - }, - "scope": 1132, - "src": "5535:408:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 230, - "nodeType": "Block", - "src": "6204:41:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 226, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "6221:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 228, - "indexExpression": { - "argumentTypes": null, - "id": 227, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 221, - "src": "6230:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6221:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "functionReturnParameters": 225, - "id": 229, - "nodeType": "Return", - "src": "6214:24:0" - } - ] - }, - "documentation": { - "id": 219, - "nodeType": "StructuredDocumentation", - "src": "5949:185:0", - "text": " @notice Get the number of tokens held by the `account`\n @param account The address of the account to get the balance of\n @return The number of tokens held" - }, - "functionSelector": "70a08231", - "id": 231, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 221, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 231, - "src": "6158:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 220, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6158:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6157:17:0" - }, - "returnParameters": { - "id": 225, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 224, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 231, - "src": "6198:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 223, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6198:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6197:6:0" - }, - "scope": 1132, - "src": "6139:106:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 257, - "nodeType": "Block", - "src": "6572:164:0", - "statements": [ - { - "assignments": [ - 242 - ], - "declarations": [ - { - "constant": false, - "id": 242, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 257, - "src": "6582:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 241, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "6582:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 247, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 244, - "name": "rawAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "6605:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a7472616e736665723a20616d6f756e7420657863656564732039362062697473", - "id": 245, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6616:41:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6325b7f6af7a6a3126d6cec0b1513c367253c4e1a4063098c788a666402975c4", - "typeString": "literal_string \"dCLM8::transfer: amount exceeds 96 bits\"" - }, - "value": "dCLM8::transfer: amount exceeds 96 bits" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_6325b7f6af7a6a3126d6cec0b1513c367253c4e1a4063098c788a666402975c4", - "typeString": "literal_string \"dCLM8::transfer: amount exceeds 96 bits\"" - } - ], - "id": 243, - "name": "safe96", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "6598:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint96_$", - "typeString": "function (uint256,string memory) pure returns (uint96)" - } - }, - "id": 246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6598:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6582:76:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 249, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "6684:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6684:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 251, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 234, - "src": "6696:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 252, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 242, - "src": "6701:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 248, - "name": "_transferTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 795, - "src": "6668:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint96_$returns$__$", - "typeString": "function (address,address,uint96)" - } - }, - "id": 253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6668:40:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 254, - "nodeType": "ExpressionStatement", - "src": "6668:40:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6725:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 240, - "id": 256, - "nodeType": "Return", - "src": "6718:11:0" - } - ] - }, - "documentation": { - "id": 232, - "nodeType": "StructuredDocumentation", - "src": "6251:245:0", - "text": " @notice Transfer `amount` tokens from `msg.sender` to `dst`\n @param dst The address of the destination account\n @param rawAmount The number of tokens to transfer\n @return Whether or not the transfer succeeded" - }, - "functionSelector": "a9059cbb", - "id": 258, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 234, - "mutability": "mutable", - "name": "dst", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 258, - "src": "6519:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 233, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6519:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 236, - "mutability": "mutable", - "name": "rawAmount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 258, - "src": "6532:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 235, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6532:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6518:29:0" - }, - "returnParameters": { - "id": 240, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 239, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 258, - "src": "6566:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 238, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6566:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6565:6:0" - }, - "scope": 1132, - "src": "6501:235:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 333, - "nodeType": "Block", - "src": "7125:572:0", - "statements": [ - { - "assignments": [ - 271 - ], - "declarations": [ - { - "constant": false, - "id": 271, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 333, - "src": "7135:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 270, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7135:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 274, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 272, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "7153:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7153:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7135:28:0" - }, - { - "assignments": [ - 276 - ], - "declarations": [ - { - "constant": false, - "id": 276, - "mutability": "mutable", - "name": "spenderAllowance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 333, - "src": "7173:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 275, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "7173:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 282, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 277, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "7199:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint96_$_$", - "typeString": "mapping(address => mapping(address => uint96))" - } - }, - "id": 279, - "indexExpression": { - "argumentTypes": null, - "id": 278, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7210:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7199:15:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 281, - "indexExpression": { - "argumentTypes": null, - "id": 280, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "7215:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7199:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7173:50:0" - }, - { - "assignments": [ - 284 - ], - "declarations": [ - { - "constant": false, - "id": 284, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 333, - "src": "7233:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 283, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "7233:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 289, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 286, - "name": "rawAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "7256:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a617070726f76653a20616d6f756e7420657863656564732039362062697473", - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7267:40:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a495d09abcd660fafcc6eb770f1763d36dc42f7495a66af0226a99d6ebc6ff6c", - "typeString": "literal_string \"dCLM8::approve: amount exceeds 96 bits\"" - }, - "value": "dCLM8::approve: amount exceeds 96 bits" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_a495d09abcd660fafcc6eb770f1763d36dc42f7495a66af0226a99d6ebc6ff6c", - "typeString": "literal_string \"dCLM8::approve: amount exceeds 96 bits\"" - } - ], - "id": 285, - "name": "safe96", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "7249:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint96_$", - "typeString": "function (uint256,string memory) pure returns (uint96)" - } - }, - "id": 288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7249:59:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7233:75:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 290, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "7323:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 291, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7334:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7323:14:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 293, - "name": "spenderAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "7341:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 297, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "7368:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 296, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7369:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 295, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7361:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint96_$", - "typeString": "type(uint96)" - }, - "typeName": { - "id": 294, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "7361:6:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 298, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7361:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "7341:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7323:48:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 324, - "nodeType": "IfStatement", - "src": "7319:307:0", - "trueBody": { - "id": 323, - "nodeType": "Block", - "src": "7373:253:0", - "statements": [ - { - "assignments": [ - 302 - ], - "declarations": [ - { - "constant": false, - "id": 302, - "mutability": "mutable", - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 323, - "src": "7387:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 301, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "7387:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 308, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 304, - "name": "spenderAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "7415:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "id": 305, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 284, - "src": "7433:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e6365", - "id": 306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7441:64:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_66e7603b163620e084d3f8884f331128ecc4504377564ee2b9e4de7155244e00", - "typeString": "literal_string \"dCLM8::transferFrom: transfer amount exceeds spender allowance\"" - }, - "value": "dCLM8::transferFrom: transfer amount exceeds spender allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_stringliteral_66e7603b163620e084d3f8884f331128ecc4504377564ee2b9e4de7155244e00", - "typeString": "literal_string \"dCLM8::transferFrom: transfer amount exceeds spender allowance\"" - } - ], - "id": 303, - "name": "sub96", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1075, - "src": "7409:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint96_$_t_uint96_$_t_string_memory_ptr_$returns$_t_uint96_$", - "typeString": "function (uint96,uint96,string memory) pure returns (uint96)" - } - }, - "id": 307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7409:97:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7387:119:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 309, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "7520:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint96_$_$", - "typeString": "mapping(address => mapping(address => uint96))" - } - }, - "id": 312, - "indexExpression": { - "argumentTypes": null, - "id": 310, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7531:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7520:15:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 313, - "indexExpression": { - "argumentTypes": null, - "id": 311, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "7536:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7520:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 314, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 302, - "src": "7547:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "7520:39:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "id": 316, - "nodeType": "ExpressionStatement", - "src": "7520:39:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 318, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7588:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 319, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 271, - "src": "7593:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 320, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 302, - "src": "7602:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 317, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "7579:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7579:36:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 322, - "nodeType": "EmitStatement", - "src": "7574:41:0" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 326, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7652:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 327, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "7657:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 328, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 284, - "src": "7662:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 325, - "name": "_transferTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 795, - "src": "7636:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint96_$returns$__$", - "typeString": "function (address,address,uint96)" - } - }, - "id": 329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7636:33:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 330, - "nodeType": "ExpressionStatement", - "src": "7636:33:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7686:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 269, - "id": 332, - "nodeType": "Return", - "src": "7679:11:0" - } - ] - }, - "documentation": { - "id": 259, - "nodeType": "StructuredDocumentation", - "src": "6742:290:0", - "text": " @notice Transfer `amount` tokens from `src` to `dst`\n @param src The address of the source account\n @param dst The address of the destination account\n @param rawAmount The number of tokens to transfer\n @return Whether or not the transfer succeeded" - }, - "functionSelector": "23b872dd", - "id": 334, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 266, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 261, - "mutability": "mutable", - "name": "src", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 334, - "src": "7059:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 260, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7059:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 263, - "mutability": "mutable", - "name": "dst", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 334, - "src": "7072:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 262, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7072:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 265, - "mutability": "mutable", - "name": "rawAmount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 334, - "src": "7085:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 264, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7085:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7058:42:0" - }, - "returnParameters": { - "id": 269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 268, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 334, - "src": "7119:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 267, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7119:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7118:6:0" - }, - "scope": 1132, - "src": "7037:660:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 346, - "nodeType": "Block", - "src": "7883:56:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 341, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "7910:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7910:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 343, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 337, - "src": "7922:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 340, - "name": "_delegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 709, - "src": "7900:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7900:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 339, - "id": 345, - "nodeType": "Return", - "src": "7893:39:0" - } - ] - }, - "documentation": { - "id": 335, - "nodeType": "StructuredDocumentation", - "src": "7703:131:0", - "text": " @notice Delegate votes from `msg.sender` to `delegatee`\n @param delegatee The address to delegate votes to" - }, - "functionSelector": "5c19a95c", - "id": 347, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegate", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 338, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 337, - "mutability": "mutable", - "name": "delegatee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 347, - "src": "7857:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 336, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7857:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7856:19:0" - }, - "returnParameters": { - "id": 339, - "nodeType": "ParameterList", - "parameters": [], - "src": "7883:0:0" - }, - "scope": 1132, - "src": "7839:100:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 449, - "nodeType": "Block", - "src": "8467:690:0", - "statements": [ - { - "assignments": [ - 364 - ], - "declarations": [ - { - "constant": false, - "id": 364, - "mutability": "mutable", - "name": "domainSeparator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 449, - "src": "8477:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 363, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8477:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 383, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 368, - "name": "DOMAIN_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8524:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 372, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "8557:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 371, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8551:5:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": { - "id": 370, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8551:5:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8551:11:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 369, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "8541:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 374, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8541:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 375, - "name": "getChainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1087, - "src": "8565:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8565:12:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 379, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "8587:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DAOToken_$1132", - "typeString": "contract DAOToken" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_DAOToken_$1132", - "typeString": "contract DAOToken" - } - ], - "id": 378, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8579:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 377, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8579:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8579:13:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 366, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "8513:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 367, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8513:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8513:80:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 365, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "8503:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8503:91:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8477:117:0" - }, - { - "assignments": [ - 385 - ], - "declarations": [ - { - "constant": false, - "id": 385, - "mutability": "mutable", - "name": "structHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 449, - "src": "8604:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 384, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8604:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 395, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 389, - "name": "DELEGATION_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "8646:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 390, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "8667:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 391, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "8678:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 392, - "name": "expiry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 354, - "src": "8685:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 387, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "8635:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8635:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8635:57:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 386, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "8625:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8625:68:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8604:89:0" - }, - { - "assignments": [ - 397 - ], - "declarations": [ - { - "constant": false, - "id": 397, - "mutability": "mutable", - "name": "digest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 449, - "src": "8703:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 396, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8703:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 406, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "1901", - "id": 401, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8747:10:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - "value": "\u0019\u0001" - }, - { - "argumentTypes": null, - "id": 402, - "name": "domainSeparator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 364, - "src": "8759:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 403, - "name": "structHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 385, - "src": "8776:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 399, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "8730:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 400, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8730:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8730:57:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 398, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "8720:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8720:68:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8703:85:0" - }, - { - "assignments": [ - 408 - ], - "declarations": [ - { - "constant": false, - "id": 408, - "mutability": "mutable", - "name": "signatory", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 449, - "src": "8798:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 407, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8798:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 415, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 410, - "name": "digest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 397, - "src": "8828:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 411, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 356, - "src": "8836:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 412, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 358, - "src": "8839:1:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 413, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 360, - "src": "8842:1:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 409, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -6, - "src": "8818:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8818:26:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8798:46:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 417, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "8862:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8883:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8875:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 418, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8875:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8875:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "8862:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a64656c656761746542795369673a20696e76616c6964207369676e6174757265", - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8887:41:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4003cfb1beaa267b2dea4b0cf1971f53af5ae64e3f9b854c759766dbeeb90d05", - "typeString": "literal_string \"dCLM8::delegateBySig: invalid signature\"" - }, - "value": "dCLM8::delegateBySig: invalid signature" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4003cfb1beaa267b2dea4b0cf1971f53af5ae64e3f9b854c759766dbeeb90d05", - "typeString": "literal_string \"dCLM8::delegateBySig: invalid signature\"" - } - ], - "id": 416, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8854:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8854:75:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 425, - "nodeType": "ExpressionStatement", - "src": "8854:75:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 427, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "8947:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8956:19:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 428, - "name": "nonces", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 79, - "src": "8956:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 430, - "indexExpression": { - "argumentTypes": null, - "id": 429, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "8963:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8956:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8947:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a64656c656761746542795369673a20696e76616c6964206e6f6e6365", - "id": 433, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8977:37:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b525b9c8896776000914ccd9b57acc313e479a7cedbf13f90dcddebc75e3b6dd", - "typeString": "literal_string \"dCLM8::delegateBySig: invalid nonce\"" - }, - "value": "dCLM8::delegateBySig: invalid nonce" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b525b9c8896776000914ccd9b57acc313e479a7cedbf13f90dcddebc75e3b6dd", - "typeString": "literal_string \"dCLM8::delegateBySig: invalid nonce\"" - } - ], - "id": 426, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8939:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8939:76:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 435, - "nodeType": "ExpressionStatement", - "src": "8939:76:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 437, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "9033:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9033:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 439, - "name": "expiry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 354, - "src": "9052:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9033:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a64656c656761746542795369673a207369676e61747572652065787069726564", - "id": 441, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9060:41:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e8e186b522c6a426d96f3388f8178c71fb7fea5af70e2135e4f10bf6bee166df", - "typeString": "literal_string \"dCLM8::delegateBySig: signature expired\"" - }, - "value": "dCLM8::delegateBySig: signature expired" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e8e186b522c6a426d96f3388f8178c71fb7fea5af70e2135e4f10bf6bee166df", - "typeString": "literal_string \"dCLM8::delegateBySig: signature expired\"" - } - ], - "id": 436, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "9025:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9025:77:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 443, - "nodeType": "ExpressionStatement", - "src": "9025:77:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 445, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "9129:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 446, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "9140:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 444, - "name": "_delegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 709, - "src": "9119:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9119:31:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 362, - "id": 448, - "nodeType": "Return", - "src": "9112:38:0" - } - ] - }, - "documentation": { - "id": 348, - "nodeType": "StructuredDocumentation", - "src": "7945:412:0", - "text": " @notice Delegates votes from signatory to `delegatee`\n @param delegatee The address to delegate votes to\n @param nonce The contract state required to match the signature\n @param expiry The time at which to expire the signature\n @param v The recovery byte of the signature\n @param r Half of the ECDSA signature pair\n @param s Half of the ECDSA signature pair" - }, - "functionSelector": "c3cda520", - "id": 450, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "delegateBySig", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 350, - "mutability": "mutable", - "name": "delegatee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 450, - "src": "8385:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 349, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8385:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 352, - "mutability": "mutable", - "name": "nonce", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 450, - "src": "8404:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 351, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8404:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 354, - "mutability": "mutable", - "name": "expiry", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 450, - "src": "8416:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 353, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8416:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 356, - "mutability": "mutable", - "name": "v", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 450, - "src": "8429:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 355, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "8429:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 358, - "mutability": "mutable", - "name": "r", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 450, - "src": "8438:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 357, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8438:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 360, - "mutability": "mutable", - "name": "s", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 450, - "src": "8449:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 359, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8449:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8384:75:0" - }, - "returnParameters": { - "id": 362, - "nodeType": "ParameterList", - "parameters": [], - "src": "8467:0:0" - }, - "scope": 1132, - "src": "8362:795:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 478, - "nodeType": "Block", - "src": "9424:146:0", - "statements": [ - { - "assignments": [ - 459 - ], - "declarations": [ - { - "constant": false, - "id": 459, - "mutability": "mutable", - "name": "nCheckpoints", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 478, - "src": "9434:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 458, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "9434:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 463, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 460, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "9456:14:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 462, - "indexExpression": { - "argumentTypes": null, - "id": 461, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 453, - "src": "9471:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9456:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9434:45:0" - }, - { - "expression": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 464, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 459, - "src": "9496:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 465, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9511:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9496:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 475, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9562:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "9496:67:0", - "trueExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 467, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "9515:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 469, - "indexExpression": { - "argumentTypes": null, - "id": 468, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 453, - "src": "9527:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9515:20:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 473, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 472, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 470, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 459, - "src": "9536:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9551:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "9536:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9515:38:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "id": 474, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 49, - "src": "9515:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "functionReturnParameters": 457, - "id": 477, - "nodeType": "Return", - "src": "9489:74:0" - } - ] - }, - "documentation": { - "id": 451, - "nodeType": "StructuredDocumentation", - "src": "9163:183:0", - "text": " @notice Gets the current votes balance for `account`\n @param account The address to get votes balance\n @return The number of current votes for `account`" - }, - "functionSelector": "b4b5ea57", - "id": 479, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getCurrentVotes", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 454, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 453, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 479, - "src": "9376:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 452, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9376:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9375:17:0" - }, - "returnParameters": { - "id": 457, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 456, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 479, - "src": "9416:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 455, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "9416:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9415:8:0" - }, - "scope": 1132, - "src": "9351:219:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 610, - "nodeType": "Block", - "src": "10079:1100:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 490, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 484, - "src": "10097:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 491, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "10111:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10111:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10097:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e6564", - "id": 494, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10125:42:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cc9dcf3a7ad95cb7153a719a75076f8e003cdf8d2b26a6e9dcd582c3f41da90", - "typeString": "literal_string \"dCLM8::getPriorVotes: not yet determined\"" - }, - "value": "dCLM8::getPriorVotes: not yet determined" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8cc9dcf3a7ad95cb7153a719a75076f8e003cdf8d2b26a6e9dcd582c3f41da90", - "typeString": "literal_string \"dCLM8::getPriorVotes: not yet determined\"" - } - ], - "id": 489, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10089:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10089:79:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 496, - "nodeType": "ExpressionStatement", - "src": "10089:79:0" - }, - { - "assignments": [ - 498 - ], - "declarations": [ - { - "constant": false, - "id": 498, - "mutability": "mutable", - "name": "nCheckpoints", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 610, - "src": "10179:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 497, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "10179:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 502, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 499, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "10201:14:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 501, - "indexExpression": { - "argumentTypes": null, - "id": 500, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 482, - "src": "10216:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10201:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10179:45:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 503, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "10238:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 504, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10254:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "10238:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 509, - "nodeType": "IfStatement", - "src": "10234:56:0", - "trueBody": { - "id": 508, - "nodeType": "Block", - "src": "10257:33:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 506, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10278:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 488, - "id": 507, - "nodeType": "Return", - "src": "10271:8:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 510, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "10347:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 512, - "indexExpression": { - "argumentTypes": null, - "id": 511, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 482, - "src": "10359:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10347:20:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 516, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 513, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "10368:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10383:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "10368:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10347:38:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "id": 517, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "10347:48:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 518, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 484, - "src": "10399:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10347:63:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 530, - "nodeType": "IfStatement", - "src": "10343:145:0", - "trueBody": { - "id": 529, - "nodeType": "Block", - "src": "10412:76:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 520, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "10433:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 522, - "indexExpression": { - "argumentTypes": null, - "id": 521, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 482, - "src": "10445:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10433:20:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 526, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 525, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 523, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "10454:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 524, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10469:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "10454:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10433:38:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "id": 527, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 49, - "src": "10433:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "functionReturnParameters": 488, - "id": 528, - "nodeType": "Return", - "src": "10426:51:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 531, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "10546:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 533, - "indexExpression": { - "argumentTypes": null, - "id": 532, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 482, - "src": "10558:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10546:20:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 535, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10567:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10546:23:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "id": 536, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "10546:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 537, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 484, - "src": "10582:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10546:47:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 542, - "nodeType": "IfStatement", - "src": "10542:86:0", - "trueBody": { - "id": 541, - "nodeType": "Block", - "src": "10595:33:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10616:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 488, - "id": 540, - "nodeType": "Return", - "src": "10609:8:0" - } - ] - } - }, - { - "assignments": [ - 544 - ], - "declarations": [ - { - "constant": false, - "id": 544, - "mutability": "mutable", - "name": "lower", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 610, - "src": "10638:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 543, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "10638:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 546, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 545, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10653:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10638:16:0" - }, - { - "assignments": [ - 548 - ], - "declarations": [ - { - "constant": false, - "id": 548, - "mutability": "mutable", - "name": "upper", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 610, - "src": "10664:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 547, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "10664:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 552, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 549, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "10679:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10694:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "10679:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10664:31:0" - }, - { - "body": { - "id": 601, - "nodeType": "Block", - "src": "10727:396:0", - "statements": [ - { - "assignments": [ - 557 - ], - "declarations": [ - { - "constant": false, - "id": 557, - "mutability": "mutable", - "name": "center", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 601, - "src": "10741:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 556, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "10741:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 566, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 558, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 548, - "src": "10757:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 559, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 548, - "src": "10766:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 560, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 544, - "src": "10774:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "10766:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "id": 562, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "10765:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 563, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10783:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "10765:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "10757:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10741:43:0" - }, - { - "assignments": [ - 568 - ], - "declarations": [ - { - "constant": false, - "id": 568, - "mutability": "mutable", - "name": "cp", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 601, - "src": "10825:20:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_memory_ptr", - "typeString": "struct DAOToken.Checkpoint" - }, - "typeName": { - "contractScope": null, - "id": 567, - "name": "Checkpoint", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 50, - "src": "10825:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage_ptr", - "typeString": "struct DAOToken.Checkpoint" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 574, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 569, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "10848:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 571, - "indexExpression": { - "argumentTypes": null, - "id": 570, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 482, - "src": "10860:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10848:20:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 573, - "indexExpression": { - "argumentTypes": null, - "id": 572, - "name": "center", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 557, - "src": "10869:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10848:28:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10825:51:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 575, - "name": "cp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 568, - "src": "10894:2:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_memory_ptr", - "typeString": "struct DAOToken.Checkpoint memory" - } - }, - "id": 576, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "10894:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 577, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 484, - "src": "10910:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10894:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 583, - "name": "cp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 568, - "src": "10981:2:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_memory_ptr", - "typeString": "struct DAOToken.Checkpoint memory" - } - }, - "id": 584, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "10981:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 585, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 484, - "src": "10996:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10981:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 598, - "nodeType": "Block", - "src": "11062:51:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 592, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 548, - "src": "11080:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 593, - "name": "center", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 557, - "src": "11088:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 594, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11097:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "11088:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "11080:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 597, - "nodeType": "ExpressionStatement", - "src": "11080:18:0" - } - ] - }, - "id": 599, - "nodeType": "IfStatement", - "src": "10977:136:0", - "trueBody": { - "id": 591, - "nodeType": "Block", - "src": "11009:47:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 587, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 544, - "src": "11027:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 588, - "name": "center", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 557, - "src": "11035:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "11027:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 590, - "nodeType": "ExpressionStatement", - "src": "11027:14:0" - } - ] - } - }, - "id": 600, - "nodeType": "IfStatement", - "src": "10890:223:0", - "trueBody": { - "id": 582, - "nodeType": "Block", - "src": "10923:48:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 579, - "name": "cp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 568, - "src": "10948:2:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_memory_ptr", - "typeString": "struct DAOToken.Checkpoint memory" - } - }, - "id": 580, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 49, - "src": "10948:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "functionReturnParameters": 488, - "id": 581, - "nodeType": "Return", - "src": "10941:15:0" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 553, - "name": "upper", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 548, - "src": "10712:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 554, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 544, - "src": "10720:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "10712:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 602, - "nodeType": "WhileStatement", - "src": "10705:418:0" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 603, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "11139:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 605, - "indexExpression": { - "argumentTypes": null, - "id": 604, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 482, - "src": "11151:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11139:20:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 607, - "indexExpression": { - "argumentTypes": null, - "id": 606, - "name": "lower", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 544, - "src": "11160:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11139:27:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "id": 608, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 49, - "src": "11139:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "functionReturnParameters": 488, - "id": 609, - "nodeType": "Return", - "src": "11132:40:0" - } - ] - }, - "documentation": { - "id": 480, - "nodeType": "StructuredDocumentation", - "src": "9576:411:0", - "text": " @notice Determine the prior number of votes for an account as of a block number\n @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n @param account The address of the account to check\n @param blockNumber The block number to get the vote balance at\n @return The number of votes the account had as of the given block" - }, - "functionSelector": "782d6fe1", - "id": 611, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 485, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 482, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 611, - "src": "10015:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 481, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10015:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 484, - "mutability": "mutable", - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 611, - "src": "10032:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 483, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10032:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10014:35:0" - }, - "returnParameters": { - "id": 488, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 487, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 611, - "src": "10071:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 486, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "10071:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10070:8:0" - }, - "scope": 1132, - "src": "9992:1187:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 670, - "nodeType": "Block", - "src": "11241:443:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 619, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 613, - "src": "11259:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11278:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11270:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 620, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11270:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 623, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11270:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11259:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a5f6275726e3a206275726e2066726f6d20746865207a65726f2061646472657373", - "id": 625, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11282:42:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fd060938ddfc76e39d33ac53660bf83dba39e3fb052f1a01191c89d2f7fe1882", - "typeString": "literal_string \"dCLM8::_burn: burn from the zero address\"" - }, - "value": "dCLM8::_burn: burn from the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fd060938ddfc76e39d33ac53660bf83dba39e3fb052f1a01191c89d2f7fe1882", - "typeString": "literal_string \"dCLM8::_burn: burn from the zero address\"" - } - ], - "id": 618, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11251:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11251:74:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 627, - "nodeType": "ExpressionStatement", - "src": "11251:74:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 629, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11343:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11343:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 631, - "name": "governor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "11357:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11343:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a5f6275726e3a206d75737420626520676f7665726e6f72", - "id": 633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11367:32:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f59ad81e8c40033cf1ab5f3affcbc4e72a1b2fe1b524266397589ef95c965550", - "typeString": "literal_string \"dCLM8::_burn: must be governor\"" - }, - "value": "dCLM8::_burn: must be governor" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f59ad81e8c40033cf1ab5f3affcbc4e72a1b2fe1b524266397589ef95c965550", - "typeString": "literal_string \"dCLM8::_burn: must be governor\"" - } - ], - "id": 628, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11335:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11335:65:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 635, - "nodeType": "ExpressionStatement", - "src": "11335:65:0" - }, - { - "assignments": [ - 637 - ], - "declarations": [ - { - "constant": false, - "id": 637, - "mutability": "mutable", - "name": "accountBalance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 670, - "src": "11411:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 636, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "11411:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 641, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 638, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "11435:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 640, - "indexExpression": { - "argumentTypes": null, - "id": 639, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 613, - "src": "11444:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11435:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11411:41:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 643, - "name": "accountBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 637, - "src": "11470:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 644, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 615, - "src": "11488:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "11470:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a5f6275726e3a206275726e20616d6f756e7420657863656564732062616c616e6365", - "id": 646, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11496:43:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0bfe502dd0cc844940e0a83dfac01ef569130fbf0779095f3f569f2e707c2ad0", - "typeString": "literal_string \"dCLM8::_burn: burn amount exceeds balance\"" - }, - "value": "dCLM8::_burn: burn amount exceeds balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0bfe502dd0cc844940e0a83dfac01ef569130fbf0779095f3f569f2e707c2ad0", - "typeString": "literal_string \"dCLM8::_burn: burn amount exceeds balance\"" - } - ], - "id": 642, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11462:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11462:78:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 648, - "nodeType": "ExpressionStatement", - "src": "11462:78:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 649, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "11550:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 651, - "indexExpression": { - "argumentTypes": null, - "id": 650, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 613, - "src": "11559:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11550:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 652, - "name": "accountBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 637, - "src": "11570:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 653, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 615, - "src": "11587:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "11570:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "11550:43:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "id": 656, - "nodeType": "ExpressionStatement", - "src": "11550:43:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 657, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "11603:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 658, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 615, - "src": "11618:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "11603:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 660, - "nodeType": "ExpressionStatement", - "src": "11603:21:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 662, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 613, - "src": "11649:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 665, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11666:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11658:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 663, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11658:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11658:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 667, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 615, - "src": "11670:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 661, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "11640:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11640:37:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 669, - "nodeType": "EmitStatement", - "src": "11635:42:0" - } - ] - }, - "documentation": null, - "functionSelector": "72d3ee9e", - "id": 671, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_burn", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 616, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 613, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 671, - "src": "11200:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 612, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11200:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 615, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 671, - "src": "11217:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 614, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "11217:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11199:32:0" - }, - "returnParameters": { - "id": 617, - "nodeType": "ParameterList", - "parameters": [], - "src": "11241:0:0" - }, - "scope": 1132, - "src": "11185:499:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 708, - "nodeType": "Block", - "src": "11756:301:0", - "statements": [ - { - "assignments": [ - 679 - ], - "declarations": [ - { - "constant": false, - "id": 679, - "mutability": "mutable", - "name": "currentDelegate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 708, - "src": "11766:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 678, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11766:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 683, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 680, - "name": "delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 45, - "src": "11792:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 682, - "indexExpression": { - "argumentTypes": null, - "id": 681, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 673, - "src": "11802:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11792:20:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11766:46:0" - }, - { - "assignments": [ - 685 - ], - "declarations": [ - { - "constant": false, - "id": 685, - "mutability": "mutable", - "name": "delegatorBalance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 708, - "src": "11822:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 684, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "11822:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 689, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 686, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "11848:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 688, - "indexExpression": { - "argumentTypes": null, - "id": 687, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 673, - "src": "11857:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11848:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11822:45:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 690, - "name": "delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 45, - "src": "11877:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 692, - "indexExpression": { - "argumentTypes": null, - "id": 691, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 673, - "src": "11887:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11877:20:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 693, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 675, - "src": "11900:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11877:32:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 695, - "nodeType": "ExpressionStatement", - "src": "11877:32:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 697, - "name": "delegator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 673, - "src": "11941:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 698, - "name": "currentDelegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 679, - "src": "11952:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 699, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 675, - "src": "11969:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 696, - "name": "DelegateChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "11925:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address,address)" - } - }, - "id": 700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11925:54:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 701, - "nodeType": "EmitStatement", - "src": "11920:59:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 703, - "name": "currentDelegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 679, - "src": "12005:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 704, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 675, - "src": "12022:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 705, - "name": "delegatorBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 685, - "src": "12033:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 702, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "11990:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint96_$returns$__$", - "typeString": "function (address,address,uint96)" - } - }, - "id": 706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11990:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 707, - "nodeType": "ExpressionStatement", - "src": "11990:60:0" - } - ] - }, - "documentation": null, - "id": 709, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_delegate", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 676, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 673, - "mutability": "mutable", - "name": "delegator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 709, - "src": "11709:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 672, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11709:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 675, - "mutability": "mutable", - "name": "delegatee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 709, - "src": "11728:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 674, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11728:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11708:38:0" - }, - "returnParameters": { - "id": 677, - "nodeType": "ParameterList", - "parameters": [], - "src": "11756:0:0" - }, - "scope": 1132, - "src": "11690:367:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 794, - "nodeType": "Block", - "src": "12138:752:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 724, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 719, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 711, - "src": "12156:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 722, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12171:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 721, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12163:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 720, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12163:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 723, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12163:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "12156:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207472616e736665722066726f6d20746865207a65726f2061646472657373", - "id": 725, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12175:63:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e631eedf77802916752e84d07eea94a0fc22ead82db2cffcb17e3f5ecf4f4b0d", - "typeString": "literal_string \"dCLM8::_transferTokens: cannot transfer from the zero address\"" - }, - "value": "dCLM8::_transferTokens: cannot transfer from the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e631eedf77802916752e84d07eea94a0fc22ead82db2cffcb17e3f5ecf4f4b0d", - "typeString": "literal_string \"dCLM8::_transferTokens: cannot transfer from the zero address\"" - } - ], - "id": 718, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12148:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12148:91:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 727, - "nodeType": "ExpressionStatement", - "src": "12148:91:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 729, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "12257:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 732, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12272:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12264:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 730, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12264:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12264:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "12257:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207472616e7366657220746f20746865207a65726f2061646472657373", - "id": 735, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12276:61:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_68d0e2a65b1c140f131d8738feb2ab477bfe8b6607948421b316e2b6dfe3b092", - "typeString": "literal_string \"dCLM8::_transferTokens: cannot transfer to the zero address\"" - }, - "value": "dCLM8::_transferTokens: cannot transfer to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_68d0e2a65b1c140f131d8738feb2ab477bfe8b6607948421b316e2b6dfe3b092", - "typeString": "literal_string \"dCLM8::_transferTokens: cannot transfer to the zero address\"" - } - ], - "id": 728, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12249:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12249:89:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 737, - "nodeType": "ExpressionStatement", - "src": "12249:89:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 738, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "12349:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 740, - "indexExpression": { - "argumentTypes": null, - "id": 739, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 711, - "src": "12358:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "12349:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 742, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "12371:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 744, - "indexExpression": { - "argumentTypes": null, - "id": 743, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 711, - "src": "12380:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12371:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "id": 745, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "12386:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e6365", - "id": 746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12394:57:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_18541abe246f853af7fa797b16d0bd7eb249b5d100e1f8c527d5ace6c959292d", - "typeString": "literal_string \"dCLM8::_transferTokens: transfer amount exceeds balance\"" - }, - "value": "dCLM8::_transferTokens: transfer amount exceeds balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_stringliteral_18541abe246f853af7fa797b16d0bd7eb249b5d100e1f8c527d5ace6c959292d", - "typeString": "literal_string \"dCLM8::_transferTokens: transfer amount exceeds balance\"" - } - ], - "id": 741, - "name": "sub96", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1075, - "src": "12365:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint96_$_t_uint96_$_t_string_memory_ptr_$returns$_t_uint96_$", - "typeString": "function (uint96,uint96,string memory) pure returns (uint96)" - } - }, - "id": 747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12365:87:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "12349:103:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "id": 749, - "nodeType": "ExpressionStatement", - "src": "12349:103:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 750, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "12462:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 752, - "indexExpression": { - "argumentTypes": null, - "id": 751, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "12471:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "12462:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 754, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "12484:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint96_$", - "typeString": "mapping(address => uint96)" - } - }, - "id": 756, - "indexExpression": { - "argumentTypes": null, - "id": 755, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "12493:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12484:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "id": 757, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "12499:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f7773", - "id": 758, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12507:51:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1d9d836e6f9a8453f17e1e06fedc80c8854b5ba8f395c88d68651a92e33796a0", - "typeString": "literal_string \"dCLM8::_transferTokens: transfer amount overflows\"" - }, - "value": "dCLM8::_transferTokens: transfer amount overflows" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_stringliteral_1d9d836e6f9a8453f17e1e06fedc80c8854b5ba8f395c88d68651a92e33796a0", - "typeString": "literal_string \"dCLM8::_transferTokens: transfer amount overflows\"" - } - ], - "id": 753, - "name": "add96", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1052, - "src": "12478:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint96_$_t_uint96_$_t_string_memory_ptr_$returns$_t_uint96_$", - "typeString": "function (uint96,uint96,string memory) pure returns (uint96)" - } - }, - "id": 759, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12478:81:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "12462:97:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "id": 761, - "nodeType": "ExpressionStatement", - "src": "12462:97:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 763, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 711, - "src": "12583:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 764, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "12588:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 765, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "12593:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 762, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "12574:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12574:26:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 767, - "nodeType": "EmitStatement", - "src": "12569:31:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 775, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 768, - "name": "delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 45, - "src": "12725:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 770, - "indexExpression": { - "argumentTypes": null, - "id": 769, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "12735:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12725:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12751:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 772, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12743:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 771, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12743:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 774, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12743:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "12725:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 792, - "nodeType": "Block", - "src": "12805:79:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 783, - "name": "delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 45, - "src": "12834:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 785, - "indexExpression": { - "argumentTypes": null, - "id": 784, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 711, - "src": "12844:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12834:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 786, - "name": "delegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 45, - "src": "12850:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_address_$", - "typeString": "mapping(address => address)" - } - }, - "id": 788, - "indexExpression": { - "argumentTypes": null, - "id": 787, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "12860:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12850:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 789, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "12866:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 782, - "name": "_moveDelegates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "12819:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint96_$returns$__$", - "typeString": "function (address,address,uint96)" - } - }, - "id": 790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12819:54:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 791, - "nodeType": "ExpressionStatement", - "src": "12819:54:0" - } - ] - }, - "id": 793, - "nodeType": "IfStatement", - "src": "12721:163:0", - "trueBody": { - "id": 781, - "nodeType": "Block", - "src": "12755:44:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 777, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "12779:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 778, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "12784:3:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 776, - "name": "_delegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 709, - "src": "12769:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12769:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 780, - "nodeType": "ExpressionStatement", - "src": "12769:19:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 795, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_transferTokens", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 716, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 711, - "mutability": "mutable", - "name": "src", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 795, - "src": "12088:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 710, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12088:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 713, - "mutability": "mutable", - "name": "dst", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 795, - "src": "12101:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 712, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12101:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 715, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 795, - "src": "12114:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 714, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "12114:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12087:41:0" - }, - "returnParameters": { - "id": 717, - "nodeType": "ParameterList", - "parameters": [], - "src": "12138:0:0" - }, - "scope": 1132, - "src": "12063:827:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 903, - "nodeType": "Block", - "src": "12976:845:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 804, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "12990:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 805, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 799, - "src": "13000:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "12990:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 807, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "13010:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13019:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "13010:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12990:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 902, - "nodeType": "IfStatement", - "src": "12986:829:0", - "trueBody": { - "id": 901, - "nodeType": "Block", - "src": "13022:793:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 811, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "13040:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 814, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13058:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13050:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 812, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13050:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 815, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13050:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "13040:20:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 855, - "nodeType": "IfStatement", - "src": "13036:378:0", - "trueBody": { - "id": 854, - "nodeType": "Block", - "src": "13062:352:0", - "statements": [ - { - "assignments": [ - 818 - ], - "declarations": [ - { - "constant": false, - "id": 818, - "mutability": "mutable", - "name": "srcRepNum", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 854, - "src": "13080:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 817, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "13080:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 822, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 819, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "13099:14:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 821, - "indexExpression": { - "argumentTypes": null, - "id": 820, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "13114:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13099:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13080:41:0" - }, - { - "assignments": [ - 824 - ], - "declarations": [ - { - "constant": false, - "id": 824, - "mutability": "mutable", - "name": "srcRepOld", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 854, - "src": "13139:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 823, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "13139:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 838, - "initialValue": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 825, - "name": "srcRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 818, - "src": "13158:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13170:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "13158:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 836, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13217:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "13158:60:0", - "trueExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 828, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "13174:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 830, - "indexExpression": { - "argumentTypes": null, - "id": 829, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "13186:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13174:19:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 834, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 831, - "name": "srcRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 818, - "src": "13194:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 832, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13206:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "13194:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13174:34:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "id": 835, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 49, - "src": "13174:40:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13139:79:0" - }, - { - "assignments": [ - 840 - ], - "declarations": [ - { - "constant": false, - "id": 840, - "mutability": "mutable", - "name": "srcRepNew", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 854, - "src": "13236:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 839, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "13236:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 846, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 842, - "name": "srcRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 824, - "src": "13261:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "id": 843, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "13272:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773", - "id": 844, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13280:43:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad37765c040af882f3580a15ed52232f11db3398100244360778f02050d79527", - "typeString": "literal_string \"dCLM8::_moveVotes: vote amount underflows\"" - }, - "value": "dCLM8::_moveVotes: vote amount underflows" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_stringliteral_ad37765c040af882f3580a15ed52232f11db3398100244360778f02050d79527", - "typeString": "literal_string \"dCLM8::_moveVotes: vote amount underflows\"" - } - ], - "id": 841, - "name": "sub96", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1075, - "src": "13255:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint96_$_t_uint96_$_t_string_memory_ptr_$returns$_t_uint96_$", - "typeString": "function (uint96,uint96,string memory) pure returns (uint96)" - } - }, - "id": 845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13255:69:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13236:88:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 848, - "name": "srcRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "13359:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 849, - "name": "srcRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 818, - "src": "13367:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 850, - "name": "srcRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 824, - "src": "13378:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "id": 851, - "name": "srcRepNew", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "13389:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 847, - "name": "_writeCheckpoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "13342:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint32_$_t_uint96_$_t_uint96_$returns$__$", - "typeString": "function (address,uint32,uint96,uint96)" - } - }, - "id": 852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13342:57:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 853, - "nodeType": "ExpressionStatement", - "src": "13342:57:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 856, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 799, - "src": "13432:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 859, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13450:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13442:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 857, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13442:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 860, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13442:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "13432:20:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 900, - "nodeType": "IfStatement", - "src": "13428:377:0", - "trueBody": { - "id": 899, - "nodeType": "Block", - "src": "13454:351:0", - "statements": [ - { - "assignments": [ - 863 - ], - "declarations": [ - { - "constant": false, - "id": 863, - "mutability": "mutable", - "name": "dstRepNum", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 899, - "src": "13472:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 862, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "13472:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 867, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 864, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "13491:14:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 866, - "indexExpression": { - "argumentTypes": null, - "id": 865, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 799, - "src": "13506:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13491:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13472:41:0" - }, - { - "assignments": [ - 869 - ], - "declarations": [ - { - "constant": false, - "id": 869, - "mutability": "mutable", - "name": "dstRepOld", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 899, - "src": "13531:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 868, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "13531:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 883, - "initialValue": { - "argumentTypes": null, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 870, - "name": "dstRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 863, - "src": "13550:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 871, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13562:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "13550:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13609:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "id": 882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "Conditional", - "src": "13550:60:0", - "trueExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 873, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "13566:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 875, - "indexExpression": { - "argumentTypes": null, - "id": 874, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 799, - "src": "13578:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13566:19:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 879, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 878, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 876, - "name": "dstRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 863, - "src": "13586:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 877, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13598:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "13586:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13566:34:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "id": 880, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 49, - "src": "13566:40:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13531:79:0" - }, - { - "assignments": [ - 885 - ], - "declarations": [ - { - "constant": false, - "id": 885, - "mutability": "mutable", - "name": "dstRepNew", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 899, - "src": "13628:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 884, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "13628:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 891, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 887, - "name": "dstRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 869, - "src": "13653:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "id": 888, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "13664:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f7773", - "id": 889, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13672:42:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_046e5ef69e1e51614d00749ab14bad1fcf0b71a3a2d1d8571daa01cb944faabc", - "typeString": "literal_string \"dCLM8::_moveVotes: vote amount overflows\"" - }, - "value": "dCLM8::_moveVotes: vote amount overflows" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_stringliteral_046e5ef69e1e51614d00749ab14bad1fcf0b71a3a2d1d8571daa01cb944faabc", - "typeString": "literal_string \"dCLM8::_moveVotes: vote amount overflows\"" - } - ], - "id": 886, - "name": "add96", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1052, - "src": "13647:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint96_$_t_uint96_$_t_string_memory_ptr_$returns$_t_uint96_$", - "typeString": "function (uint96,uint96,string memory) pure returns (uint96)" - } - }, - "id": 890, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13647:68:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13628:87:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 893, - "name": "dstRep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 799, - "src": "13750:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 894, - "name": "dstRepNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 863, - "src": "13758:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 895, - "name": "dstRepOld", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 869, - "src": "13769:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "id": 896, - "name": "dstRepNew", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 885, - "src": "13780:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 892, - "name": "_writeCheckpoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "13733:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint32_$_t_uint96_$_t_uint96_$returns$__$", - "typeString": "function (address,uint32,uint96,uint96)" - } - }, - "id": 897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13733:57:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 898, - "nodeType": "ExpressionStatement", - "src": "13733:57:0" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 904, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_moveDelegates", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 802, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 797, - "mutability": "mutable", - "name": "srcRep", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 904, - "src": "12920:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 796, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12920:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 799, - "mutability": "mutable", - "name": "dstRep", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 904, - "src": "12936:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 798, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12936:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 801, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 904, - "src": "12952:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 800, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "12952:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12919:47:0" - }, - "returnParameters": { - "id": 803, - "nodeType": "ParameterList", - "parameters": [], - "src": "12976:0:0" - }, - "scope": 1132, - "src": "12896:925:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 976, - "nodeType": "Block", - "src": "13936:510:0", - "statements": [ - { - "assignments": [ - 916 - ], - "declarations": [ - { - "constant": false, - "id": 916, - "mutability": "mutable", - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 976, - "src": "13944:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 915, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "13944:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 922, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 918, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "13972:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13972:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473", - "id": 920, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13986:55:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d9f7e73f555c8aa48f1a81e5db2fd75b322a6e4b229e71701288554aa900fca8", - "typeString": "literal_string \"dCLM8::_writeCheckpoint: block number exceeds 32 bits\"" - }, - "value": "dCLM8::_writeCheckpoint: block number exceeds 32 bits" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_d9f7e73f555c8aa48f1a81e5db2fd75b322a6e4b229e71701288554aa900fca8", - "typeString": "literal_string \"dCLM8::_writeCheckpoint: block number exceeds 32 bits\"" - } - ], - "id": 917, - "name": "safe32", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1001, - "src": "13965:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint32_$", - "typeString": "function (uint256,string memory) pure returns (uint32)" - } - }, - "id": 921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13965:77:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13944:98:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 923, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "14055:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 924, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14070:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "14055:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 926, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "14075:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 928, - "indexExpression": { - "argumentTypes": null, - "id": 927, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "14087:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14075:22:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 932, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 931, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 929, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "14098:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 930, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14113:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "14098:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14075:40:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "id": 933, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "14075:50:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 934, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 916, - "src": "14129:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "14075:65:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "14055:85:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 968, - "nodeType": "Block", - "src": "14226:149:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 949, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "14238:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 952, - "indexExpression": { - "argumentTypes": null, - "id": 950, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "14250:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14238:22:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 953, - "indexExpression": { - "argumentTypes": null, - "id": 951, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "14261:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "14238:36:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 955, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 916, - "src": "14288:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 956, - "name": "newVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 912, - "src": "14301:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 954, - "name": "Checkpoint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "14277:10:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Checkpoint_$50_storage_ptr_$", - "typeString": "type(struct DAOToken.Checkpoint storage pointer)" - } - }, - "id": 957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14277:33:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_memory_ptr", - "typeString": "struct DAOToken.Checkpoint memory" - } - }, - "src": "14238:72:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "id": 959, - "nodeType": "ExpressionStatement", - "src": "14238:72:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 960, - "name": "numCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "14322:14:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint32_$", - "typeString": "mapping(address => uint32)" - } - }, - "id": 962, - "indexExpression": { - "argumentTypes": null, - "id": 961, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "14337:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "14322:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 963, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "14350:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14365:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "14350:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "src": "14322:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "id": 967, - "nodeType": "ExpressionStatement", - "src": "14322:44:0" - } - ] - }, - "id": 969, - "nodeType": "IfStatement", - "src": "14051:324:0", - "trueBody": { - "id": 948, - "nodeType": "Block", - "src": "14142:78:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 937, - "name": "checkpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "14154:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$_$", - "typeString": "mapping(address => mapping(uint32 => struct DAOToken.Checkpoint storage ref))" - } - }, - "id": 942, - "indexExpression": { - "argumentTypes": null, - "id": 938, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "14166:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14154:22:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint32_$_t_struct$_Checkpoint_$50_storage_$", - "typeString": "mapping(uint32 => struct DAOToken.Checkpoint storage ref)" - } - }, - "id": 943, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "id": 941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 939, - "name": "nCheckpoints", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "14177:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 940, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14192:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "14177:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14154:40:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Checkpoint_$50_storage", - "typeString": "struct DAOToken.Checkpoint storage ref" - } - }, - "id": 944, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 49, - "src": "14154:46:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 945, - "name": "newVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 912, - "src": "14203:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "14154:57:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "id": 947, - "nodeType": "ExpressionStatement", - "src": "14154:57:0" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 971, - "name": "delegatee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 906, - "src": "14409:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 972, - "name": "oldVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "14420:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - { - "argumentTypes": null, - "id": 973, - "name": "newVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 912, - "src": "14430:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 970, - "name": "DelegateVotesChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 97, - "src": "14388:20:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14388:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 975, - "nodeType": "EmitStatement", - "src": "14383:56:0" - } - ] - }, - "documentation": null, - "id": 977, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_writeCheckpoint", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 913, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 906, - "mutability": "mutable", - "name": "delegatee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 977, - "src": "13853:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 905, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13853:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 908, - "mutability": "mutable", - "name": "nCheckpoints", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 977, - "src": "13872:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 907, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "13872:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 910, - "mutability": "mutable", - "name": "oldVotes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 977, - "src": "13893:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 909, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "13893:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 912, - "mutability": "mutable", - "name": "newVotes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 977, - "src": "13910:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 911, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "13910:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13852:74:0" - }, - "returnParameters": { - "id": 914, - "nodeType": "ParameterList", - "parameters": [], - "src": "13936:0:0" - }, - "scope": 1132, - "src": "13827:619:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1000, - "nodeType": "Block", - "src": "14535:75:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 987, - "name": "n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "14553:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_4294967296_by_1", - "typeString": "int_const 4294967296" - }, - "id": 990, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 988, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14557:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3332", - "id": 989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14560:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_32_by_1", - "typeString": "int_const 32" - }, - "value": "32" - }, - "src": "14557:5:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_4294967296_by_1", - "typeString": "int_const 4294967296" - } - }, - "src": "14553:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 992, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 981, - "src": "14564:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 986, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14545:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14545:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 994, - "nodeType": "ExpressionStatement", - "src": "14545:32:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 997, - "name": "n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "14601:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 996, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14594:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": { - "id": 995, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "14594:6:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14594:9:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "functionReturnParameters": 985, - "id": 999, - "nodeType": "Return", - "src": "14587:16:0" - } - ] - }, - "documentation": null, - "id": 1001, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safe32", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 982, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 979, - "mutability": "mutable", - "name": "n", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1001, - "src": "14468:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 978, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "14468:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 981, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1001, - "src": "14476:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 980, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14476:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14467:36:0" - }, - "returnParameters": { - "id": 985, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 984, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1001, - "src": "14527:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 983, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "14527:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14526:8:0" - }, - "scope": 1132, - "src": "14452:158:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1024, - "nodeType": "Block", - "src": "14699:75:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1011, - "name": "n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1003, - "src": "14717:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_79228162514264337593543950336_by_1", - "typeString": "int_const 79228162514264337593543950336" - }, - "id": 1014, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1012, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14721:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3936", - "id": 1013, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14724:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_96_by_1", - "typeString": "int_const 96" - }, - "value": "96" - }, - "src": "14721:5:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_79228162514264337593543950336_by_1", - "typeString": "int_const 79228162514264337593543950336" - } - }, - "src": "14717:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1016, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1005, - "src": "14728:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1010, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14709:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14709:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1018, - "nodeType": "ExpressionStatement", - "src": "14709:32:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1021, - "name": "n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1003, - "src": "14765:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1020, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14758:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint96_$", - "typeString": "type(uint96)" - }, - "typeName": { - "id": 1019, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14758:6:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14758:9:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "functionReturnParameters": 1009, - "id": 1023, - "nodeType": "Return", - "src": "14751:16:0" - } - ] - }, - "documentation": null, - "id": 1025, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safe96", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1006, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1003, - "mutability": "mutable", - "name": "n", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1025, - "src": "14632:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1002, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "14632:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1005, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1025, - "src": "14640:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1004, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14640:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14631:36:0" - }, - "returnParameters": { - "id": 1009, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1008, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1025, - "src": "14691:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1007, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14691:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14690:8:0" - }, - "scope": 1132, - "src": "14616:158:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1051, - "nodeType": "Block", - "src": "14874:90:0", - "statements": [ - { - "assignments": [ - 1037 - ], - "declarations": [ - { - "constant": false, - "id": 1037, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1051, - "src": "14884:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1036, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14884:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1041, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 1040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1038, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "14895:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1039, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1029, - "src": "14899:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "14895:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14884:16:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 1045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1043, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1037, - "src": "14918:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1044, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1027, - "src": "14923:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "14918:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1046, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1031, - "src": "14926:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1042, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14910:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14910:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1048, - "nodeType": "ExpressionStatement", - "src": "14910:29:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1049, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1037, - "src": "14956:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "functionReturnParameters": 1035, - "id": 1050, - "nodeType": "Return", - "src": "14949:8:0" - } - ] - }, - "documentation": null, - "id": 1052, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add96", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1032, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1027, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1052, - "src": "14795:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1026, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14795:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1029, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1052, - "src": "14805:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1028, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14805:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1031, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1052, - "src": "14815:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1030, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14815:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14794:48:0" - }, - "returnParameters": { - "id": 1035, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1034, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1052, - "src": "14866:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1033, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14866:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14865:8:0" - }, - "scope": 1132, - "src": "14780:184:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1074, - "nodeType": "Block", - "src": "15064:68:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 1066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1064, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1056, - "src": "15082:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 1065, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1054, - "src": "15087:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "15082:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1067, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1058, - "src": "15090:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1063, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15074:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15074:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1069, - "nodeType": "ExpressionStatement", - "src": "15074:29:0" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 1072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1070, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1054, - "src": "15120:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1071, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1056, - "src": "15124:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "15120:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "functionReturnParameters": 1062, - "id": 1073, - "nodeType": "Return", - "src": "15113:12:0" - } - ] - }, - "documentation": null, - "id": 1075, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub96", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1059, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1054, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1075, - "src": "14985:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1053, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14985:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1056, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1075, - "src": "14995:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1055, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14995:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1058, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1075, - "src": "15005:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1057, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "15005:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14984:48:0" - }, - "returnParameters": { - "id": 1062, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1061, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1075, - "src": "15056:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1060, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "15056:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15055:8:0" - }, - "scope": 1132, - "src": "14970:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1086, - "nodeType": "Block", - "src": "15189:98:0", - "statements": [ - { - "assignments": [ - 1081 - ], - "declarations": [ - { - "constant": false, - "id": 1081, - "mutability": "mutable", - "name": "chainId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1086, - "src": "15199:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1080, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15199:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1082, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "15199:15:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "15233:24:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "15235:20:0", - "value": { - "arguments": [], - "functionName": { - "name": "chainid", - "nodeType": "YulIdentifier", - "src": "15246:7:0" - }, - "nodeType": "YulFunctionCall", - "src": "15246:9:0" - }, - "variableNames": [ - { - "name": "chainId", - "nodeType": "YulIdentifier", - "src": "15235:7:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 1081, - "isOffset": false, - "isSlot": false, - "src": "15235:7:0", - "valueSize": 1 - } - ], - "id": 1083, - "nodeType": "InlineAssembly", - "src": "15224:33:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1084, - "name": "chainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "15273:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1079, - "id": 1085, - "nodeType": "Return", - "src": "15266:14:0" - } - ] - }, - "documentation": null, - "id": 1087, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getChainId", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1076, - "nodeType": "ParameterList", - "parameters": [], - "src": "15157:2:0" - }, - "returnParameters": { - "id": 1079, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1078, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1087, - "src": "15183:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1077, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15183:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15182:6:0" - }, - "scope": 1132, - "src": "15138:149:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1094, - "nodeType": "Block", - "src": "15348:35:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1092, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "15365:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1091, - "id": 1093, - "nodeType": "Return", - "src": "15358:18:0" - } - ] - }, - "documentation": null, - "functionSelector": "c4e41b22", - "id": 1095, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTotalSupply", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1088, - "nodeType": "ParameterList", - "parameters": [], - "src": "15316:2:0" - }, - "returnParameters": { - "id": 1091, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1090, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1095, - "src": "15342:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1089, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15342:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15341:6:0" - }, - "scope": 1132, - "src": "15293:90:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 1102, - "nodeType": "Block", - "src": "15449:37:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1100, - "name": "initialHolder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "15466:13:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 1099, - "id": 1101, - "nodeType": "Return", - "src": "15459:20:0" - } - ] - }, - "documentation": null, - "functionSelector": "ae80d9de", - "id": 1103, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getInitialHolder", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1096, - "nodeType": "ParameterList", - "parameters": [], - "src": "15414:2:0" - }, - "returnParameters": { - "id": 1099, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1098, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1103, - "src": "15440:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1097, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15440:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15439:9:0" - }, - "scope": 1132, - "src": "15389:97:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 1130, - "nodeType": "Block", - "src": "15541:224:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1109, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15559:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15559:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1111, - "name": "initialHolder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "15573:13:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15559:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d383a3a736574476f7665726e6f723a206d75737420626520696e697469616c20686f6c646572", - "id": 1113, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15588:44:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_27eac2f14a7a1ffe4ce21697766231448493795cbb02d7ad563beef264295011", - "typeString": "literal_string \"dCLM8::setGovernor: must be initial holder\"" - }, - "value": "dCLM8::setGovernor: must be initial holder" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_27eac2f14a7a1ffe4ce21697766231448493795cbb02d7ad563beef264295011", - "typeString": "literal_string \"dCLM8::setGovernor: must be initial holder\"" - } - ], - "id": 1108, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15551:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15551:82:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1115, - "nodeType": "ExpressionStatement", - "src": "15551:82:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1117, - "name": "governor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "15651:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1120, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15671:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1119, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15663:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1118, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15663:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15663:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "15651:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64434c4d3a3a736574476f7665726e6f723a20676f7665726e6f722063616e206f6e6c7920626520736574206f6e6365", - "id": 1123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15675:50:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1a2784fd339dea9c8336df8b2d9b9eafd30f816d0be5c67295a3322e08f684d8", - "typeString": "literal_string \"dCLM::setGovernor: governor can only be set once\"" - }, - "value": "dCLM::setGovernor: governor can only be set once" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1a2784fd339dea9c8336df8b2d9b9eafd30f816d0be5c67295a3322e08f684d8", - "typeString": "literal_string \"dCLM::setGovernor: governor can only be set once\"" - } - ], - "id": 1116, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15643:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15643:83:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1125, - "nodeType": "ExpressionStatement", - "src": "15643:83:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1126, - "name": "governor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "15736:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1127, - "name": "newGovernor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1105, - "src": "15747:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15736:22:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1129, - "nodeType": "ExpressionStatement", - "src": "15736:22:0" - } - ] - }, - "documentation": null, - "functionSelector": "c42cf535", - "id": 1131, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setGovernor", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1106, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1105, - "mutability": "mutable", - "name": "newGovernor", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1131, - "src": "15513:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1104, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15513:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15512:21:0" - }, - "returnParameters": { - "id": 1107, - "nodeType": "ParameterList", - "parameters": [], - "src": "15541:0:0" - }, - "scope": 1132, - "src": "15492:273:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 1133, - "src": "1755:14013:0" - } - ], - "src": "0:15769:0" - }, - "id": 0 - } - } - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/61309ed03e4f8b47380b5532e69fda9e.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/61309ed03e4f8b47380b5532e69fda9e.json deleted file mode 100644 index 001d633a98..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/61309ed03e4f8b47380b5532e69fda9e.json +++ /dev/null @@ -1,9630 +0,0 @@ -{ - "id": "61309ed03e4f8b47380b5532e69fda9e", - "_format": "hh-sol-build-info-1", - "solcVersion": "0.7.0", - "solcLongVersion": "0.7.0+commit.9e61f92b", - "input": { - "language": "Solidity", - "sources": { - "src/main/solidity/net-emissions-token-network/Governance/Timelock.sol": { - "content": "pragma solidity ^0.7.0;\n// SPDX-License-Identifier: BSD-3-Clause\n\n/* Copyright 2021 Compound Labs, Inc.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n3. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n// Original work from Compound: https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol\n// Modified to work in the NetEmissionsTokenNetwork system\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\n\ncontract Timelock {\n using SafeMath for uint;\n\n event NewAdmin(address indexed newAdmin);\n event NewPendingAdmin(address indexed newPendingAdmin);\n event NewDelay(uint indexed newDelay);\n event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta);\n event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta);\n event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta);\n\n uint public constant GRACE_PERIOD = 14 days;\n uint public constant MINIMUM_DELAY = 2 days;\n uint public constant MAXIMUM_DELAY = 30 days;\n\n address public admin;\n address public pendingAdmin;\n uint public delay;\n\n mapping (bytes32 => bool) public queuedTransactions;\n\n\n constructor(address admin_, uint delay_) {\n require(delay_ >= MINIMUM_DELAY, \"Timelock::constructor: Delay must exceed minimum delay.\");\n require(delay_ <= MAXIMUM_DELAY, \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n\n admin = admin_;\n delay = delay_;\n }\n\n fallback() external payable { }\n\n receive() external payable { }\n\n function setDelay(uint delay_) public {\n require(msg.sender == address(this), \"Timelock::setDelay: Call must come from Timelock.\");\n require(delay_ >= MINIMUM_DELAY, \"Timelock::setDelay: Delay must exceed minimum delay.\");\n require(delay_ <= MAXIMUM_DELAY, \"Timelock::setDelay: Delay must not exceed maximum delay.\");\n delay = delay_;\n\n emit NewDelay(delay);\n }\n\n function acceptAdmin() public {\n require(msg.sender == pendingAdmin, \"Timelock::acceptAdmin: Call must come from pendingAdmin.\");\n admin = msg.sender;\n pendingAdmin = address(0);\n\n emit NewAdmin(admin);\n }\n\n function setPendingAdmin(address pendingAdmin_) public {\n require(msg.sender == address(this), \"Timelock::setPendingAdmin: Call must come from Timelock.\");\n pendingAdmin = pendingAdmin_;\n\n emit NewPendingAdmin(pendingAdmin);\n }\n\n function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) {\n require(msg.sender == admin, \"Timelock::queueTransaction: Call must come from admin.\");\n require(eta >= getBlockTimestamp().add(delay), \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\");\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n queuedTransactions[txHash] = true;\n\n emit QueueTransaction(txHash, target, value, signature, data, eta);\n return txHash;\n }\n\n function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public {\n require(msg.sender == admin, \"Timelock::cancelTransaction: Call must come from admin.\");\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n queuedTransactions[txHash] = false;\n\n emit CancelTransaction(txHash, target, value, signature, data, eta);\n }\n\n function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) {\n require(msg.sender == admin, \"Timelock::executeTransaction: Call must come from admin.\");\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n require(queuedTransactions[txHash], \"Timelock::executeTransaction: Transaction hasn't been queued.\");\n require(getBlockTimestamp() >= eta, \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\");\n require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), \"Timelock::executeTransaction: Transaction is stale.\");\n\n queuedTransactions[txHash] = false;\n\n bytes memory callData;\n\n if (bytes(signature).length == 0) {\n callData = data;\n } else {\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\n }\n\n (bool success, bytes memory returnData) = target.call{value:value}(callData);\n require(success, \"Timelock::executeTransaction: Transaction execution reverted.\");\n\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\n\n return returnData;\n }\n\n function getBlockTimestamp() internal view returns (uint) {\n // solium-disable-next-line security/no-block-members\n return block.timestamp;\n }\n}\n" - }, - "@openzeppelin/contracts/math/SafeMath.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers" - ], - "": [ - "ast" - ] - } - } - } - }, - "output": { - "contracts": { - "@openzeppelin/contracts/math/SafeMath.sol": { - "SafeMath": { - "abi": [], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207bf6d34365e28c914b16f5470af29854d9b761a6ff3bb9456d1a636132780d2364736f6c63430007000033", - "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH28 0xF6D34365E28C914B16F5470AF29854D9B761A6FF3BB9456D1A636132 PUSH25 0xD2364736F6C63430007000033000000000000000000000000 ", - "sourceMap": "630:4578:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207bf6d34365e28c914b16f5470af29854d9b761a6ff3bb9456d1a636132780d2364736f6c63430007000033", - "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH28 0xF6D34365E28C914B16F5470AF29854D9B761A6FF3BB9456D1A636132 PUSH25 0xD2364736F6C63430007000033000000000000000000000000 ", - "sourceMap": "630:4578:0:-:0;;;;;;;;" - }, - "methodIdentifiers": {} - } - } - }, - "src/main/solidity/net-emissions-token-network/Governance/Timelock.sol": { - "Timelock": { - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "delay_", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "CancelTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "ExecuteTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "newDelay", - "type": "uint256" - } - ], - "name": "NewDelay", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "QueueTransaction", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "GRACE_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAXIMUM_DELAY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINIMUM_DELAY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "cancelTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "queueTransaction", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "queuedTransactions", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "delay_", - "type": "uint256" - } - ], - "name": "setDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pendingAdmin_", - "type": "address" - } - ], - "name": "setPendingAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "608060405234801561001057600080fd5b506040516118813803806118818339818101604052604081101561003357600080fd5b5080516020909101516202a30081101561007e5760405162461bcd60e51b81526004018080602001828103825260378152602001806118126037913960400191505060405180910390fd5b62278d008111156100c05760405162461bcd60e51b81526004018080602001828103825260388152602001806118496038913960400191505060405180910390fd5b600080546001600160a01b039093166001600160a01b03199093169290921790915560025561171e806100f46000396000f3fe6080604052600436106100c65760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e2146105e8578063e177246e146105fd578063f2b0653714610627578063f851a44014610665576100cd565b80636a42b8f8146105a95780637d645fab146105be578063b1b43ae5146105d3576100cd565b80630825f38f146100cf5780630e18b6811461028457806326782247146102995780633a66f901146102ca5780634dd18bf514610429578063591fcdfe1461045c576100cd565b366100cd57005b005b61020f600480360360a08110156100e557600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561011457600080fd5b82018360208201111561012657600080fd5b803590602001918460018302840111600160201b8311171561014757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561019957600080fd5b8201836020820111156101ab57600080fd5b803590602001918460018302840111600160201b831117156101cc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061067a915050565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610249578181015183820152602001610231565b50505050905090810190601f1680156102765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029057600080fd5b506100cd610b7a565b3480156102a557600080fd5b506102ae610c16565b604080516001600160a01b039092168252519081900360200190f35b3480156102d657600080fd5b50610417600480360360a08110156102ed57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561031c57600080fd5b82018360208201111561032e57600080fd5b803590602001918460018302840111600160201b8311171561034f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103a157600080fd5b8201836020820111156103b357600080fd5b803590602001918460018302840111600160201b831117156103d457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610c25915050565b60408051918252519081900360200190f35b34801561043557600080fd5b506100cd6004803603602081101561044c57600080fd5b50356001600160a01b0316610f27565b34801561046857600080fd5b506100cd600480360360a081101561047f57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104ae57600080fd5b8201836020820111156104c057600080fd5b803590602001918460018302840111600160201b831117156104e157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561053357600080fd5b82018360208201111561054557600080fd5b803590602001918460018302840111600160201b8311171561056657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610fb5915050565b3480156105b557600080fd5b50610417611262565b3480156105ca57600080fd5b50610417611268565b3480156105df57600080fd5b5061041761126f565b3480156105f457600080fd5b50610417611276565b34801561060957600080fd5b506100cd6004803603602081101561062057600080fd5b503561127d565b34801561063357600080fd5b506106516004803603602081101561064a57600080fd5b5035611372565b604080519115158252519081900360200190f35b34801561067157600080fd5b506102ae611387565b6000546060906001600160a01b031633146106c65760405162461bcd60e51b81526004018080602001828103825260388152602001806113fc6038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561072c578181015183820152602001610714565b50505050905090810190601f1680156107595780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561078c578181015183820152602001610774565b50505050905090810190601f1680156107b95780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600390935291205490995060ff16975061082a96505050505050505760405162461bcd60e51b815260040180806020018281038252603d81526020018061154f603d913960400191505060405180910390fd5b82610833611396565b10156108705760405162461bcd60e51b815260040180806020018281038252604581526020018061149e6045913960600191505060405180910390fd5b61087d836212750061139a565b610885611396565b11156108c25760405162461bcd60e51b815260040180806020018281038252603381526020018061146b6033913960400191505060405180910390fd5b6000818152600360205260409020805460ff1916905584516060906108e857508361096b565b85805190602001208560405160200180836001600160e01b031916815260040182805190602001908083835b602083106109335780518252601f199092019160209182019101610914565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b602083106109aa5780518252601f19909201916020918201910161098b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a0c576040519150601f19603f3d011682016040523d82523d6000602084013e610a11565b606091505b509150915081610a525760405162461bcd60e51b815260040180806020018281038252603d815260200180611632603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610acf578181015183820152602001610ab7565b50505050905090810190601f168015610afc5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b2f578181015183820152602001610b17565b50505050905090810190601f168015610b5c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610bc35760405162461bcd60e51b815260040180806020018281038252603881526020018061158c6038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b03163314610c6f5760405162461bcd60e51b81526004018080602001828103825260368152602001806115fc6036913960400191505060405180910390fd5b610c83600254610c7d611396565b9061139a565b821015610cc15760405162461bcd60e51b815260040180806020018281038252604981526020018061166f6049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610d27578181015183820152602001610d0f565b50505050905090810190601f168015610d545780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610d87578181015183820152602001610d6f565b50505050905090810190601f168015610db45780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610e7f578181015183820152602001610e67565b50505050905090810190601f168015610eac5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610edf578181015183820152602001610ec7565b50505050905090810190601f168015610f0c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b333014610f655760405162461bcd60e51b81526004018080602001828103825260388152602001806115c46038913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b03163314610ffe5760405162461bcd60e51b81526004018080602001828103825260378152602001806114346037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561106457818101518382015260200161104c565b50505050905090810190601f1680156110915780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156110c45781810151838201526020016110ac565b50505050905090810190601f1680156110f15780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156111bc5781810151838201526020016111a4565b50505050905090810190601f1680156111e95780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561121c578181015183820152602001611204565b50505050905090810190601f1680156112495780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b62278d0081565b6202a30081565b6212750081565b3330146112bb5760405162461bcd60e51b81526004018080602001828103825260318152602001806116b86031913960400191505060405180910390fd5b6202a3008110156112fd5760405162461bcd60e51b81526004018080602001828103825260348152602001806114e36034913960400191505060405180910390fd5b62278d0081111561133f5760405162461bcd60e51b81526004018080602001828103825260388152602001806115176038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b6000828201838110156113f4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea2646970667358221220f994c43d6782ed10bafd2c9d2047baccbf34a12abb61ea10bc0475d9f23ecf5b64736f6c6343000700003354696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x1881 CODESIZE SUB DUP1 PUSH2 0x1881 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x33 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 MLOAD PUSH1 0x20 SWAP1 SWAP2 ADD MLOAD PUSH3 0x2A300 DUP2 LT ISZERO PUSH2 0x7E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x37 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1812 PUSH1 0x37 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH3 0x278D00 DUP2 GT ISZERO PUSH2 0xC0 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1849 PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP4 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 SSTORE PUSH1 0x2 SSTORE PUSH2 0x171E DUP1 PUSH2 0xF4 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0xC6 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6A42B8F8 GT PUSH2 0x7F JUMPI DUP1 PUSH4 0xC1A287E2 GT PUSH2 0x59 JUMPI DUP1 PUSH4 0xC1A287E2 EQ PUSH2 0x5E8 JUMPI DUP1 PUSH4 0xE177246E EQ PUSH2 0x5FD JUMPI DUP1 PUSH4 0xF2B06537 EQ PUSH2 0x627 JUMPI DUP1 PUSH4 0xF851A440 EQ PUSH2 0x665 JUMPI PUSH2 0xCD JUMP JUMPDEST DUP1 PUSH4 0x6A42B8F8 EQ PUSH2 0x5A9 JUMPI DUP1 PUSH4 0x7D645FAB EQ PUSH2 0x5BE JUMPI DUP1 PUSH4 0xB1B43AE5 EQ PUSH2 0x5D3 JUMPI PUSH2 0xCD JUMP JUMPDEST DUP1 PUSH4 0x825F38F EQ PUSH2 0xCF JUMPI DUP1 PUSH4 0xE18B681 EQ PUSH2 0x284 JUMPI DUP1 PUSH4 0x26782247 EQ PUSH2 0x299 JUMPI DUP1 PUSH4 0x3A66F901 EQ PUSH2 0x2CA JUMPI DUP1 PUSH4 0x4DD18BF5 EQ PUSH2 0x429 JUMPI DUP1 PUSH4 0x591FCDFE EQ PUSH2 0x45C JUMPI PUSH2 0xCD JUMP JUMPDEST CALLDATASIZE PUSH2 0xCD JUMPI STOP JUMPDEST STOP JUMPDEST PUSH2 0x20F PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xA0 DUP2 LT ISZERO PUSH2 0xE5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP2 DUP2 ADD SWAP1 PUSH1 0x60 DUP2 ADD PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x114 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x126 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x147 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x199 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x1AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x1CC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP SWAP2 CALLDATALOAD SWAP3 POP PUSH2 0x67A SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x249 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x231 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x276 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x290 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xCD PUSH2 0xB7A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2A5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AE PUSH2 0xC16 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2D6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x417 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xA0 DUP2 LT ISZERO PUSH2 0x2ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP2 DUP2 ADD SWAP1 PUSH1 0x60 DUP2 ADD PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x31C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x32E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x34F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x3A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x3B3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x3D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP SWAP2 CALLDATALOAD SWAP3 POP PUSH2 0xC25 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x435 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xCD PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x44C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xF27 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x468 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xCD PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xA0 DUP2 LT ISZERO PUSH2 0x47F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP2 DUP2 ADD SWAP1 PUSH1 0x60 DUP2 ADD PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x4AE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x4C0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x4E1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x533 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x545 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x566 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP SWAP2 CALLDATALOAD SWAP3 POP PUSH2 0xFB5 SWAP2 POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5B5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x417 PUSH2 0x1262 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5CA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x417 PUSH2 0x1268 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x417 PUSH2 0x126F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5F4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x417 PUSH2 0x1276 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x609 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xCD PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x620 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x127D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x633 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x651 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x64A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1372 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x671 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AE PUSH2 0x1387 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x60 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x6C6 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x13FC PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x72C JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x714 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x759 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x78C JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x774 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x7B9 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE DUP2 MLOAD PUSH1 0x20 SWAP3 DUP4 ADD KECCAK256 PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 SWAP1 SWAP4 MSTORE SWAP2 KECCAK256 SLOAD SWAP1 SWAP10 POP PUSH1 0xFF AND SWAP8 POP PUSH2 0x82A SWAP7 POP POP POP POP POP POP POP JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x3D DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x154F PUSH1 0x3D SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP3 PUSH2 0x833 PUSH2 0x1396 JUMP JUMPDEST LT ISZERO PUSH2 0x870 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x45 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x149E PUSH1 0x45 SWAP2 CODECOPY PUSH1 0x60 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x87D DUP4 PUSH3 0x127500 PUSH2 0x139A JUMP JUMPDEST PUSH2 0x885 PUSH2 0x1396 JUMP JUMPDEST GT ISZERO PUSH2 0x8C2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x33 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x146B PUSH1 0x33 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE DUP5 MLOAD PUSH1 0x60 SWAP1 PUSH2 0x8E8 JUMPI POP DUP4 PUSH2 0x96B JUMP JUMPDEST DUP6 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 DUP6 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND DUP2 MSTORE PUSH1 0x4 ADD DUP3 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x933 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x914 JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 POP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP10 DUP5 PUSH1 0x40 MLOAD DUP1 DUP3 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x9AA JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x98B JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD SWAP2 POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0xA0C JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0xA11 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 PUSH2 0xA52 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x3D DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1632 PUSH1 0x3D SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH32 0xA560E3198060A2F10670C1EC5B403077EA6AE93CA8DE1C32B451DC1A943CD6E7 DUP12 DUP12 DUP12 DUP12 PUSH1 0x40 MLOAD DUP1 DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xACF JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xAB7 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xAFC JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xB2F JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xB17 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xB5C JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP7 POP POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xBC3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x158C PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP2 DUP3 AND OR DUP1 DUP4 SSTORE PUSH1 0x1 DUP1 SLOAD SWAP1 SWAP3 AND SWAP1 SWAP2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 PUSH32 0x71614071B88DEE5E0B2AE578A9DD7B2EBBE9AE832BA419DC0242CD065A290B6C SWAP2 LOG2 JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xC6F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x36 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x15FC PUSH1 0x36 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xC83 PUSH1 0x2 SLOAD PUSH2 0xC7D PUSH2 0x1396 JUMP JUMPDEST SWAP1 PUSH2 0x139A JUMP JUMPDEST DUP3 LT ISZERO PUSH2 0xCC1 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x166F PUSH1 0x49 SWAP2 CODECOPY PUSH1 0x60 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xD27 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xD0F JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xD54 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xD87 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xD6F JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xDB4 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP8 POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x1 PUSH1 0x3 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH32 0x76E2796DC3A81D57B0E8504B647FEBCBEEB5F4AF818E164F11EEF8131A6A763F DUP9 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD DUP1 DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xE7F JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xE67 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xEAC JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xEDF JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xEC7 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xF0C JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP7 POP POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0xF65 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x15C4 PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND SWAP2 SWAP1 SWAP2 OR SWAP2 DUP3 SWAP1 SSTORE PUSH1 0x40 MLOAD SWAP2 AND SWAP1 PUSH32 0x69D78E38A01985FBB1462961809B4B2D65531BC93B2B94037F3334B82CA4A756 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xFFE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x37 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1434 PUSH1 0x37 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP6 DUP6 DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x1064 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x104C JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x1091 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x10C4 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x10AC JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x10F1 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP8 POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH1 0x3 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH32 0x2FFFC091A501FD91BFBFF27141450D3ACB40FB8E6D8382B243EC7A812A3AAF87 DUP8 DUP8 DUP8 DUP8 PUSH1 0x40 MLOAD DUP1 DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x11BC JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x11A4 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x11E9 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x121C JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x1204 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x1249 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP7 POP POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD DUP2 JUMP JUMPDEST PUSH3 0x278D00 DUP2 JUMP JUMPDEST PUSH3 0x2A300 DUP2 JUMP JUMPDEST PUSH3 0x127500 DUP2 JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x12BB JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x31 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x16B8 PUSH1 0x31 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH3 0x2A300 DUP2 LT ISZERO PUSH2 0x12FD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x34 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x14E3 PUSH1 0x34 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH3 0x278D00 DUP2 GT ISZERO PUSH2 0x133F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1517 PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD DUP2 SWAP1 PUSH32 0x948B1F6A42EE138B7E34058BA85A37F716D55FF25FF05A763F15BED6A04C8D2C SWAP1 PUSH1 0x0 SWAP1 LOG2 POP JUMP JUMPDEST PUSH1 0x3 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST TIMESTAMP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x13F4 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1B PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID SLOAD PUSH10 0x6D656C6F636B3A3A6578 PUSH6 0x637574655472 PUSH2 0x6E73 PUSH2 0x6374 PUSH10 0x6F6E3A2043616C6C206D PUSH22 0x737420636F6D652066726F6D2061646D696E2E54696D PUSH6 0x6C6F636B3A3A PUSH4 0x616E6365 PUSH13 0x5472616E73616374696F6E3A20 NUMBER PUSH2 0x6C6C KECCAK256 PUSH14 0x75737420636F6D652066726F6D20 PUSH2 0x646D PUSH10 0x6E2E54696D656C6F636B GASPRICE GASPRICE PUSH6 0x786563757465 SLOAD PUSH19 0x616E73616374696F6E3A205472616E73616374 PUSH10 0x6F6E206973207374616C PUSH6 0x2E54696D656C PUSH16 0x636B3A3A657865637574655472616E73 PUSH2 0x6374 PUSH10 0x6F6E3A205472616E7361 PUSH4 0x74696F6E KECCAK256 PUSH9 0x61736E277420737572 PUSH17 0x61737365642074696D65206C6F636B2E54 PUSH10 0x6D656C6F636B3A3A7365 PUSH21 0x44656C61793A2044656C6179206D75737420657863 PUSH6 0x6564206D696E PUSH10 0x6D756D2064656C61792E SLOAD PUSH10 0x6D656C6F636B3A3A7365 PUSH21 0x44656C61793A2044656C6179206D757374206E6F74 KECCAK256 PUSH6 0x786365656420 PUSH14 0x6178696D756D2064656C61792E54 PUSH10 0x6D656C6F636B3A3A6578 PUSH6 0x637574655472 PUSH2 0x6E73 PUSH2 0x6374 PUSH10 0x6F6E3A205472616E7361 PUSH4 0x74696F6E KECCAK256 PUSH9 0x61736E277420626565 PUSH15 0x207175657565642E54696D656C6F63 PUSH12 0x3A3A61636365707441646D69 PUSH15 0x3A2043616C6C206D75737420636F6D PUSH6 0x2066726F6D20 PUSH17 0x656E64696E6741646D696E2E54696D656C PUSH16 0x636B3A3A73657450656E64696E674164 PUSH14 0x696E3A2043616C6C206D75737420 PUSH4 0x6F6D6520 PUSH7 0x726F6D2054696D PUSH6 0x6C6F636B2E54 PUSH10 0x6D656C6F636B3A3A7175 PUSH6 0x75655472616E PUSH20 0x616374696F6E3A2043616C6C206D75737420636F PUSH14 0x652066726F6D2061646D696E2E54 PUSH10 0x6D656C6F636B3A3A6578 PUSH6 0x637574655472 PUSH2 0x6E73 PUSH2 0x6374 PUSH10 0x6F6E3A205472616E7361 PUSH4 0x74696F6E KECCAK256 PUSH6 0x786563757469 PUSH16 0x6E2072657665727465642E54696D656C PUSH16 0x636B3A3A71756575655472616E736163 PUSH21 0x696F6E3A20457374696D6174656420657865637574 PUSH10 0x6F6E20626C6F636B206D PUSH22 0x737420736174697366792064656C61792E54696D656C PUSH16 0x636B3A3A73657444656C61793A204361 PUSH13 0x6C206D75737420636F6D652066 PUSH19 0x6F6D2054696D656C6F636B2EA2646970667358 0x22 SLT KECCAK256 0xF9 SWAP5 0xC4 RETURNDATASIZE PUSH8 0x82ED10BAFD2C9D20 SELFBALANCE 0xBA 0xCC 0xBF CALLVALUE LOG1 0x2A 0xBB PUSH2 0xEA10 0xBC DIV PUSH22 0xD9F23ECF5B64736F6C6343000700003354696D656C6F PUSH4 0x6B3A3A63 PUSH16 0x6E7374727563746F723A2044656C6179 KECCAK256 PUSH14 0x75737420657863656564206D696E PUSH10 0x6D756D2064656C61792E SLOAD PUSH10 0x6D656C6F636B3A3A7365 PUSH21 0x44656C61793A2044656C6179206D757374206E6F74 KECCAK256 PUSH6 0x786365656420 PUSH14 0x6178696D756D2064656C61792E00 ", - "sourceMap": "1767:4604:1:-:0;;;2651:300;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2651:300:1;;;;;;;2446:6;2710:23;;;2702:91;;;;-1:-1:-1;;;2702:91:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2495:7;2811:6;:23;;2803:92;;;;-1:-1:-1;;;2803:92:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2906:5;:14;;-1:-1:-1;;;;;2906:14:1;;;-1:-1:-1;;;;;;2906:14:1;;;;;;;;;;2930:5;:14;1767:4604;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "6080604052600436106100c65760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e2146105e8578063e177246e146105fd578063f2b0653714610627578063f851a44014610665576100cd565b80636a42b8f8146105a95780637d645fab146105be578063b1b43ae5146105d3576100cd565b80630825f38f146100cf5780630e18b6811461028457806326782247146102995780633a66f901146102ca5780634dd18bf514610429578063591fcdfe1461045c576100cd565b366100cd57005b005b61020f600480360360a08110156100e557600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561011457600080fd5b82018360208201111561012657600080fd5b803590602001918460018302840111600160201b8311171561014757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561019957600080fd5b8201836020820111156101ab57600080fd5b803590602001918460018302840111600160201b831117156101cc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061067a915050565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610249578181015183820152602001610231565b50505050905090810190601f1680156102765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029057600080fd5b506100cd610b7a565b3480156102a557600080fd5b506102ae610c16565b604080516001600160a01b039092168252519081900360200190f35b3480156102d657600080fd5b50610417600480360360a08110156102ed57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561031c57600080fd5b82018360208201111561032e57600080fd5b803590602001918460018302840111600160201b8311171561034f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103a157600080fd5b8201836020820111156103b357600080fd5b803590602001918460018302840111600160201b831117156103d457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610c25915050565b60408051918252519081900360200190f35b34801561043557600080fd5b506100cd6004803603602081101561044c57600080fd5b50356001600160a01b0316610f27565b34801561046857600080fd5b506100cd600480360360a081101561047f57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104ae57600080fd5b8201836020820111156104c057600080fd5b803590602001918460018302840111600160201b831117156104e157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561053357600080fd5b82018360208201111561054557600080fd5b803590602001918460018302840111600160201b8311171561056657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610fb5915050565b3480156105b557600080fd5b50610417611262565b3480156105ca57600080fd5b50610417611268565b3480156105df57600080fd5b5061041761126f565b3480156105f457600080fd5b50610417611276565b34801561060957600080fd5b506100cd6004803603602081101561062057600080fd5b503561127d565b34801561063357600080fd5b506106516004803603602081101561064a57600080fd5b5035611372565b604080519115158252519081900360200190f35b34801561067157600080fd5b506102ae611387565b6000546060906001600160a01b031633146106c65760405162461bcd60e51b81526004018080602001828103825260388152602001806113fc6038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561072c578181015183820152602001610714565b50505050905090810190601f1680156107595780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561078c578181015183820152602001610774565b50505050905090810190601f1680156107b95780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600390935291205490995060ff16975061082a96505050505050505760405162461bcd60e51b815260040180806020018281038252603d81526020018061154f603d913960400191505060405180910390fd5b82610833611396565b10156108705760405162461bcd60e51b815260040180806020018281038252604581526020018061149e6045913960600191505060405180910390fd5b61087d836212750061139a565b610885611396565b11156108c25760405162461bcd60e51b815260040180806020018281038252603381526020018061146b6033913960400191505060405180910390fd5b6000818152600360205260409020805460ff1916905584516060906108e857508361096b565b85805190602001208560405160200180836001600160e01b031916815260040182805190602001908083835b602083106109335780518252601f199092019160209182019101610914565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b602083106109aa5780518252601f19909201916020918201910161098b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a0c576040519150601f19603f3d011682016040523d82523d6000602084013e610a11565b606091505b509150915081610a525760405162461bcd60e51b815260040180806020018281038252603d815260200180611632603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610acf578181015183820152602001610ab7565b50505050905090810190601f168015610afc5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b2f578181015183820152602001610b17565b50505050905090810190601f168015610b5c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610bc35760405162461bcd60e51b815260040180806020018281038252603881526020018061158c6038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b03163314610c6f5760405162461bcd60e51b81526004018080602001828103825260368152602001806115fc6036913960400191505060405180910390fd5b610c83600254610c7d611396565b9061139a565b821015610cc15760405162461bcd60e51b815260040180806020018281038252604981526020018061166f6049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610d27578181015183820152602001610d0f565b50505050905090810190601f168015610d545780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610d87578181015183820152602001610d6f565b50505050905090810190601f168015610db45780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610e7f578181015183820152602001610e67565b50505050905090810190601f168015610eac5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610edf578181015183820152602001610ec7565b50505050905090810190601f168015610f0c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b333014610f655760405162461bcd60e51b81526004018080602001828103825260388152602001806115c46038913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b03163314610ffe5760405162461bcd60e51b81526004018080602001828103825260378152602001806114346037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561106457818101518382015260200161104c565b50505050905090810190601f1680156110915780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156110c45781810151838201526020016110ac565b50505050905090810190601f1680156110f15780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156111bc5781810151838201526020016111a4565b50505050905090810190601f1680156111e95780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561121c578181015183820152602001611204565b50505050905090810190601f1680156112495780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b62278d0081565b6202a30081565b6212750081565b3330146112bb5760405162461bcd60e51b81526004018080602001828103825260318152602001806116b86031913960400191505060405180910390fd5b6202a3008110156112fd5760405162461bcd60e51b81526004018080602001828103825260348152602001806114e36034913960400191505060405180910390fd5b62278d0081111561133f5760405162461bcd60e51b81526004018080602001828103825260388152602001806115176038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b6000828201838110156113f4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea2646970667358221220f994c43d6782ed10bafd2c9d2047baccbf34a12abb61ea10bc0475d9f23ecf5b64736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0xC6 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6A42B8F8 GT PUSH2 0x7F JUMPI DUP1 PUSH4 0xC1A287E2 GT PUSH2 0x59 JUMPI DUP1 PUSH4 0xC1A287E2 EQ PUSH2 0x5E8 JUMPI DUP1 PUSH4 0xE177246E EQ PUSH2 0x5FD JUMPI DUP1 PUSH4 0xF2B06537 EQ PUSH2 0x627 JUMPI DUP1 PUSH4 0xF851A440 EQ PUSH2 0x665 JUMPI PUSH2 0xCD JUMP JUMPDEST DUP1 PUSH4 0x6A42B8F8 EQ PUSH2 0x5A9 JUMPI DUP1 PUSH4 0x7D645FAB EQ PUSH2 0x5BE JUMPI DUP1 PUSH4 0xB1B43AE5 EQ PUSH2 0x5D3 JUMPI PUSH2 0xCD JUMP JUMPDEST DUP1 PUSH4 0x825F38F EQ PUSH2 0xCF JUMPI DUP1 PUSH4 0xE18B681 EQ PUSH2 0x284 JUMPI DUP1 PUSH4 0x26782247 EQ PUSH2 0x299 JUMPI DUP1 PUSH4 0x3A66F901 EQ PUSH2 0x2CA JUMPI DUP1 PUSH4 0x4DD18BF5 EQ PUSH2 0x429 JUMPI DUP1 PUSH4 0x591FCDFE EQ PUSH2 0x45C JUMPI PUSH2 0xCD JUMP JUMPDEST CALLDATASIZE PUSH2 0xCD JUMPI STOP JUMPDEST STOP JUMPDEST PUSH2 0x20F PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xA0 DUP2 LT ISZERO PUSH2 0xE5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP2 DUP2 ADD SWAP1 PUSH1 0x60 DUP2 ADD PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x114 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x126 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x147 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x199 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x1AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x1CC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP SWAP2 CALLDATALOAD SWAP3 POP PUSH2 0x67A SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x249 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x231 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x276 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x290 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xCD PUSH2 0xB7A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2A5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AE PUSH2 0xC16 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2D6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x417 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xA0 DUP2 LT ISZERO PUSH2 0x2ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP2 DUP2 ADD SWAP1 PUSH1 0x60 DUP2 ADD PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x31C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x32E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x34F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x3A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x3B3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x3D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP SWAP2 CALLDATALOAD SWAP3 POP PUSH2 0xC25 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x435 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xCD PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x44C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xF27 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x468 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xCD PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xA0 DUP2 LT ISZERO PUSH2 0x47F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP2 DUP2 ADD SWAP1 PUSH1 0x60 DUP2 ADD PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x4AE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x4C0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x4E1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x533 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x545 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x566 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP SWAP2 CALLDATALOAD SWAP3 POP PUSH2 0xFB5 SWAP2 POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5B5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x417 PUSH2 0x1262 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5CA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x417 PUSH2 0x1268 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x417 PUSH2 0x126F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5F4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x417 PUSH2 0x1276 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x609 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xCD PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x620 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x127D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x633 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x651 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x64A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x1372 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x671 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AE PUSH2 0x1387 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x60 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x6C6 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x13FC PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x72C JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x714 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x759 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x78C JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x774 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x7B9 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 DUP2 MSTORE DUP2 MLOAD PUSH1 0x20 SWAP3 DUP4 ADD KECCAK256 PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 SWAP1 SWAP4 MSTORE SWAP2 KECCAK256 SLOAD SWAP1 SWAP10 POP PUSH1 0xFF AND SWAP8 POP PUSH2 0x82A SWAP7 POP POP POP POP POP POP POP JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x3D DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x154F PUSH1 0x3D SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP3 PUSH2 0x833 PUSH2 0x1396 JUMP JUMPDEST LT ISZERO PUSH2 0x870 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x45 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x149E PUSH1 0x45 SWAP2 CODECOPY PUSH1 0x60 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x87D DUP4 PUSH3 0x127500 PUSH2 0x139A JUMP JUMPDEST PUSH2 0x885 PUSH2 0x1396 JUMP JUMPDEST GT ISZERO PUSH2 0x8C2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x33 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x146B PUSH1 0x33 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE DUP5 MLOAD PUSH1 0x60 SWAP1 PUSH2 0x8E8 JUMPI POP DUP4 PUSH2 0x96B JUMP JUMPDEST DUP6 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 DUP6 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND DUP2 MSTORE PUSH1 0x4 ADD DUP3 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x933 JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x914 JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE SWAP1 POP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP10 DUP5 PUSH1 0x40 MLOAD DUP1 DUP3 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 JUMPDEST PUSH1 0x20 DUP4 LT PUSH2 0x9AA JUMPI DUP1 MLOAD DUP3 MSTORE PUSH1 0x1F NOT SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0x98B JUMP JUMPDEST PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB DUP1 NOT DUP3 MLOAD AND DUP2 DUP5 MLOAD AND DUP1 DUP3 OR DUP6 MSTORE POP POP POP POP POP POP SWAP1 POP ADD SWAP2 POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0xA0C JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0xA11 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 PUSH2 0xA52 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x3D DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1632 PUSH1 0x3D SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH32 0xA560E3198060A2F10670C1EC5B403077EA6AE93CA8DE1C32B451DC1A943CD6E7 DUP12 DUP12 DUP12 DUP12 PUSH1 0x40 MLOAD DUP1 DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xACF JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xAB7 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xAFC JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xB2F JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xB17 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xB5C JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP7 POP POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xBC3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x158C PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP2 DUP3 AND OR DUP1 DUP4 SSTORE PUSH1 0x1 DUP1 SLOAD SWAP1 SWAP3 AND SWAP1 SWAP2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 PUSH32 0x71614071B88DEE5E0B2AE578A9DD7B2EBBE9AE832BA419DC0242CD065A290B6C SWAP2 LOG2 JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xC6F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x36 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x15FC PUSH1 0x36 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xC83 PUSH1 0x2 SLOAD PUSH2 0xC7D PUSH2 0x1396 JUMP JUMPDEST SWAP1 PUSH2 0x139A JUMP JUMPDEST DUP3 LT ISZERO PUSH2 0xCC1 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x49 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x166F PUSH1 0x49 SWAP2 CODECOPY PUSH1 0x60 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xD27 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xD0F JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xD54 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xD87 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xD6F JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xDB4 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP8 POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x1 PUSH1 0x3 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH32 0x76E2796DC3A81D57B0E8504B647FEBCBEEB5F4AF818E164F11EEF8131A6A763F DUP9 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD DUP1 DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xE7F JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xE67 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xEAC JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xEDF JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xEC7 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xF0C JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP7 POP POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0xF65 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x15C4 PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND SWAP2 SWAP1 SWAP2 OR SWAP2 DUP3 SWAP1 SSTORE PUSH1 0x40 MLOAD SWAP2 AND SWAP1 PUSH32 0x69D78E38A01985FBB1462961809B4B2D65531BC93B2B94037F3334B82CA4A756 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xFFE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x37 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1434 PUSH1 0x37 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP6 DUP6 DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x1064 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x104C JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x1091 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x10C4 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x10AC JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x10F1 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP8 POP POP POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH1 0x3 PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH32 0x2FFFC091A501FD91BFBFF27141450D3ACB40FB8E6D8382B243EC7A812A3AAF87 DUP8 DUP8 DUP8 DUP8 PUSH1 0x40 MLOAD DUP1 DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x11BC JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x11A4 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x11E9 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP DUP4 DUP2 SUB DUP3 MSTORE DUP6 MLOAD DUP2 MSTORE DUP6 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 DUP8 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x121C JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x1204 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x1249 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP7 POP POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD DUP2 JUMP JUMPDEST PUSH3 0x278D00 DUP2 JUMP JUMPDEST PUSH3 0x2A300 DUP2 JUMP JUMPDEST PUSH3 0x127500 DUP2 JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x12BB JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x31 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x16B8 PUSH1 0x31 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH3 0x2A300 DUP2 LT ISZERO PUSH2 0x12FD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x34 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x14E3 PUSH1 0x34 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH3 0x278D00 DUP2 GT ISZERO PUSH2 0x133F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x38 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1517 PUSH1 0x38 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD DUP2 SWAP1 PUSH32 0x948B1F6A42EE138B7E34058BA85A37F716D55FF25FF05A763F15BED6A04C8D2C SWAP1 PUSH1 0x0 SWAP1 LOG2 POP JUMP JUMPDEST PUSH1 0x3 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST TIMESTAMP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x13F4 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1B PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID SLOAD PUSH10 0x6D656C6F636B3A3A6578 PUSH6 0x637574655472 PUSH2 0x6E73 PUSH2 0x6374 PUSH10 0x6F6E3A2043616C6C206D PUSH22 0x737420636F6D652066726F6D2061646D696E2E54696D PUSH6 0x6C6F636B3A3A PUSH4 0x616E6365 PUSH13 0x5472616E73616374696F6E3A20 NUMBER PUSH2 0x6C6C KECCAK256 PUSH14 0x75737420636F6D652066726F6D20 PUSH2 0x646D PUSH10 0x6E2E54696D656C6F636B GASPRICE GASPRICE PUSH6 0x786563757465 SLOAD PUSH19 0x616E73616374696F6E3A205472616E73616374 PUSH10 0x6F6E206973207374616C PUSH6 0x2E54696D656C PUSH16 0x636B3A3A657865637574655472616E73 PUSH2 0x6374 PUSH10 0x6F6E3A205472616E7361 PUSH4 0x74696F6E KECCAK256 PUSH9 0x61736E277420737572 PUSH17 0x61737365642074696D65206C6F636B2E54 PUSH10 0x6D656C6F636B3A3A7365 PUSH21 0x44656C61793A2044656C6179206D75737420657863 PUSH6 0x6564206D696E PUSH10 0x6D756D2064656C61792E SLOAD PUSH10 0x6D656C6F636B3A3A7365 PUSH21 0x44656C61793A2044656C6179206D757374206E6F74 KECCAK256 PUSH6 0x786365656420 PUSH14 0x6178696D756D2064656C61792E54 PUSH10 0x6D656C6F636B3A3A6578 PUSH6 0x637574655472 PUSH2 0x6E73 PUSH2 0x6374 PUSH10 0x6F6E3A205472616E7361 PUSH4 0x74696F6E KECCAK256 PUSH9 0x61736E277420626565 PUSH15 0x207175657565642E54696D656C6F63 PUSH12 0x3A3A61636365707441646D69 PUSH15 0x3A2043616C6C206D75737420636F6D PUSH6 0x2066726F6D20 PUSH17 0x656E64696E6741646D696E2E54696D656C PUSH16 0x636B3A3A73657450656E64696E674164 PUSH14 0x696E3A2043616C6C206D75737420 PUSH4 0x6F6D6520 PUSH7 0x726F6D2054696D PUSH6 0x6C6F636B2E54 PUSH10 0x6D656C6F636B3A3A7175 PUSH6 0x75655472616E PUSH20 0x616374696F6E3A2043616C6C206D75737420636F PUSH14 0x652066726F6D2061646D696E2E54 PUSH10 0x6D656C6F636B3A3A6578 PUSH6 0x637574655472 PUSH2 0x6E73 PUSH2 0x6374 PUSH10 0x6F6E3A205472616E7361 PUSH4 0x74696F6E KECCAK256 PUSH6 0x786563757469 PUSH16 0x6E2072657665727465642E54696D656C PUSH16 0x636B3A3A71756575655472616E736163 PUSH21 0x696F6E3A20457374696D6174656420657865637574 PUSH10 0x6F6E20626C6F636B206D PUSH22 0x737420736174697366792064656C61792E54696D656C PUSH16 0x636B3A3A73657444656C61793A204361 PUSH13 0x6C206D75737420636F6D652066 PUSH19 0x6F6D2054696D656C6F636B2EA2646970667358 0x22 SLT KECCAK256 0xF9 SWAP5 0xC4 RETURNDATASIZE PUSH8 0x82ED10BAFD2C9D20 SELFBALANCE 0xBA 0xCC 0xBF CALLVALUE LOG1 0x2A 0xBB PUSH2 0xEA10 0xBC DIV PUSH22 0xD9F23ECF5B64736F6C63430007000033000000000000 ", - "sourceMap": "1767:4604:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4972:1232;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4972:1232:1;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4972:1232:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4972:1232:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4972:1232:1;;;;;;;;-1:-1:-1;4972:1232:1;;-1:-1:-1;;;;;4972:1232:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4972:1232:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4972:1232:1;;-1:-1:-1;;4972:1232:1;;;-1:-1:-1;4972:1232:1;;-1:-1:-1;;4972:1232:1:i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3435:236;;;;;;;;;;;;;:::i;2535:27::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;2535:27:1;;;;;;;;;;;;;;3934:598;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3934:598:1;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3934:598:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3934:598:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3934:598:1;;;;;;;;-1:-1:-1;3934:598:1;;-1:-1:-1;;;;;3934:598:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3934:598:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3934:598:1;;-1:-1:-1;;3934:598:1;;;-1:-1:-1;3934:598:1;;-1:-1:-1;;3934:598:1:i;:::-;;;;;;;;;;;;;;;;3677:251;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3677:251:1;-1:-1:-1;;;;;3677:251:1;;:::i;4538:428::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4538:428:1;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4538:428:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4538:428:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4538:428:1;;;;;;;;-1:-1:-1;4538:428:1;;-1:-1:-1;;;;;4538:428:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4538:428:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4538:428:1;;-1:-1:-1;;4538:428:1;;;-1:-1:-1;4538:428:1;;-1:-1:-1;;4538:428:1:i;2568:17::-;;;;;;;;;;;;;:::i;2458:44::-;;;;;;;;;;;;;:::i;2409:43::-;;;;;;;;;;;;;:::i;2360:::-;;;;;;;;;;;;;:::i;3030:399::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3030:399:1;;:::i;2592:51::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2592:51:1;;:::i;:::-;;;;;;;;;;;;;;;;;;2509:20;;;;;;;;;;;;;:::i;4972:1232::-;5152:5;;5106:12;;-1:-1:-1;;;;;5152:5:1;5138:10;:19;5130:88;;;;-1:-1:-1;;;5130:88:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5229:14;5267:6;5275:5;5282:9;5293:4;5299:3;5256:47;;;;;;-1:-1:-1;;;;;5256:47:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5256:47:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5256:47:1;;;-1:-1:-1;;5256:47:1;;;;;;;;;5246:58;;5256:47;5246:58;;;;5322:26;;;;:18;:26;;;;;;5246:58;;-1:-1:-1;5322:26:1;;;-1:-1:-1;5314:100:1;;-1:-1:-1;;;;;;;5314:100:1;;;-1:-1:-1;;;5314:100:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5455:3;5432:19;:17;:19::i;:::-;:26;;5424:108;;;;-1:-1:-1;;;5424:108:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5573:21;:3;2396:7;5573;:21::i;:::-;5550:19;:17;:19::i;:::-;:44;;5542:108;;;;-1:-1:-1;;;5542:108:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5690:5;5661:26;;;:18;:26;;;;;:34;;-1:-1:-1;;5661:34:1;;;5742:23;;5706:21;;5738:175;;-1:-1:-1;5797:4:1;5738:175;;;5883:9;5867:27;;;;;;5897:4;5843:59;;;;;;-1:-1:-1;;;;;5843:59:1;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5843:59:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5832:70;;5738:175;5924:12;5938:23;5965:6;-1:-1:-1;;;;;5965:11:1;5983:5;5990:8;5965:34;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5965:34:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5923:76;;;;6017:7;6009:81;;;;-1:-1:-1;;;6009:81:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6133:6;-1:-1:-1;;;;;6106:63:1;6125:6;6106:63;6141:5;6148:9;6159:4;6165:3;6106:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6106:63:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6187:10;4972:1232;-1:-1:-1;;;;;;;;;4972:1232:1:o;3435:236::-;3497:12;;-1:-1:-1;;;;;3497:12:1;3483:10;:26;3475:95;;;;-1:-1:-1;;;3475:95:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3580:5;:18;;3588:10;-1:-1:-1;;;;;;3580:18:1;;;;;;;-1:-1:-1;3608:25:1;;;;;;;;3649:15;;-1:-1:-1;;;;;3658:5:1;;;;3649:15;;;3435:236::o;2535:27::-;;;-1:-1:-1;;;;;2535:27:1;;:::o;3934:598::-;4058:7;4099:5;;-1:-1:-1;;;;;4099:5:1;4085:10;:19;4077:86;;;;-1:-1:-1;;;4077:86:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4188:30;4212:5;;4188:19;:17;:19::i;:::-;:23;;:30::i;:::-;4181:3;:37;;4173:123;;;;-1:-1:-1;;;4173:123:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4307:14;4345:6;4353:5;4360:9;4371:4;4377:3;4334:47;;;;;;-1:-1:-1;;;;;4334:47:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4334:47:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4324:58;;;;;;4307:75;;4421:4;4392:18;:26;4411:6;4392:26;;;;;;;;;;;;:33;;;;;;;;;;;;;;;;;;4466:6;-1:-1:-1;;;;;4441:61:1;4458:6;4441:61;4474:5;4481:9;4492:4;4498:3;4441:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4441:61:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4519:6;3934:598;-1:-1:-1;;;;;;3934:598:1:o;3677:251::-;3750:10;3772:4;3750:27;3742:96;;;;-1:-1:-1;;;3742:96:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3848:12;:28;;-1:-1:-1;;;;;;3848:28:1;-1:-1:-1;;;;;3848:28:1;;;;;;;;;;;3892:29;;3908:12;;;3892:29;;-1:-1:-1;;3892:29:1;3677:251;:::o;4538:428::-;4686:5;;-1:-1:-1;;;;;4686:5:1;4672:10;:19;4664:87;;;;-1:-1:-1;;;4664:87:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4762:14;4800:6;4808:5;4815:9;4826:4;4832:3;4789:47;;;;;;-1:-1:-1;;;;;4789:47:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4789:47:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4779:58;;;;;;4762:75;;4876:5;4847:18;:26;4866:6;4847:26;;;;;;;;;;;;:34;;;;;;;;;;;;;;;;;;4923:6;-1:-1:-1;;;;;4897:62:1;4915:6;4897:62;4931:5;4938:9;4949:4;4955:3;4897:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4897:62:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4538:428;;;;;;:::o;2568:17::-;;;;:::o;2458:44::-;2495:7;2458:44;:::o;2409:43::-;2446:6;2409:43;:::o;2360:::-;2396:7;2360:43;:::o;3030:399::-;3086:10;3108:4;3086:27;3078:89;;;;-1:-1:-1;;;3078:89:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2446:6;3185;:23;;3177:88;;;;-1:-1:-1;;;3177:88:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2495:7;3283:6;:23;;3275:92;;;;-1:-1:-1;;;3275:92:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3377:5;:14;;;3407:15;;3385:6;;3407:15;;;;;3030:399;:::o;2592:51::-;;;;;;;;;;;;;;;:::o;2509:20::-;;;-1:-1:-1;;;;;2509:20:1;;:::o;6210:159::-;6347:15;6210:159;:::o;882:176:0:-;940:7;971:5;;;994:6;;;;986:46;;;;;-1:-1:-1;;;986:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;1050:1;882:176;-1:-1:-1;;;882:176:0:o" - }, - "methodIdentifiers": { - "GRACE_PERIOD()": "c1a287e2", - "MAXIMUM_DELAY()": "7d645fab", - "MINIMUM_DELAY()": "b1b43ae5", - "acceptAdmin()": "0e18b681", - "admin()": "f851a440", - "cancelTransaction(address,uint256,string,bytes,uint256)": "591fcdfe", - "delay()": "6a42b8f8", - "executeTransaction(address,uint256,string,bytes,uint256)": "0825f38f", - "pendingAdmin()": "26782247", - "queueTransaction(address,uint256,string,bytes,uint256)": "3a66f901", - "queuedTransactions(bytes32)": "f2b06537", - "setDelay(uint256)": "e177246e", - "setPendingAdmin(address)": "4dd18bf5" - } - } - } - } - }, - "sources": { - "@openzeppelin/contracts/math/SafeMath.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "exportedSymbols": { - "SafeMath": [ - 195 - ] - }, - "id": 196, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.6", - ".0", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 2, - "nodeType": "StructuredDocumentation", - "src": "66:563:0", - "text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n Arithmetic operations in Solidity wrap on overflow. This can easily result\n in bugs, because programmers usually assume that an overflow raises an\n error, which is the standard behavior in high level programming languages.\n `SafeMath` restores this intuition by reverting the transaction when an\n operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always." - }, - "fullyImplemented": true, - "id": 195, - "linearizedBaseContracts": [ - 195 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 27, - "nodeType": "Block", - "src": "949:109:0", - "statements": [ - { - "assignments": [ - 13 - ], - "declarations": [ - { - "constant": false, - "id": 13, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 27, - "src": "959:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "959:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 17, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 14, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "971:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 15, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "975:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "971:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "959:17:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 19, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "994:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 20, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "999:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "994:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 22, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1002:29:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 18, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "986:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "986:46:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 24, - "nodeType": "ExpressionStatement", - "src": "986:46:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 25, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1050:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11, - "id": 26, - "nodeType": "Return", - "src": "1043:8:0" - } - ] - }, - "documentation": { - "id": 3, - "nodeType": "StructuredDocumentation", - "src": "653:224:0", - "text": " @dev Returns the addition of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `+` operator.\n Requirements:\n - Addition cannot overflow." - }, - "id": 28, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 8, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 28, - "src": "895:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "895:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 28, - "src": "906:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "906:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "894:22:0" - }, - "returnParameters": { - "id": 11, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 28, - "src": "940:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "940:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "939:9:0" - }, - "scope": 195, - "src": "882:176:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 44, - "nodeType": "Block", - "src": "1396:67:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 39, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "1417:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 40, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "1420:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1423:32:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 38, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 45, - 73 - ], - "referencedDeclaration": 73, - "src": "1413:3:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 42, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1413:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 37, - "id": 43, - "nodeType": "Return", - "src": "1406:50:0" - } - ] - }, - "documentation": { - "id": 29, - "nodeType": "StructuredDocumentation", - "src": "1064:260:0", - "text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow." - }, - "id": 45, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 34, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 45, - "src": "1342:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 30, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1342:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 33, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 45, - "src": "1353:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 32, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1353:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1341:22:0" - }, - "returnParameters": { - "id": 37, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 36, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 45, - "src": "1387:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 35, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1387:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1386:9:0" - }, - "scope": 195, - "src": "1329:134:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 72, - "nodeType": "Block", - "src": "1849:92:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 58, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "1867:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 59, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "1872:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1867:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 61, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "1875:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 57, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1859:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1859:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 63, - "nodeType": "ExpressionStatement", - "src": "1859:29:0" - }, - { - "assignments": [ - 65 - ], - "declarations": [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 72, - "src": "1898:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1898:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 69, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 66, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "1910:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 67, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "1914:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1910:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1898:17:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 70, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 65, - "src": "1933:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 56, - "id": 71, - "nodeType": "Return", - "src": "1926:8:0" - } - ] - }, - "documentation": { - "id": 46, - "nodeType": "StructuredDocumentation", - "src": "1469:280:0", - "text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow." - }, - "id": 73, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 53, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 73, - "src": "1767:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1767:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 50, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 73, - "src": "1778:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 49, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1778:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 52, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 73, - "src": "1789:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 51, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1789:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1766:50:0" - }, - "returnParameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 55, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 73, - "src": "1840:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 54, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1840:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1839:9:0" - }, - "scope": 195, - "src": "1754:187:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 107, - "nodeType": "Block", - "src": "2255:392:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 85, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 83, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "2487:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 84, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2492:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2487:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 89, - "nodeType": "IfStatement", - "src": "2483:45:0", - "trueBody": { - "id": 88, - "nodeType": "Block", - "src": "2495:33:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 86, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2516:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 82, - "id": 87, - "nodeType": "Return", - "src": "2509:8:0" - } - ] - } - }, - { - "assignments": [ - 91 - ], - "declarations": [ - { - "constant": false, - "id": 91, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 107, - "src": "2538:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 90, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2538:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 95, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 92, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "2550:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 93, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "2554:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2550:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2538:17:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 97, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 91, - "src": "2573:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 98, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "2577:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2573:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 100, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "2582:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2573:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 102, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2585:35:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 96, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2565:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2565:56:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 104, - "nodeType": "ExpressionStatement", - "src": "2565:56:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 105, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 91, - "src": "2639:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 82, - "id": 106, - "nodeType": "Return", - "src": "2632:8:0" - } - ] - }, - "documentation": { - "id": 74, - "nodeType": "StructuredDocumentation", - "src": "1947:236:0", - "text": " @dev Returns the multiplication of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `*` operator.\n Requirements:\n - Multiplication cannot overflow." - }, - "id": 108, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 79, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 108, - "src": "2201:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2201:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 78, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 108, - "src": "2212:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 77, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2212:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2200:22:0" - }, - "returnParameters": { - "id": 82, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 81, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 108, - "src": "2246:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 80, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2246:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2245:9:0" - }, - "scope": 195, - "src": "2188:459:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 124, - "nodeType": "Block", - "src": "3176:63:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 119, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 111, - "src": "3197:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 120, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "3200:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3203:28:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 118, - "name": "div", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 125, - 153 - ], - "referencedDeclaration": 153, - "src": "3193:3:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3193:39:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 117, - "id": 123, - "nodeType": "Return", - "src": "3186:46:0" - } - ] - }, - "documentation": { - "id": 109, - "nodeType": "StructuredDocumentation", - "src": "2653:451:0", - "text": " @dev Returns the integer division of two unsigned integers. Reverts on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 125, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 111, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 125, - "src": "3122:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 110, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3122:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 113, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 125, - "src": "3133:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 112, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3133:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3121:22:0" - }, - "returnParameters": { - "id": 117, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 116, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 125, - "src": "3167:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 115, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3167:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3166:9:0" - }, - "scope": 195, - "src": "3109:130:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 152, - "nodeType": "Block", - "src": "3816:177:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 138, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "3834:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3838:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3834:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 141, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "3841:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 137, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3826:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3826:28:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 143, - "nodeType": "ExpressionStatement", - "src": "3826:28:0" - }, - { - "assignments": [ - 145 - ], - "declarations": [ - { - "constant": false, - "id": 145, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 152, - "src": "3864:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 144, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3864:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 149, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 146, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 128, - "src": "3876:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 147, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "3880:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3876:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3864:17:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 150, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "3985:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 136, - "id": 151, - "nodeType": "Return", - "src": "3978:8:0" - } - ] - }, - "documentation": { - "id": 126, - "nodeType": "StructuredDocumentation", - "src": "3245:471:0", - "text": " @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 153, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 133, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 128, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 153, - "src": "3734:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 127, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3734:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 153, - "src": "3745:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 129, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3745:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 153, - "src": "3756:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 131, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3756:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3733:50:0" - }, - "returnParameters": { - "id": 136, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 135, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 153, - "src": "3807:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3807:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3806:9:0" - }, - "scope": 195, - "src": "3721:272:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 169, - "nodeType": "Block", - "src": "4511:61:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 164, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 156, - "src": "4532:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 165, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 158, - "src": "4535:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4538:26:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 163, - "name": "mod", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 170, - 194 - ], - "referencedDeclaration": 194, - "src": "4528:3:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4528:37:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 162, - "id": 168, - "nodeType": "Return", - "src": "4521:44:0" - } - ] - }, - "documentation": { - "id": 154, - "nodeType": "StructuredDocumentation", - "src": "3999:440:0", - "text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n Reverts when dividing by zero.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 170, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 159, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 156, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 170, - "src": "4457:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4457:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 158, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 170, - "src": "4468:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 157, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4468:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4456:22:0" - }, - "returnParameters": { - "id": 162, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 161, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 170, - "src": "4502:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 160, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4502:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4501:9:0" - }, - "scope": 195, - "src": "4444:128:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 193, - "nodeType": "Block", - "src": "5138:68:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 183, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 175, - "src": "5156:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5161:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5156:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 186, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 177, - "src": "5164:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 182, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5148:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5148:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 188, - "nodeType": "ExpressionStatement", - "src": "5148:29:0" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 189, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 173, - "src": "5194:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 190, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 175, - "src": "5198:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5194:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 181, - "id": 192, - "nodeType": "Return", - "src": "5187:12:0" - } - ] - }, - "documentation": { - "id": 171, - "nodeType": "StructuredDocumentation", - "src": "4578:460:0", - "text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n Reverts with custom message when dividing by zero.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 194, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 178, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 173, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 194, - "src": "5056:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 172, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5056:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 175, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 194, - "src": "5067:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 174, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5067:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 177, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 194, - "src": "5078:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 176, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5078:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5055:50:0" - }, - "returnParameters": { - "id": 181, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 180, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 194, - "src": "5129:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 179, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5129:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5128:9:0" - }, - "scope": 195, - "src": "5043:163:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 196, - "src": "630:4578:0" - } - ], - "src": "33:5176:0" - }, - "id": 0 - }, - "src/main/solidity/net-emissions-token-network/Governance/Timelock.sol": { - "ast": { - "absolutePath": "src/main/solidity/net-emissions-token-network/Governance/Timelock.sol", - "exportedSymbols": { - "Timelock": [ - 658 - ] - }, - "id": 659, - "license": "BSD-3-Clause", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 197, - "literals": [ - "solidity", - "^", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "0:23:1" - }, - { - "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", - "file": "@openzeppelin/contracts/math/SafeMath.sol", - "id": 198, - "nodeType": "ImportDirective", - "scope": 659, - "sourceUnit": 196, - "src": "1714:51:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 658, - "linearizedBaseContracts": [ - 658 - ], - "name": "Timelock", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 201, - "libraryName": { - "contractScope": null, - "id": 199, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 195, - "src": "1797:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$195", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "1791:24:1", - "typeName": { - "id": 200, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1810:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "anonymous": false, - "documentation": null, - "id": 205, - "name": "NewAdmin", - "nodeType": "EventDefinition", - "parameters": { - "id": 204, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 203, - "indexed": true, - "mutability": "mutable", - "name": "newAdmin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 205, - "src": "1836:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 202, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1836:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1835:26:1" - }, - "src": "1821:41:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 209, - "name": "NewPendingAdmin", - "nodeType": "EventDefinition", - "parameters": { - "id": 208, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 207, - "indexed": true, - "mutability": "mutable", - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 209, - "src": "1889:31:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 206, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1889:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1888:33:1" - }, - "src": "1867:55:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 213, - "name": "NewDelay", - "nodeType": "EventDefinition", - "parameters": { - "id": 212, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 211, - "indexed": true, - "mutability": "mutable", - "name": "newDelay", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 213, - "src": "1942:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 210, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1942:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1941:23:1" - }, - "src": "1927:38:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 227, - "name": "CancelTransaction", - "nodeType": "EventDefinition", - "parameters": { - "id": 226, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 215, - "indexed": true, - "mutability": "mutable", - "name": "txHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 227, - "src": "1994:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 214, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1994:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 217, - "indexed": true, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 227, - "src": "2018:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 216, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2018:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 219, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 227, - "src": "2042:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 218, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2042:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 221, - "indexed": false, - "mutability": "mutable", - "name": "signature", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 227, - "src": "2054:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 220, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2054:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 223, - "indexed": false, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 227, - "src": "2073:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 222, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2073:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 225, - "indexed": false, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 227, - "src": "2085:8:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 224, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2085:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1993:101:1" - }, - "src": "1970:125:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 241, - "name": "ExecuteTransaction", - "nodeType": "EventDefinition", - "parameters": { - "id": 240, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 229, - "indexed": true, - "mutability": "mutable", - "name": "txHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 241, - "src": "2125:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 228, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2125:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 231, - "indexed": true, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 241, - "src": "2149:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 230, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2149:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 233, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 241, - "src": "2173:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 232, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2173:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 235, - "indexed": false, - "mutability": "mutable", - "name": "signature", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 241, - "src": "2185:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 234, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2185:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 237, - "indexed": false, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 241, - "src": "2204:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 236, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2204:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 239, - "indexed": false, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 241, - "src": "2216:8:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 238, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2216:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2124:101:1" - }, - "src": "2100:126:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 255, - "name": "QueueTransaction", - "nodeType": "EventDefinition", - "parameters": { - "id": 254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 243, - "indexed": true, - "mutability": "mutable", - "name": "txHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 255, - "src": "2254:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 242, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2254:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 245, - "indexed": true, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 255, - "src": "2278:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 244, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2278:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 247, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 255, - "src": "2302:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 246, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2302:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 249, - "indexed": false, - "mutability": "mutable", - "name": "signature", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 255, - "src": "2314:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 248, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2314:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 251, - "indexed": false, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 255, - "src": "2332:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 250, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2332:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 253, - "indexed": false, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 255, - "src": "2344:8:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 252, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2344:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2253:100:1" - }, - "src": "2231:123:1" - }, - { - "constant": true, - "functionSelector": "c1a287e2", - "id": 258, - "mutability": "constant", - "name": "GRACE_PERIOD", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 658, - "src": "2360:43:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 256, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2360:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3134", - "id": 257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2396:7:1", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_1209600_by_1", - "typeString": "int_const 1209600" - }, - "value": "14" - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "b1b43ae5", - "id": 261, - "mutability": "constant", - "name": "MINIMUM_DELAY", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 658, - "src": "2409:43:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 259, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2409:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "32", - "id": 260, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2446:6:1", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_172800_by_1", - "typeString": "int_const 172800" - }, - "value": "2" - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "7d645fab", - "id": 264, - "mutability": "constant", - "name": "MAXIMUM_DELAY", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 658, - "src": "2458:44:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 262, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2458:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3330", - "id": 263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2495:7:1", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_2592000_by_1", - "typeString": "int_const 2592000" - }, - "value": "30" - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "f851a440", - "id": 266, - "mutability": "mutable", - "name": "admin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 658, - "src": "2509:20:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 265, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2509:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "26782247", - "id": 268, - "mutability": "mutable", - "name": "pendingAdmin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 658, - "src": "2535:27:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 267, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2535:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "6a42b8f8", - "id": 270, - "mutability": "mutable", - "name": "delay", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 658, - "src": "2568:17:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 269, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2568:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "f2b06537", - "id": 274, - "mutability": "mutable", - "name": "queuedTransactions", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 658, - "src": "2592:51:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 273, - "keyType": { - "id": 271, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2601:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "2592:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 272, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2612:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 303, - "nodeType": "Block", - "src": "2692:259:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 282, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 278, - "src": "2710:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 283, - "name": "MINIMUM_DELAY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "2720:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2710:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e", - "id": 285, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2735:57:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22e01fcea901594c01d464b6c5f076874d475b75affb5ba136b9bcf9c2e8cf2f", - "typeString": "literal_string \"Timelock::constructor: Delay must exceed minimum delay.\"" - }, - "value": "Timelock::constructor: Delay must exceed minimum delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22e01fcea901594c01d464b6c5f076874d475b75affb5ba136b9bcf9c2e8cf2f", - "typeString": "literal_string \"Timelock::constructor: Delay must exceed minimum delay.\"" - } - ], - "id": 281, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2702:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2702:91:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 287, - "nodeType": "ExpressionStatement", - "src": "2702:91:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 289, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 278, - "src": "2811:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 290, - "name": "MAXIMUM_DELAY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "2821:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2811:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e", - "id": 292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2836:58:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_762218313af08cfa6c9b8eda00385502eefaa529f9945044fd2dee54ff5cefe0", - "typeString": "literal_string \"Timelock::setDelay: Delay must not exceed maximum delay.\"" - }, - "value": "Timelock::setDelay: Delay must not exceed maximum delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_762218313af08cfa6c9b8eda00385502eefaa529f9945044fd2dee54ff5cefe0", - "typeString": "literal_string \"Timelock::setDelay: Delay must not exceed maximum delay.\"" - } - ], - "id": 288, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2803:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2803:92:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 294, - "nodeType": "ExpressionStatement", - "src": "2803:92:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 295, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "2906:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 296, - "name": "admin_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "2914:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2906:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 298, - "nodeType": "ExpressionStatement", - "src": "2906:14:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 299, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 270, - "src": "2930:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 300, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 278, - "src": "2938:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2930:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 302, - "nodeType": "ExpressionStatement", - "src": "2930:14:1" - } - ] - }, - "documentation": null, - "id": 304, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 279, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 276, - "mutability": "mutable", - "name": "admin_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 304, - "src": "2663:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 275, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2663:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 278, - "mutability": "mutable", - "name": "delay_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 304, - "src": "2679:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 277, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2679:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2662:29:1" - }, - "returnParameters": { - "id": 280, - "nodeType": "ParameterList", - "parameters": [], - "src": "2692:0:1" - }, - "scope": 658, - "src": "2651:300:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 307, - "nodeType": "Block", - "src": "2985:3:1", - "statements": [] - }, - "documentation": null, - "id": 308, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 305, - "nodeType": "ParameterList", - "parameters": [], - "src": "2965:2:1" - }, - "returnParameters": { - "id": 306, - "nodeType": "ParameterList", - "parameters": [], - "src": "2985:0:1" - }, - "scope": 658, - "src": "2957:31:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 311, - "nodeType": "Block", - "src": "3021:3:1", - "statements": [] - }, - "documentation": null, - "id": 312, - "implemented": true, - "kind": "receive", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 309, - "nodeType": "ParameterList", - "parameters": [], - "src": "3001:2:1" - }, - "returnParameters": { - "id": 310, - "nodeType": "ParameterList", - "parameters": [], - "src": "3021:0:1" - }, - "scope": 658, - "src": "2994:30:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 350, - "nodeType": "Block", - "src": "3068:361:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "id": 324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 318, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3086:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3086:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 322, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "3108:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Timelock_$658", - "typeString": "contract Timelock" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Timelock_$658", - "typeString": "contract Timelock" - } - ], - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3100:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 320, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3100:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3100:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "3086:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e", - "id": 325, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3115:51:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e810dcfb9ec7662fa74f0c58d14b8ca36ebffcb4d6cdf3e54d58e4096597d95d", - "typeString": "literal_string \"Timelock::setDelay: Call must come from Timelock.\"" - }, - "value": "Timelock::setDelay: Call must come from Timelock." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e810dcfb9ec7662fa74f0c58d14b8ca36ebffcb4d6cdf3e54d58e4096597d95d", - "typeString": "literal_string \"Timelock::setDelay: Call must come from Timelock.\"" - } - ], - "id": 317, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3078:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3078:89:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 327, - "nodeType": "ExpressionStatement", - "src": "3078:89:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 329, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 314, - "src": "3185:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 330, - "name": "MINIMUM_DELAY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "3195:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3185:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e", - "id": 332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3210:54:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4198c63548ffd3e47f06dc876a374eb662a4ea6ff5509a211e07dd2b49998b1d", - "typeString": "literal_string \"Timelock::setDelay: Delay must exceed minimum delay.\"" - }, - "value": "Timelock::setDelay: Delay must exceed minimum delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4198c63548ffd3e47f06dc876a374eb662a4ea6ff5509a211e07dd2b49998b1d", - "typeString": "literal_string \"Timelock::setDelay: Delay must exceed minimum delay.\"" - } - ], - "id": 328, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3177:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3177:88:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 334, - "nodeType": "ExpressionStatement", - "src": "3177:88:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 336, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 314, - "src": "3283:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 337, - "name": "MAXIMUM_DELAY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "3293:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3283:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e", - "id": 339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3308:58:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_762218313af08cfa6c9b8eda00385502eefaa529f9945044fd2dee54ff5cefe0", - "typeString": "literal_string \"Timelock::setDelay: Delay must not exceed maximum delay.\"" - }, - "value": "Timelock::setDelay: Delay must not exceed maximum delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_762218313af08cfa6c9b8eda00385502eefaa529f9945044fd2dee54ff5cefe0", - "typeString": "literal_string \"Timelock::setDelay: Delay must not exceed maximum delay.\"" - } - ], - "id": 335, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3275:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3275:92:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 341, - "nodeType": "ExpressionStatement", - "src": "3275:92:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 342, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 270, - "src": "3377:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 343, - "name": "delay_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 314, - "src": "3385:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3377:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 345, - "nodeType": "ExpressionStatement", - "src": "3377:14:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 347, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 270, - "src": "3416:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 346, - "name": "NewDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 213, - "src": "3407:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3407:15:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 349, - "nodeType": "EmitStatement", - "src": "3402:20:1" - } - ] - }, - "documentation": null, - "functionSelector": "e177246e", - "id": 351, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setDelay", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 314, - "mutability": "mutable", - "name": "delay_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 351, - "src": "3048:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 313, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3048:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3047:13:1" - }, - "returnParameters": { - "id": 316, - "nodeType": "ParameterList", - "parameters": [], - "src": "3068:0:1" - }, - "scope": 658, - "src": "3030:399:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 378, - "nodeType": "Block", - "src": "3465:206:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 355, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3483:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3483:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 357, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "3497:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3483:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e", - "id": 359, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3511:58:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a6d22532620e2c2df8ce400b3f4754629da5ed6321258d3add10ae5aba9450b3", - "typeString": "literal_string \"Timelock::acceptAdmin: Call must come from pendingAdmin.\"" - }, - "value": "Timelock::acceptAdmin: Call must come from pendingAdmin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a6d22532620e2c2df8ce400b3f4754629da5ed6321258d3add10ae5aba9450b3", - "typeString": "literal_string \"Timelock::acceptAdmin: Call must come from pendingAdmin.\"" - } - ], - "id": 354, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3475:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3475:95:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 361, - "nodeType": "ExpressionStatement", - "src": "3475:95:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 362, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "3580:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 363, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3588:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3588:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "3580:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 366, - "nodeType": "ExpressionStatement", - "src": "3580:18:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 367, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "3608:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 370, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3631:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3623:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 368, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3623:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 371, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3623:10:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "3608:25:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 373, - "nodeType": "ExpressionStatement", - "src": "3608:25:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 375, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "3658:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 374, - "name": "NewAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 205, - "src": "3649:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3649:15:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 377, - "nodeType": "EmitStatement", - "src": "3644:20:1" - } - ] - }, - "documentation": null, - "functionSelector": "0e18b681", - "id": 379, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "acceptAdmin", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 352, - "nodeType": "ParameterList", - "parameters": [], - "src": "3455:2:1" - }, - "returnParameters": { - "id": 353, - "nodeType": "ParameterList", - "parameters": [], - "src": "3465:0:1" - }, - "scope": 658, - "src": "3435:236:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 403, - "nodeType": "Block", - "src": "3732:196:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "id": 391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 385, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3750:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3750:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 389, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "3772:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Timelock_$658", - "typeString": "contract Timelock" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Timelock_$658", - "typeString": "contract Timelock" - } - ], - "id": 388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3764:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 387, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3764:7:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3764:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "3750:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e", - "id": 392, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3779:58:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b7a0aaea4203d5a5318b76c13dcb2afd3f7e9e71cd6f5f022040411bd080d815", - "typeString": "literal_string \"Timelock::setPendingAdmin: Call must come from Timelock.\"" - }, - "value": "Timelock::setPendingAdmin: Call must come from Timelock." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b7a0aaea4203d5a5318b76c13dcb2afd3f7e9e71cd6f5f022040411bd080d815", - "typeString": "literal_string \"Timelock::setPendingAdmin: Call must come from Timelock.\"" - } - ], - "id": 384, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3742:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3742:96:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 394, - "nodeType": "ExpressionStatement", - "src": "3742:96:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 395, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "3848:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 396, - "name": "pendingAdmin_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 381, - "src": "3863:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3848:28:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 398, - "nodeType": "ExpressionStatement", - "src": "3848:28:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 400, - "name": "pendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "3908:12:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 399, - "name": "NewPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 209, - "src": "3892:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3892:29:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 402, - "nodeType": "EmitStatement", - "src": "3887:34:1" - } - ] - }, - "documentation": null, - "functionSelector": "4dd18bf5", - "id": 404, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setPendingAdmin", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 382, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 381, - "mutability": "mutable", - "name": "pendingAdmin_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 404, - "src": "3702:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 380, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3702:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3701:23:1" - }, - "returnParameters": { - "id": 383, - "nodeType": "ParameterList", - "parameters": [], - "src": "3732:0:1" - }, - "scope": 658, - "src": "3677:251:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 468, - "nodeType": "Block", - "src": "4067:465:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 420, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4085:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4085:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 422, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "4099:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4085:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e", - "id": 424, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4106:56:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b9bd2ade56c0bd4d6738b7a39a90e136f8901e8e7945a3d237050075ad6fd749", - "typeString": "literal_string \"Timelock::queueTransaction: Call must come from admin.\"" - }, - "value": "Timelock::queueTransaction: Call must come from admin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b9bd2ade56c0bd4d6738b7a39a90e136f8901e8e7945a3d237050075ad6fd749", - "typeString": "literal_string \"Timelock::queueTransaction: Call must come from admin.\"" - } - ], - "id": 419, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4077:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4077:86:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 426, - "nodeType": "ExpressionStatement", - "src": "4077:86:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 434, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 428, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "4181:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 432, - "name": "delay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 270, - "src": "4212:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 429, - "name": "getBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 657, - "src": "4188:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 430, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4188:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 28, - "src": "4188:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4188:30:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4181:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e", - "id": 435, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4220:75:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d8f8e6fa46b62e55e6ef89f0d71d2a706a902748f37198aeb3e192bf7bca348c", - "typeString": "literal_string \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\"" - }, - "value": "Timelock::queueTransaction: Estimated execution block must satisfy delay." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d8f8e6fa46b62e55e6ef89f0d71d2a706a902748f37198aeb3e192bf7bca348c", - "typeString": "literal_string \"Timelock::queueTransaction: Estimated execution block must satisfy delay.\"" - } - ], - "id": 427, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4173:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4173:123:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 437, - "nodeType": "ExpressionStatement", - "src": "4173:123:1" - }, - { - "assignments": [ - 439 - ], - "declarations": [ - { - "constant": false, - "id": 439, - "mutability": "mutable", - "name": "txHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 468, - "src": "4307:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 438, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4307:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 450, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 443, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 406, - "src": "4345:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 444, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "4353:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 445, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 410, - "src": "4360:9:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 446, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "4371:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 447, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "4377:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 441, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "4334:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 442, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4334:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4334:47:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 440, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "4324:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4324:58:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4307:75:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 455, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 451, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 274, - "src": "4392:18:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 453, - "indexExpression": { - "argumentTypes": null, - "id": 452, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 439, - "src": "4411:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4392:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 454, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4421:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "4392:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 456, - "nodeType": "ExpressionStatement", - "src": "4392:33:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 458, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 439, - "src": "4458:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 459, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 406, - "src": "4466:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 460, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 408, - "src": "4474:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 461, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 410, - "src": "4481:9:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 462, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "4492:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 463, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "4498:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 457, - "name": "QueueTransaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "4441:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4441:61:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 465, - "nodeType": "EmitStatement", - "src": "4436:66:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 466, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 439, - "src": "4519:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 418, - "id": 467, - "nodeType": "Return", - "src": "4512:13:1" - } - ] - }, - "documentation": null, - "functionSelector": "3a66f901", - "id": 469, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "queueTransaction", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 415, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 406, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 469, - "src": "3960:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 405, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3960:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 408, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 469, - "src": "3976:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 407, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3976:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 410, - "mutability": "mutable", - "name": "signature", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 469, - "src": "3988:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 409, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3988:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 412, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 469, - "src": "4013:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 411, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4013:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 414, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 469, - "src": "4032:8:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 413, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4032:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3959:82:1" - }, - "returnParameters": { - "id": 418, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 417, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 469, - "src": "4058:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 416, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4058:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4057:9:1" - }, - "scope": 658, - "src": "3934:598:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 518, - "nodeType": "Block", - "src": "4654:312:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 483, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4672:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4672:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 485, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "4686:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4672:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e", - "id": 487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4693:57:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_135e413b08c779b9b925daaaf6178471ba60ebd33d413d809c76a0d4e8beaf3d", - "typeString": "literal_string \"Timelock::cancelTransaction: Call must come from admin.\"" - }, - "value": "Timelock::cancelTransaction: Call must come from admin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_135e413b08c779b9b925daaaf6178471ba60ebd33d413d809c76a0d4e8beaf3d", - "typeString": "literal_string \"Timelock::cancelTransaction: Call must come from admin.\"" - } - ], - "id": 482, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4664:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4664:87:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 489, - "nodeType": "ExpressionStatement", - "src": "4664:87:1" - }, - { - "assignments": [ - 491 - ], - "declarations": [ - { - "constant": false, - "id": 491, - "mutability": "mutable", - "name": "txHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 518, - "src": "4762:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 490, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4762:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 502, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 495, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "4800:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 496, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 473, - "src": "4808:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 497, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 475, - "src": "4815:9:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 498, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 477, - "src": "4826:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 499, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 479, - "src": "4832:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 493, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "4789:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 494, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4789:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4789:47:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 492, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "4779:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4779:58:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4762:75:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 503, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 274, - "src": "4847:18:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 505, - "indexExpression": { - "argumentTypes": null, - "id": 504, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 491, - "src": "4866:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4847:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 506, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4876:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "4847:34:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 508, - "nodeType": "ExpressionStatement", - "src": "4847:34:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 510, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 491, - "src": "4915:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 511, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "4923:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 512, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 473, - "src": "4931:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 513, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 475, - "src": "4938:9:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 514, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 477, - "src": "4949:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 515, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 479, - "src": "4955:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 509, - "name": "CancelTransaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "4897:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4897:62:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 517, - "nodeType": "EmitStatement", - "src": "4892:67:1" - } - ] - }, - "documentation": null, - "functionSelector": "591fcdfe", - "id": 519, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "cancelTransaction", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 480, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 471, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 519, - "src": "4565:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 470, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4565:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 473, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 519, - "src": "4581:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 472, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4581:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 475, - "mutability": "mutable", - "name": "signature", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 519, - "src": "4593:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 474, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4593:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 477, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 519, - "src": "4618:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 476, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4618:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 479, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 519, - "src": "4637:8:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 478, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4637:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4564:82:1" - }, - "returnParameters": { - "id": 481, - "nodeType": "ParameterList", - "parameters": [], - "src": "4654:0:1" - }, - "scope": 658, - "src": "4538:428:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 647, - "nodeType": "Block", - "src": "5120:1084:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 535, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5138:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5138:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 537, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "5152:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5138:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e", - "id": 539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5159:58:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0cbc65ac44dc8b90b8bc4c38c9c6ad704bfeb2c8170538058496c0e805dfa947", - "typeString": "literal_string \"Timelock::executeTransaction: Call must come from admin.\"" - }, - "value": "Timelock::executeTransaction: Call must come from admin." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0cbc65ac44dc8b90b8bc4c38c9c6ad704bfeb2c8170538058496c0e805dfa947", - "typeString": "literal_string \"Timelock::executeTransaction: Call must come from admin.\"" - } - ], - "id": 534, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5130:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5130:88:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 541, - "nodeType": "ExpressionStatement", - "src": "5130:88:1" - }, - { - "assignments": [ - 543 - ], - "declarations": [ - { - "constant": false, - "id": 543, - "mutability": "mutable", - "name": "txHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 647, - "src": "5229:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 542, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5229:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 554, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 547, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 521, - "src": "5267:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 548, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 523, - "src": "5275:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 549, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 525, - "src": "5282:9:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 550, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 527, - "src": "5293:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 551, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "5299:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 545, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "5256:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 546, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5256:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5256:47:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 544, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "5246:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5246:58:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5229:75:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 556, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 274, - "src": "5322:18:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 558, - "indexExpression": { - "argumentTypes": null, - "id": 557, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "5341:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5322:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e", - "id": 559, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5350:63:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e3bf24eec453753018af1214443c72d8abb3050b249b2b3b9bb2adb04310650", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't been queued.\"" - }, - "value": "Timelock::executeTransaction: Transaction hasn't been queued." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e3bf24eec453753018af1214443c72d8abb3050b249b2b3b9bb2adb04310650", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't been queued.\"" - } - ], - "id": 555, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5314:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5314:100:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 561, - "nodeType": "ExpressionStatement", - "src": "5314:100:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 563, - "name": "getBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 657, - "src": "5432:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5432:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 565, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "5455:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5432:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e", - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5460:71:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_381d72a875dbcf282eb0ce43951c66b6c4d7dadc6fdeb9294add773d09cd1687", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\"" - }, - "value": "Timelock::executeTransaction: Transaction hasn't surpassed time lock." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_381d72a875dbcf282eb0ce43951c66b6c4d7dadc6fdeb9294add773d09cd1687", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\"" - } - ], - "id": 562, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5424:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5424:108:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 569, - "nodeType": "ExpressionStatement", - "src": "5424:108:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 571, - "name": "getBlockTimestamp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 657, - "src": "5550:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5550:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 575, - "name": "GRACE_PERIOD", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "5581:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 573, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "5573:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 28, - "src": "5573:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5573:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5550:44:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e", - "id": 578, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5596:53:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c4a83afbdcff2c4ba869dacfa7dabb27b12f774a0707feae827e36773b8166c", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction is stale.\"" - }, - "value": "Timelock::executeTransaction: Transaction is stale." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2c4a83afbdcff2c4ba869dacfa7dabb27b12f774a0707feae827e36773b8166c", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction is stale.\"" - } - ], - "id": 570, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5542:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5542:108:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 580, - "nodeType": "ExpressionStatement", - "src": "5542:108:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 581, - "name": "queuedTransactions", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 274, - "src": "5661:18:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 583, - "indexExpression": { - "argumentTypes": null, - "id": 582, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "5680:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5661:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 584, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5690:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "5661:34:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 586, - "nodeType": "ExpressionStatement", - "src": "5661:34:1" - }, - { - "assignments": [ - 588 - ], - "declarations": [ - { - "constant": false, - "id": 588, - "mutability": "mutable", - "name": "callData", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 647, - "src": "5706:21:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 587, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5706:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 589, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5706:21:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 592, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 525, - "src": "5748:9:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 591, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5742:5:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": { - "id": 590, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5742:5:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5742:16:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5742:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 595, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5769:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5742:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 618, - "nodeType": "Block", - "src": "5818:95:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 602, - "name": "callData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 588, - "src": "5832:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 610, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 525, - "src": "5883:9:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 609, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5877:5:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": { - "id": 608, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5877:5:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5877:16:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 607, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "5867:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5867:27:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5860:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes4_$", - "typeString": "type(bytes4)" - }, - "typeName": { - "id": 605, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "5860:6:1", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 613, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5860:35:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "id": 614, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 527, - "src": "5897:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 603, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "5843:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5843:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5843:59:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "5832:70:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 617, - "nodeType": "ExpressionStatement", - "src": "5832:70:1" - } - ] - }, - "id": 619, - "nodeType": "IfStatement", - "src": "5738:175:1", - "trueBody": { - "id": 601, - "nodeType": "Block", - "src": "5772:40:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 597, - "name": "callData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 588, - "src": "5786:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 598, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 527, - "src": "5797:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "5786:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 600, - "nodeType": "ExpressionStatement", - "src": "5786:15:1" - } - ] - } - }, - { - "assignments": [ - 621, - 623 - ], - "declarations": [ - { - "constant": false, - "id": 621, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 647, - "src": "5924:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 620, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5924:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 623, - "mutability": "mutable", - "name": "returnData", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 647, - "src": "5938:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 622, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5938:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 630, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 628, - "name": "callData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 588, - "src": "5990:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 624, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 521, - "src": "5965:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5965:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "argumentTypes": null, - "id": 626, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 523, - "src": "5983:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "5965:24:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 629, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5965:34:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5923:76:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 632, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 621, - "src": "6017:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e", - "id": 633, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6026:63:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c8cfef133518ef6ab39ac5f19562a74f4f875e9130c8117d51f88a557b6e72c9", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction execution reverted.\"" - }, - "value": "Timelock::executeTransaction: Transaction execution reverted." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c8cfef133518ef6ab39ac5f19562a74f4f875e9130c8117d51f88a557b6e72c9", - "typeString": "literal_string \"Timelock::executeTransaction: Transaction execution reverted.\"" - } - ], - "id": 631, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6009:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6009:81:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 635, - "nodeType": "ExpressionStatement", - "src": "6009:81:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 637, - "name": "txHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "6125:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 638, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 521, - "src": "6133:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 639, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 523, - "src": "6141:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 640, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 525, - "src": "6148:9:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 641, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 527, - "src": "6159:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 642, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 529, - "src": "6165:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 636, - "name": "ExecuteTransaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 241, - "src": "6106:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6106:63:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 644, - "nodeType": "EmitStatement", - "src": "6101:68:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 645, - "name": "returnData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 623, - "src": "6187:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 533, - "id": 646, - "nodeType": "Return", - "src": "6180:17:1" - } - ] - }, - "documentation": null, - "functionSelector": "0825f38f", - "id": 648, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "executeTransaction", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 521, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 648, - "src": "5000:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 520, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5000:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 523, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 648, - "src": "5016:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 522, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5016:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 525, - "mutability": "mutable", - "name": "signature", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 648, - "src": "5028:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 524, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5028:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 527, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 648, - "src": "5053:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 526, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5053:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 529, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 648, - "src": "5072:8:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 528, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5072:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4999:82:1" - }, - "returnParameters": { - "id": 533, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 532, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 648, - "src": "5106:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 531, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5106:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5105:14:1" - }, - "scope": 658, - "src": "4972:1232:1", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 656, - "nodeType": "Block", - "src": "6268:101:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 653, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "6347:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6347:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 652, - "id": 655, - "nodeType": "Return", - "src": "6340:22:1" - } - ] - }, - "documentation": null, - "id": 657, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getBlockTimestamp", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 649, - "nodeType": "ParameterList", - "parameters": [], - "src": "6236:2:1" - }, - "returnParameters": { - "id": 652, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 651, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 657, - "src": "6262:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 650, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6262:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6261:6:1" - }, - "scope": 658, - "src": "6210:159:1", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 659, - "src": "1767:4604:1" - } - ], - "src": "0:6372:1" - }, - "id": 1 - } - } - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/63ceb59b1611816263aa22cb81ea46e7.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/63ceb59b1611816263aa22cb81ea46e7.json deleted file mode 100644 index b42ca2cd70..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/63ceb59b1611816263aa22cb81ea46e7.json +++ /dev/null @@ -1,21689 +0,0 @@ -{ - "id": "63ceb59b1611816263aa22cb81ea46e7", - "_format": "hh-sol-build-info-1", - "solcVersion": "0.7.0", - "solcLongVersion": "0.7.0+commit.9e61f92b", - "input": { - "language": "Solidity", - "sources": { - "src/main/solidity/net-emissions-token-network/Governance/Governor.sol": { - "content": "pragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n// SPDX-License-Identifier: BSD-3-Clause\n\n/* Copyright 2021 Compound Labs, Inc.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n3. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n// Original work from Compound: https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/GovernorAlpha.sol\n// Modified to work in the NetEmissionsTokenNetwork system\n\ncontract Governor {\n /// @notice The name of this contract\n string public constant name = \"Climate DAO Governor\";\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n function quorumVotes() public view returns (uint) {\n uint initialHolderBalance = dclm8.balanceOf(dclm8.getInitialHolder());\n uint daoTokensInCirculation = dclm8.getTotalSupply() - initialHolderBalance;\n // if tokens in circulation, let sqrt(4%) of those tokens be the quorum\n if (daoTokensInCirculation != 0) {\n return sqrt(div256(daoTokensInCirculation, 25));\n }\n // otherwise, default to sqrt(4% of total supply)\n return 632455532033;\n }\n\n /// @notice The number of votes required in order for a voter to become a proposer\n function proposalThreshold() public pure returns (uint) { return 100000e18; } // 100,000 = 1% of Dclm8\n\n /// @notice The maximum number of actions that can be included in a proposal\n function proposalMaxOperations() public pure returns (uint) { return 10; } // 10 actions\n\n /// @notice The delay before voting on a proposal may take place, once proposed\n function votingDelay() public pure returns (uint) { return 1; } // 1 block\n\n /// @notice The duration of voting on a proposal, in blocks\n function votingPeriod() public pure returns (uint) { return 17280; } // ~3 days in blocks (assuming 15s blocks)\n\n /// @notice The address of the timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the DAO token\n Dclm8Interface public dclm8;\n\n /// @notice The address of the Governor Guardian\n address public guardian;\n\n /// @notice The total number of proposals\n uint public proposalCount;\n\n struct Proposal {\n // @notice Unique id for looking up a proposal\n uint id;\n\n // @notice Creator of the proposal\n address proposer;\n\n // @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint eta;\n\n // @notice the ordered list of target addresses for calls to be made\n address[] targets;\n\n // @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n\n // @notice The ordered list of function signatures to be called\n string[] signatures;\n\n // @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n\n // @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint startBlock;\n\n // @notice The block at which voting ends: votes must be cast prior to this block\n uint endBlock;\n\n // @notice Current number of votes in favor of this proposal\n uint forVotes;\n\n // @notice Current number of votes in opposition to this proposal\n uint againstVotes;\n\n // @notice Flag marking whether the proposal has been canceled\n bool canceled;\n\n // @notice Flag marking whether the proposal has been executed\n bool executed;\n\n // @notes Description of the proposal\n string description;\n\n // @notice Receipts of ballots for the entire set of voters\n mapping (address => Receipt) receipts;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n // @notice Whether or not a vote has been cast\n bool hasVoted;\n\n // @notice Whether or not the voter supports the proposal\n bool support;\n\n // @notice The number of votes the voter had, which were cast\n uint96 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The official record of all proposals ever proposed\n mapping (uint => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping (address => uint) public latestProposalIds;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH = keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,bool support)\");\n\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint startBlock, uint endBlock, string description);\n\n /// @notice An event emitted when a vote has been cast on a proposal\n event VoteCast(address voter, uint proposalId, bool support, uint votes);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint id, uint eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint id);\n\n constructor(address timelock_, address dclm8_, address guardian_) public {\n timelock = TimelockInterface(timelock_);\n dclm8 = Dclm8Interface(dclm8_);\n guardian = guardian_;\n }\n\n function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) {\n require(dclm8.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold(), \"Governor::propose: proposer votes below proposal threshold\");\n require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, \"Governor::propose: proposal function information arity mismatch\");\n require(targets.length != 0, \"Governor::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations(), \"Governor::propose: too many actions\");\n\n uint latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(proposersLatestProposalState != ProposalState.Active, \"Governor::propose: one live proposal per proposer, found an already active proposal\");\n require(proposersLatestProposalState != ProposalState.Pending, \"Governor::propose: one live proposal per proposer, found an already pending proposal\");\n }\n\n uint startBlock = add256(block.number, votingDelay());\n uint endBlock = add256(startBlock, votingPeriod());\n\n proposalCount++;\n\n Proposal storage p = proposals[proposalCount];\n p.id = proposalCount;\n p.proposer = msg.sender;\n p.eta = 0;\n p.targets = targets;\n p.values = values;\n p.signatures = signatures;\n p.calldatas = calldatas;\n p.startBlock = startBlock;\n p.endBlock = endBlock;\n p.forVotes = 0;\n p.againstVotes = 0;\n p.canceled = false;\n p.executed = false;\n p.description = description;\n\n latestProposalIds[p.proposer] = p.id;\n\n emit ProposalCreated(p.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description);\n return p.id;\n }\n\n function queue(uint proposalId) public {\n require(state(proposalId) == ProposalState.Succeeded, \"Governor::queue: proposal can only be queued if it is succeeded\");\n Proposal storage proposal = proposals[proposalId];\n uint eta = add256(block.timestamp, timelock.delay());\n for (uint i = 0; i < proposal.targets.length; i++) {\n _queueOrRevert(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], eta);\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function _queueOrRevert(address target, uint value, string memory signature, bytes memory data, uint eta) internal {\n require(!timelock.queuedTransactions(keccak256(abi.encode(target, value, signature, data, eta))), \"Governor::_queueOrRevert: proposal action already queued at eta\");\n timelock.queueTransaction(target, value, signature, data, eta);\n }\n\n function execute(uint proposalId) public payable {\n require(state(proposalId) == ProposalState.Queued, \"Governor::execute: proposal can only be executed if it is queued\");\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint i = 0; i < proposal.targets.length; i++) {\n timelock.executeTransaction{value: proposal.values[i]}(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);\n }\n emit ProposalExecuted(proposalId);\n }\n\n function cancel(uint proposalId) public {\n ProposalState currentState = state(proposalId);\n require(currentState != ProposalState.Executed, \"Governor::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(msg.sender == guardian || dclm8.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold(), \"Governor::cancel: proposer above threshold\");\n\n proposal.canceled = true;\n for (uint i = 0; i < proposal.targets.length; i++) {\n timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta);\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n function getActions(uint proposalId) public view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n function getReceipt(uint proposalId, address voter) public view returns (Receipt memory) {\n return proposals[proposalId].receipts[voter];\n }\n\n function getDescription(uint proposalId) public view returns (string memory) {\n return proposals[proposalId].description;\n }\n\n function state(uint proposalId) public view returns (ProposalState) {\n require(proposalCount >= proposalId && proposalId > 0, \"Governor::state: invalid proposal id\");\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes()) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD())) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n function castVote(uint proposalId, bool support, uint96 votes) public {\n return _castVote(msg.sender, proposalId, support, votes);\n }\n\n function castVoteBySig(uint proposalId, bool support, uint8 v, bytes32 r, bytes32 s, uint96 votes) public {\n bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this)));\n bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"Governor::castVoteBySig: invalid signature\");\n return _castVote(signatory, proposalId, support, votes);\n }\n\n function _castVote(address voter, uint proposalId, bool support, uint96 votes) internal {\n require(state(proposalId) == ProposalState.Active, \"Governor::_castVote: voting is closed\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"Governor::_castVote: voter already voted\");\n require(votes > 0, \"Governor::_castVote: no eligible votes prior to proposal start block\");\n uint96 eligibleVotes = dclm8.getPriorVotes(voter, proposal.startBlock) - receipt.votes;\n require(votes <= eligibleVotes, \"Governor::_castVote: votes exceeds eligible amount\");\n\n uint96 quadraticVote = uint96(sqrt(votes));\n\n if (support) {\n proposal.forVotes = add256(proposal.forVotes, quadraticVote);\n } else {\n proposal.againstVotes = add256(proposal.againstVotes, quadraticVote);\n }\n\n // burn used dCLM8 tokens\n dclm8._burn(voter, votes);\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = quadraticVote;\n\n emit VoteCast(voter, proposalId, support, quadraticVote);\n }\n\n function __acceptAdmin() public {\n require(msg.sender == guardian, \"Governor::__acceptAdmin: sender must be gov guardian\");\n timelock.acceptAdmin();\n }\n\n function __abdicate() public {\n require(msg.sender == guardian, \"Governor::__abdicate: sender must be gov guardian\");\n guardian = address(0);\n }\n\n function __queueSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public {\n require(msg.sender == guardian, \"Governor::__queueSetTimelockPendingAdmin: sender must be gov guardian\");\n timelock.queueTransaction(address(timelock), 0, \"setPendingAdmin(address)\", abi.encode(newPendingAdmin), eta);\n }\n\n function __executeSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public {\n require(msg.sender == guardian, \"Governor::__executeSetTimelockPendingAdmin: sender must be gov guardian\");\n timelock.executeTransaction(address(timelock), 0, \"setPendingAdmin(address)\", abi.encode(newPendingAdmin), eta);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function div256(uint256 a, uint256 b) internal pure returns (uint256) {\n return _div(a, b, \"division by zero\");\n }\n\n function _div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n return c;\n }\n\n function sqrt(uint x) internal pure returns (uint y) {\n uint z = (x + 1) / 2;\n y = x;\n while (z < y) {\n y = z;\n z = (x / z + z) / 2;\n }\n }\n\n function getChainId() internal pure returns (uint) {\n uint chainId;\n assembly { chainId := chainid() }\n return chainId;\n }\n}\n\ninterface TimelockInterface {\n function delay() external view returns (uint);\n function GRACE_PERIOD() external view returns (uint);\n function acceptAdmin() external;\n function queuedTransactions(bytes32 hash) external view returns (bool);\n function queueTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external returns (bytes32);\n function cancelTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external;\n function executeTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external payable returns (bytes memory);\n}\n\ninterface Dclm8Interface {\n function getPriorVotes(address account, uint blockNumber) external view returns (uint96);\n function getTotalSupply() external pure returns (uint);\n function balanceOf(address account) external view returns (uint);\n function getInitialHolder() external pure returns (address);\n function _burn(address account, uint96 amount) external;\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers" - ], - "": [ - "ast" - ] - } - } - } - }, - "output": { - "contracts": { - "src/main/solidity/net-emissions-token-network/Governance/Governor.sol": { - "Dclm8Interface": { - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "amount", - "type": "uint96" - } - ], - "name": "_burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getInitialHolder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "methodIdentifiers": { - "_burn(address,uint96)": "72d3ee9e", - "balanceOf(address)": "70a08231", - "getInitialHolder()": "ae80d9de", - "getPriorVotes(address,uint256)": "782d6fe1", - "getTotalSupply()": "c4e41b22" - } - } - }, - "Governor": { - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "timelock_", - "type": "address" - }, - { - "internalType": "address", - "name": "dclm8_", - "type": "address" - }, - { - "internalType": "address", - "name": "guardian_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "ProposalQueued", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "__abdicate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "__acceptAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "__executeSetTimelockPendingAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "__queueSetTimelockPendingAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "cancel", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "name": "castVoteBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "dclm8", - "outputs": [ - { - "internalType": "contract Dclm8Interface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "getActions", - "outputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "getDescription", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "voter", - "type": "address" - } - ], - "name": "getReceipt", - "outputs": [ - { - "components": [ - { - "internalType": "bool", - "name": "hasVoted", - "type": "bool" - }, - { - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "internalType": "struct Governor.Receipt", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "latestProposalIds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalMaxOperations", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "proposals", - "outputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "againstVotes", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "canceled", - "type": "bool" - }, - { - "internalType": "bool", - "name": "executed", - "type": "bool" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "queue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "quorumVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum Governor.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "timelock", - "outputs": [ - { - "internalType": "contract TimelockInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "60806040523480156200001157600080fd5b506040516200368838038062003688833981016040819052620000349162000077565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560028054919093169116179055620000e3565b6000806000606084860312156200008c578283fd5b83516200009981620000ca565b6020850151909350620000ac81620000ca565b6040850151909250620000bf81620000ca565b809150509250925092565b6001600160a01b0381168114620000e057600080fd5b50565b61359580620000f36000396000f3fe6080604052600436106101b75760003560e01c8063760fbc13116100ec578063da35c6641161008a578063ddf0b00911610064578063ddf0b00914610492578063deaaa7cc146104b2578063e23a9a52146104c7578063fe0d94c1146104f4576101b7565b8063da35c6641461043d578063da95691a14610452578063dbfa977f14610472576101b7565b806394a08d58116100c657806394a08d58146103e9578063b58131b0146103fe578063b9a6196114610413578063d33219b414610428576101b7565b8063760fbc131461039f5780637bdbe4d0146103b457806391500671146103c9576101b7565b8063328dd9821161015957806340e58ee51161013357806340e58ee51461031d578063452a93201461033d5780634925ec551461035f5780635d2546081461037f576101b7565b8063328dd982146102ab5780633932abb1146102db5780633e4f49e6146102f0576101b7565b806317977c611161019557806317977c611461023f57806320606b701461025f57806321f43e421461027457806324bc1a6414610296576101b7565b8063013cf08b146101bc57806302a251a3146101fb57806306fdde031461021d575b600080fd5b3480156101c857600080fd5b506101dc6101d73660046126be565b610507565b6040516101f29a9998979695949392919061340d565b60405180910390f35b34801561020757600080fd5b506102106105f6565b6040516101f29190612b25565b34801561022957600080fd5b506102326105fd565b6040516101f29190612b9c565b34801561024b57600080fd5b5061021061025a3660046124e8565b61062d565b34801561026b57600080fd5b5061021061063f565b34801561028057600080fd5b5061029461028f366004612520565b610663565b005b3480156102a257600080fd5b5061021061074a565b3480156102b757600080fd5b506102cb6102c63660046126be565b6108fd565b6040516101f29493929190612acd565b3480156102e757600080fd5b50610210610b8c565b3480156102fc57600080fd5b5061031061030b3660046126be565b610b91565b6040516101f29190612b88565b34801561032957600080fd5b506102946103383660046126be565b610d21565b34801561034957600080fd5b50610352610f8a565b6040516101f2919061295c565b34801561036b57600080fd5b5061023261037a3660046126be565b610f99565b34801561038b57600080fd5b5061029461039a366004612705565b61103d565b3480156103ab57600080fd5b506102946111f0565b3480156103c057600080fd5b5061021061122c565b3480156103d557600080fd5b506102946103e4366004612520565b611231565b3480156103f557600080fd5b50610352611306565b34801561040a57600080fd5b50610210611315565b34801561041f57600080fd5b50610294611323565b34801561043457600080fd5b506103526113a8565b34801561044957600080fd5b506102106113b7565b34801561045e57600080fd5b5061021061046d36600461254b565b6113bd565b34801561047e57600080fd5b5061029461048d366004612770565b611703565b34801561049e57600080fd5b506102946104ad3660046126be565b61170f565b3480156104be57600080fd5b50610210611979565b3480156104d357600080fd5b506104e76104e23660046126d6565b61199d565b6040516101f29190613347565b6102946105023660046126be565b611a09565b6004602090815260009182526040918290208054600180830154600280850154600786015460088701546009880154600a890154600b8a0154600c8b0180548e516101009b8216158c026000190190911698909804601f81018e90048e0289018e01909e528d8852999c6001600160a01b039098169b959a949993989297919660ff8083169794909204909116949390929091908301828280156105ec5780601f106105c1576101008083540402835291602001916105ec565b820191906000526020600020905b8154815290600101906020018083116105cf57829003601f168201915b505050505090508a565b6143805b90565b6040518060400160405280601481526020017321b634b6b0ba32902220a79023b7bb32b93737b960611b81525081565b60056020526000908152604090205481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6002546001600160a01b031633146106965760405162461bcd60e51b815260040161068d90612e93565b60405180910390fd5b600080546040516001600160a01b0390911691630825f38f918391906106c090879060200161295c565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016106ef9493929190612989565b600060405180830381600087803b15801561070957600080fd5b505af115801561071d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610745919081019061264b565b505050565b600154604080516357406cef60e11b8152905160009283926001600160a01b03909116916370a0823191839163ae80d9de91600480820192602092909190829003018186803b15801561079c57600080fd5b505afa1580156107b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d49190612504565b6040518263ffffffff1660e01b81526004016107f0919061295c565b60206040518083038186803b15801561080857600080fd5b505afa15801561081c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108409190612633565b9050600081600160009054906101000a90046001600160a01b03166001600160a01b031663c4e41b226040518163ffffffff1660e01b815260040160206040518083038186803b15801561089357600080fd5b505afa1580156108a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cb9190612633565b03905080156108f0576108e76108e2826019611bce565b611c0a565b925050506105fa565b649341498e019250505090565b6060806060806000600460008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561097f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610961575b50505050509350828054806020026020016040519081016040528092919081815260200182805480156109d157602002820191906000526020600020905b8154815260200190600101908083116109bd575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b82821015610aa45760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610a905780601f10610a6557610100808354040283529160200191610a90565b820191906000526020600020905b815481529060010190602001808311610a7357829003601f168201915b5050505050815260200190600101906109f9565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610b765760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610b625780601f10610b3757610100808354040283529160200191610b62565b820191906000526020600020905b815481529060010190602001808311610b4557829003601f168201915b505050505081526020019060010190610acb565b5050505090509450945094509450509193509193565b600190565b60008160035410158015610ba55750600082115b610bc15760405162461bcd60e51b815260040161068d90612f00565b6000828152600460205260409020600b81015460ff1615610be6576002915050610d1c565b80600701544311610bfb576000915050610d1c565b80600801544311610c10576001915050610d1c565b80600a01548160090154111580610c315750610c2a61074a565b8160090154105b15610c40576003915050610d1c565b6002810154610c53576004915050610d1c565b600b810154610100900460ff1615610c6f576007915050610d1c565b610d00816002015460008054906101000a90046001600160a01b03166001600160a01b031663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610cc357600080fd5b505afa158015610cd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfb9190612633565b611c3b565b4210610d10576006915050610d1c565b6005915050610d1c565b505b919050565b6000610d2c82610b91565b90506007816007811115610d3c57fe5b1415610d5a5760405162461bcd60e51b815260040161068d90612d81565b60008281526004602052604090206002546001600160a01b0316331480610e255750610d84611315565b60018054838201546001600160a01b039182169263782d6fe19290911690610dad904390611c60565b6040518363ffffffff1660e01b8152600401610dca929190612970565b60206040518083038186803b158015610de257600080fd5b505afa158015610df6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1a91906127b1565b6001600160601b0316105b610e415760405162461bcd60e51b815260040161068d906131e2565b600b8101805460ff1916600117905560005b6003820154811015610f4d576000546003830180546001600160a01b039092169163591fcdfe919084908110610e8557fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610ead57fe5b9060005260206000200154856005018581548110610ec757fe5b90600052602060002001866006018681548110610ee057fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610f0f959493929190612a72565b600060405180830381600087803b158015610f2957600080fd5b505af1158015610f3d573d6000803e3d6000fd5b505060019092019150610e539050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610f7d9190612b25565b60405180910390a1505050565b6002546001600160a01b031681565b600081815260046020908152604091829020600c0180548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156110315780601f1061100657610100808354040283529160200191611031565b820191906000526020600020905b81548152906001019060200180831161101457829003601f168201915b50505050509050919050565b60408051808201909152601481527321b634b6b0ba32902220a79023b7bb32b93737b960611b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667fc91d7024f1084cf2cbc672fa7c9487148f930f2547c197a0c5a286cc6f4923ea6110b5611c88565b306040516020016110c99493929190612b2e565b60405160208183030381529060405280519060200120905060007f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee888860405160200161111893929190612b52565b60405160208183030381529060405280519060200120905060008282604051602001611145929190612941565b6040516020818303038152906040528051906020012090506000600182898989604051600081526020016040526040516111829493929190612b6a565b6020604051602081039080840390855afa1580156111a4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166111d75760405162461bcd60e51b815260040161068d906132fd565b6111e3818b8b88611c8c565b505050505b505050505050565b6002546001600160a01b0316331461121a5760405162461bcd60e51b815260040161068d90613098565b600280546001600160a01b0319169055565b600a90565b6002546001600160a01b0316331461125b5760405162461bcd60e51b815260040161068d90612c69565b600080546040516001600160a01b0390911691633a66f9019183919061128590879060200161295c565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016112b49493929190612989565b602060405180830381600087803b1580156112ce57600080fd5b505af11580156112e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190612633565b6001546001600160a01b031681565b69152d02c7e14af680000090565b6002546001600160a01b0316331461134d5760405162461bcd60e51b815260040161068d90613146565b6000805460408051630e18b68160e01b815290516001600160a01b0390921692630e18b6819260048084019382900301818387803b15801561138e57600080fd5b505af11580156113a2573d6000803e3d6000fd5b50505050565b6000546001600160a01b031681565b60035481565b60006113c7611315565b600180546001600160a01b03169063782d6fe19033906113e8904390611c60565b6040518363ffffffff1660e01b8152600401611405929190612970565b60206040518083038186803b15801561141d57600080fd5b505afa158015611431573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145591906127b1565b6001600160601b03161161147b5760405162461bcd60e51b815260040161068d90612baf565b8451865114801561148d575083518651145b801561149a575082518651145b6114b65760405162461bcd60e51b815260040161068d90612c0c565b85516114d45760405162461bcd60e51b815260040161068d90612dd2565b6114dc61122c565b865111156114fc5760405162461bcd60e51b815260040161068d90612d3e565b33600090815260056020526040902054801561157957600061151d82610b91565b9050600181600781111561152d57fe5b141561154b5760405162461bcd60e51b815260040161068d90612f44565b600081600781111561155957fe5b14156115775760405162461bcd60e51b815260040161068d90612e19565b505b600061158743610cfb610b8c565b9050600061159782610cfb6105f6565b6003805460019081018083556000818152600460209081526040822092835592820180546001600160a01b0319163317905560028201558c51939450926115e3928401918d01906120cd565b5088516115f990600483019060208c0190612132565b50875161160f90600583019060208b0190612179565b50865161162590600683019060208a01906121d2565b506007810183905560088101829055600060098201819055600a820155600b8101805461ffff19169055855161166490600c830190602089019061222b565b508060000154600560008360010160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000154338c8c8c8c89898e6040516116ed99989796959493929190613375565b60405180910390a1549998505050505050505050565b61074533848484611c8c565b600461171a82610b91565b600781111561172557fe5b146117425760405162461bcd60e51b815260040161068d906132a0565b600081815260046020818152604080842084548251630d48571f60e31b815292519195946117979442946001600160a01b0390931693636a42b8f8938084019390829003018186803b158015610cc357600080fd5b905060005b600383015481101561193f576119378360030182815481106117ba57fe5b6000918252602090912001546004850180546001600160a01b0390921691849081106117e257fe5b90600052602060002001548560050184815481106117fc57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561188a5780601f1061185f5761010080835404028352916020019161188a565b820191906000526020600020905b81548152906001019060200180831161186d57829003601f168201915b505050505086600601858154811061189e57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561192c5780601f106119015761010080835404028352916020019161192c565b820191906000526020600020905b81548152906001019060200180831161190f57829003601f168201915b505050505086611f3f565b60010161179c565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610f7d9085908490613476565b7f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee81565b6119a5612298565b5060009182526004602090815260408084206001600160a01b03939093168452600d9092018152918190208151606081018352905460ff80821615158352610100820416151593820193909352620100009092046001600160601b03169082015290565b6005611a1482610b91565b6007811115611a1f57fe5b14611a3c5760405162461bcd60e51b815260040161068d9061300f565b6000818152600460205260408120600b8101805461ff001916610100179055905b6003820154811015611b92576000546004830180546001600160a01b0390921691630825f38f919084908110611a8f57fe5b9060005260206000200154846003018481548110611aa957fe5b6000918252602090912001546004860180546001600160a01b039092169186908110611ad157fe5b9060005260206000200154866005018681548110611aeb57fe5b90600052602060002001876006018781548110611b0457fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611b33959493929190612a72565b6000604051808303818588803b158015611b4c57600080fd5b505af1158015611b60573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611b89919081019061264b565b50600101611a5d565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f82604051611bc29190612b25565b60405180910390a15050565b6000611c0383836040518060400160405280601081526020016f6469766973696f6e206279207a65726f60801b815250612096565b9392505050565b80600260018201045b81811015610d1a57809150600281828581611c2a57fe5b040181611c3357fe5b049050611c13565b600082820183811015611c035760405162461bcd60e51b815260040161068d9061306d565b600082821115611c825760405162461bcd60e51b815260040161068d90613271565b50900390565b4690565b6001611c9784610b91565b6007811115611ca257fe5b14611cbf5760405162461bcd60e51b815260040161068d9061322c565b60008381526004602090815260408083206001600160a01b0388168452600d8101909252909120805460ff1615611d085760405162461bcd60e51b815260040161068d9061319a565b6000836001600160601b031611611d315760405162461bcd60e51b815260040161068d90612cd4565b8054600154600784015460405163782d6fe160e01b81526000936201000090046001600160601b0316926001600160a01b03169163782d6fe191611d79918c91600401612970565b60206040518083038186803b158015611d9157600080fd5b505afa158015611da5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc991906127b1565b039050806001600160601b0316846001600160601b03161115611dfe5760405162461bcd60e51b815260040161068d90612fbd565b6000611e12856001600160601b0316611c0a565b90508515611e3b57611e318460090154826001600160601b0316611c3b565b6009850155611e58565b611e5284600a0154826001600160601b0316611c3b565b600a8501555b600154604051633969f74f60e11b81526001600160a01b03909116906372d3ee9e90611e8a908b908990600401612aab565b600060405180830381600087803b158015611ea457600080fd5b505af1158015611eb8573d6000803e3d6000fd5b50508454600160ff199091161761ff00191661010089151502176dffffffffffffffffffffffff00001916620100006001600160601b0385160217855550506040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690611f2d908a908a908a9086906129f5565b60405180910390a15050505050505050565b6000546040516001600160a01b039091169063f2b0653790611f6d9088908890889088908890602001612a26565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611f9f9190612b25565b60206040518083038186803b158015611fb757600080fd5b505afa158015611fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fef9190612617565b1561200c5760405162461bcd60e51b815260040161068d906130e9565b600054604051633a66f90160e01b81526001600160a01b0390911690633a66f901906120449088908890889088908890600401612a26565b602060405180830381600087803b15801561205e57600080fd5b505af1158015612072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e89190612633565b600081836120b75760405162461bcd60e51b815260040161068d9190612b9c565b5060008385816120c357fe5b0495945050505050565b828054828255906000526020600020908101928215612122579160200282015b8281111561212257825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906120ed565b5061212e9291506122b8565b5090565b82805482825590600052602060002090810192821561216d579160200282015b8281111561216d578251825591602001919060010190612152565b5061212e9291506122d7565b8280548282559060005260206000209081019282156121c6579160200282015b828111156121c657825180516121b691849160209091019061222b565b5091602001919060010190612199565b5061212e9291506122ec565b82805482825590600052602060002090810192821561221f579160200282015b8281111561221f578251805161220f91849160209091019061222b565b50916020019190600101906121f2565b5061212e929150612309565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061226c57805160ff191683800117855561216d565b8280016001018555821561216d579182018281111561216d578251825591602001919060010190612152565b604080516060810182526000808252602082018190529181019190915290565b5b8082111561212e5780546001600160a01b03191681556001016122b9565b5b8082111561212e57600081556001016122d8565b8082111561212e5760006123008282612326565b506001016122ec565b8082111561212e57600061231d8282612326565b50600101612309565b50805460018160011615610100020316600290046000825580601f1061234c575061236a565b601f01602090049060005260206000209081019061236a91906122d7565b50565b600082601f83011261237d578081fd5b813561239061238b826134ab565b613484565b8181529150602080830190848101818402860182018710156123b157600080fd5b60005b848110156123d95781356123c781613527565b845292820192908201906001016123b4565b505050505092915050565b600082601f8301126123f4578081fd5b813561240261238b826134ab565b818152915060208083019084810160005b848110156123d95761242a888484358a010161249a565b84529282019290820190600101612413565b600082601f83011261244c578081fd5b813561245a61238b826134ab565b81815291506020808301908481018184028601820187101561247b57600080fd5b60005b848110156123d95781358452928201929082019060010161247e565b600082601f8301126124aa578081fd5b81356124b861238b826134cb565b91508082528360208285010111156124cf57600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156124f9578081fd5b8135611c0381613527565b600060208284031215612515578081fd5b8151611c0381613527565b60008060408385031215612532578081fd5b823561253d81613527565b946020939093013593505050565b600080600080600060a08688031215612562578081fd5b853567ffffffffffffffff80821115612579578283fd5b61258589838a0161236d565b9650602088013591508082111561259a578283fd5b6125a689838a0161243c565b955060408801359150808211156125bb578283fd5b6125c789838a016123e4565b945060608801359150808211156125dc578283fd5b6125e889838a016123e4565b935060808801359150808211156125fd578283fd5b5061260a8882890161249a565b9150509295509295909350565b600060208284031215612628578081fd5b8151611c038161353c565b600060208284031215612644578081fd5b5051919050565b60006020828403121561265c578081fd5b815167ffffffffffffffff811115612672578182fd5b8201601f81018413612682578182fd5b805161269061238b826134cb565b8181528560208385010111156126a4578384fd5b6126b58260208301602086016134fb565b95945050505050565b6000602082840312156126cf578081fd5b5035919050565b600080604083850312156126e8578182fd5b8235915060208301356126fa81613527565b809150509250929050565b60008060008060008060c0878903121561271d578384fd5b86359550602087013561272f8161353c565b9450604087013560ff81168114612744578485fd5b9350606087013592506080870135915060a08701356127628161354a565b809150509295509295509295565b600080600060608486031215612784578081fd5b8335925060208401356127968161353c565b915060408401356127a68161354a565b809150509250925092565b6000602082840312156127c2578081fd5b8151611c038161354a565b6000815180845260208085019450808401835b838110156128055781516001600160a01b0316875295820195908201906001016127e0565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b85811015612856578284038952612844848351612892565b9885019893509084019060010161282c565b5091979650505050505050565b6000815180845260208085019450808401835b8381101561280557815187529582019590820190600101612876565b600081518084526128aa8160208601602086016134fb565b601f01601f19169290920160200192915050565b600081546001808216600081146128dc57600181146128fa57612938565b60028304607f16865260ff1983166020870152604086019350612938565b6002830480875261290a866134ef565b60005b8281101561292e5781546020828b010152848201915060208101905061290d565b8801602001955050505b50505092915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038616825284602083015260a06040830152601860a08301527f73657450656e64696e6741646d696e286164647265737329000000000000000060c083015260e060608301526129e460e0830185612892565b905082608083015295945050505050565b6001600160a01b039490941684526020840192909252151560408301526001600160601b0316606082015260800190565b600060018060a01b038716825285602083015260a06040830152612a4d60a0830186612892565b8281036060840152612a5f8186612892565b9150508260808301529695505050505050565b600060018060a01b038716825285602083015260a06040830152612a9960a08301866128be565b8281036060840152612a5f81866128be565b6001600160a01b039290921682526001600160601b0316602082015260400190565b600060808252612ae060808301876127cd565b8281036020840152612af28187612863565b90508281036040840152612b068186612810565b90508281036060840152612b1a8185612810565b979650505050505050565b90815260200190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091521515604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b6020810160088310612b9657fe5b91905290565b600060208252611c036020830184612892565b6020808252603a908201527f476f7665726e6f723a3a70726f706f73653a2070726f706f73657220766f746560408201527f732062656c6f772070726f706f73616c207468726573686f6c64000000000000606082015260800190565b6020808252603f908201527f476f7665726e6f723a3a70726f706f73653a2070726f706f73616c2066756e6360408201527f74696f6e20696e666f726d6174696f6e206172697479206d69736d6174636800606082015260800190565b60208082526045908201527f476f7665726e6f723a3a5f5f717565756553657454696d656c6f636b50656e6460408201527f696e6741646d696e3a2073656e646572206d75737420626520676f7620677561606082015264393234b0b760d91b608082015260a00190565b60208082526044908201527f476f7665726e6f723a3a5f63617374566f74653a206e6f20656c696769626c6560408201527f20766f746573207072696f7220746f2070726f706f73616c20737461727420626060820152636c6f636b60e01b608082015260a00190565b60208082526023908201527f476f7665726e6f723a3a70726f706f73653a20746f6f206d616e7920616374696040820152626f6e7360e81b606082015260800190565b60208082526031908201527f476f7665726e6f723a3a63616e63656c3a2063616e6e6f742063616e63656c20604082015270195e1958dd5d1959081c1c9bdc1bdcd85b607a1b606082015260800190565b60208082526027908201527f476f7665726e6f723a3a70726f706f73653a206d7573742070726f7669646520604082015266616374696f6e7360c81b606082015260800190565b60208082526054908201527f476f7665726e6f723a3a70726f706f73653a206f6e65206c6976652070726f7060408201527f6f73616c207065722070726f706f7365722c20666f756e6420616e20616c726560608201527318591e481c195b991a5b99c81c1c9bdc1bdcd85b60621b608082015260a00190565b60208082526047908201527f476f7665726e6f723a3a5f5f6578656375746553657454696d656c6f636b506560408201527f6e64696e6741646d696e3a2073656e646572206d75737420626520676f7620676060820152663ab0b93234b0b760c91b608082015260a00190565b60208082526024908201527f476f7665726e6f723a3a73746174653a20696e76616c69642070726f706f73616040820152631b081a5960e21b606082015260800190565b60208082526053908201527f476f7665726e6f723a3a70726f706f73653a206f6e65206c6976652070726f7060408201527f6f73616c207065722070726f706f7365722c20666f756e6420616e20616c726560608201527218591e481858dd1a5d99481c1c9bdc1bdcd85b606a1b608082015260a00190565b60208082526032908201527f476f7665726e6f723a3a5f63617374566f74653a20766f746573206578636565604082015271191cc8195b1a59da589b1948185b5bdd5b9d60721b606082015260800190565b602080825260409082018190527f476f7665726e6f723a3a657865637574653a2070726f706f73616c2063616e20908201527f6f6e6c7920626520657865637574656420696620697420697320717565756564606082015260800190565b6020808252601190820152706164646974696f6e206f766572666c6f7760781b604082015260600190565b60208082526031908201527f476f7665726e6f723a3a5f5f61626469636174653a2073656e646572206d75736040820152703a1031329033b7bb1033bab0b93234b0b760791b606082015260800190565b6020808252603f908201527f476f7665726e6f723a3a5f71756575654f725265766572743a2070726f706f7360408201527f616c20616374696f6e20616c7265616479207175657565642061742065746100606082015260800190565b60208082526034908201527f476f7665726e6f723a3a5f5f61636365707441646d696e3a2073656e6465722060408201527336bab9ba1031329033b7bb1033bab0b93234b0b760611b606082015260800190565b60208082526028908201527f476f7665726e6f723a3a5f63617374566f74653a20766f74657220616c726561604082015267191e481d9bdd195960c21b606082015260800190565b6020808252602a908201527f476f7665726e6f723a3a63616e63656c3a2070726f706f7365722061626f7665604082015269081d1a1c995cda1bdb1960b21b606082015260800190565b60208082526025908201527f476f7665726e6f723a3a5f63617374566f74653a20766f74696e6720697320636040820152641b1bdcd95960da1b606082015260800190565b6020808252601590820152747375627472616374696f6e20756e646572666c6f7760581b604082015260600190565b6020808252603f908201527f476f7665726e6f723a3a71756575653a2070726f706f73616c2063616e206f6e60408201527f6c79206265207175657565642069662069742069732073756363656564656400606082015260800190565b6020808252602a908201527f476f7665726e6f723a3a63617374566f746542795369673a20696e76616c6964604082015269207369676e617475726560b01b606082015260800190565b8151151581526020808301511515908201526040918201516001600160601b03169181019190915260600190565b8981526001600160a01b0389166020820152610120604082018190526000906133a08382018b6127cd565b905082810360608401526133b4818a612863565b905082810360808401526133c88189612810565b905082810360a08401526133dc8188612810565b90508560c08401528460e08401528281036101008401526133fd8185612892565b9c9b505050505050505050505050565b60006101408c835260018060a01b038c1660208401528a60408401528960608401528860808401528760a08401528660c084015285151560e08401528415156101008401528061012084015261346581840185612892565b9d9c50505050505050505050505050565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156134a357600080fd5b604052919050565b600067ffffffffffffffff8211156134c1578081fd5b5060209081020190565b600067ffffffffffffffff8211156134e1578081fd5b50601f01601f191660200190565b60009081526020902090565b60005b838110156135165781810151838201526020016134fe565b838111156113a25750506000910152565b6001600160a01b038116811461236a57600080fd5b801515811461236a57600080fd5b6001600160601b038116811461236a57600080fdfea264697066735822122021edf24c872473a6e45f95e9982a644beed07932889999e7a0d0ff3f34acc66764736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x3688 CODESIZE SUB DUP1 PUSH3 0x3688 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x34 SWAP2 PUSH3 0x77 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP2 DUP3 AND OR SWAP1 SWAP2 SSTORE PUSH1 0x1 DUP1 SLOAD SWAP4 DUP6 AND SWAP4 DUP3 AND SWAP4 SWAP1 SWAP4 OR SWAP1 SWAP3 SSTORE PUSH1 0x2 DUP1 SLOAD SWAP2 SWAP1 SWAP4 AND SWAP2 AND OR SWAP1 SSTORE PUSH3 0xE3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH3 0x8C JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 MLOAD PUSH3 0x99 DUP2 PUSH3 0xCA JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP1 SWAP4 POP PUSH3 0xAC DUP2 PUSH3 0xCA JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MLOAD SWAP1 SWAP3 POP PUSH3 0xBF DUP2 PUSH3 0xCA JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0xE0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x3595 DUP1 PUSH3 0xF3 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1B7 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x760FBC13 GT PUSH2 0xEC JUMPI DUP1 PUSH4 0xDA35C664 GT PUSH2 0x8A JUMPI DUP1 PUSH4 0xDDF0B009 GT PUSH2 0x64 JUMPI DUP1 PUSH4 0xDDF0B009 EQ PUSH2 0x492 JUMPI DUP1 PUSH4 0xDEAAA7CC EQ PUSH2 0x4B2 JUMPI DUP1 PUSH4 0xE23A9A52 EQ PUSH2 0x4C7 JUMPI DUP1 PUSH4 0xFE0D94C1 EQ PUSH2 0x4F4 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0xDA35C664 EQ PUSH2 0x43D JUMPI DUP1 PUSH4 0xDA95691A EQ PUSH2 0x452 JUMPI DUP1 PUSH4 0xDBFA977F EQ PUSH2 0x472 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x94A08D58 GT PUSH2 0xC6 JUMPI DUP1 PUSH4 0x94A08D58 EQ PUSH2 0x3E9 JUMPI DUP1 PUSH4 0xB58131B0 EQ PUSH2 0x3FE JUMPI DUP1 PUSH4 0xB9A61961 EQ PUSH2 0x413 JUMPI DUP1 PUSH4 0xD33219B4 EQ PUSH2 0x428 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x760FBC13 EQ PUSH2 0x39F JUMPI DUP1 PUSH4 0x7BDBE4D0 EQ PUSH2 0x3B4 JUMPI DUP1 PUSH4 0x91500671 EQ PUSH2 0x3C9 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x328DD982 GT PUSH2 0x159 JUMPI DUP1 PUSH4 0x40E58EE5 GT PUSH2 0x133 JUMPI DUP1 PUSH4 0x40E58EE5 EQ PUSH2 0x31D JUMPI DUP1 PUSH4 0x452A9320 EQ PUSH2 0x33D JUMPI DUP1 PUSH4 0x4925EC55 EQ PUSH2 0x35F JUMPI DUP1 PUSH4 0x5D254608 EQ PUSH2 0x37F JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x328DD982 EQ PUSH2 0x2AB JUMPI DUP1 PUSH4 0x3932ABB1 EQ PUSH2 0x2DB JUMPI DUP1 PUSH4 0x3E4F49E6 EQ PUSH2 0x2F0 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x17977C61 GT PUSH2 0x195 JUMPI DUP1 PUSH4 0x17977C61 EQ PUSH2 0x23F JUMPI DUP1 PUSH4 0x20606B70 EQ PUSH2 0x25F JUMPI DUP1 PUSH4 0x21F43E42 EQ PUSH2 0x274 JUMPI DUP1 PUSH4 0x24BC1A64 EQ PUSH2 0x296 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x13CF08B EQ PUSH2 0x1BC JUMPI DUP1 PUSH4 0x2A251A3 EQ PUSH2 0x1FB JUMPI DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x21D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1C8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1DC PUSH2 0x1D7 CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0x507 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP11 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x340D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x207 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x5F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP2 SWAP1 PUSH2 0x2B25 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x229 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x232 PUSH2 0x5FD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP2 SWAP1 PUSH2 0x2B9C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x24B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x25A CALLDATASIZE PUSH1 0x4 PUSH2 0x24E8 JUMP JUMPDEST PUSH2 0x62D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x26B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x63F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x280 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x28F CALLDATASIZE PUSH1 0x4 PUSH2 0x2520 JUMP JUMPDEST PUSH2 0x663 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2A2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x74A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2B7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2CB PUSH2 0x2C6 CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0x8FD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2ACD JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2E7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0xB8C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2FC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x310 PUSH2 0x30B CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0xB91 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP2 SWAP1 PUSH2 0x2B88 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x329 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x338 CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0xD21 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x349 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x352 PUSH2 0xF8A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP2 SWAP1 PUSH2 0x295C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x36B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x232 PUSH2 0x37A CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0xF99 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x38B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x39A CALLDATASIZE PUSH1 0x4 PUSH2 0x2705 JUMP JUMPDEST PUSH2 0x103D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x11F0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3C0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x122C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3D5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x3E4 CALLDATASIZE PUSH1 0x4 PUSH2 0x2520 JUMP JUMPDEST PUSH2 0x1231 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3F5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x352 PUSH2 0x1306 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x40A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x1315 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x41F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x1323 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x434 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x352 PUSH2 0x13A8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x449 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x13B7 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x45E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x46D CALLDATASIZE PUSH1 0x4 PUSH2 0x254B JUMP JUMPDEST PUSH2 0x13BD JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x47E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x48D CALLDATASIZE PUSH1 0x4 PUSH2 0x2770 JUMP JUMPDEST PUSH2 0x1703 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x49E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x4AD CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0x170F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x1979 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4D3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4E7 PUSH2 0x4E2 CALLDATASIZE PUSH1 0x4 PUSH2 0x26D6 JUMP JUMPDEST PUSH2 0x199D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP2 SWAP1 PUSH2 0x3347 JUMP JUMPDEST PUSH2 0x294 PUSH2 0x502 CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0x1A09 JUMP JUMPDEST PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP1 DUP4 ADD SLOAD PUSH1 0x2 DUP1 DUP6 ADD SLOAD PUSH1 0x7 DUP7 ADD SLOAD PUSH1 0x8 DUP8 ADD SLOAD PUSH1 0x9 DUP9 ADD SLOAD PUSH1 0xA DUP10 ADD SLOAD PUSH1 0xB DUP11 ADD SLOAD PUSH1 0xC DUP12 ADD DUP1 SLOAD DUP15 MLOAD PUSH2 0x100 SWAP12 DUP3 AND ISZERO DUP13 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP2 AND SWAP9 SWAP1 SWAP9 DIV PUSH1 0x1F DUP2 ADD DUP15 SWAP1 DIV DUP15 MUL DUP10 ADD DUP15 ADD SWAP1 SWAP15 MSTORE DUP14 DUP9 MSTORE SWAP10 SWAP13 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP9 AND SWAP12 SWAP6 SWAP11 SWAP5 SWAP10 SWAP4 SWAP9 SWAP3 SWAP8 SWAP2 SWAP7 PUSH1 0xFF DUP1 DUP4 AND SWAP8 SWAP5 SWAP1 SWAP3 DIV SWAP1 SWAP2 AND SWAP5 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x5EC JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x5C1 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x5EC JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x5CF JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP DUP11 JUMP JUMPDEST PUSH2 0x4380 JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x14 DUP2 MSTORE PUSH1 0x20 ADD PUSH20 0x21B634B6B0BA32902220A79023B7BB32B93737B9 PUSH1 0x61 SHL DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH32 0x8CAD95687BA82C2CE50E74F7B754645E5117C3A5BEC8151C0726D5857980A866 DUP2 JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x696 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2E93 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 PUSH4 0x825F38F SWAP2 DUP4 SWAP2 SWAP1 PUSH2 0x6C0 SWAP1 DUP8 SWAP1 PUSH1 0x20 ADD PUSH2 0x295C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP6 PUSH1 0x40 MLOAD DUP6 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x6EF SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2989 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x709 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x71D JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x745 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x264B JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH4 0x57406CEF PUSH1 0xE1 SHL DUP2 MSTORE SWAP1 MLOAD PUSH1 0x0 SWAP3 DUP4 SWAP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 PUSH4 0x70A08231 SWAP2 DUP4 SWAP2 PUSH4 0xAE80D9DE SWAP2 PUSH1 0x4 DUP1 DUP3 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP1 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x79C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x7B0 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x7D4 SWAP2 SWAP1 PUSH2 0x2504 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x7F0 SWAP2 SWAP1 PUSH2 0x295C JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x808 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x81C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x840 SWAP2 SWAP1 PUSH2 0x2633 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xC4E41B22 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x893 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x8A7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x8CB SWAP2 SWAP1 PUSH2 0x2633 JUMP JUMPDEST SUB SWAP1 POP DUP1 ISZERO PUSH2 0x8F0 JUMPI PUSH2 0x8E7 PUSH2 0x8E2 DUP3 PUSH1 0x19 PUSH2 0x1BCE JUMP JUMPDEST PUSH2 0x1C0A JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x5FA JUMP JUMPDEST PUSH5 0x9341498E01 SWAP3 POP POP POP SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH1 0x4 PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 POP DUP1 PUSH1 0x3 ADD DUP2 PUSH1 0x4 ADD DUP3 PUSH1 0x5 ADD DUP4 PUSH1 0x6 ADD DUP4 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x97F JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x961 JUMPI JUMPDEST POP POP POP POP POP SWAP4 POP DUP3 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x9D1 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x9BD JUMPI JUMPDEST POP POP POP POP POP SWAP3 POP DUP2 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SWAP1 JUMPDEST DUP3 DUP3 LT ISZERO PUSH2 0xAA4 JUMPI PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 SWAP1 DUP2 SWAP1 KECCAK256 DUP4 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP8 AND ISZERO MUL ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV SWAP3 DUP4 ADD DUP6 SWAP1 DIV DUP6 MUL DUP2 ADD DUP6 ADD SWAP1 SWAP2 MSTORE DUP2 DUP2 MSTORE SWAP3 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xA90 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xA65 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xA90 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xA73 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x9F9 JUMP JUMPDEST POP POP POP POP SWAP2 POP DUP1 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SWAP1 JUMPDEST DUP3 DUP3 LT ISZERO PUSH2 0xB76 JUMPI PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 SWAP1 DUP2 SWAP1 KECCAK256 DUP4 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP8 AND ISZERO MUL ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV SWAP3 DUP4 ADD DUP6 SWAP1 DIV DUP6 MUL DUP2 ADD DUP6 ADD SWAP1 SWAP2 MSTORE DUP2 DUP2 MSTORE SWAP3 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xB62 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xB37 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xB62 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xB45 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0xACB JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP5 POP SWAP5 POP SWAP5 POP SWAP5 POP POP SWAP2 SWAP4 POP SWAP2 SWAP4 JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x3 SLOAD LT ISZERO DUP1 ISZERO PUSH2 0xBA5 JUMPI POP PUSH1 0x0 DUP3 GT JUMPDEST PUSH2 0xBC1 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2F00 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0xB DUP2 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xBE6 JUMPI PUSH1 0x2 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST DUP1 PUSH1 0x7 ADD SLOAD NUMBER GT PUSH2 0xBFB JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST DUP1 PUSH1 0x8 ADD SLOAD NUMBER GT PUSH2 0xC10 JUMPI PUSH1 0x1 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST DUP1 PUSH1 0xA ADD SLOAD DUP2 PUSH1 0x9 ADD SLOAD GT ISZERO DUP1 PUSH2 0xC31 JUMPI POP PUSH2 0xC2A PUSH2 0x74A JUMP JUMPDEST DUP2 PUSH1 0x9 ADD SLOAD LT JUMPDEST ISZERO PUSH2 0xC40 JUMPI PUSH1 0x3 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST PUSH1 0x2 DUP2 ADD SLOAD PUSH2 0xC53 JUMPI PUSH1 0x4 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST PUSH1 0xB DUP2 ADD SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0xC6F JUMPI PUSH1 0x7 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST PUSH2 0xD00 DUP2 PUSH1 0x2 ADD SLOAD PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xC1A287E2 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xCC3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xCD7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xCFB SWAP2 SWAP1 PUSH2 0x2633 JUMP JUMPDEST PUSH2 0x1C3B JUMP JUMPDEST TIMESTAMP LT PUSH2 0xD10 JUMPI PUSH1 0x6 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST PUSH1 0x5 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST POP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xD2C DUP3 PUSH2 0xB91 JUMP JUMPDEST SWAP1 POP PUSH1 0x7 DUP2 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0xD3C JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0xD5A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2D81 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ DUP1 PUSH2 0xE25 JUMPI POP PUSH2 0xD84 PUSH2 0x1315 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD DUP4 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND SWAP3 PUSH4 0x782D6FE1 SWAP3 SWAP1 SWAP2 AND SWAP1 PUSH2 0xDAD SWAP1 NUMBER SWAP1 PUSH2 0x1C60 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xDCA SWAP3 SWAP2 SWAP1 PUSH2 0x2970 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xDE2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xDF6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xE1A SWAP2 SWAP1 PUSH2 0x27B1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND LT JUMPDEST PUSH2 0xE41 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x31E2 JUMP JUMPDEST PUSH1 0xB DUP2 ADD DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE PUSH1 0x0 JUMPDEST PUSH1 0x3 DUP3 ADD SLOAD DUP2 LT ISZERO PUSH2 0xF4D JUMPI PUSH1 0x0 SLOAD PUSH1 0x3 DUP4 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP2 PUSH4 0x591FCDFE SWAP2 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0xE85 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x4 DUP6 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP2 DUP6 SWAP1 DUP2 LT PUSH2 0xEAD JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD DUP6 PUSH1 0x5 ADD DUP6 DUP2 SLOAD DUP2 LT PUSH2 0xEC7 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD DUP7 PUSH1 0x6 ADD DUP7 DUP2 SLOAD DUP2 LT PUSH2 0xEE0 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD DUP8 PUSH1 0x2 ADD SLOAD PUSH1 0x40 MLOAD DUP7 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xF0F SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2A72 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xF29 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xF3D JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x1 SWAP1 SWAP3 ADD SWAP2 POP PUSH2 0xE53 SWAP1 POP JUMP JUMPDEST POP PUSH32 0x789CF55BE980739DAD1D0699B93B58E806B51C9D96619BFA8FE0A28ABAA7B30C DUP4 PUSH1 0x40 MLOAD PUSH2 0xF7D SWAP2 SWAP1 PUSH2 0x2B25 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 PUSH1 0xC ADD DUP1 SLOAD DUP4 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP7 AND ISZERO MUL ADD SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 DIV SWAP2 DUP3 ADD DUP5 SWAP1 DIV DUP5 MUL DUP2 ADD DUP5 ADD SWAP1 SWAP5 MSTORE DUP1 DUP5 MSTORE PUSH1 0x60 SWAP4 SWAP3 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x1031 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1006 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1031 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1014 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x14 DUP2 MSTORE PUSH20 0x21B634B6B0BA32902220A79023B7BB32B93737B9 PUSH1 0x61 SHL PUSH1 0x20 SWAP1 SWAP2 ADD MSTORE PUSH1 0x0 PUSH32 0x8CAD95687BA82C2CE50E74F7B754645E5117C3A5BEC8151C0726D5857980A866 PUSH32 0xC91D7024F1084CF2CBC672FA7C9487148F930F2547C197A0C5A286CC6F4923EA PUSH2 0x10B5 PUSH2 0x1C88 JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x10C9 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2B2E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH32 0x8E25870C07E0B0B3884C78DA52790939A455C275406C44AE8B434B692FB916EE DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1118 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2B52 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1145 SWAP3 SWAP2 SWAP1 PUSH2 0x2941 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP10 DUP10 DUP10 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x1182 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2B6A JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x11A4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x11D7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x32FD JUMP JUMPDEST PUSH2 0x11E3 DUP2 DUP12 DUP12 DUP9 PUSH2 0x1C8C JUMP JUMPDEST POP POP POP POP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x121A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x3098 JUMP JUMPDEST PUSH1 0x2 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0xA SWAP1 JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x125B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2C69 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 PUSH4 0x3A66F901 SWAP2 DUP4 SWAP2 SWAP1 PUSH2 0x1285 SWAP1 DUP8 SWAP1 PUSH1 0x20 ADD PUSH2 0x295C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP6 PUSH1 0x40 MLOAD DUP6 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x12B4 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2989 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x12CE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x12E2 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x745 SWAP2 SWAP1 PUSH2 0x2633 JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH10 0x152D02C7E14AF6800000 SWAP1 JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x134D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x3146 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH4 0xE18B681 PUSH1 0xE0 SHL DUP2 MSTORE SWAP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP3 PUSH4 0xE18B681 SWAP3 PUSH1 0x4 DUP1 DUP5 ADD SWAP4 DUP3 SWAP1 SUB ADD DUP2 DUP4 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x138E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x13A2 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x13C7 PUSH2 0x1315 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x782D6FE1 SWAP1 CALLER SWAP1 PUSH2 0x13E8 SWAP1 NUMBER SWAP1 PUSH2 0x1C60 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1405 SWAP3 SWAP2 SWAP1 PUSH2 0x2970 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x141D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1431 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1455 SWAP2 SWAP1 PUSH2 0x27B1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND GT PUSH2 0x147B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2BAF JUMP JUMPDEST DUP5 MLOAD DUP7 MLOAD EQ DUP1 ISZERO PUSH2 0x148D JUMPI POP DUP4 MLOAD DUP7 MLOAD EQ JUMPDEST DUP1 ISZERO PUSH2 0x149A JUMPI POP DUP3 MLOAD DUP7 MLOAD EQ JUMPDEST PUSH2 0x14B6 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2C0C JUMP JUMPDEST DUP6 MLOAD PUSH2 0x14D4 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2DD2 JUMP JUMPDEST PUSH2 0x14DC PUSH2 0x122C JUMP JUMPDEST DUP7 MLOAD GT ISZERO PUSH2 0x14FC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2D3E JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x1579 JUMPI PUSH1 0x0 PUSH2 0x151D DUP3 PUSH2 0xB91 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 DUP2 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x152D JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x154B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2F44 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x1559 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1577 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2E19 JUMP JUMPDEST POP JUMPDEST PUSH1 0x0 PUSH2 0x1587 NUMBER PUSH2 0xCFB PUSH2 0xB8C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1597 DUP3 PUSH2 0xCFB PUSH2 0x5F6 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x1 SWAP1 DUP2 ADD DUP1 DUP4 SSTORE PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP3 KECCAK256 SWAP3 DUP4 SSTORE SWAP3 DUP3 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND CALLER OR SWAP1 SSTORE PUSH1 0x2 DUP3 ADD SSTORE DUP13 MLOAD SWAP4 SWAP5 POP SWAP3 PUSH2 0x15E3 SWAP3 DUP5 ADD SWAP2 DUP14 ADD SWAP1 PUSH2 0x20CD JUMP JUMPDEST POP DUP9 MLOAD PUSH2 0x15F9 SWAP1 PUSH1 0x4 DUP4 ADD SWAP1 PUSH1 0x20 DUP13 ADD SWAP1 PUSH2 0x2132 JUMP JUMPDEST POP DUP8 MLOAD PUSH2 0x160F SWAP1 PUSH1 0x5 DUP4 ADD SWAP1 PUSH1 0x20 DUP12 ADD SWAP1 PUSH2 0x2179 JUMP JUMPDEST POP DUP7 MLOAD PUSH2 0x1625 SWAP1 PUSH1 0x6 DUP4 ADD SWAP1 PUSH1 0x20 DUP11 ADD SWAP1 PUSH2 0x21D2 JUMP JUMPDEST POP PUSH1 0x7 DUP2 ADD DUP4 SWAP1 SSTORE PUSH1 0x8 DUP2 ADD DUP3 SWAP1 SSTORE PUSH1 0x0 PUSH1 0x9 DUP3 ADD DUP2 SWAP1 SSTORE PUSH1 0xA DUP3 ADD SSTORE PUSH1 0xB DUP2 ADD DUP1 SLOAD PUSH2 0xFFFF NOT AND SWAP1 SSTORE DUP6 MLOAD PUSH2 0x1664 SWAP1 PUSH1 0xC DUP4 ADD SWAP1 PUSH1 0x20 DUP10 ADD SWAP1 PUSH2 0x222B JUMP JUMPDEST POP DUP1 PUSH1 0x0 ADD SLOAD PUSH1 0x5 PUSH1 0x0 DUP4 PUSH1 0x1 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 DUP2 SWAP1 SSTORE POP PUSH32 0x7D84A6263AE0D98D3329BD7B46BB4E8D6F98CD35A7ADB45C274C8B7FD5EBD5E0 DUP2 PUSH1 0x0 ADD SLOAD CALLER DUP13 DUP13 DUP13 DUP13 DUP10 DUP10 DUP15 PUSH1 0x40 MLOAD PUSH2 0x16ED SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3375 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 SLOAD SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x745 CALLER DUP5 DUP5 DUP5 PUSH2 0x1C8C JUMP JUMPDEST PUSH1 0x4 PUSH2 0x171A DUP3 PUSH2 0xB91 JUMP JUMPDEST PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x1725 JUMPI INVALID JUMPDEST EQ PUSH2 0x1742 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x32A0 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 DUP5 SLOAD DUP3 MLOAD PUSH4 0xD48571F PUSH1 0xE3 SHL DUP2 MSTORE SWAP3 MLOAD SWAP2 SWAP6 SWAP5 PUSH2 0x1797 SWAP5 TIMESTAMP SWAP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP4 AND SWAP4 PUSH4 0x6A42B8F8 SWAP4 DUP1 DUP5 ADD SWAP4 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xCC3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0x3 DUP4 ADD SLOAD DUP2 LT ISZERO PUSH2 0x193F JUMPI PUSH2 0x1937 DUP4 PUSH1 0x3 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x17BA JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x4 DUP6 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x17E2 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD DUP6 PUSH1 0x5 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x17FC JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP2 DUP3 SWAP1 KECCAK256 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP8 AND ISZERO MUL ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV SWAP3 DUP4 ADD DUP6 SWAP1 DIV DUP6 MUL DUP2 ADD DUP6 ADD SWAP1 SWAP2 MSTORE DUP2 DUP2 MSTORE SWAP3 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x188A JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x185F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x188A JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x186D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP7 PUSH1 0x6 ADD DUP6 DUP2 SLOAD DUP2 LT PUSH2 0x189E JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP2 DUP3 SWAP1 KECCAK256 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP8 AND ISZERO MUL ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV SWAP3 DUP4 ADD DUP6 SWAP1 DIV DUP6 MUL DUP2 ADD DUP6 ADD SWAP1 SWAP2 MSTORE DUP2 DUP2 MSTORE SWAP3 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x192C JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1901 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x192C JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x190F JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP7 PUSH2 0x1F3F JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x179C JUMP JUMPDEST POP PUSH1 0x2 DUP3 ADD DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9A2E42FD6722813D69113E7D0079D3D940171428DF7373DF9C7F7617CFDA2892 SWAP1 PUSH2 0xF7D SWAP1 DUP6 SWAP1 DUP5 SWAP1 PUSH2 0x3476 JUMP JUMPDEST PUSH32 0x8E25870C07E0B0B3884C78DA52790939A455C275406C44AE8B434B692FB916EE DUP2 JUMP JUMPDEST PUSH2 0x19A5 PUSH2 0x2298 JUMP JUMPDEST POP PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP4 SWAP1 SWAP4 AND DUP5 MSTORE PUSH1 0xD SWAP1 SWAP3 ADD DUP2 MSTORE SWAP2 DUP2 SWAP1 KECCAK256 DUP2 MLOAD PUSH1 0x60 DUP2 ADD DUP4 MSTORE SWAP1 SLOAD PUSH1 0xFF DUP1 DUP3 AND ISZERO ISZERO DUP4 MSTORE PUSH2 0x100 DUP3 DIV AND ISZERO ISZERO SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH3 0x10000 SWAP1 SWAP3 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP1 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x5 PUSH2 0x1A14 DUP3 PUSH2 0xB91 JUMP JUMPDEST PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x1A1F JUMPI INVALID JUMPDEST EQ PUSH2 0x1A3C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x300F JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0xB DUP2 ADD DUP1 SLOAD PUSH2 0xFF00 NOT AND PUSH2 0x100 OR SWAP1 SSTORE SWAP1 JUMPDEST PUSH1 0x3 DUP3 ADD SLOAD DUP2 LT ISZERO PUSH2 0x1B92 JUMPI PUSH1 0x0 SLOAD PUSH1 0x4 DUP4 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP2 PUSH4 0x825F38F SWAP2 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0x1A8F JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD DUP5 PUSH1 0x3 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x1AA9 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x4 DUP7 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP2 DUP7 SWAP1 DUP2 LT PUSH2 0x1AD1 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD DUP7 PUSH1 0x5 ADD DUP7 DUP2 SLOAD DUP2 LT PUSH2 0x1AEB JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD DUP8 PUSH1 0x6 ADD DUP8 DUP2 SLOAD DUP2 LT PUSH2 0x1B04 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD DUP9 PUSH1 0x2 ADD SLOAD PUSH1 0x40 MLOAD DUP8 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1B33 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2A72 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1B4C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x1B60 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x1B89 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x264B JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x1A5D JUMP JUMPDEST POP PUSH32 0x712AE1383F79AC853F8D882153778E0260EF8F03B504E2866E0593E04D2B291F DUP3 PUSH1 0x40 MLOAD PUSH2 0x1BC2 SWAP2 SWAP1 PUSH2 0x2B25 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C03 DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x10 DUP2 MSTORE PUSH1 0x20 ADD PUSH16 0x6469766973696F6E206279207A65726F PUSH1 0x80 SHL DUP2 MSTORE POP PUSH2 0x2096 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP1 PUSH1 0x2 PUSH1 0x1 DUP3 ADD DIV JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xD1A JUMPI DUP1 SWAP2 POP PUSH1 0x2 DUP2 DUP3 DUP6 DUP2 PUSH2 0x1C2A JUMPI INVALID JUMPDEST DIV ADD DUP2 PUSH2 0x1C33 JUMPI INVALID JUMPDEST DIV SWAP1 POP PUSH2 0x1C13 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x1C03 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x306D JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0x1C82 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x3271 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x1C97 DUP5 PUSH2 0xB91 JUMP JUMPDEST PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x1CA2 JUMPI INVALID JUMPDEST EQ PUSH2 0x1CBF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x322C JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND DUP5 MSTORE PUSH1 0xD DUP2 ADD SWAP1 SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x1D08 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x319A JUMP JUMPDEST PUSH1 0x0 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND GT PUSH2 0x1D31 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2CD4 JUMP JUMPDEST DUP1 SLOAD PUSH1 0x1 SLOAD PUSH1 0x7 DUP5 ADD SLOAD PUSH1 0x40 MLOAD PUSH4 0x782D6FE1 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 SWAP4 PUSH3 0x10000 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP2 PUSH4 0x782D6FE1 SWAP2 PUSH2 0x1D79 SWAP2 DUP13 SWAP2 PUSH1 0x4 ADD PUSH2 0x2970 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1D91 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1DA5 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1DC9 SWAP2 SWAP1 PUSH2 0x27B1 JUMP JUMPDEST SUB SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND GT ISZERO PUSH2 0x1DFE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2FBD JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1E12 DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH2 0x1C0A JUMP JUMPDEST SWAP1 POP DUP6 ISZERO PUSH2 0x1E3B JUMPI PUSH2 0x1E31 DUP5 PUSH1 0x9 ADD SLOAD DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH2 0x1C3B JUMP JUMPDEST PUSH1 0x9 DUP6 ADD SSTORE PUSH2 0x1E58 JUMP JUMPDEST PUSH2 0x1E52 DUP5 PUSH1 0xA ADD SLOAD DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH2 0x1C3B JUMP JUMPDEST PUSH1 0xA DUP6 ADD SSTORE JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 MLOAD PUSH4 0x3969F74F PUSH1 0xE1 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 PUSH4 0x72D3EE9E SWAP1 PUSH2 0x1E8A SWAP1 DUP12 SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0x2AAB JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1EA4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x1EB8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP DUP5 SLOAD PUSH1 0x1 PUSH1 0xFF NOT SWAP1 SWAP2 AND OR PUSH2 0xFF00 NOT AND PUSH2 0x100 DUP10 ISZERO ISZERO MUL OR PUSH14 0xFFFFFFFFFFFFFFFFFFFFFFFF0000 NOT AND PUSH3 0x10000 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP6 AND MUL OR DUP6 SSTORE POP POP PUSH1 0x40 MLOAD PUSH32 0x877856338E13F63D0C36822FF0EF736B80934CD90574A3A5BC9262C39D217C46 SWAP1 PUSH2 0x1F2D SWAP1 DUP11 SWAP1 DUP11 SWAP1 DUP11 SWAP1 DUP7 SWAP1 PUSH2 0x29F5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 PUSH4 0xF2B06537 SWAP1 PUSH2 0x1F6D SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x20 ADD PUSH2 0x2A26 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1F9F SWAP2 SWAP1 PUSH2 0x2B25 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1FB7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1FCB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1FEF SWAP2 SWAP1 PUSH2 0x2617 JUMP JUMPDEST ISZERO PUSH2 0x200C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x30E9 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD PUSH4 0x3A66F901 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 PUSH4 0x3A66F901 SWAP1 PUSH2 0x2044 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x2A26 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x205E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2072 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x11E8 SWAP2 SWAP1 PUSH2 0x2633 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 PUSH2 0x20B7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP2 SWAP1 PUSH2 0x2B9C JUMP JUMPDEST POP PUSH1 0x0 DUP4 DUP6 DUP2 PUSH2 0x20C3 JUMPI INVALID JUMPDEST DIV SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH2 0x2122 JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x2122 JUMPI DUP3 MLOAD DUP3 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND OR DUP3 SSTORE PUSH1 0x20 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x20ED JUMP JUMPDEST POP PUSH2 0x212E SWAP3 SWAP2 POP PUSH2 0x22B8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH2 0x216D JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x216D JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x2152 JUMP JUMPDEST POP PUSH2 0x212E SWAP3 SWAP2 POP PUSH2 0x22D7 JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH2 0x21C6 JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x21C6 JUMPI DUP3 MLOAD DUP1 MLOAD PUSH2 0x21B6 SWAP2 DUP5 SWAP2 PUSH1 0x20 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x222B JUMP JUMPDEST POP SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x2199 JUMP JUMPDEST POP PUSH2 0x212E SWAP3 SWAP2 POP PUSH2 0x22EC JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH2 0x221F JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x221F JUMPI DUP3 MLOAD DUP1 MLOAD PUSH2 0x220F SWAP2 DUP5 SWAP2 PUSH1 0x20 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x222B JUMP JUMPDEST POP SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x21F2 JUMP JUMPDEST POP PUSH2 0x212E SWAP3 SWAP2 POP PUSH2 0x2309 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x226C JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x216D JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x216D JUMPI SWAP2 DUP3 ADD DUP3 DUP2 GT ISZERO PUSH2 0x216D JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x2152 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x60 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x212E JUMPI DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x22B9 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x212E JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x22D8 JUMP JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x212E JUMPI PUSH1 0x0 PUSH2 0x2300 DUP3 DUP3 PUSH2 0x2326 JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x22EC JUMP JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x212E JUMPI PUSH1 0x0 PUSH2 0x231D DUP3 DUP3 PUSH2 0x2326 JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x2309 JUMP JUMPDEST POP DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV PUSH1 0x0 DUP3 SSTORE DUP1 PUSH1 0x1F LT PUSH2 0x234C JUMPI POP PUSH2 0x236A JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP1 PUSH2 0x236A SWAP2 SWAP1 PUSH2 0x22D7 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x237D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x2390 PUSH2 0x238B DUP3 PUSH2 0x34AB JUMP JUMPDEST PUSH2 0x3484 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x23B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x23D9 JUMPI DUP2 CALLDATALOAD PUSH2 0x23C7 DUP2 PUSH2 0x3527 JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x23B4 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x23F4 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x2402 PUSH2 0x238B DUP3 PUSH2 0x34AB JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x23D9 JUMPI PUSH2 0x242A DUP9 DUP5 DUP5 CALLDATALOAD DUP11 ADD ADD PUSH2 0x249A JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x2413 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x244C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x245A PUSH2 0x238B DUP3 PUSH2 0x34AB JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x247B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x23D9 JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x247E JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x24AA JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x24B8 PUSH2 0x238B DUP3 PUSH2 0x34CB JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x24CF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x24F9 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1C03 DUP2 PUSH2 0x3527 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2515 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1C03 DUP2 PUSH2 0x3527 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x2532 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x253D DUP2 PUSH2 0x3527 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x2562 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x2579 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x2585 DUP10 DUP4 DUP11 ADD PUSH2 0x236D JUMP JUMPDEST SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x259A JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x25A6 DUP10 DUP4 DUP11 ADD PUSH2 0x243C JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x25BB JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x25C7 DUP10 DUP4 DUP11 ADD PUSH2 0x23E4 JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x25DC JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x25E8 DUP10 DUP4 DUP11 ADD PUSH2 0x23E4 JUMP JUMPDEST SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x25FD JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x260A DUP9 DUP3 DUP10 ADD PUSH2 0x249A JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 SWAP1 SWAP4 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2628 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1C03 DUP2 PUSH2 0x353C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2644 JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x265C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2672 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 ADD PUSH1 0x1F DUP2 ADD DUP5 SGT PUSH2 0x2682 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x2690 PUSH2 0x238B DUP3 PUSH2 0x34CB JUMP JUMPDEST DUP2 DUP2 MSTORE DUP6 PUSH1 0x20 DUP4 DUP6 ADD ADD GT ISZERO PUSH2 0x26A4 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x26B5 DUP3 PUSH1 0x20 DUP4 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x34FB JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x26CF JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x26E8 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x26FA DUP2 PUSH2 0x3527 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x271D JUMPI DUP4 DUP5 REVERT JUMPDEST DUP7 CALLDATALOAD SWAP6 POP PUSH1 0x20 DUP8 ADD CALLDATALOAD PUSH2 0x272F DUP2 PUSH2 0x353C JUMP JUMPDEST SWAP5 POP PUSH1 0x40 DUP8 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x2744 JUMPI DUP5 DUP6 REVERT JUMPDEST SWAP4 POP PUSH1 0x60 DUP8 ADD CALLDATALOAD SWAP3 POP PUSH1 0x80 DUP8 ADD CALLDATALOAD SWAP2 POP PUSH1 0xA0 DUP8 ADD CALLDATALOAD PUSH2 0x2762 DUP2 PUSH2 0x354A JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x2784 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x2796 DUP2 PUSH2 0x353C JUMP JUMPDEST SWAP2 POP PUSH1 0x40 DUP5 ADD CALLDATALOAD PUSH2 0x27A6 DUP2 PUSH2 0x354A JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x27C2 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1C03 DUP2 PUSH2 0x354A JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x2805 JUMPI DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x27E0 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD DUP1 DUP2 SWAP7 POP DUP3 DUP5 MUL DUP2 ADD SWAP2 POP DUP3 DUP7 ADD DUP6 JUMPDEST DUP6 DUP2 LT ISZERO PUSH2 0x2856 JUMPI DUP3 DUP5 SUB DUP10 MSTORE PUSH2 0x2844 DUP5 DUP4 MLOAD PUSH2 0x2892 JUMP JUMPDEST SWAP9 DUP6 ADD SWAP9 SWAP4 POP SWAP1 DUP5 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x282C JUMP JUMPDEST POP SWAP2 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x2805 JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x2876 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0x28AA DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x34FB JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 AND PUSH1 0x0 DUP2 EQ PUSH2 0x28DC JUMPI PUSH1 0x1 DUP2 EQ PUSH2 0x28FA JUMPI PUSH2 0x2938 JUMP JUMPDEST PUSH1 0x2 DUP4 DIV PUSH1 0x7F AND DUP7 MSTORE PUSH1 0xFF NOT DUP4 AND PUSH1 0x20 DUP8 ADD MSTORE PUSH1 0x40 DUP7 ADD SWAP4 POP PUSH2 0x2938 JUMP JUMPDEST PUSH1 0x2 DUP4 DIV DUP1 DUP8 MSTORE PUSH2 0x290A DUP7 PUSH2 0x34EF JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x292E JUMPI DUP2 SLOAD PUSH1 0x20 DUP3 DUP12 ADD ADD MSTORE DUP5 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x290D JUMP JUMPDEST DUP9 ADD PUSH1 0x20 ADD SWAP6 POP POP POP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP7 AND DUP3 MSTORE DUP5 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0xA0 PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x18 PUSH1 0xA0 DUP4 ADD MSTORE PUSH32 0x73657450656E64696E6741646D696E2861646472657373290000000000000000 PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xE0 PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x29E4 PUSH1 0xE0 DUP4 ADD DUP6 PUSH2 0x2892 JUMP JUMPDEST SWAP1 POP DUP3 PUSH1 0x80 DUP4 ADD MSTORE SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 SWAP1 SWAP5 AND DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE ISZERO ISZERO PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP8 AND DUP3 MSTORE DUP6 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0xA0 PUSH1 0x40 DUP4 ADD MSTORE PUSH2 0x2A4D PUSH1 0xA0 DUP4 ADD DUP7 PUSH2 0x2892 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x2A5F DUP2 DUP7 PUSH2 0x2892 JUMP JUMPDEST SWAP2 POP POP DUP3 PUSH1 0x80 DUP4 ADD MSTORE SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP8 AND DUP3 MSTORE DUP6 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0xA0 PUSH1 0x40 DUP4 ADD MSTORE PUSH2 0x2A99 PUSH1 0xA0 DUP4 ADD DUP7 PUSH2 0x28BE JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x2A5F DUP2 DUP7 PUSH2 0x28BE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 MSTORE PUSH2 0x2AE0 PUSH1 0x80 DUP4 ADD DUP8 PUSH2 0x27CD JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x2AF2 DUP2 DUP8 PUSH2 0x2863 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x2B06 DUP2 DUP7 PUSH2 0x2810 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x2B1A DUP2 DUP6 PUSH2 0x2810 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE ISZERO ISZERO PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP2 ADD PUSH1 0x8 DUP4 LT PUSH2 0x2B96 JUMPI INVALID JUMPDEST SWAP2 SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1C03 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x2892 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3A SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A2070726F706F73657220766F7465 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x732062656C6F772070726F706F73616C207468726573686F6C64000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3F SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A2070726F706F73616C2066756E63 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x74696F6E20696E666F726D6174696F6E206172697479206D69736D6174636800 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x45 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F5F717565756553657454696D656C6F636B50656E64 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x696E6741646D696E3A2073656E646572206D75737420626520676F7620677561 PUSH1 0x60 DUP3 ADD MSTORE PUSH5 0x393234B0B7 PUSH1 0xD9 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x44 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F63617374566F74653A206E6F20656C696769626C65 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x20766F746573207072696F7220746F2070726F706F73616C2073746172742062 PUSH1 0x60 DUP3 ADD MSTORE PUSH4 0x6C6F636B PUSH1 0xE0 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x23 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A20746F6F206D616E792061637469 PUSH1 0x40 DUP3 ADD MSTORE PUSH3 0x6F6E73 PUSH1 0xE8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x31 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A63616E63656C3A2063616E6E6F742063616E63656C20 PUSH1 0x40 DUP3 ADD MSTORE PUSH17 0x195E1958DD5D1959081C1C9BDC1BDCD85B PUSH1 0x7A SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x27 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A206D7573742070726F7669646520 PUSH1 0x40 DUP3 ADD MSTORE PUSH7 0x616374696F6E73 PUSH1 0xC8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x54 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A206F6E65206C6976652070726F70 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6F73616C207065722070726F706F7365722C20666F756E6420616E20616C7265 PUSH1 0x60 DUP3 ADD MSTORE PUSH20 0x18591E481C195B991A5B99C81C1C9BDC1BDCD85B PUSH1 0x62 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x47 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F5F6578656375746553657454696D656C6F636B5065 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6E64696E6741646D696E3A2073656E646572206D75737420626520676F762067 PUSH1 0x60 DUP3 ADD MSTORE PUSH7 0x3AB0B93234B0B7 PUSH1 0xC9 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A73746174653A20696E76616C69642070726F706F7361 PUSH1 0x40 DUP3 ADD MSTORE PUSH4 0x1B081A59 PUSH1 0xE2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x53 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A206F6E65206C6976652070726F70 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6F73616C207065722070726F706F7365722C20666F756E6420616E20616C7265 PUSH1 0x60 DUP3 ADD MSTORE PUSH19 0x18591E481858DD1A5D99481C1C9BDC1BDCD85B PUSH1 0x6A SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F63617374566F74653A20766F746573206578636565 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x191CC8195B1A59DA589B1948185B5BDD5B9D PUSH1 0x72 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x40 SWAP1 DUP3 ADD DUP2 SWAP1 MSTORE PUSH32 0x476F7665726E6F723A3A657865637574653A2070726F706F73616C2063616E20 SWAP1 DUP3 ADD MSTORE PUSH32 0x6F6E6C7920626520657865637574656420696620697420697320717565756564 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x11 SWAP1 DUP3 ADD MSTORE PUSH17 0x6164646974696F6E206F766572666C6F77 PUSH1 0x78 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x31 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F5F61626469636174653A2073656E646572206D7573 PUSH1 0x40 DUP3 ADD MSTORE PUSH17 0x3A1031329033B7BB1033BAB0B93234B0B7 PUSH1 0x79 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3F SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F71756575654F725265766572743A2070726F706F73 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x616C20616374696F6E20616C7265616479207175657565642061742065746100 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x34 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F5F61636365707441646D696E3A2073656E64657220 PUSH1 0x40 DUP3 ADD MSTORE PUSH20 0x36BAB9BA1031329033B7BB1033BAB0B93234B0B7 PUSH1 0x61 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F63617374566F74653A20766F74657220616C726561 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x191E481D9BDD1959 PUSH1 0xC2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2A SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A63616E63656C3A2070726F706F7365722061626F7665 PUSH1 0x40 DUP3 ADD MSTORE PUSH10 0x81D1A1C995CDA1BDB19 PUSH1 0xB2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x25 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F63617374566F74653A20766F74696E672069732063 PUSH1 0x40 DUP3 ADD MSTORE PUSH5 0x1B1BDCD959 PUSH1 0xDA SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x15 SWAP1 DUP3 ADD MSTORE PUSH21 0x7375627472616374696F6E20756E646572666C6F77 PUSH1 0x58 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3F SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A71756575653A2070726F706F73616C2063616E206F6E PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6C79206265207175657565642069662069742069732073756363656564656400 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2A SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A63617374566F746542795369673A20696E76616C6964 PUSH1 0x40 DUP3 ADD MSTORE PUSH10 0x207369676E6174757265 PUSH1 0xB0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST DUP2 MLOAD ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 DUP1 DUP4 ADD MLOAD ISZERO ISZERO SWAP1 DUP3 ADD MSTORE PUSH1 0x40 SWAP2 DUP3 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST DUP10 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x120 PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x33A0 DUP4 DUP3 ADD DUP12 PUSH2 0x27CD JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x33B4 DUP2 DUP11 PUSH2 0x2863 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x80 DUP5 ADD MSTORE PUSH2 0x33C8 DUP2 DUP10 PUSH2 0x2810 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0xA0 DUP5 ADD MSTORE PUSH2 0x33DC DUP2 DUP9 PUSH2 0x2810 JUMP JUMPDEST SWAP1 POP DUP6 PUSH1 0xC0 DUP5 ADD MSTORE DUP5 PUSH1 0xE0 DUP5 ADD MSTORE DUP3 DUP2 SUB PUSH2 0x100 DUP5 ADD MSTORE PUSH2 0x33FD DUP2 DUP6 PUSH2 0x2892 JUMP JUMPDEST SWAP13 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x140 DUP13 DUP4 MSTORE PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP13 AND PUSH1 0x20 DUP5 ADD MSTORE DUP11 PUSH1 0x40 DUP5 ADD MSTORE DUP10 PUSH1 0x60 DUP5 ADD MSTORE DUP9 PUSH1 0x80 DUP5 ADD MSTORE DUP8 PUSH1 0xA0 DUP5 ADD MSTORE DUP7 PUSH1 0xC0 DUP5 ADD MSTORE DUP6 ISZERO ISZERO PUSH1 0xE0 DUP5 ADD MSTORE DUP5 ISZERO ISZERO PUSH2 0x100 DUP5 ADD MSTORE DUP1 PUSH2 0x120 DUP5 ADD MSTORE PUSH2 0x3465 DUP2 DUP5 ADD DUP6 PUSH2 0x2892 JUMP JUMPDEST SWAP14 SWAP13 POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x34A3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x34C1 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x34E1 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x3516 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x34FE JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x13A2 JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x236A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x236A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x236A JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x21 0xED CALLCODE 0x4C DUP8 0x24 PUSH20 0xA6E45F95E9982A644BEED07932889999E7A0D0FF EXTCODEHASH CALLVALUE 0xAC 0xC6 PUSH8 0x64736F6C63430007 STOP STOP CALLER ", - "sourceMap": "1764:15378:0:-:0;;;7042:199;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7125:8;:39;;-1:-1:-1;;;;;7125:39:0;;;-1:-1:-1;;;;;;7125:39:0;;;;;;;;7174:30;;;;;;;;;;;;;;;7214:8;:20;;;;;;;;;;;1764:15378;;146:535:-1;;;;295:2;283:9;274:7;270:23;266:32;263:2;;;-1:-1;;301:12;263:2;89:6;83:13;101:33;128:5;101:33;:::i;:::-;464:2;514:22;;83:13;353:74;;-1:-1;101:33;83:13;101:33;:::i;:::-;583:2;633:22;;83:13;472:74;;-1:-1;101:33;83:13;101:33;:::i;:::-;591:74;;;;257:424;;;;;:::o;914:117::-;-1:-1;;;;;848:54;;973:35;;963:2;;1022:1;;1012:12;963:2;957:74;:::o;:::-;1764:15378:0;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "6080604052600436106101b75760003560e01c8063760fbc13116100ec578063da35c6641161008a578063ddf0b00911610064578063ddf0b00914610492578063deaaa7cc146104b2578063e23a9a52146104c7578063fe0d94c1146104f4576101b7565b8063da35c6641461043d578063da95691a14610452578063dbfa977f14610472576101b7565b806394a08d58116100c657806394a08d58146103e9578063b58131b0146103fe578063b9a6196114610413578063d33219b414610428576101b7565b8063760fbc131461039f5780637bdbe4d0146103b457806391500671146103c9576101b7565b8063328dd9821161015957806340e58ee51161013357806340e58ee51461031d578063452a93201461033d5780634925ec551461035f5780635d2546081461037f576101b7565b8063328dd982146102ab5780633932abb1146102db5780633e4f49e6146102f0576101b7565b806317977c611161019557806317977c611461023f57806320606b701461025f57806321f43e421461027457806324bc1a6414610296576101b7565b8063013cf08b146101bc57806302a251a3146101fb57806306fdde031461021d575b600080fd5b3480156101c857600080fd5b506101dc6101d73660046126be565b610507565b6040516101f29a9998979695949392919061340d565b60405180910390f35b34801561020757600080fd5b506102106105f6565b6040516101f29190612b25565b34801561022957600080fd5b506102326105fd565b6040516101f29190612b9c565b34801561024b57600080fd5b5061021061025a3660046124e8565b61062d565b34801561026b57600080fd5b5061021061063f565b34801561028057600080fd5b5061029461028f366004612520565b610663565b005b3480156102a257600080fd5b5061021061074a565b3480156102b757600080fd5b506102cb6102c63660046126be565b6108fd565b6040516101f29493929190612acd565b3480156102e757600080fd5b50610210610b8c565b3480156102fc57600080fd5b5061031061030b3660046126be565b610b91565b6040516101f29190612b88565b34801561032957600080fd5b506102946103383660046126be565b610d21565b34801561034957600080fd5b50610352610f8a565b6040516101f2919061295c565b34801561036b57600080fd5b5061023261037a3660046126be565b610f99565b34801561038b57600080fd5b5061029461039a366004612705565b61103d565b3480156103ab57600080fd5b506102946111f0565b3480156103c057600080fd5b5061021061122c565b3480156103d557600080fd5b506102946103e4366004612520565b611231565b3480156103f557600080fd5b50610352611306565b34801561040a57600080fd5b50610210611315565b34801561041f57600080fd5b50610294611323565b34801561043457600080fd5b506103526113a8565b34801561044957600080fd5b506102106113b7565b34801561045e57600080fd5b5061021061046d36600461254b565b6113bd565b34801561047e57600080fd5b5061029461048d366004612770565b611703565b34801561049e57600080fd5b506102946104ad3660046126be565b61170f565b3480156104be57600080fd5b50610210611979565b3480156104d357600080fd5b506104e76104e23660046126d6565b61199d565b6040516101f29190613347565b6102946105023660046126be565b611a09565b6004602090815260009182526040918290208054600180830154600280850154600786015460088701546009880154600a890154600b8a0154600c8b0180548e516101009b8216158c026000190190911698909804601f81018e90048e0289018e01909e528d8852999c6001600160a01b039098169b959a949993989297919660ff8083169794909204909116949390929091908301828280156105ec5780601f106105c1576101008083540402835291602001916105ec565b820191906000526020600020905b8154815290600101906020018083116105cf57829003601f168201915b505050505090508a565b6143805b90565b6040518060400160405280601481526020017321b634b6b0ba32902220a79023b7bb32b93737b960611b81525081565b60056020526000908152604090205481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6002546001600160a01b031633146106965760405162461bcd60e51b815260040161068d90612e93565b60405180910390fd5b600080546040516001600160a01b0390911691630825f38f918391906106c090879060200161295c565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016106ef9493929190612989565b600060405180830381600087803b15801561070957600080fd5b505af115801561071d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610745919081019061264b565b505050565b600154604080516357406cef60e11b8152905160009283926001600160a01b03909116916370a0823191839163ae80d9de91600480820192602092909190829003018186803b15801561079c57600080fd5b505afa1580156107b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d49190612504565b6040518263ffffffff1660e01b81526004016107f0919061295c565b60206040518083038186803b15801561080857600080fd5b505afa15801561081c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108409190612633565b9050600081600160009054906101000a90046001600160a01b03166001600160a01b031663c4e41b226040518163ffffffff1660e01b815260040160206040518083038186803b15801561089357600080fd5b505afa1580156108a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cb9190612633565b03905080156108f0576108e76108e2826019611bce565b611c0a565b925050506105fa565b649341498e019250505090565b6060806060806000600460008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561097f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610961575b50505050509350828054806020026020016040519081016040528092919081815260200182805480156109d157602002820191906000526020600020905b8154815260200190600101908083116109bd575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b82821015610aa45760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610a905780601f10610a6557610100808354040283529160200191610a90565b820191906000526020600020905b815481529060010190602001808311610a7357829003601f168201915b5050505050815260200190600101906109f9565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610b765760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610b625780601f10610b3757610100808354040283529160200191610b62565b820191906000526020600020905b815481529060010190602001808311610b4557829003601f168201915b505050505081526020019060010190610acb565b5050505090509450945094509450509193509193565b600190565b60008160035410158015610ba55750600082115b610bc15760405162461bcd60e51b815260040161068d90612f00565b6000828152600460205260409020600b81015460ff1615610be6576002915050610d1c565b80600701544311610bfb576000915050610d1c565b80600801544311610c10576001915050610d1c565b80600a01548160090154111580610c315750610c2a61074a565b8160090154105b15610c40576003915050610d1c565b6002810154610c53576004915050610d1c565b600b810154610100900460ff1615610c6f576007915050610d1c565b610d00816002015460008054906101000a90046001600160a01b03166001600160a01b031663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610cc357600080fd5b505afa158015610cd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfb9190612633565b611c3b565b4210610d10576006915050610d1c565b6005915050610d1c565b505b919050565b6000610d2c82610b91565b90506007816007811115610d3c57fe5b1415610d5a5760405162461bcd60e51b815260040161068d90612d81565b60008281526004602052604090206002546001600160a01b0316331480610e255750610d84611315565b60018054838201546001600160a01b039182169263782d6fe19290911690610dad904390611c60565b6040518363ffffffff1660e01b8152600401610dca929190612970565b60206040518083038186803b158015610de257600080fd5b505afa158015610df6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1a91906127b1565b6001600160601b0316105b610e415760405162461bcd60e51b815260040161068d906131e2565b600b8101805460ff1916600117905560005b6003820154811015610f4d576000546003830180546001600160a01b039092169163591fcdfe919084908110610e8557fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610ead57fe5b9060005260206000200154856005018581548110610ec757fe5b90600052602060002001866006018681548110610ee057fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610f0f959493929190612a72565b600060405180830381600087803b158015610f2957600080fd5b505af1158015610f3d573d6000803e3d6000fd5b505060019092019150610e539050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610f7d9190612b25565b60405180910390a1505050565b6002546001600160a01b031681565b600081815260046020908152604091829020600c0180548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156110315780601f1061100657610100808354040283529160200191611031565b820191906000526020600020905b81548152906001019060200180831161101457829003601f168201915b50505050509050919050565b60408051808201909152601481527321b634b6b0ba32902220a79023b7bb32b93737b960611b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667fc91d7024f1084cf2cbc672fa7c9487148f930f2547c197a0c5a286cc6f4923ea6110b5611c88565b306040516020016110c99493929190612b2e565b60405160208183030381529060405280519060200120905060007f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee888860405160200161111893929190612b52565b60405160208183030381529060405280519060200120905060008282604051602001611145929190612941565b6040516020818303038152906040528051906020012090506000600182898989604051600081526020016040526040516111829493929190612b6a565b6020604051602081039080840390855afa1580156111a4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166111d75760405162461bcd60e51b815260040161068d906132fd565b6111e3818b8b88611c8c565b505050505b505050505050565b6002546001600160a01b0316331461121a5760405162461bcd60e51b815260040161068d90613098565b600280546001600160a01b0319169055565b600a90565b6002546001600160a01b0316331461125b5760405162461bcd60e51b815260040161068d90612c69565b600080546040516001600160a01b0390911691633a66f9019183919061128590879060200161295c565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016112b49493929190612989565b602060405180830381600087803b1580156112ce57600080fd5b505af11580156112e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190612633565b6001546001600160a01b031681565b69152d02c7e14af680000090565b6002546001600160a01b0316331461134d5760405162461bcd60e51b815260040161068d90613146565b6000805460408051630e18b68160e01b815290516001600160a01b0390921692630e18b6819260048084019382900301818387803b15801561138e57600080fd5b505af11580156113a2573d6000803e3d6000fd5b50505050565b6000546001600160a01b031681565b60035481565b60006113c7611315565b600180546001600160a01b03169063782d6fe19033906113e8904390611c60565b6040518363ffffffff1660e01b8152600401611405929190612970565b60206040518083038186803b15801561141d57600080fd5b505afa158015611431573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145591906127b1565b6001600160601b03161161147b5760405162461bcd60e51b815260040161068d90612baf565b8451865114801561148d575083518651145b801561149a575082518651145b6114b65760405162461bcd60e51b815260040161068d90612c0c565b85516114d45760405162461bcd60e51b815260040161068d90612dd2565b6114dc61122c565b865111156114fc5760405162461bcd60e51b815260040161068d90612d3e565b33600090815260056020526040902054801561157957600061151d82610b91565b9050600181600781111561152d57fe5b141561154b5760405162461bcd60e51b815260040161068d90612f44565b600081600781111561155957fe5b14156115775760405162461bcd60e51b815260040161068d90612e19565b505b600061158743610cfb610b8c565b9050600061159782610cfb6105f6565b6003805460019081018083556000818152600460209081526040822092835592820180546001600160a01b0319163317905560028201558c51939450926115e3928401918d01906120cd565b5088516115f990600483019060208c0190612132565b50875161160f90600583019060208b0190612179565b50865161162590600683019060208a01906121d2565b506007810183905560088101829055600060098201819055600a820155600b8101805461ffff19169055855161166490600c830190602089019061222b565b508060000154600560008360010160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000154338c8c8c8c89898e6040516116ed99989796959493929190613375565b60405180910390a1549998505050505050505050565b61074533848484611c8c565b600461171a82610b91565b600781111561172557fe5b146117425760405162461bcd60e51b815260040161068d906132a0565b600081815260046020818152604080842084548251630d48571f60e31b815292519195946117979442946001600160a01b0390931693636a42b8f8938084019390829003018186803b158015610cc357600080fd5b905060005b600383015481101561193f576119378360030182815481106117ba57fe5b6000918252602090912001546004850180546001600160a01b0390921691849081106117e257fe5b90600052602060002001548560050184815481106117fc57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561188a5780601f1061185f5761010080835404028352916020019161188a565b820191906000526020600020905b81548152906001019060200180831161186d57829003601f168201915b505050505086600601858154811061189e57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561192c5780601f106119015761010080835404028352916020019161192c565b820191906000526020600020905b81548152906001019060200180831161190f57829003601f168201915b505050505086611f3f565b60010161179c565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610f7d9085908490613476565b7f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee81565b6119a5612298565b5060009182526004602090815260408084206001600160a01b03939093168452600d9092018152918190208151606081018352905460ff80821615158352610100820416151593820193909352620100009092046001600160601b03169082015290565b6005611a1482610b91565b6007811115611a1f57fe5b14611a3c5760405162461bcd60e51b815260040161068d9061300f565b6000818152600460205260408120600b8101805461ff001916610100179055905b6003820154811015611b92576000546004830180546001600160a01b0390921691630825f38f919084908110611a8f57fe5b9060005260206000200154846003018481548110611aa957fe5b6000918252602090912001546004860180546001600160a01b039092169186908110611ad157fe5b9060005260206000200154866005018681548110611aeb57fe5b90600052602060002001876006018781548110611b0457fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611b33959493929190612a72565b6000604051808303818588803b158015611b4c57600080fd5b505af1158015611b60573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611b89919081019061264b565b50600101611a5d565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f82604051611bc29190612b25565b60405180910390a15050565b6000611c0383836040518060400160405280601081526020016f6469766973696f6e206279207a65726f60801b815250612096565b9392505050565b80600260018201045b81811015610d1a57809150600281828581611c2a57fe5b040181611c3357fe5b049050611c13565b600082820183811015611c035760405162461bcd60e51b815260040161068d9061306d565b600082821115611c825760405162461bcd60e51b815260040161068d90613271565b50900390565b4690565b6001611c9784610b91565b6007811115611ca257fe5b14611cbf5760405162461bcd60e51b815260040161068d9061322c565b60008381526004602090815260408083206001600160a01b0388168452600d8101909252909120805460ff1615611d085760405162461bcd60e51b815260040161068d9061319a565b6000836001600160601b031611611d315760405162461bcd60e51b815260040161068d90612cd4565b8054600154600784015460405163782d6fe160e01b81526000936201000090046001600160601b0316926001600160a01b03169163782d6fe191611d79918c91600401612970565b60206040518083038186803b158015611d9157600080fd5b505afa158015611da5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc991906127b1565b039050806001600160601b0316846001600160601b03161115611dfe5760405162461bcd60e51b815260040161068d90612fbd565b6000611e12856001600160601b0316611c0a565b90508515611e3b57611e318460090154826001600160601b0316611c3b565b6009850155611e58565b611e5284600a0154826001600160601b0316611c3b565b600a8501555b600154604051633969f74f60e11b81526001600160a01b03909116906372d3ee9e90611e8a908b908990600401612aab565b600060405180830381600087803b158015611ea457600080fd5b505af1158015611eb8573d6000803e3d6000fd5b50508454600160ff199091161761ff00191661010089151502176dffffffffffffffffffffffff00001916620100006001600160601b0385160217855550506040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690611f2d908a908a908a9086906129f5565b60405180910390a15050505050505050565b6000546040516001600160a01b039091169063f2b0653790611f6d9088908890889088908890602001612a26565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611f9f9190612b25565b60206040518083038186803b158015611fb757600080fd5b505afa158015611fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fef9190612617565b1561200c5760405162461bcd60e51b815260040161068d906130e9565b600054604051633a66f90160e01b81526001600160a01b0390911690633a66f901906120449088908890889088908890600401612a26565b602060405180830381600087803b15801561205e57600080fd5b505af1158015612072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e89190612633565b600081836120b75760405162461bcd60e51b815260040161068d9190612b9c565b5060008385816120c357fe5b0495945050505050565b828054828255906000526020600020908101928215612122579160200282015b8281111561212257825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906120ed565b5061212e9291506122b8565b5090565b82805482825590600052602060002090810192821561216d579160200282015b8281111561216d578251825591602001919060010190612152565b5061212e9291506122d7565b8280548282559060005260206000209081019282156121c6579160200282015b828111156121c657825180516121b691849160209091019061222b565b5091602001919060010190612199565b5061212e9291506122ec565b82805482825590600052602060002090810192821561221f579160200282015b8281111561221f578251805161220f91849160209091019061222b565b50916020019190600101906121f2565b5061212e929150612309565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061226c57805160ff191683800117855561216d565b8280016001018555821561216d579182018281111561216d578251825591602001919060010190612152565b604080516060810182526000808252602082018190529181019190915290565b5b8082111561212e5780546001600160a01b03191681556001016122b9565b5b8082111561212e57600081556001016122d8565b8082111561212e5760006123008282612326565b506001016122ec565b8082111561212e57600061231d8282612326565b50600101612309565b50805460018160011615610100020316600290046000825580601f1061234c575061236a565b601f01602090049060005260206000209081019061236a91906122d7565b50565b600082601f83011261237d578081fd5b813561239061238b826134ab565b613484565b8181529150602080830190848101818402860182018710156123b157600080fd5b60005b848110156123d95781356123c781613527565b845292820192908201906001016123b4565b505050505092915050565b600082601f8301126123f4578081fd5b813561240261238b826134ab565b818152915060208083019084810160005b848110156123d95761242a888484358a010161249a565b84529282019290820190600101612413565b600082601f83011261244c578081fd5b813561245a61238b826134ab565b81815291506020808301908481018184028601820187101561247b57600080fd5b60005b848110156123d95781358452928201929082019060010161247e565b600082601f8301126124aa578081fd5b81356124b861238b826134cb565b91508082528360208285010111156124cf57600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156124f9578081fd5b8135611c0381613527565b600060208284031215612515578081fd5b8151611c0381613527565b60008060408385031215612532578081fd5b823561253d81613527565b946020939093013593505050565b600080600080600060a08688031215612562578081fd5b853567ffffffffffffffff80821115612579578283fd5b61258589838a0161236d565b9650602088013591508082111561259a578283fd5b6125a689838a0161243c565b955060408801359150808211156125bb578283fd5b6125c789838a016123e4565b945060608801359150808211156125dc578283fd5b6125e889838a016123e4565b935060808801359150808211156125fd578283fd5b5061260a8882890161249a565b9150509295509295909350565b600060208284031215612628578081fd5b8151611c038161353c565b600060208284031215612644578081fd5b5051919050565b60006020828403121561265c578081fd5b815167ffffffffffffffff811115612672578182fd5b8201601f81018413612682578182fd5b805161269061238b826134cb565b8181528560208385010111156126a4578384fd5b6126b58260208301602086016134fb565b95945050505050565b6000602082840312156126cf578081fd5b5035919050565b600080604083850312156126e8578182fd5b8235915060208301356126fa81613527565b809150509250929050565b60008060008060008060c0878903121561271d578384fd5b86359550602087013561272f8161353c565b9450604087013560ff81168114612744578485fd5b9350606087013592506080870135915060a08701356127628161354a565b809150509295509295509295565b600080600060608486031215612784578081fd5b8335925060208401356127968161353c565b915060408401356127a68161354a565b809150509250925092565b6000602082840312156127c2578081fd5b8151611c038161354a565b6000815180845260208085019450808401835b838110156128055781516001600160a01b0316875295820195908201906001016127e0565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b85811015612856578284038952612844848351612892565b9885019893509084019060010161282c565b5091979650505050505050565b6000815180845260208085019450808401835b8381101561280557815187529582019590820190600101612876565b600081518084526128aa8160208601602086016134fb565b601f01601f19169290920160200192915050565b600081546001808216600081146128dc57600181146128fa57612938565b60028304607f16865260ff1983166020870152604086019350612938565b6002830480875261290a866134ef565b60005b8281101561292e5781546020828b010152848201915060208101905061290d565b8801602001955050505b50505092915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038616825284602083015260a06040830152601860a08301527f73657450656e64696e6741646d696e286164647265737329000000000000000060c083015260e060608301526129e460e0830185612892565b905082608083015295945050505050565b6001600160a01b039490941684526020840192909252151560408301526001600160601b0316606082015260800190565b600060018060a01b038716825285602083015260a06040830152612a4d60a0830186612892565b8281036060840152612a5f8186612892565b9150508260808301529695505050505050565b600060018060a01b038716825285602083015260a06040830152612a9960a08301866128be565b8281036060840152612a5f81866128be565b6001600160a01b039290921682526001600160601b0316602082015260400190565b600060808252612ae060808301876127cd565b8281036020840152612af28187612863565b90508281036040840152612b068186612810565b90508281036060840152612b1a8185612810565b979650505050505050565b90815260200190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091521515604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b6020810160088310612b9657fe5b91905290565b600060208252611c036020830184612892565b6020808252603a908201527f476f7665726e6f723a3a70726f706f73653a2070726f706f73657220766f746560408201527f732062656c6f772070726f706f73616c207468726573686f6c64000000000000606082015260800190565b6020808252603f908201527f476f7665726e6f723a3a70726f706f73653a2070726f706f73616c2066756e6360408201527f74696f6e20696e666f726d6174696f6e206172697479206d69736d6174636800606082015260800190565b60208082526045908201527f476f7665726e6f723a3a5f5f717565756553657454696d656c6f636b50656e6460408201527f696e6741646d696e3a2073656e646572206d75737420626520676f7620677561606082015264393234b0b760d91b608082015260a00190565b60208082526044908201527f476f7665726e6f723a3a5f63617374566f74653a206e6f20656c696769626c6560408201527f20766f746573207072696f7220746f2070726f706f73616c20737461727420626060820152636c6f636b60e01b608082015260a00190565b60208082526023908201527f476f7665726e6f723a3a70726f706f73653a20746f6f206d616e7920616374696040820152626f6e7360e81b606082015260800190565b60208082526031908201527f476f7665726e6f723a3a63616e63656c3a2063616e6e6f742063616e63656c20604082015270195e1958dd5d1959081c1c9bdc1bdcd85b607a1b606082015260800190565b60208082526027908201527f476f7665726e6f723a3a70726f706f73653a206d7573742070726f7669646520604082015266616374696f6e7360c81b606082015260800190565b60208082526054908201527f476f7665726e6f723a3a70726f706f73653a206f6e65206c6976652070726f7060408201527f6f73616c207065722070726f706f7365722c20666f756e6420616e20616c726560608201527318591e481c195b991a5b99c81c1c9bdc1bdcd85b60621b608082015260a00190565b60208082526047908201527f476f7665726e6f723a3a5f5f6578656375746553657454696d656c6f636b506560408201527f6e64696e6741646d696e3a2073656e646572206d75737420626520676f7620676060820152663ab0b93234b0b760c91b608082015260a00190565b60208082526024908201527f476f7665726e6f723a3a73746174653a20696e76616c69642070726f706f73616040820152631b081a5960e21b606082015260800190565b60208082526053908201527f476f7665726e6f723a3a70726f706f73653a206f6e65206c6976652070726f7060408201527f6f73616c207065722070726f706f7365722c20666f756e6420616e20616c726560608201527218591e481858dd1a5d99481c1c9bdc1bdcd85b606a1b608082015260a00190565b60208082526032908201527f476f7665726e6f723a3a5f63617374566f74653a20766f746573206578636565604082015271191cc8195b1a59da589b1948185b5bdd5b9d60721b606082015260800190565b602080825260409082018190527f476f7665726e6f723a3a657865637574653a2070726f706f73616c2063616e20908201527f6f6e6c7920626520657865637574656420696620697420697320717565756564606082015260800190565b6020808252601190820152706164646974696f6e206f766572666c6f7760781b604082015260600190565b60208082526031908201527f476f7665726e6f723a3a5f5f61626469636174653a2073656e646572206d75736040820152703a1031329033b7bb1033bab0b93234b0b760791b606082015260800190565b6020808252603f908201527f476f7665726e6f723a3a5f71756575654f725265766572743a2070726f706f7360408201527f616c20616374696f6e20616c7265616479207175657565642061742065746100606082015260800190565b60208082526034908201527f476f7665726e6f723a3a5f5f61636365707441646d696e3a2073656e6465722060408201527336bab9ba1031329033b7bb1033bab0b93234b0b760611b606082015260800190565b60208082526028908201527f476f7665726e6f723a3a5f63617374566f74653a20766f74657220616c726561604082015267191e481d9bdd195960c21b606082015260800190565b6020808252602a908201527f476f7665726e6f723a3a63616e63656c3a2070726f706f7365722061626f7665604082015269081d1a1c995cda1bdb1960b21b606082015260800190565b60208082526025908201527f476f7665726e6f723a3a5f63617374566f74653a20766f74696e6720697320636040820152641b1bdcd95960da1b606082015260800190565b6020808252601590820152747375627472616374696f6e20756e646572666c6f7760581b604082015260600190565b6020808252603f908201527f476f7665726e6f723a3a71756575653a2070726f706f73616c2063616e206f6e60408201527f6c79206265207175657565642069662069742069732073756363656564656400606082015260800190565b6020808252602a908201527f476f7665726e6f723a3a63617374566f746542795369673a20696e76616c6964604082015269207369676e617475726560b01b606082015260800190565b8151151581526020808301511515908201526040918201516001600160601b03169181019190915260600190565b8981526001600160a01b0389166020820152610120604082018190526000906133a08382018b6127cd565b905082810360608401526133b4818a612863565b905082810360808401526133c88189612810565b905082810360a08401526133dc8188612810565b90508560c08401528460e08401528281036101008401526133fd8185612892565b9c9b505050505050505050505050565b60006101408c835260018060a01b038c1660208401528a60408401528960608401528860808401528760a08401528660c084015285151560e08401528415156101008401528061012084015261346581840185612892565b9d9c50505050505050505050505050565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156134a357600080fd5b604052919050565b600067ffffffffffffffff8211156134c1578081fd5b5060209081020190565b600067ffffffffffffffff8211156134e1578081fd5b50601f01601f191660200190565b60009081526020902090565b60005b838110156135165781810151838201526020016134fe565b838111156113a25750506000910152565b6001600160a01b038116811461236a57600080fd5b801515811461236a57600080fd5b6001600160601b038116811461236a57600080fdfea264697066735822122021edf24c872473a6e45f95e9982a644beed07932889999e7a0d0ff3f34acc66764736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1B7 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x760FBC13 GT PUSH2 0xEC JUMPI DUP1 PUSH4 0xDA35C664 GT PUSH2 0x8A JUMPI DUP1 PUSH4 0xDDF0B009 GT PUSH2 0x64 JUMPI DUP1 PUSH4 0xDDF0B009 EQ PUSH2 0x492 JUMPI DUP1 PUSH4 0xDEAAA7CC EQ PUSH2 0x4B2 JUMPI DUP1 PUSH4 0xE23A9A52 EQ PUSH2 0x4C7 JUMPI DUP1 PUSH4 0xFE0D94C1 EQ PUSH2 0x4F4 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0xDA35C664 EQ PUSH2 0x43D JUMPI DUP1 PUSH4 0xDA95691A EQ PUSH2 0x452 JUMPI DUP1 PUSH4 0xDBFA977F EQ PUSH2 0x472 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x94A08D58 GT PUSH2 0xC6 JUMPI DUP1 PUSH4 0x94A08D58 EQ PUSH2 0x3E9 JUMPI DUP1 PUSH4 0xB58131B0 EQ PUSH2 0x3FE JUMPI DUP1 PUSH4 0xB9A61961 EQ PUSH2 0x413 JUMPI DUP1 PUSH4 0xD33219B4 EQ PUSH2 0x428 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x760FBC13 EQ PUSH2 0x39F JUMPI DUP1 PUSH4 0x7BDBE4D0 EQ PUSH2 0x3B4 JUMPI DUP1 PUSH4 0x91500671 EQ PUSH2 0x3C9 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x328DD982 GT PUSH2 0x159 JUMPI DUP1 PUSH4 0x40E58EE5 GT PUSH2 0x133 JUMPI DUP1 PUSH4 0x40E58EE5 EQ PUSH2 0x31D JUMPI DUP1 PUSH4 0x452A9320 EQ PUSH2 0x33D JUMPI DUP1 PUSH4 0x4925EC55 EQ PUSH2 0x35F JUMPI DUP1 PUSH4 0x5D254608 EQ PUSH2 0x37F JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x328DD982 EQ PUSH2 0x2AB JUMPI DUP1 PUSH4 0x3932ABB1 EQ PUSH2 0x2DB JUMPI DUP1 PUSH4 0x3E4F49E6 EQ PUSH2 0x2F0 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x17977C61 GT PUSH2 0x195 JUMPI DUP1 PUSH4 0x17977C61 EQ PUSH2 0x23F JUMPI DUP1 PUSH4 0x20606B70 EQ PUSH2 0x25F JUMPI DUP1 PUSH4 0x21F43E42 EQ PUSH2 0x274 JUMPI DUP1 PUSH4 0x24BC1A64 EQ PUSH2 0x296 JUMPI PUSH2 0x1B7 JUMP JUMPDEST DUP1 PUSH4 0x13CF08B EQ PUSH2 0x1BC JUMPI DUP1 PUSH4 0x2A251A3 EQ PUSH2 0x1FB JUMPI DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x21D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1C8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1DC PUSH2 0x1D7 CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0x507 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP11 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x340D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x207 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x5F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP2 SWAP1 PUSH2 0x2B25 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x229 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x232 PUSH2 0x5FD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP2 SWAP1 PUSH2 0x2B9C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x24B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x25A CALLDATASIZE PUSH1 0x4 PUSH2 0x24E8 JUMP JUMPDEST PUSH2 0x62D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x26B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x63F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x280 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x28F CALLDATASIZE PUSH1 0x4 PUSH2 0x2520 JUMP JUMPDEST PUSH2 0x663 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2A2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x74A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2B7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2CB PUSH2 0x2C6 CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0x8FD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2ACD JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2E7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0xB8C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2FC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x310 PUSH2 0x30B CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0xB91 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP2 SWAP1 PUSH2 0x2B88 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x329 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x338 CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0xD21 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x349 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x352 PUSH2 0xF8A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP2 SWAP1 PUSH2 0x295C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x36B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x232 PUSH2 0x37A CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0xF99 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x38B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x39A CALLDATASIZE PUSH1 0x4 PUSH2 0x2705 JUMP JUMPDEST PUSH2 0x103D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x11F0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3C0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x122C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3D5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x3E4 CALLDATASIZE PUSH1 0x4 PUSH2 0x2520 JUMP JUMPDEST PUSH2 0x1231 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3F5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x352 PUSH2 0x1306 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x40A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x1315 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x41F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x1323 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x434 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x352 PUSH2 0x13A8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x449 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x13B7 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x45E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x46D CALLDATASIZE PUSH1 0x4 PUSH2 0x254B JUMP JUMPDEST PUSH2 0x13BD JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x47E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x48D CALLDATASIZE PUSH1 0x4 PUSH2 0x2770 JUMP JUMPDEST PUSH2 0x1703 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x49E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x294 PUSH2 0x4AD CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0x170F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x210 PUSH2 0x1979 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4D3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4E7 PUSH2 0x4E2 CALLDATASIZE PUSH1 0x4 PUSH2 0x26D6 JUMP JUMPDEST PUSH2 0x199D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1F2 SWAP2 SWAP1 PUSH2 0x3347 JUMP JUMPDEST PUSH2 0x294 PUSH2 0x502 CALLDATASIZE PUSH1 0x4 PUSH2 0x26BE JUMP JUMPDEST PUSH2 0x1A09 JUMP JUMPDEST PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP1 DUP4 ADD SLOAD PUSH1 0x2 DUP1 DUP6 ADD SLOAD PUSH1 0x7 DUP7 ADD SLOAD PUSH1 0x8 DUP8 ADD SLOAD PUSH1 0x9 DUP9 ADD SLOAD PUSH1 0xA DUP10 ADD SLOAD PUSH1 0xB DUP11 ADD SLOAD PUSH1 0xC DUP12 ADD DUP1 SLOAD DUP15 MLOAD PUSH2 0x100 SWAP12 DUP3 AND ISZERO DUP13 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP2 AND SWAP9 SWAP1 SWAP9 DIV PUSH1 0x1F DUP2 ADD DUP15 SWAP1 DIV DUP15 MUL DUP10 ADD DUP15 ADD SWAP1 SWAP15 MSTORE DUP14 DUP9 MSTORE SWAP10 SWAP13 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP9 AND SWAP12 SWAP6 SWAP11 SWAP5 SWAP10 SWAP4 SWAP9 SWAP3 SWAP8 SWAP2 SWAP7 PUSH1 0xFF DUP1 DUP4 AND SWAP8 SWAP5 SWAP1 SWAP3 DIV SWAP1 SWAP2 AND SWAP5 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x5EC JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x5C1 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x5EC JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x5CF JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP DUP11 JUMP JUMPDEST PUSH2 0x4380 JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x14 DUP2 MSTORE PUSH1 0x20 ADD PUSH20 0x21B634B6B0BA32902220A79023B7BB32B93737B9 PUSH1 0x61 SHL DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH32 0x8CAD95687BA82C2CE50E74F7B754645E5117C3A5BEC8151C0726D5857980A866 DUP2 JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x696 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2E93 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 PUSH4 0x825F38F SWAP2 DUP4 SWAP2 SWAP1 PUSH2 0x6C0 SWAP1 DUP8 SWAP1 PUSH1 0x20 ADD PUSH2 0x295C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP6 PUSH1 0x40 MLOAD DUP6 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x6EF SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2989 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x709 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x71D JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x745 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x264B JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH4 0x57406CEF PUSH1 0xE1 SHL DUP2 MSTORE SWAP1 MLOAD PUSH1 0x0 SWAP3 DUP4 SWAP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 PUSH4 0x70A08231 SWAP2 DUP4 SWAP2 PUSH4 0xAE80D9DE SWAP2 PUSH1 0x4 DUP1 DUP3 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP1 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x79C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x7B0 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x7D4 SWAP2 SWAP1 PUSH2 0x2504 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x7F0 SWAP2 SWAP1 PUSH2 0x295C JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x808 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x81C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x840 SWAP2 SWAP1 PUSH2 0x2633 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xC4E41B22 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x893 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x8A7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x8CB SWAP2 SWAP1 PUSH2 0x2633 JUMP JUMPDEST SUB SWAP1 POP DUP1 ISZERO PUSH2 0x8F0 JUMPI PUSH2 0x8E7 PUSH2 0x8E2 DUP3 PUSH1 0x19 PUSH2 0x1BCE JUMP JUMPDEST PUSH2 0x1C0A JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x5FA JUMP JUMPDEST PUSH5 0x9341498E01 SWAP3 POP POP POP SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH1 0x4 PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 POP DUP1 PUSH1 0x3 ADD DUP2 PUSH1 0x4 ADD DUP3 PUSH1 0x5 ADD DUP4 PUSH1 0x6 ADD DUP4 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x97F JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x961 JUMPI JUMPDEST POP POP POP POP POP SWAP4 POP DUP3 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x9D1 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 DUP1 DUP4 GT PUSH2 0x9BD JUMPI JUMPDEST POP POP POP POP POP SWAP3 POP DUP2 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SWAP1 JUMPDEST DUP3 DUP3 LT ISZERO PUSH2 0xAA4 JUMPI PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 SWAP1 DUP2 SWAP1 KECCAK256 DUP4 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP8 AND ISZERO MUL ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV SWAP3 DUP4 ADD DUP6 SWAP1 DIV DUP6 MUL DUP2 ADD DUP6 ADD SWAP1 SWAP2 MSTORE DUP2 DUP2 MSTORE SWAP3 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xA90 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xA65 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xA90 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xA73 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x9F9 JUMP JUMPDEST POP POP POP POP SWAP2 POP DUP1 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 SWAP1 JUMPDEST DUP3 DUP3 LT ISZERO PUSH2 0xB76 JUMPI PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 SWAP1 DUP2 SWAP1 KECCAK256 DUP4 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP8 AND ISZERO MUL ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV SWAP3 DUP4 ADD DUP6 SWAP1 DIV DUP6 MUL DUP2 ADD DUP6 ADD SWAP1 SWAP2 MSTORE DUP2 DUP2 MSTORE SWAP3 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xB62 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xB37 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xB62 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xB45 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0xACB JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP5 POP SWAP5 POP SWAP5 POP SWAP5 POP POP SWAP2 SWAP4 POP SWAP2 SWAP4 JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x3 SLOAD LT ISZERO DUP1 ISZERO PUSH2 0xBA5 JUMPI POP PUSH1 0x0 DUP3 GT JUMPDEST PUSH2 0xBC1 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2F00 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0xB DUP2 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xBE6 JUMPI PUSH1 0x2 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST DUP1 PUSH1 0x7 ADD SLOAD NUMBER GT PUSH2 0xBFB JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST DUP1 PUSH1 0x8 ADD SLOAD NUMBER GT PUSH2 0xC10 JUMPI PUSH1 0x1 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST DUP1 PUSH1 0xA ADD SLOAD DUP2 PUSH1 0x9 ADD SLOAD GT ISZERO DUP1 PUSH2 0xC31 JUMPI POP PUSH2 0xC2A PUSH2 0x74A JUMP JUMPDEST DUP2 PUSH1 0x9 ADD SLOAD LT JUMPDEST ISZERO PUSH2 0xC40 JUMPI PUSH1 0x3 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST PUSH1 0x2 DUP2 ADD SLOAD PUSH2 0xC53 JUMPI PUSH1 0x4 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST PUSH1 0xB DUP2 ADD SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0xC6F JUMPI PUSH1 0x7 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST PUSH2 0xD00 DUP2 PUSH1 0x2 ADD SLOAD PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xC1A287E2 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xCC3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xCD7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xCFB SWAP2 SWAP1 PUSH2 0x2633 JUMP JUMPDEST PUSH2 0x1C3B JUMP JUMPDEST TIMESTAMP LT PUSH2 0xD10 JUMPI PUSH1 0x6 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST PUSH1 0x5 SWAP2 POP POP PUSH2 0xD1C JUMP JUMPDEST POP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xD2C DUP3 PUSH2 0xB91 JUMP JUMPDEST SWAP1 POP PUSH1 0x7 DUP2 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0xD3C JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0xD5A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2D81 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ DUP1 PUSH2 0xE25 JUMPI POP PUSH2 0xD84 PUSH2 0x1315 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD DUP4 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND SWAP3 PUSH4 0x782D6FE1 SWAP3 SWAP1 SWAP2 AND SWAP1 PUSH2 0xDAD SWAP1 NUMBER SWAP1 PUSH2 0x1C60 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xDCA SWAP3 SWAP2 SWAP1 PUSH2 0x2970 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xDE2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xDF6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xE1A SWAP2 SWAP1 PUSH2 0x27B1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND LT JUMPDEST PUSH2 0xE41 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x31E2 JUMP JUMPDEST PUSH1 0xB DUP2 ADD DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE PUSH1 0x0 JUMPDEST PUSH1 0x3 DUP3 ADD SLOAD DUP2 LT ISZERO PUSH2 0xF4D JUMPI PUSH1 0x0 SLOAD PUSH1 0x3 DUP4 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP2 PUSH4 0x591FCDFE SWAP2 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0xE85 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x4 DUP6 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP2 DUP6 SWAP1 DUP2 LT PUSH2 0xEAD JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD DUP6 PUSH1 0x5 ADD DUP6 DUP2 SLOAD DUP2 LT PUSH2 0xEC7 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD DUP7 PUSH1 0x6 ADD DUP7 DUP2 SLOAD DUP2 LT PUSH2 0xEE0 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD DUP8 PUSH1 0x2 ADD SLOAD PUSH1 0x40 MLOAD DUP7 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xF0F SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2A72 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xF29 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xF3D JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x1 SWAP1 SWAP3 ADD SWAP2 POP PUSH2 0xE53 SWAP1 POP JUMP JUMPDEST POP PUSH32 0x789CF55BE980739DAD1D0699B93B58E806B51C9D96619BFA8FE0A28ABAA7B30C DUP4 PUSH1 0x40 MLOAD PUSH2 0xF7D SWAP2 SWAP1 PUSH2 0x2B25 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 PUSH1 0xC ADD DUP1 SLOAD DUP4 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP7 AND ISZERO MUL ADD SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 DIV SWAP2 DUP3 ADD DUP5 SWAP1 DIV DUP5 MUL DUP2 ADD DUP5 ADD SWAP1 SWAP5 MSTORE DUP1 DUP5 MSTORE PUSH1 0x60 SWAP4 SWAP3 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x1031 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1006 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1031 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1014 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x14 DUP2 MSTORE PUSH20 0x21B634B6B0BA32902220A79023B7BB32B93737B9 PUSH1 0x61 SHL PUSH1 0x20 SWAP1 SWAP2 ADD MSTORE PUSH1 0x0 PUSH32 0x8CAD95687BA82C2CE50E74F7B754645E5117C3A5BEC8151C0726D5857980A866 PUSH32 0xC91D7024F1084CF2CBC672FA7C9487148F930F2547C197A0C5A286CC6F4923EA PUSH2 0x10B5 PUSH2 0x1C88 JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x10C9 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2B2E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH32 0x8E25870C07E0B0B3884C78DA52790939A455C275406C44AE8B434B692FB916EE DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1118 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2B52 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1145 SWAP3 SWAP2 SWAP1 PUSH2 0x2941 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP10 DUP10 DUP10 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x1182 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2B6A JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x11A4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x11D7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x32FD JUMP JUMPDEST PUSH2 0x11E3 DUP2 DUP12 DUP12 DUP9 PUSH2 0x1C8C JUMP JUMPDEST POP POP POP POP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x121A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x3098 JUMP JUMPDEST PUSH1 0x2 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0xA SWAP1 JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x125B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2C69 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 PUSH4 0x3A66F901 SWAP2 DUP4 SWAP2 SWAP1 PUSH2 0x1285 SWAP1 DUP8 SWAP1 PUSH1 0x20 ADD PUSH2 0x295C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP6 PUSH1 0x40 MLOAD DUP6 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x12B4 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2989 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x12CE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x12E2 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x745 SWAP2 SWAP1 PUSH2 0x2633 JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH10 0x152D02C7E14AF6800000 SWAP1 JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x134D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x3146 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH4 0xE18B681 PUSH1 0xE0 SHL DUP2 MSTORE SWAP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP3 PUSH4 0xE18B681 SWAP3 PUSH1 0x4 DUP1 DUP5 ADD SWAP4 DUP3 SWAP1 SUB ADD DUP2 DUP4 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x138E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x13A2 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x13C7 PUSH2 0x1315 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x782D6FE1 SWAP1 CALLER SWAP1 PUSH2 0x13E8 SWAP1 NUMBER SWAP1 PUSH2 0x1C60 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1405 SWAP3 SWAP2 SWAP1 PUSH2 0x2970 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x141D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1431 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1455 SWAP2 SWAP1 PUSH2 0x27B1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND GT PUSH2 0x147B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2BAF JUMP JUMPDEST DUP5 MLOAD DUP7 MLOAD EQ DUP1 ISZERO PUSH2 0x148D JUMPI POP DUP4 MLOAD DUP7 MLOAD EQ JUMPDEST DUP1 ISZERO PUSH2 0x149A JUMPI POP DUP3 MLOAD DUP7 MLOAD EQ JUMPDEST PUSH2 0x14B6 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2C0C JUMP JUMPDEST DUP6 MLOAD PUSH2 0x14D4 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2DD2 JUMP JUMPDEST PUSH2 0x14DC PUSH2 0x122C JUMP JUMPDEST DUP7 MLOAD GT ISZERO PUSH2 0x14FC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2D3E JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x1579 JUMPI PUSH1 0x0 PUSH2 0x151D DUP3 PUSH2 0xB91 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 DUP2 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x152D JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x154B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2F44 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x1559 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1577 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2E19 JUMP JUMPDEST POP JUMPDEST PUSH1 0x0 PUSH2 0x1587 NUMBER PUSH2 0xCFB PUSH2 0xB8C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1597 DUP3 PUSH2 0xCFB PUSH2 0x5F6 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x1 SWAP1 DUP2 ADD DUP1 DUP4 SSTORE PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP3 KECCAK256 SWAP3 DUP4 SSTORE SWAP3 DUP3 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND CALLER OR SWAP1 SSTORE PUSH1 0x2 DUP3 ADD SSTORE DUP13 MLOAD SWAP4 SWAP5 POP SWAP3 PUSH2 0x15E3 SWAP3 DUP5 ADD SWAP2 DUP14 ADD SWAP1 PUSH2 0x20CD JUMP JUMPDEST POP DUP9 MLOAD PUSH2 0x15F9 SWAP1 PUSH1 0x4 DUP4 ADD SWAP1 PUSH1 0x20 DUP13 ADD SWAP1 PUSH2 0x2132 JUMP JUMPDEST POP DUP8 MLOAD PUSH2 0x160F SWAP1 PUSH1 0x5 DUP4 ADD SWAP1 PUSH1 0x20 DUP12 ADD SWAP1 PUSH2 0x2179 JUMP JUMPDEST POP DUP7 MLOAD PUSH2 0x1625 SWAP1 PUSH1 0x6 DUP4 ADD SWAP1 PUSH1 0x20 DUP11 ADD SWAP1 PUSH2 0x21D2 JUMP JUMPDEST POP PUSH1 0x7 DUP2 ADD DUP4 SWAP1 SSTORE PUSH1 0x8 DUP2 ADD DUP3 SWAP1 SSTORE PUSH1 0x0 PUSH1 0x9 DUP3 ADD DUP2 SWAP1 SSTORE PUSH1 0xA DUP3 ADD SSTORE PUSH1 0xB DUP2 ADD DUP1 SLOAD PUSH2 0xFFFF NOT AND SWAP1 SSTORE DUP6 MLOAD PUSH2 0x1664 SWAP1 PUSH1 0xC DUP4 ADD SWAP1 PUSH1 0x20 DUP10 ADD SWAP1 PUSH2 0x222B JUMP JUMPDEST POP DUP1 PUSH1 0x0 ADD SLOAD PUSH1 0x5 PUSH1 0x0 DUP4 PUSH1 0x1 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 DUP2 SWAP1 SSTORE POP PUSH32 0x7D84A6263AE0D98D3329BD7B46BB4E8D6F98CD35A7ADB45C274C8B7FD5EBD5E0 DUP2 PUSH1 0x0 ADD SLOAD CALLER DUP13 DUP13 DUP13 DUP13 DUP10 DUP10 DUP15 PUSH1 0x40 MLOAD PUSH2 0x16ED SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3375 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 SLOAD SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x745 CALLER DUP5 DUP5 DUP5 PUSH2 0x1C8C JUMP JUMPDEST PUSH1 0x4 PUSH2 0x171A DUP3 PUSH2 0xB91 JUMP JUMPDEST PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x1725 JUMPI INVALID JUMPDEST EQ PUSH2 0x1742 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x32A0 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 DUP5 SLOAD DUP3 MLOAD PUSH4 0xD48571F PUSH1 0xE3 SHL DUP2 MSTORE SWAP3 MLOAD SWAP2 SWAP6 SWAP5 PUSH2 0x1797 SWAP5 TIMESTAMP SWAP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP4 AND SWAP4 PUSH4 0x6A42B8F8 SWAP4 DUP1 DUP5 ADD SWAP4 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xCC3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0x3 DUP4 ADD SLOAD DUP2 LT ISZERO PUSH2 0x193F JUMPI PUSH2 0x1937 DUP4 PUSH1 0x3 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x17BA JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x4 DUP6 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x17E2 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD DUP6 PUSH1 0x5 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x17FC JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP2 DUP3 SWAP1 KECCAK256 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP8 AND ISZERO MUL ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV SWAP3 DUP4 ADD DUP6 SWAP1 DIV DUP6 MUL DUP2 ADD DUP6 ADD SWAP1 SWAP2 MSTORE DUP2 DUP2 MSTORE SWAP3 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x188A JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x185F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x188A JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x186D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP7 PUSH1 0x6 ADD DUP6 DUP2 SLOAD DUP2 LT PUSH2 0x189E JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP2 DUP3 SWAP1 KECCAK256 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP8 AND ISZERO MUL ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV SWAP3 DUP4 ADD DUP6 SWAP1 DIV DUP6 MUL DUP2 ADD DUP6 ADD SWAP1 SWAP2 MSTORE DUP2 DUP2 MSTORE SWAP3 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x192C JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1901 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x192C JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x190F JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP7 PUSH2 0x1F3F JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x179C JUMP JUMPDEST POP PUSH1 0x2 DUP3 ADD DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9A2E42FD6722813D69113E7D0079D3D940171428DF7373DF9C7F7617CFDA2892 SWAP1 PUSH2 0xF7D SWAP1 DUP6 SWAP1 DUP5 SWAP1 PUSH2 0x3476 JUMP JUMPDEST PUSH32 0x8E25870C07E0B0B3884C78DA52790939A455C275406C44AE8B434B692FB916EE DUP2 JUMP JUMPDEST PUSH2 0x19A5 PUSH2 0x2298 JUMP JUMPDEST POP PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP4 SWAP1 SWAP4 AND DUP5 MSTORE PUSH1 0xD SWAP1 SWAP3 ADD DUP2 MSTORE SWAP2 DUP2 SWAP1 KECCAK256 DUP2 MLOAD PUSH1 0x60 DUP2 ADD DUP4 MSTORE SWAP1 SLOAD PUSH1 0xFF DUP1 DUP3 AND ISZERO ISZERO DUP4 MSTORE PUSH2 0x100 DUP3 DIV AND ISZERO ISZERO SWAP4 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH3 0x10000 SWAP1 SWAP3 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP1 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x5 PUSH2 0x1A14 DUP3 PUSH2 0xB91 JUMP JUMPDEST PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x1A1F JUMPI INVALID JUMPDEST EQ PUSH2 0x1A3C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x300F JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0xB DUP2 ADD DUP1 SLOAD PUSH2 0xFF00 NOT AND PUSH2 0x100 OR SWAP1 SSTORE SWAP1 JUMPDEST PUSH1 0x3 DUP3 ADD SLOAD DUP2 LT ISZERO PUSH2 0x1B92 JUMPI PUSH1 0x0 SLOAD PUSH1 0x4 DUP4 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP2 PUSH4 0x825F38F SWAP2 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0x1A8F JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD DUP5 PUSH1 0x3 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x1AA9 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x4 DUP7 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND SWAP2 DUP7 SWAP1 DUP2 LT PUSH2 0x1AD1 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD DUP7 PUSH1 0x5 ADD DUP7 DUP2 SLOAD DUP2 LT PUSH2 0x1AEB JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD DUP8 PUSH1 0x6 ADD DUP8 DUP2 SLOAD DUP2 LT PUSH2 0x1B04 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD DUP9 PUSH1 0x2 ADD SLOAD PUSH1 0x40 MLOAD DUP8 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1B33 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x2A72 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1B4C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x1B60 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x1B89 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x264B JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x1A5D JUMP JUMPDEST POP PUSH32 0x712AE1383F79AC853F8D882153778E0260EF8F03B504E2866E0593E04D2B291F DUP3 PUSH1 0x40 MLOAD PUSH2 0x1BC2 SWAP2 SWAP1 PUSH2 0x2B25 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C03 DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x10 DUP2 MSTORE PUSH1 0x20 ADD PUSH16 0x6469766973696F6E206279207A65726F PUSH1 0x80 SHL DUP2 MSTORE POP PUSH2 0x2096 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP1 PUSH1 0x2 PUSH1 0x1 DUP3 ADD DIV JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xD1A JUMPI DUP1 SWAP2 POP PUSH1 0x2 DUP2 DUP3 DUP6 DUP2 PUSH2 0x1C2A JUMPI INVALID JUMPDEST DIV ADD DUP2 PUSH2 0x1C33 JUMPI INVALID JUMPDEST DIV SWAP1 POP PUSH2 0x1C13 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x1C03 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x306D JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0x1C82 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x3271 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x1C97 DUP5 PUSH2 0xB91 JUMP JUMPDEST PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x1CA2 JUMPI INVALID JUMPDEST EQ PUSH2 0x1CBF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x322C JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND DUP5 MSTORE PUSH1 0xD DUP2 ADD SWAP1 SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x1D08 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x319A JUMP JUMPDEST PUSH1 0x0 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND GT PUSH2 0x1D31 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2CD4 JUMP JUMPDEST DUP1 SLOAD PUSH1 0x1 SLOAD PUSH1 0x7 DUP5 ADD SLOAD PUSH1 0x40 MLOAD PUSH4 0x782D6FE1 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 SWAP4 PUSH3 0x10000 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP2 PUSH4 0x782D6FE1 SWAP2 PUSH2 0x1D79 SWAP2 DUP13 SWAP2 PUSH1 0x4 ADD PUSH2 0x2970 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1D91 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1DA5 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1DC9 SWAP2 SWAP1 PUSH2 0x27B1 JUMP JUMPDEST SUB SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND GT ISZERO PUSH2 0x1DFE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x2FBD JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1E12 DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH2 0x1C0A JUMP JUMPDEST SWAP1 POP DUP6 ISZERO PUSH2 0x1E3B JUMPI PUSH2 0x1E31 DUP5 PUSH1 0x9 ADD SLOAD DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH2 0x1C3B JUMP JUMPDEST PUSH1 0x9 DUP6 ADD SSTORE PUSH2 0x1E58 JUMP JUMPDEST PUSH2 0x1E52 DUP5 PUSH1 0xA ADD SLOAD DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH2 0x1C3B JUMP JUMPDEST PUSH1 0xA DUP6 ADD SSTORE JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 MLOAD PUSH4 0x3969F74F PUSH1 0xE1 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 PUSH4 0x72D3EE9E SWAP1 PUSH2 0x1E8A SWAP1 DUP12 SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0x2AAB JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1EA4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x1EB8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP DUP5 SLOAD PUSH1 0x1 PUSH1 0xFF NOT SWAP1 SWAP2 AND OR PUSH2 0xFF00 NOT AND PUSH2 0x100 DUP10 ISZERO ISZERO MUL OR PUSH14 0xFFFFFFFFFFFFFFFFFFFFFFFF0000 NOT AND PUSH3 0x10000 PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP6 AND MUL OR DUP6 SSTORE POP POP PUSH1 0x40 MLOAD PUSH32 0x877856338E13F63D0C36822FF0EF736B80934CD90574A3A5BC9262C39D217C46 SWAP1 PUSH2 0x1F2D SWAP1 DUP11 SWAP1 DUP11 SWAP1 DUP11 SWAP1 DUP7 SWAP1 PUSH2 0x29F5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 PUSH4 0xF2B06537 SWAP1 PUSH2 0x1F6D SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x20 ADD PUSH2 0x2A26 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1F9F SWAP2 SWAP1 PUSH2 0x2B25 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1FB7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1FCB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1FEF SWAP2 SWAP1 PUSH2 0x2617 JUMP JUMPDEST ISZERO PUSH2 0x200C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP1 PUSH2 0x30E9 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD PUSH4 0x3A66F901 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 PUSH4 0x3A66F901 SWAP1 PUSH2 0x2044 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x2A26 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x205E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2072 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x11E8 SWAP2 SWAP1 PUSH2 0x2633 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 PUSH2 0x20B7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x68D SWAP2 SWAP1 PUSH2 0x2B9C JUMP JUMPDEST POP PUSH1 0x0 DUP4 DUP6 DUP2 PUSH2 0x20C3 JUMPI INVALID JUMPDEST DIV SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH2 0x2122 JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x2122 JUMPI DUP3 MLOAD DUP3 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND OR DUP3 SSTORE PUSH1 0x20 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x20ED JUMP JUMPDEST POP PUSH2 0x212E SWAP3 SWAP2 POP PUSH2 0x22B8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH2 0x216D JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x216D JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x2152 JUMP JUMPDEST POP PUSH2 0x212E SWAP3 SWAP2 POP PUSH2 0x22D7 JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH2 0x21C6 JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x21C6 JUMPI DUP3 MLOAD DUP1 MLOAD PUSH2 0x21B6 SWAP2 DUP5 SWAP2 PUSH1 0x20 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x222B JUMP JUMPDEST POP SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x2199 JUMP JUMPDEST POP PUSH2 0x212E SWAP3 SWAP2 POP PUSH2 0x22EC JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH2 0x221F JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x221F JUMPI DUP3 MLOAD DUP1 MLOAD PUSH2 0x220F SWAP2 DUP5 SWAP2 PUSH1 0x20 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x222B JUMP JUMPDEST POP SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x21F2 JUMP JUMPDEST POP PUSH2 0x212E SWAP3 SWAP2 POP PUSH2 0x2309 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x226C JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x216D JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x216D JUMPI SWAP2 DUP3 ADD DUP3 DUP2 GT ISZERO PUSH2 0x216D JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x2152 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x60 DUP2 ADD DUP3 MSTORE PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x212E JUMPI DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x22B9 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x212E JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x22D8 JUMP JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x212E JUMPI PUSH1 0x0 PUSH2 0x2300 DUP3 DUP3 PUSH2 0x2326 JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x22EC JUMP JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x212E JUMPI PUSH1 0x0 PUSH2 0x231D DUP3 DUP3 PUSH2 0x2326 JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x2309 JUMP JUMPDEST POP DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV PUSH1 0x0 DUP3 SSTORE DUP1 PUSH1 0x1F LT PUSH2 0x234C JUMPI POP PUSH2 0x236A JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP1 PUSH2 0x236A SWAP2 SWAP1 PUSH2 0x22D7 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x237D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x2390 PUSH2 0x238B DUP3 PUSH2 0x34AB JUMP JUMPDEST PUSH2 0x3484 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x23B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x23D9 JUMPI DUP2 CALLDATALOAD PUSH2 0x23C7 DUP2 PUSH2 0x3527 JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x23B4 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x23F4 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x2402 PUSH2 0x238B DUP3 PUSH2 0x34AB JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x23D9 JUMPI PUSH2 0x242A DUP9 DUP5 DUP5 CALLDATALOAD DUP11 ADD ADD PUSH2 0x249A JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x2413 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x244C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x245A PUSH2 0x238B DUP3 PUSH2 0x34AB JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x247B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x23D9 JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x247E JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x24AA JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x24B8 PUSH2 0x238B DUP3 PUSH2 0x34CB JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x24CF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x24F9 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1C03 DUP2 PUSH2 0x3527 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2515 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1C03 DUP2 PUSH2 0x3527 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x2532 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x253D DUP2 PUSH2 0x3527 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x2562 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x2579 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x2585 DUP10 DUP4 DUP11 ADD PUSH2 0x236D JUMP JUMPDEST SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x259A JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x25A6 DUP10 DUP4 DUP11 ADD PUSH2 0x243C JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x25BB JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x25C7 DUP10 DUP4 DUP11 ADD PUSH2 0x23E4 JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x25DC JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x25E8 DUP10 DUP4 DUP11 ADD PUSH2 0x23E4 JUMP JUMPDEST SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x25FD JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x260A DUP9 DUP3 DUP10 ADD PUSH2 0x249A JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 SWAP1 SWAP4 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2628 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1C03 DUP2 PUSH2 0x353C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2644 JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x265C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2672 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 ADD PUSH1 0x1F DUP2 ADD DUP5 SGT PUSH2 0x2682 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x2690 PUSH2 0x238B DUP3 PUSH2 0x34CB JUMP JUMPDEST DUP2 DUP2 MSTORE DUP6 PUSH1 0x20 DUP4 DUP6 ADD ADD GT ISZERO PUSH2 0x26A4 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x26B5 DUP3 PUSH1 0x20 DUP4 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x34FB JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x26CF JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x26E8 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x26FA DUP2 PUSH2 0x3527 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x271D JUMPI DUP4 DUP5 REVERT JUMPDEST DUP7 CALLDATALOAD SWAP6 POP PUSH1 0x20 DUP8 ADD CALLDATALOAD PUSH2 0x272F DUP2 PUSH2 0x353C JUMP JUMPDEST SWAP5 POP PUSH1 0x40 DUP8 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x2744 JUMPI DUP5 DUP6 REVERT JUMPDEST SWAP4 POP PUSH1 0x60 DUP8 ADD CALLDATALOAD SWAP3 POP PUSH1 0x80 DUP8 ADD CALLDATALOAD SWAP2 POP PUSH1 0xA0 DUP8 ADD CALLDATALOAD PUSH2 0x2762 DUP2 PUSH2 0x354A JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x2784 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x2796 DUP2 PUSH2 0x353C JUMP JUMPDEST SWAP2 POP PUSH1 0x40 DUP5 ADD CALLDATALOAD PUSH2 0x27A6 DUP2 PUSH2 0x354A JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x27C2 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1C03 DUP2 PUSH2 0x354A JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x2805 JUMPI DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x27E0 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD DUP1 DUP2 SWAP7 POP DUP3 DUP5 MUL DUP2 ADD SWAP2 POP DUP3 DUP7 ADD DUP6 JUMPDEST DUP6 DUP2 LT ISZERO PUSH2 0x2856 JUMPI DUP3 DUP5 SUB DUP10 MSTORE PUSH2 0x2844 DUP5 DUP4 MLOAD PUSH2 0x2892 JUMP JUMPDEST SWAP9 DUP6 ADD SWAP9 SWAP4 POP SWAP1 DUP5 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x282C JUMP JUMPDEST POP SWAP2 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x2805 JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x2876 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0x28AA DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x34FB JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 AND PUSH1 0x0 DUP2 EQ PUSH2 0x28DC JUMPI PUSH1 0x1 DUP2 EQ PUSH2 0x28FA JUMPI PUSH2 0x2938 JUMP JUMPDEST PUSH1 0x2 DUP4 DIV PUSH1 0x7F AND DUP7 MSTORE PUSH1 0xFF NOT DUP4 AND PUSH1 0x20 DUP8 ADD MSTORE PUSH1 0x40 DUP7 ADD SWAP4 POP PUSH2 0x2938 JUMP JUMPDEST PUSH1 0x2 DUP4 DIV DUP1 DUP8 MSTORE PUSH2 0x290A DUP7 PUSH2 0x34EF JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x292E JUMPI DUP2 SLOAD PUSH1 0x20 DUP3 DUP12 ADD ADD MSTORE DUP5 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x290D JUMP JUMPDEST DUP9 ADD PUSH1 0x20 ADD SWAP6 POP POP POP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP7 AND DUP3 MSTORE DUP5 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0xA0 PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x18 PUSH1 0xA0 DUP4 ADD MSTORE PUSH32 0x73657450656E64696E6741646D696E2861646472657373290000000000000000 PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xE0 PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x29E4 PUSH1 0xE0 DUP4 ADD DUP6 PUSH2 0x2892 JUMP JUMPDEST SWAP1 POP DUP3 PUSH1 0x80 DUP4 ADD MSTORE SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 SWAP1 SWAP5 AND DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE ISZERO ISZERO PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP8 AND DUP3 MSTORE DUP6 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0xA0 PUSH1 0x40 DUP4 ADD MSTORE PUSH2 0x2A4D PUSH1 0xA0 DUP4 ADD DUP7 PUSH2 0x2892 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x2A5F DUP2 DUP7 PUSH2 0x2892 JUMP JUMPDEST SWAP2 POP POP DUP3 PUSH1 0x80 DUP4 ADD MSTORE SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP8 AND DUP3 MSTORE DUP6 PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0xA0 PUSH1 0x40 DUP4 ADD MSTORE PUSH2 0x2A99 PUSH1 0xA0 DUP4 ADD DUP7 PUSH2 0x28BE JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x2A5F DUP2 DUP7 PUSH2 0x28BE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 MSTORE PUSH2 0x2AE0 PUSH1 0x80 DUP4 ADD DUP8 PUSH2 0x27CD JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x2AF2 DUP2 DUP8 PUSH2 0x2863 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x2B06 DUP2 DUP7 PUSH2 0x2810 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x2B1A DUP2 DUP6 PUSH2 0x2810 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE ISZERO ISZERO PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP2 ADD PUSH1 0x8 DUP4 LT PUSH2 0x2B96 JUMPI INVALID JUMPDEST SWAP2 SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1C03 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x2892 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3A SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A2070726F706F73657220766F7465 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x732062656C6F772070726F706F73616C207468726573686F6C64000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3F SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A2070726F706F73616C2066756E63 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x74696F6E20696E666F726D6174696F6E206172697479206D69736D6174636800 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x45 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F5F717565756553657454696D656C6F636B50656E64 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x696E6741646D696E3A2073656E646572206D75737420626520676F7620677561 PUSH1 0x60 DUP3 ADD MSTORE PUSH5 0x393234B0B7 PUSH1 0xD9 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x44 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F63617374566F74653A206E6F20656C696769626C65 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x20766F746573207072696F7220746F2070726F706F73616C2073746172742062 PUSH1 0x60 DUP3 ADD MSTORE PUSH4 0x6C6F636B PUSH1 0xE0 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x23 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A20746F6F206D616E792061637469 PUSH1 0x40 DUP3 ADD MSTORE PUSH3 0x6F6E73 PUSH1 0xE8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x31 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A63616E63656C3A2063616E6E6F742063616E63656C20 PUSH1 0x40 DUP3 ADD MSTORE PUSH17 0x195E1958DD5D1959081C1C9BDC1BDCD85B PUSH1 0x7A SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x27 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A206D7573742070726F7669646520 PUSH1 0x40 DUP3 ADD MSTORE PUSH7 0x616374696F6E73 PUSH1 0xC8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x54 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A206F6E65206C6976652070726F70 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6F73616C207065722070726F706F7365722C20666F756E6420616E20616C7265 PUSH1 0x60 DUP3 ADD MSTORE PUSH20 0x18591E481C195B991A5B99C81C1C9BDC1BDCD85B PUSH1 0x62 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x47 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F5F6578656375746553657454696D656C6F636B5065 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6E64696E6741646D696E3A2073656E646572206D75737420626520676F762067 PUSH1 0x60 DUP3 ADD MSTORE PUSH7 0x3AB0B93234B0B7 PUSH1 0xC9 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A73746174653A20696E76616C69642070726F706F7361 PUSH1 0x40 DUP3 ADD MSTORE PUSH4 0x1B081A59 PUSH1 0xE2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x53 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A70726F706F73653A206F6E65206C6976652070726F70 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6F73616C207065722070726F706F7365722C20666F756E6420616E20616C7265 PUSH1 0x60 DUP3 ADD MSTORE PUSH19 0x18591E481858DD1A5D99481C1C9BDC1BDCD85B PUSH1 0x6A SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F63617374566F74653A20766F746573206578636565 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x191CC8195B1A59DA589B1948185B5BDD5B9D PUSH1 0x72 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x40 SWAP1 DUP3 ADD DUP2 SWAP1 MSTORE PUSH32 0x476F7665726E6F723A3A657865637574653A2070726F706F73616C2063616E20 SWAP1 DUP3 ADD MSTORE PUSH32 0x6F6E6C7920626520657865637574656420696620697420697320717565756564 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x11 SWAP1 DUP3 ADD MSTORE PUSH17 0x6164646974696F6E206F766572666C6F77 PUSH1 0x78 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x31 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F5F61626469636174653A2073656E646572206D7573 PUSH1 0x40 DUP3 ADD MSTORE PUSH17 0x3A1031329033B7BB1033BAB0B93234B0B7 PUSH1 0x79 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3F SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F71756575654F725265766572743A2070726F706F73 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x616C20616374696F6E20616C7265616479207175657565642061742065746100 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x34 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F5F61636365707441646D696E3A2073656E64657220 PUSH1 0x40 DUP3 ADD MSTORE PUSH20 0x36BAB9BA1031329033B7BB1033BAB0B93234B0B7 PUSH1 0x61 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F63617374566F74653A20766F74657220616C726561 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x191E481D9BDD1959 PUSH1 0xC2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2A SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A63616E63656C3A2070726F706F7365722061626F7665 PUSH1 0x40 DUP3 ADD MSTORE PUSH10 0x81D1A1C995CDA1BDB19 PUSH1 0xB2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x25 SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A5F63617374566F74653A20766F74696E672069732063 PUSH1 0x40 DUP3 ADD MSTORE PUSH5 0x1B1BDCD959 PUSH1 0xDA SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x15 SWAP1 DUP3 ADD MSTORE PUSH21 0x7375627472616374696F6E20756E646572666C6F77 PUSH1 0x58 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3F SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A71756575653A2070726F706F73616C2063616E206F6E PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6C79206265207175657565642069662069742069732073756363656564656400 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2A SWAP1 DUP3 ADD MSTORE PUSH32 0x476F7665726E6F723A3A63617374566F746542795369673A20696E76616C6964 PUSH1 0x40 DUP3 ADD MSTORE PUSH10 0x207369676E6174757265 PUSH1 0xB0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST DUP2 MLOAD ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 DUP1 DUP4 ADD MLOAD ISZERO ISZERO SWAP1 DUP3 ADD MSTORE PUSH1 0x40 SWAP2 DUP3 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB AND SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST DUP10 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x120 PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x33A0 DUP4 DUP3 ADD DUP12 PUSH2 0x27CD JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x33B4 DUP2 DUP11 PUSH2 0x2863 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x80 DUP5 ADD MSTORE PUSH2 0x33C8 DUP2 DUP10 PUSH2 0x2810 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0xA0 DUP5 ADD MSTORE PUSH2 0x33DC DUP2 DUP9 PUSH2 0x2810 JUMP JUMPDEST SWAP1 POP DUP6 PUSH1 0xC0 DUP5 ADD MSTORE DUP5 PUSH1 0xE0 DUP5 ADD MSTORE DUP3 DUP2 SUB PUSH2 0x100 DUP5 ADD MSTORE PUSH2 0x33FD DUP2 DUP6 PUSH2 0x2892 JUMP JUMPDEST SWAP13 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x140 DUP13 DUP4 MSTORE PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP13 AND PUSH1 0x20 DUP5 ADD MSTORE DUP11 PUSH1 0x40 DUP5 ADD MSTORE DUP10 PUSH1 0x60 DUP5 ADD MSTORE DUP9 PUSH1 0x80 DUP5 ADD MSTORE DUP8 PUSH1 0xA0 DUP5 ADD MSTORE DUP7 PUSH1 0xC0 DUP5 ADD MSTORE DUP6 ISZERO ISZERO PUSH1 0xE0 DUP5 ADD MSTORE DUP5 ISZERO ISZERO PUSH2 0x100 DUP5 ADD MSTORE DUP1 PUSH2 0x120 DUP5 ADD MSTORE PUSH2 0x3465 DUP2 DUP5 ADD DUP6 PUSH2 0x2892 JUMP JUMPDEST SWAP14 SWAP13 POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x34A3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x34C1 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x34E1 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x3516 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x34FE JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x13A2 JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x236A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x236A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x236A JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x21 0xED CALLCODE 0x4C DUP8 0x24 PUSH20 0xA6E45F95E9982A644BEED07932889999E7A0D0FF EXTCODEHASH CALLVALUE 0xAC 0xC6 PUSH8 0x64736F6C63430007 STOP STOP CALLER ", - "sourceMap": "1764:15378:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5758:43;;;;;;;;;;-1:-1:-1;5758:43:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;3127:68;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;1830:52::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;5862:50::-;;;;;;;;;;-1:-1:-1;5862:50:0;;;;;:::i;:::-;;:::i;5982:122::-;;;;;;;;;;;;;:::i;15821:328::-;;;;;;;;;;-1:-1:-1;15821:328:0;;;;;:::i;:::-;;:::i;:::-;;2021:502;;;;;;;;;;;;;:::i;11546:284::-;;;;;;;;;;-1:-1:-1;11546:284:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;:::i;2983:63::-;;;;;;;;;;;;;:::i;12132:1020::-;;;;;;;;;;-1:-1:-1;12132:1020:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;10799:741::-;;;;;;;;;;-1:-1:-1;10799:741:0;;;;;:::i;:::-;;:::i;3460:23::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;11992:134::-;;;;;;;;;;-1:-1:-1;11992:134:0;;;;;:::i;:::-;;:::i;13307:634::-;;;;;;;;;;-1:-1:-1;13307:634:0;;;;;:::i;:::-;;:::i;15326:161::-;;;;;;;;;;;;;:::i;2805:74::-;;;;;;;;;;;;;:::i;15493:322::-;;;;;;;;;;-1:-1:-1;15493:322:0;;;;;:::i;:::-;;:::i;3373:27::-;;;;;;;;;;;;;:::i;2616:77::-;;;;;;;;;;;;;:::i;15152:168::-;;;;;;;;;;;;;:::i;3288:33::-;;;;;;;;;;;;;:::i;3536:25::-;;;;;;;;;;;;;:::i;7247:2036::-;;;;;;;;;;-1:-1:-1;7247:2036:0;;;;;:::i;:::-;;:::i;13158:143::-;;;;;;;;;;-1:-1:-1;13158:143:0;;;;;:::i;:::-;;:::i;9289:563::-;;;;;;;;;;-1:-1:-1;9289:563:0;;;;;:::i;:::-;;:::i;6191:94::-;;;;;;;;;;;;;:::i;11836:150::-;;;;;;;;;;-1:-1:-1;11836:150:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;10232:561::-;;;;;;:::i;:::-;;:::i;5758:43::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5758:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5758:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3127:68::-;3187:5;3127:68;;:::o;1830:52::-;;;;;;;;;;;;;;-1:-1:-1;;;1830:52:0;;;;:::o;5862:50::-;;;;;;;;;;;;;:::o;5982:122::-;6024:80;5982:122;:::o;15821:328::-;15937:8;;-1:-1:-1;;;;;15937:8:0;15923:10;:22;15915:106;;;;-1:-1:-1;;;15915:106:0;;;;;;;:::i;:::-;;;;;;;;;16031:8;;;16109:27;;-1:-1:-1;;;;;16031:8:0;;;;:27;;:8;;;16109:27;;16120:15;;16109:27;;;:::i;:::-;;;;;;;;;;;;;16138:3;16031:111;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16031:111:0;;;;;;;;;;;;:::i;:::-;;15821:328;;:::o;2021:502::-;2109:5;;2125:24;;;-1:-1:-1;;;2125:24:0;;;;2065:4;;;;-1:-1:-1;;;;;2109:5:0;;;;:15;;:5;;2125:22;;:24;;;;;;;;;;;;;;;2109:5;2125:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2109:41;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2081:69;;2160:27;2215:20;2190:5;;;;;;;;;-1:-1:-1;;;;;2190:5:0;-1:-1:-1;;;;;2190:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:45;;-1:-1:-1;2329:27:0;;2325:105;;2379:40;2384:34;2391:22;2415:2;2384:6;:34::i;:::-;2379:4;:40::i;:::-;2372:47;;;;;;2325:105;2504:12;2497:19;;;;2021:502;:::o;11546:284::-;11604:24;11630:20;11652:26;11680:24;11716:18;11737:9;:21;11747:10;11737:21;;;;;;;;;;;11716:42;;11776:1;:9;;11787:1;:8;;11797:1;:12;;11811:1;:11;;11768:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11768:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11768:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11768:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11546:284;;;;;:::o;2983:63::-;3042:1;2983:63;:::o;12132:1020::-;12185:13;12235:10;12218:13;;:27;;:45;;;;;12262:1;12249:10;:14;12218:45;12210:94;;;;-1:-1:-1;;;12210:94:0;;;;;;;:::i;:::-;12314:25;12342:21;;;:9;:21;;;;;12377:17;;;;;;12373:773;;;12417:22;12410:29;;;;;12373:773;12476:8;:19;;;12460:12;:35;12456:690;;12518:21;12511:28;;;;;12456:690;12576:8;:17;;;12560:12;:33;12556:590;;12616:20;12609:27;;;;;12556:590;12678:8;:21;;;12657:8;:17;;;:42;;:79;;;;12723:13;:11;:13::i;:::-;12703:8;:17;;;:33;12657:79;12653:493;;;12759:22;12752:29;;;;;12653:493;12802:12;;;;12798:348;;12842:23;12835:30;;;;;12798:348;12886:17;;;;;;;;;12882:264;;;12926:22;12919:29;;;;;12882:264;12988:45;12995:8;:12;;;13009:8;;;;;;;;-1:-1:-1;;;;;13009:8:0;-1:-1:-1;;;;;13009:21:0;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;12988:6;:45::i;:::-;12969:15;:64;12965:181;;13056:21;13049:28;;;;;12965:181;13115:20;13108:27;;;;;12965:181;12132:1020;;;;;:::o;10799:741::-;10849:26;10878:17;10884:10;10878:5;:17::i;:::-;10849:46;-1:-1:-1;10929:22:0;10913:12;:38;;;;;;;;;;10905:100;;;;-1:-1:-1;;;10905:100:0;;;;;;;:::i;:::-;11016:25;11044:21;;;:9;:21;;;;;11097:8;;-1:-1:-1;;;;;11097:8:0;11083:10;:22;;:111;;;11175:19;:17;:19::i;:::-;11109:5;;;11129:17;;;;-1:-1:-1;;;;;11109:5:0;;;;:19;;11129:17;;;;11148:23;;11155:12;;11148:6;:23::i;:::-;11109:63;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;11109:85:0;;11083:111;11075:166;;;;-1:-1:-1;;;11075:166:0;;;;;;;:::i;:::-;11252:17;;;:24;;-1:-1:-1;;11252:24:0;11272:4;11252:24;;;:17;11286:204;11307:16;;;:23;11303:27;;11286:204;;;11351:8;;11378:16;;;:19;;-1:-1:-1;;;;;11351:8:0;;;;:26;;11378:16;11395:1;;11378:19;;;;;;;;;;;;;;;;11399:15;;;:18;;-1:-1:-1;;;;;11378:19:0;;;;11415:1;;11399:18;;;;;;;;;;;;;;11419:8;:19;;11439:1;11419:22;;;;;;;;;;;;;;;11443:8;:18;;11462:1;11443:21;;;;;;;;;;;;;;;11466:8;:12;;;11351:128;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11332:3:0;;;;;-1:-1:-1;11286:204:0;;-1:-1:-1;11286:204:0;;;11505:28;11522:10;11505:28;;;;;;:::i;:::-;;;;;;;;10799:741;;;:::o;3460:23::-;;;-1:-1:-1;;;;;3460:23:0;;:::o;11992:134::-;12086:21;;;;:9;:21;;;;;;;;;:33;;12079:40;;;;;;-1:-1:-1;;12079:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12054:13;;12079:40;;;12086:33;12079:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11992:134;;;:::o;13307:634::-;13503:4;;;;;;;;;;;;-1:-1:-1;;;13503:4:0;;;;;13423:23;6024:80;13487:22;13511:12;:10;:12::i;:::-;13533:4;13459:80;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;13449:91;;;;;;13423:117;;13550:18;6233:52;13609:10;13621:7;13581:48;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;13571:59;;;;;;13550:80;;13640:14;13696:15;13713:10;13667:57;;;;;;;;;:::i;:::-;;;;;;;;;;;;;13657:68;;;;;;13640:85;;13735:17;13755:26;13765:6;13773:1;13776;13779;13755:26;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;13755:26:0;;-1:-1:-1;;13755:26:0;;;-1:-1:-1;;;;;;;13799:23:0;;13791:78;;;;-1:-1:-1;;;13791:78:0;;;;;;;:::i;:::-;13886:48;13896:9;13907:10;13919:7;13928:5;13886:9;:48::i;:::-;13879:55;;;;13307:634;;;;;;;:::o;15326:161::-;15387:8;;-1:-1:-1;;;;;15387:8:0;15373:10;:22;15365:84;;;;-1:-1:-1;;;15365:84:0;;;;;;;:::i;:::-;15459:8;:21;;-1:-1:-1;;;;;;15459:21:0;;;15326:161::o;2805:74::-;2874:2;2805:74;:::o;15493:322::-;15607:8;;-1:-1:-1;;;;;15607:8:0;15593:10;:22;15585:104;;;;-1:-1:-1;;;15585:104:0;;;;;;;:::i;:::-;15699:8;;;15775:27;;-1:-1:-1;;;;;15699:8:0;;;;:25;;:8;;;15775:27;;15786:15;;15775:27;;;:::i;:::-;;;;;;;;;;;;;15804:3;15699:109;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;3373:27::-;;;-1:-1:-1;;;;;3373:27:0;;:::o;2616:77::-;2681:9;2616:77;:::o;15152:168::-;15216:8;;-1:-1:-1;;;;;15216:8:0;15202:10;:22;15194:87;;;;-1:-1:-1;;;15194:87:0;;;;;;;:::i;:::-;15291:8;;;:22;;;-1:-1:-1;;;15291:22:0;;;;-1:-1:-1;;;;;15291:8:0;;;;:20;;:22;;;;;;;;;;:8;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15152:168::o;3288:33::-;;;-1:-1:-1;;;;;3288:33:0;;:::o;3536:25::-;;;;:::o;7247:2036::-;7409:4;7492:19;:17;:19::i;:::-;7433:5;;;-1:-1:-1;;;;;7433:5:0;;:19;;7453:10;;7465:23;;7472:12;;7465:6;:23::i;:::-;7433:56;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;7433:78:0;;7425:149;;;;-1:-1:-1;;;7425:149:0;;;;;;;:::i;:::-;7610:6;:13;7592:7;:14;:31;:70;;;;;7645:10;:17;7627:7;:14;:35;7592:70;:108;;;;;7684:9;:16;7666:7;:14;:34;7592:108;7584:184;;;;-1:-1:-1;;;7584:184:0;;;;;;;:::i;:::-;7786:14;;7778:71;;;;-1:-1:-1;;;7778:71:0;;;;;;;:::i;:::-;7885:23;:21;:23::i;:::-;7867:7;:14;:41;;7859:89;;;;-1:-1:-1;;;7859:89:0;;;;;;;:::i;:::-;8001:10;7959:21;7983:29;;;:17;:29;;;;;;8026:21;;8022:440;;8061:42;8106:23;8112:16;8106:5;:23::i;:::-;8061:68;-1:-1:-1;8181:20:0;8149:28;:52;;;;;;;;;;8141:148;;;;-1:-1:-1;;;8141:148:0;;;;;;;:::i;:::-;8341:21;8309:28;:53;;;;;;;;;;8301:150;;;;-1:-1:-1;;;8301:150:0;;;;;;;:::i;:::-;8022:440;;8472:15;8490:35;8497:12;8511:13;:11;:13::i;8490:35::-;8472:53;;8535:13;8551:34;8558:10;8570:14;:12;:14::i;8551:34::-;8596:13;:15;;;;;;;;;:13;8643:24;;;:9;:24;;;;;;;8677:20;;;8707:10;;;:23;;-1:-1:-1;;;;;;8707:23:0;8720:10;8707:23;;;8740:5;;;:9;8759:19;;8535:50;;-1:-1:-1;8643:24:0;8759:19;;:9;;;:19;;;;:::i;:::-;-1:-1:-1;8788:17:0;;;;:8;;;;:17;;;;;:::i;:::-;-1:-1:-1;8815:25:0;;;;:12;;;;:25;;;;;:::i;:::-;-1:-1:-1;8850:23:0;;;;:11;;;;:23;;;;;:::i;:::-;-1:-1:-1;8883:12:0;;;:25;;;8918:10;;;:21;;;-1:-1:-1;8949:10:0;;;:14;;;8973;;;:18;9001:10;;;:18;;-1:-1:-1;;9029:18:0;;;9057:27;;;;:13;;;;:27;;;;;:::i;:::-;;9127:1;:4;;;9095:17;:29;9113:1;:10;;;;;;;;;;-1:-1:-1;;;;;9113:10:0;-1:-1:-1;;;;;9095:29:0;-1:-1:-1;;;;;9095:29:0;;;;;;;;;;;;:36;;;;9147:108;9163:1;:4;;;9169:10;9181:7;9190:6;9198:10;9210:9;9221:10;9233:8;9243:11;9147:108;;;;;;;;;;;;;;:::i;:::-;;;;;;;;9272:4;;7247:2036;-1:-1:-1;;;;;;;;;7247:2036:0:o;13158:143::-;13245:49;13255:10;13267;13279:7;13288:5;13245:9;:49::i;9289:563::-;9367:23;9346:17;9352:10;9346:5;:17::i;:::-;:44;;;;;;;;;9338:120;;;;-1:-1:-1;;;9338:120:0;;;;;;;:::i;:::-;9468:25;9496:21;;;:9;:21;;;;;;;;9562:8;;:16;;-1:-1:-1;;;9562:16:0;;;;9496:21;;9468:25;9538:41;;9545:15;;-1:-1:-1;;;;;9562:8:0;;;;:14;;:16;;;;;;;;;;:8;:16;;;;;;;;;;9538:41;9527:52;;9594:6;9589:183;9610:16;;;:23;9606:27;;9589:183;;;9654:107;9669:8;:16;;9686:1;9669:19;;;;;;;;;;;;;;;;;;9690:15;;;:18;;-1:-1:-1;;;;;9669:19:0;;;;9706:1;;9690:18;;;;;;;;;;;;;;9710:8;:19;;9730:1;9710:22;;;;;;;;;;;;;;;;;;9654:107;;;;;;;-1:-1:-1;;9654:107:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9710:22;9654:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9734:8;:18;;9753:1;9734:21;;;;;;;;;;;;;;;;;;9654:107;;;;;;;-1:-1:-1;;9654:107:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9734:21;9654:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9757:3;9654:14;:107::i;:::-;9635:3;;9589:183;;;-1:-1:-1;9781:12:0;;;:18;;;9814:31;;;;;;9829:10;;9796:3;;9814:31;:::i;6191:94::-;6233:52;6191:94;:::o;11836:150::-;11909:14;;:::i;:::-;-1:-1:-1;11942:21:0;;;;:9;:21;;;;;;;;-1:-1:-1;;;;;11942:37:0;;;;;;:30;;;;:37;;;;;;11935:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11935:44:0;;;;;;11836:150::o;10232:561::-;10320:20;10299:17;10305:10;10299:5;:17::i;:::-;:41;;;;;;;;;10291:118;;;;-1:-1:-1;;;10291:118:0;;;;;;;:::i;:::-;10419:25;10447:21;;;:9;:21;;;;;10478:17;;;:24;;-1:-1:-1;;10478:24:0;;;;;10447:21;10512:232;10533:16;;;:23;10529:27;;10512:232;;;10577:8;;10612:15;;;:18;;-1:-1:-1;;;;;10577:8:0;;;;:27;;10612:15;10628:1;;10612:18;;;;;;;;;;;;;;10632:8;:16;;10649:1;10632:19;;;;;;;;;;;;;;;;;;10653:15;;;:18;;-1:-1:-1;;;;;10632:19:0;;;;10669:1;;10653:18;;;;;;;;;;;;;;10673:8;:19;;10693:1;10673:22;;;;;;;;;;;;;;;10697:8;:18;;10716:1;10697:21;;;;;;;;;;;;;;;10720:8;:12;;;10577:156;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;10577:156:0;;;;;;;;;;;;:::i;:::-;-1:-1:-1;10558:3:0;;10512:232;;;;10758:28;10775:10;10758:28;;;;;;:::i;:::-;;;;;;;;10232:561;;:::o;16475:124::-;16536:7;16562:30;16567:1;16570;16562:30;;;;;;;;;;;;;-1:-1:-1;;;16562:30:0;;;:4;:30::i;:::-;16555:37;16475:124;-1:-1:-1;;;16475:124:0:o;16797:191::-;16870:5;16879:1;16874;16870:5;;16869:11;16905:77;16916:1;16912;:5;16905:77;;;16937:1;16933:5;;16970:1;16965;16961;16957;:5;;;;;;:9;16956:15;;;;;;16952:19;;16905:77;;16155:162;16216:4;16241:5;;;16264:6;;;;16256:36;;;;-1:-1:-1;;;16256:36:0;;;;;;;:::i;16323:146::-;16384:4;16413:1;16408;:6;;16400:40;;;;-1:-1:-1;;;16400:40:0;;;;;;;:::i;:::-;-1:-1:-1;16457:5:0;;;16323:146::o;16994:::-;17099:9;16994:146;:::o;13947:1199::-;14074:20;14053:17;14059:10;14053:5;:17::i;:::-;:41;;;;;;;;;14045:91;;;;-1:-1:-1;;;14045:91:0;;;;;;;:::i;:::-;14146:25;14174:21;;;:9;:21;;;;;;;;-1:-1:-1;;;;;14231:24:0;;;;:17;;;:24;;;;;;14273:16;;;;:25;14265:78;;;;-1:-1:-1;;;14265:78:0;;;;;;;:::i;:::-;14369:1;14361:5;-1:-1:-1;;;;;14361:9:0;;14353:90;;;;-1:-1:-1;;;14353:90:0;;;;;;;:::i;:::-;14526:13;;14476:5;;14503:19;;;;14476:47;;-1:-1:-1;;;14476:47:0;;14453:20;;14526:13;;;-1:-1:-1;;;;;14526:13:0;;-1:-1:-1;;;;;14476:5:0;;:19;;:47;;14496:5;;14476:47;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:63;14453:86;;14566:13;-1:-1:-1;;;;;14557:22:0;:5;-1:-1:-1;;;;;14557:22:0;;;14549:85;;;;-1:-1:-1;;;14549:85:0;;;;;;;:::i;:::-;14645:20;14675:11;14680:5;-1:-1:-1;;;;;14675:11:0;:4;:11::i;:::-;14645:42;;14702:7;14698:197;;;14745:40;14752:8;:17;;;14771:13;-1:-1:-1;;;;;14745:40:0;:6;:40::i;:::-;14725:17;;;:60;14698:197;;;14840:44;14847:8;:21;;;14870:13;-1:-1:-1;;;;;14840:44:0;:6;:44::i;:::-;14816:21;;;:68;14698:197;14939:5;;:25;;-1:-1:-1;;;14939:25:0;;-1:-1:-1;;;;;14939:5:0;;;;:11;;:25;;14951:5;;14958;;14939:25;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;14975:23:0;;14994:4;-1:-1:-1;;14975:23:0;;;;-1:-1:-1;;15008:25:0;14975:23;15008:25;;;;;-1:-1:-1;;15043:29:0;;-1:-1:-1;;;;;15043:29:0;;;;;;-1:-1:-1;;15088:51:0;;;;;;15097:5;;15104:10;;15008:25;;15043:29;;15088:51;:::i;:::-;;;;;;;;13947:1199;;;;;;;;:::o;9858:368::-;9992:8;;10030:47;;-1:-1:-1;;;;;9992:8:0;;;;:27;;10030:47;;10041:6;;10049:5;;10056:9;;10067:4;;10073:3;;10030:47;;;:::i;:::-;;;;;;;;;;;;;10020:58;;;;;;9992:87;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9991:88;9983:164;;;;-1:-1:-1;;;9983:164:0;;;;;;;:::i;:::-;10157:8;;:62;;-1:-1:-1;;;10157:62:0;;-1:-1:-1;;;;;10157:8:0;;;;:25;;:62;;10183:6;;10191:5;;10198:9;;10209:4;;10215:3;;10157:62;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;16605:186::-;16692:7;16726:12;16719:5;16711:28;;;;-1:-1:-1;;;16711:28:0;;;;;;;;:::i;:::-;;16749:9;16765:1;16761;:5;;;;;;;16605:186;-1:-1:-1;;;;;16605:186:0:o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;301:707::-;;418:3;411:4;403:6;399:17;395:27;385:2;;-1:-1;;426:12;385:2;473:6;460:20;495:80;510:64;567:6;510:64;:::i;:::-;495:80;:::i;:::-;603:21;;;486:89;-1:-1;647:4;660:14;;;;635:17;;;749;;;740:27;;;;737:36;-1:-1;734:2;;;786:1;;776:12;734:2;811:1;796:206;821:6;818:1;815:13;796:206;;;85:6;72:20;97:33;124:5;97:33;:::i;:::-;889:50;;953:14;;;;981;;;;843:1;836:9;796:206;;;800:14;;;;;378:630;;;;:::o;1032:705::-;;1158:3;1151:4;1143:6;1139:17;1135:27;1125:2;;-1:-1;;1166:12;1125:2;1213:6;1200:20;1235:89;1250:73;1316:6;1250:73;:::i;1235:89::-;1352:21;;;1226:98;-1:-1;1396:4;1409:14;;;;1384:17;;;1504:1;1489:242;1514:6;1511:1;1508:13;1489:242;;;1621:46;1663:3;1396:4;1597:3;1584:17;1388:6;1572:30;;1621:46;:::i;:::-;1609:59;;1682:14;;;;1710;;;;1536:1;1529:9;1489:242;;2496:707;;2613:3;2606:4;2598:6;2594:17;2590:27;2580:2;;-1:-1;;2621:12;2580:2;2668:6;2655:20;2690:80;2705:64;2762:6;2705:64;:::i;2690:80::-;2798:21;;;2681:89;-1:-1;2842:4;2855:14;;;;2830:17;;;2944;;;2935:27;;;;2932:36;-1:-1;2929:2;;;2981:1;;2971:12;2929:2;3006:1;2991:206;3016:6;3013:1;3010:13;2991:206;;;5173:20;;3084:50;;3148:14;;;;3176;;;;3038:1;3031:9;2991:206;;3756:440;;3857:3;3850:4;3842:6;3838:17;3834:27;3824:2;;-1:-1;;3865:12;3824:2;3912:6;3899:20;3934:64;3949:48;3990:6;3949:48;:::i;3934:64::-;3925:73;;4018:6;4011:5;4004:21;4122:3;4054:4;4113:6;4046;4104:16;;4101:25;4098:2;;;4139:1;;4129:12;4098:2;63157:6;4054:4;4046:6;4042:17;4054:4;4080:5;4076:16;63134:30;63213:1;63195:16;;;4054:4;63195:16;63188:27;4080:5;3817:379;-1:-1;;3817:379::o;5791:241::-;;5895:2;5883:9;5874:7;5870:23;5866:32;5863:2;;;-1:-1;;5901:12;5863:2;85:6;72:20;97:33;124:5;97:33;:::i;6039:263::-;;6154:2;6142:9;6133:7;6129:23;6125:32;6122:2;;;-1:-1;;6160:12;6122:2;226:6;220:13;238:33;265:5;238:33;:::i;6309:366::-;;;6430:2;6418:9;6409:7;6405:23;6401:32;6398:2;;;-1:-1;;6436:12;6398:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;6488:63;6588:2;6627:22;;;;5173:20;;-1:-1;;;6392:283::o;6682:1431::-;;;;;;6983:3;6971:9;6962:7;6958:23;6954:33;6951:2;;;-1:-1;;6990:12;6951:2;7048:17;7035:31;7086:18;;7078:6;7075:30;7072:2;;;-1:-1;;7108:12;7072:2;7138:78;7208:7;7199:6;7188:9;7184:22;7138:78;:::i;:::-;7128:88;;7281:2;7270:9;7266:18;7253:32;7239:46;;7086:18;7297:6;7294:30;7291:2;;;-1:-1;;7327:12;7291:2;7357:78;7427:7;7418:6;7407:9;7403:22;7357:78;:::i;:::-;7347:88;;7500:2;7489:9;7485:18;7472:32;7458:46;;7086:18;7516:6;7513:30;7510:2;;;-1:-1;;7546:12;7510:2;7576:88;7656:7;7647:6;7636:9;7632:22;7576:88;:::i;:::-;7566:98;;7729:2;7718:9;7714:18;7701:32;7687:46;;7086:18;7745:6;7742:30;7739:2;;;-1:-1;;7775:12;7739:2;7805:87;7884:7;7875:6;7864:9;7860:22;7805:87;:::i;:::-;7795:97;;7957:3;7946:9;7942:19;7929:33;7915:47;;7086:18;7974:6;7971:30;7968:2;;;-1:-1;;8004:12;7968:2;;8034:63;8089:7;8080:6;8069:9;8065:22;8034:63;:::i;:::-;8024:73;;;6945:1168;;;;;;;;:::o;8120:257::-;;8232:2;8220:9;8211:7;8207:23;8203:32;8200:2;;;-1:-1;;8238:12;8200:2;3423:6;3417:13;3435:30;3459:5;3435:30;:::i;8384:263::-;;8499:2;8487:9;8478:7;8474:23;8470:32;8467:2;;;-1:-1;;8505:12;8467:2;-1:-1;3692:13;;8461:186;-1:-1;8461:186::o;8654:360::-;;8778:2;8766:9;8757:7;8753:23;8749:32;8746:2;;;-1:-1;;8784:12;8746:2;8835:17;8829:24;8873:18;8865:6;8862:30;8859:2;;;-1:-1;;8895:12;8859:2;8966:22;;4310:4;4298:17;;4294:27;-1:-1;4284:2;;-1:-1;;4325:12;4284:2;4365:6;4359:13;4387:64;4402:48;4443:6;4402:48;:::i;4387:64::-;4471:6;4464:5;4457:21;4575:3;8778:2;4566:6;4499;4557:16;;4554:25;4551:2;;;-1:-1;;4582:12;4551:2;4602:39;4634:6;8778:2;4533:5;4529:16;8778:2;4499:6;4495:17;4602:39;:::i;:::-;8915:83;8740:274;-1:-1;;;;;8740:274::o;9021:241::-;;9125:2;9113:9;9104:7;9100:23;9096:32;9093:2;;;-1:-1;;9131:12;9093:2;-1:-1;5173:20;;9087:175;-1:-1;9087:175::o;9539:366::-;;;9660:2;9648:9;9639:7;9635:23;9631:32;9628:2;;;-1:-1;;9666:12;9628:2;5186:6;5173:20;9718:63;;9818:2;9861:9;9857:22;72:20;97:33;124:5;97:33;:::i;:::-;9826:63;;;;9622:283;;;;;:::o;9912:857::-;;;;;;;10095:3;10083:9;10074:7;10070:23;10066:33;10063:2;;;-1:-1;;10102:12;10063:2;5186:6;5173:20;10154:63;;10254:2;10294:9;10290:22;3275:20;3300:30;3324:5;3300:30;:::i;:::-;10262:60;-1:-1;10359:2;10396:22;;5449:20;61552:4;61541:16;;64354:33;;64344:2;;-1:-1;;64391:12;64344:2;10367:61;-1:-1;10465:2;10504:22;;3544:20;;-1:-1;10573:3;10613:22;;3544:20;;-1:-1;10682:3;10721:22;;5583:20;5608:32;5583:20;5608:32;:::i;:::-;10691:62;;;;10057:712;;;;;;;;:::o;10776:483::-;;;;10910:2;10898:9;10889:7;10885:23;10881:32;10878:2;;;-1:-1;;10916:12;10878:2;5186:6;5173:20;10968:63;;11068:2;11108:9;11104:22;3275:20;3300:30;3324:5;3300:30;:::i;:::-;11076:60;-1:-1;11173:2;11211:22;;5583:20;5608:32;5583:20;5608:32;:::i;:::-;11181:62;;;;10872:387;;;;;:::o;11266:261::-;;11380:2;11368:9;11359:7;11355:23;11351:32;11348:2;;;-1:-1;;11386:12;11348:2;5735:6;5729:13;5747:32;5773:5;5747:32;:::i;12708:690::-;;12901:5;58043:12;59402:6;59397:3;59390:19;59439:4;;59434:3;59430:14;12913:93;;59439:4;13077:5;57075:14;-1:-1;13116:260;13141:6;13138:1;13135:13;13116:260;;;13202:13;;-1:-1;;;;;61336:54;12508:37;;11688:14;;;;58881;;;;7086:18;13156:9;13116:260;;;-1:-1;13382:10;;12832:566;-1:-1;;;;;12832:566::o;13433:920::-;;13653:5;58043:12;59402:6;59397:3;59390:19;59439:4;;59434:3;59430:14;13665:102;;;;59439:4;13824:6;13820:17;13815:3;13811:27;13799:39;;59439:4;13918:5;57075:14;-1:-1;13957:357;13982:6;13979:1;13976:13;13957:357;;;14044:9;14038:4;14034:20;14029:3;14022:33;11836:64;11896:3;14089:6;14083:13;11836:64;:::i;:::-;14293:14;;;;14103:90;-1:-1;58881:14;;;;14004:1;13997:9;13957:357;;;-1:-1;14337:10;;13575:778;-1:-1;;;;;;;13575:778::o;15357:690::-;;15550:5;58043:12;59402:6;59397:3;59390:19;59439:4;;59434:3;59430:14;15562:93;;59439:4;15726:5;57075:14;-1:-1;15765:260;15790:6;15787:1;15784:13;15765:260;;;15851:13;;16338:37;;12270:14;;;;58881;;;;15812:1;15805:9;15765:260;;16546:323;;16678:5;58043:12;59402:6;59397:3;59390:19;16761:52;16806:6;59439:4;59434:3;59430:14;59439:4;16787:5;16783:16;16761:52;:::i;:::-;63671:7;63655:14;-1:-1;;63651:28;16825:39;;;;59439:4;16825:39;;16626:243;-1:-1;;16626:243::o;17249:818::-;;17366:5;17360:12;17400:1;;17389:9;17385:17;17413:1;17408:247;;;;17666:1;17661:400;;;;17378:683;;17408:247;17482:1;17467:17;;17486:4;17463:28;59390:19;;-1:-1;;17594:25;;59439:4;59430:14;;17582:38;17634:14;;;;-1:-1;17408:247;;17661:400;17730:1;17719:9;17715:17;59402:6;59397:3;59390:19;17838:37;17869:5;17838:37;:::i;:::-;-1:-1;17899:130;17913:6;17910:1;17907:13;17899:130;;;17978:7;17972:14;59439:4;17968:1;59434:3;17959:11;;17952:35;17400:1;18010:7;18006:15;17995:26;;59439:4;17932:1;17928:12;17923:17;;17899:130;;;18043:11;;59439:4;18043:11;;-1:-1;;;17378:683;;;;17336:731;;;;:::o;31684:659::-;-1:-1;;;23063:87;;23048:1;23169:11;;16338:37;;;;32195:12;;;16338:37;32306:12;;;31929:414::o;32350:222::-;-1:-1;;;;;61336:54;;;;12508:37;;32477:2;32462:18;;32448:124::o;32579:349::-;-1:-1;;;;;61336:54;;;;12377:58;;32914:2;32899:18;;16338:37;32742:2;32727:18;;32713:215::o;32935:962::-;;7086:18;;61347:42;;;12538:5;61336:54;12515:3;12508:37;62683:24;33446:2;33435:9;33431:18;18681:58;33273:3;33483:2;33472:9;33468:18;33461:48;24725:2;33273:3;33262:9;33258:19;59390;24761:26;59430:14;33262:9;59430:14;24741:47;24807:12;33687:2;33676:9;33672:18;33665:48;33727:76;24807:12;33262:9;24807:12;33789:6;33727:76;:::i;:::-;33719:84;;16368:5;33882:3;33871:9;33867:19;16338:37;33244:653;;;;;;;:::o;34244:542::-;-1:-1;;;;;61336:54;;;;12508:37;;34613:2;34598:18;;16338:37;;;;61022:13;61015:21;34690:2;34675:18;;16110:34;-1:-1;;;;;61630:38;34772:2;34757:18;;31399:49;34448:3;34433:19;;34419:367::o;34793:840::-;;7086:18;;61347:42;;;60938:5;61336:54;12515:3;12508:37;16368:5;35235:2;35224:9;35220:18;16338:37;35070:3;35272:2;35261:9;35257:18;35250:48;35312:78;35070:3;35059:9;35055:19;35376:6;35312:78;:::i;:::-;35438:9;35432:4;35428:20;35423:2;35412:9;35408:18;35401:48;35463:76;35534:4;35525:6;35463:76;:::i;:::-;35455:84;;;16368:5;35618:3;35607:9;35603:19;16338:37;35041:592;;;;;;;;:::o;35640:828::-;;7086:18;;61347:42;;;12538:5;61336:54;12515:3;12508:37;16368:5;36076:2;36065:9;36061:18;16338:37;35911:3;36113:2;36102:9;36098:18;36091:48;36153:75;35911:3;35900:9;35896:19;36214:6;36153:75;:::i;:::-;36276:9;36270:4;36266:20;36261:2;36250:9;36246:18;36239:48;36301:73;36369:4;36360:6;36301:73;:::i;36475:329::-;-1:-1;;;;;61336:54;;;;12508:37;;-1:-1;;;;;61630:38;36790:2;36775:18;;31519:36;36628:2;36613:18;;36599:205::o;36811:1224::-;;37260:3;37282:17;37275:47;37336:108;37260:3;37249:9;37245:19;37430:6;37336:108;:::i;:::-;37492:9;37486:4;37482:20;37477:2;37466:9;37462:18;37455:48;37517:108;37620:4;37611:6;37517:108;:::i;:::-;37509:116;;37673:9;37667:4;37663:20;37658:2;37647:9;37643:18;37636:48;37698:128;37821:4;37812:6;37698:128;:::i;:::-;37690:136;;37874:9;37868:4;37864:20;37859:2;37848:9;37844:18;37837:48;37899:126;38020:4;38011:6;37899:126;:::i;:::-;37891:134;37231:804;-1:-1;;;;;;;37231:804::o;38042:222::-;16338:37;;;38169:2;38154:18;;38140:124::o;38271:556::-;16338:37;;;38647:2;38632:18;;16338:37;;;;38730:2;38715:18;;16338:37;-1:-1;;;;;61336:54;38813:2;38798:18;;12508:37;38482:3;38467:19;;38453:374::o;38834:432::-;16338:37;;;39175:2;39160:18;;16338:37;;;;61022:13;61015:21;39252:2;39237:18;;16110:34;39011:2;38996:18;;38982:284::o;39273:548::-;16338:37;;;61552:4;61541:16;;;;39641:2;39626:18;;31282:35;39724:2;39709:18;;16338:37;39807:2;39792:18;;16338:37;39480:3;39465:19;;39451:370::o;40384:252::-;40526:2;40511:18;;63778:1;63768:12;;63758:2;;63784:9;63758:2;18525:65;;;40497:139;:::o;40643:310::-;;40790:2;40811:17;40804:47;40865:78;40790:2;40779:9;40775:18;40929:6;40865:78;:::i;40960:416::-;41160:2;41174:47;;;20520:2;41145:18;;;59390:19;20556:34;59430:14;;;20536:55;20625:28;20611:12;;;20604:50;20673:12;;;41131:245::o;41383:416::-;41583:2;41597:47;;;20924:2;41568:18;;;59390:19;20960:34;59430:14;;;20940:55;21029:33;21015:12;;;21008:55;21082:12;;;41554:245::o;41806:416::-;42006:2;42020:47;;;21333:2;41991:18;;;59390:19;21369:34;59430:14;;;21349:55;21438:34;21424:12;;;21417:56;-1:-1;;;21493:12;;;21486:29;21534:12;;;41977:245::o;42229:416::-;42429:2;42443:47;;;21785:2;42414:18;;;59390:19;21821:34;59430:14;;;21801:55;21890:34;21876:12;;;21869:56;-1:-1;;;21945:12;;;21938:28;21985:12;;;42400:245::o;42652:416::-;42852:2;42866:47;;;22236:2;42837:18;;;59390:19;22272:34;59430:14;;;22252:55;-1:-1;;;22327:12;;;22320:27;22366:12;;;42823:245::o;43075:416::-;43275:2;43289:47;;;22617:2;43260:18;;;59390:19;22653:34;59430:14;;;22633:55;-1:-1;;;22708:12;;;22701:41;22761:12;;;43246:245::o;43498:416::-;43698:2;43712:47;;;23419:2;43683:18;;;59390:19;23455:34;59430:14;;;23435:55;-1:-1;;;23510:12;;;23503:31;23553:12;;;43669:245::o;43921:416::-;44121:2;44135:47;;;23804:2;44106:18;;;59390:19;23840:34;59430:14;;;23820:55;23909:34;23895:12;;;23888:56;-1:-1;;;23964:12;;;23957:44;24020:12;;;44092:245::o;44344:416::-;44544:2;44558:47;;;24271:2;44529:18;;;59390:19;24307:34;59430:14;;;24287:55;24376:34;24362:12;;;24355:56;-1:-1;;;24431:12;;;24424:31;24474:12;;;44515:245::o;44767:416::-;44967:2;44981:47;;;25058:2;44952:18;;;59390:19;25094:34;59430:14;;;25074:55;-1:-1;;;25149:12;;;25142:28;25189:12;;;44938:245::o;45190:416::-;45390:2;45404:47;;;25440:2;45375:18;;;59390:19;25476:34;59430:14;;;25456:55;25545:34;25531:12;;;25524:56;-1:-1;;;25600:12;;;25593:43;25655:12;;;45361:245::o;45613:416::-;45813:2;45827:47;;;25906:2;45798:18;;;59390:19;25942:34;59430:14;;;25922:55;-1:-1;;;25997:12;;;25990:42;26051:12;;;45784:245::o;46036:416::-;46236:2;46250:47;;;26302:2;46221:18;;;59390:19;;;26338:34;59430:14;;;26318:55;26407:34;26393:12;;;26386:56;26461:12;;;46207:245::o;46459:416::-;46659:2;46673:47;;;26712:2;46644:18;;;59390:19;-1:-1;;;59430:14;;;26728:40;26787:12;;;46630:245::o;46882:416::-;47082:2;47096:47;;;27038:2;47067:18;;;59390:19;27074:34;59430:14;;;27054:55;-1:-1;;;27129:12;;;27122:41;27182:12;;;47053:245::o;47305:416::-;47505:2;47519:47;;;27433:2;47490:18;;;59390:19;27469:34;59430:14;;;27449:55;27538:33;27524:12;;;27517:55;27591:12;;;47476:245::o;47728:416::-;47928:2;47942:47;;;27842:2;47913:18;;;59390:19;27878:34;59430:14;;;27858:55;-1:-1;;;27933:12;;;27926:44;27989:12;;;47899:245::o;48151:416::-;48351:2;48365:47;;;28240:2;48336:18;;;59390:19;28276:34;59430:14;;;28256:55;-1:-1;;;28331:12;;;28324:32;28375:12;;;48322:245::o;48574:416::-;48774:2;48788:47;;;28626:2;48759:18;;;59390:19;28662:34;59430:14;;;28642:55;-1:-1;;;28717:12;;;28710:34;28763:12;;;48745:245::o;48997:416::-;49197:2;49211:47;;;29014:2;49182:18;;;59390:19;29050:34;59430:14;;;29030:55;-1:-1;;;29105:12;;;29098:29;29146:12;;;49168:245::o;49420:416::-;49620:2;49634:47;;;29397:2;49605:18;;;59390:19;-1:-1;;;59430:14;;;29413:44;29476:12;;;49591:245::o;49843:416::-;50043:2;50057:47;;;29727:2;50028:18;;;59390:19;29763:34;59430:14;;;29743:55;29832:33;29818:12;;;29811:55;29885:12;;;50014:245::o;50266:416::-;50466:2;50480:47;;;30136:2;50451:18;;;59390:19;30172:34;59430:14;;;30152:55;-1:-1;;;30227:12;;;30220:34;30273:12;;;50437:245::o;50689:318::-;30567:23;;61022:13;61015:21;16110:34;;30735:4;30724:16;;;30718:23;61022:13;61015:21;30789:14;;;16110:34;30884:4;30873:16;;;30867:23;-1:-1;;;;;61630:38;30942:14;;;31519:36;;;;50864:2;50849:18;;50835:172::o;51243:1888::-;16338:37;;;-1:-1;;;;;61336:54;;52033:2;52018:18;;12377:58;51860:3;52070:2;52055:18;;52048:48;;;51243:1888;;52110:108;51845:19;;;52204:6;52110:108;:::i;:::-;52102:116;;52266:9;52260:4;52256:20;52251:2;52240:9;52236:18;52229:48;52291:108;52394:4;52385:6;52291:108;:::i;:::-;52283:116;;52448:9;52442:4;52438:20;52432:3;52421:9;52417:19;52410:49;52473:128;52596:4;52587:6;52473:128;:::i;:::-;52465:136;;52650:9;52644:4;52640:20;52634:3;52623:9;52619:19;52612:49;52675:126;52796:4;52787:6;52675:126;:::i;:::-;52667:134;;16368:5;52880:3;52869:9;52865:19;16338:37;16368:5;52964:3;52953:9;52949:19;16338:37;53018:9;53012:4;53008:20;53002:3;52991:9;52987:19;52980:49;53043:78;53116:4;53107:6;53043:78;:::i;:::-;53035:86;51831:1300;-1:-1;;;;;;;;;;;;51831:1300::o;53138:1292::-;;53525:3;16368:5;16345:3;16338:37;7086:18;;61347:42;;;12538:5;61336:54;53690:2;53679:9;53675:18;12508:37;16368:5;53773:2;53762:9;53758:18;16338:37;16368:5;53856:2;53845:9;53841:18;16338:37;16368:5;53939:3;53928:9;53924:19;16338:37;16368:5;54023:3;54012:9;54008:19;16338:37;16368:5;54107:3;54096:9;54092:19;16338:37;16137:5;61022:13;61015:21;54185:3;54174:9;54170:19;16110:34;16137:5;61022:13;61015:21;54263:3;54252:9;54248:19;16110:34;53525:3;54301;54290:9;54286:19;54279:49;54342:78;53525:3;53514:9;53510:19;54406:6;54342:78;:::i;:::-;54334:86;53496:934;-1:-1;;;;;;;;;;;;;53496:934::o;54437:333::-;16338:37;;;54756:2;54741:18;;16338:37;54592:2;54577:18;;54563:207::o;54777:256::-;54839:2;54833:9;54865:17;;;54940:18;54925:34;;54961:22;;;54922:62;54919:2;;;54997:1;;54987:12;54919:2;54839;55006:22;54817:216;;-1:-1;54817:216::o;55040:304::-;;55199:18;55191:6;55188:30;55185:2;;;-1:-1;;55221:12;55185:2;-1:-1;55266:4;55254:17;;;55319:15;;55122:222::o;56303:321::-;;56446:18;56438:6;56435:30;56432:2;;;-1:-1;;56468:12;56432:2;-1:-1;63671:7;56522:17;-1:-1;;56518:33;56609:4;56599:15;;56369:255::o;57611:157::-;;57705:14;;;57747:4;57734:18;;;57664:104::o;63230:268::-;63295:1;63302:101;63316:6;63313:1;63310:13;63302:101;;;63383:11;;;63377:18;63364:11;;;63357:39;63338:2;63331:10;63302:101;;;63418:6;63415:1;63412:13;63409:2;;;-1:-1;;63295:1;63465:16;;63458:27;63279:219::o;63807:117::-;-1:-1;;;;;61336:54;;63866:35;;63856:2;;63915:1;;63905:12;63931:111;64012:5;61022:13;61015:21;63990:5;63987:32;63977:2;;64033:1;;64023:12;64417:115;-1:-1;;;;;64502:5;61630:38;64478:5;64475:34;64465:2;;64523:1;;64513:12" - }, - "methodIdentifiers": { - "BALLOT_TYPEHASH()": "deaaa7cc", - "DOMAIN_TYPEHASH()": "20606b70", - "__abdicate()": "760fbc13", - "__acceptAdmin()": "b9a61961", - "__executeSetTimelockPendingAdmin(address,uint256)": "21f43e42", - "__queueSetTimelockPendingAdmin(address,uint256)": "91500671", - "cancel(uint256)": "40e58ee5", - "castVote(uint256,bool,uint96)": "dbfa977f", - "castVoteBySig(uint256,bool,uint8,bytes32,bytes32,uint96)": "5d254608", - "dclm8()": "94a08d58", - "execute(uint256)": "fe0d94c1", - "getActions(uint256)": "328dd982", - "getDescription(uint256)": "4925ec55", - "getReceipt(uint256,address)": "e23a9a52", - "guardian()": "452a9320", - "latestProposalIds(address)": "17977c61", - "name()": "06fdde03", - "proposalCount()": "da35c664", - "proposalMaxOperations()": "7bdbe4d0", - "proposalThreshold()": "b58131b0", - "proposals(uint256)": "013cf08b", - "propose(address[],uint256[],string[],bytes[],string)": "da95691a", - "queue(uint256)": "ddf0b009", - "quorumVotes()": "24bc1a64", - "state(uint256)": "3e4f49e6", - "timelock()": "d33219b4", - "votingDelay()": "3932abb1", - "votingPeriod()": "02a251a3" - } - } - }, - "TimelockInterface": { - "abi": [ - { - "inputs": [], - "name": "GRACE_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "cancelTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "queueTransaction", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "queuedTransactions", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "methodIdentifiers": { - "GRACE_PERIOD()": "c1a287e2", - "acceptAdmin()": "0e18b681", - "cancelTransaction(address,uint256,string,bytes,uint256)": "591fcdfe", - "delay()": "6a42b8f8", - "executeTransaction(address,uint256,string,bytes,uint256)": "0825f38f", - "queueTransaction(address,uint256,string,bytes,uint256)": "3a66f901", - "queuedTransactions(bytes32)": "f2b06537" - } - } - } - } - }, - "errors": [ - { - "component": "general", - "errorCode": "2462", - "formattedMessage": "src/main/solidity/net-emissions-token-network/Governance/Governor.sol:169:5: Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it \"abstract\" is sufficient.\n constructor(address timelock_, address dclm8_, address guardian_) public {\n ^ (Relevant source part starts here and spans across multiple lines).\n", - "message": "Visibility for constructor is ignored. If you want the contract to be non-deployable, making it \"abstract\" is sufficient.", - "severity": "warning", - "sourceLocation": { - "end": 7241, - "file": "src/main/solidity/net-emissions-token-network/Governance/Governor.sol", - "start": 7042 - }, - "type": "Warning" - } - ], - "sources": { - "src/main/solidity/net-emissions-token-network/Governance/Governor.sol": { - "ast": { - "absolutePath": "src/main/solidity/net-emissions-token-network/Governance/Governor.sol", - "exportedSymbols": { - "Dclm8Interface": [ - 1524 - ], - "Governor": [ - 1426 - ], - "TimelockInterface": [ - 1490 - ] - }, - "id": 1525, - "license": "BSD-3-Clause", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "0:23:0" - }, - { - "id": 2, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "24:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1426, - "linearizedBaseContracts": [ - 1426 - ], - "name": "Governor", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "documentation": { - "id": 3, - "nodeType": "StructuredDocumentation", - "src": "1788:37:0", - "text": "@notice The name of this contract" - }, - "functionSelector": "06fdde03", - "id": 6, - "mutability": "constant", - "name": "name", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1426, - "src": "1830:52:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1830:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "436c696d6174652044414f20476f7665726e6f72", - "id": 5, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1860:22:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c91d7024f1084cf2cbc672fa7c9487148f930f2547c197a0c5a286cc6f4923ea", - "typeString": "literal_string \"Climate DAO Governor\"" - }, - "value": "Climate DAO Governor" - }, - "visibility": "public" - }, - { - "body": { - "id": 43, - "nodeType": "Block", - "src": "2071:452:0", - "statements": [ - { - "assignments": [ - 13 - ], - "declarations": [ - { - "constant": false, - "id": 13, - "mutability": "mutable", - "name": "initialHolderBalance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 43, - "src": "2081:25:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 12, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2081:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 20, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 16, - "name": "dclm8", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "2125:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getInitialHolder", - "nodeType": "MemberAccess", - "referencedDeclaration": 1516, - "src": "2125:22:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_pure$__$returns$_t_address_$", - "typeString": "function () pure external returns (address)" - } - }, - "id": 18, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2125:24:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 14, - "name": "dclm8", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "2109:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 1511, - "src": "2109:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2109:41:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2081:69:0" - }, - { - "assignments": [ - 22 - ], - "declarations": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "daoTokensInCirculation", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 43, - "src": "2160:27:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 21, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2160:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 28, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 23, - "name": "dclm8", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "2190:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getTotalSupply", - "nodeType": "MemberAccess", - "referencedDeclaration": 1504, - "src": "2190:20:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_pure$__$returns$_t_uint256_$", - "typeString": "function () pure external returns (uint256)" - } - }, - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2190:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 26, - "name": "initialHolderBalance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "2215:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2190:45:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2160:75:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 31, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 29, - "name": "daoTokensInCirculation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "2329:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 30, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2355:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2329:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 40, - "nodeType": "IfStatement", - "src": "2325:105:0", - "trueBody": { - "id": 39, - "nodeType": "Block", - "src": "2358:72:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 34, - "name": "daoTokensInCirculation", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "2391:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "3235", - "id": 35, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2415:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_25_by_1", - "typeString": "int_const 25" - }, - "value": "25" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_25_by_1", - "typeString": "int_const 25" - } - ], - "id": 33, - "name": "div256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1345, - "src": "2384:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 36, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2384:34:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 32, - "name": "sqrt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1413, - "src": "2379:4:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) pure returns (uint256)" - } - }, - "id": 37, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2379:40:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 11, - "id": 38, - "nodeType": "Return", - "src": "2372:47:0" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "363332343535353332303333", - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2504:12:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_632455532033_by_1", - "typeString": "int_const 632455532033" - }, - "value": "632455532033" - }, - "functionReturnParameters": 11, - "id": 42, - "nodeType": "Return", - "src": "2497:19:0" - } - ] - }, - "documentation": { - "id": 7, - "nodeType": "StructuredDocumentation", - "src": "1889:127:0", - "text": "@notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed" - }, - "functionSelector": "24bc1a64", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "quorumVotes", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "2041:2:0" - }, - "returnParameters": { - "id": 11, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 44, - "src": "2065:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2065:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2064:6:0" - }, - "scope": 1426, - "src": "2021:502:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 52, - "nodeType": "Block", - "src": "2672:21:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "313030303030653138", - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2681:9:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000000000000000000_by_1", - "typeString": "int_const 100000000000000000000000" - }, - "value": "100000e18" - }, - "functionReturnParameters": 49, - "id": 51, - "nodeType": "Return", - "src": "2674:16:0" - } - ] - }, - "documentation": { - "id": 45, - "nodeType": "StructuredDocumentation", - "src": "2529:82:0", - "text": "@notice The number of votes required in order for a voter to become a proposer" - }, - "functionSelector": "b58131b0", - "id": 53, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalThreshold", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 46, - "nodeType": "ParameterList", - "parameters": [], - "src": "2642:2:0" - }, - "returnParameters": { - "id": 49, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 53, - "src": "2666:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 47, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2666:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2665:6:0" - }, - "scope": 1426, - "src": "2616:77:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 61, - "nodeType": "Block", - "src": "2865:14:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 59, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2874:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "functionReturnParameters": 58, - "id": 60, - "nodeType": "Return", - "src": "2867:9:0" - } - ] - }, - "documentation": { - "id": 54, - "nodeType": "StructuredDocumentation", - "src": "2724:76:0", - "text": "@notice The maximum number of actions that can be included in a proposal" - }, - "functionSelector": "7bdbe4d0", - "id": 62, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "proposalMaxOperations", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 55, - "nodeType": "ParameterList", - "parameters": [], - "src": "2835:2:0" - }, - "returnParameters": { - "id": 58, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 57, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 62, - "src": "2859:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 56, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2859:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2858:6:0" - }, - "scope": 1426, - "src": "2805:74:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 70, - "nodeType": "Block", - "src": "3033:13:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "31", - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3042:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "functionReturnParameters": 67, - "id": 69, - "nodeType": "Return", - "src": "3035:8:0" - } - ] - }, - "documentation": { - "id": 63, - "nodeType": "StructuredDocumentation", - "src": "2899:79:0", - "text": "@notice The delay before voting on a proposal may take place, once proposed" - }, - "functionSelector": "3932abb1", - "id": 71, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingDelay", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 64, - "nodeType": "ParameterList", - "parameters": [], - "src": "3003:2:0" - }, - "returnParameters": { - "id": 67, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 66, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 71, - "src": "3027:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 65, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3027:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3026:6:0" - }, - "scope": 1426, - "src": "2983:63:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 79, - "nodeType": "Block", - "src": "3178:17:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "3137323830", - "id": 77, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3187:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17280_by_1", - "typeString": "int_const 17280" - }, - "value": "17280" - }, - "functionReturnParameters": 76, - "id": 78, - "nodeType": "Return", - "src": "3180:12:0" - } - ] - }, - "documentation": { - "id": 72, - "nodeType": "StructuredDocumentation", - "src": "3063:59:0", - "text": "@notice The duration of voting on a proposal, in blocks" - }, - "functionSelector": "02a251a3", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "votingPeriod", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 73, - "nodeType": "ParameterList", - "parameters": [], - "src": "3148:2:0" - }, - "returnParameters": { - "id": 76, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 75, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 80, - "src": "3172:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 74, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3172:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3171:6:0" - }, - "scope": 1426, - "src": "3127:68:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 81, - "nodeType": "StructuredDocumentation", - "src": "3244:39:0", - "text": "@notice The address of the timelock" - }, - "functionSelector": "d33219b4", - "id": 83, - "mutability": "mutable", - "name": "timelock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1426, - "src": "3288:33:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - }, - "typeName": { - "contractScope": null, - "id": 82, - "name": "TimelockInterface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1490, - "src": "3288:17:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 84, - "nodeType": "StructuredDocumentation", - "src": "3328:40:0", - "text": "@notice The address of the DAO token" - }, - "functionSelector": "94a08d58", - "id": 86, - "mutability": "mutable", - "name": "dclm8", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1426, - "src": "3373:27:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - }, - "typeName": { - "contractScope": null, - "id": 85, - "name": "Dclm8Interface", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1524, - "src": "3373:14:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 87, - "nodeType": "StructuredDocumentation", - "src": "3407:48:0", - "text": "@notice The address of the Governor Guardian" - }, - "functionSelector": "452a9320", - "id": 89, - "mutability": "mutable", - "name": "guardian", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1426, - "src": "3460:23:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 88, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3460:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 90, - "nodeType": "StructuredDocumentation", - "src": "3490:41:0", - "text": "@notice The total number of proposals" - }, - "functionSelector": "da35c664", - "id": 92, - "mutability": "mutable", - "name": "proposalCount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1426, - "src": "3536:25:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 91, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3536:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "Governor.Proposal", - "id": 129, - "members": [ - { - "constant": false, - "id": 94, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "3649:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 93, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3649:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 96, - "mutability": "mutable", - "name": "proposer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "3710:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 95, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3710:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 98, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "3848:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 97, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3848:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 101, - "mutability": "mutable", - "name": "targets", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "3944:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 99, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3944:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 100, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3944:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "values", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "4072:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 102, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4072:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 103, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4072:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 107, - "mutability": "mutable", - "name": "signatures", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "4168:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 105, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4168:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 106, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4168:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 110, - "mutability": "mutable", - "name": "calldatas", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "4272:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 108, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4272:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 109, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4272:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 112, - "mutability": "mutable", - "name": "startBlock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "4407:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 111, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4407:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 114, - "mutability": "mutable", - "name": "endBlock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "4523:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 113, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4523:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 116, - "mutability": "mutable", - "name": "forVotes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "4616:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 115, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4616:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 118, - "mutability": "mutable", - "name": "againstVotes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "4714:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 117, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4714:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 120, - "mutability": "mutable", - "name": "canceled", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "4813:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 119, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4813:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "executed", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "4908:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 121, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4908:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "4978:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 123, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4978:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 128, - "mutability": "mutable", - "name": "receipts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 129, - "src": "5075:37:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$136_storage_$", - "typeString": "mapping(address => struct Governor.Receipt)" - }, - "typeName": { - "id": 127, - "keyType": { - "id": 125, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5084:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "5075:28:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$136_storage_$", - "typeString": "mapping(address => struct Governor.Receipt)" - }, - "valueType": { - "contractScope": null, - "id": 126, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 136, - "src": "5095:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage_ptr", - "typeString": "struct Governor.Receipt" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Proposal", - "nodeType": "StructDefinition", - "scope": 1426, - "src": "3568:1551:0", - "visibility": "public" - }, - { - "canonicalName": "Governor.Receipt", - "id": 136, - "members": [ - { - "constant": false, - "id": 131, - "mutability": "mutable", - "name": "hasVoted", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 136, - "src": "5255:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 130, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5255:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 133, - "mutability": "mutable", - "name": "support", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 136, - "src": "5345:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 132, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5345:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 135, - "mutability": "mutable", - "name": "votes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 136, - "src": "5438:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 134, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "5438:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Receipt", - "nodeType": "StructDefinition", - "scope": 1426, - "src": "5175:282:0", - "visibility": "public" - }, - { - "canonicalName": "Governor.ProposalState", - "id": 145, - "members": [ - { - "id": 137, - "name": "Pending", - "nodeType": "EnumValue", - "src": "5550:7:0" - }, - { - "id": 138, - "name": "Active", - "nodeType": "EnumValue", - "src": "5567:6:0" - }, - { - "id": 139, - "name": "Canceled", - "nodeType": "EnumValue", - "src": "5583:8:0" - }, - { - "id": 140, - "name": "Defeated", - "nodeType": "EnumValue", - "src": "5601:8:0" - }, - { - "id": 141, - "name": "Succeeded", - "nodeType": "EnumValue", - "src": "5619:9:0" - }, - { - "id": 142, - "name": "Queued", - "nodeType": "EnumValue", - "src": "5638:6:0" - }, - { - "id": 143, - "name": "Expired", - "nodeType": "EnumValue", - "src": "5654:7:0" - }, - { - "id": 144, - "name": "Executed", - "nodeType": "EnumValue", - "src": "5671:8:0" - } - ], - "name": "ProposalState", - "nodeType": "EnumDefinition", - "src": "5521:164:0" - }, - { - "constant": false, - "documentation": { - "id": 146, - "nodeType": "StructuredDocumentation", - "src": "5691:62:0", - "text": "@notice The official record of all proposals ever proposed" - }, - "functionSelector": "013cf08b", - "id": 150, - "mutability": "mutable", - "name": "proposals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1426, - "src": "5758:43:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal)" - }, - "typeName": { - "id": 149, - "keyType": { - "id": 147, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5767:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "5758:26:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal)" - }, - "valueType": { - "contractScope": null, - "id": 148, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 129, - "src": "5775:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "documentation": { - "id": 151, - "nodeType": "StructuredDocumentation", - "src": "5808:49:0", - "text": "@notice The latest proposal for each proposer" - }, - "functionSelector": "17977c61", - "id": 155, - "mutability": "mutable", - "name": "latestProposalIds", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1426, - "src": "5862:50:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 154, - "keyType": { - "id": 152, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5871:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "5862:25:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 153, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5882:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "documentation": { - "id": 156, - "nodeType": "StructuredDocumentation", - "src": "5919:58:0", - "text": "@notice The EIP-712 typehash for the contract's domain" - }, - "functionSelector": "20606b70", - "id": 161, - "mutability": "constant", - "name": "DOMAIN_TYPEHASH", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1426, - "src": "5982:122:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 157, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5982:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", - "id": 159, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6034:69:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - }, - "value": "EIP712Domain(string name,uint256 chainId,address verifyingContract)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866", - "typeString": "literal_string \"EIP712Domain(string name,uint256 chainId,address verifyingContract)\"" - } - ], - "id": 158, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "6024:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6024:80:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "documentation": { - "id": 162, - "nodeType": "StructuredDocumentation", - "src": "6111:75:0", - "text": "@notice The EIP-712 typehash for the ballot struct used by the contract" - }, - "functionSelector": "deaaa7cc", - "id": 167, - "mutability": "constant", - "name": "BALLOT_TYPEHASH", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1426, - "src": "6191:94:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 163, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6191:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c20737570706f727429", - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6243:41:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - }, - "value": "Ballot(uint256 proposalId,bool support)" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee", - "typeString": "literal_string \"Ballot(uint256 proposalId,bool support)\"" - } - ], - "id": 164, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "6233:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6233:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": { - "id": 168, - "nodeType": "StructuredDocumentation", - "src": "6292:59:0", - "text": "@notice An event emitted when a new proposal is created" - }, - "id": 192, - "name": "ProposalCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 191, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 170, - "indexed": false, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 192, - "src": "6378:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 169, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6378:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 172, - "indexed": false, - "mutability": "mutable", - "name": "proposer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 192, - "src": "6387:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 171, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6387:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 175, - "indexed": false, - "mutability": "mutable", - "name": "targets", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 192, - "src": "6405:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 173, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6405:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 174, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6405:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 178, - "indexed": false, - "mutability": "mutable", - "name": "values", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 192, - "src": "6424:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 176, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6424:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 177, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6424:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 181, - "indexed": false, - "mutability": "mutable", - "name": "signatures", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 192, - "src": "6439:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_ptr_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 179, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6439:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 180, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6439:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 184, - "indexed": false, - "mutability": "mutable", - "name": "calldatas", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 192, - "src": "6460:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 182, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6460:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 183, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6460:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 186, - "indexed": false, - "mutability": "mutable", - "name": "startBlock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 192, - "src": "6479:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 185, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6479:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 188, - "indexed": false, - "mutability": "mutable", - "name": "endBlock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 192, - "src": "6496:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 187, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6496:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 190, - "indexed": false, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 192, - "src": "6511:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 189, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6511:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6377:153:0" - }, - "src": "6356:175:0" - }, - { - "anonymous": false, - "documentation": { - "id": 193, - "nodeType": "StructuredDocumentation", - "src": "6537:68:0", - "text": "@notice An event emitted when a vote has been cast on a proposal" - }, - "id": 203, - "name": "VoteCast", - "nodeType": "EventDefinition", - "parameters": { - "id": 202, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 195, - "indexed": false, - "mutability": "mutable", - "name": "voter", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 203, - "src": "6625:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 194, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6625:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 197, - "indexed": false, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 203, - "src": "6640:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 196, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6640:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 199, - "indexed": false, - "mutability": "mutable", - "name": "support", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 203, - "src": "6657:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 198, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6657:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 201, - "indexed": false, - "mutability": "mutable", - "name": "votes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 203, - "src": "6671:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 200, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6671:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6624:58:0" - }, - "src": "6610:73:0" - }, - { - "anonymous": false, - "documentation": { - "id": 204, - "nodeType": "StructuredDocumentation", - "src": "6689:62:0", - "text": "@notice An event emitted when a proposal has been canceled" - }, - "id": 208, - "name": "ProposalCanceled", - "nodeType": "EventDefinition", - "parameters": { - "id": 207, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 206, - "indexed": false, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 208, - "src": "6779:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 205, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6779:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6778:9:0" - }, - "src": "6756:32:0" - }, - { - "anonymous": false, - "documentation": { - "id": 209, - "nodeType": "StructuredDocumentation", - "src": "6794:76:0", - "text": "@notice An event emitted when a proposal has been queued in the Timelock" - }, - "id": 215, - "name": "ProposalQueued", - "nodeType": "EventDefinition", - "parameters": { - "id": 214, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 211, - "indexed": false, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 215, - "src": "6896:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 210, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6896:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 213, - "indexed": false, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 215, - "src": "6905:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 212, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6905:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6895:19:0" - }, - "src": "6875:40:0" - }, - { - "anonymous": false, - "documentation": { - "id": 216, - "nodeType": "StructuredDocumentation", - "src": "6921:78:0", - "text": "@notice An event emitted when a proposal has been executed in the Timelock" - }, - "id": 220, - "name": "ProposalExecuted", - "nodeType": "EventDefinition", - "parameters": { - "id": 219, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 218, - "indexed": false, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 220, - "src": "7027:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 217, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7027:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7026:9:0" - }, - "src": "7004:32:0" - }, - { - "body": { - "id": 245, - "nodeType": "Block", - "src": "7115:126:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 229, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "7125:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 231, - "name": "timelock_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 222, - "src": "7154:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 230, - "name": "TimelockInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1490, - "src": "7136:17:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_TimelockInterface_$1490_$", - "typeString": "type(contract TimelockInterface)" - } - }, - "id": 232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7136:28:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "src": "7125:39:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "id": 234, - "nodeType": "ExpressionStatement", - "src": "7125:39:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 235, - "name": "dclm8", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "7174:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 237, - "name": "dclm8_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 224, - "src": "7197:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 236, - "name": "Dclm8Interface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1524, - "src": "7182:14:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Dclm8Interface_$1524_$", - "typeString": "type(contract Dclm8Interface)" - } - }, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7182:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "src": "7174:30:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "id": 240, - "nodeType": "ExpressionStatement", - "src": "7174:30:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 241, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "7214:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 242, - "name": "guardian_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 226, - "src": "7225:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7214:20:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 244, - "nodeType": "ExpressionStatement", - "src": "7214:20:0" - } - ] - }, - "documentation": null, - "id": 246, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 227, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 222, - "mutability": "mutable", - "name": "timelock_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 246, - "src": "7054:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 221, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7054:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 224, - "mutability": "mutable", - "name": "dclm8_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 246, - "src": "7073:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 223, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7073:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 226, - "mutability": "mutable", - "name": "guardian_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 246, - "src": "7089:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 225, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7089:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7053:54:0" - }, - "returnParameters": { - "id": 228, - "nodeType": "ParameterList", - "parameters": [], - "src": "7115:0:0" - }, - "scope": 1426, - "src": "7042:199:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 490, - "nodeType": "Block", - "src": "7415:1868:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 268, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "7453:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7453:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 271, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "7472:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7472:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7486:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 270, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1329, - "src": "7465:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7465:23:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 266, - "name": "dclm8", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "7433:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "id": 267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 1499, - "src": "7433:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint96_$", - "typeString": "function (address,uint256) view external returns (uint96)" - } - }, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7433:56:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 276, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "7492:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7492:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7433:78:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a70726f706f73653a2070726f706f73657220766f7465732062656c6f772070726f706f73616c207468726573686f6c64", - "id": 279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7513:60:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0072e36ada370753d55c2236f64e7281a17d39ec8da927e7a4cbe16dde96aec5", - "typeString": "literal_string \"Governor::propose: proposer votes below proposal threshold\"" - }, - "value": "Governor::propose: proposer votes below proposal threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0072e36ada370753d55c2236f64e7281a17d39ec8da927e7a4cbe16dde96aec5", - "typeString": "literal_string \"Governor::propose: proposer votes below proposal threshold\"" - } - ], - "id": 265, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7425:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7425:149:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 281, - "nodeType": "ExpressionStatement", - "src": "7425:149:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 283, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "7592:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7592:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 285, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "7610:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7610:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7592:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 288, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "7627:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7627:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 290, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "7645:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_ptr_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "id": 291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7645:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7627:35:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7592:70:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 294, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "7666:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7666:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 296, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "7684:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7684:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7666:34:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7592:108:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a70726f706f73653a2070726f706f73616c2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368", - "id": 300, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7702:65:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0d10ec655549b1b1f766d457858c9d99d303aae952128d660e5f9aa72cfa7c0f", - "typeString": "literal_string \"Governor::propose: proposal function information arity mismatch\"" - }, - "value": "Governor::propose: proposal function information arity mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0d10ec655549b1b1f766d457858c9d99d303aae952128d660e5f9aa72cfa7c0f", - "typeString": "literal_string \"Governor::propose: proposal function information arity mismatch\"" - } - ], - "id": 282, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7584:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7584:184:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 302, - "nodeType": "ExpressionStatement", - "src": "7584:184:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 304, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "7786:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7786:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7804:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7786:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a70726f706f73653a206d7573742070726f7669646520616374696f6e73", - "id": 308, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7807:41:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3093f9b545fe0fd92c34059e440b11eb6efb2a6711eb38eecf4e7d65e1fd4e2e", - "typeString": "literal_string \"Governor::propose: must provide actions\"" - }, - "value": "Governor::propose: must provide actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3093f9b545fe0fd92c34059e440b11eb6efb2a6711eb38eecf4e7d65e1fd4e2e", - "typeString": "literal_string \"Governor::propose: must provide actions\"" - } - ], - "id": 303, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7778:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7778:71:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 310, - "nodeType": "ExpressionStatement", - "src": "7778:71:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 312, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "7867:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7867:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 314, - "name": "proposalMaxOperations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "7885:21:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7885:23:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7867:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a70726f706f73653a20746f6f206d616e7920616374696f6e73", - "id": 317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7910:37:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_193de9d00f60795e791e8768eb7b57db28f4acde78ad9b426f3139fcc3bb02ea", - "typeString": "literal_string \"Governor::propose: too many actions\"" - }, - "value": "Governor::propose: too many actions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_193de9d00f60795e791e8768eb7b57db28f4acde78ad9b426f3139fcc3bb02ea", - "typeString": "literal_string \"Governor::propose: too many actions\"" - } - ], - "id": 311, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7859:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7859:89:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 319, - "nodeType": "ExpressionStatement", - "src": "7859:89:0" - }, - { - "assignments": [ - 321 - ], - "declarations": [ - { - "constant": false, - "id": 321, - "mutability": "mutable", - "name": "latestProposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 490, - "src": "7959:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 320, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7959:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 326, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 322, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 155, - "src": "7983:17:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 325, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 323, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "8001:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 324, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8001:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7983:29:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7959:53:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 329, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 327, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 321, - "src": "8026:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 328, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8046:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8026:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 353, - "nodeType": "IfStatement", - "src": "8022:440:0", - "trueBody": { - "id": 352, - "nodeType": "Block", - "src": "8049:413:0", - "statements": [ - { - "assignments": [ - 331 - ], - "declarations": [ - { - "constant": false, - "id": 331, - "mutability": "mutable", - "name": "proposersLatestProposalState", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 352, - "src": "8061:42:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 330, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 145, - "src": "8061:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 335, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 333, - "name": "latestProposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 321, - "src": "8112:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 332, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 946, - "src": "8106:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$145_$", - "typeString": "function (uint256) view returns (enum Governor.ProposalState)" - } - }, - "id": 334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8106:23:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8061:68:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - }, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 337, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 331, - "src": "8149:28:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 338, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "8181:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8181:20:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "src": "8149:52:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c7265616479206163746976652070726f706f73616c", - "id": 341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8203:85:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_67c059639fd578706a54d525a399c920cc7716e098c8577f1405ef90d31ce2da", - "typeString": "literal_string \"Governor::propose: one live proposal per proposer, found an already active proposal\"" - }, - "value": "Governor::propose: one live proposal per proposer, found an already active proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_67c059639fd578706a54d525a399c920cc7716e098c8577f1405ef90d31ce2da", - "typeString": "literal_string \"Governor::propose: one live proposal per proposer, found an already active proposal\"" - } - ], - "id": 336, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8141:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8141:148:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 343, - "nodeType": "ExpressionStatement", - "src": "8141:148:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - }, - "id": 348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 345, - "name": "proposersLatestProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 331, - "src": "8309:28:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 346, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "8341:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8341:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "src": "8309:53:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a70726f706f73653a206f6e65206c6976652070726f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c72656164792070656e64696e672070726f706f73616c", - "id": 349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8364:86:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_37a339f5253775e508175a7e67f18f93ac5b64717c10eb9177d8fbf2fcea925a", - "typeString": "literal_string \"Governor::propose: one live proposal per proposer, found an already pending proposal\"" - }, - "value": "Governor::propose: one live proposal per proposer, found an already pending proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_37a339f5253775e508175a7e67f18f93ac5b64717c10eb9177d8fbf2fcea925a", - "typeString": "literal_string \"Governor::propose: one live proposal per proposer, found an already pending proposal\"" - } - ], - "id": 344, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8301:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8301:150:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 351, - "nodeType": "ExpressionStatement", - "src": "8301:150:0" - } - ] - } - }, - { - "assignments": [ - 355 - ], - "declarations": [ - { - "constant": false, - "id": 355, - "mutability": "mutable", - "name": "startBlock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 490, - "src": "8472:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 354, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8472:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 362, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 357, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "8497:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8497:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 359, - "name": "votingDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 71, - "src": "8511:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8511:13:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 356, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "8490:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8490:35:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8472:53:0" - }, - { - "assignments": [ - 364 - ], - "declarations": [ - { - "constant": false, - "id": 364, - "mutability": "mutable", - "name": "endBlock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 490, - "src": "8535:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 363, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8535:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 370, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 366, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 355, - "src": "8558:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 367, - "name": "votingPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "8570:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8570:14:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 365, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "8551:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8551:34:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8535:50:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8596:15:0", - "subExpression": { - "argumentTypes": null, - "id": 371, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "8596:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 373, - "nodeType": "ExpressionStatement", - "src": "8596:15:0" - }, - { - "assignments": [ - 375 - ], - "declarations": [ - { - "constant": false, - "id": 375, - "mutability": "mutable", - "name": "p", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 490, - "src": "8622:18:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 374, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 129, - "src": "8622:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 379, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 376, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "8643:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal storage ref)" - } - }, - "id": 378, - "indexExpression": { - "argumentTypes": null, - "id": 377, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "8653:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8643:24:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage", - "typeString": "struct Governor.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8622:45:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 380, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8677:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 382, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "8677:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 383, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "8684:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8677:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 385, - "nodeType": "ExpressionStatement", - "src": "8677:20:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 386, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8707:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 388, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "8707:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 389, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "8720:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8720:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "8707:23:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 392, - "nodeType": "ExpressionStatement", - "src": "8707:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 393, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8740:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 395, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "8740:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 396, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8748:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8740:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 398, - "nodeType": "ExpressionStatement", - "src": "8740:9:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 399, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8759:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 401, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 101, - "src": "8759:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 402, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "8771:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "src": "8759:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 404, - "nodeType": "ExpressionStatement", - "src": "8759:19:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 405, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8788:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 407, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 104, - "src": "8788:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 408, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "8799:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "src": "8788:17:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 410, - "nodeType": "ExpressionStatement", - "src": "8788:17:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 411, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8815:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 413, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "8815:12:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 414, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "8830:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_ptr_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - "src": "8815:25:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 416, - "nodeType": "ExpressionStatement", - "src": "8815:25:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 417, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8850:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 419, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "8850:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 420, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "8864:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "src": "8850:23:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 422, - "nodeType": "ExpressionStatement", - "src": "8850:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 423, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8883:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 425, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 112, - "src": "8883:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 426, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 355, - "src": "8898:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8883:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 428, - "nodeType": "ExpressionStatement", - "src": "8883:25:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 429, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8918:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 431, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "endBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 114, - "src": "8918:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 432, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 364, - "src": "8931:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8918:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 434, - "nodeType": "ExpressionStatement", - "src": "8918:21:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 439, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 435, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8949:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 437, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 116, - "src": "8949:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 438, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8962:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8949:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 440, - "nodeType": "ExpressionStatement", - "src": "8949:14:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 441, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "8973:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 443, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 118, - "src": "8973:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 444, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8990:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8973:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 446, - "nodeType": "ExpressionStatement", - "src": "8973:18:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 447, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "9001:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 449, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 120, - "src": "9001:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 450, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9014:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "9001:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 452, - "nodeType": "ExpressionStatement", - "src": "9001:18:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 453, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "9029:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 455, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 122, - "src": "9029:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 456, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9042:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "9029:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 458, - "nodeType": "ExpressionStatement", - "src": "9029:18:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 459, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "9057:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 461, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "description", - "nodeType": "MemberAccess", - "referencedDeclaration": 124, - "src": "9057:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 462, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 260, - "src": "9073:11:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "9057:27:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 464, - "nodeType": "ExpressionStatement", - "src": "9057:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 465, - "name": "latestProposalIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 155, - "src": "9095:17:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 468, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 466, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "9113:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 467, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "9113:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9095:29:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 469, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "9127:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 470, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "9127:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9095:36:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 472, - "nodeType": "ExpressionStatement", - "src": "9095:36:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 474, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "9163:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 475, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "9163:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 476, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9169:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9169:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 478, - "name": "targets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "9181:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 479, - "name": "values", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "9190:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 480, - "name": "signatures", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "9198:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_ptr_$dyn_memory_ptr", - "typeString": "string memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 481, - "name": "calldatas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "9210:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 482, - "name": "startBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 355, - "src": "9221:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 483, - "name": "endBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 364, - "src": "9233:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 484, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 260, - "src": "9243:11:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_string_memory_ptr_$dyn_memory_ptr", - "typeString": "string memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 473, - "name": "ProposalCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "9147:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_string_memory_ptr_$dyn_memory_ptr_$_t_array$_t_bytes_memory_ptr_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,address,address[] memory,uint256[] memory,string memory[] memory,bytes memory[] memory,uint256,uint256,string memory)" - } - }, - "id": 485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9147:108:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 486, - "nodeType": "EmitStatement", - "src": "9142:113:0" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 487, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 375, - "src": "9272:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 488, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "9272:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 264, - "id": 489, - "nodeType": "Return", - "src": "9265:11:0" - } - ] - }, - "documentation": null, - "functionSelector": "da95691a", - "id": 491, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "propose", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 261, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 249, - "mutability": "mutable", - "name": "targets", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 491, - "src": "7264:24:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7264:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 248, - "length": null, - "nodeType": "ArrayTypeName", - "src": "7264:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 252, - "mutability": "mutable", - "name": "values", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 491, - "src": "7290:20:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 250, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7290:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 251, - "length": null, - "nodeType": "ArrayTypeName", - "src": "7290:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 255, - "mutability": "mutable", - "name": "signatures", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 491, - "src": "7312:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_ptr_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 253, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7312:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 254, - "length": null, - "nodeType": "ArrayTypeName", - "src": "7312:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 258, - "mutability": "mutable", - "name": "calldatas", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 491, - "src": "7340:24:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 256, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7340:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 257, - "length": null, - "nodeType": "ArrayTypeName", - "src": "7340:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 260, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 491, - "src": "7366:25:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 259, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7366:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7263:129:0" - }, - "returnParameters": { - "id": 264, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 263, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 491, - "src": "7409:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 262, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7409:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7408:6:0" - }, - "scope": 1426, - "src": "7247:2036:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 567, - "nodeType": "Block", - "src": "9328:524:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 498, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 493, - "src": "9352:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 497, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 946, - "src": "9346:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$145_$", - "typeString": "function (uint256) view returns (enum Governor.ProposalState)" - } - }, - "id": 499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9346:17:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 500, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "9367:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9367:23:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "src": "9346:44:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a71756575653a2070726f706f73616c2063616e206f6e6c792062652071756575656420696620697420697320737563636565646564", - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9392:65:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f893ebbb50fdb46b9b80bb92d8bf649ad5b0dc16a665c98dcc2701083a6f65fd", - "typeString": "literal_string \"Governor::queue: proposal can only be queued if it is succeeded\"" - }, - "value": "Governor::queue: proposal can only be queued if it is succeeded" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f893ebbb50fdb46b9b80bb92d8bf649ad5b0dc16a665c98dcc2701083a6f65fd", - "typeString": "literal_string \"Governor::queue: proposal can only be queued if it is succeeded\"" - } - ], - "id": 496, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "9338:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9338:120:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 505, - "nodeType": "ExpressionStatement", - "src": "9338:120:0" - }, - { - "assignments": [ - 507 - ], - "declarations": [ - { - "constant": false, - "id": 507, - "mutability": "mutable", - "name": "proposal", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 567, - "src": "9468:25:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 506, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 129, - "src": "9468:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 511, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 508, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "9496:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal storage ref)" - } - }, - "id": 510, - "indexExpression": { - "argumentTypes": null, - "id": 509, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 493, - "src": "9506:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9496:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage", - "typeString": "struct Governor.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9468:49:0" - }, - { - "assignments": [ - 513 - ], - "declarations": [ - { - "constant": false, - "id": 513, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 567, - "src": "9527:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 512, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9527:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 521, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 515, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "9545:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9545:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 517, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "9562:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "id": 518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delay", - "nodeType": "MemberAccess", - "referencedDeclaration": 1431, - "src": "9562:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9562:16:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 514, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "9538:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9538:41:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9527:52:0" - }, - { - "body": { - "id": 554, - "nodeType": "Block", - "src": "9640:132:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 535, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 507, - "src": "9669:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 536, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 101, - "src": "9669:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 538, - "indexExpression": { - "argumentTypes": null, - "id": 537, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 523, - "src": "9686:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9669:19:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 539, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 507, - "src": "9690:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 540, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 104, - "src": "9690:15:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 542, - "indexExpression": { - "argumentTypes": null, - "id": 541, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 523, - "src": "9706:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9690:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 543, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 507, - "src": "9710:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 544, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "9710:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 546, - "indexExpression": { - "argumentTypes": null, - "id": 545, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 523, - "src": "9730:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9710:22:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 547, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 507, - "src": "9734:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 548, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "9734:18:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 550, - "indexExpression": { - "argumentTypes": null, - "id": 549, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 523, - "src": "9753:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9734:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "id": 551, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 513, - "src": "9757:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 534, - "name": "_queueOrRevert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 610, - "src": "9654:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256)" - } - }, - "id": 552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9654:107:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 553, - "nodeType": "ExpressionStatement", - "src": "9654:107:0" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 526, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 523, - "src": "9606:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 527, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 507, - "src": "9610:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 528, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 101, - "src": "9610:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9610:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9606:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 555, - "initializationExpression": { - "assignments": [ - 523 - ], - "declarations": [ - { - "constant": false, - "id": 523, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 555, - "src": "9594:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 522, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9594:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 525, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 524, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9603:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9594:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9635:3:0", - "subExpression": { - "argumentTypes": null, - "id": 531, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 523, - "src": "9635:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 533, - "nodeType": "ExpressionStatement", - "src": "9635:3:0" - }, - "nodeType": "ForStatement", - "src": "9589:183:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 556, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 507, - "src": "9781:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 558, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "9781:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 559, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 513, - "src": "9796:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9781:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 561, - "nodeType": "ExpressionStatement", - "src": "9781:18:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 563, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 493, - "src": "9829:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 564, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 513, - "src": "9841:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 562, - "name": "ProposalQueued", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 215, - "src": "9814:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9814:31:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 566, - "nodeType": "EmitStatement", - "src": "9809:36:0" - } - ] - }, - "documentation": null, - "functionSelector": "ddf0b009", - "id": 568, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "queue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 494, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 493, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 568, - "src": "9304:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 492, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9304:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9303:17:0" - }, - "returnParameters": { - "id": 495, - "nodeType": "ParameterList", - "parameters": [], - "src": "9328:0:0" - }, - "scope": 1426, - "src": "9289:563:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 609, - "nodeType": "Block", - "src": "9973:253:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "9991:88:0", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 587, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 570, - "src": "10041:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 588, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 572, - "src": "10049:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 589, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 574, - "src": "10056:9:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 590, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 576, - "src": "10067:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 591, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 578, - "src": "10073:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 585, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "10030:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10030:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10030:47:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 584, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "10020:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10020:58:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 582, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "9992:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "id": 583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queuedTransactions", - "nodeType": "MemberAccess", - "referencedDeclaration": 1446, - "src": "9992:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) view external returns (bool)" - } - }, - "id": 594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9992:87:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a5f71756575654f725265766572743a2070726f706f73616c20616374696f6e20616c72656164792071756575656420617420657461", - "id": 596, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10081:65:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_96bfb4d3cd67e4e2791cf52915c871fa3a3e4602c18783bf584f6b6218b46f08", - "typeString": "literal_string \"Governor::_queueOrRevert: proposal action already queued at eta\"" - }, - "value": "Governor::_queueOrRevert: proposal action already queued at eta" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_96bfb4d3cd67e4e2791cf52915c871fa3a3e4602c18783bf584f6b6218b46f08", - "typeString": "literal_string \"Governor::_queueOrRevert: proposal action already queued at eta\"" - } - ], - "id": 581, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "9983:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9983:164:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 598, - "nodeType": "ExpressionStatement", - "src": "9983:164:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 602, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 570, - "src": "10183:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 603, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 572, - "src": "10191:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 604, - "name": "signature", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 574, - "src": "10198:9:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 605, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 576, - "src": "10209:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 606, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 578, - "src": "10215:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 599, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "10157:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 1461, - "src": "10157:25:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10157:62:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 608, - "nodeType": "ExpressionStatement", - "src": "10157:62:0" - } - ] - }, - "documentation": null, - "id": 610, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_queueOrRevert", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 570, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 610, - "src": "9882:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 569, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9882:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 572, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 610, - "src": "9898:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 571, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9898:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 574, - "mutability": "mutable", - "name": "signature", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 610, - "src": "9910:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 573, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9910:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 576, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 610, - "src": "9935:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 575, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9935:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 578, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 610, - "src": "9954:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 577, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9954:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9881:82:0" - }, - "returnParameters": { - "id": 580, - "nodeType": "ParameterList", - "parameters": [], - "src": "9973:0:0" - }, - "scope": 1426, - "src": "9858:368:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 683, - "nodeType": "Block", - "src": "10281:512:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - }, - "id": 621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 617, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 612, - "src": "10305:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 616, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 946, - "src": "10299:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$145_$", - "typeString": "function (uint256) view returns (enum Governor.ProposalState)" - } - }, - "id": 618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10299:17:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 619, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "10320:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 620, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10320:20:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "src": "10299:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a657865637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637574656420696620697420697320717565756564", - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10342:66:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_80ca5c395a00ae15baab003a02bebb17d94da67490eb78748d74515bcf186b1d", - "typeString": "literal_string \"Governor::execute: proposal can only be executed if it is queued\"" - }, - "value": "Governor::execute: proposal can only be executed if it is queued" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_80ca5c395a00ae15baab003a02bebb17d94da67490eb78748d74515bcf186b1d", - "typeString": "literal_string \"Governor::execute: proposal can only be executed if it is queued\"" - } - ], - "id": 615, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10291:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10291:118:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 624, - "nodeType": "ExpressionStatement", - "src": "10291:118:0" - }, - { - "assignments": [ - 626 - ], - "declarations": [ - { - "constant": false, - "id": 626, - "mutability": "mutable", - "name": "proposal", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 683, - "src": "10419:25:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 625, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 129, - "src": "10419:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 630, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 627, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "10447:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal storage ref)" - } - }, - "id": 629, - "indexExpression": { - "argumentTypes": null, - "id": 628, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 612, - "src": "10457:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10447:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage", - "typeString": "struct Governor.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10419:49:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 631, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "10478:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 633, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 122, - "src": "10478:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 634, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10498:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10478:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 636, - "nodeType": "ExpressionStatement", - "src": "10478:24:0" - }, - { - "body": { - "id": 677, - "nodeType": "Block", - "src": "10563:181:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 657, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "10632:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 658, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 101, - "src": "10632:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 660, - "indexExpression": { - "argumentTypes": null, - "id": 659, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 638, - "src": "10649:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10632:19:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 661, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "10653:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 662, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 104, - "src": "10653:15:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 664, - "indexExpression": { - "argumentTypes": null, - "id": 663, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 638, - "src": "10669:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10653:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 665, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "10673:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 666, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "10673:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 668, - "indexExpression": { - "argumentTypes": null, - "id": 667, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 638, - "src": "10693:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10673:22:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 669, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "10697:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 670, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "10697:18:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 672, - "indexExpression": { - "argumentTypes": null, - "id": 671, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 638, - "src": "10716:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10697:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 673, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "10720:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 674, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "10720:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 649, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "10577:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "id": 651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 1489, - "src": "10577:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 652, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "10612:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 653, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 104, - "src": "10612:15:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 655, - "indexExpression": { - "argumentTypes": null, - "id": 654, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 638, - "src": "10628:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10612:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "10577:54:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$value", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10577:156:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 676, - "nodeType": "ExpressionStatement", - "src": "10577:156:0" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 641, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 638, - "src": "10529:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 642, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "10533:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 643, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 101, - "src": "10533:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10533:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10529:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 678, - "initializationExpression": { - "assignments": [ - 638 - ], - "declarations": [ - { - "constant": false, - "id": 638, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 678, - "src": "10517:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 637, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10517:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 640, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 639, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10526:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10517:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10558:3:0", - "subExpression": { - "argumentTypes": null, - "id": 646, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 638, - "src": "10558:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 648, - "nodeType": "ExpressionStatement", - "src": "10558:3:0" - }, - "nodeType": "ForStatement", - "src": "10512:232:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 680, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 612, - "src": "10775:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 679, - "name": "ProposalExecuted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 220, - "src": "10758:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 681, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10758:28:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 682, - "nodeType": "EmitStatement", - "src": "10753:33:0" - } - ] - }, - "documentation": null, - "functionSelector": "fe0d94c1", - "id": 684, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "execute", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 613, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 612, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 684, - "src": "10249:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 611, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10249:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10248:17:0" - }, - "returnParameters": { - "id": 614, - "nodeType": "ParameterList", - "parameters": [], - "src": "10281:0:0" - }, - "scope": 1426, - "src": "10232:561:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 778, - "nodeType": "Block", - "src": "10839:701:0", - "statements": [ - { - "assignments": [ - 690 - ], - "declarations": [ - { - "constant": false, - "id": 690, - "mutability": "mutable", - "name": "currentState", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 778, - "src": "10849:26:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 689, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 145, - "src": "10849:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 694, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 692, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 686, - "src": "10884:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 691, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 946, - "src": "10878:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$145_$", - "typeString": "function (uint256) view returns (enum Governor.ProposalState)" - } - }, - "id": 693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10878:17:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10849:46:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - }, - "id": 699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 696, - "name": "currentState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 690, - "src": "10913:12:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 697, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "10929:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 698, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10929:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "src": "10913:38:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a63616e63656c3a2063616e6e6f742063616e63656c2065786563757465642070726f706f73616c", - "id": 700, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10953:51:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1a435c4fd3d9c1971d81b331b4a4c5e87295b57abb48007dd06a3236e95f3efa", - "typeString": "literal_string \"Governor::cancel: cannot cancel executed proposal\"" - }, - "value": "Governor::cancel: cannot cancel executed proposal" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1a435c4fd3d9c1971d81b331b4a4c5e87295b57abb48007dd06a3236e95f3efa", - "typeString": "literal_string \"Governor::cancel: cannot cancel executed proposal\"" - } - ], - "id": 695, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10905:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10905:100:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 702, - "nodeType": "ExpressionStatement", - "src": "10905:100:0" - }, - { - "assignments": [ - 704 - ], - "declarations": [ - { - "constant": false, - "id": 704, - "mutability": "mutable", - "name": "proposal", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 778, - "src": "11016:25:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 703, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 129, - "src": "11016:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 708, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 705, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "11044:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal storage ref)" - } - }, - "id": 707, - "indexExpression": { - "argumentTypes": null, - "id": 706, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 686, - "src": "11054:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11044:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage", - "typeString": "struct Governor.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11016:49:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 727, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 710, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "11083:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11083:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 712, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "11097:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "11083:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 716, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 704, - "src": "11129:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 717, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "proposer", - "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "11129:17:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 719, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "11155:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11155:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 721, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11169:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 718, - "name": "sub256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1329, - "src": "11148:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11148:23:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 714, - "name": "dclm8", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "11109:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "id": 715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 1499, - "src": "11109:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint96_$", - "typeString": "function (address,uint256) view external returns (uint96)" - } - }, - "id": 723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11109:63:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 724, - "name": "proposalThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "11175:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11175:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11109:85:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11083:111:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a63616e63656c3a2070726f706f7365722061626f7665207468726573686f6c64", - "id": 728, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11196:44:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_db225cdbdb9fe5623b978240184d35549f945a3aac592446efbca91ebb6b26ef", - "typeString": "literal_string \"Governor::cancel: proposer above threshold\"" - }, - "value": "Governor::cancel: proposer above threshold" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_db225cdbdb9fe5623b978240184d35549f945a3aac592446efbca91ebb6b26ef", - "typeString": "literal_string \"Governor::cancel: proposer above threshold\"" - } - ], - "id": 709, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11075:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 729, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11075:166:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 730, - "nodeType": "ExpressionStatement", - "src": "11075:166:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 735, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 731, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 704, - "src": "11252:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 733, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 120, - "src": "11252:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11272:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "11252:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 736, - "nodeType": "ExpressionStatement", - "src": "11252:24:0" - }, - { - "body": { - "id": 772, - "nodeType": "Block", - "src": "11337:153:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 752, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 704, - "src": "11378:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 101, - "src": "11378:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 755, - "indexExpression": { - "argumentTypes": null, - "id": 754, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 738, - "src": "11395:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11378:19:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 756, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 704, - "src": "11399:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 757, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 104, - "src": "11399:15:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 759, - "indexExpression": { - "argumentTypes": null, - "id": 758, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 738, - "src": "11415:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11399:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 760, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 704, - "src": "11419:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 761, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "11419:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 763, - "indexExpression": { - "argumentTypes": null, - "id": 762, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 738, - "src": "11439:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11419:22:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 764, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 704, - "src": "11443:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 765, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "11443:18:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 767, - "indexExpression": { - "argumentTypes": null, - "id": 766, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 738, - "src": "11462:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11443:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 768, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 704, - "src": "11466:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 769, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "11466:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 749, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "11351:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "id": 751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "cancelTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 1474, - "src": "11351:26:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external" - } - }, - "id": 770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11351:128:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 771, - "nodeType": "ExpressionStatement", - "src": "11351:128:0" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 741, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 738, - "src": "11303:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 742, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 704, - "src": "11307:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 743, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 101, - "src": "11307:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11307:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11303:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 773, - "initializationExpression": { - "assignments": [ - 738 - ], - "declarations": [ - { - "constant": false, - "id": 738, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 773, - "src": "11291:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 737, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11291:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 740, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 739, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11300:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "11291:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "11332:3:0", - "subExpression": { - "argumentTypes": null, - "id": 746, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 738, - "src": "11332:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 748, - "nodeType": "ExpressionStatement", - "src": "11332:3:0" - }, - "nodeType": "ForStatement", - "src": "11286:204:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 775, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 686, - "src": "11522:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 774, - "name": "ProposalCanceled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "11505:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11505:28:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 777, - "nodeType": "EmitStatement", - "src": "11500:33:0" - } - ] - }, - "documentation": null, - "functionSelector": "40e58ee5", - "id": 779, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "cancel", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 687, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 686, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 779, - "src": "10815:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 685, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10815:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10814:17:0" - }, - "returnParameters": { - "id": 688, - "nodeType": "ParameterList", - "parameters": [], - "src": "10839:0:0" - }, - "scope": 1426, - "src": "10799:741:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 812, - "nodeType": "Block", - "src": "11706:124:0", - "statements": [ - { - "assignments": [ - 797 - ], - "declarations": [ - { - "constant": false, - "id": 797, - "mutability": "mutable", - "name": "p", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 812, - "src": "11716:18:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 796, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 129, - "src": "11716:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 801, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 798, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "11737:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal storage ref)" - } - }, - "id": 800, - "indexExpression": { - "argumentTypes": null, - "id": 799, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "11747:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11737:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage", - "typeString": "struct Governor.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11716:42:0" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 802, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "11776:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 803, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "targets", - "nodeType": "MemberAccess", - "referencedDeclaration": 101, - "src": "11776:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 804, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "11787:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 805, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "values", - "nodeType": "MemberAccess", - "referencedDeclaration": 104, - "src": "11787:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 806, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "11797:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 807, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signatures", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "11797:12:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 808, - "name": "p", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "11811:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 809, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "calldatas", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "11811:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - } - ], - "id": 810, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11775:48:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_array$_t_address_$dyn_storage_$_t_array$_t_uint256_$dyn_storage_$_t_array$_t_string_storage_$dyn_storage_$_t_array$_t_bytes_storage_$dyn_storage_$", - "typeString": "tuple(address[] storage ref,uint256[] storage ref,string storage ref[] storage ref,bytes storage ref[] storage ref)" - } - }, - "functionReturnParameters": 795, - "id": 811, - "nodeType": "Return", - "src": "11768:55:0" - } - ] - }, - "documentation": null, - "functionSelector": "328dd982", - "id": 813, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getActions", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 781, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 813, - "src": "11566:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 780, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11566:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11565:17:0" - }, - "returnParameters": { - "id": 795, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 785, - "mutability": "mutable", - "name": "targets", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 813, - "src": "11604:24:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 783, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11604:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 784, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11604:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 788, - "mutability": "mutable", - "name": "values", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 813, - "src": "11630:20:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 786, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11630:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 787, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11630:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 791, - "mutability": "mutable", - "name": "signatures", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 813, - "src": "11652:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_ptr_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 789, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11652:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 790, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11652:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 794, - "mutability": "mutable", - "name": "calldatas", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 813, - "src": "11680:24:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 792, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11680:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 793, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11680:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11603:102:0" - }, - "scope": 1426, - "src": "11546:284:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 829, - "nodeType": "Block", - "src": "11925:61:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 822, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "11942:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal storage ref)" - } - }, - "id": 824, - "indexExpression": { - "argumentTypes": null, - "id": 823, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 815, - "src": "11952:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11942:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage", - "typeString": "struct Governor.Proposal storage ref" - } - }, - "id": 825, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 128, - "src": "11942:30:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$136_storage_$", - "typeString": "mapping(address => struct Governor.Receipt storage ref)" - } - }, - "id": 827, - "indexExpression": { - "argumentTypes": null, - "id": 826, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 817, - "src": "11973:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11942:37:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage", - "typeString": "struct Governor.Receipt storage ref" - } - }, - "functionReturnParameters": 821, - "id": 828, - "nodeType": "Return", - "src": "11935:44:0" - } - ] - }, - "documentation": null, - "functionSelector": "e23a9a52", - "id": 830, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getReceipt", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 818, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 815, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 830, - "src": "11856:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 814, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11856:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 817, - "mutability": "mutable", - "name": "voter", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 830, - "src": "11873:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 816, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11873:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11855:32:0" - }, - "returnParameters": { - "id": 821, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 820, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 830, - "src": "11909:14:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_memory_ptr", - "typeString": "struct Governor.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 819, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 136, - "src": "11909:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage_ptr", - "typeString": "struct Governor.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11908:16:0" - }, - "scope": 1426, - "src": "11836:150:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 842, - "nodeType": "Block", - "src": "12069:57:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 837, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "12086:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal storage ref)" - } - }, - "id": 839, - "indexExpression": { - "argumentTypes": null, - "id": 838, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 832, - "src": "12096:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12086:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage", - "typeString": "struct Governor.Proposal storage ref" - } - }, - "id": 840, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "description", - "nodeType": "MemberAccess", - "referencedDeclaration": 124, - "src": "12086:33:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 836, - "id": 841, - "nodeType": "Return", - "src": "12079:40:0" - } - ] - }, - "documentation": null, - "functionSelector": "4925ec55", - "id": 843, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getDescription", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 833, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 832, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 843, - "src": "12016:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 831, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12016:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12015:17:0" - }, - "returnParameters": { - "id": 836, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 835, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 843, - "src": "12054:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 834, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "12054:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12053:15:0" - }, - "scope": 1426, - "src": "11992:134:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 945, - "nodeType": "Block", - "src": "12200:952:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 857, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 851, - "name": "proposalCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "12218:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 852, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "12235:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12218:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 854, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "12249:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 855, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12262:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12249:14:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12218:45:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a73746174653a20696e76616c69642070726f706f73616c206964", - "id": 858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12265:38:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5eb7cb64a1b1700c37a1c544d147fdb92d0277ab33e0e8db4a05aab913e9fc6c", - "typeString": "literal_string \"Governor::state: invalid proposal id\"" - }, - "value": "Governor::state: invalid proposal id" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5eb7cb64a1b1700c37a1c544d147fdb92d0277ab33e0e8db4a05aab913e9fc6c", - "typeString": "literal_string \"Governor::state: invalid proposal id\"" - } - ], - "id": 850, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12210:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12210:94:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 860, - "nodeType": "ExpressionStatement", - "src": "12210:94:0" - }, - { - "assignments": [ - 862 - ], - "declarations": [ - { - "constant": false, - "id": 862, - "mutability": "mutable", - "name": "proposal", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 945, - "src": "12314:25:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 861, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 129, - "src": "12314:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 866, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 863, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "12342:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal storage ref)" - } - }, - "id": 865, - "indexExpression": { - "argumentTypes": null, - "id": 864, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 845, - "src": "12352:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12342:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage", - "typeString": "struct Governor.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12314:49:0" - }, - { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 867, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 862, - "src": "12377:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 868, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": 120, - "src": "12377:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 873, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "12460:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12460:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 875, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 862, - "src": "12476:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 876, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 112, - "src": "12476:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12460:35:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 882, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "12560:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12560:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 884, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 862, - "src": "12576:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 885, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "endBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 114, - "src": "12576:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12560:33:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 895, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 891, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 862, - "src": "12657:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 892, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 116, - "src": "12657:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 893, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 862, - "src": "12678:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 894, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 118, - "src": "12678:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12657:42:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 896, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 862, - "src": "12703:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 897, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 116, - "src": "12703:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 898, - "name": "quorumVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "12723:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12723:13:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12703:33:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12657:79:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 906, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 862, - "src": "12802:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 907, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "12802:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 908, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12818:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12802:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 914, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 862, - "src": "12886:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 915, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "executed", - "nodeType": "MemberAccess", - "referencedDeclaration": 122, - "src": "12886:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 920, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "12969:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12969:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 923, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 862, - "src": "12995:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 924, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "eta", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "12995:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 925, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "13009:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "id": 926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "GRACE_PERIOD", - "nodeType": "MemberAccess", - "referencedDeclaration": 1436, - "src": "13009:21:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", - "typeString": "function () view external returns (uint256)" - } - }, - "id": 927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13009:23:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 922, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "12988:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12988:45:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12969:64:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 937, - "nodeType": "Block", - "src": "13094:52:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 934, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "13115:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Queued", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13115:20:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "functionReturnParameters": 849, - "id": 936, - "nodeType": "Return", - "src": "13108:27:0" - } - ] - }, - "id": 938, - "nodeType": "IfStatement", - "src": "12965:181:0", - "trueBody": { - "id": 933, - "nodeType": "Block", - "src": "13035:53:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 930, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "13056:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 931, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Expired", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13056:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "functionReturnParameters": 849, - "id": 932, - "nodeType": "Return", - "src": "13049:28:0" - } - ] - } - }, - "id": 939, - "nodeType": "IfStatement", - "src": "12882:264:0", - "trueBody": { - "id": 919, - "nodeType": "Block", - "src": "12905:54:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 916, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "12926:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 917, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Executed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12926:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "functionReturnParameters": 849, - "id": 918, - "nodeType": "Return", - "src": "12919:29:0" - } - ] - } - }, - "id": 940, - "nodeType": "IfStatement", - "src": "12798:348:0", - "trueBody": { - "id": 913, - "nodeType": "Block", - "src": "12821:55:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 910, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "12842:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 911, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Succeeded", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12842:23:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "functionReturnParameters": 849, - "id": 912, - "nodeType": "Return", - "src": "12835:30:0" - } - ] - } - }, - "id": 941, - "nodeType": "IfStatement", - "src": "12653:493:0", - "trueBody": { - "id": 905, - "nodeType": "Block", - "src": "12738:54:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 902, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "12759:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Defeated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12759:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "functionReturnParameters": 849, - "id": 904, - "nodeType": "Return", - "src": "12752:29:0" - } - ] - } - }, - "id": 942, - "nodeType": "IfStatement", - "src": "12556:590:0", - "trueBody": { - "id": 890, - "nodeType": "Block", - "src": "12595:52:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 887, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "12616:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12616:20:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "functionReturnParameters": 849, - "id": 889, - "nodeType": "Return", - "src": "12609:27:0" - } - ] - } - }, - "id": 943, - "nodeType": "IfStatement", - "src": "12456:690:0", - "trueBody": { - "id": 881, - "nodeType": "Block", - "src": "12497:53:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 878, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "12518:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 879, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Pending", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12518:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "functionReturnParameters": 849, - "id": 880, - "nodeType": "Return", - "src": "12511:28:0" - } - ] - } - }, - "id": 944, - "nodeType": "IfStatement", - "src": "12373:773:0", - "trueBody": { - "id": 872, - "nodeType": "Block", - "src": "12396:54:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 869, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "12417:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 870, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Canceled", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12417:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "functionReturnParameters": 849, - "id": 871, - "nodeType": "Return", - "src": "12410:29:0" - } - ] - } - } - ] - }, - "documentation": null, - "functionSelector": "3e4f49e6", - "id": 946, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "state", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 846, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 845, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 946, - "src": "12147:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 844, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12147:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12146:17:0" - }, - "returnParameters": { - "id": 849, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 848, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 946, - "src": "12185:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - }, - "typeName": { - "contractScope": null, - "id": 847, - "name": "ProposalState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 145, - "src": "12185:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12184:15:0" - }, - "scope": 1426, - "src": "12132:1020:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 963, - "nodeType": "Block", - "src": "13228:73:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 956, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "13255:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13255:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 958, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 948, - "src": "13267:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 959, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 950, - "src": "13279:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 960, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 952, - "src": "13288:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 955, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1183, - "src": "13245:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint96_$returns$__$", - "typeString": "function (address,uint256,bool,uint96)" - } - }, - "id": 961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13245:49:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 954, - "id": 962, - "nodeType": "Return", - "src": "13238:56:0" - } - ] - }, - "documentation": null, - "functionSelector": "dbfa977f", - "id": 964, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVote", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 953, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 948, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 964, - "src": "13176:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 947, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "13176:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 950, - "mutability": "mutable", - "name": "support", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 964, - "src": "13193:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 949, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13193:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 952, - "mutability": "mutable", - "name": "votes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 964, - "src": "13207:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 951, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "13207:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13175:45:0" - }, - "returnParameters": { - "id": 954, - "nodeType": "ParameterList", - "parameters": [], - "src": "13228:0:0" - }, - "scope": 1426, - "src": "13158:143:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1048, - "nodeType": "Block", - "src": "13413:528:0", - "statements": [ - { - "assignments": [ - 980 - ], - "declarations": [ - { - "constant": false, - "id": 980, - "mutability": "mutable", - "name": "domainSeparator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1048, - "src": "13423:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 979, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13423:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 999, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 984, - "name": "DOMAIN_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 161, - "src": "13470:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 988, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "13503:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 987, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13497:5:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", - "typeString": "type(bytes storage pointer)" - }, - "typeName": { - "id": 986, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13497:5:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13497:11:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 985, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "13487:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 990, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13487:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 991, - "name": "getChainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1425, - "src": "13511:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$", - "typeString": "function () pure returns (uint256)" - } - }, - "id": 992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13511:12:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 995, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "13533:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Governor_$1426", - "typeString": "contract Governor" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Governor_$1426", - "typeString": "contract Governor" - } - ], - "id": 994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13525:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 993, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13525:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13525:13:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 982, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "13459:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 983, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13459:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13459:80:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 981, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "13449:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13449:91:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13423:117:0" - }, - { - "assignments": [ - 1001 - ], - "declarations": [ - { - "constant": false, - "id": 1001, - "mutability": "mutable", - "name": "structHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1048, - "src": "13550:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1000, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13550:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1010, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1005, - "name": "BALLOT_TYPEHASH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "13592:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1006, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 966, - "src": "13609:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1007, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "13621:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "expression": { - "argumentTypes": null, - "id": 1003, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "13581:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13581:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13581:48:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1002, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "13571:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13571:59:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13550:80:0" - }, - { - "assignments": [ - 1012 - ], - "declarations": [ - { - "constant": false, - "id": 1012, - "mutability": "mutable", - "name": "digest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1048, - "src": "13640:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1011, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13640:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1021, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "1901", - "id": 1016, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13684:10:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - "value": "\u0019\u0001" - }, - { - "argumentTypes": null, - "id": 1017, - "name": "domainSeparator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 980, - "src": "13696:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1018, - "name": "structHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1001, - "src": "13713:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", - "typeString": "literal_string \"\u0019\u0001\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 1014, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "13667:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1015, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13667:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13667:57:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1013, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "13657:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13657:68:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13640:85:0" - }, - { - "assignments": [ - 1023 - ], - "declarations": [ - { - "constant": false, - "id": 1023, - "mutability": "mutable", - "name": "signatory", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1048, - "src": "13735:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1022, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13735:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1030, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1025, - "name": "digest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1012, - "src": "13765:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1026, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 970, - "src": "13773:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 1027, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 972, - "src": "13776:1:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1028, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 974, - "src": "13779:1:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1024, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -6, - "src": "13755:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", - "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" - } - }, - "id": 1029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13755:26:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13735:46:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1032, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "13799:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1035, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13820:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1034, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13812:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1033, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13812:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1036, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13812:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "13799:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a63617374566f746542795369673a20696e76616c6964207369676e6174757265", - "id": 1038, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13824:44:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fa1dc9275024123d23fb8f8146d32b2d75a1a7ecfab3302a80ea7f906115ac48", - "typeString": "literal_string \"Governor::castVoteBySig: invalid signature\"" - }, - "value": "Governor::castVoteBySig: invalid signature" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fa1dc9275024123d23fb8f8146d32b2d75a1a7ecfab3302a80ea7f906115ac48", - "typeString": "literal_string \"Governor::castVoteBySig: invalid signature\"" - } - ], - "id": 1031, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "13791:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13791:78:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1040, - "nodeType": "ExpressionStatement", - "src": "13791:78:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1042, - "name": "signatory", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "13896:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1043, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 966, - "src": "13907:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1044, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "13919:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1045, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 976, - "src": "13928:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 1041, - "name": "_castVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1183, - "src": "13886:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint96_$returns$__$", - "typeString": "function (address,uint256,bool,uint96)" - } - }, - "id": 1046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13886:48:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 978, - "id": 1047, - "nodeType": "Return", - "src": "13879:55:0" - } - ] - }, - "documentation": null, - "functionSelector": "5d254608", - "id": 1049, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "castVoteBySig", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 977, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 966, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1049, - "src": "13330:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 965, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "13330:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 968, - "mutability": "mutable", - "name": "support", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1049, - "src": "13347:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 967, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13347:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 970, - "mutability": "mutable", - "name": "v", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1049, - "src": "13361:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 969, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "13361:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 972, - "mutability": "mutable", - "name": "r", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1049, - "src": "13370:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 971, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13370:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 974, - "mutability": "mutable", - "name": "s", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1049, - "src": "13381:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 973, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13381:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 976, - "mutability": "mutable", - "name": "votes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1049, - "src": "13392:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 975, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "13392:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13329:76:0" - }, - "returnParameters": { - "id": 978, - "nodeType": "ParameterList", - "parameters": [], - "src": "13413:0:0" - }, - "scope": 1426, - "src": "13307:634:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1182, - "nodeType": "Block", - "src": "14035:1111:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - }, - "id": 1066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1062, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1053, - "src": "14059:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1061, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 946, - "src": "14053:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_enum$_ProposalState_$145_$", - "typeString": "function (uint256) view returns (enum Governor.ProposalState)" - } - }, - "id": 1063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14053:17:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1064, - "name": "ProposalState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "14074:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ProposalState_$145_$", - "typeString": "type(enum Governor.ProposalState)" - } - }, - "id": 1065, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Active", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14074:20:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ProposalState_$145", - "typeString": "enum Governor.ProposalState" - } - }, - "src": "14053:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a5f63617374566f74653a20766f74696e6720697320636c6f736564", - "id": 1067, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14096:39:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f160ae2c92057497b900e47f19054148a4ab3899a01bb791d94927f929f41f4b", - "typeString": "literal_string \"Governor::_castVote: voting is closed\"" - }, - "value": "Governor::_castVote: voting is closed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f160ae2c92057497b900e47f19054148a4ab3899a01bb791d94927f929f41f4b", - "typeString": "literal_string \"Governor::_castVote: voting is closed\"" - } - ], - "id": 1060, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14045:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1068, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14045:91:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1069, - "nodeType": "ExpressionStatement", - "src": "14045:91:0" - }, - { - "assignments": [ - 1071 - ], - "declarations": [ - { - "constant": false, - "id": 1071, - "mutability": "mutable", - "name": "proposal", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1182, - "src": "14146:25:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - }, - "typeName": { - "contractScope": null, - "id": 1070, - "name": "Proposal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 129, - "src": "14146:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1075, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1072, - "name": "proposals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "14174:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Proposal_$129_storage_$", - "typeString": "mapping(uint256 => struct Governor.Proposal storage ref)" - } - }, - "id": 1074, - "indexExpression": { - "argumentTypes": null, - "id": 1073, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1053, - "src": "14184:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14174:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage", - "typeString": "struct Governor.Proposal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14146:49:0" - }, - { - "assignments": [ - 1077 - ], - "declarations": [ - { - "constant": false, - "id": 1077, - "mutability": "mutable", - "name": "receipt", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1182, - "src": "14205:23:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage_ptr", - "typeString": "struct Governor.Receipt" - }, - "typeName": { - "contractScope": null, - "id": 1076, - "name": "Receipt", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 136, - "src": "14205:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage_ptr", - "typeString": "struct Governor.Receipt" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1082, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1078, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1071, - "src": "14231:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 1079, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "receipts", - "nodeType": "MemberAccess", - "referencedDeclaration": 128, - "src": "14231:17:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Receipt_$136_storage_$", - "typeString": "mapping(address => struct Governor.Receipt storage ref)" - } - }, - "id": 1081, - "indexExpression": { - "argumentTypes": null, - "id": 1080, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1051, - "src": "14249:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14231:24:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage", - "typeString": "struct Governor.Receipt storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14205:50:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1084, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1077, - "src": "14273:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage_ptr", - "typeString": "struct Governor.Receipt storage pointer" - } - }, - "id": 1085, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "14273:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1086, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14293:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "14273:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a5f63617374566f74653a20766f74657220616c726561647920766f746564", - "id": 1088, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14300:42:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c8fddd97c795997fc11e5b90b3e66f53c96a2939f170e456768790275163879a", - "typeString": "literal_string \"Governor::_castVote: voter already voted\"" - }, - "value": "Governor::_castVote: voter already voted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c8fddd97c795997fc11e5b90b3e66f53c96a2939f170e456768790275163879a", - "typeString": "literal_string \"Governor::_castVote: voter already voted\"" - } - ], - "id": 1083, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14265:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14265:78:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1090, - "nodeType": "ExpressionStatement", - "src": "14265:78:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 1094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1092, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1057, - "src": "14361:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1093, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14369:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "14361:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a5f63617374566f74653a206e6f20656c696769626c6520766f746573207072696f7220746f2070726f706f73616c20737461727420626c6f636b", - "id": 1095, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14372:70:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_14d0dcca47a8473a8f0f5e7512ad3b7fb93dff8f3076e7ae4d2d8c1541058d2e", - "typeString": "literal_string \"Governor::_castVote: no eligible votes prior to proposal start block\"" - }, - "value": "Governor::_castVote: no eligible votes prior to proposal start block" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_14d0dcca47a8473a8f0f5e7512ad3b7fb93dff8f3076e7ae4d2d8c1541058d2e", - "typeString": "literal_string \"Governor::_castVote: no eligible votes prior to proposal start block\"" - } - ], - "id": 1091, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14353:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14353:90:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1097, - "nodeType": "ExpressionStatement", - "src": "14353:90:0" - }, - { - "assignments": [ - 1099 - ], - "declarations": [ - { - "constant": false, - "id": 1099, - "mutability": "mutable", - "name": "eligibleVotes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1182, - "src": "14453:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1098, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14453:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1109, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 1108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1102, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1051, - "src": "14496:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1103, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1071, - "src": "14503:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 1104, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 112, - "src": "14503:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1100, - "name": "dclm8", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "14476:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPriorVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 1499, - "src": "14476:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint96_$", - "typeString": "function (address,uint256) view external returns (uint96)" - } - }, - "id": 1105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14476:47:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1106, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1077, - "src": "14526:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage_ptr", - "typeString": "struct Governor.Receipt storage pointer" - } - }, - "id": 1107, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 135, - "src": "14526:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "14476:63:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14453:86:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "id": 1113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1111, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1057, - "src": "14557:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 1112, - "name": "eligibleVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1099, - "src": "14566:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "14557:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a5f63617374566f74653a20766f746573206578636565647320656c696769626c6520616d6f756e74", - "id": 1114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14581:52:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_75d0cf779e3f259ecd650d43d7f4126936ea15be1db9a15246caab70ba4556ef", - "typeString": "literal_string \"Governor::_castVote: votes exceeds eligible amount\"" - }, - "value": "Governor::_castVote: votes exceeds eligible amount" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_75d0cf779e3f259ecd650d43d7f4126936ea15be1db9a15246caab70ba4556ef", - "typeString": "literal_string \"Governor::_castVote: votes exceeds eligible amount\"" - } - ], - "id": 1110, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14549:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14549:85:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1116, - "nodeType": "ExpressionStatement", - "src": "14549:85:0" - }, - { - "assignments": [ - 1118 - ], - "declarations": [ - { - "constant": false, - "id": 1118, - "mutability": "mutable", - "name": "quadraticVote", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1182, - "src": "14645:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1117, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14645:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1125, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1122, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1057, - "src": "14680:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 1121, - "name": "sqrt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1413, - "src": "14675:4:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) pure returns (uint256)" - } - }, - "id": 1123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14675:11:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1120, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14668:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint96_$", - "typeString": "type(uint96)" - }, - "typeName": { - "id": 1119, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14668:6:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14668:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14645:42:0" - }, - { - "condition": { - "argumentTypes": null, - "id": 1126, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1055, - "src": "14702:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1148, - "nodeType": "Block", - "src": "14802:93:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1138, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1071, - "src": "14816:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 1140, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 118, - "src": "14816:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1142, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1071, - "src": "14847:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 1143, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "againstVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 118, - "src": "14847:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1144, - "name": "quadraticVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1118, - "src": "14870:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 1141, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "14840:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14840:44:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14816:68:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1147, - "nodeType": "ExpressionStatement", - "src": "14816:68:0" - } - ] - }, - "id": 1149, - "nodeType": "IfStatement", - "src": "14698:197:0", - "trueBody": { - "id": 1137, - "nodeType": "Block", - "src": "14711:85:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1127, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1071, - "src": "14725:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 1129, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 116, - "src": "14725:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1131, - "name": "proposal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1071, - "src": "14752:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Proposal_$129_storage_ptr", - "typeString": "struct Governor.Proposal storage pointer" - } - }, - "id": 1132, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "forVotes", - "nodeType": "MemberAccess", - "referencedDeclaration": 116, - "src": "14752:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1133, - "name": "quadraticVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1118, - "src": "14771:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 1130, - "name": "add256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "14745:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1134, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14745:40:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14725:60:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1136, - "nodeType": "ExpressionStatement", - "src": "14725:60:0" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1153, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1051, - "src": "14951:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1154, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1057, - "src": "14958:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "expression": { - "argumentTypes": null, - "id": 1150, - "name": "dclm8", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "14939:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Dclm8Interface_$1524", - "typeString": "contract Dclm8Interface" - } - }, - "id": 1152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_burn", - "nodeType": "MemberAccess", - "referencedDeclaration": 1523, - "src": "14939:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint96_$returns$__$", - "typeString": "function (address,uint96) external" - } - }, - "id": 1155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14939:25:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1156, - "nodeType": "ExpressionStatement", - "src": "14939:25:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1157, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1077, - "src": "14975:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage_ptr", - "typeString": "struct Governor.Receipt storage pointer" - } - }, - "id": 1159, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "hasVoted", - "nodeType": "MemberAccess", - "referencedDeclaration": 131, - "src": "14975:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14994:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "14975:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1162, - "nodeType": "ExpressionStatement", - "src": "14975:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1163, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1077, - "src": "15008:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage_ptr", - "typeString": "struct Governor.Receipt storage pointer" - } - }, - "id": 1165, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "support", - "nodeType": "MemberAccess", - "referencedDeclaration": 133, - "src": "15008:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1166, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1055, - "src": "15026:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "15008:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1168, - "nodeType": "ExpressionStatement", - "src": "15008:25:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1169, - "name": "receipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1077, - "src": "15043:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Receipt_$136_storage_ptr", - "typeString": "struct Governor.Receipt storage pointer" - } - }, - "id": 1171, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "votes", - "nodeType": "MemberAccess", - "referencedDeclaration": 135, - "src": "15043:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1172, - "name": "quadraticVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1118, - "src": "15059:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "src": "15043:29:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "id": 1174, - "nodeType": "ExpressionStatement", - "src": "15043:29:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1176, - "name": "voter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1051, - "src": "15097:5:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1177, - "name": "proposalId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1053, - "src": "15104:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1178, - "name": "support", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1055, - "src": "15116:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1179, - "name": "quadraticVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1118, - "src": "15125:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - ], - "id": 1175, - "name": "VoteCast", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 203, - "src": "15088:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,bool,uint256)" - } - }, - "id": 1180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15088:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1181, - "nodeType": "EmitStatement", - "src": "15083:56:0" - } - ] - }, - "documentation": null, - "id": 1183, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_castVote", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1058, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1051, - "mutability": "mutable", - "name": "voter", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1183, - "src": "13966:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1050, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13966:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1053, - "mutability": "mutable", - "name": "proposalId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1183, - "src": "13981:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1052, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "13981:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1055, - "mutability": "mutable", - "name": "support", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1183, - "src": "13998:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1054, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13998:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1057, - "mutability": "mutable", - "name": "votes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1183, - "src": "14012:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1056, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "14012:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13965:60:0" - }, - "returnParameters": { - "id": 1059, - "nodeType": "ParameterList", - "parameters": [], - "src": "14035:0:0" - }, - "scope": 1426, - "src": "13947:1199:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1199, - "nodeType": "Block", - "src": "15184:136:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1187, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15202:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15202:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1189, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "15216:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15202:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a5f5f61636365707441646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 1191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15226:54:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a863165b3913b0f05b8d3fd7868a9b9cf46bb895145d85784ac0108136df92ed", - "typeString": "literal_string \"Governor::__acceptAdmin: sender must be gov guardian\"" - }, - "value": "Governor::__acceptAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a863165b3913b0f05b8d3fd7868a9b9cf46bb895145d85784ac0108136df92ed", - "typeString": "literal_string \"Governor::__acceptAdmin: sender must be gov guardian\"" - } - ], - "id": 1186, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15194:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15194:87:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1193, - "nodeType": "ExpressionStatement", - "src": "15194:87:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 1194, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "15291:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "id": 1196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "acceptAdmin", - "nodeType": "MemberAccess", - "referencedDeclaration": 1439, - "src": "15291:20:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", - "typeString": "function () external" - } - }, - "id": 1197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15291:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1198, - "nodeType": "ExpressionStatement", - "src": "15291:22:0" - } - ] - }, - "documentation": null, - "functionSelector": "b9a61961", - "id": 1200, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__acceptAdmin", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1184, - "nodeType": "ParameterList", - "parameters": [], - "src": "15174:2:0" - }, - "returnParameters": { - "id": 1185, - "nodeType": "ParameterList", - "parameters": [], - "src": "15184:0:0" - }, - "scope": 1426, - "src": "15152:168:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1218, - "nodeType": "Block", - "src": "15355:132:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1204, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15373:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15373:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1206, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "15387:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15373:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a5f5f61626469636174653a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 1208, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15397:51:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_920579b34ecb505165c6d876e481fad8009c6d9324d8fd6e0896c5de30006aad", - "typeString": "literal_string \"Governor::__abdicate: sender must be gov guardian\"" - }, - "value": "Governor::__abdicate: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_920579b34ecb505165c6d876e481fad8009c6d9324d8fd6e0896c5de30006aad", - "typeString": "literal_string \"Governor::__abdicate: sender must be gov guardian\"" - } - ], - "id": 1203, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15365:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15365:84:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1210, - "nodeType": "ExpressionStatement", - "src": "15365:84:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1211, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "15459:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1214, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15478:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1213, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15470:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1212, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15470:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1215, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15470:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "15459:21:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1217, - "nodeType": "ExpressionStatement", - "src": "15459:21:0" - } - ] - }, - "documentation": null, - "functionSelector": "760fbc13", - "id": 1219, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__abdicate", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1201, - "nodeType": "ParameterList", - "parameters": [], - "src": "15345:2:0" - }, - "returnParameters": { - "id": 1202, - "nodeType": "ParameterList", - "parameters": [], - "src": "15355:0:0" - }, - "scope": 1426, - "src": "15326:161:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1250, - "nodeType": "Block", - "src": "15575:240:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1227, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15593:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15593:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1229, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "15607:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15593:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a5f5f717565756553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 1231, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15617:71:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0fbea3258988d2a95f7aba7b7f07081aca23fb0f7d7deb3794c4d1914b6d0bdd", - "typeString": "literal_string \"Governor::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "Governor::__queueSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0fbea3258988d2a95f7aba7b7f07081aca23fb0f7d7deb3794c4d1914b6d0bdd", - "typeString": "literal_string \"Governor::__queueSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 1226, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15585:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15585:104:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1233, - "nodeType": "ExpressionStatement", - "src": "15585:104:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1239, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "15733:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - ], - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "15725:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1237, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15725:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15725:17:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 1241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15744:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 1242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15747:26:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1245, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1221, - "src": "15786:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1243, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "15775:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1244, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15775:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15775:27:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 1247, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1223, - "src": "15804:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1234, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "15699:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "id": 1236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "queueTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 1461, - "src": "15699:25:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) external returns (bytes32)" - } - }, - "id": 1248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15699:109:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1249, - "nodeType": "ExpressionStatement", - "src": "15699:109:0" - } - ] - }, - "documentation": null, - "functionSelector": "91500671", - "id": 1251, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__queueSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1224, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1221, - "mutability": "mutable", - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1251, - "src": "15533:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1220, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15533:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1223, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1251, - "src": "15558:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1222, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15558:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15532:35:0" - }, - "returnParameters": { - "id": 1225, - "nodeType": "ParameterList", - "parameters": [], - "src": "15575:0:0" - }, - "scope": 1426, - "src": "15493:322:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1282, - "nodeType": "Block", - "src": "15905:244:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1259, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15923:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15923:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1261, - "name": "guardian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "15937:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15923:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "476f7665726e6f723a3a5f5f6578656375746553657454696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f7620677561726469616e", - "id": 1263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15947:73:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3a977e977596eb1a7160202329cc99c0482b4fd8df81879128fce2cc089886f8", - "typeString": "literal_string \"Governor::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - }, - "value": "Governor::__executeSetTimelockPendingAdmin: sender must be gov guardian" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3a977e977596eb1a7160202329cc99c0482b4fd8df81879128fce2cc089886f8", - "typeString": "literal_string \"Governor::__executeSetTimelockPendingAdmin: sender must be gov guardian\"" - } - ], - "id": 1258, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15915:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15915:106:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1265, - "nodeType": "ExpressionStatement", - "src": "15915:106:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1271, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "16067:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - ], - "id": 1270, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16059:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1269, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16059:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16059:17:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 1273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16078:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "73657450656e64696e6741646d696e286164647265737329", - "id": 1274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16081:26:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - "value": "setPendingAdmin(address)" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1277, - "name": "newPendingAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1253, - "src": "16120:15:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1275, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "16109:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1276, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16109:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16109:27:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 1279, - "name": "eta", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1255, - "src": "16138:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_stringliteral_4dd18bf55ce7f29dcfaf98cdd1107659d19d0be3b61dbef73e05ac221f0e8e28", - "typeString": "literal_string \"setPendingAdmin(address)\"" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1266, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "16031:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_TimelockInterface_$1490", - "typeString": "contract TimelockInterface" - } - }, - "id": 1268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "executeTransaction", - "nodeType": "MemberAccess", - "referencedDeclaration": 1489, - "src": "16031:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,uint256,string memory,bytes memory,uint256) payable external returns (bytes memory)" - } - }, - "id": 1280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16031:111:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 1281, - "nodeType": "ExpressionStatement", - "src": "16031:111:0" - } - ] - }, - "documentation": null, - "functionSelector": "21f43e42", - "id": 1283, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "__executeSetTimelockPendingAdmin", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1256, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1253, - "mutability": "mutable", - "name": "newPendingAdmin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1283, - "src": "15863:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1252, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15863:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1255, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1283, - "src": "15888:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1254, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15888:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15862:35:0" - }, - "returnParameters": { - "id": 1257, - "nodeType": "ParameterList", - "parameters": [], - "src": "15905:0:0" - }, - "scope": 1426, - "src": "15821:328:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1307, - "nodeType": "Block", - "src": "16222:95:0", - "statements": [ - { - "assignments": [ - 1293 - ], - "declarations": [ - { - "constant": false, - "id": 1293, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1307, - "src": "16232:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1292, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16232:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1297, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1294, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1285, - "src": "16241:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1295, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1287, - "src": "16245:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16241:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16232:14:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1299, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1293, - "src": "16264:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1300, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1285, - "src": "16269:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16264:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6164646974696f6e206f766572666c6f77", - "id": 1302, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16272:19:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - }, - "value": "addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8c0d96e929759368d857f737222dcb6a5217a09dbc29c3e61addc531fdea00f5", - "typeString": "literal_string \"addition overflow\"" - } - ], - "id": 1298, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "16256:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16256:36:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1304, - "nodeType": "ExpressionStatement", - "src": "16256:36:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1305, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1293, - "src": "16309:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1291, - "id": 1306, - "nodeType": "Return", - "src": "16302:8:0" - } - ] - }, - "documentation": null, - "id": 1308, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add256", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1288, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1285, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1308, - "src": "16171:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1284, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16171:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1287, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1308, - "src": "16182:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1286, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16182:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16170:22:0" - }, - "returnParameters": { - "id": 1291, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1290, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1308, - "src": "16216:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1289, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16216:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16215:6:0" - }, - "scope": 1426, - "src": "16155:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1328, - "nodeType": "Block", - "src": "16390:79:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1318, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1312, - "src": "16408:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 1319, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1310, - "src": "16413:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16408:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "7375627472616374696f6e20756e646572666c6f77", - "id": 1321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16416:23:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - }, - "value": "subtraction underflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f22f6b3017af2aff30fb71d5e8f8adc6cd3022431e6fc88c01d6d8b2adb30f31", - "typeString": "literal_string \"subtraction underflow\"" - } - ], - "id": 1317, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "16400:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16400:40:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1323, - "nodeType": "ExpressionStatement", - "src": "16400:40:0" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1324, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1310, - "src": "16457:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1325, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1312, - "src": "16461:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16457:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1316, - "id": 1327, - "nodeType": "Return", - "src": "16450:12:0" - } - ] - }, - "documentation": null, - "id": 1329, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub256", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1313, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1310, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1329, - "src": "16339:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1309, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16339:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1312, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1329, - "src": "16350:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1311, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16350:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16338:22:0" - }, - "returnParameters": { - "id": 1316, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1315, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1329, - "src": "16384:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1314, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16384:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16383:6:0" - }, - "scope": 1426, - "src": "16323:146:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1344, - "nodeType": "Block", - "src": "16545:54:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1339, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1331, - "src": "16567:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1340, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1333, - "src": "16570:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "6469766973696f6e206279207a65726f", - "id": 1341, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16573:18:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cd3c10b55907e48338737379efe9c37ec6c722ac546c8c49bdc1df7e91509535", - "typeString": "literal_string \"division by zero\"" - }, - "value": "division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_cd3c10b55907e48338737379efe9c37ec6c722ac546c8c49bdc1df7e91509535", - "typeString": "literal_string \"division by zero\"" - } - ], - "id": 1338, - "name": "_div", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1372, - "src": "16562:4:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16562:30:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1337, - "id": 1343, - "nodeType": "Return", - "src": "16555:37:0" - } - ] - }, - "documentation": null, - "id": 1345, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div256", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1334, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1331, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1345, - "src": "16491:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1330, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16491:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1333, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1345, - "src": "16502:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1332, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16502:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16490:22:0" - }, - "returnParameters": { - "id": 1337, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1336, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1345, - "src": "16536:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1335, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16536:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16535:9:0" - }, - "scope": 1426, - "src": "16475:124:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1371, - "nodeType": "Block", - "src": "16701:90:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1357, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1349, - "src": "16719:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1358, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16723:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "16719:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 1360, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1351, - "src": "16726:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1356, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "16711:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16711:28:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1362, - "nodeType": "ExpressionStatement", - "src": "16711:28:0" - }, - { - "assignments": [ - 1364 - ], - "declarations": [ - { - "constant": false, - "id": 1364, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1371, - "src": "16749:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1363, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16749:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1368, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1365, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1347, - "src": "16761:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 1366, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1349, - "src": "16765:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16761:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16749:17:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1369, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1364, - "src": "16783:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1355, - "id": 1370, - "nodeType": "Return", - "src": "16776:8:0" - } - ] - }, - "documentation": null, - "id": 1372, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_div", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1352, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1347, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1372, - "src": "16619:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1346, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16619:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1349, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1372, - "src": "16630:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1348, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16630:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1351, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1372, - "src": "16641:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1350, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16641:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16618:50:0" - }, - "returnParameters": { - "id": 1355, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1354, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1372, - "src": "16692:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1353, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16692:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16691:9:0" - }, - "scope": 1426, - "src": "16605:186:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1412, - "nodeType": "Block", - "src": "16850:138:0", - "statements": [ - { - "assignments": [ - 1380 - ], - "declarations": [ - { - "constant": false, - "id": 1380, - "mutability": "mutable", - "name": "z", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1412, - "src": "16860:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1379, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16860:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1387, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1381, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1374, - "src": "16870:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 1382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16874:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "16870:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 1384, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "16869:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1385, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16879:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "16869:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16860:20:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1388, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1377, - "src": "16890:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1389, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1374, - "src": "16894:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16890:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1391, - "nodeType": "ExpressionStatement", - "src": "16890:5:0" - }, - { - "body": { - "id": 1410, - "nodeType": "Block", - "src": "16919:63:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1395, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1377, - "src": "16933:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1396, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1380, - "src": "16937:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16933:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1398, - "nodeType": "ExpressionStatement", - "src": "16933:5:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1399, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1380, - "src": "16952:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1400, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1374, - "src": "16957:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 1401, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1380, - "src": "16961:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16957:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1403, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1380, - "src": "16965:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16957:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 1405, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "16956:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1406, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16970:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "16956:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16952:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1409, - "nodeType": "ExpressionStatement", - "src": "16952:19:0" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1392, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1380, - "src": "16912:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1393, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1377, - "src": "16916:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16912:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1411, - "nodeType": "WhileStatement", - "src": "16905:77:0" - } - ] - }, - "documentation": null, - "id": 1413, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sqrt", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1375, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1374, - "mutability": "mutable", - "name": "x", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1413, - "src": "16811:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1373, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16811:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16810:8:0" - }, - "returnParameters": { - "id": 1378, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1377, - "mutability": "mutable", - "name": "y", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1413, - "src": "16842:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1376, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16842:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16841:8:0" - }, - "scope": 1426, - "src": "16797:191:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 1424, - "nodeType": "Block", - "src": "17045:95:0", - "statements": [ - { - "assignments": [ - 1419 - ], - "declarations": [ - { - "constant": false, - "id": 1419, - "mutability": "mutable", - "name": "chainId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1424, - "src": "17055:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1418, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17055:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1420, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "17055:12:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "17086:24:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "17088:20:0", - "value": { - "arguments": [], - "functionName": { - "name": "chainid", - "nodeType": "YulIdentifier", - "src": "17099:7:0" - }, - "nodeType": "YulFunctionCall", - "src": "17099:9:0" - }, - "variableNames": [ - { - "name": "chainId", - "nodeType": "YulIdentifier", - "src": "17088:7:0" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 1419, - "isOffset": false, - "isSlot": false, - "src": "17088:7:0", - "valueSize": 1 - } - ], - "id": 1421, - "nodeType": "InlineAssembly", - "src": "17077:33:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1422, - "name": "chainId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "17126:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1417, - "id": 1423, - "nodeType": "Return", - "src": "17119:14:0" - } - ] - }, - "documentation": null, - "id": 1425, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getChainId", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1414, - "nodeType": "ParameterList", - "parameters": [], - "src": "17013:2:0" - }, - "returnParameters": { - "id": 1417, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1416, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1425, - "src": "17039:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1415, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17039:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17038:6:0" - }, - "scope": 1426, - "src": "16994:146:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 1525, - "src": "1764:15378:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 1490, - "linearizedBaseContracts": [ - 1490 - ], - "name": "TimelockInterface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "functionSelector": "6a42b8f8", - "id": 1431, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "delay", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1427, - "nodeType": "ParameterList", - "parameters": [], - "src": "17192:2:0" - }, - "returnParameters": { - "id": 1430, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1429, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1431, - "src": "17218:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1428, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17218:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17217:6:0" - }, - "scope": 1490, - "src": "17178:46:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "c1a287e2", - "id": 1436, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "GRACE_PERIOD", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1432, - "nodeType": "ParameterList", - "parameters": [], - "src": "17250:2:0" - }, - "returnParameters": { - "id": 1435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1434, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1436, - "src": "17276:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1433, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17276:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17275:6:0" - }, - "scope": 1490, - "src": "17229:53:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "0e18b681", - "id": 1439, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "acceptAdmin", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1437, - "nodeType": "ParameterList", - "parameters": [], - "src": "17307:2:0" - }, - "returnParameters": { - "id": 1438, - "nodeType": "ParameterList", - "parameters": [], - "src": "17318:0:0" - }, - "scope": 1490, - "src": "17287:32:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "f2b06537", - "id": 1446, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queuedTransactions", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1442, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1441, - "mutability": "mutable", - "name": "hash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1446, - "src": "17352:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1440, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17352:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17351:14:0" - }, - "returnParameters": { - "id": 1445, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1444, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1446, - "src": "17389:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1443, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17389:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17388:6:0" - }, - "scope": 1490, - "src": "17324:71:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "3a66f901", - "id": 1461, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "queueTransaction", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1457, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1448, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1461, - "src": "17426:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1447, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17426:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1450, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1461, - "src": "17442:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1449, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17442:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1452, - "mutability": "mutable", - "name": "signature", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1461, - "src": "17454:25:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1451, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "17454:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1454, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1461, - "src": "17481:19:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1453, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17481:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1456, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1461, - "src": "17502:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1455, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17502:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17425:86:0" - }, - "returnParameters": { - "id": 1460, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1459, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1461, - "src": "17530:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1458, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17530:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17529:9:0" - }, - "scope": 1490, - "src": "17400:139:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "591fcdfe", - "id": 1474, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "cancelTransaction", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1472, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1463, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1474, - "src": "17571:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1462, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17571:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1465, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1474, - "src": "17587:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1464, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17587:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1467, - "mutability": "mutable", - "name": "signature", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1474, - "src": "17599:25:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1466, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "17599:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1469, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1474, - "src": "17626:19:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1468, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17626:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1471, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1474, - "src": "17647:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1470, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17647:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17570:86:0" - }, - "returnParameters": { - "id": 1473, - "nodeType": "ParameterList", - "parameters": [], - "src": "17665:0:0" - }, - "scope": 1490, - "src": "17544:122:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "0825f38f", - "id": 1489, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "executeTransaction", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1485, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1476, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1489, - "src": "17699:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1475, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17699:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1478, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1489, - "src": "17715:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1477, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17715:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1480, - "mutability": "mutable", - "name": "signature", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1489, - "src": "17727:25:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1479, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "17727:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1482, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1489, - "src": "17754:19:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1481, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17754:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1484, - "mutability": "mutable", - "name": "eta", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1489, - "src": "17775:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1483, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17775:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17698:86:0" - }, - "returnParameters": { - "id": 1488, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1487, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1489, - "src": "17811:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1486, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "17811:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17810:14:0" - }, - "scope": 1490, - "src": "17671:154:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 1525, - "src": "17144:683:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 1524, - "linearizedBaseContracts": [ - 1524 - ], - "name": "Dclm8Interface", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "functionSelector": "782d6fe1", - "id": 1499, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPriorVotes", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1495, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1492, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1499, - "src": "17883:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1491, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17883:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1494, - "mutability": "mutable", - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1499, - "src": "17900:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1493, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17900:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17882:35:0" - }, - "returnParameters": { - "id": 1498, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1497, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1499, - "src": "17941:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1496, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "17941:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17940:8:0" - }, - "scope": 1524, - "src": "17860:89:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "c4e41b22", - "id": 1504, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getTotalSupply", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1500, - "nodeType": "ParameterList", - "parameters": [], - "src": "17977:2:0" - }, - "returnParameters": { - "id": 1503, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1502, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1504, - "src": "18003:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1501, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18003:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18002:6:0" - }, - "scope": 1524, - "src": "17954:55:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "70a08231", - "id": 1511, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1507, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1506, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1511, - "src": "18033:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1505, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18033:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18032:17:0" - }, - "returnParameters": { - "id": 1510, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1509, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1511, - "src": "18073:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1508, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18073:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18072:6:0" - }, - "scope": 1524, - "src": "18014:65:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "ae80d9de", - "id": 1516, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getInitialHolder", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1512, - "nodeType": "ParameterList", - "parameters": [], - "src": "18109:2:0" - }, - "returnParameters": { - "id": 1515, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1514, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1516, - "src": "18135:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1513, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18135:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18134:9:0" - }, - "scope": 1524, - "src": "18084:60:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "72d3ee9e", - "id": 1523, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "_burn", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1521, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1518, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1523, - "src": "18164:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1517, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18164:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1520, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1523, - "src": "18181:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - }, - "typeName": { - "id": 1519, - "name": "uint96", - "nodeType": "ElementaryTypeName", - "src": "18181:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint96", - "typeString": "uint96" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18163:32:0" - }, - "returnParameters": { - "id": 1522, - "nodeType": "ParameterList", - "parameters": [], - "src": "18204:0:0" - }, - "scope": 1524, - "src": "18149:56:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 1525, - "src": "17829:378:0" - } - ], - "src": "0:18208:0" - }, - "id": 0 - } - } - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json deleted file mode 100644 index 07c4586b93..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json +++ /dev/null @@ -1,80594 +0,0 @@ -{ - "id": "9d9ab8dd72b8ab6c6c73fa902200adf9", - "_format": "hh-sol-build-info-1", - "solcVersion": "0.7.0", - "solcLongVersion": "0.7.0+commit.9e61f92b", - "input": { - "language": "Solidity", - "sources": { - "src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol": { - "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\";\n\ncontract NetEmissionsTokenNetwork is Initializable, ERC1155Upgradeable, AccessControlUpgradeable {\n\n using SafeMathUpgradeable for uint256;\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n bool public limitedMode; // disables some features like arbitrary token transfers and issuing without proposals\n address public admin; // address that has permission to register dealers, transfer in limitedMode, etc.\n address private timelock; // DAO contract that executes proposals to issue tokens after a successful vote\n\n // Generic dealer role for registering/unregistering consumers\n bytes32 public constant REGISTERED_DEALER =\n keccak256(\"REGISTERED_DEALER\");\n // Token type specific roles\n bytes32 public constant REGISTERED_REC_DEALER =\n keccak256(\"REGISTERED_REC_DEALER\");\n bytes32 public constant REGISTERED_OFFSET_DEALER =\n keccak256(\"REGISTERED_OFFSET_DEALER\");\n bytes32 public constant REGISTERED_EMISSIONS_AUDITOR =\n keccak256(\"REGISTERED_EMISSIONS_AUDITOR\");\n // Consumer role\n bytes32 public constant REGISTERED_CONSUMER =\n keccak256(\"REGISTERED_CONSUMER\");\n\n /**\n * @dev Structure of all tokens issued in this contract\n * tokenId - Auto-increments whenever new tokens are issued\n * tokenTypeId - Corresponds to the three token types:\n * 1 => Renewable Energy Certificate\n * 2 => Carbon Emissions Offset\n * 3 => Audited Emissions\n * issuer - Address of dealer issuing this token\n * issuee - Address of original issued recipient this token\n * fromDate - Unix timestamp\n * thruDate - Unix timestamp\n * dateCreated - Unix timestamp\n * automaticRetireDate - Unix timestamp\n */\n struct CarbonTokenDetails {\n uint256 tokenId;\n uint8 tokenTypeId;\n address issuer;\n address issuee;\n uint256 fromDate;\n uint256 thruDate;\n uint256 dateCreated;\n uint256 automaticRetireDate;\n string metadata;\n string manifest;\n string description;\n }\n\n // Counts number of unique token IDs (auto-incrementing)\n CountersUpgradeable.Counter private _numOfUniqueTokens;\n\n // Token metadata and retired balances\n mapping(uint256 => CarbonTokenDetails) private _tokenDetails;\n mapping(uint256 => mapping(address => uint256)) private _retiredBalances;\n\n // Events\n event TokenCreated(\n uint256 availableBalance,\n uint256 retiredBalance,\n uint256 tokenId,\n uint8 tokenTypeId,\n address indexed issuer,\n address indexed issuee,\n uint256 fromDate,\n uint256 thruDate,\n uint256 dateCreated,\n uint256 automaticRetireDate,\n string metadata,\n string manifest,\n string description\n );\n event TokenRetired(\n address indexed account,\n uint256 tokenId,\n uint256 amount\n );\n event RegisteredConsumer(address indexed account);\n event UnregisteredConsumer(address indexed account);\n event RegisteredDealer(address indexed account);\n event UnregisteredDealer(address indexed account);\n\n // Replaces constructor in OpenZeppelin Upgrades\n function initialize(address _admin) public initializer {\n\n __ERC1155_init(\"\");\n\n // Allow dealers to register consumers\n _setRoleAdmin(REGISTERED_CONSUMER, REGISTERED_DEALER);\n\n // Set-up admin\n _setupRole(DEFAULT_ADMIN_ROLE, _admin);\n _setupRole(REGISTERED_DEALER, _admin);\n _setupRole(REGISTERED_REC_DEALER, _admin);\n _setupRole(REGISTERED_OFFSET_DEALER, _admin);\n _setupRole(REGISTERED_EMISSIONS_AUDITOR, _admin);\n admin = _admin;\n\n // initialize\n timelock = address(0);\n\n limitedMode = false;\n }\n\n modifier consumerOrDealer() {\n bool isConsumer = hasRole(REGISTERED_CONSUMER, msg.sender);\n bool isRecDealer = hasRole(REGISTERED_REC_DEALER, msg.sender);\n bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, msg.sender);\n bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, msg.sender);\n\n require(\n isConsumer || isRecDealer || isCeoDealer || isAeDealer,\n \"CLM8::consumerOrDealer: msg.sender not a consumer or a dealer\"\n );\n\n _;\n }\n\n modifier onlyDealer() {\n bool isRecDealer = hasRole(REGISTERED_REC_DEALER, msg.sender);\n bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, msg.sender);\n bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, msg.sender);\n\n require(\n isRecDealer || isCeoDealer || isAeDealer,\n \"CLM8::onlyDealer: msg.sender not a dealer\"\n );\n _;\n }\n\n modifier onlyAdmin() {\n require(\n hasRole(DEFAULT_ADMIN_ROLE, msg.sender),\n \"CLM8::onlyAdmin: msg.sender not the admin\"\n );\n _;\n }\n\n /**\n * @dev returns true if the tokenId exists\n */\n function tokenExists(uint256 tokenId) private view returns (bool) {\n if (_numOfUniqueTokens.current() >= tokenId) return true;\n return false; // no matching tokenId\n }\n\n /**\n * @dev returns true if the tokenTypeId is valid\n */\n function tokenTypeIdIsValid(uint8 tokenTypeId) pure private returns (bool) {\n if ((tokenTypeId > 0) && (tokenTypeId <= 3)) {\n return true;\n }\n return false; // no matching tokenId\n }\n\n /**\n * @dev returns number of unique tokens\n */\n function getNumOfUniqueTokens() public view returns (uint256) {\n return _numOfUniqueTokens.current();\n }\n\n /**\n * @dev hook to prevent transfers from non-admin account if limitedMode is on\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n internal\n virtual\n override\n {\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n for (uint i = 0; i < ids.length; i++) {\n\n CarbonTokenDetails storage token = _tokenDetails[ids[i]];\n\n // disable most transfers if limitedMode is on\n if (limitedMode) {\n\n // allow retiring/burning one's tokens\n if (to == address(0)) {\n continue;\n }\n\n // for tokenType 1 and 2, only the timelock and DAO can transfer/issue\n // for tokenType 3, only emissions auditors can transfer/issue\n // (and they are automatically retired right after)\n if (token.tokenTypeId != 3) {\n require(\n operator == timelock || hasRole(DEFAULT_ADMIN_ROLE, operator),\n \"CLM8::_beforeTokenTransfer(limited): only admin and DAO can transfer tokens\"\n );\n } else {\n require(\n hasRole(REGISTERED_EMISSIONS_AUDITOR, operator),\n \"CLM8::_beforeTokenTransfer(limited): only emissions auditors can issue audited emissions\"\n );\n }\n }\n }\n }\n\n /**\n * @dev External function to mint an amount of a token\n * Only authorized dealer of associated token type can call this function\n * @param quantity of the token to mint For ex: if one needs 100 full tokens, the caller\n * should set the amount as (100 * 10^4) = 1,000,000 (assuming the token's decimals is set to 4)\n */\n function issue(\n address issuee,\n uint8 tokenTypeId,\n uint256 quantity,\n uint256 fromDate,\n uint256 thruDate,\n uint256 automaticRetireDate,\n string memory metadata,\n string memory manifest,\n string memory description\n ) public onlyDealer {\n return _issue(\n issuee,\n msg.sender,\n tokenTypeId,\n quantity,\n fromDate,\n thruDate,\n automaticRetireDate,\n metadata,\n manifest,\n description\n );\n }\n\n /**\n * @dev Issue function for DAO (on limited mode) or admin to manually pass issuer\n * Must be called from Timelock contract through a successful proposal\n * or by admin if limited mode is set to false\n */\n function issueOnBehalf(\n address issuee,\n address issuer,\n uint8 tokenTypeId,\n uint256 quantity,\n uint256 fromDate,\n uint256 thruDate,\n uint256 automaticRetireDate,\n string memory metadata,\n string memory manifest,\n string memory description\n ) public {\n\n require(\n (msg.sender == timelock) || hasRole(DEFAULT_ADMIN_ROLE, msg.sender),\n \"CLM8::issueOnBehalf: call must come from DAO or admin\"\n );\n\n return _issue(\n issuee,\n issuer,\n tokenTypeId,\n quantity,\n fromDate,\n thruDate,\n automaticRetireDate,\n metadata,\n manifest,\n description\n );\n }\n\n function _issue(\n address _issuee,\n address _issuer,\n uint8 _tokenTypeId,\n uint256 _quantity,\n uint256 _fromDate,\n uint256 _thruDate,\n uint256 _automaticRetireDate,\n string memory _metadata,\n string memory _manifest,\n string memory _description\n ) internal {\n\n require(\n tokenTypeIdIsValid(_tokenTypeId),\n \"CLM8::_issue: tokenTypeId is invalid\"\n );\n\n if (limitedMode) {\n if (_tokenTypeId == 1 || _tokenTypeId == 2 ) {\n require(\n msg.sender == timelock,\n \"CLM8::_issue(limited): msg.sender not timelock\"\n );\n require(\n hasRole(DEFAULT_ADMIN_ROLE, _issuee),\n \"CLM8::_issue(limited): issuee not admin\"\n );\n require(\n hasRole(REGISTERED_REC_DEALER, _issuer) || hasRole(REGISTERED_OFFSET_DEALER, _issuer),\n \"CLM8::_issue(limited): proposer not a registered dealer\"\n );\n } else if (_tokenTypeId == 3) {\n require(\n hasRole(REGISTERED_EMISSIONS_AUDITOR, _issuer),\n \"CLM8::_issue(limited): issuer not a registered emissions auditor\"\n );\n }\n } else {\n if (_tokenTypeId == 1) {\n require(\n hasRole(REGISTERED_REC_DEALER, _issuer),\n \"CLM8::_issue: issuer not a registered REC dealer\"\n );\n } else if (_tokenTypeId == 2) {\n require(\n hasRole(REGISTERED_OFFSET_DEALER, _issuer),\n \"CLM8::_issue: issuer not a registered offset dealer\"\n );\n } else if (_tokenTypeId == 3) {\n require(\n hasRole(REGISTERED_EMISSIONS_AUDITOR, _issuer),\n \"CLM8::_issue: issuer not a registered emissions auditor\"\n );\n }\n }\n\n // increment token identifier\n _numOfUniqueTokens.increment();\n\n // create token details\n CarbonTokenDetails storage tokenInfo = _tokenDetails[_numOfUniqueTokens.current()];\n\n tokenInfo.tokenId = _numOfUniqueTokens.current();\n tokenInfo.tokenTypeId = _tokenTypeId;\n tokenInfo.issuee = _issuee;\n tokenInfo.issuer = _issuer;\n tokenInfo.fromDate = _fromDate;\n tokenInfo.thruDate = _thruDate;\n tokenInfo.automaticRetireDate = _automaticRetireDate;\n tokenInfo.dateCreated = block.timestamp;\n tokenInfo.metadata = _metadata;\n tokenInfo.manifest = _manifest;\n tokenInfo.description = _description;\n\n super._mint(_issuee, _numOfUniqueTokens.current(), _quantity, \"\");\n\n // retire audited emissions on mint\n if (_tokenTypeId == 3) {\n super._burn(tokenInfo.issuee, tokenInfo.tokenId, _quantity);\n _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee] = _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee].add(_quantity);\n }\n\n // emit event with all token details and balances\n emit TokenCreated(\n _quantity,\n _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee],\n tokenInfo.tokenId,\n tokenInfo.tokenTypeId,\n tokenInfo.issuer,\n tokenInfo.issuee,\n tokenInfo.fromDate,\n tokenInfo.thruDate,\n tokenInfo.automaticRetireDate,\n tokenInfo.dateCreated,\n tokenInfo.metadata,\n tokenInfo.manifest,\n tokenInfo.description\n );\n }\n\n /**\n * @dev mints more of an existing token\n * @param to reciepient of token\n * @param tokenId token to mint more of\n * @param quantity amount to mint\n */\n function mint(address to, uint256 tokenId, uint256 quantity)\n external\n onlyAdmin\n {\n require(tokenExists(tokenId), \"CLM8::mint: tokenId does not exist\");\n require(!limitedMode, \"CLM8::mint: cannot mint new tokens in limited mode\");\n super._mint(to, tokenId, quantity, \"\");\n }\n\n /**\n * @dev returns the token name for the given token as a string value\n * @param tokenId token to check\n */\n function getTokenType(uint256 tokenId)\n external\n view\n returns (string memory)\n {\n require(tokenExists(tokenId), \"CLM8::getTokenType: tokenId does not exist\");\n CarbonTokenDetails storage token = _tokenDetails[tokenId];\n\n if (token.tokenTypeId == 1) {\n return \"Renewable Energy Certificate\";\n } else if (token.tokenTypeId == 2) {\n return \"Carbon Emissions Offset\";\n }\n return \"Audited Emissions\";\n\n }\n\n /**\n * @dev returns the retired amount on a token\n * @param tokenId token to check\n */\n function getTokenRetiredAmount(address account, uint256 tokenId)\n public\n view\n returns (uint256)\n {\n require(tokenExists(tokenId), \"CLM8::getTokenRetiredAmount: tokenId does not exist\");\n uint256 amount = _retiredBalances[tokenId][account];\n return amount;\n }\n\n /**\n * @dev sets the token to the retire state to disable transfers, mints and burns\n * @param tokenId token to set in pause state\n * Only contract owner can pause or resume tokens\n */\n function retire(\n uint256 tokenId,\n uint256 amount\n ) external consumerOrDealer {\n require(tokenExists(tokenId), \"CLM8::retire: tokenId does not exist\");\n require( (amount <= super.balanceOf(msg.sender, tokenId)), \"CLM8::retire: not enough available balance to retire\" );\n\n super._burn(msg.sender, tokenId, amount);\n _retiredBalances[tokenId][msg.sender] = _retiredBalances[tokenId][msg.sender].add(amount);\n emit TokenRetired(\n msg.sender,\n tokenId,\n amount\n );\n }\n\n /**\n * @dev returns true if Dealer's account is registered\n * @param account address of the dealer\n */\n function isDealerRegistered(address account) public view returns (bool) {\n bool isRecDealer = hasRole(REGISTERED_REC_DEALER, account);\n bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, account);\n bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, account);\n if (isRecDealer || isCeoDealer || isAeDealer) return true;\n return false;\n }\n\n /**\n * @dev returns true if Consumers's account is registered\n * @param account address of the dealer\n */\n function isConsumerRegistered(address account) public view returns (bool) {\n return hasRole(REGISTERED_CONSUMER, account);\n }\n\n /**\n * @dev returns true if Consumers's or Dealer's account is registered\n * @param account address of the consumer/dealer\n */\n function isDealerOrConsumer(address account) private view returns (bool) {\n return (isDealerRegistered(account) || isConsumerRegistered(account));\n }\n\n /**\n * @dev Helper function for returning tuple of bools of role membership\n * @param account address to check roles\n */\n function getRoles(address account) external view returns (bool, bool, bool, bool, bool) {\n bool isAdmin = hasRole(DEFAULT_ADMIN_ROLE, account);\n bool isRecDealer = hasRole(REGISTERED_REC_DEALER, account);\n bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, account);\n bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, account);\n bool isConsumer = hasRole(REGISTERED_CONSUMER, account);\n return (isAdmin, isRecDealer, isCeoDealer, isAeDealer, isConsumer);\n }\n\n /**\n * @dev Only contract owner can register Dealers\n * @param account address of the dealer to register\n * Only registered Dealers can transfer tokens\n */\n function registerDealer(address account, uint8 tokenTypeId)\n external\n onlyAdmin\n {\n require(tokenTypeIdIsValid(tokenTypeId), \"CLM8::registerDealer: tokenTypeId does not exist\");\n if (tokenTypeId == 1) {\n grantRole(REGISTERED_REC_DEALER, account);\n } else if (tokenTypeId == 2) {\n grantRole(REGISTERED_OFFSET_DEALER, account);\n } else {\n grantRole(REGISTERED_EMISSIONS_AUDITOR, account);\n }\n // Also grant generic dealer role for registering/unregistering consumers\n grantRole(REGISTERED_DEALER, account);\n emit RegisteredDealer(account);\n }\n\n /**\n * @dev returns true if Consumer's account is registered for the given token\n * @param account address of the consumer\n */\n function registerConsumer(address account) external onlyDealer {\n if (limitedMode) {\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \"CLM8::registerConsumer(limited): only admin can register consumers\");\n }\n grantRole(REGISTERED_CONSUMER, account);\n emit RegisteredConsumer(account);\n }\n\n /**\n * @dev Only contract owner can unregister Dealers\n * @param account address to be unregistered\n */\n function unregisterDealer(address account, uint8 tokenTypeId)\n external\n onlyAdmin\n {\n require(tokenTypeIdIsValid(tokenTypeId), \"CLM8::unregisterDealer: tokenTypeId does not exist\");\n if (tokenTypeId == 1) {\n super.revokeRole(REGISTERED_REC_DEALER, account);\n } else if (tokenTypeId == 2) {\n super.revokeRole(REGISTERED_OFFSET_DEALER, account);\n } else {\n super.revokeRole(REGISTERED_EMISSIONS_AUDITOR, account);\n }\n\n // If no longer a dealer of any token type, remove generic dealer role\n if (!isDealerRegistered(account)) {\n revokeRole(REGISTERED_DEALER, account);\n }\n\n emit UnregisteredDealer(account);\n }\n\n /**\n * @dev Only contract owner can unregister Consumers\n * @param account address to be unregistered\n */\n function unregisterConsumer(address account) external onlyDealer {\n if (limitedMode) {\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \"CLM8::unregisterConsumer(limited): only admin can unregister consumers\");\n }\n super.revokeRole(REGISTERED_CONSUMER, account);\n emit UnregisteredConsumer(account);\n }\n\n /**\n * @dev transfers the value to the 'to' account for tokenId\n * @param to recipient address\n * @param tokenId tokenId for the transfer\n * @param value amount of transfer\n * Transfer can start only when both parties are registered and the token is not paused\n * Note: Token holders can arbitrarily call safeTransferFrom() without these checks\n */\n function transfer(\n address to,\n uint256 tokenId,\n uint256 value\n ) external consumerOrDealer {\n require(tokenExists(tokenId), \"CLM8::transfer: tokenId does not exist\");\n require((msg.sender != to), \"CLM8::transfer: sender and receiver cannot be the same\");\n super.safeTransferFrom(msg.sender, to, tokenId, value, \"0x00\");\n }\n\n function setTimelock(\n address _timelock\n ) external onlyAdmin {\n timelock = _timelock;\n }\n\n function getAvailableAndRetired(address account, uint256 tokenId)\n external\n view\n returns (uint256, uint256)\n {\n uint256 available = super.balanceOf(account, tokenId);\n uint256 retired = this.getTokenRetiredAmount(account, tokenId);\n return (available, retired);\n }\n\n /**\n * @dev returns issuer of a given tokenId\n */\n function getIssuer(uint256 tokenId)\n external\n view\n returns (address)\n {\n return _tokenDetails[tokenId].issuer;\n }\n\n /**\n * @dev returns the details of a given tokenId, omitting holders\n * @param tokenId token to check\n */\n function getTokenDetails(uint256 tokenId)\n external\n view\n returns (CarbonTokenDetails memory)\n {\n return _tokenDetails[tokenId];\n }\n\n /**\n * @dev turns off or on limited mode\n * @param _limitedMode boolean value\n */\n function setLimitedMode(bool _limitedMode)\n external\n onlyAdmin\n {\n limitedMode = _limitedMode;\n }\n\n}\n" - }, - "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMathUpgradeable {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"SafeMath: subtraction overflow\");\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: modulo by zero\");\n return a % b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a % b;\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/EnumerableSetUpgradeable.sol\";\nimport \"../utils/AddressUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\n function __AccessControl_init() internal initializer {\n __Context_init_unchained();\n __AccessControl_init_unchained();\n }\n\n function __AccessControl_init_unchained() internal initializer {\n }\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\n using AddressUpgradeable for address;\n\n struct RoleData {\n EnumerableSetUpgradeable.AddressSet members;\n bytes32 adminRole;\n }\n\n mapping (bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view returns (bool) {\n return _roles[role].members.contains(account);\n }\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\n return _roles[role].members.length();\n }\n\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\n return _roles[role].members.at(index);\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) public virtual {\n require(hasRole(_roles[role].adminRole, _msgSender()), \"AccessControl: sender must be an admin to grant\");\n\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) public virtual {\n require(hasRole(_roles[role].adminRole, _msgSender()), \"AccessControl: sender must be an admin to revoke\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) public virtual {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\n _roles[role].adminRole = adminRole;\n }\n\n function _grantRole(bytes32 role, address account) private {\n if (_roles[role].members.add(account)) {\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n function _revokeRole(bytes32 role, address account) private {\n if (_roles[role].members.remove(account)) {\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC1155Upgradeable.sol\";\nimport \"./IERC1155MetadataURIUpgradeable.sol\";\nimport \"./IERC1155ReceiverUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../introspection/ERC165Upgradeable.sol\";\nimport \"../../math/SafeMathUpgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../proxy/Initializable.sol\";\n\n/**\n *\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable {\n using SafeMathUpgradeable for uint256;\n using AddressUpgradeable for address;\n\n // Mapping from token ID to account balances\n mapping (uint256 => mapping(address => uint256)) private _balances;\n\n // Mapping from account to operator approvals\n mapping (address => mapping(address => bool)) private _operatorApprovals;\n\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n string private _uri;\n\n /*\n * bytes4(keccak256('balanceOf(address,uint256)')) == 0x00fdd58e\n * bytes4(keccak256('balanceOfBatch(address[],uint256[])')) == 0x4e1273f4\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,uint256,bytes)')) == 0xf242432a\n * bytes4(keccak256('safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)')) == 0x2eb2c2d6\n *\n * => 0x00fdd58e ^ 0x4e1273f4 ^ 0xa22cb465 ^\n * 0xe985e9c5 ^ 0xf242432a ^ 0x2eb2c2d6 == 0xd9b67a26\n */\n bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26;\n\n /*\n * bytes4(keccak256('uri(uint256)')) == 0x0e89341c\n */\n bytes4 private constant _INTERFACE_ID_ERC1155_METADATA_URI = 0x0e89341c;\n\n /**\n * @dev See {_setURI}.\n */\n function __ERC1155_init(string memory uri_) internal initializer {\n __Context_init_unchained();\n __ERC165_init_unchained();\n __ERC1155_init_unchained(uri_);\n }\n\n function __ERC1155_init_unchained(string memory uri_) internal initializer {\n _setURI(uri_);\n\n // register the supported interfaces to conform to ERC1155 via ERC165\n _registerInterface(_INTERFACE_ID_ERC1155);\n\n // register the supported interfaces to conform to ERC1155MetadataURI via ERC165\n _registerInterface(_INTERFACE_ID_ERC1155_METADATA_URI);\n }\n\n /**\n * @dev See {IERC1155MetadataURI-uri}.\n *\n * This implementation returns the same URI for *all* token types. It relies\n * on the token type ID substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * Clients calling this function must replace the `\\{id\\}` substring with the\n * actual token type ID.\n */\n function uri(uint256) external view virtual override returns (string memory) {\n return _uri;\n }\n\n /**\n * @dev See {IERC1155-balanceOf}.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n require(account != address(0), \"ERC1155: balance query for the zero address\");\n return _balances[id][account];\n }\n\n /**\n * @dev See {IERC1155-balanceOfBatch}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] memory accounts,\n uint256[] memory ids\n )\n public\n view\n virtual\n override\n returns (uint256[] memory)\n {\n require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n uint256[] memory batchBalances = new uint256[](accounts.length);\n\n for (uint256 i = 0; i < accounts.length; ++i) {\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\n }\n\n return batchBalances;\n }\n\n /**\n * @dev See {IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n require(_msgSender() != operator, \"ERC1155: setting approval status for self\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[account][operator];\n }\n\n /**\n * @dev See {IERC1155-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n )\n public\n virtual\n override\n {\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not owner nor approved\"\n );\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n _balances[id][from] = _balances[id][from].sub(amount, \"ERC1155: insufficient balance for transfer\");\n _balances[id][to] = _balances[id][to].add(amount);\n\n emit TransferSingle(operator, from, to, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n }\n\n /**\n * @dev See {IERC1155-safeBatchTransferFrom}.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n public\n virtual\n override\n {\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: transfer caller is not owner nor approved\"\n );\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n _balances[id][from] = _balances[id][from].sub(\n amount,\n \"ERC1155: insufficient balance for transfer\"\n );\n _balances[id][to] = _balances[id][to].add(amount);\n }\n\n emit TransferBatch(operator, from, to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n }\n\n /**\n * @dev Sets a new URI for all token types, by relying on the token type ID\n * substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n * URI or any of the amounts in the JSON file at said URI will be replaced by\n * clients with the token type ID.\n *\n * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n * interpreted by clients as\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n * for token type ID 0x4cce0.\n *\n * See {uri}.\n *\n * Because these URIs cannot be meaningfully represented by the {URI} event,\n * this function emits no events.\n */\n function _setURI(string memory newuri) internal virtual {\n _uri = newuri;\n }\n\n /**\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual {\n require(account != address(0), \"ERC1155: mint to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n _balances[id][account] = _balances[id][account].add(amount);\n emit TransferSingle(operator, address(0), account, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n for (uint i = 0; i < ids.length; i++) {\n _balances[ids[i]][to] = amounts[i].add(_balances[ids[i]][to]);\n }\n\n emit TransferBatch(operator, address(0), to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n }\n\n /**\n * @dev Destroys `amount` tokens of token type `id` from `account`\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens of token type `id`.\n */\n function _burn(address account, uint256 id, uint256 amount) internal virtual {\n require(account != address(0), \"ERC1155: burn from the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), \"\");\n\n _balances[id][account] = _balances[id][account].sub(\n amount,\n \"ERC1155: burn amount exceeds balance\"\n );\n\n emit TransferSingle(operator, account, address(0), id, amount);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n */\n function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual {\n require(account != address(0), \"ERC1155: burn from the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, account, address(0), ids, amounts, \"\");\n\n for (uint i = 0; i < ids.length; i++) {\n _balances[ids[i]][account] = _balances[ids[i]][account].sub(\n amounts[i],\n \"ERC1155: burn amount exceeds balance\"\n );\n }\n\n emit TransferBatch(operator, account, address(0), ids, amounts);\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `id` and `amount` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n internal\n virtual\n { }\n\n function _doSafeTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n )\n private\n {\n if (to.isContract()) {\n try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n if (response != IERC1155ReceiverUpgradeable(to).onERC1155Received.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n private\n {\n if (to.isContract()) {\n try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) {\n if (response != IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n\n return array;\n }\n uint256[47] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../math/SafeMathUpgradeable.sol\";\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\n * directly accessed.\n */\nlibrary CountersUpgradeable {\n using SafeMathUpgradeable for uint256;\n\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\n counter._value += 1;\n }\n\n function decrement(Counter storage counter) internal {\n counter._value = counter._value.sub(1);\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\n// solhint-disable-next-line compiler-version\npragma solidity >=0.4.24 <0.8.0;\n\nimport \"../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n */\nabstract contract Initializable {\n\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || _isConstructor() || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n\n /// @dev Returns true if and only if the function is running in the constructor\n function _isConstructor() private view returns (bool) {\n return !AddressUpgradeable.isContract(address(this));\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSetUpgradeable {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping (bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) { // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\n\n bytes32 lastvalue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastvalue;\n // Update the index for the moved value\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n require(set._values.length > index, \"EnumerableSet: index out of bounds\");\n return set._values[index];\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\nimport \"../proxy/Initializable.sol\";\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\n }\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"../../introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155Upgradeable is IERC165Upgradeable {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"./IERC1155Upgradeable.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable {\n /**\n * @dev Returns the URI for token type `id`.\n *\n * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n * clients with the actual token type ID.\n */\n function uri(uint256 id) external view returns (string memory);\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../introspection/IERC165Upgradeable.sol\";\n\n/**\n * _Available since v3.1._\n */\ninterface IERC1155ReceiverUpgradeable is IERC165Upgradeable {\n\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n )\n external\n returns(bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n )\n external\n returns(bytes4);\n}\n" - }, - "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../proxy/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts may inherit from this and call {_registerInterface} to declare\n * their support of an interface.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n /*\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\n */\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\n\n /**\n * @dev Mapping of interface ids to whether or not it's supported.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n function __ERC165_init() internal initializer {\n __ERC165_init_unchained();\n }\n\n function __ERC165_init_unchained() internal initializer {\n // Derived contracts need only register support for their own interfaces,\n // we register support for ERC165 itself here\n _registerInterface(_INTERFACE_ID_ERC165);\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n *\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n /**\n * @dev Registers the contract as an implementer of the interface defined by\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\n * registering its interface id is not required.\n *\n * See {IERC165-supportsInterface}.\n *\n * Requirements:\n *\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n */\n function _registerInterface(bytes4 interfaceId) internal virtual {\n require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n _supportedInterfaces[interfaceId] = true;\n }\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" - }, - "src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol": { - "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\";\n\n// V2 example file for testing upgrades\n// This is NOT up to date or a real upgrade of NetEmissionsTokenNetwork.sol\n\ncontract NetEmissionsTokenNetworkV2 is Initializable, ERC1155Upgradeable, AccessControlUpgradeable {\n\n using SafeMathUpgradeable for uint256;\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n bool public limitedMode; // disables some features like arbitrary token transfers and issuing without proposals\n address public admin; // address that has permission to register dealers, transfer in limitedMode, etc.\n address private timelock; // DAO contract that executes proposals to issue tokens after a successful vote\n\n // Generic dealer role for registering/unregistering consumers\n bytes32 public constant REGISTERED_DEALER =\n keccak256(\"REGISTERED_DEALER\");\n // Token type specific roles\n bytes32 public constant REGISTERED_REC_DEALER =\n keccak256(\"REGISTERED_REC_DEALER\");\n bytes32 public constant REGISTERED_OFFSET_DEALER =\n keccak256(\"REGISTERED_OFFSET_DEALER\");\n bytes32 public constant REGISTERED_EMISSIONS_AUDITOR =\n keccak256(\"REGISTERED_EMISSIONS_AUDITOR\");\n // Consumer role\n bytes32 public constant REGISTERED_CONSUMER =\n keccak256(\"REGISTERED_CONSUMER\");\n\n /**\n * @dev Structure of all tokens issued in this contract\n * tokenId - Auto-increments whenever new tokens are issued\n * tokenTypeId - Corresponds to the three token types:\n * 1 => Renewable Energy Certificate\n * 2 => Carbon Emissions Offset\n * 3 => Audited Emissions\n * issuer - Address of dealer issuing this token\n * issuee - Address of original issued recipient this token\n * fromDate - Unix timestamp\n * thruDate - Unix timestamp\n * dateCreated - Unix timestamp\n * automaticRetireDate - Unix timestamp\n */\n struct CarbonTokenDetails {\n uint256 tokenId;\n uint8 tokenTypeId;\n address issuer;\n address issuee;\n uint256 fromDate;\n uint256 thruDate;\n uint256 dateCreated;\n uint256 automaticRetireDate;\n string metadata;\n string manifest;\n string description;\n }\n\n // Counts number of unique token IDs (auto-incrementing)\n CountersUpgradeable.Counter private _numOfUniqueTokens;\n\n // Token metadata and retired balances\n mapping(uint256 => CarbonTokenDetails) private _tokenDetails;\n mapping(uint256 => mapping(address => uint256)) private _retiredBalances;\n\n address private newTestVariable;\n\n // Events\n event TokenCreated(\n uint256 availableBalance,\n uint256 retiredBalance,\n uint256 tokenId,\n uint8 tokenTypeId,\n address indexed issuer,\n address indexed issuee,\n uint256 fromDate,\n uint256 thruDate,\n uint256 dateCreated,\n uint256 automaticRetireDate,\n string metadata,\n string manifest,\n string description\n );\n event TokenRetired(\n address indexed account,\n uint256 tokenId,\n uint256 amount\n );\n event RegisteredConsumer(address indexed account);\n event UnregisteredConsumer(address indexed account);\n event RegisteredDealer(address indexed account);\n event UnregisteredDealer(address indexed account);\n\n // Replaces constructor in OpenZeppelin Upgrades\n function initialize(address _admin) public initializer {\n\n __ERC1155_init(\"\");\n\n // Allow dealers to register consumers\n _setRoleAdmin(REGISTERED_CONSUMER, REGISTERED_DEALER);\n\n // Set-up admin\n _setupRole(DEFAULT_ADMIN_ROLE, _admin);\n _setupRole(REGISTERED_DEALER, _admin);\n _setupRole(REGISTERED_REC_DEALER, _admin);\n _setupRole(REGISTERED_OFFSET_DEALER, _admin);\n _setupRole(REGISTERED_EMISSIONS_AUDITOR, _admin);\n admin = _admin;\n\n // initialize\n timelock = address(0);\n\n limitedMode = false;\n }\n\n modifier consumerOrDealer() {\n bool isConsumer = hasRole(REGISTERED_CONSUMER, msg.sender);\n bool isRecDealer = hasRole(REGISTERED_REC_DEALER, msg.sender);\n bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, msg.sender);\n bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, msg.sender);\n\n require(\n isConsumer || isRecDealer || isCeoDealer || isAeDealer,\n \"CLM8::consumerOrDealer: msg.sender not a consumer or a dealer\"\n );\n\n _;\n }\n\n modifier onlyDealer() {\n bool isRecDealer = hasRole(REGISTERED_REC_DEALER, msg.sender);\n bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, msg.sender);\n bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, msg.sender);\n\n require(\n isRecDealer || isCeoDealer || isAeDealer,\n \"CLM8::onlyDealer: msg.sender not a dealer\"\n );\n _;\n }\n\n modifier onlyAdmin() {\n require(\n hasRole(DEFAULT_ADMIN_ROLE, msg.sender),\n \"CLM8::onlyAdmin: msg.sender not the admin\"\n );\n _;\n }\n\n /**\n * @dev returns true if the tokenId exists\n */\n function tokenExists(uint256 tokenId) private view returns (bool) {\n if (_numOfUniqueTokens.current() >= tokenId) return true;\n return false; // no matching tokenId\n }\n\n /**\n * @dev returns true if the tokenTypeId is valid\n */\n function tokenTypeIdIsValid(uint8 tokenTypeId) pure private returns (bool) {\n if ((tokenTypeId > 0) && (tokenTypeId <= 3)) {\n return true;\n }\n return false; // no matching tokenId\n }\n\n /**\n * @dev returns number of unique tokens\n */\n function getNumOfUniqueTokens() public view returns (uint256) {\n return _numOfUniqueTokens.current();\n }\n\n /**\n * @dev hook to prevent transfers from non-admin account if limitedMode is on\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n )\n internal\n virtual\n override\n {\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n for (uint i = 0; i < ids.length; i++) {\n\n CarbonTokenDetails storage token = _tokenDetails[ids[i]];\n\n // disable most transfers if limitedMode is on\n if (limitedMode) {\n\n // allow retiring/burning one's tokens\n if (to == address(0)) {\n continue;\n }\n\n // for tokenType 1 and 2, only the timelock and DAO can transfer/issue\n // for tokenType 3, only emissions auditors can transfer/issue\n // (and they are automatically retired right after)\n if (token.tokenTypeId != 3) {\n require(\n operator == timelock || hasRole(DEFAULT_ADMIN_ROLE, operator),\n \"CLM8::_beforeTokenTransfer(limited): only admin and DAO can transfer tokens\"\n );\n } else {\n require(\n hasRole(REGISTERED_EMISSIONS_AUDITOR, operator),\n \"CLM8::_beforeTokenTransfer(limited): only emissions auditors can issue audited emissions\"\n );\n }\n }\n }\n }\n\n /**\n * @dev External function to mint an amount of a token\n * Only authorized dealer of associated token type can call this function\n * @param quantity of the token to mint For ex: if one needs 100 full tokens, the caller\n * should set the amount as (100 * 10^4) = 1,000,000 (assuming the token's decimals is set to 4)\n */\n function issue(\n address issuee,\n uint8 tokenTypeId,\n uint256 quantity,\n uint256 fromDate,\n uint256 thruDate,\n uint256 automaticRetireDate,\n string memory metadata,\n string memory manifest,\n string memory description\n ) public onlyDealer {\n return _issue(\n issuee,\n msg.sender,\n tokenTypeId,\n quantity,\n fromDate,\n thruDate,\n automaticRetireDate,\n metadata,\n manifest,\n description\n );\n }\n\n /**\n * @dev Issue function for DAO (on limited mode) or admin to manually pass issuer\n * Must be called from Timelock contract through a successful proposal\n * or by admin if limited mode is set to false\n */\n function issueOnBehalf(\n address issuee,\n address issuer,\n uint8 tokenTypeId,\n uint256 quantity,\n uint256 fromDate,\n uint256 thruDate,\n uint256 automaticRetireDate,\n string memory metadata,\n string memory manifest,\n string memory description\n ) public {\n\n require(\n (msg.sender == timelock) || hasRole(DEFAULT_ADMIN_ROLE, msg.sender),\n \"CLM8::issueOnBehalf: call must come from DAO or admin\"\n );\n\n return _issue(\n issuee,\n issuer,\n tokenTypeId,\n quantity,\n fromDate,\n thruDate,\n automaticRetireDate,\n metadata,\n manifest,\n description\n );\n }\n\n function _issue(\n address _issuee,\n address _issuer,\n uint8 _tokenTypeId,\n uint256 _quantity,\n uint256 _fromDate,\n uint256 _thruDate,\n uint256 _automaticRetireDate,\n string memory _metadata,\n string memory _manifest,\n string memory _description\n ) internal {\n\n require(\n tokenTypeIdIsValid(_tokenTypeId),\n \"CLM8::_issue: tokenTypeId is invalid\"\n );\n\n if (limitedMode) {\n if (_tokenTypeId == 1 || _tokenTypeId == 2 ) {\n require(\n msg.sender == timelock,\n \"CLM8::_issue(limited): msg.sender not timelock\"\n );\n require(\n hasRole(DEFAULT_ADMIN_ROLE, _issuee),\n \"CLM8::_issue(limited): issuee not admin\"\n );\n require(\n hasRole(REGISTERED_REC_DEALER, _issuer) || hasRole(REGISTERED_OFFSET_DEALER, _issuer),\n \"CLM8::_issue(limited): proposer not a registered dealer\"\n );\n } else if (_tokenTypeId == 3) {\n require(\n hasRole(REGISTERED_EMISSIONS_AUDITOR, _issuer),\n \"CLM8::_issue(limited): issuer not a registered emissions auditor\"\n );\n }\n } else {\n if (_tokenTypeId == 1) {\n require(\n hasRole(REGISTERED_REC_DEALER, _issuer),\n \"CLM8::_issue: issuer not a registered REC dealer\"\n );\n } else if (_tokenTypeId == 2) {\n require(\n hasRole(REGISTERED_OFFSET_DEALER, _issuer),\n \"CLM8::_issue: issuer not a registered offset dealer\"\n );\n } else if (_tokenTypeId == 3) {\n require(\n hasRole(REGISTERED_EMISSIONS_AUDITOR, _issuer),\n \"CLM8::_issue: issuer not a registered emissions auditor\"\n );\n }\n }\n\n // increment token identifier\n _numOfUniqueTokens.increment();\n\n // create token details\n CarbonTokenDetails storage tokenInfo = _tokenDetails[_numOfUniqueTokens.current()];\n\n tokenInfo.tokenId = _numOfUniqueTokens.current();\n tokenInfo.tokenTypeId = _tokenTypeId;\n tokenInfo.issuee = _issuee;\n tokenInfo.issuer = _issuer;\n tokenInfo.fromDate = _fromDate;\n tokenInfo.thruDate = _thruDate;\n tokenInfo.automaticRetireDate = _automaticRetireDate;\n tokenInfo.dateCreated = block.timestamp;\n tokenInfo.metadata = _metadata;\n tokenInfo.manifest = _manifest;\n tokenInfo.description = _description;\n\n super._mint(_issuee, _numOfUniqueTokens.current(), _quantity, \"\");\n\n // retire audited emissions on mint\n if (_tokenTypeId == 3) {\n super._burn(tokenInfo.issuee, tokenInfo.tokenId, _quantity);\n _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee] = _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee].add(_quantity);\n }\n\n // emit event with all token details and balances\n emit TokenCreated(\n _quantity,\n _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee],\n tokenInfo.tokenId,\n tokenInfo.tokenTypeId,\n tokenInfo.issuer,\n tokenInfo.issuee,\n tokenInfo.fromDate,\n tokenInfo.thruDate,\n tokenInfo.automaticRetireDate,\n tokenInfo.dateCreated,\n tokenInfo.metadata,\n tokenInfo.manifest,\n tokenInfo.description\n );\n }\n\n /**\n * @dev mints more of an existing token\n * @param to reciepient of token\n * @param tokenId token to mint more of\n * @param quantity amount to mint\n */\n function mint(address to, uint256 tokenId, uint256 quantity)\n external\n onlyAdmin\n {\n require(tokenExists(tokenId), \"CLM8::mint: tokenId does not exist\");\n require(!limitedMode, \"CLM8::mint: cannot mint new tokens in limited mode\");\n super._mint(to, tokenId, quantity, \"\");\n }\n\n /**\n * @dev returns the token name for the given token as a string value\n * @param tokenId token to check\n */\n function getTokenType(uint256 tokenId)\n external\n view\n returns (string memory)\n {\n require(tokenExists(tokenId), \"CLM8::getTokenType: tokenId does not exist\");\n CarbonTokenDetails storage token = _tokenDetails[tokenId];\n\n if (token.tokenTypeId == 1) {\n return \"Renewable Energy Certificate\";\n } else if (token.tokenTypeId == 2) {\n return \"Carbon Emissions Offset\";\n }\n return \"Audited Emissions\";\n\n }\n\n /**\n * @dev returns the retired amount on a token\n * @param tokenId token to check\n */\n function getTokenRetiredAmount(address account, uint256 tokenId)\n public\n view\n returns (uint256)\n {\n require(tokenExists(tokenId), \"CLM8::getTokenRetiredAmount: tokenId does not exist\");\n uint256 amount = _retiredBalances[tokenId][account];\n return amount;\n }\n\n /**\n * @dev sets the token to the retire state to disable transfers, mints and burns\n * @param tokenId token to set in pause state\n * Only contract owner can pause or resume tokens\n */\n function retire(\n uint256 tokenId,\n uint256 amount\n ) external consumerOrDealer {\n require(tokenExists(tokenId), \"CLM8::retire: tokenId does not exist\");\n require( (amount <= super.balanceOf(msg.sender, tokenId)), \"CLM8::retire: not enough available balance to retire\" );\n\n super._burn(msg.sender, tokenId, amount);\n _retiredBalances[tokenId][msg.sender] = _retiredBalances[tokenId][msg.sender].add(amount);\n emit TokenRetired(\n msg.sender,\n tokenId,\n amount\n );\n }\n\n /**\n * @dev returns true if Dealer's account is registered\n * @param account address of the dealer\n */\n function isDealerRegistered(address account) public view returns (bool) {\n bool isRecDealer = hasRole(REGISTERED_REC_DEALER, account);\n bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, account);\n bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, account);\n if (isRecDealer || isCeoDealer || isAeDealer) return true;\n return false;\n }\n\n /**\n * @dev returns true if Consumers's account is registered\n * @param account address of the dealer\n */\n function isConsumerRegistered(address account) public view returns (bool) {\n return hasRole(REGISTERED_CONSUMER, account);\n }\n\n /**\n * @dev returns true if Consumers's or Dealer's account is registered\n * @param account address of the consumer/dealer\n */\n function isDealerOrConsumer(address account) private view returns (bool) {\n return (isDealerRegistered(account) || isConsumerRegistered(account));\n }\n\n /**\n * @dev Helper function for returning tuple of bools of role membership\n * @param account address to check roles\n */\n function getRoles(address account) external view returns (bool, bool, bool, bool, bool) {\n bool isAdmin = hasRole(DEFAULT_ADMIN_ROLE, account);\n bool isRecDealer = hasRole(REGISTERED_REC_DEALER, account);\n bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, account);\n bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, account);\n bool isConsumer = hasRole(REGISTERED_CONSUMER, account);\n return (isAdmin, isRecDealer, isCeoDealer, isAeDealer, isConsumer);\n }\n\n /**\n * @dev Only contract owner can register Dealers\n * @param account address of the dealer to register\n * Only registered Dealers can transfer tokens\n */\n function registerDealer(address account, uint8 tokenTypeId)\n external\n onlyAdmin\n {\n require(tokenTypeIdIsValid(tokenTypeId), \"CLM8::registerDealer: tokenTypeId does not exist\");\n if (tokenTypeId == 1) {\n grantRole(REGISTERED_REC_DEALER, account);\n } else if (tokenTypeId == 2) {\n grantRole(REGISTERED_OFFSET_DEALER, account);\n } else {\n grantRole(REGISTERED_EMISSIONS_AUDITOR, account);\n }\n // Also grant generic dealer role for registering/unregistering consumers\n grantRole(REGISTERED_DEALER, account);\n emit RegisteredDealer(account);\n }\n\n /**\n * @dev returns true if Consumer's account is registered for the given token\n * @param account address of the consumer\n */\n function registerConsumer(address account) external onlyDealer {\n if (limitedMode) {\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \"CLM8::registerConsumer(limited): only admin can register consumers\");\n }\n grantRole(REGISTERED_CONSUMER, account);\n emit RegisteredConsumer(account);\n }\n\n /**\n * @dev Only contract owner can unregister Dealers\n * @param account address to be unregistered\n */\n function unregisterDealer(address account, uint8 tokenTypeId)\n external\n onlyAdmin\n {\n require(tokenTypeIdIsValid(tokenTypeId), \"CLM8::unregisterDealer: tokenTypeId does not exist\");\n if (tokenTypeId == 1) {\n super.revokeRole(REGISTERED_REC_DEALER, account);\n } else if (tokenTypeId == 2) {\n super.revokeRole(REGISTERED_OFFSET_DEALER, account);\n } else {\n super.revokeRole(REGISTERED_EMISSIONS_AUDITOR, account);\n }\n\n // If no longer a dealer of any token type, remove generic dealer role\n if (!isDealerRegistered(account)) {\n revokeRole(REGISTERED_DEALER, account);\n }\n\n emit UnregisteredDealer(account);\n }\n\n /**\n * @dev Only contract owner can unregister Consumers\n * @param account address to be unregistered\n */\n function unregisterConsumer(address account) external onlyDealer {\n if (limitedMode) {\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \"CLM8::unregisterConsumer(limited): only admin can unregister consumers\");\n }\n super.revokeRole(REGISTERED_CONSUMER, account);\n emit UnregisteredConsumer(account);\n }\n\n /**\n * @dev transfers the value to the 'to' account for tokenId\n * @param to recipient address\n * @param tokenId tokenId for the transfer\n * @param value amount of transfer\n * Transfer can start only when both parties are registered and the token is not paused\n * Note: Token holders can arbitrarily call safeTransferFrom() without these checks\n */\n function transfer(\n address to,\n uint256 tokenId,\n uint256 value\n ) external consumerOrDealer {\n require(tokenExists(tokenId), \"CLM8::transfer: tokenId does not exist\");\n require((msg.sender != to), \"CLM8::transfer: sender and receiver cannot be the same\");\n super.safeTransferFrom(msg.sender, to, tokenId, value, \"0x00\");\n }\n\n function setTimelock(\n address _timelock\n ) external onlyAdmin {\n timelock = _timelock;\n }\n\n function getAvailableAndRetired(address account, uint256 tokenId)\n external\n view\n returns (uint256, uint256)\n {\n uint256 available = super.balanceOf(account, tokenId);\n uint256 retired = this.getTokenRetiredAmount(account, tokenId);\n return (available, retired);\n }\n\n /**\n * @dev returns issuer of a given tokenId\n */\n function getIssuer(uint256 tokenId)\n external\n view\n returns (address)\n {\n return _tokenDetails[tokenId].issuer;\n }\n\n /**\n * @dev returns the details of a given tokenId, omitting holders\n * @param tokenId token to check\n */\n function getTokenDetails(uint256 tokenId)\n external\n view\n returns (CarbonTokenDetails memory)\n {\n return _tokenDetails[tokenId];\n }\n\n /**\n * @dev turns off or on limited mode\n * @param _limitedMode boolean value\n */\n function setLimitedMode(bool _limitedMode)\n external\n onlyAdmin\n {\n limitedMode = _limitedMode;\n }\n\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers" - ], - "": [ - "ast" - ] - } - } - } - }, - "output": { - "contracts": { - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "AccessControlUpgradeable": { - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "methodIdentifiers": { - "DEFAULT_ADMIN_ROLE()": "a217fddf", - "getRoleAdmin(bytes32)": "248a9ca3", - "getRoleMember(bytes32,uint256)": "9010d07c", - "getRoleMemberCount(bytes32)": "ca15c873", - "grantRole(bytes32,address)": "2f2ff15d", - "hasRole(bytes32,address)": "91d14854", - "renounceRole(bytes32,address)": "36568abe", - "revokeRole(bytes32,address)": "d547741f" - } - } - } - }, - "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol": { - "ERC165Upgradeable": { - "abi": [ - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "methodIdentifiers": { - "supportsInterface(bytes4)": "01ffc9a7" - } - } - } - }, - "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol": { - "IERC165Upgradeable": { - "abi": [ - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "methodIdentifiers": { - "supportsInterface(bytes4)": "01ffc9a7" - } - } - } - }, - "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol": { - "SafeMathUpgradeable": { - "abi": [], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200620e9f101c640d717111c8d8e0ccf896bc085b0cd34802ad72cd7a9fcee99a264736f6c63430007000033", - "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MOD KECCAK256 0xE9 CALL ADD 0xC6 BLOCKHASH 0xD7 OR GT SHR DUP14 DUP15 0xC 0xCF DUP10 PUSH12 0xC085B0CD34802AD72CD7A9FC 0xEE SWAP10 LOG2 PUSH5 0x736F6C6343 STOP SMOD STOP STOP CALLER ", - "sourceMap": "630:6605:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200620e9f101c640d717111c8d8e0ccf896bc085b0cd34802ad72cd7a9fcee99a264736f6c63430007000033", - "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MOD KECCAK256 0xE9 CALL ADD 0xC6 BLOCKHASH 0xD7 OR GT SHR DUP14 DUP15 0xC 0xCF DUP10 PUSH12 0xC085B0CD34802AD72CD7A9FC 0xEE SWAP10 LOG2 PUSH5 0x736F6C6343 STOP SMOD STOP STOP CALLER ", - "sourceMap": "630:6605:3:-:0;;;;;;;;" - }, - "methodIdentifiers": {} - } - } - }, - "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol": { - "Initializable": { - "abi": [], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "methodIdentifiers": {} - } - } - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol": { - "ERC1155Upgradeable": { - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "608060405234801561001057600080fd5b506115b2806100206000396000f3fe608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461035a578063a22cb465146104cd578063e985e9c5146104fb578063f242432a1461052957610087565b8062fdd58e1461008c57806301ffc9a7146100ca5780630e89341c146101055780632eb2c2d614610197575b600080fd5b6100b8600480360360408110156100a257600080fd5b506001600160a01b0381351690602001356105f2565b60408051918252519081900360200190f35b6100f1600480360360208110156100e057600080fd5b50356001600160e01b031916610661565b604080519115158252519081900360200190f35b6101226004803603602081101561011b57600080fd5b5035610680565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015c578181015183820152602001610144565b50505050905090810190601f1680156101895780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610358600480360360a08110156101ad57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156101e057600080fd5b8201836020820111156101f257600080fd5b803590602001918460208302840111600160201b8311171561021357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561026257600080fd5b82018360208201111561027457600080fd5b803590602001918460208302840111600160201b8311171561029557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156102e457600080fd5b8201836020820111156102f657600080fd5b803590602001918460018302840111600160201b8311171561031757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610718945050505050565b005b61047d6004803603604081101561037057600080fd5b810190602081018135600160201b81111561038a57600080fd5b82018360208201111561039c57600080fd5b803590602001918460208302840111600160201b831117156103bd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561040c57600080fd5b82018360208201111561041e57600080fd5b803590602001918460208302840111600160201b8311171561043f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610a1b945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104b95781810151838201526020016104a1565b505050509050019250505060405180910390f35b610358600480360360408110156104e357600080fd5b506001600160a01b0381351690602001351515610b07565b6100f16004803603604081101561051157600080fd5b506001600160a01b0381358116916020013516610bf6565b610358600480360360a081101561053f57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b81111561057e57600080fd5b82018360208201111561059057600080fd5b803590602001918460018302840111600160201b831117156105b157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c24945050505050565b60006001600160a01b0383166106395760405162461bcd60e51b815260040180806020018281038252602b81526020018061142e602b913960400191505060405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b6001600160e01b03191660009081526033602052604090205460ff1690565b60678054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561070c5780601f106106e15761010080835404028352916020019161070c565b820191906000526020600020905b8154815290600101906020018083116106ef57829003601f168201915b50505050509050919050565b81518351146107585760405162461bcd60e51b81526004018080602001828103825260288152602001806115556028913960400191505060405180910390fd5b6001600160a01b03841661079d5760405162461bcd60e51b81526004018080602001828103825260258152602001806114826025913960400191505060405180910390fd5b6107a5610def565b6001600160a01b0316856001600160a01b031614806107d057506107d0856107cb610def565b610bf6565b61080b5760405162461bcd60e51b81526004018080602001828103825260328152602001806114a76032913960400191505060405180910390fd5b6000610815610def565b9050610825818787878787610a13565b60005b845181101561092b57600085828151811061083f57fe5b60200260200101519050600085838151811061085757fe5b602002602001015190506108c4816040518060600160405280602a81526020016114d9602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054610df49092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a16815220546108fb9082610e8b565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610828565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156109b1578181015183820152602001610999565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156109f05781810151838201526020016109d8565b5050505090500194505050505060405180910390a4610a13818787878787610eec565b505050505050565b60608151835114610a5d5760405162461bcd60e51b815260040180806020018281038252602981526020018061152c6029913960400191505060405180910390fd5b6060835167ffffffffffffffff81118015610a7757600080fd5b50604051908082528060200260200182016040528015610aa1578160200160208202803683370190505b50905060005b8451811015610aff57610ae0858281518110610abf57fe5b6020026020010151858381518110610ad357fe5b60200260200101516105f2565b828281518110610aec57fe5b6020908102919091010152600101610aa7565b509392505050565b816001600160a01b0316610b19610def565b6001600160a01b03161415610b5f5760405162461bcd60e51b81526004018080602001828103825260298152602001806115036029913960400191505060405180910390fd5b8060666000610b6c610def565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610bb0610def565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b6001600160a01b038416610c695760405162461bcd60e51b81526004018080602001828103825260258152602001806114826025913960400191505060405180910390fd5b610c71610def565b6001600160a01b0316856001600160a01b03161480610c975750610c97856107cb610def565b610cd25760405162461bcd60e51b81526004018080602001828103825260298152602001806114596029913960400191505060405180910390fd5b6000610cdc610def565b9050610cfc818787610ced8861116b565b610cf68861116b565b87610a13565b610d43836040518060600160405280602a81526020016114d9602a913960008781526065602090815260408083206001600160a01b038d1684529091529020549190610df4565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054610d7a9084610e8b565b60008581526065602090815260408083206001600160a01b03808b168086529184529382902094909455805188815291820187905280518a8416938616927fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6292908290030190a4610a138187878787876111af565b335b90565b60008184841115610e835760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e48578181015183820152602001610e30565b50505050905090810190601f168015610e755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610ee5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b610efe846001600160a01b0316611320565b15610a1357836001600160a01b031663bc197c8187878686866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b03168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610f8c578181015183820152602001610f74565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015610fcb578181015183820152602001610fb3565b50505050905001848103825285818151815260200191508051906020019080838360005b83811015611007578181015183820152602001610fef565b50505050905090810190601f1680156110345780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b15801561105957600080fd5b505af192505050801561107e57506040513d602081101561107957600080fd5b505160015b6111135761108a61132c565b8061109557506110dc565b60405162461bcd60e51b8152602060048201818152835160248401528351849391928392604401919085019080838360008315610e48578181015183820152602001610e30565b60405162461bcd60e51b81526004018080602001828103825260348152602001806113d26034913960400191505060405180910390fd5b6001600160e01b0319811663bc197c8160e01b146111625760405162461bcd60e51b81526004018080602001828103825260288152602001806114066028913960400191505060405180910390fd5b50505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061119e57fe5b602090810291909101015292915050565b6111c1846001600160a01b0316611320565b15610a1357836001600160a01b031663f23a6e6187878686866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611250578181015183820152602001611238565b50505050905090810190601f16801561127d5780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b1580156112a057600080fd5b505af19250505080156112c557506040513d60208110156112c057600080fd5b505160015b6112d15761108a61132c565b6001600160e01b0319811663f23a6e6160e01b146111625760405162461bcd60e51b81526004018080602001828103825260288152602001806114066028913960400191505060405180910390fd5b3b151590565b60e01c90565b600060443d101561133c57610df1565b600481823e6308c379a06113508251611326565b1461135a57610df1565b6040513d600319016004823e80513d67ffffffffffffffff816024840111818411171561138a5750505050610df1565b828401925082519150808211156113a45750505050610df1565b503d830160208284010111156113bc57505050610df1565b601f01601f191681016020016040529150509056fe455243313135353a207472616e7366657220746f206e6f6e2045524331313535526563656976657220696d706c656d656e746572455243313135353a204552433131353552656365697665722072656a656374656420746f6b656e73455243313135353a2062616c616e636520717565727920666f7220746865207a65726f2061646472657373455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243313135353a207472616e7366657220746f20746865207a65726f2061646472657373455243313135353a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e73666572455243313135353a2073657474696e6720617070726f76616c2073746174757320666f722073656c66455243313135353a206163636f756e747320616e6420696473206c656e677468206d69736d61746368455243313135353a2069647320616e6420616d6f756e7473206c656e677468206d69736d61746368a26469706673582212207c70ed70cea82b85cd7c682fcd1e7ad44a9b39559a4cb7fa844e59ecb68daaab64736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x15B2 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x87 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x4E1273F4 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x4E1273F4 EQ PUSH2 0x35A JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x4CD JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0x4FB JUMPI DUP1 PUSH4 0xF242432A EQ PUSH2 0x529 JUMPI PUSH2 0x87 JUMP JUMPDEST DUP1 PUSH3 0xFDD58E EQ PUSH2 0x8C JUMPI DUP1 PUSH4 0x1FFC9A7 EQ PUSH2 0xCA JUMPI DUP1 PUSH4 0xE89341C EQ PUSH2 0x105 JUMPI DUP1 PUSH4 0x2EB2C2D6 EQ PUSH2 0x197 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xB8 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xA2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x5F2 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xF1 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xE0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x661 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x122 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x11B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x680 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x15C JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x144 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x189 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x358 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xA0 DUP2 LT ISZERO PUSH2 0x1AD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD DUP2 AND SWAP3 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP2 DUP2 ADD SWAP1 PUSH1 0x60 DUP2 ADD PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x1E0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x1F2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x213 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x262 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x274 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x295 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x2E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x2F6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x317 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0x718 SWAP5 POP POP POP POP POP JUMP JUMPDEST STOP JUMPDEST PUSH2 0x47D PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x370 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x38A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x39C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x3BD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x40C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x41E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x43F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0xA1B SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 DUP2 ADD SWAP2 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x4B9 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x4A1 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x358 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x4E3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD ISZERO ISZERO PUSH2 0xB07 JUMP JUMPDEST PUSH2 0xF1 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x511 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0xBF6 JUMP JUMPDEST PUSH2 0x358 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xA0 DUP2 LT ISZERO PUSH2 0x53F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD DUP2 AND SWAP3 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP2 PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0x60 DUP2 ADD CALLDATALOAD SWAP2 DUP2 ADD SWAP1 PUSH1 0xA0 DUP2 ADD PUSH1 0x80 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x57E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x590 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x5B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0xC24 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x639 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x142E PUSH1 0x2B SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x33 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x67 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x70C JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x6E1 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x70C JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x6EF JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0x758 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1555 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x79D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x25 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1482 PUSH1 0x25 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x7A5 PUSH2 0xDEF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0x7D0 JUMPI POP PUSH2 0x7D0 DUP6 PUSH2 0x7CB PUSH2 0xDEF JUMP JUMPDEST PUSH2 0xBF6 JUMP JUMPDEST PUSH2 0x80B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x32 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x14A7 PUSH1 0x32 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x815 PUSH2 0xDEF JUMP JUMPDEST SWAP1 POP PUSH2 0x825 DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0xA13 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0x92B JUMPI PUSH1 0x0 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x83F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x857 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x8C4 DUP2 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x14D9 PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x65 PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP14 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD PUSH2 0xDF4 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP15 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP11 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x8FB SWAP1 DUP3 PUSH2 0xE8B JUMP JUMPDEST PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP6 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP13 AND DUP7 MSTORE SWAP1 SWAP2 MSTORE SWAP1 SWAP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE POP PUSH1 0x1 ADD PUSH2 0x828 JUMP JUMPDEST POP DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x4A39DC06D4C0DBC64B70AF90FD698A233A518AA5D07E595D983B8C0526C8F7FB DUP8 DUP8 PUSH1 0x40 MLOAD DUP1 DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP6 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x9B1 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x999 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD DUP4 DUP2 SUB DUP3 MSTORE DUP5 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x9F0 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x9D8 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD SWAP5 POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xA13 DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0xEEC JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0xA5D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x152C PUSH1 0x29 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0xA77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xAA1 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0xAFF JUMPI PUSH2 0xAE0 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xABF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xAD3 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x5F2 JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xAEC JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0xAA7 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xB19 PUSH2 0xDEF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0xB5F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1503 PUSH1 0x29 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x66 PUSH1 0x0 PUSH2 0xB6C PUSH2 0xDEF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP2 DUP3 ADD PUSH1 0x0 SWAP1 DUP2 KECCAK256 SWAP2 DUP8 AND DUP1 DUP3 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP3 ISZERO ISZERO SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 SSTORE PUSH2 0xBB0 PUSH2 0xDEF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 DUP4 PUSH1 0x40 MLOAD DUP1 DUP3 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x66 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0xC69 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x25 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1482 PUSH1 0x25 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xC71 PUSH2 0xDEF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0xC97 JUMPI POP PUSH2 0xC97 DUP6 PUSH2 0x7CB PUSH2 0xDEF JUMP JUMPDEST PUSH2 0xCD2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1459 PUSH1 0x29 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xCDC PUSH2 0xDEF JUMP JUMPDEST SWAP1 POP PUSH2 0xCFC DUP2 DUP8 DUP8 PUSH2 0xCED DUP9 PUSH2 0x116B JUMP JUMPDEST PUSH2 0xCF6 DUP9 PUSH2 0x116B JUMP JUMPDEST DUP8 PUSH2 0xA13 JUMP JUMPDEST PUSH2 0xD43 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x14D9 PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP14 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD SWAP2 SWAP1 PUSH2 0xDF4 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP8 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xD7A SWAP1 DUP5 PUSH2 0xE8B JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP12 AND DUP1 DUP7 MSTORE SWAP2 DUP5 MSTORE SWAP4 DUP3 SWAP1 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE DUP1 MLOAD DUP9 DUP2 MSTORE SWAP2 DUP3 ADD DUP8 SWAP1 MSTORE DUP1 MLOAD DUP11 DUP5 AND SWAP4 DUP7 AND SWAP3 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP3 SWAP1 DUP3 SWAP1 SUB ADD SWAP1 LOG4 PUSH2 0xA13 DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x11AF JUMP JUMPDEST CALLER JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP5 DUP5 GT ISZERO PUSH2 0xE83 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xE48 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xE30 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xE75 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP POP POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0xEE5 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1B PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xEFE DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1320 JUMP JUMPDEST ISZERO PUSH2 0xA13 JUMPI DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xBC197C81 DUP8 DUP8 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD DUP7 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 SUB DUP5 MSTORE DUP8 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xF8C JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xF74 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD DUP5 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xFCB JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xFB3 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD DUP5 DUP2 SUB DUP3 MSTORE DUP6 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x1007 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xFEF JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x1034 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP9 POP POP POP POP POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1059 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x107E JUMPI POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x1079 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x1 JUMPDEST PUSH2 0x1113 JUMPI PUSH2 0x108A PUSH2 0x132C JUMP JUMPDEST DUP1 PUSH2 0x1095 JUMPI POP PUSH2 0x10DC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 DUP2 MSTORE DUP4 MLOAD PUSH1 0x24 DUP5 ADD MSTORE DUP4 MLOAD DUP5 SWAP4 SWAP2 SWAP3 DUP4 SWAP3 PUSH1 0x44 ADD SWAP2 SWAP1 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 DUP4 ISZERO PUSH2 0xE48 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xE30 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x34 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x13D2 PUSH1 0x34 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xBC197C81 PUSH1 0xE0 SHL EQ PUSH2 0x1162 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1406 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 DUP1 DUP3 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE PUSH1 0x60 SWAP2 DUP3 SWAP2 SWAP1 PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP POP SWAP1 POP DUP3 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x119E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x11C1 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1320 JUMP JUMPDEST ISZERO PUSH2 0xA13 JUMPI DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF23A6E61 DUP8 DUP8 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD DUP7 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x1250 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x1238 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x127D JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP7 POP POP POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x12A0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x12C5 JUMPI POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x12C0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x1 JUMPDEST PUSH2 0x12D1 JUMPI PUSH2 0x108A PUSH2 0x132C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xF23A6E61 PUSH1 0xE0 SHL EQ PUSH2 0x1162 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1406 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST EXTCODESIZE ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0xE0 SHR SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x44 RETURNDATASIZE LT ISZERO PUSH2 0x133C JUMPI PUSH2 0xDF1 JUMP JUMPDEST PUSH1 0x4 DUP2 DUP3 RETURNDATACOPY PUSH4 0x8C379A0 PUSH2 0x1350 DUP3 MLOAD PUSH2 0x1326 JUMP JUMPDEST EQ PUSH2 0x135A JUMPI PUSH2 0xDF1 JUMP JUMPDEST PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x3 NOT ADD PUSH1 0x4 DUP3 RETURNDATACOPY DUP1 MLOAD RETURNDATASIZE PUSH8 0xFFFFFFFFFFFFFFFF DUP2 PUSH1 0x24 DUP5 ADD GT DUP2 DUP5 GT OR ISZERO PUSH2 0x138A JUMPI POP POP POP POP PUSH2 0xDF1 JUMP JUMPDEST DUP3 DUP5 ADD SWAP3 POP DUP3 MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x13A4 JUMPI POP POP POP POP PUSH2 0xDF1 JUMP JUMPDEST POP RETURNDATASIZE DUP4 ADD PUSH1 0x20 DUP3 DUP5 ADD ADD GT ISZERO PUSH2 0x13BC JUMPI POP POP POP PUSH2 0xDF1 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE SWAP2 POP POP SWAP1 JUMP INVALID GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH21 0x72616E7366657220746F206E6F6E20455243313135 CALLDATALOAD MSTORE PUSH6 0x636569766572 KECCAK256 PUSH10 0x6D706C656D656E746572 GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD MSTORE PUSH6 0x636569766572 KECCAK256 PUSH19 0x656A656374656420746F6B656E734552433131 CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH3 0x616C61 PUSH15 0x636520717565727920666F72207468 PUSH6 0x207A65726F20 PUSH2 0x6464 PUSH19 0x657373455243313135353A2063616C6C657220 PUSH10 0x73206E6F74206F776E65 PUSH19 0x206E6F7220617070726F766564455243313135 CALLDATALOAD GASPRICE KECCAK256 PUSH21 0x72616E7366657220746F20746865207A65726F2061 PUSH5 0x6472657373 GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH21 0x72616E736665722063616C6C6572206973206E6F74 KECCAK256 PUSH16 0x776E6572206E6F7220617070726F7665 PUSH5 0x4552433131 CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH10 0x6E73756666696369656E PUSH21 0x2062616C616E636520666F72207472616E73666572 GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH20 0x657474696E6720617070726F76616C2073746174 PUSH22 0x7320666F722073656C66455243313135353A20616363 PUSH16 0x756E747320616E6420696473206C656E PUSH8 0x7468206D69736D61 PUSH21 0x6368455243313135353A2069647320616E6420616D PUSH16 0x756E7473206C656E677468206D69736D PUSH2 0x7463 PUSH9 0xA26469706673582212 KECCAK256 PUSH29 0x70ED70CEA82B85CD7C682FCD1E7AD44A9B39559A4CB7FA844E59ECB68D 0xAA 0xAB PUSH5 0x736F6C6343 STOP SMOD STOP STOP CALLER ", - "sourceMap": "639:14088:5:-:0;;;;;;;;;;;;;;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461035a578063a22cb465146104cd578063e985e9c5146104fb578063f242432a1461052957610087565b8062fdd58e1461008c57806301ffc9a7146100ca5780630e89341c146101055780632eb2c2d614610197575b600080fd5b6100b8600480360360408110156100a257600080fd5b506001600160a01b0381351690602001356105f2565b60408051918252519081900360200190f35b6100f1600480360360208110156100e057600080fd5b50356001600160e01b031916610661565b604080519115158252519081900360200190f35b6101226004803603602081101561011b57600080fd5b5035610680565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015c578181015183820152602001610144565b50505050905090810190601f1680156101895780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610358600480360360a08110156101ad57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156101e057600080fd5b8201836020820111156101f257600080fd5b803590602001918460208302840111600160201b8311171561021357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561026257600080fd5b82018360208201111561027457600080fd5b803590602001918460208302840111600160201b8311171561029557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156102e457600080fd5b8201836020820111156102f657600080fd5b803590602001918460018302840111600160201b8311171561031757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610718945050505050565b005b61047d6004803603604081101561037057600080fd5b810190602081018135600160201b81111561038a57600080fd5b82018360208201111561039c57600080fd5b803590602001918460208302840111600160201b831117156103bd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561040c57600080fd5b82018360208201111561041e57600080fd5b803590602001918460208302840111600160201b8311171561043f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610a1b945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104b95781810151838201526020016104a1565b505050509050019250505060405180910390f35b610358600480360360408110156104e357600080fd5b506001600160a01b0381351690602001351515610b07565b6100f16004803603604081101561051157600080fd5b506001600160a01b0381358116916020013516610bf6565b610358600480360360a081101561053f57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b81111561057e57600080fd5b82018360208201111561059057600080fd5b803590602001918460018302840111600160201b831117156105b157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c24945050505050565b60006001600160a01b0383166106395760405162461bcd60e51b815260040180806020018281038252602b81526020018061142e602b913960400191505060405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b6001600160e01b03191660009081526033602052604090205460ff1690565b60678054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561070c5780601f106106e15761010080835404028352916020019161070c565b820191906000526020600020905b8154815290600101906020018083116106ef57829003601f168201915b50505050509050919050565b81518351146107585760405162461bcd60e51b81526004018080602001828103825260288152602001806115556028913960400191505060405180910390fd5b6001600160a01b03841661079d5760405162461bcd60e51b81526004018080602001828103825260258152602001806114826025913960400191505060405180910390fd5b6107a5610def565b6001600160a01b0316856001600160a01b031614806107d057506107d0856107cb610def565b610bf6565b61080b5760405162461bcd60e51b81526004018080602001828103825260328152602001806114a76032913960400191505060405180910390fd5b6000610815610def565b9050610825818787878787610a13565b60005b845181101561092b57600085828151811061083f57fe5b60200260200101519050600085838151811061085757fe5b602002602001015190506108c4816040518060600160405280602a81526020016114d9602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054610df49092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a16815220546108fb9082610e8b565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610828565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156109b1578181015183820152602001610999565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156109f05781810151838201526020016109d8565b5050505090500194505050505060405180910390a4610a13818787878787610eec565b505050505050565b60608151835114610a5d5760405162461bcd60e51b815260040180806020018281038252602981526020018061152c6029913960400191505060405180910390fd5b6060835167ffffffffffffffff81118015610a7757600080fd5b50604051908082528060200260200182016040528015610aa1578160200160208202803683370190505b50905060005b8451811015610aff57610ae0858281518110610abf57fe5b6020026020010151858381518110610ad357fe5b60200260200101516105f2565b828281518110610aec57fe5b6020908102919091010152600101610aa7565b509392505050565b816001600160a01b0316610b19610def565b6001600160a01b03161415610b5f5760405162461bcd60e51b81526004018080602001828103825260298152602001806115036029913960400191505060405180910390fd5b8060666000610b6c610def565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610bb0610def565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b6001600160a01b038416610c695760405162461bcd60e51b81526004018080602001828103825260258152602001806114826025913960400191505060405180910390fd5b610c71610def565b6001600160a01b0316856001600160a01b03161480610c975750610c97856107cb610def565b610cd25760405162461bcd60e51b81526004018080602001828103825260298152602001806114596029913960400191505060405180910390fd5b6000610cdc610def565b9050610cfc818787610ced8861116b565b610cf68861116b565b87610a13565b610d43836040518060600160405280602a81526020016114d9602a913960008781526065602090815260408083206001600160a01b038d1684529091529020549190610df4565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054610d7a9084610e8b565b60008581526065602090815260408083206001600160a01b03808b168086529184529382902094909455805188815291820187905280518a8416938616927fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6292908290030190a4610a138187878787876111af565b335b90565b60008184841115610e835760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e48578181015183820152602001610e30565b50505050905090810190601f168015610e755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610ee5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b610efe846001600160a01b0316611320565b15610a1357836001600160a01b031663bc197c8187878686866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b03168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610f8c578181015183820152602001610f74565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015610fcb578181015183820152602001610fb3565b50505050905001848103825285818151815260200191508051906020019080838360005b83811015611007578181015183820152602001610fef565b50505050905090810190601f1680156110345780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b15801561105957600080fd5b505af192505050801561107e57506040513d602081101561107957600080fd5b505160015b6111135761108a61132c565b8061109557506110dc565b60405162461bcd60e51b8152602060048201818152835160248401528351849391928392604401919085019080838360008315610e48578181015183820152602001610e30565b60405162461bcd60e51b81526004018080602001828103825260348152602001806113d26034913960400191505060405180910390fd5b6001600160e01b0319811663bc197c8160e01b146111625760405162461bcd60e51b81526004018080602001828103825260288152602001806114066028913960400191505060405180910390fd5b50505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061119e57fe5b602090810291909101015292915050565b6111c1846001600160a01b0316611320565b15610a1357836001600160a01b031663f23a6e6187878686866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611250578181015183820152602001611238565b50505050905090810190601f16801561127d5780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b1580156112a057600080fd5b505af19250505080156112c557506040513d60208110156112c057600080fd5b505160015b6112d15761108a61132c565b6001600160e01b0319811663f23a6e6160e01b146111625760405162461bcd60e51b81526004018080602001828103825260288152602001806114066028913960400191505060405180910390fd5b3b151590565b60e01c90565b600060443d101561133c57610df1565b600481823e6308c379a06113508251611326565b1461135a57610df1565b6040513d600319016004823e80513d67ffffffffffffffff816024840111818411171561138a5750505050610df1565b828401925082519150808211156113a45750505050610df1565b503d830160208284010111156113bc57505050610df1565b601f01601f191681016020016040529150509056fe455243313135353a207472616e7366657220746f206e6f6e2045524331313535526563656976657220696d706c656d656e746572455243313135353a204552433131353552656365697665722072656a656374656420746f6b656e73455243313135353a2062616c616e636520717565727920666f7220746865207a65726f2061646472657373455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243313135353a207472616e7366657220746f20746865207a65726f2061646472657373455243313135353a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e73666572455243313135353a2073657474696e6720617070726f76616c2073746174757320666f722073656c66455243313135353a206163636f756e747320616e6420696473206c656e677468206d69736d61746368455243313135353a2069647320616e6420616d6f756e7473206c656e677468206d69736d61746368a26469706673582212207c70ed70cea82b85cd7c682fcd1e7ad44a9b39559a4cb7fa844e59ecb68daaab64736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x87 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x4E1273F4 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x4E1273F4 EQ PUSH2 0x35A JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x4CD JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0x4FB JUMPI DUP1 PUSH4 0xF242432A EQ PUSH2 0x529 JUMPI PUSH2 0x87 JUMP JUMPDEST DUP1 PUSH3 0xFDD58E EQ PUSH2 0x8C JUMPI DUP1 PUSH4 0x1FFC9A7 EQ PUSH2 0xCA JUMPI DUP1 PUSH4 0xE89341C EQ PUSH2 0x105 JUMPI DUP1 PUSH4 0x2EB2C2D6 EQ PUSH2 0x197 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xB8 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xA2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x5F2 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xF1 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xE0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x661 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x122 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x11B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x680 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x15C JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x144 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x189 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x358 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xA0 DUP2 LT ISZERO PUSH2 0x1AD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD DUP2 AND SWAP3 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP2 DUP2 ADD SWAP1 PUSH1 0x60 DUP2 ADD PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x1E0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x1F2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x213 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x262 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x274 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x295 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x2E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x2F6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x317 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0x718 SWAP5 POP POP POP POP POP JUMP JUMPDEST STOP JUMPDEST PUSH2 0x47D PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x370 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x38A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x39C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x3BD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x40C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x41E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x43F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0xA1B SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 DUP2 ADD SWAP2 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x4B9 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x4A1 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x358 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x4E3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD ISZERO ISZERO PUSH2 0xB07 JUMP JUMPDEST PUSH2 0xF1 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x511 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0xBF6 JUMP JUMPDEST PUSH2 0x358 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xA0 DUP2 LT ISZERO PUSH2 0x53F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 CALLDATALOAD DUP2 AND SWAP3 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP2 PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0x60 DUP2 ADD CALLDATALOAD SWAP2 DUP2 ADD SWAP1 PUSH1 0xA0 DUP2 ADD PUSH1 0x80 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x57E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x590 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x1 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x5B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0xC24 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x639 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x142E PUSH1 0x2B SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x33 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x67 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x70C JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x6E1 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x70C JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x6EF JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0x758 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1555 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x79D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x25 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1482 PUSH1 0x25 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x7A5 PUSH2 0xDEF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0x7D0 JUMPI POP PUSH2 0x7D0 DUP6 PUSH2 0x7CB PUSH2 0xDEF JUMP JUMPDEST PUSH2 0xBF6 JUMP JUMPDEST PUSH2 0x80B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x32 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x14A7 PUSH1 0x32 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x815 PUSH2 0xDEF JUMP JUMPDEST SWAP1 POP PUSH2 0x825 DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0xA13 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0x92B JUMPI PUSH1 0x0 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x83F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x857 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x8C4 DUP2 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x14D9 PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x65 PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP14 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD PUSH2 0xDF4 SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP15 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP11 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x8FB SWAP1 DUP3 PUSH2 0xE8B JUMP JUMPDEST PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP6 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP13 AND DUP7 MSTORE SWAP1 SWAP2 MSTORE SWAP1 SWAP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE POP PUSH1 0x1 ADD PUSH2 0x828 JUMP JUMPDEST POP DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x4A39DC06D4C0DBC64B70AF90FD698A233A518AA5D07E595D983B8C0526C8F7FB DUP8 DUP8 PUSH1 0x40 MLOAD DUP1 DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP4 DUP2 SUB DUP4 MSTORE DUP6 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x9B1 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x999 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD DUP4 DUP2 SUB DUP3 MSTORE DUP5 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x9F0 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x9D8 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD SWAP5 POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xA13 DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0xEEC JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0xA5D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x152C PUSH1 0x29 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0xA77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xAA1 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0xAFF JUMPI PUSH2 0xAE0 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xABF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xAD3 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x5F2 JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xAEC JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0xAA7 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xB19 PUSH2 0xDEF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0xB5F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1503 PUSH1 0x29 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x66 PUSH1 0x0 PUSH2 0xB6C PUSH2 0xDEF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP2 DUP3 ADD PUSH1 0x0 SWAP1 DUP2 KECCAK256 SWAP2 DUP8 AND DUP1 DUP3 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP3 ISZERO ISZERO SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 SSTORE PUSH2 0xBB0 PUSH2 0xDEF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 DUP4 PUSH1 0x40 MLOAD DUP1 DUP3 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x66 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0xC69 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x25 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1482 PUSH1 0x25 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0xC71 PUSH2 0xDEF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0xC97 JUMPI POP PUSH2 0xC97 DUP6 PUSH2 0x7CB PUSH2 0xDEF JUMP JUMPDEST PUSH2 0xCD2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x29 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1459 PUSH1 0x29 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xCDC PUSH2 0xDEF JUMP JUMPDEST SWAP1 POP PUSH2 0xCFC DUP2 DUP8 DUP8 PUSH2 0xCED DUP9 PUSH2 0x116B JUMP JUMPDEST PUSH2 0xCF6 DUP9 PUSH2 0x116B JUMP JUMPDEST DUP8 PUSH2 0xA13 JUMP JUMPDEST PUSH2 0xD43 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x14D9 PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP14 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD SWAP2 SWAP1 PUSH2 0xDF4 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP8 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xD7A SWAP1 DUP5 PUSH2 0xE8B JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP12 AND DUP1 DUP7 MSTORE SWAP2 DUP5 MSTORE SWAP4 DUP3 SWAP1 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE DUP1 MLOAD DUP9 DUP2 MSTORE SWAP2 DUP3 ADD DUP8 SWAP1 MSTORE DUP1 MLOAD DUP11 DUP5 AND SWAP4 DUP7 AND SWAP3 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP3 SWAP1 DUP3 SWAP1 SUB ADD SWAP1 LOG4 PUSH2 0xA13 DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x11AF JUMP JUMPDEST CALLER JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP5 DUP5 GT ISZERO PUSH2 0xE83 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xE48 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xE30 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xE75 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP POP POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0xEE5 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1B PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0xEFE DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1320 JUMP JUMPDEST ISZERO PUSH2 0xA13 JUMPI DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xBC197C81 DUP8 DUP8 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD DUP7 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP5 DUP2 SUB DUP5 MSTORE DUP8 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xF8C JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xF74 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD DUP5 DUP2 SUB DUP4 MSTORE DUP7 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xFCB JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xFB3 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD DUP5 DUP2 SUB DUP3 MSTORE DUP6 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x1007 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xFEF JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x1034 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP9 POP POP POP POP POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1059 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x107E JUMPI POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x1079 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x1 JUMPDEST PUSH2 0x1113 JUMPI PUSH2 0x108A PUSH2 0x132C JUMP JUMPDEST DUP1 PUSH2 0x1095 JUMPI POP PUSH2 0x10DC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 DUP2 MSTORE DUP4 MLOAD PUSH1 0x24 DUP5 ADD MSTORE DUP4 MLOAD DUP5 SWAP4 SWAP2 SWAP3 DUP4 SWAP3 PUSH1 0x44 ADD SWAP2 SWAP1 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 DUP4 ISZERO PUSH2 0xE48 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xE30 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x34 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x13D2 PUSH1 0x34 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xBC197C81 PUSH1 0xE0 SHL EQ PUSH2 0x1162 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1406 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 DUP1 DUP3 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE PUSH1 0x60 SWAP2 DUP3 SWAP2 SWAP1 PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP POP SWAP1 POP DUP3 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x119E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x11C1 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x1320 JUMP JUMPDEST ISZERO PUSH2 0xA13 JUMPI DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF23A6E61 DUP8 DUP8 DUP7 DUP7 DUP7 PUSH1 0x40 MLOAD DUP7 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x1250 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x1238 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x127D JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP7 POP POP POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x12A0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x12C5 JUMPI POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x12C0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x1 JUMPDEST PUSH2 0x12D1 JUMPI PUSH2 0x108A PUSH2 0x132C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xF23A6E61 PUSH1 0xE0 SHL EQ PUSH2 0x1162 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x28 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x1406 PUSH1 0x28 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST EXTCODESIZE ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0xE0 SHR SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x44 RETURNDATASIZE LT ISZERO PUSH2 0x133C JUMPI PUSH2 0xDF1 JUMP JUMPDEST PUSH1 0x4 DUP2 DUP3 RETURNDATACOPY PUSH4 0x8C379A0 PUSH2 0x1350 DUP3 MLOAD PUSH2 0x1326 JUMP JUMPDEST EQ PUSH2 0x135A JUMPI PUSH2 0xDF1 JUMP JUMPDEST PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x3 NOT ADD PUSH1 0x4 DUP3 RETURNDATACOPY DUP1 MLOAD RETURNDATASIZE PUSH8 0xFFFFFFFFFFFFFFFF DUP2 PUSH1 0x24 DUP5 ADD GT DUP2 DUP5 GT OR ISZERO PUSH2 0x138A JUMPI POP POP POP POP PUSH2 0xDF1 JUMP JUMPDEST DUP3 DUP5 ADD SWAP3 POP DUP3 MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x13A4 JUMPI POP POP POP POP PUSH2 0xDF1 JUMP JUMPDEST POP RETURNDATASIZE DUP4 ADD PUSH1 0x20 DUP3 DUP5 ADD ADD GT ISZERO PUSH2 0x13BC JUMPI POP POP POP PUSH2 0xDF1 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE SWAP2 POP POP SWAP1 JUMP INVALID GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH21 0x72616E7366657220746F206E6F6E20455243313135 CALLDATALOAD MSTORE PUSH6 0x636569766572 KECCAK256 PUSH10 0x6D706C656D656E746572 GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD MSTORE PUSH6 0x636569766572 KECCAK256 PUSH19 0x656A656374656420746F6B656E734552433131 CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH3 0x616C61 PUSH15 0x636520717565727920666F72207468 PUSH6 0x207A65726F20 PUSH2 0x6464 PUSH19 0x657373455243313135353A2063616C6C657220 PUSH10 0x73206E6F74206F776E65 PUSH19 0x206E6F7220617070726F766564455243313135 CALLDATALOAD GASPRICE KECCAK256 PUSH21 0x72616E7366657220746F20746865207A65726F2061 PUSH5 0x6472657373 GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH21 0x72616E736665722063616C6C6572206973206E6F74 KECCAK256 PUSH16 0x776E6572206E6F7220617070726F7665 PUSH5 0x4552433131 CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH10 0x6E73756666696369656E PUSH21 0x2062616C616E636520666F72207472616E73666572 GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH20 0x657474696E6720617070726F76616C2073746174 PUSH22 0x7320666F722073656C66455243313135353A20616363 PUSH16 0x756E747320616E6420696473206C656E PUSH8 0x7468206D69736D61 PUSH21 0x6368455243313135353A2069647320616E6420616D PUSH16 0x756E7473206C656E677468206D69736D PUSH2 0x7463 PUSH9 0xA26469706673582212 KECCAK256 PUSH29 0x70ED70CEA82B85CD7C682FCD1E7AD44A9B39559A4CB7FA844E59ECB68D 0xAA 0xAB PUSH5 0x736F6C6343 STOP SMOD STOP STOP CALLER ", - "sourceMap": "639:14088:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3409:228;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3409:228:5;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1176:148:1;;;;;;;;;;;;;;;;-1:-1:-1;1176:148:1;-1:-1:-1;;;;;;1176:148:1;;:::i;:::-;;;;;;;;;;;;;;;;;;3162:105:5;;;;;;;;;;;;;;;;-1:-1:-1;3162:105:5;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5967:1184;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5967:1184:5;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5967:1184:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5967:1184:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5967:1184:5;;;;;;;;-1:-1:-1;5967:1184:5;;-1:-1:-1;;;;;5967:1184:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5967:1184:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5967:1184:5;;;;;;;;-1:-1:-1;5967:1184:5;;-1:-1:-1;;;;;5967:1184:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5967:1184:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5967:1184:5;;-1:-1:-1;5967:1184:5;;-1:-1:-1;;;;;5967:1184:5:i;:::-;;3794:530;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3794:530:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3794:530:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3794:530:5;;;;;;;;-1:-1:-1;3794:530:5;;-1:-1:-1;;;;;3794:530:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3794:530:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3794:530:5;;-1:-1:-1;3794:530:5;;-1:-1:-1;;;;;3794:530:5:i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4392:306;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4392:306:5;;;;;;;;;;:::i;4765:166::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4765:166:5;;;;;;;;;;:::i;4998:897::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4998:897:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4998:897:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4998:897:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4998:897:5;;-1:-1:-1;4998:897:5;;-1:-1:-1;;;;;4998:897:5:i;3409:228::-;3495:7;-1:-1:-1;;;;;3522:21:5;;3514:77;;;;-1:-1:-1;;;3514:77:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3608:13:5;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;3608:22:5;;;;;;;;;;;;3409:228::o;1176:148:1:-;-1:-1:-1;;;;;;1284:33:1;1261:4;1284:33;;;:20;:33;;;;;;;;;1176:148::o;3162:105:5:-;3256:4;3249:11;;;;;;;;-1:-1:-1;;3249:11:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3224:13;;3249:11;;3256:4;;3249:11;;3256:4;3249:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3162:105;;;:::o;5967:1184::-;6221:7;:14;6207:3;:10;:28;6199:81;;;;-1:-1:-1;;;6199:81:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6298:16:5;;6290:66;;;;-1:-1:-1;;;6290:66:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6395:12;:10;:12::i;:::-;-1:-1:-1;;;;;6387:20:5;:4;-1:-1:-1;;;;;6387:20:5;;:60;;;;6411:36;6428:4;6434:12;:10;:12::i;:::-;6411:16;:36::i;:::-;6366:157;;;;-1:-1:-1;;;6366:157:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6534:16;6553:12;:10;:12::i;:::-;6534:31;;6576:60;6597:8;6607:4;6613:2;6617:3;6622:7;6631:4;6576:20;:60::i;:::-;6652:9;6647:349;6671:3;:10;6667:1;:14;6647:349;;;6702:10;6715:3;6719:1;6715:6;;;;;;;;;;;;;;6702:19;;6735:14;6752:7;6760:1;6752:10;;;;;;;;;;;;;;6735:27;;6799:123;6840:6;6799:123;;;;;;;;;;;;;;;;;:9;:13;6809:2;6799:13;;;;;;;;;;;:19;6813:4;-1:-1:-1;;;;;6799:19:5;-1:-1:-1;;;;;6799:19:5;;;;;;;;;;;;;:23;;:123;;;;;:::i;:::-;6777:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;6777:19:5;;;;;;;;;;:145;;;;6956:17;;;;;;:29;;6978:6;6956:21;:29::i;:::-;6936:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;6936:17:5;;;;;;;;;;:49;;;;-1:-1:-1;6683:3:5;;6647:349;;;;7041:2;-1:-1:-1;;;;;7011:47:5;7035:4;-1:-1:-1;;;;;7011:47:5;7025:8;-1:-1:-1;;;;;7011:47:5;;7045:3;7050:7;7011:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7069:75;7105:8;7115:4;7121:2;7125:3;7130:7;7139:4;7069:35;:75::i;:::-;5967:1184;;;;;;:::o;3794:530::-;3967:16;4026:3;:10;4007:8;:15;:29;3999:83;;;;-1:-1:-1;;;3999:83:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4093:30;4140:8;:15;4126:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4126:30:5;;4093:63;;4172:9;4167:120;4191:8;:15;4187:1;:19;4167:120;;;4246:30;4256:8;4265:1;4256:11;;;;;;;;;;;;;;4269:3;4273:1;4269:6;;;;;;;;;;;;;;4246:9;:30::i;:::-;4227:13;4241:1;4227:16;;;;;;;;;;;;;;;;;:49;4208:3;;4167:120;;;-1:-1:-1;4304:13:5;3794:530;-1:-1:-1;;;3794:530:5:o;4392:306::-;4510:8;-1:-1:-1;;;;;4494:24:5;:12;:10;:12::i;:::-;-1:-1:-1;;;;;4494:24:5;;;4486:78;;;;-1:-1:-1;;;4486:78:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4620:8;4575:18;:32;4594:12;:10;:12::i;:::-;-1:-1:-1;;;;;4575:32:5;;;;;;;;;;;;;;;;;-1:-1:-1;4575:32:5;;;:42;;;;;;;;;;;;:53;;-1:-1:-1;;4575:53:5;;;;;;;;;;;4658:12;:10;:12::i;:::-;-1:-1:-1;;;;;4643:48:5;;4682:8;4643:48;;;;;;;;;;;;;;;;;;;;4392:306;;:::o;4765:166::-;-1:-1:-1;;;;;4887:27:5;;;4864:4;4887:27;;;:18;:27;;;;;;;;:37;;;;;;;;;;;;;;;4765:166::o;4998:897::-;-1:-1:-1;;;;;5213:16:5;;5205:66;;;;-1:-1:-1;;;5205:66:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5310:12;:10;:12::i;:::-;-1:-1:-1;;;;;5302:20:5;:4;-1:-1:-1;;;;;5302:20:5;;:60;;;;5326:36;5343:4;5349:12;:10;:12::i;5326:36::-;5281:148;;;;-1:-1:-1;;;5281:148:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5440:16;5459:12;:10;:12::i;:::-;5440:31;;5482:96;5503:8;5513:4;5519:2;5523:21;5541:2;5523:17;:21::i;:::-;5546:25;5564:6;5546:17;:25::i;:::-;5573:4;5482:20;:96::i;:::-;5611:77;5635:6;5611:77;;;;;;;;;;;;;;;;;:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;5611:19:5;;;;;;;;;;;:77;:23;:77::i;:::-;5589:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;5589:19:5;;;;;;;;;;:99;;;;5718:17;;;;;;:29;;5740:6;5718:21;:29::i;:::-;5698:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;5698:17:5;;;;;;;;;;;;;:49;;;;5763:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5820:68;5851:8;5861:4;5867:2;5871;5875:6;5883:4;5820:30;:68::i;828:104:10:-;915:10;828:104;;:::o;5443:163:3:-;5529:7;5564:12;5556:6;;;;5548:29;;;;-1:-1:-1;;;5548:29:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5594:5:3;;;5443:163::o;2701:175::-;2759:7;2790:5;;;2813:6;;;;2805:46;;;;;-1:-1:-1;;;2805:46:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;2868:1;2701:175;-1:-1:-1;;;2701:175:3:o;13695:800:5:-;13939:15;:2;-1:-1:-1;;;;;13939:13:5;;:15::i;:::-;13935:554;;;14002:2;-1:-1:-1;;;;;13974:54:5;;14029:8;14039:4;14045:3;14050:7;14059:4;13974:90;;;;;;;;;;;;;-1:-1:-1;;;;;13974:90:5;;;;;;-1:-1:-1;;;;;13974:90:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13974:90:5;;;13970:509;;;;:::i;:::-;;;;;;;;14348:14;;-1:-1:-1;;;14348:14:5;;;;;;;;;;;;;;;;;14355:6;;14348:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13970:509;14402:62;;-1:-1:-1;;;14402:62:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13970:509;-1:-1:-1;;;;;;14113:75:5;;-1:-1:-1;;;14113:75:5;14109:172;;14212:50;;-1:-1:-1;;;14212:50:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14109:172;14065:230;13695:800;;;;;;:::o;14501:193::-;14620:16;;;14634:1;14620:16;;;;;;;;;14567;;;;14620;;;;;;;;;;;;-1:-1:-1;14620:16:5;14595:41;;14657:7;14646:5;14652:1;14646:8;;;;;;;;;;;;;;;;;:18;14682:5;14501:193;-1:-1:-1;;14501:193:5:o;12926:763::-;13145:15;:2;-1:-1:-1;;;;;13145:13:5;;:15::i;:::-;13141:542;;;13208:2;-1:-1:-1;;;;;13180:49:5;;13230:8;13240:4;13246:2;13250:6;13258:4;13180:83;;;;;;;;;;;;;-1:-1:-1;;;;;13180:83:5;;;;;;-1:-1:-1;;;;;13180:83:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13180:83:5;;;13176:497;;;;:::i;:::-;-1:-1:-1;;;;;;13312:70:5;;-1:-1:-1;;;13312:70:5;13308:167;;13406:50;;-1:-1:-1;;;13406:50:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;737:413:9;1097:20;1135:8;;;737:413::o;110:106:-1:-;195:3;191:15;;163:53::o;224:739::-;;297:4;279:16;276:26;273:2;;;305:5;;273:2;339:1;-1:-1;;318:23;414:10;357:34;-1:-1;382:8;357:34;:::i;:::-;406:19;396:2;;429:5;;396:2;460;454:9;496:16;-1:-1;;492:24;339:1;454:9;468:49;543:4;537:11;624:16;576:18;624:16;617:4;609:6;605:17;602:39;576:18;568:6;565:30;556:91;553:2;;;655:5;;;;;;553:2;693:6;687:4;683:17;672:28;;725:3;719:10;705:24;;576:18;740:6;737:30;734:2;;;770:5;;;;;;734:2;;847:16;841:4;837:27;807:4;814:6;802:3;794:27;;829:36;826:2;;;868:5;;;;;826:2;89:7;73:14;-1:-1;;69:28;892:50;;807:4;892:50;460:2;881:62;900:3;-1:-1;;267:696;:::o" - }, - "methodIdentifiers": { - "balanceOf(address,uint256)": "00fdd58e", - "balanceOfBatch(address[],uint256[])": "4e1273f4", - "isApprovedForAll(address,address)": "e985e9c5", - "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": "2eb2c2d6", - "safeTransferFrom(address,address,uint256,uint256,bytes)": "f242432a", - "setApprovalForAll(address,bool)": "a22cb465", - "supportsInterface(bytes4)": "01ffc9a7", - "uri(uint256)": "0e89341c" - } - } - } - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol": { - "IERC1155MetadataURIUpgradeable": { - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "methodIdentifiers": { - "balanceOf(address,uint256)": "00fdd58e", - "balanceOfBatch(address[],uint256[])": "4e1273f4", - "isApprovedForAll(address,address)": "e985e9c5", - "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": "2eb2c2d6", - "safeTransferFrom(address,address,uint256,uint256,bytes)": "f242432a", - "setApprovalForAll(address,bool)": "a22cb465", - "supportsInterface(bytes4)": "01ffc9a7", - "uri(uint256)": "0e89341c" - } - } - } - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol": { - "IERC1155ReceiverUpgradeable": { - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "methodIdentifiers": { - "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": "bc197c81", - "onERC1155Received(address,address,uint256,uint256,bytes)": "f23a6e61", - "supportsInterface(bytes4)": "01ffc9a7" - } - } - } - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol": { - "IERC1155Upgradeable": { - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "methodIdentifiers": { - "balanceOf(address,uint256)": "00fdd58e", - "balanceOfBatch(address[],uint256[])": "4e1273f4", - "isApprovedForAll(address,address)": "e985e9c5", - "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": "2eb2c2d6", - "safeTransferFrom(address,address,uint256,uint256,bytes)": "f242432a", - "setApprovalForAll(address,bool)": "a22cb465", - "supportsInterface(bytes4)": "01ffc9a7" - } - } - } - }, - "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { - "AddressUpgradeable": { - "abi": [], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ef8db8ba80199c2e00b48aaa23f5a3dfa1f6bf81c43264af150453b95d6732ca64736f6c63430007000033", - "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xEF DUP14 0xB8 0xBA DUP1 NOT SWAP13 0x2E STOP 0xB4 DUP11 0xAA 0x23 CREATE2 LOG3 0xDF LOG1 0xF6 0xBF DUP2 0xC4 ORIGIN PUSH5 0xAF150453B9 0x5D PUSH8 0x32CA64736F6C6343 STOP SMOD STOP STOP CALLER ", - "sourceMap": "134:6715:9:-:0;;;;;;;;;;;;;;;;;;;;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ef8db8ba80199c2e00b48aaa23f5a3dfa1f6bf81c43264af150453b95d6732ca64736f6c63430007000033", - "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xEF DUP14 0xB8 0xBA DUP1 NOT SWAP13 0x2E STOP 0xB4 DUP11 0xAA 0x23 CREATE2 LOG3 0xDF LOG1 0xF6 0xBF DUP2 0xC4 ORIGIN PUSH5 0xAF150453B9 0x5D PUSH8 0x32CA64736F6C6343 STOP SMOD STOP STOP CALLER ", - "sourceMap": "134:6715:9:-:0;;;;;;;;" - }, - "methodIdentifiers": {} - } - } - }, - "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { - "ContextUpgradeable": { - "abi": [], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "", - "opcodes": "", - "sourceMap": "" - }, - "methodIdentifiers": {} - } - } - }, - "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol": { - "CountersUpgradeable": { - "abi": [], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208747e29286b42499e93d77989bfd0696da2f9d290887e0570062170e6586ec9064736f6c63430007000033", - "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP8 SELFBALANCE 0xE2 SWAP3 DUP7 0xB4 0x24 SWAP10 0xE9 RETURNDATASIZE PUSH24 0x989BFD0696DA2F9D290887E0570062170E6586EC9064736F PUSH13 0x63430007000033000000000000 ", - "sourceMap": "681:870:11:-:0;;;;;;;;;;;;;;;;;;;;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208747e29286b42499e93d77989bfd0696da2f9d290887e0570062170e6586ec9064736f6c63430007000033", - "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP8 SELFBALANCE 0xE2 SWAP3 DUP7 0xB4 0x24 SWAP10 0xE9 RETURNDATASIZE PUSH24 0x989BFD0696DA2F9D290887E0570062170E6586EC9064736F PUSH13 0x63430007000033000000000000 ", - "sourceMap": "681:870:11:-:0;;;;;;;;" - }, - "methodIdentifiers": {} - } - } - }, - "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol": { - "EnumerableSetUpgradeable": { - "abi": [], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204289511de4d750a50544cf2879fc5fd2114e4e936901fde5c9d8cd93a9013ede64736f6c63430007000033", - "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 TIMESTAMP DUP10 MLOAD SAR 0xE4 0xD7 POP 0xA5 SDIV DIFFICULTY 0xCF 0x28 PUSH26 0xFC5FD2114E4E936901FDE5C9D8CD93A9013EDE64736F6C634300 SMOD STOP STOP CALLER ", - "sourceMap": "753:8645:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204289511de4d750a50544cf2879fc5fd2114e4e936901fde5c9d8cd93a9013ede64736f6c63430007000033", - "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 TIMESTAMP DUP10 MLOAD SAR 0xE4 0xD7 POP 0xA5 SDIV DIFFICULTY 0xCF 0x28 PUSH26 0xFC5FD2114E4E936901FDE5C9D8CD93A9013EDE64736F6C634300 SMOD STOP STOP CALLER ", - "sourceMap": "753:8645:12:-:0;;;;;;;;" - }, - "methodIdentifiers": {} - } - } - }, - "src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol": { - "NetEmissionsTokenNetwork": { - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "RegisteredConsumer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "RegisteredDealer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "availableBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "retiredBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "dateCreated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "TokenCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRetired", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "UnregisteredConsumer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "UnregisteredDealer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_CONSUMER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_EMISSIONS_AUDITOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_OFFSET_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_REC_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getAvailableAndRetired", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getIssuer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNumOfUniqueTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getRoles", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenDetails", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dateCreated", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "internalType": "struct NetEmissionsTokenNetwork.CarbonTokenDetails", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenRetiredAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenType", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isConsumerRegistered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isDealerRegistered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "issue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "issueOnBehalf", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "limitedMode", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "registerConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - } - ], - "name": "registerDealer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "retire", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_limitedMode", - "type": "bool" - } - ], - "name": "setLimitedMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_timelock", - "type": "address" - } - ], - "name": "setTimelock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "unregisterConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - } - ], - "name": "unregisterDealer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "608060405234801561001057600080fd5b5061492e806100206000396000f3fe608060405234801561001057600080fd5b50600436106102735760003560e01c80637f157c9b11610151578063ce6ccfaf116100c3578063e985e9c511610087578063e985e9c514610575578063f000be9814610588578063f242432a1461059b578063f851a440146105ae578063fcba7948146105b6578063fd0c4a9a146105be57610273565b8063ce6ccfaf14610510578063d547741f14610534578063dba851b014610547578063ddc3e6eb1461054f578063e2e564f21461056257610273565b8063a217fddf11610115578063a217fddf1461049c578063a22cb465146104a4578063bdacb303146104b7578063c1e03728146104ca578063c4d66de8146104ea578063ca15c873146104fd57610273565b80637f157c9b146104225780639010d07c1461044357806391d148541461046357806392089c4614610476578063a0d975a71461048957610273565b806331aa4b20116101ea57806353dbe982116101ae57806353dbe982146103d15780635ddb368f146103e457806369f7ef44146103ec57806376aed2e1146103ff57806376ce47551461041257806378e5c5921461041a57610273565b806331aa4b201461036557806333781a0e1461037857806336568abe1461038b57806344b22fdd1461039e5780634e1273f4146103b157610273565b806318a50d7e1161023c57806318a50d7e146103095780631ef68ef714610311578063248a9ca314610319578063293a7f2e1461032c5780632eb2c2d61461033f5780632f2ff15d1461035257610273565b8062fdd58e1461027857806301ffc9a7146102a1578063095bcdb6146102c15780630e89341c146102d6578063156e29f6146102f6575b600080fd5b61028b61028636600461325c565b6105d1565b60405161029891906137a3565b60405180910390f35b6102b46102af3660046134f2565b61062d565b604051610298919061376f565b6102d46102cf366004613286565b610650565b005b6102e96102e4366004613495565b610775565b60405161029891906137ac565b6102d4610304366004613286565b61080d565b61028b61089c565b61028b6108ae565b61028b610327366004613495565b6108c0565b6102d461033a3660046134d1565b6108d5565b6102d461034d366004613030565b610a56565b6102d46103603660046134ad565b610c75565b6102d46103733660046132b9565b610cbd565b6102b4610386366004612fe1565b610dbe565b6102d46103993660046134ad565b610dd8565b6102d46103ac366004612fe1565b610e1a565b6103c46103bf3660046133b3565b610f1f565b604051610298919061372e565b6102d46103df366004612fe1565b610fec565b61028b6110f1565b6102b46103fa366004612fe1565b611103565b6102e961040d366004613495565b611185565b61028b61127e565b61028b611290565b61043561043036600461325c565b6112a2565b60405161029892919061464f565b6104566104513660046134d1565b611339565b604051610298919061365e565b6102b46104713660046134ad565b611358565b610456610484366004613495565b611370565b61028b61049736600461325c565b611393565b61028b6113e2565b6102d46104b2366004613221565b6113e7565b6102d46104c5366004612fe1565b6114b5565b6104dd6104d8366004613495565b6114fe565b6040516102989190614577565b6102d46104f8366004612fe1565b61173e565b61028b61050b366004613495565b61189e565b61052361051e366004612fe1565b6118b5565b60405161029895949392919061377a565b6102d46105423660046134ad565b611949565b6102b4611983565b6102d461055d366004613475565b61198c565b6102d46105703660046132b9565b6119c6565b6102b4610583366004612ffc565b611ad4565b6102d461059636600461313f565b611b02565b6102d46105a93660046130da565b611b5b565b610456611cef565b61028b611d03565b6102d46105cc3660046132e4565b611d15565b60006001600160a01b0383166106025760405162461bcd60e51b81526004016105f99061398a565b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b600061066a60008051602061484f83398151915233611358565b905060006106866000805160206148b983398151915233611358565b905060006106a260008051602061482f83398151915233611358565b905060006106be6000805160206148d983398151915233611358565b905083806106c95750825b806106d15750815b806106d95750805b6106f55760405162461bcd60e51b81526004016105f990614416565b6106fe86611db6565b61071a5760405162461bcd60e51b81526004016105f990613fd7565b336001600160a01b03881614156107435760405162461bcd60e51b81526004016105f990613edf565b61076c33888888604051806040016040528060048152602001630307830360e41b815250611b5b565b50505050505050565b60678054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50505050509050919050565b610818600033611358565b6108345760405162461bcd60e51b81526004016105f990613c1a565b61083d82611db6565b6108595760405162461bcd60e51b81526004016105f990613a87565b60c95460ff161561087c5760405162461bcd60e51b81526004016105f990613f35565b61089783838360405180602001604052806000815250611dd8565b505050565b60008051602061486f83398151915281565b60008051602061482f83398151915281565b60009081526097602052604090206002015490565b60006108ef60008051602061484f83398151915233611358565b9050600061090b6000805160206148b983398151915233611358565b9050600061092760008051602061482f83398151915233611358565b905060006109436000805160206148d983398151915233611358565b9050838061094e5750825b806109565750815b8061095e5750805b61097a5760405162461bcd60e51b81526004016105f990614416565b61098386611db6565b61099f5760405162461bcd60e51b81526004016105f990613a0c565b6109a933876105d1565b8511156109c85760405162461bcd60e51b81526004016105f990613d06565b6109d3338787611ec3565b600086815260cd602090815260408083203384529091529020546109f79086611fd9565b600087815260cd602090815260408083203380855292529182902092909255517f8f1b5ebb586d3d169e4ed07db9cd10ce0dd30c7b656171310eae7517c0b53cf990610a46908990899061464f565b60405180910390a2505050505050565b8151835114610a775760405162461bcd60e51b81526004016105f99061438d565b6001600160a01b038416610a9d5760405162461bcd60e51b81526004016105f990613db7565b610aa5611ffe565b6001600160a01b0316856001600160a01b03161480610acb5750610acb85610583611ffe565b610ae75760405162461bcd60e51b81526004016105f990613dfc565b6000610af1611ffe565b9050610b01818787878787612002565b60005b8451811015610c07576000858281518110610b1b57fe5b602002602001015190506000858381518110610b3357fe5b60200260200101519050610ba0816040518060600160405280602a815260200161488f602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020546120ff9092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a1681522054610bd79082611fd9565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610b04565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c57929190613741565b60405180910390a4610c6d81878787878761212b565b505050505050565b600082815260976020526040902060020154610c9390610471611ffe565b610caf5760405162461bcd60e51b81526004016105f9906138f2565b610cb98282612239565b5050565b610cc8600033611358565b610ce45760405162461bcd60e51b81526004016105f990613c1a565b610ced816122a2565b610d095760405162461bcd60e51b81526004016105f990613f87565b8060ff1660011415610d3257610d2d6000805160206148b983398151915283610c75565b610d6e565b8060ff1660021415610d5657610d2d60008051602061482f83398151915283610c75565b610d6e6000805160206148d983398151915283610c75565b610d8660008051602061486f83398151915283610c75565b6040516001600160a01b038316907fa8377deee15954185683d55effd369508b4935978c8cb2bab790bf04c570181490600090a25050565b600061062760008051602061484f83398151915283611358565b610de0611ffe565b6001600160a01b0316816001600160a01b031614610e105760405162461bcd60e51b81526004016105f9906144b7565b610cb982826122c7565b6000610e346000805160206148b983398151915233611358565b90506000610e5060008051602061482f83398151915233611358565b90506000610e6c6000805160206148d983398151915233611358565b90508280610e775750815b80610e7f5750805b610e9b5760405162461bcd60e51b81526004016105f990613941565b60c95460ff1615610ecd57610eb1600033611358565b610ecd5760405162461bcd60e51b81526004016105f99061401d565b610ee560008051602061484f83398151915285610c75565b6040516001600160a01b038516907f69a0adee259d26fe61f4776f7bea7f3a9737c7321256821b985f988545efd31990600090a250505050565b60608151835114610f425760405162461bcd60e51b81526004016105f9906142f4565b6060835167ffffffffffffffff81118015610f5c57600080fd5b50604051908082528060200260200182016040528015610f86578160200160208202803683370190505b50905060005b8451811015610fe457610fc5858281518110610fa457fe5b6020026020010151858381518110610fb857fe5b60200260200101516105d1565b828281518110610fd157fe5b6020908102919091010152600101610f8c565b509392505050565b60006110066000805160206148b983398151915233611358565b9050600061102260008051602061482f83398151915233611358565b9050600061103e6000805160206148d983398151915233611358565b905082806110495750815b806110515750805b61106d5760405162461bcd60e51b81526004016105f990613941565b60c95460ff161561109f57611083600033611358565b61109f5760405162461bcd60e51b81526004016105f990613b64565b6110b760008051602061484f83398151915285611949565b6040516001600160a01b038516907f03a38088da75ee2d80f6c753f55f8fd17602ae17d8bd0ef44d5e1f28ab5af11f90600090a250505050565b60006110fd60cb612330565b90505b90565b60008061111e6000805160206148b983398151915284611358565b9050600061113a60008051602061482f83398151915285611358565b905060006111566000805160206148d983398151915286611358565b905082806111615750815b806111695750805b1561117a576001935050505061064b565b506000949350505050565b606061119082611db6565b6111ac5760405162461bcd60e51b81526004016105f990613bd0565b600082815260cc6020526040902060018082015460ff16141561120457505060408051808201909152601c81527f52656e657761626c6520456e6572677920436572746966696361746500000000602082015261064b565b600181015460ff166002141561124f57505060408051808201909152601781527f436172626f6e20456d697373696f6e73204f6666736574000000000000000000602082015261064b565b50506040805180820190915260118152704175646974656420456d697373696f6e7360781b6020820152919050565b6000805160206148d983398151915281565b60008051602061484f83398151915281565b60008060006112b185856105d1565b60405163a0d975a760e01b8152909150600090309063a0d975a7906112dc9089908990600401613715565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c919061352a565b9196919550909350505050565b60008281526097602052604081206113519083612334565b9392505050565b60008281526097602052604081206113519083612340565b600090815260cc602052604090206001015461010090046001600160a01b031690565b600061139e82611db6565b6113ba5760405162461bcd60e51b81526004016105f990614130565b50600090815260cd602090815260408083206001600160a01b03949094168352929052205490565b600081565b816001600160a01b03166113f9611ffe565b6001600160a01b031614156114205760405162461bcd60e51b81526004016105f9906142ab565b806066600061142d611ffe565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611471611ffe565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114a9919061376f565b60405180910390a35050565b6114c0600033611358565b6114dc5760405162461bcd60e51b81526004016105f990613c1a565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b611506612de0565b600082815260cc60209081526040918290208251610160810184528154815260018083015460ff811683860152610100908190046001600160a01b0390811684880152600280860154909116606085015260038501546080850152600485015460a0850152600585015460c0850152600685015460e08501526007850180548851948116158402600019011691909104601f81018790048702840187019097528683529295939490860193919291908301828280156116065780601f106115db57610100808354040283529160200191611606565b820191906000526020600020905b8154815290600101906020018083116115e957829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561169a5780601f1061166f5761010080835404028352916020019161169a565b820191906000526020600020905b81548152906001019060200180831161167d57829003601f168201915b505050918352505060098201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050815250509050919050565b600054610100900460ff16806117575750611757612355565b80611765575060005460ff16155b6117815760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156117ac576000805460ff1961ff0019909116610100171660011790555b6117c460405180602001604052806000815250612366565b6117ea60008051602061484f83398151915260008051602061486f833981519152612402565b6117f5600083610caf565b61180d60008051602061486f83398151915283610caf565b6118256000805160206148b983398151915283610caf565b61183d60008051602061482f83398151915283610caf565b6118556000805160206148d983398151915283610caf565b60c9805460ca80546001600160a01b0319169055610100600160a81b0319166101006001600160a01b038516021760ff191690558015610cb9576000805461ff00191690555050565b600081815260976020526040812061062790612454565b600080808080806118c68188611358565b905060006118e26000805160206148b983398151915289611358565b905060006118fe60008051602061482f8339815191528a611358565b9050600061191a6000805160206148d98339815191528b611358565b9050600061193660008051602061484f8339815191528c611358565b949b939a50919850965091945092505050565b60008281526097602052604090206002015461196790610471611ffe565b610e105760405162461bcd60e51b81526004016105f990613cb6565b60c95460ff1681565b611997600033611358565b6119b35760405162461bcd60e51b81526004016105f990613c1a565b60c9805460ff1916911515919091179055565b6119d1600033611358565b6119ed5760405162461bcd60e51b81526004016105f990613c1a565b6119f6816122a2565b611a125760405162461bcd60e51b81526004016105f990613ac9565b8060ff1660011415611a3b57611a366000805160206148b983398151915283611949565b611a77565b8060ff1660021415611a5f57611a3660008051602061482f83398151915283611949565b611a776000805160206148d983398151915283611949565b611a8082611103565b611a9c57611a9c60008051602061486f83398151915283611949565b6040516001600160a01b038316907f98552ded770f1d05a505572f3387c108dbc6b566ea3d49f83cff3d1f1c72a04290600090a25050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b60ca546001600160a01b0316331480611b215750611b21600033611358565b611b3d5760405162461bcd60e51b81526004016105f990613813565b611b4f8a8a8a8a8a8a8a8a8a8a61245f565b50505050505050505050565b6001600160a01b038416611b815760405162461bcd60e51b81526004016105f990613db7565b611b89611ffe565b6001600160a01b0316856001600160a01b03161480611baf5750611baf85610583611ffe565b611bcb5760405162461bcd60e51b81526004016105f990613b1b565b6000611bd5611ffe565b9050611bf5818787611be68861292b565b611bef8861292b565b87612002565b611c3c836040518060600160405280602a815260200161488f602a913960008781526065602090815260408083206001600160a01b038d16845290915290205491906120ff565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054611c739084611fd9565b60008581526065602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188811691908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611cd9908990899061464f565b60405180910390a4610c6d81878787878761296f565b60c95461010090046001600160a01b031681565b6000805160206148b983398151915281565b6000611d2f6000805160206148b983398151915233611358565b90506000611d4b60008051602061482f83398151915233611358565b90506000611d676000805160206148d983398151915233611358565b90508280611d725750815b80611d7a5750805b611d965760405162461bcd60e51b81526004016105f990613941565b611da88c338d8d8d8d8d8d8d8d61245f565b505050505050505050505050565b600081611dc360cb612330565b10611dd05750600161064b565b506000919050565b6001600160a01b038416611dfe5760405162461bcd60e51b81526004016105f9906143d5565b6000611e08611ffe565b9050611e1a81600087611be68861292b565b60008481526065602090815260408083206001600160a01b0389168452909152902054611e479084611fd9565b60008581526065602090815260408083206001600160a01b03808b16808652919093528184209490945551908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611ea5908990899061464f565b60405180910390a4611ebc8160008787878761296f565b5050505050565b6001600160a01b038316611ee95760405162461bcd60e51b81526004016105f990613e9c565b6000611ef3611ffe565b9050611f2381856000611f058761292b565b611f0e8761292b565b60405180602001604052806000815250612002565b611f6a8260405180606001604052806024815260200161480b6024913960008681526065602090815260408083206001600160a01b038b16845290915290205491906120ff565b60008481526065602090815260408083206001600160a01b03808a16808652919093528184209490945551919291908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611fcb908890889061464f565b60405180910390a450505050565b6000828201838110156113515760405162461bcd60e51b81526004016105f990613a50565b3390565b612010868686868686610c6d565b60005b835181101561076c57600060cc600086848151811061202e57fe5b60200260200101518152602001908152602001600020905060c960009054906101000a900460ff16156120f5576001600160a01b03861661206f57506120f7565b600181015460ff166003146120c15760ca546001600160a01b03898116911614806120a057506120a0600089611358565b6120bc5760405162461bcd60e51b81526004016105f990614506565b6120f5565b6120d96000805160206148d983398151915289611358565b6120f55760405162461bcd60e51b81526004016105f990614183565b505b600101612013565b600081848411156121235760405162461bcd60e51b81526004016105f991906137ac565b505050900390565b61213d846001600160a01b0316612a40565b15610c6d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121769089908990889088908890600401613672565b602060405180830381600087803b15801561219057600080fd5b505af19250505080156121c0575060408051601f3d908101601f191682019092526121bd9181019061350e565b60015b612209576121cc61473a565b806121d757506121f1565b8060405162461bcd60e51b81526004016105f991906137ac565b60405162461bcd60e51b81526004016105f9906137bf565b6001600160e01b0319811663bc197c8160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b60008281526097602052604090206122519082612a46565b15610cb95761225e611ffe565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000808260ff161180156122ba575060038260ff1611155b15611dd05750600161064b565b60008281526097602052604090206122df9082612a5b565b15610cb9576122ec611ffe565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b5490565b60006113518383612a70565b6000611351836001600160a01b038416612ab5565b600061236030612a40565b15905090565b600054610100900460ff168061237f575061237f612355565b8061238d575060005460ff16155b6123a95760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156123d4576000805460ff1961ff0019909116610100171660011790555b6123dc612acd565b6123e4612b50565b6123ed82612bce565b8015610cb9576000805461ff00191690555050565b600082815260976020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526097602052604090912060020155565b600061062782612330565b612468886122a2565b6124845760405162461bcd60e51b81526004016105f990614473565b60c95460ff1615612596578760ff16600114806124a457508760ff166002145b156125515760ca546001600160a01b031633146124d35760405162461bcd60e51b81526004016105f9906140e2565b6124de60008b611358565b6124fa5760405162461bcd60e51b81526004016105f990614264565b6125126000805160206148b98339815191528a611358565b80612530575061253060008051602061482f8339815191528a611358565b61254c5760405162461bcd60e51b81526004016105f990613d5a565b612591565b8760ff1660031415612591576125756000805160206148d98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990614206565b612656565b8760ff16600114156125d6576125ba6000805160206148b98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f99061433d565b8760ff1660021415612616576125fa60008051602061482f8339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990613c63565b8760ff16600314156126565761263a6000805160206148d98339815191528a611358565b6126565760405162461bcd60e51b81526004016105f990614085565b61266060cb612c65565b600060cc600061267060cb612330565b8152602001908152602001600020905061268a60cb612330565b8160000181905550888160010160006101000a81548160ff021916908360ff1602179055508a8160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160010160016101000a8154816001600160a01b0302191690836001600160a01b031602179055508681600301819055508581600401819055508481600601819055504281600501819055508381600701908051906020019061273d929190612e4f565b5082516127539060088301906020860190612e4f565b5081516127699060098301906020850190612e4f565b5061278e8b61277860cb612330565b8a60405180602001604052806000815250611dd8565b8860ff166003141561281257600281015481546127b5916001600160a01b0316908a611ec3565b8054600090815260cd6020908152604080832060028501546001600160a01b031684529091529020546127e89089611fd9565b8154600090815260cd6020908152604080832060028601546001600160a01b031684529091529020555b8060020160009054906101000a90046001600160a01b03166001600160a01b03168160010160019054906101000a90046001600160a01b03166001600160a01b03167f99cc3eeb446560c9a2d2483bc5160735ec0fb1851aea3bde32e7a56c30c11da68a60cd60008660000154815260200190815260200160002060008660020160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000205485600001548660010160009054906101000a900460ff168760030154886004015489600601548a600501548b6007018c6008018d6009016040516129169b9a9998979695949392919061465d565b60405180910390a35050505050505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061295e57fe5b602090810291909101015292915050565b612981846001600160a01b0316612a40565b15610c6d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906129ba90899089908890889088906004016136d0565b602060405180830381600087803b1580156129d457600080fd5b505af1925050508015612a04575060408051601f3d908101601f19168201909252612a019181019061350e565b60015b612a10576121cc61473a565b6001600160e01b0319811663f23a6e6160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b3b151590565b6000611351836001600160a01b038416612c6e565b6000611351836001600160a01b038416612cb8565b81546000908210612a935760405162461bcd60e51b81526004016105f990613868565b826000018281548110612aa257fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b600054610100900460ff1680612ae65750612ae6612355565b80612af4575060005460ff16155b612b105760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612b3b576000805460ff1961ff0019909116610100171660011790555b8015612b4d576000805461ff00191690555b50565b600054610100900460ff1680612b695750612b69612355565b80612b77575060005460ff16155b612b935760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612bbe576000805460ff1961ff0019909116610100171660011790555b612b3b6301ffc9a760e01b612d7e565b600054610100900460ff1680612be75750612be7612355565b80612bf5575060005460ff16155b612c115760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612c3c576000805460ff1961ff0019909116610100171660011790555b612c4582612dcd565b612c55636cdb3d1360e11b612d7e565b6123ed6303a24d0760e21b612d7e565b80546001019055565b6000612c7a8383612ab5565b612cb057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610627565b506000610627565b60008181526001830160205260408120548015612d745783546000198083019190810190600090879083908110612ceb57fe5b9060005260206000200154905080876000018481548110612d0857fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612d3857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610627565b6000915050610627565b6001600160e01b03198082161415612da85760405162461bcd60e51b81526004016105f9906139d5565b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b8051610cb9906067906020840190612e4f565b60405180610160016040528060008152602001600060ff16815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016060815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e9057805160ff1916838001178555612ebd565b82800160010185558215612ebd579182015b82811115612ebd578251825591602001919060010190612ea2565b50612ec9929150612ecd565b5090565b5b80821115612ec95760008155600101612ece565b80356001600160a01b038116811461062757600080fd5b600082601f830112612f09578081fd5b8135612f1c612f1782614708565b6146e1565b818152915060208083019084810181840286018201871015612f3d57600080fd5b60005b84811015612f5c57813584529282019290820190600101612f40565b505050505092915050565b600082601f830112612f77578081fd5b813567ffffffffffffffff811115612f8d578182fd5b612fa0601f8201601f19166020016146e1565b9150808252836020828501011115612fb757600080fd5b8060208401602084013760009082016020015292915050565b803560ff8116811461062757600080fd5b600060208284031215612ff2578081fd5b6113518383612ee2565b6000806040838503121561300e578081fd5b6130188484612ee2565b91506130278460208501612ee2565b90509250929050565b600080600080600060a08688031215613047578081fd5b8535613052816147df565b94506020860135613062816147df565b9350604086013567ffffffffffffffff8082111561307e578283fd5b61308a89838a01612ef9565b9450606088013591508082111561309f578283fd5b6130ab89838a01612ef9565b935060808801359150808211156130c0578283fd5b506130cd88828901612f67565b9150509295509295909350565b600080600080600060a086880312156130f1578081fd5b6130fb8787612ee2565b945061310a8760208801612ee2565b93506040860135925060608601359150608086013567ffffffffffffffff811115613133578182fd5b6130cd88828901612f67565b6000806000806000806000806000806101408b8d03121561315e578485fd5b6131688c8c612ee2565b99506131778c60208d01612ee2565b98506131868c60408d01612fd0565b975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013567ffffffffffffffff808211156131be578485fd5b6131ca8e838f01612f67565b94506101008d01359150808211156131e0578384fd5b6131ec8e838f01612f67565b93506101208d0135915080821115613202578283fd5b5061320f8d828e01612f67565b9150509295989b9194979a5092959850565b60008060408385031215613233578182fd5b61323d8484612ee2565b915060208301358015158114613251578182fd5b809150509250929050565b6000806040838503121561326e578182fd5b6132788484612ee2565b946020939093013593505050565b60008060006060848603121561329a578081fd5b6132a48585612ee2565b95602085013595506040909401359392505050565b600080604083850312156132cb578182fd5b6132d58484612ee2565b91506130278460208501612fd0565b60008060008060008060008060006101208a8c031215613302578283fd5b61330c8b8b612ee2565b985061331b8b60208c01612fd0565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013567ffffffffffffffff80821115613353578485fd5b61335f8d838e01612f67565b945060e08c0135915080821115613374578384fd5b6133808d838e01612f67565b93506101008c0135915080821115613396578283fd5b506133a38c828d01612f67565b9150509295985092959850929598565b600080604083850312156133c5578182fd5b823567ffffffffffffffff808211156133dc578384fd5b818501915085601f8301126133ef578384fd5b81356133fd612f1782614708565b80828252602080830192508086018a82838702890101111561341d578889fd5b8896505b84871015613447576134338b82612ee2565b845260019690960195928101928101613421565b50909650870135935050508082111561345e578283fd5b5061346b85828601612ef9565b9150509250929050565b600060208284031215613486578081fd5b81358015158114611351578182fd5b6000602082840312156134a6578081fd5b5035919050565b600080604083850312156134bf578182fd5b823591506020830135613251816147df565b600080604083850312156134e3578182fd5b50508035926020909101359150565b600060208284031215613503578081fd5b8135611351816147f4565b60006020828403121561351f578081fd5b8151611351816147f4565b60006020828403121561353b578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561357e57815187529582019590820190600101613562565b509495945050505050565b60008151808452815b818110156135ae57602081850181015186830182015201613592565b818111156135bf5782602083870101525b50601f01601f19169290920160200192915050565b600081546001808216600081146135f257600181146136105761364e565b60028304607f16865260ff198316602087015260408601935061364e565b6002830480875261362086614728565b60005b828110156136445781546020828b0101528482019150602081019050613623565b8801602001955050505b50505092915050565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061369e9083018661354f565b82810360608401526136b0818661354f565b905082810360808401526136c48185613589565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061370a90830184613589565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b600060208252611351602083018461354f565b600060408252613754604083018561354f565b8281036020840152613766818561354f565b95945050505050565b901515815260200190565b941515855292151560208501529015156040840152151560608301521515608082015260a00190565b90815260200190565b6000602082526113516020830184613589565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b60208082526035908201527f434c4d383a3a69737375654f6e426568616c663a2063616c6c206d757374206360408201527437b6b290333937b6902220a79037b91030b236b4b760591b606082015260800190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526e0818591b5a5b881d1bc819dc985b9d608a1b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c794465616c65723a206d73672e73656e646572206e6f746040820152681030903232b0b632b960b91b606082015260800190565b6020808252602b908201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60408201526a65726f206164647265737360a81b606082015260800190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b60208082526024908201527f434c4d383a3a7265746972653a20746f6b656e496420646f6573206e6f7420656040820152631e1a5cdd60e21b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526022908201527f434c4d383a3a6d696e743a20746f6b656e496420646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b60208082526032908201527f434c4d383a3a756e72656769737465724465616c65723a20746f6b656e54797060408201527119525908191bd95cc81b9bdd08195e1a5cdd60721b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526046908201527f434c4d383a3a756e7265676973746572436f6e73756d6572286c696d6974656460408201527f293a206f6e6c792061646d696e2063616e20756e726567697374657220636f6e60608201526573756d65727360d01b608082015260a00190565b6020808252602a908201527f434c4d383a3a676574546f6b656e547970653a20746f6b656e496420646f6573604082015269081b9bdd08195e1a5cdd60b21b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c7941646d696e3a206d73672e73656e646572206e6f74206040820152683a34329030b236b4b760b91b606082015260800190565b60208082526033908201527f434c4d383a3a5f69737375653a20697373756572206e6f7420612072656769736040820152723a32b932b21037b33339b2ba103232b0b632b960691b606082015260800190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526f2061646d696e20746f207265766f6b6560801b606082015260800190565b60208082526034908201527f434c4d383a3a7265746972653a206e6f7420656e6f75676820617661696c61626040820152736c652062616c616e636520746f2072657469726560601b606082015260800190565b60208082526037908201527f434c4d383a3a5f6973737565286c696d69746564293a2070726f706f7365722060408201527f6e6f7420612072656769737465726564206465616c6572000000000000000000606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526036908201527f434c4d383a3a7472616e736665723a2073656e64657220616e642072656365696040820152757665722063616e6e6f74206265207468652073616d6560501b606082015260800190565b60208082526032908201527f434c4d383a3a6d696e743a2063616e6e6f74206d696e74206e657720746f6b656040820152716e7320696e206c696d69746564206d6f646560701b606082015260800190565b60208082526030908201527f434c4d383a3a72656769737465724465616c65723a20746f6b656e547970654960408201526f1908191bd95cc81b9bdd08195e1a5cdd60821b606082015260800190565b60208082526026908201527f434c4d383a3a7472616e736665723a20746f6b656e496420646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b60208082526042908201527f434c4d383a3a7265676973746572436f6e73756d6572286c696d69746564293a60408201527f206f6e6c792061646d696e2063616e20726567697374657220636f6e73756d65606082015261727360f01b608082015260a00190565b60208082526037908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201527f746572656420656d697373696f6e732061756469746f72000000000000000000606082015260800190565b6020808252602e908201527f434c4d383a3a5f6973737565286c696d69746564293a206d73672e73656e646560408201526d72206e6f742074696d656c6f636b60901b606082015260800190565b60208082526033908201527f434c4d383a3a676574546f6b656e52657469726564416d6f756e743a20746f6b604082015272195b925908191bd95cc81b9bdd08195e1a5cdd606a1b606082015260800190565b60208082526058908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c7920656d697373696f6e732061756469746f72732063616e60608201527f206973737565206175646974656420656d697373696f6e730000000000000000608082015260a00190565b602080825260409082018190527f434c4d383a3a5f6973737565286c696d69746564293a20697373756572206e6f908201527f742061207265676973746572656420656d697373696f6e732061756469746f72606082015260800190565b60208082526027908201527f434c4d383a3a5f6973737565286c696d69746564293a20697373756565206e6f6040820152663a1030b236b4b760c91b606082015260800190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526030908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201526f3a32b932b2102922a1903232b0b632b960811b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252603d908201527f434c4d383a3a636f6e73756d65724f724465616c65723a206d73672e73656e6460408201527f6572206e6f74206120636f6e73756d6572206f722061206465616c6572000000606082015260800190565b60208082526024908201527f434c4d383a3a5f69737375653a20746f6b656e54797065496420697320696e76604082015263185b1a5960e21b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b6020808252604b908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c792061646d696e20616e642044414f2063616e207472616e60608201526a7366657220746f6b656e7360a81b608082015260a00190565b6000602082528251602083015260208301516145966040840182613657565b5060408301516145a96060840182613542565b5060608301516145bc6080840182613542565b50608083015160a083015260a083015160c083015260c083015160e083015260e08301516101008181850152808501519150506101606101208181860152614608610180860184613589565b9250808601519050601f196101408187860301818801526146298584613589565b9088015187820390920184880152935090506146458382613589565b9695505050505050565b918252602082015260400190565b60006101608d83528c60208401528b604084015260ff8b1660608401528960808401528860a08401528760c08401528660e0840152806101008401526146a5818401876135d4565b90508281036101208401526146ba81866135d4565b90508281036101408401526146cf81856135d4565b9e9d5050505050505050505050505050565b60405181810167ffffffffffffffff8111828210171561470057600080fd5b604052919050565b600067ffffffffffffffff82111561471e578081fd5b5060209081020190565b60009081526020902090565b60e01c90565b600060443d101561474a57611100565b600481823e6308c379a061475e8251614734565b1461476857611100565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156147985750505050611100565b828401925082519150808211156147b25750505050611100565b503d830160208284010111156147ca57505050611100565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114612b4d57600080fd5b6001600160e01b031981168114612b4d57600080fdfe455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76af8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e736665722ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12ca2646970667358221220055a69771b7a92b6338a8700f94a7ad5684ecca1ae185c3b59807314c8f1f23c64736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x492E DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x273 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x7F157C9B GT PUSH2 0x151 JUMPI DUP1 PUSH4 0xCE6CCFAF GT PUSH2 0xC3 JUMPI DUP1 PUSH4 0xE985E9C5 GT PUSH2 0x87 JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0x575 JUMPI DUP1 PUSH4 0xF000BE98 EQ PUSH2 0x588 JUMPI DUP1 PUSH4 0xF242432A EQ PUSH2 0x59B JUMPI DUP1 PUSH4 0xF851A440 EQ PUSH2 0x5AE JUMPI DUP1 PUSH4 0xFCBA7948 EQ PUSH2 0x5B6 JUMPI DUP1 PUSH4 0xFD0C4A9A EQ PUSH2 0x5BE JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0xCE6CCFAF EQ PUSH2 0x510 JUMPI DUP1 PUSH4 0xD547741F EQ PUSH2 0x534 JUMPI DUP1 PUSH4 0xDBA851B0 EQ PUSH2 0x547 JUMPI DUP1 PUSH4 0xDDC3E6EB EQ PUSH2 0x54F JUMPI DUP1 PUSH4 0xE2E564F2 EQ PUSH2 0x562 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0xA217FDDF GT PUSH2 0x115 JUMPI DUP1 PUSH4 0xA217FDDF EQ PUSH2 0x49C JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x4A4 JUMPI DUP1 PUSH4 0xBDACB303 EQ PUSH2 0x4B7 JUMPI DUP1 PUSH4 0xC1E03728 EQ PUSH2 0x4CA JUMPI DUP1 PUSH4 0xC4D66DE8 EQ PUSH2 0x4EA JUMPI DUP1 PUSH4 0xCA15C873 EQ PUSH2 0x4FD JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x7F157C9B EQ PUSH2 0x422 JUMPI DUP1 PUSH4 0x9010D07C EQ PUSH2 0x443 JUMPI DUP1 PUSH4 0x91D14854 EQ PUSH2 0x463 JUMPI DUP1 PUSH4 0x92089C46 EQ PUSH2 0x476 JUMPI DUP1 PUSH4 0xA0D975A7 EQ PUSH2 0x489 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x31AA4B20 GT PUSH2 0x1EA JUMPI DUP1 PUSH4 0x53DBE982 GT PUSH2 0x1AE JUMPI DUP1 PUSH4 0x53DBE982 EQ PUSH2 0x3D1 JUMPI DUP1 PUSH4 0x5DDB368F EQ PUSH2 0x3E4 JUMPI DUP1 PUSH4 0x69F7EF44 EQ PUSH2 0x3EC JUMPI DUP1 PUSH4 0x76AED2E1 EQ PUSH2 0x3FF JUMPI DUP1 PUSH4 0x76CE4755 EQ PUSH2 0x412 JUMPI DUP1 PUSH4 0x78E5C592 EQ PUSH2 0x41A JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x31AA4B20 EQ PUSH2 0x365 JUMPI DUP1 PUSH4 0x33781A0E EQ PUSH2 0x378 JUMPI DUP1 PUSH4 0x36568ABE EQ PUSH2 0x38B JUMPI DUP1 PUSH4 0x44B22FDD EQ PUSH2 0x39E JUMPI DUP1 PUSH4 0x4E1273F4 EQ PUSH2 0x3B1 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x18A50D7E GT PUSH2 0x23C JUMPI DUP1 PUSH4 0x18A50D7E EQ PUSH2 0x309 JUMPI DUP1 PUSH4 0x1EF68EF7 EQ PUSH2 0x311 JUMPI DUP1 PUSH4 0x248A9CA3 EQ PUSH2 0x319 JUMPI DUP1 PUSH4 0x293A7F2E EQ PUSH2 0x32C JUMPI DUP1 PUSH4 0x2EB2C2D6 EQ PUSH2 0x33F JUMPI DUP1 PUSH4 0x2F2FF15D EQ PUSH2 0x352 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH3 0xFDD58E EQ PUSH2 0x278 JUMPI DUP1 PUSH4 0x1FFC9A7 EQ PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x95BCDB6 EQ PUSH2 0x2C1 JUMPI DUP1 PUSH4 0xE89341C EQ PUSH2 0x2D6 JUMPI DUP1 PUSH4 0x156E29F6 EQ PUSH2 0x2F6 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x28B PUSH2 0x286 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x5D1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x37A3 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x2B4 PUSH2 0x2AF CALLDATASIZE PUSH1 0x4 PUSH2 0x34F2 JUMP JUMPDEST PUSH2 0x62D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x376F JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x2CF CALLDATASIZE PUSH1 0x4 PUSH2 0x3286 JUMP JUMPDEST PUSH2 0x650 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x2E9 PUSH2 0x2E4 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x775 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x304 CALLDATASIZE PUSH1 0x4 PUSH2 0x3286 JUMP JUMPDEST PUSH2 0x80D JUMP JUMPDEST PUSH2 0x28B PUSH2 0x89C JUMP JUMPDEST PUSH2 0x28B PUSH2 0x8AE JUMP JUMPDEST PUSH2 0x28B PUSH2 0x327 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x8C0 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x33A CALLDATASIZE PUSH1 0x4 PUSH2 0x34D1 JUMP JUMPDEST PUSH2 0x8D5 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x34D CALLDATASIZE PUSH1 0x4 PUSH2 0x3030 JUMP JUMPDEST PUSH2 0xA56 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x360 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0xC75 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x373 CALLDATASIZE PUSH1 0x4 PUSH2 0x32B9 JUMP JUMPDEST PUSH2 0xCBD JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x386 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xDBE JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x399 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0xDD8 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x3AC CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xE1A JUMP JUMPDEST PUSH2 0x3C4 PUSH2 0x3BF CALLDATASIZE PUSH1 0x4 PUSH2 0x33B3 JUMP JUMPDEST PUSH2 0xF1F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x372E JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x3DF CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xFEC JUMP JUMPDEST PUSH2 0x28B PUSH2 0x10F1 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x3FA CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x2E9 PUSH2 0x40D CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x1185 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x127E JUMP JUMPDEST PUSH2 0x28B PUSH2 0x1290 JUMP JUMPDEST PUSH2 0x435 PUSH2 0x430 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x12A2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP3 SWAP2 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH2 0x456 PUSH2 0x451 CALLDATASIZE PUSH1 0x4 PUSH2 0x34D1 JUMP JUMPDEST PUSH2 0x1339 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x365E JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x471 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x456 PUSH2 0x484 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x1370 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x497 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x1393 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x13E2 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4B2 CALLDATASIZE PUSH1 0x4 PUSH2 0x3221 JUMP JUMPDEST PUSH2 0x13E7 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4C5 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x14B5 JUMP JUMPDEST PUSH2 0x4DD PUSH2 0x4D8 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x14FE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x4577 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4F8 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x173E JUMP JUMPDEST PUSH2 0x28B PUSH2 0x50B CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x189E JUMP JUMPDEST PUSH2 0x523 PUSH2 0x51E CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x18B5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x377A JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x542 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x1983 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x55D CALLDATASIZE PUSH1 0x4 PUSH2 0x3475 JUMP JUMPDEST PUSH2 0x198C JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x570 CALLDATASIZE PUSH1 0x4 PUSH2 0x32B9 JUMP JUMPDEST PUSH2 0x19C6 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x583 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FFC JUMP JUMPDEST PUSH2 0x1AD4 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x596 CALLDATASIZE PUSH1 0x4 PUSH2 0x313F JUMP JUMPDEST PUSH2 0x1B02 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x5A9 CALLDATASIZE PUSH1 0x4 PUSH2 0x30DA JUMP JUMPDEST PUSH2 0x1B5B JUMP JUMPDEST PUSH2 0x456 PUSH2 0x1CEF JUMP JUMPDEST PUSH2 0x28B PUSH2 0x1D03 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x5CC CALLDATASIZE PUSH1 0x4 PUSH2 0x32E4 JUMP JUMPDEST PUSH2 0x1D15 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x602 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x398A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x33 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x66A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x686 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x6A2 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x6BE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP4 DUP1 PUSH2 0x6C9 JUMPI POP DUP3 JUMPDEST DUP1 PUSH2 0x6D1 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x6D9 JUMPI POP DUP1 JUMPDEST PUSH2 0x6F5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4416 JUMP JUMPDEST PUSH2 0x6FE DUP7 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x71A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3FD7 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND EQ ISZERO PUSH2 0x743 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3EDF JUMP JUMPDEST PUSH2 0x76C CALLER DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH4 0x3078303 PUSH1 0xE4 SHL DUP2 MSTORE POP PUSH2 0x1B5B JUMP JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x67 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x801 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x7D6 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x801 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x7E4 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x818 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x834 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0x83D DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x859 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A87 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x87C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3F35 JUMP JUMPDEST PUSH2 0x897 DUP4 DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1DD8 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x8EF PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x90B PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x927 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x943 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP4 DUP1 PUSH2 0x94E JUMPI POP DUP3 JUMPDEST DUP1 PUSH2 0x956 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x95E JUMPI POP DUP1 JUMPDEST PUSH2 0x97A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4416 JUMP JUMPDEST PUSH2 0x983 DUP7 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x99F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A0C JUMP JUMPDEST PUSH2 0x9A9 CALLER DUP8 PUSH2 0x5D1 JUMP JUMPDEST DUP6 GT ISZERO PUSH2 0x9C8 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3D06 JUMP JUMPDEST PUSH2 0x9D3 CALLER DUP8 DUP8 PUSH2 0x1EC3 JUMP JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x9F7 SWAP1 DUP7 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP2 DUP3 SWAP1 KECCAK256 SWAP3 SWAP1 SWAP3 SSTORE MLOAD PUSH32 0x8F1B5EBB586D3D169E4ED07DB9CD10CE0DD30C7B656171310EAE7517C0B53CF9 SWAP1 PUSH2 0xA46 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP POP POP POP POP JUMP JUMPDEST DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0xA77 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x438D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0xA9D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DB7 JUMP JUMPDEST PUSH2 0xAA5 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0xACB JUMPI POP PUSH2 0xACB DUP6 PUSH2 0x583 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xAE7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DFC JUMP JUMPDEST PUSH1 0x0 PUSH2 0xAF1 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0xB01 DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x2002 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0xC07 JUMPI PUSH1 0x0 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xB1B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xB33 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0xBA0 DUP2 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x488F PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x65 PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP14 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD PUSH2 0x20FF SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP15 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP11 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xBD7 SWAP1 DUP3 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP6 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP13 AND DUP7 MSTORE SWAP1 SWAP2 MSTORE SWAP1 SWAP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE POP PUSH1 0x1 ADD PUSH2 0xB04 JUMP JUMPDEST POP DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x4A39DC06D4C0DBC64B70AF90FD698A233A518AA5D07E595D983B8C0526C8F7FB DUP8 DUP8 PUSH1 0x40 MLOAD PUSH2 0xC57 SWAP3 SWAP2 SWAP1 PUSH2 0x3741 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xC6D DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x212B JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0xC93 SWAP1 PUSH2 0x471 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xCAF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38F2 JUMP JUMPDEST PUSH2 0xCB9 DUP3 DUP3 PUSH2 0x2239 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xCC8 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xCE4 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0xCED DUP2 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0xD09 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3F87 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0xD32 JUMPI PUSH2 0xD2D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD6E JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0xD56 JUMPI PUSH2 0xD2D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD6E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD86 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH32 0xA8377DEEE15954185683D55EFFD369508B4935978C8CB2BAB790BF04C5701814 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x627 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xDE0 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0xE10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x44B7 JUMP JUMPDEST PUSH2 0xCB9 DUP3 DUP3 PUSH2 0x22C7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE34 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0xE50 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0xE6C PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0xE77 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0xE7F JUMPI POP DUP1 JUMPDEST PUSH2 0xE9B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xECD JUMPI PUSH2 0xEB1 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xECD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x401D JUMP JUMPDEST PUSH2 0xEE5 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0x69A0ADEE259D26FE61F4776F7BEA7F3A9737C7321256821B985F988545EFD319 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0xF42 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x42F4 JUMP JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0xF5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xF86 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0xFE4 JUMPI PUSH2 0xFC5 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xFA4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xFB8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x5D1 JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xFD1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0xF8C JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1006 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1022 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x103E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1049 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1051 JUMPI POP DUP1 JUMPDEST PUSH2 0x106D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x109F JUMPI PUSH2 0x1083 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x109F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3B64 JUMP JUMPDEST PUSH2 0x10B7 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0x1949 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0x3A38088DA75EE2D80F6C753F55F8FD17602AE17D8BD0EF44D5E1F28AB5AF11F SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10FD PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x111E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP5 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x113A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1156 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP7 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1161 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1169 JUMPI POP DUP1 JUMPDEST ISZERO PUSH2 0x117A JUMPI PUSH1 0x1 SWAP4 POP POP POP POP PUSH2 0x64B JUMP JUMPDEST POP PUSH1 0x0 SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1190 DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x11AC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3BD0 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP1 DUP3 ADD SLOAD PUSH1 0xFF AND EQ ISZERO PUSH2 0x1204 JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1C DUP2 MSTORE PUSH32 0x52656E657761626C6520456E6572677920436572746966696361746500000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x64B JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x124F JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x17 DUP2 MSTORE PUSH32 0x436172626F6E20456D697373696F6E73204F6666736574000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x64B JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH17 0x4175646974656420456D697373696F6E73 PUSH1 0x78 SHL PUSH1 0x20 DUP3 ADD MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x12B1 DUP6 DUP6 PUSH2 0x5D1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xA0D975A7 PUSH1 0xE0 SHL DUP2 MSTORE SWAP1 SWAP2 POP PUSH1 0x0 SWAP1 ADDRESS SWAP1 PUSH4 0xA0D975A7 SWAP1 PUSH2 0x12DC SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0x3715 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x12F4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1308 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x132C SWAP2 SWAP1 PUSH2 0x352A JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x1351 SWAP1 DUP4 PUSH2 0x2334 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x1351 SWAP1 DUP4 PUSH2 0x2340 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 ADD SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139E DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x13BA JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4130 JUMP JUMPDEST POP PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 JUMP JUMPDEST DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x13F9 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1420 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x42AB JUMP JUMPDEST DUP1 PUSH1 0x66 PUSH1 0x0 PUSH2 0x142D PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP2 DUP3 ADD PUSH1 0x0 SWAP1 DUP2 KECCAK256 SWAP2 DUP8 AND DUP1 DUP3 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP3 ISZERO ISZERO SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 SSTORE PUSH2 0x1471 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 DUP4 PUSH1 0x40 MLOAD PUSH2 0x14A9 SWAP2 SWAP1 PUSH2 0x376F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH2 0x14C0 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x14DC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH1 0xCA DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x1506 PUSH2 0x2DE0 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP3 MLOAD PUSH2 0x160 DUP2 ADD DUP5 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP1 DUP4 ADD SLOAD PUSH1 0xFF DUP2 AND DUP4 DUP7 ADD MSTORE PUSH2 0x100 SWAP1 DUP2 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP5 DUP9 ADD MSTORE PUSH1 0x2 DUP1 DUP7 ADD SLOAD SWAP1 SWAP2 AND PUSH1 0x60 DUP6 ADD MSTORE PUSH1 0x3 DUP6 ADD SLOAD PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0x4 DUP6 ADD SLOAD PUSH1 0xA0 DUP6 ADD MSTORE PUSH1 0x5 DUP6 ADD SLOAD PUSH1 0xC0 DUP6 ADD MSTORE PUSH1 0x6 DUP6 ADD SLOAD PUSH1 0xE0 DUP6 ADD MSTORE PUSH1 0x7 DUP6 ADD DUP1 SLOAD DUP9 MLOAD SWAP5 DUP2 AND ISZERO DUP5 MUL PUSH1 0x0 NOT ADD AND SWAP2 SWAP1 SWAP2 DIV PUSH1 0x1F DUP2 ADD DUP8 SWAP1 DIV DUP8 MUL DUP5 ADD DUP8 ADD SWAP1 SWAP8 MSTORE DUP7 DUP4 MSTORE SWAP3 SWAP6 SWAP4 SWAP5 SWAP1 DUP7 ADD SWAP4 SWAP2 SWAP3 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x1606 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x15DB JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1606 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x15E9 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP SWAP2 DUP4 MSTORE POP POP PUSH1 0x8 DUP3 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x2 PUSH1 0x1 DUP6 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP3 ADD DUP5 ADD SWAP1 SWAP3 MSTORE DUP2 DUP2 MSTORE SWAP4 DUP3 ADD SWAP4 SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x169A JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x166F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x169A JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x167D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP SWAP2 DUP4 MSTORE POP POP PUSH1 0x9 DUP3 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x2 PUSH1 0x1 DUP6 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP3 ADD DUP5 ADD SWAP1 SWAP3 MSTORE DUP2 DUP2 MSTORE SWAP4 DUP3 ADD SWAP4 SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x172E JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1703 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x172E JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1711 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 MSTORE POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x1757 JUMPI POP PUSH2 0x1757 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x1765 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x1781 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x17AC JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x17C4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x2366 JUMP JUMPDEST PUSH2 0x17EA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH2 0x2402 JUMP JUMPDEST PUSH2 0x17F5 PUSH1 0x0 DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x180D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x1825 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x183D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x1855 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH1 0xC9 DUP1 SLOAD PUSH1 0xCA DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE PUSH2 0x100 PUSH1 0x1 PUSH1 0xA8 SHL SUB NOT AND PUSH2 0x100 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND MUL OR PUSH1 0xFF NOT AND SWAP1 SSTORE DUP1 ISZERO PUSH2 0xCB9 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x627 SWAP1 PUSH2 0x2454 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 DUP1 DUP1 DUP1 PUSH2 0x18C6 DUP2 DUP9 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x18E2 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP10 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x18FE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x191A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP12 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1936 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP13 PUSH2 0x1358 JUMP JUMPDEST SWAP5 SWAP12 SWAP4 SWAP11 POP SWAP2 SWAP9 POP SWAP7 POP SWAP2 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x1967 SWAP1 PUSH2 0x471 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xE10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3CB6 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH2 0x1997 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x19B3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH1 0xC9 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x19D1 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x19ED JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0x19F6 DUP2 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0x1A12 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3AC9 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x1A3B JUMPI PUSH2 0x1A36 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A77 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x1A5F JUMPI PUSH2 0x1A36 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A77 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A80 DUP3 PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x1A9C JUMPI PUSH2 0x1A9C PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH32 0x98552DED770F1D05A505572F3387C108DBC6B566EA3D49F83CFF3D1F1C72A042 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x66 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ DUP1 PUSH2 0x1B21 JUMPI POP PUSH2 0x1B21 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x1B3D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3813 JUMP JUMPDEST PUSH2 0x1B4F DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 PUSH2 0x245F JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x1B81 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DB7 JUMP JUMPDEST PUSH2 0x1B89 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0x1BAF JUMPI POP PUSH2 0x1BAF DUP6 PUSH2 0x583 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0x1BCB JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3B1B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BD5 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1BF5 DUP2 DUP8 DUP8 PUSH2 0x1BE6 DUP9 PUSH2 0x292B JUMP JUMPDEST PUSH2 0x1BEF DUP9 PUSH2 0x292B JUMP JUMPDEST DUP8 PUSH2 0x2002 JUMP JUMPDEST PUSH2 0x1C3C DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x488F PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP14 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD SWAP2 SWAP1 PUSH2 0x20FF JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP8 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x1C73 SWAP1 DUP5 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP12 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 SWAP2 DUP9 DUP2 AND SWAP2 SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1CD9 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xC6D DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x296F JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D2F PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1D4B PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1D67 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1D72 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1D7A JUMPI POP DUP1 JUMPDEST PUSH2 0x1D96 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH2 0x1DA8 DUP13 CALLER DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 PUSH2 0x245F JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x1DC3 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST LT PUSH2 0x1DD0 JUMPI POP PUSH1 0x1 PUSH2 0x64B JUMP JUMPDEST POP PUSH1 0x0 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x1DFE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x43D5 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1E08 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1E1A DUP2 PUSH1 0x0 DUP8 PUSH2 0x1BE6 DUP9 PUSH2 0x292B JUMP JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x1E47 SWAP1 DUP5 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP12 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE DUP2 DUP5 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE MLOAD SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1EA5 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0x1EBC DUP2 PUSH1 0x0 DUP8 DUP8 DUP8 DUP8 PUSH2 0x296F JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x1EE9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E9C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1EF3 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1F23 DUP2 DUP6 PUSH1 0x0 PUSH2 0x1F05 DUP8 PUSH2 0x292B JUMP JUMPDEST PUSH2 0x1F0E DUP8 PUSH2 0x292B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x2002 JUMP JUMPDEST PUSH2 0x1F6A DUP3 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x480B PUSH1 0x24 SWAP2 CODECOPY PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD SWAP2 SWAP1 PUSH2 0x20FF JUMP JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP11 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE DUP2 DUP5 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE MLOAD SWAP2 SWAP3 SWAP2 SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1FCB SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x1351 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A50 JUMP JUMPDEST CALLER SWAP1 JUMP JUMPDEST PUSH2 0x2010 DUP7 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH2 0xC6D JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x76C JUMPI PUSH1 0x0 PUSH1 0xCC PUSH1 0x0 DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x202E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 POP PUSH1 0xC9 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x20F5 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH2 0x206F JUMPI POP PUSH2 0x20F7 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND PUSH1 0x3 EQ PUSH2 0x20C1 JUMPI PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 DUP2 AND SWAP2 AND EQ DUP1 PUSH2 0x20A0 JUMPI POP PUSH2 0x20A0 PUSH1 0x0 DUP10 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x20BC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4506 JUMP JUMPDEST PUSH2 0x20F5 JUMP JUMPDEST PUSH2 0x20D9 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP10 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x20F5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4183 JUMP JUMPDEST POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x2013 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP5 DUP5 GT ISZERO PUSH2 0x2123 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST POP POP POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH2 0x213D DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x2A40 JUMP JUMPDEST ISZERO PUSH2 0xC6D JUMPI PUSH1 0x40 MLOAD PUSH4 0xBC197C81 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH4 0xBC197C81 SWAP1 PUSH2 0x2176 SWAP1 DUP10 SWAP1 DUP10 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x3672 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2190 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x21C0 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x21BD SWAP2 DUP2 ADD SWAP1 PUSH2 0x350E JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x2209 JUMPI PUSH2 0x21CC PUSH2 0x473A JUMP JUMPDEST DUP1 PUSH2 0x21D7 JUMPI POP PUSH2 0x21F1 JUMP JUMPDEST DUP1 PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x37BF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xBC197C81 PUSH1 0xE0 SHL EQ PUSH2 0x76C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38AA JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x2251 SWAP1 DUP3 PUSH2 0x2A46 JUMP JUMPDEST ISZERO PUSH2 0xCB9 JUMPI PUSH2 0x225E PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0x2F8788117E7EFF1D82E926EC794901D17C78024A50270940304540A733656F0D PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0xFF AND GT DUP1 ISZERO PUSH2 0x22BA JUMPI POP PUSH1 0x3 DUP3 PUSH1 0xFF AND GT ISZERO JUMPDEST ISZERO PUSH2 0x1DD0 JUMPI POP PUSH1 0x1 PUSH2 0x64B JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x22DF SWAP1 DUP3 PUSH2 0x2A5B JUMP JUMPDEST ISZERO PUSH2 0xCB9 JUMPI PUSH2 0x22EC PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0xF6391F5C32D9C69D2A47EA670B442974B53935D1EDC7FD64EB21E047A839171B PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 DUP4 PUSH2 0x2A70 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2AB5 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2360 ADDRESS PUSH2 0x2A40 JUMP JUMPDEST ISZERO SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x237F JUMPI POP PUSH2 0x237F PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x238D JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x23A9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x23D4 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x23DC PUSH2 0x2ACD JUMP JUMPDEST PUSH2 0x23E4 PUSH2 0x2B50 JUMP JUMPDEST PUSH2 0x23ED DUP3 PUSH2 0x2BCE JUMP JUMPDEST DUP1 ISZERO PUSH2 0xCB9 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 MLOAD DUP4 SWAP3 DUP6 SWAP2 PUSH32 0xBD79B86FFE0AB8E8776151514217CD7CACD52C909F66475C3AF44E129F0B00FF SWAP2 SWAP1 LOG4 PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 PUSH1 0x2 ADD SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x627 DUP3 PUSH2 0x2330 JUMP JUMPDEST PUSH2 0x2468 DUP9 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0x2484 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4473 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x2596 JUMPI DUP8 PUSH1 0xFF AND PUSH1 0x1 EQ DUP1 PUSH2 0x24A4 JUMPI POP DUP8 PUSH1 0xFF AND PUSH1 0x2 EQ JUMPDEST ISZERO PUSH2 0x2551 JUMPI PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x24D3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x40E2 JUMP JUMPDEST PUSH2 0x24DE PUSH1 0x0 DUP12 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x24FA JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4264 JUMP JUMPDEST PUSH2 0x2512 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST DUP1 PUSH2 0x2530 JUMPI POP PUSH2 0x2530 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x254C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3D5A JUMP JUMPDEST PUSH2 0x2591 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2591 JUMPI PUSH2 0x2575 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4206 JUMP JUMPDEST PUSH2 0x2656 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x25D6 JUMPI PUSH2 0x25BA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x433D JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x2616 JUMPI PUSH2 0x25FA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C63 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2656 JUMPI PUSH2 0x263A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2656 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4085 JUMP JUMPDEST PUSH2 0x2660 PUSH1 0xCB PUSH2 0x2C65 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xCC PUSH1 0x0 PUSH2 0x2670 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 POP PUSH2 0x268A PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP2 PUSH1 0x0 ADD DUP2 SWAP1 SSTORE POP DUP9 DUP2 PUSH1 0x1 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 PUSH1 0xFF AND MUL OR SWAP1 SSTORE POP DUP11 DUP2 PUSH1 0x2 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB MUL NOT AND SWAP1 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND MUL OR SWAP1 SSTORE POP DUP10 DUP2 PUSH1 0x1 ADD PUSH1 0x1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB MUL NOT AND SWAP1 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND MUL OR SWAP1 SSTORE POP DUP7 DUP2 PUSH1 0x3 ADD DUP2 SWAP1 SSTORE POP DUP6 DUP2 PUSH1 0x4 ADD DUP2 SWAP1 SSTORE POP DUP5 DUP2 PUSH1 0x6 ADD DUP2 SWAP1 SSTORE POP TIMESTAMP DUP2 PUSH1 0x5 ADD DUP2 SWAP1 SSTORE POP DUP4 DUP2 PUSH1 0x7 ADD SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x273D SWAP3 SWAP2 SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP DUP3 MLOAD PUSH2 0x2753 SWAP1 PUSH1 0x8 DUP4 ADD SWAP1 PUSH1 0x20 DUP7 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP DUP2 MLOAD PUSH2 0x2769 SWAP1 PUSH1 0x9 DUP4 ADD SWAP1 PUSH1 0x20 DUP6 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP PUSH2 0x278E DUP12 PUSH2 0x2778 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP11 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1DD8 JUMP JUMPDEST DUP9 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2812 JUMPI PUSH1 0x2 DUP2 ADD SLOAD DUP2 SLOAD PUSH2 0x27B5 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 DUP11 PUSH2 0x1EC3 JUMP JUMPDEST DUP1 SLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x2 DUP6 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x27E8 SWAP1 DUP10 PUSH2 0x1FD9 JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x2 DUP7 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SSTORE JUMPDEST DUP1 PUSH1 0x2 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 ADD PUSH1 0x1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x99CC3EEB446560C9A2D2483BC5160735EC0FB1851AEA3BDE32E7A56C30C11DA6 DUP11 PUSH1 0xCD PUSH1 0x0 DUP7 PUSH1 0x0 ADD SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP7 PUSH1 0x2 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD DUP6 PUSH1 0x0 ADD SLOAD DUP7 PUSH1 0x1 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND DUP8 PUSH1 0x3 ADD SLOAD DUP9 PUSH1 0x4 ADD SLOAD DUP10 PUSH1 0x6 ADD SLOAD DUP11 PUSH1 0x5 ADD SLOAD DUP12 PUSH1 0x7 ADD DUP13 PUSH1 0x8 ADD DUP14 PUSH1 0x9 ADD PUSH1 0x40 MLOAD PUSH2 0x2916 SWAP12 SWAP11 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x465D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 DUP1 DUP3 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE PUSH1 0x60 SWAP2 DUP3 SWAP2 SWAP1 PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP POP SWAP1 POP DUP3 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x295E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x2981 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x2A40 JUMP JUMPDEST ISZERO PUSH2 0xC6D JUMPI PUSH1 0x40 MLOAD PUSH4 0xF23A6E61 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH4 0xF23A6E61 SWAP1 PUSH2 0x29BA SWAP1 DUP10 SWAP1 DUP10 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x36D0 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x29D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x2A04 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x2A01 SWAP2 DUP2 ADD SWAP1 PUSH2 0x350E JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x2A10 JUMPI PUSH2 0x21CC PUSH2 0x473A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xF23A6E61 PUSH1 0xE0 SHL EQ PUSH2 0x76C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38AA JUMP JUMPDEST EXTCODESIZE ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2C6E JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2CB8 JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP3 LT PUSH2 0x2A93 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3868 JUMP JUMPDEST DUP3 PUSH1 0x0 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x2AA2 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2AE6 JUMPI POP PUSH2 0x2AE6 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2AF4 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2B10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2B3B JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST DUP1 ISZERO PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2B69 JUMPI POP PUSH2 0x2B69 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2B77 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2B93 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2BBE JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x2B3B PUSH4 0x1FFC9A7 PUSH1 0xE0 SHL PUSH2 0x2D7E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2BE7 JUMPI POP PUSH2 0x2BE7 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2BF5 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2C11 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2C3C JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x2C45 DUP3 PUSH2 0x2DCD JUMP JUMPDEST PUSH2 0x2C55 PUSH4 0x6CDB3D13 PUSH1 0xE1 SHL PUSH2 0x2D7E JUMP JUMPDEST PUSH2 0x23ED PUSH4 0x3A24D07 PUSH1 0xE2 SHL PUSH2 0x2D7E JUMP JUMPDEST DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2C7A DUP4 DUP4 PUSH2 0x2AB5 JUMP JUMPDEST PUSH2 0x2CB0 JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP2 DUP2 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP5 SWAP1 SSTORE DUP5 SLOAD DUP5 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x627 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x627 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x2D74 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x2CEB JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP DUP1 DUP8 PUSH1 0x0 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x2D08 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SWAP3 SWAP1 SWAP3 SSTORE DUP3 DUP2 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0x2D38 JUMPI INVALID JUMPDEST PUSH1 0x1 SWAP1 SUB DUP2 DUP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 SWAP1 SSTORE SWAP1 SSTORE DUP7 PUSH1 0x1 ADD PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SSTORE PUSH1 0x1 SWAP5 POP POP POP POP POP PUSH2 0x627 JUMP JUMPDEST PUSH1 0x0 SWAP2 POP POP PUSH2 0x627 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 DUP3 AND EQ ISZERO PUSH2 0x2DA8 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x39D5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x33 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST DUP1 MLOAD PUSH2 0xCB9 SWAP1 PUSH1 0x67 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH2 0x160 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0xFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x2E90 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x2EBD JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x2EBD JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x2EBD JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x2EA2 JUMP JUMPDEST POP PUSH2 0x2EC9 SWAP3 SWAP2 POP PUSH2 0x2ECD JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x2EC9 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x2ECE JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x627 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x2F09 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x2F1C PUSH2 0x2F17 DUP3 PUSH2 0x4708 JUMP JUMPDEST PUSH2 0x46E1 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x2F3D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x2F5C JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x2F40 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x2F77 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2F8D JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x2FA0 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x46E1 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x2FB7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x627 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2FF2 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x1351 DUP4 DUP4 PUSH2 0x2EE2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x300E JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x3018 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH2 0x3027 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x3047 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0x3052 DUP2 PUSH2 0x47DF JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD PUSH2 0x3062 DUP2 PUSH2 0x47DF JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x307E JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x308A DUP10 DUP4 DUP11 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x309F JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x30AB DUP10 DUP4 DUP11 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x30C0 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x30CD DUP9 DUP3 DUP10 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 SWAP1 SWAP4 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x30F1 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x30FB DUP8 DUP8 PUSH2 0x2EE2 JUMP JUMPDEST SWAP5 POP PUSH2 0x310A DUP8 PUSH1 0x20 DUP9 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD SWAP2 POP PUSH1 0x80 DUP7 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x3133 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x30CD DUP9 DUP3 DUP10 ADD PUSH2 0x2F67 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x140 DUP12 DUP14 SUB SLT ISZERO PUSH2 0x315E JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x3168 DUP13 DUP13 PUSH2 0x2EE2 JUMP JUMPDEST SWAP10 POP PUSH2 0x3177 DUP13 PUSH1 0x20 DUP14 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP9 POP PUSH2 0x3186 DUP13 PUSH1 0x40 DUP14 ADD PUSH2 0x2FD0 JUMP JUMPDEST SWAP8 POP PUSH1 0x60 DUP12 ADD CALLDATALOAD SWAP7 POP PUSH1 0x80 DUP12 ADD CALLDATALOAD SWAP6 POP PUSH1 0xA0 DUP12 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 DUP12 ADD CALLDATALOAD SWAP4 POP PUSH1 0xE0 DUP12 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x31BE JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x31CA DUP15 DUP4 DUP16 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP5 POP PUSH2 0x100 DUP14 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x31E0 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x31EC DUP15 DUP4 DUP16 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP4 POP PUSH2 0x120 DUP14 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3202 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x320F DUP14 DUP3 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP12 SWAP2 SWAP5 SWAP8 SWAP11 POP SWAP3 SWAP6 SWAP9 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3233 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x323D DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x3251 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x326E JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3278 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x329A JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x32A4 DUP6 DUP6 PUSH2 0x2EE2 JUMP JUMPDEST SWAP6 PUSH1 0x20 DUP6 ADD CALLDATALOAD SWAP6 POP PUSH1 0x40 SWAP1 SWAP5 ADD CALLDATALOAD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x32CB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x32D5 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH2 0x3027 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x2FD0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x120 DUP11 DUP13 SUB SLT ISZERO PUSH2 0x3302 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x330C DUP12 DUP12 PUSH2 0x2EE2 JUMP JUMPDEST SWAP9 POP PUSH2 0x331B DUP12 PUSH1 0x20 DUP13 ADD PUSH2 0x2FD0 JUMP JUMPDEST SWAP8 POP PUSH1 0x40 DUP11 ADD CALLDATALOAD SWAP7 POP PUSH1 0x60 DUP11 ADD CALLDATALOAD SWAP6 POP PUSH1 0x80 DUP11 ADD CALLDATALOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD CALLDATALOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x3353 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x335F DUP14 DUP4 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP5 POP PUSH1 0xE0 DUP13 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3374 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x3380 DUP14 DUP4 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP4 POP PUSH2 0x100 DUP13 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3396 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x33A3 DUP13 DUP3 DUP14 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x33C5 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x33DC JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x33EF JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x33FD PUSH2 0x2F17 DUP3 PUSH2 0x4708 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP11 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x341D JUMPI DUP9 DUP10 REVERT JUMPDEST DUP9 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x3447 JUMPI PUSH2 0x3433 DUP12 DUP3 PUSH2 0x2EE2 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x3421 JUMP JUMPDEST POP SWAP1 SWAP7 POP DUP8 ADD CALLDATALOAD SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x345E JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x346B DUP6 DUP3 DUP7 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3486 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x1351 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34A6 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x34BF JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x3251 DUP2 PUSH2 0x47DF JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x34E3 JUMPI DUP2 DUP3 REVERT JUMPDEST POP POP DUP1 CALLDATALOAD SWAP3 PUSH1 0x20 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3503 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1351 DUP2 PUSH2 0x47F4 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x351F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1351 DUP2 PUSH2 0x47F4 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x353B JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x357E JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3562 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x35AE JUMPI PUSH1 0x20 DUP2 DUP6 ADD DUP2 ADD MLOAD DUP7 DUP4 ADD DUP3 ADD MSTORE ADD PUSH2 0x3592 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x35BF JUMPI DUP3 PUSH1 0x20 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 AND PUSH1 0x0 DUP2 EQ PUSH2 0x35F2 JUMPI PUSH1 0x1 DUP2 EQ PUSH2 0x3610 JUMPI PUSH2 0x364E JUMP JUMPDEST PUSH1 0x2 DUP4 DIV PUSH1 0x7F AND DUP7 MSTORE PUSH1 0xFF NOT DUP4 AND PUSH1 0x20 DUP8 ADD MSTORE PUSH1 0x40 DUP7 ADD SWAP4 POP PUSH2 0x364E JUMP JUMPDEST PUSH1 0x2 DUP4 DIV DUP1 DUP8 MSTORE PUSH2 0x3620 DUP7 PUSH2 0x4728 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x3644 JUMPI DUP2 SLOAD PUSH1 0x20 DUP3 DUP12 ADD ADD MSTORE DUP5 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x3623 JUMP JUMPDEST DUP9 ADD PUSH1 0x20 ADD SWAP6 POP POP POP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 DUP2 AND DUP3 MSTORE DUP6 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0xA0 PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x369E SWAP1 DUP4 ADD DUP7 PUSH2 0x354F JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x36B0 DUP2 DUP7 PUSH2 0x354F JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x80 DUP5 ADD MSTORE PUSH2 0x36C4 DUP2 DUP6 PUSH2 0x3589 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 DUP2 AND DUP3 MSTORE DUP6 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP2 ADD DUP5 SWAP1 MSTORE PUSH1 0x60 DUP2 ADD DUP4 SWAP1 MSTORE PUSH1 0xA0 PUSH1 0x80 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x370A SWAP1 DUP4 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1351 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x354F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x3754 PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x354F JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x3766 DUP2 DUP6 PUSH2 0x354F JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP5 ISZERO ISZERO DUP6 MSTORE SWAP3 ISZERO ISZERO PUSH1 0x20 DUP6 ADD MSTORE SWAP1 ISZERO ISZERO PUSH1 0x40 DUP5 ADD MSTORE ISZERO ISZERO PUSH1 0x60 DUP4 ADD MSTORE ISZERO ISZERO PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1351 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x34 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E7366657220746F206E6F6E2045524331313535 PUSH1 0x40 DUP3 ADD MSTORE PUSH20 0x2932B1B2B4BB32B91034B6B83632B6B2B73A32B9 PUSH1 0x61 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x35 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A69737375654F6E426568616C663A2063616C6C206D7573742063 PUSH1 0x40 DUP3 ADD MSTORE PUSH21 0x37B6B290333937B6902220A79037B91030B236B4B7 PUSH1 0x59 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x22 SWAP1 DUP3 ADD MSTORE PUSH32 0x456E756D657261626C655365743A20696E646578206F7574206F6620626F756E PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x6473 PUSH1 0xF0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A204552433131353552656365697665722072656A65637465 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x6420746F6B656E73 PUSH1 0xC0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2F SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2073656E646572206D75737420626520616E PUSH1 0x40 DUP3 ADD MSTORE PUSH15 0x818591B5A5B881D1BC819DC985B9D PUSH1 0x8A SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6F6E6C794465616C65723A206D73672E73656E646572206E6F74 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x1030903232B0B632B9 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2B SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2062616C616E636520717565727920666F7220746865207A PUSH1 0x40 DUP3 ADD MSTORE PUSH11 0x65726F2061646472657373 PUSH1 0xA8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1C SWAP1 DUP3 ADD MSTORE PUSH32 0x4552433136353A20696E76616C696420696E7465726661636520696400000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265746972653A20746F6B656E496420646F6573206E6F742065 PUSH1 0x40 DUP3 ADD MSTORE PUSH4 0x1E1A5CDD PUSH1 0xE2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1B SWAP1 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x22 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6D696E743A20746F6B656E496420646F6573206E6F7420657869 PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x1CDD PUSH1 0xF2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A756E72656769737465724465616C65723A20746F6B656E547970 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x19525908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x72 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2063616C6C6572206973206E6F74206F776E6572206E6F72 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x8185C1C1C9BDD9959 PUSH1 0xBA SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x46 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A756E7265676973746572436F6E73756D6572286C696D69746564 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x293A206F6E6C792061646D696E2063616E20756E726567697374657220636F6E PUSH1 0x60 DUP3 ADD MSTORE PUSH6 0x73756D657273 PUSH1 0xD0 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2A SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A676574546F6B656E547970653A20746F6B656E496420646F6573 PUSH1 0x40 DUP3 ADD MSTORE PUSH10 0x81B9BDD08195E1A5CDD PUSH1 0xB2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6F6E6C7941646D696E3A206D73672E73656E646572206E6F7420 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x3A34329030B236B4B7 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x33 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH19 0x3A32B932B21037B33339B2BA103232B0B632B9 PUSH1 0x69 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2073656E646572206D75737420626520616E PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x2061646D696E20746F207265766F6B65 PUSH1 0x80 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x34 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265746972653A206E6F7420656E6F75676820617661696C6162 PUSH1 0x40 DUP3 ADD MSTORE PUSH20 0x6C652062616C616E636520746F20726574697265 PUSH1 0x60 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x37 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A2070726F706F73657220 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6E6F7420612072656769737465726564206465616C6572000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x25 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E7366657220746F20746865207A65726F206164 PUSH1 0x40 DUP3 ADD MSTORE PUSH5 0x6472657373 PUSH1 0xD8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E736665722063616C6C6572206973206E6F7420 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x1BDDDB995C881B9BDC88185C1C1C9BDD9959 PUSH1 0x72 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2E SWAP1 DUP3 ADD MSTORE PUSH32 0x496E697469616C697A61626C653A20636F6E747261637420697320616C726561 PUSH1 0x40 DUP3 ADD MSTORE PUSH14 0x191E481A5B9A5D1A585B1A5E9959 PUSH1 0x92 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x23 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206275726E2066726F6D20746865207A65726F2061646472 PUSH1 0x40 DUP3 ADD MSTORE PUSH3 0x657373 PUSH1 0xE8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x36 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7472616E736665723A2073656E64657220616E64207265636569 PUSH1 0x40 DUP3 ADD MSTORE PUSH22 0x7665722063616E6E6F74206265207468652073616D65 PUSH1 0x50 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6D696E743A2063616E6E6F74206D696E74206E657720746F6B65 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x6E7320696E206C696D69746564206D6F6465 PUSH1 0x70 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A72656769737465724465616C65723A20746F6B656E5479706549 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x1908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x82 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x26 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7472616E736665723A20746F6B656E496420646F6573206E6F74 PUSH1 0x40 DUP3 ADD MSTORE PUSH6 0x8195E1A5CDD PUSH1 0xD2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x42 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265676973746572436F6E73756D6572286C696D69746564293A PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x206F6E6C792061646D696E2063616E20726567697374657220636F6E73756D65 PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0x7273 PUSH1 0xF0 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x37 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x746572656420656D697373696F6E732061756469746F72000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2E SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A206D73672E73656E6465 PUSH1 0x40 DUP3 ADD MSTORE PUSH14 0x72206E6F742074696D656C6F636B PUSH1 0x90 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x33 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A676574546F6B656E52657469726564416D6F756E743A20746F6B PUSH1 0x40 DUP3 ADD MSTORE PUSH19 0x195B925908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x6A SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x58 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6265666F7265546F6B656E5472616E73666572286C696D6974 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6564293A206F6E6C7920656D697373696F6E732061756469746F72732063616E PUSH1 0x60 DUP3 ADD MSTORE PUSH32 0x206973737565206175646974656420656D697373696F6E730000000000000000 PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x40 SWAP1 DUP3 ADD DUP2 SWAP1 MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A20697373756572206E6F SWAP1 DUP3 ADD MSTORE PUSH32 0x742061207265676973746572656420656D697373696F6E732061756469746F72 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x27 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A20697373756565206E6F PUSH1 0x40 DUP3 ADD MSTORE PUSH7 0x3A1030B236B4B7 PUSH1 0xC9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2073657474696E6720617070726F76616C20737461747573 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x103337B91039B2B633 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206163636F756E747320616E6420696473206C656E677468 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x40DAD2E6DAC2E8C6D PUSH1 0xBB SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x3A32B932B2102922A1903232B0B632B9 PUSH1 0x81 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2069647320616E6420616D6F756E7473206C656E67746820 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0xDAD2E6DAC2E8C6D PUSH1 0xC3 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x21 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206D696E7420746F20746865207A65726F20616464726573 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x73 PUSH1 0xF8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3D SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A636F6E73756D65724F724465616C65723A206D73672E73656E64 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6572206E6F74206120636F6E73756D6572206F722061206465616C6572000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20746F6B656E54797065496420697320696E76 PUSH1 0x40 DUP3 ADD MSTORE PUSH4 0x185B1A59 PUSH1 0xE2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2F SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2063616E206F6E6C792072656E6F756E6365 PUSH1 0x40 DUP3 ADD MSTORE PUSH15 0x103937B632B9903337B91039B2B633 PUSH1 0x89 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x4B SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6265666F7265546F6B656E5472616E73666572286C696D6974 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6564293A206F6E6C792061646D696E20616E642044414F2063616E207472616E PUSH1 0x60 DUP3 ADD MSTORE PUSH11 0x7366657220746F6B656E73 PUSH1 0xA8 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x20 DUP4 ADD MLOAD PUSH2 0x4596 PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x3657 JUMP JUMPDEST POP PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0x45A9 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x3542 JUMP JUMPDEST POP PUSH1 0x60 DUP4 ADD MLOAD PUSH2 0x45BC PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x3542 JUMP JUMPDEST POP PUSH1 0x80 DUP4 ADD MLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0xE0 DUP4 ADD MLOAD PUSH2 0x100 DUP2 DUP2 DUP6 ADD MSTORE DUP1 DUP6 ADD MLOAD SWAP2 POP POP PUSH2 0x160 PUSH2 0x120 DUP2 DUP2 DUP7 ADD MSTORE PUSH2 0x4608 PUSH2 0x180 DUP7 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP3 POP DUP1 DUP7 ADD MLOAD SWAP1 POP PUSH1 0x1F NOT PUSH2 0x140 DUP2 DUP8 DUP7 SUB ADD DUP2 DUP9 ADD MSTORE PUSH2 0x4629 DUP6 DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP1 DUP9 ADD MLOAD DUP8 DUP3 SUB SWAP1 SWAP3 ADD DUP5 DUP9 ADD MSTORE SWAP4 POP SWAP1 POP PUSH2 0x4645 DUP4 DUP3 PUSH2 0x3589 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x160 DUP14 DUP4 MSTORE DUP13 PUSH1 0x20 DUP5 ADD MSTORE DUP12 PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0xFF DUP12 AND PUSH1 0x60 DUP5 ADD MSTORE DUP10 PUSH1 0x80 DUP5 ADD MSTORE DUP9 PUSH1 0xA0 DUP5 ADD MSTORE DUP8 PUSH1 0xC0 DUP5 ADD MSTORE DUP7 PUSH1 0xE0 DUP5 ADD MSTORE DUP1 PUSH2 0x100 DUP5 ADD MSTORE PUSH2 0x46A5 DUP2 DUP5 ADD DUP8 PUSH2 0x35D4 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH2 0x120 DUP5 ADD MSTORE PUSH2 0x46BA DUP2 DUP7 PUSH2 0x35D4 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH2 0x140 DUP5 ADD MSTORE PUSH2 0x46CF DUP2 DUP6 PUSH2 0x35D4 JUMP JUMPDEST SWAP15 SWAP14 POP POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x4700 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x471E JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST PUSH1 0xE0 SHR SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x44 RETURNDATASIZE LT ISZERO PUSH2 0x474A JUMPI PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x4 DUP2 DUP3 RETURNDATACOPY PUSH4 0x8C379A0 PUSH2 0x475E DUP3 MLOAD PUSH2 0x4734 JUMP JUMPDEST EQ PUSH2 0x4768 JUMPI PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x3 NOT ADD PUSH1 0x4 DUP3 RETURNDATACOPY DUP1 MLOAD RETURNDATASIZE PUSH8 0xFFFFFFFFFFFFFFFF DUP2 PUSH1 0x24 DUP5 ADD GT DUP2 DUP5 GT OR ISZERO PUSH2 0x4798 JUMPI POP POP POP POP PUSH2 0x1100 JUMP JUMPDEST DUP3 DUP5 ADD SWAP3 POP DUP3 MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x47B2 JUMPI POP POP POP POP PUSH2 0x1100 JUMP JUMPDEST POP RETURNDATASIZE DUP4 ADD PUSH1 0x20 DUP3 DUP5 ADD ADD GT ISZERO PUSH2 0x47CA JUMPI POP POP POP PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 REVERT INVALID GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH3 0x75726E KECCAK256 PUSH2 0x6D6F PUSH22 0x6E7420657863656564732062616C616E6365EDE6574D 0xEB 0xA8 CREATE 0x2A 0xDA PUSH25 0x88448A497B08844D62E044ED533343A673BE3FFCDE5F5E1AA5 SELFBALANCE 0xD3 0xDA 0xDE DUP13 PUSH9 0xB013A47AD41C2BCC9B SWAP15 0x4B SMOD PUSH6 0xB0FB616780E1 JUMPI DUP7 0xE7 PUSH11 0xF8890EEDD7900AD88DA619 0x2F 0xD0 RETURNDATASIZE 0xBB PUSH10 0xDBEEE963B1A0ED738ABE 0x49 0xAB CALLER BALANCE 0xAA RETURN GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH10 0x6E73756666696369656E PUSH21 0x2062616C616E636520666F72207472616E73666572 0x2A 0xB9 CALL 0xDA SWAP3 0xE7 0x4A 0xAA ADD 0xEB PUSH22 0xA871557505B11DD8D36832A34BB21BBEE88B08D860E9 PUSH30 0xAD3DBE5042E7384B1572CF966A15E089576A62B5126C5EF1D184AB18B12C LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SDIV GAS PUSH10 0x771B7A92B6338A8700F9 0x4A PUSH27 0xD5684ECCA1AE185C3B59807314C8F1F23C64736F6C634300070000 CALLER ", - "sourceMap": "485:21510:13:-:0;;;;;;;;;;;;;;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "608060405234801561001057600080fd5b50600436106102735760003560e01c80637f157c9b11610151578063ce6ccfaf116100c3578063e985e9c511610087578063e985e9c514610575578063f000be9814610588578063f242432a1461059b578063f851a440146105ae578063fcba7948146105b6578063fd0c4a9a146105be57610273565b8063ce6ccfaf14610510578063d547741f14610534578063dba851b014610547578063ddc3e6eb1461054f578063e2e564f21461056257610273565b8063a217fddf11610115578063a217fddf1461049c578063a22cb465146104a4578063bdacb303146104b7578063c1e03728146104ca578063c4d66de8146104ea578063ca15c873146104fd57610273565b80637f157c9b146104225780639010d07c1461044357806391d148541461046357806392089c4614610476578063a0d975a71461048957610273565b806331aa4b20116101ea57806353dbe982116101ae57806353dbe982146103d15780635ddb368f146103e457806369f7ef44146103ec57806376aed2e1146103ff57806376ce47551461041257806378e5c5921461041a57610273565b806331aa4b201461036557806333781a0e1461037857806336568abe1461038b57806344b22fdd1461039e5780634e1273f4146103b157610273565b806318a50d7e1161023c57806318a50d7e146103095780631ef68ef714610311578063248a9ca314610319578063293a7f2e1461032c5780632eb2c2d61461033f5780632f2ff15d1461035257610273565b8062fdd58e1461027857806301ffc9a7146102a1578063095bcdb6146102c15780630e89341c146102d6578063156e29f6146102f6575b600080fd5b61028b61028636600461325c565b6105d1565b60405161029891906137a3565b60405180910390f35b6102b46102af3660046134f2565b61062d565b604051610298919061376f565b6102d46102cf366004613286565b610650565b005b6102e96102e4366004613495565b610775565b60405161029891906137ac565b6102d4610304366004613286565b61080d565b61028b61089c565b61028b6108ae565b61028b610327366004613495565b6108c0565b6102d461033a3660046134d1565b6108d5565b6102d461034d366004613030565b610a56565b6102d46103603660046134ad565b610c75565b6102d46103733660046132b9565b610cbd565b6102b4610386366004612fe1565b610dbe565b6102d46103993660046134ad565b610dd8565b6102d46103ac366004612fe1565b610e1a565b6103c46103bf3660046133b3565b610f1f565b604051610298919061372e565b6102d46103df366004612fe1565b610fec565b61028b6110f1565b6102b46103fa366004612fe1565b611103565b6102e961040d366004613495565b611185565b61028b61127e565b61028b611290565b61043561043036600461325c565b6112a2565b60405161029892919061464f565b6104566104513660046134d1565b611339565b604051610298919061365e565b6102b46104713660046134ad565b611358565b610456610484366004613495565b611370565b61028b61049736600461325c565b611393565b61028b6113e2565b6102d46104b2366004613221565b6113e7565b6102d46104c5366004612fe1565b6114b5565b6104dd6104d8366004613495565b6114fe565b6040516102989190614577565b6102d46104f8366004612fe1565b61173e565b61028b61050b366004613495565b61189e565b61052361051e366004612fe1565b6118b5565b60405161029895949392919061377a565b6102d46105423660046134ad565b611949565b6102b4611983565b6102d461055d366004613475565b61198c565b6102d46105703660046132b9565b6119c6565b6102b4610583366004612ffc565b611ad4565b6102d461059636600461313f565b611b02565b6102d46105a93660046130da565b611b5b565b610456611cef565b61028b611d03565b6102d46105cc3660046132e4565b611d15565b60006001600160a01b0383166106025760405162461bcd60e51b81526004016105f99061398a565b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b600061066a60008051602061484f83398151915233611358565b905060006106866000805160206148b983398151915233611358565b905060006106a260008051602061482f83398151915233611358565b905060006106be6000805160206148d983398151915233611358565b905083806106c95750825b806106d15750815b806106d95750805b6106f55760405162461bcd60e51b81526004016105f990614416565b6106fe86611db6565b61071a5760405162461bcd60e51b81526004016105f990613fd7565b336001600160a01b03881614156107435760405162461bcd60e51b81526004016105f990613edf565b61076c33888888604051806040016040528060048152602001630307830360e41b815250611b5b565b50505050505050565b60678054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50505050509050919050565b610818600033611358565b6108345760405162461bcd60e51b81526004016105f990613c1a565b61083d82611db6565b6108595760405162461bcd60e51b81526004016105f990613a87565b60c95460ff161561087c5760405162461bcd60e51b81526004016105f990613f35565b61089783838360405180602001604052806000815250611dd8565b505050565b60008051602061486f83398151915281565b60008051602061482f83398151915281565b60009081526097602052604090206002015490565b60006108ef60008051602061484f83398151915233611358565b9050600061090b6000805160206148b983398151915233611358565b9050600061092760008051602061482f83398151915233611358565b905060006109436000805160206148d983398151915233611358565b9050838061094e5750825b806109565750815b8061095e5750805b61097a5760405162461bcd60e51b81526004016105f990614416565b61098386611db6565b61099f5760405162461bcd60e51b81526004016105f990613a0c565b6109a933876105d1565b8511156109c85760405162461bcd60e51b81526004016105f990613d06565b6109d3338787611ec3565b600086815260cd602090815260408083203384529091529020546109f79086611fd9565b600087815260cd602090815260408083203380855292529182902092909255517f8f1b5ebb586d3d169e4ed07db9cd10ce0dd30c7b656171310eae7517c0b53cf990610a46908990899061464f565b60405180910390a2505050505050565b8151835114610a775760405162461bcd60e51b81526004016105f99061438d565b6001600160a01b038416610a9d5760405162461bcd60e51b81526004016105f990613db7565b610aa5611ffe565b6001600160a01b0316856001600160a01b03161480610acb5750610acb85610583611ffe565b610ae75760405162461bcd60e51b81526004016105f990613dfc565b6000610af1611ffe565b9050610b01818787878787612002565b60005b8451811015610c07576000858281518110610b1b57fe5b602002602001015190506000858381518110610b3357fe5b60200260200101519050610ba0816040518060600160405280602a815260200161488f602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020546120ff9092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a1681522054610bd79082611fd9565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610b04565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c57929190613741565b60405180910390a4610c6d81878787878761212b565b505050505050565b600082815260976020526040902060020154610c9390610471611ffe565b610caf5760405162461bcd60e51b81526004016105f9906138f2565b610cb98282612239565b5050565b610cc8600033611358565b610ce45760405162461bcd60e51b81526004016105f990613c1a565b610ced816122a2565b610d095760405162461bcd60e51b81526004016105f990613f87565b8060ff1660011415610d3257610d2d6000805160206148b983398151915283610c75565b610d6e565b8060ff1660021415610d5657610d2d60008051602061482f83398151915283610c75565b610d6e6000805160206148d983398151915283610c75565b610d8660008051602061486f83398151915283610c75565b6040516001600160a01b038316907fa8377deee15954185683d55effd369508b4935978c8cb2bab790bf04c570181490600090a25050565b600061062760008051602061484f83398151915283611358565b610de0611ffe565b6001600160a01b0316816001600160a01b031614610e105760405162461bcd60e51b81526004016105f9906144b7565b610cb982826122c7565b6000610e346000805160206148b983398151915233611358565b90506000610e5060008051602061482f83398151915233611358565b90506000610e6c6000805160206148d983398151915233611358565b90508280610e775750815b80610e7f5750805b610e9b5760405162461bcd60e51b81526004016105f990613941565b60c95460ff1615610ecd57610eb1600033611358565b610ecd5760405162461bcd60e51b81526004016105f99061401d565b610ee560008051602061484f83398151915285610c75565b6040516001600160a01b038516907f69a0adee259d26fe61f4776f7bea7f3a9737c7321256821b985f988545efd31990600090a250505050565b60608151835114610f425760405162461bcd60e51b81526004016105f9906142f4565b6060835167ffffffffffffffff81118015610f5c57600080fd5b50604051908082528060200260200182016040528015610f86578160200160208202803683370190505b50905060005b8451811015610fe457610fc5858281518110610fa457fe5b6020026020010151858381518110610fb857fe5b60200260200101516105d1565b828281518110610fd157fe5b6020908102919091010152600101610f8c565b509392505050565b60006110066000805160206148b983398151915233611358565b9050600061102260008051602061482f83398151915233611358565b9050600061103e6000805160206148d983398151915233611358565b905082806110495750815b806110515750805b61106d5760405162461bcd60e51b81526004016105f990613941565b60c95460ff161561109f57611083600033611358565b61109f5760405162461bcd60e51b81526004016105f990613b64565b6110b760008051602061484f83398151915285611949565b6040516001600160a01b038516907f03a38088da75ee2d80f6c753f55f8fd17602ae17d8bd0ef44d5e1f28ab5af11f90600090a250505050565b60006110fd60cb612330565b90505b90565b60008061111e6000805160206148b983398151915284611358565b9050600061113a60008051602061482f83398151915285611358565b905060006111566000805160206148d983398151915286611358565b905082806111615750815b806111695750805b1561117a576001935050505061064b565b506000949350505050565b606061119082611db6565b6111ac5760405162461bcd60e51b81526004016105f990613bd0565b600082815260cc6020526040902060018082015460ff16141561120457505060408051808201909152601c81527f52656e657761626c6520456e6572677920436572746966696361746500000000602082015261064b565b600181015460ff166002141561124f57505060408051808201909152601781527f436172626f6e20456d697373696f6e73204f6666736574000000000000000000602082015261064b565b50506040805180820190915260118152704175646974656420456d697373696f6e7360781b6020820152919050565b6000805160206148d983398151915281565b60008051602061484f83398151915281565b60008060006112b185856105d1565b60405163a0d975a760e01b8152909150600090309063a0d975a7906112dc9089908990600401613715565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c919061352a565b9196919550909350505050565b60008281526097602052604081206113519083612334565b9392505050565b60008281526097602052604081206113519083612340565b600090815260cc602052604090206001015461010090046001600160a01b031690565b600061139e82611db6565b6113ba5760405162461bcd60e51b81526004016105f990614130565b50600090815260cd602090815260408083206001600160a01b03949094168352929052205490565b600081565b816001600160a01b03166113f9611ffe565b6001600160a01b031614156114205760405162461bcd60e51b81526004016105f9906142ab565b806066600061142d611ffe565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611471611ffe565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114a9919061376f565b60405180910390a35050565b6114c0600033611358565b6114dc5760405162461bcd60e51b81526004016105f990613c1a565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b611506612de0565b600082815260cc60209081526040918290208251610160810184528154815260018083015460ff811683860152610100908190046001600160a01b0390811684880152600280860154909116606085015260038501546080850152600485015460a0850152600585015460c0850152600685015460e08501526007850180548851948116158402600019011691909104601f81018790048702840187019097528683529295939490860193919291908301828280156116065780601f106115db57610100808354040283529160200191611606565b820191906000526020600020905b8154815290600101906020018083116115e957829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561169a5780601f1061166f5761010080835404028352916020019161169a565b820191906000526020600020905b81548152906001019060200180831161167d57829003601f168201915b505050918352505060098201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050815250509050919050565b600054610100900460ff16806117575750611757612355565b80611765575060005460ff16155b6117815760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156117ac576000805460ff1961ff0019909116610100171660011790555b6117c460405180602001604052806000815250612366565b6117ea60008051602061484f83398151915260008051602061486f833981519152612402565b6117f5600083610caf565b61180d60008051602061486f83398151915283610caf565b6118256000805160206148b983398151915283610caf565b61183d60008051602061482f83398151915283610caf565b6118556000805160206148d983398151915283610caf565b60c9805460ca80546001600160a01b0319169055610100600160a81b0319166101006001600160a01b038516021760ff191690558015610cb9576000805461ff00191690555050565b600081815260976020526040812061062790612454565b600080808080806118c68188611358565b905060006118e26000805160206148b983398151915289611358565b905060006118fe60008051602061482f8339815191528a611358565b9050600061191a6000805160206148d98339815191528b611358565b9050600061193660008051602061484f8339815191528c611358565b949b939a50919850965091945092505050565b60008281526097602052604090206002015461196790610471611ffe565b610e105760405162461bcd60e51b81526004016105f990613cb6565b60c95460ff1681565b611997600033611358565b6119b35760405162461bcd60e51b81526004016105f990613c1a565b60c9805460ff1916911515919091179055565b6119d1600033611358565b6119ed5760405162461bcd60e51b81526004016105f990613c1a565b6119f6816122a2565b611a125760405162461bcd60e51b81526004016105f990613ac9565b8060ff1660011415611a3b57611a366000805160206148b983398151915283611949565b611a77565b8060ff1660021415611a5f57611a3660008051602061482f83398151915283611949565b611a776000805160206148d983398151915283611949565b611a8082611103565b611a9c57611a9c60008051602061486f83398151915283611949565b6040516001600160a01b038316907f98552ded770f1d05a505572f3387c108dbc6b566ea3d49f83cff3d1f1c72a04290600090a25050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b60ca546001600160a01b0316331480611b215750611b21600033611358565b611b3d5760405162461bcd60e51b81526004016105f990613813565b611b4f8a8a8a8a8a8a8a8a8a8a61245f565b50505050505050505050565b6001600160a01b038416611b815760405162461bcd60e51b81526004016105f990613db7565b611b89611ffe565b6001600160a01b0316856001600160a01b03161480611baf5750611baf85610583611ffe565b611bcb5760405162461bcd60e51b81526004016105f990613b1b565b6000611bd5611ffe565b9050611bf5818787611be68861292b565b611bef8861292b565b87612002565b611c3c836040518060600160405280602a815260200161488f602a913960008781526065602090815260408083206001600160a01b038d16845290915290205491906120ff565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054611c739084611fd9565b60008581526065602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188811691908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611cd9908990899061464f565b60405180910390a4610c6d81878787878761296f565b60c95461010090046001600160a01b031681565b6000805160206148b983398151915281565b6000611d2f6000805160206148b983398151915233611358565b90506000611d4b60008051602061482f83398151915233611358565b90506000611d676000805160206148d983398151915233611358565b90508280611d725750815b80611d7a5750805b611d965760405162461bcd60e51b81526004016105f990613941565b611da88c338d8d8d8d8d8d8d8d61245f565b505050505050505050505050565b600081611dc360cb612330565b10611dd05750600161064b565b506000919050565b6001600160a01b038416611dfe5760405162461bcd60e51b81526004016105f9906143d5565b6000611e08611ffe565b9050611e1a81600087611be68861292b565b60008481526065602090815260408083206001600160a01b0389168452909152902054611e479084611fd9565b60008581526065602090815260408083206001600160a01b03808b16808652919093528184209490945551908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611ea5908990899061464f565b60405180910390a4611ebc8160008787878761296f565b5050505050565b6001600160a01b038316611ee95760405162461bcd60e51b81526004016105f990613e9c565b6000611ef3611ffe565b9050611f2381856000611f058761292b565b611f0e8761292b565b60405180602001604052806000815250612002565b611f6a8260405180606001604052806024815260200161480b6024913960008681526065602090815260408083206001600160a01b038b16845290915290205491906120ff565b60008481526065602090815260408083206001600160a01b03808a16808652919093528184209490945551919291908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611fcb908890889061464f565b60405180910390a450505050565b6000828201838110156113515760405162461bcd60e51b81526004016105f990613a50565b3390565b612010868686868686610c6d565b60005b835181101561076c57600060cc600086848151811061202e57fe5b60200260200101518152602001908152602001600020905060c960009054906101000a900460ff16156120f5576001600160a01b03861661206f57506120f7565b600181015460ff166003146120c15760ca546001600160a01b03898116911614806120a057506120a0600089611358565b6120bc5760405162461bcd60e51b81526004016105f990614506565b6120f5565b6120d96000805160206148d983398151915289611358565b6120f55760405162461bcd60e51b81526004016105f990614183565b505b600101612013565b600081848411156121235760405162461bcd60e51b81526004016105f991906137ac565b505050900390565b61213d846001600160a01b0316612a40565b15610c6d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121769089908990889088908890600401613672565b602060405180830381600087803b15801561219057600080fd5b505af19250505080156121c0575060408051601f3d908101601f191682019092526121bd9181019061350e565b60015b612209576121cc61473a565b806121d757506121f1565b8060405162461bcd60e51b81526004016105f991906137ac565b60405162461bcd60e51b81526004016105f9906137bf565b6001600160e01b0319811663bc197c8160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b60008281526097602052604090206122519082612a46565b15610cb95761225e611ffe565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000808260ff161180156122ba575060038260ff1611155b15611dd05750600161064b565b60008281526097602052604090206122df9082612a5b565b15610cb9576122ec611ffe565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b5490565b60006113518383612a70565b6000611351836001600160a01b038416612ab5565b600061236030612a40565b15905090565b600054610100900460ff168061237f575061237f612355565b8061238d575060005460ff16155b6123a95760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156123d4576000805460ff1961ff0019909116610100171660011790555b6123dc612acd565b6123e4612b50565b6123ed82612bce565b8015610cb9576000805461ff00191690555050565b600082815260976020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526097602052604090912060020155565b600061062782612330565b612468886122a2565b6124845760405162461bcd60e51b81526004016105f990614473565b60c95460ff1615612596578760ff16600114806124a457508760ff166002145b156125515760ca546001600160a01b031633146124d35760405162461bcd60e51b81526004016105f9906140e2565b6124de60008b611358565b6124fa5760405162461bcd60e51b81526004016105f990614264565b6125126000805160206148b98339815191528a611358565b80612530575061253060008051602061482f8339815191528a611358565b61254c5760405162461bcd60e51b81526004016105f990613d5a565b612591565b8760ff1660031415612591576125756000805160206148d98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990614206565b612656565b8760ff16600114156125d6576125ba6000805160206148b98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f99061433d565b8760ff1660021415612616576125fa60008051602061482f8339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990613c63565b8760ff16600314156126565761263a6000805160206148d98339815191528a611358565b6126565760405162461bcd60e51b81526004016105f990614085565b61266060cb612c65565b600060cc600061267060cb612330565b8152602001908152602001600020905061268a60cb612330565b8160000181905550888160010160006101000a81548160ff021916908360ff1602179055508a8160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160010160016101000a8154816001600160a01b0302191690836001600160a01b031602179055508681600301819055508581600401819055508481600601819055504281600501819055508381600701908051906020019061273d929190612e4f565b5082516127539060088301906020860190612e4f565b5081516127699060098301906020850190612e4f565b5061278e8b61277860cb612330565b8a60405180602001604052806000815250611dd8565b8860ff166003141561281257600281015481546127b5916001600160a01b0316908a611ec3565b8054600090815260cd6020908152604080832060028501546001600160a01b031684529091529020546127e89089611fd9565b8154600090815260cd6020908152604080832060028601546001600160a01b031684529091529020555b8060020160009054906101000a90046001600160a01b03166001600160a01b03168160010160019054906101000a90046001600160a01b03166001600160a01b03167f99cc3eeb446560c9a2d2483bc5160735ec0fb1851aea3bde32e7a56c30c11da68a60cd60008660000154815260200190815260200160002060008660020160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000205485600001548660010160009054906101000a900460ff168760030154886004015489600601548a600501548b6007018c6008018d6009016040516129169b9a9998979695949392919061465d565b60405180910390a35050505050505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061295e57fe5b602090810291909101015292915050565b612981846001600160a01b0316612a40565b15610c6d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906129ba90899089908890889088906004016136d0565b602060405180830381600087803b1580156129d457600080fd5b505af1925050508015612a04575060408051601f3d908101601f19168201909252612a019181019061350e565b60015b612a10576121cc61473a565b6001600160e01b0319811663f23a6e6160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b3b151590565b6000611351836001600160a01b038416612c6e565b6000611351836001600160a01b038416612cb8565b81546000908210612a935760405162461bcd60e51b81526004016105f990613868565b826000018281548110612aa257fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b600054610100900460ff1680612ae65750612ae6612355565b80612af4575060005460ff16155b612b105760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612b3b576000805460ff1961ff0019909116610100171660011790555b8015612b4d576000805461ff00191690555b50565b600054610100900460ff1680612b695750612b69612355565b80612b77575060005460ff16155b612b935760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612bbe576000805460ff1961ff0019909116610100171660011790555b612b3b6301ffc9a760e01b612d7e565b600054610100900460ff1680612be75750612be7612355565b80612bf5575060005460ff16155b612c115760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612c3c576000805460ff1961ff0019909116610100171660011790555b612c4582612dcd565b612c55636cdb3d1360e11b612d7e565b6123ed6303a24d0760e21b612d7e565b80546001019055565b6000612c7a8383612ab5565b612cb057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610627565b506000610627565b60008181526001830160205260408120548015612d745783546000198083019190810190600090879083908110612ceb57fe5b9060005260206000200154905080876000018481548110612d0857fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612d3857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610627565b6000915050610627565b6001600160e01b03198082161415612da85760405162461bcd60e51b81526004016105f9906139d5565b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b8051610cb9906067906020840190612e4f565b60405180610160016040528060008152602001600060ff16815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016060815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e9057805160ff1916838001178555612ebd565b82800160010185558215612ebd579182015b82811115612ebd578251825591602001919060010190612ea2565b50612ec9929150612ecd565b5090565b5b80821115612ec95760008155600101612ece565b80356001600160a01b038116811461062757600080fd5b600082601f830112612f09578081fd5b8135612f1c612f1782614708565b6146e1565b818152915060208083019084810181840286018201871015612f3d57600080fd5b60005b84811015612f5c57813584529282019290820190600101612f40565b505050505092915050565b600082601f830112612f77578081fd5b813567ffffffffffffffff811115612f8d578182fd5b612fa0601f8201601f19166020016146e1565b9150808252836020828501011115612fb757600080fd5b8060208401602084013760009082016020015292915050565b803560ff8116811461062757600080fd5b600060208284031215612ff2578081fd5b6113518383612ee2565b6000806040838503121561300e578081fd5b6130188484612ee2565b91506130278460208501612ee2565b90509250929050565b600080600080600060a08688031215613047578081fd5b8535613052816147df565b94506020860135613062816147df565b9350604086013567ffffffffffffffff8082111561307e578283fd5b61308a89838a01612ef9565b9450606088013591508082111561309f578283fd5b6130ab89838a01612ef9565b935060808801359150808211156130c0578283fd5b506130cd88828901612f67565b9150509295509295909350565b600080600080600060a086880312156130f1578081fd5b6130fb8787612ee2565b945061310a8760208801612ee2565b93506040860135925060608601359150608086013567ffffffffffffffff811115613133578182fd5b6130cd88828901612f67565b6000806000806000806000806000806101408b8d03121561315e578485fd5b6131688c8c612ee2565b99506131778c60208d01612ee2565b98506131868c60408d01612fd0565b975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013567ffffffffffffffff808211156131be578485fd5b6131ca8e838f01612f67565b94506101008d01359150808211156131e0578384fd5b6131ec8e838f01612f67565b93506101208d0135915080821115613202578283fd5b5061320f8d828e01612f67565b9150509295989b9194979a5092959850565b60008060408385031215613233578182fd5b61323d8484612ee2565b915060208301358015158114613251578182fd5b809150509250929050565b6000806040838503121561326e578182fd5b6132788484612ee2565b946020939093013593505050565b60008060006060848603121561329a578081fd5b6132a48585612ee2565b95602085013595506040909401359392505050565b600080604083850312156132cb578182fd5b6132d58484612ee2565b91506130278460208501612fd0565b60008060008060008060008060006101208a8c031215613302578283fd5b61330c8b8b612ee2565b985061331b8b60208c01612fd0565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013567ffffffffffffffff80821115613353578485fd5b61335f8d838e01612f67565b945060e08c0135915080821115613374578384fd5b6133808d838e01612f67565b93506101008c0135915080821115613396578283fd5b506133a38c828d01612f67565b9150509295985092959850929598565b600080604083850312156133c5578182fd5b823567ffffffffffffffff808211156133dc578384fd5b818501915085601f8301126133ef578384fd5b81356133fd612f1782614708565b80828252602080830192508086018a82838702890101111561341d578889fd5b8896505b84871015613447576134338b82612ee2565b845260019690960195928101928101613421565b50909650870135935050508082111561345e578283fd5b5061346b85828601612ef9565b9150509250929050565b600060208284031215613486578081fd5b81358015158114611351578182fd5b6000602082840312156134a6578081fd5b5035919050565b600080604083850312156134bf578182fd5b823591506020830135613251816147df565b600080604083850312156134e3578182fd5b50508035926020909101359150565b600060208284031215613503578081fd5b8135611351816147f4565b60006020828403121561351f578081fd5b8151611351816147f4565b60006020828403121561353b578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561357e57815187529582019590820190600101613562565b509495945050505050565b60008151808452815b818110156135ae57602081850181015186830182015201613592565b818111156135bf5782602083870101525b50601f01601f19169290920160200192915050565b600081546001808216600081146135f257600181146136105761364e565b60028304607f16865260ff198316602087015260408601935061364e565b6002830480875261362086614728565b60005b828110156136445781546020828b0101528482019150602081019050613623565b8801602001955050505b50505092915050565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061369e9083018661354f565b82810360608401526136b0818661354f565b905082810360808401526136c48185613589565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061370a90830184613589565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b600060208252611351602083018461354f565b600060408252613754604083018561354f565b8281036020840152613766818561354f565b95945050505050565b901515815260200190565b941515855292151560208501529015156040840152151560608301521515608082015260a00190565b90815260200190565b6000602082526113516020830184613589565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b60208082526035908201527f434c4d383a3a69737375654f6e426568616c663a2063616c6c206d757374206360408201527437b6b290333937b6902220a79037b91030b236b4b760591b606082015260800190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526e0818591b5a5b881d1bc819dc985b9d608a1b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c794465616c65723a206d73672e73656e646572206e6f746040820152681030903232b0b632b960b91b606082015260800190565b6020808252602b908201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60408201526a65726f206164647265737360a81b606082015260800190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b60208082526024908201527f434c4d383a3a7265746972653a20746f6b656e496420646f6573206e6f7420656040820152631e1a5cdd60e21b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526022908201527f434c4d383a3a6d696e743a20746f6b656e496420646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b60208082526032908201527f434c4d383a3a756e72656769737465724465616c65723a20746f6b656e54797060408201527119525908191bd95cc81b9bdd08195e1a5cdd60721b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526046908201527f434c4d383a3a756e7265676973746572436f6e73756d6572286c696d6974656460408201527f293a206f6e6c792061646d696e2063616e20756e726567697374657220636f6e60608201526573756d65727360d01b608082015260a00190565b6020808252602a908201527f434c4d383a3a676574546f6b656e547970653a20746f6b656e496420646f6573604082015269081b9bdd08195e1a5cdd60b21b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c7941646d696e3a206d73672e73656e646572206e6f74206040820152683a34329030b236b4b760b91b606082015260800190565b60208082526033908201527f434c4d383a3a5f69737375653a20697373756572206e6f7420612072656769736040820152723a32b932b21037b33339b2ba103232b0b632b960691b606082015260800190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526f2061646d696e20746f207265766f6b6560801b606082015260800190565b60208082526034908201527f434c4d383a3a7265746972653a206e6f7420656e6f75676820617661696c61626040820152736c652062616c616e636520746f2072657469726560601b606082015260800190565b60208082526037908201527f434c4d383a3a5f6973737565286c696d69746564293a2070726f706f7365722060408201527f6e6f7420612072656769737465726564206465616c6572000000000000000000606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526036908201527f434c4d383a3a7472616e736665723a2073656e64657220616e642072656365696040820152757665722063616e6e6f74206265207468652073616d6560501b606082015260800190565b60208082526032908201527f434c4d383a3a6d696e743a2063616e6e6f74206d696e74206e657720746f6b656040820152716e7320696e206c696d69746564206d6f646560701b606082015260800190565b60208082526030908201527f434c4d383a3a72656769737465724465616c65723a20746f6b656e547970654960408201526f1908191bd95cc81b9bdd08195e1a5cdd60821b606082015260800190565b60208082526026908201527f434c4d383a3a7472616e736665723a20746f6b656e496420646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b60208082526042908201527f434c4d383a3a7265676973746572436f6e73756d6572286c696d69746564293a60408201527f206f6e6c792061646d696e2063616e20726567697374657220636f6e73756d65606082015261727360f01b608082015260a00190565b60208082526037908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201527f746572656420656d697373696f6e732061756469746f72000000000000000000606082015260800190565b6020808252602e908201527f434c4d383a3a5f6973737565286c696d69746564293a206d73672e73656e646560408201526d72206e6f742074696d656c6f636b60901b606082015260800190565b60208082526033908201527f434c4d383a3a676574546f6b656e52657469726564416d6f756e743a20746f6b604082015272195b925908191bd95cc81b9bdd08195e1a5cdd606a1b606082015260800190565b60208082526058908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c7920656d697373696f6e732061756469746f72732063616e60608201527f206973737565206175646974656420656d697373696f6e730000000000000000608082015260a00190565b602080825260409082018190527f434c4d383a3a5f6973737565286c696d69746564293a20697373756572206e6f908201527f742061207265676973746572656420656d697373696f6e732061756469746f72606082015260800190565b60208082526027908201527f434c4d383a3a5f6973737565286c696d69746564293a20697373756565206e6f6040820152663a1030b236b4b760c91b606082015260800190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526030908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201526f3a32b932b2102922a1903232b0b632b960811b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252603d908201527f434c4d383a3a636f6e73756d65724f724465616c65723a206d73672e73656e6460408201527f6572206e6f74206120636f6e73756d6572206f722061206465616c6572000000606082015260800190565b60208082526024908201527f434c4d383a3a5f69737375653a20746f6b656e54797065496420697320696e76604082015263185b1a5960e21b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b6020808252604b908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c792061646d696e20616e642044414f2063616e207472616e60608201526a7366657220746f6b656e7360a81b608082015260a00190565b6000602082528251602083015260208301516145966040840182613657565b5060408301516145a96060840182613542565b5060608301516145bc6080840182613542565b50608083015160a083015260a083015160c083015260c083015160e083015260e08301516101008181850152808501519150506101606101208181860152614608610180860184613589565b9250808601519050601f196101408187860301818801526146298584613589565b9088015187820390920184880152935090506146458382613589565b9695505050505050565b918252602082015260400190565b60006101608d83528c60208401528b604084015260ff8b1660608401528960808401528860a08401528760c08401528660e0840152806101008401526146a5818401876135d4565b90508281036101208401526146ba81866135d4565b90508281036101408401526146cf81856135d4565b9e9d5050505050505050505050505050565b60405181810167ffffffffffffffff8111828210171561470057600080fd5b604052919050565b600067ffffffffffffffff82111561471e578081fd5b5060209081020190565b60009081526020902090565b60e01c90565b600060443d101561474a57611100565b600481823e6308c379a061475e8251614734565b1461476857611100565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156147985750505050611100565b828401925082519150808211156147b25750505050611100565b503d830160208284010111156147ca57505050611100565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114612b4d57600080fd5b6001600160e01b031981168114612b4d57600080fdfe455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76af8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e736665722ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12ca2646970667358221220055a69771b7a92b6338a8700f94a7ad5684ecca1ae185c3b59807314c8f1f23c64736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x273 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x7F157C9B GT PUSH2 0x151 JUMPI DUP1 PUSH4 0xCE6CCFAF GT PUSH2 0xC3 JUMPI DUP1 PUSH4 0xE985E9C5 GT PUSH2 0x87 JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0x575 JUMPI DUP1 PUSH4 0xF000BE98 EQ PUSH2 0x588 JUMPI DUP1 PUSH4 0xF242432A EQ PUSH2 0x59B JUMPI DUP1 PUSH4 0xF851A440 EQ PUSH2 0x5AE JUMPI DUP1 PUSH4 0xFCBA7948 EQ PUSH2 0x5B6 JUMPI DUP1 PUSH4 0xFD0C4A9A EQ PUSH2 0x5BE JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0xCE6CCFAF EQ PUSH2 0x510 JUMPI DUP1 PUSH4 0xD547741F EQ PUSH2 0x534 JUMPI DUP1 PUSH4 0xDBA851B0 EQ PUSH2 0x547 JUMPI DUP1 PUSH4 0xDDC3E6EB EQ PUSH2 0x54F JUMPI DUP1 PUSH4 0xE2E564F2 EQ PUSH2 0x562 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0xA217FDDF GT PUSH2 0x115 JUMPI DUP1 PUSH4 0xA217FDDF EQ PUSH2 0x49C JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x4A4 JUMPI DUP1 PUSH4 0xBDACB303 EQ PUSH2 0x4B7 JUMPI DUP1 PUSH4 0xC1E03728 EQ PUSH2 0x4CA JUMPI DUP1 PUSH4 0xC4D66DE8 EQ PUSH2 0x4EA JUMPI DUP1 PUSH4 0xCA15C873 EQ PUSH2 0x4FD JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x7F157C9B EQ PUSH2 0x422 JUMPI DUP1 PUSH4 0x9010D07C EQ PUSH2 0x443 JUMPI DUP1 PUSH4 0x91D14854 EQ PUSH2 0x463 JUMPI DUP1 PUSH4 0x92089C46 EQ PUSH2 0x476 JUMPI DUP1 PUSH4 0xA0D975A7 EQ PUSH2 0x489 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x31AA4B20 GT PUSH2 0x1EA JUMPI DUP1 PUSH4 0x53DBE982 GT PUSH2 0x1AE JUMPI DUP1 PUSH4 0x53DBE982 EQ PUSH2 0x3D1 JUMPI DUP1 PUSH4 0x5DDB368F EQ PUSH2 0x3E4 JUMPI DUP1 PUSH4 0x69F7EF44 EQ PUSH2 0x3EC JUMPI DUP1 PUSH4 0x76AED2E1 EQ PUSH2 0x3FF JUMPI DUP1 PUSH4 0x76CE4755 EQ PUSH2 0x412 JUMPI DUP1 PUSH4 0x78E5C592 EQ PUSH2 0x41A JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x31AA4B20 EQ PUSH2 0x365 JUMPI DUP1 PUSH4 0x33781A0E EQ PUSH2 0x378 JUMPI DUP1 PUSH4 0x36568ABE EQ PUSH2 0x38B JUMPI DUP1 PUSH4 0x44B22FDD EQ PUSH2 0x39E JUMPI DUP1 PUSH4 0x4E1273F4 EQ PUSH2 0x3B1 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x18A50D7E GT PUSH2 0x23C JUMPI DUP1 PUSH4 0x18A50D7E EQ PUSH2 0x309 JUMPI DUP1 PUSH4 0x1EF68EF7 EQ PUSH2 0x311 JUMPI DUP1 PUSH4 0x248A9CA3 EQ PUSH2 0x319 JUMPI DUP1 PUSH4 0x293A7F2E EQ PUSH2 0x32C JUMPI DUP1 PUSH4 0x2EB2C2D6 EQ PUSH2 0x33F JUMPI DUP1 PUSH4 0x2F2FF15D EQ PUSH2 0x352 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH3 0xFDD58E EQ PUSH2 0x278 JUMPI DUP1 PUSH4 0x1FFC9A7 EQ PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x95BCDB6 EQ PUSH2 0x2C1 JUMPI DUP1 PUSH4 0xE89341C EQ PUSH2 0x2D6 JUMPI DUP1 PUSH4 0x156E29F6 EQ PUSH2 0x2F6 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x28B PUSH2 0x286 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x5D1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x37A3 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x2B4 PUSH2 0x2AF CALLDATASIZE PUSH1 0x4 PUSH2 0x34F2 JUMP JUMPDEST PUSH2 0x62D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x376F JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x2CF CALLDATASIZE PUSH1 0x4 PUSH2 0x3286 JUMP JUMPDEST PUSH2 0x650 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x2E9 PUSH2 0x2E4 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x775 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x304 CALLDATASIZE PUSH1 0x4 PUSH2 0x3286 JUMP JUMPDEST PUSH2 0x80D JUMP JUMPDEST PUSH2 0x28B PUSH2 0x89C JUMP JUMPDEST PUSH2 0x28B PUSH2 0x8AE JUMP JUMPDEST PUSH2 0x28B PUSH2 0x327 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x8C0 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x33A CALLDATASIZE PUSH1 0x4 PUSH2 0x34D1 JUMP JUMPDEST PUSH2 0x8D5 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x34D CALLDATASIZE PUSH1 0x4 PUSH2 0x3030 JUMP JUMPDEST PUSH2 0xA56 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x360 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0xC75 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x373 CALLDATASIZE PUSH1 0x4 PUSH2 0x32B9 JUMP JUMPDEST PUSH2 0xCBD JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x386 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xDBE JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x399 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0xDD8 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x3AC CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xE1A JUMP JUMPDEST PUSH2 0x3C4 PUSH2 0x3BF CALLDATASIZE PUSH1 0x4 PUSH2 0x33B3 JUMP JUMPDEST PUSH2 0xF1F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x372E JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x3DF CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xFEC JUMP JUMPDEST PUSH2 0x28B PUSH2 0x10F1 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x3FA CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x2E9 PUSH2 0x40D CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x1185 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x127E JUMP JUMPDEST PUSH2 0x28B PUSH2 0x1290 JUMP JUMPDEST PUSH2 0x435 PUSH2 0x430 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x12A2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP3 SWAP2 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH2 0x456 PUSH2 0x451 CALLDATASIZE PUSH1 0x4 PUSH2 0x34D1 JUMP JUMPDEST PUSH2 0x1339 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x365E JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x471 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x456 PUSH2 0x484 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x1370 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x497 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x1393 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x13E2 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4B2 CALLDATASIZE PUSH1 0x4 PUSH2 0x3221 JUMP JUMPDEST PUSH2 0x13E7 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4C5 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x14B5 JUMP JUMPDEST PUSH2 0x4DD PUSH2 0x4D8 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x14FE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x4577 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4F8 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x173E JUMP JUMPDEST PUSH2 0x28B PUSH2 0x50B CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x189E JUMP JUMPDEST PUSH2 0x523 PUSH2 0x51E CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x18B5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x377A JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x542 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x1983 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x55D CALLDATASIZE PUSH1 0x4 PUSH2 0x3475 JUMP JUMPDEST PUSH2 0x198C JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x570 CALLDATASIZE PUSH1 0x4 PUSH2 0x32B9 JUMP JUMPDEST PUSH2 0x19C6 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x583 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FFC JUMP JUMPDEST PUSH2 0x1AD4 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x596 CALLDATASIZE PUSH1 0x4 PUSH2 0x313F JUMP JUMPDEST PUSH2 0x1B02 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x5A9 CALLDATASIZE PUSH1 0x4 PUSH2 0x30DA JUMP JUMPDEST PUSH2 0x1B5B JUMP JUMPDEST PUSH2 0x456 PUSH2 0x1CEF JUMP JUMPDEST PUSH2 0x28B PUSH2 0x1D03 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x5CC CALLDATASIZE PUSH1 0x4 PUSH2 0x32E4 JUMP JUMPDEST PUSH2 0x1D15 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x602 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x398A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x33 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x66A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x686 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x6A2 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x6BE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP4 DUP1 PUSH2 0x6C9 JUMPI POP DUP3 JUMPDEST DUP1 PUSH2 0x6D1 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x6D9 JUMPI POP DUP1 JUMPDEST PUSH2 0x6F5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4416 JUMP JUMPDEST PUSH2 0x6FE DUP7 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x71A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3FD7 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND EQ ISZERO PUSH2 0x743 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3EDF JUMP JUMPDEST PUSH2 0x76C CALLER DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH4 0x3078303 PUSH1 0xE4 SHL DUP2 MSTORE POP PUSH2 0x1B5B JUMP JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x67 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x801 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x7D6 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x801 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x7E4 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x818 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x834 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0x83D DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x859 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A87 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x87C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3F35 JUMP JUMPDEST PUSH2 0x897 DUP4 DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1DD8 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x8EF PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x90B PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x927 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x943 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP4 DUP1 PUSH2 0x94E JUMPI POP DUP3 JUMPDEST DUP1 PUSH2 0x956 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x95E JUMPI POP DUP1 JUMPDEST PUSH2 0x97A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4416 JUMP JUMPDEST PUSH2 0x983 DUP7 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x99F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A0C JUMP JUMPDEST PUSH2 0x9A9 CALLER DUP8 PUSH2 0x5D1 JUMP JUMPDEST DUP6 GT ISZERO PUSH2 0x9C8 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3D06 JUMP JUMPDEST PUSH2 0x9D3 CALLER DUP8 DUP8 PUSH2 0x1EC3 JUMP JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x9F7 SWAP1 DUP7 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP2 DUP3 SWAP1 KECCAK256 SWAP3 SWAP1 SWAP3 SSTORE MLOAD PUSH32 0x8F1B5EBB586D3D169E4ED07DB9CD10CE0DD30C7B656171310EAE7517C0B53CF9 SWAP1 PUSH2 0xA46 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP POP POP POP POP JUMP JUMPDEST DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0xA77 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x438D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0xA9D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DB7 JUMP JUMPDEST PUSH2 0xAA5 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0xACB JUMPI POP PUSH2 0xACB DUP6 PUSH2 0x583 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xAE7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DFC JUMP JUMPDEST PUSH1 0x0 PUSH2 0xAF1 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0xB01 DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x2002 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0xC07 JUMPI PUSH1 0x0 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xB1B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xB33 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0xBA0 DUP2 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x488F PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x65 PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP14 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD PUSH2 0x20FF SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP15 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP11 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xBD7 SWAP1 DUP3 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP6 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP13 AND DUP7 MSTORE SWAP1 SWAP2 MSTORE SWAP1 SWAP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE POP PUSH1 0x1 ADD PUSH2 0xB04 JUMP JUMPDEST POP DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x4A39DC06D4C0DBC64B70AF90FD698A233A518AA5D07E595D983B8C0526C8F7FB DUP8 DUP8 PUSH1 0x40 MLOAD PUSH2 0xC57 SWAP3 SWAP2 SWAP1 PUSH2 0x3741 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xC6D DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x212B JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0xC93 SWAP1 PUSH2 0x471 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xCAF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38F2 JUMP JUMPDEST PUSH2 0xCB9 DUP3 DUP3 PUSH2 0x2239 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xCC8 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xCE4 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0xCED DUP2 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0xD09 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3F87 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0xD32 JUMPI PUSH2 0xD2D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD6E JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0xD56 JUMPI PUSH2 0xD2D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD6E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD86 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH32 0xA8377DEEE15954185683D55EFFD369508B4935978C8CB2BAB790BF04C5701814 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x627 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xDE0 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0xE10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x44B7 JUMP JUMPDEST PUSH2 0xCB9 DUP3 DUP3 PUSH2 0x22C7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE34 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0xE50 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0xE6C PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0xE77 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0xE7F JUMPI POP DUP1 JUMPDEST PUSH2 0xE9B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xECD JUMPI PUSH2 0xEB1 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xECD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x401D JUMP JUMPDEST PUSH2 0xEE5 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0x69A0ADEE259D26FE61F4776F7BEA7F3A9737C7321256821B985F988545EFD319 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0xF42 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x42F4 JUMP JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0xF5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xF86 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0xFE4 JUMPI PUSH2 0xFC5 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xFA4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xFB8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x5D1 JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xFD1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0xF8C JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1006 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1022 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x103E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1049 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1051 JUMPI POP DUP1 JUMPDEST PUSH2 0x106D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x109F JUMPI PUSH2 0x1083 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x109F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3B64 JUMP JUMPDEST PUSH2 0x10B7 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0x1949 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0x3A38088DA75EE2D80F6C753F55F8FD17602AE17D8BD0EF44D5E1F28AB5AF11F SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10FD PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x111E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP5 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x113A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1156 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP7 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1161 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1169 JUMPI POP DUP1 JUMPDEST ISZERO PUSH2 0x117A JUMPI PUSH1 0x1 SWAP4 POP POP POP POP PUSH2 0x64B JUMP JUMPDEST POP PUSH1 0x0 SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1190 DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x11AC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3BD0 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP1 DUP3 ADD SLOAD PUSH1 0xFF AND EQ ISZERO PUSH2 0x1204 JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1C DUP2 MSTORE PUSH32 0x52656E657761626C6520456E6572677920436572746966696361746500000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x64B JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x124F JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x17 DUP2 MSTORE PUSH32 0x436172626F6E20456D697373696F6E73204F6666736574000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x64B JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH17 0x4175646974656420456D697373696F6E73 PUSH1 0x78 SHL PUSH1 0x20 DUP3 ADD MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x12B1 DUP6 DUP6 PUSH2 0x5D1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xA0D975A7 PUSH1 0xE0 SHL DUP2 MSTORE SWAP1 SWAP2 POP PUSH1 0x0 SWAP1 ADDRESS SWAP1 PUSH4 0xA0D975A7 SWAP1 PUSH2 0x12DC SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0x3715 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x12F4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1308 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x132C SWAP2 SWAP1 PUSH2 0x352A JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x1351 SWAP1 DUP4 PUSH2 0x2334 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x1351 SWAP1 DUP4 PUSH2 0x2340 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 ADD SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139E DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x13BA JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4130 JUMP JUMPDEST POP PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 JUMP JUMPDEST DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x13F9 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1420 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x42AB JUMP JUMPDEST DUP1 PUSH1 0x66 PUSH1 0x0 PUSH2 0x142D PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP2 DUP3 ADD PUSH1 0x0 SWAP1 DUP2 KECCAK256 SWAP2 DUP8 AND DUP1 DUP3 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP3 ISZERO ISZERO SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 SSTORE PUSH2 0x1471 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 DUP4 PUSH1 0x40 MLOAD PUSH2 0x14A9 SWAP2 SWAP1 PUSH2 0x376F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH2 0x14C0 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x14DC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH1 0xCA DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x1506 PUSH2 0x2DE0 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP3 MLOAD PUSH2 0x160 DUP2 ADD DUP5 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP1 DUP4 ADD SLOAD PUSH1 0xFF DUP2 AND DUP4 DUP7 ADD MSTORE PUSH2 0x100 SWAP1 DUP2 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP5 DUP9 ADD MSTORE PUSH1 0x2 DUP1 DUP7 ADD SLOAD SWAP1 SWAP2 AND PUSH1 0x60 DUP6 ADD MSTORE PUSH1 0x3 DUP6 ADD SLOAD PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0x4 DUP6 ADD SLOAD PUSH1 0xA0 DUP6 ADD MSTORE PUSH1 0x5 DUP6 ADD SLOAD PUSH1 0xC0 DUP6 ADD MSTORE PUSH1 0x6 DUP6 ADD SLOAD PUSH1 0xE0 DUP6 ADD MSTORE PUSH1 0x7 DUP6 ADD DUP1 SLOAD DUP9 MLOAD SWAP5 DUP2 AND ISZERO DUP5 MUL PUSH1 0x0 NOT ADD AND SWAP2 SWAP1 SWAP2 DIV PUSH1 0x1F DUP2 ADD DUP8 SWAP1 DIV DUP8 MUL DUP5 ADD DUP8 ADD SWAP1 SWAP8 MSTORE DUP7 DUP4 MSTORE SWAP3 SWAP6 SWAP4 SWAP5 SWAP1 DUP7 ADD SWAP4 SWAP2 SWAP3 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x1606 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x15DB JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1606 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x15E9 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP SWAP2 DUP4 MSTORE POP POP PUSH1 0x8 DUP3 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x2 PUSH1 0x1 DUP6 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP3 ADD DUP5 ADD SWAP1 SWAP3 MSTORE DUP2 DUP2 MSTORE SWAP4 DUP3 ADD SWAP4 SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x169A JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x166F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x169A JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x167D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP SWAP2 DUP4 MSTORE POP POP PUSH1 0x9 DUP3 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x2 PUSH1 0x1 DUP6 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP3 ADD DUP5 ADD SWAP1 SWAP3 MSTORE DUP2 DUP2 MSTORE SWAP4 DUP3 ADD SWAP4 SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x172E JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1703 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x172E JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1711 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 MSTORE POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x1757 JUMPI POP PUSH2 0x1757 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x1765 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x1781 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x17AC JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x17C4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x2366 JUMP JUMPDEST PUSH2 0x17EA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH2 0x2402 JUMP JUMPDEST PUSH2 0x17F5 PUSH1 0x0 DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x180D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x1825 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x183D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x1855 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH1 0xC9 DUP1 SLOAD PUSH1 0xCA DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE PUSH2 0x100 PUSH1 0x1 PUSH1 0xA8 SHL SUB NOT AND PUSH2 0x100 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND MUL OR PUSH1 0xFF NOT AND SWAP1 SSTORE DUP1 ISZERO PUSH2 0xCB9 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x627 SWAP1 PUSH2 0x2454 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 DUP1 DUP1 DUP1 PUSH2 0x18C6 DUP2 DUP9 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x18E2 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP10 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x18FE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x191A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP12 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1936 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP13 PUSH2 0x1358 JUMP JUMPDEST SWAP5 SWAP12 SWAP4 SWAP11 POP SWAP2 SWAP9 POP SWAP7 POP SWAP2 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x1967 SWAP1 PUSH2 0x471 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xE10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3CB6 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH2 0x1997 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x19B3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH1 0xC9 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x19D1 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x19ED JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0x19F6 DUP2 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0x1A12 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3AC9 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x1A3B JUMPI PUSH2 0x1A36 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A77 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x1A5F JUMPI PUSH2 0x1A36 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A77 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A80 DUP3 PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x1A9C JUMPI PUSH2 0x1A9C PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH32 0x98552DED770F1D05A505572F3387C108DBC6B566EA3D49F83CFF3D1F1C72A042 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x66 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ DUP1 PUSH2 0x1B21 JUMPI POP PUSH2 0x1B21 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x1B3D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3813 JUMP JUMPDEST PUSH2 0x1B4F DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 PUSH2 0x245F JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x1B81 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DB7 JUMP JUMPDEST PUSH2 0x1B89 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0x1BAF JUMPI POP PUSH2 0x1BAF DUP6 PUSH2 0x583 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0x1BCB JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3B1B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BD5 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1BF5 DUP2 DUP8 DUP8 PUSH2 0x1BE6 DUP9 PUSH2 0x292B JUMP JUMPDEST PUSH2 0x1BEF DUP9 PUSH2 0x292B JUMP JUMPDEST DUP8 PUSH2 0x2002 JUMP JUMPDEST PUSH2 0x1C3C DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x488F PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP14 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD SWAP2 SWAP1 PUSH2 0x20FF JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP8 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x1C73 SWAP1 DUP5 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP12 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 SWAP2 DUP9 DUP2 AND SWAP2 SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1CD9 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xC6D DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x296F JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D2F PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1D4B PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1D67 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1D72 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1D7A JUMPI POP DUP1 JUMPDEST PUSH2 0x1D96 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH2 0x1DA8 DUP13 CALLER DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 PUSH2 0x245F JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x1DC3 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST LT PUSH2 0x1DD0 JUMPI POP PUSH1 0x1 PUSH2 0x64B JUMP JUMPDEST POP PUSH1 0x0 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x1DFE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x43D5 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1E08 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1E1A DUP2 PUSH1 0x0 DUP8 PUSH2 0x1BE6 DUP9 PUSH2 0x292B JUMP JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x1E47 SWAP1 DUP5 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP12 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE DUP2 DUP5 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE MLOAD SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1EA5 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0x1EBC DUP2 PUSH1 0x0 DUP8 DUP8 DUP8 DUP8 PUSH2 0x296F JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x1EE9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E9C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1EF3 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1F23 DUP2 DUP6 PUSH1 0x0 PUSH2 0x1F05 DUP8 PUSH2 0x292B JUMP JUMPDEST PUSH2 0x1F0E DUP8 PUSH2 0x292B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x2002 JUMP JUMPDEST PUSH2 0x1F6A DUP3 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x480B PUSH1 0x24 SWAP2 CODECOPY PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD SWAP2 SWAP1 PUSH2 0x20FF JUMP JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP11 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE DUP2 DUP5 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE MLOAD SWAP2 SWAP3 SWAP2 SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1FCB SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x1351 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A50 JUMP JUMPDEST CALLER SWAP1 JUMP JUMPDEST PUSH2 0x2010 DUP7 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH2 0xC6D JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x76C JUMPI PUSH1 0x0 PUSH1 0xCC PUSH1 0x0 DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x202E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 POP PUSH1 0xC9 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x20F5 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH2 0x206F JUMPI POP PUSH2 0x20F7 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND PUSH1 0x3 EQ PUSH2 0x20C1 JUMPI PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 DUP2 AND SWAP2 AND EQ DUP1 PUSH2 0x20A0 JUMPI POP PUSH2 0x20A0 PUSH1 0x0 DUP10 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x20BC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4506 JUMP JUMPDEST PUSH2 0x20F5 JUMP JUMPDEST PUSH2 0x20D9 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP10 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x20F5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4183 JUMP JUMPDEST POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x2013 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP5 DUP5 GT ISZERO PUSH2 0x2123 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST POP POP POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH2 0x213D DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x2A40 JUMP JUMPDEST ISZERO PUSH2 0xC6D JUMPI PUSH1 0x40 MLOAD PUSH4 0xBC197C81 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH4 0xBC197C81 SWAP1 PUSH2 0x2176 SWAP1 DUP10 SWAP1 DUP10 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x3672 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2190 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x21C0 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x21BD SWAP2 DUP2 ADD SWAP1 PUSH2 0x350E JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x2209 JUMPI PUSH2 0x21CC PUSH2 0x473A JUMP JUMPDEST DUP1 PUSH2 0x21D7 JUMPI POP PUSH2 0x21F1 JUMP JUMPDEST DUP1 PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x37BF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xBC197C81 PUSH1 0xE0 SHL EQ PUSH2 0x76C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38AA JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x2251 SWAP1 DUP3 PUSH2 0x2A46 JUMP JUMPDEST ISZERO PUSH2 0xCB9 JUMPI PUSH2 0x225E PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0x2F8788117E7EFF1D82E926EC794901D17C78024A50270940304540A733656F0D PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0xFF AND GT DUP1 ISZERO PUSH2 0x22BA JUMPI POP PUSH1 0x3 DUP3 PUSH1 0xFF AND GT ISZERO JUMPDEST ISZERO PUSH2 0x1DD0 JUMPI POP PUSH1 0x1 PUSH2 0x64B JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x22DF SWAP1 DUP3 PUSH2 0x2A5B JUMP JUMPDEST ISZERO PUSH2 0xCB9 JUMPI PUSH2 0x22EC PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0xF6391F5C32D9C69D2A47EA670B442974B53935D1EDC7FD64EB21E047A839171B PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 DUP4 PUSH2 0x2A70 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2AB5 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2360 ADDRESS PUSH2 0x2A40 JUMP JUMPDEST ISZERO SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x237F JUMPI POP PUSH2 0x237F PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x238D JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x23A9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x23D4 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x23DC PUSH2 0x2ACD JUMP JUMPDEST PUSH2 0x23E4 PUSH2 0x2B50 JUMP JUMPDEST PUSH2 0x23ED DUP3 PUSH2 0x2BCE JUMP JUMPDEST DUP1 ISZERO PUSH2 0xCB9 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 MLOAD DUP4 SWAP3 DUP6 SWAP2 PUSH32 0xBD79B86FFE0AB8E8776151514217CD7CACD52C909F66475C3AF44E129F0B00FF SWAP2 SWAP1 LOG4 PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 PUSH1 0x2 ADD SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x627 DUP3 PUSH2 0x2330 JUMP JUMPDEST PUSH2 0x2468 DUP9 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0x2484 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4473 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x2596 JUMPI DUP8 PUSH1 0xFF AND PUSH1 0x1 EQ DUP1 PUSH2 0x24A4 JUMPI POP DUP8 PUSH1 0xFF AND PUSH1 0x2 EQ JUMPDEST ISZERO PUSH2 0x2551 JUMPI PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x24D3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x40E2 JUMP JUMPDEST PUSH2 0x24DE PUSH1 0x0 DUP12 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x24FA JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4264 JUMP JUMPDEST PUSH2 0x2512 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST DUP1 PUSH2 0x2530 JUMPI POP PUSH2 0x2530 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x254C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3D5A JUMP JUMPDEST PUSH2 0x2591 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2591 JUMPI PUSH2 0x2575 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4206 JUMP JUMPDEST PUSH2 0x2656 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x25D6 JUMPI PUSH2 0x25BA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x433D JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x2616 JUMPI PUSH2 0x25FA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C63 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2656 JUMPI PUSH2 0x263A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2656 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4085 JUMP JUMPDEST PUSH2 0x2660 PUSH1 0xCB PUSH2 0x2C65 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xCC PUSH1 0x0 PUSH2 0x2670 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 POP PUSH2 0x268A PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP2 PUSH1 0x0 ADD DUP2 SWAP1 SSTORE POP DUP9 DUP2 PUSH1 0x1 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 PUSH1 0xFF AND MUL OR SWAP1 SSTORE POP DUP11 DUP2 PUSH1 0x2 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB MUL NOT AND SWAP1 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND MUL OR SWAP1 SSTORE POP DUP10 DUP2 PUSH1 0x1 ADD PUSH1 0x1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB MUL NOT AND SWAP1 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND MUL OR SWAP1 SSTORE POP DUP7 DUP2 PUSH1 0x3 ADD DUP2 SWAP1 SSTORE POP DUP6 DUP2 PUSH1 0x4 ADD DUP2 SWAP1 SSTORE POP DUP5 DUP2 PUSH1 0x6 ADD DUP2 SWAP1 SSTORE POP TIMESTAMP DUP2 PUSH1 0x5 ADD DUP2 SWAP1 SSTORE POP DUP4 DUP2 PUSH1 0x7 ADD SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x273D SWAP3 SWAP2 SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP DUP3 MLOAD PUSH2 0x2753 SWAP1 PUSH1 0x8 DUP4 ADD SWAP1 PUSH1 0x20 DUP7 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP DUP2 MLOAD PUSH2 0x2769 SWAP1 PUSH1 0x9 DUP4 ADD SWAP1 PUSH1 0x20 DUP6 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP PUSH2 0x278E DUP12 PUSH2 0x2778 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP11 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1DD8 JUMP JUMPDEST DUP9 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2812 JUMPI PUSH1 0x2 DUP2 ADD SLOAD DUP2 SLOAD PUSH2 0x27B5 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 DUP11 PUSH2 0x1EC3 JUMP JUMPDEST DUP1 SLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x2 DUP6 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x27E8 SWAP1 DUP10 PUSH2 0x1FD9 JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x2 DUP7 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SSTORE JUMPDEST DUP1 PUSH1 0x2 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 ADD PUSH1 0x1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x99CC3EEB446560C9A2D2483BC5160735EC0FB1851AEA3BDE32E7A56C30C11DA6 DUP11 PUSH1 0xCD PUSH1 0x0 DUP7 PUSH1 0x0 ADD SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP7 PUSH1 0x2 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD DUP6 PUSH1 0x0 ADD SLOAD DUP7 PUSH1 0x1 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND DUP8 PUSH1 0x3 ADD SLOAD DUP9 PUSH1 0x4 ADD SLOAD DUP10 PUSH1 0x6 ADD SLOAD DUP11 PUSH1 0x5 ADD SLOAD DUP12 PUSH1 0x7 ADD DUP13 PUSH1 0x8 ADD DUP14 PUSH1 0x9 ADD PUSH1 0x40 MLOAD PUSH2 0x2916 SWAP12 SWAP11 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x465D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 DUP1 DUP3 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE PUSH1 0x60 SWAP2 DUP3 SWAP2 SWAP1 PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP POP SWAP1 POP DUP3 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x295E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x2981 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x2A40 JUMP JUMPDEST ISZERO PUSH2 0xC6D JUMPI PUSH1 0x40 MLOAD PUSH4 0xF23A6E61 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH4 0xF23A6E61 SWAP1 PUSH2 0x29BA SWAP1 DUP10 SWAP1 DUP10 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x36D0 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x29D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x2A04 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x2A01 SWAP2 DUP2 ADD SWAP1 PUSH2 0x350E JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x2A10 JUMPI PUSH2 0x21CC PUSH2 0x473A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xF23A6E61 PUSH1 0xE0 SHL EQ PUSH2 0x76C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38AA JUMP JUMPDEST EXTCODESIZE ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2C6E JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2CB8 JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP3 LT PUSH2 0x2A93 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3868 JUMP JUMPDEST DUP3 PUSH1 0x0 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x2AA2 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2AE6 JUMPI POP PUSH2 0x2AE6 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2AF4 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2B10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2B3B JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST DUP1 ISZERO PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2B69 JUMPI POP PUSH2 0x2B69 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2B77 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2B93 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2BBE JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x2B3B PUSH4 0x1FFC9A7 PUSH1 0xE0 SHL PUSH2 0x2D7E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2BE7 JUMPI POP PUSH2 0x2BE7 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2BF5 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2C11 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2C3C JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x2C45 DUP3 PUSH2 0x2DCD JUMP JUMPDEST PUSH2 0x2C55 PUSH4 0x6CDB3D13 PUSH1 0xE1 SHL PUSH2 0x2D7E JUMP JUMPDEST PUSH2 0x23ED PUSH4 0x3A24D07 PUSH1 0xE2 SHL PUSH2 0x2D7E JUMP JUMPDEST DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2C7A DUP4 DUP4 PUSH2 0x2AB5 JUMP JUMPDEST PUSH2 0x2CB0 JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP2 DUP2 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP5 SWAP1 SSTORE DUP5 SLOAD DUP5 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x627 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x627 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x2D74 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x2CEB JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP DUP1 DUP8 PUSH1 0x0 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x2D08 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SWAP3 SWAP1 SWAP3 SSTORE DUP3 DUP2 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0x2D38 JUMPI INVALID JUMPDEST PUSH1 0x1 SWAP1 SUB DUP2 DUP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 SWAP1 SSTORE SWAP1 SSTORE DUP7 PUSH1 0x1 ADD PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SSTORE PUSH1 0x1 SWAP5 POP POP POP POP POP PUSH2 0x627 JUMP JUMPDEST PUSH1 0x0 SWAP2 POP POP PUSH2 0x627 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 DUP3 AND EQ ISZERO PUSH2 0x2DA8 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x39D5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x33 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST DUP1 MLOAD PUSH2 0xCB9 SWAP1 PUSH1 0x67 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH2 0x160 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0xFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x2E90 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x2EBD JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x2EBD JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x2EBD JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x2EA2 JUMP JUMPDEST POP PUSH2 0x2EC9 SWAP3 SWAP2 POP PUSH2 0x2ECD JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x2EC9 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x2ECE JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x627 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x2F09 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x2F1C PUSH2 0x2F17 DUP3 PUSH2 0x4708 JUMP JUMPDEST PUSH2 0x46E1 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x2F3D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x2F5C JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x2F40 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x2F77 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2F8D JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x2FA0 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x46E1 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x2FB7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x627 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2FF2 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x1351 DUP4 DUP4 PUSH2 0x2EE2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x300E JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x3018 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH2 0x3027 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x3047 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0x3052 DUP2 PUSH2 0x47DF JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD PUSH2 0x3062 DUP2 PUSH2 0x47DF JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x307E JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x308A DUP10 DUP4 DUP11 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x309F JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x30AB DUP10 DUP4 DUP11 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x30C0 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x30CD DUP9 DUP3 DUP10 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 SWAP1 SWAP4 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x30F1 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x30FB DUP8 DUP8 PUSH2 0x2EE2 JUMP JUMPDEST SWAP5 POP PUSH2 0x310A DUP8 PUSH1 0x20 DUP9 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD SWAP2 POP PUSH1 0x80 DUP7 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x3133 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x30CD DUP9 DUP3 DUP10 ADD PUSH2 0x2F67 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x140 DUP12 DUP14 SUB SLT ISZERO PUSH2 0x315E JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x3168 DUP13 DUP13 PUSH2 0x2EE2 JUMP JUMPDEST SWAP10 POP PUSH2 0x3177 DUP13 PUSH1 0x20 DUP14 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP9 POP PUSH2 0x3186 DUP13 PUSH1 0x40 DUP14 ADD PUSH2 0x2FD0 JUMP JUMPDEST SWAP8 POP PUSH1 0x60 DUP12 ADD CALLDATALOAD SWAP7 POP PUSH1 0x80 DUP12 ADD CALLDATALOAD SWAP6 POP PUSH1 0xA0 DUP12 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 DUP12 ADD CALLDATALOAD SWAP4 POP PUSH1 0xE0 DUP12 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x31BE JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x31CA DUP15 DUP4 DUP16 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP5 POP PUSH2 0x100 DUP14 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x31E0 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x31EC DUP15 DUP4 DUP16 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP4 POP PUSH2 0x120 DUP14 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3202 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x320F DUP14 DUP3 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP12 SWAP2 SWAP5 SWAP8 SWAP11 POP SWAP3 SWAP6 SWAP9 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3233 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x323D DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x3251 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x326E JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3278 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x329A JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x32A4 DUP6 DUP6 PUSH2 0x2EE2 JUMP JUMPDEST SWAP6 PUSH1 0x20 DUP6 ADD CALLDATALOAD SWAP6 POP PUSH1 0x40 SWAP1 SWAP5 ADD CALLDATALOAD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x32CB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x32D5 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH2 0x3027 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x2FD0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x120 DUP11 DUP13 SUB SLT ISZERO PUSH2 0x3302 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x330C DUP12 DUP12 PUSH2 0x2EE2 JUMP JUMPDEST SWAP9 POP PUSH2 0x331B DUP12 PUSH1 0x20 DUP13 ADD PUSH2 0x2FD0 JUMP JUMPDEST SWAP8 POP PUSH1 0x40 DUP11 ADD CALLDATALOAD SWAP7 POP PUSH1 0x60 DUP11 ADD CALLDATALOAD SWAP6 POP PUSH1 0x80 DUP11 ADD CALLDATALOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD CALLDATALOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x3353 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x335F DUP14 DUP4 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP5 POP PUSH1 0xE0 DUP13 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3374 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x3380 DUP14 DUP4 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP4 POP PUSH2 0x100 DUP13 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3396 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x33A3 DUP13 DUP3 DUP14 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x33C5 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x33DC JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x33EF JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x33FD PUSH2 0x2F17 DUP3 PUSH2 0x4708 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP11 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x341D JUMPI DUP9 DUP10 REVERT JUMPDEST DUP9 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x3447 JUMPI PUSH2 0x3433 DUP12 DUP3 PUSH2 0x2EE2 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x3421 JUMP JUMPDEST POP SWAP1 SWAP7 POP DUP8 ADD CALLDATALOAD SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x345E JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x346B DUP6 DUP3 DUP7 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3486 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x1351 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34A6 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x34BF JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x3251 DUP2 PUSH2 0x47DF JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x34E3 JUMPI DUP2 DUP3 REVERT JUMPDEST POP POP DUP1 CALLDATALOAD SWAP3 PUSH1 0x20 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3503 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1351 DUP2 PUSH2 0x47F4 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x351F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1351 DUP2 PUSH2 0x47F4 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x353B JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x357E JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3562 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x35AE JUMPI PUSH1 0x20 DUP2 DUP6 ADD DUP2 ADD MLOAD DUP7 DUP4 ADD DUP3 ADD MSTORE ADD PUSH2 0x3592 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x35BF JUMPI DUP3 PUSH1 0x20 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 AND PUSH1 0x0 DUP2 EQ PUSH2 0x35F2 JUMPI PUSH1 0x1 DUP2 EQ PUSH2 0x3610 JUMPI PUSH2 0x364E JUMP JUMPDEST PUSH1 0x2 DUP4 DIV PUSH1 0x7F AND DUP7 MSTORE PUSH1 0xFF NOT DUP4 AND PUSH1 0x20 DUP8 ADD MSTORE PUSH1 0x40 DUP7 ADD SWAP4 POP PUSH2 0x364E JUMP JUMPDEST PUSH1 0x2 DUP4 DIV DUP1 DUP8 MSTORE PUSH2 0x3620 DUP7 PUSH2 0x4728 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x3644 JUMPI DUP2 SLOAD PUSH1 0x20 DUP3 DUP12 ADD ADD MSTORE DUP5 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x3623 JUMP JUMPDEST DUP9 ADD PUSH1 0x20 ADD SWAP6 POP POP POP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 DUP2 AND DUP3 MSTORE DUP6 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0xA0 PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x369E SWAP1 DUP4 ADD DUP7 PUSH2 0x354F JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x36B0 DUP2 DUP7 PUSH2 0x354F JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x80 DUP5 ADD MSTORE PUSH2 0x36C4 DUP2 DUP6 PUSH2 0x3589 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 DUP2 AND DUP3 MSTORE DUP6 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP2 ADD DUP5 SWAP1 MSTORE PUSH1 0x60 DUP2 ADD DUP4 SWAP1 MSTORE PUSH1 0xA0 PUSH1 0x80 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x370A SWAP1 DUP4 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1351 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x354F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x3754 PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x354F JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x3766 DUP2 DUP6 PUSH2 0x354F JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP5 ISZERO ISZERO DUP6 MSTORE SWAP3 ISZERO ISZERO PUSH1 0x20 DUP6 ADD MSTORE SWAP1 ISZERO ISZERO PUSH1 0x40 DUP5 ADD MSTORE ISZERO ISZERO PUSH1 0x60 DUP4 ADD MSTORE ISZERO ISZERO PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1351 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x34 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E7366657220746F206E6F6E2045524331313535 PUSH1 0x40 DUP3 ADD MSTORE PUSH20 0x2932B1B2B4BB32B91034B6B83632B6B2B73A32B9 PUSH1 0x61 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x35 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A69737375654F6E426568616C663A2063616C6C206D7573742063 PUSH1 0x40 DUP3 ADD MSTORE PUSH21 0x37B6B290333937B6902220A79037B91030B236B4B7 PUSH1 0x59 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x22 SWAP1 DUP3 ADD MSTORE PUSH32 0x456E756D657261626C655365743A20696E646578206F7574206F6620626F756E PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x6473 PUSH1 0xF0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A204552433131353552656365697665722072656A65637465 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x6420746F6B656E73 PUSH1 0xC0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2F SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2073656E646572206D75737420626520616E PUSH1 0x40 DUP3 ADD MSTORE PUSH15 0x818591B5A5B881D1BC819DC985B9D PUSH1 0x8A SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6F6E6C794465616C65723A206D73672E73656E646572206E6F74 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x1030903232B0B632B9 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2B SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2062616C616E636520717565727920666F7220746865207A PUSH1 0x40 DUP3 ADD MSTORE PUSH11 0x65726F2061646472657373 PUSH1 0xA8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1C SWAP1 DUP3 ADD MSTORE PUSH32 0x4552433136353A20696E76616C696420696E7465726661636520696400000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265746972653A20746F6B656E496420646F6573206E6F742065 PUSH1 0x40 DUP3 ADD MSTORE PUSH4 0x1E1A5CDD PUSH1 0xE2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1B SWAP1 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x22 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6D696E743A20746F6B656E496420646F6573206E6F7420657869 PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x1CDD PUSH1 0xF2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A756E72656769737465724465616C65723A20746F6B656E547970 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x19525908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x72 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2063616C6C6572206973206E6F74206F776E6572206E6F72 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x8185C1C1C9BDD9959 PUSH1 0xBA SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x46 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A756E7265676973746572436F6E73756D6572286C696D69746564 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x293A206F6E6C792061646D696E2063616E20756E726567697374657220636F6E PUSH1 0x60 DUP3 ADD MSTORE PUSH6 0x73756D657273 PUSH1 0xD0 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2A SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A676574546F6B656E547970653A20746F6B656E496420646F6573 PUSH1 0x40 DUP3 ADD MSTORE PUSH10 0x81B9BDD08195E1A5CDD PUSH1 0xB2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6F6E6C7941646D696E3A206D73672E73656E646572206E6F7420 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x3A34329030B236B4B7 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x33 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH19 0x3A32B932B21037B33339B2BA103232B0B632B9 PUSH1 0x69 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2073656E646572206D75737420626520616E PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x2061646D696E20746F207265766F6B65 PUSH1 0x80 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x34 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265746972653A206E6F7420656E6F75676820617661696C6162 PUSH1 0x40 DUP3 ADD MSTORE PUSH20 0x6C652062616C616E636520746F20726574697265 PUSH1 0x60 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x37 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A2070726F706F73657220 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6E6F7420612072656769737465726564206465616C6572000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x25 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E7366657220746F20746865207A65726F206164 PUSH1 0x40 DUP3 ADD MSTORE PUSH5 0x6472657373 PUSH1 0xD8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E736665722063616C6C6572206973206E6F7420 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x1BDDDB995C881B9BDC88185C1C1C9BDD9959 PUSH1 0x72 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2E SWAP1 DUP3 ADD MSTORE PUSH32 0x496E697469616C697A61626C653A20636F6E747261637420697320616C726561 PUSH1 0x40 DUP3 ADD MSTORE PUSH14 0x191E481A5B9A5D1A585B1A5E9959 PUSH1 0x92 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x23 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206275726E2066726F6D20746865207A65726F2061646472 PUSH1 0x40 DUP3 ADD MSTORE PUSH3 0x657373 PUSH1 0xE8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x36 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7472616E736665723A2073656E64657220616E64207265636569 PUSH1 0x40 DUP3 ADD MSTORE PUSH22 0x7665722063616E6E6F74206265207468652073616D65 PUSH1 0x50 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6D696E743A2063616E6E6F74206D696E74206E657720746F6B65 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x6E7320696E206C696D69746564206D6F6465 PUSH1 0x70 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A72656769737465724465616C65723A20746F6B656E5479706549 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x1908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x82 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x26 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7472616E736665723A20746F6B656E496420646F6573206E6F74 PUSH1 0x40 DUP3 ADD MSTORE PUSH6 0x8195E1A5CDD PUSH1 0xD2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x42 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265676973746572436F6E73756D6572286C696D69746564293A PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x206F6E6C792061646D696E2063616E20726567697374657220636F6E73756D65 PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0x7273 PUSH1 0xF0 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x37 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x746572656420656D697373696F6E732061756469746F72000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2E SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A206D73672E73656E6465 PUSH1 0x40 DUP3 ADD MSTORE PUSH14 0x72206E6F742074696D656C6F636B PUSH1 0x90 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x33 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A676574546F6B656E52657469726564416D6F756E743A20746F6B PUSH1 0x40 DUP3 ADD MSTORE PUSH19 0x195B925908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x6A SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x58 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6265666F7265546F6B656E5472616E73666572286C696D6974 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6564293A206F6E6C7920656D697373696F6E732061756469746F72732063616E PUSH1 0x60 DUP3 ADD MSTORE PUSH32 0x206973737565206175646974656420656D697373696F6E730000000000000000 PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x40 SWAP1 DUP3 ADD DUP2 SWAP1 MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A20697373756572206E6F SWAP1 DUP3 ADD MSTORE PUSH32 0x742061207265676973746572656420656D697373696F6E732061756469746F72 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x27 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A20697373756565206E6F PUSH1 0x40 DUP3 ADD MSTORE PUSH7 0x3A1030B236B4B7 PUSH1 0xC9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2073657474696E6720617070726F76616C20737461747573 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x103337B91039B2B633 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206163636F756E747320616E6420696473206C656E677468 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x40DAD2E6DAC2E8C6D PUSH1 0xBB SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x3A32B932B2102922A1903232B0B632B9 PUSH1 0x81 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2069647320616E6420616D6F756E7473206C656E67746820 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0xDAD2E6DAC2E8C6D PUSH1 0xC3 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x21 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206D696E7420746F20746865207A65726F20616464726573 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x73 PUSH1 0xF8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3D SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A636F6E73756D65724F724465616C65723A206D73672E73656E64 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6572206E6F74206120636F6E73756D6572206F722061206465616C6572000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20746F6B656E54797065496420697320696E76 PUSH1 0x40 DUP3 ADD MSTORE PUSH4 0x185B1A59 PUSH1 0xE2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2F SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2063616E206F6E6C792072656E6F756E6365 PUSH1 0x40 DUP3 ADD MSTORE PUSH15 0x103937B632B9903337B91039B2B633 PUSH1 0x89 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x4B SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6265666F7265546F6B656E5472616E73666572286C696D6974 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6564293A206F6E6C792061646D696E20616E642044414F2063616E207472616E PUSH1 0x60 DUP3 ADD MSTORE PUSH11 0x7366657220746F6B656E73 PUSH1 0xA8 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x20 DUP4 ADD MLOAD PUSH2 0x4596 PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x3657 JUMP JUMPDEST POP PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0x45A9 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x3542 JUMP JUMPDEST POP PUSH1 0x60 DUP4 ADD MLOAD PUSH2 0x45BC PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x3542 JUMP JUMPDEST POP PUSH1 0x80 DUP4 ADD MLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0xE0 DUP4 ADD MLOAD PUSH2 0x100 DUP2 DUP2 DUP6 ADD MSTORE DUP1 DUP6 ADD MLOAD SWAP2 POP POP PUSH2 0x160 PUSH2 0x120 DUP2 DUP2 DUP7 ADD MSTORE PUSH2 0x4608 PUSH2 0x180 DUP7 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP3 POP DUP1 DUP7 ADD MLOAD SWAP1 POP PUSH1 0x1F NOT PUSH2 0x140 DUP2 DUP8 DUP7 SUB ADD DUP2 DUP9 ADD MSTORE PUSH2 0x4629 DUP6 DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP1 DUP9 ADD MLOAD DUP8 DUP3 SUB SWAP1 SWAP3 ADD DUP5 DUP9 ADD MSTORE SWAP4 POP SWAP1 POP PUSH2 0x4645 DUP4 DUP3 PUSH2 0x3589 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x160 DUP14 DUP4 MSTORE DUP13 PUSH1 0x20 DUP5 ADD MSTORE DUP12 PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0xFF DUP12 AND PUSH1 0x60 DUP5 ADD MSTORE DUP10 PUSH1 0x80 DUP5 ADD MSTORE DUP9 PUSH1 0xA0 DUP5 ADD MSTORE DUP8 PUSH1 0xC0 DUP5 ADD MSTORE DUP7 PUSH1 0xE0 DUP5 ADD MSTORE DUP1 PUSH2 0x100 DUP5 ADD MSTORE PUSH2 0x46A5 DUP2 DUP5 ADD DUP8 PUSH2 0x35D4 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH2 0x120 DUP5 ADD MSTORE PUSH2 0x46BA DUP2 DUP7 PUSH2 0x35D4 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH2 0x140 DUP5 ADD MSTORE PUSH2 0x46CF DUP2 DUP6 PUSH2 0x35D4 JUMP JUMPDEST SWAP15 SWAP14 POP POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x4700 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x471E JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST PUSH1 0xE0 SHR SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x44 RETURNDATASIZE LT ISZERO PUSH2 0x474A JUMPI PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x4 DUP2 DUP3 RETURNDATACOPY PUSH4 0x8C379A0 PUSH2 0x475E DUP3 MLOAD PUSH2 0x4734 JUMP JUMPDEST EQ PUSH2 0x4768 JUMPI PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x3 NOT ADD PUSH1 0x4 DUP3 RETURNDATACOPY DUP1 MLOAD RETURNDATASIZE PUSH8 0xFFFFFFFFFFFFFFFF DUP2 PUSH1 0x24 DUP5 ADD GT DUP2 DUP5 GT OR ISZERO PUSH2 0x4798 JUMPI POP POP POP POP PUSH2 0x1100 JUMP JUMPDEST DUP3 DUP5 ADD SWAP3 POP DUP3 MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x47B2 JUMPI POP POP POP POP PUSH2 0x1100 JUMP JUMPDEST POP RETURNDATASIZE DUP4 ADD PUSH1 0x20 DUP3 DUP5 ADD ADD GT ISZERO PUSH2 0x47CA JUMPI POP POP POP PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 REVERT INVALID GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH3 0x75726E KECCAK256 PUSH2 0x6D6F PUSH22 0x6E7420657863656564732062616C616E6365EDE6574D 0xEB 0xA8 CREATE 0x2A 0xDA PUSH25 0x88448A497B08844D62E044ED533343A673BE3FFCDE5F5E1AA5 SELFBALANCE 0xD3 0xDA 0xDE DUP13 PUSH9 0xB013A47AD41C2BCC9B SWAP15 0x4B SMOD PUSH6 0xB0FB616780E1 JUMPI DUP7 0xE7 PUSH11 0xF8890EEDD7900AD88DA619 0x2F 0xD0 RETURNDATASIZE 0xBB PUSH10 0xDBEEE963B1A0ED738ABE 0x49 0xAB CALLER BALANCE 0xAA RETURN GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH10 0x6E73756666696369656E PUSH21 0x2062616C616E636520666F72207472616E73666572 0x2A 0xB9 CALL 0xDA SWAP3 0xE7 0x4A 0xAA ADD 0xEB PUSH22 0xA871557505B11DD8D36832A34BB21BBEE88B08D860E9 PUSH30 0xAD3DBE5042E7384B1572CF966A15E089576A62B5126C5EF1D184AB18B12C LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SDIV GAS PUSH10 0x771B7A92B6338A8700F9 0x4A PUSH27 0xD5684ECCA1AE185C3B59807314C8F1F23C64736F6C634300070000 CALLER ", - "sourceMap": "485:21510:13:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3409:228:5;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1176:148:1;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;20443:373:13:-;;;;;;:::i;:::-;;:::i;:::-;;3162:105:5;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;13550:317:13:-;;;;;;:::i;:::-;;:::i;1103:82::-;;;:::i;1320:96::-;;;:::i;4652:112:0:-;;;;;;:::i;:::-;;:::i;15121:560:13:-;;;;;;:::i;:::-;;:::i;5967:1184:5:-;;;;;;:::i;:::-;;:::i;5014:223:0:-;;;;;;:::i;:::-;;:::i;17593:650:13:-;;;;;;:::i;:::-;;:::i;16315:135::-;;;;;;:::i;:::-;;:::i;6188:205:0:-;;;;;;:::i;:::-;;:::i;18392:330:13:-;;;;;;:::i;:::-;;:::i;3794:530:5:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;19711:345:13:-;;;;;;:::i;:::-;;:::i;5983:114::-;;;:::i;15806:381::-;;;;;;:::i;:::-;;:::i;13999:492::-;;;;;;:::i;:::-;;:::i;1422:104::-;;;:::i;1553:86::-;;;:::i;20938:314::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;4335:136:0:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3320:137::-;;;;;;:::i;:::-;;:::i;21320:149:13:-;;;;;;:::i;:::-;;:::i;14600:308::-;;;;;;:::i;:::-;;:::i;2097:49:0:-;;;:::i;4392:306:5:-;;;;;;:::i;:::-;;:::i;20822:110:13:-;;;;;;:::i;:::-;;:::i;21597:166::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3674:593::-;;;;;;:::i;:::-;;:::i;3625:125:0:-;;;;;;:::i;:::-;;:::i;16901:510:13:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;5471:226:0:-;;;;;;:::i;:::-;;:::i;696:23:13:-;;;:::i;21867:125::-;;;;;;:::i;:::-;;:::i;18848:735::-;;;;;;:::i;:::-;;:::i;4765:166:5:-;;;;;;:::i;:::-;;:::i;8885:777:13:-;;;;;;:::i;:::-;;:::i;4998:897:5:-;;;;;;:::i;:::-;;:::i;813:20:13:-;;;:::i;1224:90::-;;;:::i;8070:581::-;;;;;;:::i;:::-;;:::i;3409:228:5:-;3495:7;-1:-1:-1;;;;;3522:21:5;;3514:77;;;;-1:-1:-1;;;3514:77:5;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;3608:13:5;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;3608:22:5;;;;;;;;;;3409:228;;;;;:::o;1176:148:1:-;-1:-1:-1;;;;;;1284:33:1;;1261:4;1284:33;;;:20;:33;;;;;;;;1176:148;;;;:::o;20443:373:13:-;4311:15;4329:40;-1:-1:-1;;;;;;;;;;;4358:10:13;4329:7;:40::i;:::-;4311:58;;4379:16;4398:42;-1:-1:-1;;;;;;;;;;;4429:10:13;4398:7;:42::i;:::-;4379:61;;4450:16;4469:45;-1:-1:-1;;;;;;;;;;;4503:10:13;4469:7;:45::i;:::-;4450:64;;4524:15;4542:49;-1:-1:-1;;;;;;;;;;;4580:10:13;4542:7;:49::i;:::-;4524:67;;4623:10;:25;;;;4637:11;4623:25;:40;;;;4652:11;4623:40;:54;;;;4667:10;4623:54;4602:162;;;;-1:-1:-1;;;4602:162:13;;;;;;;:::i;:::-;20579:20:::1;20591:7;20579:11;:20::i;:::-;20571:71;;;;-1:-1:-1::0;;;20571:71:13::1;;;;;;;:::i;:::-;20661:10;-1:-1:-1::0;;;;;20661:16:13;::::1;;;20652:85;;;;-1:-1:-1::0;;;20652:85:13::1;;;;;;;:::i;:::-;20747:62;20770:10;20782:2;20786:7;20795:5;20747:62;;;;;;;;;;;;;-1:-1:-1::0;;;20747:62:13::1;;::::0;:22:::1;:62::i;:::-;20443:373:::0;;;;;;;:::o;3162:105:5:-;3256:4;3249:11;;;;;;;;-1:-1:-1;;3249:11:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3224:13;;3249:11;;3256:4;;3249:11;;3256:4;3249:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3162:105;;;:::o;13550:317:13:-;5248:39;2142:4:0;5276:10:13;5248:7;:39::i;:::-;5227:127;;;;-1:-1:-1;;;5227:127:13;;;;;;;:::i;:::-;13668:20:::1;13680:7;13668:11;:20::i;:::-;13660:67;;;;-1:-1:-1::0;;;13660:67:13::1;;;;;;;:::i;:::-;13746:11;::::0;::::1;;13745:12;13737:75;;;;-1:-1:-1::0;;;13737:75:13::1;;;;;;;:::i;:::-;13822:38;13834:2;13838:7;13847:8;13822:38;;;;;;;;;;;::::0;:11:::1;:38::i;:::-;13550:317:::0;;;:::o;1103:82::-;-1:-1:-1;;;;;;;;;;;1103:82:13;:::o;1320:96::-;-1:-1:-1;;;;;;;;;;;1320:96:13;:::o;4652:112:0:-;4709:7;4735:12;;;:6;:12;;;;;:22;;;;4652:112::o;15121:560:13:-;4311:15;4329:40;-1:-1:-1;;;;;;;;;;;4358:10:13;4329:7;:40::i;:::-;4311:58;;4379:16;4398:42;-1:-1:-1;;;;;;;;;;;4429:10:13;4398:7;:42::i;:::-;4379:61;;4450:16;4469:45;-1:-1:-1;;;;;;;;;;;4503:10:13;4469:7;:45::i;:::-;4450:64;;4524:15;4542:49;-1:-1:-1;;;;;;;;;;;4580:10:13;4542:7;:49::i;:::-;4524:67;;4623:10;:25;;;;4637:11;4623:25;:40;;;;4652:11;4623:40;:54;;;;4667:10;4623:54;4602:162;;;;-1:-1:-1;;;4602:162:13;;;;;;;:::i;:::-;15236:20:::1;15248:7;15236:11;:20::i;:::-;15228:69;;;;-1:-1:-1::0;;;15228:69:13::1;;;;;;;:::i;:::-;15327:36;15343:10;15355:7;15327:15;:36::i;:::-;15317:6;:46;;15307:115;;;;-1:-1:-1::0;;;15307:115:13::1;;;;;;;:::i;:::-;15433:40;15445:10;15457:7;15466:6;15433:11;:40::i;:::-;15523:25;::::0;;;:16:::1;:25;::::0;;;;;;;15549:10:::1;15523:37:::0;;;;;;;;:49:::1;::::0;15565:6;15523:41:::1;:49::i;:::-;15483:25;::::0;;;:16:::1;:25;::::0;;;;;;;15509:10:::1;15483:37:::0;;;;;;;;;:89;;;;15587:87;::::1;::::0;::::1;::::0;15500:7;;15658:6;;15587:87:::1;:::i;:::-;;;;;;;;15121:560:::0;;;;;;:::o;5967:1184:5:-;6221:7;:14;6207:3;:10;:28;6199:81;;;;-1:-1:-1;;;6199:81:5;;;;;;;:::i;:::-;-1:-1:-1;;;;;6298:16:5;;6290:66;;;;-1:-1:-1;;;6290:66:5;;;;;;;:::i;:::-;6395:12;:10;:12::i;:::-;-1:-1:-1;;;;;6387:20:5;:4;-1:-1:-1;;;;;6387:20:5;;:60;;;;6411:36;6428:4;6434:12;:10;:12::i;6411:36::-;6366:157;;;;-1:-1:-1;;;6366:157:5;;;;;;;:::i;:::-;6534:16;6553:12;:10;:12::i;:::-;6534:31;;6576:60;6597:8;6607:4;6613:2;6617:3;6622:7;6631:4;6576:20;:60::i;:::-;6652:9;6647:349;6671:3;:10;6667:1;:14;6647:349;;;6702:10;6715:3;6719:1;6715:6;;;;;;;;;;;;;;6702:19;;6735:14;6752:7;6760:1;6752:10;;;;;;;;;;;;;;6735:27;;6799:123;6840:6;6799:123;;;;;;;;;;;;;;;;;:9;:13;6809:2;6799:13;;;;;;;;;;;:19;6813:4;-1:-1:-1;;;;;6799:19:5;-1:-1:-1;;;;;6799:19:5;;;;;;;;;;;;;:23;;:123;;;;;:::i;:::-;6777:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;6777:19:5;;;;;;;;;;:145;;;;6956:17;;;;;;:29;;6978:6;6956:21;:29::i;:::-;6936:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;6936:17:5;;;;;;;;;;:49;;;;-1:-1:-1;6683:3:5;;6647:349;;;;7041:2;-1:-1:-1;;;;;7011:47:5;7035:4;-1:-1:-1;;;;;7011:47:5;7025:8;-1:-1:-1;;;;;7011:47:5;;7045:3;7050:7;7011:47;;;;;;;:::i;:::-;;;;;;;;7069:75;7105:8;7115:4;7121:2;7125:3;7130:7;7139:4;7069:35;:75::i;:::-;5967:1184;;;;;;:::o;5014:223:0:-;5105:12;;;;:6;:12;;;;;:22;;;5097:45;;5129:12;:10;:12::i;5097:45::-;5089:105;;;;-1:-1:-1;;;5089:105:0;;;;;;;:::i;:::-;5205:25;5216:4;5222:7;5205:10;:25::i;:::-;5014:223;;:::o;17593:650:13:-;5248:39;2142:4:0;5276:10:13;5248:7;:39::i;:::-;5227:127;;;;-1:-1:-1;;;5227:127:13;;;;;;;:::i;:::-;17710:31:::1;17729:11;17710:18;:31::i;:::-;17702:92;;;;-1:-1:-1::0;;;17702:92:13::1;;;;;;;:::i;:::-;17808:11;:16;;17823:1;17808:16;17804:264;;;17840:41;-1:-1:-1::0;;;;;;;;;;;17873:7:13::1;17840:9;:41::i;:::-;17804:264;;;17902:11;:16;;17917:1;17902:16;17898:170;;;17934:44;-1:-1:-1::0;;;;;;;;;;;17970:7:13::1;17934:9;:44::i;17898:170::-;18009:48;-1:-1:-1::0;;;;;;;;;;;18049:7:13::1;18009:9;:48::i;:::-;18159:37;-1:-1:-1::0;;;;;;;;;;;18188:7:13::1;18159:9;:37::i;:::-;18211:25;::::0;-1:-1:-1;;;;;18211:25:13;::::1;::::0;::::1;::::0;;;::::1;17593:650:::0;;:::o;16315:135::-;16383:4;16406:37;-1:-1:-1;;;;;;;;;;;16435:7:13;16406;:37::i;6188:205:0:-;6285:12;:10;:12::i;:::-;-1:-1:-1;;;;;6274:23:0;:7;-1:-1:-1;;;;;6274:23:0;;6266:83;;;;-1:-1:-1;;;6266:83:0;;;;;;;:::i;:::-;6360:26;6372:4;6378:7;6360:11;:26::i;18392:330:13:-;4821:16;4840:42;-1:-1:-1;;;;;;;;;;;4871:10:13;4840:7;:42::i;:::-;4821:61;;4892:16;4911:45;-1:-1:-1;;;;;;;;;;;4945:10:13;4911:7;:45::i;:::-;4892:64;;4966:15;4984:49;-1:-1:-1;;;;;;;;;;;5022:10:13;4984:7;:49::i;:::-;4966:67;;5065:11;:26;;;;5080:11;5065:26;:40;;;;5095:10;5065:40;5044:128;;;;-1:-1:-1;;;5044:128:13;;;;;;;:::i;:::-;18469:11:::1;::::0;::::1;;18465:160;;;18504:39;2142:4:0;18532:10:13;18504:7;:39::i;:::-;18496:118;;;;-1:-1:-1::0;;;18496:118:13::1;;;;;;;:::i;:::-;18634:39;-1:-1:-1::0;;;;;;;;;;;18665:7:13::1;18634:9;:39::i;:::-;18688:27;::::0;-1:-1:-1;;;;;18688:27:13;::::1;::::0;::::1;::::0;;;::::1;18392:330:::0;;;;:::o;3794:530:5:-;3967:16;4026:3;:10;4007:8;:15;:29;3999:83;;;;-1:-1:-1;;;3999:83:5;;;;;;;:::i;:::-;4093:30;4140:8;:15;4126:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4126:30:5;;4093:63;;4172:9;4167:120;4191:8;:15;4187:1;:19;4167:120;;;4246:30;4256:8;4265:1;4256:11;;;;;;;;;;;;;;4269:3;4273:1;4269:6;;;;;;;;;;;;;;4246:9;:30::i;:::-;4227:13;4241:1;4227:16;;;;;;;;;;;;;;;;;:49;4208:3;;4167:120;;;-1:-1:-1;4304:13:5;3794:530;-1:-1:-1;;;3794:530:5:o;19711:345:13:-;4821:16;4840:42;-1:-1:-1;;;;;;;;;;;4871:10:13;4840:7;:42::i;:::-;4821:61;;4892:16;4911:45;-1:-1:-1;;;;;;;;;;;4945:10:13;4911:7;:45::i;:::-;4892:64;;4966:15;4984:49;-1:-1:-1;;;;;;;;;;;5022:10:13;4984:7;:49::i;:::-;4966:67;;5065:11;:26;;;;5080:11;5065:26;:40;;;;5095:10;5065:40;5044:128;;;;-1:-1:-1;;;5044:128:13;;;;;;;:::i;:::-;19790:11:::1;::::0;::::1;;19786:164;;;19825:39;2142:4:0;19853:10:13;19825:7;:39::i;:::-;19817:122;;;;-1:-1:-1::0;;;19817:122:13::1;;;;;;;:::i;:::-;19959:46;-1:-1:-1::0;;;;;;;;;;;19997:7:13::1;19959:16;:46::i;:::-;20020:29;::::0;-1:-1:-1;;;;;20020:29:13;::::1;::::0;::::1;::::0;;;::::1;19711:345:::0;;;;:::o;5983:114::-;6036:7;6062:28;:18;:26;:28::i;:::-;6055:35;;5983:114;;:::o;15806:381::-;15872:4;15888:16;15907:39;-1:-1:-1;;;;;;;;;;;15938:7:13;15907;:39::i;:::-;15888:58;;15956:16;15975:42;-1:-1:-1;;;;;;;;;;;16009:7:13;15975;:42::i;:::-;15956:61;;16027:15;16045:46;-1:-1:-1;;;;;;;;;;;16083:7:13;16045;:46::i;:::-;16027:64;;16105:11;:26;;;;16120:11;16105:26;:40;;;;16135:10;16105:40;16101:57;;;16154:4;16147:11;;;;;;;16101:57;-1:-1:-1;16175:5:13;;15806:381;-1:-1:-1;;;;15806:381:13:o;13999:492::-;14085:13;14122:20;14134:7;14122:11;:20::i;:::-;14114:75;;;;-1:-1:-1;;;14114:75:13;;;;;;;:::i;:::-;14199:32;14234:22;;;:13;:22;;;;;14271:17;;;;;;;:22;14267:181;;;-1:-1:-1;;14309:37:13;;;;;;;;;;;;;;;;;;;14267:181;14367:17;;;;;;14388:1;14367:22;14363:85;;;-1:-1:-1;;14405:32:13;;;;;;;;;;;;;;;;;;;14363:85;-1:-1:-1;;14457:26:13;;;;;;;;;;;;-1:-1:-1;;;14457:26:13;;;;13999:492;;;:::o;1422:104::-;-1:-1:-1;;;;;;;;;;;1422:104:13;:::o;1553:86::-;-1:-1:-1;;;;;;;;;;;1553:86:13;:::o;20938:314::-;21051:7;21060;21083:17;21103:33;21119:7;21128;21103:15;:33::i;:::-;21164:44;;-1:-1:-1;;;21164:44:13;;21083:53;;-1:-1:-1;21146:15:13;;21164:4;;:26;;:44;;21191:7;;21200;;21164:44;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21226:9;;;;-1:-1:-1;20938:314:13;;-1:-1:-1;;;;20938:314:13:o;4335:136:0:-;4408:7;4434:12;;;:6;:12;;;;;:30;;4458:5;4434:23;:30::i;:::-;4427:37;4335:136;-1:-1:-1;;;4335:136:0:o;3320:137::-;3389:4;3412:12;;;:6;:12;;;;;:38;;3442:7;3412:29;:38::i;21320:149:13:-;21403:7;21433:22;;;:13;:22;;;;;:29;;;;;;-1:-1:-1;;;;;21433:29:13;;21320:149::o;14600:308::-;14710:7;14741:20;14753:7;14741:11;:20::i;:::-;14733:84;;;;-1:-1:-1;;;14733:84:13;;;;;;;:::i;:::-;-1:-1:-1;14827:14:13;14844:25;;;:16;:25;;;;;;;;-1:-1:-1;;;;;14844:34:13;;;;;;;;;;;;14600:308::o;2097:49:0:-;2142:4;2097:49;:::o;4392:306:5:-;4510:8;-1:-1:-1;;;;;4494:24:5;:12;:10;:12::i;:::-;-1:-1:-1;;;;;4494:24:5;;;4486:78;;;;-1:-1:-1;;;4486:78:5;;;;;;;:::i;:::-;4620:8;4575:18;:32;4594:12;:10;:12::i;:::-;-1:-1:-1;;;;;4575:32:5;;;;;;;;;;;;;;;;;-1:-1:-1;4575:32:5;;;:42;;;;;;;;;;;;:53;;-1:-1:-1;;4575:53:5;;;;;;;;;;;4658:12;:10;:12::i;:::-;-1:-1:-1;;;;;4643:48:5;;4682:8;4643:48;;;;;;:::i;:::-;;;;;;;;4392:306;;:::o;20822:110:13:-;5248:39;2142:4:0;5276:10:13;5248:7;:39::i;:::-;5227:127;;;;-1:-1:-1;;;5227:127:13;;;;;;;:::i;:::-;20905:8:::1;:20:::0;;-1:-1:-1;;;;;;20905:20:13::1;-1:-1:-1::0;;;;;20905:20:13;;;::::1;::::0;;;::::1;::::0;;20822:110::o;21597:166::-;21686:25;;:::i;:::-;21734:22;;;;:13;:22;;;;;;;;;21727:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21727:29:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;21727:29:13;;;;;;;;;;;;;;;;;;;;;;;;;;21734:22;;21727:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;21727:29:13;;;-1:-1:-1;;21727:29:13;;;;;;;;;;;;;;;;-1:-1:-1;;21727:29:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;21727:29:13;;;-1:-1:-1;;21727:29:13;;;;;;;;;;;;;;;;-1:-1:-1;;21727:29:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21597:166;;;:::o;3674:593::-;1512:13:4;;;;;;;;:33;;;1529:16;:14;:16::i;:::-;1512:50;;;-1:-1:-1;1550:12:4;;;;1549:13;1512:50;1504:109;;;;-1:-1:-1;;;1504:109:4;;;;;;;:::i;:::-;1624:19;1647:13;;;;;;1646:14;1670:98;;;;1704:13;:20;;-1:-1:-1;;;;1704:20:4;;;;;1738:19;1720:4;1738:19;;;1670:98;3740:18:13::1;;;;;;;;;;;;::::0;:14:::1;:18::i;:::-;3816:53;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;3816:13:13::1;:53::i;:::-;3904:38;2142:4:0;3935:6:13::0;3904:10:::1;:38::i;:::-;3952:37;-1:-1:-1::0;;;;;;;;;;;3982:6:13::1;3952:10;:37::i;:::-;3999:41;-1:-1:-1::0;;;;;;;;;;;4033:6:13::1;3999:10;:41::i;:::-;4050:44;-1:-1:-1::0;;;;;;;;;;;4087:6:13::1;4050:10;:44::i;:::-;4104:48;-1:-1:-1::0;;;;;;;;;;;4145:6:13::1;4104:10;:48::i;:::-;4162:5;:14:::0;;4209:8:::1;:21:::0;;-1:-1:-1;;;;;;4209:21:13::1;::::0;;-1:-1:-1;;;;;;4162:14:13::1;;-1:-1:-1::0;;;;;4162:14:13;::::1;;;-1:-1:-1::0;;4241:19:13::1;::::0;;1790:66:4;;;;1840:5;1824:21;;-1:-1:-1;;1824:21:4;;;3674:593:13;;:::o;3625:125:0:-;3688:7;3714:12;;;:6;:12;;;;;:29;;:27;:29::i;16901:510:13:-;16959:4;;;;;;17014:36;16959:4;17042:7;17014;:36::i;:::-;16999:51;;17060:16;17079:39;-1:-1:-1;;;;;;;;;;;17110:7:13;17079;:39::i;:::-;17060:58;;17128:16;17147:42;-1:-1:-1;;;;;;;;;;;17181:7:13;17147;:42::i;:::-;17128:61;;17199:15;17217:46;-1:-1:-1;;;;;;;;;;;17255:7:13;17217;:46::i;:::-;17199:64;;17273:15;17291:37;-1:-1:-1;;;;;;;;;;;17320:7:13;17291;:37::i;:::-;17346:7;;17355:11;;-1:-1:-1;17368:11:13;;-1:-1:-1;17368:11:13;-1:-1:-1;17346:7:13;;-1:-1:-1;16901:510:13;-1:-1:-1;;;16901:510:13:o;5471:226:0:-;5563:12;;;;:6;:12;;;;;:22;;;5555:45;;5587:12;:10;:12::i;5555:45::-;5547:106;;;;-1:-1:-1;;;5547:106:0;;;;;;;:::i;696:23:13:-;;;;;;:::o;21867:125::-;5248:39;2142:4:0;5276:10:13;5248:7;:39::i;:::-;5227:127;;;;-1:-1:-1;;;5227:127:13;;;;;;;:::i;:::-;21959:11:::1;:26:::0;;-1:-1:-1;;21959:26:13::1;::::0;::::1;;::::0;;;::::1;::::0;;21867:125::o;18848:735::-;5248:39;2142:4:0;5276:10:13;5248:7;:39::i;:::-;5227:127;;;;-1:-1:-1;;;5227:127:13;;;;;;;:::i;:::-;18967:31:::1;18986:11;18967:18;:31::i;:::-;18959:94;;;;-1:-1:-1::0;;;18959:94:13::1;;;;;;;:::i;:::-;19067:11;:16;;19082:1;19067:16;19063:285;;;19099:48;-1:-1:-1::0;;;;;;;;;;;19139:7:13::1;19099:16;:48::i;:::-;19063:285;;;19168:11;:16;;19183:1;19168:16;19164:184;;;19200:51;-1:-1:-1::0;;;;;;;;;;;19243:7:13::1;19200:16;:51::i;19164:184::-;19282:55;-1:-1:-1::0;;;;;;;;;;;19329:7:13::1;19282:16;:55::i;:::-;19442:27;19461:7;19442:18;:27::i;:::-;19437:97;;19485:38;-1:-1:-1::0;;;;;;;;;;;19515:7:13::1;19485:10;:38::i;:::-;19549:27;::::0;-1:-1:-1;;;;;19549:27:13;::::1;::::0;::::1;::::0;;;::::1;18848:735:::0;;:::o;4765:166:5:-;-1:-1:-1;;;;;4887:27:5;;;4864:4;4887:27;;;:18;:27;;;;;;;;:37;;;;;;;;;;;;;;;4765:166::o;8885:777:13:-;9257:8;;-1:-1:-1;;;;;9257:8:13;9243:10;:22;;9242:67;;-1:-1:-1;9270:39:13;2142:4:0;9298:10:13;9270:7;:39::i;:::-;9221:167;;;;-1:-1:-1;;;9221:167:13;;;;;;;:::i;:::-;9406:249;9426:6;9446;9466:11;9491:8;9513;9535;9557:19;9590:8;9612;9634:11;9406:6;:249::i;:::-;8885:777;;;;;;;;;;:::o;4998:897:5:-;-1:-1:-1;;;;;5213:16:5;;5205:66;;;;-1:-1:-1;;;5205:66:5;;;;;;;:::i;:::-;5310:12;:10;:12::i;:::-;-1:-1:-1;;;;;5302:20:5;:4;-1:-1:-1;;;;;5302:20:5;;:60;;;;5326:36;5343:4;5349:12;:10;:12::i;5326:36::-;5281:148;;;;-1:-1:-1;;;5281:148:5;;;;;;;:::i;:::-;5440:16;5459:12;:10;:12::i;:::-;5440:31;;5482:96;5503:8;5513:4;5519:2;5523:21;5541:2;5523:17;:21::i;:::-;5546:25;5564:6;5546:17;:25::i;:::-;5573:4;5482:20;:96::i;:::-;5611:77;5635:6;5611:77;;;;;;;;;;;;;;;;;:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;5611:19:5;;;;;;;;;;;:77;:23;:77::i;:::-;5589:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;5589:19:5;;;;;;;;;;:99;;;;5718:17;;;;;;:29;;5740:6;5718:21;:29::i;:::-;5698:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;5698:17:5;;;;;;;;;;;;;;:49;;;;5763:46;;5698:17;;5763:46;;;;;;;;;;;;5708:2;;5802:6;;5763:46;:::i;:::-;;;;;;;;5820:68;5851:8;5861:4;5867:2;5871;5875:6;5883:4;5820:30;:68::i;813:20:13:-;;;;;;-1:-1:-1;;;;;813:20:13;;:::o;1224:90::-;-1:-1:-1;;;;;;;;;;;1224:90:13;:::o;8070:581::-;4821:16;4840:42;-1:-1:-1;;;;;;;;;;;4871:10:13;4840:7;:42::i;:::-;4821:61;;4892:16;4911:45;-1:-1:-1;;;;;;;;;;;4945:10:13;4911:7;:45::i;:::-;4892:64;;4966:15;4984:49;-1:-1:-1;;;;;;;;;;;5022:10:13;4984:7;:49::i;:::-;4966:67;;5065:11;:26;;;;5080:11;5065:26;:40;;;;5095:10;5065:40;5044:128;;;;-1:-1:-1;;;5044:128:13;;;;;;;:::i;:::-;8391:253:::1;8411:6;8431:10;8455:11;8480:8;8502;8524;8546:19;8579:8;8601;8623:11;8391:6;:253::i;:::-;8070:581:::0;;;;;;;;;;;;:::o;5441:184::-;5501:4;5553:7;5521:28;:18;:26;:28::i;:::-;:39;5517:56;;-1:-1:-1;5569:4:13;5562:11;;5517:56;-1:-1:-1;5590:5:13;5441:184;;;:::o;8448:572:5:-;-1:-1:-1;;;;;8562:21:5;;8554:67;;;;-1:-1:-1;;;8554:67:5;;;;;;;:::i;:::-;8632:16;8651:12;:10;:12::i;:::-;8632:31;;8674:107;8695:8;8713:1;8717:7;8726:21;8744:2;8726:17;:21::i;8674:107::-;8817:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;8817:22:5;;;;;;;;;;:34;;8844:6;8817:26;:34::i;:::-;8792:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;8792:22:5;;;;;;;;;;;;;:59;;;;8866:57;;;;;;;;;8802:2;;8916:6;;8866:57;:::i;:::-;;;;;;;;8934:79;8965:8;8983:1;8987:7;8996:2;9000:6;9008:4;8934:30;:79::i;:::-;8448:572;;;;;:::o;10314:538::-;-1:-1:-1;;;;;10409:21:5;;10401:69;;;;-1:-1:-1;;;10401:69:5;;;;;;;:::i;:::-;10481:16;10500:12;:10;:12::i;:::-;10481:31;;10523:105;10544:8;10554:7;10571:1;10575:21;10593:2;10575:17;:21::i;:::-;10598:25;10616:6;10598:17;:25::i;:::-;10523:105;;;;;;;;;;;;:20;:105::i;:::-;10664:108;10704:6;10664:108;;;;;;;;;;;;;;;;;:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;10664:22:5;;;;;;;;;;;:108;:26;:108::i;:::-;10639:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;10639:22:5;;;;;;;;;;;;;:133;;;;10788:57;10639:13;;:22;10788:57;;;;;;;;10649:2;;10838:6;;10788:57;:::i;:::-;;;;;;;;10314:538;;;;:::o;2701:175:3:-;2759:7;2790:5;;;2813:6;;;;2805:46;;;;-1:-1:-1;;;2805:46:3;;;;;;;:::i;828:104:10:-;915:10;828:104;:::o;6201:1516:13:-;6460:66;6487:8;6497:4;6503:2;6507:3;6512:7;6521:4;6460:26;:66::i;:::-;6542:6;6537:1174;6558:3;:10;6554:1;:14;6537:1174;;;6590:32;6625:13;:21;6639:3;6643:1;6639:6;;;;;;;;;;;;;;6625:21;;;;;;;;;;;6590:56;;6724:11;;;;;;;;;;;6720:981;;;-1:-1:-1;;;;;6815:16:13;;6811:71;;6855:8;;;6811:71;7138:17;;;;;;7159:1;7138:22;7134:553;;7229:8;;-1:-1:-1;;;;;7217:20:13;;;7229:8;;7217:20;;:61;;-1:-1:-1;7241:37:13;2142:4:0;7269:8:13;7241:7;:37::i;:::-;7184:219;;;;-1:-1:-1;;;7184:219:13;;;;;;;:::i;:::-;7134:553;;;7483:47;-1:-1:-1;;;;;;;;;;;7521:8:13;7483:7;:47::i;:::-;7450:218;;;;-1:-1:-1;;;7450:218:13;;;;;;;:::i;:::-;6537:1174;;6570:3;;6537:1174;;5443:163:3;5529:7;5564:12;5556:6;;;;5548:29;;;;-1:-1:-1;;;5548:29:3;;;;;;;;:::i;:::-;-1:-1:-1;;;5594:5:3;;;5443:163::o;13695:800:5:-;13939:15;:2;-1:-1:-1;;;;;13939:13:5;;:15::i;:::-;13935:554;;;13974:90;;-1:-1:-1;;;13974:90:5;;-1:-1:-1;;;;;13974:54:5;;;;;:90;;14029:8;;14039:4;;14045:3;;14050:7;;14059:4;;13974:90;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13974:90:5;;;;;;;;-1:-1:-1;;13974:90:5;;;;;;;;;;;;:::i;:::-;;;13970:509;;;;:::i;:::-;;;;;;;;14355:6;14348:14;;-1:-1:-1;;;14348:14:5;;;;;;;;:::i;13970:509::-;14402:62;;-1:-1:-1;;;14402:62:5;;;;;;;:::i;13970:509::-;-1:-1:-1;;;;;;14113:75:5;;-1:-1:-1;;;14113:75:5;14109:172;;14212:50;;-1:-1:-1;;;14212:50:5;;;;;;;:::i;7395:184:0:-;7468:12;;;;:6;:12;;;;;:33;;7493:7;7468:24;:33::i;:::-;7464:109;;;7549:12;:10;:12::i;:::-;-1:-1:-1;;;;;7522:40:0;7540:7;-1:-1:-1;;;;;7522:40:0;7534:4;7522:40;;;;;;;;;;7395:184;;:::o;5700:217:13:-;5769:4;5804:1;5790:11;:15;;;5789:39;;;;;5826:1;5811:11;:16;;;;5789:39;5785:81;;;-1:-1:-1;5851:4:13;5844:11;;7585:188:0;7659:12;;;;:6;:12;;;;;:36;;7687:7;7659:27;:36::i;:::-;7655:112;;;7743:12;:10;:12::i;:::-;-1:-1:-1;;;;;7716:40:0;7734:7;-1:-1:-1;;;;;7716:40:0;7728:4;7716:40;;;;;;;;;;7585:188;;:::o;1139:112:11:-;1230:14;;1139:112::o;7688:156:12:-;7762:7;7812:22;7816:3;7828:5;7812:3;:22::i;6995:165::-;7075:4;7098:55;7108:3;-1:-1:-1;;;;;7128:23:12;;7098:9;:55::i;1952:123:4:-;2000:4;2024:44;2062:4;2024:29;:44::i;:::-;2023:45;2016:52;;1952:123;:::o;2185:183:5:-;1512:13:4;;;;;;;;:33;;;1529:16;:14;:16::i;:::-;1512:50;;;-1:-1:-1;1550:12:4;;;;1549:13;1512:50;1504:109;;;;-1:-1:-1;;;1504:109:4;;;;;;;:::i;:::-;1624:19;1647:13;;;;;;1646:14;1670:98;;;;1704:13;:20;;-1:-1:-1;;;;1704:20:4;;;;;1738:19;1720:4;1738:19;;;1670:98;2260:26:5::1;:24;:26::i;:::-;2296:25;:23;:25::i;:::-;2331:30;2356:4;2331:24;:30::i;:::-;1794:14:4::0;1790:66;;;1840:5;1824:21;;-1:-1:-1;;1824:21:4;;;2185:183:5;;:::o;7193:196:0:-;7304:12;;;;:6;:12;;;;;;:22;;;7281:57;;7328:9;;7311:4;;7281:57;;7304:12;7281:57;7348:12;;;;:6;:12;;;;;;:22;;:34;7193:196::o;7241:115:12:-;7304:7;7330:19;7338:3;7330:7;:19::i;9668:3697:13:-;10030:32;10049:12;10030:18;:32::i;:::-;10009:115;;;;-1:-1:-1;;;10009:115:13;;;;;;;:::i;:::-;10139:11;;;;10135:1598;;;10170:12;:17;;10186:1;10170:17;:38;;;;10191:12;:17;;10207:1;10191:17;10170:38;10166:853;;;10272:8;;-1:-1:-1;;;;;10272:8:13;10258:10;:22;10229:139;;;;-1:-1:-1;;;10229:139:13;;;;;;;:::i;:::-;10415:36;2142:4:0;10443:7:13;10415;:36::i;:::-;10386:146;;;;-1:-1:-1;;;10386:146:13;;;;;;;:::i;:::-;10579:39;-1:-1:-1;;;;;;;;;;;10610:7:13;10579;:39::i;:::-;:85;;;;10622:42;-1:-1:-1;;;;;;;;;;;10656:7:13;10622;:42::i;:::-;10550:211;;;;-1:-1:-1;;;10550:211:13;;;;;;;:::i;:::-;10166:853;;;10786:12;:17;;10802:1;10786:17;10782:237;;;10852:46;-1:-1:-1;;;;;;;;;;;10890:7:13;10852;:46::i;:::-;10823:181;;;;-1:-1:-1;;;10823:181:13;;;;;;;:::i;:::-;10135:1598;;;11053:12;:17;;11069:1;11053:17;11049:674;;;11119:39;-1:-1:-1;;;;;;;;;;;11150:7:13;11119;:39::i;:::-;11090:158;;;;-1:-1:-1;;;11090:158:13;;;;;;;:::i;11049:674::-;11273:12;:17;;11289:1;11273:17;11269:454;;;11339:42;-1:-1:-1;;;;;;;;;;;11373:7:13;11339;:42::i;:::-;11310:164;;;;-1:-1:-1;;;11310:164:13;;;;;;;:::i;11269:454::-;11499:12;:17;;11515:1;11499:17;11495:228;;;11565:46;-1:-1:-1;;;;;;;;;;;11603:7:13;11565;:46::i;:::-;11536:172;;;;-1:-1:-1;;;11536:172:13;;;;;;;:::i;:::-;11781:30;:18;:28;:30::i;:::-;11854:36;11893:13;:43;11907:28;:18;:26;:28::i;:::-;11893:43;;;;;;;;;;;11854:82;;11967:28;:18;:26;:28::i;:::-;11947:9;:17;;:48;;;;12029:12;12005:9;:21;;;:36;;;;;;;;;;;;;;;;;;12070:7;12051:9;:16;;;:26;;;;;-1:-1:-1;;;;;12051:26:13;;;;;-1:-1:-1;;;;;12051:26:13;;;;;;12106:7;12087:9;:16;;;:26;;;;;-1:-1:-1;;;;;12087:26:13;;;;;-1:-1:-1;;;;;12087:26:13;;;;;;12144:9;12123;:18;;:30;;;;12184:9;12163;:18;;:30;;;;12235:20;12203:9;:29;;:52;;;;12289:15;12265:9;:21;;:39;;;;12335:9;12314;:18;;:30;;;;;;;;;;;;:::i;:::-;-1:-1:-1;12354:30:13;;;;:18;;;;:30;;;;;:::i;:::-;-1:-1:-1;12394:36:13;;;;:21;;;;:36;;;;;:::i;:::-;;12441:65;12453:7;12462:28;:18;:26;:28::i;:::-;12492:9;12441:65;;;;;;;;;;;;:11;:65::i;:::-;12565:12;:17;;12581:1;12565:17;12561:245;;;12610:16;;;;12628:17;;12598:59;;-1:-1:-1;;;;;12610:16:13;;12647:9;12598:11;:59::i;:::-;12744:17;;12727:35;;;;:16;:35;;;;;;;;12763:16;;;;-1:-1:-1;;;;;12763:16:13;12727:53;;;;;;;;:68;;12785:9;12727:57;:68::i;:::-;12688:17;;12671:35;;;;:16;:35;;;;;;;;12707:16;;;;-1:-1:-1;;;;;12707:16:13;12671:53;;;;;;;:124;12561:245;13091:9;:16;;;;;;;;;;-1:-1:-1;;;;;13091:16:13;-1:-1:-1;;;;;12879:479:13;13061:9;:16;;;;;;;;;;-1:-1:-1;;;;;13061:16:13;-1:-1:-1;;;;;12879:479:13;;12905:9;12928:16;:35;12945:9;:17;;;12928:35;;;;;;;;;;;:53;12964:9;:16;;;;;;;;;;-1:-1:-1;;;;;12964:16:13;-1:-1:-1;;;;;12928:53:13;-1:-1:-1;;;;;12928:53:13;;;;;;;;;;;;;12995:9;:17;;;13026:9;:21;;;;;;;;;;;;13121:9;:18;;;13153:9;:18;;;13185:9;:29;;;13228:9;:21;;;13263:9;:18;;13295:9;:18;;13327:9;:21;;12879:479;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;9668:3697;;;;;;;;;;;:::o;14501:193:5:-;14620:16;;;14634:1;14620:16;;;;;;;;;14567;;;;14620;;;;;;;;;;;;-1:-1:-1;14620:16:5;14595:41;;14657:7;14646:5;14652:1;14646:8;;;;;;;;;;;;;;;;;:18;14682:5;14501:193;-1:-1:-1;;14501:193:5:o;12926:763::-;13145:15;:2;-1:-1:-1;;;;;13145:13:5;;:15::i;:::-;13141:542;;;13180:83;;-1:-1:-1;;;13180:83:5;;-1:-1:-1;;;;;13180:49:5;;;;;:83;;13230:8;;13240:4;;13246:2;;13250:6;;13258:4;;13180:83;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13180:83:5;;;;;;;;-1:-1:-1;;13180:83:5;;;;;;;;;;;;:::i;:::-;;;13176:497;;;;:::i;:::-;-1:-1:-1;;;;;;13312:70:5;;-1:-1:-1;;;13312:70:5;13308:167;;13406:50;;-1:-1:-1;;;13406:50:5;;;;;;;:::i;737:413:9:-;1097:20;1135:8;;;737:413::o;6440:150:12:-;6510:4;6533:50;6538:3;-1:-1:-1;;;;;6558:23:12;;6533:4;:50::i;6758:156::-;6831:4;6854:53;6862:3;-1:-1:-1;;;;;6882:23:12;;6854:7;:53::i;4463:201::-;4557:18;;4530:7;;4557:26;-1:-1:-1;4549:73:12;;;;-1:-1:-1;;;4549:73:12;;;;;;;:::i;:::-;4639:3;:11;;4651:5;4639:18;;;;;;;;;;;;;;;;4632:25;;4463:201;;;;:::o;3816:127::-;3889:4;3912:19;;;:12;;;;;:19;;;;;;:24;;;3816:127::o;759:64:10:-;1512:13:4;;;;;;;;:33;;;1529:16;:14;:16::i;:::-;1512:50;;;-1:-1:-1;1550:12:4;;;;1549:13;1512:50;1504:109;;;;-1:-1:-1;;;1504:109:4;;;;;;;:::i;:::-;1624:19;1647:13;;;;;;1646:14;1670:98;;;;1704:13;:20;;-1:-1:-1;;;;1704:20:4;;;;;1738:19;1720:4;1738:19;;;1670:98;1794:14;1790:66;;;1840:5;1824:21;;-1:-1:-1;;1824:21:4;;;1790:66;759:64:10;:::o;777:249:1:-;1512:13:4;;;;;;;;:33;;;1529:16;:14;:16::i;:::-;1512:50;;;-1:-1:-1;1550:12:4;;;;1549:13;1512:50;1504:109;;;;-1:-1:-1;;;1504:109:4;;;;;;;:::i;:::-;1624:19;1647:13;;;;;;1646:14;1670:98;;;;1704:13;:20;;-1:-1:-1;;;;1704:20:4;;;;;1738:19;1720:4;1738:19;;;1670:98;979:40:1::1;-1:-1:-1::0;;;979:18:1::1;:40::i;2374:389:5:-:0;1512:13:4;;;;;;;;:33;;;1529:16;:14;:16::i;:::-;1512:50;;;-1:-1:-1;1550:12:4;;;;1549:13;1512:50;1504:109;;;;-1:-1:-1;;;1504:109:4;;;;;;;:::i;:::-;1624:19;1647:13;;;;;;1646:14;1670:98;;;;1704:13;:20;;-1:-1:-1;;;;1704:20:4;;;;;1738:19;1720:4;1738:19;;;1670:98;2459:13:5::1;2467:4;2459:7;:13::i;:::-;2561:41;-1:-1:-1::0;;;2561:18:5::1;:41::i;:::-;2702:54;-1:-1:-1::0;;;2702:18:5::1;:54::i;1257:178:11:-:0;1409:19;;1427:1;1409:19;;;1257:178::o;1651:404:12:-;1714:4;1735:21;1745:3;1750:5;1735:9;:21::i;:::-;1730:319;;-1:-1:-1;1772:23:12;;;;;;;;:11;:23;;;;;;;;;;;;;1952:18;;1930:19;;;:12;;;:19;;;;;;:40;;;;1984:11;;1730:319;-1:-1:-1;2033:5:12;2026:12;;2223:1512;2289:4;2426:19;;;:12;;;:19;;;;;;2460:15;;2456:1273;;2889:18;;-1:-1:-1;;2841:14:12;;;;2889:22;;;;2817:21;;2889:3;;:22;;3171;;;;;;;;;;;;;;3151:42;;3314:9;3285:3;:11;;3297:13;3285:26;;;;;;;;;;;;;;;;;;;:38;;;;3389:23;;;3431:1;3389:12;;;:23;;;;;;3415:17;;;3389:43;;3538:17;;3389:3;;3538:17;;;;;;;;;;;;;;;;;;;;;;3630:3;:12;;:19;3643:5;3630:19;;;;;;;;;;;3623:26;;;3671:4;3664:11;;;;;;;;2456:1273;3713:5;3706:12;;;;;1718:198:1;-1:-1:-1;;;;;;1801:25:1;;;;;1793:66;;;;-1:-1:-1;;;1793:66:1;;;;;;;:::i;:::-;-1:-1:-1;;;;;;1869:33:1;;;;;:20;:33;;;;;:40;;-1:-1:-1;;1869:40:1;1905:4;1869:40;;;1718:198::o;7974:86:5:-;8040:13;;;;:4;;:13;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;5:130;72:20;;-1:-1;;;;;67139:54;;68827:35;;68817:2;;68876:1;;68866:12;893:707;;1010:3;1003:4;995:6;991:17;987:27;977:2;;-1:-1;;1018:12;977:2;1065:6;1052:20;1087:80;1102:64;1159:6;1102:64;:::i;:::-;1087:80;:::i;:::-;1195:21;;;1078:89;-1:-1;1239:4;1252:14;;;;1227:17;;;1341;;;1332:27;;;;1329:36;-1:-1;1326:2;;;1378:1;;1368:12;1326:2;1403:1;1388:206;1413:6;1410:1;1407:13;1388:206;;;3117:20;;1481:50;;1545:14;;;;1573;;;;1435:1;1428:9;1388:206;;;1392:14;;;;;970:630;;;;:::o;2151:440::-;;2252:3;2245:4;2237:6;2233:17;2229:27;2219:2;;-1:-1;;2260:12;2219:2;2307:6;2294:20;64612:18;64604:6;64601:30;64598:2;;;-1:-1;;64634:12;64598:2;2329:64;64707:9;64688:17;;-1:-1;;64684:33;64775:4;64765:15;2329:64;:::i;:::-;2320:73;;2413:6;2406:5;2399:21;2517:3;64775:4;2508:6;2441;2499:16;;2496:25;2493:2;;;2534:1;;2524:12;2493:2;67454:6;64775:4;2441:6;2437:17;64775:4;2475:5;2471:16;67431:30;67510:1;67492:16;;;64775:4;67492:16;67485:27;2475:5;2212:379;-1:-1;;2212:379::o;3328:126::-;3393:20;;67355:4;67344:16;;69437:33;;69427:2;;69484:1;;69474:12;3461:241;;3565:2;3553:9;3544:7;3540:23;3536:32;3533:2;;;-1:-1;;3571:12;3533:2;3633:53;3678:7;3654:22;3633:53;:::i;3709:366::-;;;3830:2;3818:9;3809:7;3805:23;3801:32;3798:2;;;-1:-1;;3836:12;3798:2;3898:53;3943:7;3919:22;3898:53;:::i;:::-;3888:63;;4006:53;4051:7;3988:2;4031:9;4027:22;4006:53;:::i;:::-;3996:63;;3792:283;;;;;:::o;4082:1119::-;;;;;;4313:3;4301:9;4292:7;4288:23;4284:33;4281:2;;;-1:-1;;4320:12;4281:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;4372:63;-1:-1;4472:2;4511:22;;72:20;97:33;72:20;97:33;:::i;:::-;4480:63;-1:-1;4608:2;4593:18;;4580:32;4632:18;4621:30;;;4618:2;;;-1:-1;;4654:12;4618:2;4684:78;4754:7;4745:6;4734:9;4730:22;4684:78;:::i;:::-;4674:88;;4827:2;4816:9;4812:18;4799:32;4785:46;;4632:18;4843:6;4840:30;4837:2;;;-1:-1;;4873:12;4837:2;4903:78;4973:7;4964:6;4953:9;4949:22;4903:78;:::i;:::-;4893:88;;5046:3;5035:9;5031:19;5018:33;5004:47;;4632:18;5063:6;5060:30;5057:2;;;-1:-1;;5093:12;5057:2;;5123:62;5177:7;5168:6;5157:9;5153:22;5123:62;:::i;:::-;5113:72;;;4275:926;;;;;;;;:::o;5208:847::-;;;;;;5389:3;5377:9;5368:7;5364:23;5360:33;5357:2;;;-1:-1;;5396:12;5357:2;5458:53;5503:7;5479:22;5458:53;:::i;:::-;5448:63;;5566:53;5611:7;5548:2;5591:9;5587:22;5566:53;:::i;:::-;5556:63;;5656:2;5699:9;5695:22;3117:20;5664:63;;5764:2;5807:9;5803:22;3117:20;5772:63;;5900:3;5889:9;5885:19;5872:33;5925:18;5917:6;5914:30;5911:2;;;-1:-1;;5947:12;5911:2;5977:62;6031:7;6022:6;6011:9;6007:22;5977:62;:::i;6062:1687::-;;;;;;;;;;;6347:3;6335:9;6326:7;6322:23;6318:33;6315:2;;;-1:-1;;6354:12;6315:2;6416:53;6461:7;6437:22;6416:53;:::i;:::-;6406:63;;6524:53;6569:7;6506:2;6549:9;6545:22;6524:53;:::i;:::-;6514:63;;6632:51;6675:7;6614:2;6655:9;6651:22;6632:51;:::i;:::-;6622:61;;6720:2;6763:9;6759:22;3117:20;6728:63;;6828:3;6872:9;6868:22;3117:20;6837:63;;6937:3;6981:9;6977:22;3117:20;6946:63;;7046:3;7090:9;7086:22;3117:20;7055:63;;7183:3;7172:9;7168:19;7155:33;7208:18;;7200:6;7197:30;7194:2;;;-1:-1;;7230:12;7194:2;7260:63;7315:7;7306:6;7295:9;7291:22;7260:63;:::i;:::-;7250:73;;7388:3;7377:9;7373:19;7360:33;7346:47;;7208:18;7405:6;7402:30;7399:2;;;-1:-1;;7435:12;7399:2;7465:63;7520:7;7511:6;7500:9;7496:22;7465:63;:::i;:::-;7455:73;;7593:3;7582:9;7578:19;7565:33;7551:47;;7208:18;7610:6;7607:30;7604:2;;;-1:-1;;7640:12;7604:2;;7670:63;7725:7;7716:6;7705:9;7701:22;7670:63;:::i;:::-;7660:73;;;6309:1440;;;;;;;;;;;;;:::o;7756:360::-;;;7874:2;7862:9;7853:7;7849:23;7845:32;7842:2;;;-1:-1;;7880:12;7842:2;7942:53;7987:7;7963:22;7942:53;:::i;:::-;7932:63;;8032:2;8072:9;8068:22;1672:20;68973:5;66821:13;66814:21;68951:5;68948:32;68938:2;;-1:-1;;68984:12;68938:2;8040:60;;;;7836:280;;;;;:::o;8123:366::-;;;8244:2;8232:9;8223:7;8219:23;8215:32;8212:2;;;-1:-1;;8250:12;8212:2;8312:53;8357:7;8333:22;8312:53;:::i;:::-;8302:63;8402:2;8441:22;;;;3117:20;;-1:-1;;;8206:283::o;8496:491::-;;;;8634:2;8622:9;8613:7;8609:23;8605:32;8602:2;;;-1:-1;;8640:12;8602:2;8702:53;8747:7;8723:22;8702:53;:::i;:::-;8692:63;8792:2;8831:22;;3117:20;;-1:-1;8900:2;8939:22;;;3117:20;;8596:391;-1:-1;;;8596:391::o;8994:362::-;;;9113:2;9101:9;9092:7;9088:23;9084:32;9081:2;;;-1:-1;;9119:12;9081:2;9181:53;9226:7;9202:22;9181:53;:::i;:::-;9171:63;;9289:51;9332:7;9271:2;9312:9;9308:22;9289:51;:::i;9363:1561::-;;;;;;;;;;9631:3;9619:9;9610:7;9606:23;9602:33;9599:2;;;-1:-1;;9638:12;9599:2;9700:53;9745:7;9721:22;9700:53;:::i;:::-;9690:63;;9808:51;9851:7;9790:2;9831:9;9827:22;9808:51;:::i;:::-;9798:61;;9896:2;9939:9;9935:22;3117:20;9904:63;;10004:2;10047:9;10043:22;3117:20;10012:63;;10112:3;10156:9;10152:22;3117:20;10121:63;;10221:3;10265:9;10261:22;3117:20;10230:63;;10358:3;10347:9;10343:19;10330:33;10383:18;;10375:6;10372:30;10369:2;;;-1:-1;;10405:12;10369:2;10435:63;10490:7;10481:6;10470:9;10466:22;10435:63;:::i;:::-;10425:73;;10563:3;10552:9;10548:19;10535:33;10521:47;;10383:18;10580:6;10577:30;10574:2;;;-1:-1;;10610:12;10574:2;10640:63;10695:7;10686:6;10675:9;10671:22;10640:63;:::i;:::-;10630:73;;10768:3;10757:9;10753:19;10740:33;10726:47;;10383:18;10785:6;10782:30;10779:2;;;-1:-1;;10815:12;10779:2;;10845:63;10900:7;10891:6;10880:9;10876:22;10845:63;:::i;:::-;10835:73;;;9593:1331;;;;;;;;;;;:::o;10931:638::-;;;11102:2;11090:9;11081:7;11077:23;11073:32;11070:2;;;-1:-1;;11108:12;11070:2;11166:17;11153:31;11204:18;;11196:6;11193:30;11190:2;;;-1:-1;;11226:12;11190:2;11317:6;11306:9;11302:22;;;277:3;270:4;262:6;258:17;254:27;244:2;;-1:-1;;285:12;244:2;332:6;319:20;354:80;369:64;426:6;369:64;:::i;354:80::-;440:16;476:6;469:5;462:21;506:4;;523:3;519:14;512:21;;506:4;498:6;494:17;628:3;506:4;;612:6;608:17;498:6;599:27;;596:36;593:2;;;-1:-1;;635:12;593:2;-1:-1;661:10;;655:206;680:6;677:1;674:13;655:206;;;760:37;793:3;781:10;760:37;:::i;:::-;748:50;;702:1;695:9;;;;;812:14;;;;840;;655:206;;;-1:-1;11246:88;;-1:-1;11384:18;;11371:32;;-1:-1;;;11412:30;;;11409:2;;;-1:-1;;11445:12;11409:2;;11475:78;11545:7;11536:6;11525:9;11521:22;11475:78;:::i;:::-;11465:88;;;11064:505;;;;;:::o;11576:235::-;;11677:2;11665:9;11656:7;11652:23;11648:32;11645:2;;;-1:-1;;11683:12;11645:2;1685:6;1672:20;68973:5;66821:13;66814:21;68951:5;68948:32;68938:2;;-1:-1;;68984:12;11818:241;;11922:2;11910:9;11901:7;11897:23;11893:32;11890:2;;;-1:-1;;11928:12;11890:2;-1:-1;1806:20;;11884:175;-1:-1;11884:175::o;12066:366::-;;;12187:2;12175:9;12166:7;12162:23;12158:32;12155:2;;;-1:-1;;12193:12;12155:2;1819:6;1806:20;12245:63;;12345:2;12388:9;12384:22;72:20;97:33;124:5;97:33;:::i;12439:366::-;;;12560:2;12548:9;12539:7;12535:23;12531:32;12528:2;;;-1:-1;;12566:12;12528:2;-1:-1;;1806:20;;;12718:2;12757:22;;;3117:20;;-1:-1;12522:283::o;12812:239::-;;12915:2;12903:9;12894:7;12890:23;12886:32;12883:2;;;-1:-1;;12921:12;12883:2;1955:6;1942:20;1967:32;1993:5;1967:32;:::i;13058:261::-;;13172:2;13160:9;13151:7;13147:23;13143:32;13140:2;;;-1:-1;;13178:12;13140:2;2094:6;2088:13;2106:32;2132:5;2106:32;:::i;13574:263::-;;13689:2;13677:9;13668:7;13664:23;13660:32;13657:2;;;-1:-1;;13695:12;13657:2;-1:-1;3265:13;;13651:186;-1:-1;13651:186::o;14399:103::-;-1:-1;;;;;67139:54;14460:37;;14454:48::o;14660:690::-;;14853:5;65552:12;66096:6;66091:3;66084:19;66133:4;;66128:3;66124:14;14865:93;;66133:4;15029:5;65241:14;-1:-1;15068:260;15093:6;15090:1;15087:13;15068:260;;;15154:13;;15540:37;;14371:14;;;;65939;;;;15115:1;15108:9;15068:260;;;-1:-1;15334:10;;14784:566;-1:-1;;;;;14784:566::o;15589:343::-;;15731:5;65552:12;66096:6;66091:3;66084:19;-1:-1;67599:101;67613:6;67610:1;67607:13;67599:101;;;66133:4;67680:11;;;;;67674:18;67661:11;;;;;67654:39;67628:10;67599:101;;;67715:6;67712:1;67709:13;67706:2;;;-1:-1;66133:4;67771:6;66128:3;67762:16;;67755:27;67706:2;-1:-1;64707:9;67871:14;-1:-1;;67867:28;15888:39;;;;66133:4;15888:39;;15679:253;-1:-1;;15679:253::o;16652:823::-;;16771:5;16765:12;16805:1;;16794:9;16790:17;16818:1;16813:248;;;;17072:1;17067:402;;;;16783:686;;16813:248;16887:1;16872:17;;16891:4;16868:28;66084:19;;-1:-1;;17000:25;;66133:4;66124:14;;16988:38;17040:14;;;;-1:-1;16813:248;;17067:402;17136:1;17125:9;17121:17;66096:6;66091:3;66084:19;17245:38;17277:5;17245:38;:::i;:::-;-1:-1;17307:130;17321:6;17318:1;17315:13;17307:130;;;17386:7;17380:14;66133:4;17376:1;66128:3;17367:11;;17360:35;16805:1;17418:7;17414:15;17403:26;;66133:4;17340:1;17336:12;17331:17;;17307:130;;;17451:11;;66133:4;17451:11;;-1:-1;;;16783:686;;;;16741:734;;;;:::o;37403:97::-;67355:4;67344:16;37460:35;;37454:46::o;37621:222::-;-1:-1;;;;;67139:54;;;;14460:37;;37748:2;37733:18;;37719:124::o;37850:1048::-;-1:-1;;;;;67139:54;;;14460:37;;67139:54;;38372:2;38357:18;;14460:37;67150:42;38409:2;38394:18;;38387:48;;;37850:1048;;38449:108;;38192:19;;38543:6;38449:108;:::i;:::-;38605:9;38599:4;38595:20;38590:2;38579:9;38575:18;38568:48;38630:108;38733:4;38724:6;38630:108;:::i;:::-;38622:116;;38787:9;38781:4;38777:20;38771:3;38760:9;38756:19;38749:49;38812:76;38883:4;38874:6;38812:76;:::i;:::-;38804:84;38178:720;-1:-1;;;;;;;;38178:720::o;38905:752::-;-1:-1;;;;;67139:54;;;14460:37;;67139:54;;39327:2;39312:18;;14460:37;39410:2;39395:18;;15540:37;;;39493:2;39478:18;;15540:37;;;67150:42;39530:3;39515:19;;39508:49;;;38905:752;;39571:76;;39147:19;;39633:6;39571:76;:::i;:::-;39563:84;39133:524;-1:-1;;;;;;;39133:524::o;39664:333::-;-1:-1;;;;;67139:54;;;;14460:37;;39983:2;39968:18;;15540:37;39819:2;39804:18;;39790:207::o;40004:370::-;;40181:2;40202:17;40195:47;40256:108;40181:2;40170:9;40166:18;40350:6;40256:108;:::i;40381:629::-;;40636:2;40657:17;40650:47;40711:108;40636:2;40625:9;40621:18;40805:6;40711:108;:::i;:::-;40867:9;40861:4;40857:20;40852:2;40841:9;40837:18;40830:48;40892:108;40995:4;40986:6;40892:108;:::i;:::-;40884:116;40607:403;-1:-1;;;;;40607:403::o;41017:210::-;66821:13;;66814:21;15423:34;;41138:2;41123:18;;41109:118::o;41234:608::-;66821:13;;66814:21;15423:34;;66821:13;;66814:21;41596:2;41581:18;;15423:34;66821:13;;66814:21;41673:2;41658:18;;15423:34;66821:13;66814:21;41750:2;41735:18;;15423:34;66821:13;66814:21;41827:3;41812:19;;15423:34;41443:3;41428:19;;41414:428::o;41849:222::-;15540:37;;;41976:2;41961:18;;41947:124::o;42078:310::-;;42225:2;42246:17;42239:47;42300:78;42225:2;42214:9;42210:18;42364:6;42300:78;:::i;42395:416::-;42595:2;42609:47;;;17708:2;42580:18;;;66084:19;17744:34;66124:14;;;17724:55;-1:-1;;;17799:12;;;17792:44;17855:12;;;42566:245::o;42818:416::-;43018:2;43032:47;;;18106:2;43003:18;;;66084:19;18142:34;66124:14;;;18122:55;-1:-1;;;18197:12;;;18190:45;18254:12;;;42989:245::o;43241:416::-;43441:2;43455:47;;;18505:2;43426:18;;;66084:19;18541:34;66124:14;;;18521:55;-1:-1;;;18596:12;;;18589:26;18634:12;;;43412:245::o;43664:416::-;43864:2;43878:47;;;18885:2;43849:18;;;66084:19;18921:34;66124:14;;;18901:55;-1:-1;;;18976:12;;;18969:32;19020:12;;;43835:245::o;44087:416::-;44287:2;44301:47;;;19271:2;44272:18;;;66084:19;19307:34;66124:14;;;19287:55;-1:-1;;;19362:12;;;19355:39;19413:12;;;44258:245::o;44510:416::-;44710:2;44724:47;;;19664:2;44695:18;;;66084:19;19700:34;66124:14;;;19680:55;-1:-1;;;19755:12;;;19748:33;19800:12;;;44681:245::o;44933:416::-;45133:2;45147:47;;;20051:2;45118:18;;;66084:19;20087:34;66124:14;;;20067:55;-1:-1;;;20142:12;;;20135:35;20189:12;;;45104:245::o;45356:416::-;45556:2;45570:47;;;20440:2;45541:18;;;66084:19;20476:30;66124:14;;;20456:51;20526:12;;;45527:245::o;45779:416::-;45979:2;45993:47;;;20777:2;45964:18;;;66084:19;20813:34;66124:14;;;20793:55;-1:-1;;;20868:12;;;20861:28;20908:12;;;45950:245::o;46202:416::-;46402:2;46416:47;;;21159:2;46387:18;;;66084:19;21195:29;66124:14;;;21175:50;21244:12;;;46373:245::o;46625:416::-;46825:2;46839:47;;;21495:2;46810:18;;;66084:19;21531:34;66124:14;;;21511:55;-1:-1;;;21586:12;;;21579:26;21624:12;;;46796:245::o;47048:416::-;47248:2;47262:47;;;21875:2;47233:18;;;66084:19;21911:34;66124:14;;;21891:55;-1:-1;;;21966:12;;;21959:42;22020:12;;;47219:245::o;47471:416::-;47671:2;47685:47;;;22271:2;47656:18;;;66084:19;22307:34;66124:14;;;22287:55;-1:-1;;;22362:12;;;22355:33;22407:12;;;47642:245::o;47894:416::-;48094:2;48108:47;;;22658:2;48079:18;;;66084:19;22694:34;66124:14;;;22674:55;22763:34;22749:12;;;22742:56;-1:-1;;;22818:12;;;22811:30;22860:12;;;48065:245::o;48317:416::-;48517:2;48531:47;;;23111:2;48502:18;;;66084:19;23147:34;66124:14;;;23127:55;-1:-1;;;23202:12;;;23195:34;23248:12;;;48488:245::o;48740:416::-;48940:2;48954:47;;;23499:2;48925:18;;;66084:19;23535:34;66124:14;;;23515:55;-1:-1;;;23590:12;;;23583:33;23635:12;;;48911:245::o;49163:416::-;49363:2;49377:47;;;23886:2;49348:18;;;66084:19;23922:34;66124:14;;;23902:55;-1:-1;;;23977:12;;;23970:43;24032:12;;;49334:245::o;49586:416::-;49786:2;49800:47;;;24283:2;49771:18;;;66084:19;24319:34;66124:14;;;24299:55;-1:-1;;;24374:12;;;24367:40;24426:12;;;49757:245::o;50009:416::-;50209:2;50223:47;;;24677:2;50194:18;;;66084:19;24713:34;66124:14;;;24693:55;-1:-1;;;24768:12;;;24761:44;24824:12;;;50180:245::o;50432:416::-;50632:2;50646:47;;;25075:2;50617:18;;;66084:19;25111:34;66124:14;;;25091:55;25180:25;25166:12;;;25159:47;25225:12;;;50603:245::o;50855:416::-;51055:2;51069:47;;;25476:2;51040:18;;;66084:19;25512:34;66124:14;;;25492:55;-1:-1;;;25567:12;;;25560:29;25608:12;;;51026:245::o;51278:416::-;51478:2;51492:47;;;25859:2;51463:18;;;66084:19;25895:34;66124:14;;;25875:55;-1:-1;;;25950:12;;;25943:42;26004:12;;;51449:245::o;51701:416::-;51901:2;51915:47;;;26255:2;51886:18;;;66084:19;26291:34;66124:14;;;26271:55;-1:-1;;;26346:12;;;26339:38;26396:12;;;51872:245::o;52124:416::-;52324:2;52338:47;;;26647:2;52309:18;;;66084:19;26683:34;66124:14;;;26663:55;-1:-1;;;26738:12;;;26731:27;26777:12;;;52295:245::o;52547:416::-;52747:2;52761:47;;;27028:2;52732:18;;;66084:19;27064:34;66124:14;;;27044:55;-1:-1;;;27119:12;;;27112:46;27177:12;;;52718:245::o;52970:416::-;53170:2;53184:47;;;27428:2;53155:18;;;66084:19;27464:34;66124:14;;;27444:55;-1:-1;;;27519:12;;;27512:42;27573:12;;;53141:245::o;53393:416::-;53593:2;53607:47;;;27824:2;53578:18;;;66084:19;27860:34;66124:14;;;27840:55;-1:-1;;;27915:12;;;27908:40;27967:12;;;53564:245::o;53816:416::-;54016:2;54030:47;;;28218:2;54001:18;;;66084:19;28254:34;66124:14;;;28234:55;-1:-1;;;28309:12;;;28302:30;28351:12;;;53987:245::o;54239:416::-;54439:2;54453:47;;;28602:2;54424:18;;;66084:19;28638:34;66124:14;;;28618:55;28707:34;28693:12;;;28686:56;-1:-1;;;28762:12;;;28755:26;28800:12;;;54410:245::o;54662:416::-;54862:2;54876:47;;;29051:2;54847:18;;;66084:19;29087:34;66124:14;;;29067:55;29156:25;29142:12;;;29135:47;29201:12;;;54833:245::o;55085:416::-;55285:2;55299:47;;;29452:2;55270:18;;;66084:19;29488:34;66124:14;;;29468:55;-1:-1;;;29543:12;;;29536:38;29593:12;;;55256:245::o;55508:416::-;55708:2;55722:47;;;29844:2;55693:18;;;66084:19;29880:34;66124:14;;;29860:55;-1:-1;;;29935:12;;;29928:43;29990:12;;;55679:245::o;55931:416::-;56131:2;56145:47;;;30241:2;56116:18;;;66084:19;30277:34;66124:14;;;30257:55;30346:34;30332:12;;;30325:56;30415:26;30401:12;;;30394:48;30461:12;;;56102:245::o;56354:416::-;56554:2;56568:47;;;30712:2;56539:18;;;66084:19;;;30748:34;66124:14;;;30728:55;30817:34;30803:12;;;30796:56;30871:12;;;56525:245::o;56777:416::-;56977:2;56991:47;;;31122:2;56962:18;;;66084:19;31158:34;66124:14;;;31138:55;-1:-1;;;31213:12;;;31206:31;31256:12;;;56948:245::o;57200:416::-;57400:2;57414:47;;;31507:2;57385:18;;;66084:19;31543:34;66124:14;;;31523:55;-1:-1;;;31598:12;;;31591:33;31643:12;;;57371:245::o;57623:416::-;57823:2;57837:47;;;31894:2;57808:18;;;66084:19;31930:34;66124:14;;;31910:55;-1:-1;;;31985:12;;;31978:33;32030:12;;;57794:245::o;58046:416::-;58246:2;58260:47;;;32281:2;58231:18;;;66084:19;32317:34;66124:14;;;32297:55;-1:-1;;;32372:12;;;32365:40;32424:12;;;58217:245::o;58469:416::-;58669:2;58683:47;;;32675:2;58654:18;;;66084:19;32711:34;66124:14;;;32691:55;-1:-1;;;32766:12;;;32759:32;32810:12;;;58640:245::o;58892:416::-;59092:2;59106:47;;;33061:2;59077:18;;;66084:19;33097:34;66124:14;;;33077:55;-1:-1;;;33152:12;;;33145:25;33189:12;;;59063:245::o;59315:416::-;59515:2;59529:47;;;33440:2;59500:18;;;66084:19;33476:34;66124:14;;;33456:55;33545:31;33531:12;;;33524:53;33596:12;;;59486:245::o;59738:416::-;59938:2;59952:47;;;33847:2;59923:18;;;66084:19;33883:34;66124:14;;;33863:55;-1:-1;;;33938:12;;;33931:28;33978:12;;;59909:245::o;60161:416::-;60361:2;60375:47;;;34229:2;60346:18;;;66084:19;34265:34;66124:14;;;34245:55;-1:-1;;;34320:12;;;34313:39;34371:12;;;60332:245::o;60584:416::-;60784:2;60798:47;;;34622:2;60769:18;;;66084:19;34658:34;66124:14;;;34638:55;34727:34;34713:12;;;34706:56;-1:-1;;;34782:12;;;34775:35;34829:12;;;60755:245::o;61007:414::-;;61206:2;61227:17;61220:47;35216:16;35210:23;61206:2;61195:9;61191:18;15540:37;61206:2;35381:5;35377:16;35371:23;35400:59;35444:14;61195:9;35444:14;35430:12;35400:59;:::i;:::-;;35444:14;35533:5;35529:16;35523:23;35552:63;35600:14;61195:9;35600:14;35586:12;35552:63;:::i;:::-;;35600:14;35689:5;35685:16;35679:23;35708:63;35756:14;61195:9;35756:14;35742:12;35708:63;:::i;:::-;;35756:14;35847:5;35843:16;35837:23;35914:14;61195:9;35914:14;15540:37;35914:14;36005:5;36001:16;35995:23;36072:14;61195:9;36072:14;15540:37;36072:14;36166:5;36162:16;36156:23;36233:14;61195:9;36233:14;15540:37;36233:14;36335:5;36331:16;36325:23;36402:14;36325:23;36402:14;61195:9;36402:14;15540:37;36402:14;36493:5;36489:18;36483:25;36463:45;;;35139:6;36528:16;35139:6;36528:16;61195:9;36528:16;36521:40;36576:73;35130:16;61195:9;35130:16;36630:12;36576:73;:::i;:::-;36568:81;;36528:16;36731:5;36727:18;36721:25;36701:45;;64707:9;;36766:16;36784:14;61195:9;36788:4;36784:14;;36766:16;61195:9;36766:16;36759:40;36814:73;36882:4;36868:12;36814:73;:::i;:::-;36968:18;;;36962:25;37025:14;;;;;;37007:16;;;37000:40;36806:81;-1:-1;36962:25;-1:-1;37055:73;36806:81;36962:25;37055:73;:::i;:::-;61273:138;61177:244;-1:-1;;;;;;61177:244::o;61657:333::-;15540:37;;;61976:2;61961:18;;15540:37;61812:2;61797:18;;61783:207::o;61997:1580::-;;62452:3;15570:5;15547:3;15540:37;15570:5;62617:2;62606:9;62602:18;15540:37;15570:5;62700:2;62689:9;62685:18;15540:37;67355:4;37488:5;67344:16;62779:2;62768:9;62764:18;37460:35;15570:5;62862:3;62851:9;62847:19;15540:37;15570:5;62946:3;62935:9;62931:19;15540:37;15570:5;63030:3;63019:9;63015:19;15540:37;15570:5;63114:3;63103:9;63099:19;15540:37;62452:3;63152;63141:9;63137:19;63130:49;63193:75;62452:3;62441:9;62437:19;63254:6;63193:75;:::i;:::-;63185:83;;63317:9;63311:4;63307:20;63301:3;63290:9;63286:19;63279:49;63342:75;63412:4;63403:6;63342:75;:::i;:::-;63334:83;;63466:9;63460:4;63456:20;63450:3;63439:9;63435:19;63428:49;63491:76;63562:4;63552:7;63491:76;:::i;:::-;63483:84;62423:1154;-1:-1;;;;;;;;;;;;;;62423:1154::o;63584:256::-;63646:2;63640:9;63672:17;;;63747:18;63732:34;;63768:22;;;63729:62;63726:2;;;63804:1;;63794:12;63726:2;63646;63813:22;63624:216;;-1:-1;63624:216::o;63847:304::-;;64006:18;63998:6;63995:30;63992:2;;;-1:-1;;64028:12;63992:2;-1:-1;64073:4;64061:17;;;64126:15;;63929:222::o;65284:158::-;;65379:14;;;65421:4;65408:18;;;65338:104::o;67908:106::-;67993:3;67989:15;;67961:53::o;68022:739::-;;68095:4;68077:16;68074:26;68071:2;;;68103:5;;68071:2;68137:1;-1:-1;;68116:23;68212:10;68155:34;-1:-1;68180:8;68155:34;:::i;:::-;68204:19;68194:2;;68227:5;;68194:2;68258;68252:9;68294:16;-1:-1;;68290:24;68137:1;68252:9;68266:49;68341:4;68335:11;68422:16;68374:18;68422:16;68415:4;68407:6;68403:17;68400:39;68374:18;68366:6;68363:30;68354:91;68351:2;;;68453:5;;;;;;68351:2;68491:6;68485:4;68481:17;68470:28;;68523:3;68517:10;68503:24;;68374:18;68538:6;68535:30;68532:2;;;68568:5;;;;;;68532:2;;68645:16;68639:4;68635:27;68605:4;68612:6;68600:3;68592:27;;68627:36;68624:2;;;68666:5;;;;;68624:2;64707:9;67871:14;-1:-1;;67867:28;68690:50;;68605:4;68690:50;68258:2;68679:62;68698:3;-1:-1;;68065:696;:::o;68768:117::-;-1:-1;;;;;67139:54;;68827:35;;68817:2;;68876:1;;68866:12;69134:115;-1:-1;;;;;;66987:78;;69192:34;;69182:2;;69240:1;;69230:12" - }, - "methodIdentifiers": { - "DEFAULT_ADMIN_ROLE()": "a217fddf", - "REGISTERED_CONSUMER()": "78e5c592", - "REGISTERED_DEALER()": "18a50d7e", - "REGISTERED_EMISSIONS_AUDITOR()": "76ce4755", - "REGISTERED_OFFSET_DEALER()": "1ef68ef7", - "REGISTERED_REC_DEALER()": "fcba7948", - "admin()": "f851a440", - "balanceOf(address,uint256)": "00fdd58e", - "balanceOfBatch(address[],uint256[])": "4e1273f4", - "getAvailableAndRetired(address,uint256)": "7f157c9b", - "getIssuer(uint256)": "92089c46", - "getNumOfUniqueTokens()": "5ddb368f", - "getRoleAdmin(bytes32)": "248a9ca3", - "getRoleMember(bytes32,uint256)": "9010d07c", - "getRoleMemberCount(bytes32)": "ca15c873", - "getRoles(address)": "ce6ccfaf", - "getTokenDetails(uint256)": "c1e03728", - "getTokenRetiredAmount(address,uint256)": "a0d975a7", - "getTokenType(uint256)": "76aed2e1", - "grantRole(bytes32,address)": "2f2ff15d", - "hasRole(bytes32,address)": "91d14854", - "initialize(address)": "c4d66de8", - "isApprovedForAll(address,address)": "e985e9c5", - "isConsumerRegistered(address)": "33781a0e", - "isDealerRegistered(address)": "69f7ef44", - "issue(address,uint8,uint256,uint256,uint256,uint256,string,string,string)": "fd0c4a9a", - "issueOnBehalf(address,address,uint8,uint256,uint256,uint256,uint256,string,string,string)": "f000be98", - "limitedMode()": "dba851b0", - "mint(address,uint256,uint256)": "156e29f6", - "registerConsumer(address)": "44b22fdd", - "registerDealer(address,uint8)": "31aa4b20", - "renounceRole(bytes32,address)": "36568abe", - "retire(uint256,uint256)": "293a7f2e", - "revokeRole(bytes32,address)": "d547741f", - "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": "2eb2c2d6", - "safeTransferFrom(address,address,uint256,uint256,bytes)": "f242432a", - "setApprovalForAll(address,bool)": "a22cb465", - "setLimitedMode(bool)": "ddc3e6eb", - "setTimelock(address)": "bdacb303", - "supportsInterface(bytes4)": "01ffc9a7", - "transfer(address,uint256,uint256)": "095bcdb6", - "unregisterConsumer(address)": "53dbe982", - "unregisterDealer(address,uint8)": "e2e564f2", - "uri(uint256)": "0e89341c" - } - } - } - }, - "src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol": { - "NetEmissionsTokenNetworkV2": { - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "RegisteredConsumer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "RegisteredDealer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "availableBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "retiredBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "dateCreated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "TokenCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRetired", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "UnregisteredConsumer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "UnregisteredDealer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_CONSUMER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_EMISSIONS_AUDITOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_OFFSET_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_REC_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getAvailableAndRetired", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getIssuer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNumOfUniqueTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getRoles", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenDetails", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dateCreated", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "internalType": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenRetiredAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenType", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isConsumerRegistered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isDealerRegistered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "issue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "issueOnBehalf", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "limitedMode", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "registerConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - } - ], - "name": "registerDealer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "retire", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_limitedMode", - "type": "bool" - } - ], - "name": "setLimitedMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_timelock", - "type": "address" - } - ], - "name": "setTimelock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "unregisterConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - } - ], - "name": "unregisterDealer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "608060405234801561001057600080fd5b5061492e806100206000396000f3fe608060405234801561001057600080fd5b50600436106102735760003560e01c80637f157c9b11610151578063ce6ccfaf116100c3578063e985e9c511610087578063e985e9c514610575578063f000be9814610588578063f242432a1461059b578063f851a440146105ae578063fcba7948146105b6578063fd0c4a9a146105be57610273565b8063ce6ccfaf14610510578063d547741f14610534578063dba851b014610547578063ddc3e6eb1461054f578063e2e564f21461056257610273565b8063a217fddf11610115578063a217fddf1461049c578063a22cb465146104a4578063bdacb303146104b7578063c1e03728146104ca578063c4d66de8146104ea578063ca15c873146104fd57610273565b80637f157c9b146104225780639010d07c1461044357806391d148541461046357806392089c4614610476578063a0d975a71461048957610273565b806331aa4b20116101ea57806353dbe982116101ae57806353dbe982146103d15780635ddb368f146103e457806369f7ef44146103ec57806376aed2e1146103ff57806376ce47551461041257806378e5c5921461041a57610273565b806331aa4b201461036557806333781a0e1461037857806336568abe1461038b57806344b22fdd1461039e5780634e1273f4146103b157610273565b806318a50d7e1161023c57806318a50d7e146103095780631ef68ef714610311578063248a9ca314610319578063293a7f2e1461032c5780632eb2c2d61461033f5780632f2ff15d1461035257610273565b8062fdd58e1461027857806301ffc9a7146102a1578063095bcdb6146102c15780630e89341c146102d6578063156e29f6146102f6575b600080fd5b61028b61028636600461325c565b6105d1565b60405161029891906137a3565b60405180910390f35b6102b46102af3660046134f2565b61062d565b604051610298919061376f565b6102d46102cf366004613286565b610650565b005b6102e96102e4366004613495565b610775565b60405161029891906137ac565b6102d4610304366004613286565b61080d565b61028b61089c565b61028b6108ae565b61028b610327366004613495565b6108c0565b6102d461033a3660046134d1565b6108d5565b6102d461034d366004613030565b610a56565b6102d46103603660046134ad565b610c75565b6102d46103733660046132b9565b610cbd565b6102b4610386366004612fe1565b610dbe565b6102d46103993660046134ad565b610dd8565b6102d46103ac366004612fe1565b610e1a565b6103c46103bf3660046133b3565b610f1f565b604051610298919061372e565b6102d46103df366004612fe1565b610fec565b61028b6110f1565b6102b46103fa366004612fe1565b611103565b6102e961040d366004613495565b611185565b61028b61127e565b61028b611290565b61043561043036600461325c565b6112a2565b60405161029892919061464f565b6104566104513660046134d1565b611339565b604051610298919061365e565b6102b46104713660046134ad565b611358565b610456610484366004613495565b611370565b61028b61049736600461325c565b611393565b61028b6113e2565b6102d46104b2366004613221565b6113e7565b6102d46104c5366004612fe1565b6114b5565b6104dd6104d8366004613495565b6114fe565b6040516102989190614577565b6102d46104f8366004612fe1565b61173e565b61028b61050b366004613495565b61189e565b61052361051e366004612fe1565b6118b5565b60405161029895949392919061377a565b6102d46105423660046134ad565b611949565b6102b4611983565b6102d461055d366004613475565b61198c565b6102d46105703660046132b9565b6119c6565b6102b4610583366004612ffc565b611ad4565b6102d461059636600461313f565b611b02565b6102d46105a93660046130da565b611b5b565b610456611cef565b61028b611d03565b6102d46105cc3660046132e4565b611d15565b60006001600160a01b0383166106025760405162461bcd60e51b81526004016105f99061398a565b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b600061066a60008051602061484f83398151915233611358565b905060006106866000805160206148b983398151915233611358565b905060006106a260008051602061482f83398151915233611358565b905060006106be6000805160206148d983398151915233611358565b905083806106c95750825b806106d15750815b806106d95750805b6106f55760405162461bcd60e51b81526004016105f990614416565b6106fe86611db6565b61071a5760405162461bcd60e51b81526004016105f990613fd7565b336001600160a01b03881614156107435760405162461bcd60e51b81526004016105f990613edf565b61076c33888888604051806040016040528060048152602001630307830360e41b815250611b5b565b50505050505050565b60678054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50505050509050919050565b610818600033611358565b6108345760405162461bcd60e51b81526004016105f990613c1a565b61083d82611db6565b6108595760405162461bcd60e51b81526004016105f990613a87565b60c95460ff161561087c5760405162461bcd60e51b81526004016105f990613f35565b61089783838360405180602001604052806000815250611dd8565b505050565b60008051602061486f83398151915281565b60008051602061482f83398151915281565b60009081526097602052604090206002015490565b60006108ef60008051602061484f83398151915233611358565b9050600061090b6000805160206148b983398151915233611358565b9050600061092760008051602061482f83398151915233611358565b905060006109436000805160206148d983398151915233611358565b9050838061094e5750825b806109565750815b8061095e5750805b61097a5760405162461bcd60e51b81526004016105f990614416565b61098386611db6565b61099f5760405162461bcd60e51b81526004016105f990613a0c565b6109a933876105d1565b8511156109c85760405162461bcd60e51b81526004016105f990613d06565b6109d3338787611ec3565b600086815260cd602090815260408083203384529091529020546109f79086611fd9565b600087815260cd602090815260408083203380855292529182902092909255517f8f1b5ebb586d3d169e4ed07db9cd10ce0dd30c7b656171310eae7517c0b53cf990610a46908990899061464f565b60405180910390a2505050505050565b8151835114610a775760405162461bcd60e51b81526004016105f99061438d565b6001600160a01b038416610a9d5760405162461bcd60e51b81526004016105f990613db7565b610aa5611ffe565b6001600160a01b0316856001600160a01b03161480610acb5750610acb85610583611ffe565b610ae75760405162461bcd60e51b81526004016105f990613dfc565b6000610af1611ffe565b9050610b01818787878787612002565b60005b8451811015610c07576000858281518110610b1b57fe5b602002602001015190506000858381518110610b3357fe5b60200260200101519050610ba0816040518060600160405280602a815260200161488f602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020546120ff9092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a1681522054610bd79082611fd9565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610b04565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c57929190613741565b60405180910390a4610c6d81878787878761212b565b505050505050565b600082815260976020526040902060020154610c9390610471611ffe565b610caf5760405162461bcd60e51b81526004016105f9906138f2565b610cb98282612239565b5050565b610cc8600033611358565b610ce45760405162461bcd60e51b81526004016105f990613c1a565b610ced816122a2565b610d095760405162461bcd60e51b81526004016105f990613f87565b8060ff1660011415610d3257610d2d6000805160206148b983398151915283610c75565b610d6e565b8060ff1660021415610d5657610d2d60008051602061482f83398151915283610c75565b610d6e6000805160206148d983398151915283610c75565b610d8660008051602061486f83398151915283610c75565b6040516001600160a01b038316907fa8377deee15954185683d55effd369508b4935978c8cb2bab790bf04c570181490600090a25050565b600061062760008051602061484f83398151915283611358565b610de0611ffe565b6001600160a01b0316816001600160a01b031614610e105760405162461bcd60e51b81526004016105f9906144b7565b610cb982826122c7565b6000610e346000805160206148b983398151915233611358565b90506000610e5060008051602061482f83398151915233611358565b90506000610e6c6000805160206148d983398151915233611358565b90508280610e775750815b80610e7f5750805b610e9b5760405162461bcd60e51b81526004016105f990613941565b60c95460ff1615610ecd57610eb1600033611358565b610ecd5760405162461bcd60e51b81526004016105f99061401d565b610ee560008051602061484f83398151915285610c75565b6040516001600160a01b038516907f69a0adee259d26fe61f4776f7bea7f3a9737c7321256821b985f988545efd31990600090a250505050565b60608151835114610f425760405162461bcd60e51b81526004016105f9906142f4565b6060835167ffffffffffffffff81118015610f5c57600080fd5b50604051908082528060200260200182016040528015610f86578160200160208202803683370190505b50905060005b8451811015610fe457610fc5858281518110610fa457fe5b6020026020010151858381518110610fb857fe5b60200260200101516105d1565b828281518110610fd157fe5b6020908102919091010152600101610f8c565b509392505050565b60006110066000805160206148b983398151915233611358565b9050600061102260008051602061482f83398151915233611358565b9050600061103e6000805160206148d983398151915233611358565b905082806110495750815b806110515750805b61106d5760405162461bcd60e51b81526004016105f990613941565b60c95460ff161561109f57611083600033611358565b61109f5760405162461bcd60e51b81526004016105f990613b64565b6110b760008051602061484f83398151915285611949565b6040516001600160a01b038516907f03a38088da75ee2d80f6c753f55f8fd17602ae17d8bd0ef44d5e1f28ab5af11f90600090a250505050565b60006110fd60cb612330565b90505b90565b60008061111e6000805160206148b983398151915284611358565b9050600061113a60008051602061482f83398151915285611358565b905060006111566000805160206148d983398151915286611358565b905082806111615750815b806111695750805b1561117a576001935050505061064b565b506000949350505050565b606061119082611db6565b6111ac5760405162461bcd60e51b81526004016105f990613bd0565b600082815260cc6020526040902060018082015460ff16141561120457505060408051808201909152601c81527f52656e657761626c6520456e6572677920436572746966696361746500000000602082015261064b565b600181015460ff166002141561124f57505060408051808201909152601781527f436172626f6e20456d697373696f6e73204f6666736574000000000000000000602082015261064b565b50506040805180820190915260118152704175646974656420456d697373696f6e7360781b6020820152919050565b6000805160206148d983398151915281565b60008051602061484f83398151915281565b60008060006112b185856105d1565b60405163a0d975a760e01b8152909150600090309063a0d975a7906112dc9089908990600401613715565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c919061352a565b9196919550909350505050565b60008281526097602052604081206113519083612334565b9392505050565b60008281526097602052604081206113519083612340565b600090815260cc602052604090206001015461010090046001600160a01b031690565b600061139e82611db6565b6113ba5760405162461bcd60e51b81526004016105f990614130565b50600090815260cd602090815260408083206001600160a01b03949094168352929052205490565b600081565b816001600160a01b03166113f9611ffe565b6001600160a01b031614156114205760405162461bcd60e51b81526004016105f9906142ab565b806066600061142d611ffe565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611471611ffe565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114a9919061376f565b60405180910390a35050565b6114c0600033611358565b6114dc5760405162461bcd60e51b81526004016105f990613c1a565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b611506612de0565b600082815260cc60209081526040918290208251610160810184528154815260018083015460ff811683860152610100908190046001600160a01b0390811684880152600280860154909116606085015260038501546080850152600485015460a0850152600585015460c0850152600685015460e08501526007850180548851948116158402600019011691909104601f81018790048702840187019097528683529295939490860193919291908301828280156116065780601f106115db57610100808354040283529160200191611606565b820191906000526020600020905b8154815290600101906020018083116115e957829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561169a5780601f1061166f5761010080835404028352916020019161169a565b820191906000526020600020905b81548152906001019060200180831161167d57829003601f168201915b505050918352505060098201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050815250509050919050565b600054610100900460ff16806117575750611757612355565b80611765575060005460ff16155b6117815760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156117ac576000805460ff1961ff0019909116610100171660011790555b6117c460405180602001604052806000815250612366565b6117ea60008051602061484f83398151915260008051602061486f833981519152612402565b6117f5600083610caf565b61180d60008051602061486f83398151915283610caf565b6118256000805160206148b983398151915283610caf565b61183d60008051602061482f83398151915283610caf565b6118556000805160206148d983398151915283610caf565b60c9805460ca80546001600160a01b0319169055610100600160a81b0319166101006001600160a01b038516021760ff191690558015610cb9576000805461ff00191690555050565b600081815260976020526040812061062790612454565b600080808080806118c68188611358565b905060006118e26000805160206148b983398151915289611358565b905060006118fe60008051602061482f8339815191528a611358565b9050600061191a6000805160206148d98339815191528b611358565b9050600061193660008051602061484f8339815191528c611358565b949b939a50919850965091945092505050565b60008281526097602052604090206002015461196790610471611ffe565b610e105760405162461bcd60e51b81526004016105f990613cb6565b60c95460ff1681565b611997600033611358565b6119b35760405162461bcd60e51b81526004016105f990613c1a565b60c9805460ff1916911515919091179055565b6119d1600033611358565b6119ed5760405162461bcd60e51b81526004016105f990613c1a565b6119f6816122a2565b611a125760405162461bcd60e51b81526004016105f990613ac9565b8060ff1660011415611a3b57611a366000805160206148b983398151915283611949565b611a77565b8060ff1660021415611a5f57611a3660008051602061482f83398151915283611949565b611a776000805160206148d983398151915283611949565b611a8082611103565b611a9c57611a9c60008051602061486f83398151915283611949565b6040516001600160a01b038316907f98552ded770f1d05a505572f3387c108dbc6b566ea3d49f83cff3d1f1c72a04290600090a25050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b60ca546001600160a01b0316331480611b215750611b21600033611358565b611b3d5760405162461bcd60e51b81526004016105f990613813565b611b4f8a8a8a8a8a8a8a8a8a8a61245f565b50505050505050505050565b6001600160a01b038416611b815760405162461bcd60e51b81526004016105f990613db7565b611b89611ffe565b6001600160a01b0316856001600160a01b03161480611baf5750611baf85610583611ffe565b611bcb5760405162461bcd60e51b81526004016105f990613b1b565b6000611bd5611ffe565b9050611bf5818787611be68861292b565b611bef8861292b565b87612002565b611c3c836040518060600160405280602a815260200161488f602a913960008781526065602090815260408083206001600160a01b038d16845290915290205491906120ff565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054611c739084611fd9565b60008581526065602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188811691908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611cd9908990899061464f565b60405180910390a4610c6d81878787878761296f565b60c95461010090046001600160a01b031681565b6000805160206148b983398151915281565b6000611d2f6000805160206148b983398151915233611358565b90506000611d4b60008051602061482f83398151915233611358565b90506000611d676000805160206148d983398151915233611358565b90508280611d725750815b80611d7a5750805b611d965760405162461bcd60e51b81526004016105f990613941565b611da88c338d8d8d8d8d8d8d8d61245f565b505050505050505050505050565b600081611dc360cb612330565b10611dd05750600161064b565b506000919050565b6001600160a01b038416611dfe5760405162461bcd60e51b81526004016105f9906143d5565b6000611e08611ffe565b9050611e1a81600087611be68861292b565b60008481526065602090815260408083206001600160a01b0389168452909152902054611e479084611fd9565b60008581526065602090815260408083206001600160a01b03808b16808652919093528184209490945551908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611ea5908990899061464f565b60405180910390a4611ebc8160008787878761296f565b5050505050565b6001600160a01b038316611ee95760405162461bcd60e51b81526004016105f990613e9c565b6000611ef3611ffe565b9050611f2381856000611f058761292b565b611f0e8761292b565b60405180602001604052806000815250612002565b611f6a8260405180606001604052806024815260200161480b6024913960008681526065602090815260408083206001600160a01b038b16845290915290205491906120ff565b60008481526065602090815260408083206001600160a01b03808a16808652919093528184209490945551919291908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611fcb908890889061464f565b60405180910390a450505050565b6000828201838110156113515760405162461bcd60e51b81526004016105f990613a50565b3390565b612010868686868686610c6d565b60005b835181101561076c57600060cc600086848151811061202e57fe5b60200260200101518152602001908152602001600020905060c960009054906101000a900460ff16156120f5576001600160a01b03861661206f57506120f7565b600181015460ff166003146120c15760ca546001600160a01b03898116911614806120a057506120a0600089611358565b6120bc5760405162461bcd60e51b81526004016105f990614506565b6120f5565b6120d96000805160206148d983398151915289611358565b6120f55760405162461bcd60e51b81526004016105f990614183565b505b600101612013565b600081848411156121235760405162461bcd60e51b81526004016105f991906137ac565b505050900390565b61213d846001600160a01b0316612a40565b15610c6d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121769089908990889088908890600401613672565b602060405180830381600087803b15801561219057600080fd5b505af19250505080156121c0575060408051601f3d908101601f191682019092526121bd9181019061350e565b60015b612209576121cc61473a565b806121d757506121f1565b8060405162461bcd60e51b81526004016105f991906137ac565b60405162461bcd60e51b81526004016105f9906137bf565b6001600160e01b0319811663bc197c8160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b60008281526097602052604090206122519082612a46565b15610cb95761225e611ffe565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000808260ff161180156122ba575060038260ff1611155b15611dd05750600161064b565b60008281526097602052604090206122df9082612a5b565b15610cb9576122ec611ffe565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b5490565b60006113518383612a70565b6000611351836001600160a01b038416612ab5565b600061236030612a40565b15905090565b600054610100900460ff168061237f575061237f612355565b8061238d575060005460ff16155b6123a95760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156123d4576000805460ff1961ff0019909116610100171660011790555b6123dc612acd565b6123e4612b50565b6123ed82612bce565b8015610cb9576000805461ff00191690555050565b600082815260976020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526097602052604090912060020155565b600061062782612330565b612468886122a2565b6124845760405162461bcd60e51b81526004016105f990614473565b60c95460ff1615612596578760ff16600114806124a457508760ff166002145b156125515760ca546001600160a01b031633146124d35760405162461bcd60e51b81526004016105f9906140e2565b6124de60008b611358565b6124fa5760405162461bcd60e51b81526004016105f990614264565b6125126000805160206148b98339815191528a611358565b80612530575061253060008051602061482f8339815191528a611358565b61254c5760405162461bcd60e51b81526004016105f990613d5a565b612591565b8760ff1660031415612591576125756000805160206148d98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990614206565b612656565b8760ff16600114156125d6576125ba6000805160206148b98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f99061433d565b8760ff1660021415612616576125fa60008051602061482f8339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990613c63565b8760ff16600314156126565761263a6000805160206148d98339815191528a611358565b6126565760405162461bcd60e51b81526004016105f990614085565b61266060cb612c65565b600060cc600061267060cb612330565b8152602001908152602001600020905061268a60cb612330565b8160000181905550888160010160006101000a81548160ff021916908360ff1602179055508a8160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160010160016101000a8154816001600160a01b0302191690836001600160a01b031602179055508681600301819055508581600401819055508481600601819055504281600501819055508381600701908051906020019061273d929190612e4f565b5082516127539060088301906020860190612e4f565b5081516127699060098301906020850190612e4f565b5061278e8b61277860cb612330565b8a60405180602001604052806000815250611dd8565b8860ff166003141561281257600281015481546127b5916001600160a01b0316908a611ec3565b8054600090815260cd6020908152604080832060028501546001600160a01b031684529091529020546127e89089611fd9565b8154600090815260cd6020908152604080832060028601546001600160a01b031684529091529020555b8060020160009054906101000a90046001600160a01b03166001600160a01b03168160010160019054906101000a90046001600160a01b03166001600160a01b03167f99cc3eeb446560c9a2d2483bc5160735ec0fb1851aea3bde32e7a56c30c11da68a60cd60008660000154815260200190815260200160002060008660020160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000205485600001548660010160009054906101000a900460ff168760030154886004015489600601548a600501548b6007018c6008018d6009016040516129169b9a9998979695949392919061465d565b60405180910390a35050505050505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061295e57fe5b602090810291909101015292915050565b612981846001600160a01b0316612a40565b15610c6d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906129ba90899089908890889088906004016136d0565b602060405180830381600087803b1580156129d457600080fd5b505af1925050508015612a04575060408051601f3d908101601f19168201909252612a019181019061350e565b60015b612a10576121cc61473a565b6001600160e01b0319811663f23a6e6160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b3b151590565b6000611351836001600160a01b038416612c6e565b6000611351836001600160a01b038416612cb8565b81546000908210612a935760405162461bcd60e51b81526004016105f990613868565b826000018281548110612aa257fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b600054610100900460ff1680612ae65750612ae6612355565b80612af4575060005460ff16155b612b105760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612b3b576000805460ff1961ff0019909116610100171660011790555b8015612b4d576000805461ff00191690555b50565b600054610100900460ff1680612b695750612b69612355565b80612b77575060005460ff16155b612b935760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612bbe576000805460ff1961ff0019909116610100171660011790555b612b3b6301ffc9a760e01b612d7e565b600054610100900460ff1680612be75750612be7612355565b80612bf5575060005460ff16155b612c115760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612c3c576000805460ff1961ff0019909116610100171660011790555b612c4582612dcd565b612c55636cdb3d1360e11b612d7e565b6123ed6303a24d0760e21b612d7e565b80546001019055565b6000612c7a8383612ab5565b612cb057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610627565b506000610627565b60008181526001830160205260408120548015612d745783546000198083019190810190600090879083908110612ceb57fe5b9060005260206000200154905080876000018481548110612d0857fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612d3857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610627565b6000915050610627565b6001600160e01b03198082161415612da85760405162461bcd60e51b81526004016105f9906139d5565b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b8051610cb9906067906020840190612e4f565b60405180610160016040528060008152602001600060ff16815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016060815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e9057805160ff1916838001178555612ebd565b82800160010185558215612ebd579182015b82811115612ebd578251825591602001919060010190612ea2565b50612ec9929150612ecd565b5090565b5b80821115612ec95760008155600101612ece565b80356001600160a01b038116811461062757600080fd5b600082601f830112612f09578081fd5b8135612f1c612f1782614708565b6146e1565b818152915060208083019084810181840286018201871015612f3d57600080fd5b60005b84811015612f5c57813584529282019290820190600101612f40565b505050505092915050565b600082601f830112612f77578081fd5b813567ffffffffffffffff811115612f8d578182fd5b612fa0601f8201601f19166020016146e1565b9150808252836020828501011115612fb757600080fd5b8060208401602084013760009082016020015292915050565b803560ff8116811461062757600080fd5b600060208284031215612ff2578081fd5b6113518383612ee2565b6000806040838503121561300e578081fd5b6130188484612ee2565b91506130278460208501612ee2565b90509250929050565b600080600080600060a08688031215613047578081fd5b8535613052816147df565b94506020860135613062816147df565b9350604086013567ffffffffffffffff8082111561307e578283fd5b61308a89838a01612ef9565b9450606088013591508082111561309f578283fd5b6130ab89838a01612ef9565b935060808801359150808211156130c0578283fd5b506130cd88828901612f67565b9150509295509295909350565b600080600080600060a086880312156130f1578081fd5b6130fb8787612ee2565b945061310a8760208801612ee2565b93506040860135925060608601359150608086013567ffffffffffffffff811115613133578182fd5b6130cd88828901612f67565b6000806000806000806000806000806101408b8d03121561315e578485fd5b6131688c8c612ee2565b99506131778c60208d01612ee2565b98506131868c60408d01612fd0565b975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013567ffffffffffffffff808211156131be578485fd5b6131ca8e838f01612f67565b94506101008d01359150808211156131e0578384fd5b6131ec8e838f01612f67565b93506101208d0135915080821115613202578283fd5b5061320f8d828e01612f67565b9150509295989b9194979a5092959850565b60008060408385031215613233578182fd5b61323d8484612ee2565b915060208301358015158114613251578182fd5b809150509250929050565b6000806040838503121561326e578182fd5b6132788484612ee2565b946020939093013593505050565b60008060006060848603121561329a578081fd5b6132a48585612ee2565b95602085013595506040909401359392505050565b600080604083850312156132cb578182fd5b6132d58484612ee2565b91506130278460208501612fd0565b60008060008060008060008060006101208a8c031215613302578283fd5b61330c8b8b612ee2565b985061331b8b60208c01612fd0565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013567ffffffffffffffff80821115613353578485fd5b61335f8d838e01612f67565b945060e08c0135915080821115613374578384fd5b6133808d838e01612f67565b93506101008c0135915080821115613396578283fd5b506133a38c828d01612f67565b9150509295985092959850929598565b600080604083850312156133c5578182fd5b823567ffffffffffffffff808211156133dc578384fd5b818501915085601f8301126133ef578384fd5b81356133fd612f1782614708565b80828252602080830192508086018a82838702890101111561341d578889fd5b8896505b84871015613447576134338b82612ee2565b845260019690960195928101928101613421565b50909650870135935050508082111561345e578283fd5b5061346b85828601612ef9565b9150509250929050565b600060208284031215613486578081fd5b81358015158114611351578182fd5b6000602082840312156134a6578081fd5b5035919050565b600080604083850312156134bf578182fd5b823591506020830135613251816147df565b600080604083850312156134e3578182fd5b50508035926020909101359150565b600060208284031215613503578081fd5b8135611351816147f4565b60006020828403121561351f578081fd5b8151611351816147f4565b60006020828403121561353b578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561357e57815187529582019590820190600101613562565b509495945050505050565b60008151808452815b818110156135ae57602081850181015186830182015201613592565b818111156135bf5782602083870101525b50601f01601f19169290920160200192915050565b600081546001808216600081146135f257600181146136105761364e565b60028304607f16865260ff198316602087015260408601935061364e565b6002830480875261362086614728565b60005b828110156136445781546020828b0101528482019150602081019050613623565b8801602001955050505b50505092915050565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061369e9083018661354f565b82810360608401526136b0818661354f565b905082810360808401526136c48185613589565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061370a90830184613589565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b600060208252611351602083018461354f565b600060408252613754604083018561354f565b8281036020840152613766818561354f565b95945050505050565b901515815260200190565b941515855292151560208501529015156040840152151560608301521515608082015260a00190565b90815260200190565b6000602082526113516020830184613589565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b60208082526035908201527f434c4d383a3a69737375654f6e426568616c663a2063616c6c206d757374206360408201527437b6b290333937b6902220a79037b91030b236b4b760591b606082015260800190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526e0818591b5a5b881d1bc819dc985b9d608a1b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c794465616c65723a206d73672e73656e646572206e6f746040820152681030903232b0b632b960b91b606082015260800190565b6020808252602b908201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60408201526a65726f206164647265737360a81b606082015260800190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b60208082526024908201527f434c4d383a3a7265746972653a20746f6b656e496420646f6573206e6f7420656040820152631e1a5cdd60e21b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526022908201527f434c4d383a3a6d696e743a20746f6b656e496420646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b60208082526032908201527f434c4d383a3a756e72656769737465724465616c65723a20746f6b656e54797060408201527119525908191bd95cc81b9bdd08195e1a5cdd60721b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526046908201527f434c4d383a3a756e7265676973746572436f6e73756d6572286c696d6974656460408201527f293a206f6e6c792061646d696e2063616e20756e726567697374657220636f6e60608201526573756d65727360d01b608082015260a00190565b6020808252602a908201527f434c4d383a3a676574546f6b656e547970653a20746f6b656e496420646f6573604082015269081b9bdd08195e1a5cdd60b21b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c7941646d696e3a206d73672e73656e646572206e6f74206040820152683a34329030b236b4b760b91b606082015260800190565b60208082526033908201527f434c4d383a3a5f69737375653a20697373756572206e6f7420612072656769736040820152723a32b932b21037b33339b2ba103232b0b632b960691b606082015260800190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526f2061646d696e20746f207265766f6b6560801b606082015260800190565b60208082526034908201527f434c4d383a3a7265746972653a206e6f7420656e6f75676820617661696c61626040820152736c652062616c616e636520746f2072657469726560601b606082015260800190565b60208082526037908201527f434c4d383a3a5f6973737565286c696d69746564293a2070726f706f7365722060408201527f6e6f7420612072656769737465726564206465616c6572000000000000000000606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526036908201527f434c4d383a3a7472616e736665723a2073656e64657220616e642072656365696040820152757665722063616e6e6f74206265207468652073616d6560501b606082015260800190565b60208082526032908201527f434c4d383a3a6d696e743a2063616e6e6f74206d696e74206e657720746f6b656040820152716e7320696e206c696d69746564206d6f646560701b606082015260800190565b60208082526030908201527f434c4d383a3a72656769737465724465616c65723a20746f6b656e547970654960408201526f1908191bd95cc81b9bdd08195e1a5cdd60821b606082015260800190565b60208082526026908201527f434c4d383a3a7472616e736665723a20746f6b656e496420646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b60208082526042908201527f434c4d383a3a7265676973746572436f6e73756d6572286c696d69746564293a60408201527f206f6e6c792061646d696e2063616e20726567697374657220636f6e73756d65606082015261727360f01b608082015260a00190565b60208082526037908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201527f746572656420656d697373696f6e732061756469746f72000000000000000000606082015260800190565b6020808252602e908201527f434c4d383a3a5f6973737565286c696d69746564293a206d73672e73656e646560408201526d72206e6f742074696d656c6f636b60901b606082015260800190565b60208082526033908201527f434c4d383a3a676574546f6b656e52657469726564416d6f756e743a20746f6b604082015272195b925908191bd95cc81b9bdd08195e1a5cdd606a1b606082015260800190565b60208082526058908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c7920656d697373696f6e732061756469746f72732063616e60608201527f206973737565206175646974656420656d697373696f6e730000000000000000608082015260a00190565b602080825260409082018190527f434c4d383a3a5f6973737565286c696d69746564293a20697373756572206e6f908201527f742061207265676973746572656420656d697373696f6e732061756469746f72606082015260800190565b60208082526027908201527f434c4d383a3a5f6973737565286c696d69746564293a20697373756565206e6f6040820152663a1030b236b4b760c91b606082015260800190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526030908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201526f3a32b932b2102922a1903232b0b632b960811b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252603d908201527f434c4d383a3a636f6e73756d65724f724465616c65723a206d73672e73656e6460408201527f6572206e6f74206120636f6e73756d6572206f722061206465616c6572000000606082015260800190565b60208082526024908201527f434c4d383a3a5f69737375653a20746f6b656e54797065496420697320696e76604082015263185b1a5960e21b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b6020808252604b908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c792061646d696e20616e642044414f2063616e207472616e60608201526a7366657220746f6b656e7360a81b608082015260a00190565b6000602082528251602083015260208301516145966040840182613657565b5060408301516145a96060840182613542565b5060608301516145bc6080840182613542565b50608083015160a083015260a083015160c083015260c083015160e083015260e08301516101008181850152808501519150506101606101208181860152614608610180860184613589565b9250808601519050601f196101408187860301818801526146298584613589565b9088015187820390920184880152935090506146458382613589565b9695505050505050565b918252602082015260400190565b60006101608d83528c60208401528b604084015260ff8b1660608401528960808401528860a08401528760c08401528660e0840152806101008401526146a5818401876135d4565b90508281036101208401526146ba81866135d4565b90508281036101408401526146cf81856135d4565b9e9d5050505050505050505050505050565b60405181810167ffffffffffffffff8111828210171561470057600080fd5b604052919050565b600067ffffffffffffffff82111561471e578081fd5b5060209081020190565b60009081526020902090565b60e01c90565b600060443d101561474a57611100565b600481823e6308c379a061475e8251614734565b1461476857611100565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156147985750505050611100565b828401925082519150808211156147b25750505050611100565b503d830160208284010111156147ca57505050611100565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114612b4d57600080fd5b6001600160e01b031981168114612b4d57600080fdfe455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76af8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e736665722ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12ca26469706673582212205f01f3a69064ad53ce92125759799dded2745cbae7146e4576954e91b333c95664736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x492E DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x273 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x7F157C9B GT PUSH2 0x151 JUMPI DUP1 PUSH4 0xCE6CCFAF GT PUSH2 0xC3 JUMPI DUP1 PUSH4 0xE985E9C5 GT PUSH2 0x87 JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0x575 JUMPI DUP1 PUSH4 0xF000BE98 EQ PUSH2 0x588 JUMPI DUP1 PUSH4 0xF242432A EQ PUSH2 0x59B JUMPI DUP1 PUSH4 0xF851A440 EQ PUSH2 0x5AE JUMPI DUP1 PUSH4 0xFCBA7948 EQ PUSH2 0x5B6 JUMPI DUP1 PUSH4 0xFD0C4A9A EQ PUSH2 0x5BE JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0xCE6CCFAF EQ PUSH2 0x510 JUMPI DUP1 PUSH4 0xD547741F EQ PUSH2 0x534 JUMPI DUP1 PUSH4 0xDBA851B0 EQ PUSH2 0x547 JUMPI DUP1 PUSH4 0xDDC3E6EB EQ PUSH2 0x54F JUMPI DUP1 PUSH4 0xE2E564F2 EQ PUSH2 0x562 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0xA217FDDF GT PUSH2 0x115 JUMPI DUP1 PUSH4 0xA217FDDF EQ PUSH2 0x49C JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x4A4 JUMPI DUP1 PUSH4 0xBDACB303 EQ PUSH2 0x4B7 JUMPI DUP1 PUSH4 0xC1E03728 EQ PUSH2 0x4CA JUMPI DUP1 PUSH4 0xC4D66DE8 EQ PUSH2 0x4EA JUMPI DUP1 PUSH4 0xCA15C873 EQ PUSH2 0x4FD JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x7F157C9B EQ PUSH2 0x422 JUMPI DUP1 PUSH4 0x9010D07C EQ PUSH2 0x443 JUMPI DUP1 PUSH4 0x91D14854 EQ PUSH2 0x463 JUMPI DUP1 PUSH4 0x92089C46 EQ PUSH2 0x476 JUMPI DUP1 PUSH4 0xA0D975A7 EQ PUSH2 0x489 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x31AA4B20 GT PUSH2 0x1EA JUMPI DUP1 PUSH4 0x53DBE982 GT PUSH2 0x1AE JUMPI DUP1 PUSH4 0x53DBE982 EQ PUSH2 0x3D1 JUMPI DUP1 PUSH4 0x5DDB368F EQ PUSH2 0x3E4 JUMPI DUP1 PUSH4 0x69F7EF44 EQ PUSH2 0x3EC JUMPI DUP1 PUSH4 0x76AED2E1 EQ PUSH2 0x3FF JUMPI DUP1 PUSH4 0x76CE4755 EQ PUSH2 0x412 JUMPI DUP1 PUSH4 0x78E5C592 EQ PUSH2 0x41A JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x31AA4B20 EQ PUSH2 0x365 JUMPI DUP1 PUSH4 0x33781A0E EQ PUSH2 0x378 JUMPI DUP1 PUSH4 0x36568ABE EQ PUSH2 0x38B JUMPI DUP1 PUSH4 0x44B22FDD EQ PUSH2 0x39E JUMPI DUP1 PUSH4 0x4E1273F4 EQ PUSH2 0x3B1 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x18A50D7E GT PUSH2 0x23C JUMPI DUP1 PUSH4 0x18A50D7E EQ PUSH2 0x309 JUMPI DUP1 PUSH4 0x1EF68EF7 EQ PUSH2 0x311 JUMPI DUP1 PUSH4 0x248A9CA3 EQ PUSH2 0x319 JUMPI DUP1 PUSH4 0x293A7F2E EQ PUSH2 0x32C JUMPI DUP1 PUSH4 0x2EB2C2D6 EQ PUSH2 0x33F JUMPI DUP1 PUSH4 0x2F2FF15D EQ PUSH2 0x352 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH3 0xFDD58E EQ PUSH2 0x278 JUMPI DUP1 PUSH4 0x1FFC9A7 EQ PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x95BCDB6 EQ PUSH2 0x2C1 JUMPI DUP1 PUSH4 0xE89341C EQ PUSH2 0x2D6 JUMPI DUP1 PUSH4 0x156E29F6 EQ PUSH2 0x2F6 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x28B PUSH2 0x286 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x5D1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x37A3 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x2B4 PUSH2 0x2AF CALLDATASIZE PUSH1 0x4 PUSH2 0x34F2 JUMP JUMPDEST PUSH2 0x62D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x376F JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x2CF CALLDATASIZE PUSH1 0x4 PUSH2 0x3286 JUMP JUMPDEST PUSH2 0x650 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x2E9 PUSH2 0x2E4 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x775 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x304 CALLDATASIZE PUSH1 0x4 PUSH2 0x3286 JUMP JUMPDEST PUSH2 0x80D JUMP JUMPDEST PUSH2 0x28B PUSH2 0x89C JUMP JUMPDEST PUSH2 0x28B PUSH2 0x8AE JUMP JUMPDEST PUSH2 0x28B PUSH2 0x327 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x8C0 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x33A CALLDATASIZE PUSH1 0x4 PUSH2 0x34D1 JUMP JUMPDEST PUSH2 0x8D5 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x34D CALLDATASIZE PUSH1 0x4 PUSH2 0x3030 JUMP JUMPDEST PUSH2 0xA56 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x360 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0xC75 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x373 CALLDATASIZE PUSH1 0x4 PUSH2 0x32B9 JUMP JUMPDEST PUSH2 0xCBD JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x386 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xDBE JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x399 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0xDD8 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x3AC CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xE1A JUMP JUMPDEST PUSH2 0x3C4 PUSH2 0x3BF CALLDATASIZE PUSH1 0x4 PUSH2 0x33B3 JUMP JUMPDEST PUSH2 0xF1F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x372E JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x3DF CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xFEC JUMP JUMPDEST PUSH2 0x28B PUSH2 0x10F1 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x3FA CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x2E9 PUSH2 0x40D CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x1185 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x127E JUMP JUMPDEST PUSH2 0x28B PUSH2 0x1290 JUMP JUMPDEST PUSH2 0x435 PUSH2 0x430 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x12A2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP3 SWAP2 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH2 0x456 PUSH2 0x451 CALLDATASIZE PUSH1 0x4 PUSH2 0x34D1 JUMP JUMPDEST PUSH2 0x1339 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x365E JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x471 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x456 PUSH2 0x484 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x1370 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x497 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x1393 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x13E2 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4B2 CALLDATASIZE PUSH1 0x4 PUSH2 0x3221 JUMP JUMPDEST PUSH2 0x13E7 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4C5 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x14B5 JUMP JUMPDEST PUSH2 0x4DD PUSH2 0x4D8 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x14FE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x4577 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4F8 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x173E JUMP JUMPDEST PUSH2 0x28B PUSH2 0x50B CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x189E JUMP JUMPDEST PUSH2 0x523 PUSH2 0x51E CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x18B5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x377A JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x542 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x1983 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x55D CALLDATASIZE PUSH1 0x4 PUSH2 0x3475 JUMP JUMPDEST PUSH2 0x198C JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x570 CALLDATASIZE PUSH1 0x4 PUSH2 0x32B9 JUMP JUMPDEST PUSH2 0x19C6 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x583 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FFC JUMP JUMPDEST PUSH2 0x1AD4 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x596 CALLDATASIZE PUSH1 0x4 PUSH2 0x313F JUMP JUMPDEST PUSH2 0x1B02 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x5A9 CALLDATASIZE PUSH1 0x4 PUSH2 0x30DA JUMP JUMPDEST PUSH2 0x1B5B JUMP JUMPDEST PUSH2 0x456 PUSH2 0x1CEF JUMP JUMPDEST PUSH2 0x28B PUSH2 0x1D03 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x5CC CALLDATASIZE PUSH1 0x4 PUSH2 0x32E4 JUMP JUMPDEST PUSH2 0x1D15 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x602 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x398A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x33 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x66A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x686 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x6A2 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x6BE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP4 DUP1 PUSH2 0x6C9 JUMPI POP DUP3 JUMPDEST DUP1 PUSH2 0x6D1 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x6D9 JUMPI POP DUP1 JUMPDEST PUSH2 0x6F5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4416 JUMP JUMPDEST PUSH2 0x6FE DUP7 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x71A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3FD7 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND EQ ISZERO PUSH2 0x743 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3EDF JUMP JUMPDEST PUSH2 0x76C CALLER DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH4 0x3078303 PUSH1 0xE4 SHL DUP2 MSTORE POP PUSH2 0x1B5B JUMP JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x67 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x801 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x7D6 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x801 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x7E4 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x818 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x834 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0x83D DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x859 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A87 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x87C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3F35 JUMP JUMPDEST PUSH2 0x897 DUP4 DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1DD8 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x8EF PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x90B PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x927 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x943 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP4 DUP1 PUSH2 0x94E JUMPI POP DUP3 JUMPDEST DUP1 PUSH2 0x956 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x95E JUMPI POP DUP1 JUMPDEST PUSH2 0x97A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4416 JUMP JUMPDEST PUSH2 0x983 DUP7 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x99F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A0C JUMP JUMPDEST PUSH2 0x9A9 CALLER DUP8 PUSH2 0x5D1 JUMP JUMPDEST DUP6 GT ISZERO PUSH2 0x9C8 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3D06 JUMP JUMPDEST PUSH2 0x9D3 CALLER DUP8 DUP8 PUSH2 0x1EC3 JUMP JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x9F7 SWAP1 DUP7 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP2 DUP3 SWAP1 KECCAK256 SWAP3 SWAP1 SWAP3 SSTORE MLOAD PUSH32 0x8F1B5EBB586D3D169E4ED07DB9CD10CE0DD30C7B656171310EAE7517C0B53CF9 SWAP1 PUSH2 0xA46 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP POP POP POP POP JUMP JUMPDEST DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0xA77 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x438D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0xA9D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DB7 JUMP JUMPDEST PUSH2 0xAA5 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0xACB JUMPI POP PUSH2 0xACB DUP6 PUSH2 0x583 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xAE7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DFC JUMP JUMPDEST PUSH1 0x0 PUSH2 0xAF1 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0xB01 DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x2002 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0xC07 JUMPI PUSH1 0x0 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xB1B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xB33 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0xBA0 DUP2 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x488F PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x65 PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP14 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD PUSH2 0x20FF SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP15 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP11 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xBD7 SWAP1 DUP3 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP6 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP13 AND DUP7 MSTORE SWAP1 SWAP2 MSTORE SWAP1 SWAP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE POP PUSH1 0x1 ADD PUSH2 0xB04 JUMP JUMPDEST POP DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x4A39DC06D4C0DBC64B70AF90FD698A233A518AA5D07E595D983B8C0526C8F7FB DUP8 DUP8 PUSH1 0x40 MLOAD PUSH2 0xC57 SWAP3 SWAP2 SWAP1 PUSH2 0x3741 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xC6D DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x212B JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0xC93 SWAP1 PUSH2 0x471 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xCAF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38F2 JUMP JUMPDEST PUSH2 0xCB9 DUP3 DUP3 PUSH2 0x2239 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xCC8 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xCE4 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0xCED DUP2 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0xD09 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3F87 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0xD32 JUMPI PUSH2 0xD2D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD6E JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0xD56 JUMPI PUSH2 0xD2D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD6E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD86 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH32 0xA8377DEEE15954185683D55EFFD369508B4935978C8CB2BAB790BF04C5701814 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x627 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xDE0 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0xE10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x44B7 JUMP JUMPDEST PUSH2 0xCB9 DUP3 DUP3 PUSH2 0x22C7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE34 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0xE50 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0xE6C PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0xE77 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0xE7F JUMPI POP DUP1 JUMPDEST PUSH2 0xE9B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xECD JUMPI PUSH2 0xEB1 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xECD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x401D JUMP JUMPDEST PUSH2 0xEE5 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0x69A0ADEE259D26FE61F4776F7BEA7F3A9737C7321256821B985F988545EFD319 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0xF42 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x42F4 JUMP JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0xF5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xF86 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0xFE4 JUMPI PUSH2 0xFC5 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xFA4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xFB8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x5D1 JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xFD1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0xF8C JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1006 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1022 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x103E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1049 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1051 JUMPI POP DUP1 JUMPDEST PUSH2 0x106D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x109F JUMPI PUSH2 0x1083 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x109F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3B64 JUMP JUMPDEST PUSH2 0x10B7 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0x1949 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0x3A38088DA75EE2D80F6C753F55F8FD17602AE17D8BD0EF44D5E1F28AB5AF11F SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10FD PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x111E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP5 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x113A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1156 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP7 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1161 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1169 JUMPI POP DUP1 JUMPDEST ISZERO PUSH2 0x117A JUMPI PUSH1 0x1 SWAP4 POP POP POP POP PUSH2 0x64B JUMP JUMPDEST POP PUSH1 0x0 SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1190 DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x11AC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3BD0 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP1 DUP3 ADD SLOAD PUSH1 0xFF AND EQ ISZERO PUSH2 0x1204 JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1C DUP2 MSTORE PUSH32 0x52656E657761626C6520456E6572677920436572746966696361746500000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x64B JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x124F JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x17 DUP2 MSTORE PUSH32 0x436172626F6E20456D697373696F6E73204F6666736574000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x64B JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH17 0x4175646974656420456D697373696F6E73 PUSH1 0x78 SHL PUSH1 0x20 DUP3 ADD MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x12B1 DUP6 DUP6 PUSH2 0x5D1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xA0D975A7 PUSH1 0xE0 SHL DUP2 MSTORE SWAP1 SWAP2 POP PUSH1 0x0 SWAP1 ADDRESS SWAP1 PUSH4 0xA0D975A7 SWAP1 PUSH2 0x12DC SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0x3715 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x12F4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1308 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x132C SWAP2 SWAP1 PUSH2 0x352A JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x1351 SWAP1 DUP4 PUSH2 0x2334 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x1351 SWAP1 DUP4 PUSH2 0x2340 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 ADD SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139E DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x13BA JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4130 JUMP JUMPDEST POP PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 JUMP JUMPDEST DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x13F9 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1420 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x42AB JUMP JUMPDEST DUP1 PUSH1 0x66 PUSH1 0x0 PUSH2 0x142D PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP2 DUP3 ADD PUSH1 0x0 SWAP1 DUP2 KECCAK256 SWAP2 DUP8 AND DUP1 DUP3 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP3 ISZERO ISZERO SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 SSTORE PUSH2 0x1471 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 DUP4 PUSH1 0x40 MLOAD PUSH2 0x14A9 SWAP2 SWAP1 PUSH2 0x376F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH2 0x14C0 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x14DC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH1 0xCA DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x1506 PUSH2 0x2DE0 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP3 MLOAD PUSH2 0x160 DUP2 ADD DUP5 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP1 DUP4 ADD SLOAD PUSH1 0xFF DUP2 AND DUP4 DUP7 ADD MSTORE PUSH2 0x100 SWAP1 DUP2 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP5 DUP9 ADD MSTORE PUSH1 0x2 DUP1 DUP7 ADD SLOAD SWAP1 SWAP2 AND PUSH1 0x60 DUP6 ADD MSTORE PUSH1 0x3 DUP6 ADD SLOAD PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0x4 DUP6 ADD SLOAD PUSH1 0xA0 DUP6 ADD MSTORE PUSH1 0x5 DUP6 ADD SLOAD PUSH1 0xC0 DUP6 ADD MSTORE PUSH1 0x6 DUP6 ADD SLOAD PUSH1 0xE0 DUP6 ADD MSTORE PUSH1 0x7 DUP6 ADD DUP1 SLOAD DUP9 MLOAD SWAP5 DUP2 AND ISZERO DUP5 MUL PUSH1 0x0 NOT ADD AND SWAP2 SWAP1 SWAP2 DIV PUSH1 0x1F DUP2 ADD DUP8 SWAP1 DIV DUP8 MUL DUP5 ADD DUP8 ADD SWAP1 SWAP8 MSTORE DUP7 DUP4 MSTORE SWAP3 SWAP6 SWAP4 SWAP5 SWAP1 DUP7 ADD SWAP4 SWAP2 SWAP3 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x1606 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x15DB JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1606 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x15E9 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP SWAP2 DUP4 MSTORE POP POP PUSH1 0x8 DUP3 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x2 PUSH1 0x1 DUP6 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP3 ADD DUP5 ADD SWAP1 SWAP3 MSTORE DUP2 DUP2 MSTORE SWAP4 DUP3 ADD SWAP4 SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x169A JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x166F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x169A JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x167D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP SWAP2 DUP4 MSTORE POP POP PUSH1 0x9 DUP3 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x2 PUSH1 0x1 DUP6 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP3 ADD DUP5 ADD SWAP1 SWAP3 MSTORE DUP2 DUP2 MSTORE SWAP4 DUP3 ADD SWAP4 SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x172E JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1703 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x172E JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1711 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 MSTORE POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x1757 JUMPI POP PUSH2 0x1757 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x1765 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x1781 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x17AC JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x17C4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x2366 JUMP JUMPDEST PUSH2 0x17EA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH2 0x2402 JUMP JUMPDEST PUSH2 0x17F5 PUSH1 0x0 DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x180D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x1825 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x183D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x1855 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH1 0xC9 DUP1 SLOAD PUSH1 0xCA DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE PUSH2 0x100 PUSH1 0x1 PUSH1 0xA8 SHL SUB NOT AND PUSH2 0x100 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND MUL OR PUSH1 0xFF NOT AND SWAP1 SSTORE DUP1 ISZERO PUSH2 0xCB9 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x627 SWAP1 PUSH2 0x2454 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 DUP1 DUP1 DUP1 PUSH2 0x18C6 DUP2 DUP9 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x18E2 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP10 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x18FE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x191A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP12 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1936 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP13 PUSH2 0x1358 JUMP JUMPDEST SWAP5 SWAP12 SWAP4 SWAP11 POP SWAP2 SWAP9 POP SWAP7 POP SWAP2 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x1967 SWAP1 PUSH2 0x471 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xE10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3CB6 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH2 0x1997 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x19B3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH1 0xC9 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x19D1 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x19ED JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0x19F6 DUP2 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0x1A12 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3AC9 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x1A3B JUMPI PUSH2 0x1A36 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A77 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x1A5F JUMPI PUSH2 0x1A36 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A77 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A80 DUP3 PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x1A9C JUMPI PUSH2 0x1A9C PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH32 0x98552DED770F1D05A505572F3387C108DBC6B566EA3D49F83CFF3D1F1C72A042 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x66 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ DUP1 PUSH2 0x1B21 JUMPI POP PUSH2 0x1B21 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x1B3D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3813 JUMP JUMPDEST PUSH2 0x1B4F DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 PUSH2 0x245F JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x1B81 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DB7 JUMP JUMPDEST PUSH2 0x1B89 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0x1BAF JUMPI POP PUSH2 0x1BAF DUP6 PUSH2 0x583 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0x1BCB JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3B1B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BD5 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1BF5 DUP2 DUP8 DUP8 PUSH2 0x1BE6 DUP9 PUSH2 0x292B JUMP JUMPDEST PUSH2 0x1BEF DUP9 PUSH2 0x292B JUMP JUMPDEST DUP8 PUSH2 0x2002 JUMP JUMPDEST PUSH2 0x1C3C DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x488F PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP14 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD SWAP2 SWAP1 PUSH2 0x20FF JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP8 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x1C73 SWAP1 DUP5 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP12 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 SWAP2 DUP9 DUP2 AND SWAP2 SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1CD9 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xC6D DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x296F JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D2F PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1D4B PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1D67 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1D72 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1D7A JUMPI POP DUP1 JUMPDEST PUSH2 0x1D96 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH2 0x1DA8 DUP13 CALLER DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 PUSH2 0x245F JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x1DC3 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST LT PUSH2 0x1DD0 JUMPI POP PUSH1 0x1 PUSH2 0x64B JUMP JUMPDEST POP PUSH1 0x0 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x1DFE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x43D5 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1E08 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1E1A DUP2 PUSH1 0x0 DUP8 PUSH2 0x1BE6 DUP9 PUSH2 0x292B JUMP JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x1E47 SWAP1 DUP5 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP12 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE DUP2 DUP5 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE MLOAD SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1EA5 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0x1EBC DUP2 PUSH1 0x0 DUP8 DUP8 DUP8 DUP8 PUSH2 0x296F JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x1EE9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E9C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1EF3 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1F23 DUP2 DUP6 PUSH1 0x0 PUSH2 0x1F05 DUP8 PUSH2 0x292B JUMP JUMPDEST PUSH2 0x1F0E DUP8 PUSH2 0x292B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x2002 JUMP JUMPDEST PUSH2 0x1F6A DUP3 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x480B PUSH1 0x24 SWAP2 CODECOPY PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD SWAP2 SWAP1 PUSH2 0x20FF JUMP JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP11 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE DUP2 DUP5 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE MLOAD SWAP2 SWAP3 SWAP2 SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1FCB SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x1351 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A50 JUMP JUMPDEST CALLER SWAP1 JUMP JUMPDEST PUSH2 0x2010 DUP7 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH2 0xC6D JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x76C JUMPI PUSH1 0x0 PUSH1 0xCC PUSH1 0x0 DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x202E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 POP PUSH1 0xC9 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x20F5 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH2 0x206F JUMPI POP PUSH2 0x20F7 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND PUSH1 0x3 EQ PUSH2 0x20C1 JUMPI PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 DUP2 AND SWAP2 AND EQ DUP1 PUSH2 0x20A0 JUMPI POP PUSH2 0x20A0 PUSH1 0x0 DUP10 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x20BC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4506 JUMP JUMPDEST PUSH2 0x20F5 JUMP JUMPDEST PUSH2 0x20D9 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP10 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x20F5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4183 JUMP JUMPDEST POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x2013 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP5 DUP5 GT ISZERO PUSH2 0x2123 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST POP POP POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH2 0x213D DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x2A40 JUMP JUMPDEST ISZERO PUSH2 0xC6D JUMPI PUSH1 0x40 MLOAD PUSH4 0xBC197C81 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH4 0xBC197C81 SWAP1 PUSH2 0x2176 SWAP1 DUP10 SWAP1 DUP10 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x3672 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2190 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x21C0 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x21BD SWAP2 DUP2 ADD SWAP1 PUSH2 0x350E JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x2209 JUMPI PUSH2 0x21CC PUSH2 0x473A JUMP JUMPDEST DUP1 PUSH2 0x21D7 JUMPI POP PUSH2 0x21F1 JUMP JUMPDEST DUP1 PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x37BF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xBC197C81 PUSH1 0xE0 SHL EQ PUSH2 0x76C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38AA JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x2251 SWAP1 DUP3 PUSH2 0x2A46 JUMP JUMPDEST ISZERO PUSH2 0xCB9 JUMPI PUSH2 0x225E PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0x2F8788117E7EFF1D82E926EC794901D17C78024A50270940304540A733656F0D PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0xFF AND GT DUP1 ISZERO PUSH2 0x22BA JUMPI POP PUSH1 0x3 DUP3 PUSH1 0xFF AND GT ISZERO JUMPDEST ISZERO PUSH2 0x1DD0 JUMPI POP PUSH1 0x1 PUSH2 0x64B JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x22DF SWAP1 DUP3 PUSH2 0x2A5B JUMP JUMPDEST ISZERO PUSH2 0xCB9 JUMPI PUSH2 0x22EC PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0xF6391F5C32D9C69D2A47EA670B442974B53935D1EDC7FD64EB21E047A839171B PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 DUP4 PUSH2 0x2A70 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2AB5 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2360 ADDRESS PUSH2 0x2A40 JUMP JUMPDEST ISZERO SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x237F JUMPI POP PUSH2 0x237F PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x238D JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x23A9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x23D4 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x23DC PUSH2 0x2ACD JUMP JUMPDEST PUSH2 0x23E4 PUSH2 0x2B50 JUMP JUMPDEST PUSH2 0x23ED DUP3 PUSH2 0x2BCE JUMP JUMPDEST DUP1 ISZERO PUSH2 0xCB9 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 MLOAD DUP4 SWAP3 DUP6 SWAP2 PUSH32 0xBD79B86FFE0AB8E8776151514217CD7CACD52C909F66475C3AF44E129F0B00FF SWAP2 SWAP1 LOG4 PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 PUSH1 0x2 ADD SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x627 DUP3 PUSH2 0x2330 JUMP JUMPDEST PUSH2 0x2468 DUP9 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0x2484 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4473 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x2596 JUMPI DUP8 PUSH1 0xFF AND PUSH1 0x1 EQ DUP1 PUSH2 0x24A4 JUMPI POP DUP8 PUSH1 0xFF AND PUSH1 0x2 EQ JUMPDEST ISZERO PUSH2 0x2551 JUMPI PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x24D3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x40E2 JUMP JUMPDEST PUSH2 0x24DE PUSH1 0x0 DUP12 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x24FA JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4264 JUMP JUMPDEST PUSH2 0x2512 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST DUP1 PUSH2 0x2530 JUMPI POP PUSH2 0x2530 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x254C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3D5A JUMP JUMPDEST PUSH2 0x2591 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2591 JUMPI PUSH2 0x2575 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4206 JUMP JUMPDEST PUSH2 0x2656 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x25D6 JUMPI PUSH2 0x25BA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x433D JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x2616 JUMPI PUSH2 0x25FA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C63 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2656 JUMPI PUSH2 0x263A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2656 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4085 JUMP JUMPDEST PUSH2 0x2660 PUSH1 0xCB PUSH2 0x2C65 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xCC PUSH1 0x0 PUSH2 0x2670 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 POP PUSH2 0x268A PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP2 PUSH1 0x0 ADD DUP2 SWAP1 SSTORE POP DUP9 DUP2 PUSH1 0x1 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 PUSH1 0xFF AND MUL OR SWAP1 SSTORE POP DUP11 DUP2 PUSH1 0x2 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB MUL NOT AND SWAP1 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND MUL OR SWAP1 SSTORE POP DUP10 DUP2 PUSH1 0x1 ADD PUSH1 0x1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB MUL NOT AND SWAP1 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND MUL OR SWAP1 SSTORE POP DUP7 DUP2 PUSH1 0x3 ADD DUP2 SWAP1 SSTORE POP DUP6 DUP2 PUSH1 0x4 ADD DUP2 SWAP1 SSTORE POP DUP5 DUP2 PUSH1 0x6 ADD DUP2 SWAP1 SSTORE POP TIMESTAMP DUP2 PUSH1 0x5 ADD DUP2 SWAP1 SSTORE POP DUP4 DUP2 PUSH1 0x7 ADD SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x273D SWAP3 SWAP2 SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP DUP3 MLOAD PUSH2 0x2753 SWAP1 PUSH1 0x8 DUP4 ADD SWAP1 PUSH1 0x20 DUP7 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP DUP2 MLOAD PUSH2 0x2769 SWAP1 PUSH1 0x9 DUP4 ADD SWAP1 PUSH1 0x20 DUP6 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP PUSH2 0x278E DUP12 PUSH2 0x2778 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP11 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1DD8 JUMP JUMPDEST DUP9 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2812 JUMPI PUSH1 0x2 DUP2 ADD SLOAD DUP2 SLOAD PUSH2 0x27B5 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 DUP11 PUSH2 0x1EC3 JUMP JUMPDEST DUP1 SLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x2 DUP6 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x27E8 SWAP1 DUP10 PUSH2 0x1FD9 JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x2 DUP7 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SSTORE JUMPDEST DUP1 PUSH1 0x2 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 ADD PUSH1 0x1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x99CC3EEB446560C9A2D2483BC5160735EC0FB1851AEA3BDE32E7A56C30C11DA6 DUP11 PUSH1 0xCD PUSH1 0x0 DUP7 PUSH1 0x0 ADD SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP7 PUSH1 0x2 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD DUP6 PUSH1 0x0 ADD SLOAD DUP7 PUSH1 0x1 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND DUP8 PUSH1 0x3 ADD SLOAD DUP9 PUSH1 0x4 ADD SLOAD DUP10 PUSH1 0x6 ADD SLOAD DUP11 PUSH1 0x5 ADD SLOAD DUP12 PUSH1 0x7 ADD DUP13 PUSH1 0x8 ADD DUP14 PUSH1 0x9 ADD PUSH1 0x40 MLOAD PUSH2 0x2916 SWAP12 SWAP11 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x465D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 DUP1 DUP3 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE PUSH1 0x60 SWAP2 DUP3 SWAP2 SWAP1 PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP POP SWAP1 POP DUP3 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x295E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x2981 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x2A40 JUMP JUMPDEST ISZERO PUSH2 0xC6D JUMPI PUSH1 0x40 MLOAD PUSH4 0xF23A6E61 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH4 0xF23A6E61 SWAP1 PUSH2 0x29BA SWAP1 DUP10 SWAP1 DUP10 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x36D0 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x29D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x2A04 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x2A01 SWAP2 DUP2 ADD SWAP1 PUSH2 0x350E JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x2A10 JUMPI PUSH2 0x21CC PUSH2 0x473A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xF23A6E61 PUSH1 0xE0 SHL EQ PUSH2 0x76C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38AA JUMP JUMPDEST EXTCODESIZE ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2C6E JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2CB8 JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP3 LT PUSH2 0x2A93 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3868 JUMP JUMPDEST DUP3 PUSH1 0x0 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x2AA2 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2AE6 JUMPI POP PUSH2 0x2AE6 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2AF4 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2B10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2B3B JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST DUP1 ISZERO PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2B69 JUMPI POP PUSH2 0x2B69 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2B77 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2B93 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2BBE JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x2B3B PUSH4 0x1FFC9A7 PUSH1 0xE0 SHL PUSH2 0x2D7E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2BE7 JUMPI POP PUSH2 0x2BE7 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2BF5 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2C11 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2C3C JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x2C45 DUP3 PUSH2 0x2DCD JUMP JUMPDEST PUSH2 0x2C55 PUSH4 0x6CDB3D13 PUSH1 0xE1 SHL PUSH2 0x2D7E JUMP JUMPDEST PUSH2 0x23ED PUSH4 0x3A24D07 PUSH1 0xE2 SHL PUSH2 0x2D7E JUMP JUMPDEST DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2C7A DUP4 DUP4 PUSH2 0x2AB5 JUMP JUMPDEST PUSH2 0x2CB0 JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP2 DUP2 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP5 SWAP1 SSTORE DUP5 SLOAD DUP5 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x627 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x627 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x2D74 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x2CEB JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP DUP1 DUP8 PUSH1 0x0 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x2D08 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SWAP3 SWAP1 SWAP3 SSTORE DUP3 DUP2 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0x2D38 JUMPI INVALID JUMPDEST PUSH1 0x1 SWAP1 SUB DUP2 DUP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 SWAP1 SSTORE SWAP1 SSTORE DUP7 PUSH1 0x1 ADD PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SSTORE PUSH1 0x1 SWAP5 POP POP POP POP POP PUSH2 0x627 JUMP JUMPDEST PUSH1 0x0 SWAP2 POP POP PUSH2 0x627 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 DUP3 AND EQ ISZERO PUSH2 0x2DA8 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x39D5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x33 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST DUP1 MLOAD PUSH2 0xCB9 SWAP1 PUSH1 0x67 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH2 0x160 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0xFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x2E90 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x2EBD JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x2EBD JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x2EBD JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x2EA2 JUMP JUMPDEST POP PUSH2 0x2EC9 SWAP3 SWAP2 POP PUSH2 0x2ECD JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x2EC9 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x2ECE JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x627 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x2F09 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x2F1C PUSH2 0x2F17 DUP3 PUSH2 0x4708 JUMP JUMPDEST PUSH2 0x46E1 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x2F3D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x2F5C JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x2F40 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x2F77 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2F8D JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x2FA0 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x46E1 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x2FB7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x627 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2FF2 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x1351 DUP4 DUP4 PUSH2 0x2EE2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x300E JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x3018 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH2 0x3027 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x3047 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0x3052 DUP2 PUSH2 0x47DF JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD PUSH2 0x3062 DUP2 PUSH2 0x47DF JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x307E JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x308A DUP10 DUP4 DUP11 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x309F JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x30AB DUP10 DUP4 DUP11 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x30C0 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x30CD DUP9 DUP3 DUP10 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 SWAP1 SWAP4 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x30F1 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x30FB DUP8 DUP8 PUSH2 0x2EE2 JUMP JUMPDEST SWAP5 POP PUSH2 0x310A DUP8 PUSH1 0x20 DUP9 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD SWAP2 POP PUSH1 0x80 DUP7 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x3133 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x30CD DUP9 DUP3 DUP10 ADD PUSH2 0x2F67 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x140 DUP12 DUP14 SUB SLT ISZERO PUSH2 0x315E JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x3168 DUP13 DUP13 PUSH2 0x2EE2 JUMP JUMPDEST SWAP10 POP PUSH2 0x3177 DUP13 PUSH1 0x20 DUP14 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP9 POP PUSH2 0x3186 DUP13 PUSH1 0x40 DUP14 ADD PUSH2 0x2FD0 JUMP JUMPDEST SWAP8 POP PUSH1 0x60 DUP12 ADD CALLDATALOAD SWAP7 POP PUSH1 0x80 DUP12 ADD CALLDATALOAD SWAP6 POP PUSH1 0xA0 DUP12 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 DUP12 ADD CALLDATALOAD SWAP4 POP PUSH1 0xE0 DUP12 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x31BE JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x31CA DUP15 DUP4 DUP16 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP5 POP PUSH2 0x100 DUP14 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x31E0 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x31EC DUP15 DUP4 DUP16 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP4 POP PUSH2 0x120 DUP14 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3202 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x320F DUP14 DUP3 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP12 SWAP2 SWAP5 SWAP8 SWAP11 POP SWAP3 SWAP6 SWAP9 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3233 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x323D DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x3251 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x326E JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3278 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x329A JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x32A4 DUP6 DUP6 PUSH2 0x2EE2 JUMP JUMPDEST SWAP6 PUSH1 0x20 DUP6 ADD CALLDATALOAD SWAP6 POP PUSH1 0x40 SWAP1 SWAP5 ADD CALLDATALOAD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x32CB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x32D5 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH2 0x3027 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x2FD0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x120 DUP11 DUP13 SUB SLT ISZERO PUSH2 0x3302 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x330C DUP12 DUP12 PUSH2 0x2EE2 JUMP JUMPDEST SWAP9 POP PUSH2 0x331B DUP12 PUSH1 0x20 DUP13 ADD PUSH2 0x2FD0 JUMP JUMPDEST SWAP8 POP PUSH1 0x40 DUP11 ADD CALLDATALOAD SWAP7 POP PUSH1 0x60 DUP11 ADD CALLDATALOAD SWAP6 POP PUSH1 0x80 DUP11 ADD CALLDATALOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD CALLDATALOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x3353 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x335F DUP14 DUP4 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP5 POP PUSH1 0xE0 DUP13 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3374 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x3380 DUP14 DUP4 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP4 POP PUSH2 0x100 DUP13 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3396 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x33A3 DUP13 DUP3 DUP14 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x33C5 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x33DC JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x33EF JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x33FD PUSH2 0x2F17 DUP3 PUSH2 0x4708 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP11 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x341D JUMPI DUP9 DUP10 REVERT JUMPDEST DUP9 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x3447 JUMPI PUSH2 0x3433 DUP12 DUP3 PUSH2 0x2EE2 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x3421 JUMP JUMPDEST POP SWAP1 SWAP7 POP DUP8 ADD CALLDATALOAD SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x345E JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x346B DUP6 DUP3 DUP7 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3486 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x1351 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34A6 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x34BF JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x3251 DUP2 PUSH2 0x47DF JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x34E3 JUMPI DUP2 DUP3 REVERT JUMPDEST POP POP DUP1 CALLDATALOAD SWAP3 PUSH1 0x20 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3503 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1351 DUP2 PUSH2 0x47F4 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x351F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1351 DUP2 PUSH2 0x47F4 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x353B JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x357E JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3562 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x35AE JUMPI PUSH1 0x20 DUP2 DUP6 ADD DUP2 ADD MLOAD DUP7 DUP4 ADD DUP3 ADD MSTORE ADD PUSH2 0x3592 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x35BF JUMPI DUP3 PUSH1 0x20 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 AND PUSH1 0x0 DUP2 EQ PUSH2 0x35F2 JUMPI PUSH1 0x1 DUP2 EQ PUSH2 0x3610 JUMPI PUSH2 0x364E JUMP JUMPDEST PUSH1 0x2 DUP4 DIV PUSH1 0x7F AND DUP7 MSTORE PUSH1 0xFF NOT DUP4 AND PUSH1 0x20 DUP8 ADD MSTORE PUSH1 0x40 DUP7 ADD SWAP4 POP PUSH2 0x364E JUMP JUMPDEST PUSH1 0x2 DUP4 DIV DUP1 DUP8 MSTORE PUSH2 0x3620 DUP7 PUSH2 0x4728 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x3644 JUMPI DUP2 SLOAD PUSH1 0x20 DUP3 DUP12 ADD ADD MSTORE DUP5 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x3623 JUMP JUMPDEST DUP9 ADD PUSH1 0x20 ADD SWAP6 POP POP POP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 DUP2 AND DUP3 MSTORE DUP6 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0xA0 PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x369E SWAP1 DUP4 ADD DUP7 PUSH2 0x354F JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x36B0 DUP2 DUP7 PUSH2 0x354F JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x80 DUP5 ADD MSTORE PUSH2 0x36C4 DUP2 DUP6 PUSH2 0x3589 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 DUP2 AND DUP3 MSTORE DUP6 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP2 ADD DUP5 SWAP1 MSTORE PUSH1 0x60 DUP2 ADD DUP4 SWAP1 MSTORE PUSH1 0xA0 PUSH1 0x80 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x370A SWAP1 DUP4 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1351 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x354F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x3754 PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x354F JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x3766 DUP2 DUP6 PUSH2 0x354F JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP5 ISZERO ISZERO DUP6 MSTORE SWAP3 ISZERO ISZERO PUSH1 0x20 DUP6 ADD MSTORE SWAP1 ISZERO ISZERO PUSH1 0x40 DUP5 ADD MSTORE ISZERO ISZERO PUSH1 0x60 DUP4 ADD MSTORE ISZERO ISZERO PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1351 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x34 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E7366657220746F206E6F6E2045524331313535 PUSH1 0x40 DUP3 ADD MSTORE PUSH20 0x2932B1B2B4BB32B91034B6B83632B6B2B73A32B9 PUSH1 0x61 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x35 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A69737375654F6E426568616C663A2063616C6C206D7573742063 PUSH1 0x40 DUP3 ADD MSTORE PUSH21 0x37B6B290333937B6902220A79037B91030B236B4B7 PUSH1 0x59 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x22 SWAP1 DUP3 ADD MSTORE PUSH32 0x456E756D657261626C655365743A20696E646578206F7574206F6620626F756E PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x6473 PUSH1 0xF0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A204552433131353552656365697665722072656A65637465 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x6420746F6B656E73 PUSH1 0xC0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2F SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2073656E646572206D75737420626520616E PUSH1 0x40 DUP3 ADD MSTORE PUSH15 0x818591B5A5B881D1BC819DC985B9D PUSH1 0x8A SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6F6E6C794465616C65723A206D73672E73656E646572206E6F74 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x1030903232B0B632B9 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2B SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2062616C616E636520717565727920666F7220746865207A PUSH1 0x40 DUP3 ADD MSTORE PUSH11 0x65726F2061646472657373 PUSH1 0xA8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1C SWAP1 DUP3 ADD MSTORE PUSH32 0x4552433136353A20696E76616C696420696E7465726661636520696400000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265746972653A20746F6B656E496420646F6573206E6F742065 PUSH1 0x40 DUP3 ADD MSTORE PUSH4 0x1E1A5CDD PUSH1 0xE2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1B SWAP1 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x22 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6D696E743A20746F6B656E496420646F6573206E6F7420657869 PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x1CDD PUSH1 0xF2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A756E72656769737465724465616C65723A20746F6B656E547970 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x19525908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x72 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2063616C6C6572206973206E6F74206F776E6572206E6F72 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x8185C1C1C9BDD9959 PUSH1 0xBA SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x46 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A756E7265676973746572436F6E73756D6572286C696D69746564 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x293A206F6E6C792061646D696E2063616E20756E726567697374657220636F6E PUSH1 0x60 DUP3 ADD MSTORE PUSH6 0x73756D657273 PUSH1 0xD0 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2A SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A676574546F6B656E547970653A20746F6B656E496420646F6573 PUSH1 0x40 DUP3 ADD MSTORE PUSH10 0x81B9BDD08195E1A5CDD PUSH1 0xB2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6F6E6C7941646D696E3A206D73672E73656E646572206E6F7420 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x3A34329030B236B4B7 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x33 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH19 0x3A32B932B21037B33339B2BA103232B0B632B9 PUSH1 0x69 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2073656E646572206D75737420626520616E PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x2061646D696E20746F207265766F6B65 PUSH1 0x80 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x34 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265746972653A206E6F7420656E6F75676820617661696C6162 PUSH1 0x40 DUP3 ADD MSTORE PUSH20 0x6C652062616C616E636520746F20726574697265 PUSH1 0x60 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x37 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A2070726F706F73657220 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6E6F7420612072656769737465726564206465616C6572000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x25 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E7366657220746F20746865207A65726F206164 PUSH1 0x40 DUP3 ADD MSTORE PUSH5 0x6472657373 PUSH1 0xD8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E736665722063616C6C6572206973206E6F7420 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x1BDDDB995C881B9BDC88185C1C1C9BDD9959 PUSH1 0x72 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2E SWAP1 DUP3 ADD MSTORE PUSH32 0x496E697469616C697A61626C653A20636F6E747261637420697320616C726561 PUSH1 0x40 DUP3 ADD MSTORE PUSH14 0x191E481A5B9A5D1A585B1A5E9959 PUSH1 0x92 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x23 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206275726E2066726F6D20746865207A65726F2061646472 PUSH1 0x40 DUP3 ADD MSTORE PUSH3 0x657373 PUSH1 0xE8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x36 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7472616E736665723A2073656E64657220616E64207265636569 PUSH1 0x40 DUP3 ADD MSTORE PUSH22 0x7665722063616E6E6F74206265207468652073616D65 PUSH1 0x50 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6D696E743A2063616E6E6F74206D696E74206E657720746F6B65 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x6E7320696E206C696D69746564206D6F6465 PUSH1 0x70 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A72656769737465724465616C65723A20746F6B656E5479706549 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x1908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x82 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x26 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7472616E736665723A20746F6B656E496420646F6573206E6F74 PUSH1 0x40 DUP3 ADD MSTORE PUSH6 0x8195E1A5CDD PUSH1 0xD2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x42 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265676973746572436F6E73756D6572286C696D69746564293A PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x206F6E6C792061646D696E2063616E20726567697374657220636F6E73756D65 PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0x7273 PUSH1 0xF0 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x37 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x746572656420656D697373696F6E732061756469746F72000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2E SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A206D73672E73656E6465 PUSH1 0x40 DUP3 ADD MSTORE PUSH14 0x72206E6F742074696D656C6F636B PUSH1 0x90 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x33 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A676574546F6B656E52657469726564416D6F756E743A20746F6B PUSH1 0x40 DUP3 ADD MSTORE PUSH19 0x195B925908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x6A SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x58 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6265666F7265546F6B656E5472616E73666572286C696D6974 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6564293A206F6E6C7920656D697373696F6E732061756469746F72732063616E PUSH1 0x60 DUP3 ADD MSTORE PUSH32 0x206973737565206175646974656420656D697373696F6E730000000000000000 PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x40 SWAP1 DUP3 ADD DUP2 SWAP1 MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A20697373756572206E6F SWAP1 DUP3 ADD MSTORE PUSH32 0x742061207265676973746572656420656D697373696F6E732061756469746F72 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x27 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A20697373756565206E6F PUSH1 0x40 DUP3 ADD MSTORE PUSH7 0x3A1030B236B4B7 PUSH1 0xC9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2073657474696E6720617070726F76616C20737461747573 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x103337B91039B2B633 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206163636F756E747320616E6420696473206C656E677468 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x40DAD2E6DAC2E8C6D PUSH1 0xBB SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x3A32B932B2102922A1903232B0B632B9 PUSH1 0x81 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2069647320616E6420616D6F756E7473206C656E67746820 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0xDAD2E6DAC2E8C6D PUSH1 0xC3 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x21 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206D696E7420746F20746865207A65726F20616464726573 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x73 PUSH1 0xF8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3D SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A636F6E73756D65724F724465616C65723A206D73672E73656E64 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6572206E6F74206120636F6E73756D6572206F722061206465616C6572000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20746F6B656E54797065496420697320696E76 PUSH1 0x40 DUP3 ADD MSTORE PUSH4 0x185B1A59 PUSH1 0xE2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2F SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2063616E206F6E6C792072656E6F756E6365 PUSH1 0x40 DUP3 ADD MSTORE PUSH15 0x103937B632B9903337B91039B2B633 PUSH1 0x89 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x4B SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6265666F7265546F6B656E5472616E73666572286C696D6974 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6564293A206F6E6C792061646D696E20616E642044414F2063616E207472616E PUSH1 0x60 DUP3 ADD MSTORE PUSH11 0x7366657220746F6B656E73 PUSH1 0xA8 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x20 DUP4 ADD MLOAD PUSH2 0x4596 PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x3657 JUMP JUMPDEST POP PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0x45A9 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x3542 JUMP JUMPDEST POP PUSH1 0x60 DUP4 ADD MLOAD PUSH2 0x45BC PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x3542 JUMP JUMPDEST POP PUSH1 0x80 DUP4 ADD MLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0xE0 DUP4 ADD MLOAD PUSH2 0x100 DUP2 DUP2 DUP6 ADD MSTORE DUP1 DUP6 ADD MLOAD SWAP2 POP POP PUSH2 0x160 PUSH2 0x120 DUP2 DUP2 DUP7 ADD MSTORE PUSH2 0x4608 PUSH2 0x180 DUP7 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP3 POP DUP1 DUP7 ADD MLOAD SWAP1 POP PUSH1 0x1F NOT PUSH2 0x140 DUP2 DUP8 DUP7 SUB ADD DUP2 DUP9 ADD MSTORE PUSH2 0x4629 DUP6 DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP1 DUP9 ADD MLOAD DUP8 DUP3 SUB SWAP1 SWAP3 ADD DUP5 DUP9 ADD MSTORE SWAP4 POP SWAP1 POP PUSH2 0x4645 DUP4 DUP3 PUSH2 0x3589 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x160 DUP14 DUP4 MSTORE DUP13 PUSH1 0x20 DUP5 ADD MSTORE DUP12 PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0xFF DUP12 AND PUSH1 0x60 DUP5 ADD MSTORE DUP10 PUSH1 0x80 DUP5 ADD MSTORE DUP9 PUSH1 0xA0 DUP5 ADD MSTORE DUP8 PUSH1 0xC0 DUP5 ADD MSTORE DUP7 PUSH1 0xE0 DUP5 ADD MSTORE DUP1 PUSH2 0x100 DUP5 ADD MSTORE PUSH2 0x46A5 DUP2 DUP5 ADD DUP8 PUSH2 0x35D4 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH2 0x120 DUP5 ADD MSTORE PUSH2 0x46BA DUP2 DUP7 PUSH2 0x35D4 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH2 0x140 DUP5 ADD MSTORE PUSH2 0x46CF DUP2 DUP6 PUSH2 0x35D4 JUMP JUMPDEST SWAP15 SWAP14 POP POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x4700 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x471E JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST PUSH1 0xE0 SHR SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x44 RETURNDATASIZE LT ISZERO PUSH2 0x474A JUMPI PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x4 DUP2 DUP3 RETURNDATACOPY PUSH4 0x8C379A0 PUSH2 0x475E DUP3 MLOAD PUSH2 0x4734 JUMP JUMPDEST EQ PUSH2 0x4768 JUMPI PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x3 NOT ADD PUSH1 0x4 DUP3 RETURNDATACOPY DUP1 MLOAD RETURNDATASIZE PUSH8 0xFFFFFFFFFFFFFFFF DUP2 PUSH1 0x24 DUP5 ADD GT DUP2 DUP5 GT OR ISZERO PUSH2 0x4798 JUMPI POP POP POP POP PUSH2 0x1100 JUMP JUMPDEST DUP3 DUP5 ADD SWAP3 POP DUP3 MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x47B2 JUMPI POP POP POP POP PUSH2 0x1100 JUMP JUMPDEST POP RETURNDATASIZE DUP4 ADD PUSH1 0x20 DUP3 DUP5 ADD ADD GT ISZERO PUSH2 0x47CA JUMPI POP POP POP PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 REVERT INVALID GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH3 0x75726E KECCAK256 PUSH2 0x6D6F PUSH22 0x6E7420657863656564732062616C616E6365EDE6574D 0xEB 0xA8 CREATE 0x2A 0xDA PUSH25 0x88448A497B08844D62E044ED533343A673BE3FFCDE5F5E1AA5 SELFBALANCE 0xD3 0xDA 0xDE DUP13 PUSH9 0xB013A47AD41C2BCC9B SWAP15 0x4B SMOD PUSH6 0xB0FB616780E1 JUMPI DUP7 0xE7 PUSH11 0xF8890EEDD7900AD88DA619 0x2F 0xD0 RETURNDATASIZE 0xBB PUSH10 0xDBEEE963B1A0ED738ABE 0x49 0xAB CALLER BALANCE 0xAA RETURN GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH10 0x6E73756666696369656E PUSH21 0x2062616C616E636520666F72207472616E73666572 0x2A 0xB9 CALL 0xDA SWAP3 0xE7 0x4A 0xAA ADD 0xEB PUSH22 0xA871557505B11DD8D36832A34BB21BBEE88B08D860E9 PUSH30 0xAD3DBE5042E7384B1572CF966A15E089576A62B5126C5EF1D184AB18B12C LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x5F ADD RETURN 0xA6 SWAP1 PUSH5 0xAD53CE9212 JUMPI MSIZE PUSH26 0x9DDED2745CBAE7146E4576954E91B333C95664736F6C63430007 STOP STOP CALLER ", - "sourceMap": "602:21550:14:-:0;;;;;;;;;;;;;;;;;;;" - }, - "deployedBytecode": { - "immutableReferences": {}, - "linkReferences": {}, - "object": "608060405234801561001057600080fd5b50600436106102735760003560e01c80637f157c9b11610151578063ce6ccfaf116100c3578063e985e9c511610087578063e985e9c514610575578063f000be9814610588578063f242432a1461059b578063f851a440146105ae578063fcba7948146105b6578063fd0c4a9a146105be57610273565b8063ce6ccfaf14610510578063d547741f14610534578063dba851b014610547578063ddc3e6eb1461054f578063e2e564f21461056257610273565b8063a217fddf11610115578063a217fddf1461049c578063a22cb465146104a4578063bdacb303146104b7578063c1e03728146104ca578063c4d66de8146104ea578063ca15c873146104fd57610273565b80637f157c9b146104225780639010d07c1461044357806391d148541461046357806392089c4614610476578063a0d975a71461048957610273565b806331aa4b20116101ea57806353dbe982116101ae57806353dbe982146103d15780635ddb368f146103e457806369f7ef44146103ec57806376aed2e1146103ff57806376ce47551461041257806378e5c5921461041a57610273565b806331aa4b201461036557806333781a0e1461037857806336568abe1461038b57806344b22fdd1461039e5780634e1273f4146103b157610273565b806318a50d7e1161023c57806318a50d7e146103095780631ef68ef714610311578063248a9ca314610319578063293a7f2e1461032c5780632eb2c2d61461033f5780632f2ff15d1461035257610273565b8062fdd58e1461027857806301ffc9a7146102a1578063095bcdb6146102c15780630e89341c146102d6578063156e29f6146102f6575b600080fd5b61028b61028636600461325c565b6105d1565b60405161029891906137a3565b60405180910390f35b6102b46102af3660046134f2565b61062d565b604051610298919061376f565b6102d46102cf366004613286565b610650565b005b6102e96102e4366004613495565b610775565b60405161029891906137ac565b6102d4610304366004613286565b61080d565b61028b61089c565b61028b6108ae565b61028b610327366004613495565b6108c0565b6102d461033a3660046134d1565b6108d5565b6102d461034d366004613030565b610a56565b6102d46103603660046134ad565b610c75565b6102d46103733660046132b9565b610cbd565b6102b4610386366004612fe1565b610dbe565b6102d46103993660046134ad565b610dd8565b6102d46103ac366004612fe1565b610e1a565b6103c46103bf3660046133b3565b610f1f565b604051610298919061372e565b6102d46103df366004612fe1565b610fec565b61028b6110f1565b6102b46103fa366004612fe1565b611103565b6102e961040d366004613495565b611185565b61028b61127e565b61028b611290565b61043561043036600461325c565b6112a2565b60405161029892919061464f565b6104566104513660046134d1565b611339565b604051610298919061365e565b6102b46104713660046134ad565b611358565b610456610484366004613495565b611370565b61028b61049736600461325c565b611393565b61028b6113e2565b6102d46104b2366004613221565b6113e7565b6102d46104c5366004612fe1565b6114b5565b6104dd6104d8366004613495565b6114fe565b6040516102989190614577565b6102d46104f8366004612fe1565b61173e565b61028b61050b366004613495565b61189e565b61052361051e366004612fe1565b6118b5565b60405161029895949392919061377a565b6102d46105423660046134ad565b611949565b6102b4611983565b6102d461055d366004613475565b61198c565b6102d46105703660046132b9565b6119c6565b6102b4610583366004612ffc565b611ad4565b6102d461059636600461313f565b611b02565b6102d46105a93660046130da565b611b5b565b610456611cef565b61028b611d03565b6102d46105cc3660046132e4565b611d15565b60006001600160a01b0383166106025760405162461bcd60e51b81526004016105f99061398a565b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b600061066a60008051602061484f83398151915233611358565b905060006106866000805160206148b983398151915233611358565b905060006106a260008051602061482f83398151915233611358565b905060006106be6000805160206148d983398151915233611358565b905083806106c95750825b806106d15750815b806106d95750805b6106f55760405162461bcd60e51b81526004016105f990614416565b6106fe86611db6565b61071a5760405162461bcd60e51b81526004016105f990613fd7565b336001600160a01b03881614156107435760405162461bcd60e51b81526004016105f990613edf565b61076c33888888604051806040016040528060048152602001630307830360e41b815250611b5b565b50505050505050565b60678054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50505050509050919050565b610818600033611358565b6108345760405162461bcd60e51b81526004016105f990613c1a565b61083d82611db6565b6108595760405162461bcd60e51b81526004016105f990613a87565b60c95460ff161561087c5760405162461bcd60e51b81526004016105f990613f35565b61089783838360405180602001604052806000815250611dd8565b505050565b60008051602061486f83398151915281565b60008051602061482f83398151915281565b60009081526097602052604090206002015490565b60006108ef60008051602061484f83398151915233611358565b9050600061090b6000805160206148b983398151915233611358565b9050600061092760008051602061482f83398151915233611358565b905060006109436000805160206148d983398151915233611358565b9050838061094e5750825b806109565750815b8061095e5750805b61097a5760405162461bcd60e51b81526004016105f990614416565b61098386611db6565b61099f5760405162461bcd60e51b81526004016105f990613a0c565b6109a933876105d1565b8511156109c85760405162461bcd60e51b81526004016105f990613d06565b6109d3338787611ec3565b600086815260cd602090815260408083203384529091529020546109f79086611fd9565b600087815260cd602090815260408083203380855292529182902092909255517f8f1b5ebb586d3d169e4ed07db9cd10ce0dd30c7b656171310eae7517c0b53cf990610a46908990899061464f565b60405180910390a2505050505050565b8151835114610a775760405162461bcd60e51b81526004016105f99061438d565b6001600160a01b038416610a9d5760405162461bcd60e51b81526004016105f990613db7565b610aa5611ffe565b6001600160a01b0316856001600160a01b03161480610acb5750610acb85610583611ffe565b610ae75760405162461bcd60e51b81526004016105f990613dfc565b6000610af1611ffe565b9050610b01818787878787612002565b60005b8451811015610c07576000858281518110610b1b57fe5b602002602001015190506000858381518110610b3357fe5b60200260200101519050610ba0816040518060600160405280602a815260200161488f602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020546120ff9092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a1681522054610bd79082611fd9565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610b04565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c57929190613741565b60405180910390a4610c6d81878787878761212b565b505050505050565b600082815260976020526040902060020154610c9390610471611ffe565b610caf5760405162461bcd60e51b81526004016105f9906138f2565b610cb98282612239565b5050565b610cc8600033611358565b610ce45760405162461bcd60e51b81526004016105f990613c1a565b610ced816122a2565b610d095760405162461bcd60e51b81526004016105f990613f87565b8060ff1660011415610d3257610d2d6000805160206148b983398151915283610c75565b610d6e565b8060ff1660021415610d5657610d2d60008051602061482f83398151915283610c75565b610d6e6000805160206148d983398151915283610c75565b610d8660008051602061486f83398151915283610c75565b6040516001600160a01b038316907fa8377deee15954185683d55effd369508b4935978c8cb2bab790bf04c570181490600090a25050565b600061062760008051602061484f83398151915283611358565b610de0611ffe565b6001600160a01b0316816001600160a01b031614610e105760405162461bcd60e51b81526004016105f9906144b7565b610cb982826122c7565b6000610e346000805160206148b983398151915233611358565b90506000610e5060008051602061482f83398151915233611358565b90506000610e6c6000805160206148d983398151915233611358565b90508280610e775750815b80610e7f5750805b610e9b5760405162461bcd60e51b81526004016105f990613941565b60c95460ff1615610ecd57610eb1600033611358565b610ecd5760405162461bcd60e51b81526004016105f99061401d565b610ee560008051602061484f83398151915285610c75565b6040516001600160a01b038516907f69a0adee259d26fe61f4776f7bea7f3a9737c7321256821b985f988545efd31990600090a250505050565b60608151835114610f425760405162461bcd60e51b81526004016105f9906142f4565b6060835167ffffffffffffffff81118015610f5c57600080fd5b50604051908082528060200260200182016040528015610f86578160200160208202803683370190505b50905060005b8451811015610fe457610fc5858281518110610fa457fe5b6020026020010151858381518110610fb857fe5b60200260200101516105d1565b828281518110610fd157fe5b6020908102919091010152600101610f8c565b509392505050565b60006110066000805160206148b983398151915233611358565b9050600061102260008051602061482f83398151915233611358565b9050600061103e6000805160206148d983398151915233611358565b905082806110495750815b806110515750805b61106d5760405162461bcd60e51b81526004016105f990613941565b60c95460ff161561109f57611083600033611358565b61109f5760405162461bcd60e51b81526004016105f990613b64565b6110b760008051602061484f83398151915285611949565b6040516001600160a01b038516907f03a38088da75ee2d80f6c753f55f8fd17602ae17d8bd0ef44d5e1f28ab5af11f90600090a250505050565b60006110fd60cb612330565b90505b90565b60008061111e6000805160206148b983398151915284611358565b9050600061113a60008051602061482f83398151915285611358565b905060006111566000805160206148d983398151915286611358565b905082806111615750815b806111695750805b1561117a576001935050505061064b565b506000949350505050565b606061119082611db6565b6111ac5760405162461bcd60e51b81526004016105f990613bd0565b600082815260cc6020526040902060018082015460ff16141561120457505060408051808201909152601c81527f52656e657761626c6520456e6572677920436572746966696361746500000000602082015261064b565b600181015460ff166002141561124f57505060408051808201909152601781527f436172626f6e20456d697373696f6e73204f6666736574000000000000000000602082015261064b565b50506040805180820190915260118152704175646974656420456d697373696f6e7360781b6020820152919050565b6000805160206148d983398151915281565b60008051602061484f83398151915281565b60008060006112b185856105d1565b60405163a0d975a760e01b8152909150600090309063a0d975a7906112dc9089908990600401613715565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c919061352a565b9196919550909350505050565b60008281526097602052604081206113519083612334565b9392505050565b60008281526097602052604081206113519083612340565b600090815260cc602052604090206001015461010090046001600160a01b031690565b600061139e82611db6565b6113ba5760405162461bcd60e51b81526004016105f990614130565b50600090815260cd602090815260408083206001600160a01b03949094168352929052205490565b600081565b816001600160a01b03166113f9611ffe565b6001600160a01b031614156114205760405162461bcd60e51b81526004016105f9906142ab565b806066600061142d611ffe565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611471611ffe565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114a9919061376f565b60405180910390a35050565b6114c0600033611358565b6114dc5760405162461bcd60e51b81526004016105f990613c1a565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b611506612de0565b600082815260cc60209081526040918290208251610160810184528154815260018083015460ff811683860152610100908190046001600160a01b0390811684880152600280860154909116606085015260038501546080850152600485015460a0850152600585015460c0850152600685015460e08501526007850180548851948116158402600019011691909104601f81018790048702840187019097528683529295939490860193919291908301828280156116065780601f106115db57610100808354040283529160200191611606565b820191906000526020600020905b8154815290600101906020018083116115e957829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561169a5780601f1061166f5761010080835404028352916020019161169a565b820191906000526020600020905b81548152906001019060200180831161167d57829003601f168201915b505050918352505060098201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050815250509050919050565b600054610100900460ff16806117575750611757612355565b80611765575060005460ff16155b6117815760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156117ac576000805460ff1961ff0019909116610100171660011790555b6117c460405180602001604052806000815250612366565b6117ea60008051602061484f83398151915260008051602061486f833981519152612402565b6117f5600083610caf565b61180d60008051602061486f83398151915283610caf565b6118256000805160206148b983398151915283610caf565b61183d60008051602061482f83398151915283610caf565b6118556000805160206148d983398151915283610caf565b60c9805460ca80546001600160a01b0319169055610100600160a81b0319166101006001600160a01b038516021760ff191690558015610cb9576000805461ff00191690555050565b600081815260976020526040812061062790612454565b600080808080806118c68188611358565b905060006118e26000805160206148b983398151915289611358565b905060006118fe60008051602061482f8339815191528a611358565b9050600061191a6000805160206148d98339815191528b611358565b9050600061193660008051602061484f8339815191528c611358565b949b939a50919850965091945092505050565b60008281526097602052604090206002015461196790610471611ffe565b610e105760405162461bcd60e51b81526004016105f990613cb6565b60c95460ff1681565b611997600033611358565b6119b35760405162461bcd60e51b81526004016105f990613c1a565b60c9805460ff1916911515919091179055565b6119d1600033611358565b6119ed5760405162461bcd60e51b81526004016105f990613c1a565b6119f6816122a2565b611a125760405162461bcd60e51b81526004016105f990613ac9565b8060ff1660011415611a3b57611a366000805160206148b983398151915283611949565b611a77565b8060ff1660021415611a5f57611a3660008051602061482f83398151915283611949565b611a776000805160206148d983398151915283611949565b611a8082611103565b611a9c57611a9c60008051602061486f83398151915283611949565b6040516001600160a01b038316907f98552ded770f1d05a505572f3387c108dbc6b566ea3d49f83cff3d1f1c72a04290600090a25050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b60ca546001600160a01b0316331480611b215750611b21600033611358565b611b3d5760405162461bcd60e51b81526004016105f990613813565b611b4f8a8a8a8a8a8a8a8a8a8a61245f565b50505050505050505050565b6001600160a01b038416611b815760405162461bcd60e51b81526004016105f990613db7565b611b89611ffe565b6001600160a01b0316856001600160a01b03161480611baf5750611baf85610583611ffe565b611bcb5760405162461bcd60e51b81526004016105f990613b1b565b6000611bd5611ffe565b9050611bf5818787611be68861292b565b611bef8861292b565b87612002565b611c3c836040518060600160405280602a815260200161488f602a913960008781526065602090815260408083206001600160a01b038d16845290915290205491906120ff565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054611c739084611fd9565b60008581526065602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188811691908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611cd9908990899061464f565b60405180910390a4610c6d81878787878761296f565b60c95461010090046001600160a01b031681565b6000805160206148b983398151915281565b6000611d2f6000805160206148b983398151915233611358565b90506000611d4b60008051602061482f83398151915233611358565b90506000611d676000805160206148d983398151915233611358565b90508280611d725750815b80611d7a5750805b611d965760405162461bcd60e51b81526004016105f990613941565b611da88c338d8d8d8d8d8d8d8d61245f565b505050505050505050505050565b600081611dc360cb612330565b10611dd05750600161064b565b506000919050565b6001600160a01b038416611dfe5760405162461bcd60e51b81526004016105f9906143d5565b6000611e08611ffe565b9050611e1a81600087611be68861292b565b60008481526065602090815260408083206001600160a01b0389168452909152902054611e479084611fd9565b60008581526065602090815260408083206001600160a01b03808b16808652919093528184209490945551908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611ea5908990899061464f565b60405180910390a4611ebc8160008787878761296f565b5050505050565b6001600160a01b038316611ee95760405162461bcd60e51b81526004016105f990613e9c565b6000611ef3611ffe565b9050611f2381856000611f058761292b565b611f0e8761292b565b60405180602001604052806000815250612002565b611f6a8260405180606001604052806024815260200161480b6024913960008681526065602090815260408083206001600160a01b038b16845290915290205491906120ff565b60008481526065602090815260408083206001600160a01b03808a16808652919093528184209490945551919291908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611fcb908890889061464f565b60405180910390a450505050565b6000828201838110156113515760405162461bcd60e51b81526004016105f990613a50565b3390565b612010868686868686610c6d565b60005b835181101561076c57600060cc600086848151811061202e57fe5b60200260200101518152602001908152602001600020905060c960009054906101000a900460ff16156120f5576001600160a01b03861661206f57506120f7565b600181015460ff166003146120c15760ca546001600160a01b03898116911614806120a057506120a0600089611358565b6120bc5760405162461bcd60e51b81526004016105f990614506565b6120f5565b6120d96000805160206148d983398151915289611358565b6120f55760405162461bcd60e51b81526004016105f990614183565b505b600101612013565b600081848411156121235760405162461bcd60e51b81526004016105f991906137ac565b505050900390565b61213d846001600160a01b0316612a40565b15610c6d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121769089908990889088908890600401613672565b602060405180830381600087803b15801561219057600080fd5b505af19250505080156121c0575060408051601f3d908101601f191682019092526121bd9181019061350e565b60015b612209576121cc61473a565b806121d757506121f1565b8060405162461bcd60e51b81526004016105f991906137ac565b60405162461bcd60e51b81526004016105f9906137bf565b6001600160e01b0319811663bc197c8160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b60008281526097602052604090206122519082612a46565b15610cb95761225e611ffe565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000808260ff161180156122ba575060038260ff1611155b15611dd05750600161064b565b60008281526097602052604090206122df9082612a5b565b15610cb9576122ec611ffe565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b5490565b60006113518383612a70565b6000611351836001600160a01b038416612ab5565b600061236030612a40565b15905090565b600054610100900460ff168061237f575061237f612355565b8061238d575060005460ff16155b6123a95760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156123d4576000805460ff1961ff0019909116610100171660011790555b6123dc612acd565b6123e4612b50565b6123ed82612bce565b8015610cb9576000805461ff00191690555050565b600082815260976020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526097602052604090912060020155565b600061062782612330565b612468886122a2565b6124845760405162461bcd60e51b81526004016105f990614473565b60c95460ff1615612596578760ff16600114806124a457508760ff166002145b156125515760ca546001600160a01b031633146124d35760405162461bcd60e51b81526004016105f9906140e2565b6124de60008b611358565b6124fa5760405162461bcd60e51b81526004016105f990614264565b6125126000805160206148b98339815191528a611358565b80612530575061253060008051602061482f8339815191528a611358565b61254c5760405162461bcd60e51b81526004016105f990613d5a565b612591565b8760ff1660031415612591576125756000805160206148d98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990614206565b612656565b8760ff16600114156125d6576125ba6000805160206148b98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f99061433d565b8760ff1660021415612616576125fa60008051602061482f8339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990613c63565b8760ff16600314156126565761263a6000805160206148d98339815191528a611358565b6126565760405162461bcd60e51b81526004016105f990614085565b61266060cb612c65565b600060cc600061267060cb612330565b8152602001908152602001600020905061268a60cb612330565b8160000181905550888160010160006101000a81548160ff021916908360ff1602179055508a8160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160010160016101000a8154816001600160a01b0302191690836001600160a01b031602179055508681600301819055508581600401819055508481600601819055504281600501819055508381600701908051906020019061273d929190612e4f565b5082516127539060088301906020860190612e4f565b5081516127699060098301906020850190612e4f565b5061278e8b61277860cb612330565b8a60405180602001604052806000815250611dd8565b8860ff166003141561281257600281015481546127b5916001600160a01b0316908a611ec3565b8054600090815260cd6020908152604080832060028501546001600160a01b031684529091529020546127e89089611fd9565b8154600090815260cd6020908152604080832060028601546001600160a01b031684529091529020555b8060020160009054906101000a90046001600160a01b03166001600160a01b03168160010160019054906101000a90046001600160a01b03166001600160a01b03167f99cc3eeb446560c9a2d2483bc5160735ec0fb1851aea3bde32e7a56c30c11da68a60cd60008660000154815260200190815260200160002060008660020160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000205485600001548660010160009054906101000a900460ff168760030154886004015489600601548a600501548b6007018c6008018d6009016040516129169b9a9998979695949392919061465d565b60405180910390a35050505050505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061295e57fe5b602090810291909101015292915050565b612981846001600160a01b0316612a40565b15610c6d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906129ba90899089908890889088906004016136d0565b602060405180830381600087803b1580156129d457600080fd5b505af1925050508015612a04575060408051601f3d908101601f19168201909252612a019181019061350e565b60015b612a10576121cc61473a565b6001600160e01b0319811663f23a6e6160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b3b151590565b6000611351836001600160a01b038416612c6e565b6000611351836001600160a01b038416612cb8565b81546000908210612a935760405162461bcd60e51b81526004016105f990613868565b826000018281548110612aa257fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b600054610100900460ff1680612ae65750612ae6612355565b80612af4575060005460ff16155b612b105760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612b3b576000805460ff1961ff0019909116610100171660011790555b8015612b4d576000805461ff00191690555b50565b600054610100900460ff1680612b695750612b69612355565b80612b77575060005460ff16155b612b935760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612bbe576000805460ff1961ff0019909116610100171660011790555b612b3b6301ffc9a760e01b612d7e565b600054610100900460ff1680612be75750612be7612355565b80612bf5575060005460ff16155b612c115760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612c3c576000805460ff1961ff0019909116610100171660011790555b612c4582612dcd565b612c55636cdb3d1360e11b612d7e565b6123ed6303a24d0760e21b612d7e565b80546001019055565b6000612c7a8383612ab5565b612cb057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610627565b506000610627565b60008181526001830160205260408120548015612d745783546000198083019190810190600090879083908110612ceb57fe5b9060005260206000200154905080876000018481548110612d0857fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612d3857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610627565b6000915050610627565b6001600160e01b03198082161415612da85760405162461bcd60e51b81526004016105f9906139d5565b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b8051610cb9906067906020840190612e4f565b60405180610160016040528060008152602001600060ff16815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016060815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e9057805160ff1916838001178555612ebd565b82800160010185558215612ebd579182015b82811115612ebd578251825591602001919060010190612ea2565b50612ec9929150612ecd565b5090565b5b80821115612ec95760008155600101612ece565b80356001600160a01b038116811461062757600080fd5b600082601f830112612f09578081fd5b8135612f1c612f1782614708565b6146e1565b818152915060208083019084810181840286018201871015612f3d57600080fd5b60005b84811015612f5c57813584529282019290820190600101612f40565b505050505092915050565b600082601f830112612f77578081fd5b813567ffffffffffffffff811115612f8d578182fd5b612fa0601f8201601f19166020016146e1565b9150808252836020828501011115612fb757600080fd5b8060208401602084013760009082016020015292915050565b803560ff8116811461062757600080fd5b600060208284031215612ff2578081fd5b6113518383612ee2565b6000806040838503121561300e578081fd5b6130188484612ee2565b91506130278460208501612ee2565b90509250929050565b600080600080600060a08688031215613047578081fd5b8535613052816147df565b94506020860135613062816147df565b9350604086013567ffffffffffffffff8082111561307e578283fd5b61308a89838a01612ef9565b9450606088013591508082111561309f578283fd5b6130ab89838a01612ef9565b935060808801359150808211156130c0578283fd5b506130cd88828901612f67565b9150509295509295909350565b600080600080600060a086880312156130f1578081fd5b6130fb8787612ee2565b945061310a8760208801612ee2565b93506040860135925060608601359150608086013567ffffffffffffffff811115613133578182fd5b6130cd88828901612f67565b6000806000806000806000806000806101408b8d03121561315e578485fd5b6131688c8c612ee2565b99506131778c60208d01612ee2565b98506131868c60408d01612fd0565b975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013567ffffffffffffffff808211156131be578485fd5b6131ca8e838f01612f67565b94506101008d01359150808211156131e0578384fd5b6131ec8e838f01612f67565b93506101208d0135915080821115613202578283fd5b5061320f8d828e01612f67565b9150509295989b9194979a5092959850565b60008060408385031215613233578182fd5b61323d8484612ee2565b915060208301358015158114613251578182fd5b809150509250929050565b6000806040838503121561326e578182fd5b6132788484612ee2565b946020939093013593505050565b60008060006060848603121561329a578081fd5b6132a48585612ee2565b95602085013595506040909401359392505050565b600080604083850312156132cb578182fd5b6132d58484612ee2565b91506130278460208501612fd0565b60008060008060008060008060006101208a8c031215613302578283fd5b61330c8b8b612ee2565b985061331b8b60208c01612fd0565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013567ffffffffffffffff80821115613353578485fd5b61335f8d838e01612f67565b945060e08c0135915080821115613374578384fd5b6133808d838e01612f67565b93506101008c0135915080821115613396578283fd5b506133a38c828d01612f67565b9150509295985092959850929598565b600080604083850312156133c5578182fd5b823567ffffffffffffffff808211156133dc578384fd5b818501915085601f8301126133ef578384fd5b81356133fd612f1782614708565b80828252602080830192508086018a82838702890101111561341d578889fd5b8896505b84871015613447576134338b82612ee2565b845260019690960195928101928101613421565b50909650870135935050508082111561345e578283fd5b5061346b85828601612ef9565b9150509250929050565b600060208284031215613486578081fd5b81358015158114611351578182fd5b6000602082840312156134a6578081fd5b5035919050565b600080604083850312156134bf578182fd5b823591506020830135613251816147df565b600080604083850312156134e3578182fd5b50508035926020909101359150565b600060208284031215613503578081fd5b8135611351816147f4565b60006020828403121561351f578081fd5b8151611351816147f4565b60006020828403121561353b578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561357e57815187529582019590820190600101613562565b509495945050505050565b60008151808452815b818110156135ae57602081850181015186830182015201613592565b818111156135bf5782602083870101525b50601f01601f19169290920160200192915050565b600081546001808216600081146135f257600181146136105761364e565b60028304607f16865260ff198316602087015260408601935061364e565b6002830480875261362086614728565b60005b828110156136445781546020828b0101528482019150602081019050613623565b8801602001955050505b50505092915050565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061369e9083018661354f565b82810360608401526136b0818661354f565b905082810360808401526136c48185613589565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061370a90830184613589565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b600060208252611351602083018461354f565b600060408252613754604083018561354f565b8281036020840152613766818561354f565b95945050505050565b901515815260200190565b941515855292151560208501529015156040840152151560608301521515608082015260a00190565b90815260200190565b6000602082526113516020830184613589565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b60208082526035908201527f434c4d383a3a69737375654f6e426568616c663a2063616c6c206d757374206360408201527437b6b290333937b6902220a79037b91030b236b4b760591b606082015260800190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526e0818591b5a5b881d1bc819dc985b9d608a1b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c794465616c65723a206d73672e73656e646572206e6f746040820152681030903232b0b632b960b91b606082015260800190565b6020808252602b908201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60408201526a65726f206164647265737360a81b606082015260800190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b60208082526024908201527f434c4d383a3a7265746972653a20746f6b656e496420646f6573206e6f7420656040820152631e1a5cdd60e21b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526022908201527f434c4d383a3a6d696e743a20746f6b656e496420646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b60208082526032908201527f434c4d383a3a756e72656769737465724465616c65723a20746f6b656e54797060408201527119525908191bd95cc81b9bdd08195e1a5cdd60721b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526046908201527f434c4d383a3a756e7265676973746572436f6e73756d6572286c696d6974656460408201527f293a206f6e6c792061646d696e2063616e20756e726567697374657220636f6e60608201526573756d65727360d01b608082015260a00190565b6020808252602a908201527f434c4d383a3a676574546f6b656e547970653a20746f6b656e496420646f6573604082015269081b9bdd08195e1a5cdd60b21b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c7941646d696e3a206d73672e73656e646572206e6f74206040820152683a34329030b236b4b760b91b606082015260800190565b60208082526033908201527f434c4d383a3a5f69737375653a20697373756572206e6f7420612072656769736040820152723a32b932b21037b33339b2ba103232b0b632b960691b606082015260800190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526f2061646d696e20746f207265766f6b6560801b606082015260800190565b60208082526034908201527f434c4d383a3a7265746972653a206e6f7420656e6f75676820617661696c61626040820152736c652062616c616e636520746f2072657469726560601b606082015260800190565b60208082526037908201527f434c4d383a3a5f6973737565286c696d69746564293a2070726f706f7365722060408201527f6e6f7420612072656769737465726564206465616c6572000000000000000000606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526036908201527f434c4d383a3a7472616e736665723a2073656e64657220616e642072656365696040820152757665722063616e6e6f74206265207468652073616d6560501b606082015260800190565b60208082526032908201527f434c4d383a3a6d696e743a2063616e6e6f74206d696e74206e657720746f6b656040820152716e7320696e206c696d69746564206d6f646560701b606082015260800190565b60208082526030908201527f434c4d383a3a72656769737465724465616c65723a20746f6b656e547970654960408201526f1908191bd95cc81b9bdd08195e1a5cdd60821b606082015260800190565b60208082526026908201527f434c4d383a3a7472616e736665723a20746f6b656e496420646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b60208082526042908201527f434c4d383a3a7265676973746572436f6e73756d6572286c696d69746564293a60408201527f206f6e6c792061646d696e2063616e20726567697374657220636f6e73756d65606082015261727360f01b608082015260a00190565b60208082526037908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201527f746572656420656d697373696f6e732061756469746f72000000000000000000606082015260800190565b6020808252602e908201527f434c4d383a3a5f6973737565286c696d69746564293a206d73672e73656e646560408201526d72206e6f742074696d656c6f636b60901b606082015260800190565b60208082526033908201527f434c4d383a3a676574546f6b656e52657469726564416d6f756e743a20746f6b604082015272195b925908191bd95cc81b9bdd08195e1a5cdd606a1b606082015260800190565b60208082526058908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c7920656d697373696f6e732061756469746f72732063616e60608201527f206973737565206175646974656420656d697373696f6e730000000000000000608082015260a00190565b602080825260409082018190527f434c4d383a3a5f6973737565286c696d69746564293a20697373756572206e6f908201527f742061207265676973746572656420656d697373696f6e732061756469746f72606082015260800190565b60208082526027908201527f434c4d383a3a5f6973737565286c696d69746564293a20697373756565206e6f6040820152663a1030b236b4b760c91b606082015260800190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526030908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201526f3a32b932b2102922a1903232b0b632b960811b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252603d908201527f434c4d383a3a636f6e73756d65724f724465616c65723a206d73672e73656e6460408201527f6572206e6f74206120636f6e73756d6572206f722061206465616c6572000000606082015260800190565b60208082526024908201527f434c4d383a3a5f69737375653a20746f6b656e54797065496420697320696e76604082015263185b1a5960e21b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b6020808252604b908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c792061646d696e20616e642044414f2063616e207472616e60608201526a7366657220746f6b656e7360a81b608082015260a00190565b6000602082528251602083015260208301516145966040840182613657565b5060408301516145a96060840182613542565b5060608301516145bc6080840182613542565b50608083015160a083015260a083015160c083015260c083015160e083015260e08301516101008181850152808501519150506101606101208181860152614608610180860184613589565b9250808601519050601f196101408187860301818801526146298584613589565b9088015187820390920184880152935090506146458382613589565b9695505050505050565b918252602082015260400190565b60006101608d83528c60208401528b604084015260ff8b1660608401528960808401528860a08401528760c08401528660e0840152806101008401526146a5818401876135d4565b90508281036101208401526146ba81866135d4565b90508281036101408401526146cf81856135d4565b9e9d5050505050505050505050505050565b60405181810167ffffffffffffffff8111828210171561470057600080fd5b604052919050565b600067ffffffffffffffff82111561471e578081fd5b5060209081020190565b60009081526020902090565b60e01c90565b600060443d101561474a57611100565b600481823e6308c379a061475e8251614734565b1461476857611100565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156147985750505050611100565b828401925082519150808211156147b25750505050611100565b503d830160208284010111156147ca57505050611100565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114612b4d57600080fd5b6001600160e01b031981168114612b4d57600080fdfe455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76af8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e736665722ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12ca26469706673582212205f01f3a69064ad53ce92125759799dded2745cbae7146e4576954e91b333c95664736f6c63430007000033", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x273 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x7F157C9B GT PUSH2 0x151 JUMPI DUP1 PUSH4 0xCE6CCFAF GT PUSH2 0xC3 JUMPI DUP1 PUSH4 0xE985E9C5 GT PUSH2 0x87 JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0x575 JUMPI DUP1 PUSH4 0xF000BE98 EQ PUSH2 0x588 JUMPI DUP1 PUSH4 0xF242432A EQ PUSH2 0x59B JUMPI DUP1 PUSH4 0xF851A440 EQ PUSH2 0x5AE JUMPI DUP1 PUSH4 0xFCBA7948 EQ PUSH2 0x5B6 JUMPI DUP1 PUSH4 0xFD0C4A9A EQ PUSH2 0x5BE JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0xCE6CCFAF EQ PUSH2 0x510 JUMPI DUP1 PUSH4 0xD547741F EQ PUSH2 0x534 JUMPI DUP1 PUSH4 0xDBA851B0 EQ PUSH2 0x547 JUMPI DUP1 PUSH4 0xDDC3E6EB EQ PUSH2 0x54F JUMPI DUP1 PUSH4 0xE2E564F2 EQ PUSH2 0x562 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0xA217FDDF GT PUSH2 0x115 JUMPI DUP1 PUSH4 0xA217FDDF EQ PUSH2 0x49C JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x4A4 JUMPI DUP1 PUSH4 0xBDACB303 EQ PUSH2 0x4B7 JUMPI DUP1 PUSH4 0xC1E03728 EQ PUSH2 0x4CA JUMPI DUP1 PUSH4 0xC4D66DE8 EQ PUSH2 0x4EA JUMPI DUP1 PUSH4 0xCA15C873 EQ PUSH2 0x4FD JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x7F157C9B EQ PUSH2 0x422 JUMPI DUP1 PUSH4 0x9010D07C EQ PUSH2 0x443 JUMPI DUP1 PUSH4 0x91D14854 EQ PUSH2 0x463 JUMPI DUP1 PUSH4 0x92089C46 EQ PUSH2 0x476 JUMPI DUP1 PUSH4 0xA0D975A7 EQ PUSH2 0x489 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x31AA4B20 GT PUSH2 0x1EA JUMPI DUP1 PUSH4 0x53DBE982 GT PUSH2 0x1AE JUMPI DUP1 PUSH4 0x53DBE982 EQ PUSH2 0x3D1 JUMPI DUP1 PUSH4 0x5DDB368F EQ PUSH2 0x3E4 JUMPI DUP1 PUSH4 0x69F7EF44 EQ PUSH2 0x3EC JUMPI DUP1 PUSH4 0x76AED2E1 EQ PUSH2 0x3FF JUMPI DUP1 PUSH4 0x76CE4755 EQ PUSH2 0x412 JUMPI DUP1 PUSH4 0x78E5C592 EQ PUSH2 0x41A JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x31AA4B20 EQ PUSH2 0x365 JUMPI DUP1 PUSH4 0x33781A0E EQ PUSH2 0x378 JUMPI DUP1 PUSH4 0x36568ABE EQ PUSH2 0x38B JUMPI DUP1 PUSH4 0x44B22FDD EQ PUSH2 0x39E JUMPI DUP1 PUSH4 0x4E1273F4 EQ PUSH2 0x3B1 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH4 0x18A50D7E GT PUSH2 0x23C JUMPI DUP1 PUSH4 0x18A50D7E EQ PUSH2 0x309 JUMPI DUP1 PUSH4 0x1EF68EF7 EQ PUSH2 0x311 JUMPI DUP1 PUSH4 0x248A9CA3 EQ PUSH2 0x319 JUMPI DUP1 PUSH4 0x293A7F2E EQ PUSH2 0x32C JUMPI DUP1 PUSH4 0x2EB2C2D6 EQ PUSH2 0x33F JUMPI DUP1 PUSH4 0x2F2FF15D EQ PUSH2 0x352 JUMPI PUSH2 0x273 JUMP JUMPDEST DUP1 PUSH3 0xFDD58E EQ PUSH2 0x278 JUMPI DUP1 PUSH4 0x1FFC9A7 EQ PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x95BCDB6 EQ PUSH2 0x2C1 JUMPI DUP1 PUSH4 0xE89341C EQ PUSH2 0x2D6 JUMPI DUP1 PUSH4 0x156E29F6 EQ PUSH2 0x2F6 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x28B PUSH2 0x286 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x5D1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x37A3 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x2B4 PUSH2 0x2AF CALLDATASIZE PUSH1 0x4 PUSH2 0x34F2 JUMP JUMPDEST PUSH2 0x62D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x376F JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x2CF CALLDATASIZE PUSH1 0x4 PUSH2 0x3286 JUMP JUMPDEST PUSH2 0x650 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x2E9 PUSH2 0x2E4 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x775 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x304 CALLDATASIZE PUSH1 0x4 PUSH2 0x3286 JUMP JUMPDEST PUSH2 0x80D JUMP JUMPDEST PUSH2 0x28B PUSH2 0x89C JUMP JUMPDEST PUSH2 0x28B PUSH2 0x8AE JUMP JUMPDEST PUSH2 0x28B PUSH2 0x327 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x8C0 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x33A CALLDATASIZE PUSH1 0x4 PUSH2 0x34D1 JUMP JUMPDEST PUSH2 0x8D5 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x34D CALLDATASIZE PUSH1 0x4 PUSH2 0x3030 JUMP JUMPDEST PUSH2 0xA56 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x360 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0xC75 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x373 CALLDATASIZE PUSH1 0x4 PUSH2 0x32B9 JUMP JUMPDEST PUSH2 0xCBD JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x386 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xDBE JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x399 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0xDD8 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x3AC CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xE1A JUMP JUMPDEST PUSH2 0x3C4 PUSH2 0x3BF CALLDATASIZE PUSH1 0x4 PUSH2 0x33B3 JUMP JUMPDEST PUSH2 0xF1F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x372E JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x3DF CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0xFEC JUMP JUMPDEST PUSH2 0x28B PUSH2 0x10F1 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x3FA CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x2E9 PUSH2 0x40D CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x1185 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x127E JUMP JUMPDEST PUSH2 0x28B PUSH2 0x1290 JUMP JUMPDEST PUSH2 0x435 PUSH2 0x430 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x12A2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP3 SWAP2 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH2 0x456 PUSH2 0x451 CALLDATASIZE PUSH1 0x4 PUSH2 0x34D1 JUMP JUMPDEST PUSH2 0x1339 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x365E JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x471 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x456 PUSH2 0x484 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x1370 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x497 CALLDATASIZE PUSH1 0x4 PUSH2 0x325C JUMP JUMPDEST PUSH2 0x1393 JUMP JUMPDEST PUSH2 0x28B PUSH2 0x13E2 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4B2 CALLDATASIZE PUSH1 0x4 PUSH2 0x3221 JUMP JUMPDEST PUSH2 0x13E7 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4C5 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x14B5 JUMP JUMPDEST PUSH2 0x4DD PUSH2 0x4D8 CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x14FE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP2 SWAP1 PUSH2 0x4577 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x4F8 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x173E JUMP JUMPDEST PUSH2 0x28B PUSH2 0x50B CALLDATASIZE PUSH1 0x4 PUSH2 0x3495 JUMP JUMPDEST PUSH2 0x189E JUMP JUMPDEST PUSH2 0x523 PUSH2 0x51E CALLDATASIZE PUSH1 0x4 PUSH2 0x2FE1 JUMP JUMPDEST PUSH2 0x18B5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x298 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x377A JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x542 CALLDATASIZE PUSH1 0x4 PUSH2 0x34AD JUMP JUMPDEST PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x1983 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x55D CALLDATASIZE PUSH1 0x4 PUSH2 0x3475 JUMP JUMPDEST PUSH2 0x198C JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x570 CALLDATASIZE PUSH1 0x4 PUSH2 0x32B9 JUMP JUMPDEST PUSH2 0x19C6 JUMP JUMPDEST PUSH2 0x2B4 PUSH2 0x583 CALLDATASIZE PUSH1 0x4 PUSH2 0x2FFC JUMP JUMPDEST PUSH2 0x1AD4 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x596 CALLDATASIZE PUSH1 0x4 PUSH2 0x313F JUMP JUMPDEST PUSH2 0x1B02 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x5A9 CALLDATASIZE PUSH1 0x4 PUSH2 0x30DA JUMP JUMPDEST PUSH2 0x1B5B JUMP JUMPDEST PUSH2 0x456 PUSH2 0x1CEF JUMP JUMPDEST PUSH2 0x28B PUSH2 0x1D03 JUMP JUMPDEST PUSH2 0x2D4 PUSH2 0x5CC CALLDATASIZE PUSH1 0x4 PUSH2 0x32E4 JUMP JUMPDEST PUSH2 0x1D15 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x602 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x398A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x33 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x66A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x686 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x6A2 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x6BE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP4 DUP1 PUSH2 0x6C9 JUMPI POP DUP3 JUMPDEST DUP1 PUSH2 0x6D1 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x6D9 JUMPI POP DUP1 JUMPDEST PUSH2 0x6F5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4416 JUMP JUMPDEST PUSH2 0x6FE DUP7 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x71A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3FD7 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND EQ ISZERO PUSH2 0x743 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3EDF JUMP JUMPDEST PUSH2 0x76C CALLER DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x4 DUP2 MSTORE PUSH1 0x20 ADD PUSH4 0x3078303 PUSH1 0xE4 SHL DUP2 MSTORE POP PUSH2 0x1B5B JUMP JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x67 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x801 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x7D6 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x801 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x7E4 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x818 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x834 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0x83D DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x859 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A87 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x87C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3F35 JUMP JUMPDEST PUSH2 0x897 DUP4 DUP4 DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1DD8 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x8EF PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x90B PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x927 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x943 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP4 DUP1 PUSH2 0x94E JUMPI POP DUP3 JUMPDEST DUP1 PUSH2 0x956 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x95E JUMPI POP DUP1 JUMPDEST PUSH2 0x97A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4416 JUMP JUMPDEST PUSH2 0x983 DUP7 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x99F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A0C JUMP JUMPDEST PUSH2 0x9A9 CALLER DUP8 PUSH2 0x5D1 JUMP JUMPDEST DUP6 GT ISZERO PUSH2 0x9C8 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3D06 JUMP JUMPDEST PUSH2 0x9D3 CALLER DUP8 DUP8 PUSH2 0x1EC3 JUMP JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x9F7 SWAP1 DUP7 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP2 DUP3 SWAP1 KECCAK256 SWAP3 SWAP1 SWAP3 SSTORE MLOAD PUSH32 0x8F1B5EBB586D3D169E4ED07DB9CD10CE0DD30C7B656171310EAE7517C0B53CF9 SWAP1 PUSH2 0xA46 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP POP POP POP POP JUMP JUMPDEST DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0xA77 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x438D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0xA9D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DB7 JUMP JUMPDEST PUSH2 0xAA5 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0xACB JUMPI POP PUSH2 0xACB DUP6 PUSH2 0x583 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xAE7 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DFC JUMP JUMPDEST PUSH1 0x0 PUSH2 0xAF1 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0xB01 DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x2002 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0xC07 JUMPI PUSH1 0x0 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xB1B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xB33 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0xBA0 DUP2 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x488F PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x65 PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP14 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD PUSH2 0x20FF SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP15 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP11 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xBD7 SWAP1 DUP3 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP6 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP13 AND DUP7 MSTORE SWAP1 SWAP2 MSTORE SWAP1 SWAP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE POP PUSH1 0x1 ADD PUSH2 0xB04 JUMP JUMPDEST POP DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x4A39DC06D4C0DBC64B70AF90FD698A233A518AA5D07E595D983B8C0526C8F7FB DUP8 DUP8 PUSH1 0x40 MLOAD PUSH2 0xC57 SWAP3 SWAP2 SWAP1 PUSH2 0x3741 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xC6D DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x212B JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0xC93 SWAP1 PUSH2 0x471 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xCAF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38F2 JUMP JUMPDEST PUSH2 0xCB9 DUP3 DUP3 PUSH2 0x2239 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xCC8 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xCE4 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0xCED DUP2 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0xD09 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3F87 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0xD32 JUMPI PUSH2 0xD2D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD6E JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0xD56 JUMPI PUSH2 0xD2D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD6E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH2 0xD86 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH32 0xA8377DEEE15954185683D55EFFD369508B4935978C8CB2BAB790BF04C5701814 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x627 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xDE0 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0xE10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x44B7 JUMP JUMPDEST PUSH2 0xCB9 DUP3 DUP3 PUSH2 0x22C7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE34 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0xE50 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0xE6C PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0xE77 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0xE7F JUMPI POP DUP1 JUMPDEST PUSH2 0xE9B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0xECD JUMPI PUSH2 0xEB1 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0xECD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x401D JUMP JUMPDEST PUSH2 0xEE5 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0xC75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0x69A0ADEE259D26FE61F4776F7BEA7F3A9737C7321256821B985F988545EFD319 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD DUP4 MLOAD EQ PUSH2 0xF42 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x42F4 JUMP JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0xF5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xF86 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0xFE4 JUMPI PUSH2 0xFC5 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xFA4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xFB8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x5D1 JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xFD1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0xF8C JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1006 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1022 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x103E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1049 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1051 JUMPI POP DUP1 JUMPDEST PUSH2 0x106D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x109F JUMPI PUSH2 0x1083 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x109F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3B64 JUMP JUMPDEST PUSH2 0x10B7 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0x1949 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0x3A38088DA75EE2D80F6C753F55F8FD17602AE17D8BD0EF44D5E1F28AB5AF11F SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x10FD PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x111E PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP5 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x113A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP6 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1156 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP7 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1161 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1169 JUMPI POP DUP1 JUMPDEST ISZERO PUSH2 0x117A JUMPI PUSH1 0x1 SWAP4 POP POP POP POP PUSH2 0x64B JUMP JUMPDEST POP PUSH1 0x0 SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1190 DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x11AC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3BD0 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP1 DUP3 ADD SLOAD PUSH1 0xFF AND EQ ISZERO PUSH2 0x1204 JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1C DUP2 MSTORE PUSH32 0x52656E657761626C6520456E6572677920436572746966696361746500000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x64B JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x124F JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x17 DUP2 MSTORE PUSH32 0x436172626F6E20456D697373696F6E73204F6666736574000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x64B JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH17 0x4175646974656420456D697373696F6E73 PUSH1 0x78 SHL PUSH1 0x20 DUP3 ADD MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x12B1 DUP6 DUP6 PUSH2 0x5D1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xA0D975A7 PUSH1 0xE0 SHL DUP2 MSTORE SWAP1 SWAP2 POP PUSH1 0x0 SWAP1 ADDRESS SWAP1 PUSH4 0xA0D975A7 SWAP1 PUSH2 0x12DC SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0x3715 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x12F4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1308 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x132C SWAP2 SWAP1 PUSH2 0x352A JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x1351 SWAP1 DUP4 PUSH2 0x2334 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x1351 SWAP1 DUP4 PUSH2 0x2340 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 ADD SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139E DUP3 PUSH2 0x1DB6 JUMP JUMPDEST PUSH2 0x13BA JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4130 JUMP JUMPDEST POP PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 JUMP JUMPDEST DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x13F9 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1420 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x42AB JUMP JUMPDEST DUP1 PUSH1 0x66 PUSH1 0x0 PUSH2 0x142D PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP2 DUP3 ADD PUSH1 0x0 SWAP1 DUP2 KECCAK256 SWAP2 DUP8 AND DUP1 DUP3 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP3 ISZERO ISZERO SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 SSTORE PUSH2 0x1471 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 DUP4 PUSH1 0x40 MLOAD PUSH2 0x14A9 SWAP2 SWAP1 PUSH2 0x376F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH2 0x14C0 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x14DC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH1 0xCA DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x1506 PUSH2 0x2DE0 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xCC PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP3 MLOAD PUSH2 0x160 DUP2 ADD DUP5 MSTORE DUP2 SLOAD DUP2 MSTORE PUSH1 0x1 DUP1 DUP4 ADD SLOAD PUSH1 0xFF DUP2 AND DUP4 DUP7 ADD MSTORE PUSH2 0x100 SWAP1 DUP2 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP5 DUP9 ADD MSTORE PUSH1 0x2 DUP1 DUP7 ADD SLOAD SWAP1 SWAP2 AND PUSH1 0x60 DUP6 ADD MSTORE PUSH1 0x3 DUP6 ADD SLOAD PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0x4 DUP6 ADD SLOAD PUSH1 0xA0 DUP6 ADD MSTORE PUSH1 0x5 DUP6 ADD SLOAD PUSH1 0xC0 DUP6 ADD MSTORE PUSH1 0x6 DUP6 ADD SLOAD PUSH1 0xE0 DUP6 ADD MSTORE PUSH1 0x7 DUP6 ADD DUP1 SLOAD DUP9 MLOAD SWAP5 DUP2 AND ISZERO DUP5 MUL PUSH1 0x0 NOT ADD AND SWAP2 SWAP1 SWAP2 DIV PUSH1 0x1F DUP2 ADD DUP8 SWAP1 DIV DUP8 MUL DUP5 ADD DUP8 ADD SWAP1 SWAP8 MSTORE DUP7 DUP4 MSTORE SWAP3 SWAP6 SWAP4 SWAP5 SWAP1 DUP7 ADD SWAP4 SWAP2 SWAP3 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x1606 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x15DB JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1606 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x15E9 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP SWAP2 DUP4 MSTORE POP POP PUSH1 0x8 DUP3 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x2 PUSH1 0x1 DUP6 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP3 ADD DUP5 ADD SWAP1 SWAP3 MSTORE DUP2 DUP2 MSTORE SWAP4 DUP3 ADD SWAP4 SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x169A JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x166F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x169A JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x167D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP SWAP2 DUP4 MSTORE POP POP PUSH1 0x9 DUP3 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x2 PUSH1 0x1 DUP6 AND ISZERO PUSH2 0x100 MUL PUSH1 0x0 NOT ADD SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 DIV PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP3 ADD DUP5 ADD SWAP1 SWAP3 MSTORE DUP2 DUP2 MSTORE SWAP4 DUP3 ADD SWAP4 SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x172E JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1703 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x172E JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1711 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 MSTORE POP POP SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x1757 JUMPI POP PUSH2 0x1757 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x1765 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x1781 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x17AC JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x17C4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x2366 JUMP JUMPDEST PUSH2 0x17EA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE PUSH2 0x2402 JUMP JUMPDEST PUSH2 0x17F5 PUSH1 0x0 DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x180D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x1825 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x183D PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH2 0x1855 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0xCAF JUMP JUMPDEST PUSH1 0xC9 DUP1 SLOAD PUSH1 0xCA DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE PUSH2 0x100 PUSH1 0x1 PUSH1 0xA8 SHL SUB NOT AND PUSH2 0x100 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND MUL OR PUSH1 0xFF NOT AND SWAP1 SSTORE DUP1 ISZERO PUSH2 0xCB9 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x627 SWAP1 PUSH2 0x2454 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 DUP1 DUP1 DUP1 PUSH2 0x18C6 DUP2 DUP9 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x18E2 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP10 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x18FE PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x191A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP12 PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1936 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x484F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP13 PUSH2 0x1358 JUMP JUMPDEST SWAP5 SWAP12 SWAP4 SWAP11 POP SWAP2 SWAP9 POP SWAP7 POP SWAP2 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x1967 SWAP1 PUSH2 0x471 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0xE10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3CB6 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH2 0x1997 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x19B3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH1 0xC9 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x19D1 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x19ED JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C1A JUMP JUMPDEST PUSH2 0x19F6 DUP2 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0x1A12 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3AC9 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x1A3B JUMPI PUSH2 0x1A36 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A77 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x1A5F JUMPI PUSH2 0x1A36 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A77 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH2 0x1A80 DUP3 PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x1A9C JUMPI PUSH2 0x1A9C PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x486F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP4 PUSH2 0x1949 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH32 0x98552DED770F1D05A505572F3387C108DBC6B566EA3D49F83CFF3D1F1C72A042 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x66 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ DUP1 PUSH2 0x1B21 JUMPI POP PUSH2 0x1B21 PUSH1 0x0 CALLER PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x1B3D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3813 JUMP JUMPDEST PUSH2 0x1B4F DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 DUP11 PUSH2 0x245F JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x1B81 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3DB7 JUMP JUMPDEST PUSH2 0x1B89 PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ DUP1 PUSH2 0x1BAF JUMPI POP PUSH2 0x1BAF DUP6 PUSH2 0x583 PUSH2 0x1FFE JUMP JUMPDEST PUSH2 0x1BCB JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3B1B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BD5 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1BF5 DUP2 DUP8 DUP8 PUSH2 0x1BE6 DUP9 PUSH2 0x292B JUMP JUMPDEST PUSH2 0x1BEF DUP9 PUSH2 0x292B JUMP JUMPDEST DUP8 PUSH2 0x2002 JUMP JUMPDEST PUSH2 0x1C3C DUP4 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2A DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x488F PUSH1 0x2A SWAP2 CODECOPY PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP14 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD SWAP2 SWAP1 PUSH2 0x20FF JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 DUP2 AND DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP8 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x1C73 SWAP1 DUP5 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP12 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 SWAP2 DUP9 DUP2 AND SWAP2 SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1CD9 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0xC6D DUP2 DUP8 DUP8 DUP8 DUP8 DUP8 PUSH2 0x296F JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D2F PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1D4B PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1D67 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE CALLER PUSH2 0x1358 JUMP JUMPDEST SWAP1 POP DUP3 DUP1 PUSH2 0x1D72 JUMPI POP DUP2 JUMPDEST DUP1 PUSH2 0x1D7A JUMPI POP DUP1 JUMPDEST PUSH2 0x1D96 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3941 JUMP JUMPDEST PUSH2 0x1DA8 DUP13 CALLER DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 DUP14 PUSH2 0x245F JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x1DC3 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST LT PUSH2 0x1DD0 JUMPI POP PUSH1 0x1 PUSH2 0x64B JUMP JUMPDEST POP PUSH1 0x0 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x1DFE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x43D5 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1E08 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1E1A DUP2 PUSH1 0x0 DUP8 PUSH2 0x1BE6 DUP9 PUSH2 0x292B JUMP JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x1E47 SWAP1 DUP5 PUSH2 0x1FD9 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP12 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE DUP2 DUP5 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE MLOAD SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1EA5 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 PUSH2 0x1EBC DUP2 PUSH1 0x0 DUP8 DUP8 DUP8 DUP8 PUSH2 0x296F JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x1EE9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E9C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1EF3 PUSH2 0x1FFE JUMP JUMPDEST SWAP1 POP PUSH2 0x1F23 DUP2 DUP6 PUSH1 0x0 PUSH2 0x1F05 DUP8 PUSH2 0x292B JUMP JUMPDEST PUSH2 0x1F0E DUP8 PUSH2 0x292B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x2002 JUMP JUMPDEST PUSH2 0x1F6A DUP3 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x480B PUSH1 0x24 SWAP2 CODECOPY PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD SWAP2 SWAP1 PUSH2 0x20FF JUMP JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x65 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP11 AND DUP1 DUP7 MSTORE SWAP2 SWAP1 SWAP4 MSTORE DUP2 DUP5 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE MLOAD SWAP2 SWAP3 SWAP2 SWAP1 DUP5 AND SWAP1 PUSH32 0xC3D58168C5AE7397731D063D5BBF3D657854427343F4C083240F7AACAA2D0F62 SWAP1 PUSH2 0x1FCB SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH2 0x464F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x1351 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3A50 JUMP JUMPDEST CALLER SWAP1 JUMP JUMPDEST PUSH2 0x2010 DUP7 DUP7 DUP7 DUP7 DUP7 DUP7 PUSH2 0xC6D JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x76C JUMPI PUSH1 0x0 PUSH1 0xCC PUSH1 0x0 DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x202E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 POP PUSH1 0xC9 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x20F5 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH2 0x206F JUMPI POP PUSH2 0x20F7 JUMP JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND PUSH1 0x3 EQ PUSH2 0x20C1 JUMPI PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 DUP2 AND SWAP2 AND EQ DUP1 PUSH2 0x20A0 JUMPI POP PUSH2 0x20A0 PUSH1 0x0 DUP10 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x20BC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4506 JUMP JUMPDEST PUSH2 0x20F5 JUMP JUMPDEST PUSH2 0x20D9 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP10 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x20F5 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4183 JUMP JUMPDEST POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x2013 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP5 DUP5 GT ISZERO PUSH2 0x2123 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST POP POP POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH2 0x213D DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x2A40 JUMP JUMPDEST ISZERO PUSH2 0xC6D JUMPI PUSH1 0x40 MLOAD PUSH4 0xBC197C81 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH4 0xBC197C81 SWAP1 PUSH2 0x2176 SWAP1 DUP10 SWAP1 DUP10 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x3672 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2190 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x21C0 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x21BD SWAP2 DUP2 ADD SWAP1 PUSH2 0x350E JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x2209 JUMPI PUSH2 0x21CC PUSH2 0x473A JUMP JUMPDEST DUP1 PUSH2 0x21D7 JUMPI POP PUSH2 0x21F1 JUMP JUMPDEST DUP1 PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP2 SWAP1 PUSH2 0x37AC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x37BF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xBC197C81 PUSH1 0xE0 SHL EQ PUSH2 0x76C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38AA JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x2251 SWAP1 DUP3 PUSH2 0x2A46 JUMP JUMPDEST ISZERO PUSH2 0xCB9 JUMPI PUSH2 0x225E PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0x2F8788117E7EFF1D82E926EC794901D17C78024A50270940304540A733656F0D PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0xFF AND GT DUP1 ISZERO PUSH2 0x22BA JUMPI POP PUSH1 0x3 DUP3 PUSH1 0xFF AND GT ISZERO JUMPDEST ISZERO PUSH2 0x1DD0 JUMPI POP PUSH1 0x1 PUSH2 0x64B JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x22DF SWAP1 DUP3 PUSH2 0x2A5B JUMP JUMPDEST ISZERO PUSH2 0xCB9 JUMPI PUSH2 0x22EC PUSH2 0x1FFE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH32 0xF6391F5C32D9C69D2A47EA670B442974B53935D1EDC7FD64EB21E047A839171B PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP JUMP JUMPDEST SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 DUP4 PUSH2 0x2A70 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2AB5 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2360 ADDRESS PUSH2 0x2A40 JUMP JUMPDEST ISZERO SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x237F JUMPI POP PUSH2 0x237F PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x238D JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x23A9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x23D4 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x23DC PUSH2 0x2ACD JUMP JUMPDEST PUSH2 0x23E4 PUSH2 0x2B50 JUMP JUMPDEST PUSH2 0x23ED DUP3 PUSH2 0x2BCE JUMP JUMPDEST DUP1 ISZERO PUSH2 0xCB9 JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 MLOAD DUP4 SWAP3 DUP6 SWAP2 PUSH32 0xBD79B86FFE0AB8E8776151514217CD7CACD52C909F66475C3AF44E129F0B00FF SWAP2 SWAP1 LOG4 PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x97 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 PUSH1 0x2 ADD SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x627 DUP3 PUSH2 0x2330 JUMP JUMPDEST PUSH2 0x2468 DUP9 PUSH2 0x22A2 JUMP JUMPDEST PUSH2 0x2484 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4473 JUMP JUMPDEST PUSH1 0xC9 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x2596 JUMPI DUP8 PUSH1 0xFF AND PUSH1 0x1 EQ DUP1 PUSH2 0x24A4 JUMPI POP DUP8 PUSH1 0xFF AND PUSH1 0x2 EQ JUMPDEST ISZERO PUSH2 0x2551 JUMPI PUSH1 0xCA SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x24D3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x40E2 JUMP JUMPDEST PUSH2 0x24DE PUSH1 0x0 DUP12 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x24FA JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4264 JUMP JUMPDEST PUSH2 0x2512 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST DUP1 PUSH2 0x2530 JUMPI POP PUSH2 0x2530 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x254C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3D5A JUMP JUMPDEST PUSH2 0x2591 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2591 JUMPI PUSH2 0x2575 PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4206 JUMP JUMPDEST PUSH2 0x2656 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x25D6 JUMPI PUSH2 0x25BA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48B9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x433D JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x2616 JUMPI PUSH2 0x25FA PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x482F DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2591 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3C63 JUMP JUMPDEST DUP8 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2656 JUMPI PUSH2 0x263A PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x48D9 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP11 PUSH2 0x1358 JUMP JUMPDEST PUSH2 0x2656 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x4085 JUMP JUMPDEST PUSH2 0x2660 PUSH1 0xCB PUSH2 0x2C65 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xCC PUSH1 0x0 PUSH2 0x2670 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SWAP1 POP PUSH2 0x268A PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP2 PUSH1 0x0 ADD DUP2 SWAP1 SSTORE POP DUP9 DUP2 PUSH1 0x1 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 PUSH1 0xFF AND MUL OR SWAP1 SSTORE POP DUP11 DUP2 PUSH1 0x2 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB MUL NOT AND SWAP1 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND MUL OR SWAP1 SSTORE POP DUP10 DUP2 PUSH1 0x1 ADD PUSH1 0x1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB MUL NOT AND SWAP1 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND MUL OR SWAP1 SSTORE POP DUP7 DUP2 PUSH1 0x3 ADD DUP2 SWAP1 SSTORE POP DUP6 DUP2 PUSH1 0x4 ADD DUP2 SWAP1 SSTORE POP DUP5 DUP2 PUSH1 0x6 ADD DUP2 SWAP1 SSTORE POP TIMESTAMP DUP2 PUSH1 0x5 ADD DUP2 SWAP1 SSTORE POP DUP4 DUP2 PUSH1 0x7 ADD SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x273D SWAP3 SWAP2 SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP DUP3 MLOAD PUSH2 0x2753 SWAP1 PUSH1 0x8 DUP4 ADD SWAP1 PUSH1 0x20 DUP7 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP DUP2 MLOAD PUSH2 0x2769 SWAP1 PUSH1 0x9 DUP4 ADD SWAP1 PUSH1 0x20 DUP6 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST POP PUSH2 0x278E DUP12 PUSH2 0x2778 PUSH1 0xCB PUSH2 0x2330 JUMP JUMPDEST DUP11 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x1DD8 JUMP JUMPDEST DUP9 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x2812 JUMPI PUSH1 0x2 DUP2 ADD SLOAD DUP2 SLOAD PUSH2 0x27B5 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 DUP11 PUSH2 0x1EC3 JUMP JUMPDEST DUP1 SLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x2 DUP6 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x27E8 SWAP1 DUP10 PUSH2 0x1FD9 JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xCD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x2 DUP7 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SSTORE JUMPDEST DUP1 PUSH1 0x2 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 ADD PUSH1 0x1 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x99CC3EEB446560C9A2D2483BC5160735EC0FB1851AEA3BDE32E7A56C30C11DA6 DUP11 PUSH1 0xCD PUSH1 0x0 DUP7 PUSH1 0x0 ADD SLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP7 PUSH1 0x2 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD DUP6 PUSH1 0x0 ADD SLOAD DUP7 PUSH1 0x1 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND DUP8 PUSH1 0x3 ADD SLOAD DUP9 PUSH1 0x4 ADD SLOAD DUP10 PUSH1 0x6 ADD SLOAD DUP11 PUSH1 0x5 ADD SLOAD DUP12 PUSH1 0x7 ADD DUP13 PUSH1 0x8 ADD DUP14 PUSH1 0x9 ADD PUSH1 0x40 MLOAD PUSH2 0x2916 SWAP12 SWAP11 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x465D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 DUP1 DUP3 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE PUSH1 0x60 SWAP2 DUP3 SWAP2 SWAP1 PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP POP SWAP1 POP DUP3 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x295E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x2981 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x2A40 JUMP JUMPDEST ISZERO PUSH2 0xC6D JUMPI PUSH1 0x40 MLOAD PUSH4 0xF23A6E61 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH4 0xF23A6E61 SWAP1 PUSH2 0x29BA SWAP1 DUP10 SWAP1 DUP10 SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0x36D0 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x29D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0x2A04 JUMPI POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD SWAP1 SWAP3 MSTORE PUSH2 0x2A01 SWAP2 DUP2 ADD SWAP1 PUSH2 0x350E JUMP JUMPDEST PUSH1 0x1 JUMPDEST PUSH2 0x2A10 JUMPI PUSH2 0x21CC PUSH2 0x473A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH4 0xF23A6E61 PUSH1 0xE0 SHL EQ PUSH2 0x76C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x38AA JUMP JUMPDEST EXTCODESIZE ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2C6E JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1351 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH2 0x2CB8 JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 DUP3 LT PUSH2 0x2A93 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3868 JUMP JUMPDEST DUP3 PUSH1 0x0 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x2AA2 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2AE6 JUMPI POP PUSH2 0x2AE6 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2AF4 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2B10 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2B3B JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST DUP1 ISZERO PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 SLOAD PUSH2 0xFF00 NOT AND SWAP1 SSTORE JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2B69 JUMPI POP PUSH2 0x2B69 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2B77 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2B93 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2BBE JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x2B3B PUSH4 0x1FFC9A7 PUSH1 0xE0 SHL PUSH2 0x2D7E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND DUP1 PUSH2 0x2BE7 JUMPI POP PUSH2 0x2BE7 PUSH2 0x2355 JUMP JUMPDEST DUP1 PUSH2 0x2BF5 JUMPI POP PUSH1 0x0 SLOAD PUSH1 0xFF AND ISZERO JUMPDEST PUSH2 0x2C11 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x3E4E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND ISZERO DUP1 ISZERO PUSH2 0x2C3C JUMPI PUSH1 0x0 DUP1 SLOAD PUSH1 0xFF NOT PUSH2 0xFF00 NOT SWAP1 SWAP2 AND PUSH2 0x100 OR AND PUSH1 0x1 OR SWAP1 SSTORE JUMPDEST PUSH2 0x2C45 DUP3 PUSH2 0x2DCD JUMP JUMPDEST PUSH2 0x2C55 PUSH4 0x6CDB3D13 PUSH1 0xE1 SHL PUSH2 0x2D7E JUMP JUMPDEST PUSH2 0x23ED PUSH4 0x3A24D07 PUSH1 0xE2 SHL PUSH2 0x2D7E JUMP JUMPDEST DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2C7A DUP4 DUP4 PUSH2 0x2AB5 JUMP JUMPDEST PUSH2 0x2CB0 JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP2 DUP2 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP5 SWAP1 SSTORE DUP5 SLOAD DUP5 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x627 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x627 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x2D74 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x2CEB JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD SLOAD SWAP1 POP DUP1 DUP8 PUSH1 0x0 ADD DUP5 DUP2 SLOAD DUP2 LT PUSH2 0x2D08 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SWAP3 SWAP1 SWAP3 SSTORE DUP3 DUP2 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0x2D38 JUMPI INVALID JUMPDEST PUSH1 0x1 SWAP1 SUB DUP2 DUP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 SWAP1 SSTORE SWAP1 SSTORE DUP7 PUSH1 0x1 ADD PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP1 SSTORE PUSH1 0x1 SWAP5 POP POP POP POP POP PUSH2 0x627 JUMP JUMPDEST PUSH1 0x0 SWAP2 POP POP PUSH2 0x627 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 DUP3 AND EQ ISZERO PUSH2 0x2DA8 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5F9 SWAP1 PUSH2 0x39D5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x33 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST DUP1 MLOAD PUSH2 0xCB9 SWAP1 PUSH1 0x67 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH2 0x2E4F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH2 0x160 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0xFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x2E90 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x2EBD JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x2EBD JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x2EBD JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x2EA2 JUMP JUMPDEST POP PUSH2 0x2EC9 SWAP3 SWAP2 POP PUSH2 0x2ECD JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x2EC9 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x2ECE JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x627 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x2F09 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x2F1C PUSH2 0x2F17 DUP3 PUSH2 0x4708 JUMP JUMPDEST PUSH2 0x46E1 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x2F3D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x2F5C JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x2F40 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x2F77 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x2F8D JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x2FA0 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x46E1 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x2FB7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x627 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2FF2 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x1351 DUP4 DUP4 PUSH2 0x2EE2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x300E JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x3018 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH2 0x3027 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP1 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x3047 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0x3052 DUP2 PUSH2 0x47DF JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD PUSH2 0x3062 DUP2 PUSH2 0x47DF JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x307E JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x308A DUP10 DUP4 DUP11 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x309F JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x30AB DUP10 DUP4 DUP11 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x30C0 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x30CD DUP9 DUP3 DUP10 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 SWAP1 SWAP4 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x30F1 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x30FB DUP8 DUP8 PUSH2 0x2EE2 JUMP JUMPDEST SWAP5 POP PUSH2 0x310A DUP8 PUSH1 0x20 DUP9 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD SWAP2 POP PUSH1 0x80 DUP7 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x3133 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x30CD DUP9 DUP3 DUP10 ADD PUSH2 0x2F67 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x140 DUP12 DUP14 SUB SLT ISZERO PUSH2 0x315E JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x3168 DUP13 DUP13 PUSH2 0x2EE2 JUMP JUMPDEST SWAP10 POP PUSH2 0x3177 DUP13 PUSH1 0x20 DUP14 ADD PUSH2 0x2EE2 JUMP JUMPDEST SWAP9 POP PUSH2 0x3186 DUP13 PUSH1 0x40 DUP14 ADD PUSH2 0x2FD0 JUMP JUMPDEST SWAP8 POP PUSH1 0x60 DUP12 ADD CALLDATALOAD SWAP7 POP PUSH1 0x80 DUP12 ADD CALLDATALOAD SWAP6 POP PUSH1 0xA0 DUP12 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 DUP12 ADD CALLDATALOAD SWAP4 POP PUSH1 0xE0 DUP12 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x31BE JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x31CA DUP15 DUP4 DUP16 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP5 POP PUSH2 0x100 DUP14 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x31E0 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x31EC DUP15 DUP4 DUP16 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP4 POP PUSH2 0x120 DUP14 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3202 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x320F DUP14 DUP3 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP12 SWAP2 SWAP5 SWAP8 SWAP11 POP SWAP3 SWAP6 SWAP9 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3233 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x323D DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x3251 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x326E JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3278 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x329A JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x32A4 DUP6 DUP6 PUSH2 0x2EE2 JUMP JUMPDEST SWAP6 PUSH1 0x20 DUP6 ADD CALLDATALOAD SWAP6 POP PUSH1 0x40 SWAP1 SWAP5 ADD CALLDATALOAD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x32CB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x32D5 DUP5 DUP5 PUSH2 0x2EE2 JUMP JUMPDEST SWAP2 POP PUSH2 0x3027 DUP5 PUSH1 0x20 DUP6 ADD PUSH2 0x2FD0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x120 DUP11 DUP13 SUB SLT ISZERO PUSH2 0x3302 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x330C DUP12 DUP12 PUSH2 0x2EE2 JUMP JUMPDEST SWAP9 POP PUSH2 0x331B DUP12 PUSH1 0x20 DUP13 ADD PUSH2 0x2FD0 JUMP JUMPDEST SWAP8 POP PUSH1 0x40 DUP11 ADD CALLDATALOAD SWAP7 POP PUSH1 0x60 DUP11 ADD CALLDATALOAD SWAP6 POP PUSH1 0x80 DUP11 ADD CALLDATALOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD CALLDATALOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x3353 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x335F DUP14 DUP4 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP5 POP PUSH1 0xE0 DUP13 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3374 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x3380 DUP14 DUP4 DUP15 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP4 POP PUSH2 0x100 DUP13 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3396 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x33A3 DUP13 DUP3 DUP14 ADD PUSH2 0x2F67 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x33C5 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x33DC JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x33EF JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x33FD PUSH2 0x2F17 DUP3 PUSH2 0x4708 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP11 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x341D JUMPI DUP9 DUP10 REVERT JUMPDEST DUP9 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x3447 JUMPI PUSH2 0x3433 DUP12 DUP3 PUSH2 0x2EE2 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x3421 JUMP JUMPDEST POP SWAP1 SWAP7 POP DUP8 ADD CALLDATALOAD SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x345E JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x346B DUP6 DUP3 DUP7 ADD PUSH2 0x2EF9 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3486 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x1351 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34A6 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x34BF JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x3251 DUP2 PUSH2 0x47DF JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x34E3 JUMPI DUP2 DUP3 REVERT JUMPDEST POP POP DUP1 CALLDATALOAD SWAP3 PUSH1 0x20 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3503 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1351 DUP2 PUSH2 0x47F4 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x351F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1351 DUP2 PUSH2 0x47F4 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x353B JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x357E JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3562 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x35AE JUMPI PUSH1 0x20 DUP2 DUP6 ADD DUP2 ADD MLOAD DUP7 DUP4 ADD DUP3 ADD MSTORE ADD PUSH2 0x3592 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x35BF JUMPI DUP3 PUSH1 0x20 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 AND PUSH1 0x0 DUP2 EQ PUSH2 0x35F2 JUMPI PUSH1 0x1 DUP2 EQ PUSH2 0x3610 JUMPI PUSH2 0x364E JUMP JUMPDEST PUSH1 0x2 DUP4 DIV PUSH1 0x7F AND DUP7 MSTORE PUSH1 0xFF NOT DUP4 AND PUSH1 0x20 DUP8 ADD MSTORE PUSH1 0x40 DUP7 ADD SWAP4 POP PUSH2 0x364E JUMP JUMPDEST PUSH1 0x2 DUP4 DIV DUP1 DUP8 MSTORE PUSH2 0x3620 DUP7 PUSH2 0x4728 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x3644 JUMPI DUP2 SLOAD PUSH1 0x20 DUP3 DUP12 ADD ADD MSTORE DUP5 DUP3 ADD SWAP2 POP PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x3623 JUMP JUMPDEST DUP9 ADD PUSH1 0x20 ADD SWAP6 POP POP POP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xFF AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 DUP2 AND DUP3 MSTORE DUP6 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0xA0 PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x369E SWAP1 DUP4 ADD DUP7 PUSH2 0x354F JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x36B0 DUP2 DUP7 PUSH2 0x354F JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x80 DUP5 ADD MSTORE PUSH2 0x36C4 DUP2 DUP6 PUSH2 0x3589 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 DUP2 AND DUP3 MSTORE DUP6 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP2 ADD DUP5 SWAP1 MSTORE PUSH1 0x60 DUP2 ADD DUP4 SWAP1 MSTORE PUSH1 0xA0 PUSH1 0x80 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x370A SWAP1 DUP4 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1351 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x354F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x3754 PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x354F JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x3766 DUP2 DUP6 PUSH2 0x354F JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP5 ISZERO ISZERO DUP6 MSTORE SWAP3 ISZERO ISZERO PUSH1 0x20 DUP6 ADD MSTORE SWAP1 ISZERO ISZERO PUSH1 0x40 DUP5 ADD MSTORE ISZERO ISZERO PUSH1 0x60 DUP4 ADD MSTORE ISZERO ISZERO PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1351 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x34 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E7366657220746F206E6F6E2045524331313535 PUSH1 0x40 DUP3 ADD MSTORE PUSH20 0x2932B1B2B4BB32B91034B6B83632B6B2B73A32B9 PUSH1 0x61 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x35 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A69737375654F6E426568616C663A2063616C6C206D7573742063 PUSH1 0x40 DUP3 ADD MSTORE PUSH21 0x37B6B290333937B6902220A79037B91030B236B4B7 PUSH1 0x59 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x22 SWAP1 DUP3 ADD MSTORE PUSH32 0x456E756D657261626C655365743A20696E646578206F7574206F6620626F756E PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x6473 PUSH1 0xF0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A204552433131353552656365697665722072656A65637465 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x6420746F6B656E73 PUSH1 0xC0 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2F SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2073656E646572206D75737420626520616E PUSH1 0x40 DUP3 ADD MSTORE PUSH15 0x818591B5A5B881D1BC819DC985B9D PUSH1 0x8A SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6F6E6C794465616C65723A206D73672E73656E646572206E6F74 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x1030903232B0B632B9 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2B SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2062616C616E636520717565727920666F7220746865207A PUSH1 0x40 DUP3 ADD MSTORE PUSH11 0x65726F2061646472657373 PUSH1 0xA8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1C SWAP1 DUP3 ADD MSTORE PUSH32 0x4552433136353A20696E76616C696420696E7465726661636520696400000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265746972653A20746F6B656E496420646F6573206E6F742065 PUSH1 0x40 DUP3 ADD MSTORE PUSH4 0x1E1A5CDD PUSH1 0xE2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1B SWAP1 DUP3 ADD MSTORE PUSH32 0x536166654D6174683A206164646974696F6E206F766572666C6F770000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x22 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6D696E743A20746F6B656E496420646F6573206E6F7420657869 PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x1CDD PUSH1 0xF2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A756E72656769737465724465616C65723A20746F6B656E547970 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x19525908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x72 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2063616C6C6572206973206E6F74206F776E6572206E6F72 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x8185C1C1C9BDD9959 PUSH1 0xBA SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x46 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A756E7265676973746572436F6E73756D6572286C696D69746564 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x293A206F6E6C792061646D696E2063616E20756E726567697374657220636F6E PUSH1 0x60 DUP3 ADD MSTORE PUSH6 0x73756D657273 PUSH1 0xD0 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2A SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A676574546F6B656E547970653A20746F6B656E496420646F6573 PUSH1 0x40 DUP3 ADD MSTORE PUSH10 0x81B9BDD08195E1A5CDD PUSH1 0xB2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6F6E6C7941646D696E3A206D73672E73656E646572206E6F7420 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x3A34329030B236B4B7 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x33 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH19 0x3A32B932B21037B33339B2BA103232B0B632B9 PUSH1 0x69 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2073656E646572206D75737420626520616E PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x2061646D696E20746F207265766F6B65 PUSH1 0x80 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x34 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265746972653A206E6F7420656E6F75676820617661696C6162 PUSH1 0x40 DUP3 ADD MSTORE PUSH20 0x6C652062616C616E636520746F20726574697265 PUSH1 0x60 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x37 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A2070726F706F73657220 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6E6F7420612072656769737465726564206465616C6572000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x25 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E7366657220746F20746865207A65726F206164 PUSH1 0x40 DUP3 ADD MSTORE PUSH5 0x6472657373 PUSH1 0xD8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A207472616E736665722063616C6C6572206973206E6F7420 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x1BDDDB995C881B9BDC88185C1C1C9BDD9959 PUSH1 0x72 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2E SWAP1 DUP3 ADD MSTORE PUSH32 0x496E697469616C697A61626C653A20636F6E747261637420697320616C726561 PUSH1 0x40 DUP3 ADD MSTORE PUSH14 0x191E481A5B9A5D1A585B1A5E9959 PUSH1 0x92 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x23 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206275726E2066726F6D20746865207A65726F2061646472 PUSH1 0x40 DUP3 ADD MSTORE PUSH3 0x657373 PUSH1 0xE8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x36 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7472616E736665723A2073656E64657220616E64207265636569 PUSH1 0x40 DUP3 ADD MSTORE PUSH22 0x7665722063616E6E6F74206265207468652073616D65 PUSH1 0x50 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x32 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A6D696E743A2063616E6E6F74206D696E74206E657720746F6B65 PUSH1 0x40 DUP3 ADD MSTORE PUSH18 0x6E7320696E206C696D69746564206D6F6465 PUSH1 0x70 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A72656769737465724465616C65723A20746F6B656E5479706549 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x1908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x82 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x26 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7472616E736665723A20746F6B656E496420646F6573206E6F74 PUSH1 0x40 DUP3 ADD MSTORE PUSH6 0x8195E1A5CDD PUSH1 0xD2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x42 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A7265676973746572436F6E73756D6572286C696D69746564293A PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x206F6E6C792061646D696E2063616E20726567697374657220636F6E73756D65 PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0x7273 PUSH1 0xF0 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x37 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x746572656420656D697373696F6E732061756469746F72000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2E SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A206D73672E73656E6465 PUSH1 0x40 DUP3 ADD MSTORE PUSH14 0x72206E6F742074696D656C6F636B PUSH1 0x90 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x33 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A676574546F6B656E52657469726564416D6F756E743A20746F6B PUSH1 0x40 DUP3 ADD MSTORE PUSH19 0x195B925908191BD95CC81B9BDD08195E1A5CDD PUSH1 0x6A SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x58 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6265666F7265546F6B656E5472616E73666572286C696D6974 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6564293A206F6E6C7920656D697373696F6E732061756469746F72732063616E PUSH1 0x60 DUP3 ADD MSTORE PUSH32 0x206973737565206175646974656420656D697373696F6E730000000000000000 PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x40 SWAP1 DUP3 ADD DUP2 SWAP1 MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A20697373756572206E6F SWAP1 DUP3 ADD MSTORE PUSH32 0x742061207265676973746572656420656D697373696F6E732061756469746F72 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x27 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6973737565286C696D69746564293A20697373756565206E6F PUSH1 0x40 DUP3 ADD MSTORE PUSH7 0x3A1030B236B4B7 PUSH1 0xC9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2073657474696E6720617070726F76616C20737461747573 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x103337B91039B2B633 PUSH1 0xB9 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x29 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206163636F756E747320616E6420696473206C656E677468 PUSH1 0x40 DUP3 ADD MSTORE PUSH9 0x40DAD2E6DAC2E8C6D PUSH1 0xBB SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x30 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20697373756572206E6F742061207265676973 PUSH1 0x40 DUP3 ADD MSTORE PUSH16 0x3A32B932B2102922A1903232B0B632B9 PUSH1 0x81 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A2069647320616E6420616D6F756E7473206C656E67746820 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0xDAD2E6DAC2E8C6D PUSH1 0xC3 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x21 SWAP1 DUP3 ADD MSTORE PUSH32 0x455243313135353A206D696E7420746F20746865207A65726F20616464726573 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x73 PUSH1 0xF8 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x3D SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A636F6E73756D65724F724465616C65723A206D73672E73656E64 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6572206E6F74206120636F6E73756D6572206F722061206465616C6572000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x24 SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F69737375653A20746F6B656E54797065496420697320696E76 PUSH1 0x40 DUP3 ADD MSTORE PUSH4 0x185B1A59 PUSH1 0xE2 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x2F SWAP1 DUP3 ADD MSTORE PUSH32 0x416363657373436F6E74726F6C3A2063616E206F6E6C792072656E6F756E6365 PUSH1 0x40 DUP3 ADD MSTORE PUSH15 0x103937B632B9903337B91039B2B633 PUSH1 0x89 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x4B SWAP1 DUP3 ADD MSTORE PUSH32 0x434C4D383A3A5F6265666F7265546F6B656E5472616E73666572286C696D6974 PUSH1 0x40 DUP3 ADD MSTORE PUSH32 0x6564293A206F6E6C792061646D696E20616E642044414F2063616E207472616E PUSH1 0x60 DUP3 ADD MSTORE PUSH11 0x7366657220746F6B656E73 PUSH1 0xA8 SHL PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x20 DUP4 ADD MSTORE PUSH1 0x20 DUP4 ADD MLOAD PUSH2 0x4596 PUSH1 0x40 DUP5 ADD DUP3 PUSH2 0x3657 JUMP JUMPDEST POP PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0x45A9 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x3542 JUMP JUMPDEST POP PUSH1 0x60 DUP4 ADD MLOAD PUSH2 0x45BC PUSH1 0x80 DUP5 ADD DUP3 PUSH2 0x3542 JUMP JUMPDEST POP PUSH1 0x80 DUP4 ADD MLOAD PUSH1 0xA0 DUP4 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH1 0xE0 DUP4 ADD MSTORE PUSH1 0xE0 DUP4 ADD MLOAD PUSH2 0x100 DUP2 DUP2 DUP6 ADD MSTORE DUP1 DUP6 ADD MLOAD SWAP2 POP POP PUSH2 0x160 PUSH2 0x120 DUP2 DUP2 DUP7 ADD MSTORE PUSH2 0x4608 PUSH2 0x180 DUP7 ADD DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP3 POP DUP1 DUP7 ADD MLOAD SWAP1 POP PUSH1 0x1F NOT PUSH2 0x140 DUP2 DUP8 DUP7 SUB ADD DUP2 DUP9 ADD MSTORE PUSH2 0x4629 DUP6 DUP5 PUSH2 0x3589 JUMP JUMPDEST SWAP1 DUP9 ADD MLOAD DUP8 DUP3 SUB SWAP1 SWAP3 ADD DUP5 DUP9 ADD MSTORE SWAP4 POP SWAP1 POP PUSH2 0x4645 DUP4 DUP3 PUSH2 0x3589 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x160 DUP14 DUP4 MSTORE DUP13 PUSH1 0x20 DUP5 ADD MSTORE DUP12 PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0xFF DUP12 AND PUSH1 0x60 DUP5 ADD MSTORE DUP10 PUSH1 0x80 DUP5 ADD MSTORE DUP9 PUSH1 0xA0 DUP5 ADD MSTORE DUP8 PUSH1 0xC0 DUP5 ADD MSTORE DUP7 PUSH1 0xE0 DUP5 ADD MSTORE DUP1 PUSH2 0x100 DUP5 ADD MSTORE PUSH2 0x46A5 DUP2 DUP5 ADD DUP8 PUSH2 0x35D4 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH2 0x120 DUP5 ADD MSTORE PUSH2 0x46BA DUP2 DUP7 PUSH2 0x35D4 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH2 0x140 DUP5 ADD MSTORE PUSH2 0x46CF DUP2 DUP6 PUSH2 0x35D4 JUMP JUMPDEST SWAP15 SWAP14 POP POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x4700 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x471E JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST PUSH1 0xE0 SHR SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x44 RETURNDATASIZE LT ISZERO PUSH2 0x474A JUMPI PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x4 DUP2 DUP3 RETURNDATACOPY PUSH4 0x8C379A0 PUSH2 0x475E DUP3 MLOAD PUSH2 0x4734 JUMP JUMPDEST EQ PUSH2 0x4768 JUMPI PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x3 NOT ADD PUSH1 0x4 DUP3 RETURNDATACOPY DUP1 MLOAD RETURNDATASIZE PUSH8 0xFFFFFFFFFFFFFFFF DUP2 PUSH1 0x24 DUP5 ADD GT DUP2 DUP5 GT OR ISZERO PUSH2 0x4798 JUMPI POP POP POP POP PUSH2 0x1100 JUMP JUMPDEST DUP3 DUP5 ADD SWAP3 POP DUP3 MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x47B2 JUMPI POP POP POP POP PUSH2 0x1100 JUMP JUMPDEST POP RETURNDATASIZE DUP4 ADD PUSH1 0x20 DUP3 DUP5 ADD ADD GT ISZERO PUSH2 0x47CA JUMPI POP POP POP PUSH2 0x1100 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND DUP2 ADD PUSH1 0x20 ADD PUSH1 0x40 MSTORE SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x2B4D JUMPI PUSH1 0x0 DUP1 REVERT INVALID GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH3 0x75726E KECCAK256 PUSH2 0x6D6F PUSH22 0x6E7420657863656564732062616C616E6365EDE6574D 0xEB 0xA8 CREATE 0x2A 0xDA PUSH25 0x88448A497B08844D62E044ED533343A673BE3FFCDE5F5E1AA5 SELFBALANCE 0xD3 0xDA 0xDE DUP13 PUSH9 0xB013A47AD41C2BCC9B SWAP15 0x4B SMOD PUSH6 0xB0FB616780E1 JUMPI DUP7 0xE7 PUSH11 0xF8890EEDD7900AD88DA619 0x2F 0xD0 RETURNDATASIZE 0xBB PUSH10 0xDBEEE963B1A0ED738ABE 0x49 0xAB CALLER BALANCE 0xAA RETURN GASLIMIT MSTORE NUMBER BALANCE BALANCE CALLDATALOAD CALLDATALOAD GASPRICE KECCAK256 PUSH10 0x6E73756666696369656E PUSH21 0x2062616C616E636520666F72207472616E73666572 0x2A 0xB9 CALL 0xDA SWAP3 0xE7 0x4A 0xAA ADD 0xEB PUSH22 0xA871557505B11DD8D36832A34BB21BBEE88B08D860E9 PUSH30 0xAD3DBE5042E7384B1572CF966A15E089576A62B5126C5EF1D184AB18B12C LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x5F ADD RETURN 0xA6 SWAP1 PUSH5 0xAD53CE9212 JUMPI MSIZE PUSH26 0x9DDED2745CBAE7146E4576954E91B333C95664736F6C63430007 STOP STOP CALLER ", - "sourceMap": "602:21550:14:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3409:228:5;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1176:148:1;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;20600:373:14:-;;;;;;:::i;:::-;;:::i;:::-;;3162:105:5;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;13707:317:14:-;;;;;;:::i;:::-;;:::i;1222:82::-;;;:::i;1439:96::-;;;:::i;4652:112:0:-;;;;;;:::i;:::-;;:::i;15278:560:14:-;;;;;;:::i;:::-;;:::i;5967:1184:5:-;;;;;;:::i;:::-;;:::i;5014:223:0:-;;;;;;:::i;:::-;;:::i;17750:650:14:-;;;;;;:::i;:::-;;:::i;16472:135::-;;;;;;:::i;:::-;;:::i;6188:205:0:-;;;;;;:::i;:::-;;:::i;18549:330:14:-;;;;;;:::i;:::-;;:::i;3794:530:5:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;19868:345:14:-;;;;;;:::i;:::-;;:::i;6140:114::-;;;:::i;15963:381::-;;;;;;:::i;:::-;;:::i;14156:492::-;;;;;;:::i;:::-;;:::i;1541:104::-;;;:::i;1672:86::-;;;:::i;21095:314::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;4335:136:0:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3320:137::-;;;;;;:::i;:::-;;:::i;21477:149:14:-;;;;;;:::i;:::-;;:::i;14757:308::-;;;;;;:::i;:::-;;:::i;2097:49:0:-;;;:::i;4392:306:5:-;;;;;;:::i;:::-;;:::i;20979:110:14:-;;;;;;:::i;:::-;;:::i;21754:166::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3831:593::-;;;;;;:::i;:::-;;:::i;3625:125:0:-;;;;;;:::i;:::-;;:::i;17058:510:14:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;5471:226:0:-;;;;;;:::i;:::-;;:::i;815:23:14:-;;;:::i;22024:125::-;;;;;;:::i;:::-;;:::i;19005:735::-;;;;;;:::i;:::-;;:::i;4765:166:5:-;;;;;;:::i;:::-;;:::i;9042:777:14:-;;;;;;:::i;:::-;;:::i;4998:897:5:-;;;;;;:::i;:::-;;:::i;932:20:14:-;;;:::i;1343:90::-;;;:::i;8227:581::-;;;;;;:::i;:::-;;:::i;3409:228:5:-;3495:7;-1:-1:-1;;;;;3522:21:5;;3514:77;;;;-1:-1:-1;;;3514:77:5;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;3608:13:5;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;3608:22:5;;;;;;;;;;3409:228;;;;;:::o;1176:148:1:-;-1:-1:-1;;;;;;1284:33:1;;1261:4;1284:33;;;:20;:33;;;;;;;;1176:148;;;;:::o;20600:373:14:-;4468:15;4486:40;-1:-1:-1;;;;;;;;;;;4515:10:14;4486:7;:40::i;:::-;4468:58;;4536:16;4555:42;-1:-1:-1;;;;;;;;;;;4586:10:14;4555:7;:42::i;:::-;4536:61;;4607:16;4626:45;-1:-1:-1;;;;;;;;;;;4660:10:14;4626:7;:45::i;:::-;4607:64;;4681:15;4699:49;-1:-1:-1;;;;;;;;;;;4737:10:14;4699:7;:49::i;:::-;4681:67;;4780:10;:25;;;;4794:11;4780:25;:40;;;;4809:11;4780:40;:54;;;;4824:10;4780:54;4759:162;;;;-1:-1:-1;;;4759:162:14;;;;;;;:::i;:::-;20736:20:::1;20748:7;20736:11;:20::i;:::-;20728:71;;;;-1:-1:-1::0;;;20728:71:14::1;;;;;;;:::i;:::-;20818:10;-1:-1:-1::0;;;;;20818:16:14;::::1;;;20809:85;;;;-1:-1:-1::0;;;20809:85:14::1;;;;;;;:::i;:::-;20904:62;20927:10;20939:2;20943:7;20952:5;20904:62;;;;;;;;;;;;;-1:-1:-1::0;;;20904:62:14::1;;::::0;:22:::1;:62::i;:::-;20600:373:::0;;;;;;;:::o;3162:105:5:-;3256:4;3249:11;;;;;;;;-1:-1:-1;;3249:11:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3224:13;;3249:11;;3256:4;;3249:11;;3256:4;3249:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3162:105;;;:::o;13707:317:14:-;5405:39;2142:4:0;5433:10:14;5405:7;:39::i;:::-;5384:127;;;;-1:-1:-1;;;5384:127:14;;;;;;;:::i;:::-;13825:20:::1;13837:7;13825:11;:20::i;:::-;13817:67;;;;-1:-1:-1::0;;;13817:67:14::1;;;;;;;:::i;:::-;13903:11;::::0;::::1;;13902:12;13894:75;;;;-1:-1:-1::0;;;13894:75:14::1;;;;;;;:::i;:::-;13979:38;13991:2;13995:7;14004:8;13979:38;;;;;;;;;;;::::0;:11:::1;:38::i;:::-;13707:317:::0;;;:::o;1222:82::-;-1:-1:-1;;;;;;;;;;;1222:82:14;:::o;1439:96::-;-1:-1:-1;;;;;;;;;;;1439:96:14;:::o;4652:112:0:-;4709:7;4735:12;;;:6;:12;;;;;:22;;;;4652:112::o;15278:560:14:-;4468:15;4486:40;-1:-1:-1;;;;;;;;;;;4515:10:14;4486:7;:40::i;:::-;4468:58;;4536:16;4555:42;-1:-1:-1;;;;;;;;;;;4586:10:14;4555:7;:42::i;:::-;4536:61;;4607:16;4626:45;-1:-1:-1;;;;;;;;;;;4660:10:14;4626:7;:45::i;:::-;4607:64;;4681:15;4699:49;-1:-1:-1;;;;;;;;;;;4737:10:14;4699:7;:49::i;:::-;4681:67;;4780:10;:25;;;;4794:11;4780:25;:40;;;;4809:11;4780:40;:54;;;;4824:10;4780:54;4759:162;;;;-1:-1:-1;;;4759:162:14;;;;;;;:::i;:::-;15393:20:::1;15405:7;15393:11;:20::i;:::-;15385:69;;;;-1:-1:-1::0;;;15385:69:14::1;;;;;;;:::i;:::-;15484:36;15500:10;15512:7;15484:15;:36::i;:::-;15474:6;:46;;15464:115;;;;-1:-1:-1::0;;;15464:115:14::1;;;;;;;:::i;:::-;15590:40;15602:10;15614:7;15623:6;15590:11;:40::i;:::-;15680:25;::::0;;;:16:::1;:25;::::0;;;;;;;15706:10:::1;15680:37:::0;;;;;;;;:49:::1;::::0;15722:6;15680:41:::1;:49::i;:::-;15640:25;::::0;;;:16:::1;:25;::::0;;;;;;;15666:10:::1;15640:37:::0;;;;;;;;;:89;;;;15744:87;::::1;::::0;::::1;::::0;15657:7;;15815:6;;15744:87:::1;:::i;:::-;;;;;;;;15278:560:::0;;;;;;:::o;5967:1184:5:-;6221:7;:14;6207:3;:10;:28;6199:81;;;;-1:-1:-1;;;6199:81:5;;;;;;;:::i;:::-;-1:-1:-1;;;;;6298:16:5;;6290:66;;;;-1:-1:-1;;;6290:66:5;;;;;;;:::i;:::-;6395:12;:10;:12::i;:::-;-1:-1:-1;;;;;6387:20:5;:4;-1:-1:-1;;;;;6387:20:5;;:60;;;;6411:36;6428:4;6434:12;:10;:12::i;6411:36::-;6366:157;;;;-1:-1:-1;;;6366:157:5;;;;;;;:::i;:::-;6534:16;6553:12;:10;:12::i;:::-;6534:31;;6576:60;6597:8;6607:4;6613:2;6617:3;6622:7;6631:4;6576:20;:60::i;:::-;6652:9;6647:349;6671:3;:10;6667:1;:14;6647:349;;;6702:10;6715:3;6719:1;6715:6;;;;;;;;;;;;;;6702:19;;6735:14;6752:7;6760:1;6752:10;;;;;;;;;;;;;;6735:27;;6799:123;6840:6;6799:123;;;;;;;;;;;;;;;;;:9;:13;6809:2;6799:13;;;;;;;;;;;:19;6813:4;-1:-1:-1;;;;;6799:19:5;-1:-1:-1;;;;;6799:19:5;;;;;;;;;;;;;:23;;:123;;;;;:::i;:::-;6777:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;6777:19:5;;;;;;;;;;:145;;;;6956:17;;;;;;:29;;6978:6;6956:21;:29::i;:::-;6936:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;6936:17:5;;;;;;;;;;:49;;;;-1:-1:-1;6683:3:5;;6647:349;;;;7041:2;-1:-1:-1;;;;;7011:47:5;7035:4;-1:-1:-1;;;;;7011:47:5;7025:8;-1:-1:-1;;;;;7011:47:5;;7045:3;7050:7;7011:47;;;;;;;:::i;:::-;;;;;;;;7069:75;7105:8;7115:4;7121:2;7125:3;7130:7;7139:4;7069:35;:75::i;:::-;5967:1184;;;;;;:::o;5014:223:0:-;5105:12;;;;:6;:12;;;;;:22;;;5097:45;;5129:12;:10;:12::i;5097:45::-;5089:105;;;;-1:-1:-1;;;5089:105:0;;;;;;;:::i;:::-;5205:25;5216:4;5222:7;5205:10;:25::i;:::-;5014:223;;:::o;17750:650:14:-;5405:39;2142:4:0;5433:10:14;5405:7;:39::i;:::-;5384:127;;;;-1:-1:-1;;;5384:127:14;;;;;;;:::i;:::-;17867:31:::1;17886:11;17867:18;:31::i;:::-;17859:92;;;;-1:-1:-1::0;;;17859:92:14::1;;;;;;;:::i;:::-;17965:11;:16;;17980:1;17965:16;17961:264;;;17997:41;-1:-1:-1::0;;;;;;;;;;;18030:7:14::1;17997:9;:41::i;:::-;17961:264;;;18059:11;:16;;18074:1;18059:16;18055:170;;;18091:44;-1:-1:-1::0;;;;;;;;;;;18127:7:14::1;18091:9;:44::i;18055:170::-;18166:48;-1:-1:-1::0;;;;;;;;;;;18206:7:14::1;18166:9;:48::i;:::-;18316:37;-1:-1:-1::0;;;;;;;;;;;18345:7:14::1;18316:9;:37::i;:::-;18368:25;::::0;-1:-1:-1;;;;;18368:25:14;::::1;::::0;::::1;::::0;;;::::1;17750:650:::0;;:::o;16472:135::-;16540:4;16563:37;-1:-1:-1;;;;;;;;;;;16592:7:14;16563;:37::i;6188:205:0:-;6285:12;:10;:12::i;:::-;-1:-1:-1;;;;;6274:23:0;:7;-1:-1:-1;;;;;6274:23:0;;6266:83;;;;-1:-1:-1;;;6266:83:0;;;;;;;:::i;:::-;6360:26;6372:4;6378:7;6360:11;:26::i;18549:330:14:-;4978:16;4997:42;-1:-1:-1;;;;;;;;;;;5028:10:14;4997:7;:42::i;:::-;4978:61;;5049:16;5068:45;-1:-1:-1;;;;;;;;;;;5102:10:14;5068:7;:45::i;:::-;5049:64;;5123:15;5141:49;-1:-1:-1;;;;;;;;;;;5179:10:14;5141:7;:49::i;:::-;5123:67;;5222:11;:26;;;;5237:11;5222:26;:40;;;;5252:10;5222:40;5201:128;;;;-1:-1:-1;;;5201:128:14;;;;;;;:::i;:::-;18626:11:::1;::::0;::::1;;18622:160;;;18661:39;2142:4:0;18689:10:14;18661:7;:39::i;:::-;18653:118;;;;-1:-1:-1::0;;;18653:118:14::1;;;;;;;:::i;:::-;18791:39;-1:-1:-1::0;;;;;;;;;;;18822:7:14::1;18791:9;:39::i;:::-;18845:27;::::0;-1:-1:-1;;;;;18845:27:14;::::1;::::0;::::1;::::0;;;::::1;18549:330:::0;;;;:::o;3794:530:5:-;3967:16;4026:3;:10;4007:8;:15;:29;3999:83;;;;-1:-1:-1;;;3999:83:5;;;;;;;:::i;:::-;4093:30;4140:8;:15;4126:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4126:30:5;;4093:63;;4172:9;4167:120;4191:8;:15;4187:1;:19;4167:120;;;4246:30;4256:8;4265:1;4256:11;;;;;;;;;;;;;;4269:3;4273:1;4269:6;;;;;;;;;;;;;;4246:9;:30::i;:::-;4227:13;4241:1;4227:16;;;;;;;;;;;;;;;;;:49;4208:3;;4167:120;;;-1:-1:-1;4304:13:5;3794:530;-1:-1:-1;;;3794:530:5:o;19868:345:14:-;4978:16;4997:42;-1:-1:-1;;;;;;;;;;;5028:10:14;4997:7;:42::i;:::-;4978:61;;5049:16;5068:45;-1:-1:-1;;;;;;;;;;;5102:10:14;5068:7;:45::i;:::-;5049:64;;5123:15;5141:49;-1:-1:-1;;;;;;;;;;;5179:10:14;5141:7;:49::i;:::-;5123:67;;5222:11;:26;;;;5237:11;5222:26;:40;;;;5252:10;5222:40;5201:128;;;;-1:-1:-1;;;5201:128:14;;;;;;;:::i;:::-;19947:11:::1;::::0;::::1;;19943:164;;;19982:39;2142:4:0;20010:10:14;19982:7;:39::i;:::-;19974:122;;;;-1:-1:-1::0;;;19974:122:14::1;;;;;;;:::i;:::-;20116:46;-1:-1:-1::0;;;;;;;;;;;20154:7:14::1;20116:16;:46::i;:::-;20177:29;::::0;-1:-1:-1;;;;;20177:29:14;::::1;::::0;::::1;::::0;;;::::1;19868:345:::0;;;;:::o;6140:114::-;6193:7;6219:28;:18;:26;:28::i;:::-;6212:35;;6140:114;;:::o;15963:381::-;16029:4;16045:16;16064:39;-1:-1:-1;;;;;;;;;;;16095:7:14;16064;:39::i;:::-;16045:58;;16113:16;16132:42;-1:-1:-1;;;;;;;;;;;16166:7:14;16132;:42::i;:::-;16113:61;;16184:15;16202:46;-1:-1:-1;;;;;;;;;;;16240:7:14;16202;:46::i;:::-;16184:64;;16262:11;:26;;;;16277:11;16262:26;:40;;;;16292:10;16262:40;16258:57;;;16311:4;16304:11;;;;;;;16258:57;-1:-1:-1;16332:5:14;;15963:381;-1:-1:-1;;;;15963:381:14:o;14156:492::-;14242:13;14279:20;14291:7;14279:11;:20::i;:::-;14271:75;;;;-1:-1:-1;;;14271:75:14;;;;;;;:::i;:::-;14356:32;14391:22;;;:13;:22;;;;;14428:17;;;;;;;:22;14424:181;;;-1:-1:-1;;14466:37:14;;;;;;;;;;;;;;;;;;;14424:181;14524:17;;;;;;14545:1;14524:22;14520:85;;;-1:-1:-1;;14562:32:14;;;;;;;;;;;;;;;;;;;14520:85;-1:-1:-1;;14614:26:14;;;;;;;;;;;;-1:-1:-1;;;14614:26:14;;;;14156:492;;;:::o;1541:104::-;-1:-1:-1;;;;;;;;;;;1541:104:14;:::o;1672:86::-;-1:-1:-1;;;;;;;;;;;1672:86:14;:::o;21095:314::-;21208:7;21217;21240:17;21260:33;21276:7;21285;21260:15;:33::i;:::-;21321:44;;-1:-1:-1;;;21321:44:14;;21240:53;;-1:-1:-1;21303:15:14;;21321:4;;:26;;:44;;21348:7;;21357;;21321:44;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21383:9;;;;-1:-1:-1;21095:314:14;;-1:-1:-1;;;;21095:314:14:o;4335:136:0:-;4408:7;4434:12;;;:6;:12;;;;;:30;;4458:5;4434:23;:30::i;:::-;4427:37;4335:136;-1:-1:-1;;;4335:136:0:o;3320:137::-;3389:4;3412:12;;;:6;:12;;;;;:38;;3442:7;3412:29;:38::i;21477:149:14:-;21560:7;21590:22;;;:13;:22;;;;;:29;;;;;;-1:-1:-1;;;;;21590:29:14;;21477:149::o;14757:308::-;14867:7;14898:20;14910:7;14898:11;:20::i;:::-;14890:84;;;;-1:-1:-1;;;14890:84:14;;;;;;;:::i;:::-;-1:-1:-1;14984:14:14;15001:25;;;:16;:25;;;;;;;;-1:-1:-1;;;;;15001:34:14;;;;;;;;;;;;14757:308::o;2097:49:0:-;2142:4;2097:49;:::o;4392:306:5:-;4510:8;-1:-1:-1;;;;;4494:24:5;:12;:10;:12::i;:::-;-1:-1:-1;;;;;4494:24:5;;;4486:78;;;;-1:-1:-1;;;4486:78:5;;;;;;;:::i;:::-;4620:8;4575:18;:32;4594:12;:10;:12::i;:::-;-1:-1:-1;;;;;4575:32:5;;;;;;;;;;;;;;;;;-1:-1:-1;4575:32:5;;;:42;;;;;;;;;;;;:53;;-1:-1:-1;;4575:53:5;;;;;;;;;;;4658:12;:10;:12::i;:::-;-1:-1:-1;;;;;4643:48:5;;4682:8;4643:48;;;;;;:::i;:::-;;;;;;;;4392:306;;:::o;20979:110:14:-;5405:39;2142:4:0;5433:10:14;5405:7;:39::i;:::-;5384:127;;;;-1:-1:-1;;;5384:127:14;;;;;;;:::i;:::-;21062:8:::1;:20:::0;;-1:-1:-1;;;;;;21062:20:14::1;-1:-1:-1::0;;;;;21062:20:14;;;::::1;::::0;;;::::1;::::0;;20979:110::o;21754:166::-;21843:25;;:::i;:::-;21891:22;;;;:13;:22;;;;;;;;;21884:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21884:29:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;21884:29:14;;;;;;;;;;;;;;;;;;;;;;;;;;21891:22;;21884:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;21884:29:14;;;-1:-1:-1;;21884:29:14;;;;;;;;;;;;;;;;-1:-1:-1;;21884:29:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;21884:29:14;;;-1:-1:-1;;21884:29:14;;;;;;;;;;;;;;;;-1:-1:-1;;21884:29:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21754:166;;;:::o;3831:593::-;1512:13:4;;;;;;;;:33;;;1529:16;:14;:16::i;:::-;1512:50;;;-1:-1:-1;1550:12:4;;;;1549:13;1512:50;1504:109;;;;-1:-1:-1;;;1504:109:4;;;;;;;:::i;:::-;1624:19;1647:13;;;;;;1646:14;1670:98;;;;1704:13;:20;;-1:-1:-1;;;;1704:20:4;;;;;1738:19;1720:4;1738:19;;;1670:98;3897:18:14::1;;;;;;;;;;;;::::0;:14:::1;:18::i;:::-;3973:53;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;3973:13:14::1;:53::i;:::-;4061:38;2142:4:0;4092:6:14::0;4061:10:::1;:38::i;:::-;4109:37;-1:-1:-1::0;;;;;;;;;;;4139:6:14::1;4109:10;:37::i;:::-;4156:41;-1:-1:-1::0;;;;;;;;;;;4190:6:14::1;4156:10;:41::i;:::-;4207:44;-1:-1:-1::0;;;;;;;;;;;4244:6:14::1;4207:10;:44::i;:::-;4261:48;-1:-1:-1::0;;;;;;;;;;;4302:6:14::1;4261:10;:48::i;:::-;4319:5;:14:::0;;4366:8:::1;:21:::0;;-1:-1:-1;;;;;;4366:21:14::1;::::0;;-1:-1:-1;;;;;;4319:14:14::1;;-1:-1:-1::0;;;;;4319:14:14;::::1;;;-1:-1:-1::0;;4398:19:14::1;::::0;;1790:66:4;;;;1840:5;1824:21;;-1:-1:-1;;1824:21:4;;;3831:593:14;;:::o;3625:125:0:-;3688:7;3714:12;;;:6;:12;;;;;:29;;:27;:29::i;17058:510:14:-;17116:4;;;;;;17171:36;17116:4;17199:7;17171;:36::i;:::-;17156:51;;17217:16;17236:39;-1:-1:-1;;;;;;;;;;;17267:7:14;17236;:39::i;:::-;17217:58;;17285:16;17304:42;-1:-1:-1;;;;;;;;;;;17338:7:14;17304;:42::i;:::-;17285:61;;17356:15;17374:46;-1:-1:-1;;;;;;;;;;;17412:7:14;17374;:46::i;:::-;17356:64;;17430:15;17448:37;-1:-1:-1;;;;;;;;;;;17477:7:14;17448;:37::i;:::-;17503:7;;17512:11;;-1:-1:-1;17525:11:14;;-1:-1:-1;17525:11:14;-1:-1:-1;17503:7:14;;-1:-1:-1;17058:510:14;-1:-1:-1;;;17058:510:14:o;5471:226:0:-;5563:12;;;;:6;:12;;;;;:22;;;5555:45;;5587:12;:10;:12::i;5555:45::-;5547:106;;;;-1:-1:-1;;;5547:106:0;;;;;;;:::i;815:23:14:-;;;;;;:::o;22024:125::-;5405:39;2142:4:0;5433:10:14;5405:7;:39::i;:::-;5384:127;;;;-1:-1:-1;;;5384:127:14;;;;;;;:::i;:::-;22116:11:::1;:26:::0;;-1:-1:-1;;22116:26:14::1;::::0;::::1;;::::0;;;::::1;::::0;;22024:125::o;19005:735::-;5405:39;2142:4:0;5433:10:14;5405:7;:39::i;:::-;5384:127;;;;-1:-1:-1;;;5384:127:14;;;;;;;:::i;:::-;19124:31:::1;19143:11;19124:18;:31::i;:::-;19116:94;;;;-1:-1:-1::0;;;19116:94:14::1;;;;;;;:::i;:::-;19224:11;:16;;19239:1;19224:16;19220:285;;;19256:48;-1:-1:-1::0;;;;;;;;;;;19296:7:14::1;19256:16;:48::i;:::-;19220:285;;;19325:11;:16;;19340:1;19325:16;19321:184;;;19357:51;-1:-1:-1::0;;;;;;;;;;;19400:7:14::1;19357:16;:51::i;19321:184::-;19439:55;-1:-1:-1::0;;;;;;;;;;;19486:7:14::1;19439:16;:55::i;:::-;19599:27;19618:7;19599:18;:27::i;:::-;19594:97;;19642:38;-1:-1:-1::0;;;;;;;;;;;19672:7:14::1;19642:10;:38::i;:::-;19706:27;::::0;-1:-1:-1;;;;;19706:27:14;::::1;::::0;::::1;::::0;;;::::1;19005:735:::0;;:::o;4765:166:5:-;-1:-1:-1;;;;;4887:27:5;;;4864:4;4887:27;;;:18;:27;;;;;;;;:37;;;;;;;;;;;;;;;4765:166::o;9042:777:14:-;9414:8;;-1:-1:-1;;;;;9414:8:14;9400:10;:22;;9399:67;;-1:-1:-1;9427:39:14;2142:4:0;9455:10:14;9427:7;:39::i;:::-;9378:167;;;;-1:-1:-1;;;9378:167:14;;;;;;;:::i;:::-;9563:249;9583:6;9603;9623:11;9648:8;9670;9692;9714:19;9747:8;9769;9791:11;9563:6;:249::i;:::-;9042:777;;;;;;;;;;:::o;4998:897:5:-;-1:-1:-1;;;;;5213:16:5;;5205:66;;;;-1:-1:-1;;;5205:66:5;;;;;;;:::i;:::-;5310:12;:10;:12::i;:::-;-1:-1:-1;;;;;5302:20:5;:4;-1:-1:-1;;;;;5302:20:5;;:60;;;;5326:36;5343:4;5349:12;:10;:12::i;5326:36::-;5281:148;;;;-1:-1:-1;;;5281:148:5;;;;;;;:::i;:::-;5440:16;5459:12;:10;:12::i;:::-;5440:31;;5482:96;5503:8;5513:4;5519:2;5523:21;5541:2;5523:17;:21::i;:::-;5546:25;5564:6;5546:17;:25::i;:::-;5573:4;5482:20;:96::i;:::-;5611:77;5635:6;5611:77;;;;;;;;;;;;;;;;;:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;5611:19:5;;;;;;;;;;;:77;:23;:77::i;:::-;5589:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;5589:19:5;;;;;;;;;;:99;;;;5718:17;;;;;;:29;;5740:6;5718:21;:29::i;:::-;5698:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;5698:17:5;;;;;;;;;;;;;;:49;;;;5763:46;;5698:17;;5763:46;;;;;;;;;;;;5708:2;;5802:6;;5763:46;:::i;:::-;;;;;;;;5820:68;5851:8;5861:4;5867:2;5871;5875:6;5883:4;5820:30;:68::i;932:20:14:-;;;;;;-1:-1:-1;;;;;932:20:14;;:::o;1343:90::-;-1:-1:-1;;;;;;;;;;;1343:90:14;:::o;8227:581::-;4978:16;4997:42;-1:-1:-1;;;;;;;;;;;5028:10:14;4997:7;:42::i;:::-;4978:61;;5049:16;5068:45;-1:-1:-1;;;;;;;;;;;5102:10:14;5068:7;:45::i;:::-;5049:64;;5123:15;5141:49;-1:-1:-1;;;;;;;;;;;5179:10:14;5141:7;:49::i;:::-;5123:67;;5222:11;:26;;;;5237:11;5222:26;:40;;;;5252:10;5222:40;5201:128;;;;-1:-1:-1;;;5201:128:14;;;;;;;:::i;:::-;8548:253:::1;8568:6;8588:10;8612:11;8637:8;8659;8681;8703:19;8736:8;8758;8780:11;8548:6;:253::i;:::-;8227:581:::0;;;;;;;;;;;;:::o;5598:184::-;5658:4;5710:7;5678:28;:18;:26;:28::i;:::-;:39;5674:56;;-1:-1:-1;5726:4:14;5719:11;;5674:56;-1:-1:-1;5747:5:14;5598:184;;;:::o;8448:572:5:-;-1:-1:-1;;;;;8562:21:5;;8554:67;;;;-1:-1:-1;;;8554:67:5;;;;;;;:::i;:::-;8632:16;8651:12;:10;:12::i;:::-;8632:31;;8674:107;8695:8;8713:1;8717:7;8726:21;8744:2;8726:17;:21::i;8674:107::-;8817:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;8817:22:5;;;;;;;;;;:34;;8844:6;8817:26;:34::i;:::-;8792:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;8792:22:5;;;;;;;;;;;;;:59;;;;8866:57;;;;;;;;;8802:2;;8916:6;;8866:57;:::i;:::-;;;;;;;;8934:79;8965:8;8983:1;8987:7;8996:2;9000:6;9008:4;8934:30;:79::i;:::-;8448:572;;;;;:::o;10314:538::-;-1:-1:-1;;;;;10409:21:5;;10401:69;;;;-1:-1:-1;;;10401:69:5;;;;;;;:::i;:::-;10481:16;10500:12;:10;:12::i;:::-;10481:31;;10523:105;10544:8;10554:7;10571:1;10575:21;10593:2;10575:17;:21::i;:::-;10598:25;10616:6;10598:17;:25::i;:::-;10523:105;;;;;;;;;;;;:20;:105::i;:::-;10664:108;10704:6;10664:108;;;;;;;;;;;;;;;;;:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;10664:22:5;;;;;;;;;;;:108;:26;:108::i;:::-;10639:13;;;;:9;:13;;;;;;;;-1:-1:-1;;;;;10639:22:5;;;;;;;;;;;;;:133;;;;10788:57;10639:13;;:22;10788:57;;;;;;;;10649:2;;10838:6;;10788:57;:::i;:::-;;;;;;;;10314:538;;;;:::o;2701:175:3:-;2759:7;2790:5;;;2813:6;;;;2805:46;;;;-1:-1:-1;;;2805:46:3;;;;;;;:::i;828:104:10:-;915:10;828:104;:::o;6358:1516:14:-;6617:66;6644:8;6654:4;6660:2;6664:3;6669:7;6678:4;6617:26;:66::i;:::-;6699:6;6694:1174;6715:3;:10;6711:1;:14;6694:1174;;;6747:32;6782:13;:21;6796:3;6800:1;6796:6;;;;;;;;;;;;;;6782:21;;;;;;;;;;;6747:56;;6881:11;;;;;;;;;;;6877:981;;;-1:-1:-1;;;;;6972:16:14;;6968:71;;7012:8;;;6968:71;7295:17;;;;;;7316:1;7295:22;7291:553;;7386:8;;-1:-1:-1;;;;;7374:20:14;;;7386:8;;7374:20;;:61;;-1:-1:-1;7398:37:14;2142:4:0;7426:8:14;7398:7;:37::i;:::-;7341:219;;;;-1:-1:-1;;;7341:219:14;;;;;;;:::i;:::-;7291:553;;;7640:47;-1:-1:-1;;;;;;;;;;;7678:8:14;7640:7;:47::i;:::-;7607:218;;;;-1:-1:-1;;;7607:218:14;;;;;;;:::i;:::-;6694:1174;;6727:3;;6694:1174;;5443:163:3;5529:7;5564:12;5556:6;;;;5548:29;;;;-1:-1:-1;;;5548:29:3;;;;;;;;:::i;:::-;-1:-1:-1;;;5594:5:3;;;5443:163::o;13695:800:5:-;13939:15;:2;-1:-1:-1;;;;;13939:13:5;;:15::i;:::-;13935:554;;;13974:90;;-1:-1:-1;;;13974:90:5;;-1:-1:-1;;;;;13974:54:5;;;;;:90;;14029:8;;14039:4;;14045:3;;14050:7;;14059:4;;13974:90;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13974:90:5;;;;;;;;-1:-1:-1;;13974:90:5;;;;;;;;;;;;:::i;:::-;;;13970:509;;;;:::i;:::-;;;;;;;;14355:6;14348:14;;-1:-1:-1;;;14348:14:5;;;;;;;;:::i;13970:509::-;14402:62;;-1:-1:-1;;;14402:62:5;;;;;;;:::i;13970:509::-;-1:-1:-1;;;;;;14113:75:5;;-1:-1:-1;;;14113:75:5;14109:172;;14212:50;;-1:-1:-1;;;14212:50:5;;;;;;;:::i;7395:184:0:-;7468:12;;;;:6;:12;;;;;:33;;7493:7;7468:24;:33::i;:::-;7464:109;;;7549:12;:10;:12::i;:::-;-1:-1:-1;;;;;7522:40:0;7540:7;-1:-1:-1;;;;;7522:40:0;7534:4;7522:40;;;;;;;;;;7395:184;;:::o;5857:217:14:-;5926:4;5961:1;5947:11;:15;;;5946:39;;;;;5983:1;5968:11;:16;;;;5946:39;5942:81;;;-1:-1:-1;6008:4:14;6001:11;;7585:188:0;7659:12;;;;:6;:12;;;;;:36;;7687:7;7659:27;:36::i;:::-;7655:112;;;7743:12;:10;:12::i;:::-;-1:-1:-1;;;;;7716:40:0;7734:7;-1:-1:-1;;;;;7716:40:0;7728:4;7716:40;;;;;;;;;;7585:188;;:::o;1139:112:11:-;1230:14;;1139:112::o;7688:156:12:-;7762:7;7812:22;7816:3;7828:5;7812:3;:22::i;6995:165::-;7075:4;7098:55;7108:3;-1:-1:-1;;;;;7128:23:12;;7098:9;:55::i;1952:123:4:-;2000:4;2024:44;2062:4;2024:29;:44::i;:::-;2023:45;2016:52;;1952:123;:::o;2185:183:5:-;1512:13:4;;;;;;;;:33;;;1529:16;:14;:16::i;:::-;1512:50;;;-1:-1:-1;1550:12:4;;;;1549:13;1512:50;1504:109;;;;-1:-1:-1;;;1504:109:4;;;;;;;:::i;:::-;1624:19;1647:13;;;;;;1646:14;1670:98;;;;1704:13;:20;;-1:-1:-1;;;;1704:20:4;;;;;1738:19;1720:4;1738:19;;;1670:98;2260:26:5::1;:24;:26::i;:::-;2296:25;:23;:25::i;:::-;2331:30;2356:4;2331:24;:30::i;:::-;1794:14:4::0;1790:66;;;1840:5;1824:21;;-1:-1:-1;;1824:21:4;;;2185:183:5;;:::o;7193:196:0:-;7304:12;;;;:6;:12;;;;;;:22;;;7281:57;;7328:9;;7311:4;;7281:57;;7304:12;7281:57;7348:12;;;;:6;:12;;;;;;:22;;:34;7193:196::o;7241:115:12:-;7304:7;7330:19;7338:3;7330:7;:19::i;9825:3697:14:-;10187:32;10206:12;10187:18;:32::i;:::-;10166:115;;;;-1:-1:-1;;;10166:115:14;;;;;;;:::i;:::-;10296:11;;;;10292:1598;;;10327:12;:17;;10343:1;10327:17;:38;;;;10348:12;:17;;10364:1;10348:17;10327:38;10323:853;;;10429:8;;-1:-1:-1;;;;;10429:8:14;10415:10;:22;10386:139;;;;-1:-1:-1;;;10386:139:14;;;;;;;:::i;:::-;10572:36;2142:4:0;10600:7:14;10572;:36::i;:::-;10543:146;;;;-1:-1:-1;;;10543:146:14;;;;;;;:::i;:::-;10736:39;-1:-1:-1;;;;;;;;;;;10767:7:14;10736;:39::i;:::-;:85;;;;10779:42;-1:-1:-1;;;;;;;;;;;10813:7:14;10779;:42::i;:::-;10707:211;;;;-1:-1:-1;;;10707:211:14;;;;;;;:::i;:::-;10323:853;;;10943:12;:17;;10959:1;10943:17;10939:237;;;11009:46;-1:-1:-1;;;;;;;;;;;11047:7:14;11009;:46::i;:::-;10980:181;;;;-1:-1:-1;;;10980:181:14;;;;;;;:::i;:::-;10292:1598;;;11210:12;:17;;11226:1;11210:17;11206:674;;;11276:39;-1:-1:-1;;;;;;;;;;;11307:7:14;11276;:39::i;:::-;11247:158;;;;-1:-1:-1;;;11247:158:14;;;;;;;:::i;11206:674::-;11430:12;:17;;11446:1;11430:17;11426:454;;;11496:42;-1:-1:-1;;;;;;;;;;;11530:7:14;11496;:42::i;:::-;11467:164;;;;-1:-1:-1;;;11467:164:14;;;;;;;:::i;11426:454::-;11656:12;:17;;11672:1;11656:17;11652:228;;;11722:46;-1:-1:-1;;;;;;;;;;;11760:7:14;11722;:46::i;:::-;11693:172;;;;-1:-1:-1;;;11693:172:14;;;;;;;:::i;:::-;11938:30;:18;:28;:30::i;:::-;12011:36;12050:13;:43;12064:28;:18;:26;:28::i;:::-;12050:43;;;;;;;;;;;12011:82;;12124:28;:18;:26;:28::i;:::-;12104:9;:17;;:48;;;;12186:12;12162:9;:21;;;:36;;;;;;;;;;;;;;;;;;12227:7;12208:9;:16;;;:26;;;;;-1:-1:-1;;;;;12208:26:14;;;;;-1:-1:-1;;;;;12208:26:14;;;;;;12263:7;12244:9;:16;;;:26;;;;;-1:-1:-1;;;;;12244:26:14;;;;;-1:-1:-1;;;;;12244:26:14;;;;;;12301:9;12280;:18;;:30;;;;12341:9;12320;:18;;:30;;;;12392:20;12360:9;:29;;:52;;;;12446:15;12422:9;:21;;:39;;;;12492:9;12471;:18;;:30;;;;;;;;;;;;:::i;:::-;-1:-1:-1;12511:30:14;;;;:18;;;;:30;;;;;:::i;:::-;-1:-1:-1;12551:36:14;;;;:21;;;;:36;;;;;:::i;:::-;;12598:65;12610:7;12619:28;:18;:26;:28::i;:::-;12649:9;12598:65;;;;;;;;;;;;:11;:65::i;:::-;12722:12;:17;;12738:1;12722:17;12718:245;;;12767:16;;;;12785:17;;12755:59;;-1:-1:-1;;;;;12767:16:14;;12804:9;12755:11;:59::i;:::-;12901:17;;12884:35;;;;:16;:35;;;;;;;;12920:16;;;;-1:-1:-1;;;;;12920:16:14;12884:53;;;;;;;;:68;;12942:9;12884:57;:68::i;:::-;12845:17;;12828:35;;;;:16;:35;;;;;;;;12864:16;;;;-1:-1:-1;;;;;12864:16:14;12828:53;;;;;;;:124;12718:245;13248:9;:16;;;;;;;;;;-1:-1:-1;;;;;13248:16:14;-1:-1:-1;;;;;13036:479:14;13218:9;:16;;;;;;;;;;-1:-1:-1;;;;;13218:16:14;-1:-1:-1;;;;;13036:479:14;;13062:9;13085:16;:35;13102:9;:17;;;13085:35;;;;;;;;;;;:53;13121:9;:16;;;;;;;;;;-1:-1:-1;;;;;13121:16:14;-1:-1:-1;;;;;13085:53:14;-1:-1:-1;;;;;13085:53:14;;;;;;;;;;;;;13152:9;:17;;;13183:9;:21;;;;;;;;;;;;13278:9;:18;;;13310:9;:18;;;13342:9;:29;;;13385:9;:21;;;13420:9;:18;;13452:9;:18;;13484:9;:21;;13036:479;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;9825:3697;;;;;;;;;;;:::o;14501:193:5:-;14620:16;;;14634:1;14620:16;;;;;;;;;14567;;;;14620;;;;;;;;;;;;-1:-1:-1;14620:16:5;14595:41;;14657:7;14646:5;14652:1;14646:8;;;;;;;;;;;;;;;;;:18;14682:5;14501:193;-1:-1:-1;;14501:193:5:o;12926:763::-;13145:15;:2;-1:-1:-1;;;;;13145:13:5;;:15::i;:::-;13141:542;;;13180:83;;-1:-1:-1;;;13180:83:5;;-1:-1:-1;;;;;13180:49:5;;;;;:83;;13230:8;;13240:4;;13246:2;;13250:6;;13258:4;;13180:83;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13180:83:5;;;;;;;;-1:-1:-1;;13180:83:5;;;;;;;;;;;;:::i;:::-;;;13176:497;;;;:::i;:::-;-1:-1:-1;;;;;;13312:70:5;;-1:-1:-1;;;13312:70:5;13308:167;;13406:50;;-1:-1:-1;;;13406:50:5;;;;;;;:::i;737:413:9:-;1097:20;1135:8;;;737:413::o;6440:150:12:-;6510:4;6533:50;6538:3;-1:-1:-1;;;;;6558:23:12;;6533:4;:50::i;6758:156::-;6831:4;6854:53;6862:3;-1:-1:-1;;;;;6882:23:12;;6854:7;:53::i;4463:201::-;4557:18;;4530:7;;4557:26;-1:-1:-1;4549:73:12;;;;-1:-1:-1;;;4549:73:12;;;;;;;:::i;:::-;4639:3;:11;;4651:5;4639:18;;;;;;;;;;;;;;;;4632:25;;4463:201;;;;:::o;3816:127::-;3889:4;3912:19;;;:12;;;;;:19;;;;;;:24;;;3816:127::o;759:64:10:-;1512:13:4;;;;;;;;:33;;;1529:16;:14;:16::i;:::-;1512:50;;;-1:-1:-1;1550:12:4;;;;1549:13;1512:50;1504:109;;;;-1:-1:-1;;;1504:109:4;;;;;;;:::i;:::-;1624:19;1647:13;;;;;;1646:14;1670:98;;;;1704:13;:20;;-1:-1:-1;;;;1704:20:4;;;;;1738:19;1720:4;1738:19;;;1670:98;1794:14;1790:66;;;1840:5;1824:21;;-1:-1:-1;;1824:21:4;;;1790:66;759:64:10;:::o;777:249:1:-;1512:13:4;;;;;;;;:33;;;1529:16;:14;:16::i;:::-;1512:50;;;-1:-1:-1;1550:12:4;;;;1549:13;1512:50;1504:109;;;;-1:-1:-1;;;1504:109:4;;;;;;;:::i;:::-;1624:19;1647:13;;;;;;1646:14;1670:98;;;;1704:13;:20;;-1:-1:-1;;;;1704:20:4;;;;;1738:19;1720:4;1738:19;;;1670:98;979:40:1::1;-1:-1:-1::0;;;979:18:1::1;:40::i;2374:389:5:-:0;1512:13:4;;;;;;;;:33;;;1529:16;:14;:16::i;:::-;1512:50;;;-1:-1:-1;1550:12:4;;;;1549:13;1512:50;1504:109;;;;-1:-1:-1;;;1504:109:4;;;;;;;:::i;:::-;1624:19;1647:13;;;;;;1646:14;1670:98;;;;1704:13;:20;;-1:-1:-1;;;;1704:20:4;;;;;1738:19;1720:4;1738:19;;;1670:98;2459:13:5::1;2467:4;2459:7;:13::i;:::-;2561:41;-1:-1:-1::0;;;2561:18:5::1;:41::i;:::-;2702:54;-1:-1:-1::0;;;2702:18:5::1;:54::i;1257:178:11:-:0;1409:19;;1427:1;1409:19;;;1257:178::o;1651:404:12:-;1714:4;1735:21;1745:3;1750:5;1735:9;:21::i;:::-;1730:319;;-1:-1:-1;1772:23:12;;;;;;;;:11;:23;;;;;;;;;;;;;1952:18;;1930:19;;;:12;;;:19;;;;;;:40;;;;1984:11;;1730:319;-1:-1:-1;2033:5:12;2026:12;;2223:1512;2289:4;2426:19;;;:12;;;:19;;;;;;2460:15;;2456:1273;;2889:18;;-1:-1:-1;;2841:14:12;;;;2889:22;;;;2817:21;;2889:3;;:22;;3171;;;;;;;;;;;;;;3151:42;;3314:9;3285:3;:11;;3297:13;3285:26;;;;;;;;;;;;;;;;;;;:38;;;;3389:23;;;3431:1;3389:12;;;:23;;;;;;3415:17;;;3389:43;;3538:17;;3389:3;;3538:17;;;;;;;;;;;;;;;;;;;;;;3630:3;:12;;:19;3643:5;3630:19;;;;;;;;;;;3623:26;;;3671:4;3664:11;;;;;;;;2456:1273;3713:5;3706:12;;;;;1718:198:1;-1:-1:-1;;;;;;1801:25:1;;;;;1793:66;;;;-1:-1:-1;;;1793:66:1;;;;;;;:::i;:::-;-1:-1:-1;;;;;;1869:33:1;;;;;:20;:33;;;;;:40;;-1:-1:-1;;1869:40:1;1905:4;1869:40;;;1718:198::o;7974:86:5:-;8040:13;;;;:4;;:13;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;5:130;72:20;;-1:-1;;;;;67143:54;;68831:35;;68821:2;;68880:1;;68870:12;893:707;;1010:3;1003:4;995:6;991:17;987:27;977:2;;-1:-1;;1018:12;977:2;1065:6;1052:20;1087:80;1102:64;1159:6;1102:64;:::i;:::-;1087:80;:::i;:::-;1195:21;;;1078:89;-1:-1;1239:4;1252:14;;;;1227:17;;;1341;;;1332:27;;;;1329:36;-1:-1;1326:2;;;1378:1;;1368:12;1326:2;1403:1;1388:206;1413:6;1410:1;1407:13;1388:206;;;3117:20;;1481:50;;1545:14;;;;1573;;;;1435:1;1428:9;1388:206;;;1392:14;;;;;970:630;;;;:::o;2151:440::-;;2252:3;2245:4;2237:6;2233:17;2229:27;2219:2;;-1:-1;;2260:12;2219:2;2307:6;2294:20;64616:18;64608:6;64605:30;64602:2;;;-1:-1;;64638:12;64602:2;2329:64;64711:9;64692:17;;-1:-1;;64688:33;64779:4;64769:15;2329:64;:::i;:::-;2320:73;;2413:6;2406:5;2399:21;2517:3;64779:4;2508:6;2441;2499:16;;2496:25;2493:2;;;2534:1;;2524:12;2493:2;67458:6;64779:4;2441:6;2437:17;64779:4;2475:5;2471:16;67435:30;67514:1;67496:16;;;64779:4;67496:16;67489:27;2475:5;2212:379;-1:-1;;2212:379::o;3328:126::-;3393:20;;67359:4;67348:16;;69441:33;;69431:2;;69488:1;;69478:12;3461:241;;3565:2;3553:9;3544:7;3540:23;3536:32;3533:2;;;-1:-1;;3571:12;3533:2;3633:53;3678:7;3654:22;3633:53;:::i;3709:366::-;;;3830:2;3818:9;3809:7;3805:23;3801:32;3798:2;;;-1:-1;;3836:12;3798:2;3898:53;3943:7;3919:22;3898:53;:::i;:::-;3888:63;;4006:53;4051:7;3988:2;4031:9;4027:22;4006:53;:::i;:::-;3996:63;;3792:283;;;;;:::o;4082:1119::-;;;;;;4313:3;4301:9;4292:7;4288:23;4284:33;4281:2;;;-1:-1;;4320:12;4281:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;4372:63;-1:-1;4472:2;4511:22;;72:20;97:33;72:20;97:33;:::i;:::-;4480:63;-1:-1;4608:2;4593:18;;4580:32;4632:18;4621:30;;;4618:2;;;-1:-1;;4654:12;4618:2;4684:78;4754:7;4745:6;4734:9;4730:22;4684:78;:::i;:::-;4674:88;;4827:2;4816:9;4812:18;4799:32;4785:46;;4632:18;4843:6;4840:30;4837:2;;;-1:-1;;4873:12;4837:2;4903:78;4973:7;4964:6;4953:9;4949:22;4903:78;:::i;:::-;4893:88;;5046:3;5035:9;5031:19;5018:33;5004:47;;4632:18;5063:6;5060:30;5057:2;;;-1:-1;;5093:12;5057:2;;5123:62;5177:7;5168:6;5157:9;5153:22;5123:62;:::i;:::-;5113:72;;;4275:926;;;;;;;;:::o;5208:847::-;;;;;;5389:3;5377:9;5368:7;5364:23;5360:33;5357:2;;;-1:-1;;5396:12;5357:2;5458:53;5503:7;5479:22;5458:53;:::i;:::-;5448:63;;5566:53;5611:7;5548:2;5591:9;5587:22;5566:53;:::i;:::-;5556:63;;5656:2;5699:9;5695:22;3117:20;5664:63;;5764:2;5807:9;5803:22;3117:20;5772:63;;5900:3;5889:9;5885:19;5872:33;5925:18;5917:6;5914:30;5911:2;;;-1:-1;;5947:12;5911:2;5977:62;6031:7;6022:6;6011:9;6007:22;5977:62;:::i;6062:1687::-;;;;;;;;;;;6347:3;6335:9;6326:7;6322:23;6318:33;6315:2;;;-1:-1;;6354:12;6315:2;6416:53;6461:7;6437:22;6416:53;:::i;:::-;6406:63;;6524:53;6569:7;6506:2;6549:9;6545:22;6524:53;:::i;:::-;6514:63;;6632:51;6675:7;6614:2;6655:9;6651:22;6632:51;:::i;:::-;6622:61;;6720:2;6763:9;6759:22;3117:20;6728:63;;6828:3;6872:9;6868:22;3117:20;6837:63;;6937:3;6981:9;6977:22;3117:20;6946:63;;7046:3;7090:9;7086:22;3117:20;7055:63;;7183:3;7172:9;7168:19;7155:33;7208:18;;7200:6;7197:30;7194:2;;;-1:-1;;7230:12;7194:2;7260:63;7315:7;7306:6;7295:9;7291:22;7260:63;:::i;:::-;7250:73;;7388:3;7377:9;7373:19;7360:33;7346:47;;7208:18;7405:6;7402:30;7399:2;;;-1:-1;;7435:12;7399:2;7465:63;7520:7;7511:6;7500:9;7496:22;7465:63;:::i;:::-;7455:73;;7593:3;7582:9;7578:19;7565:33;7551:47;;7208:18;7610:6;7607:30;7604:2;;;-1:-1;;7640:12;7604:2;;7670:63;7725:7;7716:6;7705:9;7701:22;7670:63;:::i;:::-;7660:73;;;6309:1440;;;;;;;;;;;;;:::o;7756:360::-;;;7874:2;7862:9;7853:7;7849:23;7845:32;7842:2;;;-1:-1;;7880:12;7842:2;7942:53;7987:7;7963:22;7942:53;:::i;:::-;7932:63;;8032:2;8072:9;8068:22;1672:20;68977:5;66825:13;66818:21;68955:5;68952:32;68942:2;;-1:-1;;68988:12;68942:2;8040:60;;;;7836:280;;;;;:::o;8123:366::-;;;8244:2;8232:9;8223:7;8219:23;8215:32;8212:2;;;-1:-1;;8250:12;8212:2;8312:53;8357:7;8333:22;8312:53;:::i;:::-;8302:63;8402:2;8441:22;;;;3117:20;;-1:-1;;;8206:283::o;8496:491::-;;;;8634:2;8622:9;8613:7;8609:23;8605:32;8602:2;;;-1:-1;;8640:12;8602:2;8702:53;8747:7;8723:22;8702:53;:::i;:::-;8692:63;8792:2;8831:22;;3117:20;;-1:-1;8900:2;8939:22;;;3117:20;;8596:391;-1:-1;;;8596:391::o;8994:362::-;;;9113:2;9101:9;9092:7;9088:23;9084:32;9081:2;;;-1:-1;;9119:12;9081:2;9181:53;9226:7;9202:22;9181:53;:::i;:::-;9171:63;;9289:51;9332:7;9271:2;9312:9;9308:22;9289:51;:::i;9363:1561::-;;;;;;;;;;9631:3;9619:9;9610:7;9606:23;9602:33;9599:2;;;-1:-1;;9638:12;9599:2;9700:53;9745:7;9721:22;9700:53;:::i;:::-;9690:63;;9808:51;9851:7;9790:2;9831:9;9827:22;9808:51;:::i;:::-;9798:61;;9896:2;9939:9;9935:22;3117:20;9904:63;;10004:2;10047:9;10043:22;3117:20;10012:63;;10112:3;10156:9;10152:22;3117:20;10121:63;;10221:3;10265:9;10261:22;3117:20;10230:63;;10358:3;10347:9;10343:19;10330:33;10383:18;;10375:6;10372:30;10369:2;;;-1:-1;;10405:12;10369:2;10435:63;10490:7;10481:6;10470:9;10466:22;10435:63;:::i;:::-;10425:73;;10563:3;10552:9;10548:19;10535:33;10521:47;;10383:18;10580:6;10577:30;10574:2;;;-1:-1;;10610:12;10574:2;10640:63;10695:7;10686:6;10675:9;10671:22;10640:63;:::i;:::-;10630:73;;10768:3;10757:9;10753:19;10740:33;10726:47;;10383:18;10785:6;10782:30;10779:2;;;-1:-1;;10815:12;10779:2;;10845:63;10900:7;10891:6;10880:9;10876:22;10845:63;:::i;:::-;10835:73;;;9593:1331;;;;;;;;;;;:::o;10931:638::-;;;11102:2;11090:9;11081:7;11077:23;11073:32;11070:2;;;-1:-1;;11108:12;11070:2;11166:17;11153:31;11204:18;;11196:6;11193:30;11190:2;;;-1:-1;;11226:12;11190:2;11317:6;11306:9;11302:22;;;277:3;270:4;262:6;258:17;254:27;244:2;;-1:-1;;285:12;244:2;332:6;319:20;354:80;369:64;426:6;369:64;:::i;354:80::-;440:16;476:6;469:5;462:21;506:4;;523:3;519:14;512:21;;506:4;498:6;494:17;628:3;506:4;;612:6;608:17;498:6;599:27;;596:36;593:2;;;-1:-1;;635:12;593:2;-1:-1;661:10;;655:206;680:6;677:1;674:13;655:206;;;760:37;793:3;781:10;760:37;:::i;:::-;748:50;;702:1;695:9;;;;;812:14;;;;840;;655:206;;;-1:-1;11246:88;;-1:-1;11384:18;;11371:32;;-1:-1;;;11412:30;;;11409:2;;;-1:-1;;11445:12;11409:2;;11475:78;11545:7;11536:6;11525:9;11521:22;11475:78;:::i;:::-;11465:88;;;11064:505;;;;;:::o;11576:235::-;;11677:2;11665:9;11656:7;11652:23;11648:32;11645:2;;;-1:-1;;11683:12;11645:2;1685:6;1672:20;68977:5;66825:13;66818:21;68955:5;68952:32;68942:2;;-1:-1;;68988:12;11818:241;;11922:2;11910:9;11901:7;11897:23;11893:32;11890:2;;;-1:-1;;11928:12;11890:2;-1:-1;1806:20;;11884:175;-1:-1;11884:175::o;12066:366::-;;;12187:2;12175:9;12166:7;12162:23;12158:32;12155:2;;;-1:-1;;12193:12;12155:2;1819:6;1806:20;12245:63;;12345:2;12388:9;12384:22;72:20;97:33;124:5;97:33;:::i;12439:366::-;;;12560:2;12548:9;12539:7;12535:23;12531:32;12528:2;;;-1:-1;;12566:12;12528:2;-1:-1;;1806:20;;;12718:2;12757:22;;;3117:20;;-1:-1;12522:283::o;12812:239::-;;12915:2;12903:9;12894:7;12890:23;12886:32;12883:2;;;-1:-1;;12921:12;12883:2;1955:6;1942:20;1967:32;1993:5;1967:32;:::i;13058:261::-;;13172:2;13160:9;13151:7;13147:23;13143:32;13140:2;;;-1:-1;;13178:12;13140:2;2094:6;2088:13;2106:32;2132:5;2106:32;:::i;13574:263::-;;13689:2;13677:9;13668:7;13664:23;13660:32;13657:2;;;-1:-1;;13695:12;13657:2;-1:-1;3265:13;;13651:186;-1:-1;13651:186::o;14399:103::-;-1:-1;;;;;67143:54;14460:37;;14454:48::o;14660:690::-;;14853:5;65556:12;66100:6;66095:3;66088:19;66137:4;;66132:3;66128:14;14865:93;;66137:4;15029:5;65245:14;-1:-1;15068:260;15093:6;15090:1;15087:13;15068:260;;;15154:13;;15540:37;;14371:14;;;;65943;;;;15115:1;15108:9;15068:260;;;-1:-1;15334:10;;14784:566;-1:-1;;;;;14784:566::o;15589:343::-;;15731:5;65556:12;66100:6;66095:3;66088:19;-1:-1;67603:101;67617:6;67614:1;67611:13;67603:101;;;66137:4;67684:11;;;;;67678:18;67665:11;;;;;67658:39;67632:10;67603:101;;;67719:6;67716:1;67713:13;67710:2;;;-1:-1;66137:4;67775:6;66132:3;67766:16;;67759:27;67710:2;-1:-1;64711:9;67875:14;-1:-1;;67871:28;15888:39;;;;66137:4;15888:39;;15679:253;-1:-1;;15679:253::o;16652:823::-;;16771:5;16765:12;16805:1;;16794:9;16790:17;16818:1;16813:248;;;;17072:1;17067:402;;;;16783:686;;16813:248;16887:1;16872:17;;16891:4;16868:28;66088:19;;-1:-1;;17000:25;;66137:4;66128:14;;16988:38;17040:14;;;;-1:-1;16813:248;;17067:402;17136:1;17125:9;17121:17;66100:6;66095:3;66088:19;17245:38;17277:5;17245:38;:::i;:::-;-1:-1;17307:130;17321:6;17318:1;17315:13;17307:130;;;17386:7;17380:14;66137:4;17376:1;66132:3;17367:11;;17360:35;16805:1;17418:7;17414:15;17403:26;;66137:4;17340:1;17336:12;17331:17;;17307:130;;;17451:11;;66137:4;17451:11;;-1:-1;;;16783:686;;;;16741:734;;;;:::o;37407:97::-;67359:4;67348:16;37464:35;;37458:46::o;37625:222::-;-1:-1;;;;;67143:54;;;;14460:37;;37752:2;37737:18;;37723:124::o;37854:1048::-;-1:-1;;;;;67143:54;;;14460:37;;67143:54;;38376:2;38361:18;;14460:37;67154:42;38413:2;38398:18;;38391:48;;;37854:1048;;38453:108;;38196:19;;38547:6;38453:108;:::i;:::-;38609:9;38603:4;38599:20;38594:2;38583:9;38579:18;38572:48;38634:108;38737:4;38728:6;38634:108;:::i;:::-;38626:116;;38791:9;38785:4;38781:20;38775:3;38764:9;38760:19;38753:49;38816:76;38887:4;38878:6;38816:76;:::i;:::-;38808:84;38182:720;-1:-1;;;;;;;;38182:720::o;38909:752::-;-1:-1;;;;;67143:54;;;14460:37;;67143:54;;39331:2;39316:18;;14460:37;39414:2;39399:18;;15540:37;;;39497:2;39482:18;;15540:37;;;67154:42;39534:3;39519:19;;39512:49;;;38909:752;;39575:76;;39151:19;;39637:6;39575:76;:::i;:::-;39567:84;39137:524;-1:-1;;;;;;;39137:524::o;39668:333::-;-1:-1;;;;;67143:54;;;;14460:37;;39987:2;39972:18;;15540:37;39823:2;39808:18;;39794:207::o;40008:370::-;;40185:2;40206:17;40199:47;40260:108;40185:2;40174:9;40170:18;40354:6;40260:108;:::i;40385:629::-;;40640:2;40661:17;40654:47;40715:108;40640:2;40629:9;40625:18;40809:6;40715:108;:::i;:::-;40871:9;40865:4;40861:20;40856:2;40845:9;40841:18;40834:48;40896:108;40999:4;40990:6;40896:108;:::i;:::-;40888:116;40611:403;-1:-1;;;;;40611:403::o;41021:210::-;66825:13;;66818:21;15423:34;;41142:2;41127:18;;41113:118::o;41238:608::-;66825:13;;66818:21;15423:34;;66825:13;;66818:21;41600:2;41585:18;;15423:34;66825:13;;66818:21;41677:2;41662:18;;15423:34;66825:13;66818:21;41754:2;41739:18;;15423:34;66825:13;66818:21;41831:3;41816:19;;15423:34;41447:3;41432:19;;41418:428::o;41853:222::-;15540:37;;;41980:2;41965:18;;41951:124::o;42082:310::-;;42229:2;42250:17;42243:47;42304:78;42229:2;42218:9;42214:18;42368:6;42304:78;:::i;42399:416::-;42599:2;42613:47;;;17708:2;42584:18;;;66088:19;17744:34;66128:14;;;17724:55;-1:-1;;;17799:12;;;17792:44;17855:12;;;42570:245::o;42822:416::-;43022:2;43036:47;;;18106:2;43007:18;;;66088:19;18142:34;66128:14;;;18122:55;-1:-1;;;18197:12;;;18190:45;18254:12;;;42993:245::o;43245:416::-;43445:2;43459:47;;;18505:2;43430:18;;;66088:19;18541:34;66128:14;;;18521:55;-1:-1;;;18596:12;;;18589:26;18634:12;;;43416:245::o;43668:416::-;43868:2;43882:47;;;18885:2;43853:18;;;66088:19;18921:34;66128:14;;;18901:55;-1:-1;;;18976:12;;;18969:32;19020:12;;;43839:245::o;44091:416::-;44291:2;44305:47;;;19271:2;44276:18;;;66088:19;19307:34;66128:14;;;19287:55;-1:-1;;;19362:12;;;19355:39;19413:12;;;44262:245::o;44514:416::-;44714:2;44728:47;;;19664:2;44699:18;;;66088:19;19700:34;66128:14;;;19680:55;-1:-1;;;19755:12;;;19748:33;19800:12;;;44685:245::o;44937:416::-;45137:2;45151:47;;;20051:2;45122:18;;;66088:19;20087:34;66128:14;;;20067:55;-1:-1;;;20142:12;;;20135:35;20189:12;;;45108:245::o;45360:416::-;45560:2;45574:47;;;20440:2;45545:18;;;66088:19;20476:30;66128:14;;;20456:51;20526:12;;;45531:245::o;45783:416::-;45983:2;45997:47;;;20777:2;45968:18;;;66088:19;20813:34;66128:14;;;20793:55;-1:-1;;;20868:12;;;20861:28;20908:12;;;45954:245::o;46206:416::-;46406:2;46420:47;;;21159:2;46391:18;;;66088:19;21195:29;66128:14;;;21175:50;21244:12;;;46377:245::o;46629:416::-;46829:2;46843:47;;;21495:2;46814:18;;;66088:19;21531:34;66128:14;;;21511:55;-1:-1;;;21586:12;;;21579:26;21624:12;;;46800:245::o;47052:416::-;47252:2;47266:47;;;21875:2;47237:18;;;66088:19;21911:34;66128:14;;;21891:55;-1:-1;;;21966:12;;;21959:42;22020:12;;;47223:245::o;47475:416::-;47675:2;47689:47;;;22271:2;47660:18;;;66088:19;22307:34;66128:14;;;22287:55;-1:-1;;;22362:12;;;22355:33;22407:12;;;47646:245::o;47898:416::-;48098:2;48112:47;;;22658:2;48083:18;;;66088:19;22694:34;66128:14;;;22674:55;22763:34;22749:12;;;22742:56;-1:-1;;;22818:12;;;22811:30;22860:12;;;48069:245::o;48321:416::-;48521:2;48535:47;;;23111:2;48506:18;;;66088:19;23147:34;66128:14;;;23127:55;-1:-1;;;23202:12;;;23195:34;23248:12;;;48492:245::o;48744:416::-;48944:2;48958:47;;;23499:2;48929:18;;;66088:19;23535:34;66128:14;;;23515:55;-1:-1;;;23590:12;;;23583:33;23635:12;;;48915:245::o;49167:416::-;49367:2;49381:47;;;23886:2;49352:18;;;66088:19;23922:34;66128:14;;;23902:55;-1:-1;;;23977:12;;;23970:43;24032:12;;;49338:245::o;49590:416::-;49790:2;49804:47;;;24283:2;49775:18;;;66088:19;24319:34;66128:14;;;24299:55;-1:-1;;;24374:12;;;24367:40;24426:12;;;49761:245::o;50013:416::-;50213:2;50227:47;;;24677:2;50198:18;;;66088:19;24713:34;66128:14;;;24693:55;-1:-1;;;24768:12;;;24761:44;24824:12;;;50184:245::o;50436:416::-;50636:2;50650:47;;;25075:2;50621:18;;;66088:19;25111:34;66128:14;;;25091:55;25180:25;25166:12;;;25159:47;25225:12;;;50607:245::o;50859:416::-;51059:2;51073:47;;;25476:2;51044:18;;;66088:19;25512:34;66128:14;;;25492:55;-1:-1;;;25567:12;;;25560:29;25608:12;;;51030:245::o;51282:416::-;51482:2;51496:47;;;25859:2;51467:18;;;66088:19;25895:34;66128:14;;;25875:55;-1:-1;;;25950:12;;;25943:42;26004:12;;;51453:245::o;51705:416::-;51905:2;51919:47;;;26255:2;51890:18;;;66088:19;26291:34;66128:14;;;26271:55;-1:-1;;;26346:12;;;26339:38;26396:12;;;51876:245::o;52128:416::-;52328:2;52342:47;;;26647:2;52313:18;;;66088:19;26683:34;66128:14;;;26663:55;-1:-1;;;26738:12;;;26731:27;26777:12;;;52299:245::o;52551:416::-;52751:2;52765:47;;;27028:2;52736:18;;;66088:19;27064:34;66128:14;;;27044:55;-1:-1;;;27119:12;;;27112:46;27177:12;;;52722:245::o;52974:416::-;53174:2;53188:47;;;27428:2;53159:18;;;66088:19;27464:34;66128:14;;;27444:55;-1:-1;;;27519:12;;;27512:42;27573:12;;;53145:245::o;53397:416::-;53597:2;53611:47;;;27824:2;53582:18;;;66088:19;27860:34;66128:14;;;27840:55;-1:-1;;;27915:12;;;27908:40;27967:12;;;53568:245::o;53820:416::-;54020:2;54034:47;;;28218:2;54005:18;;;66088:19;28254:34;66128:14;;;28234:55;-1:-1;;;28309:12;;;28302:30;28351:12;;;53991:245::o;54243:416::-;54443:2;54457:47;;;28602:2;54428:18;;;66088:19;28638:34;66128:14;;;28618:55;28707:34;28693:12;;;28686:56;-1:-1;;;28762:12;;;28755:26;28800:12;;;54414:245::o;54666:416::-;54866:2;54880:47;;;29051:2;54851:18;;;66088:19;29087:34;66128:14;;;29067:55;29156:25;29142:12;;;29135:47;29201:12;;;54837:245::o;55089:416::-;55289:2;55303:47;;;29452:2;55274:18;;;66088:19;29488:34;66128:14;;;29468:55;-1:-1;;;29543:12;;;29536:38;29593:12;;;55260:245::o;55512:416::-;55712:2;55726:47;;;29844:2;55697:18;;;66088:19;29880:34;66128:14;;;29860:55;-1:-1;;;29935:12;;;29928:43;29990:12;;;55683:245::o;55935:416::-;56135:2;56149:47;;;30241:2;56120:18;;;66088:19;30277:34;66128:14;;;30257:55;30346:34;30332:12;;;30325:56;30415:26;30401:12;;;30394:48;30461:12;;;56106:245::o;56358:416::-;56558:2;56572:47;;;30712:2;56543:18;;;66088:19;;;30748:34;66128:14;;;30728:55;30817:34;30803:12;;;30796:56;30871:12;;;56529:245::o;56781:416::-;56981:2;56995:47;;;31122:2;56966:18;;;66088:19;31158:34;66128:14;;;31138:55;-1:-1;;;31213:12;;;31206:31;31256:12;;;56952:245::o;57204:416::-;57404:2;57418:47;;;31507:2;57389:18;;;66088:19;31543:34;66128:14;;;31523:55;-1:-1;;;31598:12;;;31591:33;31643:12;;;57375:245::o;57627:416::-;57827:2;57841:47;;;31894:2;57812:18;;;66088:19;31930:34;66128:14;;;31910:55;-1:-1;;;31985:12;;;31978:33;32030:12;;;57798:245::o;58050:416::-;58250:2;58264:47;;;32281:2;58235:18;;;66088:19;32317:34;66128:14;;;32297:55;-1:-1;;;32372:12;;;32365:40;32424:12;;;58221:245::o;58473:416::-;58673:2;58687:47;;;32675:2;58658:18;;;66088:19;32711:34;66128:14;;;32691:55;-1:-1;;;32766:12;;;32759:32;32810:12;;;58644:245::o;58896:416::-;59096:2;59110:47;;;33061:2;59081:18;;;66088:19;33097:34;66128:14;;;33077:55;-1:-1;;;33152:12;;;33145:25;33189:12;;;59067:245::o;59319:416::-;59519:2;59533:47;;;33440:2;59504:18;;;66088:19;33476:34;66128:14;;;33456:55;33545:31;33531:12;;;33524:53;33596:12;;;59490:245::o;59742:416::-;59942:2;59956:47;;;33847:2;59927:18;;;66088:19;33883:34;66128:14;;;33863:55;-1:-1;;;33938:12;;;33931:28;33978:12;;;59913:245::o;60165:416::-;60365:2;60379:47;;;34229:2;60350:18;;;66088:19;34265:34;66128:14;;;34245:55;-1:-1;;;34320:12;;;34313:39;34371:12;;;60336:245::o;60588:416::-;60788:2;60802:47;;;34622:2;60773:18;;;66088:19;34658:34;66128:14;;;34638:55;34727:34;34713:12;;;34706:56;-1:-1;;;34782:12;;;34775:35;34829:12;;;60759:245::o;61011:414::-;;61210:2;61231:17;61224:47;35220:16;35214:23;61210:2;61199:9;61195:18;15540:37;61210:2;35385:5;35381:16;35375:23;35404:59;35448:14;61199:9;35448:14;35434:12;35404:59;:::i;:::-;;35448:14;35537:5;35533:16;35527:23;35556:63;35604:14;61199:9;35604:14;35590:12;35556:63;:::i;:::-;;35604:14;35693:5;35689:16;35683:23;35712:63;35760:14;61199:9;35760:14;35746:12;35712:63;:::i;:::-;;35760:14;35851:5;35847:16;35841:23;35918:14;61199:9;35918:14;15540:37;35918:14;36009:5;36005:16;35999:23;36076:14;61199:9;36076:14;15540:37;36076:14;36170:5;36166:16;36160:23;36237:14;61199:9;36237:14;15540:37;36237:14;36339:5;36335:16;36329:23;36406:14;36329:23;36406:14;61199:9;36406:14;15540:37;36406:14;36497:5;36493:18;36487:25;36467:45;;;35143:6;36532:16;35143:6;36532:16;61199:9;36532:16;36525:40;36580:73;35134:16;61199:9;35134:16;36634:12;36580:73;:::i;:::-;36572:81;;36532:16;36735:5;36731:18;36725:25;36705:45;;64711:9;;36770:16;36788:14;61199:9;36792:4;36788:14;;36770:16;61199:9;36770:16;36763:40;36818:73;36886:4;36872:12;36818:73;:::i;:::-;36972:18;;;36966:25;37029:14;;;;;;37011:16;;;37004:40;36810:81;-1:-1;36966:25;-1:-1;37059:73;36810:81;36966:25;37059:73;:::i;:::-;61277:138;61181:244;-1:-1;;;;;;61181:244::o;61661:333::-;15540:37;;;61980:2;61965:18;;15540:37;61816:2;61801:18;;61787:207::o;62001:1580::-;;62456:3;15570:5;15547:3;15540:37;15570:5;62621:2;62610:9;62606:18;15540:37;15570:5;62704:2;62693:9;62689:18;15540:37;67359:4;37492:5;67348:16;62783:2;62772:9;62768:18;37464:35;15570:5;62866:3;62855:9;62851:19;15540:37;15570:5;62950:3;62939:9;62935:19;15540:37;15570:5;63034:3;63023:9;63019:19;15540:37;15570:5;63118:3;63107:9;63103:19;15540:37;62456:3;63156;63145:9;63141:19;63134:49;63197:75;62456:3;62445:9;62441:19;63258:6;63197:75;:::i;:::-;63189:83;;63321:9;63315:4;63311:20;63305:3;63294:9;63290:19;63283:49;63346:75;63416:4;63407:6;63346:75;:::i;:::-;63338:83;;63470:9;63464:4;63460:20;63454:3;63443:9;63439:19;63432:49;63495:76;63566:4;63556:7;63495:76;:::i;:::-;63487:84;62427:1154;-1:-1;;;;;;;;;;;;;;62427:1154::o;63588:256::-;63650:2;63644:9;63676:17;;;63751:18;63736:34;;63772:22;;;63733:62;63730:2;;;63808:1;;63798:12;63730:2;63650;63817:22;63628:216;;-1:-1;63628:216::o;63851:304::-;;64010:18;64002:6;63999:30;63996:2;;;-1:-1;;64032:12;63996:2;-1:-1;64077:4;64065:17;;;64130:15;;63933:222::o;65288:158::-;;65383:14;;;65425:4;65412:18;;;65342:104::o;67912:106::-;67997:3;67993:15;;67965:53::o;68026:739::-;;68099:4;68081:16;68078:26;68075:2;;;68107:5;;68075:2;68141:1;-1:-1;;68120:23;68216:10;68159:34;-1:-1;68184:8;68159:34;:::i;:::-;68208:19;68198:2;;68231:5;;68198:2;68262;68256:9;68298:16;-1:-1;;68294:24;68141:1;68256:9;68270:49;68345:4;68339:11;68426:16;68378:18;68426:16;68419:4;68411:6;68407:17;68404:39;68378:18;68370:6;68367:30;68358:91;68355:2;;;68457:5;;;;;;68355:2;68495:6;68489:4;68485:17;68474:28;;68527:3;68521:10;68507:24;;68378:18;68542:6;68539:30;68536:2;;;68572:5;;;;;;68536:2;;68649:16;68643:4;68639:27;68609:4;68616:6;68604:3;68596:27;;68631:36;68628:2;;;68670:5;;;;;68628:2;64711:9;67875:14;-1:-1;;67871:28;68694:50;;68609:4;68694:50;68262:2;68683:62;68702:3;-1:-1;;68069:696;:::o;68772:117::-;-1:-1;;;;;67143:54;;68831:35;;68821:2;;68880:1;;68870:12;69138:115;-1:-1;;;;;;66991:78;;69196:34;;69186:2;;69244:1;;69234:12" - }, - "methodIdentifiers": { - "DEFAULT_ADMIN_ROLE()": "a217fddf", - "REGISTERED_CONSUMER()": "78e5c592", - "REGISTERED_DEALER()": "18a50d7e", - "REGISTERED_EMISSIONS_AUDITOR()": "76ce4755", - "REGISTERED_OFFSET_DEALER()": "1ef68ef7", - "REGISTERED_REC_DEALER()": "fcba7948", - "admin()": "f851a440", - "balanceOf(address,uint256)": "00fdd58e", - "balanceOfBatch(address[],uint256[])": "4e1273f4", - "getAvailableAndRetired(address,uint256)": "7f157c9b", - "getIssuer(uint256)": "92089c46", - "getNumOfUniqueTokens()": "5ddb368f", - "getRoleAdmin(bytes32)": "248a9ca3", - "getRoleMember(bytes32,uint256)": "9010d07c", - "getRoleMemberCount(bytes32)": "ca15c873", - "getRoles(address)": "ce6ccfaf", - "getTokenDetails(uint256)": "c1e03728", - "getTokenRetiredAmount(address,uint256)": "a0d975a7", - "getTokenType(uint256)": "76aed2e1", - "grantRole(bytes32,address)": "2f2ff15d", - "hasRole(bytes32,address)": "91d14854", - "initialize(address)": "c4d66de8", - "isApprovedForAll(address,address)": "e985e9c5", - "isConsumerRegistered(address)": "33781a0e", - "isDealerRegistered(address)": "69f7ef44", - "issue(address,uint8,uint256,uint256,uint256,uint256,string,string,string)": "fd0c4a9a", - "issueOnBehalf(address,address,uint8,uint256,uint256,uint256,uint256,string,string,string)": "f000be98", - "limitedMode()": "dba851b0", - "mint(address,uint256,uint256)": "156e29f6", - "registerConsumer(address)": "44b22fdd", - "registerDealer(address,uint8)": "31aa4b20", - "renounceRole(bytes32,address)": "36568abe", - "retire(uint256,uint256)": "293a7f2e", - "revokeRole(bytes32,address)": "d547741f", - "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": "2eb2c2d6", - "safeTransferFrom(address,address,uint256,uint256,bytes)": "f242432a", - "setApprovalForAll(address,bool)": "a22cb465", - "setLimitedMode(bool)": "ddc3e6eb", - "setTimelock(address)": "bdacb303", - "supportsInterface(bytes4)": "01ffc9a7", - "transfer(address,uint256,uint256)": "095bcdb6", - "unregisterConsumer(address)": "53dbe982", - "unregisterDealer(address,uint8)": "e2e564f2", - "uri(uint256)": "0e89341c" - } - } - } - } - }, - "sources": { - "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol", - "exportedSymbols": { - "AccessControlUpgradeable": [ - 307 - ] - }, - "id": 308, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.6", - ".0", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:0" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol", - "file": "../utils/EnumerableSetUpgradeable.sol", - "id": 2, - "nodeType": "ImportDirective", - "scope": 308, - "sourceUnit": 2860, - "src": "66:47:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol", - "file": "../utils/AddressUpgradeable.sol", - "id": 3, - "nodeType": "ImportDirective", - "scope": 308, - "sourceUnit": 2273, - "src": "114:41:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol", - "file": "../utils/ContextUpgradeable.sol", - "id": 4, - "nodeType": "ImportDirective", - "scope": 308, - "sourceUnit": 2318, - "src": "156:41:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol", - "file": "../proxy/Initializable.sol", - "id": 5, - "nodeType": "ImportDirective", - "scope": 308, - "sourceUnit": 816, - "src": "198:36:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": true, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 7, - "name": "Initializable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 815, - "src": "1559:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Initializable_$815", - "typeString": "contract Initializable" - } - }, - "id": 8, - "nodeType": "InheritanceSpecifier", - "src": "1559:13:0" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 9, - "name": "ContextUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2317, - "src": "1574:18:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ContextUpgradeable_$2317", - "typeString": "contract ContextUpgradeable" - } - }, - "id": 10, - "nodeType": "InheritanceSpecifier", - "src": "1574:18:0" - } - ], - "contractDependencies": [ - 815, - 2317 - ], - "contractKind": "contract", - "documentation": { - "id": 6, - "nodeType": "StructuredDocumentation", - "src": "236:1276:0", - "text": " @dev Contract module that allows children to implement role-based access\n control mechanisms.\n Roles are referred to by their `bytes32` identifier. These should be exposed\n in the external API and be unique. The best way to achieve this is by\n using `public constant` hash digests:\n ```\n bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n ```\n Roles can be used to represent a set of permissions. To restrict access to a\n function call, use {hasRole}:\n ```\n function foo() public {\n require(hasRole(MY_ROLE, msg.sender));\n ...\n }\n ```\n Roles can be granted and revoked dynamically via the {grantRole} and\n {revokeRole} functions. Each role has an associated admin role, and only\n accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n that only accounts with this role will be able to grant or revoke other\n roles. More complex role relationships can be created by using\n {_setRoleAdmin}.\n WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n grant and revoke this role. Extra precautions should be taken to secure\n accounts that have been granted it." - }, - "fullyImplemented": true, - "id": 307, - "linearizedBaseContracts": [ - 307, - 2317, - 815 - ], - "name": "AccessControlUpgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 21, - "nodeType": "Block", - "src": "1652:85:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 15, - "name": "__Context_init_unchained", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "1662:24:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1662:26:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 17, - "nodeType": "ExpressionStatement", - "src": "1662:26:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 18, - "name": "__AccessControl_init_unchained", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "1698:30:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1698:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 20, - "nodeType": "ExpressionStatement", - "src": "1698:32:0" - } - ] - }, - "documentation": null, - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 13, - "modifierName": { - "argumentTypes": null, - "id": 12, - "name": "initializer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "1640:11:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1640:11:0" - } - ], - "name": "__AccessControl_init", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 11, - "nodeType": "ParameterList", - "parameters": [], - "src": "1628:2:0" - }, - "returnParameters": { - "id": 14, - "nodeType": "ParameterList", - "parameters": [], - "src": "1652:0:0" - }, - "scope": 307, - "src": "1599:138:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 27, - "nodeType": "Block", - "src": "1806:7:0", - "statements": [] - }, - "documentation": null, - "id": 28, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 25, - "modifierName": { - "argumentTypes": null, - "id": 24, - "name": "initializer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "1794:11:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1794:11:0" - } - ], - "name": "__AccessControl_init_unchained", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [], - "src": "1782:2:0" - }, - "returnParameters": { - "id": 26, - "nodeType": "ParameterList", - "parameters": [], - "src": "1806:0:0" - }, - "scope": 307, - "src": "1743:70:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31, - "libraryName": { - "contractScope": null, - "id": 29, - "name": "EnumerableSetUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2859, - "src": "1824:24:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_EnumerableSetUpgradeable_$2859", - "typeString": "library EnumerableSetUpgradeable" - } - }, - "nodeType": "UsingForDirective", - "src": "1818:71:0", - "typeName": { - "contractScope": null, - "id": 30, - "name": "EnumerableSetUpgradeable.AddressSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2643, - "src": "1853:35:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - } - } - }, - { - "id": 34, - "libraryName": { - "contractScope": null, - "id": 32, - "name": "AddressUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2272, - "src": "1900:18:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_AddressUpgradeable_$2272", - "typeString": "library AddressUpgradeable" - } - }, - "nodeType": "UsingForDirective", - "src": "1894:37:0", - "typeName": { - "id": 33, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1923:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "canonicalName": "AccessControlUpgradeable.RoleData", - "id": 39, - "members": [ - { - "constant": false, - "id": 36, - "mutability": "mutable", - "name": "members", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 39, - "src": "1963:43:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - }, - "typeName": { - "contractScope": null, - "id": 35, - "name": "EnumerableSetUpgradeable.AddressSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2643, - "src": "1963:35:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 38, - "mutability": "mutable", - "name": "adminRole", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 39, - "src": "2016:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 37, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2016:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "RoleData", - "nodeType": "StructDefinition", - "scope": 307, - "src": "1937:103:0", - "visibility": "public" - }, - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "_roles", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 307, - "src": "2046:44:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" - }, - "typeName": { - "id": 42, - "keyType": { - "id": 40, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2055:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "2046:29:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)" - }, - "valueType": { - "contractScope": null, - "id": 41, - "name": "RoleData", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 39, - "src": "2066:8:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage_ptr", - "typeString": "struct AccessControlUpgradeable.RoleData" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": true, - "functionSelector": "a217fddf", - "id": 46, - "mutability": "constant", - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 307, - "src": "2097:49:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 44, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2097:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30783030", - "id": 45, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2142:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x00" - }, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": { - "id": 47, - "nodeType": "StructuredDocumentation", - "src": "2153:292:0", - "text": " @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n {RoleAdminChanged} not being emitted signaling this.\n _Available since v3.1._" - }, - "id": 55, - "name": "RoleAdminChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 54, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 49, - "indexed": true, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 55, - "src": "2473:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 48, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2473:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 51, - "indexed": true, - "mutability": "mutable", - "name": "previousAdminRole", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 55, - "src": "2495:33:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 50, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2495:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 53, - "indexed": true, - "mutability": "mutable", - "name": "newAdminRole", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 55, - "src": "2530:28:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 52, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2530:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2472:87:0" - }, - "src": "2450:110:0" - }, - { - "anonymous": false, - "documentation": { - "id": 56, - "nodeType": "StructuredDocumentation", - "src": "2566:198:0", - "text": " @dev Emitted when `account` is granted `role`.\n `sender` is the account that originated the contract call, an admin role\n bearer except when using {_setupRole}." - }, - "id": 64, - "name": "RoleGranted", - "nodeType": "EventDefinition", - "parameters": { - "id": 63, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 58, - "indexed": true, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 64, - "src": "2787:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 57, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2787:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 60, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 64, - "src": "2809:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 59, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2809:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 64, - "src": "2834:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 61, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2834:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2786:71:0" - }, - "src": "2769:89:0" - }, - { - "anonymous": false, - "documentation": { - "id": 65, - "nodeType": "StructuredDocumentation", - "src": "2864:275:0", - "text": " @dev Emitted when `account` is revoked `role`.\n `sender` is the account that originated the contract call:\n - if using `revokeRole`, it is the admin role bearer\n - if using `renounceRole`, it is the role bearer (i.e. `account`)" - }, - "id": 73, - "name": "RoleRevoked", - "nodeType": "EventDefinition", - "parameters": { - "id": 72, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 67, - "indexed": true, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 73, - "src": "3162:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 66, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3162:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 69, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 73, - "src": "3184:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 68, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3184:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 71, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 73, - "src": "3209:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 70, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3209:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3161:71:0" - }, - "src": "3144:89:0" - }, - { - "body": { - "id": 91, - "nodeType": "Block", - "src": "3395:62:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 88, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "3442:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 83, - "name": "_roles", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "3412:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData storage ref)" - } - }, - "id": 85, - "indexExpression": { - "argumentTypes": null, - "id": 84, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "3419:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3412:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage", - "typeString": "struct AccessControlUpgradeable.RoleData storage ref" - } - }, - "id": 86, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "members", - "nodeType": "MemberAccess", - "referencedDeclaration": 36, - "src": "3412:20:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage", - "typeString": "struct EnumerableSetUpgradeable.AddressSet storage ref" - } - }, - "id": 87, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "contains", - "nodeType": "MemberAccess", - "referencedDeclaration": 2721, - "src": "3412:29:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$2643_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$2643_storage_ptr_$", - "typeString": "function (struct EnumerableSetUpgradeable.AddressSet storage pointer,address) view returns (bool)" - } - }, - "id": 89, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3412:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 82, - "id": 90, - "nodeType": "Return", - "src": "3405:45:0" - } - ] - }, - "documentation": { - "id": 74, - "nodeType": "StructuredDocumentation", - "src": "3239:76:0", - "text": " @dev Returns `true` if `account` has been granted `role`." - }, - "functionSelector": "91d14854", - "id": 92, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "hasRole", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 79, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 92, - "src": "3337:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 75, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3337:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 78, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 92, - "src": "3351:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 77, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3351:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3336:31:0" - }, - "returnParameters": { - "id": 82, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 81, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 92, - "src": "3389:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 80, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3389:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3388:6:0" - }, - "scope": 307, - "src": "3320:137:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 107, - "nodeType": "Block", - "src": "3697:53:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 100, - "name": "_roles", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "3714:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData storage ref)" - } - }, - "id": 102, - "indexExpression": { - "argumentTypes": null, - "id": 101, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 95, - "src": "3721:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3714:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage", - "typeString": "struct AccessControlUpgradeable.RoleData storage ref" - } - }, - "id": 103, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "members", - "nodeType": "MemberAccess", - "referencedDeclaration": 36, - "src": "3714:20:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage", - "typeString": "struct EnumerableSetUpgradeable.AddressSet storage ref" - } - }, - "id": 104, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": 2735, - "src": "3714:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$2643_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$2643_storage_ptr_$", - "typeString": "function (struct EnumerableSetUpgradeable.AddressSet storage pointer) view returns (uint256)" - } - }, - "id": 105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3714:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 99, - "id": 106, - "nodeType": "Return", - "src": "3707:36:0" - } - ] - }, - "documentation": { - "id": 93, - "nodeType": "StructuredDocumentation", - "src": "3463:157:0", - "text": " @dev Returns the number of accounts that have `role`. Can be used\n together with {getRoleMember} to enumerate all bearers of a role." - }, - "functionSelector": "ca15c873", - "id": 108, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getRoleMemberCount", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 96, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 95, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 108, - "src": "3653:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 94, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3653:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3652:14:0" - }, - "returnParameters": { - "id": 99, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 98, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 108, - "src": "3688:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 97, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3688:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3687:9:0" - }, - "scope": 307, - "src": "3625:125:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 126, - "nodeType": "Block", - "src": "4417:54:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 123, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "4458:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 118, - "name": "_roles", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "4434:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData storage ref)" - } - }, - "id": 120, - "indexExpression": { - "argumentTypes": null, - "id": 119, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 111, - "src": "4441:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4434:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage", - "typeString": "struct AccessControlUpgradeable.RoleData storage ref" - } - }, - "id": 121, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "members", - "nodeType": "MemberAccess", - "referencedDeclaration": 36, - "src": "4434:20:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage", - "typeString": "struct EnumerableSetUpgradeable.AddressSet storage ref" - } - }, - "id": 122, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "at", - "nodeType": "MemberAccess", - "referencedDeclaration": 2761, - "src": "4434:23:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$2643_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$2643_storage_ptr_$", - "typeString": "function (struct EnumerableSetUpgradeable.AddressSet storage pointer,uint256) view returns (address)" - } - }, - "id": 124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4434:30:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 117, - "id": 125, - "nodeType": "Return", - "src": "4427:37:0" - } - ] - }, - "documentation": { - "id": 109, - "nodeType": "StructuredDocumentation", - "src": "3756:574:0", - "text": " @dev Returns one of the accounts that have `role`. `index` must be a\n value between 0 and {getRoleMemberCount}, non-inclusive.\n Role bearers are not sorted in any particular way, and their ordering may\n change at any point.\n WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n you perform all queries on the same block. See the following\n https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n for more information." - }, - "functionSelector": "9010d07c", - "id": 127, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getRoleMember", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 111, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 127, - "src": "4358:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 110, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4358:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 113, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 127, - "src": "4372:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 112, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4372:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4357:29:0" - }, - "returnParameters": { - "id": 117, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 116, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 127, - "src": "4408:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 115, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4408:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4407:9:0" - }, - "scope": 307, - "src": "4335:136:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 140, - "nodeType": "Block", - "src": "4718:46:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 135, - "name": "_roles", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "4735:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData storage ref)" - } - }, - "id": 137, - "indexExpression": { - "argumentTypes": null, - "id": 136, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "4742:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4735:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage", - "typeString": "struct AccessControlUpgradeable.RoleData storage ref" - } - }, - "id": 138, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "adminRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 38, - "src": "4735:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 134, - "id": 139, - "nodeType": "Return", - "src": "4728:29:0" - } - ] - }, - "documentation": { - "id": 128, - "nodeType": "StructuredDocumentation", - "src": "4477:170:0", - "text": " @dev Returns the admin role that controls `role`. See {grantRole} and\n {revokeRole}.\n To change a role's admin, use {_setRoleAdmin}." - }, - "functionSelector": "248a9ca3", - "id": 141, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getRoleAdmin", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 141, - "src": "4674:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 129, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4674:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4673:14:0" - }, - "returnParameters": { - "id": 134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 133, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 141, - "src": "4709:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 132, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4709:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4708:9:0" - }, - "scope": 307, - "src": "4652:112:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 166, - "nodeType": "Block", - "src": "5079:158:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 151, - "name": "_roles", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "5105:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData storage ref)" - } - }, - "id": 153, - "indexExpression": { - "argumentTypes": null, - "id": 152, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "5112:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5105:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage", - "typeString": "struct AccessControlUpgradeable.RoleData storage ref" - } - }, - "id": 154, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "adminRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 38, - "src": "5105:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 155, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "5129:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5129:12:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 150, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5097:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5097:45:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74", - "id": 158, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5144:49:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0ba7116025f1ef6b158a2bd2238e617f30e17c9e456917d901086ca4f8ad2811", - "typeString": "literal_string \"AccessControl: sender must be an admin to grant\"" - }, - "value": "AccessControl: sender must be an admin to grant" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0ba7116025f1ef6b158a2bd2238e617f30e17c9e456917d901086ca4f8ad2811", - "typeString": "literal_string \"AccessControl: sender must be an admin to grant\"" - } - ], - "id": 149, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5089:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5089:105:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 160, - "nodeType": "ExpressionStatement", - "src": "5089:105:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 162, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 144, - "src": "5216:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 163, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 146, - "src": "5222:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 161, - "name": "_grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 278, - "src": "5205:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5205:25:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 165, - "nodeType": "ExpressionStatement", - "src": "5205:25:0" - } - ] - }, - "documentation": { - "id": 142, - "nodeType": "StructuredDocumentation", - "src": "4770:239:0", - "text": " @dev Grants `role` to `account`.\n If `account` had not been already granted `role`, emits a {RoleGranted}\n event.\n Requirements:\n - the caller must have ``role``'s admin role." - }, - "functionSelector": "2f2ff15d", - "id": 167, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "grantRole", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 144, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 167, - "src": "5033:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 143, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5033:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 146, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 167, - "src": "5047:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 145, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5047:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5032:31:0" - }, - "returnParameters": { - "id": 148, - "nodeType": "ParameterList", - "parameters": [], - "src": "5079:0:0" - }, - "scope": 307, - "src": "5014:223:0", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "body": { - "id": 192, - "nodeType": "Block", - "src": "5537:160:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 177, - "name": "_roles", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "5563:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData storage ref)" - } - }, - "id": 179, - "indexExpression": { - "argumentTypes": null, - "id": 178, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 170, - "src": "5570:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5563:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage", - "typeString": "struct AccessControlUpgradeable.RoleData storage ref" - } - }, - "id": 180, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "adminRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 38, - "src": "5563:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 181, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "5587:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5587:12:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 176, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5555:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5555:45:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65", - "id": 184, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5602:50:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_64344570eab7406ca49d34d38bf2b2496dfda914405390c5057c8b0aabf798a3", - "typeString": "literal_string \"AccessControl: sender must be an admin to revoke\"" - }, - "value": "AccessControl: sender must be an admin to revoke" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_64344570eab7406ca49d34d38bf2b2496dfda914405390c5057c8b0aabf798a3", - "typeString": "literal_string \"AccessControl: sender must be an admin to revoke\"" - } - ], - "id": 175, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5547:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5547:106:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 186, - "nodeType": "ExpressionStatement", - "src": "5547:106:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 188, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 170, - "src": "5676:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 189, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 172, - "src": "5682:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 187, - "name": "_revokeRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 302, - "src": "5664:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5664:26:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 191, - "nodeType": "ExpressionStatement", - "src": "5664:26:0" - } - ] - }, - "documentation": { - "id": 168, - "nodeType": "StructuredDocumentation", - "src": "5243:223:0", - "text": " @dev Revokes `role` from `account`.\n If `account` had been granted `role`, emits a {RoleRevoked} event.\n Requirements:\n - the caller must have ``role``'s admin role." - }, - "functionSelector": "d547741f", - "id": 193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "revokeRole", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 173, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 170, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 193, - "src": "5491:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 169, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5491:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 172, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 193, - "src": "5505:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 171, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5505:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5490:31:0" - }, - "returnParameters": { - "id": 174, - "nodeType": "ParameterList", - "parameters": [], - "src": "5537:0:0" - }, - "scope": 307, - "src": "5471:226:0", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "body": { - "id": 214, - "nodeType": "Block", - "src": "6256:137:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 202, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 198, - "src": "6274:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 203, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "6285:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6285:12:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6274:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66", - "id": 206, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6299:49:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b", - "typeString": "literal_string \"AccessControl: can only renounce roles for self\"" - }, - "value": "AccessControl: can only renounce roles for self" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fb06fa8ff2141e8ed74502f6792273793f25f0e9d3cf15344f3f5a0d4948fd4b", - "typeString": "literal_string \"AccessControl: can only renounce roles for self\"" - } - ], - "id": 201, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6266:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6266:83:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 208, - "nodeType": "ExpressionStatement", - "src": "6266:83:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 210, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "6372:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 211, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 198, - "src": "6378:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 209, - "name": "_revokeRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 302, - "src": "6360:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 212, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6360:26:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 213, - "nodeType": "ExpressionStatement", - "src": "6360:26:0" - } - ] - }, - "documentation": { - "id": 194, - "nodeType": "StructuredDocumentation", - "src": "5703:480:0", - "text": " @dev Revokes `role` from the calling account.\n Roles are often managed via {grantRole} and {revokeRole}: this function's\n purpose is to provide a mechanism for accounts to lose their privileges\n if they are compromised (such as when a trusted device is misplaced).\n If the calling account had been granted `role`, emits a {RoleRevoked}\n event.\n Requirements:\n - the caller must be `account`." - }, - "functionSelector": "36568abe", - "id": 215, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "renounceRole", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 196, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 215, - "src": "6210:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 195, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6210:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 198, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 215, - "src": "6224:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 197, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6224:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6209:31:0" - }, - "returnParameters": { - "id": 200, - "nodeType": "ParameterList", - "parameters": [], - "src": "6256:0:0" - }, - "scope": 307, - "src": "6188:205:0", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "body": { - "id": 228, - "nodeType": "Block", - "src": "7026:42:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 224, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 218, - "src": "7047:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 225, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 220, - "src": "7053:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 223, - "name": "_grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 278, - "src": "7036:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7036:25:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 227, - "nodeType": "ExpressionStatement", - "src": "7036:25:0" - } - ] - }, - "documentation": { - "id": 216, - "nodeType": "StructuredDocumentation", - "src": "6399:554:0", - "text": " @dev Grants `role` to `account`.\n If `account` had not been already granted `role`, emits a {RoleGranted}\n event. Note that unlike {grantRole}, this function doesn't perform any\n checks on the calling account.\n [WARNING]\n ====\n This function should only be called from the constructor when setting\n up the initial roles for the system.\n Using this function in any other way is effectively circumventing the admin\n system imposed by {AccessControl}.\n ====" - }, - "id": 229, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setupRole", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 218, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 229, - "src": "6978:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 217, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6978:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 220, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 229, - "src": "6992:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 219, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6992:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6977:31:0" - }, - "returnParameters": { - "id": 222, - "nodeType": "ParameterList", - "parameters": [], - "src": "7026:0:0" - }, - "scope": 307, - "src": "6958:110:0", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 253, - "nodeType": "Block", - "src": "7266:123:0", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 238, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 232, - "src": "7298:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 239, - "name": "_roles", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "7304:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData storage ref)" - } - }, - "id": 241, - "indexExpression": { - "argumentTypes": null, - "id": 240, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 232, - "src": "7311:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7304:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage", - "typeString": "struct AccessControlUpgradeable.RoleData storage ref" - } - }, - "id": 242, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "adminRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 38, - "src": "7304:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 243, - "name": "adminRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 234, - "src": "7328:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 237, - "name": "RoleAdminChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "7281:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32,bytes32)" - } - }, - "id": 244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7281:57:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 245, - "nodeType": "EmitStatement", - "src": "7276:62:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 246, - "name": "_roles", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "7348:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData storage ref)" - } - }, - "id": 248, - "indexExpression": { - "argumentTypes": null, - "id": 247, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 232, - "src": "7355:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7348:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage", - "typeString": "struct AccessControlUpgradeable.RoleData storage ref" - } - }, - "id": 249, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "adminRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 38, - "src": "7348:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 250, - "name": "adminRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 234, - "src": "7373:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "7348:34:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 252, - "nodeType": "ExpressionStatement", - "src": "7348:34:0" - } - ] - }, - "documentation": { - "id": 230, - "nodeType": "StructuredDocumentation", - "src": "7074:114:0", - "text": " @dev Sets `adminRole` as ``role``'s admin role.\n Emits a {RoleAdminChanged} event." - }, - "id": 254, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setRoleAdmin", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 235, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 232, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 254, - "src": "7216:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 231, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7216:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 234, - "mutability": "mutable", - "name": "adminRole", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 254, - "src": "7230:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 233, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7230:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7215:33:0" - }, - "returnParameters": { - "id": 236, - "nodeType": "ParameterList", - "parameters": [], - "src": "7266:0:0" - }, - "scope": 307, - "src": "7193:196:0", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 277, - "nodeType": "Block", - "src": "7454:125:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 266, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "7493:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 261, - "name": "_roles", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "7468:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData storage ref)" - } - }, - "id": 263, - "indexExpression": { - "argumentTypes": null, - "id": 262, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 256, - "src": "7475:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7468:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage", - "typeString": "struct AccessControlUpgradeable.RoleData storage ref" - } - }, - "id": 264, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "members", - "nodeType": "MemberAccess", - "referencedDeclaration": 36, - "src": "7468:20:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage", - "typeString": "struct EnumerableSetUpgradeable.AddressSet storage ref" - } - }, - "id": 265, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 2669, - "src": "7468:24:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$2643_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$2643_storage_ptr_$", - "typeString": "function (struct EnumerableSetUpgradeable.AddressSet storage pointer,address) returns (bool)" - } - }, - "id": 267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7468:33:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 276, - "nodeType": "IfStatement", - "src": "7464:109:0", - "trueBody": { - "id": 275, - "nodeType": "Block", - "src": "7503:70:0", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 269, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 256, - "src": "7534:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 270, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "7540:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 271, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "7549:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7549:12:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 268, - "name": "RoleGranted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "7522:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_address_$returns$__$", - "typeString": "function (bytes32,address,address)" - } - }, - "id": 273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7522:40:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 274, - "nodeType": "EmitStatement", - "src": "7517:45:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 278, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_grantRole", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 259, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 256, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 278, - "src": "7415:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 255, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7415:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 258, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 278, - "src": "7429:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 257, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7429:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7414:31:0" - }, - "returnParameters": { - "id": 260, - "nodeType": "ParameterList", - "parameters": [], - "src": "7454:0:0" - }, - "scope": 307, - "src": "7395:184:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 301, - "nodeType": "Block", - "src": "7645:128:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 290, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 282, - "src": "7687:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 285, - "name": "_roles", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "7659:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$39_storage_$", - "typeString": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData storage ref)" - } - }, - "id": 287, - "indexExpression": { - "argumentTypes": null, - "id": 286, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 280, - "src": "7666:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7659:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RoleData_$39_storage", - "typeString": "struct AccessControlUpgradeable.RoleData storage ref" - } - }, - "id": 288, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "members", - "nodeType": "MemberAccess", - "referencedDeclaration": 36, - "src": "7659:20:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage", - "typeString": "struct EnumerableSetUpgradeable.AddressSet storage ref" - } - }, - "id": 289, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "remove", - "nodeType": "MemberAccess", - "referencedDeclaration": 2695, - "src": "7659:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$2643_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$2643_storage_ptr_$", - "typeString": "function (struct EnumerableSetUpgradeable.AddressSet storage pointer,address) returns (bool)" - } - }, - "id": 291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7659:36:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 300, - "nodeType": "IfStatement", - "src": "7655:112:0", - "trueBody": { - "id": 299, - "nodeType": "Block", - "src": "7697:70:0", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 293, - "name": "role", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 280, - "src": "7728:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 294, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 282, - "src": "7734:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 295, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "7743:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7743:12:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 292, - "name": "RoleRevoked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "7716:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_address_$returns$__$", - "typeString": "function (bytes32,address,address)" - } - }, - "id": 297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7716:40:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 298, - "nodeType": "EmitStatement", - "src": "7711:45:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 302, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_revokeRole", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 283, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 280, - "mutability": "mutable", - "name": "role", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 302, - "src": "7606:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 279, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7606:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 282, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 302, - "src": "7620:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 281, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7620:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7605:31:0" - }, - "returnParameters": { - "id": 284, - "nodeType": "ParameterList", - "parameters": [], - "src": "7645:0:0" - }, - "scope": 307, - "src": "7585:188:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "constant": false, - "id": 306, - "mutability": "mutable", - "name": "__gap", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 307, - "src": "7778:25:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$49_storage", - "typeString": "uint256[49]" - }, - "typeName": { - "baseType": { - "id": 303, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7778:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 305, - "length": { - "argumentTypes": null, - "hexValue": "3439", - "id": 304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7786:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_49_by_1", - "typeString": "int_const 49" - }, - "value": "49" - }, - "nodeType": "ArrayTypeName", - "src": "7778:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$49_storage_ptr", - "typeString": "uint256[49]" - } - }, - "value": null, - "visibility": "private" - } - ], - "scope": 308, - "src": "1513:6293:0" - } - ], - "src": "33:7774:0" - }, - "id": 0 - }, - "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol", - "exportedSymbols": { - "ERC165Upgradeable": [ - 382 - ] - }, - "id": 383, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 309, - "literals": [ - "solidity", - ">=", - "0.6", - ".0", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:1" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol", - "file": "./IERC165Upgradeable.sol", - "id": 310, - "nodeType": "ImportDirective", - "scope": 383, - "sourceUnit": 395, - "src": "66:34:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol", - "file": "../proxy/Initializable.sol", - "id": 311, - "nodeType": "ImportDirective", - "scope": 383, - "sourceUnit": 816, - "src": "101:36:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": true, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 313, - "name": "Initializable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 815, - "src": "350:13:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Initializable_$815", - "typeString": "contract Initializable" - } - }, - "id": 314, - "nodeType": "InheritanceSpecifier", - "src": "350:13:1" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 315, - "name": "IERC165Upgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 394, - "src": "365:18:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC165Upgradeable_$394", - "typeString": "contract IERC165Upgradeable" - } - }, - "id": 316, - "nodeType": "InheritanceSpecifier", - "src": "365:18:1" - } - ], - "contractDependencies": [ - 394, - 815 - ], - "contractKind": "contract", - "documentation": { - "id": 312, - "nodeType": "StructuredDocumentation", - "src": "139:171:1", - "text": " @dev Implementation of the {IERC165} interface.\n Contracts may inherit from this and call {_registerInterface} to declare\n their support of an interface." - }, - "fullyImplemented": true, - "id": 382, - "linearizedBaseContracts": [ - 382, - 394, - 815 - ], - "name": "ERC165Upgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 319, - "mutability": "constant", - "name": "_INTERFACE_ID_ERC165", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 382, - "src": "473:57:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 317, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "473:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30783031666663396137", - "id": 318, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "520:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_33540519_by_1", - "typeString": "int_const 33540519" - }, - "value": "0x01ffc9a7" - }, - "visibility": "private" - }, - { - "constant": false, - "documentation": { - "id": 320, - "nodeType": "StructuredDocumentation", - "src": "537:82:1", - "text": " @dev Mapping of interface ids to whether or not it's supported." - }, - "id": 324, - "mutability": "mutable", - "name": "_supportedInterfaces", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 382, - "src": "624:52:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$", - "typeString": "mapping(bytes4 => bool)" - }, - "typeName": { - "id": 323, - "keyType": { - "id": 321, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "632:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "nodeType": "Mapping", - "src": "624:23:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$", - "typeString": "mapping(bytes4 => bool)" - }, - "valueType": { - "id": 322, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "642:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 332, - "nodeType": "Block", - "src": "729:42:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 329, - "name": "__ERC165_init_unchained", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 343, - "src": "739:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "739:25:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 331, - "nodeType": "ExpressionStatement", - "src": "739:25:1" - } - ] - }, - "documentation": null, - "id": 333, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 327, - "modifierName": { - "argumentTypes": null, - "id": 326, - "name": "initializer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "717:11:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "717:11:1" - } - ], - "name": "__ERC165_init", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 325, - "nodeType": "ParameterList", - "parameters": [], - "src": "705:2:1" - }, - "returnParameters": { - "id": 328, - "nodeType": "ParameterList", - "parameters": [], - "src": "729:0:1" - }, - "scope": 382, - "src": "683:88:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 342, - "nodeType": "Block", - "src": "833:193:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 339, - "name": "_INTERFACE_ID_ERC165", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 319, - "src": "998:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - ], - "id": 338, - "name": "_registerInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 377, - "src": "979:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes4_$returns$__$", - "typeString": "function (bytes4)" - } - }, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "979:40:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 341, - "nodeType": "ExpressionStatement", - "src": "979:40:1" - } - ] - }, - "documentation": null, - "id": 343, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 336, - "modifierName": { - "argumentTypes": null, - "id": 335, - "name": "initializer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "821:11:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "821:11:1" - } - ], - "name": "__ERC165_init_unchained", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 334, - "nodeType": "ParameterList", - "parameters": [], - "src": "809:2:1" - }, - "returnParameters": { - "id": 337, - "nodeType": "ParameterList", - "parameters": [], - "src": "833:0:1" - }, - "scope": 382, - "src": "777:249:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "baseFunctions": [ - 393 - ], - "body": { - "id": 356, - "nodeType": "Block", - "src": "1267:57:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 352, - "name": "_supportedInterfaces", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 324, - "src": "1284:20:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$", - "typeString": "mapping(bytes4 => bool)" - } - }, - "id": 354, - "indexExpression": { - "argumentTypes": null, - "id": 353, - "name": "interfaceId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 346, - "src": "1305:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1284:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 351, - "id": 355, - "nodeType": "Return", - "src": "1277:40:1" - } - ] - }, - "documentation": { - "id": 344, - "nodeType": "StructuredDocumentation", - "src": "1032:139:1", - "text": " @dev See {IERC165-supportsInterface}.\n Time complexity O(1), guaranteed to always use less than 30 000 gas." - }, - "functionSelector": "01ffc9a7", - "id": 357, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "supportsInterface", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 348, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "1243:8:1" - }, - "parameters": { - "id": 347, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 346, - "mutability": "mutable", - "name": "interfaceId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 357, - "src": "1203:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 345, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "1203:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1202:20:1" - }, - "returnParameters": { - "id": 351, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 350, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 357, - "src": "1261:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 349, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1261:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1260:6:1" - }, - "scope": 382, - "src": "1176:148:1", - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - { - "body": { - "id": 376, - "nodeType": "Block", - "src": "1783:133:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "id": 366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 364, - "name": "interfaceId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 360, - "src": "1801:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30786666666666666666", - "id": 365, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1816:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4294967295_by_1", - "typeString": "int_const 4294967295" - }, - "value": "0xffffffff" - }, - "src": "1801:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4552433136353a20696e76616c696420696e74657266616365206964", - "id": 367, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1828:30:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_282912c0dfceceb28d77d0333f496b83948f9ba5b3154358a8b140b849289dee", - "typeString": "literal_string \"ERC165: invalid interface id\"" - }, - "value": "ERC165: invalid interface id" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_282912c0dfceceb28d77d0333f496b83948f9ba5b3154358a8b140b849289dee", - "typeString": "literal_string \"ERC165: invalid interface id\"" - } - ], - "id": 363, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1793:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1793:66:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 369, - "nodeType": "ExpressionStatement", - "src": "1793:66:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 370, - "name": "_supportedInterfaces", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 324, - "src": "1869:20:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes4_$_t_bool_$", - "typeString": "mapping(bytes4 => bool)" - } - }, - "id": 372, - "indexExpression": { - "argumentTypes": null, - "id": 371, - "name": "interfaceId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 360, - "src": "1890:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1869:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1905:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1869:40:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 375, - "nodeType": "ExpressionStatement", - "src": "1869:40:1" - } - ] - }, - "documentation": { - "id": 358, - "nodeType": "StructuredDocumentation", - "src": "1330:383:1", - "text": " @dev Registers the contract as an implementer of the interface defined by\n `interfaceId`. Support of the actual ERC165 interface is automatic and\n registering its interface id is not required.\n See {IERC165-supportsInterface}.\n Requirements:\n - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`)." - }, - "id": 377, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_registerInterface", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 361, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 360, - "mutability": "mutable", - "name": "interfaceId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 377, - "src": "1746:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 359, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "1746:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1745:20:1" - }, - "returnParameters": { - "id": 362, - "nodeType": "ParameterList", - "parameters": [], - "src": "1783:0:1" - }, - "scope": 382, - "src": "1718:198:1", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "constant": false, - "id": 381, - "mutability": "mutable", - "name": "__gap", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 382, - "src": "1921:25:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$49_storage", - "typeString": "uint256[49]" - }, - "typeName": { - "baseType": { - "id": 378, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1921:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 380, - "length": { - "argumentTypes": null, - "hexValue": "3439", - "id": 379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1929:2:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_49_by_1", - "typeString": "int_const 49" - }, - "value": "49" - }, - "nodeType": "ArrayTypeName", - "src": "1921:11:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$49_storage_ptr", - "typeString": "uint256[49]" - } - }, - "value": null, - "visibility": "private" - } - ], - "scope": 383, - "src": "311:1638:1" - } - ], - "src": "33:1917:1" - }, - "id": 1 - }, - "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol", - "exportedSymbols": { - "IERC165Upgradeable": [ - 394 - ] - }, - "id": 395, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 384, - "literals": [ - "solidity", - ">=", - "0.6", - ".0", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:2" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": { - "id": 385, - "nodeType": "StructuredDocumentation", - "src": "66:279:2", - "text": " @dev Interface of the ERC165 standard, as defined in the\n https://eips.ethereum.org/EIPS/eip-165[EIP].\n Implementers can declare support of contract interfaces, which can then be\n queried by others ({ERC165Checker}).\n For an implementation, see {ERC165}." - }, - "fullyImplemented": false, - "id": 394, - "linearizedBaseContracts": [ - 394 - ], - "name": "IERC165Upgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": { - "id": 386, - "nodeType": "StructuredDocumentation", - "src": "381:340:2", - "text": " @dev Returns true if this contract implements the interface defined by\n `interfaceId`. See the corresponding\n https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n to learn more about how these ids are created.\n This function call must use less than 30 000 gas." - }, - "functionSelector": "01ffc9a7", - "id": 393, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "supportsInterface", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 389, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 388, - "mutability": "mutable", - "name": "interfaceId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 393, - "src": "753:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 387, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "753:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "752:20:2" - }, - "returnParameters": { - "id": 392, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 391, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 393, - "src": "796:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 390, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "796:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "795:6:2" - }, - "scope": 394, - "src": "726:76:2", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - } - ], - "scope": 395, - "src": "346:458:2" - } - ], - "src": "33:772:2" - }, - "id": 2 - }, - "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol", - "exportedSymbols": { - "SafeMathUpgradeable": [ - 749 - ] - }, - "id": 750, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 396, - "literals": [ - "solidity", - ">=", - "0.6", - ".0", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:3" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 397, - "nodeType": "StructuredDocumentation", - "src": "66:563:3", - "text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n Arithmetic operations in Solidity wrap on overflow. This can easily result\n in bugs, because programmers usually assume that an overflow raises an\n error, which is the standard behavior in high level programming languages.\n `SafeMath` restores this intuition by reverting the transaction when an\n operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always." - }, - "fullyImplemented": true, - "id": 749, - "linearizedBaseContracts": [ - 749 - ], - "name": "SafeMathUpgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 427, - "nodeType": "Block", - "src": "876:98:3", - "statements": [ - { - "assignments": [ - 410 - ], - "declarations": [ - { - "constant": false, - "id": 410, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 427, - "src": "886:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 409, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "886:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 414, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 411, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 400, - "src": "898:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 412, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 402, - "src": "902:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "898:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "886:17:3" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 417, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 415, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 410, - "src": "917:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 416, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 400, - "src": "921:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "917:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 422, - "nodeType": "IfStatement", - "src": "913:28:3", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "932:5:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "939:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 420, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "931:10:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 408, - "id": 421, - "nodeType": "Return", - "src": "924:17:3" - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "959:4:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "id": 424, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 410, - "src": "965:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 425, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "958:9:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", - "typeString": "tuple(bool,uint256)" - } - }, - "functionReturnParameters": 408, - "id": 426, - "nodeType": "Return", - "src": "951:16:3" - } - ] - }, - "documentation": { - "id": 398, - "nodeType": "StructuredDocumentation", - "src": "664:131:3", - "text": " @dev Returns the addition of two unsigned integers, with an overflow flag.\n _Available since v3.4._" - }, - "id": 428, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryAdd", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 403, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 400, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 428, - "src": "816:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 399, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "816:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 402, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 428, - "src": "827:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 401, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "827:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "815:22:3" - }, - "returnParameters": { - "id": 408, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 405, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 428, - "src": "861:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 404, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "861:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 407, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 428, - "src": "867:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 406, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "867:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "860:15:3" - }, - "scope": 749, - "src": "800:174:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 454, - "nodeType": "Block", - "src": "1196:75:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 440, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "1210:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 441, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 431, - "src": "1214:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1210:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 447, - "nodeType": "IfStatement", - "src": "1206:28:3", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1225:5:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 444, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1232:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 445, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1224:10:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 439, - "id": 446, - "nodeType": "Return", - "src": "1217:17:3" - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 448, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1252:4:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 449, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 431, - "src": "1258:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 450, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "1262:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1258:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 452, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1251:13:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", - "typeString": "tuple(bool,uint256)" - } - }, - "functionReturnParameters": 439, - "id": 453, - "nodeType": "Return", - "src": "1244:20:3" - } - ] - }, - "documentation": { - "id": 429, - "nodeType": "StructuredDocumentation", - "src": "980:135:3", - "text": " @dev Returns the substraction of two unsigned integers, with an overflow flag.\n _Available since v3.4._" - }, - "id": 455, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "trySub", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 434, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 431, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 455, - "src": "1136:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 430, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1136:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 433, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 455, - "src": "1147:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 432, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1147:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1135:22:3" - }, - "returnParameters": { - "id": 439, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 436, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 455, - "src": "1181:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 435, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1181:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 438, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 455, - "src": "1187:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 437, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1187:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1180:15:3" - }, - "scope": 749, - "src": "1120:151:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 495, - "nodeType": "Block", - "src": "1495:359:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 467, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 458, - "src": "1727:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 468, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1732:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1727:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 474, - "nodeType": "IfStatement", - "src": "1723:28:3", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1743:4:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1749:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 472, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1742:9:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 466, - "id": 473, - "nodeType": "Return", - "src": "1735:16:3" - } - }, - { - "assignments": [ - 476 - ], - "declarations": [ - { - "constant": false, - "id": 476, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 495, - "src": "1761:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 475, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1761:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 480, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 477, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 458, - "src": "1773:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 478, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "1777:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1773:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1761:17:3" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 481, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "1792:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 482, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 458, - "src": "1796:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1792:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 484, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "1801:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1792:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 490, - "nodeType": "IfStatement", - "src": "1788:33:3", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 486, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1812:5:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1819:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 488, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1811:10:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 466, - "id": 489, - "nodeType": "Return", - "src": "1804:17:3" - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1839:4:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "id": 492, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 476, - "src": "1845:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 493, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1838:9:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", - "typeString": "tuple(bool,uint256)" - } - }, - "functionReturnParameters": 466, - "id": 494, - "nodeType": "Return", - "src": "1831:16:3" - } - ] - }, - "documentation": { - "id": 456, - "nodeType": "StructuredDocumentation", - "src": "1277:137:3", - "text": " @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n _Available since v3.4._" - }, - "id": 496, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryMul", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 461, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 458, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 496, - "src": "1435:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 457, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1435:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 460, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 496, - "src": "1446:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 459, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1446:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1434:22:3" - }, - "returnParameters": { - "id": 466, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 463, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 496, - "src": "1480:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 462, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1480:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 465, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 496, - "src": "1486:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 464, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1486:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1479:15:3" - }, - "scope": 749, - "src": "1419:435:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 522, - "nodeType": "Block", - "src": "2079:76:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 508, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 501, - "src": "2093:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 509, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2098:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2093:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 515, - "nodeType": "IfStatement", - "src": "2089:29:3", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 511, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2109:5:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 512, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2116:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 513, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2108:10:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 507, - "id": 514, - "nodeType": "Return", - "src": "2101:17:3" - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2136:4:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 517, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 499, - "src": "2142:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 518, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 501, - "src": "2146:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2142:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 520, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2135:13:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", - "typeString": "tuple(bool,uint256)" - } - }, - "functionReturnParameters": 507, - "id": 521, - "nodeType": "Return", - "src": "2128:20:3" - } - ] - }, - "documentation": { - "id": 497, - "nodeType": "StructuredDocumentation", - "src": "1860:138:3", - "text": " @dev Returns the division of two unsigned integers, with a division by zero flag.\n _Available since v3.4._" - }, - "id": 523, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryDiv", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 502, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 499, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 523, - "src": "2019:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 498, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2019:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 501, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 523, - "src": "2030:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 500, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2030:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2018:22:3" - }, - "returnParameters": { - "id": 507, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 504, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 523, - "src": "2064:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 503, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2064:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 506, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 523, - "src": "2070:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 505, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2070:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2063:15:3" - }, - "scope": 749, - "src": "2003:152:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 549, - "nodeType": "Block", - "src": "2390:76:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 535, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 528, - "src": "2404:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2409:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2404:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 542, - "nodeType": "IfStatement", - "src": "2400:29:3", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 538, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2420:5:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2427:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "id": 540, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2419:10:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", - "typeString": "tuple(bool,int_const 0)" - } - }, - "functionReturnParameters": 534, - "id": 541, - "nodeType": "Return", - "src": "2412:17:3" - } - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 543, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2447:4:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 544, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 526, - "src": "2453:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 545, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 528, - "src": "2457:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2453:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 547, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2446:13:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", - "typeString": "tuple(bool,uint256)" - } - }, - "functionReturnParameters": 534, - "id": 548, - "nodeType": "Return", - "src": "2439:20:3" - } - ] - }, - "documentation": { - "id": 524, - "nodeType": "StructuredDocumentation", - "src": "2161:148:3", - "text": " @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n _Available since v3.4._" - }, - "id": 550, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryMod", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 529, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 526, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 550, - "src": "2330:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 525, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2330:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 528, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 550, - "src": "2341:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 527, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2341:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2329:22:3" - }, - "returnParameters": { - "id": 534, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 531, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 550, - "src": "2375:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 530, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2375:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 533, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 550, - "src": "2381:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 532, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2381:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2374:15:3" - }, - "scope": 749, - "src": "2314:152:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 575, - "nodeType": "Block", - "src": "2768:108:3", - "statements": [ - { - "assignments": [ - 561 - ], - "declarations": [ - { - "constant": false, - "id": 561, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 575, - "src": "2778:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 560, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2778:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 565, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 562, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 553, - "src": "2790:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 563, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 555, - "src": "2794:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2790:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2778:17:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 567, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 561, - "src": "2813:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 568, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 553, - "src": "2818:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2813:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", - "id": 570, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2821:29:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - }, - "value": "SafeMath: addition overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", - "typeString": "literal_string \"SafeMath: addition overflow\"" - } - ], - "id": 566, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2805:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2805:46:3", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 572, - "nodeType": "ExpressionStatement", - "src": "2805:46:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 573, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 561, - "src": "2868:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 559, - "id": 574, - "nodeType": "Return", - "src": "2861:8:3" - } - ] - }, - "documentation": { - "id": 551, - "nodeType": "StructuredDocumentation", - "src": "2472:224:3", - "text": " @dev Returns the addition of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `+` operator.\n Requirements:\n - Addition cannot overflow." - }, - "id": 576, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 556, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 553, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 576, - "src": "2714:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 552, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2714:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 555, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 576, - "src": "2725:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 554, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2725:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2713:22:3" - }, - "returnParameters": { - "id": 559, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 558, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 576, - "src": "2759:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 557, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2759:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2758:9:3" - }, - "scope": 749, - "src": "2701:175:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 597, - "nodeType": "Block", - "src": "3214:88:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 587, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 581, - "src": "3232:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 588, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 579, - "src": "3237:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3232:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3240:32:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - }, - "value": "SafeMath: subtraction overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", - "typeString": "literal_string \"SafeMath: subtraction overflow\"" - } - ], - "id": 586, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3224:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3224:49:3", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 592, - "nodeType": "ExpressionStatement", - "src": "3224:49:3" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 593, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 579, - "src": "3290:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 594, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 581, - "src": "3294:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3290:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 585, - "id": 596, - "nodeType": "Return", - "src": "3283:12:3" - } - ] - }, - "documentation": { - "id": 577, - "nodeType": "StructuredDocumentation", - "src": "2882:260:3", - "text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow." - }, - "id": 598, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 582, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 579, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 598, - "src": "3160:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 578, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3160:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 581, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 598, - "src": "3171:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 580, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3171:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3159:22:3" - }, - "returnParameters": { - "id": 585, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 584, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 598, - "src": "3205:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 583, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3205:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3204:9:3" - }, - "scope": 749, - "src": "3147:155:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 631, - "nodeType": "Block", - "src": "3616:148:3", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 608, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 601, - "src": "3630:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 609, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3635:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3630:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 613, - "nodeType": "IfStatement", - "src": "3626:20:3", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 611, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3645:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 607, - "id": 612, - "nodeType": "Return", - "src": "3638:8:3" - } - }, - { - "assignments": [ - 615 - ], - "declarations": [ - { - "constant": false, - "id": 615, - "mutability": "mutable", - "name": "c", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 631, - "src": "3656:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 614, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3656:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 619, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 616, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 601, - "src": "3668:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 617, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 603, - "src": "3672:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3668:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3656:17:3" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 621, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 615, - "src": "3691:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 622, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 601, - "src": "3695:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3691:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 624, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 603, - "src": "3700:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3691:10:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", - "id": 626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3703:35:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - }, - "value": "SafeMath: multiplication overflow" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", - "typeString": "literal_string \"SafeMath: multiplication overflow\"" - } - ], - "id": 620, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3683:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3683:56:3", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 628, - "nodeType": "ExpressionStatement", - "src": "3683:56:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 629, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 615, - "src": "3756:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 607, - "id": 630, - "nodeType": "Return", - "src": "3749:8:3" - } - ] - }, - "documentation": { - "id": 599, - "nodeType": "StructuredDocumentation", - "src": "3308:236:3", - "text": " @dev Returns the multiplication of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `*` operator.\n Requirements:\n - Multiplication cannot overflow." - }, - "id": 632, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 604, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 601, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 632, - "src": "3562:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 600, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3562:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 603, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 632, - "src": "3573:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 602, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3573:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3561:22:3" - }, - "returnParameters": { - "id": 607, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 606, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 632, - "src": "3607:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 605, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3607:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3606:9:3" - }, - "scope": 749, - "src": "3549:215:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 653, - "nodeType": "Block", - "src": "4295:83:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 643, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 637, - "src": "4313:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 644, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4317:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4313:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", - "id": 646, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4320:28:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - }, - "value": "SafeMath: division by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", - "typeString": "literal_string \"SafeMath: division by zero\"" - } - ], - "id": 642, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4305:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4305:44:3", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 648, - "nodeType": "ExpressionStatement", - "src": "4305:44:3" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 649, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 635, - "src": "4366:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 650, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 637, - "src": "4370:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4366:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 641, - "id": 652, - "nodeType": "Return", - "src": "4359:12:3" - } - ] - }, - "documentation": { - "id": 633, - "nodeType": "StructuredDocumentation", - "src": "3770:453:3", - "text": " @dev Returns the integer division of two unsigned integers, reverting on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 654, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 638, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 635, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 654, - "src": "4241:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 634, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4241:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 637, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 654, - "src": "4252:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 636, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4252:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4240:22:3" - }, - "returnParameters": { - "id": 641, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 640, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 654, - "src": "4286:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 639, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4286:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4285:9:3" - }, - "scope": 749, - "src": "4228:150:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 675, - "nodeType": "Block", - "src": "4898:81:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 665, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 659, - "src": "4916:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4920:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4916:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", - "id": 668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4923:26:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - }, - "value": "SafeMath: modulo by zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", - "typeString": "literal_string \"SafeMath: modulo by zero\"" - } - ], - "id": 664, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4908:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 669, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4908:42:3", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 670, - "nodeType": "ExpressionStatement", - "src": "4908:42:3" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 671, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 657, - "src": "4967:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 672, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 659, - "src": "4971:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4967:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 663, - "id": 674, - "nodeType": "Return", - "src": "4960:12:3" - } - ] - }, - "documentation": { - "id": 655, - "nodeType": "StructuredDocumentation", - "src": "4384:442:3", - "text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n reverting when dividing by zero.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 676, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 660, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 657, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 676, - "src": "4844:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4844:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 659, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 676, - "src": "4855:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 658, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4855:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4843:22:3" - }, - "returnParameters": { - "id": 663, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 662, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 676, - "src": "4889:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 661, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4889:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4888:9:3" - }, - "scope": 749, - "src": "4831:148:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 699, - "nodeType": "Block", - "src": "5538:68:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 689, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 681, - "src": "5556:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 690, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 679, - "src": "5561:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5556:6:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 692, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 683, - "src": "5564:12:3", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 688, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5548:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5548:29:3", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 694, - "nodeType": "ExpressionStatement", - "src": "5548:29:3" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 695, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 679, - "src": "5594:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 696, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 681, - "src": "5598:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5594:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 687, - "id": 698, - "nodeType": "Return", - "src": "5587:12:3" - } - ] - }, - "documentation": { - "id": 677, - "nodeType": "StructuredDocumentation", - "src": "4985:453:3", - "text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {trySub}.\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow." - }, - "id": 700, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 684, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 679, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 700, - "src": "5456:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 678, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5456:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 681, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 700, - "src": "5467:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 680, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5467:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 683, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 700, - "src": "5478:26:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 682, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5478:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5455:50:3" - }, - "returnParameters": { - "id": 687, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 686, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 700, - "src": "5529:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 685, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5529:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5528:9:3" - }, - "scope": 749, - "src": "5443:163:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 723, - "nodeType": "Block", - "src": "6358:67:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 713, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 705, - "src": "6376:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 714, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6380:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6376:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 716, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "6383:12:3", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 712, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6368:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6368:28:3", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 718, - "nodeType": "ExpressionStatement", - "src": "6368:28:3" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 719, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "6413:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 720, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 705, - "src": "6417:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6413:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 711, - "id": 722, - "nodeType": "Return", - "src": "6406:12:3" - } - ] - }, - "documentation": { - "id": 701, - "nodeType": "StructuredDocumentation", - "src": "5612:646:3", - "text": " @dev Returns the integer division of two unsigned integers, reverting with custom message on\n division by zero. The result is rounded towards zero.\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryDiv}.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 724, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 708, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 703, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 724, - "src": "6276:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 702, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6276:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 705, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 724, - "src": "6287:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 704, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6287:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 707, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 724, - "src": "6298:26:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 706, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6298:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6275:50:3" - }, - "returnParameters": { - "id": 711, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 710, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 724, - "src": "6349:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 709, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6349:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6348:9:3" - }, - "scope": 749, - "src": "6263:162:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 747, - "nodeType": "Block", - "src": "7166:67:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 737, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 729, - "src": "7184:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 738, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7188:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7184:5:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 740, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "7191:12:3", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 736, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7176:7:3", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7176:28:3", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 742, - "nodeType": "ExpressionStatement", - "src": "7176:28:3" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 743, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "7221:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 744, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 729, - "src": "7225:1:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7221:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 735, - "id": 746, - "nodeType": "Return", - "src": "7214:12:3" - } - ] - }, - "documentation": { - "id": 725, - "nodeType": "StructuredDocumentation", - "src": "6431:635:3", - "text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n reverting with custom message when dividing by zero.\n CAUTION: This function is deprecated because it requires allocating memory for the error\n message unnecessarily. For custom revert reasons use {tryMod}.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." - }, - "id": 748, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mod", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 732, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 727, - "mutability": "mutable", - "name": "a", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 748, - "src": "7084:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 726, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7084:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 729, - "mutability": "mutable", - "name": "b", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 748, - "src": "7095:9:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 728, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7095:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 731, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 748, - "src": "7106:26:3", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 730, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7106:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7083:50:3" - }, - "returnParameters": { - "id": 735, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 734, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 748, - "src": "7157:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 733, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7157:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7156:9:3" - }, - "scope": 749, - "src": "7071:162:3", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 750, - "src": "630:6605:3" - } - ], - "src": "33:7203:3" - }, - "id": 3 - }, - "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol", - "exportedSymbols": { - "Initializable": [ - 815 - ] - }, - "id": 816, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 751, - "literals": [ - "solidity", - ">=", - "0.4", - ".24", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "79:32:4" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol", - "file": "../utils/AddressUpgradeable.sol", - "id": 752, - "nodeType": "ImportDirective", - "scope": 816, - "sourceUnit": 2273, - "src": "113:41:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": true, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": { - "id": 753, - "nodeType": "StructuredDocumentation", - "src": "156:938:4", - "text": " @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\n CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n that all initializers are idempotent. This is not verified automatically as constructors are by Solidity." - }, - "fullyImplemented": true, - "id": 815, - "linearizedBaseContracts": [ - 815 - ], - "name": "Initializable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "documentation": { - "id": 754, - "nodeType": "StructuredDocumentation", - "src": "1134:73:4", - "text": " @dev Indicates that the contract has been initialized." - }, - "id": 756, - "mutability": "mutable", - "name": "_initialized", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 815, - "src": "1212:25:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 755, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1212:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "documentation": { - "id": 757, - "nodeType": "StructuredDocumentation", - "src": "1244:91:4", - "text": " @dev Indicates that the contract is in the process of being initialized." - }, - "id": 759, - "mutability": "mutable", - "name": "_initializing", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 815, - "src": "1340:26:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 758, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1340:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "private" - }, - { - "body": { - "id": 797, - "nodeType": "Block", - "src": "1494:368:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 763, - "name": "_initializing", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 759, - "src": "1512:13:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 764, - "name": "_isConstructor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 814, - "src": "1529:14:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", - "typeString": "function () view returns (bool)" - } - }, - "id": 765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1529:16:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1512:33:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 768, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1549:13:4", - "subExpression": { - "argumentTypes": null, - "id": 767, - "name": "_initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 756, - "src": "1550:12:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1512:50:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564", - "id": 770, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1564:48:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7a2a4e26842155ea933fe6eb6e3137eb5a296dcdf55721c552be7b4c3cc23759", - "typeString": "literal_string \"Initializable: contract is already initialized\"" - }, - "value": "Initializable: contract is already initialized" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7a2a4e26842155ea933fe6eb6e3137eb5a296dcdf55721c552be7b4c3cc23759", - "typeString": "literal_string \"Initializable: contract is already initialized\"" - } - ], - "id": 762, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1504:7:4", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1504:109:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 772, - "nodeType": "ExpressionStatement", - "src": "1504:109:4" - }, - { - "assignments": [ - 774 - ], - "declarations": [ - { - "constant": false, - "id": 774, - "mutability": "mutable", - "name": "isTopLevelCall", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 797, - "src": "1624:19:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 773, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1624:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 777, - "initialValue": { - "argumentTypes": null, - "id": 776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1646:14:4", - "subExpression": { - "argumentTypes": null, - "id": 775, - "name": "_initializing", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 759, - "src": "1647:13:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1624:36:4" - }, - { - "condition": { - "argumentTypes": null, - "id": 778, - "name": "isTopLevelCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 774, - "src": "1674:14:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 788, - "nodeType": "IfStatement", - "src": "1670:98:4", - "trueBody": { - "id": 787, - "nodeType": "Block", - "src": "1690:78:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 779, - "name": "_initializing", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 759, - "src": "1704:13:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 780, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1720:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1704:20:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 782, - "nodeType": "ExpressionStatement", - "src": "1704:20:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 783, - "name": "_initialized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 756, - "src": "1738:12:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 784, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1753:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1738:19:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 786, - "nodeType": "ExpressionStatement", - "src": "1738:19:4" - } - ] - } - }, - { - "id": 789, - "nodeType": "PlaceholderStatement", - "src": "1778:1:4" - }, - { - "condition": { - "argumentTypes": null, - "id": 790, - "name": "isTopLevelCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 774, - "src": "1794:14:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 796, - "nodeType": "IfStatement", - "src": "1790:66:4", - "trueBody": { - "id": 795, - "nodeType": "Block", - "src": "1810:46:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 793, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 791, - "name": "_initializing", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 759, - "src": "1824:13:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 792, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1840:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1824:21:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 794, - "nodeType": "ExpressionStatement", - "src": "1824:21:4" - } - ] - } - } - ] - }, - "documentation": { - "id": 760, - "nodeType": "StructuredDocumentation", - "src": "1373:93:4", - "text": " @dev Modifier to protect an initializer function from being invoked twice." - }, - "id": 798, - "name": "initializer", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 761, - "nodeType": "ParameterList", - "parameters": [], - "src": "1491:2:4" - }, - "src": "1471:391:4", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 813, - "nodeType": "Block", - "src": "2006:69:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "2023:45:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 808, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "2062:4:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Initializable_$815", - "typeString": "contract Initializable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Initializable_$815", - "typeString": "contract Initializable" - } - ], - "id": 807, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2054:7:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 806, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2054:7:4", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2054:13:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 804, - "name": "AddressUpgradeable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2272, - "src": "2024:18:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_AddressUpgradeable_$2272_$", - "typeString": "type(library AddressUpgradeable)" - } - }, - "id": 805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 2048, - "src": "2024:29:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2024:44:4", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 803, - "id": 812, - "nodeType": "Return", - "src": "2016:52:4" - } - ] - }, - "documentation": { - "id": 799, - "nodeType": "StructuredDocumentation", - "src": "1868:79:4", - "text": "@dev Returns true if and only if the function is running in the constructor" - }, - "id": 814, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isConstructor", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 800, - "nodeType": "ParameterList", - "parameters": [], - "src": "1975:2:4" - }, - "returnParameters": { - "id": 803, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 802, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 814, - "src": "2000:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 801, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2000:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1999:6:4" - }, - "scope": 815, - "src": "1952:123:4", - "stateMutability": "view", - "virtual": false, - "visibility": "private" - } - ], - "scope": 816, - "src": "1095:982:4" - } - ], - "src": "79:1999:4" - }, - "id": 4 - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol", - "exportedSymbols": { - "ERC1155Upgradeable": [ - 1850 - ] - }, - "id": 1851, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 817, - "literals": [ - "solidity", - ">=", - "0.6", - ".0", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:5" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol", - "file": "./IERC1155Upgradeable.sol", - "id": 818, - "nodeType": "ImportDirective", - "scope": 1851, - "sourceUnit": 2029, - "src": "66:35:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol", - "file": "./IERC1155MetadataURIUpgradeable.sol", - "id": 819, - "nodeType": "ImportDirective", - "scope": 1851, - "sourceUnit": 1866, - "src": "102:46:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol", - "file": "./IERC1155ReceiverUpgradeable.sol", - "id": 820, - "nodeType": "ImportDirective", - "scope": 1851, - "sourceUnit": 1907, - "src": "149:43:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol", - "file": "../../utils/ContextUpgradeable.sol", - "id": 821, - "nodeType": "ImportDirective", - "scope": 1851, - "sourceUnit": 2318, - "src": "193:44:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol", - "file": "../../introspection/ERC165Upgradeable.sol", - "id": 822, - "nodeType": "ImportDirective", - "scope": 1851, - "sourceUnit": 383, - "src": "238:51:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol", - "file": "../../math/SafeMathUpgradeable.sol", - "id": 823, - "nodeType": "ImportDirective", - "scope": 1851, - "sourceUnit": 750, - "src": "290:44:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol", - "file": "../../utils/AddressUpgradeable.sol", - "id": 824, - "nodeType": "ImportDirective", - "scope": 1851, - "sourceUnit": 2273, - "src": "335:44:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol", - "file": "../../proxy/Initializable.sol", - "id": 825, - "nodeType": "ImportDirective", - "scope": 1851, - "sourceUnit": 816, - "src": "380:39:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 827, - "name": "Initializable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 815, - "src": "670:13:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Initializable_$815", - "typeString": "contract Initializable" - } - }, - "id": 828, - "nodeType": "InheritanceSpecifier", - "src": "670:13:5" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 829, - "name": "ContextUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2317, - "src": "685:18:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ContextUpgradeable_$2317", - "typeString": "contract ContextUpgradeable" - } - }, - "id": 830, - "nodeType": "InheritanceSpecifier", - "src": "685:18:5" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 831, - "name": "ERC165Upgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 382, - "src": "705:17:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC165Upgradeable_$382", - "typeString": "contract ERC165Upgradeable" - } - }, - "id": 832, - "nodeType": "InheritanceSpecifier", - "src": "705:17:5" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 833, - "name": "IERC1155Upgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2028, - "src": "724:19:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC1155Upgradeable_$2028", - "typeString": "contract IERC1155Upgradeable" - } - }, - "id": 834, - "nodeType": "InheritanceSpecifier", - "src": "724:19:5" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 835, - "name": "IERC1155MetadataURIUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1865, - "src": "745:30:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC1155MetadataURIUpgradeable_$1865", - "typeString": "contract IERC1155MetadataURIUpgradeable" - } - }, - "id": 836, - "nodeType": "InheritanceSpecifier", - "src": "745:30:5" - } - ], - "contractDependencies": [ - 382, - 394, - 815, - 1865, - 2028, - 2317 - ], - "contractKind": "contract", - "documentation": { - "id": 826, - "nodeType": "StructuredDocumentation", - "src": "421:217:5", - "text": " @dev Implementation of the basic standard multi-token.\n See https://eips.ethereum.org/EIPS/eip-1155\n Originally based on code by Enjin: https://github.com/enjin/erc-1155\n _Available since v3.1._" - }, - "fullyImplemented": true, - "id": 1850, - "linearizedBaseContracts": [ - 1850, - 1865, - 2028, - 382, - 394, - 2317, - 815 - ], - "name": "ERC1155Upgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 839, - "libraryName": { - "contractScope": null, - "id": 837, - "name": "SafeMathUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 749, - "src": "788:19:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMathUpgradeable_$749", - "typeString": "library SafeMathUpgradeable" - } - }, - "nodeType": "UsingForDirective", - "src": "782:38:5", - "typeName": { - "id": 838, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "812:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 842, - "libraryName": { - "contractScope": null, - "id": 840, - "name": "AddressUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2272, - "src": "831:18:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_AddressUpgradeable_$2272", - "typeString": "library AddressUpgradeable" - } - }, - "nodeType": "UsingForDirective", - "src": "825:37:5", - "typeName": { - "id": 841, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "854:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "constant": false, - "id": 848, - "mutability": "mutable", - "name": "_balances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1850, - "src": "917:66:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - }, - "typeName": { - "id": 847, - "keyType": { - "id": 843, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "926:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "917:48:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - }, - "valueType": { - "id": 846, - "keyType": { - "id": 844, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "945:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "937:27:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 845, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "956:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 854, - "mutability": "mutable", - "name": "_operatorApprovals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1850, - "src": "1040:72:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", - "typeString": "mapping(address => mapping(address => bool))" - }, - "typeName": { - "id": 853, - "keyType": { - "id": 849, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1049:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1040:45:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", - "typeString": "mapping(address => mapping(address => bool))" - }, - "valueType": { - "id": 852, - "keyType": { - "id": 850, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1068:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1060:24:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - }, - "valueType": { - "id": 851, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1079:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 856, - "mutability": "mutable", - "name": "_uri", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1850, - "src": "1233:19:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 855, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1233:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": true, - "id": 859, - "mutability": "constant", - "name": "_INTERFACE_ID_ERC1155", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1850, - "src": "1925:58:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 857, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "1925:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30786439623637613236", - "id": 858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1973:10:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3652614694_by_1", - "typeString": "int_const 3652614694" - }, - "value": "0xd9b67a26" - }, - "visibility": "private" - }, - { - "constant": true, - "id": 862, - "mutability": "constant", - "name": "_INTERFACE_ID_ERC1155_METADATA_URI", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1850, - "src": "2064:71:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 860, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "2064:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30783065383933343163", - "id": 861, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2125:10:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_243872796_by_1", - "typeString": "int_const 243872796" - }, - "value": "0x0e89341c" - }, - "visibility": "private" - }, - { - "body": { - "id": 880, - "nodeType": "Block", - "src": "2250:118:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 870, - "name": "__Context_init_unchained", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "2260:24:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2260:26:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 872, - "nodeType": "ExpressionStatement", - "src": "2260:26:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 873, - "name": "__ERC165_init_unchained", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 343, - "src": "2296:23:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2296:25:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 875, - "nodeType": "ExpressionStatement", - "src": "2296:25:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 877, - "name": "uri_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 865, - "src": "2356:4:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 876, - "name": "__ERC1155_init_unchained", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 901, - "src": "2331:24:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory)" - } - }, - "id": 878, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2331:30:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 879, - "nodeType": "ExpressionStatement", - "src": "2331:30:5" - } - ] - }, - "documentation": { - "id": 863, - "nodeType": "StructuredDocumentation", - "src": "2142:38:5", - "text": " @dev See {_setURI}." - }, - "id": 881, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 868, - "modifierName": { - "argumentTypes": null, - "id": 867, - "name": "initializer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "2238:11:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2238:11:5" - } - ], - "name": "__ERC1155_init", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 866, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 865, - "mutability": "mutable", - "name": "uri_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 881, - "src": "2209:18:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 864, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2209:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2208:20:5" - }, - "returnParameters": { - "id": 869, - "nodeType": "ParameterList", - "parameters": [], - "src": "2250:0:5" - }, - "scope": 1850, - "src": "2185:183:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 900, - "nodeType": "Block", - "src": "2449:314:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 889, - "name": "uri_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 883, - "src": "2467:4:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 888, - "name": "_setURI", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1312, - "src": "2459:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory)" - } - }, - "id": 890, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2459:13:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 891, - "nodeType": "ExpressionStatement", - "src": "2459:13:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 893, - "name": "_INTERFACE_ID_ERC1155", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 859, - "src": "2580:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - ], - "id": 892, - "name": "_registerInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 377, - "src": "2561:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes4_$returns$__$", - "typeString": "function (bytes4)" - } - }, - "id": 894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2561:41:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 895, - "nodeType": "ExpressionStatement", - "src": "2561:41:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 897, - "name": "_INTERFACE_ID_ERC1155_METADATA_URI", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 862, - "src": "2721:34:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - ], - "id": 896, - "name": "_registerInterface", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 377, - "src": "2702:18:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes4_$returns$__$", - "typeString": "function (bytes4)" - } - }, - "id": 898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2702:54:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 899, - "nodeType": "ExpressionStatement", - "src": "2702:54:5" - } - ] - }, - "documentation": null, - "id": 901, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 886, - "modifierName": { - "argumentTypes": null, - "id": 885, - "name": "initializer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "2437:11:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2437:11:5" - } - ], - "name": "__ERC1155_init_unchained", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 884, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 883, - "mutability": "mutable", - "name": "uri_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 901, - "src": "2408:18:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 882, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2408:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2407:20:5" - }, - "returnParameters": { - "id": 887, - "nodeType": "ParameterList", - "parameters": [], - "src": "2449:0:5" - }, - "scope": 1850, - "src": "2374:389:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "baseFunctions": [ - 1864 - ], - "body": { - "id": 912, - "nodeType": "Block", - "src": "3239:28:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 910, - "name": "_uri", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 856, - "src": "3256:4:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 909, - "id": 911, - "nodeType": "Return", - "src": "3249:11:5" - } - ] - }, - "documentation": { - "id": 902, - "nodeType": "StructuredDocumentation", - "src": "2769:388:5", - "text": " @dev See {IERC1155MetadataURI-uri}.\n This implementation returns the same URI for *all* token types. It relies\n on the token type ID substitution mechanism\n https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n Clients calling this function must replace the `\\{id\\}` substring with the\n actual token type ID." - }, - "functionSelector": "0e89341c", - "id": 913, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "uri", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 906, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3206:8:5" - }, - "parameters": { - "id": 905, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 904, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 913, - "src": "3175:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 903, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3175:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3174:9:5" - }, - "returnParameters": { - "id": 909, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 908, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 913, - "src": "3224:13:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 907, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3224:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3223:15:5" - }, - "scope": 1850, - "src": "3162:105:5", - "stateMutability": "view", - "virtual": true, - "visibility": "external" - }, - { - "baseFunctions": [ - 1966 - ], - "body": { - "id": 940, - "nodeType": "Block", - "src": "3504:133:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 930, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 925, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 916, - "src": "3522:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 928, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3541:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 927, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3533:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 926, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3533:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 929, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3533:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "3522:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a2062616c616e636520717565727920666f7220746865207a65726f2061646472657373", - "id": 931, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3545:45:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1f4de6a436172e7f7b1540476031cb037fc18ede9cc346a56da1697cbd352aa9", - "typeString": "literal_string \"ERC1155: balance query for the zero address\"" - }, - "value": "ERC1155: balance query for the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1f4de6a436172e7f7b1540476031cb037fc18ede9cc346a56da1697cbd352aa9", - "typeString": "literal_string \"ERC1155: balance query for the zero address\"" - } - ], - "id": 924, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3514:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 932, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3514:77:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 933, - "nodeType": "ExpressionStatement", - "src": "3514:77:5" - }, - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 934, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "3608:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 936, - "indexExpression": { - "argumentTypes": null, - "id": 935, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 918, - "src": "3618:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3608:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 938, - "indexExpression": { - "argumentTypes": null, - "id": 937, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 916, - "src": "3622:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3608:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 923, - "id": 939, - "nodeType": "Return", - "src": "3601:29:5" - } - ] - }, - "documentation": { - "id": 914, - "nodeType": "StructuredDocumentation", - "src": "3273:131:5", - "text": " @dev See {IERC1155-balanceOf}.\n Requirements:\n - `account` cannot be the zero address." - }, - "functionSelector": "00fdd58e", - "id": 941, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 920, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3477:8:5" - }, - "parameters": { - "id": 919, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 916, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 941, - "src": "3428:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 915, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3428:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 918, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 941, - "src": "3445:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3445:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3427:29:5" - }, - "returnParameters": { - "id": 923, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 922, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 941, - "src": "3495:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 921, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3495:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3494:9:5" - }, - "scope": 1850, - "src": "3409:228:5", - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [ - 1979 - ], - "body": { - "id": 1004, - "nodeType": "Block", - "src": "3989:335:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 960, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 956, - "name": "accounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 945, - "src": "4007:8:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4007:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 958, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 948, - "src": "4026:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4026:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4007:29:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a206163636f756e747320616e6420696473206c656e677468206d69736d61746368", - "id": 961, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4038:43:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e155f5d69798c6205436a388a4f3a5fd42f54147b40f4d63a2c8071ff8a9fee5", - "typeString": "literal_string \"ERC1155: accounts and ids length mismatch\"" - }, - "value": "ERC1155: accounts and ids length mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e155f5d69798c6205436a388a4f3a5fd42f54147b40f4d63a2c8071ff8a9fee5", - "typeString": "literal_string \"ERC1155: accounts and ids length mismatch\"" - } - ], - "id": 955, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3999:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3999:83:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 963, - "nodeType": "ExpressionStatement", - "src": "3999:83:5" - }, - { - "assignments": [ - 968 - ], - "declarations": [ - { - "constant": false, - "id": 968, - "mutability": "mutable", - "name": "batchBalances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1004, - "src": "4093:30:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 966, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4093:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 967, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4093:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 975, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 972, - "name": "accounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 945, - "src": "4140:8:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 973, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4140:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 971, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "4126:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 969, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4130:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 970, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4130:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4126:30:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4093:63:5" - }, - { - "body": { - "id": 1000, - "nodeType": "Block", - "src": "4213:74:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 987, - "name": "batchBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "4227:13:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 989, - "indexExpression": { - "argumentTypes": null, - "id": 988, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "4241:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4227:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 991, - "name": "accounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 945, - "src": "4256:8:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 993, - "indexExpression": { - "argumentTypes": null, - "id": 992, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "4265:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4256:11:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 994, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 948, - "src": "4269:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 996, - "indexExpression": { - "argumentTypes": null, - "id": 995, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "4273:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4269:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 990, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 941, - "src": "4246:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view returns (uint256)" - } - }, - "id": 997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4246:30:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4227:49:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 999, - "nodeType": "ExpressionStatement", - "src": "4227:49:5" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 980, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "4187:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 981, - "name": "accounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 945, - "src": "4191:8:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4191:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4187:19:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1001, - "initializationExpression": { - "assignments": [ - 977 - ], - "declarations": [ - { - "constant": false, - "id": 977, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1001, - "src": "4172:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 976, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4172:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 979, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 978, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4184:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "4172:13:5" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "4208:3:5", - "subExpression": { - "argumentTypes": null, - "id": 984, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "4210:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 986, - "nodeType": "ExpressionStatement", - "src": "4208:3:5" - }, - "nodeType": "ForStatement", - "src": "4167:120:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1002, - "name": "batchBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "4304:13:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "functionReturnParameters": 954, - "id": 1003, - "nodeType": "Return", - "src": "4297:20:5" - } - ] - }, - "documentation": { - "id": 942, - "nodeType": "StructuredDocumentation", - "src": "3643:146:5", - "text": " @dev See {IERC1155-balanceOfBatch}.\n Requirements:\n - `accounts` and `ids` must have the same length." - }, - "functionSelector": "4e1273f4", - "id": 1005, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOfBatch", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 950, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3941:8:5" - }, - "parameters": { - "id": 949, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 945, - "mutability": "mutable", - "name": "accounts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1005, - "src": "3827:25:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 943, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3827:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 944, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3827:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 948, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1005, - "src": "3862:20:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 946, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3862:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 947, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3862:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3817:71:5" - }, - "returnParameters": { - "id": 954, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 953, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1005, - "src": "3967:16:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 951, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3967:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 952, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3967:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3966:18:5" - }, - "scope": 1850, - "src": "3794:530:5", - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [ - 1987 - ], - "body": { - "id": 1038, - "nodeType": "Block", - "src": "4476:222:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1015, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "4494:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4494:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 1017, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1008, - "src": "4510:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4494:24:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a2073657474696e6720617070726f76616c2073746174757320666f722073656c66", - "id": 1019, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4520:43:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_df9806c6dc743de602e49918a67b580590d69ab768bdb59f977c0a884a91a7c2", - "typeString": "literal_string \"ERC1155: setting approval status for self\"" - }, - "value": "ERC1155: setting approval status for self" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_df9806c6dc743de602e49918a67b580590d69ab768bdb59f977c0a884a91a7c2", - "typeString": "literal_string \"ERC1155: setting approval status for self\"" - } - ], - "id": 1014, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4486:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1020, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4486:78:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1021, - "nodeType": "ExpressionStatement", - "src": "4486:78:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1022, - "name": "_operatorApprovals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 854, - "src": "4575:18:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", - "typeString": "mapping(address => mapping(address => bool))" - } - }, - "id": 1026, - "indexExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1023, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "4594:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4594:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4575:32:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } - }, - "id": 1027, - "indexExpression": { - "argumentTypes": null, - "id": 1025, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1008, - "src": "4608:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4575:42:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1028, - "name": "approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1010, - "src": "4620:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4575:53:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1030, - "nodeType": "ExpressionStatement", - "src": "4575:53:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1032, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "4658:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4658:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1034, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1008, - "src": "4672:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1035, - "name": "approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1010, - "src": "4682:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1031, - "name": "ApprovalForAll", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1949, - "src": "4643:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$returns$__$", - "typeString": "function (address,address,bool)" - } - }, - "id": 1036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4643:48:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1037, - "nodeType": "EmitStatement", - "src": "4638:53:5" - } - ] - }, - "documentation": { - "id": 1006, - "nodeType": "StructuredDocumentation", - "src": "4330:57:5", - "text": " @dev See {IERC1155-setApprovalForAll}." - }, - "functionSelector": "a22cb465", - "id": 1039, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setApprovalForAll", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 1012, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4467:8:5" - }, - "parameters": { - "id": 1011, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1008, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1039, - "src": "4419:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1007, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4419:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1010, - "mutability": "mutable", - "name": "approved", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1039, - "src": "4437:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1009, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4437:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4418:33:5" - }, - "returnParameters": { - "id": 1013, - "nodeType": "ParameterList", - "parameters": [], - "src": "4476:0:5" - }, - "scope": 1850, - "src": "4392:306:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [ - 1997 - ], - "body": { - "id": 1056, - "nodeType": "Block", - "src": "4870:61:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1050, - "name": "_operatorApprovals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 854, - "src": "4887:18:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", - "typeString": "mapping(address => mapping(address => bool))" - } - }, - "id": 1052, - "indexExpression": { - "argumentTypes": null, - "id": 1051, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1042, - "src": "4906:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4887:27:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } - }, - "id": 1054, - "indexExpression": { - "argumentTypes": null, - "id": 1053, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1044, - "src": "4915:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4887:37:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1049, - "id": 1055, - "nodeType": "Return", - "src": "4880:44:5" - } - ] - }, - "documentation": { - "id": 1040, - "nodeType": "StructuredDocumentation", - "src": "4704:56:5", - "text": " @dev See {IERC1155-isApprovedForAll}." - }, - "functionSelector": "e985e9c5", - "id": 1057, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isApprovedForAll", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 1046, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4846:8:5" - }, - "parameters": { - "id": 1045, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1042, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1057, - "src": "4791:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1041, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4791:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1044, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1057, - "src": "4808:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1043, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4808:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4790:35:5" - }, - "returnParameters": { - "id": 1049, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1048, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1057, - "src": "4864:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1047, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4864:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4863:6:5" - }, - "scope": 1850, - "src": "4765:166:5", - "stateMutability": "view", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [ - 2011 - ], - "body": { - "id": 1162, - "nodeType": "Block", - "src": "5195:700:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1073, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "5213:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1076, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5227:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1075, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5219:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1074, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5219:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1077, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5219:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "5213:16:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a207472616e7366657220746f20746865207a65726f2061646472657373", - "id": 1079, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5231:39:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6faf1c67f278b07c6771dcf4c315a89c21c0eaed11d9ab3d51774da1cfef545d", - "typeString": "literal_string \"ERC1155: transfer to the zero address\"" - }, - "value": "ERC1155: transfer to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6faf1c67f278b07c6771dcf4c315a89c21c0eaed11d9ab3d51774da1cfef545d", - "typeString": "literal_string \"ERC1155: transfer to the zero address\"" - } - ], - "id": 1072, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5205:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5205:66:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1081, - "nodeType": "ExpressionStatement", - "src": "5205:66:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1092, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1083, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1060, - "src": "5302:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1084, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "5310:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5310:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "5302:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1088, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1060, - "src": "5343:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1089, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "5349:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5349:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1087, - "name": "isApprovedForAll", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1057, - "src": "5326:16:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$", - "typeString": "function (address,address) view returns (bool)" - } - }, - "id": 1091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5326:36:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5302:60:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564", - "id": 1093, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5376:43:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_394ac917f53b95ee25db2a5da5874c5b1f0af95a4fdf34992ff8b19c458f239a", - "typeString": "literal_string \"ERC1155: caller is not owner nor approved\"" - }, - "value": "ERC1155: caller is not owner nor approved" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_394ac917f53b95ee25db2a5da5874c5b1f0af95a4fdf34992ff8b19c458f239a", - "typeString": "literal_string \"ERC1155: caller is not owner nor approved\"" - } - ], - "id": 1082, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5281:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5281:148:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1095, - "nodeType": "ExpressionStatement", - "src": "5281:148:5" - }, - { - "assignments": [ - 1097 - ], - "declarations": [ - { - "constant": false, - "id": 1097, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1162, - "src": "5440:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1096, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5440:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1100, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1098, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "5459:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5459:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5440:31:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1102, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1097, - "src": "5503:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1103, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1060, - "src": "5513:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1104, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "5519:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1106, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1064, - "src": "5541:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1105, - "name": "_asSingletonArray", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1845, - "src": "5523:17:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - } - }, - "id": 1107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5523:21:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1109, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1066, - "src": "5564:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1108, - "name": "_asSingletonArray", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1845, - "src": "5546:17:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - } - }, - "id": 1110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5546:25:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1111, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1068, - "src": "5573:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1101, - "name": "_beforeTokenTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1685, - "src": "5482:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" - } - }, - "id": 1112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5482:96:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1113, - "nodeType": "ExpressionStatement", - "src": "5482:96:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1114, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "5589:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1117, - "indexExpression": { - "argumentTypes": null, - "id": 1115, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1064, - "src": "5599:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5589:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1118, - "indexExpression": { - "argumentTypes": null, - "id": 1116, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1060, - "src": "5603:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5589:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1125, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1066, - "src": "5635:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e73666572", - "id": 1126, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5643:44:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8ac7e9556b567c1c94bb4daaa3c3a65be5ac686579615210cb910fb8cb8d65bf", - "typeString": "literal_string \"ERC1155: insufficient balance for transfer\"" - }, - "value": "ERC1155: insufficient balance for transfer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_8ac7e9556b567c1c94bb4daaa3c3a65be5ac686579615210cb910fb8cb8d65bf", - "typeString": "literal_string \"ERC1155: insufficient balance for transfer\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1119, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "5611:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1121, - "indexExpression": { - "argumentTypes": null, - "id": 1120, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1064, - "src": "5621:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5611:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1123, - "indexExpression": { - "argumentTypes": null, - "id": 1122, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1060, - "src": "5625:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5611:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 700, - "src": "5611:23:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5611:77:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5589:99:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1129, - "nodeType": "ExpressionStatement", - "src": "5589:99:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1143, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1130, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "5698:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1133, - "indexExpression": { - "argumentTypes": null, - "id": 1131, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1064, - "src": "5708:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5698:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1134, - "indexExpression": { - "argumentTypes": null, - "id": 1132, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "5712:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5698:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1141, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1066, - "src": "5740:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1135, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "5718:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1137, - "indexExpression": { - "argumentTypes": null, - "id": 1136, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1064, - "src": "5728:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5718:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1139, - "indexExpression": { - "argumentTypes": null, - "id": 1138, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "5732:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5718:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 576, - "src": "5718:21:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5718:29:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5698:49:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1144, - "nodeType": "ExpressionStatement", - "src": "5698:49:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1146, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1097, - "src": "5778:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1147, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1060, - "src": "5788:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1148, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "5794:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1149, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1064, - "src": "5798:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1150, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1066, - "src": "5802:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1145, - "name": "TransferSingle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1925, - "src": "5763:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,address,address,uint256,uint256)" - } - }, - "id": 1151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5763:46:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1152, - "nodeType": "EmitStatement", - "src": "5758:51:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1154, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1097, - "src": "5851:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1155, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1060, - "src": "5861:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1156, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1062, - "src": "5867:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1157, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1064, - "src": "5871:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1158, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1066, - "src": "5875:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1159, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1068, - "src": "5883:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1153, - "name": "_doSafeTransferAcceptanceCheck", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1750, - "src": "5820:30:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256,uint256,bytes memory)" - } - }, - "id": 1160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5820:68:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1161, - "nodeType": "ExpressionStatement", - "src": "5820:68:5" - } - ] - }, - "documentation": { - "id": 1058, - "nodeType": "StructuredDocumentation", - "src": "4937:56:5", - "text": " @dev See {IERC1155-safeTransferFrom}." - }, - "functionSelector": "f242432a", - "id": 1163, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 1070, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "5182:8:5" - }, - "parameters": { - "id": 1069, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1060, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1163, - "src": "5033:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1059, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5033:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1062, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1163, - "src": "5055:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1061, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5055:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1064, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1163, - "src": "5075:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1063, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5075:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1066, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1163, - "src": "5095:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1065, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5095:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1068, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1163, - "src": "5119:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1067, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5119:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5023:119:5" - }, - "returnParameters": { - "id": 1071, - "nodeType": "ParameterList", - "parameters": [], - "src": "5195:0:5" - }, - "scope": 1850, - "src": "4998:897:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [ - 2027 - ], - "body": { - "id": 1300, - "nodeType": "Block", - "src": "6189:962:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1181, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1171, - "src": "6207:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6207:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1183, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1174, - "src": "6221:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6221:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6207:28:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a2069647320616e6420616d6f756e7473206c656e677468206d69736d61746368", - "id": 1186, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6237:42:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e909e0c9a8f96b4f9af03b716811ece20beb070be416893ed1d50619b5930807", - "typeString": "literal_string \"ERC1155: ids and amounts length mismatch\"" - }, - "value": "ERC1155: ids and amounts length mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e909e0c9a8f96b4f9af03b716811ece20beb070be416893ed1d50619b5930807", - "typeString": "literal_string \"ERC1155: ids and amounts length mismatch\"" - } - ], - "id": 1180, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6199:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6199:81:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1188, - "nodeType": "ExpressionStatement", - "src": "6199:81:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1190, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1168, - "src": "6298:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6312:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1192, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6304:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6304:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1194, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6304:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6298:16:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a207472616e7366657220746f20746865207a65726f2061646472657373", - "id": 1196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6316:39:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6faf1c67f278b07c6771dcf4c315a89c21c0eaed11d9ab3d51774da1cfef545d", - "typeString": "literal_string \"ERC1155: transfer to the zero address\"" - }, - "value": "ERC1155: transfer to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6faf1c67f278b07c6771dcf4c315a89c21c0eaed11d9ab3d51774da1cfef545d", - "typeString": "literal_string \"ERC1155: transfer to the zero address\"" - } - ], - "id": 1189, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6290:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6290:66:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1198, - "nodeType": "ExpressionStatement", - "src": "6290:66:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1200, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1166, - "src": "6387:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1201, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "6395:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6395:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6387:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1205, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1166, - "src": "6428:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1206, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "6434:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6434:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 1204, - "name": "isApprovedForAll", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1057, - "src": "6411:16:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$", - "typeString": "function (address,address) view returns (bool)" - } - }, - "id": 1208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6411:36:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6387:60:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564", - "id": 1210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6461:52:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_70a41c66829f5508884cda9ef3d2f72551b34f23e4035be97941681123d2d686", - "typeString": "literal_string \"ERC1155: transfer caller is not owner nor approved\"" - }, - "value": "ERC1155: transfer caller is not owner nor approved" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_70a41c66829f5508884cda9ef3d2f72551b34f23e4035be97941681123d2d686", - "typeString": "literal_string \"ERC1155: transfer caller is not owner nor approved\"" - } - ], - "id": 1199, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6366:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6366:157:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1212, - "nodeType": "ExpressionStatement", - "src": "6366:157:5" - }, - { - "assignments": [ - 1214 - ], - "declarations": [ - { - "constant": false, - "id": 1214, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1300, - "src": "6534:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1213, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6534:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1217, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1215, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "6553:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6553:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6534:31:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1219, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1214, - "src": "6597:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1220, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1166, - "src": "6607:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1221, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1168, - "src": "6613:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1222, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1171, - "src": "6617:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1223, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1174, - "src": "6622:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1224, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1176, - "src": "6631:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1218, - "name": "_beforeTokenTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1685, - "src": "6576:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" - } - }, - "id": 1225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6576:60:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1226, - "nodeType": "ExpressionStatement", - "src": "6576:60:5" - }, - { - "body": { - "id": 1281, - "nodeType": "Block", - "src": "6688:308:5", - "statements": [ - { - "assignments": [ - 1239 - ], - "declarations": [ - { - "constant": false, - "id": 1239, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1281, - "src": "6702:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1238, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6702:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1243, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1240, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1171, - "src": "6715:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1242, - "indexExpression": { - "argumentTypes": null, - "id": 1241, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1228, - "src": "6719:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6715:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6702:19:5" - }, - { - "assignments": [ - 1245 - ], - "declarations": [ - { - "constant": false, - "id": 1245, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1281, - "src": "6735:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1244, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6735:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1249, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1246, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1174, - "src": "6752:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1248, - "indexExpression": { - "argumentTypes": null, - "id": 1247, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1228, - "src": "6760:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6752:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6735:27:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1250, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "6777:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1253, - "indexExpression": { - "argumentTypes": null, - "id": 1251, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1239, - "src": "6787:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6777:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1254, - "indexExpression": { - "argumentTypes": null, - "id": 1252, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1166, - "src": "6791:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6777:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1261, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1245, - "src": "6840:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e73666572", - "id": 1262, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6864:44:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8ac7e9556b567c1c94bb4daaa3c3a65be5ac686579615210cb910fb8cb8d65bf", - "typeString": "literal_string \"ERC1155: insufficient balance for transfer\"" - }, - "value": "ERC1155: insufficient balance for transfer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_8ac7e9556b567c1c94bb4daaa3c3a65be5ac686579615210cb910fb8cb8d65bf", - "typeString": "literal_string \"ERC1155: insufficient balance for transfer\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1255, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "6799:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1257, - "indexExpression": { - "argumentTypes": null, - "id": 1256, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1239, - "src": "6809:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6799:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1259, - "indexExpression": { - "argumentTypes": null, - "id": 1258, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1166, - "src": "6813:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6799:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 700, - "src": "6799:23:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6799:123:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6777:145:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1265, - "nodeType": "ExpressionStatement", - "src": "6777:145:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1266, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "6936:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1269, - "indexExpression": { - "argumentTypes": null, - "id": 1267, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1239, - "src": "6946:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6936:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1270, - "indexExpression": { - "argumentTypes": null, - "id": 1268, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1168, - "src": "6950:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6936:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1277, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1245, - "src": "6978:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1271, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "6956:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1273, - "indexExpression": { - "argumentTypes": null, - "id": 1272, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1239, - "src": "6966:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6956:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1275, - "indexExpression": { - "argumentTypes": null, - "id": 1274, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1168, - "src": "6970:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6956:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 576, - "src": "6956:21:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6956:29:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6936:49:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1280, - "nodeType": "ExpressionStatement", - "src": "6936:49:5" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1231, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1228, - "src": "6667:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1232, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1171, - "src": "6671:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6671:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6667:14:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1282, - "initializationExpression": { - "assignments": [ - 1228 - ], - "declarations": [ - { - "constant": false, - "id": 1228, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1282, - "src": "6652:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1227, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6652:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1230, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6664:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6652:13:5" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "6683:3:5", - "subExpression": { - "argumentTypes": null, - "id": 1235, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1228, - "src": "6685:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1237, - "nodeType": "ExpressionStatement", - "src": "6683:3:5" - }, - "nodeType": "ForStatement", - "src": "6647:349:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1284, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1214, - "src": "7025:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1285, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1166, - "src": "7035:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1286, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1168, - "src": "7041:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1287, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1171, - "src": "7045:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1288, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1174, - "src": "7050:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - ], - "id": 1283, - "name": "TransferBatch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1940, - "src": "7011:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory)" - } - }, - "id": 1289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7011:47:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1290, - "nodeType": "EmitStatement", - "src": "7006:52:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1292, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1214, - "src": "7105:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1293, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1166, - "src": "7115:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1294, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1168, - "src": "7121:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1295, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1171, - "src": "7125:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1296, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1174, - "src": "7130:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1297, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1176, - "src": "7139:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1291, - "name": "_doSafeBatchTransferAcceptanceCheck", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1817, - "src": "7069:35:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" - } - }, - "id": 1298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7069:75:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1299, - "nodeType": "ExpressionStatement", - "src": "7069:75:5" - } - ] - }, - "documentation": { - "id": 1164, - "nodeType": "StructuredDocumentation", - "src": "5901:61:5", - "text": " @dev See {IERC1155-safeBatchTransferFrom}." - }, - "functionSelector": "2eb2c2d6", - "id": 1301, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeBatchTransferFrom", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 1178, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "6176:8:5" - }, - "parameters": { - "id": 1177, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1166, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1301, - "src": "6007:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1165, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6007:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1168, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1301, - "src": "6029:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1167, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6029:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1171, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1301, - "src": "6049:20:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1169, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6049:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1170, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6049:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1174, - "mutability": "mutable", - "name": "amounts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1301, - "src": "6079:24:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1172, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6079:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1173, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6079:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1176, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1301, - "src": "6113:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1175, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6113:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5997:139:5" - }, - "returnParameters": { - "id": 1179, - "nodeType": "ParameterList", - "parameters": [], - "src": "6189:0:5" - }, - "scope": 1850, - "src": "5967:1184:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "body": { - "id": 1311, - "nodeType": "Block", - "src": "8030:30:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1307, - "name": "_uri", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 856, - "src": "8040:4:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1308, - "name": "newuri", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1304, - "src": "8047:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "8040:13:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 1310, - "nodeType": "ExpressionStatement", - "src": "8040:13:5" - } - ] - }, - "documentation": { - "id": 1302, - "nodeType": "StructuredDocumentation", - "src": "7157:812:5", - "text": " @dev Sets a new URI for all token types, by relying on the token type ID\n substitution mechanism\n https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n URI or any of the amounts in the JSON file at said URI will be replaced by\n clients with the token type ID.\n For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n interpreted by clients as\n `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n for token type ID 0x4cce0.\n See {uri}.\n Because these URIs cannot be meaningfully represented by the {URI} event,\n this function emits no events." - }, - "id": 1312, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_setURI", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1305, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1304, - "mutability": "mutable", - "name": "newuri", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1312, - "src": "7991:20:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1303, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7991:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7990:22:5" - }, - "returnParameters": { - "id": 1306, - "nodeType": "ParameterList", - "parameters": [], - "src": "8030:0:5" - }, - "scope": 1850, - "src": "7974:86:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 1393, - "nodeType": "Block", - "src": "8544:476:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1325, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1315, - "src": "8562:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1328, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8581:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1327, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8573:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1326, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8573:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1329, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8573:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "8562:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a206d696e7420746f20746865207a65726f2061646472657373", - "id": 1331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8585:35:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ebf031a1b7ee1d0b3a7752b450a3268e8b6c334561b48c1c0ba0f5bac05749f2", - "typeString": "literal_string \"ERC1155: mint to the zero address\"" - }, - "value": "ERC1155: mint to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ebf031a1b7ee1d0b3a7752b450a3268e8b6c334561b48c1c0ba0f5bac05749f2", - "typeString": "literal_string \"ERC1155: mint to the zero address\"" - } - ], - "id": 1324, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8554:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8554:67:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1333, - "nodeType": "ExpressionStatement", - "src": "8554:67:5" - }, - { - "assignments": [ - 1335 - ], - "declarations": [ - { - "constant": false, - "id": 1335, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1393, - "src": "8632:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1334, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8632:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1338, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1336, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "8651:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8651:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8632:31:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1340, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1335, - "src": "8695:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8713:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1342, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8705:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1341, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8705:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1344, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8705:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1345, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1315, - "src": "8717:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1347, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1317, - "src": "8744:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1346, - "name": "_asSingletonArray", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1845, - "src": "8726:17:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - } - }, - "id": 1348, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8726:21:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1350, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "8767:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1349, - "name": "_asSingletonArray", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1845, - "src": "8749:17:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - } - }, - "id": 1351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8749:25:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1352, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1321, - "src": "8776:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1339, - "name": "_beforeTokenTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1685, - "src": "8674:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" - } - }, - "id": 1353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8674:107:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1354, - "nodeType": "ExpressionStatement", - "src": "8674:107:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1355, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "8792:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1358, - "indexExpression": { - "argumentTypes": null, - "id": 1356, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1317, - "src": "8802:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8792:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1359, - "indexExpression": { - "argumentTypes": null, - "id": 1357, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1315, - "src": "8806:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8792:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1366, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "8844:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1360, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "8817:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1362, - "indexExpression": { - "argumentTypes": null, - "id": 1361, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1317, - "src": "8827:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8817:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1364, - "indexExpression": { - "argumentTypes": null, - "id": 1363, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1315, - "src": "8831:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8817:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 576, - "src": "8817:26:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8817:34:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8792:59:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1369, - "nodeType": "ExpressionStatement", - "src": "8792:59:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1371, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1335, - "src": "8881:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1374, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8899:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1373, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8891:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1372, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8891:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1375, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8891:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1376, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1315, - "src": "8903:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1377, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1317, - "src": "8912:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1378, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "8916:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1370, - "name": "TransferSingle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1925, - "src": "8866:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,address,address,uint256,uint256)" - } - }, - "id": 1379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8866:57:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1380, - "nodeType": "EmitStatement", - "src": "8861:62:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1382, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1335, - "src": "8965:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1385, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8983:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1384, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8975:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1383, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8975:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1386, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8975:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1387, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1315, - "src": "8987:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1388, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1317, - "src": "8996:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1389, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "9000:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1390, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1321, - "src": "9008:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1381, - "name": "_doSafeTransferAcceptanceCheck", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1750, - "src": "8934:30:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256,uint256,bytes memory)" - } - }, - "id": 1391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8934:79:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1392, - "nodeType": "ExpressionStatement", - "src": "8934:79:5" - } - ] - }, - "documentation": { - "id": 1313, - "nodeType": "StructuredDocumentation", - "src": "8066:377:5", - "text": " @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.\n Emits a {TransferSingle} event.\n Requirements:\n - `account` cannot be the zero address.\n - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n acceptance magic value." - }, - "id": 1394, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_mint", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1315, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1394, - "src": "8463:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1314, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8463:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1317, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1394, - "src": "8480:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1316, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8480:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1319, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1394, - "src": "8492:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1318, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8492:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1321, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1394, - "src": "8508:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1320, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8508:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8462:64:5" - }, - "returnParameters": { - "id": 1323, - "nodeType": "ParameterList", - "parameters": [], - "src": "8544:0:5" - }, - "scope": 1850, - "src": "8448:572:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 1501, - "nodeType": "Block", - "src": "9481:584:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1409, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1397, - "src": "9499:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1412, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9513:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9505:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1410, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9505:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1413, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9505:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "9499:16:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a206d696e7420746f20746865207a65726f2061646472657373", - "id": 1415, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9517:35:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ebf031a1b7ee1d0b3a7752b450a3268e8b6c334561b48c1c0ba0f5bac05749f2", - "typeString": "literal_string \"ERC1155: mint to the zero address\"" - }, - "value": "ERC1155: mint to the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ebf031a1b7ee1d0b3a7752b450a3268e8b6c334561b48c1c0ba0f5bac05749f2", - "typeString": "literal_string \"ERC1155: mint to the zero address\"" - } - ], - "id": 1408, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "9491:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9491:62:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1417, - "nodeType": "ExpressionStatement", - "src": "9491:62:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1419, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1400, - "src": "9571:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9571:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1421, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1403, - "src": "9585:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9585:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9571:28:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a2069647320616e6420616d6f756e7473206c656e677468206d69736d61746368", - "id": 1424, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9601:42:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e909e0c9a8f96b4f9af03b716811ece20beb070be416893ed1d50619b5930807", - "typeString": "literal_string \"ERC1155: ids and amounts length mismatch\"" - }, - "value": "ERC1155: ids and amounts length mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e909e0c9a8f96b4f9af03b716811ece20beb070be416893ed1d50619b5930807", - "typeString": "literal_string \"ERC1155: ids and amounts length mismatch\"" - } - ], - "id": 1418, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "9563:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9563:81:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1426, - "nodeType": "ExpressionStatement", - "src": "9563:81:5" - }, - { - "assignments": [ - 1428 - ], - "declarations": [ - { - "constant": false, - "id": 1428, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1501, - "src": "9655:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1427, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9655:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1431, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1429, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "9674:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1430, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9674:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9655:31:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1433, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1428, - "src": "9718:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1436, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9736:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1435, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9728:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1434, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9728:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1437, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9728:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1438, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1397, - "src": "9740:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1439, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1400, - "src": "9744:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1440, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1403, - "src": "9749:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1441, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1405, - "src": "9758:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1432, - "name": "_beforeTokenTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1685, - "src": "9697:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" - } - }, - "id": 1442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9697:66:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1443, - "nodeType": "ExpressionStatement", - "src": "9697:66:5" - }, - { - "body": { - "id": 1476, - "nodeType": "Block", - "src": "9812:86:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1455, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "9826:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1460, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1456, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1400, - "src": "9836:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1458, - "indexExpression": { - "argumentTypes": null, - "id": 1457, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1445, - "src": "9840:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9836:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9826:17:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1461, - "indexExpression": { - "argumentTypes": null, - "id": 1459, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1397, - "src": "9844:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9826:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1466, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "9865:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1470, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1467, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1400, - "src": "9875:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1469, - "indexExpression": { - "argumentTypes": null, - "id": 1468, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1445, - "src": "9879:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9875:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9865:17:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1472, - "indexExpression": { - "argumentTypes": null, - "id": 1471, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1397, - "src": "9883:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9865:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1462, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1403, - "src": "9850:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1464, - "indexExpression": { - "argumentTypes": null, - "id": 1463, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1445, - "src": "9858:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9850:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 576, - "src": "9850:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9850:37:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9826:61:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1475, - "nodeType": "ExpressionStatement", - "src": "9826:61:5" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1448, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1445, - "src": "9791:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1449, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1400, - "src": "9795:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9795:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9791:14:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1477, - "initializationExpression": { - "assignments": [ - 1445 - ], - "declarations": [ - { - "constant": false, - "id": 1445, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1477, - "src": "9779:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1444, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9779:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1447, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1446, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9788:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9779:10:5" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9807:3:5", - "subExpression": { - "argumentTypes": null, - "id": 1452, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1445, - "src": "9807:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1454, - "nodeType": "ExpressionStatement", - "src": "9807:3:5" - }, - "nodeType": "ForStatement", - "src": "9774:124:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1479, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1428, - "src": "9927:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9945:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9937:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1480, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9937:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1483, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9937:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1484, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1397, - "src": "9949:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1485, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1400, - "src": "9953:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1486, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1403, - "src": "9958:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - ], - "id": 1478, - "name": "TransferBatch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1940, - "src": "9913:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory)" - } - }, - "id": 1487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9913:53:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1488, - "nodeType": "EmitStatement", - "src": "9908:58:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1490, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1428, - "src": "10013:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1493, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10031:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1492, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10023:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1491, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10023:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1494, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10023:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1495, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1397, - "src": "10035:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1496, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1400, - "src": "10039:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1497, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1403, - "src": "10044:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1498, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1405, - "src": "10053:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1489, - "name": "_doSafeBatchTransferAcceptanceCheck", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1817, - "src": "9977:35:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" - } - }, - "id": 1499, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9977:81:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1500, - "nodeType": "ExpressionStatement", - "src": "9977:81:5" - } - ] - }, - "documentation": { - "id": 1395, - "nodeType": "StructuredDocumentation", - "src": "9026:334:5", - "text": " @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n Requirements:\n - `ids` and `amounts` must have the same length.\n - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n acceptance magic value." - }, - "id": 1502, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_mintBatch", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1406, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1397, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1502, - "src": "9385:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1396, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9385:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1400, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1502, - "src": "9397:20:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1398, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9397:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1399, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9397:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1403, - "mutability": "mutable", - "name": "amounts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1502, - "src": "9419:24:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1401, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9419:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1402, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9419:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1405, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1502, - "src": "9445:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1404, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9445:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9384:79:5" - }, - "returnParameters": { - "id": 1407, - "nodeType": "ParameterList", - "parameters": [], - "src": "9481:0:5" - }, - "scope": 1850, - "src": "9365:700:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 1570, - "nodeType": "Block", - "src": "10391:461:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1513, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1505, - "src": "10409:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10428:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1515, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10420:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1514, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10420:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1517, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10420:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "10409:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a206275726e2066726f6d20746865207a65726f2061646472657373", - "id": 1519, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10432:37:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_87fd4aee52f5758d127cd9704d5ffef70f36ed1e87eb99b6f40e37a25c79a76a", - "typeString": "literal_string \"ERC1155: burn from the zero address\"" - }, - "value": "ERC1155: burn from the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_87fd4aee52f5758d127cd9704d5ffef70f36ed1e87eb99b6f40e37a25c79a76a", - "typeString": "literal_string \"ERC1155: burn from the zero address\"" - } - ], - "id": 1512, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10401:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10401:69:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1521, - "nodeType": "ExpressionStatement", - "src": "10401:69:5" - }, - { - "assignments": [ - 1523 - ], - "declarations": [ - { - "constant": false, - "id": 1523, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1570, - "src": "10481:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1522, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10481:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1526, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1524, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "10500:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1525, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10500:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10481:31:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1528, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "10544:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1529, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1505, - "src": "10554:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1532, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10571:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1531, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10563:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1530, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10563:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1533, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10563:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1535, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1507, - "src": "10593:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1534, - "name": "_asSingletonArray", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1845, - "src": "10575:17:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - } - }, - "id": 1536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10575:21:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1538, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1509, - "src": "10616:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1537, - "name": "_asSingletonArray", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1845, - "src": "10598:17:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - } - }, - "id": 1539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10598:25:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "hexValue": "", - "id": 1540, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10625:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "id": 1527, - "name": "_beforeTokenTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1685, - "src": "10523:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" - } - }, - "id": 1541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10523:105:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1542, - "nodeType": "ExpressionStatement", - "src": "10523:105:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1557, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1543, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "10639:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1546, - "indexExpression": { - "argumentTypes": null, - "id": 1544, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1507, - "src": "10649:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10639:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1547, - "indexExpression": { - "argumentTypes": null, - "id": 1545, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1505, - "src": "10653:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10639:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1554, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1509, - "src": "10704:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365", - "id": 1555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10724:38:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_294a5de01910e2350ff231c633ae2d453ed6b1b72c75506234b7aace63eae685", - "typeString": "literal_string \"ERC1155: burn amount exceeds balance\"" - }, - "value": "ERC1155: burn amount exceeds balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_294a5de01910e2350ff231c633ae2d453ed6b1b72c75506234b7aace63eae685", - "typeString": "literal_string \"ERC1155: burn amount exceeds balance\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1548, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "10664:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1550, - "indexExpression": { - "argumentTypes": null, - "id": 1549, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1507, - "src": "10674:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10664:13:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1552, - "indexExpression": { - "argumentTypes": null, - "id": 1551, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1505, - "src": "10678:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10664:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 700, - "src": "10664:26:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10664:108:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10639:133:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1558, - "nodeType": "ExpressionStatement", - "src": "10639:133:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1560, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "10803:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1561, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1505, - "src": "10813:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1564, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10830:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1563, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10822:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1562, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10822:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1565, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10822:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1566, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1507, - "src": "10834:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1567, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1509, - "src": "10838:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1559, - "name": "TransferSingle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1925, - "src": "10788:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,address,address,uint256,uint256)" - } - }, - "id": 1568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10788:57:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1569, - "nodeType": "EmitStatement", - "src": "10783:62:5" - } - ] - }, - "documentation": { - "id": 1503, - "nodeType": "StructuredDocumentation", - "src": "10071:238:5", - "text": " @dev Destroys `amount` tokens of token type `id` from `account`\n Requirements:\n - `account` cannot be the zero address.\n - `account` must have at least `amount` tokens of token type `id`." - }, - "id": 1571, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_burn", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1510, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1505, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1571, - "src": "10329:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1504, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10329:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1507, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1571, - "src": "10346:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1506, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10346:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1509, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1571, - "src": "10358:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1508, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10358:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10328:45:5" - }, - "returnParameters": { - "id": 1511, - "nodeType": "ParameterList", - "parameters": [], - "src": "10391:0:5" - }, - "scope": 1850, - "src": "10314:538:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 1665, - "nodeType": "Block", - "src": "11148:603:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1584, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1574, - "src": "11166:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11185:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11177:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1585, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11177:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11177:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "11166:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a206275726e2066726f6d20746865207a65726f2061646472657373", - "id": 1590, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11189:37:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_87fd4aee52f5758d127cd9704d5ffef70f36ed1e87eb99b6f40e37a25c79a76a", - "typeString": "literal_string \"ERC1155: burn from the zero address\"" - }, - "value": "ERC1155: burn from the zero address" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_87fd4aee52f5758d127cd9704d5ffef70f36ed1e87eb99b6f40e37a25c79a76a", - "typeString": "literal_string \"ERC1155: burn from the zero address\"" - } - ], - "id": 1583, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11158:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11158:69:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1592, - "nodeType": "ExpressionStatement", - "src": "11158:69:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1594, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "11245:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11245:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1596, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1580, - "src": "11259:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11259:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11245:28:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a2069647320616e6420616d6f756e7473206c656e677468206d69736d61746368", - "id": 1599, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11275:42:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e909e0c9a8f96b4f9af03b716811ece20beb070be416893ed1d50619b5930807", - "typeString": "literal_string \"ERC1155: ids and amounts length mismatch\"" - }, - "value": "ERC1155: ids and amounts length mismatch" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e909e0c9a8f96b4f9af03b716811ece20beb070be416893ed1d50619b5930807", - "typeString": "literal_string \"ERC1155: ids and amounts length mismatch\"" - } - ], - "id": 1593, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11237:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11237:81:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1601, - "nodeType": "ExpressionStatement", - "src": "11237:81:5" - }, - { - "assignments": [ - 1603 - ], - "declarations": [ - { - "constant": false, - "id": 1603, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1665, - "src": "11329:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1602, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11329:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1606, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1604, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2301, - "src": "11348:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 1605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11348:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11329:31:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1608, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1603, - "src": "11392:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1609, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1574, - "src": "11402:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1612, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11419:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1611, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11411:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1610, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11411:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11411:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1614, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "11423:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1615, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1580, - "src": "11428:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "hexValue": "", - "id": 1616, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11437:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "id": 1607, - "name": "_beforeTokenTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1685, - "src": "11371:20:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" - } - }, - "id": 1617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11371:69:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1618, - "nodeType": "ExpressionStatement", - "src": "11371:69:5" - }, - { - "body": { - "id": 1652, - "nodeType": "Block", - "src": "11489:182:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1630, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "11503:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1635, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1631, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "11513:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1633, - "indexExpression": { - "argumentTypes": null, - "id": 1632, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1620, - "src": "11517:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11513:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11503:17:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1636, - "indexExpression": { - "argumentTypes": null, - "id": 1634, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1574, - "src": "11521:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11503:26:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1645, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1580, - "src": "11580:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1647, - "indexExpression": { - "argumentTypes": null, - "id": 1646, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1620, - "src": "11588:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11580:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365", - "id": 1648, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11608:38:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_294a5de01910e2350ff231c633ae2d453ed6b1b72c75506234b7aace63eae685", - "typeString": "literal_string \"ERC1155: burn amount exceeds balance\"" - }, - "value": "ERC1155: burn amount exceeds balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_294a5de01910e2350ff231c633ae2d453ed6b1b72c75506234b7aace63eae685", - "typeString": "literal_string \"ERC1155: burn amount exceeds balance\"" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1637, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 848, - "src": "11532:9:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 1641, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1638, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "11542:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1640, - "indexExpression": { - "argumentTypes": null, - "id": 1639, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1620, - "src": "11546:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11542:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11532:17:5", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 1643, - "indexExpression": { - "argumentTypes": null, - "id": 1642, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1574, - "src": "11550:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11532:26:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 700, - "src": "11532:30:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" - } - }, - "id": 1649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11532:128:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11503:157:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1651, - "nodeType": "ExpressionStatement", - "src": "11503:157:5" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1623, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1620, - "src": "11468:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1624, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "11472:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11472:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11468:14:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1653, - "initializationExpression": { - "assignments": [ - 1620 - ], - "declarations": [ - { - "constant": false, - "id": 1620, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1653, - "src": "11456:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1619, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11456:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1622, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11465:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "11456:10:5" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "11484:3:5", - "subExpression": { - "argumentTypes": null, - "id": 1627, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1620, - "src": "11484:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1629, - "nodeType": "ExpressionStatement", - "src": "11484:3:5" - }, - "nodeType": "ForStatement", - "src": "11451:220:5" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1655, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1603, - "src": "11700:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1656, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1574, - "src": "11710:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11727:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11719:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 1657, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11719:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 1660, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11719:10:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 1661, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "11731:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1662, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1580, - "src": "11736:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - ], - "id": 1654, - "name": "TransferBatch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1940, - "src": "11686:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory)" - } - }, - "id": 1663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11686:58:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1664, - "nodeType": "EmitStatement", - "src": "11681:63:5" - } - ] - }, - "documentation": { - "id": 1572, - "nodeType": "StructuredDocumentation", - "src": "10858:183:5", - "text": " @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n Requirements:\n - `ids` and `amounts` must have the same length." - }, - "id": 1666, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_burnBatch", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1581, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1574, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1666, - "src": "11066:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1573, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11066:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1577, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1666, - "src": "11083:20:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1575, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11083:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1576, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11083:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1580, - "mutability": "mutable", - "name": "amounts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1666, - "src": "11105:24:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1578, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11105:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1579, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11105:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11065:65:5" - }, - "returnParameters": { - "id": 1582, - "nodeType": "ParameterList", - "parameters": [], - "src": "11148:0:5" - }, - "scope": 1850, - "src": "11046:705:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 1684, - "nodeType": "Block", - "src": "12917:3:5", - "statements": [] - }, - "documentation": { - "id": 1667, - "nodeType": "StructuredDocumentation", - "src": "11757:923:5", - "text": " @dev Hook that is called before any token transfer. This includes minting\n and burning, as well as batched variants.\n The same hook is called on both single and batched variants. For single\n transfers, the length of the `id` and `amount` arrays will be 1.\n Calling conditions (for each `id` and `amount` pair):\n - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n of token type `id` will be transferred to `to`.\n - When `from` is zero, `amount` tokens of token type `id` will be minted\n for `to`.\n - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n will be burned.\n - `from` and `to` are never both zero.\n - `ids` and `amounts` have the same, non-zero length.\n To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]." - }, - "id": 1685, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1682, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1669, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1685, - "src": "12724:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1668, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12724:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1671, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1685, - "src": "12750:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1670, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12750:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1673, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1685, - "src": "12772:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1672, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12772:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1676, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1685, - "src": "12792:20:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1674, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12792:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1675, - "length": null, - "nodeType": "ArrayTypeName", - "src": "12792:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1679, - "mutability": "mutable", - "name": "amounts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1685, - "src": "12822:24:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1677, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12822:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1678, - "length": null, - "nodeType": "ArrayTypeName", - "src": "12822:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1681, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1685, - "src": "12856:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1680, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12856:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12714:165:5" - }, - "returnParameters": { - "id": 1683, - "nodeType": "ParameterList", - "parameters": [], - "src": "12917:0:5" - }, - "scope": 1850, - "src": "12685:235:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 1749, - "nodeType": "Block", - "src": "13131:558:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 1700, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1691, - "src": "13145:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 2048, - "src": "13145:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 1702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13145:15:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1748, - "nodeType": "IfStatement", - "src": "13141:542:5", - "trueBody": { - "id": 1747, - "nodeType": "Block", - "src": "13162:521:5", - "statements": [ - { - "clauses": [ - { - "block": { - "id": 1729, - "nodeType": "Block", - "src": "13290:199:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "id": 1722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1716, - "name": "response", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1714, - "src": "13312:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1718, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1691, - "src": "13352:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1717, - "name": "IERC1155ReceiverUpgradeable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1906, - "src": "13324:27:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC1155ReceiverUpgradeable_$1906_$", - "typeString": "type(contract IERC1155ReceiverUpgradeable)" - } - }, - "id": 1719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13324:31:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC1155ReceiverUpgradeable_$1906", - "typeString": "contract IERC1155ReceiverUpgradeable" - } - }, - "id": 1720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "onERC1155Received", - "nodeType": "MemberAccess", - "referencedDeclaration": 1887, - "src": "13324:49:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", - "typeString": "function (address,address,uint256,uint256,bytes memory) external returns (bytes4)" - } - }, - "id": 1721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13324:58:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "src": "13312:70:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1728, - "nodeType": "IfStatement", - "src": "13308:167:5", - "trueBody": { - "id": 1727, - "nodeType": "Block", - "src": "13384:91:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "455243313135353a204552433131353552656365697665722072656a656374656420746f6b656e73", - "id": 1724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13413:42:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0587cccad73a80a7f013db13c596f4febc1968dc77e1d3589d5e7a509a3d6503", - "typeString": "literal_string \"ERC1155: ERC1155Receiver rejected tokens\"" - }, - "value": "ERC1155: ERC1155Receiver rejected tokens" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_0587cccad73a80a7f013db13c596f4febc1968dc77e1d3589d5e7a509a3d6503", - "typeString": "literal_string \"ERC1155: ERC1155Receiver rejected tokens\"" - } - ], - "id": 1723, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "13406:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 1725, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13406:50:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1726, - "nodeType": "ExpressionStatement", - "src": "13406:50:5" - } - ] - } - } - ] - }, - "errorName": "", - "id": 1730, - "nodeType": "TryCatchClause", - "parameters": { - "id": 1715, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1714, - "mutability": "mutable", - "name": "response", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1730, - "src": "13273:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 1713, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "13273:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13272:17:5" - }, - "src": "13264:225:5" - }, - { - "block": { - "id": 1738, - "nodeType": "Block", - "src": "13524:47:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1735, - "name": "reason", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1732, - "src": "13549:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1734, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "13542:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 1736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13542:14:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1737, - "nodeType": "ExpressionStatement", - "src": "13542:14:5" - } - ] - }, - "errorName": "Error", - "id": 1739, - "nodeType": "TryCatchClause", - "parameters": { - "id": 1733, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1732, - "mutability": "mutable", - "name": "reason", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1739, - "src": "13502:20:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1731, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "13502:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13501:22:5" - }, - "src": "13490:81:5" - }, - { - "block": { - "id": 1744, - "nodeType": "Block", - "src": "13578:95:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "455243313135353a207472616e7366657220746f206e6f6e2045524331313535526563656976657220696d706c656d656e746572", - "id": 1741, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13603:54:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_00aa752fb1526000e5241602affc3d70ef506da48a27ea57140102b439e655ed", - "typeString": "literal_string \"ERC1155: transfer to non ERC1155Receiver implementer\"" - }, - "value": "ERC1155: transfer to non ERC1155Receiver implementer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_00aa752fb1526000e5241602affc3d70ef506da48a27ea57140102b439e655ed", - "typeString": "literal_string \"ERC1155: transfer to non ERC1155Receiver implementer\"" - } - ], - "id": 1740, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "13596:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 1742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13596:62:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1743, - "nodeType": "ExpressionStatement", - "src": "13596:62:5" - } - ] - }, - "errorName": "", - "id": 1745, - "nodeType": "TryCatchClause", - "parameters": null, - "src": "13572:101:5" - } - ], - "externalCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1707, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1687, - "src": "13230:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1708, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1689, - "src": "13240:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1709, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1693, - "src": "13246:2:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1710, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1695, - "src": "13250:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1711, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1697, - "src": "13258:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1704, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1691, - "src": "13208:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1703, - "name": "IERC1155ReceiverUpgradeable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1906, - "src": "13180:27:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC1155ReceiverUpgradeable_$1906_$", - "typeString": "type(contract IERC1155ReceiverUpgradeable)" - } - }, - "id": 1705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13180:31:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC1155ReceiverUpgradeable_$1906", - "typeString": "contract IERC1155ReceiverUpgradeable" - } - }, - "id": 1706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "onERC1155Received", - "nodeType": "MemberAccess", - "referencedDeclaration": 1887, - "src": "13180:49:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", - "typeString": "function (address,address,uint256,uint256,bytes memory) external returns (bytes4)" - } - }, - "id": 1712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13180:83:5", - "tryCall": true, - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "id": 1746, - "nodeType": "TryStatement", - "src": "13176:497:5" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1750, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_doSafeTransferAcceptanceCheck", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1698, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1687, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1750, - "src": "12975:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1686, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12975:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1689, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1750, - "src": "13001:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1688, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13001:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1691, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1750, - "src": "13023:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1690, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13023:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1693, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1750, - "src": "13043:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1692, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13043:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1695, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1750, - "src": "13063:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1694, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13063:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1697, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1750, - "src": "13087:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1696, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13087:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12965:145:5" - }, - "returnParameters": { - "id": 1699, - "nodeType": "ParameterList", - "parameters": [], - "src": "13131:0:5" - }, - "scope": 1850, - "src": "12926:763:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 1816, - "nodeType": "Block", - "src": "13925:570:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 1767, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1756, - "src": "13939:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1768, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 2048, - "src": "13939:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 1769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13939:15:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1815, - "nodeType": "IfStatement", - "src": "13935:554:5", - "trueBody": { - "id": 1814, - "nodeType": "Block", - "src": "13956:533:5", - "statements": [ - { - "clauses": [ - { - "block": { - "id": 1796, - "nodeType": "Block", - "src": "14091:204:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "id": 1789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1783, - "name": "response", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1781, - "src": "14113:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1785, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1756, - "src": "14153:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1784, - "name": "IERC1155ReceiverUpgradeable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1906, - "src": "14125:27:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC1155ReceiverUpgradeable_$1906_$", - "typeString": "type(contract IERC1155ReceiverUpgradeable)" - } - }, - "id": 1786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14125:31:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC1155ReceiverUpgradeable_$1906", - "typeString": "contract IERC1155ReceiverUpgradeable" - } - }, - "id": 1787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "onERC1155BatchReceived", - "nodeType": "MemberAccess", - "referencedDeclaration": 1905, - "src": "14125:54:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", - "typeString": "function (address,address,uint256[] memory,uint256[] memory,bytes memory) external returns (bytes4)" - } - }, - "id": 1788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14125:63:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "src": "14113:75:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1795, - "nodeType": "IfStatement", - "src": "14109:172:5", - "trueBody": { - "id": 1794, - "nodeType": "Block", - "src": "14190:91:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "455243313135353a204552433131353552656365697665722072656a656374656420746f6b656e73", - "id": 1791, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14219:42:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0587cccad73a80a7f013db13c596f4febc1968dc77e1d3589d5e7a509a3d6503", - "typeString": "literal_string \"ERC1155: ERC1155Receiver rejected tokens\"" - }, - "value": "ERC1155: ERC1155Receiver rejected tokens" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_0587cccad73a80a7f013db13c596f4febc1968dc77e1d3589d5e7a509a3d6503", - "typeString": "literal_string \"ERC1155: ERC1155Receiver rejected tokens\"" - } - ], - "id": 1790, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "14212:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 1792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14212:50:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1793, - "nodeType": "ExpressionStatement", - "src": "14212:50:5" - } - ] - } - } - ] - }, - "errorName": "", - "id": 1797, - "nodeType": "TryCatchClause", - "parameters": { - "id": 1782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1781, - "mutability": "mutable", - "name": "response", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1797, - "src": "14074:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 1780, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "14074:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14073:17:5" - }, - "src": "14065:230:5" - }, - { - "block": { - "id": 1805, - "nodeType": "Block", - "src": "14330:47:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1802, - "name": "reason", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1799, - "src": "14355:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 1801, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "14348:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 1803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14348:14:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1804, - "nodeType": "ExpressionStatement", - "src": "14348:14:5" - } - ] - }, - "errorName": "Error", - "id": 1806, - "nodeType": "TryCatchClause", - "parameters": { - "id": 1800, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1799, - "mutability": "mutable", - "name": "reason", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1806, - "src": "14308:20:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1798, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14308:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14307:22:5" - }, - "src": "14296:81:5" - }, - { - "block": { - "id": 1811, - "nodeType": "Block", - "src": "14384:95:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "455243313135353a207472616e7366657220746f206e6f6e2045524331313535526563656976657220696d706c656d656e746572", - "id": 1808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14409:54:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_00aa752fb1526000e5241602affc3d70ef506da48a27ea57140102b439e655ed", - "typeString": "literal_string \"ERC1155: transfer to non ERC1155Receiver implementer\"" - }, - "value": "ERC1155: transfer to non ERC1155Receiver implementer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_00aa752fb1526000e5241602affc3d70ef506da48a27ea57140102b439e655ed", - "typeString": "literal_string \"ERC1155: transfer to non ERC1155Receiver implementer\"" - } - ], - "id": 1807, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "14402:6:5", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 1809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14402:62:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1810, - "nodeType": "ExpressionStatement", - "src": "14402:62:5" - } - ] - }, - "errorName": "", - "id": 1812, - "nodeType": "TryCatchClause", - "parameters": null, - "src": "14378:101:5" - } - ], - "externalCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1774, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1752, - "src": "14029:8:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1775, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1754, - "src": "14039:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1776, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1759, - "src": "14045:3:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1777, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1762, - "src": "14050:7:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1778, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1764, - "src": "14059:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1771, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1756, - "src": "14002:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1770, - "name": "IERC1155ReceiverUpgradeable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1906, - "src": "13974:27:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC1155ReceiverUpgradeable_$1906_$", - "typeString": "type(contract IERC1155ReceiverUpgradeable)" - } - }, - "id": 1772, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13974:31:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC1155ReceiverUpgradeable_$1906", - "typeString": "contract IERC1155ReceiverUpgradeable" - } - }, - "id": 1773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "onERC1155BatchReceived", - "nodeType": "MemberAccess", - "referencedDeclaration": 1905, - "src": "13974:54:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", - "typeString": "function (address,address,uint256[] memory,uint256[] memory,bytes memory) external returns (bytes4)" - } - }, - "id": 1779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13974:90:5", - "tryCall": true, - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "id": 1813, - "nodeType": "TryStatement", - "src": "13970:509:5" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1817, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_doSafeBatchTransferAcceptanceCheck", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1765, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1752, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1817, - "src": "13749:16:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1751, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13749:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1754, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1817, - "src": "13775:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1753, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13775:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1756, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1817, - "src": "13797:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1755, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13797:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1759, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1817, - "src": "13817:20:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1757, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13817:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1758, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13817:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1762, - "mutability": "mutable", - "name": "amounts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1817, - "src": "13847:24:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1760, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13847:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1761, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13847:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1764, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1817, - "src": "13881:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1763, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13881:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13739:165:5" - }, - "returnParameters": { - "id": 1766, - "nodeType": "ParameterList", - "parameters": [], - "src": "13925:0:5" - }, - "scope": 1850, - "src": "13695:800:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 1844, - "nodeType": "Block", - "src": "14585:109:5", - "statements": [ - { - "assignments": [ - 1829 - ], - "declarations": [ - { - "constant": false, - "id": 1829, - "mutability": "mutable", - "name": "array", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1844, - "src": "14595:22:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1827, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14595:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1828, - "length": null, - "nodeType": "ArrayTypeName", - "src": "14595:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1835, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 1833, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14634:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 1832, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "14620:13:5", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 1830, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14624:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1831, - "length": null, - "nodeType": "ArrayTypeName", - "src": "14624:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 1834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14620:16:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14595:41:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1836, - "name": "array", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1829, - "src": "14646:5:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1838, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1837, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14652:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "14646:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1839, - "name": "element", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1819, - "src": "14657:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14646:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1841, - "nodeType": "ExpressionStatement", - "src": "14646:18:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1842, - "name": "array", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1829, - "src": "14682:5:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "functionReturnParameters": 1824, - "id": 1843, - "nodeType": "Return", - "src": "14675:12:5" - } - ] - }, - "documentation": null, - "id": 1845, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_asSingletonArray", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1820, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1819, - "mutability": "mutable", - "name": "element", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1845, - "src": "14528:15:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1818, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14528:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14527:17:5" - }, - "returnParameters": { - "id": 1824, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1823, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1845, - "src": "14567:16:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1821, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14567:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1822, - "length": null, - "nodeType": "ArrayTypeName", - "src": "14567:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14566:18:5" - }, - "scope": 1850, - "src": "14501:193:5", - "stateMutability": "pure", - "virtual": false, - "visibility": "private" - }, - { - "constant": false, - "id": 1849, - "mutability": "mutable", - "name": "__gap", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1850, - "src": "14699:25:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$47_storage", - "typeString": "uint256[47]" - }, - "typeName": { - "baseType": { - "id": 1846, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14699:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1848, - "length": { - "argumentTypes": null, - "hexValue": "3437", - "id": 1847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14707:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_47_by_1", - "typeString": "int_const 47" - }, - "value": "47" - }, - "nodeType": "ArrayTypeName", - "src": "14699:11:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$47_storage_ptr", - "typeString": "uint256[47]" - } - }, - "value": null, - "visibility": "private" - } - ], - "scope": 1851, - "src": "639:14088:5" - } - ], - "src": "33:14695:5" - }, - "id": 5 - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155MetadataURIUpgradeable.sol", - "exportedSymbols": { - "IERC1155MetadataURIUpgradeable": [ - 1865 - ] - }, - "id": 1866, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1852, - "literals": [ - "solidity", - ">=", - "0.6", - ".2", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:6" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol", - "file": "./IERC1155Upgradeable.sol", - "id": 1853, - "nodeType": "ImportDirective", - "scope": 1866, - "sourceUnit": 2029, - "src": "66:35:6", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1855, - "name": "IERC1155Upgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2028, - "src": "342:19:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC1155Upgradeable_$2028", - "typeString": "contract IERC1155Upgradeable" - } - }, - "id": 1856, - "nodeType": "InheritanceSpecifier", - "src": "342:19:6" - } - ], - "contractDependencies": [ - 394, - 2028 - ], - "contractKind": "interface", - "documentation": { - "id": 1854, - "nodeType": "StructuredDocumentation", - "src": "103:194:6", - "text": " @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n _Available since v3.1._" - }, - "fullyImplemented": false, - "id": 1865, - "linearizedBaseContracts": [ - 1865, - 2028, - 394 - ], - "name": "IERC1155MetadataURIUpgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": { - "id": 1857, - "nodeType": "StructuredDocumentation", - "src": "368:192:6", - "text": " @dev Returns the URI for token type `id`.\n If the `\\{id\\}` substring is present in the URI, it must be replaced by\n clients with the actual token type ID." - }, - "functionSelector": "0e89341c", - "id": 1864, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "uri", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1859, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1864, - "src": "578:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1858, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "578:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "577:12:6" - }, - "returnParameters": { - "id": 1863, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1862, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1864, - "src": "613:13:6", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1861, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "613:6:6", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "612:15:6" - }, - "scope": 1865, - "src": "565:63:6", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - } - ], - "scope": 1866, - "src": "298:332:6" - } - ], - "src": "33:598:6" - }, - "id": 6 - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol", - "exportedSymbols": { - "IERC1155ReceiverUpgradeable": [ - 1906 - ] - }, - "id": 1907, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1867, - "literals": [ - "solidity", - ">=", - "0.6", - ".0", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:7" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol", - "file": "../../introspection/IERC165Upgradeable.sol", - "id": 1868, - "nodeType": "ImportDirective", - "scope": 1907, - "sourceUnit": 395, - "src": "66:52:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1870, - "name": "IERC165Upgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 394, - "src": "196:18:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC165Upgradeable_$394", - "typeString": "contract IERC165Upgradeable" - } - }, - "id": 1871, - "nodeType": "InheritanceSpecifier", - "src": "196:18:7" - } - ], - "contractDependencies": [ - 394 - ], - "contractKind": "interface", - "documentation": { - "id": 1869, - "nodeType": "StructuredDocumentation", - "src": "120:34:7", - "text": " _Available since v3.1._" - }, - "fullyImplemented": false, - "id": 1906, - "linearizedBaseContracts": [ - 1906, - 394 - ], - "name": "IERC1155ReceiverUpgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": { - "id": 1872, - "nodeType": "StructuredDocumentation", - "src": "222:816:7", - "text": "@dev Handles the receipt of a single ERC1155 token type. This function is\ncalled at the end of a `safeTransferFrom` after the balance has been updated.\nTo accept the transfer, this must return\n`bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n(i.e. 0xf23a6e61, or its own function selector).\n@param operator The address which initiated the transfer (i.e. msg.sender)\n@param from The address which previously owned the token\n@param id The ID of the token being transferred\n@param value The amount of tokens being transferred\n@param data Additional data with no specified format\n@return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed" - }, - "functionSelector": "f23a6e61", - "id": 1887, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "onERC1155Received", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1883, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1874, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1887, - "src": "1079:16:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1873, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1079:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1876, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1887, - "src": "1105:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1875, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1105:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1878, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1887, - "src": "1127:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1877, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1127:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1880, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1887, - "src": "1147:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1879, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1147:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1882, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1887, - "src": "1170:19:7", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1881, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1170:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1069:126:7" - }, - "returnParameters": { - "id": 1886, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1885, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1887, - "src": "1229:6:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 1884, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "1229:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1228:8:7" - }, - "scope": 1906, - "src": "1043:194:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 1888, - "nodeType": "StructuredDocumentation", - "src": "1243:977:7", - "text": "@dev Handles the receipt of a multiple ERC1155 token types. This function\nis called at the end of a `safeBatchTransferFrom` after the balances have\nbeen updated. To accept the transfer(s), this must return\n`bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n(i.e. 0xbc197c81, or its own function selector).\n@param operator The address which initiated the batch transfer (i.e. msg.sender)\n@param from The address which previously owned the token\n@param ids An array containing ids of each token being transferred (order and length must match values array)\n@param values An array containing amounts of each token being transferred (order and length must match ids array)\n@param data Additional data with no specified format\n@return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed" - }, - "functionSelector": "bc197c81", - "id": 1905, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "onERC1155BatchReceived", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1901, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1890, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1905, - "src": "2266:16:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1889, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2266:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1892, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1905, - "src": "2292:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1891, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2292:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1895, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1905, - "src": "2314:22:7", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1893, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2314:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1894, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2314:9:7", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1898, - "mutability": "mutable", - "name": "values", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1905, - "src": "2346:25:7", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1896, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2346:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1897, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2346:9:7", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1900, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1905, - "src": "2381:19:7", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1899, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2381:5:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2256:150:7" - }, - "returnParameters": { - "id": 1904, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1903, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1905, - "src": "2440:6:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 1902, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "2440:6:7", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2439:8:7" - }, - "scope": 1906, - "src": "2225:223:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 1907, - "src": "155:2295:7" - } - ], - "src": "33:2418:7" - }, - "id": 7 - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol", - "exportedSymbols": { - "IERC1155Upgradeable": [ - 2028 - ] - }, - "id": 2029, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1908, - "literals": [ - "solidity", - ">=", - "0.6", - ".2", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:8" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol", - "file": "../../introspection/IERC165Upgradeable.sol", - "id": 1909, - "nodeType": "ImportDirective", - "scope": 2029, - "sourceUnit": 395, - "src": "66:52:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1911, - "name": "IERC165Upgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 394, - "src": "319:18:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC165Upgradeable_$394", - "typeString": "contract IERC165Upgradeable" - } - }, - "id": 1912, - "nodeType": "InheritanceSpecifier", - "src": "319:18:8" - } - ], - "contractDependencies": [ - 394 - ], - "contractKind": "interface", - "documentation": { - "id": 1910, - "nodeType": "StructuredDocumentation", - "src": "120:165:8", - "text": " @dev Required interface of an ERC1155 compliant contract, as defined in the\n https://eips.ethereum.org/EIPS/eip-1155[EIP].\n _Available since v3.1._" - }, - "fullyImplemented": false, - "id": 2028, - "linearizedBaseContracts": [ - 2028, - 394 - ], - "name": "IERC1155Upgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": { - "id": 1913, - "nodeType": "StructuredDocumentation", - "src": "344:121:8", - "text": " @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`." - }, - "id": 1925, - "name": "TransferSingle", - "nodeType": "EventDefinition", - "parameters": { - "id": 1924, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1915, - "indexed": true, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1925, - "src": "491:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1914, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "491:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1917, - "indexed": true, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1925, - "src": "517:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1916, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "517:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1919, - "indexed": true, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1925, - "src": "539:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1918, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "539:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1921, - "indexed": false, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1925, - "src": "559:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1920, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "559:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1923, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1925, - "src": "571:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1922, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "571:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "490:95:8" - }, - "src": "470:116:8" - }, - { - "anonymous": false, - "documentation": { - "id": 1926, - "nodeType": "StructuredDocumentation", - "src": "592:144:8", - "text": " @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n transfers." - }, - "id": 1940, - "name": "TransferBatch", - "nodeType": "EventDefinition", - "parameters": { - "id": 1939, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1928, - "indexed": true, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1940, - "src": "761:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1927, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "761:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1930, - "indexed": true, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1940, - "src": "787:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1929, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "787:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1932, - "indexed": true, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1940, - "src": "809:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1931, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "809:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1935, - "indexed": false, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1940, - "src": "829:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "829:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1934, - "length": null, - "nodeType": "ArrayTypeName", - "src": "829:9:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1938, - "indexed": false, - "mutability": "mutable", - "name": "values", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1940, - "src": "844:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1936, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "844:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1937, - "length": null, - "nodeType": "ArrayTypeName", - "src": "844:9:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "760:101:8" - }, - "src": "741:121:8" - }, - { - "anonymous": false, - "documentation": { - "id": 1941, - "nodeType": "StructuredDocumentation", - "src": "868:147:8", - "text": " @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n `approved`." - }, - "id": 1949, - "name": "ApprovalForAll", - "nodeType": "EventDefinition", - "parameters": { - "id": 1948, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1943, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1949, - "src": "1041:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1942, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1041:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1945, - "indexed": true, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1949, - "src": "1066:24:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1944, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1066:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1947, - "indexed": false, - "mutability": "mutable", - "name": "approved", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1949, - "src": "1092:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1946, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1092:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1040:66:8" - }, - "src": "1020:87:8" - }, - { - "anonymous": false, - "documentation": { - "id": 1950, - "nodeType": "StructuredDocumentation", - "src": "1113:343:8", - "text": " @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n If an {URI} event was emitted for `id`, the standard\n https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n returned by {IERC1155MetadataURI-uri}." - }, - "id": 1956, - "name": "URI", - "nodeType": "EventDefinition", - "parameters": { - "id": 1955, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1952, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1956, - "src": "1471:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 1951, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1471:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1954, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1956, - "src": "1485:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1953, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1485:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1470:34:8" - }, - "src": "1461:44:8" - }, - { - "body": null, - "documentation": { - "id": 1957, - "nodeType": "StructuredDocumentation", - "src": "1511:173:8", - "text": " @dev Returns the amount of tokens of token type `id` owned by `account`.\n Requirements:\n - `account` cannot be the zero address." - }, - "functionSelector": "00fdd58e", - "id": 1966, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1962, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1959, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1966, - "src": "1708:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1958, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1708:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1961, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1966, - "src": "1725:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1960, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1725:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1707:29:8" - }, - "returnParameters": { - "id": 1965, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1964, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1966, - "src": "1760:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1963, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1760:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:9:8" - }, - "scope": 2028, - "src": "1689:80:8", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 1967, - "nodeType": "StructuredDocumentation", - "src": "1775:188:8", - "text": " @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n Requirements:\n - `accounts` and `ids` must have the same length." - }, - "functionSelector": "4e1273f4", - "id": 1979, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOfBatch", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1974, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1970, - "mutability": "mutable", - "name": "accounts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1979, - "src": "1992:27:8", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1968, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1992:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1969, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1992:9:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1973, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1979, - "src": "2021:22:8", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1971, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2021:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1972, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2021:9:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1991:53:8" - }, - "returnParameters": { - "id": 1978, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1977, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1979, - "src": "2068:16:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1975, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2068:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1976, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2068:9:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2067:18:8" - }, - "scope": 2028, - "src": "1968:118:8", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 1980, - "nodeType": "StructuredDocumentation", - "src": "2092:248:8", - "text": " @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n Emits an {ApprovalForAll} event.\n Requirements:\n - `operator` cannot be the caller." - }, - "functionSelector": "a22cb465", - "id": 1987, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "setApprovalForAll", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1985, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1982, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1987, - "src": "2372:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1981, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2372:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1984, - "mutability": "mutable", - "name": "approved", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1987, - "src": "2390:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1983, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2390:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2371:33:8" - }, - "returnParameters": { - "id": 1986, - "nodeType": "ParameterList", - "parameters": [], - "src": "2413:0:8" - }, - "scope": 2028, - "src": "2345:69:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 1988, - "nodeType": "StructuredDocumentation", - "src": "2420:135:8", - "text": " @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n See {setApprovalForAll}." - }, - "functionSelector": "e985e9c5", - "id": 1997, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "isApprovedForAll", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1993, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1990, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1997, - "src": "2586:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1989, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2586:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1992, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1997, - "src": "2603:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1991, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2603:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2585:35:8" - }, - "returnParameters": { - "id": 1996, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1995, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1997, - "src": "2644:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1994, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2644:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2643:6:8" - }, - "scope": 2028, - "src": "2560:90:8", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 1998, - "nodeType": "StructuredDocumentation", - "src": "2656:559:8", - "text": " @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n Emits a {TransferSingle} event.\n Requirements:\n - `to` cannot be the zero address.\n - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n - `from` must have a balance of tokens of type `id` of at least `amount`.\n - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n acceptance magic value." - }, - "functionSelector": "f242432a", - "id": 2011, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2009, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2000, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2011, - "src": "3246:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1999, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3246:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2002, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2011, - "src": "3260:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2001, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3260:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2004, - "mutability": "mutable", - "name": "id", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2011, - "src": "3272:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2003, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3272:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2006, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2011, - "src": "3284:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2005, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3284:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2008, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2011, - "src": "3300:19:8", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2007, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3300:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3245:75:8" - }, - "returnParameters": { - "id": 2010, - "nodeType": "ParameterList", - "parameters": [], - "src": "3329:0:8" - }, - "scope": 2028, - "src": "3220:110:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": { - "id": 2012, - "nodeType": "StructuredDocumentation", - "src": "3336:390:8", - "text": " @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n Emits a {TransferBatch} event.\n Requirements:\n - `ids` and `amounts` must have the same length.\n - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n acceptance magic value." - }, - "functionSelector": "2eb2c2d6", - "id": 2027, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "safeBatchTransferFrom", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2025, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2014, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2027, - "src": "3762:12:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2013, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3762:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2016, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2027, - "src": "3776:10:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2015, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3776:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2019, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2027, - "src": "3788:22:8", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 2017, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3788:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2018, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3788:9:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2022, - "mutability": "mutable", - "name": "amounts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2027, - "src": "3812:26:8", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 2020, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3812:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2021, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3812:9:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2024, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2027, - "src": "3840:19:8", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2023, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3840:5:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3761:99:8" - }, - "returnParameters": { - "id": 2026, - "nodeType": "ParameterList", - "parameters": [], - "src": "3869:0:8" - }, - "scope": 2028, - "src": "3731:139:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 2029, - "src": "286:3586:8" - } - ], - "src": "33:3840:8" - }, - "id": 8 - }, - "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol", - "exportedSymbols": { - "AddressUpgradeable": [ - 2272 - ] - }, - "id": 2273, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2030, - "literals": [ - "solidity", - ">=", - "0.6", - ".2", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:9" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 2031, - "nodeType": "StructuredDocumentation", - "src": "66:67:9", - "text": " @dev Collection of functions related to the address type" - }, - "fullyImplemented": true, - "id": 2272, - "linearizedBaseContracts": [ - 2272 - ], - "name": "AddressUpgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2047, - "nodeType": "Block", - "src": "803:347:9", - "statements": [ - { - "assignments": [ - 2040 - ], - "declarations": [ - { - "constant": false, - "id": 2040, - "mutability": "mutable", - "name": "size", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2047, - "src": "1000:12:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2039, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1000:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2041, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "1000:12:9" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "1087:32:9", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1089:28:9", - "value": { - "arguments": [ - { - "name": "account", - "nodeType": "YulIdentifier", - "src": "1109:7:9" - } - ], - "functionName": { - "name": "extcodesize", - "nodeType": "YulIdentifier", - "src": "1097:11:9" - }, - "nodeType": "YulFunctionCall", - "src": "1097:20:9" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "1089:4:9" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 2034, - "isOffset": false, - "isSlot": false, - "src": "1109:7:9", - "valueSize": 1 - }, - { - "declaration": 2040, - "isOffset": false, - "isSlot": false, - "src": "1089:4:9", - "valueSize": 1 - } - ], - "id": 2042, - "nodeType": "InlineAssembly", - "src": "1078:41:9" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2043, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2040, - "src": "1135:4:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2044, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1142:1:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1135:8:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2038, - "id": 2046, - "nodeType": "Return", - "src": "1128:15:9" - } - ] - }, - "documentation": { - "id": 2032, - "nodeType": "StructuredDocumentation", - "src": "167:565:9", - "text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n ====" - }, - "id": 2048, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2035, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2034, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2048, - "src": "757:15:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2033, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "757:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "756:17:9" - }, - "returnParameters": { - "id": 2038, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2037, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2048, - "src": "797:4:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2036, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "797:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "796:6:9" - }, - "scope": 2272, - "src": "737:413:9", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2081, - "nodeType": "Block", - "src": "2138:320:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2059, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "2164:4:9", - "typeDescriptions": { - "typeIdentifier": "t_contract$_AddressUpgradeable_$2272", - "typeString": "library AddressUpgradeable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_AddressUpgradeable_$2272", - "typeString": "library AddressUpgradeable" - } - ], - "id": 2058, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2156:7:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2057, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2156:7:9", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2060, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2156:13:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2156:21:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2062, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2053, - "src": "2181:6:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2156:31:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 2064, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2189:31:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 2056, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2148:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2148:73:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2066, - "nodeType": "ExpressionStatement", - "src": "2148:73:9" - }, - { - "assignments": [ - 2068, - null - ], - "declarations": [ - { - "constant": false, - "id": 2068, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2081, - "src": "2310:12:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2067, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2310:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - null - ], - "id": 2075, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 2073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2360:2:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 2069, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2051, - "src": "2328:9:9", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 2070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2328:14:9", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 2072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "argumentTypes": null, - "id": 2071, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2053, - "src": "2351:6:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "2328:31:9", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 2074, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2328:35:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2309:54:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2077, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2068, - "src": "2381:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 2078, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2390:60:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 2076, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2373:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2373:78:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2080, - "nodeType": "ExpressionStatement", - "src": "2373:78:9" - } - ] - }, - "documentation": { - "id": 2049, - "nodeType": "StructuredDocumentation", - "src": "1156:906:9", - "text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]." - }, - "id": 2082, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2054, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2051, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2082, - "src": "2086:25:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 2050, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2086:15:9", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2053, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2082, - "src": "2113:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2052, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2113:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2085:43:9" - }, - "returnParameters": { - "id": 2055, - "nodeType": "ParameterList", - "parameters": [], - "src": "2138:0:9" - }, - "scope": 2272, - "src": "2067:391:9", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2098, - "nodeType": "Block", - "src": "3288:82:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2093, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2085, - "src": "3316:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2094, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2087, - "src": "3324:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 2095, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3330:32:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - }, - "value": "Address: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - } - ], - "id": 2092, - "name": "functionCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2099, - 2119 - ], - "referencedDeclaration": 2119, - "src": "3303:12:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 2096, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3303:60:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2091, - "id": 2097, - "nodeType": "Return", - "src": "3296:67:9" - } - ] - }, - "documentation": { - "id": 2083, - "nodeType": "StructuredDocumentation", - "src": "2464:730:9", - "text": " @dev Performs a Solidity function call using a low level `call`. A\n plain`call` is an unsafe replacement for a function call: use this\n function instead.\n If `target` reverts with a revert reason, it is bubbled up by this\n function (like regular Solidity function calls).\n Returns the raw returned data. To convert to the expected return value,\n use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n Requirements:\n - `target` must be a contract.\n - calling `target` with `data` must not revert.\n _Available since v3.1._" - }, - "id": 2099, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2088, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2085, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2099, - "src": "3221:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2084, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3221:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2087, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2099, - "src": "3237:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2086, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3237:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3220:35:9" - }, - "returnParameters": { - "id": 2091, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2090, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2099, - "src": "3274:12:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2089, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3274:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3273:14:9" - }, - "scope": 2272, - "src": "3199:171:9", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2118, - "nodeType": "Block", - "src": "3709:76:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2112, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2102, - "src": "3748:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2113, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2104, - "src": "3756:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 2114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3762:1:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 2115, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2106, - "src": "3765:12:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2111, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2139, - 2189 - ], - "referencedDeclaration": 2189, - "src": "3726:21:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 2116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3726:52:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2110, - "id": 2117, - "nodeType": "Return", - "src": "3719:59:9" - } - ] - }, - "documentation": { - "id": 2100, - "nodeType": "StructuredDocumentation", - "src": "3376:211:9", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 2119, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2102, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2119, - "src": "3614:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2101, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3614:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2104, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2119, - "src": "3630:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2103, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3630:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2106, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2119, - "src": "3649:26:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2105, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3649:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3613:63:9" - }, - "returnParameters": { - "id": 2110, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2109, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2119, - "src": "3695:12:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2108, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3695:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3694:14:9" - }, - "scope": 2272, - "src": "3592:193:9", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2138, - "nodeType": "Block", - "src": "4260:111:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2132, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2122, - "src": "4299:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2133, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2124, - "src": "4307:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 2134, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2126, - "src": "4313:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564", - "id": 2135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4320:43:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - }, - "value": "Address: low-level call with value failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - } - ], - "id": 2131, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2139, - 2189 - ], - "referencedDeclaration": 2189, - "src": "4277:21:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 2136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4277:87:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2130, - "id": 2137, - "nodeType": "Return", - "src": "4270:94:9" - } - ] - }, - "documentation": { - "id": 2120, - "nodeType": "StructuredDocumentation", - "src": "3791:351:9", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but also transferring `value` wei to `target`.\n Requirements:\n - the calling contract must have an ETH balance of at least `value`.\n - the called Solidity function must be `payable`.\n _Available since v3.1._" - }, - "id": 2139, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2127, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2122, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2139, - "src": "4178:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2121, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4178:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2124, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2139, - "src": "4194:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2123, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4194:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2126, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2139, - "src": "4213:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2125, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4213:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4177:50:9" - }, - "returnParameters": { - "id": 2130, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2129, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2139, - "src": "4246:12:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2128, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4246:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4245:14:9" - }, - "scope": 2272, - "src": "4147:224:9", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2188, - "nodeType": "Block", - "src": "4760:382:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2156, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "4786:4:9", - "typeDescriptions": { - "typeIdentifier": "t_contract$_AddressUpgradeable_$2272", - "typeString": "library AddressUpgradeable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_AddressUpgradeable_$2272", - "typeString": "library AddressUpgradeable" - } - ], - "id": 2155, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4778:7:9", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2154, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4778:7:9", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4778:13:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4778:21:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 2159, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2146, - "src": "4803:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4778:30:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c", - "id": 2161, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4810:40:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - }, - "value": "Address: insufficient balance for call" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - } - ], - "id": 2153, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4770:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4770:81:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2163, - "nodeType": "ExpressionStatement", - "src": "4770:81:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2166, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2142, - "src": "4880:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2165, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2048, - "src": "4869:10:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 2167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4869:18:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 2168, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4889:31:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - }, - "value": "Address: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - } - ], - "id": 2164, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4861:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4861:60:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2170, - "nodeType": "ExpressionStatement", - "src": "4861:60:9" - }, - { - "assignments": [ - 2172, - 2174 - ], - "declarations": [ - { - "constant": false, - "id": 2172, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2188, - "src": "4992:12:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2171, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4992:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2174, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2188, - "src": "5006:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2173, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5006:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2181, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2179, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2144, - "src": "5061:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2175, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2142, - "src": "5033:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5033:11:9", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 2178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "argumentTypes": null, - "id": 2177, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2146, - "src": "5053:5:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "5033:27:9", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 2180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5033:33:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4991:75:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2183, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2172, - "src": "5101:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2184, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2174, - "src": "5110:10:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 2185, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2148, - "src": "5122:12:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2182, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "5083:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 2186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5083:52:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2152, - "id": 2187, - "nodeType": "Return", - "src": "5076:59:9" - } - ] - }, - "documentation": { - "id": 2140, - "nodeType": "StructuredDocumentation", - "src": "4377:237:9", - "text": " @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n with `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 2189, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2149, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2142, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2189, - "src": "4650:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2141, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4650:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2144, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2189, - "src": "4666:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2143, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4666:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2146, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2189, - "src": "4685:13:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2145, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4685:7:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2148, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2189, - "src": "4700:26:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2147, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4700:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4649:78:9" - }, - "returnParameters": { - "id": 2152, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2151, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2189, - "src": "4746:12:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2150, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4746:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4745:14:9" - }, - "scope": 2272, - "src": "4619:523:9", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2205, - "nodeType": "Block", - "src": "5419:97:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2200, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2192, - "src": "5455:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2201, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2194, - "src": "5463:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564", - "id": 2202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5469:39:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - }, - "value": "Address: low-level static call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - } - ], - "id": 2199, - "name": "functionStaticCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2206, - 2241 - ], - "referencedDeclaration": 2241, - "src": "5436:18:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) view returns (bytes memory)" - } - }, - "id": 2203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5436:73:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2198, - "id": 2204, - "nodeType": "Return", - "src": "5429:80:9" - } - ] - }, - "documentation": { - "id": 2190, - "nodeType": "StructuredDocumentation", - "src": "5148:166:9", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 2206, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionStaticCall", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2195, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2192, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2206, - "src": "5347:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5347:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2194, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2206, - "src": "5363:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2193, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5363:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5346:35:9" - }, - "returnParameters": { - "id": 2198, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2197, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2206, - "src": "5405:12:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2196, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5405:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5404:14:9" - }, - "scope": 2272, - "src": "5319:197:9", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2240, - "nodeType": "Block", - "src": "5828:288:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2220, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2209, - "src": "5857:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2219, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2048, - "src": "5846:10:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 2221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5846:18:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 2222, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5866:38:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - }, - "value": "Address: static call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - } - ], - "id": 2218, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5838:7:9", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5838:67:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2224, - "nodeType": "ExpressionStatement", - "src": "5838:67:9" - }, - { - "assignments": [ - 2226, - 2228 - ], - "declarations": [ - { - "constant": false, - "id": 2226, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2240, - "src": "5976:12:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2225, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5976:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2228, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2240, - "src": "5990:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2227, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5990:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2233, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2231, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2211, - "src": "6035:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2229, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2209, - "src": "6017:6:9", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "staticcall", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6017:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) view returns (bool,bytes memory)" - } - }, - "id": 2232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6017:23:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5975:65:9" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2235, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2226, - "src": "6075:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 2236, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2228, - "src": "6084:10:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 2237, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2213, - "src": "6096:12:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2234, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2271, - "src": "6057:17:9", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 2238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6057:52:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2217, - "id": 2239, - "nodeType": "Return", - "src": "6050:59:9" - } - ] - }, - "documentation": { - "id": 2207, - "nodeType": "StructuredDocumentation", - "src": "5522:173:9", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 2241, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionStaticCall", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2214, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2209, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2241, - "src": "5728:14:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2208, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5728:7:9", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2211, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2241, - "src": "5744:17:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2210, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5744:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2213, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2241, - "src": "5763:26:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2212, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5763:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5727:63:9" - }, - "returnParameters": { - "id": 2217, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2216, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2241, - "src": "5814:12:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2215, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5814:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5813:14:9" - }, - "scope": 2272, - "src": "5700:416:9", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2270, - "nodeType": "Block", - "src": "6251:596:9", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 2252, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2243, - "src": "6265:7:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2268, - "nodeType": "Block", - "src": "6322:519:9", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2256, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2245, - "src": "6406:10:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 2257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6406:17:9", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6426:1:9", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6406:21:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2266, - "nodeType": "Block", - "src": "6778:53:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2263, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2247, - "src": "6803:12:9", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2262, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "6796:6:9", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 2264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6796:20:9", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2265, - "nodeType": "ExpressionStatement", - "src": "6796:20:9" - } - ] - }, - "id": 2267, - "nodeType": "IfStatement", - "src": "6402:429:9", - "trueBody": { - "id": 2261, - "nodeType": "Block", - "src": "6429:343:9", - "statements": [ - { - "AST": { - "nodeType": "YulBlock", - "src": "6613:145:9", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "6635:40:9", - "value": { - "arguments": [ - { - "name": "returndata", - "nodeType": "YulIdentifier", - "src": "6664:10:9" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "6658:5:9" - }, - "nodeType": "YulFunctionCall", - "src": "6658:17:9" - }, - "variables": [ - { - "name": "returndata_size", - "nodeType": "YulTypedName", - "src": "6639:15:9", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6707:2:9", - "type": "", - "value": "32" - }, - { - "name": "returndata", - "nodeType": "YulIdentifier", - "src": "6711:10:9" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6703:3:9" - }, - "nodeType": "YulFunctionCall", - "src": "6703:19:9" - }, - { - "name": "returndata_size", - "nodeType": "YulIdentifier", - "src": "6724:15:9" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "6696:6:9" - }, - "nodeType": "YulFunctionCall", - "src": "6696:44:9" - }, - "nodeType": "YulExpressionStatement", - "src": "6696:44:9" - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 2245, - "isOffset": false, - "isSlot": false, - "src": "6664:10:9", - "valueSize": 1 - }, - { - "declaration": 2245, - "isOffset": false, - "isSlot": false, - "src": "6711:10:9", - "valueSize": 1 - } - ], - "id": 2260, - "nodeType": "InlineAssembly", - "src": "6604:154:9" - } - ] - } - } - ] - }, - "id": 2269, - "nodeType": "IfStatement", - "src": "6261:580:9", - "trueBody": { - "id": 2255, - "nodeType": "Block", - "src": "6274:42:9", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2253, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2245, - "src": "6295:10:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 2251, - "id": 2254, - "nodeType": "Return", - "src": "6288:17:9" - } - ] - } - } - ] - }, - "documentation": null, - "id": 2271, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_verifyCallResult", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2248, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2243, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2271, - "src": "6149:12:9", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2242, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6149:4:9", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2245, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2271, - "src": "6163:23:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2244, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6163:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2247, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2271, - "src": "6188:26:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2246, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6188:6:9", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6148:67:9" - }, - "returnParameters": { - "id": 2251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2250, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2271, - "src": "6237:12:9", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2249, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6237:5:9", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6236:14:9" - }, - "scope": 2272, - "src": "6122:725:9", - "stateMutability": "pure", - "virtual": false, - "visibility": "private" - } - ], - "scope": 2273, - "src": "134:6715:9" - } - ], - "src": "33:6817:9" - }, - "id": 9 - }, - "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol", - "exportedSymbols": { - "ContextUpgradeable": [ - 2317 - ] - }, - "id": 2318, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2274, - "literals": [ - "solidity", - ">=", - "0.6", - ".0", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:10" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol", - "file": "../proxy/Initializable.sol", - "id": 2275, - "nodeType": "ImportDirective", - "scope": 2318, - "sourceUnit": 816, - "src": "65:36:10", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": true, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2276, - "name": "Initializable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 815, - "src": "643:13:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Initializable_$815", - "typeString": "contract Initializable" - } - }, - "id": 2277, - "nodeType": "InheritanceSpecifier", - "src": "643:13:10" - } - ], - "contractDependencies": [ - 815 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2317, - "linearizedBaseContracts": [ - 2317, - 815 - ], - "name": "ContextUpgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2285, - "nodeType": "Block", - "src": "710:43:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2282, - "name": "__Context_init_unchained", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2292, - "src": "720:24:10", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 2283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "720:26:10", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2284, - "nodeType": "ExpressionStatement", - "src": "720:26:10" - } - ] - }, - "documentation": null, - "id": 2286, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 2280, - "modifierName": { - "argumentTypes": null, - "id": 2279, - "name": "initializer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "698:11:10", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "698:11:10" - } - ], - "name": "__Context_init", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2278, - "nodeType": "ParameterList", - "parameters": [], - "src": "686:2:10" - }, - "returnParameters": { - "id": 2281, - "nodeType": "ParameterList", - "parameters": [], - "src": "710:0:10" - }, - "scope": 2317, - "src": "663:90:10", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2291, - "nodeType": "Block", - "src": "816:7:10", - "statements": [] - }, - "documentation": null, - "id": 2292, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 2289, - "modifierName": { - "argumentTypes": null, - "id": 2288, - "name": "initializer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "804:11:10", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "804:11:10" - } - ], - "name": "__Context_init_unchained", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2287, - "nodeType": "ParameterList", - "parameters": [], - "src": "792:2:10" - }, - "returnParameters": { - "id": 2290, - "nodeType": "ParameterList", - "parameters": [], - "src": "816:0:10" - }, - "scope": 2317, - "src": "759:64:10", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2300, - "nodeType": "Block", - "src": "898:34:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2297, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "915:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "915:10:10", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 2296, - "id": 2299, - "nodeType": "Return", - "src": "908:17:10" - } - ] - }, - "documentation": null, - "id": 2301, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgSender", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2293, - "nodeType": "ParameterList", - "parameters": [], - "src": "847:2:10" - }, - "returnParameters": { - "id": 2296, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2295, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2301, - "src": "881:15:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 2294, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "881:15:10", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "880:17:10" - }, - "scope": 2317, - "src": "828:104:10", - "stateMutability": "view", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 2311, - "nodeType": "Block", - "src": "1003:165:10", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2306, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "1013:4:10", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ContextUpgradeable_$2317", - "typeString": "contract ContextUpgradeable" - } - }, - "id": 2307, - "nodeType": "ExpressionStatement", - "src": "1013:4:10" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2308, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1153:3:10", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "data", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1153:8:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "functionReturnParameters": 2305, - "id": 2310, - "nodeType": "Return", - "src": "1146:15:10" - } - ] - }, - "documentation": null, - "id": 2312, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_msgData", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2302, - "nodeType": "ParameterList", - "parameters": [], - "src": "955:2:10" - }, - "returnParameters": { - "id": 2305, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2304, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2312, - "src": "989:12:10", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2303, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "989:5:10", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "988:14:10" - }, - "scope": 2317, - "src": "938:230:10", - "stateMutability": "view", - "virtual": true, - "visibility": "internal" - }, - { - "constant": false, - "id": 2316, - "mutability": "mutable", - "name": "__gap", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2317, - "src": "1173:25:10", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$50_storage", - "typeString": "uint256[50]" - }, - "typeName": { - "baseType": { - "id": 2313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1173:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2315, - "length": { - "argumentTypes": null, - "hexValue": "3530", - "id": 2314, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1181:2:10", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_50_by_1", - "typeString": "int_const 50" - }, - "value": "50" - }, - "nodeType": "ArrayTypeName", - "src": "1173:11:10", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$50_storage_ptr", - "typeString": "uint256[50]" - } - }, - "value": null, - "visibility": "private" - } - ], - "scope": 2318, - "src": "603:598:10" - } - ], - "src": "33:1169:10" - }, - "id": 10 - }, - "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol", - "exportedSymbols": { - "CountersUpgradeable": [ - 2367 - ] - }, - "id": 2368, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2319, - "literals": [ - "solidity", - ">=", - "0.6", - ".0", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:11" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol", - "file": "../math/SafeMathUpgradeable.sol", - "id": 2320, - "nodeType": "ImportDirective", - "scope": 2368, - "sourceUnit": 750, - "src": "66:41:11", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 2321, - "nodeType": "StructuredDocumentation", - "src": "109:571:11", - "text": " @title Counters\n @author Matt Condon (@shrugs)\n @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\n of elements in a mapping, issuing ERC721 ids, or counting request ids.\n Include with `using Counters for Counters.Counter;`\n Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\n overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\n directly accessed." - }, - "fullyImplemented": true, - "id": 2367, - "linearizedBaseContracts": [ - 2367 - ], - "name": "CountersUpgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 2324, - "libraryName": { - "contractScope": null, - "id": 2322, - "name": "SafeMathUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 749, - "src": "721:19:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMathUpgradeable_$749", - "typeString": "library SafeMathUpgradeable" - } - }, - "nodeType": "UsingForDirective", - "src": "715:38:11", - "typeName": { - "id": 2323, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "745:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "canonicalName": "CountersUpgradeable.Counter", - "id": 2327, - "members": [ - { - "constant": false, - "id": 2326, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2327, - "src": "1098:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2325, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1098:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Counter", - "nodeType": "StructDefinition", - "scope": 2367, - "src": "759:374:11", - "visibility": "public" - }, - { - "body": { - "id": 2337, - "nodeType": "Block", - "src": "1213:38:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2334, - "name": "counter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2329, - "src": "1230:7:11", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter storage pointer" - } - }, - "id": 2335, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_value", - "nodeType": "MemberAccess", - "referencedDeclaration": 2326, - "src": "1230:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2333, - "id": 2336, - "nodeType": "Return", - "src": "1223:21:11" - } - ] - }, - "documentation": null, - "id": 2338, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "current", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2329, - "mutability": "mutable", - "name": "counter", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2338, - "src": "1156:23:11", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter" - }, - "typeName": { - "contractScope": null, - "id": 2328, - "name": "Counter", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2327, - "src": "1156:7:11", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1155:25:11" - }, - "returnParameters": { - "id": 2333, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2332, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2338, - "src": "1204:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2331, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1204:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1203:9:11" - }, - "scope": 2367, - "src": "1139:112:11", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2349, - "nodeType": "Block", - "src": "1310:125:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2343, - "name": "counter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2340, - "src": "1409:7:11", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter storage pointer" - } - }, - "id": 2345, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "_value", - "nodeType": "MemberAccess", - "referencedDeclaration": 2326, - "src": "1409:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 2346, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1427:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "1409:19:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2348, - "nodeType": "ExpressionStatement", - "src": "1409:19:11" - } - ] - }, - "documentation": null, - "id": 2350, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "increment", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2341, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2340, - "mutability": "mutable", - "name": "counter", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2350, - "src": "1276:23:11", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter" - }, - "typeName": { - "contractScope": null, - "id": 2339, - "name": "Counter", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2327, - "src": "1276:7:11", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1275:25:11" - }, - "returnParameters": { - "id": 2342, - "nodeType": "ParameterList", - "parameters": [], - "src": "1310:0:11" - }, - "scope": 2367, - "src": "1257:178:11", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2365, - "nodeType": "Block", - "src": "1494:55:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2355, - "name": "counter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2352, - "src": "1504:7:11", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter storage pointer" - } - }, - "id": 2357, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "_value", - "nodeType": "MemberAccess", - "referencedDeclaration": 2326, - "src": "1504:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1540:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2358, - "name": "counter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2352, - "src": "1521:7:11", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter storage pointer" - } - }, - "id": 2359, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_value", - "nodeType": "MemberAccess", - "referencedDeclaration": 2326, - "src": "1521:14:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2360, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 598, - "src": "1521:18:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1521:21:11", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1504:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2364, - "nodeType": "ExpressionStatement", - "src": "1504:38:11" - } - ] - }, - "documentation": null, - "id": 2366, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "decrement", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2353, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2352, - "mutability": "mutable", - "name": "counter", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2366, - "src": "1460:23:11", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter" - }, - "typeName": { - "contractScope": null, - "id": 2351, - "name": "Counter", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2327, - "src": "1460:7:11", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1459:25:11" - }, - "returnParameters": { - "id": 2354, - "nodeType": "ParameterList", - "parameters": [], - "src": "1494:0:11" - }, - "scope": 2367, - "src": "1441:108:11", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 2368, - "src": "681:870:11" - } - ], - "src": "33:1519:11" - }, - "id": 11 - }, - "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol": { - "ast": { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol", - "exportedSymbols": { - "EnumerableSetUpgradeable": [ - 2859 - ] - }, - "id": 2860, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2369, - "literals": [ - "solidity", - ">=", - "0.6", - ".0", - "<", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "33:31:12" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 2370, - "nodeType": "StructuredDocumentation", - "src": "66:686:12", - "text": " @dev Library for managing\n https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n types.\n Sets have the following properties:\n - Elements are added, removed, and checked for existence in constant time\n (O(1)).\n - Elements are enumerated in O(n). No guarantees are made on the ordering.\n ```\n contract Example {\n // Add the library methods\n using EnumerableSet for EnumerableSet.AddressSet;\n // Declare a set state variable\n EnumerableSet.AddressSet private mySet;\n }\n ```\n As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n and `uint256` (`UintSet`) are supported." - }, - "fullyImplemented": true, - "id": 2859, - "linearizedBaseContracts": [ - 2859 - ], - "name": "EnumerableSetUpgradeable", - "nodeType": "ContractDefinition", - "nodes": [ - { - "canonicalName": "EnumerableSetUpgradeable.Set", - "id": 2378, - "members": [ - { - "constant": false, - "id": 2373, - "mutability": "mutable", - "name": "_values", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2378, - "src": "1286:17:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 2371, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1286:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 2372, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1286:9:12", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2377, - "mutability": "mutable", - "name": "_indexes", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2378, - "src": "1437:37:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - }, - "typeName": { - "id": 2376, - "keyType": { - "id": 2374, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1446:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1437:28:12", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - }, - "valueType": { - "id": 2375, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1457:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Set", - "nodeType": "StructDefinition", - "scope": 2859, - "src": "1232:249:12", - "visibility": "public" - }, - { - "body": { - "id": 2418, - "nodeType": "Block", - "src": "1720:335:12", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 2392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1734:22:12", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2389, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2381, - "src": "1745:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - { - "argumentTypes": null, - "id": 2390, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2383, - "src": "1750:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2388, - "name": "_contains", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2517, - "src": "1735:9:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Set_$2378_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,bytes32) view returns (bool)" - } - }, - "id": 2391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1735:21:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2416, - "nodeType": "Block", - "src": "2012:37:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2414, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2033:5:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 2387, - "id": 2415, - "nodeType": "Return", - "src": "2026:12:12" - } - ] - }, - "id": 2417, - "nodeType": "IfStatement", - "src": "1730:319:12", - "trueBody": { - "id": 2413, - "nodeType": "Block", - "src": "1758:248:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2398, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2383, - "src": "1789:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2393, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2381, - "src": "1772:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2396, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_values", - "nodeType": "MemberAccess", - "referencedDeclaration": 2373, - "src": "1772:11:12", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1772:16:12", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$__$", - "typeString": "function (bytes32)" - } - }, - "id": 2399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1772:23:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2400, - "nodeType": "ExpressionStatement", - "src": "1772:23:12" - }, - { - "expression": { - "argumentTypes": null, - "id": 2409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2401, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2381, - "src": "1930:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2404, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_indexes", - "nodeType": "MemberAccess", - "referencedDeclaration": 2377, - "src": "1930:12:12", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 2405, - "indexExpression": { - "argumentTypes": null, - "id": 2403, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2383, - "src": "1943:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1930:19:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2406, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2381, - "src": "1952:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2407, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_values", - "nodeType": "MemberAccess", - "referencedDeclaration": 2373, - "src": "1952:11:12", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1952:18:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1930:40:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2410, - "nodeType": "ExpressionStatement", - "src": "1930:40:12" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1991:4:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2387, - "id": 2412, - "nodeType": "Return", - "src": "1984:11:12" - } - ] - } - } - ] - }, - "documentation": { - "id": 2379, - "nodeType": "StructuredDocumentation", - "src": "1487:159:12", - "text": " @dev Add a value to a set. O(1).\n Returns true if the value was added to the set, that is if it was not\n already present." - }, - "id": 2419, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_add", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2384, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2381, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2419, - "src": "1665:15:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - }, - "typeName": { - "contractScope": null, - "id": 2380, - "name": "Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2378, - "src": "1665:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2383, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2419, - "src": "1682:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2382, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1682:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1664:32:12" - }, - "returnParameters": { - "id": 2387, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2386, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2419, - "src": "1714:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2385, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1714:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1713:6:12" - }, - "scope": 2859, - "src": "1651:404:12", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 2498, - "nodeType": "Block", - "src": "2295:1440:12", - "statements": [ - { - "assignments": [ - 2430 - ], - "declarations": [ - { - "constant": false, - "id": 2430, - "mutability": "mutable", - "name": "valueIndex", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2498, - "src": "2405:18:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2429, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2405:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2435, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2431, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2422, - "src": "2426:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2432, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_indexes", - "nodeType": "MemberAccess", - "referencedDeclaration": 2377, - "src": "2426:12:12", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 2434, - "indexExpression": { - "argumentTypes": null, - "id": 2433, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2424, - "src": "2439:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2426:19:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2405:40:12" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2436, - "name": "valueIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2430, - "src": "2460:10:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2437, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2474:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2460:15:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2496, - "nodeType": "Block", - "src": "3692:37:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2494, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3713:5:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 2428, - "id": 2495, - "nodeType": "Return", - "src": "3706:12:12" - } - ] - }, - "id": 2497, - "nodeType": "IfStatement", - "src": "2456:1273:12", - "trueBody": { - "id": 2493, - "nodeType": "Block", - "src": "2477:1209:12", - "statements": [ - { - "assignments": [ - 2440 - ], - "declarations": [ - { - "constant": false, - "id": 2440, - "mutability": "mutable", - "name": "toDeleteIndex", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2493, - "src": "2817:21:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2439, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2817:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2444, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2441, - "name": "valueIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2430, - "src": "2841:10:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2442, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2854:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "2841:14:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2817:38:12" - }, - { - "assignments": [ - 2446 - ], - "declarations": [ - { - "constant": false, - "id": 2446, - "mutability": "mutable", - "name": "lastIndex", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2493, - "src": "2869:17:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2445, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2869:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2452, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2447, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2422, - "src": "2889:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2448, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_values", - "nodeType": "MemberAccess", - "referencedDeclaration": 2373, - "src": "2889:11:12", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2889:18:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2450, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2910:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "2889:22:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2869:42:12" - }, - { - "assignments": [ - 2454 - ], - "declarations": [ - { - "constant": false, - "id": 2454, - "mutability": "mutable", - "name": "lastvalue", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2493, - "src": "3151:17:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2453, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3151:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2459, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2455, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2422, - "src": "3171:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2456, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_values", - "nodeType": "MemberAccess", - "referencedDeclaration": 2373, - "src": "3171:11:12", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2458, - "indexExpression": { - "argumentTypes": null, - "id": 2457, - "name": "lastIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2446, - "src": "3183:9:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3171:22:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3151:42:12" - }, - { - "expression": { - "argumentTypes": null, - "id": 2466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2460, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2422, - "src": "3285:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2463, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_values", - "nodeType": "MemberAccess", - "referencedDeclaration": 2373, - "src": "3285:11:12", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2464, - "indexExpression": { - "argumentTypes": null, - "id": 2462, - "name": "toDeleteIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2440, - "src": "3297:13:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3285:26:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2465, - "name": "lastvalue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2454, - "src": "3314:9:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "3285:38:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 2467, - "nodeType": "ExpressionStatement", - "src": "3285:38:12" - }, - { - "expression": { - "argumentTypes": null, - "id": 2476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2468, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2422, - "src": "3389:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2471, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_indexes", - "nodeType": "MemberAccess", - "referencedDeclaration": 2377, - "src": "3389:12:12", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 2472, - "indexExpression": { - "argumentTypes": null, - "id": 2470, - "name": "lastvalue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2454, - "src": "3402:9:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3389:23:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2473, - "name": "toDeleteIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2440, - "src": "3415:13:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3431:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3415:17:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3389:43:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2477, - "nodeType": "ExpressionStatement", - "src": "3389:43:12" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2478, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2422, - "src": "3538:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2481, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_values", - "nodeType": "MemberAccess", - "referencedDeclaration": 2373, - "src": "3538:11:12", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "pop", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3538:15:12", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 2483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3538:17:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2484, - "nodeType": "ExpressionStatement", - "src": "3538:17:12" - }, - { - "expression": { - "argumentTypes": null, - "id": 2489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "3623:26:12", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2485, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2422, - "src": "3630:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2486, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_indexes", - "nodeType": "MemberAccess", - "referencedDeclaration": 2377, - "src": "3630:12:12", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 2488, - "indexExpression": { - "argumentTypes": null, - "id": 2487, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2424, - "src": "3643:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3630:19:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2490, - "nodeType": "ExpressionStatement", - "src": "3623:26:12" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3671:4:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2428, - "id": 2492, - "nodeType": "Return", - "src": "3664:11:12" - } - ] - } - } - ] - }, - "documentation": { - "id": 2420, - "nodeType": "StructuredDocumentation", - "src": "2061:157:12", - "text": " @dev Removes a value from a set. O(1).\n Returns true if the value was removed from the set, that is if it was\n present." - }, - "id": 2499, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_remove", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2425, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2422, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2499, - "src": "2240:15:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - }, - "typeName": { - "contractScope": null, - "id": 2421, - "name": "Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2378, - "src": "2240:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2424, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2499, - "src": "2257:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2423, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2257:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2239:32:12" - }, - "returnParameters": { - "id": 2428, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2427, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2499, - "src": "2289:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2426, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2289:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2288:6:12" - }, - "scope": 2859, - "src": "2223:1512:12", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 2516, - "nodeType": "Block", - "src": "3895:48:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2509, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2502, - "src": "3912:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2510, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_indexes", - "nodeType": "MemberAccess", - "referencedDeclaration": 2377, - "src": "3912:12:12", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 2512, - "indexExpression": { - "argumentTypes": null, - "id": 2511, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2504, - "src": "3925:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3912:19:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2513, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3935:1:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3912:24:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2508, - "id": 2515, - "nodeType": "Return", - "src": "3905:31:12" - } - ] - }, - "documentation": { - "id": 2500, - "nodeType": "StructuredDocumentation", - "src": "3741:70:12", - "text": " @dev Returns true if the value is in the set. O(1)." - }, - "id": 2517, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_contains", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2505, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2502, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2517, - "src": "3835:15:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - }, - "typeName": { - "contractScope": null, - "id": 2501, - "name": "Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2378, - "src": "3835:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2504, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2517, - "src": "3852:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2503, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3852:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3834:32:12" - }, - "returnParameters": { - "id": 2508, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2507, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2517, - "src": "3889:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2506, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3889:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3888:6:12" - }, - "scope": 2859, - "src": "3816:127:12", - "stateMutability": "view", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 2529, - "nodeType": "Block", - "src": "4089:42:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2525, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2520, - "src": "4106:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2526, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_values", - "nodeType": "MemberAccess", - "referencedDeclaration": 2373, - "src": "4106:11:12", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4106:18:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2524, - "id": 2528, - "nodeType": "Return", - "src": "4099:25:12" - } - ] - }, - "documentation": { - "id": 2518, - "nodeType": "StructuredDocumentation", - "src": "3949:70:12", - "text": " @dev Returns the number of values on the set. O(1)." - }, - "id": 2530, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_length", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2521, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2520, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2530, - "src": "4041:15:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - }, - "typeName": { - "contractScope": null, - "id": 2519, - "name": "Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2378, - "src": "4041:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4040:17:12" - }, - "returnParameters": { - "id": 2524, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2523, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2530, - "src": "4080:7:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2522, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4080:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4079:9:12" - }, - "scope": 2859, - "src": "4024:107:12", - "stateMutability": "view", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 2554, - "nodeType": "Block", - "src": "4539:125:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2541, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2533, - "src": "4557:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2542, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_values", - "nodeType": "MemberAccess", - "referencedDeclaration": 2373, - "src": "4557:11:12", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4557:18:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2544, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2535, - "src": "4578:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4557:26:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473", - "id": 2546, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4585:36:12", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_045d6834e6193a687012a3ad777f612279e549b6945364d9d2324f48610d3cbb", - "typeString": "literal_string \"EnumerableSet: index out of bounds\"" - }, - "value": "EnumerableSet: index out of bounds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_045d6834e6193a687012a3ad777f612279e549b6945364d9d2324f48610d3cbb", - "typeString": "literal_string \"EnumerableSet: index out of bounds\"" - } - ], - "id": 2540, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4549:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4549:73:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2548, - "nodeType": "ExpressionStatement", - "src": "4549:73:12" - }, - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2549, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2533, - "src": "4639:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set storage pointer" - } - }, - "id": 2550, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_values", - "nodeType": "MemberAccess", - "referencedDeclaration": 2373, - "src": "4639:11:12", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2552, - "indexExpression": { - "argumentTypes": null, - "id": 2551, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2535, - "src": "4651:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4639:18:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 2539, - "id": 2553, - "nodeType": "Return", - "src": "4632:25:12" - } - ] - }, - "documentation": { - "id": 2531, - "nodeType": "StructuredDocumentation", - "src": "4136:322:12", - "text": " @dev Returns the value stored at position `index` in the set. O(1).\n Note that there are no guarantees on the ordering of values inside the\n array, and it may change when more values are added or removed.\n Requirements:\n - `index` must be strictly less than {length}." - }, - "id": 2555, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_at", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2536, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2533, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2555, - "src": "4476:15:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - }, - "typeName": { - "contractScope": null, - "id": 2532, - "name": "Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2378, - "src": "4476:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2535, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2555, - "src": "4493:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2534, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4493:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4475:32:12" - }, - "returnParameters": { - "id": 2539, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2538, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2555, - "src": "4530:7:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2537, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4530:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4529:9:12" - }, - "scope": 2859, - "src": "4463:201:12", - "stateMutability": "view", - "virtual": false, - "visibility": "private" - }, - { - "canonicalName": "EnumerableSetUpgradeable.Bytes32Set", - "id": 2558, - "members": [ - { - "constant": false, - "id": 2557, - "mutability": "mutable", - "name": "_inner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2558, - "src": "4717:10:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - }, - "typeName": { - "contractScope": null, - "id": 2556, - "name": "Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2378, - "src": "4717:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Bytes32Set", - "nodeType": "StructDefinition", - "scope": 2859, - "src": "4689:45:12", - "visibility": "public" - }, - { - "body": { - "id": 2574, - "nodeType": "Block", - "src": "4980:47:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2569, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2561, - "src": "5002:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set storage pointer" - } - }, - "id": 2570, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2557, - "src": "5002:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "id": 2571, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2563, - "src": "5014:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2568, - "name": "_add", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2419, - "src": "4997:4:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Set_$2378_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,bytes32) returns (bool)" - } - }, - "id": 2572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4997:23:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2567, - "id": 2573, - "nodeType": "Return", - "src": "4990:30:12" - } - ] - }, - "documentation": { - "id": 2559, - "nodeType": "StructuredDocumentation", - "src": "4740:159:12", - "text": " @dev Add a value to a set. O(1).\n Returns true if the value was added to the set, that is if it was not\n already present." - }, - "id": 2575, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2564, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2561, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2575, - "src": "4917:22:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set" - }, - "typeName": { - "contractScope": null, - "id": 2560, - "name": "Bytes32Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2558, - "src": "4917:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2563, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2575, - "src": "4941:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2562, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4941:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4916:39:12" - }, - "returnParameters": { - "id": 2567, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2566, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2575, - "src": "4974:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2565, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4974:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4973:6:12" - }, - "scope": 2859, - "src": "4904:123:12", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2591, - "nodeType": "Block", - "src": "5274:50:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2586, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2578, - "src": "5299:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set storage pointer" - } - }, - "id": 2587, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2557, - "src": "5299:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "id": 2588, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2580, - "src": "5311:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2585, - "name": "_remove", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2499, - "src": "5291:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Set_$2378_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,bytes32) returns (bool)" - } - }, - "id": 2589, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5291:26:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2584, - "id": 2590, - "nodeType": "Return", - "src": "5284:33:12" - } - ] - }, - "documentation": { - "id": 2576, - "nodeType": "StructuredDocumentation", - "src": "5033:157:12", - "text": " @dev Removes a value from a set. O(1).\n Returns true if the value was removed from the set, that is if it was\n present." - }, - "id": 2592, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "remove", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2581, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2578, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2592, - "src": "5211:22:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set" - }, - "typeName": { - "contractScope": null, - "id": 2577, - "name": "Bytes32Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2558, - "src": "5211:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2580, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2592, - "src": "5235:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2579, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5235:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5210:39:12" - }, - "returnParameters": { - "id": 2584, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2583, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2592, - "src": "5268:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2582, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5268:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5267:6:12" - }, - "scope": 2859, - "src": "5195:129:12", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2608, - "nodeType": "Block", - "src": "5491:52:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2603, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2595, - "src": "5518:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set storage pointer" - } - }, - "id": 2604, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2557, - "src": "5518:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "id": 2605, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2597, - "src": "5530:5:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2602, - "name": "_contains", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2517, - "src": "5508:9:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Set_$2378_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,bytes32) view returns (bool)" - } - }, - "id": 2606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5508:28:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2601, - "id": 2607, - "nodeType": "Return", - "src": "5501:35:12" - } - ] - }, - "documentation": { - "id": 2593, - "nodeType": "StructuredDocumentation", - "src": "5330:70:12", - "text": " @dev Returns true if the value is in the set. O(1)." - }, - "id": 2609, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "contains", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2598, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2595, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2609, - "src": "5423:22:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set" - }, - "typeName": { - "contractScope": null, - "id": 2594, - "name": "Bytes32Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2558, - "src": "5423:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2597, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2609, - "src": "5447:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2596, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5447:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5422:39:12" - }, - "returnParameters": { - "id": 2601, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2600, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2609, - "src": "5485:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2599, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5485:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5484:6:12" - }, - "scope": 2859, - "src": "5405:138:12", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2622, - "nodeType": "Block", - "src": "5696:43:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2618, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2612, - "src": "5721:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set storage pointer" - } - }, - "id": 2619, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2557, - "src": "5721:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - ], - "id": 2617, - "name": "_length", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2530, - "src": "5713:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Set_$2378_storage_ptr_$returns$_t_uint256_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer) view returns (uint256)" - } - }, - "id": 2620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5713:19:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2616, - "id": 2621, - "nodeType": "Return", - "src": "5706:26:12" - } - ] - }, - "documentation": { - "id": 2610, - "nodeType": "StructuredDocumentation", - "src": "5549:70:12", - "text": " @dev Returns the number of values in the set. O(1)." - }, - "id": 2623, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "length", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2613, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2612, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2623, - "src": "5640:22:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set" - }, - "typeName": { - "contractScope": null, - "id": 2611, - "name": "Bytes32Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2558, - "src": "5640:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5639:24:12" - }, - "returnParameters": { - "id": 2616, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2615, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2623, - "src": "5687:7:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2614, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5687:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5686:9:12" - }, - "scope": 2859, - "src": "5624:115:12", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2639, - "nodeType": "Block", - "src": "6154:46:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2634, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2626, - "src": "6175:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set storage pointer" - } - }, - "id": 2635, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2557, - "src": "6175:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "id": 2636, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2628, - "src": "6187:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2633, - "name": "_at", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2555, - "src": "6171:3:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Set_$2378_storage_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,uint256) view returns (bytes32)" - } - }, - "id": 2637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6171:22:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 2632, - "id": 2638, - "nodeType": "Return", - "src": "6164:29:12" - } - ] - }, - "documentation": { - "id": 2624, - "nodeType": "StructuredDocumentation", - "src": "5744:322:12", - "text": " @dev Returns the value stored at position `index` in the set. O(1).\n Note that there are no guarantees on the ordering of values inside the\n array, and it may change when more values are added or removed.\n Requirements:\n - `index` must be strictly less than {length}." - }, - "id": 2640, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "at", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2629, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2626, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2640, - "src": "6083:22:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set" - }, - "typeName": { - "contractScope": null, - "id": 2625, - "name": "Bytes32Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2558, - "src": "6083:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Bytes32Set_$2558_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Bytes32Set" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2628, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2640, - "src": "6107:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2627, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6107:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6082:39:12" - }, - "returnParameters": { - "id": 2632, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2631, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2640, - "src": "6145:7:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2630, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6145:7:12", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6144:9:12" - }, - "scope": 2859, - "src": "6071:129:12", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "canonicalName": "EnumerableSetUpgradeable.AddressSet", - "id": 2643, - "members": [ - { - "constant": false, - "id": 2642, - "mutability": "mutable", - "name": "_inner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2643, - "src": "6253:10:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - }, - "typeName": { - "contractScope": null, - "id": 2641, - "name": "Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2378, - "src": "6253:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "AddressSet", - "nodeType": "StructDefinition", - "scope": 2859, - "src": "6225:45:12", - "visibility": "public" - }, - { - "body": { - "id": 2668, - "nodeType": "Block", - "src": "6516:74:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2654, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2646, - "src": "6538:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet storage pointer" - } - }, - "id": 2655, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2642, - "src": "6538:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2662, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2648, - "src": "6574:5:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2661, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6566:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": { - "id": 2660, - "name": "uint160", - "nodeType": "ElementaryTypeName", - "src": "6566:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6566:14:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 2659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6558:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 2658, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6558:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2664, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6558:23:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2657, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6550:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 2656, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6550:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6550:32:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2653, - "name": "_add", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2419, - "src": "6533:4:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Set_$2378_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,bytes32) returns (bool)" - } - }, - "id": 2666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6533:50:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2652, - "id": 2667, - "nodeType": "Return", - "src": "6526:57:12" - } - ] - }, - "documentation": { - "id": 2644, - "nodeType": "StructuredDocumentation", - "src": "6276:159:12", - "text": " @dev Add a value to a set. O(1).\n Returns true if the value was added to the set, that is if it was not\n already present." - }, - "id": 2669, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2649, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2646, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2669, - "src": "6453:22:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - }, - "typeName": { - "contractScope": null, - "id": 2645, - "name": "AddressSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2643, - "src": "6453:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2648, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2669, - "src": "6477:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2647, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6477:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6452:39:12" - }, - "returnParameters": { - "id": 2652, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2651, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2669, - "src": "6510:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2650, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6510:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6509:6:12" - }, - "scope": 2859, - "src": "6440:150:12", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2694, - "nodeType": "Block", - "src": "6837:77:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2680, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2672, - "src": "6862:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet storage pointer" - } - }, - "id": 2681, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2642, - "src": "6862:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2688, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2674, - "src": "6898:5:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2687, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6890:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": { - "id": 2686, - "name": "uint160", - "nodeType": "ElementaryTypeName", - "src": "6890:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6890:14:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 2685, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6882:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 2684, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6882:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6882:23:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6874:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 2682, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6874:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6874:32:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2679, - "name": "_remove", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2499, - "src": "6854:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Set_$2378_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,bytes32) returns (bool)" - } - }, - "id": 2692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6854:53:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2678, - "id": 2693, - "nodeType": "Return", - "src": "6847:60:12" - } - ] - }, - "documentation": { - "id": 2670, - "nodeType": "StructuredDocumentation", - "src": "6596:157:12", - "text": " @dev Removes a value from a set. O(1).\n Returns true if the value was removed from the set, that is if it was\n present." - }, - "id": 2695, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "remove", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2675, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2672, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2695, - "src": "6774:22:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - }, - "typeName": { - "contractScope": null, - "id": 2671, - "name": "AddressSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2643, - "src": "6774:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2674, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2695, - "src": "6798:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2673, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6798:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6773:39:12" - }, - "returnParameters": { - "id": 2678, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2677, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2695, - "src": "6831:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2676, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6831:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6830:6:12" - }, - "scope": 2859, - "src": "6758:156:12", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2720, - "nodeType": "Block", - "src": "7081:79:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2706, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2698, - "src": "7108:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet storage pointer" - } - }, - "id": 2707, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2642, - "src": "7108:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2714, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2700, - "src": "7144:5:12", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2713, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7136:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": { - "id": 2712, - "name": "uint160", - "nodeType": "ElementaryTypeName", - "src": "7136:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7136:14:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 2711, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7128:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 2710, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7128:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7128:23:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2709, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7120:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 2708, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7120:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7120:32:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2705, - "name": "_contains", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2517, - "src": "7098:9:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Set_$2378_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,bytes32) view returns (bool)" - } - }, - "id": 2718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7098:55:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2704, - "id": 2719, - "nodeType": "Return", - "src": "7091:62:12" - } - ] - }, - "documentation": { - "id": 2696, - "nodeType": "StructuredDocumentation", - "src": "6920:70:12", - "text": " @dev Returns true if the value is in the set. O(1)." - }, - "id": 2721, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "contains", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2701, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2698, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2721, - "src": "7013:22:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - }, - "typeName": { - "contractScope": null, - "id": 2697, - "name": "AddressSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2643, - "src": "7013:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2700, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2721, - "src": "7037:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2699, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7037:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7012:39:12" - }, - "returnParameters": { - "id": 2704, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2703, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2721, - "src": "7075:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2702, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7075:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7074:6:12" - }, - "scope": 2859, - "src": "6995:165:12", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2734, - "nodeType": "Block", - "src": "7313:43:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2730, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2724, - "src": "7338:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet storage pointer" - } - }, - "id": 2731, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2642, - "src": "7338:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - ], - "id": 2729, - "name": "_length", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2530, - "src": "7330:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Set_$2378_storage_ptr_$returns$_t_uint256_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer) view returns (uint256)" - } - }, - "id": 2732, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7330:19:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2728, - "id": 2733, - "nodeType": "Return", - "src": "7323:26:12" - } - ] - }, - "documentation": { - "id": 2722, - "nodeType": "StructuredDocumentation", - "src": "7166:70:12", - "text": " @dev Returns the number of values in the set. O(1)." - }, - "id": 2735, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "length", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2725, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2724, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2735, - "src": "7257:22:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - }, - "typeName": { - "contractScope": null, - "id": 2723, - "name": "AddressSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2643, - "src": "7257:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7256:24:12" - }, - "returnParameters": { - "id": 2728, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2727, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2735, - "src": "7304:7:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2726, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7304:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7303:9:12" - }, - "scope": 2859, - "src": "7241:115:12", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2760, - "nodeType": "Block", - "src": "7771:73:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2752, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2738, - "src": "7816:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet storage pointer" - } - }, - "id": 2753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2642, - "src": "7816:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "id": 2754, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2740, - "src": "7828:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2751, - "name": "_at", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2555, - "src": "7812:3:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Set_$2378_storage_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,uint256) view returns (bytes32)" - } - }, - "id": 2755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7812:22:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2750, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7804:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 2749, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7804:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2756, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7804:31:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2748, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7796:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": { - "id": 2747, - "name": "uint160", - "nodeType": "ElementaryTypeName", - "src": "7796:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7796:40:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 2746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7788:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2745, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7788:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2758, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7788:49:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "functionReturnParameters": 2744, - "id": 2759, - "nodeType": "Return", - "src": "7781:56:12" - } - ] - }, - "documentation": { - "id": 2736, - "nodeType": "StructuredDocumentation", - "src": "7361:322:12", - "text": " @dev Returns the value stored at position `index` in the set. O(1).\n Note that there are no guarantees on the ordering of values inside the\n array, and it may change when more values are added or removed.\n Requirements:\n - `index` must be strictly less than {length}." - }, - "id": 2761, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "at", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2741, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2738, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2761, - "src": "7700:22:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - }, - "typeName": { - "contractScope": null, - "id": 2737, - "name": "AddressSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2643, - "src": "7700:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AddressSet_$2643_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.AddressSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2740, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2761, - "src": "7724:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2739, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "7724:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7699:39:12" - }, - "returnParameters": { - "id": 2744, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2743, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2761, - "src": "7762:7:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2742, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7762:7:12", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7761:9:12" - }, - "scope": 2859, - "src": "7688:156:12", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "canonicalName": "EnumerableSetUpgradeable.UintSet", - "id": 2764, - "members": [ - { - "constant": false, - "id": 2763, - "mutability": "mutable", - "name": "_inner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2764, - "src": "7892:10:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - }, - "typeName": { - "contractScope": null, - "id": 2762, - "name": "Set", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2378, - "src": "7892:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.Set" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "UintSet", - "nodeType": "StructDefinition", - "scope": 2859, - "src": "7867:42:12", - "visibility": "public" - }, - { - "body": { - "id": 2783, - "nodeType": "Block", - "src": "8152:56:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2775, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2767, - "src": "8174:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet storage pointer" - } - }, - "id": 2776, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2763, - "src": "8174:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2779, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2769, - "src": "8194:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2778, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8186:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 2777, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8186:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8186:14:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2774, - "name": "_add", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2419, - "src": "8169:4:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Set_$2378_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,bytes32) returns (bool)" - } - }, - "id": 2781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8169:32:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2773, - "id": 2782, - "nodeType": "Return", - "src": "8162:39:12" - } - ] - }, - "documentation": { - "id": 2765, - "nodeType": "StructuredDocumentation", - "src": "7915:159:12", - "text": " @dev Add a value to a set. O(1).\n Returns true if the value was added to the set, that is if it was not\n already present." - }, - "id": 2784, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2770, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2767, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2784, - "src": "8092:19:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet" - }, - "typeName": { - "contractScope": null, - "id": 2766, - "name": "UintSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2764, - "src": "8092:7:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2769, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2784, - "src": "8113:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2768, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8113:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8091:36:12" - }, - "returnParameters": { - "id": 2773, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2772, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2784, - "src": "8146:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2771, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8146:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8145:6:12" - }, - "scope": 2859, - "src": "8079:129:12", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2803, - "nodeType": "Block", - "src": "8452:59:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2795, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2787, - "src": "8477:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet storage pointer" - } - }, - "id": 2796, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2763, - "src": "8477:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2799, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2789, - "src": "8497:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8489:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 2797, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8489:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8489:14:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2794, - "name": "_remove", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2499, - "src": "8469:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Set_$2378_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,bytes32) returns (bool)" - } - }, - "id": 2801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8469:35:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2793, - "id": 2802, - "nodeType": "Return", - "src": "8462:42:12" - } - ] - }, - "documentation": { - "id": 2785, - "nodeType": "StructuredDocumentation", - "src": "8214:157:12", - "text": " @dev Removes a value from a set. O(1).\n Returns true if the value was removed from the set, that is if it was\n present." - }, - "id": 2804, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "remove", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2787, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2804, - "src": "8392:19:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet" - }, - "typeName": { - "contractScope": null, - "id": 2786, - "name": "UintSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2764, - "src": "8392:7:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2789, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2804, - "src": "8413:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2788, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8413:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8391:36:12" - }, - "returnParameters": { - "id": 2793, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2792, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2804, - "src": "8446:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2791, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8446:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8445:6:12" - }, - "scope": 2859, - "src": "8376:135:12", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2823, - "nodeType": "Block", - "src": "8675:61:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2815, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2807, - "src": "8702:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet storage pointer" - } - }, - "id": 2816, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2763, - "src": "8702:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2819, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2809, - "src": "8722:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2818, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "8714:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 2817, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8714:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8714:14:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2814, - "name": "_contains", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2517, - "src": "8692:9:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Set_$2378_storage_ptr_$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,bytes32) view returns (bool)" - } - }, - "id": 2821, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8692:37:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2813, - "id": 2822, - "nodeType": "Return", - "src": "8685:44:12" - } - ] - }, - "documentation": { - "id": 2805, - "nodeType": "StructuredDocumentation", - "src": "8517:70:12", - "text": " @dev Returns true if the value is in the set. O(1)." - }, - "id": 2824, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "contains", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2807, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2824, - "src": "8610:19:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet" - }, - "typeName": { - "contractScope": null, - "id": 2806, - "name": "UintSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2764, - "src": "8610:7:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2809, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2824, - "src": "8631:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2808, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8631:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8609:36:12" - }, - "returnParameters": { - "id": 2813, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2812, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2824, - "src": "8669:4:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2811, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8669:4:12", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8668:6:12" - }, - "scope": 2859, - "src": "8592:144:12", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2837, - "nodeType": "Block", - "src": "8886:43:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2833, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2827, - "src": "8911:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet storage pointer" - } - }, - "id": 2834, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2763, - "src": "8911:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - ], - "id": 2832, - "name": "_length", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2530, - "src": "8903:7:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Set_$2378_storage_ptr_$returns$_t_uint256_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer) view returns (uint256)" - } - }, - "id": 2835, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8903:19:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2831, - "id": 2836, - "nodeType": "Return", - "src": "8896:26:12" - } - ] - }, - "documentation": { - "id": 2825, - "nodeType": "StructuredDocumentation", - "src": "8742:70:12", - "text": " @dev Returns the number of values on the set. O(1)." - }, - "id": 2838, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "length", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2828, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2827, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2838, - "src": "8833:19:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet" - }, - "typeName": { - "contractScope": null, - "id": 2826, - "name": "UintSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2764, - "src": "8833:7:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8832:21:12" - }, - "returnParameters": { - "id": 2831, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2830, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2838, - "src": "8877:7:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2829, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8877:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8876:9:12" - }, - "scope": 2859, - "src": "8817:112:12", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2857, - "nodeType": "Block", - "src": "9341:55:12", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2851, - "name": "set", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2841, - "src": "9370:3:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet storage pointer" - } - }, - "id": 2852, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "_inner", - "nodeType": "MemberAccess", - "referencedDeclaration": 2763, - "src": "9370:10:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - } - }, - { - "argumentTypes": null, - "id": 2853, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2843, - "src": "9382:5:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Set_$2378_storage", - "typeString": "struct EnumerableSetUpgradeable.Set storage ref" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2850, - "name": "_at", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2555, - "src": "9366:3:12", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Set_$2378_storage_ptr_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (struct EnumerableSetUpgradeable.Set storage pointer,uint256) view returns (bytes32)" - } - }, - "id": 2854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9366:22:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2849, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "9358:7:12", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 2848, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9358:7:12", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9358:31:12", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2847, - "id": 2856, - "nodeType": "Return", - "src": "9351:38:12" - } - ] - }, - "documentation": { - "id": 2839, - "nodeType": "StructuredDocumentation", - "src": "8934:322:12", - "text": " @dev Returns the value stored at position `index` in the set. O(1).\n Note that there are no guarantees on the ordering of values inside the\n array, and it may change when more values are added or removed.\n Requirements:\n - `index` must be strictly less than {length}." - }, - "id": 2858, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "at", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2844, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2841, - "mutability": "mutable", - "name": "set", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2858, - "src": "9273:19:12", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet" - }, - "typeName": { - "contractScope": null, - "id": 2840, - "name": "UintSet", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2764, - "src": "9273:7:12", - "typeDescriptions": { - "typeIdentifier": "t_struct$_UintSet_$2764_storage_ptr", - "typeString": "struct EnumerableSetUpgradeable.UintSet" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2843, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2858, - "src": "9294:13:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2842, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9294:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9272:36:12" - }, - "returnParameters": { - "id": 2847, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2846, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2858, - "src": "9332:7:12", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2845, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9332:7:12", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9331:9:12" - }, - "scope": 2859, - "src": "9261:135:12", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 2860, - "src": "753:8645:12" - } - ], - "src": "33:9366:12" - }, - "id": 12 - }, - "src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol": { - "ast": { - "absolutePath": "src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol", - "exportedSymbols": { - "NetEmissionsTokenNetwork": [ - 4276 - ] - }, - "id": 4277, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2861, - "literals": [ - "solidity", - "^", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "39:23:13" - }, - { - "id": 2862, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "63:33:13" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol", - "file": "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol", - "id": 2863, - "nodeType": "ImportDirective", - "scope": 4277, - "sourceUnit": 750, - "src": "98:74:13", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol", - "file": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol", - "id": 2864, - "nodeType": "ImportDirective", - "scope": 4277, - "sourceUnit": 308, - "src": "173:81:13", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol", - "file": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol", - "id": 2865, - "nodeType": "ImportDirective", - "scope": 4277, - "sourceUnit": 1851, - "src": "255:82:13", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol", - "file": "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol", - "id": 2866, - "nodeType": "ImportDirective", - "scope": 4277, - "sourceUnit": 2368, - "src": "338:75:13", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol", - "file": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol", - "id": 2867, - "nodeType": "ImportDirective", - "scope": 4277, - "sourceUnit": 816, - "src": "414:69:13", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2868, - "name": "Initializable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 815, - "src": "522:13:13", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Initializable_$815", - "typeString": "contract Initializable" - } - }, - "id": 2869, - "nodeType": "InheritanceSpecifier", - "src": "522:13:13" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2870, - "name": "ERC1155Upgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1850, - "src": "537:18:13", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155Upgradeable_$1850", - "typeString": "contract ERC1155Upgradeable" - } - }, - "id": 2871, - "nodeType": "InheritanceSpecifier", - "src": "537:18:13" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2872, - "name": "AccessControlUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 307, - "src": "557:24:13", - "typeDescriptions": { - "typeIdentifier": "t_contract$_AccessControlUpgradeable_$307", - "typeString": "contract AccessControlUpgradeable" - } - }, - "id": 2873, - "nodeType": "InheritanceSpecifier", - "src": "557:24:13" - } - ], - "contractDependencies": [ - 307, - 382, - 394, - 815, - 1850, - 1865, - 2028, - 2317 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 4276, - "linearizedBaseContracts": [ - 4276, - 307, - 1850, - 1865, - 2028, - 382, - 394, - 2317, - 815 - ], - "name": "NetEmissionsTokenNetwork", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 2876, - "libraryName": { - "contractScope": null, - "id": 2874, - "name": "SafeMathUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 749, - "src": "595:19:13", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMathUpgradeable_$749", - "typeString": "library SafeMathUpgradeable" - } - }, - "nodeType": "UsingForDirective", - "src": "589:38:13", - "typeName": { - "id": 2875, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "619:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 2879, - "libraryName": { - "contractScope": null, - "id": 2877, - "name": "CountersUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2367, - "src": "638:19:13", - "typeDescriptions": { - "typeIdentifier": "t_contract$_CountersUpgradeable_$2367", - "typeString": "library CountersUpgradeable" - } - }, - "nodeType": "UsingForDirective", - "src": "632:58:13", - "typeName": { - "contractScope": null, - "id": 2878, - "name": "CountersUpgradeable.Counter", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2327, - "src": "662:27:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter" - } - } - }, - { - "constant": false, - "functionSelector": "dba851b0", - "id": 2881, - "mutability": "mutable", - "name": "limitedMode", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "696:23:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2880, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "696:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "f851a440", - "id": 2883, - "mutability": "mutable", - "name": "admin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "813:20:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2882, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "813:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 2885, - "mutability": "mutable", - "name": "timelock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "925:24:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2884, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "925:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": true, - "functionSelector": "18a50d7e", - "id": 2890, - "mutability": "constant", - "name": "REGISTERED_DEALER", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "1103:82:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2886, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1103:7:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "524547495354455245445f4445414c4552", - "id": 2888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1165:19:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3", - "typeString": "literal_string \"REGISTERED_DEALER\"" - }, - "value": "REGISTERED_DEALER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3", - "typeString": "literal_string \"REGISTERED_DEALER\"" - } - ], - "id": 2887, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "1155:9:13", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 2889, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1155:30:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "fcba7948", - "id": 2895, - "mutability": "constant", - "name": "REGISTERED_REC_DEALER", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "1224:90:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2891, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1224:7:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "524547495354455245445f5245435f4445414c4552", - "id": 2893, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1290:23:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860", - "typeString": "literal_string \"REGISTERED_REC_DEALER\"" - }, - "value": "REGISTERED_REC_DEALER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_2ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860", - "typeString": "literal_string \"REGISTERED_REC_DEALER\"" - } - ], - "id": 2892, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "1280:9:13", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 2894, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1280:34:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "1ef68ef7", - "id": 2900, - "mutability": "constant", - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "1320:96:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2896, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1320:7:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "524547495354455245445f4f46465345545f4445414c4552", - "id": 2898, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1389:26:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f", - "typeString": "literal_string \"REGISTERED_OFFSET_DEALER\"" - }, - "value": "REGISTERED_OFFSET_DEALER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f", - "typeString": "literal_string \"REGISTERED_OFFSET_DEALER\"" - } - ], - "id": 2897, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "1379:9:13", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 2899, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1379:37:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "76ce4755", - "id": 2905, - "mutability": "constant", - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "1422:104:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2901, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1422:7:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "524547495354455245445f454d495353494f4e535f41554449544f52", - "id": 2903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1495:30:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12c", - "typeString": "literal_string \"REGISTERED_EMISSIONS_AUDITOR\"" - }, - "value": "REGISTERED_EMISSIONS_AUDITOR" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12c", - "typeString": "literal_string \"REGISTERED_EMISSIONS_AUDITOR\"" - } - ], - "id": 2902, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "1485:9:13", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 2904, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1485:41:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "78e5c592", - "id": 2910, - "mutability": "constant", - "name": "REGISTERED_CONSUMER", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "1553:86:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2906, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1553:7:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "524547495354455245445f434f4e53554d4552", - "id": 2908, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1617:21:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76a", - "typeString": "literal_string \"REGISTERED_CONSUMER\"" - }, - "value": "REGISTERED_CONSUMER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76a", - "typeString": "literal_string \"REGISTERED_CONSUMER\"" - } - ], - "id": 2907, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "1607:9:13", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 2909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1607:32:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "canonicalName": "NetEmissionsTokenNetwork.CarbonTokenDetails", - "id": 2933, - "members": [ - { - "constant": false, - "id": 2912, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2257:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2911, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2257:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2914, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2282:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2913, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2282:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2916, - "mutability": "mutable", - "name": "issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2309:14:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2915, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2309:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2918, - "mutability": "mutable", - "name": "issuee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2333:14:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2917, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2333:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2920, - "mutability": "mutable", - "name": "fromDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2357:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2919, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2357:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2922, - "mutability": "mutable", - "name": "thruDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2383:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2921, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2383:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2924, - "mutability": "mutable", - "name": "dateCreated", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2409:19:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2923, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2409:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2926, - "mutability": "mutable", - "name": "automaticRetireDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2438:27:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2925, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2438:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2928, - "mutability": "mutable", - "name": "metadata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2475:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2927, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2475:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2930, - "mutability": "mutable", - "name": "manifest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2500:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2929, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2500:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2932, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "2525:18:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2931, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2525:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "CarbonTokenDetails", - "nodeType": "StructDefinition", - "scope": 4276, - "src": "2221:329:13", - "visibility": "public" - }, - { - "constant": false, - "id": 2935, - "mutability": "mutable", - "name": "_numOfUniqueTokens", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "2617:54:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter" - }, - "typeName": { - "contractScope": null, - "id": 2934, - "name": "CountersUpgradeable.Counter", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2327, - "src": "2617:27:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2939, - "mutability": "mutable", - "name": "_tokenDetails", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "2721:60:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$2933_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetwork.CarbonTokenDetails)" - }, - "typeName": { - "id": 2938, - "keyType": { - "id": 2936, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2729:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "2721:38:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$2933_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetwork.CarbonTokenDetails)" - }, - "valueType": { - "contractScope": null, - "id": 2937, - "name": "CarbonTokenDetails", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2933, - "src": "2740:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2945, - "mutability": "mutable", - "name": "_retiredBalances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4276, - "src": "2787:72:13", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - }, - "typeName": { - "id": 2944, - "keyType": { - "id": 2940, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2795:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "2787:47:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - }, - "valueType": { - "id": 2943, - "keyType": { - "id": 2941, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2814:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2806:27:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2942, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2825:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 2973, - "name": "TokenCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 2972, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2947, - "indexed": false, - "mutability": "mutable", - "name": "availableBalance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "2908:24:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2946, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2908:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2949, - "indexed": false, - "mutability": "mutable", - "name": "retiredBalance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "2942:22:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2948, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2942:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2951, - "indexed": false, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "2974:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2950, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2974:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2953, - "indexed": false, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "2999:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2952, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2999:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2955, - "indexed": true, - "mutability": "mutable", - "name": "issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "3026:22:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2954, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3026:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2957, - "indexed": true, - "mutability": "mutable", - "name": "issuee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "3058:22:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2956, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3058:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2959, - "indexed": false, - "mutability": "mutable", - "name": "fromDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "3090:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2958, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3090:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2961, - "indexed": false, - "mutability": "mutable", - "name": "thruDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "3116:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2960, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3116:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2963, - "indexed": false, - "mutability": "mutable", - "name": "dateCreated", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "3142:19:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2962, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3142:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2965, - "indexed": false, - "mutability": "mutable", - "name": "automaticRetireDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "3171:27:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2964, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3171:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2967, - "indexed": false, - "mutability": "mutable", - "name": "metadata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "3208:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2966, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3208:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2969, - "indexed": false, - "mutability": "mutable", - "name": "manifest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "3233:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2968, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3233:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2971, - "indexed": false, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2973, - "src": "3258:18:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2970, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3258:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2898:384:13" - }, - "src": "2880:403:13" - }, - { - "anonymous": false, - "documentation": null, - "id": 2981, - "name": "TokenRetired", - "nodeType": "EventDefinition", - "parameters": { - "id": 2980, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2975, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2981, - "src": "3316:23:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2974, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3316:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2977, - "indexed": false, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2981, - "src": "3349:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2976, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3349:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2979, - "indexed": false, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2981, - "src": "3374:14:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2978, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3374:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3306:88:13" - }, - "src": "3288:107:13" - }, - { - "anonymous": false, - "documentation": null, - "id": 2985, - "name": "RegisteredConsumer", - "nodeType": "EventDefinition", - "parameters": { - "id": 2984, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2983, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2985, - "src": "3425:23:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2982, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3425:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3424:25:13" - }, - "src": "3400:50:13" - }, - { - "anonymous": false, - "documentation": null, - "id": 2989, - "name": "UnregisteredConsumer", - "nodeType": "EventDefinition", - "parameters": { - "id": 2988, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2987, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2989, - "src": "3482:23:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2986, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3482:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3481:25:13" - }, - "src": "3455:52:13" - }, - { - "anonymous": false, - "documentation": null, - "id": 2993, - "name": "RegisteredDealer", - "nodeType": "EventDefinition", - "parameters": { - "id": 2992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2991, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2993, - "src": "3535:23:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2990, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3535:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3534:25:13" - }, - "src": "3512:48:13" - }, - { - "anonymous": false, - "documentation": null, - "id": 2997, - "name": "UnregisteredDealer", - "nodeType": "EventDefinition", - "parameters": { - "id": 2996, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2995, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2997, - "src": "3590:23:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2994, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3590:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3589:25:13" - }, - "src": "3565:50:13" - }, - { - "body": { - "id": 3053, - "nodeType": "Block", - "src": "3729:538:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 3005, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3755:2:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "id": 3004, - "name": "__ERC1155_init", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 881, - "src": "3740:14:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory)" - } - }, - "id": 3006, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3740:18:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3007, - "nodeType": "ExpressionStatement", - "src": "3740:18:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3009, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2910, - "src": "3830:19:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3010, - "name": "REGISTERED_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "3851:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 3008, - "name": "_setRoleAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 254, - "src": "3816:13:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 3011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3816:53:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3012, - "nodeType": "ExpressionStatement", - "src": "3816:53:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3014, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "3915:18:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3015, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2999, - "src": "3935:6:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3013, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "3904:10:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 3016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3904:38:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3017, - "nodeType": "ExpressionStatement", - "src": "3904:38:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3019, - "name": "REGISTERED_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "3963:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3020, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2999, - "src": "3982:6:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3018, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "3952:10:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 3021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3952:37:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3022, - "nodeType": "ExpressionStatement", - "src": "3952:37:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3024, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "4010:21:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3025, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2999, - "src": "4033:6:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3023, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "3999:10:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 3026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3999:41:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3027, - "nodeType": "ExpressionStatement", - "src": "3999:41:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3029, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "4061:24:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3030, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2999, - "src": "4087:6:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3028, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "4050:10:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 3031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4050:44:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3032, - "nodeType": "ExpressionStatement", - "src": "4050:44:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3034, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2905, - "src": "4115:28:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3035, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2999, - "src": "4145:6:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3033, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "4104:10:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 3036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4104:48:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3037, - "nodeType": "ExpressionStatement", - "src": "4104:48:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3038, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2883, - "src": "4162:5:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3039, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2999, - "src": "4170:6:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4162:14:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3041, - "nodeType": "ExpressionStatement", - "src": "4162:14:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3042, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2885, - "src": "4209:8:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3045, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4228:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 3044, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4220:7:13", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3043, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4220:7:13", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3046, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4220:10:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "4209:21:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3048, - "nodeType": "ExpressionStatement", - "src": "4209:21:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3049, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2881, - "src": "4241:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 3050, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4255:5:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "4241:19:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3052, - "nodeType": "ExpressionStatement", - "src": "4241:19:13" - } - ] - }, - "documentation": null, - "functionSelector": "c4d66de8", - "id": 3054, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3002, - "modifierName": { - "argumentTypes": null, - "id": 3001, - "name": "initializer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "3717:11:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "3717:11:13" - } - ], - "name": "initialize", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3000, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2999, - "mutability": "mutable", - "name": "_admin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3054, - "src": "3694:14:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2998, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3694:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3693:16:13" - }, - "returnParameters": { - "id": 3003, - "nodeType": "ParameterList", - "parameters": [], - "src": "3729:0:13" - }, - "scope": 4276, - "src": "3674:593:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 3100, - "nodeType": "Block", - "src": "4301:482:13", - "statements": [ - { - "assignments": [ - 3057 - ], - "declarations": [ - { - "constant": false, - "id": 3057, - "mutability": "mutable", - "name": "isConsumer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3100, - "src": "4311:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3056, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4311:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3063, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3059, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2910, - "src": "4337:19:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3060, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4358:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4358:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3058, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4329:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4329:40:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4311:58:13" - }, - { - "assignments": [ - 3065 - ], - "declarations": [ - { - "constant": false, - "id": 3065, - "mutability": "mutable", - "name": "isRecDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3100, - "src": "4379:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3064, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4379:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3071, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3067, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "4406:21:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3068, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4429:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4429:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3066, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4398:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4398:42:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4379:61:13" - }, - { - "assignments": [ - 3073 - ], - "declarations": [ - { - "constant": false, - "id": 3073, - "mutability": "mutable", - "name": "isCeoDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3100, - "src": "4450:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3072, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4450:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3079, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3075, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "4477:24:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3076, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4503:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4503:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3074, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4469:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4469:45:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4450:64:13" - }, - { - "assignments": [ - 3081 - ], - "declarations": [ - { - "constant": false, - "id": 3081, - "mutability": "mutable", - "name": "isAeDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3100, - "src": "4524:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3080, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4524:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3087, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3083, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2905, - "src": "4550:28:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3084, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4580:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4580:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3082, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4542:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4542:49:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4524:67:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3089, - "name": "isConsumer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3057, - "src": "4623:10:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 3090, - "name": "isRecDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3065, - "src": "4637:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4623:25:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 3092, - "name": "isCeoDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3073, - "src": "4652:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4623:40:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 3094, - "name": "isAeDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3081, - "src": "4667:10:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4623:54:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a636f6e73756d65724f724465616c65723a206d73672e73656e646572206e6f74206120636f6e73756d6572206f722061206465616c6572", - "id": 3096, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4691:63:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f18217978c168abee7a7156d17145e0246952f475f3e52a50191a73581bbf047", - "typeString": "literal_string \"CLM8::consumerOrDealer: msg.sender not a consumer or a dealer\"" - }, - "value": "CLM8::consumerOrDealer: msg.sender not a consumer or a dealer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f18217978c168abee7a7156d17145e0246952f475f3e52a50191a73581bbf047", - "typeString": "literal_string \"CLM8::consumerOrDealer: msg.sender not a consumer or a dealer\"" - } - ], - "id": 3088, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4602:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4602:162:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3098, - "nodeType": "ExpressionStatement", - "src": "4602:162:13" - }, - { - "id": 3099, - "nodeType": "PlaceholderStatement", - "src": "4775:1:13" - } - ] - }, - "documentation": null, - "id": 3101, - "name": "consumerOrDealer", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 3055, - "nodeType": "ParameterList", - "parameters": [], - "src": "4298:2:13" - }, - "src": "4273:510:13", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3137, - "nodeType": "Block", - "src": "4811:379:13", - "statements": [ - { - "assignments": [ - 3104 - ], - "declarations": [ - { - "constant": false, - "id": 3104, - "mutability": "mutable", - "name": "isRecDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3137, - "src": "4821:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3103, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4821:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3110, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3106, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "4848:21:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3107, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4871:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4871:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3105, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4840:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4840:42:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4821:61:13" - }, - { - "assignments": [ - 3112 - ], - "declarations": [ - { - "constant": false, - "id": 3112, - "mutability": "mutable", - "name": "isCeoDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3137, - "src": "4892:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3111, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4892:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3118, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3114, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "4919:24:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3115, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4945:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4945:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3113, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4911:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4911:45:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4892:64:13" - }, - { - "assignments": [ - 3120 - ], - "declarations": [ - { - "constant": false, - "id": 3120, - "mutability": "mutable", - "name": "isAeDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3137, - "src": "4966:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3119, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4966:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3126, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3122, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2905, - "src": "4992:28:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3123, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5022:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5022:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3121, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4984:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4984:49:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4966:67:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3130, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3128, - "name": "isRecDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3104, - "src": "5065:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 3129, - "name": "isCeoDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3112, - "src": "5080:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5065:26:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 3131, - "name": "isAeDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3120, - "src": "5095:10:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5065:40:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a6f6e6c794465616c65723a206d73672e73656e646572206e6f742061206465616c6572", - "id": 3133, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5119:43:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0cbef3cc12766f0b1a8193e2b09f47f345b74edd3ce5e7beb0924fa72cb0774f", - "typeString": "literal_string \"CLM8::onlyDealer: msg.sender not a dealer\"" - }, - "value": "CLM8::onlyDealer: msg.sender not a dealer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0cbef3cc12766f0b1a8193e2b09f47f345b74edd3ce5e7beb0924fa72cb0774f", - "typeString": "literal_string \"CLM8::onlyDealer: msg.sender not a dealer\"" - } - ], - "id": 3127, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5044:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3134, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5044:128:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3135, - "nodeType": "ExpressionStatement", - "src": "5044:128:13" - }, - { - "id": 3136, - "nodeType": "PlaceholderStatement", - "src": "5182:1:13" - } - ] - }, - "documentation": null, - "id": 3138, - "name": "onlyDealer", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 3102, - "nodeType": "ParameterList", - "parameters": [], - "src": "4808:2:13" - }, - "src": "4789:401:13", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3150, - "nodeType": "Block", - "src": "5217:155:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3142, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "5256:18:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3143, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5276:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5276:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3141, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5248:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5248:39:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a6f6e6c7941646d696e3a206d73672e73656e646572206e6f74207468652061646d696e", - "id": 3146, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5301:43:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4ba6a4dff6a4b2310f085750099895191b9f81ad83532299ce726e45e26d26f2", - "typeString": "literal_string \"CLM8::onlyAdmin: msg.sender not the admin\"" - }, - "value": "CLM8::onlyAdmin: msg.sender not the admin" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4ba6a4dff6a4b2310f085750099895191b9f81ad83532299ce726e45e26d26f2", - "typeString": "literal_string \"CLM8::onlyAdmin: msg.sender not the admin\"" - } - ], - "id": 3140, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5227:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5227:127:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3148, - "nodeType": "ExpressionStatement", - "src": "5227:127:13" - }, - { - "id": 3149, - "nodeType": "PlaceholderStatement", - "src": "5364:1:13" - } - ] - }, - "documentation": null, - "id": 3151, - "name": "onlyAdmin", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 3139, - "nodeType": "ParameterList", - "parameters": [], - "src": "5214:2:13" - }, - "src": "5196:176:13", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3169, - "nodeType": "Block", - "src": "5507:118:13", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 3159, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2935, - "src": "5521:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 3160, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "current", - "nodeType": "MemberAccess", - "referencedDeclaration": 2338, - "src": "5521:26:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Counter_$2327_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer) view returns (uint256)" - } - }, - "id": 3161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5521:28:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3162, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3154, - "src": "5553:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5521:39:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3166, - "nodeType": "IfStatement", - "src": "5517:56:13", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3164, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5569:4:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3158, - "id": 3165, - "nodeType": "Return", - "src": "5562:11:13" - } - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 3167, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5590:5:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 3158, - "id": 3168, - "nodeType": "Return", - "src": "5583:12:13" - } - ] - }, - "documentation": { - "id": 3152, - "nodeType": "StructuredDocumentation", - "src": "5378:58:13", - "text": " @dev returns true if the tokenId exists" - }, - "id": 3170, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tokenExists", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3155, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3154, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3170, - "src": "5462:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3153, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5462:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5461:17:13" - }, - "returnParameters": { - "id": 3158, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3157, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3170, - "src": "5501:4:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3156, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5501:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5500:6:13" - }, - "scope": 4276, - "src": "5441:184:13", - "stateMutability": "view", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 3193, - "nodeType": "Block", - "src": "5775:142:13", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3178, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3173, - "src": "5790:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3179, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5804:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5790:15:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3181, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5789:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3182, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3173, - "src": "5811:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 3183, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5826:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "5811:16:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3185, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5810:18:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5789:39:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3190, - "nodeType": "IfStatement", - "src": "5785:81:13", - "trueBody": { - "id": 3189, - "nodeType": "Block", - "src": "5830:36:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3187, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5851:4:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3177, - "id": 3188, - "nodeType": "Return", - "src": "5844:11:13" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 3191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5882:5:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 3177, - "id": 3192, - "nodeType": "Return", - "src": "5875:12:13" - } - ] - }, - "documentation": { - "id": 3171, - "nodeType": "StructuredDocumentation", - "src": "5631:64:13", - "text": " @dev returns true if the tokenTypeId is valid" - }, - "id": 3194, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tokenTypeIdIsValid", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3174, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3173, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3194, - "src": "5728:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 3172, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "5728:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5727:19:13" - }, - "returnParameters": { - "id": 3177, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3176, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3194, - "src": "5769:4:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3175, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5769:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5768:6:13" - }, - "scope": 4276, - "src": "5700:217:13", - "stateMutability": "pure", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 3204, - "nodeType": "Block", - "src": "6045:52:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 3200, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2935, - "src": "6062:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 3201, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "current", - "nodeType": "MemberAccess", - "referencedDeclaration": 2338, - "src": "6062:26:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Counter_$2327_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer) view returns (uint256)" - } - }, - "id": 3202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6062:28:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3199, - "id": 3203, - "nodeType": "Return", - "src": "6055:35:13" - } - ] - }, - "documentation": { - "id": 3195, - "nodeType": "StructuredDocumentation", - "src": "5923:55:13", - "text": " @dev returns number of unique tokens" - }, - "functionSelector": "5ddb368f", - "id": 3205, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNumOfUniqueTokens", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3196, - "nodeType": "ParameterList", - "parameters": [], - "src": "6012:2:13" - }, - "returnParameters": { - "id": 3199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3198, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3205, - "src": "6036:7:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6036:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6035:9:13" - }, - "scope": 4276, - "src": "5983:114:13", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 1685 - ], - "body": { - "id": 3295, - "nodeType": "Block", - "src": "6450:1267:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3227, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3208, - "src": "6487:8:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3228, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3210, - "src": "6497:4:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3229, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3212, - "src": "6503:2:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3230, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3215, - "src": "6507:3:13", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 3231, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3218, - "src": "6512:7:13", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 3232, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3220, - "src": "6521:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 3224, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "6460:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 3226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_beforeTokenTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1685, - "src": "6460:26:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" - } - }, - "id": 3233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6460:66:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3234, - "nodeType": "ExpressionStatement", - "src": "6460:66:13" - }, - { - "body": { - "id": 3293, - "nodeType": "Block", - "src": "6575:1136:13", - "statements": [ - { - "assignments": [ - 3247 - ], - "declarations": [ - { - "constant": false, - "id": 3247, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3293, - "src": "6590:32:13", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails" - }, - "typeName": { - "contractScope": null, - "id": 3246, - "name": "CarbonTokenDetails", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2933, - "src": "6590:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3253, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3248, - "name": "_tokenDetails", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2939, - "src": "6625:13:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$2933_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetwork.CarbonTokenDetails storage ref)" - } - }, - "id": 3252, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3249, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3215, - "src": "6639:3:13", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 3251, - "indexExpression": { - "argumentTypes": null, - "id": 3250, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3236, - "src": "6643:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6639:6:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6625:21:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6590:56:13" - }, - { - "condition": { - "argumentTypes": null, - "id": 3254, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2881, - "src": "6724:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3292, - "nodeType": "IfStatement", - "src": "6720:981:13", - "trueBody": { - "id": 3291, - "nodeType": "Block", - "src": "6737:964:13", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3255, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3212, - "src": "6815:2:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6829:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 3257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6821:7:13", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3256, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6821:7:13", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3259, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6821:10:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6815:16:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3263, - "nodeType": "IfStatement", - "src": "6811:71:13", - "trueBody": { - "id": 3262, - "nodeType": "Block", - "src": "6833:49:13", - "statements": [ - { - "id": 3261, - "nodeType": "Continue", - "src": "6855:8:13" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3264, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3247, - "src": "7138:5:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3265, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenTypeId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2914, - "src": "7138:17:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 3266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7159:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "7138:22:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3289, - "nodeType": "Block", - "src": "7428:259:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3283, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2905, - "src": "7491:28:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3284, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3208, - "src": "7521:8:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3282, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "7483:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7483:47:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d69746564293a206f6e6c7920656d697373696f6e732061756469746f72732063616e206973737565206175646974656420656d697373696f6e73", - "id": 3286, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7556:90:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cf130957a8fd04bf2a485999674096bcbb8799778244a790ae33406ca8f6b286", - "typeString": "literal_string \"CLM8::_beforeTokenTransfer(limited): only emissions auditors can issue audited emissions\"" - }, - "value": "CLM8::_beforeTokenTransfer(limited): only emissions auditors can issue audited emissions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cf130957a8fd04bf2a485999674096bcbb8799778244a790ae33406ca8f6b286", - "typeString": "literal_string \"CLM8::_beforeTokenTransfer(limited): only emissions auditors can issue audited emissions\"" - } - ], - "id": 3281, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7450:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7450:218:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3288, - "nodeType": "ExpressionStatement", - "src": "7450:218:13" - } - ] - }, - "id": 3290, - "nodeType": "IfStatement", - "src": "7134:553:13", - "trueBody": { - "id": 3280, - "nodeType": "Block", - "src": "7162:260:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3269, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3208, - "src": "7217:8:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 3270, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2885, - "src": "7229:8:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7217:20:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3273, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "7249:18:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3274, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3208, - "src": "7269:8:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3272, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "7241:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7241:37:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7217:61:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d69746564293a206f6e6c792061646d696e20616e642044414f2063616e207472616e7366657220746f6b656e73", - "id": 3277, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7304:77:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fbcf54f134bb1dbe4d91054139856e19b9909e22a02e86f6f99913c2e29c8b4b", - "typeString": "literal_string \"CLM8::_beforeTokenTransfer(limited): only admin and DAO can transfer tokens\"" - }, - "value": "CLM8::_beforeTokenTransfer(limited): only admin and DAO can transfer tokens" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fbcf54f134bb1dbe4d91054139856e19b9909e22a02e86f6f99913c2e29c8b4b", - "typeString": "literal_string \"CLM8::_beforeTokenTransfer(limited): only admin and DAO can transfer tokens\"" - } - ], - "id": 3268, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7184:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7184:219:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3279, - "nodeType": "ExpressionStatement", - "src": "7184:219:13" - } - ] - } - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3239, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3236, - "src": "6554:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3240, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3215, - "src": "6558:3:13", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 3241, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6558:10:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6554:14:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3294, - "initializationExpression": { - "assignments": [ - 3236 - ], - "declarations": [ - { - "constant": false, - "id": 3236, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3294, - "src": "6542:6:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3235, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6542:4:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3238, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 3237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6551:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6542:10:13" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 3244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6570:3:13", - "subExpression": { - "argumentTypes": null, - "id": 3243, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3236, - "src": "6570:1:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3245, - "nodeType": "ExpressionStatement", - "src": "6570:3:13" - }, - "nodeType": "ForStatement", - "src": "6537:1174:13" - } - ] - }, - "documentation": { - "id": 3206, - "nodeType": "StructuredDocumentation", - "src": "6103:93:13", - "text": " @dev hook to prevent transfers from non-admin account if limitedMode is on" - }, - "id": 3296, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 3222, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "6437:8:13" - }, - "parameters": { - "id": 3221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3208, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3296, - "src": "6240:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6240:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3210, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3296, - "src": "6266:12:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3209, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6266:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3212, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3296, - "src": "6288:10:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3211, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6288:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3215, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3296, - "src": "6308:20:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 3213, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6308:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3214, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6308:9:13", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3218, - "mutability": "mutable", - "name": "amounts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3296, - "src": "6338:24:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 3216, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6338:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3217, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6338:9:13", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3220, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3296, - "src": "6372:17:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 3219, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6372:5:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6230:165:13" - }, - "returnParameters": { - "id": 3223, - "nodeType": "ParameterList", - "parameters": [], - "src": "6450:0:13" - }, - "scope": 4276, - "src": "6201:1516:13", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 3334, - "nodeType": "Block", - "src": "8374:277:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3321, - "name": "issuee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3299, - "src": "8411:6:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3322, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "8431:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8431:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3324, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3301, - "src": "8455:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3325, - "name": "quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3303, - "src": "8480:8:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3326, - "name": "fromDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3305, - "src": "8502:8:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3327, - "name": "thruDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3307, - "src": "8524:8:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3328, - "name": "automaticRetireDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3309, - "src": "8546:19:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3329, - "name": "metadata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3311, - "src": "8579:8:13", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3330, - "name": "manifest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3313, - "src": "8601:8:13", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3331, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3315, - "src": "8623:11:13", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3320, - "name": "_issue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3673, - "src": "8391:6:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,address,uint8,uint256,uint256,uint256,uint256,string memory,string memory,string memory)" - } - }, - "id": 3332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8391:253:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 3319, - "id": 3333, - "nodeType": "Return", - "src": "8384:260:13" - } - ] - }, - "documentation": { - "id": 3297, - "nodeType": "StructuredDocumentation", - "src": "7723:342:13", - "text": " @dev External function to mint an amount of a token\n Only authorized dealer of associated token type can call this function\n @param quantity of the token to mint For ex: if one needs 100 full tokens, the caller\n should set the amount as (100 * 10^4) = 1,000,000 (assuming the token's decimals is set to 4)" - }, - "functionSelector": "fd0c4a9a", - "id": 3335, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3318, - "modifierName": { - "argumentTypes": null, - "id": 3317, - "name": "onlyDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3138, - "src": "8363:10:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8363:10:13" - } - ], - "name": "issue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3316, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3299, - "mutability": "mutable", - "name": "issuee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3335, - "src": "8094:14:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3298, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8094:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3301, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3335, - "src": "8118:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 3300, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "8118:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3303, - "mutability": "mutable", - "name": "quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3335, - "src": "8145:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3302, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8145:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3305, - "mutability": "mutable", - "name": "fromDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3335, - "src": "8171:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3304, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8171:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3307, - "mutability": "mutable", - "name": "thruDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3335, - "src": "8197:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3306, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8197:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3309, - "mutability": "mutable", - "name": "automaticRetireDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3335, - "src": "8223:27:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3308, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8223:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3311, - "mutability": "mutable", - "name": "metadata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3335, - "src": "8260:22:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3310, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "8260:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3313, - "mutability": "mutable", - "name": "manifest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3335, - "src": "8292:22:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3312, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "8292:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3315, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3335, - "src": "8324:25:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3314, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "8324:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8084:271:13" - }, - "returnParameters": { - "id": 3319, - "nodeType": "ParameterList", - "parameters": [], - "src": "8374:0:13" - }, - "scope": 4276, - "src": "8070:581:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 3387, - "nodeType": "Block", - "src": "9210:452:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3360, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9243:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3361, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9243:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 3362, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2885, - "src": "9257:8:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "9243:22:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3364, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "9242:24:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3366, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "9278:18:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3367, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9298:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9298:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3365, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "9270:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9270:39:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "9242:67:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a69737375654f6e426568616c663a2063616c6c206d75737420636f6d652066726f6d2044414f206f722061646d696e", - "id": 3371, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9323:55:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_027980ead4a5293de821ea7b1b725523b071719d3eda93334799af99eb3a6e49", - "typeString": "literal_string \"CLM8::issueOnBehalf: call must come from DAO or admin\"" - }, - "value": "CLM8::issueOnBehalf: call must come from DAO or admin" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_027980ead4a5293de821ea7b1b725523b071719d3eda93334799af99eb3a6e49", - "typeString": "literal_string \"CLM8::issueOnBehalf: call must come from DAO or admin\"" - } - ], - "id": 3359, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "9221:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9221:167:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3373, - "nodeType": "ExpressionStatement", - "src": "9221:167:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3375, - "name": "issuee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3338, - "src": "9426:6:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3376, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3340, - "src": "9446:6:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3377, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3342, - "src": "9466:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3378, - "name": "quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3344, - "src": "9491:8:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3379, - "name": "fromDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3346, - "src": "9513:8:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3380, - "name": "thruDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3348, - "src": "9535:8:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3381, - "name": "automaticRetireDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3350, - "src": "9557:19:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3382, - "name": "metadata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3352, - "src": "9590:8:13", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3383, - "name": "manifest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3354, - "src": "9612:8:13", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 3384, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3356, - "src": "9634:11:13", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 3374, - "name": "_issue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3673, - "src": "9406:6:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,address,uint8,uint256,uint256,uint256,uint256,string memory,string memory,string memory)" - } - }, - "id": 3385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9406:249:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 3358, - "id": 3386, - "nodeType": "Return", - "src": "9399:256:13" - } - ] - }, - "documentation": { - "id": 3336, - "nodeType": "StructuredDocumentation", - "src": "8657:223:13", - "text": " @dev Issue function for DAO (on limited mode) or admin to manually pass issuer\n Must be called from Timelock contract through a successful proposal\n or by admin if limited mode is set to false" - }, - "functionSelector": "f000be98", - "id": 3388, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "issueOnBehalf", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3357, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3338, - "mutability": "mutable", - "name": "issuee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3388, - "src": "8917:14:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3337, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8917:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3340, - "mutability": "mutable", - "name": "issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3388, - "src": "8941:14:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3339, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8941:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3342, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3388, - "src": "8965:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 3341, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "8965:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3344, - "mutability": "mutable", - "name": "quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3388, - "src": "8992:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3343, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8992:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3346, - "mutability": "mutable", - "name": "fromDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3388, - "src": "9018:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3345, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9018:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3348, - "mutability": "mutable", - "name": "thruDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3388, - "src": "9044:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3347, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9044:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3350, - "mutability": "mutable", - "name": "automaticRetireDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3388, - "src": "9070:27:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3349, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9070:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3352, - "mutability": "mutable", - "name": "metadata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3388, - "src": "9107:22:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3351, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9107:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3354, - "mutability": "mutable", - "name": "manifest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3388, - "src": "9139:22:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3353, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9139:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3356, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3388, - "src": "9171:25:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3355, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9171:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8907:295:13" - }, - "returnParameters": { - "id": 3358, - "nodeType": "ParameterList", - "parameters": [], - "src": "9210:0:13" - }, - "scope": 4276, - "src": "8885:777:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 3672, - "nodeType": "Block", - "src": "9998:3367:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3413, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3394, - "src": "10049:12:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3412, - "name": "tokenTypeIdIsValid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3194, - "src": "10030:18:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" - } - }, - "id": 3414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10030:32:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f69737375653a20746f6b656e54797065496420697320696e76616c6964", - "id": 3415, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10076:38:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f86a2181a750c38fe320220bbb09ff4ad0f7ef7e279d4a54d38e0c9a572d55ba", - "typeString": "literal_string \"CLM8::_issue: tokenTypeId is invalid\"" - }, - "value": "CLM8::_issue: tokenTypeId is invalid" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f86a2181a750c38fe320220bbb09ff4ad0f7ef7e279d4a54d38e0c9a572d55ba", - "typeString": "literal_string \"CLM8::_issue: tokenTypeId is invalid\"" - } - ], - "id": 3411, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10009:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10009:115:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3417, - "nodeType": "ExpressionStatement", - "src": "10009:115:13" - }, - { - "condition": { - "argumentTypes": null, - "id": 3418, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2881, - "src": "10139:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3510, - "nodeType": "Block", - "src": "11035:698:13", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3471, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3394, - "src": "11053:12:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 3472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11069:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "11053:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3483, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3394, - "src": "11273:12:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 3484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11289:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "11273:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3495, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3394, - "src": "11499:12:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 3496, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11515:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "11499:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3507, - "nodeType": "IfStatement", - "src": "11495:228:13", - "trueBody": { - "id": 3506, - "nodeType": "Block", - "src": "11518:205:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3500, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2905, - "src": "11573:28:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3501, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3392, - "src": "11603:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3499, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "11565:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11565:46:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f69737375653a20697373756572206e6f742061207265676973746572656420656d697373696f6e732061756469746f72", - "id": 3503, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11633:57:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f6b5a6af0677b6c811ca17f6a49b477ec8466b5d0f1671b5f5bc0c6640e7312", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered emissions auditor\"" - }, - "value": "CLM8::_issue: issuer not a registered emissions auditor" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f6b5a6af0677b6c811ca17f6a49b477ec8466b5d0f1671b5f5bc0c6640e7312", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered emissions auditor\"" - } - ], - "id": 3498, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11536:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11536:172:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3505, - "nodeType": "ExpressionStatement", - "src": "11536:172:13" - } - ] - } - }, - "id": 3508, - "nodeType": "IfStatement", - "src": "11269:454:13", - "trueBody": { - "id": 3494, - "nodeType": "Block", - "src": "11292:197:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3488, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "11347:24:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3489, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3392, - "src": "11373:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3487, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "11339:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11339:42:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f69737375653a20697373756572206e6f7420612072656769737465726564206f6666736574206465616c6572", - "id": 3491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11403:53:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5d62b5bf05e75686f342cac120b4e7404cb69fbea95d1a36e6163029b3098fe9", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered offset dealer\"" - }, - "value": "CLM8::_issue: issuer not a registered offset dealer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5d62b5bf05e75686f342cac120b4e7404cb69fbea95d1a36e6163029b3098fe9", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered offset dealer\"" - } - ], - "id": 3486, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11310:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11310:164:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3493, - "nodeType": "ExpressionStatement", - "src": "11310:164:13" - } - ] - } - }, - "id": 3509, - "nodeType": "IfStatement", - "src": "11049:674:13", - "trueBody": { - "id": 3482, - "nodeType": "Block", - "src": "11072:191:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3476, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "11127:21:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3477, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3392, - "src": "11150:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3475, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "11119:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11119:39:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f69737375653a20697373756572206e6f742061207265676973746572656420524543206465616c6572", - "id": 3479, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11180:50:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e876e83d73ed9a0b11585da7b471981f624aaa4d4555b27dee2e11458f191e1a", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered REC dealer\"" - }, - "value": "CLM8::_issue: issuer not a registered REC dealer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e876e83d73ed9a0b11585da7b471981f624aaa4d4555b27dee2e11458f191e1a", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered REC dealer\"" - } - ], - "id": 3474, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11090:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11090:158:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3481, - "nodeType": "ExpressionStatement", - "src": "11090:158:13" - } - ] - } - } - ] - }, - "id": 3511, - "nodeType": "IfStatement", - "src": "10135:1598:13", - "trueBody": { - "id": 3470, - "nodeType": "Block", - "src": "10152:877:13", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3419, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3394, - "src": "10170:12:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 3420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10186:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "10170:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3422, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3394, - "src": "10191:12:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 3423, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10207:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "10191:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10170:38:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3456, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3394, - "src": "10786:12:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 3457, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10802:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "10786:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3468, - "nodeType": "IfStatement", - "src": "10782:237:13", - "trueBody": { - "id": 3467, - "nodeType": "Block", - "src": "10805:214:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3461, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2905, - "src": "10860:28:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3462, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3392, - "src": "10890:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3460, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "10852:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10852:46:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6973737565286c696d69746564293a20697373756572206e6f742061207265676973746572656420656d697373696f6e732061756469746f72", - "id": 3464, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10920:66:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_dac47969290ef1fde5eac4635120776641215b638200271b6bee6d814ec24796", - "typeString": "literal_string \"CLM8::_issue(limited): issuer not a registered emissions auditor\"" - }, - "value": "CLM8::_issue(limited): issuer not a registered emissions auditor" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_dac47969290ef1fde5eac4635120776641215b638200271b6bee6d814ec24796", - "typeString": "literal_string \"CLM8::_issue(limited): issuer not a registered emissions auditor\"" - } - ], - "id": 3459, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10823:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10823:181:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3466, - "nodeType": "ExpressionStatement", - "src": "10823:181:13" - } - ] - } - }, - "id": 3469, - "nodeType": "IfStatement", - "src": "10166:853:13", - "trueBody": { - "id": 3455, - "nodeType": "Block", - "src": "10211:565:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3430, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3427, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "10258:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10258:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 3429, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2885, - "src": "10272:8:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10258:22:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6973737565286c696d69746564293a206d73672e73656e646572206e6f742074696d656c6f636b", - "id": 3431, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10302:48:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a80146e02a2f237dc272397bcd64f791ea5d857075fd54b52b8e662ccf218633", - "typeString": "literal_string \"CLM8::_issue(limited): msg.sender not timelock\"" - }, - "value": "CLM8::_issue(limited): msg.sender not timelock" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a80146e02a2f237dc272397bcd64f791ea5d857075fd54b52b8e662ccf218633", - "typeString": "literal_string \"CLM8::_issue(limited): msg.sender not timelock\"" - } - ], - "id": 3426, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10229:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10229:139:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3433, - "nodeType": "ExpressionStatement", - "src": "10229:139:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3436, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "10423:18:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3437, - "name": "_issuee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3390, - "src": "10443:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3435, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "10415:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10415:36:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6973737565286c696d69746564293a20697373756565206e6f742061646d696e", - "id": 3439, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10473:41:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_dec8919b6f2b8be5c4a8bab9f20b9bffc284c792e17d615eda815e1f4b2b17fb", - "typeString": "literal_string \"CLM8::_issue(limited): issuee not admin\"" - }, - "value": "CLM8::_issue(limited): issuee not admin" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_dec8919b6f2b8be5c4a8bab9f20b9bffc284c792e17d615eda815e1f4b2b17fb", - "typeString": "literal_string \"CLM8::_issue(limited): issuee not admin\"" - } - ], - "id": 3434, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10386:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10386:146:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3441, - "nodeType": "ExpressionStatement", - "src": "10386:146:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3444, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "10587:21:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3445, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3392, - "src": "10610:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3443, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "10579:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10579:39:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3448, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "10630:24:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3449, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3392, - "src": "10656:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3447, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "10622:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10622:42:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10579:85:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6973737565286c696d69746564293a2070726f706f736572206e6f7420612072656769737465726564206465616c6572", - "id": 3452, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10686:57:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f17c75c3dc24439b1efc1ee8b1f47e47009faf5a181028a200ec10f4bc7b726", - "typeString": "literal_string \"CLM8::_issue(limited): proposer not a registered dealer\"" - }, - "value": "CLM8::_issue(limited): proposer not a registered dealer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6f17c75c3dc24439b1efc1ee8b1f47e47009faf5a181028a200ec10f4bc7b726", - "typeString": "literal_string \"CLM8::_issue(limited): proposer not a registered dealer\"" - } - ], - "id": 3442, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10550:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10550:211:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3454, - "nodeType": "ExpressionStatement", - "src": "10550:211:13" - } - ] - } - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 3512, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2935, - "src": "11781:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 3514, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "increment", - "nodeType": "MemberAccess", - "referencedDeclaration": 2350, - "src": "11781:28:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Counter_$2327_storage_ptr_$returns$__$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer)" - } - }, - "id": 3515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11781:30:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3516, - "nodeType": "ExpressionStatement", - "src": "11781:30:13" - }, - { - "assignments": [ - 3518 - ], - "declarations": [ - { - "constant": false, - "id": 3518, - "mutability": "mutable", - "name": "tokenInfo", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3672, - "src": "11854:36:13", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails" - }, - "typeName": { - "contractScope": null, - "id": 3517, - "name": "CarbonTokenDetails", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2933, - "src": "11854:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3524, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3519, - "name": "_tokenDetails", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2939, - "src": "11893:13:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$2933_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetwork.CarbonTokenDetails storage ref)" - } - }, - "id": 3523, - "indexExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 3520, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2935, - "src": "11907:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 3521, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "current", - "nodeType": "MemberAccess", - "referencedDeclaration": 2338, - "src": "11907:26:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Counter_$2327_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer) view returns (uint256)" - } - }, - "id": 3522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11907:28:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11893:43:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11854:82:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3525, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "11947:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3527, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2912, - "src": "11947:17:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 3528, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2935, - "src": "11967:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 3529, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "current", - "nodeType": "MemberAccess", - "referencedDeclaration": 2338, - "src": "11967:26:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Counter_$2327_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer) view returns (uint256)" - } - }, - "id": 3530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11967:28:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11947:48:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3532, - "nodeType": "ExpressionStatement", - "src": "11947:48:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3533, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12005:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3535, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenTypeId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2914, - "src": "12005:21:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3536, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3394, - "src": "12029:12:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "12005:36:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 3538, - "nodeType": "ExpressionStatement", - "src": "12005:36:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3539, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12051:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3541, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 2918, - "src": "12051:16:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3542, - "name": "_issuee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3390, - "src": "12070:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "12051:26:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3544, - "nodeType": "ExpressionStatement", - "src": "12051:26:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3545, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12087:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3547, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "issuer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2916, - "src": "12087:16:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3548, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3392, - "src": "12106:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "12087:26:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3550, - "nodeType": "ExpressionStatement", - "src": "12087:26:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3551, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12123:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3553, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "fromDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 2920, - "src": "12123:18:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3554, - "name": "_fromDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3398, - "src": "12144:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12123:30:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3556, - "nodeType": "ExpressionStatement", - "src": "12123:30:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3557, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12163:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3559, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "thruDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 2922, - "src": "12163:18:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3560, - "name": "_thruDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3400, - "src": "12184:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12163:30:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3562, - "nodeType": "ExpressionStatement", - "src": "12163:30:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3563, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12203:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3565, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "automaticRetireDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 2926, - "src": "12203:29:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3566, - "name": "_automaticRetireDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3402, - "src": "12235:20:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12203:52:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3568, - "nodeType": "ExpressionStatement", - "src": "12203:52:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3569, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12265:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3571, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "dateCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": 2924, - "src": "12265:21:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3572, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "12289:5:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12289:15:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12265:39:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3575, - "nodeType": "ExpressionStatement", - "src": "12265:39:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3576, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12314:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3578, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "metadata", - "nodeType": "MemberAccess", - "referencedDeclaration": 2928, - "src": "12314:18:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3579, - "name": "_metadata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3404, - "src": "12335:9:13", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "12314:30:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 3581, - "nodeType": "ExpressionStatement", - "src": "12314:30:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3582, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12354:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3584, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "manifest", - "nodeType": "MemberAccess", - "referencedDeclaration": 2930, - "src": "12354:18:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3585, - "name": "_manifest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3406, - "src": "12375:9:13", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "12354:30:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 3587, - "nodeType": "ExpressionStatement", - "src": "12354:30:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3588, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12394:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3590, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "description", - "nodeType": "MemberAccess", - "referencedDeclaration": 2932, - "src": "12394:21:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3591, - "name": "_description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3408, - "src": "12418:12:13", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "12394:36:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 3593, - "nodeType": "ExpressionStatement", - "src": "12394:36:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3597, - "name": "_issuee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3390, - "src": "12453:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 3598, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2935, - "src": "12462:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 3599, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "current", - "nodeType": "MemberAccess", - "referencedDeclaration": 2338, - "src": "12462:26:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Counter_$2327_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer) view returns (uint256)" - } - }, - "id": 3600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12462:28:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3601, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3396, - "src": "12492:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "", - "id": 3602, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12503:2:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 3594, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "12441:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 3596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 1394, - "src": "12441:11:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,uint256,uint256,bytes memory)" - } - }, - "id": 3603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12441:65:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3604, - "nodeType": "ExpressionStatement", - "src": "12441:65:13" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3605, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3394, - "src": "12565:12:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 3606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12581:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "12565:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3638, - "nodeType": "IfStatement", - "src": "12561:245:13", - "trueBody": { - "id": 3637, - "nodeType": "Block", - "src": "12584:222:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3611, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12610:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3612, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 2918, - "src": "12610:16:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3613, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12628:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3614, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2912, - "src": "12628:17:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3615, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3396, - "src": "12647:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3608, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "12598:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 3610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_burn", - "nodeType": "MemberAccess", - "referencedDeclaration": 1571, - "src": "12598:11:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 3616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12598:59:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3617, - "nodeType": "ExpressionStatement", - "src": "12598:59:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3618, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "12671:16:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 3623, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3619, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12688:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3620, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2912, - "src": "12688:17:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12671:35:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3624, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3621, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12707:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3622, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 2918, - "src": "12707:16:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "12671:53:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3633, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3396, - "src": "12785:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3625, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "12727:16:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 3628, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3626, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12744:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3627, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2912, - "src": "12744:17:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12727:35:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3631, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3629, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12763:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3630, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 2918, - "src": "12763:16:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12727:53:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3632, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 576, - "src": "12727:57:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3634, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12727:68:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12671:124:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3636, - "nodeType": "ExpressionStatement", - "src": "12671:124:13" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3640, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3396, - "src": "12905:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3641, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "12928:16:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 3644, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3642, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12945:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3643, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2912, - "src": "12945:17:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12928:35:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3647, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3645, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12964:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3646, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 2918, - "src": "12964:16:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12928:53:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3648, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "12995:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3649, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2912, - "src": "12995:17:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3650, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "13026:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3651, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenTypeId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2914, - "src": "13026:21:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3652, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "13061:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3653, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2916, - "src": "13061:16:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3654, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "13091:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3655, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 2918, - "src": "13091:16:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3656, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "13121:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3657, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 2920, - "src": "13121:18:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3658, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "13153:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3659, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "thruDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 2922, - "src": "13153:18:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3660, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "13185:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3661, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "automaticRetireDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 2926, - "src": "13185:29:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3662, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "13228:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3663, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "dateCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": 2924, - "src": "13228:21:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3664, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "13263:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3665, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "metadata", - "nodeType": "MemberAccess", - "referencedDeclaration": 2928, - "src": "13263:18:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3666, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "13295:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3667, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "manifest", - "nodeType": "MemberAccess", - "referencedDeclaration": 2930, - "src": "13295:18:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3668, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3518, - "src": "13327:9:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3669, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "description", - "nodeType": "MemberAccess", - "referencedDeclaration": 2932, - "src": "13327:21:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - ], - "id": 3639, - "name": "TokenCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2973, - "src": "12879:12:13", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint8_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,uint256,uint8,address,address,uint256,uint256,uint256,uint256,string memory,string memory,string memory)" - } - }, - "id": 3670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12879:479:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3671, - "nodeType": "EmitStatement", - "src": "12874:484:13" - } - ] - }, - "documentation": null, - "id": 3673, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_issue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3409, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3390, - "mutability": "mutable", - "name": "_issuee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3673, - "src": "9693:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3389, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9693:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3392, - "mutability": "mutable", - "name": "_issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3673, - "src": "9718:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3391, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9718:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3394, - "mutability": "mutable", - "name": "_tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3673, - "src": "9743:18:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 3393, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "9743:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3396, - "mutability": "mutable", - "name": "_quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3673, - "src": "9771:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3395, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9771:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3398, - "mutability": "mutable", - "name": "_fromDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3673, - "src": "9798:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3397, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9798:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3400, - "mutability": "mutable", - "name": "_thruDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3673, - "src": "9825:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3399, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9825:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3402, - "mutability": "mutable", - "name": "_automaticRetireDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3673, - "src": "9852:28:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3401, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9852:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3404, - "mutability": "mutable", - "name": "_metadata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3673, - "src": "9890:23:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3403, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9890:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3406, - "mutability": "mutable", - "name": "_manifest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3673, - "src": "9923:23:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3405, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9923:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3408, - "mutability": "mutable", - "name": "_description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3673, - "src": "9956:26:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3407, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9956:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9683:305:13" - }, - "returnParameters": { - "id": 3410, - "nodeType": "ParameterList", - "parameters": [], - "src": "9998:0:13" - }, - "scope": 4276, - "src": "9668:3697:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3707, - "nodeType": "Block", - "src": "13650:217:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3687, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3678, - "src": "13680:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3686, - "name": "tokenExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3170, - "src": "13668:11:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 3688, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13668:20:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a6d696e743a20746f6b656e496420646f6573206e6f74206578697374", - "id": 3689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13690:36:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3175692cba4a63612bbc69d4e8d0afd91c83d20cccc2c52b6f3b4f13e2f04c22", - "typeString": "literal_string \"CLM8::mint: tokenId does not exist\"" - }, - "value": "CLM8::mint: tokenId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3175692cba4a63612bbc69d4e8d0afd91c83d20cccc2c52b6f3b4f13e2f04c22", - "typeString": "literal_string \"CLM8::mint: tokenId does not exist\"" - } - ], - "id": 3685, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "13660:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13660:67:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3691, - "nodeType": "ExpressionStatement", - "src": "13660:67:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "13745:12:13", - "subExpression": { - "argumentTypes": null, - "id": 3693, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2881, - "src": "13746:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a6d696e743a2063616e6e6f74206d696e74206e657720746f6b656e7320696e206c696d69746564206d6f6465", - "id": 3695, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13759:52:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d22f1b3de4758a72f18b8058f35911d89440d461da96e267acf4260761c5e2f", - "typeString": "literal_string \"CLM8::mint: cannot mint new tokens in limited mode\"" - }, - "value": "CLM8::mint: cannot mint new tokens in limited mode" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d22f1b3de4758a72f18b8058f35911d89440d461da96e267acf4260761c5e2f", - "typeString": "literal_string \"CLM8::mint: cannot mint new tokens in limited mode\"" - } - ], - "id": 3692, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "13737:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3696, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13737:75:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3697, - "nodeType": "ExpressionStatement", - "src": "13737:75:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3701, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3676, - "src": "13834:2:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3702, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3678, - "src": "13838:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3703, - "name": "quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3680, - "src": "13847:8:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "", - "id": 3704, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13857:2:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 3698, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "13822:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 3700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 1394, - "src": "13822:11:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,uint256,uint256,bytes memory)" - } - }, - "id": 3705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13822:38:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3706, - "nodeType": "ExpressionStatement", - "src": "13822:38:13" - } - ] - }, - "documentation": { - "id": 3674, - "nodeType": "StructuredDocumentation", - "src": "13371:174:13", - "text": " @dev mints more of an existing token\n @param to reciepient of token\n @param tokenId token to mint more of\n @param quantity amount to mint" - }, - "functionSelector": "156e29f6", - "id": 3708, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3683, - "modifierName": { - "argumentTypes": null, - "id": 3682, - "name": "onlyAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3151, - "src": "13636:9:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "13636:9:13" - } - ], - "name": "mint", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3681, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3676, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3708, - "src": "13564:10:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3675, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13564:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3678, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3708, - "src": "13576:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3677, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13576:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3680, - "mutability": "mutable", - "name": "quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3708, - "src": "13593:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3679, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13593:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13563:47:13" - }, - "returnParameters": { - "id": 3684, - "nodeType": "ParameterList", - "parameters": [], - "src": "13650:0:13" - }, - "scope": 4276, - "src": "13550:317:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 3747, - "nodeType": "Block", - "src": "14104:387:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3718, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3711, - "src": "14134:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3717, - "name": "tokenExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3170, - "src": "14122:11:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 3719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14122:20:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a676574546f6b656e547970653a20746f6b656e496420646f6573206e6f74206578697374", - "id": 3720, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14144:44:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_49a5e514b0667a7de3141e112d061888a3cef41b47c200bbafb41e729cf72961", - "typeString": "literal_string \"CLM8::getTokenType: tokenId does not exist\"" - }, - "value": "CLM8::getTokenType: tokenId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_49a5e514b0667a7de3141e112d061888a3cef41b47c200bbafb41e729cf72961", - "typeString": "literal_string \"CLM8::getTokenType: tokenId does not exist\"" - } - ], - "id": 3716, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14114:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3721, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14114:75:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3722, - "nodeType": "ExpressionStatement", - "src": "14114:75:13" - }, - { - "assignments": [ - 3724 - ], - "declarations": [ - { - "constant": false, - "id": 3724, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3747, - "src": "14199:32:13", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails" - }, - "typeName": { - "contractScope": null, - "id": 3723, - "name": "CarbonTokenDetails", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2933, - "src": "14199:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3728, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3725, - "name": "_tokenDetails", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2939, - "src": "14234:13:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$2933_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetwork.CarbonTokenDetails storage ref)" - } - }, - "id": 3727, - "indexExpression": { - "argumentTypes": null, - "id": 3726, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3711, - "src": "14248:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14234:22:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14199:57:13" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3732, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3729, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3724, - "src": "14271:5:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3730, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenTypeId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2914, - "src": "14271:17:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 3731, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14292:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "14271:22:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3736, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3724, - "src": "14367:5:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage pointer" - } - }, - "id": 3737, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenTypeId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2914, - "src": "14367:17:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 3738, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14388:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "14367:22:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3743, - "nodeType": "IfStatement", - "src": "14363:85:13", - "trueBody": { - "id": 3742, - "nodeType": "Block", - "src": "14391:57:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "436172626f6e20456d697373696f6e73204f6666736574", - "id": 3740, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14412:25:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4341f867864cabd004f45b09af8d0716f81939d42b6488ac4d53c7be4375f2c8", - "typeString": "literal_string \"Carbon Emissions Offset\"" - }, - "value": "Carbon Emissions Offset" - }, - "functionReturnParameters": 3715, - "id": 3741, - "nodeType": "Return", - "src": "14405:32:13" - } - ] - } - }, - "id": 3744, - "nodeType": "IfStatement", - "src": "14267:181:13", - "trueBody": { - "id": 3735, - "nodeType": "Block", - "src": "14295:62:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "52656e657761626c6520456e65726779204365727469666963617465", - "id": 3733, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14316:30:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_491ffda04c2fd3af4764451485fdf42eea413d5592b658373c8490f938ee7eaf", - "typeString": "literal_string \"Renewable Energy Certificate\"" - }, - "value": "Renewable Energy Certificate" - }, - "functionReturnParameters": 3715, - "id": 3734, - "nodeType": "Return", - "src": "14309:37:13" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "4175646974656420456d697373696f6e73", - "id": 3745, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14464:19:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_046f3c60b998876753271db8209fbb3f30fc328b5a52d84872c0f1bfc6a7cd27", - "typeString": "literal_string \"Audited Emissions\"" - }, - "value": "Audited Emissions" - }, - "functionReturnParameters": 3715, - "id": 3746, - "nodeType": "Return", - "src": "14457:26:13" - } - ] - }, - "documentation": { - "id": 3709, - "nodeType": "StructuredDocumentation", - "src": "13873:121:13", - "text": " @dev returns the token name for the given token as a string value\n @param tokenId token to check" - }, - "functionSelector": "76aed2e1", - "id": 3748, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTokenType", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3712, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3711, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3748, - "src": "14021:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3710, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14021:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14020:17:13" - }, - "returnParameters": { - "id": 3715, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3714, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3748, - "src": "14085:13:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3713, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14085:6:13", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14084:15:13" - }, - "scope": 4276, - "src": "13999:492:13", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 3775, - "nodeType": "Block", - "src": "14723:185:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3760, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3753, - "src": "14753:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3759, - "name": "tokenExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3170, - "src": "14741:11:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 3761, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14741:20:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a676574546f6b656e52657469726564416d6f756e743a20746f6b656e496420646f6573206e6f74206578697374", - "id": 3762, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14763:53:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_be6225fb118e0cf17287ed8c59a07d446aeb37b4d3d019f824bfa04f1c30594e", - "typeString": "literal_string \"CLM8::getTokenRetiredAmount: tokenId does not exist\"" - }, - "value": "CLM8::getTokenRetiredAmount: tokenId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_be6225fb118e0cf17287ed8c59a07d446aeb37b4d3d019f824bfa04f1c30594e", - "typeString": "literal_string \"CLM8::getTokenRetiredAmount: tokenId does not exist\"" - } - ], - "id": 3758, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14733:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14733:84:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3764, - "nodeType": "ExpressionStatement", - "src": "14733:84:13" - }, - { - "assignments": [ - 3766 - ], - "declarations": [ - { - "constant": false, - "id": 3766, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3775, - "src": "14827:14:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3765, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14827:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3772, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3767, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "14844:16:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 3769, - "indexExpression": { - "argumentTypes": null, - "id": 3768, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3753, - "src": "14861:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14844:25:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3771, - "indexExpression": { - "argumentTypes": null, - "id": 3770, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3751, - "src": "14870:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14844:34:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14827:51:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3773, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3766, - "src": "14895:6:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3757, - "id": 3774, - "nodeType": "Return", - "src": "14888:13:13" - } - ] - }, - "documentation": { - "id": 3749, - "nodeType": "StructuredDocumentation", - "src": "14497:98:13", - "text": " @dev returns the retired amount on a token\n @param tokenId token to check" - }, - "functionSelector": "a0d975a7", - "id": 3776, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTokenRetiredAmount", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3754, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3751, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3776, - "src": "14631:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3750, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14631:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3753, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3776, - "src": "14648:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3752, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14648:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14630:34:13" - }, - "returnParameters": { - "id": 3757, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3756, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3776, - "src": "14710:7:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3755, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14710:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14709:9:13" - }, - "scope": 4276, - "src": "14600:308:13", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 3839, - "nodeType": "Block", - "src": "15218:463:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3788, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3779, - "src": "15248:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3787, - "name": "tokenExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3170, - "src": "15236:11:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 3789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15236:20:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a7265746972653a20746f6b656e496420646f6573206e6f74206578697374", - "id": 3790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15258:38:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30333e2bb7e8c03e06cef8c0f23d8a2a0fd4c4ea5501e1930071fdc19db4a6af", - "typeString": "literal_string \"CLM8::retire: tokenId does not exist\"" - }, - "value": "CLM8::retire: tokenId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30333e2bb7e8c03e06cef8c0f23d8a2a0fd4c4ea5501e1930071fdc19db4a6af", - "typeString": "literal_string \"CLM8::retire: tokenId does not exist\"" - } - ], - "id": 3786, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15228:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15228:69:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3792, - "nodeType": "ExpressionStatement", - "src": "15228:69:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3794, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3781, - "src": "15317:6:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3797, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15343:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15343:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3799, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3779, - "src": "15355:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3795, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "15327:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 3796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 941, - "src": "15327:15:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view returns (uint256)" - } - }, - "id": 3800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15327:36:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15317:46:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3802, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15316:48:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a7265746972653a206e6f7420656e6f75676820617661696c61626c652062616c616e636520746f20726574697265", - "id": 3803, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15366:54:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_66357a6d5ff716e85ee4923532add7e7faea2fe8c0ef0a64e2e97c29c925efd2", - "typeString": "literal_string \"CLM8::retire: not enough available balance to retire\"" - }, - "value": "CLM8::retire: not enough available balance to retire" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_66357a6d5ff716e85ee4923532add7e7faea2fe8c0ef0a64e2e97c29c925efd2", - "typeString": "literal_string \"CLM8::retire: not enough available balance to retire\"" - } - ], - "id": 3793, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15307:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15307:115:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3805, - "nodeType": "ExpressionStatement", - "src": "15307:115:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3809, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15445:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15445:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3811, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3779, - "src": "15457:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3812, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3781, - "src": "15466:6:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3806, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "15433:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 3808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_burn", - "nodeType": "MemberAccess", - "referencedDeclaration": 1571, - "src": "15433:11:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 3813, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15433:40:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3814, - "nodeType": "ExpressionStatement", - "src": "15433:40:13" - }, - { - "expression": { - "argumentTypes": null, - "id": 3830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3815, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "15483:16:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 3819, - "indexExpression": { - "argumentTypes": null, - "id": 3816, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3779, - "src": "15500:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15483:25:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3820, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3817, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15509:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15509:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "15483:37:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3828, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3781, - "src": "15565:6:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3821, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "15523:16:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 3823, - "indexExpression": { - "argumentTypes": null, - "id": 3822, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3779, - "src": "15540:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15523:25:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3826, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3824, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15549:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15549:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15523:37:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 576, - "src": "15523:41:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15523:49:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15483:89:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3831, - "nodeType": "ExpressionStatement", - "src": "15483:89:13" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3833, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15613:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3834, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15613:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3835, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3779, - "src": "15637:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3836, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3781, - "src": "15658:6:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3832, - "name": "TokenRetired", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2981, - "src": "15587:12:13", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 3837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15587:87:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3838, - "nodeType": "EmitStatement", - "src": "15582:92:13" - } - ] - }, - "documentation": { - "id": 3777, - "nodeType": "StructuredDocumentation", - "src": "14914:202:13", - "text": " @dev sets the token to the retire state to disable transfers, mints and burns\n @param tokenId token to set in pause state\n Only contract owner can pause or resume tokens" - }, - "functionSelector": "293a7f2e", - "id": 3840, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3784, - "modifierName": { - "argumentTypes": null, - "id": 3783, - "name": "consumerOrDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3101, - "src": "15201:16:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "15201:16:13" - } - ], - "name": "retire", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3782, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3779, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3840, - "src": "15146:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3778, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15146:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3781, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3840, - "src": "15171:14:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3780, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15171:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15136:55:13" - }, - "returnParameters": { - "id": 3785, - "nodeType": "ParameterList", - "parameters": [], - "src": "15218:0:13" - }, - "scope": 4276, - "src": "15121:560:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 3879, - "nodeType": "Block", - "src": "15878:309:13", - "statements": [ - { - "assignments": [ - 3849 - ], - "declarations": [ - { - "constant": false, - "id": 3849, - "mutability": "mutable", - "name": "isRecDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3879, - "src": "15888:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3848, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15888:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3854, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3851, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "15915:21:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3852, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3843, - "src": "15938:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3850, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "15907:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15907:39:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15888:58:13" - }, - { - "assignments": [ - 3856 - ], - "declarations": [ - { - "constant": false, - "id": 3856, - "mutability": "mutable", - "name": "isCeoDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3879, - "src": "15956:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3855, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15956:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3861, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3858, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "15983:24:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3859, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3843, - "src": "16009:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3857, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "15975:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15975:42:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "15956:61:13" - }, - { - "assignments": [ - 3863 - ], - "declarations": [ - { - "constant": false, - "id": 3863, - "mutability": "mutable", - "name": "isAeDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3879, - "src": "16027:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3862, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16027:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3868, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3865, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2905, - "src": "16053:28:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3866, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3843, - "src": "16083:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3864, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "16045:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16045:46:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16027:64:13" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3873, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3871, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3869, - "name": "isRecDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3849, - "src": "16105:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 3870, - "name": "isCeoDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3856, - "src": "16120:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "16105:26:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 3872, - "name": "isAeDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3863, - "src": "16135:10:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "16105:40:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3876, - "nodeType": "IfStatement", - "src": "16101:57:13", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3874, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16154:4:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3847, - "id": 3875, - "nodeType": "Return", - "src": "16147:11:13" - } - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 3877, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16175:5:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 3847, - "id": 3878, - "nodeType": "Return", - "src": "16168:12:13" - } - ] - }, - "documentation": { - "id": 3841, - "nodeType": "StructuredDocumentation", - "src": "15687:114:13", - "text": " @dev returns true if Dealer's account is registered\n @param account address of the dealer" - }, - "functionSelector": "69f7ef44", - "id": 3880, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isDealerRegistered", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3844, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3843, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3880, - "src": "15834:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3842, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15834:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15833:17:13" - }, - "returnParameters": { - "id": 3847, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3846, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3880, - "src": "15872:4:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15872:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15871:6:13" - }, - "scope": 4276, - "src": "15806:381:13", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 3893, - "nodeType": "Block", - "src": "16389:61:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3889, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2910, - "src": "16414:19:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3890, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3883, - "src": "16435:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3888, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "16406:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16406:37:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3887, - "id": 3892, - "nodeType": "Return", - "src": "16399:44:13" - } - ] - }, - "documentation": { - "id": 3881, - "nodeType": "StructuredDocumentation", - "src": "16193:117:13", - "text": " @dev returns true if Consumers's account is registered\n @param account address of the dealer" - }, - "functionSelector": "33781a0e", - "id": 3894, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isConsumerRegistered", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3884, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3883, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3894, - "src": "16345:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3882, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16345:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16344:17:13" - }, - "returnParameters": { - "id": 3887, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3886, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3894, - "src": "16383:4:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3885, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16383:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16382:6:13" - }, - "scope": 4276, - "src": "16315:135:13", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 3911, - "nodeType": "Block", - "src": "16672:86:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3903, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3897, - "src": "16709:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3902, - "name": "isDealerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3880, - "src": "16690:18:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 3904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16690:27:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3906, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3897, - "src": "16742:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3905, - "name": "isConsumerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3894, - "src": "16721:20:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 3907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16721:29:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "16690:60:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3909, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "16689:62:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3901, - "id": 3910, - "nodeType": "Return", - "src": "16682:69:13" - } - ] - }, - "documentation": { - "id": 3895, - "nodeType": "StructuredDocumentation", - "src": "16456:138:13", - "text": " @dev returns true if Consumers's or Dealer's account is registered\n @param account address of the consumer/dealer" - }, - "id": 3912, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isDealerOrConsumer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3898, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3897, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3912, - "src": "16627:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3896, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16627:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16626:17:13" - }, - "returnParameters": { - "id": 3901, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3900, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3912, - "src": "16666:4:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3899, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16666:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16665:6:13" - }, - "scope": 4276, - "src": "16599:159:13", - "stateMutability": "view", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 3970, - "nodeType": "Block", - "src": "16989:422:13", - "statements": [ - { - "assignments": [ - 3929 - ], - "declarations": [ - { - "constant": false, - "id": 3929, - "mutability": "mutable", - "name": "isAdmin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3970, - "src": "16999:12:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3928, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16999:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3934, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3931, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "17022:18:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3932, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3915, - "src": "17042:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3930, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "17014:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17014:36:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16999:51:13" - }, - { - "assignments": [ - 3936 - ], - "declarations": [ - { - "constant": false, - "id": 3936, - "mutability": "mutable", - "name": "isRecDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3970, - "src": "17060:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3935, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17060:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3941, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3938, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "17087:21:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3939, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3915, - "src": "17110:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3937, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "17079:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17079:39:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17060:58:13" - }, - { - "assignments": [ - 3943 - ], - "declarations": [ - { - "constant": false, - "id": 3943, - "mutability": "mutable", - "name": "isCeoDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3970, - "src": "17128:16:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3942, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17128:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3948, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3945, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "17155:24:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3946, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3915, - "src": "17181:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3944, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "17147:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17147:42:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17128:61:13" - }, - { - "assignments": [ - 3950 - ], - "declarations": [ - { - "constant": false, - "id": 3950, - "mutability": "mutable", - "name": "isAeDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3970, - "src": "17199:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3949, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17199:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3955, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3952, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2905, - "src": "17225:28:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3953, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3915, - "src": "17255:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3951, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "17217:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17217:46:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17199:64:13" - }, - { - "assignments": [ - 3957 - ], - "declarations": [ - { - "constant": false, - "id": 3957, - "mutability": "mutable", - "name": "isConsumer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3970, - "src": "17273:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3956, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17273:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3962, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3959, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2910, - "src": "17299:19:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3960, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3915, - "src": "17320:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3958, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "17291:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 3961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17291:37:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17273:55:13" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 3963, - "name": "isAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3929, - "src": "17346:7:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 3964, - "name": "isRecDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3936, - "src": "17355:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 3965, - "name": "isCeoDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3943, - "src": "17368:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 3966, - "name": "isAeDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3950, - "src": "17381:10:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 3967, - "name": "isConsumer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3957, - "src": "17393:10:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 3968, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17345:59:13", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bool_$_t_bool_$_t_bool_$_t_bool_$", - "typeString": "tuple(bool,bool,bool,bool,bool)" - } - }, - "functionReturnParameters": 3927, - "id": 3969, - "nodeType": "Return", - "src": "17338:66:13" - } - ] - }, - "documentation": { - "id": 3913, - "nodeType": "StructuredDocumentation", - "src": "16764:132:13", - "text": " @dev Helper function for returning tuple of bools of role membership\n @param account address to check roles" - }, - "functionSelector": "ce6ccfaf", - "id": 3971, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getRoles", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3916, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3915, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3971, - "src": "16919:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3914, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16919:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16918:17:13" - }, - "returnParameters": { - "id": 3927, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3918, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3971, - "src": "16959:4:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3917, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16959:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3920, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3971, - "src": "16965:4:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3919, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16965:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3922, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3971, - "src": "16971:4:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3921, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16971:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3924, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3971, - "src": "16977:4:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3923, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16977:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3926, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3971, - "src": "16983:4:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3925, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16983:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16958:30:13" - }, - "scope": 4276, - "src": "16901:510:13", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 4023, - "nodeType": "Block", - "src": "17692:551:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3983, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3976, - "src": "17729:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3982, - "name": "tokenTypeIdIsValid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3194, - "src": "17710:18:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" - } - }, - "id": 3984, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17710:31:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a72656769737465724465616c65723a20746f6b656e54797065496420646f6573206e6f74206578697374", - "id": 3985, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17743:50:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92b1859612b02a849bff381ce7b554688df61f88537490eb94438ad196998472", - "typeString": "literal_string \"CLM8::registerDealer: tokenTypeId does not exist\"" - }, - "value": "CLM8::registerDealer: tokenTypeId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92b1859612b02a849bff381ce7b554688df61f88537490eb94438ad196998472", - "typeString": "literal_string \"CLM8::registerDealer: tokenTypeId does not exist\"" - } - ], - "id": 3981, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "17702:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17702:92:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3987, - "nodeType": "ExpressionStatement", - "src": "17702:92:13" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3988, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3976, - "src": "17808:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 3989, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17823:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "17808:16:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 3999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3997, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3976, - "src": "17902:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 3998, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17917:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "17902:16:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 4011, - "nodeType": "Block", - "src": "17995:73:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4007, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2905, - "src": "18019:28:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4008, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3974, - "src": "18049:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4006, - "name": "grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "18009:9:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18009:48:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4010, - "nodeType": "ExpressionStatement", - "src": "18009:48:13" - } - ] - }, - "id": 4012, - "nodeType": "IfStatement", - "src": "17898:170:13", - "trueBody": { - "id": 4005, - "nodeType": "Block", - "src": "17920:69:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4001, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "17944:24:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4002, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3974, - "src": "17970:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4000, - "name": "grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "17934:9:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17934:44:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4004, - "nodeType": "ExpressionStatement", - "src": "17934:44:13" - } - ] - } - }, - "id": 4013, - "nodeType": "IfStatement", - "src": "17804:264:13", - "trueBody": { - "id": 3996, - "nodeType": "Block", - "src": "17826:66:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3992, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "17850:21:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 3993, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3974, - "src": "17873:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3991, - "name": "grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "17840:9:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 3994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17840:41:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3995, - "nodeType": "ExpressionStatement", - "src": "17840:41:13" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4015, - "name": "REGISTERED_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "18169:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4016, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3974, - "src": "18188:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4014, - "name": "grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "18159:9:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18159:37:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4018, - "nodeType": "ExpressionStatement", - "src": "18159:37:13" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4020, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3974, - "src": "18228:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4019, - "name": "RegisteredDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2993, - "src": "18211:16:13", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 4021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18211:25:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4022, - "nodeType": "EmitStatement", - "src": "18206:30:13" - } - ] - }, - "documentation": { - "id": 3972, - "nodeType": "StructuredDocumentation", - "src": "17417:171:13", - "text": " @dev Only contract owner can register Dealers\n @param account address of the dealer to register\n Only registered Dealers can transfer tokens" - }, - "functionSelector": "31aa4b20", - "id": 4024, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3979, - "modifierName": { - "argumentTypes": null, - "id": 3978, - "name": "onlyAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3151, - "src": "17678:9:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "17678:9:13" - } - ], - "name": "registerDealer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3977, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3974, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4024, - "src": "17617:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3973, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17617:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3976, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4024, - "src": "17634:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 3975, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "17634:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17616:36:13" - }, - "returnParameters": { - "id": 3980, - "nodeType": "ParameterList", - "parameters": [], - "src": "17692:0:13" - }, - "scope": 4276, - "src": "17593:650:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 4053, - "nodeType": "Block", - "src": "18455:267:13", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 4032, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2881, - "src": "18469:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4043, - "nodeType": "IfStatement", - "src": "18465:160:13", - "trueBody": { - "id": 4042, - "nodeType": "Block", - "src": "18482:143:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4035, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "18512:18:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4036, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "18532:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18532:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4034, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "18504:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4038, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18504:39:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a7265676973746572436f6e73756d6572286c696d69746564293a206f6e6c792061646d696e2063616e20726567697374657220636f6e73756d657273", - "id": 4039, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18545:68:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9d012b03913dbafdeab06dc3cff55382e05ba1613866529ad1c56101814d92ad", - "typeString": "literal_string \"CLM8::registerConsumer(limited): only admin can register consumers\"" - }, - "value": "CLM8::registerConsumer(limited): only admin can register consumers" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9d012b03913dbafdeab06dc3cff55382e05ba1613866529ad1c56101814d92ad", - "typeString": "literal_string \"CLM8::registerConsumer(limited): only admin can register consumers\"" - } - ], - "id": 4033, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "18496:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18496:118:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4041, - "nodeType": "ExpressionStatement", - "src": "18496:118:13" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4045, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2910, - "src": "18644:19:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4046, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4027, - "src": "18665:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4044, - "name": "grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "18634:9:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18634:39:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4048, - "nodeType": "ExpressionStatement", - "src": "18634:39:13" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4050, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4027, - "src": "18707:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4049, - "name": "RegisteredConsumer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2985, - "src": "18688:18:13", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 4051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18688:27:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4052, - "nodeType": "EmitStatement", - "src": "18683:32:13" - } - ] - }, - "documentation": { - "id": 4025, - "nodeType": "StructuredDocumentation", - "src": "18249:138:13", - "text": " @dev returns true if Consumer's account is registered for the given token\n @param account address of the consumer" - }, - "functionSelector": "44b22fdd", - "id": 4054, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4030, - "modifierName": { - "argumentTypes": null, - "id": 4029, - "name": "onlyDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3138, - "src": "18444:10:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "18444:10:13" - } - ], - "name": "registerConsumer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4028, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4027, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4054, - "src": "18418:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4026, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18418:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18417:17:13" - }, - "returnParameters": { - "id": 4031, - "nodeType": "ParameterList", - "parameters": [], - "src": "18455:0:13" - }, - "scope": 4276, - "src": "18392:330:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 4118, - "nodeType": "Block", - "src": "18949:634:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4066, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4059, - "src": "18986:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 4065, - "name": "tokenTypeIdIsValid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3194, - "src": "18967:18:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" - } - }, - "id": 4067, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18967:31:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a756e72656769737465724465616c65723a20746f6b656e54797065496420646f6573206e6f74206578697374", - "id": 4068, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19000:52:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_38d15fd88f252be12a6e97f72dde57126777ac3dd32b0e40c44a34ba9f2d12f3", - "typeString": "literal_string \"CLM8::unregisterDealer: tokenTypeId does not exist\"" - }, - "value": "CLM8::unregisterDealer: tokenTypeId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_38d15fd88f252be12a6e97f72dde57126777ac3dd32b0e40c44a34ba9f2d12f3", - "typeString": "literal_string \"CLM8::unregisterDealer: tokenTypeId does not exist\"" - } - ], - "id": 4064, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "18959:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18959:94:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4070, - "nodeType": "ExpressionStatement", - "src": "18959:94:13" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4073, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4071, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4059, - "src": "19067:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 4072, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19082:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "19067:16:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4082, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4059, - "src": "19168:11:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4083, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19183:1:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "19168:16:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 4100, - "nodeType": "Block", - "src": "19268:80:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4096, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2905, - "src": "19299:28:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4097, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4057, - "src": "19329:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4093, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "19282:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 4095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "revokeRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 193, - "src": "19282:16:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19282:55:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4099, - "nodeType": "ExpressionStatement", - "src": "19282:55:13" - } - ] - }, - "id": 4101, - "nodeType": "IfStatement", - "src": "19164:184:13", - "trueBody": { - "id": 4092, - "nodeType": "Block", - "src": "19186:76:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4088, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2900, - "src": "19217:24:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4089, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4057, - "src": "19243:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4085, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "19200:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 4087, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "revokeRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 193, - "src": "19200:16:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19200:51:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4091, - "nodeType": "ExpressionStatement", - "src": "19200:51:13" - } - ] - } - }, - "id": 4102, - "nodeType": "IfStatement", - "src": "19063:285:13", - "trueBody": { - "id": 4081, - "nodeType": "Block", - "src": "19085:73:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4077, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2895, - "src": "19116:21:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4078, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4057, - "src": "19139:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4074, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "19099:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 4076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "revokeRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 193, - "src": "19099:16:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4079, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19099:48:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4080, - "nodeType": "ExpressionStatement", - "src": "19099:48:13" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "id": 4106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "19441:28:13", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4104, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4057, - "src": "19461:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4103, - "name": "isDealerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3880, - "src": "19442:18:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 4105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19442:27:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4113, - "nodeType": "IfStatement", - "src": "19437:97:13", - "trueBody": { - "id": 4112, - "nodeType": "Block", - "src": "19471:63:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4108, - "name": "REGISTERED_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2890, - "src": "19496:17:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4109, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4057, - "src": "19515:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4107, - "name": "revokeRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "19485:10:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19485:38:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4111, - "nodeType": "ExpressionStatement", - "src": "19485:38:13" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4115, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4057, - "src": "19568:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4114, - "name": "UnregisteredDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2997, - "src": "19549:18:13", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 4116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19549:27:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4117, - "nodeType": "EmitStatement", - "src": "19544:32:13" - } - ] - }, - "documentation": { - "id": 4055, - "nodeType": "StructuredDocumentation", - "src": "18728:115:13", - "text": " @dev Only contract owner can unregister Dealers\n @param account address to be unregistered" - }, - "functionSelector": "e2e564f2", - "id": 4119, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4062, - "modifierName": { - "argumentTypes": null, - "id": 4061, - "name": "onlyAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3151, - "src": "18935:9:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "18935:9:13" - } - ], - "name": "unregisterDealer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4060, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4057, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4119, - "src": "18874:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4056, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18874:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4059, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4119, - "src": "18891:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4058, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "18891:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18873:36:13" - }, - "returnParameters": { - "id": 4063, - "nodeType": "ParameterList", - "parameters": [], - "src": "18949:0:13" - }, - "scope": 4276, - "src": "18848:735:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 4150, - "nodeType": "Block", - "src": "19776:280:13", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 4127, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2881, - "src": "19790:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4138, - "nodeType": "IfStatement", - "src": "19786:164:13", - "trueBody": { - "id": 4137, - "nodeType": "Block", - "src": "19803:147:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4130, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "19833:18:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4131, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "19853:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19853:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4129, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "19825:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19825:39:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a756e7265676973746572436f6e73756d6572286c696d69746564293a206f6e6c792061646d696e2063616e20756e726567697374657220636f6e73756d657273", - "id": 4134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19866:72:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3a9cd7d6fe77d6ee4e14b0717982a2cfd40bf47ef975b87f7e05a46f6b7bcea2", - "typeString": "literal_string \"CLM8::unregisterConsumer(limited): only admin can unregister consumers\"" - }, - "value": "CLM8::unregisterConsumer(limited): only admin can unregister consumers" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3a9cd7d6fe77d6ee4e14b0717982a2cfd40bf47ef975b87f7e05a46f6b7bcea2", - "typeString": "literal_string \"CLM8::unregisterConsumer(limited): only admin can unregister consumers\"" - } - ], - "id": 4128, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "19817:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19817:122:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4136, - "nodeType": "ExpressionStatement", - "src": "19817:122:13" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4142, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2910, - "src": "19976:19:13", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4143, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4122, - "src": "19997:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 4139, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "19959:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 4141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "revokeRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 193, - "src": "19959:16:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19959:46:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4145, - "nodeType": "ExpressionStatement", - "src": "19959:46:13" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4147, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4122, - "src": "20041:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4146, - "name": "UnregisteredConsumer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2989, - "src": "20020:20:13", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 4148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20020:29:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4149, - "nodeType": "EmitStatement", - "src": "20015:34:13" - } - ] - }, - "documentation": { - "id": 4120, - "nodeType": "StructuredDocumentation", - "src": "19589:117:13", - "text": " @dev Only contract owner can unregister Consumers\n @param account address to be unregistered" - }, - "functionSelector": "53dbe982", - "id": 4151, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4125, - "modifierName": { - "argumentTypes": null, - "id": 4124, - "name": "onlyDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3138, - "src": "19765:10:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "19765:10:13" - } - ], - "name": "unregisterConsumer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4123, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4122, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4151, - "src": "19739:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4121, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19739:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19738:17:13" - }, - "returnParameters": { - "id": 4126, - "nodeType": "ParameterList", - "parameters": [], - "src": "19776:0:13" - }, - "scope": 4276, - "src": "19711:345:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 4190, - "nodeType": "Block", - "src": "20561:255:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4165, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4156, - "src": "20591:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 4164, - "name": "tokenExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3170, - "src": "20579:11:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 4166, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20579:20:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a7472616e736665723a20746f6b656e496420646f6573206e6f74206578697374", - "id": 4167, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20601:40:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9c43ccc8b584f02ffbbff75c86a6253d09d36344b82179e96f7217067a7d4f2a", - "typeString": "literal_string \"CLM8::transfer: tokenId does not exist\"" - }, - "value": "CLM8::transfer: tokenId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9c43ccc8b584f02ffbbff75c86a6253d09d36344b82179e96f7217067a7d4f2a", - "typeString": "literal_string \"CLM8::transfer: tokenId does not exist\"" - } - ], - "id": 4163, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "20571:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20571:71:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4169, - "nodeType": "ExpressionStatement", - "src": "20571:71:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4171, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "20661:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20661:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 4173, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4154, - "src": "20675:2:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "20661:16:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 4175, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20660:18:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a7472616e736665723a2073656e64657220616e642072656365697665722063616e6e6f74206265207468652073616d65", - "id": 4176, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20680:56:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8829b174cb33a13572f6e263f0892a756c3ba7968b8eba47df2520a562b90ab1", - "typeString": "literal_string \"CLM8::transfer: sender and receiver cannot be the same\"" - }, - "value": "CLM8::transfer: sender and receiver cannot be the same" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8829b174cb33a13572f6e263f0892a756c3ba7968b8eba47df2520a562b90ab1", - "typeString": "literal_string \"CLM8::transfer: sender and receiver cannot be the same\"" - } - ], - "id": 4170, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "20652:7:13", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20652:85:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4178, - "nodeType": "ExpressionStatement", - "src": "20652:85:13" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4182, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "20770:3:13", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20770:10:13", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 4184, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4154, - "src": "20782:2:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4185, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4156, - "src": "20786:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4186, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4158, - "src": "20795:5:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30783030", - "id": 4187, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20802:6:13", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_27489e20a0060b723a1748bdff5e44570ee9fae64141728105692eac6031e8a4", - "typeString": "literal_string \"0x00\"" - }, - "value": "0x00" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_27489e20a0060b723a1748bdff5e44570ee9fae64141728105692eac6031e8a4", - "typeString": "literal_string \"0x00\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 4179, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "20747:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 4181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 1163, - "src": "20747:22:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,uint256,uint256,bytes memory)" - } - }, - "id": 4188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20747:62:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4189, - "nodeType": "ExpressionStatement", - "src": "20747:62:13" - } - ] - }, - "documentation": { - "id": 4152, - "nodeType": "StructuredDocumentation", - "src": "20062:376:13", - "text": " @dev transfers the value to the 'to' account for tokenId\n @param to recipient address\n @param tokenId tokenId for the transfer\n @param value amount of transfer\n Transfer can start only when both parties are registered and the token is not paused\n Note: Token holders can arbitrarily call safeTransferFrom() without these checks" - }, - "functionSelector": "095bcdb6", - "id": 4191, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4161, - "modifierName": { - "argumentTypes": null, - "id": 4160, - "name": "consumerOrDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3101, - "src": "20544:16:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "20544:16:13" - } - ], - "name": "transfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4159, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4154, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "20470:10:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4153, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20470:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4156, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "20490:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4155, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20490:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4158, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "20515:13:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4157, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20515:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20460:74:13" - }, - "returnParameters": { - "id": 4162, - "nodeType": "ParameterList", - "parameters": [], - "src": "20561:0:13" - }, - "scope": 4276, - "src": "20443:373:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 4202, - "nodeType": "Block", - "src": "20895:37:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4198, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2885, - "src": "20905:8:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4199, - "name": "_timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4193, - "src": "20916:9:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "20905:20:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4201, - "nodeType": "ExpressionStatement", - "src": "20905:20:13" - } - ] - }, - "documentation": null, - "functionSelector": "bdacb303", - "id": 4203, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4196, - "modifierName": { - "argumentTypes": null, - "id": 4195, - "name": "onlyAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3151, - "src": "20885:9:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "20885:9:13" - } - ], - "name": "setTimelock", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4194, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4193, - "mutability": "mutable", - "name": "_timelock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4203, - "src": "20852:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4192, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20852:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20842:33:13" - }, - "returnParameters": { - "id": 4197, - "nodeType": "ParameterList", - "parameters": [], - "src": "20895:0:13" - }, - "scope": 4276, - "src": "20822:110:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 4234, - "nodeType": "Block", - "src": "21073:179:13", - "statements": [ - { - "assignments": [ - 4215 - ], - "declarations": [ - { - "constant": false, - "id": 4215, - "mutability": "mutable", - "name": "available", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4234, - "src": "21083:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4214, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21083:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4221, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4218, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4205, - "src": "21119:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4219, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4207, - "src": "21128:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4216, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "21103:5:13", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract super NetEmissionsTokenNetwork" - } - }, - "id": 4217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 941, - "src": "21103:15:13", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view returns (uint256)" - } - }, - "id": 4220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21103:33:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21083:53:13" - }, - { - "assignments": [ - 4223 - ], - "declarations": [ - { - "constant": false, - "id": 4223, - "mutability": "mutable", - "name": "retired", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4234, - "src": "21146:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4222, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21146:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4229, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4226, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4205, - "src": "21191:7:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4227, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4207, - "src": "21200:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4224, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "21164:4:13", - "typeDescriptions": { - "typeIdentifier": "t_contract$_NetEmissionsTokenNetwork_$4276", - "typeString": "contract NetEmissionsTokenNetwork" - } - }, - "id": 4225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getTokenRetiredAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 3776, - "src": "21164:26:13", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 4228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21164:44:13", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21146:62:13" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 4230, - "name": "available", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4215, - "src": "21226:9:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4231, - "name": "retired", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4223, - "src": "21237:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4232, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "21225:20:13", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256)" - } - }, - "functionReturnParameters": 4213, - "id": 4233, - "nodeType": "Return", - "src": "21218:27:13" - } - ] - }, - "documentation": null, - "functionSelector": "7f157c9b", - "id": 4235, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAvailableAndRetired", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4208, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4205, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4235, - "src": "20970:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4204, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20970:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4207, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4235, - "src": "20987:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4206, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20987:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20969:34:13" - }, - "returnParameters": { - "id": 4213, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4210, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4235, - "src": "21051:7:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4209, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21051:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4212, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4235, - "src": "21060:7:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4211, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21060:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21050:18:13" - }, - "scope": 4276, - "src": "20938:314:13", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 4248, - "nodeType": "Block", - "src": "21416:53:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4243, - "name": "_tokenDetails", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2939, - "src": "21433:13:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$2933_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetwork.CarbonTokenDetails storage ref)" - } - }, - "id": 4245, - "indexExpression": { - "argumentTypes": null, - "id": 4244, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4238, - "src": "21447:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21433:22:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage ref" - } - }, - "id": 4246, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2916, - "src": "21433:29:13", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 4242, - "id": 4247, - "nodeType": "Return", - "src": "21426:36:13" - } - ] - }, - "documentation": { - "id": 4236, - "nodeType": "StructuredDocumentation", - "src": "21258:57:13", - "text": " @dev returns issuer of a given tokenId" - }, - "functionSelector": "92089c46", - "id": 4249, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getIssuer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4239, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4238, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4249, - "src": "21339:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4237, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21339:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21338:17:13" - }, - "returnParameters": { - "id": 4242, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4241, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4249, - "src": "21403:7:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4240, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21403:7:13", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21402:9:13" - }, - "scope": 4276, - "src": "21320:149:13", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 4261, - "nodeType": "Block", - "src": "21717:46:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4257, - "name": "_tokenDetails", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2939, - "src": "21734:13:13", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$2933_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetwork.CarbonTokenDetails storage ref)" - } - }, - "id": 4259, - "indexExpression": { - "argumentTypes": null, - "id": 4258, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4252, - "src": "21748:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21734:22:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails storage ref" - } - }, - "functionReturnParameters": 4256, - "id": 4260, - "nodeType": "Return", - "src": "21727:29:13" - } - ] - }, - "documentation": { - "id": 4250, - "nodeType": "StructuredDocumentation", - "src": "21475:117:13", - "text": " @dev returns the details of a given tokenId, omitting holders\n @param tokenId token to check" - }, - "functionSelector": "c1e03728", - "id": 4262, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTokenDetails", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4253, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4252, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4262, - "src": "21622:15:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4251, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21622:7:13", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21621:17:13" - }, - "returnParameters": { - "id": 4256, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4255, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4262, - "src": "21686:25:13", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_memory_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails" - }, - "typeName": { - "contractScope": null, - "id": 4254, - "name": "CarbonTokenDetails", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2933, - "src": "21686:18:13", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$2933_storage_ptr", - "typeString": "struct NetEmissionsTokenNetwork.CarbonTokenDetails" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21685:27:13" - }, - "scope": 4276, - "src": "21597:166:13", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 4274, - "nodeType": "Block", - "src": "21949:43:13", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 4272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4270, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2881, - "src": "21959:11:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4271, - "name": "_limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4265, - "src": "21973:12:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "21959:26:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 4273, - "nodeType": "ExpressionStatement", - "src": "21959:26:13" - } - ] - }, - "documentation": { - "id": 4263, - "nodeType": "StructuredDocumentation", - "src": "21769:93:13", - "text": " @dev turns off or on limited mode\n @param _limitedMode boolean value" - }, - "functionSelector": "ddc3e6eb", - "id": 4275, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4268, - "modifierName": { - "argumentTypes": null, - "id": 4267, - "name": "onlyAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3151, - "src": "21935:9:13", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21935:9:13" - } - ], - "name": "setLimitedMode", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4266, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4265, - "mutability": "mutable", - "name": "_limitedMode", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4275, - "src": "21891:17:13", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4264, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "21891:4:13", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21890:19:13" - }, - "returnParameters": { - "id": 4269, - "nodeType": "ParameterList", - "parameters": [], - "src": "21949:0:13" - }, - "scope": 4276, - "src": "21867:125:13", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 4277, - "src": "485:21510:13" - } - ], - "src": "39:21957:13" - }, - "id": 13 - }, - "src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol": { - "ast": { - "absolutePath": "src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol", - "exportedSymbols": { - "NetEmissionsTokenNetworkV2": [ - 5695 - ] - }, - "id": 5696, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 4278, - "literals": [ - "solidity", - "^", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "39:23:14" - }, - { - "id": 4279, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "63:33:14" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol", - "file": "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol", - "id": 4280, - "nodeType": "ImportDirective", - "scope": 5696, - "sourceUnit": 750, - "src": "98:74:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol", - "file": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol", - "id": 4281, - "nodeType": "ImportDirective", - "scope": 5696, - "sourceUnit": 308, - "src": "173:81:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol", - "file": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol", - "id": 4282, - "nodeType": "ImportDirective", - "scope": 5696, - "sourceUnit": 1851, - "src": "255:82:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol", - "file": "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol", - "id": 4283, - "nodeType": "ImportDirective", - "scope": 5696, - "sourceUnit": 2368, - "src": "338:75:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol", - "file": "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol", - "id": 4284, - "nodeType": "ImportDirective", - "scope": 5696, - "sourceUnit": 816, - "src": "414:69:14", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4285, - "name": "Initializable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 815, - "src": "641:13:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Initializable_$815", - "typeString": "contract Initializable" - } - }, - "id": 4286, - "nodeType": "InheritanceSpecifier", - "src": "641:13:14" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4287, - "name": "ERC1155Upgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1850, - "src": "656:18:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155Upgradeable_$1850", - "typeString": "contract ERC1155Upgradeable" - } - }, - "id": 4288, - "nodeType": "InheritanceSpecifier", - "src": "656:18:14" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 4289, - "name": "AccessControlUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 307, - "src": "676:24:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_AccessControlUpgradeable_$307", - "typeString": "contract AccessControlUpgradeable" - } - }, - "id": 4290, - "nodeType": "InheritanceSpecifier", - "src": "676:24:14" - } - ], - "contractDependencies": [ - 307, - 382, - 394, - 815, - 1850, - 1865, - 2028, - 2317 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 5695, - "linearizedBaseContracts": [ - 5695, - 307, - 1850, - 1865, - 2028, - 382, - 394, - 2317, - 815 - ], - "name": "NetEmissionsTokenNetworkV2", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 4293, - "libraryName": { - "contractScope": null, - "id": 4291, - "name": "SafeMathUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 749, - "src": "714:19:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMathUpgradeable_$749", - "typeString": "library SafeMathUpgradeable" - } - }, - "nodeType": "UsingForDirective", - "src": "708:38:14", - "typeName": { - "id": 4292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "738:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 4296, - "libraryName": { - "contractScope": null, - "id": 4294, - "name": "CountersUpgradeable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2367, - "src": "757:19:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_CountersUpgradeable_$2367", - "typeString": "library CountersUpgradeable" - } - }, - "nodeType": "UsingForDirective", - "src": "751:58:14", - "typeName": { - "contractScope": null, - "id": 4295, - "name": "CountersUpgradeable.Counter", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2327, - "src": "781:27:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter" - } - } - }, - { - "constant": false, - "functionSelector": "dba851b0", - "id": 4298, - "mutability": "mutable", - "name": "limitedMode", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "815:23:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4297, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "815:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "f851a440", - "id": 4300, - "mutability": "mutable", - "name": "admin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "932:20:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4299, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "932:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 4302, - "mutability": "mutable", - "name": "timelock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "1044:24:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4301, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1044:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": true, - "functionSelector": "18a50d7e", - "id": 4307, - "mutability": "constant", - "name": "REGISTERED_DEALER", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "1222:82:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4303, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1222:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "524547495354455245445f4445414c4552", - "id": 4305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1284:19:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3", - "typeString": "literal_string \"REGISTERED_DEALER\"" - }, - "value": "REGISTERED_DEALER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_f8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3", - "typeString": "literal_string \"REGISTERED_DEALER\"" - } - ], - "id": 4304, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "1274:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 4306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1274:30:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "fcba7948", - "id": 4312, - "mutability": "constant", - "name": "REGISTERED_REC_DEALER", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "1343:90:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4308, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1343:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "524547495354455245445f5245435f4445414c4552", - "id": 4310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1409:23:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860", - "typeString": "literal_string \"REGISTERED_REC_DEALER\"" - }, - "value": "REGISTERED_REC_DEALER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_2ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860", - "typeString": "literal_string \"REGISTERED_REC_DEALER\"" - } - ], - "id": 4309, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "1399:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 4311, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1399:34:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "1ef68ef7", - "id": 4317, - "mutability": "constant", - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "1439:96:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4313, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1439:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "524547495354455245445f4f46465345545f4445414c4552", - "id": 4315, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1508:26:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f", - "typeString": "literal_string \"REGISTERED_OFFSET_DEALER\"" - }, - "value": "REGISTERED_OFFSET_DEALER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f", - "typeString": "literal_string \"REGISTERED_OFFSET_DEALER\"" - } - ], - "id": 4314, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "1498:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 4316, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1498:37:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "76ce4755", - "id": 4322, - "mutability": "constant", - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "1541:104:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4318, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1541:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "524547495354455245445f454d495353494f4e535f41554449544f52", - "id": 4320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1614:30:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12c", - "typeString": "literal_string \"REGISTERED_EMISSIONS_AUDITOR\"" - }, - "value": "REGISTERED_EMISSIONS_AUDITOR" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12c", - "typeString": "literal_string \"REGISTERED_EMISSIONS_AUDITOR\"" - } - ], - "id": 4319, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "1604:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 4321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1604:41:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "78e5c592", - "id": 4327, - "mutability": "constant", - "name": "REGISTERED_CONSUMER", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "1672:86:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4323, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1672:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "524547495354455245445f434f4e53554d4552", - "id": 4325, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1736:21:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76a", - "typeString": "literal_string \"REGISTERED_CONSUMER\"" - }, - "value": "REGISTERED_CONSUMER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76a", - "typeString": "literal_string \"REGISTERED_CONSUMER\"" - } - ], - "id": 4324, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "1726:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 4326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1726:32:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "public" - }, - { - "canonicalName": "NetEmissionsTokenNetworkV2.CarbonTokenDetails", - "id": 4350, - "members": [ - { - "constant": false, - "id": 4329, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2376:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4328, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2376:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4331, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2401:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4330, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2401:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4333, - "mutability": "mutable", - "name": "issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2428:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4332, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2428:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4335, - "mutability": "mutable", - "name": "issuee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2452:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4334, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2452:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4337, - "mutability": "mutable", - "name": "fromDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2476:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4336, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2476:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4339, - "mutability": "mutable", - "name": "thruDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2502:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4338, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2502:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4341, - "mutability": "mutable", - "name": "dateCreated", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2528:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2528:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4343, - "mutability": "mutable", - "name": "automaticRetireDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2557:27:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4342, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2557:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4345, - "mutability": "mutable", - "name": "metadata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2594:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4344, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2594:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4347, - "mutability": "mutable", - "name": "manifest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2619:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4346, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2619:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4349, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4350, - "src": "2644:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4348, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2644:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "CarbonTokenDetails", - "nodeType": "StructDefinition", - "scope": 5695, - "src": "2340:329:14", - "visibility": "public" - }, - { - "constant": false, - "id": 4352, - "mutability": "mutable", - "name": "_numOfUniqueTokens", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "2736:54:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter" - }, - "typeName": { - "contractScope": null, - "id": 4351, - "name": "CountersUpgradeable.Counter", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2327, - "src": "2736:27:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage_ptr", - "typeString": "struct CountersUpgradeable.Counter" - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 4356, - "mutability": "mutable", - "name": "_tokenDetails", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "2840:60:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$4350_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetworkV2.CarbonTokenDetails)" - }, - "typeName": { - "id": 4355, - "keyType": { - "id": 4353, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2848:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "2840:38:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$4350_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetworkV2.CarbonTokenDetails)" - }, - "valueType": { - "contractScope": null, - "id": 4354, - "name": "CarbonTokenDetails", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4350, - "src": "2859:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails" - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 4362, - "mutability": "mutable", - "name": "_retiredBalances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "2906:72:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - }, - "typeName": { - "id": 4361, - "keyType": { - "id": 4357, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2914:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "2906:47:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - }, - "valueType": { - "id": 4360, - "keyType": { - "id": 4358, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2933:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2925:27:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 4359, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2944:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 4364, - "mutability": "mutable", - "name": "newTestVariable", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5695, - "src": "2985:31:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4363, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2985:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "private" - }, - { - "anonymous": false, - "documentation": null, - "id": 4392, - "name": "TokenCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 4391, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4366, - "indexed": false, - "mutability": "mutable", - "name": "availableBalance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3065:24:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4365, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3065:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4368, - "indexed": false, - "mutability": "mutable", - "name": "retiredBalance", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3099:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4367, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3099:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4370, - "indexed": false, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3131:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4369, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3131:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4372, - "indexed": false, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3156:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4371, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "3156:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4374, - "indexed": true, - "mutability": "mutable", - "name": "issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3183:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4373, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3183:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4376, - "indexed": true, - "mutability": "mutable", - "name": "issuee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3215:22:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4375, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3215:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4378, - "indexed": false, - "mutability": "mutable", - "name": "fromDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3247:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4377, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3247:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4380, - "indexed": false, - "mutability": "mutable", - "name": "thruDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3273:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4379, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3273:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4382, - "indexed": false, - "mutability": "mutable", - "name": "dateCreated", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3299:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4381, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3299:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4384, - "indexed": false, - "mutability": "mutable", - "name": "automaticRetireDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3328:27:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4383, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3328:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4386, - "indexed": false, - "mutability": "mutable", - "name": "metadata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3365:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4385, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3365:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4388, - "indexed": false, - "mutability": "mutable", - "name": "manifest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3390:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4387, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3390:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4390, - "indexed": false, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4392, - "src": "3415:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4389, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3415:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3055:384:14" - }, - "src": "3037:403:14" - }, - { - "anonymous": false, - "documentation": null, - "id": 4400, - "name": "TokenRetired", - "nodeType": "EventDefinition", - "parameters": { - "id": 4399, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4394, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4400, - "src": "3473:23:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4393, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3473:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4396, - "indexed": false, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4400, - "src": "3506:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4395, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3506:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4398, - "indexed": false, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4400, - "src": "3531:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4397, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3531:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3463:88:14" - }, - "src": "3445:107:14" - }, - { - "anonymous": false, - "documentation": null, - "id": 4404, - "name": "RegisteredConsumer", - "nodeType": "EventDefinition", - "parameters": { - "id": 4403, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4402, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4404, - "src": "3582:23:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4401, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3582:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3581:25:14" - }, - "src": "3557:50:14" - }, - { - "anonymous": false, - "documentation": null, - "id": 4408, - "name": "UnregisteredConsumer", - "nodeType": "EventDefinition", - "parameters": { - "id": 4407, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4406, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4408, - "src": "3639:23:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4405, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3639:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3638:25:14" - }, - "src": "3612:52:14" - }, - { - "anonymous": false, - "documentation": null, - "id": 4412, - "name": "RegisteredDealer", - "nodeType": "EventDefinition", - "parameters": { - "id": 4411, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4410, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4412, - "src": "3692:23:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4409, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3692:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3691:25:14" - }, - "src": "3669:48:14" - }, - { - "anonymous": false, - "documentation": null, - "id": 4416, - "name": "UnregisteredDealer", - "nodeType": "EventDefinition", - "parameters": { - "id": 4415, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4414, - "indexed": true, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4416, - "src": "3747:23:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4413, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3747:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3746:25:14" - }, - "src": "3722:50:14" - }, - { - "body": { - "id": 4472, - "nodeType": "Block", - "src": "3886:538:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "", - "id": 4424, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3912:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "id": 4423, - "name": "__ERC1155_init", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 881, - "src": "3897:14:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory)" - } - }, - "id": 4425, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3897:18:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4426, - "nodeType": "ExpressionStatement", - "src": "3897:18:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4428, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4327, - "src": "3987:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4429, - "name": "REGISTERED_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "4008:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 4427, - "name": "_setRoleAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 254, - "src": "3973:13:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", - "typeString": "function (bytes32,bytes32)" - } - }, - "id": 4430, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3973:53:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4431, - "nodeType": "ExpressionStatement", - "src": "3973:53:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4433, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "4072:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4434, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4418, - "src": "4092:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4432, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "4061:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4061:38:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4436, - "nodeType": "ExpressionStatement", - "src": "4061:38:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4438, - "name": "REGISTERED_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "4120:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4439, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4418, - "src": "4139:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4437, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "4109:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4109:37:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4441, - "nodeType": "ExpressionStatement", - "src": "4109:37:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4443, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "4167:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4444, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4418, - "src": "4190:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4442, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "4156:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4156:41:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4446, - "nodeType": "ExpressionStatement", - "src": "4156:41:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4448, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4317, - "src": "4218:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4449, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4418, - "src": "4244:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4447, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "4207:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4207:44:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4451, - "nodeType": "ExpressionStatement", - "src": "4207:44:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4453, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "4272:28:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4454, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4418, - "src": "4302:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4452, - "name": "_setupRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "4261:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 4455, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4261:48:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4456, - "nodeType": "ExpressionStatement", - "src": "4261:48:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4457, - "name": "admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4300, - "src": "4319:5:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4458, - "name": "_admin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4418, - "src": "4327:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4319:14:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4460, - "nodeType": "ExpressionStatement", - "src": "4319:14:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4461, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4302, - "src": "4366:8:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4464, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4385:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 4463, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4377:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 4462, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4377:7:14", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 4465, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4377:10:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "4366:21:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4467, - "nodeType": "ExpressionStatement", - "src": "4366:21:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4468, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "4398:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 4469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4412:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "4398:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 4471, - "nodeType": "ExpressionStatement", - "src": "4398:19:14" - } - ] - }, - "documentation": null, - "functionSelector": "c4d66de8", - "id": 4473, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4421, - "modifierName": { - "argumentTypes": null, - "id": 4420, - "name": "initializer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "3874:11:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "3874:11:14" - } - ], - "name": "initialize", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4419, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4418, - "mutability": "mutable", - "name": "_admin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4473, - "src": "3851:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4417, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3851:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3850:16:14" - }, - "returnParameters": { - "id": 4422, - "nodeType": "ParameterList", - "parameters": [], - "src": "3886:0:14" - }, - "scope": 5695, - "src": "3831:593:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 4519, - "nodeType": "Block", - "src": "4458:482:14", - "statements": [ - { - "assignments": [ - 4476 - ], - "declarations": [ - { - "constant": false, - "id": 4476, - "mutability": "mutable", - "name": "isConsumer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4519, - "src": "4468:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4475, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4468:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4482, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4478, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4327, - "src": "4494:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4479, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4515:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4515:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4477, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4486:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4486:40:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4468:58:14" - }, - { - "assignments": [ - 4484 - ], - "declarations": [ - { - "constant": false, - "id": 4484, - "mutability": "mutable", - "name": "isRecDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4519, - "src": "4536:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4483, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4536:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4490, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4486, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "4563:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4487, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4586:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4586:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4485, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4555:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4555:42:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4536:61:14" - }, - { - "assignments": [ - 4492 - ], - "declarations": [ - { - "constant": false, - "id": 4492, - "mutability": "mutable", - "name": "isCeoDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4519, - "src": "4607:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4491, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4607:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4498, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4494, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4317, - "src": "4634:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4495, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4660:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4660:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4493, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4626:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4626:45:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4607:64:14" - }, - { - "assignments": [ - 4500 - ], - "declarations": [ - { - "constant": false, - "id": 4500, - "mutability": "mutable", - "name": "isAeDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4519, - "src": "4681:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4499, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4681:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4506, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4502, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "4707:28:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4503, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4737:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4737:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4501, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4699:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4699:49:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4681:67:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4508, - "name": "isConsumer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4476, - "src": "4780:10:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 4509, - "name": "isRecDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4484, - "src": "4794:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4780:25:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 4511, - "name": "isCeoDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4492, - "src": "4809:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4780:40:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 4513, - "name": "isAeDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4500, - "src": "4824:10:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4780:54:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a636f6e73756d65724f724465616c65723a206d73672e73656e646572206e6f74206120636f6e73756d6572206f722061206465616c6572", - "id": 4515, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4848:63:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f18217978c168abee7a7156d17145e0246952f475f3e52a50191a73581bbf047", - "typeString": "literal_string \"CLM8::consumerOrDealer: msg.sender not a consumer or a dealer\"" - }, - "value": "CLM8::consumerOrDealer: msg.sender not a consumer or a dealer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f18217978c168abee7a7156d17145e0246952f475f3e52a50191a73581bbf047", - "typeString": "literal_string \"CLM8::consumerOrDealer: msg.sender not a consumer or a dealer\"" - } - ], - "id": 4507, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4759:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4759:162:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4517, - "nodeType": "ExpressionStatement", - "src": "4759:162:14" - }, - { - "id": 4518, - "nodeType": "PlaceholderStatement", - "src": "4932:1:14" - } - ] - }, - "documentation": null, - "id": 4520, - "name": "consumerOrDealer", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 4474, - "nodeType": "ParameterList", - "parameters": [], - "src": "4455:2:14" - }, - "src": "4430:510:14", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 4556, - "nodeType": "Block", - "src": "4968:379:14", - "statements": [ - { - "assignments": [ - 4523 - ], - "declarations": [ - { - "constant": false, - "id": 4523, - "mutability": "mutable", - "name": "isRecDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4556, - "src": "4978:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4522, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4978:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4529, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4525, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "5005:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4526, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5028:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5028:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4524, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4997:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4997:42:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4978:61:14" - }, - { - "assignments": [ - 4531 - ], - "declarations": [ - { - "constant": false, - "id": 4531, - "mutability": "mutable", - "name": "isCeoDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4556, - "src": "5049:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4530, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5049:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4537, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4533, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4317, - "src": "5076:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4534, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5102:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5102:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4532, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5068:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5068:45:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5049:64:14" - }, - { - "assignments": [ - 4539 - ], - "declarations": [ - { - "constant": false, - "id": 4539, - "mutability": "mutable", - "name": "isAeDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4556, - "src": "5123:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4538, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5123:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4545, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4541, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "5149:28:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4542, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5179:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5179:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4540, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5141:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5141:49:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5123:67:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4547, - "name": "isRecDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4523, - "src": "5222:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 4548, - "name": "isCeoDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4531, - "src": "5237:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5222:26:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 4550, - "name": "isAeDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4539, - "src": "5252:10:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5222:40:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a6f6e6c794465616c65723a206d73672e73656e646572206e6f742061206465616c6572", - "id": 4552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5276:43:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0cbef3cc12766f0b1a8193e2b09f47f345b74edd3ce5e7beb0924fa72cb0774f", - "typeString": "literal_string \"CLM8::onlyDealer: msg.sender not a dealer\"" - }, - "value": "CLM8::onlyDealer: msg.sender not a dealer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0cbef3cc12766f0b1a8193e2b09f47f345b74edd3ce5e7beb0924fa72cb0774f", - "typeString": "literal_string \"CLM8::onlyDealer: msg.sender not a dealer\"" - } - ], - "id": 4546, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5201:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5201:128:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4554, - "nodeType": "ExpressionStatement", - "src": "5201:128:14" - }, - { - "id": 4555, - "nodeType": "PlaceholderStatement", - "src": "5339:1:14" - } - ] - }, - "documentation": null, - "id": 4557, - "name": "onlyDealer", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 4521, - "nodeType": "ParameterList", - "parameters": [], - "src": "4965:2:14" - }, - "src": "4946:401:14", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 4569, - "nodeType": "Block", - "src": "5374:155:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4561, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "5413:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4562, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5433:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5433:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4560, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5405:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5405:39:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a6f6e6c7941646d696e3a206d73672e73656e646572206e6f74207468652061646d696e", - "id": 4565, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5458:43:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4ba6a4dff6a4b2310f085750099895191b9f81ad83532299ce726e45e26d26f2", - "typeString": "literal_string \"CLM8::onlyAdmin: msg.sender not the admin\"" - }, - "value": "CLM8::onlyAdmin: msg.sender not the admin" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4ba6a4dff6a4b2310f085750099895191b9f81ad83532299ce726e45e26d26f2", - "typeString": "literal_string \"CLM8::onlyAdmin: msg.sender not the admin\"" - } - ], - "id": 4559, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5384:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5384:127:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4567, - "nodeType": "ExpressionStatement", - "src": "5384:127:14" - }, - { - "id": 4568, - "nodeType": "PlaceholderStatement", - "src": "5521:1:14" - } - ] - }, - "documentation": null, - "id": 4570, - "name": "onlyAdmin", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 4558, - "nodeType": "ParameterList", - "parameters": [], - "src": "5371:2:14" - }, - "src": "5353:176:14", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 4588, - "nodeType": "Block", - "src": "5664:118:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 4578, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4352, - "src": "5678:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 4579, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "current", - "nodeType": "MemberAccess", - "referencedDeclaration": 2338, - "src": "5678:26:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Counter_$2327_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer) view returns (uint256)" - } - }, - "id": 4580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5678:28:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 4581, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4573, - "src": "5710:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5678:39:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4585, - "nodeType": "IfStatement", - "src": "5674:56:14", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4583, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5726:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4577, - "id": 4584, - "nodeType": "Return", - "src": "5719:11:14" - } - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 4586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5747:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 4577, - "id": 4587, - "nodeType": "Return", - "src": "5740:12:14" - } - ] - }, - "documentation": { - "id": 4571, - "nodeType": "StructuredDocumentation", - "src": "5535:58:14", - "text": " @dev returns true if the tokenId exists" - }, - "id": 4589, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tokenExists", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4574, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4573, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4589, - "src": "5619:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4572, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5619:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5618:17:14" - }, - "returnParameters": { - "id": 4577, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4576, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4589, - "src": "5658:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4575, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5658:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5657:6:14" - }, - "scope": 5695, - "src": "5598:184:14", - "stateMutability": "view", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 4612, - "nodeType": "Block", - "src": "5932:142:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4597, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4592, - "src": "5947:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4598, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5961:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5947:15:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 4600, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5946:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4603, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4601, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4592, - "src": "5968:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 4602, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5983:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "5968:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 4604, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5967:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5946:39:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4609, - "nodeType": "IfStatement", - "src": "5942:81:14", - "trueBody": { - "id": 4608, - "nodeType": "Block", - "src": "5987:36:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6008:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4596, - "id": 4607, - "nodeType": "Return", - "src": "6001:11:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 4610, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6039:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 4596, - "id": 4611, - "nodeType": "Return", - "src": "6032:12:14" - } - ] - }, - "documentation": { - "id": 4590, - "nodeType": "StructuredDocumentation", - "src": "5788:64:14", - "text": " @dev returns true if the tokenTypeId is valid" - }, - "id": 4613, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tokenTypeIdIsValid", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4593, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4592, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4613, - "src": "5885:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4591, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "5885:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5884:19:14" - }, - "returnParameters": { - "id": 4596, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4595, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4613, - "src": "5926:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4594, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5926:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5925:6:14" - }, - "scope": 5695, - "src": "5857:217:14", - "stateMutability": "pure", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 4623, - "nodeType": "Block", - "src": "6202:52:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 4619, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4352, - "src": "6219:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 4620, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "current", - "nodeType": "MemberAccess", - "referencedDeclaration": 2338, - "src": "6219:26:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Counter_$2327_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer) view returns (uint256)" - } - }, - "id": 4621, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6219:28:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4618, - "id": 4622, - "nodeType": "Return", - "src": "6212:35:14" - } - ] - }, - "documentation": { - "id": 4614, - "nodeType": "StructuredDocumentation", - "src": "6080:55:14", - "text": " @dev returns number of unique tokens" - }, - "functionSelector": "5ddb368f", - "id": 4624, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNumOfUniqueTokens", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4615, - "nodeType": "ParameterList", - "parameters": [], - "src": "6169:2:14" - }, - "returnParameters": { - "id": 4618, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4617, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4624, - "src": "6193:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4616, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6193:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6192:9:14" - }, - "scope": 5695, - "src": "6140:114:14", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 1685 - ], - "body": { - "id": 4714, - "nodeType": "Block", - "src": "6607:1267:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4646, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4627, - "src": "6644:8:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4647, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4629, - "src": "6654:4:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4648, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4631, - "src": "6660:2:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4649, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4634, - "src": "6664:3:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 4650, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4637, - "src": "6669:7:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 4651, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4639, - "src": "6678:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 4643, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "6617:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 4645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_beforeTokenTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1685, - "src": "6617:26:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" - } - }, - "id": 4652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6617:66:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4653, - "nodeType": "ExpressionStatement", - "src": "6617:66:14" - }, - { - "body": { - "id": 4712, - "nodeType": "Block", - "src": "6732:1136:14", - "statements": [ - { - "assignments": [ - 4666 - ], - "declarations": [ - { - "constant": false, - "id": 4666, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4712, - "src": "6747:32:14", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails" - }, - "typeName": { - "contractScope": null, - "id": 4665, - "name": "CarbonTokenDetails", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4350, - "src": "6747:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4672, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4667, - "name": "_tokenDetails", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4356, - "src": "6782:13:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$4350_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage ref)" - } - }, - "id": 4671, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4668, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4634, - "src": "6796:3:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 4670, - "indexExpression": { - "argumentTypes": null, - "id": 4669, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4655, - "src": "6800:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6796:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6782:21:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6747:56:14" - }, - { - "condition": { - "argumentTypes": null, - "id": 4673, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "6881:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4711, - "nodeType": "IfStatement", - "src": "6877:981:14", - "trueBody": { - "id": 4710, - "nodeType": "Block", - "src": "6894:964:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4674, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4631, - "src": "6972:2:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6986:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 4676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6978:7:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 4675, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6978:7:14", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 4678, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6978:10:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6972:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4682, - "nodeType": "IfStatement", - "src": "6968:71:14", - "trueBody": { - "id": 4681, - "nodeType": "Block", - "src": "6990:49:14", - "statements": [ - { - "id": 4680, - "nodeType": "Continue", - "src": "7012:8:14" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4683, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4666, - "src": "7295:5:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 4684, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenTypeId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4331, - "src": "7295:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 4685, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7316:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "7295:22:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 4708, - "nodeType": "Block", - "src": "7585:259:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4702, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "7648:28:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4703, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4627, - "src": "7678:8:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4701, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "7640:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7640:47:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d69746564293a206f6e6c7920656d697373696f6e732061756469746f72732063616e206973737565206175646974656420656d697373696f6e73", - "id": 4705, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7713:90:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cf130957a8fd04bf2a485999674096bcbb8799778244a790ae33406ca8f6b286", - "typeString": "literal_string \"CLM8::_beforeTokenTransfer(limited): only emissions auditors can issue audited emissions\"" - }, - "value": "CLM8::_beforeTokenTransfer(limited): only emissions auditors can issue audited emissions" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cf130957a8fd04bf2a485999674096bcbb8799778244a790ae33406ca8f6b286", - "typeString": "literal_string \"CLM8::_beforeTokenTransfer(limited): only emissions auditors can issue audited emissions\"" - } - ], - "id": 4700, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7607:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7607:218:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4707, - "nodeType": "ExpressionStatement", - "src": "7607:218:14" - } - ] - }, - "id": 4709, - "nodeType": "IfStatement", - "src": "7291:553:14", - "trueBody": { - "id": 4699, - "nodeType": "Block", - "src": "7319:260:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4695, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4688, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4627, - "src": "7374:8:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4689, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4302, - "src": "7386:8:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7374:20:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4692, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "7406:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4693, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4627, - "src": "7426:8:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4691, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "7398:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7398:37:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7374:61:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d69746564293a206f6e6c792061646d696e20616e642044414f2063616e207472616e7366657220746f6b656e73", - "id": 4696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7461:77:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fbcf54f134bb1dbe4d91054139856e19b9909e22a02e86f6f99913c2e29c8b4b", - "typeString": "literal_string \"CLM8::_beforeTokenTransfer(limited): only admin and DAO can transfer tokens\"" - }, - "value": "CLM8::_beforeTokenTransfer(limited): only admin and DAO can transfer tokens" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fbcf54f134bb1dbe4d91054139856e19b9909e22a02e86f6f99913c2e29c8b4b", - "typeString": "literal_string \"CLM8::_beforeTokenTransfer(limited): only admin and DAO can transfer tokens\"" - } - ], - "id": 4687, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "7341:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7341:219:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4698, - "nodeType": "ExpressionStatement", - "src": "7341:219:14" - } - ] - } - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4658, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4655, - "src": "6711:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4659, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4634, - "src": "6715:3:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 4660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6715:10:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6711:14:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 4713, - "initializationExpression": { - "assignments": [ - 4655 - ], - "declarations": [ - { - "constant": false, - "id": 4655, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4713, - "src": "6699:6:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4654, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6699:4:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4657, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 4656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6708:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6699:10:14" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 4663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6727:3:14", - "subExpression": { - "argumentTypes": null, - "id": 4662, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4655, - "src": "6727:1:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4664, - "nodeType": "ExpressionStatement", - "src": "6727:3:14" - }, - "nodeType": "ForStatement", - "src": "6694:1174:14" - } - ] - }, - "documentation": { - "id": 4625, - "nodeType": "StructuredDocumentation", - "src": "6260:93:14", - "text": " @dev hook to prevent transfers from non-admin account if limitedMode is on" - }, - "id": 4715, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 4641, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "6594:8:14" - }, - "parameters": { - "id": 4640, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4627, - "mutability": "mutable", - "name": "operator", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4715, - "src": "6397:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4626, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6397:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4629, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4715, - "src": "6423:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4628, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6423:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4631, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4715, - "src": "6445:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6445:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4634, - "mutability": "mutable", - "name": "ids", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4715, - "src": "6465:20:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 4632, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6465:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4633, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6465:9:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4637, - "mutability": "mutable", - "name": "amounts", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4715, - "src": "6495:24:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 4635, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6495:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4636, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6495:9:14", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4639, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4715, - "src": "6529:17:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 4638, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6529:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6387:165:14" - }, - "returnParameters": { - "id": 4642, - "nodeType": "ParameterList", - "parameters": [], - "src": "6607:0:14" - }, - "scope": 5695, - "src": "6358:1516:14", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 4753, - "nodeType": "Block", - "src": "8531:277:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4740, - "name": "issuee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4718, - "src": "8568:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4741, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "8588:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8588:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 4743, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4720, - "src": "8612:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 4744, - "name": "quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4722, - "src": "8637:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4745, - "name": "fromDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4724, - "src": "8659:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4746, - "name": "thruDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4726, - "src": "8681:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4747, - "name": "automaticRetireDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4728, - "src": "8703:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4748, - "name": "metadata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4730, - "src": "8736:8:14", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4749, - "name": "manifest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4732, - "src": "8758:8:14", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4750, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4734, - "src": "8780:11:14", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4739, - "name": "_issue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5092, - "src": "8548:6:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,address,uint8,uint256,uint256,uint256,uint256,string memory,string memory,string memory)" - } - }, - "id": 4751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8548:253:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 4738, - "id": 4752, - "nodeType": "Return", - "src": "8541:260:14" - } - ] - }, - "documentation": { - "id": 4716, - "nodeType": "StructuredDocumentation", - "src": "7880:342:14", - "text": " @dev External function to mint an amount of a token\n Only authorized dealer of associated token type can call this function\n @param quantity of the token to mint For ex: if one needs 100 full tokens, the caller\n should set the amount as (100 * 10^4) = 1,000,000 (assuming the token's decimals is set to 4)" - }, - "functionSelector": "fd0c4a9a", - "id": 4754, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4737, - "modifierName": { - "argumentTypes": null, - "id": 4736, - "name": "onlyDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4557, - "src": "8520:10:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8520:10:14" - } - ], - "name": "issue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4735, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4718, - "mutability": "mutable", - "name": "issuee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4754, - "src": "8251:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4717, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8251:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4720, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4754, - "src": "8275:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4719, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "8275:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4722, - "mutability": "mutable", - "name": "quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4754, - "src": "8302:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4721, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8302:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4724, - "mutability": "mutable", - "name": "fromDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4754, - "src": "8328:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4723, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8328:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4726, - "mutability": "mutable", - "name": "thruDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4754, - "src": "8354:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4725, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8354:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4728, - "mutability": "mutable", - "name": "automaticRetireDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4754, - "src": "8380:27:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4727, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8380:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4730, - "mutability": "mutable", - "name": "metadata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4754, - "src": "8417:22:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4729, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "8417:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4732, - "mutability": "mutable", - "name": "manifest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4754, - "src": "8449:22:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4731, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "8449:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4734, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4754, - "src": "8481:25:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4733, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "8481:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8241:271:14" - }, - "returnParameters": { - "id": 4738, - "nodeType": "ParameterList", - "parameters": [], - "src": "8531:0:14" - }, - "scope": 5695, - "src": "8227:581:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 4806, - "nodeType": "Block", - "src": "9367:452:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4782, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4779, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9400:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9400:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4781, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4302, - "src": "9414:8:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "9400:22:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 4783, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "9399:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4785, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "9435:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4786, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9455:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9455:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 4784, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "9427:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9427:39:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "9399:67:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a69737375654f6e426568616c663a2063616c6c206d75737420636f6d652066726f6d2044414f206f722061646d696e", - "id": 4790, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9480:55:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_027980ead4a5293de821ea7b1b725523b071719d3eda93334799af99eb3a6e49", - "typeString": "literal_string \"CLM8::issueOnBehalf: call must come from DAO or admin\"" - }, - "value": "CLM8::issueOnBehalf: call must come from DAO or admin" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_027980ead4a5293de821ea7b1b725523b071719d3eda93334799af99eb3a6e49", - "typeString": "literal_string \"CLM8::issueOnBehalf: call must come from DAO or admin\"" - } - ], - "id": 4778, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "9378:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9378:167:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4792, - "nodeType": "ExpressionStatement", - "src": "9378:167:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4794, - "name": "issuee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4757, - "src": "9583:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4795, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4759, - "src": "9603:6:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 4796, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4761, - "src": "9623:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 4797, - "name": "quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4763, - "src": "9648:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4798, - "name": "fromDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4765, - "src": "9670:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4799, - "name": "thruDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4767, - "src": "9692:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4800, - "name": "automaticRetireDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4769, - "src": "9714:19:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 4801, - "name": "metadata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4771, - "src": "9747:8:14", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4802, - "name": "manifest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4773, - "src": "9769:8:14", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 4803, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4775, - "src": "9791:11:14", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 4793, - "name": "_issue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5092, - "src": "9563:6:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,address,uint8,uint256,uint256,uint256,uint256,string memory,string memory,string memory)" - } - }, - "id": 4804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9563:249:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "functionReturnParameters": 4777, - "id": 4805, - "nodeType": "Return", - "src": "9556:256:14" - } - ] - }, - "documentation": { - "id": 4755, - "nodeType": "StructuredDocumentation", - "src": "8814:223:14", - "text": " @dev Issue function for DAO (on limited mode) or admin to manually pass issuer\n Must be called from Timelock contract through a successful proposal\n or by admin if limited mode is set to false" - }, - "functionSelector": "f000be98", - "id": 4807, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "issueOnBehalf", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4757, - "mutability": "mutable", - "name": "issuee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4807, - "src": "9074:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9074:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4759, - "mutability": "mutable", - "name": "issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4807, - "src": "9098:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4758, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9098:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4761, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4807, - "src": "9122:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4760, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "9122:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4763, - "mutability": "mutable", - "name": "quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4807, - "src": "9149:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4762, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9149:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4765, - "mutability": "mutable", - "name": "fromDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4807, - "src": "9175:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4764, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9175:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4767, - "mutability": "mutable", - "name": "thruDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4807, - "src": "9201:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4766, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9201:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4769, - "mutability": "mutable", - "name": "automaticRetireDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4807, - "src": "9227:27:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4768, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9227:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4771, - "mutability": "mutable", - "name": "metadata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4807, - "src": "9264:22:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4770, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9264:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4773, - "mutability": "mutable", - "name": "manifest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4807, - "src": "9296:22:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4772, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9296:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4775, - "mutability": "mutable", - "name": "description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4807, - "src": "9328:25:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4774, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "9328:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9064:295:14" - }, - "returnParameters": { - "id": 4777, - "nodeType": "ParameterList", - "parameters": [], - "src": "9367:0:14" - }, - "scope": 5695, - "src": "9042:777:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 5091, - "nodeType": "Block", - "src": "10155:3367:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4832, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4813, - "src": "10206:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 4831, - "name": "tokenTypeIdIsValid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4613, - "src": "10187:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" - } - }, - "id": 4833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10187:32:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f69737375653a20746f6b656e54797065496420697320696e76616c6964", - "id": 4834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10233:38:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f86a2181a750c38fe320220bbb09ff4ad0f7ef7e279d4a54d38e0c9a572d55ba", - "typeString": "literal_string \"CLM8::_issue: tokenTypeId is invalid\"" - }, - "value": "CLM8::_issue: tokenTypeId is invalid" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f86a2181a750c38fe320220bbb09ff4ad0f7ef7e279d4a54d38e0c9a572d55ba", - "typeString": "literal_string \"CLM8::_issue: tokenTypeId is invalid\"" - } - ], - "id": 4830, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10166:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4835, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10166:115:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4836, - "nodeType": "ExpressionStatement", - "src": "10166:115:14" - }, - { - "condition": { - "argumentTypes": null, - "id": 4837, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "10296:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 4929, - "nodeType": "Block", - "src": "11192:698:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4892, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4890, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4813, - "src": "11210:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 4891, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11226:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "11210:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4902, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4813, - "src": "11430:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11446:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "11430:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4914, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4813, - "src": "11656:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 4915, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11672:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "11656:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4926, - "nodeType": "IfStatement", - "src": "11652:228:14", - "trueBody": { - "id": 4925, - "nodeType": "Block", - "src": "11675:205:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4919, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "11730:28:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4920, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4811, - "src": "11760:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4918, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "11722:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11722:46:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f69737375653a20697373756572206e6f742061207265676973746572656420656d697373696f6e732061756469746f72", - "id": 4922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11790:57:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9f6b5a6af0677b6c811ca17f6a49b477ec8466b5d0f1671b5f5bc0c6640e7312", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered emissions auditor\"" - }, - "value": "CLM8::_issue: issuer not a registered emissions auditor" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9f6b5a6af0677b6c811ca17f6a49b477ec8466b5d0f1671b5f5bc0c6640e7312", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered emissions auditor\"" - } - ], - "id": 4917, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11693:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11693:172:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4924, - "nodeType": "ExpressionStatement", - "src": "11693:172:14" - } - ] - } - }, - "id": 4927, - "nodeType": "IfStatement", - "src": "11426:454:14", - "trueBody": { - "id": 4913, - "nodeType": "Block", - "src": "11449:197:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4907, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4317, - "src": "11504:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4908, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4811, - "src": "11530:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4906, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "11496:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11496:42:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f69737375653a20697373756572206e6f7420612072656769737465726564206f6666736574206465616c6572", - "id": 4910, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11560:53:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5d62b5bf05e75686f342cac120b4e7404cb69fbea95d1a36e6163029b3098fe9", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered offset dealer\"" - }, - "value": "CLM8::_issue: issuer not a registered offset dealer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5d62b5bf05e75686f342cac120b4e7404cb69fbea95d1a36e6163029b3098fe9", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered offset dealer\"" - } - ], - "id": 4905, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11467:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4911, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11467:164:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4912, - "nodeType": "ExpressionStatement", - "src": "11467:164:14" - } - ] - } - }, - "id": 4928, - "nodeType": "IfStatement", - "src": "11206:674:14", - "trueBody": { - "id": 4901, - "nodeType": "Block", - "src": "11229:191:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4895, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "11284:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4896, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4811, - "src": "11307:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4894, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "11276:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11276:39:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f69737375653a20697373756572206e6f742061207265676973746572656420524543206465616c6572", - "id": 4898, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11337:50:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e876e83d73ed9a0b11585da7b471981f624aaa4d4555b27dee2e11458f191e1a", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered REC dealer\"" - }, - "value": "CLM8::_issue: issuer not a registered REC dealer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e876e83d73ed9a0b11585da7b471981f624aaa4d4555b27dee2e11458f191e1a", - "typeString": "literal_string \"CLM8::_issue: issuer not a registered REC dealer\"" - } - ], - "id": 4893, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "11247:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11247:158:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4900, - "nodeType": "ExpressionStatement", - "src": "11247:158:14" - } - ] - } - } - ] - }, - "id": 4930, - "nodeType": "IfStatement", - "src": "10292:1598:14", - "trueBody": { - "id": 4889, - "nodeType": "Block", - "src": "10309:877:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4840, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4838, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4813, - "src": "10327:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 4839, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10343:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "10327:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4841, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4813, - "src": "10348:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 4842, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10364:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "10348:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10327:38:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 4877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4875, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4813, - "src": "10943:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 4876, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10959:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "10943:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 4887, - "nodeType": "IfStatement", - "src": "10939:237:14", - "trueBody": { - "id": 4886, - "nodeType": "Block", - "src": "10962:214:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4880, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "11017:28:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4881, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4811, - "src": "11047:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4879, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "11009:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11009:46:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6973737565286c696d69746564293a20697373756572206e6f742061207265676973746572656420656d697373696f6e732061756469746f72", - "id": 4883, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11077:66:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_dac47969290ef1fde5eac4635120776641215b638200271b6bee6d814ec24796", - "typeString": "literal_string \"CLM8::_issue(limited): issuer not a registered emissions auditor\"" - }, - "value": "CLM8::_issue(limited): issuer not a registered emissions auditor" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_dac47969290ef1fde5eac4635120776641215b638200271b6bee6d814ec24796", - "typeString": "literal_string \"CLM8::_issue(limited): issuer not a registered emissions auditor\"" - } - ], - "id": 4878, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10980:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10980:181:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4885, - "nodeType": "ExpressionStatement", - "src": "10980:181:14" - } - ] - } - }, - "id": 4888, - "nodeType": "IfStatement", - "src": "10323:853:14", - "trueBody": { - "id": 4874, - "nodeType": "Block", - "src": "10368:565:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4846, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "10415:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10415:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 4848, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4302, - "src": "10429:8:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10415:22:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6973737565286c696d69746564293a206d73672e73656e646572206e6f742074696d656c6f636b", - "id": 4850, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10459:48:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a80146e02a2f237dc272397bcd64f791ea5d857075fd54b52b8e662ccf218633", - "typeString": "literal_string \"CLM8::_issue(limited): msg.sender not timelock\"" - }, - "value": "CLM8::_issue(limited): msg.sender not timelock" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a80146e02a2f237dc272397bcd64f791ea5d857075fd54b52b8e662ccf218633", - "typeString": "literal_string \"CLM8::_issue(limited): msg.sender not timelock\"" - } - ], - "id": 4845, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10386:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10386:139:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4852, - "nodeType": "ExpressionStatement", - "src": "10386:139:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4855, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "10580:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4856, - "name": "_issuee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "10600:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4854, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "10572:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4857, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10572:36:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6973737565286c696d69746564293a20697373756565206e6f742061646d696e", - "id": 4858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10630:41:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_dec8919b6f2b8be5c4a8bab9f20b9bffc284c792e17d615eda815e1f4b2b17fb", - "typeString": "literal_string \"CLM8::_issue(limited): issuee not admin\"" - }, - "value": "CLM8::_issue(limited): issuee not admin" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_dec8919b6f2b8be5c4a8bab9f20b9bffc284c792e17d615eda815e1f4b2b17fb", - "typeString": "literal_string \"CLM8::_issue(limited): issuee not admin\"" - } - ], - "id": 4853, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10543:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10543:146:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4860, - "nodeType": "ExpressionStatement", - "src": "10543:146:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 4870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4863, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "10744:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4864, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4811, - "src": "10767:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4862, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "10736:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10736:39:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4867, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4317, - "src": "10787:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 4868, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4811, - "src": "10813:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 4866, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "10779:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 4869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10779:42:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10736:85:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a5f6973737565286c696d69746564293a2070726f706f736572206e6f7420612072656769737465726564206465616c6572", - "id": 4871, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10843:57:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6f17c75c3dc24439b1efc1ee8b1f47e47009faf5a181028a200ec10f4bc7b726", - "typeString": "literal_string \"CLM8::_issue(limited): proposer not a registered dealer\"" - }, - "value": "CLM8::_issue(limited): proposer not a registered dealer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6f17c75c3dc24439b1efc1ee8b1f47e47009faf5a181028a200ec10f4bc7b726", - "typeString": "literal_string \"CLM8::_issue(limited): proposer not a registered dealer\"" - } - ], - "id": 4861, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10707:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10707:211:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4873, - "nodeType": "ExpressionStatement", - "src": "10707:211:14" - } - ] - } - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 4931, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4352, - "src": "11938:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 4933, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "increment", - "nodeType": "MemberAccess", - "referencedDeclaration": 2350, - "src": "11938:28:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Counter_$2327_storage_ptr_$returns$__$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer)" - } - }, - "id": 4934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11938:30:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4935, - "nodeType": "ExpressionStatement", - "src": "11938:30:14" - }, - { - "assignments": [ - 4937 - ], - "declarations": [ - { - "constant": false, - "id": 4937, - "mutability": "mutable", - "name": "tokenInfo", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5091, - "src": "12011:36:14", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails" - }, - "typeName": { - "contractScope": null, - "id": 4936, - "name": "CarbonTokenDetails", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4350, - "src": "12011:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4943, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4938, - "name": "_tokenDetails", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4356, - "src": "12050:13:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$4350_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage ref)" - } - }, - "id": 4942, - "indexExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 4939, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4352, - "src": "12064:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 4940, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "current", - "nodeType": "MemberAccess", - "referencedDeclaration": 2338, - "src": "12064:26:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Counter_$2327_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer) view returns (uint256)" - } - }, - "id": 4941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12064:28:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12050:43:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12011:82:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4944, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12104:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 4946, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4329, - "src": "12104:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 4947, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4352, - "src": "12124:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 4948, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "current", - "nodeType": "MemberAccess", - "referencedDeclaration": 2338, - "src": "12124:26:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Counter_$2327_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer) view returns (uint256)" - } - }, - "id": 4949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12124:28:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12104:48:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4951, - "nodeType": "ExpressionStatement", - "src": "12104:48:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4952, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12162:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 4954, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenTypeId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4331, - "src": "12162:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4955, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4813, - "src": "12186:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "12162:36:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 4957, - "nodeType": "ExpressionStatement", - "src": "12162:36:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4958, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12208:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 4960, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 4335, - "src": "12208:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4961, - "name": "_issuee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "12227:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "12208:26:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4963, - "nodeType": "ExpressionStatement", - "src": "12208:26:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4964, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12244:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 4966, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "issuer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4333, - "src": "12244:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4967, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4811, - "src": "12263:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "12244:26:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 4969, - "nodeType": "ExpressionStatement", - "src": "12244:26:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4970, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12280:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 4972, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "fromDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 4337, - "src": "12280:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4973, - "name": "_fromDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4817, - "src": "12301:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12280:30:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4975, - "nodeType": "ExpressionStatement", - "src": "12280:30:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4976, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12320:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 4978, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "thruDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 4339, - "src": "12320:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4979, - "name": "_thruDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4819, - "src": "12341:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12320:30:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4981, - "nodeType": "ExpressionStatement", - "src": "12320:30:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4982, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12360:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 4984, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "automaticRetireDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 4343, - "src": "12360:29:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4985, - "name": "_automaticRetireDate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4821, - "src": "12392:20:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12360:52:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4987, - "nodeType": "ExpressionStatement", - "src": "12360:52:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4988, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12422:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 4990, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "dateCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": 4341, - "src": "12422:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4991, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "12446:5:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 4992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12446:15:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12422:39:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 4994, - "nodeType": "ExpressionStatement", - "src": "12422:39:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 4999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4995, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12471:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 4997, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "metadata", - "nodeType": "MemberAccess", - "referencedDeclaration": 4345, - "src": "12471:18:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4998, - "name": "_metadata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4823, - "src": "12492:9:14", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "12471:30:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 5000, - "nodeType": "ExpressionStatement", - "src": "12471:30:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 5005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5001, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12511:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5003, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "manifest", - "nodeType": "MemberAccess", - "referencedDeclaration": 4347, - "src": "12511:18:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 5004, - "name": "_manifest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4825, - "src": "12532:9:14", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "12511:30:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 5006, - "nodeType": "ExpressionStatement", - "src": "12511:30:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 5011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5007, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12551:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5009, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "description", - "nodeType": "MemberAccess", - "referencedDeclaration": 4349, - "src": "12551:21:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 5010, - "name": "_description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4827, - "src": "12575:12:14", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "12551:36:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 5012, - "nodeType": "ExpressionStatement", - "src": "12551:36:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5016, - "name": "_issuee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4809, - "src": "12610:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 5017, - "name": "_numOfUniqueTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4352, - "src": "12619:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Counter_$2327_storage", - "typeString": "struct CountersUpgradeable.Counter storage ref" - } - }, - "id": 5018, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "current", - "nodeType": "MemberAccess", - "referencedDeclaration": 2338, - "src": "12619:26:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_Counter_$2327_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Counter_$2327_storage_ptr_$", - "typeString": "function (struct CountersUpgradeable.Counter storage pointer) view returns (uint256)" - } - }, - "id": 5019, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12619:28:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5020, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4815, - "src": "12649:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "", - "id": 5021, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12660:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 5013, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "12598:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5015, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 1394, - "src": "12598:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,uint256,uint256,bytes memory)" - } - }, - "id": 5022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12598:65:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5023, - "nodeType": "ExpressionStatement", - "src": "12598:65:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 5026, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5024, - "name": "_tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4813, - "src": "12722:12:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 5025, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12738:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "12722:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5057, - "nodeType": "IfStatement", - "src": "12718:245:14", - "trueBody": { - "id": 5056, - "nodeType": "Block", - "src": "12741:222:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5030, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12767:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5031, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 4335, - "src": "12767:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5032, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12785:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5033, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4329, - "src": "12785:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5034, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4815, - "src": "12804:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5027, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "12755:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_burn", - "nodeType": "MemberAccess", - "referencedDeclaration": 1571, - "src": "12755:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 5035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12755:59:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5036, - "nodeType": "ExpressionStatement", - "src": "12755:59:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 5054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5037, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4362, - "src": "12828:16:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 5042, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5038, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12845:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5039, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4329, - "src": "12845:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12828:35:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5043, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5040, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12864:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5041, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 4335, - "src": "12864:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "12828:53:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5052, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4815, - "src": "12942:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5044, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4362, - "src": "12884:16:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 5047, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5045, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12901:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5046, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4329, - "src": "12901:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12884:35:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5050, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5048, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "12920:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5049, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 4335, - "src": "12920:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12884:53:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 576, - "src": "12884:57:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 5053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12884:68:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12828:124:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5055, - "nodeType": "ExpressionStatement", - "src": "12828:124:14" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5059, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4815, - "src": "13062:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5060, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4362, - "src": "13085:16:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 5063, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5061, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13102:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5062, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4329, - "src": "13102:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13085:35:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5066, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5064, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13121:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5065, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 4335, - "src": "13121:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13085:53:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5067, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13152:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5068, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4329, - "src": "13152:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5069, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13183:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5070, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenTypeId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4331, - "src": "13183:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5071, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13218:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5072, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4333, - "src": "13218:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5073, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13248:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5074, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuee", - "nodeType": "MemberAccess", - "referencedDeclaration": 4335, - "src": "13248:16:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5075, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13278:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5076, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "fromDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 4337, - "src": "13278:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5077, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13310:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5078, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "thruDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 4339, - "src": "13310:18:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5079, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13342:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5080, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "automaticRetireDate", - "nodeType": "MemberAccess", - "referencedDeclaration": 4343, - "src": "13342:29:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5081, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13385:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5082, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "dateCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": 4341, - "src": "13385:21:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5083, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13420:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5084, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "metadata", - "nodeType": "MemberAccess", - "referencedDeclaration": 4345, - "src": "13420:18:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5085, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13452:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5086, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "manifest", - "nodeType": "MemberAccess", - "referencedDeclaration": 4347, - "src": "13452:18:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5087, - "name": "tokenInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4937, - "src": "13484:9:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5088, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "description", - "nodeType": "MemberAccess", - "referencedDeclaration": 4349, - "src": "13484:21:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - }, - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - ], - "id": 5058, - "name": "TokenCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4392, - "src": "13036:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint8_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,uint256,uint8,address,address,uint256,uint256,uint256,uint256,string memory,string memory,string memory)" - } - }, - "id": 5089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13036:479:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5090, - "nodeType": "EmitStatement", - "src": "13031:484:14" - } - ] - }, - "documentation": null, - "id": 5092, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_issue", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4828, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4809, - "mutability": "mutable", - "name": "_issuee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5092, - "src": "9850:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4808, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9850:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4811, - "mutability": "mutable", - "name": "_issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5092, - "src": "9875:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4810, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9875:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4813, - "mutability": "mutable", - "name": "_tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5092, - "src": "9900:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4812, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "9900:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4815, - "mutability": "mutable", - "name": "_quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5092, - "src": "9928:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4814, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9928:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4817, - "mutability": "mutable", - "name": "_fromDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5092, - "src": "9955:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4816, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9955:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4819, - "mutability": "mutable", - "name": "_thruDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5092, - "src": "9982:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4818, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9982:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4821, - "mutability": "mutable", - "name": "_automaticRetireDate", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5092, - "src": "10009:28:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4820, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10009:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4823, - "mutability": "mutable", - "name": "_metadata", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5092, - "src": "10047:23:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4822, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10047:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4825, - "mutability": "mutable", - "name": "_manifest", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5092, - "src": "10080:23:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4824, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10080:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4827, - "mutability": "mutable", - "name": "_description", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5092, - "src": "10113:26:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4826, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "10113:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9840:305:14" - }, - "returnParameters": { - "id": 4829, - "nodeType": "ParameterList", - "parameters": [], - "src": "10155:0:14" - }, - "scope": 5695, - "src": "9825:3697:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 5126, - "nodeType": "Block", - "src": "13807:217:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5106, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5097, - "src": "13837:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5105, - "name": "tokenExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4589, - "src": "13825:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 5107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13825:20:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a6d696e743a20746f6b656e496420646f6573206e6f74206578697374", - "id": 5108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13847:36:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3175692cba4a63612bbc69d4e8d0afd91c83d20cccc2c52b6f3b4f13e2f04c22", - "typeString": "literal_string \"CLM8::mint: tokenId does not exist\"" - }, - "value": "CLM8::mint: tokenId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3175692cba4a63612bbc69d4e8d0afd91c83d20cccc2c52b6f3b4f13e2f04c22", - "typeString": "literal_string \"CLM8::mint: tokenId does not exist\"" - } - ], - "id": 5104, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "13817:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13817:67:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5110, - "nodeType": "ExpressionStatement", - "src": "13817:67:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "13902:12:14", - "subExpression": { - "argumentTypes": null, - "id": 5112, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "13903:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a6d696e743a2063616e6e6f74206d696e74206e657720746f6b656e7320696e206c696d69746564206d6f6465", - "id": 5114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13916:52:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8d22f1b3de4758a72f18b8058f35911d89440d461da96e267acf4260761c5e2f", - "typeString": "literal_string \"CLM8::mint: cannot mint new tokens in limited mode\"" - }, - "value": "CLM8::mint: cannot mint new tokens in limited mode" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8d22f1b3de4758a72f18b8058f35911d89440d461da96e267acf4260761c5e2f", - "typeString": "literal_string \"CLM8::mint: cannot mint new tokens in limited mode\"" - } - ], - "id": 5111, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "13894:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13894:75:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5116, - "nodeType": "ExpressionStatement", - "src": "13894:75:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5120, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5095, - "src": "13991:2:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5121, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5097, - "src": "13995:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5122, - "name": "quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5099, - "src": "14004:8:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "", - "id": 5123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14014:2:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 5117, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "13979:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 1394, - "src": "13979:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,uint256,uint256,bytes memory)" - } - }, - "id": 5124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13979:38:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5125, - "nodeType": "ExpressionStatement", - "src": "13979:38:14" - } - ] - }, - "documentation": { - "id": 5093, - "nodeType": "StructuredDocumentation", - "src": "13528:174:14", - "text": " @dev mints more of an existing token\n @param to reciepient of token\n @param tokenId token to mint more of\n @param quantity amount to mint" - }, - "functionSelector": "156e29f6", - "id": 5127, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5102, - "modifierName": { - "argumentTypes": null, - "id": 5101, - "name": "onlyAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "13793:9:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "13793:9:14" - } - ], - "name": "mint", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5100, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5095, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5127, - "src": "13721:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5094, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13721:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5097, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5127, - "src": "13733:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5096, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13733:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5099, - "mutability": "mutable", - "name": "quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5127, - "src": "13750:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5098, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13750:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13720:47:14" - }, - "returnParameters": { - "id": 5103, - "nodeType": "ParameterList", - "parameters": [], - "src": "13807:0:14" - }, - "scope": 5695, - "src": "13707:317:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5166, - "nodeType": "Block", - "src": "14261:387:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5137, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5130, - "src": "14291:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5136, - "name": "tokenExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4589, - "src": "14279:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 5138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14279:20:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a676574546f6b656e547970653a20746f6b656e496420646f6573206e6f74206578697374", - "id": 5139, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14301:44:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_49a5e514b0667a7de3141e112d061888a3cef41b47c200bbafb41e729cf72961", - "typeString": "literal_string \"CLM8::getTokenType: tokenId does not exist\"" - }, - "value": "CLM8::getTokenType: tokenId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_49a5e514b0667a7de3141e112d061888a3cef41b47c200bbafb41e729cf72961", - "typeString": "literal_string \"CLM8::getTokenType: tokenId does not exist\"" - } - ], - "id": 5135, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14271:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14271:75:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5141, - "nodeType": "ExpressionStatement", - "src": "14271:75:14" - }, - { - "assignments": [ - 5143 - ], - "declarations": [ - { - "constant": false, - "id": 5143, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5166, - "src": "14356:32:14", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails" - }, - "typeName": { - "contractScope": null, - "id": 5142, - "name": "CarbonTokenDetails", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4350, - "src": "14356:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5147, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5144, - "name": "_tokenDetails", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4356, - "src": "14391:13:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$4350_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage ref)" - } - }, - "id": 5146, - "indexExpression": { - "argumentTypes": null, - "id": 5145, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5130, - "src": "14405:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14391:22:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14356:57:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 5151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5148, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5143, - "src": "14428:5:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5149, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenTypeId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4331, - "src": "14428:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 5150, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14449:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "14428:22:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 5158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5155, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5143, - "src": "14524:5:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage pointer" - } - }, - "id": 5156, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "tokenTypeId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4331, - "src": "14524:17:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14545:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "14524:22:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5162, - "nodeType": "IfStatement", - "src": "14520:85:14", - "trueBody": { - "id": 5161, - "nodeType": "Block", - "src": "14548:57:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "436172626f6e20456d697373696f6e73204f6666736574", - "id": 5159, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14569:25:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4341f867864cabd004f45b09af8d0716f81939d42b6488ac4d53c7be4375f2c8", - "typeString": "literal_string \"Carbon Emissions Offset\"" - }, - "value": "Carbon Emissions Offset" - }, - "functionReturnParameters": 5134, - "id": 5160, - "nodeType": "Return", - "src": "14562:32:14" - } - ] - } - }, - "id": 5163, - "nodeType": "IfStatement", - "src": "14424:181:14", - "trueBody": { - "id": 5154, - "nodeType": "Block", - "src": "14452:62:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "52656e657761626c6520456e65726779204365727469666963617465", - "id": 5152, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14473:30:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_491ffda04c2fd3af4764451485fdf42eea413d5592b658373c8490f938ee7eaf", - "typeString": "literal_string \"Renewable Energy Certificate\"" - }, - "value": "Renewable Energy Certificate" - }, - "functionReturnParameters": 5134, - "id": 5153, - "nodeType": "Return", - "src": "14466:37:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "4175646974656420456d697373696f6e73", - "id": 5164, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14621:19:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_046f3c60b998876753271db8209fbb3f30fc328b5a52d84872c0f1bfc6a7cd27", - "typeString": "literal_string \"Audited Emissions\"" - }, - "value": "Audited Emissions" - }, - "functionReturnParameters": 5134, - "id": 5165, - "nodeType": "Return", - "src": "14614:26:14" - } - ] - }, - "documentation": { - "id": 5128, - "nodeType": "StructuredDocumentation", - "src": "14030:121:14", - "text": " @dev returns the token name for the given token as a string value\n @param tokenId token to check" - }, - "functionSelector": "76aed2e1", - "id": 5167, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTokenType", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5130, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5167, - "src": "14178:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5129, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14178:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14177:17:14" - }, - "returnParameters": { - "id": 5134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5133, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5167, - "src": "14242:13:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5132, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14242:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14241:15:14" - }, - "scope": 5695, - "src": "14156:492:14", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5194, - "nodeType": "Block", - "src": "14880:185:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5179, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5172, - "src": "14910:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5178, - "name": "tokenExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4589, - "src": "14898:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 5180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14898:20:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a676574546f6b656e52657469726564416d6f756e743a20746f6b656e496420646f6573206e6f74206578697374", - "id": 5181, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14920:53:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_be6225fb118e0cf17287ed8c59a07d446aeb37b4d3d019f824bfa04f1c30594e", - "typeString": "literal_string \"CLM8::getTokenRetiredAmount: tokenId does not exist\"" - }, - "value": "CLM8::getTokenRetiredAmount: tokenId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_be6225fb118e0cf17287ed8c59a07d446aeb37b4d3d019f824bfa04f1c30594e", - "typeString": "literal_string \"CLM8::getTokenRetiredAmount: tokenId does not exist\"" - } - ], - "id": 5177, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "14890:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14890:84:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5183, - "nodeType": "ExpressionStatement", - "src": "14890:84:14" - }, - { - "assignments": [ - 5185 - ], - "declarations": [ - { - "constant": false, - "id": 5185, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5194, - "src": "14984:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5184, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14984:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5191, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5186, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4362, - "src": "15001:16:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 5188, - "indexExpression": { - "argumentTypes": null, - "id": 5187, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5172, - "src": "15018:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15001:25:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5190, - "indexExpression": { - "argumentTypes": null, - "id": 5189, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5170, - "src": "15027:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15001:34:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14984:51:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 5192, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5185, - "src": "15052:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 5176, - "id": 5193, - "nodeType": "Return", - "src": "15045:13:14" - } - ] - }, - "documentation": { - "id": 5168, - "nodeType": "StructuredDocumentation", - "src": "14654:98:14", - "text": " @dev returns the retired amount on a token\n @param tokenId token to check" - }, - "functionSelector": "a0d975a7", - "id": 5195, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTokenRetiredAmount", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5173, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5170, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5195, - "src": "14788:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5169, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14788:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5172, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5195, - "src": "14805:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5171, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14805:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14787:34:14" - }, - "returnParameters": { - "id": 5176, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5175, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5195, - "src": "14867:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5174, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14867:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14866:9:14" - }, - "scope": 5695, - "src": "14757:308:14", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 5258, - "nodeType": "Block", - "src": "15375:463:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5207, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5198, - "src": "15405:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5206, - "name": "tokenExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4589, - "src": "15393:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 5208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15393:20:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a7265746972653a20746f6b656e496420646f6573206e6f74206578697374", - "id": 5209, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15415:38:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_30333e2bb7e8c03e06cef8c0f23d8a2a0fd4c4ea5501e1930071fdc19db4a6af", - "typeString": "literal_string \"CLM8::retire: tokenId does not exist\"" - }, - "value": "CLM8::retire: tokenId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_30333e2bb7e8c03e06cef8c0f23d8a2a0fd4c4ea5501e1930071fdc19db4a6af", - "typeString": "literal_string \"CLM8::retire: tokenId does not exist\"" - } - ], - "id": 5205, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15385:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15385:69:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5211, - "nodeType": "ExpressionStatement", - "src": "15385:69:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 5220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5213, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5200, - "src": "15474:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5216, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15500:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15500:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5218, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5198, - "src": "15512:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5214, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "15484:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 941, - "src": "15484:15:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view returns (uint256)" - } - }, - "id": 5219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15484:36:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15474:46:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 5221, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "15473:48:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a7265746972653a206e6f7420656e6f75676820617661696c61626c652062616c616e636520746f20726574697265", - "id": 5222, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15523:54:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_66357a6d5ff716e85ee4923532add7e7faea2fe8c0ef0a64e2e97c29c925efd2", - "typeString": "literal_string \"CLM8::retire: not enough available balance to retire\"" - }, - "value": "CLM8::retire: not enough available balance to retire" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_66357a6d5ff716e85ee4923532add7e7faea2fe8c0ef0a64e2e97c29c925efd2", - "typeString": "literal_string \"CLM8::retire: not enough available balance to retire\"" - } - ], - "id": 5212, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "15464:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15464:115:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5224, - "nodeType": "ExpressionStatement", - "src": "15464:115:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5228, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15602:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15602:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5230, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5198, - "src": "15614:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5231, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5200, - "src": "15623:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5225, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "15590:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_burn", - "nodeType": "MemberAccess", - "referencedDeclaration": 1571, - "src": "15590:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 5232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15590:40:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5233, - "nodeType": "ExpressionStatement", - "src": "15590:40:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 5249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5234, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4362, - "src": "15640:16:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 5238, - "indexExpression": { - "argumentTypes": null, - "id": 5235, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5198, - "src": "15657:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15640:25:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5239, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5236, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15666:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15666:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "15640:37:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5247, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5200, - "src": "15722:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5240, - "name": "_retiredBalances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4362, - "src": "15680:16:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - } - }, - "id": 5242, - "indexExpression": { - "argumentTypes": null, - "id": 5241, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5198, - "src": "15697:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15680:25:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 5245, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5243, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15706:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15706:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15680:37:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 576, - "src": "15680:41:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 5248, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15680:49:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15640:89:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 5250, - "nodeType": "ExpressionStatement", - "src": "15640:89:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5252, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "15770:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15770:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5254, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5198, - "src": "15794:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5255, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5200, - "src": "15815:6:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5251, - "name": "TokenRetired", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4400, - "src": "15744:12:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 5256, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15744:87:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5257, - "nodeType": "EmitStatement", - "src": "15739:92:14" - } - ] - }, - "documentation": { - "id": 5196, - "nodeType": "StructuredDocumentation", - "src": "15071:202:14", - "text": " @dev sets the token to the retire state to disable transfers, mints and burns\n @param tokenId token to set in pause state\n Only contract owner can pause or resume tokens" - }, - "functionSelector": "293a7f2e", - "id": 5259, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5203, - "modifierName": { - "argumentTypes": null, - "id": 5202, - "name": "consumerOrDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4520, - "src": "15358:16:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "15358:16:14" - } - ], - "name": "retire", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5201, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5198, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5259, - "src": "15303:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15303:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5200, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5259, - "src": "15328:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5199, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15328:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15293:55:14" - }, - "returnParameters": { - "id": 5204, - "nodeType": "ParameterList", - "parameters": [], - "src": "15375:0:14" - }, - "scope": 5695, - "src": "15278:560:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5298, - "nodeType": "Block", - "src": "16035:309:14", - "statements": [ - { - "assignments": [ - 5268 - ], - "declarations": [ - { - "constant": false, - "id": 5268, - "mutability": "mutable", - "name": "isRecDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5298, - "src": "16045:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5267, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16045:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5273, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5270, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "16072:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5271, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5262, - "src": "16095:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5269, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "16064:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16064:39:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16045:58:14" - }, - { - "assignments": [ - 5275 - ], - "declarations": [ - { - "constant": false, - "id": 5275, - "mutability": "mutable", - "name": "isCeoDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5298, - "src": "16113:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5274, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16113:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5280, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5277, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4317, - "src": "16140:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5278, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5262, - "src": "16166:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5276, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "16132:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16132:42:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16113:61:14" - }, - { - "assignments": [ - 5282 - ], - "declarations": [ - { - "constant": false, - "id": 5282, - "mutability": "mutable", - "name": "isAeDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5298, - "src": "16184:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5281, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16184:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5287, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5284, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "16210:28:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5285, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5262, - "src": "16240:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5283, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "16202:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16202:46:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16184:64:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 5292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 5290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5288, - "name": "isRecDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5268, - "src": "16262:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 5289, - "name": "isCeoDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5275, - "src": "16277:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "16262:26:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 5291, - "name": "isAeDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5282, - "src": "16292:10:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "16262:40:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5295, - "nodeType": "IfStatement", - "src": "16258:57:14", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 5293, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16311:4:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 5266, - "id": 5294, - "nodeType": "Return", - "src": "16304:11:14" - } - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 5296, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16332:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 5266, - "id": 5297, - "nodeType": "Return", - "src": "16325:12:14" - } - ] - }, - "documentation": { - "id": 5260, - "nodeType": "StructuredDocumentation", - "src": "15844:114:14", - "text": " @dev returns true if Dealer's account is registered\n @param account address of the dealer" - }, - "functionSelector": "69f7ef44", - "id": 5299, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isDealerRegistered", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5263, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5262, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5299, - "src": "15991:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5261, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15991:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15990:17:14" - }, - "returnParameters": { - "id": 5266, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5265, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5299, - "src": "16029:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5264, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16029:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16028:6:14" - }, - "scope": 5695, - "src": "15963:381:14", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 5312, - "nodeType": "Block", - "src": "16546:61:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5308, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4327, - "src": "16571:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5309, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5302, - "src": "16592:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5307, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "16563:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5310, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16563:37:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5306, - "id": 5311, - "nodeType": "Return", - "src": "16556:44:14" - } - ] - }, - "documentation": { - "id": 5300, - "nodeType": "StructuredDocumentation", - "src": "16350:117:14", - "text": " @dev returns true if Consumers's account is registered\n @param account address of the dealer" - }, - "functionSelector": "33781a0e", - "id": 5313, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isConsumerRegistered", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5302, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5313, - "src": "16502:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5301, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16502:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16501:17:14" - }, - "returnParameters": { - "id": 5306, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5305, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5313, - "src": "16540:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5304, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16540:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16539:6:14" - }, - "scope": 5695, - "src": "16472:135:14", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 5330, - "nodeType": "Block", - "src": "16829:86:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 5327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5322, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5316, - "src": "16866:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5321, - "name": "isDealerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5299, - "src": "16847:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 5323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16847:27:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5325, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5316, - "src": "16899:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5324, - "name": "isConsumerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5313, - "src": "16878:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 5326, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16878:29:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "16847:60:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 5328, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "16846:62:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5320, - "id": 5329, - "nodeType": "Return", - "src": "16839:69:14" - } - ] - }, - "documentation": { - "id": 5314, - "nodeType": "StructuredDocumentation", - "src": "16613:138:14", - "text": " @dev returns true if Consumers's or Dealer's account is registered\n @param account address of the consumer/dealer" - }, - "id": 5331, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isDealerOrConsumer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5317, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5316, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5331, - "src": "16784:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16784:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16783:17:14" - }, - "returnParameters": { - "id": 5320, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5319, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5331, - "src": "16823:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5318, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "16823:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16822:6:14" - }, - "scope": 5695, - "src": "16756:159:14", - "stateMutability": "view", - "virtual": false, - "visibility": "private" - }, - { - "body": { - "id": 5389, - "nodeType": "Block", - "src": "17146:422:14", - "statements": [ - { - "assignments": [ - 5348 - ], - "declarations": [ - { - "constant": false, - "id": 5348, - "mutability": "mutable", - "name": "isAdmin", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5389, - "src": "17156:12:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5347, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17156:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5353, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5350, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "17179:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5351, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5334, - "src": "17199:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5349, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "17171:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17171:36:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17156:51:14" - }, - { - "assignments": [ - 5355 - ], - "declarations": [ - { - "constant": false, - "id": 5355, - "mutability": "mutable", - "name": "isRecDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5389, - "src": "17217:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5354, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17217:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5360, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5357, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "17244:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5358, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5334, - "src": "17267:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5356, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "17236:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17236:39:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17217:58:14" - }, - { - "assignments": [ - 5362 - ], - "declarations": [ - { - "constant": false, - "id": 5362, - "mutability": "mutable", - "name": "isCeoDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5389, - "src": "17285:16:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5361, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17285:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5367, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5364, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4317, - "src": "17312:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5365, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5334, - "src": "17338:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5363, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "17304:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17304:42:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17285:61:14" - }, - { - "assignments": [ - 5369 - ], - "declarations": [ - { - "constant": false, - "id": 5369, - "mutability": "mutable", - "name": "isAeDealer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5389, - "src": "17356:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5368, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17356:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5374, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5371, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "17382:28:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5372, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5334, - "src": "17412:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5370, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "17374:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17374:46:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17356:64:14" - }, - { - "assignments": [ - 5376 - ], - "declarations": [ - { - "constant": false, - "id": 5376, - "mutability": "mutable", - "name": "isConsumer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5389, - "src": "17430:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5375, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17430:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5381, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5378, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4327, - "src": "17456:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5379, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5334, - "src": "17477:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5377, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "17448:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17448:37:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17430:55:14" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 5382, - "name": "isAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5348, - "src": "17503:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5383, - "name": "isRecDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5355, - "src": "17512:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5384, - "name": "isCeoDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5362, - "src": "17525:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5385, - "name": "isAeDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5369, - "src": "17538:10:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 5386, - "name": "isConsumer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5376, - "src": "17550:10:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 5387, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17502:59:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bool_$_t_bool_$_t_bool_$_t_bool_$", - "typeString": "tuple(bool,bool,bool,bool,bool)" - } - }, - "functionReturnParameters": 5346, - "id": 5388, - "nodeType": "Return", - "src": "17495:66:14" - } - ] - }, - "documentation": { - "id": 5332, - "nodeType": "StructuredDocumentation", - "src": "16921:132:14", - "text": " @dev Helper function for returning tuple of bools of role membership\n @param account address to check roles" - }, - "functionSelector": "ce6ccfaf", - "id": 5390, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getRoles", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5335, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5334, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5390, - "src": "17076:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5333, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17076:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17075:17:14" - }, - "returnParameters": { - "id": 5346, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5337, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5390, - "src": "17116:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5336, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17116:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5339, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5390, - "src": "17122:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5338, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17122:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5341, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5390, - "src": "17128:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5340, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17128:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5343, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5390, - "src": "17134:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5342, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17134:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5345, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5390, - "src": "17140:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5344, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17140:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17115:30:14" - }, - "scope": 5695, - "src": "17058:510:14", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5442, - "nodeType": "Block", - "src": "17849:551:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5402, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5395, - "src": "17886:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 5401, - "name": "tokenTypeIdIsValid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4613, - "src": "17867:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" - } - }, - "id": 5403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17867:31:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a72656769737465724465616c65723a20746f6b656e54797065496420646f6573206e6f74206578697374", - "id": 5404, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17900:50:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_92b1859612b02a849bff381ce7b554688df61f88537490eb94438ad196998472", - "typeString": "literal_string \"CLM8::registerDealer: tokenTypeId does not exist\"" - }, - "value": "CLM8::registerDealer: tokenTypeId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_92b1859612b02a849bff381ce7b554688df61f88537490eb94438ad196998472", - "typeString": "literal_string \"CLM8::registerDealer: tokenTypeId does not exist\"" - } - ], - "id": 5400, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "17859:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17859:92:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5406, - "nodeType": "ExpressionStatement", - "src": "17859:92:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 5409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5407, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5395, - "src": "17965:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 5408, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17980:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "17965:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 5418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5416, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5395, - "src": "18059:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5417, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18074:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "18059:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 5430, - "nodeType": "Block", - "src": "18152:73:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5426, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "18176:28:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5427, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5393, - "src": "18206:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5425, - "name": "grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "18166:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 5428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18166:48:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5429, - "nodeType": "ExpressionStatement", - "src": "18166:48:14" - } - ] - }, - "id": 5431, - "nodeType": "IfStatement", - "src": "18055:170:14", - "trueBody": { - "id": 5424, - "nodeType": "Block", - "src": "18077:69:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5420, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4317, - "src": "18101:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5421, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5393, - "src": "18127:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5419, - "name": "grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "18091:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 5422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18091:44:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5423, - "nodeType": "ExpressionStatement", - "src": "18091:44:14" - } - ] - } - }, - "id": 5432, - "nodeType": "IfStatement", - "src": "17961:264:14", - "trueBody": { - "id": 5415, - "nodeType": "Block", - "src": "17983:66:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5411, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "18007:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5412, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5393, - "src": "18030:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5410, - "name": "grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "17997:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 5413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17997:41:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5414, - "nodeType": "ExpressionStatement", - "src": "17997:41:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5434, - "name": "REGISTERED_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "18326:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5435, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5393, - "src": "18345:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5433, - "name": "grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "18316:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 5436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18316:37:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5437, - "nodeType": "ExpressionStatement", - "src": "18316:37:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5439, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5393, - "src": "18385:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5438, - "name": "RegisteredDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4412, - "src": "18368:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 5440, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18368:25:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5441, - "nodeType": "EmitStatement", - "src": "18363:30:14" - } - ] - }, - "documentation": { - "id": 5391, - "nodeType": "StructuredDocumentation", - "src": "17574:171:14", - "text": " @dev Only contract owner can register Dealers\n @param account address of the dealer to register\n Only registered Dealers can transfer tokens" - }, - "functionSelector": "31aa4b20", - "id": 5443, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5398, - "modifierName": { - "argumentTypes": null, - "id": 5397, - "name": "onlyAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "17835:9:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "17835:9:14" - } - ], - "name": "registerDealer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5396, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5393, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5443, - "src": "17774:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5392, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17774:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5395, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5443, - "src": "17791:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 5394, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "17791:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17773:36:14" - }, - "returnParameters": { - "id": 5399, - "nodeType": "ParameterList", - "parameters": [], - "src": "17849:0:14" - }, - "scope": 5695, - "src": "17750:650:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5472, - "nodeType": "Block", - "src": "18612:267:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 5451, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "18626:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5462, - "nodeType": "IfStatement", - "src": "18622:160:14", - "trueBody": { - "id": 5461, - "nodeType": "Block", - "src": "18639:143:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5454, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "18669:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5455, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "18689:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5456, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18689:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 5453, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "18661:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18661:39:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a7265676973746572436f6e73756d6572286c696d69746564293a206f6e6c792061646d696e2063616e20726567697374657220636f6e73756d657273", - "id": 5458, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18702:68:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9d012b03913dbafdeab06dc3cff55382e05ba1613866529ad1c56101814d92ad", - "typeString": "literal_string \"CLM8::registerConsumer(limited): only admin can register consumers\"" - }, - "value": "CLM8::registerConsumer(limited): only admin can register consumers" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9d012b03913dbafdeab06dc3cff55382e05ba1613866529ad1c56101814d92ad", - "typeString": "literal_string \"CLM8::registerConsumer(limited): only admin can register consumers\"" - } - ], - "id": 5452, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "18653:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5459, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18653:118:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5460, - "nodeType": "ExpressionStatement", - "src": "18653:118:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5464, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4327, - "src": "18801:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5465, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5446, - "src": "18822:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5463, - "name": "grantRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "18791:9:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 5466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18791:39:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5467, - "nodeType": "ExpressionStatement", - "src": "18791:39:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5469, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5446, - "src": "18864:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5468, - "name": "RegisteredConsumer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4404, - "src": "18845:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 5470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18845:27:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5471, - "nodeType": "EmitStatement", - "src": "18840:32:14" - } - ] - }, - "documentation": { - "id": 5444, - "nodeType": "StructuredDocumentation", - "src": "18406:138:14", - "text": " @dev returns true if Consumer's account is registered for the given token\n @param account address of the consumer" - }, - "functionSelector": "44b22fdd", - "id": 5473, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5449, - "modifierName": { - "argumentTypes": null, - "id": 5448, - "name": "onlyDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4557, - "src": "18601:10:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "18601:10:14" - } - ], - "name": "registerConsumer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5447, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5446, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5473, - "src": "18575:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5445, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18575:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18574:17:14" - }, - "returnParameters": { - "id": 5450, - "nodeType": "ParameterList", - "parameters": [], - "src": "18612:0:14" - }, - "scope": 5695, - "src": "18549:330:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5537, - "nodeType": "Block", - "src": "19106:634:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5485, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5478, - "src": "19143:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 5484, - "name": "tokenTypeIdIsValid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4613, - "src": "19124:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" - } - }, - "id": 5486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19124:31:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a756e72656769737465724465616c65723a20746f6b656e54797065496420646f6573206e6f74206578697374", - "id": 5487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19157:52:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_38d15fd88f252be12a6e97f72dde57126777ac3dd32b0e40c44a34ba9f2d12f3", - "typeString": "literal_string \"CLM8::unregisterDealer: tokenTypeId does not exist\"" - }, - "value": "CLM8::unregisterDealer: tokenTypeId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_38d15fd88f252be12a6e97f72dde57126777ac3dd32b0e40c44a34ba9f2d12f3", - "typeString": "literal_string \"CLM8::unregisterDealer: tokenTypeId does not exist\"" - } - ], - "id": 5483, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "19116:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19116:94:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5489, - "nodeType": "ExpressionStatement", - "src": "19116:94:14" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 5492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5490, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5478, - "src": "19224:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 5491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19239:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "19224:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 5503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 5501, - "name": "tokenTypeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5478, - "src": "19325:11:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 5502, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19340:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "19325:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 5519, - "nodeType": "Block", - "src": "19425:80:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5515, - "name": "REGISTERED_EMISSIONS_AUDITOR", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4322, - "src": "19456:28:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5516, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5476, - "src": "19486:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 5512, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "19439:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "revokeRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 193, - "src": "19439:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 5517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19439:55:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5518, - "nodeType": "ExpressionStatement", - "src": "19439:55:14" - } - ] - }, - "id": 5520, - "nodeType": "IfStatement", - "src": "19321:184:14", - "trueBody": { - "id": 5511, - "nodeType": "Block", - "src": "19343:76:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5507, - "name": "REGISTERED_OFFSET_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4317, - "src": "19374:24:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5508, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5476, - "src": "19400:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 5504, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "19357:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "revokeRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 193, - "src": "19357:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 5509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19357:51:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5510, - "nodeType": "ExpressionStatement", - "src": "19357:51:14" - } - ] - } - }, - "id": 5521, - "nodeType": "IfStatement", - "src": "19220:285:14", - "trueBody": { - "id": 5500, - "nodeType": "Block", - "src": "19242:73:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5496, - "name": "REGISTERED_REC_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4312, - "src": "19273:21:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5497, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5476, - "src": "19296:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 5493, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "19256:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "revokeRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 193, - "src": "19256:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 5498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19256:48:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5499, - "nodeType": "ExpressionStatement", - "src": "19256:48:14" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "id": 5525, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "19598:28:14", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5523, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5476, - "src": "19618:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5522, - "name": "isDealerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5299, - "src": "19599:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 5524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19599:27:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5532, - "nodeType": "IfStatement", - "src": "19594:97:14", - "trueBody": { - "id": 5531, - "nodeType": "Block", - "src": "19628:63:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5527, - "name": "REGISTERED_DEALER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "19653:17:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5528, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5476, - "src": "19672:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5526, - "name": "revokeRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "19642:10:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 5529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19642:38:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5530, - "nodeType": "ExpressionStatement", - "src": "19642:38:14" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5534, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5476, - "src": "19725:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5533, - "name": "UnregisteredDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4416, - "src": "19706:18:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 5535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19706:27:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5536, - "nodeType": "EmitStatement", - "src": "19701:32:14" - } - ] - }, - "documentation": { - "id": 5474, - "nodeType": "StructuredDocumentation", - "src": "18885:115:14", - "text": " @dev Only contract owner can unregister Dealers\n @param account address to be unregistered" - }, - "functionSelector": "e2e564f2", - "id": 5538, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5481, - "modifierName": { - "argumentTypes": null, - "id": 5480, - "name": "onlyAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "19092:9:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "19092:9:14" - } - ], - "name": "unregisterDealer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5479, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5476, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5538, - "src": "19031:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5475, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19031:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5478, - "mutability": "mutable", - "name": "tokenTypeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5538, - "src": "19048:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 5477, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "19048:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19030:36:14" - }, - "returnParameters": { - "id": 5482, - "nodeType": "ParameterList", - "parameters": [], - "src": "19106:0:14" - }, - "scope": 5695, - "src": "19005:735:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5569, - "nodeType": "Block", - "src": "19933:280:14", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 5546, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "19947:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 5557, - "nodeType": "IfStatement", - "src": "19943:164:14", - "trueBody": { - "id": 5556, - "nodeType": "Block", - "src": "19960:147:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5549, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "19990:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5550, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "20010:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20010:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 5548, - "name": "hasRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "19982:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) view returns (bool)" - } - }, - "id": 5552, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19982:39:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a756e7265676973746572436f6e73756d6572286c696d69746564293a206f6e6c792061646d696e2063616e20756e726567697374657220636f6e73756d657273", - "id": 5553, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20023:72:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3a9cd7d6fe77d6ee4e14b0717982a2cfd40bf47ef975b87f7e05a46f6b7bcea2", - "typeString": "literal_string \"CLM8::unregisterConsumer(limited): only admin can unregister consumers\"" - }, - "value": "CLM8::unregisterConsumer(limited): only admin can unregister consumers" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3a9cd7d6fe77d6ee4e14b0717982a2cfd40bf47ef975b87f7e05a46f6b7bcea2", - "typeString": "literal_string \"CLM8::unregisterConsumer(limited): only admin can unregister consumers\"" - } - ], - "id": 5547, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "19974:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19974:122:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5555, - "nodeType": "ExpressionStatement", - "src": "19974:122:14" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5561, - "name": "REGISTERED_CONSUMER", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4327, - "src": "20133:19:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 5562, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5541, - "src": "20154:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 5558, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "20116:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5560, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "revokeRole", - "nodeType": "MemberAccess", - "referencedDeclaration": 193, - "src": "20116:16:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", - "typeString": "function (bytes32,address)" - } - }, - "id": 5563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20116:46:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5564, - "nodeType": "ExpressionStatement", - "src": "20116:46:14" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5566, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5541, - "src": "20198:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5565, - "name": "UnregisteredConsumer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "20177:20:14", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 5567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20177:29:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5568, - "nodeType": "EmitStatement", - "src": "20172:34:14" - } - ] - }, - "documentation": { - "id": 5539, - "nodeType": "StructuredDocumentation", - "src": "19746:117:14", - "text": " @dev Only contract owner can unregister Consumers\n @param account address to be unregistered" - }, - "functionSelector": "53dbe982", - "id": 5570, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5544, - "modifierName": { - "argumentTypes": null, - "id": 5543, - "name": "onlyDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4557, - "src": "19922:10:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "19922:10:14" - } - ], - "name": "unregisterConsumer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5542, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5541, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5570, - "src": "19896:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5540, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19896:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19895:17:14" - }, - "returnParameters": { - "id": 5545, - "nodeType": "ParameterList", - "parameters": [], - "src": "19933:0:14" - }, - "scope": 5695, - "src": "19868:345:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5609, - "nodeType": "Block", - "src": "20718:255:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5584, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5575, - "src": "20748:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 5583, - "name": "tokenExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4589, - "src": "20736:11:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" - } - }, - "id": 5585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20736:20:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a7472616e736665723a20746f6b656e496420646f6573206e6f74206578697374", - "id": 5586, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20758:40:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9c43ccc8b584f02ffbbff75c86a6253d09d36344b82179e96f7217067a7d4f2a", - "typeString": "literal_string \"CLM8::transfer: tokenId does not exist\"" - }, - "value": "CLM8::transfer: tokenId does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9c43ccc8b584f02ffbbff75c86a6253d09d36344b82179e96f7217067a7d4f2a", - "typeString": "literal_string \"CLM8::transfer: tokenId does not exist\"" - } - ], - "id": 5582, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "20728:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5587, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20728:71:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5588, - "nodeType": "ExpressionStatement", - "src": "20728:71:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 5593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5590, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "20818:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20818:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 5592, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5573, - "src": "20832:2:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "20818:16:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 5594, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20817:18:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434c4d383a3a7472616e736665723a2073656e64657220616e642072656365697665722063616e6e6f74206265207468652073616d65", - "id": 5595, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20837:56:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8829b174cb33a13572f6e263f0892a756c3ba7968b8eba47df2520a562b90ab1", - "typeString": "literal_string \"CLM8::transfer: sender and receiver cannot be the same\"" - }, - "value": "CLM8::transfer: sender and receiver cannot be the same" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8829b174cb33a13572f6e263f0892a756c3ba7968b8eba47df2520a562b90ab1", - "typeString": "literal_string \"CLM8::transfer: sender and receiver cannot be the same\"" - } - ], - "id": 5589, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "20809:7:14", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 5596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20809:85:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5597, - "nodeType": "ExpressionStatement", - "src": "20809:85:14" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5601, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "20927:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20927:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 5603, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5573, - "src": "20939:2:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5604, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5575, - "src": "20943:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5605, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5577, - "src": "20952:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30783030", - "id": 5606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20959:6:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_27489e20a0060b723a1748bdff5e44570ee9fae64141728105692eac6031e8a4", - "typeString": "literal_string \"0x00\"" - }, - "value": "0x00" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_27489e20a0060b723a1748bdff5e44570ee9fae64141728105692eac6031e8a4", - "typeString": "literal_string \"0x00\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 5598, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "20904:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeTransferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 1163, - "src": "20904:22:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,address,uint256,uint256,bytes memory)" - } - }, - "id": 5607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20904:62:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 5608, - "nodeType": "ExpressionStatement", - "src": "20904:62:14" - } - ] - }, - "documentation": { - "id": 5571, - "nodeType": "StructuredDocumentation", - "src": "20219:376:14", - "text": " @dev transfers the value to the 'to' account for tokenId\n @param to recipient address\n @param tokenId tokenId for the transfer\n @param value amount of transfer\n Transfer can start only when both parties are registered and the token is not paused\n Note: Token holders can arbitrarily call safeTransferFrom() without these checks" - }, - "functionSelector": "095bcdb6", - "id": 5610, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5580, - "modifierName": { - "argumentTypes": null, - "id": 5579, - "name": "consumerOrDealer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4520, - "src": "20701:16:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "20701:16:14" - } - ], - "name": "transfer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5578, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5573, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5610, - "src": "20627:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5572, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20627:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5575, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5610, - "src": "20647:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5574, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20647:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5577, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5610, - "src": "20672:13:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5576, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "20672:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20617:74:14" - }, - "returnParameters": { - "id": 5581, - "nodeType": "ParameterList", - "parameters": [], - "src": "20718:0:14" - }, - "scope": 5695, - "src": "20600:373:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5621, - "nodeType": "Block", - "src": "21052:37:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5617, - "name": "timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4302, - "src": "21062:8:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 5618, - "name": "_timelock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5612, - "src": "21073:9:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "21062:20:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5620, - "nodeType": "ExpressionStatement", - "src": "21062:20:14" - } - ] - }, - "documentation": null, - "functionSelector": "bdacb303", - "id": 5622, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5615, - "modifierName": { - "argumentTypes": null, - "id": 5614, - "name": "onlyAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "21042:9:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "21042:9:14" - } - ], - "name": "setTimelock", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5613, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5612, - "mutability": "mutable", - "name": "_timelock", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5622, - "src": "21009:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5611, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21009:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20999:33:14" - }, - "returnParameters": { - "id": 5616, - "nodeType": "ParameterList", - "parameters": [], - "src": "21052:0:14" - }, - "scope": 5695, - "src": "20979:110:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5653, - "nodeType": "Block", - "src": "21230:179:14", - "statements": [ - { - "assignments": [ - 5634 - ], - "declarations": [ - { - "constant": false, - "id": 5634, - "mutability": "mutable", - "name": "available", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5653, - "src": "21240:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5633, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21240:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5640, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5637, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5624, - "src": "21276:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5638, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5626, - "src": "21285:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5635, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "21260:5:14", - "typeDescriptions": { - "typeIdentifier": "t_super$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract super NetEmissionsTokenNetworkV2" - } - }, - "id": 5636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 941, - "src": "21260:15:14", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view returns (uint256)" - } - }, - "id": 5639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21260:33:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21240:53:14" - }, - { - "assignments": [ - 5642 - ], - "declarations": [ - { - "constant": false, - "id": 5642, - "mutability": "mutable", - "name": "retired", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5653, - "src": "21303:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5641, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21303:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5648, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5645, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5624, - "src": "21348:7:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 5646, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5626, - "src": "21357:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 5643, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "21321:4:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_NetEmissionsTokenNetworkV2_$5695", - "typeString": "contract NetEmissionsTokenNetworkV2" - } - }, - "id": 5644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getTokenRetiredAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 5195, - "src": "21321:26:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 5647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21321:44:14", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "21303:62:14" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 5649, - "name": "available", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5634, - "src": "21383:9:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5650, - "name": "retired", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5642, - "src": "21394:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 5651, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "21382:20:14", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256)" - } - }, - "functionReturnParameters": 5632, - "id": 5652, - "nodeType": "Return", - "src": "21375:27:14" - } - ] - }, - "documentation": null, - "functionSelector": "7f157c9b", - "id": 5654, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAvailableAndRetired", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5627, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5624, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5654, - "src": "21127:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5623, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21127:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5626, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5654, - "src": "21144:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5625, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21144:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21126:34:14" - }, - "returnParameters": { - "id": 5632, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5629, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5654, - "src": "21208:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5628, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21208:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5631, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5654, - "src": "21217:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5630, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21217:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21207:18:14" - }, - "scope": 5695, - "src": "21095:314:14", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5667, - "nodeType": "Block", - "src": "21573:53:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5662, - "name": "_tokenDetails", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4356, - "src": "21590:13:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$4350_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage ref)" - } - }, - "id": 5664, - "indexExpression": { - "argumentTypes": null, - "id": 5663, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5657, - "src": "21604:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21590:22:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage ref" - } - }, - "id": 5665, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "issuer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4333, - "src": "21590:29:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 5661, - "id": 5666, - "nodeType": "Return", - "src": "21583:36:14" - } - ] - }, - "documentation": { - "id": 5655, - "nodeType": "StructuredDocumentation", - "src": "21415:57:14", - "text": " @dev returns issuer of a given tokenId" - }, - "functionSelector": "92089c46", - "id": 5668, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getIssuer", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5658, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5657, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5668, - "src": "21496:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5656, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21496:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21495:17:14" - }, - "returnParameters": { - "id": 5661, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5660, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5668, - "src": "21560:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5659, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "21560:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21559:9:14" - }, - "scope": 5695, - "src": "21477:149:14", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5680, - "nodeType": "Block", - "src": "21874:46:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 5676, - "name": "_tokenDetails", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4356, - "src": "21891:13:14", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_CarbonTokenDetails_$4350_storage_$", - "typeString": "mapping(uint256 => struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage ref)" - } - }, - "id": 5678, - "indexExpression": { - "argumentTypes": null, - "id": 5677, - "name": "tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5671, - "src": "21905:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21891:22:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails storage ref" - } - }, - "functionReturnParameters": 5675, - "id": 5679, - "nodeType": "Return", - "src": "21884:29:14" - } - ] - }, - "documentation": { - "id": 5669, - "nodeType": "StructuredDocumentation", - "src": "21632:117:14", - "text": " @dev returns the details of a given tokenId, omitting holders\n @param tokenId token to check" - }, - "functionSelector": "c1e03728", - "id": 5681, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTokenDetails", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5672, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5671, - "mutability": "mutable", - "name": "tokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5681, - "src": "21779:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5670, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "21779:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21778:17:14" - }, - "returnParameters": { - "id": 5675, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5674, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5681, - "src": "21843:25:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_memory_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails" - }, - "typeName": { - "contractScope": null, - "id": 5673, - "name": "CarbonTokenDetails", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4350, - "src": "21843:18:14", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CarbonTokenDetails_$4350_storage_ptr", - "typeString": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "21842:27:14" - }, - "scope": 5695, - "src": "21754:166:14", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 5693, - "nodeType": "Block", - "src": "22106:43:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5689, - "name": "limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "22116:11:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 5690, - "name": "_limitedMode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5684, - "src": "22130:12:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "22116:26:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 5692, - "nodeType": "ExpressionStatement", - "src": "22116:26:14" - } - ] - }, - "documentation": { - "id": 5682, - "nodeType": "StructuredDocumentation", - "src": "21926:93:14", - "text": " @dev turns off or on limited mode\n @param _limitedMode boolean value" - }, - "functionSelector": "ddc3e6eb", - "id": 5694, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 5687, - "modifierName": { - "argumentTypes": null, - "id": 5686, - "name": "onlyAdmin", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4570, - "src": "22092:9:14", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "22092:9:14" - } - ], - "name": "setLimitedMode", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 5685, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5684, - "mutability": "mutable", - "name": "_limitedMode", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 5694, - "src": "22048:17:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5683, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "22048:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "22047:19:14" - }, - "returnParameters": { - "id": 5688, - "nodeType": "ParameterList", - "parameters": [], - "src": "22106:0:14" - }, - "scope": 5695, - "src": "22024:125:14", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 5696, - "src": "602:21550:14" - } - ], - "src": "39:22114:14" - }, - "id": 14 - } - } - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol/DAOToken.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol/DAOToken.dbg.json deleted file mode 100644 index 538ce100d1..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol/DAOToken.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../../build-info/4434e8dbd23bd8c59e3ee61547429623.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol/DAOToken.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol/DAOToken.json deleted file mode 100644 index 00fe616a8a..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol/DAOToken.json +++ /dev/null @@ -1,583 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "DAOToken", - "sourceName": "src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "amount", - "type": "uint96" - } - ], - "name": "_burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getInitialHolder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialHolder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newGovernor", - "type": "address" - } - ], - "name": "setGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040526a084595161401484a000000600055600280546001600160a01b031916905534801561002f57600080fd5b5060405162001d2c38038062001d2c833981016040819052610050916100dc565b600080546001600160a01b0383168083526004602052604080842080546001600160601b0319166001600160601b0390941693909317909255600180546001600160a01b03191682179055825491519092917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef916100ce919061010a565b60405180910390a350610113565b6000602082840312156100ed578081fd5b81516001600160a01b0381168114610103578182fd5b9392505050565b90815260200190565b611c0980620001236000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c8063782d6fe1116100de578063b72218e311610097578063c4e41b2211610071578063c4e41b2214610315578063dd62ed3e1461031d578063e7a324dc14610330578063f1127ed81461033857610173565b8063b72218e3146102e7578063c3cda520146102ef578063c42cf5351461030257610173565b8063782d6fe11461027e5780637ecebe001461029e57806395d89b41146102b1578063a9059cbb146102b9578063ae80d9de146102cc578063b4b5ea57146102d457610173565b8063313ce56711610130578063313ce567146101fb578063587cde1e146102105780635c19a95c146102235780636fcfff451461023857806370a082311461025857806372d3ee9e1461026b57610173565b806306fdde0314610178578063095ea7b3146101965780630c340a24146101b657806318160ddd146101cb57806320606b70146101e057806323b872dd146101e8575b600080fd5b610180610359565b60405161018d9190611651565b60405180910390f35b6101a96101a43660046114a9565b610386565b60405161018d91906115d7565b6101be610445565b60405161018d91906115c3565b6101d3610454565b60405161018d91906115e2565b6101d361045a565b6101a96101f6366004611469565b61047e565b6102036105c5565b60405161018d9190611a09565b6101be61021e36600461141a565b6105ca565b61023661023136600461141a565b6105e5565b005b61024b61024636600461141a565b6105f2565b60405161018d91906119d9565b6101d361026636600461141a565b61060a565b610236610279366004611571565b61062e565b61029161028c3660046114a9565b61074e565b60405161018d9190611a17565b6101d36102ac36600461141a565b61095c565b61018061096e565b6101a96102c73660046114a9565b61098f565b6101be6109cb565b6102916102e236600461141a565b6109da565b6101be610a4b565b6102366102fd3660046114d3565b610a5a565b61023661031036600461141a565b610c69565b6101d3610cde565b6101d361032b366004611435565b610ce4565b6101d3610d18565b61034b610346366004611532565b610d3c565b60405161018d9291906119ea565b6040518060400160405280601181526020017021b634b6b0ba32902220a7902a37b5b2b760791b81525081565b60008060001983141561039c57506000196103c1565b6103be83604051806060016040528060268152602001611b5060269139610d71565b90505b3360008181526003602090815260408083206001600160a01b03891680855292529182902080546001600160601b0319166001600160601b03861617905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610431908590611a17565b60405180910390a360019150505b92915050565b6002546001600160a01b031681565b60005481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6001600160a01b03831660009081526003602090815260408083203380855290835281842054825160608101909352602680845291936001600160601b039091169285926104d69288929190611b5090830139610d71565b9050866001600160a01b0316836001600160a01b03161415801561050357506001600160601b0382811614155b156105ad57600061052d83836040518060600160405280603e8152602001611b12603e9139610da0565b6001600160a01b038981166000818152600360209081526040808320948a16808452949091529081902080546001600160601b0319166001600160601b0386161790555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906105a3908590611a17565b60405180910390a3505b6105b8878783610ddf565b5060019695505050505050565b601281565b6005602052600090815260409020546001600160a01b031681565b6105ef3382610fb8565b50565b60076020526000908152604090205463ffffffff1681565b6001600160a01b03166000908152600460205260409020546001600160601b031690565b6001600160a01b03821661065d5760405162461bcd60e51b815260040161065490611991565b60405180910390fd5b6002546001600160a01b031633146106875760405162461bcd60e51b81526004016106549061195a565b6001600160a01b0382166000908152600460205260409020546001600160601b039081169082168110156106cd5760405162461bcd60e51b8152600401610654906116a4565b6001600160a01b03831660008181526004602052604080822080546001600160601b0319168686036001600160601b0390811691909117909155825490861690038255519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610741908690611a17565b60405180910390a3505050565b600043821061076f5760405162461bcd60e51b81526004016106549061182b565b6001600160a01b03831660009081526007602052604090205463ffffffff168061079d57600091505061043f565b6001600160a01b038416600090815260066020908152604080832063ffffffff600019860181168552925290912054168310610819576001600160a01b03841660009081526006602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b0316905061043f565b6001600160a01b038416600090815260066020908152604080832083805290915290205463ffffffff1683101561085457600091505061043f565b600060001982015b8163ffffffff168163ffffffff16111561091757600282820363ffffffff160481036108866113ec565b506001600160a01b038716600090815260066020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b031691810191909152908714156108f25760200151945061043f9350505050565b805163ffffffff1687111561090957819350610910565b6001820392505b505061085c565b506001600160a01b038516600090815260066020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b60086020526000908152604090205481565b604051806040016040528060058152602001640c886989a760db1b81525081565b6000806109b483604051806060016040528060278152602001611aeb60279139610d71565b90506109c1338583610ddf565b5060019392505050565b6001546001600160a01b031690565b6001600160a01b03811660009081526007602052604081205463ffffffff1680610a05576000610a44565b6001600160a01b0383166000908152600660209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03165b9392505050565b6001546001600160a01b031681565b60408051808201909152601181527021b634b6b0ba32902220a7902a37b5b2b760791b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f7c75c83381dcf4c0e5ba36df2cc653b50dcd8f69236256411bc04c9f677ed4c0610acf611042565b30604051602001610ae3949392919061160f565b60405160208183030381529060405280519060200120905060007fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf888888604051602001610b3494939291906115eb565b60405160208183030381529060405280519060200120905060008282604051602001610b619291906115a8565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610b9e9493929190611633565b6020604051602081039080840390855afa158015610bc0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bf35760405162461bcd60e51b815260040161065490611787565b6001600160a01b03811660009081526008602052604090208054600181019091558914610c325760405162461bcd60e51b815260040161065490611873565b87421115610c525760405162461bcd60e51b815260040161065490611913565b610c5c818b610fb8565b505050505b505050505050565b6001546001600160a01b03163314610c935760405162461bcd60e51b81526004016106549061173d565b6002546001600160a01b031615610cbc5760405162461bcd60e51b8152600401610654906116ed565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60005490565b6001600160a01b0391821660009081526003602090815260408083209390941682529190915220546001600160601b031690565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600660209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b600081600160601b8410610d985760405162461bcd60e51b81526004016106549190611651565b509192915050565b6000836001600160601b0316836001600160601b031611158290610dd75760405162461bcd60e51b81526004016106549190611651565b505050900390565b6001600160a01b038316610e055760405162461bcd60e51b8152600401610654906118b6565b6001600160a01b038216610e2b5760405162461bcd60e51b8152600401610654906117ce565b6001600160a01b038316600090815260046020908152604091829020548251606081019093526037808452610e76936001600160601b039092169285929190611a8390830139610da0565b6001600160a01b03848116600090815260046020908152604080832080546001600160601b0319166001600160601b03968716179055928616825290829020548251606081019093526031808452610ede9491909116928592909190611aba90830139611046565b6001600160a01b038381166000818152600460205260409081902080546001600160601b0319166001600160601b0395909516949094179093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610f4b908590611a17565b60405180910390a36001600160a01b0382811660009081526005602052604090205416610f8157610f7c8283610fb8565b610fb3565b6001600160a01b03808416600090815260056020526040808220548584168352912054610fb392918216911683611082565b505050565b6001600160a01b03808316600081815260056020818152604080842080546004845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461103c828483611082565b50505050565b4690565b6000838301826001600160601b0380871690831610156110795760405162461bcd60e51b81526004016106549190611651565b50949350505050565b816001600160a01b0316836001600160a01b0316141580156110ad57506000816001600160601b0316115b15610fb3576001600160a01b03831615611165576001600160a01b03831660009081526007602052604081205463ffffffff1690816110ed57600061112c565b6001600160a01b0385166000908152600660209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006111538285604051806060016040528060298152602001611b7660299139610da0565b905061116186848484611210565b5050505b6001600160a01b03821615610fb3576001600160a01b03821660009081526007602052604081205463ffffffff1690816111a05760006111df565b6001600160a01b0384166000908152600660209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006112068285604051806060016040528060288152602001611a5b60289139611046565b9050610c61858484845b600061123443604051806060016040528060358152602001611b9f603591396113c5565b905060008463ffffffff1611801561127d57506001600160a01b038516600090815260066020908152604080832063ffffffff6000198901811685529252909120548282169116145b156112dc576001600160a01b0385166000908152600660209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b0385160217905561137b565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600683528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600790935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72484846040516113b6929190611a2b565b60405180910390a25050505050565b600081600160201b8410610d985760405162461bcd60e51b81526004016106549190611651565b604080518082019091526000808252602082015290565b80356001600160a01b038116811461043f57600080fd5b60006020828403121561142b578081fd5b610a448383611403565b60008060408385031215611447578081fd5b6114518484611403565b91506114608460208501611403565b90509250929050565b60008060006060848603121561147d578081fd5b833561148881611a45565b9250602084013561149881611a45565b929592945050506040919091013590565b600080604083850312156114bb578182fd5b6114c58484611403565b946020939093013593505050565b60008060008060008060c087890312156114eb578182fd5b6114f58888611403565b95506020870135945060408701359350606087013560ff81168114611518578283fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215611544578182fd5b61154e8484611403565b9150602083013563ffffffff81168114611566578182fd5b809150509250929050565b60008060408385031215611583578182fd5b61158d8484611403565b915060208301356001600160601b0381168114611566578182fd5b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b901515815260200190565b90815260200190565b9384526001600160a01b039290921660208401526040830152606082015260800190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b8181101561167d57858101830151858201604001528201611661565b8181111561168e5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526029908201527f64434c4d383a3a5f6275726e3a206275726e20616d6f756e7420657863656564604082015268732062616c616e636560b81b606082015260800190565b60208082526030908201527f64434c4d3a3a736574476f7665726e6f723a20676f7665726e6f722063616e2060408201526f6f6e6c7920626520736574206f6e636560801b606082015260800190565b6020808252602a908201527f64434c4d383a3a736574476f7665726e6f723a206d75737420626520696e697460408201526934b0b6103437b63232b960b11b606082015260800190565b60208082526027908201527f64434c4d383a3a64656c656761746542795369673a20696e76616c6964207369604082015266676e617475726560c81b606082015260800190565b6020808252603b908201527f64434c4d383a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460408201527f72616e7366657220746f20746865207a65726f20616464726573730000000000606082015260800190565b60208082526028908201527f64434c4d383a3a6765745072696f72566f7465733a206e6f74207965742064656040820152671d195c9b5a5b995960c21b606082015260800190565b60208082526023908201527f64434c4d383a3a64656c656761746542795369673a20696e76616c6964206e6f6040820152626e636560e81b606082015260800190565b6020808252603d908201527f64434c4d383a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460408201527f72616e736665722066726f6d20746865207a65726f2061646472657373000000606082015260800190565b60208082526027908201527f64434c4d383a3a64656c656761746542795369673a207369676e617475726520604082015266195e1c1a5c995960ca1b606082015260800190565b6020808252601e908201527f64434c4d383a3a5f6275726e3a206d75737420626520676f7665726e6f720000604082015260600190565b60208082526028908201527f64434c4d383a3a5f6275726e3a206275726e2066726f6d20746865207a65726f604082015267206164647265737360c01b606082015260800190565b63ffffffff91909116815260200190565b63ffffffff9290921682526001600160601b0316602082015260400190565b60ff91909116815260200190565b6001600160601b0391909116815260200190565b6001600160601b0392831681529116602082015260400190565b6001600160a01b03811681146105ef57600080fdfe64434c4d383a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f777364434c4d383a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e636564434c4d383a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f777364434c4d383a3a7472616e736665723a20616d6f756e742065786365656473203936206269747364434c4d383a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e636564434c4d383a3a617070726f76653a20616d6f756e742065786365656473203936206269747364434c4d383a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f777364434c4d383a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473a2646970667358221220edee2084fa807746006b92bb48109b74d61bb21d709f2a72dc5e627327355d0064736f6c63430007000033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c8063782d6fe1116100de578063b72218e311610097578063c4e41b2211610071578063c4e41b2214610315578063dd62ed3e1461031d578063e7a324dc14610330578063f1127ed81461033857610173565b8063b72218e3146102e7578063c3cda520146102ef578063c42cf5351461030257610173565b8063782d6fe11461027e5780637ecebe001461029e57806395d89b41146102b1578063a9059cbb146102b9578063ae80d9de146102cc578063b4b5ea57146102d457610173565b8063313ce56711610130578063313ce567146101fb578063587cde1e146102105780635c19a95c146102235780636fcfff451461023857806370a082311461025857806372d3ee9e1461026b57610173565b806306fdde0314610178578063095ea7b3146101965780630c340a24146101b657806318160ddd146101cb57806320606b70146101e057806323b872dd146101e8575b600080fd5b610180610359565b60405161018d9190611651565b60405180910390f35b6101a96101a43660046114a9565b610386565b60405161018d91906115d7565b6101be610445565b60405161018d91906115c3565b6101d3610454565b60405161018d91906115e2565b6101d361045a565b6101a96101f6366004611469565b61047e565b6102036105c5565b60405161018d9190611a09565b6101be61021e36600461141a565b6105ca565b61023661023136600461141a565b6105e5565b005b61024b61024636600461141a565b6105f2565b60405161018d91906119d9565b6101d361026636600461141a565b61060a565b610236610279366004611571565b61062e565b61029161028c3660046114a9565b61074e565b60405161018d9190611a17565b6101d36102ac36600461141a565b61095c565b61018061096e565b6101a96102c73660046114a9565b61098f565b6101be6109cb565b6102916102e236600461141a565b6109da565b6101be610a4b565b6102366102fd3660046114d3565b610a5a565b61023661031036600461141a565b610c69565b6101d3610cde565b6101d361032b366004611435565b610ce4565b6101d3610d18565b61034b610346366004611532565b610d3c565b60405161018d9291906119ea565b6040518060400160405280601181526020017021b634b6b0ba32902220a7902a37b5b2b760791b81525081565b60008060001983141561039c57506000196103c1565b6103be83604051806060016040528060268152602001611b5060269139610d71565b90505b3360008181526003602090815260408083206001600160a01b03891680855292529182902080546001600160601b0319166001600160601b03861617905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610431908590611a17565b60405180910390a360019150505b92915050565b6002546001600160a01b031681565b60005481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6001600160a01b03831660009081526003602090815260408083203380855290835281842054825160608101909352602680845291936001600160601b039091169285926104d69288929190611b5090830139610d71565b9050866001600160a01b0316836001600160a01b03161415801561050357506001600160601b0382811614155b156105ad57600061052d83836040518060600160405280603e8152602001611b12603e9139610da0565b6001600160a01b038981166000818152600360209081526040808320948a16808452949091529081902080546001600160601b0319166001600160601b0386161790555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906105a3908590611a17565b60405180910390a3505b6105b8878783610ddf565b5060019695505050505050565b601281565b6005602052600090815260409020546001600160a01b031681565b6105ef3382610fb8565b50565b60076020526000908152604090205463ffffffff1681565b6001600160a01b03166000908152600460205260409020546001600160601b031690565b6001600160a01b03821661065d5760405162461bcd60e51b815260040161065490611991565b60405180910390fd5b6002546001600160a01b031633146106875760405162461bcd60e51b81526004016106549061195a565b6001600160a01b0382166000908152600460205260409020546001600160601b039081169082168110156106cd5760405162461bcd60e51b8152600401610654906116a4565b6001600160a01b03831660008181526004602052604080822080546001600160601b0319168686036001600160601b0390811691909117909155825490861690038255519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610741908690611a17565b60405180910390a3505050565b600043821061076f5760405162461bcd60e51b81526004016106549061182b565b6001600160a01b03831660009081526007602052604090205463ffffffff168061079d57600091505061043f565b6001600160a01b038416600090815260066020908152604080832063ffffffff600019860181168552925290912054168310610819576001600160a01b03841660009081526006602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b0316905061043f565b6001600160a01b038416600090815260066020908152604080832083805290915290205463ffffffff1683101561085457600091505061043f565b600060001982015b8163ffffffff168163ffffffff16111561091757600282820363ffffffff160481036108866113ec565b506001600160a01b038716600090815260066020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b031691810191909152908714156108f25760200151945061043f9350505050565b805163ffffffff1687111561090957819350610910565b6001820392505b505061085c565b506001600160a01b038516600090815260066020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b60086020526000908152604090205481565b604051806040016040528060058152602001640c886989a760db1b81525081565b6000806109b483604051806060016040528060278152602001611aeb60279139610d71565b90506109c1338583610ddf565b5060019392505050565b6001546001600160a01b031690565b6001600160a01b03811660009081526007602052604081205463ffffffff1680610a05576000610a44565b6001600160a01b0383166000908152600660209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03165b9392505050565b6001546001600160a01b031681565b60408051808201909152601181527021b634b6b0ba32902220a7902a37b5b2b760791b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f7c75c83381dcf4c0e5ba36df2cc653b50dcd8f69236256411bc04c9f677ed4c0610acf611042565b30604051602001610ae3949392919061160f565b60405160208183030381529060405280519060200120905060007fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf888888604051602001610b3494939291906115eb565b60405160208183030381529060405280519060200120905060008282604051602001610b619291906115a8565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610b9e9493929190611633565b6020604051602081039080840390855afa158015610bc0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bf35760405162461bcd60e51b815260040161065490611787565b6001600160a01b03811660009081526008602052604090208054600181019091558914610c325760405162461bcd60e51b815260040161065490611873565b87421115610c525760405162461bcd60e51b815260040161065490611913565b610c5c818b610fb8565b505050505b505050505050565b6001546001600160a01b03163314610c935760405162461bcd60e51b81526004016106549061173d565b6002546001600160a01b031615610cbc5760405162461bcd60e51b8152600401610654906116ed565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60005490565b6001600160a01b0391821660009081526003602090815260408083209390941682529190915220546001600160601b031690565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600660209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b600081600160601b8410610d985760405162461bcd60e51b81526004016106549190611651565b509192915050565b6000836001600160601b0316836001600160601b031611158290610dd75760405162461bcd60e51b81526004016106549190611651565b505050900390565b6001600160a01b038316610e055760405162461bcd60e51b8152600401610654906118b6565b6001600160a01b038216610e2b5760405162461bcd60e51b8152600401610654906117ce565b6001600160a01b038316600090815260046020908152604091829020548251606081019093526037808452610e76936001600160601b039092169285929190611a8390830139610da0565b6001600160a01b03848116600090815260046020908152604080832080546001600160601b0319166001600160601b03968716179055928616825290829020548251606081019093526031808452610ede9491909116928592909190611aba90830139611046565b6001600160a01b038381166000818152600460205260409081902080546001600160601b0319166001600160601b0395909516949094179093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610f4b908590611a17565b60405180910390a36001600160a01b0382811660009081526005602052604090205416610f8157610f7c8283610fb8565b610fb3565b6001600160a01b03808416600090815260056020526040808220548584168352912054610fb392918216911683611082565b505050565b6001600160a01b03808316600081815260056020818152604080842080546004845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461103c828483611082565b50505050565b4690565b6000838301826001600160601b0380871690831610156110795760405162461bcd60e51b81526004016106549190611651565b50949350505050565b816001600160a01b0316836001600160a01b0316141580156110ad57506000816001600160601b0316115b15610fb3576001600160a01b03831615611165576001600160a01b03831660009081526007602052604081205463ffffffff1690816110ed57600061112c565b6001600160a01b0385166000908152600660209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006111538285604051806060016040528060298152602001611b7660299139610da0565b905061116186848484611210565b5050505b6001600160a01b03821615610fb3576001600160a01b03821660009081526007602052604081205463ffffffff1690816111a05760006111df565b6001600160a01b0384166000908152600660209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006112068285604051806060016040528060288152602001611a5b60289139611046565b9050610c61858484845b600061123443604051806060016040528060358152602001611b9f603591396113c5565b905060008463ffffffff1611801561127d57506001600160a01b038516600090815260066020908152604080832063ffffffff6000198901811685529252909120548282169116145b156112dc576001600160a01b0385166000908152600660209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b0385160217905561137b565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600683528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600790935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72484846040516113b6929190611a2b565b60405180910390a25050505050565b600081600160201b8410610d985760405162461bcd60e51b81526004016106549190611651565b604080518082019091526000808252602082015290565b80356001600160a01b038116811461043f57600080fd5b60006020828403121561142b578081fd5b610a448383611403565b60008060408385031215611447578081fd5b6114518484611403565b91506114608460208501611403565b90509250929050565b60008060006060848603121561147d578081fd5b833561148881611a45565b9250602084013561149881611a45565b929592945050506040919091013590565b600080604083850312156114bb578182fd5b6114c58484611403565b946020939093013593505050565b60008060008060008060c087890312156114eb578182fd5b6114f58888611403565b95506020870135945060408701359350606087013560ff81168114611518578283fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215611544578182fd5b61154e8484611403565b9150602083013563ffffffff81168114611566578182fd5b809150509250929050565b60008060408385031215611583578182fd5b61158d8484611403565b915060208301356001600160601b0381168114611566578182fd5b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b901515815260200190565b90815260200190565b9384526001600160a01b039290921660208401526040830152606082015260800190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b8181101561167d57858101830151858201604001528201611661565b8181111561168e5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526029908201527f64434c4d383a3a5f6275726e3a206275726e20616d6f756e7420657863656564604082015268732062616c616e636560b81b606082015260800190565b60208082526030908201527f64434c4d3a3a736574476f7665726e6f723a20676f7665726e6f722063616e2060408201526f6f6e6c7920626520736574206f6e636560801b606082015260800190565b6020808252602a908201527f64434c4d383a3a736574476f7665726e6f723a206d75737420626520696e697460408201526934b0b6103437b63232b960b11b606082015260800190565b60208082526027908201527f64434c4d383a3a64656c656761746542795369673a20696e76616c6964207369604082015266676e617475726560c81b606082015260800190565b6020808252603b908201527f64434c4d383a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460408201527f72616e7366657220746f20746865207a65726f20616464726573730000000000606082015260800190565b60208082526028908201527f64434c4d383a3a6765745072696f72566f7465733a206e6f74207965742064656040820152671d195c9b5a5b995960c21b606082015260800190565b60208082526023908201527f64434c4d383a3a64656c656761746542795369673a20696e76616c6964206e6f6040820152626e636560e81b606082015260800190565b6020808252603d908201527f64434c4d383a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460408201527f72616e736665722066726f6d20746865207a65726f2061646472657373000000606082015260800190565b60208082526027908201527f64434c4d383a3a64656c656761746542795369673a207369676e617475726520604082015266195e1c1a5c995960ca1b606082015260800190565b6020808252601e908201527f64434c4d383a3a5f6275726e3a206d75737420626520676f7665726e6f720000604082015260600190565b60208082526028908201527f64434c4d383a3a5f6275726e3a206275726e2066726f6d20746865207a65726f604082015267206164647265737360c01b606082015260800190565b63ffffffff91909116815260200190565b63ffffffff9290921682526001600160601b0316602082015260400190565b60ff91909116815260200190565b6001600160601b0391909116815260200190565b6001600160601b0392831681529116602082015260400190565b6001600160a01b03811681146105ef57600080fdfe64434c4d383a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f777364434c4d383a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e636564434c4d383a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f777364434c4d383a3a7472616e736665723a20616d6f756e742065786365656473203936206269747364434c4d383a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e636564434c4d383a3a617070726f76653a20616d6f756e742065786365656473203936206269747364434c4d383a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f777364434c4d383a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473a2646970667358221220edee2084fa807746006b92bb48109b74d61bb21d709f2a72dc5e627327355d0064736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Dclm8Interface.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Dclm8Interface.dbg.json deleted file mode 100644 index 102217eb7c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Dclm8Interface.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../../build-info/63ceb59b1611816263aa22cb81ea46e7.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Dclm8Interface.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Dclm8Interface.json deleted file mode 100644 index afa1538fdb..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Dclm8Interface.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Dclm8Interface", - "sourceName": "src/main/solidity/net-emissions-token-network/Governance/Governor.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint96", - "name": "amount", - "type": "uint96" - } - ], - "name": "_burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getInitialHolder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Governor.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Governor.dbg.json deleted file mode 100644 index 102217eb7c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Governor.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../../build-info/63ceb59b1611816263aa22cb81ea46e7.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Governor.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Governor.json deleted file mode 100644 index 86d6ea823a..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Governor.json +++ /dev/null @@ -1,710 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Governor", - "sourceName": "src/main/solidity/net-emissions-token-network/Governance/Governor.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "timelock_", - "type": "address" - }, - { - "internalType": "address", - "name": "dclm8_", - "type": "address" - }, - { - "internalType": "address", - "name": "guardian_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "ProposalQueued", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "__abdicate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "__acceptAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "__executeSetTimelockPendingAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "__queueSetTimelockPendingAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "cancel", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "name": "castVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "name": "castVoteBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "dclm8", - "outputs": [ - { - "internalType": "contract Dclm8Interface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "getActions", - "outputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "getDescription", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "voter", - "type": "address" - } - ], - "name": "getReceipt", - "outputs": [ - { - "components": [ - { - "internalType": "bool", - "name": "hasVoted", - "type": "bool" - }, - { - "internalType": "bool", - "name": "support", - "type": "bool" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "internalType": "struct Governor.Receipt", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "latestProposalIds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalMaxOperations", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "proposals", - "outputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "againstVotes", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "canceled", - "type": "bool" - }, - { - "internalType": "bool", - "name": "executed", - "type": "bool" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "queue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "quorumVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum Governor.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "timelock", - "outputs": [ - { - "internalType": "contract TimelockInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b506040516200368838038062003688833981016040819052620000349162000077565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560028054919093169116179055620000e3565b6000806000606084860312156200008c578283fd5b83516200009981620000ca565b6020850151909350620000ac81620000ca565b6040850151909250620000bf81620000ca565b809150509250925092565b6001600160a01b0381168114620000e057600080fd5b50565b61359580620000f36000396000f3fe6080604052600436106101b75760003560e01c8063760fbc13116100ec578063da35c6641161008a578063ddf0b00911610064578063ddf0b00914610492578063deaaa7cc146104b2578063e23a9a52146104c7578063fe0d94c1146104f4576101b7565b8063da35c6641461043d578063da95691a14610452578063dbfa977f14610472576101b7565b806394a08d58116100c657806394a08d58146103e9578063b58131b0146103fe578063b9a6196114610413578063d33219b414610428576101b7565b8063760fbc131461039f5780637bdbe4d0146103b457806391500671146103c9576101b7565b8063328dd9821161015957806340e58ee51161013357806340e58ee51461031d578063452a93201461033d5780634925ec551461035f5780635d2546081461037f576101b7565b8063328dd982146102ab5780633932abb1146102db5780633e4f49e6146102f0576101b7565b806317977c611161019557806317977c611461023f57806320606b701461025f57806321f43e421461027457806324bc1a6414610296576101b7565b8063013cf08b146101bc57806302a251a3146101fb57806306fdde031461021d575b600080fd5b3480156101c857600080fd5b506101dc6101d73660046126be565b610507565b6040516101f29a9998979695949392919061340d565b60405180910390f35b34801561020757600080fd5b506102106105f6565b6040516101f29190612b25565b34801561022957600080fd5b506102326105fd565b6040516101f29190612b9c565b34801561024b57600080fd5b5061021061025a3660046124e8565b61062d565b34801561026b57600080fd5b5061021061063f565b34801561028057600080fd5b5061029461028f366004612520565b610663565b005b3480156102a257600080fd5b5061021061074a565b3480156102b757600080fd5b506102cb6102c63660046126be565b6108fd565b6040516101f29493929190612acd565b3480156102e757600080fd5b50610210610b8c565b3480156102fc57600080fd5b5061031061030b3660046126be565b610b91565b6040516101f29190612b88565b34801561032957600080fd5b506102946103383660046126be565b610d21565b34801561034957600080fd5b50610352610f8a565b6040516101f2919061295c565b34801561036b57600080fd5b5061023261037a3660046126be565b610f99565b34801561038b57600080fd5b5061029461039a366004612705565b61103d565b3480156103ab57600080fd5b506102946111f0565b3480156103c057600080fd5b5061021061122c565b3480156103d557600080fd5b506102946103e4366004612520565b611231565b3480156103f557600080fd5b50610352611306565b34801561040a57600080fd5b50610210611315565b34801561041f57600080fd5b50610294611323565b34801561043457600080fd5b506103526113a8565b34801561044957600080fd5b506102106113b7565b34801561045e57600080fd5b5061021061046d36600461254b565b6113bd565b34801561047e57600080fd5b5061029461048d366004612770565b611703565b34801561049e57600080fd5b506102946104ad3660046126be565b61170f565b3480156104be57600080fd5b50610210611979565b3480156104d357600080fd5b506104e76104e23660046126d6565b61199d565b6040516101f29190613347565b6102946105023660046126be565b611a09565b6004602090815260009182526040918290208054600180830154600280850154600786015460088701546009880154600a890154600b8a0154600c8b0180548e516101009b8216158c026000190190911698909804601f81018e90048e0289018e01909e528d8852999c6001600160a01b039098169b959a949993989297919660ff8083169794909204909116949390929091908301828280156105ec5780601f106105c1576101008083540402835291602001916105ec565b820191906000526020600020905b8154815290600101906020018083116105cf57829003601f168201915b505050505090508a565b6143805b90565b6040518060400160405280601481526020017321b634b6b0ba32902220a79023b7bb32b93737b960611b81525081565b60056020526000908152604090205481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6002546001600160a01b031633146106965760405162461bcd60e51b815260040161068d90612e93565b60405180910390fd5b600080546040516001600160a01b0390911691630825f38f918391906106c090879060200161295c565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016106ef9493929190612989565b600060405180830381600087803b15801561070957600080fd5b505af115801561071d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610745919081019061264b565b505050565b600154604080516357406cef60e11b8152905160009283926001600160a01b03909116916370a0823191839163ae80d9de91600480820192602092909190829003018186803b15801561079c57600080fd5b505afa1580156107b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d49190612504565b6040518263ffffffff1660e01b81526004016107f0919061295c565b60206040518083038186803b15801561080857600080fd5b505afa15801561081c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108409190612633565b9050600081600160009054906101000a90046001600160a01b03166001600160a01b031663c4e41b226040518163ffffffff1660e01b815260040160206040518083038186803b15801561089357600080fd5b505afa1580156108a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cb9190612633565b03905080156108f0576108e76108e2826019611bce565b611c0a565b925050506105fa565b649341498e019250505090565b6060806060806000600460008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561097f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610961575b50505050509350828054806020026020016040519081016040528092919081815260200182805480156109d157602002820191906000526020600020905b8154815260200190600101908083116109bd575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b82821015610aa45760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610a905780601f10610a6557610100808354040283529160200191610a90565b820191906000526020600020905b815481529060010190602001808311610a7357829003601f168201915b5050505050815260200190600101906109f9565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610b765760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610b625780601f10610b3757610100808354040283529160200191610b62565b820191906000526020600020905b815481529060010190602001808311610b4557829003601f168201915b505050505081526020019060010190610acb565b5050505090509450945094509450509193509193565b600190565b60008160035410158015610ba55750600082115b610bc15760405162461bcd60e51b815260040161068d90612f00565b6000828152600460205260409020600b81015460ff1615610be6576002915050610d1c565b80600701544311610bfb576000915050610d1c565b80600801544311610c10576001915050610d1c565b80600a01548160090154111580610c315750610c2a61074a565b8160090154105b15610c40576003915050610d1c565b6002810154610c53576004915050610d1c565b600b810154610100900460ff1615610c6f576007915050610d1c565b610d00816002015460008054906101000a90046001600160a01b03166001600160a01b031663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610cc357600080fd5b505afa158015610cd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfb9190612633565b611c3b565b4210610d10576006915050610d1c565b6005915050610d1c565b505b919050565b6000610d2c82610b91565b90506007816007811115610d3c57fe5b1415610d5a5760405162461bcd60e51b815260040161068d90612d81565b60008281526004602052604090206002546001600160a01b0316331480610e255750610d84611315565b60018054838201546001600160a01b039182169263782d6fe19290911690610dad904390611c60565b6040518363ffffffff1660e01b8152600401610dca929190612970565b60206040518083038186803b158015610de257600080fd5b505afa158015610df6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1a91906127b1565b6001600160601b0316105b610e415760405162461bcd60e51b815260040161068d906131e2565b600b8101805460ff1916600117905560005b6003820154811015610f4d576000546003830180546001600160a01b039092169163591fcdfe919084908110610e8557fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610ead57fe5b9060005260206000200154856005018581548110610ec757fe5b90600052602060002001866006018681548110610ee057fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610f0f959493929190612a72565b600060405180830381600087803b158015610f2957600080fd5b505af1158015610f3d573d6000803e3d6000fd5b505060019092019150610e539050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610f7d9190612b25565b60405180910390a1505050565b6002546001600160a01b031681565b600081815260046020908152604091829020600c0180548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156110315780601f1061100657610100808354040283529160200191611031565b820191906000526020600020905b81548152906001019060200180831161101457829003601f168201915b50505050509050919050565b60408051808201909152601481527321b634b6b0ba32902220a79023b7bb32b93737b960611b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667fc91d7024f1084cf2cbc672fa7c9487148f930f2547c197a0c5a286cc6f4923ea6110b5611c88565b306040516020016110c99493929190612b2e565b60405160208183030381529060405280519060200120905060007f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee888860405160200161111893929190612b52565b60405160208183030381529060405280519060200120905060008282604051602001611145929190612941565b6040516020818303038152906040528051906020012090506000600182898989604051600081526020016040526040516111829493929190612b6a565b6020604051602081039080840390855afa1580156111a4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166111d75760405162461bcd60e51b815260040161068d906132fd565b6111e3818b8b88611c8c565b505050505b505050505050565b6002546001600160a01b0316331461121a5760405162461bcd60e51b815260040161068d90613098565b600280546001600160a01b0319169055565b600a90565b6002546001600160a01b0316331461125b5760405162461bcd60e51b815260040161068d90612c69565b600080546040516001600160a01b0390911691633a66f9019183919061128590879060200161295c565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016112b49493929190612989565b602060405180830381600087803b1580156112ce57600080fd5b505af11580156112e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190612633565b6001546001600160a01b031681565b69152d02c7e14af680000090565b6002546001600160a01b0316331461134d5760405162461bcd60e51b815260040161068d90613146565b6000805460408051630e18b68160e01b815290516001600160a01b0390921692630e18b6819260048084019382900301818387803b15801561138e57600080fd5b505af11580156113a2573d6000803e3d6000fd5b50505050565b6000546001600160a01b031681565b60035481565b60006113c7611315565b600180546001600160a01b03169063782d6fe19033906113e8904390611c60565b6040518363ffffffff1660e01b8152600401611405929190612970565b60206040518083038186803b15801561141d57600080fd5b505afa158015611431573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145591906127b1565b6001600160601b03161161147b5760405162461bcd60e51b815260040161068d90612baf565b8451865114801561148d575083518651145b801561149a575082518651145b6114b65760405162461bcd60e51b815260040161068d90612c0c565b85516114d45760405162461bcd60e51b815260040161068d90612dd2565b6114dc61122c565b865111156114fc5760405162461bcd60e51b815260040161068d90612d3e565b33600090815260056020526040902054801561157957600061151d82610b91565b9050600181600781111561152d57fe5b141561154b5760405162461bcd60e51b815260040161068d90612f44565b600081600781111561155957fe5b14156115775760405162461bcd60e51b815260040161068d90612e19565b505b600061158743610cfb610b8c565b9050600061159782610cfb6105f6565b6003805460019081018083556000818152600460209081526040822092835592820180546001600160a01b0319163317905560028201558c51939450926115e3928401918d01906120cd565b5088516115f990600483019060208c0190612132565b50875161160f90600583019060208b0190612179565b50865161162590600683019060208a01906121d2565b506007810183905560088101829055600060098201819055600a820155600b8101805461ffff19169055855161166490600c830190602089019061222b565b508060000154600560008360010160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000154338c8c8c8c89898e6040516116ed99989796959493929190613375565b60405180910390a1549998505050505050505050565b61074533848484611c8c565b600461171a82610b91565b600781111561172557fe5b146117425760405162461bcd60e51b815260040161068d906132a0565b600081815260046020818152604080842084548251630d48571f60e31b815292519195946117979442946001600160a01b0390931693636a42b8f8938084019390829003018186803b158015610cc357600080fd5b905060005b600383015481101561193f576119378360030182815481106117ba57fe5b6000918252602090912001546004850180546001600160a01b0390921691849081106117e257fe5b90600052602060002001548560050184815481106117fc57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561188a5780601f1061185f5761010080835404028352916020019161188a565b820191906000526020600020905b81548152906001019060200180831161186d57829003601f168201915b505050505086600601858154811061189e57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561192c5780601f106119015761010080835404028352916020019161192c565b820191906000526020600020905b81548152906001019060200180831161190f57829003601f168201915b505050505086611f3f565b60010161179c565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610f7d9085908490613476565b7f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee81565b6119a5612298565b5060009182526004602090815260408084206001600160a01b03939093168452600d9092018152918190208151606081018352905460ff80821615158352610100820416151593820193909352620100009092046001600160601b03169082015290565b6005611a1482610b91565b6007811115611a1f57fe5b14611a3c5760405162461bcd60e51b815260040161068d9061300f565b6000818152600460205260408120600b8101805461ff001916610100179055905b6003820154811015611b92576000546004830180546001600160a01b0390921691630825f38f919084908110611a8f57fe5b9060005260206000200154846003018481548110611aa957fe5b6000918252602090912001546004860180546001600160a01b039092169186908110611ad157fe5b9060005260206000200154866005018681548110611aeb57fe5b90600052602060002001876006018781548110611b0457fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611b33959493929190612a72565b6000604051808303818588803b158015611b4c57600080fd5b505af1158015611b60573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611b89919081019061264b565b50600101611a5d565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f82604051611bc29190612b25565b60405180910390a15050565b6000611c0383836040518060400160405280601081526020016f6469766973696f6e206279207a65726f60801b815250612096565b9392505050565b80600260018201045b81811015610d1a57809150600281828581611c2a57fe5b040181611c3357fe5b049050611c13565b600082820183811015611c035760405162461bcd60e51b815260040161068d9061306d565b600082821115611c825760405162461bcd60e51b815260040161068d90613271565b50900390565b4690565b6001611c9784610b91565b6007811115611ca257fe5b14611cbf5760405162461bcd60e51b815260040161068d9061322c565b60008381526004602090815260408083206001600160a01b0388168452600d8101909252909120805460ff1615611d085760405162461bcd60e51b815260040161068d9061319a565b6000836001600160601b031611611d315760405162461bcd60e51b815260040161068d90612cd4565b8054600154600784015460405163782d6fe160e01b81526000936201000090046001600160601b0316926001600160a01b03169163782d6fe191611d79918c91600401612970565b60206040518083038186803b158015611d9157600080fd5b505afa158015611da5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc991906127b1565b039050806001600160601b0316846001600160601b03161115611dfe5760405162461bcd60e51b815260040161068d90612fbd565b6000611e12856001600160601b0316611c0a565b90508515611e3b57611e318460090154826001600160601b0316611c3b565b6009850155611e58565b611e5284600a0154826001600160601b0316611c3b565b600a8501555b600154604051633969f74f60e11b81526001600160a01b03909116906372d3ee9e90611e8a908b908990600401612aab565b600060405180830381600087803b158015611ea457600080fd5b505af1158015611eb8573d6000803e3d6000fd5b50508454600160ff199091161761ff00191661010089151502176dffffffffffffffffffffffff00001916620100006001600160601b0385160217855550506040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690611f2d908a908a908a9086906129f5565b60405180910390a15050505050505050565b6000546040516001600160a01b039091169063f2b0653790611f6d9088908890889088908890602001612a26565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611f9f9190612b25565b60206040518083038186803b158015611fb757600080fd5b505afa158015611fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fef9190612617565b1561200c5760405162461bcd60e51b815260040161068d906130e9565b600054604051633a66f90160e01b81526001600160a01b0390911690633a66f901906120449088908890889088908890600401612a26565b602060405180830381600087803b15801561205e57600080fd5b505af1158015612072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e89190612633565b600081836120b75760405162461bcd60e51b815260040161068d9190612b9c565b5060008385816120c357fe5b0495945050505050565b828054828255906000526020600020908101928215612122579160200282015b8281111561212257825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906120ed565b5061212e9291506122b8565b5090565b82805482825590600052602060002090810192821561216d579160200282015b8281111561216d578251825591602001919060010190612152565b5061212e9291506122d7565b8280548282559060005260206000209081019282156121c6579160200282015b828111156121c657825180516121b691849160209091019061222b565b5091602001919060010190612199565b5061212e9291506122ec565b82805482825590600052602060002090810192821561221f579160200282015b8281111561221f578251805161220f91849160209091019061222b565b50916020019190600101906121f2565b5061212e929150612309565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061226c57805160ff191683800117855561216d565b8280016001018555821561216d579182018281111561216d578251825591602001919060010190612152565b604080516060810182526000808252602082018190529181019190915290565b5b8082111561212e5780546001600160a01b03191681556001016122b9565b5b8082111561212e57600081556001016122d8565b8082111561212e5760006123008282612326565b506001016122ec565b8082111561212e57600061231d8282612326565b50600101612309565b50805460018160011615610100020316600290046000825580601f1061234c575061236a565b601f01602090049060005260206000209081019061236a91906122d7565b50565b600082601f83011261237d578081fd5b813561239061238b826134ab565b613484565b8181529150602080830190848101818402860182018710156123b157600080fd5b60005b848110156123d95781356123c781613527565b845292820192908201906001016123b4565b505050505092915050565b600082601f8301126123f4578081fd5b813561240261238b826134ab565b818152915060208083019084810160005b848110156123d95761242a888484358a010161249a565b84529282019290820190600101612413565b600082601f83011261244c578081fd5b813561245a61238b826134ab565b81815291506020808301908481018184028601820187101561247b57600080fd5b60005b848110156123d95781358452928201929082019060010161247e565b600082601f8301126124aa578081fd5b81356124b861238b826134cb565b91508082528360208285010111156124cf57600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156124f9578081fd5b8135611c0381613527565b600060208284031215612515578081fd5b8151611c0381613527565b60008060408385031215612532578081fd5b823561253d81613527565b946020939093013593505050565b600080600080600060a08688031215612562578081fd5b853567ffffffffffffffff80821115612579578283fd5b61258589838a0161236d565b9650602088013591508082111561259a578283fd5b6125a689838a0161243c565b955060408801359150808211156125bb578283fd5b6125c789838a016123e4565b945060608801359150808211156125dc578283fd5b6125e889838a016123e4565b935060808801359150808211156125fd578283fd5b5061260a8882890161249a565b9150509295509295909350565b600060208284031215612628578081fd5b8151611c038161353c565b600060208284031215612644578081fd5b5051919050565b60006020828403121561265c578081fd5b815167ffffffffffffffff811115612672578182fd5b8201601f81018413612682578182fd5b805161269061238b826134cb565b8181528560208385010111156126a4578384fd5b6126b58260208301602086016134fb565b95945050505050565b6000602082840312156126cf578081fd5b5035919050565b600080604083850312156126e8578182fd5b8235915060208301356126fa81613527565b809150509250929050565b60008060008060008060c0878903121561271d578384fd5b86359550602087013561272f8161353c565b9450604087013560ff81168114612744578485fd5b9350606087013592506080870135915060a08701356127628161354a565b809150509295509295509295565b600080600060608486031215612784578081fd5b8335925060208401356127968161353c565b915060408401356127a68161354a565b809150509250925092565b6000602082840312156127c2578081fd5b8151611c038161354a565b6000815180845260208085019450808401835b838110156128055781516001600160a01b0316875295820195908201906001016127e0565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b85811015612856578284038952612844848351612892565b9885019893509084019060010161282c565b5091979650505050505050565b6000815180845260208085019450808401835b8381101561280557815187529582019590820190600101612876565b600081518084526128aa8160208601602086016134fb565b601f01601f19169290920160200192915050565b600081546001808216600081146128dc57600181146128fa57612938565b60028304607f16865260ff1983166020870152604086019350612938565b6002830480875261290a866134ef565b60005b8281101561292e5781546020828b010152848201915060208101905061290d565b8801602001955050505b50505092915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038616825284602083015260a06040830152601860a08301527f73657450656e64696e6741646d696e286164647265737329000000000000000060c083015260e060608301526129e460e0830185612892565b905082608083015295945050505050565b6001600160a01b039490941684526020840192909252151560408301526001600160601b0316606082015260800190565b600060018060a01b038716825285602083015260a06040830152612a4d60a0830186612892565b8281036060840152612a5f8186612892565b9150508260808301529695505050505050565b600060018060a01b038716825285602083015260a06040830152612a9960a08301866128be565b8281036060840152612a5f81866128be565b6001600160a01b039290921682526001600160601b0316602082015260400190565b600060808252612ae060808301876127cd565b8281036020840152612af28187612863565b90508281036040840152612b068186612810565b90508281036060840152612b1a8185612810565b979650505050505050565b90815260200190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091521515604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b6020810160088310612b9657fe5b91905290565b600060208252611c036020830184612892565b6020808252603a908201527f476f7665726e6f723a3a70726f706f73653a2070726f706f73657220766f746560408201527f732062656c6f772070726f706f73616c207468726573686f6c64000000000000606082015260800190565b6020808252603f908201527f476f7665726e6f723a3a70726f706f73653a2070726f706f73616c2066756e6360408201527f74696f6e20696e666f726d6174696f6e206172697479206d69736d6174636800606082015260800190565b60208082526045908201527f476f7665726e6f723a3a5f5f717565756553657454696d656c6f636b50656e6460408201527f696e6741646d696e3a2073656e646572206d75737420626520676f7620677561606082015264393234b0b760d91b608082015260a00190565b60208082526044908201527f476f7665726e6f723a3a5f63617374566f74653a206e6f20656c696769626c6560408201527f20766f746573207072696f7220746f2070726f706f73616c20737461727420626060820152636c6f636b60e01b608082015260a00190565b60208082526023908201527f476f7665726e6f723a3a70726f706f73653a20746f6f206d616e7920616374696040820152626f6e7360e81b606082015260800190565b60208082526031908201527f476f7665726e6f723a3a63616e63656c3a2063616e6e6f742063616e63656c20604082015270195e1958dd5d1959081c1c9bdc1bdcd85b607a1b606082015260800190565b60208082526027908201527f476f7665726e6f723a3a70726f706f73653a206d7573742070726f7669646520604082015266616374696f6e7360c81b606082015260800190565b60208082526054908201527f476f7665726e6f723a3a70726f706f73653a206f6e65206c6976652070726f7060408201527f6f73616c207065722070726f706f7365722c20666f756e6420616e20616c726560608201527318591e481c195b991a5b99c81c1c9bdc1bdcd85b60621b608082015260a00190565b60208082526047908201527f476f7665726e6f723a3a5f5f6578656375746553657454696d656c6f636b506560408201527f6e64696e6741646d696e3a2073656e646572206d75737420626520676f7620676060820152663ab0b93234b0b760c91b608082015260a00190565b60208082526024908201527f476f7665726e6f723a3a73746174653a20696e76616c69642070726f706f73616040820152631b081a5960e21b606082015260800190565b60208082526053908201527f476f7665726e6f723a3a70726f706f73653a206f6e65206c6976652070726f7060408201527f6f73616c207065722070726f706f7365722c20666f756e6420616e20616c726560608201527218591e481858dd1a5d99481c1c9bdc1bdcd85b606a1b608082015260a00190565b60208082526032908201527f476f7665726e6f723a3a5f63617374566f74653a20766f746573206578636565604082015271191cc8195b1a59da589b1948185b5bdd5b9d60721b606082015260800190565b602080825260409082018190527f476f7665726e6f723a3a657865637574653a2070726f706f73616c2063616e20908201527f6f6e6c7920626520657865637574656420696620697420697320717565756564606082015260800190565b6020808252601190820152706164646974696f6e206f766572666c6f7760781b604082015260600190565b60208082526031908201527f476f7665726e6f723a3a5f5f61626469636174653a2073656e646572206d75736040820152703a1031329033b7bb1033bab0b93234b0b760791b606082015260800190565b6020808252603f908201527f476f7665726e6f723a3a5f71756575654f725265766572743a2070726f706f7360408201527f616c20616374696f6e20616c7265616479207175657565642061742065746100606082015260800190565b60208082526034908201527f476f7665726e6f723a3a5f5f61636365707441646d696e3a2073656e6465722060408201527336bab9ba1031329033b7bb1033bab0b93234b0b760611b606082015260800190565b60208082526028908201527f476f7665726e6f723a3a5f63617374566f74653a20766f74657220616c726561604082015267191e481d9bdd195960c21b606082015260800190565b6020808252602a908201527f476f7665726e6f723a3a63616e63656c3a2070726f706f7365722061626f7665604082015269081d1a1c995cda1bdb1960b21b606082015260800190565b60208082526025908201527f476f7665726e6f723a3a5f63617374566f74653a20766f74696e6720697320636040820152641b1bdcd95960da1b606082015260800190565b6020808252601590820152747375627472616374696f6e20756e646572666c6f7760581b604082015260600190565b6020808252603f908201527f476f7665726e6f723a3a71756575653a2070726f706f73616c2063616e206f6e60408201527f6c79206265207175657565642069662069742069732073756363656564656400606082015260800190565b6020808252602a908201527f476f7665726e6f723a3a63617374566f746542795369673a20696e76616c6964604082015269207369676e617475726560b01b606082015260800190565b8151151581526020808301511515908201526040918201516001600160601b03169181019190915260600190565b8981526001600160a01b0389166020820152610120604082018190526000906133a08382018b6127cd565b905082810360608401526133b4818a612863565b905082810360808401526133c88189612810565b905082810360a08401526133dc8188612810565b90508560c08401528460e08401528281036101008401526133fd8185612892565b9c9b505050505050505050505050565b60006101408c835260018060a01b038c1660208401528a60408401528960608401528860808401528760a08401528660c084015285151560e08401528415156101008401528061012084015261346581840185612892565b9d9c50505050505050505050505050565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156134a357600080fd5b604052919050565b600067ffffffffffffffff8211156134c1578081fd5b5060209081020190565b600067ffffffffffffffff8211156134e1578081fd5b50601f01601f191660200190565b60009081526020902090565b60005b838110156135165781810151838201526020016134fe565b838111156113a25750506000910152565b6001600160a01b038116811461236a57600080fd5b801515811461236a57600080fd5b6001600160601b038116811461236a57600080fdfea264697066735822122021edf24c872473a6e45f95e9982a644beed07932889999e7a0d0ff3f34acc66764736f6c63430007000033", - "deployedBytecode": "0x6080604052600436106101b75760003560e01c8063760fbc13116100ec578063da35c6641161008a578063ddf0b00911610064578063ddf0b00914610492578063deaaa7cc146104b2578063e23a9a52146104c7578063fe0d94c1146104f4576101b7565b8063da35c6641461043d578063da95691a14610452578063dbfa977f14610472576101b7565b806394a08d58116100c657806394a08d58146103e9578063b58131b0146103fe578063b9a6196114610413578063d33219b414610428576101b7565b8063760fbc131461039f5780637bdbe4d0146103b457806391500671146103c9576101b7565b8063328dd9821161015957806340e58ee51161013357806340e58ee51461031d578063452a93201461033d5780634925ec551461035f5780635d2546081461037f576101b7565b8063328dd982146102ab5780633932abb1146102db5780633e4f49e6146102f0576101b7565b806317977c611161019557806317977c611461023f57806320606b701461025f57806321f43e421461027457806324bc1a6414610296576101b7565b8063013cf08b146101bc57806302a251a3146101fb57806306fdde031461021d575b600080fd5b3480156101c857600080fd5b506101dc6101d73660046126be565b610507565b6040516101f29a9998979695949392919061340d565b60405180910390f35b34801561020757600080fd5b506102106105f6565b6040516101f29190612b25565b34801561022957600080fd5b506102326105fd565b6040516101f29190612b9c565b34801561024b57600080fd5b5061021061025a3660046124e8565b61062d565b34801561026b57600080fd5b5061021061063f565b34801561028057600080fd5b5061029461028f366004612520565b610663565b005b3480156102a257600080fd5b5061021061074a565b3480156102b757600080fd5b506102cb6102c63660046126be565b6108fd565b6040516101f29493929190612acd565b3480156102e757600080fd5b50610210610b8c565b3480156102fc57600080fd5b5061031061030b3660046126be565b610b91565b6040516101f29190612b88565b34801561032957600080fd5b506102946103383660046126be565b610d21565b34801561034957600080fd5b50610352610f8a565b6040516101f2919061295c565b34801561036b57600080fd5b5061023261037a3660046126be565b610f99565b34801561038b57600080fd5b5061029461039a366004612705565b61103d565b3480156103ab57600080fd5b506102946111f0565b3480156103c057600080fd5b5061021061122c565b3480156103d557600080fd5b506102946103e4366004612520565b611231565b3480156103f557600080fd5b50610352611306565b34801561040a57600080fd5b50610210611315565b34801561041f57600080fd5b50610294611323565b34801561043457600080fd5b506103526113a8565b34801561044957600080fd5b506102106113b7565b34801561045e57600080fd5b5061021061046d36600461254b565b6113bd565b34801561047e57600080fd5b5061029461048d366004612770565b611703565b34801561049e57600080fd5b506102946104ad3660046126be565b61170f565b3480156104be57600080fd5b50610210611979565b3480156104d357600080fd5b506104e76104e23660046126d6565b61199d565b6040516101f29190613347565b6102946105023660046126be565b611a09565b6004602090815260009182526040918290208054600180830154600280850154600786015460088701546009880154600a890154600b8a0154600c8b0180548e516101009b8216158c026000190190911698909804601f81018e90048e0289018e01909e528d8852999c6001600160a01b039098169b959a949993989297919660ff8083169794909204909116949390929091908301828280156105ec5780601f106105c1576101008083540402835291602001916105ec565b820191906000526020600020905b8154815290600101906020018083116105cf57829003601f168201915b505050505090508a565b6143805b90565b6040518060400160405280601481526020017321b634b6b0ba32902220a79023b7bb32b93737b960611b81525081565b60056020526000908152604090205481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6002546001600160a01b031633146106965760405162461bcd60e51b815260040161068d90612e93565b60405180910390fd5b600080546040516001600160a01b0390911691630825f38f918391906106c090879060200161295c565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016106ef9493929190612989565b600060405180830381600087803b15801561070957600080fd5b505af115801561071d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610745919081019061264b565b505050565b600154604080516357406cef60e11b8152905160009283926001600160a01b03909116916370a0823191839163ae80d9de91600480820192602092909190829003018186803b15801561079c57600080fd5b505afa1580156107b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d49190612504565b6040518263ffffffff1660e01b81526004016107f0919061295c565b60206040518083038186803b15801561080857600080fd5b505afa15801561081c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108409190612633565b9050600081600160009054906101000a90046001600160a01b03166001600160a01b031663c4e41b226040518163ffffffff1660e01b815260040160206040518083038186803b15801561089357600080fd5b505afa1580156108a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cb9190612633565b03905080156108f0576108e76108e2826019611bce565b611c0a565b925050506105fa565b649341498e019250505090565b6060806060806000600460008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561097f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610961575b50505050509350828054806020026020016040519081016040528092919081815260200182805480156109d157602002820191906000526020600020905b8154815260200190600101908083116109bd575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b82821015610aa45760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610a905780601f10610a6557610100808354040283529160200191610a90565b820191906000526020600020905b815481529060010190602001808311610a7357829003601f168201915b5050505050815260200190600101906109f9565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610b765760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610b625780601f10610b3757610100808354040283529160200191610b62565b820191906000526020600020905b815481529060010190602001808311610b4557829003601f168201915b505050505081526020019060010190610acb565b5050505090509450945094509450509193509193565b600190565b60008160035410158015610ba55750600082115b610bc15760405162461bcd60e51b815260040161068d90612f00565b6000828152600460205260409020600b81015460ff1615610be6576002915050610d1c565b80600701544311610bfb576000915050610d1c565b80600801544311610c10576001915050610d1c565b80600a01548160090154111580610c315750610c2a61074a565b8160090154105b15610c40576003915050610d1c565b6002810154610c53576004915050610d1c565b600b810154610100900460ff1615610c6f576007915050610d1c565b610d00816002015460008054906101000a90046001600160a01b03166001600160a01b031663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610cc357600080fd5b505afa158015610cd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfb9190612633565b611c3b565b4210610d10576006915050610d1c565b6005915050610d1c565b505b919050565b6000610d2c82610b91565b90506007816007811115610d3c57fe5b1415610d5a5760405162461bcd60e51b815260040161068d90612d81565b60008281526004602052604090206002546001600160a01b0316331480610e255750610d84611315565b60018054838201546001600160a01b039182169263782d6fe19290911690610dad904390611c60565b6040518363ffffffff1660e01b8152600401610dca929190612970565b60206040518083038186803b158015610de257600080fd5b505afa158015610df6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1a91906127b1565b6001600160601b0316105b610e415760405162461bcd60e51b815260040161068d906131e2565b600b8101805460ff1916600117905560005b6003820154811015610f4d576000546003830180546001600160a01b039092169163591fcdfe919084908110610e8557fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610ead57fe5b9060005260206000200154856005018581548110610ec757fe5b90600052602060002001866006018681548110610ee057fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610f0f959493929190612a72565b600060405180830381600087803b158015610f2957600080fd5b505af1158015610f3d573d6000803e3d6000fd5b505060019092019150610e539050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610f7d9190612b25565b60405180910390a1505050565b6002546001600160a01b031681565b600081815260046020908152604091829020600c0180548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156110315780601f1061100657610100808354040283529160200191611031565b820191906000526020600020905b81548152906001019060200180831161101457829003601f168201915b50505050509050919050565b60408051808201909152601481527321b634b6b0ba32902220a79023b7bb32b93737b960611b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667fc91d7024f1084cf2cbc672fa7c9487148f930f2547c197a0c5a286cc6f4923ea6110b5611c88565b306040516020016110c99493929190612b2e565b60405160208183030381529060405280519060200120905060007f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee888860405160200161111893929190612b52565b60405160208183030381529060405280519060200120905060008282604051602001611145929190612941565b6040516020818303038152906040528051906020012090506000600182898989604051600081526020016040526040516111829493929190612b6a565b6020604051602081039080840390855afa1580156111a4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166111d75760405162461bcd60e51b815260040161068d906132fd565b6111e3818b8b88611c8c565b505050505b505050505050565b6002546001600160a01b0316331461121a5760405162461bcd60e51b815260040161068d90613098565b600280546001600160a01b0319169055565b600a90565b6002546001600160a01b0316331461125b5760405162461bcd60e51b815260040161068d90612c69565b600080546040516001600160a01b0390911691633a66f9019183919061128590879060200161295c565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016112b49493929190612989565b602060405180830381600087803b1580156112ce57600080fd5b505af11580156112e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190612633565b6001546001600160a01b031681565b69152d02c7e14af680000090565b6002546001600160a01b0316331461134d5760405162461bcd60e51b815260040161068d90613146565b6000805460408051630e18b68160e01b815290516001600160a01b0390921692630e18b6819260048084019382900301818387803b15801561138e57600080fd5b505af11580156113a2573d6000803e3d6000fd5b50505050565b6000546001600160a01b031681565b60035481565b60006113c7611315565b600180546001600160a01b03169063782d6fe19033906113e8904390611c60565b6040518363ffffffff1660e01b8152600401611405929190612970565b60206040518083038186803b15801561141d57600080fd5b505afa158015611431573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145591906127b1565b6001600160601b03161161147b5760405162461bcd60e51b815260040161068d90612baf565b8451865114801561148d575083518651145b801561149a575082518651145b6114b65760405162461bcd60e51b815260040161068d90612c0c565b85516114d45760405162461bcd60e51b815260040161068d90612dd2565b6114dc61122c565b865111156114fc5760405162461bcd60e51b815260040161068d90612d3e565b33600090815260056020526040902054801561157957600061151d82610b91565b9050600181600781111561152d57fe5b141561154b5760405162461bcd60e51b815260040161068d90612f44565b600081600781111561155957fe5b14156115775760405162461bcd60e51b815260040161068d90612e19565b505b600061158743610cfb610b8c565b9050600061159782610cfb6105f6565b6003805460019081018083556000818152600460209081526040822092835592820180546001600160a01b0319163317905560028201558c51939450926115e3928401918d01906120cd565b5088516115f990600483019060208c0190612132565b50875161160f90600583019060208b0190612179565b50865161162590600683019060208a01906121d2565b506007810183905560088101829055600060098201819055600a820155600b8101805461ffff19169055855161166490600c830190602089019061222b565b508060000154600560008360010160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000154338c8c8c8c89898e6040516116ed99989796959493929190613375565b60405180910390a1549998505050505050505050565b61074533848484611c8c565b600461171a82610b91565b600781111561172557fe5b146117425760405162461bcd60e51b815260040161068d906132a0565b600081815260046020818152604080842084548251630d48571f60e31b815292519195946117979442946001600160a01b0390931693636a42b8f8938084019390829003018186803b158015610cc357600080fd5b905060005b600383015481101561193f576119378360030182815481106117ba57fe5b6000918252602090912001546004850180546001600160a01b0390921691849081106117e257fe5b90600052602060002001548560050184815481106117fc57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561188a5780601f1061185f5761010080835404028352916020019161188a565b820191906000526020600020905b81548152906001019060200180831161186d57829003601f168201915b505050505086600601858154811061189e57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561192c5780601f106119015761010080835404028352916020019161192c565b820191906000526020600020905b81548152906001019060200180831161190f57829003601f168201915b505050505086611f3f565b60010161179c565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610f7d9085908490613476565b7f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee81565b6119a5612298565b5060009182526004602090815260408084206001600160a01b03939093168452600d9092018152918190208151606081018352905460ff80821615158352610100820416151593820193909352620100009092046001600160601b03169082015290565b6005611a1482610b91565b6007811115611a1f57fe5b14611a3c5760405162461bcd60e51b815260040161068d9061300f565b6000818152600460205260408120600b8101805461ff001916610100179055905b6003820154811015611b92576000546004830180546001600160a01b0390921691630825f38f919084908110611a8f57fe5b9060005260206000200154846003018481548110611aa957fe5b6000918252602090912001546004860180546001600160a01b039092169186908110611ad157fe5b9060005260206000200154866005018681548110611aeb57fe5b90600052602060002001876006018781548110611b0457fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611b33959493929190612a72565b6000604051808303818588803b158015611b4c57600080fd5b505af1158015611b60573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611b89919081019061264b565b50600101611a5d565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f82604051611bc29190612b25565b60405180910390a15050565b6000611c0383836040518060400160405280601081526020016f6469766973696f6e206279207a65726f60801b815250612096565b9392505050565b80600260018201045b81811015610d1a57809150600281828581611c2a57fe5b040181611c3357fe5b049050611c13565b600082820183811015611c035760405162461bcd60e51b815260040161068d9061306d565b600082821115611c825760405162461bcd60e51b815260040161068d90613271565b50900390565b4690565b6001611c9784610b91565b6007811115611ca257fe5b14611cbf5760405162461bcd60e51b815260040161068d9061322c565b60008381526004602090815260408083206001600160a01b0388168452600d8101909252909120805460ff1615611d085760405162461bcd60e51b815260040161068d9061319a565b6000836001600160601b031611611d315760405162461bcd60e51b815260040161068d90612cd4565b8054600154600784015460405163782d6fe160e01b81526000936201000090046001600160601b0316926001600160a01b03169163782d6fe191611d79918c91600401612970565b60206040518083038186803b158015611d9157600080fd5b505afa158015611da5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc991906127b1565b039050806001600160601b0316846001600160601b03161115611dfe5760405162461bcd60e51b815260040161068d90612fbd565b6000611e12856001600160601b0316611c0a565b90508515611e3b57611e318460090154826001600160601b0316611c3b565b6009850155611e58565b611e5284600a0154826001600160601b0316611c3b565b600a8501555b600154604051633969f74f60e11b81526001600160a01b03909116906372d3ee9e90611e8a908b908990600401612aab565b600060405180830381600087803b158015611ea457600080fd5b505af1158015611eb8573d6000803e3d6000fd5b50508454600160ff199091161761ff00191661010089151502176dffffffffffffffffffffffff00001916620100006001600160601b0385160217855550506040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690611f2d908a908a908a9086906129f5565b60405180910390a15050505050505050565b6000546040516001600160a01b039091169063f2b0653790611f6d9088908890889088908890602001612a26565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611f9f9190612b25565b60206040518083038186803b158015611fb757600080fd5b505afa158015611fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fef9190612617565b1561200c5760405162461bcd60e51b815260040161068d906130e9565b600054604051633a66f90160e01b81526001600160a01b0390911690633a66f901906120449088908890889088908890600401612a26565b602060405180830381600087803b15801561205e57600080fd5b505af1158015612072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e89190612633565b600081836120b75760405162461bcd60e51b815260040161068d9190612b9c565b5060008385816120c357fe5b0495945050505050565b828054828255906000526020600020908101928215612122579160200282015b8281111561212257825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906120ed565b5061212e9291506122b8565b5090565b82805482825590600052602060002090810192821561216d579160200282015b8281111561216d578251825591602001919060010190612152565b5061212e9291506122d7565b8280548282559060005260206000209081019282156121c6579160200282015b828111156121c657825180516121b691849160209091019061222b565b5091602001919060010190612199565b5061212e9291506122ec565b82805482825590600052602060002090810192821561221f579160200282015b8281111561221f578251805161220f91849160209091019061222b565b50916020019190600101906121f2565b5061212e929150612309565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061226c57805160ff191683800117855561216d565b8280016001018555821561216d579182018281111561216d578251825591602001919060010190612152565b604080516060810182526000808252602082018190529181019190915290565b5b8082111561212e5780546001600160a01b03191681556001016122b9565b5b8082111561212e57600081556001016122d8565b8082111561212e5760006123008282612326565b506001016122ec565b8082111561212e57600061231d8282612326565b50600101612309565b50805460018160011615610100020316600290046000825580601f1061234c575061236a565b601f01602090049060005260206000209081019061236a91906122d7565b50565b600082601f83011261237d578081fd5b813561239061238b826134ab565b613484565b8181529150602080830190848101818402860182018710156123b157600080fd5b60005b848110156123d95781356123c781613527565b845292820192908201906001016123b4565b505050505092915050565b600082601f8301126123f4578081fd5b813561240261238b826134ab565b818152915060208083019084810160005b848110156123d95761242a888484358a010161249a565b84529282019290820190600101612413565b600082601f83011261244c578081fd5b813561245a61238b826134ab565b81815291506020808301908481018184028601820187101561247b57600080fd5b60005b848110156123d95781358452928201929082019060010161247e565b600082601f8301126124aa578081fd5b81356124b861238b826134cb565b91508082528360208285010111156124cf57600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156124f9578081fd5b8135611c0381613527565b600060208284031215612515578081fd5b8151611c0381613527565b60008060408385031215612532578081fd5b823561253d81613527565b946020939093013593505050565b600080600080600060a08688031215612562578081fd5b853567ffffffffffffffff80821115612579578283fd5b61258589838a0161236d565b9650602088013591508082111561259a578283fd5b6125a689838a0161243c565b955060408801359150808211156125bb578283fd5b6125c789838a016123e4565b945060608801359150808211156125dc578283fd5b6125e889838a016123e4565b935060808801359150808211156125fd578283fd5b5061260a8882890161249a565b9150509295509295909350565b600060208284031215612628578081fd5b8151611c038161353c565b600060208284031215612644578081fd5b5051919050565b60006020828403121561265c578081fd5b815167ffffffffffffffff811115612672578182fd5b8201601f81018413612682578182fd5b805161269061238b826134cb565b8181528560208385010111156126a4578384fd5b6126b58260208301602086016134fb565b95945050505050565b6000602082840312156126cf578081fd5b5035919050565b600080604083850312156126e8578182fd5b8235915060208301356126fa81613527565b809150509250929050565b60008060008060008060c0878903121561271d578384fd5b86359550602087013561272f8161353c565b9450604087013560ff81168114612744578485fd5b9350606087013592506080870135915060a08701356127628161354a565b809150509295509295509295565b600080600060608486031215612784578081fd5b8335925060208401356127968161353c565b915060408401356127a68161354a565b809150509250925092565b6000602082840312156127c2578081fd5b8151611c038161354a565b6000815180845260208085019450808401835b838110156128055781516001600160a01b0316875295820195908201906001016127e0565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b85811015612856578284038952612844848351612892565b9885019893509084019060010161282c565b5091979650505050505050565b6000815180845260208085019450808401835b8381101561280557815187529582019590820190600101612876565b600081518084526128aa8160208601602086016134fb565b601f01601f19169290920160200192915050565b600081546001808216600081146128dc57600181146128fa57612938565b60028304607f16865260ff1983166020870152604086019350612938565b6002830480875261290a866134ef565b60005b8281101561292e5781546020828b010152848201915060208101905061290d565b8801602001955050505b50505092915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038616825284602083015260a06040830152601860a08301527f73657450656e64696e6741646d696e286164647265737329000000000000000060c083015260e060608301526129e460e0830185612892565b905082608083015295945050505050565b6001600160a01b039490941684526020840192909252151560408301526001600160601b0316606082015260800190565b600060018060a01b038716825285602083015260a06040830152612a4d60a0830186612892565b8281036060840152612a5f8186612892565b9150508260808301529695505050505050565b600060018060a01b038716825285602083015260a06040830152612a9960a08301866128be565b8281036060840152612a5f81866128be565b6001600160a01b039290921682526001600160601b0316602082015260400190565b600060808252612ae060808301876127cd565b8281036020840152612af28187612863565b90508281036040840152612b068186612810565b90508281036060840152612b1a8185612810565b979650505050505050565b90815260200190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091521515604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b6020810160088310612b9657fe5b91905290565b600060208252611c036020830184612892565b6020808252603a908201527f476f7665726e6f723a3a70726f706f73653a2070726f706f73657220766f746560408201527f732062656c6f772070726f706f73616c207468726573686f6c64000000000000606082015260800190565b6020808252603f908201527f476f7665726e6f723a3a70726f706f73653a2070726f706f73616c2066756e6360408201527f74696f6e20696e666f726d6174696f6e206172697479206d69736d6174636800606082015260800190565b60208082526045908201527f476f7665726e6f723a3a5f5f717565756553657454696d656c6f636b50656e6460408201527f696e6741646d696e3a2073656e646572206d75737420626520676f7620677561606082015264393234b0b760d91b608082015260a00190565b60208082526044908201527f476f7665726e6f723a3a5f63617374566f74653a206e6f20656c696769626c6560408201527f20766f746573207072696f7220746f2070726f706f73616c20737461727420626060820152636c6f636b60e01b608082015260a00190565b60208082526023908201527f476f7665726e6f723a3a70726f706f73653a20746f6f206d616e7920616374696040820152626f6e7360e81b606082015260800190565b60208082526031908201527f476f7665726e6f723a3a63616e63656c3a2063616e6e6f742063616e63656c20604082015270195e1958dd5d1959081c1c9bdc1bdcd85b607a1b606082015260800190565b60208082526027908201527f476f7665726e6f723a3a70726f706f73653a206d7573742070726f7669646520604082015266616374696f6e7360c81b606082015260800190565b60208082526054908201527f476f7665726e6f723a3a70726f706f73653a206f6e65206c6976652070726f7060408201527f6f73616c207065722070726f706f7365722c20666f756e6420616e20616c726560608201527318591e481c195b991a5b99c81c1c9bdc1bdcd85b60621b608082015260a00190565b60208082526047908201527f476f7665726e6f723a3a5f5f6578656375746553657454696d656c6f636b506560408201527f6e64696e6741646d696e3a2073656e646572206d75737420626520676f7620676060820152663ab0b93234b0b760c91b608082015260a00190565b60208082526024908201527f476f7665726e6f723a3a73746174653a20696e76616c69642070726f706f73616040820152631b081a5960e21b606082015260800190565b60208082526053908201527f476f7665726e6f723a3a70726f706f73653a206f6e65206c6976652070726f7060408201527f6f73616c207065722070726f706f7365722c20666f756e6420616e20616c726560608201527218591e481858dd1a5d99481c1c9bdc1bdcd85b606a1b608082015260a00190565b60208082526032908201527f476f7665726e6f723a3a5f63617374566f74653a20766f746573206578636565604082015271191cc8195b1a59da589b1948185b5bdd5b9d60721b606082015260800190565b602080825260409082018190527f476f7665726e6f723a3a657865637574653a2070726f706f73616c2063616e20908201527f6f6e6c7920626520657865637574656420696620697420697320717565756564606082015260800190565b6020808252601190820152706164646974696f6e206f766572666c6f7760781b604082015260600190565b60208082526031908201527f476f7665726e6f723a3a5f5f61626469636174653a2073656e646572206d75736040820152703a1031329033b7bb1033bab0b93234b0b760791b606082015260800190565b6020808252603f908201527f476f7665726e6f723a3a5f71756575654f725265766572743a2070726f706f7360408201527f616c20616374696f6e20616c7265616479207175657565642061742065746100606082015260800190565b60208082526034908201527f476f7665726e6f723a3a5f5f61636365707441646d696e3a2073656e6465722060408201527336bab9ba1031329033b7bb1033bab0b93234b0b760611b606082015260800190565b60208082526028908201527f476f7665726e6f723a3a5f63617374566f74653a20766f74657220616c726561604082015267191e481d9bdd195960c21b606082015260800190565b6020808252602a908201527f476f7665726e6f723a3a63616e63656c3a2070726f706f7365722061626f7665604082015269081d1a1c995cda1bdb1960b21b606082015260800190565b60208082526025908201527f476f7665726e6f723a3a5f63617374566f74653a20766f74696e6720697320636040820152641b1bdcd95960da1b606082015260800190565b6020808252601590820152747375627472616374696f6e20756e646572666c6f7760581b604082015260600190565b6020808252603f908201527f476f7665726e6f723a3a71756575653a2070726f706f73616c2063616e206f6e60408201527f6c79206265207175657565642069662069742069732073756363656564656400606082015260800190565b6020808252602a908201527f476f7665726e6f723a3a63617374566f746542795369673a20696e76616c6964604082015269207369676e617475726560b01b606082015260800190565b8151151581526020808301511515908201526040918201516001600160601b03169181019190915260600190565b8981526001600160a01b0389166020820152610120604082018190526000906133a08382018b6127cd565b905082810360608401526133b4818a612863565b905082810360808401526133c88189612810565b905082810360a08401526133dc8188612810565b90508560c08401528460e08401528281036101008401526133fd8185612892565b9c9b505050505050505050505050565b60006101408c835260018060a01b038c1660208401528a60408401528960608401528860808401528760a08401528660c084015285151560e08401528415156101008401528061012084015261346581840185612892565b9d9c50505050505050505050505050565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156134a357600080fd5b604052919050565b600067ffffffffffffffff8211156134c1578081fd5b5060209081020190565b600067ffffffffffffffff8211156134e1578081fd5b50601f01601f191660200190565b60009081526020902090565b60005b838110156135165781810151838201526020016134fe565b838111156113a25750506000910152565b6001600160a01b038116811461236a57600080fd5b801515811461236a57600080fd5b6001600160601b038116811461236a57600080fdfea264697066735822122021edf24c872473a6e45f95e9982a644beed07932889999e7a0d0ff3f34acc66764736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/TimelockInterface.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/TimelockInterface.dbg.json deleted file mode 100644 index 102217eb7c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/TimelockInterface.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../../build-info/63ceb59b1611816263aa22cb81ea46e7.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/TimelockInterface.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/TimelockInterface.json deleted file mode 100644 index e104a33d77..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/TimelockInterface.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "TimelockInterface", - "sourceName": "src/main/solidity/net-emissions-token-network/Governance/Governor.sol", - "abi": [ - { - "inputs": [], - "name": "GRACE_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "cancelTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "queueTransaction", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "queuedTransactions", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Timelock.sol/Timelock.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Timelock.sol/Timelock.dbg.json deleted file mode 100644 index 2c87f4a8f0..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Timelock.sol/Timelock.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../../build-info/61309ed03e4f8b47380b5532e69fda9e.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Timelock.sol/Timelock.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Timelock.sol/Timelock.json deleted file mode 100644 index f779bf85aa..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/Governance/Timelock.sol/Timelock.json +++ /dev/null @@ -1,444 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Timelock", - "sourceName": "src/main/solidity/net-emissions-token-network/Governance/Timelock.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "delay_", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "CancelTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "ExecuteTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "newDelay", - "type": "uint256" - } - ], - "name": "NewDelay", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "QueueTransaction", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "GRACE_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAXIMUM_DELAY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINIMUM_DELAY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "cancelTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "queueTransaction", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "queuedTransactions", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "delay_", - "type": "uint256" - } - ], - "name": "setDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pendingAdmin_", - "type": "address" - } - ], - "name": "setPendingAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506040516118813803806118818339818101604052604081101561003357600080fd5b5080516020909101516202a30081101561007e5760405162461bcd60e51b81526004018080602001828103825260378152602001806118126037913960400191505060405180910390fd5b62278d008111156100c05760405162461bcd60e51b81526004018080602001828103825260388152602001806118496038913960400191505060405180910390fd5b600080546001600160a01b039093166001600160a01b03199093169290921790915560025561171e806100f46000396000f3fe6080604052600436106100c65760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e2146105e8578063e177246e146105fd578063f2b0653714610627578063f851a44014610665576100cd565b80636a42b8f8146105a95780637d645fab146105be578063b1b43ae5146105d3576100cd565b80630825f38f146100cf5780630e18b6811461028457806326782247146102995780633a66f901146102ca5780634dd18bf514610429578063591fcdfe1461045c576100cd565b366100cd57005b005b61020f600480360360a08110156100e557600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561011457600080fd5b82018360208201111561012657600080fd5b803590602001918460018302840111600160201b8311171561014757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561019957600080fd5b8201836020820111156101ab57600080fd5b803590602001918460018302840111600160201b831117156101cc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061067a915050565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610249578181015183820152602001610231565b50505050905090810190601f1680156102765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029057600080fd5b506100cd610b7a565b3480156102a557600080fd5b506102ae610c16565b604080516001600160a01b039092168252519081900360200190f35b3480156102d657600080fd5b50610417600480360360a08110156102ed57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561031c57600080fd5b82018360208201111561032e57600080fd5b803590602001918460018302840111600160201b8311171561034f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103a157600080fd5b8201836020820111156103b357600080fd5b803590602001918460018302840111600160201b831117156103d457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610c25915050565b60408051918252519081900360200190f35b34801561043557600080fd5b506100cd6004803603602081101561044c57600080fd5b50356001600160a01b0316610f27565b34801561046857600080fd5b506100cd600480360360a081101561047f57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104ae57600080fd5b8201836020820111156104c057600080fd5b803590602001918460018302840111600160201b831117156104e157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561053357600080fd5b82018360208201111561054557600080fd5b803590602001918460018302840111600160201b8311171561056657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610fb5915050565b3480156105b557600080fd5b50610417611262565b3480156105ca57600080fd5b50610417611268565b3480156105df57600080fd5b5061041761126f565b3480156105f457600080fd5b50610417611276565b34801561060957600080fd5b506100cd6004803603602081101561062057600080fd5b503561127d565b34801561063357600080fd5b506106516004803603602081101561064a57600080fd5b5035611372565b604080519115158252519081900360200190f35b34801561067157600080fd5b506102ae611387565b6000546060906001600160a01b031633146106c65760405162461bcd60e51b81526004018080602001828103825260388152602001806113fc6038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561072c578181015183820152602001610714565b50505050905090810190601f1680156107595780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561078c578181015183820152602001610774565b50505050905090810190601f1680156107b95780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600390935291205490995060ff16975061082a96505050505050505760405162461bcd60e51b815260040180806020018281038252603d81526020018061154f603d913960400191505060405180910390fd5b82610833611396565b10156108705760405162461bcd60e51b815260040180806020018281038252604581526020018061149e6045913960600191505060405180910390fd5b61087d836212750061139a565b610885611396565b11156108c25760405162461bcd60e51b815260040180806020018281038252603381526020018061146b6033913960400191505060405180910390fd5b6000818152600360205260409020805460ff1916905584516060906108e857508361096b565b85805190602001208560405160200180836001600160e01b031916815260040182805190602001908083835b602083106109335780518252601f199092019160209182019101610914565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b602083106109aa5780518252601f19909201916020918201910161098b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a0c576040519150601f19603f3d011682016040523d82523d6000602084013e610a11565b606091505b509150915081610a525760405162461bcd60e51b815260040180806020018281038252603d815260200180611632603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610acf578181015183820152602001610ab7565b50505050905090810190601f168015610afc5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b2f578181015183820152602001610b17565b50505050905090810190601f168015610b5c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610bc35760405162461bcd60e51b815260040180806020018281038252603881526020018061158c6038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b03163314610c6f5760405162461bcd60e51b81526004018080602001828103825260368152602001806115fc6036913960400191505060405180910390fd5b610c83600254610c7d611396565b9061139a565b821015610cc15760405162461bcd60e51b815260040180806020018281038252604981526020018061166f6049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610d27578181015183820152602001610d0f565b50505050905090810190601f168015610d545780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610d87578181015183820152602001610d6f565b50505050905090810190601f168015610db45780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610e7f578181015183820152602001610e67565b50505050905090810190601f168015610eac5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610edf578181015183820152602001610ec7565b50505050905090810190601f168015610f0c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b333014610f655760405162461bcd60e51b81526004018080602001828103825260388152602001806115c46038913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b03163314610ffe5760405162461bcd60e51b81526004018080602001828103825260378152602001806114346037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561106457818101518382015260200161104c565b50505050905090810190601f1680156110915780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156110c45781810151838201526020016110ac565b50505050905090810190601f1680156110f15780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156111bc5781810151838201526020016111a4565b50505050905090810190601f1680156111e95780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561121c578181015183820152602001611204565b50505050905090810190601f1680156112495780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b62278d0081565b6202a30081565b6212750081565b3330146112bb5760405162461bcd60e51b81526004018080602001828103825260318152602001806116b86031913960400191505060405180910390fd5b6202a3008110156112fd5760405162461bcd60e51b81526004018080602001828103825260348152602001806114e36034913960400191505060405180910390fd5b62278d0081111561133f5760405162461bcd60e51b81526004018080602001828103825260388152602001806115176038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b6000828201838110156113f4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea2646970667358221220f994c43d6782ed10bafd2c9d2047baccbf34a12abb61ea10bc0475d9f23ecf5b64736f6c6343000700003354696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e", - "deployedBytecode": "0x6080604052600436106100c65760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e2146105e8578063e177246e146105fd578063f2b0653714610627578063f851a44014610665576100cd565b80636a42b8f8146105a95780637d645fab146105be578063b1b43ae5146105d3576100cd565b80630825f38f146100cf5780630e18b6811461028457806326782247146102995780633a66f901146102ca5780634dd18bf514610429578063591fcdfe1461045c576100cd565b366100cd57005b005b61020f600480360360a08110156100e557600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561011457600080fd5b82018360208201111561012657600080fd5b803590602001918460018302840111600160201b8311171561014757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561019957600080fd5b8201836020820111156101ab57600080fd5b803590602001918460018302840111600160201b831117156101cc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061067a915050565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610249578181015183820152602001610231565b50505050905090810190601f1680156102765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029057600080fd5b506100cd610b7a565b3480156102a557600080fd5b506102ae610c16565b604080516001600160a01b039092168252519081900360200190f35b3480156102d657600080fd5b50610417600480360360a08110156102ed57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561031c57600080fd5b82018360208201111561032e57600080fd5b803590602001918460018302840111600160201b8311171561034f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103a157600080fd5b8201836020820111156103b357600080fd5b803590602001918460018302840111600160201b831117156103d457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610c25915050565b60408051918252519081900360200190f35b34801561043557600080fd5b506100cd6004803603602081101561044c57600080fd5b50356001600160a01b0316610f27565b34801561046857600080fd5b506100cd600480360360a081101561047f57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104ae57600080fd5b8201836020820111156104c057600080fd5b803590602001918460018302840111600160201b831117156104e157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561053357600080fd5b82018360208201111561054557600080fd5b803590602001918460018302840111600160201b8311171561056657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610fb5915050565b3480156105b557600080fd5b50610417611262565b3480156105ca57600080fd5b50610417611268565b3480156105df57600080fd5b5061041761126f565b3480156105f457600080fd5b50610417611276565b34801561060957600080fd5b506100cd6004803603602081101561062057600080fd5b503561127d565b34801561063357600080fd5b506106516004803603602081101561064a57600080fd5b5035611372565b604080519115158252519081900360200190f35b34801561067157600080fd5b506102ae611387565b6000546060906001600160a01b031633146106c65760405162461bcd60e51b81526004018080602001828103825260388152602001806113fc6038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561072c578181015183820152602001610714565b50505050905090810190601f1680156107595780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561078c578181015183820152602001610774565b50505050905090810190601f1680156107b95780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600390935291205490995060ff16975061082a96505050505050505760405162461bcd60e51b815260040180806020018281038252603d81526020018061154f603d913960400191505060405180910390fd5b82610833611396565b10156108705760405162461bcd60e51b815260040180806020018281038252604581526020018061149e6045913960600191505060405180910390fd5b61087d836212750061139a565b610885611396565b11156108c25760405162461bcd60e51b815260040180806020018281038252603381526020018061146b6033913960400191505060405180910390fd5b6000818152600360205260409020805460ff1916905584516060906108e857508361096b565b85805190602001208560405160200180836001600160e01b031916815260040182805190602001908083835b602083106109335780518252601f199092019160209182019101610914565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b602083106109aa5780518252601f19909201916020918201910161098b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a0c576040519150601f19603f3d011682016040523d82523d6000602084013e610a11565b606091505b509150915081610a525760405162461bcd60e51b815260040180806020018281038252603d815260200180611632603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610acf578181015183820152602001610ab7565b50505050905090810190601f168015610afc5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b2f578181015183820152602001610b17565b50505050905090810190601f168015610b5c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610bc35760405162461bcd60e51b815260040180806020018281038252603881526020018061158c6038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b03163314610c6f5760405162461bcd60e51b81526004018080602001828103825260368152602001806115fc6036913960400191505060405180910390fd5b610c83600254610c7d611396565b9061139a565b821015610cc15760405162461bcd60e51b815260040180806020018281038252604981526020018061166f6049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610d27578181015183820152602001610d0f565b50505050905090810190601f168015610d545780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610d87578181015183820152602001610d6f565b50505050905090810190601f168015610db45780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610e7f578181015183820152602001610e67565b50505050905090810190601f168015610eac5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610edf578181015183820152602001610ec7565b50505050905090810190601f168015610f0c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b333014610f655760405162461bcd60e51b81526004018080602001828103825260388152602001806115c46038913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b03163314610ffe5760405162461bcd60e51b81526004018080602001828103825260378152602001806114346037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561106457818101518382015260200161104c565b50505050905090810190601f1680156110915780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156110c45781810151838201526020016110ac565b50505050905090810190601f1680156110f15780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156111bc5781810151838201526020016111a4565b50505050905090810190601f1680156111e95780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561121c578181015183820152602001611204565b50505050905090810190601f1680156112495780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b62278d0081565b6202a30081565b6212750081565b3330146112bb5760405162461bcd60e51b81526004018080602001828103825260318152602001806116b86031913960400191505060405180910390fd5b6202a3008110156112fd5760405162461bcd60e51b81526004018080602001828103825260348152602001806114e36034913960400191505060405180910390fd5b62278d0081111561133f5760405162461bcd60e51b81526004018080602001828103825260388152602001806115176038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b6000828201838110156113f4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea2646970667358221220f994c43d6782ed10bafd2c9d2047baccbf34a12abb61ea10bc0475d9f23ecf5b64736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol/NetEmissionsTokenNetwork.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol/NetEmissionsTokenNetwork.dbg.json deleted file mode 100644 index e8691a42b8..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol/NetEmissionsTokenNetwork.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol/NetEmissionsTokenNetwork.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol/NetEmissionsTokenNetwork.json deleted file mode 100644 index a9635ce342..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol/NetEmissionsTokenNetwork.json +++ /dev/null @@ -1,1337 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "NetEmissionsTokenNetwork", - "sourceName": "src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "RegisteredConsumer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "RegisteredDealer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "availableBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "retiredBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "dateCreated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "TokenCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRetired", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "UnregisteredConsumer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "UnregisteredDealer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_CONSUMER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_EMISSIONS_AUDITOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_OFFSET_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_REC_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getAvailableAndRetired", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getIssuer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNumOfUniqueTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getRoles", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenDetails", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dateCreated", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "internalType": "struct NetEmissionsTokenNetwork.CarbonTokenDetails", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenRetiredAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenType", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isConsumerRegistered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isDealerRegistered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "issue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "issueOnBehalf", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "limitedMode", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "registerConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - } - ], - "name": "registerDealer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "retire", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_limitedMode", - "type": "bool" - } - ], - "name": "setLimitedMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_timelock", - "type": "address" - } - ], - "name": "setTimelock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "unregisterConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - } - ], - "name": "unregisterDealer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b5061492e806100206000396000f3fe608060405234801561001057600080fd5b50600436106102735760003560e01c80637f157c9b11610151578063ce6ccfaf116100c3578063e985e9c511610087578063e985e9c514610575578063f000be9814610588578063f242432a1461059b578063f851a440146105ae578063fcba7948146105b6578063fd0c4a9a146105be57610273565b8063ce6ccfaf14610510578063d547741f14610534578063dba851b014610547578063ddc3e6eb1461054f578063e2e564f21461056257610273565b8063a217fddf11610115578063a217fddf1461049c578063a22cb465146104a4578063bdacb303146104b7578063c1e03728146104ca578063c4d66de8146104ea578063ca15c873146104fd57610273565b80637f157c9b146104225780639010d07c1461044357806391d148541461046357806392089c4614610476578063a0d975a71461048957610273565b806331aa4b20116101ea57806353dbe982116101ae57806353dbe982146103d15780635ddb368f146103e457806369f7ef44146103ec57806376aed2e1146103ff57806376ce47551461041257806378e5c5921461041a57610273565b806331aa4b201461036557806333781a0e1461037857806336568abe1461038b57806344b22fdd1461039e5780634e1273f4146103b157610273565b806318a50d7e1161023c57806318a50d7e146103095780631ef68ef714610311578063248a9ca314610319578063293a7f2e1461032c5780632eb2c2d61461033f5780632f2ff15d1461035257610273565b8062fdd58e1461027857806301ffc9a7146102a1578063095bcdb6146102c15780630e89341c146102d6578063156e29f6146102f6575b600080fd5b61028b61028636600461325c565b6105d1565b60405161029891906137a3565b60405180910390f35b6102b46102af3660046134f2565b61062d565b604051610298919061376f565b6102d46102cf366004613286565b610650565b005b6102e96102e4366004613495565b610775565b60405161029891906137ac565b6102d4610304366004613286565b61080d565b61028b61089c565b61028b6108ae565b61028b610327366004613495565b6108c0565b6102d461033a3660046134d1565b6108d5565b6102d461034d366004613030565b610a56565b6102d46103603660046134ad565b610c75565b6102d46103733660046132b9565b610cbd565b6102b4610386366004612fe1565b610dbe565b6102d46103993660046134ad565b610dd8565b6102d46103ac366004612fe1565b610e1a565b6103c46103bf3660046133b3565b610f1f565b604051610298919061372e565b6102d46103df366004612fe1565b610fec565b61028b6110f1565b6102b46103fa366004612fe1565b611103565b6102e961040d366004613495565b611185565b61028b61127e565b61028b611290565b61043561043036600461325c565b6112a2565b60405161029892919061464f565b6104566104513660046134d1565b611339565b604051610298919061365e565b6102b46104713660046134ad565b611358565b610456610484366004613495565b611370565b61028b61049736600461325c565b611393565b61028b6113e2565b6102d46104b2366004613221565b6113e7565b6102d46104c5366004612fe1565b6114b5565b6104dd6104d8366004613495565b6114fe565b6040516102989190614577565b6102d46104f8366004612fe1565b61173e565b61028b61050b366004613495565b61189e565b61052361051e366004612fe1565b6118b5565b60405161029895949392919061377a565b6102d46105423660046134ad565b611949565b6102b4611983565b6102d461055d366004613475565b61198c565b6102d46105703660046132b9565b6119c6565b6102b4610583366004612ffc565b611ad4565b6102d461059636600461313f565b611b02565b6102d46105a93660046130da565b611b5b565b610456611cef565b61028b611d03565b6102d46105cc3660046132e4565b611d15565b60006001600160a01b0383166106025760405162461bcd60e51b81526004016105f99061398a565b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b600061066a60008051602061484f83398151915233611358565b905060006106866000805160206148b983398151915233611358565b905060006106a260008051602061482f83398151915233611358565b905060006106be6000805160206148d983398151915233611358565b905083806106c95750825b806106d15750815b806106d95750805b6106f55760405162461bcd60e51b81526004016105f990614416565b6106fe86611db6565b61071a5760405162461bcd60e51b81526004016105f990613fd7565b336001600160a01b03881614156107435760405162461bcd60e51b81526004016105f990613edf565b61076c33888888604051806040016040528060048152602001630307830360e41b815250611b5b565b50505050505050565b60678054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50505050509050919050565b610818600033611358565b6108345760405162461bcd60e51b81526004016105f990613c1a565b61083d82611db6565b6108595760405162461bcd60e51b81526004016105f990613a87565b60c95460ff161561087c5760405162461bcd60e51b81526004016105f990613f35565b61089783838360405180602001604052806000815250611dd8565b505050565b60008051602061486f83398151915281565b60008051602061482f83398151915281565b60009081526097602052604090206002015490565b60006108ef60008051602061484f83398151915233611358565b9050600061090b6000805160206148b983398151915233611358565b9050600061092760008051602061482f83398151915233611358565b905060006109436000805160206148d983398151915233611358565b9050838061094e5750825b806109565750815b8061095e5750805b61097a5760405162461bcd60e51b81526004016105f990614416565b61098386611db6565b61099f5760405162461bcd60e51b81526004016105f990613a0c565b6109a933876105d1565b8511156109c85760405162461bcd60e51b81526004016105f990613d06565b6109d3338787611ec3565b600086815260cd602090815260408083203384529091529020546109f79086611fd9565b600087815260cd602090815260408083203380855292529182902092909255517f8f1b5ebb586d3d169e4ed07db9cd10ce0dd30c7b656171310eae7517c0b53cf990610a46908990899061464f565b60405180910390a2505050505050565b8151835114610a775760405162461bcd60e51b81526004016105f99061438d565b6001600160a01b038416610a9d5760405162461bcd60e51b81526004016105f990613db7565b610aa5611ffe565b6001600160a01b0316856001600160a01b03161480610acb5750610acb85610583611ffe565b610ae75760405162461bcd60e51b81526004016105f990613dfc565b6000610af1611ffe565b9050610b01818787878787612002565b60005b8451811015610c07576000858281518110610b1b57fe5b602002602001015190506000858381518110610b3357fe5b60200260200101519050610ba0816040518060600160405280602a815260200161488f602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020546120ff9092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a1681522054610bd79082611fd9565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610b04565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c57929190613741565b60405180910390a4610c6d81878787878761212b565b505050505050565b600082815260976020526040902060020154610c9390610471611ffe565b610caf5760405162461bcd60e51b81526004016105f9906138f2565b610cb98282612239565b5050565b610cc8600033611358565b610ce45760405162461bcd60e51b81526004016105f990613c1a565b610ced816122a2565b610d095760405162461bcd60e51b81526004016105f990613f87565b8060ff1660011415610d3257610d2d6000805160206148b983398151915283610c75565b610d6e565b8060ff1660021415610d5657610d2d60008051602061482f83398151915283610c75565b610d6e6000805160206148d983398151915283610c75565b610d8660008051602061486f83398151915283610c75565b6040516001600160a01b038316907fa8377deee15954185683d55effd369508b4935978c8cb2bab790bf04c570181490600090a25050565b600061062760008051602061484f83398151915283611358565b610de0611ffe565b6001600160a01b0316816001600160a01b031614610e105760405162461bcd60e51b81526004016105f9906144b7565b610cb982826122c7565b6000610e346000805160206148b983398151915233611358565b90506000610e5060008051602061482f83398151915233611358565b90506000610e6c6000805160206148d983398151915233611358565b90508280610e775750815b80610e7f5750805b610e9b5760405162461bcd60e51b81526004016105f990613941565b60c95460ff1615610ecd57610eb1600033611358565b610ecd5760405162461bcd60e51b81526004016105f99061401d565b610ee560008051602061484f83398151915285610c75565b6040516001600160a01b038516907f69a0adee259d26fe61f4776f7bea7f3a9737c7321256821b985f988545efd31990600090a250505050565b60608151835114610f425760405162461bcd60e51b81526004016105f9906142f4565b6060835167ffffffffffffffff81118015610f5c57600080fd5b50604051908082528060200260200182016040528015610f86578160200160208202803683370190505b50905060005b8451811015610fe457610fc5858281518110610fa457fe5b6020026020010151858381518110610fb857fe5b60200260200101516105d1565b828281518110610fd157fe5b6020908102919091010152600101610f8c565b509392505050565b60006110066000805160206148b983398151915233611358565b9050600061102260008051602061482f83398151915233611358565b9050600061103e6000805160206148d983398151915233611358565b905082806110495750815b806110515750805b61106d5760405162461bcd60e51b81526004016105f990613941565b60c95460ff161561109f57611083600033611358565b61109f5760405162461bcd60e51b81526004016105f990613b64565b6110b760008051602061484f83398151915285611949565b6040516001600160a01b038516907f03a38088da75ee2d80f6c753f55f8fd17602ae17d8bd0ef44d5e1f28ab5af11f90600090a250505050565b60006110fd60cb612330565b90505b90565b60008061111e6000805160206148b983398151915284611358565b9050600061113a60008051602061482f83398151915285611358565b905060006111566000805160206148d983398151915286611358565b905082806111615750815b806111695750805b1561117a576001935050505061064b565b506000949350505050565b606061119082611db6565b6111ac5760405162461bcd60e51b81526004016105f990613bd0565b600082815260cc6020526040902060018082015460ff16141561120457505060408051808201909152601c81527f52656e657761626c6520456e6572677920436572746966696361746500000000602082015261064b565b600181015460ff166002141561124f57505060408051808201909152601781527f436172626f6e20456d697373696f6e73204f6666736574000000000000000000602082015261064b565b50506040805180820190915260118152704175646974656420456d697373696f6e7360781b6020820152919050565b6000805160206148d983398151915281565b60008051602061484f83398151915281565b60008060006112b185856105d1565b60405163a0d975a760e01b8152909150600090309063a0d975a7906112dc9089908990600401613715565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c919061352a565b9196919550909350505050565b60008281526097602052604081206113519083612334565b9392505050565b60008281526097602052604081206113519083612340565b600090815260cc602052604090206001015461010090046001600160a01b031690565b600061139e82611db6565b6113ba5760405162461bcd60e51b81526004016105f990614130565b50600090815260cd602090815260408083206001600160a01b03949094168352929052205490565b600081565b816001600160a01b03166113f9611ffe565b6001600160a01b031614156114205760405162461bcd60e51b81526004016105f9906142ab565b806066600061142d611ffe565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611471611ffe565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114a9919061376f565b60405180910390a35050565b6114c0600033611358565b6114dc5760405162461bcd60e51b81526004016105f990613c1a565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b611506612de0565b600082815260cc60209081526040918290208251610160810184528154815260018083015460ff811683860152610100908190046001600160a01b0390811684880152600280860154909116606085015260038501546080850152600485015460a0850152600585015460c0850152600685015460e08501526007850180548851948116158402600019011691909104601f81018790048702840187019097528683529295939490860193919291908301828280156116065780601f106115db57610100808354040283529160200191611606565b820191906000526020600020905b8154815290600101906020018083116115e957829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561169a5780601f1061166f5761010080835404028352916020019161169a565b820191906000526020600020905b81548152906001019060200180831161167d57829003601f168201915b505050918352505060098201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050815250509050919050565b600054610100900460ff16806117575750611757612355565b80611765575060005460ff16155b6117815760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156117ac576000805460ff1961ff0019909116610100171660011790555b6117c460405180602001604052806000815250612366565b6117ea60008051602061484f83398151915260008051602061486f833981519152612402565b6117f5600083610caf565b61180d60008051602061486f83398151915283610caf565b6118256000805160206148b983398151915283610caf565b61183d60008051602061482f83398151915283610caf565b6118556000805160206148d983398151915283610caf565b60c9805460ca80546001600160a01b0319169055610100600160a81b0319166101006001600160a01b038516021760ff191690558015610cb9576000805461ff00191690555050565b600081815260976020526040812061062790612454565b600080808080806118c68188611358565b905060006118e26000805160206148b983398151915289611358565b905060006118fe60008051602061482f8339815191528a611358565b9050600061191a6000805160206148d98339815191528b611358565b9050600061193660008051602061484f8339815191528c611358565b949b939a50919850965091945092505050565b60008281526097602052604090206002015461196790610471611ffe565b610e105760405162461bcd60e51b81526004016105f990613cb6565b60c95460ff1681565b611997600033611358565b6119b35760405162461bcd60e51b81526004016105f990613c1a565b60c9805460ff1916911515919091179055565b6119d1600033611358565b6119ed5760405162461bcd60e51b81526004016105f990613c1a565b6119f6816122a2565b611a125760405162461bcd60e51b81526004016105f990613ac9565b8060ff1660011415611a3b57611a366000805160206148b983398151915283611949565b611a77565b8060ff1660021415611a5f57611a3660008051602061482f83398151915283611949565b611a776000805160206148d983398151915283611949565b611a8082611103565b611a9c57611a9c60008051602061486f83398151915283611949565b6040516001600160a01b038316907f98552ded770f1d05a505572f3387c108dbc6b566ea3d49f83cff3d1f1c72a04290600090a25050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b60ca546001600160a01b0316331480611b215750611b21600033611358565b611b3d5760405162461bcd60e51b81526004016105f990613813565b611b4f8a8a8a8a8a8a8a8a8a8a61245f565b50505050505050505050565b6001600160a01b038416611b815760405162461bcd60e51b81526004016105f990613db7565b611b89611ffe565b6001600160a01b0316856001600160a01b03161480611baf5750611baf85610583611ffe565b611bcb5760405162461bcd60e51b81526004016105f990613b1b565b6000611bd5611ffe565b9050611bf5818787611be68861292b565b611bef8861292b565b87612002565b611c3c836040518060600160405280602a815260200161488f602a913960008781526065602090815260408083206001600160a01b038d16845290915290205491906120ff565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054611c739084611fd9565b60008581526065602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188811691908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611cd9908990899061464f565b60405180910390a4610c6d81878787878761296f565b60c95461010090046001600160a01b031681565b6000805160206148b983398151915281565b6000611d2f6000805160206148b983398151915233611358565b90506000611d4b60008051602061482f83398151915233611358565b90506000611d676000805160206148d983398151915233611358565b90508280611d725750815b80611d7a5750805b611d965760405162461bcd60e51b81526004016105f990613941565b611da88c338d8d8d8d8d8d8d8d61245f565b505050505050505050505050565b600081611dc360cb612330565b10611dd05750600161064b565b506000919050565b6001600160a01b038416611dfe5760405162461bcd60e51b81526004016105f9906143d5565b6000611e08611ffe565b9050611e1a81600087611be68861292b565b60008481526065602090815260408083206001600160a01b0389168452909152902054611e479084611fd9565b60008581526065602090815260408083206001600160a01b03808b16808652919093528184209490945551908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611ea5908990899061464f565b60405180910390a4611ebc8160008787878761296f565b5050505050565b6001600160a01b038316611ee95760405162461bcd60e51b81526004016105f990613e9c565b6000611ef3611ffe565b9050611f2381856000611f058761292b565b611f0e8761292b565b60405180602001604052806000815250612002565b611f6a8260405180606001604052806024815260200161480b6024913960008681526065602090815260408083206001600160a01b038b16845290915290205491906120ff565b60008481526065602090815260408083206001600160a01b03808a16808652919093528184209490945551919291908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611fcb908890889061464f565b60405180910390a450505050565b6000828201838110156113515760405162461bcd60e51b81526004016105f990613a50565b3390565b612010868686868686610c6d565b60005b835181101561076c57600060cc600086848151811061202e57fe5b60200260200101518152602001908152602001600020905060c960009054906101000a900460ff16156120f5576001600160a01b03861661206f57506120f7565b600181015460ff166003146120c15760ca546001600160a01b03898116911614806120a057506120a0600089611358565b6120bc5760405162461bcd60e51b81526004016105f990614506565b6120f5565b6120d96000805160206148d983398151915289611358565b6120f55760405162461bcd60e51b81526004016105f990614183565b505b600101612013565b600081848411156121235760405162461bcd60e51b81526004016105f991906137ac565b505050900390565b61213d846001600160a01b0316612a40565b15610c6d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121769089908990889088908890600401613672565b602060405180830381600087803b15801561219057600080fd5b505af19250505080156121c0575060408051601f3d908101601f191682019092526121bd9181019061350e565b60015b612209576121cc61473a565b806121d757506121f1565b8060405162461bcd60e51b81526004016105f991906137ac565b60405162461bcd60e51b81526004016105f9906137bf565b6001600160e01b0319811663bc197c8160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b60008281526097602052604090206122519082612a46565b15610cb95761225e611ffe565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000808260ff161180156122ba575060038260ff1611155b15611dd05750600161064b565b60008281526097602052604090206122df9082612a5b565b15610cb9576122ec611ffe565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b5490565b60006113518383612a70565b6000611351836001600160a01b038416612ab5565b600061236030612a40565b15905090565b600054610100900460ff168061237f575061237f612355565b8061238d575060005460ff16155b6123a95760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156123d4576000805460ff1961ff0019909116610100171660011790555b6123dc612acd565b6123e4612b50565b6123ed82612bce565b8015610cb9576000805461ff00191690555050565b600082815260976020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526097602052604090912060020155565b600061062782612330565b612468886122a2565b6124845760405162461bcd60e51b81526004016105f990614473565b60c95460ff1615612596578760ff16600114806124a457508760ff166002145b156125515760ca546001600160a01b031633146124d35760405162461bcd60e51b81526004016105f9906140e2565b6124de60008b611358565b6124fa5760405162461bcd60e51b81526004016105f990614264565b6125126000805160206148b98339815191528a611358565b80612530575061253060008051602061482f8339815191528a611358565b61254c5760405162461bcd60e51b81526004016105f990613d5a565b612591565b8760ff1660031415612591576125756000805160206148d98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990614206565b612656565b8760ff16600114156125d6576125ba6000805160206148b98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f99061433d565b8760ff1660021415612616576125fa60008051602061482f8339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990613c63565b8760ff16600314156126565761263a6000805160206148d98339815191528a611358565b6126565760405162461bcd60e51b81526004016105f990614085565b61266060cb612c65565b600060cc600061267060cb612330565b8152602001908152602001600020905061268a60cb612330565b8160000181905550888160010160006101000a81548160ff021916908360ff1602179055508a8160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160010160016101000a8154816001600160a01b0302191690836001600160a01b031602179055508681600301819055508581600401819055508481600601819055504281600501819055508381600701908051906020019061273d929190612e4f565b5082516127539060088301906020860190612e4f565b5081516127699060098301906020850190612e4f565b5061278e8b61277860cb612330565b8a60405180602001604052806000815250611dd8565b8860ff166003141561281257600281015481546127b5916001600160a01b0316908a611ec3565b8054600090815260cd6020908152604080832060028501546001600160a01b031684529091529020546127e89089611fd9565b8154600090815260cd6020908152604080832060028601546001600160a01b031684529091529020555b8060020160009054906101000a90046001600160a01b03166001600160a01b03168160010160019054906101000a90046001600160a01b03166001600160a01b03167f99cc3eeb446560c9a2d2483bc5160735ec0fb1851aea3bde32e7a56c30c11da68a60cd60008660000154815260200190815260200160002060008660020160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000205485600001548660010160009054906101000a900460ff168760030154886004015489600601548a600501548b6007018c6008018d6009016040516129169b9a9998979695949392919061465d565b60405180910390a35050505050505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061295e57fe5b602090810291909101015292915050565b612981846001600160a01b0316612a40565b15610c6d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906129ba90899089908890889088906004016136d0565b602060405180830381600087803b1580156129d457600080fd5b505af1925050508015612a04575060408051601f3d908101601f19168201909252612a019181019061350e565b60015b612a10576121cc61473a565b6001600160e01b0319811663f23a6e6160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b3b151590565b6000611351836001600160a01b038416612c6e565b6000611351836001600160a01b038416612cb8565b81546000908210612a935760405162461bcd60e51b81526004016105f990613868565b826000018281548110612aa257fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b600054610100900460ff1680612ae65750612ae6612355565b80612af4575060005460ff16155b612b105760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612b3b576000805460ff1961ff0019909116610100171660011790555b8015612b4d576000805461ff00191690555b50565b600054610100900460ff1680612b695750612b69612355565b80612b77575060005460ff16155b612b935760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612bbe576000805460ff1961ff0019909116610100171660011790555b612b3b6301ffc9a760e01b612d7e565b600054610100900460ff1680612be75750612be7612355565b80612bf5575060005460ff16155b612c115760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612c3c576000805460ff1961ff0019909116610100171660011790555b612c4582612dcd565b612c55636cdb3d1360e11b612d7e565b6123ed6303a24d0760e21b612d7e565b80546001019055565b6000612c7a8383612ab5565b612cb057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610627565b506000610627565b60008181526001830160205260408120548015612d745783546000198083019190810190600090879083908110612ceb57fe5b9060005260206000200154905080876000018481548110612d0857fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612d3857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610627565b6000915050610627565b6001600160e01b03198082161415612da85760405162461bcd60e51b81526004016105f9906139d5565b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b8051610cb9906067906020840190612e4f565b60405180610160016040528060008152602001600060ff16815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016060815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e9057805160ff1916838001178555612ebd565b82800160010185558215612ebd579182015b82811115612ebd578251825591602001919060010190612ea2565b50612ec9929150612ecd565b5090565b5b80821115612ec95760008155600101612ece565b80356001600160a01b038116811461062757600080fd5b600082601f830112612f09578081fd5b8135612f1c612f1782614708565b6146e1565b818152915060208083019084810181840286018201871015612f3d57600080fd5b60005b84811015612f5c57813584529282019290820190600101612f40565b505050505092915050565b600082601f830112612f77578081fd5b813567ffffffffffffffff811115612f8d578182fd5b612fa0601f8201601f19166020016146e1565b9150808252836020828501011115612fb757600080fd5b8060208401602084013760009082016020015292915050565b803560ff8116811461062757600080fd5b600060208284031215612ff2578081fd5b6113518383612ee2565b6000806040838503121561300e578081fd5b6130188484612ee2565b91506130278460208501612ee2565b90509250929050565b600080600080600060a08688031215613047578081fd5b8535613052816147df565b94506020860135613062816147df565b9350604086013567ffffffffffffffff8082111561307e578283fd5b61308a89838a01612ef9565b9450606088013591508082111561309f578283fd5b6130ab89838a01612ef9565b935060808801359150808211156130c0578283fd5b506130cd88828901612f67565b9150509295509295909350565b600080600080600060a086880312156130f1578081fd5b6130fb8787612ee2565b945061310a8760208801612ee2565b93506040860135925060608601359150608086013567ffffffffffffffff811115613133578182fd5b6130cd88828901612f67565b6000806000806000806000806000806101408b8d03121561315e578485fd5b6131688c8c612ee2565b99506131778c60208d01612ee2565b98506131868c60408d01612fd0565b975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013567ffffffffffffffff808211156131be578485fd5b6131ca8e838f01612f67565b94506101008d01359150808211156131e0578384fd5b6131ec8e838f01612f67565b93506101208d0135915080821115613202578283fd5b5061320f8d828e01612f67565b9150509295989b9194979a5092959850565b60008060408385031215613233578182fd5b61323d8484612ee2565b915060208301358015158114613251578182fd5b809150509250929050565b6000806040838503121561326e578182fd5b6132788484612ee2565b946020939093013593505050565b60008060006060848603121561329a578081fd5b6132a48585612ee2565b95602085013595506040909401359392505050565b600080604083850312156132cb578182fd5b6132d58484612ee2565b91506130278460208501612fd0565b60008060008060008060008060006101208a8c031215613302578283fd5b61330c8b8b612ee2565b985061331b8b60208c01612fd0565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013567ffffffffffffffff80821115613353578485fd5b61335f8d838e01612f67565b945060e08c0135915080821115613374578384fd5b6133808d838e01612f67565b93506101008c0135915080821115613396578283fd5b506133a38c828d01612f67565b9150509295985092959850929598565b600080604083850312156133c5578182fd5b823567ffffffffffffffff808211156133dc578384fd5b818501915085601f8301126133ef578384fd5b81356133fd612f1782614708565b80828252602080830192508086018a82838702890101111561341d578889fd5b8896505b84871015613447576134338b82612ee2565b845260019690960195928101928101613421565b50909650870135935050508082111561345e578283fd5b5061346b85828601612ef9565b9150509250929050565b600060208284031215613486578081fd5b81358015158114611351578182fd5b6000602082840312156134a6578081fd5b5035919050565b600080604083850312156134bf578182fd5b823591506020830135613251816147df565b600080604083850312156134e3578182fd5b50508035926020909101359150565b600060208284031215613503578081fd5b8135611351816147f4565b60006020828403121561351f578081fd5b8151611351816147f4565b60006020828403121561353b578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561357e57815187529582019590820190600101613562565b509495945050505050565b60008151808452815b818110156135ae57602081850181015186830182015201613592565b818111156135bf5782602083870101525b50601f01601f19169290920160200192915050565b600081546001808216600081146135f257600181146136105761364e565b60028304607f16865260ff198316602087015260408601935061364e565b6002830480875261362086614728565b60005b828110156136445781546020828b0101528482019150602081019050613623565b8801602001955050505b50505092915050565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061369e9083018661354f565b82810360608401526136b0818661354f565b905082810360808401526136c48185613589565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061370a90830184613589565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b600060208252611351602083018461354f565b600060408252613754604083018561354f565b8281036020840152613766818561354f565b95945050505050565b901515815260200190565b941515855292151560208501529015156040840152151560608301521515608082015260a00190565b90815260200190565b6000602082526113516020830184613589565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b60208082526035908201527f434c4d383a3a69737375654f6e426568616c663a2063616c6c206d757374206360408201527437b6b290333937b6902220a79037b91030b236b4b760591b606082015260800190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526e0818591b5a5b881d1bc819dc985b9d608a1b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c794465616c65723a206d73672e73656e646572206e6f746040820152681030903232b0b632b960b91b606082015260800190565b6020808252602b908201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60408201526a65726f206164647265737360a81b606082015260800190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b60208082526024908201527f434c4d383a3a7265746972653a20746f6b656e496420646f6573206e6f7420656040820152631e1a5cdd60e21b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526022908201527f434c4d383a3a6d696e743a20746f6b656e496420646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b60208082526032908201527f434c4d383a3a756e72656769737465724465616c65723a20746f6b656e54797060408201527119525908191bd95cc81b9bdd08195e1a5cdd60721b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526046908201527f434c4d383a3a756e7265676973746572436f6e73756d6572286c696d6974656460408201527f293a206f6e6c792061646d696e2063616e20756e726567697374657220636f6e60608201526573756d65727360d01b608082015260a00190565b6020808252602a908201527f434c4d383a3a676574546f6b656e547970653a20746f6b656e496420646f6573604082015269081b9bdd08195e1a5cdd60b21b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c7941646d696e3a206d73672e73656e646572206e6f74206040820152683a34329030b236b4b760b91b606082015260800190565b60208082526033908201527f434c4d383a3a5f69737375653a20697373756572206e6f7420612072656769736040820152723a32b932b21037b33339b2ba103232b0b632b960691b606082015260800190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526f2061646d696e20746f207265766f6b6560801b606082015260800190565b60208082526034908201527f434c4d383a3a7265746972653a206e6f7420656e6f75676820617661696c61626040820152736c652062616c616e636520746f2072657469726560601b606082015260800190565b60208082526037908201527f434c4d383a3a5f6973737565286c696d69746564293a2070726f706f7365722060408201527f6e6f7420612072656769737465726564206465616c6572000000000000000000606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526036908201527f434c4d383a3a7472616e736665723a2073656e64657220616e642072656365696040820152757665722063616e6e6f74206265207468652073616d6560501b606082015260800190565b60208082526032908201527f434c4d383a3a6d696e743a2063616e6e6f74206d696e74206e657720746f6b656040820152716e7320696e206c696d69746564206d6f646560701b606082015260800190565b60208082526030908201527f434c4d383a3a72656769737465724465616c65723a20746f6b656e547970654960408201526f1908191bd95cc81b9bdd08195e1a5cdd60821b606082015260800190565b60208082526026908201527f434c4d383a3a7472616e736665723a20746f6b656e496420646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b60208082526042908201527f434c4d383a3a7265676973746572436f6e73756d6572286c696d69746564293a60408201527f206f6e6c792061646d696e2063616e20726567697374657220636f6e73756d65606082015261727360f01b608082015260a00190565b60208082526037908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201527f746572656420656d697373696f6e732061756469746f72000000000000000000606082015260800190565b6020808252602e908201527f434c4d383a3a5f6973737565286c696d69746564293a206d73672e73656e646560408201526d72206e6f742074696d656c6f636b60901b606082015260800190565b60208082526033908201527f434c4d383a3a676574546f6b656e52657469726564416d6f756e743a20746f6b604082015272195b925908191bd95cc81b9bdd08195e1a5cdd606a1b606082015260800190565b60208082526058908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c7920656d697373696f6e732061756469746f72732063616e60608201527f206973737565206175646974656420656d697373696f6e730000000000000000608082015260a00190565b602080825260409082018190527f434c4d383a3a5f6973737565286c696d69746564293a20697373756572206e6f908201527f742061207265676973746572656420656d697373696f6e732061756469746f72606082015260800190565b60208082526027908201527f434c4d383a3a5f6973737565286c696d69746564293a20697373756565206e6f6040820152663a1030b236b4b760c91b606082015260800190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526030908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201526f3a32b932b2102922a1903232b0b632b960811b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252603d908201527f434c4d383a3a636f6e73756d65724f724465616c65723a206d73672e73656e6460408201527f6572206e6f74206120636f6e73756d6572206f722061206465616c6572000000606082015260800190565b60208082526024908201527f434c4d383a3a5f69737375653a20746f6b656e54797065496420697320696e76604082015263185b1a5960e21b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b6020808252604b908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c792061646d696e20616e642044414f2063616e207472616e60608201526a7366657220746f6b656e7360a81b608082015260a00190565b6000602082528251602083015260208301516145966040840182613657565b5060408301516145a96060840182613542565b5060608301516145bc6080840182613542565b50608083015160a083015260a083015160c083015260c083015160e083015260e08301516101008181850152808501519150506101606101208181860152614608610180860184613589565b9250808601519050601f196101408187860301818801526146298584613589565b9088015187820390920184880152935090506146458382613589565b9695505050505050565b918252602082015260400190565b60006101608d83528c60208401528b604084015260ff8b1660608401528960808401528860a08401528760c08401528660e0840152806101008401526146a5818401876135d4565b90508281036101208401526146ba81866135d4565b90508281036101408401526146cf81856135d4565b9e9d5050505050505050505050505050565b60405181810167ffffffffffffffff8111828210171561470057600080fd5b604052919050565b600067ffffffffffffffff82111561471e578081fd5b5060209081020190565b60009081526020902090565b60e01c90565b600060443d101561474a57611100565b600481823e6308c379a061475e8251614734565b1461476857611100565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156147985750505050611100565b828401925082519150808211156147b25750505050611100565b503d830160208284010111156147ca57505050611100565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114612b4d57600080fd5b6001600160e01b031981168114612b4d57600080fdfe455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76af8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e736665722ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12ca2646970667358221220055a69771b7a92b6338a8700f94a7ad5684ecca1ae185c3b59807314c8f1f23c64736f6c63430007000033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102735760003560e01c80637f157c9b11610151578063ce6ccfaf116100c3578063e985e9c511610087578063e985e9c514610575578063f000be9814610588578063f242432a1461059b578063f851a440146105ae578063fcba7948146105b6578063fd0c4a9a146105be57610273565b8063ce6ccfaf14610510578063d547741f14610534578063dba851b014610547578063ddc3e6eb1461054f578063e2e564f21461056257610273565b8063a217fddf11610115578063a217fddf1461049c578063a22cb465146104a4578063bdacb303146104b7578063c1e03728146104ca578063c4d66de8146104ea578063ca15c873146104fd57610273565b80637f157c9b146104225780639010d07c1461044357806391d148541461046357806392089c4614610476578063a0d975a71461048957610273565b806331aa4b20116101ea57806353dbe982116101ae57806353dbe982146103d15780635ddb368f146103e457806369f7ef44146103ec57806376aed2e1146103ff57806376ce47551461041257806378e5c5921461041a57610273565b806331aa4b201461036557806333781a0e1461037857806336568abe1461038b57806344b22fdd1461039e5780634e1273f4146103b157610273565b806318a50d7e1161023c57806318a50d7e146103095780631ef68ef714610311578063248a9ca314610319578063293a7f2e1461032c5780632eb2c2d61461033f5780632f2ff15d1461035257610273565b8062fdd58e1461027857806301ffc9a7146102a1578063095bcdb6146102c15780630e89341c146102d6578063156e29f6146102f6575b600080fd5b61028b61028636600461325c565b6105d1565b60405161029891906137a3565b60405180910390f35b6102b46102af3660046134f2565b61062d565b604051610298919061376f565b6102d46102cf366004613286565b610650565b005b6102e96102e4366004613495565b610775565b60405161029891906137ac565b6102d4610304366004613286565b61080d565b61028b61089c565b61028b6108ae565b61028b610327366004613495565b6108c0565b6102d461033a3660046134d1565b6108d5565b6102d461034d366004613030565b610a56565b6102d46103603660046134ad565b610c75565b6102d46103733660046132b9565b610cbd565b6102b4610386366004612fe1565b610dbe565b6102d46103993660046134ad565b610dd8565b6102d46103ac366004612fe1565b610e1a565b6103c46103bf3660046133b3565b610f1f565b604051610298919061372e565b6102d46103df366004612fe1565b610fec565b61028b6110f1565b6102b46103fa366004612fe1565b611103565b6102e961040d366004613495565b611185565b61028b61127e565b61028b611290565b61043561043036600461325c565b6112a2565b60405161029892919061464f565b6104566104513660046134d1565b611339565b604051610298919061365e565b6102b46104713660046134ad565b611358565b610456610484366004613495565b611370565b61028b61049736600461325c565b611393565b61028b6113e2565b6102d46104b2366004613221565b6113e7565b6102d46104c5366004612fe1565b6114b5565b6104dd6104d8366004613495565b6114fe565b6040516102989190614577565b6102d46104f8366004612fe1565b61173e565b61028b61050b366004613495565b61189e565b61052361051e366004612fe1565b6118b5565b60405161029895949392919061377a565b6102d46105423660046134ad565b611949565b6102b4611983565b6102d461055d366004613475565b61198c565b6102d46105703660046132b9565b6119c6565b6102b4610583366004612ffc565b611ad4565b6102d461059636600461313f565b611b02565b6102d46105a93660046130da565b611b5b565b610456611cef565b61028b611d03565b6102d46105cc3660046132e4565b611d15565b60006001600160a01b0383166106025760405162461bcd60e51b81526004016105f99061398a565b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b600061066a60008051602061484f83398151915233611358565b905060006106866000805160206148b983398151915233611358565b905060006106a260008051602061482f83398151915233611358565b905060006106be6000805160206148d983398151915233611358565b905083806106c95750825b806106d15750815b806106d95750805b6106f55760405162461bcd60e51b81526004016105f990614416565b6106fe86611db6565b61071a5760405162461bcd60e51b81526004016105f990613fd7565b336001600160a01b03881614156107435760405162461bcd60e51b81526004016105f990613edf565b61076c33888888604051806040016040528060048152602001630307830360e41b815250611b5b565b50505050505050565b60678054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50505050509050919050565b610818600033611358565b6108345760405162461bcd60e51b81526004016105f990613c1a565b61083d82611db6565b6108595760405162461bcd60e51b81526004016105f990613a87565b60c95460ff161561087c5760405162461bcd60e51b81526004016105f990613f35565b61089783838360405180602001604052806000815250611dd8565b505050565b60008051602061486f83398151915281565b60008051602061482f83398151915281565b60009081526097602052604090206002015490565b60006108ef60008051602061484f83398151915233611358565b9050600061090b6000805160206148b983398151915233611358565b9050600061092760008051602061482f83398151915233611358565b905060006109436000805160206148d983398151915233611358565b9050838061094e5750825b806109565750815b8061095e5750805b61097a5760405162461bcd60e51b81526004016105f990614416565b61098386611db6565b61099f5760405162461bcd60e51b81526004016105f990613a0c565b6109a933876105d1565b8511156109c85760405162461bcd60e51b81526004016105f990613d06565b6109d3338787611ec3565b600086815260cd602090815260408083203384529091529020546109f79086611fd9565b600087815260cd602090815260408083203380855292529182902092909255517f8f1b5ebb586d3d169e4ed07db9cd10ce0dd30c7b656171310eae7517c0b53cf990610a46908990899061464f565b60405180910390a2505050505050565b8151835114610a775760405162461bcd60e51b81526004016105f99061438d565b6001600160a01b038416610a9d5760405162461bcd60e51b81526004016105f990613db7565b610aa5611ffe565b6001600160a01b0316856001600160a01b03161480610acb5750610acb85610583611ffe565b610ae75760405162461bcd60e51b81526004016105f990613dfc565b6000610af1611ffe565b9050610b01818787878787612002565b60005b8451811015610c07576000858281518110610b1b57fe5b602002602001015190506000858381518110610b3357fe5b60200260200101519050610ba0816040518060600160405280602a815260200161488f602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020546120ff9092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a1681522054610bd79082611fd9565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610b04565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c57929190613741565b60405180910390a4610c6d81878787878761212b565b505050505050565b600082815260976020526040902060020154610c9390610471611ffe565b610caf5760405162461bcd60e51b81526004016105f9906138f2565b610cb98282612239565b5050565b610cc8600033611358565b610ce45760405162461bcd60e51b81526004016105f990613c1a565b610ced816122a2565b610d095760405162461bcd60e51b81526004016105f990613f87565b8060ff1660011415610d3257610d2d6000805160206148b983398151915283610c75565b610d6e565b8060ff1660021415610d5657610d2d60008051602061482f83398151915283610c75565b610d6e6000805160206148d983398151915283610c75565b610d8660008051602061486f83398151915283610c75565b6040516001600160a01b038316907fa8377deee15954185683d55effd369508b4935978c8cb2bab790bf04c570181490600090a25050565b600061062760008051602061484f83398151915283611358565b610de0611ffe565b6001600160a01b0316816001600160a01b031614610e105760405162461bcd60e51b81526004016105f9906144b7565b610cb982826122c7565b6000610e346000805160206148b983398151915233611358565b90506000610e5060008051602061482f83398151915233611358565b90506000610e6c6000805160206148d983398151915233611358565b90508280610e775750815b80610e7f5750805b610e9b5760405162461bcd60e51b81526004016105f990613941565b60c95460ff1615610ecd57610eb1600033611358565b610ecd5760405162461bcd60e51b81526004016105f99061401d565b610ee560008051602061484f83398151915285610c75565b6040516001600160a01b038516907f69a0adee259d26fe61f4776f7bea7f3a9737c7321256821b985f988545efd31990600090a250505050565b60608151835114610f425760405162461bcd60e51b81526004016105f9906142f4565b6060835167ffffffffffffffff81118015610f5c57600080fd5b50604051908082528060200260200182016040528015610f86578160200160208202803683370190505b50905060005b8451811015610fe457610fc5858281518110610fa457fe5b6020026020010151858381518110610fb857fe5b60200260200101516105d1565b828281518110610fd157fe5b6020908102919091010152600101610f8c565b509392505050565b60006110066000805160206148b983398151915233611358565b9050600061102260008051602061482f83398151915233611358565b9050600061103e6000805160206148d983398151915233611358565b905082806110495750815b806110515750805b61106d5760405162461bcd60e51b81526004016105f990613941565b60c95460ff161561109f57611083600033611358565b61109f5760405162461bcd60e51b81526004016105f990613b64565b6110b760008051602061484f83398151915285611949565b6040516001600160a01b038516907f03a38088da75ee2d80f6c753f55f8fd17602ae17d8bd0ef44d5e1f28ab5af11f90600090a250505050565b60006110fd60cb612330565b90505b90565b60008061111e6000805160206148b983398151915284611358565b9050600061113a60008051602061482f83398151915285611358565b905060006111566000805160206148d983398151915286611358565b905082806111615750815b806111695750805b1561117a576001935050505061064b565b506000949350505050565b606061119082611db6565b6111ac5760405162461bcd60e51b81526004016105f990613bd0565b600082815260cc6020526040902060018082015460ff16141561120457505060408051808201909152601c81527f52656e657761626c6520456e6572677920436572746966696361746500000000602082015261064b565b600181015460ff166002141561124f57505060408051808201909152601781527f436172626f6e20456d697373696f6e73204f6666736574000000000000000000602082015261064b565b50506040805180820190915260118152704175646974656420456d697373696f6e7360781b6020820152919050565b6000805160206148d983398151915281565b60008051602061484f83398151915281565b60008060006112b185856105d1565b60405163a0d975a760e01b8152909150600090309063a0d975a7906112dc9089908990600401613715565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c919061352a565b9196919550909350505050565b60008281526097602052604081206113519083612334565b9392505050565b60008281526097602052604081206113519083612340565b600090815260cc602052604090206001015461010090046001600160a01b031690565b600061139e82611db6565b6113ba5760405162461bcd60e51b81526004016105f990614130565b50600090815260cd602090815260408083206001600160a01b03949094168352929052205490565b600081565b816001600160a01b03166113f9611ffe565b6001600160a01b031614156114205760405162461bcd60e51b81526004016105f9906142ab565b806066600061142d611ffe565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611471611ffe565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114a9919061376f565b60405180910390a35050565b6114c0600033611358565b6114dc5760405162461bcd60e51b81526004016105f990613c1a565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b611506612de0565b600082815260cc60209081526040918290208251610160810184528154815260018083015460ff811683860152610100908190046001600160a01b0390811684880152600280860154909116606085015260038501546080850152600485015460a0850152600585015460c0850152600685015460e08501526007850180548851948116158402600019011691909104601f81018790048702840187019097528683529295939490860193919291908301828280156116065780601f106115db57610100808354040283529160200191611606565b820191906000526020600020905b8154815290600101906020018083116115e957829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561169a5780601f1061166f5761010080835404028352916020019161169a565b820191906000526020600020905b81548152906001019060200180831161167d57829003601f168201915b505050918352505060098201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050815250509050919050565b600054610100900460ff16806117575750611757612355565b80611765575060005460ff16155b6117815760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156117ac576000805460ff1961ff0019909116610100171660011790555b6117c460405180602001604052806000815250612366565b6117ea60008051602061484f83398151915260008051602061486f833981519152612402565b6117f5600083610caf565b61180d60008051602061486f83398151915283610caf565b6118256000805160206148b983398151915283610caf565b61183d60008051602061482f83398151915283610caf565b6118556000805160206148d983398151915283610caf565b60c9805460ca80546001600160a01b0319169055610100600160a81b0319166101006001600160a01b038516021760ff191690558015610cb9576000805461ff00191690555050565b600081815260976020526040812061062790612454565b600080808080806118c68188611358565b905060006118e26000805160206148b983398151915289611358565b905060006118fe60008051602061482f8339815191528a611358565b9050600061191a6000805160206148d98339815191528b611358565b9050600061193660008051602061484f8339815191528c611358565b949b939a50919850965091945092505050565b60008281526097602052604090206002015461196790610471611ffe565b610e105760405162461bcd60e51b81526004016105f990613cb6565b60c95460ff1681565b611997600033611358565b6119b35760405162461bcd60e51b81526004016105f990613c1a565b60c9805460ff1916911515919091179055565b6119d1600033611358565b6119ed5760405162461bcd60e51b81526004016105f990613c1a565b6119f6816122a2565b611a125760405162461bcd60e51b81526004016105f990613ac9565b8060ff1660011415611a3b57611a366000805160206148b983398151915283611949565b611a77565b8060ff1660021415611a5f57611a3660008051602061482f83398151915283611949565b611a776000805160206148d983398151915283611949565b611a8082611103565b611a9c57611a9c60008051602061486f83398151915283611949565b6040516001600160a01b038316907f98552ded770f1d05a505572f3387c108dbc6b566ea3d49f83cff3d1f1c72a04290600090a25050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b60ca546001600160a01b0316331480611b215750611b21600033611358565b611b3d5760405162461bcd60e51b81526004016105f990613813565b611b4f8a8a8a8a8a8a8a8a8a8a61245f565b50505050505050505050565b6001600160a01b038416611b815760405162461bcd60e51b81526004016105f990613db7565b611b89611ffe565b6001600160a01b0316856001600160a01b03161480611baf5750611baf85610583611ffe565b611bcb5760405162461bcd60e51b81526004016105f990613b1b565b6000611bd5611ffe565b9050611bf5818787611be68861292b565b611bef8861292b565b87612002565b611c3c836040518060600160405280602a815260200161488f602a913960008781526065602090815260408083206001600160a01b038d16845290915290205491906120ff565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054611c739084611fd9565b60008581526065602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188811691908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611cd9908990899061464f565b60405180910390a4610c6d81878787878761296f565b60c95461010090046001600160a01b031681565b6000805160206148b983398151915281565b6000611d2f6000805160206148b983398151915233611358565b90506000611d4b60008051602061482f83398151915233611358565b90506000611d676000805160206148d983398151915233611358565b90508280611d725750815b80611d7a5750805b611d965760405162461bcd60e51b81526004016105f990613941565b611da88c338d8d8d8d8d8d8d8d61245f565b505050505050505050505050565b600081611dc360cb612330565b10611dd05750600161064b565b506000919050565b6001600160a01b038416611dfe5760405162461bcd60e51b81526004016105f9906143d5565b6000611e08611ffe565b9050611e1a81600087611be68861292b565b60008481526065602090815260408083206001600160a01b0389168452909152902054611e479084611fd9565b60008581526065602090815260408083206001600160a01b03808b16808652919093528184209490945551908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611ea5908990899061464f565b60405180910390a4611ebc8160008787878761296f565b5050505050565b6001600160a01b038316611ee95760405162461bcd60e51b81526004016105f990613e9c565b6000611ef3611ffe565b9050611f2381856000611f058761292b565b611f0e8761292b565b60405180602001604052806000815250612002565b611f6a8260405180606001604052806024815260200161480b6024913960008681526065602090815260408083206001600160a01b038b16845290915290205491906120ff565b60008481526065602090815260408083206001600160a01b03808a16808652919093528184209490945551919291908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611fcb908890889061464f565b60405180910390a450505050565b6000828201838110156113515760405162461bcd60e51b81526004016105f990613a50565b3390565b612010868686868686610c6d565b60005b835181101561076c57600060cc600086848151811061202e57fe5b60200260200101518152602001908152602001600020905060c960009054906101000a900460ff16156120f5576001600160a01b03861661206f57506120f7565b600181015460ff166003146120c15760ca546001600160a01b03898116911614806120a057506120a0600089611358565b6120bc5760405162461bcd60e51b81526004016105f990614506565b6120f5565b6120d96000805160206148d983398151915289611358565b6120f55760405162461bcd60e51b81526004016105f990614183565b505b600101612013565b600081848411156121235760405162461bcd60e51b81526004016105f991906137ac565b505050900390565b61213d846001600160a01b0316612a40565b15610c6d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121769089908990889088908890600401613672565b602060405180830381600087803b15801561219057600080fd5b505af19250505080156121c0575060408051601f3d908101601f191682019092526121bd9181019061350e565b60015b612209576121cc61473a565b806121d757506121f1565b8060405162461bcd60e51b81526004016105f991906137ac565b60405162461bcd60e51b81526004016105f9906137bf565b6001600160e01b0319811663bc197c8160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b60008281526097602052604090206122519082612a46565b15610cb95761225e611ffe565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000808260ff161180156122ba575060038260ff1611155b15611dd05750600161064b565b60008281526097602052604090206122df9082612a5b565b15610cb9576122ec611ffe565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b5490565b60006113518383612a70565b6000611351836001600160a01b038416612ab5565b600061236030612a40565b15905090565b600054610100900460ff168061237f575061237f612355565b8061238d575060005460ff16155b6123a95760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156123d4576000805460ff1961ff0019909116610100171660011790555b6123dc612acd565b6123e4612b50565b6123ed82612bce565b8015610cb9576000805461ff00191690555050565b600082815260976020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526097602052604090912060020155565b600061062782612330565b612468886122a2565b6124845760405162461bcd60e51b81526004016105f990614473565b60c95460ff1615612596578760ff16600114806124a457508760ff166002145b156125515760ca546001600160a01b031633146124d35760405162461bcd60e51b81526004016105f9906140e2565b6124de60008b611358565b6124fa5760405162461bcd60e51b81526004016105f990614264565b6125126000805160206148b98339815191528a611358565b80612530575061253060008051602061482f8339815191528a611358565b61254c5760405162461bcd60e51b81526004016105f990613d5a565b612591565b8760ff1660031415612591576125756000805160206148d98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990614206565b612656565b8760ff16600114156125d6576125ba6000805160206148b98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f99061433d565b8760ff1660021415612616576125fa60008051602061482f8339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990613c63565b8760ff16600314156126565761263a6000805160206148d98339815191528a611358565b6126565760405162461bcd60e51b81526004016105f990614085565b61266060cb612c65565b600060cc600061267060cb612330565b8152602001908152602001600020905061268a60cb612330565b8160000181905550888160010160006101000a81548160ff021916908360ff1602179055508a8160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160010160016101000a8154816001600160a01b0302191690836001600160a01b031602179055508681600301819055508581600401819055508481600601819055504281600501819055508381600701908051906020019061273d929190612e4f565b5082516127539060088301906020860190612e4f565b5081516127699060098301906020850190612e4f565b5061278e8b61277860cb612330565b8a60405180602001604052806000815250611dd8565b8860ff166003141561281257600281015481546127b5916001600160a01b0316908a611ec3565b8054600090815260cd6020908152604080832060028501546001600160a01b031684529091529020546127e89089611fd9565b8154600090815260cd6020908152604080832060028601546001600160a01b031684529091529020555b8060020160009054906101000a90046001600160a01b03166001600160a01b03168160010160019054906101000a90046001600160a01b03166001600160a01b03167f99cc3eeb446560c9a2d2483bc5160735ec0fb1851aea3bde32e7a56c30c11da68a60cd60008660000154815260200190815260200160002060008660020160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000205485600001548660010160009054906101000a900460ff168760030154886004015489600601548a600501548b6007018c6008018d6009016040516129169b9a9998979695949392919061465d565b60405180910390a35050505050505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061295e57fe5b602090810291909101015292915050565b612981846001600160a01b0316612a40565b15610c6d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906129ba90899089908890889088906004016136d0565b602060405180830381600087803b1580156129d457600080fd5b505af1925050508015612a04575060408051601f3d908101601f19168201909252612a019181019061350e565b60015b612a10576121cc61473a565b6001600160e01b0319811663f23a6e6160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b3b151590565b6000611351836001600160a01b038416612c6e565b6000611351836001600160a01b038416612cb8565b81546000908210612a935760405162461bcd60e51b81526004016105f990613868565b826000018281548110612aa257fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b600054610100900460ff1680612ae65750612ae6612355565b80612af4575060005460ff16155b612b105760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612b3b576000805460ff1961ff0019909116610100171660011790555b8015612b4d576000805461ff00191690555b50565b600054610100900460ff1680612b695750612b69612355565b80612b77575060005460ff16155b612b935760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612bbe576000805460ff1961ff0019909116610100171660011790555b612b3b6301ffc9a760e01b612d7e565b600054610100900460ff1680612be75750612be7612355565b80612bf5575060005460ff16155b612c115760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612c3c576000805460ff1961ff0019909116610100171660011790555b612c4582612dcd565b612c55636cdb3d1360e11b612d7e565b6123ed6303a24d0760e21b612d7e565b80546001019055565b6000612c7a8383612ab5565b612cb057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610627565b506000610627565b60008181526001830160205260408120548015612d745783546000198083019190810190600090879083908110612ceb57fe5b9060005260206000200154905080876000018481548110612d0857fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612d3857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610627565b6000915050610627565b6001600160e01b03198082161415612da85760405162461bcd60e51b81526004016105f9906139d5565b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b8051610cb9906067906020840190612e4f565b60405180610160016040528060008152602001600060ff16815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016060815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e9057805160ff1916838001178555612ebd565b82800160010185558215612ebd579182015b82811115612ebd578251825591602001919060010190612ea2565b50612ec9929150612ecd565b5090565b5b80821115612ec95760008155600101612ece565b80356001600160a01b038116811461062757600080fd5b600082601f830112612f09578081fd5b8135612f1c612f1782614708565b6146e1565b818152915060208083019084810181840286018201871015612f3d57600080fd5b60005b84811015612f5c57813584529282019290820190600101612f40565b505050505092915050565b600082601f830112612f77578081fd5b813567ffffffffffffffff811115612f8d578182fd5b612fa0601f8201601f19166020016146e1565b9150808252836020828501011115612fb757600080fd5b8060208401602084013760009082016020015292915050565b803560ff8116811461062757600080fd5b600060208284031215612ff2578081fd5b6113518383612ee2565b6000806040838503121561300e578081fd5b6130188484612ee2565b91506130278460208501612ee2565b90509250929050565b600080600080600060a08688031215613047578081fd5b8535613052816147df565b94506020860135613062816147df565b9350604086013567ffffffffffffffff8082111561307e578283fd5b61308a89838a01612ef9565b9450606088013591508082111561309f578283fd5b6130ab89838a01612ef9565b935060808801359150808211156130c0578283fd5b506130cd88828901612f67565b9150509295509295909350565b600080600080600060a086880312156130f1578081fd5b6130fb8787612ee2565b945061310a8760208801612ee2565b93506040860135925060608601359150608086013567ffffffffffffffff811115613133578182fd5b6130cd88828901612f67565b6000806000806000806000806000806101408b8d03121561315e578485fd5b6131688c8c612ee2565b99506131778c60208d01612ee2565b98506131868c60408d01612fd0565b975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013567ffffffffffffffff808211156131be578485fd5b6131ca8e838f01612f67565b94506101008d01359150808211156131e0578384fd5b6131ec8e838f01612f67565b93506101208d0135915080821115613202578283fd5b5061320f8d828e01612f67565b9150509295989b9194979a5092959850565b60008060408385031215613233578182fd5b61323d8484612ee2565b915060208301358015158114613251578182fd5b809150509250929050565b6000806040838503121561326e578182fd5b6132788484612ee2565b946020939093013593505050565b60008060006060848603121561329a578081fd5b6132a48585612ee2565b95602085013595506040909401359392505050565b600080604083850312156132cb578182fd5b6132d58484612ee2565b91506130278460208501612fd0565b60008060008060008060008060006101208a8c031215613302578283fd5b61330c8b8b612ee2565b985061331b8b60208c01612fd0565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013567ffffffffffffffff80821115613353578485fd5b61335f8d838e01612f67565b945060e08c0135915080821115613374578384fd5b6133808d838e01612f67565b93506101008c0135915080821115613396578283fd5b506133a38c828d01612f67565b9150509295985092959850929598565b600080604083850312156133c5578182fd5b823567ffffffffffffffff808211156133dc578384fd5b818501915085601f8301126133ef578384fd5b81356133fd612f1782614708565b80828252602080830192508086018a82838702890101111561341d578889fd5b8896505b84871015613447576134338b82612ee2565b845260019690960195928101928101613421565b50909650870135935050508082111561345e578283fd5b5061346b85828601612ef9565b9150509250929050565b600060208284031215613486578081fd5b81358015158114611351578182fd5b6000602082840312156134a6578081fd5b5035919050565b600080604083850312156134bf578182fd5b823591506020830135613251816147df565b600080604083850312156134e3578182fd5b50508035926020909101359150565b600060208284031215613503578081fd5b8135611351816147f4565b60006020828403121561351f578081fd5b8151611351816147f4565b60006020828403121561353b578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561357e57815187529582019590820190600101613562565b509495945050505050565b60008151808452815b818110156135ae57602081850181015186830182015201613592565b818111156135bf5782602083870101525b50601f01601f19169290920160200192915050565b600081546001808216600081146135f257600181146136105761364e565b60028304607f16865260ff198316602087015260408601935061364e565b6002830480875261362086614728565b60005b828110156136445781546020828b0101528482019150602081019050613623565b8801602001955050505b50505092915050565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061369e9083018661354f565b82810360608401526136b0818661354f565b905082810360808401526136c48185613589565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061370a90830184613589565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b600060208252611351602083018461354f565b600060408252613754604083018561354f565b8281036020840152613766818561354f565b95945050505050565b901515815260200190565b941515855292151560208501529015156040840152151560608301521515608082015260a00190565b90815260200190565b6000602082526113516020830184613589565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b60208082526035908201527f434c4d383a3a69737375654f6e426568616c663a2063616c6c206d757374206360408201527437b6b290333937b6902220a79037b91030b236b4b760591b606082015260800190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526e0818591b5a5b881d1bc819dc985b9d608a1b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c794465616c65723a206d73672e73656e646572206e6f746040820152681030903232b0b632b960b91b606082015260800190565b6020808252602b908201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60408201526a65726f206164647265737360a81b606082015260800190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b60208082526024908201527f434c4d383a3a7265746972653a20746f6b656e496420646f6573206e6f7420656040820152631e1a5cdd60e21b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526022908201527f434c4d383a3a6d696e743a20746f6b656e496420646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b60208082526032908201527f434c4d383a3a756e72656769737465724465616c65723a20746f6b656e54797060408201527119525908191bd95cc81b9bdd08195e1a5cdd60721b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526046908201527f434c4d383a3a756e7265676973746572436f6e73756d6572286c696d6974656460408201527f293a206f6e6c792061646d696e2063616e20756e726567697374657220636f6e60608201526573756d65727360d01b608082015260a00190565b6020808252602a908201527f434c4d383a3a676574546f6b656e547970653a20746f6b656e496420646f6573604082015269081b9bdd08195e1a5cdd60b21b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c7941646d696e3a206d73672e73656e646572206e6f74206040820152683a34329030b236b4b760b91b606082015260800190565b60208082526033908201527f434c4d383a3a5f69737375653a20697373756572206e6f7420612072656769736040820152723a32b932b21037b33339b2ba103232b0b632b960691b606082015260800190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526f2061646d696e20746f207265766f6b6560801b606082015260800190565b60208082526034908201527f434c4d383a3a7265746972653a206e6f7420656e6f75676820617661696c61626040820152736c652062616c616e636520746f2072657469726560601b606082015260800190565b60208082526037908201527f434c4d383a3a5f6973737565286c696d69746564293a2070726f706f7365722060408201527f6e6f7420612072656769737465726564206465616c6572000000000000000000606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526036908201527f434c4d383a3a7472616e736665723a2073656e64657220616e642072656365696040820152757665722063616e6e6f74206265207468652073616d6560501b606082015260800190565b60208082526032908201527f434c4d383a3a6d696e743a2063616e6e6f74206d696e74206e657720746f6b656040820152716e7320696e206c696d69746564206d6f646560701b606082015260800190565b60208082526030908201527f434c4d383a3a72656769737465724465616c65723a20746f6b656e547970654960408201526f1908191bd95cc81b9bdd08195e1a5cdd60821b606082015260800190565b60208082526026908201527f434c4d383a3a7472616e736665723a20746f6b656e496420646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b60208082526042908201527f434c4d383a3a7265676973746572436f6e73756d6572286c696d69746564293a60408201527f206f6e6c792061646d696e2063616e20726567697374657220636f6e73756d65606082015261727360f01b608082015260a00190565b60208082526037908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201527f746572656420656d697373696f6e732061756469746f72000000000000000000606082015260800190565b6020808252602e908201527f434c4d383a3a5f6973737565286c696d69746564293a206d73672e73656e646560408201526d72206e6f742074696d656c6f636b60901b606082015260800190565b60208082526033908201527f434c4d383a3a676574546f6b656e52657469726564416d6f756e743a20746f6b604082015272195b925908191bd95cc81b9bdd08195e1a5cdd606a1b606082015260800190565b60208082526058908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c7920656d697373696f6e732061756469746f72732063616e60608201527f206973737565206175646974656420656d697373696f6e730000000000000000608082015260a00190565b602080825260409082018190527f434c4d383a3a5f6973737565286c696d69746564293a20697373756572206e6f908201527f742061207265676973746572656420656d697373696f6e732061756469746f72606082015260800190565b60208082526027908201527f434c4d383a3a5f6973737565286c696d69746564293a20697373756565206e6f6040820152663a1030b236b4b760c91b606082015260800190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526030908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201526f3a32b932b2102922a1903232b0b632b960811b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252603d908201527f434c4d383a3a636f6e73756d65724f724465616c65723a206d73672e73656e6460408201527f6572206e6f74206120636f6e73756d6572206f722061206465616c6572000000606082015260800190565b60208082526024908201527f434c4d383a3a5f69737375653a20746f6b656e54797065496420697320696e76604082015263185b1a5960e21b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b6020808252604b908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c792061646d696e20616e642044414f2063616e207472616e60608201526a7366657220746f6b656e7360a81b608082015260a00190565b6000602082528251602083015260208301516145966040840182613657565b5060408301516145a96060840182613542565b5060608301516145bc6080840182613542565b50608083015160a083015260a083015160c083015260c083015160e083015260e08301516101008181850152808501519150506101606101208181860152614608610180860184613589565b9250808601519050601f196101408187860301818801526146298584613589565b9088015187820390920184880152935090506146458382613589565b9695505050505050565b918252602082015260400190565b60006101608d83528c60208401528b604084015260ff8b1660608401528960808401528860a08401528760c08401528660e0840152806101008401526146a5818401876135d4565b90508281036101208401526146ba81866135d4565b90508281036101408401526146cf81856135d4565b9e9d5050505050505050505050505050565b60405181810167ffffffffffffffff8111828210171561470057600080fd5b604052919050565b600067ffffffffffffffff82111561471e578081fd5b5060209081020190565b60009081526020902090565b60e01c90565b600060443d101561474a57611100565b600481823e6308c379a061475e8251614734565b1461476857611100565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156147985750505050611100565b828401925082519150808211156147b25750505050611100565b503d830160208284010111156147ca57505050611100565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114612b4d57600080fd5b6001600160e01b031981168114612b4d57600080fdfe455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76af8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e736665722ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12ca2646970667358221220055a69771b7a92b6338a8700f94a7ad5684ecca1ae185c3b59807314c8f1f23c64736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol/NetEmissionsTokenNetworkV2.dbg.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol/NetEmissionsTokenNetworkV2.dbg.json deleted file mode 100644 index e8691a42b8..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol/NetEmissionsTokenNetworkV2.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../../build-info/9d9ab8dd72b8ab6c6c73fa902200adf9.json" -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol/NetEmissionsTokenNetworkV2.json b/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol/NetEmissionsTokenNetworkV2.json deleted file mode 100644 index abd2ae26e2..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol/NetEmissionsTokenNetworkV2.json +++ /dev/null @@ -1,1337 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "NetEmissionsTokenNetworkV2", - "sourceName": "src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "RegisteredConsumer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "RegisteredDealer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "availableBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "retiredBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "dateCreated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "TokenCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRetired", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "UnregisteredConsumer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "UnregisteredDealer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_CONSUMER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_EMISSIONS_AUDITOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_OFFSET_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REGISTERED_REC_DEALER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getAvailableAndRetired", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getIssuer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNumOfUniqueTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getRoles", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenDetails", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dateCreated", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "internalType": "struct NetEmissionsTokenNetworkV2.CarbonTokenDetails", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenRetiredAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getTokenType", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isConsumerRegistered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isDealerRegistered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "issue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "issuee", - "type": "address" - }, - { - "internalType": "address", - "name": "issuer", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fromDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thruDate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "automaticRetireDate", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "manifest", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "issueOnBehalf", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "limitedMode", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "registerConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - } - ], - "name": "registerDealer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "retire", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_limitedMode", - "type": "bool" - } - ], - "name": "setLimitedMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_timelock", - "type": "address" - } - ], - "name": "setTimelock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "unregisterConsumer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenTypeId", - "type": "uint8" - } - ], - "name": "unregisterDealer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b5061492e806100206000396000f3fe608060405234801561001057600080fd5b50600436106102735760003560e01c80637f157c9b11610151578063ce6ccfaf116100c3578063e985e9c511610087578063e985e9c514610575578063f000be9814610588578063f242432a1461059b578063f851a440146105ae578063fcba7948146105b6578063fd0c4a9a146105be57610273565b8063ce6ccfaf14610510578063d547741f14610534578063dba851b014610547578063ddc3e6eb1461054f578063e2e564f21461056257610273565b8063a217fddf11610115578063a217fddf1461049c578063a22cb465146104a4578063bdacb303146104b7578063c1e03728146104ca578063c4d66de8146104ea578063ca15c873146104fd57610273565b80637f157c9b146104225780639010d07c1461044357806391d148541461046357806392089c4614610476578063a0d975a71461048957610273565b806331aa4b20116101ea57806353dbe982116101ae57806353dbe982146103d15780635ddb368f146103e457806369f7ef44146103ec57806376aed2e1146103ff57806376ce47551461041257806378e5c5921461041a57610273565b806331aa4b201461036557806333781a0e1461037857806336568abe1461038b57806344b22fdd1461039e5780634e1273f4146103b157610273565b806318a50d7e1161023c57806318a50d7e146103095780631ef68ef714610311578063248a9ca314610319578063293a7f2e1461032c5780632eb2c2d61461033f5780632f2ff15d1461035257610273565b8062fdd58e1461027857806301ffc9a7146102a1578063095bcdb6146102c15780630e89341c146102d6578063156e29f6146102f6575b600080fd5b61028b61028636600461325c565b6105d1565b60405161029891906137a3565b60405180910390f35b6102b46102af3660046134f2565b61062d565b604051610298919061376f565b6102d46102cf366004613286565b610650565b005b6102e96102e4366004613495565b610775565b60405161029891906137ac565b6102d4610304366004613286565b61080d565b61028b61089c565b61028b6108ae565b61028b610327366004613495565b6108c0565b6102d461033a3660046134d1565b6108d5565b6102d461034d366004613030565b610a56565b6102d46103603660046134ad565b610c75565b6102d46103733660046132b9565b610cbd565b6102b4610386366004612fe1565b610dbe565b6102d46103993660046134ad565b610dd8565b6102d46103ac366004612fe1565b610e1a565b6103c46103bf3660046133b3565b610f1f565b604051610298919061372e565b6102d46103df366004612fe1565b610fec565b61028b6110f1565b6102b46103fa366004612fe1565b611103565b6102e961040d366004613495565b611185565b61028b61127e565b61028b611290565b61043561043036600461325c565b6112a2565b60405161029892919061464f565b6104566104513660046134d1565b611339565b604051610298919061365e565b6102b46104713660046134ad565b611358565b610456610484366004613495565b611370565b61028b61049736600461325c565b611393565b61028b6113e2565b6102d46104b2366004613221565b6113e7565b6102d46104c5366004612fe1565b6114b5565b6104dd6104d8366004613495565b6114fe565b6040516102989190614577565b6102d46104f8366004612fe1565b61173e565b61028b61050b366004613495565b61189e565b61052361051e366004612fe1565b6118b5565b60405161029895949392919061377a565b6102d46105423660046134ad565b611949565b6102b4611983565b6102d461055d366004613475565b61198c565b6102d46105703660046132b9565b6119c6565b6102b4610583366004612ffc565b611ad4565b6102d461059636600461313f565b611b02565b6102d46105a93660046130da565b611b5b565b610456611cef565b61028b611d03565b6102d46105cc3660046132e4565b611d15565b60006001600160a01b0383166106025760405162461bcd60e51b81526004016105f99061398a565b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b600061066a60008051602061484f83398151915233611358565b905060006106866000805160206148b983398151915233611358565b905060006106a260008051602061482f83398151915233611358565b905060006106be6000805160206148d983398151915233611358565b905083806106c95750825b806106d15750815b806106d95750805b6106f55760405162461bcd60e51b81526004016105f990614416565b6106fe86611db6565b61071a5760405162461bcd60e51b81526004016105f990613fd7565b336001600160a01b03881614156107435760405162461bcd60e51b81526004016105f990613edf565b61076c33888888604051806040016040528060048152602001630307830360e41b815250611b5b565b50505050505050565b60678054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50505050509050919050565b610818600033611358565b6108345760405162461bcd60e51b81526004016105f990613c1a565b61083d82611db6565b6108595760405162461bcd60e51b81526004016105f990613a87565b60c95460ff161561087c5760405162461bcd60e51b81526004016105f990613f35565b61089783838360405180602001604052806000815250611dd8565b505050565b60008051602061486f83398151915281565b60008051602061482f83398151915281565b60009081526097602052604090206002015490565b60006108ef60008051602061484f83398151915233611358565b9050600061090b6000805160206148b983398151915233611358565b9050600061092760008051602061482f83398151915233611358565b905060006109436000805160206148d983398151915233611358565b9050838061094e5750825b806109565750815b8061095e5750805b61097a5760405162461bcd60e51b81526004016105f990614416565b61098386611db6565b61099f5760405162461bcd60e51b81526004016105f990613a0c565b6109a933876105d1565b8511156109c85760405162461bcd60e51b81526004016105f990613d06565b6109d3338787611ec3565b600086815260cd602090815260408083203384529091529020546109f79086611fd9565b600087815260cd602090815260408083203380855292529182902092909255517f8f1b5ebb586d3d169e4ed07db9cd10ce0dd30c7b656171310eae7517c0b53cf990610a46908990899061464f565b60405180910390a2505050505050565b8151835114610a775760405162461bcd60e51b81526004016105f99061438d565b6001600160a01b038416610a9d5760405162461bcd60e51b81526004016105f990613db7565b610aa5611ffe565b6001600160a01b0316856001600160a01b03161480610acb5750610acb85610583611ffe565b610ae75760405162461bcd60e51b81526004016105f990613dfc565b6000610af1611ffe565b9050610b01818787878787612002565b60005b8451811015610c07576000858281518110610b1b57fe5b602002602001015190506000858381518110610b3357fe5b60200260200101519050610ba0816040518060600160405280602a815260200161488f602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020546120ff9092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a1681522054610bd79082611fd9565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610b04565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c57929190613741565b60405180910390a4610c6d81878787878761212b565b505050505050565b600082815260976020526040902060020154610c9390610471611ffe565b610caf5760405162461bcd60e51b81526004016105f9906138f2565b610cb98282612239565b5050565b610cc8600033611358565b610ce45760405162461bcd60e51b81526004016105f990613c1a565b610ced816122a2565b610d095760405162461bcd60e51b81526004016105f990613f87565b8060ff1660011415610d3257610d2d6000805160206148b983398151915283610c75565b610d6e565b8060ff1660021415610d5657610d2d60008051602061482f83398151915283610c75565b610d6e6000805160206148d983398151915283610c75565b610d8660008051602061486f83398151915283610c75565b6040516001600160a01b038316907fa8377deee15954185683d55effd369508b4935978c8cb2bab790bf04c570181490600090a25050565b600061062760008051602061484f83398151915283611358565b610de0611ffe565b6001600160a01b0316816001600160a01b031614610e105760405162461bcd60e51b81526004016105f9906144b7565b610cb982826122c7565b6000610e346000805160206148b983398151915233611358565b90506000610e5060008051602061482f83398151915233611358565b90506000610e6c6000805160206148d983398151915233611358565b90508280610e775750815b80610e7f5750805b610e9b5760405162461bcd60e51b81526004016105f990613941565b60c95460ff1615610ecd57610eb1600033611358565b610ecd5760405162461bcd60e51b81526004016105f99061401d565b610ee560008051602061484f83398151915285610c75565b6040516001600160a01b038516907f69a0adee259d26fe61f4776f7bea7f3a9737c7321256821b985f988545efd31990600090a250505050565b60608151835114610f425760405162461bcd60e51b81526004016105f9906142f4565b6060835167ffffffffffffffff81118015610f5c57600080fd5b50604051908082528060200260200182016040528015610f86578160200160208202803683370190505b50905060005b8451811015610fe457610fc5858281518110610fa457fe5b6020026020010151858381518110610fb857fe5b60200260200101516105d1565b828281518110610fd157fe5b6020908102919091010152600101610f8c565b509392505050565b60006110066000805160206148b983398151915233611358565b9050600061102260008051602061482f83398151915233611358565b9050600061103e6000805160206148d983398151915233611358565b905082806110495750815b806110515750805b61106d5760405162461bcd60e51b81526004016105f990613941565b60c95460ff161561109f57611083600033611358565b61109f5760405162461bcd60e51b81526004016105f990613b64565b6110b760008051602061484f83398151915285611949565b6040516001600160a01b038516907f03a38088da75ee2d80f6c753f55f8fd17602ae17d8bd0ef44d5e1f28ab5af11f90600090a250505050565b60006110fd60cb612330565b90505b90565b60008061111e6000805160206148b983398151915284611358565b9050600061113a60008051602061482f83398151915285611358565b905060006111566000805160206148d983398151915286611358565b905082806111615750815b806111695750805b1561117a576001935050505061064b565b506000949350505050565b606061119082611db6565b6111ac5760405162461bcd60e51b81526004016105f990613bd0565b600082815260cc6020526040902060018082015460ff16141561120457505060408051808201909152601c81527f52656e657761626c6520456e6572677920436572746966696361746500000000602082015261064b565b600181015460ff166002141561124f57505060408051808201909152601781527f436172626f6e20456d697373696f6e73204f6666736574000000000000000000602082015261064b565b50506040805180820190915260118152704175646974656420456d697373696f6e7360781b6020820152919050565b6000805160206148d983398151915281565b60008051602061484f83398151915281565b60008060006112b185856105d1565b60405163a0d975a760e01b8152909150600090309063a0d975a7906112dc9089908990600401613715565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c919061352a565b9196919550909350505050565b60008281526097602052604081206113519083612334565b9392505050565b60008281526097602052604081206113519083612340565b600090815260cc602052604090206001015461010090046001600160a01b031690565b600061139e82611db6565b6113ba5760405162461bcd60e51b81526004016105f990614130565b50600090815260cd602090815260408083206001600160a01b03949094168352929052205490565b600081565b816001600160a01b03166113f9611ffe565b6001600160a01b031614156114205760405162461bcd60e51b81526004016105f9906142ab565b806066600061142d611ffe565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611471611ffe565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114a9919061376f565b60405180910390a35050565b6114c0600033611358565b6114dc5760405162461bcd60e51b81526004016105f990613c1a565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b611506612de0565b600082815260cc60209081526040918290208251610160810184528154815260018083015460ff811683860152610100908190046001600160a01b0390811684880152600280860154909116606085015260038501546080850152600485015460a0850152600585015460c0850152600685015460e08501526007850180548851948116158402600019011691909104601f81018790048702840187019097528683529295939490860193919291908301828280156116065780601f106115db57610100808354040283529160200191611606565b820191906000526020600020905b8154815290600101906020018083116115e957829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561169a5780601f1061166f5761010080835404028352916020019161169a565b820191906000526020600020905b81548152906001019060200180831161167d57829003601f168201915b505050918352505060098201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050815250509050919050565b600054610100900460ff16806117575750611757612355565b80611765575060005460ff16155b6117815760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156117ac576000805460ff1961ff0019909116610100171660011790555b6117c460405180602001604052806000815250612366565b6117ea60008051602061484f83398151915260008051602061486f833981519152612402565b6117f5600083610caf565b61180d60008051602061486f83398151915283610caf565b6118256000805160206148b983398151915283610caf565b61183d60008051602061482f83398151915283610caf565b6118556000805160206148d983398151915283610caf565b60c9805460ca80546001600160a01b0319169055610100600160a81b0319166101006001600160a01b038516021760ff191690558015610cb9576000805461ff00191690555050565b600081815260976020526040812061062790612454565b600080808080806118c68188611358565b905060006118e26000805160206148b983398151915289611358565b905060006118fe60008051602061482f8339815191528a611358565b9050600061191a6000805160206148d98339815191528b611358565b9050600061193660008051602061484f8339815191528c611358565b949b939a50919850965091945092505050565b60008281526097602052604090206002015461196790610471611ffe565b610e105760405162461bcd60e51b81526004016105f990613cb6565b60c95460ff1681565b611997600033611358565b6119b35760405162461bcd60e51b81526004016105f990613c1a565b60c9805460ff1916911515919091179055565b6119d1600033611358565b6119ed5760405162461bcd60e51b81526004016105f990613c1a565b6119f6816122a2565b611a125760405162461bcd60e51b81526004016105f990613ac9565b8060ff1660011415611a3b57611a366000805160206148b983398151915283611949565b611a77565b8060ff1660021415611a5f57611a3660008051602061482f83398151915283611949565b611a776000805160206148d983398151915283611949565b611a8082611103565b611a9c57611a9c60008051602061486f83398151915283611949565b6040516001600160a01b038316907f98552ded770f1d05a505572f3387c108dbc6b566ea3d49f83cff3d1f1c72a04290600090a25050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b60ca546001600160a01b0316331480611b215750611b21600033611358565b611b3d5760405162461bcd60e51b81526004016105f990613813565b611b4f8a8a8a8a8a8a8a8a8a8a61245f565b50505050505050505050565b6001600160a01b038416611b815760405162461bcd60e51b81526004016105f990613db7565b611b89611ffe565b6001600160a01b0316856001600160a01b03161480611baf5750611baf85610583611ffe565b611bcb5760405162461bcd60e51b81526004016105f990613b1b565b6000611bd5611ffe565b9050611bf5818787611be68861292b565b611bef8861292b565b87612002565b611c3c836040518060600160405280602a815260200161488f602a913960008781526065602090815260408083206001600160a01b038d16845290915290205491906120ff565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054611c739084611fd9565b60008581526065602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188811691908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611cd9908990899061464f565b60405180910390a4610c6d81878787878761296f565b60c95461010090046001600160a01b031681565b6000805160206148b983398151915281565b6000611d2f6000805160206148b983398151915233611358565b90506000611d4b60008051602061482f83398151915233611358565b90506000611d676000805160206148d983398151915233611358565b90508280611d725750815b80611d7a5750805b611d965760405162461bcd60e51b81526004016105f990613941565b611da88c338d8d8d8d8d8d8d8d61245f565b505050505050505050505050565b600081611dc360cb612330565b10611dd05750600161064b565b506000919050565b6001600160a01b038416611dfe5760405162461bcd60e51b81526004016105f9906143d5565b6000611e08611ffe565b9050611e1a81600087611be68861292b565b60008481526065602090815260408083206001600160a01b0389168452909152902054611e479084611fd9565b60008581526065602090815260408083206001600160a01b03808b16808652919093528184209490945551908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611ea5908990899061464f565b60405180910390a4611ebc8160008787878761296f565b5050505050565b6001600160a01b038316611ee95760405162461bcd60e51b81526004016105f990613e9c565b6000611ef3611ffe565b9050611f2381856000611f058761292b565b611f0e8761292b565b60405180602001604052806000815250612002565b611f6a8260405180606001604052806024815260200161480b6024913960008681526065602090815260408083206001600160a01b038b16845290915290205491906120ff565b60008481526065602090815260408083206001600160a01b03808a16808652919093528184209490945551919291908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611fcb908890889061464f565b60405180910390a450505050565b6000828201838110156113515760405162461bcd60e51b81526004016105f990613a50565b3390565b612010868686868686610c6d565b60005b835181101561076c57600060cc600086848151811061202e57fe5b60200260200101518152602001908152602001600020905060c960009054906101000a900460ff16156120f5576001600160a01b03861661206f57506120f7565b600181015460ff166003146120c15760ca546001600160a01b03898116911614806120a057506120a0600089611358565b6120bc5760405162461bcd60e51b81526004016105f990614506565b6120f5565b6120d96000805160206148d983398151915289611358565b6120f55760405162461bcd60e51b81526004016105f990614183565b505b600101612013565b600081848411156121235760405162461bcd60e51b81526004016105f991906137ac565b505050900390565b61213d846001600160a01b0316612a40565b15610c6d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121769089908990889088908890600401613672565b602060405180830381600087803b15801561219057600080fd5b505af19250505080156121c0575060408051601f3d908101601f191682019092526121bd9181019061350e565b60015b612209576121cc61473a565b806121d757506121f1565b8060405162461bcd60e51b81526004016105f991906137ac565b60405162461bcd60e51b81526004016105f9906137bf565b6001600160e01b0319811663bc197c8160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b60008281526097602052604090206122519082612a46565b15610cb95761225e611ffe565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000808260ff161180156122ba575060038260ff1611155b15611dd05750600161064b565b60008281526097602052604090206122df9082612a5b565b15610cb9576122ec611ffe565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b5490565b60006113518383612a70565b6000611351836001600160a01b038416612ab5565b600061236030612a40565b15905090565b600054610100900460ff168061237f575061237f612355565b8061238d575060005460ff16155b6123a95760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156123d4576000805460ff1961ff0019909116610100171660011790555b6123dc612acd565b6123e4612b50565b6123ed82612bce565b8015610cb9576000805461ff00191690555050565b600082815260976020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526097602052604090912060020155565b600061062782612330565b612468886122a2565b6124845760405162461bcd60e51b81526004016105f990614473565b60c95460ff1615612596578760ff16600114806124a457508760ff166002145b156125515760ca546001600160a01b031633146124d35760405162461bcd60e51b81526004016105f9906140e2565b6124de60008b611358565b6124fa5760405162461bcd60e51b81526004016105f990614264565b6125126000805160206148b98339815191528a611358565b80612530575061253060008051602061482f8339815191528a611358565b61254c5760405162461bcd60e51b81526004016105f990613d5a565b612591565b8760ff1660031415612591576125756000805160206148d98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990614206565b612656565b8760ff16600114156125d6576125ba6000805160206148b98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f99061433d565b8760ff1660021415612616576125fa60008051602061482f8339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990613c63565b8760ff16600314156126565761263a6000805160206148d98339815191528a611358565b6126565760405162461bcd60e51b81526004016105f990614085565b61266060cb612c65565b600060cc600061267060cb612330565b8152602001908152602001600020905061268a60cb612330565b8160000181905550888160010160006101000a81548160ff021916908360ff1602179055508a8160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160010160016101000a8154816001600160a01b0302191690836001600160a01b031602179055508681600301819055508581600401819055508481600601819055504281600501819055508381600701908051906020019061273d929190612e4f565b5082516127539060088301906020860190612e4f565b5081516127699060098301906020850190612e4f565b5061278e8b61277860cb612330565b8a60405180602001604052806000815250611dd8565b8860ff166003141561281257600281015481546127b5916001600160a01b0316908a611ec3565b8054600090815260cd6020908152604080832060028501546001600160a01b031684529091529020546127e89089611fd9565b8154600090815260cd6020908152604080832060028601546001600160a01b031684529091529020555b8060020160009054906101000a90046001600160a01b03166001600160a01b03168160010160019054906101000a90046001600160a01b03166001600160a01b03167f99cc3eeb446560c9a2d2483bc5160735ec0fb1851aea3bde32e7a56c30c11da68a60cd60008660000154815260200190815260200160002060008660020160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000205485600001548660010160009054906101000a900460ff168760030154886004015489600601548a600501548b6007018c6008018d6009016040516129169b9a9998979695949392919061465d565b60405180910390a35050505050505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061295e57fe5b602090810291909101015292915050565b612981846001600160a01b0316612a40565b15610c6d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906129ba90899089908890889088906004016136d0565b602060405180830381600087803b1580156129d457600080fd5b505af1925050508015612a04575060408051601f3d908101601f19168201909252612a019181019061350e565b60015b612a10576121cc61473a565b6001600160e01b0319811663f23a6e6160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b3b151590565b6000611351836001600160a01b038416612c6e565b6000611351836001600160a01b038416612cb8565b81546000908210612a935760405162461bcd60e51b81526004016105f990613868565b826000018281548110612aa257fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b600054610100900460ff1680612ae65750612ae6612355565b80612af4575060005460ff16155b612b105760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612b3b576000805460ff1961ff0019909116610100171660011790555b8015612b4d576000805461ff00191690555b50565b600054610100900460ff1680612b695750612b69612355565b80612b77575060005460ff16155b612b935760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612bbe576000805460ff1961ff0019909116610100171660011790555b612b3b6301ffc9a760e01b612d7e565b600054610100900460ff1680612be75750612be7612355565b80612bf5575060005460ff16155b612c115760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612c3c576000805460ff1961ff0019909116610100171660011790555b612c4582612dcd565b612c55636cdb3d1360e11b612d7e565b6123ed6303a24d0760e21b612d7e565b80546001019055565b6000612c7a8383612ab5565b612cb057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610627565b506000610627565b60008181526001830160205260408120548015612d745783546000198083019190810190600090879083908110612ceb57fe5b9060005260206000200154905080876000018481548110612d0857fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612d3857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610627565b6000915050610627565b6001600160e01b03198082161415612da85760405162461bcd60e51b81526004016105f9906139d5565b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b8051610cb9906067906020840190612e4f565b60405180610160016040528060008152602001600060ff16815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016060815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e9057805160ff1916838001178555612ebd565b82800160010185558215612ebd579182015b82811115612ebd578251825591602001919060010190612ea2565b50612ec9929150612ecd565b5090565b5b80821115612ec95760008155600101612ece565b80356001600160a01b038116811461062757600080fd5b600082601f830112612f09578081fd5b8135612f1c612f1782614708565b6146e1565b818152915060208083019084810181840286018201871015612f3d57600080fd5b60005b84811015612f5c57813584529282019290820190600101612f40565b505050505092915050565b600082601f830112612f77578081fd5b813567ffffffffffffffff811115612f8d578182fd5b612fa0601f8201601f19166020016146e1565b9150808252836020828501011115612fb757600080fd5b8060208401602084013760009082016020015292915050565b803560ff8116811461062757600080fd5b600060208284031215612ff2578081fd5b6113518383612ee2565b6000806040838503121561300e578081fd5b6130188484612ee2565b91506130278460208501612ee2565b90509250929050565b600080600080600060a08688031215613047578081fd5b8535613052816147df565b94506020860135613062816147df565b9350604086013567ffffffffffffffff8082111561307e578283fd5b61308a89838a01612ef9565b9450606088013591508082111561309f578283fd5b6130ab89838a01612ef9565b935060808801359150808211156130c0578283fd5b506130cd88828901612f67565b9150509295509295909350565b600080600080600060a086880312156130f1578081fd5b6130fb8787612ee2565b945061310a8760208801612ee2565b93506040860135925060608601359150608086013567ffffffffffffffff811115613133578182fd5b6130cd88828901612f67565b6000806000806000806000806000806101408b8d03121561315e578485fd5b6131688c8c612ee2565b99506131778c60208d01612ee2565b98506131868c60408d01612fd0565b975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013567ffffffffffffffff808211156131be578485fd5b6131ca8e838f01612f67565b94506101008d01359150808211156131e0578384fd5b6131ec8e838f01612f67565b93506101208d0135915080821115613202578283fd5b5061320f8d828e01612f67565b9150509295989b9194979a5092959850565b60008060408385031215613233578182fd5b61323d8484612ee2565b915060208301358015158114613251578182fd5b809150509250929050565b6000806040838503121561326e578182fd5b6132788484612ee2565b946020939093013593505050565b60008060006060848603121561329a578081fd5b6132a48585612ee2565b95602085013595506040909401359392505050565b600080604083850312156132cb578182fd5b6132d58484612ee2565b91506130278460208501612fd0565b60008060008060008060008060006101208a8c031215613302578283fd5b61330c8b8b612ee2565b985061331b8b60208c01612fd0565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013567ffffffffffffffff80821115613353578485fd5b61335f8d838e01612f67565b945060e08c0135915080821115613374578384fd5b6133808d838e01612f67565b93506101008c0135915080821115613396578283fd5b506133a38c828d01612f67565b9150509295985092959850929598565b600080604083850312156133c5578182fd5b823567ffffffffffffffff808211156133dc578384fd5b818501915085601f8301126133ef578384fd5b81356133fd612f1782614708565b80828252602080830192508086018a82838702890101111561341d578889fd5b8896505b84871015613447576134338b82612ee2565b845260019690960195928101928101613421565b50909650870135935050508082111561345e578283fd5b5061346b85828601612ef9565b9150509250929050565b600060208284031215613486578081fd5b81358015158114611351578182fd5b6000602082840312156134a6578081fd5b5035919050565b600080604083850312156134bf578182fd5b823591506020830135613251816147df565b600080604083850312156134e3578182fd5b50508035926020909101359150565b600060208284031215613503578081fd5b8135611351816147f4565b60006020828403121561351f578081fd5b8151611351816147f4565b60006020828403121561353b578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561357e57815187529582019590820190600101613562565b509495945050505050565b60008151808452815b818110156135ae57602081850181015186830182015201613592565b818111156135bf5782602083870101525b50601f01601f19169290920160200192915050565b600081546001808216600081146135f257600181146136105761364e565b60028304607f16865260ff198316602087015260408601935061364e565b6002830480875261362086614728565b60005b828110156136445781546020828b0101528482019150602081019050613623565b8801602001955050505b50505092915050565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061369e9083018661354f565b82810360608401526136b0818661354f565b905082810360808401526136c48185613589565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061370a90830184613589565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b600060208252611351602083018461354f565b600060408252613754604083018561354f565b8281036020840152613766818561354f565b95945050505050565b901515815260200190565b941515855292151560208501529015156040840152151560608301521515608082015260a00190565b90815260200190565b6000602082526113516020830184613589565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b60208082526035908201527f434c4d383a3a69737375654f6e426568616c663a2063616c6c206d757374206360408201527437b6b290333937b6902220a79037b91030b236b4b760591b606082015260800190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526e0818591b5a5b881d1bc819dc985b9d608a1b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c794465616c65723a206d73672e73656e646572206e6f746040820152681030903232b0b632b960b91b606082015260800190565b6020808252602b908201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60408201526a65726f206164647265737360a81b606082015260800190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b60208082526024908201527f434c4d383a3a7265746972653a20746f6b656e496420646f6573206e6f7420656040820152631e1a5cdd60e21b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526022908201527f434c4d383a3a6d696e743a20746f6b656e496420646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b60208082526032908201527f434c4d383a3a756e72656769737465724465616c65723a20746f6b656e54797060408201527119525908191bd95cc81b9bdd08195e1a5cdd60721b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526046908201527f434c4d383a3a756e7265676973746572436f6e73756d6572286c696d6974656460408201527f293a206f6e6c792061646d696e2063616e20756e726567697374657220636f6e60608201526573756d65727360d01b608082015260a00190565b6020808252602a908201527f434c4d383a3a676574546f6b656e547970653a20746f6b656e496420646f6573604082015269081b9bdd08195e1a5cdd60b21b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c7941646d696e3a206d73672e73656e646572206e6f74206040820152683a34329030b236b4b760b91b606082015260800190565b60208082526033908201527f434c4d383a3a5f69737375653a20697373756572206e6f7420612072656769736040820152723a32b932b21037b33339b2ba103232b0b632b960691b606082015260800190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526f2061646d696e20746f207265766f6b6560801b606082015260800190565b60208082526034908201527f434c4d383a3a7265746972653a206e6f7420656e6f75676820617661696c61626040820152736c652062616c616e636520746f2072657469726560601b606082015260800190565b60208082526037908201527f434c4d383a3a5f6973737565286c696d69746564293a2070726f706f7365722060408201527f6e6f7420612072656769737465726564206465616c6572000000000000000000606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526036908201527f434c4d383a3a7472616e736665723a2073656e64657220616e642072656365696040820152757665722063616e6e6f74206265207468652073616d6560501b606082015260800190565b60208082526032908201527f434c4d383a3a6d696e743a2063616e6e6f74206d696e74206e657720746f6b656040820152716e7320696e206c696d69746564206d6f646560701b606082015260800190565b60208082526030908201527f434c4d383a3a72656769737465724465616c65723a20746f6b656e547970654960408201526f1908191bd95cc81b9bdd08195e1a5cdd60821b606082015260800190565b60208082526026908201527f434c4d383a3a7472616e736665723a20746f6b656e496420646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b60208082526042908201527f434c4d383a3a7265676973746572436f6e73756d6572286c696d69746564293a60408201527f206f6e6c792061646d696e2063616e20726567697374657220636f6e73756d65606082015261727360f01b608082015260a00190565b60208082526037908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201527f746572656420656d697373696f6e732061756469746f72000000000000000000606082015260800190565b6020808252602e908201527f434c4d383a3a5f6973737565286c696d69746564293a206d73672e73656e646560408201526d72206e6f742074696d656c6f636b60901b606082015260800190565b60208082526033908201527f434c4d383a3a676574546f6b656e52657469726564416d6f756e743a20746f6b604082015272195b925908191bd95cc81b9bdd08195e1a5cdd606a1b606082015260800190565b60208082526058908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c7920656d697373696f6e732061756469746f72732063616e60608201527f206973737565206175646974656420656d697373696f6e730000000000000000608082015260a00190565b602080825260409082018190527f434c4d383a3a5f6973737565286c696d69746564293a20697373756572206e6f908201527f742061207265676973746572656420656d697373696f6e732061756469746f72606082015260800190565b60208082526027908201527f434c4d383a3a5f6973737565286c696d69746564293a20697373756565206e6f6040820152663a1030b236b4b760c91b606082015260800190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526030908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201526f3a32b932b2102922a1903232b0b632b960811b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252603d908201527f434c4d383a3a636f6e73756d65724f724465616c65723a206d73672e73656e6460408201527f6572206e6f74206120636f6e73756d6572206f722061206465616c6572000000606082015260800190565b60208082526024908201527f434c4d383a3a5f69737375653a20746f6b656e54797065496420697320696e76604082015263185b1a5960e21b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b6020808252604b908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c792061646d696e20616e642044414f2063616e207472616e60608201526a7366657220746f6b656e7360a81b608082015260a00190565b6000602082528251602083015260208301516145966040840182613657565b5060408301516145a96060840182613542565b5060608301516145bc6080840182613542565b50608083015160a083015260a083015160c083015260c083015160e083015260e08301516101008181850152808501519150506101606101208181860152614608610180860184613589565b9250808601519050601f196101408187860301818801526146298584613589565b9088015187820390920184880152935090506146458382613589565b9695505050505050565b918252602082015260400190565b60006101608d83528c60208401528b604084015260ff8b1660608401528960808401528860a08401528760c08401528660e0840152806101008401526146a5818401876135d4565b90508281036101208401526146ba81866135d4565b90508281036101408401526146cf81856135d4565b9e9d5050505050505050505050505050565b60405181810167ffffffffffffffff8111828210171561470057600080fd5b604052919050565b600067ffffffffffffffff82111561471e578081fd5b5060209081020190565b60009081526020902090565b60e01c90565b600060443d101561474a57611100565b600481823e6308c379a061475e8251614734565b1461476857611100565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156147985750505050611100565b828401925082519150808211156147b25750505050611100565b503d830160208284010111156147ca57505050611100565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114612b4d57600080fd5b6001600160e01b031981168114612b4d57600080fdfe455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76af8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e736665722ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12ca26469706673582212205f01f3a69064ad53ce92125759799dded2745cbae7146e4576954e91b333c95664736f6c63430007000033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102735760003560e01c80637f157c9b11610151578063ce6ccfaf116100c3578063e985e9c511610087578063e985e9c514610575578063f000be9814610588578063f242432a1461059b578063f851a440146105ae578063fcba7948146105b6578063fd0c4a9a146105be57610273565b8063ce6ccfaf14610510578063d547741f14610534578063dba851b014610547578063ddc3e6eb1461054f578063e2e564f21461056257610273565b8063a217fddf11610115578063a217fddf1461049c578063a22cb465146104a4578063bdacb303146104b7578063c1e03728146104ca578063c4d66de8146104ea578063ca15c873146104fd57610273565b80637f157c9b146104225780639010d07c1461044357806391d148541461046357806392089c4614610476578063a0d975a71461048957610273565b806331aa4b20116101ea57806353dbe982116101ae57806353dbe982146103d15780635ddb368f146103e457806369f7ef44146103ec57806376aed2e1146103ff57806376ce47551461041257806378e5c5921461041a57610273565b806331aa4b201461036557806333781a0e1461037857806336568abe1461038b57806344b22fdd1461039e5780634e1273f4146103b157610273565b806318a50d7e1161023c57806318a50d7e146103095780631ef68ef714610311578063248a9ca314610319578063293a7f2e1461032c5780632eb2c2d61461033f5780632f2ff15d1461035257610273565b8062fdd58e1461027857806301ffc9a7146102a1578063095bcdb6146102c15780630e89341c146102d6578063156e29f6146102f6575b600080fd5b61028b61028636600461325c565b6105d1565b60405161029891906137a3565b60405180910390f35b6102b46102af3660046134f2565b61062d565b604051610298919061376f565b6102d46102cf366004613286565b610650565b005b6102e96102e4366004613495565b610775565b60405161029891906137ac565b6102d4610304366004613286565b61080d565b61028b61089c565b61028b6108ae565b61028b610327366004613495565b6108c0565b6102d461033a3660046134d1565b6108d5565b6102d461034d366004613030565b610a56565b6102d46103603660046134ad565b610c75565b6102d46103733660046132b9565b610cbd565b6102b4610386366004612fe1565b610dbe565b6102d46103993660046134ad565b610dd8565b6102d46103ac366004612fe1565b610e1a565b6103c46103bf3660046133b3565b610f1f565b604051610298919061372e565b6102d46103df366004612fe1565b610fec565b61028b6110f1565b6102b46103fa366004612fe1565b611103565b6102e961040d366004613495565b611185565b61028b61127e565b61028b611290565b61043561043036600461325c565b6112a2565b60405161029892919061464f565b6104566104513660046134d1565b611339565b604051610298919061365e565b6102b46104713660046134ad565b611358565b610456610484366004613495565b611370565b61028b61049736600461325c565b611393565b61028b6113e2565b6102d46104b2366004613221565b6113e7565b6102d46104c5366004612fe1565b6114b5565b6104dd6104d8366004613495565b6114fe565b6040516102989190614577565b6102d46104f8366004612fe1565b61173e565b61028b61050b366004613495565b61189e565b61052361051e366004612fe1565b6118b5565b60405161029895949392919061377a565b6102d46105423660046134ad565b611949565b6102b4611983565b6102d461055d366004613475565b61198c565b6102d46105703660046132b9565b6119c6565b6102b4610583366004612ffc565b611ad4565b6102d461059636600461313f565b611b02565b6102d46105a93660046130da565b611b5b565b610456611cef565b61028b611d03565b6102d46105cc3660046132e4565b611d15565b60006001600160a01b0383166106025760405162461bcd60e51b81526004016105f99061398a565b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b600061066a60008051602061484f83398151915233611358565b905060006106866000805160206148b983398151915233611358565b905060006106a260008051602061482f83398151915233611358565b905060006106be6000805160206148d983398151915233611358565b905083806106c95750825b806106d15750815b806106d95750805b6106f55760405162461bcd60e51b81526004016105f990614416565b6106fe86611db6565b61071a5760405162461bcd60e51b81526004016105f990613fd7565b336001600160a01b03881614156107435760405162461bcd60e51b81526004016105f990613edf565b61076c33888888604051806040016040528060048152602001630307830360e41b815250611b5b565b50505050505050565b60678054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50505050509050919050565b610818600033611358565b6108345760405162461bcd60e51b81526004016105f990613c1a565b61083d82611db6565b6108595760405162461bcd60e51b81526004016105f990613a87565b60c95460ff161561087c5760405162461bcd60e51b81526004016105f990613f35565b61089783838360405180602001604052806000815250611dd8565b505050565b60008051602061486f83398151915281565b60008051602061482f83398151915281565b60009081526097602052604090206002015490565b60006108ef60008051602061484f83398151915233611358565b9050600061090b6000805160206148b983398151915233611358565b9050600061092760008051602061482f83398151915233611358565b905060006109436000805160206148d983398151915233611358565b9050838061094e5750825b806109565750815b8061095e5750805b61097a5760405162461bcd60e51b81526004016105f990614416565b61098386611db6565b61099f5760405162461bcd60e51b81526004016105f990613a0c565b6109a933876105d1565b8511156109c85760405162461bcd60e51b81526004016105f990613d06565b6109d3338787611ec3565b600086815260cd602090815260408083203384529091529020546109f79086611fd9565b600087815260cd602090815260408083203380855292529182902092909255517f8f1b5ebb586d3d169e4ed07db9cd10ce0dd30c7b656171310eae7517c0b53cf990610a46908990899061464f565b60405180910390a2505050505050565b8151835114610a775760405162461bcd60e51b81526004016105f99061438d565b6001600160a01b038416610a9d5760405162461bcd60e51b81526004016105f990613db7565b610aa5611ffe565b6001600160a01b0316856001600160a01b03161480610acb5750610acb85610583611ffe565b610ae75760405162461bcd60e51b81526004016105f990613dfc565b6000610af1611ffe565b9050610b01818787878787612002565b60005b8451811015610c07576000858281518110610b1b57fe5b602002602001015190506000858381518110610b3357fe5b60200260200101519050610ba0816040518060600160405280602a815260200161488f602a91396065600086815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020546120ff9092919063ffffffff16565b60008381526065602090815260408083206001600160a01b038e811685529252808320939093558a1681522054610bd79082611fd9565b60009283526065602090815260408085206001600160a01b038c1686529091529092209190915550600101610b04565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610c57929190613741565b60405180910390a4610c6d81878787878761212b565b505050505050565b600082815260976020526040902060020154610c9390610471611ffe565b610caf5760405162461bcd60e51b81526004016105f9906138f2565b610cb98282612239565b5050565b610cc8600033611358565b610ce45760405162461bcd60e51b81526004016105f990613c1a565b610ced816122a2565b610d095760405162461bcd60e51b81526004016105f990613f87565b8060ff1660011415610d3257610d2d6000805160206148b983398151915283610c75565b610d6e565b8060ff1660021415610d5657610d2d60008051602061482f83398151915283610c75565b610d6e6000805160206148d983398151915283610c75565b610d8660008051602061486f83398151915283610c75565b6040516001600160a01b038316907fa8377deee15954185683d55effd369508b4935978c8cb2bab790bf04c570181490600090a25050565b600061062760008051602061484f83398151915283611358565b610de0611ffe565b6001600160a01b0316816001600160a01b031614610e105760405162461bcd60e51b81526004016105f9906144b7565b610cb982826122c7565b6000610e346000805160206148b983398151915233611358565b90506000610e5060008051602061482f83398151915233611358565b90506000610e6c6000805160206148d983398151915233611358565b90508280610e775750815b80610e7f5750805b610e9b5760405162461bcd60e51b81526004016105f990613941565b60c95460ff1615610ecd57610eb1600033611358565b610ecd5760405162461bcd60e51b81526004016105f99061401d565b610ee560008051602061484f83398151915285610c75565b6040516001600160a01b038516907f69a0adee259d26fe61f4776f7bea7f3a9737c7321256821b985f988545efd31990600090a250505050565b60608151835114610f425760405162461bcd60e51b81526004016105f9906142f4565b6060835167ffffffffffffffff81118015610f5c57600080fd5b50604051908082528060200260200182016040528015610f86578160200160208202803683370190505b50905060005b8451811015610fe457610fc5858281518110610fa457fe5b6020026020010151858381518110610fb857fe5b60200260200101516105d1565b828281518110610fd157fe5b6020908102919091010152600101610f8c565b509392505050565b60006110066000805160206148b983398151915233611358565b9050600061102260008051602061482f83398151915233611358565b9050600061103e6000805160206148d983398151915233611358565b905082806110495750815b806110515750805b61106d5760405162461bcd60e51b81526004016105f990613941565b60c95460ff161561109f57611083600033611358565b61109f5760405162461bcd60e51b81526004016105f990613b64565b6110b760008051602061484f83398151915285611949565b6040516001600160a01b038516907f03a38088da75ee2d80f6c753f55f8fd17602ae17d8bd0ef44d5e1f28ab5af11f90600090a250505050565b60006110fd60cb612330565b90505b90565b60008061111e6000805160206148b983398151915284611358565b9050600061113a60008051602061482f83398151915285611358565b905060006111566000805160206148d983398151915286611358565b905082806111615750815b806111695750805b1561117a576001935050505061064b565b506000949350505050565b606061119082611db6565b6111ac5760405162461bcd60e51b81526004016105f990613bd0565b600082815260cc6020526040902060018082015460ff16141561120457505060408051808201909152601c81527f52656e657761626c6520456e6572677920436572746966696361746500000000602082015261064b565b600181015460ff166002141561124f57505060408051808201909152601781527f436172626f6e20456d697373696f6e73204f6666736574000000000000000000602082015261064b565b50506040805180820190915260118152704175646974656420456d697373696f6e7360781b6020820152919050565b6000805160206148d983398151915281565b60008051602061484f83398151915281565b60008060006112b185856105d1565b60405163a0d975a760e01b8152909150600090309063a0d975a7906112dc9089908990600401613715565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c919061352a565b9196919550909350505050565b60008281526097602052604081206113519083612334565b9392505050565b60008281526097602052604081206113519083612340565b600090815260cc602052604090206001015461010090046001600160a01b031690565b600061139e82611db6565b6113ba5760405162461bcd60e51b81526004016105f990614130565b50600090815260cd602090815260408083206001600160a01b03949094168352929052205490565b600081565b816001600160a01b03166113f9611ffe565b6001600160a01b031614156114205760405162461bcd60e51b81526004016105f9906142ab565b806066600061142d611ffe565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611471611ffe565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114a9919061376f565b60405180910390a35050565b6114c0600033611358565b6114dc5760405162461bcd60e51b81526004016105f990613c1a565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b611506612de0565b600082815260cc60209081526040918290208251610160810184528154815260018083015460ff811683860152610100908190046001600160a01b0390811684880152600280860154909116606085015260038501546080850152600485015460a0850152600585015460c0850152600685015460e08501526007850180548851948116158402600019011691909104601f81018790048702840187019097528683529295939490860193919291908301828280156116065780601f106115db57610100808354040283529160200191611606565b820191906000526020600020905b8154815290600101906020018083116115e957829003601f168201915b505050918352505060088201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561169a5780601f1061166f5761010080835404028352916020019161169a565b820191906000526020600020905b81548152906001019060200180831161167d57829003601f168201915b505050918352505060098201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050815250509050919050565b600054610100900460ff16806117575750611757612355565b80611765575060005460ff16155b6117815760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156117ac576000805460ff1961ff0019909116610100171660011790555b6117c460405180602001604052806000815250612366565b6117ea60008051602061484f83398151915260008051602061486f833981519152612402565b6117f5600083610caf565b61180d60008051602061486f83398151915283610caf565b6118256000805160206148b983398151915283610caf565b61183d60008051602061482f83398151915283610caf565b6118556000805160206148d983398151915283610caf565b60c9805460ca80546001600160a01b0319169055610100600160a81b0319166101006001600160a01b038516021760ff191690558015610cb9576000805461ff00191690555050565b600081815260976020526040812061062790612454565b600080808080806118c68188611358565b905060006118e26000805160206148b983398151915289611358565b905060006118fe60008051602061482f8339815191528a611358565b9050600061191a6000805160206148d98339815191528b611358565b9050600061193660008051602061484f8339815191528c611358565b949b939a50919850965091945092505050565b60008281526097602052604090206002015461196790610471611ffe565b610e105760405162461bcd60e51b81526004016105f990613cb6565b60c95460ff1681565b611997600033611358565b6119b35760405162461bcd60e51b81526004016105f990613c1a565b60c9805460ff1916911515919091179055565b6119d1600033611358565b6119ed5760405162461bcd60e51b81526004016105f990613c1a565b6119f6816122a2565b611a125760405162461bcd60e51b81526004016105f990613ac9565b8060ff1660011415611a3b57611a366000805160206148b983398151915283611949565b611a77565b8060ff1660021415611a5f57611a3660008051602061482f83398151915283611949565b611a776000805160206148d983398151915283611949565b611a8082611103565b611a9c57611a9c60008051602061486f83398151915283611949565b6040516001600160a01b038316907f98552ded770f1d05a505572f3387c108dbc6b566ea3d49f83cff3d1f1c72a04290600090a25050565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b60ca546001600160a01b0316331480611b215750611b21600033611358565b611b3d5760405162461bcd60e51b81526004016105f990613813565b611b4f8a8a8a8a8a8a8a8a8a8a61245f565b50505050505050505050565b6001600160a01b038416611b815760405162461bcd60e51b81526004016105f990613db7565b611b89611ffe565b6001600160a01b0316856001600160a01b03161480611baf5750611baf85610583611ffe565b611bcb5760405162461bcd60e51b81526004016105f990613b1b565b6000611bd5611ffe565b9050611bf5818787611be68861292b565b611bef8861292b565b87612002565b611c3c836040518060600160405280602a815260200161488f602a913960008781526065602090815260408083206001600160a01b038d16845290915290205491906120ff565b60008581526065602090815260408083206001600160a01b038b81168552925280832093909355871681522054611c739084611fd9565b60008581526065602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188811691908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611cd9908990899061464f565b60405180910390a4610c6d81878787878761296f565b60c95461010090046001600160a01b031681565b6000805160206148b983398151915281565b6000611d2f6000805160206148b983398151915233611358565b90506000611d4b60008051602061482f83398151915233611358565b90506000611d676000805160206148d983398151915233611358565b90508280611d725750815b80611d7a5750805b611d965760405162461bcd60e51b81526004016105f990613941565b611da88c338d8d8d8d8d8d8d8d61245f565b505050505050505050505050565b600081611dc360cb612330565b10611dd05750600161064b565b506000919050565b6001600160a01b038416611dfe5760405162461bcd60e51b81526004016105f9906143d5565b6000611e08611ffe565b9050611e1a81600087611be68861292b565b60008481526065602090815260408083206001600160a01b0389168452909152902054611e479084611fd9565b60008581526065602090815260408083206001600160a01b03808b16808652919093528184209490945551908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611ea5908990899061464f565b60405180910390a4611ebc8160008787878761296f565b5050505050565b6001600160a01b038316611ee95760405162461bcd60e51b81526004016105f990613e9c565b6000611ef3611ffe565b9050611f2381856000611f058761292b565b611f0e8761292b565b60405180602001604052806000815250612002565b611f6a8260405180606001604052806024815260200161480b6024913960008681526065602090815260408083206001600160a01b038b16845290915290205491906120ff565b60008481526065602090815260408083206001600160a01b03808a16808652919093528184209490945551919291908416907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611fcb908890889061464f565b60405180910390a450505050565b6000828201838110156113515760405162461bcd60e51b81526004016105f990613a50565b3390565b612010868686868686610c6d565b60005b835181101561076c57600060cc600086848151811061202e57fe5b60200260200101518152602001908152602001600020905060c960009054906101000a900460ff16156120f5576001600160a01b03861661206f57506120f7565b600181015460ff166003146120c15760ca546001600160a01b03898116911614806120a057506120a0600089611358565b6120bc5760405162461bcd60e51b81526004016105f990614506565b6120f5565b6120d96000805160206148d983398151915289611358565b6120f55760405162461bcd60e51b81526004016105f990614183565b505b600101612013565b600081848411156121235760405162461bcd60e51b81526004016105f991906137ac565b505050900390565b61213d846001600160a01b0316612a40565b15610c6d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121769089908990889088908890600401613672565b602060405180830381600087803b15801561219057600080fd5b505af19250505080156121c0575060408051601f3d908101601f191682019092526121bd9181019061350e565b60015b612209576121cc61473a565b806121d757506121f1565b8060405162461bcd60e51b81526004016105f991906137ac565b60405162461bcd60e51b81526004016105f9906137bf565b6001600160e01b0319811663bc197c8160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b60008281526097602052604090206122519082612a46565b15610cb95761225e611ffe565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000808260ff161180156122ba575060038260ff1611155b15611dd05750600161064b565b60008281526097602052604090206122df9082612a5b565b15610cb9576122ec611ffe565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b5490565b60006113518383612a70565b6000611351836001600160a01b038416612ab5565b600061236030612a40565b15905090565b600054610100900460ff168061237f575061237f612355565b8061238d575060005460ff16155b6123a95760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff161580156123d4576000805460ff1961ff0019909116610100171660011790555b6123dc612acd565b6123e4612b50565b6123ed82612bce565b8015610cb9576000805461ff00191690555050565b600082815260976020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526097602052604090912060020155565b600061062782612330565b612468886122a2565b6124845760405162461bcd60e51b81526004016105f990614473565b60c95460ff1615612596578760ff16600114806124a457508760ff166002145b156125515760ca546001600160a01b031633146124d35760405162461bcd60e51b81526004016105f9906140e2565b6124de60008b611358565b6124fa5760405162461bcd60e51b81526004016105f990614264565b6125126000805160206148b98339815191528a611358565b80612530575061253060008051602061482f8339815191528a611358565b61254c5760405162461bcd60e51b81526004016105f990613d5a565b612591565b8760ff1660031415612591576125756000805160206148d98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990614206565b612656565b8760ff16600114156125d6576125ba6000805160206148b98339815191528a611358565b6125915760405162461bcd60e51b81526004016105f99061433d565b8760ff1660021415612616576125fa60008051602061482f8339815191528a611358565b6125915760405162461bcd60e51b81526004016105f990613c63565b8760ff16600314156126565761263a6000805160206148d98339815191528a611358565b6126565760405162461bcd60e51b81526004016105f990614085565b61266060cb612c65565b600060cc600061267060cb612330565b8152602001908152602001600020905061268a60cb612330565b8160000181905550888160010160006101000a81548160ff021916908360ff1602179055508a8160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160010160016101000a8154816001600160a01b0302191690836001600160a01b031602179055508681600301819055508581600401819055508481600601819055504281600501819055508381600701908051906020019061273d929190612e4f565b5082516127539060088301906020860190612e4f565b5081516127699060098301906020850190612e4f565b5061278e8b61277860cb612330565b8a60405180602001604052806000815250611dd8565b8860ff166003141561281257600281015481546127b5916001600160a01b0316908a611ec3565b8054600090815260cd6020908152604080832060028501546001600160a01b031684529091529020546127e89089611fd9565b8154600090815260cd6020908152604080832060028601546001600160a01b031684529091529020555b8060020160009054906101000a90046001600160a01b03166001600160a01b03168160010160019054906101000a90046001600160a01b03166001600160a01b03167f99cc3eeb446560c9a2d2483bc5160735ec0fb1851aea3bde32e7a56c30c11da68a60cd60008660000154815260200190815260200160002060008660020160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000205485600001548660010160009054906101000a900460ff168760030154886004015489600601548a600501548b6007018c6008018d6009016040516129169b9a9998979695949392919061465d565b60405180910390a35050505050505050505050565b60408051600180825281830190925260609182919060208083019080368337019050509050828160008151811061295e57fe5b602090810291909101015292915050565b612981846001600160a01b0316612a40565b15610c6d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906129ba90899089908890889088906004016136d0565b602060405180830381600087803b1580156129d457600080fd5b505af1925050508015612a04575060408051601f3d908101601f19168201909252612a019181019061350e565b60015b612a10576121cc61473a565b6001600160e01b0319811663f23a6e6160e01b1461076c5760405162461bcd60e51b81526004016105f9906138aa565b3b151590565b6000611351836001600160a01b038416612c6e565b6000611351836001600160a01b038416612cb8565b81546000908210612a935760405162461bcd60e51b81526004016105f990613868565b826000018281548110612aa257fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b600054610100900460ff1680612ae65750612ae6612355565b80612af4575060005460ff16155b612b105760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612b3b576000805460ff1961ff0019909116610100171660011790555b8015612b4d576000805461ff00191690555b50565b600054610100900460ff1680612b695750612b69612355565b80612b77575060005460ff16155b612b935760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612bbe576000805460ff1961ff0019909116610100171660011790555b612b3b6301ffc9a760e01b612d7e565b600054610100900460ff1680612be75750612be7612355565b80612bf5575060005460ff16155b612c115760405162461bcd60e51b81526004016105f990613e4e565b600054610100900460ff16158015612c3c576000805460ff1961ff0019909116610100171660011790555b612c4582612dcd565b612c55636cdb3d1360e11b612d7e565b6123ed6303a24d0760e21b612d7e565b80546001019055565b6000612c7a8383612ab5565b612cb057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610627565b506000610627565b60008181526001830160205260408120548015612d745783546000198083019190810190600090879083908110612ceb57fe5b9060005260206000200154905080876000018481548110612d0857fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612d3857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610627565b6000915050610627565b6001600160e01b03198082161415612da85760405162461bcd60e51b81526004016105f9906139d5565b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b8051610cb9906067906020840190612e4f565b60405180610160016040528060008152602001600060ff16815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016060815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e9057805160ff1916838001178555612ebd565b82800160010185558215612ebd579182015b82811115612ebd578251825591602001919060010190612ea2565b50612ec9929150612ecd565b5090565b5b80821115612ec95760008155600101612ece565b80356001600160a01b038116811461062757600080fd5b600082601f830112612f09578081fd5b8135612f1c612f1782614708565b6146e1565b818152915060208083019084810181840286018201871015612f3d57600080fd5b60005b84811015612f5c57813584529282019290820190600101612f40565b505050505092915050565b600082601f830112612f77578081fd5b813567ffffffffffffffff811115612f8d578182fd5b612fa0601f8201601f19166020016146e1565b9150808252836020828501011115612fb757600080fd5b8060208401602084013760009082016020015292915050565b803560ff8116811461062757600080fd5b600060208284031215612ff2578081fd5b6113518383612ee2565b6000806040838503121561300e578081fd5b6130188484612ee2565b91506130278460208501612ee2565b90509250929050565b600080600080600060a08688031215613047578081fd5b8535613052816147df565b94506020860135613062816147df565b9350604086013567ffffffffffffffff8082111561307e578283fd5b61308a89838a01612ef9565b9450606088013591508082111561309f578283fd5b6130ab89838a01612ef9565b935060808801359150808211156130c0578283fd5b506130cd88828901612f67565b9150509295509295909350565b600080600080600060a086880312156130f1578081fd5b6130fb8787612ee2565b945061310a8760208801612ee2565b93506040860135925060608601359150608086013567ffffffffffffffff811115613133578182fd5b6130cd88828901612f67565b6000806000806000806000806000806101408b8d03121561315e578485fd5b6131688c8c612ee2565b99506131778c60208d01612ee2565b98506131868c60408d01612fd0565b975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013567ffffffffffffffff808211156131be578485fd5b6131ca8e838f01612f67565b94506101008d01359150808211156131e0578384fd5b6131ec8e838f01612f67565b93506101208d0135915080821115613202578283fd5b5061320f8d828e01612f67565b9150509295989b9194979a5092959850565b60008060408385031215613233578182fd5b61323d8484612ee2565b915060208301358015158114613251578182fd5b809150509250929050565b6000806040838503121561326e578182fd5b6132788484612ee2565b946020939093013593505050565b60008060006060848603121561329a578081fd5b6132a48585612ee2565b95602085013595506040909401359392505050565b600080604083850312156132cb578182fd5b6132d58484612ee2565b91506130278460208501612fd0565b60008060008060008060008060006101208a8c031215613302578283fd5b61330c8b8b612ee2565b985061331b8b60208c01612fd0565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013567ffffffffffffffff80821115613353578485fd5b61335f8d838e01612f67565b945060e08c0135915080821115613374578384fd5b6133808d838e01612f67565b93506101008c0135915080821115613396578283fd5b506133a38c828d01612f67565b9150509295985092959850929598565b600080604083850312156133c5578182fd5b823567ffffffffffffffff808211156133dc578384fd5b818501915085601f8301126133ef578384fd5b81356133fd612f1782614708565b80828252602080830192508086018a82838702890101111561341d578889fd5b8896505b84871015613447576134338b82612ee2565b845260019690960195928101928101613421565b50909650870135935050508082111561345e578283fd5b5061346b85828601612ef9565b9150509250929050565b600060208284031215613486578081fd5b81358015158114611351578182fd5b6000602082840312156134a6578081fd5b5035919050565b600080604083850312156134bf578182fd5b823591506020830135613251816147df565b600080604083850312156134e3578182fd5b50508035926020909101359150565b600060208284031215613503578081fd5b8135611351816147f4565b60006020828403121561351f578081fd5b8151611351816147f4565b60006020828403121561353b578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561357e57815187529582019590820190600101613562565b509495945050505050565b60008151808452815b818110156135ae57602081850181015186830182015201613592565b818111156135bf5782602083870101525b50601f01601f19169290920160200192915050565b600081546001808216600081146135f257600181146136105761364e565b60028304607f16865260ff198316602087015260408601935061364e565b6002830480875261362086614728565b60005b828110156136445781546020828b0101528482019150602081019050613623565b8801602001955050505b50505092915050565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061369e9083018661354f565b82810360608401526136b0818661354f565b905082810360808401526136c48185613589565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061370a90830184613589565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b600060208252611351602083018461354f565b600060408252613754604083018561354f565b8281036020840152613766818561354f565b95945050505050565b901515815260200190565b941515855292151560208501529015156040840152151560608301521515608082015260a00190565b90815260200190565b6000602082526113516020830184613589565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b60208082526035908201527f434c4d383a3a69737375654f6e426568616c663a2063616c6c206d757374206360408201527437b6b290333937b6902220a79037b91030b236b4b760591b606082015260800190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526e0818591b5a5b881d1bc819dc985b9d608a1b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c794465616c65723a206d73672e73656e646572206e6f746040820152681030903232b0b632b960b91b606082015260800190565b6020808252602b908201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60408201526a65726f206164647265737360a81b606082015260800190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b60208082526024908201527f434c4d383a3a7265746972653a20746f6b656e496420646f6573206e6f7420656040820152631e1a5cdd60e21b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526022908201527f434c4d383a3a6d696e743a20746f6b656e496420646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b60208082526032908201527f434c4d383a3a756e72656769737465724465616c65723a20746f6b656e54797060408201527119525908191bd95cc81b9bdd08195e1a5cdd60721b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526046908201527f434c4d383a3a756e7265676973746572436f6e73756d6572286c696d6974656460408201527f293a206f6e6c792061646d696e2063616e20756e726567697374657220636f6e60608201526573756d65727360d01b608082015260a00190565b6020808252602a908201527f434c4d383a3a676574546f6b656e547970653a20746f6b656e496420646f6573604082015269081b9bdd08195e1a5cdd60b21b606082015260800190565b60208082526029908201527f434c4d383a3a6f6e6c7941646d696e3a206d73672e73656e646572206e6f74206040820152683a34329030b236b4b760b91b606082015260800190565b60208082526033908201527f434c4d383a3a5f69737375653a20697373756572206e6f7420612072656769736040820152723a32b932b21037b33339b2ba103232b0b632b960691b606082015260800190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201526f2061646d696e20746f207265766f6b6560801b606082015260800190565b60208082526034908201527f434c4d383a3a7265746972653a206e6f7420656e6f75676820617661696c61626040820152736c652062616c616e636520746f2072657469726560601b606082015260800190565b60208082526037908201527f434c4d383a3a5f6973737565286c696d69746564293a2070726f706f7365722060408201527f6e6f7420612072656769737465726564206465616c6572000000000000000000606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526036908201527f434c4d383a3a7472616e736665723a2073656e64657220616e642072656365696040820152757665722063616e6e6f74206265207468652073616d6560501b606082015260800190565b60208082526032908201527f434c4d383a3a6d696e743a2063616e6e6f74206d696e74206e657720746f6b656040820152716e7320696e206c696d69746564206d6f646560701b606082015260800190565b60208082526030908201527f434c4d383a3a72656769737465724465616c65723a20746f6b656e547970654960408201526f1908191bd95cc81b9bdd08195e1a5cdd60821b606082015260800190565b60208082526026908201527f434c4d383a3a7472616e736665723a20746f6b656e496420646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b60208082526042908201527f434c4d383a3a7265676973746572436f6e73756d6572286c696d69746564293a60408201527f206f6e6c792061646d696e2063616e20726567697374657220636f6e73756d65606082015261727360f01b608082015260a00190565b60208082526037908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201527f746572656420656d697373696f6e732061756469746f72000000000000000000606082015260800190565b6020808252602e908201527f434c4d383a3a5f6973737565286c696d69746564293a206d73672e73656e646560408201526d72206e6f742074696d656c6f636b60901b606082015260800190565b60208082526033908201527f434c4d383a3a676574546f6b656e52657469726564416d6f756e743a20746f6b604082015272195b925908191bd95cc81b9bdd08195e1a5cdd606a1b606082015260800190565b60208082526058908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c7920656d697373696f6e732061756469746f72732063616e60608201527f206973737565206175646974656420656d697373696f6e730000000000000000608082015260a00190565b602080825260409082018190527f434c4d383a3a5f6973737565286c696d69746564293a20697373756572206e6f908201527f742061207265676973746572656420656d697373696f6e732061756469746f72606082015260800190565b60208082526027908201527f434c4d383a3a5f6973737565286c696d69746564293a20697373756565206e6f6040820152663a1030b236b4b760c91b606082015260800190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526030908201527f434c4d383a3a5f69737375653a20697373756572206e6f74206120726567697360408201526f3a32b932b2102922a1903232b0b632b960811b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252603d908201527f434c4d383a3a636f6e73756d65724f724465616c65723a206d73672e73656e6460408201527f6572206e6f74206120636f6e73756d6572206f722061206465616c6572000000606082015260800190565b60208082526024908201527f434c4d383a3a5f69737375653a20746f6b656e54797065496420697320696e76604082015263185b1a5960e21b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b6020808252604b908201527f434c4d383a3a5f6265666f7265546f6b656e5472616e73666572286c696d697460408201527f6564293a206f6e6c792061646d696e20616e642044414f2063616e207472616e60608201526a7366657220746f6b656e7360a81b608082015260a00190565b6000602082528251602083015260208301516145966040840182613657565b5060408301516145a96060840182613542565b5060608301516145bc6080840182613542565b50608083015160a083015260a083015160c083015260c083015160e083015260e08301516101008181850152808501519150506101606101208181860152614608610180860184613589565b9250808601519050601f196101408187860301818801526146298584613589565b9088015187820390920184880152935090506146458382613589565b9695505050505050565b918252602082015260400190565b60006101608d83528c60208401528b604084015260ff8b1660608401528960808401528860a08401528760c08401528660e0840152806101008401526146a5818401876135d4565b90508281036101208401526146ba81866135d4565b90508281036101408401526146cf81856135d4565b9e9d5050505050505050505050505050565b60405181810167ffffffffffffffff8111828210171561470057600080fd5b604052919050565b600067ffffffffffffffff82111561471e578081fd5b5060209081020190565b60009081526020902090565b60e01c90565b600060443d101561474a57611100565b600481823e6308c379a061475e8251614734565b1461476857611100565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156147985750505050611100565b828401925082519150808211156147b25750505050611100565b503d830160208284010111156147ca57505050611100565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114612b4d57600080fd5b6001600160e01b031981168114612b4d57600080fdfe455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365ede6574deba8f02ada7888448a497b08844d62e044ed533343a673be3ffcde5f5e1aa547d3dade8c68b013a47ad41c2bcc9b9e4b0765b0fb616780e15786e76af8890eedd7900ad88da6192fd03dbb69dbeee963b1a0ed738abe49ab3331aaf3455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e736665722ab9f1da92e74aaa01eb75a871557505b11dd8d36832a34bb21bbee88b08d860e97dad3dbe5042e7384b1572cf966a15e089576a62b5126c5ef1d184ab18b12ca26469706673582212205f01f3a69064ad53ce92125759799dded2745cbae7146e4576954e91b333c95664736f6c63430007000033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol b/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol deleted file mode 100644 index 95175d6998..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol +++ /dev/null @@ -1,367 +0,0 @@ -pragma solidity ^0.7.0; -pragma experimental ABIEncoderV2; -// SPDX-License-Identifier: BSD-3-Clause - -/* Copyright 2021 Compound Labs, Inc. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -3. Neither the name of the copyright holder nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -// Original work from Compound: https://github.com/compound-finance/compound-protocol/blob/9bcff34a5c9c76d51e51bcb0ca1139588362ef96/contracts/Governance/Comp.sol -// Modified to work in the NetEmissionsTokenNetwork system - -contract DAOToken { - /// @notice EIP-20 token name for this token - string public constant name = "Climate DAO Token"; - - /// @notice EIP-20 token symbol for this token - string public constant symbol = "dCLM8"; - - /// @notice EIP-20 token decimals for this token - uint8 public constant decimals = 18; - - /// @notice Total number of tokens in circulation - uint public totalSupply = 10000000e18; // 10 million dCLM8 - - /// @notice Initial holder of all DAO tokens - address public initialHolder; - - /// @notice Governor to be set after deploy for permissions to burn tokens (only set once) - address public governor = address(0); - - /// @dev Allowance amounts on behalf of others - mapping (address => mapping (address => uint96)) internal allowances; - - /// @dev Official record of token balances for each account - mapping (address => uint96) internal balances; - - /// @notice A record of each accounts delegate - mapping (address => address) public delegates; - - /// @notice A checkpoint for marking number of votes from a given block - struct Checkpoint { - uint32 fromBlock; - uint96 votes; - } - - /// @notice A record of votes checkpoints for each account, by index - mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; - - /// @notice The number of checkpoints for each account - mapping (address => uint32) public numCheckpoints; - - /// @notice The EIP-712 typehash for the contract's domain - bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); - - /// @notice The EIP-712 typehash for the delegation struct used by the contract - bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); - - /// @notice A record of states for signing / validating signatures - mapping (address => uint) public nonces; - - /// @notice An event thats emitted when an account changes its delegate - event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); - - /// @notice An event thats emitted when a delegate account's vote balance changes - event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); - - /// @notice The standard EIP-20 transfer event - event Transfer(address indexed from, address indexed to, uint256 amount); - - /// @notice The standard EIP-20 approval event - event Approval(address indexed owner, address indexed spender, uint256 amount); - - /** - * @notice Construct a new dCLM8 token - * @param account The initial account to grant all the tokens - */ - constructor(address account) { - balances[account] = uint96(totalSupply); - initialHolder = account; - emit Transfer(address(0), account, totalSupply); - } - - /** - * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` - * @param account The address of the account holding the funds - * @param spender The address of the account spending the funds - * @return The number of tokens approved - */ - function allowance(address account, address spender) external view returns (uint) { - return allowances[account][spender]; - } - - /** - * @notice Approve `spender` to transfer up to `amount` from `src` - * @dev This will overwrite the approval amount for `spender` - * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) - * @param spender The address of the account which may transfer tokens - * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) - * @return Whether or not the approval succeeded - */ - function approve(address spender, uint rawAmount) external returns (bool) { - uint96 amount; - if (rawAmount == uint(-1)) { - amount = uint96(-1); - } else { - amount = safe96(rawAmount, "dCLM8::approve: amount exceeds 96 bits"); - } - - allowances[msg.sender][spender] = amount; - - emit Approval(msg.sender, spender, amount); - return true; - } - - /** - * @notice Get the number of tokens held by the `account` - * @param account The address of the account to get the balance of - * @return The number of tokens held - */ - function balanceOf(address account) external view returns (uint) { - return balances[account]; - } - - /** - * @notice Transfer `amount` tokens from `msg.sender` to `dst` - * @param dst The address of the destination account - * @param rawAmount The number of tokens to transfer - * @return Whether or not the transfer succeeded - */ - function transfer(address dst, uint rawAmount) external returns (bool) { - uint96 amount = safe96(rawAmount, "dCLM8::transfer: amount exceeds 96 bits"); - _transferTokens(msg.sender, dst, amount); - return true; - } - - /** - * @notice Transfer `amount` tokens from `src` to `dst` - * @param src The address of the source account - * @param dst The address of the destination account - * @param rawAmount The number of tokens to transfer - * @return Whether or not the transfer succeeded - */ - function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { - address spender = msg.sender; - uint96 spenderAllowance = allowances[src][spender]; - uint96 amount = safe96(rawAmount, "dCLM8::approve: amount exceeds 96 bits"); - - if (spender != src && spenderAllowance != uint96(-1)) { - uint96 newAllowance = sub96(spenderAllowance, amount, "dCLM8::transferFrom: transfer amount exceeds spender allowance"); - allowances[src][spender] = newAllowance; - - emit Approval(src, spender, newAllowance); - } - - _transferTokens(src, dst, amount); - return true; - } - - /** - * @notice Delegate votes from `msg.sender` to `delegatee` - * @param delegatee The address to delegate votes to - */ - function delegate(address delegatee) public { - return _delegate(msg.sender, delegatee); - } - - /** - * @notice Delegates votes from signatory to `delegatee` - * @param delegatee The address to delegate votes to - * @param nonce The contract state required to match the signature - * @param expiry The time at which to expire the signature - * @param v The recovery byte of the signature - * @param r Half of the ECDSA signature pair - * @param s Half of the ECDSA signature pair - */ - function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public { - bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); - bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)); - bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); - address signatory = ecrecover(digest, v, r, s); - require(signatory != address(0), "dCLM8::delegateBySig: invalid signature"); - require(nonce == nonces[signatory]++, "dCLM8::delegateBySig: invalid nonce"); - require(block.timestamp <= expiry, "dCLM8::delegateBySig: signature expired"); - return _delegate(signatory, delegatee); - } - - /** - * @notice Gets the current votes balance for `account` - * @param account The address to get votes balance - * @return The number of current votes for `account` - */ - function getCurrentVotes(address account) external view returns (uint96) { - uint32 nCheckpoints = numCheckpoints[account]; - return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; - } - - /** - * @notice Determine the prior number of votes for an account as of a block number - * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. - * @param account The address of the account to check - * @param blockNumber The block number to get the vote balance at - * @return The number of votes the account had as of the given block - */ - function getPriorVotes(address account, uint blockNumber) public view returns (uint96) { - require(blockNumber < block.number, "dCLM8::getPriorVotes: not yet determined"); - - uint32 nCheckpoints = numCheckpoints[account]; - if (nCheckpoints == 0) { - return 0; - } - - // First check most recent balance - if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { - return checkpoints[account][nCheckpoints - 1].votes; - } - - // Next check implicit zero balance - if (checkpoints[account][0].fromBlock > blockNumber) { - return 0; - } - - uint32 lower = 0; - uint32 upper = nCheckpoints - 1; - while (upper > lower) { - uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow - Checkpoint memory cp = checkpoints[account][center]; - if (cp.fromBlock == blockNumber) { - return cp.votes; - } else if (cp.fromBlock < blockNumber) { - lower = center; - } else { - upper = center - 1; - } - } - return checkpoints[account][lower].votes; - } - - function _burn(address account, uint96 amount) external { - require(account != address(0), "dCLM8::_burn: burn from the zero address"); - require(msg.sender == governor, "dCLM8::_burn: must be governor"); - - uint96 accountBalance = balances[account]; - require(accountBalance >= amount, "dCLM8::_burn: burn amount exceeds balance"); - balances[account] = accountBalance - amount; - totalSupply -= amount; - - emit Transfer(account, address(0), amount); - } - - function _delegate(address delegator, address delegatee) internal { - address currentDelegate = delegates[delegator]; - uint96 delegatorBalance = balances[delegator]; - delegates[delegator] = delegatee; - - emit DelegateChanged(delegator, currentDelegate, delegatee); - - _moveDelegates(currentDelegate, delegatee, delegatorBalance); - } - - function _transferTokens(address src, address dst, uint96 amount) internal { - require(src != address(0), "dCLM8::_transferTokens: cannot transfer from the zero address"); - require(dst != address(0), "dCLM8::_transferTokens: cannot transfer to the zero address"); - - balances[src] = sub96(balances[src], amount, "dCLM8::_transferTokens: transfer amount exceeds balance"); - balances[dst] = add96(balances[dst], amount, "dCLM8::_transferTokens: transfer amount overflows"); - emit Transfer(src, dst, amount); - - // If dst address has no delgatees, automatically set to self. Otherwise, transfer to dst's delegates - if (delegates[dst] == address(0)) { - _delegate(dst, dst); - } else { - _moveDelegates(delegates[src], delegates[dst], amount); - } - } - - function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { - if (srcRep != dstRep && amount > 0) { - if (srcRep != address(0)) { - uint32 srcRepNum = numCheckpoints[srcRep]; - uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; - uint96 srcRepNew = sub96(srcRepOld, amount, "dCLM8::_moveVotes: vote amount underflows"); - _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); - } - - if (dstRep != address(0)) { - uint32 dstRepNum = numCheckpoints[dstRep]; - uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; - uint96 dstRepNew = add96(dstRepOld, amount, "dCLM8::_moveVotes: vote amount overflows"); - _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); - } - } - } - - function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { - uint32 blockNumber = safe32(block.number, "dCLM8::_writeCheckpoint: block number exceeds 32 bits"); - - if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { - checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; - } else { - checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); - numCheckpoints[delegatee] = nCheckpoints + 1; - } - - emit DelegateVotesChanged(delegatee, oldVotes, newVotes); - } - - function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { - require(n < 2**32, errorMessage); - return uint32(n); - } - - function safe96(uint n, string memory errorMessage) internal pure returns (uint96) { - require(n < 2**96, errorMessage); - return uint96(n); - } - - function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { - uint96 c = a + b; - require(c >= a, errorMessage); - return c; - } - - function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { - require(b <= a, errorMessage); - return a - b; - } - - function getChainId() internal pure returns (uint) { - uint256 chainId; - assembly { chainId := chainid() } - return chainId; - } - - function getTotalSupply() external view returns (uint) { - return totalSupply; - } - - function getInitialHolder() external view returns (address) { - return initialHolder; - } - - function setGovernor(address newGovernor) public { - require(msg.sender == initialHolder, "dCLM8::setGovernor: must be initial holder"); - require(governor == address(0), "dCLM::setGovernor: governor can only be set once"); - governor = newGovernor; - } - -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/Governance/Governor.sol b/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/Governance/Governor.sol deleted file mode 100644 index 1d7aff2e52..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/Governance/Governor.sol +++ /dev/null @@ -1,404 +0,0 @@ -pragma solidity ^0.7.0; -pragma experimental ABIEncoderV2; -// SPDX-License-Identifier: BSD-3-Clause - -/* Copyright 2021 Compound Labs, Inc. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -3. Neither the name of the copyright holder nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -// Original work from Compound: https://github.com/compound-finance/compound-protocol/blob/9bcff34a5c9c76d51e51bcb0ca1139588362ef96/contracts/Governance/GovernorAlpha.sol -// Modified to work in the NetEmissionsTokenNetwork system - -contract Governor { - /// @notice The name of this contract - string public constant name = "Climate DAO Governor"; - - /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed - function quorumVotes() public view returns (uint) { - uint initialHolderBalance = dclm8.balanceOf(dclm8.getInitialHolder()); - uint daoTokensInCirculation = dclm8.getTotalSupply() - initialHolderBalance; - // if tokens in circulation, let sqrt(4%) of those tokens be the quorum - if (daoTokensInCirculation != 0) { - return sqrt(div256(daoTokensInCirculation, 25)); - } - // otherwise, default to sqrt(4% of total supply) - return 632455532033; - } - - /// @notice The number of votes required in order for a voter to become a proposer - function proposalThreshold() public pure returns (uint) { return 100000e18; } // 100,000 = 1% of Dclm8 - - /// @notice The maximum number of actions that can be included in a proposal - function proposalMaxOperations() public pure returns (uint) { return 10; } // 10 actions - - /// @notice The delay before voting on a proposal may take place, once proposed - function votingDelay() public pure returns (uint) { return 1; } // 1 block - - /// @notice The duration of voting on a proposal, in blocks - function votingPeriod() public pure returns (uint) { return 17280; } // ~3 days in blocks (assuming 15s blocks) - - /// @notice The address of the timelock - TimelockInterface public timelock; - - /// @notice The address of the DAO token - Dclm8Interface public dclm8; - - /// @notice The address of the Governor Guardian - address public guardian; - - /// @notice The total number of proposals - uint public proposalCount; - - struct Proposal { - // @notice Unique id for looking up a proposal - uint id; - - // @notice Creator of the proposal - address proposer; - - // @notice The timestamp that the proposal will be available for execution, set once the vote succeeds - uint eta; - - // @notice the ordered list of target addresses for calls to be made - address[] targets; - - // @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made - uint[] values; - - // @notice The ordered list of function signatures to be called - string[] signatures; - - // @notice The ordered list of calldata to be passed to each call - bytes[] calldatas; - - // @notice The block at which voting begins: holders must delegate their votes prior to this block - uint startBlock; - - // @notice The block at which voting ends: votes must be cast prior to this block - uint endBlock; - - // @notice Current number of votes in favor of this proposal - uint forVotes; - - // @notice Current number of votes in opposition to this proposal - uint againstVotes; - - // @notice Flag marking whether the proposal has been canceled - bool canceled; - - // @notice Flag marking whether the proposal has been executed - bool executed; - - // @notes Description of the proposal - string description; - - // @notice Receipts of ballots for the entire set of voters - mapping (address => Receipt) receipts; - } - - /// @notice Ballot receipt record for a voter - struct Receipt { - // @notice Whether or not a vote has been cast - bool hasVoted; - - // @notice Whether or not the voter supports the proposal - bool support; - - // @notice The number of votes the voter had, which were cast - uint96 votes; - } - - /// @notice Possible states that a proposal may be in - enum ProposalState { - Pending, - Active, - Canceled, - Defeated, - Succeeded, - Queued, - Expired, - Executed - } - - /// @notice The official record of all proposals ever proposed - mapping (uint => Proposal) public proposals; - - /// @notice The latest proposal for each proposer - mapping (address => uint) public latestProposalIds; - - /// @notice The EIP-712 typehash for the contract's domain - bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); - - /// @notice The EIP-712 typehash for the ballot struct used by the contract - bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,bool support)"); - - /// @notice An event emitted when a new proposal is created - event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint startBlock, uint endBlock, string description); - - /// @notice An event emitted when a vote has been cast on a proposal - event VoteCast(address voter, uint proposalId, bool support, uint votes); - - /// @notice An event emitted when a proposal has been canceled - event ProposalCanceled(uint id); - - /// @notice An event emitted when a proposal has been queued in the Timelock - event ProposalQueued(uint id, uint eta); - - /// @notice An event emitted when a proposal has been executed in the Timelock - event ProposalExecuted(uint id); - - constructor(address timelock_, address dclm8_, address guardian_) public { - timelock = TimelockInterface(timelock_); - dclm8 = Dclm8Interface(dclm8_); - guardian = guardian_; - } - - function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { - require(dclm8.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold(), "Governor::propose: proposer votes below proposal threshold"); - require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "Governor::propose: proposal function information arity mismatch"); - require(targets.length != 0, "Governor::propose: must provide actions"); - require(targets.length <= proposalMaxOperations(), "Governor::propose: too many actions"); - - uint latestProposalId = latestProposalIds[msg.sender]; - if (latestProposalId != 0) { - ProposalState proposersLatestProposalState = state(latestProposalId); - require(proposersLatestProposalState != ProposalState.Active, "Governor::propose: one live proposal per proposer, found an already active proposal"); - require(proposersLatestProposalState != ProposalState.Pending, "Governor::propose: one live proposal per proposer, found an already pending proposal"); - } - - uint startBlock = add256(block.number, votingDelay()); - uint endBlock = add256(startBlock, votingPeriod()); - - proposalCount++; - - Proposal storage p = proposals[proposalCount]; - p.id = proposalCount; - p.proposer = msg.sender; - p.eta = 0; - p.targets = targets; - p.values = values; - p.signatures = signatures; - p.calldatas = calldatas; - p.startBlock = startBlock; - p.endBlock = endBlock; - p.forVotes = 0; - p.againstVotes = 0; - p.canceled = false; - p.executed = false; - p.description = description; - - latestProposalIds[p.proposer] = p.id; - - emit ProposalCreated(p.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description); - return p.id; - } - - function queue(uint proposalId) public { - require(state(proposalId) == ProposalState.Succeeded, "Governor::queue: proposal can only be queued if it is succeeded"); - Proposal storage proposal = proposals[proposalId]; - uint eta = add256(block.timestamp, timelock.delay()); - for (uint i = 0; i < proposal.targets.length; i++) { - _queueOrRevert(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], eta); - } - proposal.eta = eta; - emit ProposalQueued(proposalId, eta); - } - - function _queueOrRevert(address target, uint value, string memory signature, bytes memory data, uint eta) internal { - require(!timelock.queuedTransactions(keccak256(abi.encode(target, value, signature, data, eta))), "Governor::_queueOrRevert: proposal action already queued at eta"); - timelock.queueTransaction(target, value, signature, data, eta); - } - - function execute(uint proposalId) public payable { - require(state(proposalId) == ProposalState.Queued, "Governor::execute: proposal can only be executed if it is queued"); - Proposal storage proposal = proposals[proposalId]; - proposal.executed = true; - for (uint i = 0; i < proposal.targets.length; i++) { - timelock.executeTransaction{value: proposal.values[i]}(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); - } - emit ProposalExecuted(proposalId); - } - - function cancel(uint proposalId) public { - ProposalState currentState = state(proposalId); - require(currentState != ProposalState.Executed, "Governor::cancel: cannot cancel executed proposal"); - - Proposal storage proposal = proposals[proposalId]; - require(msg.sender == guardian || dclm8.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold(), "Governor::cancel: proposer above threshold"); - - proposal.canceled = true; - for (uint i = 0; i < proposal.targets.length; i++) { - timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); - } - - emit ProposalCanceled(proposalId); - } - - function getActions(uint proposalId) public view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { - Proposal storage p = proposals[proposalId]; - return (p.targets, p.values, p.signatures, p.calldatas); - } - - function getReceipt(uint proposalId, address voter) public view returns (Receipt memory) { - return proposals[proposalId].receipts[voter]; - } - - function getDescription(uint proposalId) public view returns (string memory) { - return proposals[proposalId].description; - } - - function state(uint proposalId) public view returns (ProposalState) { - require(proposalCount >= proposalId && proposalId > 0, "Governor::state: invalid proposal id"); - Proposal storage proposal = proposals[proposalId]; - if (proposal.canceled) { - return ProposalState.Canceled; - } else if (block.number <= proposal.startBlock) { - return ProposalState.Pending; - } else if (block.number <= proposal.endBlock) { - return ProposalState.Active; - } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes()) { - return ProposalState.Defeated; - } else if (proposal.eta == 0) { - return ProposalState.Succeeded; - } else if (proposal.executed) { - return ProposalState.Executed; - } else if (block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD())) { - return ProposalState.Expired; - } else { - return ProposalState.Queued; - } - } - - function castVote(uint proposalId, bool support, uint96 votes) public { - return _castVote(msg.sender, proposalId, support, votes); - } - - function castVoteBySig(uint proposalId, bool support, uint8 v, bytes32 r, bytes32 s, uint96 votes) public { - bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); - bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support)); - bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); - address signatory = ecrecover(digest, v, r, s); - require(signatory != address(0), "Governor::castVoteBySig: invalid signature"); - return _castVote(signatory, proposalId, support, votes); - } - - function _castVote(address voter, uint proposalId, bool support, uint96 votes) internal { - require(state(proposalId) == ProposalState.Active, "Governor::_castVote: voting is closed"); - Proposal storage proposal = proposals[proposalId]; - Receipt storage receipt = proposal.receipts[voter]; - require(receipt.hasVoted == false, "Governor::_castVote: voter already voted"); - require(votes > 0, "Governor::_castVote: no eligible votes prior to proposal start block"); - uint96 eligibleVotes = dclm8.getPriorVotes(voter, proposal.startBlock) - receipt.votes; - require(votes <= eligibleVotes, "Governor::_castVote: votes exceeds eligible amount"); - - uint96 quadraticVote = uint96(sqrt(votes)); - - if (support) { - proposal.forVotes = add256(proposal.forVotes, quadraticVote); - } else { - proposal.againstVotes = add256(proposal.againstVotes, quadraticVote); - } - - // burn used dCLM8 tokens - dclm8._burn(voter, votes); - - receipt.hasVoted = true; - receipt.support = support; - receipt.votes = quadraticVote; - - emit VoteCast(voter, proposalId, support, quadraticVote); - } - - function __acceptAdmin() public { - require(msg.sender == guardian, "Governor::__acceptAdmin: sender must be gov guardian"); - timelock.acceptAdmin(); - } - - function __abdicate() public { - require(msg.sender == guardian, "Governor::__abdicate: sender must be gov guardian"); - guardian = address(0); - } - - function __queueSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { - require(msg.sender == guardian, "Governor::__queueSetTimelockPendingAdmin: sender must be gov guardian"); - timelock.queueTransaction(address(timelock), 0, "setPendingAdmin(address)", abi.encode(newPendingAdmin), eta); - } - - function __executeSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { - require(msg.sender == guardian, "Governor::__executeSetTimelockPendingAdmin: sender must be gov guardian"); - timelock.executeTransaction(address(timelock), 0, "setPendingAdmin(address)", abi.encode(newPendingAdmin), eta); - } - - function add256(uint256 a, uint256 b) internal pure returns (uint) { - uint c = a + b; - require(c >= a, "addition overflow"); - return c; - } - - function sub256(uint256 a, uint256 b) internal pure returns (uint) { - require(b <= a, "subtraction underflow"); - return a - b; - } - - function div256(uint256 a, uint256 b) internal pure returns (uint256) { - return _div(a, b, "division by zero"); - } - - function _div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - require(b > 0, errorMessage); - uint256 c = a / b; - return c; - } - - function sqrt(uint x) internal pure returns (uint y) { - uint z = (x + 1) / 2; - y = x; - while (z < y) { - y = z; - z = (x / z + z) / 2; - } - } - - function getChainId() internal pure returns (uint) { - uint chainId; - assembly { chainId := chainid() } - return chainId; - } -} - -interface TimelockInterface { - function delay() external view returns (uint); - function GRACE_PERIOD() external view returns (uint); - function acceptAdmin() external; - function queuedTransactions(bytes32 hash) external view returns (bool); - function queueTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external returns (bytes32); - function cancelTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external; - function executeTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external payable returns (bytes memory); -} - -interface Dclm8Interface { - function getPriorVotes(address account, uint blockNumber) external view returns (uint96); - function getTotalSupply() external pure returns (uint); - function balanceOf(address account) external view returns (uint); - function getInitialHolder() external pure returns (address); - function _burn(address account, uint96 amount) external; -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/Governance/Timelock.sol b/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/Governance/Timelock.sol deleted file mode 100644 index 9f6fad7181..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/Governance/Timelock.sol +++ /dev/null @@ -1,139 +0,0 @@ -pragma solidity ^0.7.0; -// SPDX-License-Identifier: BSD-3-Clause - -/* Copyright 2021 Compound Labs, Inc. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -3. Neither the name of the copyright holder nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -// Original work from Compound: https://github.com/compound-finance/compound-protocol/blob/9bcff34a5c9c76d51e51bcb0ca1139588362ef96/contracts/Timelock.sol -// Modified to work in the NetEmissionsTokenNetwork system - -import "@openzeppelin/contracts/math/SafeMath.sol"; - -contract Timelock { - using SafeMath for uint; - - event NewAdmin(address indexed newAdmin); - event NewPendingAdmin(address indexed newPendingAdmin); - event NewDelay(uint indexed newDelay); - event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); - event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); - event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); - - uint public constant GRACE_PERIOD = 14 days; - uint public constant MINIMUM_DELAY = 2 days; - uint public constant MAXIMUM_DELAY = 30 days; - - address public admin; - address public pendingAdmin; - uint public delay; - - mapping (bytes32 => bool) public queuedTransactions; - - - constructor(address admin_, uint delay_) { - require(delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay."); - require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); - - admin = admin_; - delay = delay_; - } - - fallback() external payable { } - - receive() external payable { } - - function setDelay(uint delay_) public { - require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock."); - require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay."); - require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); - delay = delay_; - - emit NewDelay(delay); - } - - function acceptAdmin() public { - require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin."); - admin = msg.sender; - pendingAdmin = address(0); - - emit NewAdmin(admin); - } - - function setPendingAdmin(address pendingAdmin_) public { - require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock."); - pendingAdmin = pendingAdmin_; - - emit NewPendingAdmin(pendingAdmin); - } - - function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { - require(msg.sender == admin, "Timelock::queueTransaction: Call must come from admin."); - require(eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay."); - - bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); - queuedTransactions[txHash] = true; - - emit QueueTransaction(txHash, target, value, signature, data, eta); - return txHash; - } - - function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public { - require(msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin."); - - bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); - queuedTransactions[txHash] = false; - - emit CancelTransaction(txHash, target, value, signature, data, eta); - } - - function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) { - require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin."); - - bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); - require(queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued."); - require(getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock."); - require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), "Timelock::executeTransaction: Transaction is stale."); - - queuedTransactions[txHash] = false; - - bytes memory callData; - - if (bytes(signature).length == 0) { - callData = data; - } else { - callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data); - } - - (bool success, bytes memory returnData) = target.call{value:value}(callData); - require(success, "Timelock::executeTransaction: Transaction execution reverted."); - - emit ExecuteTransaction(txHash, target, value, signature, data, eta); - - return returnData; - } - - function getBlockTimestamp() internal view returns (uint) { - // solium-disable-next-line security/no-block-members - return block.timestamp; - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol b/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol deleted file mode 100644 index 9db795b637..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol +++ /dev/null @@ -1,643 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -pragma solidity ^0.7.0; -pragma experimental ABIEncoderV2; - -import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; -import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; -import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; -import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; -import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; - -contract NetEmissionsTokenNetwork is Initializable, ERC1155Upgradeable, AccessControlUpgradeable { - - using SafeMathUpgradeable for uint256; - using CountersUpgradeable for CountersUpgradeable.Counter; - - bool public limitedMode; // disables some features like arbitrary token transfers and issuing without proposals - address public admin; // address that has permission to register dealers, transfer in limitedMode, etc. - address private timelock; // DAO contract that executes proposals to issue tokens after a successful vote - - // Generic dealer role for registering/unregistering consumers - bytes32 public constant REGISTERED_DEALER = - keccak256("REGISTERED_DEALER"); - // Token type specific roles - bytes32 public constant REGISTERED_REC_DEALER = - keccak256("REGISTERED_REC_DEALER"); - bytes32 public constant REGISTERED_OFFSET_DEALER = - keccak256("REGISTERED_OFFSET_DEALER"); - bytes32 public constant REGISTERED_EMISSIONS_AUDITOR = - keccak256("REGISTERED_EMISSIONS_AUDITOR"); - // Consumer role - bytes32 public constant REGISTERED_CONSUMER = - keccak256("REGISTERED_CONSUMER"); - - /** - * @dev Structure of all tokens issued in this contract - * tokenId - Auto-increments whenever new tokens are issued - * tokenTypeId - Corresponds to the three token types: - * 1 => Renewable Energy Certificate - * 2 => Carbon Emissions Offset - * 3 => Audited Emissions - * issuer - Address of dealer issuing this token - * issuee - Address of original issued recipient this token - * fromDate - Unix timestamp - * thruDate - Unix timestamp - * dateCreated - Unix timestamp - * automaticRetireDate - Unix timestamp - */ - struct CarbonTokenDetails { - uint256 tokenId; - uint8 tokenTypeId; - address issuer; - address issuee; - uint256 fromDate; - uint256 thruDate; - uint256 dateCreated; - uint256 automaticRetireDate; - string metadata; - string manifest; - string description; - } - - // Counts number of unique token IDs (auto-incrementing) - CountersUpgradeable.Counter private _numOfUniqueTokens; - - // Token metadata and retired balances - mapping(uint256 => CarbonTokenDetails) private _tokenDetails; - mapping(uint256 => mapping(address => uint256)) private _retiredBalances; - - // Events - event TokenCreated( - uint256 availableBalance, - uint256 retiredBalance, - uint256 tokenId, - uint8 tokenTypeId, - address indexed issuer, - address indexed issuee, - uint256 fromDate, - uint256 thruDate, - uint256 dateCreated, - uint256 automaticRetireDate, - string metadata, - string manifest, - string description - ); - event TokenRetired( - address indexed account, - uint256 tokenId, - uint256 amount - ); - event RegisteredConsumer(address indexed account); - event UnregisteredConsumer(address indexed account); - event RegisteredDealer(address indexed account); - event UnregisteredDealer(address indexed account); - - // Replaces constructor in OpenZeppelin Upgrades - function initialize(address _admin) public initializer { - - __ERC1155_init(""); - - // Allow dealers to register consumers - _setRoleAdmin(REGISTERED_CONSUMER, REGISTERED_DEALER); - - // Set-up admin - _setupRole(DEFAULT_ADMIN_ROLE, _admin); - _setupRole(REGISTERED_DEALER, _admin); - _setupRole(REGISTERED_REC_DEALER, _admin); - _setupRole(REGISTERED_OFFSET_DEALER, _admin); - _setupRole(REGISTERED_EMISSIONS_AUDITOR, _admin); - admin = _admin; - - // initialize - timelock = address(0); - - limitedMode = false; - } - - modifier consumerOrDealer() { - bool isConsumer = hasRole(REGISTERED_CONSUMER, msg.sender); - bool isRecDealer = hasRole(REGISTERED_REC_DEALER, msg.sender); - bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, msg.sender); - bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, msg.sender); - - require( - isConsumer || isRecDealer || isCeoDealer || isAeDealer, - "CLM8::consumerOrDealer: msg.sender not a consumer or a dealer" - ); - - _; - } - - modifier onlyDealer() { - bool isRecDealer = hasRole(REGISTERED_REC_DEALER, msg.sender); - bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, msg.sender); - bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, msg.sender); - - require( - isRecDealer || isCeoDealer || isAeDealer, - "CLM8::onlyDealer: msg.sender not a dealer" - ); - _; - } - - modifier onlyAdmin() { - require( - hasRole(DEFAULT_ADMIN_ROLE, msg.sender), - "CLM8::onlyAdmin: msg.sender not the admin" - ); - _; - } - - /** - * @dev returns true if the tokenId exists - */ - function tokenExists(uint256 tokenId) private view returns (bool) { - if (_numOfUniqueTokens.current() >= tokenId) return true; - return false; // no matching tokenId - } - - /** - * @dev returns true if the tokenTypeId is valid - */ - function tokenTypeIdIsValid(uint8 tokenTypeId) pure private returns (bool) { - if ((tokenTypeId > 0) && (tokenTypeId <= 3)) { - return true; - } - return false; // no matching tokenId - } - - /** - * @dev returns number of unique tokens - */ - function getNumOfUniqueTokens() public view returns (uint256) { - return _numOfUniqueTokens.current(); - } - - /** - * @dev hook to prevent transfers from non-admin account if limitedMode is on - */ - function _beforeTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) - internal - virtual - override - { - super._beforeTokenTransfer(operator, from, to, ids, amounts, data); - - for (uint i = 0; i < ids.length; i++) { - - CarbonTokenDetails storage token = _tokenDetails[ids[i]]; - - // disable most transfers if limitedMode is on - if (limitedMode) { - - // allow retiring/burning one's tokens - if (to == address(0)) { - continue; - } - - // for tokenType 1 and 2, only the timelock and DAO can transfer/issue - // for tokenType 3, only emissions auditors can transfer/issue - // (and they are automatically retired right after) - if (token.tokenTypeId != 3) { - require( - operator == timelock || hasRole(DEFAULT_ADMIN_ROLE, operator), - "CLM8::_beforeTokenTransfer(limited): only admin and DAO can transfer tokens" - ); - } else { - require( - hasRole(REGISTERED_EMISSIONS_AUDITOR, operator), - "CLM8::_beforeTokenTransfer(limited): only emissions auditors can issue audited emissions" - ); - } - } - } - } - - /** - * @dev External function to mint an amount of a token - * Only authorized dealer of associated token type can call this function - * @param quantity of the token to mint For ex: if one needs 100 full tokens, the caller - * should set the amount as (100 * 10^4) = 1,000,000 (assuming the token's decimals is set to 4) - */ - function issue( - address issuee, - uint8 tokenTypeId, - uint256 quantity, - uint256 fromDate, - uint256 thruDate, - uint256 automaticRetireDate, - string memory metadata, - string memory manifest, - string memory description - ) public onlyDealer { - return _issue( - issuee, - msg.sender, - tokenTypeId, - quantity, - fromDate, - thruDate, - automaticRetireDate, - metadata, - manifest, - description - ); - } - - /** - * @dev Issue function for DAO (on limited mode) or admin to manually pass issuer - * Must be called from Timelock contract through a successful proposal - * or by admin if limited mode is set to false - */ - function issueOnBehalf( - address issuee, - address issuer, - uint8 tokenTypeId, - uint256 quantity, - uint256 fromDate, - uint256 thruDate, - uint256 automaticRetireDate, - string memory metadata, - string memory manifest, - string memory description - ) public { - - require( - (msg.sender == timelock) || hasRole(DEFAULT_ADMIN_ROLE, msg.sender), - "CLM8::issueOnBehalf: call must come from DAO or admin" - ); - - return _issue( - issuee, - issuer, - tokenTypeId, - quantity, - fromDate, - thruDate, - automaticRetireDate, - metadata, - manifest, - description - ); - } - - function _issue( - address _issuee, - address _issuer, - uint8 _tokenTypeId, - uint256 _quantity, - uint256 _fromDate, - uint256 _thruDate, - uint256 _automaticRetireDate, - string memory _metadata, - string memory _manifest, - string memory _description - ) internal { - - require( - tokenTypeIdIsValid(_tokenTypeId), - "CLM8::_issue: tokenTypeId is invalid" - ); - - if (limitedMode) { - if (_tokenTypeId == 1 || _tokenTypeId == 2 ) { - require( - msg.sender == timelock, - "CLM8::_issue(limited): msg.sender not timelock" - ); - require( - hasRole(DEFAULT_ADMIN_ROLE, _issuee), - "CLM8::_issue(limited): issuee not admin" - ); - require( - hasRole(REGISTERED_REC_DEALER, _issuer) || hasRole(REGISTERED_OFFSET_DEALER, _issuer), - "CLM8::_issue(limited): proposer not a registered dealer" - ); - } else if (_tokenTypeId == 3) { - require( - hasRole(REGISTERED_EMISSIONS_AUDITOR, _issuer), - "CLM8::_issue(limited): issuer not a registered emissions auditor" - ); - } - } else { - if (_tokenTypeId == 1) { - require( - hasRole(REGISTERED_REC_DEALER, _issuer), - "CLM8::_issue: issuer not a registered REC dealer" - ); - } else if (_tokenTypeId == 2) { - require( - hasRole(REGISTERED_OFFSET_DEALER, _issuer), - "CLM8::_issue: issuer not a registered offset dealer" - ); - } else if (_tokenTypeId == 3) { - require( - hasRole(REGISTERED_EMISSIONS_AUDITOR, _issuer), - "CLM8::_issue: issuer not a registered emissions auditor" - ); - } - } - - // increment token identifier - _numOfUniqueTokens.increment(); - - // create token details - CarbonTokenDetails storage tokenInfo = _tokenDetails[_numOfUniqueTokens.current()]; - - tokenInfo.tokenId = _numOfUniqueTokens.current(); - tokenInfo.tokenTypeId = _tokenTypeId; - tokenInfo.issuee = _issuee; - tokenInfo.issuer = _issuer; - tokenInfo.fromDate = _fromDate; - tokenInfo.thruDate = _thruDate; - tokenInfo.automaticRetireDate = _automaticRetireDate; - tokenInfo.dateCreated = block.timestamp; - tokenInfo.metadata = _metadata; - tokenInfo.manifest = _manifest; - tokenInfo.description = _description; - - super._mint(_issuee, _numOfUniqueTokens.current(), _quantity, ""); - - // retire audited emissions on mint - if (_tokenTypeId == 3) { - super._burn(tokenInfo.issuee, tokenInfo.tokenId, _quantity); - _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee] = _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee].add(_quantity); - } - - // emit event with all token details and balances - emit TokenCreated( - _quantity, - _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee], - tokenInfo.tokenId, - tokenInfo.tokenTypeId, - tokenInfo.issuer, - tokenInfo.issuee, - tokenInfo.fromDate, - tokenInfo.thruDate, - tokenInfo.automaticRetireDate, - tokenInfo.dateCreated, - tokenInfo.metadata, - tokenInfo.manifest, - tokenInfo.description - ); - } - - /** - * @dev mints more of an existing token - * @param to reciepient of token - * @param tokenId token to mint more of - * @param quantity amount to mint - */ - function mint(address to, uint256 tokenId, uint256 quantity) - external - onlyAdmin - { - require(tokenExists(tokenId), "CLM8::mint: tokenId does not exist"); - require(!limitedMode, "CLM8::mint: cannot mint new tokens in limited mode"); - super._mint(to, tokenId, quantity, ""); - } - - /** - * @dev returns the token name for the given token as a string value - * @param tokenId token to check - */ - function getTokenType(uint256 tokenId) - external - view - returns (string memory) - { - require(tokenExists(tokenId), "CLM8::getTokenType: tokenId does not exist"); - CarbonTokenDetails storage token = _tokenDetails[tokenId]; - - if (token.tokenTypeId == 1) { - return "Renewable Energy Certificate"; - } else if (token.tokenTypeId == 2) { - return "Carbon Emissions Offset"; - } - return "Audited Emissions"; - - } - - /** - * @dev returns the retired amount on a token - * @param tokenId token to check - */ - function getTokenRetiredAmount(address account, uint256 tokenId) - public - view - returns (uint256) - { - require(tokenExists(tokenId), "CLM8::getTokenRetiredAmount: tokenId does not exist"); - uint256 amount = _retiredBalances[tokenId][account]; - return amount; - } - - /** - * @dev sets the token to the retire state to disable transfers, mints and burns - * @param tokenId token to set in pause state - * Only contract owner can pause or resume tokens - */ - function retire( - uint256 tokenId, - uint256 amount - ) external consumerOrDealer { - require(tokenExists(tokenId), "CLM8::retire: tokenId does not exist"); - require( (amount <= super.balanceOf(msg.sender, tokenId)), "CLM8::retire: not enough available balance to retire" ); - - super._burn(msg.sender, tokenId, amount); - _retiredBalances[tokenId][msg.sender] = _retiredBalances[tokenId][msg.sender].add(amount); - emit TokenRetired( - msg.sender, - tokenId, - amount - ); - } - - /** - * @dev returns true if Dealer's account is registered - * @param account address of the dealer - */ - function isDealerRegistered(address account) public view returns (bool) { - bool isRecDealer = hasRole(REGISTERED_REC_DEALER, account); - bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, account); - bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, account); - if (isRecDealer || isCeoDealer || isAeDealer) return true; - return false; - } - - /** - * @dev returns true if Consumers's account is registered - * @param account address of the dealer - */ - function isConsumerRegistered(address account) public view returns (bool) { - return hasRole(REGISTERED_CONSUMER, account); - } - - /** - * @dev returns true if Consumers's or Dealer's account is registered - * @param account address of the consumer/dealer - */ - function isDealerOrConsumer(address account) private view returns (bool) { - return (isDealerRegistered(account) || isConsumerRegistered(account)); - } - - /** - * @dev Helper function for returning tuple of bools of role membership - * @param account address to check roles - */ - function getRoles(address account) external view returns (bool, bool, bool, bool, bool) { - bool isAdmin = hasRole(DEFAULT_ADMIN_ROLE, account); - bool isRecDealer = hasRole(REGISTERED_REC_DEALER, account); - bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, account); - bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, account); - bool isConsumer = hasRole(REGISTERED_CONSUMER, account); - return (isAdmin, isRecDealer, isCeoDealer, isAeDealer, isConsumer); - } - - /** - * @dev Only contract owner can register Dealers - * @param account address of the dealer to register - * Only registered Dealers can transfer tokens - */ - function registerDealer(address account, uint8 tokenTypeId) - external - onlyAdmin - { - require(tokenTypeIdIsValid(tokenTypeId), "CLM8::registerDealer: tokenTypeId does not exist"); - if (tokenTypeId == 1) { - grantRole(REGISTERED_REC_DEALER, account); - } else if (tokenTypeId == 2) { - grantRole(REGISTERED_OFFSET_DEALER, account); - } else { - grantRole(REGISTERED_EMISSIONS_AUDITOR, account); - } - // Also grant generic dealer role for registering/unregistering consumers - grantRole(REGISTERED_DEALER, account); - emit RegisteredDealer(account); - } - - /** - * @dev returns true if Consumer's account is registered for the given token - * @param account address of the consumer - */ - function registerConsumer(address account) external onlyDealer { - if (limitedMode) { - require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "CLM8::registerConsumer(limited): only admin can register consumers"); - } - grantRole(REGISTERED_CONSUMER, account); - emit RegisteredConsumer(account); - } - - /** - * @dev Only contract owner can unregister Dealers - * @param account address to be unregistered - */ - function unregisterDealer(address account, uint8 tokenTypeId) - external - onlyAdmin - { - require(tokenTypeIdIsValid(tokenTypeId), "CLM8::unregisterDealer: tokenTypeId does not exist"); - if (tokenTypeId == 1) { - super.revokeRole(REGISTERED_REC_DEALER, account); - } else if (tokenTypeId == 2) { - super.revokeRole(REGISTERED_OFFSET_DEALER, account); - } else { - super.revokeRole(REGISTERED_EMISSIONS_AUDITOR, account); - } - - // If no longer a dealer of any token type, remove generic dealer role - if (!isDealerRegistered(account)) { - revokeRole(REGISTERED_DEALER, account); - } - - emit UnregisteredDealer(account); - } - - /** - * @dev Only contract owner can unregister Consumers - * @param account address to be unregistered - */ - function unregisterConsumer(address account) external onlyDealer { - if (limitedMode) { - require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "CLM8::unregisterConsumer(limited): only admin can unregister consumers"); - } - super.revokeRole(REGISTERED_CONSUMER, account); - emit UnregisteredConsumer(account); - } - - /** - * @dev transfers the value to the 'to' account for tokenId - * @param to recipient address - * @param tokenId tokenId for the transfer - * @param value amount of transfer - * Transfer can start only when both parties are registered and the token is not paused - * Note: Token holders can arbitrarily call safeTransferFrom() without these checks - */ - function transfer( - address to, - uint256 tokenId, - uint256 value - ) external consumerOrDealer { - require(tokenExists(tokenId), "CLM8::transfer: tokenId does not exist"); - require((msg.sender != to), "CLM8::transfer: sender and receiver cannot be the same"); - super.safeTransferFrom(msg.sender, to, tokenId, value, "0x00"); - } - - function setTimelock( - address _timelock - ) external onlyAdmin { - timelock = _timelock; - } - - function getAvailableAndRetired(address account, uint256 tokenId) - external - view - returns (uint256, uint256) - { - uint256 available = super.balanceOf(account, tokenId); - uint256 retired = this.getTokenRetiredAmount(account, tokenId); - return (available, retired); - } - - /** - * @dev returns issuer of a given tokenId - */ - function getIssuer(uint256 tokenId) - external - view - returns (address) - { - return _tokenDetails[tokenId].issuer; - } - - /** - * @dev returns the details of a given tokenId, omitting holders - * @param tokenId token to check - */ - function getTokenDetails(uint256 tokenId) - external - view - returns (CarbonTokenDetails memory) - { - return _tokenDetails[tokenId]; - } - - /** - * @dev turns off or on limited mode - * @param _limitedMode boolean value - */ - function setLimitedMode(bool _limitedMode) - external - onlyAdmin - { - limitedMode = _limitedMode; - } - -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol b/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol deleted file mode 100644 index 5428baf207..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetworkV2.sol +++ /dev/null @@ -1,648 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -pragma solidity ^0.7.0; -pragma experimental ABIEncoderV2; - -import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; -import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; -import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; -import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; -import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; - -// V2 example file for testing upgrades -// This is NOT up to date or a real upgrade of NetEmissionsTokenNetwork.sol - -contract NetEmissionsTokenNetworkV2 is Initializable, ERC1155Upgradeable, AccessControlUpgradeable { - - using SafeMathUpgradeable for uint256; - using CountersUpgradeable for CountersUpgradeable.Counter; - - bool public limitedMode; // disables some features like arbitrary token transfers and issuing without proposals - address public admin; // address that has permission to register dealers, transfer in limitedMode, etc. - address private timelock; // DAO contract that executes proposals to issue tokens after a successful vote - - // Generic dealer role for registering/unregistering consumers - bytes32 public constant REGISTERED_DEALER = - keccak256("REGISTERED_DEALER"); - // Token type specific roles - bytes32 public constant REGISTERED_REC_DEALER = - keccak256("REGISTERED_REC_DEALER"); - bytes32 public constant REGISTERED_OFFSET_DEALER = - keccak256("REGISTERED_OFFSET_DEALER"); - bytes32 public constant REGISTERED_EMISSIONS_AUDITOR = - keccak256("REGISTERED_EMISSIONS_AUDITOR"); - // Consumer role - bytes32 public constant REGISTERED_CONSUMER = - keccak256("REGISTERED_CONSUMER"); - - /** - * @dev Structure of all tokens issued in this contract - * tokenId - Auto-increments whenever new tokens are issued - * tokenTypeId - Corresponds to the three token types: - * 1 => Renewable Energy Certificate - * 2 => Carbon Emissions Offset - * 3 => Audited Emissions - * issuer - Address of dealer issuing this token - * issuee - Address of original issued recipient this token - * fromDate - Unix timestamp - * thruDate - Unix timestamp - * dateCreated - Unix timestamp - * automaticRetireDate - Unix timestamp - */ - struct CarbonTokenDetails { - uint256 tokenId; - uint8 tokenTypeId; - address issuer; - address issuee; - uint256 fromDate; - uint256 thruDate; - uint256 dateCreated; - uint256 automaticRetireDate; - string metadata; - string manifest; - string description; - } - - // Counts number of unique token IDs (auto-incrementing) - CountersUpgradeable.Counter private _numOfUniqueTokens; - - // Token metadata and retired balances - mapping(uint256 => CarbonTokenDetails) private _tokenDetails; - mapping(uint256 => mapping(address => uint256)) private _retiredBalances; - - address private newTestVariable; - - // Events - event TokenCreated( - uint256 availableBalance, - uint256 retiredBalance, - uint256 tokenId, - uint8 tokenTypeId, - address indexed issuer, - address indexed issuee, - uint256 fromDate, - uint256 thruDate, - uint256 dateCreated, - uint256 automaticRetireDate, - string metadata, - string manifest, - string description - ); - event TokenRetired( - address indexed account, - uint256 tokenId, - uint256 amount - ); - event RegisteredConsumer(address indexed account); - event UnregisteredConsumer(address indexed account); - event RegisteredDealer(address indexed account); - event UnregisteredDealer(address indexed account); - - // Replaces constructor in OpenZeppelin Upgrades - function initialize(address _admin) public initializer { - - __ERC1155_init(""); - - // Allow dealers to register consumers - _setRoleAdmin(REGISTERED_CONSUMER, REGISTERED_DEALER); - - // Set-up admin - _setupRole(DEFAULT_ADMIN_ROLE, _admin); - _setupRole(REGISTERED_DEALER, _admin); - _setupRole(REGISTERED_REC_DEALER, _admin); - _setupRole(REGISTERED_OFFSET_DEALER, _admin); - _setupRole(REGISTERED_EMISSIONS_AUDITOR, _admin); - admin = _admin; - - // initialize - timelock = address(0); - - limitedMode = false; - } - - modifier consumerOrDealer() { - bool isConsumer = hasRole(REGISTERED_CONSUMER, msg.sender); - bool isRecDealer = hasRole(REGISTERED_REC_DEALER, msg.sender); - bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, msg.sender); - bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, msg.sender); - - require( - isConsumer || isRecDealer || isCeoDealer || isAeDealer, - "CLM8::consumerOrDealer: msg.sender not a consumer or a dealer" - ); - - _; - } - - modifier onlyDealer() { - bool isRecDealer = hasRole(REGISTERED_REC_DEALER, msg.sender); - bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, msg.sender); - bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, msg.sender); - - require( - isRecDealer || isCeoDealer || isAeDealer, - "CLM8::onlyDealer: msg.sender not a dealer" - ); - _; - } - - modifier onlyAdmin() { - require( - hasRole(DEFAULT_ADMIN_ROLE, msg.sender), - "CLM8::onlyAdmin: msg.sender not the admin" - ); - _; - } - - /** - * @dev returns true if the tokenId exists - */ - function tokenExists(uint256 tokenId) private view returns (bool) { - if (_numOfUniqueTokens.current() >= tokenId) return true; - return false; // no matching tokenId - } - - /** - * @dev returns true if the tokenTypeId is valid - */ - function tokenTypeIdIsValid(uint8 tokenTypeId) pure private returns (bool) { - if ((tokenTypeId > 0) && (tokenTypeId <= 3)) { - return true; - } - return false; // no matching tokenId - } - - /** - * @dev returns number of unique tokens - */ - function getNumOfUniqueTokens() public view returns (uint256) { - return _numOfUniqueTokens.current(); - } - - /** - * @dev hook to prevent transfers from non-admin account if limitedMode is on - */ - function _beforeTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) - internal - virtual - override - { - super._beforeTokenTransfer(operator, from, to, ids, amounts, data); - - for (uint i = 0; i < ids.length; i++) { - - CarbonTokenDetails storage token = _tokenDetails[ids[i]]; - - // disable most transfers if limitedMode is on - if (limitedMode) { - - // allow retiring/burning one's tokens - if (to == address(0)) { - continue; - } - - // for tokenType 1 and 2, only the timelock and DAO can transfer/issue - // for tokenType 3, only emissions auditors can transfer/issue - // (and they are automatically retired right after) - if (token.tokenTypeId != 3) { - require( - operator == timelock || hasRole(DEFAULT_ADMIN_ROLE, operator), - "CLM8::_beforeTokenTransfer(limited): only admin and DAO can transfer tokens" - ); - } else { - require( - hasRole(REGISTERED_EMISSIONS_AUDITOR, operator), - "CLM8::_beforeTokenTransfer(limited): only emissions auditors can issue audited emissions" - ); - } - } - } - } - - /** - * @dev External function to mint an amount of a token - * Only authorized dealer of associated token type can call this function - * @param quantity of the token to mint For ex: if one needs 100 full tokens, the caller - * should set the amount as (100 * 10^4) = 1,000,000 (assuming the token's decimals is set to 4) - */ - function issue( - address issuee, - uint8 tokenTypeId, - uint256 quantity, - uint256 fromDate, - uint256 thruDate, - uint256 automaticRetireDate, - string memory metadata, - string memory manifest, - string memory description - ) public onlyDealer { - return _issue( - issuee, - msg.sender, - tokenTypeId, - quantity, - fromDate, - thruDate, - automaticRetireDate, - metadata, - manifest, - description - ); - } - - /** - * @dev Issue function for DAO (on limited mode) or admin to manually pass issuer - * Must be called from Timelock contract through a successful proposal - * or by admin if limited mode is set to false - */ - function issueOnBehalf( - address issuee, - address issuer, - uint8 tokenTypeId, - uint256 quantity, - uint256 fromDate, - uint256 thruDate, - uint256 automaticRetireDate, - string memory metadata, - string memory manifest, - string memory description - ) public { - - require( - (msg.sender == timelock) || hasRole(DEFAULT_ADMIN_ROLE, msg.sender), - "CLM8::issueOnBehalf: call must come from DAO or admin" - ); - - return _issue( - issuee, - issuer, - tokenTypeId, - quantity, - fromDate, - thruDate, - automaticRetireDate, - metadata, - manifest, - description - ); - } - - function _issue( - address _issuee, - address _issuer, - uint8 _tokenTypeId, - uint256 _quantity, - uint256 _fromDate, - uint256 _thruDate, - uint256 _automaticRetireDate, - string memory _metadata, - string memory _manifest, - string memory _description - ) internal { - - require( - tokenTypeIdIsValid(_tokenTypeId), - "CLM8::_issue: tokenTypeId is invalid" - ); - - if (limitedMode) { - if (_tokenTypeId == 1 || _tokenTypeId == 2 ) { - require( - msg.sender == timelock, - "CLM8::_issue(limited): msg.sender not timelock" - ); - require( - hasRole(DEFAULT_ADMIN_ROLE, _issuee), - "CLM8::_issue(limited): issuee not admin" - ); - require( - hasRole(REGISTERED_REC_DEALER, _issuer) || hasRole(REGISTERED_OFFSET_DEALER, _issuer), - "CLM8::_issue(limited): proposer not a registered dealer" - ); - } else if (_tokenTypeId == 3) { - require( - hasRole(REGISTERED_EMISSIONS_AUDITOR, _issuer), - "CLM8::_issue(limited): issuer not a registered emissions auditor" - ); - } - } else { - if (_tokenTypeId == 1) { - require( - hasRole(REGISTERED_REC_DEALER, _issuer), - "CLM8::_issue: issuer not a registered REC dealer" - ); - } else if (_tokenTypeId == 2) { - require( - hasRole(REGISTERED_OFFSET_DEALER, _issuer), - "CLM8::_issue: issuer not a registered offset dealer" - ); - } else if (_tokenTypeId == 3) { - require( - hasRole(REGISTERED_EMISSIONS_AUDITOR, _issuer), - "CLM8::_issue: issuer not a registered emissions auditor" - ); - } - } - - // increment token identifier - _numOfUniqueTokens.increment(); - - // create token details - CarbonTokenDetails storage tokenInfo = _tokenDetails[_numOfUniqueTokens.current()]; - - tokenInfo.tokenId = _numOfUniqueTokens.current(); - tokenInfo.tokenTypeId = _tokenTypeId; - tokenInfo.issuee = _issuee; - tokenInfo.issuer = _issuer; - tokenInfo.fromDate = _fromDate; - tokenInfo.thruDate = _thruDate; - tokenInfo.automaticRetireDate = _automaticRetireDate; - tokenInfo.dateCreated = block.timestamp; - tokenInfo.metadata = _metadata; - tokenInfo.manifest = _manifest; - tokenInfo.description = _description; - - super._mint(_issuee, _numOfUniqueTokens.current(), _quantity, ""); - - // retire audited emissions on mint - if (_tokenTypeId == 3) { - super._burn(tokenInfo.issuee, tokenInfo.tokenId, _quantity); - _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee] = _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee].add(_quantity); - } - - // emit event with all token details and balances - emit TokenCreated( - _quantity, - _retiredBalances[tokenInfo.tokenId][tokenInfo.issuee], - tokenInfo.tokenId, - tokenInfo.tokenTypeId, - tokenInfo.issuer, - tokenInfo.issuee, - tokenInfo.fromDate, - tokenInfo.thruDate, - tokenInfo.automaticRetireDate, - tokenInfo.dateCreated, - tokenInfo.metadata, - tokenInfo.manifest, - tokenInfo.description - ); - } - - /** - * @dev mints more of an existing token - * @param to reciepient of token - * @param tokenId token to mint more of - * @param quantity amount to mint - */ - function mint(address to, uint256 tokenId, uint256 quantity) - external - onlyAdmin - { - require(tokenExists(tokenId), "CLM8::mint: tokenId does not exist"); - require(!limitedMode, "CLM8::mint: cannot mint new tokens in limited mode"); - super._mint(to, tokenId, quantity, ""); - } - - /** - * @dev returns the token name for the given token as a string value - * @param tokenId token to check - */ - function getTokenType(uint256 tokenId) - external - view - returns (string memory) - { - require(tokenExists(tokenId), "CLM8::getTokenType: tokenId does not exist"); - CarbonTokenDetails storage token = _tokenDetails[tokenId]; - - if (token.tokenTypeId == 1) { - return "Renewable Energy Certificate"; - } else if (token.tokenTypeId == 2) { - return "Carbon Emissions Offset"; - } - return "Audited Emissions"; - - } - - /** - * @dev returns the retired amount on a token - * @param tokenId token to check - */ - function getTokenRetiredAmount(address account, uint256 tokenId) - public - view - returns (uint256) - { - require(tokenExists(tokenId), "CLM8::getTokenRetiredAmount: tokenId does not exist"); - uint256 amount = _retiredBalances[tokenId][account]; - return amount; - } - - /** - * @dev sets the token to the retire state to disable transfers, mints and burns - * @param tokenId token to set in pause state - * Only contract owner can pause or resume tokens - */ - function retire( - uint256 tokenId, - uint256 amount - ) external consumerOrDealer { - require(tokenExists(tokenId), "CLM8::retire: tokenId does not exist"); - require( (amount <= super.balanceOf(msg.sender, tokenId)), "CLM8::retire: not enough available balance to retire" ); - - super._burn(msg.sender, tokenId, amount); - _retiredBalances[tokenId][msg.sender] = _retiredBalances[tokenId][msg.sender].add(amount); - emit TokenRetired( - msg.sender, - tokenId, - amount - ); - } - - /** - * @dev returns true if Dealer's account is registered - * @param account address of the dealer - */ - function isDealerRegistered(address account) public view returns (bool) { - bool isRecDealer = hasRole(REGISTERED_REC_DEALER, account); - bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, account); - bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, account); - if (isRecDealer || isCeoDealer || isAeDealer) return true; - return false; - } - - /** - * @dev returns true if Consumers's account is registered - * @param account address of the dealer - */ - function isConsumerRegistered(address account) public view returns (bool) { - return hasRole(REGISTERED_CONSUMER, account); - } - - /** - * @dev returns true if Consumers's or Dealer's account is registered - * @param account address of the consumer/dealer - */ - function isDealerOrConsumer(address account) private view returns (bool) { - return (isDealerRegistered(account) || isConsumerRegistered(account)); - } - - /** - * @dev Helper function for returning tuple of bools of role membership - * @param account address to check roles - */ - function getRoles(address account) external view returns (bool, bool, bool, bool, bool) { - bool isAdmin = hasRole(DEFAULT_ADMIN_ROLE, account); - bool isRecDealer = hasRole(REGISTERED_REC_DEALER, account); - bool isCeoDealer = hasRole(REGISTERED_OFFSET_DEALER, account); - bool isAeDealer = hasRole(REGISTERED_EMISSIONS_AUDITOR, account); - bool isConsumer = hasRole(REGISTERED_CONSUMER, account); - return (isAdmin, isRecDealer, isCeoDealer, isAeDealer, isConsumer); - } - - /** - * @dev Only contract owner can register Dealers - * @param account address of the dealer to register - * Only registered Dealers can transfer tokens - */ - function registerDealer(address account, uint8 tokenTypeId) - external - onlyAdmin - { - require(tokenTypeIdIsValid(tokenTypeId), "CLM8::registerDealer: tokenTypeId does not exist"); - if (tokenTypeId == 1) { - grantRole(REGISTERED_REC_DEALER, account); - } else if (tokenTypeId == 2) { - grantRole(REGISTERED_OFFSET_DEALER, account); - } else { - grantRole(REGISTERED_EMISSIONS_AUDITOR, account); - } - // Also grant generic dealer role for registering/unregistering consumers - grantRole(REGISTERED_DEALER, account); - emit RegisteredDealer(account); - } - - /** - * @dev returns true if Consumer's account is registered for the given token - * @param account address of the consumer - */ - function registerConsumer(address account) external onlyDealer { - if (limitedMode) { - require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "CLM8::registerConsumer(limited): only admin can register consumers"); - } - grantRole(REGISTERED_CONSUMER, account); - emit RegisteredConsumer(account); - } - - /** - * @dev Only contract owner can unregister Dealers - * @param account address to be unregistered - */ - function unregisterDealer(address account, uint8 tokenTypeId) - external - onlyAdmin - { - require(tokenTypeIdIsValid(tokenTypeId), "CLM8::unregisterDealer: tokenTypeId does not exist"); - if (tokenTypeId == 1) { - super.revokeRole(REGISTERED_REC_DEALER, account); - } else if (tokenTypeId == 2) { - super.revokeRole(REGISTERED_OFFSET_DEALER, account); - } else { - super.revokeRole(REGISTERED_EMISSIONS_AUDITOR, account); - } - - // If no longer a dealer of any token type, remove generic dealer role - if (!isDealerRegistered(account)) { - revokeRole(REGISTERED_DEALER, account); - } - - emit UnregisteredDealer(account); - } - - /** - * @dev Only contract owner can unregister Consumers - * @param account address to be unregistered - */ - function unregisterConsumer(address account) external onlyDealer { - if (limitedMode) { - require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "CLM8::unregisterConsumer(limited): only admin can unregister consumers"); - } - super.revokeRole(REGISTERED_CONSUMER, account); - emit UnregisteredConsumer(account); - } - - /** - * @dev transfers the value to the 'to' account for tokenId - * @param to recipient address - * @param tokenId tokenId for the transfer - * @param value amount of transfer - * Transfer can start only when both parties are registered and the token is not paused - * Note: Token holders can arbitrarily call safeTransferFrom() without these checks - */ - function transfer( - address to, - uint256 tokenId, - uint256 value - ) external consumerOrDealer { - require(tokenExists(tokenId), "CLM8::transfer: tokenId does not exist"); - require((msg.sender != to), "CLM8::transfer: sender and receiver cannot be the same"); - super.safeTransferFrom(msg.sender, to, tokenId, value, "0x00"); - } - - function setTimelock( - address _timelock - ) external onlyAdmin { - timelock = _timelock; - } - - function getAvailableAndRetired(address account, uint256 tokenId) - external - view - returns (uint256, uint256) - { - uint256 available = super.balanceOf(account, tokenId); - uint256 retired = this.getTokenRetiredAmount(account, tokenId); - return (available, retired); - } - - /** - * @dev returns issuer of a given tokenId - */ - function getIssuer(uint256 tokenId) - external - view - returns (address) - { - return _tokenDetails[tokenId].issuer; - } - - /** - * @dev returns the details of a given tokenId, omitting holders - * @param tokenId token to check - */ - function getTokenDetails(uint256 tokenId) - external - view - returns (CarbonTokenDetails memory) - { - return _tokenDetails[tokenId]; - } - - /** - * @dev turns off or on limited mode - * @param _limitedMode boolean value - */ - function setLimitedMode(bool _limitedMode) - external - onlyAdmin - { - limitedMode = _limitedMode; - } - -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app-cli.ts b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app-cli.ts deleted file mode 100755 index f9bef41a3f..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app-cli.ts +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env node - -import { ConfigService } from "@hyperledger/cactus-cmd-api-server"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { - ICarbonAccountingAppOptions, - CarbonAccountingApp, -} from "./carbon-accounting-app"; - -export async function launchApp(): Promise { - const configService = new ConfigService(); - const config = await configService.getOrCreate(); - const serverOptions = config.getProperties(); - LoggerProvider.setLogLevel(serverOptions.logLevel); - - const appOptions: ICarbonAccountingAppOptions = { - logLevel: serverOptions.logLevel, - }; - const carbonAccountingApp = new CarbonAccountingApp(appOptions); - try { - await carbonAccountingApp.start(); - } catch (ex) { - console.error(`CarbonAccountingApp crashed. Existing...`, ex); - await carbonAccountingApp?.stop(); - process.exit(-1); - } -} - -if (require.main === module) { - launchApp(); -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app.ts b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app.ts deleted file mode 100644 index 279e140b30..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app.ts +++ /dev/null @@ -1,253 +0,0 @@ -import { AddressInfo } from "net"; -import { Server } from "http"; -import { Server as SecureServer } from "https"; - -import { v4 as uuidv4 } from "uuid"; -import exitHook, { IAsyncExitHookDoneCallback } from "async-exit-hook"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; - -import { - ApiServer, - ConfigService, - Configuration, - ICactusApiServerOptions, -} from "@hyperledger/cactus-cmd-api-server"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import { - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - DefaultEventHandlerStrategy, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -import { CarbonAccountingPlugin } from "@hyperledger/cactus-example-carbon-accounting-business-logic-plugin"; - -import { - PluginLedgerConnectorXdai, - DefaultApi as XdaiApi, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-xdai"; - -import { CarbonAccountingAppDummyInfrastructure } from "./infrastructure/carbon-accounting-app-dummy-infrastructure"; - -export interface ICarbonAccountingAppOptions { - logLevel?: LogLevelDesc; - keychainId?: string; - keychain?: PluginKeychainMemory; - apiServerOptions?: ICactusApiServerOptions; - httpApi?: Server | SecureServer; - httpGui?: Server | SecureServer; - disableSignalHandlers?: true; -} - -export type ShutdownHook = () => Promise; -export class CarbonAccountingApp { - private readonly log: Logger; - private readonly shutdownHooks: ShutdownHook[]; - private readonly ledgers: CarbonAccountingAppDummyInfrastructure; - private readonly keychainId: string; - private readonly keychain: PluginKeychainMemory; - - public constructor(public readonly options: ICarbonAccountingAppOptions) { - const fnTag = "CarbonAccountingApp#constructor()"; - - if (!options) { - throw new Error(`${fnTag} options parameter is falsy`); - } - const { logLevel, keychainId } = options; - - const level = logLevel || "INFO"; - const label = "carbon-accounting-app"; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.keychainId = keychainId || uuidv4(); - - this.shutdownHooks = []; - this.keychain = - options.keychain || - new PluginKeychainMemory({ - keychainId: this.keychainId, - instanceId: uuidv4(), - logLevel: logLevel || "INFO", - }); - - this.ledgers = new CarbonAccountingAppDummyInfrastructure({ - logLevel: logLevel || "INFO", - keychain: this.keychain, - }); - } - - public async start(): Promise { - this.log.debug(`Starting Carbon Accounting App...`); - - if (!this.options.disableSignalHandlers) { - exitHook((callback: IAsyncExitHookDoneCallback) => { - this.stop().then(callback); - }); - this.log.debug(`Registered signal handlers for graceful auto-shutdown`); - } - - await this.ledgers.start(); - this.onShutdown(() => this.ledgers.stop()); - - const xdaiAccount = await this.ledgers.xdai.createEthTestAccount(); - - const sshConfig = await this.ledgers.fabric.getSshConfig(); - const connectionProfile = - await this.ledgers.fabric.getConnectionProfileOrg1(); - const enrollAdminOut = await this.ledgers.fabric.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await this.ledgers.fabric.enrollUser(adminWallet); - const keychainEntryKey = "fabric_user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - await this.keychain.set(keychainEntryKey, keychainEntryValue); - - let httpApi; - if (this.options.httpApi) { - httpApi = this.options.httpApi; - } else { - httpApi = await Servers.startOnPort(4000, "0.0.0.0"); - } - - let httpGui; - if (this.options.httpGui) { - httpGui = this.options.httpGui; - } else { - httpGui = await Servers.startOnPort(3000, "0.0.0.0"); - } - - const addressInfo = httpApi.address() as AddressInfo; - const nodeApiHost = `http://127.0.0.1:${addressInfo.port}`; - - const config = new Configuration({ basePath: nodeApiHost }); - - const xdaiApiClient = new XdaiApi(config); - const fabricApiClient = new FabricApi(config); - - this.log.info(`Configuring Cactus Node for Ledger A...`); - const rpcApiHostA = await this.ledgers.xdai.getRpcApiHttpHost(); - - await this.keychain.set(xdaiAccount.address, xdaiAccount.privateKey); - - const pluginRegistry = new PluginRegistry({ plugins: [this.keychain] }); - - const fabricPlugin = new PluginLedgerConnectorFabric({ - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry: pluginRegistry, - cliContainerEnv: this.ledgers.org1Env, - sshConfig, - connectionProfile, - logLevel: this.options.logLevel || "INFO", - discoveryOptions: { - enabled: true, - asLocalhost: true, - }, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }); - - const xdaiPlugin = new PluginLedgerConnectorXdai({ - instanceId: "PluginLedgerConnectorBesu_A", - rpcApiHttpHost: rpcApiHostA, - pluginRegistry: pluginRegistry, - logLevel: this.options.logLevel || "INFO", - }); - - const xdaiContracts = await this.ledgers.deployXdaiContracts( - xdaiPlugin, - this.keychain, - ); - - const fabricContracts = await this.ledgers.deployFabricContracts( - this.keychain, - fabricPlugin, - ); - - const businessLogicPlugin = new CarbonAccountingPlugin({ - logLevel: this.options.logLevel || "INFO", - xdaiContracts, - fabricContracts, - fabricPlugin, - pluginRegistry, - keychainId: this.keychainId, - instanceId: uuidv4(), - xdaiApiClient, - fabricApiClient, - web3SigningCredential: { - keychainEntryKey: xdaiAccount.address, - keychainId: this.keychainId, - type: Web3SigningCredentialType.CactusKeychainRef, - }, - }); - - pluginRegistry.add(xdaiPlugin); - pluginRegistry.add(fabricPlugin); - pluginRegistry.add(businessLogicPlugin); - - await this.startNode(httpApi, httpGui, pluginRegistry); - } - - public async stop(): Promise { - for (const hook of this.shutdownHooks) { - await hook(); // FIXME add timeout here so that shutdown does not hang - } - } - - public onShutdown(hook: ShutdownHook): void { - this.shutdownHooks.push(hook); - } - - public async startNode( - httpServerApi: Server, - httpServerCockpit: Server, - pluginRegistry: PluginRegistry, - ): Promise { - const addressInfoApi = httpServerApi.address() as AddressInfo; - const addressInfoCockpit = httpServerCockpit.address() as AddressInfo; - - let config; - if (this.options.apiServerOptions) { - config = this.options.apiServerOptions; - } else { - const configService = new ConfigService(); - const convictConfig = await configService.getOrCreate(); - config = convictConfig.getProperties(); - config.plugins = []; - config.configFile = ""; - config.apiPort = addressInfoApi.port; - config.apiHost = addressInfoApi.address; - config.cockpitHost = addressInfoCockpit.address; - config.cockpitPort = addressInfoCockpit.port; - config.grpcPort = 0; // TODO - make this configurable as well - config.logLevel = this.options.logLevel || "INFO"; - config.crpcPort = 0; - } - - const apiServer = new ApiServer({ - config, - httpServerApi, - httpServerCockpit, - pluginRegistry, - }); - - this.onShutdown(() => apiServer.shutdown()); - - await apiServer.start(); - - return apiServer; - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.ts b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.web.ts b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/infrastructure/carbon-accounting-app-dummy-infrastructure.ts b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/infrastructure/carbon-accounting-app-dummy-infrastructure.ts deleted file mode 100644 index 4a3caafa64..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/infrastructure/carbon-accounting-app-dummy-infrastructure.ts +++ /dev/null @@ -1,511 +0,0 @@ -import path from "path"; -import fs from "fs-extra"; -import { Optional } from "typescript-optional"; -import { Account } from "web3-core"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - PluginLedgerConnectorXdai, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-xdai"; -import { - FabricTestLedgerV1, - OpenEthereumTestLedger, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import DaoTokenContract from "../../json/generated/src/main/solidity/net-emissions-token-network/Governance/DAOToken.sol/DAOToken.json"; -import GovernorContract from "../../json/generated/src/main/solidity/net-emissions-token-network/Governance/Governor.sol/Governor.json"; -import TimelockContract from "../../json/generated/src/main/solidity/net-emissions-token-network/Governance/Timelock.sol/Timelock.json"; -import NetEmissionsTokenNetworkContract from "../../json/generated/src/main/solidity/net-emissions-token-network/NetEmissionsTokenNetwork.sol/NetEmissionsTokenNetwork.json"; -import { - ChainCodeProgrammingLanguage, - DeploymentTargetOrgFabric2x, - FileBase64, - PluginLedgerConnectorFabric, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { - ICarbonAccountingFabricContractDeploymentInfo, - ICarbonAccountingXdaiContractDeploymentInfo, -} from "@hyperledger/cactus-example-carbon-accounting-business-logic-plugin"; - -export interface ICarbonAccountingAppDummyInfrastructureOptions { - logLevel?: LogLevelDesc; - keychain: PluginKeychainMemory; -} - -/** - * Contains code that is meant to simulate parts of a production grade deployment - * that would otherwise not be part of the application itself. - * - * The reason for this being in existence is so that we can have tutorials that - * are self-contained instead of starting with a multi-hour setup process where - * the user is expected to set up ledgers from scratch with all the bells and - * whistles. - * The sole purpose of this is to have people ramp up with Cactus as fast as - * possible. - */ -export class CarbonAccountingAppDummyInfrastructure { - public static readonly CLASS_NAME = "CarbonAccountingAppDummyInfrastructure"; - // TODO: Move this to the FabricTestLedger class where it belongs. - public static readonly FABRIC_2_AIO_CLI_CFG_DIR = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - public readonly xdai: OpenEthereumTestLedger; - public readonly fabric: FabricTestLedgerV1; - private readonly log: Logger; - private readonly keychain: PluginKeychainMemory; - private _xdaiAccount: Account | undefined; - - public get xdaiAccount(): Optional { - return Optional.ofNullable(this._xdaiAccount); - } - - public get className(): string { - return CarbonAccountingAppDummyInfrastructure.CLASS_NAME; - } - - public get orgCfgDir(): string { - return CarbonAccountingAppDummyInfrastructure.FABRIC_2_AIO_CLI_CFG_DIR; - } - - public get org1Env(): NodeJS.ProcessEnv & DeploymentTargetOrgFabric2x { - return { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${this.orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${this.orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${this.orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${this.orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - } - - public get org2Env(): NodeJS.ProcessEnv & DeploymentTargetOrgFabric2x { - const orgCfgDir = - CarbonAccountingAppDummyInfrastructure.FABRIC_2_AIO_CLI_CFG_DIR; - - return { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - } - - constructor( - public readonly options: ICarbonAccountingAppDummyInfrastructureOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.keychain, `${fnTag} arg options,keychain`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.keychain = options.keychain; - this.xdai = new OpenEthereumTestLedger({ - logLevel: this.options.logLevel || "INFO", - }); - this.fabric = new FabricTestLedgerV1({ - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), - logLevel: this.options.logLevel || "INFO", - }); - } - - public async stop(): Promise { - try { - this.log.info(`Stopping...`); - await Promise.all([ - this.xdai.stop().then(() => this.xdai.destroy()), - this.fabric.stop().then(() => this.fabric.destroy()), - ]); - this.log.info(`Stopped OK`); - } catch (ex) { - this.log.error(`Stopping crashed: `, ex); - throw ex; - } - } - - public async start(): Promise { - try { - this.log.info(`Starting dummy infrastructure...`); - await Promise.all([this.xdai.start(), this.fabric.start()]); - this.log.info(`Started dummy infrastructure OK`); - } catch (ex) { - this.log.error(`Starting of dummy infrastructure crashed: `, ex); - throw ex; - } - } - - public async deployFabricContracts( - keychainPlugin: PluginKeychainMemory, - fabricPlugin: PluginLedgerConnectorFabric, - ): Promise { - try { - this.log.info(`Deploying smart contracts...`); - - const ccVersion = "1.0.0"; - const ccName = "utility-emissions-channel"; - const ccLabel = `${ccName}_${ccVersion}`; - const channelId = "mychannel"; - - const contractRelPath = "../../../utility-emissions-channel/typescript/"; - this.log.debug("__dirname: %o", __dirname); - this.log.debug("contractRelPath: %o", contractRelPath); - const contractDir = path.join(__dirname, contractRelPath); - this.log.debug("contractDir: %o", contractDir); - - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = - // "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // . - // ├── Dockerfile - // ├── package.json - // ├── src - // │ ├── index.ts - // │ ├── lib - // │ │ ├── emissions-calc.ts - // │ │ ├── emissionsRecordContract.ts - // │ │ ├── emissions.ts - // │ │ ├── utilityEmissionsFactor.ts - // │ │ └── utilityLookupItem.ts - // │ └── util - // │ ├── const.ts - // │ ├── state.ts - // │ ├── util.ts - // │ └── worldstate.ts - // ├── test - // │ └── lib - // └── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./worldstate.ts"; - const relativePath = "./src/util/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./util.ts"; - const relativePath = "./src/util/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./state.ts"; - const relativePath = "./src/util/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./const.ts"; - const relativePath = "./src/util/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./utilityLookupItem.ts"; - const relativePath = "./src/lib/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./utilityEmissionsFactor.ts"; - const relativePath = "./src/lib/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./emissions.ts"; - const relativePath = "./src/lib/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./emissionsRecordContract.ts"; - const relativePath = "./src/lib/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./emissions-calc.ts"; - const relativePath = "./src/lib/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const res = await fabricPlugin.deployContract({ - channelId, - ccVersion, - sourceFiles, - ccName, - targetOrganizations: [this.org1Env, this.org2Env], - caFile: `${this.orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - ccLabel, - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, success } = res; - this.log.debug(`Success: %o`, success); - this.log.debug(`Package IDs: %o`, packageIds); - - this.log.info(`Deployed Fabric smart contract(s) OK`); - - return { - emissions: { - chaincodeId: ccLabel, - channelName: channelId, - }, - }; - } catch (ex) { - this.log.error(`Deployment of smart contracts crashed: `, ex); - throw ex; - } - } - - public async deployXdaiContracts( - besuPlugin: PluginLedgerConnectorXdai, - keychainPlugin: PluginKeychainMemory, - ): Promise { - const out = []; - this._xdaiAccount = await this.xdai.createEthTestAccount(10000000); - - { - const { contractName } = DaoTokenContract; - this.log.info(`Deploying ${contractName}...`); - - const res = await besuPlugin.deployContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - constructorArgs: [this.xdaiAccount.get().address], - gas: 8000000, - web3SigningCredential: { - ethAccount: this.xdaiAccount.get().address, - secret: this.xdaiAccount.get().privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - const { - transactionReceipt: { contractAddress }, - } = res; - - this.log.info(`Deployed ${contractName}:${contractAddress} OK`); - - const daoToken = { - abi: DaoTokenContract.abi, - address: contractAddress as string, - bytecode: DaoTokenContract.bytecode, - }; - out.push(daoToken); - } - - { - const { contractName } = GovernorContract; - this.log.info(`Deploying ${contractName}...`); - - const timelockAccount = await this.xdai.createEthTestAccount(2000000); - const dclm8Account = await this.xdai.createEthTestAccount(2000000); - const guardianAccount = await this.xdai.createEthTestAccount(2000000); - const res = await besuPlugin.deployContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - // address timelock_, address dclm8_, address guardian_ - constructorArgs: [ - timelockAccount.address, - dclm8Account.address, - guardianAccount.address, - ], - gas: 8000000, - web3SigningCredential: { - ethAccount: this.xdaiAccount.get().address, - secret: this.xdaiAccount.get().privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - const { - transactionReceipt: { contractAddress }, - } = res; - - this.log.info(`Deployed ${contractName}:${contractAddress} OK`); - - const governor = { - abi: GovernorContract.abi, - address: contractAddress as string, - bytecode: GovernorContract.bytecode, - }; - out.push(governor); - } - - { - const { contractName } = TimelockContract; - this.log.info(`Deploying ${contractName}...`); - - const adminAccount = await this.xdai.createEthTestAccount(2000000); - const delay = 7 * 60 * 60 * 24; - const res = await besuPlugin.deployContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - constructorArgs: [adminAccount.address, delay], - gas: 8000000, - web3SigningCredential: { - ethAccount: this.xdaiAccount.get().address, - secret: this.xdaiAccount.get().privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - const { - transactionReceipt: { contractAddress }, - } = res; - - this.log.info(`Deployed ${contractName}:${contractAddress} OK`); - - const timelock = { - abi: TimelockContract.abi, - address: contractAddress as string, - bytecode: TimelockContract.bytecode, - }; - out.push(timelock); - } - - { - const { contractName } = NetEmissionsTokenNetworkContract; - - this.log.info(`Deploying ${contractName}...`); - const adminAccount = await this.xdai.createEthTestAccount(2000000); - const res = await besuPlugin.deployContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - constructorArgs: [adminAccount.address], - gas: 8000000, - web3SigningCredential: { - ethAccount: this.xdaiAccount.get().address, - secret: this.xdaiAccount.get().privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - const { - transactionReceipt: { contractAddress }, - } = res; - - this.log.info(`Deployed ${contractName}:${contractAddress} OK`); - - const netEmissionsTokenNetwork = { - abi: NetEmissionsTokenNetworkContract.abi, - address: contractAddress as string, - bytecode: NetEmissionsTokenNetworkContract.bytecode, - }; - out.push(netEmissionsTokenNetwork); - } - const [daoToken, governor, timelock, netEmissionsTokenNetwork] = out; - - return { - daoToken, - governor, - timelock, - netEmissionsTokenNetwork, - }; - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/public-api.ts b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/public-api.ts deleted file mode 100755 index 0b340256c4..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/public-api.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { CarbonAccountingApp } from "./carbon-accounting-app"; -export { launchApp } from "./carbon-accounting-app-cli"; diff --git a/examples/cactus-example-carbon-accounting-backend/src/test/typescript/integration/admin-enroll-v1-endpoint.test.ts b/examples/cactus-example-carbon-accounting-backend/src/test/typescript/integration/admin-enroll-v1-endpoint.test.ts deleted file mode 100644 index 11c4f0cffa..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/test/typescript/integration/admin-enroll-v1-endpoint.test.ts +++ /dev/null @@ -1,198 +0,0 @@ -import { AddressInfo } from "net"; - -import test, { Test } from "tape-promise/tape"; -import expressJwt from "express-jwt"; -import { v4 as uuidv4 } from "uuid"; -import { - generateKeyPair, - exportSPKI, - GeneralSign, - generalVerify, - SignJWT, -} from "jose"; -import { StatusCodes } from "http-status-codes"; -import jsonStableStringify from "json-stable-stringify"; - -import { - AuthorizationProtocol, - ConfigService, - Configuration, - IAuthorizationConfig, -} from "@hyperledger/cactus-cmd-api-server"; - -import { - IJoseFittingJwtParams, - LoggerProvider, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; - -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; - -import { - AuthzScope, - DefaultApi as CarbonAccountingApi, -} from "@hyperledger/cactus-example-carbon-accounting-business-logic-plugin"; - -import { - CarbonAccountingApp, - ICarbonAccountingAppOptions, -} from "../../../main/typescript/carbon-accounting-app"; - -const testCase = "can enroll new admin users onto the Fabric org"; -const logLevel: LogLevelDesc = "TRACE"; -const log = LoggerProvider.getOrCreate({ - label: testCase, - level: logLevel, -}); - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -// FIXME: Restore this once Fabric fixed their typescript definitions: -// https://github.com/hyperledger/fabric-chaincode-node/issues/292 -test.skip(testCase, async (t: Test) => { - const jwtKeyPair = await generateKeyPair("RS256", { modulusLength: 4096 }); - const jwtPublicKey = await exportSPKI(jwtKeyPair.publicKey); - const expressJwtOptions: expressJwt.Params & IJoseFittingJwtParams = { - algorithms: ["RS256"], - secret: jwtPublicKey, - audience: "carbon-accounting-tool-servers-hostname-here", - issuer: uuidv4(), - }; - t.ok(expressJwtOptions, "Express JWT config truthy OK"); - const socketIoJwtOptions = { secret: jwtPublicKey }; - - const httpGui = await Servers.startOnPreferredPort(3000); - t.true(httpGui.listening, `httpGui.listening === true`); - const httpApi = await Servers.startOnPreferredPort(4000); - t.true(httpApi.listening, `httpApi.listening === true`); - const addressInfo = httpApi.address() as AddressInfo; - t.ok(addressInfo, "httpApi.address() truthy OK"); - t.ok(addressInfo.address, "httpApi.address().address truthy OK"); - t.ok(addressInfo.port, "httpApi.address().port truthy OK"); - const { address, port } = addressInfo; - const apiBaseUrl = `http://${address}:${port}`; - - const authorizationConfig: IAuthorizationConfig = { - unprotectedEndpointExemptions: [], - expressJwtOptions, - socketIoJwtOptions, - }; - - const configService = new ConfigService(); - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.JSON_WEB_TOKEN; - apiSrvOpts.authorizationConfigJson = authorizationConfig; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = []; - const convictConfig = await configService.newExampleConfigConvict(apiSrvOpts); - const apiServerOptions = convictConfig.getProperties(); - - const appOptions: ICarbonAccountingAppOptions = { - logLevel: apiSrvOpts.logLevel, - apiServerOptions, - httpGui, - httpApi, - disableSignalHandlers: true, - }; - - const carbonAccountingApp = new CarbonAccountingApp(appOptions); - test.onFinish(async () => { - await carbonAccountingApp.stop(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - try { - await carbonAccountingApp.start(); - } catch (ex) { - log.error(`CarbonAccountingApp crashed. failing test...`, ex); - throw ex; - } - - const jwtPayload = { - name: "Peter", - scope: [AuthzScope.GroupAdmin], - }; - const jwtPayloadString = jsonStableStringify(jwtPayload); - const encoder = new TextEncoder(); - const sign = new GeneralSign(encoder.encode(jwtPayloadString)); - sign.addSignature(jwtKeyPair.privateKey).setProtectedHeader({ - alg: "RS256", - issuer: expressJwtOptions.issuer, - audience: expressJwtOptions.audience, - }); - const tokenWithScope = await sign.sign(); - const jwtSignOptions = { - algorithms: ["RS256"], - issuer: expressJwtOptions.issuer, - audience: expressJwtOptions.audience, - }; - const verification = await generalVerify( - tokenWithScope, - jwtKeyPair.publicKey, - jwtSignOptions, - ); - t.ok(verification, "JWT with scope verification truthy OK"); - - const configTokenWithScope = new Configuration({ - basePath: apiBaseUrl, - baseOptions: { - headers: { - Authorization: `Bearer ${tokenWithScope}`, - }, - }, - }); - - const apiClient = new CarbonAccountingApi(configTokenWithScope); - - const res = await apiClient.enrollAdminV1({ - orgName: "Org1MSP", - }); - t.ok(res, "enrollAdminV1 response truthy OK"); - t.true(res.status >= 200, "enrollAdminV1 status >= 200 OK"); - t.true(res.status < 300, "enrollAdminV1 status < 300 200 OK"); - - const tokenNoScope = await new SignJWT({ scope: [] }) - .setProtectedHeader({ alg: "RS256" }) - .setIssuer(jwtSignOptions.issuer) - .setAudience(jwtSignOptions.audience) - .sign(jwtKeyPair.privateKey); - - const configTokenWithoutScope = new Configuration({ - basePath: apiBaseUrl, - baseOptions: { - headers: { - Authorization: `Bearer ${tokenNoScope}`, - }, - }, - }); - - const apiClientBad = new CarbonAccountingApi(configTokenWithoutScope); - - try { - await apiClientBad.enrollAdminV1({ orgName: "does-not-matter" }); - t.fail("enroll admin response status === 403 FAIL"); - } catch (out) { - t.ok(out, "error thrown for forbidden endpoint truthy OK"); - t.ok(out.response, "enroll admin response truthy OK"); - t.equal( - out.response.status, - StatusCodes.FORBIDDEN, - "enroll admin response status === 403 OK", - ); - t.notok(out.response.data.data, "out.response.data.data falsy OK"); - t.notok(out.response.data.success, "out.response.data.success falsy OK"); - } - - t.end(); -}); diff --git a/examples/cactus-example-carbon-accounting-backend/src/test/typescript/integration/api-surface.test.ts b/examples/cactus-example-carbon-accounting-backend/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-carbon-accounting-backend/src/test/typescript/unit/api-surface.test.ts b/examples/cactus-example-carbon-accounting-backend/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/.dockerignore b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/.dockerignore deleted file mode 100644 index a9907baa4a..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -tslint.json -package-lock.json -test -.gitignore -dist -node_modules \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/.gitignore b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/.gitignore deleted file mode 100644 index 897cb9f208..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -package-lock.json -dist \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/Dockerfile b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/Dockerfile deleted file mode 100644 index 7fa94461d4..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM node:12.13.0-alpine as builder - -RUN npm install -g typescript - -WORKDIR /usr/local/src -COPY package.json . -RUN npm install --only=production -COPY . . -RUN npm run build - -FROM node:12.13.0-alpine -WORKDIR /usr/local/src -COPY --from=builder /usr/local/src/dist /usr/local/src/dist -COPY --from=builder /usr/local/src/node_modules /usr/local/src/node_modules -COPY --from=builder /usr/local/src/package.json /usr/local/src/package.json -COPY --from=builder /usr/local/src/package-lock.json /usr/local/src/package-lock.json - -CMD [ "npm","run","start" ] diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/package.json b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/package.json deleted file mode 100644 index aa55dfc806..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "utility_missions_chaincode", - "version": "0.0.1", - "description": "Utility Emissions Contract", - "main": "dist/index.js", - "scripts": { - "build": "tsc", - "lint": "tslint -c tslint.json 'src/**/*.ts' 'test/**/*.test.ts'", - "fix_lint": "tslint --fix -c tslint.json 'src/**/*.ts' 'test/**/*.test.ts' || true", - "test": "mocha -r ts-node/register 'test/**/*.test.ts'", - "start": "node dist/index.js" - }, - "author": "hyperledger", - "license": "Apache-2.0", - "devDependencies": { - "@types/chai": "4.3.5", - "@types/crypto-js": "4.1.1", - "@types/mocha": "8.2.2", - "@types/node": "18.11.9", - "@types/rewire": "2.5.28", - "chai": "4.3.7", - "mocha": "8.4.0", - "sinon": "10.0.0", - "ts-node": "10.9.1" - }, - "dependencies": { - "crypto-js": "4.2.0", - "fabric-shim": "2.2.2" - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/index.ts b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/index.ts deleted file mode 100644 index adbc3b900c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/index.ts +++ /dev/null @@ -1,578 +0,0 @@ -import { ChaincodeResponse, ChaincodeStub, Shim } from "fabric-shim"; -import { EmissionsRecordInterface } from "./lib/emissions"; - -import { EmissionsRecordContract } from "./lib/emissionsRecordContract"; -import { UtilityEmissionsFactorInterface } from "./lib/utilityEmissionsFactor"; -import { - DivisionsInterface, - UtilityLookupItemInterface, -} from "./lib/utilityLookupItem"; -import { - ErrInvalidArgument, - ErrInvalidNumberOfArgument, - ErrMethodNotSupported, - MsgSuccess, -} from "./util/const"; -import { logger, stringToBytes } from "./util/util"; - -export class EmissionsChaincode { - private methods: { - [key: string]: ( - stub: ChaincodeStub, - args: string[], - ) => Promise; - } = { - importUtilityIdentifier: this.importUtilityIdentifier, - updateUtilityIdentifier: this.updateUtilityIdentifier, - getUtilityIdentifier: this.getUtilityIdentifier, - getAllUtilityIdentifiers: this.getAllUtilityIdentifiers, - importUtilityFactor: this.importUtilityFactor, - updateUtilityFactor: this.updateUtilityFactor, - getUtilityFactor: this.getUtilityFactor, - recordEmissions: this.recordEmissions, - updateEmissionsRecord: this.updateEmissionsRecord, - getEmissionsData: this.getEmissionsData, - getAllEmissionsData: this.getAllEmissionsData, - getAllEmissionsDataByDateRange: this.getAllEmissionsDataByDateRange, - getAllEmissionsDataByDateRangeAndParty: - this.getAllEmissionsDataByDateRangeAndParty, - }; - // eslint-disable-next-line @typescript-eslint/no-unused-vars - async Init(stub: ChaincodeStub): Promise { - return Shim.success(null); - } - async Invoke(stub: ChaincodeStub): Promise { - const { fcn, params } = stub.getFunctionAndParameters(); - const method = this.methods[fcn]; - if (!method) { - logger.error(`${ErrMethodNotSupported} : ${fcn} is not supported`); - return Shim.error( - new TextEncoder().encode( - `${ErrMethodNotSupported} : ${fcn} is not supported`, - ), - ); - } - return await method(stub, params); - } - async recordEmissions( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info(`recordEmissions method called with args : ${args}`); - const fields = [ - "utilityId", - "partyId", - "fromDate", - "thruDate", - "energyUseAmount", - "energyUseUom", - "url", - "md5", - ]; - const fieldsMap = { - utilityId: null, - partyId: null, - fromDate: null, - thruDate: null, - energyUseAmount: null, - energyUseUom: null, - url: null, - md5: null, - }; - const fieldsLen = Math.min(args.length, fields.length); - for (let i = 0; i < fieldsLen; i++) { - fieldsMap[fields[i]] = args[i]; - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).recordEmissions( - fieldsMap.utilityId, - fieldsMap.partyId, - fieldsMap.fromDate, - fieldsMap.thruDate, - fieldsMap.energyUseAmount, - fieldsMap.energyUseUom, - fieldsMap.url, - fieldsMap.md5, - ); - } catch (error) { - console.log(error); - return Shim.error(stringToBytes((error as Error).message)); - } - logger.debug(`${MsgSuccess} recordEmissions success ${byte.toString()}`); - return Shim.success(byte); - } - - async updateEmissionsRecord( - stub: ChaincodeStub, - args: string[], - ): Promise { - const fields = [ - "uuid", - "utilityId", - "partyId", - "fromDate", - "thruDate", - "emissionsAmount", - "renewable_energy_use_amount", - "nonrenewable_energy_use_amount", - "energyUseUom", - "factor_source", - "url", - "md5", - "tokenId", - ]; - const recordI: EmissionsRecordInterface = {}; - const fieldsLen = Math.min(args.length, fields.length); - for (let i = 0; i < fieldsLen; i++) { - recordI[fields[i]] = args[i]; - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).updateEmissionsRecord( - recordI, - ); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - return Shim.success(byte); - } - async getEmissionsData( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info(`getEmissionsData method called with args : ${args}`); - if (args.length !== 1) { - logger.error( - `${ErrInvalidNumberOfArgument} : getEmissionsData requires 1 arg , but provided ${args.length}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidNumberOfArgument} : getEmissionsData requires 1 arg , but provided ${args.length}`, - ), - ); - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).getEmissionsData(args[0]); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - return Shim.success(byte); - } - async getAllEmissionsData( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info(`getAllEmissionsData method called with args : ${args}`); - if (args.length !== 2) { - logger.error( - `${ErrInvalidNumberOfArgument} : getAllEmissionsData requires 2 arg , but provided ${args.length}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidNumberOfArgument} : getAllEmissionsData requires 2 arg , but provided ${args.length}`, - ), - ); - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).getAllEmissionsData( - args[0], - args[1], - ); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - return Shim.success(byte); - } - async getAllEmissionsDataByDateRange( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info( - `getAllEmissionsDataByDateRange method called with args : ${args}`, - ); - if (args.length !== 2) { - logger.error( - `${ErrInvalidNumberOfArgument} : getAllEmissionsDataByDateRange requires 2 arg , but provided ${args.length}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidNumberOfArgument} : getAllEmissionsDataByDateRange requires 2 arg , but provided ${args.length}`, - ), - ); - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract( - stub, - ).getAllEmissionsDataByDateRange(args[0], args[1]); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - return Shim.success(byte); - } - async getAllEmissionsDataByDateRangeAndParty( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info( - `getAllEmissionsDataByDateRangeAndParty method called with args : ${args}`, - ); - if (args.length !== 3) { - logger.error( - `${ErrInvalidNumberOfArgument} : getAllEmissionsDataByDateRangeAndParty requires 3 arg , but provided ${args.length}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidNumberOfArgument} : getAllEmissionsDataByDateRangeAndParty requires 3 arg , but provided ${args.length}`, - ), - ); - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract( - stub, - ).getAllEmissionsDataByDateRangeAndParty(args[0], args[1], args[2]); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - return Shim.success(byte); - } - /** - * @param args : ['uuid', 'year', 'country', - * 'division_type','division_id','division_name','net_generation', - * 'net_generation_uom','co2_equivalent_emissions','co2_equivalent_emissions_uom', - * 'source','non_renewables','renewables','percent_of_renewables'] - */ - async importUtilityFactor( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info(`importUtilityFactor method called with args : ${args}`); - // uuid is required for importing utility factor - if (args.length < 1) { - logger.error( - `${ErrInvalidNumberOfArgument} : importUtilityFactor method requires at-least 1 argument, but got ${args.length}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidNumberOfArgument} : importUtilityFactor method requires at-least 1 argument, but got ${args.length}`, - ), - ); - } - - // order of args input - const fields = [ - "uuid", - "year", - "country", - "division_type", - "division_id", - "division_name", - "net_generation", - "net_generation_uom", - "co2_equivalent_emissions", - "co2_equivalent_emissions_uom", - "source", - "non_renewables", - "renewables", - "percent_of_renewables", - ]; - const min = Math.min(fields.length, args.length); - const factorI: UtilityEmissionsFactorInterface = { - uuid: args[0], - }; - for (let i = 1; i < min; i++) { - factorI[fields[i]] = args[i]; - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).importUtilityFactor( - factorI, - ); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - logger.debug( - `${MsgSuccess} importUtilityFactor success ${byte.toString()}`, - ); - return Shim.success(byte); - } - /** - * @param args : ['uuid', 'year', 'country', - * 'division_type','division_id','division_name','net_generation', - * 'net_generation_uom','co2_equivalent_emissions','co2_equivalent_emissions_uom', - * 'source','non_renewables','renewables','percent_of_renewables'] - */ - async updateUtilityFactor( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info(`updateUtilityFactor method called with args : ${args}`); - // uuid is required for importing utility factor - if (args.length < 1) { - logger.error( - `${ErrInvalidNumberOfArgument} : updateUtilityFactor method requires at-least 1 argument, but got ${args.length}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidNumberOfArgument} : updateUtilityFactor method requires at-least 1 argument, but got ${args.length}`, - ), - ); - } - - // order of args input - const fields = [ - "uuid", - "year", - "country", - "division_type", - "division_id", - "division_name", - "net_generation", - "net_generation_uom", - "co2_equivalent_emissions", - "co2_equivalent_emissions_uom", - "source", - "non_renewables", - "renewables", - "percent_of_renewables", - ]; - const min = Math.min(fields.length, args.length); - const factorI: UtilityEmissionsFactorInterface = { - uuid: args[0], - }; - for (let i = 1; i < min; i++) { - factorI[fields[i]] = args[i]; - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).updateUtilityFactor( - factorI, - ); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - logger.debug( - `${MsgSuccess} updateUtilityFactor success ${byte.toString()}`, - ); - return Shim.success(byte); - } - - /** - * @param args : ['uuid'] - */ - async getUtilityFactor( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info(`getUtilityFactor method called with args : ${args}`); - if (args.length !== 1) { - logger.error( - `${ErrInvalidNumberOfArgument} : getUtilityFactor requires 1 arg , but provided ${args.length}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidNumberOfArgument} : getUtilityFactor requires 1 arg , but provided ${args.length}`, - ), - ); - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).getUtilityFactor(args[0]); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - return Shim.success(byte); - } - /** - * @param args : ['uuid', 'year', 'utility_number', 'utility_name', 'country', 'state_province', '{"division_type" : "","division_id" : ""}'] - */ - async importUtilityIdentifier( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info(`importUtilityIdentifier method called with args : ${args}`); - // uuid is required for importing utility identifier - if (args.length < 1) { - logger.error( - `${ErrInvalidNumberOfArgument} : importUtilityIdentifier method requires at-least 1 argument, but got ${args.length}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidNumberOfArgument} : importUtilityIdentifier method requires at-least 1 argument, but got ${args.length}`, - ), - ); - } - const fields = [ - "uuid", - "year", - "utility_number", - "utility_name", - "country", - "state_province", - "divisions", - ]; - const min = Math.min(args.length, fields.length); - const identifier: UtilityLookupItemInterface = { uuid: args[0] }; - for (let i = 1; i < min; i++) { - identifier[fields[i]] = args[i]; - } - // division exists - if (args.length === 7) { - delete identifier.divisions; - let division: DivisionsInterface; - try { - division = JSON.parse(args[6]) as DivisionsInterface; - } catch (error) { - logger.error( - `${ErrInvalidArgument} : invalid divsion json input ${error}`, - ); - return Shim.error(stringToBytes((error as Error).message)); - } - identifier.divisions = division; - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).importUtilityIdentifier( - identifier, - ); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - logger.debug( - `${MsgSuccess} importUtilityIdentifier success ${byte.toString()}`, - ); - return Shim.success(byte); - } - /** - * @param args : ['uuid', 'year', 'utility_number', 'utility_name', 'country', 'state_province', '{"division_type" : "","division_id" : ""}'] - */ - async updateUtilityIdentifier( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info(`updateUtilityIdentifier method called with args : ${args}`); - // uuid is required for importing utility identifier - if (args.length < 1) { - logger.error( - `${ErrInvalidNumberOfArgument} : updateUtilityIdentifier method requires at-least 1 argument, but got ${args.length}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidNumberOfArgument} : updateUtilityIdentifier method requires at-least 1 argument, but got ${args.length}`, - ), - ); - } - const fields = [ - "uuid", - "year", - "utility_number", - "utility_name", - "country", - "state_province", - "divisions", - ]; - const min = Math.min(args.length, fields.length); - const identifier: UtilityLookupItemInterface = { uuid: args[0] }; - for (let i = 1; i < min; i++) { - identifier[fields[i]] = args[i]; - } - // division exists - if (args.length === 7) { - delete identifier.divisions; - const divisionJSON = JSON.parse(args[6]); - let division: DivisionsInterface; - if (divisionJSON.division_type && divisionJSON.division_id) { - division = { - division_id: divisionJSON.division_id, - division_type: divisionJSON.division_type, - }; - } else { - logger.error( - `${ErrInvalidArgument} : invalid division , got : ${args[6]}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidArgument} : division should represented by : '{"division_type" : "","division_id" : ""}`, - ), - ); - } - identifier.divisions = division; - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).updateUtilityIdentifier( - identifier, - ); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - logger.debug( - `${MsgSuccess} updateUtilityIdentifier success ${byte.toString()}`, - ); - return Shim.success(byte); - } - - /** - * @param args : ['uuid'] - */ - async getUtilityIdentifier( - stub: ChaincodeStub, - args: string[], - ): Promise { - logger.info(`getUtilityIdentifier method called with args : ${args}`); - if (args.length !== 1) { - logger.error( - `${ErrInvalidNumberOfArgument} : getUtilityIdentifier requires 1 arg , but provided ${args.length}`, - ); - return Shim.error( - stringToBytes( - `${ErrInvalidNumberOfArgument} : getUtilityIdentifier requires 1 arg , but provided ${args.length}`, - ), - ); - } - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).getUtilityIdentifier( - args[0], - ); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - logger.debug( - `${MsgSuccess} getUtilityIdentifier success ${byte.toString()}`, - ); - return Shim.success(byte); - } - - async getAllUtilityIdentifiers( - stub: ChaincodeStub, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - args: string[], - ): Promise { - let byte: Uint8Array; - try { - byte = await new EmissionsRecordContract(stub).getAllUtilityIdentifiers(); - } catch (error) { - logger.error(error); - return Shim.error(stringToBytes((error as Error).message)); - } - return Shim.success(byte); - } -} - -export const contracts: unknown[] = [EmissionsChaincode]; diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissions-calc.ts b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissions-calc.ts deleted file mode 100644 index 64925b810d..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissions-calc.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { ErrInvalidDateFormat, ErrUnknownUOM } from "../util/const"; -import { UtilityEmissionsFactorInterface } from "./utilityEmissionsFactor"; - -// -const UOM_FACTORS: { [key: string]: number } = { - wh: 1.0, - kwh: 1000.0, - mwh: 1000000.0, - gwh: 1000000000.0, - twh: 1000000000000.0, - kg: 1.0, - t: 1000.0, - ton: 1000.0, - tons: 1000.0, - g: 0.001, - kt: 1000000.0, - mt: 1000000000.0, - pg: 1000000000.0, - gt: 1000000000000.0, -}; - -export const getUomFactor = (uom: string): number => { - const factor = UOM_FACTORS[uom.toLowerCase()]; - if (!factor) { - throw new Error(`${ErrUnknownUOM} : ${uom} is not a valid uom`); - } - return factor; -}; - -export const getYearFromDate = (date: string): number => { - const time = new Date(date); - if (!time.getFullYear()) { - throw new Error( - `${ErrInvalidDateFormat} : ${date} date format not supported`, - ); - } - return time.getFullYear(); -}; - -interface CO2EmissionFactorInterface { - emission: { - value: number; - uom: string; - }; - division_type: string; - division_id: string; - renewable_energy_use_amount: number; - nonrenewable_energy_use_amount: number; - year: number; -} - -export function getCO2EmissionFactor( - factor: UtilityEmissionsFactorInterface, - usage: number, - usageUOM: string, -): CO2EmissionFactorInterface { - // initialize return variables - let emissionsValue: number; - let emissionsUOM: string; - let renewableEnergyUseAmount: number; - let nonrenewableEnergyUseAmount: number; - - // calculate emissions using percent_of_renewables if found - if (factor.percent_of_renewables.length !== 0) { - emissionsUOM = "g"; - const co2EquivalentEmissionsUOM = - factor.co2_equivalent_emissions_uom.split("/"); - if (co2EquivalentEmissionsUOM.length === 0) { - console.error("co2_equivalent_emissions_uom not found in factor"); - } - emissionsValue = - (Number(factor.co2_equivalent_emissions) * - usage * - getUomFactor(co2EquivalentEmissionsUOM[0])) / - getUomFactor(co2EquivalentEmissionsUOM[1]); - const percentOfRenewables = Number(factor.percent_of_renewables) / 100; - renewableEnergyUseAmount = usage * percentOfRenewables; - nonrenewableEnergyUseAmount = usage * (1 - percentOfRenewables); - } else { - emissionsUOM = "tons"; - - const net_generation_uom = factor.net_generation_uom; - const co2_equivalent_emissions_uom = factor.co2_equivalent_emissions_uom; - - const usageUOMConversion = - getUomFactor(usageUOM) / getUomFactor(net_generation_uom); - const emissionsUOMConversion = - getUomFactor(co2_equivalent_emissions_uom) / getUomFactor(emissionsUOM); - - emissionsValue = - (Number(factor.co2_equivalent_emissions) / - Number(factor.net_generation)) * - usage * - usageUOMConversion * - emissionsUOMConversion; - - const totalGeneration = - Number(factor.non_renewables) + Number(factor.renewables); - renewableEnergyUseAmount = - usage * (Number(factor.renewables) / totalGeneration); - nonrenewableEnergyUseAmount = - usage * (Number(factor.non_renewables) / totalGeneration); - } - return { - emission: { - value: emissionsValue, - uom: emissionsUOM, - }, - division_type: factor.division_type, - division_id: factor.division_id, - renewable_energy_use_amount: renewableEnergyUseAmount, - nonrenewable_energy_use_amount: nonrenewableEnergyUseAmount, - year: Number(factor.year), - } as CO2EmissionFactorInterface; -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissions.ts b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissions.ts deleted file mode 100644 index 3718e27c7f..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissions.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -/* tslint:disable:max-classes-per-file */ - -import { ChaincodeStub } from "fabric-shim"; -import { State } from "../util/state"; -import { QueryResult, WorldState } from "../util/worldstate"; - -// EMISSION_CLASS_IDENTIFIER : identifier for emissions record inside HL Fabric -const EMISSION_CLASS_IDENTIFIER = - "org.hyperledger.blockchain-carbon-accounting.emissionsrecord"; - -export interface EmissionsRecordInterface { - class?: string; - key?: string; - uuid?: string; - utilityId?: string; - partyId?: string; - fromDate?: string; - thruDate?: string; - emissionsAmount?: number; - renewableEnergyUseAmount?: number; - nonrenewableEnergyUseAmount?: number; - energyUseUom?: string; - factorSource?: string; - url?: string; - md5?: string; - tokenId?: string; -} - -/** - * EmissionsRecord class extends State class - * Class will be used by application and smart contract to define a paper - */ -export class EmissionsRecord extends State { - record: EmissionsRecordInterface; - constructor(_record: EmissionsRecordInterface) { - super([ - _record.utilityId, - _record.partyId, - _record.fromDate, - _record.thruDate, - ]); - this.record = _record; - this.record.class = EMISSION_CLASS_IDENTIFIER; - this.record.key = this.getKey(); - } - toBuffer(): Uint8Array { - return State.serialize(this.record); - } - fromBuffer(buf: Uint8Array): EmissionsRecord { - return new EmissionsRecord( - State.deserialize(buf), - ); - } -} - -/** - * EmissionsRecordWorldState class is wrapper around chaincode stub - * for managing lifecycle of a EmissionRecord - */ -export class EmissionRecordState extends WorldState { - constructor(stub: ChaincodeStub) { - super(stub); - } - async addEmissionsRecord( - record: EmissionsRecord, - uuid: string, - ): Promise { - return await this.addState(uuid, record.record); - } - async getEmissionsRecord(uuid: string): Promise { - return new EmissionsRecord(await this.getState(uuid)); - } - async updateEmissionsRecord( - record: EmissionsRecord, - uuid: string, - ): Promise { - return await this.updateState(uuid, record.record); - } - async getAllEmissionRecords( - utilityId: string, - partyId: string, - ): Promise[]> { - const queryString = `{"selector": {"class": "${EMISSION_CLASS_IDENTIFIER}","utilityId": "${utilityId}", "partyId": "${partyId}"}}`; - return await this.query(queryString); - } - async getAllEmissionsDataByDateRange( - fromDate: string, - thruDate: string, - ): Promise[]> { - const queryString = `{ - "selector": { - "class": { - "$eq": "${EMISSION_CLASS_IDENTIFIER}" - }, - "fromDate": { - "$gte": "${fromDate}" - }, - "thruDate": { - "$lte": "${thruDate}" - } - } - }`; - return await this.query(queryString); - } - async getAllEmissionsDataByDateRangeAndParty( - fromDate: string, - thruDate: string, - partyId: string, - ): Promise[]> { - const queryString = `{ - "selector": { - "class": { - "$eq": "${EMISSION_CLASS_IDENTIFIER}" - }, - "fromDate": { - "$gte": "${fromDate}" - }, - "thruDate": { - "$lte": "${thruDate}" - }, - "partyId": { - "$eq": "${partyId}" - } - } - }`; - return this.query(queryString); - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissionsRecordContract.ts b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissionsRecordContract.ts deleted file mode 100644 index 3ce8873716..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissionsRecordContract.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { ChaincodeStub } from "fabric-shim"; -import { - EmissionRecordState, - EmissionsRecord, - EmissionsRecordInterface, -} from "./emissions"; -import { getCO2EmissionFactor } from "./emissions-calc"; -import { - UtilityEmissionsFactor, - UtilityEmissionsFactorInterface, - UtilityEmissionsFactorState, -} from "./utilityEmissionsFactor"; -import { MD5, SHA256 } from "crypto-js"; -import { - UtilityLookupItemInterface, - UtilityLookupItemState, - UtilityLookupItem, -} from "./utilityLookupItem"; - -// EmissionsRecordContract : core bushiness logic of emissions record chaincode -export class EmissionsRecordContract { - protected emissionsState: EmissionRecordState; - protected utilityEmissionsFactorState: UtilityEmissionsFactorState; - protected utilityLookupState: UtilityLookupItemState; - constructor(stub: ChaincodeStub) { - this.emissionsState = new EmissionRecordState(stub); - this.utilityEmissionsFactorState = new UtilityEmissionsFactorState(stub); - this.utilityLookupState = new UtilityLookupItemState(stub); - } - /** - * - * Store the emissions record - * @param Id for the utility - * @param Id for the party (company) which buys power from utility - * @param from date of the time period - * @param thru date of the time period - * @param energy usage amount - * @param UOM of energy usage amount -- ie kwh - */ - async recordEmissions( - utilityId: string, - partyId: string, - fromDate: string, - thruDate: string, - energyUseAmount: string, - energyUseUom: string, - url: string, - md5: string, - ): Promise { - // get emissions factors from eGRID database; convert energy use to emissions factor UOM; calculate energy use - const lookup = - await this.utilityLookupState.getUtilityLookupItem(utilityId); - const factor = - await this.utilityEmissionsFactorState.getEmissionsFactorByLookupItem( - lookup.item, - thruDate, - ); - const co2Emission = getCO2EmissionFactor( - factor.factor, - Number(energyUseAmount), - energyUseUom, - ); - - const factorSource = `eGrid ${co2Emission.year} ${co2Emission.division_type} ${co2Emission.division_id}`; - - // create an instance of the emissions record - const uuid = MD5(utilityId + partyId + fromDate + thruDate).toString(); - const partyIdsha256 = SHA256(partyId).toString(); - - const emissionI: EmissionsRecordInterface = { - uuid, - utilityId, - partyId: partyIdsha256, - fromDate, - thruDate, - emissionsAmount: co2Emission.emission.value, - renewableEnergyUseAmount: co2Emission.renewable_energy_use_amount, - nonrenewableEnergyUseAmount: co2Emission.nonrenewable_energy_use_amount, - energyUseUom, - factorSource, - url, - md5, - tokenId: null, - }; - const emission = new EmissionsRecord(emissionI); - await this.emissionsState.addEmissionsRecord(emission, uuid); - return emission.toBuffer(); - } - - async updateEmissionsRecord( - recordI: EmissionsRecordInterface, - ): Promise { - if (recordI["partyId"]) { - recordI["partyId"] = SHA256(recordI["partyId"]).toString(); - } - const record = new EmissionsRecord(recordI); - await this.emissionsState.updateEmissionsRecord(record, recordI.uuid); - return record.toBuffer(); - } - async getEmissionsData(uuid: string): Promise { - const record = await this.emissionsState.getEmissionsRecord(uuid); - return record.toBuffer(); - } - async getAllEmissionsData( - utilityId: string, - partyId: string, - ): Promise { - const partyIdsha256 = SHA256(partyId).toString(); - const records = await this.emissionsState.getAllEmissionRecords( - utilityId, - partyIdsha256, - ); - return Buffer.from(JSON.stringify(records)); - } - async getAllEmissionsDataByDateRange( - fromDate: string, - thruDate: string, - ): Promise { - const records = await this.emissionsState.getAllEmissionsDataByDateRange( - fromDate, - thruDate, - ); - return Buffer.from(JSON.stringify(records)); - } - async getAllEmissionsDataByDateRangeAndParty( - fromDate: string, - thruDate: string, - partyId: string, - ): Promise { - const partyIdsha256 = SHA256(partyId).toString(); - const records = - await this.emissionsState.getAllEmissionsDataByDateRangeAndParty( - fromDate, - thruDate, - partyIdsha256, - ); - return Buffer.from(JSON.stringify(records)); - } - async importUtilityFactor( - factorI: UtilityEmissionsFactorInterface, - ): Promise { - const factor = new UtilityEmissionsFactor(factorI); - await this.utilityEmissionsFactorState.addUtilityEmissionsFactor( - factor, - factorI.uuid, - ); - return factor.toBuffer(); - } - async updateUtilityFactor( - factorI: UtilityEmissionsFactorInterface, - ): Promise { - const factor = new UtilityEmissionsFactor(factorI); - await this.utilityEmissionsFactorState.updateUtilityEmissionsFactor( - factor, - factorI.uuid, - ); - return factor.toBuffer(); - } - async getUtilityFactor(uuid: string): Promise { - return ( - await this.utilityEmissionsFactorState.getUtilityEmissionsFactor(uuid) - ).toBuffer(); - } - async importUtilityIdentifier( - lookupInterface: UtilityLookupItemInterface, - ): Promise { - const lookup = new UtilityLookupItem(lookupInterface); - await this.utilityLookupState.addUtilityLookupItem( - lookup, - lookupInterface.uuid, - ); - return lookup.toBuffer(); - } - async updateUtilityIdentifier( - lookupInterface: UtilityLookupItemInterface, - ): Promise { - const lookup = new UtilityLookupItem(lookupInterface); - await this.utilityLookupState.updateUtilityLookupItem( - lookup, - lookupInterface.uuid, - ); - return lookup.toBuffer(); - } - async getUtilityIdentifier(uuid: string): Promise { - return ( - await this.utilityLookupState.getUtilityLookupItem(uuid) - ).toBuffer(); - } - async getAllUtilityIdentifiers(): Promise { - const result = await this.utilityLookupState.getAllUtilityLookupItems(); - return Buffer.from(JSON.stringify(result)); - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/utilityEmissionsFactor.ts b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/utilityEmissionsFactor.ts deleted file mode 100644 index 2bfd7612c8..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/utilityEmissionsFactor.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ -/** - * The release of GHG into the atmosphere depends mainly on the activity and the product. - * In order to estimate GHG emissions per unit of available activity, - * we need to use a factor called emission factor (EF). - */ - -/* tslint:disable:max-classes-per-file */ -import { ChaincodeStub } from "fabric-shim"; -import { ErrStateNotFound } from "../util/const"; -import { State } from "../util/state"; -import { QueryResult, WorldState } from "../util/worldstate"; -import { getYearFromDate } from "./emissions-calc"; -import { UtilityLookupItemInterface } from "./utilityLookupItem"; - -const UTILITY_EMISSIONS_FACTOR_CLASS_IDENTIFIER = - "org.hyperledger.blockchain-carbon-accounting.utilityemissionsfactoritem"; - -export interface UtilityEmissionsFactorInterface { - class?: string; - key?: string; - uuid: string; - year?: string; - country?: string; - division_type?: string; - division_id?: string; - division_name?: string; - net_generation?: string; - net_generation_uom?: string; - co2_equivalent_emissions?: string; - co2_equivalent_emissions_uom?: string; - source?: string; - non_renewables?: string; - renewables?: string; - percent_of_renewables?: string; -} - -export class UtilityEmissionsFactor extends State { - factor: UtilityEmissionsFactorInterface; - constructor(_factor: UtilityEmissionsFactorInterface) { - super([ - _factor.uuid, - _factor.year, - _factor.division_type, - _factor.division_id, - ]); - this.factor = _factor; - this.factor.class = UTILITY_EMISSIONS_FACTOR_CLASS_IDENTIFIER; - this.factor.key = this.getKey(); - } - toBuffer(): Uint8Array { - return State.serialize(this.factor); - } - fromBuffer(buf: Uint8Array): UtilityEmissionsFactor { - return new UtilityEmissionsFactor( - State.deserialize(buf), - ); - } -} - -export class UtilityEmissionsFactorState extends WorldState { - constructor(stub: ChaincodeStub) { - super(stub); - } - async addUtilityEmissionsFactor( - factor: UtilityEmissionsFactor, - uuid: string, - ): Promise { - return await this.addState(uuid, factor.factor); - } - async getUtilityEmissionsFactor( - uuid: string, - ): Promise { - return new UtilityEmissionsFactor(await this.getState(uuid)); - } - async updateUtilityEmissionsFactor( - factor: UtilityEmissionsFactor, - uuid: string, - ): Promise { - return await this.updateState(uuid, factor.factor); - } - async getUtilityEmissionsFactorsByDivision( - divisionID: string, - divisionType: string, - year?: number, - ): Promise[]> { - const maxYearLookup = 5; // if current year not found, try each preceding year up to this many times - let retryCount = 0; - let queryString = ""; - let results: QueryResult[] = []; - while (results.length === 0 && retryCount <= maxYearLookup) { - if (year !== undefined) { - queryString = `{ - "selector" : { - "class": { - "$eq": "${UTILITY_EMISSIONS_FACTOR_CLASS_IDENTIFIER}" - }, - "division_id" : { - "$eq": "${divisionID}" - }, - "division_type": { - "$eq": "${divisionType}" - }, - "year": { - "$eq": "${year + retryCount * -1}" - } - } - }`; - } else { - queryString = `{ - "selector" : { - "class": { - "$eq": "${UTILITY_EMISSIONS_FACTOR_CLASS_IDENTIFIER}" - }, - "division_id" : { - "$eq": "${divisionID}" - }, - "division_type": { - "$eq": "${divisionType}" - } - } - }`; - } - const iterator = await this.stub.getQueryResult(queryString); - results = await this.getAssetFromIterator(iterator); - retryCount++; - } - if (results.length === 0) { - throw new Error( - `${ErrStateNotFound} : failed to get Utility Emissions Factors By division`, - ); - } - return results; - } - - // used by recordEmissions - async getEmissionsFactorByLookupItem( - lookup: UtilityLookupItemInterface, - thruDate: string, - ): Promise { - const hasStateData = lookup.state_province.length > 0; - const isNercRegion = - lookup.divisions.division_type.toLowerCase() === "nerc_region"; - const isNonUSCountry = - lookup.divisions.division_type.toLowerCase() === "country" && - lookup.divisions.division_id.toLowerCase() !== "usa"; - let divisionID: string; - let divisionType: string; - let year: number; - if (hasStateData) { - divisionID = lookup.state_province; - divisionType = "STATE"; - } else if (isNercRegion) { - divisionID = lookup.divisions.division_id; - divisionType = lookup.divisions.division_type; - } else if (isNonUSCountry) { - divisionID = lookup.divisions.division_id; - divisionType = "Country"; - } else { - divisionID = "USA"; - divisionType = "Country"; - } - - try { - year = getYearFromDate(thruDate); - } catch (error) { - console.error("could not fetch year"); - console.error(error); - } - - console.log("fetching utilityFactors"); - const utilityFactors = await this.getUtilityEmissionsFactorsByDivision( - divisionID, - divisionType, - year, - ); - if (utilityFactors.length === 0) { - throw new Error("No utility emissions factor found for given query"); - } - return new UtilityEmissionsFactor(utilityFactors[0].Record); - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/utilityLookupItem.ts b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/utilityLookupItem.ts deleted file mode 100644 index fbc3efeacc..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/utilityLookupItem.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { ChaincodeStub } from "fabric-shim"; -import { State } from "../util/state"; -import { QueryResult, WorldState } from "../util/worldstate"; - -/* tslint:disable:max-classes-per-file */ - -const UTILITY_LOOKUP_ITEM_CLASS_IDENTIFIER = - "org.hyperledger.blockchain-carbon-accounting.utilitylookuplist"; - -export interface DivisionsInterface { - division_type: string; - division_id: string; -} -export interface UtilityLookupItemInterface { - class?: string; - key?: string; - uuid: string; - year?: string; - utility_number?: string; - utility_name?: string; - country?: string; - state_province?: string; - divisions?: DivisionsInterface; -} - -export class UtilityLookupItem extends State { - item: UtilityLookupItemInterface; - constructor(_item: UtilityLookupItemInterface) { - super([_item.uuid]); - this.item = _item; - this.item.class = UTILITY_LOOKUP_ITEM_CLASS_IDENTIFIER; - this.item.key = this.getKey(); - } - toBuffer(): Uint8Array { - return State.serialize(this.item); - } - fromBuffer(buf: Uint8Array): UtilityLookupItem { - return new UtilityLookupItem( - State.deserialize(buf), - ); - } -} - -export class UtilityLookupItemState extends WorldState { - constructor(stub: ChaincodeStub) { - super(stub); - } - async addUtilityLookupItem( - item: UtilityLookupItem, - uuid: string, - ): Promise { - return await this.addState(uuid, item.item); - } - - async getUtilityLookupItem(uuid: string): Promise { - return new UtilityLookupItem(await this.getState(uuid)); - } - - async getAllUtilityLookupItems(): Promise< - QueryResult[] - > { - const queryString = `{"selector": {"class": "${UTILITY_LOOKUP_ITEM_CLASS_IDENTIFIER}"}}`; - return await this.query(queryString); - } - async updateUtilityLookupItem( - item: UtilityLookupItem, - uuid: string, - ): Promise { - return await this.updateState(uuid, item.item); - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/const.ts b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/const.ts deleted file mode 100644 index 1012cb8d55..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/const.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -// const.ts : keep all the required constants at one place - -// Error Name constants -export const ErrStateNotFound = "STATE_NOT_FOUND"; -export const ErrStateAlreadyExists = "STATE_ALREADY_EXISTS"; -export const ErrInvalidQueryString = "INVALID_QUERY_STRING"; -export const ErrUnknownUOM = "UNKNOWN_UOM"; -export const ErrInvalidDateFormat = "INVALID_DATA_FORMAT"; - -// chaincode entry point errors -export const ErrInvalidNumberOfArgument = "INVALID_NUMBER_OF_ARGUMENT"; -export const ErrInvalidArgument = "INVALID_ARGUMENT"; -export const ErrMethodNotSupported = "METHOD_NOT_SUPPORTED"; -// message -export const MsgSuccess = "METHOD_EXECUTED_SUCCESSFULLY"; -export const MsgFailure = "METHOD_EXECUTED_FAILED"; - -// weight unit -export const WEIGHT_TONS = "TONS"; - -export const REGIONS = { - NERC: "nerc_region", - - // Countries - USA: "usa", -}; diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/state.ts b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/state.ts deleted file mode 100644 index 2b670409fa..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/state.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -const KEY_SEPARATOR = ":"; - -/** - * State class. States have a class, unique key, and a lifecycle current state - * the current state is determined by the specific subclass - */ -export abstract class State { - private key: string; - constructor(keyParts: string[]) { - this.key = State.makeKey(keyParts); - } - - getKey(): string { - return this.key; - } - getSplitKey(): string[] { - return State.splitKey(this.key); - } - protected static serialize(object: T): Uint8Array { - return Buffer.from(JSON.stringify(object)); - } - protected static deserialize(buf: Uint8Array): T { - return JSON.parse(buf.toString()) as T; - } - static makeKey(keyParts: string[]): string { - return keyParts.map((part) => JSON.stringify(part)).join(KEY_SEPARATOR); - } - static splitKey(key: string): string[] { - return key.split(KEY_SEPARATOR); - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/util.ts b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/util.ts deleted file mode 100644 index cb4ac9db85..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/util.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Shim } from "fabric-shim"; - -// logger : provide global logger for logging -export const logger = Shim.newLogger("EMISSION_RECORD_CHAINCODE"); - -const encoder = new TextEncoder(); - -export const stringToBytes = (msg: string): Uint8Array => { - return encoder.encode(msg); -}; diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/worldstate.ts b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/worldstate.ts deleted file mode 100644 index 2dd2dc003c..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/util/worldstate.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { ChaincodeStub, Iterators } from "fabric-shim"; -import { State } from "./state"; -import { - ErrStateNotFound, - ErrInvalidQueryString, - ErrStateAlreadyExists, -} from "./const"; -/** - * WorldState class is a wrapper around chaincode stub - * for managing lifecycle of a asset of type T (interface) on HL fabric - * provided methods - * - addState - * - getState - * - query - * - getAssetFromIterator - * - updateState - */ -export interface QueryResult { - Key: string; - Record: T; -} - -export abstract class WorldState extends State { - constructor(protected stub: ChaincodeStub) { - // keys are not used for the WorldState class - super([]); - } - - protected async addState(id: string, asset: T): Promise { - let error: Error; - try { - await this.getState(id); - } catch (err) { - error = err as Error; - } - if (!error) { - throw new Error( - `${ErrStateAlreadyExists} : asset with ID = ${id} already exists`, - ); - } - return await this.stub.putState(id, State.serialize(asset)); - } - - protected async updateState(id: string, asset: T): Promise { - // check if asset exists or not - await this.getState(id); - return await this.stub.putState(id, State.serialize(asset)); - } - - protected async getState(id: string): Promise { - const byteState: Uint8Array = await this.stub.getState(id); - if (!byteState || byteState.length === 0) { - throw new Error(`${ErrStateNotFound} : asset with ID = ${id} not found`); - } - return State.deserialize(byteState); - } - protected async query( - queryString = `{"selector": {}}`, - ): Promise[]> { - let iterator: Iterators.StateQueryIterator; - try { - iterator = await this.stub.getQueryResult(queryString); - } catch (error) { - throw new Error(`${ErrInvalidQueryString} : ${(error as Error).message}`); - } - return await this.getAssetFromIterator(iterator); - } - protected async getAssetFromIterator( - iterator: Iterators.StateQueryIterator, - ): Promise[]> { - const out: QueryResult[] = []; - let result = await iterator.next(); - while (!result.done) { - try { - out.push({ - Key: result.value.key, - Record: State.deserialize(result.value.value), - } as QueryResult); - result = await iterator.next(); - } catch (error) { - break; - } - } - iterator.close(); - return out; - } -} diff --git a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/tsconfig.json b/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/tsconfig.json deleted file mode 100644 index b90190a72e..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "outDir": "dist", - "target": "es2017", - "moduleResolution": "node", - "module": "commonjs", - "declaration": true, - "sourceMap": true - }, - "include": ["./src/**/*"], - "exclude": ["./src/**/*.spec.ts"] -} diff --git a/examples/cactus-example-carbon-accounting-backend/tsconfig.json b/examples/cactus-example-carbon-accounting-backend/tsconfig.json deleted file mode 100644 index 5a57052b46..0000000000 --- a/examples/cactus-example-carbon-accounting-backend/tsconfig.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-example-carbon-accounting-backend.tsbuildinfo" - }, - "references": [ - { - "path": "../../packages/cactus-api-client/tsconfig.json" - }, - { - "path": "../../packages/cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-example-carbon-accounting-business-logic-plugin/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-xdai/tsconfig.json" - }, - { - "path": "../../packages/cactus-test-tooling/tsconfig.json" - } - ], - "include": [ - "./src", - "src/**/*.json" - ], - "exclude": [ - "./src/utility-emissions-channel" - ] -} \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/CHANGELOG.md b/examples/cactus-example-carbon-accounting-business-logic-plugin/CHANGELOG.md deleted file mode 100644 index d7b4b84845..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/CHANGELOG.md +++ /dev/null @@ -1,154 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **carbon-accounting:** deleted incorrect plugin aspect ([e30f48a](https://github.com/hyperledger/cactus/commit/e30f48abcc8dfcd6fb17ec1ba90c4e742222543f)) -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) - -### Features - -* **core-api:** plugin interface async initializer ([d40f68b](https://github.com/hyperledger/cactus/commit/d40f68bd9eaff498df8514fe7397986b5a2f865d)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-business-logic-plugin diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/openapitools.json b/examples/cactus-example-carbon-accounting-business-logic-plugin/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/package.json b/examples/cactus-example-carbon-accounting-business-logic-plugin/package.json deleted file mode 100644 index 3174aa46ce..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "@hyperledger/cactus-example-carbon-accounting-business-logic-plugin", - "version": "2.0.0", - "description": "An example business logic plugin implementation for Cactus", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-example-carbon-accounting-business-logic-plugin.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "run-p 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-consortium-manual": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0", - "async-exit-hook": "2.0.1", - "axios": "1.7.7", - "express": "4.21.0", - "openapi-types": "12.1.3", - "typescript-optional": "2.0.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@types/express": "5.0.0", - "@types/ssh2": "0.5.47", - "@types/uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-example-carbon-accounting-business-logic-plugin.web.umd.min.js", - "mainMinified": "dist/cactus-example-carbon-accounting-business-logic-plugin.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/json/openapi.json b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/json/openapi.json deleted file mode 100644 index f3300c7480..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/json/openapi.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Example - Carbon Accounting App", - "description": "Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "AuthzScope": { - "type": "string", - "enum": ["group:admin", "group:user"], - "x-enum-descriptions": [ - "Identities with the group:admin scope are administrators of the system.", - "Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions." - ], - "x-enum-varnames": ["GroupAdmin", "GroupUser"] - }, - "AuthzJwtClaim": { - "description": "Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1", - "type": "string", - "enum": ["Hyperledger Labs - Carbon Accounting Tool"], - "x-enum-descriptions": [ - "The \"iss\" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The \"iss\" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL." - ], - "x-enum-varnames": ["iss"] - }, - "Checkpoint": { - "required": ["fromBlock", "votes"], - "properties": { - "fromBlock": { - "type": "integer", - "format": "uint32", - "nullable": false - }, - "votes": { - "type": "string", - "nullable": false, - "format": "uint96" - } - } - }, - "EnrollAdminInfo": { - "type": "string", - "enum": [ - "Successfully enrolled admin user and imported it into the wallet", - "ORG ADMIN REGISTERED" - ], - "x-enum-varnames": [ - "SUCCESSFULLY_ENROLLED_ADMIN", - "ORG_ADMIN_REGISTERED" - ] - }, - "EnrollAdminV1Request": { - "type": "object", - "required": ["orgName"], - "properties": { - "orgName": { - "type": "string", - "minLength": 1, - "maxLength": 1024 - } - } - }, - "EnrollAdminV1Response": { - "type": "object", - "required": ["info", "orgName", "msp", "caName"], - "properties": { - "info": { - "type": "string", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "orgName": { - "type": "string", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "msp": { - "type": "string", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "caName": { - "type": "string", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "identityId": { - "description": "The key under which the identity created will be persisted to the keychain for later retrieval.", - "type": "string", - "minLength": 1, - "maxLength": 2048, - "nullable": false - } - } - }, - "DaoTokenGetAllowanceRequest": { - "type": "object", - "required": ["account", "spender"], - "properties": { - "account": { - "description": "The address of the account holding the funds", - "type": "string", - "minLength": 40, - "maxLength": 42 - }, - "spender": { - "description": "The address of the account spending the funds", - "type": "string", - "minLength": 40, - "maxLength": 42 - } - } - }, - "DaoTokenGetAllowanceResponse": { - "type": "object", - "required": ["allowance"], - "properties": { - "allowance": { - "type": "integer", - "nullable": false, - "description": "The number of tokens approved" - } - } - }, - "DaoTokenGetAllowanceNotFoundResponse": { - "type": "object", - "required": ["accountFound", "spenderFound"], - "properties": { - "accountFound": { - "type": "boolean", - "nullable": false, - "description": "Indicates whether the account was found or not." - }, - "spenderFound": { - "type": "boolean", - "nullable": false, - "description": "Indicates whether the spender was found or not." - } - } - } - } - }, - "paths": { - "/api/v1/utilityemissionchannel/registerEnroll/admin": { - "post": { - "operationId": "enrollAdminV1", - "summary": "Registers an admin account within the Fabric organization specified.", - "x-hyperledger-cacti": { - "authz": { - "isProtected": true, - "requiredRoles": ["group:admin"] - }, - "http": { - "verbLowerCase": "post", - "path": "/api/v1/utilityemissionchannel/registerEnroll/admin" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrollAdminV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrollAdminV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-carbon-accounting-backend/dao-token/get-allowance": { - "post": { - "operationId": "daoTokenGetAllowanceV1", - "summary": "Get the number of tokens `spender` is approved to spend on behalf of `account`", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-example-carbon-accounting-backend/dao-token/get-allowance" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DaoTokenGetAllowanceRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DaoTokenGetAllowanceResponse" - } - } - } - }, - "404": { - "description": "NOT_FOUND", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DaoTokenGetAllowanceNotFoundResponse" - } - } - } - } - } - } - } - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/json/openapi.tpl.json b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/json/openapi.tpl.json deleted file mode 100644 index f3300c7480..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Example - Carbon Accounting App", - "description": "Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "AuthzScope": { - "type": "string", - "enum": ["group:admin", "group:user"], - "x-enum-descriptions": [ - "Identities with the group:admin scope are administrators of the system.", - "Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions." - ], - "x-enum-varnames": ["GroupAdmin", "GroupUser"] - }, - "AuthzJwtClaim": { - "description": "Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1", - "type": "string", - "enum": ["Hyperledger Labs - Carbon Accounting Tool"], - "x-enum-descriptions": [ - "The \"iss\" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The \"iss\" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL." - ], - "x-enum-varnames": ["iss"] - }, - "Checkpoint": { - "required": ["fromBlock", "votes"], - "properties": { - "fromBlock": { - "type": "integer", - "format": "uint32", - "nullable": false - }, - "votes": { - "type": "string", - "nullable": false, - "format": "uint96" - } - } - }, - "EnrollAdminInfo": { - "type": "string", - "enum": [ - "Successfully enrolled admin user and imported it into the wallet", - "ORG ADMIN REGISTERED" - ], - "x-enum-varnames": [ - "SUCCESSFULLY_ENROLLED_ADMIN", - "ORG_ADMIN_REGISTERED" - ] - }, - "EnrollAdminV1Request": { - "type": "object", - "required": ["orgName"], - "properties": { - "orgName": { - "type": "string", - "minLength": 1, - "maxLength": 1024 - } - } - }, - "EnrollAdminV1Response": { - "type": "object", - "required": ["info", "orgName", "msp", "caName"], - "properties": { - "info": { - "type": "string", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "orgName": { - "type": "string", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "msp": { - "type": "string", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "caName": { - "type": "string", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "identityId": { - "description": "The key under which the identity created will be persisted to the keychain for later retrieval.", - "type": "string", - "minLength": 1, - "maxLength": 2048, - "nullable": false - } - } - }, - "DaoTokenGetAllowanceRequest": { - "type": "object", - "required": ["account", "spender"], - "properties": { - "account": { - "description": "The address of the account holding the funds", - "type": "string", - "minLength": 40, - "maxLength": 42 - }, - "spender": { - "description": "The address of the account spending the funds", - "type": "string", - "minLength": 40, - "maxLength": 42 - } - } - }, - "DaoTokenGetAllowanceResponse": { - "type": "object", - "required": ["allowance"], - "properties": { - "allowance": { - "type": "integer", - "nullable": false, - "description": "The number of tokens approved" - } - } - }, - "DaoTokenGetAllowanceNotFoundResponse": { - "type": "object", - "required": ["accountFound", "spenderFound"], - "properties": { - "accountFound": { - "type": "boolean", - "nullable": false, - "description": "Indicates whether the account was found or not." - }, - "spenderFound": { - "type": "boolean", - "nullable": false, - "description": "Indicates whether the spender was found or not." - } - } - } - } - }, - "paths": { - "/api/v1/utilityemissionchannel/registerEnroll/admin": { - "post": { - "operationId": "enrollAdminV1", - "summary": "Registers an admin account within the Fabric organization specified.", - "x-hyperledger-cacti": { - "authz": { - "isProtected": true, - "requiredRoles": ["group:admin"] - }, - "http": { - "verbLowerCase": "post", - "path": "/api/v1/utilityemissionchannel/registerEnroll/admin" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrollAdminV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrollAdminV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-carbon-accounting-backend/dao-token/get-allowance": { - "post": { - "operationId": "daoTokenGetAllowanceV1", - "summary": "Get the number of tokens `spender` is approved to spend on behalf of `account`", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-example-carbon-accounting-backend/dao-token/get-allowance" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DaoTokenGetAllowanceRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DaoTokenGetAllowanceResponse" - } - } - } - }, - "404": { - "description": "NOT_FOUND", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DaoTokenGetAllowanceNotFoundResponse" - } - } - } - } - } - } - } - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 5a3b78468c..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,32 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/AuthzJwtClaim.kt -src/main/kotlin/org/openapitools/client/models/AuthzScope.kt -src/main/kotlin/org/openapitools/client/models/Checkpoint.kt -src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceNotFoundResponse.kt -src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceRequest.kt -src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceResponse.kt -src/main/kotlin/org/openapitools/client/models/EnrollAdminInfo.kt -src/main/kotlin/org/openapitools/client/models/EnrollAdminV1Request.kt -src/main/kotlin/org/openapitools/client/models/EnrollAdminV1Response.kt diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/README.md b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 1ef5cdfb23..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Example - Carbon Accounting App - -Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**daoTokenGetAllowanceV1**](docs/DefaultApi.md#daotokengetallowancev1) | **POST** /api/v1/plugins/@hyperledger/cactus-example-carbon-accounting-backend/dao-token/get-allowance | Get the number of tokens `spender` is approved to spend on behalf of `account` -*DefaultApi* | [**enrollAdminV1**](docs/DefaultApi.md#enrolladminv1) | **POST** /api/v1/utilityemissionchannel/registerEnroll/admin | Registers an admin account within the Fabric organization specified. - - - -## Documentation for Models - - - [org.openapitools.client.models.AuthzJwtClaim](docs/AuthzJwtClaim.md) - - [org.openapitools.client.models.AuthzScope](docs/AuthzScope.md) - - [org.openapitools.client.models.Checkpoint](docs/Checkpoint.md) - - [org.openapitools.client.models.DaoTokenGetAllowanceNotFoundResponse](docs/DaoTokenGetAllowanceNotFoundResponse.md) - - [org.openapitools.client.models.DaoTokenGetAllowanceRequest](docs/DaoTokenGetAllowanceRequest.md) - - [org.openapitools.client.models.DaoTokenGetAllowanceResponse](docs/DaoTokenGetAllowanceResponse.md) - - [org.openapitools.client.models.EnrollAdminInfo](docs/EnrollAdminInfo.md) - - [org.openapitools.client.models.EnrollAdminV1Request](docs/EnrollAdminV1Request.md) - - [org.openapitools.client.models.EnrollAdminV1Response](docs/EnrollAdminV1Response.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index 6649d6df96..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,199 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.DaoTokenGetAllowanceNotFoundResponse -import org.openapitools.client.models.DaoTokenGetAllowanceRequest -import org.openapitools.client.models.DaoTokenGetAllowanceResponse -import org.openapitools.client.models.EnrollAdminV1Request -import org.openapitools.client.models.EnrollAdminV1Response - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Get the number of tokens `spender` is approved to spend on behalf of `account` - * - * @param daoTokenGetAllowanceRequest (optional) - * @return DaoTokenGetAllowanceResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun daoTokenGetAllowanceV1(daoTokenGetAllowanceRequest: DaoTokenGetAllowanceRequest? = null) : DaoTokenGetAllowanceResponse { - val localVarResponse = daoTokenGetAllowanceV1WithHttpInfo(daoTokenGetAllowanceRequest = daoTokenGetAllowanceRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DaoTokenGetAllowanceResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get the number of tokens `spender` is approved to spend on behalf of `account` - * - * @param daoTokenGetAllowanceRequest (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun daoTokenGetAllowanceV1WithHttpInfo(daoTokenGetAllowanceRequest: DaoTokenGetAllowanceRequest?) : ApiResponse { - val localVariableConfig = daoTokenGetAllowanceV1RequestConfig(daoTokenGetAllowanceRequest = daoTokenGetAllowanceRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation daoTokenGetAllowanceV1 - * - * @param daoTokenGetAllowanceRequest (optional) - * @return RequestConfig - */ - fun daoTokenGetAllowanceV1RequestConfig(daoTokenGetAllowanceRequest: DaoTokenGetAllowanceRequest?) : RequestConfig { - val localVariableBody = daoTokenGetAllowanceRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-example-carbon-accounting-backend/dao-token/get-allowance", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Registers an admin account within the Fabric organization specified. - * - * @param enrollAdminV1Request (optional) - * @return EnrollAdminV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun enrollAdminV1(enrollAdminV1Request: EnrollAdminV1Request? = null) : EnrollAdminV1Response { - val localVarResponse = enrollAdminV1WithHttpInfo(enrollAdminV1Request = enrollAdminV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as EnrollAdminV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Registers an admin account within the Fabric organization specified. - * - * @param enrollAdminV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun enrollAdminV1WithHttpInfo(enrollAdminV1Request: EnrollAdminV1Request?) : ApiResponse { - val localVariableConfig = enrollAdminV1RequestConfig(enrollAdminV1Request = enrollAdminV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation enrollAdminV1 - * - * @param enrollAdminV1Request (optional) - * @return RequestConfig - */ - fun enrollAdminV1RequestConfig(enrollAdminV1Request: EnrollAdminV1Request?) : RequestConfig { - val localVariableBody = enrollAdminV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/utilityemissionchannel/registerEnroll/admin", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AuthzJwtClaim.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AuthzJwtClaim.kt deleted file mode 100644 index 2db76c4d5a..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AuthzJwtClaim.kt +++ /dev/null @@ -1,60 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1 - * - * Values: iss - */ - -@JsonClass(generateAdapter = false) -enum class AuthzJwtClaim(val value: kotlin.String) { - - @Json(name = "Hyperledger Labs - Carbon Accounting Tool") - iss("Hyperledger Labs - Carbon Accounting Tool"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is AuthzJwtClaim) "$data" else null - - /** - * Returns a valid [AuthzJwtClaim] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): AuthzJwtClaim? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AuthzScope.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AuthzScope.kt deleted file mode 100644 index f661a3b52d..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AuthzScope.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * Values: GroupAdmin,GroupUser - */ - -@JsonClass(generateAdapter = false) -enum class AuthzScope(val value: kotlin.String) { - - @Json(name = "group:admin") - GroupAdmin("group:admin"), - - @Json(name = "group:user") - GroupUser("group:user"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is AuthzScope) "$data" else null - - /** - * Returns a valid [AuthzScope] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): AuthzScope? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Checkpoint.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Checkpoint.kt deleted file mode 100644 index d6b8aaafb8..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Checkpoint.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param fromBlock - * @param votes - */ - - -data class Checkpoint ( - - @Json(name = "fromBlock") - val fromBlock: kotlin.Int, - - @Json(name = "votes") - val votes: kotlin.String - -) - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceNotFoundResponse.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceNotFoundResponse.kt deleted file mode 100644 index 0f72c44658..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceNotFoundResponse.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param accountFound Indicates whether the account was found or not. - * @param spenderFound Indicates whether the spender was found or not. - */ - - -data class DaoTokenGetAllowanceNotFoundResponse ( - - /* Indicates whether the account was found or not. */ - @Json(name = "accountFound") - val accountFound: kotlin.Boolean, - - /* Indicates whether the spender was found or not. */ - @Json(name = "spenderFound") - val spenderFound: kotlin.Boolean - -) - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceRequest.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceRequest.kt deleted file mode 100644 index 5439d83eec..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceRequest.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param account The address of the account holding the funds - * @param spender The address of the account spending the funds - */ - - -data class DaoTokenGetAllowanceRequest ( - - /* The address of the account holding the funds */ - @Json(name = "account") - val account: kotlin.String, - - /* The address of the account spending the funds */ - @Json(name = "spender") - val spender: kotlin.String - -) - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceResponse.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceResponse.kt deleted file mode 100644 index b19f4d525e..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DaoTokenGetAllowanceResponse.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param allowance The number of tokens approved - */ - - -data class DaoTokenGetAllowanceResponse ( - - /* The number of tokens approved */ - @Json(name = "allowance") - val allowance: kotlin.Int - -) - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/EnrollAdminInfo.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/EnrollAdminInfo.kt deleted file mode 100644 index 2acbe7efd2..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/EnrollAdminInfo.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * Values: SUCCESSFULLY_ENROLLED_ADMIN,ORG_ADMIN_REGISTERED - */ - -@JsonClass(generateAdapter = false) -enum class EnrollAdminInfo(val value: kotlin.String) { - - @Json(name = "Successfully enrolled admin user and imported it into the wallet") - SUCCESSFULLY_ENROLLED_ADMIN("Successfully enrolled admin user and imported it into the wallet"), - - @Json(name = "ORG ADMIN REGISTERED") - ORG_ADMIN_REGISTERED("ORG ADMIN REGISTERED"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is EnrollAdminInfo) "$data" else null - - /** - * Returns a valid [EnrollAdminInfo] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): EnrollAdminInfo? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/EnrollAdminV1Request.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/EnrollAdminV1Request.kt deleted file mode 100644 index 4ad4f4b408..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/EnrollAdminV1Request.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param orgName - */ - - -data class EnrollAdminV1Request ( - - @Json(name = "orgName") - val orgName: kotlin.String - -) - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/EnrollAdminV1Response.kt b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/EnrollAdminV1Response.kt deleted file mode 100644 index 1288bf1e82..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/EnrollAdminV1Response.kt +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param info - * @param orgName - * @param msp - * @param caName - * @param identityId The key under which the identity created will be persisted to the keychain for later retrieval. - */ - - -data class EnrollAdminV1Response ( - - @Json(name = "info") - val info: kotlin.String, - - @Json(name = "orgName") - val orgName: kotlin.String, - - @Json(name = "msp") - val msp: kotlin.String, - - @Json(name = "caName") - val caName: kotlin.String, - - /* The key under which the identity created will be persisted to the keychain for later retrieval. */ - @Json(name = "identityId") - val identityId: kotlin.String? = null - -) - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/carbon-accounting-plugin.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/carbon-accounting-plugin.ts deleted file mode 100644 index 675ff7d465..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/carbon-accounting-plugin.ts +++ /dev/null @@ -1,178 +0,0 @@ -import { Express } from "express"; -import { v4 as uuidv4 } from "uuid"; - -import OAS from "../../json/openapi.json"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { - ICactusPlugin, - IPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - DefaultApi as XdaiApi, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-xdai"; - -import { - DefaultApi as FabricApi, - PluginLedgerConnectorFabric, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import { - ICarbonAccountingFabricContractDeploymentInfo, - ICarbonAccountingXdaiContractDeploymentInfo, -} from "../i-carbon-accounting-contract-deployment-info"; - -import { GetAllowanceEndpoint } from "./web-services/dao-token/get-allowance-endpoint"; - -import { - EnrollAdminInfo, - EnrollAdminV1Request, - EnrollAdminV1Response, -} from "../generated/openapi/typescript-axios"; -import { EnrollAdminV1Endpoint } from "./web-services/utility-emissions-channel/enroll-admin-v1-endpoint"; - -export interface OrgEnv { - CORE_PEER_LOCALMSPID: string; - CORE_PEER_ADDRESS: string; - CORE_PEER_MSPCONFIGPATH: string; - CORE_PEER_TLS_ROOTCERT_FILE: string; - ORDERER_TLS_ROOTCERT_FILE: string; -} - -export interface ICarbonAccountingPluginOptions { - logLevel?: LogLevelDesc; - instanceId: string; - keychainId: string; - pluginRegistry: PluginRegistry; - xdaiApiClient: XdaiApi; - fabricApiClient: FabricApi; - fabricPlugin: PluginLedgerConnectorFabric; - web3SigningCredential?: Web3SigningCredential; - fabricEnvironment?: NodeJS.ProcessEnv; - fabricContracts: ICarbonAccountingFabricContractDeploymentInfo; - xdaiContracts: ICarbonAccountingXdaiContractDeploymentInfo; -} - -export class CarbonAccountingPlugin - implements ICactusPlugin, IPluginWebService -{ - public static readonly CLASS_NAME = "CarbonAccountingPlugin"; - - private readonly log: Logger; - private readonly instanceId: string; - - private endpoints: IWebServiceEndpoint[] | undefined; - - public get className(): string { - return CarbonAccountingPlugin.CLASS_NAME; - } - - public get keychain(): PluginKeychainMemory { - const { keychainId, pluginRegistry } = this.options; - return pluginRegistry.findOneByKeychainId(keychainId); - } - - constructor(public readonly options: ICarbonAccountingPluginOptions) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} arg options.instanceId`); - Checks.nonBlankString(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy(options.fabricContracts, `${fnTag} arg options.contracts`); - Checks.truthy(options.fabricPlugin, `${fnTag} arg options.fabricPlugin`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.instanceId = options.instanceId; - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - webServices.forEach((ws) => ws.registerExpress(app)); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const getAllowanceEp = new GetAllowanceEndpoint({ - plugin: this, - logLevel: this.options.logLevel, - }); - - const enrollAdminEp = new EnrollAdminV1Endpoint({ - plugin: this, - logLevel: this.options.logLevel, - }); - - const theEndpoints = [getAllowanceEp, enrollAdminEp]; - this.endpoints = theEndpoints; - return theEndpoints; - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return "@hyperledger/cactus-example-carbon-accounting-backend"; - } - - public async onPluginInit(): Promise { - return; - } - - public async enrollAdminV1( - req: EnrollAdminV1Request, - ): Promise { - const { fabricPlugin } = this.options; - - const caId = "ca.org1.example.com"; - const enrollmentID = "admin"; - const enrollmentSecret = "adminpw"; - const mspId = "Org1MSP"; - const identityId = "fabric_admin_identity_" + uuidv4(); - - const [identity] = await fabricPlugin.enrollAdmin( - caId, - identityId, - mspId, - enrollmentID, - enrollmentSecret, - ); - - this.keychain.set(identityId, JSON.stringify(identity)); - this.log.debug(`Stored Fabric admin identity on keychain as ${identityId}`); - - const res: EnrollAdminV1Response = { - caName: caId, - info: EnrollAdminInfo.ORG_ADMIN_REGISTERED, - msp: mspId, - orgName: req.orgName, - }; - return res; - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/dao-token/get-allowance-endpoint.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/dao-token/get-allowance-endpoint.ts deleted file mode 100644 index 5413d8b9ee..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/dao-token/get-allowance-endpoint.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { DaoTokenGetAllowanceRequest } from "../../../generated/openapi/typescript-axios"; -import { CarbonAccountingPlugin } from "../../carbon-accounting-plugin"; -import OAS from "../../../../json/openapi.json"; - -export interface IGetAllowanceEndpointOptions { - logLevel?: LogLevelDesc; - plugin: CarbonAccountingPlugin; -} - -export class GetAllowanceEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetAllowanceEndpoint "; - - private readonly log: Logger; - - public get className(): string { - return GetAllowanceEndpoint.CLASS_NAME; - } - - constructor(public readonly opts: IGetAllowanceEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public async registerExpress(app: Express): Promise { - registerWebServiceEndpoint(app, this); - return this; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-example-carbon-accounting-backend/dao-token/get-allowance"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-example-carbon-accounting-backend/dao-token/get-allowance" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - const reqBody = req.body as DaoTokenGetAllowanceRequest; - this.log.debug(`${tag} %o`, reqBody); - const resBody = await Promise.resolve("dummy-response-fixme"); - res.status(200); - res.json(resBody); - } catch (ex: unknown) { - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: safeStringifyException(ex) }); - } - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/utility-emissions-channel/enroll-admin-v1-endpoint.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/utility-emissions-channel/enroll-admin-v1-endpoint.ts deleted file mode 100644 index f0e6999302..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/utility-emissions-channel/enroll-admin-v1-endpoint.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { EnrollAdminV1Request } from "../../../generated/openapi/typescript-axios"; -import { CarbonAccountingPlugin } from "../../carbon-accounting-plugin"; -import OAS from "../../../../json/openapi.json"; - -export interface IEnrollAdminV1EndpointOptions { - logLevel?: LogLevelDesc; - plugin: CarbonAccountingPlugin; -} - -export class EnrollAdminV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "EnrollAdminV1Endpoint "; - - private readonly log: Logger; - - public get className(): string { - return EnrollAdminV1Endpoint.CLASS_NAME; - } - - constructor(public readonly opts: IEnrollAdminV1EndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public async registerExpress(app: Express): Promise { - registerWebServiceEndpoint(app, this); - return this; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - return { - get: async () => this.oasPath.post["x-hyperledger-cacti"].authz, - }; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/utilityemissionchannel/registerEnroll/admin"] { - return OAS.paths["/api/v1/utilityemissionchannel/registerEnroll/admin"]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - const reqBody = req.body as EnrollAdminV1Request; - this.log.debug(`${tag} %o`, reqBody); - const resBody = await this.opts.plugin.enrollAdminV1(reqBody); - res.status(200); - res.json(resBody); - } catch (ex: unknown) { - const exStr = safeStringifyException(ex); - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: exStr }); - } - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/api.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 7138b5b95b..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,368 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Example - Carbon Accounting App - * Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1 - * @export - * @enum {string} - */ - -export const AuthzJwtClaim = { - /** - * The "iss" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The "iss" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL. - */ - iss: 'Hyperledger Labs - Carbon Accounting Tool' -} as const; - -export type AuthzJwtClaim = typeof AuthzJwtClaim[keyof typeof AuthzJwtClaim]; - - -/** - * - * @export - * @enum {string} - */ - -export const AuthzScope = { - /** - * Identities with the group:admin scope are administrators of the system. - */ - GroupAdmin: 'group:admin', - /** - * Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions. - */ - GroupUser: 'group:user' -} as const; - -export type AuthzScope = typeof AuthzScope[keyof typeof AuthzScope]; - - -/** - * - * @export - * @interface Checkpoint - */ -export interface Checkpoint { - /** - * - * @type {number} - * @memberof Checkpoint - */ - 'fromBlock': number; - /** - * - * @type {string} - * @memberof Checkpoint - */ - 'votes': string; -} -/** - * - * @export - * @interface DaoTokenGetAllowanceNotFoundResponse - */ -export interface DaoTokenGetAllowanceNotFoundResponse { - /** - * Indicates whether the account was found or not. - * @type {boolean} - * @memberof DaoTokenGetAllowanceNotFoundResponse - */ - 'accountFound': boolean; - /** - * Indicates whether the spender was found or not. - * @type {boolean} - * @memberof DaoTokenGetAllowanceNotFoundResponse - */ - 'spenderFound': boolean; -} -/** - * - * @export - * @interface DaoTokenGetAllowanceRequest - */ -export interface DaoTokenGetAllowanceRequest { - /** - * The address of the account holding the funds - * @type {string} - * @memberof DaoTokenGetAllowanceRequest - */ - 'account': string; - /** - * The address of the account spending the funds - * @type {string} - * @memberof DaoTokenGetAllowanceRequest - */ - 'spender': string; -} -/** - * - * @export - * @interface DaoTokenGetAllowanceResponse - */ -export interface DaoTokenGetAllowanceResponse { - /** - * The number of tokens approved - * @type {number} - * @memberof DaoTokenGetAllowanceResponse - */ - 'allowance': number; -} -/** - * - * @export - * @enum {string} - */ - -export const EnrollAdminInfo = { - SUCCESSFULLY_ENROLLED_ADMIN: 'Successfully enrolled admin user and imported it into the wallet', - ORG_ADMIN_REGISTERED: 'ORG ADMIN REGISTERED' -} as const; - -export type EnrollAdminInfo = typeof EnrollAdminInfo[keyof typeof EnrollAdminInfo]; - - -/** - * - * @export - * @interface EnrollAdminV1Request - */ -export interface EnrollAdminV1Request { - /** - * - * @type {string} - * @memberof EnrollAdminV1Request - */ - 'orgName': string; -} -/** - * - * @export - * @interface EnrollAdminV1Response - */ -export interface EnrollAdminV1Response { - /** - * - * @type {string} - * @memberof EnrollAdminV1Response - */ - 'info': string; - /** - * - * @type {string} - * @memberof EnrollAdminV1Response - */ - 'orgName': string; - /** - * - * @type {string} - * @memberof EnrollAdminV1Response - */ - 'msp': string; - /** - * - * @type {string} - * @memberof EnrollAdminV1Response - */ - 'caName': string; - /** - * The key under which the identity created will be persisted to the keychain for later retrieval. - * @type {string} - * @memberof EnrollAdminV1Response - */ - 'identityId'?: string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Get the number of tokens `spender` is approved to spend on behalf of `account` - * @param {DaoTokenGetAllowanceRequest} [daoTokenGetAllowanceRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - daoTokenGetAllowanceV1: async (daoTokenGetAllowanceRequest?: DaoTokenGetAllowanceRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-example-carbon-accounting-backend/dao-token/get-allowance`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(daoTokenGetAllowanceRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Registers an admin account within the Fabric organization specified. - * @param {EnrollAdminV1Request} [enrollAdminV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - enrollAdminV1: async (enrollAdminV1Request?: EnrollAdminV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/utilityemissionchannel/registerEnroll/admin`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(enrollAdminV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Get the number of tokens `spender` is approved to spend on behalf of `account` - * @param {DaoTokenGetAllowanceRequest} [daoTokenGetAllowanceRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async daoTokenGetAllowanceV1(daoTokenGetAllowanceRequest?: DaoTokenGetAllowanceRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.daoTokenGetAllowanceV1(daoTokenGetAllowanceRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Registers an admin account within the Fabric organization specified. - * @param {EnrollAdminV1Request} [enrollAdminV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async enrollAdminV1(enrollAdminV1Request?: EnrollAdminV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.enrollAdminV1(enrollAdminV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Get the number of tokens `spender` is approved to spend on behalf of `account` - * @param {DaoTokenGetAllowanceRequest} [daoTokenGetAllowanceRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - daoTokenGetAllowanceV1(daoTokenGetAllowanceRequest?: DaoTokenGetAllowanceRequest, options?: any): AxiosPromise { - return localVarFp.daoTokenGetAllowanceV1(daoTokenGetAllowanceRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Registers an admin account within the Fabric organization specified. - * @param {EnrollAdminV1Request} [enrollAdminV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - enrollAdminV1(enrollAdminV1Request?: EnrollAdminV1Request, options?: any): AxiosPromise { - return localVarFp.enrollAdminV1(enrollAdminV1Request, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Get the number of tokens `spender` is approved to spend on behalf of `account` - * @param {DaoTokenGetAllowanceRequest} [daoTokenGetAllowanceRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public daoTokenGetAllowanceV1(daoTokenGetAllowanceRequest?: DaoTokenGetAllowanceRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).daoTokenGetAllowanceV1(daoTokenGetAllowanceRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Registers an admin account within the Fabric organization specified. - * @param {EnrollAdminV1Request} [enrollAdminV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public enrollAdminV1(enrollAdminV1Request?: EnrollAdminV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).enrollAdminV1(enrollAdminV1Request, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/base.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 482229d724..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Example - Carbon Accounting App - * Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/common.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 3e9e5ae59e..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Example - Carbon Accounting App - * Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 5dbdcef5f2..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Example - Carbon Accounting App - * Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/index.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index c068864ad3..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Example - Carbon Accounting App - * Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/i-carbon-accounting-contract-deployment-info.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/i-carbon-accounting-contract-deployment-info.ts deleted file mode 100644 index 8e90a4b4b8..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/i-carbon-accounting-contract-deployment-info.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { IEthContractDeployment } from "./i-eth-contract-deployment"; -import { IFabricContractDeployment } from "./i-fabric-contract-deployment"; - -export interface ICarbonAccountingXdaiContractDeploymentInfo { - daoToken: IEthContractDeployment; - governor: IEthContractDeployment; - timelock: IEthContractDeployment; - netEmissionsTokenNetwork: IEthContractDeployment; -} - -export interface ICarbonAccountingFabricContractDeploymentInfo { - emissions: IFabricContractDeployment; -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/i-eth-contract-deployment.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/i-eth-contract-deployment.ts deleted file mode 100644 index 4f1eddad05..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/i-eth-contract-deployment.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IEthContractDeployment { - address: string; - abi: unknown; - bytecode: string; -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/i-fabric-contract-deployment.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/i-fabric-contract-deployment.ts deleted file mode 100644 index f749ed10ae..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/i-fabric-contract-deployment.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IFabricContractDeployment { - chaincodeId: string; - channelName: string; -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/index.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/index.web.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/index.web.ts deleted file mode 100755 index bdf54028d2..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/model/converter/checkpoint-converter.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/model/converter/checkpoint-converter.ts deleted file mode 100644 index f6eeb23712..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/model/converter/checkpoint-converter.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Checkpoint } from "../../generated/openapi/typescript-axios"; - -/** - * Responsible for converting model entities such as the `Checkpoint` to and - * from the different representations it can exist in such as a generic JS - * object with key/value pair properties or when being returned as an array of - * values by a Solidity smart contract for example where the indices of the - * array can be mapped to the field names. - */ -export class CheckpointConverter { - public static SOLIDITY_FIELD_FROM_BLOCK = 0; - public static SOLIDITY_FIELD_VOTES = 1; - - /** - * Converts a `Checkpoint` model entity from an array representation ( - * usually returned by a solidity contract function) to a Plain Old Java Object. - * - * @param arr The array containing the values of properties describing a - * `Checkpoint` model entity. - */ - public static ofSolidityStruct(arr: unknown[]): Checkpoint { - return { - fromBlock: arr[CheckpointConverter.SOLIDITY_FIELD_FROM_BLOCK] as number, - votes: arr[CheckpointConverter.SOLIDITY_FIELD_VOTES] as string, - }; - } - - public static ofSolidityStructList(arrayOfArrays: unknown[][]): Checkpoint[] { - return arrayOfArrays.map(CheckpointConverter.ofSolidityStruct); - } -} diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/public-api.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/public-api.ts deleted file mode 100755 index 216a405823..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/public-api.ts +++ /dev/null @@ -1,16 +0,0 @@ -export { - ICarbonAccountingPluginOptions, - CarbonAccountingPlugin, - OrgEnv, -} from "./business-logic-plugin/carbon-accounting-plugin"; - -export { IEthContractDeployment } from "./i-eth-contract-deployment"; - -export { - ICarbonAccountingFabricContractDeploymentInfo, - ICarbonAccountingXdaiContractDeploymentInfo, -} from "./i-carbon-accounting-contract-deployment-info"; - -export { IFabricContractDeployment } from "./i-fabric-contract-deployment"; - -export * from "./generated/openapi/typescript-axios/index"; diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/test/typescript/integration/api-surface.test.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/test/typescript/unit/api-surface.test.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/tsconfig.json b/examples/cactus-example-carbon-accounting-business-logic-plugin/tsconfig.json deleted file mode 100644 index e075f8e47a..0000000000 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/tsconfig.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-example-carbon-accounting-business-logic-plugin.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../../packages/cactus-api-client/tsconfig.json" - }, - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-consortium-manual/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-xdai/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-frontend/.gitignore b/examples/cactus-example-carbon-accounting-frontend/.gitignore deleted file mode 100644 index 81b7ca7474..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -/.angular/cache -# Specifies intentionally untracked files to ignore when using Git -# http://git-scm.com/docs/gitignore - -*~ -*.sw[mnpcod] -.tmp -*.tmp -*.tmp.* -*.sublime-project -*.sublime-workspace -.DS_Store -Thumbs.db -UserInterfaceState.xcuserstate -$RECYCLE.BIN/ - -*.log -log.txt -npm-debug.log* - -/.idea -/.ionic -/.sass-cache -/.sourcemaps -/.versions -/.vscode -/coverage -/dist -/node_modules -/platforms -/plugins -/www diff --git a/examples/cactus-example-carbon-accounting-frontend/CHANGELOG.md b/examples/cactus-example-carbon-accounting-frontend/CHANGELOG.md deleted file mode 100644 index 5855db57d5..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/CHANGELOG.md +++ /dev/null @@ -1,136 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Features - -* **cacti-cmd-gui-app:** add GUI to visualize Fabric, Ethereum blocks ([15d9e9d](https://github.com/hyperledger/cacti/commit/15d9e9dcdc072ac0f6be2bf5146102b1328faaaf)) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Bug Fixes - -* **examples:** front-end packages missing browserify polyfills [#1224](https://github.com/hyperledger/cactus/issues/1224) ([4cc6f2c](https://github.com/hyperledger/cactus/commit/4cc6f2c5d3345a7af8cc04b9218c38d7670872a8)) - -### Features - -* **cmd-api-server:** support grpc web services [#1189](https://github.com/hyperledger/cactus/issues/1189) ([4cace1d](https://github.com/hyperledger/cactus/commit/4cace1dca3377e09d2ed37fdadeec6b125d47896)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -### Bug Fixes - -* **release:** package.json publish config non-public [#753](https://github.com/hyperledger/cactus/issues/753) ([5a1b7a6](https://github.com/hyperledger/cactus/commit/5a1b7a6eba9a18d4f7474a3c44d4a4035fc99e84)) - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Features - -* **example:** example extended with fabric ([55d6587](https://github.com/hyperledger/cactus/commit/55d65872dc689ee3b319c23515c1fea1df0a6444)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -**Note:** Version bump only for package @hyperledger/cactus-example-carbon-accounting-frontend diff --git a/examples/cactus-example-carbon-accounting-frontend/angular.json b/examples/cactus-example-carbon-accounting-frontend/angular.json deleted file mode 100644 index dcce832c64..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/angular.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "app": { - "root": "", - "sourceRoot": "src", - "projectType": "application", - "prefix": "app", - "schematics": {}, - "architect": { - "build": { - "builder": "@angular-builders/custom-webpack:browser", - "options": { - "customWebpackConfig": { - "path": "./webpack.config.overrides.js", - "mergeRules": { - "externals": "replace" - } - }, - "outputPath": "www", - "index": "src/index.html", - "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.app.json", - "assets": [ - { - "glob": "**/*", - "input": "src/assets", - "output": "assets" - }, - { - "glob": "**/*.svg", - "input": "node_modules/ionicons/dist/ionicons/svg", - "output": "./svg" - } - ], - "styles": [ - { - "input": "src/theme/variables.scss", - "inject": true - }, - { - "input": "src/global.scss", - "inject": true - } - ], - "scripts": [], - "aot": false, - "vendorChunk": true, - "extractLicenses": false, - "buildOptimizer": false, - "sourceMap": true, - "optimization": false, - "namedChunks": true - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "budgets": [ - { - "type": "initial", - "maximumWarning": "2mb", - "maximumError": "5mb" - } - ] - }, - "ci": { - "progress": false - } - }, - "defaultConfiguration": "" - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "app:build" - }, - "configurations": { - "production": { - "browserTarget": "app:build:production" - }, - "ci": { - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "app:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "styles": [], - "scripts": [], - "assets": [ - { - "glob": "favicon.ico", - "input": "src/", - "output": "/" - }, - { - "glob": "**/*", - "input": "src/assets", - "output": "/assets" - } - ] - }, - "configurations": { - "ci": { - "progress": false, - "watch": false - } - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "app:serve" - }, - "configurations": { - "production": { - "devServerTarget": "app:serve:production" - }, - "ci": { - "devServerTarget": "app:serve:ci" - } - } - }, - "ionic-cordova-build": { - "builder": "@ionic/angular-toolkit:cordova-build", - "options": { - "browserTarget": "app:build" - }, - "configurations": { - "production": { - "browserTarget": "app:build:production" - } - } - }, - "ionic-cordova-serve": { - "builder": "@ionic/angular-toolkit:cordova-serve", - "options": { - "cordovaBuildTarget": "app:ionic-cordova-build", - "devServerTarget": "app:serve" - }, - "configurations": { - "production": { - "cordovaBuildTarget": "app:ionic-cordova-build:production", - "devServerTarget": "app:serve:production" - } - } - } - } - } - }, - "cli": { - "schematicCollections": [ - "@ionic/angular-toolkit" - ], - "analytics": false - }, - "schematics": { - "@ionic/angular-toolkit:component": { - "styleext": "scss" - }, - "@ionic/angular-toolkit:page": { - "styleext": "scss" - } - } -} \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-frontend/ionic.config.json b/examples/cactus-example-carbon-accounting-frontend/ionic.config.json deleted file mode 100644 index 68f939c59d..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/ionic.config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "cactus-example-carbon-accounting-frontend", - "integrations": {}, - "type": "angular" -} diff --git a/examples/cactus-example-carbon-accounting-frontend/package.json b/examples/cactus-example-carbon-accounting-frontend/package.json deleted file mode 100644 index 0015df2a31..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "@hyperledger/cactus-example-carbon-accounting-frontend", - "version": "2.0.0", - "description": "The frontend component of an example project demonstrating how Cacti can be used for cross-chain dapp development.", - "keywords": [ - "Hyperledger", - "Cacti", - "Blockchain Integration", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "files": [ - "www/*" - ], - "scripts": { - "build": "ng build", - "build:dev:frontend": "ng build", - "build:prod:frontend": "ng build", - "ng": "ng", - "prepublishOnly": "ng build", - "serve": "ng serve", - "serve:proxy": "ng serve -- --proxy-config proxy.conf.json", - "start": "ng serve" - }, - "dependencies": { - "@angular/common": "16.2.4", - "@angular/core": "16.2.4", - "@angular/forms": "16.2.4", - "@angular/platform-browser": "16.2.4", - "@angular/platform-browser-dynamic": "16.2.4", - "@angular/router": "16.2.4", - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-example-carbon-accounting-business-logic-plugin": "2.0.0", - "@hyperledger/cactus-plugin-consortium-manual": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@ionic-native/core": "5.36.0", - "@ionic-native/splash-screen": "patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch", - "@ionic-native/status-bar": "patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch", - "@ionic/angular": "7.3.3", - "browserify-fs": "1.0.0", - "net-browserify": "0.2.4", - "rxjs": "7.8.1", - "tls-browserify": "0.2.2", - "tslib": "2.6.2", - "zone.js": "0.13.1" - }, - "devDependencies": { - "@angular-builders/custom-webpack": "16.0.1", - "@angular-devkit/build-angular": "16.2.1", - "@angular/cli": "16.2.1", - "@angular/compiler": "16.2.4", - "@angular/compiler-cli": "16.2.4", - "@angular/language-service": "16.2.4", - "@ionic/angular-toolkit": "10.0.0", - "browserify-fs": "1.0.0", - "https-browserify": "1.0.0", - "net-browserify": "0.2.4", - "os-browserify": "0.3.0", - "path-browserify": "1.0.1", - "tls-browserify": "0.2.2" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/examples/cactus-example-carbon-accounting-frontend/proxy.conf.json b/examples/cactus-example-carbon-accounting-frontend/proxy.conf.json deleted file mode 100644 index 7f63608678..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/proxy.conf.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "/api": { - "target": "http://localhost:5100", - "secure": false, - "logLevel": "debug" - } -} \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-frontend/src/app/app-routing.module.ts b/examples/cactus-example-carbon-accounting-frontend/src/app/app-routing.module.ts deleted file mode 100644 index 718d71cc81..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/app/app-routing.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from "@angular/core"; -import { PreloadAllModules, RouterModule, Routes } from "@angular/router"; - -const routes: Routes = [ - { - path: "", - redirectTo: "/", - pathMatch: "full", - }, -]; - -@NgModule({ - imports: [ - RouterModule.forRoot(routes, { - preloadingStrategy: PreloadAllModules, - }), - ], - exports: [RouterModule], -}) -export class AppRoutingModule {} diff --git a/examples/cactus-example-carbon-accounting-frontend/src/app/app.component.html b/examples/cactus-example-carbon-accounting-frontend/src/app/app.component.html deleted file mode 100644 index 155fd2ef80..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/app/app.component.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - Hyperledger Cacti - Example: Carbon Accounting App - - - - - {{ p.title }} - - - - - - - - - diff --git a/examples/cactus-example-carbon-accounting-frontend/src/app/app.component.scss b/examples/cactus-example-carbon-accounting-frontend/src/app/app.component.scss deleted file mode 100644 index ff1091f338..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/app/app.component.scss +++ /dev/null @@ -1,105 +0,0 @@ -ion-menu ion-content { - --background: var(--ion-item-background, var(--ion-background-color, #fff)); -} - -ion-menu.md ion-content { - --padding-start: 8px; - --padding-end: 8px; - --padding-top: 20px; - --padding-bottom: 20px; -} - -ion-menu.md ion-list { - padding: 20px 0; -} - -ion-menu.md ion-note { - margin-bottom: 30px; -} - -ion-menu.md ion-list-header, -ion-menu.md ion-note { - padding-left: 10px; -} - -ion-menu.md ion-list#inbox-list { - border-bottom: 1px solid var(--ion-color-step-150, #d7d8da); -} - -ion-menu.md ion-list#inbox-list ion-list-header { - font-size: 22px; - font-weight: 600; - - min-height: 20px; -} - -ion-menu.md ion-item { - --padding-start: 10px; - --padding-end: 10px; - border-radius: 4px; -} - -ion-menu.md ion-item.selected { - --background: rgba(var(--ion-color-primary-rgb), 0.14); -} - -ion-menu.md ion-item.selected ion-icon { - color: var(--ion-color-primary); -} - -ion-menu.md ion-item ion-icon { - color: #616e7e; -} - -ion-menu.md ion-item ion-label { - font-weight: 500; -} - -ion-menu.ios ion-content { - --padding-bottom: 20px; -} - -ion-menu.ios ion-list { - padding: 20px 0 0 0; -} - -ion-menu.ios ion-note { - line-height: 24px; - margin-bottom: 20px; -} - -ion-menu.ios ion-item { - --padding-start: 16px; - --padding-end: 16px; - --min-height: 50px; -} - -ion-menu.ios ion-item.selected ion-icon { - color: var(--ion-color-primary); -} - -ion-menu.ios ion-item ion-icon { - font-size: 24px; - color: #73849a; -} - -ion-menu.ios ion-list-header, -ion-menu.ios ion-note { - padding-left: 16px; - padding-right: 16px; -} - -ion-menu.ios ion-note { - margin-bottom: 8px; -} - -ion-note { - display: inline-block; - font-size: 16px; - - color: var(--ion-color-medium-shade); -} - -ion-item.selected { - --color: var(--ion-color-primary); -} \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-frontend/src/app/app.component.ts b/examples/cactus-example-carbon-accounting-frontend/src/app/app.component.ts deleted file mode 100644 index 33e336dd5e..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/app/app.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from "@angular/core"; - -import { Platform } from "@ionic/angular"; -import { SplashScreen } from "@ionic-native/splash-screen/ngx"; -import { StatusBar } from "@ionic-native/status-bar/ngx"; - -@Component({ - selector: "app-root", - templateUrl: "app.component.html", - styleUrls: ["app.component.scss"], -}) -export class AppComponent { - public selectedIndex = 0; - public appPages = [ - { - title: "Bamboo Harvests", - url: "/bamboo-harvest-list", - icon: "leaf", - }, - ]; - - constructor( - private platform: Platform, - private splashScreen: SplashScreen, - private statusBar: StatusBar, - ) { - this.initializeApp(); - } - - initializeApp(): Promise { - return this.platform.ready().then(() => { - this.statusBar.styleDefault(); - this.splashScreen.hide(); - }); - } -} diff --git a/examples/cactus-example-carbon-accounting-frontend/src/app/app.module.ts b/examples/cactus-example-carbon-accounting-frontend/src/app/app.module.ts deleted file mode 100644 index d12e9e1b25..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/app/app.module.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { NgModule } from "@angular/core"; -import { BrowserModule } from "@angular/platform-browser"; -import { RouteReuseStrategy } from "@angular/router"; - -import { IonicModule, IonicRouteStrategy } from "@ionic/angular"; -import { SplashScreen } from "@ionic-native/splash-screen/ngx"; -import { StatusBar } from "@ionic-native/status-bar/ngx"; - -import { AppComponent } from "./app.component"; -import { AppRoutingModule } from "./app-routing.module"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - BESU_DEMO_LEDGER_ID, - CACTUS_API_URL, - FABRIC_DEMO_LEDGER_ID, -} from "../constants"; -import { ApiClient } from "@hyperledger/cactus-api-client"; - -LoggerProvider.setLogLevel("TRACE"); - -const log: Logger = LoggerProvider.getOrCreate({ label: "app-module" }); - -log.info("Running AppModule..."); -const cactusApiUrl = location.origin; -log.info("Instantiating ApiClient with CACTUS_API_URL=%o", cactusApiUrl); -const configuration = new Configuration({ basePath: cactusApiUrl }); -const apiClient = new ApiClient(configuration); - -@NgModule({ - declarations: [AppComponent], - imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule], - providers: [ - StatusBar, - SplashScreen, - { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }, - { - provide: CACTUS_API_URL, - useValue: cactusApiUrl, - }, - { - provide: BESU_DEMO_LEDGER_ID, - // This has to match the ledger ID defined in carbon-accounting-app.ts - useValue: "BesuDemoLedger", - }, - { - provide: FABRIC_DEMO_LEDGER_ID, - // This has to match the ledger ID defined in carbon-accounting-app.ts - useValue: "FabricDemoLedger", - }, - { provide: ApiClient, useValue: apiClient }, - ], - bootstrap: [AppComponent], -}) -export class AppModule {} diff --git a/examples/cactus-example-carbon-accounting-frontend/src/app/common/page-heading/page-heading-component.module.ts b/examples/cactus-example-carbon-accounting-frontend/src/app/common/page-heading/page-heading-component.module.ts deleted file mode 100644 index 068b580d6a..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/app/common/page-heading/page-heading-component.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from "@angular/core"; -import { CommonModule } from "@angular/common"; -import { ReactiveFormsModule, FormsModule } from "@angular/forms"; - -import { IonicModule } from "@ionic/angular"; - -import { PageHeadingComponent } from "./page-heading.component"; - -@NgModule({ - imports: [CommonModule, FormsModule, ReactiveFormsModule, IonicModule], - declarations: [PageHeadingComponent], - exports: [PageHeadingComponent], -}) -export class PageHeadingComponentModule {} diff --git a/examples/cactus-example-carbon-accounting-frontend/src/app/common/page-heading/page-heading.component.html b/examples/cactus-example-carbon-accounting-frontend/src/app/common/page-heading/page-heading.component.html deleted file mode 100644 index 06b7294ff1..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/app/common/page-heading/page-heading.component.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - {{ pageTitle }} - - \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-frontend/src/app/common/page-heading/page-heading.component.ts b/examples/cactus-example-carbon-accounting-frontend/src/app/common/page-heading/page-heading.component.ts deleted file mode 100644 index 7de782acdc..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/app/common/page-heading/page-heading.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from "@angular/core"; - -@Component({ - selector: "app-page-heading", - templateUrl: "page-heading.component.html", - styleUrls: [], -}) -export class PageHeadingComponent { - @Input() - public pageTitle: string; -} diff --git a/examples/cactus-example-carbon-accounting-frontend/src/assets/icon/favicon.png b/examples/cactus-example-carbon-accounting-frontend/src/assets/icon/favicon.png deleted file mode 100644 index 69a7b90517..0000000000 Binary files a/examples/cactus-example-carbon-accounting-frontend/src/assets/icon/favicon.png and /dev/null differ diff --git a/examples/cactus-example-carbon-accounting-frontend/src/assets/shapes.svg b/examples/cactus-example-carbon-accounting-frontend/src/assets/shapes.svg deleted file mode 100644 index d370b4dcc8..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/assets/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/cactus-example-carbon-accounting-frontend/src/constants.ts b/examples/cactus-example-carbon-accounting-frontend/src/constants.ts deleted file mode 100644 index 3827ff4884..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/constants.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { InjectionToken } from "@angular/core"; - -export const CACTUS_API_URL = new InjectionToken("CACTUS_API_URL"); - -export const BESU_DEMO_LEDGER_ID = new InjectionToken( - "BESU_DEMO_LEDGER_ID", -); - -export const FABRIC_DEMO_LEDGER_ID = new InjectionToken( - "FABRIC_DEMO_LEDGER_ID", -); diff --git a/examples/cactus-example-carbon-accounting-frontend/src/environments/environment.prod.ts b/examples/cactus-example-carbon-accounting-frontend/src/environments/environment.prod.ts deleted file mode 100644 index c9669790be..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/environments/environment.prod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const environment = { - production: true, -}; diff --git a/examples/cactus-example-carbon-accounting-frontend/src/environments/environment.ts b/examples/cactus-example-carbon-accounting-frontend/src/environments/environment.ts deleted file mode 100644 index 31cb7855f1..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/environments/environment.ts +++ /dev/null @@ -1,16 +0,0 @@ -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. -// The list of file replacements can be found in `angular.json`. - -export const environment = { - production: false, -}; - -/* - * For easier debugging in development mode, you can import the following file - * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. - * - * This import should be commented out in production mode because it will have a negative impact - * on performance if an error is thrown. - */ -// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/examples/cactus-example-carbon-accounting-frontend/src/global.scss b/examples/cactus-example-carbon-accounting-frontend/src/global.scss deleted file mode 100644 index d854de84ad..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/global.scss +++ /dev/null @@ -1,26 +0,0 @@ -/* - * App Global CSS - * ---------------------------------------------------------------------------- - * Put style rules here that you want to apply globally. These styles are for - * the entire app and not just one component. Additionally, this file can be - * used as an entry point to import other CSS/Sass files to be included in the - * output CSS. - * For more information on global stylesheets, visit the documentation: - * https://ionicframework.com/docs/layout/global-stylesheets - */ - -/* Core CSS required for Ionic components to work properly */ -@import "~@ionic/angular/css/core.css"; - -/* Basic CSS for apps built with Ionic */ -@import "~@ionic/angular/css/normalize.css"; -@import "~@ionic/angular/css/structure.css"; -@import "~@ionic/angular/css/typography.css"; -@import '~@ionic/angular/css/display.css'; - -/* Optional CSS utils that can be commented out */ -@import "~@ionic/angular/css/padding.css"; -@import "~@ionic/angular/css/float-elements.css"; -@import "~@ionic/angular/css/text-alignment.css"; -@import "~@ionic/angular/css/text-transformation.css"; -@import "~@ionic/angular/css/flex-utils.css"; diff --git a/examples/cactus-example-carbon-accounting-frontend/src/index.html b/examples/cactus-example-carbon-accounting-frontend/src/index.html deleted file mode 100644 index 34786e200b..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - Hyperledger Cacti Example - Carbon Accounting App - - - - - - - - - - - - - - - - - - - - diff --git a/examples/cactus-example-carbon-accounting-frontend/src/main.ts b/examples/cactus-example-carbon-accounting-frontend/src/main.ts deleted file mode 100644 index 7d5813f0fc..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/main.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { enableProdMode } from "@angular/core"; -import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; - -import { AppModule } from "./app/app.module"; -import { environment } from "./environments/environment"; - -if (environment.production) { - enableProdMode(); -} - -platformBrowserDynamic() - .bootstrapModule(AppModule) - // tslint:disable-next-line: no-console - .catch((err) => console.log(err)); diff --git a/examples/cactus-example-carbon-accounting-frontend/src/polyfills.ts b/examples/cactus-example-carbon-accounting-frontend/src/polyfills.ts deleted file mode 100644 index f76b6092f7..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/polyfills.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/guide/browser-support - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - * because those flags need to be set before `zone.js` being loaded, and webpack - * will put import in the top of bundle, so user need to create a separate file - * in this directory (for example: zone-flags.ts), and put the following flags - * into that file, and then add the following code before importing zone.js. - * import './zone-flags.ts'; - * - * The flags allowed in zone-flags.ts are listed here. - * - * The following flags will work for all browsers. - * - * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - * - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - * - * (window as any).__Zone_enable_cross_context_check = true; - * - */ - -import "./zone-flags"; - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ - -import "zone.js"; // Included with Angular CLI. - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/examples/cactus-example-carbon-accounting-frontend/src/theme/variables.scss b/examples/cactus-example-carbon-accounting-frontend/src/theme/variables.scss deleted file mode 100644 index b910e58625..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/theme/variables.scss +++ /dev/null @@ -1,232 +0,0 @@ -// Ionic Variables and Theming. For more info, please see: -// http://ionicframework.com/docs/theming/ - -/** Ionic CSS Variables **/ -:root { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; -} - -@media (prefers-color-scheme: dark) { - /* - * Dark Colors - * ------------------------------------------- - */ - - body { - --ion-color-primary: #428cff; - --ion-color-primary-rgb: 66,140,255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255,255,255; - --ion-color-primary-shade: #3a7be0; - --ion-color-primary-tint: #5598ff; - - --ion-color-secondary: #50c8ff; - --ion-color-secondary-rgb: 80,200,255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255,255,255; - --ion-color-secondary-shade: #46b0e0; - --ion-color-secondary-tint: #62ceff; - - --ion-color-tertiary: #6a64ff; - --ion-color-tertiary-rgb: 106,100,255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255,255,255; - --ion-color-tertiary-shade: #5d58e0; - --ion-color-tertiary-tint: #7974ff; - - --ion-color-success: #2fdf75; - --ion-color-success-rgb: 47,223,117; - --ion-color-success-contrast: #000000; - --ion-color-success-contrast-rgb: 0,0,0; - --ion-color-success-shade: #29c467; - --ion-color-success-tint: #44e283; - - --ion-color-warning: #ffd534; - --ion-color-warning-rgb: 255,213,52; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0,0,0; - --ion-color-warning-shade: #e0bb2e; - --ion-color-warning-tint: #ffd948; - - --ion-color-danger: #ff4961; - --ion-color-danger-rgb: 255,73,97; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255,255,255; - --ion-color-danger-shade: #e04055; - --ion-color-danger-tint: #ff5b71; - - --ion-color-dark: #f4f5f8; - --ion-color-dark-rgb: 244,245,248; - --ion-color-dark-contrast: #000000; - --ion-color-dark-contrast-rgb: 0,0,0; - --ion-color-dark-shade: #d7d8da; - --ion-color-dark-tint: #f5f6f9; - - --ion-color-medium: #989aa2; - --ion-color-medium-rgb: 152,154,162; - --ion-color-medium-contrast: #000000; - --ion-color-medium-contrast-rgb: 0,0,0; - --ion-color-medium-shade: #86888f; - --ion-color-medium-tint: #a2a4ab; - - --ion-color-light: #222428; - --ion-color-light-rgb: 34,36,40; - --ion-color-light-contrast: #ffffff; - --ion-color-light-contrast-rgb: 255,255,255; - --ion-color-light-shade: #1e2023; - --ion-color-light-tint: #383a3e; - } - - /* - * iOS Dark Theme - * ------------------------------------------- - */ - - .ios body { - --ion-background-color: #000000; - --ion-background-color-rgb: 0,0,0; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255,255,255; - - --ion-color-step-50: #0d0d0d; - --ion-color-step-100: #1a1a1a; - --ion-color-step-150: #262626; - --ion-color-step-200: #333333; - --ion-color-step-250: #404040; - --ion-color-step-300: #4d4d4d; - --ion-color-step-350: #595959; - --ion-color-step-400: #666666; - --ion-color-step-450: #737373; - --ion-color-step-500: #808080; - --ion-color-step-550: #8c8c8c; - --ion-color-step-600: #999999; - --ion-color-step-650: #a6a6a6; - --ion-color-step-700: #b3b3b3; - --ion-color-step-750: #bfbfbf; - --ion-color-step-800: #cccccc; - --ion-color-step-850: #d9d9d9; - --ion-color-step-900: #e6e6e6; - --ion-color-step-950: #f2f2f2; - - --ion-toolbar-background: #0d0d0d; - - --ion-item-background: #000000; - - --ion-card-background: #1c1c1d; - } - - - /* - * Material Design Dark Theme - * ------------------------------------------- - */ - - .md body { - --ion-background-color: #121212; - --ion-background-color-rgb: 18,18,18; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255,255,255; - - --ion-border-color: #222222; - - --ion-color-step-50: #1e1e1e; - --ion-color-step-100: #2a2a2a; - --ion-color-step-150: #363636; - --ion-color-step-200: #414141; - --ion-color-step-250: #4d4d4d; - --ion-color-step-300: #595959; - --ion-color-step-350: #656565; - --ion-color-step-400: #717171; - --ion-color-step-450: #7d7d7d; - --ion-color-step-500: #898989; - --ion-color-step-550: #949494; - --ion-color-step-600: #a0a0a0; - --ion-color-step-650: #acacac; - --ion-color-step-700: #b8b8b8; - --ion-color-step-750: #c4c4c4; - --ion-color-step-800: #d0d0d0; - --ion-color-step-850: #dbdbdb; - --ion-color-step-900: #e7e7e7; - --ion-color-step-950: #f3f3f3; - - --ion-item-background: #1e1e1e; - - --ion-toolbar-background: #1f1f1f; - - --ion-tab-bar-background: #1f1f1f; - - --ion-card-background: #1e1e1e; - } -} \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-frontend/src/zone-flags.ts b/examples/cactus-example-carbon-accounting-frontend/src/zone-flags.ts deleted file mode 100644 index e999ae9d11..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/src/zone-flags.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Prevents Angular change detection from - * running with certain Web Component callbacks - */ -(window as any).__Zone_disable_customElements = true; diff --git a/examples/cactus-example-carbon-accounting-frontend/tsconfig.app.json b/examples/cactus-example-carbon-accounting-frontend/tsconfig.app.json deleted file mode 100644 index d3e03472b8..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/tsconfig.app.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./out-tsc/app", - "types": [], - "composite": false, - "incremental": true - }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.ts", - "src/**/*.d.ts" - ], - "exclude": [ - "src/**/*.spec.ts" - ] -} diff --git a/examples/cactus-example-carbon-accounting-frontend/tsconfig.json b/examples/cactus-example-carbon-accounting-frontend/tsconfig.json deleted file mode 100644 index d39620fcd8..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/tsconfig.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "composite": true, - "baseUrl": "./", - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": true, - "downlevelIteration": true, - "experimentalDecorators": true, - "module": "esnext", - "moduleResolution": "node", - "esModuleInterop": true, - "importHelpers": true, - "target": "ES2022", - "lib": [ - "es2018", - "dom" - ], - "resolveJsonModule": true, - "rootDir": "./src", - "skipLibCheck": true, - "tsBuildInfoFile": "../../.build-cache/cactus-example-carbon-accounting-frontend.tsbuildinfo", - "useDefineForClassFields": false - }, - "angularCompilerOptions": { - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true - }, - "references": [ - { - "path": "../../packages/cactus-api-client/tsconfig.json" - }, - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-example-carbon-accounting-business-logic-plugin/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-consortium-manual/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/examples/cactus-example-carbon-accounting-frontend/webpack.config.overrides.js b/examples/cactus-example-carbon-accounting-frontend/webpack.config.overrides.js deleted file mode 100644 index 0eee5cb3f1..0000000000 --- a/examples/cactus-example-carbon-accounting-frontend/webpack.config.overrides.js +++ /dev/null @@ -1,22 +0,0 @@ -/** @type {import("webpack").Configuration} */ -module.exports = { - externals: { - express: "express", - "prom-client": "prom-client", - }, - resolve: { - fallback: { - crypto: require.resolve("crypto-browserify"), - buffer: require.resolve("buffer/"), - fs: require.resolve("browserify-fs"), - http: require.resolve("stream-http"), - https: require.resolve("https-browserify"), - net: require.resolve("net-browserify"), - os: require.resolve("os-browserify/browser"), - path: require.resolve("path-browserify"), - stream: require.resolve("stream-browserify"), - tls: require.resolve("tls-browserify"), - zlib: require.resolve("browserify-zlib"), - }, - }, -}; diff --git a/examples/cactus-example-cbdc-bridging-backend/CHANGELOG.md b/examples/cactus-example-cbdc-bridging-backend/CHANGELOG.md deleted file mode 100644 index f577e5bce5..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/CHANGELOG.md +++ /dev/null @@ -1,76 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-example-cbdc-bridging-backend - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-cbdc-bridging-backend - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-cbdc-bridging-backend - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-cbdc-bridging-backend - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **cactus-example-cbdc-bridging-backend:** add missing CRPC port config option ([84c0733](https://github.com/hyperledger/cacti/commit/84c0733db93e6b2cd91050c48641562130f3ea0b)) -* **cmd-api-server:** fix CVE-2023-36665 protobufjs try 2 ([4e8b553](https://github.com/hyperledger/cacti/commit/4e8b5534d6a86c856768c0b47af794d66304f90d)), closes [#2682](https://github.com/hyperledger/cacti/issues/2682) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **plugin-satp-hermes:** replace IPFS dependency in SATP package ([3bb7157](https://github.com/hyperledger/cacti/commit/3bb7157b8c910c31aa3fe125ecfb3437c2bef5bb)), closes [#2984](https://github.com/hyperledger/cacti/issues/2984) [#3006](https://github.com/hyperledger/cacti/issues/3006) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Features - -* **cbdc-bridging-app:** implementation of CBDC bridging example ([ca1b3be](https://github.com/hyperledger/cacti/commit/ca1b3be87bcc3242790647a71be8eb5db3dcd931)), closes [#2205](https://github.com/hyperledger/cacti/issues/2205) diff --git a/examples/cactus-example-cbdc-bridging-backend/Dockerfile b/examples/cactus-example-cbdc-bridging-backend/Dockerfile deleted file mode 100644 index 0276cab7a8..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/Dockerfile +++ /dev/null @@ -1,69 +0,0 @@ -FROM cruizba/ubuntu-dind:19.03.11 - -USER root - -RUN apt-get update -RUN apt -y upgrade - -# Need curl for healthchecks -RUN apt-get -y install --no-install-recommends curl - -# The file binary is used to inspect exectubles when debugging container image issues -RUN apt-get -y install --no-install-recommends file - -RUN apt-get -y install --no-install-recommends ca-certificates -RUN apt-get -y install --no-install-recommends tzdata - -RUN apt-get -y install --no-install-recommends git -RUN apt-get -y install --no-install-recommends apt-utils - -RUN apt -y install --no-install-recommends default-jdk - -ARG APP=/usr/src/app/cactus/ -COPY . ${APP} - -ENV TZ=Etc/UTC - -RUN mkdir -p ${APP} - -RUN mkdir -p "${APP}/log/" - -WORKDIR ${APP} - -SHELL ["/bin/bash", "--login", "-i", "-c"] -# Installing Node Version Manager (nvm) -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash - -RUN source ~/.bashrc && \ - nvm install 16.8.0 && \ - npm install -g yarn && \ - npm run configure - -SHELL ["/bin/bash", "--login", "-c"] - -COPY ./examples/cactus-example-cbdc-bridging-backend/healthcheck.sh / - -ENV API_HOST=localhost -ENV API_SERVER_1_PORT=4000 -ENV API_SERVER_2_PORT=4100 -ENV API_HOST_FRONTEND=localhost -ENV API_PORT_FRONTEND=2000 - -COPY examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts /usr/src/app/cactus/examples/cactus-example-cbdc-bridging-backend/dist/lib/fabric-contracts -COPY examples/cactus-example-cbdc-bridging-backend/supervisord.conf /etc/supervisord.conf -COPY examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh /run-cbdc-app.sh -RUN chmod +x /run-cbdc-app.sh - -# supervisord web ui/dashboard -EXPOSE 9001 -# API #1 -EXPOSE 4000 -# API #2 -EXPOSE 4100 - -# Extend the parent image's entrypoint -# https://superuser.com/questions/1459466/can-i-add-an-additional-docker-entrypoint-script -ENTRYPOINT ["/usr/bin/supervisord"] -CMD ["--configuration", "/etc/supervisord.conf", "--nodaemon"] -HEALTHCHECK --interval=1s --timeout=5s --start-period=20s --retries=250 \ - CMD /usr/src/app/cactus/examples/cbdc-bridge-app/healthcheck.sh diff --git a/examples/cactus-example-cbdc-bridging-backend/README.md b/examples/cactus-example-cbdc-bridging-backend/README.md deleted file mode 100644 index c401469412..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Hyperledger Cactus Example - CBDC Bridging between Fabric and Besu Backend - -## Running the Test Suites - -> Make sure you have all the dependencies set up as explained in `BUILD.md` - -On the terminal, issue the following commands in the project root: - -1. `npm run configure` -2. `npm run start:example-cbdc-bridging-app` - -Wait for the output to show the message `CbdcBridgingApp running...` - -In a second terminal run the following commands from the project root: -3. `cd examples/cactus-example-cbdc-bridging-backend` -4. `npm run test` - -## Running the Example Application Locally - -> Make sure you have all the dependencies set up as explained in `BUILD.md` - -On the terminal, issue the following commands: - -1. `npm run configure` -2. `npm run start:example-cbdc-bridging-app` - -Wait for the output to show the message `CbdcBridgingApp running...` - -## Debugging the Example Application Locally - -On the terminal, issue the following commands (steps 1 to 6) and then perform the rest of the steps manually. - -1. `npm run configure` -2. Locate the `.vscode/template.launch.json` file -3. Within that file locate the entry named `"Example: CBDC Bridging Fabric-EVM App"` -4. Copy the VSCode debug definition object from 2) to your `.vscode/launch.json` file -5. At this point the VSCode `Run and Debug` panel on the left should have an option also titled `"Example: CBDC Bridging Fabric-EVM App"` which starts the application -6. Wait for the output to show the message `CbdcBridgingApp running...` diff --git a/examples/cactus-example-cbdc-bridging-backend/healthcheck.sh b/examples/cactus-example-cbdc-bridging-backend/healthcheck.sh deleted file mode 100644 index a4f7037da3..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/healthcheck.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -curl -v -i -X OPTIONS http://127.0.0.1:${API_SERVER_1_PORT} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/package.json b/examples/cactus-example-cbdc-bridging-backend/package.json deleted file mode 100644 index 5411fa1c73..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "name": "@hyperledger/cactus-example-cbdc-bridging-backend", - "version": "2.0.0", - "description": "An example application showing how to use Cacti when implementing a CBDC bridging application between Hyperledger Fabric and Hyperledger Besu.", - "keywords": [ - "Hyperledger", - "Cacti", - "ODAP", - "Fabric", - "Besu", - "Blockchain", - "CBDC" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "André Augusto", - "email": "andre.augusto@tecnico.ulisboa.pt" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-example-cbdc-bridging-backend.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "build:dev:backend:postbuild": "mkdir -p ./dist/lib/fabric-contracts && cp -r ./src/fabric-contracts/* ./dist/lib/fabric-contracts/", - "solidity": "hardhat compile", - "start": "node dist/lib/main/typescript/cbdc-bridging-app-cli.js dotenv_config_path=./process.env", - "test": "nyc cucumber-js ./src/test/typescript/cucumber/features/*.feature --require-module ts-node/register --require './src/test/typescript/cucumber/*/*.ts'", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0", - "@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0", - "@hyperledger/cactus-plugin-satp-hermes": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@openzeppelin/contracts": "4.9.6", - "@openzeppelin/contracts-upgradeable": "4.9.6", - "async-exit-hook": "2.0.1", - "axios": "1.7.7", - "crypto-js": "4.2.0", - "dotenv": "16.0.1", - "fabric-network": "2.2.20", - "fs-extra": "11.2.0", - "knex": "2.5.1", - "kubo-rpc-client": "3.0.1", - "nyc": "13.1.0", - "openapi-types": "12.1.3", - "sqlite3": "5.1.5", - "typescript-optional": "2.0.1", - "uuid": "10.0.0", - "web3-core": "1.10.1", - "web3-utils": "1.10.1" - }, - "devDependencies": { - "@types/crypto-js": "4.1.1", - "@types/cucumber": "4.0.4", - "@types/express": "5.0.0", - "@types/express-jwt": "6.0.2", - "@types/fs-extra": "11.0.4", - "@types/node": "18.11.9", - "@types/uuid": "10.0.0", - "cucumber": "5.0.3", - "hardhat": "2.17.2", - "http-status-codes": "2.1.4", - "jose": "4.15.5", - "remix-tests": "0.1.34", - "ts-node": "7.0.1" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-example-cbdc-bridging-backend.web.umd.min.js", - "mainMinified": "dist/cactus-example-cbdc-bridging-backend.node.umd.min.js", - "watch": { - "solidity": { - "patterns": [ - "./src/main/solidity/" - ], - "extensions": "sol" - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/process.env b/examples/cactus-example-cbdc-bridging-backend/process.env deleted file mode 100644 index 351fca7848..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/process.env +++ /dev/null @@ -1,8 +0,0 @@ -API_HOST=localhost -API_SERVER_1_PORT=4000 -API_SERVER_2_PORT=4100 -API_HOST_FRONTEND=localhost -API_PORT_FRONTEND=2000 -API_CRPC_HOST=localhost -API_SERVER_1_CRPC_PORT=6000 -API_SERVER_2_CRPC_PORT=6100 \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh b/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh deleted file mode 100755 index 5eba756f93..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -function main() -{ - echo "Sleeping to let dockerd spin up" - sleep 10 - - docker pull ghcr.io/hyperledger/cactus-besu-all-in-one:2021-01-08-7a055c3 - docker pull ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2 - docker pull ipfs/go-ipfs:v0.8.0 - - /root/.nvm/versions/node/v16.8.0/bin/node -r ts-node/register /usr/src/app/cactus/examples/cactus-example-cbdc-bridging-backend/dist/lib/main/typescript/cbdc-bridging-app-cli.js -} - -main diff --git a/examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json b/examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json deleted file mode 100644 index 67525f5577..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json +++ /dev/null @@ -1,39 +0,0 @@ -{ "info": { - "description": "this file contains data to be used for testing purposes only. It should not be changed. It should remain consistent with the crypto material in the fabric chaincode" - }, - "accounts": { - "userA": { - "ethAddress": "0x1A86D6f4b5D30A07D1a94bb232eF916AFe5DbDbc", - "privateKey": "0xb47c3ba5a816dbbb2271db721e76e6c80e58fe54972d26a42f00bc97a92a2535", - "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" - }, - "bridge": { - "ethAddress": "0xf28d5769171bfbD2B3628d722e58129a6aE15022", - "privateKey": "0x2917bd3b0dced512d3555f171a0979fedd37bb0593883089396d9b893aa0505d", - "fabricID": "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com" - }, - "userB": { - "ethAddress": "0xB264c626D7D09789AbfD2a431A28a054366e7b63", - "privateKey": "0xfe95d40663e60e9a8a2e1f4153c9e207ac26d928e8a5631647735d91e93be402", - "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userB::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" - } - }, - "gateways": { - "gateway1": { - "publicKey": "02e2beaa887c53d0ddb8383e2c49553545f50ae19074b4c7f79238dcb59f4b5fcb", - "privateKey": "206021a8ffaba949d21e32c02d76d2dc13da25e8197532ab300bb49d91397e52" - }, - "gateway2": { - "publicKey": "02309ff54e58748616aa81245c1a4457f11fab47dcdb45b107dbcde24ee772b609", - "privateKey": "6bb4c730739969ff3429be71dd62d05459e61bc3f2956326449ae2ca7de50fb6" - } - }, - "keychains": { - "keychain1": { - "id": "df05d3c2-ddd5-4074-aae3-526564217459" - }, - "keychain2": { - "id": "d741fb4a-c95c-4205-8afa-758a9423234f" - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore deleted file mode 100644 index 79bfe1a3e0..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# - - -# Coverage directory used by tools like istanbul -coverage - -# Dependency directories -node_modules/ -jspm_packages/ -package-lock.json - -# Compiled TypeScript files -dist - diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json deleted file mode 100644 index 1895375ca5..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "asset-reference-contract", - "version": "1.0.0", - "description": "Asset Reference contract implemented in TypeScript", - "main": "dist/index.js", - "typings": "dist/index.d.ts", - "engines": { - "node": ">=12", - "npm": ">=5" - }, - "scripts": { - "lint": "tslint -c tslint.json 'src/**/*.ts'", - "test": "nyc mocha -r ts-node/register src/**/*.spec.ts", - "start": "fabric-chaincode-node start", - "build": "tsc", - "build:watch": "tsc -w", - "prepublishOnly": "npm run build" - }, - "engineStrict": true, - "author": "Hyperledger", - "license": "Apache-2.0", - "dependencies": { - "fabric-contract-api": "^2.4.1", - "fabric-shim": "2.4.1" - }, - "devDependencies": { - "@types/chai": "^4.2.11", - "@types/chai-as-promised": "^7.1.2", - "@types/mocha": "^7.0.2", - "@types/node": "18.11.9", - "@types/sinon": "^7.5.2", - "@types/sinon-chai": "^3.2.3", - "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", - "mocha": "^9.2.0", - "nyc": "^15.0.0", - "sinon": "^9.0.1", - "sinon-chai": "^3.5.0", - "ts-node": "^8.8.1", - "tslint": "^6.1.0", - "typescript": "5.5.2", - "winston": "^3.2.1" - }, - "nyc": { - "extension": [ - ".ts", - ".tsx" - ], - "exclude": [ - "coverage/**", - "dist/**" - ], - "reporter": [ - "text-summary", - "html" - ], - "all": true, - "check-coverage": true, - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts deleted file mode 100644 index 9109626447..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts +++ /dev/null @@ -1,293 +0,0 @@ -/* - * SPDX-License-Identifier: Apache 2.0 - */ - -import { Context } from "fabric-contract-api"; -import { ChaincodeStub, ClientIdentity } from "fabric-shim"; -import { AssetReferenceContract } from "."; - -import * as winston from "winston"; -import * as chai from "chai"; -import * as chaiAsPromised from "chai-as-promised"; -import * as sinon from "sinon"; -import * as sinonChai from "sinon-chai"; - -const bridgedOutAmountKey = "amountBridgedOut"; - -const USER_A_FABRIC_ID = - "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com"; - -const USER_A_ETH_ADDRESS = - "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com"; - -chai.should(); -chai.use(chaiAsPromised); -chai.use(sinonChai); - -class TestContext extends Context { - public stub: sinon.SinonStubbedInstance = - sinon.createStubInstance(ChaincodeStub); - public clientIdentity: sinon.SinonStubbedInstance = - sinon.createStubInstance(ClientIdentity); - public logging = { - getLogger: sinon - .stub() - .returns(sinon.createStubInstance(winston.createLogger().constructor)), - setLevel: sinon.stub(), - }; -} - -describe("AssetReference", () => { - let contract: AssetReferenceContract; - let ctx: TestContext; - - beforeEach(() => { - contract = new AssetReferenceContract(); - ctx = new TestContext(); - ctx.clientIdentity.getMSPID.resolves("Org2MSP"); - ctx.stub.getState.withArgs(bridgedOutAmountKey).resolves(Buffer.from("50")); - ctx.stub.getState - .withArgs("1001") - .resolves( - Buffer.from( - `{"id":"1001","isLocked":false,"numberTokens":10,"recipient":"${USER_A_FABRIC_ID}"}`, - ), - ); - ctx.stub.getState - .withArgs("1002") - .resolves( - Buffer.from( - `{"id":"1002","isLocked":true,"numberTokens":30,"recipient":"${USER_A_FABRIC_ID}"}`, - ), - ); - }); - - describe("#assetReferenceExists", () => { - it("should return true for an asset reference", async () => { - await contract.AssetReferenceExists(ctx, "1001").should.eventually.be - .true; - }); - - it("should return false for an asset reference that does not exist", async () => { - await contract.AssetReferenceExists(ctx, "1003").should.eventually.be - .false; - }); - }); - - describe("#createAssetReference", () => { - it("should create an asset reference", async () => { - await contract.CreateAssetReference(ctx, "1003", 100, USER_A_FABRIC_ID); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - "1003", - Buffer.from( - `{"id":"1003","isLocked":false,"numberTokens":100,"recipient":"${USER_A_FABRIC_ID}"}`, - ), - ); - }); - - it("should throw an error for an asset reference that already exists", async () => { - await contract - .CreateAssetReference(ctx, "1001", 100, USER_A_FABRIC_ID) - .should.be.rejectedWith( - /The asset reference with ID 1001 already exists/, - ); - }); - }); - - describe("#readAssetReference", () => { - it("should return an asset reference", async () => { - await contract - .ReadAssetReference(ctx, "1001") - .should.eventually.deep.equal({ - id: "1001", - isLocked: false, - numberTokens: 10, - recipient: USER_A_FABRIC_ID, - }); - }); - - it("should throw an error for an asset reference that does not exist", async () => { - await contract - .ReadAssetReference(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - }); - - describe("#IsAssetReferenceLocked", () => { - it("should return true for a locked asset reference", async () => { - const result1 = await contract.IsAssetReferenceLocked(ctx, "1001"); - const result2 = await contract.IsAssetReferenceLocked(ctx, "1002"); - chai.expect(result1).to.be.false; - chai.expect(result2).to.be.true; - - await contract - .IsAssetReferenceLocked(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - }); - - describe("#lockAssetReference", () => { - it("should lock an asset reference", async () => { - await contract.LockAssetReference(ctx, "1001"); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - "1001", - Buffer.from( - `{"id":"1001","isLocked":true,"numberTokens":10,"recipient":"${USER_A_FABRIC_ID}"}`, - ), - ); - }); - - it("should throw an error for an asset reference that does not exist", async () => { - await contract - .LockAssetReference(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - - it("should throw an error for an asset reference already locked", async () => { - await contract - .LockAssetReference(ctx, "1002") - .should.be.rejectedWith(/The asset reference 1002 is already locked/); - }); - }); - - describe("#unlockAssetReference", () => { - it("should unlock an asset reference", async () => { - await contract.UnlockAssetReference(ctx, "1002"); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - "1002", - Buffer.from( - `{"id":"1002","isLocked":false,"numberTokens":30,"recipient":"${USER_A_FABRIC_ID}"}`, - ), - ); - }); - - it("should throw an error for an asset reference that does not exist", async () => { - await contract - .UnlockAssetReference(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - }); - - describe("#deleteAssetReference", () => { - it("should delete an asset reference", async () => { - await contract.DeleteAssetReference(ctx, "1001"); - ctx.stub.deleteState.should.have.been.calledOnceWithExactly("1001"); - }); - - it("should throw an error for an asset reference that does not exist", async () => { - await contract - .DeleteAssetReference(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - }); - - describe("#GetBridgedOutAmount", () => { - it("should increase bridged out amount", async () => { - await contract.IncreaseBridgedAmount(ctx, 1001); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - bridgedOutAmountKey, - Buffer.from("1051"), - ); - }); - - it("should decrease bridged out amount", async () => { - await contract.DecreaseBridgedAmount(ctx, 10); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - bridgedOutAmountKey, - Buffer.from("40"), - ); - }); - - it("should thrown an error trying to decrease bridged out", async () => { - await contract - .DecreaseBridgedAmount(ctx, 100) - .should.be.rejectedWith(/Bridged back too many tokens/); - }); - - it("should throw an error for an asset reference that does not exist", async () => { - await contract - .DeleteAssetReference(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - }); - - describe("#Refund", () => { - it("should decrease bridged out amount", async () => { - await contract.Refund(ctx, 20, USER_A_FABRIC_ID, USER_A_ETH_ADDRESS); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - bridgedOutAmountKey, - Buffer.from("30"), - ); - }); - }); - - describe("#checkValidTransfer", () => { - const assetID = "1001"; - const amount1 = "10"; - const amount2 = "500"; - - it("should be a valid transfer bridging out CBDC to own address", async () => { - await contract.CheckValidBridgeOut( - ctx, - assetID, - amount1, - USER_A_FABRIC_ID, - USER_A_ETH_ADDRESS, - ).should.not.be.rejected; - }); - - it("should throw an error transfer CBDC escrowed by another user", async () => { - await contract - .CheckValidBridgeOut( - ctx, - assetID, - amount1, - "USER_B_FABRIC_ID", - USER_A_ETH_ADDRESS, - ) - .should.be.rejectedWith( - /it is not possible to transfer tokens escrowed by another user/, - ); - }); - - it("should throw an error bridging out more than the escrowed CBDC", async () => { - await contract - .CheckValidBridgeOut( - ctx, - assetID, - amount2, - USER_A_FABRIC_ID, - USER_A_ETH_ADDRESS, - ) - .should.be.rejectedWith( - /it is not possible to transfer a different amount of CBDC than the ones escrowed/, - ); - }); - }); - - describe("#operations", () => { - const number1 = 10; - const number2 = 500; - - it("add two numbers", () => { - const result = contract.add(number1, number2); - chai.expect(result).to.equal(number1 + number2); - }); - - it("subtract two numbers", () => { - const result = contract.sub(number2, number1); - chai.expect(result).to.equal(number2 - number1); - }); - }); - - describe("#checkPermission", () => { - it("user from organization other than Org2 is not authorized to perform operations", () => { - ctx.clientIdentity.getMSPID.resolves("Org1MSP"); - contract - .LockAssetReference(ctx, "1001") - .should.be.rejectedWith( - `client is not authorized to perform the operation. Org1MSP != "Org2MSP"`, - ); - }); - }); -}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts deleted file mode 100644 index 3a1f1d6904..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts +++ /dev/null @@ -1,332 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { - Context, - Contract, - Info, - Returns, - Transaction, -} from "fabric-contract-api"; -import { AssetReference } from "./asset-reference"; - -const bridgedOutAmountKey = "amountBridgedOut"; - -@Info({ - title: "AssetReferenceContract", - description: "Smart contract for trading assets", -}) -export class AssetReferenceContract extends Contract { - // AssetReferenceExists returns true when asset with given ID exists in world state. - @Transaction(false) - @Returns("boolean") - public async AssetReferenceExists( - ctx: Context, - id: string, - ): Promise { - const assetJSON = await ctx.stub.getState(id); - return !!assetJSON && assetJSON.length > 0; - } - - // IsAssetReferenceLocked returns true when asset with given ID is locked in world state. - @Transaction(false) - @Returns("boolean") - public async IsAssetReferenceLocked( - ctx: Context, - id: string, - ): Promise { - const assetJSON = await ctx.stub.getState(id); - - if (assetJSON && assetJSON.length > 0) { - const asset = JSON.parse(assetJSON.toString()); - return asset.isLocked; - } else { - throw new Error(`The asset reference ${id} does not exist`); - } - } - - // CreateAssetReference issues a new asset to the world state with given details. - @Transaction() - public async CreateAssetReference( - ctx: Context, - assetId: string, - numberTokens: number, - recipient: string, - ): Promise { - console.log( - "Creating new asset reference with id: " + - assetId + - " representing " + - numberTokens + - " tokens", - ); - const exists: boolean = await this.AssetReferenceExists(ctx, assetId); - if (exists) { - throw new Error(`The asset reference with ID ${assetId} already exists`); - } - - const asset: AssetReference = { - id: assetId, - isLocked: false, - numberTokens: numberTokens, - recipient: recipient, - }; - - const buffer: Buffer = Buffer.from(JSON.stringify(asset)); - await ctx.stub.putState(assetId, buffer); - } - - @Transaction() - public async Refund( - ctx: Context, - numberTokens: number, - finalFabricIdentity: string, - ethAddress: string, - ): Promise { - await this.CheckPermission(ctx); - - console.log( - "Calling refund tokens to " + finalFabricIdentity + " from " + ethAddress, - ); - await ctx.stub.invokeChaincode( - "cbdc", - ["Refund", finalFabricIdentity, numberTokens.toString(), ethAddress], - ctx.stub.getChannelID(), - ); - - await this.DecreaseBridgedAmount(ctx, numberTokens); - } - - @Transaction(false) - @Returns("AssetReference") - public async ReadAssetReference( - ctx: Context, - assetId: string, - ): Promise { - const exists: boolean = await this.AssetReferenceExists(ctx, assetId); - if (!exists) { - throw new Error(`The asset reference ${assetId} does not exist`); - } - const data: Uint8Array = await ctx.stub.getState(assetId); - const asset: AssetReference = JSON.parse(data.toString()) as AssetReference; - return asset; - } - - @Transaction() - public async LockAssetReference( - ctx: Context, - assetId: string, - ): Promise { - await this.CheckPermission(ctx); - - const exists: boolean = await this.AssetReferenceExists(ctx, assetId); - if (!exists) { - throw new Error(`The asset reference ${assetId} does not exist`); - } - - if (await this.IsAssetReferenceLocked(ctx, assetId)) { - throw new Error(`The asset reference ${assetId} is already locked`); - } - - const asset: AssetReference = await this.ReadAssetReference(ctx, assetId); - asset.isLocked = true; - const buffer: Buffer = Buffer.from(JSON.stringify(asset)); - - console.log("Locking asset reference with id: " + assetId); - await ctx.stub.putState(assetId, buffer); - } - - @Transaction(false) - public async CheckValidBridgeOut( - ctx: Context, - assetId: string, - amount: string, - fabricID: string, - ethAddress: string, - ): Promise { - // check if this transfer is allowed - const asset: AssetReference = await this.ReadAssetReference(ctx, assetId); - - if (asset.recipient != fabricID) { - throw new Error( - `it is not possible to transfer tokens escrowed by another user`, - ); - } - - if (asset.numberTokens != parseInt(amount)) { - throw new Error( - `it is not possible to transfer a different amount of CBDC than the ones escrowed`, - ); - } - - await ctx.stub.invokeChaincode( - "cbdc", - ["checkAddressMapping", fabricID, ethAddress], - ctx.stub.getChannelID(), - ); - } - - @Transaction(false) - public async CheckValidBridgeBack( - ctx: Context, - fabricID: string, - ethAddress: string, - ): Promise { - await ctx.stub.invokeChaincode( - "cbdc", - ["checkAddressMapping", fabricID, ethAddress], - ctx.stub.getChannelID(), - ); - } - - @Transaction() - public async UnlockAssetReference( - ctx: Context, - assetId: string, - ): Promise { - await this.CheckPermission(ctx); - - const exists: boolean = await this.AssetReferenceExists(ctx, assetId); - if (!exists) { - throw new Error(`The asset reference ${assetId} does not exist`); - } - - const asset: AssetReference = await this.ReadAssetReference(ctx, assetId); - asset.isLocked = false; - const buffer: Buffer = Buffer.from(JSON.stringify(asset)); - - console.log("Unlocking asset reference with id: " + assetId); - await ctx.stub.putState(assetId, buffer); - } - - @Transaction() - public async DeleteAssetReference( - ctx: Context, - assetId: string, - ): Promise { - await this.CheckPermission(ctx); - - const exists: boolean = await this.AssetReferenceExists(ctx, assetId); - if (!exists) { - throw new Error(`The asset reference ${assetId} does not exist`); - } - const asset = await this.ReadAssetReference(ctx, assetId); - await this.IncreaseBridgedAmount(ctx, asset.numberTokens); - - console.log("Deleting asset reference with id: " + assetId); - await ctx.stub.deleteState(assetId); - } - - @Transaction(false) - public async GetBridgedOutAmount(ctx: Context): Promise { - const amountBytes = await ctx.stub.getState(bridgedOutAmountKey); - - let amountValue; - // If value doesn't yet exist, we'll create it with a value of 0 - if (!amountBytes || amountBytes.length === 0) { - amountValue = 0; - } else { - amountValue = parseInt(amountBytes.toString()); - } - - return amountValue; - } - - @Transaction() - public async IncreaseBridgedAmount( - ctx: Context, - value: number, - ): Promise { - await this.CheckPermission(ctx); - - const newBalance = this.add(await this.GetBridgedOutAmount(ctx), value); - await ctx.stub.putState( - bridgedOutAmountKey, - Buffer.from(newBalance.toString()), - ); - } - - @Transaction() - public async DecreaseBridgedAmount( - ctx: Context, - value: number, - ): Promise { - await this.CheckPermission(ctx); - - const newBalance = this.sub(await this.GetBridgedOutAmount(ctx), value); - - if (newBalance < 0) { - throw new Error(`Bridged back too many tokens`); - } - await ctx.stub.putState( - bridgedOutAmountKey, - Buffer.from(newBalance.toString()), - ); - } - - // GetAllAssets returns all assets found in the world state. - @Transaction(false) - public async GetAllAssetReferences(ctx: Context): Promise { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - const strValue = Buffer.from(result.value.value.toString()).toString( - "utf8", - ); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push(record); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } - - @Transaction() - public async ResetState(ctx: Context): Promise { - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - console.log(result.value); - await ctx.stub.putState(result.value.key, undefined); - result = await iterator.next(); - } - - await ctx.stub.putState(bridgedOutAmountKey, Buffer.from("0")); - } - - // add two number checking for overflow - add(a, b) { - const c = a + b; - if (a !== c - b || b !== c - a) { - throw new Error(`Math: addition overflow occurred ${a} + ${b}`); - } - return c; - } - - // add two number checking for overflow - sub(a, b) { - const c = a - b; - if (a !== c + b || b !== a - c) { - throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); - } - return c; - } - - private async CheckPermission(ctx: Context) { - // this needs to be called by entity2 (the bridging entity) - const clientMSPID = await ctx.clientIdentity.getMSPID(); - if (clientMSPID !== "Org2MSP") { - throw new Error( - `client is not authorized to perform the operation. ${clientMSPID} != "Org2MSP"`, - ); - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts deleted file mode 100644 index cab2df353e..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { Object, Property } from "fabric-contract-api"; - -@Object() -export class AssetReference { - @Property() - public id: string; - - @Property() - public isLocked: boolean; - - @Property() - public numberTokens: number; - - @Property() - public recipient: string; -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts deleted file mode 100644 index 97998610fb..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { AssetReferenceContract } from "./asset-reference-contract"; - -export { AssetReferenceContract } from "./asset-reference-contract"; - -export const contracts: any[] = [AssetReferenceContract]; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json deleted file mode 100644 index 4004da493c..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "outDir": "dist", - "target": "es2017", - "moduleResolution": "node", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "skipLibCheck": true - }, - "include": [ - "./src/**/*", - "src/**/*.json" - ], - "exclude": [ - "./src/**/*.spec.ts" - ] -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore deleted file mode 100644 index c84ff1dbdd..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore +++ /dev/null @@ -1,78 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ -package-lock.json - -# TypeScript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# next.js build output -.next - -# nuxt.js build output -.nuxt - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json deleted file mode 100644 index 1ec43cca91..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "description": "this file contains data to be used for testing purposes only. It should not be changed. It should remain consistent with the crypto material in the fabric chaincode" - }, - "accounts": { - "userA": { - "ethAddress": "0x1A86D6f4b5D30A07D1a94bb232eF916AFe5DbDbc", - "privateKey": "0xb47c3ba5a816dbbb2271db721e76e6c80e58fe54972d26a42f00bc97a92a2535", - "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" - }, - "bridge": { - "ethAddress": "0xf28d5769171bfbD2B3628d722e58129a6aE15022", - "privateKey": "0x2917bd3b0dced512d3555f171a0979fedd37bb0593883089396d9b893aa0505d", - "fabricID": "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com" - }, - "userB": { - "ethAddress": "0xB264c626D7D09789AbfD2a431A28a054366e7b63", - "privateKey": "0xfe95d40663e60e9a8a2e1f4153c9e207ac26d928e8a5631647735d91e93be402", - "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userB::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" - } - } -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js deleted file mode 100644 index 2c63fa92a5..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright IBM Corp. All Rights Reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict"; - -const tokenERC20Contract = require("./lib/tokenERC20.js"); - -module.exports.TokenERC20Contract = tokenERC20Contract; -module.exports.contracts = [tokenERC20Contract]; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js deleted file mode 100644 index 0ce3d715ba..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js +++ /dev/null @@ -1,689 +0,0 @@ -/* - * Copyright IBM Corp. All Rights Reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict"; - -const { Contract } = require("fabric-contract-api"); -const CryptoMaterial = require("../crypto-material/crypto-material.json"); - -const accounts = [ - { - fabric: CryptoMaterial.accounts.userA.fabricID, - ethereum: CryptoMaterial.accounts.userA.ethAddress, - }, - { - fabric: CryptoMaterial.accounts.userB.fabricID, - ethereum: CryptoMaterial.accounts.userB.ethAddress, - }, - { - fabric: CryptoMaterial.accounts.bridge.fabricID, - ethereum: CryptoMaterial.accounts.bridge.ethAddress, - }, -]; - -const FABRIC_BRIDGE_IDENTITY = CryptoMaterial.accounts.bridge.fabricID; - -// Define objectType names for prefix -const balancePrefix = "balance"; -const allowancePrefix = "allowance"; -const addressPrefix = "address"; - -// Define key names for options -const nameKey = "name"; -const symbolKey = "symbol"; -const decimalsKey = "decimals"; -const totalSupplyKey = "totalSupply"; - -class TokenERC20Contract extends Contract { - /** - * Return the name of the token - e.g. "MyToken". - * The original function name is `name` in ERC20 specification. - * However, 'name' conflicts with a parameter `name` in `Contract` class. - * As a work around, we use `TokenName` as an alternative function name. - * - * @param {Context} ctx the transaction context - * @returns {String} Returns the name of the token - */ - async TokenName(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const nameBytes = await ctx.stub.getState(nameKey); - - return nameBytes.toString(); - } - - /** - * Return the symbol of the token. E.g. “HIX”. - * - * @param {Context} ctx the transaction context - * @returns {String} Returns the symbol of the token - */ - async Symbol(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const symbolBytes = await ctx.stub.getState(symbolKey); - return symbolBytes.toString(); - } - - /** - * Return the number of decimals the token uses - * e.g. 8, means to divide the token amount by 100000000 to get its user representation. - * - * @param {Context} ctx the transaction context - * @returns {Number} Returns the number of decimals - */ - async Decimals(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const decimalsBytes = await ctx.stub.getState(decimalsKey); - const decimals = parseInt(decimalsBytes.toString()); - return decimals; - } - - /** - * Return the total token supply. - * - * @param {Context} ctx the transaction context - * @returns {Number} Returns the total token supply - */ - async TotalSupply(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); - const totalSupply = parseInt(totalSupplyBytes.toString()); - return totalSupply; - } - - /** - * BalanceOf returns the balance of the given account. - * - * @param {Context} ctx the transaction context - * @param {String} owner The owner from which the balance will be retrieved - * @returns {Number} Returns the account balance - */ - async BalanceOf(ctx, owner) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [owner]); - - const balanceBytes = await ctx.stub.getState(balanceKey); - if (!balanceBytes || balanceBytes.length === 0) { - throw new Error(`the account ${owner} does not exist`); - } - const balance = parseInt(balanceBytes.toString()); - - return balance; - } - - /** - * Transfer transfers tokens from client account to recipient account. - * recipient account must be a valid clientID as returned by the ClientAccountID() function. - * - * @param {Context} ctx the transaction context - * @param {String} to The recipient - * @param {Integer} value The amount of token to be transferred - * @returns {Boolean} Return whether the transfer was successful or not - */ - async Transfer(ctx, to, value) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const from = ctx.clientIdentity.getID(); - - const transferResp = await this._transfer(ctx, from, to, value); - if (!transferResp) { - throw new Error("Failed to transfer"); - } - - // Emit the Transfer event - const transferEvent = { from, to, value: parseInt(value) }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - - return true; - } - - /** - * Transfer `value` amount of tokens from `from` to `to`. - * - * @param {Context} ctx the transaction context - * @param {String} from The sender - * @param {String} to The recipient - * @param {Integer} value The amount of token to be transferred - * @returns {Boolean} Return whether the transfer was successful or not - */ - async TransferFrom(ctx, from, to, value) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const spender = ctx.clientIdentity.getID(); - - // Retrieve the allowance of the spender - const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ - from, - spender, - ]); - const currentAllowanceBytes = await ctx.stub.getState(allowanceKey); - - if (!currentAllowanceBytes || currentAllowanceBytes.length === 0) { - throw new Error(`spender ${spender} has no allowance from ${from}`); - } - - const currentAllowance = parseInt(currentAllowanceBytes.toString()); - - // Convert value from string to int - const valueInt = parseInt(value); - - // Check if the transferred value is less than the allowance - if (currentAllowance < valueInt) { - throw new Error("The spender does not have enough allowance to spend."); - } - - const transferResp = await this._transfer(ctx, from, to, value); - if (!transferResp) { - throw new Error("Failed to transfer"); - } - - // Decrease the allowance - const updatedAllowance = this.sub(currentAllowance, valueInt); - await ctx.stub.putState( - allowanceKey, - Buffer.from(updatedAllowance.toString()), - ); - console.log( - `spender ${spender} allowance updated from ${currentAllowance} to ${updatedAllowance}`, - ); - - // Emit the Transfer event - const transferEvent = { from, to, value: valueInt }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - - console.log("transferFrom ended successfully"); - return true; - } - - async _transfer(ctx, from, to, value) { - if (from === to) { - throw new Error( - `cannot transfer to and from same client account: ${from}`, - ); - } - - // Convert value from string to int - const valueInt = parseInt(value); - - if (valueInt < 0) { - // transfer of 0 is allowed in ERC20, so just validate against negative amounts - throw new Error("transfer amount cannot be negative"); - } - - // Retrieve the current balance of the sender - const fromBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [from]); - const fromCurrentBalanceBytes = await ctx.stub.getState(fromBalanceKey); - - if (!fromCurrentBalanceBytes || fromCurrentBalanceBytes.length === 0) { - throw new Error(`client account ${from} has no balance`); - } - - const fromCurrentBalance = parseInt(fromCurrentBalanceBytes.toString()); - - // Check if the sender has enough tokens to spend. - if (fromCurrentBalance < valueInt) { - throw new Error(`client account ${from} has insufficient funds.`); - } - - // Retrieve the current balance of the recipient - const toBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [to]); - const toCurrentBalanceBytes = await ctx.stub.getState(toBalanceKey); - - let toCurrentBalance; - // If recipient current balance doesn't yet exist, we'll create it with a current balance of 0 - if (!toCurrentBalanceBytes || toCurrentBalanceBytes.length === 0) { - toCurrentBalance = 0; - } else { - toCurrentBalance = parseInt(toCurrentBalanceBytes.toString()); - } - - // Update the balance - const fromUpdatedBalance = this.sub(fromCurrentBalance, valueInt); - const toUpdatedBalance = this.add(toCurrentBalance, valueInt); - - await ctx.stub.putState( - fromBalanceKey, - Buffer.from(fromUpdatedBalance.toString()), - ); - await ctx.stub.putState( - toBalanceKey, - Buffer.from(toUpdatedBalance.toString()), - ); - - console.log( - `client ${from} balance updated from ${fromCurrentBalance} to ${fromUpdatedBalance}`, - ); - console.log( - `recipient ${to} balance updated from ${toCurrentBalance} to ${toUpdatedBalance}`, - ); - - return true; - } - - /** - * Allows `spender` to spend `value` amount of tokens from the owner. - * - * @param {Context} ctx the transaction context - * @param {String} spender The spender - * @param {Integer} value The amount of tokens to be approved for transfer - * @returns {Boolean} Return whether the approval was successful or not - */ - async Approve(ctx, spender, value) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const owner = ctx.clientIdentity.getID(); - - const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ - owner, - spender, - ]); - - let valueInt = parseInt(value); - await ctx.stub.putState(allowanceKey, Buffer.from(valueInt.toString())); - - // Emit the Approval event - const approvalEvent = { owner, spender, value: valueInt }; - ctx.stub.setEvent("Approval", Buffer.from(JSON.stringify(approvalEvent))); - - console.log("approve ended successfully"); - return true; - } - - /** - * Returns the amount of tokens which `spender` is allowed to withdraw from `owner`. - * - * @param {Context} ctx the transaction context - * @param {String} owner The owner of tokens - * @param {String} spender The spender who are able to transfer the tokens - * @returns {Number} Return the amount of remaining tokens allowed to spent - */ - async Allowance(ctx, owner, spender) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ - owner, - spender, - ]); - - const allowanceBytes = await ctx.stub.getState(allowanceKey); - if (!allowanceBytes || allowanceBytes.length === 0) { - throw new Error(`spender ${spender} has no allowance from ${owner}`); - } - - const allowance = parseInt(allowanceBytes.toString()); - return allowance; - } - - // ================== Extended Functions ========================== - - /** - * Set optional infomation for a token. - * - * @param {Context} ctx the transaction context - * @param {String} name The name of the token - * @param {String} symbol The symbol of the token - * @param {String} decimals The decimals of the token - * @param {String} totalSupply The totalSupply of the token - */ - async Initialize(ctx, name, symbol, decimals) { - // Check minter authorization - this sample assumes Org1 is the central banker with privilege to set Options for these tokens - const clientMSPID = ctx.clientIdentity.getMSPID(); - if (clientMSPID !== "Org1MSP") { - throw new Error("client is not authorized to initialize contract"); - } - - //check contract options are not already set, client is not authorized to change them once initialized - const nameBytes = await ctx.stub.getState(nameKey); - if (nameBytes && nameBytes.length > 0) { - throw new Error( - "contract options are already set, client is not authorized to change them", - ); - } - - await ctx.stub.putState(nameKey, Buffer.from(name)); - await ctx.stub.putState(symbolKey, Buffer.from(symbol)); - await ctx.stub.putState(decimalsKey, Buffer.from(decimals)); - - console.log(`name: ${name}, symbol: ${symbol}, decimals: ${decimals}`); - - await this.initializeAddressMapping(ctx); - return true; - } - - /** - * Mint creates new tokens and adds them to minter's account balance - * - * @param {Context} ctx the transaction context - * @param {Integer} amount amount of tokens to be minted - * @returns {Object} The balance - */ - async Mint(ctx, amount) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const minter = ctx.clientIdentity.getID(); - - // Check minter authorization - this sample assumes Org1 is the central banker with privilege to mint new tokens - const clientMSPID = ctx.clientIdentity.getMSPID(); - - if (clientMSPID !== "Org1MSP") { - throw new Error("client is not authorized to mint new tokens"); - } - - const amountInt = parseInt(amount); - if (amountInt <= 0) { - throw new Error("mint amount must be a positive integer"); - } - - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); - - const currentBalanceBytes = await ctx.stub.getState(balanceKey); - // If minter current balance doesn't yet exist, we'll create it with a current balance of 0 - let currentBalance; - if (!currentBalanceBytes || currentBalanceBytes.length === 0) { - currentBalance = 0; - } else { - currentBalance = parseInt(currentBalanceBytes.toString()); - } - const updatedBalance = this.add(currentBalance, amountInt); - - await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); - - // Increase totalSupply - const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); - let totalSupply; - if (!totalSupplyBytes || totalSupplyBytes.length === 0) { - console.log("Initialize the tokenSupply"); - totalSupply = 0; - } else { - totalSupply = parseInt(totalSupplyBytes.toString()); - } - totalSupply = this.add(totalSupply, amountInt); - await ctx.stub.putState( - totalSupplyKey, - Buffer.from(totalSupply.toString()), - ); - - // Emit the Transfer event - const transferEvent = { from: "0x0", to: minter, value: amountInt }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - - console.log( - `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, - ); - return true; - } - - /** - * Burn redeem tokens from minter's account balance - * - * @param {Context} ctx the transaction context - * @param {Integer} amount amount of tokens to be burned - * @returns {Object} The balance - */ - async Burn(ctx, amount) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - // Check minter authorization - this sample assumes Org1 is the central banker with privilege to burn tokens - const clientMSPID = ctx.clientIdentity.getMSPID(); - if (clientMSPID !== "Org1MSP") { - throw new Error("client is not authorized to mint new tokens"); - } - - const minter = ctx.clientIdentity.getID(); - - const amountInt = parseInt(amount); - - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); - - const currentBalanceBytes = await ctx.stub.getState(balanceKey); - if (!currentBalanceBytes || currentBalanceBytes.length === 0) { - throw new Error("The balance does not exist"); - } - const currentBalance = parseInt(currentBalanceBytes.toString()); - const updatedBalance = this.sub(currentBalance, amountInt); - - await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); - - // Decrease totalSupply - const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); - if (!totalSupplyBytes || totalSupplyBytes.length === 0) { - throw new Error("totalSupply does not exist."); - } - const totalSupply = this.sub( - parseInt(totalSupplyBytes.toString()), - amountInt, - ); - await ctx.stub.putState( - totalSupplyKey, - Buffer.from(totalSupply.toString()), - ); - - // Emit the Transfer event - const transferEvent = { from: minter, to: "0x0", value: amountInt }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - - console.log( - `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, - ); - return true; - } - - /** - * ClientAccountBalance returns the balance of the requesting client's account. - * - * @param {Context} ctx the transaction context - * @returns {Number} Returns the account balance - */ - async ClientAccountBalance(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - // Get ID of submitting client identity - const clientAccountID = ctx.clientIdentity.getID(); - - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ - clientAccountID, - ]); - const balanceBytes = await ctx.stub.getState(balanceKey); - if (!balanceBytes || balanceBytes.length === 0) { - throw new Error(`the account ${clientAccountID} does not exist`); - } - const balance = parseInt(balanceBytes.toString()); - - return balance; - } - - // ClientAccountID returns the id of the requesting client's account. - // In this implementation, the client account ID is the clientId itself. - // Users can use this function to get their own account id, which they can then give to others as the payment address - async ClientAccountID(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - // Get ID of submitting client identity - const clientAccountID = ctx.clientIdentity.getID(); - return clientAccountID; - } - - //Checks that contract options have been already initialized - async CheckInitialized(ctx) { - const nameBytes = await ctx.stub.getState(nameKey); - if (!nameBytes || nameBytes.length === 0) { - throw new Error( - "contract options need to be set before calling any function, call Initialize() to initialize contract", - ); - } - } - - /** - * Escrow transfers tokens from client account to the bridging entity account. - * recipient account must be a valid clientID as returned by the ClientAccountID() function. - * - * @param {Context} ctx the transaction context - * @param {String} to The recipient - * @param {Integer} value The amount of token to be transferred - * @returns {Boolean} Return whether the transfer was successful or not - */ - async Escrow(ctx, value, id) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const from = ctx.clientIdentity.getID(); - - const transferResp = await this._transfer( - ctx, - from, - FABRIC_BRIDGE_IDENTITY, - value, - ); - if (!transferResp) { - throw new Error("Failed to transfer"); - } - - // Emit the Transfer event - const transferEvent = { - from, - FABRIC_BRIDGE_IDENTITY, - value: parseInt(value), - }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - - // this means that the transfer was made to the bridging entity - await ctx.stub.invokeChaincode( - "asset-reference-contract", - ["CreateAssetReference", id, value.toString(), from.toString()], - ctx.stub.getChannelID(), - ); - } - - /** - * Refunds transfers tokens from the bridging entity account to the client account. - * recipient account must be a valid clientID as returned by the ClientAccountID() function. - * - * @param {Context} ctx the transaction context - * @param {String} to The recipient - * @param {Integer} value The amount of token to be transferred - * @returns {Boolean} Return whether the transfer was successful or not - */ - async Refund(ctx, to, value, eth_address) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const from = ctx.clientIdentity.getID(); - - if (from !== FABRIC_BRIDGE_IDENTITY) { - throw new Error("client is not authorized to refund tokens"); - } - - const clientEthAddress = await this.getAddressMapping(ctx, to); - - if (clientEthAddress !== eth_address) { - throw new Error( - "client is not authorized to bridge back tokens to another client account", - ); - } - - const transferResp = await this._transfer(ctx, from, to, value); - if (!transferResp) { - throw new Error("Failed to transfer"); - } - - // Emit the Transfer event - const transferEvent = { - from, - FABRIC_BRIDGE_IDENTITY, - value: parseInt(value), - }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - } - - async initializeAddressMapping(ctx) { - // initialize mapping between Fabric Identities and Ethereum addresses - for (let account of accounts) { - const addressKey = ctx.stub.createCompositeKey(addressPrefix, [ - account.fabric, - ]); - - // additionally initialize all addresses to 0 - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ - account.fabric, - ]); - - await ctx.stub.putState(addressKey, Buffer.from(account.ethereum)); - await ctx.stub.putState(balanceKey, Buffer.from("0")); - } - } - - async getAddressMapping(ctx, fabricID) { - await this.CheckInitialized(ctx); - - const addressKey = ctx.stub.createCompositeKey(addressPrefix, [fabricID]); - - console.log("retrieving address with key: " + addressKey); - const addressBytes = await ctx.stub.getState(addressKey); - if (!addressBytes || addressBytes.length === 0) { - throw new Error(`the account ${fabricID} does not exist`); - } - const address = addressBytes.toString(); - - return address; - } - - async checkAddressMapping(ctx, fabricID, ethAddress) { - const storedAddress = await this.getAddressMapping(ctx, fabricID); - - if (storedAddress != ethAddress) { - throw new Error(`it is not possible to bridge CBDC to another user.`); - } - } - - // add two number checking for overflow - add(a, b) { - let c = a + b; - if (a !== c - b || b !== c - a) { - throw new Error(`Math: addition overflow occurred ${a} + ${b}`); - } - return c; - } - - // add two number checking for overflow - sub(a, b) { - let c = a - b; - if (a !== c + b || b !== a - c) { - throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); - } - return c; - } - - /** - * Testing purposes function - */ - async ResetState(ctx) { - for (let account of accounts) { - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ - account.fabric, - ]); - await ctx.stub.putState(balanceKey, Buffer.from("0")); - } - } -} - -module.exports = TokenERC20Contract; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json deleted file mode 100644 index e516e5e60c..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "cbdc", - "version": "0.0.1", - "description": "Token-ERC20 contract implemented in JavaScript", - "main": "index.js", - "engines": { - "node": ">=12", - "npm": ">=5" - }, - "scripts": { - "test": "nyc mocha --recursive", - "mocha": "mocha --recursive", - "start": "fabric-chaincode-node start" - }, - "engineStrict": true, - "author": "Hyperledger", - "license": "Apache-2.0", - "dependencies": { - "fabric-contract-api": "^2.2.3", - "fabric-shim": "^2.0.0" - }, - "devDependencies": { - "@types/sinon-chai": "^3.2.8", - "chai": "^4.1.2", - "chai-as-promised": "^7.1.1", - "mocha": "^8.0.1", - "nyc": "^14.1.1", - "sinon": "^6.0.0", - "sinon-chai": "^3.2.0" - }, - "nyc": { - "exclude": [ - "coverage/**", - "test/**", - "index.js", - ".eslintrc.js" - ], - "reporter": [ - "text-summary", - "html" - ], - "all": true, - "check-coverage": false, - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js deleted file mode 100644 index 8481b9af8b..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Copyright IBM Corp. All Rights Reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict"; - -const { Context } = require("fabric-contract-api"); -const { ChaincodeStub, ClientIdentity } = require("fabric-shim"); - -const { TokenERC20Contract } = require("../lib/tokenERC20"); - -const chai = require("chai"); -const chaiAsPromised = require("chai-as-promised"); -const sinon = require("sinon"); -const expect = chai.expect; - -chai.should(); -chai.use(chaiAsPromised); - -describe("Chaincode", () => { - let sandbox; - let token; - let ctx; - let mockStub; - let mockClientIdentity; - - beforeEach("Sandbox creation", async () => { - sandbox = sinon.createSandbox(); - token = new TokenERC20Contract("token-erc20"); - - ctx = sinon.createStubInstance(Context); - mockStub = sinon.createStubInstance(ChaincodeStub); - ctx.stub = mockStub; - mockClientIdentity = sinon.createStubInstance(ClientIdentity); - ctx.clientIdentity = mockClientIdentity; - - await token.Initialize(ctx, "some name", "some symbol", "2"); - - mockStub.putState.resolves("some state"); - mockStub.setEvent.returns("set event"); - }); - - afterEach("Sandbox restoration", () => { - sandbox.restore(); - }); - - describe("#TokenName", () => { - it("should work", async () => { - mockStub.getState.resolves("some state"); - - const response = await token.TokenName(ctx); - sinon.assert.calledWith(mockStub.getState, "name"); - expect(response).to.equals("some state"); - }); - }); - - describe("#Symbol", () => { - it("should work", async () => { - mockStub.getState.resolves("some state"); - - const response = await token.Symbol(ctx); - sinon.assert.calledWith(mockStub.getState, "symbol"); - expect(response).to.equals("some state"); - }); - }); - - describe("#Decimals", () => { - it("should work", async () => { - mockStub.getState.resolves(Buffer.from("2")); - - const response = await token.Decimals(ctx); - sinon.assert.calledWith(mockStub.getState, "decimals"); - expect(response).to.equals(2); - }); - }); - - describe("#TotalSupply", () => { - it("should work", async () => { - mockStub.getState.resolves(Buffer.from("10000")); - - const response = await token.TotalSupply(ctx); - sinon.assert.calledWith(mockStub.getState, "totalSupply"); - expect(response).to.equals(10000); - }); - }); - - describe("#BalanceOf", () => { - it("should work", async () => { - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.resolves(Buffer.from("1000")); - - const response = await token.BalanceOf(ctx, "Alice"); - expect(response).to.equals(1000); - }); - }); - - describe("#_transfer", () => { - it("should fail when the sender and the recipient are the same", async () => { - await expect( - token._transfer(ctx, "Alice", "Alice", "1000"), - ).to.be.rejectedWith( - Error, - "cannot transfer to and from same client account", - ); - }); - - it("should fail when the sender does not have enough token", async () => { - mockStub.createCompositeKey - .withArgs("balance", ["Alice"]) - .returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("500")); - - await expect( - token._transfer(ctx, "Alice", "Bob", "1000"), - ).to.be.rejectedWith( - Error, - "client account Alice has insufficient funds.", - ); - }); - - it("should transfer to a new account when the sender has enough token", async () => { - mockStub.createCompositeKey - .withArgs("balance", ["Alice"]) - .returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); - - mockStub.createCompositeKey - .withArgs("balance", ["Bob"]) - .returns("balance_Bob"); - mockStub.getState.withArgs("balance_Bob").resolves(null); - - const response = await token._transfer(ctx, "Alice", "Bob", "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("0"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "balance_Bob", - Buffer.from("1000"), - ); - expect(response).to.equals(true); - }); - - it("should transfer to the existing account when the sender has enough token", async () => { - mockStub.createCompositeKey - .withArgs("balance", ["Alice"]) - .returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); - - mockStub.createCompositeKey - .withArgs("balance", ["Bob"]) - .returns("balance_Bob"); - mockStub.getState.withArgs("balance_Bob").resolves(Buffer.from("2000")); - - const response = await token._transfer(ctx, "Alice", "Bob", "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("0"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "balance_Bob", - Buffer.from("3000"), - ); - expect(response).to.equals(true); - }); - }); - - describe("#Transfer", () => { - it("should work", async () => { - mockClientIdentity.getID.returns("Alice"); - sinon.stub(token, "_transfer").returns(true); - - const response = await token.Transfer(ctx, "Bob", "1000"); - const event = { from: "Alice", to: "Bob", value: 1000 }; - sinon.assert.calledWith( - mockStub.setEvent, - "Transfer", - Buffer.from(JSON.stringify(event)), - ); - expect(response).to.equals(true); - }); - }); - - describe("#TransferFrom", () => { - it("should fail when the spender is not allowed to spend the token", async () => { - mockClientIdentity.getID.returns("Charlie"); - - mockStub.createCompositeKey - .withArgs("allowance", ["Alice", "Charlie"]) - .returns("allowance_Alice_Charlie"); - mockStub.getState - .withArgs("allowance_Alice_Charlie") - .resolves(Buffer.from("0")); - - await expect( - token.TransferFrom(ctx, "Alice", "Bob", "1000"), - ).to.be.rejectedWith( - Error, - "The spender does not have enough allowance to spend.", - ); - }); - - it("should transfer when the spender is allowed to spend the token", async () => { - mockClientIdentity.getID.returns("Charlie"); - - mockStub.createCompositeKey - .withArgs("allowance", ["Alice", "Charlie"]) - .returns("allowance_Alice_Charlie"); - mockStub.getState - .withArgs("allowance_Alice_Charlie") - .resolves(Buffer.from("3000")); - - sinon.stub(token, "_transfer").returns(true); - - const response = await token.TransferFrom(ctx, "Alice", "Bob", "1000"); - sinon.assert.calledWith( - mockStub.putState, - "allowance_Alice_Charlie", - Buffer.from("2000"), - ); - const event = { from: "Alice", to: "Bob", value: 1000 }; - sinon.assert.calledWith( - mockStub.setEvent, - "Transfer", - Buffer.from(JSON.stringify(event)), - ); - expect(response).to.equals(true); - }); - }); - - describe("#Approve", () => { - it("should work", async () => { - mockClientIdentity.getID.returns("Dave"); - mockStub.createCompositeKey.returns("allowance_Dave_Eve"); - - const response = await token.Approve(ctx, "Ellen", "1000"); - sinon.assert.calledWith( - mockStub.putState, - "allowance_Dave_Eve", - Buffer.from("1000"), - ); - expect(response).to.equals(true); - }); - }); - - describe("#Allowance", () => { - it("should work", async () => { - mockStub.createCompositeKey.returns("allowance_Dave_Eve"); - mockStub.getState.resolves(Buffer.from("1000")); - - const response = await token.Allowance(ctx, "Dave", "Eve"); - expect(response).to.equals(1000); - }); - }); - - describe("#Initialize", () => { - it("should work", async () => { - //we consider it has already been initialized in the before-each statement - sinon.assert.calledWith( - mockStub.putState, - "name", - Buffer.from("some name"), - ); - sinon.assert.calledWith( - mockStub.putState, - "symbol", - Buffer.from("some symbol"), - ); - sinon.assert.calledWith(mockStub.putState, "decimals", Buffer.from("2")); - }); - - it("should failed if called a second time", async () => { - //we consider it has already been initialized in the before-each statement - await expect( - await token.Initialize(ctx, "some name", "some symbol", "2"), - ).to.be.rejectedWith( - Error, - "contract options are already set, client is not authorized to change them", - ); - }); - }); - - describe("#Mint", () => { - it("should add token to a new account and a new total supply", async () => { - mockClientIdentity.getMSPID.returns("Org1MSP"); - mockClientIdentity.getID.returns("Alice"); - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(null); - mockStub.getState.withArgs("totalSupply").resolves(null); - - const response = await token.Mint(ctx, "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("1000"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "totalSupply", - Buffer.from("1000"), - ); - expect(response).to.equals(true); - }); - - it("should add token to the existing account and the existing total supply", async () => { - mockClientIdentity.getMSPID.returns("Org1MSP"); - mockClientIdentity.getID.returns("Alice"); - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); - mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); - - const response = await token.Mint(ctx, "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("2000"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "totalSupply", - Buffer.from("3000"), - ); - expect(response).to.equals(true); - }); - - it("should add token to a new account and the existing total supply", async () => { - mockClientIdentity.getMSPID.returns("Org1MSP"); - mockClientIdentity.getID.returns("Alice"); - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(null); - mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); - - const response = await token.Mint(ctx, "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("1000"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "totalSupply", - Buffer.from("3000"), - ); - expect(response).to.equals(true); - }); - }); - - describe("#Burn", () => { - it("should work", async () => { - mockClientIdentity.getMSPID.returns("Org1MSP"); - mockClientIdentity.getID.returns("Alice"); - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); - mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); - - const response = await token.Burn(ctx, "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("0"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "totalSupply", - Buffer.from("1000"), - ); - expect(response).to.equals(true); - }); - }); - - describe("#ClientAccountBalance", () => { - it("should work", async () => { - mockClientIdentity.getID.returns("Alice"); - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.resolves(Buffer.from("1000")); - - const response = await token.ClientAccountBalance(ctx); - expect(response).to.equals(1000); - }); - }); - - describe("#ClientAccountID", () => { - it("should work", async () => { - mockClientIdentity.getID.returns("x509::{subject DN}::{issuer DN}"); - - const response = await token.ClientAccountID(ctx); - sinon.assert.calledOnce(mockClientIdentity.getID); - expect(response).to.equals("x509::{subject DN}::{issuer DN}"); - }); - }); -}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts deleted file mode 100755 index e94e09d390..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env node - -import { - AuthorizationProtocol, - ConfigService, - IAuthorizationConfig, -} from "@hyperledger/cactus-cmd-api-server"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { ICbdcBridgingApp, CbdcBridgingApp } from "./cbdc-bridging-app"; -import CryptoMaterial from "../../crypto-material/crypto-material.json"; -import "dotenv/config"; - -export async function launchApp( - env?: NodeJS.ProcessEnv, - args?: string[], -): Promise { - const configService = new ConfigService(); - const exampleConfig = await configService.newExampleConfig(); - exampleConfig.configFile = ""; - exampleConfig.authorizationConfigJson = JSON.stringify( - exampleConfig.authorizationConfigJson, - ) as unknown as IAuthorizationConfig; - exampleConfig.authorizationProtocol = AuthorizationProtocol.NONE; - - const convictConfig = - await configService.newExampleConfigConvict(exampleConfig); - - env = await configService.newExampleConfigEnv(convictConfig.getProperties()); - - const config = await configService.getOrCreate({ args, env }); - const serverOptions = config.getProperties(); - - LoggerProvider.setLogLevel(serverOptions.logLevel); - - const clientGatewayKeyPair = { - privateKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway1"].privateKey, "hex"), - ), - publicKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway1"].publicKey, "hex"), - ), - }; - - const serverGatewayKeyPair = { - privateKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway2"].privateKey, "hex"), - ), - publicKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway2"].publicKey, "hex"), - ), - }; - - if ( - process.env.API_HOST == undefined || - process.env.API_SERVER_1_PORT == undefined || - process.env.API_SERVER_2_PORT == undefined || - process.env.API_CRPC_HOST == undefined || - process.env.API_SERVER_1_CRPC_PORT == undefined || - process.env.API_SERVER_2_CRPC_PORT == undefined - ) { - throw new Error("Env variables not set"); - } - - const appOptions: ICbdcBridgingApp = { - apiHost: process.env.API_HOST, - apiServer1Port: parseInt(process.env.API_SERVER_1_PORT), - apiServer2Port: parseInt(process.env.API_SERVER_2_PORT), - clientGatewayKeyPair: clientGatewayKeyPair, - serverGatewayKeyPair: serverGatewayKeyPair, - logLevel: "DEBUG", - apiCrpcHost: process.env.API_CRPC_HOST, - apiServer1CrpcPort: parseInt(process.env.API_SERVER_1_CRPC_PORT), - apiServer2CrpcPort: parseInt(process.env.API_SERVER_2_CRPC_PORT), - }; - - const cbdcBridgingApp = new CbdcBridgingApp(appOptions); - try { - await cbdcBridgingApp.start(); - console.info("CbdcBridgingApp running..."); - } catch (ex) { - console.error(`CbdcBridgingApp crashed. Existing...`, ex); - await cbdcBridgingApp.stop(); - process.exit(-1); - } -} - -if (require.main === module) { - launchApp(); -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts deleted file mode 100644 index 526329cdf8..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts +++ /dev/null @@ -1,259 +0,0 @@ -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { Server } from "http"; -import exitHook, { IAsyncExitHookDoneCallback } from "async-exit-hook"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - LogLevelDesc, - Logger, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, - ICactusApiServerOptions, -} from "@hyperledger/cactus-cmd-api-server"; -import { - Configuration, - IKeyPair, - DefaultApi as SatpApi, -} from "@hyperledger/cactus-plugin-satp-hermes/"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { CbdcBridgingAppDummyInfrastructure } from "./infrastructure/cbdc-bridging-app-dummy-infrastructure"; -import { DefaultApi as FabricApi } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { DefaultApi as BesuApi } from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { FabricSatpGateway } from "./satp-extension/fabric-satp-gateway"; -import { BesuSatpGateway } from "./satp-extension/besu-satp-gateway"; -import CryptoMaterial from "../../crypto-material/crypto-material.json"; - -export interface ICbdcBridgingApp { - apiHost: string; - apiServer1Port: number; - apiServer2Port: number; - apiCrpcHost: string; - apiServer1CrpcPort: number; - apiServer2CrpcPort: number; - clientGatewayKeyPair: IKeyPair; - serverGatewayKeyPair: IKeyPair; - logLevel?: LogLevelDesc; - apiServerOptions?: ICactusApiServerOptions; - disableSignalHandlers?: true; -} - -interface ICrpcOptions { - host: string; - port: number; -} - -export type ShutdownHook = () => Promise; -export class CbdcBridgingApp { - private readonly log: Logger; - private readonly shutdownHooks: ShutdownHook[]; - readonly infrastructure: CbdcBridgingAppDummyInfrastructure; - - public constructor(public readonly options: ICbdcBridgingApp) { - const fnTag = "CbdcBridgingApp#constructor()"; - - if (!options) { - throw new Error(`${fnTag} options parameter is falsy`); - } - const { logLevel } = options; - - const level = logLevel || "INFO"; - const label = "cbdc-bridging-app"; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.shutdownHooks = []; - - this.infrastructure = new CbdcBridgingAppDummyInfrastructure({ - logLevel: level, - }); - } - - public async start(): Promise { - this.log.debug(`Starting CBDC Bridging App...`); - - if (!this.options.disableSignalHandlers) { - exitHook((callback: IAsyncExitHookDoneCallback) => { - this.stop().then(callback); - }); - this.log.debug(`Registered signal handlers for graceful auto-shutdown`); - } - - await this.infrastructure.start(); - this.onShutdown(() => this.infrastructure.stop()); - - const fabricPlugin = - await this.infrastructure.createFabricLedgerConnector(); - const besuPlugin = await this.infrastructure.createBesuLedgerConnector(); - - // Reserve the ports where the API Servers will run - const httpApiA = await Servers.startOnPort( - this.options.apiServer1Port, - this.options.apiHost, - ); - const httpApiB = await Servers.startOnPort( - this.options.apiServer2Port, - this.options.apiHost, - ); - - const addressInfoA = httpApiA.address() as AddressInfo; - const nodeApiHostA = `http://${this.options.apiHost}:${addressInfoA.port}`; - - const addressInfoB = httpApiB.address() as AddressInfo; - const nodeApiHostB = `http://${this.options.apiHost}:${addressInfoB.port}`; - - const fabricSatpGateway = await this.infrastructure.createClientGateway( - nodeApiHostA, - this.options.clientGatewayKeyPair, - ); - const besuSatpGateway = await this.infrastructure.createServerGateway( - nodeApiHostB, - this.options.serverGatewayKeyPair, - ); - - const clientPluginRegistry = new PluginRegistry({ - plugins: [ - new PluginKeychainMemory({ - keychainId: CryptoMaterial.keychains.keychain1.id, - instanceId: uuidv4(), - logLevel: "INFO", - }), - ], - }); - const serverPluginRegistry = new PluginRegistry({ - plugins: [ - new PluginKeychainMemory({ - keychainId: CryptoMaterial.keychains.keychain2.id, - instanceId: uuidv4(), - logLevel: "INFO", - }), - ], - }); - - clientPluginRegistry.add(fabricPlugin); - clientPluginRegistry.add(fabricSatpGateway); - - serverPluginRegistry.add(besuPlugin); - serverPluginRegistry.add(besuSatpGateway); - - const crpcOptionsServer1 = { - host: this.options.apiCrpcHost, - port: this.options.apiServer1CrpcPort, - }; - const apiServer1 = await this.startNode( - httpApiA, - clientPluginRegistry, - crpcOptionsServer1, - ); - - const crpcOptionsServer2 = { - host: this.options.apiCrpcHost, - port: this.options.apiServer2CrpcPort, - }; - const apiServer2 = await this.startNode( - httpApiB, - serverPluginRegistry, - crpcOptionsServer2, - ); - - const fabricApiClient = new FabricApi( - new Configuration({ basePath: nodeApiHostA }), - ); - - const besuApiClient = new BesuApi( - new Configuration({ basePath: nodeApiHostB }), - ); - - this.log.info("Deploying chaincode and smart contracts..."); - - await this.infrastructure.deployFabricCbdcContract(fabricApiClient); - - await this.infrastructure.deployFabricAssetReferenceContract( - fabricApiClient, - ); - - await this.infrastructure.deployBesuContracts(besuApiClient); - - this.log.info(`Chaincode and smart Contracts deployed.`); - - return { - apiServer1, - apiServer2, - fabricGatewayApi: new SatpApi( - new Configuration({ basePath: nodeApiHostA }), - ), - besuGatewayApi: new SatpApi( - new Configuration({ basePath: nodeApiHostB }), - ), - fabricApiClient, - besuApiClient, - fabricSatpGateway, - besuSatpGateway, - }; - } - - public async stop(): Promise { - for (const hook of this.shutdownHooks) { - await hook(); // FIXME add timeout here so that shutdown does not hang - } - } - - public onShutdown(hook: ShutdownHook): void { - this.shutdownHooks.push(hook); - } - - public async startNode( - httpServerApi: Server, - pluginRegistry: PluginRegistry, - crpcOptions: ICrpcOptions, - ): Promise { - this.log.info(`Starting API Server node...`); - - const addressInfoApi = httpServerApi.address() as AddressInfo; - - let config; - if (this.options.apiServerOptions) { - config = this.options.apiServerOptions; - } else { - const configService = new ConfigService(); - const convictConfig = await configService.getOrCreate(); - config = convictConfig.getProperties(); - config.configFile = ""; - config.apiCorsDomainCsv = `http://${process.env.API_HOST_FRONTEND}:${process.env.API_PORT_FRONTEND}`; - config.cockpitCorsDomainCsv = `http://${process.env.API_HOST_FRONTEND}:${process.env.API_PORT_FRONTEND}`; - config.apiPort = addressInfoApi.port; - config.apiHost = addressInfoApi.address; - config.grpcPort = 0; - config.logLevel = this.options.logLevel || "INFO"; - config.authorizationProtocol = AuthorizationProtocol.NONE; - config.crpcHost = crpcOptions.host; - config.crpcPort = crpcOptions.port; - } - - const apiServer = new ApiServer({ - config, - httpServerApi, - pluginRegistry, - }); - - this.onShutdown(() => apiServer.shutdown()); - - await apiServer.start(); - - return apiServer; - } -} - -export interface IStartInfo { - readonly apiServer1: ApiServer; - readonly apiServer2: ApiServer; - readonly fabricGatewayApi: SatpApi; - readonly besuGatewayApi: SatpApi; - readonly besuApiClient: BesuApi; - readonly fabricApiClient: FabricApi; - readonly fabricSatpGateway: FabricSatpGateway; - readonly besuSatpGateway: BesuSatpGateway; -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts deleted file mode 100644 index b1bef73046..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts +++ /dev/null @@ -1,717 +0,0 @@ -import path from "path"; -import { v4 as uuidv4 } from "uuid"; -import fs from "fs-extra"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - BesuTestLedger, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FabricTestLedgerV1, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - DefaultApi as FabricApi, - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - DeploymentTargetOrgFabric2x, - FabricContractInvocationType, - FileBase64, - PluginLedgerConnectorFabric, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { - DefaultApi as BesuApi, - DeployContractSolidityBytecodeV1Request, - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, - InvokeContractV1Request as BesuInvokeContractV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import AssetReferenceContractJson from "../../../solidity/asset-reference-contract/AssetReferenceContract.json"; -import CBDCcontractJson from "../../../solidity/cbdc-erc-20/CBDCcontract.json"; -import { IKeyPair } from "@hyperledger/cactus-plugin-satp-hermes"; -import { FabricSatpGateway } from "../satp-extension/fabric-satp-gateway"; -import { BesuSatpGateway } from "../satp-extension/besu-satp-gateway"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import CryptoMaterial from "../../../crypto-material/crypto-material.json"; -import { ClientHelper } from "../satp-extension/client-helper"; -import { ServerHelper } from "../satp-extension/server-helper"; - -export interface ICbdcBridgingAppDummyInfrastructureOptions { - logLevel?: LogLevelDesc; -} - -export class CbdcBridgingAppDummyInfrastructure { - public static readonly CLASS_NAME = "CbdcBridgingAppDummyInfrastructure"; - // TODO: Move this to the FabricTestLedger class where it belongs. - public static readonly FABRIC_2_AIO_CLI_CFG_DIR = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - private readonly besu: BesuTestLedger; - private readonly fabric: FabricTestLedgerV1; - private readonly log: Logger; - - public get className(): string { - return CbdcBridgingAppDummyInfrastructure.CLASS_NAME; - } - - public get orgCfgDir(): string { - return CbdcBridgingAppDummyInfrastructure.FABRIC_2_AIO_CLI_CFG_DIR; - } - - constructor( - public readonly options: ICbdcBridgingAppDummyInfrastructureOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.besu = new BesuTestLedger({ - logLevel: level || "DEBUG", - emitContainerLogs: true, - envVars: ["BESU_NETWORK=dev"], - }); - - this.fabric = new FabricTestLedgerV1({ - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel: level || "DEBUG", - }); - } - - public get org1Env(): NodeJS.ProcessEnv & DeploymentTargetOrgFabric2x { - return FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1; - } - - public get org2Env(): NodeJS.ProcessEnv & DeploymentTargetOrgFabric2x { - return FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2; - } - - public async start(): Promise { - try { - this.log.info(`Starting dummy infrastructure...`); - await Promise.all([this.besu.start(), this.fabric.start()]); - this.log.info(`Started dummy infrastructure OK`); - } catch (ex) { - this.log.error(`Starting of dummy infrastructure crashed: `, ex); - throw ex; - } - } - - public async stop(): Promise { - try { - this.log.info(`Stopping...`); - await Promise.all([ - this.besu.stop().then(() => this.besu.destroy()), - this.fabric.stop().then(() => this.fabric.destroy()), - ]); - this.log.info(`Stopped OK`); - } catch (ex) { - this.log.error(`Stopping crashed: `, ex); - throw ex; - } - } - - public async createFabricLedgerConnector(): Promise { - const connectionProfileOrg1 = await this.fabric.getConnectionProfileOrg1(); - const enrollAdminOutOrg1 = await this.fabric.enrollAdminV2({ - organization: "org1", - }); - const adminWalletOrg1 = enrollAdminOutOrg1[1]; - const [userIdentity1] = await this.fabric.enrollUserV2({ - wallet: adminWalletOrg1, - enrollmentID: "userA", - organization: "org1", - }); - const [userIdentity2] = await this.fabric.enrollUserV2({ - wallet: adminWalletOrg1, - enrollmentID: "userB", - organization: "org1", - }); - - const enrollAdminOutOrg2 = await this.fabric.enrollAdminV2({ - organization: "org2", - }); - const adminWalletOrg2 = enrollAdminOutOrg2[1]; - const [bridgeIdentity] = await this.fabric.enrollUserV2({ - wallet: adminWalletOrg2, - enrollmentID: "bridge", - organization: "org2", - }); - - const sshConfig = await this.fabric.getSshConfig(); - - const keychainEntryKey1 = "userA"; - const keychainEntryValue1 = JSON.stringify(userIdentity1); - - const keychainEntryKey2 = "userB"; - const keychainEntryValue2 = JSON.stringify(userIdentity2); - - const keychainEntryKey3 = "bridge"; - const keychainEntryValue3 = JSON.stringify(bridgeIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: CryptoMaterial.keychains.keychain1.id, - logLevel: undefined, - backend: new Map([ - [keychainEntryKey1, keychainEntryValue1], - [keychainEntryKey2, keychainEntryValue2], - [keychainEntryKey3, keychainEntryValue3], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - this.log.info(`Creating Fabric Connector...`); - return new PluginLedgerConnectorFabric({ - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: this.org1Env, - sshConfig, - connectionProfile: connectionProfileOrg1, - logLevel: this.options.logLevel || "INFO", - discoveryOptions: { - enabled: true, - asLocalhost: true, - }, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }); - } - - public async createBesuLedgerConnector(): Promise { - const rpcApiHttpHost = await this.besu.getRpcApiHttpHost(); - const rpcApiWsHost = await this.besu.getRpcApiWsHost(); - - const keychainEntryKey = AssetReferenceContractJson.contractName; - const keychainEntryValue = JSON.stringify(AssetReferenceContractJson); - - const keychainEntryKey2 = CBDCcontractJson.contractName; - const keychainEntryValue2 = JSON.stringify(CBDCcontractJson); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: CryptoMaterial.keychains.keychain2.id, - logLevel: undefined, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - [keychainEntryKey2, keychainEntryValue2], - ]), - }); - - this.log.info(`Creating Besu Connector...`); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const accounts = [ - CryptoMaterial.accounts.userA.ethAddress, - CryptoMaterial.accounts.userB.ethAddress, - CryptoMaterial.accounts.bridge.ethAddress, - ]; - - for (const account of accounts) { - await this.besu.sendEthToAccount(account); - } - - return besuConnector; - } - - public async createClientGateway( - nodeApiHost: string, - keyPair: IKeyPair, - ): Promise { - this.log.info(`Creating Source Gateway...`); - const pluginSourceGateway = new FabricSatpGateway({ - name: "cactus-plugin-source#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: keyPair, - fabricPath: nodeApiHost, - fabricSigningCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "bridge", - }, - fabricChannelName: "mychannel", - fabricContractName: "asset-reference-contract", - clientHelper: new ClientHelper(), - serverHelper: new ServerHelper({}), - }); - - await pluginSourceGateway.localRepository?.reset(); - await pluginSourceGateway.remoteRepository?.reset(); - - return pluginSourceGateway; - } - - public async createServerGateway( - nodeApiHost: string, - keyPair: IKeyPair, - ): Promise { - this.log.info(`Creating Recipient Gateway...`); - const pluginRecipientGateway = new BesuSatpGateway({ - name: "cactus-plugin-recipient#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: keyPair, - besuPath: nodeApiHost, - besuWeb3SigningCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - besuContractName: AssetReferenceContractJson.contractName, - besuKeychainId: CryptoMaterial.keychains.keychain2.id, - clientHelper: new ClientHelper(), - serverHelper: new ServerHelper({}), - }); - - await pluginRecipientGateway.localRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - return pluginRecipientGateway; - } - - public async deployFabricAssetReferenceContract( - fabricApiClient: FabricApi, - ): Promise { - const channelId = "mychannel"; - - const contractName = "asset-reference-contract"; - - const contractRelPath = - "../../../fabric-contracts/asset-reference/typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - // └── tslint.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset-reference.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset-reference-contract.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - let retries = 0; - while (retries <= 5) { - await fabricApiClient - .deployContractV1( - { - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: contractName, - targetOrganizations: [this.org1Env, this.org2Env], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "asset-reference-contract", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 120, - }, - { - maxContentLength: Infinity, - maxBodyLength: Infinity, - }, - ) - .then(async (res: { data: { packageIds: any; lifecycle: any } }) => { - retries = 6; - - const { packageIds, lifecycle } = res.data; - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - Checks.truthy(packageIds, `packageIds truthy OK`); - Checks.truthy( - Array.isArray(packageIds), - `Array.isArray(packageIds) truthy OK`, - ); - Checks.truthy(approveForMyOrgList, `approveForMyOrgList truthy OK`); - Checks.truthy( - Array.isArray(approveForMyOrgList), - `Array.isArray(approveForMyOrgList) truthy OK`, - ); - Checks.truthy(installList, `installList truthy OK`); - Checks.truthy( - Array.isArray(installList), - `Array.isArray(installList) truthy OK`, - ); - Checks.truthy(queryInstalledList, `queryInstalledList truthy OK`); - Checks.truthy( - Array.isArray(queryInstalledList), - `Array.isArray(queryInstalledList) truthy OK`, - ); - Checks.truthy(commit, `commit truthy OK`); - Checks.truthy(packaging, `packaging truthy OK`); - Checks.truthy(queryCommitted, `queryCommitted truthy OK`); - }) - .catch(() => console.log("trying to deploy fabric contract again")); - retries++; - } - } - - public async deployFabricCbdcContract( - fabricApiClient: FabricApi, - ): Promise { - const channelId = "mychannel"; - const channelName = channelId; - - const contractName = "cbdc"; - - const contractRelPath = "../../../fabric-contracts/cbdc-erc-20/javascript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── index.js - // ├── lib - // │ ├── tokenERC20.js - const sourceFiles: FileBase64[] = []; - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.js"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./tokenERC20.js"; - const relativePath = "./lib/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./crypto-material.json"; - const relativePath = "./crypto-material/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - let retries = 0; - while (retries <= 5) { - await fabricApiClient - .deployContractV1( - { - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: contractName, - targetOrganizations: [this.org1Env, this.org2Env], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "cbdc", - ccLang: ChainCodeProgrammingLanguage.Javascript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 120, - }, - { - maxContentLength: Infinity, - maxBodyLength: Infinity, - }, - ) - .then(async (res: { data: { packageIds: any; lifecycle: any } }) => { - retries = 6; - - const { packageIds, lifecycle } = res.data; - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - Checks.truthy(packageIds, `packageIds truthy OK`); - Checks.truthy( - Array.isArray(packageIds), - `Array.isArray(packageIds) truthy OK`, - ); - Checks.truthy(approveForMyOrgList, `approveForMyOrgList truthy OK`); - Checks.truthy( - Array.isArray(approveForMyOrgList), - `Array.isArray(approveForMyOrgList) truthy OK`, - ); - Checks.truthy(installList, `installList truthy OK`); - Checks.truthy( - Array.isArray(installList), - `Array.isArray(installList) truthy OK`, - ); - Checks.truthy(queryInstalledList, `queryInstalledList truthy OK`); - Checks.truthy( - Array.isArray(queryInstalledList), - `Array.isArray(queryInstalledList) truthy OK`, - ); - Checks.truthy(commit, `commit truthy OK`); - Checks.truthy(packaging, `packaging truthy OK`); - Checks.truthy(queryCommitted, `queryCommitted truthy OK`); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - let retries_2 = 0; - while (retries_2 <= 5) { - await new Promise((resolve) => setTimeout(resolve, 10000)); - - await fabricApiClient - .runTransactionV1({ - contractName, - channelName, - params: ["name1", "symbol1", "8"], - methodName: "Initialize", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }) - .then(() => (retries_2 = 6)) - .catch(() => - console.log("trying to Initialize fabric contract again"), - ); - retries_2++; - } - }) - .catch(() => console.log("trying to deploy fabric contract again")); - retries++; - } - } - - public async deployBesuContracts(besuApiClient: BesuApi): Promise { - const fnTag = `${this.className}#deployBesuContracts()`; - - const deployCbdcContractResponse = - await besuApiClient.deployContractSolBytecodeV1({ - keychainId: CryptoMaterial.keychains.keychain2.id, - contractName: CBDCcontractJson.contractName, - contractAbi: CBDCcontractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: CBDCcontractJson.bytecode, - gas: 10000000, - } as DeployContractSolidityBytecodeV1Request); - - if (deployCbdcContractResponse == undefined) { - throw new Error(`${fnTag}, error when deploying CBDC smart contract`); - } - - const deployAssetReferenceContractResponse = - await besuApiClient.deployContractSolBytecodeV1({ - keychainId: CryptoMaterial.keychains.keychain2.id, - contractName: AssetReferenceContractJson.contractName, - contractAbi: AssetReferenceContractJson.abi, - constructorArgs: [ - deployCbdcContractResponse.data.transactionReceipt.contractAddress, - ], - web3SigningCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: AssetReferenceContractJson.bytecode, - gas: 10000000, - } as DeployContractSolidityBytecodeV1Request); - - if (deployAssetReferenceContractResponse == undefined) { - throw new Error( - `${fnTag}, error when deploying Asset Reference smart contract`, - ); - } - - // set Asset Reference smart contract address in cbdc one (sidechain contract) - const insertARContractAddress = await besuApiClient.invokeContractV1({ - contractName: CBDCcontractJson.contractName, - invocationType: EthContractInvocationType.Send, - methodName: "setAssetReferenceContract", - gas: 1000000, - params: [ - deployAssetReferenceContractResponse.data.transactionReceipt - .contractAddress, - ], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - } as BesuInvokeContractV1Request); - - if (insertARContractAddress == undefined) { - throw new Error( - `${fnTag}, error when setting Asset Reference smart contract address in sidechain contract`, - ); - } - - // make the owner of the sidechain contract the asset reference one - const transferOwnership = await besuApiClient.invokeContractV1({ - contractName: CBDCcontractJson.contractName, - invocationType: EthContractInvocationType.Send, - methodName: "transferOwnership", - gas: 1000000, - params: [ - deployAssetReferenceContractResponse.data.transactionReceipt - .contractAddress, - ], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - } as BesuInvokeContractV1Request); - - if (transferOwnership == undefined) { - throw new Error( - `${fnTag}, error when transferring the ownershop Reference smart contract address in sidechain contract`, - ); - } - - // make the owner of the asset reference contract the sidechain one - const addOwnerToAssetRefContract = await besuApiClient.invokeContractV1({ - contractName: AssetReferenceContractJson.contractName, - invocationType: EthContractInvocationType.Send, - methodName: "addOwner", - gas: 1000000, - params: [ - deployCbdcContractResponse.data.transactionReceipt.contractAddress, - ], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - } as BesuInvokeContractV1Request); - - if (addOwnerToAssetRefContract == undefined) { - throw new Error( - `${fnTag}, error when transfering CBDC smart contract ownership`, - ); - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts deleted file mode 100755 index b62ece0e7a..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { CbdcBridgingApp } from "./cbdc-bridging-app"; -export { launchApp } from "./cbdc-bridging-app-cli"; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts deleted file mode 100644 index 5c3c0eb574..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts +++ /dev/null @@ -1,603 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - DefaultApi as BesuApi, - Web3SigningCredential, - EthContractInvocationType, - InvokeContractV1Request as BesuInvokeContractV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, -} from "@hyperledger/cactus-plugin-satp-hermes"; -import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-satp-hermes"; - -export interface IBesuSatpGatewayConstructorOptions - extends IPluginSatpGatewayConstructorOptions { - besuContractName?: string; - besuWeb3SigningCredential?: Web3SigningCredential; - besuKeychainId?: string; - besuAssetID?: string; - besuPath?: string; -} - -export class BesuSatpGateway extends PluginSatpGateway { - public besuApi?: BesuApi; - public besuContractName?: string; - public besuWeb3SigningCredential?: Web3SigningCredential; - public besuKeychainId?: string; - - public constructor(options: IBesuSatpGatewayConstructorOptions) { - super({ - name: options.name, - dltIDs: options.dltIDs, - instanceId: options.instanceId, - keyPair: options.keyPair, - backupGatewaysAllowed: options.backupGatewaysAllowed, - ipfsPath: options.ipfsPath, - clientHelper: options.clientHelper, - serverHelper: options.serverHelper, - knexLocalConfig: options.knexLocalConfig, - knexRemoteConfig: options.knexRemoteConfig, - }); - - if (options.besuPath != undefined) this.defineBesuConnection(options); - } - - private defineBesuConnection( - options: IBesuSatpGatewayConstructorOptions, - ): void { - const fnTag = `${this.className}#defineBesuConnection()`; - - const config = new Configuration({ basePath: options.besuPath }); - const apiClient = new BesuApi(config); - this.besuApi = apiClient; - const notEnoughBesuParams: boolean = - options.besuContractName == undefined || - options.besuWeb3SigningCredential == undefined || - options.besuKeychainId == undefined; - if (notEnoughBesuParams) { - throw new Error( - `${fnTag}, besu params missing. Should have: signing credentials, contract name, key chain ID, asset ID`, - ); - } - this.besuContractName = options.besuContractName; - this.besuWeb3SigningCredential = options.besuWeb3SigningCredential; - this.besuKeychainId = options.besuKeychainId; - } - - async isValidBridgeBackCBDC( - assetID: string, - amount: number, - user: string, - ): Promise { - // we should verify if the CBDC being bridged is valid or not - // e.g. if a client is trying to send more CBDC than what was escrowed - - if (this.besuApi != undefined) { - const response = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Call, - methodName: "checkValidBridgeBack", - gas: 1000000, - params: [assetID, amount, user], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (response.data.callOutput != true) { - throw new Error(`${response.statusText}`); - } - } - } - - async createAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#createAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.assetProfile == undefined || - sessionData.assetProfile.keyInformationLink == undefined || - sessionData.assetProfile.keyInformationLink.length != 3 - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if (assetId == undefined) { - assetId = sessionData.recipientLedgerAssetID; - } - - let besuCreateAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const amount = sessionData.assetProfile.keyInformationLink[0].toString(); - const userEthAddress = - sessionData.assetProfile.keyInformationLink[2].toString(); - - const besuCreateRes = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "mint", - gas: 1000000, - params: [userEthAddress, amount], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (besuCreateRes.status != 200) { - throw new Error(`${fnTag}, besu create asset error`); - } - - const besuCreateResDataJson = JSON.parse( - JSON.stringify(besuCreateRes.data), - ); - - if (besuCreateResDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (besuCreateResDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - besuCreateResDataJson.out.transactionReceipt; - besuCreateAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.commitAcknowledgementClaim = besuCreateAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset creation: ${besuCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "create", - data: besuCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return besuCreateAssetProof; - } - - async deleteAsset(sessionID: string, assetID?: string): Promise { - const fnTag = `${this.className}#deleteAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if (assetID == undefined) { - assetID = sessionData.sourceLedgerAssetID; - } - - let besuDeleteAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const besuAssetDeletion = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "deleteAssetReference", - gas: 1000000, - params: [assetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (besuAssetDeletion.status != 200) { - throw new Error(`${fnTag}, besu delete asset error`); - } - - const besuAssetDeletionDataJson = JSON.parse( - JSON.stringify(besuAssetDeletion.data), - ); - - if (besuAssetDeletionDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (besuAssetDeletionDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuAssetDeletionReceipt = - besuAssetDeletionDataJson.out.transactionReceipt; - besuDeleteAssetProof = JSON.stringify(besuAssetDeletionReceipt); - } - - sessionData.commitFinalClaim = besuDeleteAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset deletion: ${besuDeleteAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "delete", - data: besuDeleteAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - return besuDeleteAssetProof; - } - - async lockAsset(sessionID: string, assetID?: string): Promise { - const fnTag = `${this.className}#lockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if (assetID == undefined) { - assetID = sessionData.sourceLedgerAssetID; - } - - let besuLockAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const besuAssetLock = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "lockAssetReference", - gas: 1000000, - params: [assetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (besuAssetLock.status != 200) { - throw new Error(`${fnTag}, besu lock asset error`); - } - - const besuAssetLockDataJson = JSON.parse( - JSON.stringify(besuAssetLock.data), - ); - - if (besuAssetLockDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (besuAssetLockDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuAssetLockReceipt = besuAssetLockDataJson.out.transactionReceipt; - besuLockAssetProof = JSON.stringify(besuAssetLockReceipt); - } - - sessionData.lockEvidenceClaim = besuLockAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, proof of the asset lock: ${besuLockAssetProof}`); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "lock", - data: besuLockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - return besuLockAssetProof; - } - - async unlockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#unlockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let besuUnlockAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const assetUnlockResponse = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "unLockAssetReference", - gas: 1000000, - params: [assetId], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetUnlockResponse.status != 200) { - throw new Error(`${fnTag}, besu unlock asset error`); - } - - const assetUnlockResponseDataJson = JSON.parse( - JSON.stringify(assetUnlockResponse.data), - ); - - if (assetUnlockResponseDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (assetUnlockResponseDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - assetUnlockResponseDataJson.out.transactionReceipt; - besuUnlockAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Lock, - ); - sessionData.rollbackProofs.push(besuUnlockAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset unlock: ${besuUnlockAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "unlock", - data: besuUnlockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - return besuUnlockAssetProof; - } - - async createAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - const fnTag = `${this.className}#createAssetToRollback()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined || - sessionData.assetProfile == undefined || - sessionData.assetProfile.keyInformationLink == undefined || - sessionData.assetProfile.keyInformationLink.length != 3 - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let besuCreateAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const amount = sessionData.assetProfile.keyInformationLink[0].toString(); - const userEthAddress = - sessionData.assetProfile.keyInformationLink[2].toString(); - - const assetCreateResponse = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "createAssetReference", - gas: 1000000, - params: [assetID, amount, userEthAddress], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetCreateResponse.status != 200) { - throw new Error(`${fnTag}, besu unlock asset error`); - } - - const assetCreateResponseDataJson = JSON.parse( - JSON.stringify(assetCreateResponse.data), - ); - - if (assetCreateResponseDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (assetCreateResponseDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - assetCreateResponseDataJson.out.transactionReceipt; - besuCreateAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Create, - ); - sessionData.rollbackProofs.push(besuCreateAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset create: ${besuCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "create", - data: besuCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return besuCreateAssetProof; - } - - async deleteAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - // not implemented. We assume the agreement was reached after the final interactions in each ledger - // (delete in the source chain and create in the side chain) - return `not implemented: ${sessionID}, ${assetID}`; - } - - async rollback(sessionID: string) { - const fnTag = `${this.className}#rollback()`; - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - sessionData.rollback = true; - - this.log.info(`${fnTag}, rolling back session ${sessionID}`); - - if ( - this.besuApi == undefined || - this.besuContractName == undefined || - this.besuKeychainId == undefined || - this.besuWeb3SigningCredential == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.recipientLedgerAssetID == undefined - ) { - return; - } - - if (this.isClientGateway(sessionID)) { - if (await this.besuAssetExists(sessionData.sourceLedgerAssetID)) { - if (await this.isBesuAssetLocked(sessionData.sourceLedgerAssetID)) { - // Rollback locking of the asset - await this.unlockAsset(sessionID, sessionData.sourceLedgerAssetID); - } - } else { - // Rollback extinguishment of the asset - await this.createAssetToRollback( - sessionID, - sessionData.sourceLedgerAssetID, - ); - } - } - } - - /* Helper functions */ - async besuAssetExists(besuAssetID: string): Promise { - const fnTag = `${this.className}#besuAssetExists()`; - - const assetExists = await this.besuApi?.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Call, - methodName: "isPresent", - gas: 1000000, - params: [besuAssetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetExists == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetExists?.data.callOutput == true; - } - - async isBesuAssetLocked(besuAssetID: string): Promise { - const fnTag = `${this.className}#isBesuAssetLocked()`; - - const assetIsLocked = await this.besuApi?.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Call, - methodName: "isAssetLocked", - gas: 1000000, - params: [besuAssetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetIsLocked == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetIsLocked?.data.callOutput == true; - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts deleted file mode 100644 index 675e8de6a1..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { SHA256 } from "crypto-js"; -import { - PluginSatpGateway, - TransferInitializationV1Request, - ClientGatewayHelper, -} from "@hyperledger/cactus-plugin-satp-hermes"; -import { SatpMessageType } from "@hyperledger/cactus-plugin-satp-hermes"; -import { FabricSatpGateway } from "./fabric-satp-gateway"; -import { BesuSatpGateway } from "./besu-satp-gateway"; - -export class ClientHelper extends ClientGatewayHelper { - async sendTransferInitializationRequest( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${this.className}#sendTransferInitializationRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.id == undefined || - sessionData.step == undefined || - sessionData.version == undefined || - sessionData.maxRetries == undefined || - sessionData.maxTimeout == undefined || - sessionData.assetProfile == undefined || - sessionData.payloadProfile == undefined || - sessionData.loggingProfile == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.accessControlProfile == undefined || - sessionData.applicationProfile == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.sourceGatewayDltSystem == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.recipientLedgerAssetID == undefined || - sessionData.recipientGatewayDltSystem == undefined || - sessionData.allowedSourceBackupGateways == undefined || - sessionData.assetProfile.keyInformationLink == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if ( - !gateway.supportedDltIDs.includes(sessionData.recipientGatewayDltSystem) - ) { - throw new Error( - `${fnTag}, recipient gateway dlt system is not supported by this gateway`, - ); - } - - const initializationRequestMessage: TransferInitializationV1Request = { - messageType: SatpMessageType.InitializationRequest, - sessionID: sessionData.id, - version: sessionData.version, - // developer urn - // credential profile - payloadProfile: sessionData.payloadProfile, - applicationProfile: sessionData.applicationProfile, - loggingProfile: sessionData.loggingProfile, - accessControlProfile: sessionData.accessControlProfile, - signature: "", - sourceGatewayPubkey: gateway.pubKey, - sourceGatewayDltSystem: sessionData.sourceGatewayDltSystem, - recipientGatewayPubkey: sessionData.recipientGatewayPubkey, - recipientGatewayDltSystem: sessionData.recipientGatewayDltSystem, - sequenceNumber: sessionData.lastSequenceNumber, - sourceBasePath: sessionData.sourceBasePath, - recipientBasePath: sessionData.recipientBasePath, - // escrow type - // expiry time (related to the escrow) - // multiple claims allowed - // multiple cancels allowed - // permissions - maxRetries: sessionData.maxRetries, - maxTimeout: sessionData.maxTimeout, - backupGatewaysAllowed: sessionData.allowedSourceBackupGateways, - recipientLedgerAssetID: sessionData.recipientLedgerAssetID, - sourceLedgerAssetID: sessionData.sourceLedgerAssetID, - }; - - const messageSignature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(initializationRequestMessage)), - ); - - initializationRequestMessage.signature = messageSignature; - - sessionData.initializationRequestMessageHash = SHA256( - JSON.stringify(initializationRequestMessage), - ).toString(); - - sessionData.clientSignatureInitializationRequestMessage = messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - if (gateway instanceof FabricSatpGateway) { - await gateway - .isValidBridgeOutCBDC( - sessionData.sourceLedgerAssetID, - sessionData.assetProfile.keyInformationLink[0].toString(), // Amount - sessionData.assetProfile.keyInformationLink[1].toString(), // FabricID - sessionData.assetProfile.keyInformationLink[2].toString(), // ETH Address - ) - .catch((err) => { - throw new Error(`${err.response.data.error}`); - }); - } else if (gateway instanceof BesuSatpGateway) { - await gateway - .isValidBridgeBackCBDC( - sessionData.sourceLedgerAssetID, - sessionData.assetProfile.keyInformationLink[0].toString(), // Amount - sessionData.assetProfile.keyInformationLink[2].toString(), // ethAddress - ) - .catch((err) => { - throw new Error(`${err}`); - }); - } - - this.log.info(`${fnTag}, sending TransferInitializationRequest...`); - - if (!remote) { - return initializationRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase1TransferInitiationRequestV1(initializationRequestMessage), - "TransferInitializationRequest", - ); - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts deleted file mode 100644 index 1dd7f57e6d..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts +++ /dev/null @@ -1,602 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - DefaultApi as FabricApi, - FabricSigningCredential, - FabricContractInvocationType, - RunTransactionRequest as FabricRunTransactionRequest, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { - IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, -} from "@hyperledger/cactus-plugin-satp-hermes"; -import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-satp-hermes"; - -export interface IFabricSatpGatewayConstructorOptions - extends IPluginSatpGatewayConstructorOptions { - fabricPath?: string; - fabricSigningCredential?: FabricSigningCredential; - fabricChannelName?: string; - fabricContractName?: string; -} - -export class FabricSatpGateway extends PluginSatpGateway { - public fabricApi?: FabricApi; - public fabricSigningCredential?: FabricSigningCredential; - public fabricChannelName?: string; - public fabricContractName?: string; - - public constructor(options: IFabricSatpGatewayConstructorOptions) { - super({ - name: options.name, - dltIDs: options.dltIDs, - instanceId: options.instanceId, - keyPair: options.keyPair, - backupGatewaysAllowed: options.backupGatewaysAllowed, - ipfsPath: options.ipfsPath, - clientHelper: options.clientHelper, - serverHelper: options.serverHelper, - knexLocalConfig: options.knexLocalConfig, - knexRemoteConfig: options.knexRemoteConfig, - }); - - if (options.fabricPath != undefined) this.defineFabricConnection(options); - } - - private defineFabricConnection( - options: IFabricSatpGatewayConstructorOptions, - ): void { - const fnTag = `${this.className}#defineFabricConnection()`; - - const config = new Configuration({ basePath: options.fabricPath }); - const apiClient = new FabricApi(config); - this.fabricApi = apiClient; - const notEnoughFabricParams: boolean = - options.fabricSigningCredential == undefined || - options.fabricChannelName == undefined || - options.fabricContractName == undefined; - if (notEnoughFabricParams) { - throw new Error( - `${fnTag}, fabric params missing should have: signing credentials, contract name, channel name, asset ID`, - ); - } - this.fabricSigningCredential = options.fabricSigningCredential; - this.fabricChannelName = options.fabricChannelName; - this.fabricContractName = options.fabricContractName; - } - - async isValidBridgeOutCBDC( - assetID: string, - amount: number, - fabricID: string, - ethAddress: string, - ) { - // we should verify if the CBDC being bridged is valid or not - // e.g. if a client is trying to send CBDC to another client in the sidechain, this should fail - - if (this.fabricApi != undefined) { - await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Call, - methodName: "CheckValidBridgeOut", - params: [assetID, amount, fabricID, ethAddress], - } as FabricRunTransactionRequest); - } - } - - async isValidBridgeBackCBDC(fabricID: string, ethAddress: string) { - // we should verify if the CBDC being bridged is valid or not - // e.g. if a client is trying to send CBDC to another client in the sidechain, this should fail - - if (this.fabricApi != undefined) { - await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Call, - methodName: "CheckValidBridgeBack", - params: [fabricID, ethAddress], - } as FabricRunTransactionRequest); - } - } - - async lockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#lockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricLockAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const response = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "LockAssetReference", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptLockRes = await this.fabricApi.getTransactionReceiptByTxIDV1( - { - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest, - ); - - this.log.warn(receiptLockRes.data); - fabricLockAssetProof = JSON.stringify(receiptLockRes.data); - } - - sessionData.lockEvidenceClaim = fabricLockAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, proof of the asset lock: ${fabricLockAssetProof}`); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "lock", - data: fabricLockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - return fabricLockAssetProof; - } - - async unlockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#unlockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricUnlockAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const response = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "UnlockAssetReference", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptUnlock = await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptUnlock.data); - fabricUnlockAssetProof = JSON.stringify(receiptUnlock.data); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Unlock, - ); - sessionData.rollbackProofs.push(fabricUnlockAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset unlock: ${fabricUnlockAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "unlock", - data: fabricUnlockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - return fabricUnlockAssetProof; - } - - async createAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#createAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.assetProfile == undefined || - sessionData.assetProfile.keyInformationLink == undefined || - sessionData.assetProfile.keyInformationLink.length != 3 - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricCreateAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.recipientLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const amount = sessionData.assetProfile.keyInformationLink[0].toString(); - const fabricClientID = - sessionData.assetProfile.keyInformationLink[1].toString(); - const userEthAddress = - sessionData.assetProfile.keyInformationLink[2].toString(); - - const response = await this.fabricApi.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [amount, fabricClientID, userEthAddress], - methodName: "Refund", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - } as FabricRunTransactionRequest); - - const receiptCreateRes = - await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptCreateRes.data); - fabricCreateAssetProof = JSON.stringify(receiptCreateRes.data); - } - - sessionData.commitAcknowledgementClaim = fabricCreateAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset create: ${fabricCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "create", - data: fabricCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return fabricCreateAssetProof; - } - - async deleteAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#deleteAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricDeleteAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const deleteRes = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "DeleteAssetReference", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptDeleteRes = - await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, deleteRes.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptDeleteRes.data); - fabricDeleteAssetProof = JSON.stringify(receiptDeleteRes.data); - } - - sessionData.commitFinalClaim = fabricDeleteAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset deletion: ${fabricDeleteAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "delete", - data: fabricDeleteAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - return fabricDeleteAssetProof; - } - - async createAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - const fnTag = `${this.className}#createAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - this.fabricChannelName == undefined || - this.fabricContractName == undefined || - this.fabricSigningCredential == undefined || - sessionData.rollbackProofs == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.assetProfile == undefined || - sessionData.assetProfile.keyInformationLink == undefined || - sessionData.assetProfile.keyInformationLink.length != 3 - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricCreateAssetProof = ""; - - if (assetID == undefined) { - assetID = sessionData.recipientLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const amount = sessionData.assetProfile.keyInformationLink[0].toString(); - const userEthAddress = - sessionData.assetProfile.keyInformationLink[2].toString(); - - const response = await this.fabricApi.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [assetID, amount, userEthAddress], - methodName: "CreateAssetReference", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - } as FabricRunTransactionRequest); - - const receiptCreate = await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptCreate.data); - fabricCreateAssetProof = JSON.stringify(receiptCreate.data); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Create, - ); - - sessionData.rollbackProofs.push(fabricCreateAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset creation: ${fabricCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "create", - data: fabricCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return fabricCreateAssetProof; - } - - async deleteAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - // not implemented. We assume the agreement was reached after the final interactions in each ledger - // (delete in the source chain and create in the side chain) - return `not implemented: ${sessionID}, ${assetID}`; - } - - async rollback(sessionID: string): Promise { - const fnTag = `${this.className}#rollback()`; - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - sessionData.rollback = true; - - this.log.info(`${fnTag}, rolling back session ${sessionID}`); - - if ( - this.fabricApi == undefined || - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.recipientLedgerAssetID == undefined - ) { - return; - } - - if (this.isClientGateway(sessionID)) { - if (await this.fabricAssetExists(sessionData.sourceLedgerAssetID)) { - if (await this.isFabricAssetLocked(sessionData.sourceLedgerAssetID)) { - // Rollback locking of the asset - await this.unlockAsset(sessionID, sessionData.sourceLedgerAssetID); - } - } else { - // Rollback extinguishment of the asset - await this.createAssetToRollback( - sessionID, - sessionData.sourceLedgerAssetID, - ); - } - } - } - - /* Helper functions */ - public async fabricAssetExists( - fabricAssetID: string, - ): Promise { - const fnTag = `${this.className}#fabricAssetExists()`; - - if ( - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined - ) { - throw new Error(`${fnTag} fabric config is not defined`); - } - - const assetExists = await this.fabricApi?.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [fabricAssetID], - methodName: "AssetReferenceExists", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - }); - - if (assetExists == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetExists?.data.functionOutput == "true"; - } - - public async isFabricAssetLocked( - fabricAssetID: string, - ): Promise { - const fnTag = `${this.className}#isFabricAssetLocked()`; - - if ( - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined - ) { - throw new Error(`${fnTag} fabric config is not defined`); - } - - const assetIsLocked = await this.fabricApi?.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [fabricAssetID], - methodName: "IsAssetReferenceLocked", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - }); - - if (assetIsLocked == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetIsLocked?.data.functionOutput == "true"; - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts deleted file mode 100644 index c6dee4d1e7..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { SHA256 } from "crypto-js"; -import { - SessionData, - TransferInitializationV1Request, -} from "@hyperledger/cactus-plugin-satp-hermes"; -import { - SatpMessageType, - PluginSatpGateway, - ServerGatewayHelper, -} from "@hyperledger/cactus-plugin-satp-hermes"; - -import { FabricSatpGateway } from "./fabric-satp-gateway"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -export interface IServerHelperOptions { - logLevel?: LogLevelDesc; -} - -export class ServerHelper extends ServerGatewayHelper { - public static readonly CLASS_NAME: string = "ServerHelper"; - - constructor(readonly opts: IServerHelperOptions) { - super(); - this.log.debug(`Instantiated ${this.className} OK`); - } - - public get className(): string { - return ServerHelper.CLASS_NAME; - } - - async checkValidInitializationRequest( - request: TransferInitializationV1Request, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidInitializationRequest()`; - - const sessionData: SessionData = {}; - const recvTimestamp: string = Date.now().toString(); - const sessionID = request.sessionID; - - sessionData.id = sessionID; - sessionData.step = 2; - sessionData.initializationRequestMessageRcvTimeStamp = recvTimestamp; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.InitializationRequest) { - throw new Error( - `${fnTag}, wrong message type for TransferInitializationRequest`, - ); - } - - if (!gateway.verifySignature(request, request.sourceGatewayPubkey)) { - throw new Error( - `${fnTag}, TransferInitializationRequest message signature verification failed`, - ); - } - - if (!gateway.supportedDltIDs.includes(request.sourceGatewayDltSystem)) { - throw new Error( - `${fnTag}, source gateway dlt system is not supported by this gateway`, - ); - } - - if (request.payloadProfile.assetProfile.issuer != "CB1") { - throw new Error(`${fnTag}, asset issuer not recognized`); - } - - if (request.payloadProfile.assetProfile.assetCode != "CBDC1") { - throw new Error(`${fnTag}, asset code not recognized`); - } - - if (request.payloadProfile.assetProfile.keyInformationLink?.length != 3) { - throw new Error(`${fnTag}, CBDC parameters not specified`); - } - - const expiryDate: string = - request.payloadProfile.assetProfile.expirationDate; - const isDataExpired: boolean = new Date() >= new Date(expiryDate); - if (isDataExpired) { - throw new Error(`${fnTag}, asset has expired`); - } - - sessionData.version = request.version; - sessionData.maxRetries = request.maxRetries; - sessionData.maxTimeout = request.maxTimeout; - - sessionData.allowedSourceBackupGateways = request.backupGatewaysAllowed; - sessionData.allowedRecipientBackupGateways = gateway.backupGatewaysAllowed; - - sessionData.sourceBasePath = request.sourceBasePath; - sessionData.recipientBasePath = request.recipientBasePath; - sessionData.lastSequenceNumber = request.sequenceNumber; - sessionData.loggingProfile = request.loggingProfile; - sessionData.accessControlProfile = request.accessControlProfile; - sessionData.payloadProfile = request.payloadProfile; - sessionData.applicationProfile = request.applicationProfile; - sessionData.assetProfile = request.payloadProfile.assetProfile; - sessionData.sourceGatewayPubkey = request.sourceGatewayPubkey; - sessionData.sourceGatewayDltSystem = request.sourceGatewayDltSystem; - sessionData.recipientGatewayPubkey = request.recipientGatewayPubkey; - sessionData.recipientGatewayDltSystem = request.recipientGatewayDltSystem; - sessionData.rollbackActionsPerformed = []; - sessionData.rollbackProofs = []; - sessionData.lastMessageReceivedTimestamp = new Date().toString(); - sessionData.recipientLedgerAssetID = request.recipientLedgerAssetID; - sessionData.sourceLedgerAssetID = request.sourceLedgerAssetID; - - sessionData.initializationRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureInitializationRequestMessage = request.signature; - - sessionData.initializationRequestMessageProcessedTimeStamp = - Date.now().toString(); - - gateway.sessions.set(request.sessionID, sessionData); - - if (gateway instanceof FabricSatpGateway) { - await gateway - .isValidBridgeBackCBDC( - request.payloadProfile.assetProfile.keyInformationLink[1].toString(), // FabricID - request.payloadProfile.assetProfile.keyInformationLink[2].toString(), // ETH Address - ) - .catch((err) => { - throw new Error(`${err.response.data.error}`); - }); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - this.log.info(`TransferInitializationRequest passed all checks.`); - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json deleted file mode 100644 index 1156577ad5..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json +++ /dev/null @@ -1,5778 +0,0 @@ -{ - "contractName": "AssetReferenceContract", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - } - ], - "name": "OwnershipRemoved", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "addOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "checkValidBridgeBack", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "createAssetReference", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "deleteAssetReference", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAllAssetReferences", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "bool", - "name": "isLocked", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct AssetReference[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "getAssetReference", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "bool", - "name": "isLocked", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct AssetReference", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isAssetLocked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isPresent", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "lockAssetReference", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owners", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - } - ], - "name": "removeItemFromList", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "oldOwner", - "type": "address" - } - ], - "name": "removeOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "resetAssetRefsList", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "unLockAssetReference", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRemoved\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"checkValidBridgeBack\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"createAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetReferences\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"isLocked\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct AssetReference[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAssetReference\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"isLocked\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct AssetReference\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isAssetLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isPresent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"removeItemFromList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resetAssetRefsList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"owners()\":{\"details\":\"Returns the address of the current owners.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol\":\"AssetReferenceContract\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol\":{\"keccak256\":\"0x0e64f282a7a93abd1a52b21d0a9995ea0252568fa4fdb35206e7a036368528fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c700a282ac8079d8ca12e687f58d0eb8665d16f433ea0824bd0fc2424132a167\",\"dweb:/ipfs/QmPsSRdwFppSrDnrjfRVAcKQpQK4DZMW73KGNY3bNBCNsX\"]},\"/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol\":{\"keccak256\":\"0xf4bc191b290664b626acc4e62cb09c3d95a83e836f9a35f83f8ace72a5103c29\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://55fe1524d9dfb3256b44560103c52b5b74313aea0362483cc18d7aa51a90f864\",\"dweb:/ipfs/QmWkcmUzyZP6uWHJtpfB2FvareUH4tXySQJmPEGuv3mgGZ\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b50604051611a0f380380611a0f83398101604081905261002f916100d3565b6100383361005d565b600180546001600160a01b0319166001600160a01b0392909216919091179055610103565b600080546001810182558180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b03841690811790915560405190917fb4cd6c6140e1db788f68710738b06ef4d0df6a884a06a088433a4c2f5e036e7c91a250565b6000602082840312156100e557600080fd5b81516001600160a01b03811681146100fc57600080fd5b9392505050565b6118fd806101126000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80637065cb4811610097578063affe39c111610066578063affe39c1146101f5578063b1fa25801461020a578063bc5482751461022a578063c8da01af1461023d57600080fd5b80637065cb48146101a95780638ef45293146101bc5780639ca27299146101cf578063ade3222b146101e257600080fd5b806342966c68116100d357806342966c681461016857806363773a6c1461017b578063663bcc921461018e5780636b4bd58c146101a157600080fd5b8063173825d9146101055780631ae4eb681461011a57806321db00b31461014257806340c10f1914610155575b600080fd5b6101186101133660046111d6565b610252565b005b61012d610128366004611241565b6102d0565b60405190151581526020015b60405180910390f35b610118610150366004611283565b610303565b61011861016336600461129c565b610476565b610118610176366004611283565b610563565b610118610189366004611241565b610647565b61011861019c3660046112c6565b610715565b6101186108fb565b6101186101b73660046111d6565b610923565b6101186101ca366004611241565b610999565b61012d6101dd3660046112c6565b6109db565b6101186101f0366004611241565b610a74565b6101fd610c4d565b6040516101399190611323565b61021d610218366004611241565b610caf565b60405161013991906113f1565b61012d610238366004611241565b610dc2565b610245610df1565b6040516101399190611404565b61025a610f14565b6001600160a01b0381166102c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206f6c64206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6102cd81610fc3565b50565b6000600283836040516102e4929190611466565b9081526040519081900360200190206001015460ff1690505b92915050565b60045481106103495760405162461bcd60e51b81526020600482015260126024820152711a5b99195e081bdd5d081bd988189bdd5b9960721b60448201526064016102bb565b805b60045461035a9060019061148c565b81101561041a57600461036e82600161149f565b8154811061037e5761037e6114b2565b90600052602060002090600402016004828154811061039f5761039f6114b2565b60009182526020909120600490910201806103ba838261157b565b50600182810154908201805460ff909216151560ff1990921691909117905560028083015490820155600391820154910180546001600160a01b0319166001600160a01b039092169190911790558061041281611656565b91505061034b565b50600480548061042c5761042c61166f565b6000828152602081206000199092019160048302019061044c828261116c565b5060018101805460ff191690556000600282015560030180546001600160a01b0319169055905550565b61047e610f14565b6001546040516001600160a01b03848116602483015260448201849052600092169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104d89190611685565b6000604051808303816000865af19150503d8060008114610515576040519150601f19603f3d011682016040523d82523d6000602084013e61051a565b606091505b505090508061055e5760405162461bcd60e51b815260206004820152601060248201526f1b5a5b9d0818d85b1b0819985a5b195960821b60448201526064016102bb565b505050565b61056b610f14565b600154604051602481018390526000916001600160a01b03169060440160408051601f198184030181529181526020820180516001600160e01b0316630852cd8d60e31b179052516105bd9190611685565b6000604051808303816000865af19150503d80600081146105fa576040519150601f19603f3d011682016040523d82523d6000602084013e6105ff565b606091505b50509050806106435760405162461bcd60e51b815260206004820152601060248201526f189d5c9b8818d85b1b0819985a5b195960821b60448201526064016102bb565b5050565b61064f610f14565b6106598282610dc2565b6106755760405162461bcd60e51b81526004016102bb906116a1565b61067f82826102d0565b156106da5760405162461bcd60e51b815260206004820152602560248201527f546865206173736574207265666572656e636520697320616c7265616479206c6044820152641bd8dad95960da1b60648201526084016102bb565b6001600283836040516106ee929190611466565b908152604051908190036020019020600101805491151560ff199092169190911790555050565b61071d610f14565b838360028686604051610731929190611466565b9081526040519081900360200190209161074c9190836116e3565b508160028585604051610760929190611466565b908152602001604051809103902060020181905550600060028585604051610789929190611466565b908152604051908190036020018120600101805492151560ff199093169290921790915581906002906107bf9087908790611466565b908152602001604051809103902060030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600160038585604051610808929190611466565b908152604080519182900360209081018320805494151560ff199095169490941790935560a0601f870184900490930282018301905260808101858152600492829190889088908190850183828082843760009201829052509385525050506020808301829052604083018790526001600160a01b03861660609093019290925283546001810185559381522081519192600402019081906108aa908261179d565b50602082015160018201805460ff191691151591909117905560408201516002820155606090910151600390910180546001600160a01b0319166001600160a01b0390921691909117905550505050565b60005b6004548110156102cd5761091181610303565b8061091b81611656565b9150506108fe565b61092b610f14565b6001600160a01b0381166109905760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102bb565b6102cd816110f6565b6109a1610f14565b6109ab8282610dc2565b6109c75760405162461bcd60e51b81526004016102bb906116a1565b6000600283836040516106ee929190611466565b60006109e78585610dc2565b610a035760405162461bcd60e51b81526004016102bb906116a1565b8260028686604051610a16929190611466565b90815260200160405180910390206002015410158015610a6b5750816001600160a01b031660028686604051610a4d929190611466565b908152604051908190036020019020600301546001600160a01b0316145b95945050505050565b610a7c610f14565b610a868282610dc2565b610aa25760405162461bcd60e51b81526004016102bb906116a1565b610aac82826102d0565b610af85760405162461bcd60e51b815260206004820152601d60248201527f546865206173736574207265666572656e6365206973206c6f636b656400000060448201526064016102bb565b610b2460028383604051610b0d929190611466565b908152602001604051809103902060020154610563565b60028282604051610b36929190611466565b9081526040519081900360200190206000610b51828261116c565b5060018101805460ff19169055600060028201819055600391820180546001600160a01b0319169055604051909190610b8d9085908590611466565b908152604051908190036020019020805491151560ff1990921691909117905560005b60045481101561055e578282604051602001610bcd929190611466565b6040516020818303038152906040528051906020012060048281548110610bf657610bf66114b2565b9060005260206000209060040201600001604051602001610c179190611851565b6040516020818303038152906040528051906020012003610c3b57610c3b81610303565b80610c4581611656565b915050610bb0565b60606000805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c87575b5050505050905090565b604080516080810182526060808252600060208301819052828401819052908201529051600290610ce39085908590611466565b9081526020016040518091039020604051806080016040529081600082018054610d0c906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610d38906114c8565b8015610d855780601f10610d5a57610100808354040283529160200191610d85565b820191906000526020600020905b815481529060010190602001808311610d6857829003601f168201915b5050509183525050600182015460ff1615156020820152600282015460408201526003909101546001600160a01b03166060909101529392505050565b600060038383604051610dd6929190611466565b9081526040519081900360200190205460ff16905092915050565b60606004805480602002602001604051908101604052809291908181526020016000905b82821015610f0b5783829060005260206000209060040201604051806080016040529081600082018054610e48906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610e74906114c8565b8015610ec15780601f10610e9657610100808354040283529160200191610ec1565b820191906000526020600020905b815481529060010190602001808311610ea457829003601f168201915b505050918352505060018281015460ff161515602080840191909152600284015460408401526003909301546001600160a01b031660609092019190915291835292019101610e15565b50505050905090565b6000805b600054811015610f7057336001600160a01b031660008281548110610f3f57610f3f6114b2565b6000918252602090912001546001600160a01b031603610f5e57600191505b80610f6881611656565b915050610f18565b506001811515146102cd5760405162461bcd60e51b815260206004820152601f60248201527f4f776e61626c653a2063616c6c6572206973206e6f7420616e206f776e65720060448201526064016102bb565b60005b6000548110156110be57816001600160a01b031660008281548110610fed57610fed6114b2565b6000918252602090912001546001600160a01b0316036110ac57600080546110179060019061148c565b81548110611027576110276114b2565b600091825260208220015481546001600160a01b03909116919083908110611051576110516114b2565b6000918252602082200180546001600160a01b0319166001600160a01b0393909316929092179091558054806110895761108961166f565b600082815260209020810160001990810180546001600160a01b03191690550190555b806110b681611656565b915050610fc6565b506040516001600160a01b038216907f86d076ecf250a6d90a67a7c75317f44709d5001395ecf1df6d9dad5278f1e68190600090a250565b600080546001810182558180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b03841690811790915560405190917fb4cd6c6140e1db788f68710738b06ef4d0df6a884a06a088433a4c2f5e036e7c91a250565b508054611178906114c8565b6000825580601f10611188575050565b601f0160209004906000526020600020908101906102cd91905b808211156111b657600081556001016111a2565b5090565b80356001600160a01b03811681146111d157600080fd5b919050565b6000602082840312156111e857600080fd5b6111f1826111ba565b9392505050565b60008083601f84011261120a57600080fd5b50813567ffffffffffffffff81111561122257600080fd5b60208301915083602082850101111561123a57600080fd5b9250929050565b6000806020838503121561125457600080fd5b823567ffffffffffffffff81111561126b57600080fd5b611277858286016111f8565b90969095509350505050565b60006020828403121561129557600080fd5b5035919050565b600080604083850312156112af57600080fd5b6112b8836111ba565b946020939093013593505050565b600080600080606085870312156112dc57600080fd5b843567ffffffffffffffff8111156112f357600080fd5b6112ff878288016111f8565b90955093505060208501359150611318604086016111ba565b905092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156113645783516001600160a01b03168352928401929184019160010161133f565b50909695505050505050565b60005b8381101561138b578181015183820152602001611373565b50506000910152565b600081516080845280518060808601526113b58160a0870160208501611370565b602084810151151590860152604080850151908601526060938401516001600160a01b0316938501939093525050601f01601f19160160a00190565b6020815260006111f16020830184611394565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561145957603f19888603018452611447858351611394565b9450928501929085019060010161142b565b5092979650505050505050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156102fd576102fd611476565b808201808211156102fd576102fd611476565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806114dc57607f821691505b6020821081036114fc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b601f82111561055e57600081815260208120601f850160051c8101602086101561153f5750805b601f850160051c820191505b8181101561155e5782815560010161154b565b505050505050565b600019600383901b1c191660019190911b1790565b818103611586575050565b61159082546114c8565b67ffffffffffffffff8111156115a8576115a8611502565b6115bc816115b684546114c8565b84611518565b6000601f8211600181146115ea57600083156115d85750848201545b6115e28482611566565b85555061164f565b600085815260209020601f19841690600086815260209020845b838110156116245782860154825560019586019590910190602001611604565b50858310156116425781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b60006001820161166857611668611476565b5060010190565b634e487b7160e01b600052603160045260246000fd5b60008251611697818460208701611370565b9190910192915050565b60208082526022908201527f546865206173736574207265666572656e636520646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b67ffffffffffffffff8311156116fb576116fb611502565b61170f8361170983546114c8565b83611518565b6000601f84116001811461173d576000851561172b5750838201355b6117358682611566565b84555061164f565b600083815260209020601f19861690835b8281101561176e578685013582556020948501946001909201910161174e565b508682101561178b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b815167ffffffffffffffff8111156117b7576117b7611502565b6117c5816115b684546114c8565b602080601f8311600181146117f457600084156117e25750858301515b6117ec8582611566565b86555061155e565b600085815260208120601f198616915b8281101561182357888601518255948401946001909101908401611804565b50858210156118415787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600080835461185f816114c8565b60018281168015611877576001811461188c576118bb565b60ff19841687528215158302870194506118bb565b8760005260208060002060005b858110156118b25781548a820152908401908201611899565b50505082870194505b5092969550505050505056fea26469706673582212204e3defbf3329eeb8a9a2352d01161391069b644ab4b4adcc96c509b58240729a64736f6c63430008100033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106101005760003560e01c80637065cb4811610097578063affe39c111610066578063affe39c1146101f5578063b1fa25801461020a578063bc5482751461022a578063c8da01af1461023d57600080fd5b80637065cb48146101a95780638ef45293146101bc5780639ca27299146101cf578063ade3222b146101e257600080fd5b806342966c68116100d357806342966c681461016857806363773a6c1461017b578063663bcc921461018e5780636b4bd58c146101a157600080fd5b8063173825d9146101055780631ae4eb681461011a57806321db00b31461014257806340c10f1914610155575b600080fd5b6101186101133660046111d6565b610252565b005b61012d610128366004611241565b6102d0565b60405190151581526020015b60405180910390f35b610118610150366004611283565b610303565b61011861016336600461129c565b610476565b610118610176366004611283565b610563565b610118610189366004611241565b610647565b61011861019c3660046112c6565b610715565b6101186108fb565b6101186101b73660046111d6565b610923565b6101186101ca366004611241565b610999565b61012d6101dd3660046112c6565b6109db565b6101186101f0366004611241565b610a74565b6101fd610c4d565b6040516101399190611323565b61021d610218366004611241565b610caf565b60405161013991906113f1565b61012d610238366004611241565b610dc2565b610245610df1565b6040516101399190611404565b61025a610f14565b6001600160a01b0381166102c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206f6c64206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6102cd81610fc3565b50565b6000600283836040516102e4929190611466565b9081526040519081900360200190206001015460ff1690505b92915050565b60045481106103495760405162461bcd60e51b81526020600482015260126024820152711a5b99195e081bdd5d081bd988189bdd5b9960721b60448201526064016102bb565b805b60045461035a9060019061148c565b81101561041a57600461036e82600161149f565b8154811061037e5761037e6114b2565b90600052602060002090600402016004828154811061039f5761039f6114b2565b60009182526020909120600490910201806103ba838261157b565b50600182810154908201805460ff909216151560ff1990921691909117905560028083015490820155600391820154910180546001600160a01b0319166001600160a01b039092169190911790558061041281611656565b91505061034b565b50600480548061042c5761042c61166f565b6000828152602081206000199092019160048302019061044c828261116c565b5060018101805460ff191690556000600282015560030180546001600160a01b0319169055905550565b61047e610f14565b6001546040516001600160a01b03848116602483015260448201849052600092169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104d89190611685565b6000604051808303816000865af19150503d8060008114610515576040519150601f19603f3d011682016040523d82523d6000602084013e61051a565b606091505b505090508061055e5760405162461bcd60e51b815260206004820152601060248201526f1b5a5b9d0818d85b1b0819985a5b195960821b60448201526064016102bb565b505050565b61056b610f14565b600154604051602481018390526000916001600160a01b03169060440160408051601f198184030181529181526020820180516001600160e01b0316630852cd8d60e31b179052516105bd9190611685565b6000604051808303816000865af19150503d80600081146105fa576040519150601f19603f3d011682016040523d82523d6000602084013e6105ff565b606091505b50509050806106435760405162461bcd60e51b815260206004820152601060248201526f189d5c9b8818d85b1b0819985a5b195960821b60448201526064016102bb565b5050565b61064f610f14565b6106598282610dc2565b6106755760405162461bcd60e51b81526004016102bb906116a1565b61067f82826102d0565b156106da5760405162461bcd60e51b815260206004820152602560248201527f546865206173736574207265666572656e636520697320616c7265616479206c6044820152641bd8dad95960da1b60648201526084016102bb565b6001600283836040516106ee929190611466565b908152604051908190036020019020600101805491151560ff199092169190911790555050565b61071d610f14565b838360028686604051610731929190611466565b9081526040519081900360200190209161074c9190836116e3565b508160028585604051610760929190611466565b908152602001604051809103902060020181905550600060028585604051610789929190611466565b908152604051908190036020018120600101805492151560ff199093169290921790915581906002906107bf9087908790611466565b908152602001604051809103902060030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600160038585604051610808929190611466565b908152604080519182900360209081018320805494151560ff199095169490941790935560a0601f870184900490930282018301905260808101858152600492829190889088908190850183828082843760009201829052509385525050506020808301829052604083018790526001600160a01b03861660609093019290925283546001810185559381522081519192600402019081906108aa908261179d565b50602082015160018201805460ff191691151591909117905560408201516002820155606090910151600390910180546001600160a01b0319166001600160a01b0390921691909117905550505050565b60005b6004548110156102cd5761091181610303565b8061091b81611656565b9150506108fe565b61092b610f14565b6001600160a01b0381166109905760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102bb565b6102cd816110f6565b6109a1610f14565b6109ab8282610dc2565b6109c75760405162461bcd60e51b81526004016102bb906116a1565b6000600283836040516106ee929190611466565b60006109e78585610dc2565b610a035760405162461bcd60e51b81526004016102bb906116a1565b8260028686604051610a16929190611466565b90815260200160405180910390206002015410158015610a6b5750816001600160a01b031660028686604051610a4d929190611466565b908152604051908190036020019020600301546001600160a01b0316145b95945050505050565b610a7c610f14565b610a868282610dc2565b610aa25760405162461bcd60e51b81526004016102bb906116a1565b610aac82826102d0565b610af85760405162461bcd60e51b815260206004820152601d60248201527f546865206173736574207265666572656e6365206973206c6f636b656400000060448201526064016102bb565b610b2460028383604051610b0d929190611466565b908152602001604051809103902060020154610563565b60028282604051610b36929190611466565b9081526040519081900360200190206000610b51828261116c565b5060018101805460ff19169055600060028201819055600391820180546001600160a01b0319169055604051909190610b8d9085908590611466565b908152604051908190036020019020805491151560ff1990921691909117905560005b60045481101561055e578282604051602001610bcd929190611466565b6040516020818303038152906040528051906020012060048281548110610bf657610bf66114b2565b9060005260206000209060040201600001604051602001610c179190611851565b6040516020818303038152906040528051906020012003610c3b57610c3b81610303565b80610c4581611656565b915050610bb0565b60606000805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c87575b5050505050905090565b604080516080810182526060808252600060208301819052828401819052908201529051600290610ce39085908590611466565b9081526020016040518091039020604051806080016040529081600082018054610d0c906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610d38906114c8565b8015610d855780601f10610d5a57610100808354040283529160200191610d85565b820191906000526020600020905b815481529060010190602001808311610d6857829003601f168201915b5050509183525050600182015460ff1615156020820152600282015460408201526003909101546001600160a01b03166060909101529392505050565b600060038383604051610dd6929190611466565b9081526040519081900360200190205460ff16905092915050565b60606004805480602002602001604051908101604052809291908181526020016000905b82821015610f0b5783829060005260206000209060040201604051806080016040529081600082018054610e48906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610e74906114c8565b8015610ec15780601f10610e9657610100808354040283529160200191610ec1565b820191906000526020600020905b815481529060010190602001808311610ea457829003601f168201915b505050918352505060018281015460ff161515602080840191909152600284015460408401526003909301546001600160a01b031660609092019190915291835292019101610e15565b50505050905090565b6000805b600054811015610f7057336001600160a01b031660008281548110610f3f57610f3f6114b2565b6000918252602090912001546001600160a01b031603610f5e57600191505b80610f6881611656565b915050610f18565b506001811515146102cd5760405162461bcd60e51b815260206004820152601f60248201527f4f776e61626c653a2063616c6c6572206973206e6f7420616e206f776e65720060448201526064016102bb565b60005b6000548110156110be57816001600160a01b031660008281548110610fed57610fed6114b2565b6000918252602090912001546001600160a01b0316036110ac57600080546110179060019061148c565b81548110611027576110276114b2565b600091825260208220015481546001600160a01b03909116919083908110611051576110516114b2565b6000918252602082200180546001600160a01b0319166001600160a01b0393909316929092179091558054806110895761108961166f565b600082815260209020810160001990810180546001600160a01b03191690550190555b806110b681611656565b915050610fc6565b506040516001600160a01b038216907f86d076ecf250a6d90a67a7c75317f44709d5001395ecf1df6d9dad5278f1e68190600090a250565b600080546001810182558180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b03841690811790915560405190917fb4cd6c6140e1db788f68710738b06ef4d0df6a884a06a088433a4c2f5e036e7c91a250565b508054611178906114c8565b6000825580601f10611188575050565b601f0160209004906000526020600020908101906102cd91905b808211156111b657600081556001016111a2565b5090565b80356001600160a01b03811681146111d157600080fd5b919050565b6000602082840312156111e857600080fd5b6111f1826111ba565b9392505050565b60008083601f84011261120a57600080fd5b50813567ffffffffffffffff81111561122257600080fd5b60208301915083602082850101111561123a57600080fd5b9250929050565b6000806020838503121561125457600080fd5b823567ffffffffffffffff81111561126b57600080fd5b611277858286016111f8565b90969095509350505050565b60006020828403121561129557600080fd5b5035919050565b600080604083850312156112af57600080fd5b6112b8836111ba565b946020939093013593505050565b600080600080606085870312156112dc57600080fd5b843567ffffffffffffffff8111156112f357600080fd5b6112ff878288016111f8565b90955093505060208501359150611318604086016111ba565b905092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156113645783516001600160a01b03168352928401929184019160010161133f565b50909695505050505050565b60005b8381101561138b578181015183820152602001611373565b50506000910152565b600081516080845280518060808601526113b58160a0870160208501611370565b602084810151151590860152604080850151908601526060938401516001600160a01b0316938501939093525050601f01601f19160160a00190565b6020815260006111f16020830184611394565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561145957603f19888603018452611447858351611394565b9450928501929085019060010161142b565b5092979650505050505050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156102fd576102fd611476565b808201808211156102fd576102fd611476565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806114dc57607f821691505b6020821081036114fc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b601f82111561055e57600081815260208120601f850160051c8101602086101561153f5750805b601f850160051c820191505b8181101561155e5782815560010161154b565b505050505050565b600019600383901b1c191660019190911b1790565b818103611586575050565b61159082546114c8565b67ffffffffffffffff8111156115a8576115a8611502565b6115bc816115b684546114c8565b84611518565b6000601f8211600181146115ea57600083156115d85750848201545b6115e28482611566565b85555061164f565b600085815260209020601f19841690600086815260209020845b838110156116245782860154825560019586019590910190602001611604565b50858310156116425781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b60006001820161166857611668611476565b5060010190565b634e487b7160e01b600052603160045260246000fd5b60008251611697818460208701611370565b9190910192915050565b60208082526022908201527f546865206173736574207265666572656e636520646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b67ffffffffffffffff8311156116fb576116fb611502565b61170f8361170983546114c8565b83611518565b6000601f84116001811461173d576000851561172b5750838201355b6117358682611566565b84555061164f565b600083815260209020601f19861690835b8281101561176e578685013582556020948501946001909201910161174e565b508682101561178b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b815167ffffffffffffffff8111156117b7576117b7611502565b6117c5816115b684546114c8565b602080601f8311600181146117f457600084156117e25750858301515b6117ec8582611566565b86555061155e565b600085815260208120601f198616915b8281101561182357888601518255948401946001909101908401611804565b50858210156118415787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600080835461185f816114c8565b60018281168015611877576001811461188c576118bb565b60ff19841687528215158302870194506118bb565b8760005260208060002060005b858110156118b25781548a820152908401908201611899565b50505082870194505b5092969550505050505056fea26469706673582212204e3defbf3329eeb8a9a2352d01161391069b644ab4b4adcc96c509b58240729a64736f6c63430008100033", - "sourceMap": "191:3466:1:-:0;;;598:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;348:26:0;2132:10;348:12;:26::i;:::-;633:13:1;:23;;-1:-1:-1;;;;;;633:23:1;-1:-1:-1;;;;;633:23:1;;;;;;;;;;191:3466;;1603:135:0;1670:7;:22;;;;;;;;;;;;;;-1:-1:-1;;;;;;1670:22:0;-1:-1:-1;;;;;1670:22:0;;;;;;;;1707:24;;1670:22;;1707:24;;;1603:135;:::o;14:290:2:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:2;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:2:o;:::-;191:3466:1;;;;;;", - "deployedSourceMap": "191:3466:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1411:186:0;;;;;;:::i;:::-;;:::i;:::-;;2108:107:1;;;;;;:::i;:::-;;:::i;:::-;;;1317:14:2;;1310:22;1292:41;;1280:2;1265:18;2108:107:1;;;;;;;;3078:261;;;;;;:::i;:::-;;:::i;2342:234::-;;;;;;:::i;:::-;;:::i;2580:200::-;;;;;;:::i;:::-;;:::i;1062:243::-;;;;;;:::i;:::-;;:::i;665:393::-;;;;;;:::i;:::-;;:::i;3524:131::-;;;:::i;1222:183:0:-;;;;;;:::i;:::-;;:::i;1309:172:1:-;;;;;;:::i;:::-;;:::i;2784:259::-;;;;;;:::i;:::-;;:::i;1485:516::-;;;;;;:::i;:::-;;:::i;608:96:0:-;;;:::i;:::-;;;;;;;:::i;2219:119:1:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;2005:99::-;;;;;;:::i;:::-;;:::i;3374:110::-;;;:::i;:::-;;;;;;;:::i;1411:186:0:-;500:13;:11;:13::i;:::-;-1:-1:-1;;;;;1493:22:0;::::1;1485:73;;;::::0;-1:-1:-1;;;1485:73:0;;5204:2:2;1485:73:0::1;::::0;::::1;5186:21:2::0;5243:2;5223:18;;;5216:30;5282:34;5262:18;;;5255:62;-1:-1:-1;;;5333:18:2;;;5326:36;5379:19;;1485:73:0::1;;;;;;;;;1568:22;1581:8;1568:12;:22::i;:::-;1411:186:::0;:::o;2108:107:1:-;2172:4;2191:6;2198:2;;2191:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:19;;;;;;-1:-1:-1;2108:107:1;;;;;:::o;3078:261::-;3149:13;:20;3140:29;;3132:60;;;;-1:-1:-1;;;3132:60:1;;5889:2:2;3132:60:1;;;5871:21:2;5928:2;5908:18;;;5901:30;-1:-1:-1;;;5947:18:2;;;5940:48;6005:18;;3132:60:1;5687:342:2;3132:60:1;3213:6;3199:111;3225:13;:20;:22;;3246:1;;3225:22;:::i;:::-;3221:1;:26;3199:111;;;3283:13;3297:5;:1;3301;3297:5;:::i;:::-;3283:20;;;;;;;;:::i;:::-;;;;;;;;;;;3264:13;3278:1;3264:16;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:39;;:16;:39;:::i;:::-;-1:-1:-1;3264:39:1;;;;;;;;;;;;;;;;-1:-1:-1;;3264:39:1;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3264:39:1;-1:-1:-1;;;;;3264:39:1;;;;;;;;;3249:3;;;;:::i;:::-;;;;3199:111;;;;3315:13;:19;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;;3315:19:1;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;3315:19:1;;;;;-1:-1:-1;;3315:19:1;;;;;;;;;;;;-1:-1:-1;;;;;;3315:19:1;;;;;-1:-1:-1;3078:261:1:o;2342:234::-;500:13:0;:11;:13::i;:::-;2431::1::1;::::0;2457:65:::1;::::0;-1:-1:-1;;;;;9825:32:2;;;2457:65:1::1;::::0;::::1;9807:51:2::0;9874:18;;;9867:34;;;2413:12:1::1;::::0;2431:13:::1;::::0;9780:18:2;;2457:65:1::1;::::0;;-1:-1:-1;;2457:65:1;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;2457:65:1::1;-1:-1:-1::0;;;2457:65:1::1;::::0;;2431:97;::::1;::::0;2457:65;2431:97:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2412:116;;;2543:7;2535:36;;;::::0;-1:-1:-1;;;2535:36:1;;10406:2:2;2535:36:1::1;::::0;::::1;10388:21:2::0;10445:2;10425:18;;;10418:30;-1:-1:-1;;;10464:18:2;;;10457:46;10520:18;;2535:36:1::1;10204:340:2::0;2535:36:1::1;2406:170;2342:234:::0;;:::o;2580:200::-;500:13:0;:11;:13::i;:::-;2652::1::1;::::0;2678:48:::1;::::0;::::1;::::0;::::1;10695:25:2::0;;;2634:12:1::1;::::0;-1:-1:-1;;;;;2652:13:1::1;::::0;10668:18:2;;2678:48:1::1;::::0;;-1:-1:-1;;2678:48:1;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;2678:48:1::1;-1:-1:-1::0;;;2678:48:1::1;::::0;;2652:80;::::1;::::0;2678:48;2652:80:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2633:99;;;2747:7;2739:36;;;::::0;-1:-1:-1;;;2739:36:1;;10933:2:2;2739:36:1::1;::::0;::::1;10915:21:2::0;10972:2;10952:18;;;10945:30;-1:-1:-1;;;10991:18:2;;;10984:46;11047:18;;2739:36:1::1;10731:340:2::0;2739:36:1::1;2627:153;2580:200:::0;:::o;1062:243::-;500:13:0;:11;:13::i;:::-;1141::1::1;1151:2;;1141:9;:13::i;:::-;1133:60;;;;-1:-1:-1::0;;;1133:60:1::1;;;;;;;:::i;:::-;1208:17;1222:2;;1208:13;:17::i;:::-;1207:18;1199:68;;;::::0;-1:-1:-1;;;1199:68:1;;11681:2:2;1199:68:1::1;::::0;::::1;11663:21:2::0;11720:2;11700:18;;;11693:30;11759:34;11739:18;;;11732:62;-1:-1:-1;;;11810:18:2;;;11803:35;11855:19;;1199:68:1::1;11479:401:2::0;1199:68:1::1;1296:4;1274:6;1281:2;;1274:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:19:::1;;:26:::0;;;::::1;;-1:-1:-1::0;;1274:26:1;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;1062:243:1:o;665:393::-;500:13:0;:11;:13::i;:::-;785:2:1::1;;770:6;777:2;;770:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;;:17:::1;::::0;;:10;:17:::1;:::i;:::-;;813:6;793;800:2;;793:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:17;;:26;;;;847:5;825:6;832:2;;825:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:19:::1;;:27:::0;;;::::1;;-1:-1:-1::0;;825:27:1;;::::1;::::0;;;::::1;::::0;;;881:9;;858:6:::1;::::0;:10:::1;::::0;865:2;;;;858:10:::1;:::i;:::-;;;;;;;;;;;;;:20;;;:32;;;;;-1:-1:-1::0;;;;;858:32:1::1;;;;;-1:-1:-1::0;;;;;858:32:1::1;;;;;;915:4;897:11;909:2;;897:15;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;;::::1;::::0;;;;;:22;;;::::1;;-1:-1:-1::0;;897:22:1;;::::1;::::0;;;::::1;::::0;;;978:74;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;;959:13:::1;::::0;897:15;;978:74;1000:2;;;;;;978:74;;1000:2;;;;978:74;::::1;;::::0;::::1;::::0;;;-1:-1:-1;978:74:1;;;-1:-1:-1;;;978:74:1::1;::::0;;::::1;::::0;;;;;;;;;-1:-1:-1;;;;;978:74:1;::::1;::::0;;;;;;;;959:94;;978:74;959:94;::::1;::::0;;;;;;;;;;::::1;;;::::0;;;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;959:94:1::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;-1:-1:-1;;959:94:1::1;::::0;::::1;;::::0;;;::::1;::::0;;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;959:94:1::1;-1:-1:-1::0;;;;;959:94:1;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;;665:393:1:o;3524:131::-;3572:6;3567:84;3588:13;:20;3584:24;;3567:84;;;3623:21;3642:1;3623:18;:21::i;:::-;3610:3;;;;:::i;:::-;;;;3567:84;;1222:183:0;500:13;:11;:13::i;:::-;-1:-1:-1;;;;;1301:22:0;::::1;1293:73;;;::::0;-1:-1:-1;;;1293:73:0;;14655:2:2;1293:73:0::1;::::0;::::1;14637:21:2::0;14694:2;14674:18;;;14667:30;14733:34;14713:18;;;14706:62;-1:-1:-1;;;14784:18:2;;;14777:36;14830:19;;1293:73:0::1;14453:402:2::0;1293:73:0::1;1376:22;1389:8;1376:12;:22::i;1309:172:1:-:0;500:13:0;:11;:13::i;:::-;1390::1::1;1400:2;;1390:9;:13::i;:::-;1382:60;;;;-1:-1:-1::0;;;1382:60:1::1;;;;;;;:::i;:::-;1471:5;1449:6;1456:2;;1449:10;;;;;;;:::i;2784:259::-:0;2885:4;2905:13;2915:2;;2905:9;:13::i;:::-;2897:60;;;;-1:-1:-1;;;2897:60:1;;;;;;;:::i;:::-;2997:6;2976;2983:2;;2976:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:17;;;:27;;2975:63;;;;;3033:4;-1:-1:-1;;;;;3009:28:1;:6;3016:2;;3009:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:20;;;-1:-1:-1;;;;;3009:20:1;:28;2975:63;2968:70;2784:259;-1:-1:-1;;;;;2784:259:1:o;1485:516::-;500:13:0;:11;:13::i;:::-;1566::1::1;1576:2;;1566:9;:13::i;:::-;1558:60;;;;-1:-1:-1::0;;;1558:60:1::1;;;;;;;:::i;:::-;1632:17;1646:2;;1632:13;:17::i;:::-;1624:59;;;::::0;-1:-1:-1;;;1624:59:1;;15062:2:2;1624:59:1::1;::::0;::::1;15044:21:2::0;15101:2;15081:18;;;15074:30;15140:31;15120:18;;;15113:59;15189:18;;1624:59:1::1;14860:353:2::0;1624:59:1::1;1690:23;1695:6;1702:2;;1695:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:17;;;1690:4;:23::i;:::-;1727:6;1734:2;;1727:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;::::1;1720:17;1727:10:::0;;1720:17:::1;:::i;:::-;-1:-1:-1::0;1720:17:1::1;::::0;::::1;::::0;;-1:-1:-1;;1720:17:1::1;::::0;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;1720:17:1::1;::::0;;1743:15:::1;::::0;1720:17;;;1743:15:::1;::::0;1755:2;;;;1743:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:23;;;::::1;;-1:-1:-1::0;;1743:23:1;;::::1;::::0;;;::::1;::::0;;:15:::1;1806:191;1827:13;:20:::0;1823:24;::::1;1806:191;;;1945:2;;1928:20;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1918:31;;;;;;1893:13;1907:1;1893:16;;;;;;;;:::i;:::-;;;;;;;;;;;:19;;1876:37;;;;;;;;:::i;:::-;;;;;;;;;;;;;1866:48;;;;;;:83:::0;1862:129:::1;;1961:21;1980:1;1961:18;:21::i;:::-;1849:3:::0;::::1;::::0;::::1;:::i;:::-;;;;1806:191;;608:96:0::0;655:16;690:7;683:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;683:14:0;;;;;;;;;;;;;;;;;;;;;;;608:96;:::o;2219:119:1:-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2323:10:1;;:6;;:10;;2330:2;;;;2323:10;:::i;:::-;;;;;;;;;;;;;2316:17;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2316:17:1;;;-1:-1:-1;;2316:17:1;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2316:17:1;;;;;;;2219:119;-1:-1:-1;;;2219:119:1:o;2005:99::-;2065:4;2084:11;2096:2;;2084:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;2005:99:1;;;;:::o;3374:110::-;3428:23;3466:13;3459:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3459:20:1;;;-1:-1:-1;;3459:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3459:20:1;;;;;;;;;;;;;;;;;;;;;;;;;3374:110;:::o;777:296:0:-;832:9;864:6;859:142;880:7;:14;876:18;;859:142;;;2132:10;-1:-1:-1;;;;;919:26:0;:7;927:1;919:10;;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;919:10:0;:26;915:76;;972:4;965:11;;915:76;896:3;;;;:::i;:::-;;;;859:142;;;-1:-1:-1;1026:4:0;1018:12;;;;1010:56;;;;-1:-1:-1;;;1010:56:0;;16267:2:2;1010:56:0;;;16249:21:2;16306:2;16286:18;;;16279:30;16345:33;16325:18;;;16318:61;16396:18;;1010:56:0;16065:355:2;1744:303:0;1813:6;1808:195;1829:7;:14;1825:18;;1808:195;;;1882:5;-1:-1:-1;;;;;1868:19:0;:7;1876:1;1868:10;;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;1868:10:0;:19;1864:129;;1920:7;1928:14;;:18;;1945:1;;1928:18;:::i;:::-;1920:27;;;;;;;;:::i;:::-;;;;;;;;;;1907:10;;-1:-1:-1;;;;;1920:27:0;;;;;1915:1;;1907:10;;;;;;:::i;:::-;;;;;;;;;:40;;-1:-1:-1;;;;;;1907:40:0;-1:-1:-1;;;;;1907:40:0;;;;;;;;;;;1965:13;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;;1965:13:0;;;;;-1:-1:-1;;;;;;1965:13:0;;;;;;1864:129;1845:3;;;;:::i;:::-;;;;1808:195;;;-1:-1:-1;2017:23:0;;-1:-1:-1;;;;;2017:23:0;;;;;;;;1744:303;:::o;1603:135::-;1670:7;:22;;;;;;;;;;;;;;-1:-1:-1;;;;;;1670:22:0;-1:-1:-1;;;;;1670:22:0;;;;;;;;1707:24;;1670:22;;1707:24;;;1603:135;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:173:2:-;82:20;;-1:-1:-1;;;;;131:31:2;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;:::-;333:39;192:186;-1:-1:-1;;;192:186:2:o;383:348::-;435:8;445:6;499:3;492:4;484:6;480:17;476:27;466:55;;517:1;514;507:12;466:55;-1:-1:-1;540:20:2;;583:18;572:30;;569:50;;;615:1;612;605:12;569:50;652:4;644:6;640:17;628:29;;704:3;697:4;688:6;680;676:19;672:30;669:39;666:59;;;721:1;718;711:12;666:59;383:348;;;;;:::o;736:411::-;807:6;815;868:2;856:9;847:7;843:23;839:32;836:52;;;884:1;881;874:12;836:52;924:9;911:23;957:18;949:6;946:30;943:50;;;989:1;986;979:12;943:50;1028:59;1079:7;1070:6;1059:9;1055:22;1028:59;:::i;:::-;1106:8;;1002:85;;-1:-1:-1;736:411:2;-1:-1:-1;;;;736:411:2:o;1344:180::-;1403:6;1456:2;1444:9;1435:7;1431:23;1427:32;1424:52;;;1472:1;1469;1462:12;1424:52;-1:-1:-1;1495:23:2;;1344:180;-1:-1:-1;1344:180:2:o;1529:254::-;1597:6;1605;1658:2;1646:9;1637:7;1633:23;1629:32;1626:52;;;1674:1;1671;1664:12;1626:52;1697:29;1716:9;1697:29;:::i;:::-;1687:39;1773:2;1758:18;;;;1745:32;;-1:-1:-1;;;1529:254:2:o;1788:553::-;1877:6;1885;1893;1901;1954:2;1942:9;1933:7;1929:23;1925:32;1922:52;;;1970:1;1967;1960:12;1922:52;2010:9;1997:23;2043:18;2035:6;2032:30;2029:50;;;2075:1;2072;2065:12;2029:50;2114:59;2165:7;2156:6;2145:9;2141:22;2114:59;:::i;:::-;2192:8;;-1:-1:-1;2088:85:2;-1:-1:-1;;2274:2:2;2259:18;;2246:32;;-1:-1:-1;2297:38:2;2331:2;2316:18;;2297:38;:::i;:::-;2287:48;;1788:553;;;;;;;:::o;2346:658::-;2517:2;2569:21;;;2639:13;;2542:18;;;2661:22;;;2488:4;;2517:2;2740:15;;;;2714:2;2699:18;;;2488:4;2783:195;2797:6;2794:1;2791:13;2783:195;;;2862:13;;-1:-1:-1;;;;;2858:39:2;2846:52;;2953:15;;;;2918:12;;;;2894:1;2812:9;2783:195;;;-1:-1:-1;2995:3:2;;2346:658;-1:-1:-1;;;;;;2346:658:2:o;3009:250::-;3094:1;3104:113;3118:6;3115:1;3112:13;3104:113;;;3194:11;;;3188:18;3175:11;;;3168:39;3140:2;3133:10;3104:113;;;-1:-1:-1;;3251:1:2;3233:16;;3226:27;3009:250::o;3264:586::-;3321:3;3365:5;3359:12;3392:4;3387:3;3380:17;3426:12;3420:19;3471:6;3464:4;3459:3;3455:14;3448:30;3487:82;3562:6;3556:3;3551;3547:13;3540:4;3526:12;3522:23;3487:82;:::i;:::-;3632:4;3621:16;;;3615:23;3608:31;3601:39;3585:14;;;3578:63;3690:4;3679:16;;;3673:23;3657:14;;;3650:47;3750:4;3739:16;;;3733:23;-1:-1:-1;;;;;3729:49:2;3713:14;;;3706:73;;;;-1:-1:-1;;3833:2:2;3812:15;-1:-1:-1;;3808:29:2;3799:39;3766:3;3795:49;;3264:586::o;3855:277::-;4046:2;4035:9;4028:21;4009:4;4066:60;4122:2;4111:9;4107:18;4099:6;4066:60;:::i;4137:860::-;4341:4;4370:2;4410;4399:9;4395:18;4440:2;4429:9;4422:21;4463:6;4498;4492:13;4529:6;4521;4514:22;4567:2;4556:9;4552:18;4545:25;;4629:2;4619:6;4616:1;4612:14;4601:9;4597:30;4593:39;4579:53;;4667:2;4659:6;4655:15;4688:1;4698:270;4712:6;4709:1;4706:13;4698:270;;;4805:2;4801:7;4789:9;4781:6;4777:22;4773:36;4768:3;4761:49;4833:55;4881:6;4872;4866:13;4833:55;:::i;:::-;4823:65;-1:-1:-1;4946:12:2;;;;4911:15;;;;4734:1;4727:9;4698:270;;;-1:-1:-1;4985:6:2;;4137:860;-1:-1:-1;;;;;;;4137:860:2:o;5409:273::-;5594:6;5586;5581:3;5568:33;5550:3;5620:16;;5645:13;;;5620:16;5409:273;-1:-1:-1;5409:273:2:o;6034:127::-;6095:10;6090:3;6086:20;6083:1;6076:31;6126:4;6123:1;6116:15;6150:4;6147:1;6140:15;6166:128;6233:9;;;6254:11;;;6251:37;;;6268:18;;:::i;6299:125::-;6364:9;;;6385:10;;;6382:36;;;6398:18;;:::i;6429:127::-;6490:10;6485:3;6481:20;6478:1;6471:31;6521:4;6518:1;6511:15;6545:4;6542:1;6535:15;6561:380;6640:1;6636:12;;;;6683;;;6704:61;;6758:4;6750:6;6746:17;6736:27;;6704:61;6811:2;6803:6;6800:14;6780:18;6777:38;6774:161;;6857:10;6852:3;6848:20;6845:1;6838:31;6892:4;6889:1;6882:15;6920:4;6917:1;6910:15;6774:161;;6561:380;;;:::o;6946:127::-;7007:10;7002:3;6998:20;6995:1;6988:31;7038:4;7035:1;7028:15;7062:4;7059:1;7052:15;7204:545;7306:2;7301:3;7298:11;7295:448;;;7342:1;7367:5;7363:2;7356:17;7412:4;7408:2;7398:19;7482:2;7470:10;7466:19;7463:1;7459:27;7453:4;7449:38;7518:4;7506:10;7503:20;7500:47;;;-1:-1:-1;7541:4:2;7500:47;7596:2;7591:3;7587:12;7584:1;7580:20;7574:4;7570:31;7560:41;;7651:82;7669:2;7662:5;7659:13;7651:82;;;7714:17;;;7695:1;7684:13;7651:82;;;7655:3;;;7204:545;;;:::o;7754:166::-;-1:-1:-1;;7882:1:2;7878:11;;;7874:24;7870:29;7860:40;7906:1;7902:11;;;;7857:57;;7754:166::o;7925:1431::-;8040:3;8034:4;8031:13;8028:26;;8047:5;;7925:1431::o;8028:26::-;8077:37;8109:3;8103:10;8077:37;:::i;:::-;8137:18;8129:6;8126:30;8123:56;;;8159:18;;:::i;:::-;8188:97;8278:6;8238:38;8270:4;8264:11;8238:38;:::i;:::-;8232:4;8188:97;:::i;:::-;8311:1;8339:2;8331:6;8328:14;8356:1;8351:748;;;;9143:1;9160:6;9157:89;;;-1:-1:-1;9212:19:2;;;9206:26;9157:89;9272:67;9332:6;9325:5;9272:67;:::i;:::-;9266:4;9259:81;;8321:1029;;8351:748;7151:1;7144:14;;;7188:4;7175:18;;-1:-1:-1;;8387:20:2;;;7151:1;7144:14;;;7188:4;7175:18;;8551:9;8573:251;8587:7;8584:1;8581:14;8573:251;;;8669:21;;;8663:28;8648:44;;8719:1;8792:18;;;;8747:15;;;;8610:4;8603:12;8573:251;;;8577:3;8852:6;8843:7;8840:19;8837:203;;;8913:21;;;8907:28;-1:-1:-1;;8998:1:2;8994:14;;;9010:3;8990:24;8986:37;8982:42;8967:58;8952:74;;8837:203;;;;9086:1;9077:6;9074:1;9070:14;9066:22;9060:4;9053:36;8321:1029;;;;7925:1431;;:::o;9361:135::-;9400:3;9421:17;;;9418:43;;9441:18;;:::i;:::-;-1:-1:-1;9488:1:2;9477:13;;9361:135::o;9501:127::-;9562:10;9557:3;9553:20;9550:1;9543:31;9593:4;9590:1;9583:15;9617:4;9614:1;9607:15;9912:287;10041:3;10079:6;10073:13;10095:66;10154:6;10149:3;10142:4;10134:6;10130:17;10095:66;:::i;:::-;10177:16;;;;;9912:287;-1:-1:-1;;9912:287:2:o;11076:398::-;11278:2;11260:21;;;11317:2;11297:18;;;11290:30;11356:34;11351:2;11336:18;;11329:62;-1:-1:-1;;;11422:2:2;11407:18;;11400:32;11464:3;11449:19;;11076:398::o;11885:1206::-;12009:18;12004:3;12001:27;11998:53;;;12031:18;;:::i;:::-;12060:94;12150:3;12110:38;12142:4;12136:11;12110:38;:::i;:::-;12104:4;12060:94;:::i;:::-;12180:1;12205:2;12200:3;12197:11;12222:1;12217:616;;;;12877:1;12894:3;12891:93;;;-1:-1:-1;12950:19:2;;;12937:33;12891:93;13010:64;13070:3;13063:5;13010:64;:::i;:::-;13004:4;12997:78;;12190:895;;12217:616;7151:1;7144:14;;;7188:4;7175:18;;-1:-1:-1;;12253:17:2;;;12354:9;12376:229;12390:7;12387:1;12384:14;12376:229;;;12479:19;;;12466:33;12451:49;;12586:4;12571:20;;;;12539:1;12527:14;;;;12406:12;12376:229;;;12380:3;12633;12624:7;12621:16;12618:159;;;12757:1;12753:6;12747:3;12741;12738:1;12734:11;12730:21;12726:34;12722:39;12709:9;12704:3;12700:19;12687:33;12683:79;12675:6;12668:95;12618:159;;;12820:1;12814:3;12811:1;12807:11;12803:19;12797:4;12790:33;12190:895;;11885:1206;;;:::o;13096:1352::-;13222:3;13216:10;13249:18;13241:6;13238:30;13235:56;;;13271:18;;:::i;:::-;13300:97;13390:6;13350:38;13382:4;13376:11;13350:38;:::i;13300:97::-;13452:4;;13516:2;13505:14;;13533:1;13528:663;;;;14235:1;14252:6;14249:89;;;-1:-1:-1;14304:19:2;;;14298:26;14249:89;14364:67;14424:6;14417:5;14364:67;:::i;:::-;14358:4;14351:81;;13498:944;;13528:663;7151:1;7144:14;;;7188:4;7175:18;;-1:-1:-1;;13564:20:2;;;13682:236;13696:7;13693:1;13690:14;13682:236;;;13785:19;;;13779:26;13764:42;;13877:27;;;;13845:1;13833:14;;;;13712:19;;13682:236;;;13686:3;13946:6;13937:7;13934:19;13931:201;;;14007:19;;;14001:26;-1:-1:-1;;14090:1:2;14086:14;;;14102:3;14082:24;14078:37;14074:42;14059:58;14044:74;;13931:201;-1:-1:-1;;;;;14178:1:2;14162:14;;;14158:22;14145:36;;-1:-1:-1;13096:1352:2:o;15218:842::-;15346:3;15375:1;15408:6;15402:13;15438:36;15464:9;15438:36;:::i;:::-;15493:1;15510:18;;;15537:133;;;;15684:1;15679:356;;;;15503:532;;15537:133;-1:-1:-1;;15570:24:2;;15558:37;;15643:14;;15636:22;15624:35;;15615:45;;;-1:-1:-1;15537:133:2;;15679:356;15710:6;15707:1;15700:17;15740:4;15785:2;15782:1;15772:16;15810:1;15824:165;15838:6;15835:1;15832:13;15824:165;;;15916:14;;15903:11;;;15896:35;15959:16;;;;15853:10;;15824:165;;;15828:3;;;16018:6;16013:3;16009:16;16002:23;;15503:532;-1:-1:-1;16051:3:2;;15218:842;-1:-1:-1;;;;;;15218:842:2:o", - "sourcePath": "/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol", - "compiler": { - "name": "solc", - "version": "0.8.16+commit.07a7930e" - }, - "ast": { - "absolutePath": "/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol", - "exportedSymbols": { - "AssetReference": [ - 210 - ], - "AssetReferenceContract": [ - 621 - ], - "MyOwnable": [ - 198 - ] - }, - "id": 622, - "license": "GPL-3.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 200, - "literals": [ - "solidity", - "^", - "0.8", - ".15" - ], - "nodeType": "PragmaDirective", - "src": "37:24:1" - }, - { - "absolutePath": "/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol", - "file": "./MyOwnable.sol", - "id": 201, - "nameLocation": "-1:-1:-1", - "nodeType": "ImportDirective", - "scope": 622, - "sourceUnit": 199, - "src": "63:25:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "canonicalName": "AssetReference", - "id": 210, - "members": [ - { - "constant": false, - "id": 203, - "mutability": "mutable", - "name": "id", - "nameLocation": "125:2:1", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "118:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 202, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "118:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 205, - "mutability": "mutable", - "name": "isLocked", - "nameLocation": "138:8:1", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "133:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 204, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "133:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 207, - "mutability": "mutable", - "name": "amount", - "nameLocation": "157:6:1", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "152:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 206, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "152:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 209, - "mutability": "mutable", - "name": "recipient", - "nameLocation": "177:9:1", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "169:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 208, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "169:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "name": "AssetReference", - "nameLocation": "97:14:1", - "nodeType": "StructDefinition", - "scope": 622, - "src": "90:99:1", - "visibility": "public" - }, - { - "abstract": false, - "baseContracts": [ - { - "baseName": { - "id": 211, - "name": "MyOwnable", - "nameLocations": [ - "226:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 198, - "src": "226:9:1" - }, - "id": 212, - "nodeType": "InheritanceSpecifier", - "src": "226:9:1" - } - ], - "canonicalName": "AssetReferenceContract", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 621, - "linearizedBaseContracts": [ - 621, - 198 - ], - "name": "AssetReferenceContract", - "nameLocation": "200:22:1", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 214, - "mutability": "mutable", - "name": "cbdc_contract", - "nameLocation": "248:13:1", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "240:21:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 213, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "240:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 219, - "mutability": "mutable", - "name": "assets", - "nameLocation": "300:6:1", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "265:41:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string => struct AssetReference)" - }, - "typeName": { - "id": 218, - "keyType": { - "id": 215, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "274:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "265:34:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string => struct AssetReference)" - }, - "valueType": { - "id": 217, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 216, - "name": "AssetReference", - "nameLocations": [ - "284:14:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 210, - "src": "284:14:1" - }, - "referencedDeclaration": 210, - "src": "284:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", - "typeString": "struct AssetReference" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 223, - "mutability": "mutable", - "name": "assetExists", - "nameLocation": "335:11:1", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "310:36:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "typeName": { - "id": 222, - "keyType": { - "id": 220, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "319:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "310:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "valueType": { - "id": 221, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "329:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 227, - "mutability": "mutable", - "name": "assetRefsList", - "nameLocation": "580:13:1", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "563:30:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference[]" - }, - "typeName": { - "baseType": { - "id": 225, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 224, - "name": "AssetReference", - "nameLocations": [ - "563:14:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 210, - "src": "563:14:1" - }, - "referencedDeclaration": 210, - "src": "563:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", - "typeString": "struct AssetReference" - } - }, - "id": 226, - "nodeType": "ArrayTypeName", - "src": "563:16:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr", - "typeString": "struct AssetReference[]" - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 236, - "nodeType": "Block", - "src": "627:34:1", - "statements": [ - { - "expression": { - "id": 234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 232, - "name": "cbdc_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "633:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 233, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "649:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "633:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 235, - "nodeType": "ExpressionStatement", - "src": "633:23:1" - } - ] - }, - "id": 237, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 230, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 229, - "mutability": "mutable", - "name": "account", - "nameLocation": "618:7:1", - "nodeType": "VariableDeclaration", - "scope": 237, - "src": "610:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 228, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "610:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "609:17:1" - }, - "returnParameters": { - "id": 231, - "nodeType": "ParameterList", - "parameters": [], - "src": "627:0:1" - }, - "scope": 621, - "src": "598:63:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 293, - "nodeType": "Block", - "src": "764:294:1", - "statements": [ - { - "expression": { - "id": 253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 248, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "770:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 250, - "indexExpression": { - "id": 249, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "777:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "770:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 251, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "781:2:1", - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 203, - "src": "770:13:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 252, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "785:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "src": "770:17:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 254, - "nodeType": "ExpressionStatement", - "src": "770:17:1" - }, - { - "expression": { - "id": 260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 255, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "793:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 257, - "indexExpression": { - "id": 256, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "800:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "793:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 258, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "804:6:1", - "memberName": "amount", - "nodeType": "MemberAccess", - "referencedDeclaration": 207, - "src": "793:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 259, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 241, - "src": "813:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "793:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 261, - "nodeType": "ExpressionStatement", - "src": "793:26:1" - }, - { - "expression": { - "id": 267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 262, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "825:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 264, - "indexExpression": { - "id": 263, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "832:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "825:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 265, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "836:8:1", - "memberName": "isLocked", - "nodeType": "MemberAccess", - "referencedDeclaration": 205, - "src": "825:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "847:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "825:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 268, - "nodeType": "ExpressionStatement", - "src": "825:27:1" - }, - { - "expression": { - "id": 274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 269, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "858:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 271, - "indexExpression": { - "id": 270, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "865:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "858:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 272, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "869:9:1", - "memberName": "recipient", - "nodeType": "MemberAccess", - "referencedDeclaration": 209, - "src": "858:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 273, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "881:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "858:32:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 275, - "nodeType": "ExpressionStatement", - "src": "858:32:1" - }, - { - "expression": { - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 276, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "897:11:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 278, - "indexExpression": { - "id": 277, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "909:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "897:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "915:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "897:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 281, - "nodeType": "ExpressionStatement", - "src": "897:22:1" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 286, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "1000:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "hexValue": "66616c7365", - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1010:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "id": 288, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 241, - "src": "1023:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 289, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "1037:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 285, - "name": "AssetReference", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "978:14:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_AssetReference_$210_storage_ptr_$", - "typeString": "type(struct AssetReference storage pointer)" - } - }, - "id": 290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "978:74:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_memory_ptr", - "typeString": "struct AssetReference memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_AssetReference_$210_memory_ptr", - "typeString": "struct AssetReference memory" - } - ], - "expression": { - "id": 282, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "959:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "973:4:1", - "memberName": "push", - "nodeType": "MemberAccess", - "src": "959:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$_t_struct$_AssetReference_$210_storage_$returns$__$bound_to$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$", - "typeString": "function (struct AssetReference storage ref[] storage pointer,struct AssetReference storage ref)" - } - }, - "id": 291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "959:94:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 292, - "nodeType": "ExpressionStatement", - "src": "959:94:1" - } - ] - }, - "functionSelector": "663bcc92", - "id": 294, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 246, - "kind": "modifierInvocation", - "modifierName": { - "id": 245, - "name": "onlyOwner", - "nameLocations": [ - "754:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "754:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "754:9:1" - } - ], - "name": "createAssetReference", - "nameLocation": "674:20:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 244, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 239, - "mutability": "mutable", - "name": "id", - "nameLocation": "711:2:1", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "695:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 238, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "695:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 241, - "mutability": "mutable", - "name": "amount", - "nameLocation": "720:6:1", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "715:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 240, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "715:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 243, - "mutability": "mutable", - "name": "recipient", - "nameLocation": "736:9:1", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "728:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 242, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "728:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "694:52:1" - }, - "returnParameters": { - "id": 247, - "nodeType": "ParameterList", - "parameters": [], - "src": "764:0:1" - }, - "scope": 621, - "src": "665:393:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 323, - "nodeType": "Block", - "src": "1127:178:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 303, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 296, - "src": "1151:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 302, - "name": "isPresent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "1141:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1141:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", - "id": 305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1156:36:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - }, - "value": "The asset reference does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - } - ], - "id": 301, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1133:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1133:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 307, - "nodeType": "ExpressionStatement", - "src": "1133:60:1" - }, - { - "expression": { - "arguments": [ - { - "id": 312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1207:18:1", - "subExpression": { - "arguments": [ - { - "id": 310, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 296, - "src": "1222:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 309, - "name": "isAssetLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 446, - "src": "1208:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1208:17:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e636520697320616c7265616479206c6f636b6564", - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1227:39:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_64521928c09bf02b6b5471b284b9f6dfbc7431afff7624ad621932a3f25b489f", - "typeString": "literal_string \"The asset reference is already locked\"" - }, - "value": "The asset reference is already locked" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_64521928c09bf02b6b5471b284b9f6dfbc7431afff7624ad621932a3f25b489f", - "typeString": "literal_string \"The asset reference is already locked\"" - } - ], - "id": 308, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1199:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1199:68:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 315, - "nodeType": "ExpressionStatement", - "src": "1199:68:1" - }, - { - "expression": { - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 316, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "1274:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 318, - "indexExpression": { - "id": 317, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 296, - "src": "1281:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1274:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 319, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "1285:8:1", - "memberName": "isLocked", - "nodeType": "MemberAccess", - "referencedDeclaration": 205, - "src": "1274:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1296:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1274:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 322, - "nodeType": "ExpressionStatement", - "src": "1274:26:1" - } - ] - }, - "functionSelector": "63773a6c", - "id": 324, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 299, - "kind": "modifierInvocation", - "modifierName": { - "id": 298, - "name": "onlyOwner", - "nameLocations": [ - "1117:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "1117:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "1117:9:1" - } - ], - "name": "lockAssetReference", - "nameLocation": "1071:18:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 296, - "mutability": "mutable", - "name": "id", - "nameLocation": "1106:2:1", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1090:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 295, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1090:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1089:20:1" - }, - "returnParameters": { - "id": 300, - "nodeType": "ParameterList", - "parameters": [], - "src": "1127:0:1" - }, - "scope": 621, - "src": "1062:243:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 345, - "nodeType": "Block", - "src": "1376:105:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 333, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "1400:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 332, - "name": "isPresent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "1390:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1390:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", - "id": 335, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1405:36:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - }, - "value": "The asset reference does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - } - ], - "id": 331, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1382:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1382:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 337, - "nodeType": "ExpressionStatement", - "src": "1382:60:1" - }, - { - "expression": { - "id": 343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 338, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "1449:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 340, - "indexExpression": { - "id": 339, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "1456:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1449:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 341, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "1460:8:1", - "memberName": "isLocked", - "nodeType": "MemberAccess", - "referencedDeclaration": 205, - "src": "1449:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 342, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1471:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1449:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 344, - "nodeType": "ExpressionStatement", - "src": "1449:27:1" - } - ] - }, - "functionSelector": "8ef45293", - "id": 346, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 329, - "kind": "modifierInvocation", - "modifierName": { - "id": 328, - "name": "onlyOwner", - "nameLocations": [ - "1366:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "1366:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "1366:9:1" - } - ], - "name": "unLockAssetReference", - "nameLocation": "1318:20:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 326, - "mutability": "mutable", - "name": "id", - "nameLocation": "1355:2:1", - "nodeType": "VariableDeclaration", - "scope": 346, - "src": "1339:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 325, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1339:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1338:20:1" - }, - "returnParameters": { - "id": 330, - "nodeType": "ParameterList", - "parameters": [], - "src": "1376:0:1" - }, - "scope": 621, - "src": "1309:172:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 420, - "nodeType": "Block", - "src": "1552:449:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 355, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1576:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 354, - "name": "isPresent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "1566:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1566:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", - "id": 357, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1581:36:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - }, - "value": "The asset reference does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - } - ], - "id": 353, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1558:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1558:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 359, - "nodeType": "ExpressionStatement", - "src": "1558:60:1" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 362, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1646:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 361, - "name": "isAssetLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 446, - "src": "1632:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1632:17:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e6365206973206c6f636b6564", - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1651:31:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0336abc357798e0ba342f01c1301e0e34f6dedce2787c507141be0c60e4153c9", - "typeString": "literal_string \"The asset reference is locked\"" - }, - "value": "The asset reference is locked" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0336abc357798e0ba342f01c1301e0e34f6dedce2787c507141be0c60e4153c9", - "typeString": "literal_string \"The asset reference is locked\"" - } - ], - "id": 360, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1624:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1624:59:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 366, - "nodeType": "ExpressionStatement", - "src": "1624:59:1" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "baseExpression": { - "id": 368, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "1695:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 370, - "indexExpression": { - "id": 369, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1702:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1695:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 371, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1706:6:1", - "memberName": "amount", - "nodeType": "MemberAccess", - "referencedDeclaration": 207, - "src": "1695:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 367, - "name": "burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 510, - "src": "1690:4:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1690:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 373, - "nodeType": "ExpressionStatement", - "src": "1690:23:1" - }, - { - "expression": { - "id": 377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "1720:17:1", - "subExpression": { - "baseExpression": { - "id": 374, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "1727:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 376, - "indexExpression": { - "id": 375, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1734:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1727:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 378, - "nodeType": "ExpressionStatement", - "src": "1720:17:1" - }, - { - "expression": { - "id": 383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 379, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "1743:11:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 381, - "indexExpression": { - "id": 380, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1755:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1743:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1761:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1743:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 384, - "nodeType": "ExpressionStatement", - "src": "1743:23:1" - }, - { - "body": { - "id": 418, - "nodeType": "Block", - "src": "1854:143:1", - "statements": [ - { - "condition": { - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "arguments": [ - { - "arguments": [ - { - "expression": { - "baseExpression": { - "id": 399, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "1893:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 401, - "indexExpression": { - "id": 400, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "1907:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1893:16:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 402, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1910:2:1", - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 203, - "src": "1893:19:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - ], - "expression": { - "id": 397, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "1876:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 398, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "1880:12:1", - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "src": "1876:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1876:37:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 396, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "1866:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1866:48:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 408, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1945:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "expression": { - "id": 406, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "1928:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "1932:12:1", - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "src": "1928:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1928:20:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 405, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "1918:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1918:31:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "1866:83:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 417, - "nodeType": "IfStatement", - "src": "1862:129:1", - "trueBody": { - "id": 416, - "nodeType": "Block", - "src": "1951:40:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 413, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "1980:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 412, - "name": "removeItemFromList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "1961:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1961:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 415, - "nodeType": "ExpressionStatement", - "src": "1961:21:1" - } - ] - } - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 389, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "1823:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 390, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "1827:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1841:6:1", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "1827:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1823:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 419, - "initializationExpression": { - "assignments": [ - 386 - ], - "declarations": [ - { - "constant": false, - "id": 386, - "mutability": "mutable", - "name": "i", - "nameLocation": "1816:1:1", - "nodeType": "VariableDeclaration", - "scope": 419, - "src": "1811:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 385, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1811:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 388, - "initialValue": { - "hexValue": "30", - "id": 387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1820:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "1811:10:1" - }, - "loopExpression": { - "expression": { - "id": 394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "1849:3:1", - "subExpression": { - "id": 393, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "1849:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 395, - "nodeType": "ExpressionStatement", - "src": "1849:3:1" - }, - "nodeType": "ForStatement", - "src": "1806:191:1" - } - ] - }, - "functionSelector": "ade3222b", - "id": 421, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 351, - "kind": "modifierInvocation", - "modifierName": { - "id": 350, - "name": "onlyOwner", - "nameLocations": [ - "1542:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "1542:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "1542:9:1" - } - ], - "name": "deleteAssetReference", - "nameLocation": "1494:20:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 349, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 348, - "mutability": "mutable", - "name": "id", - "nameLocation": "1531:2:1", - "nodeType": "VariableDeclaration", - "scope": 421, - "src": "1515:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 347, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1515:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1514:20:1" - }, - "returnParameters": { - "id": 352, - "nodeType": "ParameterList", - "parameters": [], - "src": "1552:0:1" - }, - "scope": 621, - "src": "1485:516:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 432, - "nodeType": "Block", - "src": "2071:33:1", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 428, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "2084:11:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 430, - "indexExpression": { - "id": 429, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 423, - "src": "2096:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2084:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 427, - "id": 431, - "nodeType": "Return", - "src": "2077:22:1" - } - ] - }, - "functionSelector": "bc548275", - "id": 433, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isPresent", - "nameLocation": "2014:9:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 424, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 423, - "mutability": "mutable", - "name": "id", - "nameLocation": "2040:2:1", - "nodeType": "VariableDeclaration", - "scope": 433, - "src": "2024:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 422, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2024:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "2023:20:1" - }, - "returnParameters": { - "id": 427, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 426, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 433, - "src": "2065:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 425, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2065:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "2064:6:1" - }, - "scope": 621, - "src": "2005:99:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 445, - "nodeType": "Block", - "src": "2178:37:1", - "statements": [ - { - "expression": { - "expression": { - "baseExpression": { - "id": 440, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "2191:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 442, - "indexExpression": { - "id": 441, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 435, - "src": "2198:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2191:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 443, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2202:8:1", - "memberName": "isLocked", - "nodeType": "MemberAccess", - "referencedDeclaration": 205, - "src": "2191:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 439, - "id": 444, - "nodeType": "Return", - "src": "2184:26:1" - } - ] - }, - "functionSelector": "1ae4eb68", - "id": 446, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isAssetLocked", - "nameLocation": "2117:13:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 436, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 435, - "mutability": "mutable", - "name": "id", - "nameLocation": "2147:2:1", - "nodeType": "VariableDeclaration", - "scope": 446, - "src": "2131:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 434, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2131:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "2130:20:1" - }, - "returnParameters": { - "id": 439, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 438, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 446, - "src": "2172:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 437, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2172:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "2171:6:1" - }, - "scope": 621, - "src": "2108:107:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 458, - "nodeType": "Block", - "src": "2310:28:1", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 454, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "2323:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 456, - "indexExpression": { - "id": 455, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 448, - "src": "2330:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2323:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "functionReturnParameters": 453, - "id": 457, - "nodeType": "Return", - "src": "2316:17:1" - } - ] - }, - "functionSelector": "b1fa2580", - "id": 459, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAssetReference", - "nameLocation": "2228:17:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 449, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 448, - "mutability": "mutable", - "name": "id", - "nameLocation": "2262:2:1", - "nodeType": "VariableDeclaration", - "scope": 459, - "src": "2246:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 447, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2246:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "2245:20:1" - }, - "returnParameters": { - "id": 453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 452, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 459, - "src": "2287:21:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_memory_ptr", - "typeString": "struct AssetReference" - }, - "typeName": { - "id": 451, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 450, - "name": "AssetReference", - "nameLocations": [ - "2287:14:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 210, - "src": "2287:14:1" - }, - "referencedDeclaration": 210, - "src": "2287:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", - "typeString": "struct AssetReference" - } - }, - "visibility": "internal" - } - ], - "src": "2286:23:1" - }, - "scope": 621, - "src": "2219:119:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 485, - "nodeType": "Block", - "src": "2406:170:1", - "statements": [ - { - "assignments": [ - 469, - null - ], - "declarations": [ - { - "constant": false, - "id": 469, - "mutability": "mutable", - "name": "success", - "nameLocation": "2418:7:1", - "nodeType": "VariableDeclaration", - "scope": 485, - "src": "2413:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 468, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2413:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - null - ], - "id": 479, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "hexValue": "6d696e7428616464726573732c75696e7432353629", - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2481:23:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_40c10f19c047ae7dfa66d6312b683d2ea3dfbcb4159e96b967c5f4b0a86f2842", - "typeString": "literal_string \"mint(address,uint256)\"" - }, - "value": "mint(address,uint256)" - }, - { - "id": 475, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 461, - "src": "2506:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 476, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 463, - "src": "2515:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_40c10f19c047ae7dfa66d6312b683d2ea3dfbcb4159e96b967c5f4b0a86f2842", - "typeString": "literal_string \"mint(address,uint256)\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 472, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "2457:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "2461:19:1", - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "src": "2457:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2457:65:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 470, - "name": "cbdc_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2431:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2445:4:1", - "memberName": "call", - "nodeType": "MemberAccess", - "src": "2431:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2431:97:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2412:116:1" - }, - { - "expression": { - "arguments": [ - { - "id": 481, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "2543:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "6d696e742063616c6c206661696c6564", - "id": 482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2552:18:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bf9c519459adea86d8a83bfe255ca2736ba7c8625940375bb2fc6e318ee9051b", - "typeString": "literal_string \"mint call failed\"" - }, - "value": "mint call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bf9c519459adea86d8a83bfe255ca2736ba7c8625940375bb2fc6e318ee9051b", - "typeString": "literal_string \"mint call failed\"" - } - ], - "id": 480, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2535:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2535:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 484, - "nodeType": "ExpressionStatement", - "src": "2535:36:1" - } - ] - }, - "functionSelector": "40c10f19", - "id": 486, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 466, - "kind": "modifierInvocation", - "modifierName": { - "id": 465, - "name": "onlyOwner", - "nameLocations": [ - "2396:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "2396:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "2396:9:1" - } - ], - "name": "mint", - "nameLocation": "2351:4:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 461, - "mutability": "mutable", - "name": "account", - "nameLocation": "2364:7:1", - "nodeType": "VariableDeclaration", - "scope": 486, - "src": "2356:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 460, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2356:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 463, - "mutability": "mutable", - "name": "amount", - "nameLocation": "2381:6:1", - "nodeType": "VariableDeclaration", - "scope": 486, - "src": "2373:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2373:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "2355:33:1" - }, - "returnParameters": { - "id": 467, - "nodeType": "ParameterList", - "parameters": [], - "src": "2406:0:1" - }, - "scope": 621, - "src": "2342:234:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 509, - "nodeType": "Block", - "src": "2627:153:1", - "statements": [ - { - "assignments": [ - 494, - null - ], - "declarations": [ - { - "constant": false, - "id": 494, - "mutability": "mutable", - "name": "success", - "nameLocation": "2639:7:1", - "nodeType": "VariableDeclaration", - "scope": 509, - "src": "2634:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 493, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2634:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - null - ], - "id": 503, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "hexValue": "6275726e2875696e7432353629", - "id": 499, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2702:15:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_42966c689b5afe9b9b3f8a7103b2a19980d59629bfd6a20a60972312ed41d836", - "typeString": "literal_string \"burn(uint256)\"" - }, - "value": "burn(uint256)" - }, - { - "id": 500, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 488, - "src": "2719:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_42966c689b5afe9b9b3f8a7103b2a19980d59629bfd6a20a60972312ed41d836", - "typeString": "literal_string \"burn(uint256)\"" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 497, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "2678:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "2682:19:1", - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "src": "2678:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2678:48:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 495, - "name": "cbdc_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2652:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2666:4:1", - "memberName": "call", - "nodeType": "MemberAccess", - "src": "2652:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2652:80:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2633:99:1" - }, - { - "expression": { - "arguments": [ - { - "id": 505, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 494, - "src": "2747:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "6275726e2063616c6c206661696c6564", - "id": 506, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2756:18:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bd2737dababb3f3aa60c0b3e63ed3f2a6dbe45608e370c8c6df354f1d0f7216c", - "typeString": "literal_string \"burn call failed\"" - }, - "value": "burn call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bd2737dababb3f3aa60c0b3e63ed3f2a6dbe45608e370c8c6df354f1d0f7216c", - "typeString": "literal_string \"burn call failed\"" - } - ], - "id": 504, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2739:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2739:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 508, - "nodeType": "ExpressionStatement", - "src": "2739:36:1" - } - ] - }, - "functionSelector": "42966c68", - "id": 510, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 491, - "kind": "modifierInvocation", - "modifierName": { - "id": 490, - "name": "onlyOwner", - "nameLocations": [ - "2617:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "2617:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "2617:9:1" - } - ], - "name": "burn", - "nameLocation": "2589:4:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 489, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 488, - "mutability": "mutable", - "name": "amount", - "nameLocation": "2602:6:1", - "nodeType": "VariableDeclaration", - "scope": 510, - "src": "2594:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 487, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2594:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "2593:16:1" - }, - "returnParameters": { - "id": 492, - "nodeType": "ParameterList", - "parameters": [], - "src": "2627:0:1" - }, - "scope": 621, - "src": "2580:200:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 544, - "nodeType": "Block", - "src": "2891:152:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 523, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 512, - "src": "2915:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 522, - "name": "isPresent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "2905:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2905:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", - "id": 525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2920:36:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - }, - "value": "The asset reference does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - } - ], - "id": 521, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2897:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2897:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 527, - "nodeType": "ExpressionStatement", - "src": "2897:60:1" - }, - { - "expression": { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 528, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "2976:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 530, - "indexExpression": { - "id": 529, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 512, - "src": "2983:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2976:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 531, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2987:6:1", - "memberName": "amount", - "nodeType": "MemberAccess", - "referencedDeclaration": 207, - "src": "2976:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 532, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 514, - "src": "2997:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2976:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 534, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2975:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 535, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "3009:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 537, - "indexExpression": { - "id": 536, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 512, - "src": "3016:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3009:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 538, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3020:9:1", - "memberName": "recipient", - "nodeType": "MemberAccess", - "referencedDeclaration": 209, - "src": "3009:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 539, - "name": "user", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 516, - "src": "3033:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3009:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 541, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3008:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "2975:63:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 520, - "id": 543, - "nodeType": "Return", - "src": "2968:70:1" - } - ] - }, - "functionSelector": "9ca27299", - "id": 545, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "checkValidBridgeBack", - "nameLocation": "2793:20:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 517, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 512, - "mutability": "mutable", - "name": "id", - "nameLocation": "2830:2:1", - "nodeType": "VariableDeclaration", - "scope": 545, - "src": "2814:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 511, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2814:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 514, - "mutability": "mutable", - "name": "amount", - "nameLocation": "2842:6:1", - "nodeType": "VariableDeclaration", - "scope": 545, - "src": "2834:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 513, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2834:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 516, - "mutability": "mutable", - "name": "user", - "nameLocation": "2858:4:1", - "nodeType": "VariableDeclaration", - "scope": 545, - "src": "2850:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 515, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2850:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "2813:50:1" - }, - "returnParameters": { - "id": 520, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 519, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 545, - "src": "2885:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 518, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2885:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "2884:6:1" - }, - "scope": 621, - "src": "2784:259:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 588, - "nodeType": "Block", - "src": "3126:213:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 551, - "name": "_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 547, - "src": "3140:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 552, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3149:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3163:6:1", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "3149:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3140:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "696e646578206f7574206f6620626f756e64", - "id": 555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3171:20:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9bd393a5b80babd34996e9cb4b5d65af0ee420fc5edf77dbd7c6d563caa3bff2", - "typeString": "literal_string \"index out of bound\"" - }, - "value": "index out of bound" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9bd393a5b80babd34996e9cb4b5d65af0ee420fc5edf77dbd7c6d563caa3bff2", - "typeString": "literal_string \"index out of bound\"" - } - ], - "id": 550, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "3132:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3132:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 557, - "nodeType": "ExpressionStatement", - "src": "3132:60:1" - }, - { - "body": { - "id": 581, - "nodeType": "Block", - "src": "3254:56:1", - "statements": [ - { - "expression": { - "id": 579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 571, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3264:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 573, - "indexExpression": { - "id": 572, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "3278:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3264:16:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "baseExpression": { - "id": 574, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3283:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 578, - "indexExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 575, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "3297:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "hexValue": "31", - "id": 576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3301:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3297:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3283:20:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "src": "3264:39:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 580, - "nodeType": "ExpressionStatement", - "src": "3264:39:1" - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 562, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "3221:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 563, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3225:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3239:6:1", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "3225:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "hexValue": "31", - "id": 565, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3246:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3225:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3221:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 582, - "initializationExpression": { - "assignments": [ - 559 - ], - "declarations": [ - { - "constant": false, - "id": 559, - "mutability": "mutable", - "name": "i", - "nameLocation": "3209:1:1", - "nodeType": "VariableDeclaration", - "scope": 582, - "src": "3204:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 558, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3204:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 561, - "initialValue": { - "id": 560, - "name": "_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 547, - "src": "3213:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3204:15:1" - }, - "loopExpression": { - "expression": { - "id": 569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "3249:3:1", - "subExpression": { - "id": 568, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "3249:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 570, - "nodeType": "ExpressionStatement", - "src": "3249:3:1" - }, - "nodeType": "ForStatement", - "src": "3199:111:1" - }, - { - "expression": { - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "id": 583, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3315:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3329:3:1", - "memberName": "pop", - "nodeType": "MemberAccess", - "src": "3315:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$returns$__$bound_to$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$", - "typeString": "function (struct AssetReference storage ref[] storage pointer)" - } - }, - "id": 586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3315:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 587, - "nodeType": "ExpressionStatement", - "src": "3315:19:1" - } - ] - }, - "functionSelector": "21db00b3", - "id": 589, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "removeItemFromList", - "nameLocation": "3087:18:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 548, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 547, - "mutability": "mutable", - "name": "_index", - "nameLocation": "3111:6:1", - "nodeType": "VariableDeclaration", - "scope": 589, - "src": "3106:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 546, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3106:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "3105:13:1" - }, - "returnParameters": { - "id": 549, - "nodeType": "ParameterList", - "parameters": [], - "src": "3126:0:1" - }, - "scope": 621, - "src": "3078:261:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 598, - "nodeType": "Block", - "src": "3453:31:1", - "statements": [ - { - "expression": { - "id": 596, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3466:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "functionReturnParameters": 595, - "id": 597, - "nodeType": "Return", - "src": "3459:20:1" - } - ] - }, - "functionSelector": "c8da01af", - "id": 599, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAllAssetReferences", - "nameLocation": "3383:21:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 590, - "nodeType": "ParameterList", - "parameters": [], - "src": "3404:2:1" - }, - "returnParameters": { - "id": 595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 594, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 599, - "src": "3428:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_memory_ptr_$dyn_memory_ptr", - "typeString": "struct AssetReference[]" - }, - "typeName": { - "baseType": { - "id": 592, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 591, - "name": "AssetReference", - "nameLocations": [ - "3428:14:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 210, - "src": "3428:14:1" - }, - "referencedDeclaration": 210, - "src": "3428:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", - "typeString": "struct AssetReference" - } - }, - "id": 593, - "nodeType": "ArrayTypeName", - "src": "3428:16:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr", - "typeString": "struct AssetReference[]" - } - }, - "visibility": "internal" - } - ], - "src": "3427:25:1" - }, - "scope": 621, - "src": "3374:110:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 619, - "nodeType": "Block", - "src": "3561:94:1", - "statements": [ - { - "body": { - "id": 617, - "nodeType": "Block", - "src": "3615:36:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 614, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 603, - "src": "3642:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 613, - "name": "removeItemFromList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "3623:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3623:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 616, - "nodeType": "ExpressionStatement", - "src": "3623:21:1" - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 606, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 603, - "src": "3584:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 607, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3588:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3602:6:1", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "3588:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3584:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 618, - "initializationExpression": { - "assignments": [ - 603 - ], - "declarations": [ - { - "constant": false, - "id": 603, - "mutability": "mutable", - "name": "i", - "nameLocation": "3577:1:1", - "nodeType": "VariableDeclaration", - "scope": 618, - "src": "3572:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 602, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3572:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 605, - "initialValue": { - "hexValue": "30", - "id": 604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3581:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "3572:10:1" - }, - "loopExpression": { - "expression": { - "id": 611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "3610:3:1", - "subExpression": { - "id": 610, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 603, - "src": "3610:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 612, - "nodeType": "ExpressionStatement", - "src": "3610:3:1" - }, - "nodeType": "ForStatement", - "src": "3567:84:1" - } - ] - }, - "functionSelector": "6b4bd58c", - "id": 620, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "resetAssetRefsList", - "nameLocation": "3533:18:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 600, - "nodeType": "ParameterList", - "parameters": [], - "src": "3551:2:1" - }, - "returnParameters": { - "id": 601, - "nodeType": "ParameterList", - "parameters": [], - "src": "3561:0:1" - }, - "scope": 621, - "src": "3524:131:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 622, - "src": "191:3466:1", - "usedErrors": [] - } - ], - "src": "37:3621:1" - }, - "functionHashes": { - "addOwner(address)": "7065cb48", - "burn(uint256)": "42966c68", - "checkValidBridgeBack(string,uint256,address)": "9ca27299", - "createAssetReference(string,uint256,address)": "663bcc92", - "deleteAssetReference(string)": "ade3222b", - "getAllAssetReferences()": "c8da01af", - "getAssetReference(string)": "b1fa2580", - "isAssetLocked(string)": "1ae4eb68", - "isPresent(string)": "bc548275", - "lockAssetReference(string)": "63773a6c", - "mint(address,uint256)": "40c10f19", - "owners()": "affe39c1", - "removeItemFromList(uint256)": "21db00b3", - "removeOwner(address)": "173825d9", - "resetAssetRefsList()": "6b4bd58c", - "unLockAssetReference(string)": "8ef45293" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "1279400", - "executionCost": "infinite", - "totalCost": "infinite" - }, - "external": { - "addOwner(address)": "infinite", - "burn(uint256)": "infinite", - "checkValidBridgeBack(string,uint256,address)": "infinite", - "createAssetReference(string,uint256,address)": "infinite", - "deleteAssetReference(string)": "infinite", - "getAllAssetReferences()": "infinite", - "getAssetReference(string)": "infinite", - "isAssetLocked(string)": "infinite", - "isPresent(string)": "infinite", - "lockAssetReference(string)": "infinite", - "mint(address,uint256)": "infinite", - "owners()": "infinite", - "removeItemFromList(uint256)": "infinite", - "removeOwner(address)": "infinite", - "resetAssetRefsList()": "infinite", - "unLockAssetReference(string)": "infinite" - } - } -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol deleted file mode 100644 index 1ee2f8e52d..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.15; - -contract MyOwnable { - address[] private _owners; - - event OwnershipRemoved(address indexed previousOwner); - event OwnershipAdded(address indexed newOwner); - - /** - * @dev Initializes the contract setting the deployer as the initial owner. - */ - constructor() { - _addNewOwner(_msgSender()); - } - - /** - * @dev Throws if called by any account other than the owner. - */ - modifier onlyOwner() { - _checkOwner(); - _; - } - - /** - * @dev Returns the address of the current owners. - */ - function owners() public view virtual returns (address[] memory) { - return _owners; - } - - /** - * @dev Throws if the sender is not the owner. - */ - function _checkOwner() internal view virtual { - bool flag = false; - for (uint i = 0; i < _owners.length; i++) { - if (_owners[i] == _msgSender()) { - flag = true; - } - } - require(flag == true, "Ownable: caller is not an owner"); - } - - /** - * @dev Transfers ownership of the contract to a new account (`newOwner`). - * Can only be called by the current owner. - */ - function addOwner(address newOwner) public virtual onlyOwner { - require(newOwner != address(0), "Ownable: new owner is the zero address"); - _addNewOwner(newOwner); - } - - function removeOwner(address oldOwner) public virtual onlyOwner { - require(oldOwner != address(0), "Ownable: old owner is the zero address"); - _removeOwner(oldOwner); - } - - function _addNewOwner(address newOwner) internal virtual { - _owners.push(newOwner); - emit OwnershipAdded(newOwner); - } - - function _removeOwner(address owner) internal virtual { - for (uint i = 0; i < _owners.length; i++) { - if (_owners[i] == owner) { - _owners[i] = _owners[_owners.length - 1]; - _owners.pop(); - } - } - emit OwnershipRemoved(owner); - } - - function _msgSender() internal view virtual returns (address) { - return msg.sender; - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract-test.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract-test.sol deleted file mode 100644 index ad03bbac0d..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract-test.sol +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; -import "remix_testassetRefContract.sol"; -import "../contracts/CBDCcontract.sol"; -import "../contracts/AssetReferenceContract.sol"; - -contract AssetReferenceContractTest { - - AssetReferenceContract assetRefContract; - CBDCcontract cbdc_contract; - - function beforeEach () public { - cbdc_contract = new CBDCcontract(); - assetRefContract = new AssetReferenceContract(address(cbdc_contract)); - - cbdc_contract.setAssetReferenceContract(address(assetRefContract)); - cbdc_contract.transferOwnership(address(assetRefContract)); - } - - function createAssetReferenceSuccessfully () public { - assetRefContract.createAssetReference("id1", 123, address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2)); - - AssetReference memory asset = assetRefContract.getAssetReference("id1"); - Assert.equal(asset.id, "id1", "asset reference id did not match"); - Assert.equal(asset.isLocked, false, "asset reference lock state did not match"); - Assert.equal(asset.amount, 123, "asset reference amount did not match"); - Assert.equal(asset.recipient, address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2), "asset reference recipient did not match"); - } - - function lockAndUnlockAssetReferenceSuccessfully () public { - assetRefContract.createAssetReference("id1", 123, address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2)); - - assetRefContract.lockAssetReference("id1"); - AssetReference memory asset1 = assetRefContract.getAssetReference("id1"); - Assert.equal(asset1.id, "id1", "asset reference id did not match"); - Assert.equal(asset1.isLocked, true, "asset reference lock state did not match"); - - assetRefContract.unLockAssetReference("id1"); - asset1 = assetRefContract.getAssetReference("id1"); - Assert.equal(asset1.id, "id1", "asset reference id did not match"); - Assert.equal(asset1.isLocked, false, "asset reference lock state did not match"); - } - - function deleteAssetReferenceSuccessfully () public { - assetRefContract.createAssetReference("id1", 123, address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2)); - assetRefContract.deleteAssetReference("id1"); - - bool exists = assetRefContract.isPresent("id1"); - Assert.equal(exists, false, "asset reference did not match"); - } - - function mintTokens () public { - assetRefContract.mint(address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2), 123); - - uint256 balance = cbdc_contract.balanceOf(address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2)); - Assert.equal(balance, 123, "tokens minted did not match"); - } - -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol deleted file mode 100644 index cb041b11cb..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol +++ /dev/null @@ -1,130 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity ^0.8.15; - -import "./MyOwnable.sol"; - -struct AssetReference { - string id; - bool isLocked; - uint amount; - address recipient; -} - -contract AssetReferenceContract is MyOwnable { - address cbdc_contract; - mapping (string => AssetReference) assets; - mapping (string => bool) assetExists; - - // only used for UI purposes. The list is not updated in each operation - // so it should not be used for other ends than this - // The main use for this is to demonstrate in the UI the asset references list - AssetReference[] assetRefsList; - - constructor(address account) { - cbdc_contract = account; - } - - function createAssetReference(string calldata id, uint amount, address recipient) public onlyOwner { - assets[id].id= id; - assets[id].amount = amount; - assets[id].isLocked = false; - assets[id].recipient = recipient; - - assetExists[id] = true; - - // used for UI purposes only - assetRefsList.push(AssetReference( - id, - false, - amount, - recipient - )); - } - - function lockAssetReference(string calldata id) public onlyOwner { - require(isPresent(id), "The asset reference does not exist"); - require(!isAssetLocked(id), "The asset reference is already locked"); - - assets[id].isLocked = true; - } - - function unLockAssetReference(string calldata id) public onlyOwner { - require(isPresent(id), "The asset reference does not exist"); - - assets[id].isLocked = false; - } - - function deleteAssetReference(string calldata id) public onlyOwner { - require(isPresent(id), "The asset reference does not exist"); - require(isAssetLocked(id), "The asset reference is locked"); - - burn(assets[id].amount); - - delete assets[id]; - assetExists[id] = false; - - // used for UI purposes only - for (uint i = 0; i < assetRefsList.length; i++) { - if (keccak256(abi.encodePacked(assetRefsList[i].id)) == keccak256(abi.encodePacked(id))) { - removeItemFromList(i); - } - } - } - - function isPresent(string calldata id) public view returns (bool) { - return assetExists[id]; - } - - function isAssetLocked(string calldata id) public view returns (bool) { - return assets[id].isLocked; - } - - function getAssetReference(string calldata id) public view returns (AssetReference memory) { - return assets[id]; - } - - function mint(address account, uint256 amount) public onlyOwner { - (bool success, ) = cbdc_contract.call( - abi.encodeWithSignature("mint(address,uint256)", account, amount) - ); - - require(success, "mint call failed"); - } - - function burn(uint256 amount) public onlyOwner { - (bool success, ) = cbdc_contract.call( - abi.encodeWithSignature("burn(uint256)", amount) - ); - - require(success, "burn call failed"); - } - - function checkValidBridgeBack(string calldata id, uint256 amount, address user) public view returns (bool) { - require(isPresent(id), "The asset reference does not exist"); - - return (assets[id].amount >= amount) && (assets[id].recipient == user); - } - - // used for UI purposes only - function removeItemFromList(uint _index) public { - require(_index < assetRefsList.length, "index out of bound"); - - for (uint i = _index; i < assetRefsList.length-1; i++) { - assetRefsList[i] = assetRefsList[i + 1]; - } - assetRefsList.pop(); - } - - // used for UI purposes only - function getAllAssetReferences() public view returns (AssetReference[] memory) { - return assetRefsList; - } - - // used for testing purposes only - function resetAssetRefsList() public { - for (uint i = 0; i < assetRefsList.length; i++) { - removeItemFromList(i); - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json deleted file mode 100644 index 506ad749f3..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json +++ /dev/null @@ -1,2495 +0,0 @@ -{ - "contractName": "CBDCcontract", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "string", - "name": "asset_ref_id", - "type": "string" - } - ], - "name": "escrow", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - } - ], - "name": "resetBalanceOf", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contract_address", - "type": "address" - } - ], - "name": "setAssetReferenceContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"asset_ref_id\",\"type\":\"string\"}],\"name\":\"escrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"resetBalanceOf\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contract_address\",\"type\":\"address\"}],\"name\":\"setAssetReferenceContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Create a sample ERC20 standard token\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"SampleERC20\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol\":\"CBDCcontract\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol\":{\"keccak256\":\"0x0b74316abddd0f7e38c33034c987eb21560c8ef86d7b03c194a1050c09fee74e\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b0a6ec93f638b1304b1e2ff5fc3dbaa0f5c98ee988c7d8e0a8d4c4eba35cb223\",\"dweb:/ipfs/QmQwRUJN7XPMpTod9SPiNyC6nmKiCHS7pgmmQjAsjYTLVo\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e12cbaa7378fd9b62280e4e1d164bedcb4399ce238f5f98fc0eefb7e50577981\",\"dweb:/ipfs/QmXRoFGUgfsaRkoPT5bxNMtSayKTQ8GZATLPXf69HcRA51\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xd1d8caaeb45f78e0b0715664d56c220c283c89bf8b8c02954af86404d6b367f8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://300a0cc7be3b26c96c22a47ffa9530a585e1c4f2dba3021d9bf309dc63007487\",\"dweb:/ipfs/QmQmxsvxK6CaJmQ4D8vDCYPLHMqcMmZLcBqedG4GFAbzu9\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2c3d0973630ed74f2b5ce3944677a885dc70ec32fc83b35f55045a10224da32b\",\"dweb:/ipfs/QmbefZ5RoEZKNHXCALfh683PnaNYzKPcKMFjyY1DVAgq8A\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]}},\"version\":1}", - "bytecode": "6080604052600680546001600160a01b031990811673f28d5769171bfbd2b3628d722e58129a6ae15022179091556007805490911690553480156200004357600080fd5b506040518060400160405280601a81526020017f43656e7472616c42616e6b4469676974616c43757272656e6379000000000000815250604051806040016040528060048152602001634342444360e01b815250620000b1620000ab620000d760201b60201c565b620000db565b6004620000bf8382620001d0565b506005620000ce8282620001d0565b5050506200029c565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200015657607f821691505b6020821081036200017757634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001cb57600081815260208120601f850160051c81016020861015620001a65750805b601f850160051c820191505b81811015620001c757828155600101620001b2565b5050505b505050565b81516001600160401b03811115620001ec57620001ec6200012b565b6200020481620001fd845462000141565b846200017d565b602080601f8311600181146200023c5760008415620002235750858301515b600019600386901b1c1916600185901b178555620001c7565b600085815260208120601f198616915b828110156200026d578886015182559484019460019091019084016200024c565b50858210156200028c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6111c980620002ac6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b411461025b578063a457c2d714610263578063a9059cbb14610276578063dd62ed3e14610289578063f2fde38b146102c257600080fd5b806342966c68146101e957806370a08231146101fc578063715018a6146102255780638d1a450d1461022d5780638da5cb5b1461024057600080fd5b8063313ce567116100f4578063313ce5671461018c5780633459feb21461019b57806339509351146101b057806340c10f19146101c3578063417d11af146101d657600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016757806323b872dd14610179575b600080fd5b61012e6102d5565b60405161013b9190610e40565b60405180910390f35b610157610152366004610e8f565b610367565b604051901515815260200161013b565b6003545b60405190815260200161013b565b610157610187366004610eb9565b61037e565b6040516012815260200161013b565b6101ae6101a9366004610ef5565b61042d565b005b6101576101be366004610e8f565b6104ad565b6101ae6101d1366004610e8f565b6104e9565b6101ae6101e4366004610f6a565b610521565b6101ae6101f7366004610fe6565b61062f565b61016b61020a366004610fff565b6001600160a01b031660009081526001602052604090205490565b6101ae610672565b6101ae61023b366004610fff565b6106a8565b6000546040516001600160a01b03909116815260200161013b565b61012e6106f4565b610157610271366004610e8f565b610703565b610157610284366004610e8f565b61079c565b61016b610297366004611021565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101ae6102d0366004610fff565b6107a9565b6060600480546102e490611054565b80601f016020809104026020016040519081016040528092919081815260200182805461031090611054565b801561035d5780601f106103325761010080835404028352916020019161035d565b820191906000526020600020905b81548152906001019060200180831161034057829003601f168201915b5050505050905090565b6000610374338484610841565b5060015b92915050565b600061038b848484610966565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156104155760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6104228533858403610841565b506001949350505050565b6000805b828110156104a75761046384848381811061044e5761044e61108e565b905060200201602081019061020a9190610fff565b915061049584848381811061047a5761047a61108e565b905060200201602081019061048f9190610fff565b83610b34565b8061049f816110ba565b915050610431565b50505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916103749185906104e49086906110d3565b610841565b6000546001600160a01b031633146105135760405162461bcd60e51b815260040161040c906110e6565b61051d8282610c7a565b5050565b610529610d59565b60065461053f906001600160a01b03168461079c565b506007546040516000916001600160a01b03169061056790859085908890339060240161111b565b60408051601f198184030181529181526020820180516001600160e01b031663331de64960e11b1790525161059c9190611164565b6000604051808303816000865af19150503d80600081146105d9576040519150601f19603f3d011682016040523d82523d6000602084013e6105de565b606091505b50509050806104a75760405162461bcd60e51b815260206004820181905260248201527f63726561746541737365745265666572656e63652063616c6c206661696c6564604482015260640161040c565b6000546001600160a01b031633146106595760405162461bcd60e51b815260040161040c906110e6565b60065461066f906001600160a01b031682610b34565b50565b6000546001600160a01b0316331461069c5760405162461bcd60e51b815260040161040c906110e6565b6106a66000610dcc565b565b6000546001600160a01b031633146106d25760405162461bcd60e51b815260040161040c906110e6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6060600580546102e490611054565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156107855760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161040c565b6107923385858403610841565b5060019392505050565b6000610374338484610966565b6000546001600160a01b031633146107d35760405162461bcd60e51b815260040161040c906110e6565b6001600160a01b0381166108385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161040c565b61066f81610dcc565b6001600160a01b0383166108a35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161040c565b6001600160a01b0382166109045760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161040c565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166109ca5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161040c565b6001600160a01b038216610a2c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161040c565b6001600160a01b03831660009081526001602052604090205481811015610aa45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161040c565b6001600160a01b03808516600090815260016020526040808220858503905591851681529081208054849290610adb9084906110d3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b2791815260200190565b60405180910390a36104a7565b6001600160a01b038216610b945760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161040c565b6001600160a01b03821660009081526001602052604090205481811015610c085760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161040c565b6001600160a01b0383166000908152600160205260408120838303905560038054849290610c37908490611180565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610959565b6001600160a01b038216610cd05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161040c565b8060036000828254610ce291906110d3565b90915550506001600160a01b03821660009081526001602052604081208054839290610d0f9084906110d3565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6007546001600160a01b03166106a65760405162461bcd60e51b815260206004820152603260248201527f43424443636f6e74726163743a206173736574207265666572656e636520636f6044820152711b9d1c9858dd081b9bdd081919599a5b995960721b606482015260840161040c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b83811015610e37578181015183820152602001610e1f565b50506000910152565b6020815260008251806020840152610e5f816040850160208701610e1c565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114610e8a57600080fd5b919050565b60008060408385031215610ea257600080fd5b610eab83610e73565b946020939093013593505050565b600080600060608486031215610ece57600080fd5b610ed784610e73565b9250610ee560208501610e73565b9150604084013590509250925092565b60008060208385031215610f0857600080fd5b823567ffffffffffffffff80821115610f2057600080fd5b818501915085601f830112610f3457600080fd5b813581811115610f4357600080fd5b8660208260051b8501011115610f5857600080fd5b60209290920196919550909350505050565b600080600060408486031215610f7f57600080fd5b83359250602084013567ffffffffffffffff80821115610f9e57600080fd5b818601915086601f830112610fb257600080fd5b813581811115610fc157600080fd5b876020828501011115610fd357600080fd5b6020830194508093505050509250925092565b600060208284031215610ff857600080fd5b5035919050565b60006020828403121561101157600080fd5b61101a82610e73565b9392505050565b6000806040838503121561103457600080fd5b61103d83610e73565b915061104b60208401610e73565b90509250929050565b600181811c9082168061106857607f821691505b60208210810361108857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110cc576110cc6110a4565b5060010190565b80820180821115610378576103786110a4565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60608152836060820152838560808301376000608085830181019190915260208201939093526001600160a01b03919091166040820152601f909201601f191690910101919050565b60008251611176818460208701610e1c565b9190910192915050565b81810381811115610378576103786110a456fea26469706673582212208e0d27b796e78bc197361bd99b802d95e06f14b4ad47842414086729e5f6ad7c64736f6c63430008100033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b411461025b578063a457c2d714610263578063a9059cbb14610276578063dd62ed3e14610289578063f2fde38b146102c257600080fd5b806342966c68146101e957806370a08231146101fc578063715018a6146102255780638d1a450d1461022d5780638da5cb5b1461024057600080fd5b8063313ce567116100f4578063313ce5671461018c5780633459feb21461019b57806339509351146101b057806340c10f19146101c3578063417d11af146101d657600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016757806323b872dd14610179575b600080fd5b61012e6102d5565b60405161013b9190610e40565b60405180910390f35b610157610152366004610e8f565b610367565b604051901515815260200161013b565b6003545b60405190815260200161013b565b610157610187366004610eb9565b61037e565b6040516012815260200161013b565b6101ae6101a9366004610ef5565b61042d565b005b6101576101be366004610e8f565b6104ad565b6101ae6101d1366004610e8f565b6104e9565b6101ae6101e4366004610f6a565b610521565b6101ae6101f7366004610fe6565b61062f565b61016b61020a366004610fff565b6001600160a01b031660009081526001602052604090205490565b6101ae610672565b6101ae61023b366004610fff565b6106a8565b6000546040516001600160a01b03909116815260200161013b565b61012e6106f4565b610157610271366004610e8f565b610703565b610157610284366004610e8f565b61079c565b61016b610297366004611021565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101ae6102d0366004610fff565b6107a9565b6060600480546102e490611054565b80601f016020809104026020016040519081016040528092919081815260200182805461031090611054565b801561035d5780601f106103325761010080835404028352916020019161035d565b820191906000526020600020905b81548152906001019060200180831161034057829003601f168201915b5050505050905090565b6000610374338484610841565b5060015b92915050565b600061038b848484610966565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156104155760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6104228533858403610841565b506001949350505050565b6000805b828110156104a75761046384848381811061044e5761044e61108e565b905060200201602081019061020a9190610fff565b915061049584848381811061047a5761047a61108e565b905060200201602081019061048f9190610fff565b83610b34565b8061049f816110ba565b915050610431565b50505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916103749185906104e49086906110d3565b610841565b6000546001600160a01b031633146105135760405162461bcd60e51b815260040161040c906110e6565b61051d8282610c7a565b5050565b610529610d59565b60065461053f906001600160a01b03168461079c565b506007546040516000916001600160a01b03169061056790859085908890339060240161111b565b60408051601f198184030181529181526020820180516001600160e01b031663331de64960e11b1790525161059c9190611164565b6000604051808303816000865af19150503d80600081146105d9576040519150601f19603f3d011682016040523d82523d6000602084013e6105de565b606091505b50509050806104a75760405162461bcd60e51b815260206004820181905260248201527f63726561746541737365745265666572656e63652063616c6c206661696c6564604482015260640161040c565b6000546001600160a01b031633146106595760405162461bcd60e51b815260040161040c906110e6565b60065461066f906001600160a01b031682610b34565b50565b6000546001600160a01b0316331461069c5760405162461bcd60e51b815260040161040c906110e6565b6106a66000610dcc565b565b6000546001600160a01b031633146106d25760405162461bcd60e51b815260040161040c906110e6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6060600580546102e490611054565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156107855760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161040c565b6107923385858403610841565b5060019392505050565b6000610374338484610966565b6000546001600160a01b031633146107d35760405162461bcd60e51b815260040161040c906110e6565b6001600160a01b0381166108385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161040c565b61066f81610dcc565b6001600160a01b0383166108a35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161040c565b6001600160a01b0382166109045760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161040c565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166109ca5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161040c565b6001600160a01b038216610a2c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161040c565b6001600160a01b03831660009081526001602052604090205481811015610aa45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161040c565b6001600160a01b03808516600090815260016020526040808220858503905591851681529081208054849290610adb9084906110d3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b2791815260200190565b60405180910390a36104a7565b6001600160a01b038216610b945760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161040c565b6001600160a01b03821660009081526001602052604090205481811015610c085760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161040c565b6001600160a01b0383166000908152600160205260408120838303905560038054849290610c37908490611180565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610959565b6001600160a01b038216610cd05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161040c565b8060036000828254610ce291906110d3565b90915550506001600160a01b03821660009081526001602052604081208054839290610d0f9084906110d3565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6007546001600160a01b03166106a65760405162461bcd60e51b815260206004820152603260248201527f43424443636f6e74726163743a206173736574207265666572656e636520636f6044820152711b9d1c9858dd081b9bdd081919599a5b995960721b606482015260840161040c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b83811015610e37578181015183820152602001610e1f565b50506000910152565b6020815260008251806020840152610e5f816040850160208701610e1c565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114610e8a57600080fd5b919050565b60008060408385031215610ea257600080fd5b610eab83610e73565b946020939093013593505050565b600080600060608486031215610ece57600080fd5b610ed784610e73565b9250610ee560208501610e73565b9150604084013590509250925092565b60008060208385031215610f0857600080fd5b823567ffffffffffffffff80821115610f2057600080fd5b818501915085601f830112610f3457600080fd5b813581811115610f4357600080fd5b8660208260051b8501011115610f5857600080fd5b60209290920196919550909350505050565b600080600060408486031215610f7f57600080fd5b83359250602084013567ffffffffffffffff80821115610f9e57600080fd5b818601915086601f830112610fb257600080fd5b813581811115610fc157600080fd5b876020828501011115610fd357600080fd5b6020830194508093505050509250925092565b600060208284031215610ff857600080fd5b5035919050565b60006020828403121561101157600080fd5b61101a82610e73565b9392505050565b6000806040838503121561103457600080fd5b61103d83610e73565b915061104b60208401610e73565b90509250929050565b600181811c9082168061106857607f821691505b60208210810361108857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110cc576110cc6110a4565b5060010190565b80820180821115610378576103786110a4565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60608152836060820152838560808301376000608085830181019190915260208201939093526001600160a01b03919091166040820152601f909201601f191690910101919050565b60008251611176818460208701610e1c565b9190910192915050565b81810381811115610378576103786110a456fea26469706673582212208e0d27b796e78bc197361bd99b802d95e06f14b4ad47842414086729e5f6ad7c64736f6c63430008100033", - "sourceMap": "319:1524:0:-:0;;;366:76;;;-1:-1:-1;;;;;;366:76:0;;;399:42;366:76;;;;448:39;;;;;;;;494:65;;;;;;;;;;1963:113:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1963:113:2;;;921:32:1;940:12;:10;;;:12;;:::i;:::-;921:18;:32::i;:::-;2029:5:2;:13;2037:5;2029;:13;:::i;:::-;-1:-1:-1;2052:7:2;:17;2062:7;2052;:17;:::i;:::-;;1963:113;;319:1524:0;;640:96:5;719:10;;640:96::o;2270:187:1:-;2343:16;2362:6;;-1:-1:-1;;;;;2378:17:1;;;-1:-1:-1;;;;;;2378:17:1;;;;;;2410:40;;2362:6;;;;;;;2410:40;;2343:16;2410:40;2333:124;2270:187;:::o;14:127:6:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:380;225:1;221:12;;;;268;;;289:61;;343:4;335:6;331:17;321:27;;289:61;396:2;388:6;385:14;365:18;362:38;359:161;;442:10;437:3;433:20;430:1;423:31;477:4;474:1;467:15;505:4;502:1;495:15;359:161;;146:380;;;:::o;657:545::-;759:2;754:3;751:11;748:448;;;795:1;820:5;816:2;809:17;865:4;861:2;851:19;935:2;923:10;919:19;916:1;912:27;906:4;902:38;971:4;959:10;956:20;953:47;;;-1:-1:-1;994:4:6;953:47;1049:2;1044:3;1040:12;1037:1;1033:20;1027:4;1023:31;1013:41;;1104:82;1122:2;1115:5;1112:13;1104:82;;;1167:17;;;1148:1;1137:13;1104:82;;;1108:3;;;748:448;657:545;;;:::o;1378:1352::-;1498:10;;-1:-1:-1;;;;;1520:30:6;;1517:56;;;1553:18;;:::i;:::-;1582:97;1672:6;1632:38;1664:4;1658:11;1632:38;:::i;:::-;1626:4;1582:97;:::i;:::-;1734:4;;1798:2;1787:14;;1815:1;1810:663;;;;2517:1;2534:6;2531:89;;;-1:-1:-1;2586:19:6;;;2580:26;2531:89;-1:-1:-1;;1335:1:6;1331:11;;;1327:24;1323:29;1313:40;1359:1;1355:11;;;1310:57;2633:81;;1780:944;;1810:663;604:1;597:14;;;641:4;628:18;;-1:-1:-1;;1846:20:6;;;1964:236;1978:7;1975:1;1972:14;1964:236;;;2067:19;;;2061:26;2046:42;;2159:27;;;;2127:1;2115:14;;;;1994:19;;1964:236;;;1968:3;2228:6;2219:7;2216:19;2213:201;;;2289:19;;;2283:26;-1:-1:-1;;2372:1:6;2368:14;;;2384:3;2364:24;2360:37;2356:42;2341:58;2326:74;;2213:201;-1:-1:-1;;;;;2460:1:6;2444:14;;;2440:22;2427:36;;-1:-1:-1;1378:1352:6:o;:::-;319:1524:0;;;;;;", - "deployedSourceMap": "319:1524:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2141:98:2;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4238:166;;;;;;:::i;:::-;;:::i;:::-;;;1272:14:6;;1265:22;1247:41;;1235:2;1220:18;4238:166:2;1107:187:6;3229:106:2;3316:12;;3229:106;;;1445:25:6;;;1433:2;1418:18;3229:106:2;1299:177:6;4871:478:2;;;;;;:::i;:::-;;:::i;3078:91::-;;;3160:2;1956:36:6;;1944:2;1929:18;3078:91:2;1814:184:6;1600:241:0;;;;;;:::i;:::-;;:::i;:::-;;5744:212:2;;;;;;:::i;:::-;;:::i;705:105:0:-;;;;;;:::i;:::-;;:::i;917:381::-;;;;;;:::i;:::-;;:::i;816:95::-;;;;;;:::i;:::-;;:::i;3393:125:2:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3493:18:2;3467:7;3493:18;;;:9;:18;;;;;;;3393:125;1668:101:1;;;:::i;565:134:0:-;;;;;;:::i;:::-;;:::i;1036:85:1:-;1082:7;1108:6;1036:85;;-1:-1:-1;;;;;1108:6:1;;;3810:51:6;;3798:2;3783:18;1036:85:1;3664:203:6;2352:102:2;;;:::i;6443:405::-;;;;;;:::i;:::-;;:::i;3721:172::-;;;;;;:::i;:::-;;:::i;3951:149::-;;;;;;:::i;:::-;-1:-1:-1;;;;;4066:18:2;;;4040:7;4066:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3951:149;1918:198:1;;;;;;:::i;:::-;;:::i;2141:98:2:-;2195:13;2227:5;2220:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2141:98;:::o;4238:166::-;4321:4;4337:39;719:10:5;4360:7:2;4369:6;4337:8;:39::i;:::-;-1:-1:-1;4393:4:2;4238:166;;;;;:::o;4871:478::-;5007:4;5023:36;5033:6;5041:9;5052:6;5023:9;:36::i;:::-;-1:-1:-1;;;;;5097:19:2;;5070:24;5097:19;;;:11;:19;;;;;;;;719:10:5;5097:33:2;;;;;;;;5148:26;;;;5140:79;;;;-1:-1:-1;;;5140:79:2;;4724:2:6;5140:79:2;;;4706:21:6;4763:2;4743:18;;;4736:30;4802:34;4782:18;;;4775:62;-1:-1:-1;;;4853:18:6;;;4846:38;4901:19;;5140:79:2;;;;;;;;;5253:57;5262:6;719:10:5;5303:6:2;5284:16;:25;5253:8;:57::i;:::-;-1:-1:-1;5338:4:2;;4871:478;-1:-1:-1;;;;4871:478:2:o;1600:241:0:-;1672:14;;1696:139;1713:19;;;1696:139;;;1762:22;1772:8;;1781:1;1772:11;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;1762:22::-;1753:31;;1798:26;1804:8;;1813:1;1804:11;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;1817:6;1798:5;:26::i;:::-;1734:3;;;;:::i;:::-;;;;1696:139;;;;1662:179;1600:241;;:::o;5744:212:2:-;719:10:5;5832:4:2;5880:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;5880:34:2;;;;;;;;;;5832:4;;5848:80;;5871:7;;5880:47;;5917:10;;5880:47;:::i;:::-;5848:8;:80::i;705:105:0:-;1082:7:1;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;781:22:0::1;787:7;796:6;781:5;:22::i;:::-;705:105:::0;;:::o;917:381::-;1515:24;:22;:24::i;:::-;1023:14:::1;::::0;1014:32:::1;::::0;-1:-1:-1;;;;;1023:14:0::1;1039:6:::0;1014:8:::1;:32::i;:::-;-1:-1:-1::0;1076:18:0::1;::::0;1113:105:::1;::::0;1058:12:::1;::::0;-1:-1:-1;;;;;1076:18:0::1;::::0;1113:105:::1;::::0;1185:12;;;;1199:6;;1207:10:::1;::::0;1113:105:::1;;;:::i;:::-;;::::0;;-1:-1:-1;;1113:105:0;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;1113:105:0::1;-1:-1:-1::0;;;1113:105:0::1;::::0;;1076:152;::::1;::::0;1113:105;1076:152:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1057:171;;;1247:7;1239:52;;;::::0;-1:-1:-1;;;1239:52:0;;6888:2:6;1239:52:0::1;::::0;::::1;6870:21:6::0;;;6907:18;;;6900:30;6966:34;6946:18;;;6939:62;7018:18;;1239:52:0::1;6686:356:6::0;816:95:0;1082:7:1;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;881:14:0::1;::::0;875:29:::1;::::0;-1:-1:-1;;;;;881:14:0::1;897:6:::0;875:5:::1;:29::i;:::-;816:95:::0;:::o;1668:101:1:-;1082:7;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;1732:30:::1;1759:1;1732:18;:30::i;:::-;1668:101::o:0;565:134:0:-;1082:7:1;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;655:18:0::1;:37:::0;;-1:-1:-1;;;;;;655:37:0::1;-1:-1:-1::0;;;;;655:37:0;;;::::1;::::0;;;::::1;::::0;;565:134::o;2352:102:2:-;2408:13;2440:7;2433:14;;;;;:::i;6443:405::-;719:10:5;6536:4:2;6579:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;6579:34:2;;;;;;;;;;6631:35;;;;6623:85;;;;-1:-1:-1;;;6623:85:2;;7249:2:6;6623:85:2;;;7231:21:6;7288:2;7268:18;;;7261:30;7327:34;7307:18;;;7300:62;-1:-1:-1;;;7378:18:6;;;7371:35;7423:19;;6623:85:2;7047:401:6;6623:85:2;6742:67;719:10:5;6765:7:2;6793:15;6774:16;:34;6742:8;:67::i;:::-;-1:-1:-1;6837:4:2;;6443:405;-1:-1:-1;;;6443:405:2:o;3721:172::-;3807:4;3823:42;719:10:5;3847:9:2;3858:6;3823:9;:42::i;1918:198:1:-;1082:7;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;-1:-1:-1;;;;;2006:22:1;::::1;1998:73;;;::::0;-1:-1:-1;;;1998:73:1;;7655:2:6;1998:73:1::1;::::0;::::1;7637:21:6::0;7694:2;7674:18;;;7667:30;7733:34;7713:18;;;7706:62;-1:-1:-1;;;7784:18:6;;;7777:36;7830:19;;1998:73:1::1;7453:402:6::0;1998:73:1::1;2081:28;2100:8;2081:18;:28::i;10019:370:2:-:0;-1:-1:-1;;;;;10150:19:2;;10142:68;;;;-1:-1:-1;;;10142:68:2;;8062:2:6;10142:68:2;;;8044:21:6;8101:2;8081:18;;;8074:30;8140:34;8120:18;;;8113:62;-1:-1:-1;;;8191:18:6;;;8184:34;8235:19;;10142:68:2;7860:400:6;10142:68:2;-1:-1:-1;;;;;10228:21:2;;10220:68;;;;-1:-1:-1;;;10220:68:2;;8467:2:6;10220:68:2;;;8449:21:6;8506:2;8486:18;;;8479:30;8545:34;8525:18;;;8518:62;-1:-1:-1;;;8596:18:6;;;8589:32;8638:19;;10220:68:2;8265:398:6;10220:68:2;-1:-1:-1;;;;;10299:18:2;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;10350:32;;1445:25:6;;;10350:32:2;;1418:18:6;10350:32:2;;;;;;;;10019:370;;;:::o;7322:713::-;-1:-1:-1;;;;;7457:20:2;;7449:70;;;;-1:-1:-1;;;7449:70:2;;8870:2:6;7449:70:2;;;8852:21:6;8909:2;8889:18;;;8882:30;8948:34;8928:18;;;8921:62;-1:-1:-1;;;8999:18:6;;;8992:35;9044:19;;7449:70:2;8668:401:6;7449:70:2;-1:-1:-1;;;;;7537:23:2;;7529:71;;;;-1:-1:-1;;;7529:71:2;;9276:2:6;7529:71:2;;;9258:21:6;9315:2;9295:18;;;9288:30;9354:34;9334:18;;;9327:62;-1:-1:-1;;;9405:18:6;;;9398:33;9448:19;;7529:71:2;9074:399:6;7529:71:2;-1:-1:-1;;;;;7693:17:2;;7669:21;7693:17;;;:9;:17;;;;;;7728:23;;;;7720:74;;;;-1:-1:-1;;;7720:74:2;;9680:2:6;7720:74:2;;;9662:21:6;9719:2;9699:18;;;9692:30;9758:34;9738:18;;;9731:62;-1:-1:-1;;;9809:18:6;;;9802:36;9855:19;;7720:74:2;9478:402:6;7720:74:2;-1:-1:-1;;;;;7828:17:2;;;;;;;:9;:17;;;;;;7848:22;;;7828:42;;7890:20;;;;;;;;:30;;7864:6;;7828:17;7890:30;;7864:6;;7890:30;:::i;:::-;;;;;;;;7953:9;-1:-1:-1;;;;;7936:35:2;7945:6;-1:-1:-1;;;;;7936:35:2;;7964:6;7936:35;;;;1445:25:6;;1433:2;1418:18;;1299:177;7936:35:2;;;;;;;;7982:46;9020:576;;-1:-1:-1;;;;;9103:21:2;;9095:67;;;;-1:-1:-1;;;9095:67:2;;10087:2:6;9095:67:2;;;10069:21:6;10126:2;10106:18;;;10099:30;10165:34;10145:18;;;10138:62;-1:-1:-1;;;10216:18:6;;;10209:31;10257:19;;9095:67:2;9885:397:6;9095:67:2;-1:-1:-1;;;;;9258:18:2;;9233:22;9258:18;;;:9;:18;;;;;;9294:24;;;;9286:71;;;;-1:-1:-1;;;9286:71:2;;10489:2:6;9286:71:2;;;10471:21:6;10528:2;10508:18;;;10501:30;10567:34;10547:18;;;10540:62;-1:-1:-1;;;10618:18:6;;;10611:32;10660:19;;9286:71:2;10287:398:6;9286:71:2;-1:-1:-1;;;;;9391:18:2;;;;;;:9;:18;;;;;9412:23;;;9391:44;;9455:12;:22;;9429:6;;9391:18;9455:22;;9429:6;;9455:22;:::i;:::-;;;;-1:-1:-1;;9493:37:2;;1445:25:6;;;9519:1:2;;-1:-1:-1;;;;;9493:37:2;;;;;1433:2:6;1418:18;9493:37:2;1299:177:6;8311:389:2;-1:-1:-1;;;;;8394:21:2;;8386:65;;;;-1:-1:-1;;;8386:65:2;;11025:2:6;8386:65:2;;;11007:21:6;11064:2;11044:18;;;11037:30;11103:33;11083:18;;;11076:61;11154:18;;8386:65:2;10823:355:6;8386:65:2;8538:6;8522:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;8554:18:2;;;;;;:9;:18;;;;;:28;;8576:6;;8554:18;:28;;8576:6;;8554:28;:::i;:::-;;;;-1:-1:-1;;8597:37:2;;1445:25:6;;;-1:-1:-1;;;;;8597:37:2;;;8614:1;;8597:37;;1433:2:6;1418:18;8597:37:2;;;;;;;705:105:0;;:::o;1304:168::-;1378:18;;-1:-1:-1;;;;;1378:18:0;1370:95;;;;-1:-1:-1;;;1370:95:0;;11385:2:6;1370:95:0;;;11367:21:6;11424:2;11404:18;;;11397:30;11463:34;11443:18;;;11436:62;-1:-1:-1;;;11514:18:6;;;11507:48;11572:19;;1370:95:0;11183:414:6;2270:187:1;2343:16;2362:6;;-1:-1:-1;;;;;2378:17:1;;;-1:-1:-1;;;;;;2378:17:1;;;;;;2410:40;;2362:6;;;;;;;2410:40;;2343:16;2410:40;2333:124;2270:187;:::o;14:250:6:-;99:1;109:113;123:6;120:1;117:13;109:113;;;199:11;;;193:18;180:11;;;173:39;145:2;138:10;109:113;;;-1:-1:-1;;256:1:6;238:16;;231:27;14:250::o;269:396::-;418:2;407:9;400:21;381:4;450:6;444:13;493:6;488:2;477:9;473:18;466:34;509:79;581:6;576:2;565:9;561:18;556:2;548:6;544:15;509:79;:::i;:::-;649:2;628:15;-1:-1:-1;;624:29:6;609:45;;;;656:2;605:54;;269:396;-1:-1:-1;;269:396:6:o;670:173::-;738:20;;-1:-1:-1;;;;;787:31:6;;777:42;;767:70;;833:1;830;823:12;767:70;670:173;;;:::o;848:254::-;916:6;924;977:2;965:9;956:7;952:23;948:32;945:52;;;993:1;990;983:12;945:52;1016:29;1035:9;1016:29;:::i;:::-;1006:39;1092:2;1077:18;;;;1064:32;;-1:-1:-1;;;848:254:6:o;1481:328::-;1558:6;1566;1574;1627:2;1615:9;1606:7;1602:23;1598:32;1595:52;;;1643:1;1640;1633:12;1595:52;1666:29;1685:9;1666:29;:::i;:::-;1656:39;;1714:38;1748:2;1737:9;1733:18;1714:38;:::i;:::-;1704:48;;1799:2;1788:9;1784:18;1771:32;1761:42;;1481:328;;;;;:::o;2003:615::-;2089:6;2097;2150:2;2138:9;2129:7;2125:23;2121:32;2118:52;;;2166:1;2163;2156:12;2118:52;2206:9;2193:23;2235:18;2276:2;2268:6;2265:14;2262:34;;;2292:1;2289;2282:12;2262:34;2330:6;2319:9;2315:22;2305:32;;2375:7;2368:4;2364:2;2360:13;2356:27;2346:55;;2397:1;2394;2387:12;2346:55;2437:2;2424:16;2463:2;2455:6;2452:14;2449:34;;;2479:1;2476;2469:12;2449:34;2532:7;2527:2;2517:6;2514:1;2510:14;2506:2;2502:23;2498:32;2495:45;2492:65;;;2553:1;2550;2543:12;2492:65;2584:2;2576:11;;;;;2606:6;;-1:-1:-1;2003:615:6;;-1:-1:-1;;;;2003:615:6:o;2623:660::-;2703:6;2711;2719;2772:2;2760:9;2751:7;2747:23;2743:32;2740:52;;;2788:1;2785;2778:12;2740:52;2824:9;2811:23;2801:33;;2885:2;2874:9;2870:18;2857:32;2908:18;2949:2;2941:6;2938:14;2935:34;;;2965:1;2962;2955:12;2935:34;3003:6;2992:9;2988:22;2978:32;;3048:7;3041:4;3037:2;3033:13;3029:27;3019:55;;3070:1;3067;3060:12;3019:55;3110:2;3097:16;3136:2;3128:6;3125:14;3122:34;;;3152:1;3149;3142:12;3122:34;3197:7;3192:2;3183:6;3179:2;3175:15;3171:24;3168:37;3165:57;;;3218:1;3215;3208:12;3165:57;3249:2;3245;3241:11;3231:21;;3271:6;3261:16;;;;;2623:660;;;;;:::o;3288:180::-;3347:6;3400:2;3388:9;3379:7;3375:23;3371:32;3368:52;;;3416:1;3413;3406:12;3368:52;-1:-1:-1;3439:23:6;;3288:180;-1:-1:-1;3288:180:6:o;3473:186::-;3532:6;3585:2;3573:9;3564:7;3560:23;3556:32;3553:52;;;3601:1;3598;3591:12;3553:52;3624:29;3643:9;3624:29;:::i;:::-;3614:39;3473:186;-1:-1:-1;;;3473:186:6:o;3872:260::-;3940:6;3948;4001:2;3989:9;3980:7;3976:23;3972:32;3969:52;;;4017:1;4014;4007:12;3969:52;4040:29;4059:9;4040:29;:::i;:::-;4030:39;;4088:38;4122:2;4111:9;4107:18;4088:38;:::i;:::-;4078:48;;3872:260;;;;;:::o;4137:380::-;4216:1;4212:12;;;;4259;;;4280:61;;4334:4;4326:6;4322:17;4312:27;;4280:61;4387:2;4379:6;4376:14;4356:18;4353:38;4350:161;;4433:10;4428:3;4424:20;4421:1;4414:31;4468:4;4465:1;4458:15;4496:4;4493:1;4486:15;4350:161;;4137:380;;;:::o;4931:127::-;4992:10;4987:3;4983:20;4980:1;4973:31;5023:4;5020:1;5013:15;5047:4;5044:1;5037:15;5063:127;5124:10;5119:3;5115:20;5112:1;5105:31;5155:4;5152:1;5145:15;5179:4;5176:1;5169:15;5195:135;5234:3;5255:17;;;5252:43;;5275:18;;:::i;:::-;-1:-1:-1;5322:1:6;5311:13;;5195:135::o;5335:125::-;5400:9;;;5421:10;;;5418:36;;;5434:18;;:::i;5465:356::-;5667:2;5649:21;;;5686:18;;;5679:30;5745:34;5740:2;5725:18;;5718:62;5812:2;5797:18;;5465:356::o;5826:563::-;6041:2;6030:9;6023:21;6080:6;6075:2;6064:9;6060:18;6053:34;6138:6;6130;6124:3;6113:9;6109:19;6096:49;6195:1;6189:3;6165:22;;;6161:32;;6154:43;;;;6300:4;6285:20;;6278:36;;;;-1:-1:-1;;;;;6350:32:6;;;;6345:2;6330:18;;6323:60;6258:2;6237:15;;;-1:-1:-1;;6233:29:6;6218:45;;;6214:55;;;-1:-1:-1;5826:563:6:o;6394:287::-;6523:3;6561:6;6555:13;6577:66;6636:6;6631:3;6624:4;6616:6;6612:17;6577:66;:::i;:::-;6659:16;;;;;6394:287;-1:-1:-1;;6394:287:6:o;10690:128::-;10757:9;;;10778:11;;;10775:37;;;10792:18;;:::i", - "sourcePath": "/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol", - "compiler": { - "name": "solc", - "version": "0.8.16+commit.07a7930e" - }, - "ast": { - "absolutePath": "/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol", - "exportedSymbols": { - "CBDCcontract": [ - 162 - ], - "Context": [ - 938 - ], - "ERC20": [ - 813 - ], - "IERC20": [ - 891 - ], - "IERC20Metadata": [ - 916 - ], - "Ownable": [ - 267 - ] - }, - "id": 163, - "license": "GPL-3.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.8", - ".15" - ], - "nodeType": "PragmaDirective", - "src": "37:24:0" - }, - { - "absolutePath": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/access/Ownable.sol", - "file": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/access/Ownable.sol", - "id": 2, - "nameLocation": "-1:-1:-1", - "nodeType": "ImportDirective", - "scope": 163, - "sourceUnit": 268, - "src": "63:87:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", - "file": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", - "id": 3, - "nameLocation": "-1:-1:-1", - "nodeType": "ImportDirective", - "scope": 163, - "sourceUnit": 814, - "src": "151:90:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "baseName": { - "id": 5, - "name": "Ownable", - "nameLocations": [ - "344:7:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 267, - "src": "344:7:0" - }, - "id": 6, - "nodeType": "InheritanceSpecifier", - "src": "344:7:0" - }, - { - "baseName": { - "id": 7, - "name": "ERC20", - "nameLocations": [ - "353:5:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 813, - "src": "353:5:0" - }, - "id": 8, - "nodeType": "InheritanceSpecifier", - "src": "353:5:0" - } - ], - "canonicalName": "CBDCcontract", - "contractDependencies": [], - "contractKind": "contract", - "documentation": { - "id": 4, - "nodeType": "StructuredDocumentation", - "src": "243:74:0", - "text": " @title SampleERC20\n @dev Create a sample ERC20 standard token" - }, - "fullyImplemented": true, - "id": 162, - "linearizedBaseContracts": [ - 162, - 813, - 916, - 891, - 267, - 938 - ], - "name": "CBDCcontract", - "nameLocation": "328:12:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "bridge_address", - "nameLocation": "374:14:0", - "nodeType": "VariableDeclaration", - "scope": 162, - "src": "366:76:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "366:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": { - "arguments": [ - { - "hexValue": "307866323864353736393137316266624432423336323864373232653538313239613661453135303232", - "id": 12, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "399:42:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "value": "0xf28d5769171bfbD2B3628d722e58129a6aE15022" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "391:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 10, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "391:7:0", - "typeDescriptions": {} - } - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "391:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "asset_ref_contract", - "nameLocation": "456:18:0", - "nodeType": "VariableDeclaration", - "scope": 162, - "src": "448:39:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "448:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": { - "arguments": [ - { - "hexValue": "30", - "id": 18, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "477:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 16, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "477:7:0", - "typeDescriptions": {} - } - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "477:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 27, - "nodeType": "Block", - "src": "552:7:0", - "statements": [] - }, - "id": 28, - "implemented": true, - "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "hexValue": "43656e7472616c42616e6b4469676974616c43757272656e6379", - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "514:28:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1e522a826804464981a3e2267dfbb8df03bd96487a0a7d8d35033a23e211146a", - "typeString": "literal_string \"CentralBankDigitalCurrency\"" - }, - "value": "CentralBankDigitalCurrency" - }, - { - "hexValue": "43424443", - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "544:6:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c71aa5a70a4f17bfd28bb6a719471c9c3eaa418d8bb831941073ae5e16c15076", - "typeString": "literal_string \"CBDC\"" - }, - "value": "CBDC" - } - ], - "id": 25, - "kind": "baseConstructorSpecifier", - "modifierName": { - "id": 22, - "name": "ERC20", - "nameLocations": [ - "508:5:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 813, - "src": "508:5:0" - }, - "nodeType": "ModifierInvocation", - "src": "508:43:0" - } - ], - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 21, - "nodeType": "ParameterList", - "parameters": [], - "src": "505:2:0" - }, - "returnParameters": { - "id": 26, - "nodeType": "ParameterList", - "parameters": [], - "src": "552:0:0" - }, - "scope": 162, - "src": "494:65:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 39, - "nodeType": "Block", - "src": "645:54:0", - "statements": [ - { - "expression": { - "id": 37, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 35, - "name": "asset_ref_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "655:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 36, - "name": "contract_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "676:16:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "655:37:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 38, - "nodeType": "ExpressionStatement", - "src": "655:37:0" - } - ] - }, - "functionSelector": "8d1a450d", - "id": 40, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 33, - "kind": "modifierInvocation", - "modifierName": { - "id": 32, - "name": "onlyOwner", - "nameLocations": [ - "635:9:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 209, - "src": "635:9:0" - }, - "nodeType": "ModifierInvocation", - "src": "635:9:0" - } - ], - "name": "setAssetReferenceContract", - "nameLocation": "574:25:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 31, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 30, - "mutability": "mutable", - "name": "contract_address", - "nameLocation": "608:16:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "600:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 29, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "600:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "599:26:0" - }, - "returnParameters": { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "645:0:0" - }, - "scope": 162, - "src": "565:134:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "771:39:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 50, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "787:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 51, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "796:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 49, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 673, - "src": "781:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "781:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 53, - "nodeType": "ExpressionStatement", - "src": "781:22:0" - } - ] - }, - "functionSelector": "40c10f19", - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 47, - "kind": "modifierInvocation", - "modifierName": { - "id": 46, - "name": "onlyOwner", - "nameLocations": [ - "761:9:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 209, - "src": "761:9:0" - }, - "nodeType": "ModifierInvocation", - "src": "761:9:0" - } - ], - "name": "mint", - "nameLocation": "714:4:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 45, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 42, - "mutability": "mutable", - "name": "account", - "nameLocation": "727:7:0", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "719:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "719:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 44, - "mutability": "mutable", - "name": "amount", - "nameLocation": "744:6:0", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "736:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 43, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "736:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "718:33:0" - }, - "returnParameters": { - "id": 48, - "nodeType": "ParameterList", - "parameters": [], - "src": "771:0:0" - }, - "scope": 162, - "src": "705:105:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 67, - "nodeType": "Block", - "src": "865:46:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 63, - "name": "bridge_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "881:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 64, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "897:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 62, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 745, - "src": "875:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 65, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "875:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 66, - "nodeType": "ExpressionStatement", - "src": "875:29:0" - } - ] - }, - "functionSelector": "42966c68", - "id": 68, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 60, - "kind": "modifierInvocation", - "modifierName": { - "id": 59, - "name": "onlyOwner", - "nameLocations": [ - "855:9:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 209, - "src": "855:9:0" - }, - "nodeType": "ModifierInvocation", - "src": "855:9:0" - } - ], - "name": "burn", - "nameLocation": "825:4:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 58, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 57, - "mutability": "mutable", - "name": "amount", - "nameLocation": "838:6:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "830:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 56, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "830:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "829:16:0" - }, - "returnParameters": { - "id": 61, - "nodeType": "ParameterList", - "parameters": [], - "src": "865:0:0" - }, - "scope": 162, - "src": "816:95:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 101, - "nodeType": "Block", - "src": "1004:294:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 78, - "name": "bridge_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "1023:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 79, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "1039:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 77, - "name": "transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 387, - "src": "1014:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) returns (bool)" - } - }, - "id": 80, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1014:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 81, - "nodeType": "ExpressionStatement", - "src": "1014:32:0" - }, - { - "assignments": [ - 83, - null - ], - "declarations": [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "success", - "nameLocation": "1063:7:0", - "nodeType": "VariableDeclaration", - "scope": 101, - "src": "1058:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 82, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1058:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - null - ], - "id": 95, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "hexValue": "63726561746541737365745265666572656e636528737472696e672c75696e743235362c6164647265737329", - "id": 88, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1137:46:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_663bcc920598c723df9b3a760a5a7d3abac3eae3f6190deac4bbb6aba0477d08", - "typeString": "literal_string \"createAssetReference(string,uint256,address)\"" - }, - "value": "createAssetReference(string,uint256,address)" - }, - { - "id": 89, - "name": "asset_ref_id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "1185:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "id": 90, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "1199:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "expression": { - "id": 91, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1207:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 92, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1211:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1207:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_663bcc920598c723df9b3a760a5a7d3abac3eae3f6190deac4bbb6aba0477d08", - "typeString": "literal_string \"createAssetReference(string,uint256,address)\"" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 86, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "1113:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 87, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "1117:19:0", - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "src": "1113:23:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1113:105:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 84, - "name": "asset_ref_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "1076:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 85, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1095:4:0", - "memberName": "call", - "nodeType": "MemberAccess", - "src": "1076:23:0", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1076:152:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1057:171:0" - }, - { - "expression": { - "arguments": [ - { - "id": 97, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "1247:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "63726561746541737365745265666572656e63652063616c6c206661696c6564", - "id": 98, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1256:34:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_93169b227269284795eb472a6a53f2c082e0e5a5494d86528976ebe95cb05d72", - "typeString": "literal_string \"createAssetReference call failed\"" - }, - "value": "createAssetReference call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_93169b227269284795eb472a6a53f2c082e0e5a5494d86528976ebe95cb05d72", - "typeString": "literal_string \"createAssetReference call failed\"" - } - ], - "id": 96, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1239:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1239:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 100, - "nodeType": "ExpressionStatement", - "src": "1239:52:0" - } - ] - }, - "functionSelector": "417d11af", - "id": 102, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 75, - "kind": "modifierInvocation", - "modifierName": { - "id": 74, - "name": "checkARContract", - "nameLocations": [ - "988:15:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 123, - "src": "988:15:0" - }, - "nodeType": "ModifierInvocation", - "src": "988:15:0" - } - ], - "name": "escrow", - "nameLocation": "926:6:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 73, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 70, - "mutability": "mutable", - "name": "amount", - "nameLocation": "941:6:0", - "nodeType": "VariableDeclaration", - "scope": 102, - "src": "933:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 69, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "933:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "asset_ref_id", - "nameLocation": "965:12:0", - "nodeType": "VariableDeclaration", - "scope": 102, - "src": "949:28:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 71, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "949:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "932:46:0" - }, - "returnParameters": { - "id": 76, - "nodeType": "ParameterList", - "parameters": [], - "src": "1004:0:0" - }, - "scope": 162, - "src": "917:381:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 115, - "nodeType": "Block", - "src": "1360:112:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 106, - "name": "asset_ref_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "1378:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "arguments": [ - { - "hexValue": "30", - "id": 109, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1408:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1400:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 107, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1400:7:0", - "typeDescriptions": {} - } - }, - "id": 110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1400:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1378:32:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "43424443636f6e74726163743a206173736574207265666572656e636520636f6e7472616374206e6f7420646566696e6564", - "id": 112, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1412:52:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_81032450132c43b9f8878276153b2ea85a9c962c1591b18b864a02232e1beff8", - "typeString": "literal_string \"CBDCcontract: asset reference contract not defined\"" - }, - "value": "CBDCcontract: asset reference contract not defined" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_81032450132c43b9f8878276153b2ea85a9c962c1591b18b864a02232e1beff8", - "typeString": "literal_string \"CBDCcontract: asset reference contract not defined\"" - } - ], - "id": 105, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1370:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1370:95:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 114, - "nodeType": "ExpressionStatement", - "src": "1370:95:0" - } - ] - }, - "id": 116, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_checkAssetRefContract", - "nameLocation": "1313:22:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 103, - "nodeType": "ParameterList", - "parameters": [], - "src": "1335:2:0" - }, - "returnParameters": { - "id": 104, - "nodeType": "ParameterList", - "parameters": [], - "src": "1360:0:0" - }, - "scope": 162, - "src": "1304:168:0", - "stateMutability": "view", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 122, - "nodeType": "Block", - "src": "1505:52:0", - "statements": [ - { - "expression": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 118, - "name": "_checkAssetRefContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1515:22:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$__$", - "typeString": "function () view" - } - }, - "id": 119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1515:24:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 120, - "nodeType": "ExpressionStatement", - "src": "1515:24:0" - }, - { - "id": 121, - "nodeType": "PlaceholderStatement", - "src": "1549:1:0" - } - ] - }, - "id": 123, - "name": "checkARContract", - "nameLocation": "1487:15:0", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 117, - "nodeType": "ParameterList", - "parameters": [], - "src": "1502:2:0" - }, - "src": "1478:79:0", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 160, - "nodeType": "Block", - "src": "1662:179:0", - "statements": [ - { - "assignments": [ - 130 - ], - "declarations": [ - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "toBurn", - "nameLocation": "1680:6:0", - "nodeType": "VariableDeclaration", - "scope": 160, - "src": "1672:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 129, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1672:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 131, - "nodeType": "VariableDeclarationStatement", - "src": "1672:14:0" - }, - { - "body": { - "id": 158, - "nodeType": "Block", - "src": "1739:96:0", - "statements": [ - { - "expression": { - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 143, - "name": "toBurn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1753:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "baseExpression": { - "id": 145, - "name": "accounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1772:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[] calldata" - } - }, - "id": 147, - "indexExpression": { - "id": 146, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "1781:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1772:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 144, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 366, - "src": "1762:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1762:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1753:31:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 150, - "nodeType": "ExpressionStatement", - "src": "1753:31:0" - }, - { - "expression": { - "arguments": [ - { - "baseExpression": { - "id": 152, - "name": "accounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1804:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[] calldata" - } - }, - "id": 154, - "indexExpression": { - "id": 153, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "1813:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1804:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 155, - "name": "toBurn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1817:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 151, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 745, - "src": "1798:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1798:26:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 157, - "nodeType": "ExpressionStatement", - "src": "1798:26:0" - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 136, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "1713:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 137, - "name": "accounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1717:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[] calldata" - } - }, - "id": 138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1726:6:0", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "1717:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1713:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 159, - "initializationExpression": { - "assignments": [ - 133 - ], - "declarations": [ - { - "constant": false, - "id": 133, - "mutability": "mutable", - "name": "i", - "nameLocation": "1706:1:0", - "nodeType": "VariableDeclaration", - "scope": 159, - "src": "1701:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 132, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1701:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 135, - "initialValue": { - "hexValue": "30", - "id": 134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1710:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "1701:10:0" - }, - "loopExpression": { - "expression": { - "id": 141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "1734:3:0", - "subExpression": { - "id": 140, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "1734:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 142, - "nodeType": "ExpressionStatement", - "src": "1734:3:0" - }, - "nodeType": "ForStatement", - "src": "1696:139:0" - } - ] - }, - "functionSelector": "3459feb2", - "id": 161, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "resetBalanceOf", - "nameLocation": "1609:14:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 127, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 126, - "mutability": "mutable", - "name": "accounts", - "nameLocation": "1643:8:0", - "nodeType": "VariableDeclaration", - "scope": 161, - "src": "1624:27:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 124, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1624:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 125, - "nodeType": "ArrayTypeName", - "src": "1624:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "1623:29:0" - }, - "returnParameters": { - "id": 128, - "nodeType": "ParameterList", - "parameters": [], - "src": "1662:0:0" - }, - "scope": 162, - "src": "1600:241:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 163, - "src": "319:1524:0", - "usedErrors": [] - } - ], - "src": "37:1807:0" - }, - "functionHashes": { - "allowance(address,address)": "dd62ed3e", - "approve(address,uint256)": "095ea7b3", - "balanceOf(address)": "70a08231", - "burn(uint256)": "42966c68", - "decimals()": "313ce567", - "decreaseAllowance(address,uint256)": "a457c2d7", - "escrow(uint256,string)": "417d11af", - "increaseAllowance(address,uint256)": "39509351", - "mint(address,uint256)": "40c10f19", - "name()": "06fdde03", - "owner()": "8da5cb5b", - "renounceOwnership()": "715018a6", - "resetBalanceOf(address[])": "3459feb2", - "setAssetReferenceContract(address)": "8d1a450d", - "symbol()": "95d89b41", - "totalSupply()": "18160ddd", - "transfer(address,uint256)": "a9059cbb", - "transferFrom(address,address,uint256)": "23b872dd", - "transferOwnership(address)": "f2fde38b" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "910600", - "executionCost": "infinite", - "totalCost": "infinite" - }, - "external": { - "allowance(address,address)": "infinite", - "approve(address,uint256)": "24644", - "balanceOf(address)": "2582", - "burn(uint256)": "55148", - "decimals()": "200", - "decreaseAllowance(address,uint256)": "26933", - "escrow(uint256,string)": "infinite", - "increaseAllowance(address,uint256)": "infinite", - "mint(address,uint256)": "infinite", - "name()": "infinite", - "owner()": "2412", - "renounceOwnership()": "28181", - "resetBalanceOf(address[])": "infinite", - "setAssetReferenceContract(address)": "26800", - "symbol()": "infinite", - "totalSupply()": "2349", - "transfer(address,uint256)": "infinite", - "transferFrom(address,address,uint256)": "infinite", - "transferOwnership(address)": "28419" - }, - "internal": { - "_checkAssetRefContract()": "infinite" - } - } -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol deleted file mode 100644 index 61b1d6e250..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; -import "remix_tests.sol"; -import "../contracts/CBDCcontract.sol"; -import "../contracts/AssetReferenceContract.sol"; - -contract CBDCcontractTest { - - address bridge_address = address(0xf28d5769171bfbD2B3628d722e58129a6aE15022); - AssetReferenceContract assetRefContract; - CBDCcontract cbdcContract; - - function beforeEach () public { - cbdcContract = new CBDCcontract(); - assetRefContract = new AssetReferenceContract(address(cbdcContract)); - - cbdcContract.setAssetReferenceContract(address(assetRefContract)); - cbdcContract.setAssetReferenceContract(address(assetRefContract)); - assetRefContract.addOwner(address(cbdcContract)); - } - - function testTokenNameAndSymbol () public { - Assert.equal(cbdcContract.name(), "CentralBankDigitalCurrency", "token name did not match"); - Assert.equal(cbdcContract.symbol(), "CBDC", "token symbol did not match"); - } - - function mintEscrowAndBurnTokens () public { - cbdcContract.mint(address(this), 222); - uint256 balance = cbdcContract.balanceOf(address(this)); - Assert.equal(balance, 222, "tokens minted did not match"); - } - - function escrowTokens() public { - cbdcContract.mint(address(this), 222); - cbdcContract.escrow(222, "id1"); - - Assert.equal(assetRefContract.isPresent("id1"), true, "asset reference should be present"); - Assert.equal(cbdcContract.balanceOf(bridge_address), 222, "bridge balance not updated"); - } - - function burnTokens() public { - cbdcContract.mint(address(this), 222); - cbdcContract.escrow(222, "id1"); - cbdcContract.burn(222); - - Assert.equal(cbdcContract.balanceOf(bridge_address), 0, "bridge balance not updated"); - } -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol deleted file mode 100644 index 99d5d71154..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity ^0.8.15; - -import "@openzeppelin/contracts/access/Ownable.sol"; -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -/** - * @title SampleERC20 - * @dev Create a sample ERC20 standard token - */ - -contract CBDCcontract is Ownable, ERC20 { - - address bridge_address = address(0xf28d5769171bfbD2B3628d722e58129a6aE15022); - address asset_ref_contract = address(0); - - constructor() ERC20("CentralBankDigitalCurrency", "CBDC") { - } - - function setAssetReferenceContract(address contract_address) external onlyOwner { - asset_ref_contract = contract_address; - } - - function mint(address account, uint256 amount) external onlyOwner { - _mint(account, amount); - } - - function burn(uint256 amount) external onlyOwner { - _burn(bridge_address, amount); - } - - function escrow(uint256 amount, string calldata asset_ref_id) external checkARContract { - transfer(bridge_address, amount); - - (bool success, ) = asset_ref_contract.call( - abi.encodeWithSignature("createAssetReference(string,uint256,address)", asset_ref_id, amount, msg.sender) - ); - - require(success, "createAssetReference call failed"); - } - - function _checkAssetRefContract() internal view virtual { - require(asset_ref_contract != address(0), "CBDCcontract: asset reference contract not defined"); - } - - modifier checkARContract() { - _checkAssetRefContract(); - _; - } - - // function for testing purposes - function resetBalanceOf(address[] calldata accounts) external { - uint256 toBurn; - for (uint i = 0; i < accounts.length; i++) { - toBurn = balanceOf(accounts[i]); - _burn(accounts[i], toBurn); - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts deleted file mode 100644 index 4ae10f035a..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts +++ /dev/null @@ -1,116 +0,0 @@ -import axios from "axios"; -import CryptoMaterial from "../../../crypto-material/crypto-material.json"; -import AssetReferenceContractJson from "../../../solidity/asset-reference-contract/AssetReferenceContract.json"; -import CBDCcontractJson from "../../../solidity/cbdc-erc-20/CBDCcontract.json"; - -const BESU_CONTRACT_CBDC_ERC20_NAME = CBDCcontractJson.contractName; -const BESU_CONTRACT_ASSET_REF_NAME = AssetReferenceContractJson.contractName; - -export async function lockBesuAssetReference( - userAddress: string, - prkAddress: string, - assetRefID: string, -): Promise { - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "SEND", - methodName: "lockAssetReference", - gas: 1000000, - params: [assetRefID], - signingCredential: { - ethAccount: userAddress, - secret: prkAddress, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); -} - -export async function getBesuBalance(address: string): Promise { - const response = await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "CALL", - methodName: "balanceOf", - gas: 1000000, - params: [address], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - return parseInt(response.data.callOutput); -} - -export async function isBesuAssetReference( - assetRefID: string, -): Promise { - const response = await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "CALL", - methodName: "isPresent", - gas: 1000000, - params: [assetRefID], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - return response.data.callOutput; -} - -export async function resetBesu(): Promise { - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "SEND", - methodName: "resetBalanceOf", - gas: 1000000, - params: [ - [ - CryptoMaterial.accounts["userA"].ethAddress, - CryptoMaterial.accounts["userB"].ethAddress, - CryptoMaterial.accounts["bridge"].ethAddress, - ], - ], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "SEND", - methodName: "resetAssetRefsList", - gas: 1000000, - params: [], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts deleted file mode 100644 index 4188182bfc..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts +++ /dev/null @@ -1,161 +0,0 @@ -import axios from "axios"; -import { getUserFromPseudonim } from "./steps/common"; -import CryptoMaterial from "../../../crypto-material/crypto-material.json"; - -const FABRIC_CHANNEL_NAME = "mychannel"; -const FABRIC_CONTRACT_CBDC_ERC20_NAME = "cbdc"; -const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; - -export async function getFabricBalance(identity: string): Promise { - const response = await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [identity], - methodName: "BalanceOf", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); - - return parseInt(response.data.functionOutput); -} - -export async function readFabricAssetReference( - assetRefID: string, -): Promise { - const response = await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [assetRefID], - methodName: "ReadAssetReference", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); - - return JSON.parse(response.data.functionOutput); -} - -export async function fabricAssetReferenceExists( - assetRefID: string, -): Promise { - const response = await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [assetRefID], - methodName: "AssetReferenceExists", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); - - return response.data.functionOutput; -} - -export async function lockFabricAssetReference( - user: string, - assetRefID: string, -): Promise { - return axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [assetRefID], - methodName: "LockAssetReference", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(user), - }, - }, - ); -} - -export async function deleteFabricAssetReference( - user: string, - assetRefID: string, -): Promise { - return axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [assetRefID], - methodName: "DeleteAssetReference", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(user), - }, - }, - ); -} - -export async function refundFabricTokens( - finalUserFabricID: string, - amount: number, - finalUserEthAddress: string, -): Promise { - return axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [amount.toString(), finalUserFabricID, finalUserEthAddress], - methodName: "Refund", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "bridge", - }, - }, - ); -} - -export async function resetFabric(): Promise { - await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [], - methodName: "ResetState", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); - - await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [], - methodName: "ResetState", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature deleted file mode 100644 index 28d48164cf..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature +++ /dev/null @@ -1,40 +0,0 @@ -@besu -Feature: Hyperledger Besu gateway is working properly - - Scenario: Alice successfully escrows CBDC - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then "alice" has 0 CBDC available in the sidechain - Then "bob" has 500 CBDC available in the sidechain - - Scenario: Alice successfully creates an asset reference in the Besu network - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then the asset reference smart contract has an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" - - Scenario: Alice successfully locks an asset reference in the Besu network - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" is locked in the sidechain - - Scenario: Alice successfully locks an asset reference in the Besu network - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then "charlie" fails to lock the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - - Scenario: Alice successfully deletes an asset reference in the Besu network - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob deletes the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then the asset reference smart contract has no asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" - - Scenario: BridgeEntity deletes an asset reference and burns tokens in the Besu network - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob deletes the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then "alice" has 0 CBDC available in the sidechain - Then "bob" has 0 CBDC available in the sidechain diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature deleted file mode 100644 index 09da8ebfd3..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature +++ /dev/null @@ -1,67 +0,0 @@ -Feature: Client successfully bridges back CBDC - - @bridgeBack - @fabric - @besu - Scenario: Client successfully initiates bridge back of CBDC to own address in the source chain - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain - Then "alice" initiates bridge back of 500 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" to "alice" address in the source chain - - @bridgeBack - @fabric - @besu - Scenario: Client initiates bridge back of CBDC and accounts have consistent balances in both chains - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain - Then "alice" initiates bridge back of 500 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" to "alice" address in the source chain - Then "alice" has 0 CBDC available in the sidechain - Then "bob" has 0 CBDC available in the sidechain - Then "alice" has 500 CBDC available in the source chain - Then "bob" has 0 CBDC available in the source chain - - @bridgeBack - @fabric - @besu - Scenario: Client successfully initiates bridge back half of the escrowed CBDC to own address in the source chain - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 250 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain - Then "alice" initiates bridge back of 250 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" to "alice" address in the source chain - Then "alice" has 250 CBDC available in the sidechain - Then "bob" has 0 CBDC available in the sidechain - Then "alice" has 250 CBDC available in the source chain - Then "bob" has 250 CBDC available in the source chain - - @bridgeBack - @fabric - @besu - Scenario: Client fails to initiate bridge back of double the escrowed CBDC to own address in the source chain - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain - Then "alice" fails to initiate bridge back of 10000 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" - - @bridgeBack - @fabric - @besu - Scenario: Impersonator fails to initiate bridge back of CBDC escrowed by another user address but transfer - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain - Then "charlie" fails to initiate bridge back of 500 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" - Then "alice" has 0 CBDC available in the source chain - Then "alice" has 0 CBDC available in the sidechain - Then "bob" has 0 CBDC available in the source chain - Then "bob" has 500 CBDC available in the sidechain - Then "charlie" has 0 CBDC available in the source chain - Then "charlie" has 0 CBDC available in the sidechain diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature deleted file mode 100644 index 04106f15a3..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature +++ /dev/null @@ -1,42 +0,0 @@ -Feature: Client successfully bridges out CBDC - - @bridgeOut - @fabric - @besu - Scenario: Chaincode correctly tracks amount of bridged out CBDC when running bridging protocol - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - When "alice" initiates bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "alice" address in the sidechain - Then the bridged out amount in the chaincode is 500 CBDC - - @bridgeOut - @fabric - @besu - Scenario: Client successfully initiates bridge out of CBDC to own address in the sidechain - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - When "alice" initiates bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "alice" address in the sidechain - Then "alice" has 0 CBDC available in the source chain - Then "bob" has 500 CBDC available in the source chain - Then "alice" has 500 CBDC available in the sidechain - - @bridgeOut - @fabric - Scenario: Client initiates bridge out of CBDC to another user address and the operation fails - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Then "alice" tries to initiate bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "charlie" address in the sidechain and operation fails because "it is not possible to bridge CBDC to another user" - - @bridgeOut - @fabric - Scenario: Impersonator tries initiates bridge out of other user CBDC and the operation fails - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Then "charlie" tries to initiate bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "charlie" address in the sidechain and operation fails because "it is not possible to transfer tokens escrowed by another user" - - @bridgeOut - @fabric - Scenario: Client tries initiates bridge out of more CBDC than the amount escrowed and the operation fails - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Then "alice" tries to initiate bridge out of 1000 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "alice" address in the sidechain and operation fails because "it is not possible to transfer a different amount of CBDC than the ones escrowed" diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature deleted file mode 100644 index 1d299be865..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature +++ /dev/null @@ -1,57 +0,0 @@ -@fabric -Feature: Hyperledger Fabric gateway is working properly - - Scenario: Alice successfully escrows CBDC in the source chain - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then "alice" has 0 CBDC available in the source chain - Then "bob" has 500 CBDC available in the source chain - - Scenario: Alice successfully creates an asset reference - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then the asset reference chaincode has an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" - - Scenario: Alice successfully locks an asset reference - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - When "bob" locks the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" is locked in the source chain - - Scenario: Alice successfully locks an asset reference and Bob tries to lock the same - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - When "bob" locks the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then "charlie" fails to lock the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - - Scenario: Alice successfully escrows 500 CBDC and tries to transfer to Bob - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then "alice" fails to transfer 500 CBDC to "charlie" - - Scenario: Alice successfully deletes an asset reference - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - When "bob" locks and deletes an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then the asset reference chaincode has no asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" - - Scenario: BridgeEntity successfully refunds CBDC - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - When "bob" locks and deletes an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - When bob refunds 500 CBDC to "alice" in the source chain - Then "bob" has 0 CBDC available in the source chain - Then "alice" has 500 CBDC available in the source chain - - Scenario: Chaincode correctly tracks amount of bridged out CBDC (1) - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - When "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Then the bridged out amount in the chaincode is 500 CBDC - - Scenario: Chaincode correctly tracks amount of bridged out CBDC (2) - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - When "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - When bob refunds 500 CBDC to "alice" in the source chain - Then the bridged out amount in the chaincode is 0 CBDC \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts deleted file mode 100644 index 42f40df8b6..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { Given, When, Then, Before, After } from "cucumber"; -import axios from "axios"; -import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; -import { - getBesuBalance, - isBesuAssetReference, - lockBesuAssetReference, - resetBesu, -} from "../besu-helper"; -import AssetReferenceContractJson from "../../../../solidity/asset-reference-contract/AssetReferenceContract.json"; -import CBDCcontractJson from "../../../../solidity/cbdc-erc-20/CBDCcontract.json"; -import { - getEthAddress, - getPrvKey, - assertEqual, - assertStringContains, -} from "./common"; - -const BESU_CONTRACT_CBDC_ERC20_NAME = CBDCcontractJson.contractName; -const BESU_CONTRACT_ASSET_REF_NAME = AssetReferenceContractJson.contractName; - -Before({ timeout: 20 * 1000, tags: "@besu" }, async function () { - await resetBesu(); -}); - -After({ timeout: 20 * 1000, tags: "@besu" }, async function () { - await resetBesu(); -}); - -Given( - "{string} with {int} CBDC available in the sidechain smart contract", - { timeout: 10 * 1000 }, - async function (user: string, amount: number) { - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "SEND", - methodName: "mint", - gas: 1000000, - params: [getEthAddress(user), amount], - signingCredential: { - ethAccount: getEthAddress(user), - secret: getPrvKey("bob"), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - }, -); - -When( - "{string} escrows {int} CBDC and creates an asset reference with id {string} in the sidechain", - { timeout: 10 * 1000 }, - async function (user: string, amount: number, assetRefID: string) { - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "SEND", - methodName: "escrow", - gas: 1000000, - params: [amount, assetRefID], - signingCredential: { - ethAccount: getEthAddress(user), - secret: getPrvKey(user), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - }, -); - -When( - "bob locks the asset reference with id {string} in the sidechain", - { timeout: 10 * 1000 }, - async function (assetRefID: string) { - await lockBesuAssetReference( - getEthAddress("bob"), - getPrvKey("bob"), - assetRefID, - ); - }, -); - -When( - "bob deletes the asset reference with id {string} in the sidechain", - { timeout: 10 * 1000 }, - async function (assetRefID: string) { - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "SEND", - methodName: "deleteAssetReference", - gas: 1000000, - params: [assetRefID], - signingCredential: { - ethAccount: getEthAddress("bob"), - secret: getPrvKey("bob"), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - }, -); - -Then( - "the asset reference smart contract has an asset reference with id {string}", - async function (assetRefID: string) { - assertEqual(await isBesuAssetReference(assetRefID), true); - }, -); - -Then( - "the asset reference smart contract has no asset reference with id {string}", - async function (assetRefID: string) { - assertEqual(await isBesuAssetReference(assetRefID), false); - }, -); - -Then( - "{string} has {int} CBDC available in the sidechain", - async function (user: string, amount: number) { - assertEqual(await getBesuBalance(getEthAddress(user)), amount); - }, -); - -Then( - "the asset reference with id {string} is locked in the sidechain", - async function (assetRefID: string) { - const response = await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "CALL", - methodName: "isAssetLocked", - gas: 1000000, - params: [assetRefID], - signingCredential: { - ethAccount: getEthAddress("alice"), - secret: getPrvKey("alice"), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - assertEqual(response.data.callOutput, true); - }, -); - -Then( - "{string} fails to lock the asset reference with id {string} in the sidechain", - async function (user: string, assetRefID: string) { - await lockBesuAssetReference( - getEthAddress(user), - getPrvKey(user), - assetRefID, - ).catch((err) => { - assertStringContains( - err.response.data.error, - `Transaction has been reverted by the EVM`, - ); - }); - }, -); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts deleted file mode 100644 index 65a9ad9c87..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { Then } from "cucumber"; -import axios from "axios"; -import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; -import { getFabricId, getEthAddress, assertEqual } from "./common"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -Then( - "{string} initiates bridge back of {int} CBDC referenced by id {string} to {string} address in the source chain", - { timeout: 60 * 1000 }, - async function ( - user: string, - amount: number, - assetRefID: string, - finalUser: string, - ) { - const address = getEthAddress(user); - const fabricID = getFabricId(finalUser); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - const response = await axios.post( - "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://127.0.0.1:4100`, - }, - serverGatewayConfiguration: { - apiHost: `http://127.0.0.1:4000`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT2", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT1", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway1"].publicKey, - serverDltSystem: "DLT1", - sourceGatewayDltSystem: "DLT2", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "FABRIC_ASSET_ID", - }, - ); - - assertEqual(response.status, 200); - }, -); - -Then( - "{string} fails to initiate bridge back of {int} CBDC referenced by id {string}", - { timeout: 60 * 1000 }, - async function (user: string, amount: number, assetRefID: string) { - const address = getEthAddress(user); - const fabricID = getFabricId(user); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - await axios - .post( - "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://127.0.0.1:4100`, - }, - serverGatewayConfiguration: { - apiHost: `http://127.0.0.1:4000`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT2", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT1", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway1"].publicKey, - serverDltSystem: "DLT1", - sourceGatewayDltSystem: "DLT2", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "FABRIC_ASSET_ID", - }, - ) - .catch((err) => { - assertEqual(err.response.status, 500); - }); - }, -); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts deleted file mode 100644 index 509813deda..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { When, Then } from "cucumber"; -import axios from "axios"; -import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; -import { - getUserFromPseudonim, - getFabricId, - getEthAddress, - assertEqual, - assertStringContains, -} from "./common"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_CHANNEL_NAME = "mychannel"; -const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; - -Then( - "the bridged out amount in the chaincode is {int} CBDC", - async function (amount: string) { - const response = await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [], - methodName: "GetBridgedOutAmount", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim("bob"), - }, - }, - ); - - assertEqual(parseInt(response.data.functionOutput), amount); - }, -); - -When( - "{string} initiates bridge out of {int} CBDC referenced by id {string} to {string} address in the sidechain", - { timeout: 60 * 1000 }, - async function ( - user: string, - amount: number, - assetRefID: string, - finalUser: string, - ) { - const fabricID = getFabricId(user); - const address = getEthAddress(finalUser); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - const response = await axios.post( - "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://127.0.0.1:4000`, - }, - serverGatewayConfiguration: { - apiHost: `http://127.0.0.1:4100`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway2"].publicKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "FABRIC_ASSET_ID", - }, - ); - - assertEqual(response.status, 200); - }, -); - -Then( - "{string} tries to initiate bridge out of {int} CBDC referenced by id {string} to {string} address in the sidechain and operation fails because {string}", - { timeout: 60 * 1000 }, - async function ( - user: string, - amount: number, - assetRefID: string, - finalUser: string, - failureReason: string, - ) { - const fabricID = getFabricId(user); - const address = getEthAddress(finalUser); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - await axios - .post( - "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://127.0.0.1:4000`, - }, - serverGatewayConfiguration: { - apiHost: `http://127.0.0.1:4100`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway2"].publicKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "BESU_ASSET_ID", - }, - ) - .catch((err) => { - assertStringContains(err.response.data.error, failureReason); - }); - }, -); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts deleted file mode 100644 index 4ed244ab7f..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts +++ /dev/null @@ -1,76 +0,0 @@ -import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; - -export function getUserFromPseudonim(user: string): string { - switch (user) { - case "alice": - return "userA"; - case "charlie": - return "userB"; - case "bob": - return "bridge"; - default: - throw Error("Invalid user provided"); - } -} - -export function getFabricId(user: string): string { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].fabricID; - case "userB": - return CryptoMaterial.accounts["userB"].fabricID; - case "bridge": - return CryptoMaterial.accounts["bridge"].fabricID; - default: - throw Error("Invalid user provided"); - } -} - -export function getEthAddress(user: string): string { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].ethAddress; - case "userB": - return CryptoMaterial.accounts["userB"].ethAddress; - case "bridge": - return CryptoMaterial.accounts["bridge"].ethAddress; - default: - throw Error("Invalid user provided"); - } -} - -export function getPrvKey(user: string): string { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].privateKey; - case "userB": - return CryptoMaterial.accounts["userB"].privateKey; - case "bridge": - return CryptoMaterial.accounts["bridge"].privateKey; - default: - throw Error("Invalid user provided"); - } -} - -export function assertEqual(value_1: unknown, value_2: unknown) { - if (value_1 !== value_2) { - throw Error(`Expected ${value_1} to be equal to ${value_2}`); - } -} - -export function assertStringContains( - mainString: string, - subString: string, -): void { - if (!mainString.includes(subString)) { - throw new Error(`String "${mainString}" does not contain "${subString}"`); - } -} - -export function assertNonNullish( - value: TValue, -): asserts value is NonNullable { - if (value === null || value === undefined) { - throw Error(`${value} was expected to be non-null`); - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts deleted file mode 100644 index e95a08a7ce..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts +++ /dev/null @@ -1,191 +0,0 @@ -import { Given, When, Then, Before, After } from "cucumber"; -import axios from "axios"; -import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; -import { - getEthAddress, - getFabricId, - getUserFromPseudonim, - assertEqual, - assertNonNullish, - assertStringContains, -} from "./common"; -import { - deleteFabricAssetReference, - fabricAssetReferenceExists, - getFabricBalance, - lockFabricAssetReference, - readFabricAssetReference, - resetFabric, - refundFabricTokens, -} from "../fabric-helper"; - -const FABRIC_CHANNEL_NAME = "mychannel"; -const FABRIC_CONTRACT_CBDC_ERC20_NAME = "cbdc"; -const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; - -Before({ timeout: 20 * 1000, tags: "@fabric" }, async function () { - await resetFabric(); -}); - -After({ timeout: 20 * 1000, tags: "@fabric" }, async function () { - await resetFabric(); -}); - -Given( - "{string} with {int} CBDC available in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, amount: number) { - await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [amount.toString()], - methodName: "Mint", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim("alice"), - }, - }, - ); - - assertEqual(await getFabricBalance(getFabricId(user)), amount); - }, -); - -When( - "{string} escrows {int} CBDC and creates an asset reference with id {string} in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, amount: number, assetRefID: string) { - await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [amount.toString(), assetRefID], - methodName: "Escrow", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(user), - }, - }, - ); - }, -); - -When( - "{string} locks the asset reference with id {string} in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, assetRefID: string) { - await lockFabricAssetReference(user, assetRefID); - }, -); - -When( - "{string} locks and deletes an asset reference with id {string} in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, assetRefID: string) { - await lockFabricAssetReference(user, assetRefID); - await deleteFabricAssetReference(user, assetRefID); - }, -); - -When( - "bob refunds {int} CBDC to {string} in the source chain", - { timeout: 10 * 1000 }, - async function (amount: number, userTo: string) { - const finalUserFabricID = getFabricId(userTo); - const finalUserEthAddress = getEthAddress(userTo); - - await refundFabricTokens(finalUserFabricID, amount, finalUserEthAddress); - }, -); - -Then( - "{string} fails to lock the asset reference with id {string} in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, assetRefID: string) { - return axios - .post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [assetRefID], - methodName: "LockAssetReference", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(user), - }, - }, - ) - .catch((err) => { - assertStringContains( - err.response.data.error, - `client is not authorized to perform the operation`, - ); - }); - }, -); - -Then( - "{string} fails to transfer {int} CBDC to {string}", - { timeout: 10 * 1000 }, - async function (userFrom: string, amount: number, userTo: string) { - const recipient = getFabricId(userTo); - - axios - .post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [recipient, amount.toString()], - methodName: "Transfer", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(userFrom), - }, - }, - ) - .catch((err) => { - assertStringContains(err.response.data.error, `has insufficient funds`); - }); - }, -); - -Then( - "{string} has {int} CBDC available in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, amount: number) { - assertEqual(await getFabricBalance(getFabricId(user)), amount); - }, -); - -Then( - "the asset reference chaincode has an asset reference with id {string}", - { timeout: 10 * 1000 }, - async function (assetRefID: string) { - assertNonNullish(await readFabricAssetReference(assetRefID)); - }, -); - -Then( - "the asset reference with id {string} is locked in the source chain", - { timeout: 10 * 1000 }, - async function (assetRefID: string) { - assertEqual((await readFabricAssetReference(assetRefID)).isLocked, true); - }, -); - -Then( - "the asset reference chaincode has no asset reference with id {string}", - { timeout: 10 * 1000 }, - async function (assetRefID: string) { - assertEqual(await fabricAssetReferenceExists(assetRefID), "false"); - }, -); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-cbdc-bridging-backend/supervisord.conf b/examples/cactus-example-cbdc-bridging-backend/supervisord.conf deleted file mode 100644 index 8a836ce1b4..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/supervisord.conf +++ /dev/null @@ -1,25 +0,0 @@ -[supervisord] -logfile = /usr/src/app/cactus/log/supervisord.log -logfile_maxbytes = 50MB -logfile_backups=10 -loglevel = info - -[program:dockerd] -command=/usr/local/bin/dockerd -autostart=true -autorestart=true -stderr_logfile=/usr/src/app/cactus/log/dockerd.err.log -stdout_logfile=/usr/src/app/cactus/log/dockerd.out.log - -[program:cbdc-bridge-app-backend] -command=/run-cbdc-app.sh -autostart=true -autorestart=unexpected -exitcodes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 - -[inet_http_server] -port = 0.0.0.0:9001 \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/tsconfig.json b/examples/cactus-example-cbdc-bridging-backend/tsconfig.json deleted file mode 100644 index 3d723037bc..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/tsconfig.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "moduleResolution": "Node16", - "module": "Node16", - "tsBuildInfoFile": "../../.build-cache/cactus-example-cbdc-bridging-backend.tsbuildinfo", - }, - "references": [ - { - "path": "../../extensions/cactus-plugin-object-store-ipfs" - }, - { - "path": "../../packages/cactus-api-client/tsconfig.json" - }, - { - "path": "../../packages/cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-satp-hermes/tsconfig.json" - }, - { - "path": "../../packages/cactus-test-tooling/tsconfig.json" - } - ], - "include": [ - "./src", - "src/**/*.json" - ], - "exclude": [ - "./src/fabric-contracts" - ] -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/.env b/examples/cactus-example-cbdc-bridging-frontend/.env deleted file mode 100644 index 656ef3132a..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/.env +++ /dev/null @@ -1 +0,0 @@ -PORT=2000 \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/.gitignore b/examples/cactus-example-cbdc-bridging-frontend/.gitignore deleted file mode 100644 index 4d29575de8..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/examples/cactus-example-cbdc-bridging-frontend/CHANGELOG.md b/examples/cactus-example-cbdc-bridging-frontend/CHANGELOG.md deleted file mode 100644 index 3c41ea4747..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/CHANGELOG.md +++ /dev/null @@ -1,65 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger-cacti/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cacti-example-cbdc-bridging-frontend - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cacti-example-cbdc-bridging-frontend - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cacti-example-cbdc-bridging-frontend - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cacti-example-cbdc-bridging-frontend - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Features - -* **cbdc-bridging:** add frontend code for the CBDC example ([5ad0ebf](https://github.com/hyperledger/cacti/commit/5ad0ebffe9de0eabbdfabb8ce8fa5c426519ee33)) -* **indy-sdk:** replace indy SDK with AFJ ([3291dcc](https://github.com/hyperledger/cacti/commit/3291dcc57e9e4eb04e0b9abab4134e1a5e2b0bbf)), closes [#2859](https://github.com/hyperledger/cacti/issues/2859) [#2860](https://github.com/hyperledger/cacti/issues/2860) -* **plugin-satp-hermes:** replace IPFS dependency in SATP package ([3bb7157](https://github.com/hyperledger/cacti/commit/3bb7157b8c910c31aa3fe125ecfb3437c2bef5bb)), closes [#2984](https://github.com/hyperledger/cacti/issues/2984) [#3006](https://github.com/hyperledger/cacti/issues/3006) diff --git a/examples/cactus-example-cbdc-bridging-frontend/Dockerfile b/examples/cactus-example-cbdc-bridging-frontend/Dockerfile deleted file mode 100644 index 26fc549f70..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ - - -FROM node:16-alpine - -WORKDIR /usr/src/app - -COPY package.json ./ - -RUN npm install --legacy-peer-deps - -COPY . . - -EXPOSE 2000 - -CMD [ "npm", "start" ] \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/README.md b/examples/cactus-example-cbdc-bridging-frontend/README.md deleted file mode 100644 index 2bab60b487..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Getting Started with Create React App - -## Run with Docker - -### Using a pre-built image - -`docker run -p 2000:2000 aaugusto11/cactus-example-cbdc-bridging-frontend` - -### Building the image - -```docker build -t cbdc-app-frontend . -docker run -p 2000:2000 cbdc-app-frontend``` - -## `npm start` - -Runs the app in the development mode.\ -Open [http://localhost:2000](http://localhost:2000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. diff --git a/examples/cactus-example-cbdc-bridging-frontend/package.json b/examples/cactus-example-cbdc-bridging-frontend/package.json deleted file mode 100644 index 98071a1deb..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "@hyperledger/cacti-example-cbdc-bridging-frontend", - "version": "2.0.0", - "private": true, - "license": "Apache-2.0", - "scripts": { - "build": "react-scripts build", - "eject": "react-scripts eject", - "start": "react-scripts start", - "test": "react-scripts test" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "dependencies": { - "@emotion/react": "^11.11.1", - "@emotion/styled": "^11.11.0", - "@mui/icons-material": "^5.14.19", - "@mui/material": "^5.14.19", - "@testing-library/jest-dom": "^5.17.0", - "@testing-library/react": "^13.4.0", - "@testing-library/user-event": "^13.5.0", - "@types/jest": "^27.5.2", - "@types/node": "18.11.9", - "@types/react": "^18.2.39", - "@types/react-dom": "^18.2.17", - "axios": "1.7.7", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-scripts": "5.0.1", - "typescript": "5.5.2", - "uuid": "10.0.0", - "web-vitals": "^2.1.4" - }, - "devDependencies": { - "@types/uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - } -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/public/bridge-right-left.svg b/examples/cactus-example-cbdc-bridging-frontend/public/bridge-right-left.svg deleted file mode 100644 index 1e12436aa1..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/public/bridge-right-left.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/examples/cactus-example-cbdc-bridging-frontend/public/bridge-up-down.svg b/examples/cactus-example-cbdc-bridging-frontend/public/bridge-up-down.svg deleted file mode 100644 index 237fc99244..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/public/bridge-up-down.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/examples/cactus-example-cbdc-bridging-frontend/public/favicon.ico b/examples/cactus-example-cbdc-bridging-frontend/public/favicon.ico deleted file mode 100644 index a11777cc47..0000000000 Binary files a/examples/cactus-example-cbdc-bridging-frontend/public/favicon.ico and /dev/null differ diff --git a/examples/cactus-example-cbdc-bridging-frontend/public/index.html b/examples/cactus-example-cbdc-bridging-frontend/public/index.html deleted file mode 100644 index aa069f27cb..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/public/index.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - React App - - - -
- - - diff --git a/examples/cactus-example-cbdc-bridging-frontend/public/logo192.png b/examples/cactus-example-cbdc-bridging-frontend/public/logo192.png deleted file mode 100644 index fc44b0a379..0000000000 Binary files a/examples/cactus-example-cbdc-bridging-frontend/public/logo192.png and /dev/null differ diff --git a/examples/cactus-example-cbdc-bridging-frontend/public/logo512.png b/examples/cactus-example-cbdc-bridging-frontend/public/logo512.png deleted file mode 100644 index a4e47a6545..0000000000 Binary files a/examples/cactus-example-cbdc-bridging-frontend/public/logo512.png and /dev/null differ diff --git a/examples/cactus-example-cbdc-bridging-frontend/public/manifest.json b/examples/cactus-example-cbdc-bridging-frontend/public/manifest.json deleted file mode 100644 index 080d6c77ac..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/public/robots.txt b/examples/cactus-example-cbdc-bridging-frontend/public/robots.txt deleted file mode 100644 index e9e57dc4d4..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/App.css b/examples/cactus-example-cbdc-bridging-frontend/src/App.css deleted file mode 100644 index 74b5e05345..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx deleted file mode 100644 index bfd71aab57..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import HomePage from './pages/HomePage'; -import { CssBaseline } from '@mui/material'; -import './App.css'; - -function App() { - return ( - <> - - - - ); -} - -export default App; diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/besu-api.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/besu-api.tsx deleted file mode 100644 index 3aecf5ed30..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/besu-api.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import axios from "axios"; -import CryptoMaterial from "../crypto-material/crypto-material.json"; -import { getEthAddress, getEthUserPrKey, getFabricId } from "./common"; - -const BESU_CONTRACT_CBDC_ERC20_NAME = "CBDCcontract"; -const BESU_CONTRACT_ASSET_REF_NAME = "AssetReferenceContract"; - -export async function transferTokensBesu( - frontendUserFrom: string, - frontendUserTo: string, - amount: number, -) { - const from = getEthAddress(frontendUserFrom); - const to = getEthAddress(frontendUserTo); - await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "SEND", - methodName: "transfer", - gas: 1000000, - params: [to, amount], - signingCredential: { - ethAccount: from, - secret: getEthUserPrKey(frontendUserFrom), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); -} - -export async function escrowTokensBesu( - frontendUserFrom: string, - amount: number, - assetRefID: string -) { - const from = getEthAddress(frontendUserFrom); - - await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "SEND", - methodName: "escrow", - gas: 1000000, - params: [amount, assetRefID], - signingCredential: { - ethAccount: from, - secret: getEthUserPrKey(frontendUserFrom), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); -} - -export async function getAssetReferencesBesu(frontendUser: string) { - const from = getEthAddress(frontendUser); - - const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "CALL", - methodName: "getAllAssetReferences", - gas: 1000000, - params: [], - signingCredential: { - ethAccount: from, - secret: getEthUserPrKey(frontendUser), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - return response.data.callOutput.map((asset: any) => { - return { - id: asset[0], - numberTokens: asset[2], - recipient: getUserFromEthAddress(asset[3]), - }; - }); -} - -export async function bridgeBackTokensBesu(frontendUser: string, amount: number, assetRefID: string) { - const address = getEthAddress(frontendUser); - const fabricID = getFabricId(frontendUser); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - await axios.post( - "http://localhost:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://localhost:4100`, - }, - serverGatewayConfiguration: { - apiHost: `http://localhost:4000`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT2", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT1", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway1"].publicKey, - serverDltSystem: "DLT1", - sourceGatewayDltSystem: "DLT2", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: 5, - maxTimeout: 5000, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "FABRIC_ASSET_ID", - }, - ); -} - -export async function getBesuBalance(frontendUser: string) { - const userEthAddress = getEthAddress(frontendUser); - - const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "CALL", - methodName: "balanceOf", - gas: 1000000, - params: [userEthAddress], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - return parseInt(response.data.callOutput); -} - -function getUserFromEthAddress(ethAddress: string) { - switch (ethAddress) { - case CryptoMaterial.accounts["userA"].ethAddress: - return "Alice"; - case CryptoMaterial.accounts["userB"].ethAddress: - return "Charlie"; - case CryptoMaterial.accounts["bridge"].ethAddress: - return "Bridge"; - default: - break; - } -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/common.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/common.tsx deleted file mode 100644 index 70cbc97624..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/common.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import axios from "axios"; -import CryptoMaterial from "../crypto-material/crypto-material.json"; - -// Input: [Alice, Charlie, Bridge] -export function getUserFromPseudonim(user: string) { - switch (user) { - case "Alice": - return "userA"; - case "Charlie": - return "userB"; - case "Bridge": - return "bridge"; - default: - break; - } -} - -export function getFabricId(user: string) { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].fabricID; - case "userB": - return CryptoMaterial.accounts["userB"].fabricID; - case "bridge": - return CryptoMaterial.accounts["bridge"].fabricID; - default: - break; - } -} - -export function getEthAddress(user: string) { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].ethAddress; - case "userB": - return CryptoMaterial.accounts["userB"].ethAddress; - case "bridge": - return CryptoMaterial.accounts["bridge"].ethAddress; - default: - break; - } -} - -export function getEthUserPrKey(user: string) { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].privateKey; - case "userB": - return CryptoMaterial.accounts["userB"].privateKey; - case "bridge": - return CryptoMaterial.accounts["bridge"].privateKey; - default: - break; - } -} - -export async function checkApiServer1Connection() { - await axios.get("http://localhost:4000/api/v1/api-server/healthcheck"); -} - -export async function checkApiServer2Connection() { - await axios.get("http://localhost:4100/api/v1/api-server/healthcheck"); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/fabric-api.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/fabric-api.tsx deleted file mode 100644 index 9bb5fd2748..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/fabric-api.tsx +++ /dev/null @@ -1,182 +0,0 @@ -import axios from "axios"; -import CryptoMaterial from "../crypto-material/crypto-material.json"; -import { getUserFromPseudonim, getEthAddress, getFabricId } from "./common"; - -const FABRIC_CHANNEL_NAME = "mychannel"; -const FABRIC_CONTRACT_CBDC_ERC20_NAME = "cbdc"; -const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; - -export async function getFabricBalance(frontendUser: string) { - const fabricID = getFabricId(frontendUser); - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [fabricID], - methodName: "BalanceOf", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); - - return parseInt(response.data.functionOutput); -} - -export async function mintTokensFabric(frontendUser: string, amount: string) { - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [amount.toString()], - methodName: "Mint", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUser), - }, - }, - ); - - if (response.status === 200) { - // throw error - } -} - -export async function transferTokensFabric( - frontendUserFrom: string, - frontendUserTo: string, - amount: string, -) { - const to = getFabricId(frontendUserTo); - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [to, amount.toString()], - methodName: "Transfer", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUserFrom), - }, - }, - ); - - if (response.status === 200) { - // throw error - } -} - -export async function escrowTokensFabric(frontendUser: string, amount: string, assetRefID: string) { - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [amount.toString(), assetRefID], - methodName: "Escrow", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUser), - }, - }, - ); - - if (response.status === 200) { - // throw error - } -} - -export async function bridgeOutTokensFabric(frontendUser: string, amount: string, assetRefID: string) { - const fabricID = getFabricId(frontendUser); - const address = getEthAddress(frontendUser); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - await axios.post( - "http://localhost:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://localhost:4000`, - }, - serverGatewayConfiguration: { - apiHost: `http://localhost:4100`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway2"].publicKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: 5, - maxTimeout: 5000, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "FABRIC_ASSET_ID", - }, - ); -} - -export async function getAssetReferencesFabric(frontendUser: string) { - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [], - methodName: "GetAllAssetReferences", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUser), - }, - }, - ); - - return JSON.parse(response.data.functionOutput) - .filter((asset: any) => typeof asset === "object") - .map((asset: any) => { - asset.recipient = getUserFromFabricId(asset.recipient); - return asset; - }); -} - -export function getUserFromFabricId(fabricID: string): string { - switch (fabricID) { - case CryptoMaterial.accounts["userA"].fabricID: - return "Alice"; - case CryptoMaterial.accounts["userB"].fabricID: - return "Charlie"; - case CryptoMaterial.accounts["bridge"].fabricID: - return "Bridge"; - default: - return ""; - } -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx deleted file mode 100644 index 015b2d7de6..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx +++ /dev/null @@ -1,222 +0,0 @@ -import { useState, useEffect } from "react"; -import { styled } from '@mui/material/styles'; -import Button, { ButtonProps } from "@mui/material/Button"; -import Grid from "@mui/material/Grid"; -import CircularProgress from "@mui/material/CircularProgress"; -import MintDialog from "./dialogs/MintDialog"; -import TransferDialog from "./dialogs/TransferDialog"; -import EscrowDialog from "./dialogs/EscrowDialog"; -import BridgeOutDialog from "./dialogs/BridgeOutDialog"; -import BridgeBackDialog from "./dialogs/BridgeBackDialog"; -import { getFabricBalance } from "../api-calls/fabric-api"; -import { getBesuBalance } from "../api-calls/besu-api"; -import { AssetReference } from "../models/AssetReference"; - -const NormalButton = styled(Button)(({ theme }) => ({ - margin: "auto", - width: "100%", - fontSize: "13px", - textTransform: "none", - background: "#2B9BF6", - color: "#FFFFFF", - border: "0.5px solid #000000", - '&:disabled': { - border: "0", - }, -})); - -const CriticalButton = styled(Button)(({ theme }) => ({ - margin: "auto", - width: "100%", - fontSize: "13px", - textTransform: "none", - background: "#FF584B", - color: "#FFFFFF", - border: "0.5px solid #000000", - "&:hover": { - backgroundColor: "#444444", - color: "#FFFFFF", - }, - '&:disabled': { - border: "0", - }, -})); - -export interface IActionsContainerOptions { - user: string; - ledger: string; - assetRefs: Array -} - -export default function ActionsContainer(props: IActionsContainerOptions) { - const [amount, setAmount] = useState(0); - const [mintDialog, setMintDialog] = useState(false); - const [transferDialog, setTransferDialog] = useState(false); - const [escrowDialog, setEscrowDialog] = useState(false); - const [bridgeOutDialog, setBridgeOutDialog] = useState(false); - const [bridgeBackDialog, setBridgeBackDialog] = useState(false); - const [loading, setLoading] = useState(false); - - useEffect(() => { - async function fetchData() { - let response; - if (props.ledger === "Fabric") { - response = await getFabricBalance(props.user); - setAmount(response); - } else if (props.ledger === "Besu") { - response = await getBesuBalance(props.user); - setAmount(response); - } - setLoading(false); - } - - setLoading(true); - fetchData(); - }, [props.user, props.ledger]); - - return ( -
- {loading ? ( -
- -
- ) : ( - - - {props.user} - - - - {amount} CBDC - - - {props.user !== "Bridge" && props.ledger !== "Besu" && ( - - setMintDialog(true)} - > - Mint - - - )} - {props.user === "Bridge" ? ( - - setTransferDialog(true)} - - > - Transfer - - - ) : props.ledger === "Besu" ? ( - - setTransferDialog(true)} - - > - Transfer - - - ) : ( - - setTransferDialog(true)} - - > - Transfer - - - )} - {props.user !== "Bridge" && ( - - setEscrowDialog(true)} - - > - Escrow - - - )} - {props.ledger === "Fabric" && props.user !== "Bridge" && ( - - asset.recipient === props.user, - ).length === 0 - } - onClick={() => setBridgeOutDialog(true)} - > - Bridge Out - - - )} - {props.ledger === "Besu" && props.user !== "Bridge" && ( - - asset.recipient === props.user, - ).length === 0 - } - onClick={() => setBridgeBackDialog(true)} - - > - Bridge Back - - - )} - - )} - setMintDialog(false)} - /> - setTransferDialog(false)} - /> - setEscrowDialog(false)} - /> - setBridgeOutDialog(false)} - /> - setBridgeBackDialog(false)} - /> -
- ); -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx deleted file mode 100644 index 23e1efa17c..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import Table from "@mui/material/Table"; -import TableBody from "@mui/material/TableBody"; -import TableCell from "@mui/material/TableCell"; -import TableContainer from "@mui/material/TableContainer"; -import TableHead from "@mui/material/TableHead"; -import TableRow from "@mui/material/TableRow"; -import { AssetReference } from "../models/AssetReference"; - -const headCells = [ - { - id: "id", - first: true, - label: "ID", - }, - { id: "amount", numeric: true, label: "Amount" }, - { - id: "owner", - label: "Owner", - }, -]; - -function ItemsTableHead() { - return ( - - - {headCells.map((headCell) => ( - - {headCell.label} - - ))} - - - ); -} - -export interface IAssetReferencesTableOptions { - ledger: string; - assetRefs: AssetReference[]; -} - -export default function AssetReferencesTable(props: IAssetReferencesTableOptions) { - return ( -
- {props.assetRefs && ( - - - - - {props.assetRefs.map((row) => ( - - - {row.id} - - {row.numberTokens} - {row.recipient} - - ))} - -
-
- )} -
- ); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx deleted file mode 100644 index 5a1d93e8fe..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { useState, useEffect } from "react"; -import Paper from "@mui/material/Paper"; -import Grid from "@mui/material/Grid"; -import ActionsContainer from "./ActionsContainer"; -import { getAssetReferencesFabric } from "../api-calls/fabric-api"; -import { getAssetReferencesBesu } from "../api-calls/besu-api"; -import AssetReferencesTable from "./AssetReferencesTable"; - -export interface ILedgerOptions { - ledger: string; -} - -export default function Ledger(props: ILedgerOptions) { - const [assetReferences, setAssetReferences] = useState([]); - - useEffect(() => { - async function fetchData() { - if (props.ledger === "Fabric") { - let list = await getAssetReferencesFabric("Alice"); - setAssetReferences(list); - } else { - let list = await getAssetReferencesBesu("Alice"); - setAssetReferences(list); - } - } - - fetchData(); - }, [props.ledger]); - - return ( - -

Hyperledger {props.ledger}

- {props.ledger === "Fabric" ?

Org1

:

--

} - - - - - - - - - - - - - {props.ledger === "Fabric" ?

Org2

:

--

} - - - -

Asset References

- -
- ); -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx deleted file mode 100644 index ca20585d62..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import { useEffect, useState } from "react"; -import DialogActions from "@mui/material/DialogActions"; -import DialogContent from "@mui/material/DialogContent"; -import DialogContentText from "@mui/material/DialogContentText"; -import DialogTitle from "@mui/material/DialogTitle"; -import MenuItem from "@mui/material/MenuItem"; -import Select, { SelectChangeEvent } from "@mui/material/Select"; -import Button from "@mui/material/Button"; -import Dialog from "@mui/material/Dialog"; -import Alert from "@mui/material/Alert"; -import { - bridgeBackTokensBesu, - getAssetReferencesBesu, -} from "../../api-calls/besu-api"; -import { AssetReference } from "../../models/AssetReference"; - -export interface IBridgeBackDialogOptions { - user: string - open: boolean - onClose: () => any -} - -export default function BridgeBackDialog(props: IBridgeBackDialogOptions) { - const [assetRefs, setAssetRefs] = useState([]); - const [assetRefID, setAssetRefID] = useState(""); - const [errorMessage, setErrorMessage] = useState(""); - const [sending, setSending] = useState(false); - - useEffect(() => { - async function fetchData() { - const list = await getAssetReferencesBesu(props.user); - setAssetRefs(list.filter((asset: AssetReference) => asset.recipient === props.user)); - } - - if (props.open) { - setSending(false); - setAssetRefID(""); - fetchData(); - } - }, [props.open, props.user]); - - const handleChangeAssetRefID = (event: SelectChangeEvent) => { - setAssetRefID(event.target.value); - }; - - const performBridgeBackTransaction = async () => { - if (assetRefID === "") { - setErrorMessage("Please choose a valid Asset Reference ID"); - } else { - setSending(true); - const assetRef = assetRefs.find( - (asset) => asset.id === assetRefID, - ); - if (assetRef === undefined) { - setErrorMessage("Something went wrong. Asset Reference not found"); - return; - } - await bridgeBackTokensBesu(props.user, parseInt(assetRef.numberTokens), assetRefID); - props.onClose(); - } - }; - - return ( - - {"Bridge Back CBDC"} - - - Select the {props.user}"s Asset Reference that represents the amount - to bridge back. - - {assetRefs.length === 0 ? ( - - Must escrow tokens before trying to bridge back CBDC. - - ) : ( - - )} - {errorMessage !== "" && {errorMessage}} - - - {sending ? ( - - ) : ( -
- - -
- )} -
-
- ); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx deleted file mode 100644 index f359d71661..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import { useEffect, useState } from "react"; -import DialogActions from "@mui/material/DialogActions"; -import DialogContent from "@mui/material/DialogContent"; -import DialogContentText from "@mui/material/DialogContentText"; -import DialogTitle from "@mui/material/DialogTitle"; -import MenuItem from "@mui/material/MenuItem"; -import Select, { SelectChangeEvent } from "@mui/material/Select"; -import Button from "@mui/material/Button"; -import Dialog from "@mui/material/Dialog"; -import Alert from "@mui/material/Alert"; -import { - bridgeOutTokensFabric, - getAssetReferencesFabric, -} from "../../api-calls/fabric-api"; -import { AssetReference } from "../../models/AssetReference"; - -export interface IBridgeOutDialogOptions { - user: string; - open: boolean; - onClose: () => any; -} - -export default function BridgeOutDialog(props: IBridgeOutDialogOptions) { - const [assetRefs, setAssetRefs] = useState([]); - const [assetRefID, setAssetRefID] = useState(""); - const [errorMessage, setErrorMessage] = useState(""); - const [sending, setSending] = useState(false); - - useEffect(() => { - async function fetchData() { - const list = await getAssetReferencesFabric(props.user); - setAssetRefs(list.filter((asset: AssetReference) => asset.recipient === props.user)); - } - - if (props.open) { - setSending(false); - setAssetRefID(""); - fetchData(); - } - }, [props.open, props.user]); - - const handleChangeAssetRefID = (event: SelectChangeEvent) => { - setAssetRefID(event.target.value); - }; - - const performBridgeOutTransaction = async () => { - if (assetRefID === "") { - setErrorMessage("Please choose a valid Asset Reference ID"); - } else { - setSending(true); - const assetRef = assetRefs.find( - (asset) => asset.id === assetRefID, - ); - if (assetRef === undefined) { - setErrorMessage("Something went wrong. Asset Reference not found"); - return; - } - await bridgeOutTokensFabric(props.user, assetRef.numberTokens, assetRefID); - props.onClose(); - } - }; - - return ( - - {"Bridge Out CBDC"} - - - Select the {props.user}"s Asset Reference that represents the amount - to bridge out. - - {assetRefs.length === 0 ? ( - - Must escrow tokens before trying to bridge out CBDC. - - ) : ( - - )} - {errorMessage !== "" && {errorMessage}} - - - {sending ? ( - - ) : ( -
- - -
- )} -
-
- ); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/ConnectionErrorDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/ConnectionErrorDialog.tsx deleted file mode 100644 index e619d2032f..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/ConnectionErrorDialog.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import DialogContent from "@mui/material/DialogContent"; -import DialogTitle from "@mui/material/DialogTitle"; -import Dialog from "@mui/material/Dialog"; -import Alert from "@mui/material/Alert"; - -export interface IConnectionErrorDialogOptions { - open: boolean - onClose: () => any -} - -export default function ConnectionErrorDialog(props: IConnectionErrorDialogOptions) { - const handleClose = (event: any, reason: any) => { - if (reason && reason === "backdropClick") { - return; - } - - props.onClose(); - }; - - return ( - - {"API Servers Connection Error"} - - - Please check the connection with the API Servers and refresh the page. - - - - ); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/EscrowDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/EscrowDialog.tsx deleted file mode 100644 index 056426d0b5..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/EscrowDialog.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import { ChangeEvent, useEffect, useState } from "react"; -import { v4 as uuidv4 } from "uuid"; -import DialogActions from "@mui/material/DialogActions"; -import DialogContent from "@mui/material/DialogContent"; -import DialogContentText from "@mui/material/DialogContentText"; -import DialogTitle from "@mui/material/DialogTitle"; -import TextField from "@mui/material/TextField"; -import Button from "@mui/material/Button"; -import Dialog from "@mui/material/Dialog"; -import Alert from "@mui/material/Alert"; -import { escrowTokensFabric } from "../../api-calls/fabric-api"; -import { escrowTokensBesu } from "../../api-calls/besu-api"; - -export interface IEscrowDialogOptions { - open: boolean - user: string - ledger: string - onClose: () => any -} - -export default function EscrowDialog(props: IEscrowDialogOptions) { - const [assetRefID, setAssetRefID] = useState(""); - const [amount, setAmount] = useState(0); - const [errorMessage, setErrorMessage] = useState(""); - const [sending, setSending] = useState(false); - - useEffect(() => { - if (props.open) { - setSending(false); - setAssetRefID(uuidv4()); - setAmount(0); - } - }, [props.open]); - - const handleChangeAmount = (event: ChangeEvent) => { - const value = parseInt(event.target.value); - - if (value < 0) { - setErrorMessage("Amount must be a positive value"); - setAmount(0); - } else { - setErrorMessage(""); - setAmount(value); - } - }; - - const performEscrowTransaction = async () => { - if (amount === 0) { - setErrorMessage("Amount must be a positive value"); - } else { - setSending(true); - if (props.ledger === "Fabric") { - await escrowTokensFabric(props.user, amount.toString(), assetRefID); - } else { - await escrowTokensBesu(props.user, amount, assetRefID); - } - - props.onClose(); - } - }; - - return ( - - {"Escrow CBDC"} - - - Select the recipient of the CBDC and how many you would like to - transfer from {props.user}"s address? - - - - {errorMessage !== "" && ( - - {errorMessage} - - )} - - - {sending ? ( - - ) : ( -
- - -
- )} -
-
- ); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx deleted file mode 100644 index 15f7badd05..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { useState, useEffect, ChangeEvent } from "react"; -import DialogActions from "@mui/material/DialogActions"; -import DialogContent from "@mui/material/DialogContent"; -import DialogContentText from "@mui/material/DialogContentText"; -import DialogTitle from "@mui/material/DialogTitle"; -import TextField from "@mui/material/TextField"; -import Button from "@mui/material/Button"; -import Dialog from "@mui/material/Dialog"; -import Alert from "@mui/material/Alert"; -import { mintTokensFabric } from "../../api-calls/fabric-api"; - -export interface IMintDialogOptions { - open: boolean - user: string - onClose: () => any -} - -export default function MintDialog(props: IMintDialogOptions) { - const [amount, setAmount] = useState(0); - const [errorMessage, setErrorMessage] = useState(""); - const [sending, setSending] = useState(false); - - useEffect(() => { - if (props.open) { - setSending(false); - setAmount(0); - } - }, [props.open]); - - const handleChangeAmount = (event: ChangeEvent) => { - const value = parseInt(event.target.value); - - if (value < 0) { - setErrorMessage("Amount must be a positive value"); - setAmount(0); - } else { - setErrorMessage(""); - setAmount(value); - } - }; - - const performMintTransaction = async () => { - if (amount === 0) { - setErrorMessage("Amount must be a positive value"); - } else { - setSending(true); - await mintTokensFabric(props.user, amount.toString()); - props.onClose(); - } - }; - - return ( - - {"Mint CBDC"} - - - How many tokens would you like to mint to {props.user}"s address? - - - {errorMessage !== "" && ( - - {errorMessage} - - )} - - - {sending ? ( - - ) : ( -
- - -
- )} -
-
- ); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx deleted file mode 100644 index 06edcea061..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx +++ /dev/null @@ -1,126 +0,0 @@ -import { useState, useEffect, ChangeEvent } from "react"; -import DialogActions from "@mui/material/DialogActions"; -import DialogContent from "@mui/material/DialogContent"; -import DialogContentText from "@mui/material/DialogContentText"; -import DialogTitle from "@mui/material/DialogTitle"; -import TextField from "@mui/material/TextField"; -import MenuItem from "@mui/material/MenuItem"; -import Select, { SelectChangeEvent } from "@mui/material/Select"; -import Button from "@mui/material/Button"; -import Dialog from "@mui/material/Dialog"; -import Alert from "@mui/material/Alert"; -import { transferTokensFabric } from "../../api-calls/fabric-api"; -import { transferTokensBesu } from "../../api-calls/besu-api"; - -const recipients = ["Alice", "Charlie", "Bridge"]; -export interface ITransferDialogOptions { - open: boolean - ledger: string - user: string - onClose: () => any -} - -export default function TransferDialog(props: ITransferDialogOptions) { - const [recipient, setRecipient] = useState(""); - const [amount, setAmount] = useState(0); - const [errorMessage, setErrorMessage] = useState(""); - const [sending, setSending] = useState(false); - - useEffect(() => { - if (props.open) { - setSending(false); - setRecipient(""); - setAmount(0); - } - }, [props.open]); - - const handleChangeAmount = (event: ChangeEvent) => { - const value = parseInt(event.target.value); - - if (value < 0) { - setErrorMessage("Amount must be a positive value"); - setAmount(0); - } else { - setErrorMessage(""); - setAmount(value); - } - }; - - const handleChangeRecipient = (event: SelectChangeEvent) => { - setRecipient(event.target.value); - }; - - const performTransferTransaction = async () => { - if (amount === 0) { - setErrorMessage("Amount must be a positive value"); - } else { - setSending(true); - if (props.ledger === "Fabric") { - await transferTokensFabric(props.user, recipient, amount.toString()); - } else { - await transferTokensBesu(props.user, recipient, amount); - } - - props.onClose(); - } - }; - - return ( - - {"Transfer CBDC"} - - - Select the recipient of the CBDC and how many you would like to - transfer from {props.user}"s address? - - - - {errorMessage !== "" && ( - - {errorMessage} - - )} - - - {sending ? ( - - ) : ( -
- - -
- )} -
-
- ); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/crypto-material/crypto-material.json b/examples/cactus-example-cbdc-bridging-frontend/src/crypto-material/crypto-material.json deleted file mode 100644 index 810b11df61..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/crypto-material/crypto-material.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "info": { - "description": "this file contains data to be used for testing purposes only. It should not be changed!! It should remain consistent with the crypto material in the backend" - }, - "accounts": { - "userA": { - "ethAddress": "0x1A86D6f4b5D30A07D1a94bb232eF916AFe5DbDbc", - "privateKey": "0xb47c3ba5a816dbbb2271db721e76e6c80e58fe54972d26a42f00bc97a92a2535", - "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" - }, - "bridge": { - "ethAddress": "0xf28d5769171bfbD2B3628d722e58129a6aE15022", - "privateKey": "0x2917bd3b0dced512d3555f171a0979fedd37bb0593883089396d9b893aa0505d", - "fabricID": "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com" - }, - "userB": { - "ethAddress": "0xB264c626D7D09789AbfD2a431A28a054366e7b63", - "privateKey": "0xfe95d40663e60e9a8a2e1f4153c9e207ac26d928e8a5631647735d91e93be402", - "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userB::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" - } - }, - "gateways": { - "gateway1": { - "publicKey": "02e2beaa887c53d0ddb8383e2c49553545f50ae19074b4c7f79238dcb59f4b5fcb", - "privateKey": "206021a8ffaba949d21e32c02d76d2dc13da25e8197532ab300bb49d91397e52" - }, - "gateway2": { - "publicKey": "02309ff54e58748616aa81245c1a4457f11fab47dcdb45b107dbcde24ee772b609", - "privateKey": "6bb4c730739969ff3429be71dd62d05459e61bc3f2956326449ae2ca7de50fb6" - } - }, - "keychains": { - "keychain1": { - "id": "df05d3c2-ddd5-4074-aae3-526564217459" - }, - "keychain2": { - "id": "d741fb4a-c95c-4205-8afa-758a9423234f" - } - } -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/index.css b/examples/cactus-example-cbdc-bridging-frontend/src/index.css deleted file mode 100644 index ec2585e8c0..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/index.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx deleted file mode 100644 index b768844254..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; - -const root = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement -); -root.render( - - - -); - diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/logo.svg b/examples/cactus-example-cbdc-bridging-frontend/src/logo.svg deleted file mode 100644 index 9dfc1c058c..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/models/AssetReference.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/models/AssetReference.tsx deleted file mode 100644 index a83c60a2a5..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/models/AssetReference.tsx +++ /dev/null @@ -1,13 +0,0 @@ -export interface AssetReference { - id: string - recipient: string - numberTokens: string -} - -export function createAssetReference(id: string, recipient: string, numberTokens: string): AssetReference { - return { - id: id, - recipient: recipient, - numberTokens: numberTokens - } -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx deleted file mode 100644 index f7b88cdcfa..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { useState, useEffect } from "react"; -import Grid from "@mui/material/Grid"; -import Ledger from "../components/Ledger"; -import { - checkApiServer1Connection, - checkApiServer2Connection, -} from "../api-calls/common"; -import ConnectionErrorDialog from "../components/dialogs/ConnectionErrorDialog"; - -export default function HomePage() { - const [errorDialog, setErrorDialog] = useState(false); - - useEffect(() => { - const checkConnection = async () => { - await checkApiServer1Connection() - .then(() => setErrorDialog(false)) - .catch(() => setErrorDialog(true)); - - await checkApiServer2Connection() - .then(() => setErrorDialog(false)) - .catch(() => setErrorDialog(true)); - } - - checkConnection(); - }, []); - - return ( -
- - - - - - - - - - - - setErrorDialog(false)} - /> -
- ); -} - -function BridgeImage() { - return ( - <> - - - - - - - ); -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/react-app-env.d.ts b/examples/cactus-example-cbdc-bridging-frontend/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5fc6..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/examples/cactus-example-cbdc-bridging-frontend/tsconfig.json b/examples/cactus-example-cbdc-bridging-frontend/tsconfig.json deleted file mode 100644 index d27ab29e0b..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/tsconfig.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx", - "tsBuildInfoFile": "../../.build-cache/cactus-example-cbdc-bridging-frontend.tsbuildinfo" - }, - "include": [ - "src", - "src/**/*.json" - ], - "references": [ - { - "path": "../../packages/cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-satp-hermes/tsconfig.json" - } - ] -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/tsconfig.tsbuildinfo b/examples/cactus-example-cbdc-bridging-frontend/tsconfig.tsbuildinfo deleted file mode 100644 index 93c2cf18b2..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/tsconfig.tsbuildinfo +++ /dev/null @@ -1 +0,0 @@ -{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/@types/react/ts5.0/global.d.ts","./node_modules/csstype/index.d.ts","./node_modules/@types/prop-types/index.d.ts","./node_modules/@types/scheduler/tracing.d.ts","./node_modules/@types/react/ts5.0/index.d.ts","./node_modules/@types/react/ts5.0/jsx-runtime.d.ts","./node_modules/@mui/types/index.d.ts","./node_modules/@mui/styled-engine/node_modules/csstype/index.d.ts","./node_modules/@emotion/utils/types/index.d.ts","./node_modules/@emotion/cache/types/index.d.ts","./node_modules/@emotion/serialize/types/index.d.ts","./node_modules/@emotion/react/types/jsx-namespace.d.ts","./node_modules/@emotion/react/types/helper.d.ts","./node_modules/@emotion/react/types/theming.d.ts","./node_modules/@emotion/react/types/index.d.ts","./node_modules/@emotion/styled/types/base.d.ts","./node_modules/@emotion/styled/types/index.d.ts","./node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.d.ts","./node_modules/@mui/styled-engine/StyledEngineProvider/index.d.ts","./node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.d.ts","./node_modules/@mui/styled-engine/GlobalStyles/index.d.ts","./node_modules/@mui/styled-engine/index.d.ts","./node_modules/@mui/system/createTheme/createBreakpoints.d.ts","./node_modules/@mui/system/createTheme/shape.d.ts","./node_modules/@mui/system/createTheme/createSpacing.d.ts","./node_modules/@mui/system/node_modules/csstype/index.d.ts","./node_modules/@mui/system/styleFunctionSx/StandardCssProperties.d.ts","./node_modules/@mui/system/styleFunctionSx/AliasesCSSProperties.d.ts","./node_modules/@mui/system/styleFunctionSx/OverwriteCSSProperties.d.ts","./node_modules/@mui/system/styleFunctionSx/styleFunctionSx.d.ts","./node_modules/@mui/system/styleFunctionSx/extendSxProp.d.ts","./node_modules/@mui/system/style.d.ts","./node_modules/@mui/system/styleFunctionSx/defaultSxConfig.d.ts","./node_modules/@mui/system/styleFunctionSx/index.d.ts","./node_modules/@mui/system/createTheme/createTheme.d.ts","./node_modules/@mui/system/createTheme/index.d.ts","./node_modules/@mui/system/Box/Box.d.ts","./node_modules/@mui/system/Box/boxClasses.d.ts","./node_modules/@mui/system/Box/index.d.ts","./node_modules/@mui/system/breakpoints.d.ts","./node_modules/@mui/private-theming/defaultTheme/index.d.ts","./node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.d.ts","./node_modules/@mui/private-theming/ThemeProvider/index.d.ts","./node_modules/@mui/private-theming/useTheme/useTheme.d.ts","./node_modules/@mui/private-theming/useTheme/index.d.ts","./node_modules/@mui/private-theming/index.d.ts","./node_modules/@mui/system/GlobalStyles/GlobalStyles.d.ts","./node_modules/@mui/system/GlobalStyles/index.d.ts","./node_modules/@mui/system/spacing.d.ts","./node_modules/@mui/system/createBox.d.ts","./node_modules/@mui/system/createStyled.d.ts","./node_modules/@mui/system/styled.d.ts","./node_modules/@mui/system/useThemeProps/useThemeProps.d.ts","./node_modules/@mui/system/useThemeProps/getThemeProps.d.ts","./node_modules/@mui/system/useThemeProps/index.d.ts","./node_modules/@mui/system/useTheme.d.ts","./node_modules/@mui/system/useThemeWithoutDefault.d.ts","./node_modules/@mui/system/colorManipulator.d.ts","./node_modules/@mui/system/ThemeProvider/ThemeProvider.d.ts","./node_modules/@mui/system/ThemeProvider/index.d.ts","./node_modules/@mui/system/cssVars/getInitColorSchemeScript.d.ts","./node_modules/@mui/system/cssVars/useCurrentColorScheme.d.ts","./node_modules/@mui/system/cssVars/createCssVarsProvider.d.ts","./node_modules/@mui/system/cssVars/prepareCssVars.d.ts","./node_modules/@mui/system/cssVars/createCssVarsTheme.d.ts","./node_modules/@mui/system/cssVars/index.d.ts","./node_modules/@mui/system/cssVars/createGetCssVar.d.ts","./node_modules/@mui/system/cssVars/cssVarsParser.d.ts","./node_modules/@mui/system/responsivePropType.d.ts","./node_modules/@mui/system/Container/containerClasses.d.ts","./node_modules/@mui/system/Container/ContainerProps.d.ts","./node_modules/@mui/system/Container/createContainer.d.ts","./node_modules/@mui/system/Container/Container.d.ts","./node_modules/@mui/system/Container/index.d.ts","./node_modules/@mui/system/Unstable_Grid/GridProps.d.ts","./node_modules/@mui/system/Unstable_Grid/Grid.d.ts","./node_modules/@mui/system/Unstable_Grid/createGrid.d.ts","./node_modules/@mui/system/Unstable_Grid/gridClasses.d.ts","./node_modules/@mui/system/Unstable_Grid/traverseBreakpoints.d.ts","./node_modules/@mui/system/Unstable_Grid/index.d.ts","./node_modules/@mui/system/Stack/StackProps.d.ts","./node_modules/@mui/system/Stack/Stack.d.ts","./node_modules/@mui/system/Stack/createStack.d.ts","./node_modules/@mui/system/Stack/stackClasses.d.ts","./node_modules/@mui/system/Stack/index.d.ts","./node_modules/@mui/system/index.d.ts","./node_modules/@mui/material/styles/identifier.d.ts","./node_modules/@mui/material/node_modules/csstype/index.d.ts","./node_modules/@mui/material/styles/createMixins.d.ts","./node_modules/@mui/material/colors/amber.d.ts","./node_modules/@mui/material/colors/blue.d.ts","./node_modules/@mui/material/colors/blueGrey.d.ts","./node_modules/@mui/material/colors/brown.d.ts","./node_modules/@mui/material/colors/common.d.ts","./node_modules/@mui/material/colors/cyan.d.ts","./node_modules/@mui/material/colors/deepOrange.d.ts","./node_modules/@mui/material/colors/deepPurple.d.ts","./node_modules/@mui/material/colors/green.d.ts","./node_modules/@mui/material/colors/grey.d.ts","./node_modules/@mui/material/colors/indigo.d.ts","./node_modules/@mui/material/colors/lightBlue.d.ts","./node_modules/@mui/material/colors/lightGreen.d.ts","./node_modules/@mui/material/colors/lime.d.ts","./node_modules/@mui/material/colors/orange.d.ts","./node_modules/@mui/material/colors/pink.d.ts","./node_modules/@mui/material/colors/purple.d.ts","./node_modules/@mui/material/colors/red.d.ts","./node_modules/@mui/material/colors/teal.d.ts","./node_modules/@mui/material/colors/yellow.d.ts","./node_modules/@mui/material/colors/index.d.ts","./node_modules/@mui/utils/node_modules/@types/prop-types/index.d.ts","./node_modules/@mui/utils/chainPropTypes/chainPropTypes.d.ts","./node_modules/@mui/utils/chainPropTypes/index.d.ts","./node_modules/@mui/utils/deepmerge.d.ts","./node_modules/@mui/utils/elementAcceptingRef.d.ts","./node_modules/@mui/utils/elementTypeAcceptingRef.d.ts","./node_modules/@mui/utils/exactProp/exactProp.d.ts","./node_modules/@mui/utils/exactProp/index.d.ts","./node_modules/@mui/utils/formatMuiErrorMessage.d.ts","./node_modules/@mui/utils/getDisplayName.d.ts","./node_modules/@mui/utils/HTMLElementType/HTMLElementType.d.ts","./node_modules/@mui/utils/HTMLElementType/index.d.ts","./node_modules/@mui/utils/ponyfillGlobal/ponyfillGlobal.d.ts","./node_modules/@mui/utils/ponyfillGlobal/index.d.ts","./node_modules/@mui/utils/refType.d.ts","./node_modules/@mui/utils/capitalize/capitalize.d.ts","./node_modules/@mui/utils/capitalize/index.d.ts","./node_modules/@mui/utils/createChainedFunction.d.ts","./node_modules/@mui/utils/debounce/debounce.d.ts","./node_modules/@mui/utils/debounce/index.d.ts","./node_modules/@mui/utils/deprecatedPropType.d.ts","./node_modules/@mui/utils/isMuiElement.d.ts","./node_modules/@mui/utils/ownerDocument/ownerDocument.d.ts","./node_modules/@mui/utils/ownerDocument/index.d.ts","./node_modules/@mui/utils/ownerWindow/ownerWindow.d.ts","./node_modules/@mui/utils/ownerWindow/index.d.ts","./node_modules/@mui/utils/requirePropFactory.d.ts","./node_modules/@mui/utils/setRef.d.ts","./node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.d.ts","./node_modules/@mui/utils/useEnhancedEffect/index.d.ts","./node_modules/@mui/utils/useId/useId.d.ts","./node_modules/@mui/utils/useId/index.d.ts","./node_modules/@mui/utils/unsupportedProp.d.ts","./node_modules/@mui/utils/useControlled/useControlled.d.ts","./node_modules/@mui/utils/useControlled/index.d.ts","./node_modules/@mui/utils/useEventCallback/useEventCallback.d.ts","./node_modules/@mui/utils/useEventCallback/index.d.ts","./node_modules/@mui/utils/useForkRef/useForkRef.d.ts","./node_modules/@mui/utils/useForkRef/index.d.ts","./node_modules/@mui/utils/useIsFocusVisible.d.ts","./node_modules/@mui/utils/getScrollbarSize.d.ts","./node_modules/@mui/utils/scrollLeft.d.ts","./node_modules/@mui/utils/usePreviousProps.d.ts","./node_modules/@mui/utils/getValidReactChildren.d.ts","./node_modules/@mui/utils/visuallyHidden.d.ts","./node_modules/@mui/utils/integerPropType.d.ts","./node_modules/@mui/utils/resolveProps.d.ts","./node_modules/@mui/utils/composeClasses/composeClasses.d.ts","./node_modules/@mui/utils/composeClasses/index.d.ts","./node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.d.ts","./node_modules/@mui/utils/generateUtilityClass/index.d.ts","./node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.d.ts","./node_modules/@mui/utils/generateUtilityClasses/index.d.ts","./node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.d.ts","./node_modules/@mui/utils/ClassNameGenerator/index.d.ts","./node_modules/@mui/utils/index.d.ts","./node_modules/@mui/material/utils/capitalize.d.ts","./node_modules/@mui/material/utils/createChainedFunction.d.ts","./node_modules/@mui/material/OverridableComponent.d.ts","./node_modules/@mui/material/SvgIcon/svgIconClasses.d.ts","./node_modules/@mui/material/SvgIcon/SvgIcon.d.ts","./node_modules/@mui/material/SvgIcon/index.d.ts","./node_modules/@mui/material/utils/createSvgIcon.d.ts","./node_modules/@mui/material/utils/debounce.d.ts","./node_modules/@mui/material/utils/deprecatedPropType.d.ts","./node_modules/@mui/material/utils/isMuiElement.d.ts","./node_modules/@mui/material/utils/ownerDocument.d.ts","./node_modules/@mui/material/utils/ownerWindow.d.ts","./node_modules/@mui/material/utils/requirePropFactory.d.ts","./node_modules/@mui/material/utils/setRef.d.ts","./node_modules/@mui/material/utils/useEnhancedEffect.d.ts","./node_modules/@mui/material/utils/useId.d.ts","./node_modules/@mui/material/utils/unsupportedProp.d.ts","./node_modules/@mui/material/utils/useControlled.d.ts","./node_modules/@mui/material/utils/useEventCallback.d.ts","./node_modules/@mui/material/utils/useForkRef.d.ts","./node_modules/@mui/material/utils/useIsFocusVisible.d.ts","./node_modules/@mui/base/ClassNameGenerator/index.d.ts","./node_modules/@mui/material/utils/index.d.ts","./node_modules/@types/react-transition-group/node_modules/@types/react/ts5.0/global.d.ts","./node_modules/@types/react-transition-group/node_modules/@types/react/ts5.0/index.d.ts","./node_modules/@types/react-transition-group/Transition.d.ts","./node_modules/@mui/material/transitions/transition.d.ts","./node_modules/@mui/material/Accordion/accordionClasses.d.ts","./node_modules/@mui/material/Paper/paperClasses.d.ts","./node_modules/@mui/material/Paper/Paper.d.ts","./node_modules/@mui/material/Accordion/Accordion.d.ts","./node_modules/@mui/material/Accordion/index.d.ts","./node_modules/@mui/material/AccordionActions/accordionActionsClasses.d.ts","./node_modules/@mui/material/AccordionActions/AccordionActions.d.ts","./node_modules/@mui/material/AccordionActions/index.d.ts","./node_modules/@mui/material/AccordionDetails/accordionDetailsClasses.d.ts","./node_modules/@mui/material/AccordionDetails/AccordionDetails.d.ts","./node_modules/@mui/material/AccordionDetails/index.d.ts","./node_modules/@mui/material/ButtonBase/touchRippleClasses.d.ts","./node_modules/@mui/material/ButtonBase/TouchRipple.d.ts","./node_modules/@mui/material/ButtonBase/buttonBaseClasses.d.ts","./node_modules/@mui/material/ButtonBase/ButtonBase.d.ts","./node_modules/@mui/material/ButtonBase/index.d.ts","./node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.d.ts","./node_modules/@mui/material/AccordionSummary/AccordionSummary.d.ts","./node_modules/@mui/material/AccordionSummary/index.d.ts","./node_modules/@mui/material/Paper/index.d.ts","./node_modules/@mui/material/Alert/alertClasses.d.ts","./node_modules/@mui/material/Alert/Alert.d.ts","./node_modules/@mui/material/Alert/index.d.ts","./node_modules/@mui/material/AlertTitle/alertTitleClasses.d.ts","./node_modules/@mui/material/AlertTitle/AlertTitle.d.ts","./node_modules/@mui/material/AlertTitle/index.d.ts","./node_modules/@mui/material/AppBar/appBarClasses.d.ts","./node_modules/@mui/material/AppBar/AppBar.d.ts","./node_modules/@mui/material/AppBar/index.d.ts","./node_modules/@mui/base/utils/appendOwnerState.d.ts","./node_modules/@mui/base/utils/areArraysEqual.d.ts","./node_modules/@mui/base/utils/ClassNameConfigurator.d.ts","./node_modules/@mui/base/utils/types.d.ts","./node_modules/@mui/base/utils/extractEventHandlers.d.ts","./node_modules/@mui/base/utils/isHostComponent.d.ts","./node_modules/@mui/base/utils/resolveComponentProps.d.ts","./node_modules/clsx/clsx.d.ts","./node_modules/@mui/base/utils/mergeSlotProps.d.ts","./node_modules/@mui/base/utils/useSlotProps.d.ts","./node_modules/@mui/base/utils/prepareForSlot.d.ts","./node_modules/@mui/base/utils/PolymorphicComponent.d.ts","./node_modules/@mui/base/utils/index.d.ts","./node_modules/@mui/base/Badge/Badge.types.d.ts","./node_modules/@mui/base/Badge/Badge.d.ts","./node_modules/@mui/base/Badge/badgeClasses.d.ts","./node_modules/@mui/base/Badge/index.d.ts","./node_modules/@mui/base/utils/MuiCancellableEvent.d.ts","./node_modules/@mui/base/useButton/useButton.types.d.ts","./node_modules/@mui/base/useButton/useButton.d.ts","./node_modules/@mui/base/useButton/index.d.ts","./node_modules/@mui/base/Button/Button.types.d.ts","./node_modules/@mui/base/Button/Button.d.ts","./node_modules/@mui/base/Button/buttonClasses.d.ts","./node_modules/@mui/base/Button/index.d.ts","./node_modules/@mui/base/ClickAwayListener/ClickAwayListener.d.ts","./node_modules/@mui/base/ClickAwayListener/index.d.ts","./node_modules/@mui/base/composeClasses/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","./node_modules/@mui/base/Dropdown/Dropdown.types.d.ts","./node_modules/@mui/base/Dropdown/Dropdown.d.ts","./node_modules/@mui/base/Dropdown/index.d.ts","./node_modules/@mui/base/FocusTrap/FocusTrap.types.d.ts","./node_modules/@mui/base/FocusTrap/FocusTrap.d.ts","./node_modules/@mui/base/FocusTrap/index.d.ts","./node_modules/@mui/base/FormControl/FormControl.types.d.ts","./node_modules/@mui/base/FormControl/FormControl.d.ts","./node_modules/@mui/base/FormControl/FormControlContext.d.ts","./node_modules/@mui/base/FormControl/formControlClasses.d.ts","./node_modules/@mui/base/FormControl/useFormControlContext.d.ts","./node_modules/@mui/base/FormControl/index.d.ts","./node_modules/@mui/base/useInput/useInput.types.d.ts","./node_modules/@mui/base/useInput/useInput.d.ts","./node_modules/@mui/base/useInput/index.d.ts","./node_modules/@mui/base/Input/Input.types.d.ts","./node_modules/@mui/base/Input/Input.d.ts","./node_modules/@mui/base/Input/inputClasses.d.ts","./node_modules/@mui/base/Input/index.d.ts","./node_modules/@mui/base/useList/listActions.types.d.ts","./node_modules/@mui/base/utils/useControllableReducer.types.d.ts","./node_modules/@mui/base/useList/ListContext.d.ts","./node_modules/@mui/base/useList/useList.types.d.ts","./node_modules/@mui/base/useList/useList.d.ts","./node_modules/@mui/base/useList/useListItem.types.d.ts","./node_modules/@mui/base/useList/useListItem.d.ts","./node_modules/@mui/base/useList/listReducer.d.ts","./node_modules/@mui/base/useList/index.d.ts","./node_modules/@mui/base/useMenuItem/useMenuItem.types.d.ts","./node_modules/@mui/base/useMenuItem/useMenuItem.d.ts","./node_modules/@mui/base/useMenuItem/useMenuItemContextStabilizer.d.ts","./node_modules/@mui/base/useMenuItem/index.d.ts","./node_modules/@mui/base/useCompound/useCompoundParent.d.ts","./node_modules/@mui/base/useCompound/useCompoundItem.d.ts","./node_modules/@mui/base/useCompound/index.d.ts","./node_modules/@mui/base/useMenu/MenuProvider.d.ts","./node_modules/@mui/base/useMenu/useMenu.types.d.ts","./node_modules/@mui/base/useMenu/useMenu.d.ts","./node_modules/@mui/base/useMenu/index.d.ts","./node_modules/@popperjs/core/lib/enums.d.ts","./node_modules/@popperjs/core/lib/modifiers/popperOffsets.d.ts","./node_modules/@popperjs/core/lib/modifiers/flip.d.ts","./node_modules/@popperjs/core/lib/modifiers/hide.d.ts","./node_modules/@popperjs/core/lib/modifiers/offset.d.ts","./node_modules/@popperjs/core/lib/modifiers/eventListeners.d.ts","./node_modules/@popperjs/core/lib/modifiers/computeStyles.d.ts","./node_modules/@popperjs/core/lib/modifiers/arrow.d.ts","./node_modules/@popperjs/core/lib/modifiers/preventOverflow.d.ts","./node_modules/@popperjs/core/lib/modifiers/applyStyles.d.ts","./node_modules/@popperjs/core/lib/types.d.ts","./node_modules/@popperjs/core/lib/modifiers/index.d.ts","./node_modules/@popperjs/core/lib/utils/detectOverflow.d.ts","./node_modules/@popperjs/core/lib/createPopper.d.ts","./node_modules/@popperjs/core/lib/popper-lite.d.ts","./node_modules/@popperjs/core/lib/popper.d.ts","./node_modules/@popperjs/core/lib/index.d.ts","./node_modules/@popperjs/core/index.d.ts","./node_modules/@mui/base/Portal/Portal.types.d.ts","./node_modules/@mui/base/Portal/Portal.d.ts","./node_modules/@mui/base/Portal/index.d.ts","./node_modules/@mui/base/Popper/Popper.types.d.ts","./node_modules/@mui/base/Popper/Popper.d.ts","./node_modules/@mui/base/Popper/popperClasses.d.ts","./node_modules/@mui/base/Popper/index.d.ts","./node_modules/@mui/base/Menu/Menu.types.d.ts","./node_modules/@mui/base/Menu/Menu.d.ts","./node_modules/@mui/base/Menu/menuClasses.d.ts","./node_modules/@mui/base/Menu/index.d.ts","./node_modules/@mui/base/MenuButton/MenuButton.types.d.ts","./node_modules/@mui/base/MenuButton/MenuButton.d.ts","./node_modules/@mui/base/MenuButton/menuButtonClasses.d.ts","./node_modules/@mui/base/MenuButton/index.d.ts","./node_modules/@mui/base/MenuItem/MenuItem.types.d.ts","./node_modules/@mui/base/MenuItem/MenuItem.d.ts","./node_modules/@mui/base/MenuItem/menuItemClasses.d.ts","./node_modules/@mui/base/MenuItem/index.d.ts","./node_modules/@mui/base/Modal/Modal.types.d.ts","./node_modules/@mui/base/Modal/Modal.d.ts","./node_modules/@mui/base/Modal/modalClasses.d.ts","./node_modules/@mui/base/Modal/index.d.ts","./node_modules/@mui/base/NoSsr/NoSsr.types.d.ts","./node_modules/@mui/base/NoSsr/NoSsr.d.ts","./node_modules/@mui/base/NoSsr/index.d.ts","./node_modules/@mui/base/unstable_useNumberInput/numberInputAction.types.d.ts","./node_modules/@mui/base/unstable_useNumberInput/useNumberInput.types.d.ts","./node_modules/@mui/base/Unstable_NumberInput/NumberInput.types.d.ts","./node_modules/@mui/base/Unstable_NumberInput/NumberInput.d.ts","./node_modules/@mui/base/Unstable_NumberInput/numberInputClasses.d.ts","./node_modules/@mui/base/Unstable_NumberInput/index.d.ts","./node_modules/@mui/base/OptionGroup/OptionGroup.types.d.ts","./node_modules/@mui/base/OptionGroup/OptionGroup.d.ts","./node_modules/@mui/base/OptionGroup/optionGroupClasses.d.ts","./node_modules/@mui/base/OptionGroup/index.d.ts","./node_modules/@mui/base/useOption/useOption.types.d.ts","./node_modules/@mui/base/useOption/useOption.d.ts","./node_modules/@mui/base/useOption/useOptionContextStabilizer.d.ts","./node_modules/@mui/base/useOption/index.d.ts","./node_modules/@mui/base/Option/Option.types.d.ts","./node_modules/@mui/base/Option/Option.d.ts","./node_modules/@mui/base/Option/optionClasses.d.ts","./node_modules/@mui/base/Option/index.d.ts","./node_modules/@floating-ui/utils/src/index.d.ts","./node_modules/@floating-ui/utils/src/types.d.ts","./node_modules/@floating-ui/core/src/computePosition.d.ts","./node_modules/@floating-ui/core/src/detectOverflow.d.ts","./node_modules/@floating-ui/core/src/middleware/arrow.d.ts","./node_modules/@floating-ui/core/src/middleware/autoPlacement.d.ts","./node_modules/@floating-ui/core/src/middleware/flip.d.ts","./node_modules/@floating-ui/core/src/middleware/hide.d.ts","./node_modules/@floating-ui/core/src/middleware/inline.d.ts","./node_modules/@floating-ui/core/src/middleware/offset.d.ts","./node_modules/@floating-ui/core/src/middleware/shift.d.ts","./node_modules/@floating-ui/core/src/middleware/size.d.ts","./node_modules/@floating-ui/core/src/types.d.ts","./node_modules/@floating-ui/dom/src/autoUpdate.d.ts","./node_modules/@floating-ui/dom/src/platform.d.ts","./node_modules/@floating-ui/utils/dom/src/index.d.ts","./node_modules/@floating-ui/utils/dom/src/types.d.ts","./node_modules/@floating-ui/dom/src/index.d.ts","./node_modules/@floating-ui/dom/src/types.d.ts","./node_modules/@floating-ui/react-dom/src/arrow.d.ts","./node_modules/@floating-ui/react-dom/src/useFloating.d.ts","./node_modules/@floating-ui/react-dom/src/types.d.ts","./node_modules/@mui/base/Unstable_Popup/Popup.types.d.ts","./node_modules/@mui/base/Unstable_Popup/Popup.d.ts","./node_modules/@mui/base/Unstable_Popup/popupClasses.d.ts","./node_modules/@mui/base/Unstable_Popup/index.d.ts","./node_modules/@mui/base/useSelect/SelectProvider.d.ts","./node_modules/@mui/base/useSelect/useSelect.types.d.ts","./node_modules/@mui/base/useSelect/useSelect.d.ts","./node_modules/@mui/base/useSelect/index.d.ts","./node_modules/@mui/base/Select/Select.types.d.ts","./node_modules/@mui/base/Select/Select.d.ts","./node_modules/@mui/base/Select/selectClasses.d.ts","./node_modules/@mui/base/Select/index.d.ts","./node_modules/@mui/base/useSlider/useSlider.types.d.ts","./node_modules/@mui/base/useSlider/useSlider.d.ts","./node_modules/@mui/base/useSlider/index.d.ts","./node_modules/@mui/base/Slider/Slider.types.d.ts","./node_modules/@mui/base/Slider/Slider.d.ts","./node_modules/@mui/base/Slider/sliderClasses.d.ts","./node_modules/@mui/base/Slider/index.d.ts","./node_modules/@mui/base/useSnackbar/useSnackbar.types.d.ts","./node_modules/@mui/base/useSnackbar/useSnackbar.d.ts","./node_modules/@mui/base/useSnackbar/index.d.ts","./node_modules/@mui/base/Snackbar/Snackbar.types.d.ts","./node_modules/@mui/base/Snackbar/Snackbar.d.ts","./node_modules/@mui/base/Snackbar/snackbarClasses.d.ts","./node_modules/@mui/base/Snackbar/index.d.ts","./node_modules/@mui/base/useSwitch/useSwitch.types.d.ts","./node_modules/@mui/base/useSwitch/useSwitch.d.ts","./node_modules/@mui/base/useSwitch/index.d.ts","./node_modules/@mui/base/Switch/Switch.types.d.ts","./node_modules/@mui/base/Switch/Switch.d.ts","./node_modules/@mui/base/Switch/switchClasses.d.ts","./node_modules/@mui/base/Switch/index.d.ts","./node_modules/@mui/base/TablePagination/TablePaginationActions.types.d.ts","./node_modules/@mui/base/TablePagination/TablePaginationActions.d.ts","./node_modules/@mui/base/TablePagination/common.types.d.ts","./node_modules/@mui/base/TablePagination/TablePagination.types.d.ts","./node_modules/@mui/base/TablePagination/TablePagination.d.ts","./node_modules/@mui/base/TablePagination/tablePaginationClasses.d.ts","./node_modules/@mui/base/TablePagination/index.d.ts","./node_modules/@mui/base/useTabPanel/useTabPanel.types.d.ts","./node_modules/@mui/base/useTabPanel/useTabPanel.d.ts","./node_modules/@mui/base/useTabPanel/index.d.ts","./node_modules/@mui/base/TabPanel/TabPanel.types.d.ts","./node_modules/@mui/base/TabPanel/TabPanel.d.ts","./node_modules/@mui/base/TabPanel/tabPanelClasses.d.ts","./node_modules/@mui/base/TabPanel/index.d.ts","./node_modules/@mui/base/Tabs/TabsContext.d.ts","./node_modules/@mui/base/useTabs/TabsProvider.d.ts","./node_modules/@mui/base/useTabs/useTabs.types.d.ts","./node_modules/@mui/base/useTabs/useTabs.d.ts","./node_modules/@mui/base/useTabs/index.d.ts","./node_modules/@mui/base/useTabsList/TabsListProvider.d.ts","./node_modules/@mui/base/useTabsList/useTabsList.types.d.ts","./node_modules/@mui/base/useTabsList/useTabsList.d.ts","./node_modules/@mui/base/useTabsList/index.d.ts","./node_modules/@mui/base/TabsList/TabsList.types.d.ts","./node_modules/@mui/base/TabsList/TabsList.d.ts","./node_modules/@mui/base/TabsList/tabsListClasses.d.ts","./node_modules/@mui/base/TabsList/index.d.ts","./node_modules/@mui/base/Tabs/Tabs.types.d.ts","./node_modules/@mui/base/Tabs/Tabs.d.ts","./node_modules/@mui/base/Tabs/tabsClasses.d.ts","./node_modules/@mui/base/Tabs/index.d.ts","./node_modules/@mui/base/useTab/useTab.types.d.ts","./node_modules/@mui/base/useTab/useTab.d.ts","./node_modules/@mui/base/useTab/index.d.ts","./node_modules/@mui/base/Tab/Tab.types.d.ts","./node_modules/@mui/base/Tab/Tab.d.ts","./node_modules/@mui/base/Tab/tabClasses.d.ts","./node_modules/@mui/base/Tab/index.d.ts","./node_modules/@mui/base/TextareaAutosize/TextareaAutosize.types.d.ts","./node_modules/@mui/base/TextareaAutosize/TextareaAutosize.d.ts","./node_modules/@mui/base/TextareaAutosize/index.d.ts","./node_modules/@mui/base/useAutocomplete/useAutocomplete.d.ts","./node_modules/@mui/base/useAutocomplete/index.d.ts","./node_modules/@mui/base/useBadge/useBadge.types.d.ts","./node_modules/@mui/base/useBadge/useBadge.d.ts","./node_modules/@mui/base/useBadge/index.d.ts","./node_modules/@mui/base/useDropdown/useDropdown.types.d.ts","./node_modules/@mui/base/useDropdown/DropdownContext.d.ts","./node_modules/@mui/base/useDropdown/useDropdown.d.ts","./node_modules/@mui/base/useDropdown/index.d.ts","./node_modules/@mui/base/useMenuButton/useMenuButton.types.d.ts","./node_modules/@mui/base/useMenuButton/useMenuButton.d.ts","./node_modules/@mui/base/useMenuButton/index.d.ts","./node_modules/@mui/base/unstable_useNumberInput/useNumberInput.d.ts","./node_modules/@mui/base/unstable_useNumberInput/index.d.ts","./node_modules/@mui/base/unstable_useModal/useModal.types.d.ts","./node_modules/@mui/base/unstable_useModal/useModal.d.ts","./node_modules/@mui/base/unstable_useModal/ModalManager.d.ts","./node_modules/@mui/base/unstable_useModal/index.d.ts","./node_modules/@mui/base/index.d.ts","./node_modules/@mui/material/Chip/chipClasses.d.ts","./node_modules/@mui/material/Chip/Chip.d.ts","./node_modules/@mui/material/Chip/index.d.ts","./node_modules/@mui/material/Popper/Popper.d.ts","./node_modules/@mui/material/Popper/index.d.ts","./node_modules/@mui/material/Autocomplete/autocompleteClasses.d.ts","./node_modules/@mui/material/Autocomplete/Autocomplete.d.ts","./node_modules/@mui/material/Autocomplete/index.d.ts","./node_modules/@mui/material/Avatar/avatarClasses.d.ts","./node_modules/@mui/material/Avatar/Avatar.d.ts","./node_modules/@mui/material/Avatar/index.d.ts","./node_modules/@mui/material/AvatarGroup/avatarGroupClasses.d.ts","./node_modules/@mui/material/AvatarGroup/AvatarGroup.d.ts","./node_modules/@mui/material/AvatarGroup/index.d.ts","./node_modules/@mui/material/Fade/Fade.d.ts","./node_modules/@mui/material/Fade/index.d.ts","./node_modules/@mui/material/Backdrop/backdropClasses.d.ts","./node_modules/@mui/material/Backdrop/Backdrop.d.ts","./node_modules/@mui/material/Backdrop/index.d.ts","./node_modules/@mui/material/Badge/badgeClasses.d.ts","./node_modules/@mui/material/Badge/Badge.d.ts","./node_modules/@mui/material/Badge/index.d.ts","./node_modules/@mui/material/BottomNavigation/bottomNavigationClasses.d.ts","./node_modules/@mui/material/BottomNavigation/BottomNavigation.d.ts","./node_modules/@mui/material/BottomNavigation/index.d.ts","./node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses.d.ts","./node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.d.ts","./node_modules/@mui/material/BottomNavigationAction/index.d.ts","./node_modules/@mui/material/Box/Box.d.ts","./node_modules/@mui/material/Box/boxClasses.d.ts","./node_modules/@mui/material/Box/index.d.ts","./node_modules/@mui/material/Breadcrumbs/breadcrumbsClasses.d.ts","./node_modules/@mui/material/Breadcrumbs/Breadcrumbs.d.ts","./node_modules/@mui/material/Breadcrumbs/index.d.ts","./node_modules/@mui/material/Button/buttonClasses.d.ts","./node_modules/@mui/material/Button/Button.d.ts","./node_modules/@mui/material/Button/index.d.ts","./node_modules/@mui/material/ButtonGroup/buttonGroupClasses.d.ts","./node_modules/@mui/material/ButtonGroup/ButtonGroup.d.ts","./node_modules/@mui/material/ButtonGroup/index.d.ts","./node_modules/@mui/material/Card/cardClasses.d.ts","./node_modules/@mui/material/Card/Card.d.ts","./node_modules/@mui/material/Card/index.d.ts","./node_modules/@mui/material/CardActionArea/cardActionAreaClasses.d.ts","./node_modules/@mui/material/CardActionArea/CardActionArea.d.ts","./node_modules/@mui/material/CardActionArea/index.d.ts","./node_modules/@mui/material/CardActions/cardActionsClasses.d.ts","./node_modules/@mui/material/CardActions/CardActions.d.ts","./node_modules/@mui/material/CardActions/index.d.ts","./node_modules/@mui/material/CardContent/cardContentClasses.d.ts","./node_modules/@mui/material/CardContent/CardContent.d.ts","./node_modules/@mui/material/CardContent/index.d.ts","./node_modules/@mui/material/styles/createTypography.d.ts","./node_modules/@mui/material/Typography/typographyClasses.d.ts","./node_modules/@mui/material/Typography/Typography.d.ts","./node_modules/@mui/material/Typography/index.d.ts","./node_modules/@mui/material/CardHeader/cardHeaderClasses.d.ts","./node_modules/@mui/material/CardHeader/CardHeader.d.ts","./node_modules/@mui/material/CardHeader/index.d.ts","./node_modules/@mui/material/CardMedia/cardMediaClasses.d.ts","./node_modules/@mui/material/CardMedia/CardMedia.d.ts","./node_modules/@mui/material/CardMedia/index.d.ts","./node_modules/@mui/material/internal/switchBaseClasses.d.ts","./node_modules/@mui/material/internal/SwitchBase.d.ts","./node_modules/@mui/material/Checkbox/checkboxClasses.d.ts","./node_modules/@mui/material/Checkbox/Checkbox.d.ts","./node_modules/@mui/material/Checkbox/index.d.ts","./node_modules/@mui/material/CircularProgress/circularProgressClasses.d.ts","./node_modules/@mui/material/CircularProgress/CircularProgress.d.ts","./node_modules/@mui/material/CircularProgress/index.d.ts","./node_modules/@mui/material/ClickAwayListener/index.d.ts","./node_modules/@mui/material/Collapse/collapseClasses.d.ts","./node_modules/@mui/material/Collapse/Collapse.d.ts","./node_modules/@mui/material/Collapse/index.d.ts","./node_modules/@mui/material/Container/containerClasses.d.ts","./node_modules/@mui/material/Container/Container.d.ts","./node_modules/@mui/material/Container/index.d.ts","./node_modules/@mui/material/CssBaseline/CssBaseline.d.ts","./node_modules/@mui/material/CssBaseline/index.d.ts","./node_modules/@mui/material/darkScrollbar/index.d.ts","./node_modules/@mui/material/Portal/index.d.ts","./node_modules/@mui/material/Modal/modalClasses.d.ts","./node_modules/@mui/material/Modal/Modal.d.ts","./node_modules/@mui/material/Modal/index.d.ts","./node_modules/@mui/material/Dialog/dialogClasses.d.ts","./node_modules/@mui/material/Dialog/Dialog.d.ts","./node_modules/@mui/material/Dialog/index.d.ts","./node_modules/@mui/material/DialogActions/dialogActionsClasses.d.ts","./node_modules/@mui/material/DialogActions/DialogActions.d.ts","./node_modules/@mui/material/DialogActions/index.d.ts","./node_modules/@mui/material/DialogContent/dialogContentClasses.d.ts","./node_modules/@mui/material/DialogContent/DialogContent.d.ts","./node_modules/@mui/material/DialogContent/index.d.ts","./node_modules/@mui/material/DialogContentText/dialogContentTextClasses.d.ts","./node_modules/@mui/material/DialogContentText/DialogContentText.d.ts","./node_modules/@mui/material/DialogContentText/index.d.ts","./node_modules/@mui/material/DialogTitle/dialogTitleClasses.d.ts","./node_modules/@mui/material/DialogTitle/DialogTitle.d.ts","./node_modules/@mui/material/DialogTitle/index.d.ts","./node_modules/@mui/material/Divider/dividerClasses.d.ts","./node_modules/@mui/material/Divider/Divider.d.ts","./node_modules/@mui/material/Divider/index.d.ts","./node_modules/@mui/material/Slide/Slide.d.ts","./node_modules/@mui/material/Slide/index.d.ts","./node_modules/@mui/material/Drawer/drawerClasses.d.ts","./node_modules/@mui/material/Drawer/Drawer.d.ts","./node_modules/@mui/material/Drawer/index.d.ts","./node_modules/@mui/material/Fab/fabClasses.d.ts","./node_modules/@mui/material/Fab/Fab.d.ts","./node_modules/@mui/material/Fab/index.d.ts","./node_modules/@mui/material/InputBase/inputBaseClasses.d.ts","./node_modules/@mui/material/InputBase/InputBase.d.ts","./node_modules/@mui/material/InputBase/index.d.ts","./node_modules/@mui/material/FilledInput/filledInputClasses.d.ts","./node_modules/@mui/material/FilledInput/FilledInput.d.ts","./node_modules/@mui/material/FilledInput/index.d.ts","./node_modules/@mui/material/FormControl/formControlClasses.d.ts","./node_modules/@mui/material/FormControl/FormControl.d.ts","./node_modules/@mui/material/FormControl/FormControlContext.d.ts","./node_modules/@mui/material/FormControl/useFormControl.d.ts","./node_modules/@mui/material/FormControl/index.d.ts","./node_modules/@mui/material/FormControlLabel/formControlLabelClasses.d.ts","./node_modules/@mui/material/FormControlLabel/FormControlLabel.d.ts","./node_modules/@mui/material/FormControlLabel/index.d.ts","./node_modules/@mui/material/FormGroup/formGroupClasses.d.ts","./node_modules/@mui/material/FormGroup/FormGroup.d.ts","./node_modules/@mui/material/FormGroup/index.d.ts","./node_modules/@mui/material/FormHelperText/formHelperTextClasses.d.ts","./node_modules/@mui/material/FormHelperText/FormHelperText.d.ts","./node_modules/@mui/material/FormHelperText/index.d.ts","./node_modules/@mui/material/FormLabel/formLabelClasses.d.ts","./node_modules/@mui/material/FormLabel/FormLabel.d.ts","./node_modules/@mui/material/FormLabel/index.d.ts","./node_modules/@mui/material/Unstable_Grid2/Grid2Props.d.ts","./node_modules/@mui/material/Unstable_Grid2/Grid2.d.ts","./node_modules/@mui/material/Unstable_Grid2/grid2Classes.d.ts","./node_modules/@mui/material/Unstable_Grid2/index.d.ts","./node_modules/@mui/material/Grow/Grow.d.ts","./node_modules/@mui/material/Grow/index.d.ts","./node_modules/@mui/material/Hidden/Hidden.d.ts","./node_modules/@mui/material/Hidden/index.d.ts","./node_modules/@mui/material/Icon/iconClasses.d.ts","./node_modules/@mui/material/Icon/Icon.d.ts","./node_modules/@mui/material/Icon/index.d.ts","./node_modules/@mui/material/IconButton/iconButtonClasses.d.ts","./node_modules/@mui/material/IconButton/IconButton.d.ts","./node_modules/@mui/material/IconButton/index.d.ts","./node_modules/@mui/material/ImageList/imageListClasses.d.ts","./node_modules/@mui/material/ImageList/ImageList.d.ts","./node_modules/@mui/material/ImageList/index.d.ts","./node_modules/@mui/material/ImageListItem/imageListItemClasses.d.ts","./node_modules/@mui/material/ImageListItem/ImageListItem.d.ts","./node_modules/@mui/material/ImageListItem/index.d.ts","./node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses.d.ts","./node_modules/@mui/material/ImageListItemBar/ImageListItemBar.d.ts","./node_modules/@mui/material/ImageListItemBar/index.d.ts","./node_modules/@mui/material/Input/inputClasses.d.ts","./node_modules/@mui/material/Input/Input.d.ts","./node_modules/@mui/material/Input/index.d.ts","./node_modules/@mui/material/InputAdornment/inputAdornmentClasses.d.ts","./node_modules/@mui/material/InputAdornment/InputAdornment.d.ts","./node_modules/@mui/material/InputAdornment/index.d.ts","./node_modules/@mui/material/InputLabel/inputLabelClasses.d.ts","./node_modules/@mui/material/InputLabel/InputLabel.d.ts","./node_modules/@mui/material/InputLabel/index.d.ts","./node_modules/@mui/material/LinearProgress/linearProgressClasses.d.ts","./node_modules/@mui/material/LinearProgress/LinearProgress.d.ts","./node_modules/@mui/material/LinearProgress/index.d.ts","./node_modules/@mui/material/Link/linkClasses.d.ts","./node_modules/@mui/material/Link/Link.d.ts","./node_modules/@mui/material/Link/index.d.ts","./node_modules/@mui/material/List/listClasses.d.ts","./node_modules/@mui/material/List/List.d.ts","./node_modules/@mui/material/List/index.d.ts","./node_modules/@mui/material/ListItem/listItemClasses.d.ts","./node_modules/@mui/material/ListItem/ListItem.d.ts","./node_modules/@mui/material/ListItem/index.d.ts","./node_modules/@mui/material/ListItemAvatar/listItemAvatarClasses.d.ts","./node_modules/@mui/material/ListItemAvatar/ListItemAvatar.d.ts","./node_modules/@mui/material/ListItemAvatar/index.d.ts","./node_modules/@mui/material/ListItemButton/listItemButtonClasses.d.ts","./node_modules/@mui/material/ListItemButton/ListItemButton.d.ts","./node_modules/@mui/material/ListItemButton/index.d.ts","./node_modules/@mui/material/ListItemIcon/listItemIconClasses.d.ts","./node_modules/@mui/material/ListItemIcon/ListItemIcon.d.ts","./node_modules/@mui/material/ListItemIcon/index.d.ts","./node_modules/@mui/material/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts","./node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction.d.ts","./node_modules/@mui/material/ListItemSecondaryAction/index.d.ts","./node_modules/@mui/material/ListItemText/listItemTextClasses.d.ts","./node_modules/@mui/material/ListItemText/ListItemText.d.ts","./node_modules/@mui/material/ListItemText/index.d.ts","./node_modules/@mui/material/ListSubheader/listSubheaderClasses.d.ts","./node_modules/@mui/material/ListSubheader/ListSubheader.d.ts","./node_modules/@mui/material/ListSubheader/index.d.ts","./node_modules/@mui/material/Popover/popoverClasses.d.ts","./node_modules/@mui/material/Popover/Popover.d.ts","./node_modules/@mui/material/Popover/index.d.ts","./node_modules/@mui/material/MenuList/MenuList.d.ts","./node_modules/@mui/material/MenuList/index.d.ts","./node_modules/@mui/material/Menu/menuClasses.d.ts","./node_modules/@mui/material/Menu/Menu.d.ts","./node_modules/@mui/material/Menu/index.d.ts","./node_modules/@mui/material/MenuItem/menuItemClasses.d.ts","./node_modules/@mui/material/MenuItem/MenuItem.d.ts","./node_modules/@mui/material/MenuItem/index.d.ts","./node_modules/@mui/material/MobileStepper/mobileStepperClasses.d.ts","./node_modules/@mui/material/MobileStepper/MobileStepper.d.ts","./node_modules/@mui/material/MobileStepper/index.d.ts","./node_modules/@mui/material/NativeSelect/NativeSelectInput.d.ts","./node_modules/@mui/material/NativeSelect/nativeSelectClasses.d.ts","./node_modules/@mui/material/NativeSelect/NativeSelect.d.ts","./node_modules/@mui/material/NativeSelect/index.d.ts","./node_modules/@mui/material/NoSsr/index.d.ts","./node_modules/@mui/material/OutlinedInput/outlinedInputClasses.d.ts","./node_modules/@mui/material/OutlinedInput/OutlinedInput.d.ts","./node_modules/@mui/material/OutlinedInput/index.d.ts","./node_modules/@mui/material/usePagination/usePagination.d.ts","./node_modules/@mui/material/Pagination/paginationClasses.d.ts","./node_modules/@mui/material/Pagination/Pagination.d.ts","./node_modules/@mui/material/Pagination/index.d.ts","./node_modules/@mui/material/PaginationItem/paginationItemClasses.d.ts","./node_modules/@mui/material/PaginationItem/PaginationItem.d.ts","./node_modules/@mui/material/PaginationItem/index.d.ts","./node_modules/@mui/material/Radio/radioClasses.d.ts","./node_modules/@mui/material/Radio/Radio.d.ts","./node_modules/@mui/material/Radio/index.d.ts","./node_modules/@mui/material/RadioGroup/RadioGroup.d.ts","./node_modules/@mui/material/RadioGroup/RadioGroupContext.d.ts","./node_modules/@mui/material/RadioGroup/useRadioGroup.d.ts","./node_modules/@mui/material/RadioGroup/index.d.ts","./node_modules/@mui/material/Rating/ratingClasses.d.ts","./node_modules/@mui/material/Rating/Rating.d.ts","./node_modules/@mui/material/Rating/index.d.ts","./node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses.d.ts","./node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline.d.ts","./node_modules/@mui/material/ScopedCssBaseline/index.d.ts","./node_modules/@mui/material/Select/SelectInput.d.ts","./node_modules/@mui/material/Select/selectClasses.d.ts","./node_modules/@mui/material/Select/Select.d.ts","./node_modules/@mui/material/Select/index.d.ts","./node_modules/@mui/material/Skeleton/skeletonClasses.d.ts","./node_modules/@mui/material/Skeleton/Skeleton.d.ts","./node_modules/@mui/material/Skeleton/index.d.ts","./node_modules/@mui/material/Slider/SliderValueLabel.types.d.ts","./node_modules/@mui/material/Slider/SliderValueLabel.d.ts","./node_modules/@mui/material/Slider/sliderClasses.d.ts","./node_modules/@mui/material/Slider/Slider.d.ts","./node_modules/@mui/material/Slider/index.d.ts","./node_modules/@mui/material/SnackbarContent/snackbarContentClasses.d.ts","./node_modules/@mui/material/SnackbarContent/SnackbarContent.d.ts","./node_modules/@mui/material/SnackbarContent/index.d.ts","./node_modules/@mui/material/Snackbar/snackbarClasses.d.ts","./node_modules/@mui/material/Snackbar/Snackbar.d.ts","./node_modules/@mui/material/Snackbar/index.d.ts","./node_modules/@mui/material/transitions/index.d.ts","./node_modules/@mui/material/SpeedDial/speedDialClasses.d.ts","./node_modules/@mui/material/SpeedDial/SpeedDial.d.ts","./node_modules/@mui/material/SpeedDial/index.d.ts","./node_modules/@mui/material/Tooltip/tooltipClasses.d.ts","./node_modules/@mui/material/Tooltip/Tooltip.d.ts","./node_modules/@mui/material/Tooltip/index.d.ts","./node_modules/@mui/material/SpeedDialAction/speedDialActionClasses.d.ts","./node_modules/@mui/material/SpeedDialAction/SpeedDialAction.d.ts","./node_modules/@mui/material/SpeedDialAction/index.d.ts","./node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses.d.ts","./node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon.d.ts","./node_modules/@mui/material/SpeedDialIcon/index.d.ts","./node_modules/@mui/material/Stack/Stack.d.ts","./node_modules/@mui/material/Stack/stackClasses.d.ts","./node_modules/@mui/material/Stack/index.d.ts","./node_modules/@mui/material/Step/stepClasses.d.ts","./node_modules/@mui/material/Step/Step.d.ts","./node_modules/@mui/material/Step/StepContext.d.ts","./node_modules/@mui/material/Step/index.d.ts","./node_modules/@mui/material/StepButton/stepButtonClasses.d.ts","./node_modules/@mui/material/StepButton/StepButton.d.ts","./node_modules/@mui/material/StepButton/index.d.ts","./node_modules/@mui/material/StepConnector/stepConnectorClasses.d.ts","./node_modules/@mui/material/StepConnector/StepConnector.d.ts","./node_modules/@mui/material/StepConnector/index.d.ts","./node_modules/@mui/material/StepContent/stepContentClasses.d.ts","./node_modules/@mui/material/StepContent/StepContent.d.ts","./node_modules/@mui/material/StepContent/index.d.ts","./node_modules/@mui/material/StepIcon/stepIconClasses.d.ts","./node_modules/@mui/material/StepIcon/StepIcon.d.ts","./node_modules/@mui/material/StepIcon/index.d.ts","./node_modules/@mui/material/StepLabel/stepLabelClasses.d.ts","./node_modules/@mui/material/StepLabel/StepLabel.d.ts","./node_modules/@mui/material/StepLabel/index.d.ts","./node_modules/@mui/material/Stepper/stepperClasses.d.ts","./node_modules/@mui/material/Stepper/Stepper.d.ts","./node_modules/@mui/material/Stepper/StepperContext.d.ts","./node_modules/@mui/material/Stepper/index.d.ts","./node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.d.ts","./node_modules/@mui/material/SwipeableDrawer/index.d.ts","./node_modules/@mui/material/Switch/switchClasses.d.ts","./node_modules/@mui/material/Switch/Switch.d.ts","./node_modules/@mui/material/Switch/index.d.ts","./node_modules/@mui/material/Tab/tabClasses.d.ts","./node_modules/@mui/material/Tab/Tab.d.ts","./node_modules/@mui/material/Tab/index.d.ts","./node_modules/@mui/material/Table/tableClasses.d.ts","./node_modules/@mui/material/Table/Table.d.ts","./node_modules/@mui/material/Table/index.d.ts","./node_modules/@mui/material/TableBody/tableBodyClasses.d.ts","./node_modules/@mui/material/TableBody/TableBody.d.ts","./node_modules/@mui/material/TableBody/index.d.ts","./node_modules/@mui/material/TableCell/tableCellClasses.d.ts","./node_modules/@mui/material/TableCell/TableCell.d.ts","./node_modules/@mui/material/TableCell/index.d.ts","./node_modules/@mui/material/TableContainer/tableContainerClasses.d.ts","./node_modules/@mui/material/TableContainer/TableContainer.d.ts","./node_modules/@mui/material/TableContainer/index.d.ts","./node_modules/@mui/material/TableFooter/tableFooterClasses.d.ts","./node_modules/@mui/material/TableFooter/TableFooter.d.ts","./node_modules/@mui/material/TableFooter/index.d.ts","./node_modules/@mui/material/TableHead/tableHeadClasses.d.ts","./node_modules/@mui/material/TableHead/TableHead.d.ts","./node_modules/@mui/material/TableHead/index.d.ts","./node_modules/@mui/material/TablePagination/TablePaginationActions.d.ts","./node_modules/@mui/material/TablePagination/tablePaginationClasses.d.ts","./node_modules/@mui/material/TablePagination/TablePagination.d.ts","./node_modules/@mui/material/TablePagination/index.d.ts","./node_modules/@mui/material/TableRow/tableRowClasses.d.ts","./node_modules/@mui/material/TableRow/TableRow.d.ts","./node_modules/@mui/material/TableRow/index.d.ts","./node_modules/@mui/material/TableSortLabel/tableSortLabelClasses.d.ts","./node_modules/@mui/material/TableSortLabel/TableSortLabel.d.ts","./node_modules/@mui/material/TableSortLabel/index.d.ts","./node_modules/@mui/material/TabScrollButton/tabScrollButtonClasses.d.ts","./node_modules/@mui/material/TabScrollButton/TabScrollButton.d.ts","./node_modules/@mui/material/TabScrollButton/index.d.ts","./node_modules/@mui/material/Tabs/tabsClasses.d.ts","./node_modules/@mui/material/Tabs/Tabs.d.ts","./node_modules/@mui/material/Tabs/index.d.ts","./node_modules/@mui/material/TextField/textFieldClasses.d.ts","./node_modules/@mui/material/TextField/TextField.d.ts","./node_modules/@mui/material/TextField/index.d.ts","./node_modules/@mui/material/TextareaAutosize/index.d.ts","./node_modules/@mui/material/ToggleButton/toggleButtonClasses.d.ts","./node_modules/@mui/material/ToggleButton/ToggleButton.d.ts","./node_modules/@mui/material/ToggleButton/index.d.ts","./node_modules/@mui/material/ToggleButtonGroup/toggleButtonGroupClasses.d.ts","./node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup.d.ts","./node_modules/@mui/material/ToggleButtonGroup/index.d.ts","./node_modules/@mui/material/Toolbar/toolbarClasses.d.ts","./node_modules/@mui/material/Toolbar/Toolbar.d.ts","./node_modules/@mui/material/Toolbar/index.d.ts","./node_modules/@mui/material/useMediaQuery/useMediaQuery.d.ts","./node_modules/@mui/material/useMediaQuery/index.d.ts","./node_modules/@mui/material/useScrollTrigger/useScrollTrigger.d.ts","./node_modules/@mui/material/useScrollTrigger/index.d.ts","./node_modules/@mui/material/Zoom/Zoom.d.ts","./node_modules/@mui/material/Zoom/index.d.ts","./node_modules/@mui/material/useAutocomplete/useAutocomplete.d.ts","./node_modules/@mui/material/useAutocomplete/index.d.ts","./node_modules/@mui/material/GlobalStyles/GlobalStyles.d.ts","./node_modules/@mui/material/GlobalStyles/index.d.ts","./node_modules/@mui/material/generateUtilityClass/index.d.ts","./node_modules/@mui/material/generateUtilityClasses/index.d.ts","./node_modules/@mui/material/Unstable_TrapFocus/index.d.ts","./node_modules/@mui/material/index.d.ts","./node_modules/@mui/material/styles/createPalette.d.ts","./node_modules/@mui/material/styles/shadows.d.ts","./node_modules/@mui/material/styles/createTransitions.d.ts","./node_modules/@mui/material/styles/zIndex.d.ts","./node_modules/@mui/material/styles/props.d.ts","./node_modules/@mui/material/styles/overrides.d.ts","./node_modules/@mui/material/styles/variants.d.ts","./node_modules/@mui/material/styles/components.d.ts","./node_modules/@mui/material/styles/createTheme.d.ts","./node_modules/@mui/material/styles/adaptV4Theme.d.ts","./node_modules/@mui/material/styles/createStyles.d.ts","./node_modules/@mui/material/styles/responsiveFontSizes.d.ts","./node_modules/@mui/material/styles/useTheme.d.ts","./node_modules/@mui/material/styles/useThemeProps.d.ts","./node_modules/@mui/material/styles/styled.d.ts","./node_modules/@mui/material/styles/ThemeProvider.d.ts","./node_modules/@mui/material/styles/cssUtils.d.ts","./node_modules/@mui/material/styles/makeStyles.d.ts","./node_modules/@mui/material/styles/withStyles.d.ts","./node_modules/@mui/material/styles/withTheme.d.ts","./node_modules/@mui/material/styles/experimental_extendTheme.d.ts","./node_modules/@mui/material/styles/CssVarsProvider.d.ts","./node_modules/@mui/material/styles/getOverlayAlpha.d.ts","./node_modules/@mui/material/styles/shouldSkipGeneratingVar.d.ts","./node_modules/@mui/material/styles/excludeVariablesFromRoot.d.ts","./node_modules/@mui/material/styles/index.d.ts","./node_modules/@mui/material/Grid/gridClasses.d.ts","./node_modules/@mui/material/Grid/Grid.d.ts","./node_modules/@mui/material/Grid/index.d.ts","./node_modules/axios/index.d.ts","./src/crypto-material/crypto-material.json","./src/api-calls/common.tsx","./src/api-calls/fabric-api.tsx","./src/components/dialogs/MintDialog.tsx","./src/api-calls/besu-api.tsx","./src/components/dialogs/TransferDialog.tsx","./node_modules/@types/uuid/index.d.ts","./src/components/dialogs/EscrowDialog.tsx","./src/models/AssetReference.tsx","./src/components/dialogs/BridgeOutDialog.tsx","./src/components/dialogs/BridgeBackDialog.tsx","./src/components/ActionsContainer.tsx","./src/components/AssetReferencesTable.tsx","./src/components/Ledger.tsx","./src/components/dialogs/ConnectionErrorDialog.tsx","./src/pages/HomePage.tsx","./src/App.tsx","./node_modules/@types/react-dom/node_modules/@types/react/ts5.0/index.d.ts","./node_modules/@types/react-dom/client.d.ts","./src/index.tsx","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts","./node_modules/@types/react-dom/index.d.ts","./node_modules/react-scripts/lib/react-app.d.ts","./src/react-app-env.d.ts","../../node_modules/@types/adm-zip/util.d.ts","../../node_modules/@types/adm-zip/index.d.ts","../../node_modules/@types/babel__generator/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/parser/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/http-cache-semantics/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@jest/schemas/build/index.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/node-fetch/node_modules/form-data/index.d.ts","../../node_modules/@types/node-fetch/externals.d.ts","../../node_modules/@types/node-fetch/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/scheduler/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/through/index.d.ts","../../node_modules/@types/tape/index.d.ts","../../node_modules/@types/tape-promise/node_modules/@types/tape/index.d.ts","../../node_modules/@types/tape-promise/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../node_modules/@types/yoga-layout/index.d.ts","../../typings/async-exit-hook/index.d.ts","../../typings/convict-format-with-validator/index.d.ts","../../typings/es-main/index.d.ts","../../typings/is-port-reachable/index.d.ts","../../node_modules/web3-types/lib/commonjs/error_types.d.ts","../../node_modules/web3-types/lib/commonjs/primitives_types.d.ts","../../node_modules/web3-types/lib/commonjs/eth_types.d.ts","../../node_modules/web3-types/lib/commonjs/apis/eth_execution_api.d.ts","../../node_modules/web3-types/lib/commonjs/apis/web3_eth_execution_api.d.ts","../../node_modules/web3-types/lib/commonjs/apis/web3_net_api.d.ts","../../node_modules/web3-types/lib/commonjs/apis/eth_personal_api.d.ts","../../node_modules/web3-types/lib/commonjs/data_format_types.d.ts","../../node_modules/web3-types/lib/commonjs/utility_types.d.ts","../../node_modules/web3-types/lib/commonjs/eth_abi_types.d.ts","../../node_modules/web3-types/lib/commonjs/json_rpc_types.d.ts","../../node_modules/web3-types/lib/commonjs/web3_api_types.d.ts","../../node_modules/web3-types/lib/commonjs/web3_deferred_promise_type.d.ts","../../node_modules/web3-types/lib/commonjs/web3_base_provider.d.ts","../../node_modules/web3-types/lib/commonjs/eth_contract_types.d.ts","../../node_modules/web3-types/lib/commonjs/web3_base_wallet.d.ts","../../node_modules/web3-types/lib/commonjs/index.d.ts","../../node_modules/web3-core/lib/commonjs/types.d.ts","../../node_modules/web3-core/lib/commonjs/web3_event_emitter.d.ts","../../node_modules/web3-core/lib/commonjs/web3_request_manager.d.ts","../../node_modules/web3-core/lib/commonjs/web3_subscription_manager.d.ts","../../node_modules/web3-core/lib/commonjs/web3_subscriptions.d.ts","../../node_modules/web3-utils/lib/commonjs/converters.d.ts","../../node_modules/zod/lib/helpers/typeAliases.d.ts","../../node_modules/zod/lib/helpers/util.d.ts","../../node_modules/zod/lib/ZodError.d.ts","../../node_modules/zod/lib/locales/en.d.ts","../../node_modules/zod/lib/errors.d.ts","../../node_modules/zod/lib/helpers/parseUtil.d.ts","../../node_modules/zod/lib/helpers/enumUtil.d.ts","../../node_modules/zod/lib/helpers/errorUtil.d.ts","../../node_modules/zod/lib/helpers/partialUtil.d.ts","../../node_modules/zod/lib/types.d.ts","../../node_modules/zod/lib/external.d.ts","../../node_modules/zod/lib/index.d.ts","../../node_modules/zod/index.d.ts","../../node_modules/web3-validator/lib/commonjs/types.d.ts","../../node_modules/web3-validator/lib/commonjs/web3_validator.d.ts","../../node_modules/web3-validator/lib/commonjs/default_validator.d.ts","../../node_modules/web3-validator/lib/commonjs/utils.d.ts","../../node_modules/web3-errors/lib/commonjs/error_codes.d.ts","../../node_modules/web3-errors/lib/commonjs/web3_error_base.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/account_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/connection_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/contract_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/ens_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/generic_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/provider_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/signature_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/transaction_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/utils_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/response_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/core_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/rpc_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/rpc_error_messages.d.ts","../../node_modules/web3-errors/lib/commonjs/index.d.ts","../../node_modules/web3-validator/lib/commonjs/errors.d.ts","../../node_modules/web3-validator/lib/commonjs/constants.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/address.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/block.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/bloom.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/boolean.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/bytes.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/eth.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/filter.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/numbers.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/string.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/topic.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/object.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/index.d.ts","../../node_modules/web3-validator/lib/commonjs/index.d.ts","../../node_modules/web3-utils/lib/commonjs/validation.d.ts","../../node_modules/web3-utils/lib/commonjs/formatter.d.ts","../../node_modules/web3-utils/lib/commonjs/hash.d.ts","../../node_modules/web3-utils/lib/commonjs/random.d.ts","../../node_modules/web3-utils/lib/commonjs/string_manipulation.d.ts","../../node_modules/web3-utils/lib/commonjs/objects.d.ts","../../node_modules/web3-utils/lib/commonjs/promise_helpers.d.ts","../../node_modules/web3-utils/lib/commonjs/json_rpc.d.ts","../../node_modules/web3-utils/lib/commonjs/web3_deferred_promise.d.ts","../../node_modules/web3-utils/lib/commonjs/chunk_response_parser.d.ts","../../node_modules/web3-utils/lib/commonjs/uuid.d.ts","../../node_modules/web3-utils/lib/commonjs/web3_eip1193_provider.d.ts","../../node_modules/web3-utils/lib/commonjs/socket_provider.d.ts","../../node_modules/web3-utils/lib/commonjs/uint8array.d.ts","../../node_modules/web3-utils/lib/commonjs/index.d.ts","../../node_modules/web3-core/lib/commonjs/web3_batch_request.d.ts","../../node_modules/web3-core/lib/commonjs/web3_context.d.ts","../../node_modules/web3-core/lib/commonjs/web3_config.d.ts","../../node_modules/web3-core/lib/commonjs/utils.d.ts","../../node_modules/web3-core/lib/commonjs/formatters.d.ts","../../node_modules/web3-core/lib/commonjs/web3_promi_event.d.ts","../../node_modules/web3-core/lib/commonjs/index.d.ts","../../node_modules/web3-eth/lib/commonjs/types.d.ts","../../node_modules/web3-eth/lib/commonjs/web3_subscriptions.d.ts","../../node_modules/web3-eth/lib/commonjs/web3_eth.d.ts","../../node_modules/web3-eth/lib/commonjs/schemas.d.ts","../../node_modules/web3-eth/lib/commonjs/validation.d.ts","../../node_modules/web3-eth/lib/commonjs/rpc_method_wrappers.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/format_transaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/enums.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/types.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/common.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/address.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/types.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/utils.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/index.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/baseTransaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/eip1559Transaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/eip2930Transaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/legacyTransaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/transactionFactory.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/index.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/types.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/wallet.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/account.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/schemas.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/index.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/prepare_transaction_for_signing.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/detect_transaction_type.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/transaction_builder.d.ts","../../node_modules/web3-eth/lib/commonjs/index.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/config.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/types.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/log_subscription.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/contract.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/encoding.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/index.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/abi/ens/PublicResolver.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/ens.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/index.d.ts","../../node_modules/web3-eth-iban/lib/commonjs/types.d.ts","../../node_modules/web3-eth-iban/lib/commonjs/iban.d.ts","../../node_modules/web3-eth-iban/lib/commonjs/index.d.ts","../../node_modules/web3-eth-personal/lib/commonjs/personal.d.ts","../../node_modules/web3-eth-personal/lib/commonjs/index.d.ts","../../node_modules/web3-net/lib/commonjs/net.d.ts","../../node_modules/web3-net/lib/commonjs/rpc_method_wrappers.d.ts","../../node_modules/web3-net/lib/commonjs/index.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/errors_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/events_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/functions_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/logs_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/parameters_api.d.ts","../../node_modules/@ethersproject/bytes/lib/index.d.ts","../../node_modules/@ethersproject/bignumber/lib/bignumber.d.ts","../../node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts","../../node_modules/@ethersproject/bignumber/lib/index.d.ts","../../node_modules/@ethersproject/abi/lib/fragments.d.ts","../../node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts","../../node_modules/@ethersproject/abi/lib/abi-coder.d.ts","../../node_modules/@ethersproject/properties/lib/index.d.ts","../../node_modules/@ethersproject/abi/lib/interface.d.ts","../../node_modules/@ethersproject/abi/lib/index.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/utils.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/decode_contract_error_data.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/eip_712.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/index.d.ts","../../node_modules/web3/lib/commonjs/types.d.ts","../../node_modules/web3/lib/commonjs/web3.d.ts","../../node_modules/web3-providers-http/lib/commonjs/types.d.ts","../../node_modules/web3-providers-http/lib/commonjs/index.d.ts","../../node_modules/isomorphic-ws/index.d.ts","../../node_modules/web3-providers-ws/lib/commonjs/index.d.ts","../../node_modules/web3/lib/commonjs/eth.exports.d.ts","../../node_modules/web3/lib/commonjs/providers.exports.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","../../node_modules/web3-types/src/primitives_types.ts","../../node_modules/web3-types/src/eth_types.ts","../../node_modules/web3-rpc-methods/lib/commonjs/eth_rpc_methods.d.ts","../../node_modules/web3-rpc-methods/lib/commonjs/net_rpc_methods.d.ts","../../node_modules/web3-rpc-methods/lib/commonjs/personal_rpc_methods.d.ts","../../node_modules/web3-rpc-methods/lib/commonjs/index.d.ts","../../node_modules/web3/lib/commonjs/index.d.ts","../../node_modules/buffer/index.d.ts","../../typings/web3js-quorum/index.d.ts","./node_modules/@types/react-dom/node_modules/@types/react/ts5.0/global.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"0bd5e7096c7bc02bf70b2cc017fc45ef489cb19bd2f32a71af39ff5787f1b56a","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1cd0c5f52256a99ffee5c9f9f964100bc2cb34372801588b76032a4caf85edd2","affectsGlobalScope":true},"097be2e0b1fe3b3fbb093259f6043fdf59c88f9db681c39ce90f76c5f038ca8a","f1cbfb4a882d5292086a912bc20cc69eef140ab0eb583c7e5dc9a3333393000a","4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","531cd80e4dba2620d86844a50e7d21b89436e56a14e66d6774e99b3759ac69ad","c83a76ad0bf69b0176042adfc65f8c6be7dd1141b66cfa20954520315dcf2c1a","af99fcbddd1d45ac4b1ab3d21ef6665c3a4c78003f3dcf2855f406e0d41f5545","cd805bb241b70dcb5eb3ddf78a23c561c81528a0e4baeb10ccfb967705c9132b","83e56d3337e1a6dbafdbe5a2502a84c330b1a328ed2860d689b2ded82b1f5c95","f186de91b1c50640e4d2bef41307ee06446d7ec76f787d4384ef808981025546","4886055af73784b27ea115b68763c1c0c30df8528ba50e7d1d3e0922c6e7d8e3","e0407a1b8afc9b03d6b3063a3c8a80f4c769146bbd39fccd5ade9df5c4ffb703","ae1d409a961b46f0b0c2b1dbb51ddf298e161698b7ebc3360dbae8cd6837f06e","cc051639247f18781cd39ae70ae4606902fb5e7ea104c1b2a4927af5cfd05693","40a5bb1733bb8fb3ffa425b92db062334f9b998ba8ad4390cc8008cc2ce701ed","0cc48e862938eccfe92ba6c7daaf5fa144bbc60ed8d547c33dadeff1ab788cd5","9e7c4846057815d55e1eaf27214286ec0768a1b463a4669e1ce37849b6cc1016","cb5945305653cc61b0b16a840c8ad2bd6006450a2f91012b3974cc413214a139","1f4ae6e7f749aa9a53317baa0e26dc98317f87c54a323250f0aa6d8689fcb5ac","1bfd2c00081dd582489d1d0dd64d270b9c8bc5a62cc9882865b405bf8c2d9b03","8ec030fc57edbbd19ad4752695ef72f7e68747092a66476422e04f9a9dffeef3","4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","8ea05ab5a1250aa9d98070151c3981a85f5fd05185454f6c871ca2a988feb725","0e1f5fa05f1097f2cc3a1581afc7270af08d31be123f3a8e92a5b4080858861e","655638506266d44bc4815f7fda912d712114e200aa11ce4dee055d357dba96c5","4df00cb9ba2bc813c1c5fb996d0282133346b3d320c2b8e6e77c5b8f426182b8","03fd06fcc894c94effaef2fc57d92c9e2871c6a5adb2db7136859a6ceff3f91a","f9a7c89ccff78b8a80e7caa18cda3ddf3718a26a3640dd50b299d90ac405f9be","9c78ad8f4f43db74529e2f40798ca4a8f9a2b09cad5363c400aa7ce691691ad8","4680182e054eef3b7eca5d9168a70191033b4da65cf8d013a6ced7ff6948bc80","f2e258dede3b70e146e3ea257edb8e3a4c59ad9ac5061a60154f5998d55b031b","3bd6ffa4f64fbbc031c1503c3ce63fa6e2134deb673c8571130a3675d91fcb17","1083ae62e780d862a001f7baeb2c8eb49589da9faf2e10e471ddd117b2d1f40a","53fd33fd439c753899684518742fef08106dc63afcc1c9f62353eff3601e7fdb","9a2e75d1d72d7463cb3a0d4a01c5648bdb4f54866acaffb0360da91234c0df8c","2d157fcd4056b3190ae9427cc822f395d30076594ee803fb7623b17570c8f4a5","47dada41ced5a0e23c415fb8599b1b8c848fdd1df1b2f02b2e756558be9b3153","b0a59b88d6d32ed5734ac9413f8a9e34773d4b7b0eddaeccdecee24ab8a4457d","492dae861616e49ded6e82df7110868489b8f80cebb5f56bbe05bbf829f8a6fc","dd4e64e454be95294aceb5286575faa08af11ebacc2c524310be108c1abd2a84","3711c896e72680d79cfc4df36cae172b7dbb72e11936e5e9545f5351e6ed0962","fdb706b594619f05e73b97213d760f59ed1514b302f58b4b46d86fe77757c031","f0623fef3752e3b67ed969c7e1c311528b5b54e3b43d8bbc26073ae34387d9a6","9e7c4846057815d55e1eaf27214286ec0768a1b463a4669e1ce37849b6cc1016","c6b95b2822c6d373dccf05fcd48d3ac615831fc98ed4bcd8fcbe41dfdd8a7ea4","91df8ed021ba6bde734d38d901a2d3664d2c804000299fd9df66290cc300b21c","b7071465f540ceb78d697e547f495d7ba4fddb94f9443bb73c9ba3ef495aaae7","54b0087a8523d0a289460fb3ac4b9ed55633977f2eb7e7f4bba5ff2c1ba972e0","62a0503a7f38a521fac641f3b258516ce3229852cd297920af25f798e319bbe9","7b7840c394a0c5bf219576439776edb4447e9228f0fbbb2a29caa8f4cf6a95fd","794d96375f04d39dc8513db4479a0023d3b8074b9738e38f7c0ac62d9696431d","656b3a9ee8a2eb73218ccddedbaf412751787b303bf5b0e293f2c60443aeeb08","e78dd7346725ac2d936a296d601e01f55eefabd010bee84cd03e20f55bd61a8c","701793d7bdb9be9d8d1ca80092377c9c323899130fa5da8af06b25cc7e2309d7","6c4925eb55a080d0335bbf728fd0824d0e4848d554aa8dd260b83ea8ac7866cd","492dae861616e49ded6e82df7110868489b8f80cebb5f56bbe05bbf829f8a6fc","5ffdfaccf283453aa793c4ed59cb30c3a30bf8c25f9a096b3211c23ccd19e976","5e19a4ddd649b5274e911ed719ef20e76b2b50b195cff0a6128974fa7136a5ed","5c686a3b785db3d56350c9155f8cbc83c741279a186422e813fec9c0b15babdd","0ad44f4aeb0ec1e2f8212fa0d28034a958ccbfb9f281e611d94bbf042b76b1ef","9a390abc9db6ac661fd36034c0737416e64092b00ad415ef0bc72629542a15bd","9e6c51f61f922f70bf41473a10ca72f8fb6218587a5d305544bc64ca9ebe6768","0f6b337b59b211dd99e8758c9a1906f9dd7027b74bb6e9cb11a14ed1264a54b2","0c5b829baca9b48adbeef6c026e028e10944ef215d3947db17c3f1a0354ebdd1","4b247257463a862b001ae097a3b5b1b90dc536f26b5c10860f46a086d404dbde","d0f2ddd588d6e73c08eb89d8e1bd6913b4e76a556497b81384321f4b308a08f7","d302d9806295f7018e115f0841222106ea13ff08a84b6a65c2a6840161fe06ef","6fb8d589421e9fcb4d885775748fa5a2607d30f7d323b99f39178b0134b24908","ca8d83f4683985cea219b3171d4e2255e270c31fd1c9fa9fee870147928a1a28","01bb683a8d7029615a664f16371d85d6c423f939e642127f267c699b8fdaee67","6f9ccfe772d526c448050c16f5c5e803be9e4250886a5f1bd9710178877d5749","bf11293cd047c76a515ba6e51fe3d9b7c643d1291795183c03ade5caed92cbc3","112df68e96c858f1283368006f6e520981414294c0f6cea7e1d0b15a50ea0ded","d2b80289f4d6e739fa686931a59934d53da37f295f3ad2de994c06c56f9f115f","fe5c41a6b647b418c0b1f8a5b0ae5570f197a15183bf39f1d0f85c5ef779839b","b9eb41c2fe73fd3a4fa20abdb6c8ec11ad75c5047c4a0acea1f54aa412e27087","851df6f9fda2d1de63c60947414b16d0bbace00ba63870268cf9b9ef42411d1a","e0a885c5ea202b9fc29b95447841cc9bfaaecdcbea8930d3b86437e21f24bb8f","1e40aa57e7c8fb77cd6ff7fd4f43d3c71ad9a34cee73786c379c1c2dc6ba5717","08f4c7fe2450260b0765a77c33fb31ec2f74135a3a73b8a66ae23b42477d5b44","603938fc65aab423081f090ca51bccadbbc7b82448b4318ed081df2b1cb915e8","b28232605a97028777b6eaf17263b099dd364be7e5584308ed30fbcbcd4ce64c","36250794500a1817291da6e52645a2c56005488be135970f51d8c5ed5f3d3e8d","4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","98461c5f55d1b191d145af33a258679cc93b41f876315b20f567655642726c11","05034631dc7665c544420c87919787415718eb904c7e377a2deed50f174726c5","cd2b5bd606dbef4a5a0d0ed510e2d53dac00f0ef92db994e1f72ce4525d918d3","ba2151c63fe743790a29e9e8de924e65d5bcb4f51cff999b825afbaf135d592d","2e51f8457814a3e4aa3b73ca27c14d36928a348f85c003bc3b1b8d8797cf0fc9","c4cdadeb3aecf4031106c52c2fb782ba5cdcd7dbefd0a3aba2fd9850f8cdd478","5f4a10115c06510164e18ac8a5b5db1f615f096a40d5c69726bb32309af93252","58e3f7eeaadad8a3f69dff6a59566e9eaa15b11facd397e2b9e199fdb2a84533","537b5657a19792461eefee12e406dbccb7b3fbbf4117e7a443e81e925f6e1b43","c3be2a86d6ab205269fdb5f1da4ab6e7d825f8e119ecc235fc587cec2af2c8f1","a35dd28e140a6ded634995e25fc6c1d1f85eb59ebb18c3afaf5c66de43972fbf","be4bc9c39dd458aa3a993a48dbbfb09be898bf30f3276660b012401ebcc54cbf","25b92cc86a4aa9b088a1abb16c60547951859d4ae12fc909e23d675e6046b4a6","dbe50a407dca6d6143ac10dc3f4a09816ca2604788851d086e621d990eac1662","8b226b564befbf10933d0e3c0f179c522aa024f1472022d9fe35a0addd6e17d1","43d7bf6b658159db2ec49152852d3b25113b50ead0a0088564a83bbc30b5a61d","4ab69812962d1cf86bccfd350af2e07ce74267e90071888f823e1402212bc100","efe27b07f8f5f9dc29e2c64bae34e21c3f755895adb0aa9813733860d5fa41af","c6ca120560597056bb69d12cf8b3f2e05aa15ad6cd2deda6f7b25ebad41b15ea","0bd118496029e7bde27d232865e91eb1e8bd5f1aafdbd8365c2f8862c2122326","8a9fac3501784d42eed037c9b3702a64e51ab0cf862c19a82851b712703e32ff","e00aed0f8e5f35807d735a1fc5424e3a15fcf4052eab5cc59887006db55d5ee7","9ed09d4538e25fc79cefc5e7b5bfbae0464f06d2984f19da009f85d13656c211","38ff09c15f8e6e63f3bcefdfd3259a4fc9b7b337c3fb71a099b95b406cb37bbe","95a5c5e7219403a0d64058de4786e152e71540e824d22d165062489433f21830","32c59dc2691898bcf265c8773e270833b5395b84b97e654cc79db3896af0c79c","7e6942c0b65718725efce0b7fbc5ba928f98a58d7ee9c76ab867556e632b09ff","193b2976612865809ef6fe8b0e0e82dac7ae38a38272960e847e51a30c1a89ad","d8aba69bc718a4fe83c4b9cd272e069a38ec26fd13fbfa43100290ccf1db334c","abcad16e71ad34d3a084e09d37e18346e815acb6d427d3bf963d24444beca822","0f8ab698d1aae2e431ef1be17cc4deffbd49cd19bc1955396ed0dfab01ea3601","26efbde3de3f0c08a94c834ae3edacc28d607674ec604cc059f6dfaada86d216","ddb649b17c362fcf7eed5b9d02eb8ec2bc750e1b3c7192f27adf68ee66847d16","c34bbec1fc5b38f8dbc4c5168193ded6c3711dff5a2d11476bfcdef7ab912d19","46a0b34e1264c4d25ca6646ff0e6cfaa7275ea1ae5a6bc23d4dfd84edf2f2b2e","ced781fd7ea93eb9aa8849bead6b4fc77de4c65331199f4c5b09602c55433c78","fa0ca60be1656ec39e73a9665c107714deca1d97ab7560c62c11c3b284b1eae4","af560c1ff8c707db02ceaf6b3cef02a112c3d75aacadefdd16fd34d1b2229285","e53812b1443dc6bc4e4a69889e3f2b070e37e2b2e2a8de83f2abca3095713bb4","0bd75aa3ce7c1bb233ca29713389cf31cbc4a120d5d23259e0d57812cebcb88a","1fe5971464c95d43d6b783baaf1cabd7c7dc18a01e61077328eb69ce422713df","ebc21e72f3dac91cad3151ddb0bda00063abf1a33026e9be567bb48d85425afd","506f2dd82ae2d9db53d80e21068cb73c483627bb0ebcb8755e93921a2c37b9cb","e86d6b8729dd50078ba088c5074e1c75b89ac5d9eae3f23bd40e836fa0fea955","366da5435836cb0b67247c1a236b449c61aa04fc081665fc7167d80f33fa474b","565f1f221d85fac877f79f93c28fc707c6bbdf7d42fc863aad8225378e4d3d5b","4433dfb23dfb3d272e5909bb251bcbdac65f2b82b407c877ca6ddbf18906e1f5","ebf38053e880b270a69df4860cb1717c456dfaa319d48c88ff49dc45d7134491","1f5973936b80ca510f224b60f2ba970d166be8d8d6fb3ea203d6ad17b10eb920","23f02e8d1ee8019ff837c24e861dcdda70ba155c16a5d157e326cd24a2f9410c","1e8b2624aec425d4735d0f70a5d6cef1f46ecef33370572f70143ceddf85987a","4794c47a68f28eda1d001528fcc5a5fa93f079b3a44d3f97c37d29fa00e93c72","991f4269755278892fbf4c2e2a5d0882a77181310143663755f3b33c71edfeae","b6633c7eae89dd869110002a5c7709263a0f92d499350db2dd4660d0ea81f661","28caba7d9bc8ce812dcf2dc0d27e2b13fa12e75b2b83d3598be16ef3d10c5981","6756086988b5faafb5b0f605f761cd13d4878dc0aca5700e62a79bc3ea6673c2","2a8239b8bee35d3c6793237d428417773ace21b0db27d590e2de4057be8d8d40","1ba9c459522f344c0c069d59428c6fb01bd73e202f8d3d4daf5f5401e1c994cd","103790c6f7fbc7475796f802b76a9412f2a9d1aec6b3412fbc73ee1ae4928fb4","6cbdbaf73d4d277154ce14c64151df4afe8a3d23ec97e7e548f1aaac7e1d035c","2a8e824199271710a46286173586b543ca0f413aeb526709fc59045cf044c44d","5bd3f45bfb146a939c3e0739f9f401358c4cc3b69e433b0234b8f26031a0e300","99bc165363dc39f365aa43cd9ee1e8e852c90a75ba331b61e80b86e6ee28c1b5","b2f527d9297256ef42ec14997a44d4a8a437ffdb510886038562642577ca4c14","ac215a4bb2a5dccb63c39a2eca31a4bf3fd5b78556f94decb2b93909a4480dcf","bb645cc3b8b3ba8ebd06335894c39b5810c7a15cef55f13e3611e802cc90ecae","8be64f740292d91daa049e86c60a4cc955b74049ff5a5f4fa2965bd4b955ece3","fe74d49fff1914ec5ca6b8f3b7ea5f1b92ae06f9d4b4c35c7426ada9c13e9e28","dea7f3ed19e4d06fd55e8d8256811b8fd6d50dc58b786162ff2b1dc5fa5f2200","2f0995efcb2d2d9d3926adee3cb523cd1bd3352be72a0b178cf3e9c9624ce349","6da586222c97b893743b885bb6277102a2a6e5b0f4e8577e3ad18bf43e1227e5","e2785ea1337f71dd4a9fbba7ed714865ee42e2eb952c03ad69a3f440e3f0cb36","c48e28d82c22f46175446a0a9bfab97d8b4d0448d30d6512356fa726d8613003","36d655378874cdba5bb48544f02f261566e4b5fc9da6d059568aa81b9490e2e8","e9aa694406c00009f8bb4a8a29235f219b5cb81c34184bb3ee957764918aaacf","4dca5a6b9792762913ae2a230b782b351405c243244c35ff0a938347144787d2","1b34b58370cbd65fa5a3a58838c3961079d28867a044a2fa449902fe6a5998d9","29eef090b44de47e1265b91a5d5dcc36d989c478b0410b81e0825d13c16f7e8e","27fff93cb53ae9a40c88586558463d9a9565c4951643d80597ce4e2f3e1fbb74","073b157e1b9f89ee0b8067b0b2202a63667d7f3a2d66f2432cc04742796a0c67","065c5e60926dd6d00a85f2e3295aacf71912528416f4e4db53f44be891ef07a8","2d393910ac74ddee8ed6714d156c7155c276dd815f33c114b87d084cde8577f4","0c6096abba365f60377043a7b707e48769bd11a2ae1dac33790d651557f797b1","9df4da519d58916b856971122d79e200f2a3be01fd2a0b4e2a556cc618007824","9d459e023609e74bbc8da58e71d21fafd293bad7130da8fe9c12b2200750ca36","3544b93ce1c4afc26e27889bc1683efb5fa96ccf470c8bb5432fac6111422aa2","6d7180a99a3385df5c383a82d4ceaabeecc227fa83eb9c7c8e7edbcde284ab4c","52d872949bec72fdbd43c683f2de8e6c99812e520d4242140cbb1def52077b52","cfbd3062c931b1e325f9b3d6fc1ebd25246951a0b90267d35af580dc8048490a","0ebcddd81acec871f2a6bb726f6611d367d5c4f6c2ad6ed46a5edaee52e1ecf3","6d6d1b9c3cc0148d3aa40f3f87f6f616a38ad8c1b68b8151b866186a6c85798d","6d754d32de2cfc04c15c77fbe0eda31a2e2e4886b2e4c5e6fec5e24a07d40bb9","13431dd53835377d79adc5e6fb65642cae90612804d18161c6538a348b817c55","4d6b3f10cab65e78389a1618ca68a5258a6b6d2eafc0f454190e011cc0a90d1d","edbf50304ae52ed829961d62d446dd1e3f4fbda1f0e1db1c8934e05b3b73d3be","7880a5552a9c6fe2fed8a970430085ae9b753d5778033e6a704fa6e0aa164589","9c32dc593fd45d6da83ac6e7265247f13da9a4c0beb58f254fd78f97bd883dd5","27e25e7fb2df5c76ce24a2cb6fdacdd031fabe665b4203ba1e8a82efd7ccad85","233fbf69bc142b400afb9aa69f6289593936bc53dcfb464206dd4e65a4194f91","febca747ee287631620e4dd6246ec216dcd4087a5c70b470dee1ab7c6345fb21","c3af43e4c7eab04386d418fbbec22aa2a0a49e995006e79b6ba7ca8bf1b916f6",{"version":"549df62b64a71004aee17685b445a8289013daf96246ce4d9b087d13d7a27a61","affectsGlobalScope":true},{"version":"c14856169f9aa2236e3eaa1748fca0998410c688c69eb248d3d551c220107857","affectsGlobalScope":true},"e27ecc0d7bbbb4b12c9688e2f728e09c0be5a73dff4257008790f60cc6df5d54","9a31aa1eb20cda88b8bb3294036a984a921d64b5e9aa06ca369f8070b2981f81","00cfb9eec13120c639c2ee240b4c0a6baf0604998ff5e515d180de34c8f4fafe","acfcac1415f507f54249ad589297781f3c73b9bfacff1ab9b52b341282d977b7","15e1baa92231dfb9db3cf4ca4a8d2970cfd1e39af7a2116626afda7d33417d92","ee3d1e52d8dc76a01215ad1afe59552639c9b0c09c74dca5ef4a709538277609","bc5ce122aa88a6a2b5a60c538abdd43d2081f1bd7a05c06ee69ba07deab62133","78365b5144a60a751277379c0f3f5e9d1a972c305d5e27d58b1ae920cc0569a5","dc66fb9d538514e75bf3750edb6648961775139c5917217cde4b071666e27e8f","790cfcddd6b7cebbd6d1bc6e70cbdb92acf1b4ab436e5e5dad3437c81a51c2e8","74f567556362194022d151211deaaca8e7c51c4733015be3d0b318df5869eb94","78fca22391d0029ceab9c7e424fea085ba38d0cdefacdd413d04bdb80974cae7","c4285f0b817f5480a4ffe86a977980018dfa65b8918a33af4d8a28150be77869","44b9dbe317108baaa35f5c3d4a1ab7d183001f24517923396e938040c656e590","afa60ee9164efe27fd39fd758994eb8537459ed6bd9c9f0cbba3fa75a14608e6","809aa3df6126d49ec51cbd7038ac0f2bb58f973e048d2c6cfbec76a8cc67d33b","7bccc20bd71f3808e0c4027c7378d1481e9b04af4bf520885a99acf2a2cd09b5","0fa6899ee1f2be4f6d8641a444fbf598af4129acf30bce77f27466b3d0a86cf6","677d6e58592ce107c0c81666e729a52cf0315614108c3838dee7c1f7cd9fdd50","80d210d6e3a8f7a85323e19c7ef7f145ecaf7a29c8ec210c90810736a4a3ef1f","61296e04fa2cb74b694d71d82fcd25416bbbc7c4decebf3e10d521c7fe27a976","69fc3c1f25e765e817ecfc91968fbf6934e4ba304ff998c31b3d0cfc56772957","fd60dd30696507f20e2267d069e30be39f9e7cc55d3e55c947653324fc36c411","eae144f031cb58fc7c94cb2d405c00cba94414a675cab9dd3d88b12a59602f8e","f369dea98bf5569c323f39110018bc30696595504922861cae1522918c9e0701","9680eb7d6043a005972d9241edb571ce9fefa0fb48a23b992c2c9eeef9ec6b76","d76e33115d9942600b6165e8ce3f0eb04a421d20a00d55d76380e02377ec6397","91dc72de609fc31f6b5d86741abfa61efb70a56c843e160182a5bc1a786d964d","2b7d8cabdc3ee40c9e5ed3876d8e9ba2f04a0bf810e2babdb10dc0d371686996","5e14d466f5874656e7fc9588f41ca3211d8f442406bf82482c262ad59e9b43dc","4fd346095bed1cfb30362b6209da2dbd5534a27f49ffcea8e9df14de750fe8e0","6af7d9b2ad1170827701e982a1b95769f3a7b08ea162c192dece873876d09f0d","4bc9bdf594a28cadaf9cc499be2ada848816cb7a04b378972bf45873347971d5","6a4c90f6e3689f67e8a9c631d3ff77d4a7bac080a59f89c58a056281c326b1a9","b9307a714468f1d53e3888f7fd18719e29857ca54bc964a4f3e97581d35471c5","c6427b5dfd9a5cc9ff0550aeed7ef42e65c024a4e49a34f8f1db7b825a2e6f55","1c2ebb5979676c2d7f77c70f31351ff4f67649c9ae691b1fc9d0dc8426437640","81221f7fd89dfd601cc335f254d495fe5700d781f5aaa2cf5f43a31f5383d306","791b7d18616176562896692cdeff84662d2b2ffe3fc33fce2ce338eaa8a8288e","a1cca32c01d9c6d99287fe9d5f25bfb96fba2eabe4cc3e5aec4be0280c15685d","53af44d9509a4c7a9c5928f2141b9621568cd334a4661238fc691e96df7a40e9","b032354f740087e7cc3961da4e87bfa26085d0bc47e04a875d2d9191b68b6ac9","099513a066b37554a605ad177febf4a06ec6d328f1e73d7ac6caf6bc7d0f831a","38578caefd4849aeb72eae5bbeffd8c1461f356bd639df8ccfbf28b925a42584","c6cae95a5b59dff4560051d64521d405deaf2cb2cd90c8639ee7ad75edde0420","dad039587a49a7fc846296ffed0f06cb2a74212d2c790319ec78c3a0c8bce191","b3f74f9b3bd37bc1d94b2d1497573ba6949fd6b301decf93f19538a5c94d63a2","f25b6382d578b787f4312885e3bad371d3d12f9355705263451bcdc68ae7dd74","8ef51fdb94c367e62b740c9be71b3da249265da0501d87151d689879cc575ebc","2a69d1875d56d105f4da73dd0c2c15b02bf28a8be62d5bc20e8ce6567f04ae0e","53cd187bdbfaf22effa99d7dcc8bbad24be8338dc86159a0e2ef24baac4688c4","e2af9d295596a2d18b03476b60994612cd6e24fafffa960b625755025bef2cb4","ac0a0f97c8d727010f54076ae2a6e3117a87dc9404655f6253b96a16994482ae","ba4fc9a7ca9026a2c6a92a209f1b0c00bff74c45942bd7bc4ca21d6091bf4950","9452b044c447276df6982174706b00c0b935f649a6dc3a355b6f012f15e0828c","8a094da2d461d39b5193a9dc61d92b9e8a0caab6dadef87c659b27310b36e221","6f084b6cc2c5dac837b075fe50104fe90b2791efd9966ba0f005966b14dfa3be","f99027d6ba00ccca3d7eeacb764bd81b31e8276d0a6e64eee2eb1e0a269dcacf","eb04fd51a9c7a020dc8bd2b1fb0e686073521f8f25543e502de6138249866a43",{"version":"49a253ec027e56c55c7450a0c331cfe96212b3d1cc215b1710ba94a083404cf3","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"7e95f2b14f9f05c25bd295dc1c083472151701d02c87920f6a4e6041b248de75","affectsGlobalScope":true},"c40b6647c870e1e67fc2df5e544fe37f1ae026daa6a3f1a6b94451707cc01326","d6a7eb9345d3b1ef9e389be7bf405fc2591e38f1c36814e859998dbbb8ad1a60","186d15d1dba88283c0e725ca1c5dd3a072388d37eb08b9f6c1c96ef106692917","aca8bc66a0cd441ebbf1cac593435bf7851d7ff420847f69d350539ee5827837","016df5bb6a9c3daa61c4e14af44af06add0da2ec7ce1b817c8dc37b72ca9f2b0","a764d234d0c6a8cd8b8c5d2737815eeb1c5f2f281b1b391d13a17cb6320b16dd","a529f025c54e6a3abce74d6e7fbf34fc7368ebd86f7e5637fba8f8fdd1537f51","7c1e205e270040fd95d0fe5fd98178454b4407956cc076ef2814499be17fbbb4","b8caf47bfd6b34656edf507ea52cf5fb8aa2a3d1e74ca7373e24524e00c1c3f1","78d57e439bb793883e65eddb73d7acfcd918324cf2a398664c4fbccc554b9e9a","13c3334b04a40f27d2b46c6a4dc4ba4c97daaebe47aadd78e49de8c1074c7d38","1d7138e1a985cefe057a2e8a9b247c761ebd6b6dcdae1c75e298fdbcc0a53bc3","6acff4ec8cc752a1d47f508125da4680c38575b5a6f649c5c4bd3158a022e416","38b0abc5f6daec02f3621c6cccdace9b036e4a96e667e46b119911d885606d13","75e321f38288277d4b684b798c11cc7af369e27cd1f80d48e7370c6f0a737f2c","7624ccf46aad0e7e307e095c7fb4b0b7f6ad4b7aa79024273ca890f04789df81","89f79facf5004c8fb0ac9f1d4f37ff4451bdbe65d37dd1d4ba11566a731749be","16896749524d99091e19d7e838e2bb38683ce5d6ed77dfc055c2e0c391187ae0","d5618da90a2bdeaaae7fabeca487be904c0be5c521f5c2bee7e63176ef2faf68","e3d574fd616fc56c3d84695910cadb468f716d598e07b2974c490ea973b834b4","a7ae283e914ae51002ce6736f6b890beabbb26b5fff7b31df907ad0046e5564a","56f65f7e39e076c4f94f4d68be69a45e7063007807b7858a7c3f9f8586da0df9","08c00b415e40e543bdefc6cf02d188b5dc13f6afa34bda0a7d90282f31b1b19d","c686101093d60519f07e285b16915ca135ab262518b58d963eef87cdf7e3e87a","b6aabead380560f400f49e7bb44a16eba36ec97e212d92a911744c8132bb89a1","0d9e21abee6ed3c94313ec3fba4f70224b8bbe8305b9a56e34529ae0fa914457","6b24035a9365cf9fb0b2d2d6da3298a315cea78264a1cb7e115fb63714535aea","556420a0e672fe4468b4bd90c339c9d38356a1b00b341b188918efd7d2500b3a","77b6a3789ee02e721fe15287c447033f66074bf4ba2bb8830b9ce0e0f0c2c1d0","59ca8a91095b876e2aeced4a9494955d339b048da9377e696901c983424bfdc7","66643e4b6b8b2b7698ace44ce5d96ac42448e9d8a0bf30967ab6d2b89dd93603","35c58226caecf2ba4b3ea9b0328e53a35e6395f029c78627c00d19a65dd3ac31","6d88bd7c02bdd10dac1998aa504e376d5e9b9a415b3c9a11c844be89721a084a","2e6b919c6058f6805604051979f3fbbbea107cfe9aa64e8cfa46c2066b2cc710","28d5456af078eae8159bab5d74fb424eb505e292dae44893d6eba1199ddb7531","dc1535b4f86b2b452c716ef64a2230c62a1a09d9a3f84e50af62a47623074f1c","703eded3671d955c3ed60dedcce6e3d55ead7cf3a0562b4ab6c94984c9c523b5","bdf0a6a3909d90ca8c7ef1116cf21280c350b69e53a0b39a727c01f65b7e0976","46d6c573b0419d0f0a0cf7244e28fb8224adfd863bee309c86d38beffa4215f0","70a29119482d358ab4f28d28ee2dcd05d6cbf8e678068855d016e10a9256ec12","869ac759ae8f304536d609082732cb025a08dcc38237fe619caf3fcdd41dde6f","0ea900fe6565f9133e06bce92e3e9a4b5a69234e83d40b7df2e1752b8d2b5002","e5408f95ca9ac5997c0fea772d68b1bf390e16c2a8cad62858553409f2b12412","3c1332a48695617fc5c8a1aead8f09758c2e73018bd139882283fb5a5b8536a6","9260b03453970e98ce9b1ad851275acd9c7d213c26c7d86bae096e8e9db4e62b","083838d2f5fea0c28f02ce67087101f43bd6e8697c51fd48029261653095080c","969132719f0f5822e669f6da7bd58ea0eb47f7899c1db854f8f06379f753b365","94ca5d43ff6f9dc8b1812b0770b761392e6eac1948d99d2da443dc63c32b2ec1","2cbc88cf54c50e74ee5642c12217e6fd5415e1b35232d5666d53418bae210b3b","ccb226557417c606f8b1bba85d178f4bcea3f8ae67b0e86292709a634a1d389d","5ea98f44cc9de1fe05d037afe4813f3dcd3a8c5de43bdd7db24624a364fad8e6","5260a62a7d326565c7b42293ed427e4186b9d43d6f160f50e134a18385970d02","0b3fc2d2d41ad187962c43cb38117d0aee0d3d515c8a6750aaea467da76b42aa","ed219f328224100dad91505388453a8c24a97367d1bc13dcec82c72ab13012b7","6847b17c96eb44634daa112849db0c9ade344fe23e6ced190b7eeb862beca9f4","d479a5128f27f63b58d57a61e062bd68fa43b684271449a73a4d3e3666a599a7","6f308b141358ac799edc3e83e887441852205dc1348310d30b62c69438b93ca0","43277e48c8674595dba4386374d23b4bfbd144aa6ea42468405050bfc8c7b0e8","ffc483211113c0e91d9d5258d4df93d4b1b8e740a3767f2a63d3ef631fbf00e4","0b454b1f7a282454d14e314fabeae904cb0c4af397556ef0fcb782d3f863ea59","e3ca8d058c3d2a6eb59acb6f236d19d21fb8dc18236e91267242e4f3554bbab9","aa92d3d47e1d586dd028314aab21d1424e02450bb1621ab264b42dc09c27191b","0081455199e151f55f191895fd64c80692fbc52e98a45f6f50719ff3304883fd","1f85a39514162015084e6cd6fe900e73570a62374c25cb72a95239127367b06c","b62d1c9cadf282b5bb4c22f22767db50fc396024addfd50efa81629025230f38","82b6eef18079b1112f035c9b6b73406c2f0b3d2a52858ca91670afe78e0ace84","f71d62fbaba155d97fb38af371eeaf1dbe5b2ef7c3196e867a4c964b986c383b","83f8d4b047edcf6ba782f43f8f7bf13cd1bec2cf9d69c9594d900da5d14ed61b","e6ffc3fbd5583ff84e4b800380ba26ece906021cb6c8b40ec25c8d34a128735a","bd4e06a52d0dfe96a0ec55ae483a14e4cebd647fd0896b575519de9baf602231","97044228a7fb6800326735b6c812f32e4e1e54ff13a7c55969642cc751566ab4","1c7276811c37fa9ff8425e4e29c81c2d4a1a40826d146e3ac32849442af4f8a8","1614081b7588a98f2514b6a692b630c45c7f81978a7e40ab3e0fb46cb69fba1e","b2216b7f241cac0a8ae34a8f01d272f523f82f099bd8aa7aadec96862eb4475d","310a3152e5ef38ff351ad49c5bdbb8e627c86af52a66f5388130da48d7c5b685","41f95048e870e070e6cb31cb67f9920286a1bbb3731289350704f332b474b887","65a46ddb5fb8fa18b1d89f3281a344b7d12a9d74c3c797e27e7299bdb9dec2a2","3791025431f85737d4b88a860e484ba343db864ea1468a7f8d516e82aead9f5f","58fcdda8b720a302372871eb4a809800070090fd6623f6861465c68555d4f4dd","12cc1a0a5397ea1129e7e2c2537db119a92135284a817e13b8b3a1d91892723b","cb22feee63d3d834d1d446f67f20c8fef997ccc73277783a968050d765679ae3","ea78386d121d4d364887f4737b41b8a8ae0aec4c1fb470c439577d907dcd3552","1a5e53f2ff80f392d393790d11ecf08756bf09fae5d76539759bdd295de4016a","e43924ecb2cfa4cfbf1ebab53ffe0d19ebb993fde223312fc08e3cdcf4f0a084","6706f767bc354c40796fb3e86e19a45a61e8f2f1252589f113d58bbfb5522349","03b8ec2c192503f543e0fa7278abc935bde14b95b27179ff3277d6d4e3cd9067","14549e44e55cdea27ec0165fd014070078795d591fd46e988d6233d6d697439a","c28f1af0a8ba652aa54fd105f092b1a8b7add94a224b5651c225d731957d407d","5b7ba74c4c952a69a45cf0d33c4109c884bdb5036eb6be524603dcee7250d96a","c8d32ada2162ab18c2c632ad609ede9bf238bdbafac3598c4980eebbf855a04f","20bafa4c4229eaa5e6388601e19e602509c0fadd2b658c6ebf437b33dc4e88a1","db73427eab3bbaf3f26b5b2efdb37b2d92182cbb6123f8caaef97af2107b07cc","f77898431875dbd6d3a9b7be78813583bc78fbe737bdf3cb9c86a8c8475e4a58","1fb1c750395bb65d4015d9a2bbd15153112cad918b59069463d87d4fe287f337","e0504139189a5b96643513e670e83de419716bbe8368383326df58cba4481264","70d3eb12157434a1ab5ccc8c057c830ebdba1ab59a55a757e6d4364ea9441252","7935c48fba73ee5d74a43fb17f58057663700dce9ea74fd673ca243fff9c7f59","683a8ce632ab7be2208c81e453ce544ed47261b85585c654ba2dc65bd3715588","d1ebf01d8322a8fd0b4e81b65eeb9321a04a55c868df00e55080a219fe1fd9cf","d6a93af9db7a30f9e8cedbee8472e29a194fed7c5f6575ec45ef3430600cbbbb","40ad2717c23b8583214c4a4b8fcb6d03a1ea452585cecad4b14f3f87d4d9c12a","db8fc5c1917265860fd2a6963989985322e37882515284e5a33e3e61362798e3","4336423981fc67f99d5c364a64ec671641d4a5a796dee33bc4ddbc852da7de72","8dc56f817d20cf0717842ac1dcf3ac1a450ac3c667f1285754901e4af97bbe47","72156b7624d678a2686a22a45014218be4da7147f1058a5a5072fe981c492dd5","a20d054b8be41316bcc29752c5b9b42fab727b887a076a3af3bee18813d6e8c2","2eba4ddfbd6837ef33e58644f7dffbfe465d7222f9a9101789f02427f9541488","bb82c16e8371bfc6ee2ffd0095fd321d6acfa57c6c6445019567fec1b6b5e92a","6c65126b657a275259c4759b2b2f7b04879e61bc6c51df025b3748f87652a9eb","a5ad75d3dd3d3df0f62cb7a8ea12e76e0b4a3143ecde9e29c9cc0586b88365c0","03cd482c80ad0b724ca7d55cef7e3823d593b7cced98d7ef9d1bf757c5055b77","e93f395b0d6e68525181a6ecb3e7b81b1c5bf551f32f6cebbdffdef354fbe4a3","b881b069efb9d55b4b4b98de76d8c3920a29254e24f8f0c38557186e38cf6955","25729786d7655a5d7cf18269b89cea8e606e66644657f26fb1283a0deee40727","1f542c79756fda13fdeda2c6c90a560ebddb14758eb5c3278ef8b750a03c9bec","b0ed00813c153e350a56faa8c15668bf21375928e9b88bcc482d20f1f8415179","a1d67050e5303d6d327c11546d2bcd5643bff251e7be230e8e78ab93d051ce39","9140f2acce87195a28377cb0c079de679eb3ee4aa027f2c69f8a70f5c58231f4","93557733190db162b067dd324a0516b8cd4313fda14c228468d865145245ed04","8ace7c551f55726a0bd825aa163fa5789a1f816a236739ca122ca80aac13661f","2597f47a65f63ee775d4c8a9ac9923f6e3422e19130401253c407acba2a17712","825151a14f9661a82fc1a0603c0c288e3225e7a153b0399d4f81f5693bf5fc5a","e73d0a1df69652595185fd648818bf9debc5ce526d030854acfa944ac1db9b50","0cd8d79e4f122d26a2fef1d8a34a68bb7dc1c6a5d511e819518195f236343647","233d663fa903a3ec45f473d7f71cf13262957fe5c5a6a5cc189ec19b26481ea2","55b03f6dd6e296e7b41510fe4f8a406ba7a59f53595a6a7e7ed562ef8038bc3e","e266c6b72f344c3eb7955a398ec4ac675e0df59e639b63cc4a1bcfc6e4eb5316","dfdc5300faad162936a4e139d4fc330fc61b5ef82a31d6aed862c0a8fd7817be","d7f0de67440e497c0c6fc4244152f52a91e2ec3548e9b23bc6e478d4a4e6489a","8ec8468d92d5721a71c4f5f8dff24ce6937d7d0a0b17b83d2450eb44ab32b266","8eae581e0eda5fe040284edee93b219db215fedf4685726bd0774da8316ff679","067c4091e4fea77b1c8e425cba69c423792eff44c195f6f196c60078e3aafdbc","5b58e0cc5d58dbd9135eee1d282a9bd0fc39e8afc606bf2898b470aa8f43e85d","22e7bbd2dbd7aa1941d9324694f4f16efef7811f99d8e73e5da78b04c69f030b","656ebbbd307cdb14912532cb388161356310df830bf6b281dcb4dfa155967653","09ad48e0148ac0f0a2e094f86a37793623b94d2b2133dae34d9cc45ae8b25c5e","c1b720e5dfb938e3102ba8943099eb9832e7ab1823b3b0b1fc66ac2744bb7cf2","2ac362a2246894116abca93289432a3bb46a8081cfbc73c7520b17dba535dd8a","2e28d2679d987933af3ab70f024ed692424571a3d764e52c14678938ee877c56","502f4a28393ec8f62613650ddcf8fc15a693051ef228de55a9fd352ec84a89aa","53c907f9df131b180da03274336bfc21fd0ddc9ce8be765500304dedf5fccfe9","61e344cc879b58a08d51dd2d4d72d151dde138aa1ea67eb6bf52aaae3c4689da","ebf2133a2364ca7d2f8601780fc2a22c2029fd7166ea2a569c7f8f94aaaca2f6","c63b692cfa586093795740c783f71bca0a4f9b8c015d2ca885d12a5e34c9d2a0","d9499d9d0a720b79ef25ae3b7e473f0063df7fc05daae087e575e230698819fd","5dfa630a735c28092a6f56c73a8beff33621f06801a09db9ade86b124c14c07c","2134658a3b19b838ac0a27442454c11bac0715c1a85fe19365b80d47df1e3106","98fc20a7333fb38a2c524a308ee24caab2512974df52b5a6514aabf5cbeab551","1390f82f3c8e80758011e0061c6d1284cc98fb624b90e1f7195c74449e2899c7","319d665994afd8a457b08b99da56a5290454ec0510bb4686b876c8e0fa8191c5","18f2043782620b0303f0412845e40183e498f10a50065d6fc27c5f653a2c5a2c","5f3f3e895ce2597da54b2d9a6c70cc96ce15fe2b00181a412c7d514c596226a2","d732fcfd57106e33b80f5c7ab81687efa43c29b262fdc50274f8f42c3f2cf578","0de5e8652d98e245505ec0ac102280fff4f84f6638861d774d2d351634f1221e","a37aa3bc6ca997c40a51f6d6c414dfb38f223da70e0e4d1136e77f7c3ff0d7eb","cc637b85b208012472941fa039ae6a45fa7bd1c97d91c5659bb4bf600a57b7de","5adc95373b6445f769c67b0d273880a4d67424ba48d6fd329f5456abbdaa8515","93180bd2360c30eec60a3421788f7ecec82275d4de8f51ddb7d4c31344142310","0d87e71a1fe0dce77fd5b18505ee0b548dbbb118af70bbb9e6a39bbc49e08c6e","0cd2114470dcccd06e15369eeca461f3de145e0b793cbda17be99e853baa758d","d5abdb0287faa72707fbce69ed0b6172568670f628f0fde40ac2b10b8f6f028c","fba1184b51e62e9e706632d08df836caef230df4415b41f61dfd91aa29137294","9b4e2f5d760beeae26e5b5c34955079885c8ba8779e4ffd1898a7192a239af6e","ae202294074b2c27b098d87fbfbca3220f5b039e18e65329e7a8a3feb4eeb441","0a0cbff8384422716e06feb725438c76f2b6cc5148ab0903c252c12a78019a72","a2c8b27e3c5e491d296f41109145eaaf589a7435141f0b7e5987b328093ee1af","5180c7ec07768babb88b9e11b680cf070d51c9173e1f3816d685d43350b7a0e1","f31b5c73107611868e39011bfbae4973c238e608db701a8d0692f7fbda21949c","ae428a4c9b1c6ff027e7de2ad67b6b8b092e647c6112f12042aadf762027c5a2","e10bce59494bf7f496c879add3368ae09bed7b76309fb2d3f675e31903cb0e96","4d9681a5ffc480eb2f0e0b4418feeb11f6ae8389b44e76c4d3c633edac779a6c","154b88944cd9d4ad688b93d71d720b8c479f87dc62025d1491bcfc9f1846f883","ad1133b4c2b99fadf0df3ab9bda032d20250fbc227dedc501e642570ef54a217","e1975f4602e0b16ac9ae0a657f4d2f85554017b3e52086707e54f82d14b5630f","2f6bbaa70bc312c46c379085d518c696017a69e4e9779c6c75f6908967b5cc6b","0d070d22463e7ea8e0f824c16d0613dd9d05b5be5d24caa03e5076cb01953161","7fcbcacb40b90f9806697dbae89759ca2e4479c58654f0e1fbcd984ba069e99c","04c27833330e91ad003f663a9f564ae0fc78095604264c998e15c1f341c79e2d","0cfad192241b90669f14a92ca48e141acdd82b414597a18081ff9b492329e07b","e63c3791c63c157a57e2ac2d772b3f85b3688de1acdc53c1270fa61ff2aa1451","227dca4c323e1394cb4b70ec85c9d917ffbd7a7f3e12d2215c2054e5076e3cad","d9c4e110532223b7c17511a63709efab6374f7de87beccf616f57a0125d91281","00828b6cb8616900c552903ddb8fffd0eef85b4aa2805f21d5dfcf7450e26fc8","d76f7df64edf0f562ad6b1478b024b0bfd9db290a63c745d473163e18bc69bf6","436153283d8d35af2e83c229489cad8f11270ef2129814f6133322dc89b3443e","17fac66304bc4b3feeca45f3d4c69b1a351ff28c9e3ee586ae637991a961d666","7ac41ad39142caecc58d455413d971fde4733bccf907d60091728e5695e6d97a","0aac590361ca87c929c08fe84fd809a051f1db7d4dceeebdcad932b49d4e0a89","fa602820776c3f67cfd41e4316d3a3444b9a198d56eb1006541fc55cc670baf7","f5fadf29086bc0f5c80c490058274dcdedd87e4c6c523d23d1c8debe0b4a6af6","cd5f0bce17430ad990b0561c43ed86fe42a8557ddaa5f24befb728f6af320122","e36b2240e73f3a8f6620fcd10e0ac48454373df9b2cc8a872a93c8984ed3d249","f64dcc75b161cffc8585555ef53692e79a7c923e126d182721d1be48c3557dfe","332a7bcc2034b28bb3880a1a1ebc2e271c30e647c49d96b324359e34c991f627","6b66f3c16dd2e4cb7a1cc0429390ba3aa41e5b7769e982f8387efe4c46e467a6","2980f81ad167cdd9a5f1a2eecec5a7bf1b2987570e55a48152fe7628e9d519b1","e2a96a068dd8c1da21ea331e9b87deda6cb83314a4f2e29f1e3c58c3703bb0a1","1a9227bb7e286c36f7328949f0691e875cac8acba9d8c5c6ea8655e9e3455999","33f0026dde6c2b078f31a79c0c8ba910420652be8481ea3a0cf02c981298353b","4892c7959b3258deba1085514743de4b3ad9c27a7ad5ca22ea0d3fb131eb0cf9","c0f52fa967a92544614aa43151d61476365da94984ba730b946924b817e429e5","66e749e5756f7e4f4d5f84819105c0967af881141c34c635d1542758fa03f54c","866f1d25b5ddf0a23a0cee8fac130c8a9e390fbbe5438f81922f3abaf9babe80","915b8b0012b1d1b394d376b1e05619812f6443f48e5fdaf0fc0404863b4085ad","c70786f8082fe55207146c7a71f8d296e7d9a809bc19d616374cd1b128ab6b14","f05e709b82b33299649753aacfc80b088c71d9dba0df1faa2e6f52435796d5c3","35298e76f5ad88c494e571e1eafc4bd9aa0b094a8a6dfbd400728cfbebc9e0db","d8f578851fdb18b04024f70dc6645f3a18a10640596e9e65755052432748839e","f88ce0fc9207a3154b8bb99318f2273c5d285c7fb86c848b566ae6a8b5d02105","5ee33d14c81a3cb45aead86f20f4de2f40c24af79c7a8c42f542a106f70648ca","d9cbdffd821c0dcd6bf8094fd3122f48cc3ee6f0aa20978cf5db4ea83f42794b","eac88829a7be36f669b887accc271158414773ec613eca7917972ce86860d12d","07a147e0ea9beaded07e0fb3f4026c80ca41f577e36b8f8165d747a2d05ddb88","993cfd2e4619d91dd3b0aa07ef82e7f68ba62f54fee0f98720359ce7b1cebc38","66c26dc0b8b2cd4533f753d7e08022dd126ab9a7a5150f771eb0cdc012c7e88a","cf16c79dc11af3cc69d17386752f498be53cd146a14fcc271c5f1563cf955740","e815da49be69908f884704843129f8d9250ff7c0f74e5ccf1988c24a05965e0e","593b36474f166e9a5ed8cfe1590800bd17e7d9f366845e17e4357be6ffc869da","3541ec2884b8ca7517ce60c453fd73c8b44ac57e6e6c511337fd24ba9ede8561","d397f4b80d4a32a85d0ac373fd8a6c9659c47444139e1a89da87d216494029b5","d3cada72f48c32c01ac688071426edba2df6481e62efa85a9321393ed2af6184","25e66cd03924f6eb2183f667a330433ffa0473a868a8fab1f264351971c678f6","edaaf00a300387eb1d6a9f6ce0ca6a218772d5cc05a79b6757a5f2291f597ad2","e648cc0ba42b6f18788088a10757b89e33ab9d308df3a5cce8b8e7ff15e2b22f","eacb287abb4b8f701cc2456147626a8a1eb1a84578f3374dfdf3a5cbb75ede9b","6fc82a3017aaa92364e97c6c44e43c049ce0a3072551edd0f23fba27f3c4df98","b96bec9e77061e5853b4fa63d6ea8cf4250773702676e300420b7735c34f9901","8f393ad285420fd008f8b4fb6b5990e19eaa34b8183b46d9cb720bbdcaa7c31e","9431bb0e7be533433eddda58a880ddc2f884f0f71dd2e8065afbbf97bb3a6a61","7705bb666bdd4085a9787d5c2ac6b23020b3246115eafcb4f453bd9c1448edba","f4d43aa1331941b39fa38a255a16eb8855cc2926ce02a73cc06dde067c473900","9921f71db289a60c25a161d036c2885085cd3f06672d9913b37342333993cf3e","032080b7d162c23bbdfdc18aa87fb8858f6a1d58a0d3756bb59cc28020556cfc","9ac7c4093cadbd5ed6920f9cba6fc6652d814ec9ea0991160987e4feea437481","f75ce377d83090f4180590fe78c9431b3d9bdf494373f0418c58e62937e890c9","6f0cd0e219049f8cce5d0400fc6b8bc841bbfe361d76bdd2ed9a131efa26057c","41ddaa11b8c9f1515a76c1ee2a498cfa8265cb04d57942f2c6eed26e01f270f1","2ea50238f239ef3217965ea0a5ac6ffa2acb94bd03a912e7edae4cdb90496b16","2e0e61e27e6a2ac52977927088197535eaa62a90638af4badedab162672b9ca5","8a62f9f4d9309bfded918fda52f8360e31b626105477db019af20064b0dd8961","057dc3da750916d3983709948a7b5a6ef9788378d38a60bb7458b30f79101800","e0d28cd0b097b81bf31e230d9296920688bd3f21f54bca7f5a3b3cd4ab4a7e66","307ea4b485b73de6f48c6c41f0e8be1fed56673f584972bcb541fd59cccd9860","fa7d28cc714e9d5256d2d5d2d7895a85e5db44987b41cc39f047598dbd3e3fe0","5c09513e6f0bd934425d0d3ddfbdd3cdf4fdeba8a186e903df3c48043116e3d6","53fd33fd439c753899684518742fef08106dc63afcc1c9f62353eff3601e7fdb","9a2e75d1d72d7463cb3a0d4a01c5648bdb4f54866acaffb0360da91234c0df8c","566c068aa63e89d1ae9dc45c7375333a7c55e44cdb97c3adba9b7b09f0bd9edd","eba59f556977e6b108d087ea901e4e326ee0d579c5e4312a87743af6fa8f768c","9ac5c75774da8cdc4d6e0a7ab1a775a00e8f8b13d26c1eecd13230f3882668fd","407d830c83a0659a44e68ba0716fb8ca06b5f58318aa4d5ee99fc0fcd8cd837b","90e965c72d8be19722cdd324090e638e13960f55431d8631f10d13d767f614ff","183e0a4b07d3e6b6715344771e5a4e73e516246dcea97384e5349c42691742c8","7bfaba8b6e1191bd01ecb395930bf46291a3decfca0674393ee35f331e8841c6","a30509a8f0d5edeedcfa55d019de4b5bec780f6fb2480bba53afdbe4dbbf3437","31ba7047f9570c93a5fd3d9264cac8e15ddc83d28f79bdb52fa55bf864c409b9","991dc1a3af1fe5ae31575c7942032c6766bdeb77ef9610ac675f5f9146452a82","7409032e1584e62125a2c131f93a61e44d137d031c8a2f86102d478c0f9916bd","6c31318d3e0c181c9b859eeb8730701e7942d521fc9110873c6a8210ed9e2464","221737ac28b53fc9b0849a9dfa5ca5df6e5ae34e29de779ceb240b009f413c7b","2212bb6cf1ad9a7ddef76e66de820e280086a2780f60a580aed15b7e603de652","0fe4061cfe1eab8c542bbc0b2cd2c203630c5de51941d8b8114c4428505d6135","fc48d98061f4df7793e74a5c4da299d6fa832f1a94f888d9e304dca5587c48bf","8fe0548141d2ebdcec1887bdd86ad369863e6fac5bdcaf5d94174d573371a7ad","ddec19525a3a6d2d5128692249af3ff927989304aa6850a420cea5d655b80ebc","8fbc2183ce22abd6cce28e0be737391132f09449c9312f2deb2c2b93b2762f36","f2eabd920475a6771d78c8c2a8651f44e0e7420cacc29552a7c49eafb5194b3b","f65b67af065b6e88888ce795af1e0d201276d21a8d8d38dbbd0eb5432ac0cab0","76910f9a58a63ed7d477876407541d58cbe4f6d39bedcb8fcaeaa2df73cb234e","2de05e675f52f159ca92df214053286c2a148bc177f2b27c8c1c77bd4b2f19d6","2bd818afebb7c057375c9038483dc2fa1b3a0423f58222e397351e7e6bc40c1e","b68e17021361507cbb11a8c5b1d7291c28e5f97a3a7c24520026b57b37b88629","4ea4c0883edfccd974d63f7a530a61b1584f5b503f6b488ea87127097d43bf93","49b28f502c819005c4a9d32c00b09792fcbcf8c2af2f3f63f4499534a41b92f3","2609c35f3d947adebe6e486d6d8b5e7b2864a80bb99898478b6fde940ab71e44","012a639df4fdce95209d28156bbe33e6a7753b1fe4cc6b24a59a7bd57d720a35","f9a76bf9c808adda8a018ad18e1c1ee8813a2c3f38d53ee7c1eb2a9130d0f5ab","892b371df653d6787b8449e611c0206f561c3bea8fb3e41eac0a6570f43bfed2","7ba9e4a3c87707d2e19f86e8ca04c070dd1c2fafe5517bd6b6574a75c60737a2","bd702a3e21c0ad5d6a109739d239b6f825b69f53abd3ae07d90d8f05d7c2508b","a554c07dd44e34fe953391fddd09fdc3cccdbe291f6393c391529f04ff88d883","3a35d3dd2646bf45052cf5924875d63bd20e24ee58e07d09d66a0cfb77949f57","df24accdcf6a15915053cb96127f69f7d29fb7286951d58d4b8ca9361f8bffd2","ed85b89477b0830ea36dfa5a5216f5949e362cb826a9bbf5973e245b4bff303e","47e3667256f389c853bb1a8954bee33abe94788326d65ab1b1334e59a705ce3e","679c5345cf9eff4a5b7f14bd5b89e4bf13d75ade530b8ff8fcb25114b6747ec1","4b00bee2d5bcff299870eb1f6f069130bf14c595ca96b32a200ccae51c5a1974","efc83ca4f330b801f1b1244f49dcbd2c3a6864af09468e216a1400043141567e","06a88a089750af8956b92bde835a0b5d9489197ad541d033ef89db4457fda78f","2a412555ff316ca06ef90dd936584f7e3cfde321d9aab67c7dece93470d3ca4a","8aab697bda333592e3895adf37eb2870d675ed73dc3b21eaafd224b90c4b31b8","301d6c8d2f806679285ca006c6ee74ddd2372da29e018d18400f971543dcdc5b","ac0a84a5b1487392bbd89deaaf75e37ff97badb5cebc5b125816cce6c994dc49","a32c5ba30045011c135979cbfe7e02aed0cf0cd53a1dfbbc952c29a023470aa9","b972bef785abdf30030b19f64b568f7952b8166dc01ca4ddc2ac6919a5649a6a","b8a6419ec42bf4d8eed52f187e161b7dee898c96faf691713fe1a4ae0d89234b","ef94292bc93dc9aa8910f63dd8bad99a034f69a8bfd4b930ca8ccdff1a209689","1b6fdc41af60370262aef54e35a53bbcfe9e529378df9d4fa05adf6e7e0e2fd1","113b28ad7cd0298c919e8b8dbd0e17b6c456c3723c09e2bac3ea2727ad578a2f","385488081e845bec1ec9bf7bd18b5d7e2d3939401099c4e3b121106845204733","ee390c2487bca09cf2c55e18e929b7f4bf648d83f4bc0f9fceeeb74db84b27eb","f30f19ef7afc42af1923bbb4b0b62ba0cbefc5c2b0929d5fa73bcad861d21ed1","3717cf65a204081e3323d5592b6671cc5b1314a2d2cc96df407adff995f716f3","4f551d073794c7367a01329ffdcd70b6eb84fc3abf2c4f0ae8b756fe231e5da3","aa293bb454ae810e7d15a3040ee730114e9276db4ce713f27678d638c3ab308f","d4083eab88a986f2fcff672be3477a79849f25be3eca5a0fde6d745dac3fdea9","07b7d50913d14676f5193ad47bd45eedd6dabb648bde58ad92a13e62f606accc","ad98cc620e52903b28e98f50ca4466da4c6dd05f04baf944ae009ac14e440b33","cb41a8d1704595b290fb4bda78ff88dd45dcdb7a039003eedf7c4d50d0196866","8277897a81fc2a61b6367d26a66dcef94e2dc5db26c485444a824edeb86fd052","3e4879f89becf4fc8406d220c5df19084c89c14a7dc931849452dbe058d85dda","81807c39ffddf0f980ff2c71b5fce8a5f57b6d85ee8f9860a0c00270f4b4b3ca","58fbfe0eecffaf78787e599e47c5a7e7195455199cab13da8b64f26ca928b261","9538786a06bbb280f2e12a8a7a07bf47ca7172253347093176badf449a3d20cb","95578ac9452eb3f422aaf44830dea4704b9f2144f05e88c0000d4c271a9d6589","c992118f3b620c121b1d1e2a1e4978aa05028eac3405311716ef642a98af2d88","3b3eff18597e0ea86f12438ad927f4574b3fe059985b3f09fd87542b69a1fd0b","4128d4e6d5485d7b327fb5381d599014cdf529acb6a693dcb25a74b7c22867e1","e82b756ada2d110d9f8a77948c3ff9e5055b8e926f41e5f034a58ee8e1d82f5b","59bc67c98670c8c2e527f4bc135f3addc61073a9c86fd7db12655a117edd4223","3a83a2afe970f19b052a0788db74199ce9e483a63c809bfb5e73a32493fa9480","802d9627ae0266a3f1a58eff366a08655851d85964e3a8fbb5e0f88b78f741d1","3afa1cde2398e3081bd31d85277ac529e66cb78cba646acb29015133711039d5","9f8929beba5b8015b7e57926f643fa20f3613159d5304480d5ffc9a8f94dbcab","bc58bb3e15e393d07447a3f1d077fa1bac309a2049b8e395ab02fe99ed72f5d2","f11f9a1d67876a869d99f3145cc63cd1db5ef0034cdbef3930366d4bedbb4d60","54152ff949273b841096858c4a309b872628e1fd71b5929572afdbf8e6972ae5","2b31116136a566c08f2eae951d71172365d02aeb7095f684afa44fbc2b9f7b4c","92307dd94cfb0ac601d622976f10278624679021d9b4c6f85a45cabf99ff11d0","ca89bcfc267f6844c95dcaf2952b161abfa88a5d6c30ba1d63e6e784d7fc90d5","b22b9588d6fcd635a15192411508a24130ac6ae82c55c7fea66bcf5753408e91","69da9257d179f2dc2e1bacfe8852eb4301fff47b438930c1d275b949382fd912","9a8b68f6890738b4ae116a662b6b44be7553892289ad6e1fdc810e4b193e02c4","b2c799fef2f83db2a3604c1c1402b4838898249920262731fdf6a77289acbb13","51cb90bf50d5d2a2d00c5f545fda3167783c22b328a6d33e429392b93d516209","5726ea415eee459efddf8bd50c10f7400273a57fd8dc3d57151e652b328872fc","7e2ca088c326d04643db1c30255f7ec1bede74c09ea190a351869734d8aa1085","4aa45fe87f629109259eeba322b63f4be0b35ce21fe7b7c25aeac50ca54353db","824fbd9c2147716a111d2620e8acaf86e5ec386fa4d54d2b718fe2a77d7299ce","16d160f0397cdb35f79a6d6eb3e2b6c059a0557fa0f67ac7c08b48eddaece743","440eac6e41fba99add73b42ef4e50da2f008bbe114e2c62c0cc303cf328832b5","7ecea9576f765ab161ea44e415c76475a2c66dc70788b4866c3e5e11092fa3dd","cefbd3c11ff2a8d66c078d323f8f3394a4ecb324d05910e40b2fe15e324c7b9b","7d4f144cc3bd5122b4fa82145a64dac96bdb81335a78effa24cb473bee4ec3e0","699eb3908c4db81ac35f40f525bf052f0675479474a8218d0ac01c2b839851da","dba61a7e471bf5151825b2db98cbbf08a697c8e30e3d3323c7d56066df0e7375","847ab80030c5a0570704af5baccb5f79da6245a540a25c1110575bdeb3194288","6edc3bf1facfb28ab6db246e18853c83d6714f47133874b2a8c3e59d015e1aaf","b7e4785625d92f0b12ce9302e34f4dae9ad98149e6a37fba6b9789105a56c217","a62dc16d997566082c3d3149fe10555174cb9be548a6a12657cc4811df4e7659","fb8f91a174bd96a3fc5174fa9e51812a4706166f3250c9014b77aa0cee81e6a4","95f17d89eeca73b054b34f26d91aaed589c556ccac2ac8dd1a59cd8b9c7517d3","36d340a49463a448d2d3b1eb4c2a62da754e4ea09c92848c07d62c8d3b3ddd64","1a0fc724d26754b15d02f70589e49e1510b5f031c16c0f36d033491b10e04e7f","20d7df13f5c0f787c1c7c1c66c13e38f65a6ce33f317971868784f6687ea1311","6111febce84b4710e447c60e17d350bcc66a26b15633de6a21bca6c1b657837f","bd42e75f00e559514fd8c0f8b1efdff737ebfd9dfc4d420b7942ac8921530b6e","5562936e2855eb85ce404bfa74d2bd678340b0e188d9ee51002ac4bb0f90efd7","c5eb943b1adad8a47c75a3a5994e078602d227ed1ad379c4f69a0df06ccc4982","f964c8f47956ebd6790b5f85c753c3a02ed97f80428d458da112701efa531e86","e5311e43122ff95645b583a1594471c4ada8ee2e0c915033310f8b6e35faa2b8","061b29f5901cf6e5075df73eaf060940684cb5fad8cda7daa4dba5d0c8493a81","8c5e22bb09bb7e396fecbd16438342715a8f2f8d747a0b8264c82753fa610f60","82fa37c8de2b352f1fa687c2ef167139122680e7e33b81059e196a79f17ae3d8","d3b9bd1e0e7cf1110c72f2c88c6368b3482339597584ee92c40eef4e1474dad4","1fdcb5089fe9fcc3a9870d120db60cc99aaa60c861a7751ab04e808cc8b41fd8","993970369eaf0685907de6beaf02a724bc5e825a618e727440e1c70a4d7aefd0","f5c87373923bd38aa64e582adfe18fd1121cae948d6b14b22e4b212402ed1318","0d6749f9522cdabea764e7e4ef90f36d15cce8d4d6a130d82de493a500495ca5","61cc506c619fc6b01125bf85429977d0ddd8ff85eb97c2c44e76a2feed3b9741","0172b7fa1834ae521c4f0e6a60cdf6f134a7bc3e9ea9139328e7d105678d574a","353e434635d5413f8cc0cc02dc014d2e80518dec03beb42eeb48edcefa3d19d9","e0acd5de151570de992d110034fbc446ef313391b96ef11fbb6372f24f4cd01f","0c4757684299f1e79cef07152c176cceed642ef5621a176f008a1daa48cfe9b5","8320ac9d1af2097dd0f146f5a61cec3188e1fc87c8b06150d56440a37a21aaff","81ded5824e3256137844d3da9d5e9dac2ef174ad41a23c47fd2aa92187776473","bf4e62a7052096266a9ef000a860c2dcabc0d8a6e99a491e1ecd849e4eaad4e6","541dce26752db36391695715fd07e23ab8365fe8f0bfa22fb1988040647f7220","addaaa4bdc115c69c6e94cceb4e9a78833360d0adc0224cef93c8c0533f2010c","cb67ac394fc7cdddbf955a43e68c1ed05b03276d8688b5070b1f445439a4844b","93c3f399a49a8f0ca7f59b77b20f15e2ea646d76dcc1aa67b016620b77dad7df","8808c90d091012683be4ed8717a2f60cc950aca514c10b43c796b76d73e37b8f","2aa8383c54f8fe4ff08402cb843a9743f66b4448ab8d662e17206c41a12f1c1f","32bf1f74a876afd0ffc272e5b3608fecb1da2da3bf29abdf0b63fb79a79503f8","d2998c46b1c0296e7832b6742b2079bb5d95208e9e00b668841223d964388c5e","e63916b13d1771a1a4ba88978e04c9095aa11bd71431ee35cf18c0641f5ead90","e06a8867a9a2ec503f9b8614734bb82e58824a4a2eee94cda1f522767993a973","ef7e6c333c1b36eaa8faa36accc28ae350874c80efb77c6f1e33eb8b5b4f019d","a8b4834a0506a47b4c7328f4477e41c046f5ec89975577c32a280cf895ee9b72","a8f7305348698c11d9a0fc1839d4cbb094cbf31cef96ee76bd883b0e2de243f4","71dfe61836aa4fdb3caa716917af367c8ce5a14b34feb092b6f6828125477efc","dca0b75bb270baf50f0c2d457c9554af09f04a96c9a30f24d9811821caf60d2b","dff8f02234faac11ec1098f7813a2f08b95b37d472a8eddb9864c2947ee28446","a8d2a8105510385c1581b0c4e05b35d1421102c86e7d6324c44457f4f552df79","030f27adaaee1cfacca3bfa4a177214de5ec43637e2e314c273adf7ee6151458","750eb28a121bfda70e7c697d50f2df3363e9d9b2b74c81088bec2d3bc8d3ad68","3f57dd7e6f67221339b13bc2b288d2b2cb4b3a9260f3f2d381cb19e046682dd3","8bafb5241d4dcde05aa64ea393dc9b683596686885a21d700d0731b38f1fbdc7","502b5d9948de17a1358e68b9ac80dad58590476184f314b2e440d381aa969745","7b8e0925554e436b354b3673de07547356d7985149b8babbb07f3c09782122bc","7246e9b6d9fc705a0990e7a0b6f92e8692d9190d3f5aedcccbd597d5ff0df7c7","d2b04e90889d746abf99b4c59486793f9fea741b705cfd4edab3d509c126477a","2c174b1dce71b4052fcccbb84bffbd41fa45e4442e183dafee599238b770e869","bed2ed24c753afb04dcec65f7568f971d84362fb51fcac820e8ee1855ea76bc6","1f222372836b1ed57997de12464e9e11dc91ead0c077c09520b48f81da40b9f4","8941f30402a12b791af6873dc5f67262b4aa4cc02edf5bf3282413cae2b3d549","7c4dbd82e16b34a81804383b9c28da2cbfad04ed7882ab654056b58a8ec94ec5","8d5e423573fa5dff24971d868f62bdea17b9b4d953b255b0067d312f02895ebb","352676f620ddbc4088b0978e85e39a713a7a470175b1e6c5ae3fd4dfa1c9d651","c70e2678280eb78852223365f81f11c6fb904daa0f22e9672b83bbe315598971","401edf8f46652f4dd13a4358b011c8b887f43f80ea0c5f6f082048a622368262","3dd786a4584f638ae3fb03ff809f138ce8f4d8e6e879a52e099cd33d4507ae73","236e49024cf65958ba8ae35a9f1c5d0f8b0bdfe041af414ca35767c6d4c920fc","09db36cf75bc53cd67d8fc8722ad858df44503d3167b5d49825cd4b8be6f4076","47c250c77c56a40fb602b45a7515ce31f2fb83417c4a96eb4039fdcc2895309d","fb607236d72aba12bf6df811ae50b7ac780a1ec06239525c5aeaf5be5ceaf3b0","a914d868f9ec6a488ebc253461283ea92009a07e9e0167abd36caa082d6d75c4","37c195bb44127feba9a6562aeee6308c94e649f600146c7dab350c7726a5be9c","cc62668f61863e8c4cfb5aa7edf1c675af6c770167861148223f74d6cf4a52d3","b5a3e5d212ff2df914d6883e4d0b46fcd7ece4933133ea816ef724423f801af0","cec7a459158b8d3ebc89a6beb9302e3d3dee70a02f9989baee7f3e426f283c79","d62a65c939304424b6d6b08ab97fb488dad098062c5ae90a64ce6e3f6b9a2af2","c81f6bce73f3c3d453a012ef6c3d0f28567f93cbcd6a9c6d2cb606e8d3a487a3","3ef3a61002755c9661191d667c2d491dc169ea302f60c045c9c1fd1774ac8407","a11253e1d20bc720789d85374a8f3bb2fb2db3d8dc50475017f1768f9adf9484","c47b2c8b92a16e532389b929c7dfa3ee41d47b69ce35c83354add05df0e99ea6","3b73783154d7a87e5952b09ab6e3d9d77ffe5e0c7120011d7eac6257ae55c117","e6416c3d6a90d1370a43f21ba361140ef2a012b14c5b96c6a824bb5295768a14","aa7443532c7c4fa930709fe30e0bf642e4040867b0c180278d60cd04f2832d20","269737ec036e6b904a583995a5eef3acec3fd58c7d9f5c752dcdb0fd790087fc","17c23451de85c6d5455aaf5719c4173aa4562fcd163fb5ba72a6bcd222741d4e","57ceab261617261d3bc3356322f0e5b971a8d549e0817f7e112b62738f323593","ab63739e2f5354d2829ece988d74f377ffcfd9072580c43878ae56c20a15e12d","39ef22cb2067a2b384a86e391705ea84f7481eeae0fa35d7be2545e896af3bcf","8b6a017a2b1d83bc1327b484bf2a223fab583b1ca750f11c1c2bb4f74522f600","0242e7d32b7c7fd9a7944c689e0b87c425dbd39cbc5278290469af2a8ab83ca1","f408fb593ad8b84ce2ac6040641475658060fc4c0efb24cc05804a1e45ebea88","3de736734eac8f35f54adee94296d2a086eb53a68be870e12c4d51eb1eeb5162","1707af876374f577f5b7ed9993a3715e192bd9558a0b7df8206803dcedd73fba","ebc138e51212ed0f884ac5310237298c50b48d45b7902597f85604ad6851cff6","3d276c4026971487be0dc16fb160f784216d19b79dc551ca9df72985c6a539fd","48a0a08da06c2251d2090aaae263ecd5f820a7b85ff0c42a0a13718f7e552bab","89b20c074a5abe9208d39e7153ab01726c44a9fce77e9b46bb86f3cf4882ad0f","caa3c9ea2ebb523eb857ab8019c0a1980e4d94250bd16a9d51b95210d0950386","af357489e64b057dc99b7f42852aa61972d1db4836a8c284c88db68ca8d9abb7","4cdbc6e2f9ea733c647c4f134b3707a66d7579455e2901dafb79f93d9127fac0","d5148561c435367869a0e6ead443cdc3ebcb36cea7f35fedaf6e2bcf9865e436","7c08e5514a423ea5d08163cbc21f3858b9bd5a7dd233c93f9dd8a02952f06db1","21a511987dd4319b5ea9a3723c07c5b8598b5a3e0fc22c720baf74759bcac3e8","3eea6cbdf32fce708775ac2c4d8dd9faf964a0408ceaa4f86f3ad2380b8bdd39","127a73727ba0f2ab580280c8a8228762bee9d33a1cc58b607132da57ae0b274d","7db22639eeacc5a7105a692bcaa13de10eb49382a0130922dbd7a3745a2c0f36","311cccecab649ce5438dfc8d891bb192fd9669fd0a58d9b8b09538978247610c","1727ed355e4e8509313556dc0a0fff5b5e636b49ab28f6bc3fecdce16b96c7cb","cf5e6d1eb6d851978b44663bdbb35e38d3cb31a7a4f787739a2ccfcbabad5176","8dd0da2e6dbe83f210166b3b28675c22f7b3c8cd66ca5ed948416a725ee8a73a","72e4a806db5cfec09a48c5a87a242e6ac4d433a79413eb8cf0bfa9527f9dadc5","f7cbd2a4d0149c99bba024defaaf5f6d87ca997316d9ad1c59336d7b5f0e581e","4cfa0530d70202980104c4b0e5053edab8e9b05534b74ffe53f39bfa0da3d2d6","e448f86b862b39e330b447215e46a0e16d92e0000144b7c6d7a4960ff7eeaf80","aa43139555f1aa62e661801869f5ee6eafff4b5dffa297b26089b9d5002399f1","f5308c02a5baa5114490988da2aaa844eb9e2709b1adbe02661f6a5a5920b12a","dbbcc037763d1b04677ca9547b511286ca031025df934efeff142ca4cbd8c137","fb11357bb5704cecdba8fe197e009fb4cdf4e549aa41150e0e2f61ccff78c916","1e4ead35526cd960fee44faef4725f27b3ca29363f818bf73a76b33d4e0750b5","678f81852d7e64789179d255632885b66027cae24146088e0061cfacafee4152","e8925419dc50fbbfdc7e9435988650f7232742763cb2a6cf0ae71f4ed76e4383","171792728ee2bad492204152640940a15304a58749b57459d49840afc9c4abf7","0c3412cd915aaf6145bcae2c5730b733ee717089c6fe14d0182d2055accb5500","d4158e6b810baa401b3fc374b3f5af9cf49c3ac367eb37d6f66300feadcae609","6a50c27254f43a06c80822a0645c0e8ec85bdf9c111540c6762a784a588c0201","81cbbaf1089bc937bcced90dd4f018dd0c11bc66a234e06b4dbaf8932e86f512","4d64f3826fdf9d29710e704f75dae5a691a9f3210b5c618a72733a104d199265","b4c990def8f1e184f2033dc8da367b124ce4ded291d9a5f8285266b9e638e13f","5edaecf61850e689c92168580fe06fe310b77280c3577e85fa937f4ba1986671","59bd2fca2c764fda52c249a0759d3057d6548606e1b628409eaa0d9c9b9f759a","ac525ff7ef0d54b4798d5b74e6b970efaa5801b5a1a9433ea6b5f49358a14178","dffabe54aff3652fe5bb1577c95c05326efc4fd3f768fc4270bec3c8434931b5","d548ae7c6156b677da39f06d228a89339765e2a6762f5273e71932c247f342b7","b8605131fd1cc77ef0ec0fa909f840e4a0017593682e50f8c3c3decb10443e69","f40cf16f9b6d2274dd6ad83e0679d51de268548c2f4b3f64a7b85b025edaa705","00ec15c82e4e5b5082ee95f281878201700857493f9e617a6b1f1558054d16db","aaeec79faff5fc86de8d2c34093167d96fb7fb9a8ea5703bb78a8db45ddf5553","01a54c0f358c3c2f704c1cfb7a9d17d1c1181e3402cf75b827967a4880b06d72","a1b428dfb854a2df4b9921c0ad9561d2b270088f41e6126c935ad7e74dc5ae4a","b5d04666cbdb15c6c672a78765c0e80af9b689518b9f4e603bd5d47fff789e8b","3a78bcdab37d955b8726e540928ed741d1a5546dee6ffc3de9c9d4ad834a1437","40d76080f9e55d4bf608fbfa425becff2ff14cd83821202e283626359910a59c","d791919d7f29ed0cd5c7f375d238882dab29a43aa07010a967c7e0cf50a2bf4b","79cd9ee099d926504d2c5281df43e3b013ed1cdb413808ce78c6c8e41a95ef07","e4eceee438d823c529f596806842c342cd8620088d41ceb6b756064c664f3a08","8fbf3eabdfa459a67d9f7d25d73a5ab4457bbf2704ed0225262bdf4d1f64e9a3","c02f0b1b01ef6df02734f8d776efd371efafbe4a4da559fd5e597a97005a2b7e","75a50890f1ba583165adcd02e72a62f68e733ed94e6919cb43f090fc9d049b6d","ea23e5ccd5246fb2045a764b0a1aba6cbc8566e68609c7b5f4e6624aacd2acbc","5fec3cd8cba2bb9025288a16245eb2795f1daf77e40cec8c83c0efe10d9e9262","bf96e3cd8ac82645c19c2ff81770a133c75d54b0ee98086bed5e6acdfbd54f6c","6d84b7cb7e4d9db0ed8ca5ab79061661f6a4e9ab1fb9e44e2df551eb1c5affed","ed82f10019e7ca0d4a04cf15f838ebd2102d45c71273f619bbae1f9012ecf6b2","97181768db0a446bcea80e6449e884f6d68d85e324e4ea923b2c3c284ab7b80a","31a8272b826e3aad468c7d378faac6bd584a207c33266e293c9a365fec23f3f9","86461eb21861b7f6f570baf4f58c50184ea4f29eb1ae11e9344a746ec1ed8a9d","7ca5cbc45d37cd33c255d0911a1cf346f94a8c55f95714fa1db723e69367d3dc","55584d80df8d11a0029d486e5c3f2139736136e6e9b5c105b52ac1f711d22afb","aa173b596a454f04c5e8d65353723b68c0c86a872ca6fcf4ded09921e39b2d0c","2bc76065771be133978a14314bf9e0a562a28377b113852fd89e76406135dba9","8206f461526ad23d935843b9154db3da603b72e2e4629c70261093ea6a4fa2a4","f2c969536e3b97cc4db373d347c4780cf0e0a0c17befb7badc9b5dbad7652fa0","c0f7e3054a476fe3bb35577b03af576cb2c9d0054a687bc4dc72cccd1aacc65d","fe990c9d7d8408b5a7e897b7bd705bf6b547c65ff20b450ed9234ecf3dbeae7c","5ad5ab6e4ed985a205b631c9deeb6a47c5f2277fa550f3dd30903dfd30e64e46","f98905b0043d1c0ad988a9cc5ab583acec308482d2c31d31da84c0616f2f0d64","ec033abf3a3102ab9cfa6a9e7dffd5039d4cb7cca132ffd26e2fe83f4b3e7861","2e4597763802a3e96d5efe9059e4dd976d410f5e5df411200dfd16c2e96fe4ed","291025a5b950003bb695197781fc77b2a1fd0eed93e9176ec6e1e6a21e195615","dc6d099154278a16fc5f7ea0aea33e91a79a7ed0bfc39f364cec08f36c3d00ae","3903abddae7bc93a45dc2a21044fda2e5828f5171406c894b8480c55a64be568","d3f03803d9165bd3cb740c0b304657adebb48bc2b92436b0e9ec4a1e6a14823d","d3b9079ef5d29d89219767d9b063331a74ab113fe837e620a02efb7f5920d7ec","44a1a32a8477427b076edf7911cc008fc9f01ed593270806812d673419893a89","3272ee1bd9d15f9c5b7ee04e78ad993cde0e9fe840cdb6745adae4309f1d6259","ea6914af1c8816de78e112f4a825aaa8ce1661cf3d002328fc523ba9b0fe872e","3f60955be9da72f0c8c536b5b9553da1d499f91ff38d844a5053ce5cd87a3b79","1761017a42df74ef2b3ef3764ca764d1b843ea377b5042c7828d3c81af498a94","c798189a7ad24587872bca1fc8c7b986b73297295b19a658a5e80c92cb05b974","24260141be30158c6242d2548ddeeeb19c7412997a759c81524a68b60811c050","4c7e372a8042e2e70fd52aa2668d6e5b892d45cb8519e1d02e69417bf5494a56","766d958840f9449394ff5ee9ac8a4c4ed9d86d65c2a387a0c2dcf728b1ad1c93","f0950ee2de5b3dce7a7bf2907e0f0f38f593611a79fb8421e93c097bac63cf54","a3b36911d8bf20bd2f3e43e3b2aff8cceda729f7fca3557e469d5ef3f23f37ce","cb3a04ad5c0a544478a85baaaa51ce6ea17e374773ac9b35e9c4fd5954171cf8","4caa861c4e842f0613db58a66a005b3fd4fcb0a89341922d1dbe055685ade863","5380c75f0cbab7c65c3cbac98e1a1800bc09620e9650a27490e91ec2b8030f19","ca9341a685db323ea017a909cec7162778e0633e007f60032d6995ccac7ccce7","22f26a9373ee588b1ddb3456d839db953fb3c6fed72e25d31c3b582f0136dfb7","f8d698c6794fc3c5116d9af4b75b674942947a58fb689bb9e93b30fcbd12912c","77e4ad68601bdc499fd7eb2fb60902568107bc9fcf0ac42f209b454701a8860b","e9e1b41a02b3114837eee6e57d8a65965b6edf8e82a406b19595069273c73136","e1e922a6918a483f15c54092d66509839306fd586169d08cce7cb568dda887d0","774f43648cb10a2b999b38750e948c662b79deb59996a4bb6b08e026e888895a","6bb62f95f072b3f9e4ea992709d0cb0b5404db6e43f276e18ff840223aab6e42","10916b0a66fbd2a9b2c4396e1823940417b2b6487df7ed2256f653bbb82ddc63","d43d918a425a086113ee6cc901185771c0052b9a8568fb240a1f6801e7d66cbf","28c2481527e93759b7a871a62d79a23aa8745fe9c4f4465ef688d84ded0eddb0","da4ebc8c9666e0893aa19779a33a9af11e3e1ececd858ea10e27d071f2714ed5","d6a50ecc2edc5c8d11b26681726b74249399eef9978f853545c099a2edd3b434","6a18a20d75ef00cb5a3915746d6ebc092364b49e23a76286a3a5689e36edacdf","d15169764fd16f79814993cd2dc12cc6d7494487dc62a78b33d33e2468b74011","013600ce63487c1696ea3b4cf60f401cdc24e74d1b0ac836a0193aeec632e2fe","da7f7f21cf449e1a9cc262b43c4fe9f5d272ce4c54dc972158f9034c06c8e68c","7fdc105ed18934e4499cf20809154e517c1c41ce3850a69ca61fa0dd587d6919","9c2faa7239c5785950d9852f56ddf2c66adc00f2279faca943ac6b283ae84fec","876f27bea23ee1bdcd7ffa26b38e150a67b0456c509e611548b6f986a7e9f90a","e959169468568c1cf3463df3ee7160ea2f8361619d1d10e2f62497059b4b0126","ca9be90bb0409c07e622a4e03b968974c5736cccad75533c60fb14dcbec7c73b","5fce52f0bfcaaa29de93470d9fb19a1bd52714bb8b2001b160ed75ceed1e174b","a5d2e760f70944dc42357d7b69e86dc74f33bf98e948a115357e1882d5230ed4","0f71d78c1866fff1148880acbed18aaf4ea3d6fa13ce7e1f29255545ee9a1f90","ec94d5d3a4f131ad79abfade176f9fb7472e6a8f202015bb4f7f29b0f0bf0e32","26bf29b117497cbef2cc48133940dcc84ac25eb2e8c59bc7a9065a786707dc64","d62cddcff2083b8a9b99bab5d47e65202ce73f32c8e970ab1515f7b07bf36049","80bb561bd66489e524790d47a287833179baacd89ae2b60532c7f92023f48cc2","456b7187f14e1d2477b74bfa9271e4825bd51183254624b44c5f6005766b8ff0","e4114911dd8dbd6249b4e508966e640e6c8a6d7d6620be759c1dbf104a9b1ed1","cadde74af3321fe5dfb348dc1d72e19c6a11475d990a2809aa8a8a0c968ff968","e8447d11f3a33668faee3a0175b0c0e7f653b46896d127b8b42402eb8e811ead","d3afb6e0fbb2ff982a1aa1f8192754d1fc26f5b80c9e1b79fd29f60a4c8ee4b9","a273bb46ef5465ad1fe1b7bb5b1fddcc119fe788c4e73e226834a186fa052798","a1af0abffba61d11fe81b8338e62f2b7f4e5ef73828a162bb380d9cacc54e111","6c8e9cb096ddabfa76e8e9ef77977a44f39cf77f1c8309ab1398b822fa3f7c05","94ba095ba3e0fc474c0106211ad66c7f6c19aad4d62af9427e38069d9c0ed3ca","c213260636f4285d47880791a15b1452a22ad47841fee501c08368cc6f93dbdd","706bfe9d17e578e4d5f546c9b66ae83fc08a86b2e2c640597dbe3b5666a272e0","f8f4cbcdd78975372b40f887fe6dfae1ed68b73e416319bbce7c953edca909c2","9e7c4846057815d55e1eaf27214286ec0768a1b463a4669e1ce37849b6cc1016","c850c70698b79645345bb3d781b9cbcab82c6f94ac1a801261ab0cece5beeef4","a1169652d59c748c5ec81a332734e2eb2a0294bc1abd941e39ddc1cf6c0a3868","8c627c78904e33e9ea3254e9a8c8b1cfa1d3f5482406766286452f9c8a5c06b3","de077f870623c23f0b66400d6e948ec3be83f591a7ae1343a6dc80f2eb64cfca","726f455f0c65adaedcf799b2f0670610294ce1ef9ebe333d78c7ff9fd932ceb6","4165eca67f3344524716c2818892d0330f3cfee91eb3f53eb9918c3de6351715","6cc7b9937aaf140567dffcbb8cc7e5be37f159d2d970a6cd6029804bde96498a","92d50ec4ddb64d487c7875f1228e210d3caacc906e1965ec3c4dd32e4030d1ef","a1b67f80bf98af46430ad7b494465b1ed5597c96b47248cedae3b01a554de9f7","50d04f69a9ba22994bd6e4cabd20ca24cd95040bd747c777d178fb993d4f4c4d","af4220aa50c809f7fab954561da809da8a218c2d27dda489a64fb2d4ddf030a0","3ae58316451195ddc9121caae22a11fcbfe413e016bc1769ad236d91992c35fd","6be7b7b6338faddd702df171c62909a9230ed5eed562c6611c772d939b1665f1","261c41c9919bebafccdef0c501c7eaf7034258b3c027a22b1166cd096834556f","7ac116a9a8c012220f82014b63dd744115d09a6fa83021f909c87ddac2e39cb2","dcace0ae137b984b07797e26916a923fda2ef10a4c7e93d6a853c2b7516f3612","6231cded9a3b79d8a9c355048efed866c8eaeb4f2cd395951752cdab6318da10","c6d860360ececa1e5e01a4b39fac1e9db8924627c30726932db4f7109f0a551f","947c89d7df64c322d26c487b53867889d340824e2845c0d87d5504bce6532542","44319d05d0f9897a465338569dceacaee5b7d8aa9883b46fd585cc7bad08860f","e3b9222330621eac375f6bc4b52ea78c8469b4c94ae2a8b09fb1d1c3113307d3","4485370e15e4376b92686fd39336d9027b26b371248e25e1cb2d0244e94a1fa1","99e8e188456e5dc71e60d7790267772ad0f22e854fef5d40d8ecb48981fc3296","b88c260399542fb51f72a67584d6390c0e1b68c361b3b927e817a57f93121148","3d478291a40c83d3e3dde0d82d8f78725e8c727aeca3483276649eceda315fe0","fec94ed8b3f32b29a0ff4b1d393d8abbe988c3689db6fae36bf9dc18c5ea799f","18cbbf6b5435252e0b8e76b51d80f697d188cc6cc023265982a83e82c3ad59b7","f2a48883bd34468767d72a12463abc79dfc968713363a28968ed7c20e88a60f4","0319c1171fff27474e6fa314db32cbaf2f18718f786fe2dcd5512cf30f0622d8","cafdbf1ffebb3354670421e295bda97e24b3d947d0375468885b1096408f7b35","42627c2284e23bd6970ea7ca521469f140b6abbf10286f31bd002b0c152ca63c","0937afe2eb89fbc701b206fa225bccdf857c2a35932e16fa27683478ed19364f","ad58a5c0408f9297576a7e5e8c63189a0a93bb2b33bdef332edcef900ce04d48","e1dfe6c074da6a71d51bed7a5e5653922f6570965eb697bc14e7aca5dd3e26aa","2fdba54a4e42205851d822eccb069389ffc0e2eb87dac0f4b76ce989c3f4bf0d","060fe85d5e1fdbbc9380e36685546b1e92431a3fc2eb872fd9222ba76d524bb2","ef0b484dd4ff90c8015aa2f7be803f0ef0155822534b8f9632667aa388ef8535","17e47fc7fa45d83560247b020755d70e77b4d627d46010fe9938f427dc5707de","83498540925959aa5c22f7341f58d810c08b62ee81fbb5cea2bbdf506f0561f0","20a964e86b18b09464d5263893dd1fdfaec3457bb52ec52ee958b31218e41c94","7d2b7fe4adb76d8253f20e4dbdce044f1cdfab4902ec33c3604585f553883f7d","db7b913bca77272355d5ad4e928f8060d3057b9e7586076841ac9fed5876a4db","bd4c4df6d56a6e65df127347fd7a3bd14bc2d1f2675fda7be962117a568c90ed","ad815ef1c08422148534344b38520472d66b2ca3db16b9081fbb5dba79d946cc","a1ca4035e0c1a7b9f47c9f1b917c1045cdd9a127779616cab4846c039e1336d4","ed3ce2909e9fe451aa8f79e8f98070c5061af5cc3db99ae416af16d8d87b7f45","e3d29092d719e94ccbd48e499f46209c8dbb62d4ccd5454be43763a71a78e7a5","7e6e35fdfc3581a130f0f5fbe189506273ca5645935ad5adb6fad91f27bc58b7","2167c3ebc2a6ede83721f5212162a650fe226cbd7ad0e6b444956811f12b4dba","66093b51dabdca5c8004fbd78bb31f9bff83d56fc903fb2f0dcb6f49d7823dfc","5e231bfd216f6bc3c9cd1679aafa993bf036cb62adda12b74b5b4e46a0f31f80",{"version":"c14856169f9aa2236e3eaa1748fca0998410c688c69eb248d3d551c220107857","affectsGlobalScope":true},"c83e65334a9dc08a338f994a34bd70328c626976881d71d6aaa8dc7d66b08d96","51ce227f2bea429203e9ca434553a6a13d5214f87276e1ed2fb068e1826467d8","d655233b800bf949a46bdf90c9830d1aa4e3017864e2f18ec25ad4c3511e891e","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"b934b72617b1474639ef1886668032537a2ed5dcc875c303dc33f207c64daac1","affectsGlobalScope":true},"56d13f223ab40f71840795f5bef2552a397a70666ee60878222407f3893fb8d0",{"version":"ad0d1ec49330f9155698108dcd923031626500d80006e94cc07102c7be907ec8","affectsGlobalScope":true},"fa9257e0d44930c1c6765fec51133a65721a8cdfc385d92926b64f78c662b7bb","6816b69b0921d55c3fe01e614a11af57e87209b8ef96b73c09bcce827a71d7d7",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","f0b2fdef21dda3803b6e59e1060a9f420a7b3a3d59082c403be4364292ebd941","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","73e88763806a21b32aff5a66d4930124606bc5e77f796ea3ff8b6878ff787fa8","ac4b69257d71eee424b839167dda625a771f0d20276beaf822b5e49368539df7","888ec73828164f7a89bf11a173f2e6721e777571c606f03b625956cce2365cf6","06ccebc2c2db57d6bdbca63b71c4ae5e6ddc42d972fd8f122d4c1a28aa111b25",{"version":"81e8508d1e82278f5d3fee936f267e00c308af36219bfcee2631f9513c9c4017","affectsGlobalScope":true},"0218d6df259111a1a4c6bc76cd538932c6c051fd2ae5754f6cb189fbbd0bb6fc","58e6ce808ad556f72c4b882546b7cd023c7f5804c854edf77b6a8a6b59b68644","8e2dd46692f03737289f1b23fc90ad329d726a8b234f756a1453d61a39587356","e220ee6feb1efdda44d46231bd68769fee59e75cad5f02d21732c8057bcb3cb1","288dd0c774a5c6e3964084c7a2bc8cc6b746d70f44a9892d028d04f915cf7ebc","d61c7c41eb1960b1285e242fd102c162b65c0522985b839fadda59874308a170",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"f7011a8d17a06e60dc591fd89b7bf40507d36a5a4d5913fa0eff4e18da001759","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","fb0989383c6109f20281b3d31265293daefdd76d0d30551782c1654e93704f48",{"version":"84f318e5d442b89f65186b61af2abfaaa253a067b3819ec55250e44b09b80a57","affectsGlobalScope":true},{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","22d48bfb37261136423ac687f1fa7bd4dda3083f767416d409a8260cf92bc8fc","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","77f7b6094b3422cc09eb2e919493287ed02380cff73d0452e17149d40dbf157d","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","698ab660b477b9c2cd5ccbd99e7e7df8b4a6134c1f5711fa615ed7aab51cb7f7","33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637","a4471d2bdba495b2a6a30b8765d5e0282fa7009d88345a9528f73c37869d3b93",{"version":"aee7013623e7632fba449d4df1da92925b27d9b816cb05546044dbfe54c88ef4","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","c9d70d3d7191a66a81cb554557f8ed1cf736ea8397c44a864fe52689de18865a","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"77c64e668dc7e3db451a6c966e475bc9594678a3675489dc8fc2c1240b83c524","affectsGlobalScope":true},{"version":"28bd780c376b5bb4fbd9fc97881d15066bafac834c6e6f5aa8eff744961e14c8","affectsGlobalScope":true},"196aeae43911b66bac5d87d7eba460c4d27561257737931f5a1e6e1babcf55a6","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"88003d9ab15507806f41b120be6d407c1afe566c2f6689ebe3a034dd5ec0c8dc","7ac7ef12f7ece6464d83d2d56fea727260fb954fdd51a967e94f97b8595b714b",{"version":"9c52d1e0414faa6ee331024f249f9c1ab11a5c432c37370c2c74ba933aee25fc","affectsGlobalScope":true},"57eda4c4c04a1dca45c62857326882ce9cc948c4b52973c0e3c3b7e4c3fa3990","0e0b0baaf6e3845418c2741c9b47478cf6fc086ef8dd5ad4b9ab91499e51de28","ca6e8a62a3e4f5cc3fea6ab45c2e5e128db4d90d81d70547a65047e3f13996f1","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","1a7cc144992d79b062c22ac0309c6624dbb0d49bbddff7ea3b9daa0c17bcac0a","1a7cc144992d79b062c22ac0309c6624dbb0d49bbddff7ea3b9daa0c17bcac0a","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","3b043cf9a81854a72963fdb57d1884fc4da1cf5be69b5e0a4c5b751e58cb6d88","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","dd5647a9ccccb2b074dca8a02b00948ac293091ebe73fdf2e6e98f718819f669",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","a1c79f857f5c7754e14c93949dad8cfefcd7df2ecc0dc9dd79a30fd493e28449","8566fa84085caa46340393b1704ecd368491918fb45bd688d6e89736aec73a2f","dc33ce27fbeaf0ea3da556c80a6cc8af9d13eb443088c8f25cdc39fca8e756f6","ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","fd326577c62145816fe1acc306c734c2396487f76719d3785d4e825b34540b33","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","cab425b5559edac18327eb2c3c0f47e7e9f71b667290b7689faafd28aac69eae","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","6c1e688f95fcaf53b1e41c0fdadf2c1cfc96fa924eaf7f9fdb60f96deb0a4986","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","6d969939c4a63f70f2aa49e88da6f64b655c8e6799612807bef41ccff6ea0da9",{"version":"b2fdcc3836d425833af10e536ae5491c34e218bc71870f12a401720f874b6ce4","affectsGlobalScope":true},"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","626bccaba2f61f03abe558a39501631565389a748bc47dd52b305c80176333c1","3663d1b50f356656a314e5df169bb51cb9d5fd75905fa703f75db6bb32030568","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","74b0245c42990ed8a849df955db3f4362c81b13f799ebc981b7bec2d5b414a57","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","b9f96255e1048ed2ea33ec553122716f0e57fc1c3ad778e9aa15f5b46547bd23","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","a1a261624efb3a00ff346b13580f70f3463b8cdcc58b60f5793ff11785d52cab","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","656424ca784760c679bf2677d8aaf55d1cb8452cd0ac04bbe1c0f659f45f8c11","bed28de34a5dd2b08d47b584da338e5fba92de84ce8727dd153d9ec16bc0f2e4","9d7673eb21625c65e4c18ae351a7f64dbee479711d9ca19b4357480a869ee8c6","6745e41d07e777a049bb25425bb1c6c1a9b437bc2568ca8eef03daa8e8913ac0","fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","b4358a89fcd9c579f84a6c68e2ce44ca91b07e4db3f8f403c2b7a72c1a1e04b6","f7e133b20ee2669b6c0e5d7f0cd510868c57cd64b283e68c7f598e30ce9d76d2","e9eb1b173aa166892f3eddab182e49cfe59aa2e14d33aedb6b49d175ed6a3750","7693b0547e3b004443fa1f4327b61617e7317757a3e947ccc200c91111c77eca","9764711e9c9dd50a87bb08f1b5dff3abdb9c8dd500777b9908932c45381126d9","8a1285bd27f3717fbee30e79502d603908f69b9815992682f948da70a8ccc6d1","7d1b1c3ab41597780f02dd80c9ac797dfe8f57ea5d6ca99fc910f695b2e01438","064ac03a8141188b9d5ffbfabf32d923e61f8fa6db97b6d164608f43a6c26fe0","160b5730ca7e6d145fa31a69ce859d43f16590829a9c67a28b2a9dc61b5a9263","b6c14e4a3d812bc972e9193bee0f1025f8ec0c0f2e09a2becda8b924ff966360","86112f3c5926d6d259c26f87c3bd9b070c491a2ac4fdee00d921cf41a8b339bd","fed56561917bb49fd85453c70d0756c2bb3fcc50004b2163979944bac451dba3","82db2f05f8d7f32975fccbb3a51d12c4c78e19053568d956236a24d90511a490","8d7a9d62859bfa613cfb03f663aeb589eb1b47db70995b6551cd5944ed64b101","e82ee3992f4be2ecfe7e423fb72b5e925d631bde1c29b51b75dca1f11e1582fd","4856886035f7c5018871f5dc04ebc02ba8340145315dfcee58a5a7cc98b6cbbc","337a8fc9c94a375e84904aaa5572fcf331839ba871eb834af3665158f532a7d4","97f561ab6d9524d8a13a1d294d4d1bf2dbaef4f689493ce770519795b7f93adf","55c99108d658e4a834d4e1f11719400117ef52cce0699959ae86ef2fc42c7d79","d84e2a13989decbb8428400528850d628900daa1c07f15f8476f967f533d6c71","31859fea9d1ae6618a13c79545519a0095505dc0a6b44785d9d1830bd1289153","0600cc4f9b5b639b63b0c25e869b76d7dc78023018f3b1aeb9596460b94c137e","9a2aa0246d885b28eee53207ab118ee99d583b56394c4651a912453e3032ec01","7108d5ae8a27080b178291373d9d5fb56f93a30be42e1f89c06960e393be21e1","c028332d0042231b71a867175027816f12e89143368255300ce747d89cdd7015","6b26577c4ac04c2b6c4fd58e9333f62f345dfbdec7bf21399ff6495513805ddf","51b4ca86d69860c3eef276667a5daa7ead1f16e62a58b76d610a901d36b9e6a5","4eeadb5094a05f61accb3ecac48a607abb57a60e7967282a798e33a7c7889880","9aa9f3604061edf424645090a355f8d276bfac833b6e471eeccda49dd099b534","52fe5499e9a0318a7b711f018b7e6f326cc56b0d6c07b82b583c440100655980","e8cbc84550a53fc46c701c9650162cb6b39499bc58d9764778a1280f4b48a088","5487b97cfa28b26b4a9ef0770f872bdbebd4c46124858de00f242c3eed7519f4","7a01f546ace66019156e4232a1bee2fabc2f8eabeb052473d926ee1693956265","fb53b1c6a6c799b7e3cc2de3fb5c9a1c04a1c60d4380a37792d84c5f8b33933b","8485b6da53ec35637d072e516631d25dae53984500de70a6989058f24354666f","ebe80346928736532e4a822154eb77f57ef3389dbe2b3ba4e571366a15448ef2","c2cb3c8ff388781258ea9ddbcd8a947f751bddd6886e1d3b3ea09ddaa895df80","f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","98a9cc18f661d28e6bd31c436e1984f3980f35e0f0aa9cf795c54f8ccb667ffe","c76b0c5727302341d0bdfa2cc2cee4b19ff185b554edb6e8543f0661d8487116","2a317fff5810a628d205a507998a77521120b462b03d36babf6eb387da991bee","f5ef066942e4f0bd98200aa6a6694b831e73200c9b3ade77ad0aa2409e8fe1b1","b9e99cd94f4166a245f5158f7286c05406e2a4c694619bceb7a4f3519d1d768e","5568d7c32e5cf5f35e092649f4e5e168c3114c800b1d7545b7ae5e0415704802","eb94afb533a949c56d2e1a2dc2efc30a6461d99b8c14203f62acc581075b84c6","d57dc90cf2914e9715ca06526e4359687eef4609a855e627b27ec02f520ed141","2c72068196824b34051a7e36d6b40f0674ab1688b6ae7065c86a7e4e06b8a42a","f849ecc47ea31a2865f4ce486acb695e069373bde23b007ad553309ff827a0f4","930307e0325aa06e5a44cdcdcd6a4264b5c9bd7f550741a8200c99d249924bdb","b6698642d6d810f41c1e097547f0d198965bf3e368ffceb1bb334d315d7b90d0","77501dd0dc066ad07724489d2963d8cc2404a4321bb2af3e94fe2ca0abad3748","d84dde63862880c889e14ea335ea9121386bc5083583e63e18f30eb33ff61e88","ed632676e0948143136adf72a84ce9aabc7ffce448684f25b1e4846bf69f0482","5d4df8c9f8abed8279c174d9c60c3655357cf104bcab5215b1d6b5d6001db86c","ef75f365177ed58c756044035983a193c7429b9bee22ea00d623cd7fd075940e","bc4415c6ba0f39ec85d4bc18b814ed2b8bd5ec383b114c1831c466bc4a81a1e7","b964bbfb128776de105cf51b89068a88c5f453f3da10cc09ed55dfee1f623357","6f8826e3e6ad422c1640bdf49584fe27393007db9c2102975540b811f7da7114","4650472d5e9a88ae0201e4c8b3b5b7cfd563d73cdd58cf6bf285a786f961459c","11941686ae11a1df09867c4c708804ea4b784340bca08475c2f54faa4c7312dd","45661a01b995096a7a5bc1ba5bd62ee4796b76e2672e77fed150f4149dfe680b","9a1466470d6c6ad67fa196db6349c069437954b6d50326dd6900bf82c916f30a","2103b3929e059d5ad0f309c2df59130f3318cebf3374e8585344d7f569d29b50","7d32292417987c8f27481cbb1e02ed929a93f28a544dc9ed6b06cc87bd0c7fb7","6a8541f64972beda81cf0a7153834f2ce5ad948e4a5d1874df23bf9b3af0412c","51b6041423db970ebefd2c82090c1e5a609567451685d9121988024e4877d245","fe7858617d56c01d33a4f2aa07fb59afc2ec25e2e21a65d6195d06c54ad73324","634dc12b645d9778863e756e228df771fe8f0ff1e9a66ce9f9170671a12c10eb","3fc0b6667ae8a11d159b971eee16d48ed19258cc40e84e868b887bc9300719ef","75a4036897fe1f22ec67b53243794d0678097f9446055464f5fc70acae27a581","85d984a7e1df02180d45d73422a8f9ddffb612b82f5798e99a9d828728954f94","344970be0bb949f4eba790269cdc6f8bde9a8deec139dc752a84c92edb0f8e04","041db1e87b5bbe7906050219db4685b8bede8dc3bd90e6a872d50f10fdf799dc","5c70d9c10523c301ff49da01161b355dfc475560dabfb51a78e43f9a8ffa33a4","c1ff8b883bfc2f121ee6321569238c77a970a577df88743a508be6a650016d31","81c993d28cb68e34562400e27bad5a8a473745c10bd987a520496dc87dcf9b25","66e5935ebb1d30a66fe5057325d4789ec8ff5c067f5f41a04874830f087f2bb7","1c7e4a0d444fe2da1e6c552a4a61644a09dc103c7a229c66f015418f931aff00","0c61dda8d874351856552fb11fbd9c9bc14f101dc5a022ffbb23cdd81e46e395","9057974336ab8820d5b75b34a87fb25e147361107973f0de204aef4cd43b4c20","15b82e9aaec4a13ee5294f4735dabcf33cb21dcccfa4c0ca9ae99340724a8eab","73aed2d115f52cf593e7b79d8ac50d13d7b2eaae84a358b12991d464390ef8d4","e2fef5d21ffc32bd9aaea37e3de49122350ef0d69c6966174895530e8f6b1975","c91d8057814e1734d7c5d92cbce0813733aa835feeb323f1bc9ce14289deeef5","674a3dc13d859309c44b890dd33974fcfe8d88aae34dc8475b06324d89a30ebe","f15fb8ef7b3caeb40d3d1983b97de2f364cd90116096f0913a76dcd9c878af70","52d92a0732ef4e9197e04768dc112e7b54acd3a45247837328c3aa74025fc7c2","347e84717dab8c91ca34f6e19e2d3e00912d73615d4aa96baffb470859179755","0c09b7fcf2274f771e4bbda7446b9d152a3ebfa7d5c5b2f4b6b0e8fd1504c076","971ee8138ca5c258da1c52d9a431d55eda25b72042ba2a02d5bc5d256649b116","e3f2204febc95c35142202250624debbbedee84d112fd04bae9e078e00ad7bf1","464579134297cc667140d83eaff4c52838fefbe8da34411a6d51967bce55c8af","023dd8d594eb4cd812cb2764414fbefdc1958b893f0a3904350ebea1fe6ca8a6","7731f90b03432c5f2796297001add673be152d6bde5f5a041d46c58f3f17c9cb","a7f8c6ad6c4acacf6d1221112be83795abcddce132116f7bfb1ea9f8e6efd311","acdd42e2aeec1a0e240b07421b550247c55fd22182087b0250e7772a14b6e752","6149f0d50450fd9caca6b1127ae0cbb714862d6f0b254b75e92fb3955305ea39","26d4990dea0683ce5e0ced1bec20e266e9a7af7c95fb9a04fcd428926c6aa0c3","21799733e9d3118d87736d9103cb096c71a07d60c9d8d52f9fb14c0ac646b2d0","358de0eaf54eb09328512259573bfe70d6efdbd1e014d9c75d7fc87768d2909b","d47caa1b38569776cae336d8fc7703b8403013cb230ba7920305327ed0a377c6","34864f625b8143c63a9d0f18f0792ac59688ec6ed9c2ebbd7f2a6d3fb2969a13","864c4a707dbaf5127fc40d7a96e541d05b8d88b5129cdcfd2850435bd3bb90d6","d8a9d8c06be68531702ccb8e3c123b6358660b3ca87f00624e984fda60ea2ab7","cb0bf4b6a49fe19baeb5b1fb1c1682dcdf66cd8abfb3a99499719669b4315c3e","cba525d08e2167b05180dabe0a7784e9b3e292c4ff439372827a7a7c4b5e129c","747c476518a7b710d032641e641c5ffb7b329514bdba4213c276a14799360228","c1b5cda3000f68126de279e94c97e08af97502127893e61c88661441805368b7","37134b4d62a4a84e33f1980f4e43e4f8f988c52e6267931788fd93423bbbbc24","82b2fd66587d4c1028b1a178c0997d9a3d261d6fc73d4f84b15b30fcf46456f3","4d170d05f9c68a28dec552b5382a0e66031a3644954e9c383f26e22c6bd8c503","60a0ca95f29f7c9896cb2f673dba3458c60ae9e9351e677b5d8fd964ab2e9392","94178e04d70cce66e8c45789f5475a6d220d92832d2dfc06cee39cf19bebf6fa","f43bf91240d66e67b18a2621a75e31e67f418cdb9ba2d0135a905fe4a25f1ce8","a7f2c4e68794f763a25b7895a57db3d70f2feaf22ccbca68df4bc96d696d5c5f","009acb63dcd0e8fd1c959d7e0297d6f95a4c5565ed712c7a117dff559798fda2","d3e479b5cb24f4fe768d5bc7f961bd215d0ef3a6994f4865d48d0e7882c2e631","e829051be498b66bf5350adb6e9c0f2d79d98fbcd6faf6bc688f8b4644612e3f","386d74f1e6947c10eaf5e9974583424f8eb0c744b85dafcea8cf2799a527a385","65ceb367297a12f2e758d7d9b8b82f3ef272ed986e0167d8abc2f74d14dec449","1ad48bebbbe1fc750c85b52004c275ac3bbf29e28c7ee85aed9fbb10cd2553ca","7ac36a55b0387738a0890696fc42b27f2fae6f2de195fae86d3db9b300aaa062","9362f44676071b1fac20889ec3e436d73966a8f28ed33ccd733ae68740c6b93c","856f12b0e19ff9bdf0a82659a33eed57185a6880fb25a331fba0a8f1f7061c47","ca20a9fd1cd85947f6ddd21e4e4148dc958282bbcc320ddca59621678aeab54d","ac9d20c49bf26a18802cfae968cdee10050a74e02bdeaa4d43b4adf2b2f98c31","8a6998fb8567e5b868df0664b2d59a57b26f33dbec874cacc1fcec15fd970e64","fe04a77761a0e2a2664b032a78262ce538ac2bde2e92d16841fcd0e567b37c0a","d6cff435e8177dd56937f23d5d9069aaadc850b040b6680bf4e61679bb21b2e6","a85886b0850bad64be7e7acf7e56fb7ea3ffffd3ee3901c01b2345162bd5d5e1","ad97f2e2dfb1478f1ce410e3b717cab85ae22e044cca1da8992714ba1066c34d","ac8c1eda841c6c13c31fa7be583ea73b5bad55a2949fa1238ad48d978b6cee15","503704e476c9ec10bc3e67520e1412145499c8c9e482acf2da80e1cfe59e0e60","0ffc6b30a950c1d7843ba381048503a89ea9acefd8edef49ddb0fe99c4697ddb","f605e543c4bfccaa4e6246bd517bbeeec00e745a5f7fb5b0a0a8e8aff493e4df","712755f18f5dad7207d42498a1497ae50507207f3c1a968944e7dda72a970bdc","ddb19ffcdf9959d765b126e4b135d4cf212566bbf0bde6852323a260e0c0f26e","c28b849f8211024b8ddeec3202c7a7600f902e3218009441faf845ba32a1265e","273f4e80ccb9aa5d56106abdf9dbf7991ae806d7017c53ecbfe658ae6448346e","a65d0fb8dce2ccd0ca448c7fb3499f3fa9e346ec572f0c27d942c081a05c245d","ba8f1c0fa9d761daf83de565030932f9036c57fbd60bfbf1a8432fe72437727d","3afaad1395dfaa2b077eb6ac843432a45af3b4982bc7163e90580aeb9f840831","d34655825ebc24da098276aa4301281ff086859568d9ac46d9abacc9ab4a4657","5c86b6af74967907c4655d64405abfd986281159294ec997906c04b0d4bbc2d9","80ba4067392cf4b2193d539dbdb4cef17c7cc876fb849276861e11e9478a43cf","418e7ad170cb62e0ab8d921a5c4a5a913468050f54f4d6a346b0acd48309722a","b8f33e4a3416072f88692fe50a3c05c859f981c1b620a43360512db14a10ea5c","4b6c98445cd593d52437a7d5a310dcd4d4acd086fd03f548da10ccaaff7c8cf5","d7d70b2d2a63d189afc13d80a5b68c5b0cf7d02cc6fa1e03b8ef87b93d55210f","f550cd86ca6ce8d0988639b967c4ed3d49d823a48ad87b5df77645dd7082b0d5","046d9123a02230dcc01278db49e3aea5ab59a1033fa5bfb92be0047086fea2c4","272a9d0390645b3db0a1b98616e7f37f67d38507920d6704faad63a8615848ef","1fcb8b15db812281d69a3090d488903f9e93033004aef9d8889ca3ad0753a96f","bdf5a95eb0a2dd1d39805bdf51b46ba012bb9b92b2ddaae16219595bba7678a5","9f794a0e8550a03baff865a3961cc22afbd85bc4ba9672bdda036971928f85f4","66a697d1e4cdbf25cdce4644a8085a8563041fa8c7731d4d9f5e8f22e66ba72c","a0c8e17f4d1ea2704c62d7349bc3b8d9a12e3761b5960cb44144d3f0333b3fcb","3471c0df3d0391e1dffe6e8bf150294531b2b71a2afa5f2b86e52bf84a5db60a","5d4df4de055eddf3187094f938a640f8d96e4c551a47d6686596fdb6ba4c3014","8bc2cad630da1033c1fd8d7df2bffb18af0da6113bd086a8bbec04a2471a1e00","a1059d1bbc8ad46bfe668b8450e7e8002887c4ab987bdb96d6108d8023f8bb8f","5134885e9648e2c6745f8aa1c3e7f5ab3b3617258b3d81ca02de6655ede3d74e","57f50c6c0bf4fc7e0e5c6780c82a632463a8d084f9a646a4bb569d583287d4f4","457e8d96dbe3a99af586632d666d203cdcd9fe85c57d80a7f09e934b6d51f8d0","fd583efaca2c616317d662111ec0e37268873353310a558474c8d8af85b4013d","3821663dc2b3bfa49ed679104c92452c2c95812becc122757d199472d1381763","6d3856cf4a0896f78869fe581820ad08a3e579cf7f2273e4e848d208f11579aa","cc85e44779900ba71b5068e78dd21eb91d6abb643d499dc167ebbc3afecf1d61","939048ad3ce1f0d3e937a9360dc22fc36e9d1bc1abe3bdf444cfbcc3def8992a","aac718097f25a3b5907124e462c1adbce1ae3eddb9a2ee2cbd89194c4ef8a6f0","1442a75050bad91356b11dcea6dfb877154d1f2e00f863a9b17ba5e903659503","7fc9c58237c8e80c0f4812accadc896453bf369ca10198b23f210304c921f6ea","6c8d980b4d9fc04a89ffa3a6f3eb6fc114cd160a2f37b8c426bb2bbd6016de26","e505fc108417f2cdc32afa758f7dd52d96ee8635de7af714c2b28ccf2bc32685","af7fd2870746deed40e130fc0a3966de74e8f52a97ec114d0fbb35876ab05ca9","b187f2879a16a3f843472814f9b93c445e21d1b9c0600d1b6faf02e9e5bffc0b","ab093a307eaa4c4a97c5f219320aeda8d9cc7a50548032973c02f505a76e9187","43a4150b910aa81033f7adf077e76d6ed1e569c46082c32e6d1d6ab1678377d7","7301a7544a127c860e8de266bfd348293dcf8c9822c5123ab1cf533745d7c0e4","9398a0f1e4385f30d59b81b695884127c6c02836505d3d50ce3bb0d19bbe26e6","7994500b2750ab3ca65d61488c9af7970d663d870d69ef3999d2ab6bbe558111","b5e012cad69d351ae22d9151dd64be8323907fd226abd45010f450e0006ddabb","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","6e6cbf46b6d75d417f37b637037fb5d97a1d9cd0c1d7fdcce16d86e3db9db458"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":true,"inlineSourceMap":true,"jsx":4,"module":99,"noFallthroughCasesInSwitch":true,"removeComments":false,"skipLibCheck":true,"strict":true,"target":1,"useUnknownInCatchVariables":false},"fileIdsList":[[65,985],[61,985],[61,66,67,68,69,70,985],[61,67,71,985],[61,69,71,985],[58,65,985],[71,72,985],[985],[425,985],[416,425,985],[414,415,416,417,418,419,420,421,422,423,424,985],[431,985],[425,426,427,429,431,985],[425,426,427,429,430,985],[61,431,985],[61,431,432,433,985],[434,985],[428,985],[414,985],[413,985],[290,292,985],[61,63,291,985],[292,293,294,985],[290,300,985],[61,63,290,291,299,985],[300,301,302,985],[222,985],[304,985],[61,312,985],[311,985],[312,313,985],[311,315,985],[315,316,985],[290,318,985],[61,318,985],[318,319,320,321,322,985],[318,985],[290,327,985],[61,63,291,323,326,985],[327,328,329,985],[290,376,985],[61,63,291,339,350,375,985],[376,377,378,985],[61,380,985],[282,311,985],[380,381,382,985],[290,384,985],[61,63,291,343,985],[384,385,386,985],[290,388,985],[61,63,291,371,985],[388,389,390,985],[311,392,985],[392,393,985],[409,985],[61,63,291,408,985],[409,410,411,985],[290,401,985],[61,291,985],[401,402,403,985],[291,372,985],[61,291,368,371,985],[372,373,374,985],[61,369,985],[369,370,985],[443,985],[61,63,291,375,408,442,985],[443,444,445,985],[290,450,985],[61,63,291,449,985],[450,451,452,985],[291,457,985],[61,291,305,456,985],[457,458,459,985],[290,464,985],[63,291,311,463,985],[464,465,466,985],[291,502,985],[61,63,290,291,303,501,985],[502,503,504,985],[291,478,985],[61,63,291,477,985],[478,479,480,985],[291,471,985],[61,291,469,470,985],[291,468,985],[468,469,470,471,472,473,985],[291,495,985],[61,63,290,291,985],[482,495,496,497,985],[291,491,985],[61,63,291,490,985],[491,492,493,985],[61,506,985],[506,507,985],[63,397,985],[63,291,311,323,396,985],[397,398,399,985],[61,435,985],[291,311,371,434,985],[435,436,437,985],[291,295,299,303,305,306,314,317,323,326,330,343,350,371,375,379,383,387,391,394,400,404,408,412,438,442,446,449,453,456,460,463,467,474,477,481,486,490,494,498,501,505,508,510,513,517,520,522,526,985],[523,524,525,985],[523,985],[291,311,371,985],[396,521,985],[396,985],[61,323,332,395,985],[509,985],[511,512,985],[511,985],[297,298,985],[297,985],[61,296,985],[344,345,985],[344,985],[61,514,985],[514,515,516,985],[514,515,985],[311,515,985],[324,325,985],[324,985],[61,323,985],[61,331,334,985],[331,333,334,335,336,337,338,985],[334,985],[332,334,985],[61,63,296,331,332,333,985],[336,985],[61,333,343,346,985],[347,348,349,985],[348,985],[61,339,343,347,985],[518,519,985],[518,985],[340,341,342,985],[340,985],[296,299,311,985],[339,985],[405,406,407,985],[405,985],[311,339,985],[61,333,346,408,985],[439,440,441,985],[440,985],[61,296,339,405,439,985],[447,448,985],[447,985],[454,455,985],[454,985],[461,462,985],[461,985],[499,500,985],[499,985],[61,299,985],[475,476,985],[475,985],[61,346,482,985],[483,484,485,985],[61,484,985],[311,483,985],[61,333,346,486,985],[487,488,489,985],[488,985],[61,339,487,985],[61,63,985],[282,985],[279,280,281,282,283,284,285,287,288,289,290,985],[61,63,282,286,985],[61,63,279,287,985],[61,142,225,249,250,252,890,985],[250,253,985],[61,142,255,890,985],[255,256,985],[61,142,258,890,985],[258,259,985],[61,142,225,265,266,890,985],[266,267,985],[61,63,142,269,270,890,985],[270,271,985],[61,142,273,890,985],[273,274,985],[61,63,142,225,252,276,890,985],[276,277,985],[61,63,142,269,527,530,532,533,890,985],[533,534,985],[61,63,142,225,536,916,985],[536,537,985],[61,63,142,538,539,890,985],[539,540,985],[61,142,225,249,543,544,916,985],[544,545,985],[61,63,142,225,291,547,916,985],[547,548,985],[61,142,225,550,890,985],[550,551,985],[61,142,225,265,553,890,985],[553,554,985],[63,142,225,916,985],[556,557,985],[61,142,225,228,527,559,916,985],[559,560,985],[61,63,142,225,265,562,916,985],[562,563,985],[61,142,225,262,263,916,985],[61,261,890,985],[261,263,264,985],[61,63,142,225,565,890,985],[565,566,985],[61,63,142,225,269,568,890,985],[568,569,985],[61,142,225,265,571,890,985],[571,572,985],[61,142,574,890,985],[574,575,985],[61,142,225,577,890,985],[577,578,985],[61,142,225,583,584,890,985],[584,585,985],[61,142,225,587,890,985],[587,588,985],[61,63,142,591,592,890,985],[592,593,985],[61,63,142,225,528,890,985],[528,529,985],[61,63,142,595,890,985],[595,596,985],[305,985],[61,142,249,599,890,985],[599,600,985],[61,142,225,602,916,985],[142,985],[602,603,985],[61,916,985],[605,985],[61,142,249,269,611,612,890,985],[612,613,985],[61,142,615,890,985],[615,616,985],[61,142,618,890,985],[618,619,985],[61,142,225,583,621,916,985],[621,622,985],[61,142,225,583,624,916,985],[624,625,985],[61,63,142,225,627,890,985],[627,628,985],[61,142,249,269,611,631,632,890,985],[632,633,985],[61,63,142,225,265,635,890,985],[635,636,985],[61,249,985],[542,985],[142,640,641,890,985],[641,642,985],[61,63,142,225,644,916,985],[61,645,985],[644,645,646,647,985],[646,985],[61,142,583,649,890,985],[649,650,985],[61,142,652,890,985],[652,653,985],[61,63,142,225,655,916,985],[655,656,985],[61,63,142,225,658,916,985],[658,659,985],[142,916,985],[885,985],[61,63,142,225,916,917,985],[917,918,985],[665,985],[61,142,985],[667,985],[61,63,142,225,669,916,985],[669,670,985],[61,63,142,225,265,672,890,985],[672,673,985],[61,63,142,225,675,890,985],[675,676,985],[61,142,225,678,890,985],[678,679,985],[61,142,681,890,985],[681,682,985],[142,640,684,890,985],[684,685,985],[61,142,225,687,890,985],[687,688,985],[61,63,142,638,890,916,985],[638,639,985],[61,63,142,225,660,690,916,985],[690,691,985],[61,63,142,693,890,985],[693,694,985],[61,63,142,225,583,696,916,985],[696,697,985],[61,142,225,699,890,985],[699,700,985],[61,142,225,265,702,916,985],[702,703,985],[142,705,890,985],[705,706,985],[61,142,225,265,708,916,985],[708,709,985],[61,142,711,890,985],[711,712,985],[61,142,714,890,985],[714,715,985],[61,142,583,717,890,985],[717,718,985],[61,142,225,720,890,985],[720,721,985],[61,142,249,269,725,727,728,890,916,985],[728,729,985],[61,142,225,265,731,916,985],[731,732,985],[61,225,701,985],[726,985],[61,142,269,695,734,890,985],[734,735,985],[61,63,142,225,527,546,608,609,916,985],[526,609,610,985],[61,142,686,737,738,890,985],[61,142,890,985],[738,739,985],[394,985],[61,142,640,742,890,985],[742,743,985],[61,63,916,985],[61,63,142,745,746,890,916,985],[746,747,985],[61,63,142,225,745,749,916,985],[749,750,985],[61,63,142,225,251,916,985],[251,252,985],[61,142,249,269,527,611,723,890,916,985],[723,724,985],[61,142,375,916,985],[375,531,985],[371,985],[61,63,142,591,752,890,985],[752,753,985],[61,654,985],[755,757,985],[756,985],[61,63,142,759,890,985],[759,760,985],[61,142,225,762,916,985],[762,763,985],[61,142,686,730,744,765,766,890,985],[61,142,730,890,985],[766,767,985],[61,63,142,225,769,890,985],[769,770,985],[630,985],[61,63,142,225,449,527,773,774,916,985],[61,772,985],[774,775,985],[61,142,249,305,779,780,890,916,985],[780,781,985],[61,142,269,777,890,916,985],[777,778,985],[61,142,637,783,784,890,916,985],[784,785,985],[61,142,637,789,790,890,916,985],[790,791,985],[61,142,793,890,916,985],[793,794,985],[61,142,225,899,985],[796,797,985],[61,142,225,799,916,985],[799,800,801,985],[61,142,225,265,803,916,985],[803,804,985],[61,142,806,890,916,985],[806,807,985],[61,142,249,809,890,916,985],[809,810,985],[61,142,812,890,916,985],[812,813,985],[61,142,814,815,890,916,985],[815,816,985],[61,142,225,269,818,916,985],[818,819,820,985],[61,63,142,225,226,916,985],[226,227,985],[61,634,985],[822,985],[61,63,142,591,824,890,985],[824,825,985],[61,142,225,265,827,890,985],[827,828,985],[61,142,265,527,858,890,985],[858,859,985],[61,63,142,225,830,890,985],[830,831,985],[61,142,225,833,890,985],[833,834,985],[61,63,142,836,890,985],[836,837,985],[61,142,225,839,890,985],[839,840,985],[61,142,225,842,890,985],[842,843,985],[61,142,225,845,890,985],[845,846,985],[61,142,225,674,768,838,848,849,916,985],[61,673,985],[849,850,985],[61,142,225,852,890,985],[852,853,985],[61,142,225,265,855,890,985],[855,856,985],[61,63,142,225,228,527,860,861,916,985],[861,862,985],[61,63,142,640,643,648,657,686,692,744,768,864,890,916,985],[864,865,985],[508,985],[61,63,142,225,265,868,890,985],[868,869,985],[61,63,142,871,890,916,985],[871,872,985],[61,63,142,225,874,890,985],[874,875,985],[61,142,249,532,787,890,985],[787,788,985],[61,63,142,225,580,581,916,985],[581,582,985],[63,661,985],[61,63,136,142,916,985],[136,985],[661,662,663,985],[317,985],[881,985],[146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,985],[61,63,166,228,245,254,257,260,265,268,269,272,275,278,306,530,532,535,538,541,543,546,549,552,555,558,561,564,567,570,573,576,579,583,586,589,594,597,598,601,604,606,607,608,611,614,617,620,623,626,629,631,634,637,640,643,648,651,654,657,660,664,666,668,671,674,677,680,683,686,689,692,695,698,701,704,707,710,713,716,719,722,725,727,730,733,736,740,741,744,748,751,754,758,761,764,768,771,776,779,782,786,789,792,795,798,802,805,808,811,814,817,821,823,826,829,832,835,838,841,844,847,851,854,857,860,863,866,867,870,873,876,878,880,882,884,886,887,888,889,916,919,985],[61,265,590,890,985],[61,142,311,911,985],[142,145,580,891,892,893,894,895,896,897,899,985],[895,896,897,985],[64,142,985],[890,985],[142,145,580,891,892,893,894,898,985],[61,64,891,985],[580,985],[63,142,891,892,894,898,899,985],[142,143,145,580,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,985],[142,228,254,257,260,262,265,268,269,272,275,278,375,530,535,538,541,546,549,552,555,561,564,567,570,573,576,579,583,586,589,594,597,601,604,611,614,617,620,623,626,629,634,637,640,643,648,651,654,657,660,664,671,674,677,680,683,686,689,692,695,698,701,704,707,710,713,716,719,722,725,727,730,733,736,740,744,748,751,754,761,764,768,771,776,779,782,786,789,792,795,798,802,805,808,811,814,817,821,826,829,832,835,838,841,844,847,851,854,857,863,866,870,873,876,895,919,985],[228,254,257,260,262,265,268,269,272,275,278,530,532,535,538,541,546,549,552,555,561,564,567,570,573,576,579,583,586,589,594,597,601,604,606,611,614,617,620,623,626,629,634,637,640,643,648,651,654,657,660,664,671,674,677,680,683,686,689,692,695,698,701,704,707,710,713,716,719,722,725,727,730,733,736,740,744,748,751,754,758,761,764,768,771,776,779,782,786,789,792,795,798,802,805,808,811,814,817,821,823,826,829,832,835,838,841,844,847,851,854,857,863,866,870,873,876,878,919,985],[142,580,899,985],[142,899,985],[899,985],[898,899,985],[142,895,899,985],[249,985],[61,248,985],[883,985],[510,985],[877,985],[879,985],[228,985],[223,224,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,985],[97,985],[98,985],[97,99,101,985],[100,985],[61,71,985],[76,985],[74,985],[64,71,73,75,77,985],[61,63,90,92,985],[93,94,985],[63,127,985],[61,63,90,92,126,985],[61,63,78,92,127,985],[126,127,129,985],[61,78,92,985],[103,985],[63,137,985],[61,63,90,92,95,985],[61,63,78,79,81,107,137,985],[137,138,139,140,985],[102,985],[115,985],[63,131,985],[61,63,78,107,131,985],[131,132,133,134,135,985],[79,985],[78,79,90,92,985],[63,92,95,985],[61,78,90,92,985],[63,985],[78,79,80,81,90,985],[91,985],[61,117,118,985],[120,985],[117,119,120,121,985],[78,79,80,81,88,90,92,95,96,102,104,105,106,107,108,111,112,113,114,116,120,121,122,123,124,125,128,130,136,141,985],[95,985],[78,95,985],[83,985],[64,985],[88,95,985],[86,985],[83,84,85,86,87,89,985],[64,78,83,84,85,985],[107,985],[92,985],[109,110,985],[220,985],[177,985],[182,985],[167,985],[168,985],[214,985],[185,985],[173,985],[216,985],[218,985],[169,170,171,172,174,175,176,178,180,181,183,184,186,187,188,190,192,193,194,196,198,199,201,203,205,206,207,208,209,210,211,212,213,215,217,219,221,985],[189,985],[191,985],[179,985],[200,985],[195,985],[202,985],[204,985],[197,985],[367,985],[361,363,985],[351,361,362,364,365,366,985],[361,985],[351,361,985],[352,353,354,355,356,357,358,359,360,985],[352,356,357,360,361,364,985],[352,353,354,355,356,357,358,359,360,361,362,364,365,985],[351,352,353,354,355,356,357,358,359,360,985],[247,985],[58,59,60,985,1271],[58,59,60,246,985],[57,58,59,60,985],[61,311,985,992,993],[61,62,890,936,985],[62,920,921,922,985],[62,920,921,985],[61,62,564,597,916,919,923,924,925,926,928,929,930,931,985],[62,832,835,838,841,847,854,929,985],[61,62,269,919,923,925,932,933,985],[61,62,272,564,614,617,620,623,626,733,768,925,929,985],[61,62,272,564,614,617,620,623,626,733,768,923,929,985],[62,272,614,620,626,985],[61,62,272,564,614,617,620,623,626,866,923,925,927,985],[61,62,272,564,614,617,620,623,626,866,923,985],[61,62,272,564,614,617,620,623,626,733,768,866,923,925,985],[62,985],[61,62,937,939,985],[61,62,919,922,934,935,985],[985,994],[985,1239,1243,1244],[985,1239,1242],[985,1242],[985,1243,1245,1247],[985,1239,1242,1243,1244,1245,1246],[985,1239],[985,1239,1240],[985,1240,1241],[985,1024],[957,985,992,996],[985,998,999,1001,1004,1006],[985,1000],[985,998],[985,998,1001],[985,1011,1012],[985,1009,1010,1011],[957,985,992],[956,957,985,992,1015],[985,1019],[985,1020],[985,1026,1029],[956,985,992],[959,984,985,992,1034,1035],[959,973,985,992],[941,985],[944,985],[945,950,976,985],[946,956,957,964,973,984,985],[946,947,956,964,985],[948,985],[949,950,957,965,985],[950,973,981,985],[951,953,956,964,985],[952,985],[953,954,985],[955,956,985],[956,985],[956,957,958,973,984,985],[956,957,958,973,985],[956,959,964,973,984,985],[956,957,959,960,964,973,981,984,985],[959,961,973,981,984,985],[941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991],[956,962,985],[963,984,985],[953,956,964,973,985],[965,985],[966,985],[944,967,985],[968,983,985,989],[969,985],[970,985],[956,971,985],[971,972,985,987],[945,956,973,974,975,985],[945,973,975,985],[973,974,985],[976,985],[977,985],[956,979,980,985],[979,980,985],[950,964,981,985],[982,985],[964,983,985],[945,959,970,984,985],[950,985],[973,985,986],[985,987],[985,988],[945,950,956,958,967,973,984,985,987,989],[973,985,990],[58,59,60,307,985],[985,1041,1080],[985,1041,1065,1080],[985,1080],[985,1041],[985,1041,1066,1080],[985,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079],[985,1066,1080],[985,1084],[985,992],[985,992,1082],[973,985,992],[956,959,961,973,981,984,985,990,992],[985,1088],[944,985,992,1022,1028],[985,1087],[985,1026],[985,1023,1027],[985,1025],[985,1111],[985,1112,1113,1114,1115,1116,1181,1182,1183,1184,1185,1186],[985,1111,1114,1180],[985,1111,1112,1113,1182],[985,1111,1112,1114,1115,1116,1181,1183],[985,1113],[985,1111,1113],[985,1111,1114,1116],[985,1111,1113,1114,1115],[985,1136],[985,1111,1136],[985,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149],[985,1111,1150],[985,1234,1235,1236,1237,1238,1249,1250,1251],[985,1111,1248],[985,1111,1208],[956,985,992,1111,1195,1196],[985,1195,1196,1197,1200],[985,1195],[985,1196],[985,1201,1207,1208,1209,1210,1211],[985,1111,1198,1199,1201],[985,1197,1199,1202],[985,1199,1203,1204,1205,1206],[985,1199,1208],[985,1111,1196,1197,1198],[985,1111,1199,1207],[985,1111,1187,1216,1218,1219],[985,1111,1218],[985,1218,1219,1220,1221],[985,1111,1187,1218],[985,1111,1187,1216,1219],[985,1111,1187,1222,1223],[985,1217,1224],[985,1111,1226],[985,1226,1227],[985,1229],[985,1111,1187],[985,1188,1189,1190,1191,1192,1193,1194,1213,1214,1215],[985,1111,1187,1188],[985,1111,1165,1191],[985,1111,1187,1212],[985,1111,1188],[985,1111,1187,1188,1189],[985,1231,1232],[985,1111,1255],[959,985,992,1087,1111,1180,1257],[985,1111,1187,1263],[985,1264,1265,1266],[985,1096,1097],[985,1097,1098],[985,1096],[985,1096,1097,1103],[985,1096,1097,1098,1108],[985,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110],[985,1105],[964,985,992,1095,1098,1099,1105,1106,1107],[985,1261,1262],[985,1261],[956,985,992,1111],[985,1111,1165],[985,1117,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179],[985,1111,1175,1177],[985,1132],[985,1131,1132,1133,1134,1151,1152,1164],[985,1111,1130],[985,1131],[985,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163],[985,1111,1131],[985,1212,1216,1222,1225,1228,1230,1252],[985,1111,1150,1165,1180,1187,1216,1222,1228,1230,1233,1253,1254,1256,1258,1259,1260,1267],[985,1180,1256,1258],[985,1111,1212,1216,1222,1225,1228,1230,1233,1252],[985,1111,1180,1187,1216,1225,1228,1230,1233,1253],[985,1129],[985,1118,1119,1129],[985,1120,1121],[985,1118,1119,1120,1122,1123,1127],[985,1119,1120],[985,1128],[985,1120],[985,1118,1119,1120,1123,1124,1125,1126],[945,985,1180,1187,1216,1268]],"referencedMap":[[66,1],[69,2],[71,3],[68,4],[70,5],[67,6],[72,4],[73,7],[65,8],[415,9],[416,9],[417,9],[418,10],[419,9],[420,10],[421,9],[422,9],[423,10],[424,10],[425,11],[426,12],[430,13],[427,12],[431,14],[432,15],[434,16],[433,17],[428,8],[429,18],[413,19],[414,20],[293,21],[292,22],[294,8],[295,23],[301,24],[300,25],[302,8],[303,26],[244,27],[304,2],[305,28],[313,29],[312,30],[314,31],[316,32],[315,2],[317,33],[319,34],[318,22],[320,35],[321,8],[323,36],[322,37],[328,38],[327,39],[330,40],[329,8],[377,41],[376,42],[379,43],[378,8],[381,44],[380,45],[383,46],[382,8],[385,47],[384,48],[387,49],[386,8],[389,50],[388,51],[391,52],[390,8],[393,53],[392,2],[394,54],[410,55],[409,56],[412,57],[411,8],[402,58],[401,59],[404,60],[403,8],[373,61],[372,62],[375,63],[374,8],[370,64],[369,2],[371,65],[444,66],[443,67],[446,68],[445,8],[451,69],[450,70],[453,71],[452,8],[458,72],[457,73],[460,74],[459,8],[465,75],[464,76],[467,77],[466,8],[503,78],[502,79],[505,80],[504,8],[479,81],[478,82],[481,83],[480,8],[472,84],[471,85],[469,86],[468,59],[470,8],[474,87],[473,8],[496,88],[495,89],[482,2],[498,90],[497,8],[492,91],[491,92],[494,93],[493,8],[507,94],[506,2],[508,95],[398,96],[397,97],[400,98],[399,8],[436,99],[435,100],[438,101],[437,8],[306,27],[527,102],[525,8],[526,103],[524,104],[523,105],[522,106],[395,8],[521,107],[396,108],[510,109],[509,2],[513,110],[512,111],[511,30],[299,112],[298,113],[297,114],[346,115],[345,116],[344,2],[515,117],[517,118],[516,119],[514,120],[326,121],[325,122],[324,123],[333,124],[339,125],[331,30],[338,126],[335,127],[334,128],[337,129],[336,30],[347,130],[350,131],[349,132],[348,133],[520,134],[519,135],[518,30],[343,136],[341,137],[340,138],[342,139],[408,140],[406,141],[405,142],[407,139],[439,143],[442,144],[441,145],[440,146],[449,147],[448,148],[447,2],[456,149],[455,150],[454,30],[463,151],[462,152],[461,2],[501,153],[500,154],[499,155],[477,156],[476,157],[475,30],[483,158],[486,159],[485,160],[484,161],[487,162],[490,163],[489,164],[488,165],[281,2],[296,8],[290,166],[279,166],[280,8],[283,167],[291,168],[284,2],[287,169],[289,2],[285,8],[282,2],[332,30],[288,170],[253,171],[250,8],[254,172],[256,173],[255,8],[257,174],[259,175],[258,8],[260,176],[267,177],[266,8],[268,178],[271,179],[270,8],[272,180],[274,181],[273,8],[275,182],[277,183],[276,8],[278,184],[534,185],[533,8],[535,186],[537,187],[536,8],[538,188],[540,189],[539,8],[541,190],[545,191],[544,8],[546,192],[548,193],[547,8],[549,194],[551,195],[550,8],[552,196],[554,197],[553,8],[555,198],[556,199],[557,8],[558,200],[560,201],[559,8],[561,202],[563,203],[562,8],[564,204],[264,205],[262,206],[263,8],[265,207],[261,8],[566,208],[565,8],[567,209],[569,210],[568,8],[570,211],[572,212],[571,8],[573,213],[575,214],[574,8],[576,215],[578,216],[577,8],[579,217],[585,218],[584,8],[586,219],[588,220],[587,8],[589,221],[593,222],[592,8],[594,223],[529,224],[528,8],[530,225],[596,226],[595,8],[597,227],[598,228],[600,229],[599,8],[601,230],[603,231],[602,232],[604,233],[605,234],[606,235],[613,236],[612,8],[614,237],[616,238],[615,8],[617,239],[619,240],[618,8],[620,241],[622,242],[621,8],[623,243],[625,244],[624,8],[626,245],[628,246],[627,8],[629,247],[633,248],[632,8],[634,249],[636,250],[635,8],[637,251],[542,252],[543,253],[642,254],[641,8],[643,255],[645,256],[646,257],[644,8],[648,258],[647,259],[650,260],[649,8],[651,261],[653,262],[652,8],[654,263],[656,264],[655,8],[657,265],[659,266],[658,8],[660,267],[885,268],[886,269],[918,270],[917,8],[919,271],[665,252],[666,272],[667,273],[668,274],[670,275],[669,8],[671,276],[673,277],[672,8],[674,278],[676,279],[675,8],[677,280],[679,281],[678,8],[680,282],[682,283],[681,8],[683,284],[685,285],[686,286],[684,8],[688,287],[689,288],[687,8],[639,289],[640,290],[638,8],[691,291],[692,292],[690,8],[694,293],[695,294],[693,8],[697,295],[698,296],[696,8],[700,297],[701,298],[699,8],[703,299],[704,300],[702,8],[706,301],[707,302],[705,8],[709,303],[710,304],[708,8],[712,305],[713,306],[711,8],[715,307],[716,308],[714,8],[718,309],[719,310],[717,8],[721,311],[722,312],[720,8],[729,313],[730,314],[728,8],[732,315],[733,316],[731,8],[726,317],[727,318],[735,319],[736,320],[734,8],[610,321],[611,322],[609,8],[739,323],[737,324],[740,325],[738,8],[741,326],[743,327],[744,328],[742,8],[225,329],[747,330],[748,331],[746,8],[750,332],[751,333],[749,8],[252,334],[269,335],[251,8],[724,336],[725,337],[723,8],[531,338],[532,339],[608,340],[753,341],[754,342],[752,8],[755,343],[756,2],[758,344],[757,345],[760,346],[761,347],[759,8],[763,348],[764,349],[762,8],[767,350],[765,351],[768,352],[766,8],[770,353],[771,354],[769,8],[630,252],[631,355],[775,356],[773,357],[772,30],[776,358],[774,8],[781,359],[782,360],[780,8],[778,361],[779,362],[777,8],[785,363],[786,364],[784,8],[791,365],[792,366],[790,8],[794,367],[795,368],[793,8],[796,369],[798,370],[797,232],[800,371],[801,2],[802,372],[799,8],[804,373],[805,374],[803,8],[807,375],[808,376],[806,8],[810,377],[811,378],[809,8],[813,379],[814,380],[812,8],[816,381],[817,382],[815,8],[819,383],[820,2],[821,384],[818,8],[227,385],[228,386],[226,8],[822,387],[823,388],[825,389],[826,390],[824,8],[828,391],[829,392],[827,8],[859,393],[860,394],[858,8],[831,395],[832,396],[830,8],[834,397],[835,398],[833,8],[837,399],[838,400],[836,8],[840,401],[841,402],[839,8],[843,403],[844,404],[842,8],[846,405],[847,406],[845,8],[850,407],[848,408],[851,409],[849,8],[853,410],[854,411],[852,8],[856,412],[857,413],[855,8],[862,414],[863,415],[861,8],[865,416],[866,417],[864,8],[867,418],[869,419],[870,420],[868,8],[872,421],[873,422],[871,8],[875,423],[876,424],[874,8],[788,425],[789,426],[787,8],[582,427],[583,428],[581,8],[662,429],[661,430],[663,431],[664,432],[889,433],[881,252],[882,434],[146,8],[147,8],[148,8],[149,8],[150,8],[151,8],[152,8],[153,8],[154,8],[155,8],[166,435],[156,8],[157,8],[158,8],[159,8],[160,8],[161,8],[162,8],[163,8],[164,8],[165,8],[607,8],[887,27],[888,27],[890,436],[591,437],[590,8],[144,8],[912,438],[906,232],[900,439],[898,440],[145,441],[891,442],[901,8],[899,443],[893,8],[580,444],[907,445],[915,8],[911,446],[913,8],[143,8],[916,447],[908,8],[896,448],[895,449],[902,450],[892,8],[914,8],[905,451],[903,452],[904,453],[897,454],[909,8],[910,8],[894,8],[783,455],[249,456],[884,457],[883,458],[878,459],[877,8],[745,2],[880,460],[879,8],[223,27],[224,27],[229,461],[230,27],[231,27],[245,462],[232,27],[233,27],[234,27],[235,27],[236,27],[239,27],[240,27],[237,27],[241,27],[242,27],[238,27],[243,27],[98,463],[99,464],[97,8],[102,465],[101,466],[100,463],[76,467],[77,468],[74,2],[75,469],[78,470],[64,8],[93,471],[94,8],[95,472],[129,473],[127,474],[126,8],[128,475],[130,476],[103,477],[104,478],[138,479],[137,480],[139,481],[141,482],[140,8],[115,483],[116,484],[132,485],[131,480],[133,486],[134,8],[136,487],[135,488],[96,489],[114,8],[106,490],[107,491],[79,492],[81,8],[91,493],[92,494],[80,8],[119,495],[121,496],[123,8],[124,8],[117,2],[122,497],[120,8],[118,8],[142,498],[82,8],[125,8],[105,499],[88,500],[84,501],[85,502],[83,502],[89,503],[87,504],[90,505],[86,506],[108,507],[112,508],[110,8],[111,509],[109,8],[113,8],[63,2],[220,8],[221,510],[177,8],[178,511],[182,8],[183,512],[168,513],[169,514],[214,8],[215,515],[184,8],[185,8],[186,516],[170,8],[187,8],[171,513],[172,513],[173,513],[174,517],[175,8],[216,8],[217,518],[218,8],[219,519],[176,2],[207,8],[210,2],[222,520],[212,513],[188,8],[167,8],[190,521],[189,8],[192,522],[191,8],[180,523],[179,8],[181,513],[193,2],[213,8],[208,8],[194,2],[199,8],[201,524],[200,8],[196,525],[195,2],[203,526],[202,8],[205,527],[204,2],[198,528],[197,8],[206,2],[209,8],[211,2],[368,529],[364,530],[351,8],[367,531],[360,532],[358,533],[357,533],[356,532],[353,533],[354,532],[362,534],[355,533],[352,532],[359,533],[365,535],[366,536],[361,537],[363,533],[59,8],[939,538],[993,538],[938,539],[248,538],[246,8],[247,540],[57,8],[61,541],[62,2],[60,8],[927,8],[920,8],[286,8],[58,8],[994,542],[937,543],[925,544],[922,545],[923,544],[932,546],[933,547],[934,548],[931,549],[930,550],[935,551],[928,552],[924,553],[926,554],[921,555],[940,556],[929,555],[936,557],[995,558],[1245,559],[1244,560],[1243,561],[1248,562],[1247,563],[1240,564],[1241,565],[1242,566],[1239,8],[1246,8],[1022,8],[1025,567],[1024,8],[997,568],[996,8],[1008,569],[1000,8],[1001,570],[1007,8],[999,571],[998,8],[1004,572],[1002,570],[1003,8],[1006,571],[1005,8],[1013,573],[1009,8],[1012,574],[1011,8],[1014,575],[1016,576],[1017,575],[1018,8],[1019,8],[1020,577],[1021,578],[1030,579],[1010,8],[1031,8],[1032,580],[1015,8],[1033,8],[1035,8],[1036,581],[1034,582],[941,583],[942,583],[944,584],[945,585],[946,586],[947,587],[948,588],[949,589],[950,590],[951,591],[952,592],[953,593],[954,593],[955,594],[956,595],[957,596],[958,597],[943,8],[991,8],[959,598],[960,599],[961,600],[992,601],[962,602],[963,603],[964,604],[965,605],[966,606],[967,607],[968,608],[969,609],[970,610],[971,611],[972,612],[973,613],[975,614],[974,615],[976,616],[977,617],[978,8],[979,618],[980,619],[981,620],[982,621],[983,622],[984,623],[985,624],[986,625],[987,626],[988,627],[989,628],[990,629],[1037,8],[1038,8],[309,8],[307,8],[311,630],[1261,30],[1039,582],[1040,8],[310,8],[1065,631],[1066,632],[1041,633],[1044,633],[1063,631],[1064,631],[1054,631],[1053,634],[1051,631],[1046,631],[1059,631],[1057,631],[1061,631],[1045,631],[1058,631],[1062,631],[1047,631],[1048,631],[1060,631],[1042,631],[1049,631],[1050,631],[1052,631],[1056,631],[1067,635],[1055,631],[1043,631],[1080,636],[1079,8],[1074,635],[1076,637],[1075,635],[1068,635],[1069,635],[1071,635],[1073,635],[1077,637],[1078,637],[1070,637],[1072,637],[1081,8],[1085,638],[1084,639],[1083,640],[1082,641],[1086,8],[1087,642],[1088,8],[1089,643],[1090,8],[1269,8],[1023,8],[308,8],[1029,644],[1257,645],[1027,646],[1028,647],[1026,648],[11,8],[12,8],[14,8],[13,8],[2,8],[15,8],[16,8],[17,8],[18,8],[19,8],[20,8],[21,8],[22,8],[3,8],[4,8],[26,8],[23,8],[24,8],[25,8],[27,8],[28,8],[29,8],[5,8],[30,8],[31,8],[32,8],[33,8],[6,8],[37,8],[34,8],[35,8],[36,8],[38,8],[7,8],[39,8],[44,8],[45,8],[40,8],[41,8],[42,8],[43,8],[8,8],[49,8],[46,8],[47,8],[48,8],[50,8],[9,8],[51,8],[52,8],[53,8],[54,8],[55,8],[1,8],[10,8],[56,8],[1185,649],[1187,650],[1112,649],[1184,649],[1181,651],[1183,652],[1182,653],[1113,580],[1186,654],[1114,655],[1115,656],[1116,657],[1135,8],[1137,658],[1138,659],[1139,659],[1147,658],[1140,658],[1141,658],[1142,658],[1146,659],[1149,8],[1148,659],[1143,658],[1144,659],[1145,658],[1150,660],[1136,649],[1234,649],[1235,649],[1236,649],[1237,649],[1238,649],[1250,661],[1251,649],[1252,662],[1249,663],[1210,664],[1197,665],[1195,8],[1201,666],[1196,667],[1200,668],[1212,669],[1211,8],[1198,8],[1202,670],[1203,671],[1204,671],[1207,672],[1205,671],[1206,673],[1199,674],[1208,675],[1209,664],[1220,676],[1221,677],[1222,678],[1219,679],[1218,680],[1223,8],[1217,8],[1224,681],[1225,682],[1227,683],[1228,684],[1226,8],[1230,685],[1229,686],[1216,687],[1193,688],[1191,8],[1188,661],[1214,688],[1194,689],[1213,690],[1215,686],[1192,691],[1190,692],[1189,686],[1233,693],[1231,686],[1232,686],[1256,694],[1255,8],[1258,695],[1264,696],[1267,697],[1265,686],[1266,686],[1098,698],[1101,698],[1099,699],[1100,700],[1102,700],[1095,8],[1104,701],[1109,702],[1097,700],[1111,703],[1105,8],[1096,8],[1103,700],[1106,704],[1108,705],[1110,698],[1107,8],[1263,706],[1262,707],[1175,708],[1117,649],[1167,709],[1168,649],[1180,710],[1173,649],[1171,8],[1172,639],[1169,8],[1178,711],[1170,649],[1179,8],[1176,8],[1166,709],[1174,649],[1177,708],[1152,8],[1133,712],[1151,661],[1165,713],[1131,714],[1134,715],[1153,715],[1154,8],[1155,715],[1156,715],[1157,715],[1158,8],[1159,649],[1164,716],[1160,715],[1163,8],[1161,715],[1162,8],[1132,717],[1259,718],[1268,719],[1260,720],[1253,721],[1254,722],[1130,723],[1120,724],[1122,725],[1128,726],[1124,8],[1125,8],[1123,727],[1126,723],[1118,8],[1119,8],[1129,728],[1121,729],[1127,730],[1091,8],[1092,8],[1093,8],[1094,8],[1270,731]],"exportedModulesMap":[[66,1],[69,2],[71,3],[68,4],[70,5],[67,6],[72,4],[73,7],[65,8],[415,9],[416,9],[417,9],[418,10],[419,9],[420,10],[421,9],[422,9],[423,10],[424,10],[425,11],[426,12],[430,13],[427,12],[431,14],[432,15],[434,16],[433,17],[428,8],[429,18],[413,19],[414,20],[293,21],[292,22],[294,8],[295,23],[301,24],[300,25],[302,8],[303,26],[244,27],[304,2],[305,28],[313,29],[312,30],[314,31],[316,32],[315,2],[317,33],[319,34],[318,22],[320,35],[321,8],[323,36],[322,37],[328,38],[327,39],[330,40],[329,8],[377,41],[376,42],[379,43],[378,8],[381,44],[380,45],[383,46],[382,8],[385,47],[384,48],[387,49],[386,8],[389,50],[388,51],[391,52],[390,8],[393,53],[392,2],[394,54],[410,55],[409,56],[412,57],[411,8],[402,58],[401,59],[404,60],[403,8],[373,61],[372,62],[375,63],[374,8],[370,64],[369,2],[371,65],[444,66],[443,67],[446,68],[445,8],[451,69],[450,70],[453,71],[452,8],[458,72],[457,73],[460,74],[459,8],[465,75],[464,76],[467,77],[466,8],[503,78],[502,79],[505,80],[504,8],[479,81],[478,82],[481,83],[480,8],[472,84],[471,85],[469,86],[468,59],[470,8],[474,87],[473,8],[496,88],[495,89],[482,2],[498,90],[497,8],[492,91],[491,92],[494,93],[493,8],[507,94],[506,2],[508,95],[398,96],[397,97],[400,98],[399,8],[436,99],[435,100],[438,101],[437,8],[306,27],[527,102],[525,8],[526,103],[524,104],[523,105],[522,106],[395,8],[521,107],[396,108],[510,109],[509,2],[513,110],[512,111],[511,30],[299,112],[298,113],[297,114],[346,115],[345,116],[344,2],[515,117],[517,118],[516,119],[514,120],[326,121],[325,122],[324,123],[333,124],[339,125],[331,30],[338,126],[335,127],[334,128],[337,129],[336,30],[347,130],[350,131],[349,132],[348,133],[520,134],[519,135],[518,30],[343,136],[341,137],[340,138],[342,139],[408,140],[406,141],[405,142],[407,139],[439,143],[442,144],[441,145],[440,146],[449,147],[448,148],[447,2],[456,149],[455,150],[454,30],[463,151],[462,152],[461,2],[501,153],[500,154],[499,155],[477,156],[476,157],[475,30],[483,158],[486,159],[485,160],[484,161],[487,162],[490,163],[489,164],[488,165],[281,2],[296,8],[290,166],[279,166],[280,8],[283,167],[291,168],[284,2],[287,169],[289,2],[285,8],[282,2],[332,30],[288,170],[253,171],[250,8],[254,172],[256,173],[255,8],[257,174],[259,175],[258,8],[260,176],[267,177],[266,8],[268,178],[271,179],[270,8],[272,180],[274,181],[273,8],[275,182],[277,183],[276,8],[278,184],[534,185],[533,8],[535,186],[537,187],[536,8],[538,188],[540,189],[539,8],[541,190],[545,191],[544,8],[546,192],[548,193],[547,8],[549,194],[551,195],[550,8],[552,196],[554,197],[553,8],[555,198],[556,199],[557,8],[558,200],[560,201],[559,8],[561,202],[563,203],[562,8],[564,204],[264,205],[262,206],[263,8],[265,207],[261,8],[566,208],[565,8],[567,209],[569,210],[568,8],[570,211],[572,212],[571,8],[573,213],[575,214],[574,8],[576,215],[578,216],[577,8],[579,217],[585,218],[584,8],[586,219],[588,220],[587,8],[589,221],[593,222],[592,8],[594,223],[529,224],[528,8],[530,225],[596,226],[595,8],[597,227],[598,228],[600,229],[599,8],[601,230],[603,231],[602,232],[604,233],[605,234],[606,235],[613,236],[612,8],[614,237],[616,238],[615,8],[617,239],[619,240],[618,8],[620,241],[622,242],[621,8],[623,243],[625,244],[624,8],[626,245],[628,246],[627,8],[629,247],[633,248],[632,8],[634,249],[636,250],[635,8],[637,251],[542,252],[543,253],[642,254],[641,8],[643,255],[645,256],[646,257],[644,8],[648,258],[647,259],[650,260],[649,8],[651,261],[653,262],[652,8],[654,263],[656,264],[655,8],[657,265],[659,266],[658,8],[660,267],[885,268],[886,269],[918,270],[917,8],[919,271],[665,252],[666,272],[667,273],[668,274],[670,275],[669,8],[671,276],[673,277],[672,8],[674,278],[676,279],[675,8],[677,280],[679,281],[678,8],[680,282],[682,283],[681,8],[683,284],[685,285],[686,286],[684,8],[688,287],[689,288],[687,8],[639,289],[640,290],[638,8],[691,291],[692,292],[690,8],[694,293],[695,294],[693,8],[697,295],[698,296],[696,8],[700,297],[701,298],[699,8],[703,299],[704,300],[702,8],[706,301],[707,302],[705,8],[709,303],[710,304],[708,8],[712,305],[713,306],[711,8],[715,307],[716,308],[714,8],[718,309],[719,310],[717,8],[721,311],[722,312],[720,8],[729,313],[730,314],[728,8],[732,315],[733,316],[731,8],[726,317],[727,318],[735,319],[736,320],[734,8],[610,321],[611,322],[609,8],[739,323],[737,324],[740,325],[738,8],[741,326],[743,327],[744,328],[742,8],[225,329],[747,330],[748,331],[746,8],[750,332],[751,333],[749,8],[252,334],[269,335],[251,8],[724,336],[725,337],[723,8],[531,338],[532,339],[608,340],[753,341],[754,342],[752,8],[755,343],[756,2],[758,344],[757,345],[760,346],[761,347],[759,8],[763,348],[764,349],[762,8],[767,350],[765,351],[768,352],[766,8],[770,353],[771,354],[769,8],[630,252],[631,355],[775,356],[773,357],[772,30],[776,358],[774,8],[781,359],[782,360],[780,8],[778,361],[779,362],[777,8],[785,363],[786,364],[784,8],[791,365],[792,366],[790,8],[794,367],[795,368],[793,8],[796,369],[798,370],[797,232],[800,371],[801,2],[802,372],[799,8],[804,373],[805,374],[803,8],[807,375],[808,376],[806,8],[810,377],[811,378],[809,8],[813,379],[814,380],[812,8],[816,381],[817,382],[815,8],[819,383],[820,2],[821,384],[818,8],[227,385],[228,386],[226,8],[822,387],[823,388],[825,389],[826,390],[824,8],[828,391],[829,392],[827,8],[859,393],[860,394],[858,8],[831,395],[832,396],[830,8],[834,397],[835,398],[833,8],[837,399],[838,400],[836,8],[840,401],[841,402],[839,8],[843,403],[844,404],[842,8],[846,405],[847,406],[845,8],[850,407],[848,408],[851,409],[849,8],[853,410],[854,411],[852,8],[856,412],[857,413],[855,8],[862,414],[863,415],[861,8],[865,416],[866,417],[864,8],[867,418],[869,419],[870,420],[868,8],[872,421],[873,422],[871,8],[875,423],[876,424],[874,8],[788,425],[789,426],[787,8],[582,427],[583,428],[581,8],[662,429],[661,430],[663,431],[664,432],[889,433],[881,252],[882,434],[146,8],[147,8],[148,8],[149,8],[150,8],[151,8],[152,8],[153,8],[154,8],[155,8],[166,435],[156,8],[157,8],[158,8],[159,8],[160,8],[161,8],[162,8],[163,8],[164,8],[165,8],[607,8],[887,27],[888,27],[890,436],[591,437],[590,8],[144,8],[912,438],[906,232],[900,439],[898,440],[145,441],[891,442],[901,8],[899,443],[893,8],[580,444],[907,445],[915,8],[911,446],[913,8],[143,8],[916,447],[908,8],[896,448],[895,449],[902,450],[892,8],[914,8],[905,451],[903,452],[904,453],[897,454],[909,8],[910,8],[894,8],[783,455],[249,456],[884,457],[883,458],[878,459],[877,8],[745,2],[880,460],[879,8],[223,27],[224,27],[229,461],[230,27],[231,27],[245,462],[232,27],[233,27],[234,27],[235,27],[236,27],[239,27],[240,27],[237,27],[241,27],[242,27],[238,27],[243,27],[98,463],[99,464],[97,8],[102,465],[101,466],[100,463],[76,467],[77,468],[74,2],[75,469],[78,470],[64,8],[93,471],[94,8],[95,472],[129,473],[127,474],[126,8],[128,475],[130,476],[103,477],[104,478],[138,479],[137,480],[139,481],[141,482],[140,8],[115,483],[116,484],[132,485],[131,480],[133,486],[134,8],[136,487],[135,488],[96,489],[114,8],[106,490],[107,491],[79,492],[81,8],[91,493],[92,494],[80,8],[119,495],[121,496],[123,8],[124,8],[117,2],[122,497],[120,8],[118,8],[142,498],[82,8],[125,8],[105,499],[88,500],[84,501],[85,502],[83,502],[89,503],[87,504],[90,505],[86,506],[108,507],[112,508],[110,8],[111,509],[109,8],[113,8],[63,2],[220,8],[221,510],[177,8],[178,511],[182,8],[183,512],[168,513],[169,514],[214,8],[215,515],[184,8],[185,8],[186,516],[170,8],[187,8],[171,513],[172,513],[173,513],[174,517],[175,8],[216,8],[217,518],[218,8],[219,519],[176,2],[207,8],[210,2],[222,520],[212,513],[188,8],[167,8],[190,521],[189,8],[192,522],[191,8],[180,523],[179,8],[181,513],[193,2],[213,8],[208,8],[194,2],[199,8],[201,524],[200,8],[196,525],[195,2],[203,526],[202,8],[205,527],[204,2],[198,528],[197,8],[206,2],[209,8],[211,2],[368,529],[364,530],[351,8],[367,531],[360,532],[358,533],[357,533],[356,532],[353,533],[354,532],[362,534],[355,533],[352,532],[359,533],[365,535],[366,536],[361,537],[363,533],[59,8],[939,538],[993,538],[938,539],[248,538],[246,8],[247,540],[57,8],[61,541],[62,2],[60,8],[927,8],[920,8],[286,8],[58,8],[994,542],[937,543],[925,544],[922,545],[923,544],[932,546],[933,547],[934,548],[931,549],[930,550],[935,551],[928,552],[924,553],[926,554],[921,555],[940,556],[929,555],[936,557],[995,558],[1245,559],[1244,560],[1243,561],[1248,562],[1247,563],[1240,564],[1241,565],[1242,566],[1239,8],[1246,8],[1022,8],[1025,567],[1024,8],[997,568],[996,8],[1008,569],[1000,8],[1001,570],[1007,8],[999,571],[998,8],[1004,572],[1002,570],[1003,8],[1006,571],[1005,8],[1013,573],[1009,8],[1012,574],[1011,8],[1014,575],[1016,576],[1017,575],[1018,8],[1019,8],[1020,577],[1021,578],[1030,579],[1010,8],[1031,8],[1032,580],[1015,8],[1033,8],[1035,8],[1036,581],[1034,582],[941,583],[942,583],[944,584],[945,585],[946,586],[947,587],[948,588],[949,589],[950,590],[951,591],[952,592],[953,593],[954,593],[955,594],[956,595],[957,596],[958,597],[943,8],[991,8],[959,598],[960,599],[961,600],[992,601],[962,602],[963,603],[964,604],[965,605],[966,606],[967,607],[968,608],[969,609],[970,610],[971,611],[972,612],[973,613],[975,614],[974,615],[976,616],[977,617],[978,8],[979,618],[980,619],[981,620],[982,621],[983,622],[984,623],[985,624],[986,625],[987,626],[988,627],[989,628],[990,629],[1037,8],[1038,8],[309,8],[307,8],[311,630],[1261,30],[1039,582],[1040,8],[310,8],[1065,631],[1066,632],[1041,633],[1044,633],[1063,631],[1064,631],[1054,631],[1053,634],[1051,631],[1046,631],[1059,631],[1057,631],[1061,631],[1045,631],[1058,631],[1062,631],[1047,631],[1048,631],[1060,631],[1042,631],[1049,631],[1050,631],[1052,631],[1056,631],[1067,635],[1055,631],[1043,631],[1080,636],[1079,8],[1074,635],[1076,637],[1075,635],[1068,635],[1069,635],[1071,635],[1073,635],[1077,637],[1078,637],[1070,637],[1072,637],[1081,8],[1085,638],[1084,639],[1083,640],[1082,641],[1086,8],[1087,642],[1088,8],[1089,643],[1090,8],[1269,8],[1023,8],[308,8],[1029,644],[1257,645],[1027,646],[1028,647],[1026,648],[11,8],[12,8],[14,8],[13,8],[2,8],[15,8],[16,8],[17,8],[18,8],[19,8],[20,8],[21,8],[22,8],[3,8],[4,8],[26,8],[23,8],[24,8],[25,8],[27,8],[28,8],[29,8],[5,8],[30,8],[31,8],[32,8],[33,8],[6,8],[37,8],[34,8],[35,8],[36,8],[38,8],[7,8],[39,8],[44,8],[45,8],[40,8],[41,8],[42,8],[43,8],[8,8],[49,8],[46,8],[47,8],[48,8],[50,8],[9,8],[51,8],[52,8],[53,8],[54,8],[55,8],[1,8],[10,8],[56,8],[1185,649],[1187,650],[1112,649],[1184,649],[1181,651],[1183,652],[1182,653],[1113,580],[1186,654],[1114,655],[1115,656],[1116,657],[1135,8],[1137,658],[1138,659],[1139,659],[1147,658],[1140,658],[1141,658],[1142,658],[1146,659],[1149,8],[1148,659],[1143,658],[1144,659],[1145,658],[1150,660],[1136,649],[1234,649],[1235,649],[1236,649],[1237,649],[1238,649],[1250,661],[1251,649],[1252,662],[1249,663],[1210,664],[1197,665],[1195,8],[1201,666],[1196,667],[1200,668],[1212,669],[1211,8],[1198,8],[1202,670],[1203,671],[1204,671],[1207,672],[1205,671],[1206,673],[1199,674],[1208,675],[1209,664],[1220,676],[1221,677],[1222,678],[1219,679],[1218,680],[1223,8],[1217,8],[1224,681],[1225,682],[1227,683],[1228,684],[1226,8],[1230,685],[1229,686],[1216,687],[1193,688],[1191,8],[1188,661],[1214,688],[1194,689],[1213,690],[1215,686],[1192,691],[1190,692],[1189,686],[1233,693],[1231,686],[1232,686],[1256,694],[1255,8],[1258,695],[1264,696],[1267,697],[1265,686],[1266,686],[1098,698],[1101,698],[1099,699],[1100,700],[1102,700],[1095,8],[1104,701],[1109,702],[1097,700],[1111,703],[1105,8],[1096,8],[1103,700],[1106,704],[1108,705],[1110,698],[1107,8],[1263,706],[1262,707],[1175,708],[1117,649],[1167,709],[1168,649],[1180,710],[1173,649],[1171,8],[1172,639],[1169,8],[1178,711],[1170,649],[1179,8],[1176,8],[1166,709],[1174,649],[1177,708],[1152,8],[1133,712],[1151,661],[1165,713],[1131,714],[1134,715],[1153,715],[1154,8],[1155,715],[1156,715],[1157,715],[1158,8],[1159,649],[1164,716],[1160,715],[1163,8],[1161,715],[1162,8],[1132,717],[1259,718],[1268,719],[1260,720],[1253,721],[1254,722],[1130,723],[1120,724],[1122,725],[1128,726],[1124,8],[1125,8],[1123,727],[1126,723],[1118,8],[1119,8],[1129,728],[1121,729],[1127,730],[1091,8],[1092,8],[1093,8],[1094,8],[1270,731]],"semanticDiagnosticsPerFile":[66,69,71,68,70,67,72,73,65,415,416,417,418,419,420,421,422,423,424,425,426,430,427,431,432,434,433,428,429,413,414,293,292,294,295,301,300,302,303,244,304,305,313,312,314,316,315,317,319,318,320,321,323,322,328,327,330,329,377,376,379,378,381,380,383,382,385,384,387,386,389,388,391,390,393,392,394,410,409,412,411,402,401,404,403,373,372,375,374,370,369,371,444,443,446,445,451,450,453,452,458,457,460,459,465,464,467,466,503,502,505,504,479,478,481,480,472,471,469,468,470,474,473,496,495,482,498,497,492,491,494,493,507,506,508,398,397,400,399,436,435,438,437,306,527,525,526,524,523,522,395,521,396,510,509,513,512,511,299,298,297,346,345,344,515,517,516,514,326,325,324,333,339,331,338,335,334,337,336,347,350,349,348,520,519,518,343,341,340,342,408,406,405,407,439,442,441,440,449,448,447,456,455,454,463,462,461,501,500,499,477,476,475,483,486,485,484,487,490,489,488,281,296,290,279,280,283,291,284,287,289,285,282,332,288,253,250,254,256,255,257,259,258,260,267,266,268,271,270,272,274,273,275,277,276,278,534,533,535,537,536,538,540,539,541,545,544,546,548,547,549,551,550,552,554,553,555,556,557,558,560,559,561,563,562,564,264,262,263,265,261,566,565,567,569,568,570,572,571,573,575,574,576,578,577,579,585,584,586,588,587,589,593,592,594,529,528,530,596,595,597,598,600,599,601,603,602,604,605,606,613,612,614,616,615,617,619,618,620,622,621,623,625,624,626,628,627,629,633,632,634,636,635,637,542,543,642,641,643,645,646,644,648,647,650,649,651,653,652,654,656,655,657,659,658,660,885,886,918,917,919,665,666,667,668,670,669,671,673,672,674,676,675,677,679,678,680,682,681,683,685,686,684,688,689,687,639,640,638,691,692,690,694,695,693,697,698,696,700,701,699,703,704,702,706,707,705,709,710,708,712,713,711,715,716,714,718,719,717,721,722,720,729,730,728,732,733,731,726,727,735,736,734,610,611,609,739,737,740,738,741,743,744,742,225,747,748,746,750,751,749,252,269,251,724,725,723,531,532,608,753,754,752,755,756,758,757,760,761,759,763,764,762,767,765,768,766,770,771,769,630,631,775,773,772,776,774,781,782,780,778,779,777,785,786,784,791,792,790,794,795,793,796,798,797,800,801,802,799,804,805,803,807,808,806,810,811,809,813,814,812,816,817,815,819,820,821,818,227,228,226,822,823,825,826,824,828,829,827,859,860,858,831,832,830,834,835,833,837,838,836,840,841,839,843,844,842,846,847,845,850,848,851,849,853,854,852,856,857,855,862,863,861,865,866,864,867,869,870,868,872,873,871,875,876,874,788,789,787,582,583,581,662,661,663,664,889,881,882,146,147,148,149,150,151,152,153,154,155,166,156,157,158,159,160,161,162,163,164,165,607,887,888,890,591,590,144,912,906,900,898,145,891,901,899,893,580,907,915,911,913,143,916,908,896,895,902,892,914,905,903,904,897,909,910,894,783,249,884,883,878,877,745,880,879,223,224,229,230,231,245,232,233,234,235,236,239,240,237,241,242,238,243,98,99,97,102,101,100,76,77,74,75,78,64,93,94,95,129,127,126,128,130,103,104,138,137,139,141,140,115,116,132,131,133,134,136,135,96,114,106,107,79,81,91,92,80,119,121,123,124,117,122,120,118,142,82,125,105,88,84,85,83,89,87,90,86,108,112,110,111,109,113,63,220,221,177,178,182,183,168,169,214,215,184,185,186,170,187,171,172,173,174,175,216,217,218,219,176,207,210,222,212,188,167,190,189,192,191,180,179,181,193,213,208,194,199,201,200,196,195,203,202,205,204,198,197,206,209,211,368,364,351,367,360,358,357,356,353,354,362,355,352,359,365,366,361,363,59,939,993,938,248,246,247,57,61,62,60,927,920,286,58,994,937,925,922,923,932,933,934,931,930,935,928,924,926,921,940,929,936,995,1245,1244,1243,1248,1247,1240,1241,1242,1239,1246,1022,1025,1024,997,996,1008,1000,1001,1007,999,998,1004,1002,1003,1006,1005,1013,1009,1012,1011,1014,1016,1017,1018,1019,1020,1021,1030,1010,1031,1032,1015,1033,1035,1036,1034,941,942,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,943,991,959,960,961,992,962,963,964,965,966,967,968,969,970,971,972,973,975,974,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,1037,1038,309,307,311,1261,1039,1040,310,1065,1066,1041,1044,1063,1064,1054,1053,1051,1046,1059,1057,1061,1045,1058,1062,1047,1048,1060,1042,1049,1050,1052,1056,1067,1055,1043,1080,1079,1074,1076,1075,1068,1069,1071,1073,1077,1078,1070,1072,1081,1085,1084,1083,1082,1086,1087,1088,1089,1090,1269,1023,308,1029,1257,1027,1028,1026,11,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,54,55,1,10,56,1185,1187,1112,1184,1181,1183,1182,1113,1186,1114,1115,1116,1135,1137,1138,1139,1147,1140,1141,1142,1146,1149,1148,1143,1144,1145,1150,1136,1234,1235,1236,1237,1238,1250,1251,1252,1249,1210,1197,1195,1201,1196,1200,1212,1211,1198,1202,1203,1204,1207,1205,1206,1199,1208,1209,1220,1221,1222,1219,1218,1223,1217,1224,1225,1227,1228,1226,1230,1229,1216,1193,1191,1188,1214,1194,1213,1215,1192,1190,1189,1233,1231,1232,1256,1255,1258,1264,1267,1265,1266,1098,1101,1099,1100,1102,1095,1104,1109,1097,1111,1105,1096,1103,1106,1108,1110,1107,1263,1262,1175,1117,1167,1168,1180,1173,1171,1172,1169,1178,1170,1179,1176,1166,1174,1177,1152,1133,1151,1165,1131,1134,1153,1154,1155,1156,1157,1158,1159,1164,1160,1163,1161,1162,1132,1259,1268,1260,1253,1254,1130,1120,1122,1128,1124,1125,1123,1126,1118,1119,1129,1121,1127,1091,1092,1093,1094,1270],"affectedFilesPendingEmit":[[66,1],[69,1],[71,1],[68,1],[70,1],[67,1],[72,1],[73,1],[65,1],[415,1],[416,1],[417,1],[418,1],[419,1],[420,1],[421,1],[422,1],[423,1],[424,1],[425,1],[426,1],[430,1],[427,1],[431,1],[432,1],[434,1],[433,1],[428,1],[429,1],[413,1],[414,1],[293,1],[292,1],[294,1],[295,1],[301,1],[300,1],[302,1],[303,1],[244,1],[304,1],[305,1],[313,1],[312,1],[314,1],[316,1],[315,1],[317,1],[319,1],[318,1],[320,1],[321,1],[323,1],[322,1],[328,1],[327,1],[330,1],[329,1],[377,1],[376,1],[379,1],[378,1],[381,1],[380,1],[383,1],[382,1],[385,1],[384,1],[387,1],[386,1],[389,1],[388,1],[391,1],[390,1],[393,1],[392,1],[394,1],[410,1],[409,1],[412,1],[411,1],[402,1],[401,1],[404,1],[403,1],[373,1],[372,1],[375,1],[374,1],[370,1],[369,1],[371,1],[444,1],[443,1],[446,1],[445,1],[451,1],[450,1],[453,1],[452,1],[458,1],[457,1],[460,1],[459,1],[465,1],[464,1],[467,1],[466,1],[503,1],[502,1],[505,1],[504,1],[479,1],[478,1],[481,1],[480,1],[472,1],[471,1],[469,1],[468,1],[470,1],[474,1],[473,1],[496,1],[495,1],[482,1],[498,1],[497,1],[492,1],[491,1],[494,1],[493,1],[507,1],[506,1],[508,1],[398,1],[397,1],[400,1],[399,1],[436,1],[435,1],[438,1],[437,1],[306,1],[527,1],[525,1],[526,1],[524,1],[523,1],[522,1],[395,1],[521,1],[396,1],[510,1],[509,1],[513,1],[512,1],[511,1],[299,1],[298,1],[297,1],[346,1],[345,1],[344,1],[515,1],[517,1],[516,1],[514,1],[326,1],[325,1],[324,1],[333,1],[339,1],[331,1],[338,1],[335,1],[334,1],[337,1],[336,1],[347,1],[350,1],[349,1],[348,1],[520,1],[519,1],[518,1],[343,1],[341,1],[340,1],[342,1],[408,1],[406,1],[405,1],[407,1],[439,1],[442,1],[441,1],[440,1],[449,1],[448,1],[447,1],[456,1],[455,1],[454,1],[463,1],[462,1],[461,1],[501,1],[500,1],[499,1],[477,1],[476,1],[475,1],[483,1],[486,1],[485,1],[484,1],[487,1],[490,1],[489,1],[488,1],[281,1],[296,1],[290,1],[279,1],[280,1],[283,1],[291,1],[284,1],[287,1],[289,1],[285,1],[282,1],[332,1],[288,1],[253,1],[250,1],[254,1],[256,1],[255,1],[257,1],[259,1],[258,1],[260,1],[267,1],[266,1],[268,1],[271,1],[270,1],[272,1],[274,1],[273,1],[275,1],[277,1],[276,1],[278,1],[534,1],[533,1],[535,1],[537,1],[536,1],[538,1],[540,1],[539,1],[541,1],[545,1],[544,1],[546,1],[548,1],[547,1],[549,1],[551,1],[550,1],[552,1],[554,1],[553,1],[555,1],[556,1],[557,1],[558,1],[560,1],[559,1],[561,1],[563,1],[562,1],[564,1],[264,1],[262,1],[263,1],[265,1],[261,1],[566,1],[565,1],[567,1],[569,1],[568,1],[570,1],[572,1],[571,1],[573,1],[575,1],[574,1],[576,1],[578,1],[577,1],[579,1],[585,1],[584,1],[586,1],[588,1],[587,1],[589,1],[593,1],[592,1],[594,1],[529,1],[528,1],[530,1],[596,1],[595,1],[597,1],[598,1],[600,1],[599,1],[601,1],[603,1],[602,1],[604,1],[605,1],[606,1],[613,1],[612,1],[614,1],[616,1],[615,1],[617,1],[619,1],[618,1],[620,1],[622,1],[621,1],[623,1],[625,1],[624,1],[626,1],[628,1],[627,1],[629,1],[633,1],[632,1],[634,1],[636,1],[635,1],[637,1],[542,1],[543,1],[642,1],[641,1],[643,1],[645,1],[646,1],[644,1],[648,1],[647,1],[650,1],[649,1],[651,1],[653,1],[652,1],[654,1],[656,1],[655,1],[657,1],[659,1],[658,1],[660,1],[885,1],[886,1],[918,1],[917,1],[919,1],[665,1],[666,1],[667,1],[668,1],[670,1],[669,1],[671,1],[673,1],[672,1],[674,1],[676,1],[675,1],[677,1],[679,1],[678,1],[680,1],[682,1],[681,1],[683,1],[685,1],[686,1],[684,1],[688,1],[689,1],[687,1],[639,1],[640,1],[638,1],[691,1],[692,1],[690,1],[694,1],[695,1],[693,1],[697,1],[698,1],[696,1],[700,1],[701,1],[699,1],[703,1],[704,1],[702,1],[706,1],[707,1],[705,1],[709,1],[710,1],[708,1],[712,1],[713,1],[711,1],[715,1],[716,1],[714,1],[718,1],[719,1],[717,1],[721,1],[722,1],[720,1],[729,1],[730,1],[728,1],[732,1],[733,1],[731,1],[726,1],[727,1],[735,1],[736,1],[734,1],[610,1],[611,1],[609,1],[739,1],[737,1],[740,1],[738,1],[741,1],[743,1],[744,1],[742,1],[225,1],[747,1],[748,1],[746,1],[750,1],[751,1],[749,1],[252,1],[269,1],[251,1],[724,1],[725,1],[723,1],[531,1],[532,1],[608,1],[753,1],[754,1],[752,1],[755,1],[756,1],[758,1],[757,1],[760,1],[761,1],[759,1],[763,1],[764,1],[762,1],[767,1],[765,1],[768,1],[766,1],[770,1],[771,1],[769,1],[630,1],[631,1],[775,1],[773,1],[772,1],[776,1],[774,1],[781,1],[782,1],[780,1],[778,1],[779,1],[777,1],[785,1],[786,1],[784,1],[791,1],[792,1],[790,1],[794,1],[795,1],[793,1],[796,1],[798,1],[797,1],[800,1],[801,1],[802,1],[799,1],[804,1],[805,1],[803,1],[807,1],[808,1],[806,1],[810,1],[811,1],[809,1],[813,1],[814,1],[812,1],[816,1],[817,1],[815,1],[819,1],[820,1],[821,1],[818,1],[227,1],[228,1],[226,1],[822,1],[823,1],[825,1],[826,1],[824,1],[828,1],[829,1],[827,1],[859,1],[860,1],[858,1],[831,1],[832,1],[830,1],[834,1],[835,1],[833,1],[837,1],[838,1],[836,1],[840,1],[841,1],[839,1],[843,1],[844,1],[842,1],[846,1],[847,1],[845,1],[850,1],[848,1],[851,1],[849,1],[853,1],[854,1],[852,1],[856,1],[857,1],[855,1],[862,1],[863,1],[861,1],[865,1],[866,1],[864,1],[867,1],[869,1],[870,1],[868,1],[872,1],[873,1],[871,1],[875,1],[876,1],[874,1],[788,1],[789,1],[787,1],[582,1],[583,1],[581,1],[662,1],[661,1],[663,1],[664,1],[889,1],[881,1],[882,1],[146,1],[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[166,1],[156,1],[157,1],[158,1],[159,1],[160,1],[161,1],[162,1],[163,1],[164,1],[165,1],[607,1],[887,1],[888,1],[890,1],[591,1],[590,1],[144,1],[912,1],[906,1],[900,1],[898,1],[145,1],[891,1],[901,1],[899,1],[893,1],[580,1],[907,1],[915,1],[911,1],[913,1],[143,1],[916,1],[908,1],[896,1],[895,1],[902,1],[892,1],[914,1],[905,1],[903,1],[904,1],[897,1],[909,1],[910,1],[894,1],[783,1],[249,1],[884,1],[883,1],[878,1],[877,1],[745,1],[880,1],[879,1],[223,1],[224,1],[229,1],[230,1],[231,1],[245,1],[232,1],[233,1],[234,1],[235,1],[236,1],[239,1],[240,1],[237,1],[241,1],[242,1],[238,1],[243,1],[98,1],[99,1],[97,1],[102,1],[101,1],[100,1],[76,1],[77,1],[74,1],[75,1],[78,1],[64,1],[93,1],[94,1],[95,1],[129,1],[127,1],[126,1],[128,1],[130,1],[103,1],[104,1],[138,1],[137,1],[139,1],[141,1],[140,1],[115,1],[116,1],[132,1],[131,1],[133,1],[134,1],[136,1],[135,1],[96,1],[114,1],[106,1],[107,1],[79,1],[81,1],[91,1],[92,1],[80,1],[119,1],[121,1],[123,1],[124,1],[117,1],[122,1],[120,1],[118,1],[142,1],[82,1],[125,1],[105,1],[88,1],[84,1],[85,1],[83,1],[89,1],[87,1],[90,1],[86,1],[108,1],[112,1],[110,1],[111,1],[109,1],[113,1],[63,1],[220,1],[221,1],[177,1],[178,1],[182,1],[183,1],[168,1],[169,1],[214,1],[215,1],[184,1],[185,1],[186,1],[170,1],[187,1],[171,1],[172,1],[173,1],[174,1],[175,1],[216,1],[217,1],[218,1],[219,1],[176,1],[207,1],[210,1],[222,1],[212,1],[188,1],[167,1],[190,1],[189,1],[192,1],[191,1],[180,1],[179,1],[181,1],[193,1],[213,1],[208,1],[194,1],[199,1],[201,1],[200,1],[196,1],[195,1],[203,1],[202,1],[205,1],[204,1],[198,1],[197,1],[206,1],[209,1],[211,1],[368,1],[364,1],[351,1],[367,1],[360,1],[358,1],[357,1],[356,1],[353,1],[354,1],[362,1],[355,1],[352,1],[359,1],[365,1],[366,1],[361,1],[363,1],[59,1],[939,1],[993,1],[938,1],[248,1],[246,1],[247,1],[57,1],[61,1],[62,1],[60,1],[927,1],[920,1],[286,1],[58,1],[994,1],[937,1],[925,1],[922,1],[923,1],[932,1],[933,1],[934,1],[931,1],[930,1],[935,1],[928,1],[924,1],[926,1],[921,1],[940,1],[929,1],[936,1],[995,1],[1245,1],[1244,1],[1243,1],[1248,1],[1247,1],[1240,1],[1241,1],[1242,1],[1239,1],[1246,1],[1022,1],[1025,1],[1024,1],[997,1],[996,1],[1008,1],[1000,1],[1001,1],[1007,1],[999,1],[998,1],[1004,1],[1002,1],[1003,1],[1006,1],[1005,1],[1013,1],[1009,1],[1012,1],[1011,1],[1014,1],[1016,1],[1017,1],[1018,1],[1019,1],[1020,1],[1021,1],[1030,1],[1010,1],[1031,1],[1032,1],[1015,1],[1033,1],[1035,1],[1036,1],[1034,1],[941,1],[942,1],[944,1],[945,1],[946,1],[947,1],[948,1],[949,1],[950,1],[951,1],[952,1],[953,1],[954,1],[955,1],[956,1],[957,1],[958,1],[943,1],[991,1],[959,1],[960,1],[961,1],[992,1],[962,1],[963,1],[964,1],[965,1],[966,1],[967,1],[968,1],[969,1],[970,1],[971,1],[972,1],[973,1],[975,1],[974,1],[976,1],[977,1],[978,1],[979,1],[980,1],[981,1],[982,1],[983,1],[984,1],[985,1],[986,1],[987,1],[988,1],[989,1],[990,1],[1037,1],[1038,1],[309,1],[307,1],[311,1],[1261,1],[1039,1],[1040,1],[310,1],[1065,1],[1066,1],[1041,1],[1044,1],[1063,1],[1064,1],[1054,1],[1053,1],[1051,1],[1046,1],[1059,1],[1057,1],[1061,1],[1045,1],[1058,1],[1062,1],[1047,1],[1048,1],[1060,1],[1042,1],[1049,1],[1050,1],[1052,1],[1056,1],[1067,1],[1055,1],[1043,1],[1080,1],[1079,1],[1074,1],[1076,1],[1075,1],[1068,1],[1069,1],[1071,1],[1073,1],[1077,1],[1078,1],[1070,1],[1072,1],[1081,1],[1085,1],[1084,1],[1083,1],[1082,1],[1086,1],[1087,1],[1088,1],[1089,1],[1090,1],[1269,1],[1023,1],[308,1],[1029,1],[1257,1],[1027,1],[1028,1],[1026,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[10,1],[1185,1],[1187,1],[1112,1],[1184,1],[1181,1],[1183,1],[1182,1],[1113,1],[1186,1],[1114,1],[1115,1],[1116,1],[1135,1],[1137,1],[1138,1],[1139,1],[1147,1],[1140,1],[1141,1],[1142,1],[1146,1],[1149,1],[1148,1],[1143,1],[1144,1],[1145,1],[1150,1],[1136,1],[1234,1],[1235,1],[1236,1],[1237,1],[1238,1],[1250,1],[1251,1],[1252,1],[1249,1],[1210,1],[1197,1],[1195,1],[1201,1],[1196,1],[1200,1],[1212,1],[1211,1],[1198,1],[1202,1],[1203,1],[1204,1],[1207,1],[1205,1],[1206,1],[1199,1],[1208,1],[1209,1],[1220,1],[1221,1],[1222,1],[1219,1],[1218,1],[1223,1],[1217,1],[1224,1],[1225,1],[1227,1],[1228,1],[1226,1],[1230,1],[1229,1],[1216,1],[1193,1],[1191,1],[1188,1],[1214,1],[1194,1],[1213,1],[1215,1],[1192,1],[1190,1],[1189,1],[1233,1],[1231,1],[1232,1],[1256,1],[1255,1],[1258,1],[1264,1],[1267,1],[1265,1],[1266,1],[1098,1],[1101,1],[1099,1],[1100,1],[1102,1],[1095,1],[1104,1],[1109,1],[1097,1],[1111,1],[1105,1],[1096,1],[1103,1],[1106,1],[1108,1],[1110,1],[1107,1],[1263,1],[1262,1],[1175,1],[1117,1],[1167,1],[1168,1],[1180,1],[1173,1],[1171,1],[1172,1],[1169,1],[1178,1],[1170,1],[1179,1],[1176,1],[1166,1],[1174,1],[1177,1],[1152,1],[1133,1],[1151,1],[1165,1],[1131,1],[1134,1],[1153,1],[1154,1],[1155,1],[1156,1],[1157,1],[1158,1],[1159,1],[1164,1],[1160,1],[1163,1],[1161,1],[1162,1],[1132,1],[1259,1],[1268,1],[1260,1],[1253,1],[1254,1],[1130,1],[1120,1],[1122,1],[1128,1],[1124,1],[1125,1],[1123,1],[1126,1],[1118,1],[1119,1],[1129,1],[1121,1],[1127,1],[1091,1],[1092,1],[1093,1],[1094,1],[1270,1]]},"version":"4.9.5"} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging/README.md b/examples/cactus-example-cbdc-bridging/README.md deleted file mode 100644 index 7ca60834dc..0000000000 --- a/examples/cactus-example-cbdc-bridging/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Hyperledger Cactus Example - CBDC Bridging between Fabric and Besu - -## Running the backend - -> Make sure you have all the dependencies set up as explained in `BUILD.md` - -On the terminal, issue the following commands in the project root: - -1. `npm run configure` -2. `npm run start:example-cbdc-bridging-app` - -Wait for the output to show the message `CbdcBridgingApp running...` - -## Running the frontend - -### Using a pre-built Docker image - -In a second terminal run: - -`docker run -p 2000:2000 aaugusto11/cactus-example-cbdc-bridging-frontend` - -### Running manually in live-reload mode - -In a second terminal run (in the project root): - -1. `cd examples/cactus-example-cbdc-bridging-frontend` -2. `npm i` -3. `npm start` - -Visit `localhost:2000` and interact with the application. Do not change the port in your local machine, otherwise, the API servers might reject the requests. diff --git a/examples/cactus-example-discounted-asset-trade-client/CHANGELOG.md b/examples/cactus-example-discounted-asset-trade-client/CHANGELOG.md deleted file mode 100644 index e8b1bac264..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/CHANGELOG.md +++ /dev/null @@ -1,43 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade-client - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade-client - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade-client - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade-client - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **indy-vdr-nodejs:** update dependency version ([f81b46b](https://github.com/hyperledger/cacti/commit/f81b46bce5ca0880e6bf6b51be2233e2616759a5)) - -### Features - -* **cactus-plugin-ledger-connector-aries:** add new connector plugin ([afef5ae](https://github.com/hyperledger/cacti/commit/afef5ae3e2f36bf7f25928ee75f82bc4800b3172)), closes [#2946](https://github.com/hyperledger/cacti/issues/2946) -* **indy-sdk:** replace indy SDK with AFJ ([3291dcc](https://github.com/hyperledger/cacti/commit/3291dcc57e9e4eb04e0b9abab4134e1a5e2b0bbf)), closes [#2859](https://github.com/hyperledger/cacti/issues/2859) [#2860](https://github.com/hyperledger/cacti/issues/2860) diff --git a/examples/cactus-example-discounted-asset-trade-client/README.md b/examples/cactus-example-discounted-asset-trade-client/README.md deleted file mode 100644 index ff42267204..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# cactus-example-discounted-asset-trade-client -- Client applications and helper libraries for interacting with test indy ledger and Cacti discounted asset trade example app. -- Uses Hyperledger Aries Framework JavaScript (AFJ). -- **Before running any of the script make sure that test indy ledger is running and it's config is available under `/etc/cactus/indy-all-in-one/` (at least `pool_transactions_genesis` should be there.)** - -## Build -- This package will be build as part of main cacti build (`yarn run configure` in root dir), or can be build manually by running `yarn run build` from this directory). - -## Setup Credentials Script -- This script can be used to setup indy credentials before running the example app, or to simply check indy test ledger operational status. -- Script will register employment credential, issue it to agent `Alice`, and check that employment proof is correct. -- Can be run repeatadelly. - -``` bash -# Run the script -yarn setup-credentials - -# Run with debug logs -LOG_LEVEL=DEBUG yarn setup-credentials -``` - -### Sample output - -``` bash -Running with log level INFO -Connecting Alice with Issuer... -Connecting aliceCactiAgent to issuerCactiAgent... -Agents connected! -Register and issue the employment credential... -Register Credential Schema... -Register employment certificate credential schema 'cactiJobCert'... -Register Credential Definition... -Register job certificate credential definition (schemaId: 'did:indy:cacti:test:Th7MpTaRZVRYnPiabds81Y/anoncreds/v0/SCHEMA/cactiJobCert/1.0.0') ... -Issue the credential... -Accepting credential 018e6578-4e52-4ae0-8381-8c935c8a13dc... -Credential accepted! -Credential was issed and accepted by a peer agent! -Verify employment status proof... -Proof request was sent -Accepting proof 5c0986ab-4f1d-4850-a2ff-53c90ce34a12... -Proof request accepted! -Requested proof status: done -Finishing - cleaning up the agents... -All done. -`````` - -## Discounted Asset Trade Client -- Used to interact with discounted asset trade example application. -- Will connect Alice agent to sample application. After that you can choose action to perform. -- Actions: - - `Start the trade`: Will send trade request to example app, asset2 will change owner and payment will be processed on etherem (see `cactus-example-discounted-asset-trade` README for more details) - - `Get this agent credentials`: Get list of Alice credentials. - - `Get assets`: Get example app asset list (both fabric assets and ethereum balances) - - `Exit`: Cleanup and leave. Note - may take few seconds due to ongoing timeouts etc... -- Note: Use arrow keys to restore menu if any async message caused it to disappear. - -``` bash -# Run the script -yarn run-discounted-asset-trade-client - -# Run with debug logs -LOG_LEVEL=DEBUG yarn run-discounted-asset-trade-client -``` - -### Sample output - -``` bash -Running with log level INFO -Connected to the discounted asset trade sample app agent! ID: 5a4f0cf6-b53a-4f3d-9494-112edfdfd626 -Action: (Use arrow keys) -❯ Start the trade - Get this agent credentials - Get assets - Exit -`````` diff --git a/examples/cactus-example-discounted-asset-trade-client/package.json b/examples/cactus-example-discounted-asset-trade-client/package.json deleted file mode 100644 index c521e17dae..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "@hyperledger/cactus-example-discounted-asset-trade-client", - "version": "2.0.0", - "description": "Client for interacting with discounted asset trade sample app and some tools for setting up indy enviroment", - "keywords": [ - "Hyperledger", - "Cacti", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "bin": { - "run-discounted-asset-trade-client": "dist/lib/main/typescript/scripts/run-discounted-asset-trade-client.js", - "setup-credentials": "dist/lib/main/typescript/scripts/setup-credentials.js" - }, - "files": [ - "dist/*" - ], - "scripts": { - "build": "tsc", - "run-discounted-asset-trade-client": "node dist/lib/main/typescript/scripts/run-discounted-asset-trade-client.js", - "setup-credentials": "node dist/lib/main/typescript/scripts/setup-credentials.js" - }, - "dependencies": { - "@aries-framework/anoncreds": "0.5.0-alpha.71", - "@aries-framework/anoncreds-rs": "0.5.0-alpha.71", - "@aries-framework/askar": "0.5.0-alpha.71", - "@aries-framework/core": "0.5.0-alpha.71", - "@aries-framework/indy-vdr": "0.5.0-alpha.71", - "@aries-framework/node": "0.5.0-alpha.71", - "@hyperledger/anoncreds-nodejs": "0.2.0", - "@hyperledger/aries-askar-nodejs": "0.2.0", - "@hyperledger/indy-vdr-nodejs": "0.2.0", - "axios": "1.7.7", - "inquirer": "8.2.6", - "loglevel": "1.8.1" - }, - "devDependencies": { - "@aries-framework/indy-sdk": "0.5.0-alpha.71", - "@types/inquirer": "8.2.6" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/index.ts b/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/agent-setup.ts b/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/agent-setup.ts deleted file mode 100644 index cda75b37b5..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/agent-setup.ts +++ /dev/null @@ -1,260 +0,0 @@ -/** - * Functions for setting up test Aries agents. - */ - -import * as log from "loglevel"; -import * as path from "node:path"; -import * as os from "node:os"; -import { readFileSync } from "fs"; - -import { AskarModule } from "@aries-framework/askar"; -import { - Agent, - InitConfig, - HttpOutboundTransport, - ConnectionsModule, - DidsModule, - TypedArrayEncoder, - KeyType, - CredentialsModule, - V2CredentialProtocol, - ProofsModule, - AutoAcceptProof, - V2ProofProtocol, - AutoAcceptCredential, -} from "@aries-framework/core"; -import { agentDependencies, HttpInboundTransport } from "@aries-framework/node"; -import { ariesAskar } from "@hyperledger/aries-askar-nodejs"; -import { - IndyVdrAnonCredsRegistry, - IndyVdrIndyDidRegistrar, - IndyVdrIndyDidResolver, - IndyVdrModule, -} from "@aries-framework/indy-vdr"; -import { indyVdr } from "@hyperledger/indy-vdr-nodejs"; -import { - AnonCredsCredentialFormatService, - AnonCredsModule, - AnonCredsProofFormatService, -} from "@aries-framework/anoncreds"; -import { AnonCredsRsModule } from "@aries-framework/anoncreds-rs"; -import { anoncreds } from "@hyperledger/anoncreds-nodejs"; - -import { - setupAcceptingCredentialListener, - setupAcceptingProofListener, -} from "../public-api"; - -// Constants -const ALICE_AGENT_NAME = "aliceCactiAgent"; -const ALICE_AGENT_PORT = 3003; -const ISSUER_AGENT_NAME = "issuerCactiAgent"; -const ISSUER_AGENT_PORT = 3004; -const ISSUER_DID_SEED = "000000000000000000000000Steward1"; -const DID_INDY_NAMESPACE = "cacti:test"; - -const WALLET_PATH = path.join( - os.homedir(), - ".cacti/cactus-example-discounted-asset-trade/wallet", -); - -// Read Genesis transactions -const genesisTransactionsPath = - "/etc/cactus/indy-all-in-one/pool_transactions_genesis"; -log.info( - "Reading Indy genesis transactions from file:", - genesisTransactionsPath, -); -const genesisTransactions = readFileSync(genesisTransactionsPath).toString( - "utf-8", -); - -/** - * Configuration for local indy-all-in-one ledger. - */ -export const localTestNetwork = { - isProduction: false, - genesisTransactions, - indyNamespace: DID_INDY_NAMESPACE, - connectOnStartup: true, -}; - -/** - * Aries JS Agent with Anoncreds/Indy/Askar modules configured. - * This is exact Agent type returned by factories used in this module. - */ -export type AnoncredAgent = Agent<{ - readonly connections: ConnectionsModule; - readonly credentials: CredentialsModule< - V2CredentialProtocol[] - >; - readonly proofs: ProofsModule< - V2ProofProtocol[] - >; - readonly anoncreds: AnonCredsModule; - readonly anoncredsRs: AnonCredsRsModule; - readonly indyVdr: IndyVdrModule; - readonly dids: DidsModule; - readonly askar: AskarModule; -}>; - -/** - * Import endorser DID using it's seed. - * @warn If there's any endorser DID already in a wallet then it will be returned. New one (`seed`) will be ignored! - * - * @param agent Aries agent - * @param seed private DID seed - * - * @returns endorser fully-qualified DID - */ -export async function importExistingIndyDidFromPrivateKey( - agent: AnoncredAgent, - seed: string, -): Promise { - const [endorserDid] = await agent.dids.getCreatedDids({ method: "indy" }); - if (endorserDid) { - log.info("Endorser DID already present in a wallet"); - return endorserDid.did; - } - - const seedBuffer = TypedArrayEncoder.fromString(seed); - const key = await agent.wallet.createKey({ - keyType: KeyType.Ed25519, - privateKey: seedBuffer, - }); - - // did is first 16 bytes of public key encoded as base58 - const unqualifiedIndyDid = TypedArrayEncoder.toBase58( - key.publicKey.slice(0, 16), - ); - const did = `did:indy:${DID_INDY_NAMESPACE}:${unqualifiedIndyDid}`; - - await agent.dids.import({ - did, - }); - - return did; -} - -/** - * Generic function for setting up common Anoncreds/Indy/Askar agent. - * Use only for test purposes! - * - * @param name name of the agent - * @param port port to listen on - * - * @returns newly created Aries agent. - */ -export async function setupAgent( - name: string, - port: number, -): Promise { - const walletPath = path.join(WALLET_PATH, `${name}.sqlite`); - - const config: InitConfig = { - label: name, - walletConfig: { - id: name, - key: name, - storage: { - type: "sqlite", - path: walletPath, - }, - }, - endpoints: [`http://localhost:${port}`], - }; - - const agent = new Agent({ - config, - modules: getAskarAnonCredsIndyModules(), - dependencies: agentDependencies, - }); - - agent.registerOutboundTransport(new HttpOutboundTransport()); - agent.registerInboundTransport(new HttpInboundTransport({ port })); - await agent.initialize(); - - return agent; -} - -/** - * Get Anoncreds/Indy/Askar agent modules. - * - * @returns agent modules - */ -function getAskarAnonCredsIndyModules() { - return { - connections: new ConnectionsModule({ - autoAcceptConnections: true, - }), - - credentials: new CredentialsModule({ - autoAcceptCredentials: AutoAcceptCredential.ContentApproved, - credentialProtocols: [ - new V2CredentialProtocol({ - credentialFormats: [new AnonCredsCredentialFormatService()], - }), - ], - }), - - proofs: new ProofsModule({ - autoAcceptProofs: AutoAcceptProof.ContentApproved, - proofProtocols: [ - new V2ProofProtocol({ - proofFormats: [new AnonCredsProofFormatService()], - }), - ], - }), - - anoncreds: new AnonCredsModule({ - registries: [new IndyVdrAnonCredsRegistry()], - }), - - anoncredsRs: new AnonCredsRsModule({ - anoncreds, - }), - - indyVdr: new IndyVdrModule({ - indyVdr, - networks: [localTestNetwork], - }), - - dids: new DidsModule({ - registrars: [new IndyVdrIndyDidRegistrar()], - resolvers: [new IndyVdrIndyDidResolver()], - }), - - askar: new AskarModule({ ariesAskar }), - } as const; -} - -/** - * Setup Alice agent. - * It will listen and accept new credentials and proof requests. - * - * @returns Alice agent - */ -export async function createAliceAgent(): Promise { - const agent = await setupAgent(ALICE_AGENT_NAME, ALICE_AGENT_PORT); - setupAcceptingCredentialListener(agent); - setupAcceptingProofListener(agent); - return agent; -} - -/** - * Setup Issuer agent. - * It will import endorser DID into wallet to be able to send transactions to the ledger. - * - * @returns Issuer agent - */ -export async function createIssuerAgent(): Promise<{ - agent: AnoncredAgent; - did: string; -}> { - const agent = await setupAgent(ISSUER_AGENT_NAME, ISSUER_AGENT_PORT); - const did = await importExistingIndyDidFromPrivateKey(agent, ISSUER_DID_SEED); - return { - agent, - did, - }; -} diff --git a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/connections.ts b/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/connections.ts deleted file mode 100644 index 2a4cf7ec00..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/connections.ts +++ /dev/null @@ -1,228 +0,0 @@ -/** - * Functions used for connecting aries agents together. - */ - -import * as log from "loglevel"; -import { - Agent, - ConnectionEventTypes, - ConnectionStateChangedEvent, - DidExchangeState, - OutOfBandRecord, - ConnectionRecord, -} from "@aries-framework/core"; - -// Constants -const WAIT_FOR_CLIENT_ACCEPT_TIMEOUT = 60 * 1000; -const WAIT_FOR_CONNECTION_READY_POLL_INTERVAL = 500; - -/** - * Create connection invitation from an `agent`. - * - * @param agent Aries agent - * - * @returns invitationUrl and outOfBandRecord - */ -export async function createNewConnectionInvitation(agent: Agent): Promise<{ - invitationUrl: string; - outOfBandRecord: OutOfBandRecord; -}> { - const outOfBandRecord = await agent.oob.createInvitation(); - - return { - invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ - domain: "https://example.org", - }), - outOfBandRecord, - }; -} - -/** - * Accept connection invitation using it's URL. - * - * @param agent Aries agent - * @param invitationUrl connection invitation - * - * @returns `OutOfBandRecord` - */ -export async function acceptInvitation( - agent: Agent, - invitationUrl: string, -): Promise { - const { outOfBandRecord } = - await agent.oob.receiveInvitationFromUrl(invitationUrl); - - return outOfBandRecord; -} - -/** - * Wait until connection invite is accepted and connection is established. - * This functions comes from AFJ repository. - * - * @param agent Aries agent - * @param outOfBandId connection outOfBandId to wait for - * @returns new `ConnectionRecord` - */ -export async function waitForConnection( - agent: Agent, - outOfBandId: string, -): Promise { - if (!outOfBandId) { - throw new Error("Missing outOfBandId in waitForConnection"); - } - - const getConnectionRecord = (outOfBandId: string) => - new Promise((resolve, reject) => { - const timeoutId = setTimeout( - () => reject(new Error("Missing connection")), - WAIT_FOR_CLIENT_ACCEPT_TIMEOUT, - ); - - // Start listener - agent.events.on( - ConnectionEventTypes.ConnectionStateChanged, - (e) => { - if (e.payload.connectionRecord.outOfBandId !== outOfBandId) return; - log.debug( - "waitForConnection() - received ConnectionStateChanged event for given outOfBandId", - ); - clearTimeout(timeoutId); - resolve(e.payload.connectionRecord); - }, - ); - - // Also retrieve the connection record by invitation if the event has already fired - void agent.connections - .findAllByOutOfBandId(outOfBandId) - .then(([connectionRecord]) => { - if (connectionRecord) { - clearTimeout(timeoutId); - resolve(connectionRecord); - } - }); - }); - - const connectionRecord = await getConnectionRecord(outOfBandId); - - return agent.connections.returnWhenIsConnected(connectionRecord.id); -} - -/** - * Search for already established connection with agent by it's label. - * @warn don't trust the label, use this method only for development. - * - * @param agent Aries agent - * @param peerAgentLabel Aries agent label we already conencted to - * - * @returns `ConnectionRecord` or undefined if connection is missing - */ -export async function getConnectionWithPeerAgent( - agent: Agent, - peerAgentLabel: string, -): Promise { - const completedConnections = await agent.connections.findAllByQuery({ - state: DidExchangeState.Completed, - }); - log.debug( - `getConnectionWithPeerAgent() - found ${completedConnections.length} completed connections`, - ); - - return completedConnections - .filter((cr) => { - return cr.theirLabel && cr.theirLabel === peerAgentLabel; - }) - .pop(); -} - -/** - * Connect two agents to each other. - * - * @param firstAgent Aries agent - * @param secondAgent Aries agent - * @returns [firstAgentConnectionRecord, secondAgentConnectionRecord] - */ -export async function connectAgents( - firstAgent: Agent, - secondAgent: Agent, -): Promise { - log.info( - `Connecting ${firstAgent.config.label} to ${secondAgent.config.label}...`, - ); - - let firstAgentConnectionRecord = await getConnectionWithPeerAgent( - firstAgent, - secondAgent.config.label, - ); - let secondAgentConnectionRecord = await getConnectionWithPeerAgent( - secondAgent, - firstAgent.config.label, - ); - - if (firstAgentConnectionRecord && secondAgentConnectionRecord) { - log.info("Agents already connected, using previous connection records..."); - return [firstAgentConnectionRecord, secondAgentConnectionRecord]; - } - - // Create an invitation from the firstAgent - const { outOfBandRecord: firstAgentOOBRecord, invitationUrl } = - await createNewConnectionInvitation(firstAgent); - const isConnectedPromise = waitForConnection( - firstAgent, - firstAgentOOBRecord.id, - ); - - // Accept invitation as the secondAgent - const secondAgentOOBRecord = await acceptInvitation( - secondAgent, - invitationUrl, - ); - - // Wait until connection is done - await isConnectedPromise; - - // Get newly created connection records - firstAgentConnectionRecord = ( - await firstAgent.connections.findAllByOutOfBandId(firstAgentOOBRecord.id) - ).pop(); - secondAgentConnectionRecord = ( - await secondAgent.connections.findAllByOutOfBandId(secondAgentOOBRecord.id) - ).pop(); - - if (firstAgentConnectionRecord && secondAgentConnectionRecord) { - log.info("Agents connected!"); - return [firstAgentConnectionRecord, secondAgentConnectionRecord]; - } - - throw new Error("Could not connect the agents!"); -} - -/** - * Block until given connection is operational. - * - * @param agent Aries agent - * @param outOfBandId connection outOfBandId - * @param timeout operation timeout (will throw exception if timeout exceeded) - */ -export async function waitForConnectionReadyV1( - agent: Agent, - outOfBandId: string, - timeout = WAIT_FOR_CLIENT_ACCEPT_TIMEOUT, -): Promise { - let connection: ConnectionRecord | undefined; - let counter = Math.ceil(timeout / WAIT_FOR_CONNECTION_READY_POLL_INTERVAL); - - do { - counter--; - await new Promise((resolve) => - setTimeout(resolve, WAIT_FOR_CONNECTION_READY_POLL_INTERVAL), - ); - - connection = ( - await agent.connections.findAllByOutOfBandId(outOfBandId) - ).pop(); - } while (counter > 0 && (!connection || !connection.isReady)); - - if (counter <= 0) { - throw new Error("waitForConnectionReadyV1() timeout reached!"); - } -} diff --git a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/credentials.ts b/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/credentials.ts deleted file mode 100644 index 43ed66d192..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/credentials.ts +++ /dev/null @@ -1,271 +0,0 @@ -/** - * Functions for handling credentials. - */ - -import * as log from "loglevel"; -import { - CredentialState, - CredentialRecordBinding, - CredentialPreviewAttribute, -} from "@aries-framework/core"; -import { AnoncredAgent } from "./agent-setup"; - -// Constants -const WAIT_FOR_ISSUE_ACCEPT_POLL_INTERVAL = 1000; -const WAIT_FOR_ISSUE_ACCEPT_TIMEOUT = 30 * 1000; - -const JOB_CERTIFICATE_SCHEMA_NAME = "cactiJobCert"; -const JOB_CERTIFICATE_SCHEMA_ATTRS = [ - "first_name", - "last_name", - "salary", - "employee_status", - "experience", -]; - -export type JobCertificateSchema = [ - { name: "first_name"; value: string }, - { name: "last_name"; value: string }, - { name: "salary"; value: string }, - { name: "employee_status"; value: string }, - { name: "experience"; value: string }, -]; - -export type AgentCredentialSummary = { - id: string; - schemaId: string; - credentialDefinitionId: string; - connectionId: string | undefined; - credentials: CredentialRecordBinding[]; - credentialAttributes: CredentialPreviewAttribute[] | undefined; -}; - -/** - * Register employment credential schema using specified endorser DID and agent. - * - * @param agent Aries agent - * @param did endorser DID - * - * @returns schema ID - */ -export async function registerCredentialSchema( - agent: AnoncredAgent, - did: string, -): Promise { - log.info( - `Register employment certificate credential schema '${JOB_CERTIFICATE_SCHEMA_NAME}'...`, - ); - - const [createdSchema] = await agent.modules.anoncreds.getCreatedSchemas({ - schemaName: JOB_CERTIFICATE_SCHEMA_NAME, - }); - if (createdSchema) { - log.info("Schema was already registered"); - return createdSchema.schemaId; - } - - const schemaResult = await agent.modules.anoncreds.registerSchema({ - schema: { - attrNames: JOB_CERTIFICATE_SCHEMA_ATTRS, - issuerId: did, - name: JOB_CERTIFICATE_SCHEMA_NAME, - version: "1.0.0", - }, - options: { - endorserMode: "internal", - endorserDid: did, - }, - }); - - if (schemaResult.schemaState.state !== "finished") { - throw new Error( - `Error registering schema: ${ - schemaResult.schemaState.state === "failed" - ? schemaResult.schemaState.reason - : "Not Finished" - }`, - ); - } - - return schemaResult.schemaState.schemaId; -} - -/** - * Register employment credential definition using specified endorser DID and agent. - * - * @param agent Aries agent - * @param schemaId job credential schema id - * @param did endorser DID - * - * @returns credentialDefinitionId - */ -export async function registerCredentialDefinition( - agent: AnoncredAgent, - schemaId: string, - did: string, -): Promise { - log.info( - `Register job certificate credential definition (schemaId: '${schemaId}') ...`, - ); - - const [createdCredentialDefinition] = - await agent.modules.anoncreds.getCreatedCredentialDefinitions({ - schemaId, - issuerId: did, - }); - if (createdCredentialDefinition) { - log.info("Credential definition was already registered"); - return createdCredentialDefinition.credentialDefinitionId; - } - - const credentialDefinitionResult = - await agent.modules.anoncreds.registerCredentialDefinition({ - credentialDefinition: { - tag: "default", - issuerId: did, - schemaId: schemaId, - }, - options: { - endorserMode: "internal", - endorserDid: did, - supportRevocation: false, - }, - }); - - if ( - credentialDefinitionResult.credentialDefinitionState.state !== "finished" - ) { - throw new Error( - `Error registering credential definition: ${ - credentialDefinitionResult.credentialDefinitionState.state === "failed" - ? credentialDefinitionResult.credentialDefinitionState.reason - : "Not Finished" - }}`, - ); - } - - return credentialDefinitionResult.credentialDefinitionState - .credentialDefinitionId; -} - -/** - * Register schema and credential definition (if not done already), and issue new credential to agent - * with specified `connectionId`. - * Will wait until credential is accepted by the peer. - * - * @param issuerAgent Aries agent - * @param credential credential to be issued - * @param connectionId peer agent connection ID - * @param did endorser DID - * @returns schemaId, credentialDefinitionId, credentialId - */ -export async function issueCredential( - issuerAgent: AnoncredAgent, - credential: JobCertificateSchema, - connectionId: string, - did: string, -): Promise<{ - schemaId: string; - credentialDefinitionId: string; - credentialId: string; -}> { - log.info("Register Credential Schema..."); - const schemaId = await registerCredentialSchema(issuerAgent, did); - log.info("Employment credential schemaId:", schemaId); - - log.info("Register Credential Definition..."); - const credentialDefinitionId = await registerCredentialDefinition( - issuerAgent, - schemaId, - did, - ); - log.info( - "Employment credential credentialDefinitionId:", - credentialDefinitionId, - ); - - log.info("Issue the credential..."); - const indyCredentialExchangeRecord = - await issuerAgent.credentials.offerCredential({ - protocolVersion: "v2", - connectionId, - credentialFormats: { - anoncreds: { - credentialDefinitionId, - attributes: credential, - }, - }, - }); - log.info("Employment credential issued:", indyCredentialExchangeRecord.id); - await waitForCredentialAcceptance( - issuerAgent, - indyCredentialExchangeRecord.id, - ); - log.info("Credential was issued and accepted by a peer agent!"); - - return { - schemaId, - credentialDefinitionId, - credentialId: indyCredentialExchangeRecord.id, - }; -} - -/** - * Block until credential was accepted by peer agent. - * - * @param agent Aries agent - * @param credentialId issued credential id - * @param timeout operation timeout (will throw exception if timeout exceeded) - */ -export async function waitForCredentialAcceptance( - agent: AnoncredAgent, - credentialId: string, - timeout = WAIT_FOR_ISSUE_ACCEPT_TIMEOUT, -): Promise { - let credentialState: CredentialState | undefined; - let counter = Math.ceil(timeout / WAIT_FOR_ISSUE_ACCEPT_POLL_INTERVAL); - - do { - counter--; - await new Promise((resolve) => - setTimeout(resolve, WAIT_FOR_ISSUE_ACCEPT_POLL_INTERVAL), - ); - - const credential = await agent.credentials.findById(credentialId); - credentialState = credential?.state; - } while ( - counter > 0 && - (!credentialState || credentialState !== CredentialState.Done) - ); - - if (counter <= 0) { - throw new Error("waitForCredentialAcceptance() timeout reached!"); - } -} - -/** - * Get summary of given agent credentials. - * - * @param agent Aries agent - * @returns list of credentials - */ -export async function getAgentCredentials( - agent: AnoncredAgent, -): Promise { - const validCredentials = await agent.credentials.findAllByQuery({ - state: CredentialState.Done, - }); - log.debug("Valid credentials count:", validCredentials.length); - - return validCredentials.map((c) => { - return { - id: c.id, - schemaId: c.metadata.data["_anoncreds/credential"].schemaId, - credentialDefinitionId: - c.metadata.data["_anoncreds/credential"].credentialDefinitionId, - connectionId: c.connectionId, - credentials: c.credentials, - credentialAttributes: c.credentialAttributes, - }; - }); -} diff --git a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/listeners.ts b/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/listeners.ts deleted file mode 100644 index 92959c4a1b..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/listeners.ts +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Functions used for listening for ledger events. - */ - -import * as log from "loglevel"; -import { - CredentialStateChangedEvent, - CredentialEventTypes, - CredentialState, - ProofEventTypes, - ProofStateChangedEvent, - ProofState, - CredentialExchangeRecord, - ProofExchangeRecord, -} from "@aries-framework/core"; - -import { AnoncredAgent } from "../public-api"; - -/** - * Method to accept credential or decline it when error occurred. - * - * @param agent Aries agent - * @param credentialRecord received credential - */ -async function acceptCredential( - agent: AnoncredAgent, - credentialRecord: CredentialExchangeRecord, -) { - try { - log.info(`Accepting credential ${credentialRecord.id}...`); - - await agent.credentials.acceptOffer({ - credentialRecordId: credentialRecord.id, - }); - - log.info("Credential accepted!"); - } catch (error) { - log.error("Could not accept credential offer! Declining it..."); - agent.credentials.declineOffer(credentialRecord.id); - } -} - -/** - * Method to accept proof requests or decline it when error occurred or matching credential is missing. - * - * @param agent Aries agent - * @param proofRecord received proof - */ -async function acceptProof( - agent: AnoncredAgent, - proofRecord: ProofExchangeRecord, -) { - try { - log.info(`Accepting proof ${proofRecord.id}...`); - - const requestedCredentials = await agent.proofs.selectCredentialsForRequest( - { - proofRecordId: proofRecord.id, - }, - ); - await agent.proofs.acceptRequest({ - proofRecordId: proofRecord.id, - proofFormats: requestedCredentials.proofFormats, - }); - - log.info("Proof request accepted!"); - } catch (error) { - log.error("Could not accept proof request! Declining it..."); - await agent.proofs.declineRequest({ - proofRecordId: proofRecord.id, - sendProblemReport: true, - }); - } -} - -/** - * Setup listener that will accept all credentials send to the agent. - * - * @param agent Aries agent - */ -export function setupAcceptingCredentialListener(agent: AnoncredAgent) { - agent.events.on( - CredentialEventTypes.CredentialStateChanged, - async ({ payload }) => { - log.debug("Received credentialRecord:", payload.credentialRecord); - - switch (payload.credentialRecord.state) { - case CredentialState.OfferReceived: - await acceptCredential(agent, payload.credentialRecord); - break; - } - }, - ); -} - -/** - * Setup listener that will accept all proof requests send to the agent. - * - * @param agent Aries agent - */ -export const setupAcceptingProofListener = (agent: AnoncredAgent) => { - agent.events.on( - ProofEventTypes.ProofStateChanged, - async ({ payload }: ProofStateChangedEvent) => { - log.debug("Received proofRecord:", payload.proofRecord); - - switch (payload.proofRecord.state) { - case ProofState.RequestReceived: - await acceptProof(agent, payload.proofRecord); - break; - } - }, - ); -}; diff --git a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/proofs.ts b/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/proofs.ts deleted file mode 100644 index ac1dcd5867..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/lib/proofs.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Functions for handling proofs. - */ - -import * as log from "loglevel"; -import { - ProofEventTypes, - ProofStateChangedEvent, - ProofState, - ProofExchangeRecord, -} from "@aries-framework/core"; -import { AnoncredAgent } from "./agent-setup"; - -// Constants -const WAIT_FOR_PROOF_TIMEOUT = 60 * 1000; - -/** - * Sends employment proof request to the peer agent (under connectionId), waits for proof to be accepted. - * Function will timout after prederermined amount of time. - * @note it returns if any proof was accepted, not necessarily one we've sent. - * - * @param agent Aries agent - * @param credentialDefinitionId employment credential definition id - * @param connectionId peer agent connection id - * - * @returns accepted ProofExchangeRecord id - */ -export async function checkCredentialProof( - agent: AnoncredAgent, - credentialDefinitionId: string, - connectionId: string, -): Promise { - // Create proof accepted listener - const isProofOK = new Promise((resolve, reject) => { - const timeoutId = setTimeout( - () => - reject( - new Error( - "Timeout reached - could not receive proof confirmation from peer", - ), - ), - WAIT_FOR_PROOF_TIMEOUT, - ); - - // Start listener - agent.events.on( - ProofEventTypes.ProofStateChanged, - async ({ payload }: ProofStateChangedEvent) => { - log.debug("Received proofRecord:", payload.proofRecord); - - const { state } = payload.proofRecord; - if ( - state === ProofState.Done || - state === ProofState.Abandoned || - state === ProofState.Declined - ) { - clearTimeout(timeoutId); - log.info("Requested proof status:", state); - resolve(payload.proofRecord); - } - }, - ); - }); - - // Send proof request - const proofAttributes = { - employee_status: { - name: "employee_status", - restrictions: [ - { - "attr::employee_status::value": "Permanent", - cred_def_id: credentialDefinitionId, - }, - ], - }, - }; - - await agent.proofs.requestProof({ - protocolVersion: "v2", - connectionId, - proofFormats: { - anoncreds: { - name: "proof-request", - version: "1.0", - requested_attributes: proofAttributes, - }, - }, - }); - log.info("Proof request was sent"); - - return isProofOK; -} diff --git a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/public-api.ts b/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/public-api.ts deleted file mode 100755 index 9dabe3a24b..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/public-api.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./lib/agent-setup"; -export * from "./lib/connections"; -export * from "./lib/credentials"; -export * from "./lib/listeners"; -export * from "./lib/proofs"; diff --git a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/scripts/run-discounted-asset-trade-client.ts b/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/scripts/run-discounted-asset-trade-client.ts deleted file mode 100644 index 3a49885bb8..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/scripts/run-discounted-asset-trade-client.ts +++ /dev/null @@ -1,238 +0,0 @@ -#!/usr/bin/env node - -/** - * Client App for interacting with discounted asset trade application. - * Make sure example app is running before starting this client! - * Client will establish connection with sample app and present menu with possible actions. - */ - -import * as log from "loglevel"; -import inquirer from "inquirer"; -import axios from "axios"; -import { - AnoncredAgent, - createAliceAgent, - createNewConnectionInvitation, - getAgentCredentials, - waitForConnection, -} from "../public-api"; - -// Logger setup -const logLevel = process.env.LOG_LEVEL ?? "INFO"; -log.setDefaultLevel(logLevel as log.LogLevelDesc); -console.log("Running with log level", logLevel); - -// Constants -const FROM_ETH_ACCOUNT_ADDR = "0xec709e1774f0ce4aba47b52a499f9abaaa159f71"; -const ESCROW_ETH_ACCOUNT_ADDR = "0x36e146d5afab61ab125ee671708eeb380aea05b6"; -const TO_ETH_ACCOUNT_ADDR = "0x9d624f7995e8bd70251f8265f2f9f2b49f169c55"; - -/** - * Main menu actions - */ -enum PromptOptions { - StartTrade = "Start the trade", - GetCredentials = "Get this agent credentials", - GetAssets = "Get assets", - Exit = "Exit", -} - -/** - * Connection ID to identify this agent on BLP side. - * Must be set during this script startup. - */ -let blpConnectionId: string | undefined; - -/** - * Creates an invitation, sends it to BLP, awaits for connection to be established. - * Sets global blpConnectionId on success. - * - * @param clientAgent this app agent - */ -async function connectAgentToBLP(clientAgent: AnoncredAgent) { - log.debug("Connecting to the discounted asset trade sample app agent..."); - - // Create invitation - const { outOfBandRecord, invitationUrl } = - await createNewConnectionInvitation(clientAgent); - const isConnectedPromise = waitForConnection(clientAgent, outOfBandRecord.id); - - // Send request to the BLP agent - log.debug("Invitation link:", invitationUrl); - const connectResponse = await axios.post( - "http://localhost:5034/api/v1/bl/indy/connect", - { - invitationUrl, - }, - ); - log.debug("Indy connect response:", connectResponse.data); - - blpConnectionId = connectResponse.data.blpConnectionId; - if (!blpConnectionId) { - throw new Error("No this agents connectionId received from the BLP!"); - } - - // Wait for connection - await isConnectedPromise; - log.info( - "Connected to the discounted asset trade sample app agent! ID:", - blpConnectionId, - ); -} - -/** - * Sends trade request to the discounted asset trade sample app. - */ -async function sendTradeRequest() { - if (!blpConnectionId) { - throw new Error("No this agents connectionId received from the BLP!"); - } - - const connectResponse = await axios.post( - "http://localhost:5034/api/v1/bl/trades/", - { - businessLogicID: "guks32pf", - tradeParams: [ - "0xec709e1774f0ce4aba47b52a499f9abaaa159f71", - "0x9d624f7995e8bd70251f8265f2f9f2b49f169c55", - "Brad", - "Cathy", - "asset2", - blpConnectionId, - ], - authParams: ["<>"], - }, - ); - log.info("Trade request sent! Response:", connectResponse.data); -} - -/** - * Print this agent credentials from a wallet (in a simplified form). - * - * @param agent this app agent - */ -async function printAgentCredentials(agent: AnoncredAgent) { - const credentials = await getAgentCredentials(agent); - log.info(JSON.stringify(credentials, undefined, 2)); -} - -/** - * Gets asset summary from BLP (both ethereum and fabric). - */ -async function getAssetsFromSampleApp() { - // Read ethereum balances - const fromAccountResponse = await axios.get( - `http://localhost:5034/api/v1/bl/balance/${FROM_ETH_ACCOUNT_ADDR}`, - ); - log.info("\n# Ethereum fromAccount:"); - log.info(fromAccountResponse.data); - - const escrowAccountResponse = await axios.get( - `http://localhost:5034/api/v1/bl/balance/${ESCROW_ETH_ACCOUNT_ADDR}`, - ); - log.info("\n# Ethereum escrowAccount:"); - log.info(escrowAccountResponse.data); - - const toAccountResponse = await axios.get( - `http://localhost:5034/api/v1/bl/balance/${TO_ETH_ACCOUNT_ADDR}`, - ); - log.info("\n# Ethereum toAccount:"); - log.info(toAccountResponse.data); - - // Read fabric assets - const fabricResponse = await axios.get( - "http://localhost:5034/api/v1/bl/fabric-asset/", - ); - log.info("\n# Fabric:"); - log.info(fabricResponse.data); -} - -/** - * Show menu prompt and wait for action select. - * - * @returns action selected - */ -async function getPromptChoice() { - return inquirer.prompt({ - type: "list", - prefix: "", - name: "menu", - message: "Action:", - choices: Object.values(PromptOptions), - }); -} - -/** - * Main application loop, will print menu with actions. - * - * @param agent this app agent - */ -async function menuLoop(agent: AnoncredAgent) { - let isRunning = true; - - while (isRunning) { - try { - const choice = await getPromptChoice(); - - switch (choice.menu) { - case PromptOptions.StartTrade: - await sendTradeRequest(); - break; - case PromptOptions.GetCredentials: - await printAgentCredentials(agent); - break; - case PromptOptions.GetAssets: - await getAssetsFromSampleApp(); - break; - case PromptOptions.Exit: - isRunning = false; - break; - } - } catch (error) { - if (error.isTtyError) { - log.error("Prompt couldn't be rendered in the current environment:"); - isRunning = false; - } - if (axios.isAxiosError(error)) { - log.error( - `Request error: ${error.name} ${error.message} - ${JSON.stringify( - error.response?.data, - )}`, - ); - } else { - log.error("Menu action error:", error); - } - } - } -} - -/** - * Main application logic. - */ -async function run() { - const aliceAgent = await createAliceAgent(); - log.debug("Alice (client) agent created"); - - try { - await connectAgentToBLP(aliceAgent); - - log.debug("Running menu loop..."); - await menuLoop(aliceAgent); - } catch (error) { - if (axios.isAxiosError(error)) { - log.error( - `Request error: ${error.name} ${error.message} - ${JSON.stringify( - error.response?.data, - )}`, - ); - } else { - log.error("Client app error:", error); - } - } finally { - log.info("Exiting the client app..."); - aliceAgent.shutdown(); - } -} - -// Run the main logic -run(); diff --git a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/scripts/setup-credentials.ts b/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/scripts/setup-credentials.ts deleted file mode 100644 index 466348b423..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/src/main/typescript/scripts/setup-credentials.ts +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env node - -/** - * Simple script for setting up employment credential on the ledger and issuing one to Alice. - * Alice can later use it when interacting with discounted asset trade app. - * Script can also be used to verify whether test indy ledger is operational. - */ - -import * as log from "loglevel"; -import { - createAliceAgent, - createIssuerAgent, - connectAgents, - issueCredential, - checkCredentialProof, -} from "../public-api"; - -// Logger setup -const logLevel = process.env.LOG_LEVEL ?? "INFO"; -log.setDefaultLevel(logLevel as log.LogLevelDesc); -console.log("Running with log level", logLevel); - -/** - * Main setup script logic. - * Creates agents for Alice and Issuer, connects them, registers credentials, issues it to Alice, and verify the proof. - */ -async function run() { - const aliceAgent = await createAliceAgent(); - log.debug("Alice agent created"); - - const { agent: issuerAgent, did: issuerDid } = await createIssuerAgent(); - log.debug("Issuer agent created."); - log.debug("Issuer endorsing DID:", issuerDid); - - try { - log.info("Connecting Alice with Issuer..."); - const [aliceAgentConRecord, issuerAgentConRecord] = await connectAgents( - aliceAgent, - issuerAgent, - ); - log.debug("Alice connection ID:", aliceAgentConRecord.id); - log.debug("Issuer connection ID:", issuerAgentConRecord.id); - - log.info("Register and issue the employment credential..."); - const { credentialDefinitionId } = await issueCredential( - issuerAgent, - [ - { name: "first_name", value: "Alice" }, - { name: "last_name", value: "Garcia" }, - { name: "salary", value: "2400" }, - { name: "employee_status", value: "Permanent" }, - { name: "experience", value: "10" }, - ], - issuerAgentConRecord.id, - issuerDid, - ); - - log.info("Verify employment status proof..."); - await checkCredentialProof( - issuerAgent, - credentialDefinitionId, - issuerAgentConRecord.id, - ); - } catch (error) { - log.error("Error when running setup scenario:", error); - } finally { - log.info("Finishing - cleaning up the agents..."); - await aliceAgent.shutdown(); - await issuerAgent.shutdown(); - } - - log.info("All done."); -} - -// Run the script logic -run(); diff --git a/examples/cactus-example-discounted-asset-trade-client/tsconfig.json b/examples/cactus-example-discounted-asset-trade-client/tsconfig.json deleted file mode 100644 index eb4d409fa9..0000000000 --- a/examples/cactus-example-discounted-asset-trade-client/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-example-discounted-asset-trade-client.tsbuildinfo" - }, - "include": ["./src"] -} diff --git a/examples/cactus-example-discounted-asset-trade/.gitignore b/examples/cactus-example-discounted-asset-trade/.gitignore deleted file mode 100644 index 0be01af9cb..0000000000 --- a/examples/cactus-example-discounted-asset-trade/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# BLP artifacts -transaction-Info.json -etc/ - -# don't commit package-lock -package-lock.json diff --git a/examples/cactus-example-discounted-asset-trade/CHANGELOG.md b/examples/cactus-example-discounted-asset-trade/CHANGELOG.md deleted file mode 100644 index 12a385b12a..0000000000 --- a/examples/cactus-example-discounted-asset-trade/CHANGELOG.md +++ /dev/null @@ -1,144 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger-cacti/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -### Features - -* **cmd-socketio-server:** move to examples as deprecated ([4de8069](https://github.com/hyperledger/cacti/commit/4de806974f0066359cca422561042a55173d3655)) - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -### Features - -* **go-ethereum-socketio:** remove deprecated connector ([56dd9f8](https://github.com/hyperledger/cacti/commit/56dd9f8aa72883aeb5bfcf0303b0af6e84daad7a)), closes [#3155](https://github.com/hyperledger/cacti/issues/3155) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Features - -* **fabric-connector:** add getChainInfo, improve getBlock output ([8c030ae](https://github.com/hyperledger/cacti/commit/8c030ae9e739a28ff0900f7af27ec0fbbb4b7ff9)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari -* **fabric-connector:** It accepts `type` instead of `skipDecode` flag. -- Move common block formatting logic to `cacti-block-formatters.ts`. -- Add tests for new features. Move test common to quering `qscc` to single file - to increase CI speed. - -Signed-off-by: Michal Bajer - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **cactus-example-discounted-asset-trade:** use openapi ethereum connector ([dcaf9fe](https://github.com/hyperledger/cacti/commit/dcaf9fe5de5b830975f3d308f140eff32d3cb79d)), closes [#2645](https://github.com/hyperledger/cacti/issues/2645) -* **cactus-plugin-ledger-connector-aries:** add new connector plugin ([afef5ae](https://github.com/hyperledger/cacti/commit/afef5ae3e2f36bf7f25928ee75f82bc4800b3172)), closes [#2946](https://github.com/hyperledger/cacti/issues/2946) -* **cactus-plugin-ledger-connector-fabric-socketio:** remove fabric-socketio connector ([704e201](https://github.com/hyperledger/cacti/commit/704e201d6bd6bf7a38f0de7da60723118e18cea7)), closes [#2644](https://github.com/hyperledger/cacti/issues/2644) -* **indy-sdk:** replace indy SDK with AFJ ([3291dcc](https://github.com/hyperledger/cacti/commit/3291dcc57e9e4eb04e0b9abab4134e1a5e2b0bbf)), closes [#2859](https://github.com/hyperledger/cacti/issues/2859) [#2860](https://github.com/hyperledger/cacti/issues/2860) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **indy-validator:** fix package dependencies ([a28641a](https://github.com/hyperledger/cacti/commit/a28641ae47bd686af76d85ac22bcc84548211c59)), closes [#2596](https://github.com/hyperledger/cacti/issues/2596) -* **security:** the CVE-2022-2421 - upgrade socket.io-parser to >=4.2.1 ([9172172](https://github.com/hyperledger/cacti/commit/917217227a3fa53a00429f047cd6318862e6ab8d)), closes [#2229](https://github.com/hyperledger/cacti/issues/2229) [#2228](https://github.com/hyperledger/cacti/issues/2228) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade - -# [1.2.0](https://github.com/hyperledger/cacti/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -### Features - -* **fabric-socketio-connector:** sending transactions signed on the client-side ([0b34ca3](https://github.com/hyperledger/cactus/commit/0b34ca3d35a39826c05cc047e480d377c1c52bef)) - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-discounted-asset-trade - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Bug Fixes - -* **cactus-example-discounted-asset-trade:** enable ([12e972e](https://github.com/hyperledger/cactus/commit/12e972e9cac63fd03a0ba3c7c8a29dc9ca544b9d)), closes [#2145](https://github.com/hyperledger/cactus/issues/2145) - -### Code Refactoring - -* **examples:** include sample apps in monorepo build ([51ac163](https://github.com/hyperledger/cactus/commit/51ac1630f53ca3ac881341c7f8847b6ae581b220)) - -### Features - -* **secret:** remove Validator/Verifier secret keys from repository ([59b4af4](https://github.com/hyperledger/cactus/commit/59b4af44835e2babafe398040a280ed23e9b490e)) - -### BREAKING CHANGES - -* **examples:** 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 diff --git a/examples/cactus-example-discounted-asset-trade/Dockerfile b/examples/cactus-example-discounted-asset-trade/Dockerfile deleted file mode 100644 index 8fd7ec8525..0000000000 --- a/examples/cactus-example-discounted-asset-trade/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM cactus-common-example-server:latest - -ARG NPM_PKG_VERSION=latest -ENV APP_HOME=/root/cactus - -WORKDIR ${APP_HOME} - -COPY ./package.json ./dist/yarn.lock ./ -RUN yarn add "${CACTUS_CMD_SOCKETIO_PATH}" \ - --production --ignore-engines --non-interactive --cache-folder ./.yarnCache && \ - rm -rf ./.yarnCache - -COPY ./dist ./dist/ - -CMD ["node", "./dist/www.js"] diff --git a/examples/cactus-example-discounted-asset-trade/README.md b/examples/cactus-example-discounted-asset-trade/README.md deleted file mode 100644 index ae062f2877..0000000000 --- a/examples/cactus-example-discounted-asset-trade/README.md +++ /dev/null @@ -1,346 +0,0 @@ -# Cactus discounted-asset-trade - -## Abstract - -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-asset-trade image](./image/discounted-asset-trade-image.png) - -## Scenario - -The application works in the following scenario: - -### Settings - -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. - -### Preparations - -Alice knows that Acme Corp. provides digital certificates. She asks Acme Corp. to issue a credential when she uses various services, and the company issues it. - -### When Alice Uses the Service - -- Alice will use her client application to connect with discounted-asset-trade BLP application. This will create anoncreds connection between her and the BLP app. -- Alice will send a purchase order to the BLP application. -- BLP will request the proof of employment from Alice client application. -- 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-connector - -- Validator for fabric ledger. -- Started as part of discounted asset trade BLP. - -### ethereum-validator - -- Validator for ethereum ledger. -- Started as part of discounted asset trade BLP. - -### cmd-socketio-base-image - -- 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. - -### 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: `cactus-example-discounted-asset-trade-net` - -## Indy Schema - -![Indy node pool and validator](./image/indy-setup-schema.svg) - -## Preparations - -1. Configure Cactus: - - ``` - # execute in root cactus dir - pushd ../.. - npm run configure - popd - ``` - -1. Create settings directory and make sure you have write permission on it - - ```bash - sudo mkdir /etc/cactus - sudo chown -R __YOUR_USERNAME__ /etc/cactus/ - ``` - -1. Start the ledgers: - - ``` - ./script-start-ledgers.sh - ``` - - - This script will start all ledger docker containers, networks, and will setup configuration needed to operate the sample app. - - (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` - - `asset_trade_faio2x_testnet` - - `asset_trade_indy_all_in_one` - -1. Setup Indy credentials: - - - Before running the sample application we need to register employment credential and issue it to Alice (user of our app). - - Use `setup-credentials` script from `cactus-example-discounted-asset-trade-client`. - - ```bash - # In separate shell (can be used later for client app) - cd ./examples/cactus-example-discounted-asset-trade-client - yarn setup-credentials - popd - ``` - - - Copy the credential definition ID from the script output into this example application BLP configuration. - - ```bash - # setup-credentials script output - Running with log level INFO - Connecting Alice with Issuer... - Connecting aliceCactiAgent to issuerCactiAgent... - Agents connected! - Register and issue the employment credential... - Register Credential Schema... - Register employment certificate credential schema 'cactiJobCert'... - Employment credential schemaId: did:indy:cacti:test:Th7MpTaRZVRYnPiabds81Y/anoncreds/v0/SCHEMA/cactiJobCert/1.0.0 - Register Credential Definition... - Register job certificate credential definition (schemaId: 'did:indy:cacti:test:Th7MpTaRZVRYnPiabds81Y/anoncreds/v0/SCHEMA/cactiJobCert/1.0.0') ... - # COPY THIS >> - Employment credential credentialDefinitionId: did:indy:cacti:test:Th7MpTaRZVRYnPiabds81Y/anoncreds/v0/CLAIM_DEF/11/default - # << - Issue the credential... - Employment credential issued: 7f93ba15-98b2-4667-a7cf-ecec3059e9d4 - Accepting credential eb69032d-ec73-4fa1-bd83-1ff52a0dc4b5... - Credential accepted! - Credential was issed and accepted by a peer agent! - Verify employment status proof... - Proof request was sent - Accepting proof 4d03e479-073a-4f51-98e4-befd7ba34345... - Proof request accepted! - Requested proof status: done - Finishing - cleaning up the agents... - All done. - - # Replace __CREDENTIAL_DEFINITION_ID__ in config file with actual credentialDefinitionId - sed -i 's#__CREDENTIAL_DEFINITION_ID__#did:indy:cacti:test:Th7MpTaRZVRYnPiabds81Y/anoncreds/v0/CLAIM_DEF/11/default#g' "./etc/cactus/usersetting.yaml" - - # ... or do it manually in text editor - vim ./etc/cactus/usersetting.yaml - ``` - -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 - npm run start - ``` - - This will build and launch all needed containers, the final output should look like this: - - ``` - ... - 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) - ... - 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 - ... - cactus-example-discounted-asset-trade-blp | [2022-01-31T16:00:56.208] [INFO] www - listening on *: 5034 - ``` - -### Dockerless run - -For development purposes, it might be useful to run the sample application outside of docker-compose environment. - -1. Configure cactus and start the ledgers as described above. -1. Run `./script-dockerless-config-patch.sh` from `cactus-example-discounted-asset-trade/` directory. This will patch the configs and copy it to global location. -1. Start asset-trade: `npm run start-dockerless` - -## How to use this application - -- Use `run-discounted-asset-trade-client` script from `cactus-example-discounted-asset-trade-client` to interact with this application. - - ```bash - # In separat shell - cd ./examples/cactus-example-discounted-asset-trade-client - yarn run-discounted-asset-trade-client - - # Sample output - Running with log level INFO - Connected to the discounted asset trade sample app agent! ID: 19949a1e-0ef6-449b-9c37-256449258b51 - Action: (Use arrow keys) - ❯ Start the trade - Get this agent credentials - Get assets - Exit - ``` - -1. (Optional) Check credentials in Alice wallet by selecting `Get this agent credentials`. - - ```bash - Action: Get this agent credentials - [ - { - "id": "eb69032d-ec73-4fa1-bd83-1ff52a0dc4b5", - "schemaId": "did:indy:cacti:test:Th7MpTaRZVRYnPiabds81Y/anoncreds/v0/SCHEMA/cactiJobCert/1.0.0", - # Note: This credential matches one we'll be requesting in discounted asset trade example - "credentialDefinitionId": "did:indy:cacti:test:Th7MpTaRZVRYnPiabds81Y/anoncreds/v0/CLAIM_DEF/11/default", - "connectionId": "32134b50-a245-4de5-8408-f35fcb069373", - "credentials": [ - { - "credentialRecordType": "anoncreds", - "credentialRecordId": "dd6aba0c-8674-451d-a063-a630004be1dd" - } - ], - "credentialAttributes": [ - { - "mime-type": "text/plain", - "name": "first_name", - "value": "Alice" - }, - { - "mime-type": "text/plain", - "name": "last_name", - "value": "Garcia" - }, - { - "mime-type": "text/plain", - "name": "salary", - "value": "2400" - }, - { - "mime-type": "text/plain", - "name": "employee_status", - # Note: Alice is a permanent employee - "value": "Permanent" - }, - { - "mime-type": "text/plain", - "name": "experience", - "value": "10" - } - ] - } - ] - ``` - -1. (Optional) Check the balance on Ethereum and the asset ownership on Fabric by selecting `Get assets`. - - ```bash - Action: Get assets - - # Ethereum fromAccount: - 1.00005515e+26 - - # Ethereum escrowAccount: - 0 - - # Ethereum toAccount: - 0 - - # Fabric: - [ - { - ... - }, - { - ID: 'asset2', - color: 'red', - size: 5, - owner: 'Brad', - appraisedValue: 400 - }, - ... - ] - ``` - -1. Run the transaction execution by selecting `Start the trade` - - ```bash - Action: Start the trade - Trade request sent! Response: { tradeID: '20231103185232057-001' } - ``` - -1. (Optional) Check the final balance on Ethereum and the asset ownership on Fabric by selecting `Get assets`. - - ```bash - Action: Get assets - - # Ethereum fromAccount: - 1.000057e+26 - - # Ethereum escrowAccount: - 0 - - # Ethereum toAccount: - 25 - - # Fabric: - [ - { - ... - }, - { - ID: 'asset2', - color: 'red', - size: 5, - owner: 'Cathy', - appraisedValue: 400 - }, - ... - ] - ``` - -## How to stop the application and Docker containers - -1. Press `Ctrl+C` in `docker-compose` console to stop the application. -1. Run cleanup script - - ``` - - sudo ./script-cleanup.sh # for root owned files - ./script-cleanup.sh # for user owner files - - ``` - -#### Manual cleanup instructions - -1. Remove the config files on your machine - - ``` - - sudo rm -r ./etc/cactus/ - - ``` - -1. Stop the docker containers of Ethereum, Fabric and Indy - - - `docker stop geth1 asset_trade_faio2x_testnet asset_trade_indy_all_in_one` - - `docker rm geth1 asset_trade_faio2x_testnet asset_trade_indy_all_in_one` - -1. Clear indy-all-in-one - - ``` - - pushd ../../tools/docker/indy-all-in-one/ - ./script-cleanup.sh - popd - - ``` - -1. Remove geth files - - ``` - - pushd ../../tools/docker/geth-testnet/ - rm -fr ./data-geth1/geth/ - popd - ``` diff --git a/examples/cactus-example-discounted-asset-trade/aries-connector.ts b/examples/cactus-example-discounted-asset-trade/aries-connector.ts deleted file mode 100644 index 462c1a9618..0000000000 --- a/examples/cactus-example-discounted-asset-trade/aries-connector.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { IListenOptions, Servers } from "@hyperledger/cactus-common"; -import { Constants, Configuration } from "@hyperledger/cactus-core-api"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { - PluginLedgerConnectorAries, - AriesApiClient, -} from "@hyperledger/cactus-plugin-ledger-connector-aries"; - -import * as path from "node:path"; -import * as os from "node:os"; -import http from "http"; -import express from "express"; -import bodyParser from "body-parser"; -import { readFileSync } from "fs"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { getLogger } from "log4js"; -import { Server as SocketIoServer } from "socket.io"; - -const config: any = ConfigUtil.getConfig(); -const moduleName = "aries-connector"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -// Constants -const BLP_AGENT_NAME = "cactiDiscountedAssetTradeAgent"; -const BLP_AGENT_INBOUND_URL = "http://127.0.0.1:5035"; -const DID_INDY_NAMESPACE = "cacti:test"; - -const ARIES_WALLET_PATH = path.join( - os.homedir(), - ".cacti/cactus-example-discounted-asset-trade/wallet", -); - -// Read Genesis transactions -const genesisTransactionsPath = - "/etc/cactus/indy-all-in-one/pool_transactions_genesis"; -logger.info( - "Reading Indy genesis transactions from file:", - genesisTransactionsPath, -); -const genesisTransactions = readFileSync(genesisTransactionsPath).toString( - "utf-8", -); - -/** - * Configuration for local indy-all-in-one ledger. - */ -export const localTestNetwork = { - isProduction: false, - genesisTransactions, - indyNamespace: DID_INDY_NAMESPACE, - connectOnStartup: true, -}; - -// Single Aries connector instance -let ariesConnectorPlugin: PluginLedgerConnectorAries | undefined = undefined; -let ariesApiClient: AriesApiClient | undefined = undefined; - -async function createAriesConnector() { - if (ariesConnectorPlugin) { - ariesConnectorPlugin.shutdown(); - ariesConnectorPlugin = undefined; - } - - ariesConnectorPlugin = new PluginLedgerConnectorAries({ - instanceId: `ariesAssetTrade-${uuidv4()}`, - logLevel: config.logLevel, - walletPath: ARIES_WALLET_PATH, - ariesAgents: [ - { - name: BLP_AGENT_NAME, - walletKey: BLP_AGENT_NAME, - indyNetworks: [localTestNetwork], - inboundUrl: BLP_AGENT_INBOUND_URL, - autoAcceptConnections: true, - }, - ], - }); - - await ariesConnectorPlugin.onPluginInit(); - - // Run http server - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const connectorServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: connectorServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const apiHost = `http://${addressInfo.address}:${addressInfo.port}`; - - // Run socketio server - const socketioServer = new SocketIoServer(connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - // Register services - await ariesConnectorPlugin.getOrCreateWebServices(); - await ariesConnectorPlugin.registerWebServices(expressApp, socketioServer); - - // Create ApiClient - const apiConfig = new Configuration({ basePath: apiHost }); - ariesApiClient = new AriesApiClient(apiConfig); -} - -/** - * Create aries connector - */ -export async function initAriesConnector(): Promise { - if (!ariesConnectorPlugin) { - await createAriesConnector(); - logger.info("initAriesConnector() done."); - } else { - logger.info("initAriesConnector() Aries connector already initialized"); - } -} - -/** - * Get instance of aries connector, initialize it if not done yet. - */ -export async function getAriesConnector(): Promise { - if (!ariesConnectorPlugin) { - await initAriesConnector(); - } - - if (ariesConnectorPlugin) { - return ariesConnectorPlugin; - } else { - throw new Error("Could not initialize new aries connector!"); - } -} - -/** - * Get instance of aries api client. - */ -export function getAriesApiClient(): AriesApiClient { - if (ariesApiClient) { - return ariesApiClient; - } else { - throw new Error("Aries connector not initialized yet!"); - } -} - -/** - * Get BLP agent name registered in connector - */ -export function getBlpAgentName(): string { - return BLP_AGENT_NAME; -} diff --git a/examples/cactus-example-discounted-asset-trade/balance.ts b/examples/cactus-example-discounted-asset-trade/balance.ts deleted file mode 100644 index 267700ce61..0000000000 --- a/examples/cactus-example-discounted-asset-trade/balance.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * balance.ts - */ - -import { Router, NextFunction, Request, Response } from "express"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { RIFError } from "@hyperledger/cactus-common-example-server"; - -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -import { getAccountBalance } from "./transaction-ethereum"; -const moduleName = "balance"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const router: Router = Router(); - -/* GET balance. */ -router.get("/:account", (req: Request, res: Response, next: NextFunction) => { - try { - getAccountBalance(req.params.account) - .then((result) => { - logger.debug(`#####[sample/balance.ts]`); - logger.debug("result(getBalance) = " + result); - res.status(200).json(result); - }) - .catch((err) => { - logger.error(err); - }); - } catch (err) { - if (err instanceof Error) { - 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 balance: ${err}`); - next(err); - } -}); - -export default router; diff --git a/examples/cactus-example-discounted-asset-trade/business-logic-asset-trade.ts b/examples/cactus-example-discounted-asset-trade/business-logic-asset-trade.ts deleted file mode 100644 index 5ec602ce6a..0000000000 --- a/examples/cactus-example-discounted-asset-trade/business-logic-asset-trade.ts +++ /dev/null @@ -1,520 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * business-logic-asset-trade.ts - */ - -import { Request } from "express"; -import { RequestInfo } from "@hyperledger/cactus-common-example-server"; -import { TradeInfo } from "@hyperledger/cactus-common-example-server"; -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 { BusinessLogicBase } from "@hyperledger/cactus-common-example-server"; -import { transferOwnership } from "./transaction-fabric"; -import { isEmploymentCredentialProofValid } from "./transaction-indy"; -import { - LedgerEvent, - ConfigUtil, -} from "@hyperledger/cactus-common-example-server"; -import { json2str } from "@hyperledger/cactus-common-example-server"; -import { AssetTradeStatus } from "./define"; -import { - CactiBlockTransactionEventV1, - WatchBlocksListenerTypeV1 as FabricWatchBlocksListenerTypeV1, - WatchBlocksResponseV1 as FabricWatchBlocksResponseV1, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { Web3TransactionReceipt } from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -const config: any = ConfigUtil.getConfig(); - -import { getLogger } from "log4js"; -import { - createSigningToken, - getFabricApiClient, - getSignerIdentity, -} from "./fabric-connector"; -import { sendEthereumTransaction } from "./transaction-ethereum"; -import { hasKey } from "@hyperledger/cactus-common"; -import { RuntimeError } from "run-time-error-cjs"; - -const moduleName = "BusinessLogicAssetTrade"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -interface TransactionStatusData { - stateInfo: number | undefined; - transactionStatus: { - state: string; - ledger: string; - txID: string; - txInfo: string; // JSON string - }[]; -} - -export class BusinessLogicAssetTrade extends BusinessLogicBase { - transactionInfoManagement: TransactionInfoManagement; - - constructor() { - super(); - this.transactionInfoManagement = new TransactionInfoManagement(); - } - - startTransaction( - req: Request, - businessLogicID: string, - tradeID: string, - ): void { - logger.debug("called startTransaction"); - - // set RequestInfo - let requestInfo: RequestInfo = new RequestInfo(); - requestInfo.businessLogicID = businessLogicID; - requestInfo.tradeInfo.ethereumAccountFrom = req.body.tradeParams[0]; - requestInfo.tradeInfo.ethereumAccountTo = req.body.tradeParams[1]; - requestInfo.tradeInfo.fabricAccountFrom = req.body.tradeParams[2]; - requestInfo.tradeInfo.fabricAccountTo = req.body.tradeParams[3]; - requestInfo.tradeInfo.assetID = req.body.tradeParams[4]; - requestInfo.tradeInfo.indyAgentConId = req.body.tradeParams[5]; - - // set TradeID - requestInfo.setTradeID(tradeID); - - // Register transaction information in transaction information management - const transactionInfo: TransactionInfo = new TransactionInfo(); - transactionInfo.setRequestInfo(0, requestInfo); - // pricing of trade by user's status which is employee or not employee - this.Pricing(requestInfo) - .then((result) => { - requestInfo = result; - // Create trade information - const tradeInfo: TradeInfo = new TradeInfo( - requestInfo.businessLogicID, - requestInfo.tradeID, - ); - // Save transaction value - transactionInfo.setRequestInfo(1, requestInfo); - this.transactionInfoManagement.addTransactionInfo(transactionInfo); - // trade status update - this.transactionInfoManagement.setStatus( - tradeInfo, - AssetTradeStatus.UnderEscrow, - ); - this.firstTransaction(requestInfo, tradeInfo); - }) - .catch((err) => { - logger.error(err); - }); - } - - dummyTransaction(requestInfo: RequestInfo, tradeInfo: TradeInfo): void { - logger.debug("called dummyTransaction"); - - let transactionData: TransactionData = new TransactionData( - "escrow", - "ledger001", - "tid001", - ); - this.transactionInfoManagement.setTransactionData( - tradeInfo, - transactionData, - ); - - this.transactionInfoManagement.setStatus( - tradeInfo, - AssetTradeStatus.UnderTransfer, - ); - - transactionData = new TransactionData("transfer", "ledger002", "tid002"); - this.transactionInfoManagement.setTransactionData( - tradeInfo, - transactionData, - ); - - this.transactionInfoManagement.setStatus( - tradeInfo, - AssetTradeStatus.UnderSettlement, - ); - - transactionData = new TransactionData("settlement", "ledger003", "tid003"); - this.transactionInfoManagement.setTransactionData( - tradeInfo, - transactionData, - ); - - this.transactionInfoManagement.setStatus( - tradeInfo, - AssetTradeStatus.Completed, - ); - } - - async Pricing(requestInfo: RequestInfo): Promise { - logger.debug("called Pricing"); - - // price list - const priceList = { default: "50", employee: "25" }; - - const credentialDefinitionId = - config?.assetTradeInfo?.indy?.credentialDefinitionId; - if (!credentialDefinitionId) { - throw new Error( - "Missing employment credentialDefinitionId! Can't proof employment status!", - ); - } - const isPreferredCustomer = await isEmploymentCredentialProofValid( - requestInfo.tradeInfo.indyAgentConId, - credentialDefinitionId, - ); - - // decide the price from result of isPreferredCustomer - if (isPreferredCustomer) { - logger.debug("##isPreferredCustomer result : true"); - requestInfo.tradeInfo.tradingValue = priceList.employee; - } else { - logger.debug("##isPreferredCustomer result : false"); - requestInfo.tradeInfo.tradingValue = priceList.default; - } - - return requestInfo; - } - - /** - * Eth Escrow - */ - firstTransaction(requestInfo: RequestInfo, tradeInfo: TradeInfo): void { - logger.debug( - `##firstTransaction(): businessLogicID: ${tradeInfo.businessLogicID}`, - ); - - // Send funds to escrow - logger.debug( - `####fromAddress: ${requestInfo.tradeInfo.ethereumAccountFrom}`, - ); - const fromAddressPkey = - config.assetTradeInfo.ethereum[ - "fromAddressPkey_" + requestInfo.tradeInfo.ethereumAccountFrom - ]; - logger.debug(`####fromAddressPkey: ${fromAddressPkey}`); - const escrowAddress = config.assetTradeInfo.ethereum.escrowAddress; - - sendEthereumTransaction( - { - to: escrowAddress, - value: Number(requestInfo.tradeInfo.tradingValue), - gasLimit: config.assetTradeInfo.ethereum.gas, - }, - requestInfo.tradeInfo.ethereumAccountFrom, - fromAddressPkey, - ) - .then((result) => { - logger.debug("sendEthereumTransaction escrow tx:", result); - const txId = result.transactionReceipt.transactionHash; - logger.info("firstTransaction txId : ", txId); - - // Register transaction data in DB - const transactionData: TransactionData = new TransactionData( - "escrow", - "ledger001", - txId, - ); - this.transactionInfoManagement.setTransactionData( - tradeInfo, - transactionData, - ); - - this.executeNextTransaction(result.transactionReceipt, txId); - }) - .catch((err) => { - logger.error("sendEthereumTransaction Escrow ERROR:", err); - }); - } - - async secondTransaction( - assetID: string, - fabricAccountTo: string, - tradeInfo: TradeInfo, - ): Promise { - logger.debug("called secondTransaction"); - - // Start monitoring - const fabricApiClient = getFabricApiClient(); - const watchObservable = fabricApiClient.watchBlocksDelegatedSignV1({ - channelName: config.assetTradeInfo.fabric.channelName, - type: FabricWatchBlocksListenerTypeV1.CactiTransactions, - signerCertificate: getSignerIdentity().credentials.certificate, - signerMspID: getSignerIdentity().mspId, - uniqueTransactionData: createSigningToken("watchBlock"), - }); - const watchSub = watchObservable.subscribe({ - next: (event: FabricWatchBlocksResponseV1) => { - if (!("cactiTransactionsEvents" in event)) { - logger.error("Wrong input block format!", event); - return; - } - - for (const ev of event.cactiTransactionsEvents) { - logger.debug(`##in onEventFabric()`); - - try { - const txId = ev.transactionId; - logger.debug(`##txId = ${txId}`); - if (this.hasTxIDInTransactions(txId)) { - watchSub.unsubscribe(); - this.executeNextTransaction(ev, txId); - break; - } - } catch (err) { - logger.error( - `##onEventFabric(): onEvent, err: ${err}, event: ${JSON.stringify( - ev, - )}`, - ev, - ); - } - } - }, - error(err: unknown) { - logger.error("Fabric watchBlocksV1() error:", err); - }, - }); - - const result = await transferOwnership(assetID, fabricAccountTo); - if ( - !hasKey(result, "transactionId") || - typeof result.transactionId !== "string" - ) { - throw new RuntimeError( - "secondTransaction() Invalid transactionId returned from transferOwnership: %s", - result.transactionId, - ); - } - logger.info("secondTransaction txId : " + result.transactionId); - - // Register transaction data in DB - const transactionData: TransactionData = new TransactionData( - "transfer", - "ledger002", - result.transactionId, - ); - this.transactionInfoManagement.setTransactionData( - tradeInfo, - transactionData, - ); - } - - thirdTransaction( - ethereumAccountTo: string, - tradingValue: string, - tradeInfo: TradeInfo, - ): void { - logger.debug( - `##thirdTransaction(): businessLogicID: ${tradeInfo.businessLogicID}`, - ); - const escrowAddress = config.assetTradeInfo.ethereum.escrowAddress; - const escrowAddressPkey = config.assetTradeInfo.ethereum.escrowAddressPkey; - - sendEthereumTransaction( - { - to: ethereumAccountTo, - value: Number(tradingValue), - gasLimit: config.assetTradeInfo.ethereum.gas, - }, - escrowAddress, - escrowAddressPkey, - ) - .then((result) => { - logger.debug("sendEthereumTransaction() final results:", result); - const txId = result.transactionReceipt.transactionHash; - logger.info("thirdTransaction txId : ", txId); - - // Register transaction data in DB - const transactionData: TransactionData = new TransactionData( - "settlement", - "ledger003", - txId, - ); - this.transactionInfoManagement.setTransactionData( - tradeInfo, - transactionData, - ); - this.executeNextTransaction(result.transactionReceipt, txId); - }) - .catch((err) => { - logger.error("sendEthereumTransaction Final ERROR:", err); - }); - } - - completedTransaction(tradeInfo: TradeInfo): void { - logger.debug("called completedTransaction"); - - logger.debug( - `##completedTransaction(): businessLogicID: ${tradeInfo.businessLogicID}`, - ); - } - - finish(): void { - logger.debug("called finish"); - } - - onEvent(): void { - logger.warn(`onEvent() should not be called`); - } - - executeNextTransaction( - txInfo: CactiBlockTransactionEventV1 | Web3TransactionReceipt, - txId: string, - ): void { - let transactionInfo: TransactionInfo | null = null; - try { - // Retrieve DB transaction information - transactionInfo = - this.transactionInfoManagement.getTransactionInfoByTxId(txId); - if (transactionInfo != null) { - logger.debug( - `##onEvent(A), transactionInfo: ${json2str(transactionInfo)}`, - ); - } else { - logger.warn(`##onEvent(B), not found transactionInfo, txId: ${txId}`); - return; - } - const txStatus = transactionInfo.status; - const tradeInfo = - this.createTradeInfoFromTransactionInfo(transactionInfo); - let txInfoData: TxInfoData; - - switch (txStatus) { - case AssetTradeStatus.UnderEscrow: - // store transaction information in DB - txInfoData = new TxInfoData("escrow", JSON.stringify(txInfo)); - this.transactionInfoManagement.setTxInfo(tradeInfo, txInfoData); - - // underEscrow -> underTransfer - logger.info( - `##INFO: underEscrow -> underTransfer, businessLogicID: ${transactionInfo.businessLogicID}, tradeID: ${transactionInfo.tradeID}`, - ); - this.transactionInfoManagement.setStatus( - tradeInfo, - AssetTradeStatus.UnderTransfer, - ); - this.secondTransaction( - transactionInfo.assetID, - transactionInfo.fabricAccountTo, - tradeInfo, - ); - break; - case AssetTradeStatus.UnderTransfer: - // store transaction information in DB - txInfoData = new TxInfoData("transfer", JSON.stringify(txInfo)); - this.transactionInfoManagement.setTxInfo(tradeInfo, txInfoData); - - // underTransfer -> underSettlement - logger.info( - `##INFO: underTransfer -> underSettlement, businessLogicID: ${transactionInfo.businessLogicID}, tradeID: ${transactionInfo.tradeID}`, - ); - this.transactionInfoManagement.setStatus( - tradeInfo, - AssetTradeStatus.UnderSettlement, - ); - this.thirdTransaction( - transactionInfo.ethereumAccountTo, - transactionInfo.tradingValue, - tradeInfo, - ); - break; - case AssetTradeStatus.UnderSettlement: - // store transaction information in DB - txInfoData = new TxInfoData("settlement", JSON.stringify(txInfo)); - this.transactionInfoManagement.setTxInfo(tradeInfo, txInfoData); - - // underSettlement -> completed - this.transactionInfoManagement.setStatus( - tradeInfo, - AssetTradeStatus.Completed, - ); - logger.info( - `##INFO: completed asset-trade, businessLogicID: ${transactionInfo.businessLogicID}, tradeID: ${transactionInfo.tradeID}`, - ); - this.completedTransaction(tradeInfo); - break; - case AssetTradeStatus.Completed: - logger.warn( - `##WARN: already completed, txinfo: ${json2str(transactionInfo)}`, - ); - return; - default: - logger.error(`##ERR: bad txStatus: ${txStatus}`); - return; - } - } catch (err) { - logger.error( - `##ERR: executeNextTransaction(), err: ${err}, tx: ${JSON.stringify( - transactionInfo, - )}`, - ); - } - } - - createTradeInfoFromTransactionInfo(txInfo: TransactionInfo): TradeInfo { - try { - return new TradeInfo(txInfo.businessLogicID, txInfo.tradeID); - } catch (err) { - logger.error(`##ERR: createTradeInfoFromTransactionInfo(), ${err}`); - throw err; - } - } - - getOperationStatus(tradeID: string): TransactionStatusData { - logger.debug(`##in getOperationStatus()`); - const businessLogicInquireAssetTradeStatus: BusinessLogicInquireAssetTradeStatus = - new BusinessLogicInquireAssetTradeStatus(); - const transactionStatusData = - businessLogicInquireAssetTradeStatus.getAssetTradeOperationStatus( - tradeID, - ); - - return transactionStatusData; - } - - hasTxIDInTransactions(txID: string): boolean { - logger.debug(`##in hasTxIDInTransactions(), txID: ${txID}`); - const transactionInfo = - this.transactionInfoManagement.getTransactionInfoByTxId(txID); - logger.debug(`##hasTxIDInTransactions(), ret: ${transactionInfo !== null}`); - return transactionInfo !== null; - } - - getEventDataNum(ledgerEvent: LedgerEvent): number { - logger.debug( - `##in BLP:getEventDataNum(), ledgerEvent.verifierId: ${ledgerEvent.verifierId}`, - ); - const event = ledgerEvent.data; - let retEventNum = 0; - - try { - switch (ledgerEvent.verifierId) { - case config.assetTradeInfo.ethereum.validatorID: - retEventNum = event["blockData"]["transactions"].length; - break; - case config.assetTradeInfo.fabric.validatorID: - retEventNum = event["blockData"].length; - break; - default: - logger.error( - `##getEventDataNum(): invalid verifierId: ${ledgerEvent.verifierId}`, - ); - break; - } - logger.debug( - `##getEventDataNum(): retEventNum: ${retEventNum}, verifierId: ${ledgerEvent.verifierId}`, - ); - return retEventNum; - } catch (err) { - logger.error( - `##getEventDataNum(): invalid even, err: ${err}, event: ${event}`, - ); - return 0; - } - } -} diff --git a/examples/cactus-example-discounted-asset-trade/business-logic-inquire-asset-trade-status.ts b/examples/cactus-example-discounted-asset-trade/business-logic-inquire-asset-trade-status.ts deleted file mode 100644 index b30e9f437e..0000000000 --- a/examples/cactus-example-discounted-asset-trade/business-logic-inquire-asset-trade-status.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * business-logic-inquire-asset-trade-status.ts - */ - -import { TransactionInfo } from "./transaction-info"; -import { TransactionStatus } from "./transaction-status"; -import { ResultTransactionStatusData } from "./result-transactions-status-data"; -import { BusinessLogicBase } from "@hyperledger/cactus-common-example-server"; -import fs = require("fs"); - -export class BusinessLogicInquireAssetTradeStatus extends BusinessLogicBase { - fileName = "transaction-Info.json"; - - constructor() { - super(); - } - - getAssetTradeOperationStatus(tradeID: string): { - stateInfo: number | undefined; - transactionStatus: TransactionStatus[]; - } { - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - throw err; - } - - // Read table file - const fileData: string = fs.readFileSync(this.fileName, "utf8"); - const transactionInfoTable: string[] = JSON.parse(fileData) - .table as string[]; - - // Create Response Information - const resultTransactionStatusData: ResultTransactionStatusData = - new ResultTransactionStatusData(); - for (const transactionInfoJson of transactionInfoTable) { - const transactionInfo: TransactionInfo = JSON.parse( - transactionInfoJson, - ) as TransactionInfo; - - // Determine if target record - if (transactionInfo.tradeID === tradeID) { - // Set information - resultTransactionStatusData.stateInfo = transactionInfo.status; - - const escrowTransactionStatus: TransactionStatus = - new TransactionStatus(); - escrowTransactionStatus.state = "escrow"; - escrowTransactionStatus.ledger = transactionInfo.escrowLedger; - escrowTransactionStatus.txID = transactionInfo.escrowTxID; - escrowTransactionStatus.txInfo = JSON.parse( - transactionInfo.escrowTxInfo, - ); - resultTransactionStatusData.transactionStatus.push( - escrowTransactionStatus, - ); - - const transferTransactionStatus = new TransactionStatus(); - transferTransactionStatus.state = "transfer"; - transferTransactionStatus.ledger = transactionInfo.transferLedger; - transferTransactionStatus.txID = transactionInfo.transferTxID; - transferTransactionStatus.txInfo = JSON.parse( - transactionInfo.transferTxInfo, - ); - resultTransactionStatusData.transactionStatus.push( - transferTransactionStatus, - ); - - const settlementTransactionStatus = new TransactionStatus(); - settlementTransactionStatus.state = "settlement"; - settlementTransactionStatus.ledger = transactionInfo.settlementLedger; - settlementTransactionStatus.txID = transactionInfo.settlementTxID; - settlementTransactionStatus.txInfo = JSON.parse( - transactionInfo.settlementTxInfo, - ); - resultTransactionStatusData.transactionStatus.push( - settlementTransactionStatus, - ); - - break; - } - } - - // Reply acquired information - return resultTransactionStatusData; - } -} diff --git a/examples/cactus-example-discounted-asset-trade/config/contractInfo.yaml b/examples/cactus-example-discounted-asset-trade/config/contractInfo.yaml deleted file mode 100644 index fead8e0714..0000000000 --- a/examples/cactus-example-discounted-asset-trade/config/contractInfo.yaml +++ /dev/null @@ -1 +0,0 @@ -contractInfo: [] diff --git a/examples/cactus-example-discounted-asset-trade/config/default.yaml b/examples/cactus-example-discounted-asset-trade/config/default.yaml deleted file mode 120000 index f9fc00051f..0000000000 --- a/examples/cactus-example-discounted-asset-trade/config/default.yaml +++ /dev/null @@ -1 +0,0 @@ -../../cactus-common-example-server/config/default.yaml \ No newline at end of file diff --git a/examples/cactus-example-discounted-asset-trade/config/usersetting.yaml b/examples/cactus-example-discounted-asset-trade/config/usersetting.yaml deleted file mode 100644 index 72f8740528..0000000000 --- a/examples/cactus-example-discounted-asset-trade/config/usersetting.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# Overwrite defaults -blpRegistry: - - businessLogicID: guks32pf - validatorID: [] - -logLevel: debug - -signTxInfo: - ethereum: - chainName: geth1 - networkID: 10 - chainID: 10 - defaultHardfork: petersburg - -appRouters: - - path: /api/v1/bl/trades/ - routerJs: /root/cactus/dist/trades.js - - path: /api/v1/bl/balance/ - routerJs: /root/cactus/dist/balance.js - - path: /api/v1/bl/fabric-asset/ - routerJs: /root/cactus/dist/fabric-asset.js - - path: /api/v1/bl/indy/ - routerJs: /root/cactus/dist/indy-endpoints.js - -# BLP Config -assetTradeInfo: - fabric: - mspID: Org1MSP - keystore: "/etc/cactus/connector-fabric/wallet" - hostname: localhost - connUserName: appUser - contractName: basic - tokenSecret: secret123 - peers: - - name: peer0.org1.example.com - requests: grpc://localhost:7051 - orderer: - name: orderer.example.com - URL: grpc://localhost:7050 - - ca: - name: ca.example.com - URL: http://localhost:7054 - - submitter: - name: admin - - channelName: mychannel - chaincodeID: basic - - indy: - credentialDefinitionId: "__CREDENTIAL_DEFINITION_ID__" - - ethereum: - validatorID: 84jUisrs - gethURL: ws://localhost:8546 - chainName: geth1 - networkID: 10 - chainID: 10 - network: mainnet - hardfork: petersburg - gas: 21000 - fromAddressPkey_0xec709e1774f0ce4aba47b52a499f9abaaa159f71: "40d7e5931a6e0807d3ebd70518f635dbf575975d3bb564ff34c99be416067c89" - fromAddressPkey_0x36e146d5afab61ab125ee671708eeb380aea05b6: "13a45756bc314465c4ae2ff0eb9ab58cf72453c04604d8fa14393eb25ce96d06" - fromAddressPkey_0x06fc56347d91c6ad2dae0c3ba38eb12ab0d72e97: "cb5d48d371916a4ea1627189d8af4f642a5d72746a06b559780c3f5932658207" - escrowAddress: "0x36e146d5afab61ab125ee671708eeb380aea05b6" - escrowAddressPkey: "13a45756bc314465c4ae2ff0eb9ab58cf72453c04604d8fa14393eb25ce96d06" diff --git a/examples/cactus-example-discounted-asset-trade/config/validator-registry-config.yaml b/examples/cactus-example-discounted-asset-trade/config/validator-registry-config.yaml deleted file mode 100644 index eaac33e158..0000000000 --- a/examples/cactus-example-discounted-asset-trade/config/validator-registry-config.yaml +++ /dev/null @@ -1,16 +0,0 @@ -signTxInfo: - fabric: - mspID: Org1MSP - peers: - - name: peer0.org1.example.com - requests: grpc://localhost:7051 - orderer: - URL: grpc://localhost:7050 - ca: - name: ca.example.com - URL: http://localhost:7054 - submitter: - name: admin - secret: adminpw - channelName: mychannel - chaincodeID: basic diff --git a/examples/cactus-example-discounted-asset-trade/define.ts b/examples/cactus-example-discounted-asset-trade/define.ts deleted file mode 100644 index 1abc75c08b..0000000000 --- a/examples/cactus-example-discounted-asset-trade/define.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * define.ts - */ - -export enum AssetTradeStatus { - UnderEscrow = 0, - UnderTransfer = 1, - UnderSettlement = 2, - Completed = 3, -} diff --git a/examples/cactus-example-discounted-asset-trade/docker-compose.debug.yml b/examples/cactus-example-discounted-asset-trade/docker-compose.debug.yml deleted file mode 100644 index b4a0923792..0000000000 --- a/examples/cactus-example-discounted-asset-trade/docker-compose.debug.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: "3.4" - -# Use: docker-compose -f docker-compose.yml -f docker-compose.debug.yml up - -services: - 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/cactus-example-discounted-asset-trade/docker-compose.yml b/examples/cactus-example-discounted-asset-trade/docker-compose.yml deleted file mode 100644 index d833945346..0000000000 --- a/examples/cactus-example-discounted-asset-trade/docker-compose.yml +++ /dev/null @@ -1,35 +0,0 @@ -version: "3.4" - -# Start the ledgers first -# ./etc/cactus should already exist and contain cactus node configs - -services: - common-server-base-image: - # Build base image and immediately exit - container_name: cmd-socketio-base-dummy - image: cactus-common-example-server - build: - context: ../../packages/cactus-common-example-server/ - command: ["echo", "OK - Exit"] - - 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: - - cactus-example-discounted-asset-trade-net - depends_on: - - cmd-socketio-base-image - volumes: - - type: bind - source: ./etc/cactus - target: /etc/cactus - -networks: - fabric-all-in-one_testnet-2x: - external: true - cactus-example-discounted-asset-trade-net: - driver: bridge diff --git a/examples/cactus-example-discounted-asset-trade/ethereum-connector.ts b/examples/cactus-example-discounted-asset-trade/ethereum-connector.ts deleted file mode 100644 index 003868bd76..0000000000 --- a/examples/cactus-example-discounted-asset-trade/ethereum-connector.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { IListenOptions, Servers } from "@hyperledger/cactus-common"; -import { Constants, Configuration } from "@hyperledger/cactus-core-api"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { - PluginLedgerConnectorEthereum, - EthereumApiClient, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import http from "http"; -import express from "express"; -import bodyParser from "body-parser"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { getLogger } from "log4js"; -import { Server as SocketIoServer } from "socket.io"; - -const config: any = ConfigUtil.getConfig(); -const moduleName = "ethereum-connector"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const keychainId = uuidv4(); - -// Single Ethereum connector instance -let ethereumConnectorPlugin: PluginLedgerConnectorEthereum | undefined = - undefined; -let ethereumApiClient: EthereumApiClient | undefined = undefined; - -async function createEthereumConnector() { - if (ethereumConnectorPlugin) { - ethereumConnectorPlugin.shutdown(); - ethereumConnectorPlugin = undefined; - } - - // Create empty Keychain Plugin - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - logLevel: config.logLevel, - backend: new Map(), - }); - - ethereumConnectorPlugin = new PluginLedgerConnectorEthereum({ - instanceId: `ethAssetTrade-${uuidv4()}`, - rpcApiWsHost: config.assetTradeInfo.ethereum.gethURL, - logLevel: config.logLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await ethereumConnectorPlugin.onPluginInit(); - - // Run http server - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const connectorServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: connectorServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const apiHost = `http://${addressInfo.address}:${addressInfo.port}`; - - // Run socketio server - const socketioServer = new SocketIoServer(connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - // Register services - await ethereumConnectorPlugin.getOrCreateWebServices(); - await ethereumConnectorPlugin.registerWebServices(expressApp, socketioServer); - - // Create ApiClient - const apiConfig = new Configuration({ basePath: apiHost }); - ethereumApiClient = new EthereumApiClient(apiConfig); -} - -/** - * Get latest block data. Can be used to test ethereum connection. - */ -async function getLatestBlock(): Promise { - if (!ethereumConnectorPlugin) { - throw new Error("getLatestBlock() called before initEthereumConnector()!"); - } - - return ethereumConnectorPlugin.invokeRawWeb3EthMethod({ - methodName: "getBlock", - params: ["latest"], - }); -} - -/** - * Create ethereum connector and check if connection can be established - */ -export async function initEthereumConnector(): Promise { - if (!ethereumConnectorPlugin) { - await createEthereumConnector(); - - const latestBlockResponse = await getLatestBlock(); - if (!latestBlockResponse.hash) { - throw new Error( - `Invalid getLatestBlock response: ${latestBlockResponse}`, - ); - } - - logger.info("initEthereumConnector() done."); - } else { - logger.info( - "initEthereumConnector() Ethereum connector already initialized", - ); - } -} - -/** - * Get instance of ethereum connector, initialize it if not done yet. - */ -export async function getEthereumConnector(): Promise { - if (!ethereumConnectorPlugin) { - await initEthereumConnector(); - } - - if (ethereumConnectorPlugin) { - return ethereumConnectorPlugin; - } else { - throw new Error("Could not initialize new ethereum connector!"); - } -} - -/** - * Get instance of ethereum api client. - */ -export function getEthereumApiClient(): EthereumApiClient { - if (ethereumApiClient) { - return ethereumApiClient; - } else { - throw new Error("Ethereum connector not initialized yet!"); - } -} diff --git a/examples/cactus-example-discounted-asset-trade/fabric-asset.ts b/examples/cactus-example-discounted-asset-trade/fabric-asset.ts deleted file mode 100644 index fa82c4ba4e..0000000000 --- a/examples/cactus-example-discounted-asset-trade/fabric-asset.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * fabric-asset.ts - */ - -import { Router, NextFunction, Request, Response } from "express"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { RIFError } from "@hyperledger/cactus-common-example-server"; -import { queryAsset, queryAllAssets } from "./transaction-fabric"; - -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "fabric-asset"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const router: Router = Router(); - -/* GET query asset. */ -router.get("/:assetID", (req: Request, res: Response, next: NextFunction) => { - try { - logger.debug(`start queryAsset`); - - queryAsset(req.params.assetID) - .then((result: unknown) => { - logger.debug("result(queryAsset) = " + JSON.stringify(result)); - res.status(200).json(result); - }) - .catch((err: unknown) => { - logger.error(err); - }); - } catch (err) { - if (err instanceof Error) { - logger.error(`##(queryAsset)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 queryAsset: ${err}`); - next(err); - } -}); - -/* GET query all assets. */ -router.get("/", (req: Request, res: Response, next: NextFunction) => { - try { - logger.debug(`start queryAllAssets`); - - queryAllAssets() - .then((result: unknown) => { - logger.debug("result(queryAllAssets) = " + JSON.stringify(result)); - res.status(200).json(result); - }) - .catch((err: unknown) => { - logger.error(err); - }); - } catch (err) { - if (err instanceof Error) { - logger.error(`##(queryAllAssets)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 queryAllAssets: ${err}`); - next(err); - } -}); - -export default router; diff --git a/examples/cactus-example-discounted-asset-trade/fabric-connector.ts b/examples/cactus-example-discounted-asset-trade/fabric-connector.ts deleted file mode 100644 index d6f961d002..0000000000 --- a/examples/cactus-example-discounted-asset-trade/fabric-connector.ts +++ /dev/null @@ -1,322 +0,0 @@ -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { IListenOptions, Servers } from "@hyperledger/cactus-common"; -import { Constants, Configuration } from "@hyperledger/cactus-core-api"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { - PluginLedgerConnectorFabric, - FabricApiClient, - signProposal, - FabricContractInvocationType, - RunTransactionResponse, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import fs from "fs"; -import http from "http"; -import express from "express"; -import bodyParser from "body-parser"; -import jwt from "jsonwebtoken"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { Identity, Wallets } from "fabric-network"; -import { getLogger } from "log4js"; -import { Server as SocketIoServer } from "socket.io"; - -const config: any = ConfigUtil.getConfig(); -const moduleName = "fabric-connector"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const keychainId = uuidv4(); - -// Single Fabric connector instance -let fabricConnectorPlugin: PluginLedgerConnectorFabric | undefined = undefined; -let signerIdentity: FabricIdentity | undefined = undefined; -let fabricApiClient: FabricApiClient | undefined = undefined; - -export type FabricIdentity = Identity & { - credentials: { - certificate: string; - privateKey: string; - }; -}; - -// Prepare connection profile -// Fabric ledger should be running and it's config available in /etc/cactus/connector-fabric -const connectionProfile = { - name: "test-network-org1", - version: "1.0.0", - client: { - organization: "Org1", - connection: { timeout: { peer: { endorser: "300" } } }, - }, - organizations: { - Org1: { - mspid: "Org1MSP", - peers: ["peer0.org1.example.com"], - certificateAuthorities: ["ca.org1.example.com"], - }, - }, - peers: { - "peer0.org1.example.com": { - url: `grpcs://${config.assetTradeInfo.fabric.hostname}:7051`, - tlsCACerts: { - pem: fs.readFileSync( - "/etc/cactus/connector-fabric/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem", - "ascii", - ), - }, - grpcOptions: { - "ssl-target-name-override": "peer0.org1.example.com", - hostnameOverride: "peer0.org1.example.com", - }, - }, - }, - certificateAuthorities: { - "ca.org1.example.com": { - url: `https://${config.assetTradeInfo.fabric.hostname}:7054`, - caName: "ca-org1", - tlsCACerts: { - pem: fs.readFileSync( - "/etc/cactus/connector-fabric/crypto-config/fabric-ca/org1/tls-cert.pem", - "ascii", - ), - }, - httpOptions: { verify: false }, - }, - }, - orderers: { - "orderer.example.com": { - url: `grpcs://${config.assetTradeInfo.fabric.hostname}:7050`, - grpcOptions: { "ssl-target-name-override": "orderer.example.com" }, - tlsCACerts: { - pem: fs.readFileSync( - "/etc/cactus/connector-fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem", - "ascii", - ), - }, - }, - }, - channels: { - mychannel: { - orderers: ["orderer.example.com"], - peers: { - "peer0.org1.example.com": { - endorsingPeer: true, - chaincodeQuery: true, - ledgerQuery: true, - eventSource: true, - discover: true, - }, - }, - }, - }, -}; -logger.debug("Use connection profile:", connectionProfile); - -/** - * Create signign token that will be verified in sign callback on connector side. - * @param txId unique transaction data - * @returns jwt token (string) - */ -export function createSigningToken(txId: string) { - return jwt.sign( - { - data: txId, - }, - config.assetTradeInfo.fabric.tokenSecret, - { expiresIn: "1h" }, - ); -} - -/** - * Verify if siging token is correct (i.e. was issued by this BLP). - * To be used in fabric connector sign callback. - * - * @param token jwt signing token - * @returns txId if correct, undefined otherwise. - */ -export function isValidSigningToken(token: string) { - try { - return jwt.verify(token, config.assetTradeInfo.fabric.tokenSecret); - } catch (err) { - logger.error("Invalid signing JWT token:", err); - return undefined; - } -} - -/** - * Read fabric Identity from wallet for specified user. - * - * @param user fabric user name - * @returns `Identity` - */ -export async function getUserIdentity(user: string): Promise { - const wallet = await Wallets.newFileSystemWallet( - config.assetTradeInfo.fabric.keystore, - ); - - const walletEntry = await wallet.get(user); - if (walletEntry && walletEntry.type === "X.509") { - return walletEntry as FabricIdentity; - } else { - throw new Error( - `Could not add identiy for user ${user}. Wallet identity: ${walletEntry}`, - ); - } -} - -/** - * Create new fabric connector instance - */ -async function createFabricConnector(signerIdentity: FabricIdentity) { - if (fabricConnectorPlugin) { - fabricConnectorPlugin.shutdown(); - fabricConnectorPlugin = undefined; - } - - // Create empty Keychain Plugin - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - logLevel: config.logLevel, - backend: new Map(), - }); - - fabricConnectorPlugin = new PluginLedgerConnectorFabric({ - instanceId: `fabricAssetTrade-${uuidv4()}`, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - sshConfig: {}, // Provide SSH config to deploy contracts through connector - cliContainerEnv: {}, - peerBinary: "/fabric-samples/bin/peer", - logLevel: config.logLevel, - connectionProfile, - discoveryOptions: { - enabled: true, - asLocalhost: true, - }, - signCallback: async (payload, txData) => { - // Will be called for each delegated sign endpoints to sign a request payload. - const tokenData = isValidSigningToken(txData as string); - if (tokenData) { - logger.info("OK signing request for", tokenData); - return signProposal(signerIdentity.credentials.privateKey, payload); - } else { - throw new Error("Invalid TX token!"); - } - }, - }); - - await fabricConnectorPlugin.onPluginInit(); - - // Run http server - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const connectorServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: connectorServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const apiHost = `http://${addressInfo.address}:${addressInfo.port}`; - - // Run socketio server - const socketioServer = new SocketIoServer(connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - // Register services - await fabricConnectorPlugin.getOrCreateWebServices(); - await fabricConnectorPlugin.registerWebServices(expressApp, socketioServer); - - // Create ApiClient - const apiConfig = new Configuration({ basePath: apiHost }); - fabricApiClient = new FabricApiClient(apiConfig); -} - -/** - * Get first block data (number 0). Can be used to test fabric connection. - */ -async function getFirstBlock(): Promise { - if (!fabricConnectorPlugin) { - throw new Error("getFirstBlock() called before initFabricConnector()!"); - } - - const queryResponse = await fabricConnectorPlugin.transactDelegatedSign({ - signerCertificate: getSignerIdentity().credentials.certificate, - signerMspID: getSignerIdentity().mspId, - channelName: config.assetTradeInfo.fabric.channelName, - invocationType: FabricContractInvocationType.Call, - contractName: "qscc", - methodName: "GetBlockByNumber", - params: [config.assetTradeInfo.fabric.channelName, "1"], - uniqueTransactionData: createSigningToken("getFirstBlock"), - endorsingPeers: ["peer0.org1.example.com"], - }); - - return queryResponse; -} - -/** - * Create fabric connector and check if connection can be established - */ -export async function initFabricConnector(): Promise { - if (!fabricConnectorPlugin) { - const user = config.assetTradeInfo.fabric.submitter.name; - signerIdentity = await getUserIdentity(user); - logger.info( - "Using signing identity for", - user, - "MspID", - signerIdentity.mspId, - ); - await createFabricConnector(signerIdentity); - - const firstBlockResponse = await getFirstBlock(); - if (!firstBlockResponse.functionOutput) { - throw new Error(`Invalid getFirstBlock response: ${firstBlockResponse}`); - } - - logger.info("initFabricConnector() done."); - } else { - logger.info("initFabricConnector() Fabric connector already initialized"); - } -} - -/** - * Get instance of fabric connector, initialize it if not done yet. - */ -export async function getFabricConnector(): Promise { - if (!fabricConnectorPlugin) { - await initFabricConnector(); - } - - if (fabricConnectorPlugin) { - return fabricConnectorPlugin; - } else { - throw new Error("Could not initialize new fabric connector!"); - } -} - -/** - * Get instance of fabric api client. - */ -export function getFabricApiClient(): FabricApiClient { - if (fabricApiClient) { - return fabricApiClient; - } else { - throw new Error("Fabric connector not initialized yet!"); - } -} - -/** - * Get signer identity - */ -export function getSignerIdentity(): FabricIdentity { - if (signerIdentity) { - return signerIdentity; - } else { - throw new Error("Fabric connector not initialized yet!"); - } -} diff --git a/examples/cactus-example-discounted-asset-trade/image/discounted-asset-trade-image.png b/examples/cactus-example-discounted-asset-trade/image/discounted-asset-trade-image.png deleted file mode 100644 index aa92bc75e6..0000000000 Binary files a/examples/cactus-example-discounted-asset-trade/image/discounted-asset-trade-image.png and /dev/null differ diff --git a/examples/cactus-example-discounted-asset-trade/image/indy-setup-schema.svg b/examples/cactus-example-discounted-asset-trade/image/indy-setup-schema.svg deleted file mode 100644 index fae8bff038..0000000000 --- a/examples/cactus-example-discounted-asset-trade/image/indy-setup-schema.svg +++ /dev/null @@ -1 +0,0 @@ -started by docker-composeindy_poolcontainerindy-nodeindy-node9701:97019708:9708validatorcontainerValidator code (python)+python3-indylibindy.so8000:8000nginxcontainernginx10080:80indy_net(docker bridge network)172.16.0.0/16Other (e.g. host) networkCactus nodeverifierBLP \ No newline at end of file diff --git a/examples/cactus-example-discounted-asset-trade/indy-endpoints.ts b/examples/cactus-example-discounted-asset-trade/indy-endpoints.ts deleted file mode 100644 index ae5d92b23b..0000000000 --- a/examples/cactus-example-discounted-asset-trade/indy-endpoints.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Endpoints for interacting with this sample app Indy agent. - */ - -import { Router, NextFunction, Request, Response } from "express"; -import escapeHtml from "escape-html"; -import { getLogger } from "log4js"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { connectToClientAgent } from "./transaction-indy"; - -const config: any = ConfigUtil.getConfig(); -const moduleName = "indy-endpoints"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const router: Router = Router(); - -/** - * POST - * Connect to the client indy agent. - * Caller must supply it's invitationUrl and accept the connection. - */ -router.post( - "/connect", - async (req: Request, res: Response, next: NextFunction) => { - try { - const invitationUrl = req.body.invitationUrl as string; - if (!invitationUrl || typeof invitationUrl !== "string") { - throw new Error(`Missing invitationUrl in the request body`); - } - - logger.debug("Connecting to Indy agent with invitation:", invitationUrl); - const blpConnectionId = await connectToClientAgent(invitationUrl); - - res.status(200).json({ - message: "Invitation accepted", - blpConnectionId, - }); - } catch (err) { - res.status(500).send({ - error: escapeHtml(err), - }); - next(err); - } - }, -); - -export default router; diff --git a/examples/cactus-example-discounted-asset-trade/package.json b/examples/cactus-example-discounted-asset-trade/package.json deleted file mode 100644 index b012510a75..0000000000 --- a/examples/cactus-example-discounted-asset-trade/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "@hyperledger/cactus-example-discounted-asset-trade", - "version": "2.0.0", - "private": true, - "license": "Apache-2.0", - "main": "dist/www.js", - "module": "dist/www.js", - "types": "dist/www.d.ts", - "scripts": { - "build": "npm run build-ts && npm run build:dev:backend:postbuild", - "build-ts": "tsc", - "build:dev:backend:postbuild": "cp -f ../../yarn.lock ./dist/", - "start": "docker-compose build && docker-compose up", - "start-dockerless": "node ./dist/www.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-common-example-server": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-aries": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@types/node": "18.11.9", - "axios": "1.7.7", - "body-parser": "1.20.3", - "cookie-parser": "1.4.6", - "debug": "3.1.0", - "elliptic": "6.5.7", - "escape-html": "1.0.3", - "ethereumjs-common": "1.5.2", - "ethereumjs-tx": "2.1.2", - "express": "4.21.0", - "fabric-ca-client": "2.2.20", - "fabric-network": "2.2.20", - "http-errors": "1.6.3", - "indy-sdk": "1.16.0-dev-1655", - "jsonwebtoken": "9.0.2", - "jsrsasign": "11.0.0", - "log4js": "6.4.0", - "morgan": "1.9.1", - "run-time-error-cjs": "1.4.0", - "shelljs": "0.8.5", - "socket.io": "4.6.2", - "ts-node": "8.9.1", - "uuid": "10.0.0", - "xmlhttprequest": "1.8.0" - }, - "devDependencies": { - "@types/elliptic": "6.4.14", - "@types/escape-html": "1.0.1", - "@types/express": "5.0.0", - "@types/jsonwebtoken": "9.0.6", - "@types/jsrsasign": "10.5.8", - "@types/uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - } -} diff --git a/examples/cactus-example-discounted-asset-trade/result-transactions-status-data.ts b/examples/cactus-example-discounted-asset-trade/result-transactions-status-data.ts deleted file mode 100644 index 428f359e65..0000000000 --- a/examples/cactus-example-discounted-asset-trade/result-transactions-status-data.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * result-transactions-status-data.ts - */ - -import { TransactionStatus } from "./transaction-status"; - -export class ResultTransactionStatusData { - stateInfo: number | undefined; - transactionStatus: TransactionStatus[]; - constructor() { - this.transactionStatus = []; - } -} diff --git a/examples/cactus-example-discounted-asset-trade/script-cleanup.sh b/examples/cactus-example-discounted-asset-trade/script-cleanup.sh deleted file mode 100755 index 1e1193152e..0000000000 --- a/examples/cactus-example-discounted-asset-trade/script-cleanup.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -echo ">> Remove the config files on your machine" -rm -rf ./etc/cactus/ -rm -rf /etc/cactus/* -rm -rf ~/.cacti/cactus-example-discounted-asset-trade/ - -echo ">> Stop the docker containers of Ethereum, Fabric and Indy" -docker stop geth1 asset_trade_faio2x_testnet asset_trade_indy_all_in_one -docker rm geth1 asset_trade_faio2x_testnet asset_trade_indy_all_in_one $(docker container ls -q --all --filter name=geth-testnet_init-chain) -docker compose rm -f - -echo ">> Clear docker networks" -docker network rm geth1net geth-testnet_default fabric-all-in-one_testnet-2x geth-testnet_default indy-all-in-one_indy_aio_net -docker network rm $(docker network ls -q --filter name=cactus-example-discounted-asset-trade) - -echo ">> Clear indy-all-in-one" -pushd ../../tools/docker/indy-all-in-one/ -./script-cleanup.sh -popd - -echo ">> Remove geth files" -pushd ../../tools/docker/geth-testnet/ -rm -fr ./data-geth1/geth/ -popd - -echo "Cleanup done." \ No newline at end of file diff --git a/examples/cactus-example-discounted-asset-trade/script-dockerless-config-patch.sh b/examples/cactus-example-discounted-asset-trade/script-dockerless-config-patch.sh deleted file mode 100755 index bc97a6d99c..0000000000 --- a/examples/cactus-example-discounted-asset-trade/script-dockerless-config-patch.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -COMMON_CACTUS_CONFIG="/etc/cactus/" - -echo "Note - script must executed from within cactus-example-discounted-asset-trade directory!" - -echo "Copy local cactus config to common location ($COMMON_CACTUS_CONFIG)" -sudo rm -rf "$COMMON_CACTUS_CONFIG" -sudo cp -ar "./etc/cactus" "/etc" -sudo chown -hR $(whoami) "$COMMON_CACTUS_CONFIG" - -echo "Patch validators..." -sed -i 's/geth1/localhost/g' "${COMMON_CACTUS_CONFIG}/connector-go-ethereum-socketio/default.yaml" - -echo "Patch validator-registry-config.yaml..." -sed -i 's/ethereum-validator/localhost/g' "${COMMON_CACTUS_CONFIG}/validator-registry-config.yaml" - -echo "Patch path to asset-trade modules." -current_pwd=$(pwd) -escaped_pwd=${current_pwd//\//\\/} -sed -i "s/\/root\/cactus/$escaped_pwd/g" "${COMMON_CACTUS_CONFIG}/usersetting.yaml" - -echo "Done." diff --git a/examples/cactus-example-discounted-asset-trade/script-start-ledgers.sh b/examples/cactus-example-discounted-asset-trade/script-start-ledgers.sh deleted file mode 100755 index 895be792b4..0000000000 --- a/examples/cactus-example-discounted-asset-trade/script-start-ledgers.sh +++ /dev/null @@ -1,166 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -set -e - -ROOT_DIR="../.." # Path to cactus root dir -WAIT_TIME=15 # 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="asset_trade_faio2x_testnet" -export CACTUS_FABRIC_ALL_IN_ONE_VERSION="2.5.6" -export CACTUS_FABRIC_ALL_IN_ONE_NODEENV_VERSION="2.5.4" -export CACTUS_FABRIC_ALL_IN_ONE_CA_VERSION="1.5.3" -export CACTUS_FABRIC_ALL_IN_ONE_COUCH_VERSION_FABRIC="0.4" -export CACTUS_FABRIC_ALL_IN_ONE_COUCH_VERSION="3.2.2" -export CACTUS_FABRIC_TEST_LOOSE_MEMBERSHIP=1 - -# Indy Env Variables -export CACTUS_INDY_ALL_IN_ONE_NAME="asset_trade_indy_all_in_one" - -# Cert options -CERT_CURVE_NAME="prime256v1" -CERT_COUNTRY="JP" -CERT_STATE="Tokyo" -CERT_LOCALITY="Minato-Ku" -CERT_ORG="CactusSamples" - -# generate_certificate -function generate_certificate() { - # Check OpenSSL command existance - if ! openssl version > /dev/null; then - echo "Could not execute [openssl version], check if OpenSSL tool is available on the system." - exit 1; - fi - - # Check input parameters - ARGS_NUMBER=2 - if [ "$#" -lt "$ARGS_NUMBER" ]; then - echo "generate_certificate called with wrong number of arguments (expected - $ARGS_NUMBER, actual - $#)"; - exit 2 - fi - - common_name=$1 - destination=$2 - subject="/C=$CERT_COUNTRY/ST=$CERT_STATE/L=$CERT_LOCALITY/O=$CERT_ORG/CN=$common_name" - echo "Create new cert in '${destination}' with subject '${subject}'" - - # Crete destination path - if [ ! -d "$destination" ]; then - echo "Re-create destination dir..." - rm -rf "$destination" - mkdir -p "$destination" - fi - - keyPath="${destination}/connector.priv" - csrPath="${destination}/connector.csr" - certPath="${destination}/connector.crt" - - # Generate keys - openssl ecparam -genkey -name "$CERT_CURVE_NAME" -out "$keyPath" - openssl req -new -sha256 -key "$keyPath" -out "$csrPath" -subj "$subject" - openssl req -x509 -sha256 -days 365 -key "$keyPath" -in "$csrPath" -out "$certPath" -} - -function start_fabric_testnet() { - echo ">> start_fabric_testnet()" - pushd "${ROOT_DIR}/tools/docker/fabric-all-in-one" - - echo ">> Start Fabric ${CACTUS_FABRIC_ALL_IN_ONE_VERSION}..." - docker-compose -f ./docker-compose-v2.x.yml build - docker-compose -f ./docker-compose-v2.x.yml up -d - sleep 1 - - # Wait for fabric cotnainer to become healthy - health_status="$(docker inspect -f '{{.State.Health.Status}}' ${CACTUS_FABRIC_ALL_IN_ONE_CONTAINER_NAME})" - while ! [ "${health_status}" == "healthy" ] - do - echo "Waiting for fabric container... current status => ${health_status}" - sleep $WAIT_TIME - health_status="$(docker inspect -f '{{.State.Health.Status}}' ${CACTUS_FABRIC_ALL_IN_ONE_CONTAINER_NAME})" - done - echo ">> Fabric ${CACTUS_FABRIC_ALL_IN_ONE_VERSION} started." - - echo ">> Register admin and appUser..." - pushd asset-transfer-basic-utils - npm install - ./setup.sh - popd - echo ">> Register done." - - echo ">> start_fabric_testnet() done." - popd -} - -function copy_fabric_tlsca() { - echo ">> copy_fabric_tlsca()" - docker cp "${CACTUS_FABRIC_ALL_IN_ONE_CONTAINER_NAME}:/fabric-samples/test-network/organizations/" \ - "${CONFIG_VOLUME_PATH}/connector-fabric/crypto-config/" - echo ">> copy_fabric_tlsca() done." -} - -function copy_fabric_validator_config() { - echo ">> copy_fabric_wallet()" - cp -fr "${ROOT_DIR}/tools/docker/fabric-all-in-one/asset-transfer-basic-utils/wallet" "${CONFIG_VOLUME_PATH}/connector-fabric/" - echo ">> copy_fabric_wallet() done." -} - -function start_ethereum_testnet() { - pushd "${ROOT_DIR}/tools/docker/geth-testnet" - ./script-start-docker.sh - popd -} - -function start_indy_testnet() { - echo ">> start_indy_testnet()" - pushd "${ROOT_DIR}/tools/docker/indy-all-in-one" - ./script-start-docker.sh - popd - - # Wait for fabric cotnainer to become healthy - health_status="$(docker inspect -f '{{.State.Health.Status}}' ${CACTUS_INDY_ALL_IN_ONE_NAME})" - while ! [ "${health_status}" == "healthy" ] - do - echo "Waiting for indy container... current status => ${health_status}" - sleep $WAIT_TIME - health_status="$(docker inspect -f '{{.State.Health.Status}}' ${CACTUS_INDY_ALL_IN_ONE_NAME})" - done - echo ">> Indy test ledger started." -} - -function copy_indy_ledger_config() { - echo ">> copy_indy_ledger_config()" - mkdir -p "${CONFIG_VOLUME_PATH}/indy-all-in-one/" - mkdir -p "/etc/cactus/indy-all-in-one/" - cp -fr "/tmp/indy-all-in-one/pool_transactions_genesis" "${CONFIG_VOLUME_PATH}/indy-all-in-one/" - cp -fr "/tmp/indy-all-in-one/pool_transactions_genesis" "/etc/cactus/indy-all-in-one/" - echo ">> copy_indy_ledger_config() done." -} - -function start_ledgers() { - # Clear ./etc/cactus - mkdir -p ${CONFIG_VOLUME_PATH}/ - rm -fr ${CONFIG_VOLUME_PATH}/* - - # Copy cmd-socketio-config - cp -f ./config/*.yaml "${CONFIG_VOLUME_PATH}/" - - # Start Fabric - start_fabric_testnet - mkdir -p "${CONFIG_VOLUME_PATH}/connector-fabric" - copy_fabric_tlsca - copy_fabric_validator_config - - # Start Ethereum - mkdir -p "${CONFIG_VOLUME_PATH}/connector-go-ethereum-socketio" - start_ethereum_testnet - - # Start Indy - start_indy_testnet - copy_indy_ledger_config -} - -start_ledgers -echo "All Done." diff --git a/examples/cactus-example-discounted-asset-trade/trades.ts b/examples/cactus-example-discounted-asset-trade/trades.ts deleted file mode 100644 index d434f6ee03..0000000000 --- a/examples/cactus-example-discounted-asset-trade/trades.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * trades.ts - */ - -import { Router, NextFunction, Request, Response } from "express"; -import { TransactionManagement } from "@hyperledger/cactus-common-example-server"; -import { RIFError } from "@hyperledger/cactus-common-example-server"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; - -import escapeHtml from "escape-html"; -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "trades"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const router: Router = Router(); -export const transactionManagement: TransactionManagement = - new TransactionManagement(); - -// Request Execution of Trade -router.post("/", (req: Request, res: Response, next: NextFunction) => { - try { - const tradeID = transactionManagement.startBusinessLogic(req); - if (!tradeID) { - throw new RIFError(`Could not run BLP, tradeId = ${tradeID}`); - } - - const result = { tradeID: tradeID }; - res - .status(201) - .location( - config.applicationHostInfo.hostName + "/api/v1/trades/" + tradeID, - ) - .json(result); - } catch (err) { - if (err instanceof RIFError) { - res.status(err.statusCode); - res.send(escapeHtml(err.message)); - return; - } - - next(err); - } -}); - -// Show Current Status of Trade -router.get("/:id", (req: Request, res: Response, next: NextFunction) => { - try { - const result = transactionManagement.getOperationStatus(req.params.id); - if (result) { - res.status(200).json(result); - } else { - throw new RIFError("Could not get operation status"); - } - } catch (err) { - if (err instanceof RIFError) { - res.status(err.statusCode); - res.send(escapeHtml(err.message)); - return; - } - - next(err); - } -}); - -export default router; diff --git a/examples/cactus-example-discounted-asset-trade/transaction-data.ts b/examples/cactus-example-discounted-asset-trade/transaction-data.ts deleted file mode 100644 index 1638f063d0..0000000000 --- a/examples/cactus-example-discounted-asset-trade/transaction-data.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * transaction-data.ts - */ - -export class TransactionData { - target: string; // "escrow" or "transfer" or "settlement" - ledger: string; - txID: string; - - constructor(target: string, ledger: string, txID: string) { - this.target = target; - this.ledger = ledger; - this.txID = txID; - } -} diff --git a/examples/cactus-example-discounted-asset-trade/transaction-ethereum.ts b/examples/cactus-example-discounted-asset-trade/transaction-ethereum.ts deleted file mode 100644 index 2232b7c107..0000000000 --- a/examples/cactus-example-discounted-asset-trade/transaction-ethereum.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * transaction-ethereum.ts - */ - -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { - Web3SigningCredentialType, - signTransaction, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; - -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "TransactionEthereum"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const mapFromAddressNonce: Map = new Map(); - -import { getEthereumConnector } from "./ethereum-connector"; - -export async function sendEthereumTransaction( - transaction: any, - from: string, - privateKey: string, -) { - const connector = await getEthereumConnector(); - - if (!("nonce" in transaction)) { - const nonce = await getNewNonce(from); - transaction = { - ...transaction, - nonce, - }; - } - logger.debug("sendEthereumTransaction", transaction); - - const { serializedTransactionHex, txId } = signTransaction( - transaction, - privateKey, - { - name: config.signTxInfo.ethereum.chainName, - chainId: config.signTxInfo.ethereum.chainID, - networkId: config.signTxInfo.ethereum.networkID, - defaultHardfork: config.signTxInfo.ethereum.defaultHardfork, - }, - ); - logger.info("Sending ethereum transaction with ID", txId); - - return connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - transactionConfig: { - rawTransaction: serializedTransactionHex, - }, - }); -} - -export async function getNewNonce(fromAddress: string): Promise { - logger.info("Get current nonce for account", fromAddress); - const connector = await getEthereumConnector(); - - const nonceBigInt = (await connector.invokeRawWeb3EthMethod({ - methodName: "getTransactionCount", - params: [fromAddress], - })) as bigint; - let nonce = Number(nonceBigInt); - const latestNonce = mapFromAddressNonce.get(fromAddress); - - if (latestNonce && nonce <= latestNonce) { - // nonce correction - nonce = latestNonce + 1; - logger.debug( - `##getNewNonce(C): Adjust txnCount, fromAddress: ${fromAddress}, nonce: ${nonce}`, - ); - } - - logger.debug(`##getNewNonce(G): txnCountHex: ${nonce}`); - mapFromAddressNonce.set(fromAddress, nonce); - return nonce; -} - -export async function getAccountBalance(address: string): Promise { - logger.info("Get account balance", address); - const connector = await getEthereumConnector(); - - if (!address.toLowerCase().startsWith("0x")) { - address = "0x" + address; - logger.debug("Added hex prefix to address:", address); - } - - const balance = (await connector.invokeRawWeb3EthMethod({ - methodName: "getBalance", - params: [address], - })) as bigint; - return Number(balance); -} diff --git a/examples/cactus-example-discounted-asset-trade/transaction-fabric.ts b/examples/cactus-example-discounted-asset-trade/transaction-fabric.ts deleted file mode 100644 index e5b01f5bf8..0000000000 --- a/examples/cactus-example-discounted-asset-trade/transaction-fabric.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * transaction-fabric.ts - */ - -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; - -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -import { - createSigningToken, - getFabricConnector, - getSignerIdentity, -} from "./fabric-connector"; -import { FabricContractInvocationType } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -const moduleName = "TransactionFabric"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export async function transferOwnership( - assetID: string, - fabricAccountTo: string, -) { - const connector = await getFabricConnector(); - - const transferResponse = await connector.transactDelegatedSign({ - signerCertificate: getSignerIdentity().credentials.certificate, - signerMspID: getSignerIdentity().mspId, - channelName: config.assetTradeInfo.fabric.channelName, - invocationType: FabricContractInvocationType.Send, - contractName: config.assetTradeInfo.fabric.chaincodeID, - methodName: "TransferAsset", - params: [assetID, fabricAccountTo], - uniqueTransactionData: createSigningToken("transferOwnership"), - }); - logger.debug("transferResponse:", transferResponse); - - return transferResponse; -} - -export async function queryAsset(assetID: string): Promise { - const connector = await getFabricConnector(); - - const queryResponse = await connector.transactDelegatedSign({ - signerCertificate: getSignerIdentity().credentials.certificate, - signerMspID: getSignerIdentity().mspId, - channelName: config.assetTradeInfo.fabric.channelName, - invocationType: FabricContractInvocationType.Call, - contractName: config.assetTradeInfo.fabric.chaincodeID, - methodName: "ReadAsset", - params: [assetID], - uniqueTransactionData: createSigningToken("queryAsset"), - }); - logger.debug("queryResponse:", queryResponse); - - return JSON.parse(queryResponse.functionOutput); -} - -export async function queryAllAssets(): Promise { - const connector = await getFabricConnector(); - - const queryResponse = await connector.transactDelegatedSign({ - signerCertificate: getSignerIdentity().credentials.certificate, - signerMspID: getSignerIdentity().mspId, - channelName: config.assetTradeInfo.fabric.channelName, - invocationType: FabricContractInvocationType.Call, - contractName: config.assetTradeInfo.fabric.chaincodeID, - methodName: "GetAllAssets", - params: [], - uniqueTransactionData: createSigningToken("queryAllAssets"), - }); - logger.debug("queryResponse:", queryResponse); - - return JSON.parse(queryResponse.functionOutput); -} diff --git a/examples/cactus-example-discounted-asset-trade/transaction-indy.ts b/examples/cactus-example-discounted-asset-trade/transaction-indy.ts deleted file mode 100644 index bb831e0485..0000000000 --- a/examples/cactus-example-discounted-asset-trade/transaction-indy.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { getLogger } from "log4js"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { getAriesApiClient, getBlpAgentName } from "./aries-connector"; - -const config: any = ConfigUtil.getConfig(); -const moduleName = "transaction-indy"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -/** - * Connect remote client aries agent using it's invitation URL. - * Wait until connection is established and ready to use. - * - * @param invitationUrl aries invitation URL. - * @returns connection ID of newly created connection - */ -export async function connectToClientAgent( - invitationUrl: string, -): Promise { - logger.info("Accepting invitation from client agent..."); - const ariesApiClient = getAriesApiClient(); - - const acceptResponse = await ariesApiClient.acceptInvitationV1({ - agentName: getBlpAgentName(), - invitationUrl: invitationUrl, - }); - const { outOfBandId } = acceptResponse.data; - await ariesApiClient.waitForConnectionReadyV1(getBlpAgentName(), outOfBandId); - logger.debug("connectToClientAgent() - outOfBandId:", outOfBandId); - - // Get connection ID - const connectionsResponse = await ariesApiClient.getConnectionsV1({ - agentName: getBlpAgentName(), - filter: { - outOfBandId, - }, - }); - const connectionRecord = connectionsResponse.data.pop(); - if (!connectionRecord) { - throw new Error( - "Could not establish a connection to remote client indy agent!", - ); - } - logger.debug("connectToClientAgent() - connection ID:", connectionRecord.id); - - return connectionRecord.id; -} - -/** - * Request and verify employment proof from client agent with specified connection ID. - * - * @param indyAgentConId client agent connection ID. - * @param credentialDefinitionId employment credential definition ID. - * @returns true if agent is an employee, false otherwise - */ -export async function isEmploymentCredentialProofValid( - indyAgentConId: string, - credentialDefinitionId: string, -): Promise { - const ariesApiClient = getAriesApiClient(); - - try { - const proof = await ariesApiClient.requestProofAndWaitV1( - getBlpAgentName(), - indyAgentConId, - [ - { - name: "employee_status", - isValueEqual: "Permanent", - isCredentialDefinitionIdEqual: credentialDefinitionId, - }, - ], - ); - logger.debug("Received employment proof response:", proof); - return proof.isVerified ?? false; - } catch (error) { - logger.warn("Error when requesting employment proof:", error); - } - - return false; -} diff --git a/examples/cactus-example-discounted-asset-trade/transaction-info-management.ts b/examples/cactus-example-discounted-asset-trade/transaction-info-management.ts deleted file mode 100644 index 278d26d6a3..0000000000 --- a/examples/cactus-example-discounted-asset-trade/transaction-info-management.ts +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * transaction-info-management.ts - */ - -import { TransactionInfo } from "./transaction-info"; -import { TransactionData } from "./transaction-data"; -import { TxInfoData } from "./tx-info-data"; -import { - TradeInfo, - ConfigUtil, -} from "@hyperledger/cactus-common-example-server"; -import { AssetTradeStatus } from "./define"; - -const fs = require("fs"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "TransactionInfoManagement"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -interface TransactionInfoTable { - table: string[]; -} - -// Transaction Information Management Class -export class TransactionInfoManagement { - fileName = "transaction-Info.json"; - - constructor() { - // Do nothing - } - - // For debugging - fileDump(): void { - const confirmData: string = fs.readFileSync(this.fileName, "utf8"); - const arrayData: TransactionInfo[] = JSON.parse(confirmData) - .table as TransactionInfo[]; - logger.debug(arrayData); - } - - addTransactionInfo(transactionInfo: TransactionInfo): void { - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - // Creating an empty table file - const emptyTable = { - table: [], - }; - const emptyTableJson: string = JSON.stringify(emptyTable); - fs.writeFileSync(this.fileName, emptyTableJson, "utf8"); - } - - const transactionInfoJson: string = JSON.stringify(transactionInfo); - - let transactionInfoTable: TransactionInfoTable = { - table: [], - }; - const transactionInfoFileData: string = fs.readFileSync( - this.fileName, - "utf8", - ); - transactionInfoTable = JSON.parse(transactionInfoFileData); - transactionInfoTable.table.push(transactionInfoJson); - const transactionInfoTableJson: string = - JSON.stringify(transactionInfoTable); - fs.writeFileSync(this.fileName, transactionInfoTableJson, "utf8"); - - this.fileDump(); - } - - setStatus(tradeInfo: TradeInfo, status: AssetTradeStatus): void { - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - throw err; - } - - // Read table file - const fileData: string = fs.readFileSync(this.fileName, "utf8"); - const transactionInfoTable: string[] = JSON.parse(fileData) - .table as string[]; - - // Search target records / replace data - const transactionInfoTableNew: TransactionInfoTable = { - table: [], - }; - transactionInfoTable.forEach((transactionInfoJSON) => { - const transactionInfo: TransactionInfo = JSON.parse( - transactionInfoJSON, - ) as TransactionInfo; - - // Determine if it is a target record - if ( - transactionInfo.businessLogicID === tradeInfo.businessLogicID && - transactionInfo.tradeID === tradeInfo.tradeID - ) { - // Change Status - transactionInfo.status = status; - } - - // Register Record - const transactionInfoJson: string = JSON.stringify(transactionInfo); - transactionInfoTableNew.table.push(transactionInfoJson); - }); - - // Table File Write - const transactionInfoTableNewJson: string = JSON.stringify( - transactionInfoTableNew, - ); - fs.writeFileSync(this.fileName, transactionInfoTableNewJson, "utf8"); - - this.fileDump(); - } - - setTransactionData( - tradeInfo: TradeInfo, - transactionData: TransactionData, - ): void { - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - throw err; - } - - // Read table file - const fileData: string = fs.readFileSync(this.fileName, "utf8"); - const transactionInfoTable: string[] = JSON.parse(fileData) - .table as string[]; - - // Search target records / replace data - const transactionInfoTableNew: TransactionInfoTable = { - table: [], - }; - transactionInfoTable.forEach((transactionInfoJSON) => { - const transactionInfo: TransactionInfo = JSON.parse( - transactionInfoJSON, - ) as TransactionInfo; - - // Determine if it is a target record - if ( - transactionInfo.businessLogicID === tradeInfo.businessLogicID && - transactionInfo.tradeID === tradeInfo.tradeID - ) { - // Determine if it is the target transaction - if (transactionData.target === "escrow") { - // escrow: dataset - transactionInfo.escrowLedger = transactionData.ledger; - transactionInfo.escrowTxID = transactionData.txID; - } else if (transactionData.target === "transfer") { - // transfer: dataset - transactionInfo.transferLedger = transactionData.ledger; - transactionInfo.transferTxID = transactionData.txID; - } else if (transactionData.target === "settlement") { - // settlement: dataset - transactionInfo.settlementLedger = transactionData.ledger; - transactionInfo.settlementTxID = transactionData.txID; - } - } - - // Register Record - const transactionInfoJson: string = JSON.stringify(transactionInfo); - transactionInfoTableNew.table.push(transactionInfoJson); - }); - - // Table File Write - const transactionInfoTableNewJson: string = JSON.stringify( - transactionInfoTableNew, - ); - fs.writeFileSync(this.fileName, transactionInfoTableNewJson, "utf8"); - - this.fileDump(); - } - - setTxInfo(tradeInfo: TradeInfo, txInfoData: TxInfoData): void { - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - throw err; - } - - // Read table file - const fileData: string = fs.readFileSync(this.fileName, "utf8"); - const transactionInfoTable: string[] = JSON.parse(fileData) - .table as string[]; - - // Search target records / replace data - const transactionInfoTableNew: TransactionInfoTable = { - table: [], - }; - transactionInfoTable.forEach((transactionInfoJSON) => { - const transactionInfo: TransactionInfo = JSON.parse( - transactionInfoJSON, - ) as TransactionInfo; - - // Determine if it is a target record - if ( - transactionInfo.businessLogicID === tradeInfo.businessLogicID && - transactionInfo.tradeID === tradeInfo.tradeID - ) { - // Determine if it is the target transaction - if (txInfoData.target === "escrow") { - // escrow: dataset - transactionInfo.escrowTxInfo = txInfoData.txInfo; - } else if (txInfoData.target === "transfer") { - // transfer: dataset - transactionInfo.transferTxInfo = txInfoData.txInfo; - } else if (txInfoData.target === "settlement") { - // settlement: dataset - transactionInfo.settlementTxInfo = txInfoData.txInfo; - } - } - - // Register Record - const transactionInfoJson: string = JSON.stringify(transactionInfo); - transactionInfoTableNew.table.push(transactionInfoJson); - }); - - // Table File Write - const transactionInfoTableNewJson: string = JSON.stringify( - transactionInfoTableNew, - ); - fs.writeFileSync(this.fileName, transactionInfoTableNewJson, "utf8"); - - this.fileDump(); - } - - /** - * Get transaction data corresponding to the specified txId. - * (*Return if any of escrowTxID, transferTxID, settlementTxID matches txId) - * - * @return Transaction data corresponding to txId. Returns null if it does not exist. - * - */ - getTransactionInfoByTxId(txId: string): TransactionInfo | null { - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - throw err; - } - - // Read table file - const fileData: string = fs.readFileSync(this.fileName, "utf8"); - const transactionInfoTable: string[] = JSON.parse(fileData) - .table as string[]; - - let retTransactionInfo: TransactionInfo | null = null; - transactionInfoTable.forEach((transactionInfoJSON) => { - const transactionInfo: TransactionInfo = JSON.parse( - transactionInfoJSON, - ) as TransactionInfo; - - // Determine if it is a target record - if ( - transactionInfo.escrowTxID === txId || - transactionInfo.transferTxID === txId || - transactionInfo.settlementTxID === txId - ) { - retTransactionInfo = transactionInfo; - return; - } - }); - - return retTransactionInfo; - } -} diff --git a/examples/cactus-example-discounted-asset-trade/transaction-info.ts b/examples/cactus-example-discounted-asset-trade/transaction-info.ts deleted file mode 100644 index 56d649db46..0000000000 --- a/examples/cactus-example-discounted-asset-trade/transaction-info.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * transaction-info.ts - */ - -import { RequestInfo } from "@hyperledger/cactus-common-example-server"; - -export class TransactionInfo { - businessLogicID = ""; - tradeID = ""; - ethereumAccountFrom = ""; - ethereumAccountTo = ""; - ethereumAccountFromKey = ""; - ethereumAccountToKey = ""; - fabricAccountFrom = ""; - fabricAccountTo = ""; - fabricAccountFromKey = ""; - fabricAccountToKey = ""; - tradingValue = ""; - assetID = ""; - status = 0; - escrowLedger = ""; - escrowTxID = ""; - escrowTxInfo = ""; - transferLedger = ""; - transferTxID = ""; - transferTxInfo = ""; - settlementLedger = ""; - settlementTxID = ""; - settlementTxInfo = ""; - - constructor() { - // Do nothing - } - - setRequestInfo(mode: number, requestInfo: RequestInfo): void { - // Set request information - this.businessLogicID = requestInfo.businessLogicID; - this.tradeID = requestInfo.tradeID; - this.ethereumAccountFrom = requestInfo.tradeInfo.ethereumAccountFrom; - this.ethereumAccountTo = requestInfo.tradeInfo.ethereumAccountTo; - this.fabricAccountFrom = requestInfo.tradeInfo.fabricAccountFrom; - this.fabricAccountTo = requestInfo.tradeInfo.fabricAccountTo; - this.tradingValue = requestInfo.tradeInfo.tradingValue; - this.assetID = requestInfo.tradeInfo.assetID; - - // mode check - if (mode === 0) { - // init mode - // Initialize anything other than request information - this.status = 0; - this.escrowLedger = ""; - this.escrowTxID = ""; - this.escrowTxInfo = ""; - this.transferLedger = ""; - this.transferTxID = ""; - this.transferTxInfo = ""; - this.settlementLedger = ""; - this.settlementTxID = ""; - this.settlementTxInfo = ""; - } - } -} diff --git a/examples/cactus-example-discounted-asset-trade/transaction-status.ts b/examples/cactus-example-discounted-asset-trade/transaction-status.ts deleted file mode 100644 index cd50f2f587..0000000000 --- a/examples/cactus-example-discounted-asset-trade/transaction-status.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * transaction-status.ts - */ - -export class TransactionStatus { - state = ""; - ledger = ""; - txID = ""; - txInfo = ""; // JSON string -} diff --git a/examples/cactus-example-discounted-asset-trade/tsconfig.json b/examples/cactus-example-discounted-asset-trade/tsconfig.json deleted file mode 100644 index c2b040a9b7..0000000000 --- a/examples/cactus-example-discounted-asset-trade/tsconfig.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/", - "rootDir": "./", - "tsBuildInfoFile": "../../.build-cache/cactus-example-discounted-asset-trade.tsbuildinfo" - }, - "include": ["./*.ts"], - "references": [ - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-common-example-server/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-aries/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-ethereum/tsconfig.json" - } - ] -} diff --git a/examples/cactus-example-discounted-asset-trade/tx-info-data.ts b/examples/cactus-example-discounted-asset-trade/tx-info-data.ts deleted file mode 100644 index ad0122e46b..0000000000 --- a/examples/cactus-example-discounted-asset-trade/tx-info-data.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * tx-info-data.ts - */ - -export class TxInfoData { - target: string; // "escrow" or "transfer" or "settlement" - txInfo: string; - - constructor(target: string, txInfo: string) { - this.target = target; - this.txInfo = txInfo; // JSON string - } -} diff --git a/examples/cactus-example-discounted-asset-trade/www.ts b/examples/cactus-example-discounted-asset-trade/www.ts deleted file mode 100644 index f7db346f30..0000000000 --- a/examples/cactus-example-discounted-asset-trade/www.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { BusinessLogicAssetTrade } from "./business-logic-asset-trade"; -import { startCactusSocketIOServer } from "@hyperledger/cactus-common-example-server"; -import { initFabricConnector } from "./fabric-connector"; -import { initEthereumConnector } from "./ethereum-connector"; -import { initAriesConnector } from "./aries-connector"; - -async function startBLP() { - try { - await initFabricConnector(); - await initEthereumConnector(); - await initAriesConnector(); - - startCactusSocketIOServer({ - id: "guks32pf", - plugin: new BusinessLogicAssetTrade(), - }); - } catch (error) { - console.error("Could not start discounted-asset-trade BLP:", error); - } -} - -startBLP(); diff --git a/examples/cactus-example-electricity-trade/.gitignore b/examples/cactus-example-electricity-trade/.gitignore deleted file mode 100644 index bc3fec4ce7..0000000000 --- a/examples/cactus-example-electricity-trade/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -MeterInfo.json - -# BLP artifacts -etc/ - -# don't commit package-lock -package-lock.json diff --git a/examples/cactus-example-electricity-trade/BusinessLogicElectricityTrade.ts b/examples/cactus-example-electricity-trade/BusinessLogicElectricityTrade.ts deleted file mode 100644 index 8ec6d981a2..0000000000 --- a/examples/cactus-example-electricity-trade/BusinessLogicElectricityTrade.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * BusinessLogicElectricityTrade.ts - */ - -import type { Request } from "express"; -import { RequestInfo } from "./RequestInfo"; -import { MeterManagement } from "./MeterManagement"; -import { MeterInfo } from "./MeterInfo"; -import { - BusinessLogicBase, - json2str, - ConfigUtil, -} from "@hyperledger/cactus-common-example-server"; -import { sendEthereumTransaction } from "./TransactionEthereum"; - -const config: any = ConfigUtil.getConfig() as any; -import { getLogger } from "log4js"; -import { getSawtoothApiClient } from "./sawtooth-connector"; -import { - isWatchBlocksV1CactiTransactionsResponse, - WatchBlocksV1ListenerType, - WatchBlocksV1Progress, -} from "@hyperledger/cactus-plugin-ledger-connector-sawtooth"; - -const moduleName = "BusinessLogicElectricityTrade"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class BusinessLogicElectricityTrade extends BusinessLogicBase { - businessLogicID: string; - meterManagement: MeterManagement; - - constructor(businessLogicID: string) { - super(); - this.businessLogicID = businessLogicID; - this.meterManagement = new MeterManagement(); - } - - startTransaction( - req: Request, - businessLogicID: string, - tradeID: string, - ): void { - logger.debug("called startTransaction()"); - - // set RequestInfo - const requestInfo: RequestInfo = new RequestInfo(); - requestInfo.businessLogicID = businessLogicID; - - // set TradeID - requestInfo.setTradeID(tradeID); - - this.startSawtoothMonitor(); - } - - startSawtoothMonitor(): void { - // Start monitoring - const sawtoothApiClient = getSawtoothApiClient(); - const watchObservable = sawtoothApiClient.watchBlocksV1({ - type: WatchBlocksV1ListenerType.CactiTransactions, - txFilterBy: { - family_name: config.electricityTradeInfo.sawtooth.filterKey, - }, - }); - watchObservable.subscribe({ - next: (event: WatchBlocksV1Progress) => { - logger.debug(`##in onEventSawtooth()`); - - if (!isWatchBlocksV1CactiTransactionsResponse(event)) { - logger.error("Wrong input block format!", event); - return; - } - - for (const tx of event.cactiTransactionsEvents) { - try { - const txId = tx.header_signature; - logger.debug(`##txId = ${txId}`); - - const txPayload = tx.payload_decoded[0]; - if (txPayload && txPayload.Verb !== "set") { - this.remittanceTransaction({ - Name: txPayload.Name, - Value: txPayload.Value, - Verb: txPayload.Verb, - }); - } - } catch (err) { - logger.error( - `##onEventSawtooth(): onEvent, err: ${err}, event: ${JSON.stringify( - tx, - )}`, - tx, - ); - } - } - }, - error(err: unknown) { - logger.error("Sawtooth watchBlocksV1() error:", err); - }, - }); - } - - remittanceTransaction(transactionSubset: Record): void { - logger.debug( - `called remittanceTransaction(), accountInfo = ${json2str( - transactionSubset, - )}`, - ); - - const accountInfo = this.getAccountInfo(transactionSubset); - if (Object.keys(accountInfo).length === 0) { - logger.debug(`remittanceTransaction(): skip (No target meter)`); - return; - } - - logger.debug( - `##remittanceTransaction(): businessLogicID: ${this.businessLogicID}`, - ); - sendEthereumTransaction( - { - to: accountInfo["toAddress"], - value: Number(transactionSubset["Value"]), - gasLimit: config.electricityTradeInfo.ethereum.gas, - }, - accountInfo["fromAddress"], - accountInfo["fromAddressPkey"], - ) - .then((result) => { - logger.info( - "remittanceTransaction txId : " + - result.transactionReceipt.transactionHash, - ); - logger.debug(`##remittanceTransaction sendAsyncRequest finish`); - }) - .catch((err) => { - logger.error("sendEthereumTransaction remittance ERROR:", err); - }); - } - - onEvent(): void { - logger.error( - "onEvent() ERROR - No monitors are running, should not be called!", - ); - return; - } - - getOperationStatus(): Record { - logger.debug(`##in getOperationStatus()`); - return {}; - } - - getAccountInfo( - transactionSubset: Record, - ): Record { - const transactionInfo: Record = {}; - - // Get Meter Information. - const meterInfo: MeterInfo | null = this.meterManagement.getMeterInfo( - transactionSubset["Name"], - ); - if (meterInfo === null) { - logger.debug(`Not registered. meterID = ${transactionSubset["Name"]}`); - return transactionInfo; - } - - logger.debug(`getAccountInfo(): Verb = ${transactionSubset["Verb"]}`); - if (transactionSubset["Verb"] === "inc") { - logger.debug("getAccountInfo(): Verb = inc"); - transactionInfo["fromAddress"] = "0x" + meterInfo.bankAccount; - transactionInfo["fromAddressPkey"] = meterInfo.bankAccountPKey; - transactionInfo["toAddress"] = "0x" + meterInfo.powerCompanyAccount; - } - - return transactionInfo; - } - - setConfig(meterParams: string[]): Record { - logger.debug("called setConfig()"); - - // add MeterInfo - const meterInfo = new MeterInfo(meterParams); - const result = this.meterManagement.addMeterInfo(meterInfo); - return result; - } -} diff --git a/examples/cactus-example-electricity-trade/CHANGELOG.md b/examples/cactus-example-electricity-trade/CHANGELOG.md deleted file mode 100644 index cbf5fd17a5..0000000000 --- a/examples/cactus-example-electricity-trade/CHANGELOG.md +++ /dev/null @@ -1,126 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger-cacti/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-example-electricity-trade - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-electricity-trade - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -### Features - -* **cmd-socketio-server:** move to examples as deprecated ([4de8069](https://github.com/hyperledger/cacti/commit/4de806974f0066359cca422561042a55173d3655)) - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-electricity-trade - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-electricity-trade - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **cactus-example-discounted-asset-trade:** use openapi ethereum connector ([dcaf9fe](https://github.com/hyperledger/cacti/commit/dcaf9fe5de5b830975f3d308f140eff32d3cb79d)), closes [#2645](https://github.com/hyperledger/cacti/issues/2645) -* **cactus-example-discounted-asset-trade:** use openapi sawtooth connector ([86d6b38](https://github.com/hyperledger/cacti/commit/86d6b38e213a5304799beab48bdd46a8fc0cc0c3)), closes [#2825](https://github.com/hyperledger/cacti/issues/2825) -* **cactus-example-electricity-trade:** use openapi ethereum connector ([9e66850](https://github.com/hyperledger/cacti/commit/9e66850438c97883a8999c3def36e807bfbb1a76)) -* **cactus-plugin-ledger-connector-ethereum:** add signing utils ([84c5b34](https://github.com/hyperledger/cacti/commit/84c5b34afa73b4f906e413c4d5dd3ff46a1dd7a8)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** the CVE-2022-2421 - upgrade socket.io-parser to >=4.2.1 ([9172172](https://github.com/hyperledger/cacti/commit/917217227a3fa53a00429f047cd6318862e6ab8d)), closes [#2229](https://github.com/hyperledger/cacti/issues/2229) [#2228](https://github.com/hyperledger/cacti/issues/2228) -* **security:** upgrade fabric 2.x deps to 2.2.18 ([36988a5](https://github.com/hyperledger/cacti/commit/36988a5edbf9856a1bcc960a3b9afe443536733e)), closes [#2610](https://github.com/hyperledger/cacti/issues/2610) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-electricity-trade - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-electricity-trade - -# [1.2.0](https://github.com/hyperledger/cacti/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-example-electricity-trade - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-electricity-trade - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-electricity-trade - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-electricity-trade - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Bug Fixes - -* **cactus-example-electricity-trade:** enable tsconfig strict flag an… ([f7e726c](https://github.com/hyperledger/cactus/commit/f7e726c2720ed21bc4a582f6c4f345d0b2c65af7)), closes [#2144](https://github.com/hyperledger/cactus/issues/2144) - -### Code Refactoring - -* **examples:** include sample apps in monorepo build ([51ac163](https://github.com/hyperledger/cactus/commit/51ac1630f53ca3ac881341c7f8847b6ae581b220)) - -### Features - -* **sawtooth-ledger:** add single sawtooth test ledger image ([cd4c746](https://github.com/hyperledger/cactus/commit/cd4c7460f6e005ce56a0d79edea6f609756bf9d5)), closes [#2108](https://github.com/hyperledger/cactus/issues/2108) [#2030](https://github.com/hyperledger/cactus/issues/2030) -* **secret:** remove Validator/Verifier secret keys from repository ([59b4af4](https://github.com/hyperledger/cactus/commit/59b4af44835e2babafe398040a280ed23e9b490e)) - -### BREAKING CHANGES - -* **examples:** 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 diff --git a/examples/cactus-example-electricity-trade/Dockerfile b/examples/cactus-example-electricity-trade/Dockerfile deleted file mode 100644 index 364ad22c1f..0000000000 --- a/examples/cactus-example-electricity-trade/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM cactus-common-example-server:latest - -ARG NPM_PKG_VERSION=latest - -ENV APP_HOME=/root/cactus - -WORKDIR ${APP_HOME} - -COPY ./dist/yarn.lock ./package.json ./ -RUN yarn add "${CACTUS_CMD_SOCKETIO_PATH}" "@hyperledger/cactus-verifier-client@${NPM_PKG_VERSION}" \ - --production --ignore-engines --non-interactive --cache-folder ./.yarnCache && \ - rm -rf ./.yarnCache - -COPY ./dist ./dist/ - -CMD ["node", "./dist/www.js"] diff --git a/examples/cactus-example-electricity-trade/MeterInfo.ts b/examples/cactus-example-electricity-trade/MeterInfo.ts deleted file mode 100644 index e598b81d16..0000000000 --- a/examples/cactus-example-electricity-trade/MeterInfo.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * MeterInfo.ts - */ - -export class MeterInfo { - meterID: string; - bankAccount: string; - bankAccountPKey: string; - powerCompanyAccount: string; - - constructor(meterParams: string[]) { - this.meterID = meterParams[0]; - this.bankAccount = meterParams[1]; - this.bankAccountPKey = meterParams[2]; - this.powerCompanyAccount = meterParams[3]; - } -} diff --git a/examples/cactus-example-electricity-trade/MeterManagement.ts b/examples/cactus-example-electricity-trade/MeterManagement.ts deleted file mode 100644 index f04b2d659f..0000000000 --- a/examples/cactus-example-electricity-trade/MeterManagement.ts +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * MeterManagement.ts - */ - -import { MeterInfo } from "./MeterInfo"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -const fs = require("fs"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "MeterManagement"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -// Meter Management Class -export class MeterManagement { - fileName = "MeterInfo.json"; - - constructor() { - // do nothing. - } - - // For debugging - fileDump(): void { - const confirmData: string = fs.readFileSync(this.fileName, "utf8"); - const arrayData: MeterInfo[] = JSON.parse(confirmData).table as MeterInfo[]; - logger.debug(arrayData); - } - - addMeterInfo(addMeterInfo: MeterInfo): Record { - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - // Creating an empty table file - const emptyTable = { - table: [], - }; - const emptyTableJson: string = JSON.stringify(emptyTable); - fs.writeFileSync(this.fileName, emptyTableJson, "utf8"); - } - - // Read table file - const meterInfoFileData: string = fs.readFileSync(this.fileName, "utf8"); - const meterInfoTable: string[] = JSON.parse(meterInfoFileData) - .table as string[]; - - // Search target records / replace data - const meterInfoTableNew: Record = { - table: [], - }; - let existFlag = false; - let action = ""; - meterInfoTable.forEach((meterInfoJSON) => { - const meterInfo: MeterInfo = JSON.parse(meterInfoJSON) as MeterInfo; - - // Determine if it is a target record - if (meterInfo.meterID === addMeterInfo.meterID) { - // Change Status - meterInfo.bankAccount = addMeterInfo.bankAccount; - meterInfo.bankAccountPKey = addMeterInfo.bankAccountPKey; - meterInfo.powerCompanyAccount = addMeterInfo.powerCompanyAccount; - existFlag = true; - action = "update"; - } - - // Register Record - const meterInfoNewJson: string = JSON.stringify(meterInfo); - // logger.debug(`meter info = ${meterInfoNewJson}`); - meterInfoTableNew.table.push(meterInfoNewJson); - }); - if (existFlag === false) { - const addMeterInfoJson: string = JSON.stringify(addMeterInfo); - logger.debug(`add meter info = ${addMeterInfoJson}`); - meterInfoTableNew.table.push(addMeterInfoJson); - action = "add"; - } - - // Table File Write - const meterInfoTableNewJson: string = JSON.stringify(meterInfoTableNew); - fs.writeFileSync(this.fileName, meterInfoTableNewJson, "utf8"); - - // this.fileDump(); - - const result = { - action: action, - meterID: addMeterInfo.meterID, - }; - return result; - } - - getMeterInfo(meterID: string): MeterInfo | null { - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - throw err; - } - - // Read table file - const meterInfoFileData: string = fs.readFileSync(this.fileName, "utf8"); - const meterInfoTable: string[] = JSON.parse(meterInfoFileData) - .table as string[]; - - // Search target records - let retMeterInfo: MeterInfo | null = null; - meterInfoTable.forEach((meterInfoJSON) => { - const meterInfo: MeterInfo = JSON.parse(meterInfoJSON) as MeterInfo; - - // Determine if it is a target record - if (meterInfo.meterID === meterID) { - retMeterInfo = meterInfo; - return; - } - }); - - return retMeterInfo; - } - - /* - setStatus(tradeInfo: TradeInfo, status: CartradeStatus) { - - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - throw err; - } - - // Read table file - const fileData: string = fs.readFileSync(this.fileName, 'utf8'); - const transactionInfoTable: string[] = JSON.parse(fileData).table as string[]; - - // Search target records / replace data - const transactionInfoTableNew = { - table: [] - }; - transactionInfoTable.forEach((transactionInfoJSON, index) => { - const transactionInfo: TransactionInfo = JSON.parse(transactionInfoJSON) as TransactionInfo; - - // Determine if it is a target record - if (transactionInfo.businessLogicID === tradeInfo.businessLogicID && transactionInfo.tradeID === tradeInfo.tradeID) { - // Change Status - transactionInfo.status = status; - } - - // Register Record - const transactionInfoJson: string = JSON.stringify(transactionInfo); - transactionInfoTableNew.table.push(transactionInfoJson); - }); - - // Table File Write - const transactionInfoTableNewJson: string = JSON.stringify(transactionInfoTableNew); - fs.writeFileSync(this.fileName, transactionInfoTableNewJson, 'utf8'); - - this.fileDump(); - } - - setTransactionData(tradeInfo: TradeInfo, transactionData: TransactionData) { - - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - throw err; - } - - // Read table file - const fileData: string = fs.readFileSync(this.fileName, 'utf8'); - const transactionInfoTable: string[] = JSON.parse(fileData).table as string[]; - - // Search target records / replace data - const transactionInfoTableNew = { - table: [] - }; - transactionInfoTable.forEach((transactionInfoJSON, index) => { - const transactionInfo: TransactionInfo = JSON.parse(transactionInfoJSON) as TransactionInfo; - - // Determine if it is a target record - if (transactionInfo.businessLogicID === tradeInfo.businessLogicID && transactionInfo.tradeID === tradeInfo.tradeID) { - - // Determine if it is the target transaction - if (transactionData.target === "escrow") { - // escrow: dataset - transactionInfo.escrowLedger = transactionData.ledger; - transactionInfo.escrowTxID = transactionData.txID; - } - else if (transactionData.target === "transfer") { - // transfer: dataset - transactionInfo.transferLedger = transactionData.ledger; - transactionInfo.transferTxID = transactionData.txID; - } - else if (transactionData.target === "settlement") { - // settlement: dataset - transactionInfo.settlementLedger = transactionData.ledger; - transactionInfo.settlementTxID = transactionData.txID; - } - - } - - // Register Record - const transactionInfoJson: string = JSON.stringify(transactionInfo); - transactionInfoTableNew.table.push(transactionInfoJson); - }); - - // Table File Write - const transactionInfoTableNewJson: string = JSON.stringify(transactionInfoTableNew); - fs.writeFileSync(this.fileName, transactionInfoTableNewJson, 'utf8'); - - this.fileDump(); - } - - setTxInfo(tradeInfo: TradeInfo, txInfoData: TxInfoData) { - - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - throw err; - } - - // Read table file - const fileData: string = fs.readFileSync(this.fileName, 'utf8'); - const transactionInfoTable: string[] = JSON.parse(fileData).table as string[]; - - // Search target records / replace data - const transactionInfoTableNew = { - table: [] - }; - transactionInfoTable.forEach((transactionInfoJSON, index) => { - const transactionInfo: TransactionInfo = JSON.parse(transactionInfoJSON) as TransactionInfo; - - // Determine if it is a target record - if (transactionInfo.businessLogicID === tradeInfo.businessLogicID && transactionInfo.tradeID === tradeInfo.tradeID) { - - // Determine if it is the target transaction - if (txInfoData.target === "escrow") { - // escrow: dataset - transactionInfo.escrowTxInfo = txInfoData.txInfo; - } - else if (txInfoData.target === "transfer") { - // transfer: dataset - transactionInfo.transferTxInfo = txInfoData.txInfo; - } - else if (txInfoData.target === "settlement") { - // settlement: dataset - transactionInfo.settlementTxInfo = txInfoData.txInfo; - } - - } - - // Register Record - const transactionInfoJson: string = JSON.stringify(transactionInfo); - transactionInfoTableNew.table.push(transactionInfoJson); - }); - - // Table File Write - const transactionInfoTableNewJson: string = JSON.stringify(transactionInfoTableNew); - fs.writeFileSync(this.fileName, transactionInfoTableNewJson, 'utf8'); - - this.fileDump(); - } -*/ - /** - * Get transaction data corresponding to the specified txId. - * (*Return if any of escrowTxID, transferTxID, settlementTxID matches txId) - * - * @return Transaction data corresponding to txId. Returns null if it does not exist. - * - */ - /* - getTransactionInfoByTxId(txId: string): TransactionInfo { - - // Existence check of table file - try { - fs.statSync(this.fileName); - } catch (err) { - throw err; - } - - // Read table file - const fileData: string = fs.readFileSync(this.fileName, 'utf8'); - const transactionInfoTable: string[] = JSON.parse(fileData).table as string[]; - - // Search target records - const transactionInfoTableNew = { - table: [] - }; - let retTransactionInfo: TransactionInfo | null = null; - transactionInfoTable.forEach((transactionInfoJSON, index) => { - const transactionInfo: TransactionInfo = JSON.parse(transactionInfoJSON) as TransactionInfo; - - // Determine if it is a target record - if (transactionInfo.escrowTxID === txId || transactionInfo.transferTxID === txId || transactionInfo.settlementTxID === txId) { - retTransactionInfo = transactionInfo; - return; - } - }); - - return retTransactionInfo; - } -*/ -} diff --git a/examples/cactus-example-electricity-trade/README.md b/examples/cactus-example-electricity-trade/README.md deleted file mode 100644 index 328a0d8ae0..0000000000 --- a/examples/cactus-example-electricity-trade/README.md +++ /dev/null @@ -1,163 +0,0 @@ -# Cactus electricity-trade - -## Abstract - -Cactus **electricity-trade** is a sample application for exchanging electricity (which is measured by a device that is logging to a Sawtooth blockchain) for ETH currency on a private Ethereum blockchain. When the measuring device detects power usage, a Sawtooth transaction triggers a Cactus LedgerEvent to pay the device user's currency on the Ethereum blockchain, where the amount paid is proportional to the amount of power usage recorded on the Sawtooth blockchain. -In this example, we use the Sawtooth intkey transaction processor as an application for power measurement logging. - -![electricity-trade image](./images/electricity-trade-image.png) - -## Required software components - -- OS: Linux (recommend: Ubuntu18.04 or CentOS7) -- Docker (recommend: v17.06.2-ce or greater) -- Docker-compose (recommend: v1.14.0 or greater) -- node.js v12 (recommend: v12.20.2 or greater) - -## Prerequisites - -- Available directory (This directory must be empty): - - `./etc/cactus`: the directory for storing the config files of `cactus-common-example-server`, will be mounted by the containers. - -## Setup - -1. Configure Cactus: - - ``` - # execute in root cactus dir - pushd ../.. - npm run configure - popd - ``` - -1. Start the ledgers: - - ``` - ./script-start-ledgers.sh - ``` - - - This script will start all ledger docker containers, networks, and will setup configuration needed to operate the sample app. - - (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 the following containers: - - `sawtooth_all_in_one_ledger_1x` - - `geth1` - -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 - # or - npm run start - ``` - - This will build and launch all needed containers, the final output should look like this: - - ``` - cmd-socketio-base-dummy | OK - Exit - cmd-socketio-base-dummy exited with code 0 - 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 - ``` - -### Dockerless run - -For development purposes, it might be useful to run the sample application outside of docker-compose environment. - -1. Configure cactus and start the ledgers as described above. -1. Run `./script-dockerless-config-patch.sh` from `cactus-example-electricity-trade/` directory. This will patch the configs and copy it to global location. -1. Start electricity-trade: `npm run start-dockerless` - -## How to use this application - -- Source account on Ethereum: `06fc56347d91c6ad2dae0c3ba38eb12ab0d72e97` -- The privkey of source account on Ethereum: `cb5d48d371916a4ea1627189d8af4f642a5d72746a06b559780c3f5932658207` -- Destination account on Ethereum: `9d624f7995e8bd70251f8265f2f9f2b49f169c55` -- The key name of intkey on Sawtooth: `MI000001` - -1. (Optional) Check the balance on ethereum accounts and current electricity usage - - - `./script-get-app.sh` - - The result looks like the following (note there's no electricity usage yet so the output is empty): - - ``` - # Source Eth balance: - 100000 - - # Destination Eth balance: - 0 - - # Electricity usage - ``` - -1. Register an account information - - ``` - ./script-post-setup-request.sh - ``` - - ... or send request manually: - - ``` - curl localhost:5034/api/v1/bl/electricity-trade/meter/register/ -XPOST -H "Content-Type: application/json" -d '{"businessLogicID":"h40Q9eMD","meterParams":["MI000001", "06fc56347d91c6ad2dae0c3ba38eb12ab0d72e97", "cb5d48d371916a4ea1627189d8af4f642a5d72746a06b559780c3f5932658207", "9d624f7995e8bd70251f8265f2f9f2b49f169c55"]}' - ``` - -1. Start the electricity-trade application - - - The example response of tradeID: `{"tradeID":"20210220075755506-001"}` - - (Then, the application starts to monitor the Sawtooth blockchain) - - ``` - ./script-post-start-request.sh - ``` - - ... or send request manually: - - ``` - curl localhost:5034/api/v1/bl/electricity-trade/ -XPOST -H "Content-Type: application/json" -d '{"businessLogicID":"h40Q9eMD"}' - ``` - -1. Execute the intkey transaction on Sawtooth blockchain - - - `./script-gen-electricity-usage.sh` - - The result looks like the following: - - ``` - # Create intkey batch representing electricity usage - { - "link": "http://rest-api:8008/batch_statuses?id=4e85337e170917c138e4f7de44c85c9dea9c5e17916fded672b90adb85a07ca009002580f8629660e26e1117e9ac15f4c1164d9dc05fc77ac8e212672dc5e97a" - } - # Increase usage - { - "link": "http://rest-api:8008/batch_statuses?id=88b4dfa2128c7ad4b646b4fe6be878948f7c17651baf9c6384080a9eaae5036e219c432b46f74331a2d56b80bf2dcc94496ff261d1a941f23210d637badacf14" - } - ``` - -1. (Optional) Check the balance on Ethereum accounts using the following script (after `##remittanceTransaction sendAsyncRequest finish` is printed) - - - `./script-get-app.sh` - - The result looks like the following: - - ``` - # Source Eth balance: - 99976 - - # Destination Eth balance: - 24 - - # Electricity usage - MI000001: 74 - ``` - -## How to stop the application and cleanup Docker containers - -1. Press `Ctrl+C` in `docker-compose` console to stop the application. -1. Run cleanup script - ``` - sudo ./script-cleanup.sh - ``` diff --git a/examples/cactus-example-electricity-trade/RequestInfo.ts b/examples/cactus-example-electricity-trade/RequestInfo.ts deleted file mode 100644 index 741152fc06..0000000000 --- a/examples/cactus-example-electricity-trade/RequestInfo.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * RequestInfo.ts - */ - -// transaction information -class TradeInfo { - ethereumAccountA!: string; - ethereumAccountB!: string; -} - -// authorization information -class AuthInfo { - company!: string; -} - -// request information -export class RequestInfo { - businessLogicID!: string; - tradeID!: string; - tradeInfo: TradeInfo; - authInfo: AuthInfo; - constructor() { - this.tradeInfo = new TradeInfo(); - this.authInfo = new AuthInfo(); - } - - setTradeID(tradeID: string): void { - this.tradeID = tradeID; - } -} diff --git a/examples/cactus-example-electricity-trade/TransactionEthereum.ts b/examples/cactus-example-electricity-trade/TransactionEthereum.ts deleted file mode 100644 index 2232b7c107..0000000000 --- a/examples/cactus-example-electricity-trade/TransactionEthereum.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * transaction-ethereum.ts - */ - -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { - Web3SigningCredentialType, - signTransaction, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; - -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "TransactionEthereum"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const mapFromAddressNonce: Map = new Map(); - -import { getEthereumConnector } from "./ethereum-connector"; - -export async function sendEthereumTransaction( - transaction: any, - from: string, - privateKey: string, -) { - const connector = await getEthereumConnector(); - - if (!("nonce" in transaction)) { - const nonce = await getNewNonce(from); - transaction = { - ...transaction, - nonce, - }; - } - logger.debug("sendEthereumTransaction", transaction); - - const { serializedTransactionHex, txId } = signTransaction( - transaction, - privateKey, - { - name: config.signTxInfo.ethereum.chainName, - chainId: config.signTxInfo.ethereum.chainID, - networkId: config.signTxInfo.ethereum.networkID, - defaultHardfork: config.signTxInfo.ethereum.defaultHardfork, - }, - ); - logger.info("Sending ethereum transaction with ID", txId); - - return connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - transactionConfig: { - rawTransaction: serializedTransactionHex, - }, - }); -} - -export async function getNewNonce(fromAddress: string): Promise { - logger.info("Get current nonce for account", fromAddress); - const connector = await getEthereumConnector(); - - const nonceBigInt = (await connector.invokeRawWeb3EthMethod({ - methodName: "getTransactionCount", - params: [fromAddress], - })) as bigint; - let nonce = Number(nonceBigInt); - const latestNonce = mapFromAddressNonce.get(fromAddress); - - if (latestNonce && nonce <= latestNonce) { - // nonce correction - nonce = latestNonce + 1; - logger.debug( - `##getNewNonce(C): Adjust txnCount, fromAddress: ${fromAddress}, nonce: ${nonce}`, - ); - } - - logger.debug(`##getNewNonce(G): txnCountHex: ${nonce}`); - mapFromAddressNonce.set(fromAddress, nonce); - return nonce; -} - -export async function getAccountBalance(address: string): Promise { - logger.info("Get account balance", address); - const connector = await getEthereumConnector(); - - if (!address.toLowerCase().startsWith("0x")) { - address = "0x" + address; - logger.debug("Added hex prefix to address:", address); - } - - const balance = (await connector.invokeRawWeb3EthMethod({ - methodName: "getBalance", - params: [address], - })) as bigint; - return Number(balance); -} diff --git a/examples/cactus-example-electricity-trade/balance.ts b/examples/cactus-example-electricity-trade/balance.ts deleted file mode 100644 index 30e6de9438..0000000000 --- a/examples/cactus-example-electricity-trade/balance.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2020-2023 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * balance.ts - */ - -import { Router, NextFunction, Request, Response } from "express"; -import { - ConfigUtil, - RIFError, -} from "@hyperledger/cactus-common-example-server"; - -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -import { getAccountBalance } from "./TransactionEthereum"; -const moduleName = "balance"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const router: Router = Router(); - -/* GET balance. */ -router.get("/:account", (req: Request, res: Response, next: NextFunction) => { - try { - getAccountBalance(req.params.account) - .then((result) => { - logger.debug(`#####[sample/balance.ts]`); - logger.debug("result(getBalance) = " + result); - res.status(200).json(result); - }) - .catch((err) => { - logger.error(err); - }); - } catch (err) { - if (err instanceof Error) { - 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 balance: ${err}`); - next(err); - } -}); - -export default router; diff --git a/examples/cactus-example-electricity-trade/config/contractInfo.yaml b/examples/cactus-example-electricity-trade/config/contractInfo.yaml deleted file mode 100644 index 5bcb340a4f..0000000000 --- a/examples/cactus-example-electricity-trade/config/contractInfo.yaml +++ /dev/null @@ -1 +0,0 @@ -contractInfo: [] \ No newline at end of file diff --git a/examples/cactus-example-electricity-trade/config/default.yaml b/examples/cactus-example-electricity-trade/config/default.yaml deleted file mode 120000 index f9fc00051f..0000000000 --- a/examples/cactus-example-electricity-trade/config/default.yaml +++ /dev/null @@ -1 +0,0 @@ -../../cactus-common-example-server/config/default.yaml \ No newline at end of file diff --git a/examples/cactus-example-electricity-trade/config/usersetting.yaml b/examples/cactus-example-electricity-trade/config/usersetting.yaml deleted file mode 100644 index 2f10609451..0000000000 --- a/examples/cactus-example-electricity-trade/config/usersetting.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# Overwrite defaults -blpRegistry: - - - businessLogicID: h40Q9eMD - validatorID: [] - -logLevel: debug - -signTxInfo: - ethereum: - chainName: geth1 - networkID: 10 - chainID: 10 - defaultHardfork: petersburg - -appRouters: - - - path: /api/v1/bl/electricity-trade/ - routerJs: /root/cactus/dist/electricity-trade.js - - - path: /api/v1/bl/balance/ - routerJs: /root/cactus/dist/balance.js - -# BLP Config -electricityTradeInfo: - sawtooth: - filterKey: intkey - restApiURL: http://localhost:8008 - ethereum: - gethURL: ws://localhost:8546 - chainName: geth1 - networkID: 10 - chainID: 10 - network: mainnet - hardfork: petersburg - gas: 21000 diff --git a/examples/cactus-example-electricity-trade/docker-compose.debug.yml b/examples/cactus-example-electricity-trade/docker-compose.debug.yml deleted file mode 100644 index bd8f1b63a9..0000000000 --- a/examples/cactus-example-electricity-trade/docker-compose.debug.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: "3.4" - -# Use: docker-compose -f docker-compose.yml -f docker-compose.debug.yml up - -services: - cactus-example-electricity-trade-blp: - ports: - - "9034:9034" - command: node --inspect=0.0.0.0:9034 ./dist/www.js diff --git a/examples/cactus-example-electricity-trade/docker-compose.yml b/examples/cactus-example-electricity-trade/docker-compose.yml deleted file mode 100644 index 78c3b8ca38..0000000000 --- a/examples/cactus-example-electricity-trade/docker-compose.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: "3.4" - -# Start the ledgers first -# ./etc/cactus should already exist and contain cactus node configs - -services: - common-server-base-image: - # Build base image and immediately exit - container_name: cmd-socketio-base-dummy - image: cactus-common-example-server - build: - context: ../../packages/cactus-common-example-server/ - command: ["echo", "OK - Exit"] - - cactus-example-electricity-trade-blp: - container_name: cactus-example-electricity-trade-blp - image: cactus-example-electricity-trade-blp - build: - context: . - ports: - - "5034:5034" - networks: - - cactus-example-electricity-trade-net - depends_on: - - cmd-socketio-base-image - volumes: - - type: bind - source: ./etc/cactus - target: /etc/cactus - -networks: - cactus-example-electricity-trade-net: - driver: bridge diff --git a/examples/cactus-example-electricity-trade/electricity-trade.ts b/examples/cactus-example-electricity-trade/electricity-trade.ts deleted file mode 100644 index 2746e0252d..0000000000 --- a/examples/cactus-example-electricity-trade/electricity-trade.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * electricity-trade.ts - */ - -import { Router, NextFunction, Request, Response } from "express"; -import { - TransactionManagement, - RIFError, - ConfigUtil, -} from "@hyperledger/cactus-common-example-server"; -import escapeHtml from "escape-html"; - -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "trades"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const router: Router = Router(); -export const transactionManagement: TransactionManagement = - new TransactionManagement(); - -// Request Execution of Trade -router.post("/", (req: Request, res: Response, next: NextFunction) => { - try { - const tradeID = transactionManagement.startBusinessLogic(req); - if (!tradeID) { - throw new RIFError(`Could not run BLP, tradeId = ${tradeID}`); - } - const result = { tradeID: tradeID }; - res.status(200).json(result); - } catch (err) { - if (err instanceof RIFError) { - res.status(err.statusCode); - res.send(escapeHtml(err.message)); - return; - } - - next(err); - } -}); - -// Request Execution of Trade -router.post( - "/meter/register/", - (req: Request, res: Response, next: NextFunction) => { - try { - const result = transactionManagement.setBusinessLogicConfig(req) as any; - - if (!result) { - throw new RIFError("Error when running setBusinessLogicConfig"); - } - - let status = 200; - - if (result["action"] === "add") { - status = 201; - } - res.status(status).json(result); - } catch (err) { - if (err instanceof RIFError) { - res.status(err.statusCode); - res.send(escapeHtml(err.message)); - return; - } - - next(err); - } - }, -); - -export default router; diff --git a/examples/cactus-example-electricity-trade/ethereum-connector.ts b/examples/cactus-example-electricity-trade/ethereum-connector.ts deleted file mode 100644 index 8003111c90..0000000000 --- a/examples/cactus-example-electricity-trade/ethereum-connector.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { IListenOptions, Servers } from "@hyperledger/cactus-common"; -import { Constants, Configuration } from "@hyperledger/cactus-core-api"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { - PluginLedgerConnectorEthereum, - EthereumApiClient, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import http from "http"; -import express from "express"; -import bodyParser from "body-parser"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { getLogger } from "log4js"; -import { Server as SocketIoServer } from "socket.io"; - -const config: any = ConfigUtil.getConfig(); -const moduleName = "ethereum-connector"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const keychainId = uuidv4(); - -// Single Ethereum connector instance -let ethereumConnectorPlugin: PluginLedgerConnectorEthereum | undefined = - undefined; -let ethereumApiClient: EthereumApiClient | undefined = undefined; - -async function createEthereumConnector() { - if (ethereumConnectorPlugin) { - ethereumConnectorPlugin.shutdown(); - ethereumConnectorPlugin = undefined; - } - - // Create empty Keychain Plugin - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - logLevel: config.logLevel, - backend: new Map(), - }); - - ethereumConnectorPlugin = new PluginLedgerConnectorEthereum({ - instanceId: `ethElectricityTrade-${uuidv4()}`, - rpcApiWsHost: config.electricityTradeInfo.ethereum.gethURL, - logLevel: config.logLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await ethereumConnectorPlugin.onPluginInit(); - - // Run http server - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const connectorServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: connectorServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const apiHost = `http://${addressInfo.address}:${addressInfo.port}`; - - // Run socketio server - const socketioServer = new SocketIoServer(connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - // Register services - await ethereumConnectorPlugin.getOrCreateWebServices(); - await ethereumConnectorPlugin.registerWebServices(expressApp, socketioServer); - - // Create ApiClient - const apiConfig = new Configuration({ basePath: apiHost }); - ethereumApiClient = new EthereumApiClient(apiConfig); -} - -/** - * Get latest block data. Can be used to test ethereum connection. - */ -async function getLatestBlock(): Promise { - if (!ethereumConnectorPlugin) { - throw new Error("getLatestBlock() called before initEthereumConnector()!"); - } - - return ethereumConnectorPlugin.invokeRawWeb3EthMethod({ - methodName: "getBlock", - params: ["latest"], - }); -} - -/** - * Create ethereum connector and check if connection can be established - */ -export async function initEthereumConnector(): Promise { - if (!ethereumConnectorPlugin) { - await createEthereumConnector(); - - const latestBlockResponse = await getLatestBlock(); - if (!latestBlockResponse.hash) { - throw new Error( - `Invalid getLatestBlock response: ${latestBlockResponse}`, - ); - } - - logger.info("initEthereumConnector() done."); - } else { - logger.info( - "initEthereumConnector() Ethereum connector already initialized", - ); - } -} - -/** - * Get instance of ethereum connector, initialize it if not done yet. - */ -export async function getEthereumConnector(): Promise { - if (!ethereumConnectorPlugin) { - await initEthereumConnector(); - } - - if (ethereumConnectorPlugin) { - return ethereumConnectorPlugin; - } else { - throw new Error("Could not initialize new ethereum connector!"); - } -} - -/** - * Get instance of ethereum api client. - */ -export function getEthereumApiClient(): EthereumApiClient { - if (ethereumApiClient) { - return ethereumApiClient; - } else { - throw new Error("Ethereum connector not initialized yet!"); - } -} diff --git a/examples/cactus-example-electricity-trade/images/electricity-trade-image.png b/examples/cactus-example-electricity-trade/images/electricity-trade-image.png deleted file mode 100644 index 4fa9881524..0000000000 Binary files a/examples/cactus-example-electricity-trade/images/electricity-trade-image.png and /dev/null differ diff --git a/examples/cactus-example-electricity-trade/images/electricity-trade-image.pptx b/examples/cactus-example-electricity-trade/images/electricity-trade-image.pptx deleted file mode 100644 index 8bca95d476..0000000000 Binary files a/examples/cactus-example-electricity-trade/images/electricity-trade-image.pptx and /dev/null differ diff --git a/examples/cactus-example-electricity-trade/package.json b/examples/cactus-example-electricity-trade/package.json deleted file mode 100644 index 2898d98b6b..0000000000 --- a/examples/cactus-example-electricity-trade/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "@hyperledger/cactus-example-electricity-trade", - "version": "2.0.0", - "private": true, - "license": "Apache-2.0", - "main": "dist/www.js", - "module": "dist/www.js", - "types": "dist/www.d.ts", - "scripts": { - "build": "npm run build-ts && npm run build:dev:backend:postbuild", - "build-ts": "tsc", - "build:dev:backend:postbuild": "cp -f ../../yarn.lock ./dist/", - "start": "docker-compose build && docker-compose up", - "start-dockerless": "node ./dist/www.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-common-example-server": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-sawtooth": "2.0.0", - "@types/node": "18.11.9", - "body-parser": "1.20.3", - "cookie-parser": "1.4.6", - "debug": "3.1.0", - "escape-html": "1.0.3", - "ethereumjs-common": "1.5.2", - "ethereumjs-tx": "2.1.2", - "express": "4.21.0", - "fabric-ca-client": "2.2.20", - "fabric-network": "2.2.20", - "http-errors": "1.6.3", - "js-yaml": "3.14.1", - "jsonwebtoken": "9.0.2", - "log4js": "6.4.0", - "morgan": "1.9.1", - "shelljs": "0.8.5", - "socket.io": "4.6.2", - "ts-node": "8.9.1", - "uuid": "10.0.0", - "web3": "1.8.1", - "xmlhttprequest": "1.8.0" - }, - "devDependencies": { - "@types/escape-html": "1.0.1", - "@types/express": "5.0.0", - "@types/uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - } -} diff --git a/examples/cactus-example-electricity-trade/sawtooth-connector.ts b/examples/cactus-example-electricity-trade/sawtooth-connector.ts deleted file mode 100644 index dd353e02eb..0000000000 --- a/examples/cactus-example-electricity-trade/sawtooth-connector.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { IListenOptions, Servers } from "@hyperledger/cactus-common"; -import { Constants, Configuration } from "@hyperledger/cactus-core-api"; -import { ConfigUtil } from "@hyperledger/cactus-common-example-server"; -import { - PluginLedgerConnectorSawtooth, - SawtoothApiClient, - StatusResponseV1, -} from "@hyperledger/cactus-plugin-ledger-connector-sawtooth"; - -import http from "http"; -import express from "express"; -import bodyParser from "body-parser"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { getLogger } from "log4js"; -import { Server as SocketIoServer } from "socket.io"; - -const config: any = ConfigUtil.getConfig(); -const moduleName = "sawtooth-connector"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -// Single Sawtooth connector instance -let sawtoothConnectorPlugin: PluginLedgerConnectorSawtooth | undefined = - undefined; -let sawtoothApiClient: SawtoothApiClient | undefined = undefined; - -async function createSawtoothConnector() { - if (sawtoothConnectorPlugin) { - sawtoothConnectorPlugin.shutdown(); - sawtoothConnectorPlugin = undefined; - } - - sawtoothConnectorPlugin = new PluginLedgerConnectorSawtooth({ - instanceId: `ethElectricityTrade-${uuidv4()}`, - sawtoothRestApiEndpoint: config.electricityTradeInfo.sawtooth.restApiURL, - logLevel: config.logLevel, - }); - - await sawtoothConnectorPlugin.onPluginInit(); - - // Run http server - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const connectorServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: connectorServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const apiHost = `http://${addressInfo.address}:${addressInfo.port}`; - - // Run socketio server - const socketioServer = new SocketIoServer(connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - // Register services - await sawtoothConnectorPlugin.getOrCreateWebServices(); - await sawtoothConnectorPlugin.registerWebServices(expressApp, socketioServer); - - // Create ApiClient - const apiConfig = new Configuration({ basePath: apiHost }); - sawtoothApiClient = new SawtoothApiClient(apiConfig); -} - -/** - * Get latest block data. Can be used to test sawtooth connection. - */ -async function getStatus(): Promise { - if (!sawtoothConnectorPlugin) { - throw new Error("getLatestBlock() called before initSawtoothConnector()!"); - } - - return sawtoothConnectorPlugin.getStatus(); -} - -/** - * Create sawtooth connector and check if connection can be established - */ -export async function initSawtoothConnector(): Promise { - if (!sawtoothConnectorPlugin) { - await createSawtoothConnector(); - - const connectorStatus = await getStatus(); - if (!connectorStatus.initialized) { - throw new Error(`Invalid getLatestBlock response: ${connectorStatus}`); - } - - logger.info("initSawtoothConnector() done."); - } else { - logger.info( - "initSawtoothConnector() Sawtooth connector already initialized", - ); - } -} - -/** - * Get instance of sawtooth connector, initialize it if not done yet. - */ -export async function getSawtoothConnector(): Promise { - if (!sawtoothConnectorPlugin) { - await initSawtoothConnector(); - } - - if (sawtoothConnectorPlugin) { - return sawtoothConnectorPlugin; - } else { - throw new Error("Could not initialize new sawtooth connector!"); - } -} - -/** - * Get instance of sawtooth api client. - */ -export function getSawtoothApiClient(): SawtoothApiClient { - if (sawtoothApiClient) { - return sawtoothApiClient; - } else { - throw new Error("Sawtooth connector not initialized yet!"); - } -} diff --git a/examples/cactus-example-electricity-trade/script-cleanup.sh b/examples/cactus-example-electricity-trade/script-cleanup.sh deleted file mode 100755 index 4858d55cd7..0000000000 --- a/examples/cactus-example-electricity-trade/script-cleanup.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -echo ">> Remove the config files on your machine" -rm -rf ./etc/cactus/ - -echo ">> Stop and remove the docker containers" -docker rm -f sawtooth_all_in_one_ledger_1x \ - geth1 \ - cactus-example-electricity-trade-blp \ - cactus-example-electricity-trade-ethereum-validator \ - cactus-example-electricity-trade-sawtooth-validator \ - cmd-socketio-base-dummy \ - $(docker container ls -q --all --filter name=geth-testnet_init-chain) - -echo ">> Remove docker networks" -docker network rm sawtooth_aio_testnet_1x \ - cactus-example-electricity-trade_default \ - cactus-example-electricity-trade_cactus-example-electricity-trade-net \ - geth1net \ - geth-testnet_default - -echo ">> Remove geth files" -pushd ../../tools/docker/geth-testnet/ -rm -fr ./data-geth1/geth/ -popd - -echo "Cleanup done." diff --git a/examples/cactus-example-electricity-trade/script-dockerless-config-patch.sh b/examples/cactus-example-electricity-trade/script-dockerless-config-patch.sh deleted file mode 100755 index 8ee2d281e8..0000000000 --- a/examples/cactus-example-electricity-trade/script-dockerless-config-patch.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -COMMON_CACTUS_CONFIG="/etc/cactus/" - -echo "Note - script must executed from within cactus-example-electricity-trade directory!" - -echo "Copy local cactus config to common location ($COMMON_CACTUS_CONFIG)" -sudo rm -rf "$COMMON_CACTUS_CONFIG" -sudo cp -ar "./etc/cactus" "/etc" -sudo chown -hR $(whoami) "$COMMON_CACTUS_CONFIG" - -echo "Patch validator-registry-config.yaml..." -sed -i 's/ethereum-validator/localhost/g' "${COMMON_CACTUS_CONFIG}/validator-registry-config.yaml" -sed -i 's/sawtooth-validator/localhost/g' "${COMMON_CACTUS_CONFIG}/validator-registry-config.yaml" - -echo "Patch path to electricity-trade modules." -current_pwd=$(pwd) -escaped_pwd=${current_pwd//\//\\/} -sed -i "s/\/root\/cactus/$escaped_pwd/g" "${COMMON_CACTUS_CONFIG}/usersetting.yaml" - -echo "Done." diff --git a/examples/cactus-example-electricity-trade/script-gen-electricity-usage.sh b/examples/cactus-example-electricity-trade/script-gen-electricity-usage.sh deleted file mode 100755 index 85f51587e0..0000000000 --- a/examples/cactus-example-electricity-trade/script-gen-electricity-usage.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -echo "# Create intkey representing electricity usage" -docker exec -t sawtooth_all_in_one_ledger_1x shell intkey set MI000001 50 --url http://rest-api:8008 - -echo "# Increase usage" -docker exec -t sawtooth_all_in_one_ledger_1x shell intkey inc MI000001 24 --url http://rest-api:8008 diff --git a/examples/cactus-example-electricity-trade/script-get-app.sh b/examples/cactus-example-electricity-trade/script-get-app.sh deleted file mode 100755 index 1ac6f59cb2..0000000000 --- a/examples/cactus-example-electricity-trade/script-get-app.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -echo "# Source Eth balance:" -curl localhost:5034/api/v1/bl/balance/06fc56347d91c6ad2dae0c3ba38eb12ab0d72e97 - -echo -e "\n\n# Destination Eth balance:" -curl localhost:5034/api/v1/bl/balance/9d624f7995e8bd70251f8265f2f9f2b49f169c55 - -echo -e "\n\n# Electricity usage" -docker exec -t sawtooth_all_in_one_ledger_1x shell intkey list --url http://rest-api:8008 diff --git a/examples/cactus-example-electricity-trade/script-post-setup-request.sh b/examples/cactus-example-electricity-trade/script-post-setup-request.sh deleted file mode 100755 index 7851c4be4b..0000000000 --- a/examples/cactus-example-electricity-trade/script-post-setup-request.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -echo "Register electricity-trade account information" -curl localhost:5034/api/v1/bl/electricity-trade/meter/register/ -XPOST \ - -H "Content-Type: application/json" \ - -d '{"businessLogicID":"h40Q9eMD", - "meterParams":[ - "MI000001", - "06fc56347d91c6ad2dae0c3ba38eb12ab0d72e97", - "cb5d48d371916a4ea1627189d8af4f642a5d72746a06b559780c3f5932658207", - "9d624f7995e8bd70251f8265f2f9f2b49f169c55" - ] - }' diff --git a/examples/cactus-example-electricity-trade/script-post-start-request.sh b/examples/cactus-example-electricity-trade/script-post-start-request.sh deleted file mode 100755 index 99c084df76..0000000000 --- a/examples/cactus-example-electricity-trade/script-post-start-request.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -echo "Start electricity-trade" -curl localhost:5034/api/v1/bl/electricity-trade/ -XPOST -H "Content-Type: application/json" -d '{"businessLogicID":"h40Q9eMD"}' diff --git a/examples/cactus-example-electricity-trade/script-start-ledgers.sh b/examples/cactus-example-electricity-trade/script-start-ledgers.sh deleted file mode 100755 index 2db6dd4290..0000000000 --- a/examples/cactus-example-electricity-trade/script-start-ledgers.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -set -e - -ROOT_DIR="../.." # Path to cactus root dir -CONFIG_VOLUME_PATH="./etc/cactus" # Docker volume with shared configuration -WAIT_TIME=10 # How often to check container status - -export CACTUS_SAWTOOTH_LEDGER_CONTAINER_NAME="sawtooth_all_in_one_ledger_1x" - -# Cert options -CERT_CURVE_NAME="prime256v1" -CERT_COUNTRY="JP" -CERT_STATE="Tokyo" -CERT_LOCALITY="Minato-Ku" -CERT_ORG="CactusSamples" - -# generate_certificate -function generate_certificate() { - # Check OpenSSL command existance - if ! openssl version > /dev/null; then - echo "Could not execute [openssl version], check if OpenSSL tool is available on the system." - exit 1; - fi - - # Check input parameters - ARGS_NUMBER=2 - if [ "$#" -lt "$ARGS_NUMBER" ]; then - echo "generate_certificate called with wrong number of arguments (expected - $ARGS_NUMBER, actual - $#)"; - exit 2 - fi - - common_name=$1 - destination=$2 - subject="/C=$CERT_COUNTRY/ST=$CERT_STATE/L=$CERT_LOCALITY/O=$CERT_ORG/CN=$common_name" - echo "Create new cert in '${destination}' with subject '${subject}'" - - # Crete destination path - if [ ! -d "$destination" ]; then - echo "Re-create destination dir..." - rm -rf "$destination" - mkdir -p "$destination" - fi - - keyPath="${destination}/connector.priv" - csrPath="${destination}/connector.csr" - certPath="${destination}/connector.crt" - - # Generate keys - openssl ecparam -genkey -name "$CERT_CURVE_NAME" -out "$keyPath" - openssl req -new -sha256 -key "$keyPath" -out "$csrPath" -subj "$subject" - openssl req -x509 -sha256 -days 365 -key "$keyPath" -in "$csrPath" -out "$certPath" -} - -function start_ethereum_testnet() { - pushd "${ROOT_DIR}/tools/docker/geth-testnet" - ./script-start-docker.sh - popd -} - -function start_sawtooth_testnet() { - pushd "${ROOT_DIR}/tools/docker/sawtooth-all-in-one" - ./script-start-docker.sh - popd - - # Wait for fabric cotnainer to become healthy - health_status="$(docker inspect -f '{{.State.Health.Status}}' ${CACTUS_SAWTOOTH_LEDGER_CONTAINER_NAME})" - while ! [ "${health_status}" == "healthy" ] - do - echo "Waiting for sawtooth container... current status => ${health_status}" - sleep $WAIT_TIME - health_status="$(docker inspect -f '{{.State.Health.Status}}' ${CACTUS_SAWTOOTH_LEDGER_CONTAINER_NAME})" - done - echo ">> Sawtooth ${CACTUS_FABRIC_ALL_IN_ONE_VERSION} started." -} - -function start_ledgers() { - # Clear ./etc/cactus - mkdir -p "${CONFIG_VOLUME_PATH}/" - rm -fr ${CONFIG_VOLUME_PATH}/* - - # Copy cmd-socketio-config - cp -f ./config/*.yaml "${CONFIG_VOLUME_PATH}/" - - # Start Ethereum - start_ethereum_testnet - - # Start Sawtooth - start_sawtooth_testnet -} - -start_ledgers -echo "All Done." diff --git a/examples/cactus-example-electricity-trade/tools/transferNumericAsset/config/default.js b/examples/cactus-example-electricity-trade/tools/transferNumericAsset/config/default.js deleted file mode 100644 index 2827d3391c..0000000000 --- a/examples/cactus-example-electricity-trade/tools/transferNumericAsset/config/default.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * default.js - */ - -module.exports = { - // URL to validator - validatorUrl: "https://localhost:5050", - gethUrl: "http://localhost:8545", - - // forCustomChain - chainName: "geth1", - networkId: 10, - chainId: 10, -}; diff --git a/examples/cactus-example-electricity-trade/tools/transferNumericAsset/copyStaticAssets.ts b/examples/cactus-example-electricity-trade/tools/transferNumericAsset/copyStaticAssets.ts deleted file mode 100644 index 8aac76aa55..0000000000 --- a/examples/cactus-example-electricity-trade/tools/transferNumericAsset/copyStaticAssets.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * copyStaticAssets.ts - */ -import * as shell from "shelljs"; -shell.cp("config/default.js", "./dist/config"); diff --git a/examples/cactus-example-electricity-trade/tools/transferNumericAsset/package.json b/examples/cactus-example-electricity-trade/tools/transferNumericAsset/package.json deleted file mode 100644 index 9de21b10e8..0000000000 --- a/examples/cactus-example-electricity-trade/tools/transferNumericAsset/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "transferNumericAsset", - "version": "0.0.0", - "license": "Apache-2.0", - "private": true, - "scripts": { - "build": "npm run build-ts && npm run copy-static-assets", - "build-ts": "tsc", - "tslint": "tslint -c tslint.json -p tsconfig.json", - "copy-static-assets": "ts-node copyStaticAssets.ts" - }, - "dependencies": { - "@types/node": "18.11.9", - "config": "1.31.0", - "ethereumjs-common": "1.5.2", - "ethereumjs-tx": "2.1.2", - "ts-node": "9.1.1", - "web3": "1.8.1", - "socket.io": "4.6.2" - }, - "devDependencies": { - "typescript": "5.5.2" - } -} \ No newline at end of file diff --git a/examples/cactus-example-electricity-trade/tools/transferNumericAsset/transferNumericAsset.ts b/examples/cactus-example-electricity-trade/tools/transferNumericAsset/transferNumericAsset.ts deleted file mode 100644 index 0f1b9edd0a..0000000000 --- a/examples/cactus-example-electricity-trade/tools/transferNumericAsset/transferNumericAsset.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * transferNumericAsset.ts - */ - -import { io } from "socket.io-client-fixed-types"; - -{ - // Validator test program.(socket.io client) - const config = require("config"); - - // Specify the server (Validator) of the communication destination - const validatorUrl = config.validatorUrl; - console.log("validatorUrl: " + validatorUrl); - const options = { - rejectUnauthorized: false, // temporary avoidance since self-signed certificates are used - reconnection: false, - timeout: 20000, - }; - const socket = io(validatorUrl, options); - - // ## Request for "transferNumericAsset" - if (process.argv.length !== 5) { - console.log("Number of parameters is abnormal."); - process.exit(-1); - } - const paramAmount: number = parseInt(process.argv[4]); - if (Number.isNaN(paramAmount)) { - console.log(`Third parameter is not numeric. ${process.argv[4]}`); - process.exit(-1); - } - - console.log( - `execution parameter : fromAddress = ${process.argv[2]}, toAddress = ${process.argv[3]}, amount = ${process.argv[4]}`, - ); - - const fromAddress = process.argv[2]; - const toAddress = process.argv[3]; - const amount = paramAmount; - const reqID = "reqID_TNA_001"; - - // function param - const requestData = { - contract: {}, - method: { - type: "web3Eth", - command: "sendTransaction", - }, - args: { - args: [ - { - from: fromAddress, - to: toAddress, - value: amount, - }, - ], - }, - reqID: reqID, - }; - - const json2str = (jsonObj) => { - try { - return JSON.stringify(jsonObj); - } catch (error) { - return null; - } - }; - - socket.on("connect_error", (err) => { - console.log("####connect_error:", err); - // end communication - socket.disconnect(); - process.exit(0); - }); - - socket.on("connect_timeout", (err) => { - console.log("####Error:", err); - // end communication - socket.disconnect(); - process.exit(0); - }); - - socket.on("error", (err) => { - console.log("####Error:", err); - }); - - socket.on("eventReceived", function (res) { - // output the data received from the client - console.log("#[recv]eventReceived, res: " + json2str(res)); - }); - - const requestStopMonitor = () => { - console.log("##exec requestStopMonitor()"); - socket.emit("stopMonitor"); - - setTimeout(function () { - // end communication - socket.disconnect(); - process.exit(0); - }, 5000); - }; - - // request StartMonitor - const requestStartMonitor = () => { - console.log("##exec requestStartMonitor()"); - socket.emit("startMonitor"); - - setTimeout(requestStopMonitor, 15000); - }; - - const sendRequest = () => { - console.log("exec sendRequest()"); - console.log("#[send]requestData: " + json2str(requestData)); - socket.emit("request2", requestData); - }; - - setTimeout(requestStartMonitor, 2000); - setTimeout(sendRequest, 4000); -} diff --git a/examples/cactus-example-electricity-trade/tools/transferNumericAsset/tsconfig.json b/examples/cactus-example-electricity-trade/tools/transferNumericAsset/tsconfig.json deleted file mode 100644 index b0f7b49357..0000000000 --- a/examples/cactus-example-electricity-trade/tools/transferNumericAsset/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "sourceMap": false, - "declaration": false, - "moduleResolution": "node", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "target": "ES2017", - "module": "CommonJS", - "typeRoots": [ - "node_modules/@types", - "./typings" - ], - "lib": [ - "es2017", - "dom" - ] - }, - "include": [ - "./*.ts" - ], - "exclude": [ - "copyStaticAssets.ts" - ] -} diff --git a/examples/cactus-example-electricity-trade/tsconfig.json b/examples/cactus-example-electricity-trade/tsconfig.json deleted file mode 100644 index e0101cd907..0000000000 --- a/examples/cactus-example-electricity-trade/tsconfig.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/", - "rootDir": "./", - "tsBuildInfoFile": "../../.build-cache/cactus-example-electricity-trade.tsbuildinfo" - }, - "include": ["./*.ts"], - "references": [ - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-common-example-server/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-ethereum/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-sawtooth/tsconfig.json" - }, - { - "path": "../../packages/cactus-verifier-client/tsconfig.json" - } - ] -} diff --git a/examples/cactus-example-electricity-trade/tslint.json b/examples/cactus-example-electricity-trade/tslint.json deleted file mode 100644 index 9a00b4aa19..0000000000 --- a/examples/cactus-example-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/cactus-example-electricity-trade/www.ts b/examples/cactus-example-electricity-trade/www.ts deleted file mode 100644 index 84d00957d3..0000000000 --- a/examples/cactus-example-electricity-trade/www.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { BusinessLogicElectricityTrade } from "./BusinessLogicElectricityTrade"; -import { startCactusSocketIOServer } from "@hyperledger/cactus-common-example-server"; -import { initEthereumConnector } from "./ethereum-connector"; -import { initSawtoothConnector } from "./sawtooth-connector"; - -async function startBLP() { - try { - await initEthereumConnector(); - await initSawtoothConnector(); - - startCactusSocketIOServer({ - id: "h40Q9eMD", - plugin: new BusinessLogicElectricityTrade("h40Q9eMD"), - }); - } catch (error) { - console.error("Could not start electricity-trade BLP:", error); - } -} - -startBLP(); diff --git a/examples/cactus-example-supply-chain-backend/.dockerignore b/examples/cactus-example-supply-chain-backend/.dockerignore deleted file mode 100644 index 87ce227e10..0000000000 --- a/examples/cactus-example-supply-chain-backend/.dockerignore +++ /dev/null @@ -1,50 +0,0 @@ -.git -*/*/node_modules -*/*/dist -*/*/build - -.config.json -.nyc_output/ -dist/ -.DS_Store -node_modules/ -docs/main -logs/ -jspm_packages/ -generated-sources/ -coverage/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# next.js build output -.next - -# vscode files -.vscode/* -!.vscode/template.launch.json - -# Introperability App specifics -examples/simple-asset-transfer/fabric/**/hfc-key-store/ - -examples/cactus-example-supply-chain-backend/Dockerfile - -bin/ -.tmp/ -lerna-debug.log -cactus-openapi-spec.json -cactus-openapi-spec-*.json -.npmrc -*.log diff --git a/examples/cactus-example-supply-chain-backend/CHANGELOG.md b/examples/cactus-example-supply-chain-backend/CHANGELOG.md deleted file mode 100644 index ccca566e6b..0000000000 --- a/examples/cactus-example-supply-chain-backend/CHANGELOG.md +++ /dev/null @@ -1,232 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **connector-fabric:** drop support for Fabric v1.x ([ec8123c](https://github.com/hyperledger/cacti/commit/ec8123cf954b09ba8cb213c7332dfe82224c351f)) - -### BREAKING CHANGES - -* **connector-fabric:** The Open API specification that has the enums for -ledger versions will no longer have an option for Fabric v1.x -This means that in the core-api package the LedgerType enum has changes -which means that code that depends on that enum value will need to be -updated. - -Fabric v1.x has had unmaintained dependencies associated with it such as -the native grpc package that stopped receiving security updates years ago -and therefore it's dangerous to have around. - -There are also some issues with Fabric v1.x that make the AIO image flaky -which also makes the relevant tests flaky due to which we couldn't run -the v1.x Fabric tests on the CI for a while now anyway. - -In order to reduce the CI resource usage and our own maintenance burden -I suggest that we get rid of the Fabric v1.x support meaning that we can -eliminate the AIO image build and some code complexity from the test ledger -code as well. - -In addition some old fixtures can be removed that the tests were using. -Overall a net-positive as deleting code without losing functionality (that -we care about) is always a plus. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** upgrade fabric 2.x deps to 2.2.18 ([36988a5](https://github.com/hyperledger/cacti/commit/36988a5edbf9856a1bcc960a3b9afe443536733e)), closes [#2610](https://github.com/hyperledger/cacti/issues/2610) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **cactus-example-supply-chain-app:** mitigate CVE-2022-24434 and CVE-2022-24999 ([d28d5e8](https://github.com/hyperledger/cactus/commit/d28d5e8f3ed5dff1aa049c8f1bccce79aa21e948)), closes [#2041](https://github.com/hyperledger/cactus/issues/2041) -* **security:** upgrade express-jwt to v8.4.1 ([e251168](https://github.com/hyperledger/cactus/commit/e251168fb4067a8036a5168709e57154c0c02fe4)), closes [#2231](https://github.com/hyperledger/cactus/issues/2231) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Features - -* add jwt authorization to supply chain example ([a4f07f6](https://github.com/hyperledger/cactus/commit/a4f07f6b1ea5b6cdd0397662cfbd9bb205a28bbe)), closes [#1579](https://github.com/hyperledger/cactus/issues/1579) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* **security:** upgrade fabric-common to 2.2.10 or later ([45c4a69](https://github.com/hyperledger/cactus/commit/45c4a69fb86964bc4e7018c31c5914a0063c7638)), closes [#1600](https://github.com/hyperledger/cactus/issues/1600) -* **supply-chain-app:** enable cockpit in supply-chain ([4a65b96](https://github.com/hyperledger/cactus/commit/4a65b96cfd83564343ec548c715946480ce228ea)), closes [#1622](https://github.com/hyperledger/cactus/issues/1622) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **plugin-ledger-connector-quorum:** no keychain endpoints ([15cf65c](https://github.com/hyperledger/cactus/commit/15cf65cea6a779d12542b4ccc2e4940e7ac12039)) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Bug Fixes - -* **test:** flaky fabric AIO container boot [#876](https://github.com/hyperledger/cactus/issues/876) ([beefcef](https://github.com/hyperledger/cactus/commit/beefcefbebbdb9a22d08118b6fb2e667493504cf)), closes [#718](https://github.com/hyperledger/cactus/issues/718) [#320](https://github.com/hyperledger/cactus/issues/320) [#319](https://github.com/hyperledger/cactus/issues/319) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) -* **cmd-api-server:** support grpc web services [#1189](https://github.com/hyperledger/cactus/issues/1189) ([4cace1d](https://github.com/hyperledger/cactus/commit/4cace1dca3377e09d2ed37fdadeec6b125d47896)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **plugin-consortium-manual:** drop repo constructor arg [#1199](https://github.com/hyperledger/cactus/issues/1199) ([7b424d4](https://github.com/hyperledger/cactus/commit/7b424d465dd7c11900e0afea5c32514a9b585084)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) -* **examples:** supply chain backend bundle build RAM [#766](https://github.com/hyperledger/cactus/issues/766) ([f5c5d82](https://github.com/hyperledger/cactus/commit/f5c5d82ef3ae327f057da94ea12a224f9b4d78c6)) -* keychain to registry, uuid dep, add back missing gas req parameter ([4635d81](https://github.com/hyperledger/cactus/commit/4635d817a719bcdaa2a3bf1b4aa3b5d8cc1f6961)) - -### Features - -* besu WatchBlocksV1Endpoint with SocketIO ([d5e1708](https://github.com/hyperledger/cactus/commit/d5e1708e84ab5192d07410d5120e144d477ef6ce)) -* **connector-besu, connector-quorum:** filesystem replaced by keychain ([14d1790](https://github.com/hyperledger/cactus/commit/14d17904442723450790644653ff18dda79dfa5e)) -* **connector-besu:** contract deployment with constructor arguments ([48d67a7](https://github.com/hyperledger/cactus/commit/48d67a7a7af223337777917a01002426a79f8463)), closes [#810](https://github.com/hyperledger/cactus/issues/810) -* **connector-besu:** replace invokeContractV2 ([ecd62ea](https://github.com/hyperledger/cactus/commit/ecd62eac5721514dbcfc401d5f28dfdc58ef8873)) -* **connector-fabric:** contract deployment Fabric 2.x ([139a8ed](https://github.com/hyperledger/cactus/commit/139a8ed96d5d547a514839a461abcb7d0e937cb0)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) -* **examples:** supply chain backend bundle build RAM [#766](https://github.com/hyperledger/cactus/issues/766) ([f5c5d82](https://github.com/hyperledger/cactus/commit/f5c5d82ef3ae327f057da94ea12a224f9b4d78c6)) -* keychain to registry, uuid dep, add back missing gas req parameter ([4635d81](https://github.com/hyperledger/cactus/commit/4635d817a719bcdaa2a3bf1b4aa3b5d8cc1f6961)) - -### Features - -* **connector-besu:** contract deployment with constructor arguments ([48d67a7](https://github.com/hyperledger/cactus/commit/48d67a7a7af223337777917a01002426a79f8463)), closes [#810](https://github.com/hyperledger/cactus/issues/810) -* **connector-besu:** replace invokeContractV2 ([ecd62ea](https://github.com/hyperledger/cactus/commit/ecd62eac5721514dbcfc401d5f28dfdc58ef8873)) -* **connector-besu, connector-quorum:** filesystem replaced by keychain ([14d1790](https://github.com/hyperledger/cactus/commit/14d17904442723450790644653ff18dda79dfa5e)) -* **connector-fabric:** contract deployment Fabric 2.x ([139a8ed](https://github.com/hyperledger/cactus/commit/139a8ed96d5d547a514839a461abcb7d0e937cb0)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -### Bug Fixes - -* **release:** package.json publish config non-public [#753](https://github.com/hyperledger/cactus/issues/753) ([5a1b7a6](https://github.com/hyperledger/cactus/commit/5a1b7a6eba9a18d4f7474a3c44d4a4035fc99e84)) - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Features - -* **example:** example extended with fabric ([55d6587](https://github.com/hyperledger/cactus/commit/55d65872dc689ee3b319c23515c1fea1df0a6444)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-backend diff --git a/examples/cactus-example-supply-chain-backend/Dockerfile b/examples/cactus-example-supply-chain-backend/Dockerfile deleted file mode 100644 index 9fc3bc746f..0000000000 --- a/examples/cactus-example-supply-chain-backend/Dockerfile +++ /dev/null @@ -1,117 +0,0 @@ -FROM cruizba/ubuntu-dind:jammy-24.0.7-compose-2.24.0 as runner - -USER root -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt-get update && \ - apt -y upgrade - -# Need curl for healthchecks -# The file binary is used to inspect exectubles when debugging container image issues -RUN apt-get -y install --no-install-recommends -y \ - curl \ - file \ - ca-certificates \ - tzdata \ - git \ - jq \ - moreutils - -ARG APP=/usr/src/app/ - -ENV TZ=Etc/UTC -ENV APP_USER=appuser - -RUN useradd -m ${APP_USER} && \ - usermod -a -G ${APP_USER} ${APP_USER} && \ - mkdir -p ${APP} - -RUN mkdir -p "${APP}/log/" && \ - chown -R $APP_USER:$APP_USER "${APP}/" - -# TODO: Can we hack it together so that the whole thing works rootless? -USER ${APP_USER} -WORKDIR ${APP} - -# COPY --chown=${APP_USER}:${APP_USER} examples/cactus-example-supply-chain-backend/tpl.package.json /usr/src/app/package.json - -# RUN touch /usr/src/app/package.json - -SHELL ["/bin/bash", "--login", "-i", "-c"] -# Installing NodeJS via Node Version Manager (nvm) -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash -ARG NPM_PKG_VERSION="latest" -RUN source ~/.bashrc && \ - nvm install 18.18.2 && \ - npm i -g corepack && corepack enable && corepack prepare yarn@4.3.1 --activate && \ - yarn init --yes --private && \ - yarn config set nodeLinker node-modules && \ - yarn add @hyperledger/cactus-example-supply-chain-backend@${NPM_PKG_VERSION} --exact && \ - yarn add ethers@6.8.1 --exact && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-test-tooling": "\($NPM_PKG_VERSION)" }' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-api-client": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-cmd-api-server": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-common": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-core": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-core-api": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-example-supply-chain-business-logic-plugin": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-example-supply-chain-frontend": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-plugin-consortium-manual": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-plugin-keychain-memory": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-plugin-ledger-connector-besu": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-plugin-ledger-connector-fabric": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - cat /usr/src/app/package.json | jq --arg NPM_PKG_VERSION ${NPM_PKG_VERSION} '.resolutions += { "@hyperledger/cactus-plugin-ledger-connector-xdai": "\($NPM_PKG_VERSION)" } ' | sponge /usr/src/app/package.json && \ - yarn install - -SHELL ["/bin/bash", "--login", "-c"] - - -COPY --chown=${APP_USER}:${APP_USER} ./examples/cactus-example-supply-chain-backend/healthcheck.sh / - -ENV AUTHORIZATION_CONFIG_JSON="{}" -ENV AUTHORIZATION_PROTOCOL=NONE -ENV COCKPIT_WWW_ROOT=/usr/src/app/node_modules/@hyperledger/cactus-example-supply-chain-frontend/www/ -ENV COCKPIT_TLS_ENABLED=false -ENV COCKPIT_CORS_DOMAIN_CSV=\* -ENV COCKPIT_MTLS_ENABLED=false -ENV COCKPIT_TLS_CERT_PEM=- -ENV COCKPIT_TLS_KEY_PEM=- -ENV COCKPIT_TLS_CLIENT_CA_PEM=- -ENV COCKPIT_HOST=0.0.0.0 -ENV COCKPIT_PORT=3000 -ENV API_MTLS_ENABLED=false -ENV API_TLS_ENABLED=false -ENV API_CORS_DOMAIN_CSV=\* -ENV API_TLS_CERT_PEM=- -ENV API_TLS_CLIENT_CA_PEM=- -ENV API_TLS_KEY_PEM=- -ENV API_HOST=0.0.0.0 -ENV API_PORT=4000 -ENV GRPC_TLS_ENABLED=false -ENV LOG_LEVEL=TRACE - -COPY examples/cactus-example-supply-chain-backend/supervisord.conf /etc/supervisord.conf - -# supervisord web ui/dashboard -EXPOSE 9001 -# API #1 -EXPOSE 4000 -# API #2 -EXPOSE 4100 -# GUI #1 -EXPOSE 3000 -# GUI #2 -EXPOSE 3100 -# API #3 -EXPOSE 4200 -# GUI #3 -EXPOSE 3200 - -USER root - -# Extend the parent image's entrypoint -# https://superuser.com/questions/1459466/can-i-add-an-additional-docker-entrypoint-script -ENTRYPOINT ["/usr/bin/supervisord"] -CMD ["--configuration", "/etc/supervisord.conf", "--nodaemon"] -HEALTHCHECK --interval=1s --timeout=5s --start-period=20s --retries=250 \ - CMD /usr/src/app/examples/cactus-example-supply-chain-backend/healthcheck.sh diff --git a/examples/cactus-example-supply-chain-backend/README.md b/examples/cactus-example-supply-chain-backend/README.md deleted file mode 100644 index e2f8b97f62..0000000000 --- a/examples/cactus-example-supply-chain-backend/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Hyperledger Cactus Example - Supply Chain App - - -## Usage - -1. Execute the following from: - ```sh - docker run \ - --rm \ - --privileged \ - -p 3000:3000 \ - -p 3100:3100 \ - -p 3200:3200 \ - -p 4000:4000 \ - -p 4100:4100 \ - -p 4200:4200 \ - ghcr.io/hyperledger/cactus-example-supply-chain-app:2024-03-08--pr-3059-1 - ``` -2. Observe the example application pulling up in the logs - 1. the test ledger containers, - 2. a test consortium with multiple members and their Cactus nodes -3. Wait for the output to show the message `INFO (api-server): Cactus Cockpit reachable http://127.0.0.1:3200` -4. Visit http://127.0.0.1:3200 in your web browser with Javascript enabled - -## Building and running the container locally - -```sh -# Change directories to the project root - -# Build the docker image and tag it as "scaeb" for supply chain app example backend -DOCKER_BUILDKIT=1 docker build --file \ - ./examples/cactus-example-supply-chain-backend/Dockerfile \ - . \ - --tag scaeb \ - --tag ghcr.io/hyperledger/cactus-example-supply-chain-app:$(git describe --contains --all HEAD)_$(git rev-parse --short HEAD)_$(date -u +"%Y-%m-%dT%H-%M-%SZ") - -# Run the built image with ports mapped to the host machine as you see fit -# The --privileged flag is required because we use Docker-in-Docker for pulling -# up ledger containers from within the container in order to have the example -# be completely self-contained where you don't need to worry about running -# multiple different ledgers jus this one container. -docker run --rm -it --privileged -p 3000:3000 -p 3100:3100 -p 3200:3200 -p 4000:4000 -p 4100:4100 -p 4200:4200 scaeb -``` - -Building the image with a specific npm package version: - -```sh -DOCKER_BUILDKIT=1 docker build \ - --build-arg NPM_PKG_VERSION=jwt-supply-chain \ - --file ./examples/cactus-example-supply-chain-backend/Dockerfile \ - --tag scaeb \ - ./ -``` - -## Running the Example Application Locally - -> Make sure you have all the dependencies set up as explained in `BUILD.md` - -On the terminal, issue the following commands: - -1. `npm run enable-corepack` -2. `npm run configure` -3. `yarn start:example-supply-chain` - -## Debugging the Example Application Locally - -On the terminal, issue the following commands (steps 1 to 6) and then perform the rest of the steps manually. - -1. `npm run enable-corepack` -2. `yarn run configure` -3. `yarn build:dev` -4. `cd ./examples/cactus-example-supply-chain-backend/` -5. `yarn install` -6. `cd ../../` -7. Locate the `.vscode/template.launch.json` file -8. Within that file locate the entry named `"Example: Supply Chain App"` -9. Copy the VSCode debug definition object from 2) to your `.vscode/launch.json` file -10. At this point the VSCode `Run and Debug` panel on the left should have an option also titled `"Example: Supply Chain App"` which starts the application -11. When the application finishes loading, the JWT token generated is displayed on the terminal -12. Visit http://localhost:3200 in a web browser with Javascript enabled and insert the token when prompted - -## Live Reloading the GUI Application - -1. `npm run enable-corepack` -2. `npm run configure` -3. `yarn build:dev` -4. Locate the `.vscode/template.launch.json` file -5. Within that file locate the entry named `"Example: Supply Chain App"` -6. Copy the VSCode debug definition object from 2) to your `.vscode/launch.json` file -7. At this point the VSCode `Run and Debug` panel on the left should have an option also titled `"Example: Supply Chain App"` which starts the application -8. `cd ./examples/cactus-example-supply-chain-frontend/` -9. `yarn serve:proxy` -10. When the application finishes loading, the JWT token generated is displayed on the terminal -11. Visit http://localhost:8000 in a web browser with Javascript enabled and insert the token when prompted -12. At this point if you modify the source code of the GUI application under the `./examples/cactus-example-supply-chain-frontend/` path it will automatically reload the browser window (you will need to paste in the JWT again when this happens) diff --git a/examples/cactus-example-supply-chain-backend/healthcheck.sh b/examples/cactus-example-supply-chain-backend/healthcheck.sh deleted file mode 100755 index c0a0e586b0..0000000000 --- a/examples/cactus-example-supply-chain-backend/healthcheck.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -curl -v -i -X OPTIONS http://127.0.0.1:${COCKPIT_PORT} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-backend/package.json b/examples/cactus-example-supply-chain-backend/package.json deleted file mode 100644 index b61abb5848..0000000000 --- a/examples/cactus-example-supply-chain-backend/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "name": "@hyperledger/cactus-example-supply-chain-backend", - "version": "2.0.0", - "description": "An example application showing how to use Cactus when implementing a supply chain application where two or more blockchains are sharing data with each other to achieve a certain business outcome beneficial to multiple parties (business organizations).", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-example-supply-chain-backend.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "start": "node -r dotenv/config dist/lib/main/typescript/supply-chain-app-cli.js dotenv_config_path=process.env", - "start-direct": "node ./node_modules/@hyperledger/cactus-example-supply-chain-backend/dist/lib/main/typescript/supply-chain-app-cli.js", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-example-supply-chain-business-logic-plugin": "2.0.0", - "@hyperledger/cactus-example-supply-chain-frontend": "2.0.0", - "@hyperledger/cactus-plugin-consortium-manual": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "async-exit-hook": "2.0.1", - "axios": "1.7.7", - "dotenv": "16.0.0", - "express": "4.21.0", - "express-jwt": "8.4.1", - "fabric-network": "2.2.20", - "jose": "4.15.5", - "openapi-types": "12.1.3", - "solc": "0.8.6", - "typescript-optional": "2.0.1", - "uuid": "10.0.0", - "web3-core": "1.6.1" - }, - "devDependencies": { - "@types/express": "5.0.0", - "@types/uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-example-supply-chain-backend.web.umd.min.js", - "mainMinified": "dist/cactus-example-supply-chain-backend.node.umd.min.js", - "watch": {} -} diff --git a/examples/cactus-example-supply-chain-backend/process.env b/examples/cactus-example-supply-chain-backend/process.env deleted file mode 100644 index f842216c00..0000000000 --- a/examples/cactus-example-supply-chain-backend/process.env +++ /dev/null @@ -1,21 +0,0 @@ -COCKPIT_WWW_ROOT=./node_modules/@hyperledger/cactus-example-supply-chain-frontend/www/ -COCKPIT_TLS_ENABLED=false -COCKPIT_CORS_DOMAIN_CSV=* -COCKPIT_MTLS_ENABLED=false -COCKPIT_TLS_CERT_PEM=- -COCKPIT_TLS_KEY_PEM=- -COCKPIT_TLS_CLIENT_CA_PEM=- -COCKPIT_HOST=0.0.0.0 -COCKPIT_PORT=3000 -API_MTLS_ENABLED=false -API_TLS_ENABLED=false -API_CORS_DOMAIN_CSV=* -API_TLS_CERT_PEM=- -API_TLS_CLIENT_CA_PEM=- -API_TLS_KEY_PEM=- -API_HOST=0.0.0.0 -API_PORT=4000 -GRPC_TLS_ENABLED=false -LOG_LEVEL=TRACE -AUTHORIZATION_PROTOCOL=NONE -AUTHORIZATION_CONFIG_JSON="{}" \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-backend/src/main/go/shipment.ts b/examples/cactus-example-supply-chain-backend/src/main/go/shipment.ts deleted file mode 100644 index 481231181b..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/go/shipment.ts +++ /dev/null @@ -1,113 +0,0 @@ -export const SHIPMENT_CONTRACT_GO_SOURCE = `package main - -import ( - "encoding/json" - "fmt" - "log" - "strings" - "github.com/hyperledger/fabric-contract-api-go/contractapi" - -) - -func isNonBlank(str *string) bool { - if str == nil { - return false - } - return strings.TrimSpace(*str) != "" -} - -type ShipmentChaincode struct { - contractapi.Contract -} - -type Shipment struct { - Id string \`json:"id"\` - BookshelfId string \`json:"bookshelfId"\` -} - -func main() { - shipmentChaincode, err := contractapi.NewChaincode(&ShipmentChaincode{}) - if err != nil { - log.Panicf("Error creating supply-chain shipment chaincode: %v", err) - } - - if err := shipmentChaincode.Start(); err != nil { - log.Panicf("Error starting supply-chain shipment chaincode: %v", err) - } -} - -// InitLedger adds a base set of assets to the ledger -func (t *ShipmentChaincode) InitLedger(ctx contractapi.TransactionContextInterface) error { - - log.Println("InitLedger ran for supply-chain shipment chaincode. %v", t) - - return nil -} - -func (t *ShipmentChaincode) InsertShipment(ctx contractapi.TransactionContextInterface, newShipmentId string, bookshelfId string) (string, error) { - if !isNonBlank(&newShipmentId) { - return "E_NEW_SHIPMENT_ID_BLANK", fmt.Errorf("Incorrect arguments. Expecting a shipment ID as a non-blank string.") - } - if !isNonBlank(&bookshelfId) { - return "E_NEW_BOOKSHELF_ID_BLANK", fmt.Errorf("Incorrect arguments. Expecting a bookshelf ID as a non-blank string.") - } - - var newShipment Shipment - newShipment.Id = newShipmentId - newShipment.BookshelfId = bookshelfId - - newShipmentJSON, err := json.Marshal(newShipment) - if err != nil { - return "OP_FAILED", fmt.Errorf("Failed to JSON marshal new shipment data: %v", err) - } - - stub := ctx.GetStub() - - err2 := stub.PutState(newShipmentId, newShipmentJSON) - if err2 != nil { - return "E_PUT_STATE_FAIL", fmt.Errorf("Failed to insert new shipment to ledger state: %v --- %v", newShipmentJSON, err2) - } - - return newShipmentId, nil -} - -func (t *ShipmentChaincode) GetListShipment(ctx contractapi.TransactionContextInterface) ([]Shipment, error) { - - stub := ctx.GetStub() - - resultsIterator, _, err := stub.GetStateByRangeWithPagination("", "", 25, "") - if err != nil { - return nil, fmt.Errorf("Error in GetListShipment: %v", err) - } - defer resultsIterator.Close() - - var shipments []Shipment - - for resultsIterator.HasNext() { - response, err := resultsIterator.Next() - if err != nil { - return nil, fmt.Errorf("Error in shipment result iterator: %v", err) - } - - var aux Shipment - if err := json.Unmarshal(response.Value, &aux); err != nil { - return nil, fmt.Errorf("Error un-marshalling shipment: %v", err) - } - - shipments = append(shipments, aux) - } - - return shipments, nil -}`; - -const exportSourceToFs = async () => { - const path = await import("path"); - const fs = await import("fs"); - const fileName = "./shipment.go"; - const scriptPath = path.join(__dirname, fileName); - fs.writeFileSync(scriptPath, SHIPMENT_CONTRACT_GO_SOURCE); -}; - -if (require.main === module) { - exportSourceToFs(); -} diff --git a/examples/cactus-example-supply-chain-backend/src/main/json/generated/BambooHarvestRepository.json b/examples/cactus-example-supply-chain-backend/src/main/json/generated/BambooHarvestRepository.json deleted file mode 100644 index 30c8d9dec8..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/json/generated/BambooHarvestRepository.json +++ /dev/null @@ -1,495 +0,0 @@ -{ - "contractName": "BambooHarvestRepository", - "abi": [ - { - "inputs": [], - "name": "getAllRecords", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "string", - "name": "location", - "type": "string" - }, - { - "internalType": "string", - "name": "startedAt", - "type": "string" - }, - { - "internalType": "string", - "name": "endedAt", - "type": "string" - }, - { - "internalType": "string", - "name": "harvester", - "type": "string" - } - ], - "internalType": "struct SupplyChainAppDataModelLib.BambooHarvestEntity[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "string", - "name": "location", - "type": "string" - }, - { - "internalType": "string", - "name": "startedAt", - "type": "string" - }, - { - "internalType": "string", - "name": "endedAt", - "type": "string" - }, - { - "internalType": "string", - "name": "harvester", - "type": "string" - } - ], - "internalType": "struct SupplyChainAppDataModelLib.BambooHarvestEntity", - "name": "record", - "type": "tuple" - } - ], - "name": "insertRecord", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.7.2+commit.51b20bc0\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"getAllRecords\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"location\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"startedAt\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"endedAt\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"harvester\",\"type\":\"string\"}],\"internalType\":\"struct SupplyChainAppDataModelLib.BambooHarvestEntity[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"location\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"startedAt\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"endedAt\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"harvester\",\"type\":\"string\"}],\"internalType\":\"struct SupplyChainAppDataModelLib.BambooHarvestEntity\",\"name\":\"record\",\"type\":\"tuple\"}],\"name\":\"insertRecord\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/BambooHarvestRepository.sol\":\"BambooHarvestRepository\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/BambooHarvestRepository.sol\":{\"keccak256\":\"0xeb06a4c3808142a80508996880ae96bb7dce031fe04cb571e1320f9dcbb51dfc\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3cba3a8925be8d4567c6dbe9855dc21021b58bfc6f6f3fb6adfe699a13010b02\",\"dweb:/ipfs/QmWED4K38Du6ErtkmrUKSPYpeCSBw3cGQgwBWQQcu423sF\"]},\"/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/SupplyChainAppDataModel.sol\":{\"keccak256\":\"0x3b81c53307c147314b6383d426ca1eca6c7101d58c2cda5a7c1ec968001ed085\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://a380e2a234fbcd6886d9c06246514c0481a376789f81575ebe43c7b193e939cd\",\"dweb:/ipfs/QmVZdUSp7HJGbfrh5vouCmCkfqdk53Zkv6K3Bn1E3xCtte\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b506107f8806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063317ffe391461003b578063a7f9fe7214610064575b600080fd5b61004e61004936600461057d565b610079565b60405161005b9190610793565b60405180910390f35b61006c610139565b60405161005b91906106bf565b600080546001810182558180528251805184926005027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56301916100c191839160200190610483565b5060208281015180516100da9260018501920190610483565b50604082015180516100f6916002840191602090910190610483565b5060608201518051610112916003840191602090910190610483565b506080820151805161012e916004840191602090910190610483565b506001949350505050565b60606000805480602002602001604051908101604052809291908181526020016000905b8282101561047a5760008481526020908190206040805160058602909201805460026001821615610100026000190190911604601f8101859004909402830160c090810190925260a08301848152929390928492909184918401828280156102065780601f106101db57610100808354040283529160200191610206565b820191906000526020600020905b8154815290600101906020018083116101e957829003601f168201915b50505050508152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102a85780601f1061027d576101008083540402835291602001916102a8565b820191906000526020600020905b81548152906001019060200180831161028b57829003601f168201915b5050509183525050600282810180546040805160206001841615610100026000190190931694909404601f8101839004830285018301909152808452938101939083018282801561033a5780601f1061030f5761010080835404028352916020019161033a565b820191906000526020600020905b81548152906001019060200180831161031d57829003601f168201915b505050918352505060038201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156103ce5780601f106103a3576101008083540402835291602001916103ce565b820191906000526020600020905b8154815290600101906020018083116103b157829003601f168201915b505050918352505060048201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156104625780601f1061043757610100808354040283529160200191610462565b820191906000526020600020905b81548152906001019060200180831161044557829003601f168201915b5050505050815250508152602001906001019061015d565b50505050905090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106104c457805160ff19168380011785556104f1565b828001600101855582156104f1579182015b828111156104f15782518255916020019190600101906104d6565b506104fd929150610501565b5090565b5b808211156104fd5760008155600101610502565b600082601f830112610526578081fd5b813567ffffffffffffffff81111561053a57fe5b61054d601f8201601f191660200161079e565b915080825283602082850101111561056457600080fd5b8060208401602084013760009082016020015292915050565b60006020828403121561058e578081fd5b813567ffffffffffffffff808211156105a5578283fd5b9083019060a082860312156105b8578283fd5b6105c260a061079e565b8235828111156105d0578485fd5b6105dc87828601610516565b8252506020830135828111156105f0578485fd5b6105fc87828601610516565b602083015250604083013582811115610613578485fd5b61061f87828601610516565b604083015250606083013582811115610636578485fd5b61064287828601610516565b606083015250608083013582811115610659578485fd5b61066587828601610516565b60808301525095945050505050565b60008151808452815b818110156106995760208185018101518683018201520161067d565b818111156106aa5782602083870101525b50601f01601f19169290920160200192915050565b60208082528251828201819052600091906040908185019080840286018301878501865b8381101561078557603f19898403018552815160a0815181865261070982870182610674565b915050888201518582038a8701526107218282610674565b91505087820151858203898701526107398282610674565b915050606080830151868303828801526107538382610674565b92505050608080830151925085820381870152506107718183610674565b9689019694505050908601906001016106e3565b509098975050505050505050565b901515815260200190565b60405181810167ffffffffffffffff811182821017156107ba57fe5b60405291905056fea2646970667358221220532d3478ef27de66937e73dda7d65f484c4936836aa9b39507268aff76b43bb064736f6c63430007020033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100365760003560e01c8063317ffe391461003b578063a7f9fe7214610064575b600080fd5b61004e61004936600461057d565b610079565b60405161005b9190610793565b60405180910390f35b61006c610139565b60405161005b91906106bf565b600080546001810182558180528251805184926005027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56301916100c191839160200190610483565b5060208281015180516100da9260018501920190610483565b50604082015180516100f6916002840191602090910190610483565b5060608201518051610112916003840191602090910190610483565b506080820151805161012e916004840191602090910190610483565b506001949350505050565b60606000805480602002602001604051908101604052809291908181526020016000905b8282101561047a5760008481526020908190206040805160058602909201805460026001821615610100026000190190911604601f8101859004909402830160c090810190925260a08301848152929390928492909184918401828280156102065780601f106101db57610100808354040283529160200191610206565b820191906000526020600020905b8154815290600101906020018083116101e957829003601f168201915b50505050508152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102a85780601f1061027d576101008083540402835291602001916102a8565b820191906000526020600020905b81548152906001019060200180831161028b57829003601f168201915b5050509183525050600282810180546040805160206001841615610100026000190190931694909404601f8101839004830285018301909152808452938101939083018282801561033a5780601f1061030f5761010080835404028352916020019161033a565b820191906000526020600020905b81548152906001019060200180831161031d57829003601f168201915b505050918352505060038201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156103ce5780601f106103a3576101008083540402835291602001916103ce565b820191906000526020600020905b8154815290600101906020018083116103b157829003601f168201915b505050918352505060048201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156104625780601f1061043757610100808354040283529160200191610462565b820191906000526020600020905b81548152906001019060200180831161044557829003601f168201915b5050505050815250508152602001906001019061015d565b50505050905090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106104c457805160ff19168380011785556104f1565b828001600101855582156104f1579182015b828111156104f15782518255916020019190600101906104d6565b506104fd929150610501565b5090565b5b808211156104fd5760008155600101610502565b600082601f830112610526578081fd5b813567ffffffffffffffff81111561053a57fe5b61054d601f8201601f191660200161079e565b915080825283602082850101111561056457600080fd5b8060208401602084013760009082016020015292915050565b60006020828403121561058e578081fd5b813567ffffffffffffffff808211156105a5578283fd5b9083019060a082860312156105b8578283fd5b6105c260a061079e565b8235828111156105d0578485fd5b6105dc87828601610516565b8252506020830135828111156105f0578485fd5b6105fc87828601610516565b602083015250604083013582811115610613578485fd5b61061f87828601610516565b604083015250606083013582811115610636578485fd5b61064287828601610516565b606083015250608083013582811115610659578485fd5b61066587828601610516565b60808301525095945050505050565b60008151808452815b818110156106995760208185018101518683018201520161067d565b818111156106aa5782602083870101525b50601f01601f19169290920160200192915050565b60208082528251828201819052600091906040908185019080840286018301878501865b8381101561078557603f19898403018552815160a0815181865261070982870182610674565b915050888201518582038a8701526107218282610674565b91505087820151858203898701526107398282610674565b915050606080830151868303828801526107538382610674565b92505050608080830151925085820381870152506107718183610674565b9689019694505050908601906001016106e3565b509098975050505050505050565b901515815260200190565b60405181810167ffffffffffffffff811182821017156107ba57fe5b60405291905056fea2646970667358221220532d3478ef27de66937e73dda7d65f484c4936836aa9b39507268aff76b43bb064736f6c63430007020033", - "sourceMap": "185:390:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "185:390:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;389:184;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;267:116;;;:::i;:::-;;;;;;;:::i;389:184::-;497:12;525:20;;;;;;;;;;;;;;538:6;;525:20;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;525:20:0;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;525:20:0;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;525:20:0;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;525:20:0;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;562:4:0;;389:184;-1:-1:-1;;;;389:184:0:o;267:116::-;312:34;369:7;362:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;362:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;362:14:0;;;-1:-1:-1;;362:14:0;;;;;;;;;;;;;;;;-1:-1:-1;;362:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;362:14:0;;;-1:-1:-1;;362:14:0;;;;;;;;;;;;;;;;-1:-1:-1;;362:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;362:14:0;;;-1:-1:-1;;362:14:0;;;;;;;;;;;;;;;;-1:-1:-1;;362:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;267:116;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:522:2;;112:3;105:4;97:6;93:17;89:27;79:2;;134:5;127;120:20;79:2;178:6;165:20;208:18;200:6;197:30;194:2;;;230:9;194:2;259:58;305:2;282:17;;-1:-1:-1;;278:31:2;311:4;274:42;259:58;:::i;:::-;250:67;;340:6;333:5;326:21;394:3;387:4;378:6;370;366:19;362:30;359:39;356:2;;;411:1;408;401:12;356:2;474:6;467:4;459:6;455:17;448:4;441:5;437:16;424:57;528:1;501:18;;;521:4;497:29;490:40;505:5;69:467;-1:-1:-1;;69:467:2:o;541:1401::-;;688:2;676:9;667:7;663:23;659:32;656:2;;;709:6;701;694:22;656:2;754:9;741:23;783:18;824:2;816:6;813:14;810:2;;;845:6;837;830:22;810:2;873:22;;;;929:4;911:16;;;907:27;904:2;;;952:6;944;937:22;904:2;983:20;998:4;983:20;:::i;:::-;1041:2;1028:16;1069:2;1059:8;1056:16;1053:2;;;1090:6;1082;1075:22;1053:2;1122:47;1161:7;1150:8;1146:2;1142:17;1122:47;:::i;:::-;1115:5;1108:62;;1216:2;1212;1208:11;1195:25;1245:2;1235:8;1232:16;1229:2;;;1266:6;1258;1251:22;1229:2;1307:47;1346:7;1335:8;1331:2;1327:17;1307:47;:::i;:::-;1302:2;1295:5;1291:14;1284:71;;1401:2;1397;1393:11;1380:25;1430:2;1420:8;1417:16;1414:2;;;1451:6;1443;1436:22;1414:2;1492:47;1531:7;1520:8;1516:2;1512:17;1492:47;:::i;:::-;1487:2;1480:5;1476:14;1469:71;;1586:2;1582;1578:11;1565:25;1615:2;1605:8;1602:16;1599:2;;;1636:6;1628;1621:22;1599:2;1677:47;1716:7;1705:8;1701:2;1697:17;1677:47;:::i;:::-;1672:2;1665:5;1661:14;1654:71;;1771:3;1767:2;1763:12;1750:26;1801:2;1791:8;1788:16;1785:2;;;1822:6;1814;1807:22;1785:2;1864:47;1903:7;1892:8;1888:2;1884:17;1864:47;:::i;:::-;1858:3;1847:15;;1840:72;-1:-1:-1;1851:5:2;646:1296;-1:-1:-1;;;;;646:1296:2:o;1947:478::-;;2029:5;2023:12;2056:6;2051:3;2044:19;2081:3;2093:162;2107:6;2104:1;2101:13;2093:162;;;2169:4;2225:13;;;2221:22;;2215:29;2197:11;;;2193:20;;2186:59;2122:12;2093:162;;;2273:6;2270:1;2267:13;2264:2;;;2339:3;2332:4;2323:6;2318:3;2314:16;2310:27;2303:40;2264:2;-1:-1:-1;2407:2:2;2386:15;-1:-1:-1;;2382:29:2;2373:39;;;;2414:4;2369:50;;1999:426;-1:-1:-1;;1999:426:2:o;2430:1798::-;2671:2;2723:21;;;2793:13;;2696:18;;;2815:22;;;2430:1798;;2671:2;2856;;2874:18;;;;2934:15;;;2919:31;;2915:40;;2978:15;;;2430:1798;3024:1175;3038:6;3035:1;3032:13;3024:1175;;;3131:2;3127:7;3115:9;3107:6;3103:22;3099:36;3094:3;3087:49;3165:6;3159:13;3195:4;3238:2;3232:9;3269:2;3261:6;3254:18;3299:50;3345:2;3337:6;3333:15;3319:12;3299:50;:::i;:::-;3285:64;;;3398:2;3394;3390:11;3384:18;3451:6;3443;3439:19;3434:2;3426:6;3422:15;3415:44;3486:43;3522:6;3506:14;3486:43;:::i;:::-;3472:57;;;3578:2;3574;3570:11;3564:18;3631:6;3623;3619:19;3614:2;3606:6;3602:15;3595:44;3666:43;3702:6;3686:14;3666:43;:::i;:::-;3652:57;;;3732:4;3785:2;3781;3777:11;3771:18;3838:6;3830;3826:19;3821:2;3813:6;3809:15;3802:44;3873:43;3909:6;3893:14;3873:43;:::i;:::-;3859:57;;;;3939:4;3992:2;3988;3984:11;3978:18;3956:40;;4045:6;4037;4033:19;4028:2;4020:6;4016:15;4009:44;;4076:43;4112:6;4096:14;4076:43;:::i;:::-;4177:12;;;;4066:53;-1:-1:-1;;;4142:15:2;;;;3060:1;3053:9;3024:1175;;;-1:-1:-1;4216:6:2;;2651:1577;-1:-1:-1;;;;;;;;2651:1577:2:o;4233:187::-;4398:14;;4391:22;4373:41;;4361:2;4346:18;;4328:92::o;4425:242::-;4495:2;4489:9;4525:17;;;4572:18;4557:34;;4593:22;;;4554:62;4551:2;;;4619:9;4551:2;4646;4639:22;4469:198;;-1:-1:-1;4469:198:2:o", - "sourcePath": "/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/BambooHarvestRepository.sol", - "compiler": { - "name": "solc", - "version": "0.7.2+commit.51b20bc0" - }, - "networks": {}, - "ast": { - "absolutePath": "/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/BambooHarvestRepository.sol", - "exportedSymbols": { - "BambooHarvestRepository": [ - 33 - ], - "model": [ - 54 - ] - }, - "id": 34, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "40:23:0" - }, - { - "id": 2, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "64:33:0" - }, - { - "absolutePath": "/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/SupplyChainAppDataModel.sol", - "file": "./SupplyChainAppDataModel.sol", - "id": 4, - "nodeType": "ImportDirective", - "scope": 34, - "sourceUnit": 55, - "src": "99:84:0", - "symbolAliases": [ - { - "foreign": { - "id": 3, - "name": "SupplyChainAppDataModelLib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "src": "108:26:0", - "typeDescriptions": {} - }, - "local": "model" - } - ], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": [ - 33 - ], - "name": "BambooHarvestRepository", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "records", - "nodeType": "VariableDeclaration", - "scope": 33, - "src": "225:35:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BambooHarvestEntity_$46_storage_$dyn_storage", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity[]" - }, - "typeName": { - "baseType": { - "id": 5, - "name": "model.BambooHarvestEntity", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 46, - "src": "225:25:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_BambooHarvestEntity_$46_storage_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity" - } - }, - "id": 6, - "nodeType": "ArrayTypeName", - "src": "225:27:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BambooHarvestEntity_$46_storage_$dyn_storage_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity[]" - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 15, - "nodeType": "Block", - "src": "352:31:0", - "statements": [ - { - "expression": { - "id": 13, - "name": "records", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "369:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BambooHarvestEntity_$46_storage_$dyn_storage", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity storage ref[] storage ref" - } - }, - "functionReturnParameters": 12, - "id": 14, - "nodeType": "Return", - "src": "362:14:0" - } - ] - }, - "functionSelector": "a7f9fe72", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAllRecords", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "289:2:0" - }, - "returnParameters": { - "id": 12, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "312:34:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BambooHarvestEntity_$46_memory_ptr_$dyn_memory_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity[]" - }, - "typeName": { - "baseType": { - "id": 9, - "name": "model.BambooHarvestEntity", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 46, - "src": "312:25:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_BambooHarvestEntity_$46_storage_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity" - } - }, - "id": 10, - "nodeType": "ArrayTypeName", - "src": "312:27:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BambooHarvestEntity_$46_storage_$dyn_storage_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity[]" - } - }, - "visibility": "internal" - } - ], - "src": "311:36:0" - }, - "scope": 33, - "src": "267:116:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 31, - "nodeType": "Block", - "src": "515:58:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 26, - "name": "record", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "538:6:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_BambooHarvestEntity_$46_memory_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_BambooHarvestEntity_$46_memory_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity memory" - } - ], - "expression": { - "id": 23, - "name": "records", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "525:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BambooHarvestEntity_$46_storage_$dyn_storage", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity storage ref[] storage ref" - } - }, - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "src": "525:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_BambooHarvestEntity_$46_storage_$returns$__$", - "typeString": "function (struct SupplyChainAppDataModelLib.BambooHarvestEntity storage ref)" - } - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "525:20:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 28, - "nodeType": "ExpressionStatement", - "src": "525:20:0" - }, - { - "expression": { - "hexValue": "74727565", - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "562:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 22, - "id": 30, - "nodeType": "Return", - "src": "555:11:0" - } - ] - }, - "functionSelector": "317ffe39", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "insertRecord", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "record", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "420:39:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_BambooHarvestEntity_$46_memory_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity" - }, - "typeName": { - "id": 17, - "name": "model.BambooHarvestEntity", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 46, - "src": "420:25:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_BambooHarvestEntity_$46_storage_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BambooHarvestEntity" - } - }, - "visibility": "internal" - } - ], - "src": "410:55:0" - }, - "returnParameters": { - "id": 22, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 21, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "497:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 20, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "497:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "496:14:0" - }, - "scope": 33, - "src": "389:184:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 34, - "src": "185:390:0" - } - ], - "src": "40:536:0" - }, - "functionHashes": { - "getAllRecords()": "a7f9fe72", - "insertRecord((string,string,string,string,string))": "317ffe39" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "408000", - "executionCost": "443", - "totalCost": "408443" - }, - "external": { - "getAllRecords()": "infinite", - "insertRecord((string,string,string,string,string))": "infinite" - } - } -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-backend/src/main/json/generated/BookshelfRepository.json b/examples/cactus-example-supply-chain-backend/src/main/json/generated/BookshelfRepository.json deleted file mode 100644 index d2b7bff928..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/json/generated/BookshelfRepository.json +++ /dev/null @@ -1,475 +0,0 @@ -{ - "contractName": "BookshelfRepository", - "abi": [ - { - "inputs": [], - "name": "getAllRecords", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint8", - "name": "shelfCount", - "type": "uint8" - }, - { - "internalType": "string", - "name": "bambooHarvestId", - "type": "string" - } - ], - "internalType": "struct SupplyChainAppDataModelLib.BookshelfEntity[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint8", - "name": "shelfCount", - "type": "uint8" - }, - { - "internalType": "string", - "name": "bambooHarvestId", - "type": "string" - } - ], - "internalType": "struct SupplyChainAppDataModelLib.BookshelfEntity", - "name": "record", - "type": "tuple" - } - ], - "name": "insertRecord", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.7.2+commit.51b20bc0\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"getAllRecords\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"shelfCount\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"bambooHarvestId\",\"type\":\"string\"}],\"internalType\":\"struct SupplyChainAppDataModelLib.BookshelfEntity[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"shelfCount\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"bambooHarvestId\",\"type\":\"string\"}],\"internalType\":\"struct SupplyChainAppDataModelLib.BookshelfEntity\",\"name\":\"record\",\"type\":\"tuple\"}],\"name\":\"insertRecord\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/BookshelfRepository .sol\":\"BookshelfRepository\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/BookshelfRepository .sol\":{\"keccak256\":\"0x248c47dc1db0d699c7eb74570b5635041b98865923a3224ce02eabc89ec9dfb7\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://6ebcebbc47972173f07a3c5333994d5f5ee42ba29073c775d5a4de152cc447da\",\"dweb:/ipfs/Qmdq6NRhvYHKZbrxN2cmjjmAXC1QRFbWVxh6NKfYrNufCN\"]},\"/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/SupplyChainAppDataModel.sol\":{\"keccak256\":\"0x3b81c53307c147314b6383d426ca1eca6c7101d58c2cda5a7c1ec968001ed085\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://a380e2a234fbcd6886d9c06246514c0481a376789f81575ebe43c7b193e939cd\",\"dweb:/ipfs/QmVZdUSp7HJGbfrh5vouCmCkfqdk53Zkv6K3Bn1E3xCtte\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b5061056f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634735f16c1461003b578063a7f9fe7214610064575b600080fd5b61004e61004936600461039e565b610079565b60405161005b919061052e565b60405180910390f35b61006c6100ff565b60405161005b919061049d565b600080546001810182558180528251805184926003027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56301916100c191839160200190610291565b5060208281015160018301805460ff191660ff909216919091179055604083015180516100f49260028501920190610291565b506001949350505050565b60606000805480602002602001604051908101604052809291908181526020016000905b828210156102885760008481526020908190206040805160038602909201805460026001821615610100026000190190911604601f81018590049094028301608090810190925260608301848152929390928492909184918401828280156101cc5780601f106101a1576101008083540402835291602001916101cc565b820191906000526020600020905b8154815290600101906020018083116101af57829003601f168201915b505050918352505060018281015460ff16602080840191909152600280850180546040805161010096831615969096026000190190911692909204601f810184900484028501840183528085529190940193918301828280156102705780601f1061024557610100808354040283529160200191610270565b820191906000526020600020905b81548152906001019060200180831161025357829003601f168201915b50505050508152505081526020019060010190610123565b50505050905090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106102d257805160ff19168380011785556102ff565b828001600101855582156102ff579182015b828111156102ff5782518255916020019190600101906102e4565b5061030b92915061030f565b5090565b5b8082111561030b5760008155600101610310565b600082601f830112610334578081fd5b813567ffffffffffffffff8082111561034957fe5b604051601f8301601f19168101602001828111828210171561036757fe5b60405282815292508284830160200186101561038257600080fd5b8260208601602083013760006020848301015250505092915050565b6000602082840312156103af578081fd5b813567ffffffffffffffff808211156103c6578283fd5b90830190606082860312156103d9578283fd5b6040516060810181811083821117156103ee57fe5b6040528235828111156103ff578485fd5b61040b87828601610324565b825250602083013560ff81168114610421578485fd5b6020820152604083013582811115610437578485fd5b61044387828601610324565b60408301525095945050505050565b60008151808452815b818110156104775760208185018101518683018201520161045b565b818111156104885782602083870101525b50601f01601f19169290920160200192915050565b60208082528251828201819052600091906040908185019080840286018301878501865b8381101561052057603f198984030185528151606081518186526104e782870182610452565b91505060ff8983015116898601528782015191508481038886015261050c8183610452565b9689019694505050908601906001016104c1565b509098975050505050505050565b90151581526020019056fea26469706673582212205c6598bb40d1b52a4bc44e7f613cad73fff720e28de9803d0a1a5ee91ea0dffa64736f6c63430007020033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100365760003560e01c80634735f16c1461003b578063a7f9fe7214610064575b600080fd5b61004e61004936600461039e565b610079565b60405161005b919061052e565b60405180910390f35b61006c6100ff565b60405161005b919061049d565b600080546001810182558180528251805184926003027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56301916100c191839160200190610291565b5060208281015160018301805460ff191660ff909216919091179055604083015180516100f49260028501920190610291565b506001949350505050565b60606000805480602002602001604051908101604052809291908181526020016000905b828210156102885760008481526020908190206040805160038602909201805460026001821615610100026000190190911604601f81018590049094028301608090810190925260608301848152929390928492909184918401828280156101cc5780601f106101a1576101008083540402835291602001916101cc565b820191906000526020600020905b8154815290600101906020018083116101af57829003601f168201915b505050918352505060018281015460ff16602080840191909152600280850180546040805161010096831615969096026000190190911692909204601f810184900484028501840183528085529190940193918301828280156102705780601f1061024557610100808354040283529160200191610270565b820191906000526020600020905b81548152906001019060200180831161025357829003601f168201915b50505050508152505081526020019060010190610123565b50505050905090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106102d257805160ff19168380011785556102ff565b828001600101855582156102ff579182015b828111156102ff5782518255916020019190600101906102e4565b5061030b92915061030f565b5090565b5b8082111561030b5760008155600101610310565b600082601f830112610334578081fd5b813567ffffffffffffffff8082111561034957fe5b604051601f8301601f19168101602001828111828210171561036757fe5b60405282815292508284830160200186101561038257600080fd5b8260208601602083013760006020848301015250505092915050565b6000602082840312156103af578081fd5b813567ffffffffffffffff808211156103c6578283fd5b90830190606082860312156103d9578283fd5b6040516060810181811083821117156103ee57fe5b6040528235828111156103ff578485fd5b61040b87828601610324565b825250602083013560ff81168114610421578485fd5b6020820152604083013582811115610437578485fd5b61044387828601610324565b60408301525095945050505050565b60008151808452815b818110156104775760208185018101518683018201520161045b565b818111156104885782602083870101525b50601f01601f19169290920160200192915050565b60208082528251828201819052600091906040908185019080840286018301878501865b8381101561052057603f198984030185528151606081518186526104e782870182610452565b91505060ff8983015116898601528782015191508481038886015261050c8183610452565b9689019694505050908601906001016104c1565b509098975050505050505050565b90151581526020019056fea26469706673582212205c6598bb40d1b52a4bc44e7f613cad73fff720e28de9803d0a1a5ee91ea0dffa64736f6c63430007020033", - "sourceMap": "185:374:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "185:374:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;377:180;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;259:112;;;:::i;:::-;;;;;;;:::i;377:180::-;481:12;509:20;;;;;;;;;;;;;;522:6;;509:20;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;509:20:0;;;;;;;;;;-1:-1:-1;;509:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;546:4:0;;377:180;-1:-1:-1;;;;377:180:0:o;259:112::-;304:30;357:7;350:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;350:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;350:14:0;;;-1:-1:-1;;350:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;350:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;259:112;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:711:2;;112:3;105:4;97:6;93:17;89:27;79:2;;134:5;127;120:20;79:2;178:6;165:20;204:18;245:2;237:6;234:14;231:2;;;251:9;231:2;291;285:9;364:2;341:17;;-1:-1:-1;;337:31:2;325:44;;371:4;321:55;391:18;;;411:22;;;388:46;385:2;;;437:9;385:2;464;457:22;512;;;497:6;-1:-1:-1;497:6:2;553:19;;;574:4;549:30;546:39;-1:-1:-1;543:2:2;;;598:1;595;588:12;543:2;662:6;655:4;647:6;643:17;636:4;628:6;624:17;611:58;717:1;710:4;701:6;693;689:19;685:30;678:41;;;;69:656;;;;:::o;730:1140::-;;873:2;861:9;852:7;848:23;844:32;841:2;;;894:6;886;879:22;841:2;939:9;926:23;968:18;1009:2;1001:6;998:14;995:2;;;1030:6;1022;1015:22;995:2;1058:22;;;;1114:4;1096:16;;;1092:27;1089:2;;;1137:6;1129;1122:22;1089:2;1175;1169:9;1217:4;1209:6;1205:17;1272:6;1260:10;1257:22;1252:2;1240:10;1237:18;1234:46;1231:2;;;1283:9;1231:2;1310;1303:22;1350:16;;1378;;;1375:2;;;1412:6;1404;1397:22;1375:2;1445:47;1484:7;1473:8;1469:2;1465:17;1445:47;:::i;:::-;1437:6;1430:63;;1536:2;1532;1528:11;1515:25;1580:4;1573:5;1569:16;1562:5;1559:27;1549:2;;1605:6;1597;1590:22;1549:2;1642;1630:15;;1623:30;1699:2;1691:11;;1678:25;1715:16;;;1712:2;;;1749:6;1741;1734:22;1712:2;1791:47;1830:7;1819:8;1815:2;1811:17;1791:47;:::i;:::-;1786:2;1774:15;;1767:72;-1:-1:-1;1778:6:2;831:1039;-1:-1:-1;;;;;831:1039:2:o;1875:478::-;;1957:5;1951:12;1984:6;1979:3;1972:19;2009:3;2021:162;2035:6;2032:1;2029:13;2021:162;;;2097:4;2153:13;;;2149:22;;2143:29;2125:11;;;2121:20;;2114:59;2050:12;2021:162;;;2201:6;2198:1;2195:13;2192:2;;;2267:3;2260:4;2251:6;2246:3;2242:16;2238:27;2231:40;2192:2;-1:-1:-1;2335:2:2;2314:15;-1:-1:-1;;2310:29:2;2301:39;;;;2342:4;2297:50;;1927:426;-1:-1:-1;;1927:426:2:o;2358:1263::-;2591:2;2643:21;;;2713:13;;2616:18;;;2735:22;;;2358:1263;;2591:2;2776;;2794:18;;;;2854:15;;;2839:31;;2835:40;;2898:15;;;2358:1263;2944:648;2958:6;2955:1;2952:13;2944:648;;;3051:2;3047:7;3035:9;3027:6;3023:22;3019:36;3014:3;3007:49;3085:6;3079:13;3115:4;3158:2;3152:9;3189:2;3181:6;3174:18;3219:50;3265:2;3257:6;3253:15;3239:12;3219:50;:::i;:::-;3205:64;;;3330:4;3324:2;3320;3316:11;3310:18;3306:29;3301:2;3293:6;3289:15;3282:54;3385:2;3381;3377:11;3371:18;3349:40;;3438:6;3430;3426:19;3421:2;3413:6;3409:15;3402:44;3469:43;3505:6;3489:14;3469:43;:::i;:::-;3570:12;;;;3459:53;-1:-1:-1;;;3535:15:2;;;;2980:1;2973:9;2944:648;;;-1:-1:-1;3609:6:2;;2571:1050;-1:-1:-1;;;;;;;;2571:1050:2:o;3626:187::-;3791:14;;3784:22;3766:41;;3754:2;3739:18;;3721:92::o", - "sourcePath": "/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/BookshelfRepository .sol", - "compiler": { - "name": "solc", - "version": "0.7.2+commit.51b20bc0" - }, - "networks": {}, - "ast": { - "absolutePath": "/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/BookshelfRepository .sol", - "exportedSymbols": { - "BookshelfRepository": [ - 33 - ], - "model": [ - 54 - ] - }, - "id": 34, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "40:23:0" - }, - { - "id": 2, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "64:33:0" - }, - { - "absolutePath": "/home/peter/a/blockchain/cactus/packages/cactus-example-supply-chain-backend/src/main/solidity/SupplyChainAppDataModel.sol", - "file": "./SupplyChainAppDataModel.sol", - "id": 4, - "nodeType": "ImportDirective", - "scope": 34, - "sourceUnit": 55, - "src": "99:84:0", - "symbolAliases": [ - { - "foreign": { - "id": 3, - "name": "SupplyChainAppDataModelLib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "src": "108:26:0", - "typeDescriptions": {} - }, - "local": "model" - } - ], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": [ - 33 - ], - "name": "BookshelfRepository", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "records", - "nodeType": "VariableDeclaration", - "scope": 33, - "src": "221:31:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BookshelfEntity_$53_storage_$dyn_storage", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity[]" - }, - "typeName": { - "baseType": { - "id": 5, - "name": "model.BookshelfEntity", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 53, - "src": "221:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_BookshelfEntity_$53_storage_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity" - } - }, - "id": 6, - "nodeType": "ArrayTypeName", - "src": "221:23:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BookshelfEntity_$53_storage_$dyn_storage_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity[]" - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 15, - "nodeType": "Block", - "src": "340:31:0", - "statements": [ - { - "expression": { - "id": 13, - "name": "records", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "357:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BookshelfEntity_$53_storage_$dyn_storage", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity storage ref[] storage ref" - } - }, - "functionReturnParameters": 12, - "id": 14, - "nodeType": "Return", - "src": "350:14:0" - } - ] - }, - "functionSelector": "a7f9fe72", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAllRecords", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "281:2:0" - }, - "returnParameters": { - "id": 12, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "304:30:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BookshelfEntity_$53_memory_ptr_$dyn_memory_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity[]" - }, - "typeName": { - "baseType": { - "id": 9, - "name": "model.BookshelfEntity", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 53, - "src": "304:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_BookshelfEntity_$53_storage_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity" - } - }, - "id": 10, - "nodeType": "ArrayTypeName", - "src": "304:23:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BookshelfEntity_$53_storage_$dyn_storage_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity[]" - } - }, - "visibility": "internal" - } - ], - "src": "303:32:0" - }, - "scope": 33, - "src": "259:112:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 31, - "nodeType": "Block", - "src": "499:58:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 26, - "name": "record", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "522:6:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_BookshelfEntity_$53_memory_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_BookshelfEntity_$53_memory_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity memory" - } - ], - "expression": { - "id": 23, - "name": "records", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "509:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_BookshelfEntity_$53_storage_$dyn_storage", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity storage ref[] storage ref" - } - }, - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "src": "509:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_BookshelfEntity_$53_storage_$returns$__$", - "typeString": "function (struct SupplyChainAppDataModelLib.BookshelfEntity storage ref)" - } - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "509:20:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 28, - "nodeType": "ExpressionStatement", - "src": "509:20:0" - }, - { - "expression": { - "hexValue": "74727565", - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "546:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 22, - "id": 30, - "nodeType": "Return", - "src": "539:11:0" - } - ] - }, - "functionSelector": "4735f16c", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "insertRecord", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 19, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "record", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "408:35:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_BookshelfEntity_$53_memory_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity" - }, - "typeName": { - "id": 17, - "name": "model.BookshelfEntity", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 53, - "src": "408:21:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_BookshelfEntity_$53_storage_ptr", - "typeString": "struct SupplyChainAppDataModelLib.BookshelfEntity" - } - }, - "visibility": "internal" - } - ], - "src": "398:51:0" - }, - "returnParameters": { - "id": 22, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 21, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "481:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 20, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "481:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "480:14:0" - }, - "scope": 33, - "src": "377:180:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 34, - "src": "185:374:0" - } - ], - "src": "40:520:0" - }, - "functionHashes": { - "getAllRecords()": "a7f9fe72", - "insertRecord((string,uint8,string))": "4735f16c" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "278200", - "executionCost": "318", - "totalCost": "278518" - }, - "external": { - "getAllRecords()": "infinite", - "insertRecord((string,uint8,string))": "infinite" - } - } -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-backend/src/main/solidity/BambooHarvestRepository.sol b/examples/cactus-example-supply-chain-backend/src/main/solidity/BambooHarvestRepository.sol deleted file mode 100644 index 4bc2a27e12..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/solidity/BambooHarvestRepository.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -pragma solidity ^0.8.0; -pragma experimental ABIEncoderV2; - -import { SupplyChainAppDataModelLib as model } from "./SupplyChainAppDataModel.sol"; - -contract BambooHarvestRepository { - - model.BambooHarvestEntity[] records; - - function getAllRecords() public view returns(model.BambooHarvestEntity[] memory) - { - return records; - } - - function insertRecord( - model.BambooHarvestEntity memory record - ) - public - returns(bool success) - { - records.push(record); - return true; - } -} diff --git a/examples/cactus-example-supply-chain-backend/src/main/solidity/BookshelfRepository .sol b/examples/cactus-example-supply-chain-backend/src/main/solidity/BookshelfRepository .sol deleted file mode 100644 index 3b29d0929f..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/solidity/BookshelfRepository .sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -pragma solidity ^0.8.0; -pragma experimental ABIEncoderV2; - -import { SupplyChainAppDataModelLib as model } from "./SupplyChainAppDataModel.sol"; - -contract BookshelfRepository { - - model.BookshelfEntity[] records; - - function getAllRecords() public view returns(model.BookshelfEntity[] memory) - { - return records; - } - - function insertRecord( - model.BookshelfEntity memory record - ) - public - returns(bool success) - { - records.push(record); - return true; - } -} diff --git a/examples/cactus-example-supply-chain-backend/src/main/solidity/SupplyChainAppDataModel.sol b/examples/cactus-example-supply-chain-backend/src/main/solidity/SupplyChainAppDataModel.sol deleted file mode 100644 index 8b6a3040ac..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/solidity/SupplyChainAppDataModel.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -pragma solidity ^0.7.0; - -library SupplyChainAppDataModelLib { - - struct BambooHarvestEntity { - string id; - string location; - string startedAt; - string endedAt; - string harvester; - } - - struct BookshelfEntity { - string id; - uint8 shelfCount; - string bambooHarvestId; - } -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-backend/src/main/typescript/index.ts b/examples/cactus-example-supply-chain-backend/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/examples/cactus-example-supply-chain-backend/src/main/typescript/index.web.ts b/examples/cactus-example-supply-chain-backend/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/examples/cactus-example-supply-chain-backend/src/main/typescript/infrastructure/shipment-golang-contract-pinned-dependencies.ts b/examples/cactus-example-supply-chain-backend/src/main/typescript/infrastructure/shipment-golang-contract-pinned-dependencies.ts deleted file mode 100644 index 4f5bab11b2..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/typescript/infrastructure/shipment-golang-contract-pinned-dependencies.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * These are the pinned dependencies used to build the go source code that is - * located in the file at: - * examples/cactus-example-supply-chain-backend/src/main/go/shipment.ts - */ -export const SHIPMENT_GOLANG_CONTRACT_PINNED_DEPENDENCIES = [ - "github.com/hyperledger/fabric-chaincode-go@v0.0.0-20240124143825-7dec3c7e7d45", - "github.com/hyperledger/fabric-contract-api-go@v1.2.2", - "github.com/hyperledger/fabric-protos-go@v0.3.3", - "github.com/hyperledger/fabric-samples/asset-transfer-private-data/chaincode-go@v0.0.0-20240226031326-db86460086c0", - "github.com/stretchr/testify@v1.8.4", - "google.golang.org/protobuf@v1.32.0", - "github.com/davecgh/go-spew@v1.1.1", // indirect - "github.com/go-openapi/jsonpointer@v0.20.0", // indirect - "github.com/go-openapi/jsonreference@v0.20.2", // indirect - "github.com/go-openapi/spec@v0.20.9", // indirect - "github.com/go-openapi/swag@v0.22.4", // indirect - "github.com/gobuffalo/envy@v1.10.2", // indirect - "github.com/gobuffalo/packd@v1.0.2", // indirect - "github.com/gobuffalo/packr@v1.30.1", // indirect - "github.com/golang/protobuf@v1.5.3", // indirect - "github.com/joho/godotenv@v1.5.1", // indirect - "github.com/josharian/intern@v1.0.0", // indirect - "github.com/mailru/easyjson@v0.7.7", // indirect - "github.com/pmezard/go-difflib@v1.0.0", // indirect - "github.com/rogpeppe/go-internal@v1.11.0", // indirect - "github.com/xeipuuv/gojsonpointer@v0.0.0-20190905194746-02993c407bfb", // indirect - "github.com/xeipuuv/gojsonreference@v0.0.0-20180127040603-bd5ef7bd5415", // indirect - "github.com/xeipuuv/gojsonschema@v1.2.0", // indirect - "golang.org/x/mod@v0.14.0", // indirect - "golang.org/x/net@v0.20.0", // indirect - "golang.org/x/sys@v0.16.0", // indirect - "golang.org/x/text@v0.14.0", // indirect - "google.golang.org/genproto/googleapis/rpc@v0.0.0-20231030173426-d783a09b4405", // indirect - "google.golang.org/grpc@v1.59.0", // indirect - "gopkg.in/yaml.v3@v3.0.1", // indirect -]; diff --git a/examples/cactus-example-supply-chain-backend/src/main/typescript/infrastructure/supply-chain-app-dummy-infrastructure.ts b/examples/cactus-example-supply-chain-backend/src/main/typescript/infrastructure/supply-chain-app-dummy-infrastructure.ts deleted file mode 100644 index 69fb668c17..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/typescript/infrastructure/supply-chain-app-dummy-infrastructure.ts +++ /dev/null @@ -1,351 +0,0 @@ -import { Account } from "web3-core"; -import { v4 as uuidv4 } from "uuid"; -import { DiscoveryOptions } from "fabric-network"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginLedgerConnectorBesu } from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - PluginLedgerConnectorXdai, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-xdai"; -import { IPluginKeychain } from "@hyperledger/cactus-core-api"; -import { FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1 } from "@hyperledger/cactus-test-tooling"; -import { FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2 } from "@hyperledger/cactus-test-tooling"; -import { - BesuTestLedger, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FabricTestLedgerV1, -} from "@hyperledger/cactus-test-tooling"; -import { - IEthContractDeployment, - ISupplyChainContractDeploymentInfo, - IFabricContractDeployment, -} from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; -import { - PluginLedgerConnectorFabric, - DefaultEventHandlerStrategy, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -import BambooHarvestRepositoryJSON from "../../json/generated/BambooHarvestRepository.json"; -import BookshelfRepositoryJSON from "../../json/generated/BookshelfRepository.json"; -import { SHIPMENT_CONTRACT_GO_SOURCE } from "../../go/shipment"; -import { SHIPMENT_GOLANG_CONTRACT_PINNED_DEPENDENCIES } from "./shipment-golang-contract-pinned-dependencies"; - -export interface ISupplyChainAppDummyInfrastructureOptions { - logLevel?: LogLevelDesc; - keychain?: IPluginKeychain; -} - -function ledgerStopFailErrorMsg(ledgerName: Readonly): string { - return ( - `Failed to stop ${ledgerName} ledger. This is most likely safe to ignore if the ` + - `error states that the container was not running to begin with. This usually means` + - `that the process exited before the application boot has finished and it did not` + - `have enough time to start launching the ${ledgerName} ledger yet.` - ); -} - -/** - * Contains code that is meant to simulate parts of a production grade deployment - * that would otherwise not be part of the application itself. - * - * The reason for this being in existence is so that we can have tutorials that - * are self-contained instead of starting with a multi-hour setup process where - * the user is expected to set up ledgers from scratch with all the bells and - * whistles. - * The sole purpose of this is to have people ramp up with Cactus as fast as - * possible. - */ -export class SupplyChainAppDummyInfrastructure { - public static readonly CLASS_NAME = "SupplyChainAppDummyInfrastructure"; - - public readonly besu: BesuTestLedger; - public readonly xdaiBesu: BesuTestLedger; - public readonly fabric: FabricTestLedgerV1; - public readonly keychain: IPluginKeychain; - private readonly log: Logger; - private _xdaiAccount?: Account; - private _besuAccount?: Account; - - public get xdaiAccount(): Account { - if (!this._xdaiAccount) { - throw new Error(`Must call deployContracts() first.`); - } else { - return this._xdaiAccount; - } - } - - public get besuAccount(): Account { - if (!this._besuAccount) { - throw new Error(`Must call deployContracts() first.`); - } else { - return this._besuAccount; - } - } - - public get className(): string { - return SupplyChainAppDummyInfrastructure.CLASS_NAME; - } - - constructor( - public readonly options: ISupplyChainAppDummyInfrastructureOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.besu = new BesuTestLedger({ - logLevel: level, - emitContainerLogs: true, - }); - this.xdaiBesu = new BesuTestLedger({ - logLevel: level, - emitContainerLogs: true, - }); - this.fabric = new FabricTestLedgerV1({ - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - logLevel: level, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - emitContainerLogs: true, - }); - - if (this.options.keychain) { - this.keychain = this.options.keychain; - this.log.info("Reusing the provided keychain plugin..."); - } else { - this.log.info("Instantiating new keychain plugin..."); - this.keychain = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel: this.options.logLevel || "INFO", - }); - } - this.log.info("KeychainID=%o", this.keychain.getKeychainId()); - } - - public async stop(): Promise { - try { - this.log.info(`Stopping...`); - await Promise.allSettled([ - this.besu - .stop() - .then(() => this.besu.destroy()) - .catch((ex) => this.log.warn(ledgerStopFailErrorMsg("Besu"), ex)), - this.xdaiBesu - .stop() - .then(() => this.xdaiBesu.destroy()) - .catch((ex) => this.log.warn(ledgerStopFailErrorMsg("BesuXdai"), ex)), - this.fabric - .stop() - .then(() => this.fabric.destroy()) - .catch((ex) => this.log.warn(ledgerStopFailErrorMsg("Fabric"), ex)), - ]); - this.log.info(`Ledgers of dummy infrastructure Stopped OK`); - } catch (ex) { - this.log.error(`Stopping crashed: `, ex); - throw ex; - } - } - - public async start(): Promise { - try { - this.log.info(`Starting dummy infrastructure...`); - await this.fabric.start({ omitPull: false }); - await this.besu.start(); - await this.xdaiBesu.start(); - this.log.info(`Started dummy infrastructure OK`); - } catch (ex) { - this.log.error(`Starting of dummy infrastructure crashed: `, ex); - throw ex; - } - } - - public async deployContracts(): Promise { - try { - this.log.info(`Deploying example supply chain app smart contracts...`); - - await this.keychain.set( - BookshelfRepositoryJSON.contractName, - JSON.stringify(BookshelfRepositoryJSON), - ); - await this.keychain.set( - BambooHarvestRepositoryJSON.contractName, - JSON.stringify(BambooHarvestRepositoryJSON), - ); - - const bookshelfRepository = await this.deployBesuContract(); - const bambooHarvestRepository = await this.deployXdaiContract(); - const shipmentRepository = await this.deployFabricContract(); - - const out: ISupplyChainContractDeploymentInfo = { - bambooHarvestRepository, - bookshelfRepository, - shipmentRepository, - }; - - this.log.info(`Deployed example supply chain app smart contracts OK`); - - return out; - } catch (ex: unknown) { - this.log.error(`Deployment of smart contracts crashed: `, ex); - throw ex; - } - } - - public async deployXdaiContract(): Promise { - this.log.debug("ENTER deployXdaiContract()"); - - this._xdaiAccount = await this.xdaiBesu.createEthTestAccount(2000000); - this.log.debug("Created test ledger account with initial balance OK"); - - const rpcApiHttpHost = await this.xdaiBesu.getRpcApiHttpHost(); - this.log.debug("Xdai test ledger rpcApiHttpHost=%s", rpcApiHttpHost); - - const pluginRegistry = new PluginRegistry(); - pluginRegistry.add(this.keychain); - const connector = new PluginLedgerConnectorXdai({ - instanceId: "PluginLedgerConnectorXdai_Contract_Deployment", - rpcApiHttpHost, - logLevel: this.options.logLevel, - pluginRegistry, - }); - - this.log.debug("Instantiated Xdai connector plugin OK"); - - const res = await connector.deployContract({ - contractName: BambooHarvestRepositoryJSON.contractName, - gas: 1000000, - web3SigningCredential: { - ethAccount: this.xdaiAccount.address, - secret: this.xdaiAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - keychainId: this.keychain.getKeychainId(), - }); - const { - transactionReceipt: { contractAddress }, - } = res; - - const bambooHarvestRepository: IEthContractDeployment = { - abi: BambooHarvestRepositoryJSON.abi, - address: contractAddress as string, - bytecode: BambooHarvestRepositoryJSON.bytecode, - contractName: BambooHarvestRepositoryJSON.contractName, - keychainId: this.keychain.getKeychainId(), - }; - - return bambooHarvestRepository; - } - - public async deployBesuContract(): Promise { - this._besuAccount = await this.besu.createEthTestAccount(2000000); - const rpcApiHttpHost = await this.besu.getRpcApiHttpHost(); - const rpcApiWsHost = await this.besu.getRpcApiWsHost(); - - const pluginRegistry = new PluginRegistry(); - pluginRegistry.add(this.keychain); - const connector = new PluginLedgerConnectorBesu({ - instanceId: "PluginLedgerConnectorBesu_Contract_Deployment", - rpcApiHttpHost, - rpcApiWsHost, - logLevel: this.options.logLevel, - pluginRegistry, - }); - - const res = await connector.deployContract({ - contractName: BookshelfRepositoryJSON.contractName, - bytecode: BookshelfRepositoryJSON.bytecode, - contractAbi: BookshelfRepositoryJSON.abi, - constructorArgs: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: this.besuAccount.address, - secret: this.besuAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - keychainId: this.keychain.getKeychainId(), - }); - const { - transactionReceipt: { contractAddress }, - } = res; - - const bookshelfRepository: IEthContractDeployment = { - abi: BookshelfRepositoryJSON.abi, - address: contractAddress as string, - bytecode: BookshelfRepositoryJSON.bytecode, - contractName: BookshelfRepositoryJSON.contractName, - keychainId: this.keychain.getKeychainId(), - }; - - return bookshelfRepository; - } - - public async deployFabricContract(): Promise { - const connectionProfile = await this.fabric.getConnectionProfileOrg1(); - const sshConfig = await this.fabric.getSshConfig(); - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginRegistry = new PluginRegistry(); - pluginRegistry.add(this.keychain); - const connector = new PluginLedgerConnectorFabric({ - instanceId: "PluginLedgerConnectorFabric_Contract_Deployment", - dockerBinary: "/usr/local/bin/docker", - pluginRegistry, - peerBinary: "peer", - sshConfig: sshConfig, - logLevel: this.options.logLevel || "INFO", - connectionProfile: connectionProfile, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - discoveryOptions: discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - }, - }); - - const res = await connector.deployContractGoSourceV1({ - tlsRootCertFiles: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.CORE_PEER_TLS_ROOTCERT_FILE, - targetPeerAddresses: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.CORE_PEER_ADDRESS, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.CORE_PEER_ADDRESS, - ], - policyDslSource: "OR('Org1MSP.member','Org2MSP.member')", - channelId: "mychannel", - chainCodeVersion: "1.0.0", - constructorArgs: { Args: [] }, - goSource: { - body: Buffer.from(SHIPMENT_CONTRACT_GO_SOURCE).toString("base64"), - filename: "shipment.go", - }, - moduleName: "shipment", - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - pinnedDeps: SHIPMENT_GOLANG_CONTRACT_PINNED_DEPENDENCIES, - }); - this.log.debug("Supply chain app Fabric contract deployment result:", res); - - const shipmentRepository = { - chaincodeId: "shipment", - channelName: "mychannel", - }; - return shipmentRepository; - } -} diff --git a/examples/cactus-example-supply-chain-backend/src/main/typescript/public-api.ts b/examples/cactus-example-supply-chain-backend/src/main/typescript/public-api.ts deleted file mode 100755 index 7f597658d2..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/typescript/public-api.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { SUPPLY_CHAIN_APP_OK_LOG_MSG_PATTERN } from "./supply-chain-app"; -export { SupplyChainApp } from "./supply-chain-app"; -export { ISupplyChainAppOptions } from "./supply-chain-app"; -export { launchApp } from "./supply-chain-app-cli"; diff --git a/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app-cli.ts b/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app-cli.ts deleted file mode 100755 index d38d55f29f..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app-cli.ts +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env node - -import { ConfigService } from "@hyperledger/cactus-cmd-api-server"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { ISupplyChainAppOptions, SupplyChainApp } from "./supply-chain-app"; - -export async function launchApp( - env?: NodeJS.ProcessEnv, - args?: string[], -): Promise { - const configService = new ConfigService(); - const config = await configService.getOrCreate({ args, env }); - const serverOptions = config.getProperties(); - LoggerProvider.setLogLevel(serverOptions.logLevel); - - const appOptions: ISupplyChainAppOptions = { - logLevel: serverOptions.logLevel, - }; - const supplyChainApp = new SupplyChainApp(appOptions); - try { - await supplyChainApp.start(); - } catch (ex) { - console.error(`SupplyChainApp crashed. Existing...`, ex); - await supplyChainApp.stop(); - process.exit(-1); - } -} - -if (require.main === module) { - launchApp(process.env, process.argv); -} diff --git a/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app.ts b/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app.ts deleted file mode 100644 index c043f224e7..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app.ts +++ /dev/null @@ -1,662 +0,0 @@ -import { AddressInfo } from "net"; -import { Server } from "http"; - -import { - exportPKCS8, - generateKeyPair, - KeyLike, - exportSPKI, - SignJWT, -} from "jose"; -import expressJwt from "express-jwt"; - -import { v4 as uuidv4 } from "uuid"; -import exitHook, { IAsyncExitHookDoneCallback } from "async-exit-hook"; - -import { - CactusNode, - Consortium, - ConsortiumDatabase, - ConsortiumMember, - IPluginKeychain, - Ledger, - LedgerType, -} from "@hyperledger/cactus-core-api"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Servers, - IJoseFittingJwtParams, -} from "@hyperledger/cactus-common"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, - IAuthorizationConfig, -} from "@hyperledger/cactus-cmd-api-server"; - -import { PluginConsortiumManual } from "@hyperledger/cactus-plugin-consortium-manual"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import { - PluginLedgerConnectorXdai, - Web3SigningCredentialType, - DefaultApi as XdaiApi, -} from "@hyperledger/cactus-plugin-ledger-connector-xdai"; - -import { - PluginLedgerConnectorBesu, - DefaultApi as BesuApi, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - DefaultEventHandlerStrategy, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -import { FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1 } from "@hyperledger/cactus-test-tooling"; - -import { SupplyChainAppDummyInfrastructure } from "./infrastructure/supply-chain-app-dummy-infrastructure"; -import { - Configuration, - DefaultApi as SupplyChainApi, -} from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; -import { SupplyChainCactusPlugin } from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; -import { DiscoveryOptions } from "fabric-network"; - -/** - * The log pattern message that will be printed on stdout when the - * Supply Chain Application finished booting (it can take a long time). - */ -export const SUPPLY_CHAIN_APP_OK_LOG_MSG_PATTERN = - "Cacti API Server - REST API reachable at:"; - -export interface ISupplyChainAppOptions { - disableSignalHandlers?: true; - logLevel?: LogLevelDesc; - keychain?: IPluginKeychain; -} - -export type ShutdownHook = () => Promise; -//TODO: Generate fabric connector and set in the pluginRegistry -export class SupplyChainApp { - private readonly log: Logger; - private readonly shutdownHooks: ShutdownHook[]; - private readonly ledgers: SupplyChainAppDummyInfrastructure; - public readonly keychain: IPluginKeychain; - private _besuApiClient?: BesuApi; - private _xdaiApiClient?: XdaiApi; - private _fabricApiClient?: FabricApi; - private authorizationConfig?: IAuthorizationConfig; - private token?: string; - - public get besuApiClientOrThrow(): BesuApi { - if (this._besuApiClient) { - return this._besuApiClient; - } else { - throw new Error("Invalid state: ledgers were not started yet."); - } - } - - public get xdaiApiClientOrThrow(): XdaiApi { - if (this._xdaiApiClient) { - return this._xdaiApiClient; - } else { - throw new Error("Invalid state: ledgers were not started yet."); - } - } - - public get fabricApiClientOrThrow(): FabricApi { - if (this._fabricApiClient) { - return this._fabricApiClient; - } else { - throw new Error("Invalid state: ledgers were not started yet."); - } - } - - public constructor(public readonly options: ISupplyChainAppOptions) { - const fnTag = "SupplyChainApp#constructor()"; - - if (!options) { - throw new Error(`${fnTag} options parameter is falsy`); - } - const { logLevel } = options; - - const level = logLevel || "INFO"; - const label = "supply-chain-app"; - this.log = LoggerProvider.getOrCreate({ level, label }); - - if (this.options.keychain) { - this.keychain = this.options.keychain; - this.log.info("Reusing the provided keychain plugin..."); - } else { - this.log.info("Instantiating new keychain plugin..."); - this.keychain = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel: this.options.logLevel || "INFO", - }); - } - this.log.info("KeychainID=%o", this.keychain.getKeychainId()); - - this.ledgers = new SupplyChainAppDummyInfrastructure({ - logLevel, - keychain: this.keychain, - }); - this.shutdownHooks = []; - } - - async getOrCreateToken(): Promise { - if (!this.token) { - await this.createAuthorizationConfig(); - } - return this.token as string; - } - - async getOrCreateAuthorizationConfig(): Promise { - if (!this.authorizationConfig) { - await this.createAuthorizationConfig(); - } - return this.authorizationConfig as IAuthorizationConfig; - } - - async createAuthorizationConfig(): Promise { - const jwtKeyPair = await generateKeyPair("RS256", { modulusLength: 4096 }); - const jwtPrivateKeyPem = await exportPKCS8(jwtKeyPair.privateKey); - const expressJwtOptions: expressJwt.Params & IJoseFittingJwtParams = { - algorithms: ["RS256"], - secret: jwtPrivateKeyPem, - audience: uuidv4(), - issuer: uuidv4(), - }; - - const jwtPayload = { name: "Peter", location: "London" }; - this.token = await new SignJWT(jwtPayload) - .setProtectedHeader({ - alg: "RS256", - }) - .setIssuer(expressJwtOptions.issuer) - .setAudience(expressJwtOptions.audience) - .sign(jwtKeyPair.privateKey); - - this.authorizationConfig = { - unprotectedEndpointExemptions: [], - expressJwtOptions, - socketIoJwtOptions: { - secret: jwtPrivateKeyPem, - }, - }; - } - - public async start(): Promise { - this.log.debug(`Starting SupplyChainApp...`); - - if (!this.options.disableSignalHandlers) { - exitHook((onHookDone: IAsyncExitHookDoneCallback) => { - this.log.info("Starting async-exit-hook for supply-chain-app ..."); - this.stop() - .catch((ex: unknown) => { - this.log.warn("Failed async-exit-hook for supply-chain-app", ex); - throw ex; - }) - .finally(() => { - this.log.info("Concluded async-exit-hook for supply-chain-app ..."); - onHookDone(); - }); - this.log.info("Started async-exit-hook for supply-chain-app OK"); - }); - this.log.info("Registered async-exit-hook for supply-chain-app shutdown"); - } - - this.onShutdown(async () => { - this.log.info("SupplyChainApp onShutdown() - stopping ledgers..."); - await this.ledgers.stop(); - this.log.info("SupplyChainApp onShutdown() - stopped ledgers OK"); - }); - await this.ledgers.start(); - - const contractsInfo = await this.ledgers.deployContracts(); - - const besuAccount = await this.ledgers.besu.createEthTestAccount(); - await this.keychain.set(besuAccount.address, besuAccount.privateKey); - const xdaiBesuAccount = await this.ledgers.xdaiBesu.createEthTestAccount(); - await this.keychain.set( - xdaiBesuAccount.address, - xdaiBesuAccount.privateKey, - ); - - const enrollAdminOut = await this.ledgers.fabric.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await this.ledgers.fabric.enrollUser(adminWallet); - const fabricUserKeychainKey = "user2"; - const fabricUserKeychainValue = JSON.stringify(userIdentity); - await this.keychain.set(fabricUserKeychainKey, fabricUserKeychainValue); - - // Reserve the ports where the Cactus nodes will run API servers, GUI - const httpApiA = await Servers.startOnPort(4000, "0.0.0.0"); - const httpApiB = await Servers.startOnPort(4100, "0.0.0.0"); - const httpApiC = await Servers.startOnPort(4200, "0.0.0.0"); - const httpGuiA = await Servers.startOnPort(3000, "0.0.0.0"); - const httpGuiB = await Servers.startOnPort(3100, "0.0.0.0"); - const httpGuiC = await Servers.startOnPort(3200, "0.0.0.0"); - - const addressInfoA = httpApiA.address() as AddressInfo; - const nodeApiHostA = `http://127.0.0.1:${addressInfoA.port}`; - - const addressInfoB = httpApiB.address() as AddressInfo; - const nodeApiHostB = `http://127.0.0.1:${addressInfoB.port}`; - - const addressInfoC = httpApiC.address() as AddressInfo; - const nodeApiHostC = `http://127.0.0.1:${addressInfoC.port}`; - - const token = await this.getOrCreateToken(); - const baseOptions = { headers: { Authorization: `Bearer ${token}` } }; - - const besuConfig = new Configuration({ - basePath: nodeApiHostA, - baseOptions, - }); - const xdaiBesuConfig = new Configuration({ - basePath: nodeApiHostB, - baseOptions, - }); - const fabricConfig = new Configuration({ - basePath: nodeApiHostC, - baseOptions, - }); - - const besuApiClient = new BesuApi(besuConfig); - const xdaiApiClient = new XdaiApi(xdaiBesuConfig); - const fabricApiClient = new FabricApi(fabricConfig); - - const keyPairA = await generateKeyPair("ES256K"); - const keyPairPemA = await exportPKCS8(keyPairA.privateKey); - - const keyPairB = await generateKeyPair("ES256K"); - const keyPairPemB = await exportPKCS8(keyPairB.privateKey); - - const keyPairC = await generateKeyPair("ES256K"); - const keyPairPemC = await exportPKCS8(keyPairC.privateKey); - - const consortiumDatabase = await this.createConsortium( - httpApiA, - httpApiB, - httpApiC, - keyPairA.publicKey, - keyPairB.publicKey, - keyPairC.publicKey, - ); - const consortiumPrettyJson = JSON.stringify(consortiumDatabase, null, 4); - this.log.info(`Created Consortium definition: %o`, consortiumPrettyJson); - - this.log.info(`Configuring Cactus Node for Ledger A...`); - const rpcApiHostA = await this.ledgers.besu.getRpcApiHttpHost(); - const rpcApiWsHostA = await this.ledgers.besu.getRpcApiWsHost(); - const rpcApiHostB = await this.ledgers.xdaiBesu.getRpcApiHttpHost(); - - const connectionProfile = - await this.ledgers.fabric.getConnectionProfileOrg1(); - const sshConfig = await this.ledgers.fabric.getSshConfig(); - - const registryA = new PluginRegistry({ - plugins: [ - new PluginConsortiumManual({ - instanceId: "PluginConsortiumManual_A", - consortiumDatabase, - keyPairPem: keyPairPemA, - logLevel: this.options.logLevel, - ctorArgs: { - baseOptions: { - headers: { Authorization: `Bearer ${token}` }, - }, - }, - }), - new SupplyChainCactusPlugin({ - logLevel: this.options.logLevel, - contracts: contractsInfo, - instanceId: uuidv4(), - besuApiClient, - xdaiApiClient, - fabricApiClient, - web3SigningCredential: { - keychainEntryKey: besuAccount.address, - keychainId: this.keychain.getKeychainId(), - type: Web3SigningCredentialType.CactusKeychainRef, - }, - }), - this.keychain, - ], - }); - - const connectorBesu = new PluginLedgerConnectorBesu({ - instanceId: "PluginLedgerConnectorBesu_A", - rpcApiHttpHost: rpcApiHostA, - rpcApiWsHost: rpcApiWsHostA, - pluginRegistry: registryA, - logLevel: this.options.logLevel, - }); - - registryA.add(connectorBesu); - - const apiServerA = await this.startNode(httpApiA, httpGuiA, registryA); - - this.log.info(`Configuring Cactus Node for Ledger B...`); - - const registryB = new PluginRegistry({ - plugins: [ - new PluginConsortiumManual({ - instanceId: "PluginConsortiumManual_B", - consortiumDatabase, - keyPairPem: keyPairPemB, - logLevel: this.options.logLevel, - ctorArgs: { - baseOptions: { - headers: { Authorization: `Bearer ${token}` }, - }, - }, - }), - new SupplyChainCactusPlugin({ - logLevel: this.options.logLevel, - contracts: contractsInfo, - instanceId: uuidv4(), - besuApiClient, - xdaiApiClient, - fabricApiClient, - web3SigningCredential: { - keychainEntryKey: xdaiBesuAccount.address, - keychainId: this.keychain.getKeychainId(), - type: Web3SigningCredentialType.CactusKeychainRef, - }, - }), - this.keychain, - ], - }); - - const xdaiConnector = new PluginLedgerConnectorXdai({ - instanceId: "PluginLedgerConnectorXdai_B", - rpcApiHttpHost: rpcApiHostB, - logLevel: this.options.logLevel, - pluginRegistry: registryB, - }); - - registryB.add(xdaiConnector); - - const apiServerB = await this.startNode(httpApiB, httpGuiB, registryB); - - this.log.info(`Configuring Cactus Node for Ledger C...`); - - const registryC = new PluginRegistry({ - plugins: [ - new PluginConsortiumManual({ - instanceId: "PluginConsortiumManual_C", - consortiumDatabase, - keyPairPem: keyPairPemC, - logLevel: "INFO", - ctorArgs: { - baseOptions: { - headers: { Authorization: `Bearer ${token}` }, - }, - }, - }), - new SupplyChainCactusPlugin({ - logLevel: "INFO", - contracts: contractsInfo, - instanceId: uuidv4(), - besuApiClient, - xdaiApiClient, - fabricApiClient, - fabricEnvironment: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - }), - this.keychain, - ], - }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const fabricConnector = new PluginLedgerConnectorFabric({ - instanceId: "PluginLedgerConnectorFabric_C", - dockerBinary: "/usr/local/bin/docker", - peerBinary: "peer", - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - connectionProfile: connectionProfile, - sshConfig: sshConfig, - logLevel: "INFO", - pluginRegistry: registryC, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }); - - registryC.add(fabricConnector); - - const apiServerC = await this.startNode(httpApiC, httpGuiC, registryC); - - this.log.info(`JWT generated by the application: ${token}`); - - return { - apiServerA, - apiServerB, - apiServerC, - besuApiClient, - fabricApiClient, - xdaiApiClient, - supplyChainApiClientA: new SupplyChainApi( - new Configuration({ basePath: nodeApiHostA, baseOptions }), - ), - supplyChainApiClientB: new SupplyChainApi( - new Configuration({ basePath: nodeApiHostA, baseOptions }), - ), - supplyChainApiClientC: new SupplyChainApi( - new Configuration({ basePath: nodeApiHostA, baseOptions }), - ), - }; - } - - public async stop(): Promise { - let i = 0; - for (const hook of this.shutdownHooks) { - i++; - this.log.info("Executing exit hook #%d...", i); - await hook(); // FIXME add timeout here so that shutdown does not hang - this.log.info("Executed exit hook #%d OK", i); - } - } - - public onShutdown(hook: ShutdownHook): void { - this.shutdownHooks.push(hook); - } - - public async createConsortium( - serverA: Server, - serverB: Server, - serverC: Server, - keyPairA: KeyLike, - keyPairB: KeyLike, - keyPairC: KeyLike, - ): Promise { - const consortiumName = "Example Supply Chain Consortium"; - const consortiumId = uuidv4(); - - const memberIdA = uuidv4(); - const nodeIdA = uuidv4(); - const addressInfoA = serverA.address() as AddressInfo; - const nodeApiHostA = `http://127.0.0.1:${addressInfoA.port}`; - - const publickKeyPemA = await exportSPKI(keyPairA); - const cactusNodeA: CactusNode = { - nodeApiHost: nodeApiHostA, - memberId: memberIdA, - publicKeyPem: publickKeyPemA, - consortiumId, - id: nodeIdA, - pluginInstanceIds: [], - ledgerIds: [], - }; - - const memberA: ConsortiumMember = { - id: memberIdA, - nodeIds: [cactusNodeA.id], - name: "Example Manufacturer Corp", - }; - - const ledger1 = { - id: "BesuDemoLedger", - ledgerType: LedgerType.Besu1X, - }; - cactusNodeA.ledgerIds.push(ledger1.id); - - const memberIdB = uuidv4(); - const nodeIdB = uuidv4(); - const addressInfoB = serverB.address() as AddressInfo; - const nodeApiHostB = `http://127.0.0.1:${addressInfoB.port}`; - - const publickKeyPemB = await exportSPKI(keyPairB); - const cactusNodeB: CactusNode = { - nodeApiHost: nodeApiHostB, - memberId: memberIdB, - publicKeyPem: publickKeyPemB, - consortiumId, - id: nodeIdB, - pluginInstanceIds: [], - ledgerIds: [], - }; - - const memberB: ConsortiumMember = { - id: memberIdB, - nodeIds: [cactusNodeB.id], - name: "Example Retailer Corp", - }; - - const ledger2: Ledger = { - id: "XdaiBesuDemoLedger", - ledgerType: LedgerType.Besu2X, - }; - - cactusNodeB.ledgerIds.push(ledger2.id); - - const memberIdC = uuidv4(); - const nodeIdC = uuidv4(); - const addressInfoC = serverC.address() as AddressInfo; - const nodeApiHostC = `http://127.0.0.1:${addressInfoC.port}`; - - const publickKeyPemC = await exportSPKI(keyPairC); - const cactusNodeC: CactusNode = { - nodeApiHost: nodeApiHostC, - memberId: memberIdC, - publicKeyPem: publickKeyPemC, - consortiumId, - id: nodeIdC, - pluginInstanceIds: [], - ledgerIds: [], - }; - - const memberC: ConsortiumMember = { - id: memberIdC, - nodeIds: [cactusNodeC.id], - name: "TODO", - }; - - const ledger3: Ledger = { - id: "FabricDemoLedger", - ledgerType: LedgerType.Fabric2, - }; - - cactusNodeC.ledgerIds.push(ledger3.id); - - const consortium: Consortium = { - id: consortiumId, - name: consortiumName, - mainApiHost: nodeApiHostA, - memberIds: [memberA.id, memberB.id, memberC.id], - }; - - const consortiumDatabase: ConsortiumDatabase = { - cactusNode: [cactusNodeA, cactusNodeB, cactusNodeC], - consortium: [consortium], - consortiumMember: [memberA, memberB, memberC], - ledger: [ledger1, ledger2, ledger3], - pluginInstance: [], - }; - - return consortiumDatabase; - } - - public async startNode( - httpServerApi: Server, - httpServerCockpit: Server, - pluginRegistry: PluginRegistry, - ): Promise { - const addressInfoApi = httpServerApi.address() as AddressInfo; - const addressInfoCockpit = httpServerCockpit.address() as AddressInfo; - - const configService = new ConfigService(); - const config = await configService.getOrCreate(); - const properties = config.getProperties(); - - properties.plugins = []; - properties.configFile = ""; - properties.apiPort = addressInfoApi.port; - properties.apiHost = addressInfoApi.address; - properties.cockpitEnabled = true; - properties.cockpitHost = addressInfoCockpit.address; - properties.cockpitPort = addressInfoCockpit.port; - properties.grpcPort = 0; // TODO - make this configurable as well - properties.logLevel = "WARN"; // silence the logs about 0.0.0.0 web hosts - properties.authorizationProtocol = AuthorizationProtocol.JSON_WEB_TOKEN; - properties.authorizationConfigJson = - await this.getOrCreateAuthorizationConfig(); - properties.crpcPort = 0; - // We must disable the API server's own shutdown hooks because if we didn't - // it would clash with the supply chain app's own shutdown hooks and the - // async functions wouldn't be waited for their conclusion leaving the containers - // running after the supply chain app NodeJS process has exited. - properties.enableShutdownHook = false; - - const apiServer = new ApiServer({ - config: properties, - httpServerApi, - httpServerCockpit, - pluginRegistry, - enableShutdownHook: false, - }); - - this.onShutdown(async () => { - this.log.info("SupplyChainApp onShutdown() - stopping API server"); - await apiServer.shutdown(); - this.log.info("SupplyChainApp onShutdown() - stopped API server OK"); - }); - - await apiServer.start(); - - const restApiUrl = `http://127.0.0.1:${properties.apiPort}`; - this.log.info("%s: %s", SUPPLY_CHAIN_APP_OK_LOG_MSG_PATTERN, restApiUrl); - - const guiUrl = `http://127.0.0.1:${properties.cockpitPort}`; - this.log.info("SupplyChainApp Web GUI - reachable at: %s", guiUrl); - - return apiServer; - } -} - -export interface IStartInfo { - readonly apiServerA: ApiServer; - readonly apiServerB: ApiServer; - readonly apiServerC: ApiServer; - readonly besuApiClient: BesuApi; - readonly xdaiApiClient: XdaiApi; - readonly fabricApiClient: FabricApi; - readonly supplyChainApiClientA: SupplyChainApi; - readonly supplyChainApiClientB: SupplyChainApi; - readonly supplyChainApiClientC: SupplyChainApi; -} diff --git a/examples/cactus-example-supply-chain-backend/src/test/typescript/integration/api-surface.test.ts b/examples/cactus-example-supply-chain-backend/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-backend-api-calls.test.ts b/examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-backend-api-calls.test.ts deleted file mode 100644 index db7c23d489..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-backend-api-calls.test.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { v4 as uuidV4 } from "uuid"; -import test, { Test } from "tape-promise/tape"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { AuthorizationProtocol } from "@hyperledger/cactus-cmd-api-server"; -import { IAuthorizationConfig } from "@hyperledger/cactus-cmd-api-server"; -import { ConfigService } from "@hyperledger/cactus-cmd-api-server"; - -import * as publicApi from "../../../main/typescript/public-api"; -import { ISupplyChainAppOptions } from "../../../main/typescript/public-api"; -import { SupplyChainApp } from "../../../main/typescript/public-api"; -import { Shipment } from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; - -const testCase = - "can launch via CLI with generated API server .config.json file"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); - -// FIXME: https://github.com/hyperledger/cactus/issues/1521 -// Skipping until test can be stabilized. -test("Supply chain backend API calls can be executed", async (t: Test) => { - t.ok(publicApi, "Public API of the package imported OK"); - - const configService = new ConfigService(); - t.ok(configService, "Instantiated ConfigService truthy OK"); - - const exampleConfig = await configService.newExampleConfig(); - t.ok(exampleConfig, "configService.newExampleConfig() truthy OK"); - - // TODO: Investigate the explanation for this when we have more time, for - // now I just hacked it so that it does not look for a .config file on the FS. - // @see: https://github.com/hyperledger/cactus/issues/1516 - // FIXME: This was not necessary prior the Jest migration but now it is. - // Investigate the explanation for this when we have more time, for now I just - // overrode it so that it does not look for a .config file on the local FS. - exampleConfig.configFile = ""; - - // FIXME - this hack should not be necessary, we need to re-think how we - // do configuration parsing. The convict library may not be the path forward. - exampleConfig.authorizationConfigJson = JSON.stringify( - exampleConfig.authorizationConfigJson, - ) as unknown as IAuthorizationConfig; - exampleConfig.authorizationProtocol = AuthorizationProtocol.NONE; - - const convictConfig = - await configService.newExampleConfigConvict(exampleConfig); - t.ok(convictConfig, "configService.newExampleConfigConvict() truthy OK"); - - const env = await configService.newExampleConfigEnv( - convictConfig.getProperties(), - ); - - const config = await configService.getOrCreate({ env }); - const apiSrvOpts = config.getProperties(); - const { logLevel } = apiSrvOpts; - - const appOptions: ISupplyChainAppOptions = { - logLevel, - disableSignalHandlers: true, - }; - const app = new SupplyChainApp(appOptions); - test.onFinish(async () => { - await app.stop(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - // Node A => Besu - // Node B => Xdai Besu - // Node C => Fabric v2.5.6 - const startResult = await app.start(); - const { apiServerA, apiServerB, apiServerC } = startResult; - t.ok(apiServerA, "ApiServerA truthy OK"); - t.ok(apiServerB, "ApiServerB truthy OK"); - t.ok(apiServerC, "ApiServerC truthy OK"); - - const httpSrvApiA = apiServerA.getHttpServerApi(); - t.ok(httpSrvApiA, "httpSrvApiA truthy OK"); - const httpSrvApiB = apiServerB.getHttpServerApi(); - t.ok(httpSrvApiB, "httpSrvApiB truthy OK"); - const httpSrvApiC = apiServerC.getHttpServerApi(); - t.ok(httpSrvApiC, "httpSrvApiC truthy OK"); - - t.true(httpSrvApiA.listening, "httpSrvApiA.listening true OK"); - t.true(httpSrvApiB.listening, "httpSrvApiB.listening true OK"); - t.true(httpSrvApiC.listening, "httpSrvApiC.listening true OK"); - - const { besuApiClient, fabricApiClient, xdaiApiClient } = startResult; - - const metricsResB = await besuApiClient.getPrometheusMetricsV1(); - t.ok(metricsResB, "besu metrics res truthy OK"); - t.true(metricsResB.status > 199, "metricsResB.status > 199 true OK"); - t.true(metricsResB.status < 300, "metricsResB.status < 300 true OK"); - - const metricsResF = await fabricApiClient.getPrometheusMetricsV1(); - t.ok(metricsResF, "fabric metrics res truthy OK"); - t.true(metricsResF.status > 199, "metricsResF.status > 199 true OK"); - t.true(metricsResF.status < 300, "metricsResF.status < 300 true OK"); - - const metricsResQ = await xdaiApiClient.getPrometheusMetricsV1(); - t.ok(metricsResQ, "xdai besu metrics res truthy OK"); - t.true(metricsResQ.status > 199, "metricsResQ.status > 199 true OK"); - t.true(metricsResQ.status < 300, "metricsResQ.status < 300 true OK"); - - const { - supplyChainApiClientA, - supplyChainApiClientB, - supplyChainApiClientC, - } = startResult; - - const listBambooHarvestRes = - await supplyChainApiClientA.listBambooHarvestV1(); - t.ok(listBambooHarvestRes, "listBambooHarvestRes truthy OK"); - t.true( - listBambooHarvestRes.status > 199, - "listBambooHarvestRes status > 199 truthy OK", - ); - t.true( - listBambooHarvestRes.status < 300, - "listBambooHarvestRes status < 300 truthy OK", - ); - - const listBookshelfRes = await supplyChainApiClientB.listBookshelfV1(); - t.ok(listBookshelfRes, "listBookshelfRes truthy OK"); - t.true( - listBookshelfRes.status > 199, - "listBookshelfRes status > 199 truthy OK", - ); - t.true( - listBookshelfRes.status < 300, - "listBookshelfRes status < 300 truthy OK", - ); - - const listShipmentRes = await supplyChainApiClientC.listShipmentV1(); - t.ok(listShipmentRes, "listShipmentRes truthy OK"); - t.true( - listShipmentRes.status > 199, - "listShipmentRes status > 199 truthy OK", - ); - t.true( - listShipmentRes.status < 300, - "listShipmentRes status < 300 truthy OK", - ); - - const shipment: Shipment = { - bookshelfId: "some-id-of-a-bookshelf-" + uuidV4(), - id: "some-id-of-a-shipment-" + uuidV4(), - }; - - const insertShipmentRes = await supplyChainApiClientC.insertShipmentV1({ - shipment, - }); - t.ok(insertShipmentRes, "insertShipmentRes truthy OK"); - t.true( - insertShipmentRes.status > 199, - "insertShipmentRes status > 199 truthy OK", - ); - t.true( - insertShipmentRes.status < 300, - "insertShipmentRes status < 300 truthy OK", - ); - - const listShipmentRes2 = await supplyChainApiClientC.listShipmentV1(); - t.ok(listShipmentRes2, "listShipmentRes2 truthy OK"); - t.true( - listShipmentRes2.status > 199, - "listShipmentRes2 status > 199 truthy OK", - ); - t.true( - listShipmentRes2.status < 300, - "listShipmentRes2 status < 300 truthy OK", - ); - - const shipments = listShipmentRes2.data.data; - const [firstShipment] = shipments; - t.equal(shipment.id, firstShipment.id, "Inserted shipment matches IDs OK"); - - t.end(); -}); diff --git a/examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-cli-via-npm-script.test.ts b/examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-cli-via-npm-script.test.ts deleted file mode 100644 index 04749e34bb..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-cli-via-npm-script.test.ts +++ /dev/null @@ -1,116 +0,0 @@ -import path from "path"; -import { promisify } from "util"; -import { spawn, exec } from "child_process"; -import { v4 as uuidV4 } from "uuid"; -import test, { Test } from "tape-promise/tape"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import * as publicApi from "../../../main/typescript/public-api"; -import { SUPPLY_CHAIN_APP_OK_LOG_MSG_PATTERN } from "../../../main/typescript/public-api"; - -const testCase = "SupplyChainApp can launch via root package.json script"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); - -async function psFilter(filter?: string): Promise> { - const execAsync = promisify(exec); - try { - const { stdout } = await execAsync("ps -wo pid,cmd"); - const rows = stdout.split("\n"); - const map = new Map(); - rows.forEach((row) => { - const [pidStr, ...cmdParts] = row.split(" "); - if (pidStr === "") { - return; - } - const cmd = cmdParts.join(" "); - console.log("pid=%o, cmd=%o", pidStr, cmd); - const pid = parseInt(pidStr, 10); - if (filter && cmd.includes(filter)) { - map.set(pid, cmd); - } - }); - return map; - } catch (e: unknown) { - console.error("Crashed while running ps binary. Are you on Linux?", e); - throw e; - } -} - -test(testCase, async (t: Test) => { - t.ok(publicApi, "Public API of the package imported OK"); - test.onFinish(async () => await pruneDockerAllIfGithubAction({ logLevel })); - - const uuid = uuidV4(); - - const projectRoot = path.join(__dirname, "../../../../../../"); - - // used to find the processes to kill after we are done with the test - const beaconCliArg = "--" + uuid; - - const child = spawn( - "npm", - ["run", "start:example-supply-chain", "--", beaconCliArg], - { - cwd: projectRoot, - }, - ); - - let apiIsHealthy = false; - - const childProcessPromise = new Promise((resolve, reject) => { - child.once("exit", (code: number, signal: NodeJS.Signals) => { - t.comment(`EVENT:exit child process exited gracefully.`); - t.comment(`EVENT:exit signal=${signal}`); - t.comment(`EVENT:exit exitCode=${code}`); - t.comment(`EVENT:exit apiIsHealthy=${apiIsHealthy}`); - if (apiIsHealthy) { - resolve(); - } else { - const msg = `Child process crashed. exitCode=${code}, signal=${signal}`; - reject(new Error(msg)); - } - }); - child.on("close", (code: number, signal: NodeJS.Signals) => { - t.comment(`EVENT:close signal=${signal}`); - t.comment(`EVENT:close exitCode=${code}`); - }); - child.on("disconnect", (code: number, signal: NodeJS.Signals) => { - t.comment(`EVENT:disconnect signal=${signal}`); - t.comment(`EVENT:disconnect exitCode=${code}`); - }); - child.on("error", (ex: Error) => { - t.comment(`EVENT:error ${ex.stack}`); - }); - }); - - const logs = []; - for await (const data of child.stdout) { - console.log(`[child]: ${data}`); - if (data.includes(SUPPLY_CHAIN_APP_OK_LOG_MSG_PATTERN)) { - console.log("Sending kill signal to child process..."); - apiIsHealthy = true; - const killedOK = child.kill("SIGKILL"); - console.log("Sent kill signal, success=%o", killedOK); - - const processMap = await psFilter(uuid); - processMap.forEach((v, k) => { - console.log("Killing sub-process with pid: %o (cmd=%o) ", k, v); - process.kill(k); - }); - break; - } - logs.push(data); - } - - await t.doesNotReject(childProcessPromise, "childProcessPromise resolves OK"); - - t.end(); - - process.exit(0); -}); diff --git a/examples/cactus-example-supply-chain-backend/src/test/typescript/unit/api-surface.test.ts b/examples/cactus-example-supply-chain-backend/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 8496a21fec..0000000000 --- a/examples/cactus-example-supply-chain-backend/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Public API module can be loaded", () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-supply-chain-backend/supervisord.conf b/examples/cactus-example-supply-chain-backend/supervisord.conf deleted file mode 100644 index b83ad6e702..0000000000 --- a/examples/cactus-example-supply-chain-backend/supervisord.conf +++ /dev/null @@ -1,27 +0,0 @@ -[supervisord] -logfile = /usr/src/app/log/supervisord.log -logfile_maxbytes = 50MB -logfile_backups=10 -loglevel = info - -[program:dockerd] -command=/usr/local/bin/dockerd -autostart=true -autorestart=true -startretries=20 -stderr_logfile=/usr/src/app/log/dockerd.err.log -stdout_logfile=/usr/src/app/log/dockerd.out.log - -[program:supply-chain-app] -command=/home/appuser/.nvm/versions/node/v18.18.2/bin/node /usr/src/app/node_modules/@hyperledger/cactus-example-supply-chain-backend/dist/lib/main/typescript/supply-chain-app-cli.js -autostart=true -autorestart=unexpected -startretries=20 -exitcodes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 - -[inet_http_server] -port = 0.0.0.0:9001 diff --git a/examples/cactus-example-supply-chain-backend/tsconfig.json b/examples/cactus-example-supply-chain-backend/tsconfig.json deleted file mode 100644 index b7aa9ab40a..0000000000 --- a/examples/cactus-example-supply-chain-backend/tsconfig.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-example-supply-chain-backend.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../../packages/cactus-api-client/tsconfig.json" - }, - { - "path": "../../packages/cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-example-supply-chain-business-logic-plugin/tsconfig.json" - }, - { - "path": "../cactus-example-supply-chain-frontend/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-consortium-manual/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-xdai/tsconfig.json" - }, - { - "path": "../../packages/cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/CHANGELOG.md b/examples/cactus-example-supply-chain-business-logic-plugin/CHANGELOG.md deleted file mode 100644 index 78dfaed79f..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/CHANGELOG.md +++ /dev/null @@ -1,189 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **cactus-example-supply-chain-app:** mitigate CVE-2022-24434 and CVE-2022-24999 ([d28d5e8](https://github.com/hyperledger/cactus/commit/d28d5e8f3ed5dff1aa049c8f1bccce79aa21e948)), closes [#2041](https://github.com/hyperledger/cactus/issues/2041) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **plugin-ledger-connector-quorum:** no keychain endpoints ([15cf65c](https://github.com/hyperledger/cactus/commit/15cf65cea6a779d12542b4ccc2e4940e7ac12039)) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) - -### Features - -* **connector-besu:** replace invokeContractV2 ([ecd62ea](https://github.com/hyperledger/cactus/commit/ecd62eac5721514dbcfc401d5f28dfdc58ef8873)) -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **core-api:** plugin interface async initializer ([d40f68b](https://github.com/hyperledger/cactus/commit/d40f68bd9eaff498df8514fe7397986b5a2f865d)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) - -### Features - -* **connector-besu:** replace invokeContractV2 ([ecd62ea](https://github.com/hyperledger/cactus/commit/ecd62eac5721514dbcfc401d5f28dfdc58ef8873)) -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -### Bug Fixes - -* **release:** package.json publish config non-public [#753](https://github.com/hyperledger/cactus/issues/753) ([5a1b7a6](https://github.com/hyperledger/cactus/commit/5a1b7a6eba9a18d4f7474a3c44d4a4035fc99e84)) - -### Features - -* **connector-fabric:** common interface ([c35cfe7](https://github.com/hyperledger/cactus/commit/c35cfe755c75ae860fdf28eb7fc89215557635c5)) - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Features - -* **example:** example extended with fabric ([55d6587](https://github.com/hyperledger/cactus/commit/55d65872dc689ee3b319c23515c1fea1df0a6444)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-business-logic-plugin diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/openapitools.json b/examples/cactus-example-supply-chain-business-logic-plugin/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/package.json b/examples/cactus-example-supply-chain-business-logic-plugin/package.json deleted file mode 100644 index 588c9ce514..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "@hyperledger/cactus-example-supply-chain-business-logic-plugin", - "version": "2.0.0", - "description": "An example business logic plugin implementation for Cactus", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-example-supply-chain-business-logic-plugin.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "run-p 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-consortium-manual": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0", - "async-exit-hook": "2.0.1", - "axios": "1.7.7", - "express": "4.21.0", - "openapi-types": "12.1.3", - "run-time-error-cjs": "1.4.0", - "typescript-optional": "2.0.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@types/express": "5.0.0", - "@types/ssh2": "0.5.47", - "@types/uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-example-supply-chain-business-logic-plugin.web.umd.min.js", - "mainMinified": "dist/cactus-example-supply-chain-business-logic-plugin.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/json/openapi.json b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/json/openapi.json deleted file mode 100644 index b962c8fd0b..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/json/openapi.json +++ /dev/null @@ -1,393 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Example - Supply Chain App", - "description": "Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "Shipment": { - "type": "object", - "required": ["id", "bookshelfId"], - "properties": { - "id": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "bookshelfId": { - "description": "The foreign key ID referencing the bookshelfId that will go in the shipment.", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "Bookshelf": { - "type": "object", - "required": ["id", "shelfCount", "bambooHarvestId"], - "properties": { - "id": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "shelfCount": { - "description": "The number of shelves the bookshelf comes with.", - "type": "number", - "nullable": false, - "minimum": 1, - "maximum": 255 - }, - "bambooHarvestId": { - "description": "The foreign key ID referencing the bamboo harvest that yielded the wood material for the construction of the bookshelf.", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "BambooHarvest": { - "type": "object", - "required": ["id", "location", "startedAt", "endedAt", "harvester"], - "properties": { - "id": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "location": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "startedAt": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "endedAt": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "harvester": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - } - } - }, - "InsertBambooHarvestRequest": { - "type": "object", - "required": ["bambooHarvest"], - "properties": { - "bambooHarvest": { - "$ref": "#/components/schemas/BambooHarvest" - } - } - }, - "InsertBambooHarvestResponse": { - "type": "object", - "required": [], - "properties": { - "callOutput": { - "type": "object", - "additionalProperties": true - }, - "transactionReceipt": { - "type": "object", - "additionalProperties": true - } - } - }, - "ListBambooHarvestResponse": { - "type": "object", - "required": ["data"], - "properties": { - "data": { - "type": "array", - "nullable": false, - "default": [], - "items": { - "$ref": "#/components/schemas/BambooHarvest", - "minItems": 0, - "maxItems": 65535 - } - } - } - }, - "InsertBookshelfRequest": { - "type": "object", - "required": ["bookshelf"], - "properties": { - "bookshelf": { - "$ref": "#/components/schemas/Bookshelf" - } - } - }, - "InsertBookshelfResponse": { - "type": "object", - "required": [], - "properties": { - "callOutput": { - "type": "object", - "additionalProperties": true - }, - "transactionReceipt": { - "type": "object", - "additionalProperties": true - } - } - }, - "ListBookshelfResponse": { - "type": "object", - "required": ["data"], - "properties": { - "data": { - "type": "array", - "nullable": false, - "default": [], - "items": { - "$ref": "#/components/schemas/Bookshelf", - "minItems": 0, - "maxItems": 65535 - } - } - } - }, - "InsertShipmentRequest": { - "type": "object", - "required": ["shipment"], - "properties": { - "shipment": { - "$ref": "#/components/schemas/Shipment" - } - } - }, - "InsertShipmentResponse": { - "type": "object", - "required": [], - "properties": { - "callOutput": { - "type": "object", - "additionalProperties": true - }, - "transactionReceipt": { - "type": "object", - "additionalProperties": true - } - } - }, - "ListShipmentResponse": { - "type": "object", - "required": ["data"], - "properties": { - "data": { - "type": "array", - "nullable": false, - "default": [], - "items": { - "$ref": "#/components/schemas/Shipment", - "minItems": 0, - "maxItems": 65535 - } - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bookshelf": { - "post": { - "operationId": "insertBookshelfV1", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bookshelf" - } - }, - "summary": "Inserts the provided Bookshelf entity to the ledger.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertBookshelfRequest" - } - } - } - }, - "responses": { - "201": { - "description": "CREATED", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertBookshelfResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bookshelf": { - "get": { - "operationId": "listBookshelfV1", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bookshelf" - } - }, - "summary": "Lists all the Bookshelf entities stored on the ledger.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListBookshelfResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-shipment": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-shipment" - } - }, - "operationId": "insertShipmentV1", - "summary": "Inserts the provided Shipment entity to the ledger.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertShipmentRequest" - } - } - } - }, - "responses": { - "201": { - "description": "CREATED", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertShipmentResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-shipment": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-shipment" - } - }, - "operationId": "listShipmentV1", - "summary": "Lists all the Shipments entities stored on the ledger.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListShipmentResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bamboo-harvest": { - "post": { - "operationId": "insertBambooHarvestV1", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bamboo-harvest" - } - }, - "summary": "Inserts the provided BambooHarvest entity to the ledger.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertBambooHarvestRequest" - } - } - } - }, - "responses": { - "201": { - "description": "CREATED", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertBambooHarvestResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bamboo-harvest": { - "get": { - "operationId": "listBambooHarvestV1", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bamboo-harvest" - } - }, - "summary": "Lists all the BambooHarvest entities stored on the ledger.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListBambooHarvestResponse" - } - } - } - } - } - } - } - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/json/openapi.tpl.json b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/json/openapi.tpl.json deleted file mode 100644 index b962c8fd0b..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,393 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Example - Supply Chain App", - "description": "Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "Shipment": { - "type": "object", - "required": ["id", "bookshelfId"], - "properties": { - "id": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "bookshelfId": { - "description": "The foreign key ID referencing the bookshelfId that will go in the shipment.", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "Bookshelf": { - "type": "object", - "required": ["id", "shelfCount", "bambooHarvestId"], - "properties": { - "id": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "shelfCount": { - "description": "The number of shelves the bookshelf comes with.", - "type": "number", - "nullable": false, - "minimum": 1, - "maximum": 255 - }, - "bambooHarvestId": { - "description": "The foreign key ID referencing the bamboo harvest that yielded the wood material for the construction of the bookshelf.", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "BambooHarvest": { - "type": "object", - "required": ["id", "location", "startedAt", "endedAt", "harvester"], - "properties": { - "id": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "location": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "startedAt": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "endedAt": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - }, - "harvester": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 1024 - } - } - }, - "InsertBambooHarvestRequest": { - "type": "object", - "required": ["bambooHarvest"], - "properties": { - "bambooHarvest": { - "$ref": "#/components/schemas/BambooHarvest" - } - } - }, - "InsertBambooHarvestResponse": { - "type": "object", - "required": [], - "properties": { - "callOutput": { - "type": "object", - "additionalProperties": true - }, - "transactionReceipt": { - "type": "object", - "additionalProperties": true - } - } - }, - "ListBambooHarvestResponse": { - "type": "object", - "required": ["data"], - "properties": { - "data": { - "type": "array", - "nullable": false, - "default": [], - "items": { - "$ref": "#/components/schemas/BambooHarvest", - "minItems": 0, - "maxItems": 65535 - } - } - } - }, - "InsertBookshelfRequest": { - "type": "object", - "required": ["bookshelf"], - "properties": { - "bookshelf": { - "$ref": "#/components/schemas/Bookshelf" - } - } - }, - "InsertBookshelfResponse": { - "type": "object", - "required": [], - "properties": { - "callOutput": { - "type": "object", - "additionalProperties": true - }, - "transactionReceipt": { - "type": "object", - "additionalProperties": true - } - } - }, - "ListBookshelfResponse": { - "type": "object", - "required": ["data"], - "properties": { - "data": { - "type": "array", - "nullable": false, - "default": [], - "items": { - "$ref": "#/components/schemas/Bookshelf", - "minItems": 0, - "maxItems": 65535 - } - } - } - }, - "InsertShipmentRequest": { - "type": "object", - "required": ["shipment"], - "properties": { - "shipment": { - "$ref": "#/components/schemas/Shipment" - } - } - }, - "InsertShipmentResponse": { - "type": "object", - "required": [], - "properties": { - "callOutput": { - "type": "object", - "additionalProperties": true - }, - "transactionReceipt": { - "type": "object", - "additionalProperties": true - } - } - }, - "ListShipmentResponse": { - "type": "object", - "required": ["data"], - "properties": { - "data": { - "type": "array", - "nullable": false, - "default": [], - "items": { - "$ref": "#/components/schemas/Shipment", - "minItems": 0, - "maxItems": 65535 - } - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bookshelf": { - "post": { - "operationId": "insertBookshelfV1", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bookshelf" - } - }, - "summary": "Inserts the provided Bookshelf entity to the ledger.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertBookshelfRequest" - } - } - } - }, - "responses": { - "201": { - "description": "CREATED", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertBookshelfResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bookshelf": { - "get": { - "operationId": "listBookshelfV1", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bookshelf" - } - }, - "summary": "Lists all the Bookshelf entities stored on the ledger.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListBookshelfResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-shipment": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-shipment" - } - }, - "operationId": "insertShipmentV1", - "summary": "Inserts the provided Shipment entity to the ledger.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertShipmentRequest" - } - } - } - }, - "responses": { - "201": { - "description": "CREATED", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertShipmentResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-shipment": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-shipment" - } - }, - "operationId": "listShipmentV1", - "summary": "Lists all the Shipments entities stored on the ledger.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListShipmentResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bamboo-harvest": { - "post": { - "operationId": "insertBambooHarvestV1", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bamboo-harvest" - } - }, - "summary": "Inserts the provided BambooHarvest entity to the ledger.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertBambooHarvestRequest" - } - } - } - }, - "responses": { - "201": { - "description": "CREATED", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertBambooHarvestResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bamboo-harvest": { - "get": { - "operationId": "listBambooHarvestV1", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bamboo-harvest" - } - }, - "summary": "Lists all the BambooHarvest entities stored on the ledger.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListBambooHarvestResponse" - } - } - } - } - } - } - } - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 606a65a9a2..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,35 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/BambooHarvest.kt -src/main/kotlin/org/openapitools/client/models/Bookshelf.kt -src/main/kotlin/org/openapitools/client/models/InsertBambooHarvestRequest.kt -src/main/kotlin/org/openapitools/client/models/InsertBambooHarvestResponse.kt -src/main/kotlin/org/openapitools/client/models/InsertBookshelfRequest.kt -src/main/kotlin/org/openapitools/client/models/InsertBookshelfResponse.kt -src/main/kotlin/org/openapitools/client/models/InsertShipmentRequest.kt -src/main/kotlin/org/openapitools/client/models/InsertShipmentResponse.kt -src/main/kotlin/org/openapitools/client/models/ListBambooHarvestResponse.kt -src/main/kotlin/org/openapitools/client/models/ListBookshelfResponse.kt -src/main/kotlin/org/openapitools/client/models/ListShipmentResponse.kt -src/main/kotlin/org/openapitools/client/models/Shipment.kt diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/README.md b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 0499a47875..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Example - Supply Chain App - -Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**insertBambooHarvestV1**](docs/DefaultApi.md#insertbambooharvestv1) | **POST** /api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bamboo-harvest | Inserts the provided BambooHarvest entity to the ledger. -*DefaultApi* | [**insertBookshelfV1**](docs/DefaultApi.md#insertbookshelfv1) | **POST** /api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bookshelf | Inserts the provided Bookshelf entity to the ledger. -*DefaultApi* | [**insertShipmentV1**](docs/DefaultApi.md#insertshipmentv1) | **POST** /api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-shipment | Inserts the provided Shipment entity to the ledger. -*DefaultApi* | [**listBambooHarvestV1**](docs/DefaultApi.md#listbambooharvestv1) | **GET** /api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bamboo-harvest | Lists all the BambooHarvest entities stored on the ledger. -*DefaultApi* | [**listBookshelfV1**](docs/DefaultApi.md#listbookshelfv1) | **GET** /api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bookshelf | Lists all the Bookshelf entities stored on the ledger. -*DefaultApi* | [**listShipmentV1**](docs/DefaultApi.md#listshipmentv1) | **GET** /api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-shipment | Lists all the Shipments entities stored on the ledger. - - - -## Documentation for Models - - - [org.openapitools.client.models.BambooHarvest](docs/BambooHarvest.md) - - [org.openapitools.client.models.Bookshelf](docs/Bookshelf.md) - - [org.openapitools.client.models.InsertBambooHarvestRequest](docs/InsertBambooHarvestRequest.md) - - [org.openapitools.client.models.InsertBambooHarvestResponse](docs/InsertBambooHarvestResponse.md) - - [org.openapitools.client.models.InsertBookshelfRequest](docs/InsertBookshelfRequest.md) - - [org.openapitools.client.models.InsertBookshelfResponse](docs/InsertBookshelfResponse.md) - - [org.openapitools.client.models.InsertShipmentRequest](docs/InsertShipmentRequest.md) - - [org.openapitools.client.models.InsertShipmentResponse](docs/InsertShipmentResponse.md) - - [org.openapitools.client.models.ListBambooHarvestResponse](docs/ListBambooHarvestResponse.md) - - [org.openapitools.client.models.ListBookshelfResponse](docs/ListBookshelfResponse.md) - - [org.openapitools.client.models.ListShipmentResponse](docs/ListShipmentResponse.md) - - [org.openapitools.client.models.Shipment](docs/Shipment.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index 80450629dd..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,479 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.InsertBambooHarvestRequest -import org.openapitools.client.models.InsertBambooHarvestResponse -import org.openapitools.client.models.InsertBookshelfRequest -import org.openapitools.client.models.InsertBookshelfResponse -import org.openapitools.client.models.InsertShipmentRequest -import org.openapitools.client.models.InsertShipmentResponse -import org.openapitools.client.models.ListBambooHarvestResponse -import org.openapitools.client.models.ListBookshelfResponse -import org.openapitools.client.models.ListShipmentResponse - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Inserts the provided BambooHarvest entity to the ledger. - * - * @param insertBambooHarvestRequest (optional) - * @return InsertBambooHarvestResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun insertBambooHarvestV1(insertBambooHarvestRequest: InsertBambooHarvestRequest? = null) : InsertBambooHarvestResponse { - val localVarResponse = insertBambooHarvestV1WithHttpInfo(insertBambooHarvestRequest = insertBambooHarvestRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as InsertBambooHarvestResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Inserts the provided BambooHarvest entity to the ledger. - * - * @param insertBambooHarvestRequest (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun insertBambooHarvestV1WithHttpInfo(insertBambooHarvestRequest: InsertBambooHarvestRequest?) : ApiResponse { - val localVariableConfig = insertBambooHarvestV1RequestConfig(insertBambooHarvestRequest = insertBambooHarvestRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation insertBambooHarvestV1 - * - * @param insertBambooHarvestRequest (optional) - * @return RequestConfig - */ - fun insertBambooHarvestV1RequestConfig(insertBambooHarvestRequest: InsertBambooHarvestRequest?) : RequestConfig { - val localVariableBody = insertBambooHarvestRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bamboo-harvest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Inserts the provided Bookshelf entity to the ledger. - * - * @param insertBookshelfRequest (optional) - * @return InsertBookshelfResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun insertBookshelfV1(insertBookshelfRequest: InsertBookshelfRequest? = null) : InsertBookshelfResponse { - val localVarResponse = insertBookshelfV1WithHttpInfo(insertBookshelfRequest = insertBookshelfRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as InsertBookshelfResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Inserts the provided Bookshelf entity to the ledger. - * - * @param insertBookshelfRequest (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun insertBookshelfV1WithHttpInfo(insertBookshelfRequest: InsertBookshelfRequest?) : ApiResponse { - val localVariableConfig = insertBookshelfV1RequestConfig(insertBookshelfRequest = insertBookshelfRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation insertBookshelfV1 - * - * @param insertBookshelfRequest (optional) - * @return RequestConfig - */ - fun insertBookshelfV1RequestConfig(insertBookshelfRequest: InsertBookshelfRequest?) : RequestConfig { - val localVariableBody = insertBookshelfRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bookshelf", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Inserts the provided Shipment entity to the ledger. - * - * @param insertShipmentRequest (optional) - * @return InsertShipmentResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun insertShipmentV1(insertShipmentRequest: InsertShipmentRequest? = null) : InsertShipmentResponse { - val localVarResponse = insertShipmentV1WithHttpInfo(insertShipmentRequest = insertShipmentRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as InsertShipmentResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Inserts the provided Shipment entity to the ledger. - * - * @param insertShipmentRequest (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun insertShipmentV1WithHttpInfo(insertShipmentRequest: InsertShipmentRequest?) : ApiResponse { - val localVariableConfig = insertShipmentV1RequestConfig(insertShipmentRequest = insertShipmentRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation insertShipmentV1 - * - * @param insertShipmentRequest (optional) - * @return RequestConfig - */ - fun insertShipmentV1RequestConfig(insertShipmentRequest: InsertShipmentRequest?) : RequestConfig { - val localVariableBody = insertShipmentRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-shipment", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Lists all the BambooHarvest entities stored on the ledger. - * - * @return ListBambooHarvestResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun listBambooHarvestV1() : ListBambooHarvestResponse { - val localVarResponse = listBambooHarvestV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as ListBambooHarvestResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Lists all the BambooHarvest entities stored on the ledger. - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun listBambooHarvestV1WithHttpInfo() : ApiResponse { - val localVariableConfig = listBambooHarvestV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation listBambooHarvestV1 - * - * @return RequestConfig - */ - fun listBambooHarvestV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bamboo-harvest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Lists all the Bookshelf entities stored on the ledger. - * - * @return ListBookshelfResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun listBookshelfV1() : ListBookshelfResponse { - val localVarResponse = listBookshelfV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as ListBookshelfResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Lists all the Bookshelf entities stored on the ledger. - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun listBookshelfV1WithHttpInfo() : ApiResponse { - val localVariableConfig = listBookshelfV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation listBookshelfV1 - * - * @return RequestConfig - */ - fun listBookshelfV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bookshelf", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Lists all the Shipments entities stored on the ledger. - * - * @return ListShipmentResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun listShipmentV1() : ListShipmentResponse { - val localVarResponse = listShipmentV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as ListShipmentResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Lists all the Shipments entities stored on the ledger. - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun listShipmentV1WithHttpInfo() : ApiResponse { - val localVariableConfig = listShipmentV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation listShipmentV1 - * - * @return RequestConfig - */ - fun listShipmentV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-shipment", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BambooHarvest.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BambooHarvest.kt deleted file mode 100644 index 93ac39b7a4..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BambooHarvest.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id - * @param location - * @param startedAt - * @param endedAt - * @param harvester - */ - - -data class BambooHarvest ( - - @Json(name = "id") - val id: kotlin.String, - - @Json(name = "location") - val location: kotlin.String, - - @Json(name = "startedAt") - val startedAt: kotlin.String, - - @Json(name = "endedAt") - val endedAt: kotlin.String, - - @Json(name = "harvester") - val harvester: kotlin.String - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Bookshelf.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Bookshelf.kt deleted file mode 100644 index c6596aa707..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Bookshelf.kt +++ /dev/null @@ -1,45 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id - * @param shelfCount The number of shelves the bookshelf comes with. - * @param bambooHarvestId The foreign key ID referencing the bamboo harvest that yielded the wood material for the construction of the bookshelf. - */ - - -data class Bookshelf ( - - @Json(name = "id") - val id: kotlin.String, - - /* The number of shelves the bookshelf comes with. */ - @Json(name = "shelfCount") - val shelfCount: java.math.BigDecimal, - - /* The foreign key ID referencing the bamboo harvest that yielded the wood material for the construction of the bookshelf. */ - @Json(name = "bambooHarvestId") - val bambooHarvestId: kotlin.String - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBambooHarvestRequest.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBambooHarvestRequest.kt deleted file mode 100644 index a942094fe0..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBambooHarvestRequest.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.BambooHarvest - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param bambooHarvest - */ - - -data class InsertBambooHarvestRequest ( - - @Json(name = "bambooHarvest") - val bambooHarvest: BambooHarvest - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBambooHarvestResponse.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBambooHarvestResponse.kt deleted file mode 100644 index 76044c5e94..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBambooHarvestResponse.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param callOutput - * @param transactionReceipt - */ - - -data class InsertBambooHarvestResponse ( - - @Json(name = "callOutput") - val callOutput: kotlin.collections.Map? = null, - - @Json(name = "transactionReceipt") - val transactionReceipt: kotlin.collections.Map? = null - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBookshelfRequest.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBookshelfRequest.kt deleted file mode 100644 index 072a79bbba..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBookshelfRequest.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Bookshelf - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param bookshelf - */ - - -data class InsertBookshelfRequest ( - - @Json(name = "bookshelf") - val bookshelf: Bookshelf - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBookshelfResponse.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBookshelfResponse.kt deleted file mode 100644 index 46fb7ee45d..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertBookshelfResponse.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param callOutput - * @param transactionReceipt - */ - - -data class InsertBookshelfResponse ( - - @Json(name = "callOutput") - val callOutput: kotlin.collections.Map? = null, - - @Json(name = "transactionReceipt") - val transactionReceipt: kotlin.collections.Map? = null - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertShipmentRequest.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertShipmentRequest.kt deleted file mode 100644 index 0e01864f59..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertShipmentRequest.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Shipment - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param shipment - */ - - -data class InsertShipmentRequest ( - - @Json(name = "shipment") - val shipment: Shipment - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertShipmentResponse.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertShipmentResponse.kt deleted file mode 100644 index 856f7d15ef..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InsertShipmentResponse.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param callOutput - * @param transactionReceipt - */ - - -data class InsertShipmentResponse ( - - @Json(name = "callOutput") - val callOutput: kotlin.collections.Map? = null, - - @Json(name = "transactionReceipt") - val transactionReceipt: kotlin.collections.Map? = null - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListBambooHarvestResponse.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListBambooHarvestResponse.kt deleted file mode 100644 index a3793a98e1..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListBambooHarvestResponse.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.BambooHarvest - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param `data` - */ - - -data class ListBambooHarvestResponse ( - - @Json(name = "data") - val `data`: kotlin.collections.List = arrayListOf() - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListBookshelfResponse.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListBookshelfResponse.kt deleted file mode 100644 index 5ad2189cf7..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListBookshelfResponse.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Bookshelf - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param `data` - */ - - -data class ListBookshelfResponse ( - - @Json(name = "data") - val `data`: kotlin.collections.List = arrayListOf() - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListShipmentResponse.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListShipmentResponse.kt deleted file mode 100644 index 8376cd8f4f..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListShipmentResponse.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Shipment - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param `data` - */ - - -data class ListShipmentResponse ( - - @Json(name = "data") - val `data`: kotlin.collections.List = arrayListOf() - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Shipment.kt b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Shipment.kt deleted file mode 100644 index d1f2066c3a..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Shipment.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id - * @param bookshelfId The foreign key ID referencing the bookshelfId that will go in the shipment. - */ - - -data class Shipment ( - - @Json(name = "id") - val id: kotlin.String, - - /* The foreign key ID referencing the bookshelfId that will go in the shipment. */ - @Json(name = "bookshelfId") - val bookshelfId: kotlin.String - -) - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/supply-chain-cactus-plugin.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/supply-chain-cactus-plugin.ts deleted file mode 100644 index 952d548de0..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/supply-chain-cactus-plugin.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { Express } from "express"; -import OAS from "../../json/openapi.json"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - ICactusPlugin, - IPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { - DefaultApi as XdaiApi, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-xdai"; -import { DefaultApi as BesuApi } from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { InsertBambooHarvestEndpoint } from "./web-services/insert-bamboo-harvest-endpoint"; -import { DefaultApi as FabricApi } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -import { ListBambooHarvestEndpoint } from "./web-services/list-bamboo-harvest-endpoint"; -import { ISupplyChainContractDeploymentInfo } from "../i-supply-chain-contract-deployment-info"; -import { InsertBookshelfEndpoint } from "./web-services/insert-bookshelf-endpoint"; -import { ListBookshelfEndpoint } from "./web-services/list-bookshelf-endpoint"; -import { InsertShipmentEndpoint } from "./web-services/insert-shipment-endpoint"; -import { ListShipmentEndpoint } from "./web-services/list-shipment-endpoint"; - -export interface OrgEnv { - CORE_PEER_LOCALMSPID: string; - CORE_PEER_ADDRESS: string; - CORE_PEER_MSPCONFIGPATH: string; - CORE_PEER_TLS_ROOTCERT_FILE: string; - ORDERER_TLS_ROOTCERT_FILE: string; -} - -export interface ISupplyChainCactusPluginOptions { - logLevel?: LogLevelDesc; - instanceId: string; - xdaiApiClient: XdaiApi; - besuApiClient: BesuApi; - fabricApiClient: FabricApi; - web3SigningCredential?: Web3SigningCredential; - fabricEnvironment?: NodeJS.ProcessEnv; - contracts: ISupplyChainContractDeploymentInfo; -} - -export class SupplyChainCactusPlugin - implements ICactusPlugin, IPluginWebService -{ - public static readonly CLASS_NAME = "SupplyChainCactusPlugin"; - - private readonly log: Logger; - private readonly instanceId: string; - - private endpoints: IWebServiceEndpoint[] | undefined; - - public get className(): string { - return SupplyChainCactusPlugin.CLASS_NAME; - } - - constructor(public readonly options: ISupplyChainCactusPluginOptions) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} arg options.instanceId`); - Checks.nonBlankString(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy(options.contracts, `${fnTag} arg options.contracts`); - Checks.truthy(options.xdaiApiClient, `${fnTag} arg options.xdaiApiClient`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.instanceId = options.instanceId; - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const insertBambooHarvest = new InsertBambooHarvestEndpoint({ - // contractAddress: this.options.contracts.bambooHarvestRepository.address, - // contractAbi: this.options.contracts.bambooHarvestRepository.abi, - contractName: this.options.contracts.bambooHarvestRepository.contractName, - apiClient: this.options.xdaiApiClient, - web3SigningCredential: this.options - .web3SigningCredential as Web3SigningCredential, - logLevel: this.options.logLevel, - keychainId: this.options.contracts.bambooHarvestRepository.keychainId, - }); - - const listBambooHarvest = new ListBambooHarvestEndpoint({ - // contractAddress: this.options.contracts.bambooHarvestRepository.address, - // contractAbi: this.options.contracts.bambooHarvestRepository.abi, - contractName: this.options.contracts.bambooHarvestRepository.contractName, - apiClient: this.options.xdaiApiClient, - logLevel: this.options.logLevel, - keychainId: this.options.contracts.bambooHarvestRepository.keychainId, - }); - - const insertBookshelf = new InsertBookshelfEndpoint({ - contractName: this.options.contracts.bookshelfRepository.contractName, - besuApi: this.options.besuApiClient, - web3SigningCredential: this.options - .web3SigningCredential as Web3SigningCredential, - logLevel: this.options.logLevel, - keychainId: this.options.contracts.bookshelfRepository.keychainId, - }); - - const listBookshelf = new ListBookshelfEndpoint({ - contractName: this.options.contracts.bookshelfRepository.contractName, - besuApi: this.options.besuApiClient, - logLevel: this.options.logLevel, - keychainId: this.options.contracts.bookshelfRepository.keychainId, - }); - - const insertShipment = new InsertShipmentEndpoint({ - logLevel: this.options.logLevel, - fabricApi: this.options.fabricApiClient, - keychainId: this.options.contracts.bookshelfRepository.keychainId, - }); - - const listShipment = new ListShipmentEndpoint({ - logLevel: this.options.logLevel, - fabricApi: this.options.fabricApiClient, - keychainId: this.options.contracts.bookshelfRepository.keychainId, - }); - - this.endpoints = [ - insertBambooHarvest, - listBambooHarvest, - insertBookshelf, - listBookshelf, - insertShipment, - listShipment, - ]; - return this.endpoints; - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return "@hyperledger/cactus-example-supply-chain-backend"; - } - - public async onPluginInit(): Promise { - return; - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-bamboo-harvest-endpoint.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-bamboo-harvest-endpoint.ts deleted file mode 100644 index 7681c53864..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-bamboo-harvest-endpoint.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import { - AuthorizationOptionsProvider, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { - DefaultApi as XdaiApi, - EthContractInvocationType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-xdai"; - -import OAS from "../../../json/openapi.json"; -import { InsertBambooHarvestRequest } from "../../generated/openapi/typescript-axios"; - -export interface IInsertBambooHarvestEndpointOptions { - logLevel?: LogLevelDesc; - contractName: string; - // contractAbi: any; - apiClient: XdaiApi; - web3SigningCredential: Web3SigningCredential; - keychainId: string; - authorizationOptionsProvider?: AuthorizationOptionsProvider; -} - -const K_DEFAULT_AUTHORIZATION_OPTIONS: IEndpointAuthzOptions = { - isProtected: true, - requiredRoles: [], -}; - -export class InsertBambooHarvestEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InsertBambooHarvestEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return InsertBambooHarvestEndpoint.CLASS_NAME; - } - - private readonly authorizationOptionsProvider: AuthorizationOptionsProvider; - - constructor(public readonly opts: IInsertBambooHarvestEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.apiClient, `${fnTag} options.apiClient`); - // Checks.truthy(opts.contractAbi, `${fnTag} options.contractAbi`); - Checks.nonBlankString( - opts.contractName, - `${fnTag} options.contractAddress`, - ); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.authorizationOptionsProvider = - opts.authorizationOptionsProvider || - AuthorizationOptionsProvider.of(K_DEFAULT_AUTHORIZATION_OPTIONS, level); - - this.log.debug(`Instantiated ${this.className} OK`); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bamboo-harvest"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bamboo-harvest" - ]; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - return this.authorizationOptionsProvider; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - const { bambooHarvest } = req.body as InsertBambooHarvestRequest; - this.log.debug(`${tag} %o`, bambooHarvest); - - const { - data: { success, callOutput, transactionReceipt }, - } = await this.opts.apiClient.invokeContractV1({ - contractName: this.opts.contractName, - invocationType: EthContractInvocationType.Send, - methodName: "insertRecord", - gas: 1000000, - params: [bambooHarvest], - web3SigningCredential: this.opts.web3SigningCredential, - keychainId: this.opts.keychainId, - }); - - const body = { success, callOutput, transactionReceipt }; - res.status(200); - res.json(body); - } catch (ex: unknown) { - const exStr = safeStringifyException(ex); - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: exStr }); - } - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-bookshelf-endpoint.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-bookshelf-endpoint.ts deleted file mode 100644 index c6b4224c4b..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-bookshelf-endpoint.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { - DefaultApi as BesuApi, - EthContractInvocationType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import OAS from "../../../json/openapi.json"; -import { InsertBookshelfRequest } from "../../generated/openapi/typescript-axios/index"; - -export interface IInsertBookshelfEndpointOptions { - logLevel?: LogLevelDesc; - // contractAddress: string; - // contractAbi: any; - contractName: string; - besuApi: BesuApi; - web3SigningCredential: Web3SigningCredential; - keychainId: string; -} - -export class InsertBookshelfEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InsertBookshelfEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return InsertBookshelfEndpoint.CLASS_NAME; - } - constructor(public readonly opts: IInsertBookshelfEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.besuApi, `${fnTag} options.besuApi`); - // Checks.truthy(opts.contractAddress, `${fnTag} options.contractAddress`); - // Checks.truthy(opts.contractAbi, `${fnTag} options.contractAbi`); - Checks.nonBlankString( - opts.contractName, - `${fnTag} options.contractAddress`, - ); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bookshelf"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bookshelf" - ]; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - const { bookshelf } = req.body as InsertBookshelfRequest; - this.log.debug(`${tag} %o`, bookshelf); - - const { - data: { callOutput, transactionReceipt }, - } = await this.opts.besuApi.invokeContractV1({ - contractName: this.opts.contractName, - invocationType: EthContractInvocationType.Send, - methodName: "insertRecord", - gas: 1000000, - params: [bookshelf], - signingCredential: this.opts.web3SigningCredential, - keychainId: this.opts.keychainId, - }); - - const body = { callOutput, transactionReceipt }; - res.status(200); - res.json(body); - } catch (ex: unknown) { - const exStr = safeStringifyException(ex); - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: exStr }); - } - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-shipment-endpoint.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-shipment-endpoint.ts deleted file mode 100644 index 0159292185..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-shipment-endpoint.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { InsertShipmentRequest } from "../../generated/openapi/typescript-axios/index"; -import { - DefaultApi as FabricApi, - FabricContractInvocationType, - RunTransactionRequest, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -import OAS from "../../../json/openapi.json"; - -export interface IInsertShipmentEndpointOptions { - logLevel?: LogLevelDesc; - fabricApi: FabricApi; - keychainId: string; -} - -export class InsertShipmentEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InsertShipmentEndpoint"; - private readonly log: Logger; - private readonly keychainId: string; - - public get className(): string { - return InsertShipmentEndpoint.CLASS_NAME; - } - - constructor(public readonly opts: IInsertShipmentEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.fabricApi, `${fnTag} options.fabricApi`); - Checks.truthy(opts.keychainId, `${fnTag} options.keychain`); - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.keychainId = opts.keychainId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-shipment"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-shipment" - ]; - } - - getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - const { shipment } = req.body as InsertShipmentRequest; - this.log.debug(`${tag} %o`, shipment); - const request: RunTransactionRequest = { - signingCredential: { - keychainId: this.keychainId, - keychainRef: "user2", - }, - channelName: "mychannel", - contractName: "shipment", - invocationType: FabricContractInvocationType.Send, - methodName: "InsertShipment", - params: [shipment.id, shipment.bookshelfId], - }; - const { - data: { functionOutput }, - } = await this.opts.fabricApi.runTransactionV1(request); - - const body = { functionOutput }; - - res.json(body); - res.status(200); - } catch (ex: unknown) { - const exStr = safeStringifyException(ex); - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: exStr }); - } - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/list-bamboo-harvest-endpoint.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/list-bamboo-harvest-endpoint.ts deleted file mode 100644 index 40bc3d6ad2..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/list-bamboo-harvest-endpoint.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { - DefaultApi as XdaiApi, - EthContractInvocationType, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-xdai"; - -import OAS from "../../../json/openapi.json"; -import { BambooHarvestConverter } from "../../model/converter/bamboo-harvest-converter"; - -export interface IListBambooHarvestEndpointOptions { - logLevel?: LogLevelDesc; - contractName: string; - // contractAbi: any; - apiClient: XdaiApi; - keychainId: string; -} - -export class ListBambooHarvestEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ListBambooHarvestEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return ListBambooHarvestEndpoint.CLASS_NAME; - } - - constructor(public readonly opts: IListBambooHarvestEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.apiClient, `${fnTag} options.apiClient`); - // Checks.truthy(opts.contractAddress, `${fnTag} options.contractAddress`); - // Checks.truthy(opts.contractAbi, `${fnTag} options.contractAbi`); - Checks.nonBlankString( - opts.contractName, - `${fnTag} options.contractAddress`, - ); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bamboo-harvest"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bamboo-harvest" - ]; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - this.log.debug(`${tag}`); - - const { data } = await this.opts.apiClient.invokeContractV1({ - contractName: this.opts.contractName, - invocationType: EthContractInvocationType.Call, - methodName: "getAllRecords", - gas: 1000000, - params: [], - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - keychainId: this.opts.keychainId, - }); - const { callOutput } = data; - - const rows = BambooHarvestConverter.ofSolidityStructList(callOutput); - this.log.debug(`apiClient.invokeContractV1() => %o`, data); - - const body = { data: rows }; - res.status(200); - res.json(body); - } catch (ex: unknown) { - const exStr = safeStringifyException(ex); - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: exStr }); - } - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/list-bookshelf-endpoint.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/list-bookshelf-endpoint.ts deleted file mode 100644 index bf13e2aa52..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/list-bookshelf-endpoint.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { - DefaultApi as BesuApi, - EthContractInvocationType, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import OAS from "../../../json/openapi.json"; -import { BookshelfConverter } from "../../model/converter/bookshelf-converter"; - -export interface IListBookshelfEndpointOptions { - logLevel?: LogLevelDesc; - contractName: string; - // contractAddress: string; - // contractAbi: any; - besuApi: BesuApi; - keychainId: string; -} - -export class ListBookshelfEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ListBookshelfEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return ListBookshelfEndpoint.CLASS_NAME; - } - - constructor(public readonly opts: IListBookshelfEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.besuApi, `${fnTag} options.besuApi`); - // Checks.truthy(opts.contractAddress, `${fnTag} options.contractAddress`); - // Checks.truthy(opts.contractAbi, `${fnTag} options.contractAbi`); - Checks.nonBlankString(opts.contractName, `${fnTag} options.contractName`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bookshelf"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bookshelf" - ]; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - this.log.debug(`${tag}`); - - const { data } = await this.opts.besuApi.invokeContractV1({ - contractName: this.opts.contractName, - invocationType: EthContractInvocationType.Call, - methodName: "getAllRecords", - gas: 1000000, - params: [], - signingCredential: { - type: Web3SigningCredentialType.None, - }, - keychainId: this.opts.keychainId, - }); - const { callOutput } = data; - - const rows = BookshelfConverter.ofSolidityStructList(callOutput); - this.log.debug(`apiV1BesuInvokeContract() => %o`, data); - - const body = { data: rows }; - res.status(200); - res.json(body); - } catch (ex: unknown) { - const exStr = safeStringifyException(ex); - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: exStr }); - } - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/list-shipment-endpoint.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/list-shipment-endpoint.ts deleted file mode 100644 index 0e9808bb22..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/list-shipment-endpoint.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, - Strings, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { - DefaultApi as FabricApi, - FabricContractInvocationType, - RunTransactionRequest, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -import OAS from "../../../json/openapi.json"; - -export interface IListShipmentEndpointOptions { - readonly logLevel?: LogLevelDesc; - readonly fabricApi: FabricApi; - readonly keychainId: string; -} - -export class ListShipmentEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ListShipmentEndpoint"; - private readonly log: Logger; - private readonly keychainId: string; - - public get className(): string { - return ListShipmentEndpoint.CLASS_NAME; - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-shipment"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-shipment" - ]; - } - - getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().get.operationId; - } - - constructor(public readonly opts: IListShipmentEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.fabricApi, `${fnTag} options.fabricApi`); - Checks.truthy(opts.keychainId, `${fnTag} options.keychainId`); - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.keychainId = opts.keychainId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - this.log.debug(`${tag}`); - const request: RunTransactionRequest = { - signingCredential: { - keychainId: this.keychainId, - keychainRef: "user2", - }, - channelName: "mychannel", - contractName: "shipment", - invocationType: FabricContractInvocationType.Call, - methodName: "GetListShipment", - params: [], - }; - const { - data: { functionOutput: fnOutJsonRaw }, - } = await this.opts.fabricApi.runTransactionV1(request); - // The functionOutput might come back as an empty string which fails to - // JSON parse and if that happens we just massage it into an empty array. - const fnOutJson = Strings.isNonBlank(fnOutJsonRaw) ? fnOutJsonRaw : "[]"; - const output = JSON.parse(fnOutJson); - const body = { data: output }; - res.status(200); - res.json(body); - } catch (ex: unknown) { - const exStr = safeStringifyException(ex); - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: exStr }); - } - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/api.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 4d24f0d745..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,661 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Example - Supply Chain App - * Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface BambooHarvest - */ -export interface BambooHarvest { - /** - * - * @type {string} - * @memberof BambooHarvest - */ - 'id': string; - /** - * - * @type {string} - * @memberof BambooHarvest - */ - 'location': string; - /** - * - * @type {string} - * @memberof BambooHarvest - */ - 'startedAt': string; - /** - * - * @type {string} - * @memberof BambooHarvest - */ - 'endedAt': string; - /** - * - * @type {string} - * @memberof BambooHarvest - */ - 'harvester': string; -} -/** - * - * @export - * @interface Bookshelf - */ -export interface Bookshelf { - /** - * - * @type {string} - * @memberof Bookshelf - */ - 'id': string; - /** - * The number of shelves the bookshelf comes with. - * @type {number} - * @memberof Bookshelf - */ - 'shelfCount': number; - /** - * The foreign key ID referencing the bamboo harvest that yielded the wood material for the construction of the bookshelf. - * @type {string} - * @memberof Bookshelf - */ - 'bambooHarvestId': string; -} -/** - * - * @export - * @interface InsertBambooHarvestRequest - */ -export interface InsertBambooHarvestRequest { - /** - * - * @type {BambooHarvest} - * @memberof InsertBambooHarvestRequest - */ - 'bambooHarvest': BambooHarvest; -} -/** - * - * @export - * @interface InsertBambooHarvestResponse - */ -export interface InsertBambooHarvestResponse { - /** - * - * @type {{ [key: string]: any; }} - * @memberof InsertBambooHarvestResponse - */ - 'callOutput'?: { [key: string]: any; }; - /** - * - * @type {{ [key: string]: any; }} - * @memberof InsertBambooHarvestResponse - */ - 'transactionReceipt'?: { [key: string]: any; }; -} -/** - * - * @export - * @interface InsertBookshelfRequest - */ -export interface InsertBookshelfRequest { - /** - * - * @type {Bookshelf} - * @memberof InsertBookshelfRequest - */ - 'bookshelf': Bookshelf; -} -/** - * - * @export - * @interface InsertBookshelfResponse - */ -export interface InsertBookshelfResponse { - /** - * - * @type {{ [key: string]: any; }} - * @memberof InsertBookshelfResponse - */ - 'callOutput'?: { [key: string]: any; }; - /** - * - * @type {{ [key: string]: any; }} - * @memberof InsertBookshelfResponse - */ - 'transactionReceipt'?: { [key: string]: any; }; -} -/** - * - * @export - * @interface InsertShipmentRequest - */ -export interface InsertShipmentRequest { - /** - * - * @type {Shipment} - * @memberof InsertShipmentRequest - */ - 'shipment': Shipment; -} -/** - * - * @export - * @interface InsertShipmentResponse - */ -export interface InsertShipmentResponse { - /** - * - * @type {{ [key: string]: any; }} - * @memberof InsertShipmentResponse - */ - 'callOutput'?: { [key: string]: any; }; - /** - * - * @type {{ [key: string]: any; }} - * @memberof InsertShipmentResponse - */ - 'transactionReceipt'?: { [key: string]: any; }; -} -/** - * - * @export - * @interface ListBambooHarvestResponse - */ -export interface ListBambooHarvestResponse { - /** - * - * @type {Array} - * @memberof ListBambooHarvestResponse - */ - 'data': Array; -} -/** - * - * @export - * @interface ListBookshelfResponse - */ -export interface ListBookshelfResponse { - /** - * - * @type {Array} - * @memberof ListBookshelfResponse - */ - 'data': Array; -} -/** - * - * @export - * @interface ListShipmentResponse - */ -export interface ListShipmentResponse { - /** - * - * @type {Array} - * @memberof ListShipmentResponse - */ - 'data': Array; -} -/** - * - * @export - * @interface Shipment - */ -export interface Shipment { - /** - * - * @type {string} - * @memberof Shipment - */ - 'id': string; - /** - * The foreign key ID referencing the bookshelfId that will go in the shipment. - * @type {string} - * @memberof Shipment - */ - 'bookshelfId': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Inserts the provided BambooHarvest entity to the ledger. - * @param {InsertBambooHarvestRequest} [insertBambooHarvestRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - insertBambooHarvestV1: async (insertBambooHarvestRequest?: InsertBambooHarvestRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bamboo-harvest`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(insertBambooHarvestRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Inserts the provided Bookshelf entity to the ledger. - * @param {InsertBookshelfRequest} [insertBookshelfRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - insertBookshelfV1: async (insertBookshelfRequest?: InsertBookshelfRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-bookshelf`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(insertBookshelfRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Inserts the provided Shipment entity to the ledger. - * @param {InsertShipmentRequest} [insertShipmentRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - insertShipmentV1: async (insertShipmentRequest?: InsertShipmentRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/insert-shipment`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(insertShipmentRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Lists all the BambooHarvest entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBambooHarvestV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bamboo-harvest`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Lists all the Bookshelf entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBookshelfV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-bookshelf`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Lists all the Shipments entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listShipmentV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-example-supply-chain-backend/list-shipment`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Inserts the provided BambooHarvest entity to the ledger. - * @param {InsertBambooHarvestRequest} [insertBambooHarvestRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async insertBambooHarvestV1(insertBambooHarvestRequest?: InsertBambooHarvestRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.insertBambooHarvestV1(insertBambooHarvestRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Inserts the provided Bookshelf entity to the ledger. - * @param {InsertBookshelfRequest} [insertBookshelfRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async insertBookshelfV1(insertBookshelfRequest?: InsertBookshelfRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.insertBookshelfV1(insertBookshelfRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Inserts the provided Shipment entity to the ledger. - * @param {InsertShipmentRequest} [insertShipmentRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async insertShipmentV1(insertShipmentRequest?: InsertShipmentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.insertShipmentV1(insertShipmentRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Lists all the BambooHarvest entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listBambooHarvestV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listBambooHarvestV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Lists all the Bookshelf entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listBookshelfV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listBookshelfV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Lists all the Shipments entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listShipmentV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listShipmentV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Inserts the provided BambooHarvest entity to the ledger. - * @param {InsertBambooHarvestRequest} [insertBambooHarvestRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - insertBambooHarvestV1(insertBambooHarvestRequest?: InsertBambooHarvestRequest, options?: any): AxiosPromise { - return localVarFp.insertBambooHarvestV1(insertBambooHarvestRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Inserts the provided Bookshelf entity to the ledger. - * @param {InsertBookshelfRequest} [insertBookshelfRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - insertBookshelfV1(insertBookshelfRequest?: InsertBookshelfRequest, options?: any): AxiosPromise { - return localVarFp.insertBookshelfV1(insertBookshelfRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Inserts the provided Shipment entity to the ledger. - * @param {InsertShipmentRequest} [insertShipmentRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - insertShipmentV1(insertShipmentRequest?: InsertShipmentRequest, options?: any): AxiosPromise { - return localVarFp.insertShipmentV1(insertShipmentRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Lists all the BambooHarvest entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBambooHarvestV1(options?: any): AxiosPromise { - return localVarFp.listBambooHarvestV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Lists all the Bookshelf entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBookshelfV1(options?: any): AxiosPromise { - return localVarFp.listBookshelfV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Lists all the Shipments entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listShipmentV1(options?: any): AxiosPromise { - return localVarFp.listShipmentV1(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Inserts the provided BambooHarvest entity to the ledger. - * @param {InsertBambooHarvestRequest} [insertBambooHarvestRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public insertBambooHarvestV1(insertBambooHarvestRequest?: InsertBambooHarvestRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).insertBambooHarvestV1(insertBambooHarvestRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Inserts the provided Bookshelf entity to the ledger. - * @param {InsertBookshelfRequest} [insertBookshelfRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public insertBookshelfV1(insertBookshelfRequest?: InsertBookshelfRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).insertBookshelfV1(insertBookshelfRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Inserts the provided Shipment entity to the ledger. - * @param {InsertShipmentRequest} [insertShipmentRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public insertShipmentV1(insertShipmentRequest?: InsertShipmentRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).insertShipmentV1(insertShipmentRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Lists all the BambooHarvest entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public listBambooHarvestV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).listBambooHarvestV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Lists all the Bookshelf entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public listBookshelfV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).listBookshelfV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Lists all the Shipments entities stored on the ledger. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public listShipmentV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).listShipmentV1(options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/base.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 6e402e50d3..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Example - Supply Chain App - * Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/common.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 84b1ea4255..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Example - Supply Chain App - * Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index ee7065ecc7..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Example - Supply Chain App - * Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/index.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 49f66587a6..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Example - Supply Chain App - * Demonstrates how a business use case can be satisfied with Cactus when multiple distinct ledgers are involved. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/i-eth-contract-deployment.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/i-eth-contract-deployment.ts deleted file mode 100644 index 240d09ecc4..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/i-eth-contract-deployment.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface IEthContractDeployment { - address: string; - abi: unknown; - bytecode: string; - contractName: string; - keychainId: string; -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/i-fabric-contract-deployment.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/i-fabric-contract-deployment.ts deleted file mode 100644 index f749ed10ae..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/i-fabric-contract-deployment.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IFabricContractDeployment { - chaincodeId: string; - channelName: string; -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/i-supply-chain-contract-deployment-info.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/i-supply-chain-contract-deployment-info.ts deleted file mode 100644 index ef088ec696..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/i-supply-chain-contract-deployment-info.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IEthContractDeployment } from "./i-eth-contract-deployment"; -import { IFabricContractDeployment } from "./i-fabric-contract-deployment"; - -export interface ISupplyChainContractDeploymentInfo { - bambooHarvestRepository: IEthContractDeployment; - bookshelfRepository: IEthContractDeployment; - shipmentRepository: IFabricContractDeployment; -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/index.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/index.web.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/index.web.ts deleted file mode 100755 index bdf54028d2..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/model/converter/bamboo-harvest-converter.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/model/converter/bamboo-harvest-converter.ts deleted file mode 100644 index e6211fd075..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/model/converter/bamboo-harvest-converter.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { BambooHarvest } from "../../generated/openapi/typescript-axios"; -import { RuntimeError } from "run-time-error-cjs"; - -/** - * Responsible for converting model entities such as the `BambooHarvest` to and - * from the different representations it can exist in such as a generic JS - * object with key/value pair properties or when being returned as an array of - * values by a Solidity smart contract for example where the indices of the - * array can be mapped to the field names. - */ -export class BambooHarvestConverter { - public static SOLIDITY_FIELD_ID = 0; - public static SOLIDITY_FIELD_LOCATION = 1; - public static SOLIDITY_FIELD_STARTED_AT = 2; - public static SOLIDITY_FIELD_ENDED_AT = 3; - public static SOLIDITY_FIELD_HARVESTER = 4; - - /** - * Converts a `BambooHarvest` model entity from an array representation ( - * usually returned by a solidity contract function) to a Plain Old Java Object. - * - * @param arr The array containing the values of properties describing a - * `BambooHarvest` model entity. - */ - public static ofSolidityStruct(arr: unknown[]): BambooHarvest { - const id = arr[BambooHarvestConverter.SOLIDITY_FIELD_ID]; - if (typeof id !== "string") { - const errMsg = `Expected the value of arr[${BambooHarvestConverter.SOLIDITY_FIELD_ID}] to be a string`; - throw new RuntimeError(errMsg); - } - const location = arr[BambooHarvestConverter.SOLIDITY_FIELD_LOCATION]; - if (typeof location !== "string") { - const errMsg = `Expected the value of arr[${BambooHarvestConverter.SOLIDITY_FIELD_LOCATION}] to be a string`; - throw new RuntimeError(errMsg); - } - const startedAt = arr[BambooHarvestConverter.SOLIDITY_FIELD_STARTED_AT]; - if (typeof startedAt !== "string") { - const errMsg = `Expected the value of arr[${BambooHarvestConverter.SOLIDITY_FIELD_STARTED_AT}] to be a string`; - throw new RuntimeError(errMsg); - } - const endedAt = arr[BambooHarvestConverter.SOLIDITY_FIELD_ENDED_AT]; - if (typeof endedAt !== "string") { - const errMsg = `Expected the value of arr[${BambooHarvestConverter.SOLIDITY_FIELD_ENDED_AT}] to be a string`; - throw new RuntimeError(errMsg); - } - const harvester = arr[BambooHarvestConverter.SOLIDITY_FIELD_HARVESTER]; - if (typeof harvester !== "string") { - const errMsg = `Expected the value of arr[${BambooHarvestConverter.SOLIDITY_FIELD_HARVESTER}] to be a string`; - throw new RuntimeError(errMsg); - } - return { - id, - location, - startedAt, - endedAt, - harvester, - }; - } - - public static ofSolidityStructList( - arrayOfArrays: unknown[][], - ): BambooHarvest[] { - return arrayOfArrays.map(BambooHarvestConverter.ofSolidityStruct); - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/model/converter/bookshelf-converter.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/model/converter/bookshelf-converter.ts deleted file mode 100644 index 36af34f943..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/model/converter/bookshelf-converter.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Bookshelf } from "../../generated/openapi/typescript-axios/index"; -import { RuntimeError } from "run-time-error-cjs"; - -/** - * Responsible for converting model entities such as the `Bookshelf` to and - * from the different representations it can exist in such as a generic JS - * object with key/value pair properties or when being returned as an array of - * values by a Solidity smart contract for example where the indices of the - * array can be mapped to the field names. - */ -export class BookshelfConverter { - public static SOLIDITY_FIELD_ID = 0; - public static SOLIDITY_FIELD_SHELF_COUNT = 1; - public static SOLIDITY_FIELD_BAMBOO_HARVEST_ID = 2; - - /** - * Converts a `Bookshelf` model entity from an array representation ( - * usually returned by a solidity contract function) to a Plain Old Java Object. - * - * @param arr The array containing the values of properties describing a - * `Bookshelf` model entity. - */ - public static ofSolidityStruct(arr: unknown[]): Bookshelf { - const id = arr[BookshelfConverter.SOLIDITY_FIELD_ID]; - if (typeof id !== "string") { - const errMsg = `Expected the value of arr[${BookshelfConverter.SOLIDITY_FIELD_ID}] to be a string`; - throw new RuntimeError(errMsg); - } - const shelfCountStr = arr[ - BookshelfConverter.SOLIDITY_FIELD_SHELF_COUNT - ] as string; - const shelfCount = parseInt(shelfCountStr, 10); - if (typeof shelfCount !== "number") { - const errMsg = `Expected the value of arr[${BookshelfConverter.SOLIDITY_FIELD_SHELF_COUNT}] to be a number`; - throw new RuntimeError(errMsg); - } - const bambooHarvestId = - arr[BookshelfConverter.SOLIDITY_FIELD_BAMBOO_HARVEST_ID]; - if (typeof bambooHarvestId !== "string") { - const errMsg = `Expected the value of arr[${BookshelfConverter.SOLIDITY_FIELD_BAMBOO_HARVEST_ID}] to be a string`; - throw new RuntimeError(errMsg); - } - return { - id, - shelfCount, - bambooHarvestId, - }; - } - - public static ofSolidityStructList(arrayOfArrays: unknown[][]): Bookshelf[] { - return arrayOfArrays.map(BookshelfConverter.ofSolidityStruct); - } -} diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/public-api.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/public-api.ts deleted file mode 100755 index 2091edd6f7..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/public-api.ts +++ /dev/null @@ -1,11 +0,0 @@ -export { - ISupplyChainCactusPluginOptions, - SupplyChainCactusPlugin, - OrgEnv, -} from "./business-logic-plugin/supply-chain-cactus-plugin"; - -export { IEthContractDeployment } from "./i-eth-contract-deployment"; -export { ISupplyChainContractDeploymentInfo } from "./i-supply-chain-contract-deployment-info"; -export { IFabricContractDeployment } from "./i-fabric-contract-deployment"; - -export * from "./generated/openapi/typescript-axios/index"; diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/test/typescript/integration/api-surface.test.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/test/typescript/unit/api-surface.test.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/tsconfig.json b/examples/cactus-example-supply-chain-business-logic-plugin/tsconfig.json deleted file mode 100644 index 6b66cb7741..0000000000 --- a/examples/cactus-example-supply-chain-business-logic-plugin/tsconfig.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-example-supply-chain-business-logic-plugin.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../../packages/cactus-api-client/tsconfig.json" - }, - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-consortium-manual/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-xdai/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-frontend/.gitignore b/examples/cactus-example-supply-chain-frontend/.gitignore deleted file mode 100644 index 81b7ca7474..0000000000 --- a/examples/cactus-example-supply-chain-frontend/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -/.angular/cache -# Specifies intentionally untracked files to ignore when using Git -# http://git-scm.com/docs/gitignore - -*~ -*.sw[mnpcod] -.tmp -*.tmp -*.tmp.* -*.sublime-project -*.sublime-workspace -.DS_Store -Thumbs.db -UserInterfaceState.xcuserstate -$RECYCLE.BIN/ - -*.log -log.txt -npm-debug.log* - -/.idea -/.ionic -/.sass-cache -/.sourcemaps -/.versions -/.vscode -/coverage -/dist -/node_modules -/platforms -/plugins -/www diff --git a/examples/cactus-example-supply-chain-frontend/CHANGELOG.md b/examples/cactus-example-supply-chain-frontend/CHANGELOG.md deleted file mode 100644 index a5f4192bfa..0000000000 --- a/examples/cactus-example-supply-chain-frontend/CHANGELOG.md +++ /dev/null @@ -1,172 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Features - -* **cacti-cmd-gui-app:** add GUI to visualize Fabric, Ethereum blocks ([15d9e9d](https://github.com/hyperledger/cacti/commit/15d9e9dcdc072ac0f6be2bf5146102b1328faaaf)) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **cactus-example-supply-chain-app:** mitigate CVE-2022-24434 and CVE-2022-24999 ([d28d5e8](https://github.com/hyperledger/cactus/commit/d28d5e8f3ed5dff1aa049c8f1bccce79aa21e948)), closes [#2041](https://github.com/hyperledger/cactus/issues/2041) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Features - -* add jwt authorization to supply chain example ([a4f07f6](https://github.com/hyperledger/cactus/commit/a4f07f6b1ea5b6cdd0397662cfbd9bb205a28bbe)), closes [#1579](https://github.com/hyperledger/cactus/issues/1579) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* add optional auth token to api-client and consortium-manual ([c2feebf](https://github.com/hyperledger/cactus/commit/c2feebfec56f13d68c2ea1ec3a34ce67394d0720)), closes [#1579](https://github.com/hyperledger/cactus/issues/1579) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Bug Fixes - -* **examples:** front-end packages missing browserify polyfills [#1224](https://github.com/hyperledger/cactus/issues/1224) ([4cc6f2c](https://github.com/hyperledger/cactus/commit/4cc6f2c5d3345a7af8cc04b9218c38d7670872a8)) - -### Features - -* **cmd-api-server:** support grpc web services [#1189](https://github.com/hyperledger/cactus/issues/1189) ([4cace1d](https://github.com/hyperledger/cactus/commit/4cace1dca3377e09d2ed37fdadeec6b125d47896)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -### Bug Fixes - -* **release:** package.json publish config non-public [#753](https://github.com/hyperledger/cactus/issues/753) ([5a1b7a6](https://github.com/hyperledger/cactus/commit/5a1b7a6eba9a18d4f7474a3c44d4a4035fc99e84)) - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Features - -* **example:** example extended with fabric ([55d6587](https://github.com/hyperledger/cactus/commit/55d65872dc689ee3b319c23515c1fea1df0a6444)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -**Note:** Version bump only for package @hyperledger/cactus-example-supply-chain-frontend diff --git a/examples/cactus-example-supply-chain-frontend/angular.json b/examples/cactus-example-supply-chain-frontend/angular.json deleted file mode 100644 index c66ed33423..0000000000 --- a/examples/cactus-example-supply-chain-frontend/angular.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "app": { - "root": "", - "sourceRoot": "src", - "projectType": "application", - "prefix": "app", - "schematics": {}, - "architect": { - "build": { - "builder": "@angular-builders/custom-webpack:browser", - "options": { - "customWebpackConfig": { - "path": "./webpack.config.overrides.js", - "mergeRules": { - "externals": "replace" - } - }, - "outputPath": "www", - "index": "src/index.html", - "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.app.json", - "assets": [ - { - "glob": "**/*", - "input": "src/assets", - "output": "assets" - }, - { - "glob": "**/*.svg", - "input": "node_modules/ionicons/dist/ionicons/svg", - "output": "./svg" - } - ], - "styles": [ - { - "input": "src/theme/variables.scss", - "inject": true - }, - { - "input": "src/global.scss", - "inject": true - } - ], - "scripts": [], - "aot": false, - "vendorChunk": true, - "extractLicenses": false, - "buildOptimizer": false, - "sourceMap": true, - "optimization": false, - "namedChunks": true - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "budgets": [ - { - "type": "initial", - "maximumWarning": "2mb", - "maximumError": "5mb" - } - ] - }, - "ci": { - "progress": false - } - }, - "defaultConfiguration": "" - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "app:build", - "proxyConfig": "proxy.conf.json" - }, - "configurations": { - "production": { - "browserTarget": "app:build:production" - }, - "ci": { - - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "app:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "styles": [], - "scripts": [], - "assets": [ - { - "glob": "favicon.ico", - "input": "src/", - "output": "/" - }, - { - "glob": "**/*", - "input": "src/assets", - "output": "/assets" - } - ] - }, - "configurations": { - "ci": { - "progress": false, - "watch": false - } - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "app:serve" - }, - "configurations": { - "production": { - "devServerTarget": "app:serve:production" - }, - "ci": { - "devServerTarget": "app:serve:ci" - } - } - }, - "ionic-cordova-build": { - "builder": "@ionic/angular-toolkit:cordova-build", - "options": { - "browserTarget": "app:build" - }, - "configurations": { - "production": { - "browserTarget": "app:build:production" - } - } - }, - "ionic-cordova-serve": { - "builder": "@ionic/angular-toolkit:cordova-serve", - "options": { - "cordovaBuildTarget": "app:ionic-cordova-build", - "devServerTarget": "app:serve" - }, - "configurations": { - "production": { - "cordovaBuildTarget": "app:ionic-cordova-build:production", - "devServerTarget": "app:serve:production" - } - } - } - } - } - }, - "cli": { - "schematicCollections": ["@ionic/angular-toolkit"], - "analytics": false - }, - "schematics": { - "@ionic/angular-toolkit:component": { - "styleext": "scss" - }, - "@ionic/angular-toolkit:page": { - "styleext": "scss" - } - } -} diff --git a/examples/cactus-example-supply-chain-frontend/ionic.config.json b/examples/cactus-example-supply-chain-frontend/ionic.config.json deleted file mode 100644 index a411138900..0000000000 --- a/examples/cactus-example-supply-chain-frontend/ionic.config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "cactus-example-supply-chain-frontend", - "integrations": {}, - "type": "angular" -} diff --git a/examples/cactus-example-supply-chain-frontend/package.json b/examples/cactus-example-supply-chain-frontend/package.json deleted file mode 100644 index a91177d6b0..0000000000 --- a/examples/cactus-example-supply-chain-frontend/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "name": "@hyperledger/cactus-example-supply-chain-frontend", - "version": "2.0.0", - "description": "The frontend component of an example project demonstrating how Cacti can be used for cross-chain dapp development.", - "keywords": [ - "Hyperledger", - "Cacti", - "Blockchain Integration", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "files": [ - "www/*" - ], - "scripts": { - "build": "ng build --verbose", - "build:dev:frontend": "ng build", - "build:prod:frontend": "ng build", - "ng": "ng", - "prepublishOnly": "ng build", - "serve": "ng serve", - "serve:proxy": "ng serve -- --port 8000 --proxy-config proxy.conf.json", - "start": "ng serve" - }, - "dependencies": { - "@angular/common": "17.3.11", - "@angular/core": "17.3.11", - "@angular/forms": "17.3.11", - "@angular/platform-browser": "17.3.11", - "@angular/platform-browser-dynamic": "17.3.11", - "@angular/router": "17.3.11", - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-example-supply-chain-business-logic-plugin": "2.0.0", - "@hyperledger/cactus-plugin-consortium-manual": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0", - "@ionic-native/core": "5.36.0", - "@ionic-native/splash-screen": "patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch", - "@ionic-native/status-bar": "patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch", - "@ionic/angular": "8.2.5", - "net-browserify": "0.2.4", - "run-time-error": "1.4.0", - "rxjs": "7.8.1", - "tls-browserify": "0.2.2", - "tslib": "2.6.2", - "uuid": "10.0.0", - "zone.js": "0.14.7" - }, - "devDependencies": { - "@angular-builders/custom-webpack": "17.0.2", - "@angular-devkit/build-angular": "17.3.8", - "@angular/cli": "17.3.8", - "@angular/compiler": "17.3.11", - "@angular/compiler-cli": "17.3.11", - "@angular/language-service": "17.3.11", - "@ionic/angular-toolkit": "10.0.0", - "@types/uuid": "10.0.0", - "browserify-fs": "1.0.0", - "https-browserify": "1.0.0", - "net-browserify": "0.2.4", - "os-browserify": "0.3.0", - "path-browserify": "1.0.1", - "tls-browserify": "0.2.2" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/examples/cactus-example-supply-chain-frontend/proxy.conf.json b/examples/cactus-example-supply-chain-frontend/proxy.conf.json deleted file mode 100644 index 63f712e857..0000000000 --- a/examples/cactus-example-supply-chain-frontend/proxy.conf.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "/api": { - "target": "http://localhost:4200", - "secure": false, - "logLevel": "debug" - } -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-frontend/src/app/app-routing.module.ts b/examples/cactus-example-supply-chain-frontend/src/app/app-routing.module.ts deleted file mode 100644 index 2ed4af8f9a..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/app-routing.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { NgModule } from "@angular/core"; -import { PreloadAllModules, RouterModule, Routes } from "@angular/router"; - -const routes: Routes = [ - { - path: "", - redirectTo: "bamboo-harvest-list", - pathMatch: "full", - }, - { - path: "bamboo-harvest-list", - loadChildren: () => - import("./bamboo-harvest/bamboo-harvest.module").then( - (m) => m.BambooHarvestPageModule, - ), - }, - { - path: "bookshelf-list", - loadChildren: () => - import("./bookshelf/bookshelf.module").then((m) => m.BookshelfPageModule), - }, - { - path: "shipment-list", - loadChildren: () => - import("./shipment/shipment.module").then((m) => m.ShipmentPageModule), - }, -]; - -@NgModule({ - imports: [ - RouterModule.forRoot(routes, { - preloadingStrategy: PreloadAllModules, - }), - ], - exports: [RouterModule], -}) -export class AppRoutingModule {} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/app.component.html b/examples/cactus-example-supply-chain-frontend/src/app/app.component.html deleted file mode 100644 index 9a586e028f..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/app.component.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - Hyperledger Cacti - Example: Supply Chain App - - - - - {{ p.title }} - - - - - - - - - diff --git a/examples/cactus-example-supply-chain-frontend/src/app/app.component.scss b/examples/cactus-example-supply-chain-frontend/src/app/app.component.scss deleted file mode 100644 index ff1091f338..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/app.component.scss +++ /dev/null @@ -1,105 +0,0 @@ -ion-menu ion-content { - --background: var(--ion-item-background, var(--ion-background-color, #fff)); -} - -ion-menu.md ion-content { - --padding-start: 8px; - --padding-end: 8px; - --padding-top: 20px; - --padding-bottom: 20px; -} - -ion-menu.md ion-list { - padding: 20px 0; -} - -ion-menu.md ion-note { - margin-bottom: 30px; -} - -ion-menu.md ion-list-header, -ion-menu.md ion-note { - padding-left: 10px; -} - -ion-menu.md ion-list#inbox-list { - border-bottom: 1px solid var(--ion-color-step-150, #d7d8da); -} - -ion-menu.md ion-list#inbox-list ion-list-header { - font-size: 22px; - font-weight: 600; - - min-height: 20px; -} - -ion-menu.md ion-item { - --padding-start: 10px; - --padding-end: 10px; - border-radius: 4px; -} - -ion-menu.md ion-item.selected { - --background: rgba(var(--ion-color-primary-rgb), 0.14); -} - -ion-menu.md ion-item.selected ion-icon { - color: var(--ion-color-primary); -} - -ion-menu.md ion-item ion-icon { - color: #616e7e; -} - -ion-menu.md ion-item ion-label { - font-weight: 500; -} - -ion-menu.ios ion-content { - --padding-bottom: 20px; -} - -ion-menu.ios ion-list { - padding: 20px 0 0 0; -} - -ion-menu.ios ion-note { - line-height: 24px; - margin-bottom: 20px; -} - -ion-menu.ios ion-item { - --padding-start: 16px; - --padding-end: 16px; - --min-height: 50px; -} - -ion-menu.ios ion-item.selected ion-icon { - color: var(--ion-color-primary); -} - -ion-menu.ios ion-item ion-icon { - font-size: 24px; - color: #73849a; -} - -ion-menu.ios ion-list-header, -ion-menu.ios ion-note { - padding-left: 16px; - padding-right: 16px; -} - -ion-menu.ios ion-note { - margin-bottom: 8px; -} - -ion-note { - display: inline-block; - font-size: 16px; - - color: var(--ion-color-medium-shade); -} - -ion-item.selected { - --color: var(--ion-color-primary); -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-frontend/src/app/app.component.ts b/examples/cactus-example-supply-chain-frontend/src/app/app.component.ts deleted file mode 100644 index 6d54f1dcc8..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/app.component.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Component } from "@angular/core"; - -import { Platform } from "@ionic/angular"; -import { SplashScreen } from "@ionic-native/splash-screen/ngx"; -import { StatusBar } from "@ionic-native/status-bar/ngx"; - -@Component({ - selector: "app-root", - templateUrl: "app.component.html", - styleUrls: ["app.component.scss"], -}) -export class AppComponent { - public selectedIndex = 0; - public appPages = [ - { - title: "Bamboo Harvests", - url: "/bamboo-harvest-list", - icon: "leaf", - }, - { - title: "Bookshelves", - url: "/bookshelf-list", - icon: "book", - }, - { - title: "Shipment", - url: "/shipment-list", - icon: "cube", - }, - ]; - - constructor( - private platform: Platform, - private splashScreen: SplashScreen, - private statusBar: StatusBar, - ) { - this.initializeApp(); - } - - initializeApp(): void { - this.platform.ready().then(() => { - this.statusBar.styleDefault(); - this.splashScreen.hide(); - }); - } -} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/app.module.ts b/examples/cactus-example-supply-chain-frontend/src/app/app.module.ts deleted file mode 100644 index 0f15759111..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/app.module.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { NgModule } from "@angular/core"; -import { BrowserModule } from "@angular/platform-browser"; -import { RouteReuseStrategy } from "@angular/router"; - -import { IonicModule, IonicRouteStrategy } from "@ionic/angular"; -import { SplashScreen } from "@ionic-native/splash-screen/ngx"; -import { StatusBar } from "@ionic-native/status-bar/ngx"; - -import { AppComponent } from "./app.component"; -import { AppRoutingModule } from "./app-routing.module"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - BESU_DEMO_LEDGER_ID, - CACTUS_API_URL, - XDAI_BESU_DEMO_LEDGER_ID, - FABRIC_DEMO_LEDGER_ID, -} from "../constants"; -import { ApiClient } from "@hyperledger/cactus-api-client"; -import { AuthConfig } from "./common/auth-config"; - -LoggerProvider.setLogLevel("TRACE"); - -const log: Logger = LoggerProvider.getOrCreate({ label: "app-module" }); - -let token = ""; -while (token == "") { - token = window.prompt("Introduce the token generated by the application"); -} -AuthConfig.authToken = token; -log.info(`Inserted token: ${AuthConfig.authToken}`); - -log.info("Running AppModule..."); -const cactusApiUrl = location.origin; -log.info("Instantiating ApiClient with CACTUS_API_URL=%o", cactusApiUrl); -const configuration = new Configuration({ - basePath: cactusApiUrl, - baseOptions: { headers: { Authorization: `Bearer ${AuthConfig.authToken}` } }, -}); -const apiClient = new ApiClient(configuration); - -@NgModule({ - declarations: [AppComponent], - imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule], - providers: [ - StatusBar, - SplashScreen, - { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }, - { - provide: CACTUS_API_URL, - useValue: cactusApiUrl, - }, - { - provide: XDAI_BESU_DEMO_LEDGER_ID, - // This has to match the ledger ID defined in supply-chain-app.ts - useValue: "XdaiBesuDemoLedger", - }, - { - provide: BESU_DEMO_LEDGER_ID, - // This has to match the ledger ID defined in supply-chain-app.ts - useValue: "BesuDemoLedger", - }, - { - provide: FABRIC_DEMO_LEDGER_ID, - // This has to match the ledger ID defined in supply-chain-app.ts - useValue: "FabricDemoLedger", - }, - { provide: ApiClient, useValue: apiClient }, - ], - bootstrap: [AppComponent], -}) -export class AppModule {} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-detail/bamboo-harvest-detail.page.html b/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-detail/bamboo-harvest-detail.page.html deleted file mode 100644 index 141a6783cc..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-detail/bamboo-harvest-detail.page.html +++ /dev/null @@ -1,75 +0,0 @@ - -
- - - Bamboo Harvest Details - - - - - - ID - - - - - - Location - - - -
- Location is required. -
-
- Location must be at least 1 characters long. -
-
- - - Started At (UTC) - - - - - Ended At (UTC) - - - - - Harvester - - - -
- Harvester is required. -
-
- Harvester must be at least 1 characters long. -
-
- - - - - Cancel - - - - Submit - - - - -
-
-
-
\ No newline at end of file diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-detail/bamboo-harvest-detail.page.ts b/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-detail/bamboo-harvest-detail.page.ts deleted file mode 100644 index 1aaee0bba2..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-detail/bamboo-harvest-detail.page.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import { RuntimeError } from "run-time-error"; - -import { Component, Inject, Input, OnInit } from "@angular/core"; -import { - UntypedFormGroup, - UntypedFormBuilder, - Validators, -} from "@angular/forms"; -import { ModalController } from "@ionic/angular"; - -import { ApiClient } from "@hyperledger/cactus-api-client"; -import { BambooHarvest } from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; - -import { XDAI_BESU_DEMO_LEDGER_ID } from "../../../constants"; -import { isBambooHarvest } from "../is-bamboo-harvest"; - -@Component({ - selector: "app-bamboo-harvest-detail", - templateUrl: "./bamboo-harvest-detail.page.html", - styleUrls: [], -}) -export class BambooHarvestDetailPage implements OnInit { - private readonly log: Logger; - public form: UntypedFormGroup; - @Input() - public bambooHarvest: BambooHarvest; - - constructor( - private readonly baseClient: ApiClient, - public readonly modalController: ModalController, - public readonly formBuilder: UntypedFormBuilder, - @Inject(XDAI_BESU_DEMO_LEDGER_ID) private readonly xdaiBesuLedgerId: string, - ) { - this.log = LoggerProvider.getOrCreate({ label: "BambooHarvestDetailPage" }); - } - - async ngOnInit(): Promise { - this.log.debug("component initialized.", this.bambooHarvest); - - if (!this.bambooHarvest) { - this.bambooHarvest = { - id: uuidv4(), - harvester: "Captain Lumberjack Logging Corporation", - location: "London, NW1 2DB, United Kingdom", - startedAt: new Date(2020, 6, 10, 7, 0, 0, 0).toJSON(), - endedAt: new Date(2020, 6, 10, 16, 0, 0, 0).toJSON(), - }; - } - - this.form = this.formBuilder.group({ - id: [this.bambooHarvest.id, Validators.required], - location: [this.bambooHarvest.location, Validators.required], - startedAt: [this.bambooHarvest.startedAt, Validators.required], - endedAt: [this.bambooHarvest.endedAt, Validators.required], - harvester: [this.bambooHarvest.harvester, Validators.required], - }); - } - - public onClickFormSubmit(value: unknown): void { - this.log.debug("form submitted", value); - if (!isBambooHarvest(value)) { - const errMsg = `Expected the value to be of type BambooHarvest`; - throw new RuntimeError(errMsg); - } - this.bambooHarvest = value; - this.modalController.dismiss(this.bambooHarvest); - } - - public onClickBtnCancel(): void { - this.log.debug("form submission cancelled by user"); - this.modalController.dismiss(); - } -} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-list/bamboo-harvest-list.page.html b/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-list/bamboo-harvest-list.page.html deleted file mode 100644 index bfdd608185..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-list/bamboo-harvest-list.page.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - Bamboo Harvest #{{bambooHarvest.id}} - - - - - - - - - - - - diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-list/bamboo-harvest-list.page.ts b/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-list/bamboo-harvest-list.page.ts deleted file mode 100644 index 9303abe77b..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-list/bamboo-harvest-list.page.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Component, Inject, OnInit } from "@angular/core"; - -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { ApiClient } from "@hyperledger/cactus-api-client"; -import { - BambooHarvest, - DefaultApi as SupplyChainApi, -} from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; - -import { XDAI_BESU_DEMO_LEDGER_ID } from "../../../constants"; -import { BambooHarvestDetailPage } from "../bamboo-harvest-detail/bamboo-harvest-detail.page"; -import { ModalController } from "@ionic/angular"; - -import { AuthConfig } from "../../common/auth-config"; - -@Component({ - selector: "app-bamboo-harvest-list", - templateUrl: "./bamboo-harvest-list.page.html", - styleUrls: [], -}) -export class BambooHarvestListPage implements OnInit { - private readonly log: Logger; - private bambooHarvests: BambooHarvest[]; - private _supplyChainApi: SupplyChainApi | undefined; - - constructor( - private readonly baseClient: ApiClient, - private readonly modalController: ModalController, - @Inject(XDAI_BESU_DEMO_LEDGER_ID) private readonly xdaiBesuLedgerId: string, - ) { - this.bambooHarvests = []; - this.log = LoggerProvider.getOrCreate({ label: "BambooHarvestListPage" }); - } - - public get supplyChainApi(): SupplyChainApi { - if (!this._supplyChainApi) { - throw new Error(`InvalidStateError: _supplyChainApi not initialized.`); - } else { - return this._supplyChainApi; - } - } - - async ngOnInit(): Promise { - this._supplyChainApi = await this.baseClient.ofLedger( - this.xdaiBesuLedgerId, - SupplyChainApi, - { - baseOptions: { - headers: { Authorization: `Bearer ${AuthConfig.authToken}` }, - }, - }, - ); - await this.loadData(); - } - - private async loadData(): Promise { - const { data } = await this.supplyChainApi.listBambooHarvestV1(); - const { data: bambooHarvests } = data; - this.bambooHarvests = bambooHarvests; - this.log.debug(`Fetched BambooHarvest data: %o`, bambooHarvests); - } - - async clickShowDetail(bambooHarvest: BambooHarvest): Promise { - this.log.debug("clickShowDetail()", bambooHarvest); - - const modal = await this.modalController.create({ - component: BambooHarvestDetailPage, - componentProps: { - bambooHarvest, - }, - }); - modal.present(); - const overlayEventDetail = await modal.onDidDismiss(); - const bambooHarvest2 = overlayEventDetail.data as BambooHarvest; - this.log.debug("clickShowDetail() detail presented OK", bambooHarvest2); - - if (bambooHarvest2) { - this.log.warn(`Upserting BambooHarvest not yet implemented. Skipping.`); - // TODO: Implement upsert method on the Solidity contract. - } - } - - async clickAddNew(): Promise { - this.log.debug(`clickAddNew()`); - const modal = await this.modalController.create({ - component: BambooHarvestDetailPage, - }); - modal.present(); - const overlayEventDetail = await modal.onDidDismiss(); - const bambooHarvest = overlayEventDetail.data as BambooHarvest; - this.log.debug("clickAddNew() detail presented OK", bambooHarvest); - if (bambooHarvest) { - const res = await this.supplyChainApi.insertBambooHarvestV1({ - bambooHarvest, - }); - this.log.debug(`New BambooHarvest inserted OK`, res); - await this.loadData(); - } - } -} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-routing.module.ts b/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-routing.module.ts deleted file mode 100644 index 4f89d6197b..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from "@angular/core"; -import { Routes, RouterModule } from "@angular/router"; - -import { BambooHarvestListPage } from "./bamboo-harvest-list/bamboo-harvest-list.page"; - -const routes: Routes = [ - { - path: "", - component: BambooHarvestListPage, - }, -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class BambooHarvestPageRoutingModule {} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest.module.ts b/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest.module.ts deleted file mode 100644 index d945dc2ce7..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from "@angular/core"; -import { CommonModule } from "@angular/common"; -import { FormsModule, ReactiveFormsModule } from "@angular/forms"; - -import { IonicModule } from "@ionic/angular"; - -import { BambooHarvestPageRoutingModule } from "./bamboo-harvest-routing.module"; - -import { BambooHarvestListPage } from "./bamboo-harvest-list/bamboo-harvest-list.page"; -import { PageHeadingComponentModule } from "../common/page-heading/page-heading-component.module"; -import { BambooHarvestDetailPage } from "./bamboo-harvest-detail/bamboo-harvest-detail.page"; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - IonicModule, - BambooHarvestPageRoutingModule, - PageHeadingComponentModule, - ], - declarations: [BambooHarvestDetailPage, BambooHarvestListPage], -}) -export class BambooHarvestPageModule {} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/is-bamboo-harvest.ts b/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/is-bamboo-harvest.ts deleted file mode 100644 index 4f53506848..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/is-bamboo-harvest.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BambooHarvest } from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; - -export function isBambooHarvest(x: unknown): x is BambooHarvest { - return ( - !!x && - typeof (x as BambooHarvest).id === "string" && - typeof (x as BambooHarvest).location === "string" && - typeof (x as BambooHarvest).startedAt === "string" && - typeof (x as BambooHarvest).endedAt === "string" && - typeof (x as BambooHarvest).harvester === "string" - ); -} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-detail/bookshelf-detail.page.html b/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-detail/bookshelf-detail.page.html deleted file mode 100644 index a992dc93f5..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-detail/bookshelf-detail.page.html +++ /dev/null @@ -1,68 +0,0 @@ - -
- - - Bookshelf Details - - - - - - ID - - - - - - Number of Shelves - - - - -
- Number of shelves is required. -
-
- - - Bamboo Harvest ID - - - - {{ aBambooHarvestId }} - - - - - -
- Bamboo Harvest ID is required. -
-
- Bamboo Harvest ID must be at least 1 characters long. -
-
- - - - - Cancel - - - - Submit - - - - -
-
-
-
\ No newline at end of file diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-detail/bookshelf-detail.page.ts b/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-detail/bookshelf-detail.page.ts deleted file mode 100644 index 1b45cf1533..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-detail/bookshelf-detail.page.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; - -import { Component, Inject, Input, OnInit } from "@angular/core"; -import { - UntypedFormGroup, - UntypedFormBuilder, - Validators, -} from "@angular/forms"; -import { ModalController } from "@ionic/angular"; - -import { ApiClient } from "@hyperledger/cactus-api-client"; - -import { - BambooHarvest, - Bookshelf, - DefaultApi as SupplyChainApi, -} from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; - -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { XDAI_BESU_DEMO_LEDGER_ID } from "../../../constants"; - -import { AuthConfig } from "../../common/auth-config"; - -@Component({ - selector: "app-bookshelf-detail", - templateUrl: "./bookshelf-detail.page.html", - styleUrls: [], -}) -export class BookshelfDetailPage implements OnInit { - private readonly log: Logger; - private _supplyChainApi: SupplyChainApi | undefined; - public form: UntypedFormGroup; - @Input() - public bookshelf: Bookshelf; - public bambooHarvests: BambooHarvest[]; - public bambooHarvestIds: string[]; - - constructor( - private readonly baseClient: ApiClient, - @Inject(XDAI_BESU_DEMO_LEDGER_ID) private readonly xdaiBesuLedgerId: string, - public readonly modalController: ModalController, - public readonly formBuilder: UntypedFormBuilder, - ) { - this.log = LoggerProvider.getOrCreate({ label: "BookshelfDetailPage" }); - } - - public get supplyChainApi(): SupplyChainApi { - if (!this._supplyChainApi) { - throw new Error(`InvalidStateError: _supplyChainApi not initialized.`); - } else { - return this._supplyChainApi; - } - } - - async ngOnInit(): Promise { - this.log.debug("component initialized.", this.bookshelf); - - this._supplyChainApi = await this.baseClient.ofLedger( - this.xdaiBesuLedgerId, - SupplyChainApi, - { - baseOptions: { - headers: { Authorization: `Bearer ${AuthConfig.authToken}` }, - }, - }, - ); - - if (!this.bookshelf) { - this.bookshelf = { - id: uuidv4(), - shelfCount: 5, - bambooHarvestId: "", - }; - } - this.form = this.formBuilder.group({ - id: [this.bookshelf.id, Validators.required], - shelfCount: [this.bookshelf.shelfCount, Validators.required], - bambooHarvestId: [this.bookshelf.bambooHarvestId, Validators.required], - }); - - await this.loadData(); - } - - private async loadData(): Promise { - const { data } = await this.supplyChainApi.listBambooHarvestV1(); - const { data: bambooHarvests } = data; - this.bambooHarvests = bambooHarvests; - this.log.debug(`Fetched BambooHarvest data: %o`, bambooHarvests); - this.bambooHarvestIds = this.bambooHarvests.map((bh) => bh.id); - this.log.debug(`BambooHarvest IDs: %o`, this.bambooHarvestIds); - } - - onClickFormSubmit(value: Bookshelf): void { - this.log.debug("form submitted", value); - this.bookshelf = value; - this.modalController.dismiss(this.bookshelf); - } - - onClickBtnCancel(): void { - this.log.debug("form submission cancelled by user"); - this.modalController.dismiss(); - } -} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-list/bookshelf-list.page.html b/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-list/bookshelf-list.page.html deleted file mode 100644 index 2e854f392e..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-list/bookshelf-list.page.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - Bookshelf #{{bookshelf.id}} - - - - - - - - - - - - diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-list/bookshelf-list.page.ts b/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-list/bookshelf-list.page.ts deleted file mode 100644 index 02592da0eb..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-list/bookshelf-list.page.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Component, Inject, OnInit } from "@angular/core"; - -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { ApiClient } from "@hyperledger/cactus-api-client"; -import { - Bookshelf, - DefaultApi as SupplyChainApi, -} from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; - -import { BESU_DEMO_LEDGER_ID } from "../../../constants"; -import { BookshelfDetailPage } from "../bookshelf-detail/bookshelf-detail.page"; -import { ModalController } from "@ionic/angular"; - -import { AuthConfig } from "../../common/auth-config"; - -@Component({ - selector: "app-bookshelf-list", - templateUrl: "./bookshelf-list.page.html", - styleUrls: [], -}) -export class BookshelfListPage implements OnInit { - private readonly log: Logger; - private bookshelves: Bookshelf[]; - private _supplyChainApi: SupplyChainApi | undefined; - - constructor( - private readonly baseClient: ApiClient, - private readonly modalController: ModalController, - @Inject(BESU_DEMO_LEDGER_ID) private readonly ledgerId: string, - ) { - this.bookshelves = []; - this.log = LoggerProvider.getOrCreate({ label: "BookshelfListPage" }); - } - - public get supplyChainApi(): SupplyChainApi { - if (!this._supplyChainApi) { - throw new Error(`InvalidStateError: _supplyChainApi not initialized.`); - } else { - return this._supplyChainApi; - } - } - - async ngOnInit(): Promise { - this._supplyChainApi = await this.baseClient.ofLedger( - this.ledgerId, - SupplyChainApi, - { - baseOptions: { - headers: { Authorization: `Bearer ${AuthConfig.authToken}` }, - }, - }, - ); - await this.loadData(); - } - - private async loadData(): Promise { - const { data } = await this.supplyChainApi.listBookshelfV1(); - const { data: bookshelves } = data; - this.bookshelves = bookshelves; - this.log.debug(`Fetched Bookshelf data: %o`, bookshelves); - } - - async clickShowDetail(bookshelf: Bookshelf): Promise { - this.log.debug("clickShowDetail()", bookshelf); - - const modal = await this.modalController.create({ - component: BookshelfDetailPage, - componentProps: { - bookshelf, - }, - }); - modal.present(); - const overlayEventDetail = await modal.onDidDismiss(); - const bookshelf2 = overlayEventDetail.data as Bookshelf; - this.log.debug("clickShowDetail() detail presented OK", bookshelf2); - - if (bookshelf2) { - this.log.warn(`Upserting Bookshelf not yet implemented. Skipping.`); - // TODO: Implement upsert method on the Solidity contract. - } - } - - async clickAddNew(): Promise { - this.log.debug(`clickAddNew()`); - const modal = await this.modalController.create({ - component: BookshelfDetailPage, - }); - modal.present(); - const overlayEventDetail = await modal.onDidDismiss(); - const bookshelf = overlayEventDetail.data as Bookshelf; - this.log.debug("clickAddNew() detail presented OK", bookshelf); - if (bookshelf) { - const res = await this.supplyChainApi.insertBookshelfV1({ - bookshelf, - }); - this.log.debug(`New Bookshelf inserted OK`, res); - await this.loadData(); - } - } -} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-routing.module.ts b/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-routing.module.ts deleted file mode 100644 index bbca213469..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from "@angular/core"; -import { Routes, RouterModule } from "@angular/router"; - -import { BookshelfListPage } from "./bookshelf-list/bookshelf-list.page"; - -const routes: Routes = [ - { - path: "", - component: BookshelfListPage, - }, -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class BookshelfPageRoutingModule {} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf.module.ts b/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf.module.ts deleted file mode 100644 index 2cb31c5f98..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/bookshelf/bookshelf.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from "@angular/core"; -import { CommonModule } from "@angular/common"; -import { FormsModule, ReactiveFormsModule } from "@angular/forms"; - -import { IonicModule } from "@ionic/angular"; - -import { BookshelfPageRoutingModule } from "./bookshelf-routing.module"; - -import { BookshelfListPage } from "./bookshelf-list/bookshelf-list.page"; -import { PageHeadingComponentModule } from "../common/page-heading/page-heading-component.module"; -import { BookshelfDetailPage } from "./bookshelf-detail/bookshelf-detail.page"; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - IonicModule, - BookshelfPageRoutingModule, - PageHeadingComponentModule, - ], - declarations: [BookshelfDetailPage, BookshelfListPage], -}) -export class BookshelfPageModule {} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/common/auth-config.ts b/examples/cactus-example-supply-chain-frontend/src/app/common/auth-config.ts deleted file mode 100644 index 949359e6ea..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/common/auth-config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class AuthConfig { - static authToken: string; -} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/common/page-heading/page-heading-component.module.ts b/examples/cactus-example-supply-chain-frontend/src/app/common/page-heading/page-heading-component.module.ts deleted file mode 100644 index 068b580d6a..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/common/page-heading/page-heading-component.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from "@angular/core"; -import { CommonModule } from "@angular/common"; -import { ReactiveFormsModule, FormsModule } from "@angular/forms"; - -import { IonicModule } from "@ionic/angular"; - -import { PageHeadingComponent } from "./page-heading.component"; - -@NgModule({ - imports: [CommonModule, FormsModule, ReactiveFormsModule, IonicModule], - declarations: [PageHeadingComponent], - exports: [PageHeadingComponent], -}) -export class PageHeadingComponentModule {} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/common/page-heading/page-heading.component.html b/examples/cactus-example-supply-chain-frontend/src/app/common/page-heading/page-heading.component.html deleted file mode 100644 index 06b7294ff1..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/common/page-heading/page-heading.component.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - {{ pageTitle }} - - \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-frontend/src/app/common/page-heading/page-heading.component.ts b/examples/cactus-example-supply-chain-frontend/src/app/common/page-heading/page-heading.component.ts deleted file mode 100644 index 7de782acdc..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/common/page-heading/page-heading.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from "@angular/core"; - -@Component({ - selector: "app-page-heading", - templateUrl: "page-heading.component.html", - styleUrls: [], -}) -export class PageHeadingComponent { - @Input() - public pageTitle: string; -} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-detail/shipment-detail.page.html b/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-detail/shipment-detail.page.html deleted file mode 100644 index da72ae5c3c..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-detail/shipment-detail.page.html +++ /dev/null @@ -1,52 +0,0 @@ - -
- - - Shipment Details - - - - - - ID - - - - - - Bookshelf ID - - - {{ aBookshelfId }} - - - - - -
- Bookshelf ID is required. -
-
- Bookshelf ID must be at least 1 characters long. -
-
- - - - - Cancel - - - - Submit - - - - -
-
-
-
\ No newline at end of file diff --git a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-detail/shipment-detail.page.ts b/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-detail/shipment-detail.page.ts deleted file mode 100644 index 04fd847f87..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-detail/shipment-detail.page.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; - -import { Component, Inject, Input, OnInit } from "@angular/core"; -import { - UntypedFormGroup, - UntypedFormBuilder, - Validators, -} from "@angular/forms"; -import { ModalController } from "@ionic/angular"; - -import { ApiClient } from "@hyperledger/cactus-api-client"; - -import { - Shipment, - Bookshelf, - DefaultApi as SupplyChainApi, -} from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; - -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { XDAI_BESU_DEMO_LEDGER_ID } from "../../../constants"; - -import { AuthConfig } from "../../common/auth-config"; - -@Component({ - selector: "app-shipment-detail", - templateUrl: "./shipment-detail.page.html", - styleUrls: [], -}) -export class ShipmentDetailPage implements OnInit { - private readonly log: Logger; - private _supplyChainApi: SupplyChainApi | undefined; - public form: UntypedFormGroup; - @Input() - public shipment: Shipment; - public bookshelves: Bookshelf[]; - public bookshelfIds: string[]; - - constructor( - private readonly baseClient: ApiClient, - @Inject(XDAI_BESU_DEMO_LEDGER_ID) private readonly xdaiBesuLedgerId: string, - public readonly modalController: ModalController, - public readonly formBuilder: UntypedFormBuilder, - ) { - this.log = LoggerProvider.getOrCreate({ label: "ShipmentDetailPage" }); - } - - public get supplyChainApi(): SupplyChainApi { - if (!this._supplyChainApi) { - throw new Error(`InvalidStateError: _supplyChainApi not initialized.`); - } else { - return this._supplyChainApi; - } - } - - async ngOnInit(): Promise { - this.log.debug("component initialized.", this.shipment); - - this._supplyChainApi = await this.baseClient.ofLedger( - this.xdaiBesuLedgerId, - SupplyChainApi, - { - baseOptions: { - headers: { Authorization: `Bearer ${AuthConfig.authToken}` }, - }, - }, - ); - - if (!this.shipment) { - this.shipment = { - id: uuidv4(), - bookshelfId: "", - }; - } - this.form = this.formBuilder.group({ - id: [this.shipment.id, Validators.required], - bookshelfId: [this.shipment.bookshelfId, Validators.required], - }); - - await this.loadData(); - } - - private async loadData(): Promise { - const { data } = await this.supplyChainApi.listBookshelfV1(); - const { data: bookshelves } = data; - this.bookshelves = bookshelves; - this.log.debug(`Fetched BambooHarvest data: %o`, bookshelves); - this.bookshelfIds = this.bookshelves.map((bh) => bh.id); - this.log.debug(`BambooHarvest IDs: %o`, this.bookshelfIds); - } - - onClickFormSubmit(value: Shipment): void { - this.log.debug("form submitted", value); - this.shipment = value; - this.modalController.dismiss(this.shipment); - } - - onClickBtnCancel(): void { - this.log.debug("form submission cancelled by user"); - this.modalController.dismiss(); - } -} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-list/shipment-list.page.html b/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-list/shipment-list.page.html deleted file mode 100644 index 85cfcd2aab..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-list/shipment-list.page.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - Shipment #{{shipment.id}} - - - - - - - - - - - - diff --git a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-list/shipment-list.page.ts b/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-list/shipment-list.page.ts deleted file mode 100644 index bb960fc111..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-list/shipment-list.page.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Component, Inject, OnInit } from "@angular/core"; - -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { ApiClient } from "@hyperledger/cactus-api-client"; -import { - Shipment, - DefaultApi as SupplyChainApi, -} from "@hyperledger/cactus-example-supply-chain-business-logic-plugin"; - -import { BESU_DEMO_LEDGER_ID } from "../../../constants"; -import { ShipmentDetailPage } from "../shipment-detail/shipment-detail.page"; -import { ModalController } from "@ionic/angular"; - -import { AuthConfig } from "../../common/auth-config"; - -@Component({ - selector: "app-shipment-list", - templateUrl: "./shipment-list.page.html", - styleUrls: [], -}) -export class ShipmentListPage implements OnInit { - private readonly log: Logger; - private shipments: Shipment[]; - private _supplyChainApi: SupplyChainApi | undefined; - - constructor( - private readonly baseClient: ApiClient, - private readonly modalController: ModalController, - @Inject(BESU_DEMO_LEDGER_ID) private readonly ledgerId: string, - ) { - this.shipments = []; - this.log = LoggerProvider.getOrCreate({ label: "ShipmentListPage" }); - } - - public get supplyChainApi(): SupplyChainApi { - if (!this._supplyChainApi) { - throw new Error(`InvalidStateError: _supplyChainApi not initialized.`); - } else { - return this._supplyChainApi; - } - } - - async ngOnInit(): Promise { - this._supplyChainApi = await this.baseClient.ofLedger( - this.ledgerId, - SupplyChainApi, - { - baseOptions: { - headers: { Authorization: `Bearer ${AuthConfig.authToken}` }, - }, - }, - ); - await this.loadData(); - } - - private async loadData(): Promise { - const { data } = await this.supplyChainApi.listShipmentV1(); - const { data: shipments } = data; - this.shipments = shipments; - this.log.debug(`Fetched Shipment data: %o`, shipments); - } - - async clickShowDetail(shipment: Shipment): Promise { - this.log.debug("clickShowDetail()", shipment); - - const modal = await this.modalController.create({ - component: ShipmentDetailPage, - componentProps: { - shipment, - }, - }); - modal.present(); - const overlayEventDetail = await modal.onDidDismiss(); - const shipment2 = overlayEventDetail.data as Shipment; - this.log.debug("clickShowDetail() detail presented OK", shipment2); - - if (shipment2) { - this.log.warn(`Upserting Shipment not yet implemented. Skipping.`); - // TODO: Implement upsert method on the Solidity contract. - } - } - - async clickAddNew(): Promise { - this.log.debug(`clickAddNew()`); - const modal = await this.modalController.create({ - component: ShipmentDetailPage, - }); - modal.present(); - const overlayEventDetail = await modal.onDidDismiss(); - const shipment = overlayEventDetail.data as Shipment; - this.log.debug("clickAddNew() detail presented OK", shipment); - if (shipment) { - const res = await this.supplyChainApi.insertShipmentV1({ shipment }); - this.log.debug(`New Shipment inserted OK`, res); - await this.loadData(); - } - } -} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-routing.module.ts b/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-routing.module.ts deleted file mode 100644 index 197226ed0e..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from "@angular/core"; -import { Routes, RouterModule } from "@angular/router"; - -import { ShipmentListPage } from "./shipment-list/shipment-list.page"; - -const routes: Routes = [ - { - path: "", - component: ShipmentListPage, - }, -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class ShipmentPageRoutingModule {} diff --git a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment.module.ts b/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment.module.ts deleted file mode 100644 index 57ddc6db3a..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/app/shipment/shipment.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from "@angular/core"; -import { CommonModule } from "@angular/common"; -import { FormsModule, ReactiveFormsModule } from "@angular/forms"; - -import { IonicModule } from "@ionic/angular"; - -import { ShipmentPageRoutingModule } from "./shipment-routing.module"; - -import { ShipmentListPage } from "./shipment-list/shipment-list.page"; -import { PageHeadingComponentModule } from "../common/page-heading/page-heading-component.module"; -import { ShipmentDetailPage } from "./shipment-detail/shipment-detail.page"; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - IonicModule, - ShipmentPageRoutingModule, - PageHeadingComponentModule, - ], - declarations: [ShipmentDetailPage, ShipmentListPage], -}) -export class ShipmentPageModule {} diff --git a/examples/cactus-example-supply-chain-frontend/src/assets/icon/favicon.png b/examples/cactus-example-supply-chain-frontend/src/assets/icon/favicon.png deleted file mode 100644 index 69a7b90517..0000000000 Binary files a/examples/cactus-example-supply-chain-frontend/src/assets/icon/favicon.png and /dev/null differ diff --git a/examples/cactus-example-supply-chain-frontend/src/assets/shapes.svg b/examples/cactus-example-supply-chain-frontend/src/assets/shapes.svg deleted file mode 100644 index d370b4dcc8..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/assets/shapes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/cactus-example-supply-chain-frontend/src/constants.ts b/examples/cactus-example-supply-chain-frontend/src/constants.ts deleted file mode 100644 index e73eb87862..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/constants.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { InjectionToken } from "@angular/core"; - -export const CACTUS_API_URL = new InjectionToken("CACTUS_API_URL"); -export const XDAI_BESU_DEMO_LEDGER_ID = new InjectionToken( - "XDAI_BESU_DEMO_LEDGER_ID", -); -export const BESU_DEMO_LEDGER_ID = new InjectionToken( - "BESU_DEMO_LEDGER_ID", -); -export const FABRIC_DEMO_LEDGER_ID = new InjectionToken( - "FABRIC_DEMO_LEDGER_ID", -); diff --git a/examples/cactus-example-supply-chain-frontend/src/environments/environment.prod.ts b/examples/cactus-example-supply-chain-frontend/src/environments/environment.prod.ts deleted file mode 100644 index c9669790be..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/environments/environment.prod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const environment = { - production: true, -}; diff --git a/examples/cactus-example-supply-chain-frontend/src/environments/environment.ts b/examples/cactus-example-supply-chain-frontend/src/environments/environment.ts deleted file mode 100644 index 31cb7855f1..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/environments/environment.ts +++ /dev/null @@ -1,16 +0,0 @@ -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. -// The list of file replacements can be found in `angular.json`. - -export const environment = { - production: false, -}; - -/* - * For easier debugging in development mode, you can import the following file - * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. - * - * This import should be commented out in production mode because it will have a negative impact - * on performance if an error is thrown. - */ -// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/examples/cactus-example-supply-chain-frontend/src/global.scss b/examples/cactus-example-supply-chain-frontend/src/global.scss deleted file mode 100644 index d854de84ad..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/global.scss +++ /dev/null @@ -1,26 +0,0 @@ -/* - * App Global CSS - * ---------------------------------------------------------------------------- - * Put style rules here that you want to apply globally. These styles are for - * the entire app and not just one component. Additionally, this file can be - * used as an entry point to import other CSS/Sass files to be included in the - * output CSS. - * For more information on global stylesheets, visit the documentation: - * https://ionicframework.com/docs/layout/global-stylesheets - */ - -/* Core CSS required for Ionic components to work properly */ -@import "~@ionic/angular/css/core.css"; - -/* Basic CSS for apps built with Ionic */ -@import "~@ionic/angular/css/normalize.css"; -@import "~@ionic/angular/css/structure.css"; -@import "~@ionic/angular/css/typography.css"; -@import '~@ionic/angular/css/display.css'; - -/* Optional CSS utils that can be commented out */ -@import "~@ionic/angular/css/padding.css"; -@import "~@ionic/angular/css/float-elements.css"; -@import "~@ionic/angular/css/text-alignment.css"; -@import "~@ionic/angular/css/text-transformation.css"; -@import "~@ionic/angular/css/flex-utils.css"; diff --git a/examples/cactus-example-supply-chain-frontend/src/index.html b/examples/cactus-example-supply-chain-frontend/src/index.html deleted file mode 100644 index 0e2468eb97..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - Hyperledger Cacti Example - Supply Chain App - - - - - - - - - - - - - - - - - - - - diff --git a/examples/cactus-example-supply-chain-frontend/src/main.ts b/examples/cactus-example-supply-chain-frontend/src/main.ts deleted file mode 100644 index 7d5813f0fc..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/main.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { enableProdMode } from "@angular/core"; -import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; - -import { AppModule } from "./app/app.module"; -import { environment } from "./environments/environment"; - -if (environment.production) { - enableProdMode(); -} - -platformBrowserDynamic() - .bootstrapModule(AppModule) - // tslint:disable-next-line: no-console - .catch((err) => console.log(err)); diff --git a/examples/cactus-example-supply-chain-frontend/src/polyfills.ts b/examples/cactus-example-supply-chain-frontend/src/polyfills.ts deleted file mode 100644 index f76b6092f7..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/polyfills.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/guide/browser-support - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - * because those flags need to be set before `zone.js` being loaded, and webpack - * will put import in the top of bundle, so user need to create a separate file - * in this directory (for example: zone-flags.ts), and put the following flags - * into that file, and then add the following code before importing zone.js. - * import './zone-flags.ts'; - * - * The flags allowed in zone-flags.ts are listed here. - * - * The following flags will work for all browsers. - * - * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - * - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - * - * (window as any).__Zone_enable_cross_context_check = true; - * - */ - -import "./zone-flags"; - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ - -import "zone.js"; // Included with Angular CLI. - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/examples/cactus-example-supply-chain-frontend/src/theme/variables.scss b/examples/cactus-example-supply-chain-frontend/src/theme/variables.scss deleted file mode 100644 index b910e58625..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/theme/variables.scss +++ /dev/null @@ -1,232 +0,0 @@ -// Ionic Variables and Theming. For more info, please see: -// http://ionicframework.com/docs/theming/ - -/** Ionic CSS Variables **/ -:root { - /** primary **/ - --ion-color-primary: #3880ff; - --ion-color-primary-rgb: 56, 128, 255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255, 255, 255; - --ion-color-primary-shade: #3171e0; - --ion-color-primary-tint: #4c8dff; - - /** secondary **/ - --ion-color-secondary: #3dc2ff; - --ion-color-secondary-rgb: 61, 194, 255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255, 255, 255; - --ion-color-secondary-shade: #36abe0; - --ion-color-secondary-tint: #50c8ff; - - /** tertiary **/ - --ion-color-tertiary: #5260ff; - --ion-color-tertiary-rgb: 82, 96, 255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255, 255, 255; - --ion-color-tertiary-shade: #4854e0; - --ion-color-tertiary-tint: #6370ff; - - /** success **/ - --ion-color-success: #2dd36f; - --ion-color-success-rgb: 45, 211, 111; - --ion-color-success-contrast: #ffffff; - --ion-color-success-contrast-rgb: 255, 255, 255; - --ion-color-success-shade: #28ba62; - --ion-color-success-tint: #42d77d; - - /** warning **/ - --ion-color-warning: #ffc409; - --ion-color-warning-rgb: 255, 196, 9; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0, 0, 0; - --ion-color-warning-shade: #e0ac08; - --ion-color-warning-tint: #ffca22; - - /** danger **/ - --ion-color-danger: #eb445a; - --ion-color-danger-rgb: 235, 68, 90; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255, 255, 255; - --ion-color-danger-shade: #cf3c4f; - --ion-color-danger-tint: #ed576b; - - /** dark **/ - --ion-color-dark: #222428; - --ion-color-dark-rgb: 34, 36, 40; - --ion-color-dark-contrast: #ffffff; - --ion-color-dark-contrast-rgb: 255, 255, 255; - --ion-color-dark-shade: #1e2023; - --ion-color-dark-tint: #383a3e; - - /** medium **/ - --ion-color-medium: #92949c; - --ion-color-medium-rgb: 146, 148, 156; - --ion-color-medium-contrast: #ffffff; - --ion-color-medium-contrast-rgb: 255, 255, 255; - --ion-color-medium-shade: #808289; - --ion-color-medium-tint: #9d9fa6; - - /** light **/ - --ion-color-light: #f4f5f8; - --ion-color-light-rgb: 244, 245, 248; - --ion-color-light-contrast: #000000; - --ion-color-light-contrast-rgb: 0, 0, 0; - --ion-color-light-shade: #d7d8da; - --ion-color-light-tint: #f5f6f9; -} - -@media (prefers-color-scheme: dark) { - /* - * Dark Colors - * ------------------------------------------- - */ - - body { - --ion-color-primary: #428cff; - --ion-color-primary-rgb: 66,140,255; - --ion-color-primary-contrast: #ffffff; - --ion-color-primary-contrast-rgb: 255,255,255; - --ion-color-primary-shade: #3a7be0; - --ion-color-primary-tint: #5598ff; - - --ion-color-secondary: #50c8ff; - --ion-color-secondary-rgb: 80,200,255; - --ion-color-secondary-contrast: #ffffff; - --ion-color-secondary-contrast-rgb: 255,255,255; - --ion-color-secondary-shade: #46b0e0; - --ion-color-secondary-tint: #62ceff; - - --ion-color-tertiary: #6a64ff; - --ion-color-tertiary-rgb: 106,100,255; - --ion-color-tertiary-contrast: #ffffff; - --ion-color-tertiary-contrast-rgb: 255,255,255; - --ion-color-tertiary-shade: #5d58e0; - --ion-color-tertiary-tint: #7974ff; - - --ion-color-success: #2fdf75; - --ion-color-success-rgb: 47,223,117; - --ion-color-success-contrast: #000000; - --ion-color-success-contrast-rgb: 0,0,0; - --ion-color-success-shade: #29c467; - --ion-color-success-tint: #44e283; - - --ion-color-warning: #ffd534; - --ion-color-warning-rgb: 255,213,52; - --ion-color-warning-contrast: #000000; - --ion-color-warning-contrast-rgb: 0,0,0; - --ion-color-warning-shade: #e0bb2e; - --ion-color-warning-tint: #ffd948; - - --ion-color-danger: #ff4961; - --ion-color-danger-rgb: 255,73,97; - --ion-color-danger-contrast: #ffffff; - --ion-color-danger-contrast-rgb: 255,255,255; - --ion-color-danger-shade: #e04055; - --ion-color-danger-tint: #ff5b71; - - --ion-color-dark: #f4f5f8; - --ion-color-dark-rgb: 244,245,248; - --ion-color-dark-contrast: #000000; - --ion-color-dark-contrast-rgb: 0,0,0; - --ion-color-dark-shade: #d7d8da; - --ion-color-dark-tint: #f5f6f9; - - --ion-color-medium: #989aa2; - --ion-color-medium-rgb: 152,154,162; - --ion-color-medium-contrast: #000000; - --ion-color-medium-contrast-rgb: 0,0,0; - --ion-color-medium-shade: #86888f; - --ion-color-medium-tint: #a2a4ab; - - --ion-color-light: #222428; - --ion-color-light-rgb: 34,36,40; - --ion-color-light-contrast: #ffffff; - --ion-color-light-contrast-rgb: 255,255,255; - --ion-color-light-shade: #1e2023; - --ion-color-light-tint: #383a3e; - } - - /* - * iOS Dark Theme - * ------------------------------------------- - */ - - .ios body { - --ion-background-color: #000000; - --ion-background-color-rgb: 0,0,0; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255,255,255; - - --ion-color-step-50: #0d0d0d; - --ion-color-step-100: #1a1a1a; - --ion-color-step-150: #262626; - --ion-color-step-200: #333333; - --ion-color-step-250: #404040; - --ion-color-step-300: #4d4d4d; - --ion-color-step-350: #595959; - --ion-color-step-400: #666666; - --ion-color-step-450: #737373; - --ion-color-step-500: #808080; - --ion-color-step-550: #8c8c8c; - --ion-color-step-600: #999999; - --ion-color-step-650: #a6a6a6; - --ion-color-step-700: #b3b3b3; - --ion-color-step-750: #bfbfbf; - --ion-color-step-800: #cccccc; - --ion-color-step-850: #d9d9d9; - --ion-color-step-900: #e6e6e6; - --ion-color-step-950: #f2f2f2; - - --ion-toolbar-background: #0d0d0d; - - --ion-item-background: #000000; - - --ion-card-background: #1c1c1d; - } - - - /* - * Material Design Dark Theme - * ------------------------------------------- - */ - - .md body { - --ion-background-color: #121212; - --ion-background-color-rgb: 18,18,18; - - --ion-text-color: #ffffff; - --ion-text-color-rgb: 255,255,255; - - --ion-border-color: #222222; - - --ion-color-step-50: #1e1e1e; - --ion-color-step-100: #2a2a2a; - --ion-color-step-150: #363636; - --ion-color-step-200: #414141; - --ion-color-step-250: #4d4d4d; - --ion-color-step-300: #595959; - --ion-color-step-350: #656565; - --ion-color-step-400: #717171; - --ion-color-step-450: #7d7d7d; - --ion-color-step-500: #898989; - --ion-color-step-550: #949494; - --ion-color-step-600: #a0a0a0; - --ion-color-step-650: #acacac; - --ion-color-step-700: #b8b8b8; - --ion-color-step-750: #c4c4c4; - --ion-color-step-800: #d0d0d0; - --ion-color-step-850: #dbdbdb; - --ion-color-step-900: #e7e7e7; - --ion-color-step-950: #f3f3f3; - - --ion-item-background: #1e1e1e; - - --ion-toolbar-background: #1f1f1f; - - --ion-tab-bar-background: #1f1f1f; - - --ion-card-background: #1e1e1e; - } -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-frontend/src/zone-flags.ts b/examples/cactus-example-supply-chain-frontend/src/zone-flags.ts deleted file mode 100644 index 1009df5c78..0000000000 --- a/examples/cactus-example-supply-chain-frontend/src/zone-flags.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Prevents Angular change detection from - * running with certain Web Component callbacks - */ -type WindowWithZone = Window & - typeof globalThis & { __Zone_disable_customElements: boolean }; -(window as WindowWithZone).__Zone_disable_customElements = true; diff --git a/examples/cactus-example-supply-chain-frontend/tsconfig.app.json b/examples/cactus-example-supply-chain-frontend/tsconfig.app.json deleted file mode 100644 index d3e03472b8..0000000000 --- a/examples/cactus-example-supply-chain-frontend/tsconfig.app.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./out-tsc/app", - "types": [], - "composite": false, - "incremental": true - }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.ts", - "src/**/*.d.ts" - ], - "exclude": [ - "src/**/*.spec.ts" - ] -} diff --git a/examples/cactus-example-supply-chain-frontend/tsconfig.json b/examples/cactus-example-supply-chain-frontend/tsconfig.json deleted file mode 100644 index 5781182096..0000000000 --- a/examples/cactus-example-supply-chain-frontend/tsconfig.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "composite": true, - "baseUrl": "./", - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": true, - "downlevelIteration": true, - "experimentalDecorators": true, - "module": "esnext", - "moduleResolution": "node", - "esModuleInterop": true, - "importHelpers": true, - "target": "ES2022", - "lib": [ - "ES2022", - "dom" - ], - "resolveJsonModule": true, - "rootDir": "./src", - "skipLibCheck": true, - "tsBuildInfoFile": "../../.build-cache/cactus-example-supply-chain-frontend.tsbuildinfo", - "useDefineForClassFields": false - }, - "angularCompilerOptions": { - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true - }, - "references": [ - { - "path": "../../packages/cactus-api-client/tsconfig.json" - }, - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-example-supply-chain-business-logic-plugin/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-consortium-manual/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-xdai/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/examples/cactus-example-supply-chain-frontend/webpack.config.overrides.js b/examples/cactus-example-supply-chain-frontend/webpack.config.overrides.js deleted file mode 100644 index 6bb582ca74..0000000000 --- a/examples/cactus-example-supply-chain-frontend/webpack.config.overrides.js +++ /dev/null @@ -1,40 +0,0 @@ -/** @type {import("webpack").Configuration} */ -module.exports = { - externals: { - "@fidm/x509": "@fidm/x509", - "@grpc/grpc-js": "1.11.2", - "@grpc/proto-loader": "@grpc/proto-loader", - busboy: "busboy", - child_process: "child_process", - "cross-spawn": "cross-spawn", - decompress: "decompress", - express: "express", - "fabric-ca-client": "fabric-ca-client", - "fabric-common": "fabric-common", - "fabric-network": "fabric-network", - "fd-slicer": "fd-slicer", - fs: "fs", - "node-ssh": "node-ssh", - "prom-client": "prom-client", - yargs: "yargs", - winston: "winston", - }, - resolve: { - fallback: { - constants: require.resolve("constants-browserify"), - crypto: require.resolve("crypto-browserify"), - buffer: require.resolve("buffer/"), - fs: require.resolve("browserify-fs"), - net: require.resolve("net-browserify"), - http: require.resolve("stream-http"), - https: require.resolve("https-browserify"), - net: require.resolve("net-browserify"), - querystring: require.resolve("querystring-es3"), - os: require.resolve("os-browserify/browser"), - path: require.resolve("path-browserify"), - stream: require.resolve("stream-browserify"), - tls: require.resolve("tls-browserify"), - zlib: require.resolve("browserify-zlib"), - }, - }, -}; diff --git a/examples/cactus-workshop-examples-2022-11-14/CHANGELOG.md b/examples/cactus-workshop-examples-2022-11-14/CHANGELOG.md deleted file mode 100644 index a86e9c7c68..0000000000 --- a/examples/cactus-workshop-examples-2022-11-14/CHANGELOG.md +++ /dev/null @@ -1,80 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-workshop-examples-2022-11-14 - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-workshop-examples-2022-11-14 - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-workshop-examples-2022-11-14 - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-workshop-examples-2022-11-14 - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-workshop-examples-2022-11-14 - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) -* **webpack:** fix broken bundling - cannot find webpack.config.js ([794f0b4](https://github.com/hyperledger/cacti/commit/794f0b4db6f352849b2d012c5034f0ed8d1903af)) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-workshop-examples-2022-11-14 - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-workshop-examples-2022-11-14 - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-workshop-examples-2022-11-14 diff --git a/examples/cactus-workshop-examples-2022-11-14/README.md b/examples/cactus-workshop-examples-2022-11-14/README.md deleted file mode 100644 index 34c9769c3c..0000000000 --- a/examples/cactus-workshop-examples-2022-11-14/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# Hyperledger Cacti Workshop 2022-11-14 Examples - -This folder contains several simple examples using different components of Hyperledger Cacti that are used in the first Hyperledger workshop dedicated to interoperability, using Cacti: https://wiki.hyperledger.org/display/events/Blockchain+Interoperability+with+Hyperledger+Cacti - -## Hyperledger Cacti Workshop Examples - Hello World -WARNING: This code IS NOT production-ready nor secure! Namely, cross-site scripting is possible if user input is not sanitized. - -``src/main/typescript/hello-world.ts`` - -Creates an APIServer listening on port 3001 that exposes the endpoints of the ingested plugins - for demonstration purposes we use only one plugin, the cactus-plugin-object-store-ipfs. This plugin interacts with an underlying IPFS network (a simple key-value store). - -Run the file with the following command ``npx ts-node src/main/typescript/hello-world.ts`` - -To interact with the IPFS connector through the APIServer follow the next commands: -- POST `/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object`, which sets a new key-value pair. - ``` - curl --header "Content-Type: application/json" \ - --request POST \ - --data '{"key":"1234","value":"xyz"}' \ - http://localhost:3001/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object - ``` - -- POST `/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object`, which gets a key-value pair. - ``` - curl --header "Content-Type: application/json" \ - --request POST \ - --data '{"key":"1234"}' \ - http://localhost:3001/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object - ``` - -- GET "/has-object", which checks if a key-value pair exits in the client. - ``` - curl --header "Content-Type: application/json" \ - --request POST \ - --data '{"key":"1234"}' \ - http://localhost:3001/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object - ``` - -*NOTE: other carachters might appear in the output of the commands since we should insert the values in base64. For demo purposes we don't make the conversion.* - -## Hyperledger Cacti Workshop Examples - Simple Consortium - -``src/main/typescript/test-ledger.ts`` - -Creates a simple Cacti Consortium. - -Runs with the following command ``npx ts-node src/main/typescript/simple-consortium.ts`` - -## Hyperledger Cacti Workshop Examples - Substrate test ledger - -``src/main/typescript/test-ledger.ts`` - -Creates a substrate test ledger programmatically. - -Runs with the following command ``npx ts-node src/main/typescript/test-ledger.ts`` - -## Known issues -This example package works with version 1.0.0 of ``@hyperledger/cactus-test-tooling``. It will work with the most recent version once #2213 is resolved. - -## Authors - -- Rafael Belchior -- Mónica Gomez -- Abhinav Srivastava -- André Augusto \ No newline at end of file diff --git a/examples/cactus-workshop-examples-2022-11-14/package.json b/examples/cactus-workshop-examples-2022-11-14/package.json deleted file mode 100644 index 6bb91f48d9..0000000000 --- a/examples/cactus-workshop-examples-2022-11-14/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "@hyperledger/cactus-workshop-examples-2022-11-14", - "version": "2.0.0", - "description": "Cacti Workshop 2022-11-14 Examples", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Rafael Belchior", - "email": "rbelchior@blockdaemon.com" - }, - { - "name": "Mónica Gomez", - "email": "monica.gomez@tecnico.ulisboa.pt" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-workshop-examples-2022-11-14.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "kubo-rpc-client": "3.0.1", - "typescript-optional": "2.0.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@types/uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-workshop-examples-2022-11-14.web.umd.min.js", - "mainMinified": "dist/cactus-workshop-examples-2022-11-14.node.umd.min.js", - "watch": {} -} diff --git a/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/hello-world.ts b/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/hello-world.ts deleted file mode 100644 index 4109360b36..0000000000 --- a/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/hello-world.ts +++ /dev/null @@ -1,79 +0,0 @@ -// WARNING: This code IS NOT production-ready nor secure! Namely, cross-site scripting is possible if user input is not sanitized. -import { ApiServer, ConfigService } from "@hyperledger/cactus-cmd-api-server"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; -import { createServer } from "http"; -import { v4 as uuidv4 } from "uuid"; -import { - PluginImportAction, - PluginImportType, -} from "@hyperledger/cactus-core-api"; - -const log: Logger = LoggerProvider.getOrCreate({ - label: "cacti-node-ipfs-example", - level: "info", -}); - -const main = async () => { - // start an IPFS network (a key-value store) for demonstration purposes - const ipfsNetwork = new GoIpfsTestContainer({}); - await ipfsNetwork.start(); - - // retrieve the url so that the IPFS connector plugin is - // able to connect to the IPFS network. This will be used - // as an argument for the plugin bellow - const { create } = await import("kubo-rpc-client"); - const ipfsClientOrOptions = create({ - url: await ipfsNetwork.getApiUrl(), - }); - - //Configuring APIServer - const configService = new ConfigService(); - const apiServerOptions: any = await configService.newExampleConfig(); - apiServerOptions.configFile = ""; - apiServerOptions.authorizationProtocol = "NONE"; - - //The port where the APIServer will be listening - apiServerOptions.apiPort = 3001; - apiServerOptions.cockpitPort = 3100; - apiServerOptions.grpcPort = 5000; - apiServerOptions.apiTlsEnabled = false; //Disable TLS (or provide TLS certs for secure HTTP if you are deploying to production) - apiServerOptions.plugins = [ - //add plugins that will be exposed by the API Server - { - packageName: "@hyperledger/cactus-plugin-object-store-ipfs", - type: PluginImportType.Remote, - action: PluginImportAction.Install, - options: { - parentDir: `/${uuidv4()}/${uuidv4()}/`, - logLevel: "DEBUG", - instanceId: uuidv4(), - ipfsClientOrOptions, - }, - }, - ]; - - const config = await configService.newExampleConfigConvict(apiServerOptions); - - const apiServer = new ApiServer({ - httpServerApi: createServer(), - config: config.getProperties(), - }); - - //Starting the Cacti APIServer - apiServer.start(); -}; - -export async function launchApp(): Promise { - try { - await main(); - log.info(`Cacti Hello World example ran OK `); - } catch (ex) { - log.error(`Cacti Hello World example crashed: `, ex); - process.exit(1); - } -} - -if (require.main === module) { - launchApp(); -} diff --git a/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/index.web.ts b/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/simple-consortium.ts b/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/simple-consortium.ts deleted file mode 100644 index c5cd4de26b..0000000000 --- a/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/simple-consortium.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { - ConsortiumRepository, - IConsortiumRepositoryOptions, -} from "@hyperledger/cactus-core"; -import { ConsortiumDatabase } from "@hyperledger/cactus-core-api"; - -const logLevelConsortium: LogLevelDesc = "INFO"; -const loggerLevel: LogLevelDesc = "INFO"; - -async function runHelloWorld() { - const logger: Logger = LoggerProvider.getOrCreate({ - label: "consortium-example", - level: loggerLevel, - }); - - logger.info("Initialized logger"); - const consortiumDB: ConsortiumDatabase = { - consortium: [], - ledger: [], - consortiumMember: [], - cactusNode: [], - pluginInstance: [], - }; - - const consortiumOptions: IConsortiumRepositoryOptions = { - logLevel: logLevelConsortium, - db: consortiumDB, - }; - const consortiumRepo = new ConsortiumRepository(consortiumOptions); - - logger.info(`Initialized consortium: ${consortiumRepo}`); - - logger.info("Done"); -} - -runHelloWorld(); diff --git a/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/test-ledger.ts b/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/test-ledger.ts deleted file mode 100644 index 2268b68503..0000000000 --- a/examples/cactus-workshop-examples-2022-11-14/src/main/typescript/test-ledger.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - SubstrateTestLedger, - ISubstrateTestLedgerOptions, -} from "@hyperledger/cactus-test-tooling"; - -const logLevelLedger: LogLevelDesc = "DEBUG"; -const loggerLevel: LogLevelDesc = "INFO"; - -async function testLedger() { - const logger: Logger = LoggerProvider.getOrCreate({ - label: "test-ledger-example", - level: loggerLevel, - }); - - logger.info("Initialized logger"); - - logger.info("Creating ledger"); - const ledgerOps: ISubstrateTestLedgerOptions = { - publishAllPorts: false, - logLevel: logLevelLedger, - emitContainerLogs: true, - imageTag: "2022-03-29--1496", - envVars: new Map([ - ["WORKING_DIR", "/var/www/node-template"], - ["CONTAINER_NAME", "cacti-ledger"], - ["WS_PORT", "9944"], - ["PORT", "9944"], - ["DOCKER_PORT", "9944"], - ["CARGO_HOME", "/var/www/node-template/.cargo"], - ]), - }; - - const ledger = new SubstrateTestLedger(ledgerOps); - await ledger.start(); - - logger.info("Ledger up and running"); - - logger.info("Destroying ledger"); - await ledger.stop(); - - logger.info("Done"); -} - -testLedger(); diff --git a/examples/cactus-workshop-examples-2022-11-14/tsconfig.json b/examples/cactus-workshop-examples-2022-11-14/tsconfig.json deleted file mode 100644 index ee17492afe..0000000000 --- a/examples/cactus-workshop-examples-2022-11-14/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-workshop-examples-2022-11-14.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/examples/carbon-accounting/.dockerignore b/examples/carbon-accounting/.dockerignore deleted file mode 100644 index 8bb9095e74..0000000000 --- a/examples/carbon-accounting/.dockerignore +++ /dev/null @@ -1,48 +0,0 @@ -.git -*/*/node_modules -*/*/dist -*/*/build - -.config.json -.nyc_output/ -dist/ -.DS_Store -node_modules/ -docs/main -logs/ -jspm_packages/ -generated-sources/ -coverage/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# next.js build output -.next - -# vscode files -.vscode/* -!.vscode/template.launch.json - -# Introperability App specifics -examples/simple-asset-transfer/fabric/**/hfc-key-store/ - -bin/ -.tmp/ -lerna-debug.log -cactus-openapi-spec.json -cactus-openapi-spec-*.json -.npmrc -*.log diff --git a/examples/carbon-accounting/Dockerfile b/examples/carbon-accounting/Dockerfile deleted file mode 100644 index bc5e7109f0..0000000000 --- a/examples/carbon-accounting/Dockerfile +++ /dev/null @@ -1,95 +0,0 @@ -FROM cruizba/ubuntu-dind:20.10.18 as runner - -USER root - -RUN apt-get update -RUN apt -y upgrade - -# Need curl for healthchecks -RUN apt-get -y install --no-install-recommends curl - -# The file binary is used to inspect exectubles when debugging container image issues -RUN apt-get -y install --no-install-recommends file - - -RUN apt-get -y install --no-install-recommends ca-certificates -RUN apt-get -y install --no-install-recommends tzdata - -ARG APP=/usr/src/app/ - -ENV TZ=Etc/UTC -ENV APP_USER=appuser - -RUN useradd -m ${APP_USER} -RUN usermod -a -G ${APP_USER} ${APP_USER} -RUN mkdir -p ${APP} - -RUN mkdir -p "${APP}/log/" -RUN chown -R $APP_USER:$APP_USER "${APP}/" - -# TODO: Can we hack it together so that the whole thing works rootless? -USER ${APP_USER} -WORKDIR ${APP} - -SHELL ["/bin/bash", "--login", "-i", "-c"] -# Installing Node Version Manager (nvm) -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash -RUN source ~/.bashrc && \ - nvm install 20.11.1 && \ - npm install --location=global yarn && \ - yarn config set nodeLinker node-modules && \ - yarn set version 4.1.0 && \ - yarn add @hyperledger/cactus-example-carbon-accounting-backend@2.0.0 - -SHELL ["/bin/bash", "--login", "-c"] - - -COPY --chown=${APP_USER}:${APP_USER} ./examples/carbon-accounting/healthcheck.sh / - -ENV AUTHORIZATION_CONFIG_JSON="{}" -ENV AUTHORIZATION_PROTOCOL=NONE -ENV COCKPIT_WWW_ROOT=/usr/src/app/node_modules/@hyperledger/cactus-example-carbon-accounting-frontend/www/ -ENV COCKPIT_TLS_ENABLED=false -ENV COCKPIT_CORS_DOMAIN_CSV=\* -ENV COCKPIT_MTLS_ENABLED=false -ENV COCKPIT_TLS_CERT_PEM=- -ENV COCKPIT_TLS_KEY_PEM=- -ENV COCKPIT_TLS_CLIENT_CA_PEM=- -ENV COCKPIT_HOST=0.0.0.0 -ENV COCKPIT_PORT=3000 -ENV API_MTLS_ENABLED=false -ENV API_TLS_ENABLED=false -ENV API_CORS_DOMAIN_CSV=\* -ENV API_TLS_CERT_PEM=- -ENV API_TLS_CLIENT_CA_PEM=- -ENV API_TLS_KEY_PEM=- -ENV API_HOST=0.0.0.0 -ENV API_PORT=4000 -ENV GRPC_TLS_ENABLED=false -ENV LOG_LEVEL=TRACE - -COPY examples/carbon-accounting/supervisord.conf /etc/supervisord.conf - -# supervisord web ui/dashboard -EXPOSE 9001 -# API #1 -EXPOSE 4000 -# API #2 -EXPOSE 4100 -# GUI #1 -EXPOSE 3000 -# GUI #2 -EXPOSE 3100 -# API #3 -EXPOSE 4200 -# GUI #3 -EXPOSE 3200 - -USER root - -# Extend the parent image's entrypoint -# https://superuser.com/questions/1459466/can-i-add-an-additional-docker-entrypoint-script -ENTRYPOINT ["/usr/bin/supervisord"] -CMD ["--configuration", "/etc/supervisord.conf", "--nodaemon"] -HEALTHCHECK --interval=1s --timeout=5s --start-period=20s --retries=250 \ - CMD /usr/src/app/examples/carbon-accounting/healthcheck.sh diff --git a/examples/carbon-accounting/README.md b/examples/carbon-accounting/README.md deleted file mode 100644 index c95387e767..0000000000 --- a/examples/carbon-accounting/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Cactus Blockchain Carbon Accounting Example - -This is an implementation of the Hyperledger CA2 SIG's similarly named project -(which has multiple different DLTs working together), -but one that uses Hyperledger Cactus as its development framework instead of -relying on the vanilla ledger SDKs. - -At the same time this is also a case study of how can a real world project be -delivered with Hyperledger Cactus. - -## Usage - -Further details and documentation to be defined later. - -## Building and running the container locally - -```sh -# Change directories to the project root - -# Build the dockar image and tag it as "caeb" for carbon accounting example backend -DOCKER_BUILDKIT=1 docker build -f ./examples/carbon-accounting/Dockerfile . -t caeb - -# Run the built image with ports mapped to the host machine as you see fit -# The --privileged flag is required because we use Docker-in-Docker for pulling -# up ledger containers from within the container in order to have the example -# be completely self-contained where you don't need to worry about running -# multiple different ledgers just this one container. -docker run --rm -it --privileged -p 3000:3000 -p 3100:3100 -p 3200:3200 -p 4000:4000 -p 4100:4100 -p 4200:4200 caeb -``` \ No newline at end of file diff --git a/examples/carbon-accounting/healthcheck.sh b/examples/carbon-accounting/healthcheck.sh deleted file mode 100755 index c0a0e586b0..0000000000 --- a/examples/carbon-accounting/healthcheck.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -curl -v -i -X OPTIONS http://127.0.0.1:${COCKPIT_PORT} \ No newline at end of file diff --git a/examples/carbon-accounting/supervisord.conf b/examples/carbon-accounting/supervisord.conf deleted file mode 100644 index e64e2f327a..0000000000 --- a/examples/carbon-accounting/supervisord.conf +++ /dev/null @@ -1,25 +0,0 @@ -[supervisord] -logfile = /usr/src/app/log/supervisord.log -logfile_maxbytes = 50MB -logfile_backups=10 -loglevel = info - -[program:dockerd] -command=/usr/local/bin/dockerd -autostart=true -autorestart=true -stderr_logfile=/usr/src/app/log/dockerd.err.log -stdout_logfile=/usr/src/app/log/dockerd.out.log - -[program:carbon-accounting-app] -command=/home/appuser/.nvm/versions/node/v20.11.1/bin/node /usr/src/app/node_modules/@hyperledger/cactus-example-carbon-accounting-backend/dist/lib/main/typescript/carbon-accounting-app-cli.js -autostart=true -autorestart=unexpected -exitcodes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 - -[inet_http_server] -port = 0.0.0.0:9001 diff --git a/examples/test-run-transaction/BusinessLogicRunTransaction.ts b/examples/test-run-transaction/BusinessLogicRunTransaction.ts deleted file mode 100644 index 7866a68dbe..0000000000 --- a/examples/test-run-transaction/BusinessLogicRunTransaction.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * BusinessLogicRunTransaction.ts - */ - -import { Request } from "express"; -import { RequestInfo } from "./RequestInfo"; -import { TradeInfo } from "../cactus-common-example-server/src/main/typescript/routing-interface/TradeInfo"; -import { transactionManagement } from "../cactus-common-example-server/src/main/typescript/routing-interface/routes/index"; -import { verifierFactory } from "../cactus-common-example-server/src/main/typescript/routing-interface/routes/index"; -import { BusinessLogicBase } from "../cactus-common-example-server/src/main/typescript/business-logic-plugin/BusinessLogicBase"; -import { LedgerEvent } from "../cactus-common-example-server/src/main/typescript/verifier/LedgerPlugin"; -import { json2str } from "../cactus-common-example-server/src/main/typescript/verifier/DriverCommon"; - -import fs from "fs"; -import yaml from "js-yaml"; -const config: any = yaml.safeLoad( - fs.readFileSync("/etc/cactus/default.yaml", "utf8"), -); -import { getLogger } from "log4js"; -const moduleName = "BusinessLogicRunTransaction"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class BusinessLogicRunTransaction extends BusinessLogicBase { - businessLogicID: string; - - constructor(businessLogicID: string) { - super(); - this.businessLogicID = businessLogicID; - } - - startTransaction(req: Request, businessLogicID: string, tradeID: string) { - logger.debug("called startTransaction()"); - - // set RequestInfo - const requestInfo: RequestInfo = new RequestInfo(); - requestInfo.setBusinessLogicID(businessLogicID); - requestInfo.keychainId = req.body.tradeParams[0]; - requestInfo.keychainRef = req.body.tradeParams[1]; - requestInfo.channelName = req.body.tradeParams[2]; - requestInfo.invocationType = req.body.tradeParams[3]; - requestInfo.functionName = req.body.tradeParams[4]; - requestInfo.functionArgs = req.body.tradeParams[5]; - logger.debug(`tradeParams: ${req.body.tradeParams}`); - - // set TradeID - requestInfo.setTradeID(tradeID); - - // Create trade information - const tradeInfo: TradeInfo = new TradeInfo( - requestInfo.businessLogicID, - requestInfo.tradeID, - ); - - // Call Verifier to perform the function - this.execTransaction(requestInfo, tradeInfo); - } - - execTransaction(requestInfo: RequestInfo, tradeInfo: TradeInfo) { - logger.debug("called execTransaction()"); - - const useValidator = JSON.parse( - transactionManagement.getValidatorToUse(tradeInfo.businessLogicID), - ); - - // TODO: Temporarily specify no monitoring required (# 4rd parameter = false) - const verifier = verifierFactory.getVerifier( - useValidator["validatorID"][0], - "BusinessLogicRunTransaction", - {}, - false, - ); - logger.debug("getVerifier"); - - const contract = {}; - const method = { command: "test-run-transaction" }; - const args = { - args: { - keychainId: requestInfo.keychainId, - keychainRef: requestInfo.keychainRef, - channelName: requestInfo.channelName, - invocationType: requestInfo.invocationType, - functionName: requestInfo.functionName, - functionArgs: requestInfo.functionArgs, - }, - }; - - logger.debug(`##execTransaction call verifier.sendAsyncRequest()`); - verifier - .sendAsyncRequest(contract, method, args) - .then(() => { - logger.debug(`##execTransaction sendAsyncRequest finish`); - }) - .catch((err) => { - logger.error(err); - }); - } - - onEvent(ledgerEvent: LedgerEvent): void { - logger.debug(`##in BLP:onEvent()`); - logger.debug(`##onEvent(): ${json2str(ledgerEvent)}`); - } - - getEventDataNum(ledgerEvent: LedgerEvent): number { - // NOTE: This method implements the BisinessLogcPlugin operation(* Override by subclass) - // TODO: - logger.debug( - `##in getEventDataNum(), ledgerEvent: ${JSON.stringify(ledgerEvent)}`, - ); - const retEventNum = ledgerEvent.data["blockData"].length; - logger.debug(`##retEventNum: ${retEventNum}`); - return retEventNum; - } - - getTxIDFromEvent(ledgerEvent: LedgerEvent): string | null { - // NOTE: This method implements the BusinessLogicPlugin operation(* Override by subclass) - // TODO: - logger.debug( - `##in getTxIDFromEvent(), ledgerEvent: ${JSON.stringify(ledgerEvent)}`, - ); - - const txId = ledgerEvent.data["txId"]; - - if (typeof txId !== "string") { - logger.warn( - `#getTxIDFromEvent(): skip(invalid block, not found txId.), event: ${json2str( - ledgerEvent, - )}`, - ); - return null; - } - - logger.debug(`###getTxIDFromEvent(): txId: ${txId}`); - return txId; - } -} diff --git a/examples/test-run-transaction/README.md b/examples/test-run-transaction/README.md deleted file mode 100644 index 791fe4c536..0000000000 --- a/examples/test-run-transaction/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# test-run-transaction - -A proto-code of communication feature to http-typed Validator for Verifier - -## Setup for communication app with http-server - -``` -/// build /// -cd packages -vi config/default.json - -> edit applicationHostInfo.hostName (“http://xxx.xxx.xxx.xxx”) to the IP address of your server -npm install -npm run build -cd ../examples/run-transaction -npm install -npm run build -npm run init-run-transaction -npm run start - -> The run-transaction app will start on port 5034. -``` - -## Setup for stub server instead of http-type Validator - -``` -/// build /// -cd examples/run-transaction/supply-chain-app-stub -npm install -npx tsc -/// exec server /// -node app/app.js -``` - -## Execution to call API of http-type Validator - -``` -/// exec to call API /// -curl localhost:5034/api/v1/bl/run-transaction/ -XPOST -H "Content-Type: application/json" -d '{"businessLogicID":"j71S9gLN", "tradeParams": ["1111", "2222", "3333", "4444", "5555", ["6666-1", "6666-2"]]}' -``` \ No newline at end of file diff --git a/examples/test-run-transaction/RequestInfo.ts b/examples/test-run-transaction/RequestInfo.ts deleted file mode 100644 index 6834723311..0000000000 --- a/examples/test-run-transaction/RequestInfo.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * RequestInfo.ts - */ - -// request information -export class RequestInfo { - businessLogicID: string; - tradeID: string; - - keychainId: string; - keychainRef: string; - channelName: string; - invocationType: string; - functionName: string; - functionArgs: Array; - - setBusinessLogicID(businessLogicID: string) { - this.businessLogicID = businessLogicID; - } - - setTradeID(tradeID: string) { - this.tradeID = tradeID; - } -} diff --git a/examples/test-run-transaction/config/BLP_config.ts b/examples/test-run-transaction/config/BLP_config.ts deleted file mode 100644 index 23f7d6f718..0000000000 --- a/examples/test-run-transaction/config/BLP_config.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * BLP_config.ts - */ - -import { BusinessLogicPlugin } from "../../cactus-common-example-server/src/main/typescript/business-logic-plugin/BusinessLogicPlugin"; -import { BusinessLogicRunTransaction } from "../BusinessLogicRunTransaction"; - -export function getTargetBLPInstance( - businessLogicID: string, -): BusinessLogicPlugin | null { - switch (businessLogicID) { - case "j71S9gLN": - return new BusinessLogicRunTransaction(businessLogicID); - // case "*******": - // return new BusinessLogicX***Trade(); - default: - return null; - } -} diff --git a/examples/test-run-transaction/config/default.json b/examples/test-run-transaction/config/default.json deleted file mode 100644 index bc4b50b6f0..0000000000 --- a/examples/test-run-transaction/config/default.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "runTransactionInfo": { - "connector": { - "validatorID": "vIdO32CF" - } - }, - "logLevel": "debug" -} \ No newline at end of file diff --git a/examples/test-run-transaction/config/default.yaml b/examples/test-run-transaction/config/default.yaml deleted file mode 100644 index 29eb9008c2..0000000000 --- a/examples/test-run-transaction/config/default.yaml +++ /dev/null @@ -1,5 +0,0 @@ -runTransactionInfo: - connector: - validatorID: vIdO32CF - -logLevel: debug diff --git a/examples/test-run-transaction/config/usersetting.json b/examples/test-run-transaction/config/usersetting.json deleted file mode 100644 index 721ce96e2f..0000000000 --- a/examples/test-run-transaction/config/usersetting.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "blpRegistry": [ - { - "businessLogicID": "j71S9gLN", - "validatorID": ["vIdO32CF"] - } - ], - "logLevel": "debug", - "applicationHostInfo": { - "hostName": "http://aaa.bbb.ccc.ddd", - "hostPort": 5034 - }, - "appRouters": [ - { - "path": "/api/v1/bl/test-run-transaction/", - "routerJs": "../../examples/test-run-transaction/test-run-transaction.js" - } - ] -} diff --git a/examples/test-run-transaction/config/usersetting.yaml b/examples/test-run-transaction/config/usersetting.yaml deleted file mode 100644 index 32e3ce3b84..0000000000 --- a/examples/test-run-transaction/config/usersetting.yaml +++ /dev/null @@ -1,15 +0,0 @@ -blpRegistry: - - - businessLogicID: j71S9gLN - validatorID: [vIdO32CF] - -logLevel: debug - -applicationHostInfo: - hostName: http://aaa.bbb.ccc.ddd - hostPort: 5034 - -appRouters: - - - path: /api/v1/bl/test-run-transaction/ - routerJs: ../../../../../../examples/test-run-transaction/test-run-transaction.js \ No newline at end of file diff --git a/examples/test-run-transaction/copyBLPConfig.ts b/examples/test-run-transaction/copyBLPConfig.ts deleted file mode 100644 index 940d2bb5e8..0000000000 --- a/examples/test-run-transaction/copyBLPConfig.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * copyBLPConfig.ts - */ - -import * as shell from "shelljs"; - -// NOTE: Copy the static assets to the dist folder. -// Example: -// shell.cp('-R', 'src/routing-interface/views', 'dist/routing-interface/views/'); -shell.cp( - "../../dist/examples/test-run-transaction/config/BLP_config.js", - "../cactus-common-example-server/src/main/typescript/business-logic-plugin/", -); diff --git a/examples/test-run-transaction/copyStaticAssets.ts b/examples/test-run-transaction/copyStaticAssets.ts deleted file mode 100644 index d5eff4d85d..0000000000 --- a/examples/test-run-transaction/copyStaticAssets.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * copyStaticAssets.ts - */ - -import * as shell from "shelljs"; - -// NOTE: Copy the static assets to the dist folder. -// Example: -// shell.cp('-R', 'src/routing-interface/views', 'dist/routing-interface/views/'); -shell.cp("-R", "config/default.yaml", "/etc/cactus/"); -shell.cp("-R", "config/usersetting.yaml", "/etc/cactus/"); diff --git a/examples/test-run-transaction/package.json b/examples/test-run-transaction/package.json deleted file mode 100644 index 695033a61d..0000000000 --- a/examples/test-run-transaction/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "test-run-transaction", - "license": "Apache-2.0", - "private": true, - "scripts": { - "start": "node ../cactus-common-example-server/dist/lib/main/typescript/routing-interface/www.js", - "debug": "nodemon --inspect ../cactus-common-example-server/dist/lib/main/typescript/routing-interface/www.js", - "build": "npm run build-ts && npm run copy-static-assets && npm run copy-blp-config && npm run replace-blp-config-path", - "build-ts": "tsc -p ./tsconfig.json", - "tslint": "tslint -c tslint.json -p tsconfig.json './*.ts'", - "copy-static-assets": "ts-node copyStaticAssets.ts", - "copy-blp-config": "ts-node copyBLPConfig.ts", - "replace-blp-config-path": "ts-node replaceBLPConfigPath.ts", - "init-test-run-transaction": "ln -s ../examples/test-run-transaction/node_modules ../../dist/node_modules" - }, - "dependencies": { - "@types/node": "18.11.9", - "body-parser": "1.20.3", - "cookie-parser": "1.4.6", - "debug": "2.6.9", - "escape-html": "1.0.3", - "ethereumjs-common": "1.5.2", - "ethereumjs-tx": "2.1.2", - "express": "4.20.0", - "fabric-ca-client": "2.2.20", - "fabric-network": "2.2.20", - "http-errors": "1.6.3", - "jsonwebtoken": "9.0.0", - "log4js": "6.4.0", - "morgan": "1.9.1", - "shelljs": "0.8.5", - "socket.io": "4.6.2", - "ts-node": "8.9.1", - "web3": "1.7.0", - "xmlhttprequest": "1.8.0" - }, - "devDependencies": { - "@types/escape-html": "1.0.1", - "typescript": "5.5.2" - } -} \ No newline at end of file diff --git a/examples/test-run-transaction/replaceBLPConfigPath.ts b/examples/test-run-transaction/replaceBLPConfigPath.ts deleted file mode 100644 index 9f2f859a14..0000000000 --- a/examples/test-run-transaction/replaceBLPConfigPath.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * ReplacePath.js - */ -const fs = require("fs"); - -const targetFile = - "../cactus-common-example-server/dist/lib/main/typescript/business-logic-plugin/BLP_config.js"; -const srcStr = '"../BusinessLogicRunTransaction"'; -const distStr = - '"../../../../../../examples/test-run-transaction/BusinessLogicRunTransaction"'; - -fs.readFile(targetFile, "utf8", (readErr, data) => { - if (readErr) { - return console.log(readErr); - } - const result = data.replace(srcStr, distStr); - - fs.writeFile(targetFile, result, "utf8", (writeErr) => { - if (writeErr) return console.log(writeErr); - }); -}); diff --git a/examples/test-run-transaction/supply-chain-app-stub/.gitignore b/examples/test-run-transaction/supply-chain-app-stub/.gitignore deleted file mode 100644 index a6c7c2852d..0000000000 --- a/examples/test-run-transaction/supply-chain-app-stub/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.js diff --git a/examples/test-run-transaction/supply-chain-app-stub/app/app.ts b/examples/test-run-transaction/supply-chain-app-stub/app/app.ts deleted file mode 100644 index e4e769ff6f..0000000000 --- a/examples/test-run-transaction/supply-chain-app-stub/app/app.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * app.ts - */ - -// Load the library -import express from "express"; -import helmet from "helmet"; -import cors from "cors"; -const app = express(); -app.use(helmet()); -app.use(cors()); -const bodyParser = require("body-parser"); - -//import indexRouter from './routes/index'; -///import loginRouter from './routes/login'; -//import carsRouter from './routes/cars'; -//var carsRouter = require('./routes/cars.js').default; -//var loginRouter = require('./routes/login.js').default; -//var carsRouter = require('./routes/cars.js').default; - -// body-parser settings -app.use(bodyParser.urlencoded({ extended: true })); -app.use(bodyParser.json()); - -//app.use('/api/v1/', indexRouter); -//app.use('/api/v1/login/', loginRouter); -//app.use('/api/v1/cars/', carsRouter); - -// Dynamic loading -console.debug(`start Dynamic loading`); -const targetJsArray = [ - // {uri: '/api/v1/login/', jsPath: './routes/login.js'}, - // {uri: '/api/v1/cars/', jsPath: './routes/cars.js'}, - { - uri: "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/test-run-transaction/", - jsPath: "./routes/supply-chain-app.js", - }, -]; -for (const targetJs of targetJsArray) { - console.debug(`url: ${targetJs.uri}, jsPath: ${targetJs.jsPath}`); - // var targetRouter = require(targetJs.jsPath).default; - app.use(targetJs.uri, require(targetJs.jsPath).default); -} - -const port = process.env.PORT || 5053; // Specify the port number - -app.get("/helloWorld", (req, res) => { - res.status(200).send({ message: "hello, world" }); -}); - -// Server startup -app.listen(port); -console.log("listen on port " + port); diff --git a/examples/test-run-transaction/supply-chain-app-stub/app/routes/supply-chain-app.ts b/examples/test-run-transaction/supply-chain-app-stub/app/routes/supply-chain-app.ts deleted file mode 100644 index ff03913771..0000000000 --- a/examples/test-run-transaction/supply-chain-app-stub/app/routes/supply-chain-app.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * supply-chain-app.ts - */ - -import { Router, NextFunction, Request, Response } from "express"; - -const router: Router = Router(); - -/* GET home page. */ -router.get("/", (req: Request, res: Response, next: NextFunction) => { - try { - //res.render('index', { title: 'Express' }); - res.status(200).send("supply-chain-app:GET!!\n"); - } catch (err) { - next(err); - } -}); - -/* POST home page. */ -router.post("/", (req: Request, res: Response, next: NextFunction) => { - try { - //res.render('index', { title: 'Express' }); - console.debug(`req1: ${JSON.stringify(req.body)}`); - console.debug(`req2: ${req.body}`); - console.debug(`keychainId: ${req.body.keychainId}`); - console.debug(`keychainRef: ${req.body.keychainRef}`); - console.debug(`channelName: ${req.body.channelName}`); - console.debug(`invocationType: ${req.body.invocationType}`); - console.debug(`functionName: ${req.body.functionName}`); - console.debug(`functionArgs: ${req.body.functionArgs}`); - sleep(5, function () { - console.debug(`##send response`); - res.status(200).send(JSON.stringify({ "supply-chain-app": "POST..." })); - }); - } catch (err) { - next(err); - } -}); - -function sleep(waitSec: number, callbackFunc: unknown) { - let spanedSec = 0; - const id = setInterval(function () { - spanedSec++; - if (spanedSec >= waitSec) { - clearInterval(id); - if (callbackFunc) callbackFunc(); - } - }, 1000); -} - -export default router; diff --git a/examples/test-run-transaction/supply-chain-app-stub/package.json b/examples/test-run-transaction/supply-chain-app-stub/package.json deleted file mode 100644 index b95991c64b..0000000000 --- a/examples/test-run-transaction/supply-chain-app-stub/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "express-api", - "version": "1.0.0", - "description": "", - "main": "index.js", - "dependencies": { - "body-parser": "1.20.3", - "cors": "2.8.5", - "express": "4.20.0", - "moment": "2.29.4", - "ts-node": "10.9.1", - "typescript": "5.5.2", - "helmet": "4.6.0" - }, - "devDependencies": { - "@types/cors": "2.8.12", - "@types/express": "4.17.21" - }, - "scripts": { - "start": "node app/app.js", - "build": "npx tsc", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "Apache-2.0" -} diff --git a/examples/test-run-transaction/supply-chain-app-stub/tsconfig.json b/examples/test-run-transaction/supply-chain-app-stub/tsconfig.json deleted file mode 100644 index db36d44aa0..0000000000 --- a/examples/test-run-transaction/supply-chain-app-stub/tsconfig.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* 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. */ - // "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": "./", /* 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. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "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": [], /* 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 */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ - } -} diff --git a/examples/test-run-transaction/test-run-transaction.ts b/examples/test-run-transaction/test-run-transaction.ts deleted file mode 100644 index 77dde30327..0000000000 --- a/examples/test-run-transaction/test-run-transaction.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * test-run-transaction.ts - */ - -import { Router, NextFunction, Request, Response } from "express"; -import { TransactionManagement } from "../cactus-common-example-server/src/main/typescript/routing-interface/TransactionManagement"; -import { RIFError } from "../cactus-common-example-server/src/main/typescript/routing-interface/RIFError"; -import { ConfigUtil } from "../cactus-common-example-server/src/main/typescript/routing-interface/util/ConfigUtil"; - -import escapeHtml from "escape-html"; -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "test-run-transaction"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const router: Router = Router(); -export const transactionManagement: TransactionManagement = - new TransactionManagement(); - -// Request Execution of Test-Run-Transaction -router.post("/", (req: Request, res: Response, next: NextFunction) => { - try { - console.log("test-run-transaction()"); - const tradeID = transactionManagement.startBusinessLogic(req); - if (!tradeID) { - throw new RIFError(`Could not run BLP, tradeId = ${tradeID}`); - } - const result = { tradeID: tradeID }; - res.status(200).json(result); - } catch (err) { - if (err instanceof RIFError) { - res.status(err.statusCode); - res.send(escapeHtml(err.message)); - return; - } - - next(err); - } -}); - -export default router; diff --git a/examples/test-run-transaction/tsconfig.json b/examples/test-run-transaction/tsconfig.json deleted file mode 100644 index d56cfc0018..0000000000 --- a/examples/test-run-transaction/tsconfig.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "compilerOptions": { - /* Basic Options */ - "incremental": true, /* Enable incremental compilation */ - "target": "ES2022", /* 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": [ - "ES2022", - "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" - ] -} diff --git a/examples/test-run-transaction/tslint.json b/examples/test-run-transaction/tslint.json deleted file mode 100644 index 9a00b4aa19..0000000000 --- a/examples/test-run-transaction/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/extensions/cactus-plugin-htlc-coordinator-besu/CHANGELOG.md b/extensions/cactus-plugin-htlc-coordinator-besu/CHANGELOG.md deleted file mode 100644 index 8e9a0b50b5..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/CHANGELOG.md +++ /dev/null @@ -1,163 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-coordinator-besu - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-coordinator-besu - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-coordinator-besu - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **plugin-htlc-coordinator-besu:** add missing HSTS header ([dff34e8](https://github.com/hyperledger/cacti/commit/dff34e8f26f94a391b8b926057cbd6346bc0b3f8)) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** the CVE-2022-2421 - upgrade socket.io-parser to >=4.2.1 ([9172172](https://github.com/hyperledger/cacti/commit/917217227a3fa53a00429f047cd6318862e6ab8d)), closes [#2229](https://github.com/hyperledger/cacti/issues/2229) [#2228](https://github.com/hyperledger/cacti/issues/2228) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-coordinator-besu - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-coordinator-besu - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-coordinator-besu - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-coordinator-besu - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-coordinator-besu - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-coordinator-besu - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-coordinator-besu - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* **cmd-api-server:** upgrade socket.io - CVE-2022-21676 ([8e1c69e](https://github.com/hyperledger/cactus/commit/8e1c69e7b8ab5e4ccc31a0ec183a9777ccc22cdc)), closes [#1914](https://github.com/hyperledger/cactus/issues/1914) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* **security:** remedy CVE-2021-3749 ([b33aa90](https://github.com/hyperledger/cactus/commit/b33aa904cfa3794357c77b24f464d41a325f1d80)), closes [#1569](https://github.com/hyperledger/cactus/issues/1569) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -### Features - -* **htlc-coordinator:** new htlc coordinator ([28c97d3](https://github.com/hyperledger/cactus/commit/28c97d33e97fa180f1b2b65d505f5ae36a9ddc25)), closes [#953](https://github.com/hyperledger/cactus/issues/953) diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/README.md b/extensions/cactus-plugin-htlc-coordinator-besu/README.md deleted file mode 100644 index cba1542e13..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# `@hyperledger/cactus-plugin-htlc-coordinator-besu` - -Allows Cactus nodes to interact beetwen diferent networks. Using this we can perform: -* Instantiate an existing HTLC plugin, also the own HTLC and the counterparty HTLC. -* Interact with the HTLC, deploying, checking and withdrawing the funds. -## Summary - - - [Usage](#usage) - - [Development](#development) - - [Getting Started](#getting-started) - - [Flow](#flow) - - [Contributing](#contributing) - - [License](#license) - - [Acknowledgments](#acknowledgments) - -## Usage - -To use this import public-api and create new **PluginFactoryHTLCCoordinatorBesu*. Then use it to create a HTLC Coordinator. -```typescript - const factoryHTLC = new PluginFactoryHTLCCoordinatorBesu({ - pluginImportType: PluginImportType.Local, - }); - const pluginHTLCCoordinatorBesu = await factoryHTLC.create(pluginOptions); -``` -You can make calls through the htlc coordinator to the plugin API: - -```typescript -async ownHTLC(ownHTLCRequest: OwnHTLCRequest): Promise; -async counterpartyHTLC(counterpartyHTLCRequest: CounterpartyHTLCRequest): Promise; -async withdrawCounterparty(withdrawCounterpartyRequest: WithdrawCounterpartyRequest): Promise; -``` - -Call example to create an ownHTLC and instantiate a HTLC contract: -```typescript - const ownHTLCRequest: OwnHTLCRequest = { - htlcPackage: HtlcPackage.BesuErc20, - connectorInstanceId, - keychainId, - constructorArgs: [], - web3SigningCredential, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - gas: estimatedGas, - }; - const response = await coordinator.ownCoordinator(ownHTLCRequest); -}); -``` -The field "htlcPackage" can have the following values: -```typescript - enum HtlcPackage { - Besu = 'BESU', - BesuErc20 = 'BESU_ERC20' - } -``` - -## Development - -### Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -#### Prerequisites - -In the root of the project to install the dependencies execute the command: -```sh -yarn run configure -``` - -#### Compiling - -In the project root folder, run this command to compile the plugin and create the dist directory: -```sh -yarn run watch -``` - -### Flow - -#### Alice flow - -The [Alice diagram](docs/flow/htlc-coordinator-alice-flow.md, "Alice Flow") shows the sequence diagram of a complete flow for a participant who wants exchange funds with another participant. She doesn't start the withdraw flow becuase she doesn't know the secret to withdraw them. - -#### Bob flow - -The next [Bob diagram](docs/flow/htlc-coordinator-bob-flow.md, "Bob Flow") -shows the sequence diagram of a complete flow for a participant who wants exchange funds with another participant, but he knows the secret and starts the flow to withdraw the funds. - - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/docs/flow/htlc-coordinator-alice-flow.md b/extensions/cactus-plugin-htlc-coordinator-besu/docs/flow/htlc-coordinator-alice-flow.md deleted file mode 100644 index 847e0664cc..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/docs/flow/htlc-coordinator-alice-flow.md +++ /dev/null @@ -1,69 +0,0 @@ -```mermaid -sequenceDiagram -autonumber - participant Alice - participant HTLC Coordinator Alice - participant HTLC Plugin Besu - participant HTLC Plugin Counterparty - participant HTLC Contract Alice - participant HTLC Contract Counterparty - - - - Note over Alice: Bob has deployed his contract and share the information with Alice - Alice ->> HTLC Coordinator Alice: newCounterparty(HTLC Plugin Counterparty) - activate HTLC Coordinator Alice - HTLC Coordinator Alice ->> HTLC Plugin Counterparty: newInstance() - activate HTLC Plugin Counterparty - HTLC Plugin Counterparty-->> HTLC Coordinator Alice: plugin instance - deactivate HTLC Plugin Counterparty - HTLC Coordinator Alice ->> HTLC Plugin Counterparty: getSingleStatus() - activate HTLC Plugin Counterparty - HTLC Plugin Counterparty -->> HTLC Contract Counterparty: getSingleStatus() - activate HTLC Contract Counterparty - HTLC Contract Counterparty -->> HTLC Plugin Counterparty: ok - deactivate HTLC Contract Counterparty - HTLC Plugin Counterparty -->> HTLC Coordinator Alice: ok - deactivate HTLC Plugin Counterparty - HTLC Coordinator Alice ->> Alice: HTLC Plugin Counterparty instance - deactivate HTLC Coordinator Alice - Note over Alice: Alice has validated that the Bob contract information is correct - Alice ->> HTLC Coordinator Alice: newCoordinator(HTLC Plugin Besu) - activate HTLC Coordinator Alice - HTLC Coordinator Alice ->> HTLC Plugin Besu: newInstance() - activate HTLC Plugin Besu - HTLC Plugin Besu -->> HTLC Coordinator Alice: plugin instance - deactivate HTLC Plugin Besu - HTLC Coordinator Alice ->> HTLC Plugin Besu: newContract() - activate HTLC Plugin Besu - HTLC Plugin Besu ->> HTLC Contract Alice: deployContract() - activate HTLC Contract Alice - HTLC Contract Alice -->> HTLC Plugin Besu: ok - deactivate HTLC Contract Alice - HTLC Plugin Besu -->> HTLC Coordinator Alice: ok - HTLC Plugin Besu -->> HTLC Plugin Besu: Listening contract events - - HTLC Coordinator Alice ->> Alice: Alice HTLC Coordinator instance - deactivate HTLC Coordinator Alice - Note over Alice: Alice send all information about her contract to Bob - Note over Alice: Her counterparty invoke the withdraw function - HTLC Plugin Besu -->> HTLC Coordinator Alice: Event - CounterParty withdraw - deactivate HTLC Plugin Besu - activate HTLC Coordinator Alice - HTLC Coordinator Alice -->> Alice: Counterparty withdraw notification - deactivate HTLC Coordinator Alice - Note over Alice: Alice can call the withdrawCounterparty because now she can see the secret - Alice ->> HTLC Coordinator Alice: WithdrawCounterparty() - activate HTLC Coordinator Alice - HTLC Coordinator Alice ->> HTLC Plugin Counterparty: WithdrawCounterparty() - activate HTLC Plugin Counterparty - HTLC Plugin Counterparty ->> HTLC Contract Counterparty: withdraw() - activate HTLC Contract Counterparty - HTLC Contract Counterparty -->> HTLC Plugin Counterparty: ok - deactivate HTLC Contract Counterparty - HTLC Plugin Counterparty -->> HTLC Coordinator Alice: ok - deactivate HTLC Plugin Counterparty - HTLC Coordinator Alice -->> Alice: ok - deactivate HTLC Coordinator Alice - -``` \ No newline at end of file diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/docs/flow/htlc-coordinator-bob-flow.md b/extensions/cactus-plugin-htlc-coordinator-besu/docs/flow/htlc-coordinator-bob-flow.md deleted file mode 100644 index 2bd00d0595..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/docs/flow/htlc-coordinator-bob-flow.md +++ /dev/null @@ -1,68 +0,0 @@ -```mermaid -sequenceDiagram -autonumber - participant Bob - participant HTLC Coordinator Bob - participant HTLC Plugin Besu ERC20 - participant HTLC Plugin Counterparty - participant HTLC Contract Bob - participant HTLC Contract Counterparty - - Note over Bob: We assumped that the offer take place on the front end - Note over Bob: Bob is the first to deploy the HTLC contract - Bob ->> HTLC Coordinator Bob: newCoordinator(HTLC Plugin Besu) - activate HTLC Coordinator Bob - HTLC Coordinator Bob ->> HTLC Plugin Besu ERC20:newInstance() - activate HTLC Plugin Besu ERC20 - HTLC Plugin Besu ERC20-->> HTLC Coordinator Bob: plugin instance - deactivate HTLC Plugin Besu ERC20 - HTLC Coordinator Bob ->> HTLC Plugin Besu ERC20:newContract() - activate HTLC Plugin Besu ERC20 - HTLC Plugin Besu ERC20->> HTLC Contract Bob: deployContract() - activate HTLC Contract Bob - HTLC Contract Bob -->> HTLC Plugin Besu ERC20:ok - deactivate HTLC Contract Bob - HTLC Plugin Besu ERC20-->> HTLC Coordinator Bob: ok - HTLC Plugin Besu ERC20-->> HTLC Plugin Besu ERC20:Listening contract events - - HTLC Coordinator Bob ->> Bob: Bob HTLC Coordinator instance - deactivate HTLC Coordinator Bob - Note over Bob: Bob share with Alice all the information about his contract - Bob ->> HTLC Coordinator Bob: newCounterparty(HTLC Plugin Counterparty) - activate HTLC Coordinator Bob - HTLC Coordinator Bob ->> HTLC Plugin Counterparty: newInstance() - activate HTLC Plugin Counterparty - HTLC Plugin Counterparty-->> HTLC Coordinator Bob: plugin instance - deactivate HTLC Plugin Counterparty - HTLC Coordinator Bob ->> HTLC Plugin Counterparty: getSingleStatus() - activate HTLC Plugin Counterparty - HTLC Plugin Counterparty -->> HTLC Contract Counterparty: getSingleStatus() - activate HTLC Contract Counterparty - HTLC Contract Counterparty -->> HTLC Plugin Counterparty: ok - deactivate HTLC Contract Counterparty - HTLC Plugin Counterparty -->> HTLC Coordinator Bob: ok - deactivate HTLC Plugin Counterparty - HTLC Coordinator Bob ->> Bob: HTLC Plugin Counterparty instance - deactivate HTLC Coordinator Bob - - - Note over Bob: Bob knows his secret, so he can start the withdrawCounterparty - Bob ->> HTLC Coordinator Bob: WithdrawCounterparty() - activate HTLC Coordinator Bob - HTLC Coordinator Bob ->> HTLC Plugin Counterparty: WithdrawCounterparty() - activate HTLC Plugin Counterparty - HTLC Plugin Counterparty ->> HTLC Contract Counterparty: withdraw() - activate HTLC Contract Counterparty - HTLC Contract Counterparty -->> HTLC Plugin Counterparty: ok - deactivate HTLC Contract Counterparty - HTLC Plugin Counterparty -->> HTLC Coordinator Bob: ok - deactivate HTLC Plugin Counterparty - HTLC Coordinator Bob -->> Bob: ok - deactivate HTLC Coordinator Bob - HTLC Plugin Besu ERC20-->> HTLC Coordinator Bob: Event - CounterParty withdraw - deactivate HTLC Plugin Besu ERC20 - activate HTLC Coordinator Bob - HTLC Coordinator Bob -->> Bob: Counterparty withdraw notification - deactivate HTLC Coordinator Bob - -``` \ No newline at end of file diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/openapitools.json b/extensions/cactus-plugin-htlc-coordinator-besu/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/package.json b/extensions/cactus-plugin-htlc-coordinator-besu/package.json deleted file mode 100644 index d1e8997c25..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-htlc-coordinator-besu", - "version": "2.0.0", - "description": "HTLC Coordinator to exchange tokens between networks.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-htlc-coordinator-besu.web.umd.js", - "types": "dist/types/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "run-p generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --ignore-file-override=../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev webpack:prod", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js", - "webpack:prod": "npm-run-all webpack:prod:node webpack:prod:web", - "webpack:prod:node": "webpack --env=prod --target=node --config ../../webpack.config.js", - "webpack:prod:web": "webpack --env=prod --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-htlc-eth-besu": "2.0.0", - "@hyperledger/cactus-plugin-htlc-eth-besu-erc20": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20": "2.0.0", - "axios": "1.7.7", - "body-parser": "1.20.3", - "fast-safe-stringify": "2.1.1", - "joi": "17.13.3", - "openapi-types": "12.1.3", - "prom-client": "15.1.3", - "run-time-error-cjs": "1.4.0", - "socket.io-client-fixed-types": "4.5.4", - "typescript-optional": "2.0.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/express": "5.0.0", - "@types/uuid": "10.0.0", - "express": "4.21.0", - "socket.io": "4.6.2", - "web3-eth-abi": "4.2.1", - "web3-utils": "4.2.1" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-htlc-coordinator-besu.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-htlc-coordinator-besu.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 96d87952e3..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,19 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_counterparty_htlc_request.go -model_htlc_package.go -model_own_htlc_request.go -model_web3_signing_credential.go -model_web3_signing_credential_cactus_keychain_ref.go -model_web3_signing_credential_none.go -model_web3_signing_credential_private_key_hex.go -model_web3_signing_credential_type.go -model_withdraw_counterparty_request.go -response.go -utils.go diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/.travis.yml b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/README.md b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index d752187b11..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# Go API client for cactus-plugin-htlc-coordinator-besu - -Can exchange assets between networks - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-htlc-coordinator-besu "github.com/hyperledger/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-htlc-coordinator-besu.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-htlc-coordinator-besu.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-htlc-coordinator-besu.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-htlc-coordinator-besu.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://www.cactus.stream* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**CounterpartyHtlcV1**](docs/DefaultApi.md#counterpartyhtlcv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/counterparty-htlc | Create an instance to interact with the counterparty HTLC -*DefaultApi* | [**OwnHtlcV1**](docs/DefaultApi.md#ownhtlcv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/own-htlc | Create an instance to interact with the own HTLC. -*DefaultApi* | [**WithdrawCounterpartyV1**](docs/DefaultApi.md#withdrawcounterpartyv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/withdraw-counterparty | Withdraw funds of the counterparty HTLC - - -## Documentation For Models - - - [CounterpartyHTLCRequest](docs/CounterpartyHTLCRequest.md) - - [HtlcPackage](docs/HtlcPackage.md) - - [OwnHTLCRequest](docs/OwnHTLCRequest.md) - - [Web3SigningCredential](docs/Web3SigningCredential.md) - - [Web3SigningCredentialCactusKeychainRef](docs/Web3SigningCredentialCactusKeychainRef.md) - - [Web3SigningCredentialNone](docs/Web3SigningCredentialNone.md) - - [Web3SigningCredentialPrivateKeyHex](docs/Web3SigningCredentialPrivateKeyHex.md) - - [Web3SigningCredentialType](docs/Web3SigningCredentialType.md) - - [WithdrawCounterpartyRequest](docs/WithdrawCounterpartyRequest.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/api/openapi.yaml b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 3c56d1535c..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,335 +0,0 @@ -openapi: 3.0.3 -info: - description: Can exchange assets between networks - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - HTLC Coordinator - version: 2.0.0 -servers: -- description: Public test instance - url: "https://www.cactus.stream/{basePath}" - variables: - basePath: - default: "" -- description: Local test instance - url: "http://localhost:4000/{basePath}" - variables: - basePath: - default: "" -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/own-htlc: - post: - operationId: ownHtlcV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OwnHTLCRequest' - responses: - "200": - content: - application/json: - schema: {} - description: OK - summary: Create an instance to interact with the own HTLC. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/own-htlc - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/counterparty-htlc: - post: - operationId: counterpartyHtlcV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CounterpartyHTLCRequest' - responses: - "200": - content: - application/json: - schema: {} - description: OK - summary: Create an instance to interact with the counterparty HTLC - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/counterparty-htlc - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/withdraw-counterparty: - post: - operationId: withdrawCounterpartyV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WithdrawCounterpartyRequest' - responses: - "200": - content: - application/json: - schema: {} - description: OK - summary: Withdraw funds of the counterparty HTLC - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/withdraw-counterparty -components: - schemas: - OwnHTLCRequest: - example: - htlcPackage: null - receiver: receiver - connectorInstanceId: connectorInstanceId - constructorArgs: - - "" - - "" - outputAmount: 6.027456183070403 - outputNetwork: outputNetwork - hashLock: hashLock - inputAmount: 0.8008281904610115 - tokenAddress: tokenAddress - outputAddress: outputAddress - keychainId: keychainId - gas: 5.962133916683182 - web3SigningCredential: - type: null - expiration: 1.4658129805029452 - properties: - htlcPackage: - $ref: '#/components/schemas/HtlcPackage' - connectorInstanceId: - description: connector Instance Id for the connector plugin - nullable: false - type: string - keychainId: - description: keychainId for the keychain plugin - nullable: false - type: string - constructorArgs: - default: [] - items: {} - type: array - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - inputAmount: - description: Input amount to lock - nullable: false - type: number - outputAmount: - description: Output amount to lock - nullable: false - type: number - expiration: - description: Timestamp to expire the contract - nullable: false - type: number - hashLock: - description: Hashlock needed to refund the amount - nullable: false - type: string - tokenAddress: - description: The token address - nullable: false - type: string - receiver: - description: The receiver address - nullable: false - type: string - outputNetwork: - description: The output network id - nullable: false - type: string - outputAddress: - description: The output addreess to receive the tokens - nullable: false - type: string - gas: - type: number - required: - - connectorInstanceId - - constructorArgs - - expiration - - hashLock - - htlcPackage - - inputAmount - - keychainId - - outputAddress - - outputAmount - - outputNetwork - - receiver - - tokenAddress - - web3SigningCredential - type: object - CounterpartyHTLCRequest: - example: - htlcPackage: null - htlcId: htlcId - keychainId: keychainId - connectorInstanceId: connectorInstanceId - gas: 0.8008281904610115 - web3SigningCredential: - type: null - properties: - htlcPackage: - $ref: '#/components/schemas/HtlcPackage' - connectorInstanceId: - description: connector Instance Id for the connector plugin - nullable: false - type: string - keychainId: - description: keychainId for the keychain plugin - nullable: false - type: string - htlcId: - description: Id for the HTLC - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - gas: - type: number - required: - - connectorInstanceId - - htlcId - - htlcPackage - - keychainId - - web3SigningCredential - type: object - WithdrawCounterpartyRequest: - example: - htlcPackage: null - htlcId: htlcId - keychainId: keychainId - connectorInstanceId: connectorInstanceId - contractId: contractId - gas: 0.8008281904610115 - web3SigningCredential: - type: null - secret: secret - properties: - htlcPackage: - $ref: '#/components/schemas/HtlcPackage' - connectorInstanceId: - description: connector Instance Id for the connector plugin - nullable: false - type: string - keychainId: - description: keychainId for the keychain plugin - nullable: false - type: string - contractId: - description: contractId for the contract - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - htlcId: - description: Id for the HTLC - nullable: false - type: string - secret: - description: Counterparty HTLC secret - nullable: false - type: string - gas: - type: number - required: - - connectorInstanceId - - htlcId - - htlcPackage - - keychainId - - secret - - web3SigningCredential - type: object - HtlcPackage: - enum: - - BESU - - BESU_ERC20 - type: string - Web3SigningCredentialType: - enum: - - CACTUS_KEYCHAIN_REF - - GETH_KEYCHAIN_PASSWORD - - PRIVATE_KEY_HEX - - NONE - type: string - Web3SigningCredentialCactusKeychainRef: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 64 - minLength: 64 - nullable: false - type: string - keychainEntryKey: - description: The key to use when looking up the the keychain entry holding - the secret pointed to by the keychainEntryKey parameter. - maxLength: 1024 - minLength: 0 - type: string - keychainId: - description: The keychain ID to use when looking up the the keychain plugin - instance that will be used to retrieve the secret pointed to by the keychainEntryKey - parameter. - maxLength: 1024 - minLength: 0 - type: string - required: - - ethAccount - - keychainEntryKey - - keychainId - - type - type: object - Web3SigningCredentialPrivateKeyHex: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 64 - minLength: 64 - nullable: false - type: string - secret: - description: The HEX encoded private key of an eth account. - maxLength: 65535 - minLength: 0 - type: string - required: - - ethAccount - - secret - - type - type: object - Web3SigningCredentialNone: - description: Using this denotes that there is no signing required because the - transaction is pre-signed. - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredential: - discriminator: - propertyName: type - example: - type: null - oneOf: - - $ref: '#/components/schemas/Web3SigningCredentialCactusKeychainRef' - - $ref: '#/components/schemas/Web3SigningCredentialPrivateKeyHex' - - $ref: '#/components/schemas/Web3SigningCredentialNone' - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/api_default.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 47b1652b62..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,338 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiCounterpartyHtlcV1Request struct { - ctx context.Context - ApiService *DefaultApiService - counterpartyHTLCRequest *CounterpartyHTLCRequest -} - -func (r ApiCounterpartyHtlcV1Request) CounterpartyHTLCRequest(counterpartyHTLCRequest CounterpartyHTLCRequest) ApiCounterpartyHtlcV1Request { - r.counterpartyHTLCRequest = &counterpartyHTLCRequest - return r -} - -func (r ApiCounterpartyHtlcV1Request) Execute() (interface{}, *http.Response, error) { - return r.ApiService.CounterpartyHtlcV1Execute(r) -} - -/* -CounterpartyHtlcV1 Create an instance to interact with the counterparty HTLC - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCounterpartyHtlcV1Request -*/ -func (a *DefaultApiService) CounterpartyHtlcV1(ctx context.Context) ApiCounterpartyHtlcV1Request { - return ApiCounterpartyHtlcV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return interface{} -func (a *DefaultApiService) CounterpartyHtlcV1Execute(r ApiCounterpartyHtlcV1Request) (interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CounterpartyHtlcV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/counterparty-htlc" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.counterpartyHTLCRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiOwnHtlcV1Request struct { - ctx context.Context - ApiService *DefaultApiService - ownHTLCRequest *OwnHTLCRequest -} - -func (r ApiOwnHtlcV1Request) OwnHTLCRequest(ownHTLCRequest OwnHTLCRequest) ApiOwnHtlcV1Request { - r.ownHTLCRequest = &ownHTLCRequest - return r -} - -func (r ApiOwnHtlcV1Request) Execute() (interface{}, *http.Response, error) { - return r.ApiService.OwnHtlcV1Execute(r) -} - -/* -OwnHtlcV1 Create an instance to interact with the own HTLC. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOwnHtlcV1Request -*/ -func (a *DefaultApiService) OwnHtlcV1(ctx context.Context) ApiOwnHtlcV1Request { - return ApiOwnHtlcV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return interface{} -func (a *DefaultApiService) OwnHtlcV1Execute(r ApiOwnHtlcV1Request) (interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OwnHtlcV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/own-htlc" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.ownHTLCRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiWithdrawCounterpartyV1Request struct { - ctx context.Context - ApiService *DefaultApiService - withdrawCounterpartyRequest *WithdrawCounterpartyRequest -} - -func (r ApiWithdrawCounterpartyV1Request) WithdrawCounterpartyRequest(withdrawCounterpartyRequest WithdrawCounterpartyRequest) ApiWithdrawCounterpartyV1Request { - r.withdrawCounterpartyRequest = &withdrawCounterpartyRequest - return r -} - -func (r ApiWithdrawCounterpartyV1Request) Execute() (interface{}, *http.Response, error) { - return r.ApiService.WithdrawCounterpartyV1Execute(r) -} - -/* -WithdrawCounterpartyV1 Withdraw funds of the counterparty HTLC - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiWithdrawCounterpartyV1Request -*/ -func (a *DefaultApiService) WithdrawCounterpartyV1(ctx context.Context) ApiWithdrawCounterpartyV1Request { - return ApiWithdrawCounterpartyV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return interface{} -func (a *DefaultApiService) WithdrawCounterpartyV1Execute(r ApiWithdrawCounterpartyV1Request) (interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.WithdrawCounterpartyV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/withdraw-counterparty" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.withdrawCounterpartyRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/client.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 2db7d9e470..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - HTLC Coordinator API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/configuration.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 0e359b1a72..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,231 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "https://www.cactus.stream/{basePath}", - Description: "Public test instance", - Variables: map[string]ServerVariable{ - "basePath": ServerVariable{ - Description: "No description provided", - DefaultValue: "", - }, - }, - }, - { - URL: "http://localhost:4000/{basePath}", - Description: "Local test instance", - Variables: map[string]ServerVariable{ - "basePath": ServerVariable{ - Description: "No description provided", - DefaultValue: "", - }, - }, - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/go.mod b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 23a18c809d..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/go.sum b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_counterparty_htlc_request.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_counterparty_htlc_request.go deleted file mode 100644 index 92f4c6a2cd..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_counterparty_htlc_request.go +++ /dev/null @@ -1,264 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "encoding/json" -) - -// checks if the CounterpartyHTLCRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CounterpartyHTLCRequest{} - -// CounterpartyHTLCRequest struct for CounterpartyHTLCRequest -type CounterpartyHTLCRequest struct { - HtlcPackage HtlcPackage `json:"htlcPackage"` - // connector Instance Id for the connector plugin - ConnectorInstanceId string `json:"connectorInstanceId"` - // keychainId for the keychain plugin - KeychainId string `json:"keychainId"` - // Id for the HTLC - HtlcId string `json:"htlcId"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - Gas *float32 `json:"gas,omitempty"` -} - -// NewCounterpartyHTLCRequest instantiates a new CounterpartyHTLCRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCounterpartyHTLCRequest(htlcPackage HtlcPackage, connectorInstanceId string, keychainId string, htlcId string, web3SigningCredential Web3SigningCredential) *CounterpartyHTLCRequest { - this := CounterpartyHTLCRequest{} - this.HtlcPackage = htlcPackage - this.ConnectorInstanceId = connectorInstanceId - this.KeychainId = keychainId - this.HtlcId = htlcId - this.Web3SigningCredential = web3SigningCredential - return &this -} - -// NewCounterpartyHTLCRequestWithDefaults instantiates a new CounterpartyHTLCRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCounterpartyHTLCRequestWithDefaults() *CounterpartyHTLCRequest { - this := CounterpartyHTLCRequest{} - return &this -} - -// GetHtlcPackage returns the HtlcPackage field value -func (o *CounterpartyHTLCRequest) GetHtlcPackage() HtlcPackage { - if o == nil { - var ret HtlcPackage - return ret - } - - return o.HtlcPackage -} - -// GetHtlcPackageOk returns a tuple with the HtlcPackage field value -// and a boolean to check if the value has been set. -func (o *CounterpartyHTLCRequest) GetHtlcPackageOk() (*HtlcPackage, bool) { - if o == nil { - return nil, false - } - return &o.HtlcPackage, true -} - -// SetHtlcPackage sets field value -func (o *CounterpartyHTLCRequest) SetHtlcPackage(v HtlcPackage) { - o.HtlcPackage = v -} - -// GetConnectorInstanceId returns the ConnectorInstanceId field value -func (o *CounterpartyHTLCRequest) GetConnectorInstanceId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorInstanceId -} - -// GetConnectorInstanceIdOk returns a tuple with the ConnectorInstanceId field value -// and a boolean to check if the value has been set. -func (o *CounterpartyHTLCRequest) GetConnectorInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorInstanceId, true -} - -// SetConnectorInstanceId sets field value -func (o *CounterpartyHTLCRequest) SetConnectorInstanceId(v string) { - o.ConnectorInstanceId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *CounterpartyHTLCRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *CounterpartyHTLCRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *CounterpartyHTLCRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetHtlcId returns the HtlcId field value -func (o *CounterpartyHTLCRequest) GetHtlcId() string { - if o == nil { - var ret string - return ret - } - - return o.HtlcId -} - -// GetHtlcIdOk returns a tuple with the HtlcId field value -// and a boolean to check if the value has been set. -func (o *CounterpartyHTLCRequest) GetHtlcIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HtlcId, true -} - -// SetHtlcId sets field value -func (o *CounterpartyHTLCRequest) SetHtlcId(v string) { - o.HtlcId = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *CounterpartyHTLCRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *CounterpartyHTLCRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *CounterpartyHTLCRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *CounterpartyHTLCRequest) GetGas() float32 { - if o == nil || IsNil(o.Gas) { - var ret float32 - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CounterpartyHTLCRequest) GetGasOk() (*float32, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *CounterpartyHTLCRequest) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given float32 and assigns it to the Gas field. -func (o *CounterpartyHTLCRequest) SetGas(v float32) { - o.Gas = &v -} - -func (o CounterpartyHTLCRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CounterpartyHTLCRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["htlcPackage"] = o.HtlcPackage - toSerialize["connectorInstanceId"] = o.ConnectorInstanceId - toSerialize["keychainId"] = o.KeychainId - toSerialize["htlcId"] = o.HtlcId - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableCounterpartyHTLCRequest struct { - value *CounterpartyHTLCRequest - isSet bool -} - -func (v NullableCounterpartyHTLCRequest) Get() *CounterpartyHTLCRequest { - return v.value -} - -func (v *NullableCounterpartyHTLCRequest) Set(val *CounterpartyHTLCRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCounterpartyHTLCRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCounterpartyHTLCRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCounterpartyHTLCRequest(val *CounterpartyHTLCRequest) *NullableCounterpartyHTLCRequest { - return &NullableCounterpartyHTLCRequest{value: val, isSet: true} -} - -func (v NullableCounterpartyHTLCRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCounterpartyHTLCRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_htlc_package.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_htlc_package.go deleted file mode 100644 index 901d49a40a..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_htlc_package.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "encoding/json" - "fmt" -) - -// HtlcPackage the model 'HtlcPackage' -type HtlcPackage string - -// List of HtlcPackage -const ( - BESU HtlcPackage = "BESU" - BESU_ERC20 HtlcPackage = "BESU_ERC20" -) - -// All allowed values of HtlcPackage enum -var AllowedHtlcPackageEnumValues = []HtlcPackage{ - "BESU", - "BESU_ERC20", -} - -func (v *HtlcPackage) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := HtlcPackage(value) - for _, existing := range AllowedHtlcPackageEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid HtlcPackage", value) -} - -// NewHtlcPackageFromValue returns a pointer to a valid HtlcPackage -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewHtlcPackageFromValue(v string) (*HtlcPackage, error) { - ev := HtlcPackage(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for HtlcPackage: valid values are %v", v, AllowedHtlcPackageEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v HtlcPackage) IsValid() bool { - for _, existing := range AllowedHtlcPackageEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to HtlcPackage value -func (v HtlcPackage) Ptr() *HtlcPackage { - return &v -} - -type NullableHtlcPackage struct { - value *HtlcPackage - isSet bool -} - -func (v NullableHtlcPackage) Get() *HtlcPackage { - return v.value -} - -func (v *NullableHtlcPackage) Set(val *HtlcPackage) { - v.value = val - v.isSet = true -} - -func (v NullableHtlcPackage) IsSet() bool { - return v.isSet -} - -func (v *NullableHtlcPackage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHtlcPackage(val *HtlcPackage) *NullableHtlcPackage { - return &NullableHtlcPackage{value: val, isSet: true} -} - -func (v NullableHtlcPackage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHtlcPackage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_own_htlc_request.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_own_htlc_request.go deleted file mode 100644 index cfe65a1f18..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_own_htlc_request.go +++ /dev/null @@ -1,487 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "encoding/json" -) - -// checks if the OwnHTLCRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OwnHTLCRequest{} - -// OwnHTLCRequest struct for OwnHTLCRequest -type OwnHTLCRequest struct { - HtlcPackage HtlcPackage `json:"htlcPackage"` - // connector Instance Id for the connector plugin - ConnectorInstanceId string `json:"connectorInstanceId"` - // keychainId for the keychain plugin - KeychainId string `json:"keychainId"` - ConstructorArgs []interface{} `json:"constructorArgs"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // Input amount to lock - InputAmount float32 `json:"inputAmount"` - // Output amount to lock - OutputAmount float32 `json:"outputAmount"` - // Timestamp to expire the contract - Expiration float32 `json:"expiration"` - // Hashlock needed to refund the amount - HashLock string `json:"hashLock"` - // The token address - TokenAddress string `json:"tokenAddress"` - // The receiver address - Receiver string `json:"receiver"` - // The output network id - OutputNetwork string `json:"outputNetwork"` - // The output addreess to receive the tokens - OutputAddress string `json:"outputAddress"` - Gas *float32 `json:"gas,omitempty"` -} - -// NewOwnHTLCRequest instantiates a new OwnHTLCRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewOwnHTLCRequest(htlcPackage HtlcPackage, connectorInstanceId string, keychainId string, constructorArgs []interface{}, web3SigningCredential Web3SigningCredential, inputAmount float32, outputAmount float32, expiration float32, hashLock string, tokenAddress string, receiver string, outputNetwork string, outputAddress string) *OwnHTLCRequest { - this := OwnHTLCRequest{} - this.HtlcPackage = htlcPackage - this.ConnectorInstanceId = connectorInstanceId - this.KeychainId = keychainId - this.ConstructorArgs = constructorArgs - this.Web3SigningCredential = web3SigningCredential - this.InputAmount = inputAmount - this.OutputAmount = outputAmount - this.Expiration = expiration - this.HashLock = hashLock - this.TokenAddress = tokenAddress - this.Receiver = receiver - this.OutputNetwork = outputNetwork - this.OutputAddress = outputAddress - return &this -} - -// NewOwnHTLCRequestWithDefaults instantiates a new OwnHTLCRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewOwnHTLCRequestWithDefaults() *OwnHTLCRequest { - this := OwnHTLCRequest{} - return &this -} - -// GetHtlcPackage returns the HtlcPackage field value -func (o *OwnHTLCRequest) GetHtlcPackage() HtlcPackage { - if o == nil { - var ret HtlcPackage - return ret - } - - return o.HtlcPackage -} - -// GetHtlcPackageOk returns a tuple with the HtlcPackage field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetHtlcPackageOk() (*HtlcPackage, bool) { - if o == nil { - return nil, false - } - return &o.HtlcPackage, true -} - -// SetHtlcPackage sets field value -func (o *OwnHTLCRequest) SetHtlcPackage(v HtlcPackage) { - o.HtlcPackage = v -} - -// GetConnectorInstanceId returns the ConnectorInstanceId field value -func (o *OwnHTLCRequest) GetConnectorInstanceId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorInstanceId -} - -// GetConnectorInstanceIdOk returns a tuple with the ConnectorInstanceId field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetConnectorInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorInstanceId, true -} - -// SetConnectorInstanceId sets field value -func (o *OwnHTLCRequest) SetConnectorInstanceId(v string) { - o.ConnectorInstanceId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *OwnHTLCRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *OwnHTLCRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetConstructorArgs returns the ConstructorArgs field value -func (o *OwnHTLCRequest) GetConstructorArgs() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetConstructorArgsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.ConstructorArgs, true -} - -// SetConstructorArgs sets field value -func (o *OwnHTLCRequest) SetConstructorArgs(v []interface{}) { - o.ConstructorArgs = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *OwnHTLCRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *OwnHTLCRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetInputAmount returns the InputAmount field value -func (o *OwnHTLCRequest) GetInputAmount() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.InputAmount -} - -// GetInputAmountOk returns a tuple with the InputAmount field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetInputAmountOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.InputAmount, true -} - -// SetInputAmount sets field value -func (o *OwnHTLCRequest) SetInputAmount(v float32) { - o.InputAmount = v -} - -// GetOutputAmount returns the OutputAmount field value -func (o *OwnHTLCRequest) GetOutputAmount() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.OutputAmount -} - -// GetOutputAmountOk returns a tuple with the OutputAmount field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetOutputAmountOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.OutputAmount, true -} - -// SetOutputAmount sets field value -func (o *OwnHTLCRequest) SetOutputAmount(v float32) { - o.OutputAmount = v -} - -// GetExpiration returns the Expiration field value -func (o *OwnHTLCRequest) GetExpiration() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Expiration -} - -// GetExpirationOk returns a tuple with the Expiration field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetExpirationOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Expiration, true -} - -// SetExpiration sets field value -func (o *OwnHTLCRequest) SetExpiration(v float32) { - o.Expiration = v -} - -// GetHashLock returns the HashLock field value -func (o *OwnHTLCRequest) GetHashLock() string { - if o == nil { - var ret string - return ret - } - - return o.HashLock -} - -// GetHashLockOk returns a tuple with the HashLock field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetHashLockOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashLock, true -} - -// SetHashLock sets field value -func (o *OwnHTLCRequest) SetHashLock(v string) { - o.HashLock = v -} - -// GetTokenAddress returns the TokenAddress field value -func (o *OwnHTLCRequest) GetTokenAddress() string { - if o == nil { - var ret string - return ret - } - - return o.TokenAddress -} - -// GetTokenAddressOk returns a tuple with the TokenAddress field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetTokenAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TokenAddress, true -} - -// SetTokenAddress sets field value -func (o *OwnHTLCRequest) SetTokenAddress(v string) { - o.TokenAddress = v -} - -// GetReceiver returns the Receiver field value -func (o *OwnHTLCRequest) GetReceiver() string { - if o == nil { - var ret string - return ret - } - - return o.Receiver -} - -// GetReceiverOk returns a tuple with the Receiver field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetReceiverOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Receiver, true -} - -// SetReceiver sets field value -func (o *OwnHTLCRequest) SetReceiver(v string) { - o.Receiver = v -} - -// GetOutputNetwork returns the OutputNetwork field value -func (o *OwnHTLCRequest) GetOutputNetwork() string { - if o == nil { - var ret string - return ret - } - - return o.OutputNetwork -} - -// GetOutputNetworkOk returns a tuple with the OutputNetwork field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetOutputNetworkOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OutputNetwork, true -} - -// SetOutputNetwork sets field value -func (o *OwnHTLCRequest) SetOutputNetwork(v string) { - o.OutputNetwork = v -} - -// GetOutputAddress returns the OutputAddress field value -func (o *OwnHTLCRequest) GetOutputAddress() string { - if o == nil { - var ret string - return ret - } - - return o.OutputAddress -} - -// GetOutputAddressOk returns a tuple with the OutputAddress field value -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetOutputAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OutputAddress, true -} - -// SetOutputAddress sets field value -func (o *OwnHTLCRequest) SetOutputAddress(v string) { - o.OutputAddress = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *OwnHTLCRequest) GetGas() float32 { - if o == nil || IsNil(o.Gas) { - var ret float32 - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OwnHTLCRequest) GetGasOk() (*float32, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *OwnHTLCRequest) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given float32 and assigns it to the Gas field. -func (o *OwnHTLCRequest) SetGas(v float32) { - o.Gas = &v -} - -func (o OwnHTLCRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OwnHTLCRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["htlcPackage"] = o.HtlcPackage - toSerialize["connectorInstanceId"] = o.ConnectorInstanceId - toSerialize["keychainId"] = o.KeychainId - toSerialize["constructorArgs"] = o.ConstructorArgs - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["inputAmount"] = o.InputAmount - toSerialize["outputAmount"] = o.OutputAmount - toSerialize["expiration"] = o.Expiration - toSerialize["hashLock"] = o.HashLock - toSerialize["tokenAddress"] = o.TokenAddress - toSerialize["receiver"] = o.Receiver - toSerialize["outputNetwork"] = o.OutputNetwork - toSerialize["outputAddress"] = o.OutputAddress - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableOwnHTLCRequest struct { - value *OwnHTLCRequest - isSet bool -} - -func (v NullableOwnHTLCRequest) Get() *OwnHTLCRequest { - return v.value -} - -func (v *NullableOwnHTLCRequest) Set(val *OwnHTLCRequest) { - v.value = val - v.isSet = true -} - -func (v NullableOwnHTLCRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableOwnHTLCRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOwnHTLCRequest(val *OwnHTLCRequest) *NullableOwnHTLCRequest { - return &NullableOwnHTLCRequest{value: val, isSet: true} -} - -func (v NullableOwnHTLCRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOwnHTLCRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go deleted file mode 100644 index 632581d3ac..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredential - struct for Web3SigningCredential -type Web3SigningCredential struct { - Web3SigningCredentialCactusKeychainRef *Web3SigningCredentialCactusKeychainRef - Web3SigningCredentialNone *Web3SigningCredentialNone - Web3SigningCredentialPrivateKeyHex *Web3SigningCredentialPrivateKeyHex -} - -// Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialCactusKeychainRef wrapped in Web3SigningCredential -func Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential(v *Web3SigningCredentialCactusKeychainRef) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialCactusKeychainRef: v, - } -} - -// Web3SigningCredentialNoneAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialNone wrapped in Web3SigningCredential -func Web3SigningCredentialNoneAsWeb3SigningCredential(v *Web3SigningCredentialNone) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialNone: v, - } -} - -// Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialPrivateKeyHex wrapped in Web3SigningCredential -func Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential(v *Web3SigningCredentialPrivateKeyHex) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialPrivateKeyHex: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *Web3SigningCredential) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Web3SigningCredentialCactusKeychainRef - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialCactusKeychainRef) - if err == nil { - jsonWeb3SigningCredentialCactusKeychainRef, _ := json.Marshal(dst.Web3SigningCredentialCactusKeychainRef) - if string(jsonWeb3SigningCredentialCactusKeychainRef) == "{}" { // empty struct - dst.Web3SigningCredentialCactusKeychainRef = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialCactusKeychainRef = nil - } - - // try to unmarshal data into Web3SigningCredentialNone - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialNone) - if err == nil { - jsonWeb3SigningCredentialNone, _ := json.Marshal(dst.Web3SigningCredentialNone) - if string(jsonWeb3SigningCredentialNone) == "{}" { // empty struct - dst.Web3SigningCredentialNone = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialNone = nil - } - - // try to unmarshal data into Web3SigningCredentialPrivateKeyHex - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialPrivateKeyHex) - if err == nil { - jsonWeb3SigningCredentialPrivateKeyHex, _ := json.Marshal(dst.Web3SigningCredentialPrivateKeyHex) - if string(jsonWeb3SigningCredentialPrivateKeyHex) == "{}" { // empty struct - dst.Web3SigningCredentialPrivateKeyHex = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialPrivateKeyHex = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Web3SigningCredentialCactusKeychainRef = nil - dst.Web3SigningCredentialNone = nil - dst.Web3SigningCredentialPrivateKeyHex = nil - - return fmt.Errorf("data matches more than one schema in oneOf(Web3SigningCredential)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(Web3SigningCredential)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src Web3SigningCredential) MarshalJSON() ([]byte, error) { - if src.Web3SigningCredentialCactusKeychainRef != nil { - return json.Marshal(&src.Web3SigningCredentialCactusKeychainRef) - } - - if src.Web3SigningCredentialNone != nil { - return json.Marshal(&src.Web3SigningCredentialNone) - } - - if src.Web3SigningCredentialPrivateKeyHex != nil { - return json.Marshal(&src.Web3SigningCredentialPrivateKeyHex) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *Web3SigningCredential) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Web3SigningCredentialCactusKeychainRef != nil { - return obj.Web3SigningCredentialCactusKeychainRef - } - - if obj.Web3SigningCredentialNone != nil { - return obj.Web3SigningCredentialNone - } - - if obj.Web3SigningCredentialPrivateKeyHex != nil { - return obj.Web3SigningCredentialPrivateKeyHex - } - - // all schemas are nil - return nil -} - -type NullableWeb3SigningCredential struct { - value *Web3SigningCredential - isSet bool -} - -func (v NullableWeb3SigningCredential) Get() *Web3SigningCredential { - return v.value -} - -func (v *NullableWeb3SigningCredential) Set(val *Web3SigningCredential) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredential) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredential) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredential(val *Web3SigningCredential) *NullableWeb3SigningCredential { - return &NullableWeb3SigningCredential{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredential) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredential) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go deleted file mode 100644 index d3fa6e569d..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialCactusKeychainRef type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialCactusKeychainRef{} - -// Web3SigningCredentialCactusKeychainRef struct for Web3SigningCredentialCactusKeychainRef -type Web3SigningCredentialCactusKeychainRef struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - KeychainEntryKey string `json:"keychainEntryKey"` - // The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - KeychainId string `json:"keychainId"` -} - -// NewWeb3SigningCredentialCactusKeychainRef instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialCactusKeychainRef(type_ Web3SigningCredentialType, ethAccount string, keychainEntryKey string, keychainId string) *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - this.Type = type_ - this.EthAccount = ethAccount - this.KeychainEntryKey = keychainEntryKey - this.KeychainId = keychainId - return &this -} - -// NewWeb3SigningCredentialCactusKeychainRefWithDefaults instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialCactusKeychainRefWithDefaults() *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialCactusKeychainRef) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialCactusKeychainRef) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetKeychainEntryKey returns the KeychainEntryKey field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKey() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainEntryKey -} - -// GetKeychainEntryKeyOk returns a tuple with the KeychainEntryKey field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainEntryKey, true -} - -// SetKeychainEntryKey sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainEntryKey(v string) { - o.KeychainEntryKey = v -} - -// GetKeychainId returns the KeychainId field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o Web3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialCactusKeychainRef) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["keychainEntryKey"] = o.KeychainEntryKey - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableWeb3SigningCredentialCactusKeychainRef struct { - value *Web3SigningCredentialCactusKeychainRef - isSet bool -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) Get() *Web3SigningCredentialCactusKeychainRef { - return v.value -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Set(val *Web3SigningCredentialCactusKeychainRef) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialCactusKeychainRef(val *Web3SigningCredentialCactusKeychainRef) *NullableWeb3SigningCredentialCactusKeychainRef { - return &NullableWeb3SigningCredentialCactusKeychainRef{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go deleted file mode 100644 index bf0b8460ca..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialNone type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialNone{} - -// Web3SigningCredentialNone Using this denotes that there is no signing required because the transaction is pre-signed. -type Web3SigningCredentialNone struct { - Type Web3SigningCredentialType `json:"type"` -} - -// NewWeb3SigningCredentialNone instantiates a new Web3SigningCredentialNone object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialNone(type_ Web3SigningCredentialType) *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - this.Type = type_ - return &this -} - -// NewWeb3SigningCredentialNoneWithDefaults instantiates a new Web3SigningCredentialNone object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialNoneWithDefaults() *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialNone) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialNone) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialNone) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -func (o Web3SigningCredentialNone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialNone) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableWeb3SigningCredentialNone struct { - value *Web3SigningCredentialNone - isSet bool -} - -func (v NullableWeb3SigningCredentialNone) Get() *Web3SigningCredentialNone { - return v.value -} - -func (v *NullableWeb3SigningCredentialNone) Set(val *Web3SigningCredentialNone) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialNone) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialNone) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialNone(val *Web3SigningCredentialNone) *NullableWeb3SigningCredentialNone { - return &NullableWeb3SigningCredentialNone{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialNone) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialNone) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go deleted file mode 100644 index 863e397bb0..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialPrivateKeyHex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialPrivateKeyHex{} - -// Web3SigningCredentialPrivateKeyHex struct for Web3SigningCredentialPrivateKeyHex -type Web3SigningCredentialPrivateKeyHex struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The HEX encoded private key of an eth account. - Secret string `json:"secret"` -} - -// NewWeb3SigningCredentialPrivateKeyHex instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialPrivateKeyHex(type_ Web3SigningCredentialType, ethAccount string, secret string) *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - this.Type = type_ - this.EthAccount = ethAccount - this.Secret = secret - return &this -} - -// NewWeb3SigningCredentialPrivateKeyHexWithDefaults instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialPrivateKeyHexWithDefaults() *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialPrivateKeyHex) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetSecret returns the Secret field value -func (o *Web3SigningCredentialPrivateKeyHex) GetSecret() string { - if o == nil { - var ret string - return ret - } - - return o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetSecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Secret, true -} - -// SetSecret sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetSecret(v string) { - o.Secret = v -} - -func (o Web3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialPrivateKeyHex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["secret"] = o.Secret - return toSerialize, nil -} - -type NullableWeb3SigningCredentialPrivateKeyHex struct { - value *Web3SigningCredentialPrivateKeyHex - isSet bool -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) Get() *Web3SigningCredentialPrivateKeyHex { - return v.value -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Set(val *Web3SigningCredentialPrivateKeyHex) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialPrivateKeyHex(val *Web3SigningCredentialPrivateKeyHex) *NullableWeb3SigningCredentialPrivateKeyHex { - return &NullableWeb3SigningCredentialPrivateKeyHex{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go deleted file mode 100644 index b2c213a0b6..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredentialType the model 'Web3SigningCredentialType' -type Web3SigningCredentialType string - -// List of Web3SigningCredentialType -const ( - CACTUS_KEYCHAIN_REF Web3SigningCredentialType = "CACTUS_KEYCHAIN_REF" - GETH_KEYCHAIN_PASSWORD Web3SigningCredentialType = "GETH_KEYCHAIN_PASSWORD" - PRIVATE_KEY_HEX Web3SigningCredentialType = "PRIVATE_KEY_HEX" - NONE Web3SigningCredentialType = "NONE" -) - -// All allowed values of Web3SigningCredentialType enum -var AllowedWeb3SigningCredentialTypeEnumValues = []Web3SigningCredentialType{ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE", -} - -func (v *Web3SigningCredentialType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := Web3SigningCredentialType(value) - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Web3SigningCredentialType", value) -} - -// NewWeb3SigningCredentialTypeFromValue returns a pointer to a valid Web3SigningCredentialType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWeb3SigningCredentialTypeFromValue(v string) (*Web3SigningCredentialType, error) { - ev := Web3SigningCredentialType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Web3SigningCredentialType: valid values are %v", v, AllowedWeb3SigningCredentialTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v Web3SigningCredentialType) IsValid() bool { - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to Web3SigningCredentialType value -func (v Web3SigningCredentialType) Ptr() *Web3SigningCredentialType { - return &v -} - -type NullableWeb3SigningCredentialType struct { - value *Web3SigningCredentialType - isSet bool -} - -func (v NullableWeb3SigningCredentialType) Get() *Web3SigningCredentialType { - return v.value -} - -func (v *NullableWeb3SigningCredentialType) Set(val *Web3SigningCredentialType) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialType) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialType(val *Web3SigningCredentialType) *NullableWeb3SigningCredentialType { - return &NullableWeb3SigningCredentialType{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_withdraw_counterparty_request.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_withdraw_counterparty_request.go deleted file mode 100644 index 4537d90955..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/model_withdraw_counterparty_request.go +++ /dev/null @@ -1,329 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "encoding/json" -) - -// checks if the WithdrawCounterpartyRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WithdrawCounterpartyRequest{} - -// WithdrawCounterpartyRequest struct for WithdrawCounterpartyRequest -type WithdrawCounterpartyRequest struct { - HtlcPackage HtlcPackage `json:"htlcPackage"` - // connector Instance Id for the connector plugin - ConnectorInstanceId string `json:"connectorInstanceId"` - // keychainId for the keychain plugin - KeychainId string `json:"keychainId"` - // contractId for the contract - ContractId *string `json:"contractId,omitempty"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // Id for the HTLC - HtlcId string `json:"htlcId"` - // Counterparty HTLC secret - Secret string `json:"secret"` - Gas *float32 `json:"gas,omitempty"` -} - -// NewWithdrawCounterpartyRequest instantiates a new WithdrawCounterpartyRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWithdrawCounterpartyRequest(htlcPackage HtlcPackage, connectorInstanceId string, keychainId string, web3SigningCredential Web3SigningCredential, htlcId string, secret string) *WithdrawCounterpartyRequest { - this := WithdrawCounterpartyRequest{} - this.HtlcPackage = htlcPackage - this.ConnectorInstanceId = connectorInstanceId - this.KeychainId = keychainId - this.Web3SigningCredential = web3SigningCredential - this.HtlcId = htlcId - this.Secret = secret - return &this -} - -// NewWithdrawCounterpartyRequestWithDefaults instantiates a new WithdrawCounterpartyRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWithdrawCounterpartyRequestWithDefaults() *WithdrawCounterpartyRequest { - this := WithdrawCounterpartyRequest{} - return &this -} - -// GetHtlcPackage returns the HtlcPackage field value -func (o *WithdrawCounterpartyRequest) GetHtlcPackage() HtlcPackage { - if o == nil { - var ret HtlcPackage - return ret - } - - return o.HtlcPackage -} - -// GetHtlcPackageOk returns a tuple with the HtlcPackage field value -// and a boolean to check if the value has been set. -func (o *WithdrawCounterpartyRequest) GetHtlcPackageOk() (*HtlcPackage, bool) { - if o == nil { - return nil, false - } - return &o.HtlcPackage, true -} - -// SetHtlcPackage sets field value -func (o *WithdrawCounterpartyRequest) SetHtlcPackage(v HtlcPackage) { - o.HtlcPackage = v -} - -// GetConnectorInstanceId returns the ConnectorInstanceId field value -func (o *WithdrawCounterpartyRequest) GetConnectorInstanceId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorInstanceId -} - -// GetConnectorInstanceIdOk returns a tuple with the ConnectorInstanceId field value -// and a boolean to check if the value has been set. -func (o *WithdrawCounterpartyRequest) GetConnectorInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorInstanceId, true -} - -// SetConnectorInstanceId sets field value -func (o *WithdrawCounterpartyRequest) SetConnectorInstanceId(v string) { - o.ConnectorInstanceId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *WithdrawCounterpartyRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *WithdrawCounterpartyRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *WithdrawCounterpartyRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetContractId returns the ContractId field value if set, zero value otherwise. -func (o *WithdrawCounterpartyRequest) GetContractId() string { - if o == nil || IsNil(o.ContractId) { - var ret string - return ret - } - return *o.ContractId -} - -// GetContractIdOk returns a tuple with the ContractId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WithdrawCounterpartyRequest) GetContractIdOk() (*string, bool) { - if o == nil || IsNil(o.ContractId) { - return nil, false - } - return o.ContractId, true -} - -// HasContractId returns a boolean if a field has been set. -func (o *WithdrawCounterpartyRequest) HasContractId() bool { - if o != nil && !IsNil(o.ContractId) { - return true - } - - return false -} - -// SetContractId gets a reference to the given string and assigns it to the ContractId field. -func (o *WithdrawCounterpartyRequest) SetContractId(v string) { - o.ContractId = &v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *WithdrawCounterpartyRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *WithdrawCounterpartyRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *WithdrawCounterpartyRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetHtlcId returns the HtlcId field value -func (o *WithdrawCounterpartyRequest) GetHtlcId() string { - if o == nil { - var ret string - return ret - } - - return o.HtlcId -} - -// GetHtlcIdOk returns a tuple with the HtlcId field value -// and a boolean to check if the value has been set. -func (o *WithdrawCounterpartyRequest) GetHtlcIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HtlcId, true -} - -// SetHtlcId sets field value -func (o *WithdrawCounterpartyRequest) SetHtlcId(v string) { - o.HtlcId = v -} - -// GetSecret returns the Secret field value -func (o *WithdrawCounterpartyRequest) GetSecret() string { - if o == nil { - var ret string - return ret - } - - return o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -func (o *WithdrawCounterpartyRequest) GetSecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Secret, true -} - -// SetSecret sets field value -func (o *WithdrawCounterpartyRequest) SetSecret(v string) { - o.Secret = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *WithdrawCounterpartyRequest) GetGas() float32 { - if o == nil || IsNil(o.Gas) { - var ret float32 - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WithdrawCounterpartyRequest) GetGasOk() (*float32, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *WithdrawCounterpartyRequest) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given float32 and assigns it to the Gas field. -func (o *WithdrawCounterpartyRequest) SetGas(v float32) { - o.Gas = &v -} - -func (o WithdrawCounterpartyRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WithdrawCounterpartyRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["htlcPackage"] = o.HtlcPackage - toSerialize["connectorInstanceId"] = o.ConnectorInstanceId - toSerialize["keychainId"] = o.KeychainId - if !IsNil(o.ContractId) { - toSerialize["contractId"] = o.ContractId - } - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["htlcId"] = o.HtlcId - toSerialize["secret"] = o.Secret - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableWithdrawCounterpartyRequest struct { - value *WithdrawCounterpartyRequest - isSet bool -} - -func (v NullableWithdrawCounterpartyRequest) Get() *WithdrawCounterpartyRequest { - return v.value -} - -func (v *NullableWithdrawCounterpartyRequest) Set(val *WithdrawCounterpartyRequest) { - v.value = val - v.isSet = true -} - -func (v NullableWithdrawCounterpartyRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableWithdrawCounterpartyRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWithdrawCounterpartyRequest(val *WithdrawCounterpartyRequest) *NullableWithdrawCounterpartyRequest { - return &NullableWithdrawCounterpartyRequest{value: val, isSet: true} -} - -func (v NullableWithdrawCounterpartyRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWithdrawCounterpartyRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/response.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 0154c9333b..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/test/api_default_test.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 99a47e3316..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-htlc-coordinator-besu - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-htlc-coordinator-besu_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService CounterpartyHtlcV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.CounterpartyHtlcV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService OwnHtlcV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.OwnHtlcV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService WithdrawCounterpartyV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.WithdrawCounterpartyV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/utils.go b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 9a7ac30e24..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC Coordinator - -Can exchange assets between networks - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-coordinator-besu - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/json/openapi.json b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/json/openapi.json deleted file mode 100644 index 56447a1c24..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/json/openapi.json +++ /dev/null @@ -1,403 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - HTLC Coordinator", - "description": "Can exchange assets between networks", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "servers": [ - { - "url": "https://www.cactus.stream/{basePath}", - "description": "Public test instance", - "variables": { - "basePath": { - "default": "" - } - } - }, - { - "url": "http://localhost:4000/{basePath}", - "description": "Local test instance", - "variables": { - "basePath": { - "default": "" - } - } - } - ], - "components": { - "schemas": { - "OwnHTLCRequest": { - "type": "object", - "required": [ - "htlcPackage", - "connectorInstanceId", - "keychainId", - "constructorArgs", - "web3SigningCredential", - "inputAmount", - "outputAmount", - "expiration", - "hashLock", - "tokenAddress", - "receiver", - "outputNetwork", - "outputAddress" - ], - "properties": { - "htlcPackage": { - "$ref": "#/components/schemas/HtlcPackage" - }, - "connectorInstanceId": { - "description": "connector Instance Id for the connector plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "description": "Web3SigningCredential", - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "inputAmount": { - "description": "Input amount to lock", - "type": "number", - "nullable": false - }, - "outputAmount": { - "description": "Output amount to lock", - "type": "number", - "nullable": false - }, - "expiration": { - "description": "Timestamp to expire the contract", - "type": "number", - "nullable": false - }, - "hashLock": { - "description": "Hashlock needed to refund the amount", - "type": "string", - "nullable": false - }, - "tokenAddress": { - "description": "The token address", - "type": "string", - "nullable": false - }, - "receiver": { - "description": "The receiver address", - "type": "string", - "nullable": false - }, - "outputNetwork": { - "description": "The output network id", - "type": "string", - "nullable": false - }, - "outputAddress": { - "description": "The output addreess to receive the tokens", - "type": "string", - "nullable": false - }, - "gas": { - "type": "number" - } - } - }, - "CounterpartyHTLCRequest": { - "type": "object", - "required": [ - "htlcPackage", - "connectorInstanceId", - "keychainId", - "htlcId", - "web3SigningCredential" - ], - "properties": { - "htlcPackage": { - "$ref": "#/components/schemas/HtlcPackage" - }, - "connectorInstanceId": { - "description": "connector Instance Id for the connector plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "htlcId": { - "description": "Id for the HTLC", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredential", - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "gas": { - "type": "number" - } - } - }, - "WithdrawCounterpartyRequest": { - "type": "object", - "required": [ - "htlcPackage", - "connectorInstanceId", - "keychainId", - "web3SigningCredential", - "htlcId", - "secret" - ], - "properties": { - "htlcPackage": { - "$ref": "#/components/schemas/HtlcPackage" - }, - "connectorInstanceId": { - "description": "connector Instance Id for the connector plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "contractId": { - "description": "contractId for the contract", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredential", - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "htlcId": { - "description": "Id for the HTLC", - "type": "string", - "nullable": false - }, - "secret": { - "description": "Counterparty HTLC secret", - "type": "string", - "nullable": false - }, - "gas": { - "type": "number" - } - } - }, - "HtlcPackage": { - "type": "string", - "enum": ["BESU", "BESU_ERC20"] - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": [ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE" - ] - }, - "Web3SigningCredentialCactusKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainId", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialPrivateKeyHex": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "secret": { - "type": "string", - "description": "The HEX encoded private key of an eth account.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialCactusKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialPrivateKeyHex" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/own-htlc": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/own-htlc" - } - }, - "operationId": "ownHtlcV1", - "summary": "Create an instance to interact with the own HTLC.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OwnHTLCRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/counterparty-htlc": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/counterparty-htlc" - } - }, - "operationId": "counterpartyHtlcV1", - "summary": "Create an instance to interact with the counterparty HTLC", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CounterpartyHTLCRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/withdraw-counterparty": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/withdraw-counterparty" - } - }, - "operationId": "withdrawCounterpartyV1", - "summary": "Withdraw funds of the counterparty HTLC", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WithdrawCounterpartyRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - } - } -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/json/openapi.tpl.json b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/json/openapi.tpl.json deleted file mode 100644 index a9aa85e8cc..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,311 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - HTLC Coordinator", - "description": "Can exchange assets between networks", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "servers": [ - { - "url": "https://www.cactus.stream/{basePath}", - "description": "Public test instance", - "variables": { - "basePath": { - "default": "" - } - } - }, - { - "url": "http://localhost:4000/{basePath}", - "description": "Local test instance", - "variables": { - "basePath": { - "default": "" - } - } - } - ], - "components": { - "schemas": { - "OwnHTLCRequest": { - "type": "object", - "required": [ - "htlcPackage", - "connectorInstanceId", - "keychainId", - "constructorArgs", - "web3SigningCredential", - "inputAmount", - "outputAmount", - "expiration", - "hashLock", - "tokenAddress", - "receiver", - "outputNetwork", - "outputAddress" - ], - "properties": { - "htlcPackage": { - "$ref": "#/components/schemas/HtlcPackage" - }, - "connectorInstanceId": { - "description": "connector Instance Id for the connector plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "description": "Web3SigningCredential", - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "inputAmount": { - "description": "Input amount to lock", - "type": "number", - "nullable": false - }, - "outputAmount": { - "description": "Output amount to lock", - "type": "number", - "nullable": false - }, - "expiration": { - "description": "Timestamp to expire the contract", - "type": "number", - "nullable": false - }, - "hashLock": { - "description": "Hashlock needed to refund the amount", - "type": "string", - "nullable": false - }, - "tokenAddress": { - "description": "The token address", - "type": "string", - "nullable": false - }, - "receiver": { - "description": "The receiver address", - "type": "string", - "nullable": false - }, - "outputNetwork": { - "description": "The output network id", - "type": "string", - "nullable": false - }, - "outputAddress": { - "description": "The output addreess to receive the tokens", - "type": "string", - "nullable": false - }, - "gas": { - "type": "number" - } - } - }, - "CounterpartyHTLCRequest": { - "type": "object", - "required": [ - "htlcPackage", - "connectorInstanceId", - "keychainId", - "htlcId", - "web3SigningCredential" - ], - "properties": { - "htlcPackage": { - "$ref": "#/components/schemas/HtlcPackage" - }, - "connectorInstanceId": { - "description": "connector Instance Id for the connector plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "htlcId": { - "description": "Id for the HTLC", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredential", - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "gas": { - "type": "number" - } - } - }, - "WithdrawCounterpartyRequest": { - "type": "object", - "required": [ - "htlcPackage", - "connectorInstanceId", - "keychainId", - "web3SigningCredential", - "htlcId", - "secret" - ], - "properties": { - "htlcPackage": { - "$ref": "#/components/schemas/HtlcPackage" - }, - "connectorInstanceId": { - "description": "connector Instance Id for the connector plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "contractId": { - "description": "contractId for the contract", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredential", - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "htlcId": { - "description": "Id for the HTLC", - "type": "string", - "nullable": false - }, - "secret": { - "description": "Counterparty HTLC secret", - "type": "string", - "nullable": false - }, - "gas": { - "type": "number" - } - } - }, - "HtlcPackage": { - "type": "string", - "enum": ["BESU", "BESU_ERC20"] - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/own-htlc": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/own-htlc" - } - }, - "operationId": "ownHtlcV1", - "summary": "Create an instance to interact with the own HTLC.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OwnHTLCRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/counterparty-htlc": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/counterparty-htlc" - } - }, - "operationId": "counterpartyHtlcV1", - "summary": "Create an instance to interact with the counterparty HTLC", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CounterpartyHTLCRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/withdraw-counterparty": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/withdraw-counterparty" - } - }, - "operationId": "withdrawCounterpartyV1", - "summary": "Withdraw funds of the counterparty HTLC", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WithdrawCounterpartyRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - } - } -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 6817542179..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,571 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC Coordinator - * Can exchange assets between networks - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface CounterpartyHTLCRequest - */ -export interface CounterpartyHTLCRequest { - /** - * - * @type {HtlcPackage} - * @memberof CounterpartyHTLCRequest - */ - 'htlcPackage': HtlcPackage; - /** - * connector Instance Id for the connector plugin - * @type {string} - * @memberof CounterpartyHTLCRequest - */ - 'connectorInstanceId': string; - /** - * keychainId for the keychain plugin - * @type {string} - * @memberof CounterpartyHTLCRequest - */ - 'keychainId': string; - /** - * Id for the HTLC - * @type {string} - * @memberof CounterpartyHTLCRequest - */ - 'htlcId': string; - /** - * - * @type {Web3SigningCredential} - * @memberof CounterpartyHTLCRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {number} - * @memberof CounterpartyHTLCRequest - */ - 'gas'?: number; -} - - -/** - * - * @export - * @enum {string} - */ - -export const HtlcPackage = { - Besu: 'BESU', - BesuErc20: 'BESU_ERC20' -} as const; - -export type HtlcPackage = typeof HtlcPackage[keyof typeof HtlcPackage]; - - -/** - * - * @export - * @interface OwnHTLCRequest - */ -export interface OwnHTLCRequest { - /** - * - * @type {HtlcPackage} - * @memberof OwnHTLCRequest - */ - 'htlcPackage': HtlcPackage; - /** - * connector Instance Id for the connector plugin - * @type {string} - * @memberof OwnHTLCRequest - */ - 'connectorInstanceId': string; - /** - * keychainId for the keychain plugin - * @type {string} - * @memberof OwnHTLCRequest - */ - 'keychainId': string; - /** - * - * @type {Array} - * @memberof OwnHTLCRequest - */ - 'constructorArgs': Array; - /** - * - * @type {Web3SigningCredential} - * @memberof OwnHTLCRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * Input amount to lock - * @type {number} - * @memberof OwnHTLCRequest - */ - 'inputAmount': number; - /** - * Output amount to lock - * @type {number} - * @memberof OwnHTLCRequest - */ - 'outputAmount': number; - /** - * Timestamp to expire the contract - * @type {number} - * @memberof OwnHTLCRequest - */ - 'expiration': number; - /** - * Hashlock needed to refund the amount - * @type {string} - * @memberof OwnHTLCRequest - */ - 'hashLock': string; - /** - * The token address - * @type {string} - * @memberof OwnHTLCRequest - */ - 'tokenAddress': string; - /** - * The receiver address - * @type {string} - * @memberof OwnHTLCRequest - */ - 'receiver': string; - /** - * The output network id - * @type {string} - * @memberof OwnHTLCRequest - */ - 'outputNetwork': string; - /** - * The output addreess to receive the tokens - * @type {string} - * @memberof OwnHTLCRequest - */ - 'outputAddress': string; - /** - * - * @type {number} - * @memberof OwnHTLCRequest - */ - 'gas'?: number; -} - - -/** - * @type Web3SigningCredential - * @export - */ -export type Web3SigningCredential = Web3SigningCredentialCactusKeychainRef | Web3SigningCredentialNone | Web3SigningCredentialPrivateKeyHex; - -/** - * - * @export - * @interface Web3SigningCredentialCactusKeychainRef - */ -export interface Web3SigningCredentialCactusKeychainRef { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'ethAccount': string; - /** - * The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainEntryKey': string; - /** - * The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainId': string; -} - - -/** - * Using this denotes that there is no signing required because the transaction is pre-signed. - * @export - * @interface Web3SigningCredentialNone - */ -export interface Web3SigningCredentialNone { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialNone - */ - 'type': Web3SigningCredentialType; -} - - -/** - * - * @export - * @interface Web3SigningCredentialPrivateKeyHex - */ -export interface Web3SigningCredentialPrivateKeyHex { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'ethAccount': string; - /** - * The HEX encoded private key of an eth account. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'secret': string; -} - - -/** - * - * @export - * @enum {string} - */ - -export const Web3SigningCredentialType = { - CactusKeychainRef: 'CACTUS_KEYCHAIN_REF', - GethKeychainPassword: 'GETH_KEYCHAIN_PASSWORD', - PrivateKeyHex: 'PRIVATE_KEY_HEX', - None: 'NONE' -} as const; - -export type Web3SigningCredentialType = typeof Web3SigningCredentialType[keyof typeof Web3SigningCredentialType]; - - -/** - * - * @export - * @interface WithdrawCounterpartyRequest - */ -export interface WithdrawCounterpartyRequest { - /** - * - * @type {HtlcPackage} - * @memberof WithdrawCounterpartyRequest - */ - 'htlcPackage': HtlcPackage; - /** - * connector Instance Id for the connector plugin - * @type {string} - * @memberof WithdrawCounterpartyRequest - */ - 'connectorInstanceId': string; - /** - * keychainId for the keychain plugin - * @type {string} - * @memberof WithdrawCounterpartyRequest - */ - 'keychainId': string; - /** - * contractId for the contract - * @type {string} - * @memberof WithdrawCounterpartyRequest - */ - 'contractId'?: string; - /** - * - * @type {Web3SigningCredential} - * @memberof WithdrawCounterpartyRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * Id for the HTLC - * @type {string} - * @memberof WithdrawCounterpartyRequest - */ - 'htlcId': string; - /** - * Counterparty HTLC secret - * @type {string} - * @memberof WithdrawCounterpartyRequest - */ - 'secret': string; - /** - * - * @type {number} - * @memberof WithdrawCounterpartyRequest - */ - 'gas'?: number; -} - - - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Create an instance to interact with the counterparty HTLC - * @param {CounterpartyHTLCRequest} [counterpartyHTLCRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - counterpartyHtlcV1: async (counterpartyHTLCRequest?: CounterpartyHTLCRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/counterparty-htlc`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(counterpartyHTLCRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Create an instance to interact with the own HTLC. - * @param {OwnHTLCRequest} [ownHTLCRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - ownHtlcV1: async (ownHTLCRequest?: OwnHTLCRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/own-htlc`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(ownHTLCRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Withdraw funds of the counterparty HTLC - * @param {WithdrawCounterpartyRequest} [withdrawCounterpartyRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - withdrawCounterpartyV1: async (withdrawCounterpartyRequest?: WithdrawCounterpartyRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/withdraw-counterparty`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(withdrawCounterpartyRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Create an instance to interact with the counterparty HTLC - * @param {CounterpartyHTLCRequest} [counterpartyHTLCRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async counterpartyHtlcV1(counterpartyHTLCRequest?: CounterpartyHTLCRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.counterpartyHtlcV1(counterpartyHTLCRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Create an instance to interact with the own HTLC. - * @param {OwnHTLCRequest} [ownHTLCRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async ownHtlcV1(ownHTLCRequest?: OwnHTLCRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.ownHtlcV1(ownHTLCRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Withdraw funds of the counterparty HTLC - * @param {WithdrawCounterpartyRequest} [withdrawCounterpartyRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async withdrawCounterpartyV1(withdrawCounterpartyRequest?: WithdrawCounterpartyRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.withdrawCounterpartyV1(withdrawCounterpartyRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Create an instance to interact with the counterparty HTLC - * @param {CounterpartyHTLCRequest} [counterpartyHTLCRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - counterpartyHtlcV1(counterpartyHTLCRequest?: CounterpartyHTLCRequest, options?: any): AxiosPromise { - return localVarFp.counterpartyHtlcV1(counterpartyHTLCRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Create an instance to interact with the own HTLC. - * @param {OwnHTLCRequest} [ownHTLCRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - ownHtlcV1(ownHTLCRequest?: OwnHTLCRequest, options?: any): AxiosPromise { - return localVarFp.ownHtlcV1(ownHTLCRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Withdraw funds of the counterparty HTLC - * @param {WithdrawCounterpartyRequest} [withdrawCounterpartyRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - withdrawCounterpartyV1(withdrawCounterpartyRequest?: WithdrawCounterpartyRequest, options?: any): AxiosPromise { - return localVarFp.withdrawCounterpartyV1(withdrawCounterpartyRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Create an instance to interact with the counterparty HTLC - * @param {CounterpartyHTLCRequest} [counterpartyHTLCRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public counterpartyHtlcV1(counterpartyHTLCRequest?: CounterpartyHTLCRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).counterpartyHtlcV1(counterpartyHTLCRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Create an instance to interact with the own HTLC. - * @param {OwnHTLCRequest} [ownHTLCRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public ownHtlcV1(ownHTLCRequest?: OwnHTLCRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).ownHtlcV1(ownHTLCRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Withdraw funds of the counterparty HTLC - * @param {WithdrawCounterpartyRequest} [withdrawCounterpartyRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public withdrawCounterpartyV1(withdrawCounterpartyRequest?: WithdrawCounterpartyRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).withdrawCounterpartyV1(withdrawCounterpartyRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/base.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 040b40a505..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC Coordinator - * Can exchange assets between networks - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "https://www.cactus.stream".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/common.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index bcc3999837..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC Coordinator - * Can exchange assets between networks - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index ecea7859b5..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC Coordinator - * Can exchange assets between networks - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/index.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 9fbab3e5d9..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC Coordinator - * Can exchange assets between networks - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/index.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/index.web.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/index.web.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/plugin-factory-htlc-coordinator-besu.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/plugin-factory-htlc-coordinator-besu.ts deleted file mode 100644 index ba3ace3ea6..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/plugin-factory-htlc-coordinator-besu.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; - -import { - IPluginHTLCCoordinatorBesuOptions, - PluginHTLCCoordinatorBesu, -} from "./plugin-htlc-coordinator-besu"; - -export class PluginFactoryHTLCCoordinatorBesu extends PluginFactory< - PluginHTLCCoordinatorBesu, - IPluginHTLCCoordinatorBesuOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginHTLCCoordinatorBesuOptions, - ): Promise { - return new PluginHTLCCoordinatorBesu(pluginOptions); - } -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/plugin-htlc-coordinator-besu.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/plugin-htlc-coordinator-besu.ts deleted file mode 100644 index bee39645e9..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/plugin-htlc-coordinator-besu.ts +++ /dev/null @@ -1,373 +0,0 @@ -import { Server } from "http"; -import { Server as SecureServer } from "https"; -import { v4 as uuidv4 } from "uuid"; -import type { Express } from "express"; -import { promisify } from "util"; -import { Optional } from "typescript-optional"; -import { RuntimeError } from "run-time-error-cjs"; -import fastSafeStringify from "fast-safe-stringify"; -import OAS from "../json/openapi.json"; -import { - ICactusPlugin, - ICactusPluginOptions, - IPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - InitializeRequest as InitializeRequestBesuERC20, - NewContractRequest as NewContractRequestBesuERC20, - PluginHtlcEthBesuErc20, - WithdrawRequest as WithdrawRequestBesuERC20, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - InitializeRequest as InitializeRequestBesu, - NewContractObj, - InvokeContractV1Response, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - WithdrawReq, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { PluginLedgerConnectorBesu } from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { OwnHTLCEndpoint } from "./web-services/own-htlc-endpoint"; -import { CounterpartyHTLCEndpoint } from "./web-services/counterparty-htlc-endpoint"; -import { WithdrawCounterpartyEndpoint } from "./web-services/withdraw-counterparty-endpoint"; -import { - OwnHTLCRequest, - CounterpartyHTLCRequest, - WithdrawCounterpartyRequest, - HtlcPackage, -} from "./generated/openapi/typescript-axios"; - -export interface IPluginHTLCCoordinatorBesuOptions - extends ICactusPluginOptions { - pluginRegistry: PluginRegistry; - logLevel?: LogLevelDesc; -} - -export class PluginHTLCCoordinatorBesu - implements ICactusPlugin, IPluginWebService -{ - private readonly instanceId: string; - private readonly log: Logger; - private readonly pluginRegistry: PluginRegistry; - private endpoints: IWebServiceEndpoint[] | undefined; - private httpServer: Server | SecureServer | null = null; - - public static readonly CLASS_NAME = "PluginHTLCCoordinatorBesu"; - - public get className(): string { - return PluginHTLCCoordinatorBesu.CLASS_NAME; - } - - constructor(public readonly options: IPluginHTLCCoordinatorBesuOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy(options.pluginRegistry, `${fnTag} options.pluginRegistry`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = options.instanceId; - this.pluginRegistry = options.pluginRegistry; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public async onPluginInit(): Promise { - return; - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-htlc-coordinator-besu`; - } - - public getHttpServer(): Optional { - return Optional.ofNullable(this.httpServer); - } - - public async shutdown(): Promise { - const serverMaybe = this.getHttpServer(); - if (serverMaybe.isPresent()) { - const server = serverMaybe.get(); - await promisify(server.close.bind(server))(); - } - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new OwnHTLCEndpoint({ - pluginRegistry: this.pluginRegistry, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new CounterpartyHTLCEndpoint({ - pluginRegistry: this.pluginRegistry, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new WithdrawCounterpartyEndpoint({ - pluginRegistry: this.pluginRegistry, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - return endpoints; - } - - public async ownHTLC( - ownHTLCRequest: OwnHTLCRequest, - ): Promise { - const fnTag = `${this.className}#ownHTLC()`; - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == ownHTLCRequest.connectorInstanceId, - ) as PluginLedgerConnectorBesu; - - const keychainId = ownHTLCRequest.keychainId; - this.log.debug("Using keychain ID:", keychainId); - - const pluginRegistry = this.options.pluginRegistry; - // pluginRegistry.add(connector); - - switch (ownHTLCRequest.htlcPackage) { - case HtlcPackage.BesuErc20: { - const pluginHtlc = this.pluginRegistry.plugins.find((plugin) => { - return ( - plugin.getPackageName() == - "@hyperledger/cactus-plugin-htlc-eth-besu-erc20" /*&& - ((plugin as unknown) as PluginHtlcEthBesuErc20).getKeychainId() == - ownHTLCRequest.keychainId*/ - ); - }) as unknown as PluginHtlcEthBesuErc20; - const request: InitializeRequestBesuERC20 = { - connectorId: connector.getInstanceId(), - keychainId: ownHTLCRequest.keychainId, - constructorArgs: ownHTLCRequest.constructorArgs, - web3SigningCredential: ownHTLCRequest.web3SigningCredential, - gas: ownHTLCRequest.gas, - }; - const res = await pluginHtlc.initialize(request); - if ( - res.transactionReceipt?.status == true && - res.transactionReceipt?.contractAddress != undefined - ) { - const newContractRequest: NewContractRequestBesuERC20 = { - contractAddress: res.transactionReceipt?.contractAddress, - inputAmount: ownHTLCRequest.inputAmount, - outputAmount: ownHTLCRequest.outputAmount, - expiration: ownHTLCRequest.expiration, - hashLock: ownHTLCRequest.hashLock, - tokenAddress: ownHTLCRequest.tokenAddress, - receiver: ownHTLCRequest.receiver, - outputNetwork: ownHTLCRequest.outputNetwork, - outputAddress: ownHTLCRequest.outputAddress, - connectorId: connector.getInstanceId(), - keychainId: ownHTLCRequest.keychainId, - web3SigningCredential: ownHTLCRequest.web3SigningCredential, - gas: ownHTLCRequest.gas, - }; - const res2 = await pluginHtlc.newContract(newContractRequest); - return res2; - } - } - case HtlcPackage.Besu: { - const pluginOptions: IPluginHtlcEthBesuOptions = { - instanceId: uuidv4(), - pluginRegistry, - }; - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - const request: InitializeRequestBesu = { - connectorId: connector.getInstanceId(), - keychainId: ownHTLCRequest.keychainId, - constructorArgs: ownHTLCRequest.constructorArgs, - web3SigningCredential: ownHTLCRequest.web3SigningCredential, - gas: ownHTLCRequest.gas, - }; - const res = await pluginHtlc.initialize(request); - if ( - res.transactionReceipt?.status == true && - res.transactionReceipt?.contractAddress != undefined - ) { - const newContractRequest: NewContractObj = { - contractAddress: res.transactionReceipt?.contractAddress, - outputAmount: ownHTLCRequest.outputAmount, - expiration: ownHTLCRequest.expiration, - hashLock: ownHTLCRequest.hashLock, - receiver: ownHTLCRequest.receiver, - inputAmount: ownHTLCRequest.inputAmount, - outputNetwork: ownHTLCRequest.outputNetwork, - outputAddress: ownHTLCRequest.outputAddress, - connectorId: connector.getInstanceId(), - keychainId: ownHTLCRequest.keychainId, - web3SigningCredential: ownHTLCRequest.web3SigningCredential, - gas: ownHTLCRequest.gas, - }; - const res2 = await pluginHtlc.newContract(newContractRequest); - return res2; - } - } - default: { - throw new Error( - `${fnTag} Unrecognized HTLC Package: ` + - `${ownHTLCRequest.htlcPackage} Supported ones are: ` + - `${Object.values(HtlcPackage).join(";")}`, - ); - } - } - } - - public async counterpartyHTLC( - counterpartyHTLCRequest: CounterpartyHTLCRequest, - ): Promise { - const fnTag = `${this.className}#counterpartyHTLC()`; - const pluginRegistry = this.options.pluginRegistry; - - switch (counterpartyHTLCRequest.htlcPackage) { - case HtlcPackage.BesuErc20: { - const pluginHtlc = this.pluginRegistry.plugins.find((plugin) => { - return ( - plugin.getPackageName() == - "@hyperledger/cactus-plugin-htlc-eth-besu-erc20" /*&& - ((plugin as unknown) as PluginHtlcEthBesuErc20).getKeychainId() == - counterpartyHTLCRequest.keychainId*/ - ); - }) as unknown as PluginHtlcEthBesuErc20; - - const getSingleStatusReq = { - id: counterpartyHTLCRequest.htlcId, - web3SigningCredential: counterpartyHTLCRequest.web3SigningCredential, - connectorId: counterpartyHTLCRequest.connectorInstanceId, - keychainId: counterpartyHTLCRequest.keychainId, - }; - const res = await pluginHtlc.getSingleStatus(getSingleStatusReq); - return res; - } - case HtlcPackage.Besu: { - const pluginOptions: IPluginHtlcEthBesuOptions = { - instanceId: uuidv4(), - pluginRegistry, - }; - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - const getSingleStatusReq = { - id: counterpartyHTLCRequest.htlcId, - web3SigningCredential: counterpartyHTLCRequest.web3SigningCredential, - connectorId: counterpartyHTLCRequest.connectorInstanceId, - keychainId: counterpartyHTLCRequest.keychainId, - }; - const res = await pluginHtlc.getSingleStatus(getSingleStatusReq); - return res; - } - default: { - throw new Error( - `${fnTag} Unrecognized HTLC Package: ` + - `${counterpartyHTLCRequest.htlcPackage} Supported ones are: ` + - `${Object.values(HtlcPackage).join(";")}`, - ); - } - } - } - public async withdrawCounterparty( - withdrawCounterpartyRequest: WithdrawCounterpartyRequest, - ): Promise { - const fnTag = `${this.className}#withdrawCounterparty()`; - // const connector = this.pluginRegistry.plugins.find( - // (plugin) => - // plugin.getInstanceId() == - // withdrawCounterpartyRequest.connectorInstanceId, - // ) as PluginLedgerConnectorBesu; - const pluginRegistry = this.options.pluginRegistry; - // pluginRegistry.add(connector); - - switch (withdrawCounterpartyRequest.htlcPackage) { - case HtlcPackage.BesuErc20: { - const pluginHtlc = this.pluginRegistry.plugins.find((plugin) => { - return ( - plugin.getPackageName() == - "@hyperledger/cactus-plugin-htlc-eth-besu-erc20" /*&& - ((plugin as unknown) as PluginHtlcEthBesuErc20).getKeychainId() == - withdrawCounterpartyRequest.keychainId*/ - ); - }) as unknown as PluginHtlcEthBesuErc20; - const withdrawRequest: WithdrawRequestBesuERC20 = { - id: withdrawCounterpartyRequest.htlcId, - secret: withdrawCounterpartyRequest.secret, - web3SigningCredential: - withdrawCounterpartyRequest.web3SigningCredential, - connectorId: withdrawCounterpartyRequest.connectorInstanceId, - keychainId: withdrawCounterpartyRequest.keychainId, - }; - try { - const res = await pluginHtlc.withdraw(withdrawRequest); - return res; - } catch (ex: unknown) { - const cause = ex instanceof Error ? ex : fastSafeStringify(ex); - throw new WithdrawCounterpartyTxReverted(`EVM tx reverted:`, cause); - } - } - case HtlcPackage.Besu: { - const pluginOptions: IPluginHtlcEthBesuOptions = { - instanceId: uuidv4(), - pluginRegistry, - }; - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - const withdrawRequest: WithdrawReq = { - id: withdrawCounterpartyRequest.htlcId, - secret: withdrawCounterpartyRequest.secret, - web3SigningCredential: - withdrawCounterpartyRequest.web3SigningCredential, - connectorId: withdrawCounterpartyRequest.connectorInstanceId, - keychainId: withdrawCounterpartyRequest.keychainId, - }; - const res2 = await pluginHtlc.withdraw(withdrawRequest); - return res2; - } - default: { - throw new Error( - `${fnTag} Unrecognized HTLC Package: ` + - `${withdrawCounterpartyRequest.htlcPackage} Supported ones are: ` + - `${Object.values(HtlcPackage).join(";")}`, - ); - } - } - } -} - -export class WithdrawCounterpartyTxReverted extends RuntimeError {} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/public-api.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/public-api.ts deleted file mode 100644 index e24ef5d907..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/public-api.ts +++ /dev/null @@ -1,17 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -export { - IPluginHTLCCoordinatorBesuOptions, - PluginHTLCCoordinatorBesu, -} from "./plugin-htlc-coordinator-besu"; - -export { PluginFactoryHTLCCoordinatorBesu } from "./plugin-factory-htlc-coordinator-besu"; -import { PluginFactoryHTLCCoordinatorBesu } from "./plugin-factory-htlc-coordinator-besu"; - -export * from "./generated/openapi/typescript-axios/index"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryHTLCCoordinatorBesu(pluginFactoryOptions); -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/web-services/counterparty-htlc-endpoint.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/web-services/counterparty-htlc-endpoint.ts deleted file mode 100644 index 34a5664266..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/web-services/counterparty-htlc-endpoint.ts +++ /dev/null @@ -1,117 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - PluginRegistry, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; -import { CounterpartyHTLCRequest } from "../generated/openapi/typescript-axios"; -import { PluginHTLCCoordinatorBesu } from "../plugin-htlc-coordinator-besu"; -import OAS from "../../json/openapi.json"; - -export interface ICounterpartyHTLCOptions { - logLevel?: LogLevelDesc; - pluginRegistry: PluginRegistry; -} - -export class CounterpartyHTLCEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "CounterpartyHTLCEndpoint"; - private readonly log: Logger; - - public get className(): string { - return CounterpartyHTLCEndpoint.CLASS_NAME; - } - - constructor(public readonly options: ICounterpartyHTLCOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy( - options.pluginRegistry, - `${fnTag} arg options.pluginRegistry`, - ); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/counterparty-htlc" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const request: CounterpartyHTLCRequest = - req.body as CounterpartyHTLCRequest; - const connector = this.options.pluginRegistry.plugins.find((plugin) => { - return ( - plugin.getPackageName() == - "@hyperledger/cactus-plugin-htlc-coordinator-besu" - ); - }) as unknown as PluginHTLCCoordinatorBesu; - const resBody = await connector.counterpartyHTLC(request); - res.setHeader( - "Strict-Transport-Security", - "max-age=31536000; includeSubDomains; preload", - ); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/web-services/own-htlc-endpoint.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/web-services/own-htlc-endpoint.ts deleted file mode 100644 index 85b6c47d87..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/web-services/own-htlc-endpoint.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - registerWebServiceEndpoint, - PluginRegistry, -} from "@hyperledger/cactus-core"; -import { PluginHTLCCoordinatorBesu } from "../plugin-htlc-coordinator-besu"; -import { OwnHTLCRequest } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; - -export interface IOwnHTLCOptions { - logLevel?: LogLevelDesc; - pluginRegistry: PluginRegistry; -} - -export class OwnHTLCEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "OwnHTLCEndpoint"; - private readonly log: Logger; - - public get className(): string { - return OwnHTLCEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IOwnHTLCOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy( - options.pluginRegistry, - `${fnTag} arg options.pluginRegistry`, - ); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/own-htlc" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const request: OwnHTLCRequest = req.body as OwnHTLCRequest; - const connector = this.options.pluginRegistry.plugins.find((plugin) => { - return ( - plugin.getPackageName() == - "@hyperledger/cactus-plugin-htlc-coordinator-besu" - ); - }) as unknown as PluginHTLCCoordinatorBesu; - const resBody = await connector.ownHTLC(request); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex, - }); - } - } -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/web-services/withdraw-counterparty-endpoint.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/web-services/withdraw-counterparty-endpoint.ts deleted file mode 100644 index df0f6b675b..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/main/typescript/web-services/withdraw-counterparty-endpoint.ts +++ /dev/null @@ -1,120 +0,0 @@ -import type { Express, Request, Response } from "express"; -import fastSafeStringify from "fast-safe-stringify"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - registerWebServiceEndpoint, - PluginRegistry, -} from "@hyperledger/cactus-core"; -import { WithdrawCounterpartyRequest } from "../generated/openapi/typescript-axios"; -import { PluginHTLCCoordinatorBesu } from "../plugin-htlc-coordinator-besu"; -import { WithdrawCounterpartyTxReverted } from "../plugin-htlc-coordinator-besu"; -import OAS from "../../json/openapi.json"; - -export interface IWithdrawCounterpartyOptions { - logLevel?: LogLevelDesc; - pluginRegistry: PluginRegistry; -} - -export class WithdrawCounterpartyEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "WithdrawCounterpartyEndpoint"; - private readonly log: Logger; - - public get className(): string { - return WithdrawCounterpartyEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IWithdrawCounterpartyOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy( - options.pluginRegistry, - `${fnTag} arg options.pluginRegistry`, - ); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-coordinator-besu/withdraw-counterparty" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const request: WithdrawCounterpartyRequest = - req.body as WithdrawCounterpartyRequest; - const connector = this.options.pluginRegistry.plugins.find((plugin) => { - return ( - plugin.getPackageName() == - "@hyperledger/cactus-plugin-htlc-coordinator-besu" - ); - }) as unknown as PluginHTLCCoordinatorBesu; - const resBody = await connector.withdrawCounterparty(request); - res.json(resBody); - } catch (ex: unknown) { - if (ex instanceof WithdrawCounterpartyTxReverted) { - this.log.debug("%o %o", reqTag, ex); - res.status(400).json(ex); - } else { - const error = ex instanceof Error ? ex.message : fastSafeStringify(ex); - res.status(500).json({ - message: "Internal Server Error", - error, - }); - } - } - } -} diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/api-surface.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts deleted file mode 100644 index bc582afa19..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts +++ /dev/null @@ -1,294 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { - DefaultApi as HtlcCoordinatorBesuApi, - PluginFactoryHTLCCoordinatorBesu, - IPluginHTLCCoordinatorBesuOptions, - HtlcPackage, - OwnHTLCRequest, - CounterpartyHTLCRequest, - Configuration, - PluginHTLCCoordinatorBesu, -} from "../../../../main/typescript/public-api"; -import { - IPluginHtlcEthBesuErc20Options, - PluginFactoryHtlcEthBesuErc20, - PluginHtlcEthBesuErc20, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - DefaultApi as BesuApi, - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import HashTimeLockJSON from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; -import TestTokenJSON from "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.json"; - -describe("HTLC Coordinator Besu", () => { - const logLevel: LogLevelDesc = "INFO"; - const estimatedGas = 6721975; - const expiration = 2147483648; - const receiver = "0x627306090abaB3A6e1400e9345bC60c78a8BEf57"; - const hashLock = - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32"; - const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; - - const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; - const contractAddress = "0xCfEB869F69431e42cdB54A4F4f105C19C080A601"; - - const connectorInstanceId = uuidv4(); - const pluginRegistry = new PluginRegistry({}); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const besuWsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - let besuTestLedger: BesuTestLedger; - let connector: PluginLedgerConnectorBesu; - let pluginHtlcEthBesuErc20: PluginHtlcEthBesuErc20; - let pluginHTLCCoordinatorBesu: PluginHTLCCoordinatorBesu; - let htlcCoordinatorBesuApiClient: HtlcCoordinatorBesuApi; - let besuConnectorApi: BesuApi; - let rpcApiHttpHost: string; - let rpcApiWsHost: string; - - beforeAll(async () => { - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - await keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - await keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - connector = await factory.create({ - instanceId: connectorInstanceId, - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - pluginRegistry.add(connector); - - const iPluginHtlcEthBesuErc20Options: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - keychainId: keychainId, - pluginRegistry, - }; - - const factoryHtlc = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - - pluginHtlcEthBesuErc20 = await factoryHtlc.create( - iPluginHtlcEthBesuErc20Options, - ); - pluginRegistry.add(pluginHtlcEthBesuErc20); - - const pluginOptions: IPluginHTLCCoordinatorBesuOptions = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - const factoryHTLC = new PluginFactoryHTLCCoordinatorBesu({ - pluginImportType: PluginImportType.Local, - }); - pluginHTLCCoordinatorBesu = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHTLCCoordinatorBesu); - - await pluginHTLCCoordinatorBesu.getOrCreateWebServices(); - await pluginHTLCCoordinatorBesu.registerWebServices(expressApp); - - const { address, port } = await Servers.listen(listenOptions); - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - htlcCoordinatorBesuApiClient = new HtlcCoordinatorBesuApi(configuration); - - const besuConnectorConfiguration = new Configuration({ basePath: apiHost }); - besuConnectorApi = new BesuApi(besuConnectorConfiguration); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, besuWsApi); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await Servers.shutdown(server); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); - }); - - test("Deploys TestToken and performs HTLC operations", async () => { - // Deploy TestToken - - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - const approveTokensOutput = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [contractAddress, "10"], - gas: estimatedGas, - }); - expect(approveTokensOutput.data.success).toBeTrue(); - - const responseBalance = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseBalance.data.callOutput).toEqual("100"); - - const allowanceOutput = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, contractAddress], - }); - expect(allowanceOutput.status).toBe(200); - expect(allowanceOutput.data.callOutput).toEqual("10"); - - const ownHTLCRequest: OwnHTLCRequest = { - htlcPackage: HtlcPackage.BesuErc20, - connectorInstanceId, - keychainId, - constructorArgs: [], - web3SigningCredential, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - gas: estimatedGas, - }; - - const response = - await htlcCoordinatorBesuApiClient.ownHtlcV1(ownHTLCRequest); - expect(response.status).toBe(200); - expect(response.data.success).toBe(true); - expect(response.data).toBeTruthy(); - expect(response.data.out.transactionReceipt).toBeTruthy(); - - const responseTxId = await besuConnectorApi.invokeContractV1({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - expiration, - tokenAddress, - ], - gas: estimatedGas, - }); - - const counterpartyHTLCRequest: CounterpartyHTLCRequest = { - htlcPackage: HtlcPackage.BesuErc20, - connectorInstanceId, - keychainId, - htlcId: responseTxId.data.callOutput, - web3SigningCredential, - gas: estimatedGas, - }; - - const response2 = await htlcCoordinatorBesuApiClient.counterpartyHtlcV1( - counterpartyHTLCRequest, - ); - expect(response2.status).toBe(200); - const hstsHeader = response2.headers["strict-transport-security"]; - expect(hstsHeader).toBe("max-age=31536000; includeSubDomains; preload"); - expect(response2.data.success).toBe(true); - expect(response2.data.callOutput).toBe("1"); // Contract status is Active - }); -}); diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts deleted file mode 100644 index 7554fcb252..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts +++ /dev/null @@ -1,257 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { AddressInfo } from "net"; -import express from "express"; -import bodyParser from "body-parser"; -import { Server as SocketIoServer } from "socket.io"; -import http from "http"; -import { - DefaultApi as HtlcCoordinatorBesuApi, - PluginFactoryHTLCCoordinatorBesu, - IPluginHTLCCoordinatorBesuOptions, - HtlcPackage, - OwnHTLCRequest, - Configuration, -} from "../../../../main/typescript/public-api"; -import { - DefaultApi as BesuApi, - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - IPluginHtlcEthBesuErc20Options, - PluginFactoryHtlcEthBesuErc20, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import HashTimeLockJSON from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; -import TestTokenJSON from "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.json"; - -describe("PluginHtlcCoordinatorBesu", () => { - let rpcApiHttpHost: string; - let rpcApiWsHost: string; - let connector: PluginLedgerConnectorBesu; - let htlcCoordinatorBesuApi: HtlcCoordinatorBesuApi; - let besuConnectorApi: BesuApi; - - const logLevel: LogLevelDesc = "INFO"; - const estimatedGas = 6721975; - const expiration = 2147483648; - const receiver = "0x627306090abaB3A6e1400e9345bC60c78a8BEf57"; - const hashLock = - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32"; - const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; - const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; - const connectorInstanceId = uuidv4(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - const contractAddress = "0xCfEB869F69431e42cdB54A4F4f105C19C080A601"; - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: server, - }; - - const besuWsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const besuTestLedger = new BesuTestLedger(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - - const iPluginHtlcEthBesuErc20Options: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - keychainId: keychainId, - pluginRegistry, - }; - - const pluginFactoryHtlcEthBesuErc20 = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - - beforeAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - afterAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - beforeAll(async () => { - await besuTestLedger.start(); - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - }); - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => { - await Servers.shutdown(server); - }); - - beforeAll(async () => { - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorInstanceId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const pluginHtlcEthBesuErc20 = await pluginFactoryHtlcEthBesuErc20.create( - iPluginHtlcEthBesuErc20Options, - ); - pluginRegistry.add(pluginHtlcEthBesuErc20); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHTLCCoordinatorBesuOptions = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHTLCCoordinatorBesu({ - pluginImportType: PluginImportType.Local, - }); - const pluginHTLCCoordinatorBesu = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHTLCCoordinatorBesu); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - htlcCoordinatorBesuApi = new HtlcCoordinatorBesuApi(configuration); - await pluginHTLCCoordinatorBesu.getOrCreateWebServices(); - await pluginHTLCCoordinatorBesu.registerWebServices(expressApp); - - const besuConnectorConfiguration = new Configuration({ basePath: apiHost }); - besuConnectorApi = new BesuApi(besuConnectorConfiguration); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, besuWsApi as any); - }); - - test("ownHtlcV1() endpoint", async () => { - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - const approveTokensOutput = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [contractAddress, "10"], - gas: estimatedGas, - }); - expect(approveTokensOutput.data.success).toBeTrue(); - - const responseBalance = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - - expect(responseBalance.data.callOutput).toEqual("100"); - - const allowanceOutput = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, contractAddress], - }); - - expect(allowanceOutput.status).toEqual(200); - expect(allowanceOutput.data.callOutput).toEqual("10"); - - const ownHTLCRequest: OwnHTLCRequest = { - htlcPackage: HtlcPackage.BesuErc20, - connectorInstanceId, - keychainId, - constructorArgs: [], - web3SigningCredential, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - gas: estimatedGas, - }; - - const response = await htlcCoordinatorBesuApi.ownHtlcV1(ownHTLCRequest); - - expect(response.status).toEqual(200); - expect(response.data).toBeTruthy(); - expect(response.data.success).toBeTrue(); - expect(response.data.out).toBeTruthy(); - expect(response.data.out.transactionReceipt).toBeTruthy(); - }); -}); diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts deleted file mode 100644 index 5fda8a2095..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts +++ /dev/null @@ -1,352 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { - DefaultApi as HtlcCoordinatorBesuApi, - PluginFactoryHTLCCoordinatorBesu, - IPluginHTLCCoordinatorBesuOptions, - HtlcPackage, - OwnHTLCRequest, - CounterpartyHTLCRequest, - Configuration, - PluginHTLCCoordinatorBesu, - WithdrawCounterpartyRequest, -} from "../../../../main/typescript/public-api"; -import { - IPluginHtlcEthBesuErc20Options, - PluginFactoryHtlcEthBesuErc20, - PluginHtlcEthBesuErc20, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - DefaultApi as BesuApi, - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import HashTimeLockJSON from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; -import TestTokenJSON from "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.json"; -import axios from "axios"; - -describe("HTLC Coordinator Besu", () => { - const logLevel: LogLevelDesc = "DEBUG"; - const log = LoggerProvider.getOrCreate({ - label: - "plugin-htlc-coordinator-besu-plugin-htlc-coordinator/refund.test.ts", - level: logLevel, - }); - const estimatedGas = 6721975; - const expiration = 2147483648; - const receiver = "0x627306090abaB3A6e1400e9345bC60c78a8BEf57"; - const hashLock = - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32"; - const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; - - const incorrectSecret = - "0x4853485acd2bfc3c632026ee365279743af107a30492e3ceaa7aefc30c2a048a"; - - const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; - const contractAddress = "0xCfEB869F69431e42cdB54A4F4f105C19C080A601"; - - const connectorInstanceId = uuidv4(); - const pluginRegistry = new PluginRegistry({}); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const besuWsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - let besuTestLedger: BesuTestLedger; - let connector: PluginLedgerConnectorBesu; - let pluginHtlcEthBesuErc20: PluginHtlcEthBesuErc20; - let pluginHTLCCoordinatorBesu: PluginHTLCCoordinatorBesu; - let htlcCoordinatorBesuApiClient: HtlcCoordinatorBesuApi; - let besuConnectorApi: BesuApi; - let rpcApiHttpHost: string; - let rpcApiWsHost: string; - - beforeAll(async () => { - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - await keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - await keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - connector = await factory.create({ - instanceId: connectorInstanceId, - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - pluginRegistry.add(connector); - - const iPluginHtlcEthBesuErc20Options: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - keychainId: keychainId, - pluginRegistry, - }; - - const factoryHtlc = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - - pluginHtlcEthBesuErc20 = await factoryHtlc.create( - iPluginHtlcEthBesuErc20Options, - ); - pluginRegistry.add(pluginHtlcEthBesuErc20); - - const pluginOptions: IPluginHTLCCoordinatorBesuOptions = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - const factoryHTLC = new PluginFactoryHTLCCoordinatorBesu({ - pluginImportType: PluginImportType.Local, - }); - pluginHTLCCoordinatorBesu = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHTLCCoordinatorBesu); - - await pluginHTLCCoordinatorBesu.getOrCreateWebServices(); - await pluginHTLCCoordinatorBesu.registerWebServices(expressApp); - - const { address, port } = await Servers.listen(listenOptions); - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - htlcCoordinatorBesuApiClient = new HtlcCoordinatorBesuApi(configuration); - - const besuConnectorConfiguration = new Configuration({ basePath: apiHost }); - besuConnectorApi = new BesuApi(besuConnectorConfiguration); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, besuWsApi); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await Servers.shutdown(server); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); - }); - - test("withdrawCounterpartyV1() endpoint for refunds", async () => { - // Deploy TestToken - - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - const approveTokensOutput = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [contractAddress, "10"], - gas: estimatedGas, - }); - expect(approveTokensOutput.data.success).toBeTrue(); - - const responseBalance = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseBalance.data.callOutput).toEqual("100"); - - const allowanceOutput = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, contractAddress], - }); - expect(allowanceOutput.status).toBe(200); - expect(allowanceOutput.data.callOutput).toEqual("10"); - - const ownHTLCRequest: OwnHTLCRequest = { - htlcPackage: HtlcPackage.BesuErc20, - connectorInstanceId, - keychainId, - constructorArgs: [], - web3SigningCredential, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - gas: estimatedGas, - }; - - const response = - await htlcCoordinatorBesuApiClient.ownHtlcV1(ownHTLCRequest); - expect(response.status).toBe(200); - expect(response.data.success).toBe(true); - expect(response.data).toBeTruthy(); - expect(response.data.out.transactionReceipt).toBeTruthy(); - - const responseTxId = await besuConnectorApi.invokeContractV1({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - expiration, - tokenAddress, - ], - gas: estimatedGas, - }); - - const counterpartyHTLCRequest: CounterpartyHTLCRequest = { - htlcPackage: HtlcPackage.BesuErc20, - connectorInstanceId, - keychainId, - htlcId: responseTxId.data.callOutput, - web3SigningCredential, - gas: estimatedGas, - }; - - const response2 = await htlcCoordinatorBesuApiClient.counterpartyHtlcV1( - counterpartyHTLCRequest, - ); - expect(response2.status).toBe(200); - const hstsHeader = response2.headers["strict-transport-security"]; - expect(hstsHeader).toBe("max-age=31536000; includeSubDomains; preload"); - expect(response2.data.success).toBe(true); - expect(response2.data.callOutput).toBe("1"); // Contract status is Active - - const withdrawCounterparty: WithdrawCounterpartyRequest = { - htlcPackage: HtlcPackage.BesuErc20, - connectorInstanceId, - keychainId, - web3SigningCredential, - htlcId: responseTxId.data.callOutput, - secret: incorrectSecret, - gas: estimatedGas, - }; - - try { - await htlcCoordinatorBesuApiClient.withdrawCounterpartyV1( - withdrawCounterparty, - ); - } catch (exp: unknown) { - log.debug("Caught error as expected: %o", exp); - if (axios.isAxiosError(exp) && exp.response) { - log.debug("Caught response: %o", exp.response.data); - const revertReason = exp.response.data.cause.receipt.revertReason; - const regExp = new RegExp(/0e494e56414c49445f5345435245540/); - expect(revertReason).toMatch(regExp); - // t.match(revertReason, regExp, rejectMsg); - } else { - throw exp; - } - } - - const responseFinalBalanceReceiver = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [receiver], - }); - expect(responseFinalBalanceReceiver.callOutput).toEqual("0"); - - const responseFinalBalanceSender = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseFinalBalanceSender.callOutput).toEqual("90"); - }); -}); diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts deleted file mode 100644 index 0b215b620c..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts +++ /dev/null @@ -1,332 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { AddressInfo } from "net"; -import express from "express"; -import bodyParser from "body-parser"; -import { Server as SocketIoServer } from "socket.io"; -import http from "http"; -import { encodeParameter } from "web3-eth-abi"; -import { keccak256 } from "web3-utils"; -import { - DefaultApi as HtlcCoordinatorBesuApi, - PluginFactoryHTLCCoordinatorBesu, - IPluginHTLCCoordinatorBesuOptions, - HtlcPackage, - OwnHTLCRequest, - Configuration, - CounterpartyHTLCRequest, - WithdrawCounterpartyRequest, -} from "../../../../main/typescript/public-api"; -import { - DefaultApi as BesuApi, - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - IPluginHtlcEthBesuErc20Options, - PluginFactoryHtlcEthBesuErc20, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import HashTimeLockJSON from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; -import TestTokenJSON from "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.json"; - -describe("PluginHtlcCoordinatorBesu", () => { - let rpcApiHttpHost: string; - let rpcApiWsHost: string; - let connector: PluginLedgerConnectorBesu; - let htlcCoordinatorBesuApi: HtlcCoordinatorBesuApi; - let besuConnectorApi: BesuApi; - - const logLevel: LogLevelDesc = "DEBUG"; - const estimatedGas = 6721975; - const expiration = 2147483648; - const secret = - "0x3853485acd2bfc3c632026ee365279743af107a30492e3ceaa7aefc30c2a048a"; - const receiver = "0x627306090abaB3A6e1400e9345bC60c78a8BEf57"; - - const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; - const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; - const connectorInstanceId = uuidv4(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - const contractAddress = "0xCfEB869F69431e42cdB54A4F4f105C19C080A601"; - - const secretEthAbiEncoded = encodeParameter("uint256", secret); - const hashLock = keccak256(secretEthAbiEncoded); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: server, - }; - - const besuWsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const besuTestLedger = new BesuTestLedger(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - - const iPluginHtlcEthBesuErc20Options: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - keychainId: keychainId, - pluginRegistry, - }; - - const pluginFactoryHtlcEthBesuErc20 = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - - beforeAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - afterAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - beforeAll(async () => { - await besuTestLedger.start(); - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - }); - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => { - await Servers.shutdown(server); - }); - - beforeAll(async () => { - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorInstanceId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const pluginHtlcEthBesuErc20 = await pluginFactoryHtlcEthBesuErc20.create( - iPluginHtlcEthBesuErc20Options, - ); - pluginRegistry.add(pluginHtlcEthBesuErc20); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHTLCCoordinatorBesuOptions = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHTLCCoordinatorBesu({ - pluginImportType: PluginImportType.Local, - }); - const pluginHTLCCoordinatorBesu = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHTLCCoordinatorBesu); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - htlcCoordinatorBesuApi = new HtlcCoordinatorBesuApi(configuration); - await pluginHTLCCoordinatorBesu.getOrCreateWebServices(); - await pluginHTLCCoordinatorBesu.registerWebServices(expressApp); - - const besuConnectorConfiguration = new Configuration({ basePath: apiHost }); - besuConnectorApi = new BesuApi(besuConnectorConfiguration); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, besuWsApi); - }); - - test("withdrawCounterpartyV1() endpoint", async () => { - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - const approveTokensOutput = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [contractAddress, "10"], - gas: estimatedGas, - }); - expect(approveTokensOutput.data.success).toBeTrue(); - - const responseBalance = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseBalance.data.callOutput).toEqual("100"); - - const allowanceOutput = await besuConnectorApi.invokeContractV1({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, contractAddress], - }); - - expect(allowanceOutput.status).toEqual(200); - expect(allowanceOutput.data.callOutput).toEqual("10"); - - const ownHTLCRequest: OwnHTLCRequest = { - htlcPackage: HtlcPackage.BesuErc20, - connectorInstanceId, - keychainId, - constructorArgs: [], - web3SigningCredential, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - gas: estimatedGas, - }; - - const response = await htlcCoordinatorBesuApi.ownHtlcV1(ownHTLCRequest); - expect(response.status).toEqual(200); - expect(response.data).toBeTruthy(); - expect(response.data.success).toBeTrue(); - expect(response.data.out).toBeTruthy(); - expect(response.data.out.transactionReceipt).toBeTruthy(); - - const responseTxId = await besuConnectorApi.invokeContractV1({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - expiration, - tokenAddress, - ], - gas: estimatedGas, - }); - - const counterpartyHTLCRequest: CounterpartyHTLCRequest = { - htlcPackage: HtlcPackage.BesuErc20, - connectorInstanceId, - keychainId, - htlcId: responseTxId.data.callOutput, - web3SigningCredential, - gas: estimatedGas, - }; - - const response2 = await htlcCoordinatorBesuApi.counterpartyHtlcV1( - counterpartyHTLCRequest, - ); - expect(response2.status).toBe(200); - expect(response2.data.success).toBe(true); - expect(response2.data.callOutput).toBe("1"); // Contract status is Active - - const withdrawCounterparty: WithdrawCounterpartyRequest = { - htlcPackage: HtlcPackage.BesuErc20, - connectorInstanceId, - keychainId, - web3SigningCredential, - htlcId: responseTxId.data.callOutput, - secret, - gas: estimatedGas, - }; - - const response3 = - await htlcCoordinatorBesuApi.withdrawCounterpartyV1(withdrawCounterparty); - - expect(response3.status).toBe(200); - expect(response3.data.success).toBe(true); - - const responseFinalBalanceSender = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseFinalBalanceSender.callOutput).toEqual("90"); - - const responseFinalBalanceReceiver = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [receiver], - }); - expect(responseFinalBalanceReceiver.callOutput).toEqual("10"); - }); -}); diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/unit/api-surface.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/tsconfig.json b/extensions/cactus-plugin-htlc-coordinator-besu/tsconfig.json deleted file mode 100644 index 472fec044e..0000000000 --- a/extensions/cactus-plugin-htlc-coordinator-besu/tsconfig.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "allowJs": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/types", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-htlc-coordinator-besu.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json", - ], - "references": [ - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../../packages/cactus-test-tooling/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-htlc-eth-besu-erc20/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-htlc-eth-besu/tsconfig.json" - }, - { - "path": "../../packages/cactus-test-plugin-htlc-eth-besu-erc20/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/extensions/cactus-plugin-object-store-ipfs/CHANGELOG.md b/extensions/cactus-plugin-object-store-ipfs/CHANGELOG.md deleted file mode 100644 index 2f7ad7042a..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/CHANGELOG.md +++ /dev/null @@ -1,185 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **cmd-api-server:** fix CVE-2023-36665 protobufjs try 2 ([4e8b553](https://github.com/hyperledger/cacti/commit/4e8b5534d6a86c856768c0b47af794d66304f90d)), closes [#2682](https://github.com/hyperledger/cacti/issues/2682) -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -### Features - -* **cbdc-bridging-app:** refactor ODAP plugin implementation ([6975fef](https://github.com/hyperledger/cactus/commit/6975fefd4994cc9c6dd7d649dc2d6400646a59ae)) - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-object-store-ipfs - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Features - -* **plugin-object-store-ipfs:** add IPFS plugin implementation ([6d1de27](https://github.com/hyperledger/cactus/commit/6d1de274b45a3fd2cc5120588f9d8594d5d3ace6)) diff --git a/extensions/cactus-plugin-object-store-ipfs/README.md b/extensions/cactus-plugin-object-store-ipfs/README.md deleted file mode 100644 index d1ee4aba7d..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# `@hyperledger/cactus-plugin-object-store-ipfs` - -This plugin provides `Cactus` a way to interact with IPFS networks. Using this we can perform: -- Insert objects in the IPFS network. -- Retrieve objects from the IPFS network. -- Check existence of an object in the IPFS network. - -## Summary - - - [Getting Started](#getting-started) - - [Architecture](#architecture) - - [Usage](#usage) - - [Contributing](#contributing) - - [License](#license) - - [Acknowledgments](#acknowledgments) - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project to install the dependencies execute the command: -```sh -npm run configure -``` - -### Compiling - -In the project root folder, run this command to compile the plugin and create the dist directory: -```sh -npm run tsc -``` - -## Architecture - ->TODO -### API Endpoints -This plugin uses OpenAPI to generate the API paths. There are three endpoints defined for each operation supported (get, set, has). - -## Usage - -> **⚠️** When interacting with the API take in consideration that the values are expected to be in base64. Additionally, when retrieving data from the IPFS, it is necessary to decode from base64. - -Firstly create an instance of the plugin. - -```typescript -import { create } from "kubo-rpc-client"; - -const logLevel: LogLevelDesc = "TRACE"; -const ipfsClientOrOptions = create(); - -const pluginIpfs = new PluginObjectStoreIpfs({ - parentDir: "/" + uuidv4(), - logLevel: logLevel, - instanceId: "", - ipfsClientOrOptions: ipfsClientOrOptions, -}); -``` - -You can make calls through the plugin to the IPFS API: - -```typescript -async get(req: GetObjectRequestV1): Promise; -async has(req: HasObjectRequestV1): Promise; -async set(req: SetObjectRequestV1): Promise; -``` - -Call example to store an object: -```typescript -const dataBase64 = Buffer.from(data).toString("base64"); - -const response = await pluginIpfs.setObjectV1({ - key: uuidv4(), - value: dataBase64, -}); -``` - -Call example to get an object: -```typescript -const response = await pluginIpfs.getObjectV1({ - key: uuidv4(), -}); - -const originalData = Buffer.from(response.data.value, "base64").toString() -``` - -Call example to check existence of an object: -```typescript -const response = await pluginIpfs.hasObjectV1({ - key: uuidv4(), -}); - -const isPresent = response.data.isPresent; -const timestamp = response.data.checkedAt; -``` - -## Contributing -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md "CONTRIBUTING.md") to get started. - -## License -This distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE "LICENSE ")file. - -## Acknowledgments diff --git a/extensions/cactus-plugin-object-store-ipfs/openapitools.json b/extensions/cactus-plugin-object-store-ipfs/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/package.json b/extensions/cactus-plugin-object-store-ipfs/package.json deleted file mode 100644 index 37ae008584..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-object-store-ipfs", - "version": "2.0.0", - "description": "IPFS backed object store plugin implementation for Hyperledger Cactus", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-object-store-ipfs.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override=../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "run-time-error-cjs": "1.4.0", - "typescript-optional": "2.0.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@multiformats/multiaddr": "11.6.1", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "ipfs-core-types": "0.14.1", - "ipfs-unixfs": "9.0.1", - "kubo-rpc-client": "3.0.1", - "kubo-rpc-client-esm-cjs": "3.0.1", - "multiformats": "11.0.2" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-object-store-ipfs.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-object-store-ipfs.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 1bca340652..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,16 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_get_object_request_v1.go -model_get_object_response_v1.go -model_has_object_request_v1.go -model_has_object_response_v1.go -model_set_object_request_v1.go -model_set_object_response_v1.go -response.go -utils.go diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/.travis.yml b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/README.md b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index aeb3bbb6e7..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# Go API client for cactus-plugin-object-store-ipfs - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-object-store-ipfs "github.com/hyperledger/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-object-store-ipfs.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-object-store-ipfs.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-object-store-ipfs.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-object-store-ipfs.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://www.cactus.stream* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**GetObjectV1**](docs/DefaultApi.md#getobjectv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object | Retrieves an object from the object store. -*DefaultApi* | [**HasObjectV1**](docs/DefaultApi.md#hasobjectv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object | Checks the presence of an object in the object store. -*DefaultApi* | [**SetObjectV1**](docs/DefaultApi.md#setobjectv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object | Sets an object in the object store under the specified key. - - -## Documentation For Models - - - [GetObjectRequestV1](docs/GetObjectRequestV1.md) - - [GetObjectResponseV1](docs/GetObjectResponseV1.md) - - [HasObjectRequestV1](docs/HasObjectRequestV1.md) - - [HasObjectResponseV1](docs/HasObjectResponseV1.md) - - [SetObjectRequestV1](docs/SetObjectRequestV1.md) - - [SetObjectResponseV1](docs/SetObjectResponseV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/api/openapi.yaml b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index cd9350ffc3..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,232 +0,0 @@ -openapi: 3.0.3 -info: - description: Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: 'Hyperledger Cactus Plugin - Object Store - IPFS ' - version: 2.0.0 -servers: -- description: Public test instance - url: "https://www.cactus.stream/{basePath}" - variables: - basePath: - default: "" -- description: Local test instance - url: "http://localhost:4000/{basePath}" - variables: - basePath: - default: "" -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object: - post: - operationId: getObjectV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/object_store_get_object_v1_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetObjectResponseV1' - description: OK - summary: Retrieves an object from the object store. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object - /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object: - post: - operationId: setObjectV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/object_store_set_object_v1_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetObjectResponseV1' - description: OK - summary: Sets an object in the object store under the specified key. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object - /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object: - post: - operationId: hasObjectV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/object_store_has_object_v1_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HasObjectResponseV1' - description: OK - summary: Checks the presence of an object in the object store. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object -components: - requestBodies: - object_store_get_object_v1_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/GetObjectRequestV1' - description: Request body to obtain an object via its key. - required: true - object_store_set_object_v1_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/SetObjectRequestV1' - description: Request body to set an object under a key. - required: true - object_store_has_object_v1_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/HasObjectRequestV1' - description: Request body to check presence of an object under a key. - required: true - responses: - object_store_get_object_v1_response_body: - content: - application/json: - schema: - $ref: '#/components/schemas/GetObjectResponseV1' - description: OK - object_store_set_object_v1_response_body: - content: - application/json: - schema: - $ref: '#/components/schemas/SetObjectResponseV1' - description: OK - object_store_has_object_v1_response_body: - content: - application/json: - schema: - $ref: '#/components/schemas/HasObjectResponseV1' - description: OK - schemas: - GetObjectRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to get from the object store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - GetObjectResponseV1: - example: - value: value - key: key - properties: - key: - description: The key that was used to retrieve the value from the object - store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value associated with the requested key in the object store - as a string. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetObjectRequestV1: - additionalProperties: false - example: - value: value - key: key - properties: - key: - description: The key for the entry to set in the object store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value that will be associated with the key in the object - store. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetObjectResponseV1: - example: - key: key - properties: - key: - description: The key that was used to set the value in the object store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasObjectRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key to check for presence in the object store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasObjectResponseV1: - example: - checkedAt: checkedAt - isPresent: true - key: key - properties: - key: - description: The key that was used to check the presence of the value in - the object store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - checkedAt: - description: Date and time encoded as JSON when the presence check was performed - by the plugin backend. - nullable: false - type: string - isPresent: - description: The boolean true or false indicating the presence or absence - of an object under 'key'. - nullable: false - type: boolean - required: - - checkedAt - - isPresent - - key - type: object diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/api_default.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index ae7b7d6f73..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,350 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiGetObjectV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getObjectRequestV1 *GetObjectRequestV1 -} - -// Request body to obtain an object via its key. -func (r ApiGetObjectV1Request) GetObjectRequestV1(getObjectRequestV1 GetObjectRequestV1) ApiGetObjectV1Request { - r.getObjectRequestV1 = &getObjectRequestV1 - return r -} - -func (r ApiGetObjectV1Request) Execute() (*GetObjectResponseV1, *http.Response, error) { - return r.ApiService.GetObjectV1Execute(r) -} - -/* -GetObjectV1 Retrieves an object from the object store. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetObjectV1Request -*/ -func (a *DefaultApiService) GetObjectV1(ctx context.Context) ApiGetObjectV1Request { - return ApiGetObjectV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetObjectResponseV1 -func (a *DefaultApiService) GetObjectV1Execute(r ApiGetObjectV1Request) (*GetObjectResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetObjectResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetObjectV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getObjectRequestV1 == nil { - return localVarReturnValue, nil, reportError("getObjectRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getObjectRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiHasObjectV1Request struct { - ctx context.Context - ApiService *DefaultApiService - hasObjectRequestV1 *HasObjectRequestV1 -} - -// Request body to check presence of an object under a key. -func (r ApiHasObjectV1Request) HasObjectRequestV1(hasObjectRequestV1 HasObjectRequestV1) ApiHasObjectV1Request { - r.hasObjectRequestV1 = &hasObjectRequestV1 - return r -} - -func (r ApiHasObjectV1Request) Execute() (*HasObjectResponseV1, *http.Response, error) { - return r.ApiService.HasObjectV1Execute(r) -} - -/* -HasObjectV1 Checks the presence of an object in the object store. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHasObjectV1Request -*/ -func (a *DefaultApiService) HasObjectV1(ctx context.Context) ApiHasObjectV1Request { - return ApiHasObjectV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return HasObjectResponseV1 -func (a *DefaultApiService) HasObjectV1Execute(r ApiHasObjectV1Request) (*HasObjectResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HasObjectResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.HasObjectV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.hasObjectRequestV1 == nil { - return localVarReturnValue, nil, reportError("hasObjectRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.hasObjectRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSetObjectV1Request struct { - ctx context.Context - ApiService *DefaultApiService - setObjectRequestV1 *SetObjectRequestV1 -} - -// Request body to set an object under a key. -func (r ApiSetObjectV1Request) SetObjectRequestV1(setObjectRequestV1 SetObjectRequestV1) ApiSetObjectV1Request { - r.setObjectRequestV1 = &setObjectRequestV1 - return r -} - -func (r ApiSetObjectV1Request) Execute() (*SetObjectResponseV1, *http.Response, error) { - return r.ApiService.SetObjectV1Execute(r) -} - -/* -SetObjectV1 Sets an object in the object store under the specified key. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSetObjectV1Request -*/ -func (a *DefaultApiService) SetObjectV1(ctx context.Context) ApiSetObjectV1Request { - return ApiSetObjectV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SetObjectResponseV1 -func (a *DefaultApiService) SetObjectV1Execute(r ApiSetObjectV1Request) (*SetObjectResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SetObjectResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SetObjectV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.setObjectRequestV1 == nil { - return localVarReturnValue, nil, reportError("setObjectRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.setObjectRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/client.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 8a87010888..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Object Store - IPFS API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/configuration.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 640d03c62e..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,231 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "https://www.cactus.stream/{basePath}", - Description: "Public test instance", - Variables: map[string]ServerVariable{ - "basePath": ServerVariable{ - Description: "No description provided", - DefaultValue: "", - }, - }, - }, - { - URL: "http://localhost:4000/{basePath}", - Description: "Local test instance", - Variables: map[string]ServerVariable{ - "basePath": ServerVariable{ - Description: "No description provided", - DefaultValue: "", - }, - }, - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/go.mod b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 68a273a419..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/go.sum b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_get_object_request_v1.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_get_object_request_v1.go deleted file mode 100644 index 672c6b327b..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_get_object_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "encoding/json" -) - -// checks if the GetObjectRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetObjectRequestV1{} - -// GetObjectRequestV1 struct for GetObjectRequestV1 -type GetObjectRequestV1 struct { - // The key for the entry to get from the object store. - Key string `json:"key"` -} - -// NewGetObjectRequestV1 instantiates a new GetObjectRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetObjectRequestV1(key string) *GetObjectRequestV1 { - this := GetObjectRequestV1{} - this.Key = key - return &this -} - -// NewGetObjectRequestV1WithDefaults instantiates a new GetObjectRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetObjectRequestV1WithDefaults() *GetObjectRequestV1 { - this := GetObjectRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetObjectRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetObjectRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetObjectRequestV1) SetKey(v string) { - o.Key = v -} - -func (o GetObjectRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetObjectRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableGetObjectRequestV1 struct { - value *GetObjectRequestV1 - isSet bool -} - -func (v NullableGetObjectRequestV1) Get() *GetObjectRequestV1 { - return v.value -} - -func (v *NullableGetObjectRequestV1) Set(val *GetObjectRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetObjectRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetObjectRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetObjectRequestV1(val *GetObjectRequestV1) *NullableGetObjectRequestV1 { - return &NullableGetObjectRequestV1{value: val, isSet: true} -} - -func (v NullableGetObjectRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetObjectRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_get_object_response_v1.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_get_object_response_v1.go deleted file mode 100644 index 05a3151781..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_get_object_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "encoding/json" -) - -// checks if the GetObjectResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetObjectResponseV1{} - -// GetObjectResponseV1 struct for GetObjectResponseV1 -type GetObjectResponseV1 struct { - // The key that was used to retrieve the value from the object store. - Key string `json:"key"` - // The value associated with the requested key in the object store as a string. - Value string `json:"value"` -} - -// NewGetObjectResponseV1 instantiates a new GetObjectResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetObjectResponseV1(key string, value string) *GetObjectResponseV1 { - this := GetObjectResponseV1{} - this.Key = key - this.Value = value - return &this -} - -// NewGetObjectResponseV1WithDefaults instantiates a new GetObjectResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetObjectResponseV1WithDefaults() *GetObjectResponseV1 { - this := GetObjectResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetObjectResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetObjectResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetObjectResponseV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *GetObjectResponseV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *GetObjectResponseV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *GetObjectResponseV1) SetValue(v string) { - o.Value = v -} - -func (o GetObjectResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetObjectResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableGetObjectResponseV1 struct { - value *GetObjectResponseV1 - isSet bool -} - -func (v NullableGetObjectResponseV1) Get() *GetObjectResponseV1 { - return v.value -} - -func (v *NullableGetObjectResponseV1) Set(val *GetObjectResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetObjectResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetObjectResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetObjectResponseV1(val *GetObjectResponseV1) *NullableGetObjectResponseV1 { - return &NullableGetObjectResponseV1{value: val, isSet: true} -} - -func (v NullableGetObjectResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetObjectResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_has_object_request_v1.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_has_object_request_v1.go deleted file mode 100644 index 379ff4b157..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_has_object_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "encoding/json" -) - -// checks if the HasObjectRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasObjectRequestV1{} - -// HasObjectRequestV1 struct for HasObjectRequestV1 -type HasObjectRequestV1 struct { - // The key to check for presence in the object store. - Key string `json:"key"` -} - -// NewHasObjectRequestV1 instantiates a new HasObjectRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasObjectRequestV1(key string) *HasObjectRequestV1 { - this := HasObjectRequestV1{} - this.Key = key - return &this -} - -// NewHasObjectRequestV1WithDefaults instantiates a new HasObjectRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasObjectRequestV1WithDefaults() *HasObjectRequestV1 { - this := HasObjectRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasObjectRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasObjectRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasObjectRequestV1) SetKey(v string) { - o.Key = v -} - -func (o HasObjectRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasObjectRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableHasObjectRequestV1 struct { - value *HasObjectRequestV1 - isSet bool -} - -func (v NullableHasObjectRequestV1) Get() *HasObjectRequestV1 { - return v.value -} - -func (v *NullableHasObjectRequestV1) Set(val *HasObjectRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasObjectRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasObjectRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasObjectRequestV1(val *HasObjectRequestV1) *NullableHasObjectRequestV1 { - return &NullableHasObjectRequestV1{value: val, isSet: true} -} - -func (v NullableHasObjectRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasObjectRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_has_object_response_v1.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_has_object_response_v1.go deleted file mode 100644 index b992299ac1..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_has_object_response_v1.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "encoding/json" -) - -// checks if the HasObjectResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasObjectResponseV1{} - -// HasObjectResponseV1 struct for HasObjectResponseV1 -type HasObjectResponseV1 struct { - // The key that was used to check the presence of the value in the object store. - Key string `json:"key"` - // Date and time encoded as JSON when the presence check was performed by the plugin backend. - CheckedAt string `json:"checkedAt"` - // The boolean true or false indicating the presence or absence of an object under 'key'. - IsPresent bool `json:"isPresent"` -} - -// NewHasObjectResponseV1 instantiates a new HasObjectResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasObjectResponseV1(key string, checkedAt string, isPresent bool) *HasObjectResponseV1 { - this := HasObjectResponseV1{} - this.Key = key - this.CheckedAt = checkedAt - this.IsPresent = isPresent - return &this -} - -// NewHasObjectResponseV1WithDefaults instantiates a new HasObjectResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasObjectResponseV1WithDefaults() *HasObjectResponseV1 { - this := HasObjectResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasObjectResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasObjectResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasObjectResponseV1) SetKey(v string) { - o.Key = v -} - -// GetCheckedAt returns the CheckedAt field value -func (o *HasObjectResponseV1) GetCheckedAt() string { - if o == nil { - var ret string - return ret - } - - return o.CheckedAt -} - -// GetCheckedAtOk returns a tuple with the CheckedAt field value -// and a boolean to check if the value has been set. -func (o *HasObjectResponseV1) GetCheckedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CheckedAt, true -} - -// SetCheckedAt sets field value -func (o *HasObjectResponseV1) SetCheckedAt(v string) { - o.CheckedAt = v -} - -// GetIsPresent returns the IsPresent field value -func (o *HasObjectResponseV1) GetIsPresent() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPresent -} - -// GetIsPresentOk returns a tuple with the IsPresent field value -// and a boolean to check if the value has been set. -func (o *HasObjectResponseV1) GetIsPresentOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPresent, true -} - -// SetIsPresent sets field value -func (o *HasObjectResponseV1) SetIsPresent(v bool) { - o.IsPresent = v -} - -func (o HasObjectResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasObjectResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["checkedAt"] = o.CheckedAt - toSerialize["isPresent"] = o.IsPresent - return toSerialize, nil -} - -type NullableHasObjectResponseV1 struct { - value *HasObjectResponseV1 - isSet bool -} - -func (v NullableHasObjectResponseV1) Get() *HasObjectResponseV1 { - return v.value -} - -func (v *NullableHasObjectResponseV1) Set(val *HasObjectResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasObjectResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasObjectResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasObjectResponseV1(val *HasObjectResponseV1) *NullableHasObjectResponseV1 { - return &NullableHasObjectResponseV1{value: val, isSet: true} -} - -func (v NullableHasObjectResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasObjectResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_set_object_request_v1.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_set_object_request_v1.go deleted file mode 100644 index 642e61f298..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_set_object_request_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "encoding/json" -) - -// checks if the SetObjectRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetObjectRequestV1{} - -// SetObjectRequestV1 struct for SetObjectRequestV1 -type SetObjectRequestV1 struct { - // The key for the entry to set in the object store. - Key string `json:"key"` - // The value that will be associated with the key in the object store. - Value string `json:"value"` -} - -// NewSetObjectRequestV1 instantiates a new SetObjectRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetObjectRequestV1(key string, value string) *SetObjectRequestV1 { - this := SetObjectRequestV1{} - this.Key = key - this.Value = value - return &this -} - -// NewSetObjectRequestV1WithDefaults instantiates a new SetObjectRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetObjectRequestV1WithDefaults() *SetObjectRequestV1 { - this := SetObjectRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetObjectRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetObjectRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetObjectRequestV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *SetObjectRequestV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *SetObjectRequestV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *SetObjectRequestV1) SetValue(v string) { - o.Value = v -} - -func (o SetObjectRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetObjectRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableSetObjectRequestV1 struct { - value *SetObjectRequestV1 - isSet bool -} - -func (v NullableSetObjectRequestV1) Get() *SetObjectRequestV1 { - return v.value -} - -func (v *NullableSetObjectRequestV1) Set(val *SetObjectRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetObjectRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetObjectRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetObjectRequestV1(val *SetObjectRequestV1) *NullableSetObjectRequestV1 { - return &NullableSetObjectRequestV1{value: val, isSet: true} -} - -func (v NullableSetObjectRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetObjectRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_set_object_response_v1.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_set_object_response_v1.go deleted file mode 100644 index bcf6ac31d9..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/model_set_object_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "encoding/json" -) - -// checks if the SetObjectResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetObjectResponseV1{} - -// SetObjectResponseV1 struct for SetObjectResponseV1 -type SetObjectResponseV1 struct { - // The key that was used to set the value in the object store. - Key string `json:"key"` -} - -// NewSetObjectResponseV1 instantiates a new SetObjectResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetObjectResponseV1(key string) *SetObjectResponseV1 { - this := SetObjectResponseV1{} - this.Key = key - return &this -} - -// NewSetObjectResponseV1WithDefaults instantiates a new SetObjectResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetObjectResponseV1WithDefaults() *SetObjectResponseV1 { - this := SetObjectResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetObjectResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetObjectResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetObjectResponseV1) SetKey(v string) { - o.Key = v -} - -func (o SetObjectResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetObjectResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableSetObjectResponseV1 struct { - value *SetObjectResponseV1 - isSet bool -} - -func (v NullableSetObjectResponseV1) Get() *SetObjectResponseV1 { - return v.value -} - -func (v *NullableSetObjectResponseV1) Set(val *SetObjectResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetObjectResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetObjectResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetObjectResponseV1(val *SetObjectResponseV1) *NullableSetObjectResponseV1 { - return &NullableSetObjectResponseV1{value: val, isSet: true} -} - -func (v NullableSetObjectResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetObjectResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/response.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 78149ee6b7..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/test/api_default_test.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 20e954c471..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-object-store-ipfs - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-object-store-ipfs_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService GetObjectV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetObjectV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService HasObjectV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.HasObjectV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SetObjectV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SetObjectV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/utils.go b/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 8c3c55ecab..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-object-store-ipfs - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/json/openapi.json b/extensions/cactus-plugin-object-store-ipfs/src/main/json/openapi.json deleted file mode 100644 index a6fa3b0c8a..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/json/openapi.json +++ /dev/null @@ -1,273 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Object Store - IPFS ", - "description": "Contains/describes the Hyperledger Cactus Object Store IPFS plugin.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "servers": [ - { - "url": "https://www.cactus.stream/{basePath}", - "description": "Public test instance", - "variables": { - "basePath": { - "default": "" - } - } - }, - { - "url": "http://localhost:4000/{basePath}", - "description": "Local test instance", - "variables": { - "basePath": { - "default": "" - } - } - } - ], - "components": { - "schemas": { - "GetObjectRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to get from the object store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "GetObjectResponseV1": { - "type": "object", - "required": ["key", "value"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to retrieve the value from the object store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value associated with the requested key in the object store as a string.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetObjectRequestV1": { - "type": "object", - "required": ["key", "value"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to set in the object store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value that will be associated with the key in the object store.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetObjectResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to set the value in the object store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasObjectRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key to check for presence in the object store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasObjectResponseV1": { - "type": "object", - "required": ["key", "isPresent", "checkedAt"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to check the presence of the value in the object store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "checkedAt": { - "type": "string", - "description": "Date and time encoded as JSON when the presence check was performed by the plugin backend.", - "nullable": false - }, - "isPresent": { - "type": "boolean", - "description": "The boolean true or false indicating the presence or absence of an object under 'key'.", - "nullable": false - } - } - } - }, - "requestBodies": { - "object_store_get_object_v1_request_body": { - "description": "Request body to obtain an object via its key.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetObjectRequestV1" - } - } - } - }, - "object_store_set_object_v1_request_body": { - "description": "Request body to set an object under a key.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetObjectRequestV1" - } - } - } - }, - "object_store_has_object_v1_request_body": { - "description": "Request body to check presence of an object under a key.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasObjectRequestV1" - } - } - } - } - }, - "responses": { - "object_store_get_object_v1_response_body": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetObjectResponseV1" - } - } - } - }, - "object_store_set_object_v1_response_body": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetObjectResponseV1" - } - } - } - }, - "object_store_has_object_v1_response_body": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasObjectResponseV1" - } - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object" - } - }, - "operationId": "getObjectV1", - "summary": "Retrieves an object from the object store.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/object_store_get_object_v1_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/object_store_get_object_v1_response_body" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object" - } - }, - "operationId": "setObjectV1", - "summary": "Sets an object in the object store under the specified key.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/object_store_set_object_v1_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/object_store_set_object_v1_response_body" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object" - } - }, - "operationId": "hasObjectV1", - "summary": "Checks the presence of an object in the object store.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/object_store_has_object_v1_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/object_store_has_object_v1_response_body" - } - } - } - } - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/json/openapi.tpl.json b/extensions/cactus-plugin-object-store-ipfs/src/main/json/openapi.tpl.json deleted file mode 100644 index 91ed098ccd..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Object Store - IPFS ", - "description": "Contains/describes the Hyperledger Cactus Object Store IPFS plugin.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "servers": [ - { - "url": "https://www.cactus.stream/{basePath}", - "description": "Public test instance", - "variables": { - "basePath": { - "default": "" - } - } - }, - { - "url": "http://localhost:4000/{basePath}", - "description": "Local test instance", - "variables": { - "basePath": { - "default": "" - } - } - } - ], - "components": { - "schemas": {}, - "requestBodies": {}, - "responses": {} - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object" - } - }, - "operationId": "getObjectV1", - "summary": "Retrieves an object from the object store.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/object_store_get_object_v1_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/object_store_get_object_v1_response_body" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object" - } - }, - "operationId": "setObjectV1", - "summary": "Sets an object in the object store under the specified key.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/object_store_set_object_v1_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/object_store_set_object_v1_response_body" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object" - } - }, - "operationId": "hasObjectV1", - "summary": "Checks the presence of an object in the object store.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/object_store_has_object_v1_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/object_store_has_object_v1_response_body" - } - } - } - } - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index cf478b0562..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,29 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/GetObjectRequestV1.kt -src/main/kotlin/org/openapitools/client/models/GetObjectResponseV1.kt -src/main/kotlin/org/openapitools/client/models/HasObjectRequestV1.kt -src/main/kotlin/org/openapitools/client/models/HasObjectResponseV1.kt -src/main/kotlin/org/openapitools/client/models/SetObjectRequestV1.kt -src/main/kotlin/org/openapitools/client/models/SetObjectResponseV1.kt diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/README.md b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 50c8b8f663..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - Object Store - IPFS - -Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *https://www.cactus.stream* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**getObjectV1**](docs/DefaultApi.md#getobjectv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object | Retrieves an object from the object store. -*DefaultApi* | [**hasObjectV1**](docs/DefaultApi.md#hasobjectv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object | Checks the presence of an object in the object store. -*DefaultApi* | [**setObjectV1**](docs/DefaultApi.md#setobjectv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object | Sets an object in the object store under the specified key. - - - -## Documentation for Models - - - [org.openapitools.client.models.GetObjectRequestV1](docs/GetObjectRequestV1.md) - - [org.openapitools.client.models.GetObjectResponseV1](docs/GetObjectResponseV1.md) - - [org.openapitools.client.models.HasObjectRequestV1](docs/HasObjectRequestV1.md) - - [org.openapitools.client.models.HasObjectResponseV1](docs/HasObjectResponseV1.md) - - [org.openapitools.client.models.SetObjectRequestV1](docs/SetObjectRequestV1.md) - - [org.openapitools.client.models.SetObjectResponseV1](docs/SetObjectResponseV1.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index d29c346801..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,272 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.GetObjectRequestV1 -import org.openapitools.client.models.GetObjectResponseV1 -import org.openapitools.client.models.HasObjectRequestV1 -import org.openapitools.client.models.HasObjectResponseV1 -import org.openapitools.client.models.SetObjectRequestV1 -import org.openapitools.client.models.SetObjectResponseV1 - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "https://www.cactus.stream") - } - } - - /** - * Retrieves an object from the object store. - * - * @param getObjectRequestV1 Request body to obtain an object via its key. - * @return GetObjectResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getObjectV1(getObjectRequestV1: GetObjectRequestV1) : GetObjectResponseV1 { - val localVarResponse = getObjectV1WithHttpInfo(getObjectRequestV1 = getObjectRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetObjectResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves an object from the object store. - * - * @param getObjectRequestV1 Request body to obtain an object via its key. - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getObjectV1WithHttpInfo(getObjectRequestV1: GetObjectRequestV1) : ApiResponse { - val localVariableConfig = getObjectV1RequestConfig(getObjectRequestV1 = getObjectRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getObjectV1 - * - * @param getObjectRequestV1 Request body to obtain an object via its key. - * @return RequestConfig - */ - fun getObjectV1RequestConfig(getObjectRequestV1: GetObjectRequestV1) : RequestConfig { - val localVariableBody = getObjectRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Checks the presence of an object in the object store. - * - * @param hasObjectRequestV1 Request body to check presence of an object under a key. - * @return HasObjectResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun hasObjectV1(hasObjectRequestV1: HasObjectRequestV1) : HasObjectResponseV1 { - val localVarResponse = hasObjectV1WithHttpInfo(hasObjectRequestV1 = hasObjectRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as HasObjectResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Checks the presence of an object in the object store. - * - * @param hasObjectRequestV1 Request body to check presence of an object under a key. - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun hasObjectV1WithHttpInfo(hasObjectRequestV1: HasObjectRequestV1) : ApiResponse { - val localVariableConfig = hasObjectV1RequestConfig(hasObjectRequestV1 = hasObjectRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation hasObjectV1 - * - * @param hasObjectRequestV1 Request body to check presence of an object under a key. - * @return RequestConfig - */ - fun hasObjectV1RequestConfig(hasObjectRequestV1: HasObjectRequestV1) : RequestConfig { - val localVariableBody = hasObjectRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Sets an object in the object store under the specified key. - * - * @param setObjectRequestV1 Request body to set an object under a key. - * @return SetObjectResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun setObjectV1(setObjectRequestV1: SetObjectRequestV1) : SetObjectResponseV1 { - val localVarResponse = setObjectV1WithHttpInfo(setObjectRequestV1 = setObjectRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as SetObjectResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Sets an object in the object store under the specified key. - * - * @param setObjectRequestV1 Request body to set an object under a key. - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun setObjectV1WithHttpInfo(setObjectRequestV1: SetObjectRequestV1) : ApiResponse { - val localVariableConfig = setObjectV1RequestConfig(setObjectRequestV1 = setObjectRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation setObjectV1 - * - * @param setObjectRequestV1 Request body to set an object under a key. - * @return RequestConfig - */ - fun setObjectV1RequestConfig(setObjectRequestV1: SetObjectRequestV1) : RequestConfig { - val localVariableBody = setObjectRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetObjectRequestV1.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetObjectRequestV1.kt deleted file mode 100644 index fa3bf67f10..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetObjectRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to get from the object store. - */ - - -data class GetObjectRequestV1 ( - - /* The key for the entry to get from the object store. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetObjectResponseV1.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetObjectResponseV1.kt deleted file mode 100644 index fb0e6004f8..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetObjectResponseV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to retrieve the value from the object store. - * @param `value` The value associated with the requested key in the object store as a string. - */ - - -data class GetObjectResponseV1 ( - - /* The key that was used to retrieve the value from the object store. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value associated with the requested key in the object store as a string. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasObjectRequestV1.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasObjectRequestV1.kt deleted file mode 100644 index 616e39804b..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasObjectRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key to check for presence in the object store. - */ - - -data class HasObjectRequestV1 ( - - /* The key to check for presence in the object store. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasObjectResponseV1.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasObjectResponseV1.kt deleted file mode 100644 index f71878ed6d..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasObjectResponseV1.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to check the presence of the value in the object store. - * @param checkedAt Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @param isPresent The boolean true or false indicating the presence or absence of an object under 'key'. - */ - - -data class HasObjectResponseV1 ( - - /* The key that was used to check the presence of the value in the object store. */ - @Json(name = "key") - val key: kotlin.String, - - /* Date and time encoded as JSON when the presence check was performed by the plugin backend. */ - @Json(name = "checkedAt") - val checkedAt: kotlin.String, - - /* The boolean true or false indicating the presence or absence of an object under 'key'. */ - @Json(name = "isPresent") - val isPresent: kotlin.Boolean - -) - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetObjectRequestV1.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetObjectRequestV1.kt deleted file mode 100644 index 605a55c895..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetObjectRequestV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to set in the object store. - * @param `value` The value that will be associated with the key in the object store. - */ - - -data class SetObjectRequestV1 ( - - /* The key for the entry to set in the object store. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value that will be associated with the key in the object store. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetObjectResponseV1.kt b/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetObjectResponseV1.kt deleted file mode 100644 index a9f3681a38..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetObjectResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to set the value in the object store. - */ - - -data class SetObjectResponseV1 ( - - /* The key that was used to set the value in the object store. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/api.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 6c5d330b7b..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,373 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Object Store - IPFS - * Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface GetObjectRequestV1 - */ -export interface GetObjectRequestV1 { - /** - * The key for the entry to get from the object store. - * @type {string} - * @memberof GetObjectRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetObjectResponseV1 - */ -export interface GetObjectResponseV1 { - /** - * The key that was used to retrieve the value from the object store. - * @type {string} - * @memberof GetObjectResponseV1 - */ - 'key': string; - /** - * The value associated with the requested key in the object store as a string. - * @type {string} - * @memberof GetObjectResponseV1 - */ - 'value': string; -} -/** - * - * @export - * @interface HasObjectRequestV1 - */ -export interface HasObjectRequestV1 { - /** - * The key to check for presence in the object store. - * @type {string} - * @memberof HasObjectRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface HasObjectResponseV1 - */ -export interface HasObjectResponseV1 { - /** - * The key that was used to check the presence of the value in the object store. - * @type {string} - * @memberof HasObjectResponseV1 - */ - 'key': string; - /** - * Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @type {string} - * @memberof HasObjectResponseV1 - */ - 'checkedAt': string; - /** - * The boolean true or false indicating the presence or absence of an object under \'key\'. - * @type {boolean} - * @memberof HasObjectResponseV1 - */ - 'isPresent': boolean; -} -/** - * - * @export - * @interface SetObjectRequestV1 - */ -export interface SetObjectRequestV1 { - /** - * The key for the entry to set in the object store. - * @type {string} - * @memberof SetObjectRequestV1 - */ - 'key': string; - /** - * The value that will be associated with the key in the object store. - * @type {string} - * @memberof SetObjectRequestV1 - */ - 'value': string; -} -/** - * - * @export - * @interface SetObjectResponseV1 - */ -export interface SetObjectResponseV1 { - /** - * The key that was used to set the value in the object store. - * @type {string} - * @memberof SetObjectResponseV1 - */ - 'key': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Retrieves an object from the object store. - * @param {GetObjectRequestV1} getObjectRequestV1 Request body to obtain an object via its key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getObjectV1: async (getObjectRequestV1: GetObjectRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getObjectRequestV1' is not null or undefined - assertParamExists('getObjectV1', 'getObjectRequestV1', getObjectRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getObjectRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Checks the presence of an object in the object store. - * @param {HasObjectRequestV1} hasObjectRequestV1 Request body to check presence of an object under a key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasObjectV1: async (hasObjectRequestV1: HasObjectRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'hasObjectRequestV1' is not null or undefined - assertParamExists('hasObjectV1', 'hasObjectRequestV1', hasObjectRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(hasObjectRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Sets an object in the object store under the specified key. - * @param {SetObjectRequestV1} setObjectRequestV1 Request body to set an object under a key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setObjectV1: async (setObjectRequestV1: SetObjectRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'setObjectRequestV1' is not null or undefined - assertParamExists('setObjectV1', 'setObjectRequestV1', setObjectRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(setObjectRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Retrieves an object from the object store. - * @param {GetObjectRequestV1} getObjectRequestV1 Request body to obtain an object via its key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getObjectV1(getObjectRequestV1: GetObjectRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getObjectV1(getObjectRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Checks the presence of an object in the object store. - * @param {HasObjectRequestV1} hasObjectRequestV1 Request body to check presence of an object under a key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async hasObjectV1(hasObjectRequestV1: HasObjectRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.hasObjectV1(hasObjectRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Sets an object in the object store under the specified key. - * @param {SetObjectRequestV1} setObjectRequestV1 Request body to set an object under a key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async setObjectV1(setObjectRequestV1: SetObjectRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.setObjectV1(setObjectRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Retrieves an object from the object store. - * @param {GetObjectRequestV1} getObjectRequestV1 Request body to obtain an object via its key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getObjectV1(getObjectRequestV1: GetObjectRequestV1, options?: any): AxiosPromise { - return localVarFp.getObjectV1(getObjectRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Checks the presence of an object in the object store. - * @param {HasObjectRequestV1} hasObjectRequestV1 Request body to check presence of an object under a key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasObjectV1(hasObjectRequestV1: HasObjectRequestV1, options?: any): AxiosPromise { - return localVarFp.hasObjectV1(hasObjectRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Sets an object in the object store under the specified key. - * @param {SetObjectRequestV1} setObjectRequestV1 Request body to set an object under a key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setObjectV1(setObjectRequestV1: SetObjectRequestV1, options?: any): AxiosPromise { - return localVarFp.setObjectV1(setObjectRequestV1, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Retrieves an object from the object store. - * @param {GetObjectRequestV1} getObjectRequestV1 Request body to obtain an object via its key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getObjectV1(getObjectRequestV1: GetObjectRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getObjectV1(getObjectRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Checks the presence of an object in the object store. - * @param {HasObjectRequestV1} hasObjectRequestV1 Request body to check presence of an object under a key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public hasObjectV1(hasObjectRequestV1: HasObjectRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).hasObjectV1(hasObjectRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Sets an object in the object store under the specified key. - * @param {SetObjectRequestV1} setObjectRequestV1 Request body to set an object under a key. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public setObjectV1(setObjectRequestV1: SetObjectRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).setObjectV1(setObjectRequestV1, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/base.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 33f8f8e64b..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Object Store - IPFS - * Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "https://www.cactus.stream".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/common.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index ed521266e2..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Object Store - IPFS - * Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index b7e2946156..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Object Store - IPFS - * Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/index.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 01d66f9a9b..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Object Store - IPFS - * Contains/describes the Hyperledger Cactus Object Store IPFS plugin. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/index.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/index.web.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/kubo-rpc-client-types.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/kubo-rpc-client-types.ts deleted file mode 100644 index d35e8468cd..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/kubo-rpc-client-types.ts +++ /dev/null @@ -1,139 +0,0 @@ -/** - * Since kubo-rpc-client uses ESM only, we can't import it to get types (since we use CJS). - * To fix this we define required types here, based on their counterparts in kubo-rpc-client. - */ - -// TODO: Remove after migration to ESM or if better workaround was found. -// @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. -import type { Multiaddr } from "@multiformats/multiaddr"; -// TODO: Remove after migration to ESM or if better workaround was found. -// @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. -import type { MultihashHasher } from "multiformats/hashes/interface"; -import type { Agent as HttpAgent } from "http"; -import type { Agent as HttpsAgent } from "https"; -// TODO: Remove after migration to ESM or if better workaround was found. -// @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. -import type { CID } from "multiformats/cid"; -// TODO: Remove after migration to ESM or if better workaround was found. -// @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. -import type { Mtime } from "ipfs-unixfs"; - -///////////////////////////////////// -// Types from kubo-rpc-client -///////////////////////////////////// -// Some are simplified when details are not needed - -export type MultibaseCodec = - // TODO: Remove after migration to ESM or if better workaround was found. - // @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. - import("multiformats/bases/interface").MultibaseCodec; -export type BlockCodec< - T1 = any, - T2 = any, - // TODO: Remove after migration to ESM or if better workaround was found. - // @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. -> = import("multiformats/codecs/interface").BlockCodec; - -export interface LoadBaseFn { - (codeOrName: number | string): Promise>; -} -export interface LoadCodecFn { - (codeOrName: number | string): Promise>; -} -export interface LoadHasherFn { - (codeOrName: number | string): Promise; -} - -export interface IPLDOptions { - loadBase: LoadBaseFn; - loadCodec: LoadCodecFn; - loadHasher: LoadHasherFn; - bases: Array>; - codecs: Array>; - hashers: MultihashHasher[]; -} - -export interface Options { - host?: string; - port?: number; - protocol?: string; - headers?: Headers | Record; - timeout?: number | string; - apiPath?: string; - url?: URL | string | Multiaddr; - ipld?: Partial; - agent?: HttpAgent | HttpsAgent; -} - -export type IPFSPath = CID | string; - -export interface StatResult { - cid: CID; - size: number; - cumulativeSize: number; - type: "directory" | "file"; - blocks: number; - withLocality: boolean; - local?: boolean; - sizeLocal?: number; - mode?: number; - mtime?: Mtime; -} - -///////////////////////////////////////////////////////// -// LikeIpfsHttpClient instead of full IpfsHttpClient -///////////////////////////////////////////////////////// - -/** - * Connector only needs these methods to work. - * More methods can be added in the future. - */ -export interface LikeIpfsHttpClientFile { - read: ( - ipfsPath: IPFSPath, - options?: Record, - ) => AsyncIterable; - - write: ( - ipfsPath: string, - content: - | string - | Uint8Array - | Blob - | AsyncIterable - | Iterable, - options?: Record, - ) => Promise; - - stat: ( - ipfsPath: IPFSPath, - options?: Record, - ) => Promise; -} - -export function isLikeIpfsHttpClientFile( - x: unknown, -): x is LikeIpfsHttpClientFile { - if (!x) { - return false; - } - return ( - typeof (x as LikeIpfsHttpClientFile).read === "function" && - typeof (x as LikeIpfsHttpClientFile).write === "function" && - typeof (x as LikeIpfsHttpClientFile).stat === "function" - ); -} - -/** - * Only files API is used - */ -export interface LikeIpfsHttpClient { - files: LikeIpfsHttpClientFile; -} - -export function isLikeIpfsHttpClient(x: unknown): x is LikeIpfsHttpClient { - if (!x) { - return false; - } - return isLikeIpfsHttpClientFile((x as LikeIpfsHttpClient).files); -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-factory-object-store.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-factory-object-store.ts deleted file mode 100644 index 0913751a5c..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-factory-object-store.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactory } from "@hyperledger/cactus-core-api"; - -import { - IPluginObjectStoreIpfsOptions, - PluginObjectStoreIpfs, -} from "./plugin-object-store-ipfs"; - -export class PluginFactoryObjectStore extends PluginFactory< - PluginObjectStoreIpfs, - IPluginObjectStoreIpfsOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginObjectStoreIpfsOptions, - ): Promise { - return new PluginObjectStoreIpfs(pluginOptions); - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts deleted file mode 100644 index 62320bb92a..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts +++ /dev/null @@ -1,217 +0,0 @@ -import path from "path"; -import type { Express } from "express"; -import { RuntimeError } from "run-time-error-cjs"; -import { - Logger, - Checks, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import type { - IPluginObjectStore, - ICactusPluginOptions, - IWebServiceEndpoint, - GetObjectRequestV1, - GetObjectResponseV1, - HasObjectRequestV1, - HasObjectResponseV1, - SetObjectRequestV1, - SetObjectResponseV1, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../json/openapi.json"; - -import { GetObjectEndpointV1 } from "./web-services/get-object-endpoint-v1"; -import { SetObjectEndpointV1 } from "./web-services/set-object-endpoint-v1"; -import { HasObjectEndpointV1 } from "./web-services/has-object-endpoint-v1"; -import { - LikeIpfsHttpClient, - isLikeIpfsHttpClient, - Options, -} from "./kubo-rpc-client-types"; - -export const K_IPFS_JS_HTTP_ERROR_FILE_DOES_NOT_EXIST = - "HTTPError: file does not exist"; - -export interface IPluginObjectStoreIpfsOptions extends ICactusPluginOptions { - readonly logLevel?: LogLevelDesc; - readonly parentDir: string; - readonly ipfsClientOrOptions: Options | LikeIpfsHttpClient; -} - -export class PluginObjectStoreIpfs implements IPluginObjectStore { - public static readonly CLASS_NAME = "PluginObjectStoreIpfs"; - - private ipfs: LikeIpfsHttpClient | undefined; - private readonly log: Logger; - private readonly instanceId: string; - private readonly parentDir: string; - - public get className(): string { - return PluginObjectStoreIpfs.CLASS_NAME; - } - - /** - * We use dynamic import for kubo-rpc-client since it's ESM and we can't import it normally. - * This methods will load the module and initialize local IPFS client based on ctor arguments. - */ - private async initIpfs(): Promise { - if (isLikeIpfsHttpClient(this.opts.ipfsClientOrOptions)) { - this.ipfs = this.opts.ipfsClientOrOptions; - } else if (this.opts.ipfsClientOrOptions) { - const { create } = await import("kubo-rpc-client"); - this.ipfs = create(this.opts.ipfsClientOrOptions); - } else { - const errorMessage = `initIpfs Need either "ipfsClient" or "ipfsClientOptions" to construct ${this.className} Neither was provided.`; - throw new RuntimeError(errorMessage); - } - } - - /** - * Get IPFS client or initialize it from constructor args. - * @returns `LikeIpfsHttpClient` or exception - */ - private async getIpfs(): Promise { - if (!this.ipfs) { - await this.initIpfs(); - } - - if (!this.ipfs) { - throw new Error("Could not instantiate ipfs http client"); - } - - return this.ipfs; - } - - constructor(public readonly opts: IPluginObjectStoreIpfsOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.nonBlankString(opts.instanceId, `${fnTag} options.instanceId`); - Checks.nonBlankString(opts.parentDir, `${fnTag} options.parentDir`); - Checks.truthy(opts.ipfsClientOrOptions, `${fnTag} ipfsClientOrOptions`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.parentDir = this.opts.parentDir; - this.instanceId = this.opts.instanceId; - - this.log.info(`Created ${this.className}. InstanceID=${opts.instanceId}`); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public async onPluginInit(): Promise { - return this.initIpfs(); - } - - public async registerWebServices( - app: Express, - ): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - const { log, opts } = this; - const { logLevel } = opts; - - log.info(`Installing web services for plugin ${this.getPackageName()}...`); - - const endpoints: IWebServiceEndpoint[] = [ - new GetObjectEndpointV1({ - logLevel, - plugin: this, - }), - new SetObjectEndpointV1({ - logLevel, - plugin: this, - }), - new HasObjectEndpointV1({ - logLevel, - plugin: this, - }), - ]; - const pkg = this.getPackageName(); - log.info(`Installed web services for plugin ${pkg} OK`, { endpoints }); - - return endpoints; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-object-store-ipfs`; - } - - public getKeyPath(req: { key: string }): string { - return path.join(this.parentDir, req.key); - } - - public async get(req: GetObjectRequestV1): Promise { - const keyPath = this.getKeyPath(req); - const ipfs = await this.getIpfs(); - const chunksIterable = ipfs.files.read(keyPath); - const chunks = []; - for await (const chunk of chunksIterable) { - chunks.push(chunk); - } - const totalLength = chunks.reduce((sum, it) => sum + it.length, 0); - const array = new Uint8Array(totalLength); - - chunks.reduce((sum, it) => { - array.set(it, sum); - return sum + it.length; - }, 0); - - const value = Buffer.from(array).toString("base64"); - return { key: req.key, value }; - } - - public async has(req: HasObjectRequestV1): Promise { - const checkedAt = new Date().toJSON(); - const keyPath = this.getKeyPath(req); - try { - const ipfs = await this.getIpfs(); - const statResult = await ipfs.files.stat(keyPath); - this.log.debug(`StatResult for ${req.key}: %o`, statResult); - return { key: req.key, checkedAt, isPresent: true }; - } catch (ex) { - if (ex?.stack?.includes(K_IPFS_JS_HTTP_ERROR_FILE_DOES_NOT_EXIST)) { - const msg = `Stat ${req.key} failed with error message containing phrase "${K_IPFS_JS_HTTP_ERROR_FILE_DOES_NOT_EXIST}" Returning isPresent=false ...`; - this.log.debug(msg); - return { key: req.key, checkedAt, isPresent: false }; - } else { - throw new RuntimeError(`Checking presence of ${req.key} crashed:`, ex); - } - } - } - - public async set(req: SetObjectRequestV1): Promise { - const keyPath = this.getKeyPath(req); - try { - this.log.debug(`Seting object ${keyPath} in IPFS...`); - const buffer = Buffer.from(req.value, "base64"); - const ipfs = await this.getIpfs(); - await ipfs.files.write(keyPath, buffer, { - create: true, - parents: true, - }); - } catch (ex) { - throw new RuntimeError(`Can't set object ${keyPath}. Write failed:`, ex); - } - return { - key: req.key, - }; - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/public-api.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/public-api.ts deleted file mode 100755 index 3a2fd6d45c..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/public-api.ts +++ /dev/null @@ -1,20 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; -export { - Options, - LikeIpfsHttpClientFile, - LikeIpfsHttpClient, -} from "./kubo-rpc-client-types"; -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -export { - PluginObjectStoreIpfs, - IPluginObjectStoreIpfsOptions, -} from "./plugin-object-store-ipfs"; -export { PluginFactoryObjectStore } from "./plugin-factory-object-store"; - -import { PluginFactoryObjectStore } from "./plugin-factory-object-store"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryObjectStore(pluginFactoryOptions); -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/web-services/get-object-endpoint-v1.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/web-services/get-object-endpoint-v1.ts deleted file mode 100644 index 427fa0f201..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/web-services/get-object-endpoint-v1.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - GetObjectRequestV1, - IEndpointAuthzOptions, - IExpressRequestHandler, - IPluginObjectStore, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; - -export interface IGetObjectEndpointV1Options { - readonly logLevel?: LogLevelDesc; - readonly plugin: IPluginObjectStore; -} - -export class GetObjectEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetObjectEndpointV1"; - - private readonly log: Logger; - private readonly plugin: IPluginObjectStore; - - public get className(): string { - return GetObjectEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IGetObjectEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.plugin`); - - this.plugin = options.plugin; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Instantiated ${this.className} OK`); - } - - private getOperation() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object" - ].post; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - return this.getOperation()["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.getOperation()["x-hyperledger-cacti"].http.path; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - const reqBody = req.body as GetObjectRequestV1; - this.log.debug(`${tag} %o`, reqBody); - const resBody = await this.plugin.get(reqBody); - res.status(200); - res.json(resBody); - } catch (ex) { - this.log.error(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: ex.stack }); - } - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/web-services/has-object-endpoint-v1.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/web-services/has-object-endpoint-v1.ts deleted file mode 100644 index 3ae6b08967..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/web-services/has-object-endpoint-v1.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - HasObjectRequestV1, - IEndpointAuthzOptions, - IExpressRequestHandler, - IPluginObjectStore, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; - -export interface IHasObjectEndpointV1Options { - readonly logLevel?: LogLevelDesc; - readonly plugin: IPluginObjectStore; -} - -export class HasObjectEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "HasObjectEndpointV1"; - - private readonly log: Logger; - private readonly plugin: IPluginObjectStore; - - public get className(): string { - return HasObjectEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IHasObjectEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.plugin`); - - this.plugin = options.plugin; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Instantiated ${this.className} OK`); - } - - private getOperation() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object" - ].post; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - return this.getOperation()["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.getOperation()["x-hyperledger-cacti"].http.path; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - const reqBody = req.body as HasObjectRequestV1; - this.log.debug(`${tag} %o`, reqBody); - const resBody = await this.plugin.has(reqBody); - res.status(200); - res.json(resBody); - } catch (ex) { - this.log.error(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: ex.stack }); - } - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/web-services/set-object-endpoint-v1.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/web-services/set-object-endpoint-v1.ts deleted file mode 100644 index e0e97d8b80..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/web-services/set-object-endpoint-v1.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - SetObjectRequestV1, - IEndpointAuthzOptions, - IExpressRequestHandler, - IPluginObjectStore, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; - -export interface ISetObjectEndpointV1Options { - readonly logLevel?: LogLevelDesc; - readonly plugin: IPluginObjectStore; -} - -export class SetObjectEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "SetObjectEndpointV1"; - - private readonly log: Logger; - private readonly plugin: IPluginObjectStore; - - public get className(): string { - return SetObjectEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ISetObjectEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.plugin`); - - this.plugin = options.plugin; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Instantiated ${this.className} OK`); - } - - private getOperation() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object" - ].post; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - return this.getOperation()["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.getOperation()["x-hyperledger-cacti"].http.path; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - const reqBody = req.body as SetObjectRequestV1; - this.log.debug(`${tag} %o`, reqBody); - const resBody = await this.plugin.set(reqBody); - res.status(200); - res.json(resBody); - } catch (ex) { - this.log.error(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: ex.stack }); - } - } -} diff --git a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/api-surface.test.ts b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts deleted file mode 100644 index bc8f322506..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts +++ /dev/null @@ -1,160 +0,0 @@ -import test, { Test } from "tape-promise/tape"; - -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; - -import { - IListenOptions, - Servers, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - GoIpfsTestContainer, - Containers, -} from "@hyperledger/cactus-test-tooling"; - -import { PluginObjectStoreIpfs } from "../../../main/typescript"; -import { DefaultApi as ObjectStoreIpfsApi } from "../../../main/typescript/public-api"; - -const logLevel: LogLevelDesc = "TRACE"; -const testCase = "can work with go-ipfs container get/set/has operations"; - -test(testCase, async (t: Test) => { - test.onFailure(async () => { - await Containers.logDiagnostics({ logLevel }); - }); - test.onFinish(async () => { - await ipfsContainer.stop(); - await ipfsContainer.destroy(); - }); - const ipfsContainer = new GoIpfsTestContainer({ logLevel }); - t.ok(ipfsContainer, "GoIpfsTestContainer instance truthy OK"); - - const container = await ipfsContainer.start(); - t.ok(container, "Container returned by start() truthy OK"); - t.ok(container, "Started GoIpfsTestContainer OK"); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const config = new Configuration({ basePath: apiHost }); - const apiClient = new ObjectStoreIpfsApi(config); - t.ok(apiClient, "ObjectStoreIpfsApi truthy OK"); - - const ipfsApiUrl = await ipfsContainer.getApiUrl(); - const ipfsGatewayUrl = await ipfsContainer.getWebGatewayUrl(); - t.comment(`Go IPFS Test Container API URL: ${ipfsApiUrl}`); - t.comment(`Go IPFS Test Container Gateway URL: ${ipfsGatewayUrl}`); - - const { create } = await import("kubo-rpc-client"); - - const ipfsClientOrOptions = create({ - url: ipfsApiUrl, - }); - const instanceId = uuidv4(); - const plugin = new PluginObjectStoreIpfs({ - parentDir: `/${uuidv4()}/${uuidv4()}/`, - logLevel, - instanceId, - ipfsClientOrOptions, - }); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - - const packageName = plugin.getPackageName(); - t.ok(packageName, "packageName truthy OK"); - - const theInstanceId = plugin.getInstanceId(); - t.ok(theInstanceId, "theInstanceId truthy OK"); - t.equal(theInstanceId, instanceId, "instanceId === theInstanceId OK"); - - const key1 = uuidv4(); - const value1 = Buffer.from(uuidv4()).toString("base64"); - const value2 = Buffer.from(uuidv4()).toString("base64"); - - const res1 = await apiClient.setObjectV1({ key: key1, value: value1 }); - t.ok(res1, "res1 truthy OK"); - t.ok(res1.status, "res1.status truthy OK"); - t.true(res1.status > 199, "res1.status > 199 true OK"); - t.true(res1.status < 300, "res1.status < 300 true OK"); - t.ok(res1.data, "res1.data truthy OK"); - t.ok(res1.data.key, "res1.data.key truthy OK"); - t.equal(res1.data.key, key1, "equal res1.data.key, key1 OK"); - - const res2 = await apiClient.getObjectV1({ key: key1 }); - t.ok(res2, "res2 truthy OK"); - t.ok(res2.status, "res2.status truthy OK"); - t.true(res2.status > 199, "res2.status > 199 true OK"); - t.true(res2.status < 300, "res2.status < 300 true OK"); - t.ok(res2.data, "res2.data truthy OK"); - t.ok(res2.data.key, "res2.data.key truthy OK"); - t.equal(res2.data.key, key1, "equal res2.data.key, key1 OK"); - t.equal(res2.data.value, value1, "equal res2.data.value, value1 OK"); - - const res3 = await apiClient.hasObjectV1({ key: key1 }); - t.ok(res3, "res3 truthy OK"); - t.ok(res3.status, "res3.status truthy OK"); - t.true(res3.status > 199, "res3.status > 199 true OK"); - t.true(res3.status < 300, "res3.status < 300 true OK"); - t.ok(res3.data, "res3.data truthy OK"); - t.ok(res3.data.key, "res3.data.key truthy OK"); - t.equal(res3.data.key, key1, "equal res3.data.key, key1 OK"); - t.equal(res3.data.isPresent, true, "equal res3.data.isPresent, true OK"); - - const res4 = await apiClient.setObjectV1({ key: key1, value: value1 }); - t.ok(res4, "res4 truthy OK"); - t.ok(res4.status, "res4.status truthy OK"); - t.true(res4.status > 199, "res4.status > 199 true OK"); - t.true(res4.status < 300, "res4.status < 300 true OK"); - t.ok(res4.data, "res4.data truthy OK"); - t.ok(res4.data.key, "res4.data.key truthy OK"); - t.equal(res4.data.key, key1, "equal res4.data.key, key1 OK"); - - // Verify that overwriting the same key works by setting and then getting it. - const res5 = await apiClient.setObjectV1({ key: key1, value: value2 }); - t.ok(res5, "res5 truthy OK"); - t.ok(res5.status, "res5.status truthy OK"); - t.true(res5.status > 199, "res5.status > 199 true OK"); - t.true(res5.status < 300, "res5.status < 300 true OK"); - t.ok(res5.data, "res5.data truthy OK"); - t.ok(res5.data.key, "res5.data.key truthy OK"); - t.equal(res5.data.key, key1, "equal res5.data.key, key1 OK"); - - const res6 = await apiClient.getObjectV1({ key: key1 }); - t.ok(res6, "res6 truthy OK"); - t.ok(res6.status, "res6.status truthy OK"); - t.true(res6.status > 199, "res6.status > 199 true OK"); - t.true(res6.status < 300, "res6.status < 300 true OK"); - t.ok(res6.data, "res6.data truthy OK"); - t.ok(res6.data.key, "res6.data.key truthy OK"); - t.equal(res6.data.key, key1, "equal res6.data.key, key1 OK"); - t.equal(res6.data.value, value2, "equal res6.data.value, value2 OK"); - - const key3 = uuidv4(); - const res7 = await apiClient.hasObjectV1({ key: key3 }); - t.ok(res7, "res7 truthy OK"); - t.ok(res7.status, "res7.status truthy OK"); - t.true(res7.status > 199, "res7.status > 199 true OK"); - t.true(res7.status < 300, "res7.status < 300 true OK"); - t.ok(res7.data, "res7.data truthy OK"); - t.ok(res7.data.key, "res7.data.key truthy OK"); - t.equal(res7.data.key, key3, "equal res7.data.key, key3 OK"); - t.false(res7.data.isPresent, "false res7.data.isPresent OK"); - - t.end(); -}); diff --git a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/api-surface.test.ts b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts deleted file mode 100644 index b67e82c8b1..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts +++ /dev/null @@ -1,162 +0,0 @@ -import type { AddressInfo } from "net"; -import http from "http"; -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; - -import { Servers } from "@hyperledger/cactus-common"; -import type { IListenOptions, LogLevelDesc } from "@hyperledger/cactus-common"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -import { PluginObjectStoreIpfs } from "../../../main/typescript"; -import type { IPluginObjectStoreIpfsOptions } from "../../../main/typescript"; -import { DefaultApi as ObjectStoreIpfsApi } from "../../../main/typescript/public-api"; - -test("PluginObjectStoreIpfs", async (t1: Test) => { - const logLevel: LogLevelDesc = "TRACE"; - const kuboRpcModule = await import("kubo-rpc-client"); - const ipfsClientOrOptions = kuboRpcModule.create(); - t1.doesNotThrow( - () => - new PluginObjectStoreIpfs({ - instanceId: "a", - ipfsClientOrOptions, - parentDir: "/" + uuidv4(), - }), - ); - - test("Validates constructor arg instanceId", (t: Test) => { - t.throws( - () => - new PluginObjectStoreIpfs({ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - instanceId: null as any, - ipfsClientOrOptions, - parentDir: "/" + uuidv4(), - }), - ); - t.throws( - () => - new PluginObjectStoreIpfs({ - instanceId: "", - ipfsClientOrOptions, - parentDir: "/" + uuidv4(), - }), - ); - t.end(); - }); - - test.skip("get,set,has,delete alters state as expected", async (t: Test) => { - const kuboRpcModule = await import("kubo-rpc-client"); - const options: IPluginObjectStoreIpfsOptions = { - ipfsClientOrOptions: kuboRpcModule.create(), // FIXME: use an actual mock IPFS client - instanceId: uuidv4(), - parentDir: "/" + uuidv4(), - logLevel, - }; - const plugin = new PluginObjectStoreIpfs(options); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const config = new Configuration({ basePath: apiHost }); - const apiClient = new ObjectStoreIpfsApi(config); - t.ok(apiClient, "ObjectStoreIpfsApi truthy OK"); - - await plugin.getOrCreateWebServices(); - t.pass("plugin.getOrCreateWebServices() OK"); - await plugin.registerWebServices(expressApp); - t.pass("plugin.registerWebServices() OK"); - - t.equal(plugin.getInstanceId(), options.instanceId, "Instance ID set OK"); - - const key1 = uuidv4(); - const value1 = Buffer.from(uuidv4()).toString("base64"); - - const res1 = await apiClient.hasObjectV1({ key: key1 }); - t.ok(res1, "res1 truthy OK"); - t.ok(res1.status, "res1.status truthy OK"); - t.true(res1.status > 199, "res1.status > 199 true OK"); - t.true(res1.status < 300, "res1.status < 300 true OK"); - t.ok(res1.data, "res1.data truthy OK"); - t.ok(res1.data.key, "res1.data.key truthy OK"); - t.equal(res1.data.key, key1, "equal res1.data.key, key1 OK"); - t.equal(res1.data.isPresent, false, "equal res1.data.isPresent, false OK"); - - const res2 = await apiClient.setObjectV1({ key: key1, value: value1 }); - t.ok(res2, "res2 truthy OK"); - t.ok(res2.status, "res2.status truthy OK"); - t.true(res2.status > 199, "res2.status > 199 true OK"); - t.true(res2.status < 300, "res2.status < 300 true OK"); - t.ok(res2.data, "res2.data truthy OK"); - t.ok(res2.data.key, "res2.data.key truthy OK"); - t.equal(res2.data.key, key1, "equal res2.data.key, key1 OK"); - - const res3 = await apiClient.hasObjectV1({ key: key1 }); - t.ok(res3, "res3 truthy OK"); - t.ok(res3.status, "res3.status truthy OK"); - t.true(res3.status > 199, "res3.status > 199 true OK"); - t.true(res3.status < 300, "res3.status < 300 true OK"); - t.ok(res3.data, "res3.data truthy OK"); - t.ok(res3.data.key, "res3.data.key truthy OK"); - t.equal(res3.data.key, key1, "equal res3.data.key, key1 OK"); - t.equal(res3.data.isPresent, true, "equal res3.data.isPresent, true OK"); - - const res4 = await apiClient.getObjectV1({ key: key1 }); - t.ok(res4, "res4 truthy OK"); - t.ok(res4.status, "res4.status truthy OK"); - t.true(res4.status > 199, "res4.status > 199 true OK"); - t.true(res4.status < 300, "res4.status < 300 true OK"); - t.ok(res4.data, "res4.data truthy OK"); - t.ok(res4.data.key, "res4.data.key truthy OK"); - t.equal(res4.data.key, key1, "equal res4.data.key, key1 OK"); - t.equal(res4.data.value, value1, "equal res4.data.value, value1 OK"); - - const key2 = uuidv4(); - const value2 = Buffer.from(uuidv4()).toString("base64"); - - const res5 = await apiClient.setObjectV1({ key: key2, value: value2 }); - t.ok(res5, "res5 truthy OK"); - t.ok(res5.status, "res5.status truthy OK"); - t.true(res5.status > 199, "res5.status > 199 true OK"); - t.true(res5.status < 300, "res5.status < 300 true OK"); - t.ok(res5.data, "res5.data truthy OK"); - t.ok(res5.data.key, "res5.data.key truthy OK"); - t.equal(res5.data.key, key2, "equal res5.data.key, key2 OK"); - - const res6 = await apiClient.hasObjectV1({ key: key2 }); - t.ok(res6, "res6 truthy OK"); - t.ok(res6.status, "res6.status truthy OK"); - t.true(res6.status > 199, "res6.status > 199 true OK"); - t.true(res6.status < 300, "res6.status < 300 true OK"); - t.ok(res6.data, "res6.data truthy OK"); - t.ok(res6.data.key, "res6.data.key truthy OK"); - t.equal(res6.data.key, key2, "equal res6.data.key, key2 OK"); - t.true(res6.data.isPresent, "true res6.data.isPresent, true OK"); - - const res7 = await apiClient.getObjectV1({ key: key2 }); - t.ok(res7, "res7 truthy OK"); - t.ok(res7.status, "res7.status truthy OK"); - t.true(res7.status > 199, "res7.status > 199 true OK"); - t.true(res7.status < 300, "res7.status < 300 true OK"); - t.ok(res7.data, "res7.data truthy OK"); - t.ok(res7.data.key, "res7.data.key truthy OK"); - t.equal(res7.data.key, key2, "equal res7.data.key, key2 OK"); - t.equal(res7.data.value, value2, "equal res7.data.value, value2 OK"); - - t.end(); - }); - - t1.end(); -}); diff --git a/extensions/cactus-plugin-object-store-ipfs/tsconfig.json b/extensions/cactus-plugin-object-store-ipfs/tsconfig.json deleted file mode 100644 index b377b543c3..0000000000 --- a/extensions/cactus-plugin-object-store-ipfs/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-object-store-ipfs.tsbuildinfo", - "skipLibCheck": true, - "composite": true, - "module": "Node16", - "moduleResolution": "Node16" - }, - "include": ["./src", "src/**/*.json"], - "references": [ - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../../packages/cactus-test-tooling/tsconfig.json" - } - ] -} diff --git a/lerna.json b/lerna.json index f7a1ed380f..8bcef39cdb 100644 --- a/lerna.json +++ b/lerna.json @@ -1,22 +1,8 @@ { "packages": [ - "packages/cactus-*", - "examples/cactus-*", - "extensions/cactus-*", - "packages/cacti-*", - "examples/cacti-*", - "extensions/cacti-*", - "weaver/common/protos-js", - "weaver/sdks/fabric/interoperation-node-sdk", - "weaver/sdks/besu/node", - "weaver/core/drivers/fabric-driver", - "weaver/core/identity-management/iin-agent", - "weaver/samples/fabric/fabric-cli", - "weaver/samples/besu/besu-cli", - "weaver/samples/besu/simpleasset", - "weaver/samples/besu/simplestate" + "packages/cactus-*" ], - "version": "2.0.0", + "version": "2.0.6-twopackage", "npmClient": "yarn", "useWorkspaces": "true", "command": { diff --git a/package.json b/package.json index c175dda0ba..15a61a2862 100644 --- a/package.json +++ b/package.json @@ -5,21 +5,7 @@ "description": "Root project for Cactus which contains all core components and plugins developed by the project.", "workspaces": { "packages": [ - "packages/cactus-*", - "examples/cactus-*", - "extensions/cactus-*", - "packages/cacti-*", - "examples/cacti-*", - "extensions/cacti-*", - "weaver/common/protos-js", - "weaver/sdks/fabric/interoperation-node-sdk", - "weaver/sdks/besu/node", - "weaver/core/drivers/fabric-driver", - "weaver/core/identity-management/iin-agent", - "weaver/samples/fabric/fabric-cli", - "weaver/samples/besu/besu-cli", - "weaver/samples/besu/simpleasset", - "weaver/samples/besu/simplestate" + "packages/cactus-*" ] }, "scripts": { diff --git a/packages/cacti-ledger-browser/.env.template b/packages/cacti-ledger-browser/.env.template deleted file mode 100644 index 03f2a4e0f1..0000000000 --- a/packages/cacti-ledger-browser/.env.template +++ /dev/null @@ -1,3 +0,0 @@ -VITE_SUPABASE_URL=__SUPABSE_URL__ -VITE_SUPABASE_KEY=__SUPABASE_KEY__ -VITE_SUPABASE_SCHEMA=public \ No newline at end of file diff --git a/packages/cacti-ledger-browser/CHANGELOG.md b/packages/cacti-ledger-browser/CHANGELOG.md deleted file mode 100644 index f9c1323f4c..0000000000 --- a/packages/cacti-ledger-browser/CHANGELOG.md +++ /dev/null @@ -1,83 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cacti-ledger-browser - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cacti-ledger-browser - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cacti-ledger-browser - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Features - -* **ledger-browser:** implement dynamic app setup ([0e368de](https://github.com/hyperledger/cacti/commit/0e368de059d30e099a8979989949ca34834ffdf9)), closes [#3347](https://github.com/hyperledger/cacti/issues/3347) -* **ledger-browser:** refactor home page ([500ac9b](https://github.com/hyperledger/cacti/commit/500ac9ba8ac9d6694e0838d34871028ace896a9c)), closes [#3320](https://github.com/hyperledger/cacti/issues/3320) -* **ledger-browser:** rewrite fabric application ([ecf074c](https://github.com/hyperledger/cacti/commit/ecf074c8c6d5ed67eed2e490c653b41aae691c19)), closes [#3308](https://github.com/hyperledger/cacti/issues/3308) [#3279](https://github.com/hyperledger/cacti/issues/3279) -* **persistence-ethereum:** migrate to separate db schema ([b160c52](https://github.com/hyperledger/cacti/commit/b160c52f1a99f8019beb8af9d4f8c0b46cf1953c)), closes [#3340](https://github.com/hyperledger/cacti/issues/3340) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Features - -* **ledger-browser:** refactor eth dashboard page ([c69fb4c](https://github.com/hyperledger/cacti/commit/c69fb4c5982669d335870218c617ff847fbe1db9)), closes [#3207](https://github.com/hyperledger/cacti/issues/3207) -* **ledger-browser:** refactor eth tokens page into accounts page ([0b0c22c](https://github.com/hyperledger/cacti/commit/0b0c22cd39fb67e809595ceb23fb8b3c2a0f1da0)), closes [#3237](https://github.com/hyperledger/cacti/issues/3237) -* **ledger-browser:** refactor routing, improve UI ([3fcc7a1](https://github.com/hyperledger/cacti/commit/3fcc7a1215435341db927ec211af598a0a298d44)) -* **ledger-browser:** use react query in eth app ([4d3fb7e](https://github.com/hyperledger/cacti/commit/4d3fb7e25d78804ffda498e9cdd4600bf0a50f0c)), closes [#3203](https://github.com/hyperledger/cacti/issues/3203) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **ledger-browser:** fix vulnerability CVE-2022-37601 ([55c7d3d](https://github.com/hyperledger/cacti/commit/55c7d3d8054af35eb903ee903a91b8f23b905998)) diff --git a/packages/cacti-ledger-browser/README.md b/packages/cacti-ledger-browser/README.md deleted file mode 100644 index 950cbafbd1..0000000000 --- a/packages/cacti-ledger-browser/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# `@hyperledger/cacti-ledger-browser` - -This component allows viewing ledger data in Supabase or other postgreSQL compatible database. The data is fed to supabase by persistence plugins for each ledgers. - -## Summary - -- [`@hyperledger/cacti-ledger-browser`](#hyperledgercacti-gui-tx-viewer) - - [Summary](#summary) - - [Remarks](#remarks) - - [Getting Started](#getting-started) - - [Prerequisites using yarn](#prerequisites-using-yarn) - - [Alternative Prerequisites using npm](#alternative-prerequisites-using-npm) - - [Usage](#usage) - - [Contributing](#contributing) - - [License](#license) - - [Acknowledgments](#acknowledgments) - -## Remarks - -- Plugin requires running Supabase or other database and persistence plugins in order to properly view ledger data. -- Currently, fabric and ethereum based ledgers are supported. - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on your local machine for development and testing purposes. - -### Prerequisites using yarn - -In the root of the project, execute the command to install and build the dependencies. It will also build this GUI front-end component: - -```sh -yarn run build -``` - -### Alternative Prerequisites using npm - -In the root of the project, execute the command to install and build the dependencies. It will also build this GUI front-end component: - -```sh -npm install -``` - -### Usage - -- Run Supabase instance (see documentation for detailed instructions). For development purposes, you can use our image located in `tools/docker/supabase-all-in-one`. -- Run one or more persistence plugins: - - [Ethereum](../cacti-plugin-persistence-ethereum) - - [Fabric] (../cacti-plugin-persistence-fabric) -- Edit Supabase configuration files, set correct supabase API URL and service_role key. - - ./src/main/typescript/common/supabase-client.tsx - - ./src/main/typescript/common/queries.ts -- Execute `yarn run start` or `npm start` in this package directory. -- The running application address: http://localhost:3001/ (can be changed in [Vite configuration](./vite.config.ts)) - -## Contributing - -We welcome contributions to Hyperledger Cacti in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments diff --git a/packages/cacti-ledger-browser/index.html b/packages/cacti-ledger-browser/index.html deleted file mode 100644 index 84e2a7a8d1..0000000000 --- a/packages/cacti-ledger-browser/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - Cacti Ledger Browser - - - -
- - - - \ No newline at end of file diff --git a/packages/cacti-ledger-browser/package.json b/packages/cacti-ledger-browser/package.json deleted file mode 100644 index 9be755f9c3..0000000000 --- a/packages/cacti-ledger-browser/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "@hyperledger/cacti-ledger-browser", - "version": "2.0.0", - "private": true, - "description": "Cacti GUI for visualizing ledger data build on react.", - "keywords": [ - "Hyperledger", - "Cacti", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - }, - { - "name": "Tomasz Awramski", - "email": "tomasz.awramski@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "scripts": { - "build": "yarn run tsc && yarn run build:prod:frontend", - "build:dev:frontend": "vite build --mode=development", - "build:prod:frontend": "vite build", - "serve": "vite preview", - "start": "vite", - "tsc": "tsc --build --verbose" - }, - "dependencies": { - "@emotion/react": "11.11.4", - "@emotion/styled": "11.11.5", - "@mui/icons-material": "5.15.10", - "@mui/lab": "5.0.0-alpha.170", - "@mui/material": "5.15.15", - "@supabase/supabase-js": "1.35.6", - "@tanstack/react-query": "5.29.2", - "apexcharts": "3.45.2", - "axios": "1.7.7", - "buffer": "6.0.3", - "ethers": "6.12.1", - "react": "18.2.0", - "react-apexcharts": "1.4.1", - "react-dom": "18.2.0", - "react-router-dom": "6.21.3", - "web3": "4.1.1" - }, - "devDependencies": { - "@tanstack/eslint-plugin-query": "5.28.11", - "@tanstack/react-query-devtools": "5.29.2", - "@types/react": "18.2.43", - "@types/react-dom": "18.2.17", - "@vitejs/plugin-react": "4.2.1", - "typescript": "5.5.2", - "vite": "5.4.8" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/cacti-ledger-browser/public/hyperledgerfavicon.webp b/packages/cacti-ledger-browser/public/hyperledgerfavicon.webp deleted file mode 100644 index f169b55239..0000000000 Binary files a/packages/cacti-ledger-browser/public/hyperledgerfavicon.webp and /dev/null differ diff --git a/packages/cacti-ledger-browser/src/main/sql/schema.sql b/packages/cacti-ledger-browser/src/main/sql/schema.sql deleted file mode 100644 index 03915a4276..0000000000 --- a/packages/cacti-ledger-browser/src/main/sql/schema.sql +++ /dev/null @@ -1,52 +0,0 @@ -ALTER SCHEMA extensions OWNER TO postgres; -ALTER SCHEMA public OWNER TO postgres; - --- Table: public.plugin_status --- DROP TABLE IF EXISTS public.plugin_status; - -CREATE TABLE IF NOT EXISTS public.plugin_status -( - name text COLLATE pg_catalog."default" NOT NULL, - last_instance_id text COLLATE pg_catalog."default" NOT NULL, - is_schema_initialized boolean NOT NULL, - created_at timestamp with time zone NOT NULL DEFAULT now(), - last_connected_at timestamp with time zone NOT NULL DEFAULT now(), - CONSTRAINT plugin_status_pkey PRIMARY KEY (name), - CONSTRAINT plugin_status_name_key UNIQUE (name) -) - -TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.plugin_status - OWNER to postgres; - -GRANT ALL ON TABLE public.plugin_status TO anon; -GRANT ALL ON TABLE public.plugin_status TO authenticated; -GRANT ALL ON TABLE public.plugin_status TO postgres; -GRANT ALL ON TABLE public.plugin_status TO service_role; - - --- Table: public.gui_app_config --- DROP TABLE IF EXISTS public.gui_app_config; - -CREATE TABLE public.gui_app_config ( - id uuid DEFAULT gen_random_uuid() NOT NULL, - app_id text NOT NULL, - instance_name text NOT NULL, - description text NOT NULL, - path text NOT NULL, - options json, - created_at timestamp with time zone DEFAULT now() NOT NULL, - CONSTRAINT gui_app_config_pkey PRIMARY KEY (id), - CONSTRAINT gui_app_config_path_key UNIQUE (path) -) - -TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.gui_app_config - OWNER to postgres; - -GRANT ALL ON TABLE public.gui_app_config TO anon; -GRANT ALL ON TABLE public.gui_app_config TO authenticated; -GRANT ALL ON TABLE public.gui_app_config TO postgres; -GRANT ALL ON TABLE public.gui_app_config TO service_role; diff --git a/packages/cacti-ledger-browser/src/main/typescript/CactiLedgerBrowserApp.tsx b/packages/cacti-ledger-browser/src/main/typescript/CactiLedgerBrowserApp.tsx deleted file mode 100644 index 7923d037d4..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/CactiLedgerBrowserApp.tsx +++ /dev/null @@ -1,140 +0,0 @@ -import { - useRoutes, - BrowserRouter, - RouteObject, - Outlet, -} from "react-router-dom"; -import CssBaseline from "@mui/material/CssBaseline"; -import CircularProgress from "@mui/material/CircularProgress"; -import { ThemeProvider, createTheme } from "@mui/material/styles"; -import { - QueryClient, - QueryClientProvider, - useQuery, -} from "@tanstack/react-query"; -// import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; - -import { themeOptions } from "./theme"; -import ContentLayout from "./components/Layout/ContentLayout"; -import HeaderBar from "./components/Layout/HeaderBar"; -import HomePage from "./pages/home/HomePage"; -import { AppInstance } from "./common/types/app"; -import { patchAppRoutePath } from "./common/utils"; -import { NotificationProvider } from "./common/context/NotificationContext"; -import { guiAppConfig } from "./common/queries"; -import createApplications from "./common/createApplications"; -import ConnectionFailedDialog from "./components/ConnectionFailedDialog/ConnectionFailedDialog"; - -/** - * Create header bar for each app based on app menuEntries field in config. - */ -function getHeaderBarRoutes(appConfig: AppInstance[]) { - const headerRoutesConfig = appConfig.map((app) => { - return { - key: app.path, - path: `${app.path}/*`, - element: ( - - ), - }; - }); - headerRoutesConfig.push({ - key: "home", - path: `*`, - element: ( - - ), - }); - return useRoutes(headerRoutesConfig); -} - -/** - * Create content routes - */ -function getContentRoutes(appConfig: AppInstance[]) { - const appRoutes: RouteObject[] = appConfig.map((app) => { - return { - key: app.path, - path: app.path, - element: , - children: app.routes.map((route) => { - return { - key: route.path, - path: patchAppRoutePath(app.path, route.path), - element: route.element, - children: route.children, - }; - }), - }; - }); - - // Include landing / welcome page - appRoutes.push({ - index: true, - element: , - }); - - return useRoutes([ - { - path: "/", - element: , - children: appRoutes, - }, - ]); -} - -function App() { - const { isError, isPending, data } = useQuery(guiAppConfig()); - - if (isError) { - return ; - } - - const appConfig = createApplications(data); - - const headerRoutes = getHeaderBarRoutes(appConfig); - const contentRoutes = getContentRoutes(appConfig); - - return ( -
- {isPending && ( - - )} - {headerRoutes} - {contentRoutes} -
- ); -} - -// MUI Theme -const theme = createTheme(themeOptions); - -// React Query client -const queryClient = new QueryClient(); - -export default function CactiLedgerBrowserApp() { - return ( - - - - - - - {/* */} - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/AccountERC20View.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/AccountERC20View.tsx deleted file mode 100644 index 8d7eb3ff6d..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/AccountERC20View.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import React from "react"; -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; -import Divider from "@mui/material/Divider"; - -import ERC20TokenList from "./ERC20TokenList"; -import ERC20TokenDetails from "./ERC20TokenDetails"; -import { TokenERC20 } from "../../supabase-types"; - -export type AccountERC20ViewProps = { - accountAddress: string; -}; - -export default function AccountERC20View({ - accountAddress, -}: AccountERC20ViewProps) { - const [selectedToken, setSelectedToken] = React.useState< - TokenERC20 | undefined - >(undefined); - - const tokenDetailsId = selectedToken - ? `${selectedToken.token_address}-${selectedToken.account_address}` - : "token-not-selected"; - - return ( - - - ERC20 - - - - setSelectedToken(token)} - /> - - - - - - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20BalanceHistoryChart.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20BalanceHistoryChart.tsx deleted file mode 100644 index b6a537cac6..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20BalanceHistoryChart.tsx +++ /dev/null @@ -1,93 +0,0 @@ -import Chart from "react-apexcharts"; -import { useTheme } from "@mui/material"; - -import { BalanceHistoryListData } from "./balanceHistory"; - -export type ERC20BalanceHistoryChartProps = { - data: BalanceHistoryListData[]; - height?: string | number; -}; - -export default function ERC20BalanceHistoryChart({ - data, - height, -}: ERC20BalanceHistoryChartProps) { - if (!data) { - return; - } - - const theme = useTheme(); - - return ( - <> - {/* Style overwrite for Apex Charts to use colors from the theme for toolbar buttons (right-top of the chart) */} - - - {/* Chart component */} - txn.created_at), - labels: { - format: "dd-MM-yyyy h:mm", - }, - }, - yaxis: { - title: { - text: "Balance", - }, - }, - stroke: { - curve: "stepline", - }, - markers: { - size: 6, - }, - tooltip: { - x: { - format: "dd-MM-yyyy h:mm:ss", - }, - }, - }} - series={[ - { - name: "Balance", - data: data.map((txn) => txn.balance), - }, - ]} - type="line" - height={height} - /> - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20BalanceHistoryTable.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20BalanceHistoryTable.tsx deleted file mode 100644 index fc935b9e0a..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20BalanceHistoryTable.tsx +++ /dev/null @@ -1,168 +0,0 @@ -import * as React from "react"; -import { styled } from "@mui/material/styles"; -import Box from "@mui/material/Box"; -import Table from "@mui/material/Table"; -import TableBody from "@mui/material/TableBody"; -import TableCell from "@mui/material/TableCell"; -import TableContainer from "@mui/material/TableContainer"; -import TableFooter from "@mui/material/TableFooter"; -import TablePagination from "@mui/material/TablePagination"; -import TableRow from "@mui/material/TableRow"; -import Paper from "@mui/material/Paper"; -import TableHead from "@mui/material/TableHead"; -import Typography from "@mui/material/Typography"; -import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown"; -import ArrowDropUpIcon from "@mui/icons-material/ArrowDropUp"; - -import ShortenedTypography from "../../../../components/ui/ShortenedTypography"; -import { TokenHistoryItem20 } from "../../supabase-types"; - -const StyledHeaderCell = styled(TableCell)(({ theme }) => ({ - color: theme.palette.primary.main, - fontWeight: "bold", -})); - -export type BalanceAmountTextProps = { - children: React.ReactNode; -}; - -function PositiveBalanceAmountText({ children }: BalanceAmountTextProps) { - return ( - - - {children} - - - - ); -} - -function NegativeBalanceAmountText({ children }: BalanceAmountTextProps) { - return ( - - - {children} - - - - ); -} - -export type ERC20BalanceHistoryTableProps = { - data: TokenHistoryItem20[]; - ownerAddress: string; -}; - -function formatCreatedAtDate(createdAt: string) { - const date = new Date(createdAt); - return date.toUTCString(); -} - -export default function ERC20BalanceHistoryTable({ - data, - ownerAddress, -}: ERC20BalanceHistoryTableProps) { - const [page, setPage] = React.useState(0); - const [rowsPerPage, setRowsPerPage] = React.useState(5); - const sortedData = [...data].sort((a, b) => - b.created_at.localeCompare(a.created_at), - ); - - // Avoid a layout jump when reaching the last page with empty rows. - const emptyRows = - page > 0 ? Math.max(0, (1 + page) * rowsPerPage - sortedData.length) : 0; - - return ( - - - - - Time - Hash - From/To - Amount - - - - {(rowsPerPage > 0 - ? sortedData.slice( - page * rowsPerPage, - page * rowsPerPage + rowsPerPage, - ) - : sortedData - ).map((row) => { - const isReceiving = row.recipient === ownerAddress; - - return ( - - {formatCreatedAtDate(row.created_at)} - - - - - {isReceiving ? ( - - ) : ( - - )} - - - {isReceiving ? ( - - {row.value} - - ) : ( - - -{row.value} - - )} - - - ); - })} - {emptyRows > 0 && ( - - - - )} - - - - { - setPage(newPage); - }} - onRowsPerPageChange={(event) => { - setRowsPerPage(parseInt(event.target.value, 10)); - setPage(0); - }} - /> - - -
-
- ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20TokenDetails.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20TokenDetails.tsx deleted file mode 100644 index e1283f5d4d..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20TokenDetails.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import React from "react"; -import { useQuery } from "@tanstack/react-query"; -import Box from "@mui/material/Box"; -import Card from "@mui/material/Card"; -import CardContent from "@mui/material/CardContent"; -import Typography from "@mui/material/Typography"; -import Skeleton from "@mui/material/Skeleton"; - -import { ethERC20TokenHistory } from "../../queries"; -import ShortenedTypography from "../../../../components/ui/ShortenedTypography"; -import { useNotification } from "../../../../common/context/NotificationContext"; -import ERC20BalanceHistoryChart from "./ERC20BalanceHistoryChart"; -import ERC20BalanceHistoryTable from "./ERC20BalanceHistoryTable"; -import { createBalanceHistoryList } from "./balanceHistory"; -import { TokenERC20 } from "../../supabase-types"; - -function TokenDetailsPlaceholder() { - return ( - - - Click on a token from the list on the left to display it's details. - - - ); -} - -export type ERC20TokenDetailsHeaderProps = { - token: TokenERC20; -}; - -function ERC20TokenDetailsHeader({ token }: ERC20TokenDetailsHeaderProps) { - return ( - - - - {token.name} [{token.symbol}] - - - Contract: - - - Supply: {token.total_supply} - Balance: {token.balance} - - - ); -} - -export type ERC20TokenDetailsProps = { - token?: TokenERC20; -}; - -export default function ERC20TokenDetails({ token }: ERC20TokenDetailsProps) { - if (!token) { - return ; - } - - const { showNotification } = useNotification(); - - const { isError, isPending, data, error } = useQuery( - ethERC20TokenHistory(token.token_address, token.account_address), - ); - const txData = data ?? []; - - React.useEffect(() => { - isError && - showNotification(`Could get ERC20 balance history: ${error}`, "error"); - }, [isError]); - - const balanceHistory = createBalanceHistoryList( - txData, - token.account_address, - ); - - return ( - - {/* Token information header */} - - {isPending ? ( - - ) : ( - - )} - - - {/* Balance history chart */} - - - - - {/* Balance history table */} - - - Token History - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20TokenList.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20TokenList.tsx deleted file mode 100644 index e872e59c8b..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/ERC20TokenList.tsx +++ /dev/null @@ -1,133 +0,0 @@ -import * as React from "react"; -import { useQuery } from "@tanstack/react-query"; -import { styled } from "@mui/material/styles"; -import Box from "@mui/material/Box"; -import Table from "@mui/material/Table"; -import TableBody from "@mui/material/TableBody"; -import TableCell from "@mui/material/TableCell"; -import TableContainer from "@mui/material/TableContainer"; -import TableFooter from "@mui/material/TableFooter"; -import TablePagination from "@mui/material/TablePagination"; -import TableRow from "@mui/material/TableRow"; -import Paper from "@mui/material/Paper"; -import TableHead from "@mui/material/TableHead"; -import CircularProgress from "@mui/material/CircularProgress"; - -import { useNotification } from "../../../../common/context/NotificationContext"; -import { ethAllERC20TokensByAccount } from "../../queries"; -import { TokenERC20 } from "../../supabase-types"; - -const StyledHeaderCell = styled(TableCell)(({ theme }) => ({ - color: theme.palette.primary.main, - fontWeight: "bold", -})); - -export type ERC20TokenListProps = { - accountAddress: string; - onTokenSelected: (token?: TokenERC20) => void; -}; - -export default function ERC20TokenList({ - accountAddress, - onTokenSelected, -}: ERC20TokenListProps) { - const { isError, isPending, data, error } = useQuery( - ethAllERC20TokensByAccount(accountAddress), - ); - const [page, setPage] = React.useState(0); - const [rowsPerPage, setRowsPerPage] = React.useState(5); - const { showNotification } = useNotification(); - const tokenList = data ?? []; - - React.useEffect(() => { - isError && - showNotification(`Could get ERC20 balance list: ${error}`, "error"); - }, [isError]); - - // Avoid a layout jump when reaching the last page with empty rows. - const emptyRows = - page > 0 ? Math.max(0, (1 + page) * rowsPerPage - tokenList.length) : 0; - - return ( - - - {isPending && ( - - )} - - - - Name - Symbol - Balance - - - - {(rowsPerPage > 0 - ? tokenList.slice( - page * rowsPerPage, - page * rowsPerPage + rowsPerPage, - ) - : tokenList - ).map((row) => ( - { - onTokenSelected( - tokenList.find( - (t) => - t.account_address === row.account_address && - t.token_address === t.token_address, - ), - ); - }} - key={row.name} - > - {row.name} - {row.symbol} - {row.balance} - - ))} - {emptyRows > 0 && ( - - - - )} - - - - { - setPage(newPage); - }} - onRowsPerPageChange={(event) => { - setRowsPerPage(parseInt(event.target.value, 10)); - setPage(0); - }} - /> - - -
-
-
- ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/balanceHistory.ts b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/balanceHistory.ts deleted file mode 100644 index c48a4f7abe..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC20View/balanceHistory.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { TokenHistoryItem20 } from "../../supabase-types"; - -export type BalanceHistoryListData = { - created_at: string; - balance: number; -}; - -/** - * Create list of total token balance history after any operation (send / receive). - * Can be used to graph balance history. - */ -export function createBalanceHistoryList( - txHistory: TokenHistoryItem20[], - ownerAddress: string, -) { - if (!txHistory) { - return []; - } - - let balance = 0; - const balances = txHistory.map((txn) => { - let txn_value = txn.value || 0; - if (txn.recipient !== ownerAddress) { - txn_value *= -1; - } - balance += txn_value; - return { - created_at: txn.created_at + "Z", - balance: balance, - }; - }); - - return balances as BalanceHistoryListData[]; -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC721View/AccountERC721View.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC721View/AccountERC721View.tsx deleted file mode 100644 index cf16a3de9a..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC721View/AccountERC721View.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import * as React from "react"; -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; -import CircularProgress from "@mui/material/CircularProgress"; -import { useQuery } from "@tanstack/react-query"; - -import { ethAllERC721TokensByAccount } from "../../queries"; -import { useNotification } from "../../../../common/context/NotificationContext"; -import NFTCard from "./NFTCard"; - -export type AccountERC721ViewProps = { - accountAddress: string; -}; - -export default function AccountERC721View({ - accountAddress, -}: AccountERC721ViewProps) { - const { isError, isPending, data, error } = useQuery( - ethAllERC721TokensByAccount(accountAddress), - ); - const { showNotification } = useNotification(); - const tokenList = data ?? []; - - React.useEffect(() => { - isError && showNotification(`Could get NFT list: ${error}`, "error"); - }, [isError]); - - return ( - - - ERC721 - - - {isPending && ( - - )} - {tokenList.map((t) => { - return ( - - ); - })} - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC721View/NFTCard.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC721View/NFTCard.tsx deleted file mode 100644 index cd1acaa638..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/AccountERC721View/NFTCard.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import Card from "@mui/material/Card"; -import CardContent from "@mui/material/CardContent"; -import CardMedia from "@mui/material/CardMedia"; -import Typography from "@mui/material/Typography"; -import List from "@mui/material/List"; -import ListItem from "@mui/material/ListItem"; -import ListItemText from "@mui/material/ListItemText"; - -import { EthAllERC721TokensByAccountResponseType } from "../../queries"; -import ShortenedTypography from "../../../../components/ui/ShortenedTypography"; -import ShortenedLink from "../../../../components/ui/ShortenedLink"; -import nftPlaceholderImage from "../../static/nft-placeholder.png"; - -export type NFTCardProps = { - tokenDetails: EthAllERC721TokensByAccountResponseType; -}; - -export default function NFTCard({ tokenDetails }: NFTCardProps) { - return ( - - - - - {tokenDetails.token_metadata_erc721.name} #{tokenDetails.token_id} - - - - - - {tokenDetails.token_metadata_erc721.symbol} - - - - - - - {tokenDetails.uri && ( - - - - - )} - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/BlockList/BlockList.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/BlockList/BlockList.tsx deleted file mode 100644 index 252bafeeca..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/BlockList/BlockList.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import * as React from "react"; -import { ethAllBlocksQuery } from "../../queries"; -import { blockColumnsConfig } from "./blockColumnsConfig"; -import type { UITableListingPaginationActionProps } from "../../../../components/ui/UITableListing/UITableListingPaginationAction"; -import UITableListing from "../../../../components/ui/UITableListing/UITableListing"; - -/** - * List of columns that can be rendered in a block list table - */ -export type BlockListColumn = keyof typeof blockColumnsConfig; - -/** - * BlockList properties. - */ -export interface BlockListProps { - footerComponent: React.ComponentType; - columns: BlockListColumn[]; - rowsPerPage: number; - tableSize?: "small" | "medium"; -} - -/** - * BlockList - Show table with ethereum blocks. - * - * @param footerComponent component will be rendered in a footer of a transaction list table. - * @param columns list of columns to be rendered. - * @param rowsPerPage how many rows to show per page. - */ -const BlockList: React.FC = ({ - footerComponent, - columns, - rowsPerPage, - tableSize, -}) => { - return ( - - ); -}; - -export default BlockList; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/BlockList/blockColumnsConfig.ts b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/BlockList/blockColumnsConfig.ts deleted file mode 100644 index 32e8aca638..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/BlockList/blockColumnsConfig.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Component user can select columns to be rendered in a table list. - * Possible fields and their configurations are defined in here. - */ -export const blockColumnsConfig = { - hash: { - name: "Hash", - field: "hash", - isLongString: true, - isUnique: true, - }, - number: { - name: "Number", - field: "number", - }, - createdAt: { - name: "Created At", - field: "created_at", - isDate: true, - }, - txCount: { - name: "Transaction Count", - field: "number_of_tx", - }, -}; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/TransactionList/TransactionList.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/TransactionList/TransactionList.tsx deleted file mode 100644 index b53e86c455..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/TransactionList/TransactionList.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import * as React from "react"; -import { UseQueryOptions } from "@tanstack/react-query"; -import { transactionColumnsConfig } from "./transactionColumnsConfig"; -import type { UITableListingPaginationActionProps } from "../../../../components/ui/UITableListing/UITableListingPaginationAction"; -import UITableListing from "../../../../components/ui/UITableListing/UITableListing"; - -/** - * List of columns that can be rendered in a transaction list table - */ -export type TransactionListColumn = keyof typeof transactionColumnsConfig; - -/** - * TransactionList properties. - */ -export interface TransactionListProps { - queryFunction: ( - page: number, - pageSize: number, - ) => UseQueryOptions; - footerComponent: React.ComponentType; - columns: TransactionListColumn[]; - rowsPerPage: number; - tableSize?: "small" | "medium"; -} - -/** - * TransactionList - Show table with ethereum transactions. - * - * @param footerComponent component will be rendered in a footer of a transaction list table. - * @param columns list of columns to be rendered. - * @param rowsPerPage how many rows to show per page. - */ - -export default function TransactionList< - T extends { - [key: string]: any; - }, ->({ - queryFunction, - footerComponent, - columns, - rowsPerPage, - tableSize, -}: TransactionListProps) { - return ( - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/TransactionList/transactionColumnsConfig.ts b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/TransactionList/transactionColumnsConfig.ts deleted file mode 100644 index b687ec047b..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/components/TransactionList/transactionColumnsConfig.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Component user can select columns to be rendered in transaction list. - * Possible fields and their configurations are defined in transactionColumnsConfig. - */ -export const transactionColumnsConfig = { - hash: { - name: "Hash", - field: "hash", - isLongString: true, - isUnique: true, - }, - block: { - name: "Block", - field: "block_number", - }, - from: { - name: "From", - field: "from", - isLongString: true, - }, - to: { - name: "To", - field: "to", - isLongString: true, - }, - value: { - name: "Eth Value", - field: "eth_value", - }, - method: { - name: "Method", - field: "method_name", - }, -}; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/hooks.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/hooks.tsx deleted file mode 100644 index fb6ffde86d..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/hooks.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { useOutletContext } from "react-router-dom"; -import { AppInstancePersistencePluginOptions } from "../../common/types/app"; - -export function useEthAppConfig() { - return useOutletContext(); -} - -export function useEthSupabaseConfig() { - const appConfig = useEthAppConfig(); - - return { - schema: appConfig.supabaseSchema, - url: appConfig.supabaseUrl, - key: appConfig.supabaseKey, - }; -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/index.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/index.tsx deleted file mode 100644 index 9702618efc..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/index.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import Dashboard from "./pages/Dashboard/Dashboard"; -import Blocks from "./pages/Blocks/Blocks"; -import Transactions from "./pages/Transactions/Transactions"; -import Accounts from "./pages/Accounts/Accounts"; -import { - AppInstancePersistencePluginOptions, - AppDefinition, -} from "../../common/types/app"; -import { usePersistenceAppStatus } from "../../common/hook/use-persistence-app-status"; -import PersistencePluginStatus from "../../components/PersistencePluginStatus/PersistencePluginStatus"; -import { GuiAppConfig } from "../../common/supabase-types"; -import { AppCategory } from "../../common/app-category"; - -const ethBrowserAppDefinition: AppDefinition = { - appName: "Ethereum Browser", - appDocumentationURL: "https://hyperledger-cacti.github.io/cacti/cactus/ledger-browser/plugin-apps/ethereum-browser/", - appSetupGuideURL: "https://hyperledger-cacti.github.io/cacti/cactus/ledger-browser/plugin-apps/ethereum-browser/#setup", - category: AppCategory.LedgerBrowser, - defaultInstanceName: "My Eth Browser", - defaultDescription: - "Application for browsing Ethereum ledger blocks, transactions and tokens. Requires Ethereum persistence plugin to work correctly.", - defaultPath: "/eth", - defaultOptions: { - supabaseUrl: "http://localhost:8000", - supabaseKey: - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE", - supabaseSchema: "ethereum", - }, - - createAppInstance(app: GuiAppConfig) { - const supabaseOptions = - app.options as any as AppInstancePersistencePluginOptions; - - if ( - !supabaseOptions || - !supabaseOptions.supabaseUrl || - !supabaseOptions.supabaseKey || - !supabaseOptions.supabaseSchema - ) { - throw new Error( - `Invalid ethereum app specific options in the database: ${JSON.stringify(supabaseOptions)}`, - ); - } - - return { - id: app.id, - appName: ethBrowserAppDefinition.appName, - instanceName: app.instance_name, - description: app.description, - path: app.path, - options: supabaseOptions, - menuEntries: [ - { - title: "Dashboard", - url: "/", - }, - { - title: "Accounts", - url: "/accounts", - }, - ], - routes: [ - { - element: , - }, - { - path: "blocks", - element: , - }, - { - path: "transactions", - element: , - }, - { - path: "accounts", - element: , - }, - ], - useAppStatus: () => usePersistenceAppStatus("PluginPersistenceEthereum"), - StatusComponent: ( - - ), - appSetupGuideURL: ethBrowserAppDefinition.appSetupGuideURL, - appDocumentationURL: ethBrowserAppDefinition.appDocumentationURL, - }; - }, -}; - -export default ethBrowserAppDefinition; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Accounts/AccountTokenList.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Accounts/AccountTokenList.tsx deleted file mode 100644 index 4ca44ae4e5..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Accounts/AccountTokenList.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import * as React from "react"; -import Box from "@mui/material/Box"; -import Tab from "@mui/material/Tab"; -import TabContext from "@mui/lab/TabContext"; -import TabList from "@mui/lab/TabList"; -import TabPanel from "@mui/lab/TabPanel"; - -import PageTitle from "../../../../components/ui/PageTitle"; -import AccountERC721View from "../../components/AccountERC721View/AccountERC721View"; -import AccountERC20View from "../../components/AccountERC20View/AccountERC20View"; - -const ERC20_TAB_INDEX = "erc20"; -const ERC721_TAB_INDEX = "erc721"; - -export type AccountTokenListProps = { - accountAddress: string; -}; - -export default function AccountTokenList({ - accountAddress, -}: AccountTokenListProps) { - const [tabIndex, setTabIndex] = React.useState(ERC20_TAB_INDEX); - - return ( - - Tokens - - - - { - setTabIndex(newValue); - }} - aria-label="tab select token to display" - textColor="secondary" - indicatorColor="primary" - > - - - - - - - - - - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Accounts/AccountTransactionList.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Accounts/AccountTransactionList.tsx deleted file mode 100644 index f142df7e4a..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Accounts/AccountTransactionList.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import Box from "@mui/material/Box"; - -import PageTitle from "../../../../components/ui/PageTitle"; -import TransactionList from "../../components/TransactionList/TransactionList"; -import { ethAccountTransactionsQuery } from "../../queries"; -import UITableListingPaginationAction from "../../../../components/ui/UITableListing/UITableListingPaginationAction"; - -export type AccountTransactionListProps = { - accountAddress: string; -}; - -export default function AccountTransactionList({ - accountAddress, -}: AccountTransactionListProps) { - return ( - - Transactions - - ethAccountTransactionsQuery(page, pageSize, accountAddress) - } - footerComponent={UITableListingPaginationAction} - columns={["hash", "from", "to", "value", "method"]} - rowsPerPage={7} - tableSize="small" - /> - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Accounts/Accounts.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Accounts/Accounts.tsx deleted file mode 100644 index e3f35a8f00..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Accounts/Accounts.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import * as React from "react"; -import { ethers } from "ethers"; -import SearchIcon from "@mui/icons-material/Search"; -import TextField from "@mui/material/TextField"; -import Button from "@mui/material/Button"; -import Box from "@mui/material/Box"; - -import AccountTokenList from "./AccountTokenList"; -import AccountTransactionList from "./AccountTransactionList"; - -export default function Accounts() { - const [accountSearchText, setAccountSearchText] = React.useState(""); - const [errorText, setErrorText] = React.useState(""); - const [account, setAccount] = React.useState(""); - - const handleSearchClick = () => { - if (!ethers.isAddress(accountSearchText.toLowerCase())) { - return setErrorText( - "Address format not recognized, use valid hexadecimal address", - ); - } - - setAccount(accountSearchText); - }; - - return ( - - {/* Search Bar */} - - - { - setErrorText(""); - setAccountSearchText(e.target.value.trim()); - }} - error={Boolean(errorText)} - helperText={errorText} - /> - - - - - {/* Account transactions */} - - {account && } - - - {/* Account token list */} - {account && } - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Blocks/Blocks.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Blocks/Blocks.tsx deleted file mode 100644 index 3f225c7425..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Blocks/Blocks.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import Box from "@mui/material/Box"; -import PageTitleWithGoBack from "../../../../components/ui/PageTitleWithGoBack"; -import BlockList from "../../components/BlockList/BlockList"; -import TablePaginationAction from "../../../../components/ui/UITableListing/UITableListingPaginationAction"; - -export default function Blocks() { - return ( - - Blocks - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Dashboard/BlockSummary.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Dashboard/BlockSummary.tsx deleted file mode 100644 index e2d420dc0a..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Dashboard/BlockSummary.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { Link as RouterLink } from "react-router-dom"; -import Box from "@mui/material/Box"; -import Button from "@mui/material/Button"; -import BlockList from "../../components/BlockList/BlockList"; - -function BlockListViewAllAction() { - return ( - - - - - ); -} - -export default function BlockSummary() { - return ( - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Dashboard/Dashboard.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Dashboard/Dashboard.tsx deleted file mode 100644 index 58b3779806..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Dashboard/Dashboard.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import Box from "@mui/material/Box"; -import Stack from "@mui/material/Stack"; -import Divider from "@mui/material/Divider"; -import ReceiptOutlinedIcon from "@mui/icons-material/ReceiptOutlined"; -import HubIcon from "@mui/icons-material/Hub"; - -import PageTitle from "../../../../components/ui/PageTitle"; -import TitleWithIcon from "../../../../components/ui/TitleWithIcon"; -import TransactionSummary from "./TransactionSummary"; -import BlockSummary from "./BlockSummary"; - -function Dashboard() { - return ( - - Dashboard - } - justifyContent="space-between" - alignItems="center" - > - - Blocks - - - - - Transactions - - - - - ); -} - -export default Dashboard; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Dashboard/TransactionSummary.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Dashboard/TransactionSummary.tsx deleted file mode 100644 index 883a29a06a..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Dashboard/TransactionSummary.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Link as RouterLink } from "react-router-dom"; -import Box from "@mui/material/Box"; -import Button from "@mui/material/Button"; -import TransactionList from "../../components/TransactionList/TransactionList"; -import { ethAllTransactionsQuery } from "../../queries"; - -function TransactionListViewAllAction() { - return ( - - - - - ); -} - -export default function TransactionSummary() { - return ( - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Transactions/Transactions.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Transactions/Transactions.tsx deleted file mode 100644 index 073e1403b4..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/pages/Transactions/Transactions.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import Box from "@mui/material/Box"; -import TransactionList from "../../components/TransactionList/TransactionList"; -import PageTitleWithGoBack from "../../../../components/ui/PageTitleWithGoBack"; -import UITableListingPaginationAction from "../../../../components/ui/UITableListing/UITableListingPaginationAction"; -import { ethAllTransactionsQuery } from "../../queries"; - -export default function Transactions() { - return ( - - Transactions - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/queries.ts b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/queries.ts deleted file mode 100644 index aee3f48cd9..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/queries.ts +++ /dev/null @@ -1,226 +0,0 @@ -/** - * File containing all react-query functions used by this app. - * @todo Move to separate directory if this file becomes too complex. - */ - -import { SupabaseClient, createClient } from "@supabase/supabase-js"; -import { queryOptions } from "@tanstack/react-query"; -import { - Transaction, - Block, - TokenHistoryItem20, - TokenMetadata721, - TokenERC20, -} from "./supabase-types"; -import { useEthSupabaseConfig } from "./hooks"; - -let supabase: SupabaseClient | undefined; - -function createQueryKey( - tableName: string, - pagination: { page: number; pageSize: number }, -) { - return [tableName, { pagination }]; -} - -function useSupabaseClient(): [SupabaseClient, string] { - const supabaseConfig = useEthSupabaseConfig(); - - if (!supabase) { - supabase = createClient(supabaseConfig.url, supabaseConfig.key, { - schema: supabaseConfig.schema, - }); - } - - return [supabase, `supabase:${supabaseConfig.schema}`]; -} - -/** - * Get all recorded ethereum transactions. - * Returns `queryOptions` to be used as argument to `useQuery` from `react-query`. - * Supports paging. - */ -export function ethAllTransactionsQuery(page: number, pageSize: number) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - const fromIndex = page * pageSize; - const toIndex = fromIndex + pageSize - 1; - const tableName = "transaction"; - - return queryOptions({ - queryKey: [supabaseQueryKey, createQueryKey(tableName, { page, pageSize })], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .order("block_number", { ascending: false }) - .range(fromIndex, toIndex); - - if (error) { - throw new Error( - `Could not get data from '${tableName}' table: ${error.message}`, - ); - } - - return data as Transaction[]; - }, - }); -} - -/** - * Get all recorded ethereum transactions involving account `accountAddress` - * (either as sender or recipient). - * Returns `queryOptions` to be used as argument to `useQuery` from `react-query`. - * Supports paging. - */ -export function ethAccountTransactionsQuery( - page: number, - pageSize: number, - accountAddress: string, -) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - const fromIndex = page * pageSize; - const toIndex = fromIndex + pageSize - 1; - const tableName = "transaction"; - - return queryOptions({ - queryKey: [supabaseQueryKey, createQueryKey(tableName, { page, pageSize })], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .or(`from.eq.${accountAddress}, to.eq.${accountAddress}`) - .order("block_number", { ascending: false }) - .range(fromIndex, toIndex); - - if (error) { - throw new Error( - `Could not get data from '${tableName}' table for account '${accountAddress}: ${error.message}`, - ); - } - - return data as Transaction[]; - }, - }); -} - -/** - * Get all recorded ethereum blocks. - * Returns `queryOptions` to be used as argument to `useQuery` from `react-query`. - * Supports paging. - */ -export function ethAllBlocksQuery(page: number, pageSize: number) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - const fromIndex = page * pageSize; - const toIndex = fromIndex + pageSize - 1; - const tableName = "block"; - return queryOptions({ - queryKey: [supabaseQueryKey, createQueryKey(tableName, { page, pageSize })], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .order("number", { ascending: false }) - .range(fromIndex, toIndex); - - if (error) { - throw new Error( - `Could not get data from '${tableName}' table: ${error.message}`, - ); - } - - return data as Block[]; - }, - }); -} - -/** - * Get history of ERC20 transaction on token `tokenAddress` involving account `accountAddress` - * (either as sender or recipient). - * Returns `queryOptions` to be used as argument to `useQuery` from `react-query`. - */ -export function ethERC20TokenHistory( - tokenAddress: string, - accountAddress: string, -) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - const tableName = "erc20_token_history_view"; - return queryOptions({ - queryKey: [supabaseQueryKey, tableName, tokenAddress, accountAddress], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .match({ token_address: tokenAddress }) - .or(`sender.eq.${accountAddress}, recipient.eq.${accountAddress}`); - if (error) { - throw new Error( - `Could not get ERC20 [${tokenAddress}] of user ${accountAddress} token history: ${error.message}`, - ); - } - - return data as TokenHistoryItem20[]; - }, - }); -} - -export interface EthAllERC721TokensByAccountResponseType { - token_id: number; - uri: string; - account_address: string; - last_owner_change: string; - token_metadata_erc721: TokenMetadata721; -} - -/** - * Get list of all ERC721 tokens belonging to `accountAddress` - * Returns `queryOptions` to be used as argument to `useQuery` from `react-query`. - */ -export function ethAllERC721TokensByAccount(accountAddress: string) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - - return queryOptions({ - queryKey: [supabaseQueryKey, "ethAllERC721TokensByAccount", accountAddress], - queryFn: async () => { - const { data, error } = await supabase - .from("token_erc721") - .select( - "token_id, uri, account_address, last_owner_change, token_metadata_erc721(*)", - ) - .eq("account_address", accountAddress); - - if (error) { - throw new Error( - `Could not ${accountAddress} ERC721 token list: ${error.message}`, - ); - } - - return data as EthAllERC721TokensByAccountResponseType[]; - }, - }); -} - -/** - * Get list of all ERC20 tokens belonging to `accountAddress` - * Returns `queryOptions` to be used as argument to `useQuery` from `react-query`. - */ -export function ethAllERC20TokensByAccount(accountAddress: string) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - - return queryOptions({ - queryKey: [supabaseQueryKey, "ethAllERC20TokensByAccount", accountAddress], - queryFn: async () => { - const { data, error } = await supabase - .from("token_erc20") - .select() - .eq("account_address", accountAddress); - - if (error) { - throw new Error( - `Could not ${accountAddress} ERC20 token list: ${error.message}`, - ); - } - - return data as TokenERC20[]; - }, - }); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/static/nft-placeholder.png b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/static/nft-placeholder.png deleted file mode 100644 index 0ee05491cf..0000000000 Binary files a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/static/nft-placeholder.png and /dev/null differ diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/supabase-types.ts b/packages/cacti-ledger-browser/src/main/typescript/apps/eth/supabase-types.ts deleted file mode 100644 index b2172fcd6d..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/eth/supabase-types.ts +++ /dev/null @@ -1,45 +0,0 @@ -export interface Transaction { - index: number; - hash: string; - block_number: number; - from: string; - to: string; - eth_value: number; - method_signature: string; - method_name: string; - id: string; -} - -export interface Block { - number: number; - created_at: string; - hash: string; - number_of_tx: number; - sync_at: string; -} - -export interface TokenHistoryItem20 { - transaction_hash: string; - token_address: string; - created_at: string; - sender: string; - recipient: string; - value: number; -} - -export interface TokenMetadata721 { - address: string; - name: string; - symbol: string; - created_at: string; -} - -// Materialized View -export interface TokenERC20 { - account_address: string; - balance: number; - name: string; - symbol: string; - total_supply: number; - token_address: string; -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/BlockList/BlockList.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/BlockList/BlockList.tsx deleted file mode 100644 index b3bfc8944a..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/BlockList/BlockList.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import * as React from "react"; -import { fabricAllBlocksQuery } from "../../queries"; -import { blockColumnsConfig } from "./blockColumnsConfig"; -import type { UITableListingPaginationActionProps } from "../../../../components/ui/UITableListing/UITableListingPaginationAction"; -import UITableListing from "../../../../components/ui/UITableListing/UITableListing"; - -/** - * List of columns that can be rendered in a block list table - */ -export type BlockListColumn = keyof typeof blockColumnsConfig; - -/** - * BlockList properties. - */ -export interface BlockListProps { - footerComponent: React.ComponentType; - columns: BlockListColumn[]; - rowsPerPage: number; - tableSize?: "small" | "medium"; -} - -/** - * BlockList - Show table with fabric blocks. - * - * @param footerComponent component will be rendered in a footer of a transaction list table. - * @param columns list of columns to be rendered. - * @param rowsPerPage how many rows to show per page. - */ -const BlockList: React.FC = ({ - footerComponent, - columns, - rowsPerPage, - tableSize, -}) => { - return ( - - ); -}; - -export default BlockList; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/BlockList/blockColumnsConfig.ts b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/BlockList/blockColumnsConfig.ts deleted file mode 100644 index 09d561fbdf..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/BlockList/blockColumnsConfig.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Component user can select columns to be rendered in a table list. - * Possible fields and their configurations are defined in here. - */ -export const blockColumnsConfig = { - number: { - name: "Number", - field: "number", - }, - hash: { - name: "Hash", - field: "hash", - isLongString: true, - isUnique: true, - }, - txCount: { - name: "Transaction Count", - field: "transaction_count", - }, -}; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/CertificateDetails/CertificateDetailsBox.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/CertificateDetails/CertificateDetailsBox.tsx deleted file mode 100644 index b094946b94..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/CertificateDetails/CertificateDetailsBox.tsx +++ /dev/null @@ -1,169 +0,0 @@ -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; -import TextField from "@mui/material/TextField"; -import { styled } from "@mui/material/styles"; - -import { FabricCertificate } from "../../supabase-types"; -import StackedRowItems from "../../../../components/ui/StackedRowItems"; - -const ListHeaderTypography = styled(Typography)(({ theme }) => ({ - color: theme.palette.secondary.main, - fontWeight: "bold", -})); - -const TextFieldDisabledBlackFont = styled(TextField)(() => ({ - "& .MuiInputBase-input.Mui-disabled": { - WebkitTextFillColor: "black", - }, -})); - -function formatDateString(date: string | undefined) { - if (date) { - return new Date(date).toLocaleDateString(); - } - - return "-"; -} - -function formatCertificateAttr(attr: string | null | undefined) { - if (attr) { - return attr; - } - - return "-"; -} - -function formatCertificateSubject( - certificate: FabricCertificate, - fieldPrefix: "issuer" | "subject", -) { - return ( -
    -
  • - - Common Name: - - {formatCertificateAttr(certificate[`${fieldPrefix}_common_name`])} - - -
  • -
  • - - Organization: - - {formatCertificateAttr(certificate[`${fieldPrefix}_org`])} - - -
  • -
  • - - Organization Unit: - - {formatCertificateAttr(certificate[`${fieldPrefix}_org_unit`])} - - -
  • -
  • - - Country: - - {formatCertificateAttr(certificate[`${fieldPrefix}_country`])} - - -
  • -
  • - - Locality: - - {formatCertificateAttr(certificate[`${fieldPrefix}_locality`])} - - -
  • -
  • - - State: - - {formatCertificateAttr(certificate[`${fieldPrefix}_state`])} - - -
  • -
- ); -} - -export interface CertificateDetailsBoxProps { - certificate: FabricCertificate | undefined; -} - -/** - * Detailed information of provided fabric certificate. - * @param certificate: Fabric certificate from the DB. - */ -export default function CertificateDetailsBox({ - certificate, -}: CertificateDetailsBoxProps) { - return ( - - - Serial Number: - - {formatCertificateAttr(certificate?.serial_number)} - - - - Valid From: - - {formatCertificateAttr(formatDateString(certificate?.valid_from))} - - - - Valid To: - - {formatCertificateAttr(formatDateString(certificate?.valid_to))} - - - - Alt Name: - - {formatCertificateAttr(certificate?.subject_alt_name)} - - - - {certificate ? ( - <> - Subject: - {formatCertificateSubject(certificate, "subject")} - - ) : ( - - Subject: - - - - )} - - {certificate ? ( - <> - Issuer: - {formatCertificateSubject(certificate, "issuer")} - - ) : ( - - Issuer: - - - - )} - - - Certificate (PEM): - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/CertificateDetails/CertificateDialogButton.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/CertificateDetails/CertificateDialogButton.tsx deleted file mode 100644 index 107cb668a9..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/CertificateDetails/CertificateDialogButton.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import * as React from "react"; -import { useQuery } from "@tanstack/react-query"; -import Button from "@mui/material/Button"; -import Dialog from "@mui/material/Dialog"; -import DialogTitle from "@mui/material/DialogTitle"; -import DialogContent from "@mui/material/DialogContent"; - -import CertificateDetailsBox from "./CertificateDetailsBox"; -import { fabricCertificate } from "../../queries"; -import { useNotification } from "../../../../common/context/NotificationContext"; - -export interface CertificateDialogButtonProps { - certId: string | null; -} - -/** - * Show a button with certificate common name and organization, that will - * open a dialog with full certificate details on click. - * - * @warn Fetches the certificate from DB when mounted. - * - * @param certId ID of the certificate in database. - */ -export default function CertificateDialogButton({ - certId, -}: CertificateDialogButtonProps) { - const { showNotification } = useNotification(); - const [openDialog, setOpenDialog] = React.useState(false); - - const { isError, data, error } = useQuery({ - ...fabricCertificate(certId ?? ""), - enabled: !!certId, - }); - - React.useEffect(() => { - isError && - showNotification( - `Could not fetch creator certificate: ${error}`, - "error", - ); - }, [isError]); - - let creatorName = "unknownName"; - if (data?.subject_common_name) { - creatorName = data.subject_common_name; - } - - let creatorOrg = "unknownOrg"; - if (data?.subject_org) { - creatorOrg = data.subject_org; - } else if (data?.subject_org_unit) { - creatorOrg = data.subject_org_unit; - } - - return ( - <> - - setOpenDialog(false)} open={openDialog}> - Certificate Details - - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/TransactionList/TransactionList.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/TransactionList/TransactionList.tsx deleted file mode 100644 index 01d56ff6ed..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/TransactionList/TransactionList.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import * as React from "react"; -import { useNavigate } from "react-router-dom"; -import { UseQueryOptions } from "@tanstack/react-query"; -import { transactionColumnsConfig } from "./transactionColumnsConfig"; -import type { UITableListingPaginationActionProps } from "../../../../components/ui/UITableListing/UITableListingPaginationAction"; -import UITableListing from "../../../../components/ui/UITableListing/UITableListing"; - -/** - * List of columns that can be rendered in a transaction list table - */ -export type TransactionListColumn = keyof typeof transactionColumnsConfig; - -/** - * TransactionList properties. - */ -export interface TransactionListProps { - queryFunction: ( - page: number, - pageSize: number, - ) => UseQueryOptions; - footerComponent: React.ComponentType; - columns: TransactionListColumn[]; - rowsPerPage: number; - tableSize?: "small" | "medium"; -} - -/** - * TransactionList - Show table with fabric transactions. - * - * @param footerComponent component will be rendered in a footer of a transaction list table. - * @param columns list of columns to be rendered. - * @param rowsPerPage how many rows to show per page. - */ - -export default function TransactionList< - T extends { - [key: string]: any; - }, ->({ - queryFunction, - footerComponent, - columns, - rowsPerPage, - tableSize, -}: TransactionListProps) { - const navigate = useNavigate(); - - return ( - navigate(`../transaction/${row.hash}`)} - /> - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/TransactionList/transactionColumnsConfig.ts b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/TransactionList/transactionColumnsConfig.ts deleted file mode 100644 index 71d0d75f04..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/components/TransactionList/transactionColumnsConfig.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Component user can select columns to be rendered in transaction list. - * Possible fields and their configurations are defined in transactionColumnsConfig. - */ -export const transactionColumnsConfig = { - hash: { - name: "Hash", - field: "hash", - isLongString: true, - isUnique: true, - }, - timestamp: { - name: "Timestamp", - field: "timestamp", - }, - type: { - name: "Type", - field: "type", - }, - epoch: { - name: "Epoch", - field: "epoch", - }, - channel_id: { - name: "Channel ID", - field: "channel_id", - }, - protocol_version: { - name: "Proto Version", - field: "protocol_version", - }, - block: { - name: "Block", - field: "block_number", - }, -}; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/hooks.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/hooks.tsx deleted file mode 100644 index 336d2dcc13..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/hooks.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { useOutletContext } from "react-router-dom"; -import { AppInstancePersistencePluginOptions } from "../../common/types/app"; - -export function useFabricAppConfig() { - return useOutletContext(); -} - -export function useFabricSupabaseConfig() { - const appConfig = useFabricAppConfig(); - - return { - schema: appConfig.supabaseSchema, - url: appConfig.supabaseUrl, - key: appConfig.supabaseKey, - }; -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/index.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/index.tsx deleted file mode 100644 index 29e3a84703..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/index.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { Outlet } from "react-router-dom"; - -import Dashboard from "./pages/Dashboard/Dashboard"; -import Blocks from "./pages/Blocks/Blocks"; -import Transactions from "./pages/Transactions/Transactions"; -import TransactionDetails from "./pages/TransactionDetails/TransactionDetails"; -import { - AppInstancePersistencePluginOptions, - AppDefinition, -} from "../../common/types/app"; -import { usePersistenceAppStatus } from "../../common/hook/use-persistence-app-status"; -import PersistencePluginStatus from "../../components/PersistencePluginStatus/PersistencePluginStatus"; -import { GuiAppConfig } from "../../common/supabase-types"; -import { AppCategory } from "../../common/app-category"; - -const fabricBrowserAppDefinition: AppDefinition = { - appName: "Hyperledger Fabric Browser", - appDocumentationURL: "https://hyperledger-cacti.github.io/cacti/cactus/ledger-browser/plugin-apps/fabric-browser/", - appSetupGuideURL: "https://hyperledger-cacti.github.io/cacti/cactus/ledger-browser/plugin-apps/fabric-browser/#setup", - category: AppCategory.LedgerBrowser, - defaultInstanceName: "My Fabric Browser", - defaultDescription: - "Application for browsing Hyperledger Fabric ledger blocks and transactions. Requires Fabric persistence plugin to work correctly.", - defaultPath: "/fabric", - defaultOptions: { - supabaseUrl: "http://localhost:8000", - supabaseKey: - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE", - supabaseSchema: "fabric", - }, - - createAppInstance(app: GuiAppConfig) { - const supabaseOptions = - app.options as any as AppInstancePersistencePluginOptions; - - if ( - !supabaseOptions || - !supabaseOptions.supabaseUrl || - !supabaseOptions.supabaseKey || - !supabaseOptions.supabaseSchema - ) { - throw new Error( - `Invalid fabric app specific options in the database: ${JSON.stringify(supabaseOptions)}`, - ); - } - - return { - id: app.id, - appName: fabricBrowserAppDefinition.appName, - instanceName: app.instance_name, - description: app.description, - path: app.path, - options: supabaseOptions, - menuEntries: [ - { - title: "Dashboard", - url: "/", - }, - ], - routes: [ - { - element: , - }, - { - path: "blocks", - element: , - }, - { - path: "transactions", - element: , - }, - { - path: "transaction", - element: , - children: [ - { - path: ":hash", - element: ( -
- -
- ), - }, - ], - }, - ], - useAppStatus: () => usePersistenceAppStatus("PluginPersistenceFabric"), - StatusComponent: ( - - ), - appSetupGuideURL: fabricBrowserAppDefinition.appSetupGuideURL, - appDocumentationURL: fabricBrowserAppDefinition.appDocumentationURL, - }; - }, -}; - -export default fabricBrowserAppDefinition; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Blocks/Blocks.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Blocks/Blocks.tsx deleted file mode 100644 index ca33a57301..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Blocks/Blocks.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import Box from "@mui/material/Box"; -import PageTitleWithGoBack from "../../../../components/ui/PageTitleWithGoBack"; -import BlockList from "../../components/BlockList/BlockList"; -import TablePaginationAction from "../../../../components/ui/UITableListing/UITableListingPaginationAction"; - -export default function Blocks() { - return ( - - Blocks - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Dashboard/BlockSummary.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Dashboard/BlockSummary.tsx deleted file mode 100644 index ccb5a7bba2..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Dashboard/BlockSummary.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { Link as RouterLink } from "react-router-dom"; -import Box from "@mui/material/Box"; -import Button from "@mui/material/Button"; -import BlockList from "../../components/BlockList/BlockList"; - -function BlockListViewAllAction() { - return ( - - - - - ); -} - -export default function BlockSummary() { - return ( - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Dashboard/Dashboard.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Dashboard/Dashboard.tsx deleted file mode 100644 index 58b3779806..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Dashboard/Dashboard.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import Box from "@mui/material/Box"; -import Stack from "@mui/material/Stack"; -import Divider from "@mui/material/Divider"; -import ReceiptOutlinedIcon from "@mui/icons-material/ReceiptOutlined"; -import HubIcon from "@mui/icons-material/Hub"; - -import PageTitle from "../../../../components/ui/PageTitle"; -import TitleWithIcon from "../../../../components/ui/TitleWithIcon"; -import TransactionSummary from "./TransactionSummary"; -import BlockSummary from "./BlockSummary"; - -function Dashboard() { - return ( - - Dashboard - } - justifyContent="space-between" - alignItems="center" - > - - Blocks - - - - - Transactions - - - - - ); -} - -export default Dashboard; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Dashboard/TransactionSummary.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Dashboard/TransactionSummary.tsx deleted file mode 100644 index 676e54185b..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Dashboard/TransactionSummary.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Link as RouterLink } from "react-router-dom"; -import Box from "@mui/material/Box"; -import Button from "@mui/material/Button"; -import TransactionList from "../../components/TransactionList/TransactionList"; -import { fabricAllTransactionsQuery } from "../../queries"; - -function TransactionListViewAllAction() { - return ( - - - - - ); -} - -export default function TransactionSummary() { - return ( - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TranactionInfoCard.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TranactionInfoCard.tsx deleted file mode 100644 index d7d0f66fb7..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TranactionInfoCard.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { styled } from "@mui/material/styles"; -import Stack from "@mui/material/Stack"; -import Typography from "@mui/material/Typography"; -import Paper from "@mui/material/Paper"; -import Skeleton from "@mui/material/Skeleton"; - -import { FabricTransaction } from "../../supabase-types"; -import ShortenedTypography from "../../../../components/ui/ShortenedTypography"; -import StackedRowItems from "../../../../components/ui/StackedRowItems"; - -const ListHeaderTypography = styled(Typography)(({ theme }) => ({ - color: theme.palette.secondary.main, - fontWeight: "bold", -})); - -export interface TranactionInfoCardProps { - tx?: FabricTransaction; -} - -/** - * Card with basic transaction information. - * - * @param tx transaction object from a database - */ -export default function TranactionInfoCard({ tx }: TranactionInfoCardProps) { - if (!tx) { - return ; - } - - return ( - - - - Common Name: - - - - Timestamp: - {new Date(tx.timestamp).toLocaleString()} - - - Block Number: - {tx.block_number ?? "unknown"} - - - Channel ID: - {tx.channel_id} - - - Type: - {tx.type} - - - Epoch: - {tx.epoch} - - - Protocol Version: - {tx.protocol_version} - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TransactionActionEndorsementsTable.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TransactionActionEndorsementsTable.tsx deleted file mode 100644 index afe4d5b9c4..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TransactionActionEndorsementsTable.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import * as React from "react"; -import { useQuery } from "@tanstack/react-query"; -import Box from "@mui/material/Box"; -import Table from "@mui/material/Table"; -import TableBody from "@mui/material/TableBody"; -import TableCell from "@mui/material/TableCell"; -import TableContainer from "@mui/material/TableContainer"; -import TableHead from "@mui/material/TableHead"; -import TableRow from "@mui/material/TableRow"; - -import { fabricActionEndorsements } from "../../queries"; -import { useNotification } from "../../../../common/context/NotificationContext"; -import ShortenedTypography from "../../../../components/ui/ShortenedTypography"; -import CertificateDialogButton from "../../components/CertificateDetails/CertificateDialogButton"; - -export interface TransactionActionEndorsementsTableProps { - actionId: string; -} - -/** - * Table of transaction action endorsements. - * - * @warn Fetches the endorsements from a database - don't mount when not needed. - * - * @param actionId ID of an action in a database - */ -export default function TransactionActionEndorsementsTable({ - actionId, -}: TransactionActionEndorsementsTableProps) { - const { showNotification } = useNotification(); - - const { isError, data, error } = useQuery({ - ...fabricActionEndorsements(actionId), - }); - const displayData = data ?? []; - - React.useEffect(() => { - isError && - showNotification( - `Could not fetch action endorsements: ${error}`, - "error", - ); - }, [isError]); - - return ( - - - - - Signature - Msp ID - Identity - - - - {displayData.map((row) => ( - - - - - {row.mspid} - - - - - ))} - -
-
- ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TransactionActionsTable.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TransactionActionsTable.tsx deleted file mode 100644 index b2a8f81b2b..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TransactionActionsTable.tsx +++ /dev/null @@ -1,254 +0,0 @@ -import * as React from "react"; -import { useQuery } from "@tanstack/react-query"; -import { Buffer } from "buffer"; -import { styled, useTheme } from "@mui/material/styles"; -import Box from "@mui/material/Box"; -import Collapse from "@mui/material/Collapse"; -import IconButton from "@mui/material/IconButton"; -import Table from "@mui/material/Table"; -import Stack from "@mui/material/Stack"; -import TableBody from "@mui/material/TableBody"; -import TableCell from "@mui/material/TableCell"; -import TableContainer from "@mui/material/TableContainer"; -import TableHead from "@mui/material/TableHead"; -import TableRow from "@mui/material/TableRow"; -import Typography from "@mui/material/Typography"; -import Paper from "@mui/material/Paper"; -import TextField from "@mui/material/TextField"; -import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; -import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp"; - -import { fabricTransactionActions } from "../../queries"; -import { FabricTransactionAction } from "../../supabase-types"; -import { - StyledTableCellHeader, - StyledTableCell, -} from "../../../../components/ui/UITableListing/StyledTableCell"; -import CertificateDialogButton from "../../components/CertificateDetails/CertificateDialogButton"; -import TransactionActionEndorsementsTable from "./TransactionActionEndorsementsTable"; -import { useNotification } from "../../../../common/context/NotificationContext"; - -const TextFieldDisabledBlackFont = styled(TextField)(() => ({ - "& .MuiInputBase-input.Mui-disabled": { - WebkitTextFillColor: "black", - }, -})); - -interface ExpandableActionRowProps { - row: FabricTransactionAction; -} - -/** - * Single action row that can be expanded to show more details. - * - * @param row action row from a database - */ -function ExpandableActionRow({ row }: ExpandableActionRowProps) { - const theme = useTheme(); - const [open, setOpen] = React.useState(false); - const [showFunctionArgs, setShowFunctionArgs] = React.useState(true); - const [showActionCreator, setShowActionCreator] = React.useState(false); - const [showActionEndorsements, setShowActionEndorsements] = - React.useState(false); - - const functionArgs = (row.function_args ?? "").split(",").filter((a) => !!a); - const decodedFunctionArgs = functionArgs.map((a) => - Buffer.from(a.substring(2), "hex").toString("utf-8"), - ); - - return ( - - {/* Basic row entry */} - *": { borderBottom: "unset" }, - }} - > - - {row.function_name} - - - {decodedFunctionArgs.length} - - {row.chaincode_id} - {row.creator_msp_id} - - setOpen(!open)} - > - {open ? : } - - - - - {/* Expanded row details */} - - {/* Green strip on the left */} - - - - {/* Function Args */} - - - - Function Args - - setShowFunctionArgs(!showFunctionArgs)} - > - {showFunctionArgs ? ( - - ) : ( - - )} - - - {showFunctionArgs ? ( -
    - {decodedFunctionArgs.map((a) => ( -
  1. - -
  2. - ))} -
- ) : undefined} -
- - {/* Creator */} - - - - Creator ({row.creator_msp_id}) - - setShowActionCreator(!showActionCreator)} - > - {showActionCreator ? ( - - ) : ( - - )} - - - {showActionCreator ? ( - - ) : undefined} - - - {/* Endorsements */} - - - - Endorsements - - - setShowActionEndorsements(!showActionEndorsements) - } - > - {showActionEndorsements ? ( - - ) : ( - - )} - - - {showActionEndorsements ? ( - - ) : undefined} - -
-
-
-
-
- ); -} - -export interface TransactionActionsTableProps { - txId?: string; -} - -/** - * Table with actions of the specified transaction. - * Fetches the needed data from a database. - * - * @param txId transaction id in the database (not hash!) - */ -export default function TransactionActionsTable({ - txId, -}: TransactionActionsTableProps) { - const { showNotification } = useNotification(); - - const { isError, data, error } = useQuery({ - ...fabricTransactionActions(txId ?? ""), - enabled: !!txId, - }); - const displayData = data ?? []; - - React.useEffect(() => { - isError && - showNotification( - `Could not fetch transaction actions: ${error}`, - "error", - ); - }, [isError]); - - return ( - - - - - Function Name - - Args Count - - - Chaincode ID - - - Creator MSP ID - - - - - - {displayData.map((row) => ( - - ))} - -
-
- ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TransactionDetails.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TransactionDetails.tsx deleted file mode 100644 index 3bc0edc8d3..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/TransactionDetails/TransactionDetails.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import React from "react"; -import { useQuery } from "@tanstack/react-query"; -import { useNavigate, useParams } from "react-router-dom"; -import CircularProgress from "@mui/material/CircularProgress"; -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; - -import TranactionInfoCard from "./TranactionInfoCard"; -import { fabricTransactionByHash } from "../../queries"; -import { useNotification } from "../../../../common/context/NotificationContext"; -import PageTitleWithGoBack from "../../../../components/ui/PageTitleWithGoBack"; -import TransactionActionsTable from "./TransactionActionsTable"; - -/** - * Transaction details page, must be called with valid `hash` in a param. - * Fetched transaction details from a database. - */ -export default function TransactionDetails() { - const { showNotification } = useNotification(); - const navigate = useNavigate(); - const { hash } = useParams(); - if (!hash) { - showNotification(`Invalid transaction hash provided: ${hash}`, "error"); - navigate(".."); // Go to home - return null; - } - - const { isError, isPending, data, error } = useQuery( - fabricTransactionByHash(hash), - ); - - React.useEffect(() => { - isError && - showNotification( - `Could not fetch transaction details: ${error}`, - "error", - ); - }, [isError]); - - return ( - - Transaction Details - {isPending && ( - - )} - - - - - - - Actions - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Transactions/Transactions.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Transactions/Transactions.tsx deleted file mode 100644 index 1ffb31953d..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/pages/Transactions/Transactions.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import Box from "@mui/material/Box"; -import TransactionList from "../../components/TransactionList/TransactionList"; -import PageTitleWithGoBack from "../../../../components/ui/PageTitleWithGoBack"; -import UITableListingPaginationAction from "../../../../components/ui/UITableListing/UITableListingPaginationAction"; -import { fabricAllTransactionsQuery } from "../../queries"; - -export default function Transactions() { - return ( - - Transactions - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/queries.ts b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/queries.ts deleted file mode 100644 index 5c4e62606b..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/queries.ts +++ /dev/null @@ -1,213 +0,0 @@ -/** - * File containing all react-query functions used by this app. - * @todo Move to separate directory if this file becomes too complex. - */ - -import { SupabaseClient, createClient } from "@supabase/supabase-js"; -import { queryOptions } from "@tanstack/react-query"; -import { - FabricBlock, - FabricCertificate, - FabricTransaction, - FabricTransactionAction, - FabricTransactionActionEndorsement, -} from "./supabase-types"; -import { useFabricSupabaseConfig } from "./hooks"; - -let supabase: SupabaseClient | undefined; - -function createQueryKey( - tableName: string, - pagination: { page: number; pageSize: number }, -) { - return [tableName, { pagination }]; -} - -function useSupabaseClient(): [SupabaseClient, string] { - const supabaseConfig = useFabricSupabaseConfig(); - - if (!supabase) { - supabase = createClient(supabaseConfig.url, supabaseConfig.key, { - schema: supabaseConfig.schema, - }); - } - - return [supabase, `supabase:${supabaseConfig.schema}`]; -} - -/** - * Get all recorded fabric blocks. - * Returns `queryOptions` to be used as argument to `useQuery` from `react-query`. - * Supports paging. - */ -export function fabricAllBlocksQuery(page: number, pageSize: number) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - const fromIndex = page * pageSize; - const toIndex = fromIndex + pageSize - 1; - const tableName = "block"; - return queryOptions({ - queryKey: [supabaseQueryKey, createQueryKey(tableName, { page, pageSize })], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .order("number", { ascending: false }) - .range(fromIndex, toIndex); - - if (error) { - throw new Error( - `Could not get data from '${tableName}' table: ${error.message}`, - ); - } - - return data as FabricBlock[]; - }, - }); -} - -/** - * Get all recorded fabric transactions. - * Returns `queryOptions` to be used as argument to `useQuery` from `react-query`. - * Supports paging. - */ -export function fabricAllTransactionsQuery(page: number, pageSize: number) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - const fromIndex = page * pageSize; - const toIndex = fromIndex + pageSize - 1; - const tableName = "transaction"; - - return queryOptions({ - queryKey: [supabaseQueryKey, createQueryKey(tableName, { page, pageSize })], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .order("block_number", { ascending: false }) - .range(fromIndex, toIndex); - - if (error) { - throw new Error( - `Could not get data from '${tableName}' table: ${error.message}`, - ); - } - - return data as FabricTransaction[]; - }, - }); -} - -/** - * Get transaction object form the database using it's hash. - */ -export function fabricTransactionByHash(hash: string) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - const tableName = "transaction"; - - return queryOptions({ - queryKey: [supabaseQueryKey, tableName, hash], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .match({ hash }); - - if (error) { - throw new Error( - `Could not get transaction with hash ${hash}: ${error.message}`, - ); - } - - if (data.length !== 1) { - throw new Error( - `Invalid response when getting transaction with hash ${hash}: ${data}`, - ); - } - - return data.pop() as FabricTransaction; - }, - }); -} - -/** - * Get transaction actions form the database using parent transaction id. - */ -export function fabricTransactionActions(txId: string) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - const tableName = "transaction_action"; - - return queryOptions({ - queryKey: [supabaseQueryKey, tableName, txId], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .match({ transaction_id: txId }); - - if (error) { - throw new Error( - `Could not get actions of transaction with ID ${txId}: ${error.message}`, - ); - } - - return data as FabricTransactionAction[]; - }, - }); -} - -/** - * Get fabric certificate using it's ID. - */ -export function fabricCertificate(id: string) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - const tableName = "certificate"; - - return queryOptions({ - queryKey: [supabaseQueryKey, tableName, id], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .match({ id }); - - if (error) { - throw new Error( - `Could not get certificate with ID ${id}: ${error.message}`, - ); - } - - if (data.length !== 1) { - throw new Error( - `Invalid response when getting certificate with id ${id}: ${data}`, - ); - } - - return data.pop() as FabricCertificate; - }, - }); -} - -/** - * Get transaction action endorsements form the database using parent action id. - */ -export function fabricActionEndorsements(actionId: string) { - const [supabase, supabaseQueryKey] = useSupabaseClient(); - const tableName = "transaction_action_endorsement"; - - return queryOptions({ - queryKey: [supabaseQueryKey, tableName, actionId], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .match({ transaction_action_id: actionId }); - - if (error) { - throw new Error( - `Could not get endorsements of action with ID ${actionId}: ${error.message}`, - ); - } - - return data as FabricTransactionActionEndorsement[]; - }, - }); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/supabase-types.ts b/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/supabase-types.ts deleted file mode 100644 index 4c16f694ff..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/fabric/supabase-types.ts +++ /dev/null @@ -1,57 +0,0 @@ -export interface FabricBlock { - id: number; - number: number; - hash: string; - transaction_count: number; -} - -export interface FabricTransaction { - block_id: string | null; - block_number: number | null; - channel_id: string; - epoch: number; - hash: string; - id: string; - protocol_version: number; - timestamp: string; - type: string; -} - -export interface FabricTransactionAction { - chaincode_id: string; - creator_certificate_id: string | null; - creator_msp_id: string; - function_args: string | null; - function_name: string | null; - id: string; - transaction_id: string | null; -} - -export interface FabricTransactionActionEndorsement { - certificate_id: string; - id: string; - mspid: string; - signature: string; - transaction_action_id: string | null; -} - -export interface FabricCertificate { - id: string; - issuer_common_name: string | null; - issuer_country: string | null; - issuer_locality: string | null; - issuer_org: string | null; - issuer_org_unit: string | null; - issuer_state: string | null; - pem: string; - serial_number: string; - subject_alt_name: string; - subject_common_name: string | null; - subject_country: string | null; - subject_locality: string | null; - subject_org: string | null; - subject_org_unit: string | null; - subject_state: string | null; - valid_from: string; - valid_to: string; -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/hooks.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/hooks.tsx deleted file mode 100644 index b714847175..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/hooks.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { useOutletContext } from "react-router-dom"; - -type TutorialOptionsType = { - name: string; -}; - -export function useAppOptions() { - return useOutletContext(); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/index.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/index.tsx deleted file mode 100644 index 7fe747cab6..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/index.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; -import { AppDefinition } from "../../common/types/app"; -import { GuiAppConfig } from "../../common/supabase-types"; -import { AppCategory } from "../../common/app-category"; -import Home from "./pages/Home"; -import DataFetch from "./pages/DataFetch"; - -const tutorialAppDefinition: AppDefinition = { - appName: "Tutorial App", - category: AppCategory.SampleApp, - defaultInstanceName: "My App", - defaultDescription: "This is a tutorial application.", - defaultPath: "/tutorial", - defaultOptions: { - // Our app will use this variable to display a greeting later on - name: "Cacti", - }, - - createAppInstance(app: GuiAppConfig) { - if (!app.options || !app.options.name) { - throw new Error(`Missing 'name' in received GuiAppConfig options!`); - } - - return { - id: app.id, - appName: tutorialAppDefinition.appName, - instanceName: app.instance_name, - description: app.description, - path: app.path, - options: app.options, - menuEntries: [ - { - title: "Home", - url: "/", - }, - { - title: "Data Fetch", - url: "/data-fetch", - }, - ], - routes: [ - { - element: , - }, - { - path: "data-fetch", - element: , - }, - ], - useAppStatus: () => { - return { - isPending: false, - isInitialized: true, - status: { - severity: "success", - message: "Mocked response!", - }, - }; - }, - StatusComponent: ( - - Everything is OK (we hope) - - ), - appSetupGuideURL: tutorialAppDefinition.appSetupGuideURL, - appDocumentationURL: tutorialAppDefinition.appDocumentationURL, - }; - }, -}; - -export default tutorialAppDefinition; diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/pages/DataFetch.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/pages/DataFetch.tsx deleted file mode 100644 index 49b47fc0d2..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/pages/DataFetch.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import React from "react"; -import axios from "axios"; -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; -import { useQuery } from "@tanstack/react-query"; -import PageTitle from "../../../components/ui/PageTitle"; -import { useNotification } from "../../../common/context/NotificationContext"; - -/** - * Simple method for fetching test data from restful-api.dev - */ -async function fetchSampleData() { - const response = await axios.get("https://api.restful-api.dev/objects/7"); - return response.data; -} - -export default function DataFetch() { - const { showNotification } = useNotification(); - const { data, isPending, isError, error } = useQuery({ - queryKey: ["sampleFetch"], - queryFn: fetchSampleData, - }); - - React.useEffect(() => { - isError && - showNotification(`Could not fetch sample data: ${error}`, "error"); - }, [isError]); - - React.useEffect(() => { - !isPending && - data && - showNotification(`Fetched data: ${data.name}`, "success"); - }, [data, isPending]); - - return ( - - Data Fetch Sample - - - Fetched object: {data?.name ?? ""} - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/pages/Home.tsx b/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/pages/Home.tsx deleted file mode 100644 index 27c5df281b..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/apps/tutorial-app/pages/Home.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import Box from "@mui/material/Box"; -import PageTitle from "../../../components/ui/PageTitle"; -import { useAppOptions } from "../hooks"; - -export default function Home() { - const appOptions = useAppOptions(); - - return ( - - Hello {appOptions.name}! - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/common/app-category.tsx b/packages/cacti-ledger-browser/src/main/typescript/common/app-category.tsx deleted file mode 100644 index 7fff430e35..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/common/app-category.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import WebIcon from "@mui/icons-material/Web"; -import DnsIcon from "@mui/icons-material/Dns"; -import TokenIcon from "@mui/icons-material/Token"; - -export enum AppCategory { - LedgerBrowser = "ledgerBrowser", - Connector = "connector", - SampleApp = "sampleApp", -} - -export function getAppCategoryConfig(appConfig: AppCategory) { - switch (appConfig) { - case AppCategory.LedgerBrowser: - return { - name: "Ledger Browser", - description: "Browse and analyse ledger data persisted in a database", - icon: , - }; - case AppCategory.Connector: - return { - name: "Connector", - description: "Interact with ledgers through Cacti connectors", - icon: , - }; - case AppCategory.SampleApp: - return { - name: "Sample App", - description: "Run sample Cacti application", - icon: , - }; - default: - throw new Error(`Unknown App Category provided: ${appConfig}`); - } -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/common/config.tsx b/packages/cacti-ledger-browser/src/main/typescript/common/config.tsx deleted file mode 100644 index 28c633a61a..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/common/config.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import ethBrowserAppDefinition from "../apps/eth"; -import fabricBrowserAppDefinition from "../apps/fabric"; -import tutorialAppDefinition from "../apps/tutorial-app"; -import { AppDefinition } from "./types/app"; - -const config = new Map([ - ["ethereumPersistenceBrowser", ethBrowserAppDefinition], - ["fabricPersistenceBrowser", fabricBrowserAppDefinition], - ["tutorialApplication", tutorialAppDefinition], -]); - -export default config; diff --git a/packages/cacti-ledger-browser/src/main/typescript/common/context/NotificationContext.tsx b/packages/cacti-ledger-browser/src/main/typescript/common/context/NotificationContext.tsx deleted file mode 100644 index dfc7d6332f..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/common/context/NotificationContext.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import React, { createContext, useState, useContext, ReactNode } from "react"; -import Alert, { AlertColor } from "@mui/material/Alert"; -import Slide, { SlideProps } from "@mui/material/Slide"; -import Snackbar from "@mui/material/Snackbar"; - -const autoHideDuration = 1000 * 3; // 3 seconds -const defaultSeverity: AlertColor = "info"; - -type Notification = { - message: string; - severity?: AlertColor; -}; - -type NotificationContextType = { - showNotification: (message: string, severity?: AlertColor) => void; -}; - -const NotificationContext = createContext({ - showNotification: (message: string) => { - console.log("Notification before context init:", message); - }, -}); - -function SlideTransition(props: SlideProps) { - return ; -} - -export const NotificationProvider: React.FC<{ children: ReactNode }> = ({ - children, -}) => { - const [notification, setNotification] = useState( - undefined, - ); - const isNotification = Boolean(notification); - - const showNotification = (message: string, severity?: AlertColor) => { - if (severity === "error") { - console.error("Error notification:", message); - } - setNotification({ message, severity }); - }; - - const closeNotification = () => { - setNotification(undefined); - }; - - return ( - - {children} - {isNotification && ( - - - {notification?.message} - - - )} - - ); -}; - -export const useNotification = (): NotificationContextType => - useContext(NotificationContext); diff --git a/packages/cacti-ledger-browser/src/main/typescript/common/createApplications.tsx b/packages/cacti-ledger-browser/src/main/typescript/common/createApplications.tsx deleted file mode 100644 index a41292391c..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/common/createApplications.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import config from "./config"; -import { GuiAppConfig } from "./supabase-types"; -import { AppInstance } from "./types/app"; - -export default function createApplications(appsFromDb?: GuiAppConfig[]) { - const appConfig = [] as AppInstance[]; - - if (!appsFromDb) { - return appConfig; - } - - for (const app of appsFromDb) { - try { - const appDefinition = config.get(app.app_id); - - if (!appDefinition) { - throw new Error( - `Unknown app ID found in the database - ${app.app_id}, ensure you're using latest GUI version!`, - ); - } - - appConfig.push(appDefinition.createAppInstance(app)); - } catch (error) { - console.error(`Could not add app ${app.app_id}: ${error}`); - } - } - - return appConfig; -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/common/hook/use-persistence-app-status.ts b/packages/cacti-ledger-browser/src/main/typescript/common/hook/use-persistence-app-status.ts deleted file mode 100644 index e6a9aa0187..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/common/hook/use-persistence-app-status.ts +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react"; -import { useQuery } from "@tanstack/react-query"; -import { GetStatusResponse } from "../types/app"; -import { persistencePluginStatus } from "../queries"; - -/** - * Return status of given persistence plugin from the database. - * - * @param pluginName name of the plugin (as set by the persistence plugin itself) - */ -export function usePersistenceAppStatus(pluginName: string): GetStatusResponse { - const { isError, isPending, data, error } = useQuery( - persistencePluginStatus(pluginName), - ); - - React.useEffect(() => { - isError && console.error(`Could get ${pluginName} status: ${error}`); - }, [isError]); - - return { - isPending, - isInitialized: data?.is_schema_initialized ?? false, - status: { - severity: "info", - message: "Unknown", - }, - }; -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/common/queries.ts b/packages/cacti-ledger-browser/src/main/typescript/common/queries.ts deleted file mode 100644 index 5b7fc81f56..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/common/queries.ts +++ /dev/null @@ -1,176 +0,0 @@ -import { SupabaseClient, createClient } from "@supabase/supabase-js"; -import { QueryClient, queryOptions } from "@tanstack/react-query"; -import { GuiAppConfig, PluginStatus } from "./supabase-types"; -import { AddGuiAppConfigType, UpdateGuiAppConfigType } from "./types/app"; - -let supabase: SupabaseClient | undefined; - -/** - * Get or initialize (if not already done) a supabase client using environment variables. - */ -function getSupabaseClient(): [SupabaseClient, string] { - const supabaseUrl = import.meta.env.VITE_SUPABASE_URL; - const supabaseKey = import.meta.env.VITE_SUPABASE_KEY; - const supabaseSchema = import.meta.env.VITE_SUPABASE_SCHEMA; - - if (!supabase) { - supabase = createClient(supabaseUrl, supabaseKey, { - schema: supabaseSchema, - }); - } - - return [supabase, `supabase:${supabaseSchema}`]; -} - -/** - * Get persistence plugin status from the database using it's name. - */ -export function persistencePluginStatus(name: string) { - const [supabase, supabaseQueryKey] = getSupabaseClient(); - const tableName = "plugin_status"; - - return queryOptions({ - queryKey: [supabaseQueryKey, tableName, name], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .match({ name }); - - if (error) { - throw new Error( - `Could not get persistence plugin status with name ${name}: ${error.message}`, - ); - } - - if (data.length !== 1) { - throw new Error( - `Invalid response when persistence plugin status with name ${name}: ${data}`, - ); - } - - return data.pop() as PluginStatus; - }, - }); -} - -/** - * Get persistence plugin app config from the database. - */ -export function guiAppConfig() { - const [supabase, supabaseQueryKey] = getSupabaseClient(); - const tableName = "gui_app_config"; - - return queryOptions({ - queryKey: [supabaseQueryKey, tableName], - queryFn: async () => { - const { data, error } = await supabase.from(tableName).select(); - - if (error) { - throw new Error( - `Could not get GUI App configuration: ${error.message}`, - ); - } - - return data as GuiAppConfig[]; - }, - }); -} - -/** - * Get single persistence plugin app instance infofrom the database. - */ -export function guiAppConfigById(id: string) { - const [supabase, supabaseQueryKey] = getSupabaseClient(); - const tableName = "gui_app_config"; - - return queryOptions({ - queryKey: [supabaseQueryKey, tableName, id], - queryFn: async () => { - const { data, error } = await supabase - .from(tableName) - .select() - .eq("id", id); - - if (error) { - throw new Error( - `Could not get app instance (id ${id}) configuration: ${error.message}`, - ); - } - - if (data.length !== 1) { - throw new Error( - `Invalid response when getting app instance with id ${id}: ${data}`, - ); - } - - return data.pop() as GuiAppConfig; - }, - }); -} - -/** - * Invalidate all queries from gui_app_config. - * Call after each mutation that affects this table. - */ -export function invalidateGuiAppConfig(queryClient: QueryClient) { - const [, supabaseQueryKey] = getSupabaseClient(); - queryClient.invalidateQueries({ - queryKey: [supabaseQueryKey, "gui_app_config"], - }); -} - -/** - * Add new GUI app configuration to the database. - */ -export async function addGuiAppConfig(appData: AddGuiAppConfigType) { - const [supabase] = getSupabaseClient(); - const { data, error } = await supabase - .from("gui_app_config") - .insert([appData]); - - if (error) { - throw new Error(`Could not insert GUI App configuration: ${error.message}`); - } - - return data; -} - -/** - * Update GUI app configuration in the database. - */ -export async function updateGuiAppConfig( - id: string, - appData: UpdateGuiAppConfigType, -) { - const [supabase] = getSupabaseClient(); - const { data, error } = await supabase - .from("gui_app_config") - .update([appData]) - .eq("id", id); - - if (error) { - throw new Error( - `Could not update GUI App ${id} configuration: ${error.message}`, - ); - } - - return data; -} - -/** - * Delete GUI app configuration from the database. - */ -export async function deleteGuiAppConfig(id: string) { - const [supabase] = getSupabaseClient(); - const { data, error } = await supabase - .from("gui_app_config") - .delete() - .eq("id", id); - - if (error) { - throw new Error(`Could not delete GUI App ${id}, error: ${error.message}`); - } - - return data; -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/common/supabase-types.ts b/packages/cacti-ledger-browser/src/main/typescript/common/supabase-types.ts deleted file mode 100644 index 972480ffe6..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/common/supabase-types.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface PluginStatus { - name: string; - last_instance_id: string; - is_schema_initialized: boolean; - created_at: string; - last_connected_at: string; -} - -export interface GuiAppConfig { - id: string; - app_id: string; - instance_name: string; - description: string; - path: string; - options: Record; - created_at: string; - updated_at: string; -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/common/types/app.ts b/packages/cacti-ledger-browser/src/main/typescript/common/types/app.ts deleted file mode 100644 index 136850ad37..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/common/types/app.ts +++ /dev/null @@ -1,151 +0,0 @@ -import React from "react"; -import { RouteObject } from "react-router-dom"; -import { GuiAppConfig } from "../supabase-types"; - -export interface AppListEntry { - path: string; - name: string; -} - -export interface AppInstanceMenuEntry { - title: string; - url: string; -} - -export interface AppStatus { - severity: "success" | "info" | "warning" | "error"; - message: string; -} - -export interface GetStatusResponse { - isPending: boolean; - isInitialized: boolean; - status: AppStatus; -} - -export interface AppInstancePersistencePluginOptions { - supabaseSchema: string; - supabaseUrl: string; - supabaseKey: string; -} - -export interface AppInstance { - /** - * Unique database ID of this app instance. - */ - id: string; - - /** - * Name of the application (can be same as appName in app definition) - */ - appName: string; - - /** - * Instance name (set by the user) - */ - instanceName: string; - - /** - * Instance description (set by the user) - */ - description: string | undefined; - - /** - * Path under which app routes will be mounted (must be path with `/`, like `/eth`) - */ - path: string; - - /** - * Custom, app-specific options in JSON format. This will change between applications. - */ - options: T; - - /** - * List on titles and URL of menu entries to be added to the top bar (used to navigate within an app) - */ - menuEntries: AppInstanceMenuEntry[]; - - /** - * `react-router-dom` compatible list of this application routes. - */ - routes: RouteObject[]; - - /** - * Method for retriving application status details. - */ - useAppStatus: () => GetStatusResponse; - - /** - * Status component showed when user opens a app status pop up window. - */ - StatusComponent: React.ReactElement; - - /** - * Full URL to a setup guide, it will be displayed to the user on app configuration page. - */ - appSetupGuideURL?: string; - - /** - * Full URL to app documentation page - */ - appDocumentationURL?: string; -} - -export type CreateAppInstanceFactoryType = (app: GuiAppConfig) => AppInstance; - -export interface AppDefinition { - /** - * Application name as shown to the user - */ - appName: string; - - /** - * Application category, the user can filter using it. - * If there's no matching category for your app consider adding a new one! - */ - category: string; - - /** - * Full URL to a setup guide, it will be displayed to the user on app configuration page. - */ - appSetupGuideURL?: string; - - /** - * Full URL to app documentation page - */ - appDocumentationURL?: string; - - /** - * Default value for instance name that user can set to uniquely identify this ap instance. - */ - defaultInstanceName: string; - - /** - * Default value for app description. - */ - defaultDescription: string; - - /** - * Default path under which app routes will be mounted (must be path with `/`, like `/eth`) - */ - defaultPath: string; - - /** - * Default custom, app-specific options in JSON format. This will change between applications. - */ - defaultOptions: unknown; - - /** - * Factory method for creating application instance object from configuration stored in a database. - */ - createAppInstance: CreateAppInstanceFactoryType; -} - -export type UpdateGuiAppConfigType = { - instance_name: string; - description: string; - path: string; - options: unknown; -}; - -export type AddGuiAppConfigType = UpdateGuiAppConfigType & { app_id: string }; diff --git a/packages/cacti-ledger-browser/src/main/typescript/common/utils.ts b/packages/cacti-ledger-browser/src/main/typescript/common/utils.ts deleted file mode 100644 index 6a2d38b171..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/common/utils.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Add application path to route path where applicable. - * - * Example: "blocks" route under "eth" app will create a path /eth/blocks - */ -export function patchAppRoutePath(appPath: string, routePath?: string) { - // Add missing '/' to front of app path if necessary - appPath = appPath.startsWith("/") ? appPath : `/${appPath}`; - - if (routePath && routePath !== "/") { - // Remove additionall '/' from route to create nice concat - routePath = routePath.startsWith("/") ? routePath.slice(1) : routePath; - return `${appPath}/${routePath}`; - } else { - return appPath; - } -} - -/** - * Returns true if provided url is defined and valid, returns false and - * writes error to `console.error` otherwise. - */ -export function isValidUrl(urlString?: string) { - if (!urlString) { - return false; - } - - try { - new URL(urlString); - return true; - } catch (e) { - console.error(`Invalid URL provided: ${urlString}, error: ${e}`); - return false; - } -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/AppSetupForms/AppOptionsForm.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/AppSetupForms/AppOptionsForm.tsx deleted file mode 100644 index ef266b946e..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/AppSetupForms/AppOptionsForm.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import * as React from "react"; -import Box from "@mui/material/Box"; -import TextField from "@mui/material/TextField"; - -export interface AppOptionsFormProps { - validationError: string; - setValidationError: React.Dispatch>; - appOptionsJsonString: string; - setAppOptionsJsonString: React.Dispatch>; -} - -/** - * Form component for editing app options (app specific settings) - */ -export default function AppOptionsForm({ - validationError, - setValidationError, - appOptionsJsonString, - setAppOptionsJsonString, -}: AppOptionsFormProps) { - return ( - - { - setValidationError(""); - setAppOptionsJsonString(e.target.value); - }} - /> - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/AppSetupForms/AppSetupForm.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/AppSetupForms/AppSetupForm.tsx deleted file mode 100644 index 38cf082aa6..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/AppSetupForms/AppSetupForm.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import * as React from "react"; -import Box from "@mui/material/Box"; -import TextField from "@mui/material/TextField"; - -const pathCheckRegex = /^\/[a-zA-Z][a-zA-Z0-9]*$/; -const emptyFormHelperText = "Field can't be empty"; -const regularPathHelperText = - "Path under which the plugin will be available, must be unique withing GUI."; -const illformedPathHelperText = "Must be valid path (starting with '/')"; - -export interface CommonSetupFormValues { - instanceName: string; - description: string; - path: string; -} - -export interface AppSetupFormProps { - commonSetupValues: CommonSetupFormValues; - setCommonSetupValues: React.Dispatch< - React.SetStateAction - >; -} - -/** - * Form component for editing common app options. - */ -export default function AppSetupForm({ - commonSetupValues, - setCommonSetupValues, -}: AppSetupFormProps) { - const isInstanceNameEmptyError = !!!commonSetupValues.instanceName; - const isDescriptionEmptyError = !!!commonSetupValues.description; - const isPathEmptyError = !!!commonSetupValues.path; - const isPathInvalidError = !pathCheckRegex.test(commonSetupValues.path); - let pathHelperText = regularPathHelperText; - if (isPathEmptyError) { - pathHelperText = emptyFormHelperText; - } else if (isPathInvalidError) { - pathHelperText = illformedPathHelperText; - } - - const handleChange = ( - e: React.ChangeEvent, - ) => { - setCommonSetupValues({ - ...commonSetupValues, - [e.target.name]: e.target.value, - }); - }; - - return ( - - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ConnectionFailedDialog/ConnectionFailedDialog.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ConnectionFailedDialog/ConnectionFailedDialog.tsx deleted file mode 100644 index d1b692c541..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ConnectionFailedDialog/ConnectionFailedDialog.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import * as React from "react"; -import Dialog from "@mui/material/Dialog"; -import Typography from "@mui/material/Typography"; -import Slide from "@mui/material/Slide"; -import Box from "@mui/material/Box"; -import Paper from "@mui/material/Paper"; -import { TransitionProps } from "@mui/material/transitions"; - -const Transition = React.forwardRef(function Transition( - props: TransitionProps & { - children: React.ReactElement; - }, - ref: React.Ref, -) { - return ; -}); - -/** - * Error dialog that covers entire screen in case of connection error. - * Can't be closed or dismissed. - * - * @todo extend the guidliness, link to the documentation once it's ready. - */ -export default function ConnectionFailedDialog() { - // const supabaseUrl = import.meta.env.VITE_SUPABASE_URL; - // const supabaseKey = import.meta.env.VITE_SUPABASE_KEY; - // const supabaseSchema = import.meta.env.VITE_SUPABASE_SCHEMA; - - return ( - - - - - Connection Error - - - - We were unable to connect to the Supabase instance containing the - app configuration data for this GUI. - - - Please follow the setup guide to resolve the issue. - - - {/* - Connection Details - -
    -
  • - VITE_SUPABASE_URL:{" "} - {supabaseUrl} -
  • -
  • - VITE_SUPABASE_KEY:{" "} - {supabaseKey} -
  • -
  • - VITE_SUPABASE_SCHEMA:{" "} - {supabaseSchema} -
  • -
- - - If the connection details are invalid, please update them in the - .env file, then rebuild and run the application again. - */} -
-
-
- ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/Layout/ContentLayout.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/Layout/ContentLayout.tsx deleted file mode 100644 index 5f33a73031..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/Layout/ContentLayout.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { Card } from "@mui/material"; -import { Outlet } from "react-router-dom"; - -const ContentLayout: React.FC = () => { - return ( - - - - ); -}; - -export default ContentLayout; diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/Layout/HeaderBar.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/Layout/HeaderBar.tsx deleted file mode 100644 index 513ce600fe..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/Layout/HeaderBar.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import * as React from "react"; -import { Link as RouterLink } from "react-router-dom"; -import AppBar from "@mui/material/AppBar"; -import Box from "@mui/material/Box"; -import Toolbar from "@mui/material/Toolbar"; -import IconButton from "@mui/material/IconButton"; -import AppsIcon from "@mui/icons-material/Apps"; -import HelpIcon from "@mui/icons-material/Help"; -import Button from "@mui/material/Button"; -import Tooltip from "@mui/material/Tooltip"; -import { AppInstanceMenuEntry } from "../../common/types/app"; -import { isValidUrl, patchAppRoutePath } from "../../common/utils"; - -type HeaderBarProps = { - path?: string; - menuEntries?: AppInstanceMenuEntry[]; - appDocumentationURL?: string; -}; - -export default function HeaderBarProps({ - path, - menuEntries, - appDocumentationURL, -}: HeaderBarProps) { - return ( - - - - - - - - - {menuEntries && path && ( - - {menuEntries.map((entry) => ( - - ))} - - )} - - {isValidUrl(appDocumentationURL) && ( - window.open(appDocumentationURL, "_blank")} - > - - - )} - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/PersistencePluginStatus/PersistencePluginStatus.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/PersistencePluginStatus/PersistencePluginStatus.tsx deleted file mode 100644 index d1c2b28360..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/PersistencePluginStatus/PersistencePluginStatus.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import React from "react"; -import { useQuery } from "@tanstack/react-query"; -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; -import CircularProgress from "@mui/material/CircularProgress"; - -import StackedRowItems from "../ui/StackedRowItems"; -import { persistencePluginStatus } from "../../common/queries"; - -type DateTimeStringProps = { - dateString: string | undefined; -}; - -function DateTimeString({ dateString }: DateTimeStringProps) { - const date = dateString ? new Date(dateString) : new Date(); - - return {date.toLocaleString()}; -} - -type PersistencePluginStatusProps = { - pluginName: string; -}; - -/** - * Box that fetches and displays persistence plugin status from the database. - */ -export default function PersistencePluginStatus({ - pluginName, -}: PersistencePluginStatusProps) { - const { isError, isPending, data, error } = useQuery( - persistencePluginStatus(pluginName), - ); - - React.useEffect(() => { - isError && console.error(`Could get ${pluginName} status: ${error}`); - }, [isError]); - - return ( - - {isPending && ( - - )} - Persistence Plugin Status - - Plugin Name: - {data?.name} - - - Instance ID: - {data?.last_instance_id} - - - Is Schema Initialized: - - {data?.is_schema_initialized ? "True" : "False"} - - - - Created At: - - - - Last Connected At: - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ui/PageTitle.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ui/PageTitle.tsx deleted file mode 100644 index 747ea86a9e..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ui/PageTitle.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import Typography from "@mui/material/Typography"; -import * as React from "react"; - -export interface PageTitleProps { - children: React.ReactNode; -} - -const PageTitle: React.FC = ({ children }) => { - return ( - - {children} - - ); -}; - -export default PageTitle; diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ui/PageTitleWithGoBack.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ui/PageTitleWithGoBack.tsx deleted file mode 100644 index d71ef0efc2..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ui/PageTitleWithGoBack.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import * as React from "react"; -import { useNavigate } from "react-router-dom"; -import PageTitle from "./PageTitle"; -import Box from "@mui/material/Box"; -import IconButton from "@mui/material/IconButton"; -import ArrowBackIcon from "@mui/icons-material/ArrowBack"; - -export interface PageTitleWithGoBackProps { - children: React.ReactNode; -} - -const PageTitleWithGoBack: React.FC = ({ - children, -}) => { - const navigate = useNavigate(); - - return ( - - navigate(-1)} - sx={{ marginBottom: 3 }} - > - - - {children} - - ); -}; - -export default PageTitleWithGoBack; diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ui/ShortenedLink.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ui/ShortenedLink.tsx deleted file mode 100644 index b7fed84671..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ui/ShortenedLink.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import Link, { LinkProps } from "@mui/material/Link"; -import Tooltip from "@mui/material/Tooltip"; - -const defaultMaxWidth = 200; - -export type ShortenedLinkProps = { - href: string; - maxWidth?: number | string; - direction?: "ltr" | "rtl"; -} & LinkProps; - -/** - * Wrapper around MUI Link for displaying shortified link when necessary. - * Full URL will be shown in tooltip on hover. - * Accepts all regular Typography props. Does not accept children element (displays the URL). - * - * @todo Use common code with ShortenedTypography. - * - * @param href Link to shortify. - * @param maxWidth Maximum with of the text to display before the shortening. - * @param width Same as `maxWidth` (overwrites it). - * @param direction `ltr` (default) will display the beginning of the link, `rtl` will display the ending. - */ -export default function ShortenedLink(params: ShortenedLinkProps) { - const { href, maxWidth: inputMaxWidth, direction, ...linkParams } = params; - const maxWidth = inputMaxWidth ? inputMaxWidth : defaultMaxWidth; - - return ( - - - {href} - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ui/ShortenedTypography.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ui/ShortenedTypography.tsx deleted file mode 100644 index 6ca2b38b72..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ui/ShortenedTypography.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import Tooltip from "@mui/material/Tooltip"; -import Typography, { TypographyProps } from "@mui/material/Typography"; - -const defaultMaxWidth = 200; - -export type ShortenedTypographyProps = { - text: string; - maxWidth?: number | string; - direction?: "ltr" | "rtl"; -} & TypographyProps; - -/** - * Wrapper around MUI Typography for displaying shortified text when necessary. - * Full text will be shown in tooltip on hover. - * Accepts all regular Typography props. Does not accept children element (text is displayed in a tooltip) - * - * @param text Text to shortify. - * @param maxWidth Maximum with of the text to display before the shortening. - * @param width Same as `maxWidth` (overwrites it). - * @param direction `ltr` (default) will display the beginning of the text, `rtl` will display the ending. - */ -export default function ShortenedTypography(params: ShortenedTypographyProps) { - const { - text, - maxWidth: inputMaxWidth, - direction, - ...typographyParams - } = params; - const maxWidth = inputMaxWidth ? inputMaxWidth : defaultMaxWidth; - - return ( - - - {text} - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ui/StackedRowItems.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ui/StackedRowItems.tsx deleted file mode 100644 index e22fab4fe4..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ui/StackedRowItems.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from "react"; -import Stack from "@mui/material/Stack"; - -export interface StackedRowItemsProps { - children: React.ReactElement[]; -} - -/** - * Simple component that puts all the children in a row, space-between with minimal spacing 1. - * Uses MUI Stack. - */ -export default function StackedRowItems({ children }: StackedRowItemsProps) { - return ( - - {children} - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ui/TitleWithIcon.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ui/TitleWithIcon.tsx deleted file mode 100644 index ce55791ac2..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ui/TitleWithIcon.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; -import { SvgIconComponent } from "@mui/icons-material"; - -interface TitleWithIconProps { - icon: SvgIconComponent; - children: React.ReactNode; -} - -const TitleWithIcon: React.FC = ({ - children, - icon: Icon, -}) => { - return ( - - - - {children} - - - ); -}; - -export default TitleWithIcon; diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/ClickableTableRow.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/ClickableTableRow.tsx deleted file mode 100644 index c67f25dced..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/ClickableTableRow.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import TableRow from "@mui/material/TableRow"; -import { styled } from "@mui/material/styles"; - -export const ClickableTableRow = styled(TableRow)(({ theme }) => ({ - cursor: "pointer", - "&:hover": { - backgroundColor: theme.palette.grey[200], - "& .MuiTableCell-root": { - color: theme.palette.secondary.main, - }, - }, -})); diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/StyledTableCell.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/StyledTableCell.tsx deleted file mode 100644 index 244fe8e6f4..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/StyledTableCell.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import TableCell from "@mui/material/TableCell"; -import { styled } from "@mui/material/styles"; - -export const tableCellHeight = 39; - -export const StyledTableCellHeader = styled(TableCell)(({ theme }) => ({ - fontSize: 17, - fontWeight: "bold", - color: theme.palette.primary.main, - height: tableCellHeight, - borderColor: theme.palette.primary.main, -})); - -export const StyledTableCell = styled(TableCell)(() => ({ - height: tableCellHeight, -})); diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/UITableListing.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/UITableListing.tsx deleted file mode 100644 index 6d206f8793..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/UITableListing.tsx +++ /dev/null @@ -1,214 +0,0 @@ -import * as React from "react"; -import { - UseQueryOptions, - keepPreviousData, - useQuery, -} from "@tanstack/react-query"; -import Box from "@mui/material/Box"; -import Paper from "@mui/material/Paper"; -import Table from "@mui/material/Table"; -import TableBody from "@mui/material/TableBody"; -import TableContainer from "@mui/material/TableContainer"; -import TableRow from "@mui/material/TableRow"; -import TableHead from "@mui/material/TableHead"; -import CircularProgress from "@mui/material/CircularProgress"; - -import { useNotification } from "../../../common/context/NotificationContext"; -import ShortenedTypography from "../ShortenedTypography"; -import { - StyledTableCell, - StyledTableCellHeader, - tableCellHeight, -} from "./StyledTableCell"; -import type { UITableListingPaginationActionProps } from "./UITableListingPaginationAction"; -import { ClickableTableRow } from "./ClickableTableRow"; - -/** - * Table column configuration entry - * - * @param name Name of the column to be displayed in the header. - * @param field Name of the field in data returned from react-query - * @param isLongString? boolean if value is hash or not (i.e. should be shortened when necessary) - * @param isDate? boolean if value is a date (should be formatted differently) - * @param isUnique? boolean if value is unique (can be used as key) - */ -export type ColumnConfigEntry = { - name: string; - field: string; - isLongString?: boolean; - isDate?: boolean; - isUnique?: boolean; -}; - -export type ColumnConfigType = { [key: string]: ColumnConfigEntry }; - -/** - * UITableListing parameters - */ -export interface UITableListingProps { - queryFunction: ( - page: number, - pageSize: number, - ) => UseQueryOptions; - label: string; - columnConfig: ColumnConfigType; - footerComponent: React.ComponentType; - columns: string[]; - rowsPerPage: number; - tableSize?: "small" | "medium"; - onClick?: (row: Record) => void; -} - -function getKeyField(columnConfig: ColumnConfigType) { - const keyField = Object.entries(columnConfig) - .find(([, config]) => config.isUnique) - ?.map((entry) => (entry as ColumnConfigEntry).field) - ?.pop(); - - if (!keyField) { - throw new Error( - `Could not find unique field to display UITableListing. Config: ${columnConfig}`, - ); - } - - return keyField; -} - -function formatCellValue(config: ColumnConfigEntry, value: any) { - if (config.isLongString) { - return ; - } else if (config.isDate) { - const date = new Date(value); - return date.toLocaleString(); - } - // Return plain value by default - return value; -} - -function createTableRow( - row: Record, - columns: string[], - columnConfig: ColumnConfigType, -) { - return columns.map((colName) => { - const config = columnConfig[colName]; - const value = row[config.field]; - return ( - - {formatCellValue(config, value)} - - ); - }); -} - -/** - * UITableListing - Show table with paged data fetched from react-query. - * - * Use higher level component when possible. - * Supports paging and error handling. Will show empty entries if number of entries - * is smaller then requested `rowsPerPage` to keep UI in place. - * - * @param footerComponent component will be rendered in a footer of a transaction list table. - * @param columns list of columns to be rendered. - * @param rowsPerPage how many rows to show per page. - */ -export default function UITableListing< - T extends { - [key: string]: any; - }, ->({ - queryFunction, - label, - columnConfig, - footerComponent: FooterComponent, - columns, - rowsPerPage, - tableSize, - onClick, -}: UITableListingProps) { - const [page, setPage] = React.useState(0); - const { isError, isPending, data, error, refetch } = useQuery({ - ...queryFunction(page, rowsPerPage), - placeholderData: keepPreviousData, - }); - const { showNotification } = useNotification(); - const displayData: T[] = data ?? []; - - React.useEffect(() => { - isError && showNotification(`Could not fetch data: ${error}`, "error"); - }, [isError]); - - // Avoid a layout jump when reaching the last page with empty rows. - const emptyRows = Math.max(0, rowsPerPage - displayData.length); - - return ( - - {isPending && ( - - )} - - - - - {columns.map((colName) => { - return ( - - {columnConfig[colName].name} - - ); - })} - - - - {displayData.map((row) => { - if (onClick) { - return ( - onClick(row)} - > - {createTableRow(row, columns, columnConfig)} - - ); - } else { - return ( - - {createTableRow(row, columns, columnConfig)} - - ); - } - })} - {emptyRows > 0 && ( - - - - )} - -
- { - setPage(newPage); - }} - onPageRefresh={() => { - refetch(); - }} - disableNext={emptyRows > 0} - /> -
-
- ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/UITableListingPaginationAction.tsx b/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/UITableListingPaginationAction.tsx deleted file mode 100644 index 0991da732c..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/components/ui/UITableListing/UITableListingPaginationAction.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import Box from "@mui/material/Box"; -import IconButton from "@mui/material/IconButton"; -import RefreshIcon from "@mui/icons-material/Refresh"; -import FirstPageIcon from "@mui/icons-material/FirstPage"; -import KeyboardArrowLeft from "@mui/icons-material/KeyboardArrowLeft"; -import KeyboardArrowRight from "@mui/icons-material/KeyboardArrowRight"; - -const actionButtonFontSize = 30; - -/** - * Pagination footer component interface. - */ -export interface UITableListingPaginationActionProps { - page: number; - disableNext: boolean; - onPageChange: (newPage: number) => void; - onPageRefresh: () => void; -} - -/** - * Pagination footer component to be used with `UITableListing`. - */ -const UITableListingPaginationAction: React.FC< - UITableListingPaginationActionProps -> = ({ page, disableNext, onPageChange, onPageRefresh }) => { - const homeButton = - page === 0 ? ( - - - - ) : ( - { - onPageChange(0); - }} - aria-label="first page" - > - - - ); - - return ( - - {homeButton} - - { - onPageChange(page - 1); - }} - disabled={page === 0} - aria-label="previous page" - > - - - { - onPageChange(page + 1); - }} - aria-label="next page" - disabled={disableNext} - > - - - - ); -}; - -export default UITableListingPaginationAction; diff --git a/packages/cacti-ledger-browser/src/main/typescript/main.tsx b/packages/cacti-ledger-browser/src/main/typescript/main.tsx deleted file mode 100644 index 06a555e567..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/main.tsx +++ /dev/null @@ -1,12 +0,0 @@ -// Needed to fix vite caching error of MUI - see https://github.com/vitejs/vite/issues/12423 -import "@mui/material/styles/styled"; - -import * as React from "react"; -import * as ReactDOM from "react-dom/client"; -import CactiLedgerBrowserApp from "./CactiLedgerBrowserApp"; - -ReactDOM.createRoot(document.getElementById("root")!).render( - - - , -); diff --git a/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/AddNewApp.tsx b/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/AddNewApp.tsx deleted file mode 100644 index 7e96de45d9..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/AddNewApp.tsx +++ /dev/null @@ -1,169 +0,0 @@ -import * as React from "react"; -import { useMutation, useQueryClient } from "@tanstack/react-query"; -import Box from "@mui/material/Box"; -import Stepper from "@mui/material/Stepper"; -import Step from "@mui/material/Step"; -import StepLabel from "@mui/material/StepLabel"; - -import config from "../../common/config"; -import { AppCategory } from "../../common/app-category"; -import { addGuiAppConfig, invalidateGuiAppConfig } from "../../common/queries"; -import { useNotification } from "../../common/context/NotificationContext"; -import AppSpecificSetupView from "./AppSpecificSetupView"; -import CommonSetupView from "./CommonSetupView"; -import SelectAppView from "./SelectAppView"; -import SelectGroupView from "./SelectGroupView"; - -const steps = [ - "Select Group", - "Select App", - "Common Setup", - "App Specific Setup", -]; - -export interface AddNewAppProps { - handleDone: () => void; -} - -/** - * Complex view with steps used to select and setup new GUI application. - */ -export default function AddNewApp({ handleDone }: AddNewAppProps) { - const queryClient = useQueryClient(); - const addGuiAppMutation = useMutation({ - mutationFn: addGuiAppConfig, - onSuccess: () => invalidateGuiAppConfig(queryClient), - }); - const { showNotification } = useNotification(); - const [activeStep, setActiveStep] = React.useState(0); - const [appCategory, setAppCategory] = React.useState(""); - const [appId, setAppId] = React.useState(""); - const [commonSetupValues, setCommonSetupValues] = React.useState({ - instanceName: "", - description: "", - path: "", - }); - const [appOptionsJsonString, setAppOptionsJsonString] = React.useState(""); - - // Handle app creation error - React.useEffect(() => { - if (addGuiAppMutation.isError) { - showNotification( - `Could not fetch action endorsements: ${addGuiAppMutation.error}`, - "error", - ); - addGuiAppMutation.reset(); - } - }, [addGuiAppMutation.isError]); - - // Handle app creation success - React.useEffect(() => { - if (addGuiAppMutation.isSuccess) { - showNotification( - `Application ${commonSetupValues.instanceName} added successfully`, - "success", - ); - addGuiAppMutation.reset(); - handleDone(); - } - }, [addGuiAppMutation.isSuccess]); - - const handleNextStep = () => { - setActiveStep((prevActiveStep) => prevActiveStep + 1); - }; - - const handleBackStep = () => { - setActiveStep((prevActiveStep) => prevActiveStep - 1); - }; - - // Select current view in a steper - let currentPage: JSX.Element | undefined; - switch (activeStep) { - case 0: - currentPage = ( - { - setAppCategory(category); - handleNextStep(); - }} - /> - ); - break; - case 1: - currentPage = ( - { - setAppId(appId); - - // Fetch setup defaults to be used in later views - const appDefinition = config.get(appId); - if (!appDefinition) { - throw new Error(`Could not find App Definition with id ${appId}`); - } - setCommonSetupValues({ - instanceName: appDefinition.defaultInstanceName, - description: appDefinition.defaultDescription, - path: appDefinition.defaultPath, - }); - setAppOptionsJsonString( - JSON.stringify(appDefinition.defaultOptions, undefined, 2), - ); - - handleNextStep(); - }} - handleBack={() => { - setAppId(""); - setAppCategory(""); - handleBackStep(); - }} - /> - ); - break; - case 2: - currentPage = ( - - ); - break; - case 3: - currentPage = ( - { - addGuiAppMutation.mutate({ - app_id: appId, - instance_name: commonSetupValues.instanceName, - description: commonSetupValues.description, - path: commonSetupValues.path, - options: JSON.parse(appOptionsJsonString), - }); - }} - /> - ); - break; - } - - // Render the stepper view - return ( - - - {steps.map((label) => { - return ( - - {label} - - ); - })} - - {currentPage} - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/AppSpecificSetupView.tsx b/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/AppSpecificSetupView.tsx deleted file mode 100644 index f75df74ed3..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/AppSpecificSetupView.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import * as React from "react"; -import Box from "@mui/material/Box"; -import Button from "@mui/material/Button"; -import Typography from "@mui/material/Typography"; -import LoadingButton from "@mui/lab/LoadingButton"; -import SaveIcon from "@mui/icons-material/Save"; -import AppOptionsForm from "../../components/AppSetupForms/AppOptionsForm"; - -export interface AppSpecificSetupViewProps { - appOptionsJsonString: string; - setAppOptionsJsonString: React.Dispatch>; - handleBack: () => void; - handleSave: () => void; - isSending: boolean; -} - -/** - * Add new app stepper view containing application specific configuration (in form of a JSON to be filled by the user) - */ -export default function AppSpecificSetupView({ - appOptionsJsonString, - setAppOptionsJsonString, - handleBack, - handleSave, - isSending, -}: AppSpecificSetupViewProps) { - const [validationError, setValidationError] = React.useState(""); - - return ( - <> - App Specific Setup - - - - } - variant="contained" - onClick={() => { - // Validate JSON input - try { - JSON.parse(appOptionsJsonString); - } catch (error) { - setValidationError(`Invalid JSON format, error: ${error}`); - return; - } - - handleSave(); - }} - > - Save - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/CommonSetupView.tsx b/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/CommonSetupView.tsx deleted file mode 100644 index f1ee05b741..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/CommonSetupView.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import * as React from "react"; -import Box from "@mui/material/Box"; -import Button from "@mui/material/Button"; -import Typography from "@mui/material/Typography"; -import AppSetupForm from "../../components/AppSetupForms/AppSetupForm"; - -export interface CommonSetupFormValues { - instanceName: string; - description: string; - path: string; -} - -export interface CommonSetupViewProps { - commonSetupValues: CommonSetupFormValues; - setCommonSetupValues: React.Dispatch< - React.SetStateAction - >; - handleBack: () => void; - handleNext: () => void; -} - -/** - * Add new app stepper view containing common application configuration (required by all apps). - */ -export default function CommonSetupView({ - commonSetupValues, - setCommonSetupValues, - handleBack, - handleNext, -}: CommonSetupViewProps) { - return ( - <> - Common App Setup - - - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/SelectAppView.tsx b/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/SelectAppView.tsx deleted file mode 100644 index 94cefbd85a..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/SelectAppView.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import Box from "@mui/material/Box"; -import Button from "@mui/material/Button"; -import Typography from "@mui/material/Typography"; -import List from "@mui/material/List"; -import ListItemText from "@mui/material/ListItemText"; -import ListItemAvatar from "@mui/material/ListItemAvatar"; -import Avatar from "@mui/material/Avatar"; -import ListItemButton from "@mui/material/ListItemButton"; -import OpenInNewIcon from "@mui/icons-material/OpenInNew"; - -import config from "../../common/config"; -import { AppCategory, getAppCategoryConfig } from "../../common/app-category"; -import { isValidUrl } from "../../common/utils"; - -export interface SelectAppViewProps { - appCategory: string; - handleAppSelected: (appId: string) => void; - handleBack: () => void; -} - -/** - * Add new app stepper view containing list of app under given category to pick. - */ -export default function SelectAppView({ - appCategory, - handleAppSelected, - handleBack, -}: SelectAppViewProps) { - const apps = Array.from(config).filter( - (app) => app[1].category === appCategory, - ); - const categoryConfig = getAppCategoryConfig(appCategory as AppCategory); - - return ( - <> - Select Application - - - {apps.map(([appId, app]) => { - return ( - - handleAppSelected(appId)}> - - {categoryConfig.icon} - - - - - - ); - })} - - - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/SelectGroupView.tsx b/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/SelectGroupView.tsx deleted file mode 100644 index 5c0cab42a6..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/pages/add-new-app/SelectGroupView.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import Typography from "@mui/material/Typography"; -import List from "@mui/material/List"; -import ListItemText from "@mui/material/ListItemText"; -import ListItemAvatar from "@mui/material/ListItemAvatar"; -import Avatar from "@mui/material/Avatar"; -import ListItemButton from "@mui/material/ListItemButton"; -import config from "../../common/config"; -import { AppCategory, getAppCategoryConfig } from "../../common/app-category"; - -export interface SelectGroupViewProps { - handleCategorySelected: (category: AppCategory) => void; -} - -/** - * Add new app stepper view containing list of app categories to select. - */ -export default function SelectGroupView({ - handleCategorySelected, -}: SelectGroupViewProps) { - const appCategories = Array.from(config.values()).map((app) => app.category); - - return ( - <> - Select Group - - - {Object.values(AppCategory).map((category) => { - const categoryConfig = getAppCategoryConfig(category); - const appCount = appCategories.filter( - (appCat) => appCat === category, - ).length; - const categoryTitle = `${categoryConfig.name} (${appCount})`; - - return ( - handleCategorySelected(category)} - > - - {categoryConfig.icon} - - - - ); - })} - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/pages/configure-app/ConfigureApp.tsx b/packages/cacti-ledger-browser/src/main/typescript/pages/configure-app/ConfigureApp.tsx deleted file mode 100644 index bb1bd64741..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/pages/configure-app/ConfigureApp.tsx +++ /dev/null @@ -1,267 +0,0 @@ -import * as React from "react"; -import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import Box from "@mui/material/Box"; -import Dialog from "@mui/material/Dialog"; -import DialogTitle from "@mui/material/DialogTitle"; -import DialogContent from "@mui/material/DialogContent"; -import Typography from "@mui/material/Typography"; -import CircularProgress from "@mui/material/CircularProgress"; -import Button from "@mui/material/Button"; -import DialogContentText from "@mui/material/DialogContentText"; -import DialogActions from "@mui/material/DialogActions"; -import LoadingButton from "@mui/lab/LoadingButton"; -import SaveIcon from "@mui/icons-material/Save"; -import DeleteIcon from "@mui/icons-material/Delete"; - -import { - deleteGuiAppConfig, - guiAppConfigById, - invalidateGuiAppConfig, - updateGuiAppConfig, -} from "../../common/queries"; -import { UpdateGuiAppConfigType } from "../../common/types/app"; -import { useNotification } from "../../common/context/NotificationContext"; -import AppSetupForm from "../../components/AppSetupForms/AppSetupForm"; -import AppOptionsForm from "../../components/AppSetupForms/AppOptionsForm"; - -type DeleteWithConfirmationButtonProps = { - appInstanceId: string; - handleDone: () => void; -}; - -/** - * Button and logic for removing the application from a database. - */ -function DeleteWithConfirmationButton({ - appInstanceId, - handleDone, -}: DeleteWithConfirmationButtonProps) { - const { showNotification } = useNotification(); - const queryClient = useQueryClient(); - const [openDialog, setOpenDialog] = React.useState(false); - const deleteGuiAppMutation = useMutation({ - mutationFn: () => deleteGuiAppConfig(appInstanceId), - onSuccess: () => invalidateGuiAppConfig(queryClient), - }); - - const handleClose = () => { - setOpenDialog(false); - }; - - // Show error if app can't be deleted from the database - React.useEffect(() => { - if (deleteGuiAppMutation.isError) { - showNotification( - `Could not delete application ${appInstanceId}, error: ${deleteGuiAppMutation.error}`, - "error", - ); - deleteGuiAppMutation.reset(); - } - }, [deleteGuiAppMutation.isError]); - - // Show success message and terminate if data was saved successfully - React.useEffect(() => { - if (deleteGuiAppMutation.isSuccess) { - showNotification( - `Application ${appInstanceId} removed successfully`, - "success", - ); - deleteGuiAppMutation.reset(); - handleDone(); - } - }, [deleteGuiAppMutation.isSuccess]); - - return ( - <> - } - onClick={() => setOpenDialog(true)} - sx={{ marginRight: 1 }} - variant="contained" - > - Delete - - - - Confirm Deletion - - - Are you sure you want to delete this application? This action is - irreversible. You will need to set it up again if you proceed. - - - - - - - - - ); -} - -export interface ConfigureAppProps { - appInstanceId: string; - handleDone: () => void; -} - -/** - * View to edit or delete an application. - */ -export default function ConfigureApp({ - appInstanceId, - handleDone, -}: ConfigureAppProps) { - const queryClient = useQueryClient(); - const { showNotification } = useNotification(); - const [jsonValidationError, setJsonValidationError] = React.useState(""); - const [commonSetupValues, setCommonSetupValues] = React.useState({ - instanceName: "", - description: "", - path: "", - }); - const [appOptionsJsonString, setAppOptionsJsonString] = React.useState(""); - const updateGuiAppMutation = useMutation({ - mutationFn: (data: UpdateGuiAppConfigType) => - updateGuiAppConfig(appInstanceId, data), - onSuccess: () => invalidateGuiAppConfig(queryClient), - }); - const appConfigQuery = useQuery(guiAppConfigById(appInstanceId)); - const appConfigData = appConfigQuery.data; - - // Set current app configuration values to the form once data is received from the database - React.useEffect(() => { - if (appConfigData && !appConfigQuery.isPending) { - setCommonSetupValues({ - instanceName: appConfigData.instance_name, - description: appConfigData.description, - path: appConfigData.path, - }); - setAppOptionsJsonString( - JSON.stringify(appConfigData.options, undefined, 2), - ); - } - }, [appConfigData]); - - // Show error if current data can't be fetched from the database - React.useEffect(() => { - if (appConfigQuery.isError) { - showNotification( - `Could not fetch ${appInstanceId} application config: ${appConfigQuery.error}`, - "error", - ); - } - }, [appConfigQuery.isError]); - - // Show error if updates can't be saved to the database - React.useEffect(() => { - if (updateGuiAppMutation.isError) { - showNotification( - `Could not save ${appInstanceId} updated application config: ${updateGuiAppMutation.error}`, - "error", - ); - updateGuiAppMutation.reset(); - } - }, [updateGuiAppMutation.isError]); - - // Show success message and terminate if data was saved successfully - React.useEffect(() => { - if (updateGuiAppMutation.isSuccess) { - showNotification( - `Application ${commonSetupValues.instanceName} edited successfully`, - "success", - ); - updateGuiAppMutation.reset(); - handleDone(); - } - }, [updateGuiAppMutation.isSuccess]); - - // Render the view - return ( - - {appConfigQuery.isPending && ( - - )} - - Common App Setup - - - - App Specific Setup - - - - - - - - - } - variant="contained" - onClick={() => { - // Validate JSON input - try { - JSON.parse(appOptionsJsonString); - } catch (error) { - setJsonValidationError(`Invalid JSON format, error: ${error}`); - return; - } - - updateGuiAppMutation.mutate({ - instance_name: commonSetupValues.instanceName, - description: commonSetupValues.description, - path: commonSetupValues.path, - options: JSON.parse(appOptionsJsonString), - }); - }} - > - Save - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/pages/home/AddApplicationPopupCard.tsx b/packages/cacti-ledger-browser/src/main/typescript/pages/home/AddApplicationPopupCard.tsx deleted file mode 100644 index b01b45bbc4..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/pages/home/AddApplicationPopupCard.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import React from "react"; -import { useTheme } from "@mui/material/styles"; -import Card from "@mui/material/Card"; -import CardActionArea from "@mui/material/CardActionArea"; -import Typography from "@mui/material/Typography"; -import Box from "@mui/material/Box"; -import Button from "@mui/material/Button"; -import Dialog from "@mui/material/Dialog"; -import DialogContent from "@mui/material/DialogContent"; -import DialogTitle from "@mui/material/DialogTitle"; -import AddIcon from "@mui/icons-material/Add"; -import CloseIcon from "@mui/icons-material/Close"; -import AddNewApp from "../add-new-app/AddNewApp"; - -export interface NewAppDialogProps { - open: boolean; - setOpen: React.Dispatch>; -} - -function NewAppDialog({ open, setOpen }: NewAppDialogProps) { - const handleClose = () => { - setOpen(false); - }; - - return ( - <> - - - Add Application - - - - - - - - ); -} - -export default function AddApplicationPopupCard() { - const theme = useTheme(); - const [open, setOpen] = React.useState(false); - - return ( - <> - - { - setOpen(true); - }} - sx={{ - flex: 1, - }} - > - - - Add Application - - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/pages/home/AppCard.tsx b/packages/cacti-ledger-browser/src/main/typescript/pages/home/AppCard.tsx deleted file mode 100644 index 3517da884f..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/pages/home/AppCard.tsx +++ /dev/null @@ -1,179 +0,0 @@ -import React from "react"; -import { useNavigate } from "react-router-dom"; -import { useTheme } from "@mui/material/styles"; -import Dialog from "@mui/material/Dialog"; -import DialogTitle from "@mui/material/DialogTitle"; -import DialogContent from "@mui/material/DialogContent"; -import Card from "@mui/material/Card"; -import CardActionArea from "@mui/material/CardActionArea"; -import CardActions from "@mui/material/CardActions"; -import CardContent from "@mui/material/CardContent"; -import CircularProgress from "@mui/material/CircularProgress"; -import Button from "@mui/material/Button"; -import Typography from "@mui/material/Typography"; - -import { AppInstance, AppStatus } from "../../common/types/app"; -import ConfigureApp from "../configure-app/ConfigureApp"; - -type StatusTextProps = { - status: AppStatus; -}; - -/** - * Application status text with color according to it's severity. - */ -function StatusText({ status }: StatusTextProps) { - const theme = useTheme(); - - return ( - - {status.message} - - ); -} - -type InitializedTextProps = { - isInitialized: boolean; -}; - -/** - * Application initialization status text - `error` color if not initialized, `success` otherwise. - */ -function InitializedText({ isInitialized }: InitializedTextProps) { - let text = "No"; - let textColor: "error" | "success" = "error"; - - if (isInitialized) { - text = "Yes"; - textColor = "success"; - } - - return ; -} - -type StatusDialogButtonProps = { - statusComponent: React.ReactElement; -}; - -function StatusDialogButton({ statusComponent }: StatusDialogButtonProps) { - const [openDialog, setOpenDialog] = React.useState(false); - - return ( - <> - - setOpenDialog(false)} - open={openDialog} - > - App Status - {statusComponent} - - - ); -} - -type ConfigureDialogButtonProps = { - appInstanceId: string; -}; - -function ConfigureDialogButton({ appInstanceId }: ConfigureDialogButtonProps) { - const [openDialog, setOpenDialog] = React.useState(false); - - return ( - <> - - setOpenDialog(false)} - open={openDialog} - > - Configure Application - - setOpenDialog(false)} - /> - - - - ); -} - -type AppCardProps = { - appConfig: AppInstance; -}; - -/** - * Application card component. Shows basic information and allows navigation to - * specific app on click. Has action for showing app status and configuration - * pop-ups. - */ -export default function AppCard({ appConfig }: AppCardProps) { - const navigate = useNavigate(); - const theme = useTheme(); - const status = appConfig.useAppStatus(); - - return ( - - { - navigate(appConfig.path); - }} - > - - - {appConfig.instanceName} - - - {appConfig.appName} - - {appConfig.description && ( - {appConfig.description} - )} - - Initialized:{" "} - {status.isPending ? ( - - ) : ( - - )} - - - Status:{" "} - {status.isPending ? ( - - ) : ( - - )} - - - - - - - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/pages/home/HomePage.tsx b/packages/cacti-ledger-browser/src/main/typescript/pages/home/HomePage.tsx deleted file mode 100644 index bfac7cfddd..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/pages/home/HomePage.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; - -import { AppInstance } from "../../common/types/app"; -import AppCard from "./AppCard"; -import AddApplicationPopupCard from "./AddApplicationPopupCard"; - -type HomePageProps = { - appConfig: AppInstance[]; -}; - -export default function HomePage({ appConfig }: HomePageProps) { - return ( - - - Applications - - - - {appConfig.map((a) => { - return ; - })} - - - ); -} diff --git a/packages/cacti-ledger-browser/src/main/typescript/theme.ts b/packages/cacti-ledger-browser/src/main/typescript/theme.ts deleted file mode 100644 index 1a8ec83c1b..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/theme.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ThemeOptions } from "@mui/material/styles"; - -export const themeOptions: ThemeOptions = { - palette: { - mode: "light", - primary: { - main: "#2C6E49", - }, - secondary: { - main: "#5D4037", - }, - warning: { - main: "#D68C45", - }, - info: { - main: "#5D4037", - }, - }, -}; diff --git a/packages/cacti-ledger-browser/src/main/typescript/vite-env.d.ts b/packages/cacti-ledger-browser/src/main/typescript/vite-env.d.ts deleted file mode 100644 index 8b854e00df..0000000000 --- a/packages/cacti-ledger-browser/src/main/typescript/vite-env.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// - -interface ImportMetaEnv { - readonly VITE_SUPABASE_URL: string - readonly VITE_SUPABASE_KEY: string - readonly VITE_SUPABASE_SCHEMA: string -} - -interface ImportMeta { - readonly env: ImportMetaEnv -} \ No newline at end of file diff --git a/packages/cacti-ledger-browser/tsconfig.json b/packages/cacti-ledger-browser/tsconfig.json deleted file mode 100644 index bacee55f67..0000000000 --- a/packages/cacti-ledger-browser/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "target": "esnext", - "module": "esnext", - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "skipLibCheck": true, - "noEmit": true, - "jsx": "react-jsx", - "tsBuildInfoFile": "../../.build-cache/cacti-ledger-browser.tsbuildinfo", - "plugins": [ - { - "name": "typescript-plugin-css-modules" - } - ], - "lib": ["ES2015", "dom"] - }, - "include": ["./src"] -} diff --git a/packages/cacti-ledger-browser/tsconfig.node.json b/packages/cacti-ledger-browser/tsconfig.node.json deleted file mode 100644 index 42872c59f5..0000000000 --- a/packages/cacti-ledger-browser/tsconfig.node.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "skipLibCheck": true, - "module": "ESNext", - "moduleResolution": "bundler", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/packages/cacti-ledger-browser/vite.config.mts b/packages/cacti-ledger-browser/vite.config.mts deleted file mode 100644 index 27d39b69df..0000000000 --- a/packages/cacti-ledger-browser/vite.config.mts +++ /dev/null @@ -1,10 +0,0 @@ -import { defineConfig } from "vite"; -import react from "@vitejs/plugin-react"; - -// https://vitejs.dev/config/ -export default defineConfig({ - server: { - port: 3001, - }, - plugins: [react()], -}); diff --git a/packages/cacti-plugin-consortium-static/.gitignore b/packages/cacti-plugin-consortium-static/.gitignore deleted file mode 100644 index ce4bacc38a..0000000000 --- a/packages/cacti-plugin-consortium-static/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -cactus-openapi-spec-plugin-consortium-manual.json -src/main/typescript/generated/openapi/typescript-axios/.npmignore \ No newline at end of file diff --git a/packages/cacti-plugin-consortium-static/CHANGELOG.md b/packages/cacti-plugin-consortium-static/CHANGELOG.md deleted file mode 100644 index 014133752b..0000000000 --- a/packages/cacti-plugin-consortium-static/CHANGELOG.md +++ /dev/null @@ -1,26 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-consortium-static - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-consortium-static - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-consortium-static - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -### Features - -* **consortium-static:** new consortium plugin ([db3475f](https://github.com/hyperledger/cacti/commit/db3475fe359ede8fbf5bcbe6e9dc40c40cd2378d)) diff --git a/packages/cacti-plugin-consortium-static/README.md b/packages/cacti-plugin-consortium-static/README.md deleted file mode 100644 index f879b40501..0000000000 --- a/packages/cacti-plugin-consortium-static/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# `@hyperledger/cacti-plugin-consortium-static` - -## Cacti Consortium Static - -This plugin is an improvement of the package /cactus-plugin-consortium-manual ,bringing some new features to the table while conserving the possibility to be used as the old one (not allowing runtime changes) - -### Add Nodes to Consortium - -It is possible to add a new node to the consortium using the api of the plugin. - -New nodes need to belong/be certified by one of the organizations that are part of the consortium. On creating the consortium, it is required to specify the public keys of the organizations that are part of the consortium. When a new node requests to join, the request carries a jwt token signed by the organization it is tied to, which serves as proof that the organization reccognises the new node identity. - -When a new node submits a request to join, the receiving node verifies the request and broadcasts it (or not, depending on the verification) to the remaining nodes in the consortium. There is no consensus or reliable broadcast implemented. All the other nodes submit the request to the same verification process. If, for some reason, there are disparities in the consortiumDatabases of each node, either it is due to a network issue (broadcast did not reach destination) or due to malfunction of some node. - - -### Consortium Repository - -In addition to the default consortium repository (in cactus-core), the new repository includes data about the Node the repository belongs to: -```typescript -//data about self - private readonly node: CactusNode; - private readonly ledgers: Ledger[]; - private readonly pluginInstances: PluginInstance[]; - private readonly memberId: string; -``` -It also includes the root PolicyGroup of the consortium (explained in next section), and the common configurations of the packages deployed by nodes within the consortium. - -We do not verify if the nodes actually apply these configurations and policies, the information so far is used just to check that nodes have knowledge of this settings. Compliance or not is at the responsibility of each node, and to be verified if necessary by other means. - -To verify new nodes have the same policies and package configs as the others already in the consortium, we deterministically build two merkle trees (one with each info), concat both roots, and each node verifies the result against their own policies and package common configs. - -As a result of this proccess, nodes with divergent policies and configs are not accepted in the consortium (we assume all nodes are correctly configured when the network is created). - -### Policy Model - -We introduce in this package a proposal of a general-purpose policy model based in work done by the IETF: Core Policy Framework [RFC3060](https://www.rfc-editor.org/rfc/rfc3060). - -The model (simplified version) can be viewed in the policy-model directory. - -As a brief description, we group PolicyRules in PolicyGroups. PolicyGroups contain PolicyRules and possibly other PolicyGroups. A PolicyRule is composed by a PolicyCondition (constraint to be verified prior to applying the policy) and a PolicyAction (action to be applied). - -Below a simplified UML with the relationships between the classes: - -![policy model uml](https://github.com/eduv09/images/blob/main/policy-model-uml.jpg) - -The consortium information needs to hold only the root policyGroup (others are reached going down in the hierarchy). Each PolicyGroup has a Role. Roles identify the scope of the policy, so a PolicyRule has a set of Roles (role of the group it belongs to, and groups higher in the hierarchy). - -The model is in an early stage, and serves only as a POC for now. The goal is to refine it, and possibly move it to cactus-core once if it is accepted by the community as a advantageous feature. It is possible to create consortium without any policy rule or group defined. - - - -## Notes - -Please reffer to package "@hyperledger/cactus-plugin-consortium-manual" as the documentation there applies to this one, namely information about the Prometheus Exporter. - -For usage, check the tests in the /integration folder \ No newline at end of file diff --git a/packages/cacti-plugin-consortium-static/openapitools.json b/packages/cacti-plugin-consortium-static/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cacti-plugin-consortium-static/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cacti-plugin-consortium-static/package.json b/packages/cacti-plugin-consortium-static/package.json deleted file mode 100644 index 6e46b0852e..0000000000 --- a/packages/cacti-plugin-consortium-static/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "name": "@hyperledger/cacti-plugin-consortium-static", - "version": "2.0.0", - "description": "A web service plugin that provides management capabilities on a Cactus consortium as a whole for administrative purposes.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Eduardo Vasques", - "email": "eduardovasques10@tecnico.ulisboa.pt", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cacti-plugin-consortium-static.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "run-p 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "body-parser": "1.20.3", - "express": "4.21.0", - "http-errors-enhanced-cjs": "2.0.1", - "jose": "4.15.5", - "merkletreejs": "0.4.0", - "prom-client": "15.1.3", - "safe-stable-stringify": "2.4.3", - "typescript-optional": "2.0.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/express": "5.0.0", - "@types/json-stable-stringify": "1.0.33", - "@types/uuid": "10.0.0", - "web3": "1.6.1" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cacti-plugin-consortium-static.web.umd.min.js", - "mainMinified": "dist/cacti-plugin-consortium-static.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/json/openapi.json b/packages/cacti-plugin-consortium-static/src/main/json/openapi.json deleted file mode 100644 index 1abbbc9342..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/json/openapi.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Consortium Web Service", - "description": "Manage a Cactus consortium through the APIs. Needs administrative privileges.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "Identity": { - "type": "object", - "description": "Identity object of a Cacti Node", - "required": ["pubKey", "memberId", "proof"], - "properties": { - "pubKey": { - "description": "Public key of the Node", - "type": "string", - "nullable": false - }, - "memberId": { - "description": "memberId of the organization the node belongs to", - "type": "string", - "nullable": false - }, - "proof": { - "description": "JWT generated by the organization the node belongs to", - "type": "string", - "nullable": false - } - } - }, - "NewNodeRequestV1": { - "type": "object", - "required": [ - "identity", - "treeHash", - "node", - "ledger", - "pluginInstance", - "signature" - ], - "properties": { - "identity": { - "$ref": "#/components/schemas/Identity", - "nullable": false - }, - "treeHash": { - "description": "proof of common configs and policies defined by the consortium", - "type": "string", - "nullable": false - }, - "node": { - "description": "A Cacti Node", - "$ref": "#/components/schemas/CactusNode", - "nullable": false - }, - "ledger": { - "description": "Ledger metadata", - "type": "array", - "items": { - "$ref": "#/components/schemas/Ledger", - "nullable": false - }, - "default": [] - }, - "pluginInstance": { - "description": "Plugin Instance metadata", - "items": { - "$ref": "#/components/schemas/PluginInstance", - "nullable": false - }, - "default": [] - }, - "signature": { - "description": "signature of the message", - "type": "string", - "nullable": false - } - } - }, - "PrimaryKey": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "nullable": false - }, - "ConsortiumMemberId": { - "$ref": "#/components/schemas/PrimaryKey", - "description": "ID of Consortium member who operates the ledger (if any). Defined as an optional property in case the ledger is a permissionless and/or public one such as the Bitcoin or Ethereum mainnets." - }, - "CactusNodeId": { - "$ref": "#/components/schemas/PrimaryKey", - "description": "ID of a Cactus node that must uniquely distinguish it from all other Cactus nodes within a Consortium. Note that API server instances do not have their own identity the way a node does." - }, - "ConsortiumId": { - "$ref": "#/components/schemas/PrimaryKey" - }, - "LedgerId": { - "description": "String that uniquely identifies a ledger within a Cactus consortium so that transactions can be routed to the correct ledger.", - "$ref": "#/components/schemas/PrimaryKey" - }, - "PluginInstanceId": { - "description": "String that uniquely identifies a plugin instance within a Cactus consortium so that requests can be addressed/routed directly to individual plugins when necessary.", - "$ref": "#/components/schemas/PrimaryKey" - }, - "Ledger": { - "type": "object", - "required": ["id", "ledgerType"], - "properties": { - "id": { - "$ref": "#/components/schemas/LedgerId" - }, - "ledgerType": { - "$ref": "#/components/schemas/LedgerType", - "nullable": false - }, - "consortiumMemberId": { - "$ref": "#/components/schemas/ConsortiumMemberId" - } - } - }, - "LedgerType": { - "description": "Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation.", - "type": "string", - "enum": [ - "BESU_1X", - "BESU_2X", - "BURROW_0X", - "CORDA_4X", - "FABRIC_2", - "SAWTOOTH_1X" - ] - }, - "CactusNodeMeta": { - "description": "A Cactus node meta information", - "type": "object", - "required": ["nodeApiHost", "publicKeyPem"], - "properties": { - "nodeApiHost": { - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "publicKeyPem": { - "description": "The PEM encoded public key that was used to generate the JWS included in the response (the jws property)", - "type": "string", - "minLength": 1, - "maxLength": 65535, - "nullable": false, - "format": "Must only contain the public key, never include here the PEM that also contains a private key. See PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail" - } - } - }, - "CactusNode": { - "description": "A Cactus node can be a single server, or a set of servers behind a load balancer acting as one.", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/CactusNodeMeta" - }, - { - "type": "object", - "required": [ - "id", - "consortiumId", - "nodeApiHost", - "memberId", - "publicKeyPem", - "pluginInstanceIds", - "ledgerIds" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/CactusNodeId", - "example": "809a76ba-cfb8-4045-a5c6-ed70a7314c25" - }, - "consortiumId": { - "$ref": "#/components/schemas/ConsortiumId", - "description": "ID of the Cactus Consortium this node is in.", - "example": "3e2670d9-2d14-45bd-96f5-33e2c4b4e3fb" - }, - "memberId": { - "$ref": "#/components/schemas/ConsortiumMemberId", - "example": "b3674a28-e442-4feb-b1f3-8cbe46c20e5e" - }, - "ledgerIds": { - "description": "Stores an array of Ledger entity IDs that are reachable (routable) via this Cactus Node. This information is used by the client side SDK API client to figure out at runtime where to send API requests that are specific to a certain ledger such as requests to execute transactions.", - "type": "array", - "nullable": false, - "minItems": 0, - "maxItems": 2048, - "default": [], - "items": { - "$ref": "#/components/schemas/LedgerId" - } - }, - "pluginInstanceIds": { - "type": "array", - "nullable": false, - "minItems": 0, - "maxItems": 2048, - "default": [], - "items": { - "$ref": "#/components/schemas/PluginInstanceId" - } - } - } - } - ] - }, - "PluginInstance": { - "type": "object", - "required": ["id", "packageName"], - "properties": { - "id": { - "$ref": "#/components/schemas/PluginInstanceId" - }, - "packageName": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - } - }, - "BroadcastRequestV1": { - "type": "object", - "required": ["message", "signature"], - "properties": { - "message": { - "type": "object", - "nullable": false, - "required": ["message", "pubKey"], - "properties": { - "message": { - "$ref": "#/components/schemas/NewNodeRequestV1" - }, - "pubKey": { - "type": "string", - "nullable": false - } - } - }, - "signature": { - "type": "string", - "nullable": false - } - } - }, - "BroadcastResponseV1": { - "type": "object", - "nullable": false, - "required": ["result"], - "properties": { - "result": { - "type": "boolean", - "nullable": false - } - } - }, - "GetNodeJwsResponse": { - "type": "object", - "required": ["jws"], - "properties": { - "jws": { - "description": "The JSON Web Signature of the Cactus node.", - "$ref": "#/components/schemas/JWSGeneral", - "nullable": false - } - } - }, - "GetConsortiumJwsResponse": { - "type": "object", - "required": ["jws"], - "properties": { - "jws": { - "description": "The JSON Web Signature of the Cactus consortium.", - "$ref": "#/components/schemas/JWSGeneral", - "nullable": false, - "format": "The general format which is a JSON object, not a string." - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetNodeJwsRequest": { - "type": "object", - "additionalProperties": false, - "properties": {} - }, - "GetConsortiumJwsRequest": { - "type": "object", - "additionalProperties": false, - "properties": {} - }, - "JWSRecipient": { - "description": "A JSON Web Signature. See: https://tools.ietf.org/html/rfc7515 for info about standard.", - "type": "object", - "required": ["signature"], - "properties": { - "signature": { - "type": "string" - }, - "protected": { - "type": "string" - }, - "header": { - "type": "object", - "additionalProperties": true - } - } - }, - "JWSGeneral": { - "type": "object", - "required": ["payload", "signatures"], - "properties": { - "payload": { - "type": "string", - "minLength": 1, - "maxLength": 65535 - }, - "signatures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JWSRecipient" - } - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/consortium/jws": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/consortium/jws" - } - }, - "operationId": "getConsortiumJwsV1", - "summary": "Retrieves a consortium JWS", - "description": "The JWS asserting the consortium metadata (pub keys and hosts of nodes)", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConsortiumJwsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConsortiumJwsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/node/jws": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/node/jws" - } - }, - "operationId": "getNodeJwsV1", - "summary": "Retrieves the JWT of a Cactus Node", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetNodeJwsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetNodeJwsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/add-node": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/add-node" - } - }, - "operationId": "addNodeToConsortiumV1", - "summary": "Adds a node to consortium JWS", - "description": "", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewNodeRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConsortiumJwsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/receive-broadcast": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/receive-broadcast" - } - }, - "operationId": "receiveBroadcastV1", - "summary": "Adds a node to consortium JWS", - "description": "", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BroadcastRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BroadcastResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json b/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json deleted file mode 100644 index 1abbbc9342..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Consortium Web Service", - "description": "Manage a Cactus consortium through the APIs. Needs administrative privileges.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "Identity": { - "type": "object", - "description": "Identity object of a Cacti Node", - "required": ["pubKey", "memberId", "proof"], - "properties": { - "pubKey": { - "description": "Public key of the Node", - "type": "string", - "nullable": false - }, - "memberId": { - "description": "memberId of the organization the node belongs to", - "type": "string", - "nullable": false - }, - "proof": { - "description": "JWT generated by the organization the node belongs to", - "type": "string", - "nullable": false - } - } - }, - "NewNodeRequestV1": { - "type": "object", - "required": [ - "identity", - "treeHash", - "node", - "ledger", - "pluginInstance", - "signature" - ], - "properties": { - "identity": { - "$ref": "#/components/schemas/Identity", - "nullable": false - }, - "treeHash": { - "description": "proof of common configs and policies defined by the consortium", - "type": "string", - "nullable": false - }, - "node": { - "description": "A Cacti Node", - "$ref": "#/components/schemas/CactusNode", - "nullable": false - }, - "ledger": { - "description": "Ledger metadata", - "type": "array", - "items": { - "$ref": "#/components/schemas/Ledger", - "nullable": false - }, - "default": [] - }, - "pluginInstance": { - "description": "Plugin Instance metadata", - "items": { - "$ref": "#/components/schemas/PluginInstance", - "nullable": false - }, - "default": [] - }, - "signature": { - "description": "signature of the message", - "type": "string", - "nullable": false - } - } - }, - "PrimaryKey": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "nullable": false - }, - "ConsortiumMemberId": { - "$ref": "#/components/schemas/PrimaryKey", - "description": "ID of Consortium member who operates the ledger (if any). Defined as an optional property in case the ledger is a permissionless and/or public one such as the Bitcoin or Ethereum mainnets." - }, - "CactusNodeId": { - "$ref": "#/components/schemas/PrimaryKey", - "description": "ID of a Cactus node that must uniquely distinguish it from all other Cactus nodes within a Consortium. Note that API server instances do not have their own identity the way a node does." - }, - "ConsortiumId": { - "$ref": "#/components/schemas/PrimaryKey" - }, - "LedgerId": { - "description": "String that uniquely identifies a ledger within a Cactus consortium so that transactions can be routed to the correct ledger.", - "$ref": "#/components/schemas/PrimaryKey" - }, - "PluginInstanceId": { - "description": "String that uniquely identifies a plugin instance within a Cactus consortium so that requests can be addressed/routed directly to individual plugins when necessary.", - "$ref": "#/components/schemas/PrimaryKey" - }, - "Ledger": { - "type": "object", - "required": ["id", "ledgerType"], - "properties": { - "id": { - "$ref": "#/components/schemas/LedgerId" - }, - "ledgerType": { - "$ref": "#/components/schemas/LedgerType", - "nullable": false - }, - "consortiumMemberId": { - "$ref": "#/components/schemas/ConsortiumMemberId" - } - } - }, - "LedgerType": { - "description": "Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation.", - "type": "string", - "enum": [ - "BESU_1X", - "BESU_2X", - "BURROW_0X", - "CORDA_4X", - "FABRIC_2", - "SAWTOOTH_1X" - ] - }, - "CactusNodeMeta": { - "description": "A Cactus node meta information", - "type": "object", - "required": ["nodeApiHost", "publicKeyPem"], - "properties": { - "nodeApiHost": { - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "publicKeyPem": { - "description": "The PEM encoded public key that was used to generate the JWS included in the response (the jws property)", - "type": "string", - "minLength": 1, - "maxLength": 65535, - "nullable": false, - "format": "Must only contain the public key, never include here the PEM that also contains a private key. See PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail" - } - } - }, - "CactusNode": { - "description": "A Cactus node can be a single server, or a set of servers behind a load balancer acting as one.", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/CactusNodeMeta" - }, - { - "type": "object", - "required": [ - "id", - "consortiumId", - "nodeApiHost", - "memberId", - "publicKeyPem", - "pluginInstanceIds", - "ledgerIds" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/CactusNodeId", - "example": "809a76ba-cfb8-4045-a5c6-ed70a7314c25" - }, - "consortiumId": { - "$ref": "#/components/schemas/ConsortiumId", - "description": "ID of the Cactus Consortium this node is in.", - "example": "3e2670d9-2d14-45bd-96f5-33e2c4b4e3fb" - }, - "memberId": { - "$ref": "#/components/schemas/ConsortiumMemberId", - "example": "b3674a28-e442-4feb-b1f3-8cbe46c20e5e" - }, - "ledgerIds": { - "description": "Stores an array of Ledger entity IDs that are reachable (routable) via this Cactus Node. This information is used by the client side SDK API client to figure out at runtime where to send API requests that are specific to a certain ledger such as requests to execute transactions.", - "type": "array", - "nullable": false, - "minItems": 0, - "maxItems": 2048, - "default": [], - "items": { - "$ref": "#/components/schemas/LedgerId" - } - }, - "pluginInstanceIds": { - "type": "array", - "nullable": false, - "minItems": 0, - "maxItems": 2048, - "default": [], - "items": { - "$ref": "#/components/schemas/PluginInstanceId" - } - } - } - } - ] - }, - "PluginInstance": { - "type": "object", - "required": ["id", "packageName"], - "properties": { - "id": { - "$ref": "#/components/schemas/PluginInstanceId" - }, - "packageName": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - } - }, - "BroadcastRequestV1": { - "type": "object", - "required": ["message", "signature"], - "properties": { - "message": { - "type": "object", - "nullable": false, - "required": ["message", "pubKey"], - "properties": { - "message": { - "$ref": "#/components/schemas/NewNodeRequestV1" - }, - "pubKey": { - "type": "string", - "nullable": false - } - } - }, - "signature": { - "type": "string", - "nullable": false - } - } - }, - "BroadcastResponseV1": { - "type": "object", - "nullable": false, - "required": ["result"], - "properties": { - "result": { - "type": "boolean", - "nullable": false - } - } - }, - "GetNodeJwsResponse": { - "type": "object", - "required": ["jws"], - "properties": { - "jws": { - "description": "The JSON Web Signature of the Cactus node.", - "$ref": "#/components/schemas/JWSGeneral", - "nullable": false - } - } - }, - "GetConsortiumJwsResponse": { - "type": "object", - "required": ["jws"], - "properties": { - "jws": { - "description": "The JSON Web Signature of the Cactus consortium.", - "$ref": "#/components/schemas/JWSGeneral", - "nullable": false, - "format": "The general format which is a JSON object, not a string." - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetNodeJwsRequest": { - "type": "object", - "additionalProperties": false, - "properties": {} - }, - "GetConsortiumJwsRequest": { - "type": "object", - "additionalProperties": false, - "properties": {} - }, - "JWSRecipient": { - "description": "A JSON Web Signature. See: https://tools.ietf.org/html/rfc7515 for info about standard.", - "type": "object", - "required": ["signature"], - "properties": { - "signature": { - "type": "string" - }, - "protected": { - "type": "string" - }, - "header": { - "type": "object", - "additionalProperties": true - } - } - }, - "JWSGeneral": { - "type": "object", - "required": ["payload", "signatures"], - "properties": { - "payload": { - "type": "string", - "minLength": 1, - "maxLength": 65535 - }, - "signatures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JWSRecipient" - } - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/consortium/jws": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/consortium/jws" - } - }, - "operationId": "getConsortiumJwsV1", - "summary": "Retrieves a consortium JWS", - "description": "The JWS asserting the consortium metadata (pub keys and hosts of nodes)", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConsortiumJwsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConsortiumJwsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/node/jws": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/node/jws" - } - }, - "operationId": "getNodeJwsV1", - "summary": "Retrieves the JWT of a Cactus Node", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetNodeJwsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetNodeJwsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/add-node": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/add-node" - } - }, - "operationId": "addNodeToConsortiumV1", - "summary": "Adds a node to consortium JWS", - "description": "", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewNodeRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConsortiumJwsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/receive-broadcast": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/receive-broadcast" - } - }, - "operationId": "receiveBroadcastV1", - "summary": "Adds a node to consortium JWS", - "description": "", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BroadcastRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BroadcastResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index e009b9122d..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,38 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/BroadcastRequestV1.kt -src/main/kotlin/org/openapitools/client/models/BroadcastRequestV1Message.kt -src/main/kotlin/org/openapitools/client/models/BroadcastResponseV1.kt -src/main/kotlin/org/openapitools/client/models/CactusNode.kt -src/main/kotlin/org/openapitools/client/models/CactusNodeAllOf.kt -src/main/kotlin/org/openapitools/client/models/CactusNodeMeta.kt -src/main/kotlin/org/openapitools/client/models/GetConsortiumJwsResponse.kt -src/main/kotlin/org/openapitools/client/models/GetNodeJwsResponse.kt -src/main/kotlin/org/openapitools/client/models/Identity.kt -src/main/kotlin/org/openapitools/client/models/JWSGeneral.kt -src/main/kotlin/org/openapitools/client/models/JWSRecipient.kt -src/main/kotlin/org/openapitools/client/models/Ledger.kt -src/main/kotlin/org/openapitools/client/models/LedgerType.kt -src/main/kotlin/org/openapitools/client/models/NewNodeRequestV1.kt -src/main/kotlin/org/openapitools/client/models/PluginInstance.kt diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 60881d5999..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**addNodeToConsortiumV1**](docs/DefaultApi.md#addnodetoconsortiumv1) | **POST** /api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/add-node | Adds a node to consortium JWS -*DefaultApi* | [**getConsortiumJwsV1**](docs/DefaultApi.md#getconsortiumjwsv1) | **POST** /api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/consortium/jws | Retrieves a consortium JWS -*DefaultApi* | [**getNodeJwsV1**](docs/DefaultApi.md#getnodejwsv1) | **POST** /api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/node/jws | Retrieves the JWT of a Cactus Node -*DefaultApi* | [**getPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **GET** /api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**receiveBroadcastV1**](docs/DefaultApi.md#receivebroadcastv1) | **POST** /api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/receive-broadcast | Adds a node to consortium JWS - - - -## Documentation for Models - - - [org.openapitools.client.models.BroadcastRequestV1](docs/BroadcastRequestV1.md) - - [org.openapitools.client.models.BroadcastRequestV1Message](docs/BroadcastRequestV1Message.md) - - [org.openapitools.client.models.BroadcastResponseV1](docs/BroadcastResponseV1.md) - - [org.openapitools.client.models.CactusNode](docs/CactusNode.md) - - [org.openapitools.client.models.CactusNodeAllOf](docs/CactusNodeAllOf.md) - - [org.openapitools.client.models.CactusNodeMeta](docs/CactusNodeMeta.md) - - [org.openapitools.client.models.GetConsortiumJwsResponse](docs/GetConsortiumJwsResponse.md) - - [org.openapitools.client.models.GetNodeJwsResponse](docs/GetNodeJwsResponse.md) - - [org.openapitools.client.models.Identity](docs/Identity.md) - - [org.openapitools.client.models.JWSGeneral](docs/JWSGeneral.md) - - [org.openapitools.client.models.JWSRecipient](docs/JWSRecipient.md) - - [org.openapitools.client.models.Ledger](docs/Ledger.md) - - [org.openapitools.client.models.LedgerType](docs/LedgerType.md) - - [org.openapitools.client.models.NewNodeRequestV1](docs/NewNodeRequestV1.md) - - [org.openapitools.client.models.PluginInstance](docs/PluginInstance.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index 5117aa6310..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,410 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.BroadcastRequestV1 -import org.openapitools.client.models.BroadcastResponseV1 -import org.openapitools.client.models.GetConsortiumJwsResponse -import org.openapitools.client.models.GetNodeJwsResponse -import org.openapitools.client.models.NewNodeRequestV1 - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Adds a node to consortium JWS - * - * @param newNodeRequestV1 (optional) - * @return GetConsortiumJwsResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun addNodeToConsortiumV1(newNodeRequestV1: NewNodeRequestV1? = null) : GetConsortiumJwsResponse { - val localVarResponse = addNodeToConsortiumV1WithHttpInfo(newNodeRequestV1 = newNodeRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetConsortiumJwsResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Adds a node to consortium JWS - * - * @param newNodeRequestV1 (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun addNodeToConsortiumV1WithHttpInfo(newNodeRequestV1: NewNodeRequestV1?) : ApiResponse { - val localVariableConfig = addNodeToConsortiumV1RequestConfig(newNodeRequestV1 = newNodeRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation addNodeToConsortiumV1 - * - * @param newNodeRequestV1 (optional) - * @return RequestConfig - */ - fun addNodeToConsortiumV1RequestConfig(newNodeRequestV1: NewNodeRequestV1?) : RequestConfig { - val localVariableBody = newNodeRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/add-node", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Retrieves a consortium JWS - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @param body (optional) - * @return GetConsortiumJwsResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getConsortiumJwsV1(body: kotlin.Any? = null) : GetConsortiumJwsResponse { - val localVarResponse = getConsortiumJwsV1WithHttpInfo(body = body) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetConsortiumJwsResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves a consortium JWS - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @param body (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getConsortiumJwsV1WithHttpInfo(body: kotlin.Any?) : ApiResponse { - val localVariableConfig = getConsortiumJwsV1RequestConfig(body = body) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getConsortiumJwsV1 - * - * @param body (optional) - * @return RequestConfig - */ - fun getConsortiumJwsV1RequestConfig(body: kotlin.Any?) : RequestConfig { - val localVariableBody = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/consortium/jws", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Retrieves the JWT of a Cactus Node - * - * @param body (optional) - * @return GetNodeJwsResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getNodeJwsV1(body: kotlin.Any? = null) : GetNodeJwsResponse { - val localVarResponse = getNodeJwsV1WithHttpInfo(body = body) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetNodeJwsResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves the JWT of a Cactus Node - * - * @param body (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getNodeJwsV1WithHttpInfo(body: kotlin.Any?) : ApiResponse { - val localVariableConfig = getNodeJwsV1RequestConfig(body = body) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getNodeJwsV1 - * - * @param body (optional) - * @return RequestConfig - */ - fun getNodeJwsV1RequestConfig(body: kotlin.Any?) : RequestConfig { - val localVariableBody = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/node/jws", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get the Prometheus Metrics - * - * @return kotlin.String - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getPrometheusMetricsV1() : kotlin.String { - val localVarResponse = getPrometheusMetricsV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get the Prometheus Metrics - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getPrometheusMetricsV1WithHttpInfo() : ApiResponse { - val localVariableConfig = getPrometheusMetricsV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getPrometheusMetricsV1 - * - * @return RequestConfig - */ - fun getPrometheusMetricsV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/get-prometheus-exporter-metrics", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Adds a node to consortium JWS - * - * @param broadcastRequestV1 (optional) - * @return BroadcastResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun receiveBroadcastV1(broadcastRequestV1: BroadcastRequestV1? = null) : BroadcastResponseV1 { - val localVarResponse = receiveBroadcastV1WithHttpInfo(broadcastRequestV1 = broadcastRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as BroadcastResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Adds a node to consortium JWS - * - * @param broadcastRequestV1 (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun receiveBroadcastV1WithHttpInfo(broadcastRequestV1: BroadcastRequestV1?) : ApiResponse { - val localVariableConfig = receiveBroadcastV1RequestConfig(broadcastRequestV1 = broadcastRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation receiveBroadcastV1 - * - * @param broadcastRequestV1 (optional) - * @return RequestConfig - */ - fun receiveBroadcastV1RequestConfig(broadcastRequestV1: BroadcastRequestV1?) : RequestConfig { - val localVariableBody = broadcastRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/receive-broadcast", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BroadcastRequestV1.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BroadcastRequestV1.kt deleted file mode 100644 index 255240614d..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BroadcastRequestV1.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.BroadcastRequestV1Message - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param message - * @param signature - */ - - -data class BroadcastRequestV1 ( - - @Json(name = "message") - val message: BroadcastRequestV1Message, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BroadcastRequestV1Message.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BroadcastRequestV1Message.kt deleted file mode 100644 index 2eab7e0e9d..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BroadcastRequestV1Message.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.NewNodeRequestV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param message - * @param pubKey - */ - - -data class BroadcastRequestV1Message ( - - @Json(name = "message") - val message: NewNodeRequestV1, - - @Json(name = "pubKey") - val pubKey: kotlin.String - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BroadcastResponseV1.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BroadcastResponseV1.kt deleted file mode 100644 index 7a32207857..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/BroadcastResponseV1.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param result - */ - - -data class BroadcastResponseV1 ( - - @Json(name = "result") - val result: kotlin.Boolean - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactusNode.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactusNode.kt deleted file mode 100644 index 020128ccb6..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactusNode.kt +++ /dev/null @@ -1,61 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * A Cactus node can be a single server, or a set of servers behind a load balancer acting as one. - * - * @param nodeApiHost - * @param publicKeyPem The PEM encoded public key that was used to generate the JWS included in the response (the jws property) - * @param id - * @param consortiumId - * @param memberId - * @param ledgerIds Stores an array of Ledger entity IDs that are reachable (routable) via this Cactus Node. This information is used by the client side SDK API client to figure out at runtime where to send API requests that are specific to a certain ledger such as requests to execute transactions. - * @param pluginInstanceIds - */ - - -data class CactusNode ( - - @Json(name = "nodeApiHost") - val nodeApiHost: kotlin.String, - - /* The PEM encoded public key that was used to generate the JWS included in the response (the jws property) */ - @Json(name = "publicKeyPem") - val publicKeyPem: kotlin.String, - - @Json(name = "id") - val id: kotlin.String, - - @Json(name = "consortiumId") - val consortiumId: kotlin.String, - - @Json(name = "memberId") - val memberId: kotlin.String, - - /* Stores an array of Ledger entity IDs that are reachable (routable) via this Cactus Node. This information is used by the client side SDK API client to figure out at runtime where to send API requests that are specific to a certain ledger such as requests to execute transactions. */ - @Json(name = "ledgerIds") - val ledgerIds: kotlin.collections.List = arrayListOf(), - - @Json(name = "pluginInstanceIds") - val pluginInstanceIds: kotlin.collections.List = arrayListOf() - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactusNodeAllOf.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactusNodeAllOf.kt deleted file mode 100644 index 895eb1c8a6..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactusNodeAllOf.kt +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id - * @param consortiumId - * @param memberId - * @param ledgerIds Stores an array of Ledger entity IDs that are reachable (routable) via this Cactus Node. This information is used by the client side SDK API client to figure out at runtime where to send API requests that are specific to a certain ledger such as requests to execute transactions. - * @param pluginInstanceIds - */ - - -data class CactusNodeAllOf ( - - @Json(name = "id") - val id: kotlin.String, - - @Json(name = "consortiumId") - val consortiumId: kotlin.String, - - @Json(name = "memberId") - val memberId: kotlin.String, - - /* Stores an array of Ledger entity IDs that are reachable (routable) via this Cactus Node. This information is used by the client side SDK API client to figure out at runtime where to send API requests that are specific to a certain ledger such as requests to execute transactions. */ - @Json(name = "ledgerIds") - val ledgerIds: kotlin.collections.List = arrayListOf(), - - @Json(name = "pluginInstanceIds") - val pluginInstanceIds: kotlin.collections.List = arrayListOf() - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactusNodeMeta.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactusNodeMeta.kt deleted file mode 100644 index ec9d921ad1..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactusNodeMeta.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * A Cactus node meta information - * - * @param nodeApiHost - * @param publicKeyPem The PEM encoded public key that was used to generate the JWS included in the response (the jws property) - */ - - -data class CactusNodeMeta ( - - @Json(name = "nodeApiHost") - val nodeApiHost: kotlin.String, - - /* The PEM encoded public key that was used to generate the JWS included in the response (the jws property) */ - @Json(name = "publicKeyPem") - val publicKeyPem: kotlin.String - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetConsortiumJwsResponse.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetConsortiumJwsResponse.kt deleted file mode 100644 index eb880bcea1..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetConsortiumJwsResponse.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.JWSGeneral - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param jws - */ - - -data class GetConsortiumJwsResponse ( - - @Json(name = "jws") - val jws: JWSGeneral - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetNodeJwsResponse.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetNodeJwsResponse.kt deleted file mode 100644 index c1d327a7d7..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetNodeJwsResponse.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.JWSGeneral - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param jws - */ - - -data class GetNodeJwsResponse ( - - @Json(name = "jws") - val jws: JWSGeneral - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Identity.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Identity.kt deleted file mode 100644 index 561a85c83f..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Identity.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Identity object of a Cacti Node - * - * @param pubKey Public key of the Node - * @param memberId memberId of the organization the node belongs to - * @param proof JWT generated by the organization the node belongs to - */ - - -data class Identity ( - - /* Public key of the Node */ - @Json(name = "pubKey") - val pubKey: kotlin.String, - - /* memberId of the organization the node belongs to */ - @Json(name = "memberId") - val memberId: kotlin.String, - - /* JWT generated by the organization the node belongs to */ - @Json(name = "proof") - val proof: kotlin.String - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSGeneral.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSGeneral.kt deleted file mode 100644 index f32650672e..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSGeneral.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.JWSRecipient - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param payload - * @param signatures - */ - - -data class JWSGeneral ( - - @Json(name = "payload") - val payload: kotlin.String, - - @Json(name = "signatures") - val signatures: kotlin.collections.List - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSRecipient.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSRecipient.kt deleted file mode 100644 index 7bf5dd698e..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSRecipient.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * A JSON Web Signature. See: https://tools.ietf.org/html/rfc7515 for info about standard. - * - * @param signature - * @param `protected` - * @param header - */ - - -data class JWSRecipient ( - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "protected") - val `protected`: kotlin.String? = null, - - @Json(name = "header") - val header: kotlin.collections.Map? = null - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Ledger.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Ledger.kt deleted file mode 100644 index 55c44b1d91..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Ledger.kt +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.LedgerType - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id - * @param ledgerType - * @param consortiumMemberId - */ - - -data class Ledger ( - - @Json(name = "id") - val id: kotlin.String, - - @Json(name = "ledgerType") - val ledgerType: LedgerType, - - @Json(name = "consortiumMemberId") - val consortiumMemberId: kotlin.String? = null - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt deleted file mode 100644 index 60fe48e4ae..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt +++ /dev/null @@ -1,75 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation. - * - * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,fABRIC2,sAWTOOTH1X - */ - -@JsonClass(generateAdapter = false) -enum class LedgerType(val value: kotlin.String) { - - @Json(name = "BESU_1X") - bESU1X("BESU_1X"), - - @Json(name = "BESU_2X") - bESU2X("BESU_2X"), - - @Json(name = "BURROW_0X") - bURROW0X("BURROW_0X"), - - @Json(name = "CORDA_4X") - cORDA4X("CORDA_4X"), - - @Json(name = "FABRIC_2") - fABRIC2("FABRIC_2"), - - @Json(name = "SAWTOOTH_1X") - sAWTOOTH1X("SAWTOOTH_1X"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is LedgerType) "$data" else null - - /** - * Returns a valid [LedgerType] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): LedgerType? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NewNodeRequestV1.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NewNodeRequestV1.kt deleted file mode 100644 index 747458dc89..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NewNodeRequestV1.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CactusNode -import org.openapitools.client.models.Identity -import org.openapitools.client.models.Ledger -import org.openapitools.client.models.PluginInstance - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param identity - * @param treeHash proof of common configs and policies defined by the consortium - * @param node - * @param ledger Ledger metadata - * @param pluginInstance Plugin Instance metadata - * @param signature signature of the message - */ - - -data class NewNodeRequestV1 ( - - @Json(name = "identity") - val identity: Identity, - - /* proof of common configs and policies defined by the consortium */ - @Json(name = "treeHash") - val treeHash: kotlin.String, - - @Json(name = "node") - val node: CactusNode, - - /* Ledger metadata */ - @Json(name = "ledger") - val ledger: kotlin.collections.List = arrayListOf(), - - /* Plugin Instance metadata */ - @Json(name = "pluginInstance") - val pluginInstance: kotlin.collections.List = arrayListOf(), - - /* signature of the message */ - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PluginInstance.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PluginInstance.kt deleted file mode 100644 index 5b40ac29bc..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PluginInstance.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id - * @param packageName - */ - - -data class PluginInstance ( - - @Json(name = "id") - val id: kotlin.String, - - @Json(name = "packageName") - val packageName: kotlin.String - -) - diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/add-new-node-endpoint-v1.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/add-new-node-endpoint-v1.ts deleted file mode 100644 index 1bcbcba600..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/add-new-node-endpoint-v1.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { GetConsortiumJwsResponse } from "../generated/openapi/typescript-axios"; - -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginConsortiumStatic } from "../plugin-consortium-static"; -import { StaticConsortiumRepository } from "../repository/static-consortium-repository"; - -export interface IAddNewNodeEndpointOptions { - plugin: PluginConsortiumStatic; - keyPairPem: string; - consortiumRepo: StaticConsortiumRepository; - logLevel?: LogLevelDesc; -} - -export class AddNewNodeEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "AddNewNodeEndpoint"; - - private readonly log: Logger; - private readonly plugin: PluginConsortiumStatic; - - constructor(public readonly options: IAddNewNodeEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - if (!options) { - throw new Error(`${fnTag} options falsy.`); - } - if (!options.keyPairPem) { - throw new Error(`${fnTag} options.keyPairPem falsy.`); - } - Checks.truthy(options.consortiumRepo, `${fnTag} options.consortiumRepo`); - Checks.truthy(options.plugin, `${fnTag} options.plugin`); - Checks.truthy( - options.plugin instanceof PluginConsortiumStatic, - `${fnTag} options.plugin instanceof PluginConsortiumStatic`, - ); - this.plugin = options.plugin; - - const level = options.logLevel || "INFO"; - const label = "add-node-endpoint-v1"; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return AddNewNodeEndpoint.CLASS_NAME; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/add-node"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/add-node" - ]; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.plugin.processNewNodeRequest(req.body); - this.options.plugin.broadcastJoinRequest(req.body); - const jws = await this.options.plugin.getConsortiumJws(); - const body: GetConsortiumJwsResponse = { jws }; - res.status(200); - res.json(body); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/get-consortium-jws-endpoint-v1.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/get-consortium-jws-endpoint-v1.ts deleted file mode 100644 index 6f1eb04b77..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/get-consortium-jws-endpoint-v1.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { GetConsortiumJwsResponse } from "../generated/openapi/typescript-axios"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - IAsyncProvider, - Checks, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginConsortiumStatic } from "../plugin-consortium-static"; -import { StaticConsortiumRepository } from "../repository/static-consortium-repository"; - -export interface IGetConsortiumJwsEndpointOptions { - plugin: PluginConsortiumStatic; - keyPairPem: string; - consortiumRepo: StaticConsortiumRepository; - logLevel?: LogLevelDesc; -} - -export class GetConsortiumEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetConsortiumEndpointV1"; - - private readonly log: Logger; - private readonly plugin: PluginConsortiumStatic; - - constructor(public readonly options: IGetConsortiumJwsEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - if (!options) { - throw new Error(`${fnTag} options falsy.`); - } - if (!options.keyPairPem) { - throw new Error(`${fnTag} options.keyPairPem falsy.`); - } - if (!options.consortiumRepo) { - throw new Error(`${fnTag} options.consortium falsy.`); - } - Checks.truthy(options.plugin, `${fnTag} options.plugin`); - Checks.truthy( - options.plugin instanceof PluginConsortiumStatic, - `${fnTag} options.plugin instanceof PluginConsortiumStatic`, - ); - this.plugin = options.plugin; - - const label = "get-consortium-jws-endpoint"; - const level = options.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ label, level }); - } - - public get className(): string { - return GetConsortiumEndpointV1.CLASS_NAME; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/consortium/jws"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/consortium/jws" - ]; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const jws = await this.options.plugin.getConsortiumJws(); - - const body: GetConsortiumJwsResponse = { jws }; - res.status(200); - res.json(body); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/get-node-jws-endpoint-v1.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/get-node-jws-endpoint-v1.ts deleted file mode 100644 index f91fe8060f..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/get-node-jws-endpoint-v1.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { GetNodeJwsResponse } from "../generated/openapi/typescript-axios"; - -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginConsortiumStatic } from "../plugin-consortium-static"; -import { StaticConsortiumRepository } from "../repository/static-consortium-repository"; - -export interface IGetNodeJwsEndpointOptions { - plugin: PluginConsortiumStatic; - keyPairPem: string; - consortiumRepo: StaticConsortiumRepository; - logLevel?: LogLevelDesc; -} - -export class GetNodeJwsEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetNodeJwsEndpoint"; - - private readonly log: Logger; - private readonly plugin: PluginConsortiumStatic; - - constructor(public readonly options: IGetNodeJwsEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - if (!options) { - throw new Error(`${fnTag} options falsy.`); - } - if (!options.keyPairPem) { - throw new Error(`${fnTag} options.keyPairPem falsy.`); - } - Checks.truthy(options.consortiumRepo, `${fnTag} options.consortiumRepo`); - Checks.truthy(options.plugin, `${fnTag} options.plugin`); - Checks.truthy( - options.plugin instanceof PluginConsortiumStatic, - `${fnTag} options.plugin instanceof PluginConsortiumStatic`, - ); - this.plugin = options.plugin; - - const level = options.logLevel || "INFO"; - const label = "get-node-jws-endpoint-v1"; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return GetNodeJwsEndpoint.CLASS_NAME; - } - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/node/jws"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/node/jws" - ]; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const jws = await this.options.plugin.getNodeJws(); - const body: GetNodeJwsResponse = { jws }; - res.status(200); - res.json(body); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/get-prometheus-exporter-metrics-endpoint-v1.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/get-prometheus-exporter-metrics-endpoint-v1.ts deleted file mode 100644 index eb64650e63..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/get-prometheus-exporter-metrics-endpoint-v1.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginConsortiumStatic } from "../plugin-consortium-static"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - logLevel?: LogLevelDesc; - plugin: PluginConsortiumStatic; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "GetPrometheusExporterMetricsEndpointV1"; - private readonly log: Logger; - - constructor( - public readonly opts: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.plugin, `${fnTag} options.plugin`); - - this.log = LoggerProvider.getOrCreate({ - label: "get-prometheus-exporter-metrics-v1", - level: opts.logLevel || "INFO", - }); - } - - public get className(): string { - return GetPrometheusExporterMetricsEndpointV1.CLASS_NAME; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - const resBody = await this.opts.plugin.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/process-broadcast-endpoint-v1.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/process-broadcast-endpoint-v1.ts deleted file mode 100644 index f21ccd2a9f..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/consortium/process-broadcast-endpoint-v1.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Express, Request, Response } from "express"; -import { stringify as safeStableStringify } from "safe-stable-stringify"; -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { BroadcastResponseV1 } from "../generated/openapi/typescript-axios"; - -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginConsortiumStatic } from "../plugin-consortium-static"; -import { StaticConsortiumRepository } from "../repository/static-consortium-repository"; -import { InternalServerError } from "http-errors-enhanced-cjs"; - -export interface IProcessBroadcastEndpointOptions { - plugin: PluginConsortiumStatic; - keyPairPem: string; - consortiumRepo: StaticConsortiumRepository; - logLevel?: LogLevelDesc; -} - -export class ProcessBroadcastEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ProcessBroadcastEndpoint"; - - private readonly log: Logger; - private readonly plugin: PluginConsortiumStatic; - - constructor(public readonly options: IProcessBroadcastEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - if (!options) { - throw new Error(`${fnTag} options falsy.`); - } - if (!options.keyPairPem) { - throw new Error(`${fnTag} options.keyPairPem falsy.`); - } - Checks.truthy(options.consortiumRepo, `${fnTag} options.consortiumRepo`); - Checks.truthy(options.plugin, `${fnTag} options.plugin`); - Checks.truthy( - options.plugin instanceof PluginConsortiumStatic, - `${fnTag} options.plugin instanceof PluginConsortiumStatic`, - ); - this.plugin = options.plugin; - - const level = options.logLevel || "INFO"; - const label = "add-node-endpoint-v1"; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return ProcessBroadcastEndpoint.CLASS_NAME; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/receive-broadcast"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/receive-broadcast" - ]; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - - this.log.debug(reqTag); - try { - const msgStringified = safeStableStringify(req.body.message); - if (typeof msgStringified !== "string") { - throw new InternalServerError( - fnTag + "#safeStableStringify() returned with non-string value.", - ); - } - await this.plugin.verifySignature( - req.body.signature, - msgStringified, - req.body.message.pubKey, - ); - await this.options.plugin.processNewNodeRequest(req.body.message.message); - const body: BroadcastResponseV1 = { result: true }; - res.status(200); - res.json(body); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index d420a16e30..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,750 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Consortium Web Service - * Manage a Cactus consortium through the APIs. Needs administrative privileges. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface BroadcastRequestV1 - */ -export interface BroadcastRequestV1 { - /** - * - * @type {BroadcastRequestV1Message} - * @memberof BroadcastRequestV1 - */ - 'message': BroadcastRequestV1Message; - /** - * - * @type {string} - * @memberof BroadcastRequestV1 - */ - 'signature': string; -} -/** - * - * @export - * @interface BroadcastRequestV1Message - */ -export interface BroadcastRequestV1Message { - /** - * - * @type {NewNodeRequestV1} - * @memberof BroadcastRequestV1Message - */ - 'message': NewNodeRequestV1; - /** - * - * @type {string} - * @memberof BroadcastRequestV1Message - */ - 'pubKey': string; -} -/** - * - * @export - * @interface BroadcastResponseV1 - */ -export interface BroadcastResponseV1 { - /** - * - * @type {boolean} - * @memberof BroadcastResponseV1 - */ - 'result': boolean; -} -/** - * A Cactus node can be a single server, or a set of servers behind a load balancer acting as one. - * @export - * @interface CactusNode - */ -export interface CactusNode { - /** - * - * @type {string} - * @memberof CactusNode - */ - 'nodeApiHost': string; - /** - * The PEM encoded public key that was used to generate the JWS included in the response (the jws property) - * @type {string} - * @memberof CactusNode - */ - 'publicKeyPem': string; - /** - * - * @type {string} - * @memberof CactusNode - */ - 'id': string; - /** - * - * @type {string} - * @memberof CactusNode - */ - 'consortiumId': string; - /** - * - * @type {string} - * @memberof CactusNode - */ - 'memberId': string; - /** - * Stores an array of Ledger entity IDs that are reachable (routable) via this Cactus Node. This information is used by the client side SDK API client to figure out at runtime where to send API requests that are specific to a certain ledger such as requests to execute transactions. - * @type {Array} - * @memberof CactusNode - */ - 'ledgerIds': Array; - /** - * - * @type {Array} - * @memberof CactusNode - */ - 'pluginInstanceIds': Array; -} -/** - * - * @export - * @interface CactusNodeAllOf - */ -export interface CactusNodeAllOf { - /** - * - * @type {string} - * @memberof CactusNodeAllOf - */ - 'id': string; - /** - * - * @type {string} - * @memberof CactusNodeAllOf - */ - 'consortiumId': string; - /** - * - * @type {string} - * @memberof CactusNodeAllOf - */ - 'memberId': string; - /** - * Stores an array of Ledger entity IDs that are reachable (routable) via this Cactus Node. This information is used by the client side SDK API client to figure out at runtime where to send API requests that are specific to a certain ledger such as requests to execute transactions. - * @type {Array} - * @memberof CactusNodeAllOf - */ - 'ledgerIds': Array; - /** - * - * @type {Array} - * @memberof CactusNodeAllOf - */ - 'pluginInstanceIds': Array; -} -/** - * A Cactus node meta information - * @export - * @interface CactusNodeMeta - */ -export interface CactusNodeMeta { - /** - * - * @type {string} - * @memberof CactusNodeMeta - */ - 'nodeApiHost': string; - /** - * The PEM encoded public key that was used to generate the JWS included in the response (the jws property) - * @type {string} - * @memberof CactusNodeMeta - */ - 'publicKeyPem': string; -} -/** - * - * @export - * @interface GetConsortiumJwsResponse - */ -export interface GetConsortiumJwsResponse { - /** - * - * @type {JWSGeneral} - * @memberof GetConsortiumJwsResponse - */ - 'jws': JWSGeneral; -} -/** - * - * @export - * @interface GetNodeJwsResponse - */ -export interface GetNodeJwsResponse { - /** - * - * @type {JWSGeneral} - * @memberof GetNodeJwsResponse - */ - 'jws': JWSGeneral; -} -/** - * Identity object of a Cacti Node - * @export - * @interface Identity - */ -export interface Identity { - /** - * Public key of the Node - * @type {string} - * @memberof Identity - */ - 'pubKey': string; - /** - * memberId of the organization the node belongs to - * @type {string} - * @memberof Identity - */ - 'memberId': string; - /** - * JWT generated by the organization the node belongs to - * @type {string} - * @memberof Identity - */ - 'proof': string; -} -/** - * - * @export - * @interface JWSGeneral - */ -export interface JWSGeneral { - /** - * - * @type {string} - * @memberof JWSGeneral - */ - 'payload': string; - /** - * - * @type {Array} - * @memberof JWSGeneral - */ - 'signatures': Array; -} -/** - * A JSON Web Signature. See: https://tools.ietf.org/html/rfc7515 for info about standard. - * @export - * @interface JWSRecipient - */ -export interface JWSRecipient { - /** - * - * @type {string} - * @memberof JWSRecipient - */ - 'signature': string; - /** - * - * @type {string} - * @memberof JWSRecipient - */ - 'protected'?: string; - /** - * - * @type {{ [key: string]: any; }} - * @memberof JWSRecipient - */ - 'header'?: { [key: string]: any; }; -} -/** - * - * @export - * @interface Ledger - */ -export interface Ledger { - /** - * - * @type {string} - * @memberof Ledger - */ - 'id': string; - /** - * - * @type {LedgerType} - * @memberof Ledger - */ - 'ledgerType': LedgerType; - /** - * - * @type {string} - * @memberof Ledger - */ - 'consortiumMemberId'?: string; -} - - -/** - * Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation. - * @export - * @enum {string} - */ - -export const LedgerType = { - Besu1X: 'BESU_1X', - Besu2X: 'BESU_2X', - Burrow0X: 'BURROW_0X', - Corda4X: 'CORDA_4X', - Fabric2: 'FABRIC_2', - Sawtooth1X: 'SAWTOOTH_1X' -} as const; - -export type LedgerType = typeof LedgerType[keyof typeof LedgerType]; - - -/** - * - * @export - * @interface NewNodeRequestV1 - */ -export interface NewNodeRequestV1 { - /** - * - * @type {Identity} - * @memberof NewNodeRequestV1 - */ - 'identity': Identity; - /** - * proof of common configs and policies defined by the consortium - * @type {string} - * @memberof NewNodeRequestV1 - */ - 'treeHash': string; - /** - * - * @type {CactusNode} - * @memberof NewNodeRequestV1 - */ - 'node': CactusNode; - /** - * Ledger metadata - * @type {Array} - * @memberof NewNodeRequestV1 - */ - 'ledger': Array; - /** - * Plugin Instance metadata - * @type {Array} - * @memberof NewNodeRequestV1 - */ - 'pluginInstance': Array; - /** - * signature of the message - * @type {string} - * @memberof NewNodeRequestV1 - */ - 'signature': string; -} -/** - * - * @export - * @interface PluginInstance - */ -export interface PluginInstance { - /** - * - * @type {string} - * @memberof PluginInstance - */ - 'id': string; - /** - * - * @type {string} - * @memberof PluginInstance - */ - 'packageName': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Adds a node to consortium JWS - * @param {NewNodeRequestV1} [newNodeRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addNodeToConsortiumV1: async (newNodeRequestV1?: NewNodeRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/add-node`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(newNodeRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @summary Retrieves a consortium JWS - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConsortiumJwsV1: async (body?: object, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/consortium/jws`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the JWT of a Cactus Node - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getNodeJwsV1: async (body?: object, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/node/jws`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Adds a node to consortium JWS - * @param {BroadcastRequestV1} [broadcastRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - receiveBroadcastV1: async (broadcastRequestV1?: BroadcastRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cacti-plugin-consortium-static/receive-broadcast`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(broadcastRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Adds a node to consortium JWS - * @param {NewNodeRequestV1} [newNodeRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async addNodeToConsortiumV1(newNodeRequestV1?: NewNodeRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addNodeToConsortiumV1(newNodeRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @summary Retrieves a consortium JWS - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConsortiumJwsV1(body?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConsortiumJwsV1(body, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the JWT of a Cactus Node - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getNodeJwsV1(body?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getNodeJwsV1(body, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Adds a node to consortium JWS - * @param {BroadcastRequestV1} [broadcastRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async receiveBroadcastV1(broadcastRequestV1?: BroadcastRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.receiveBroadcastV1(broadcastRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Adds a node to consortium JWS - * @param {NewNodeRequestV1} [newNodeRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addNodeToConsortiumV1(newNodeRequestV1?: NewNodeRequestV1, options?: any): AxiosPromise { - return localVarFp.addNodeToConsortiumV1(newNodeRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @summary Retrieves a consortium JWS - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConsortiumJwsV1(body?: object, options?: any): AxiosPromise { - return localVarFp.getConsortiumJwsV1(body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the JWT of a Cactus Node - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getNodeJwsV1(body?: object, options?: any): AxiosPromise { - return localVarFp.getNodeJwsV1(body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Adds a node to consortium JWS - * @param {BroadcastRequestV1} [broadcastRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - receiveBroadcastV1(broadcastRequestV1?: BroadcastRequestV1, options?: any): AxiosPromise { - return localVarFp.receiveBroadcastV1(broadcastRequestV1, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Adds a node to consortium JWS - * @param {NewNodeRequestV1} [newNodeRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public addNodeToConsortiumV1(newNodeRequestV1?: NewNodeRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).addNodeToConsortiumV1(newNodeRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @summary Retrieves a consortium JWS - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getConsortiumJwsV1(body?: object, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getConsortiumJwsV1(body, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the JWT of a Cactus Node - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getNodeJwsV1(body?: object, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getNodeJwsV1(body, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Adds a node to consortium JWS - * @param {BroadcastRequestV1} [broadcastRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public receiveBroadcastV1(broadcastRequestV1?: BroadcastRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).receiveBroadcastV1(broadcastRequestV1, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 613e857fa8..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Consortium Web Service - * Manage a Cactus consortium through the APIs. Needs administrative privileges. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index bab611ca0b..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Consortium Web Service - * Manage a Cactus consortium through the APIs. Needs administrative privileges. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 01995a47cf..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Consortium Web Service - * Manage a Cactus consortium through the APIs. Needs administrative privileges. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 7e96917e25..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Consortium Web Service - * Manage a Cactus consortium through the APIs. Needs administrative privileges. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/index.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/index.web.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/index.web.ts deleted file mode 100755 index bdf54028d2..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/plugin-consortium-static.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/plugin-consortium-static.ts deleted file mode 100644 index 402d37e601..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/plugin-consortium-static.ts +++ /dev/null @@ -1,515 +0,0 @@ -import { Express } from "express"; -import { - importPKCS8, - GeneralSign, - SignJWT, - compactVerify, - importSPKI, - JWK, -} from "jose"; -import { v4 as uuidv4 } from "uuid"; - -import OAS from "../json/openapi.json"; - -import { - BroadcastRequestV1, - DefaultApi as ConsortiumManagerApi, -} from "./generated/openapi/typescript-axios"; - -import { - ConsortiumDatabase, - IPluginWebService, - IWebServiceEndpoint, - ICactusPlugin, - ICactusPluginOptions, - JWSGeneral, - JWSRecipient, - CactusNode, - Ledger, - PluginInstance, -} from "@hyperledger/cactus-core-api"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { stringify as safeStableStringify } from "safe-stable-stringify"; -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { GetConsortiumEndpointV1 } from "./consortium/get-consortium-jws-endpoint-v1"; -import { GetNodeJwsEndpoint } from "./consortium/get-node-jws-endpoint-v1"; - -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; - -import { - IGetPrometheusExporterMetricsEndpointV1Options, - GetPrometheusExporterMetricsEndpointV1, -} from "./consortium/get-prometheus-exporter-metrics-endpoint-v1"; - -import { - Configuration, - DefaultApi, - NewNodeRequestV1, -} from "./generated/openapi/typescript-axios"; -import { StaticConsortiumRepository } from "./repository/static-consortium-repository"; -import { AddNewNodeEndpoint } from "./consortium/add-new-node-endpoint-v1"; -import { BadRequestError, InternalServerError } from "http-errors-enhanced-cjs"; -import { ProcessBroadcastEndpoint } from "./consortium/process-broadcast-endpoint-v1"; -import { PolicyGroup } from "./policy-model/policy-group"; -export interface IWebAppOptions { - port: number; - hostname: string; -} - -export interface IKeyPair { - publicKey: Uint8Array; - privateKey: Uint8Array; -} - -export interface IPluginConsortiumStaticOptions extends ICactusPluginOptions { - keyPairPem: string; - keyPairPub: string; - consortiumDatabase: ConsortiumDatabase; - node: CactusNode; - ledgers: Ledger[]; - pluginInstances: PluginInstance[]; - memberId: string; - entitiesJWK: { [key: string]: JWK }; - rootPolicyGroup?: PolicyGroup; - packageConfigs?: { [key: string]: unknown }; - prometheusExporter?: PrometheusExporter; - pluginRegistry?: PluginRegistry; - logLevel?: LogLevelDesc; - ctorArgs?: Record; -} - -export class PluginConsortiumStatic - implements ICactusPlugin, IPluginWebService -{ - public static readonly CLASS_NAME = "PluginConsortiumStatic"; - public prometheusExporter: PrometheusExporter; - private readonly log: Logger; - private readonly instanceId: string; - private readonly repo: StaticConsortiumRepository; - private endpoints: IWebServiceEndpoint[] | undefined; - - public get className(): string { - return PluginConsortiumStatic.CLASS_NAME; - } - - constructor(public readonly options: IPluginConsortiumStaticOptions) { - const fnTag = `PluginConsortiumStatic#constructor()`; - if (!options) { - throw new Error(`${fnTag} options falsy.`); - } - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy( - options.consortiumDatabase, - `${fnTag} options.consortiumDatabase`, - ); - - this.log = LoggerProvider.getOrCreate({ - label: "plugin-consortium-static", - level: options.logLevel ? options.logLevel : "INFO", - }); - - this.instanceId = this.options.instanceId; - this.repo = new StaticConsortiumRepository({ - db: options.consortiumDatabase, - node: options.node, - ledgers: options.ledgers, - pluginInstances: options.pluginInstances, - memberId: options.memberId, - rootPolicyGroup: options.rootPolicyGroup, - packageConfigs: options.packageConfigs, - entitiesJWK: options.entitiesJWK, - }); - - this.prometheusExporter = - options.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - this.prometheusExporter.startMetricsCollection(); - this.prometheusExporter.setNodeCount(this.getNodeCount()); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public async onPluginInit(): Promise { - return; - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async shutdown(): Promise { - return; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } - - public getNodeCount(): number { - Checks.truthy(this.repo, `${this.className}.this.repo`); - return this.repo.allNodes.length; - } - /** - * Updates the Node count Prometheus metric of the plugin. - * Note: This does not change the underlying consortium database at all, - * only affects **the metrics**. - */ - public updateMetricNodeCount(): void { - const nodeCount = this.getNodeCount(); - this.prometheusExporter.setNodeCount(nodeCount); - } - - public async registerWebServices( - app: Express, - ): Promise { - const webServices = await this.getOrCreateWebServices(); - webServices.forEach((ws) => ws.registerExpress(app)); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - const { log } = this; - const pkgName = this.getPackageName(); - - if (this.endpoints) { - return this.endpoints; - } - log.info(`Creating web services for plugin ${pkgName}...`); - // presence of webAppOptions implies that caller wants the plugin to configure it's own express instance on a custom - // host/port to listen on - - const { keyPairPem } = this.options; - const consortiumRepo = this.repo; - - const endpoints: IWebServiceEndpoint[] = []; - { - const options = { keyPairPem, consortiumRepo, plugin: this }; - const endpoint = new AddNewNodeEndpoint(options); - endpoints.push(endpoint); - const path = endpoint.getPath(); - this.log.info(`Instantiated AddNodeEndpoint at ${path}`); - } - { - const options = { keyPairPem, consortiumRepo, plugin: this }; - const endpoint = new ProcessBroadcastEndpoint(options); - endpoints.push(endpoint); - const path = endpoint.getPath(); - this.log.info(`Instantiated AddNodeEndpoint at ${path}`); - } - { - const options = { keyPairPem, consortiumRepo, plugin: this }; - const endpoint = new GetConsortiumEndpointV1(options); - endpoints.push(endpoint); - const path = endpoint.getPath(); - this.log.info(`Instantiated GetConsortiumEndpointV1 at ${path}`); - } - { - const options = { keyPairPem, consortiumRepo, plugin: this }; - const endpoint = new GetNodeJwsEndpoint(options); - const path = endpoint.getPath(); - endpoints.push(endpoint); - this.log.info(`Instantiated GetNodeJwsEndpoint at ${path}`); - } - { - const opts: IGetPrometheusExporterMetricsEndpointV1Options = { - plugin: this, - logLevel: this.options.logLevel, - }; - const endpoint = new GetPrometheusExporterMetricsEndpointV1(opts); - const path = endpoint.getPath(); - endpoints.push(endpoint); - this.log.info(`Instantiated GetNodeJwsEndpoint at ${path}`); - } - this.endpoints = endpoints; - - log.info(`Instantiated web svcs for plugin ${pkgName} OK`, { endpoints }); - return endpoints; - } - - public getPackageName(): string { - return `@hyperledger/cacti-plugin-consortium-static`; - } - - public async getNodeJws(): Promise { - Checks.truthy(this.repo, `${this.className}.this.repo`); - const { keyPairPem } = this.options; - - this.updateMetricNodeCount(); - const keyPair = await importPKCS8(keyPairPem, "ES256K"); - const payloadObject = { consortiumDatabase: this.repo.consortiumDatabase }; - const payloadJson = safeStableStringify(payloadObject); - const _protected = { - iat: Date.now(), - jti: uuidv4(), - iss: "Hyperledger Cactus", - }; - // TODO: double check if this casting is safe (it is supposed to be) - const encoder = new TextEncoder(); - const sign = new GeneralSign(encoder.encode(payloadJson)); - sign - .addSignature(keyPair) - .setProtectedHeader({ alg: "ES256K", _protected }); - const jwsGeneral = await sign.sign(); - return jwsGeneral as JWSGeneral; - } - - public broadcastJoinRequest(req: NewNodeRequestV1) { - const nodes = this.repo.allNodes.filter((node) => { - return ( - node.id !== this.repo.getSelfData().node.id && node.id !== req.node.id - ); - }); - this.log.info( - "Will broadcast to nodes: ", - nodes.map((node) => { - return node.id; - }), - ); - nodes.forEach(async (node) => { - const api = new ConsortiumManagerApi( - new Configuration({ basePath: node.nodeApiHost }), - ); - const message = { - message: req, - pubKey: this.options.keyPairPub, - }; - const msgStringified = safeStableStringify(message); - if (typeof msgStringified !== "string") { - throw new InternalServerError( - "getNodeJws#safeStableStringify() returned with non-string value.", - ); - } - const sig = await this.sign(msgStringified); - - const broadcast: BroadcastRequestV1 = { - message, - signature: sig, - }; - api.receiveBroadcastV1(broadcast); - }); - } - - public async getConsortiumJws(): Promise { - const nodes = this.repo.allNodes; - - const ctorArgs = this.options.ctorArgs || {}; - - const requests = nodes - .map((cnm) => cnm.nodeApiHost) - .map(function (host) { - // overwrite basePath with node api host - ctorArgs.basePath = host; - // return the ApiClient configuration object - return new Configuration(ctorArgs); - }) - .map((configuration) => new DefaultApi(configuration)) - .map((apiClient) => apiClient.getNodeJwsV1()); - - const responses = await Promise.all(requests); - - const signatures: JWSRecipient[] = []; - - responses - .map((apiResponse) => apiResponse.data) - .map((getNodeJwsResponse) => getNodeJwsResponse.jws) - .forEach((aJws: JWSGeneral) => - aJws.signatures.forEach((signature) => signatures.push(signature)), - ); - - const [response] = responses; - const jws = response.data.jws; - jws.signatures = signatures; - return jws; - } - - public async processNewNodeRequest(req: NewNodeRequestV1) { - const fn = `${PluginConsortiumStatic.CLASS_NAME}#processNewNodeRequest()`; - const identity = req.identity; - - Checks.nonBlankString(identity.pubKey); - const msg = { - identity, - treeHash: req.treeHash, - node: req.node, - ledger: req.ledger, - pluginInstance: req.pluginInstance, - }; - - const msgStringified = safeStableStringify(msg); - if (typeof msgStringified !== "string") { - throw new InternalServerError( - "processNodeRequest#safeStableStringify() returned with non-string value.", - ); - } - if ( - !(await this.verifySignature( - req.signature, - msgStringified, - identity.pubKey, - )) - ) { - throw new BadRequestError(fn + ": Signature is invalid."); - } - - // TODO: make verification of publicKey process configurable! - // Ideally, we want to allow for entities to customize their identification process - // It would allow for integrations with different methods, serving different requirements - - // What is done is: the request to join consortium includes a JWT token that must be signed by one of the - // organizations that already belongs to the consortium. - // Basically we support adding new nodes, but not new organizations - if (!(await this.repo.verifyJWT(identity.proof, req.node.memberId))) { - throw new BadRequestError( - fn + - ": Your token from organization " + - req.node.memberId + - " is invalid.", - ); - } - - const policyAssertion = req.treeHash; - try { - if (!this.verifySettings(policyAssertion)) { - throw new BadRequestError( - fn + - ": Your policy & configuration settings do not match the ones used in this consortium.", - ); - } - } catch (err) { - throw new BadRequestError(fn + err.message); - } - - this.repo.addNode(req.node, req.pluginInstance, req.ledger); - this.updateMetricNodeCount(); - } - - private verifySettings(assert: string): boolean { - const self = this.repo.getPolicyTreeProof() + this.repo.getConfigsProof(); - this.log.info(self); - this.log.info(assert); - return self === assert; - } - - async sign(msg: string): Promise { - const encoder = new TextEncoder(); - const data = encoder.encode(msg); - const privateKey = await importPKCS8(this.options.keyPairPem, "ES256K"); - const _protected = { - iat: Date.now(), - jti: uuidv4(), - iss: "Hyperledger Cactus", - }; - const signature = await new SignJWT({ data: Array.from(data) }) - .setProtectedHeader({ alg: "ES256K", _protected }) - .sign(privateKey); - return signature; - } - - async verifySignature( - signature: string, - msg: string, - pubKey: string, - ): Promise { - const publicKey = await importSPKI(pubKey, "ES256K"); - const { payload } = await compactVerify(signature, publicKey); - - // Extract the original message - const parsedPayload = JSON.parse(payload.toString()); - const signedData = new Uint8Array(parsedPayload.data); - const decodedMessage = new TextDecoder().decode(signedData); - return decodedMessage === msg; - } - - public async joinConsortium(managerApi: ConsortiumManagerApi, jwt: string) { - const fn = `${PluginConsortiumStatic.CLASS_NAME}#joinConsortium()`; - const nodeInfo = this.repo.getSelfData(); - const treeHash = - this.repo.getPolicyTreeProof() + this.repo.getConfigsProof(); - - this.log.info(treeHash); - const msg = safeStableStringify({ - identity: { - pubKey: this.options.keyPairPub, - memberId: nodeInfo.memberId, - proof: jwt, //token signed by the organization identified by nodeInfo.memberId - }, - treeHash, - node: nodeInfo.node, - ledger: nodeInfo.ledgers, - pluginInstance: nodeInfo.pluginInstances, - }) as string; - - const request: NewNodeRequestV1 = { - identity: { - pubKey: this.options.keyPairPub, - memberId: nodeInfo.memberId, - proof: jwt, - }, - treeHash, - node: nodeInfo.node, - ledger: nodeInfo.ledgers, - pluginInstance: nodeInfo.pluginInstances, - signature: await this.sign(msg), - }; - - const response = await managerApi.addNodeToConsortiumV1(request); - - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - // We log the error here on the debug level so that later on we can inspect the contents - // of it in the logs if we need to. The reason that this is important is because we do not - // want to dump the full response onto our own error response that is going back to the caller - // due to that potentially being a security issue that we are exposing internal data via the - // error responses. - // With that said, we still need to make sure that we can determine the root cause of any - // issues after the fact and therefore we must save the error response details somewhere (the logs) - this.log.debug( - "ConsortiumApi non-2xx HTTP response:", - data, - status, - config, - ); - - // For the caller/client we just send back a generic error admitting that we somehow messed up: - const errorMessage = `${fn} ConsortiumStaticApi error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - Checks.truthy(response.data.jws, `${fn}::response.jws`); - Checks.truthy(response.data.jws.payload, `${fn}::response.jws.payload`); - const json = Buffer.from(response.data.jws.payload, "base64").toString(); - const body = JSON.parse(json); - const { consortiumDatabase }: { consortiumDatabase: ConsortiumDatabase } = - body; - - this.repo.populateDb(consortiumDatabase); - this.updateMetricNodeCount(); - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/plugin-factory-consortium-static.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/plugin-factory-consortium-static.ts deleted file mode 100644 index 1382b31839..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/plugin-factory-consortium-static.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginConsortiumStaticOptions, - PluginConsortiumStatic, -} from "./plugin-consortium-static"; - -export class PluginFactoryWebService extends PluginFactory< - PluginConsortiumStatic, - IPluginConsortiumStaticOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginConsortiumStaticOptions, - ): Promise { - return new PluginConsortiumStatic(pluginOptions); - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/i-policy.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/i-policy.ts deleted file mode 100644 index 2fd8a3f628..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/i-policy.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -This is an interface to represent the base components of a policy -*/ - -export interface IPolicy { - name: string; - caption: string; - description: string; - id: string; -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-action.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-action.ts deleted file mode 100644 index 4e9a83c545..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-action.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { IPolicy } from "./i-policy"; -export interface PolicyAction extends IPolicy { - execute(...args: unknown[]): Promise; -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-condition.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-condition.ts deleted file mode 100644 index 4170c30e03..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-condition.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPolicy } from "./i-policy"; - -export interface PolicyCondition extends IPolicy { - evaluate(...args: unknown[]): Promise; -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-group.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-group.ts deleted file mode 100644 index adff1ad9f8..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-group.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { Checks } from "@hyperledger/cactus-common"; -import { PolicyRule } from "./policy-rule"; -import { IPolicyItemOptions, PolicyItem } from "./polity-item"; -import MerkleTree from "merkletreejs"; -import { stringify as safeStableStringify } from "safe-stable-stringify"; - -export interface IPolicyGroupOptions extends IPolicyItemOptions { - role: string; -} - -export class PolicyGroup extends PolicyItem { - private policyGroups: Map; - private policyRules: Map; - private role: string; - private inheritedRoles: string[]; - - constructor(options: IPolicyGroupOptions) { - Checks.nonBlankString(options.role); - super(options); - this.role = options.role; - this.policyGroups = new Map(); - this.policyRules = new Map(); - this.inheritedRoles = []; - } - - public setInheritedRoles(roles: string[]) { - this.inheritedRoles = roles; - } - public getRoles(): string[] { - return Array.prototype.concat(this.inheritedRoles, [this.role]); - } - - public addGroup(group: PolicyGroup) { - if (group.getId() === this.getId()) { - throw Error( - "Can't add subgroup" + group.getId() + " to group " + this.getId(), - ); - } - if (this.policyGroups.get(group.getId())) { - throw Error( - "Group " + group.getId() + " already exists in " + this.getId(), - ); - } - - //TODO: verify role (must be unique) - - group.setInheritedRoles(this.getRoles()); - this.policyGroups.set(group.getId(), group); - } - - public addRule(rule: PolicyRule) { - if (!rule.getRoles().includes(this.role)) { - throw Error( - "PolicyRule" + - rule.getId() + - " is not targeted to policy group with role " + - this.role, - ); - } - if (this.policyRules.get(rule.getId())) { - throw Error( - "PolicyRule " + - rule.getId() + - " already exists in Group " + - this.getId(), - ); - } - - this.policyRules.set(rule.getId(), rule); - } - - public getPolicySubGroupById(id: string): PolicyGroup | undefined { - if (this.policyGroups.get(id)) { - return this.policyGroups.get(id); - } - - for (const group of this.policyGroups.values()) { - const g = group.getPolicySubGroupById(id); - if (g) { - return g; - } - } - - return undefined; - } - - public getPolicySubGroupByRole(role: string): PolicyGroup | undefined { - for (const group of this.policyGroups.values()) { - if (group.getRoles()[group.getRoles().length - 1] === role) { - return group; - } - } - } - public getPolicySubGroupByRoles(roles: string[]): PolicyGroup | undefined { - if (roles.length < 1) return undefined; - let group = this.getPolicySubGroupByRole(roles[0]); - if (!group) { - return undefined; - } - for (const role of roles) { - group = group?.getPolicySubGroupByRole(role); - if (!group) { - return undefined; - } - } - return group; - } - - public buildTreeProof(tree?: { rules: string[]; groups: string[] }): string { - if (!tree) { - tree = this.buildTree(); - } - return new MerkleTree( - Array.prototype.concat(tree.rules, tree.groups), - undefined, - { - sort: true, - hashLeaves: true, - }, - ) - .getRoot() - .toString("hex"); - } - - public buildTree(): { - rules: string[]; - groups: string[]; - } { - const tree: { - rules: string[]; - groups: string[]; - } = { - rules: [], - groups: [], - }; - for (const group of this.policyGroups.values()) { - const tr = group.buildTree(); - tree.rules = Array.prototype.concat(tree.rules, tr.rules); - tree.groups = Array.prototype.concat(tree.groups, tr.groups); - } - const rules = Array.from(this.policyRules.values()).map((rule) => { - return safeStableStringify(rule.asIPolicy()); - }); - const groups = Array.from(this.policyRules.values()).map((rule) => { - return safeStableStringify(rule.asIPolicy()); - }); - - tree.rules = Array.prototype.concat(tree.rules, rules); - tree.groups = Array.prototype.concat(tree.groups, groups); - - return tree; - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-rule.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-rule.ts deleted file mode 100644 index 114cd08d7c..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/policy-rule.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { PolicyAction } from "./policy-action"; -import { PolicyCondition } from "./policy-condition"; -import { IPolicyItemOptions, PolicyItem } from "./polity-item"; -export interface IPolicyRuleOptions extends IPolicyItemOptions { - policyAction: PolicyAction; - policyCondition: PolicyCondition; - roles: string[]; -} -export class PolicyRule extends PolicyItem { - private policyCondition: PolicyCondition; - private policyAction: PolicyAction; - private roles: string[]; - constructor(options: IPolicyRuleOptions) { - super(options); - this.policyAction = options.policyAction; - this.policyCondition = options.policyCondition; - this.roles = options.roles; - } - - public async evaluateCondition(): Promise { - return this.policyCondition.evaluate(); - } - - public async executePolicyAction(): Promise { - return this.policyAction.execute(); - } - - public getRoles(): string[] { - return this.roles; - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/polity-item.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/polity-item.ts deleted file mode 100644 index 59b97c08c4..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/policy-model/polity-item.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { IPolicy } from "./i-policy"; -import { Checks } from "@hyperledger/cactus-common"; -export interface IPolicyItemOptions { - name: string; - caption: string; - description: string; - id: string; -} -export class PolicyItem implements IPolicy { - name: string; - caption: string; - description: string; - id: string; - - constructor(options: IPolicyItemOptions) { - Checks.nonBlankString(options.name); - Checks.nonBlankString(options.caption); - Checks.nonBlankString(options.description); - Checks.nonBlankString(options.id); - this.name = options.name; - this.caption = options.caption; - this.description = options.description; - this.id = options.id; - } - - public getName(): string { - return this.name; - } - public getCaption(): string { - return this.caption; - } - public getDescription(): string { - return this.description; - } - public getId(): string { - return this.id; - } - - public asIPolicy(): IPolicy { - return { - name: this.getName(), - caption: this.getCaption(), - description: this.getDescription(), - id: this.getId(), - }; - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index 55869bf1cf..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NodeCount } from "./response.type"; - -import { - totalTxCount, - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT, -} from "./metrics"; - -export async function collectMetrics(nodeCount: NodeCount): Promise { - totalTxCount - .labels(K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT) - .set(nodeCount.counter); -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index b965dd39f4..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT = - "cactus_consortium_manual_total_node_count"; - -export const totalTxCount = new Gauge({ - registers: [], - name: K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT, - help: "Total cactus node count", - labelNames: ["type"], -}); diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index 6c07c56008..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,43 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { NodeCount } from "./response.type"; -import { - totalTxCount, - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT, -} from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly nodeCount: NodeCount = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public setNodeCount(nodeCount: number): void { - this.nodeCount.counter = nodeCount; - totalTxCount - .labels(K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT) - .set(this.nodeCount.counter); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalTxCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 4f2cf2ac0c..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type NodeCount = { - counter: number; -}; diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/public-api.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/public-api.ts deleted file mode 100755 index a0c7e6ca2c..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/public-api.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as OpenApiJson from "../json/openapi.json"; -export { OpenApiJson }; - -export { - GetConsortiumEndpointV1, - IGetConsortiumJwsEndpointOptions, -} from "./consortium/get-consortium-jws-endpoint-v1"; - -export { - GetNodeJwsEndpoint, - IGetNodeJwsEndpointOptions, -} from "./consortium/get-node-jws-endpoint-v1"; - -export { - PluginConsortiumStatic, - IPluginConsortiumStaticOptions, - IWebAppOptions, -} from "./plugin-consortium-static"; - -export * from "./generated/openapi/typescript-axios/index"; - -export { PluginFactoryWebService } from "./plugin-factory-consortium-static"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryWebService } from "./plugin-factory-consortium-static"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryWebService(pluginFactoryOptions); -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/repository/static-consortium-provider.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/repository/static-consortium-provider.ts deleted file mode 100644 index 9775ad5c42..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/repository/static-consortium-provider.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { - Logger, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { Checks, IAsyncProvider } from "@hyperledger/cactus-common"; -import { ConsortiumDatabase } from "@hyperledger/cactus-core-api"; - -import { - DefaultApi as ConsortiumStaticApi, - GetConsortiumJwsResponse, -} from "../generated/openapi/typescript-axios/api"; - -export interface IStaticConsortiumProviderOptions { - logLevel?: LogLevelDesc; - apiClient: ConsortiumStaticApi; -} - -export class StaticConsortiumProvider - implements IAsyncProvider -{ - public static readonly CLASS_NAME = "StaticConsortiumProvider"; - - private readonly log: Logger; - - public get className(): string { - return StaticConsortiumProvider.CLASS_NAME; - } - - constructor(public readonly options: IStaticConsortiumProviderOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - parseConsortiumJws(response: GetConsortiumJwsResponse): ConsortiumDatabase { - const fnTag = `StaticConsortiumProvider#parseConsortiumJws()`; - - Checks.truthy(response, `${fnTag}::response`); - Checks.truthy(response.jws, `${fnTag}::response.jws`); - Checks.truthy(response.jws.payload, `${fnTag}::response.jws.payload`); - - const json = Buffer.from(response.jws.payload, "base64").toString(); - const body = JSON.parse(json); - const { consortiumDatabase }: { consortiumDatabase: ConsortiumDatabase } = - body; - - Checks.truthy(consortiumDatabase, `${fnTag}::consortiumDatabase`); - - // FIXME Ideally there would be an option here to validate the JWS based on - // all the signatures and the corresponding public keys (which the caller - // would have to be able to supply). - // We do not yet have this crypto functions available in a cross platform - // manner so it is omitted for now but much needed prior to any GA release. - return consortiumDatabase; - } - - public async get(): Promise { - try { - const res = await this.options.apiClient.getConsortiumJwsV1(); - return this.parseConsortiumJws(res.data); - } catch (ex) { - const innerException = (ex.toJSON && ex.toJSON()) || ex; - this.log.error(`Request for Consortium JWS failed: `, innerException); - throw ex; - } - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/repository/static-consortium-repository.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/repository/static-consortium-repository.ts deleted file mode 100644 index b75925af74..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/repository/static-consortium-repository.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { - CactusNode, - ConsortiumDatabase, - ICactusPluginOptions, - Ledger, - PluginInstance, -} from "@hyperledger/cactus-core-api"; -import { PolicyGroup } from "../policy-model/policy-group"; -import MerkleTree from "merkletreejs"; -import { JWK } from "jose"; -import { verifyOrganization } from "../utils"; - -export interface IStaticConsortiumRepositoryOptions { - logLevel?: LogLevelDesc; - db: ConsortiumDatabase; - entitiesJWK: { [key: string]: JWK }; - rootPolicyGroup?: PolicyGroup; - packageConfigs?: { [key: string]: unknown }; - - //data about self - node: CactusNode; - ledgers: Ledger[]; - pluginInstances: PluginInstance[]; - memberId: string; -} - -/** - * Class responsible for making it convenient for developers to query the - * `ConsortiumDatabase` model type which is a flat data structure storing - * all the different types of entities for Consortium representation such as - * `CactusNode`, `ConsortiumMember`, `Ledger` etc.. - */ -export class StaticConsortiumRepository { - public static readonly CLASS_NAME = "StaticConsortiumRepository"; - - private readonly log: Logger; - private readonly db: ConsortiumDatabase; - - //data about self - private readonly node: CactusNode; - private readonly ledgers: Ledger[]; - private readonly pluginInstances: PluginInstance[]; - private readonly memberId: string; - - private readonly rootPolicyGroup: PolicyGroup | undefined; - - // map of package names to configs - // The idea is that we can assert configurations (security, etc) of some essential packages - // Possibly in the future we may want to share them (?) - private readonly packageConfigs: Map; - - private readonly entitiesJWK: Map; - - public get className(): string { - return StaticConsortiumRepository.CLASS_NAME; - } - - constructor(public readonly options: IStaticConsortiumRepositoryOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.db, `${fnTag} arg options.db`); - Checks.truthy(options.db.cactusNode, `${fnTag} arg options.db.cactusNode`); - this.db = options.db; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.node = options.node; - this.ledgers = options.ledgers; - this.pluginInstances = options.pluginInstances; - this.memberId = options.memberId; - - this.rootPolicyGroup = options.rootPolicyGroup; - - this.packageConfigs = new Map(); - if (options.packageConfigs) { - for (const config in options.packageConfigs) { - if (!this.packageConfigs.get(config)) { - //unique configs for each package name - this.packageConfigs.set(config, options.packageConfigs[config]); - } - } - } - - //this map stores the JWK of each entity that belongs to the consortium - //the map cannot be updated (we do not add organizations) - this.entitiesJWK = new Map(); - for (const entity in options.entitiesJWK) { - if (!this.entitiesJWK.get(entity)) { - //unique jwk for each entity - this.entitiesJWK.set(entity, options.entitiesJWK[entity]); - } - } - } - - public get consortiumDatabase(): ConsortiumDatabase { - return this.options.db; - } - - public get allNodes(): CactusNode[] { - return this.options.db.cactusNode; - } - - public getPolicyTreeProof(): string { - if (!this.rootPolicyGroup) { - return ""; - } - return this.rootPolicyGroup.buildTreeProof(); - } - public getConfigsProof(): string { - if (this.packageConfigs.size === 0) { - return ""; - } - return new MerkleTree( - Array.from(this.packageConfigs.entries()), - undefined, - { - sort: true, - hashLeaves: true, - }, - ) - .getRoot() - .toString("hex"); - } - - /** - * Queries the complete list of nodes within the consortium to obtain a sub- - * set of `CactusNode`s which are connected to a `Ledger` with the given - * `ledgerId`. - * @param ledgerId The ID of the ledger to filter nodes based on. - * @throws {Error} If `ledgerId` is falsy or blank. - */ - public nodesWithLedger(ledgerId: string): CactusNode[] { - const fnTag = `${this.className}#nodesWithLedger()`; - Checks.nonBlankString(ledgerId, `${fnTag}:ledgerId`); - - return this.allNodes.filter((cn) => cn.ledgerIds.includes(ledgerId)); - } - public addNode( - node: CactusNode, - pluginInstance: PluginInstance[], - ledger: Ledger[], - ) { - const member = this.db.consortiumMember.find((m) => m.id === node.memberId); - if (!member) { - throw new Error( - "New node does not belong to an organization of this consortium", - ); - } - this.db.cactusNode.push(node); - this.db.pluginInstance.push(...pluginInstance); - this.db.ledger.push(...ledger); - member.nodeIds.push(node.id); - } - - public populateDb(newDb: ConsortiumDatabase) { - this.db.cactusNode = newDb.cactusNode; - this.db.consortium = newDb.consortium; - this.db.consortiumMember = newDb.consortiumMember; - this.db.ledger = newDb.ledger; - this.db.pluginInstance = newDb.pluginInstance; - } - - public getSelfData() { - return { - node: this.node, - ledgers: this.ledgers, - pluginInstances: this.pluginInstances, - memberId: this.memberId, - }; - } - - public async verifyJWT(jwt: string, memberId: string): Promise { - const fn = this.className + "#verifyJWT"; - const jwk = this.entitiesJWK.get(memberId); - const member = this.db.consortiumMember.find((member) => { - return member.id === memberId; - }); - if (!jwk || !member) { - this.log.debug( - fn + ": memberID:" + memberId + "is not part of this consortium.", - ); - return false; - } - const result = await verifyOrganization(jwt, jwk, member.name); - if (typeof result === "string") { - throw new Error(fn + result); - } - return result; - } -} diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/utils.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/utils.ts deleted file mode 100644 index fae90251b0..0000000000 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/utils.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { - generateKeyPair, - exportJWK, - jwtVerify, - importJWK, - JWK, - SignJWT, - KeyLike, -} from "jose"; -import { stringify as safeStableStringify } from "safe-stable-stringify"; - -import { v4 as uuidv4 } from "uuid"; - -export async function generateES256JWK(): Promise<{ pub: JWK; priv: JWK }> { - // Generate an ES256 (Elliptic Curve using P-256) key pair - const { publicKey, privateKey } = await generateKeyPair("ES256K"); - - // Export the public key as a JWK - const publicJWK: JWK = await exportJWK(publicKey); - - // Export the private key as a JWK - const privateJWK: JWK = await exportJWK(privateKey); - - return { pub: publicJWK, priv: privateJWK }; -} - -export async function verifyOrganization( - token: string, - jwk: JWK, - expectedOrganization: string, -): Promise { - try { - // Import the JWK as a public key - const publicKey: Uint8Array | KeyLike = await importJWK(jwk, "ES256K"); - - // Verify the JWT using the public key - const { payload } = await jwtVerify(token, publicKey); - - // Check if the organization name matches - if (payload.iss !== expectedOrganization) { - return false; - } - - //TODO: verify payload.jti against remote log of the organization. - if (!payload.exp) { - return "Your token does not have an expiration date."; - } - if (payload.exp < Date.now()) { - return "The token has expired"; - } - - return true; - } catch (err) { - console.error(err); - return false; - } -} - -interface TokenPayload { - iss: string; // Issuer (e.g., the issuing authority) - exp: number; // Expiration time (UNIX timestamp) - jti?: string; // id of token -} -export async function issueOrgToken( - jwk: JWK, - parameters: TokenPayload, - memberId: string, - pubKey: string, -): Promise { - // Import the JWK to get the key object - const key = await importJWK(jwk, "ES256K"); - const payloadObject = { pubKey, memberId }; - const payload = safeStableStringify(payloadObject); - const encoder = new TextEncoder(); - const data = encoder.encode(payload); - const _protected = { - iat: Date.now(), - jti: parameters.jti ? parameters.jti : uuidv4(), - iss: parameters.iss, - exp: parameters.exp, - }; - // Create and sign the JWT - const jwt = await new SignJWT({ data: Array.from(data) }) - .setProtectedHeader({ alg: "ES256K", typ: "JWT" }) // Set the algorithm and token type - .setExpirationTime(_protected.exp) - .setIssuer(_protected.iss) - .setJti(_protected.jti) - .setIssuedAt(_protected.iat) - .sign(key); // Sign the JWT with the JWK - return jwt; -} diff --git a/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-routing-node-to-node.test.ts b/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-routing-node-to-node.test.ts deleted file mode 100644 index 909f17ef10..0000000000 --- a/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-routing-node-to-node.test.ts +++ /dev/null @@ -1,396 +0,0 @@ -import { AddressInfo } from "net"; - -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { generateKeyPair, exportSPKI, exportPKCS8 } from "jose"; -import Web3 from "web3"; - -import { ApiClient } from "@hyperledger/cactus-api-client"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - CactusNode, - Configuration, - Consortium, - ConsortiumDatabase, - ConsortiumMember, - Ledger, - LedgerType, -} from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { DefaultApi as ConsortiumStaticApi } from "../../../main/typescript"; -import { - DefaultApi as BesuApi, - PluginLedgerConnectorBesu, - ReceiptType, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - pruneDockerAllIfGithubAction, - BesuTestLedger, -} from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc, Servers } from "@hyperledger/cactus-common"; - -import { Account } from "web3-core"; -import { - IPluginConsortiumStaticOptions, - PluginConsortiumStatic, -} from "../../../main/typescript"; -import { StaticConsortiumProvider } from "../../../main/typescript/repository/static-consortium-provider"; -import { - generateES256JWK, - issueOrgToken, -} from "../../../main/typescript/utils"; - -const logLevel: LogLevelDesc = "TRACE"; -const testCase = "Routes to correct node based on ledger ID"; -const testCase1 = "Set Up Test ledgers, Consortium, Cactus Nodes"; -const testCase2 = "ApiClient #1 Routes based on Ledger ID #1"; -const testCase3 = "ApiClient #1 Routes based on Ledger ID #2"; - -describe(testCase, () => { - const besuTestLedger1 = new BesuTestLedger(); - const besuTestLedger2 = new BesuTestLedger(); - let consortiumDatabase: ConsortiumDatabase; - let mainApiClient: ApiClient; - - let initialFundsAccount1: string; - let initialFundsAccount2: string; - let keyPair1: any; - let keyPair2: any; - let addressInfo1: AddressInfo; - let addressInfo2: AddressInfo; - let httpServer1: any; - let httpServer2: any; - - let node1: CactusNode; - let node2: CactusNode; - let consortium: Consortium; - let member1: ConsortiumMember; - let member2: ConsortiumMember; - - let apiServer1: ApiServer; - let apiServer2: ApiServer; - let testEthAccount1: Account; - - let entitiesJWK: any; - let entity1JWK: any; - let entity2JWK: any; - - const ledger1: Ledger = { - id: "my_cool_ledger_that_i_want_to_transact_on", - ledgerType: LedgerType.Besu2X, - }; - const ledger2: Ledger = { - id: "other_ledger_that_is_just_taking_up_space", - ledgerType: LedgerType.Besu2X, - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy; - }); - - beforeAll(async () => { - await besuTestLedger1.start(); - await besuTestLedger2.start(); - - testEthAccount1 = await besuTestLedger1.createEthTestAccount(); - - httpServer1 = await Servers.startOnPreferredPort(4050); - addressInfo1 = httpServer1.address() as AddressInfo; - const node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - - httpServer2 = await Servers.startOnPreferredPort(4100); - addressInfo2 = httpServer2.address() as AddressInfo; - const node2Host = `http://${addressInfo2.address}:${addressInfo2.port}`; - - keyPair1 = await generateKeyPair("ES256K"); - const pubKeyPem1 = await exportSPKI(keyPair1.publicKey); - - keyPair2 = await generateKeyPair("ES256K"); - const pubKeyPem2 = await exportSPKI(keyPair2.publicKey); - - const consortiumId = uuidV4(); - const consortiumName = "Example Corp. & Friends Crypto Consortium"; - const memberId1 = uuidV4(); - const memberId2 = uuidV4(); - - node1 = { - nodeApiHost: node1Host, - publicKeyPem: pubKeyPem1, - consortiumId, - id: uuidV4(), - ledgerIds: [ledger1.id], - memberId: memberId1, - pluginInstanceIds: [], - }; - - member1 = { - id: memberId1, - name: "Example Corp 1", - nodeIds: [node1.id], - }; - entity1JWK = await generateES256JWK(); - - node2 = { - nodeApiHost: node2Host, - publicKeyPem: pubKeyPem2, - consortiumId, - id: uuidV4(), - ledgerIds: [ledger2.id], - memberId: memberId2, - pluginInstanceIds: [], - }; - - member2 = { - id: memberId2, - name: "Example Corp 2", - nodeIds: [], - }; - - entity2JWK = await generateES256JWK(); - entitiesJWK = { [memberId1]: entity1JWK.pub, [memberId2]: entity2JWK.pub }; - consortium = { - id: consortiumId, - mainApiHost: node1Host, - name: consortiumName, - memberIds: [member1.id, member2.id], - }; - - consortiumDatabase = { - cactusNode: [node1], - consortium: [consortium], - consortiumMember: [member1, member2], - ledger: [ledger1], - pluginInstance: [], - }; - - const config = new Configuration({ basePath: consortium.mainApiHost }); - mainApiClient = new ApiClient(config); - }); - - afterAll(async () => { - await besuTestLedger1.stop(); - await besuTestLedger1.destroy(); - await besuTestLedger2.stop(); - await besuTestLedger2.destroy(); - await apiServer1.shutdown(); - await apiServer2.shutdown(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - test(testCase1, async () => { - const rpcApiHttpHost1 = await besuTestLedger1.getRpcApiHttpHost(); - const rpcApiWsHost1 = await besuTestLedger1.getRpcApiWsHost(); - - initialFundsAccount1 = besuTestLedger1.getGenesisAccountPubKey(); - - const rpcApiHttpHost2 = await besuTestLedger2.getRpcApiHttpHost(); - const rpcApiWsHost2 = await besuTestLedger2.getRpcApiWsHost(); - - initialFundsAccount2 = besuTestLedger2.getGenesisAccountPubKey(); - - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const pluginBesuConnector = new PluginLedgerConnectorBesu({ - instanceId: uuidV4(), - rpcApiHttpHost: rpcApiHttpHost1, - rpcApiWsHost: rpcApiWsHost1, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const keyPairPem = await exportPKCS8(keyPair1.privateKey); - const pub = await exportSPKI(keyPair2.publicKey); - console.log(pub); - - const options: IPluginConsortiumStaticOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - keyPairPub: pub, - consortiumDatabase: consortiumDatabase, - node: node1, - ledgers: [ledger1], - pluginInstances: [], - memberId: member1.id, - logLevel, - entitiesJWK, - }; - const pluginConsortiumStatic = new PluginConsortiumStatic(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumStatic); - pluginRegistry.add(pluginBesuConnector); - - apiServer1 = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer1.start(); - } - - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const pluginBesuConnector = new PluginLedgerConnectorBesu({ - instanceId: uuidV4(), - rpcApiHttpHost: rpcApiHttpHost2, - rpcApiWsHost: rpcApiWsHost2, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const consortiumDatabase1 = { - cactusNode: [], - consortium: [], - consortiumMember: [], - ledger: [], - pluginInstance: [], - }; - - const keyPairPem = await exportPKCS8(keyPair2.privateKey); - const pub = await exportSPKI(keyPair2.publicKey); - console.log(pub); - const options: IPluginConsortiumStaticOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - keyPairPub: pub, - consortiumDatabase: consortiumDatabase1, - node: node2, - ledgers: [ledger2], - pluginInstances: [], - memberId: member2.id, - logLevel, - entitiesJWK, - }; - const pluginConsortiumStatic = new PluginConsortiumStatic(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo2.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = []; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumStatic); - pluginRegistry.add(pluginBesuConnector); - - apiServer2 = new ApiServer({ - httpServerApi: httpServer2, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer2.start(); - - const consortApi = mainApiClient.extendWith(ConsortiumStaticApi); - //node asks to join consortium, not manual anymore - const jwt = await issueOrgToken( - entity2JWK.priv, - { - iss: member2.name, - exp: Date.now() + 5 * 60 * 1000, //expires in 5min - }, - member2.id, - pub, - ); - await pluginConsortiumStatic.joinConsortium(consortApi, jwt); - // test.onFinish(() => apiServer.shutdown()); - // afterAll(async () => await apiServer.shutdown()); - } - }); - test(testCase2, async () => { - const apiClient1 = await mainApiClient.ofLedger( - ledger1.id, - BesuApi, - {}, - new StaticConsortiumProvider({ - apiClient: mainApiClient.extendWith(ConsortiumStaticApi), - }), - ); - const testAccount1 = new Web3().eth.accounts.create(uuidV4()); - const res = await apiClient1.runTransactionV1({ - transactionConfig: { - from: initialFundsAccount1, - to: testAccount1.address, - value: 10e6, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(res).toBeTruthy(); - expect(res.status).toBeGreaterThan(199); - expect(res.status).toBeLessThan(300); - }); - - test(testCase3, async () => { - const apiClient2 = await mainApiClient.ofLedger( - ledger2.id, - BesuApi, - {}, - new StaticConsortiumProvider({ - apiClient: mainApiClient.extendWith(ConsortiumStaticApi), - }), - ); - const testAccount2 = new Web3().eth.accounts.create(uuidV4()); - const res = await apiClient2.runTransactionV1({ - transactionConfig: { - from: initialFundsAccount2, - to: testAccount2.address, - value: 10e6, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - web3SigningCredential: { - ethAccount: initialFundsAccount2, - secret: besuTestLedger2.getGenesisAccountPrivKey(), - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(res).toBeTruthy(); - expect(res.status).toBeGreaterThan(199); - expect(res.status).toBeLessThan(300); - }); -}); diff --git a/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-surface.test.ts b/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-test-new-node-broadcast-with-proofs.test.ts b/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-test-new-node-broadcast-with-proofs.test.ts deleted file mode 100644 index 545e68aebe..0000000000 --- a/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-test-new-node-broadcast-with-proofs.test.ts +++ /dev/null @@ -1,510 +0,0 @@ -import { AddressInfo } from "net"; - -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { generateKeyPair, exportSPKI, exportPKCS8 } from "jose"; - -import { ApiClient } from "@hyperledger/cactus-api-client"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - CactusNode, - Configuration, - Consortium, - ConsortiumDatabase, - ConsortiumMember, - Ledger, - LedgerType, -} from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { DefaultApi as ConsortiumStaticApi } from "../../../main/typescript"; -import { PluginLedgerConnectorBesu } from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - pruneDockerAllIfGithubAction, - BesuTestLedger, -} from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc, Servers } from "@hyperledger/cactus-common"; - -import { - IPluginConsortiumStaticOptions, - PluginConsortiumStatic, -} from "../../../main/typescript"; -import { K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT } from "../../../main/typescript/prometheus-exporter/metrics"; -import { - IPolicyGroupOptions, - PolicyGroup, -} from "../../../main/typescript/policy-model/policy-group"; -import { - generateES256JWK, - issueOrgToken, -} from "../../../main/typescript/utils"; - -const logLevel: LogLevelDesc = "TRACE"; -const testCase = "Broadcasts new node request to all consortium"; -const testCase1 = "Set Up Test ledgers, Consortium, Cactus Nodes"; - -describe(testCase, () => { - const besuTestLedger1 = new BesuTestLedger(); - const besuTestLedger2 = new BesuTestLedger(); - let consortiumDatabase: ConsortiumDatabase; - let mainApiClient: ApiClient; - - let keyPair1: any; - let keyPair2: any; - let keyPair3: any; - let addressInfo1: AddressInfo; - let addressInfo2: AddressInfo; - let addressInfo3: AddressInfo; - let httpServer1: any; - let httpServer2: any; - let httpServer3: any; - - let node1: CactusNode; - let node2: CactusNode; - let node3: CactusNode; - let consortium: Consortium; - let member1: ConsortiumMember; - let member2: ConsortiumMember; - - let apiServer1: ApiServer; - let apiServer2: ApiServer; - let apiServer3: ApiServer; - - let pluginConsortiumStatic1: PluginConsortiumStatic; - let pluginConsortiumStatic2: PluginConsortiumStatic; - let pluginConsortiumStatic3: PluginConsortiumStatic; - - let entitiesJWK: any; - let entity1JWK: any; - let entity2JWK: any; - - const sourcePolicyOptions: IPolicyGroupOptions = { - role: "Base", - name: "Root Policy group", - caption: "P Root", - description: "This is a mock policy group with no use", - id: "someId", - }; - const secondPolicyOptions: IPolicyGroupOptions = { - role: "second", - name: "second Policy group", - caption: "lvl 2", - description: "This is a mock policy group with no use", - id: "someId2", - }; - const thirdPolicyOptions: IPolicyGroupOptions = { - role: "third", - name: "third Policy group", - caption: "lvl 3", - description: "This is a mock policy group with no use", - id: "someId3", - }; - const sourcePolicy1: PolicyGroup = new PolicyGroup(sourcePolicyOptions); - const sourcePolicy2: PolicyGroup = new PolicyGroup(sourcePolicyOptions); - const sourcePolicy3: PolicyGroup = new PolicyGroup(sourcePolicyOptions); - const secondPolicy1: PolicyGroup = new PolicyGroup(secondPolicyOptions); - const secondPolicy2: PolicyGroup = new PolicyGroup(secondPolicyOptions); - const secondPolicy3: PolicyGroup = new PolicyGroup(secondPolicyOptions); - const thirdPolicy1: PolicyGroup = new PolicyGroup(thirdPolicyOptions); - const thirdPolicy2: PolicyGroup = new PolicyGroup(thirdPolicyOptions); - const thirdPolicy3: PolicyGroup = new PolicyGroup(thirdPolicyOptions); - - secondPolicy1.addGroup(thirdPolicy1); - sourcePolicy1.addGroup(secondPolicy1); - - secondPolicy2.addGroup(thirdPolicy2); - sourcePolicy2.addGroup(secondPolicy2); - - secondPolicy3.addGroup(thirdPolicy3); - sourcePolicy3.addGroup(secondPolicy3); - - const packageConfigs = { - "@hyperledger/cactus-api-server": { - apiTlsEnabled: false, - }, - }; - - const ledger1: Ledger = { - id: "my_cool_ledger_that_i_want_to_transact_on", - ledgerType: LedgerType.Besu2X, - }; - const ledger2: Ledger = { - id: "other_ledger_that_is_just_taking_up_space", - ledgerType: LedgerType.Besu2X, - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy; - }); - - beforeAll(async () => { - await besuTestLedger1.start(); - await besuTestLedger2.start(); - - httpServer1 = await Servers.startOnPreferredPort(4050); - addressInfo1 = httpServer1.address() as AddressInfo; - const node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - - httpServer2 = await Servers.startOnPreferredPort(4100); - addressInfo2 = httpServer2.address() as AddressInfo; - const node2Host = `http://${addressInfo2.address}:${addressInfo2.port}`; - - httpServer3 = await Servers.startOnPreferredPort(4150); - addressInfo3 = httpServer2.address() as AddressInfo; - const node3Host = `http://${addressInfo2.address}:${addressInfo2.port}`; - - keyPair1 = await generateKeyPair("ES256K"); - const pubKeyPem1 = await exportSPKI(keyPair1.publicKey); - - keyPair2 = await generateKeyPair("ES256K"); - const pubKeyPem2 = await exportSPKI(keyPair2.publicKey); - - keyPair3 = await generateKeyPair("ES256K"); - const pubKeyPem3 = await exportSPKI(keyPair3.publicKey); - - const consortiumId = uuidV4(); - const consortiumName = "Example Corp. & Friends Crypto Consortium"; - const memberId1 = uuidV4(); - const memberId2 = uuidV4(); - - node1 = { - nodeApiHost: node1Host, - publicKeyPem: pubKeyPem1, - consortiumId, - id: uuidV4(), - ledgerIds: [ledger1.id], - memberId: memberId1, - pluginInstanceIds: [], - }; - - member1 = { - id: memberId1, - name: "Example Corp 1", - nodeIds: [node1.id], - }; - - entity1JWK = await generateES256JWK(); - - node2 = { - nodeApiHost: node2Host, - publicKeyPem: pubKeyPem2, - consortiumId, - id: uuidV4(), - ledgerIds: [ledger2.id], - memberId: memberId2, - pluginInstanceIds: [], - }; - - member2 = { - id: memberId2, - name: "Example Corp 2", - nodeIds: [], - }; - - entity2JWK = await generateES256JWK(); - entitiesJWK = { [memberId1]: entity1JWK.pub, [memberId2]: entity2JWK.pub }; - - node3 = { - nodeApiHost: node3Host, - publicKeyPem: pubKeyPem3, - consortiumId, - id: uuidV4(), - ledgerIds: [ledger2.id], - memberId: memberId2, - pluginInstanceIds: [], - }; - - consortium = { - id: consortiumId, - mainApiHost: node1Host, - name: consortiumName, - memberIds: [member1.id, member2.id], - }; - - consortiumDatabase = { - cactusNode: [node1], - consortium: [consortium], - consortiumMember: [member1, member2], - ledger: [ledger1], - pluginInstance: [], - }; - - const config = new Configuration({ basePath: consortium.mainApiHost }); - mainApiClient = new ApiClient(config); - }); - - afterAll(async () => { - await besuTestLedger1.stop(); - await besuTestLedger1.destroy(); - await besuTestLedger2.stop(); - await besuTestLedger2.destroy(); - await apiServer1.shutdown(); - await apiServer2.shutdown(); - await apiServer3.shutdown(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - test(testCase1, async () => { - const rpcApiHttpHost1 = await besuTestLedger1.getRpcApiHttpHost(); - const rpcApiWsHost1 = await besuTestLedger1.getRpcApiWsHost(); - - const rpcApiHttpHost2 = await besuTestLedger2.getRpcApiHttpHost(); - const rpcApiWsHost2 = await besuTestLedger2.getRpcApiWsHost(); - - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const pluginBesuConnector = new PluginLedgerConnectorBesu({ - instanceId: uuidV4(), - rpcApiHttpHost: rpcApiHttpHost1, - rpcApiWsHost: rpcApiWsHost1, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const keyPairPem = await exportPKCS8(keyPair1.privateKey); - const pub = await exportSPKI(keyPair1.publicKey); - - const options: IPluginConsortiumStaticOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - keyPairPub: pub, - consortiumDatabase: consortiumDatabase, - node: node1, - ledgers: [ledger1], - pluginInstances: [], - rootPolicyGroup: sourcePolicy1, - packageConfigs, - memberId: member1.id, - logLevel, - entitiesJWK, - }; - pluginConsortiumStatic1 = new PluginConsortiumStatic(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumStatic1); - pluginRegistry.add(pluginBesuConnector); - - apiServer1 = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer1.start(); - } - - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const pluginBesuConnector = new PluginLedgerConnectorBesu({ - instanceId: uuidV4(), - rpcApiHttpHost: rpcApiHttpHost2, - rpcApiWsHost: rpcApiWsHost2, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const consortiumDatabase1 = { - cactusNode: [], - consortium: [], - consortiumMember: [], - ledger: [], - pluginInstance: [], - }; - - const keyPairPem = await exportPKCS8(keyPair2.privateKey); - const pub = await exportSPKI(keyPair2.publicKey); - - const options: IPluginConsortiumStaticOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - keyPairPub: pub, - consortiumDatabase: consortiumDatabase1, - node: node2, - ledgers: [ledger2], - rootPolicyGroup: sourcePolicy2, - packageConfigs, - pluginInstances: [], - memberId: member2.id, - logLevel, - entitiesJWK, - }; - pluginConsortiumStatic2 = new PluginConsortiumStatic(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo2.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = []; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumStatic2); - pluginRegistry.add(pluginBesuConnector); - - apiServer2 = new ApiServer({ - httpServerApi: httpServer2, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer2.start(); - - const consortApi = mainApiClient.extendWith(ConsortiumStaticApi); - - const jwt = await issueOrgToken( - entity2JWK.priv, - { - iss: member2.name, - exp: Date.now() + 5 * 60 * 1000, //expires in 5min - }, - member2.id, - pub, - ); - await pluginConsortiumStatic2.joinConsortium(consortApi, jwt); - - const promMetricsOutput = - "# HELP " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " Total cactus node count\n" + - "# TYPE " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " gauge\n" + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '{type="' + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '"} 2'; - const res1 = await pluginConsortiumStatic1.getPrometheusExporterMetrics(); - const res2 = await pluginConsortiumStatic2.getPrometheusExporterMetrics(); - expect(res1).toEqual(promMetricsOutput); - expect(res2).toEqual(promMetricsOutput); - } - - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const pluginBesuConnector = new PluginLedgerConnectorBesu({ - instanceId: uuidV4(), - rpcApiHttpHost: rpcApiHttpHost2, - rpcApiWsHost: rpcApiWsHost2, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const consortiumDatabase1 = { - cactusNode: [], - consortium: [], - consortiumMember: [], - ledger: [], - pluginInstance: [], - }; - - const keyPairPem = await exportPKCS8(keyPair3.privateKey); - const pub = await exportSPKI(keyPair3.publicKey); - - const options: IPluginConsortiumStaticOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - keyPairPub: pub, - consortiumDatabase: consortiumDatabase1, - node: node3, - rootPolicyGroup: sourcePolicy3, - packageConfigs, - ledgers: [ledger2], - pluginInstances: [], - memberId: member2.id, - logLevel, - entitiesJWK, - }; - pluginConsortiumStatic3 = new PluginConsortiumStatic(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo3.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = []; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumStatic3); - pluginRegistry.add(pluginBesuConnector); - - apiServer3 = new ApiServer({ - httpServerApi: httpServer3, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer3.start(); - - const consortApi = mainApiClient.extendWith(ConsortiumStaticApi); - const jwt = await issueOrgToken( - entity2JWK.priv, - { - iss: member2.name, - exp: Date.now() + 5 * 60 * 1000, //expires in 5min - }, - member2.id, - pub, - ); - await pluginConsortiumStatic3.joinConsortium(consortApi, jwt); - } - { - //final test - const res1 = await pluginConsortiumStatic1.getPrometheusExporterMetrics(); - const res2 = await pluginConsortiumStatic2.getPrometheusExporterMetrics(); - const res3 = await pluginConsortiumStatic3.getPrometheusExporterMetrics(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " Total cactus node count\n" + - "# TYPE " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " gauge\n" + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '{type="' + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '"} 3'; - - //all plugins have consortium updated - expect(res1.includes(promMetricsOutput)).toBeTruthy(); - expect(res2.includes(promMetricsOutput)).toBeTruthy(); - expect(res3.includes(promMetricsOutput)).toBeTruthy(); - } - }); -}); diff --git a/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-test-new-node-broadcast.test.ts b/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-test-new-node-broadcast.test.ts deleted file mode 100644 index d440707734..0000000000 --- a/packages/cacti-plugin-consortium-static/src/test/typescript/integration/api-test-new-node-broadcast.test.ts +++ /dev/null @@ -1,452 +0,0 @@ -import { AddressInfo } from "net"; - -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { generateKeyPair, exportSPKI, exportPKCS8 } from "jose"; - -import { ApiClient } from "@hyperledger/cactus-api-client"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - CactusNode, - Configuration, - Consortium, - ConsortiumDatabase, - ConsortiumMember, - Ledger, - LedgerType, -} from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { DefaultApi as ConsortiumStaticApi } from "../../../main/typescript"; -import { PluginLedgerConnectorBesu } from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - pruneDockerAllIfGithubAction, - BesuTestLedger, -} from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc, Servers } from "@hyperledger/cactus-common"; - -import { - IPluginConsortiumStaticOptions, - PluginConsortiumStatic, -} from "../../../main/typescript"; -import { K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT } from "../../../main/typescript/prometheus-exporter/metrics"; -import { - generateES256JWK, - issueOrgToken, -} from "../../../main/typescript/utils"; - -const logLevel: LogLevelDesc = "TRACE"; -const testCase = "Broadcasts new node request to all consortium"; -const testCase1 = "Set Up Test ledgers, Consortium, Cactus Nodes"; - -describe(testCase, () => { - const besuTestLedger1 = new BesuTestLedger(); - const besuTestLedger2 = new BesuTestLedger(); - let consortiumDatabase: ConsortiumDatabase; - let mainApiClient: ApiClient; - - let keyPair1: any; - let keyPair2: any; - let keyPair3: any; - let addressInfo1: AddressInfo; - let addressInfo2: AddressInfo; - let addressInfo3: AddressInfo; - let httpServer1: any; - let httpServer2: any; - let httpServer3: any; - - let node1: CactusNode; - let node2: CactusNode; - let node3: CactusNode; - let consortium: Consortium; - let member1: ConsortiumMember; - let member2: ConsortiumMember; - - let apiServer1: ApiServer; - let apiServer2: ApiServer; - let apiServer3: ApiServer; - - let pluginConsortiumStatic1: PluginConsortiumStatic; - let pluginConsortiumStatic2: PluginConsortiumStatic; - let pluginConsortiumStatic3: PluginConsortiumStatic; - - let entitiesJWK: any; - let entity1JWK: any; - let entity2JWK: any; - - const ledger1: Ledger = { - id: "my_cool_ledger_that_i_want_to_transact_on", - ledgerType: LedgerType.Besu2X, - }; - const ledger2: Ledger = { - id: "other_ledger_that_is_just_taking_up_space", - ledgerType: LedgerType.Besu2X, - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy; - }); - - beforeAll(async () => { - await besuTestLedger1.start(); - await besuTestLedger2.start(); - - httpServer1 = await Servers.startOnPreferredPort(4050); - addressInfo1 = httpServer1.address() as AddressInfo; - const node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - - httpServer2 = await Servers.startOnPreferredPort(4100); - addressInfo2 = httpServer2.address() as AddressInfo; - const node2Host = `http://${addressInfo2.address}:${addressInfo2.port}`; - - httpServer3 = await Servers.startOnPreferredPort(4150); - addressInfo3 = httpServer2.address() as AddressInfo; - const node3Host = `http://${addressInfo2.address}:${addressInfo2.port}`; - - keyPair1 = await generateKeyPair("ES256K"); - const pubKeyPem1 = await exportSPKI(keyPair1.publicKey); - - keyPair2 = await generateKeyPair("ES256K"); - const pubKeyPem2 = await exportSPKI(keyPair2.publicKey); - - keyPair3 = await generateKeyPair("ES256K"); - const pubKeyPem3 = await exportSPKI(keyPair3.publicKey); - - const consortiumId = uuidV4(); - const consortiumName = "Example Corp. & Friends Crypto Consortium"; - const memberId1 = uuidV4(); - const memberId2 = uuidV4(); - - node1 = { - nodeApiHost: node1Host, - publicKeyPem: pubKeyPem1, - consortiumId, - id: uuidV4(), - ledgerIds: [ledger1.id], - memberId: memberId1, - pluginInstanceIds: [], - }; - - member1 = { - id: memberId1, - name: "Example Corp 1", - nodeIds: [node1.id], - }; - entity1JWK = await generateES256JWK(); - - node2 = { - nodeApiHost: node2Host, - publicKeyPem: pubKeyPem2, - consortiumId, - id: uuidV4(), - ledgerIds: [ledger2.id], - memberId: memberId2, - pluginInstanceIds: [], - }; - - member2 = { - id: memberId2, - name: "Example Corp 2", - nodeIds: [], - }; - entity2JWK = await generateES256JWK(); - entitiesJWK = { [memberId1]: entity1JWK.pub, [memberId2]: entity2JWK.pub }; - - node3 = { - nodeApiHost: node3Host, - publicKeyPem: pubKeyPem3, - consortiumId, - id: uuidV4(), - ledgerIds: [ledger2.id], - memberId: memberId2, - pluginInstanceIds: [], - }; - - consortium = { - id: consortiumId, - mainApiHost: node1Host, - name: consortiumName, - memberIds: [member1.id, member2.id], - }; - - consortiumDatabase = { - cactusNode: [node1], - consortium: [consortium], - consortiumMember: [member1, member2], - ledger: [ledger1], - pluginInstance: [], - }; - - const config = new Configuration({ basePath: consortium.mainApiHost }); - mainApiClient = new ApiClient(config); - }); - - afterAll(async () => { - await besuTestLedger1.stop(); - await besuTestLedger1.destroy(); - await besuTestLedger2.stop(); - await besuTestLedger2.destroy(); - await apiServer1.shutdown(); - await apiServer2.shutdown(); - await apiServer3.shutdown(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - test(testCase1, async () => { - const rpcApiHttpHost1 = await besuTestLedger1.getRpcApiHttpHost(); - const rpcApiWsHost1 = await besuTestLedger1.getRpcApiWsHost(); - - const rpcApiHttpHost2 = await besuTestLedger2.getRpcApiHttpHost(); - const rpcApiWsHost2 = await besuTestLedger2.getRpcApiWsHost(); - - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const pluginBesuConnector = new PluginLedgerConnectorBesu({ - instanceId: uuidV4(), - rpcApiHttpHost: rpcApiHttpHost1, - rpcApiWsHost: rpcApiWsHost1, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const keyPairPem = await exportPKCS8(keyPair1.privateKey); - const pub = await exportSPKI(keyPair1.publicKey); - - const options: IPluginConsortiumStaticOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - keyPairPub: pub, - consortiumDatabase: consortiumDatabase, - node: node1, - ledgers: [ledger1], - pluginInstances: [], - memberId: member1.id, - logLevel, - entitiesJWK, - }; - pluginConsortiumStatic1 = new PluginConsortiumStatic(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumStatic1); - pluginRegistry.add(pluginBesuConnector); - - apiServer1 = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer1.start(); - } - - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const pluginBesuConnector = new PluginLedgerConnectorBesu({ - instanceId: uuidV4(), - rpcApiHttpHost: rpcApiHttpHost2, - rpcApiWsHost: rpcApiWsHost2, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const consortiumDatabase1 = { - cactusNode: [], - consortium: [], - consortiumMember: [], - ledger: [], - pluginInstance: [], - }; - - const keyPairPem = await exportPKCS8(keyPair2.privateKey); - const pub = await exportSPKI(keyPair2.publicKey); - - const options: IPluginConsortiumStaticOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - keyPairPub: pub, - consortiumDatabase: consortiumDatabase1, - node: node2, - ledgers: [ledger2], - pluginInstances: [], - memberId: member2.id, - logLevel, - entitiesJWK, - }; - pluginConsortiumStatic2 = new PluginConsortiumStatic(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo2.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = []; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumStatic2); - pluginRegistry.add(pluginBesuConnector); - - apiServer2 = new ApiServer({ - httpServerApi: httpServer2, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer2.start(); - - const consortApi = mainApiClient.extendWith(ConsortiumStaticApi); - const jwt = await issueOrgToken( - entity2JWK.priv, - { - iss: member2.name, - exp: Date.now() + 5 * 60 * 1000, //expires in 5min - }, - member2.id, - pub, - ); - await pluginConsortiumStatic2.joinConsortium(consortApi, jwt); - // test.onFinish(() => apiServer.shutdown()); - // afterAll(async () => await apiServer.shutdown()); - const promMetricsOutput = - "# HELP " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " Total cactus node count\n" + - "# TYPE " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " gauge\n" + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '{type="' + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '"} 2'; - const res1 = await pluginConsortiumStatic1.getPrometheusExporterMetrics(); - const res2 = await pluginConsortiumStatic2.getPrometheusExporterMetrics(); - expect(res1).toEqual(promMetricsOutput); - expect(res2).toEqual(promMetricsOutput); - } - - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const pluginBesuConnector = new PluginLedgerConnectorBesu({ - instanceId: uuidV4(), - rpcApiHttpHost: rpcApiHttpHost2, - rpcApiWsHost: rpcApiWsHost2, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const consortiumDatabase1 = { - cactusNode: [], - consortium: [], - consortiumMember: [], - ledger: [], - pluginInstance: [], - }; - - const keyPairPem = await exportPKCS8(keyPair3.privateKey); - const pub = await exportSPKI(keyPair3.publicKey); - - const options: IPluginConsortiumStaticOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - keyPairPub: pub, - consortiumDatabase: consortiumDatabase1, - node: node3, - ledgers: [ledger2], - pluginInstances: [], - memberId: member2.id, - logLevel, - entitiesJWK, - }; - pluginConsortiumStatic3 = new PluginConsortiumStatic(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo3.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = []; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumStatic3); - pluginRegistry.add(pluginBesuConnector); - - apiServer3 = new ApiServer({ - httpServerApi: httpServer3, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer3.start(); - - const consortApi = mainApiClient.extendWith(ConsortiumStaticApi); - const jwt = await issueOrgToken( - entity2JWK.priv, - { - iss: member2.name, - exp: Date.now() + 5 * 60 * 1000, //expires in 5min - }, - member2.id, - pub, - ); - await pluginConsortiumStatic3.joinConsortium(consortApi, jwt); - } - { - //final test - const res1 = await pluginConsortiumStatic1.getPrometheusExporterMetrics(); - const res2 = await pluginConsortiumStatic2.getPrometheusExporterMetrics(); - const res3 = await pluginConsortiumStatic3.getPrometheusExporterMetrics(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " Total cactus node count\n" + - "# TYPE " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " gauge\n" + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '{type="' + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '"} 3'; - - //all plugins have consortium updated - expect(res1.includes(promMetricsOutput)).toBeTruthy(); - expect(res2.includes(promMetricsOutput)).toBeTruthy(); - expect(res3.includes(promMetricsOutput)).toBeTruthy(); - } - }); -}); diff --git a/packages/cacti-plugin-consortium-static/src/test/typescript/unit/api-surface.test.ts b/packages/cacti-plugin-consortium-static/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cacti-plugin-consortium-static/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cacti-plugin-consortium-static/tsconfig.json b/packages/cacti-plugin-consortium-static/tsconfig.json deleted file mode 100644 index c47050d1c6..0000000000 --- a/packages/cacti-plugin-consortium-static/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-consortium-new.tsbuildinfo" - }, - "include": [ - "./src", - "**/openapi.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cacti-plugin-ledger-connector-stellar/CHANGELOG.md b/packages/cacti-plugin-ledger-connector-stellar/CHANGELOG.md deleted file mode 100644 index d546e70f69..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/CHANGELOG.md +++ /dev/null @@ -1,101 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-ledger-connector-stellar - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-ledger-connector-stellar - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-ledger-connector-stellar - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-ledger-connector-stellar diff --git a/packages/cacti-plugin-ledger-connector-stellar/README.md b/packages/cacti-plugin-ledger-connector-stellar/README.md deleted file mode 100644 index 1b7b66b1ec..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/README.md +++ /dev/null @@ -1,323 +0,0 @@ -# `@hyperledger/cacti-plugin-ledger-connector-stellar` - -This plugin provides `Cacti` a way to interact with Stellar networks. Using this we can perform: - -- Deploy Smart-contracts over the network. -- Build and sign transactions. -- Invoke smart-contract functions that we have deployed on the network. - -## Summary - -- [Getting Started](#getting-started) -- [Architecture](#architecture) -- [Usage](#usage) -- [Prometheus Exporter](#prometheus-exporter) -- [Runing the tests](#running-the-tests) -- [Built With](#built-with) -- [Contributing](#contributing) -- [License](#license) -- [Acknowledgments](#acknowledgments) - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the Cacti project to install the dependencies execute the command: - -```sh -npm run enable-corepack -yarn configure -``` - -### Compiling - -In the project root folder, run this command to compile the plugin and create the dist directory: - -```sh -yarn tsc -``` - -### Architecture - -The Stellar Ledger Connector offers a variaty of endpoints to handle specific actions for a given Stellar network. - -#### `deploy-contract` endpoint - -This endpoint is responsible for deploying smart contracts to Soroban (Stellar's smart contract platform). - -**Core Aspects**: - -- **Input**: Accepts either a compiled WASM buffer or a WASM hash. - - - `wasmBuffer`: Uploads compiled code to Stellar, generates a on-chain WASM hash, then deploys the contract. Refer to the [Stellar documentation](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/contracts) for further detail on this process. - - `wasmHash`: Directly deploys the contract using the existing WASM hash. - - `transactionInvocation`: An object containing data about how the transaction should be assembled and executed. - -- **Output**: An object containing the on-chain WASM hash and a unique contract ID of the newly deployed instance. - -#### `run-soroban-transaction` endpoint - -This endpoint is responsible for invoking smart contracts on Soroban (Stellar's smart contract platform) to either change or read a ledger state. - -**Core Aspects**: - -- **Input**: Accepts either a compiled WASM buffer or a WASM hash. - - `contractId`: The unique contract id of the contract instance to be invoked. - - `method`: The name of the contract method being invoked. - - `methodArgs`: An object containing the arguments accepted by the method. - - `specXdr`: An array containing the contract specification in XDR format. - - `transactionInvocation`: An object containing data about how the transaction should be assembled and executed. - - `readOnly`: A flag to indicate when the transaction should not alter ledger state. When `true`, the transaction will only be simulated based on the current ledger state and provide an up-to-date output without registering the transaction to the ledger, ensuring no fees are consumed. -- **Output**: An object containing the response of the transaction invocation. - - `result`: The direct output of the invoked contract method. - -### Usage - -#### Initialization - -To use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector. - -```typescript -const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.LOCAL, -}); -const connector: PluginLedgerConnectorStellar = await factory.create({ - networkConfig, - pluginRegistry: new PluginRegistry({}), - instanceId: uuidV4(), -}); -``` - -A key element of the connector intialization is the provided `networkConfig` object. It follows the standard format defined in the open source library [Stellar Plus](https://github.com/CheesecakeLabs/stellar-plus) and can be assembled by the `CustomNet()` function provided by it as well as the most common network environments for Stellar such as the `TestNet()` for Stellar testnet or `FutureNet()` for early features and protocol changes validation. - -When using the _Stellar Test Ledger_ provided under the Cacti Test tooling, the network can be assembled using the `CustomNet()` function combined with the test ledger `getNetworkConfiguration()` method. Once the test ledger has been fully started, it exposes the configuration parameters for all its services. See the following example: - -```typescript -const stellarTestLedger = new StellarTestLedger({ logLevel }); - -await stellarTestLedger.start(); -const networkConfig = CustomNet( - await stellarTestLedger.getNetworkConfiguration(), -); -``` - -#### Making Calls - -One can make calls through the connector to the plugin API: - -```typescript -async deployContract(req: DeployContractV1Request):Promise; -``` - -Call example to deploy a contract: - -```typescript -const deployOut = await connector.deployContract({ - wasmBuffer: wasmBuffer.toString("base64"), - transactionInvocation: { - header: { - source: deployerAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [deployerAccount.getSecretKey()], - }, -}); -``` - -Call example to invoke a contract and return the output value: - -```typescript -const res = await connector.runSorobanTransaction({ - contractId, - method: "balance", - methodArgs: { - id: adminAccount.getPublicKey(), - }, - specXdr: tokenSpec, - readOnly: true, - transactionInvocation: { - header: { - source: adminAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [adminAccount.getSecretKey()], - }, -}); -``` - -#### Running the container - -Launch container with plugin configuration as an **environment variable**: - -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - --env PLUGINS='[{"packageName": "@hyperledger/cacti-plugin-ledger-connector-stellar", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": { "instanceId": "some-unique-stellar-connector-instance-id", "networkConfig": {}}}]' \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 -``` - -> Notice that in the command above we've left the `networkConfig` parameter as -> an empty object. If you'd like the Stellar connector plugin to connect to -> a specific ledger then fill out the details of `networkConfig` accordingly. - -Launch container with plugin configuration as a **CLI argument**: - -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --plugins='[{"packageName": "@hyperledger/cacti-plugin-ledger-connector-stellar", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": { "networkConfig":{}, "instanceId": "some-unique-stellar-connector-instance-id"}}]' -``` - -Launch container with **configuration file** mounted from host machine: - -```sh -echo '{"plugins": [{"packageName": "@hyperledger/cacti-plugin-ledger-connector-stellar", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": { "networkConfig":{}, "instanceId": "some-unique-stellar-connector-instance-id"}}]}' > .cacti-config.json -``` - -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - --mount type=bind,source="$(pwd)"/.cacti-config.json,target=/.cacti-config.json \ - cas \ - node index.js \ - --config-file=/.cacti-config.json -``` - -#### Testing API calls with the container - -Don't have a Stellar network on hand to test with? Test or develop against our Stellar All-In-One container by importing the `StellarTestLedger` from `cacti-test-tooling`. It will deploy and manage a docker image based on [Stellar quickstart](https://github.com/stellar/quickstart). - -**Usage Example**(refer to the integration tests for further examples): - -```typescript -import { StellarTestLedger } from "@hyperledger/cactus-test-tooling"; -import { Network } from "stellar-plus/lib/stellar-plus"; - -const logLevel: LogLevelDesc = "TRACE"; -const stellarTestLedger = new StellarTestLedger({ logLevel }); - -await stellarTestLedger.start(); -const networkConfig = Network.CustomNet( - await stellarTestLedger.getNetworkConfiguration(), -); - -// Here use the networkConfig object to connect to -// your test ledger and run your tests. - -await stellarTestLedger.stop(); -await stellarTestLedger.destroy(); -``` - -In this example, the `StellarTestLedger` is used to pull up a fresh new ledger with no history and all of its required services to interact with the network. In conjunction with the `stellar-plus` library, the method `getNetworkConfiguration` is used to get all services data and instantiate an object that can be used with all tools in Stellar Plus to directly interact with the test ledger. - -## Prometheus Exporter - -This class creates a prometheus exporter, which scrapes the transactions (total transaction count) for the use cases incorporating the use of Stellar connector plugin. - -### Prometheus Exporter Usage - -The prometheus exporter object is initialized in the `PluginLedgerConnectorStellar` class constructor itself, so instantiating the object of the `PluginLedgerConnectorStellar` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IPluginLedgerConnectorStellarOptions` interface for `PluginLedgerConnectorStellar` constructor. - -`getPrometheusMetricsV1` function returns the prometheus exporter metrics, currently displaying the total transaction count, which currently increments everytime a Stellar transaction is executed through the connector internal methods. This includes the methods - -- `deployContract` -- `runSorobanTransaction()` - -### Prometheus Integration - -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'stellar_ledger_connector_exporter' - metrics_path: api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. The test cases (For example, `packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/unit/get-open-api-spec-v1-connector-stellar.test.ts`) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cacti_stellar_total_tx_count** and click **execute** - -### Helper code - -###### response.type.ts - -This file contains the various responses of the metrics. - -###### data-fetcher.ts - -This file contains functions encasing the logic to process the data points - -###### metrics.ts - -This file lists all the prometheus metrics and what they are used for. - -## Running the tests - -To check that all has been installed correctly and that the pugin has no errors run the tests: - -- Run this command at the project's root: - -```sh -yarn jest packages/cacti-plugin-ledger-connector-stellar/ -``` - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments diff --git a/packages/cacti-plugin-ledger-connector-stellar/openapitools.json b/packages/cacti-plugin-ledger-connector-stellar/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/package.json b/packages/cacti-plugin-ledger-connector-stellar/package.json deleted file mode 100644 index 518f971979..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "name": "@hyperledger/cacti-plugin-ledger-connector-stellar", - "version": "2.0.0", - "description": "Allows Cacti nodes to connect to a Stellar ledger.", - "keywords": [ - "Hyperledger", - "Cacti", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - }, - { - "name": "Fabricius Zatti", - "email": "fazzatti@gmail.com", - "url": "https://oififo.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cacti-plugin-ledger-connector-stellar.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "express": "4.21.0", - "http-errors-enhanced-cjs": "2.0.1", - "joi": "17.13.3", - "openapi-types": "12.1.3", - "prom-client": "15.1.3", - "run-time-error-cjs": "1.4.0", - "rxjs": "7.8.1", - "socket.io-client-fixed-types": "4.5.4", - "stellar-plus": "0.8.4", - "typescript-optional": "2.0.1" - }, - "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/http-errors": "2.0.4", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "npm-run-all2": "6.1.2", - "socket.io": "4.6.2", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cacti-plugin-ledger-connector-stellar.web.umd.min.js", - "mainMinified": "dist/cacti-plugin-ledger-connector-stellar.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/json/openapi.json b/packages/cacti-plugin-ledger-connector-stellar/src/main/json/openapi.json deleted file mode 100644 index d86e02d274..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/json/openapi.json +++ /dev/null @@ -1,331 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector Stellar", - "description": "Can perform basic smart contract tasks on a Stellar ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "WatchBlocksV1": { - "type": "string", - "enum": [ - "org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Subscribe", - "org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Next", - "org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Error", - "org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchBlocksV1Progress": { - "type": "object", - "required": ["blockHeader"], - "properties": { - "blockHeader": { - "type": "object", - "additionalProperties": true - } - } - }, - "TransactionInvocation": { - "type": "object", - "required": ["header", "signers"], - "properties": { - "header": { - "$ref": "#/components/schemas/TransactionHeader" - }, - "signers": { - "type": "array", - "items": { - "type": "string", - "pattern": "^S[a-zA-Z0-9]{55}$", - "nullable": false, - "minLength": 56, - "maxLength": 56, - "description": "The secret key of the account that will sign the transaction." - }, - "nullable": false - } - } - }, - "TransactionHeader": { - "type": "object", - "required": ["source", "fee", "timeout"], - "properties": { - "source": { - "type": "string", - "pattern": "^G[a-zA-Z0-9]{55}$", - "nullable": false, - "minLength": 56, - "maxLength": 56, - "description": "The public key of the source account of the transaction." - }, - "fee": { - "type": "integer", - "nullable": false, - "minimum": 100, - "description": "The maximum base fee in stroops to be paid for the transaction." - }, - "timeout": { - "type": "integer", - "nullable": false, - "minimum": 0, - "description": "The maximum number of ledger close time in seconds that the transaction is valid for. '0' equals to no timeout." - } - } - }, - "RunSorobanTransactionRequest": { - "type": "object", - "additionalProperties": false, - "required": [ - "contractId", - "method", - "specXdr", - "transactionInvocation", - "readOnly" - ], - "properties": { - "contractId": { - "type": "string", - "pattern": "^C[a-zA-Z0-9]{55}$", - "nullable": false, - "minLength": 56, - "maxLength": 56, - "description": "The ID of the contract that was deployed." - }, - "specXdr": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": false, - "description": "Array of strings containing the XDR of the contract specification." - }, - "method": { - "type": "string", - "nullable": false, - "description": "The method to be called on the contract." - }, - "methodArgs": { - "type": "object", - "nullable": true, - "description": "The arguments to pass to the method." - }, - "transactionInvocation": { - "$ref": "#/components/schemas/TransactionInvocation", - "nullable": false, - "description": "The transaction invocation that will be used to run the contract." - }, - "readOnly": { - "type": "boolean", - "nullable": false, - "description": "Flag indicating if the transaction should be read-only." - } - } - }, - "RunSorobanTransactionResponse": { - "type": "object", - "properties": { - "result": { - "type": "object", - "description": "The result of the invoked contract method." - } - }, - "description": "Response object containing the result of a contract invocation or error information if it failed." - }, - "DeployContractV1Request": { - "type": "object", - "additionalProperties": false, - "required": ["transactionInvocation"], - "anyOf": [ - { - "required": ["wasmHash"] - }, - { - "required": ["wasmBuffer"] - } - ], - "properties": { - "wasmHash": { - "type": "string", - "pattern": "^[a-f0-9]{64}$", - "nullable": true, - "minLength": 64, - "maxLength": 64, - "description": "The hash of the wasm code installed in the ledger to be deployed into a new instance." - }, - "wasmBuffer": { - "type": "string", - "format": "byte", - "nullable": true, - "minLength": 100, - "maxLength": 87382, - "description": "A Base64-encoded string that contains the binary data of the WASM code. This buffer is used to deploy WebAssembly code to the ledger." - }, - "transactionInvocation": { - "$ref": "#/components/schemas/TransactionInvocation", - "nullable": true, - "description": "The transaction invocation that will be used to deploy the contract." - } - } - }, - "DeployContractV1Response": { - "type": "object", - "required": ["contractId", "wasmHash"], - "properties": { - "contractId": { - "type": "string", - "pattern": "^C[a-f0-9]{55}$", - "nullable": true, - "minLength": 56, - "maxLength": 56, - "description": "The ID of the contract that was deployed." - }, - "wasmHash": { - "type": "string", - "pattern": "^[a-f0-9]{64}$", - "nullable": true, - "minLength": 64, - "maxLength": 64, - "description": "The hash of the wasm code installed in the ledger." - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-open-api-spec": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-open-api-spec" - } - }, - "operationId": "getOpenApiSpecV1", - "summary": "Retrieves the .json file that contains the OpenAPI specification for the plugin.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/deploy-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/deploy-contract" - } - }, - "operationId": "deployContractV1", - "summary": "Deploys a smart contract to the Stellar ledger associated with the connector.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/run-soroban-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/run-soroban-transaction" - } - }, - "operationId": "runSorobanTransactionV1", - "summary": "Executes a Soroban transaction on a stellar ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunSorobanTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunSorobanTransactionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/json/openapi.tpl.json b/packages/cacti-plugin-ledger-connector-stellar/src/main/json/openapi.tpl.json deleted file mode 100644 index d86e02d274..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,331 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector Stellar", - "description": "Can perform basic smart contract tasks on a Stellar ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "WatchBlocksV1": { - "type": "string", - "enum": [ - "org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Subscribe", - "org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Next", - "org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Error", - "org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchBlocksV1Progress": { - "type": "object", - "required": ["blockHeader"], - "properties": { - "blockHeader": { - "type": "object", - "additionalProperties": true - } - } - }, - "TransactionInvocation": { - "type": "object", - "required": ["header", "signers"], - "properties": { - "header": { - "$ref": "#/components/schemas/TransactionHeader" - }, - "signers": { - "type": "array", - "items": { - "type": "string", - "pattern": "^S[a-zA-Z0-9]{55}$", - "nullable": false, - "minLength": 56, - "maxLength": 56, - "description": "The secret key of the account that will sign the transaction." - }, - "nullable": false - } - } - }, - "TransactionHeader": { - "type": "object", - "required": ["source", "fee", "timeout"], - "properties": { - "source": { - "type": "string", - "pattern": "^G[a-zA-Z0-9]{55}$", - "nullable": false, - "minLength": 56, - "maxLength": 56, - "description": "The public key of the source account of the transaction." - }, - "fee": { - "type": "integer", - "nullable": false, - "minimum": 100, - "description": "The maximum base fee in stroops to be paid for the transaction." - }, - "timeout": { - "type": "integer", - "nullable": false, - "minimum": 0, - "description": "The maximum number of ledger close time in seconds that the transaction is valid for. '0' equals to no timeout." - } - } - }, - "RunSorobanTransactionRequest": { - "type": "object", - "additionalProperties": false, - "required": [ - "contractId", - "method", - "specXdr", - "transactionInvocation", - "readOnly" - ], - "properties": { - "contractId": { - "type": "string", - "pattern": "^C[a-zA-Z0-9]{55}$", - "nullable": false, - "minLength": 56, - "maxLength": 56, - "description": "The ID of the contract that was deployed." - }, - "specXdr": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": false, - "description": "Array of strings containing the XDR of the contract specification." - }, - "method": { - "type": "string", - "nullable": false, - "description": "The method to be called on the contract." - }, - "methodArgs": { - "type": "object", - "nullable": true, - "description": "The arguments to pass to the method." - }, - "transactionInvocation": { - "$ref": "#/components/schemas/TransactionInvocation", - "nullable": false, - "description": "The transaction invocation that will be used to run the contract." - }, - "readOnly": { - "type": "boolean", - "nullable": false, - "description": "Flag indicating if the transaction should be read-only." - } - } - }, - "RunSorobanTransactionResponse": { - "type": "object", - "properties": { - "result": { - "type": "object", - "description": "The result of the invoked contract method." - } - }, - "description": "Response object containing the result of a contract invocation or error information if it failed." - }, - "DeployContractV1Request": { - "type": "object", - "additionalProperties": false, - "required": ["transactionInvocation"], - "anyOf": [ - { - "required": ["wasmHash"] - }, - { - "required": ["wasmBuffer"] - } - ], - "properties": { - "wasmHash": { - "type": "string", - "pattern": "^[a-f0-9]{64}$", - "nullable": true, - "minLength": 64, - "maxLength": 64, - "description": "The hash of the wasm code installed in the ledger to be deployed into a new instance." - }, - "wasmBuffer": { - "type": "string", - "format": "byte", - "nullable": true, - "minLength": 100, - "maxLength": 87382, - "description": "A Base64-encoded string that contains the binary data of the WASM code. This buffer is used to deploy WebAssembly code to the ledger." - }, - "transactionInvocation": { - "$ref": "#/components/schemas/TransactionInvocation", - "nullable": true, - "description": "The transaction invocation that will be used to deploy the contract." - } - } - }, - "DeployContractV1Response": { - "type": "object", - "required": ["contractId", "wasmHash"], - "properties": { - "contractId": { - "type": "string", - "pattern": "^C[a-f0-9]{55}$", - "nullable": true, - "minLength": 56, - "maxLength": 56, - "description": "The ID of the contract that was deployed." - }, - "wasmHash": { - "type": "string", - "pattern": "^[a-f0-9]{64}$", - "nullable": true, - "minLength": 64, - "maxLength": 64, - "description": "The hash of the wasm code installed in the ledger." - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-open-api-spec": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-open-api-spec" - } - }, - "operationId": "getOpenApiSpecV1", - "summary": "Retrieves the .json file that contains the OpenAPI specification for the plugin.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/deploy-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/deploy-contract" - } - }, - "operationId": "deployContractV1", - "summary": "Deploys a smart contract to the Stellar ledger associated with the connector.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/run-soroban-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/run-soroban-transaction" - } - }, - "operationId": "runSorobanTransactionV1", - "summary": "Executes a Soroban transaction on a stellar ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunSorobanTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunSorobanTransactionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/api-client/stellar-api-client.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/api-client/stellar-api-client.ts deleted file mode 100644 index 9844c1f803..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/api-client/stellar-api-client.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Observable, ReplaySubject } from "rxjs"; -import { finalize } from "rxjs/operators"; -import { Socket, io } from "socket.io-client-fixed-types"; -import { Logger, Checks } from "@hyperledger/cactus-common"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { Constants, ISocketApiClient } from "@hyperledger/cactus-core-api"; -import { - DefaultApi, - WatchBlocksV1, - WatchBlocksV1Progress, -} from "../generated/openapi/typescript-axios"; -import { Configuration } from "../generated/openapi/typescript-axios/configuration"; - -export class StellarApiClientOptions extends Configuration { - readonly logLevel?: LogLevelDesc; - readonly wsApiHost?: string; - readonly wsApiPath?: string; -} - -export class StellarApiClient - extends DefaultApi - implements ISocketApiClient -{ - public static readonly CLASS_NAME = "StellarApiClient"; - - private readonly log: Logger; - private readonly wsApiHost: string; - private readonly wsApiPath: string; - - public get className(): string { - return StellarApiClient.CLASS_NAME; - } - - constructor(public readonly options: StellarApiClientOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.wsApiHost = options.wsApiHost || options.basePath || location.host; - this.wsApiPath = options.wsApiPath || Constants.SocketIoConnectionPathV1; - this.log.debug(`Created ${this.className} OK.`); - this.log.debug(`wsApiHost=${this.wsApiHost}`); - this.log.debug(`wsApiPath=${this.wsApiPath}`); - this.log.debug(`basePath=${this.options.basePath}`); - } - - public watchBlocksV1(): Observable { - const socket: Socket = io(this.wsApiHost, { path: this.wsApiPath }); - const subject = new ReplaySubject(0); - - socket.on(WatchBlocksV1.Next, (data: WatchBlocksV1Progress) => { - subject.next(data); - }); - - socket.on("connect", () => { - console.log("connected OK..."); - socket.emit(WatchBlocksV1.Subscribe); - }); - - socket.connect(); - - return subject.pipe( - finalize(() => { - console.log("FINALIZE - unsubscribing from the stream..."); - socket.emit(WatchBlocksV1.Unsubscribe); - socket.disconnect(); - }), - // TODO: Investigate if we need these below - in theory without these - // it could happen that only the fist subscriber gets the last emitted value - // publishReplay(1), - // refCount(), - ); - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/core/contract-engine.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/core/contract-engine.ts deleted file mode 100644 index c661d8c133..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/core/contract-engine.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { ContractEngine } from "stellar-plus/lib/stellar-plus/core/contract-engine"; -import { SorobanTransactionPipelineOptions } from "stellar-plus/lib/stellar-plus/core/pipelines/soroban-transaction/types"; -import { NetworkConfig } from "stellar-plus/lib/stellar-plus/network"; -import { TransactionInvocation } from "stellar-plus/lib/stellar-plus/types"; -import { Core as SPCore } from "stellar-plus/lib/stellar-plus/core/index"; - -export interface DeployContractWithWasmOptions - extends BaseContractEngineInvocation { - wasmBuffer: Buffer; -} - -export interface DeployContractWithWasmHashOptions - extends BaseContractEngineInvocation { - wasmHash: string; -} - -export interface DeployContractOutput { - contractId: string; - wasmHash: string; -} - -interface BaseContractEngineInvocation { - txInvocation: TransactionInvocation; - pipelineOptions?: SorobanTransactionPipelineOptions; - fnLogPrefix: string; - networkConfig: NetworkConfig; -} - -export interface InvokeContractOptions extends BaseInvokeContractOptions { - readOnly: false; -} -export interface ReadContractOptions extends BaseInvokeContractOptions { - readOnly: true; -} - -export interface BaseInvokeContractOptions - extends BaseContractEngineInvocation { - contractId: string; - method: string; - methodArgs: T; - specXdr: string[]; -} - -/** - * Deploys a contract to the Stellar network. Accepts either a WebAssembly binary buffer or a hash of the WebAssembly binary code in the ledger. - * - * @param {DeployContractWithWasmOptions | DeployContractWithWasmHashOptions} options - Options for deploying a contract. - * @param {TransactionInvocation} options.txInvocation - Transaction invocation object containing the parameters to configure the transaction envelope. - * @param {SorobanTransactionPipelineOptions} [options.pipelineOptions] - Options for the Soroban transaction pipeline. - * @param {string} options.fnLogPrefix - Prefix for log messages. - * @param {NetworkConfig} options.networkConfig - Network configuration object. Contains the details of the services available to interact with the Stellar network. - * @param {Buffer} [options.wasmBuffer] - Buffer containing the WebAssembly binary code of the contract. - * @param {string} [options.wasmHash] - Hash of the WebAssembly binary code of the contract from the ledger. - * - * @returns {Promise} - Returns the contract ID and the hash of the WebAssembly binary code of the contract. - * - * @throws {Error} - Throws an error if the contract deployment fails. - * - */ -export const deployContract = async ( - options: DeployContractWithWasmOptions | DeployContractWithWasmHashOptions, -): Promise => { - const { networkConfig, txInvocation, fnLogPrefix, pipelineOptions } = options; - - const fnTag = `${fnLogPrefix}#deployContract()`; - - const contractEngine = new ContractEngine({ - networkConfig, - contractParameters: { - wasm: (options as DeployContractWithWasmOptions).wasmBuffer, - wasmHash: (options as DeployContractWithWasmHashOptions).wasmHash, - }, - options: { - sorobanTransactionPipeline: pipelineOptions, - }, - }); - - if ((options as DeployContractWithWasmOptions).wasmBuffer) { - await contractEngine.uploadWasm(txInvocation).catch((error) => { - throw new Error(`${fnTag} Failed to upload wasm. ` + error); - }); - } - - await contractEngine.deploy(txInvocation).catch((error) => { - throw new Error(`${fnTag} Failed to deploy contract. ` + error); - }); - - const output: DeployContractOutput = { - contractId: contractEngine.getContractId(), - wasmHash: contractEngine.getWasmHash(), - }; - - return output; -}; - -/** - * - * Invokes a contract on the Stellar network. Can perform a full contract invocation or a read-only contract invocation. - * Read-only should be used when the contract does not modify the ledger state. In these cases, the contract invocation is not submitted to the network. - * Only a simulation is performed to determine the result of the contract invocation, therefore no fees are incurred. - * - * @param {InvokeContractOptions | ReadContractOptions} options - Options for invoking a contract. - * @param {TransactionInvocation} options.txInvocation - Transaction invocation object containing the parameters to configure the transaction envelope. - * @param {SorobanTransactionPipelineOptions} [options.pipelineOptions] - Options for the Soroban transaction pipeline. - * @param {string} options.fnLogPrefix - Prefix for log messages. - * @param {NetworkConfig} options.networkConfig - Network configuration object. Contains the details of the services available to interact with the Stellar network. - * @param {string} options.contractId - Contract ID of the contract to invoke. - * @param {string} options.method - Method to invoke on the contract. - * @param {T} options.methodArgs - Object containing the arguments to pass to the method. - * @param {string[]} options.specXdr - Array of strings containing the XDR of the contract specification. - * @param {boolean} options.readOnly - Flag to indicate if the contract invocation is read-only. - * - * @returns {Promise} - Returns the result of the contract invocation. - * - * @throws {Error} - Throws an error if the contract invocation fails. - * @throws {Error} - Throws an error if the contract read fails. - * - * - * @returns - */ -export const invokeContract = async ( - options: InvokeContractOptions | ReadContractOptions, -): Promise => { - const { - networkConfig, - txInvocation, - fnLogPrefix, - pipelineOptions, - contractId, - method, - methodArgs, - specXdr, - } = options; - - const fnTag = `${fnLogPrefix}#invokeContract()`; - - const contractEngine = new ContractEngine({ - networkConfig, - contractParameters: { - contractId: contractId, - spec: new SPCore.ContractSpec(specXdr), - }, - options: { - sorobanTransactionPipeline: pipelineOptions, - }, - }); - - if (options.readOnly) { - return await contractEngine - .readFromContract({ - method, - methodArgs: methodArgs as object, - ...txInvocation, - }) - .catch((error) => { - throw new Error(`${fnTag} Failed to read contract. ` + error); - }); - } - - return await contractEngine - .invokeContract({ - method, - methodArgs: methodArgs as object, - ...txInvocation, - }) - .catch((error) => { - throw new Error(`${fnTag} Failed to invoke contract. ` + error); - }); -}; diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index cbdf6f9527..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,492 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Stellar - * Can perform basic smart contract tasks on a Stellar ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface DeployContractV1Request - */ -export interface DeployContractV1Request { - /** - * The hash of the wasm code installed in the ledger to be deployed into a new instance. - * @type {string} - * @memberof DeployContractV1Request - */ - 'wasmHash'?: string | null; - /** - * A Base64-encoded string that contains the binary data of the WASM code. This buffer is used to deploy WebAssembly code to the ledger. - * @type {string} - * @memberof DeployContractV1Request - */ - 'wasmBuffer'?: string | null; - /** - * - * @type {TransactionInvocation} - * @memberof DeployContractV1Request - */ - 'transactionInvocation': TransactionInvocation; -} -/** - * - * @export - * @interface DeployContractV1Response - */ -export interface DeployContractV1Response { - /** - * The ID of the contract that was deployed. - * @type {string} - * @memberof DeployContractV1Response - */ - 'contractId': string | null; - /** - * The hash of the wasm code installed in the ledger. - * @type {string} - * @memberof DeployContractV1Response - */ - 'wasmHash': string | null; -} -/** - * - * @export - * @interface RunSorobanTransactionRequest - */ -export interface RunSorobanTransactionRequest { - /** - * The ID of the contract that was deployed. - * @type {string} - * @memberof RunSorobanTransactionRequest - */ - 'contractId': string; - /** - * Array of strings containing the XDR of the contract specification. - * @type {Array} - * @memberof RunSorobanTransactionRequest - */ - 'specXdr': Array; - /** - * The method to be called on the contract. - * @type {string} - * @memberof RunSorobanTransactionRequest - */ - 'method': string; - /** - * The arguments to pass to the method. - * @type {object} - * @memberof RunSorobanTransactionRequest - */ - 'methodArgs'?: object | null; - /** - * - * @type {TransactionInvocation} - * @memberof RunSorobanTransactionRequest - */ - 'transactionInvocation': TransactionInvocation; - /** - * Flag indicating if the transaction should be read-only. - * @type {boolean} - * @memberof RunSorobanTransactionRequest - */ - 'readOnly': boolean; -} -/** - * Response object containing the result of a contract invocation or error information if it failed. - * @export - * @interface RunSorobanTransactionResponse - */ -export interface RunSorobanTransactionResponse { - /** - * The result of the invoked contract method. - * @type {object} - * @memberof RunSorobanTransactionResponse - */ - 'result'?: object; -} -/** - * - * @export - * @interface TransactionHeader - */ -export interface TransactionHeader { - /** - * The public key of the source account of the transaction. - * @type {string} - * @memberof TransactionHeader - */ - 'source': string; - /** - * The maximum base fee in stroops to be paid for the transaction. - * @type {number} - * @memberof TransactionHeader - */ - 'fee': number; - /** - * The maximum number of ledger close time in seconds that the transaction is valid for. \'0\' equals to no timeout. - * @type {number} - * @memberof TransactionHeader - */ - 'timeout': number; -} -/** - * - * @export - * @interface TransactionInvocation - */ -export interface TransactionInvocation { - /** - * - * @type {TransactionHeader} - * @memberof TransactionInvocation - */ - 'header': TransactionHeader; - /** - * - * @type {Array} - * @memberof TransactionInvocation - */ - 'signers': Array; -} -/** - * - * @export - * @enum {string} - */ - -export const WatchBlocksV1 = { - Subscribe: 'org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Subscribe', - Next: 'org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Next', - Unsubscribe: 'org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Unsubscribe', - Error: 'org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Error', - Complete: 'org.hyperledger.cacti.api.async.stellar.WatchBlocksV1.Complete' -} as const; - -export type WatchBlocksV1 = typeof WatchBlocksV1[keyof typeof WatchBlocksV1]; - - -/** - * - * @export - * @interface WatchBlocksV1Progress - */ -export interface WatchBlocksV1Progress { - /** - * - * @type {{ [key: string]: any; }} - * @memberof WatchBlocksV1Progress - */ - 'blockHeader': { [key: string]: any; }; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deploys a smart contract to the Stellar ledger associated with the connector. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractV1: async (deployContractV1Request?: DeployContractV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/deploy-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deployContractV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the .json file that contains the OpenAPI specification for the plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOpenApiSpecV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-open-api-spec`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Executes a Soroban transaction on a stellar ledger - * @param {RunSorobanTransactionRequest} [runSorobanTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runSorobanTransactionV1: async (runSorobanTransactionRequest?: RunSorobanTransactionRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/run-soroban-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(runSorobanTransactionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deploys a smart contract to the Stellar ledger associated with the connector. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deployContractV1(deployContractV1Request?: DeployContractV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deployContractV1(deployContractV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the .json file that contains the OpenAPI specification for the plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getOpenApiSpecV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOpenApiSpecV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Executes a Soroban transaction on a stellar ledger - * @param {RunSorobanTransactionRequest} [runSorobanTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async runSorobanTransactionV1(runSorobanTransactionRequest?: RunSorobanTransactionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.runSorobanTransactionV1(runSorobanTransactionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deploys a smart contract to the Stellar ledger associated with the connector. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractV1(deployContractV1Request?: DeployContractV1Request, options?: any): AxiosPromise { - return localVarFp.deployContractV1(deployContractV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the .json file that contains the OpenAPI specification for the plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOpenApiSpecV1(options?: any): AxiosPromise { - return localVarFp.getOpenApiSpecV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Executes a Soroban transaction on a stellar ledger - * @param {RunSorobanTransactionRequest} [runSorobanTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runSorobanTransactionV1(runSorobanTransactionRequest?: RunSorobanTransactionRequest, options?: any): AxiosPromise { - return localVarFp.runSorobanTransactionV1(runSorobanTransactionRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deploys a smart contract to the Stellar ledger associated with the connector. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deployContractV1(deployContractV1Request?: DeployContractV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deployContractV1(deployContractV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the .json file that contains the OpenAPI specification for the plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getOpenApiSpecV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getOpenApiSpecV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Executes a Soroban transaction on a stellar ledger - * @param {RunSorobanTransactionRequest} [runSorobanTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public runSorobanTransactionV1(runSorobanTransactionRequest?: RunSorobanTransactionRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).runSorobanTransactionV1(runSorobanTransactionRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index a243dd8caf..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Stellar - * Can perform basic smart contract tasks on a Stellar ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index c04e3343bb..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Stellar - * Can perform basic smart contract tasks on a Stellar ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 14d2cc7cc1..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Stellar - * Can perform basic smart contract tasks on a Stellar ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 65d5a71505..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Stellar - * Can perform basic smart contract tasks on a Stellar ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/index.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/index.web.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/plugin-factory-ledger-connector.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/plugin-factory-ledger-connector.ts deleted file mode 100644 index 7f7698196f..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginLedgerConnectorStellarOptions, - PluginLedgerConnectorStellar, -} from "./plugin-ledger-connector-stellar"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorStellar, - IPluginLedgerConnectorStellarOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorStellarOptions, - ): Promise { - return new PluginLedgerConnectorStellar(pluginOptions); - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/plugin-ledger-connector-stellar.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/plugin-ledger-connector-stellar.ts deleted file mode 100644 index efa6245c5b..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/plugin-ledger-connector-stellar.ts +++ /dev/null @@ -1,271 +0,0 @@ -import type { Server as SocketIoServer } from "socket.io"; -import type { Socket as SocketIoSocket } from "socket.io"; -import type { Express } from "express"; -import { InternalServerError } from "http-errors-enhanced-cjs"; - -import OAS from "../json/openapi.json"; - -import { - ConsensusAlgorithmFamily, - IPluginLedgerConnector, - IWebServiceEndpoint, - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { - DeployContractV1Request, - DeployContractV1Response, - RunSorobanTransactionRequest, - RunSorobanTransactionResponse, - WatchBlocksV1, -} from "./generated/openapi/typescript-axios"; - -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; -import { WatchBlocksV1Endpoint } from "./web-services/watch-blocks-v1-endpoint"; -import { - GetOpenApiSpecV1Endpoint, - IGetOpenApiSpecV1EndpointOptions, -} from "./web-services/get-open-api-spec-v1-endpoint"; -import { NetworkConfig } from "stellar-plus/lib/stellar-plus/network"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { deployContract, invokeContract } from "./core/contract-engine"; -import { convertApiTransactionInvocationToStellarPlus } from "./utils"; -import { - GetPrometheusExporterMetricsEndpointV1, - IGetPrometheusExporterMetricsEndpointV1Options, -} from "./web-services/get-prometheus-exporter-metrics-endpoint-v1"; -import { DeployContractEndpoint } from "./web-services/deploy-contract-endpoint"; -import { RunSorobanTransactionEndpoint } from "./web-services/run-soroban-transaction-endpoint"; - -export const E_KEYCHAIN_NOT_FOUND = - "cacti.connector.stellar.keychain_not_found"; - -export interface IPluginLedgerConnectorStellarOptions - extends ICactusPluginOptions { - networkConfig: NetworkConfig; - pluginRegistry: PluginRegistry; - prometheusExporter?: PrometheusExporter; - logLevel?: LogLevelDesc; -} - -export class PluginLedgerConnectorStellar - implements - IPluginLedgerConnector< - DeployContractV1Request, - DeployContractV1Response, - RunSorobanTransactionRequest, - RunSorobanTransactionResponse - >, - ICactusPlugin, - IPluginWebService -{ - private networkConfig: NetworkConfig; - private readonly instanceId: string; - private readonly log: Logger; - private endpoints: IWebServiceEndpoint[] | undefined; - private readonly pluginRegistry: PluginRegistry; - public prometheusExporter: PrometheusExporter; - - public static readonly CLASS_NAME = "PluginLedgerConnectorStellar"; - - public get className(): string { - return PluginLedgerConnectorStellar.CLASS_NAME; - } - - constructor(public readonly options: IPluginLedgerConnectorStellarOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.networkConfig, `${fnTag} options.networkConfig`); - - Checks.truthy(options.pluginRegistry, `${fnTag} options.pluginRegistry`); - - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - - this.networkConfig = options.networkConfig; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = options.instanceId; - this.pluginRegistry = options.pluginRegistry; - this.prometheusExporter = - options.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - - this.prometheusExporter.startMetricsCollection(); - } - - public async deployContract( - req: DeployContractV1Request, - ): Promise { - // const { logLevel } = this.options; - - const wasm = req.wasmBuffer - ? { wasmBuffer: Buffer.from(req.wasmBuffer, "base64") } - : { wasmHash: req.wasmHash as string }; - - const response = await deployContract({ - ...wasm, - txInvocation: convertApiTransactionInvocationToStellarPlus( - req.transactionInvocation, - this.networkConfig, - ), - networkConfig: this.networkConfig, - fnLogPrefix: this.className, - }); - - this.prometheusExporter.addCurrentTransaction(); - return response; - } - - public async runSorobanTransaction( - req: RunSorobanTransactionRequest, - ): Promise { - const invokeArgs = { - ...req, - methodArgs: req.methodArgs ?? {}, - networkConfig: this.networkConfig, - readOnly: !!req.readOnly, - fnLogPrefix: this.className, - txInvocation: convertApiTransactionInvocationToStellarPlus( - req.transactionInvocation, - this.networkConfig, - ), - }; - - const result = - await invokeContract(invokeArgs); - - this.prometheusExporter.addCurrentTransaction(); - return { result } as RunSorobanTransactionResponse; - } - - public async transact( - req: RunSorobanTransactionRequest, - ): Promise { - return this.runSorobanTransaction(req); - } - - public async getConsensusAlgorithmFamily(): Promise { - throw new InternalServerError("Method not implemented."); - } - public async hasTransactionFinality(): Promise { - throw new InternalServerError("Method not implemented."); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public async onPluginInit(): Promise { - this.log.info("ENTER onPluginInit();"); - this.log.info("EXIT onPluginInit();"); - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - } - - async registerWebServices( - app: Express, - wsApi: SocketIoServer, - ): Promise { - const { logLevel } = this.options; - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - - wsApi.on("connection", (socket: SocketIoSocket) => { - this.log.debug(`New Socket connected. ID=${socket.id}`); - - socket.on(WatchBlocksV1.Subscribe, () => { - new WatchBlocksV1Endpoint({ socket, logLevel }).subscribe(); - }); - }); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new DeployContractEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new RunSorobanTransactionEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const opts: IGetPrometheusExporterMetricsEndpointV1Options = { - connector: this, - logLevel: this.options.logLevel, - }; - const endpoint = new GetPrometheusExporterMetricsEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const oasPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-open-api-spec" - ]; - - const operationId = oasPath.get.operationId; - const opts: IGetOpenApiSpecV1EndpointOptions = { - oas: OAS, - oasPath, - operationId, - path: oasPath.get["x-hyperledger-cacti"].http.path, - pluginRegistry: this.pluginRegistry, - verbLowerCase: oasPath.get["x-hyperledger-cacti"].http.verbLowerCase, - logLevel: this.options.logLevel, - }; - const endpoint = new GetOpenApiSpecV1Endpoint(opts); - endpoints.push(endpoint); - } - - this.endpoints = endpoints; - return endpoints; - } - - public getPackageName(): string { - return `@hyperledger/cacti-plugin-ledger-connector-stellar`; - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index 2392c7f762..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Transactions } from "./response.type"; - -import { totalTxCount, K_CACTUS_STELLAR_TOTAL_TX_COUNT } from "./metrics"; - -export async function collectMetrics( - transactions: Transactions, -): Promise { - transactions.counter++; - totalTxCount - .labels(K_CACTUS_STELLAR_TOTAL_TX_COUNT) - .set(transactions.counter); -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index dcf801d865..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_STELLAR_TOTAL_TX_COUNT = "cacti_stellar_total_tx_count"; - -export const totalTxCount = new Gauge({ - registers: [], - name: "cacti_stellar_total_tx_count", - help: "Total transactions executed", - labelNames: ["type"], -}); diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index b145708eee..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,39 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { Transactions } from "./response.type"; -import { collectMetrics } from "./data-fetcher"; -import { K_CACTUS_STELLAR_TOTAL_TX_COUNT } from "./metrics"; -import { totalTxCount } from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly transactions: Transactions = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public addCurrentTransaction(): void { - collectMetrics(this.transactions); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_STELLAR_TOTAL_TX_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalTxCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 3f1bc7f491..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type Transactions = { - counter: number; -}; diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/public-api.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/public-api.ts deleted file mode 100755 index 7f26048ad4..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/public-api.ts +++ /dev/null @@ -1,22 +0,0 @@ -export { - E_KEYCHAIN_NOT_FOUND, - IPluginLedgerConnectorStellarOptions, - PluginLedgerConnectorStellar, -} from "./plugin-ledger-connector-stellar"; -export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export { - StellarApiClient, - StellarApiClientOptions, -} from "./api-client/stellar-api-client"; - -export * from "./generated/openapi/typescript-axios/api"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/utils/index.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/utils/index.ts deleted file mode 100644 index 9141fe8b0d..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/utils/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { TransactionInvocation } from "stellar-plus/lib/stellar-plus/types"; -import { TransactionInvocation as RawTransactionInvocation } from "../generated/openapi/typescript-axios"; -import { DefaultAccountHandler } from "stellar-plus/lib/stellar-plus/account"; -import { NetworkConfig } from "stellar-plus/lib/stellar-plus/network"; -import { readFile } from "fs/promises"; - -export const convertApiTransactionInvocationToStellarPlus = ( - rawTransactionInvocation: RawTransactionInvocation, - networkConfig: NetworkConfig, -): TransactionInvocation => { - const header = { - ...rawTransactionInvocation.header, - fee: rawTransactionInvocation.header.fee.toString(), - }; - - const signers = rawTransactionInvocation.signers.map((signer) => { - return new DefaultAccountHandler({ - networkConfig, - secretKey: signer, - }); - }); - - return { - header, - signers, - }; -}; - -export const loadWasmFile = async (wasmFilePath: string): Promise => { - try { - const buffer = await readFile(wasmFilePath); - return buffer; - } catch (error) { - console.error(`Error reading the WASM file: ${error}`); - throw error; - } -}; diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/deploy-contract-endpoint.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/deploy-contract-endpoint.ts deleted file mode 100644 index 997bfa0ada..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/deploy-contract-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorStellar } from "../plugin-ledger-connector-stellar"; -import { DeployContractV1Request } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; - -export interface IDeployContractOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorStellar; -} - -export class DeployContractEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeployContractEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeployContractEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeployContractOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/deploy-contract"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/deploy-contract" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const { log } = this; - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody: DeployContractV1Request = req.body; - try { - const resBody = await this.options.connector.deployContract(reqBody); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to deploy contract:`; - await handleRestEndpointException({ errorMsg, log, error: ex, res }); - } - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/get-open-api-spec-v1-endpoint.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/get-open-api-spec-v1-endpoint.ts deleted file mode 100644 index 5e205aa192..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/get-open-api-spec-v1-endpoint.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { - GetOpenApiSpecV1EndpointBase, - IGetOpenApiSpecV1EndpointBaseOptions, -} from "@hyperledger/cactus-core"; - -import { Checks, LogLevelDesc } from "@hyperledger/cactus-common"; -import { IWebServiceEndpoint } from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -export const OasPathGetOpenApiSpecV1 = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-open-api-spec" - ]; - -export type OasPathTypeGetOpenApiSpecV1 = typeof OasPathGetOpenApiSpecV1; - -export interface IGetOpenApiSpecV1EndpointOptions - extends IGetOpenApiSpecV1EndpointBaseOptions< - typeof OAS, - OasPathTypeGetOpenApiSpecV1 - > { - readonly logLevel?: LogLevelDesc; -} - -export class GetOpenApiSpecV1Endpoint - extends GetOpenApiSpecV1EndpointBase - implements IWebServiceEndpoint -{ - public get className(): string { - return GetOpenApiSpecV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetOpenApiSpecV1EndpointOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts deleted file mode 100644 index 2e23e0bb51..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { PluginLedgerConnectorStellar } from "../plugin-ledger-connector-stellar"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - connector: PluginLedgerConnectorStellar; - logLevel?: LogLevelDesc; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - private readonly log: Logger; - - constructor( - public readonly options: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = "GetPrometheusExporterMetricsEndpointV1#constructor()"; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.connector, `${fnTag} options.connector`); - - const label = "get-prometheus-exporter-metrics-endpoint"; - const level = options.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ label, level }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetPrometheusExporterMetrics#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - const resBody = - await this.options.connector.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/run-soroban-transaction-endpoint.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/run-soroban-transaction-endpoint.ts deleted file mode 100644 index 25d0a5816d..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/run-soroban-transaction-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorStellar } from "../plugin-ledger-connector-stellar"; -import OAS from "../../json/openapi.json"; -import { RunSorobanTransactionRequest } from "../generated/openapi/typescript-axios"; - -export interface IRunSorobanTransactionOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorStellar; -} - -export class RunSorobanTransactionEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RunSorobanTransactionEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return RunSorobanTransactionEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IRunSorobanTransactionOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/run-soroban-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cacti-plugin-ledger-connector-stellar/run-soroban-transaction" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const { log } = this; - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody: RunSorobanTransactionRequest = req.body; - try { - const resBody = - await this.options.connector.runSorobanTransaction(reqBody); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to deploy contract:`; - await handleRestEndpointException({ errorMsg, log, error: ex, res }); - } - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts b/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts deleted file mode 100644 index 1a495e4025..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { Socket as SocketIoSocket } from "socket.io"; - -import { Logger, Checks } from "@hyperledger/cactus-common"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { WatchBlocksV1Progress } from "../generated/openapi/typescript-axios"; -import { WatchBlocksV1 } from "../generated/openapi/typescript-axios"; - -export interface IWatchBlocksV1EndpointOptions { - logLevel?: LogLevelDesc; - socket: SocketIoSocket; -} - -export class WatchBlocksV1Endpoint { - public static readonly CLASS_NAME = "WatchBlocksV1Endpoint"; - - private readonly log: Logger; - private readonly socket: SocketIoSocket< - Record void>, - Record void> - >; - - public get className(): string { - return WatchBlocksV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IWatchBlocksV1EndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.socket, `${fnTag} arg options.socket`); - - this.socket = options.socket; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public async subscribe(): Promise { - const { socket, log } = this; - log.debug(`${WatchBlocksV1.Subscribe} => ${socket.id}`); - log.error("FIXME - this is not yet implemented"); - } -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/.gitignore b/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/.gitignore deleted file mode 100644 index e5a98e3db1..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Rust's output directory -target - -# Local Soroban settings -.soroban - -# bindings -bindings \ No newline at end of file diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/Cargo.lock b/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/Cargo.lock deleted file mode 100644 index c4688bc2e2..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/Cargo.lock +++ /dev/null @@ -1,1493 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" -dependencies = [ - "derive_arbitrary", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base32" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "bytes-lit" -version = "0.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0adabf37211a5276e46335feabcbb1530c95eb3fdf85f324c7db942770aa025d" -dependencies = [ - "num-bigint", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "serde", - "windows-targets 0.48.5", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" -dependencies = [ - "libc", -] - -[[package]] -name = "crate-git-revision" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c521bf1f43d31ed2f73441775ed31935d77901cb3451e44b38a1c1612fcbaf98" -dependencies = [ - "serde", - "serde_derive", - "serde_json", -] - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "ctor" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "platforms", - "rustc_version", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "darling" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "derive_arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand_core", - "serde", - "sha2", - "zeroize", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "escape-bytes" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfcf67fea2815c2fc3b90873fae90957be12ff417335dfadc7f52927feb03b2" - -[[package]] -name = "ethnum" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core", - "subtle", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core", - "subtle", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "hello-world" -version = "2.0.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", - "serde", -] - -[[package]] -name = "indexmap-nostd" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" - -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "js-sys" -version = "0.3.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", - "signature", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "libc" -version = "0.2.151" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-derive" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "platforms" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "prettyplease" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "semver" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" - -[[package]] -name = "serde" -version = "1.0.192" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.192" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" -dependencies = [ - "base64 0.21.5", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.1.0", - "serde", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest", - "keccak", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest", - "rand_core", -] - -[[package]] -name = "smallvec" -version = "1.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" - -[[package]] -name = "soroban-builtin-sdk-macros" -version = "20.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc32c6e817f3ca269764ec0d7d14da6210b74a5bf14d4e745aa3ee860558900" -dependencies = [ - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "soroban-env-common" -version = "20.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c14e18d879c520ff82612eaae0590acaf6a7f3b977407e1abb1c9e31f94c7814" -dependencies = [ - "arbitrary", - "crate-git-revision", - "ethnum", - "num-derive", - "num-traits", - "serde", - "soroban-env-macros", - "soroban-wasmi", - "static_assertions", - "stellar-xdr", -] - -[[package]] -name = "soroban-env-guest" -version = "20.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5122ca2abd5ebcc1e876a96b9b44f87ce0a0e06df8f7c09772ddb58b159b7454" -dependencies = [ - "soroban-env-common", - "static_assertions", -] - -[[package]] -name = "soroban-env-host" -version = "20.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "114a0fa0d0cc39d0be16b1ee35b6e5f4ee0592ddcf459bde69391c02b03cf520" -dependencies = [ - "backtrace", - "curve25519-dalek", - "ed25519-dalek", - "getrandom", - "hex-literal", - "hmac", - "k256", - "num-derive", - "num-integer", - "num-traits", - "rand", - "rand_chacha", - "sha2", - "sha3", - "soroban-builtin-sdk-macros", - "soroban-env-common", - "soroban-wasmi", - "static_assertions", - "stellar-strkey", -] - -[[package]] -name = "soroban-env-macros" -version = "20.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13e3f8c86f812e0669e78fcb3eae40c385c6a9dd1a4886a1de733230b4fcf27" -dependencies = [ - "itertools", - "proc-macro2", - "quote", - "serde", - "serde_json", - "stellar-xdr", - "syn", -] - -[[package]] -name = "soroban-ledger-snapshot" -version = "20.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a54708f44890e0546180db6b4f530e2a88d83b05a9b38a131caa21d005e25a" -dependencies = [ - "serde", - "serde_json", - "serde_with", - "soroban-env-common", - "soroban-env-host", - "thiserror", -] - -[[package]] -name = "soroban-sdk" -version = "20.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84fc8be9068dd4e0212d8b13ad61089ea87e69ac212c262914503a961c8dc3a3" -dependencies = [ - "arbitrary", - "bytes-lit", - "ctor", - "ed25519-dalek", - "rand", - "serde", - "serde_json", - "soroban-env-guest", - "soroban-env-host", - "soroban-ledger-snapshot", - "soroban-sdk-macros", - "stellar-strkey", -] - -[[package]] -name = "soroban-sdk-macros" -version = "20.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db20def4ead836663633f58d817d0ed8e1af052c9650a04adf730525af85b964" -dependencies = [ - "crate-git-revision", - "darling", - "itertools", - "proc-macro2", - "quote", - "rustc_version", - "sha2", - "soroban-env-common", - "soroban-spec", - "soroban-spec-rust", - "stellar-xdr", - "syn", -] - -[[package]] -name = "soroban-spec" -version = "20.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eefeb5d373b43f6828145d00f0c5cc35e96db56a6671ae9614f84beb2711cab" -dependencies = [ - "base64 0.13.1", - "stellar-xdr", - "thiserror", - "wasmparser", -] - -[[package]] -name = "soroban-spec-rust" -version = "20.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3152bca4737ef734ac37fe47b225ee58765c9095970c481a18516a2b287c7a33" -dependencies = [ - "prettyplease", - "proc-macro2", - "quote", - "sha2", - "soroban-spec", - "stellar-xdr", - "syn", - "thiserror", -] - -[[package]] -name = "soroban-wasmi" -version = "0.31.1-soroban.20.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710403de32d0e0c35375518cb995d4fc056d0d48966f2e56ea471b8cb8fc9719" -dependencies = [ - "smallvec", - "spin", - "wasmi_arena", - "wasmi_core", - "wasmparser-nostd", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "stellar-strkey" -version = "0.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12d2bf45e114117ea91d820a846fd1afbe3ba7d717988fee094ce8227a3bf8bd" -dependencies = [ - "base32", - "crate-git-revision", - "thiserror", -] - -[[package]] -name = "stellar-xdr" -version = "20.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e59cdf3eb4467fb5a4b00b52e7de6dca72f67fac6f9b700f55c95a5d86f09c9d" -dependencies = [ - "arbitrary", - "base64 0.13.1", - "crate-git-revision", - "escape-bytes", - "hex", - "serde", - "serde_with", - "stellar-strkey", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "2.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3de26b0965292219b4287ff031fcba86837900fe9cd2b34ea8ad893c0953d2" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268026685b2be38d7103e9e507c938a1fcb3d7e6eb15e87870b617bf37b6d581" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" - -[[package]] -name = "wasmi_arena" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" - -[[package]] -name = "wasmi_core" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" -dependencies = [ - "downcast-rs", - "libm", - "num-traits", - "paste", -] - -[[package]] -name = "wasmparser" -version = "0.88.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8cf7dd82407fe68161bedcd57fde15596f32ebf6e9b3bdbf3ae1da20e38e5e" -dependencies = [ - "indexmap 1.9.3", -] - -[[package]] -name = "wasmparser-nostd" -version = "0.100.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" -dependencies = [ - "indexmap-nostd", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/Cargo.toml b/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/Cargo.toml deleted file mode 100644 index 0c3a329803..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[workspace] -resolver = "2" -members = [ - "contracts/*", -] - -[workspace.dependencies] -soroban-sdk = "20.3.2" - -[profile.release] -opt-level = "z" -overflow-checks = true -debug = 0 -strip = "symbols" -debug-assertions = false -panic = "abort" -codegen-units = 1 -lto = true - -# For more information about this profile see https://soroban.stellar.org/docs/basic-tutorials/logging#cargotoml-profile -[profile.release-with-logs] -inherits = "release" -debug-assertions = true diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/README.md b/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/README.md deleted file mode 100644 index 4b8cb577cb..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Hello World Soroban Project - -A demo project containing the source cofr for an implementation of a soroban smart contract and tests. - -## Requirements - -- Rust 1.74.0 or newer -- Soroban CLI 21.0.0-rc.1 or newer - -See the full setup at [Soroban's official documentation](https://developers.stellar.org/docs/smart-contracts/getting-started/setup). - -## Project initialization - -This project was initialized using the soroban-cli on version 21.0.0-rc.1 with the command below: - -```bash -soroban contract init demo-contract -``` - -For further details on how to start a new soroban smart contract projects, refer to the [official documentation](https://developers.stellar.org/docs/smart-contracts/getting-started). - -## Project Structure - -This repository uses the recommended structure for a Soroban project: - -```text -. -├── contracts -│   └── hello_world -│   ├── src -│   │   ├── lib.rs -│   │   └── test.rs -│   └── Cargo.toml -├── Cargo.toml -└── README.md -``` - -- New Soroban contracts can be put in `contracts`, each in their own directory. There is already a `hello_world` contract in there to get you started. -- If you initialized this project with any other example contracts via `--with-example`, those contracts will be in the `contracts` directory as well. -- Contracts should have their own `Cargo.toml` files that rely on the top-level `Cargo.toml` workspace for their dependencies. -- Frontend libraries can be added to the top-level directory as well. If you initialized this project with a frontend template via `--frontend-template` you will have those files already included. - -## Building the Contract - -To build the contract, run the following command: - -```bash -soroban contract build -``` - -The compiled file will be saved to `target/wasm32-unknown-unknown/release/hello_world.wasm`. - -## Testing - -The tests are present in the `src/test.rs` file and can be executed by running the following command: - -```bash -cargo test -``` - -## Ready-to-use assets - -Within this project's root directory one may find the following assets: - -- **hello_world.wasm** : A compiled WASM file of the code, ready to be uploaded to a Stellar network. -- **spec.ts** : A typescript file exporting useful objects for clients to interact with this contract. - - `spec`: spec array containing the contract specification encoded in XDR format. This spec can be extracted from compiled WASM contracts or by generating the contract bindings using the `soroban-cli`. - - `methods`: enum object containing the method names for the functions in the contract as they should be invoked. - - `Args`: Multiple types for the 'args' object to be structured to invoke that method. - - `Response`: Multiple types for the responses received from the contract invocations to that method. diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/Cargo.toml b/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/Cargo.toml deleted file mode 100644 index 1cd5463c89..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "hello-world" -version = "2.0.0" -edition = "2021" -publish = false - -[lib] -crate-type = ["cdylib"] -doctest = false - -[dependencies] -soroban-sdk = { workspace = true } - -[dev-dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/src/lib.rs b/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/src/lib.rs deleted file mode 100644 index 0a366afa1d..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/src/lib.rs +++ /dev/null @@ -1,134 +0,0 @@ -#![no_std] -use soroban_sdk::{contract, contractimpl, contracttype, symbol_short, token, vec, Address, Env, Symbol, Vec}; - -// -// Trait that defines the contract interface -// -pub trait HelloContractTrait { - // Function that returns a Symbol with the string "Hello, World!" - fn say_hello(env: Env) -> Symbol; - // Function that returns a Vec with the strings "Hello", and the - // name of the recipient provided in the argument `to`. - fn say_hello_to(env: Env, to: Symbol) -> Vec; - // Function that returns a Symbol with the string "CaptainCacti" - fn set_name(env: Env, name: Symbol); - // Function that sets the name provided in the argument `name` - // in the storage in a Vec with the key DataKey::Names - fn get_name(env: Env) -> Symbol; - // Function that returns the name at the index provided in the - // argument `index` from the Vec in the storage with the key DataKey::Names - fn get_name_by_index(env: Env, index: u32) -> Symbol; - // Function that performs a deposit of the asset_id provided in the argument `asset_id` - // with the amount provided in the argument `amount` from the address provided in the argument `from` - // to the contract address. - fn deposit(env: Env, from: Address, asset_id: Address, amount: i128); -} - - -// -// Enum that defines the storage keys -// -#[contracttype] -pub enum DataKey { - Names, // Vec of names - Balance(Address) // u64 balance for an address -} - -// -// Contract implementation -// -#[contract] -pub struct HelloContract; - -#[contractimpl] -impl HelloContractTrait for HelloContract { - - fn say_hello(env: Env) -> Symbol{ - // Return a new Symbol with the string "Hello, World!" - return Symbol::new(&env,"HelloWorld"); - } - - fn say_hello_to(env: Env, to: Symbol) -> Vec { - // Return a new Vec with the strings "Hello", and the - // name of the recipient provided in the argument `to`. - vec![&env, symbol_short!("Hello"), to] - } - - - fn get_name(env: Env) -> Symbol { - // Return a new Symbol with the string "CaptainCacti" - return Symbol::new(&env,"CaptainCacti"); - } - - fn set_name(env: Env, name: Symbol) { - // Attempts to read the current value for the - // Vec from the storage and unwrap it. - // If the value does not exist, it will return an empty Vec. - let mut names = env - .storage() - .instance() - .get::<_,Vec>(&DataKey::Names) - .unwrap_or(Vec::new(&env)); - - // Push the new name to the back of the Vec - names.push_back(name); - - // Set the new Vec in the storage for the key DataKey::Names - env.storage().instance().set(&DataKey::Names, &names); - } - - fn get_name_by_index(env: Env, index: u32) -> Symbol { - // Attempts to read the current value for the - // Vec from the storage and unwrap it. - // If the value does not exist, it will return an empty Vec. - let names = env - .storage() - .instance() - .get::<_,Vec>(&DataKey::Names) - .unwrap_or(Vec::new(&env)); - - // Attempt to get the name at the index provided in the argument `index`. - // If the index is out of bounds, it will return None. - let name = names.try_get(index).unwrap(); - - // If the name is None, return a new Symbol with the string "No name found" - if name.is_none() { - return Symbol::new(&env,"NotFound"); - } - // Since we know the name is not None, - // we can unwrap it safely and return it. - name.unwrap() - } - - fn deposit(env: Env, from: Address, asset_id: Address, amount: i128) { - - // Ensure the address provided in the argument `from` - // has authorized the contract to perform the deposit. - from.require_auth(); - - // Get the balance for the address provided in the argument `from` - // from the storage for the key DataKey::Balance - // If the balance does not exist, it will return 0. - let balance = env - .storage() - .instance() - .get::<_,i128>(&DataKey::Balance(from.clone())) - .unwrap_or(0); - - // Add the amount provided in the argument `amount` to the balance - let new_balance = balance + amount; - - // Set the new balance in the storage for the key DataKey::Balance - env.storage().instance().set(&DataKey::Balance(from.clone()), &new_balance); - - // Invoke the transfer function of the token contract with the id - // provided in the argument `asset_id`. If the transfer fails, it will panic - // and revert the transaction. - token::Client::new(&env, &asset_id).transfer( &from, &env.current_contract_address(), &amount) - - } - - -} - -mod test; diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/src/test.rs b/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/src/test.rs deleted file mode 100644 index 560320dda8..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/src/test.rs +++ /dev/null @@ -1,120 +0,0 @@ -#![cfg(test)] - - -use super::*; -use soroban_sdk::{ testutils::Address, Env}; -use token::StellarAssetClient; - -#[test] -fn test() { - // Create a new environment - let env = Env::default(); - - // Register the contract with the environment - let contract_id = env.register_contract(None, HelloContract); - - // Instantiate a new client for the contract - let client = HelloContractClient::new(&env, &contract_id); - - // Mock all authorizations for the subsequent calls - // This ensures we don't have to individually mock each authorization - env.mock_all_auths(); - - // ============================== - // Test the say_hello function - // ============================ - - // Use the client to call the say_hello function and store the result in the variable words - let output_say_hello = client.say_hello(); - - // Assert that the result is equal to the Symbol "HelloWorld" - assert_eq!(output_say_hello, Symbol::new(&env, "HelloWorld")); - - - // ============================== - // Test the say_hello_to function - // =============================== - - // Use the client to call the say_hello_to function with the argument "Alice" and store the result in the variable words - let output_say_hello_to = client.say_hello_to(&Symbol::new(&env, "Alice")); - - // Assert that the result is equal to the Vec ["Hello", "Alice"] - assert_eq!(output_say_hello_to, vec![&env, symbol_short!("Hello"), Symbol::new(&env, "Alice")]); - - // ============================== - // Test the get_name function - // =============================== - - // Use the client to call the get_name function and store the result in the variable name - let output_get_name = client.get_name(); - - // Assert that the result is equal to the Symbol "CaptainCacti" - assert_eq!(output_get_name, Symbol::new(&env, "CaptainCacti")); - - - // ============================== - // Test the set_name and get_name_by_index functions - // =============================== - - // Use the client to call the set_name function with the argument "Bob" - client.set_name(&Symbol::new(&env, "Bob")); - - // Use the client to call the get_name_by_index function with the argument 0 and store the result in the variable name - let output_get_name_by_index = client.get_name_by_index(&0); - - // Assert that the result is equal to the Symbol "Bob" - assert_eq!(output_get_name_by_index, Symbol::new(&env, "Bob")); - - // Use the client to call the set_name function with the argument "Charlie" - client.set_name(&Symbol::new(&env, "Charlie")); - - // Use the client to call the get_name_by_index function with the argument 1 and store the result in the variable name - let output_get_name_by_index = client.get_name_by_index(&1); - - // Assert that the result is equal to the Symbol "Charlie" - assert_eq!(output_get_name_by_index, Symbol::new(&env, "Charlie")); - - // Attempts to read a non-existent name at index 2 - // This should return an 'NotFound' Symbol - let output_get_name_by_index = client.get_name_by_index(&2); - - // Assert that the result is equal to the Symbol "NotFound" - assert_eq!(output_get_name_by_index, Symbol::new(&env, "NotFound")); - - - // ============================== - // Test the deposit function - // =============================== - - // Create a new account for the token contract admin - let admin = ::generate(&env); - - // instantiate a new token contract - let token_contract_id = env.register_stellar_asset_contract(admin); - - // instantiate a new token contract admin client for the token contract - // This client will be used to mint tokens for Alice - let admin_token_contract = StellarAssetClient::new(&env, &token_contract_id); - - // instantiate a new token contract client for the token contract - // This client will be used to check the balance of accounts - let token_contract = token::TokenClient::new(&env, &token_contract_id); - - // Create a new account for Alice - let alice = ::generate(&env); - - // Mint 1000 tokens for Alice - admin_token_contract.mint(&alice, &1000); - - // Use the client to call the deposit function with the - // arguments alice, token_contract_id, and 100. - // This will deposit 100 tokens from Alice to the contract. - client.deposit(&alice, &token_contract_id, &100); - - // Assert that the balance of the contract is 100 - assert_eq!(token_contract.balance(&contract_id), 100); - - // Assert that the balance of Alice is 900 - assert_eq!(token_contract.balance(&alice), 900); - -} diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/test_snapshots/test/test.1.json b/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/test_snapshots/test/test.1.json deleted file mode 100644 index 6eb0832c29..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/contracts/hello_world/test_snapshots/test/test.1.json +++ /dev/null @@ -1,1460 +0,0 @@ -{ - "generators": { - "address": 4, - "nonce": 0 - }, - "auth": [ - [], - [], - [], - [], - [], - [], - [], - [], - [ - [ - "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO6V", - { - "function": { - "contract_fn": { - "contract_address": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF", - "function_name": "set_admin", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - } - ] - } - }, - "sub_invocations": [] - } - ] - ], - [ - [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - { - "function": { - "contract_fn": { - "contract_address": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF", - "function_name": "mint", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - }, - { - "i128": { - "hi": 0, - "lo": 1000 - } - } - ] - } - }, - "sub_invocations": [] - } - ] - ], - [ - [ - "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", - { - "function": { - "contract_fn": { - "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "function_name": "deposit", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - }, - { - "address": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF" - }, - { - "i128": { - "hi": 0, - "lo": 100 - } - } - ] - } - }, - "sub_invocations": [ - { - "function": { - "contract_fn": { - "contract_address": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF", - "function_name": "transfer", - "args": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" - }, - { - "i128": { - "hi": 0, - "lo": 100 - } - } - ] - } - }, - "sub_invocations": [] - } - ] - } - ] - ], - [], - [] - ], - "ledger": { - "protocol_version": 20, - "sequence_number": 0, - "timestamp": 0, - "network_id": "0000000000000000000000000000000000000000000000000000000000000000", - "base_reserve": 0, - "min_persistent_entry_ttl": 4096, - "min_temp_entry_ttl": 16, - "max_entry_ttl": 6312000, - "ledger_entries": [ - [ - { - "account": { - "account_id": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO6V" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "account": { - "account_id": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO6V", - "balance": 0, - "seq_num": 0, - "num_sub_entries": 0, - "inflation_dest": null, - "flags": 0, - "home_domain": "", - "thresholds": "01010101", - "signers": [], - "ext": "v0" - } - }, - "ext": "v0" - }, - null - ] - ], - [ - { - "contract_data": { - "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO6V", - "key": { - "ledger_key_nonce": { - "nonce": 801925984706572462 - } - }, - "durability": "temporary" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "contract_data": { - "ext": "v0", - "contract": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO6V", - "key": { - "ledger_key_nonce": { - "nonce": 801925984706572462 - } - }, - "durability": "temporary", - "val": "void" - } - }, - "ext": "v0" - }, - 15 - ] - ], - [ - { - "contract_data": { - "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "key": "ledger_key_contract_instance", - "durability": "persistent" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "contract_data": { - "ext": "v0", - "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "key": "ledger_key_contract_instance", - "durability": "persistent", - "val": { - "contract_instance": { - "executable": { - "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - }, - "storage": [ - { - "key": { - "vec": [ - { - "symbol": "Balance" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - } - ] - }, - "val": { - "i128": { - "hi": 0, - "lo": 100 - } - } - }, - { - "key": { - "vec": [ - { - "symbol": "Names" - } - ] - }, - "val": { - "vec": [ - { - "symbol": "Bob" - }, - { - "symbol": "Charlie" - } - ] - } - } - ] - } - } - } - }, - "ext": "v0" - }, - 4095 - ] - ], - [ - { - "contract_data": { - "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "key": { - "ledger_key_nonce": { - "nonce": 5541220902715666415 - } - }, - "durability": "temporary" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "contract_data": { - "ext": "v0", - "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", - "key": { - "ledger_key_nonce": { - "nonce": 5541220902715666415 - } - }, - "durability": "temporary", - "val": "void" - } - }, - "ext": "v0" - }, - 15 - ] - ], - [ - { - "contract_data": { - "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", - "key": { - "ledger_key_nonce": { - "nonce": 1033654523790656264 - } - }, - "durability": "temporary" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "contract_data": { - "ext": "v0", - "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", - "key": { - "ledger_key_nonce": { - "nonce": 1033654523790656264 - } - }, - "durability": "temporary", - "val": "void" - } - }, - "ext": "v0" - }, - 15 - ] - ], - [ - { - "contract_data": { - "contract": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF", - "key": { - "vec": [ - { - "symbol": "Balance" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" - } - ] - }, - "durability": "persistent" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "contract_data": { - "ext": "v0", - "contract": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF", - "key": { - "vec": [ - { - "symbol": "Balance" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" - } - ] - }, - "durability": "persistent", - "val": { - "map": [ - { - "key": { - "symbol": "amount" - }, - "val": { - "i128": { - "hi": 0, - "lo": 100 - } - } - }, - { - "key": { - "symbol": "authorized" - }, - "val": { - "bool": true - } - }, - { - "key": { - "symbol": "clawback" - }, - "val": { - "bool": false - } - } - ] - } - } - }, - "ext": "v0" - }, - 518400 - ] - ], - [ - { - "contract_data": { - "contract": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF", - "key": { - "vec": [ - { - "symbol": "Balance" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - } - ] - }, - "durability": "persistent" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "contract_data": { - "ext": "v0", - "contract": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF", - "key": { - "vec": [ - { - "symbol": "Balance" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - } - ] - }, - "durability": "persistent", - "val": { - "map": [ - { - "key": { - "symbol": "amount" - }, - "val": { - "i128": { - "hi": 0, - "lo": 900 - } - } - }, - { - "key": { - "symbol": "authorized" - }, - "val": { - "bool": true - } - }, - { - "key": { - "symbol": "clawback" - }, - "val": { - "bool": false - } - } - ] - } - } - }, - "ext": "v0" - }, - 518400 - ] - ], - [ - { - "contract_data": { - "contract": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF", - "key": "ledger_key_contract_instance", - "durability": "persistent" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "contract_data": { - "ext": "v0", - "contract": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF", - "key": "ledger_key_contract_instance", - "durability": "persistent", - "val": { - "contract_instance": { - "executable": "stellar_asset", - "storage": [ - { - "key": { - "symbol": "METADATA" - }, - "val": { - "map": [ - { - "key": { - "symbol": "decimal" - }, - "val": { - "u32": 7 - } - }, - { - "key": { - "symbol": "name" - }, - "val": { - "string": "aaa:GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO6V" - } - }, - { - "key": { - "symbol": "symbol" - }, - "val": { - "string": "aaa" - } - } - ] - } - }, - { - "key": { - "vec": [ - { - "symbol": "Admin" - } - ] - }, - "val": { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - } - }, - { - "key": { - "vec": [ - { - "symbol": "AssetInfo" - } - ] - }, - "val": { - "vec": [ - { - "symbol": "AlphaNum4" - }, - { - "map": [ - { - "key": { - "symbol": "asset_code" - }, - "val": { - "string": "aaa\\0" - } - }, - { - "key": { - "symbol": "issuer" - }, - "val": { - "bytes": "0000000000000000000000000000000000000000000000000000000000000003" - } - } - ] - } - ] - } - } - ] - } - } - } - }, - "ext": "v0" - }, - 120960 - ] - ], - [ - { - "contract_code": { - "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "contract_code": { - "ext": "v0", - "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "code": "" - } - }, - "ext": "v0" - }, - 4095 - ] - ] - ] - }, - "events": [ - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "0000000000000000000000000000000000000000000000000000000000000001" - }, - { - "symbol": "say_hello" - } - ], - "data": "void" - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "say_hello" - } - ], - "data": { - "symbol": "HelloWorld" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "0000000000000000000000000000000000000000000000000000000000000001" - }, - { - "symbol": "say_hello_to" - } - ], - "data": { - "symbol": "Alice" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "say_hello_to" - } - ], - "data": { - "vec": [ - { - "symbol": "Hello" - }, - { - "symbol": "Alice" - } - ] - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "0000000000000000000000000000000000000000000000000000000000000001" - }, - { - "symbol": "get_name" - } - ], - "data": "void" - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "get_name" - } - ], - "data": { - "symbol": "CaptainCacti" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "0000000000000000000000000000000000000000000000000000000000000001" - }, - { - "symbol": "set_name" - } - ], - "data": { - "symbol": "Bob" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "set_name" - } - ], - "data": "void" - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "0000000000000000000000000000000000000000000000000000000000000001" - }, - { - "symbol": "get_name_by_index" - } - ], - "data": { - "u32": 0 - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "get_name_by_index" - } - ], - "data": { - "symbol": "Bob" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "0000000000000000000000000000000000000000000000000000000000000001" - }, - { - "symbol": "set_name" - } - ], - "data": { - "symbol": "Charlie" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "set_name" - } - ], - "data": "void" - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "0000000000000000000000000000000000000000000000000000000000000001" - }, - { - "symbol": "get_name_by_index" - } - ], - "data": { - "u32": 1 - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "get_name_by_index" - } - ], - "data": { - "symbol": "Charlie" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "0000000000000000000000000000000000000000000000000000000000000001" - }, - { - "symbol": "get_name_by_index" - } - ], - "data": { - "u32": 2 - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "get_name_by_index" - } - ], - "data": { - "symbol": "NotFound" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4" - }, - { - "symbol": "init_asset" - } - ], - "data": { - "bytes": "0000000161616100000000000000000000000000000000000000000000000000000000000000000000000003" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "init_asset" - } - ], - "data": "void" - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4" - }, - { - "symbol": "set_admin" - } - ], - "data": { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4", - "type_": "contract", - "body": { - "v0": { - "topics": [ - { - "symbol": "set_admin" - }, - { - "address": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO6V" - }, - { - "string": "aaa:GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO6V" - } - ], - "data": { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "set_admin" - } - ], - "data": "void" - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4" - }, - { - "symbol": "mint" - } - ], - "data": { - "vec": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - }, - { - "i128": { - "hi": 0, - "lo": 1000 - } - } - ] - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4", - "type_": "contract", - "body": { - "v0": { - "topics": [ - { - "symbol": "mint" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - }, - { - "string": "aaa:GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO6V" - } - ], - "data": { - "i128": { - "hi": 0, - "lo": 1000 - } - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "mint" - } - ], - "data": "void" - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "0000000000000000000000000000000000000000000000000000000000000001" - }, - { - "symbol": "deposit" - } - ], - "data": { - "vec": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - }, - { - "address": "CBUSYNQKASUYFWYC3M2GUEDMX4AIVWPALDBYJPNK6554BREHTGZ2IUNF" - }, - { - "i128": { - "hi": 0, - "lo": 100 - } - } - ] - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4" - }, - { - "symbol": "transfer" - } - ], - "data": { - "vec": [ - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" - }, - { - "i128": { - "hi": 0, - "lo": 100 - } - } - ] - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4", - "type_": "contract", - "body": { - "v0": { - "topics": [ - { - "symbol": "transfer" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - }, - { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" - }, - { - "string": "aaa:GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO6V" - } - ], - "data": { - "i128": { - "hi": 0, - "lo": 100 - } - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "transfer" - } - ], - "data": "void" - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "0000000000000000000000000000000000000000000000000000000000000001", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "deposit" - } - ], - "data": "void" - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4" - }, - { - "symbol": "balance" - } - ], - "data": { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "balance" - } - ], - "data": { - "i128": { - "hi": 0, - "lo": 100 - } - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": null, - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_call" - }, - { - "bytes": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4" - }, - { - "symbol": "balance" - } - ], - "data": { - "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4" - } - } - } - }, - "failed_call": false - }, - { - "event": { - "ext": "v0", - "contract_id": "692c360a04a982db02db346a106cbf008ad9e058c384bdaaf77bc0c48799b3a4", - "type_": "diagnostic", - "body": { - "v0": { - "topics": [ - { - "symbol": "fn_return" - }, - { - "symbol": "balance" - } - ], - "data": { - "i128": { - "hi": 0, - "lo": 900 - } - } - } - } - }, - "failed_call": false - } - ] -} \ No newline at end of file diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/hello_world.wasm b/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/hello_world.wasm deleted file mode 100755 index b101e330e9..0000000000 Binary files a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/hello_world.wasm and /dev/null differ diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/spec.ts b/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/spec.ts deleted file mode 100644 index 057e1856e9..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/spec.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* eslint-disable */ - -// spell-checker:disable -export const spec = [ - "AAAAAgAAAAAAAAAAAAAAB0RhdGFLZXkAAAAAAgAAAAAAAAAAAAAABU5hbWVzAAAAAAAAAQAAAAAAAAAHQmFsYW5jZQAAAAABAAAAEw==", - "AAAAAAAAAAAAAAAJc2F5X2hlbGxvAAAAAAAAAAAAAAEAAAAR", - "AAAAAAAAAAAAAAAMc2F5X2hlbGxvX3RvAAAAAQAAAAAAAAACdG8AAAAAABEAAAABAAAD6gAAABE=", - "AAAAAAAAAAAAAAAIZ2V0X25hbWUAAAAAAAAAAQAAABE=", - "AAAAAAAAAAAAAAAIc2V0X25hbWUAAAABAAAAAAAAAARuYW1lAAAAEQAAAAA=", - "AAAAAAAAAAAAAAARZ2V0X25hbWVfYnlfaW5kZXgAAAAAAAABAAAAAAAAAAVpbmRleAAAAAAAAAQAAAABAAAAEQ==", - "AAAAAAAAAAAAAAAHZGVwb3NpdAAAAAADAAAAAAAAAARmcm9tAAAAEwAAAAAAAAAIYXNzZXRfaWQAAAATAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAA", -]; -// spell-checker:enable - -export enum methods { - sayHello = "say_hello", - sayHelloTo = "say_hello_to", - getName = "get_name", - setName = "set_name", - getNameByIndex = "get_name_by_index", - deposit = "deposit", -} - -export type SayHelloArgs = {}; -export type SayHelloToArgs = { to: string }; -export type GetNameArgs = {}; -export type SetNameArgs = { name: string }; -export type GetNameByIndexArgs = { index: number }; -export type DepositArgs = { from: string; asset_id: string; amount: number }; - -export type SayHelloResponse = string; -export type SayHelloToResponse = string[]; -export type GetNameResponse = string; -export type SetNameResponse = null; -export type GetNameByIndexResponse = string; -export type DepositResponse = null; diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/api-surface.test.ts b/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/deploy-contract/index.test.ts b/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/deploy-contract/index.test.ts deleted file mode 100644 index 4084563ba3..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/deploy-contract/index.test.ts +++ /dev/null @@ -1,240 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { StellarTestLedger } from "@hyperledger/cactus-test-tooling"; -import { Network } from "stellar-plus/lib/stellar-plus"; -import { NetworkConfig } from "stellar-plus/lib/stellar-plus/network"; -import { pluginName } from ".."; -import { PluginFactoryLedgerConnector } from "../../../../../main/typescript/plugin-factory-ledger-connector"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import { PluginLedgerConnectorStellar } from "../../../../../main/typescript/plugin-ledger-connector-stellar"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { v4 as uuidV4 } from "uuid"; -import { loadWasmFile } from "../../../../../main/typescript/utils"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { - StellarApiClient, - StellarApiClientOptions, -} from "../../../../../main/typescript/api-client/stellar-api-client"; -import { DefaultAccountHandler } from "stellar-plus/lib/stellar-plus/account"; -import { K_CACTUS_STELLAR_TOTAL_TX_COUNT } from "../../../../../main/typescript/prometheus-exporter/metrics"; - -const testCaseName = pluginName + " / deploys contracts"; -const deployContractFnTag = `PluginLedgerConnectorStellar#deployContract()`; - -describe(testCaseName, () => { - const logLevel: LogLevelDesc = "TRACE"; - const stellarTestLedger = new StellarTestLedger({ logLevel }); - let networkConfig: NetworkConfig; - let wasmBuffer: Buffer; - let connector: PluginLedgerConnectorStellar; - let server: http.Server; - let apiClient: StellarApiClient; - const contractIdPattern = /^C[A-Z0-9]{55}$/; - const wasmHashPattern = /^[a-f0-9]{64}$/; - - beforeAll(async () => { - // Load the WASM file for the - // `hello_world`example contract. - wasmBuffer = await loadWasmFile( - "./packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/hello_world.wasm", - ); - expect(wasmBuffer).toBeDefined(); - - await stellarTestLedger.start(); - networkConfig = Network.CustomNet( - await stellarTestLedger.getNetworkConfiguration(), - ); - - expect(networkConfig.horizonUrl).toBeDefined(); - expect(networkConfig.networkPassphrase).toBeDefined(); - expect(networkConfig.rpcUrl).toBeDefined(); - expect(networkConfig.friendbotUrl).toBeDefined(); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - connector = await factory.create({ - networkConfig, - pluginRegistry: new PluginRegistry({}), - instanceId: uuidV4(), - }); - - await connector.onPluginInit(); - - expect(connector).toBeInstanceOf(PluginLedgerConnectorStellar); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - console.log( - `Metrics URL: ${apiHost}/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics`, - ); - const stellarApiClientOptions = new StellarApiClientOptions({ - basePath: apiHost, - }); - apiClient = new StellarApiClient(stellarApiClientOptions); - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }); - - afterAll(async () => { - await stellarTestLedger.stop(); - await stellarTestLedger.destroy(); - await Servers.shutdown(server); - }); - - describe("core features", () => { - it("should deploy a contract to the ledger with just the WASM file", async () => { - const deployerAccount = new DefaultAccountHandler({ networkConfig }); - await deployerAccount.initializeWithFriendbot(); - - const res = await connector.deployContract({ - wasmBuffer: wasmBuffer.toString("base64"), - transactionInvocation: { - header: { - source: deployerAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [deployerAccount.getSecretKey()], - }, - }); - - expect(res).toBeDefined(); - expect(res.contractId).toMatch(contractIdPattern); - expect(res.wasmHash).toMatch(wasmHashPattern); - }); - - it("should deploy a contract to the ledger using the WASM hash of a previously deployed contract", async () => { - const deployerAccount = new DefaultAccountHandler({ networkConfig }); - await deployerAccount.initializeWithFriendbot(); - const responseFromDeployedWasm = await connector.deployContract({ - wasmBuffer: wasmBuffer.toString("base64"), - transactionInvocation: { - header: { - source: deployerAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [deployerAccount.getSecretKey()], - }, - }); - const { contractId, wasmHash } = responseFromDeployedWasm; - - const responseFromDeployedWasmHash = await connector.deployContract({ - wasmHash, - transactionInvocation: { - header: { - source: deployerAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [deployerAccount.getSecretKey()], - }, - }); - - expect(responseFromDeployedWasmHash).toBeDefined(); - expect(responseFromDeployedWasmHash.wasmHash).toMatch(wasmHashPattern); - expect(responseFromDeployedWasmHash.wasmHash).toBe(wasmHash); - expect(responseFromDeployedWasmHash.contractId).toMatch( - contractIdPattern, - ); - expect(responseFromDeployedWasmHash.contractId).not.toBe(contractId); - }); - }); - - describe("Error handling", () => { - it("should throw if the wasm upload fails", async () => { - const deployerAccount = new DefaultAccountHandler({ networkConfig }); - await deployerAccount.initializeWithFriendbot(); - - await expect( - connector.deployContract({ - wasmBuffer: wasmBuffer.toString("base64"), - transactionInvocation: { - header: { - source: "MOCKED_PK", - fee: 100, - timeout: 30, - }, - signers: [deployerAccount.getSecretKey()], - }, - }), - ).rejects.toThrow(`${deployContractFnTag} Failed to upload wasm.`); - }); - - it("should throw if the wasmHash deploy fails", async () => { - const deployerAccount = new DefaultAccountHandler({ networkConfig }); - await deployerAccount.initializeWithFriendbot(); - const responseFromDeployedWasm = await connector.deployContract({ - wasmBuffer: wasmBuffer.toString("base64"), - transactionInvocation: { - header: { - source: deployerAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [deployerAccount.getSecretKey()], - }, - }); - const wasmHash = responseFromDeployedWasm.wasmHash; - - await expect( - connector.deployContract({ - wasmHash, - transactionInvocation: { - header: { - source: "MOCKED_PK", - fee: 100, - timeout: 30, - }, - signers: [deployerAccount.getSecretKey()], - }, - }), - ).rejects.toThrow(`${deployContractFnTag} Failed to deploy contract.`); - }); - }); - - describe("Prometheus", () => { - it("should provide transaction metrics", async () => { - const promMetricsOutput = - "# HELP " + - K_CACTUS_STELLAR_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTUS_STELLAR_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTUS_STELLAR_TOTAL_TX_COUNT + - '{type="' + - K_CACTUS_STELLAR_TOTAL_TX_COUNT + - '"} 4'; - - const res = await apiClient.getPrometheusMetricsV1(); - - expect(res).toBeDefined(); - expect(res.data.includes(promMetricsOutput)).toBe(true); - }); - }); -}); diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/index.ts b/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/index.ts deleted file mode 100644 index cbad399324..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const pluginName = "plugin-ledger-connector-stellar"; diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/run-soroban-transaction/index.test.ts b/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/run-soroban-transaction/index.test.ts deleted file mode 100644 index f4338040ec..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/run-soroban-transaction/index.test.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { AddressInfo } from "net"; -import { pluginName } from ".."; -import { - StellarApiClient, - StellarApiClientOptions, -} from "../../../../../main/typescript/api-client/stellar-api-client"; -import { - IListenOptions, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginFactoryLedgerConnector } from "../../../../../main/typescript/plugin-factory-ledger-connector"; -import { loadWasmFile } from "../../../../../main/typescript/utils"; -import { StellarTestLedger } from "@hyperledger/cactus-test-tooling"; -import { NetworkConfig } from "stellar-plus/lib/stellar-plus/network"; -import { PluginLedgerConnectorStellar } from "../../../../../main/typescript/plugin-ledger-connector-stellar"; -import http from "http"; -import { Network } from "stellar-plus/lib/stellar-plus"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import { v4 as uuidV4 } from "uuid"; -import express from "express"; -import { Server as SocketIoServer } from "socket.io"; -import bodyParser from "body-parser"; -import { DefaultAccountHandler } from "stellar-plus/lib/stellar-plus/account"; -import { K_CACTUS_STELLAR_TOTAL_TX_COUNT } from "../../../../../main/typescript/prometheus-exporter/metrics"; -import { - GetNameArgs, - GetNameByIndexArgs, - SayHelloArgs, - SayHelloToArgs, - SayHelloToResponse, - SetNameArgs, - spec as helloWorldSpec, - methods, -} from "../../../../rust/demo-contract/spec"; - -const testCaseName = pluginName + " / run soroban transactions"; -const runSorobanTransactionFnTag = `PluginLedgerConnectorStellar#invokeContract()`; - -describe(testCaseName, () => { - const logLevel: LogLevelDesc = "TRACE"; - const stellarTestLedger = new StellarTestLedger({ logLevel }); - let networkConfig: NetworkConfig; - let wasmBuffer: Buffer; - let connector: PluginLedgerConnectorStellar; - let server: http.Server; - let apiClient: StellarApiClient; - const contractIdPattern = /^C[A-Z0-9]{55}$/; - const wasmHashPattern = /^[a-f0-9]{64}$/; - - beforeAll(async () => { - // Load the WASM file for the - // `hello_world`example contract. - wasmBuffer = await loadWasmFile( - "./packages/cacti-plugin-ledger-connector-stellar/src/test/rust/demo-contract/hello_world.wasm", - ); - expect(wasmBuffer).toBeDefined(); - - await stellarTestLedger.start(); - networkConfig = Network.CustomNet( - await stellarTestLedger.getNetworkConfiguration(), - ); - - expect(networkConfig.horizonUrl).toBeDefined(); - expect(networkConfig.networkPassphrase).toBeDefined(); - expect(networkConfig.rpcUrl).toBeDefined(); - expect(networkConfig.friendbotUrl).toBeDefined(); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - connector = await factory.create({ - networkConfig, - pluginRegistry: new PluginRegistry({}), - instanceId: uuidV4(), - }); - - await connector.onPluginInit(); - - expect(connector).toBeInstanceOf(PluginLedgerConnectorStellar); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - console.log( - `Metrics URL: ${apiHost}/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics`, - ); - const stellarApiClientOptions = new StellarApiClientOptions({ - basePath: apiHost, - }); - apiClient = new StellarApiClient(stellarApiClientOptions); - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }); - - afterAll(async () => { - await stellarTestLedger.stop(); - await stellarTestLedger.destroy(); - await Servers.shutdown(server); - }); - - describe("before deploy", () => { - it("should fail to invoke a contract Id that isn't deployed yet", async () => { - const invokerAccount = new DefaultAccountHandler({ networkConfig }); - await invokerAccount.initializeWithFriendbot(); - - await expect( - connector.runSorobanTransaction({ - contractId: - "CBHYOXSMPOW7PF7OGDCOSMZT45356INSNX4DGWDRUAMTAZMZ5DXZEAAU", - method: methods.sayHello, - methodArgs: {} as SayHelloArgs, - specXdr: helloWorldSpec, - readOnly: false, - transactionInvocation: { - header: { - source: invokerAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [invokerAccount.getSecretKey()], - }, - }), - ).rejects.toThrow( - `${runSorobanTransactionFnTag} Failed to invoke contract. `, - ); - }); - - it("should fail to read from a contract Id that isn't deployed yet", async () => { - const invokerAccount = new DefaultAccountHandler({ networkConfig }); - await invokerAccount.initializeWithFriendbot(); - - await expect( - connector.runSorobanTransaction({ - contractId: - "CBHYOXSMPOW7PF7OGDCOSMZT45356INSNX4DGWDRUAMTAZMZ5DXZEAAU", - method: methods.sayHello, - methodArgs: {} as SayHelloArgs, - specXdr: helloWorldSpec, - readOnly: true, - transactionInvocation: { - header: { - source: invokerAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [invokerAccount.getSecretKey()], - }, - }), - ).rejects.toThrow( - `${runSorobanTransactionFnTag} Failed to read contract. `, - ); - }); - }); - - describe("after deploy", () => { - let contractId: string; - let adminAccount: DefaultAccountHandler; - - beforeAll(async () => { - const deployerAccount = new DefaultAccountHandler({ networkConfig }); - await deployerAccount.initializeWithFriendbot(); - - const res = await connector.deployContract({ - wasmBuffer: wasmBuffer.toString("base64"), - transactionInvocation: { - header: { - source: deployerAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [deployerAccount.getSecretKey()], - }, - }); - - adminAccount = new DefaultAccountHandler({ networkConfig }); - - expect(res).toBeDefined(); - expect(res.contractId).toMatch(contractIdPattern); - expect(res.wasmHash).toMatch(wasmHashPattern); - await expect( - adminAccount.initializeWithFriendbot(), - ).resolves.toBeUndefined(); - - contractId = res.contractId as string; - }); - - it("should not submit a failing transaction", async () => { - // Try to invoke a method with the wrong args - await expect( - connector.runSorobanTransaction({ - contractId, - method: methods.sayHelloTo, - methodArgs: { - index: 0, - } as GetNameByIndexArgs, - specXdr: helloWorldSpec, - readOnly: false, - transactionInvocation: { - header: { - source: adminAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [adminAccount.getSecretKey()], - }, - }), - ).rejects.toThrow( - `${runSorobanTransactionFnTag} Failed to invoke contract. `, - ); - }); - - it("should invoke a contract function to alter the ledger state", async () => { - const res = await connector.runSorobanTransaction({ - contractId, - method: methods.setName, - methodArgs: { - name: "Fifo", - } as SetNameArgs, - specXdr: helloWorldSpec, - readOnly: false, - transactionInvocation: { - header: { - source: adminAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [adminAccount.getSecretKey()], - }, - }); - - expect(res).toBeDefined(); - expect(res).toHaveProperty("result"); - }); - - it("should invoke a contract function and return the output", async () => { - const res = await connector.runSorobanTransaction({ - contractId, - method: methods.getName, - methodArgs: {} as GetNameArgs, - specXdr: helloWorldSpec, - readOnly: false, - transactionInvocation: { - header: { - source: adminAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [adminAccount.getSecretKey()], - }, - }); - - expect(res).toBeDefined(); - expect(res).toHaveProperty("result"); - expect(res.result).toEqual("CaptainCacti"); - }); - - it("should simulate a contract function invocation to read a state from the ledger", async () => { - const expected = ["Hello", "Fifo"] as SayHelloToResponse; - - const res = await connector.runSorobanTransaction({ - contractId, - method: methods.sayHelloTo, - methodArgs: { - to: "Fifo", - } as SayHelloToArgs, - specXdr: helloWorldSpec, - readOnly: true, - transactionInvocation: { - header: { - source: adminAccount.getPublicKey(), - fee: 100, - timeout: 30, - }, - signers: [adminAccount.getSecretKey()], - }, - }); - expect(res).toBeDefined(); - expect(res).toHaveProperty("result"); - expect(res.result).toEqual(expected); - }); - }); - - describe("Prometheus", () => { - it("should provide transaction metrics", async () => { - const promMetricsOutput = - "# HELP " + - K_CACTUS_STELLAR_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTUS_STELLAR_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTUS_STELLAR_TOTAL_TX_COUNT + - '{type="' + - K_CACTUS_STELLAR_TOTAL_TX_COUNT + - '"} 4'; - - const res = await apiClient.getPrometheusMetricsV1(); - - expect(res).toBeDefined(); - expect(res.data.includes(promMetricsOutput)).toBe(true); - }); - }); -}); diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/validate-test-ledger.test.ts b/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/validate-test-ledger.test.ts deleted file mode 100644 index 7879b1b154..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/integration/plugin-ledger-connector-stellar/validate-test-ledger.test.ts +++ /dev/null @@ -1,67 +0,0 @@ -import "jest-extended"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { Network } from "stellar-plus/lib/stellar-plus"; -import { DefaultAccountHandler } from "stellar-plus/lib/stellar-plus/account"; -import { ClassicAssetHandler } from "stellar-plus/lib/stellar-plus/asset"; -import { TransactionInvocation } from "stellar-plus/lib/stellar-plus/types"; -import { NetworkConfig } from "stellar-plus/lib/stellar-plus/network"; -import { StellarTestLedger } from "@hyperledger/cactus-test-tooling"; - -describe("PluginLedgerConnectorStellar", () => { - const logLevel: LogLevelDesc = "TRACE"; - const stellarTestLedger = new StellarTestLedger({ logLevel }); - let networkConfig: NetworkConfig; - - beforeAll(async () => { - await stellarTestLedger.start(); - networkConfig = Network.CustomNet( - await stellarTestLedger.getNetworkConfiguration(), - ); - }); - - afterAll(async () => { - await stellarTestLedger.stop(); - await stellarTestLedger.destroy(); - }); - - test("can initialize an account with 10k XLM", async () => { - const XLM = new ClassicAssetHandler({ - code: "XLM", - networkConfig, - }); - const stellarAccount = new DefaultAccountHandler({ networkConfig }); - - await stellarAccount.initializeWithFriendbot(); - - expect(await XLM.balance(stellarAccount.getPublicKey())).toBe(10000); - }); - - test("can perform classic transactions", async () => { - const XLM = new ClassicAssetHandler({ - code: "XLM", - networkConfig, - }); - const accountA = new DefaultAccountHandler({ networkConfig }); - const accountB = new DefaultAccountHandler({ networkConfig }); - const txInvocation: TransactionInvocation = { - header: { - source: accountA.getPublicKey(), - fee: "100", - timeout: 30, - }, - signers: [accountA], - }; - await accountA.initializeWithFriendbot(); - await accountB.initializeWithFriendbot(); - - await XLM.transfer({ - from: accountA.getPublicKey(), - to: accountB.getPublicKey(), - amount: 1000, - ...txInvocation, - }); - - expect(await XLM.balance(accountA.getPublicKey())).toBe(8999.99999); //original balance minus 1k minus fee - expect(await XLM.balance(accountB.getPublicKey())).toBe(11000); - }); -}); diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/unit/api-surface.test.ts b/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/unit/get-open-api-spec-v1-connector-stellar.test.ts b/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/unit/get-open-api-spec-v1-connector-stellar.test.ts deleted file mode 100644 index 86f917c726..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/src/test/typescript/unit/get-open-api-spec-v1-connector-stellar.test.ts +++ /dev/null @@ -1,88 +0,0 @@ -// FIXME - uncomment this once we have the public-api.ts exports uncommented. - -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import bodyParser from "body-parser"; -import express from "express"; -import http from "http"; -import "jest-extended"; -import { AddressInfo } from "net"; -import { Server as SocketIoServer } from "socket.io"; -import { v4 as uuidv4 } from "uuid"; -import { - StellarApiClient, - StellarApiClientOptions, - PluginFactoryLedgerConnector, - PluginLedgerConnectorStellar, -} from "../../../main/typescript/public-api"; -import { TestNet } from "stellar-plus/lib/stellar-plus/network"; - -describe(__filename, () => { - const logLevel: LogLevelDesc = "INFO"; - - const log = LoggerProvider.getOrCreate({ - label: __filename, - level: logLevel, - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - let apiClient: StellarApiClient; - - afterAll(async () => { - await Servers.shutdown(server); - }); - - beforeAll(async () => { - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const connector: PluginLedgerConnectorStellar = await factory.create({ - networkConfig: TestNet(), - logLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [] }), - }); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - await connector.registerWebServices(expressApp, wsApi); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const stellarApiClientOptions = new StellarApiClientOptions({ - basePath: apiHost, - }); - apiClient = new StellarApiClient(stellarApiClientOptions); - log.debug("Instantiated StellarApiClient OK"); - }); - - it("Returns a JSON document containing the Open API specification of the plugin.", async () => { - const res1Promise = apiClient.getOpenApiSpecV1(); - await expect(res1Promise).resolves.not.toThrow(); - const res1 = await res1Promise; - expect(res1.status).toEqual(200); - expect(res1.data).toBeTruthy(); - expect(res1.config).toBeTruthy(); - expect(res1.config.url).toBeString(); - log.debug("Fetched URL OK=%s", res1.config.url); - expect(res1.data).toBeObject(); - }); -}); diff --git a/packages/cacti-plugin-ledger-connector-stellar/tsconfig.json b/packages/cacti-plugin-ledger-connector-stellar/tsconfig.json deleted file mode 100644 index 0fc75b46d7..0000000000 --- a/packages/cacti-plugin-ledger-connector-stellar/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cacti-plugin-ledger-connector-stellar.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cacti-plugin-weaver-driver-fabric/CHANGELOG.md b/packages/cacti-plugin-weaver-driver-fabric/CHANGELOG.md deleted file mode 100644 index 44fbcf6b46..0000000000 --- a/packages/cacti-plugin-weaver-driver-fabric/CHANGELOG.md +++ /dev/null @@ -1,30 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-weaver-driver-fabric - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-weaver-driver-fabric - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-weaver-driver-fabric - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-weaver-driver-fabric - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -**Note:** Version bump only for package @hyperledger/cacti-plugin-weaver-driver-fabric - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Features - -* **fabric-driver:** added weaver fabric driver as cacti plugin package ([36b8470](https://github.com/hyperledger/cacti/commit/36b8470f8a159bcb16c5ef62074aee2ff99758eb)) diff --git a/packages/cacti-plugin-weaver-driver-fabric/package.json b/packages/cacti-plugin-weaver-driver-fabric/package.json deleted file mode 100644 index c365cf17b6..0000000000 --- a/packages/cacti-plugin-weaver-driver-fabric/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "@hyperledger/cacti-plugin-weaver-driver-fabric", - "version": "2.0.0", - "description": "Driver Server for communication with a Fabric Network as part of weaver data sharing protocol", - "keywords": [ - "Hyperledger", - "cacti", - "Integration", - "Blockchain", - "Distributed Ledger Technology", - "Weaver" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Venkatraman Ramakrishna", - "email": "vramakr2@in.ibm.com", - "url": "https://researcher.watson.ibm.com/researcher/view.php?person=in-vramakr2" - }, - { - "name": "Sandeep Nishad", - "email": "sandeep.nishad1@ibm.com", - "url": "https://github.com/sandeepnRES" - }, - { - "name": "Krishnasuri Narayanam", - "email": "knaraya3@in.ibm.com", - "url": "https://research.ibm.com/people/krishnasuri-narayanam" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "build": "cd src/main/typescript && make build", - "build-image": "cd src/main/typescript && make build-image", - "build-image-local": "cd src/main/typescript && make build-image-local", - "build-local": "cd src/main/typescript && make build-local", - "clean": "cd src/main/typescript && make clean", - "clean-local": "cd src/main/typescript && make clean-local", - "publish": "cd src/main/typescript && make push-image && make push-image-latest", - "postpublish": "cd src/main/typescript && make push-image-latest", - "watch": "npm-watch" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cacti-weaver-driver-fabric.web.umd.min.js", - "mainMinified": "dist/cacti-weaver-driver-fabric.node.umd.min.js", - "watch": {} -} diff --git a/packages/cacti-plugin-weaver-driver-fabric/readme.md b/packages/cacti-plugin-weaver-driver-fabric/readme.md deleted file mode 100644 index 59375fa6db..0000000000 --- a/packages/cacti-plugin-weaver-driver-fabric/readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Cacti Fabric-Driver - -The term "driver" has been used in Weaver parlance, and is synonymous with "connector" as used in Cactus (and not in Cacti). Both terms refer to a module with an interface and functions to "connect" to a ledger of a given DLT type and "drive" transactions through that ledger for querying and state update purposes whenever required in the context of a cross-network transaction. -There are some distinctive features of the Weaver Fabric driver that are not covered by the Cactus Fabric connector package, which is why the two continue to co-exist at this time. Our goal is to eventually merge them into a single connector/driver package that offers both the distinctive and overlapping features of both the existing packages. - -For detailed information about fabric driver visit [here](src/main/typescript/readme.md). - -To use fabric-driver in your application please refer [documentation](https://hyperledger-cacti.github.io/cacti/weaver/getting-started/guide/). - - diff --git a/packages/cacti-plugin-weaver-driver-fabric/src/main/typescript b/packages/cacti-plugin-weaver-driver-fabric/src/main/typescript deleted file mode 120000 index 34419c8b22..0000000000 --- a/packages/cacti-plugin-weaver-driver-fabric/src/main/typescript +++ /dev/null @@ -1 +0,0 @@ -../../../../weaver/core/drivers/fabric-driver \ No newline at end of file diff --git a/packages/cactus-api-client/.gitignore b/packages/cactus-api-client/.gitignore deleted file mode 100644 index 16ebfe87b0..0000000000 --- a/packages/cactus-api-client/.gitignore +++ /dev/null @@ -1 +0,0 @@ -src/main/typescript/generated/openapi/typescript-axios/.npmignore \ No newline at end of file diff --git a/packages/cactus-api-client/CHANGELOG.md b/packages/cactus-api-client/CHANGELOG.md deleted file mode 100644 index 82a92fa57c..0000000000 --- a/packages/cactus-api-client/CHANGELOG.md +++ /dev/null @@ -1,148 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Features - -* **consortium-static:** new consortium plugin ([db3475f](https://github.com/hyperledger/cacti/commit/db3475fe359ede8fbf5bcbe6e9dc40c40cd2378d)) -* **go-ethereum-socketio:** remove deprecated connector ([56dd9f8](https://github.com/hyperledger/cacti/commit/56dd9f8aa72883aeb5bfcf0303b0af6e84daad7a)), closes [#3155](https://github.com/hyperledger/cacti/issues/3155) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** the CVE-2022-2421 - upgrade socket.io-parser to >=4.2.1 ([9172172](https://github.com/hyperledger/cacti/commit/917217227a3fa53a00429f047cd6318862e6ab8d)), closes [#2229](https://github.com/hyperledger/cacti/issues/2229) [#2228](https://github.com/hyperledger/cacti/issues/2228) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Features - -* **secret:** remove Validator/Verifier secret keys from repository ([59b4af4](https://github.com/hyperledger/cactus/commit/59b4af44835e2babafe398040a280ed23e9b490e)) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* add optional auth token to api-client and consortium-manual ([c2feebf](https://github.com/hyperledger/cactus/commit/c2feebfec56f13d68c2ea1ec3a34ce67394d0720)), closes [#1579](https://github.com/hyperledger/cactus/issues/1579) - -### Features - -* **cactus-api-client:** add support for plain socketio validators in api-server and api-client ([634b10e](https://github.com/hyperledger/cactus/commit/634b10e5eaf82df08b04c11c3af5b109ede5b942)), closes [#1602](https://github.com/hyperledger/cactus/issues/1602) [#1602](https://github.com/hyperledger/cactus/issues/1602) -* **cactus-api-client:** common verifier-factory ([2f70a64](https://github.com/hyperledger/cactus/commit/2f70a6473f30446859427335f2d3602bddca636d)), closes [#1878](https://github.com/hyperledger/cactus/issues/1878) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -**Note:** Version bump only for package @hyperledger/cactus-api-client - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **api-client:** flaky DefaultConsortiumProvider test [#605](https://github.com/hyperledger/cactus/issues/605) ([2ff9a25](https://github.com/hyperledger/cactus/commit/2ff9a25c316b8567e8393748386f4187cd58ea48)) -* **cockpit:** compilation issues [#496](https://github.com/hyperledger/cactus/issues/496) ([fad9fff](https://github.com/hyperledger/cactus/commit/fad9fffb59136f1fdbcef4645a0da3ccd2913233)) -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) -* dci lint errors [#514](https://github.com/hyperledger/cactus/issues/514) ([99ab3af](https://github.com/hyperledger/cactus/commit/99ab3afa23b043d4d5b7d6f75db33d4256a11af9)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -### Features - -* **sdk:** routing to nodes by ledger ID ([10e3d1c](https://github.com/hyperledger/cactus/commit/10e3d1c46731bf6d84a28d837e2f6601b4c6a78f)) - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -### Features - -* **sdk:** routing to nodes by ledger ID ([10e3d1c](https://github.com/hyperledger/cactus/commit/10e3d1c46731bf6d84a28d837e2f6601b4c6a78f)) diff --git a/packages/cactus-api-client/README.md b/packages/cactus-api-client/README.md deleted file mode 100644 index 8188506a28..0000000000 --- a/packages/cactus-api-client/README.md +++ /dev/null @@ -1,149 +0,0 @@ -# `@hyperledger/cactus-api-client` - -- [Summary](#summary) -- [Usage](#usage) - - [Routing to Cactus Node with connector to specific ledger](#routing-to-cactus-node-with-connector-to-specific-ledger) - - [Leverage the `ConsortiumDatabase` for discovery](#leverage-the-consortiumdatabase-for-discovery) - - [Use a provided `mainApiHost` and `ledgerId`](#use-a-provided-mainapihost-and-ledgerid) - - [Use the API host of a node directly](#use-the-api-host-of-a-node-directly) -- [Public API Surface](#public-api-surface) - - [`DefaultConsortiumProvider`](#defaultconsortiumprovider) - - [`ApiClient`](#apiclient) - -## Summary - -The Hyperledger Cactus API Client package is designed to be a generic extension with convenience features wrapped around the -[**typescript-axios** flavored API clients][(https://github.com/OpenAPITools/openapi-generator/blob/v5.2.1/docs/generators/typescript-axios.md](https://github.com/OpenAPITools/openapi-generator/blob/v5.2.1/docs/generators/typescript-axios.md)) that we auto-generate and ship with each web service-enabled -plugin such as the API clients of the -* [**Manual Consortium Plugin** Typescript Axios API Client](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios) -* [**Besu Connector** Typescript Axios API Client](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios) -* [**Corda Connector** Typescript Axios API Client](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios) -* [**Fabric Connector** Typescript Axios API Client](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios) -* [**API Server** Typescript Axios API Client](https://github.com/hyperledger/cactus/tree/main/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios) -* [**Vault Keychain Plugin** Typescript Axios API Client](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios) - -The code generation for the listed code folders above is done by the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) tool that can convert OpenAPI V3 json specifications of ours straight into the program code of the API clients. - -The above means that the `ApiClient` class is not the one containing the implementation -responsible for executing all the supported API calls by a Cactus node (which would make -it a monolith, something that we try to avoid as it is the opposite of a flexible plugin -architecture) - -For example you can use the `@hyperledger/cactus-api-client` node package to perform -Cactus node discovery based on ledger IDs (that can be obtained from the `ConsortiumDatabase` as defined by the [generated models](https://github.com/hyperledger/cactus/blob/main/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts) of the `@hyperledger/cactus-core-api` package. - -> While you can generate API Clients for the Cactus API specifications in any supported langauge of the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) the features provided by this package will have to be developed separately (if not already done by the Cactus maintainers). -> Currently the only implementation of the abstract API Client and its features (node discovery) is in Typescript (e.g. the `@hyperledger/cactus-api-client` package). -## Usage - -### Routing to Cactus Node with connector to specific ledger - -Let's say you have a consortium with several members who all have their own ledgers deployed as well. -The `ConsortiumDatabase` will therefore contain the entities pertaining to these entities -(such as the ledgers or the members themselves) meaning that if you are developing an -application that needs to perform operations on one of the ledgers in the consortium then -you have a couple of different ways of obtaining an API client to do just that: - -#### Leverage the `ConsortiumDatabase` for discovery - -```typescript -import { ApiClient } from "@hyperledger/cactus-api-client"; - -import { ConsortiumDatabase, Ledger, LedgerType } from "@hyperledger/cactus-core-api"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { DefaultApi as BesuApi } from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -const mainFn = async () => { - const ledgerId = "theIdOfYourLedgerInTheConsortiumDatabase"; - - // How you obtain a consortium provider is dependent on which consortium - // plugin you use and your exact deployment scenario - const consortiumProvider: IAsyncProvider = ...; - const consortiumDatabase: ConsortiumDatabase = await consortiumProvider.get(); - const consortium = consortiumDatabase.consortium[0]; - - const mainApiClient = new ApiClient({ basePath: consortium.mainApiHost }); - - // This client is now configured to point to a node that has a connector to - // the ledger referenced by `ledgerId` - const apiClient = await mainApiClient.ofLedger(ledgerId, BesuApi); - - // Use the client to perform any supported operation on the ledger -}; - -mainFn(); -``` - -#### Use a provided `mainApiHost` and `ledgerId` - -```typescript -import { ApiClient } from "@hyperledger/cactus-api-client"; - -import { ConsortiumDatabase, Ledger, LedgerType } from "@hyperledger/cactus-core-api"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { DefaultApi as BesuApi } from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -const mainFn = async () => { - const ledgerId = "theIdOfYourLedgerInTheConsortiumDatabase"; - const consortiumMainApiHost = "https://cactus.example.com"; - - const mainApiClient = new ApiClient({ basePath: consortiumMainApiHost }); - - // This client is now configured to point to a node that has a connector to - // the ledger referenced by `ledgerId` - const apiClient = await mainApiClient.ofLedger(ledgerId, BesuApi); -} - -mainFn(); -``` - -#### Use the API host of a node directly - -```typescript -import { ApiClient } from "@hyperledger/cactus-api-client"; - -import { ConsortiumDatabase, Ledger, LedgerType } from "@hyperledger/cactus-core-api"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { DefaultApi as BesuApi } from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -const mainFn = async () => { - const nodeApiHost = "https://my-node.cactus.example.com"; - - const mainApiClient = new ApiClient({ basePath: nodeApiHost }); - - // This client is now configured to point to a node that has a connector to the ledger of your choice - const apiClient = await mainApiClient.extendWith(BesuApi); -} - -mainFn(); -``` - -## Public API Surface - -### `DefaultConsortiumProvider` - -Builds the default Consortium provider that can be used by this object to retrieve the Cactus Consortium metadata object when necessary (one such case is when we need information about the consortium nodes to perform routing requests to a specific ledger via a connector plugin, but later other uses could be added as well). - -The DefaultConsortiumProvider class leverages the simplest consortium plugin that we have at the time of this writing: @hyperledger/cactus-plugin-consortium-manual which holds the consortium metadata as pre-configured by the consortium operators. - -The pattern we use in the ApiClient class is that you can inject your own `IAsyncProvider` implementation which then will be used for routing information and in theory you can implement completely arbitrary consortium management in your own consortium plugins which then Cactus can use and leverage for the routing. This allows us to support any exotic consortium management algorithms that people may come up with such as storing the consortium definition in a multi-sig smart contract or have the list of consortium nodes be powered by some sort of automatic service discovery or anything else that people might think of. - -### `ApiClient` - -Class responsible for providing additional functionality to the DefaultApi classes of the generated clients (OpenAPI generator / typescript-axios). - -Each package (plugin) can define it's own OpenAPI spec which means that they all can ship with their own `DefaultApi` class that is generated directly from the respective OpenAPI spec of the package/plugin. - -The functionality provided by this class is meant to be common traints that can be useful for all of those different `DefaultApi` implementations. - -One such common trait is the client side component of the routing that decides which Cactus node to point the `ApiClient` towards (which is in itself ends up being the act of routing). - -@see — https ://github.com/OpenAPITools/openapi-generator/blob/v5.0.0-beta2/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache#L337 - -@see — https ://github.com/OpenAPITools/openapi-generator/blob/v5.0.0/docs/generators/typescript-axios.md diff --git a/packages/cactus-api-client/package.json b/packages/cactus-api-client/package.json deleted file mode 100644 index 039c301802..0000000000 --- a/packages/cactus-api-client/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "@hyperledger/cactus-api-client", - "version": "2.0.0", - "description": "Universal library used by both front end and back end components of Cactus. Aims to be a developer swiss army knife.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-api-client.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-consortium-manual": "2.0.0", - "jsonwebtoken": "9.0.0", - "rxjs": "7.8.1", - "socket.io-client-fixed-types": "4.5.4" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/jsonwebtoken": "9.0.0", - "@types/lodash": "4.14.195", - "@types/node": "18.11.9", - "http-status-codes": "2.3.0", - "lodash": "4.17.21" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-api-client.web.umd.min.js", - "mainMinified": "dist/cactus-api-client.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-api-client/src/main/typescript/api-client.ts b/packages/cactus-api-client/src/main/typescript/api-client.ts deleted file mode 100644 index 634b3f3a4b..0000000000 --- a/packages/cactus-api-client/src/main/typescript/api-client.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { Checks, IAsyncProvider, Objects } from "@hyperledger/cactus-common"; - -import { ConsortiumDatabase, Ledger } from "@hyperledger/cactus-core-api"; - -import { ConsortiumRepository } from "@hyperledger/cactus-core"; -import { DefaultApi as ApiConsortium } from "@hyperledger/cactus-plugin-consortium-manual"; -import { DefaultConsortiumProvider } from "./default-consortium-provider"; - -import { Configuration, BaseAPI } from "@hyperledger/cactus-core-api"; - -/** - * Class responsible for providing additional functionality to the `DefaultApi` - * classes of the generated clients (OpenAPI generator / typescript-axios). - * - * Each package (plugin) can define it's own OpenAPI spec which means that they - * all can ship with their own `DefaultApi` class that is generated directly - * from the respective OpenAPI spec of the package/plugin. - * - * The functionality provided by this class is meant to be common traits that - * can be useful for all of those different `DefaultApi` implementations. - * - * One such common trait is the client side component of the routing that - * decides which Cactus node to point the `ApiClient` towards (which is in - * itself ends up being the act of routing). - * - * @see https://github.com/OpenAPITools/openapi-generator/blob/v5.0.0-beta2/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache#L337 - * @see https://github.com/OpenAPITools/openapi-generator/blob/v5.0.0/docs/generators/typescript-axios.md - */ -export class ApiClient extends BaseAPI { - /** - * - * @param ctor - */ - public extendWith( - ctor: new (configuration?: Configuration) => T, - ): T & this { - const instance = new ctor(this.configuration) as Record; - const self = this as Record; - - Objects.getAllMethodNames(instance).forEach( - (method: string) => (self[method] = instance[method]), - ); - - Objects.getAllFieldNames(instance).forEach( - (field: string) => (self[field] = instance[field]), - ); - - return this as T & this; - } - - /** - * Builds the default `Consortium` provider that can be used by this object - * to retrieve the Cactus Consortium metadata object when necessary (one such - * case is when we need information about the consortium nodes to perform - * routing requests to a specific ledger via a connector plugin, but later - * other uses could be added as well). - * - * The `DefaultConsortiumProvider` class leverages the simplest consortium - * plugin that we have at the time of this writing: - * `@hyperledger/cactus-plugin-consortium-manual` which holds the consortium - * metadata as pre-configured by the consortium operators. - * - * The pattern we use in the `ApiClient` class is that you can inject your - * own `IAsyncProvider` implementation which then will be used - * for routing information and in theory you can implement completely arbitrary - * consortium management in your own consortium plugins which then Cactus - * can use and leverage for the routing. - * This allows us to support any exotic consortium management algorithms - * that people may come up with such as storing the consortium definition in - * a multi-sig smart contract or have the list of consortium nodes be powered - * by some sort of automatic service discovery or anything else that people - * might think of. - * - * @see {DefaultConsortiumProvider} - */ - public get defaultConsortiumDbProvider(): IAsyncProvider { - Checks.truthy(this.configuration, "ApiClient#configuration"); - const apiClient = new ApiConsortium(this.configuration); - return new DefaultConsortiumProvider({ apiClient }); - } - - public async ofLedger( - ledgerOrId: string | Ledger, - ctor: new (configuration?: Configuration) => T, - ctorArgs: Record, - consortiumDbProvider?: IAsyncProvider, - ): Promise; - /** - * Constructs a new `ApiClient` object that is tied to whichever Cactus node - * has a ledger connector plugin configured to talk to the distributed ledger - * denoted by the `ledgerId` parameter of the method. - * - * This is part of how we do request routing between different nodes, some of - * which may or may not run a ledger connector tied to a particular instance. - * (E.g. this method ensures that the returned `ApiClient` instance is bound - * to the network host of a Cactus node which does indeed have a connection - * to the specified `ledgerId` parameter) - * - * @param ledgerOrId The ID of the ledger to obtain an API client object for - * or the `Ledger` object which will be used to get the ledgerId from. - * @param consortiumDbProvider The provider that can be used to retrieve the - * consortium metadata at runtime for the purposes of looking up ledgers by - * the provided `ledgerId` parameter. - */ - public async ofLedger( - ledgerOrId: string | Ledger, - ctor: new (configuration?: Configuration) => T, - ctorArgs: Record, - consortiumDbProvider?: IAsyncProvider, - ): Promise { - const fnTags = "ApiClient#forLedgerId()"; - - const provider = consortiumDbProvider || this.defaultConsortiumDbProvider; - - Checks.truthy(ledgerOrId, `${fnTags}:ledgerOrId`); - Checks.truthy(provider, `${fnTags}:consortiumDbProvider`); - - let ledgerId: string; - if (typeof ledgerOrId === "string") { - ledgerId = ledgerOrId; - } else { - ledgerId = ledgerOrId.id; - } - - const db: ConsortiumDatabase = await provider.get(); - const repo = new ConsortiumRepository({ db }); - - const nodes = repo.nodesWithLedger(ledgerId); - - // pick a random element from the array of nodes that have a connection to - // the target ledger (based on the ledger ID) - const randomIdx = Math.floor(Math.random() * nodes.length); - const randomNode = nodes[randomIdx]; - - // overwrite basePath with randomNode api host - ctorArgs.basePath = randomNode.nodeApiHost; - - // create the ApiClient configuration object - const configuration = new Configuration(ctorArgs); - - return new ApiClient(configuration).extendWith(ctor); - } -} diff --git a/packages/cactus-api-client/src/main/typescript/default-consortium-provider.ts b/packages/cactus-api-client/src/main/typescript/default-consortium-provider.ts deleted file mode 100644 index cef24a1f8c..0000000000 --- a/packages/cactus-api-client/src/main/typescript/default-consortium-provider.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { - Logger, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { Checks, IAsyncProvider } from "@hyperledger/cactus-common"; -import { ConsortiumDatabase } from "@hyperledger/cactus-core-api"; - -import { - DefaultApi as ConsortiumManualApi, - GetConsortiumJwsResponse, -} from "@hyperledger/cactus-plugin-consortium-manual"; - -export interface IDefaultConsortiumProviderOptions { - logLevel?: LogLevelDesc; - apiClient: ConsortiumManualApi; -} - -export class DefaultConsortiumProvider - implements IAsyncProvider -{ - public static readonly CLASS_NAME = "DefaultConsortiumProvider"; - - private readonly log: Logger; - - public get className(): string { - return DefaultConsortiumProvider.CLASS_NAME; - } - - constructor(public readonly options: IDefaultConsortiumProviderOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - parseConsortiumJws(response: GetConsortiumJwsResponse): ConsortiumDatabase { - const fnTag = `DefaultConsortiumProvider#parseConsortiumJws()`; - - Checks.truthy(response, `${fnTag}::response`); - Checks.truthy(response.jws, `${fnTag}::response.jws`); - Checks.truthy(response.jws.payload, `${fnTag}::response.jws.payload`); - - const json = Buffer.from(response.jws.payload, "base64").toString(); - const body = JSON.parse(json); - const { consortiumDatabase }: { consortiumDatabase: ConsortiumDatabase } = - body; - - Checks.truthy(consortiumDatabase, `${fnTag}::consortiumDatabase`); - - // FIXME Ideally there would be an option here to validate the JWS based on - // all the signatures and the corresponding public keys (which the caller - // would have to be able to supply). - // We do not yet have this crypto functions available in a cross platform - // manner so it is omitted for now but much needed prior to any GA release. - return consortiumDatabase; - } - - public async get(): Promise { - try { - const res = await this.options.apiClient.getConsortiumJwsV1(); - return this.parseConsortiumJws(res.data); - } catch (ex) { - const innerException = (ex.toJSON && ex.toJSON()) || ex; - this.log.error(`Request for Consortium JWS failed: `, innerException); - throw ex; - } - } -} diff --git a/packages/cactus-api-client/src/main/typescript/index.ts b/packages/cactus-api-client/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-api-client/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-api-client/src/main/typescript/index.web.ts b/packages/cactus-api-client/src/main/typescript/index.web.ts deleted file mode 100644 index 7d8b42d785..0000000000 --- a/packages/cactus-api-client/src/main/typescript/index.web.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { ApiClient } from "./api-client"; -export { DefaultConsortiumProvider } from "./default-consortium-provider"; diff --git a/packages/cactus-api-client/src/main/typescript/public-api.ts b/packages/cactus-api-client/src/main/typescript/public-api.ts deleted file mode 100644 index 7d8b42d785..0000000000 --- a/packages/cactus-api-client/src/main/typescript/public-api.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { ApiClient } from "./api-client"; -export { DefaultConsortiumProvider } from "./default-consortium-provider"; diff --git a/packages/cactus-api-client/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-api-client/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-api-client/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-api-client/src/test/typescript/integration/default-consortium-provider.test.ts b/packages/cactus-api-client/src/test/typescript/integration/default-consortium-provider.test.ts deleted file mode 100644 index cbc49da0d4..0000000000 --- a/packages/cactus-api-client/src/test/typescript/integration/default-consortium-provider.test.ts +++ /dev/null @@ -1,72 +0,0 @@ -import http from "node:http"; -import { AddressInfo } from "node:net"; - -import "jest-extended"; -import { StatusCodes } from "http-status-codes"; - -import { DefaultApi as ConsortiumManualApi } from "@hyperledger/cactus-plugin-consortium-manual"; -import { - LoggerProvider, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { DefaultConsortiumProvider } from "../../../main/typescript"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -describe("DefaultConsortiumProvider", () => { - const logLevel: LogLevelDesc = "SILENT"; - - const log = LoggerProvider.getOrCreate({ - label: "default-consortium-provider.test.ts", - level: logLevel, - }); - - let httpServer1: http.Server; - let apiClientConfig: Configuration; - - beforeAll(async () => { - httpServer1 = await Servers.startOnPreferredPort(4050); - const { address, port } = httpServer1.address() as AddressInfo; - const apiHost = `http://${address}:${port}`; - log.info("API host: %s", apiHost); - - apiClientConfig = new Configuration({ - basePath: apiHost, - baseOptions: { - timeout: 2000, - }, - }); - }); - - afterAll(async () => { - await Servers.shutdown(httpServer1); - }); - - it("Handles timeout/connection refusal transparently", async () => { - const provider = new DefaultConsortiumProvider({ - logLevel, - apiClient: new ConsortiumManualApi(apiClientConfig), - }); - - expect(provider.get()).rejects.toMatchObject({ - message: expect.stringMatching( - new RegExp(`connect ECONNREFUSED (.*):4050`), - ), - }); - }); - - it("Handles 4xx transparently", async () => { - const config = new Configuration({ - basePath: "https://httpbin.org/status/400", - }); - const provider = new DefaultConsortiumProvider({ - logLevel, - apiClient: new ConsortiumManualApi(config), - }); - - expect(provider.get()).rejects.toMatchObject({ - code: "ERR_BAD_REQUEST", - message: expect.stringContaining("status code " + StatusCodes.NOT_FOUND), - }); - }); -}); diff --git a/packages/cactus-api-client/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-api-client/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-api-client/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-api-client/tsconfig.json b/packages/cactus-api-client/tsconfig.json deleted file mode 100644 index 24b536ef9d..0000000000 --- a/packages/cactus-api-client/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-api-client.tsbuildinfo" - }, - "include": [ - "./src" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-consortium-manual/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/CHANGELOG.md b/packages/cactus-cmd-api-server/CHANGELOG.md deleted file mode 100644 index 8ed022f137..0000000000 --- a/packages/cactus-cmd-api-server/CHANGELOG.md +++ /dev/null @@ -1,348 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-api-server - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-api-server - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-api-server - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Bug Fixes - -* address CVE-2022-24434, GHSA-wm7h-9275-46v2 caused by dicer ([6ff8111](https://github.com/hyperledger/cacti/commit/6ff8111c2534f71a5f623433eba59a610d84f4eb)) -* **cmd-api-server:** use ncc bundle in container image - CVE-2024-29415 ([9eefa66](https://github.com/hyperledger/cacti/commit/9eefa66446a193c7ca164c876f8ed6d5cc56549b)) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **cmd-api-server:** shutdown hook was not waiting for promises ([d14bf02](https://github.com/hyperledger/cacti/commit/d14bf02aed215eeecdba258bb48a330da3fc2c36)) -* **cmd-api-server:** stop changing LoggerProvider log level ([6ef514c](https://github.com/hyperledger/cacti/commit/6ef514cc01eda2640ed144bdd4750dbcb1e35e27)) -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **cmd-api-server:** add runtime type validation to HTTP verbs pulled from OAS ([b0ff599](https://github.com/hyperledger/cacti/commit/b0ff599b2c32b83d7d45c41ef215372044ccda23)), closes [#2751](https://github.com/hyperledger/cacti/issues/2751) [#2751](https://github.com/hyperledger/cacti/issues/2751) [#2751](https://github.com/hyperledger/cacti/issues/2751) [#2754](https://github.com/hyperledger/cacti/issues/2754) -* **cmd-api-server:** address CVE-2022-25881 ([81da333](https://github.com/hyperledger/cacti/commit/81da3334d8e638f85e398dd228bcef836a278230)), closes [#2862](https://github.com/hyperledger/cacti/issues/2862) -* **cmd-api-server:** healthcheck broken due to missing wget binary ([8f1ca3f](https://github.com/hyperledger/cacti/commit/8f1ca3fcce9fedaedd4ceafbb51d8e8cd41cc50e)), closes [#2894](https://github.com/hyperledger/cacti/issues/2894) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **cactus-plugin-ledger-connector-ethereum:** update web3js to 4.X ([55f82c9](https://github.com/hyperledger/cacti/commit/55f82c9568b3e875de4f3ceb89a828f8b23d65be)), closes [#2580](https://github.com/hyperledger/cacti/issues/2580) [#2535](https://github.com/hyperledger/cacti/issues/2535) [#2578](https://github.com/hyperledger/cacti/issues/2578) -* **cmd-api-server:** add ConnectRPC auto-registration for plugins ([c569460](https://github.com/hyperledger/cacti/commit/c569460b099469184a7953ffc0f806ddf3facb38)) -* **cmd-api-server:** add gRPC plugin auto-registration support ([5762dad](https://github.com/hyperledger/cacti/commit/5762dadfe108c6c73251d5b474961e4888941b90)) - -### Performance Improvements - -* **cmd-api-server:** add demonstration of continuous benchmarking ([0804bab](https://github.com/hyperledger/cacti/commit/0804bab4c9b43f2e22be6d77be127415a9a0532f)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **cmd-api-server:** fix CVE-2023-36665 protobufjs Prototype Pollution vuln ([7bb3957](https://github.com/hyperledger/cacti/commit/7bb39576080592919bea0ac89646b32105e1748e)), closes [#2682](https://github.com/hyperledger/cacti/issues/2682) -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* **security:** the CVE-2022-2421 - upgrade socket.io-parser to >=4.2.1 ([9172172](https://github.com/hyperledger/cacti/commit/917217227a3fa53a00429f047cd6318862e6ab8d)), closes [#2229](https://github.com/hyperledger/cacti/issues/2229) [#2228](https://github.com/hyperledger/cacti/issues/2228) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Code Refactoring - -* **cmd-api-server:** clean up configuration parameters [#720](https://github.com/hyperledger/cacti/issues/720) ([b8e8388](https://github.com/hyperledger/cacti/commit/b8e8388306b6708c7d3156e005b1ee9693b35a22)) - -### Features - -* **cactus-common:** add createRuntimeErrorWithCause() & newRex() ([b3a508c](https://github.com/hyperledger/cacti/commit/b3a508c9a080e00a5e39ffa352a38e785b8cea9c)), closes [#1702](https://github.com/hyperledger/cacti/issues/1702) -* **cmd-api-server:** add GetOpenApiSpecV1Endpoint (HTTP GET) ([aeebbd4](https://github.com/hyperledger/cacti/commit/aeebbd4d86cb62f8d1d53fded65ae40eb5e27910)) -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -### BREAKING CHANGES - -* **cmd-api-server:** Removed the `keyPairPem` parameter from the API server -configuration. - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-api-server - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **cactus-example-supply-chain-app:** mitigate CVE-2022-24434 and CVE-2022-24999 ([d28d5e8](https://github.com/hyperledger/cactus/commit/d28d5e8f3ed5dff1aa049c8f1bccce79aa21e948)), closes [#2041](https://github.com/hyperledger/cactus/issues/2041) -* **security:** upgrade express-jwt to v8.4.1 ([e251168](https://github.com/hyperledger/cactus/commit/e251168fb4067a8036a5168709e57154c0c02fe4)), closes [#2231](https://github.com/hyperledger/cactus/issues/2231) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-api-server - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -### Bug Fixes - -* **plugin-ledger-connector-iroha:** running dockerfile locally ([f5faaab](https://github.com/hyperledger/cactus/commit/f5faaab75cecf22f588f0cdcb502952652fee058)), closes [#1874](https://github.com/hyperledger/cactus/issues/1874) - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-api-server - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-cmd-api-server - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Bug Fixes - -* **api-server:** allow no authorization on socketio endpoints ([bf51960](https://github.com/hyperledger/cactus/commit/bf519608f39666e15cafd507c6defcfe956145a8)), closes [#1925](https://github.com/hyperledger/cactus/issues/1925) -* **security:** address CVE-2022-29244, CVE-2021-39135 ([7309f2a](https://github.com/hyperledger/cactus/commit/7309f2a8dc07d20fbffc9a2562f11e3140c8d79d)), closes [#2136](https://github.com/hyperledger/cactus/issues/2136) -* **security:** ensure node-forge > 1.3.0 for CVE-2022-24772 ([38fe287](https://github.com/hyperledger/cactus/commit/38fe287b958204d92a0353e369511120e38c625c)), closes [#1947](https://github.com/hyperledger/cactus/issues/1947) - -### Code Refactoring - -* **examples:** include sample apps in monorepo build ([51ac163](https://github.com/hyperledger/cactus/commit/51ac1630f53ca3ac881341c7f8847b6ae581b220)) - -### Features - -* **secret:** remove Validator/Verifier secret keys from repository ([59b4af4](https://github.com/hyperledger/cactus/commit/59b4af44835e2babafe398040a280ed23e9b490e)) - -### BREAKING CHANGES - -* **examples:** 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 - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* **cmd-api-server:** add express static rate limiting ([190cf12](https://github.com/hyperledger/cactus/commit/190cf12f16345e06fbb6d1ccb428ad0ad8958a3e)), closes [#1840](https://github.com/hyperledger/cactus/issues/1840) -* **cmd-api-server:** disable validateKeyPairMatch ([7deaa22](https://github.com/hyperledger/cactus/commit/7deaa229ca0cdb4ef31fcc033ef08128fcb9e5b1)) -* **cmd-api-server:** upgrade socket.io - CVE-2022-21676 ([8e1c69e](https://github.com/hyperledger/cactus/commit/8e1c69e7b8ab5e4ccc31a0ec183a9777ccc22cdc)), closes [#1914](https://github.com/hyperledger/cactus/issues/1914) -* config-service validator throws warnings ([877dcab](https://github.com/hyperledger/cactus/commit/877dcabc82dbc583f0d7e05813ce375c85b66f83)) -* fix faulty shutdownHook definition in the Config-Schema ([fbae2da](https://github.com/hyperledger/cactus/commit/fbae2da4071ebbf40cc1941a1d2261b8b06fe8f0)), closes [#1648](https://github.com/hyperledger/cactus/issues/1648) -* **security:** upgrade to yarn > 1.22.0 - CVE-2019-10773, CVE-2020-8131 ([43d591d](https://github.com/hyperledger/cactus/commit/43d591d2eff576cb581a2a92d98edf7f4f6ecf13)), closes [#1922](https://github.com/hyperledger/cactus/issues/1922) -* set apiServerOptions.configFile="" ([5c5a1e1](https://github.com/hyperledger/cactus/commit/5c5a1e16ad92a882b9e99f5413411b4cc7793be6)), closes [#1619](https://github.com/hyperledger/cactus/issues/1619) -* shutdown hook configuration is using wrong config key ([e760e04](https://github.com/hyperledger/cactus/commit/e760e04a9ba946b45b65c68455eedcc2694f8fae)), closes [#1619](https://github.com/hyperledger/cactus/issues/1619) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* added a dummy package ([e1e8aee](https://github.com/hyperledger/cactus/commit/e1e8aee692dd0055e4f2b772590ad7386008c500)), closes [#1210](https://github.com/hyperledger/cactus/issues/1210) -* **cmd-api-server:** build occasionally broken - protoc-gen-ts [#1563](https://github.com/hyperledger/cactus/issues/1563) ([c2ecba5](https://github.com/hyperledger/cactus/commit/c2ecba54396d5e72b28d9ad538460d3bde2ca6d0)) -* **cmd-api-server:** cockpit off by default [#1239](https://github.com/hyperledger/cactus/issues/1239) ([10344b5](https://github.com/hyperledger/cactus/commit/10344b574013209f1cb96e37a01d0d79e629be1f)) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -### Bug Fixes - -* fixes issue 1444 invoking the onPluginInit ([0b4dc2e](https://github.com/hyperledger/cactus/commit/0b4dc2eb121cb52d6038822efca434b9a0e4abcf)), closes [#1444](https://github.com/hyperledger/cactus/issues/1444) - -### Features - -* option to enable a graceful shutdown via cli ([c345cb0](https://github.com/hyperledger/cactus/commit/c345cb0aeba4ae46440ba396bcd11ca0fa5a5c96)) - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **cmd-api-server:** enable version selection in plugins ([b982777](https://github.com/hyperledger/cactus/commit/b9827772fa6694381716686759f85f96b915662e)), closes [#839](https://github.com/hyperledger/cactus/issues/839) [#840](https://github.com/hyperledger/cactus/issues/840) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Bug Fixes - -* **cmd-api-server:** add missing deps remove unused ones [#1226](https://github.com/hyperledger/cactus/issues/1226) ([b348e42](https://github.com/hyperledger/cactus/commit/b348e4266369fed502610b4c0769d4d6b19f9115)) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) -* **cmd-api-server:** support grpc web services [#1189](https://github.com/hyperledger/cactus/issues/1189) ([4cace1d](https://github.com/hyperledger/cactus/commit/4cace1dca3377e09d2ed37fdadeec6b125d47896)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **cmd-api-server:** plugins interfere with API server deps [#1192](https://github.com/hyperledger/cactus/issues/1192) ([a96ce68](https://github.com/hyperledger/cactus/commit/a96ce689dae74345b41d5bd94dd46dd3e9bc3e71)), closes [#1203](https://github.com/hyperledger/cactus/issues/1203) -* **prometheus:** metrics.ts leaks to global registry [#1202](https://github.com/hyperledger/cactus/issues/1202) ([ce076d7](https://github.com/hyperledger/cactus/commit/ce076d709f8e0cba143f8fe9d71f1de1df8f71dc)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Bug Fixes - -* **connector-corda:** fix build broken by operationId rename ([291dd3b](https://github.com/hyperledger/cactus/commit/291dd3bc666939fffbc3780eaefd9059c756878a)) - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **cmd-api-server:** config-service example - authorization JSON ([a209fef](https://github.com/hyperledger/cactus/commit/a209feffdea47f0992f17a7c0265535614143dfe)) -* **cmd-api-server:** drop URI type alt name from self signed TLS cert ([eb5d1df](https://github.com/hyperledger/cactus/commit/eb5d1dfaf8523690008c1c1c0aaa0b0efedb2cba)) -* **cmd-api-server:** no CLI args causes crash [#794](https://github.com/hyperledger/cactus/issues/794) ([a285b96](https://github.com/hyperledger/cactus/commit/a285b96785792cd29f450bfc1cc066067c82f558)) -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) - -### Features - -* adding additional info into err logs ([888f85a](https://github.com/hyperledger/cactus/commit/888f85a680a330cfc6be98bab3e8aed5d9e9dde2)), closes [#295](https://github.com/hyperledger/cactus/issues/295) -* **api-server:** ability to install plugins at runtime [#764](https://github.com/hyperledger/cactus/issues/764) ([8dda0f6](https://github.com/hyperledger/cactus/commit/8dda0f61937c6e1a85afee0345af44b1bfa09c0a)) -* **api-server:** publish API server docker image ([ad7b221](https://github.com/hyperledger/cactus/commit/ad7b2211305bcefb044701276a56d5ad09d8468c)) -* **cmd-api-server:** add Socket.IO as transport [#297](https://github.com/hyperledger/cactus/issues/297) ([51c586a](https://github.com/hyperledger/cactus/commit/51c586aa01bff3e75f0e87be43f0764b30d8222c)) -* **cmd-api-server:** container image definition ([eb69fff](https://github.com/hyperledger/cactus/commit/eb69fff36fca805c6b96c6db7caadfbed85e8485)) -* **cmd-api-server:** user defined type guard isHealthcheckResponse ([16077d4](https://github.com/hyperledger/cactus/commit/16077d42ec7edce4999d77cfbca5c02177d15fa6)) -* **connector-fabric:** contract deployment Fabric 2.x ([139a8ed](https://github.com/hyperledger/cactus/commit/139a8ed96d5d547a514839a461abcb7d0e937cb0)) -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** hasTransactionFinality() on connector API [#354](https://github.com/hyperledger/cactus/issues/354) ([a2d0582](https://github.com/hyperledger/cactus/commit/a2d058218780e5e4c81e5f847cc875879a946e3f)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **core-api:** plugin interface async initializer ([d40f68b](https://github.com/hyperledger/cactus/commit/d40f68bd9eaff498df8514fe7397986b5a2f865d)) -* incorporating load testing into our CI pipeline ([7125d10](https://github.com/hyperledger/cactus/commit/7125d1043091e0443edaa7b63021cd0b96404c4b)), closes [#295](https://github.com/hyperledger/cactus/issues/295) -* **keychain-vault:** add the missing endpoint classes [#676](https://github.com/hyperledger/cactus/issues/676) ([341cffc](https://github.com/hyperledger/cactus/commit/341cffcef72286169a4ceced69414618d5059d0e)) -* **plugin-object-store-ipfs:** add IPFS plugin implementation ([6d1de27](https://github.com/hyperledger/cactus/commit/6d1de274b45a3fd2cc5120588f9d8594d5d3ace6)) - -### Performance Improvements - -* **cmd-api-server:** shrink API server bundle with type-only imports ([4875fc3](https://github.com/hyperledger/cactus/commit/4875fc346bba70ee87d8fe033435035201d48b3e)) - -### BREAKING CHANGES - -* 🧨 Behaviour in a cloud environment is currently untested and could impact -CI pipeline time. - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* **cmd-api-server:** no CLI args causes crash [#794](https://github.com/hyperledger/cactus/issues/794) ([a285b96](https://github.com/hyperledger/cactus/commit/a285b96785792cd29f450bfc1cc066067c82f558)) - -### Features - -* **core-api:** hasTransactionFinality() on connector API [#354](https://github.com/hyperledger/cactus/issues/354) ([a2d0582](https://github.com/hyperledger/cactus/commit/a2d058218780e5e4c81e5f847cc875879a946e3f)) -* adding additional info into err logs ([888f85a](https://github.com/hyperledger/cactus/commit/888f85a680a330cfc6be98bab3e8aed5d9e9dde2)), closes [#295](https://github.com/hyperledger/cactus/issues/295) -* incorporating load testing into our CI pipeline ([7125d10](https://github.com/hyperledger/cactus/commit/7125d1043091e0443edaa7b63021cd0b96404c4b)), closes [#295](https://github.com/hyperledger/cactus/issues/295) -* **api-server:** ability to install plugins at runtime [#764](https://github.com/hyperledger/cactus/issues/764) ([8dda0f6](https://github.com/hyperledger/cactus/commit/8dda0f61937c6e1a85afee0345af44b1bfa09c0a)) -* **cmd-api-server:** container image definition ([eb69fff](https://github.com/hyperledger/cactus/commit/eb69fff36fca805c6b96c6db7caadfbed85e8485)) -* **cmd-api-server:** user defined type guard isHealthcheckResponse ([16077d4](https://github.com/hyperledger/cactus/commit/16077d42ec7edce4999d77cfbca5c02177d15fa6)) -* **connector-fabric:** contract deployment Fabric 2.x ([139a8ed](https://github.com/hyperledger/cactus/commit/139a8ed96d5d547a514839a461abcb7d0e937cb0)) -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -### BREAKING CHANGES - -* 🧨 Behaviour in a cloud environment is currently untested and could impact -CI pipeline time. - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -### Bug Fixes - -* **release:** package.json publish config non-public [#753](https://github.com/hyperledger/cactus/issues/753) ([5a1b7a6](https://github.com/hyperledger/cactus/commit/5a1b7a6eba9a18d4f7474a3c44d4a4035fc99e84)) - -### Features - -* **api-server:** add prometheus exporter ([c348aa4](https://github.com/hyperledger/cactus/commit/c348aa4f858536bca350af6abd524a5d345aacc7)), closes [#539](https://github.com/hyperledger/cactus/issues/539) - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **cmd-api-server:** config generator emits correct type ([ecd63b9](https://github.com/hyperledger/cactus/commit/ecd63b9fac831f198f0f979754a7790f61133f49)), closes [#598](https://github.com/hyperledger/cactus/issues/598) -* **cmd-api-server:** missing pretsc npm script [#500](https://github.com/hyperledger/cactus/issues/500) ([a79b11a](https://github.com/hyperledger/cactus/commit/a79b11a3a0001a9fb9732da295451f1b424e7b35)) -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) - -### Features - -* **core-api:** plugin import types: LOCAL & REMOTE ([f4d51da](https://github.com/hyperledger/cactus/commit/f4d51dae5b28367e714a2b9aa35dd84a2cb4cb37)) -* **keychain:** add rust keychain plugin vault implementation ([6dcdb8a](https://github.com/hyperledger/cactus/commit/6dcdb8a02db30e4dfe3d912bd56d5979b0cb3bc3)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -### Bug Fixes - -* **api-server:** runtime plugin imports ([dcdfcf5](https://github.com/hyperledger/cactus/commit/dcdfcf59e8e5220e24093e3dbeb41f49f1e5ab1b)), closes [#346](https://github.com/hyperledger/cactus/issues/346) -* **cmd-api-server:** add IPluginImport to public API surface of package ([8734642](https://github.com/hyperledger/cactus/commit/8734642e01c916fe2c1fc0b8c0a58ebd1db7391b)) -* **cmd-api-server:** bundle name typos ([711ad71](https://github.com/hyperledger/cactus/commit/711ad7168d9ff89dd2ad04ee43efe158200e8fbc)), closes [#376](https://github.com/hyperledger/cactus/issues/376) -* **cmd-api-server:** disallow running on older than Node 12 but provide optional override ([332b306](https://github.com/hyperledger/cactus/commit/332b306c0c1a8cef21e27d116fc92158d3439128)), closes [#150](https://github.com/hyperledger/cactus/issues/150) -* **cmd-api-server:** plugin imports via static config (env,cli,file) ([d7e550e](https://github.com/hyperledger/cactus/commit/d7e550ee9b9483995c95e7a43d175e82bfb1ab6e)) - -### Features - -* **api-server:** TLS, mTLS support ([bcda595](https://github.com/hyperledger/cactus/commit/bcda595c84a1a6805c20375a45b318de3e092319)) -* **cmd-api-server:** fully dynamic plugin imports via config file/env/CLI ([fe396c9](https://github.com/hyperledger/cactus/commit/fe396c969436f1c1a99b6d03d8b58b160e1a93bb)) -* **common:** Servers utility class ([ad01dee](https://github.com/hyperledger/cactus/commit/ad01dee4def65f47e6292d117eaece2b2ebc1c3c)), closes [#260](https://github.com/hyperledger/cactus/issues/260) [#267](https://github.com/hyperledger/cactus/issues/267) -* **plugin-consortium-manual:** JSON Web Signatures for Nodes, Consortium ([caf60b3](https://github.com/hyperledger/cactus/commit/caf60b3f69c81617787afe73ca12165baa2dce50)) - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -### Bug Fixes - -* **api-server:** runtime plugin imports ([dcdfcf5](https://github.com/hyperledger/cactus/commit/dcdfcf59e8e5220e24093e3dbeb41f49f1e5ab1b)), closes [#346](https://github.com/hyperledger/cactus/issues/346) -* **cmd-api-server:** add IPluginImport to public API surface of package ([8734642](https://github.com/hyperledger/cactus/commit/8734642e01c916fe2c1fc0b8c0a58ebd1db7391b)) -* **cmd-api-server:** bundle name typos ([711ad71](https://github.com/hyperledger/cactus/commit/711ad7168d9ff89dd2ad04ee43efe158200e8fbc)), closes [#376](https://github.com/hyperledger/cactus/issues/376) -* **cmd-api-server:** disallow running on older than Node 12 but provide optional override ([332b306](https://github.com/hyperledger/cactus/commit/332b306c0c1a8cef21e27d116fc92158d3439128)), closes [#150](https://github.com/hyperledger/cactus/issues/150) -* **cmd-api-server:** plugin imports via static config (env,cli,file) ([d7e550e](https://github.com/hyperledger/cactus/commit/d7e550ee9b9483995c95e7a43d175e82bfb1ab6e)) - -### Features - -* **api-server:** TLS, mTLS support ([bcda595](https://github.com/hyperledger/cactus/commit/bcda595c84a1a6805c20375a45b318de3e092319)) -* **cmd-api-server:** fully dynamic plugin imports via config file/env/CLI ([fe396c9](https://github.com/hyperledger/cactus/commit/fe396c969436f1c1a99b6d03d8b58b160e1a93bb)) -* **common:** Servers utility class ([ad01dee](https://github.com/hyperledger/cactus/commit/ad01dee4def65f47e6292d117eaece2b2ebc1c3c)), closes [#260](https://github.com/hyperledger/cactus/issues/260) [#267](https://github.com/hyperledger/cactus/issues/267) -* **plugin-consortium-manual:** JSON Web Signatures for Nodes, Consortium ([caf60b3](https://github.com/hyperledger/cactus/commit/caf60b3f69c81617787afe73ca12165baa2dce50)) diff --git a/packages/cactus-cmd-api-server/README.md b/packages/cactus-cmd-api-server/README.md deleted file mode 100644 index 9e93c5acb8..0000000000 --- a/packages/cactus-cmd-api-server/README.md +++ /dev/null @@ -1,571 +0,0 @@ -# `@hyperledger/cactus-cmd-api-server` - -- [Summary](#summary) -- [Usage](#usage) - - [Basic Example](#basic-example) - - [Remote Plugin Imports at Runtime Example](#remote-plugin-imports-at-runtime-example) - - [Complete Example](#complete-example) -- [Deployment Scenarios](#deployment-scenarios) - - [Production Deployment Example](#production-deployment-example) - - [Low Resource Deployment Example](#low-resource-deployment-example) -- [Containerization](#containerization) - - [Building the container image locally](#building-the-container-image-locally) - - [Running the container image locally](#running-the-container-image-locally) - - [Running Locally Built Image with Locally Modified Plugins Without npm/ghcr Publishishing](#running-locally-built-image-with-locally-modified-plugins-without-npmghcr-publishishing) - - [Testing API calls with the container](#testing-api-calls-with-the-container) - - [Running a Security Scan on the Built Container Image](#running-a-security-scan-on-the-built-container-image) -- [Prometheus Exporter](#prometheus-exporter) - - [Usage Prometheus](#usage-prometheus) - - [Prometheus Integration](#prometheus-integration) - - [Shutdown Hook](#shutdown-hook) - - [Helper code](#helper-code) - - [response.type.ts](#responsetypets) - - [data-fetcher.ts](#data-fetcherts) - - [metrics.ts](#metricsts) -- [FAQ](#faq) - - [What is the difference between a Cactus Node and a Cactus API Server?](#what-is-the-difference-between-a-cactus-node-and-a-cactus-api-server) - - [Is the API server horizontally scalable?](#is-the-api-server-horizontally-scalable) - - [Does the API server automatically protect me from malicious plugins?](#does-the-api-server-automatically-protect-me-from-malicious-plugins) - - [Can I use the API server with plugins deployed as a service?](#can-i-use-the-api-server-with-plugins-deployed-as-a-service) - -## Summary - -This package is part of the Hyperledger Cactus blockchain integration framework -and is used as a shell/container of sort for housing different Cactus plugins -(which all live in their own npm packages as well). - -The API server gives you for free the following benefits, should you choose to -use it: -1. Automatic wiring of API endpoints for Cactus plugins which implement the `IPluginWebService` Typescript interface -2. Lightweight inversion of control container provided to plugins in the form of the `PluginRegistry` so that plugins can depend on each other in a way that each plugin instance can be uniquely identified and obtained by other plugins. A great example of this in action is ledger connector plugins frequently using the `PluginRegistry` to look up instances of keychain plugins to get access to secrets that are needed for the connector plugins to accomplish certain tasks such as cryptographically signing some information or SSH-ing into a server instance in order to upload and deploy binary (or otherwise) artifacts of smart contracts. - -## Usage - -Like with most parts of the framework in Cactus, using the `ApiServer` is optional. - -To see the `ApiServer` in action, the end to end tests of the framework are a great -place to start. -A few excerpts that regularly occur in said tests can be seen below as well for -the reader's convenience. - -One of our design principles for the framework is **secure by default** which -means that the API servers -1. assumes TLS is enabled by default and -2. cross-origin resource sharing is disabled completely - -### Basic Example - -```typescript -#!/usr/bin/env node - -import { ApiServer } from "../api-server"; -import { ConfigService } from "../config/config-service"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; - -const log: Logger = LoggerProvider.getOrCreate({ - label: "cactus-api", - level: "INFO", -}); - -const main = async () => { - const configService = new ConfigService(); - const config = await configService.getOrCreate(); - const serverOptions = config.getProperties(); - - LoggerProvider.setLogLevel(serverOptions.logLevel); - - if (process.argv[2].includes("help")) { - const helpText = ConfigService.getHelpText(); - console.log(helpText); - log.info(`Effective Configuration:`); - log.info(JSON.stringify(serverOptions, null, 4)); - } else { - const apiServer = new ApiServer({ config: serverOptions }); - await apiServer.start(); - } -}; - -export async function launchApp(): Promise { - try { - await main(); - log.info(`Cactus API server launched OK `); - } catch (ex) { - log.error(`Cactus API server crashed: `, ex); - process.exit(1); - } -} - -if (require.main === module) { - launchApp(); -} - -``` - -### Remote Plugin Imports at Runtime Example - -```typescript -import { PluginImportType, PluginImportAction } from "@hyperledger/cactus-core-api"; -import { ApiServer } from "@hyperledger/cactus-cmd-api-server"; -import { ConfigService } from "@hyperledger/cactus-cmd-api-server"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; - -const main = async () => { - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - // If there is no configuration file on the file system, just set it to empty string - apiServerOptions.configFile = ""; - // Enable CORS for - apiServerOptions.apiCorsDomainCsv = "your.domain.example.com"; - apiServerOptions.apiPort = 3000; - apiServerOptions.cockpitPort = 3100; - apiServerOptions.grpcPort = 5000; - // Disble TLS (or provide TLS certs for secure HTTP if you are deploying to production) - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = [ - { - // npm package name of the plugin you are installing - // Since this will be imported at runtime, you are responsible for - // installing the package yourself prior to launching the API server. - packageName: "@hyperledger/cactus-plugin-keychain-vault", - // The REMOTE value means that a different plugin factory will be imported and - // called to obtain the plugin instance. This way plugins can support them - // being imported by the API server regardless of the language the plugin - // was written in. - type: PluginImportType.REMOTE, - // The INSTALL value means that the plugin will be installed instead of - // only instantiate it - action: PluginImportAction.INSTALL, - // The options that will be passed in to the plugin factory - options: { - keychainId: "_keychainId_", - instanceId: "_instanceId_", - remoteConfig: configuration, - }, - }, - ]; - const config = await configService.newExampleConfigConvict(apiServerOptions); - - const apiServer = new ApiServer({ - config: config.getProperties(), - }); - - // start the API server here and you are ready to roll -}; - -export async function launchApp(): Promise { - try { - await main(); - log.info(`Cactus API server launched OK `); - } catch (ex) { - log.error(`Cactus API server crashed: `, ex); - process.exit(1); - } -} - -if (require.main === module) { - launchApp(); -} - -``` - -### Complete Example - -For a complete example of how to use the API server, read all the code of the -supply chain example's backend package: - -https://github.com/hyperledger/cactus/tree/main/examples/cactus-example-supply-chain-backend/src/main/typescript - -## Deployment Scenarios - -There's a set of building blocks (members, nodes, API server processes, plugin instances) that you can use when defining (founding) a consortium and these building blocks relate to each other in a way that can be expressed with an entity relationship diagram which can be seen below. -The composability rules can be deducted from how the diagram elements (entities) are connected (related) to each other, e.g. the API server process can have any number of plugin instances in it and a node can contain any number of API server processes, and so on until the top level construct is reached: the consortium. - -> Consortium management does not relate to achieving consensus on data/transactions involving individual ledgers, merely about consensus on the metadata of a consortium. - -![deployment-entity-relationship-diagram.png](https://github.com/hyperledger/cactus/raw/4a337be719a9d2e2ccb877edccd7849f4be477ec/whitepaper/deployment-entity-relationship-diagram.png) - -Now, with these composability rules in mind, let us demonstrate a few different deployment scenarios (both expected and exotic ones) to showcase the framework's flexibility in this regard. - -### Production Deployment Example - -Many different configurations are possible here as well. -One way to have two members form a consortium and both of those members provide highly available, high throughput services is to have a deployment as shown on the below figure. -What is important to note here is that this consortium has 2 nodes, 1 for each member -and it is irrelevant how many API servers those nodes have internally because they -all respond to requests through the network host/web domain that is tied to the -node. -One could say that API servers do not have a distinguishable identity relative to -their peer API servers, only the higher-level nodes do. - -![deployment-production-example.png](https://github.com/hyperledger/cactus/raw/4a337be719a9d2e2ccb877edccd7849f4be477ec/whitepaper/deployment-production-example.png) - -### Low Resource Deployment Example - -This is an example to showcase how you can pull up a full consortium even from -within a single operating system process (API server) with multiple members and -their respective nodes. It is not something that's recommended for a production -grade environment, ever, but it is great for demos and integration tests where -you have to simulate a fully functioning consortium with as little hardware footprint -as possible to save on time and cost. - -The individual nodes/API servers are isolated by listening on seperate TCP ports -of the machine they are hosted on: - -![deployment-low-resource-example.png](https://github.com/hyperledger/cactus/raw/4a337be719a9d2e2ccb877edccd7849f4be477ec/whitepaper/deployment-low-resource-example.png) - -## Containerization - -### Building the container image locally - -In the project root directory run these commands on the terminal: - -```sh -yarn configure -yarn lerna run build:bundle --scope=@hyperledger/cactus-cmd-api-server - -``` - -```sh -DOCKER_BUILDKIT=1 docker build \ - --file ./packages/cactus-cmd-api-server/cmd-api-server.Dockerfile \ - ./packages/cactus-cmd-api-server \ - --tag cas \ - --tag cmd-api-server \ - --tag ghcr.io/hyperledger/cactus-cmd-api-server:$(date +"%Y-%m-%dT%H-%M-%S" --utc)-dev-$(git rev-parse --short HEAD) -``` - -### Running the container image locally - -Before running the examples here you need to build the image locally. -See section [Building the container image locally](#building-the-container-image-locally) for details on how to do that. - -Once you've built the container, the following commands should work: - -- Launch container - no plugins, default configuration - ```sh - docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - cas - ``` - -- Launch container with plugins of your choice (keychain, consortium connector, etc.) - - ```sh - docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - cas \ - node index.js \ - --plugins='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-fabric", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": { "version": "dev", "peerBinary":"/fabric-samples/bin/peer", "connectionProfile": {}, "instanceId": "some-unique-instance-id"}}]' - ``` - -- Launch container with plugin configuration as an **environment variable**: - ```sh - docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - --env PLUGINS='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": { "rpcApiWsHost": "http://127.0.0.1:8546", "rpcApiHttpHost": "http://127.0.0.1:8545", "instanceId": "some-unique-besu-connector-instance-id"}}]' \ - cas - ``` - -- Launch container with plugin configuration as a **CLI argument**: - ```sh - docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - cas \ - node index.js \ - --plugins='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": { "rpcApiWsHost": "http://127.0.0.1:8546", "rpcApiHttpHost": "http://127.0.0.1:8545", "instanceId": "some-unique-besu-connector-instance-id"}}]' - ``` - -- Launch container with **configuration file** mounted from host machine: - ```sh - - echo '{"plugins": [{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": { "rpcApiWsHost": "http://127.0.0.1:8546", "rpcApiHttpHost": "http://127.0.0.1:8545", "instanceId": "some-unique-besu-connector-instance-id"}}]}' > .cacti-config.json - - docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - --mount type=bind,source="$(pwd)"/.cacti-config.json,target=/.cacti-config.json \ - cas \ - node index.js \ - --config-file=/.cacti-config.json - ``` - -### Running Locally Built Image with Locally Modified Plugins Without npm/ghcr Publishishing - -It can be very inconvenient to have to publish npm packages just for testing. If you'd like to -evaluate some changes you've made in a plugin, but need to have the plugin installed in the API -server for it then you can use a command like the one below to make it use the local version with your changes. - -There are two things necessary for this scenario to work: -1. You must mount the project folder of your host machine onto the container's file-system. See `--volume ${PWD}:/usr/src/cacti` parameter below in the example command. This (when executed from your Cacti repository root) will mount the entire project within the container under `/usr/src/cacti/`. The reason why this is necessary is because this will allow us to instruct the API server through configuration that when it is running the besu connector plugin, it should not pull it from the registry, but instead directly from the file-system from a given path that we provide in the configuration. -2. You must specify the `packageSrc` optional parameter when declaring the constructor options of the plugin you are going to install. See the section of the configuration below that looks like this: `"options": { "packageSrc": "/usr/src/cacti/packages/cactus-plugin-ledger-connector-besu", .. }`. What the latter instructs the API server to do is the installation source override mentioned earlier: It will import and run an instance of the Besu connector plugin which was built locally on your host computer. Of course for this to work you have to make sure to have a working build so that the `./dist/` folder of your plugin contains the actual `.js` source files which the API server will then import. - -```sh -docker run \ - --rm \ - --volume ${PWD}:/usr/src/cacti \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=DEBUG \ - --env PLUGINS='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": { "packageSrc": "/usr/src/cacti/packages/cactus-plugin-ledger-connector-besu", "rpcApiWsHost": "http://127.0.0.1:8546", "rpcApiHttpHost": "http://127.0.0.1:8545", "instanceId": "some-unique-besu-connector-instance-id"}}]' \ - cas -``` - -### Testing API calls with the container - -Don't have a Besu network on hand to test with? Test or develop against our Besu All-In-One container! - -1. Terminal Window 1 (Ledger) - ```sh - docker run \ - --rm \ - --publish 8545:8545 \ - --publish 8546:8546 \ - ghcr.io/hyperledger/cactus-besu-all-in-one:2024-07-03-08925ff - ``` - -2. Terminal Window 2 (Cactus API Server) - ```sh - docker run \ - --network host \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - --env PLUGINS='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": { "rpcApiWsHost": "http://127.0.0.1:8546", "rpcApiHttpHost": "http://127.0.0.1:8545", "instanceId": "some-unique-besu-connector-instance-id"}}]' \ - cas - ``` - -3. Terminal Window 3 (curl - replace eth accounts as needed) - ```sh - curl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "web3SigningCredential": { - "ethAccount": "627306090abaB3A6e1400e9345bC60c78a8BEf57", - "secret": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3", - "type": "PRIVATE_KEY_HEX" - }, - "consistencyStrategy": { - "blockConfirmations": 0, - "receiptType": "NODE_TX_POOL_ACK" - }, - "transactionConfig": { - "from": "627306090abaB3A6e1400e9345bC60c78a8BEf57", - "to": "f17f52151EbEF6C7334FAD080c5704D77216b732", - "value": 1, - "gas": 10000000 - } - }' - ``` - -4. The above should produce a response that looks similar to this: - - ```json - { - "success": true, - "data": { - "transactionReceipt": { - "blockHash": "0x7c97c038a5d3bd84613fe23ed442695276d5d2df97f4e7c4f10ca06765033ffd", - "blockNumber": 1218, - "contractAddress": null, - "cumulativeGasUsed": 21000, - "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "gasUsed": 21000, - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "status": true, - "to": "0xf17f52151ebef6c7334fad080c5704d77216b732", - "transactionHash": "0xc7fcb46c735bdc696d500bfc70c72595a2b8c31813929e5c61d9a5aec3376d6f", - "transactionIndex": 0 - } - } - } - ``` - -### Running a Security Scan on the Built Container Image - -After having built the container image with the command(s) described above, you can -run the Trivy tool to scan for security vulnerabilities. - -> The `trivy` binary is preinstalled within the VSCode dev container so make sure -> to open the project in that if you would prefer not to install Trivy on your host -> operating system. - -```sh -trivy image --scanners=vuln --vuln-type=os,library --severity=CRITICAL --severity=HIGH cas -``` - -## Prometheus Exporter -This class creates a prometheus exporter, which scrapes the total Cactus node count. - -### Usage Prometheus -The prometheus exporter object is initialized in the `ApiServer` class constructor itself, so instantiating the object of the `ApiServer` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IApiServerConstructorOptions` interface for `ApiServer` constructor. - -`getPrometheusMetricsV1` function returns the prometheus exporter metrics, currently displaying the total plugins imported, which currently refreshes to match the plugin count, everytime `setTotalPluginImports` method is called. - -### Prometheus Integration -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'consortium_manual_exporter' - metrics_path: /api/v1/api-server/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/api-server/get-prometheus-exporter-metrics/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_api_server_total_plugin_imports** and click **execute** - -### Shutdown Hook - -The API config contains a flag: -```json - { - "enableShutdownHook": true - } -``` -This allows for graceful shutdown of the API server after a SIGINT via cli CTRL + C. This hook can be disabled by passing in false either via the TypeScript constructor or the JSON config file. - - - -### Helper code - -###### response.type.ts -This file contains the various responses of the metrics. - -###### data-fetcher.ts -This file contains functions encasing the logic to process the data points. - -###### metrics.ts -This file lists all the prometheus metrics and what they are used for. - - - - - -## FAQ - -### What is the difference between a Cactus Node and a Cactus API Server? - -The node is what has an identity within your PKI and can be made up of 1-N API -server instances that all share the same configuration/identity of the node. -See deployment scenarios above for a much more detailed explanation. - -### Is the API server horizontally scalable? - -**Yes, 100%.** -Keep in mind though that the API server can be loaded up with arbitrary plugins -meaning that if you write a plugin that has a central database that can only -do 1 transaction per second, then it will not help you much that the API server -itself is horizontally scalable because deploying a thousand instances of the -API server will just result in you having a thousand instances of your plugin -all waiting for that underlying database with its 1 TPS throughput hogging your -system. -When we say that the API server is horizontally scalable, we mean that the API -server itself is designed not to have any such state mentioned in the example -above. -You are responsible for only deploying plugins in the API server that are -horizontally scalable as well. In short, your whole system is only horizontally -scalable if all components of it are horizontally scalable. - -### Does the API server automatically protect me from malicious plugins? - -**No.** If you install a third-party plugin that wasn't vetted by anyone and that -plugin happens to have malicious code in it to steal your private keys, it can -do so. -You are responsible for making sure that the plugins you install have no known -security vulnerabilities or backdoors e.g. they are considered "secure". -The double quotes around "secure" is meant to signify the fact that no software -is ever really truly secure, just merely lacking of known vulnerabilities at -any given point in time. - -### Can I use the API server with plugins deployed as a service? - -**Yes.** You can deploy your plugin written in any language, anywhere as long -as it is accessible over the network and does come with a Typescript API client -that you can use to install into the API server as a proxy for an in-process -plugin implementation. diff --git a/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile b/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile deleted file mode 100644 index 1bc1052b92..0000000000 --- a/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM node:22.4.0-bookworm-slim - -# CVE-2023-31484 - perl: CPAN.pm does not verify TLS certificates when downloading distributions over HTTPS... -RUN apt-get remove -y --allow-remove-essential perl perl-base && apt-get autoremove -y - -ARG APP_DIR=/opt/cacti/cmd-api-server -WORKDIR ${APP_DIR} - -COPY ./dist/bundle/ncc/ ${APP_DIR} -COPY ./cmd-api-server.Dockerfile.healthcheck.mjs ${APP_DIR} -CMD ["node", "index.js"] - -HEALTHCHECK --interval=5s --timeout=1s --start-period=1s --retries=60 CMD [ "node", "./cmd-api-server.Dockerfile.healthcheck.mjs", "http", "localhost", "4000" ] - -# FIXME: Stop hardcoding the less secure defaults once we've migrated to yarts -# for CMD/ENV configuration file parsing. -ENV COCKPIT_TLS_ENABLED=false -ENV COCKPIT_CORS_DOMAIN_CSV=\* -ENV COCKPIT_MTLS_ENABLED=false -ENV COCKPIT_TLS_CERT_PEM=- -ENV COCKPIT_TLS_KEY_PEM=- -ENV COCKPIT_TLS_CLIENT_CA_PEM=- - -ENV TZ=Etc/UTC -ENV NODE_ENV=production diff --git a/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile.dockerignore b/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile.dockerignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile.healthcheck.mjs b/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile.healthcheck.mjs deleted file mode 100644 index 3d2fc251c9..0000000000 --- a/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile.healthcheck.mjs +++ /dev/null @@ -1,51 +0,0 @@ -/** - * The healthcheck script for the Cacti API Server written in pure NodeJS without - * any external dependencies. - * - * USAGE - * ----- - * - * ```sh - * $ node cmd-api-server.Dockerfile.healthcheck.mjs http localhost 4000 - * http://localhost:4000/api/v1/api-server/healthcheck Healthcheck OK: 200 OK - * ``` - * - * FAQ - * --- - * - * Q: Why though? Why not just use cURL or wget - * or any other command line utility to perform HTTP requests? - * A: This has zero OS level package dependencies and will work without the - * container image having to have new software installed. This reduces the footprint - * of the image and also the attack surfaces that we have. The slight increase in - * complexity is a trade-off we consider worth having because this script is not - * part of the API server's own codebase and therefore does not affect the complexity - * of that as such. - */ - -import http from "http"; -import https from "https"; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const [nodeBinary, script, protocol, host, port, path] = process.argv; - -const thePath = path ?? "/api/v1/api-server/healthcheck"; -const isSecureHttp = protocol === "https"; -const httpModule = isSecureHttp ? https : http; - -const url = `${protocol}://${host}:${port}${thePath}`; - -httpModule - .get(url, (res) => { - const { statusCode, statusMessage } = res; - const exitCode = statusCode >= 200 && statusCode <= 300 ? 0 : 1; - if (exitCode === 0) { - console.log("%s Healthcheck OK: ", url, statusCode, statusMessage); - } else { - console.error("%s Healthcheck FAIL: ", url, statusCode, statusMessage); - } - process.exit(exitCode); - }) - .on("error", (ex) => { - console.error("%s Healthcheck FAIL: ", url, ex); - }); diff --git a/packages/cactus-cmd-api-server/openapitools.json b/packages/cactus-cmd-api-server/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-cmd-api-server/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-cmd-api-server/package.json b/packages/cactus-cmd-api-server/package.json deleted file mode 100644 index bc904396d8..0000000000 --- a/packages/cactus-cmd-api-server/package.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "name": "@hyperledger/cactus-cmd-api-server", - "version": "2.0.0", - "description": "API server that combines and exposes all the functionality of a Cactus deployment through a unified REST API interface.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-cmd-api-server.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "benchmark": "tsx ./src/test/typescript/benchmark/run-cmd-api-server-benchmark.ts .tmp/benchmark-results/cmd-api-server/run-cmd-api-server-benchmark.ts.log", - "build:bundle": "ncc build ./dist/lib/main/typescript/cmd/cactus-api.js --minify --out=./dist/bundle/ncc/", - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "codegen:proto": "run-s proto:openapi proto:protoc-gen-ts", - "generate-sdk": "run-s 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "proto:openapi": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g protobuf-schema --model-name-suffix=PB --additional-properties=packageName=org.hyperledger.cactus.cmd_api_server -o ./src/main/proto/generated/openapi/ -t=./src/main/openapi-generator/templates/protobuf-schema/", - "proto:protoc-gen-ts": "yarn run grpc_tools_node_protoc --plugin=protoc-gen-ts=../../node_modules/.bin/protoc-gen-ts --ts_out=grpc_js:./src/main/typescript/generated/proto/protoc-gen-ts/ --proto_path ./src/main/proto/generated/openapi/ ./src/main/proto/generated/openapi/services/*.proto", - "start:bundle": "node ./dist/bundle/ncc/index.js --config-file=../../.config.json", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@bufbuild/protobuf": "1.10.0", - "@connectrpc/connect": "1.4.0", - "@connectrpc/connect-express": "1.4.0", - "@connectrpc/connect-fastify": "1.4.0", - "@connectrpc/connect-node": "1.4.0", - "@grpc/grpc-js": "1.11.3", - "@grpc/proto-loader": "0.7.13", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@thream/socketio-jwt": "2.1.1", - "async-exit-hook": "2.0.1", - "axios": "1.7.7", - "bluebird": "3.7.2", - "body-parser": "1.20.3", - "compression": "1.7.4", - "convict": "6.2.4", - "convict-format-with-validator": "6.2.0", - "cors": "2.8.5", - "express": "4.21.0", - "express-http-proxy": "1.6.2", - "express-jwt": "8.4.1", - "express-openapi-validator": "5.2.0", - "express-rate-limit": "6.7.0", - "fastify": "4.28.1", - "fs-extra": "11.2.0", - "google-protobuf": "3.21.4", - "jose": "4.15.5", - "json-stable-stringify": "1.0.2", - "lmify": "0.3.0", - "node-forge": "1.3.0", - "prom-client": "15.1.3", - "run-time-error-cjs": "1.4.0", - "rxjs": "7.8.1", - "safe-stable-stringify": "2.4.3", - "semver": "7.6.2", - "socket.io": "4.6.2", - "socket.io-client-fixed-types": "4.5.4", - "typescript-optional": "2.0.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@bufbuild/buf": "1.30.0", - "@bufbuild/protoc-gen-es": "1.8.0", - "@connectrpc/protoc-gen-connect-es": "1.4.0", - "@hyperledger/cactus-plugin-keychain-vault": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@openapitools/openapi-generator-cli": "2.7.0", - "@types/async-exit-hook": "2.0.2", - "@types/benchmark": "2.1.5", - "@types/compression": "1.7.4", - "@types/convict": "6.1.1", - "@types/cors": "2.8.12", - "@types/express": "5.0.0", - "@types/express-http-proxy": "1.6.2", - "@types/google-protobuf": "3.15.5", - "@types/json-stable-stringify": "1.0.34", - "@types/jsonwebtoken": "8.5.4", - "@types/multer": "1.4.7", - "@types/node-forge": "1.0.1", - "@types/passport": "1.0.7", - "@types/passport-oauth2": "1.4.11", - "@types/passport-saml": "1.1.3", - "@types/passport-strategy": "0.2.35", - "@types/semver": "7.3.8", - "@types/uuid": "10.0.0", - "@types/xml2js": "0.4.9", - "@vercel/ncc": "0.38.1", - "benchmark": "2.1.4", - "google-protobuf": "3.21.4", - "grpc-tools": "1.12.4", - "grpc_tools_node_protoc_ts": "5.3.3", - "http-status-codes": "2.1.4", - "protobufjs": "7.4.0", - "tsx": "4.16.2" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-cmd-api-server.web.umd.min.js", - "mainMinified": "dist/cactus-cmd-api-server.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 8c0f008a05..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,13 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_health_check_response.go -model_memory_usage.go -model_watch_healthcheck_v1.go -response.go -utils.go diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 548fe6c56c..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,116 +0,0 @@ -# Go API client for cactus-cmd-api-server - -Interact with a Cactus deployment through HTTP. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-cmd-api-server "github.com/hyperledger/cactus-cmd-api-server/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-cmd-api-server.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-cmd-api-server.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-cmd-api-server.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-cmd-api-server.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**GetHealthCheckV1**](docs/DefaultApi.md#gethealthcheckv1) | **Get** /api/v1/api-server/healthcheck | Can be used to verify liveness of an API server instance -*DefaultApi* | [**GetOpenApiSpecV1**](docs/DefaultApi.md#getopenapispecv1) | **Get** /api/v1/api-server/get-open-api-spec | -*DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/api-server/get-prometheus-exporter-metrics | Get the Prometheus Metrics - - -## Documentation For Models - - - [HealthCheckResponse](docs/HealthCheckResponse.md) - - [MemoryUsage](docs/MemoryUsage.md) - - [WatchHealthcheckV1](docs/WatchHealthcheckV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index b25ac93cc3..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,129 +0,0 @@ -openapi: 3.0.3 -info: - description: Interact with a Cactus deployment through HTTP. - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus API - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/api-server/healthcheck: - get: - description: Returns the current timestamp of the API server as proof of health/liveness - operationId: getHealthCheckV1 - parameters: [] - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HealthCheckResponse' - description: OK - summary: Can be used to verify liveness of an API server instance - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/api-server/healthcheck - /api/v1/api-server/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/api-server/get-prometheus-exporter-metrics - /api/v1/api-server/get-open-api-spec: - get: - description: Returns the openapi.json document of specific plugin. - operationId: getOpenApiSpecV1 - parameters: [] - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetOpenApiSpecV1EndpointResponse' - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/api-server/get-open-api-spec -components: - schemas: - WatchHealthcheckV1: - enum: - - org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Subscribe - - org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Next - - org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Unsubscribe - - org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Error - - org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Complete - type: string - x-enum-varnames: - - Subscribe - - Next - - Unsubscribe - - Error - - Complete - MemoryUsage: - example: - heapUsed: 1.4658129805029452 - external: 5.962133916683182 - rss: 0.8008281904610115 - heapTotal: 6.027456183070403 - arrayBuffers: 5.637376656633329 - properties: - rss: - title: Resident Set Size - type: number - heapTotal: - title: V8 memory usage - heap total - type: number - heapUsed: - title: V8 memory usage - heap used - type: number - external: - title: Memory usage of C++ objects bound to JavaScript objects managed by - V8 - type: number - arrayBuffers: - title: "Memory allocated for ArrayBuffers and SharedArrayBuffers, including\ - \ all Node.js Buffers" - type: number - type: object - HealthCheckResponse: - example: - createdAt: createdAt - memoryUsage: - heapUsed: 1.4658129805029452 - external: 5.962133916683182 - rss: 0.8008281904610115 - heapTotal: 6.027456183070403 - arrayBuffers: 5.637376656633329 - success: true - properties: - success: - type: boolean - createdAt: - type: string - memoryUsage: - $ref: '#/components/schemas/MemoryUsage' - required: - - createdAt - - memoryUsage - type: object - PrometheusExporterMetricsResponse: - nullable: false - type: string - GetOpenApiSpecV1EndpointResponse: - nullable: false - type: string diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 27da765c0c..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,318 +0,0 @@ -/* -Hyperledger Cactus API - -Interact with a Cactus deployment through HTTP. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-cmd-api-server - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiGetHealthCheckV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetHealthCheckV1Request) Execute() (*HealthCheckResponse, *http.Response, error) { - return r.ApiService.GetHealthCheckV1Execute(r) -} - -/* -GetHealthCheckV1 Can be used to verify liveness of an API server instance - -Returns the current timestamp of the API server as proof of health/liveness - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetHealthCheckV1Request -*/ -func (a *DefaultApiService) GetHealthCheckV1(ctx context.Context) ApiGetHealthCheckV1Request { - return ApiGetHealthCheckV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return HealthCheckResponse -func (a *DefaultApiService) GetHealthCheckV1Execute(r ApiGetHealthCheckV1Request) (*HealthCheckResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HealthCheckResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetHealthCheckV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/api-server/healthcheck" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetOpenApiSpecV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetOpenApiSpecV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetOpenApiSpecV1Execute(r) -} - -/* -GetOpenApiSpecV1 Method for GetOpenApiSpecV1 - -Returns the openapi.json document of specific plugin. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetOpenApiSpecV1Request -*/ -func (a *DefaultApiService) GetOpenApiSpecV1(ctx context.Context) ApiGetOpenApiSpecV1Request { - return ApiGetOpenApiSpecV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetOpenApiSpecV1Execute(r ApiGetOpenApiSpecV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetOpenApiSpecV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/api-server/get-open-api-spec" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsV1Execute(r) -} - -/* -GetPrometheusMetricsV1 Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsV1Request -*/ -func (a *DefaultApiService) GetPrometheusMetricsV1(ctx context.Context) ApiGetPrometheusMetricsV1Request { - return ApiGetPrometheusMetricsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsV1Execute(r ApiGetPrometheusMetricsV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetricsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/api-server/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index a3b0f19744..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus API - -Interact with a Cactus deployment through HTTP. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-cmd-api-server - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus API API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index c69a1313a5..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus API - -Interact with a Cactus deployment through HTTP. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-cmd-api-server - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index cf6f7e9b4a..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-cmd-api-server/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/model_health_check_response.go b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/model_health_check_response.go deleted file mode 100644 index 8aca3bede0..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/model_health_check_response.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Hyperledger Cactus API - -Interact with a Cactus deployment through HTTP. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-cmd-api-server - -import ( - "encoding/json" -) - -// checks if the HealthCheckResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HealthCheckResponse{} - -// HealthCheckResponse struct for HealthCheckResponse -type HealthCheckResponse struct { - Success *bool `json:"success,omitempty"` - CreatedAt string `json:"createdAt"` - MemoryUsage MemoryUsage `json:"memoryUsage"` -} - -// NewHealthCheckResponse instantiates a new HealthCheckResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHealthCheckResponse(createdAt string, memoryUsage MemoryUsage) *HealthCheckResponse { - this := HealthCheckResponse{} - this.CreatedAt = createdAt - this.MemoryUsage = memoryUsage - return &this -} - -// NewHealthCheckResponseWithDefaults instantiates a new HealthCheckResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHealthCheckResponseWithDefaults() *HealthCheckResponse { - this := HealthCheckResponse{} - return &this -} - -// GetSuccess returns the Success field value if set, zero value otherwise. -func (o *HealthCheckResponse) GetSuccess() bool { - if o == nil || IsNil(o.Success) { - var ret bool - return ret - } - return *o.Success -} - -// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HealthCheckResponse) GetSuccessOk() (*bool, bool) { - if o == nil || IsNil(o.Success) { - return nil, false - } - return o.Success, true -} - -// HasSuccess returns a boolean if a field has been set. -func (o *HealthCheckResponse) HasSuccess() bool { - if o != nil && !IsNil(o.Success) { - return true - } - - return false -} - -// SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *HealthCheckResponse) SetSuccess(v bool) { - o.Success = &v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *HealthCheckResponse) GetCreatedAt() string { - if o == nil { - var ret string - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *HealthCheckResponse) GetCreatedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *HealthCheckResponse) SetCreatedAt(v string) { - o.CreatedAt = v -} - -// GetMemoryUsage returns the MemoryUsage field value -func (o *HealthCheckResponse) GetMemoryUsage() MemoryUsage { - if o == nil { - var ret MemoryUsage - return ret - } - - return o.MemoryUsage -} - -// GetMemoryUsageOk returns a tuple with the MemoryUsage field value -// and a boolean to check if the value has been set. -func (o *HealthCheckResponse) GetMemoryUsageOk() (*MemoryUsage, bool) { - if o == nil { - return nil, false - } - return &o.MemoryUsage, true -} - -// SetMemoryUsage sets field value -func (o *HealthCheckResponse) SetMemoryUsage(v MemoryUsage) { - o.MemoryUsage = v -} - -func (o HealthCheckResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HealthCheckResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Success) { - toSerialize["success"] = o.Success - } - toSerialize["createdAt"] = o.CreatedAt - toSerialize["memoryUsage"] = o.MemoryUsage - return toSerialize, nil -} - -type NullableHealthCheckResponse struct { - value *HealthCheckResponse - isSet bool -} - -func (v NullableHealthCheckResponse) Get() *HealthCheckResponse { - return v.value -} - -func (v *NullableHealthCheckResponse) Set(val *HealthCheckResponse) { - v.value = val - v.isSet = true -} - -func (v NullableHealthCheckResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableHealthCheckResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHealthCheckResponse(val *HealthCheckResponse) *NullableHealthCheckResponse { - return &NullableHealthCheckResponse{value: val, isSet: true} -} - -func (v NullableHealthCheckResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHealthCheckResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/model_memory_usage.go b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/model_memory_usage.go deleted file mode 100644 index 00a5c59098..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/model_memory_usage.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -Hyperledger Cactus API - -Interact with a Cactus deployment through HTTP. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-cmd-api-server - -import ( - "encoding/json" -) - -// checks if the MemoryUsage type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MemoryUsage{} - -// MemoryUsage struct for MemoryUsage -type MemoryUsage struct { - Rss *float32 `json:"rss,omitempty"` - HeapTotal *float32 `json:"heapTotal,omitempty"` - HeapUsed *float32 `json:"heapUsed,omitempty"` - External *float32 `json:"external,omitempty"` - ArrayBuffers *float32 `json:"arrayBuffers,omitempty"` -} - -// NewMemoryUsage instantiates a new MemoryUsage object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewMemoryUsage() *MemoryUsage { - this := MemoryUsage{} - return &this -} - -// NewMemoryUsageWithDefaults instantiates a new MemoryUsage object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewMemoryUsageWithDefaults() *MemoryUsage { - this := MemoryUsage{} - return &this -} - -// GetRss returns the Rss field value if set, zero value otherwise. -func (o *MemoryUsage) GetRss() float32 { - if o == nil || IsNil(o.Rss) { - var ret float32 - return ret - } - return *o.Rss -} - -// GetRssOk returns a tuple with the Rss field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MemoryUsage) GetRssOk() (*float32, bool) { - if o == nil || IsNil(o.Rss) { - return nil, false - } - return o.Rss, true -} - -// HasRss returns a boolean if a field has been set. -func (o *MemoryUsage) HasRss() bool { - if o != nil && !IsNil(o.Rss) { - return true - } - - return false -} - -// SetRss gets a reference to the given float32 and assigns it to the Rss field. -func (o *MemoryUsage) SetRss(v float32) { - o.Rss = &v -} - -// GetHeapTotal returns the HeapTotal field value if set, zero value otherwise. -func (o *MemoryUsage) GetHeapTotal() float32 { - if o == nil || IsNil(o.HeapTotal) { - var ret float32 - return ret - } - return *o.HeapTotal -} - -// GetHeapTotalOk returns a tuple with the HeapTotal field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MemoryUsage) GetHeapTotalOk() (*float32, bool) { - if o == nil || IsNil(o.HeapTotal) { - return nil, false - } - return o.HeapTotal, true -} - -// HasHeapTotal returns a boolean if a field has been set. -func (o *MemoryUsage) HasHeapTotal() bool { - if o != nil && !IsNil(o.HeapTotal) { - return true - } - - return false -} - -// SetHeapTotal gets a reference to the given float32 and assigns it to the HeapTotal field. -func (o *MemoryUsage) SetHeapTotal(v float32) { - o.HeapTotal = &v -} - -// GetHeapUsed returns the HeapUsed field value if set, zero value otherwise. -func (o *MemoryUsage) GetHeapUsed() float32 { - if o == nil || IsNil(o.HeapUsed) { - var ret float32 - return ret - } - return *o.HeapUsed -} - -// GetHeapUsedOk returns a tuple with the HeapUsed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MemoryUsage) GetHeapUsedOk() (*float32, bool) { - if o == nil || IsNil(o.HeapUsed) { - return nil, false - } - return o.HeapUsed, true -} - -// HasHeapUsed returns a boolean if a field has been set. -func (o *MemoryUsage) HasHeapUsed() bool { - if o != nil && !IsNil(o.HeapUsed) { - return true - } - - return false -} - -// SetHeapUsed gets a reference to the given float32 and assigns it to the HeapUsed field. -func (o *MemoryUsage) SetHeapUsed(v float32) { - o.HeapUsed = &v -} - -// GetExternal returns the External field value if set, zero value otherwise. -func (o *MemoryUsage) GetExternal() float32 { - if o == nil || IsNil(o.External) { - var ret float32 - return ret - } - return *o.External -} - -// GetExternalOk returns a tuple with the External field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MemoryUsage) GetExternalOk() (*float32, bool) { - if o == nil || IsNil(o.External) { - return nil, false - } - return o.External, true -} - -// HasExternal returns a boolean if a field has been set. -func (o *MemoryUsage) HasExternal() bool { - if o != nil && !IsNil(o.External) { - return true - } - - return false -} - -// SetExternal gets a reference to the given float32 and assigns it to the External field. -func (o *MemoryUsage) SetExternal(v float32) { - o.External = &v -} - -// GetArrayBuffers returns the ArrayBuffers field value if set, zero value otherwise. -func (o *MemoryUsage) GetArrayBuffers() float32 { - if o == nil || IsNil(o.ArrayBuffers) { - var ret float32 - return ret - } - return *o.ArrayBuffers -} - -// GetArrayBuffersOk returns a tuple with the ArrayBuffers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MemoryUsage) GetArrayBuffersOk() (*float32, bool) { - if o == nil || IsNil(o.ArrayBuffers) { - return nil, false - } - return o.ArrayBuffers, true -} - -// HasArrayBuffers returns a boolean if a field has been set. -func (o *MemoryUsage) HasArrayBuffers() bool { - if o != nil && !IsNil(o.ArrayBuffers) { - return true - } - - return false -} - -// SetArrayBuffers gets a reference to the given float32 and assigns it to the ArrayBuffers field. -func (o *MemoryUsage) SetArrayBuffers(v float32) { - o.ArrayBuffers = &v -} - -func (o MemoryUsage) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o MemoryUsage) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Rss) { - toSerialize["rss"] = o.Rss - } - if !IsNil(o.HeapTotal) { - toSerialize["heapTotal"] = o.HeapTotal - } - if !IsNil(o.HeapUsed) { - toSerialize["heapUsed"] = o.HeapUsed - } - if !IsNil(o.External) { - toSerialize["external"] = o.External - } - if !IsNil(o.ArrayBuffers) { - toSerialize["arrayBuffers"] = o.ArrayBuffers - } - return toSerialize, nil -} - -type NullableMemoryUsage struct { - value *MemoryUsage - isSet bool -} - -func (v NullableMemoryUsage) Get() *MemoryUsage { - return v.value -} - -func (v *NullableMemoryUsage) Set(val *MemoryUsage) { - v.value = val - v.isSet = true -} - -func (v NullableMemoryUsage) IsSet() bool { - return v.isSet -} - -func (v *NullableMemoryUsage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMemoryUsage(val *MemoryUsage) *NullableMemoryUsage { - return &NullableMemoryUsage{value: val, isSet: true} -} - -func (v NullableMemoryUsage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMemoryUsage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/model_watch_healthcheck_v1.go b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/model_watch_healthcheck_v1.go deleted file mode 100644 index 99f5cd9653..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/model_watch_healthcheck_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus API - -Interact with a Cactus deployment through HTTP. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-cmd-api-server - -import ( - "encoding/json" - "fmt" -) - -// WatchHealthcheckV1 the model 'WatchHealthcheckV1' -type WatchHealthcheckV1 string - -// List of WatchHealthcheckV1 -const ( - Subscribe WatchHealthcheckV1 = "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Subscribe" - Next WatchHealthcheckV1 = "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Next" - Unsubscribe WatchHealthcheckV1 = "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Unsubscribe" - Error WatchHealthcheckV1 = "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Error" - Complete WatchHealthcheckV1 = "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Complete" -) - -// All allowed values of WatchHealthcheckV1 enum -var AllowedWatchHealthcheckV1EnumValues = []WatchHealthcheckV1{ - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Subscribe", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Next", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Unsubscribe", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Error", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Complete", -} - -func (v *WatchHealthcheckV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := WatchHealthcheckV1(value) - for _, existing := range AllowedWatchHealthcheckV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WatchHealthcheckV1", value) -} - -// NewWatchHealthcheckV1FromValue returns a pointer to a valid WatchHealthcheckV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWatchHealthcheckV1FromValue(v string) (*WatchHealthcheckV1, error) { - ev := WatchHealthcheckV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WatchHealthcheckV1: valid values are %v", v, AllowedWatchHealthcheckV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v WatchHealthcheckV1) IsValid() bool { - for _, existing := range AllowedWatchHealthcheckV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WatchHealthcheckV1 value -func (v WatchHealthcheckV1) Ptr() *WatchHealthcheckV1 { - return &v -} - -type NullableWatchHealthcheckV1 struct { - value *WatchHealthcheckV1 - isSet bool -} - -func (v NullableWatchHealthcheckV1) Get() *WatchHealthcheckV1 { - return v.value -} - -func (v *NullableWatchHealthcheckV1) Set(val *WatchHealthcheckV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchHealthcheckV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchHealthcheckV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchHealthcheckV1(val *WatchHealthcheckV1) *NullableWatchHealthcheckV1 { - return &NullableWatchHealthcheckV1{value: val, isSet: true} -} - -func (v NullableWatchHealthcheckV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchHealthcheckV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 1eaedeef3f..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus API - -Interact with a Cactus deployment through HTTP. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-cmd-api-server - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 6631815e84..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Hyperledger Cactus API - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-cmd-api-server - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-cmd-api-server/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-cmd-api-server_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService GetHealthCheckV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetHealthCheckV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetOpenApiSpecV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetOpenApiSpecV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetricsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetricsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 92e93e50d6..0000000000 --- a/packages/cactus-cmd-api-server/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus API - -Interact with a Cactus deployment through HTTP. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-cmd-api-server - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-cmd-api-server/src/main/json/openapi.json b/packages/cactus-cmd-api-server/src/main/json/openapi.json deleted file mode 100644 index a9c63cf9d2..0000000000 --- a/packages/cactus-cmd-api-server/src/main/json/openapi.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus API", - "description": "Interact with a Cactus deployment through HTTP.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "WatchHealthcheckV1": { - "type": "string", - "enum": [ - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Subscribe", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Next", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Unsubscribe", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Error", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "MemoryUsage": { - "type": "object", - "properties": { - "rss": { - "title": "Resident Set Size", - "type": "number" - }, - "heapTotal": { - "title": "V8 memory usage - heap total", - "type": "number" - }, - "heapUsed": { - "title": "V8 memory usage - heap used", - "type": "number" - }, - "external": { - "title": "Memory usage of C++ objects bound to JavaScript objects managed by V8", - "type": "number" - }, - "arrayBuffers": { - "title": "Memory allocated for ArrayBuffers and SharedArrayBuffers, including all Node.js Buffers", - "type": "number" - } - } - }, - "HealthCheckResponse": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - }, - "memoryUsage": { - "$ref": "#/components/schemas/MemoryUsage" - } - }, - "required": ["createdAt", "memoryUsage"] - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetOpenApiSpecV1EndpointResponse": { - "type": "string", - "nullable": false - } - } - }, - "paths": { - "/api/v1/api-server/healthcheck": { - "get": { - "summary": "Can be used to verify liveness of an API server instance", - "description": "Returns the current timestamp of the API server as proof of health/liveness", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/api-server/healthcheck" - } - }, - "operationId": "getHealthCheckV1", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthCheckResponse" - } - } - } - } - } - } - }, - "/api/v1/api-server/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/api-server/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - }, - "/api/v1/api-server/get-open-api-spec": { - "get": { - "description": "Returns the openapi.json document of specific plugin.", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/api-server/get-open-api-spec" - } - }, - "operationId": "getOpenApiSpecV1", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOpenApiSpecV1EndpointResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-cmd-api-server/src/main/json/openapi.tpl.json b/packages/cactus-cmd-api-server/src/main/json/openapi.tpl.json deleted file mode 100644 index a9c63cf9d2..0000000000 --- a/packages/cactus-cmd-api-server/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus API", - "description": "Interact with a Cactus deployment through HTTP.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "WatchHealthcheckV1": { - "type": "string", - "enum": [ - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Subscribe", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Next", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Unsubscribe", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Error", - "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "MemoryUsage": { - "type": "object", - "properties": { - "rss": { - "title": "Resident Set Size", - "type": "number" - }, - "heapTotal": { - "title": "V8 memory usage - heap total", - "type": "number" - }, - "heapUsed": { - "title": "V8 memory usage - heap used", - "type": "number" - }, - "external": { - "title": "Memory usage of C++ objects bound to JavaScript objects managed by V8", - "type": "number" - }, - "arrayBuffers": { - "title": "Memory allocated for ArrayBuffers and SharedArrayBuffers, including all Node.js Buffers", - "type": "number" - } - } - }, - "HealthCheckResponse": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - }, - "memoryUsage": { - "$ref": "#/components/schemas/MemoryUsage" - } - }, - "required": ["createdAt", "memoryUsage"] - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetOpenApiSpecV1EndpointResponse": { - "type": "string", - "nullable": false - } - } - }, - "paths": { - "/api/v1/api-server/healthcheck": { - "get": { - "summary": "Can be used to verify liveness of an API server instance", - "description": "Returns the current timestamp of the API server as proof of health/liveness", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/api-server/healthcheck" - } - }, - "operationId": "getHealthCheckV1", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthCheckResponse" - } - } - } - } - } - } - }, - "/api/v1/api-server/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/api-server/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - }, - "/api/v1/api-server/get-open-api-spec": { - "get": { - "description": "Returns the openapi.json document of specific plugin.", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/api-server/get-open-api-spec" - } - }, - "operationId": "getOpenApiSpecV1", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOpenApiSpecV1EndpointResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 9354990b61..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,26 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/HealthCheckResponse.kt -src/main/kotlin/org/openapitools/client/models/MemoryUsage.kt -src/main/kotlin/org/openapitools/client/models/WatchHealthcheckV1.kt diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index a9770d9c2e..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus API - -Interact with a Cactus deployment through HTTP. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**getHealthCheckV1**](docs/DefaultApi.md#gethealthcheckv1) | **GET** /api/v1/api-server/healthcheck | Can be used to verify liveness of an API server instance -*DefaultApi* | [**getOpenApiSpecV1**](docs/DefaultApi.md#getopenapispecv1) | **GET** /api/v1/api-server/get-open-api-spec | -*DefaultApi* | [**getPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **GET** /api/v1/api-server/get-prometheus-exporter-metrics | Get the Prometheus Metrics - - - -## Documentation for Models - - - [org.openapitools.client.models.HealthCheckResponse](docs/HealthCheckResponse.md) - - [org.openapitools.client.models.MemoryUsage](docs/MemoryUsage.md) - - [org.openapitools.client.models.WatchHealthcheckV1](docs/WatchHealthcheckV1.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index d05dc1394b..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,254 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.HealthCheckResponse - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Can be used to verify liveness of an API server instance - * Returns the current timestamp of the API server as proof of health/liveness - * @return HealthCheckResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getHealthCheckV1() : HealthCheckResponse { - val localVarResponse = getHealthCheckV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as HealthCheckResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Can be used to verify liveness of an API server instance - * Returns the current timestamp of the API server as proof of health/liveness - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getHealthCheckV1WithHttpInfo() : ApiResponse { - val localVariableConfig = getHealthCheckV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getHealthCheckV1 - * - * @return RequestConfig - */ - fun getHealthCheckV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/api-server/healthcheck", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * Returns the openapi.json document of specific plugin. - * @return kotlin.String - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getOpenApiSpecV1() : kotlin.String { - val localVarResponse = getOpenApiSpecV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * Returns the openapi.json document of specific plugin. - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getOpenApiSpecV1WithHttpInfo() : ApiResponse { - val localVariableConfig = getOpenApiSpecV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getOpenApiSpecV1 - * - * @return RequestConfig - */ - fun getOpenApiSpecV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/api-server/get-open-api-spec", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get the Prometheus Metrics - * - * @return kotlin.String - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getPrometheusMetricsV1() : kotlin.String { - val localVarResponse = getPrometheusMetricsV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get the Prometheus Metrics - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getPrometheusMetricsV1WithHttpInfo() : ApiResponse { - val localVariableConfig = getPrometheusMetricsV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getPrometheusMetricsV1 - * - * @return RequestConfig - */ - fun getPrometheusMetricsV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/api-server/get-prometheus-exporter-metrics", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HealthCheckResponse.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HealthCheckResponse.kt deleted file mode 100644 index 26d140fb39..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HealthCheckResponse.kt +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.MemoryUsage - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param createdAt - * @param memoryUsage - * @param success - */ - - -data class HealthCheckResponse ( - - @Json(name = "createdAt") - val createdAt: kotlin.String, - - @Json(name = "memoryUsage") - val memoryUsage: MemoryUsage, - - @Json(name = "success") - val success: kotlin.Boolean? = null - -) - diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/MemoryUsage.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/MemoryUsage.kt deleted file mode 100644 index ea7bf0f581..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/MemoryUsage.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param rss - * @param heapTotal - * @param heapUsed - * @param `external` - * @param arrayBuffers - */ - - -data class MemoryUsage ( - - @Json(name = "rss") - val rss: java.math.BigDecimal? = null, - - @Json(name = "heapTotal") - val heapTotal: java.math.BigDecimal? = null, - - @Json(name = "heapUsed") - val heapUsed: java.math.BigDecimal? = null, - - @Json(name = "external") - val `external`: java.math.BigDecimal? = null, - - @Json(name = "arrayBuffers") - val arrayBuffers: java.math.BigDecimal? = null - -) - diff --git a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchHealthcheckV1.kt b/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchHealthcheckV1.kt deleted file mode 100644 index c835f948f7..0000000000 --- a/packages/cactus-cmd-api-server/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchHealthcheckV1.kt +++ /dev/null @@ -1,72 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * Values: Subscribe,Next,Unsubscribe,Error,Complete - */ - -@JsonClass(generateAdapter = false) -enum class WatchHealthcheckV1(val value: kotlin.String) { - - @Json(name = "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Subscribe") - Subscribe("org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Subscribe"), - - @Json(name = "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Next") - Next("org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Next"), - - @Json(name = "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Unsubscribe") - Unsubscribe("org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Unsubscribe"), - - @Json(name = "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Error") - Error("org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Error"), - - @Json(name = "org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Complete") - Complete("org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Complete"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is WatchHealthcheckV1) "$data" else null - - /** - * Returns a valid [WatchHealthcheckV1] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): WatchHealthcheckV1? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-cmd-api-server/src/main/openapi-generator/templates/protobuf-schema/api.mustache b/packages/cactus-cmd-api-server/src/main/openapi-generator/templates/protobuf-schema/api.mustache deleted file mode 100644 index 839363b689..0000000000 --- a/packages/cactus-cmd-api-server/src/main/openapi-generator/templates/protobuf-schema/api.mustache +++ /dev/null @@ -1,46 +0,0 @@ -{{>partial_header}} -syntax = "proto3"; - -package {{{packageName}}}; - -import "google/protobuf/empty.proto"; -{{#imports}} -{{#import}} -import "{{{modelPackage}}}/{{{.}}}.proto"; -{{/import}} -{{/imports}} - -service {{classname}} { -{{#operations}} -{{#operation}} - {{#description}} - // {{{.}}} - {{/description}} - rpc {{operationId}} ({{#hasParams}}{{operationId}}Request{{/hasParams}}{{^hasParams}}google.protobuf.Empty{{/hasParams}}) returns ({{#vendorExtensions.x-grpc-response}}{{.}}{{/vendorExtensions.x-grpc-response}}{{^vendorExtensions.x-grpc-response}}{{operationId}}Response{{/vendorExtensions.x-grpc-response}}); - -{{/operation}} -{{/operations}} -} - -{{#operations}} -{{#operation}} -{{#hasParams}} -message {{operationId}}Request { - {{#allParams}} - {{#description}} - // {{{.}}} - {{/description}} - {{#vendorExtensions.x-protobuf-type}}{{.}} {{/vendorExtensions.x-protobuf-type}}{{vendorExtensions.x-protobuf-data-type}} {{paramName}} = {{vendorExtensions.x-protobuf-index}}; - {{/allParams}} - -} - -{{/hasParams}} -{{^vendorExtensions.x-grpc-response}} -message {{operationId}}Response { - {{{vendorExtensions.x-grpc-response-type}}} data = 1; -} - -{{/vendorExtensions.x-grpc-response}} -{{/operation}} -{{/operations}} \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/openapi-generator/templates/protobuf-schema/model.mustache b/packages/cactus-cmd-api-server/src/main/openapi-generator/templates/protobuf-schema/model.mustache deleted file mode 100644 index 2a9ef1b134..0000000000 --- a/packages/cactus-cmd-api-server/src/main/openapi-generator/templates/protobuf-schema/model.mustache +++ /dev/null @@ -1,37 +0,0 @@ -{{>partial_header}} -syntax = "proto3"; - -package {{{packageName}}}; - -{{#imports}} -{{#import}} -import "{{{modelPackage}}}/{{{import}}}.proto"; -{{/import}} -{{/imports}} - -{{#models}} -{{#model}} -message {{classname}} { - {{#vars}} - {{#description}} - // {{{.}}} - {{/description}} - {{^isEnum}} - {{#vendorExtensions.x-protobuf-type}}{{{.}}} {{/vendorExtensions.x-protobuf-type}}{{{vendorExtensions.x-protobuf-data-type}}} {{{name}}} = {{vendorExtensions.x-protobuf-index}}{{#vendorExtensions.x-protobuf-packed}} [packed=true]{{/vendorExtensions.x-protobuf-packed}}; - {{/isEnum}} - {{#isEnum}} - enum {{enumName}} { - {{#allowableValues}} - {{#enumVars}} - {{{name}}} = {{{protobuf-enum-index}}}; - {{/enumVars}} - {{/allowableValues}} - } - - {{enumName}} {{name}} = {{vendorExtensions.x-protobuf-index}}; - {{/isEnum}} - - {{/vars}} -} -{{/model}} -{{/models}} \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/openapi-generator/templates/protobuf-schema/root.mustache b/packages/cactus-cmd-api-server/src/main/openapi-generator/templates/protobuf-schema/root.mustache deleted file mode 100644 index e2df456144..0000000000 --- a/packages/cactus-cmd-api-server/src/main/openapi-generator/templates/protobuf-schema/root.mustache +++ /dev/null @@ -1,22 +0,0 @@ -{{>partial_header}} -syntax = "proto3"; - -package {{{packageName}}}; - -{{#vendorExtensions.x-grpc-options}} -option {{{.}}}; -{{/vendorExtensions.x-grpc-options}} - -// Models -{{#models}} -{{#model}} -import "{{modelPackage}}/{{classFilename}}.proto"; -{{/model}} -{{/models}} - -// APIs -{{#apiInfo}} -{{#apis}} -import "{{apiPackage}}/{{classFilename}}.proto"; -{{/apis}} -{{/apiInfo}} \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/.openapi-generator-ignore b/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a..0000000000 --- a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/.openapi-generator/FILES b/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/.openapi-generator/FILES deleted file mode 100644 index 270cf21ca1..0000000000 --- a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -README.md -models/health_check_response_pb.proto -models/memory_usage_pb.proto -models/watch_healthcheck_v1_pb.proto -services/default_service.proto diff --git a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/.openapi-generator/VERSION b/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/README.md b/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/README.md deleted file mode 100644 index a3c8389200..0000000000 --- a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# gPRC for org.hyperledger.cactus.cmd_api_server - -Interact with a Cactus deployment through HTTP. - -## Overview -These files were generated by the [OpenAPI Generator](https://openapi-generator.tech) project. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.ProtobufSchemaCodegen - -## Usage - -Below are some usage examples for Go and Ruby. For other languages, please refer to https://grpc.io/docs/quickstart/. - -### Go -``` -# assuming `protoc-gen-go` has been installed with `go get -u github.com/golang/protobuf/protoc-gen-go` -mkdir /var/tmp/go/org.hyperledger.cactus.cmd_api_server -protoc --go_out=/var/tmp/go/org.hyperledger.cactus.cmd_api_server services/* -protoc --go_out=/var/tmp/go/org.hyperledger.cactus.cmd_api_server models/* -``` - -### Ruby -``` -# assuming `grpc_tools_ruby_protoc` has been installed via `gem install grpc-tools` -RUBY_OUTPUT_DIR="/var/tmp/ruby/org.hyperledger.cactus.cmd_api_server" -mkdir $RUBY_OUTPUT_DIR -grpc_tools_ruby_protoc --ruby_out=$RUBY_OUTPUT_DIR --grpc_out=$RUBY_OUTPUT_DIR/lib services/* -grpc_tools_ruby_protoc --ruby_out=$RUBY_OUTPUT_DIR --grpc_out=$RUBY_OUTPUT_DIR/lib models/* -``` diff --git a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/models/health_check_response_pb.proto b/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/models/health_check_response_pb.proto deleted file mode 100644 index 0b05842296..0000000000 --- a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/models/health_check_response_pb.proto +++ /dev/null @@ -1,24 +0,0 @@ -/* - Hyperledger Cactus API - - Interact with a Cactus deployment through HTTP. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cactus.cmd_api_server; - -import "models/memory_usage_pb.proto"; - -message HealthCheckResponsePB { - bool success = 256557056; - - string createdAt = 61500732; - - MemoryUsagePB memoryUsage = 335792418; - -} diff --git a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/models/memory_usage_pb.proto b/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/models/memory_usage_pb.proto deleted file mode 100644 index 119eb46f36..0000000000 --- a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/models/memory_usage_pb.proto +++ /dev/null @@ -1,27 +0,0 @@ -/* - Hyperledger Cactus API - - Interact with a Cactus deployment through HTTP. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cactus.cmd_api_server; - - -message MemoryUsagePB { - float rss = 113234; - - float heapTotal = 114487480; - - float heapUsed = 30910521; - - float external = 210148408; - - float arrayBuffers = 116952168; - -} diff --git a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/models/watch_healthcheck_v1_pb.proto b/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/models/watch_healthcheck_v1_pb.proto deleted file mode 100644 index bdeb89bddf..0000000000 --- a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/models/watch_healthcheck_v1_pb.proto +++ /dev/null @@ -1,17 +0,0 @@ -/* - Hyperledger Cactus API - - Interact with a Cactus deployment through HTTP. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cactus.cmd_api_server; - - -message WatchHealthcheckV1PB { -} diff --git a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/services/default_service.proto b/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/services/default_service.proto deleted file mode 100644 index e1d50cfded..0000000000 --- a/packages/cactus-cmd-api-server/src/main/proto/generated/openapi/services/default_service.proto +++ /dev/null @@ -1,34 +0,0 @@ -/* - Hyperledger Cactus API - - Interact with a Cactus deployment through HTTP. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cactus.cmd_api_server; - -import "google/protobuf/empty.proto"; -import "models/health_check_response_pb.proto"; - -service DefaultService { - rpc GetHealthCheckV1 (google.protobuf.Empty) returns (HealthCheckResponsePB); - - rpc GetOpenApiSpecV1 (google.protobuf.Empty) returns (GetOpenApiSpecV1Response); - - rpc GetPrometheusMetricsV1 (google.protobuf.Empty) returns (GetPrometheusMetricsV1Response); - -} - -message GetOpenApiSpecV1Response { - string data = 1; -} - -message GetPrometheusMetricsV1Response { - string data = 1; -} - diff --git a/packages/cactus-cmd-api-server/src/main/typescript/api-client/api-server-api-client.ts b/packages/cactus-cmd-api-server/src/main/typescript/api-client/api-server-api-client.ts deleted file mode 100644 index f361180ba9..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/api-client/api-server-api-client.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { Observable, ReplaySubject } from "rxjs"; -import { finalize } from "rxjs/operators"; -const { Socket, io, SocketOptions } = require("socket.io-client-fixed-types"); -import { Logger, Checks, IAsyncProvider } from "@hyperledger/cactus-common"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { Constants } from "@hyperledger/cactus-core-api"; -import { - DefaultApi, - WatchHealthcheckV1, - HealthCheckResponse, -} from "../generated/openapi/typescript-axios"; -import { Configuration } from "../generated/openapi/typescript-axios/configuration"; -import { ConfigurationParameters } from "../generated/openapi/typescript-axios/configuration"; -import { Optional } from "typescript-optional"; - -export interface IApiServerApiClientOptions extends ConfigurationParameters { - readonly logLevel?: LogLevelDesc; - readonly wsApiHost?: string; - readonly wsApiPath?: string; - readonly tokenProvider?: IAsyncProvider; -} - -export class ApiServerApiClientConfiguration extends Configuration { - public static readonly CLASS_NAME = "ApiServerApiClientConfiguration"; - - public readonly logLevel: LogLevelDesc; - public readonly wsApiHost: string; - public readonly wsApiPath: string; - public readonly tokenProvider: Optional>; - - public get className(): string { - return ApiServerApiClient.CLASS_NAME; - } - - constructor(public readonly options: IApiServerApiClientOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - this.logLevel = options.logLevel || "INFO"; - this.wsApiHost = options.wsApiHost || options.basePath || location.host; - this.wsApiPath = options.wsApiPath || Constants.SocketIoConnectionPathV1; - this.tokenProvider = Optional.ofNullable(options.tokenProvider); - Checks.nonBlankString(this.logLevel, `${fnTag}:logLevel`); - Checks.nonBlankString(this.wsApiHost, `${fnTag}:wsApiHost`); - Checks.nonBlankString(this.wsApiPath, `${fnTag}:wsApiPath`); - Checks.truthy(this.tokenProvider, `${fnTag}:tokenProvider`); - } -} - -export class ApiServerApiClient extends DefaultApi { - public static readonly CLASS_NAME = "ApiServerApiClient"; - - public readonly log: Logger; - public readonly wsApiHost: string; - public readonly wsApiPath: string; - public readonly tokenProvider: Optional>; - - public get className(): string { - return ApiServerApiClient.CLASS_NAME; - } - - constructor(public readonly options: ApiServerApiClientConfiguration) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level: options.logLevel, label }); - - this.wsApiHost = options.wsApiHost; - this.wsApiPath = options.wsApiPath; - this.tokenProvider = options.tokenProvider; - this.log.debug(`Created ${this.className} OK.`); - this.log.debug(`wsApiHost=${this.wsApiHost}`); - this.log.debug(`wsApiPath=${this.wsApiPath}`); - this.log.debug(`basePath=${this.options.basePath}`); - } - - public async watchHealthcheckV1(): Promise> { - const { log, tokenProvider } = this; - - const socketOptions: typeof SocketOptions = { - auth: { token: this.configuration?.baseOptions.headers.Authorization }, - path: this.wsApiPath, - } as typeof SocketOptions; // TODO - - const socket: typeof Socket = io(this.wsApiHost, socketOptions); - const subject = new ReplaySubject(1); - - socket.on("error", (ex: Error) => { - log.error("[SocketIOClient] ERROR: %o", ex); - socket.disconnect(); - subject.error(ex); - }); - - socket.on("disconnect", (reason: string) => { - const { active } = socket; - log.error("[SocketIOClient] DISCONNECT=%s Active=%b", reason, active); - }); - - socket.on("connect_error", async (err: unknown) => { - log.debug("[SocketIOClient] CONNECT_ERROR: %o", err); - if (tokenProvider.isPresent()) { - const theProvider = tokenProvider.get(); // unwrap the Optional - const token = await theProvider.get(); // get the actual token - socket.auth = { token }; - this.options.baseOptions = { headers: { Authorization: token } }; - log.debug("Received fresh token from token provider OK"); - - // After upgrading to SocketIO 4.4.1 the automatic reconnection became - // flaky in this test so we are giving it a nudge in here manually to - // do the right thing and reconnect after the token has been updated. - socket.connect(); - } else { - socket.disconnect(); - subject.error(err); - log.debug("Disconnected socket, send error to RxJS subject."); - } - }); - - socket.on(WatchHealthcheckV1.Next, (data: HealthCheckResponse) => { - subject.next(data); - }); - - socket.on("connect", () => { - const transport = socket.io.engine.transport.name; // in most cases, "polling" - - socket.io.engine.on("upgrade", () => { - const upgradedTransport = socket.io.engine.transport.name; // in most cases, "websocket" - log.debug("[SocketIOClient] Upgraded transport=%o", upgradedTransport); - }); - log.debug("[SocketIOClient] Connected OK"); - log.debug("[SocketIOClient] initial transport=%o", transport); - socket.emit(WatchHealthcheckV1.Subscribe); - }); - - return subject.pipe( - finalize(() => { - log.debug("Emitting unsubscribe, disconnecting socket..."); - socket.emit(WatchHealthcheckV1.Unsubscribe); - socket.disconnect(); - log.debug("Completing RxJS subject..."); - subject.complete(); - log.debug("Finalized RxJS subject OK"); - }), - // TODO: Investigate if we need these below - in theory without these - // it could happen that only the fist subscriber gets the last emitted value - // publishReplay(1), - // refCount(), - ); - } -} 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 deleted file mode 100644 index 79a7e26341..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts +++ /dev/null @@ -1,1061 +0,0 @@ -import type { AddressInfo } from "net"; -import { Http2Server, Http2ServerRequest } from "node:http2"; -import { Http2ServerResponse } from "node:http2"; -import type { Server as SecureServer } from "https"; -import type { Request, Response, RequestHandler } from "express"; -import type { ServerOptions as SocketIoServerOptions } from "socket.io"; -import type { Socket as SocketIoSocket } from "socket.io"; -import exitHook, { IAsyncExitHookDoneCallback } from "async-exit-hook"; -import os from "os"; -import path from "path"; -import tls from "tls"; -import { Server, createServer } from "http"; -import { createServer as createSecureServer } from "https"; -import { RuntimeError } from "run-time-error-cjs"; -import { gte } from "semver"; -import lmify from "lmify"; -import fs from "fs-extra"; -import expressHttpProxy from "express-http-proxy"; -import { Server as GrpcServer } from "@grpc/grpc-js"; -import { ServerCredentials as GrpcServerCredentials } from "@grpc/grpc-js"; -import { expressConnectMiddleware } from "@connectrpc/connect-express"; -import { ConnectRouter } from "@connectrpc/connect"; -import { - fastify, - FastifyBaseLogger, - FastifyInstance, - FastifyTypeProviderDefault, -} from "fastify"; -import { fastifyConnectPlugin } from "@connectrpc/connect-fastify"; -import express from "express"; -import { OpenAPIV3 } from "express-openapi-validator/dist/framework/types"; -import compression from "compression"; -import bodyParser from "body-parser"; -import cors, { CorsOptionsDelegate, CorsRequest } from "cors"; - -import { Server as SocketIoServer } from "socket.io"; -import { authorize as authorizeSocket } from "@thream/socketio-jwt"; -import { ServiceType } from "@bufbuild/protobuf"; - -import { - ICactusPlugin, - isIPluginWebService, - IPluginWebService, - IPluginFactoryOptions, - PluginFactoryFactory, - PluginImport, - Constants, - PluginImportAction, - isIPluginGrpcService, - isIPluginCrpcService, - ICrpcSvcRegistration, -} from "@hyperledger/cactus-core-api"; - -import { - PluginRegistry, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; - -import { - Bools, - isExpressHttpVerbMethodName, - Logger, - LoggerProvider, - newRex, - Servers, -} from "@hyperledger/cactus-common"; - -import { ICactusApiServerOptions } from "./config/config-service"; -import OAS from "../json/openapi.json"; - -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; -import { AuthorizerFactory } from "./authzn/authorizer-factory"; -import { WatchHealthcheckV1 } from "./generated/openapi/typescript-axios"; -import { WatchHealthcheckV1Endpoint } from "./web-services/watch-healthcheck-v1-endpoint"; -import * as default_service from "./generated/proto/protoc-gen-ts/services/default_service"; -import { GrpcServerApiServer } from "./web-services/grpc/grpc-server-api-server"; -import { determineAddressFamily } from "./common/determine-address-family"; -import { - GetOpenApiSpecV1Endpoint, - IGetOpenApiSpecV1EndpointOptions, -} from "./web-services/get-open-api-spec-v1-endpoint"; - -export interface IApiServerConstructorOptions { - readonly pluginManagerOptions?: { pluginsPath: string }; - readonly pluginRegistry?: PluginRegistry; - readonly httpServerApi?: Server | SecureServer; - readonly wsServerApi?: SocketIoServer; - readonly grpcServer?: GrpcServer; - readonly crpcServer?: FastifyInstance< - Http2Server, - Http2ServerRequest, - Http2ServerResponse, - FastifyBaseLogger, - FastifyTypeProviderDefault - >; - readonly wsOptions?: SocketIoServerOptions; - readonly httpServerCockpit?: Server | SecureServer; - readonly config: ICactusApiServerOptions; - readonly prometheusExporter?: PrometheusExporter; - readonly enableShutdownHook?: boolean; -} - -export class ApiServer { - public static readonly CLASS_NAME = "ApiServer"; - public static readonly E_POST_CRASH_SHUTDOWN = - "API server failed to shut itself down, will ignore this because we were already crashing anyway..."; - public static readonly E_NON_EXEMPT_UNPROTECTED_ENDPOINTS = - `Non-exempt unprotected endpoints found. ` + - `You can allow them as unprotected via the configuration of the ` + - `API server by specifying an array of patterns in the property ` + - `"unprotectedEndpointExemptions" of "authorizationConfigJson". ` + - `This mechanism is meant to foster DevOps where both dev & ops ` + - `work together in making secure application deployments a reality. ` + - `The comma separated list of unprotected endpoints that were not marked as exempt: `; - - private readonly log: Logger; - private pluginRegistry: PluginRegistry | undefined; - private readonly httpServerApi: Server | SecureServer; - private readonly httpServerCockpit?: Server | SecureServer; - private readonly wsApi: SocketIoServer; - private readonly grpcServer: GrpcServer; - private readonly crpcServer: FastifyInstance< - Http2Server, - Http2ServerRequest, - Http2ServerResponse, - FastifyBaseLogger, - FastifyTypeProviderDefault - >; - private readonly expressApi: express.Express; - private readonly expressCockpit: express.Express; - private readonly pluginsPath: string; - private readonly enableShutdownHook: boolean; - - public prometheusExporter: PrometheusExporter; - public boundGrpcHostPort: string; - - public get className(): string { - return ApiServer.CLASS_NAME; - } - - constructor(public readonly options: IApiServerConstructorOptions) { - if (!options) { - throw new Error(`ApiServer#ctor options was falsy`); - } - if (!options.config) { - throw new Error(`ApiServer#ctor options.config was falsy`); - } - - this.boundGrpcHostPort = "127.0.0.1:-1"; - - this.enableShutdownHook = Bools.isBooleanStrict( - options.config.enableShutdownHook, - ) - ? (options.config.enableShutdownHook as boolean) - : true; - - if (this.enableShutdownHook) { - exitHook(() => this.shutdown()); - } - - if (this.options.httpServerApi) { - this.httpServerApi = this.options.httpServerApi; - } else if (this.options.config.apiTlsEnabled) { - this.httpServerApi = createSecureServer({ - key: this.options.config.apiTlsKeyPem, - cert: this.options.config.apiTlsCertPem, - }); - } else { - this.httpServerApi = createServer(); - } - - if (this.options.config.cockpitEnabled) { - if (this.options.httpServerCockpit) { - this.httpServerCockpit = this.options.httpServerCockpit; - } else if (this.options.config.cockpitTlsEnabled) { - this.httpServerCockpit = createSecureServer({ - key: this.options.config.cockpitTlsKeyPem, - cert: this.options.config.cockpitTlsCertPem, - }); - } else { - this.httpServerCockpit = createServer(); - } - } - - this.crpcServer = - this.options.crpcServer || - fastify({ http2: true, forceCloseConnections: true }); - - this.grpcServer = this.options.grpcServer || new GrpcServer({}); - this.wsApi = new SocketIoServer(); - this.expressApi = express(); - this.expressCockpit = express(); - - if (this.options.prometheusExporter) { - this.prometheusExporter = this.options.prometheusExporter; - } else { - this.prometheusExporter = new PrometheusExporter({ - pollingIntervalInMin: 1, - }); - } - this.prometheusExporter.startMetricsCollection(); - this.prometheusExporter.setTotalPluginImports(this.getPluginImportsCount()); - - this.log = LoggerProvider.getOrCreate({ - label: "api-server", - level: options.config.logLevel, - }); - - if (this.enableShutdownHook) { - exitHook((onHookDone: IAsyncExitHookDoneCallback) => { - this.log.info("Starting async-exit-hook for cmd-api-server ..."); - this.shutdown() - .catch((ex: unknown) => { - this.log.warn("Failed async-exit-hook for cmd-api-server", ex); - throw ex; - }) - .finally(() => { - this.log.info("Concluded async-exit-hook for cmd-api-server ..."); - onHookDone(); - }); - this.log.info("Started async-exit-hook for cmd-api-server OK"); - }); - this.log.info("Registered async-exit-hook for cmd-api-server shutdown."); - } - - const defaultPluginsPath = path.join( - os.tmpdir(), - "org", - "hyperledger", - "cactus", - "plugins", - ); - - const { pluginsPath } = { - ...{ pluginsPath: defaultPluginsPath }, - ...JSON.parse(this.options.config.pluginManagerOptionsJson), - ...this.options.pluginManagerOptions, - } as { pluginsPath: string }; - - this.pluginsPath = pluginsPath; - this.log.debug("pluginsPath: %o", pluginsPath); - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - this.prometheusExporter.setTotalPluginImports(this.getPluginImportsCount()); - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } - - public getPluginImportsCount(): number { - return this.pluginRegistry?.plugins.length || 0; - } - - async start(): Promise<{ - readonly addressInfoCockpit?: AddressInfo; - readonly addressInfoApi: AddressInfo; - readonly addressInfoGrpc: AddressInfo; - readonly addressInfoCrpc: AddressInfo; - }> { - this.checkNodeVersion(); - const tlsMaxVersion = this.options.config.tlsDefaultMaxVersion; - this.log.info("Setting tls.DEFAULT_MAX_VERSION to %s...", tlsMaxVersion); - tls.DEFAULT_MAX_VERSION = tlsMaxVersion; - - try { - const { cockpitTlsEnabled, apiTlsEnabled } = this.options.config; - let addressInfoCockpit: AddressInfo | undefined; - if (this.options.config.cockpitEnabled) { - addressInfoCockpit = await this.startCockpitFileServer(); - } - const addressInfoApi = await this.startApiServer(); - const addressInfoGrpc = await this.startGrpcServer(); - const { addressInfoCrpc, crpcUrl } = await this.startCrpcServer(); - this.log.debug("Cacti CRPC reachable %s", crpcUrl); - - { - const { port, address } = addressInfoGrpc; - const grpcUrl = `${address}:${port}`; - this.log.info(`Cactus gRPC reachable ${grpcUrl}`); - } - - { - const { apiHost: host } = this.options.config; - const { port } = addressInfoApi; - const protocol = apiTlsEnabled ? "https:" : "http:"; - const httpUrl = `${protocol}//${host}:${port}`; - this.log.info(`Cactus API reachable ${httpUrl}`); - } - - if (this.options.config.cockpitEnabled) { - const { cockpitHost: host } = this.options.config; - const { port } = addressInfoCockpit as AddressInfo; - const protocol = cockpitTlsEnabled ? "https:" : "http:"; - const httpUrl = `${protocol}//${host}:${port}`; - this.log.info(`Cactus Cockpit reachable ${httpUrl}`); - } - - return { - addressInfoCockpit, - addressInfoApi, - addressInfoGrpc, - addressInfoCrpc, - }; - } catch (ex1: unknown) { - const context = "Failed to start ApiServer"; - this.log.error(context, ex1); - this.log.error(`Attempting shutdown...`); - try { - await this.shutdown(); - this.log.info(`Server shut down after crash OK`); - } catch (ex2: unknown) { - this.log.error(ApiServer.E_POST_CRASH_SHUTDOWN, ex2); - } - throw newRex(context, ex1); - } - } - - /** - * Verifies that the currently running NodeJS process is at least of a certain - * NodeJS version as specified by the configuration. - * - * @throws {Error} if the version contraint is not satisfied by the runtime. - */ - public checkNodeVersion(currentVersion: string = process.version): void { - if (gte(this.options.config.minNodeVersion, currentVersion)) { - const msg = - `ApiServer#checkNodeVersion() detected NodeJS ` + - `v${process.version} that is outdated as per the configuration. ` + - `If you must run on this NodeJS version you can override the minimum ` + - `acceptable version via config parameters of the API server. ` + - `Though doing so may lead to vulnerabilities in your deployment. ` + - `You've been warned.`; - throw new Error(msg); - } - } - - public getHttpServerApi(): Server | SecureServer { - return this.httpServerApi; - } - - public getHttpServerCockpit(): Server | SecureServer | undefined { - return this.httpServerCockpit; - } - - public async getOrInitPluginRegistry(): Promise { - try { - if (!this.pluginRegistry) { - if (!this.options.pluginRegistry) { - this.log.info(`getOrInitPluginRegistry() initializing a new one...`); - this.pluginRegistry = await this.initPluginRegistry(); - } else { - this.log.info(`getOrInitPluginRegistry() re-using injected one...`); - this.pluginRegistry = this.options.pluginRegistry; - } - } - await this.prometheusExporter.setTotalPluginImports( - await this.getPluginImportsCount(), - ); - return this.pluginRegistry; - } catch (ex: unknown) { - this.pluginRegistry = new PluginRegistry({ plugins: [] }); - const context = "Failed to init PluginRegistry"; - this.log.debug(context, ex); - throw newRex(context, ex); - } - } - - public async initPluginRegistry(req?: { - readonly pluginRegistry: PluginRegistry; - }): Promise { - const { pluginRegistry = new PluginRegistry({ plugins: [] }) } = req || {}; - const { plugins } = this.options.config; - this.log.info(`Instantiated empty registry, invoking plugin factories...`); - - for (const pluginImport of plugins) { - const plugin = await this.instantiatePlugin(pluginImport, pluginRegistry); - pluginRegistry.add(plugin); - } - - return pluginRegistry; - } - - private async instantiatePlugin( - pluginImport: PluginImport, - registry: PluginRegistry, - ): Promise { - const fnTag = `${this.className}#instantiatePlugin`; - const { logLevel } = this.options.config; - const { packageName, options } = pluginImport; - this.log.info(`Creating plugin from package: ${packageName}`, options); - const pluginOptions = { ...options, logLevel, pluginRegistry: registry }; - - try { - if (pluginImport.action == PluginImportAction.Install) { - await this.installPluginPackage(pluginImport); - } else { - this.log.info( - `The installation of the plugin package ${packageName} was skipped due to the configuration flag action`, - ); - } - - const packagePath = path.join( - this.pluginsPath, - options.instanceId, - "node_modules", - packageName, - ); - this.log.debug("Package path: %o", packagePath); - - // eslint-disable-next-line @typescript-eslint/no-var-requires - const pluginPackage = require(/* webpackIgnore: true */ packagePath); - const createPluginFactory = - pluginPackage.createPluginFactory as PluginFactoryFactory; - const pluginFactoryOptions: IPluginFactoryOptions = { - pluginImportType: pluginImport.type, - }; - const pluginFactory = await createPluginFactory(pluginFactoryOptions); - const plugin = await pluginFactory.create(pluginOptions); - - // need to invoke the i-cactus-plugin onPluginInit functionality here before plugin registry can be used further - await plugin.onPluginInit(); - - return plugin; - } catch (ex: unknown) { - const context = `${fnTag} failed instantiating plugin '${packageName}' with the instanceId '${options.instanceId}'`; - this.log.debug(context, ex); - throw newRex(context, ex); - } - } - - private async installPluginPackage( - pluginImport: PluginImport, - ): Promise { - const fnTag = `ApiServer#installPluginPackage()`; - const pkgName = pluginImport.options.packageSrc - ? pluginImport.options.packageSrc - : pluginImport.packageName; - - const instanceId = pluginImport.options.instanceId; - const pluginPackageDir = path.join(this.pluginsPath, instanceId); - // version of the npm package - const pluginVersion = pluginImport.options.version - ? "@".concat(pluginImport.options.version) - : ""; - try { - await fs.mkdirp(pluginPackageDir); - this.log.debug(`${pkgName} plugin package dir: %o`, pluginPackageDir); - } catch (ex: unknown) { - const context = - "Could not create plugin installation directory, check the file-system permissions."; - throw newRex(context, ex); - } - try { - lmify.setPackageManager("npm"); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error - lmify.setRootDir(pluginPackageDir); - this.log.debug(`Installing ${pkgName} for plugin import`, pluginImport); - const out = await lmify.install([ - pkgName.concat(pluginVersion), // empty if no version was specified - "--production", - "--audit=false", - "--progress=false", - "--fund=false", - `--prefix=${pluginPackageDir}`, - // "--ignore-workspace-root-check", - ]); - this.log.debug("%o install result: %o", pkgName, out); - if (out?.exitCode && out.exitCode !== 0) { - const eMsg = - "Non-zero exit code returned by lmify.install() indicating that the underlying npm install OS process had encountered a problem:"; - throw newRex(eMsg, out); - } - this.log.info(`Installed ${pkgName} OK`); - } catch (ex: unknown) { - const context = `${fnTag} failed installing plugin '${pkgName}`; - this.log.debug(ex, context); - throw newRex(context, ex); - } - } - - public async shutdown(): Promise { - this.log.info(`Shutting down API server ...`); - - const registry = await this.getOrInitPluginRegistry(); - - const webServicesShutdown = registry - .getPlugins() - .filter((pluginInstance) => isIPluginWebService(pluginInstance)) - .map((pluginInstance: ICactusPlugin) => { - return (pluginInstance as IPluginWebService).shutdown(); - }); - - if (this.wsApi) { - this.log.info(`Disconnecting SocketIO connections...`); - this.wsApi.disconnectSockets(true); - this.log.info(`SocketIO connections disconnect OK`); - } - - this.log.info(`Stopping ${webServicesShutdown.length} WS plugin(s)...`); - await Promise.all(webServicesShutdown); - this.log.info(`Stopped ${webServicesShutdown.length} WS plugin(s) OK`); - - if (this.httpServerApi?.listening) { - this.log.info(`Closing Cacti HTTP server of the API...`); - await Servers.shutdown(this.httpServerApi); - this.log.info(`Close HTTP server of the API OK`); - } - - if (this.httpServerCockpit?.listening) { - this.log.info(`Closing Cacti HTTP server of the cockpit ...`); - await Servers.shutdown(this.httpServerCockpit); - this.log.info(`Close HTTP server of the cockpit OK`); - } - - if (this.crpcServer) { - const fastifyPlugins = this.crpcServer.printPlugins(); - this.log.info("Fastify plugin list: %o", fastifyPlugins); - this.log.info(`Closing Cacti CRPC HTTP server ...`); - await this.crpcServer.close(); - this.log.info(`Closed Cacti CRPC HTTP server OK`); - } - - if (this.grpcServer) { - await new Promise((resolve, reject) => { - this.log.info(`Draining Cacti gRPC server ...`); - this.grpcServer.drain(this.boundGrpcHostPort, 5000); - this.log.info(`Drained Cacti gRPC server OK`); - - this.log.info(`Trying to shut down Cacti gRPC server ...`); - this.grpcServer.tryShutdown((ex?: Error) => { - if (ex) { - const eMsg = - "Failed to shut down gRPC server of the Cacti API server."; - this.log.debug(eMsg, ex); - reject(newRex(eMsg, ex)); - } else { - this.log.info(`Shut down Cacti gRPC server OK`); - resolve(); - } - }); - }); - } - } - - async startCockpitFileServer(): Promise { - const { expressCockpit: app } = this; - const cockpitWwwRoot = this.options.config.cockpitWwwRoot; - this.log.info(`wwwRoot: ${cockpitWwwRoot}`); - - const resolvedWwwRoot = path.resolve(process.cwd(), cockpitWwwRoot); - this.log.info(`resolvedWwwRoot: ${resolvedWwwRoot}`); - - const resolvedIndexHtml = path.resolve(resolvedWwwRoot + "/index.html"); - this.log.info(`resolvedIndexHtml: ${resolvedIndexHtml}`); - - const cockpitCorsDomainCsv = this.options.config.cockpitCorsDomainCsv; - const allowedDomains = cockpitCorsDomainCsv.split(","); - const corsMiddleware = this.createCorsMiddleware(allowedDomains); - - const { - apiHost, - apiPort, - cockpitApiProxyRejectUnauthorized: rejectUnauthorized, - } = this.options.config; - const protocol = this.options.config.apiTlsEnabled ? "https:" : "http:"; - const apiHttpUrl = `${protocol}//${apiHost}:${apiPort}`; - - const apiProxyMiddleware = expressHttpProxy(apiHttpUrl, { - // preserve the path whatever it was. Without this the proxy just uses / - proxyReqPathResolver: (srcReq) => srcReq.originalUrl, - - proxyReqOptDecorator: (proxyReqOpts, srcReq) => { - const { originalUrl: thePath } = srcReq; - const srcHost = srcReq.header("host"); - const { host: destHostname, port: destPort } = proxyReqOpts; - const destHost = `${destHostname}:${destPort}`; - this.log.debug(`PROXY ${srcHost} => ${destHost} :: ${thePath}`); - - // make sure self signed certs are accepted if it was configured as such by the user - (proxyReqOpts as Record).rejectUnauthorized = - rejectUnauthorized; - return proxyReqOpts; - }, - }); - - const { rateLimit } = await import("express-rate-limit"); - const rateLimiterIndexHtml = rateLimit({ - windowMs: 15 * 60 * 1000, // 15 minutes - max: 100, // Limit each IP to 100 requests per `window` (here, per 15 minutes) - standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers - legacyHeaders: false, // Disable the `X-RateLimit-*` headers - }); - - const middlewareIndexHtml: RequestHandler = (_, res) => - res.sendFile(resolvedIndexHtml); - - app.use("/api/v*", apiProxyMiddleware as RequestHandler); - app.use(compression() as RequestHandler); - app.use(corsMiddleware); - app.use(express.static(resolvedWwwRoot)); - app.get("/*", rateLimiterIndexHtml, middlewareIndexHtml); - - const cockpitPort: number = this.options.config.cockpitPort; - const cockpitHost: string = this.options.config.cockpitHost; - - if (!this.httpServerCockpit?.listening) { - await new Promise((resolve, reject) => { - this.httpServerCockpit?.once("error", reject); - this.httpServerCockpit?.once("listening", resolve); - this.httpServerCockpit?.listen(cockpitPort, cockpitHost); - }); - } - 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 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); - - return addressInfo; - } - - /** - * Installs the own endpoints of the API server such as the ones providing - * healthcheck and monitoring information. - * @param app - */ - async getOrCreateWebServices(app: express.Express): Promise { - const fnTag = `${this.className}#getOrCreateWebServices()}`; - const { log } = this; - const { logLevel } = this.options.config; - const pluginRegistry = await this.getOrInitPluginRegistry(); - - { - const oasPath = OAS.paths["/api/v1/api-server/get-open-api-spec"]; - - const operationId = oasPath.get.operationId; - const opts: IGetOpenApiSpecV1EndpointOptions = { - oas: OAS, - oasPath, - operationId, - path: oasPath.get["x-hyperledger-cacti"].http.path, - pluginRegistry, - verbLowerCase: oasPath.get["x-hyperledger-cacti"].http.verbLowerCase, - logLevel, - }; - const endpoint = new GetOpenApiSpecV1Endpoint(opts); - await registerWebServiceEndpoint(app, endpoint); - } - - const healthcheckHandler = (req: Request, res: Response) => { - res.json({ - success: true, - createdAt: new Date(), - memoryUsage: process.memoryUsage(), - }); - }; - - const { "/api/v1/api-server/healthcheck": oasPath } = OAS.paths; - const { http } = oasPath.get["x-hyperledger-cacti"]; - const { path: httpPath, verbLowerCase: httpVerb } = http; - if (!isExpressHttpVerbMethodName(httpVerb)) { - const eMsg = `${fnTag} Invalid HTTP verb "${httpVerb}" in cmd-api-server OpenAPI specification for HTTP path: "${httpPath}"`; - throw new RuntimeError(eMsg); - } - app[httpVerb](httpPath, healthcheckHandler); - - this.wsApi.on("connection", (socket: SocketIoSocket) => { - const { id } = socket; - const transport = socket.conn.transport.name; // in most cases, "polling" - log.debug(`Socket connected. ID=${id} transport=%o`, transport); - - socket.conn.on("upgrade", () => { - const upgradedTransport = socket.conn.transport.name; // in most cases, "websocket" - log.debug(`Socket upgraded ID=${id} transport=%o`, upgradedTransport); - }); - - socket.on(WatchHealthcheckV1.Subscribe, () => - new WatchHealthcheckV1Endpoint({ - process, - socket, - logLevel, - }).subscribe(), - ); - }); - - const prometheusExporterHandler = (req: Request, res: Response) => { - this.getPrometheusExporterMetrics().then((resBody) => { - res.status(200); - res.send(resBody); - }); - }; - - const { - "/api/v1/api-server/get-prometheus-exporter-metrics": oasPathPrometheus, - } = OAS.paths; - - const { http: httpPrometheus } = - oasPathPrometheus.get["x-hyperledger-cacti"]; - - const { path: httpPathPrometheus, verbLowerCase: httpVerbPrometheus } = - httpPrometheus; - - if (!isExpressHttpVerbMethodName(httpVerbPrometheus)) { - const eMsg = `${fnTag} Invalid HTTP verb "${httpVerbPrometheus}" in cmd-api-server OpenAPI specification for HTTP path: "${httpPathPrometheus}"`; - throw new RuntimeError(eMsg); - } - - app[httpVerbPrometheus](httpPathPrometheus, prometheusExporterHandler); - } - - async createCrpcExpressMiddlewareHandler(): Promise<{ - readonly svcCount: number; - readonly crpcMiddlewareHandler: express.RequestHandler; - }> { - const { crpcRoutesHandler, svcCount } = - await this.createCrpcRoutesHandler(); - - const crpcMiddlewareHandler = expressConnectMiddleware({ - routes: crpcRoutesHandler, - }) as unknown as RequestHandler; // FIXME this cast is not safe - - return { svcCount, crpcMiddlewareHandler }; - } - - async createCrpcRoutesHandler(): Promise<{ - readonly svcCount: number; - readonly crpcRoutesHandler: (router: ConnectRouter) => void; - }> { - const fnTag = `${this.className}#registerCrpcServices()}`; - const { log } = this; - - const crpcSvcRegistrations = await this.createCrpcServicesOfPlugins(); - const crpcSvcRegCount = crpcSvcRegistrations.length; - - log.debug("%s Obtained %o Crpc registrations.", fnTag, crpcSvcRegCount); - - const crpcRoutesHandler = (router: ConnectRouter) => { - log.debug("%s expressConnectMiddleware() routes handler", fnTag); - - crpcSvcRegistrations.forEach((it) => { - log.debug("%s Registering %s", fnTag, it.serviceName); - router.service(it.definition, it.implementation, it.options); - }); - }; - - return { svcCount: crpcSvcRegCount, crpcRoutesHandler }; - } - - async startCrpcServer(): Promise<{ - readonly addressInfoCrpc: AddressInfo; - readonly crpcUrl: string; - }> { - const fn = `${this.className}#startCrpcServer()`; - const { log, options } = this; - - const { config } = options; - const { crpcHost, crpcPort } = config; - - const { crpcRoutesHandler, svcCount } = - await this.createCrpcRoutesHandler(); - - log.debug("%s Registering %o CRPC routes handler(s).", fn, svcCount); - - await this.crpcServer.register(fastifyConnectPlugin, { - routes: crpcRoutesHandler, - shutdownTimeoutMs: 5000, - grpc: true, - grpcWeb: true, - }); - log.debug("%s Fastify CRPC service registration OK", fn); - - const crpcUrl = await this.crpcServer.listen({ - host: crpcHost, - port: crpcPort, - }); - log.debug("%s Fastify listen() crpcUrl: %s", fn, crpcUrl); - - const [addressInfoCrpc, ...addresses] = this.crpcServer.addresses(); - log.debug("%s server is listening at", fn, addressInfoCrpc, addresses); - return { crpcUrl, addressInfoCrpc }; - } - - async startGrpcServer(): Promise { - const fnTag = `${this.className}#startGrpcServer()`; - const { log } = this; - const { logLevel } = this.options.config; - const pluginRegistry = await this.getOrInitPluginRegistry(); - - return new Promise((resolve, reject) => { - // const grpcHost = "0.0.0.0"; // FIXME - make this configurable (config-service.ts) - const grpcHost = "127.0.0.1"; // FIXME - make this configurable (config-service.ts) - const grpcHostAndPort = `${grpcHost}:${this.options.config.grpcPort}`; - - const grpcTlsCredentials = this.options.config.grpcMtlsEnabled - ? GrpcServerCredentials.createSsl( - Buffer.from(this.options.config.apiTlsCertPem), - [ - { - cert_chain: Buffer.from(this.options.config.apiTlsCertPem), - private_key: Buffer.from(this.options.config.apiTlsKeyPem), - }, - ], - true, - ) - : GrpcServerCredentials.createInsecure(); - - this.grpcServer.addService( - default_service.org.hyperledger.cactus.cmd_api_server - .DefaultServiceClient.service, - new GrpcServerApiServer(), - ); - - log.debug("Installing gRPC services of IPluginGrpcService instances..."); - pluginRegistry.getPlugins().forEach(async (x: ICactusPlugin) => { - if (!isIPluginGrpcService(x)) { - this.log.debug("%s skipping %s instance", fnTag, x.getPackageName()); - return; - } - const opts = { logLevel }; - log.info("%s Creating gRPC service of: %s", fnTag, x.getPackageName()); - - const svcPairs = await x.createGrpcSvcDefAndImplPairs(opts); - log.debug("%s Obtained %o gRPC svc pairs OK", fnTag, svcPairs.length); - - svcPairs.forEach(({ definition, implementation }) => { - const svcNames = Object.values(definition).map((x) => x.originalName); - const svcPaths = Object.values(definition).map((x) => x.path); - log.debug("%s Adding gRPC svc names %o ...", fnTag, svcNames); - log.debug("%s Adding gRPC svc paths %o ...", fnTag, svcPaths); - this.grpcServer.addService(definition, implementation); - log.debug("%s Added gRPC svc OK ...", fnTag); - }); - - log.info("%s Added gRPC service of: %s OK", fnTag, x.getPackageName()); - }); - log.debug("%s Installed all IPluginGrpcService instances OK", fnTag); - - this.grpcServer.bindAsync( - grpcHostAndPort, - grpcTlsCredentials, - (error: Error | null, port: number) => { - if (error) { - this.log.error("%s Binding gRPC failed: ", fnTag, error); - return reject(new RuntimeError(fnTag + " gRPC bindAsync:", error)); - } else { - this.log.info("%s gRPC server bound to port %o OK", fnTag, port); - } - - const portStr = port.toString(10); - this.boundGrpcHostPort = grpcHost.concat(":").concat(portStr); - log.info("%s boundGrpcHostPort=%s", fnTag, this.boundGrpcHostPort); - - const family = determineAddressFamily(grpcHost); - resolve({ address: grpcHost, port, family }); - }, - ); - }); - } - - async createCrpcServicesOfPlugins(): Promise< - ICrpcSvcRegistration[] - > { - const fnTag = `${this.className}#startCrpcServer()`; - const { log } = this; - const { logLevel } = this.options.config; - const pluginRegistry = await this.getOrInitPluginRegistry(); - - log.debug("Installing crpc services of IPluginCrpcService instances..."); - - const out: ICrpcSvcRegistration[] = []; - - const plugins = pluginRegistry.getPlugins(); - - const tasksDone = plugins.map(async (x: ICactusPlugin) => { - if (!isIPluginCrpcService(x)) { - this.log.debug("%s skipping %s instance", fnTag, x.getPackageName()); - return; - } - const opts = { logLevel }; - log.info("%s Creating crpc service of: %s", fnTag, x.getPackageName()); - - const svcRegistrations = await x.createCrpcSvcRegistrations(opts); - log.debug("%s Got %o Crpc svc defs:", fnTag, svcRegistrations.length); - - svcRegistrations.forEach((it) => out.push(it)); - }); - - await Promise.all(tasksDone); - - return out; - } - - async startApiServer(): Promise { - const { options, expressApi: app, wsApi } = this; - const { config } = options; - const { - authorizationConfigJson: authzConf, - authorizationProtocol: authzProtocol, - logLevel, - } = config; - const apiServerOptions = config; - - const pluginRegistry = await this.getOrInitPluginRegistry(); - - const { svcCount, crpcMiddlewareHandler } = - await this.createCrpcExpressMiddlewareHandler(); - - this.log.info("Registered %o Crpc services OK", svcCount); - - app.use(crpcMiddlewareHandler); - - app.use(compression() as RequestHandler); - - const apiCorsDomainCsv = this.options.config.apiCorsDomainCsv; - const allowedDomains = apiCorsDomainCsv.split(","); - const corsMiddleware = this.createCorsMiddleware(allowedDomains); - app.use(corsMiddleware); - app.use(bodyParser.json({ limit: "50mb" })); - // Add custom replacer to handle bigint responses correctly - app.set("json replacer", this.stringifyBigIntReplacer); - - const authzFactoryOptions = { apiServerOptions, pluginRegistry, logLevel }; - const authzFactory = new AuthorizerFactory(authzFactoryOptions); - await authzFactory.initOnce(); - const authorizerO = await authzFactory.createMiddleware( - authzProtocol, - authzConf, - ); - if (authorizerO.isPresent()) { - const authorizer = authorizerO.get(); - this.checkNonExemptUnprotectedEps(authzFactory); - app.use(authorizer); - this.log.info(`Authorization request handler configured OK.`); - } - - this.getOrCreateWebServices(app); // The API server's own endpoints - - this.log.info(`Starting to install web services...`); - - const webServicesInstalled = pluginRegistry - .getPlugins() - .filter((pluginInstance) => isIPluginWebService(pluginInstance)) - .map(async (plugin: ICactusPlugin) => { - const p = plugin as IPluginWebService; - await p.getOrCreateWebServices(); - const apiSpec = p.getOpenApiSpec() as OpenAPIV3.Document; - if (apiSpec) - await installOpenapiValidationMiddleware({ app, apiSpec, logLevel }); - const webSvcs = await p.registerWebServices(app, wsApi); - return webSvcs; - }); - - const endpoints2D = await Promise.all(webServicesInstalled); - this.log.info(`Installed ${webServicesInstalled.length} web service(s) OK`); - - const endpoints = endpoints2D.reduce((acc, val) => acc.concat(val), []); - endpoints.forEach((ep) => this.log.info(`Endpoint={path=${ep.getPath()}}`)); - - const apiPort: number = this.options.config.apiPort; - const apiHost: string = this.options.config.apiHost; - - if (!this.httpServerApi.listening) { - await new Promise((resolve, reject) => { - this.httpServerApi.once("error", reject); - this.httpServerApi.once("listening", resolve); - this.httpServerApi.listen(apiPort, apiHost); - }); - } - this.httpServerApi.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 care about any of those cases - // so the casting here should be safe. Famous last words... I know. - const addressInfo = this.httpServerApi.address() as AddressInfo; - this.log.info(`Cactus API net.AddressInfo`, addressInfo); - - const wsOptions = { - path: Constants.SocketIoConnectionPathV1, - serveClient: false, - ...this.options.wsOptions, - } as SocketIoServerOptions; - - this.wsApi.attach(this.httpServerApi, wsOptions); - - if (authorizerO.isPresent()) { - const socketIoAuthorizer = authorizeSocket({ - ...authzConf.socketIoJwtOptions, - onAuthentication: (decodedToken) => { - this.log.debug("Socket authorized OK: %o", decodedToken); - }, - }); - this.wsApi.use(socketIoAuthorizer as never); - } - - return addressInfo; - } - - private checkNonExemptUnprotectedEps(factory: AuthorizerFactory): void { - const { config } = this.options; - const { authorizationConfigJson } = config; - const { unprotectedEndpointExemptions } = authorizationConfigJson; - - const nonExempts = factory.unprotectedEndpoints.filter( - (nse) => - !unprotectedEndpointExemptions.some((pt) => nse.getPath().match(pt)), - ); - if (nonExempts.length > 0) { - const csv = nonExempts.map((ep) => ep.getPath()).join(", "); - const { E_NON_EXEMPT_UNPROTECTED_ENDPOINTS } = ApiServer; - throw new Error(`${E_NON_EXEMPT_UNPROTECTED_ENDPOINTS} ${csv}`); - } - } - - createCorsMiddleware(allowedDomains: string[]): RequestHandler { - const allDomainsOk = allowedDomains.includes("*"); - - const corsOptionsDelegate: CorsOptionsDelegate = ( - req, - callback, - ) => { - const origin = req.headers["origin"]; - const isDomainOk = origin && allowedDomains.includes(origin); - // this.log.debug("CORS %j %j %s", allDomainsOk, isDomainOk, req.originalUrl); - - let corsOptions; - if (allDomainsOk) { - corsOptions = { origin: "*" }; // reflect (enable) the all origins in the CORS response - } else if (isDomainOk) { - corsOptions = { origin }; // reflect (enable) the requested origin in the CORS response - } else { - corsOptions = { origin: false }; // disable CORS for this request - } - callback(null, corsOptions); // callback expects two parameters: error and options - }; - return cors(corsOptionsDelegate); - } - - /** - * `JSON.stringify` replacer function to handle BigInt. - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json - */ - private stringifyBigIntReplacer( - _key: string, - value: bigint | unknown, - ): string | unknown { - if (typeof value === "bigint") { - return value.toString(); - } - return value; - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/authzn/authorizer-factory.ts b/packages/cactus-cmd-api-server/src/main/typescript/authzn/authorizer-factory.ts deleted file mode 100644 index d3d0284532..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/authzn/authorizer-factory.ts +++ /dev/null @@ -1,196 +0,0 @@ -import { RequestHandler } from "express"; -import { expressjwt, Params as ExpressJwtOptions } from "express-jwt"; -import { Optional } from "typescript-optional"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - IPluginWebService, - isIPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { AuthorizationProtocol } from "../config/authorization-protocol"; -import { ICactusApiServerOptions } from "../config/config-service"; -import { IAuthorizationConfig } from "./i-authorization-config"; -import { isExpressJwtOptions } from "./is-express-jwt-options-type-guard"; - -export const K_WARN_NO_AUTHORIZATION_PROTOCOL = - "The API server configuration specified no authorization protocol. " + - "All endpoints are exposed and unprotected. Do not use this in production!"; - -export interface IAuthorizationConfiguratorOptions { - logLevel?: LogLevelDesc; - pluginRegistry: PluginRegistry; - apiServerOptions: ICactusApiServerOptions; -} - -export class AuthorizerFactory { - public static readonly CLASS_NAME = "AuthorizerFactory"; - public static readonly E_BAD_EXPRESS_JWT_OPTIONS = - `Need valid express-jwt middleware configuration object. ` + - `See the documentation of the express-jwt ` + - `npm package for further details about what might be missing!`; - - private readonly log: Logger; - private readonly pluginRegistry: PluginRegistry; - private readonly plugins: IPluginWebService[]; - private _unprotectedEndpoints: IWebServiceEndpoint[] = []; - private initialized = false; - - public get isInitialized(): boolean { - return this.initialized; - } - - public get className(): string { - return AuthorizerFactory.CLASS_NAME; - } - - constructor(public readonly opts: IAuthorizationConfiguratorOptions) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.pluginRegistry, `${fnTag} options.pluginRegistry`); - Checks.truthy( - opts.pluginRegistry instanceof PluginRegistry, - `${fnTag} opts.pluginRegistry instanceof PluginRegistry`, - ); - - this.pluginRegistry = opts.pluginRegistry; - this.plugins = this.pluginRegistry - .getPlugins() - .filter((p) => isIPluginWebService(p)) as IPluginWebService[]; - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Instantiated ${this.className} OK`); - } - - private async createExpressJwtMiddleware( - authzConf: IAuthorizationConfig, - ): Promise { - const fnTag = `${this.className}#createExpressJwtMiddleware()`; - const { log } = this; - const { E_BAD_EXPRESS_JWT_OPTIONS } = AuthorizerFactory; - const { expressJwtOptions, socketIoPath } = authzConf; - if (!isExpressJwtOptions(expressJwtOptions)) { - throw new Error(`${fnTag}: ${E_BAD_EXPRESS_JWT_OPTIONS}`); - } - - const options: ExpressJwtOptions & { [key: string]: unknown } = { - audience: "org.hyperledger.cactus", // default that can be overridden - ...expressJwtOptions, - }; - const unprotectedEndpoints = this.unprotectedEndpoints.map((e) => { - const verbLowerCase = e.getVerbLowerCase(); - - // including both cases of the HTTP verbs because upgrading the - // express-unless dependency (through the upgrade of express-jwt) - // broke the test cases that were verifying if the exemptions are - // enforced correctly. - // This test breakage was traced back to express-unless not realizing - // that there is a match of verbs if they are differently cased. - const methods = [verbLowerCase.toUpperCase(), verbLowerCase]; - - // type pathFilter = string | RegExp | { url: string | RegExp, methods?: string[], method?: string | string[] }; - return { url: e.getPath(), methods }; - }); - if (socketIoPath) { - log.info("SocketIO path configuration detected: %o", socketIoPath); - // const exemption = { url: new RegExp(`${socketIoPath}.*`), method: "get" }; - // unprotectedEndpoints.push(exemption as any); - log.info( - "Exempted SocketIO path from express-jwt authorization. Using @thream/socketio-jwt instead)", - ); - } - return expressjwt(options).unless({ path: unprotectedEndpoints }); - } - - /** - * Creates an ExpressJS middleware (a request handler) that can be hooked - * up to the Express web application with authorization as per the API - * server configuration. - * It is assumed by this method that the plugin registry has already been - * initialized and now is containing the list of plugins that can be filtered - * down to the list of plugins that also expose web services (without which - * the authorization will not work properly) - */ - public async createMiddleware( - authorizationProtocol: AuthorizationProtocol, - authzConf: IAuthorizationConfig, - ): Promise> { - const fnTag = `${this.className}#createAuthzMiddleware()`; - const { log } = this; - switch (authorizationProtocol) { - case AuthorizationProtocol.NONE: { - log.warn(K_WARN_NO_AUTHORIZATION_PROTOCOL); - return Optional.empty(); - } - case AuthorizationProtocol.JSON_WEB_TOKEN: { - const handler = await this.createExpressJwtMiddleware(authzConf); - return Optional.ofNonNull(handler); - } - default: { - const acceptedCsv = Object.values(AuthorizationProtocol).join(","); - const msg = - `${fnTag} Unknown authz protocol: ${authorizationProtocol} ` + - `Accepted values: ${acceptedCsv}`; - throw new Error(msg); - } - } - } - - public async initOnce(): Promise { - if (this.isInitialized) { - return; - } - const { log } = this; - log.debug(`Initializing ${this.className}...`); - - const endpoints = await this.getEndpoints(); - this._unprotectedEndpoints = await this.findUnprotectedEndpoints(endpoints); - - log.debug(`Initialized ${this.className} OK`); - this.initialized = true; - } - - public async getEndpoints(): Promise { - const { plugins } = this; - const promises = plugins.map((p) => p.getOrCreateWebServices()); - const endpoints = await Promise.all(promises); - return endpoints.flat(); - } - - public get unprotectedEndpoints(): IWebServiceEndpoint[] { - const fnTag = `${this.className}#unprotectedEndpoints()`; - if (this.isInitialized) { - return this._unprotectedEndpoints; - } else { - throw new Error(`${fnTag} Need to call #initOnce() at least once.`); - } - } - - private async findUnprotectedEndpoints( - endpoints: IWebServiceEndpoint[], - ): Promise { - const fnTag = `${this.className}#findUnprotectedEndpoints()`; - Checks.truthy(Array.isArray(endpoints), `${fnTag} isArray(endpoints)`); - - const unprotectedEndpoints = []; - - for (const ep of endpoints) { - const authzOptionsProvider = await ep.getAuthorizationOptionsProvider(); - const { isProtected: isProtected } = await authzOptionsProvider.get(); - if (!isProtected) { - unprotectedEndpoints.push(ep); - } - } - return unprotectedEndpoints; - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/authzn/i-authorization-config.ts b/packages/cactus-cmd-api-server/src/main/typescript/authzn/i-authorization-config.ts deleted file mode 100644 index 0faac72c84..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/authzn/i-authorization-config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { AuthorizeOptions as SocketIoJwtOptions } from "@thream/socketio-jwt"; - -export interface IAuthorizationConfig { - expressJwtOptions: Record; - socketIoJwtOptions: SocketIoJwtOptions; - unprotectedEndpointExemptions: Array; - socketIoPath?: string; -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/authzn/is-express-jwt-options-type-guard.ts b/packages/cactus-cmd-api-server/src/main/typescript/authzn/is-express-jwt-options-type-guard.ts deleted file mode 100644 index db0965702c..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/authzn/is-express-jwt-options-type-guard.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Strings } from "@hyperledger/cactus-common"; -import { Params } from "express-jwt"; - -export function isExpressJwtOptions(x: unknown): x is Params { - return ( - !!x && - typeof x === "object" && - Array.isArray((x as Params).algorithms) && - Strings.isString((x as Params).secret) - ); -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/cmd/cactus-api.ts b/packages/cactus-cmd-api-server/src/main/typescript/cmd/cactus-api.ts deleted file mode 100644 index e6ba285187..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/cmd/cactus-api.ts +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env node - -import { ApiServer } from "../api-server"; -import { ConfigService } from "../config/config-service"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; - -const log: Logger = LoggerProvider.getOrCreate({ - label: "cactus-api", - level: "INFO", -}); - -const main = async () => { - const configService = new ConfigService(); - const config = await configService.getOrCreate(); - const serverOptions = config.getProperties(); - - LoggerProvider.setLogLevel(serverOptions.logLevel); - - if (process.argv[2]?.includes("help")) { - const helpText = ConfigService.getHelpText(); - console.log(helpText); - log.info(`Effective Configuration:`); - log.info(JSON.stringify(serverOptions, null, 4)); - } else { - const apiServer = new ApiServer({ config: serverOptions }); - await apiServer.start(); - } -}; - -export async function launchApp(): Promise { - try { - await main(); - log.info(`Cactus API server launched OK `); - } catch (ex) { - log.error(`Cactus API server crashed: `, ex); - process.exit(1); - } -} - -if (require.main === module) { - launchApp(); -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/common/determine-address-family.ts b/packages/cactus-cmd-api-server/src/main/typescript/common/determine-address-family.ts deleted file mode 100644 index 12a6cc857d..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/common/determine-address-family.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { isIPv4, isIPv6 } from "net"; - -export function determineAddressFamily( - address: string, -): "IPv4" | "IPv6" | "IPvUnknown" { - if (isIPv4(address)) { - return "IPv4"; - } else if (isIPv6(address)) { - return "IPv6"; - } else { - return "IPvUnknown"; - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/config/authorization-protocol.ts b/packages/cactus-cmd-api-server/src/main/typescript/config/authorization-protocol.ts deleted file mode 100644 index 3cfd842928..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/config/authorization-protocol.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum AuthorizationProtocol { - NONE = "NONE", - JSON_WEB_TOKEN = "JSON_WEB_TOKEN", -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/config/config-service.ts b/packages/cactus-cmd-api-server/src/main/typescript/config/config-service.ts deleted file mode 100644 index 2df526d515..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/config/config-service.ts +++ /dev/null @@ -1,642 +0,0 @@ -import { SecureVersion } from "tls"; -import { existsSync, readFileSync } from "fs"; -import convict, { Schema, Config, SchemaObj } from "convict"; -import { ipaddress } from "convict-format-with-validator"; -import { v4 as uuidV4 } from "uuid"; -import { generateKeyPair, exportPKCS8, exportSPKI } from "jose"; -import type { Params as ExpressJwtOptions } from "express-jwt"; -import { - LoggerProvider, - Logger, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - ConsortiumDatabase, - Constants, - PluginImport, - PluginImportType, - PluginImportAction, -} from "@hyperledger/cactus-core-api"; - -import { FORMAT_PLUGIN_ARRAY } from "./convict-plugin-array-format"; -import { SelfSignedPkiGenerator, IPki } from "./self-signed-pki-generator"; -import { AuthorizationProtocol } from "./authorization-protocol"; -import { IAuthorizationConfig } from "../authzn/i-authorization-config"; - -convict.addFormat(FORMAT_PLUGIN_ARRAY); -convict.addFormat(ipaddress); - -export interface ICactusApiServerOptions { - crpcPort: number; - crpcHost: string; - pluginManagerOptionsJson: string; - authorizationProtocol: AuthorizationProtocol; - authorizationConfigJson: IAuthorizationConfig; - configFile: string; - logLevel: LogLevelDesc; - tlsDefaultMaxVersion: SecureVersion; - cockpitEnabled: boolean; - cockpitHost: string; - cockpitPort: number; - cockpitCorsDomainCsv: string; - cockpitApiProxyRejectUnauthorized: boolean; - cockpitTlsEnabled: boolean; - cockpitMtlsEnabled: boolean; - cockpitWwwRoot: string; - cockpitTlsCertPem: string; - cockpitTlsKeyPem: string; - cockpitTlsClientCaPem: string; - apiHost: string; - apiPort: number; - apiCorsDomainCsv: string; - apiTlsEnabled: boolean; - apiMtlsEnabled: boolean; - apiTlsCertPem: string; - apiTlsKeyPem: string; - apiTlsClientCaPem: string; - grpcPort: number; - grpcMtlsEnabled: boolean; - plugins: PluginImport[]; - minNodeVersion: string; - enableShutdownHook: boolean; -} - -export class ConfigService { - private static config: Config; - - private static readonly HELP_TEXT_HEADER: string = - `Order of precedent for parameters in descdending order: CLI, Environment variables, Configuration file.\n` + - `Passing "help" as the first argument prints this message and also dumps the effective configuration.\n\n` + - `Configuration Parameters\n` + - `========================\n\n`; - - public static getHelpText(): string { - const schema: Record = ConfigService.getConfigSchema(); - - const argsHelpText = Object.keys(schema) - .map( - (optionName: string) => - ` ${optionName}:` + - `\n\t\tDescription: ${(schema[optionName] as { doc: string }).doc}` + - `\n\t\tDefault: ${ - (schema[optionName] as { default?: string }).default || - "Mandatory parameter without a default value." - }` + - `\n\t\tEnv: ${(schema[optionName] as { env: string }).env}` + - `\n\t\tCLI: --${(schema[optionName] as { arg: string }).arg}`, - ) - .join("\n"); - - return this.HELP_TEXT_HEADER.concat(argsHelpText).concat("\n\n"); - } - - private static getConfigSchema(): Schema { - return { - crpcHost: { - doc: "The host to bind the CRPC fastify instance to. Secure default is: 127.0.0.1. Use 0.0.0.0 to bind for any host.", - format: "ipaddress", - env: "CRPC_HOST", - arg: "crpc-host", - default: "127.0.0.1", - }, - crpcPort: { - doc: "The HTTP port to bind the CRPC fastify server endpoints to.", - format: "port", - env: "CRPC_PORT", - arg: "crpc-port", - default: 6000, - }, - pluginManagerOptionsJson: { - doc: "Can be used to override npm registry and authentication details for example. See https://www.npmjs.com/package/live-plugin-manager#pluginmanagerconstructoroptions-partialpluginmanageroptions for further details.", - format: "*", - default: "{}", - env: "PLUGIN_MANAGER_OPTIONS_JSON", - arg: "plugin-manager-options-json", - }, - authorizationProtocol: { - doc: - "The name of the authorization protocol to use. Accepted values" + - `are: ${Object.values(AuthorizationProtocol).join(",")}`, - format: (value: AuthorizationProtocol) => { - ConfigService.formatNonBlankString(value); - const accepted = Object.values(AuthorizationProtocol); - const acceptedCsv = accepted.join(","); - if (!accepted.includes(value)) { - const m = `Accepted auth protocols: ${acceptedCsv} Got: ${value}`; - throw new Error(m); - } - }, - default: null as unknown as AuthorizationProtocol, - env: "AUTHORIZATION_PROTOCOL", - arg: "authorization-protocol", - }, - authorizationConfigJson: { - doc: "The JSON string to deserialize when configuring authorization.", - default: null as IAuthorizationConfig | null, - format: Object, - env: "AUTHORIZATION_CONFIG_JSON", - arg: "authorization-config-json", - }, - plugins: { - doc: "A collection of plugins to load at runtime.", - format: "plugin-array", - default: [], - env: "PLUGINS", - arg: "plugins", - pluginSchema: { - action: { - format: (value: PluginImportAction) => { - ConfigService.formatNonBlankString(value); - const accepted = Object.values(PluginImportAction); - const acceptedCsv = accepted.join(","); - if (!accepted.includes(value)) { - const m = `Accepted plugin import actions: ${acceptedCsv} Got: ${value}`; - throw new Error(m); - } - }, - default: PluginImportAction.Install, - }, - options: { - format: Object, - default: {}, - }, - packageName: "*", - type: { - format: (value: PluginImportType) => { - ConfigService.formatNonBlankString(value); - const accepted = Object.values(PluginImportType); - const acceptedCsv = accepted.join(","); - if (!accepted.includes(value)) { - const m = `Accepted plugin import types: ${acceptedCsv} Got: ${value}`; - throw new Error(m); - } - }, - default: PluginImportType.Local, - }, - }, - } as SchemaObj, - configFile: { - doc: "The path to a config file that holds the configuration itself which will be parsed and validated.", - format: "*", - default: "", - env: "CONFIG_FILE", - arg: "config-file", - }, - logLevel: { - doc: - "The level at which loggers should be configured. Supported values include the following: " + - "error, warn, info, debug, trace", - format: ConfigService.formatNonBlankString, - default: "warn", - env: "LOG_LEVEL", - arg: "log-level", - }, - minNodeVersion: { - doc: - "Determines the lower bound of NodeJS version that the API " + - "server will be willing to start on. Defaults to v12 because v10 " + - "does not support TLS v1.3. If you must run on Node 10, just set " + - "this configuration parameter to 10.0.0 for example.", - format: ConfigService.formatNonBlankString, - default: "12.0.0", - env: "MIN_NODE_VERSION", - arg: "min-node-version", - }, - tlsDefaultMaxVersion: { - doc: - "Sets the DEFAULT_MAX_VERSION property of the built-in tls module of NodeJS. " + - "Only makes a difference on NOdeJS 10 and older where TLS v1.3 is turned off by default. " + - "Newer NodeJS versions ship with TLS v1.3 enabled.", - format: (version: string) => { - ConfigService.formatNonBlankString(version); - const versions = ["TLSv1.3", "TLSv1.2", "TLSv1.1", "TLSv1"]; - if (!versions.includes(version)) { - const msg = `OK TLS versions ${versions.join(",")} Got: ${version}`; - throw new Error(msg); - } - }, - default: "TLSv1.3", - env: "TLS_DEFAULT_MAX_VERSION", - arg: "tls-default-max-version", - }, - cockpitEnabled: { - doc: "Enable Cockpit server.", - format: Boolean, - env: "COCKPIT_ENABLED", - arg: "cockpit-enabled", - default: false, - }, - cockpitHost: { - doc: "The host to bind the Cockpit webserver to. Secure default is: 127.0.0.1. Use 0.0.0.0 to bind for any host.", - format: "ipaddress", - default: "127.0.0.1", - env: "COCKPIT_HOST", - arg: "cockpit-host", - }, - cockpitPort: { - doc: "The HTTP port to bind the Cockpit webserver to.", - format: "port", - env: "COCKPIT_PORT", - arg: "cockpit-port", - default: 3000, - }, - cockpitWwwRoot: { - doc: "The file-system path pointing to the static files of web application served as the cockpit by the API server.", - format: "*", - env: "COCKPIT_WWW_ROOT", - arg: "cockpit-www-root", - default: - "packages/cactus-cmd-api-server/node_modules/@hyperledger/cactus-cockpit/www/", - }, - cockpitCorsDomainCsv: { - doc: - "The Comma seperated list of domains to allow Cross Origin Resource Sharing from when " + - "serving static file requests. The wildcard (*) character is supported to allow CORS for any and all domains", - format: "*", - env: "COCKPIT_CORS_DOMAIN_CSV", - arg: "cockpit-cors-domain-csv", - default: "", - }, - cockpitTlsEnabled: { - doc: - "Enable TLS termination on the server. Useful if you do not have/want to " + - "have a reverse proxy or load balancer doing the SSL/TLS termination in your environment.", - format: Boolean, - env: "COCKPIT_TLS_ENABLED", - arg: "cockpit-tls-enabled", - default: true, - }, - cockpitApiProxyRejectUnauthorized: { - doc: - "When false: accept self signed certificates while proxying from the cockpit host " + - "to the API host. Acceptable for development environments, never use it in production.", - format: Boolean, - env: "COCKPIT_API_PROXY_REJECT_UNAUTHORIZED", - arg: "cockpit-api-proxy-reject-unauthorized", - default: true, - }, - cockpitMtlsEnabled: { - doc: - "Enable mTLS so that only clients presenting valid TLS certificate of " + - "their own will be able to connect to the cockpit", - format: Boolean, - env: "COCKPIT_MTLS_ENABLED", - arg: "cockpit-mtls-enabled", - default: true, - }, - cockpitTlsCertPem: { - doc: - "Either the file path to the cert file or the contents of it. Value is checked for existence on the file " + - "system as a path. If the latter comes back negative then value is assumed to be the actual pem string.", - format: ConfigService.filePathOrFileContents, - env: "COCKPIT_TLS_CERT_PEM", - arg: "cockpit-tls-cert-pem", - default: null as string | null, - }, - cockpitTlsKeyPem: { - sensitive: true, - doc: - "Either the file path to the key file or the contents of it. Value is checked for existence on the file " + - "system as a path. If the latter comes back negative then value is assumed to be the actual pem string.", - format: ConfigService.filePathOrFileContents, - env: "COCKPIT_TLS_KEY_PEM", - arg: "cockpit-tls-key-pem", - default: null as string | null, - }, - cockpitTlsClientCaPem: { - doc: - "Either the client cert file pat or the contents of it. Value is checked for existence on the file " + - "system as a path. If the latter comes back negative then value is assumed to be the actual pem string.", - format: ConfigService.filePathOrFileContents, - env: "COCKPIT_TLS_CLIENT_CA_PEM", - arg: "cockpit-tls-client-ca-pem", - default: null as string | null, - }, - apiHost: { - doc: "The host to bind the API to. Secure default is: 127.0.0.1. Use 0.0.0.0 to bind for any host.", - format: "ipaddress", - env: "API_HOST", - arg: "api-host", - default: "127.0.0.1", - }, - apiPort: { - doc: "The HTTP port to bind the API server endpoints to.", - format: "port", - env: "API_PORT", - arg: "api-port", - default: 4000, - }, - apiCorsDomainCsv: { - doc: - "The Comma seperated list of domains to allow Cross Origin Resource Sharing from when " + - "serving API requests. The wildcard (*) character is supported to allow CORS for any and all domains, " + - "however using it is not recommended unless you are developing or demonstrating something with Cactus.", - format: "*", - env: "API_CORS_DOMAIN_CSV", - arg: "api-cors-domain-csv", - default: "", - }, - apiTlsEnabled: { - doc: - "Enable TLS termination on the server. Useful if you do not have/want to " + - "have a reverse proxy or load balancer doing the SSL/TLS termination in your environment.", - format: Boolean, - env: "API_TLS_ENABLED", - arg: "api-tls-enabled", - default: true, - }, - apiMtlsEnabled: { - doc: - "Enable mTLS so that only clients presenting valid TLS certificate of " + - "their own will be able to connect to the web APIs", - format: Boolean, - env: "API_MTLS_ENABLED", - arg: "api-mtls-enabled", - default: true, - }, - apiTlsCertPem: { - doc: - "Either the file path to the cert file or the contents of it. Value is checked for existence on the file " + - "system as a path. If the latter comes back negative then value is assumed to be the actual pem string.", - format: ConfigService.filePathOrFileContents, - env: "API_TLS_CERT_PEM", - arg: "api-tls-cert-pem", - default: null as string | null, - }, - apiTlsClientCaPem: { - doc: - "Either the client cert file pat or the contents of it. Value is checked for existence on the file " + - "system as a path. If the latter comes back negative then value is assumed to be the actual pem string.", - format: ConfigService.filePathOrFileContents, - env: "API_TLS_CLIENT_CA_PEM", - arg: "api-tls-client-ca-pem", - default: null as string | null, - }, - apiTlsKeyPem: { - sensitive: true, - doc: - "Either the file path to the key file or the contents of it. Value is checked for existence on the file " + - "system as a path. If the latter comes back negative then value is assumed to be the actual pem string.", - format: ConfigService.filePathOrFileContents, - env: "API_TLS_KEY_PEM", - arg: "api-tls-key-pem", - default: null as string | null, - }, - grpcPort: { - doc: "The gRPC port to serve web services on.", - format: "port", - env: "GRPC_PORT", - arg: "grpc-port", - default: 5000, - }, - grpcMtlsEnabled: { - doc: - "Enable TLS termination on the grpc server. Useful if you do not have/want to " + - "have a reverse proxy or load balancer doing the SSL/TLS termination in your environment.", - format: Boolean, - env: "GRPC_TLS_ENABLED", - arg: "grpc-tls-enabled", - default: true, - }, - - enableShutdownHook: { - doc: - "It will cause the API server to listen to OS process signals and will attempt " + - "to gracefully shut itself down in response to these when the flag is enabled " + - "(which is the default behavior). You will want to turn this off if you are embedding " + - "the API server in your own application and would like to stop the API server from " + - "meddling in the OS process signal handling when you take care of it yourself in your own code.", - env: "ENABLE_SHUTDOWN_HOOK", - arg: "enable-shutdown-hook", - format: Boolean, - default: true, - }, - }; - } - - private static formatNonBlankString(value: unknown) { - if (typeof value === "undefined" || value === null || value === "") { - throw new Error("must be a non-empty string"); - } - } - - private static filePathOrFileContents(value: string) { - ConfigService.formatNonBlankString(value); - if (existsSync(value)) { - return readFileSync(value); - } else { - return value; - } - } - - /** - * Remaps the example config returned by `newExampleConfig()` into a similar object whose keys are the designated - * environment variable names. As an example it returns something like this: - * - * ```json - * { - * "HTTP_PORT": "3000" - * } - * ``` - * - * Where the output of `newExampleConfig()` would be something like this (example) - * - * ```json - * { - * "httpPort": "3000" - * } - * ``` - */ - public async newExampleConfigEnv( - cactusApiServerOptions?: ICactusApiServerOptions, - ): Promise<{ [key: string]: string }> { - cactusApiServerOptions = - cactusApiServerOptions || (await this.newExampleConfig()); - const configSchema: any = ConfigService.getConfigSchema(); - return Object.entries(cactusApiServerOptions).reduce( - (acc: any, [key, value]) => { - const schemaObj: any = configSchema[key]; - acc[schemaObj.env] = value; - return acc; - }, - {}, - ); - } - - public async newExampleConfigConvict( - cactusApiServerOptions?: ICactusApiServerOptions, - overrides?: boolean, - ): Promise> { - cactusApiServerOptions = - cactusApiServerOptions || (await this.newExampleConfig()); - const env = await this.newExampleConfigEnv(cactusApiServerOptions); - const conf = overrides ? this.create({ env }) : this.getOrCreate({ env }); - return conf; - } - - public async newExampleConfig(): Promise { - const schema = ConfigService.getConfigSchema(); - - const apiTlsEnabled: boolean = (schema.apiTlsEnabled as SchemaObj).default; - const apiHost = (schema.apiHost as SchemaObj).default; - const apiPort = (schema.apiPort as SchemaObj).default; - const apiProtocol = apiTlsEnabled ? "https:" : "http"; - const apiBaseUrl = `${apiProtocol}//${apiHost}:${apiPort}`; - const grpcPort = (schema.grpcPort as SchemaObj).default; - const grpcMtlsEnabled = (schema.grpcMtlsEnabled as SchemaObj).default; - const enableShutdownHook = (schema.enableShutdownHook as SchemaObj).default; - - const keyPair = await generateKeyPair("ES256K"); - const keyPairPem = await exportPKCS8(keyPair.privateKey); - const publicKeyPem = await exportSPKI(keyPair.publicKey); - const memberId1 = "Cactus_Example_Consortium_Member_1"; - const nodeId1 = "Cactus_Example_Consortium_Node_1"; - const consortiumDatabase: ConsortiumDatabase = { - cactusNode: [ - { - consortiumId: "Cactus_Example_Consortium", - id: nodeId1, - ledgerIds: [], - memberId: memberId1, - pluginInstanceIds: [], - nodeApiHost: apiBaseUrl, - publicKeyPem: publicKeyPem, - }, - ], - consortiumMember: [ - { - id: memberId1, - name: "Example Cactus Consortium Member 1", - nodeIds: [nodeId1], - }, - ], - ledger: [], - pluginInstance: [], - consortium: [ - { - name: "Example Cactus Consortium", - id: uuidV4(), - mainApiHost: apiBaseUrl, - memberIds: [memberId1], - }, - ], - }; - - const cockpitTlsEnabled = (schema.cockpitTlsEnabled as SchemaObj).default; - const cockpitHost = (schema.cockpitHost as SchemaObj).default; - const cockpitPort = (schema.cockpitPort as SchemaObj).default; - - const pkiGenerator = new SelfSignedPkiGenerator(); - const pkiServer: IPki = pkiGenerator.create("127.0.0.1"); - - const plugins: PluginImport[] = [ - { - packageName: "@hyperledger/cactus-plugin-keychain-memory", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: uuidV4(), - keychainId: uuidV4(), - }, - }, - { - packageName: "@hyperledger/cactus-plugin-consortium-manual", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: uuidV4(), - keyPairPem, - consortiumDatabase, - }, - }, - ]; - - const jwtSecret = uuidV4(); - - const expressJwtOptions: ExpressJwtOptions & { [key: string]: unknown } = { - secret: jwtSecret, - algorithms: ["RS256"], - audience: "org.hyperledger.cactus.jwt.audience", - issuer: "org.hyperledger.cactus.jwt.issuer", - }; - - const authorizationConfigJson: IAuthorizationConfig = { - socketIoPath: Constants.SocketIoConnectionPathV1, - unprotectedEndpointExemptions: [], - socketIoJwtOptions: { - secret: jwtSecret, - }, - expressJwtOptions, - }; - - return { - crpcHost: (schema.crpcHost as SchemaObj).default, - crpcPort: (schema.crpcPort as SchemaObj).default, - pluginManagerOptionsJson: "{}", - authorizationProtocol: AuthorizationProtocol.JSON_WEB_TOKEN, - authorizationConfigJson, - configFile: ".config.json", - logLevel: "debug", - minNodeVersion: (schema.minNodeVersion as SchemaObj).default, - tlsDefaultMaxVersion: "TLSv1.3", - apiHost, - apiPort, - apiCorsDomainCsv: (schema.apiCorsDomainCsv as SchemaObj).default, - apiMtlsEnabled: false, - cockpitApiProxyRejectUnauthorized: true, - apiTlsEnabled, - apiTlsCertPem: pkiServer.certificatePem, - apiTlsKeyPem: pkiServer.privateKeyPem, - apiTlsClientCaPem: "-", // API mTLS is off so this will not crash the server - grpcPort, - grpcMtlsEnabled, - cockpitEnabled: (schema.cockpitEnabled as SchemaObj).default, - cockpitHost, - cockpitPort, - cockpitWwwRoot: (schema.cockpitWwwRoot as SchemaObj).default, - cockpitCorsDomainCsv: (schema.cockpitCorsDomainCsv as SchemaObj).default, - cockpitMtlsEnabled: false, - cockpitTlsEnabled, - cockpitTlsCertPem: pkiServer.certificatePem, - cockpitTlsKeyPem: pkiServer.privateKeyPem, - cockpitTlsClientCaPem: "-", // Cockpit mTLS is off so this will not crash the server - plugins, - enableShutdownHook, - }; - } - - async getOrCreate(options?: { - env?: NodeJS.ProcessEnv; - args?: string[]; - }): Promise> { - if (!ConfigService.config) { - this.create(options); - } - return ConfigService.config; - } - - create(options?: { - env?: NodeJS.ProcessEnv; - args?: string[]; - }): Config { - const schema: Schema = - ConfigService.getConfigSchema(); - ConfigService.config = (convict as any)(schema, options); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - if (ConfigService.config.get("configFile")) { - const configFilePath = ConfigService.config.get("configFile"); - ConfigService.config.loadFile(configFilePath); - } - ConfigService.config.validate(); - // this validation fails with supply-chain default configuration - // and it will be removed - // this.validateKeyPairMatch(); - const level = ConfigService.config.get("logLevel"); - const logger: Logger = LoggerProvider.getOrCreate({ - label: "config-service", - level, - }); - logger.info("Configuration validation OK."); - return ConfigService.config; - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/config/convict-plugin-array-format.ts b/packages/cactus-cmd-api-server/src/main/typescript/config/convict-plugin-array-format.ts deleted file mode 100644 index 4b7f76ef62..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/config/convict-plugin-array-format.ts +++ /dev/null @@ -1,24 +0,0 @@ -import convict from "convict"; - -export const validate = (sources: any[], schema?: any) => { - if (!Array.isArray(sources)) { - throw new Error("must be of type Array"); - } - - for (const source of sources) { - convict(schema.pluginSchema).load(source).validate(); - } -}; - -export const coerce = (value: string) => { - // CLI sends comman separated objects as a JSON string without the array square brackets - // ENV sends the proper array that is valid JSON so we have to detect and handle both cases - const isJsonArray = value.startsWith("[") && value.endsWith("]"); - return isJsonArray ? JSON.parse(value) : JSON.parse(`[${value}]`); -}; - -export const FORMAT_PLUGIN_ARRAY = { - name: "plugin-array", - validate, - coerce, -}; diff --git a/packages/cactus-cmd-api-server/src/main/typescript/config/self-signed-pki-generator.ts b/packages/cactus-cmd-api-server/src/main/typescript/config/self-signed-pki-generator.ts deleted file mode 100644 index 243fbbeb38..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/config/self-signed-pki-generator.ts +++ /dev/null @@ -1,175 +0,0 @@ -/** - * @deprecated Moved to packages/cactus-test-tooling/src/main/typescript/pki/self-signed-pki-generator.ts - */ - -import { pki, md } from "node-forge"; -import { v4 as uuidV4 } from "uuid"; -import { Strings } from "@hyperledger/cactus-common"; - -/** - * @deprecated Moved to \@hyperledger/cactus-test-tooling - */ -export type ForgeKeyPair = pki.rsa.KeyPair; -/** - * @deprecated Moved to \@hyperledger/cactus-test-tooling - */ -export type ForgePrivateKey = pki.rsa.PrivateKey; -/** - * @deprecated Moved to \@hyperledger/cactus-test-tooling - */ -export type ForgeCertificate = pki.Certificate; -/** - * @deprecated Moved to \@hyperledger/cactus-test-tooling - */ -export type ForgeCertificateField = pki.CertificateField; - -/** - * @deprecated Moved to \@hyperledger/cactus-test-tooling - * - * PKI as in public key infrastructure and x509 certificates. - */ -export interface IPki { - keyPair: ForgeKeyPair; - certificate: ForgeCertificate; - certificatePem: string; - privateKeyPem: string; -} - -/** - * @deprecated Moved to \@hyperledger/cactus-test-tooling - * - * Do not use this for anything in a production deployment. It's meant as a helper - * class for development and testing purposes (enhancing developer experience). - * - * Secure by default is one of our core design principles and it's much harder to - * enforce/implement that it sounds when you also do not want to ruin the ease - * of use of the software. Dynamically pre-provisioning PKI is notoriously - * complicated and error prone to the average user/developer. - * - */ -export class SelfSignedPkiGenerator { - public create(commonName: string, parent?: IPki): IPki { - const keyPair: pki.rsa.KeyPair = pki.rsa.generateKeyPair(4096); - const privateKeyPem: string = pki.privateKeyToPem(keyPair.privateKey); - const certificate = pki.createCertificate(); - - this.configureCertificateParameters(keyPair, certificate, commonName); - if (parent) { - certificate.setIssuer(parent.certificate.subject.attributes); - certificate.publicKey = keyPair.publicKey; - // certificate.privateKey = keyPair.privateKey; - certificate.sign(parent.keyPair.privateKey, md.sha512.create()); - - if (!parent.certificate.verify(certificate)) { - throw new Error("Could not verify newly generated certificate"); - } - } else { - certificate.sign(keyPair.privateKey, md.sha512.create()); - } - - const certificatePem = pki.certificateToPem(certificate); - return { keyPair, certificate, certificatePem, privateKeyPem }; - } - - public configureCertificateParameters( - keyPair: pki.rsa.KeyPair, - certificate: pki.Certificate, - commonName: string, - ): pki.Certificate { - // 20 octets max for serial numbers of certs as per the standard - const serialNumber = Strings.replaceAll(uuidV4(), "-", "").substring(0, 19); - certificate.serialNumber = serialNumber; - certificate.publicKey = keyPair.publicKey; - certificate.privateKey = keyPair.privateKey; - certificate.validity.notBefore = new Date(); - certificate.validity.notAfter = new Date(); - - const nextYear = certificate.validity.notBefore.getFullYear() + 1; - certificate.validity.notAfter.setFullYear(nextYear); - - const certificateFields: ForgeCertificateField[] = [ - { - shortName: "CN", - name: "commonName", - value: commonName, - }, - { - name: "countryName", - value: "Universe", - }, - { - shortName: "ST", - value: "Milky Way", - }, - { - shortName: "L", - name: "localityName", - value: "Planet Earth", - }, - { - shortName: "O", - name: "organizationName", - value: "Hyperledger", - }, - { - shortName: "OU", - value: "Cactus", - }, - { - name: "unstructuredName", - value: "Cactus Dummy Self Signed Certificates", - }, - ]; - - certificate.setSubject(certificateFields); - - certificate.setIssuer(certificateFields); - - certificate.setExtensions([ - { - name: "basicConstraints", - cA: true, - }, - { - name: "keyUsage", - keyCertSign: true, - digitalSignature: true, - nonRepudiation: true, - keyEncipherment: true, - dataEncipherment: true, - }, - { - name: "extKeyUsage", - serverAuth: true, - clientAuth: true, - codeSigning: true, - emailProtection: true, - timeStamping: true, - }, - { - name: "nsCertType", - client: true, - server: true, - email: true, - objsign: true, - sslCA: true, - emailCA: true, - objCA: true, - }, - { - name: "subjectAltName", - altNames: [ - { - type: 7, // IP - ip: "127.0.0.1", - }, - ], - }, - { - name: "subjectKeyIdentifier", - }, - ]); - - return certificate; - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 6610e56b53..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,319 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus API - * Interact with a Cactus deployment through HTTP. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface HealthCheckResponse - */ -export interface HealthCheckResponse { - /** - * - * @type {boolean} - * @memberof HealthCheckResponse - */ - 'success'?: boolean; - /** - * - * @type {string} - * @memberof HealthCheckResponse - */ - 'createdAt': string; - /** - * - * @type {MemoryUsage} - * @memberof HealthCheckResponse - */ - 'memoryUsage': MemoryUsage; -} -/** - * - * @export - * @interface MemoryUsage - */ -export interface MemoryUsage { - /** - * - * @type {number} - * @memberof MemoryUsage - */ - 'rss'?: number; - /** - * - * @type {number} - * @memberof MemoryUsage - */ - 'heapTotal'?: number; - /** - * - * @type {number} - * @memberof MemoryUsage - */ - 'heapUsed'?: number; - /** - * - * @type {number} - * @memberof MemoryUsage - */ - 'external'?: number; - /** - * - * @type {number} - * @memberof MemoryUsage - */ - 'arrayBuffers'?: number; -} -/** - * - * @export - * @enum {string} - */ - -export const WatchHealthcheckV1 = { - Subscribe: 'org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Subscribe', - Next: 'org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Next', - Unsubscribe: 'org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Unsubscribe', - Error: 'org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Error', - Complete: 'org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Complete' -} as const; - -export type WatchHealthcheckV1 = typeof WatchHealthcheckV1[keyof typeof WatchHealthcheckV1]; - - - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Returns the current timestamp of the API server as proof of health/liveness - * @summary Can be used to verify liveness of an API server instance - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHealthCheckV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/api-server/healthcheck`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns the openapi.json document of specific plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOpenApiSpecV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/api-server/get-open-api-spec`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/api-server/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * Returns the current timestamp of the API server as proof of health/liveness - * @summary Can be used to verify liveness of an API server instance - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getHealthCheckV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getHealthCheckV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Returns the openapi.json document of specific plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getOpenApiSpecV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOpenApiSpecV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * Returns the current timestamp of the API server as proof of health/liveness - * @summary Can be used to verify liveness of an API server instance - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHealthCheckV1(options?: any): AxiosPromise { - return localVarFp.getHealthCheckV1(options).then((request) => request(axios, basePath)); - }, - /** - * Returns the openapi.json document of specific plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOpenApiSpecV1(options?: any): AxiosPromise { - return localVarFp.getOpenApiSpecV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * Returns the current timestamp of the API server as proof of health/liveness - * @summary Can be used to verify liveness of an API server instance - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getHealthCheckV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getHealthCheckV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns the openapi.json document of specific plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getOpenApiSpecV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getOpenApiSpecV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 2a3b997aff..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus API - * Interact with a Cactus deployment through HTTP. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index de476edf95..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus API - * Interact with a Cactus deployment through HTTP. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 69b7f36de4..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus API - * Interact with a Cactus deployment through HTTP. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 442bfad8da..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus API - * Interact with a Cactus deployment through HTTP. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/empty.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/empty.ts deleted file mode 100644 index 7b5a551bf9..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/empty.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: google/protobuf/empty.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as pb_1 from "google-protobuf"; -export namespace google.protobuf { - export class Empty extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): Empty { - const message = new Empty({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Empty { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Empty(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Empty { - return Empty.deserialize(bytes); - } - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/health_check_response_pb.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/health_check_response_pb.ts deleted file mode 100644 index 4a63d95a8d..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/health_check_response_pb.ts +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/health_check_response_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./memory_usage_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cactus.cmd_api_server { - export class HealthCheckResponsePB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - success?: boolean; - createdAt?: string; - memoryUsage?: dependency_1.org.hyperledger.cactus.cmd_api_server.MemoryUsagePB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("success" in data && data.success != undefined) { - this.success = data.success; - } - if ("createdAt" in data && data.createdAt != undefined) { - this.createdAt = data.createdAt; - } - if ("memoryUsage" in data && data.memoryUsage != undefined) { - this.memoryUsage = data.memoryUsage; - } - } - } - get success() { - return pb_1.Message.getFieldWithDefault(this, 256557056, false) as boolean; - } - set success(value: boolean) { - pb_1.Message.setField(this, 256557056, value); - } - get createdAt() { - return pb_1.Message.getFieldWithDefault(this, 61500732, "") as string; - } - set createdAt(value: string) { - pb_1.Message.setField(this, 61500732, value); - } - get memoryUsage() { - return pb_1.Message.getWrapperField(this, dependency_1.org.hyperledger.cactus.cmd_api_server.MemoryUsagePB, 335792418) as dependency_1.org.hyperledger.cactus.cmd_api_server.MemoryUsagePB; - } - set memoryUsage(value: dependency_1.org.hyperledger.cactus.cmd_api_server.MemoryUsagePB) { - pb_1.Message.setWrapperField(this, 335792418, value); - } - get has_memoryUsage() { - return pb_1.Message.getField(this, 335792418) != null; - } - static fromObject(data: { - success?: boolean; - createdAt?: string; - memoryUsage?: ReturnType; - }): HealthCheckResponsePB { - const message = new HealthCheckResponsePB({}); - if (data.success != null) { - message.success = data.success; - } - if (data.createdAt != null) { - message.createdAt = data.createdAt; - } - if (data.memoryUsage != null) { - message.memoryUsage = dependency_1.org.hyperledger.cactus.cmd_api_server.MemoryUsagePB.fromObject(data.memoryUsage); - } - return message; - } - toObject() { - const data: { - success?: boolean; - createdAt?: string; - memoryUsage?: ReturnType; - } = {}; - if (this.success != null) { - data.success = this.success; - } - if (this.createdAt != null) { - data.createdAt = this.createdAt; - } - if (this.memoryUsage != null) { - data.memoryUsage = this.memoryUsage.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.success != false) - writer.writeBool(256557056, this.success); - if (this.createdAt.length) - writer.writeString(61500732, this.createdAt); - if (this.has_memoryUsage) - writer.writeMessage(335792418, this.memoryUsage, () => this.memoryUsage.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): HealthCheckResponsePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new HealthCheckResponsePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 256557056: - message.success = reader.readBool(); - break; - case 61500732: - message.createdAt = reader.readString(); - break; - case 335792418: - reader.readMessage(message.memoryUsage, () => message.memoryUsage = dependency_1.org.hyperledger.cactus.cmd_api_server.MemoryUsagePB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): HealthCheckResponsePB { - return HealthCheckResponsePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/memory_usage_pb.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/memory_usage_pb.ts deleted file mode 100644 index 8bc33418f4..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/memory_usage_pb.ts +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/memory_usage_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cactus.cmd_api_server { - export class MemoryUsagePB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - rss?: number; - heapTotal?: number; - heapUsed?: number; - external?: number; - arrayBuffers?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("rss" in data && data.rss != undefined) { - this.rss = data.rss; - } - if ("heapTotal" in data && data.heapTotal != undefined) { - this.heapTotal = data.heapTotal; - } - if ("heapUsed" in data && data.heapUsed != undefined) { - this.heapUsed = data.heapUsed; - } - if ("external" in data && data.external != undefined) { - this.external = data.external; - } - if ("arrayBuffers" in data && data.arrayBuffers != undefined) { - this.arrayBuffers = data.arrayBuffers; - } - } - } - get rss() { - return pb_1.Message.getFieldWithDefault(this, 113234, 0) as number; - } - set rss(value: number) { - pb_1.Message.setField(this, 113234, value); - } - get heapTotal() { - return pb_1.Message.getFieldWithDefault(this, 114487480, 0) as number; - } - set heapTotal(value: number) { - pb_1.Message.setField(this, 114487480, value); - } - get heapUsed() { - return pb_1.Message.getFieldWithDefault(this, 30910521, 0) as number; - } - set heapUsed(value: number) { - pb_1.Message.setField(this, 30910521, value); - } - get external() { - return pb_1.Message.getFieldWithDefault(this, 210148408, 0) as number; - } - set external(value: number) { - pb_1.Message.setField(this, 210148408, value); - } - get arrayBuffers() { - return pb_1.Message.getFieldWithDefault(this, 116952168, 0) as number; - } - set arrayBuffers(value: number) { - pb_1.Message.setField(this, 116952168, value); - } - static fromObject(data: { - rss?: number; - heapTotal?: number; - heapUsed?: number; - external?: number; - arrayBuffers?: number; - }): MemoryUsagePB { - const message = new MemoryUsagePB({}); - if (data.rss != null) { - message.rss = data.rss; - } - if (data.heapTotal != null) { - message.heapTotal = data.heapTotal; - } - if (data.heapUsed != null) { - message.heapUsed = data.heapUsed; - } - if (data.external != null) { - message.external = data.external; - } - if (data.arrayBuffers != null) { - message.arrayBuffers = data.arrayBuffers; - } - return message; - } - toObject() { - const data: { - rss?: number; - heapTotal?: number; - heapUsed?: number; - external?: number; - arrayBuffers?: number; - } = {}; - if (this.rss != null) { - data.rss = this.rss; - } - if (this.heapTotal != null) { - data.heapTotal = this.heapTotal; - } - if (this.heapUsed != null) { - data.heapUsed = this.heapUsed; - } - if (this.external != null) { - data.external = this.external; - } - if (this.arrayBuffers != null) { - data.arrayBuffers = this.arrayBuffers; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.rss != 0) - writer.writeFloat(113234, this.rss); - if (this.heapTotal != 0) - writer.writeFloat(114487480, this.heapTotal); - if (this.heapUsed != 0) - writer.writeFloat(30910521, this.heapUsed); - if (this.external != 0) - writer.writeFloat(210148408, this.external); - if (this.arrayBuffers != 0) - writer.writeFloat(116952168, this.arrayBuffers); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MemoryUsagePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MemoryUsagePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 113234: - message.rss = reader.readFloat(); - break; - case 114487480: - message.heapTotal = reader.readFloat(); - break; - case 30910521: - message.heapUsed = reader.readFloat(); - break; - case 210148408: - message.external = reader.readFloat(); - break; - case 116952168: - message.arrayBuffers = reader.readFloat(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): MemoryUsagePB { - return MemoryUsagePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service.ts deleted file mode 100644 index 06d8bf0eb1..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service.ts +++ /dev/null @@ -1,218 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: services/default_service.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/empty"; -import * as dependency_2 from "./../models/health_check_response_pb"; -import * as pb_1 from "google-protobuf"; -import * as grpc_1 from "@grpc/grpc-js"; -export namespace org.hyperledger.cactus.cmd_api_server { - export class GetOpenApiSpecV1Response extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - data?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("data" in data && data.data != undefined) { - this.data = data.data; - } - } - } - get data() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set data(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - data?: string; - }): GetOpenApiSpecV1Response { - const message = new GetOpenApiSpecV1Response({}); - if (data.data != null) { - message.data = data.data; - } - return message; - } - toObject() { - const data: { - data?: string; - } = {}; - if (this.data != null) { - data.data = this.data; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.data.length) - writer.writeString(1, this.data); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetOpenApiSpecV1Response { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetOpenApiSpecV1Response(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.data = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetOpenApiSpecV1Response { - return GetOpenApiSpecV1Response.deserialize(bytes); - } - } - export class GetPrometheusMetricsV1Response extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - data?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("data" in data && data.data != undefined) { - this.data = data.data; - } - } - } - get data() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set data(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - data?: string; - }): GetPrometheusMetricsV1Response { - const message = new GetPrometheusMetricsV1Response({}); - if (data.data != null) { - message.data = data.data; - } - return message; - } - toObject() { - const data: { - data?: string; - } = {}; - if (this.data != null) { - data.data = this.data; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.data.length) - writer.writeString(1, this.data); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetPrometheusMetricsV1Response { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetPrometheusMetricsV1Response(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.data = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetPrometheusMetricsV1Response { - return GetPrometheusMetricsV1Response.deserialize(bytes); - } - } - interface GrpcUnaryServiceInterface { - (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - } - interface GrpcStreamServiceInterface { - (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; - (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; - } - interface GrpWritableServiceInterface { - (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - } - interface GrpcChunkServiceInterface { - (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; - (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; - } - interface GrpcPromiseServiceInterface { - (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; - (message: P, options?: grpc_1.CallOptions): Promise; - } - export abstract class UnimplementedDefaultServiceService { - static definition = { - GetHealthCheckV1: { - path: "/org.hyperledger.cactus.cmd_api_server.DefaultService/GetHealthCheckV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: dependency_1.google.protobuf.Empty) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => dependency_1.google.protobuf.Empty.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_2.org.hyperledger.cactus.cmd_api_server.HealthCheckResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_2.org.hyperledger.cactus.cmd_api_server.HealthCheckResponsePB.deserialize(new Uint8Array(bytes)) - }, - GetOpenApiSpecV1: { - path: "/org.hyperledger.cactus.cmd_api_server.DefaultService/GetOpenApiSpecV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: dependency_1.google.protobuf.Empty) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => dependency_1.google.protobuf.Empty.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: GetOpenApiSpecV1Response) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => GetOpenApiSpecV1Response.deserialize(new Uint8Array(bytes)) - }, - GetPrometheusMetricsV1: { - path: "/org.hyperledger.cactus.cmd_api_server.DefaultService/GetPrometheusMetricsV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: dependency_1.google.protobuf.Empty) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => dependency_1.google.protobuf.Empty.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: GetPrometheusMetricsV1Response) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => GetPrometheusMetricsV1Response.deserialize(new Uint8Array(bytes)) - } - }; - [method: string]: grpc_1.UntypedHandleCall; - abstract GetHealthCheckV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract GetOpenApiSpecV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract GetPrometheusMetricsV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - } - export class DefaultServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedDefaultServiceService.definition, "DefaultService", {}) { - constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { - super(address, credentials, options); - } - GetHealthCheckV1: GrpcUnaryServiceInterface = (message: dependency_1.google.protobuf.Empty, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.GetHealthCheckV1(message, metadata, options, callback); - }; - GetOpenApiSpecV1: GrpcUnaryServiceInterface = (message: dependency_1.google.protobuf.Empty, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.GetOpenApiSpecV1(message, metadata, options, callback); - }; - GetPrometheusMetricsV1: GrpcUnaryServiceInterface = (message: dependency_1.google.protobuf.Empty, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.GetPrometheusMetricsV1(message, metadata, options, callback); - }; - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service_grpc_pb.d.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service_grpc_pb.d.ts deleted file mode 100644 index 2270957a15..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service_grpc_pb.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -// package: org.hyperledger.cactus.cmd_api_server -// file: services/default_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as services_default_service_pb from "../services/default_service_pb"; -import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; -import * as models_health_check_response_pb_pb from "../models/health_check_response_pb_pb"; - -interface IDefaultServiceService extends grpc.ServiceDefinition { - getHealthCheckV1: IDefaultServiceService_IGetHealthCheckV1; - getOpenApiSpecV1: IDefaultServiceService_IGetOpenApiSpecV1; - getPrometheusMetricsV1: IDefaultServiceService_IGetPrometheusMetricsV1; -} - -interface IDefaultServiceService_IGetHealthCheckV1 extends grpc.MethodDefinition { - path: "/org.hyperledger.cactus.cmd_api_server.DefaultService/GetHealthCheckV1"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IDefaultServiceService_IGetOpenApiSpecV1 extends grpc.MethodDefinition { - path: "/org.hyperledger.cactus.cmd_api_server.DefaultService/GetOpenApiSpecV1"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IDefaultServiceService_IGetPrometheusMetricsV1 extends grpc.MethodDefinition { - path: "/org.hyperledger.cactus.cmd_api_server.DefaultService/GetPrometheusMetricsV1"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const DefaultServiceService: IDefaultServiceService; - -export interface IDefaultServiceServer extends grpc.UntypedServiceImplementation { - getHealthCheckV1: grpc.handleUnaryCall; - getOpenApiSpecV1: grpc.handleUnaryCall; - getPrometheusMetricsV1: grpc.handleUnaryCall; -} - -export interface IDefaultServiceClient { - getHealthCheckV1(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: models_health_check_response_pb_pb.HealthCheckResponsePB) => void): grpc.ClientUnaryCall; - getHealthCheckV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: models_health_check_response_pb_pb.HealthCheckResponsePB) => void): grpc.ClientUnaryCall; - getHealthCheckV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: models_health_check_response_pb_pb.HealthCheckResponsePB) => void): grpc.ClientUnaryCall; - getOpenApiSpecV1(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetOpenApiSpecV1Response) => void): grpc.ClientUnaryCall; - getOpenApiSpecV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetOpenApiSpecV1Response) => void): grpc.ClientUnaryCall; - getOpenApiSpecV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetOpenApiSpecV1Response) => void): grpc.ClientUnaryCall; - getPrometheusMetricsV1(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetPrometheusMetricsV1Response) => void): grpc.ClientUnaryCall; - getPrometheusMetricsV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetPrometheusMetricsV1Response) => void): grpc.ClientUnaryCall; - getPrometheusMetricsV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetPrometheusMetricsV1Response) => void): grpc.ClientUnaryCall; -} - -export class DefaultServiceClient extends grpc.Client implements IDefaultServiceClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public getHealthCheckV1(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: models_health_check_response_pb_pb.HealthCheckResponsePB) => void): grpc.ClientUnaryCall; - public getHealthCheckV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: models_health_check_response_pb_pb.HealthCheckResponsePB) => void): grpc.ClientUnaryCall; - public getHealthCheckV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: models_health_check_response_pb_pb.HealthCheckResponsePB) => void): grpc.ClientUnaryCall; - public getOpenApiSpecV1(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetOpenApiSpecV1Response) => void): grpc.ClientUnaryCall; - public getOpenApiSpecV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetOpenApiSpecV1Response) => void): grpc.ClientUnaryCall; - public getOpenApiSpecV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetOpenApiSpecV1Response) => void): grpc.ClientUnaryCall; - public getPrometheusMetricsV1(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetPrometheusMetricsV1Response) => void): grpc.ClientUnaryCall; - public getPrometheusMetricsV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetPrometheusMetricsV1Response) => void): grpc.ClientUnaryCall; - public getPrometheusMetricsV1(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: services_default_service_pb.GetPrometheusMetricsV1Response) => void): grpc.ClientUnaryCall; -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service_pb.d.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service_pb.d.ts deleted file mode 100644 index 2c4bf0b1ee..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service_pb.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -// package: org.hyperledger.cactus.cmd_api_server -// file: services/default_service.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; -import * as models_health_check_response_pb_pb from "../models/health_check_response_pb_pb"; - -export class GetOpenApiSpecV1Response extends jspb.Message { - getData(): string; - setData(value: string): GetOpenApiSpecV1Response; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetOpenApiSpecV1Response.AsObject; - static toObject(includeInstance: boolean, msg: GetOpenApiSpecV1Response): GetOpenApiSpecV1Response.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetOpenApiSpecV1Response, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetOpenApiSpecV1Response; - static deserializeBinaryFromReader(message: GetOpenApiSpecV1Response, reader: jspb.BinaryReader): GetOpenApiSpecV1Response; -} - -export namespace GetOpenApiSpecV1Response { - export type AsObject = { - data: string, - } -} - -export class GetPrometheusMetricsV1Response extends jspb.Message { - getData(): string; - setData(value: string): GetPrometheusMetricsV1Response; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetPrometheusMetricsV1Response.AsObject; - static toObject(includeInstance: boolean, msg: GetPrometheusMetricsV1Response): GetPrometheusMetricsV1Response.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetPrometheusMetricsV1Response, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetPrometheusMetricsV1Response; - static deserializeBinaryFromReader(message: GetPrometheusMetricsV1Response, reader: jspb.BinaryReader): GetPrometheusMetricsV1Response; -} - -export namespace GetPrometheusMetricsV1Response { - export type AsObject = { - data: string, - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/grpc/grpc-credentials-factory.ts b/packages/cactus-cmd-api-server/src/main/typescript/grpc/grpc-credentials-factory.ts deleted file mode 100644 index f587e18285..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/grpc/grpc-credentials-factory.ts +++ /dev/null @@ -1,91 +0,0 @@ -import * as grpc from "@grpc/grpc-js"; - -/** - * Re-exports the underlying `grpc.ServerCredentials.createInsecure()` call - * verbatim. - * Why though? This is necessary because the {grpc.Server} object does an `instanceof` - * validation on credential objects that are passed to it and this check comes back - * negative if you've constructed the credentials object with a different instance - * of the library, **even** if the versions of the library instances are the **same**. - * - * Therefore this is a workaround that allows callers to construct credentials - * objects with the same import of the `@grpc/grpc-js` library that the {ApiServer} - * of this package is using. - * - * @returns {grpc.ServerCredentials} - */ -export function createGrpcInsecureServerCredentials(): grpc.ServerCredentials { - return grpc.ServerCredentials.createInsecure(); -} - -/** - * Re-exports the underlying `grpc.ServerCredentials.createInsecure()` call - * verbatim. - * Why though? This is necessary because the {grpc.Server} object does an `instanceof` - * validation on credential objects that are passed to it and this check comes back - * negative if you've constructed the credentials object with a different instance - * of the library, **even** if the versions of the library instances are the **same**. - * - * Therefore this is a workaround that allows callers to construct credentials - * objects with the same import of the `@grpc/grpc-js` library that the {ApiServer} - * of this package is using. - * - * @returns {grpc.ServerCredentials} - */ -export function createGrpcSslServerCredentials( - rootCerts: Buffer | null, - keyCertPairs: grpc.KeyCertPair[], - checkClientCertificate?: boolean, -): grpc.ServerCredentials { - return grpc.ServerCredentials.createSsl( - rootCerts, - keyCertPairs, - checkClientCertificate, - ); -} - -/** - * Re-exports the underlying `grpc.ServerCredentials.createInsecure()` call - * verbatim. - * Why though? This is necessary because the {grpc.Server} object does an `instanceof` - * validation on credential objects that are passed to it and this check comes back - * negative if you've constructed the credentials object with a different instance - * of the library, **even** if the versions of the library instances are the **same**. - * - * Therefore this is a workaround that allows callers to construct credentials - * objects with the same import of the `@grpc/grpc-js` library that the {ApiServer} - * of this package is using. - * - * @returns {grpc.ChannelCredentials} - */ -export function createGrpcInsecureChannelCredentials(): grpc.ChannelCredentials { - return grpc.ChannelCredentials.createInsecure(); -} - -/** - * Re-exports the underlying `grpc.ServerCredentials.createInsecure()` call - * verbatim. - * Why though? This is necessary because the {grpc.Server} object does an `instanceof` - * validation on credential objects that are passed to it and this check comes back - * negative if you've constructed the credentials object with a different instance - * of the library, **even** if the versions of the library instances are the **same**. - * - * Therefore this is a workaround that allows callers to construct credentials - * objects with the same import of the `@grpc/grpc-js` library that the {ApiServer} - * of this package is using. - * - * @returns {grpc.ChannelCredentials} - */ -export function createGrpcSslChannelCredentials( - rootCerts?: Buffer | null, - privateKey?: Buffer | null, - certChain?: Buffer | null, - verifyOptions?: grpc.VerifyOptions, -): grpc.ChannelCredentials { - return grpc.ChannelCredentials.createSsl( - rootCerts, - privateKey, - certChain, - verifyOptions, - ); -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/grpc/grpc-server-factory.ts b/packages/cactus-cmd-api-server/src/main/typescript/grpc/grpc-server-factory.ts deleted file mode 100644 index 288bd7ea85..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/grpc/grpc-server-factory.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as grpc from "@grpc/grpc-js"; - -/** - * Re-exports the underlying `new grpc.Server()` call verbatim. - * - * Why though? This is necessary because the {grpc.Server} object does an `instanceof` - * validation on credential objects that are passed to it and this check comes back - * negative if you've constructed the credentials object with a different instance - * of the library, **even** if the versions of the library instances are the **same**. - * - * Therefore this is a workaround that allows callers to construct credentials - * objects/servers with the same import of the `@grpc/grpc-js` library that the - * {ApiServer} of this package is using internally. - * - * @returns {grpc.Server} - */ -export function createGrpcServer( - options?: grpc.ServerOptions | undefined, -): grpc.Server { - return new grpc.Server(options); -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/index.ts b/packages/cactus-cmd-api-server/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-cmd-api-server/src/main/typescript/index.web.ts b/packages/cactus-cmd-api-server/src/main/typescript/index.web.ts deleted file mode 100755 index 0e52853ffe..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/index.web.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; - -export { isHealthcheckResponse } from "./model/is-healthcheck-response-type-guard"; diff --git a/packages/cactus-cmd-api-server/src/main/typescript/model/is-healthcheck-response-type-guard.ts b/packages/cactus-cmd-api-server/src/main/typescript/model/is-healthcheck-response-type-guard.ts deleted file mode 100644 index dde672427a..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/model/is-healthcheck-response-type-guard.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Bools } from "@hyperledger/cactus-common"; -import { HealthCheckResponse } from "../generated/openapi/typescript-axios/api"; - -export function isHealthcheckResponse(x: unknown): x is HealthCheckResponse { - return ( - !!x && - typeof x === "object" && - Bools.isBooleanStrict((x as HealthCheckResponse).success) && - typeof (x as HealthCheckResponse).memoryUsage === "object" && - typeof (x as HealthCheckResponse).memoryUsage.rss === "number" && - typeof (x as HealthCheckResponse).memoryUsage.heapTotal === "number" && - typeof (x as HealthCheckResponse).memoryUsage.heapUsed === "number" && - typeof (x as HealthCheckResponse).memoryUsage.external === "number" && - typeof (x as HealthCheckResponse).createdAt === "string" - ); -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/openapi/get-open-api-spec.ts b/packages/cactus-cmd-api-server/src/main/typescript/openapi/get-open-api-spec.ts deleted file mode 100644 index bf9009fff4..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/openapi/get-open-api-spec.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - ICactusPlugin, - IPluginWebService, - isIPluginWebService, -} from "@hyperledger/cactus-core-api"; -import type { OpenAPIV3 } from "express-openapi-validator/dist/framework/types"; - -export async function getOpenApiSpecV1(req: { - readonly pluginRegistry: PluginRegistry; - readonly logLevel?: LogLevelDesc; -}): Promise { - const fnTag = `cactus-cmd-api-server/openapi/get-open-api-spec.ts#getOpenApiSpecV1()`; - Checks.truthy(req, `${fnTag} req`); - Checks.truthy(req.pluginRegistry, `${fnTag} req.pluginRegistry`); - const { pluginRegistry, logLevel = "INFO" } = req; - - const log = LoggerProvider.getOrCreate({ - label: fnTag, - level: logLevel, - }); - - const allPlugins = pluginRegistry.getPlugins(); - - log.debug("Pulled a total of %o plugins from registry.", allPlugins.length); - - const webSvcPlugins = allPlugins.filter((p) => isIPluginWebService(p)); - - log.debug("Found %o web service plugins.", webSvcPlugins.length); - - const openApiJsonSpecsPromises = webSvcPlugins.map( - async (plugin: ICactusPlugin) => { - const pkgName = plugin.getPackageName(); - log.debug("Getting OpenAPI spec for %s", pkgName); - const webPlugin = plugin as IPluginWebService; - const openApiSpec = await webPlugin.getOpenApiSpec(); - return openApiSpec as OpenAPIV3.Document; - }, - ); - - const openApiJsonSpecs = await Promise.all(openApiJsonSpecsPromises); - return openApiJsonSpecs; -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index 29b437ee31..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { TotalPluginImports } from "./response.type"; - -import { - totalTxCount, - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS, -} from "./metrics"; - -export async function collectMetrics( - totalPluginImports: TotalPluginImports, -): Promise { - totalTxCount - .labels(K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS) - .set(totalPluginImports.counter); -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index 3e38c0c28f..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS = - "cactus_api_server_total_plugin_imports"; - -export const totalTxCount = new Gauge({ - registers: [], - name: K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS, - help: "Total number of plugins imported", - labelNames: ["type"], -}); diff --git a/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index afc62894f0..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,40 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { TotalPluginImports } from "./response.type"; -import { K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS } from "./metrics"; -import { totalTxCount } from "./metrics"; -import { collectMetrics } from "./data-fetcher"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly totalPluginImports: TotalPluginImports = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public setTotalPluginImports(totalPluginImports: number): void { - this.totalPluginImports.counter = totalPluginImports; - collectMetrics(this.totalPluginImports); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalTxCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index fe3bd947fb..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type TotalPluginImports = { - counter: number; -}; diff --git a/packages/cactus-cmd-api-server/src/main/typescript/proto.d.ts b/packages/cactus-cmd-api-server/src/main/typescript/proto.d.ts deleted file mode 100644 index 770637e29e..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/proto.d.ts +++ /dev/null @@ -1,5 +0,0 @@ - -declare module '*.proto' { - const fileContent: string; - export default fileContent; -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/public-api.ts b/packages/cactus-cmd-api-server/src/main/typescript/public-api.ts deleted file mode 100755 index 911a7e60fe..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/public-api.ts +++ /dev/null @@ -1,50 +0,0 @@ -export { ApiServer, IApiServerConstructorOptions } from "./api-server"; - -export { launchApp } from "./cmd/cactus-api"; - -export { - ConfigService, - ICactusApiServerOptions, -} from "./config/config-service"; - -export { - SelfSignedPkiGenerator, - ForgeCertificateField, - ForgeCertificate, - ForgeKeyPair, - ForgePrivateKey, - IPki, -} from "./config/self-signed-pki-generator"; - -// gRPC - generated models and client -export * as default_service from "./generated/proto/protoc-gen-ts/services/default_service"; -export * as health_check_response_pb from "./generated/proto/protoc-gen-ts/models/health_check_response_pb"; -export * as memory_usage_pb from "./generated/proto/protoc-gen-ts/models/memory_usage_pb"; -export * as empty from "./generated/proto/protoc-gen-ts/google/protobuf/empty"; - -// HTTP - generated models and client -export * from "./generated/openapi/typescript-axios/index"; - -export { ApiServerApiClient } from "./api-client/api-server-api-client"; -export { ApiServerApiClientConfiguration } from "./api-client/api-server-api-client"; -export { IApiServerApiClientOptions } from "./api-client/api-server-api-client"; - -export { isHealthcheckResponse } from "./model/is-healthcheck-response-type-guard"; -export { isExpressJwtOptions } from "./authzn/is-express-jwt-options-type-guard"; - -export { - AuthorizerFactory, - IAuthorizationConfiguratorOptions, - K_WARN_NO_AUTHORIZATION_PROTOCOL, -} from "./authzn/authorizer-factory"; -export { IAuthorizationConfig } from "./authzn/i-authorization-config"; -export { AuthorizationProtocol } from "./config/authorization-protocol"; - -export { - createGrpcInsecureChannelCredentials, - createGrpcInsecureServerCredentials, - createGrpcSslChannelCredentials, - createGrpcSslServerCredentials, -} from "./grpc/grpc-credentials-factory"; - -export { createGrpcServer } from "./grpc/grpc-server-factory"; diff --git a/packages/cactus-cmd-api-server/src/main/typescript/web-services/get-open-api-spec-v1-endpoint.ts b/packages/cactus-cmd-api-server/src/main/typescript/web-services/get-open-api-spec-v1-endpoint.ts deleted file mode 100644 index 79b3e6d4b0..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/web-services/get-open-api-spec-v1-endpoint.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { - GetOpenApiSpecV1EndpointBase, - IGetOpenApiSpecV1EndpointBaseOptions, -} from "@hyperledger/cactus-core"; - -import { Checks, LogLevelDesc } from "@hyperledger/cactus-common"; -import { IWebServiceEndpoint } from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -export const OasPathGetOpenApiSpecV1 = - OAS.paths["/api/v1/api-server/get-open-api-spec"]; - -export type OasPathTypeGetOpenApiSpecV1 = typeof OasPathGetOpenApiSpecV1; - -export interface IGetOpenApiSpecV1EndpointOptions - extends IGetOpenApiSpecV1EndpointBaseOptions< - typeof OAS, - OasPathTypeGetOpenApiSpecV1 - > { - readonly logLevel?: LogLevelDesc; -} - -export class GetOpenApiSpecV1Endpoint - extends GetOpenApiSpecV1EndpointBase - implements IWebServiceEndpoint -{ - public get className(): string { - return GetOpenApiSpecV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetOpenApiSpecV1EndpointOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/web-services/grpc/grpc-server-api-server.ts b/packages/cactus-cmd-api-server/src/main/typescript/web-services/grpc/grpc-server-api-server.ts deleted file mode 100644 index 7716710efe..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/web-services/grpc/grpc-server-api-server.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { ServerUnaryCall, requestCallback } from "@grpc/grpc-js"; -import { Empty } from "google-protobuf/google/protobuf/empty_pb"; - -import * as health_check_response_pb from "../../generated/proto/protoc-gen-ts/models/health_check_response_pb"; -import * as memory_usage_pb from "../../generated/proto/protoc-gen-ts/models/memory_usage_pb"; -import * as default_service from "../../generated/proto/protoc-gen-ts/services/default_service"; - -import OAS from "../../../json/openapi.json"; -import { stringify } from "safe-stable-stringify"; - -export class GrpcServerApiServer extends default_service.org.hyperledger.cactus - .cmd_api_server.UnimplementedDefaultServiceService { - GetHealthCheckV1( - call: ServerUnaryCall< - Empty, - health_check_response_pb.org.hyperledger.cactus.cmd_api_server.HealthCheckResponsePB - >, - callback: requestCallback, - ): void { - const memoryUsage = - new memory_usage_pb.org.hyperledger.cactus.cmd_api_server.MemoryUsagePB( - process.memoryUsage(), - ); - - const healthCheckResponse = - new health_check_response_pb.org.hyperledger.cactus.cmd_api_server.HealthCheckResponsePB( - { - success: true, - createdAt: new Date().toJSON(), - memoryUsage, - }, - ); - callback(null, healthCheckResponse); - } - - GetPrometheusMetricsV1( - call: ServerUnaryCall< - Empty, - default_service.org.hyperledger.cactus.cmd_api_server.GetPrometheusMetricsV1Response - >, - callback: requestCallback, - ): void { - const res = - new default_service.org.hyperledger.cactus.cmd_api_server.GetPrometheusMetricsV1Response(); - callback(null, res); - } - - GetOpenApiSpecV1( - call: ServerUnaryCall< - Empty, - default_service.org.hyperledger.cactus.cmd_api_server.GetOpenApiSpecV1Response - >, - callback: requestCallback, - ): void { - const res = - new default_service.org.hyperledger.cactus.cmd_api_server.GetOpenApiSpecV1Response(); - const specAsJson = stringify(OAS); - res.data = specAsJson; - callback(null, res); - } -} diff --git a/packages/cactus-cmd-api-server/src/main/typescript/web-services/watch-healthcheck-v1-endpoint.ts b/packages/cactus-cmd-api-server/src/main/typescript/web-services/watch-healthcheck-v1-endpoint.ts deleted file mode 100644 index c6db12eea0..0000000000 --- a/packages/cactus-cmd-api-server/src/main/typescript/web-services/watch-healthcheck-v1-endpoint.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Socket as SocketIoSocket } from "socket.io"; - -import { Logger, Checks } from "@hyperledger/cactus-common"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { HealthCheckResponse } from "../generated/openapi/typescript-axios"; -import { WatchHealthcheckV1 } from "../generated/openapi/typescript-axios"; - -export interface IWatchHealthcheckV1EndpointOptions { - logLevel?: LogLevelDesc; - socket: SocketIoSocket; - process: NodeJS.Process; -} - -export class WatchHealthcheckV1Endpoint { - public static readonly CLASS_NAME = "WatchHealthcheckV1Endpoint"; - - private readonly log: Logger; - private readonly socket: SocketIoSocket< - Record void>, - Record void> - >; - private readonly process: NodeJS.Process; - - public get className(): string { - return WatchHealthcheckV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IWatchHealthcheckV1EndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.process, `${fnTag} arg options.process`); - Checks.truthy(options.socket, `${fnTag} arg options.socket`); - - this.process = options.process; - this.socket = options.socket; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public async subscribe(): Promise { - const { socket, log } = this; - log.debug(`${WatchHealthcheckV1.Subscribe} => ${socket.id}`); - - const timerId = setInterval(() => { - try { - const next: HealthCheckResponse = { - createdAt: new Date().toJSON(), - memoryUsage: this.process.memoryUsage(), - success: true, - }; - socket.emit(WatchHealthcheckV1.Next, next); - } catch (ex) { - log.error(`Failed to construct health check response:`, ex); - socket.emit(WatchHealthcheckV1.Error, ex); - clearInterval(timerId); - } - }, 1000); - - socket.on("disconnect", async (reason: string) => { - log.debug("WebSocket:disconnect reason=%o", reason); - clearInterval(timerId); - }); - - socket.on(WatchHealthcheckV1.Unsubscribe, () => { - clearInterval(timerId); - }); - } -} diff --git a/packages/cactus-cmd-api-server/src/test/resources/artillery/benchmark-script.yaml b/packages/cactus-cmd-api-server/src/test/resources/artillery/benchmark-script.yaml deleted file mode 100644 index 32e31e2dd6..0000000000 --- a/packages/cactus-cmd-api-server/src/test/resources/artillery/benchmark-script.yaml +++ /dev/null @@ -1,18 +0,0 @@ -config: - target: "{{ $processEnvironment.apiHost }}" - phases: - - duration: 3 - arrivalRate: 5 - name: Warm up - - duration: 10 - arrivalRate: 5 - rampTo: 50 - name: Ramp up load - - duration: 60 - arrivalRate: 50 - name: Sustained load -scenarios: - - flow: - - get: - url: "/api/v1/api-server/get-prometheus-exporter-metrics" - diff --git a/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/index.js b/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/index.js deleted file mode 100644 index 64fa272f4f..0000000000 --- a/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/index.js +++ /dev/null @@ -1,24 +0,0 @@ -class DummyPlugin { - onPluginInit() { - console.log("DummyPlugin#onPluginInit() OK"); - return Promise.resolve(); - } - getInstanceId() { - console.log("DummyPlugin#getInstanceId() OK"); - return "dummy_instance_id"; - } - getPackageName() { - console.log("DummyPlugin#getPackageName() OK"); - return "@hyperledger/cactus-dummy-package"; - } -} - -class DummyPluginFactory { - create() { - return Promise.resolve(new DummyPlugin()); - } -} - -module.exports.createPluginFactory = (options) => { - return Promise.resolve(new DummyPluginFactory(options)); -}; diff --git a/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json b/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json deleted file mode 100644 index 01fff24dd4..0000000000 --- a/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@hyperledger/cactus-dummy-package", - "version": "2.0.0", - "license": "Apache-2.0", - "description": "Dummy package for testing.", - "main": "index.js" -} \ No newline at end of file diff --git a/packages/cactus-cmd-api-server/src/test/typescript/benchmark/run-cmd-api-server-benchmark.ts b/packages/cactus-cmd-api-server/src/test/typescript/benchmark/run-cmd-api-server-benchmark.ts deleted file mode 100644 index 2babf8ff13..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/benchmark/run-cmd-api-server-benchmark.ts +++ /dev/null @@ -1,252 +0,0 @@ -import path from "path"; -import { EOL } from "os"; - -import * as Benchmark from "benchmark"; -import { v4 as uuidv4 } from "uuid"; -import type { AuthorizeOptions as SocketIoJwtOptions } from "@thream/socketio-jwt"; -import type { Params as ExpressJwtOptions } from "express-jwt"; -import { SignJWT, exportSPKI, generateKeyPair } from "jose"; -import { RuntimeError } from "run-time-error-cjs"; -import * as grpc from "@grpc/grpc-js"; -import fse from "fs-extra"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -import { IJoseFittingJwtParams } from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Constants } from "@hyperledger/cactus-core-api"; - -import { - ApiServer, - ApiServerApiClient, - ApiServerApiClientConfiguration, - AuthorizationProtocol, - ConfigService, - IAuthorizationConfig, -} from "../../../main/typescript/public-api"; - -import { default_service, empty } from "../../../main/typescript/public-api"; - -const LOG_TAG = - "[packages/cactus-cmd-api-server/src/test/typescript/benchmark/run-cmd-api-server-benchmark.ts]"; - -const createTestInfrastructure = async (opts: { - readonly logLevel: LogLevelDesc; -}): Promise<{ - readonly httpApi: ApiServerApiClient; - readonly grpcCredentials: grpc.ChannelCredentials; - readonly grpcHost: string; - readonly apiServer: ApiServer; -}> => { - const logLevel = opts.logLevel || "DEBUG"; - - const jwtKeyPair = await generateKeyPair("RS256", { modulusLength: 4096 }); - const jwtPublicKey = await exportSPKI(jwtKeyPair.publicKey); - const expressJwtOptions: ExpressJwtOptions & IJoseFittingJwtParams = { - algorithms: ["RS256"], - secret: jwtPublicKey, - audience: uuidv4(), - issuer: uuidv4(), - }; - const socketIoJwtOptions: SocketIoJwtOptions = { - secret: jwtPublicKey, - algorithms: ["RS256"], - }; - - const authorizationConfig: IAuthorizationConfig = { - unprotectedEndpointExemptions: [], - expressJwtOptions, - socketIoJwtOptions, - socketIoPath: Constants.SocketIoConnectionPathV1, - }; - - const pluginsPath = path.join( - __dirname, - "../../../../../../", // walk back up to the project root - "packages/cactus-cmd-api-server/src/test/typescript/benchmark/run-cmd-api-server-benchmark/", // the dir path from the root - uuidv4(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - - const pluginRegistry = new PluginRegistry({ logLevel }); - - const configService = new ConfigService(); - - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.logLevel = logLevel; - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.JSON_WEB_TOKEN; - apiSrvOpts.authorizationConfigJson = authorizationConfig; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.grpcMtlsEnabled = false; - apiSrvOpts.plugins = []; - - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - const apiServer = new ApiServer({ - config: config.getProperties(), - pluginRegistry, - }); - - apiServer.initPluginRegistry({ pluginRegistry }); - const startResponsePromise = apiServer.start(); - - const { addressInfoApi, addressInfoGrpc } = await startResponsePromise; - const protocol = apiSrvOpts.apiTlsEnabled ? "https" : "http"; - const { address, port } = addressInfoApi; - const apiHost = `${protocol}://${address}:${port}`; - - const grpcHost = `${addressInfoGrpc.address}:${addressInfoGrpc.port}`; - - const jwtPayload = { name: "Peter", location: "Albertirsa" }; - const validJwt = await new SignJWT(jwtPayload) - .setProtectedHeader({ alg: "RS256" }) - .setIssuer(expressJwtOptions.issuer) - .setAudience(expressJwtOptions.audience) - .sign(jwtKeyPair.privateKey); - - const validBearerToken = `Bearer ${validJwt}`; - - const apiClient = new ApiServerApiClient( - new ApiServerApiClientConfiguration({ - basePath: apiHost, - baseOptions: { headers: { Authorization: validBearerToken } }, - logLevel, - }), - ); - - const grpcCredentials = grpc.credentials.createInsecure(); - - return { - grpcCredentials, - httpApi: apiClient, - grpcHost, - apiServer, - }; -}; - -const main = async (opts: { readonly argv: Readonly> }) => { - const logLevel: LogLevelDesc = "WARN"; - - const gitRootPath = path.join( - __dirname, - "../../../../../../", // walk back up to the project root - ); - - console.log("%s gitRootPath=%s", LOG_TAG, gitRootPath); - - const DEFAULT_OUTPUT_FILE_RELATIVE_PATH = - ".tmp/benchmark-results/cmd-api-server/run-cmd-api-server-benchmark.ts.log"; - - const relativeOutputFilePath = - opts.argv[2] === undefined - ? DEFAULT_OUTPUT_FILE_RELATIVE_PATH - : opts.argv[2]; - - console.log( - "%s DEFAULT_OUTPUT_FILE_RELATIVE_PATH=%s", - LOG_TAG, - DEFAULT_OUTPUT_FILE_RELATIVE_PATH, - ); - - console.log("%s opts.argv[2]=%s", LOG_TAG, opts.argv[2]); - - console.log("%s relativeOutputFilePath=%s", LOG_TAG, relativeOutputFilePath); - - const absoluteOutputFilePath = path.join(gitRootPath, relativeOutputFilePath); - - console.log("%s absoluteOutputFilePath=%s", LOG_TAG, absoluteOutputFilePath); - - const absoluteOutputDirPath = path.dirname(absoluteOutputFilePath); - console.log("%s absoluteOutputDirPath=%s", LOG_TAG, absoluteOutputDirPath); - - await fse.mkdirp(absoluteOutputDirPath); - console.log("%s mkdir -p OK: %s", LOG_TAG, absoluteOutputDirPath); - - const { apiServer, httpApi, grpcHost, grpcCredentials } = - await createTestInfrastructure({ logLevel }); - - const minSamples = 100; - const suite = new Benchmark.Suite({}); - - const cycles: string[] = []; - - await new Promise((resolve, reject) => { - suite - .add("cmd-api-server_HTTP_GET_getOpenApiSpecV1", { - defer: true, - minSamples, - fn: async function (deferred: Benchmark.Deferred) { - await httpApi.getOpenApiSpecV1(); - deferred.resolve(); - }, - }) - .add("cmd-api-server_gRPC_GetOpenApiSpecV1", { - defer: true, - minSamples, - fn: async function (deferred: Benchmark.Deferred) { - const grpcClient = - new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - grpcHost, - grpcCredentials, - ); - - await new Promise( - (resolve, reject) => { - const req = new empty.google.protobuf.Empty(); - grpcClient.GetOpenApiSpecV1(req, (err3, value) => { - if (err3) { - reject(err3); - } else if (value) { - resolve(value); - } else { - reject( - new RuntimeError("Response object received is falsy."), - ); - } - }); - }, - ); - - grpcClient.close(); - deferred.resolve(); - }, - }) - .on("cycle", (event: { target: unknown }) => { - // Output benchmark result by converting benchmark result to string - // Example line on stdout: - // cmd-api-server_HTTP_GET_getOpenApiSpecV1 x 1,020 ops/sec ±2.25% (177 runs sampled) - const cycle = String(event.target); - console.log("%s Benchmark.js CYCLE: %s", LOG_TAG, cycle); - cycles.push(cycle); - }) - .on("complete", function () { - console.log("%s Benchmark.js COMPLETE.", LOG_TAG); - resolve(suite); - }) - .on("error", (ex: unknown) => { - console.log("%s Benchmark.js ERROR: %o", LOG_TAG, ex); - reject(ex); - }) - .run(); - }); - - const data = cycles.join(EOL); - console.log("%s Writing results...", LOG_TAG); - await fse.writeFile(absoluteOutputFilePath, data, { encoding: "utf-8" }); - console.log("%s Wrote results to %s", LOG_TAG, absoluteOutputFilePath); - - await apiServer.shutdown(); - console.log("%s Shut down API server OK", LOG_TAG); -}; - -main({ argv: process.argv }).catch((ex: unknown) => { - console.error("%s process crashed with:", LOG_TAG, ex); - process.exit(1); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/plugin-factory-ledger-connector.ts b/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/plugin-factory-ledger-connector.ts deleted file mode 100644 index 989f1b8146..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; - -import { - IPluginLedgerConnectorStubOptions, - PluginLedgerConnectorStub, -} from "./plugin-ledger-connector-stub"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorStub, - IPluginLedgerConnectorStubOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorStubOptions, - ): Promise { - return new PluginLedgerConnectorStub(pluginOptions); - } -} diff --git a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/plugin-ledger-connector-stub.ts b/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/plugin-ledger-connector-stub.ts deleted file mode 100644 index 45cc7378d4..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/plugin-ledger-connector-stub.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { Express } from "express"; - -import { - ConsensusAlgorithmFamily, - IPluginLedgerConnector, - IWebServiceEndpoint, - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; - -import { - PluginRegistry, - consensusHasTransactionFinality, -} from "@hyperledger/cactus-core"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { DeployContractEndpoint } from "./web-services/deploy-contract-endpoint"; -import { RunTransactionEndpoint } from "./web-services/run-transaction-endpoint"; -import { UnprotectedActionEndpoint } from "./web-services/unprotected-action-endpoint"; - -export interface IPluginLedgerConnectorStubOptions - extends ICactusPluginOptions { - pluginRegistry: PluginRegistry; - logLevel?: LogLevelDesc; -} - -export class PluginLedgerConnectorStub - implements - IPluginLedgerConnector, - ICactusPlugin, - IPluginWebService -{ - private readonly instanceId: string; - private readonly log: Logger; - private readonly pluginRegistry: PluginRegistry; - private endpoints: IWebServiceEndpoint[] | undefined; - - public static readonly CLASS_NAME = "PluginLedgerConnectorStub"; - - public get className(): string { - return PluginLedgerConnectorStub.CLASS_NAME; - } - - constructor(public readonly options: IPluginLedgerConnectorStubOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy(options.pluginRegistry, `${fnTag} options.pluginRegistry`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = options.instanceId; - this.pluginRegistry = options.pluginRegistry; - this.log.debug(`Instantiated ${this.className} OK`); - } - - public getOpenApiSpec(): unknown { - return null; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public async onPluginInit(): Promise { - return; - } - - public async shutdown(): Promise { - return; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new DeployContractEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new RunTransactionEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new UnprotectedActionEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - this.endpoints = endpoints; - return endpoints; - } - - public getPackageName(): string { - // Note: this package does not exist on npm since this plugin only - // exists for testing purposes - return `@hyperledger/cactus-plugin-ledger-connector-stub`; - } - - public async getConsensusAlgorithmFamily(): Promise { - return ConsensusAlgorithmFamily.Authority; - } - public async hasTransactionFinality(): Promise { - const currentConsensusAlgorithmFamily = - await this.getConsensusAlgorithmFamily(); - - return consensusHasTransactionFinality(currentConsensusAlgorithmFamily); - } - public async transact(req: unknown): Promise { - const fnTag = `${this.className}#transact()`; - Checks.truthy(req, `${fnTag} req`); - return req; - } - - public async deployContract(req: unknown): Promise { - const fnTag = `${this.className}#deployContract()`; - Checks.truthy(req, `${fnTag} req`); - return req; - } -} diff --git a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/web-services/deploy-contract-endpoint.ts b/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/web-services/deploy-contract-endpoint.ts deleted file mode 100644 index 2265770655..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/web-services/deploy-contract-endpoint.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorStub } from "../plugin-ledger-connector-stub"; - -export interface IDeployContractEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorStub; -} - -export class DeployContractEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeployContractEndpoint"; - public static readonly OAUTH2_SCOPES = ["cactus:stub:deploy-contract"]; - - private readonly log: Logger; - - public get className(): string { - return DeployContractEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeployContractEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return { - post: { - operationId: "deployContractV1", - "x-hyperledger-cacti": { - http: { - path: "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-stub/deploy-contract-stub", - verbLowerCase: "post", - }, - }, - }, - }; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: DeployContractEndpoint.OAUTH2_SCOPES, - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody: unknown = req.body; - try { - const resBody = await this.options.connector.deployContract(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/web-services/run-transaction-endpoint.ts b/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/web-services/run-transaction-endpoint.ts deleted file mode 100644 index ccca8e338f..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/web-services/run-transaction-endpoint.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorStub } from "../plugin-ledger-connector-stub"; - -export interface IRunTransactionEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorStub; -} - -export class RunTransactionEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RunTransactionEndpoint"; - public static readonly OAUTH2_SCOPES = ["cactus:stub:run-transaction"]; - - private readonly log: Logger; - - public get className(): string { - return RunTransactionEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IRunTransactionEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return { - post: { - operationId: "runTransactionV1", - "x-hyperledger-cacti": { - http: { - path: "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-stub/run-transaction", - verbLowerCase: "post", - }, - }, - }, - }; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: RunTransactionEndpoint.OAUTH2_SCOPES, - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.transact(reqBody); - res.json({ success: true, data: resBody }); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/web-services/unprotected-action-endpoint.ts b/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/web-services/unprotected-action-endpoint.ts deleted file mode 100644 index 7b55bb6d0c..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/web-services/unprotected-action-endpoint.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorStub } from "../plugin-ledger-connector-stub"; - -export interface IUnprotectedActionEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorStub; -} - -/** - * The purpose of this endpoint class is to provide integration tests with a - * way to verify if the checks in place for unprotected endpints are working - * as intended. - */ -export class UnprotectedActionEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "UnprotectedActionEndpoint"; - public static readonly OAUTH2_SCOPES = []; - - private readonly log: Logger; - - public get className(): string { - return UnprotectedActionEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IUnprotectedActionEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return { - post: { - operationId: "runTransactionV1", - "x-hyperledger-cacti": { - http: { - path: "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-stub/unprotected-action", - verbLowerCase: "post", - }, - }, - }, - }; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: false, - requiredRoles: UnprotectedActionEndpoint.OAUTH2_SCOPES, - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const somethingPubliclyKnown = "2+2=4"; - const data = { reqBody, somethingPublic: somethingPubliclyKnown }; - res.json({ success: true, data }); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-endpoint-authorization.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-endpoint-authorization.test.ts deleted file mode 100644 index 2e0d8c7e57..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-endpoint-authorization.test.ts +++ /dev/null @@ -1,127 +0,0 @@ -import path from "path"; -import { v4 as uuidv4 } from "uuid"; -import { - generateKeyPair, - exportPKCS8, - SignJWT, - GenerateKeyPairResult, -} from "jose"; -import expressJwt from "express-jwt"; -import "jest-extended"; - -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; -import { IJoseFittingJwtParams } from "@hyperledger/cactus-common"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -import { - ApiServer, - ConfigService, - ICactusApiServerOptions, - isHealthcheckResponse, -} from "../../../main/typescript/public-api"; -import { DefaultApi as ApiServerApi } from "../../../main/typescript/public-api"; -import { AuthorizationProtocol } from "../../../main/typescript/config/authorization-protocol"; -import { IAuthorizationConfig } from "../../../main/typescript/authzn/i-authorization-config"; - -const testCase = "API server enforces authorization rules when configured"; -const logLevel: LogLevelDesc = "TRACE"; -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: __filename, -}); - -describe(testCase, () => { - let apiServer: ApiServer, - expressJwtOptions: expressJwt.Params & IJoseFittingJwtParams, - jwtKeyPair: GenerateKeyPairResult, - apiSrvOpts: ICactusApiServerOptions; - - beforeAll(async () => { - const pluginsPath = path.join( - __dirname, // start at the current file's path - "../../../../../../", // walk back up to the project root - ".tmp/test/cmd-api-server/jwt-endpoint-authorization_test", // the dir path from the root - uuidv4(), // then a random directory to ensure proper isolation - ); - jwtKeyPair = await generateKeyPair("RS256", { - modulusLength: 4096, - }); - const jwtPrivateKeyPem = await exportPKCS8(jwtKeyPair.privateKey); - expressJwtOptions = { - algorithms: ["RS256"], - secret: jwtPrivateKeyPem, - audience: uuidv4(), - issuer: uuidv4(), - }; - - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - const authorizationConfig: IAuthorizationConfig = { - unprotectedEndpointExemptions: [], - expressJwtOptions, - socketIoJwtOptions: { - secret: jwtPrivateKeyPem, - }, - }; - const configService = new ConfigService(); - apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.JSON_WEB_TOKEN; - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.authorizationConfigJson = authorizationConfig; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = []; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - apiServer = new ApiServer({ - config: config.getProperties(), - }); - }); - afterAll(async () => await apiServer.shutdown()); - - test(testCase, async () => { - try { - expect(expressJwtOptions).toBeTruthy(); - - const jwtPayload = { name: "Peter", location: "London" }; - const tokenGood = await new SignJWT(jwtPayload) - .setProtectedHeader({ - alg: "RS256", - }) - .setIssuer(expressJwtOptions.issuer) - .setAudience(expressJwtOptions.audience) - .sign(jwtKeyPair.privateKey); - // const tokenBad = JWT.sign(jwtPayload, jwtKeyPair); - - const startResponse = apiServer.start(); - await expect(startResponse).not.toReject; - expect(startResponse).toBeTruthy(); - - const addressInfoApi = (await startResponse).addressInfoApi; - const protocol = apiSrvOpts.apiTlsEnabled ? "https" : "http"; - const { address, port } = addressInfoApi; - const apiHost = `${protocol}://${address}:${port}`; - - const baseOptions = { headers: { Authorization: `Bearer ${tokenGood}` } }; - const conf = new Configuration({ basePath: apiHost, baseOptions }); - const apiClient = new ApiServerApi(conf); - const resHc = await apiClient.getHealthCheckV1(); - expect(resHc).toBeTruthy(); - expect(resHc.status).toEqual(200); - expect(typeof resHc.data).toBeTruthy(); - expect(resHc.data.createdAt).toBeTruthy(); - expect(resHc.data.memoryUsage).toBeTruthy(); - expect(resHc.data.memoryUsage.rss).toBeTruthy(); - expect(resHc.data.success).toBeTruthy(); - expect(isHealthcheckResponse(resHc.data)).toBe(true); - } catch (ex) { - log.error(ex); - fail("Exception thrown during test execution, see above for details!"); - throw ex; - } - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-endpoint-authz-scope-enforcement.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-endpoint-authz-scope-enforcement.test.ts deleted file mode 100644 index 9efbda3329..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-endpoint-authz-scope-enforcement.test.ts +++ /dev/null @@ -1,155 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { generateKeyPair, exportSPKI, SignJWT } from "jose"; -import expressJwt from "express-jwt"; -import axios, { Method } from "axios"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { IJoseFittingJwtParams } from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - ApiServer, - ConfigService, - AuthorizationProtocol, - IAuthorizationConfig, -} from "../../../main/typescript/public-api"; - -import { PluginLedgerConnectorStub } from "../fixtures/plugin-ledger-connector-stub/plugin-ledger-connector-stub"; -import { RunTransactionEndpoint } from "../fixtures/plugin-ledger-connector-stub/web-services/run-transaction-endpoint"; -import { DeployContractEndpoint } from "../fixtures/plugin-ledger-connector-stub/web-services/deploy-contract-endpoint"; -import { UnprotectedActionEndpoint } from "../fixtures/plugin-ledger-connector-stub/web-services/unprotected-action-endpoint"; - -const testCase = - "API server enforces scope requirements on top of generic authz"; -const logLevel: LogLevelDesc = "TRACE"; - -describe(testCase, () => { - let apiServer: ApiServer; - - afterAll(async () => { - await apiServer.shutdown(); - }); - - test(testCase, async () => { - const jwtKeyPair = await generateKeyPair("RS256", { - modulusLength: 4096, - }); - const jwtPublicKey = await exportSPKI(jwtKeyPair.publicKey); - const expressJwtOptions: expressJwt.Params & IJoseFittingJwtParams = { - algorithms: ["RS256"], - secret: jwtPublicKey, - audience: uuidv4(), - issuer: uuidv4(), - }; - expect(expressJwtOptions).toBeTruthy(); - - const unprotectedActionEp = new UnprotectedActionEndpoint({ - connector: {} as PluginLedgerConnectorStub, - logLevel, - }); - - const authorizationConfig: IAuthorizationConfig = { - unprotectedEndpointExemptions: [unprotectedActionEp.getPath()], - expressJwtOptions, - socketIoJwtOptions: { secret: jwtPublicKey }, - }; - - const pluginRegistry = new PluginRegistry(); - const plugin = new PluginLedgerConnectorStub({ - logLevel, - pluginRegistry, - instanceId: uuidv4(), - }); - pluginRegistry.add(plugin); - - const configService = new ConfigService(); - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.JSON_WEB_TOKEN; - apiSrvOpts.authorizationConfigJson = authorizationConfig; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = []; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - apiServer = new ApiServer({ - config: config.getProperties(), - pluginRegistry, - }); - const startResponse = apiServer.start(); - - await expect(startResponse).not.toReject(); - expect(startResponse).toBeTruthy(); - - const addressInfoApi = (await startResponse).addressInfoApi; - const protocol = apiSrvOpts.apiTlsEnabled ? "https" : "http"; - const { address, port } = addressInfoApi; - const apiHost = `${protocol}://${address}:${port}`; - - const jwtPayload = { - name: "Peter", - location: "London", - scope: [...RunTransactionEndpoint.OAUTH2_SCOPES], - }; - - const token = await new SignJWT(jwtPayload) - .setProtectedHeader({ - alg: "RS256", - }) - .setIssuer(expressJwtOptions.issuer) - .setAudience(expressJwtOptions.audience) - .sign(jwtKeyPair.privateKey); - - const runTxEp = new RunTransactionEndpoint({ - connector: {} as PluginLedgerConnectorStub, - logLevel, - }); - const req1 = { - requestId: uuidv4(), - }; - const res1 = await axios.request({ - data: req1, - url: `${apiHost}${runTxEp.getPath()}`, - method: runTxEp.getVerbLowerCase() as Method, - headers: { - Authorization: `Bearer ${token}`, - }, - }); - - expect(res1).toBeTruthy(); - expect(res1.status).toEqual(200); - expect(typeof res1.data).toBe("object"); - expect(typeof res1.data.data).toBeTruthy(); - expect(typeof res1.data.data.requestId).toBeTruthy(); - expect(res1.data.data.requestId).toBe(req1.requestId); - - try { - const deployContractEp = new DeployContractEndpoint({ - connector: {} as PluginLedgerConnectorStub, - logLevel, - }); - await axios.request({ - url: `${apiHost}${deployContractEp.getPath()}`, - method: deployContractEp.getVerbLowerCase() as Method, - headers: { - Authorization: `Bearer ${token}`, - }, - }); - } catch (out: unknown) { - if (axios.isAxiosError(out)) { - expect(out).toBeTruthy(); - expect(out.response).toBeTruthy(); - expect(out).toHaveProperty(["response", "status"], 403); - expect(out.response?.data.data).toBeFalsy(); - expect(out.response?.data.success).toBeFalsy(); - } else { - fail("expected an axios error, got something else"); - } - } - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-socketio-endpoint-authorization.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-socketio-endpoint-authorization.test.ts deleted file mode 100644 index 38b636d7c4..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-socketio-endpoint-authorization.test.ts +++ /dev/null @@ -1,196 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { generateKeyPair, exportSPKI, SignJWT } from "jose"; -import type { Params as ExpressJwtOptions } from "express-jwt"; -import type { AuthorizeOptions as SocketIoJwtOptions } from "@thream/socketio-jwt"; - -import { Constants } from "@hyperledger/cactus-core-api"; -import { IJoseFittingJwtParams } from "@hyperledger/cactus-common"; - -import { - ApiServer, - ConfigService, - HealthCheckResponse, - isHealthcheckResponse, -} from "../../../main/typescript/public-api"; -import { ApiServerApiClient } from "../../../main/typescript/public-api"; -import { ApiServerApiClientConfiguration } from "../../../main/typescript/public-api"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { AuthorizationProtocol } from "../../../main/typescript/config/authorization-protocol"; -import { IAuthorizationConfig } from "../../../main/typescript/authzn/i-authorization-config"; -import { lastValueFrom } from "rxjs"; - -const testCase = "API server enforces authorization for SocketIO endpoints"; -describe("cmd-api-server:ApiServer", () => { - let apiServer: ApiServer; - let apiClientFixable: ApiServerApiClient; - let apiHost: string; - let validBearerToken: string; - - const logLevel: LogLevelDesc = "WARN"; - - afterAll(async () => { - apiServer.shutdown(); - }); - - beforeAll(async () => { - const jwtKeyPair = await generateKeyPair("RS256", { modulusLength: 4096 }); - const jwtPublicKey = await exportSPKI(jwtKeyPair.publicKey); - const expressJwtOptions: ExpressJwtOptions & IJoseFittingJwtParams = { - algorithms: ["RS256"], - secret: jwtPublicKey, - audience: uuidv4(), - issuer: uuidv4(), - }; - const socketIoJwtOptions: SocketIoJwtOptions = { - secret: jwtPublicKey, - algorithms: ["RS256"], - }; - expect(expressJwtOptions).toBeTruthy(); - - const authorizationConfig: IAuthorizationConfig = { - unprotectedEndpointExemptions: [], - expressJwtOptions, - socketIoJwtOptions, - socketIoPath: Constants.SocketIoConnectionPathV1, - }; - - const configService = new ConfigService(); - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.JSON_WEB_TOKEN; - apiSrvOpts.authorizationConfigJson = authorizationConfig; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.logLevel = logLevel; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = []; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - apiServer = new ApiServer({ - config: config.getProperties(), - }); - - const startResponsePromise = apiServer.start(); - await expect(startResponsePromise).toResolve(); - const startResponse = await startResponsePromise; - expect(startResponse).toBeTruthy(); - - const addressInfoApi = (await startResponsePromise).addressInfoApi; - const protocol = apiSrvOpts.apiTlsEnabled ? "https" : "http"; - const { address, port } = addressInfoApi; - apiHost = `${protocol}://${address}:${port}`; - - const jwtPayload = { name: "Peter", location: "Albertirsa" }; - const validJwt = await new SignJWT(jwtPayload) - .setProtectedHeader({ alg: "RS256" }) - .setIssuer(expressJwtOptions.issuer) - .setAudience(expressJwtOptions.audience) - .sign(jwtKeyPair.privateKey); - expect(validJwt).toBeTruthy(); - - validBearerToken = `Bearer ${validJwt}`; - expect(validBearerToken).toBeTruthy(); - - apiClientFixable = new ApiServerApiClient( - new ApiServerApiClientConfiguration({ - basePath: apiHost, - baseOptions: { headers: { Authorization: "Mr. Invalid Token" } }, - logLevel, - tokenProvider: { - get: () => Promise.resolve(validBearerToken), - }, - }), - ); - }); - - test(testCase, async () => { - const apiClientBad = new ApiServerApiClient( - new ApiServerApiClientConfiguration({ - basePath: apiHost, - baseOptions: { headers: { Authorization: "Mr. Invalid Token" } }, - logLevel, - }), - ); - - const apiClientGood = new ApiServerApiClient( - new ApiServerApiClientConfiguration({ - basePath: apiHost, - baseOptions: { headers: { Authorization: validBearerToken } }, - logLevel, - tokenProvider: { - get: () => Promise.resolve(validBearerToken), - }, - }), - ); - - { - const healthchecks = await apiClientBad.watchHealthcheckV1(); - - const watchHealthcheckV1WithBadToken = new Promise((resolve, reject) => { - healthchecks.subscribe({ - next: () => { - resolve(new Error("Was authorized with an invalid token, bad.")); - }, - error: (ex: Error) => { - reject(ex); - }, - complete: () => { - resolve(new Error("Was authorized with an invalid token, bad.")); - }, - }); - }); - - await expect(watchHealthcheckV1WithBadToken).rejects.toHaveProperty( - "message", - "Format is Authorization: Bearer [token]", - ); - } - - { - const resHc = await apiClientGood.getHealthCheckV1(); - expect(resHc).toBeTruthy(); - expect(resHc.status).toEqual(200); - expect(typeof resHc.data).toBe("object"); - expect(resHc.data.createdAt).toBeTruthy(); - expect(resHc.data.memoryUsage).toBeTruthy(); - expect(resHc.data.memoryUsage.rss).toBeTruthy(); - expect(resHc.data.success).toBeTruthy(); - expect(isHealthcheckResponse(resHc.data)).toBeTruthy(); - } - - { - let idx = 0; - const healthchecks = await apiClientFixable.watchHealthcheckV1(); - const sub = healthchecks.subscribe((next: HealthCheckResponse) => { - idx++; - if (idx > 2) { - sub.unsubscribe(); - } - expect(next).toBeTruthy(); - expect(typeof next).toBe("object"); - expect(next.createdAt).toBeTruthy(); - expect(next.memoryUsage).toBeTruthy(); - expect(next.memoryUsage.rss).toBeTruthy(); - expect(next.success).toBeTruthy(); - expect(isHealthcheckResponse(next)).toBeTrue(); - }); - - const hcr = await lastValueFrom(healthchecks); - expect(isHealthcheckResponse(hcr)).toBeTruthy(); - - const resHc = await apiClientFixable.getHealthCheckV1(); - expect(resHc).toBeTruthy(); - expect(resHc.status).toEqual(200); - expect(typeof resHc.data).toBe("object"); - expect(resHc.data.createdAt).toBeTruthy(); - expect(resHc.data.memoryUsage).toBeTruthy(); - expect(resHc.data.memoryUsage.rss).toBeTruthy(); - expect(resHc.data.success).toBeTruthy(); - expect(isHealthcheckResponse(resHc.data)).toBeTruthy(); - } - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-unprotected-endpoint-authz-ops-confirm.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-unprotected-endpoint-authz-ops-confirm.test.ts deleted file mode 100644 index a21c3d2463..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-unprotected-endpoint-authz-ops-confirm.test.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import { generateKeyPair, exportSPKI } from "jose"; -import "jest-extended"; -import expressJwt from "express-jwt"; - -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - ApiServer, - ConfigService, - AuthorizationProtocol, - IAuthorizationConfig, -} from "../../../main/typescript/public-api"; - -import { PluginLedgerConnectorStub } from "../fixtures/plugin-ledger-connector-stub/plugin-ledger-connector-stub"; -import { UnprotectedActionEndpoint } from "../fixtures/plugin-ledger-connector-stub/web-services/unprotected-action-endpoint"; - -const testCase = - "block unprotected endpoint if not confirmed by ops via deploy-time configuration"; -const logLevel: LogLevelDesc = "TRACE"; -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: __filename, -}); - -test(testCase, async () => { - try { - const jwtKeyPair = await generateKeyPair("RS256", { modulusLength: 4096 }); - const jwtPublicKey = await exportSPKI(jwtKeyPair.publicKey); - const expressJwtOptions: expressJwt.Params & { [key: string]: unknown } = { - algorithms: ["RS256"], - secret: jwtPublicKey, - audience: uuidv4(), - issuer: uuidv4(), - }; - expect(expressJwtOptions).toBeTruthy(); - - const authorizationConfig: IAuthorizationConfig = { - unprotectedEndpointExemptions: [], - expressJwtOptions, - socketIoJwtOptions: { secret: jwtPublicKey }, - }; - - const pluginRegistry = new PluginRegistry(); - const plugin = new PluginLedgerConnectorStub({ - logLevel, - pluginRegistry, - instanceId: uuidv4(), - }); - pluginRegistry.add(plugin); - - const configService = new ConfigService(); - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.JSON_WEB_TOKEN; - apiSrvOpts.authorizationConfigJson = authorizationConfig; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = []; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - const apiServer = new ApiServer({ - config: config.getProperties(), - pluginRegistry, - }); - - const eps = await plugin.getOrCreateWebServices(); - const epCsv = eps - .filter((ep) => ep instanceof UnprotectedActionEndpoint) - .map((ep) => ep.getPath()) - .join(","); - const expectedMsg = `${ApiServer.E_NON_EXEMPT_UNPROTECTED_ENDPOINTS} ${epCsv}`; - - const startPromise = apiServer.start(); - - await expect(startPromise).rejects.toHaveProperty( - ["cause", "message"], - expectedMsg, - ); - } catch (ex) { - log.error(ex); - fail("Exception thrown during test execution, see above for details!"); - } -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-unprotected-endpoint-authz.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-unprotected-endpoint-authz.test.ts deleted file mode 100644 index 8b6c799e0e..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/jwt-unprotected-endpoint-authz.test.ts +++ /dev/null @@ -1,121 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { generateKeyPair, exportSPKI } from "jose"; -import expressJwt from "express-jwt"; -import axios, { Method } from "axios"; -import { StatusCodes } from "http-status-codes"; - -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; -import { IJoseFittingJwtParams } from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - ApiServer, - ConfigService, - AuthorizationProtocol, - IAuthorizationConfig, -} from "../../../main/typescript/public-api"; - -import { PluginLedgerConnectorStub } from "../fixtures/plugin-ledger-connector-stub/plugin-ledger-connector-stub"; -import { UnprotectedActionEndpoint } from "../fixtures/plugin-ledger-connector-stub/web-services/unprotected-action-endpoint"; - -const testCase = - "API server enforces scope requirements on top of generic authz"; -const logLevel: LogLevelDesc = "TRACE"; -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: __filename, -}); - -describe(testCase, () => { - let apiServer: ApiServer; - - afterAll(async () => { - await apiServer.shutdown(); - }); - - test(testCase, async () => { - try { - const jwtKeyPair = await generateKeyPair("RS256", { - modulusLength: 4096, - }); - const jwtPublicKey = await exportSPKI(jwtKeyPair.publicKey); - const expressJwtOptions: expressJwt.Params & IJoseFittingJwtParams = { - algorithms: ["RS256"], - secret: jwtPublicKey, - audience: uuidv4(), - issuer: uuidv4(), - }; - expect(expressJwtOptions).toBeTruthy(); - - const ep = new UnprotectedActionEndpoint({ - connector: {} as PluginLedgerConnectorStub, - logLevel, - }); - - const authorizationConfig: IAuthorizationConfig = { - unprotectedEndpointExemptions: [ep.getPath()], - expressJwtOptions, - socketIoJwtOptions: { secret: jwtPublicKey }, - }; - - const pluginRegistry = new PluginRegistry(); - const plugin = new PluginLedgerConnectorStub({ - logLevel, - pluginRegistry, - instanceId: uuidv4(), - }); - pluginRegistry.add(plugin); - - const configService = new ConfigService(); - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.JSON_WEB_TOKEN; - apiSrvOpts.authorizationConfigJson = authorizationConfig; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = []; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - apiServer = new ApiServer({ - config: config.getProperties(), - pluginRegistry, - }); - - const startResponse = apiServer.start(); - await expect(startResponse).not.toReject(); - expect(startResponse).toBeTruthy(); - - const addressInfoApi = (await startResponse).addressInfoApi; - const protocol = apiSrvOpts.apiTlsEnabled ? "https" : "http"; - const { address, port } = addressInfoApi; - const apiHost = `${protocol}://${address}:${port}`; - - const req1 = { - requestId: uuidv4(), - }; - - // look Ma, no access token - const res1 = await axios.request({ - data: req1, - url: `${apiHost}${ep.getPath()}`, - method: ep.getVerbLowerCase() as Method, - }); - expect(res1).toBeTruthy(); - expect(res1.status).toBe(StatusCodes.OK); - expect(typeof res1.data).toBe("object"); - expect(typeof res1.data.data).toBeTruthy(); - expect(typeof res1.data.data.reqBodyrequestId).toBeTruthy(); - expect(typeof res1.data.data.reqBody.requestId).toBeTruthy(); - expect(res1.data.data.reqBody.requestId).toBe(req1.requestId); - } catch (ex) { - log.error(ex); - fail("Exception thrown during test execution, see above for details!"); - throw ex; - } - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/plugin-import-from-github.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/plugin-import-from-github.test.ts deleted file mode 100644 index a94485b18a..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/plugin-import-from-github.test.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { randomUUID } from "node:crypto"; -import path from "node:path"; -import { readFile } from "node:fs/promises"; - -import "jest-extended"; -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; -import { - PluginImportAction, - PluginImportType, -} from "@hyperledger/cactus-core-api"; -import { ConfigService } from "../../../main/typescript/config/config-service"; -import { AuthorizationProtocol } from "../../../main/typescript/config/authorization-protocol"; -import { ApiServer } from "../../../main/typescript/api-server"; - -describe("ApiServer", () => { - let apiServer: ApiServer; - - const logLevel: LogLevelDesc = "INFO"; - - const log = LoggerProvider.getOrCreate({ - label: "plugin-import-from-github.test.ts", - level: logLevel, - }); - - const pluginsPath = path.join( - __dirname, - "../../../../../../", // walk back up to the project root - ".tmp/test/test-cmd-api-server/plugin-import-from-github_test/", // the dir path from the root - randomUUID(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - const configService = new ConfigService(); - - afterAll(async () => { - await apiServer.shutdown(); - }); - - it("can install plugins at runtime from GitHub", async () => { - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = [ - { - packageName: "@hyperledger/cactus-dummy-package", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: randomUUID(), - keychainId: randomUUID(), - logLevel, - packageSrc: - "https://gitpkg.now.sh/hyperledger/cactus/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package?main", - }, - }, - ]; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - apiServer = new ApiServer({ - config: config.getProperties(), - }); - - const startPromise = apiServer.start(); - await expect(startPromise).toResolve(); - await expect(startPromise).toBeTruthy(); - await expect((await startPromise).addressInfoApi).toBeTruthy(); - await expect((await startPromise).addressInfoCrpc).toBeTruthy(); - await expect((await startPromise).addressInfoGrpc).toBeTruthy(); - - const packageFilePath = path.join( - pluginsPath, - apiSrvOpts.plugins[0].options.instanceId, - "node_modules", - `${apiSrvOpts.plugins[0].packageName}`, - "package.json", - ); - - const pkgJsonStr = await readFile(packageFilePath, "utf-8"); - const { name, version } = JSON.parse(pkgJsonStr); - - log.debug("installed package name on file-system:", name); - log.debug("installed package version on file-system:", version); - expect(name).toEqual(apiSrvOpts.plugins[0].packageName); - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/plugin-import-without-install.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/plugin-import-without-install.test.ts deleted file mode 100644 index 224bd292ea..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/plugin-import-without-install.test.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { randomUUID } from "node:crypto"; -import { readFile } from "node:fs/promises"; -import path from "node:path"; - -import "jest-extended"; -import lmify from "lmify"; -import fs from "fs-extra"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { - PluginImportAction, - PluginImportType, -} from "@hyperledger/cactus-core-api"; - -import { ConfigService } from "../../../main/typescript/config/config-service"; -import { AuthorizationProtocol } from "../../../main/typescript/config/authorization-protocol"; -import { ApiServer } from "../../../main/typescript/api-server"; - -describe("ApiServer", () => { - const logLevel: LogLevelDesc = "INFO"; - const instanceId = randomUUID(); - const keychainId = randomUUID(); - - it("checks for invalid case of PluginImportAction.Instantiate and PluginImportType.Local", async () => { - const pluginsPath = path.join( - __dirname, - "../../../../../../", // walk back up to the project root - ".tmp/test/cmd-api-server/plugin-import-without-install/", // the dir path from the root - randomUUID(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - - const configService = new ConfigService(); - - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - - const plugin = { - packageName: "@hyperledger/cactus-plugin-keychain-memory", - type: PluginImportType.Local, - action: PluginImportAction.Instantiate, - options: { - instanceId, - keychainId, - logLevel, - version: "0.9.0", - }, - }; - - apiSrvOpts.plugins = [plugin]; - - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - const apiServer = new ApiServer({ - config: config.getProperties(), - }); - - await expect(apiServer.start()).rejects.toThrowError( - expect.toSatisfy((x) => { - expect(x).toBeObject(); - expect(x).toMatchObject({ - toJSON: expect.toBeFunction(), - }); - const xAsJsonString = JSON.stringify(x.toJSON()); - return ( - xAsJsonString.includes("MODULE_NOT_FOUND") && - xAsJsonString.includes("Failed to init PluginRegistry") && - xAsJsonString.includes("Failed to start ApiServer") - ); - }), - ); - }); - - test("if plugin is already installed and we send a different version, it keeps using plugin installed before call apiServer", async () => { - const pluginsPath = path.join( - __dirname, - "../../../../../../", // walk back up to the project root - ".tmp/test/cmd-api-server/plugin-import-without-install/", // the dir path from the root - randomUUID(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - - const configService = new ConfigService(); - - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - - const versionToSendServer = "0.7.0"; - const instanceId = randomUUID(); - const keychainId = randomUUID(); - const plugin = { - packageName: "@hyperledger/cactus-plugin-keychain-memory", - type: PluginImportType.Local, - action: PluginImportAction.Instantiate, - options: { - instanceId, - keychainId, - logLevel, - version: versionToSendServer, - }, - }; - apiSrvOpts.plugins = [plugin]; - - const pluginPackageDir = path.join(pluginsPath, instanceId); - const versionToInstall = "0.10.0"; - - await fs.mkdirp(pluginPackageDir); - lmify.setPackageManager("npm"); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error - lmify.setRootDir(pluginPackageDir); - const out = await lmify.install([ - `${plugin.packageName}@${versionToInstall}`, - "--production", - "--audit=false", - "--progress=false", - "--fund=false", - `--prefix=${pluginPackageDir}`, - // "--ignore-workspace-root-check", - ]); - expect(out.exitCode).toEqual(0); - - const config = await configService.newExampleConfigConvict( - apiSrvOpts, - true, - ); - const apiServer = new ApiServer({ - config: config.getProperties(), - }); - - await expect(apiServer.start()).toResolve(); - - const packageFilePath = path.join( - pluginsPath, - plugin.options.instanceId, - "node_modules", - `${plugin.packageName}`, - "package.json", - ); - - const pkgJsonStr = await readFile(packageFilePath, "utf-8"); - const { version } = JSON.parse(pkgJsonStr); - - expect(version).toEqual(versionToInstall); - - const pluginsCount = apiServer.getPluginImportsCount(); - expect(pluginsCount).toEqual(1); - - await expect(apiServer.shutdown()).toResolve(); - }); - - test("if we send action as Installation, apiServer will install the plugin", async () => { - const pluginsPath = path.join( - __dirname, - "../../../../../../", // walk back up to the project root - ".tmp/test/cmd-api-server/plugin-import-without-install/", // the dir path from the root - randomUUID(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - - const configService = new ConfigService(); - - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - const versionToInstall = "0.8.0"; - apiSrvOpts.plugins = [ - { - packageName: "@hyperledger/cactus-plugin-keychain-memory", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: randomUUID(), - keychainId: randomUUID(), - logLevel, - version: versionToInstall, - }, - }, - ]; - - const config = await configService.newExampleConfigConvict( - apiSrvOpts, - true, - ); - - const apiServer = new ApiServer({ - config: config.getProperties(), - }); - - await expect(apiServer.start()).toResolve(); - - const packageFilePath = path.join( - pluginsPath, - apiSrvOpts.plugins[0].options.instanceId, - "node_modules", - `${apiSrvOpts.plugins[0].packageName}`, - "package.json", - ); - - const pkgJsonStr = await readFile(packageFilePath, "utf-8"); - const { version } = JSON.parse(pkgJsonStr); - - expect(version).toEqual(versionToInstall); - - const pluginsCount = apiServer.getPluginImportsCount(); - expect(pluginsCount).toEqual(1); - - await expect(apiServer.shutdown()).toResolve(); - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts deleted file mode 100644 index f2fc9bc54b..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts +++ /dev/null @@ -1,132 +0,0 @@ -import "jest-extended"; - -import { - CactusKeychainVaultServer, - Containers, - K_DEFAULT_VAULT_DEV_ROOT_TOKEN, - K_DEFAULT_VAULT_HTTP_PORT, - VaultTestServer, -} from "@hyperledger/cactus-test-tooling"; - -import { DefaultApi } from "@hyperledger/cactus-plugin-keychain-vault"; -import { - Configuration, - PluginImportAction, - PluginImportType, -} from "@hyperledger/cactus-core-api"; -import path from "path"; -import { randomUUID } from "crypto"; -import { ConfigService } from "../../../main/typescript/config/config-service"; -import { AuthorizationProtocol } from "../../../main/typescript/config/authorization-protocol"; -import { ApiServer } from "../../../main/typescript/api-server"; -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; - -describe("ApiServer", () => { - const key = randomUUID(); - const expected = randomUUID(); - - const logLevel: LogLevelDesc = "INFO"; - - const log = LoggerProvider.getOrCreate({ - label: "remote-plugin-imports.test.ts", - level: logLevel, - }); - - const configService = new ConfigService(); - - const pluginsPath = path.join( - __dirname, // start at the current file's path - "../../../../../../", // walk back up to the project root - ".tmp/test/cmd-api-server/remote-plugin-imports_test", // the dir path from the root - randomUUID(), // then a random directory to ensure proper isolation - ); - - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - const vaultTestContainer = new VaultTestServer({}); - - let apiServer: ApiServer; - let pluginContainer: CactusKeychainVaultServer; - - afterAll(async () => { - await apiServer.shutdown(); - }); - - afterAll(async () => { - await vaultTestContainer.stop(); - await vaultTestContainer.destroy(); - }); - - afterAll(async () => { - await pluginContainer.stop(); - await pluginContainer.destroy(); - }); - - beforeAll(async () => { - await vaultTestContainer.start(); - }); - - it("can install plugin-keychain-vault from npm", async () => { - const cId = await Containers.getById(vaultTestContainer.containerId); - const vaultIpAddr = await Containers.getContainerInternalIp(cId); - log.debug(`Container VaultTestServer has IPv4: ${vaultIpAddr}`); - - const hostPortVault = await vaultTestContainer.getHostPortHttp(); - log.debug(`Container VaultTestServer (Port=${hostPortVault}) started OK`); - const vaultHost = `http://${vaultIpAddr}:${K_DEFAULT_VAULT_HTTP_PORT}`; - - pluginContainer = new CactusKeychainVaultServer({ - envVars: [ - `VAULT_HOST=${vaultHost}`, - `VAULT_TOKEN=${K_DEFAULT_VAULT_DEV_ROOT_TOKEN}`, - "HOST=0.0.0.0:8080", - ], - }); - await pluginContainer.start(); - - const hostPort = await pluginContainer.getHostPortHttp(); - log.debug(`CactusKeychainVaultServer (Port=${hostPort}) started OK`); - - const configuration = new Configuration({ - basePath: `http://127.0.0.1:${hostPort}`, - }); - const apiClient = new DefaultApi(configuration); - - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = [ - { - packageName: "@hyperledger/cactus-plugin-keychain-vault", - type: PluginImportType.Remote, - action: PluginImportAction.Install, - options: { - keychainId: "_keychainId_", - instanceId: "_instanceId_", - remoteConfig: configuration, - }, - }, - ]; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - apiServer = new ApiServer({ - config: config.getProperties(), - }); - - await expect(apiServer.start()).toResolve(); - - await apiClient.setKeychainEntryV1({ key, value: expected }); - - const { - data: { value: actual }, - } = await apiClient.getKeychainEntryV1({ key }); - - expect(actual).toEqual(expected); - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/tap-parallel-not-ok b/packages/cactus-cmd-api-server/src/test/typescript/integration/tap-parallel-not-ok deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/api-server-config.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/api-server-config.test.ts deleted file mode 100644 index 67d1b97269..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/api-server-config.test.ts +++ /dev/null @@ -1,87 +0,0 @@ -import "jest-extended"; -import { - ApiServer, - // AuthorizationProtocol, - ConfigService, -} from "../../../../main/typescript/public-api"; - -describe("api-server shutdown-hook configuration tests", () => { - // create a config service as base for the following UTs - const configService = new ConfigService(); - - it("enables the shutdown hook based on schema-default", async () => { - const expectedResult = true; - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.configFile = ""; - - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - const apiServer = new ApiServer({ - config: config.getProperties(), - }); - - // check apiServerOptions - expect(apiServerOptions).not.toBeUndefined(); - expect(apiServerOptions.enableShutdownHook).toBe(expectedResult); - - // check apiServer - expect(apiServer).toBeTruthy(); - const result = apiServer["enableShutdownHook"]; - expect(result).toBe(expectedResult); - }); - - it("disables the shutdown hook based on the config value set to false", async () => { - const expectedResult = false; - const apiServerOptions = await configService.newExampleConfig(); - - // disable shutdown hook - apiServerOptions.enableShutdownHook = false; - apiServerOptions.configFile = ""; - - const config = await configService.newExampleConfigConvict( - apiServerOptions, - true, - ); - - const apiServer = new ApiServer({ - config: config.getProperties(), - }); - - // check apiServerOptions - expect(apiServerOptions).not.toBeUndefined(); - expect(apiServerOptions.enableShutdownHook).toBe(expectedResult); - - // check apiServer - expect(apiServer).toBeTruthy(); - const result = apiServer["enableShutdownHook"]; - expect(result).toBe(expectedResult); - }); - - it("enables the shutdown hook based on the config value set to true", async () => { - const expectedResult = true; - const apiServerOptions = await configService.newExampleConfig(); - - // disable shutdown hook - apiServerOptions.enableShutdownHook = true; - apiServerOptions.configFile = ""; - - const config = await configService.newExampleConfigConvict( - apiServerOptions, - true, - ); - - const apiServer = new ApiServer({ - config: config.getProperties(), - }); - - // check apiServerOptions - expect(apiServerOptions).not.toBeUndefined(); - expect(apiServerOptions.enableShutdownHook).toBe(expectedResult); - - // check apiServer - expect(apiServer).toBeTruthy(); - const result = apiServer["enableShutdownHook"]; - expect(result).toBe(expectedResult); - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/config-service-example-config-validity.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/config-service-example-config-validity.test.ts deleted file mode 100644 index fc005f46a8..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/config-service-example-config-validity.test.ts +++ /dev/null @@ -1,59 +0,0 @@ -import path from "path"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; - -import { LoggerProvider } from "@hyperledger/cactus-common"; - -import { - IAuthorizationConfig, - ICactusApiServerOptions, -} from "../../../../main/typescript/public-api"; -import { ApiServer } from "../../../../main/typescript/public-api"; -import { ConfigService } from "../../../../main/typescript/public-api"; - -describe("ConfigService", () => { - const configService = new ConfigService(); - let apiServer: ApiServer, - exampleConfig: ICactusApiServerOptions, - convictConfig: any, - config: any; - - beforeAll(async () => { - exampleConfig = await configService.newExampleConfig(); - const pluginsPath = path.join( - __dirname, - "../../../../../../../", // walk back up to the project root - ".tmp/test/test-cmd-api-server/config-service-example-config-validity_test/", // the dir path from the root - uuidv4(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - - exampleConfig.pluginManagerOptionsJson = pluginManagerOptionsJson; - - // FIXME - this hack should not be necessary, we need to re-think how we - // do configuration parsing. The convict library may not be the path forward. - exampleConfig.authorizationConfigJson = JSON.stringify( - exampleConfig.authorizationConfigJson, - ) as unknown as IAuthorizationConfig; - - exampleConfig.configFile = ""; - exampleConfig.apiPort = 0; - exampleConfig.cockpitPort = 0; - convictConfig = await configService.newExampleConfigConvict(exampleConfig); - config = convictConfig.getProperties(); - apiServer = new ApiServer({ config }); - }); - - afterAll(() => apiServer.shutdown()); - - test("Generates valid example config for the API server", async () => { - expect(configService).toBeTruthy(); - expect(exampleConfig).toBeTruthy(); - expect(convictConfig).toBeTruthy(); - - expect(config).toBeTruthy(); - - LoggerProvider.setLogLevel(config.logLevel); - await apiServer.start(); - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts deleted file mode 100644 index 9b0734def8..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts +++ /dev/null @@ -1,146 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { AddressInfo } from "net"; -import { TLSSocket } from "tls"; -import { - Server, - createServer, - request, - RequestOptions, - ServerOptions, -} from "https"; -import { - SelfSignedPkiGenerator, - IPki, -} from "../../../../../main/typescript/public-api"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; - -const log: Logger = LoggerProvider.getOrCreate({ - label: "test-generates-working-certificates", - level: "TRACE", -}); - -test("works with HTTPS NodeJS module", async (t: Test) => { - t.ok(SelfSignedPkiGenerator, "class present on API surface"); - - const generator = new SelfSignedPkiGenerator(); - t.ok(generator, "Instantiated SelfSignedCertificateGenerator OK."); - - const serverCert: IPki = generator.create("127.0.0.1"); - t.ok(serverCert, "serverCert truthy"); - t.ok(serverCert.certificatePem, "serverCert.certificatePem truthy"); - t.ok(serverCert.privateKeyPem, "serverCert.privateKeyPem truthy"); - t.ok(serverCert.certificate, "serverCert.certificate truthy"); - t.ok(serverCert.keyPair, "serverCert.keyPair truthy"); - - // make sure the client cert has a different common name otherwise they collide and everything breaks in this test - const clientCert: IPki = generator.create("client.127.0.0.1", serverCert); - t.ok(clientCert, "clientCert truthy"); - t.ok(clientCert.certificatePem, "clientCert.certificatePem truthy"); - t.ok(clientCert.privateKeyPem, "clientCert.privateKeyPem truthy"); - t.ok(clientCert.certificate, "clientCert.certificate truthy"); - t.ok(clientCert.keyPair, "clientCert.keyPair truthy"); - t.ok( - serverCert.certificate.verify(clientCert.certificate), - "Server cert verified client cert OK", - ); - - const serverOptions: ServerOptions = { - key: serverCert.privateKeyPem, - cert: serverCert.certificatePem, - - ca: [serverCert.certificatePem], - - rejectUnauthorized: true, - requestCert: true, - }; - - const MESSAGE = "hello world\n"; - - const server: Server = await new Promise((resolve, reject) => { - const listener = (aRequest: any, aResponse: any) => { - aResponse.writeHead(200); - aResponse.end(MESSAGE); - }; - const aServer: Server = createServer(serverOptions, listener); - aServer.once("tlsClientError", (err: Error) => - log.error("tlsClientError: %j", err), - ); - aServer.on("keylog", (data: Buffer, tlsSocket: TLSSocket) => { - log.debug("keylog:tlsSocket.address(): %j", tlsSocket.address()); - log.debug("keylog:data: %j", data.toString("utf-8")); - }); - aServer.on("OCSPRequest", (...args: any[]) => - log.debug("OCSPRequest: %j", args), - ); - aServer.on("secureConnection", (tlsSocket: TLSSocket) => - log.debug( - "secureConnection: tlsSocket.address() %j", - tlsSocket.address(), - ), - ); - - aServer.once("tlsClientError", (err: Error) => reject(err)); - aServer.once("listening", () => resolve(aServer)); - aServer.listen(0, "127.0.0.1"); - test.onFinish(() => aServer.close()); - }); - - t.ok(server, "HTTPS Server object truthy"); - t.ok(server.listening, "HTTPS Server is indeed listening"); - - const addressInfo = server.address() as AddressInfo; - t.ok(addressInfo, "HTTPS Server provided truthy AddressInfo"); - t.ok(addressInfo.port, "HTTPS Server provided truthy AddressInfo.port"); - log.debug("AddressInfo for test HTTPS server: %j", addressInfo); - - const response = await new Promise((resolve, reject) => { - const requestOptions: RequestOptions = { - protocol: "https:", - host: addressInfo.address, - port: addressInfo.port, - path: "/", - method: "GET", - - // IMPORTANT: - // Without this self signed certs are rejected because they are not part of a chain with a trusted root CA - // By declaring our certificate here we tell the HTTPS client to assume that our certificate is a trusted one. - // This is fine for a test case because we don't want party dependencies on test execution. - ca: [serverCert.certificatePem], - rejectUnauthorized: true, - - // We present the server with the client's certificate to put the "mutual" in mTLS for real. - key: clientCert.privateKeyPem, - cert: clientCert.certificatePem, - }; - - const req = request(requestOptions, (res) => { - res.setEncoding("utf8"); - - let body = ""; - - res.on("data", (chunk) => { - body = body + chunk; - }); - - res.on("end", () => { - if (res.statusCode !== 200) { - reject(`HTTPS request failed. Status code: ${res.statusCode}`); - } else { - resolve(body); - } - }); - }); - t.ok("req", "req truthy OK"); - - req.on("error", (error) => { - log.error("Failed to send request: ", error); - reject(error); - }); - req.end(); - }); - - t.ok(response, "Server response truthy"); - t.equal(response, MESSAGE, `Server responded with "${MESSAGE}"`); - - t.end(); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts deleted file mode 100644 index 0e303f6352..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts +++ /dev/null @@ -1,101 +0,0 @@ -const tap = require("tap"); -import { AddressInfo } from "net"; -import { Server, createServer, request, RequestOptions } from "https"; -import { - SelfSignedPkiGenerator, - IPki, -} from "../../../../../main/typescript/public-api"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; - -const log: Logger = LoggerProvider.getOrCreate({ - label: "test-generates-working-certificates", - level: "TRACE", -}); - -tap.test("works with HTTPS NodeJS module", async (assert: any) => { - assert.ok(SelfSignedPkiGenerator, "class present on API surface"); - - const generator = new SelfSignedPkiGenerator(); - assert.ok(generator, "Instantiated SelfSignedCertificateGenerator OK."); - const serverCertData: IPki = generator.create("127.0.0.1"); - assert.ok(serverCertData, "Returned cert data truthy"); - assert.ok(serverCertData.certificatePem, "certData.certificatePem truthy"); - assert.ok(serverCertData.privateKeyPem, "certData.privateKeyPem truthy"); - assert.ok(serverCertData.certificate, "certData.certificate truthy"); - assert.ok(serverCertData.keyPair, "certData.keyPair truthy"); - - const serverOptions = { - key: serverCertData.privateKeyPem, - cert: serverCertData.certificatePem, - }; - - const MESSAGE = "hello world\n"; - - const server: Server = await new Promise((resolve, reject) => { - const listener = (aRequest: any, aResponse: any) => { - aResponse.writeHead(200); - aResponse.end(MESSAGE); - }; - const aServer: Server = createServer(serverOptions, listener); - aServer.once("tlsClientError", (err: Error) => { - log.error("tlsClientError: %j", err); - reject(err); - }); - aServer.once("listening", () => resolve(aServer)); - aServer.listen(0, "127.0.0.1"); - assert.tearDown(() => aServer.close()); - }); - - assert.ok(server, "HTTPS Server object truthy"); - assert.ok(server.listening, "HTTPS Server is indeed listening"); - - const addressInfo = server.address() as AddressInfo; - assert.ok(addressInfo, "HTTPS Server provided truthy AddressInfo"); - assert.ok(addressInfo.port, "HTTPS Server provided truthy AddressInfo.port"); - log.debug("AddressInfo for test HTTPS server: %j", addressInfo); - - const response = await new Promise((resolve, reject) => { - const requestOptions: RequestOptions = { - protocol: "https:", - host: addressInfo.address, - port: addressInfo.port, - path: "/", - method: "GET", - - // IMPORTANT: - // Without this self signed certs are rejected because they are not part of a chain with a trusted root CA - // By declaring our certificate here we tell the HTTPS client to assume that our certificate is a trusted one. - // This is fine for a test case because we don't want this party dependencies on test execution. - ca: serverCertData.certificatePem, - }; - - const req = request(requestOptions, (res) => { - res.setEncoding("utf8"); - - let body = ""; - - res.on("data", (chunk) => { - body = body + chunk; - }); - - res.on("end", () => { - if (res.statusCode !== 200) { - reject(`HTTPS request failed. Status code: ${res.statusCode}`); - } else { - resolve(body); - } - }); - }); - - req.on("error", (error) => { - log.error("Failed to send request: ", error); - reject(error); - }); - req.end(); - }); - - assert.ok(response, "Server response truthy"); - assert.equal(response, MESSAGE, `Server responded with "${MESSAGE}"`); - - assert.end(); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts deleted file mode 100644 index 5b44fa205a..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts +++ /dev/null @@ -1,403 +0,0 @@ -import { - ApiServer, - ApiServerApiClient, - ApiServerApiClientConfiguration, - AuthorizationProtocol, - ConfigService, - IAuthorizationConfig, -} from "../../../main/typescript/public-api"; -import { - IJoseFittingJwtParams, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Constants } from "@hyperledger/cactus-core-api"; -import type { AuthorizeOptions as SocketIoJwtOptions } from "@thream/socketio-jwt"; -import type { Params as ExpressJwtOptions } from "express-jwt"; -import "jest-extended"; -import { SignJWT, exportSPKI, generateKeyPair } from "jose"; -import path from "path"; -import { v4 as uuidv4 } from "uuid"; - -import { default_service, empty } from "../../../main/typescript/public-api"; -import * as grpc from "@grpc/grpc-js"; -import { GrpcServerApiServer } from "../../../main/typescript/web-services/grpc/grpc-server-api-server"; -import { RuntimeError } from "run-time-error-cjs"; - -describe("cmd-api-server:getOpenApiSpecV1Endpoint", () => { - const logLevel: LogLevelDesc = "TRACE"; - let apiServer: ApiServer; - let apiClient: ApiServerApiClient; - let grpcHost: string; - - afterAll(async () => await apiServer.shutdown()); - - beforeAll(async () => { - const jwtKeyPair = await generateKeyPair("RS256", { modulusLength: 4096 }); - const jwtPublicKey = await exportSPKI(jwtKeyPair.publicKey); - const expressJwtOptions: ExpressJwtOptions & IJoseFittingJwtParams = { - algorithms: ["RS256"], - secret: jwtPublicKey, - audience: uuidv4(), - issuer: uuidv4(), - }; - const socketIoJwtOptions: SocketIoJwtOptions = { - secret: jwtPublicKey, - algorithms: ["RS256"], - }; - expect(expressJwtOptions).toBeTruthy(); - - const authorizationConfig: IAuthorizationConfig = { - unprotectedEndpointExemptions: [], - expressJwtOptions, - socketIoJwtOptions, - socketIoPath: Constants.SocketIoConnectionPathV1, - }; - - const pluginsPath = path.join( - __dirname, - "../../../../../../", // walk back up to the project root - ".tmp/test/test-cmd-api-server/get-open-api-spec-v1-endpoint_test/", // the dir path from the root - uuidv4(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - - const pluginRegistry = new PluginRegistry({ logLevel }); - - const configService = new ConfigService(); - - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.logLevel = logLevel; - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.JSON_WEB_TOKEN; - apiSrvOpts.authorizationConfigJson = authorizationConfig; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.grpcMtlsEnabled = false; - apiSrvOpts.plugins = []; - - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - apiServer = new ApiServer({ - config: config.getProperties(), - pluginRegistry, - }); - - apiServer.initPluginRegistry({ pluginRegistry }); - const startResponsePromise = apiServer.start(); - await expect(startResponsePromise).toResolve(); - const startResponse = await startResponsePromise; - expect(startResponse).toBeTruthy(); - - const { addressInfoApi, addressInfoGrpc } = await startResponsePromise; - const protocol = apiSrvOpts.apiTlsEnabled ? "https" : "http"; - const { address, port } = addressInfoApi; - const apiHost = `${protocol}://${address}:${port}`; - - grpcHost = `${addressInfoGrpc.address}:${addressInfoGrpc.port}`; - - const jwtPayload = { name: "Peter", location: "Albertirsa" }; - const validJwt = await new SignJWT(jwtPayload) - .setProtectedHeader({ alg: "RS256" }) - .setIssuer(expressJwtOptions.issuer) - .setAudience(expressJwtOptions.audience) - .sign(jwtKeyPair.privateKey); - expect(validJwt).toBeTruthy(); - - const validBearerToken = `Bearer ${validJwt}`; - expect(validBearerToken).toBeTruthy(); - - apiClient = new ApiServerApiClient( - new ApiServerApiClientConfiguration({ - basePath: apiHost, - baseOptions: { headers: { Authorization: validBearerToken } }, - logLevel, - }), - ); - }); - - it("HTTP - returns the OpenAPI spec .json document of the API server itself", async () => { - const res1Promise = apiClient.getOpenApiSpecV1(); - await expect(res1Promise).resolves.toHaveProperty("data.openapi"); - const res1 = await res1Promise; - expect(res1.status).toEqual(200); - expect(res1.data).toBeTruthy(); - }); - - it("gRPC - Vanilla Server & Vanilla Client - makeUnaryRequest", async () => { - const clientInsecureCreds = grpc.credentials.createInsecure(); - const serverInsecureCreds = grpc.ServerCredentials.createInsecure(); - - const server = new grpc.Server(); - - server.addService( - default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient - .service, - new GrpcServerApiServer(), - ); - - const res1Promise = new Promise((resolve, reject) => { - server.bindAsync("127.0.0.1:0", serverInsecureCreds, (err, port) => { - if (err) { - reject(err); - } else { - server.start(); - - const client = new grpc.Client( - `127.0.0.1:${port}`, - clientInsecureCreds, - ); - - client.makeUnaryRequest( - "/org.hyperledger.cactus.cmd_api_server.DefaultService/GetOpenApiSpecV1", - (x) => x, - (y) => y, - Buffer.from([]), - (err3, value) => { - if (err3) { - reject(err3); - } else { - resolve(value); - } - client.close(); - }, - ); - } - }); - }); - - expect(res1Promise).resolves.toBeObject(); - const res1 = await res1Promise; - expect(res1).toBeObject(); - - await new Promise((resolve, reject) => { - server.tryShutdown((err1) => { - if (err1) { - console.error("Failed to shut down test gRPC server: ", err1); - reject(err1); - } else { - resolve(); - } - }); - }); - }); - - it("gRPC - Vanilla Server + Cacti Client - makeUnaryRequest", async () => { - const clientInsecureCreds = grpc.credentials.createInsecure(); - const serverInsecureCreds = grpc.ServerCredentials.createInsecure(); - - const server = new grpc.Server(); - - server.addService( - default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient - .service, - new GrpcServerApiServer(), - ); - - const res1Promise = new Promise((resolve, reject) => { - server.bindAsync("127.0.0.1:0", serverInsecureCreds, (err, port) => { - if (err) { - reject(err); - } else { - server.start(); - - const client = - new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - `127.0.0.1:${port}`, - clientInsecureCreds, - ); - client.makeUnaryRequest( - "/org.hyperledger.cactus.cmd_api_server.DefaultService/GetOpenApiSpecV1", - (x) => x, - (y) => y, - Buffer.from([]), - (err3, value) => { - if (err3) { - reject(err3); - } else { - resolve(value); - } - client.close(); - }, - ); - } - }); - }); - - expect(res1Promise).resolves.toBeObject(); - const res1 = await res1Promise; - expect(res1).toBeObject(); - - await new Promise((resolve, reject) => { - server.tryShutdown((err1) => { - if (err1) { - console.error("Failed to shut down test gRPC server: ", err1); - reject(err1); - } else { - resolve(); - } - }); - }); - }); - - it("gRPC - Vanilla Server + Cacti Client - GetOpenApiSpecV1", async () => { - const clientInsecureCreds = grpc.credentials.createInsecure(); - const serverInsecureCreds = grpc.ServerCredentials.createInsecure(); - - const server = new grpc.Server(); - - server.addService( - default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient - .service, - new GrpcServerApiServer(), - ); - - const res1Promise = new Promise((resolve, reject) => { - server.bindAsync("127.0.0.1:0", serverInsecureCreds, (err, port) => { - const client = - new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - `127.0.0.1:${port}`, - clientInsecureCreds, - ); - if (err) { - reject(err); - } else { - server.start(); - - const req = new empty.google.protobuf.Empty(); - client.GetOpenApiSpecV1(req, (err3, value) => { - if (err3) { - reject(err3); - } else { - resolve(value); - } - client.close(); - }); - } - }); - }); - - expect(res1Promise).resolves.toBeObject(); - const res1 = await res1Promise; - expect(res1).toBeObject(); - - await new Promise((resolve, reject) => { - server.tryShutdown((err1) => { - if (err1) { - console.error("Failed to shut down test gRPC server: ", err1); - reject(err1); - } else { - resolve(); - } - }); - }); - }); - - it("gRPC - Cacti Server & Cacti Client - GetOpenApiSpecV1", async () => { - const clientInsecureCreds = grpc.credentials.createInsecure(); - const res1Promise = - new Promise( - (resolve, reject) => { - const deadline = Date.now() + 100; - - const client = - new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - grpcHost, - clientInsecureCreds, - ); - - client.waitForReady(deadline, (err2) => { - if (err2) { - reject(err2); - } else { - const req = new empty.google.protobuf.Empty(); - client.GetOpenApiSpecV1(req, (err3, value) => { - if (err3) { - reject(err3); - } else if (value) { - resolve(value); - } else { - reject( - new RuntimeError("Response object received is falsy."), - ); - } - client.close(); - }); - } - }); - }, - ); - await expect(res1Promise).resolves.toBeObject(); - const res1 = await res1Promise; - expect(res1).toBeTruthy(); - const res1AsString = res1.toString(); - expect(res1AsString).toBeString(); - expect(() => JSON.parse(res1AsString)).not.toThrowError(); - }); - - it("gRPC - Cacti Server + Cacti Client - makeUnaryRequest", async () => { - const clientInsecureCreds = grpc.credentials.createInsecure(); - - const res1Promise = new Promise((resolve, reject) => { - const client = - new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - grpcHost, - clientInsecureCreds, - ); - client.makeUnaryRequest( - "/org.hyperledger.cactus.cmd_api_server.DefaultService/GetOpenApiSpecV1", - (x) => x, - (y) => y, - Buffer.from([]), - (err3, value) => { - if (err3) { - reject(err3); - } else { - resolve(value); - } - client.close(); - }, - ); - }); - - await expect(res1Promise).resolves.toBeObject(); - const res1 = await res1Promise; - expect(res1).toBeObject(); - }); - - it("gRPC - Cacti Server & Cacti Client - GetOpenApiSpecV1 - no manual waitForReady", async () => { - const clientInsecureCreds = grpc.credentials.createInsecure(); - const client = - new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - grpcHost, - clientInsecureCreds, - ); - const res1Promise = - new Promise( - (resolve, reject) => { - const req = new empty.google.protobuf.Empty(); - client.GetOpenApiSpecV1(req, (err3, value) => { - if (err3) { - reject(err3); - } else if (value) { - resolve(value); - } else { - reject(new RuntimeError("Response object received is falsy.")); - } - client.close(); - }); - }, - ); - await expect(res1Promise).resolves.toBeObject(); - const res1 = await res1Promise; - expect(res1).toBeTruthy(); - const res1AsString = res1.toString(); - expect(res1AsString).toBeString(); - expect(() => JSON.parse(res1AsString)).not.toThrowError(); - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-js-proto-loader-client-healthcheck.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-js-proto-loader-client-healthcheck.test.ts deleted file mode 100644 index 3e844bacd9..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-js-proto-loader-client-healthcheck.test.ts +++ /dev/null @@ -1,106 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import path from "path"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -import { - ApiServer, - ConfigService, - HealthCheckResponse, -} from "../../../main/typescript/public-api"; -import { AuthorizationProtocol } from "../../../main/typescript/public-api"; -import { ServiceClientConstructor } from "@grpc/grpc-js/build/src/make-client"; -import * as grpc from "@grpc/grpc-js"; -import * as protoLoader from "@grpc/proto-loader"; -import { Empty } from "google-protobuf/google/protobuf/empty_pb"; - -const testCase = "API server: runs gRPC web services - proto loader"; -const logLevel: LogLevelDesc = "TRACE"; - -test(testCase, async (t: Test) => { - const configService = new ConfigService(); - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.configFile = ""; - apiSrvOpts.logLevel = logLevel; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcMtlsEnabled = false; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = []; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - const apiServer = new ApiServer({ - config: config.getProperties(), - }); - test.onFinish(async () => await apiServer.shutdown()); - - const startResponse = apiServer.start(); - await t.doesNotReject(startResponse, "start API server OK"); - t.ok(startResponse, "startResponse truthy OK"); - - const addressInfoApi = (await startResponse).addressInfoGrpc; - const { address, port } = addressInfoApi; - const grpcHostAndPort = `${address}:${port}`; - t.ok(grpcHostAndPort, "grpcHostAndPort truthy OK"); - - const PROTO_PATH = path.join( - __dirname, - "../../../main/proto/generated/openapi/services/default_service.proto", - ); - - const PROTO_INCLUDE_DIR = path.join( - __dirname, - "../../../main/proto/generated/openapi/", - ); - - const packageDefinition = await protoLoader.load(PROTO_PATH, { - includeDirs: [PROTO_INCLUDE_DIR], - keepCase: true, - longs: String, - enums: String, - defaults: true, - oneofs: true, - }); - - const grpcPkg = grpc.loadPackageDefinition(packageDefinition); - t.ok(grpcPkg, "grpcPkg truthy OK"); - - const DefaultService: ServiceClientConstructor = (grpcPkg as any).org - .hyperledger.cactus.cmd_api_server.DefaultService; - - t.ok(DefaultService, "DefaultService truthy OK"); - - const client = new DefaultService( - grpcHostAndPort, - grpc.credentials.createInsecure(), - ); - t.ok(client, "proto loaded client truthy OK"); - - const request = new Empty(); - - const res1 = await new Promise((resolve, reject) => { - client.getHealthCheckV1( - request, - (err: grpc.ServiceError | null, value: HealthCheckResponse) => { - if (err) { - reject(err); - } else { - resolve(value); - } - }, - ); - }); - t.ok(res1, "res1 truthy OK"); - t.ok(res1.createdAt, "res1.createdAt truthy OK"); - t.ok(res1.memoryUsage, "res1.memoryUsage truthy OK"); - t.ok(res1.memoryUsage.heapTotal, "res1.memoryUsage.heapTotal truthy OK"); - t.ok(res1.memoryUsage.heapUsed, "res1.memoryUsage.heapUsed truthy OK"); - t.ok(res1.memoryUsage.rss, "res1.memoryUsage.rss truthy OK"); - t.true(res1.success, "res1.success true OK"); - - t.end(); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-healthcheck.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-healthcheck.test.ts deleted file mode 100644 index cb67d6a7c6..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-healthcheck.test.ts +++ /dev/null @@ -1,97 +0,0 @@ -import "jest-extended"; -import * as grpc from "@grpc/grpc-js"; -import { RuntimeError } from "run-time-error-cjs"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -import { - ApiServer, - ConfigService, - ICactusApiServerOptions, -} from "../../../main/typescript/public-api"; -import { AuthorizationProtocol } from "../../../main/typescript/public-api"; -import { default_service } from "../../../main/typescript/public-api"; -import { health_check_response_pb } from "../../../main/typescript/public-api"; -import { empty } from "../../../main/typescript/public-api"; - -const logLevel: LogLevelDesc = "INFO"; - -describe("ApiServer", () => { - let apiServer: ApiServer; - let config: ICactusApiServerOptions; - let apiClient: default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient; - - afterAll(async () => { - await apiServer.shutdown(); - }); - - beforeAll(async () => { - const configService = new ConfigService(); - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.configFile = ""; - apiSrvOpts.logLevel = logLevel; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcMtlsEnabled = false; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = []; - const convictCfg = await configService.newExampleConfigConvict(apiSrvOpts); - config = convictCfg.getProperties(); - - apiServer = new ApiServer({ - config, - }); - - const apiServerStart = apiServer.start(); - await expect(apiServerStart).toResolve(); - const addressInfoGrpc = (await apiServerStart).addressInfoGrpc; - const { address, port } = addressInfoGrpc; - const grpcHostAndPort = `${address}:${port}`; - - apiClient = - new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - grpcHostAndPort, - grpc.credentials.createInsecure(), - ); - expect(apiClient).toBeTruthy(); - }); - - test("runs gRPC TS-proto web services", async () => { - type HealthCheckResponsePB = - health_check_response_pb.org.hyperledger.cactus.cmd_api_server.HealthCheckResponsePB; - - const grpcReq = new Promise((resolve, reject) => { - apiClient.GetHealthCheckV1( - new empty.google.protobuf.Empty(), - (error: grpc.ServiceError | null, response?: HealthCheckResponsePB) => { - if (error) { - reject(error); - } else if (response) { - resolve(response); - } else { - reject(new RuntimeError("No error, nor response received.")); - } - }, - ); - }); - - await expect(grpcReq).resolves.toMatchObject({ - toObject: expect.toBeFunction(), - }); - - const resPb = await grpcReq; - const res = resPb.toObject(); - - expect(res).toMatchObject({ - createdAt: expect.toBeDateString(), - memoryUsage: expect.objectContaining({ - rss: expect.toBeNumber(), - }), - success: true, - }); - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts deleted file mode 100644 index c7b39a7120..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts +++ /dev/null @@ -1,101 +0,0 @@ -import test, { Test } from "tape-promise/tape"; - -import * as grpc from "@grpc/grpc-js"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -import { ApiServer, ConfigService } from "../../../main/typescript/public-api"; -import { SelfSignedPkiGenerator } from "../../../main/typescript/public-api"; -import { AuthorizationProtocol } from "../../../main/typescript/public-api"; -import { default_service } from "../../../main/typescript/public-api"; -import { health_check_response_pb } from "../../../main/typescript/public-api"; -import { empty } from "../../../main/typescript/public-api"; -import { RuntimeError } from "run-time-error-cjs"; - -const testCase = "API server: runs gRPC web services - mTLS"; -const logLevel: LogLevelDesc = "TRACE"; - -test(testCase, async (t: Test) => { - const generator = new SelfSignedPkiGenerator(); - t.ok(generator, "Instantiated SelfSignedCertificateGenerator OK."); - - const serverCert = generator.create("127.0.0.1"); - const clientCert = generator.create("client.127.0.0.1", serverCert); - const serverRootCertPemBuf = Buffer.from(serverCert.certificatePem); - - const configService = new ConfigService(); - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.configFile = ""; - apiSrvOpts.logLevel = logLevel; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.apiTlsCertPem = serverCert.certificatePem; - apiSrvOpts.apiTlsKeyPem = serverCert.privateKeyPem; - apiSrvOpts.apiTlsClientCaPem = clientCert.certificatePem; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcMtlsEnabled = true; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = []; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - const apiServer = new ApiServer({ - config: config.getProperties(), - }); - test.onFinish(async () => await apiServer.shutdown()); - - const startResponse = apiServer.start(); - await t.doesNotReject(startResponse, "API server started OK"); - t.ok(startResponse, "startResponse truthy OK"); - - const addressInfoGrpc = (await startResponse).addressInfoGrpc; - const { address, port } = addressInfoGrpc; - const grpcHostAndPort = `${address}:${port}`; - - const tlsCredentials = grpc.credentials.createSsl( - serverRootCertPemBuf, - Buffer.from(clientCert.privateKeyPem), - Buffer.from(clientCert.certificatePem), - ); - const apiClient = - new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - grpcHostAndPort, - tlsCredentials, - ); - t.ok(apiClient, "apiClient truthy OK"); - - const responsePromise = - new Promise( - (resolve, reject) => { - apiClient.GetHealthCheckV1( - new empty.google.protobuf.Empty(), - ( - error: grpc.ServiceError | null, - response?: health_check_response_pb.org.hyperledger.cactus.cmd_api_server.HealthCheckResponsePB, - ) => { - if (error) { - reject(error); - } else if (response) { - resolve(response); - } else { - throw new RuntimeError("No error, nor response received."); - } - }, - ); - }, - ); - - await t.doesNotReject(responsePromise, "No error in healthcheck OK"); - const res = await responsePromise; - - const resHc = res.toObject(); - - t.ok(resHc, `healthcheck response truthy OK`); - t.ok(resHc.createdAt, `resHc.createdAt truthy OK`); - t.ok(resHc.memoryUsage, `resHc.memoryUsage truthy OK`); - t.ok(resHc.memoryUsage?.rss, `resHc.memoryUsage.rss truthy OK`); - t.ok(resHc.success, `resHc.success truthy OK`); - t.end(); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-consortium-manual.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-consortium-manual.test.ts deleted file mode 100644 index c8c555fa6e..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-consortium-manual.test.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { randomUUID as uuidv4 } from "node:crypto"; -import path from "node:path"; - -import "jest-extended"; -import { generateKeyPair, exportPKCS8 } from "jose"; -import { StatusCodes } from "http-status-codes"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { - ConsortiumDatabase, - ICactusPlugin, - IPluginConsortium, - PluginImport, - PluginImportAction, - PluginImportType, -} from "@hyperledger/cactus-core-api"; - -import { ApiServer } from "../../../../main/typescript/api-server"; -import { K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS } from "../../../../main/typescript/prometheus-exporter/metrics"; -import { DefaultApi as ApiServerApi } from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { ConfigService } from "../../../../main/typescript/config/config-service"; -import { AuthorizationProtocol } from "../../../../main/typescript/config/authorization-protocol"; -import { Configuration } from "../../../../main/typescript/generated/openapi/typescript-axios"; - -describe("ApiServer", () => { - const logLevel: LogLevelDesc = "INFO"; - const keychainId = uuidv4(); - const consortiumPluginInstanceId = uuidv4(); - - const pluginsPath = path.join( - __dirname, // start at the current file's path - "../../../../../../../", // walk back up to the project root - ".tmp/test/cmd-api-server/install-basic-plugin-consortium-manual_test", // the dir path from the root - uuidv4(), // then a random directory to ensure proper isolation - ); - - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - - let pluginImports: PluginImport[]; - - const configService = new ConfigService(); - - let apiServer: ApiServer; - let apiClient: ApiServerApi; - - beforeAll(async () => { - // Adding a new plugin to update the prometheus metric K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS - const keyPair = await await generateKeyPair("ES256K"); - const keyPairPem = await exportPKCS8(keyPair.privateKey); - const db: ConsortiumDatabase = { - cactusNode: [], - consortium: [], - consortiumMember: [], - ledger: [], - pluginInstance: [], - }; - - pluginImports = [ - { - packageName: "@hyperledger/cactus-plugin-keychain-memory", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: uuidv4(), - keychainId, - logLevel, - }, - }, - { - packageName: "@hyperledger/cactus-plugin-consortium-manual", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: consortiumPluginInstanceId, - keyPairPem: keyPairPem, - consortiumDatabase: db, - }, - }, - ]; - - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.logLevel = logLevel; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = pluginImports; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - apiServer = new ApiServer({ - config: config.getProperties(), - }); - - const startResponse = apiServer.start(); - await expect(startResponse).toResolve(); - - const addressInfoApi = (await startResponse).addressInfoApi; - const protocol = apiSrvOpts.apiTlsEnabled ? "https" : "http"; - const { address, port } = addressInfoApi; - const apiHost = `${protocol}://${address}:${port}`; - - const apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new ApiServerApi(apiConfig); - }); - - afterAll(async () => { - await apiServer.shutdown(); - }); - - it("can install plugin-consortium-manual", async () => { - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - " Total number of plugins imported\n" + - "# TYPE " + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - " gauge\n" + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - '{type="' + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - '"} 2'; - - expect(res).toMatchObject({ - status: StatusCodes.OK, - data: expect.stringContaining(promMetricsOutput), - }); - } - - const pluginRegistry = await apiServer.getOrInitPluginRegistry(); - - // this is not a working plugin but we are just testing the monitoring so - // it's okay for this particular test case. Do not copy this to other test - // cases or if you do remove right after you copied it ;-) - pluginRegistry.plugins.push({} as ICactusPlugin); - - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - " Total number of plugins imported\n" + - "# TYPE " + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - " gauge\n" + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - '{type="' + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - '"} 3'; - - expect(res).toMatchObject({ - status: StatusCodes.OK, - data: expect.stringContaining(promMetricsOutput), - }); - } - // clean up after ourselves, - // e.g. remove the dummy plugin instance we just pushed - pluginRegistry.plugins.pop(); - - const keychain = pluginRegistry.findOneByKeychainId(keychainId); - - const hasX1 = await keychain.has("x"); - expect(hasX1).toBeFalse(); - - await keychain.set("x", "y"); - - const hasX2 = await keychain.has("x"); - expect(hasX2).toBeTrue(); - - type DummyConsortiumPlugin = IPluginConsortium< - unknown, - unknown, - unknown, - unknown - >; - - // TODO - use the new getOneById implementation once - // https://github.com/hyperledger/cactus/issues/1197 - // has been resolved - const consortiumPlugin = pluginRegistry - .getPlugins() - .find( - (it) => it.getInstanceId() === consortiumPluginInstanceId, - ) as DummyConsortiumPlugin; - - expect(consortiumPlugin).toBeTruthy(); - expect(consortiumPlugin).toBeObject(); - - // FIXME - uncomment this once https://github.com/hyperledger/cactus/issues/1199 - // has been resolved (and also published to npm) - // const nodeJwsRes = await consortiumPlugin.getNodeJws({}); - // t.ok(nodeJwsRes, "nodeJwsRes truthy OK"); - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-keychain-memory.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-keychain-memory.test.ts deleted file mode 100644 index 4fc0688cc0..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-keychain-memory.test.ts +++ /dev/null @@ -1,121 +0,0 @@ -import path from "node:path"; - -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { StatusCodes } from "http-status-codes"; - -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; - -import { - Configuration, - PluginImportAction, - PluginImportType, -} from "@hyperledger/cactus-core-api"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "../../../../main/typescript/public-api"; - -import { ICactusApiServerOptions } from "../../../../main/typescript/config/config-service"; - -import { K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS } from "../../../../main/typescript/prometheus-exporter/metrics"; - -import { DefaultApi as ApiServerApi } from "../../../../main/typescript/public-api"; -import convict from "convict"; - -const logLevel: LogLevelDesc = "INFO"; - -describe("ApiServer", () => { - const log = LoggerProvider.getOrCreate({ - label: "install-basic-plugin-keychain-memory.test.ts", - level: logLevel, - }); - - let config: convict.Config; - let apiServer: ApiServer; - let apiSrvOpts: ICactusApiServerOptions; - - beforeAll(async () => { - const pluginsPath = path.join( - __dirname, // start at the current file's path - "../../../../../../../", // walk back up to the project root - ".tmp/test/cmd-api-server/install-basic-plugin-keychain-memory_test", // the dir path from the root - uuidv4(), // then a random directory to ensure proper isolation - ); - log.info("Plugin install dir: %s", pluginsPath); - - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - - const configService = new ConfigService(); - apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = [ - { - packageName: "@hyperledger/cactus-plugin-keychain-memory", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel, - }, - }, - ]; - config = await configService.newExampleConfigConvict(apiSrvOpts); - }); - - afterAll(async () => { - await apiServer.shutdown(); - }); - - it("can import plugins at runtime (CLI)", async () => { - apiServer = new ApiServer({ - config: config.getProperties(), - }); - - const startResponse = apiServer.start(); - expect(startResponse).toResolve(); - - const addressInfoApi = (await startResponse).addressInfoApi; - const protocol = apiSrvOpts.apiTlsEnabled ? "https" : "http"; - const { address, port } = addressInfoApi; - const apiHost = `${protocol}://${address}:${port}`; - log.debug( - `Metrics URL: ${apiHost}/api/v1/api-server/get-prometheus-exporter-metrics`, - ); - - const apiConfig = new Configuration({ basePath: apiHost }); - const apiClient = new ApiServerApi(apiConfig); - - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - " Total number of plugins imported\n" + - "# TYPE " + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - " gauge\n" + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - '{type="' + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - '"} 1'; - - expect(res).toMatchObject({ - data: expect.stringContaining(promMetricsOutput), - status: StatusCodes.OK, - }); - expect(res.data.includes(promMetricsOutput)).toBeTrue(); - } - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-besu-latest.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-besu-latest.test.ts deleted file mode 100644 index a1a166dee7..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-besu-latest.test.ts +++ /dev/null @@ -1,109 +0,0 @@ -import path from "path"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -import { - Configuration, - PluginImportAction, - PluginImportType, -} from "@hyperledger/cactus-core-api"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, - ICactusApiServerOptions, -} from "../../../../main/typescript/public-api"; - -import { K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS } from "../../../../main/typescript/prometheus-exporter/metrics"; - -import { DefaultApi as ApiServerApi } from "../../../../main/typescript/public-api"; - -const logLevel: LogLevelDesc = "INFO"; - -describe("ApiServer", () => { - const pluginsPath = path.join( - __dirname, // start at the current file's path - "../../../../../../../", // walk back up to the project root - ".tmp/test/cmd-api-server/install-basic-plugin-ledger-connector-besu-latest_test", // the dir path from the root - uuidv4(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ - pluginsPath, - npmInstallMode: "noCache", - }); - - const configService = new ConfigService(); - - let apiServer: ApiServer; - let isApiServerRunning = false; - let apiSrvOpts: ICactusApiServerOptions; - - beforeAll(async () => { - apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = [ - { - packageName: "@hyperledger/cactus-plugin-ledger-connector-besu", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: uuidv4(), - logLevel, - rpcApiHttpHost: "http://127.0.0.1:8545", - rpcApiWsHost: "ws://127.0.0.1:8546", - }, - }, - ]; - }); - - afterAll(async () => { - if (isApiServerRunning) { - await apiServer.shutdown(); - } - }); - - it("can import plugins at runtime (CLI)", async () => { - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - apiServer = new ApiServer({ - config: config.getProperties(), - }); - const startResponse = apiServer.start(); - isApiServerRunning = true; - await expect(startResponse).not.toReject(); - expect(startResponse).toBeTruthy(); - - const addressInfoApi = (await startResponse).addressInfoApi; - const protocol = apiSrvOpts.apiTlsEnabled ? "https" : "http"; - const { address, port } = addressInfoApi; - const apiHost = `${protocol}://${address}:${port}`; - const apiConfig = new Configuration({ basePath: apiHost }); - const apiClient = new ApiServerApi(apiConfig); - - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - " Total number of plugins imported\n" + - "# TYPE " + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - " gauge\n" + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - '{type="' + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - '"} 1'; - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data.includes(promMetricsOutput)).toBeTrue(); - }); -}); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-fabric-0-7-0.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-fabric-0-7-0.test.ts deleted file mode 100644 index 1daeb51284..0000000000 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-fabric-0-7-0.test.ts +++ /dev/null @@ -1,100 +0,0 @@ -import path from "node:path"; -import { randomUUID } from "node:crypto"; - -import test, { Test } from "tape-promise/tape"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -import { - Configuration, - PluginImportAction, - PluginImportType, -} from "@hyperledger/cactus-core-api"; - -import { ConfigService } from "../../../../main/typescript/config/config-service"; -import { K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS } from "../../../../main/typescript/prometheus-exporter/metrics"; -import { DefaultApi as ApiServerApi } from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { AuthorizationProtocol } from "../../../../main/typescript/config/authorization-protocol"; -import { ApiServer } from "../../../../main/typescript/api-server"; - -const logLevel: LogLevelDesc = "INFO"; - -test("can install plugin-ledger-connector-fabric", async (t: Test) => { - const pluginsPath = path.join( - __dirname, // start at the current file's path - "../../../../../../../", // walk back up to the project root - ".tmp/test/cmd-api-server/runtime-plugin-imports_test", // the dir path from the root - randomUUID(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ - pluginsPath, - npmInstallMode: "noCache", - }); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = 0; - apiServerOptions.cockpitPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = [ - { - packageName: "@hyperledger/cactus-plugin-ledger-connector-fabric", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: randomUUID(), - logLevel, - connectionProfile: {}, - peerBinary: "peer", - }, - }, - ]; - const config = await configService.newExampleConfigConvict(apiServerOptions); - - const apiServer = new ApiServer({ - config: config.getProperties(), - }); - - test.onFinish(() => apiServer.shutdown()); - - const startResponse = apiServer.start(); - await t.doesNotReject(startResponse, "started API server dynamic imports OK"); - t.ok(startResponse, "startResponse truthy OK"); - - const addressInfoApi = (await startResponse).addressInfoApi; - const protocol = apiServerOptions.apiTlsEnabled ? "https" : "http"; - const { address, port } = addressInfoApi; - const apiHost = `${protocol}://${address}:${port}`; - t.comment( - `Metrics URL: ${apiHost}/api/v1/api-server/get-prometheus-exporter-metrics`, - ); - - const apiConfig = new Configuration({ basePath: apiHost }); - const apiClient = new ApiServerApi(apiConfig); - - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - " Total number of plugins imported\n" + - "# TYPE " + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - " gauge\n" + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - '{type="' + - K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS + - '"} 1'; - t.ok(res); - t.ok(res.data); - t.equal(res.status, 200); - t.true( - res.data.includes(promMetricsOutput), - "Total 1 plugins imported as expected. RESULT OK", - ); - } -}); diff --git a/packages/cactus-cmd-api-server/tsconfig.json b/packages/cactus-cmd-api-server/tsconfig.json deleted file mode 100644 index e4a6c508f7..0000000000 --- a/packages/cactus-cmd-api-server/tsconfig.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "skipLibCheck": true, - "resolveJsonModule": true, - "tsBuildInfoFile": "../../.build-cache/cactus-cmd-api-server.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-vault/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-common/package.json b/packages/cactus-common/package.json index 65a37a54af..ad7b4c92b7 100644 --- a/packages/cactus-common/package.json +++ b/packages/cactus-common/package.json @@ -1,6 +1,6 @@ { - "name": "@hyperledger/cactus-common", - "version": "2.0.0", + "name": "@adrianbatuto/cactus-common", + "version": "2.0.6-twopackage", "description": "Universal library used by both front end and back end components of Cactus. Aims to be a developer swiss army knife.", "keywords": [ "Hyperledger", @@ -15,7 +15,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" + "url": "git+https://github.com/adrianbatuto/cacti.git" }, "license": "Apache-2.0", "author": { diff --git a/packages/cactus-common/src/test/typescript/unit/servers.test.ts b/packages/cactus-common/src/test/typescript/unit/servers.test.ts index 9147a8f4cf..933cb8707f 100644 --- a/packages/cactus-common/src/test/typescript/unit/servers.test.ts +++ b/packages/cactus-common/src/test/typescript/unit/servers.test.ts @@ -9,7 +9,7 @@ const testCase = "Servers"; describe(testCase, () => { const server = createServer(); const portBlocker = createServer(); - + console.log("test"); afterAll(async () => { await Servers.shutdown(server); await portBlocker.close(); diff --git a/packages/cactus-core-api/package.json b/packages/cactus-core-api/package.json index 2fb01bf346..b446ac4cad 100644 --- a/packages/cactus-core-api/package.json +++ b/packages/cactus-core-api/package.json @@ -1,6 +1,6 @@ { - "name": "@hyperledger/cactus-core-api", - "version": "2.0.0", + "name": "@adrianbatuto/cactus-core-api", + "version": "2.0.6-twopackage", "description": "Contains type definitions/interfaces for the kernel of the codebase. Kept separate from the implementation so that it is easier to use it as a dependency.", "keywords": [ "Hyperledger", @@ -15,7 +15,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" + "url": "git+https://github.com/adrianbatuto/cacti.git" }, "license": "Apache-2.0", "author": { diff --git a/packages/cactus-core/CHANGELOG.md b/packages/cactus-core/CHANGELOG.md deleted file mode 100644 index aea45b906e..0000000000 --- a/packages/cactus-core/CHANGELOG.md +++ /dev/null @@ -1,186 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Bug Fixes - -* address CVE-2022-24434, GHSA-wm7h-9275-46v2 caused by dicer ([6ff8111](https://github.com/hyperledger/cacti/commit/6ff8111c2534f71a5f623433eba59a610d84f4eb)) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **cactus-common:** coerceUnknownToError() now uses HTML sanitize ([d70488a](https://github.com/hyperledger/cacti/commit/d70488a82e9c1d6958ac3ab0368f3c3bfca378c6)) -* **connector-quorum/ethereum:** strengthen contract parameter validation ([779bb7e](https://github.com/hyperledger/cacti/commit/779bb7e24b06352bad64c96eab3b24c0961d1381)), closes [#2760](https://github.com/hyperledger/cacti/issues/2760) -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **cactus-core:** add handleRestEndpointException utility to public API ([bf9dfe8](https://github.com/hyperledger/cacti/commit/bf9dfe882f78f7fc88ee52d86d62b7e851716b79)) -* **core:** add configureExpressAppBase() utility function ([383f852](https://github.com/hyperledger/cacti/commit/383f8528d88989b44c9763fc883c3d9ac74da21e)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **cactus-core:** add GetOpenApiSpecV1EndpointBase class ([6d68292](https://github.com/hyperledger/cacti/commit/6d68292f5bd88854f1d625631ce4c70f4151a02f)) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **cmd-api-server:** mitigate CVE-2022-24434 and CVE-2022-24999 [#2039](https://github.com/hyperledger/cactus/issues/2039) ([1cc9667](https://github.com/hyperledger/cactus/commit/1cc9667e2432d1d27c2647b86e42707a2e78e4c3)), closes [#2241](https://github.com/hyperledger/cactus/issues/2241) -* **security:** upgrade express-jwt to v8.4.1 ([e251168](https://github.com/hyperledger/cactus/commit/e251168fb4067a8036a5168709e57154c0c02fe4)), closes [#2231](https://github.com/hyperledger/cactus/issues/2231) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-core - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-core - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-core - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Features - -* **core-api:** hasTransactionFinality() on connector API [#354](https://github.com/hyperledger/cactus/issues/354) ([a2d0582](https://github.com/hyperledger/cactus/commit/a2d058218780e5e4c81e5f847cc875879a946e3f)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **core-api:** plugin interface async initializer ([d40f68b](https://github.com/hyperledger/cactus/commit/d40f68bd9eaff498df8514fe7397986b5a2f865d)) -* **core:** add plugin registry log level constructor arg ([1652b33](https://github.com/hyperledger/cactus/commit/1652b33255c211e87e33ceb3e421cb9fb4182502)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Features - -* **core:** add plugin registry log level constructor arg ([1652b33](https://github.com/hyperledger/cactus/commit/1652b33255c211e87e33ceb3e421cb9fb4182502)) -* **core-api:** hasTransactionFinality() on connector API [#354](https://github.com/hyperledger/cactus/issues/354) ([a2d0582](https://github.com/hyperledger/cactus/commit/a2d058218780e5e4c81e5f847cc875879a946e3f)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -**Note:** Version bump only for package @hyperledger/cactus-core - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -**Note:** Version bump only for package @hyperledger/cactus-core diff --git a/packages/cactus-core/README.md b/packages/cactus-core/README.md deleted file mode 100644 index 87f4a00fa0..0000000000 --- a/packages/cactus-core/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# `@hyperledger/cactus-core` - -This module is responsible for providing the backbone for the rest of the packages -when it comes to the features of Cactus. - -The main difference between this and the `cactus-common` package is that this one -does not guarantee it's features to work in the browser. - -The main difference from the `cactus-core-api` package is that this is meant to -contain actual implementations while `cactus-core-api` is meant to be strictly -about defining interfaces. Based on that latter constraint we may move the -`PluginRegistry` out of that package and into this one in the near future. - -## Usage - -``` -// TODO: DEMONSTRATE API -``` diff --git a/packages/cactus-core/package.json b/packages/cactus-core/package.json deleted file mode 100644 index f25cafe187..0000000000 --- a/packages/cactus-core/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "@hyperledger/cactus-core", - "version": "2.0.0", - "description": "Contains lower level abstractions/implementation that is to be shared by multiple other, higher level packages of the project.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-core.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "express-jwt-authz": "2.4.1", - "express-openapi-validator": "5.2.0", - "http-errors": "2.0.0", - "http-errors-enhanced-cjs": "2.0.1", - "run-time-error-cjs": "1.4.0", - "safe-stable-stringify": "2.4.3", - "typescript-optional": "2.0.1" - }, - "devDependencies": { - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/http-errors": "2.0.2", - "node-mocks-http": "1.14.0", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-core.web.umd.min.js", - "mainMinified": "dist/cactus-core.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-core/src/main/typescript/consensus-has-transaction-finality.ts b/packages/cactus-core/src/main/typescript/consensus-has-transaction-finality.ts deleted file mode 100644 index f9f2d9a29a..0000000000 --- a/packages/cactus-core/src/main/typescript/consensus-has-transaction-finality.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { - ConsensusAlgorithmFamily, - ConsensusAlgorithmFamiliesWithTxFinality, - ConsensusAlgorithmFamiliesWithOutTxFinality, -} from "@hyperledger/cactus-core-api"; - -import { BadRequestError } from "http-errors-enhanced-cjs"; - -export function consensusHasTransactionFinality( - consensusAlgorithmFamily: ConsensusAlgorithmFamily, -): boolean { - const woTxFinalityValues = Object.values( - ConsensusAlgorithmFamiliesWithOutTxFinality, - ); - const withTxFinalityValues = Object.values( - ConsensusAlgorithmFamiliesWithTxFinality, - ); - - const acceptedValues = [...woTxFinalityValues, ...withTxFinalityValues]; - const acceptedValuesCsv = acceptedValues.join(","); - - const isInConsensusAlgorithmFamiliesWithTxFinality = ( - Object.values(ConsensusAlgorithmFamiliesWithTxFinality) as string[] - ).includes(consensusAlgorithmFamily.toString()); - - const isInConsensusAlgorithmFamiliesWithOutTxFinality = ( - Object.values(ConsensusAlgorithmFamiliesWithOutTxFinality) as string[] - ).includes(consensusAlgorithmFamily.toString()); - - const unrecognizedConsensusAlgorithmFamily = - !isInConsensusAlgorithmFamiliesWithTxFinality && - !isInConsensusAlgorithmFamiliesWithOutTxFinality; - - if (unrecognizedConsensusAlgorithmFamily) { - throw new BadRequestError( - `Unrecognized consensus algorithm family: ${consensusAlgorithmFamily}`, - { - acceptedValuesCsv, - }, - ); - } - return isInConsensusAlgorithmFamiliesWithTxFinality; -} diff --git a/packages/cactus-core/src/main/typescript/consortium-repository.ts b/packages/cactus-core/src/main/typescript/consortium-repository.ts deleted file mode 100644 index 092342b272..0000000000 --- a/packages/cactus-core/src/main/typescript/consortium-repository.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { CactusNode, ConsortiumDatabase } from "@hyperledger/cactus-core-api"; - -export interface IConsortiumRepositoryOptions { - logLevel?: LogLevelDesc; - db: ConsortiumDatabase; -} - -/** - * Class responsible for making it convenient for developers to query the - * `ConsortiumDatabase` model type which is a flat data structure storing - * all the different types of entities for Consortium representation such as - * `CactusNode`, `ConsortiumMember`, `Ledger` etc.. - */ -export class ConsortiumRepository { - public static readonly CLASS_NAME = "ConsortiumRepository"; - - private readonly log: Logger; - private readonly db: ConsortiumDatabase; - - public get className(): string { - return ConsortiumRepository.CLASS_NAME; - } - - constructor(public readonly options: IConsortiumRepositoryOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.db, `${fnTag} arg options.db`); - Checks.truthy(options.db.cactusNode, `${fnTag} arg options.db.cactusNode`); - this.db = options.db; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get consortiumDatabase(): ConsortiumDatabase { - return this.options.db; - } - - public get allNodes(): CactusNode[] { - return this.options.db.cactusNode; - } - - /** - * Queries the complete list of nodes within the consortium to obtain a sub- - * set of `CactusNode`s which are connected to a `Ledger` with the given - * `ledgerId`. - * @param ledgerId The ID of the ledger to filter nodes based on. - * @throws {Error} If `ledgerId` is falsy or blank. - */ - public nodesWithLedger(ledgerId: string): CactusNode[] { - const fnTag = `${this.className}#nodesWithLedger()`; - Checks.nonBlankString(ledgerId, `${fnTag}:ledgerId`); - - return this.allNodes.filter((cn) => cn.ledgerIds.includes(ledgerId)); - } -} diff --git a/packages/cactus-core/src/main/typescript/index.ts b/packages/cactus-core/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-core/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-core/src/main/typescript/index.web.ts b/packages/cactus-core/src/main/typescript/index.web.ts deleted file mode 100755 index 9a8dc78e58..0000000000 --- a/packages/cactus-core/src/main/typescript/index.web.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { - ConsortiumRepository, - IConsortiumRepositoryOptions, -} from "./consortium-repository"; diff --git a/packages/cactus-core/src/main/typescript/plugin-registry.ts b/packages/cactus-core/src/main/typescript/plugin-registry.ts deleted file mode 100644 index f4059205b2..0000000000 --- a/packages/cactus-core/src/main/typescript/plugin-registry.ts +++ /dev/null @@ -1,160 +0,0 @@ -import { Optional } from "typescript-optional"; -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - ICactusPlugin, - IPluginKeychain, - isICactusPlugin, - isIPluginKeychain, -} from "@hyperledger/cactus-core-api"; - -/** - * This interface describes the constructor options object that can be used to provide configuration parameters to - * the `PluginRegistry` class instances. - */ -export interface IPluginRegistryOptions { - logLevel?: LogLevelDesc; - plugins?: ICactusPlugin[]; -} - -/** - * The plugin registry exists so that plugins can use other plugins as their dependencies in a convenient way where - * we can pass around the plugin registry itself as a simplified and not overly opinionated inversion of control - * container. - * Did consider using libraries made for this specific purpose but they are quite heavy handed and usually require - * decorators on classes. Also, they do not work with interfaces so we also intend to avoid being forced to use actual - * classes in place of the interfaces currently describing the plugin architecture. - */ -export class PluginRegistry { - public static readonly CLASS_NAME = "PluginRegistry"; - public readonly plugins: ICactusPlugin[]; - public readonly log: Logger; - - public get className(): string { - return PluginRegistry.CLASS_NAME; - } - - constructor(public readonly options: IPluginRegistryOptions = {}) { - const fnTag = `PluginRegistry#constructor()`; - if (!options) { - throw new TypeError(`${fnTag} options falsy`); - } - if (options.plugins && !Array.isArray(options.plugins)) { - throw new TypeError(`${fnTag} options.plugins truthy but non-Array`); - } - this.plugins = options.plugins || []; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Instantiated ${this.className} OK`); - } - - public getPlugins(): ICactusPlugin[] { - return this.plugins; - } - - /** - * Same as `findOneById()` but throws instead of returning an `EMPTY` `Optional` - * when the plugin does not exist in the registry. - * - * @param instanceId The `instanceId` of the plugin that you are looking to obtain an instance of from the registry. - * @throws If there is no plugin in the registry by the `instanceId` specificed. - */ - public getOneById(instanceId: string): T { - Checks.nonBlankString(instanceId, "instanceId"); - return this.findOneById(instanceId).orElseThrow( - () => new Error(`Plugin ${instanceId} not present in registry`), - ) as T; - } - - public findOneById(instanceId: string): Optional { - Checks.nonBlankString(instanceId, "instanceId"); - const plugin = this.getPlugins().find( - (p) => p.getInstanceId() === instanceId, - ); - return Optional.ofNullable(plugin as T); - } - - /** - * The main difference between this method and `findOneByPackageName` is that this throws an Error if there was nothing to - * return. It is recommended to use this method over `findOneByPackageName` if you have a hard dependency on a certain - * plugin being loaded for your code. - * - * @param packageName The package name of the plugin that you are looking to obtain an instance of from the registry. - * @throws If there is no plugin in the registry by the package name specificed. - */ - public getOneByPackageName(packageName: string): T { - return this.findOneByPackageName(packageName).orElseThrow( - () => new Error(`Plugin ${packageName} not present in registry`), - ) as T; - } - - public findOneByPackageName( - packageName: string, - ): Optional { - const plugin = this.getPlugins().find( - (p) => p.getPackageName() === packageName, - ); - return Optional.ofNullable(plugin as T); - } - - public findManyByPackageName( - packageName: string, - ): T[] { - return this.getPlugins().filter( - (p) => p.getPackageName() === packageName, - ) as T[]; - } - - public findOneByKeychainId(keychainId: string): T { - const fnTag = "PluginRegistry#findOneByKeychainId()"; - if (typeof keychainId !== "string" || keychainId.trim().length < 1) { - throw new Error(`${fnTag} need keychainId arg as non-blank string.`); - } - - const plugin = this.plugins - .filter((p) => isIPluginKeychain(p)) - .find((p) => (p as IPluginKeychain).getKeychainId() === keychainId); - - return Optional.ofNullable(plugin as T).orElseThrow( - () => new Error(`${fnTag} No keychain found for ID ${keychainId}`), - ); - } - - public hasByPackageName(packageName: string): boolean { - return this.findOneByPackageName(packageName).isPresent(); - } - - public deleteByPackageName(packageName: string): [number] { - let deleteCount = 0; - this.plugins.forEach((p, i) => { - if (p.getPackageName() === packageName) { - this.plugins.splice(i, 1); - deleteCount++; - } - }); - return [deleteCount]; - } - - public add(plugin: ICactusPlugin, replaceOnConflict = false): [number] { - if (!isICactusPlugin(plugin)) { - throw new Error(`PluginRegistry#add() plugin not an ICactusPlugin`); - } - const pkgName = plugin.getPackageName(); - const hasConfclit = this.hasByPackageName(pkgName); - if (hasConfclit && !replaceOnConflict) { - throw new Error(`PluginRegistry#add() already have plugin: ${pkgName}`); - } - let deleteCount = 0; - if (replaceOnConflict) { - [deleteCount] = this.deleteByPackageName(plugin.getPackageName()); - } - this.getPlugins().push(plugin); - return [deleteCount]; - } -} diff --git a/packages/cactus-core/src/main/typescript/public-api.ts b/packages/cactus-core/src/main/typescript/public-api.ts deleted file mode 100755 index c0a833fb24..0000000000 --- a/packages/cactus-core/src/main/typescript/public-api.ts +++ /dev/null @@ -1,31 +0,0 @@ -export { registerWebServiceEndpoint } from "./web-services/register-web-service-endpoint"; -export { IPluginRegistryOptions, PluginRegistry } from "./plugin-registry"; -export { - ConsortiumRepository, - IConsortiumRepositoryOptions, -} from "./consortium-repository"; - -export { - AuthorizationOptionsProvider, - IEndpointAuthzOptionsProviderOptions, -} from "./web-services/authorization-options-provider"; - -export { consensusHasTransactionFinality } from "./consensus-has-transaction-finality"; - -export { IInstallOpenapiValidationMiddlewareRequest } from "./web-services/install-open-api-validator-middleware"; -export { installOpenapiValidationMiddleware } from "./web-services/install-open-api-validator-middleware"; -export { - GetOpenApiSpecV1EndpointBase, - IGetOpenApiSpecV1EndpointBaseOptions, -} from "./web-services/get-open-api-spec-v1-endpoint-base"; - -export { - IHandleRestEndpointExceptionOptions, - handleRestEndpointException, -} from "./web-services/handle-rest-endpoint-exception"; - -export { stringifyBigIntReplacer } from "./web-services/stringify-big-int-replacer"; - -export { IConfigureExpressAppContext } from "./web-services/configure-express-app-base"; -export { configureExpressAppBase } from "./web-services/configure-express-app-base"; -export { CACTI_CORE_CONFIGURE_EXPRESS_APP_BASE_MARKER } from "./web-services/configure-express-app-base"; diff --git a/packages/cactus-core/src/main/typescript/web-services/authorization-options-provider.ts b/packages/cactus-core/src/main/typescript/web-services/authorization-options-provider.ts deleted file mode 100644 index 46614376f7..0000000000 --- a/packages/cactus-core/src/main/typescript/web-services/authorization-options-provider.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { IAsyncProvider } from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - isIEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -export interface IEndpointAuthzOptionsProviderOptions { - logLevel?: LogLevelDesc; - authorizationOptions: IEndpointAuthzOptions; -} - -export class AuthorizationOptionsProvider - implements IAsyncProvider -{ - public static readonly CLASS_NAME = "AuthorizationOptionsProvider"; - - private readonly authorizationOptions: IEndpointAuthzOptions; - private readonly log: Logger; - - public static of( - authorizationOptions: IEndpointAuthzOptions, - logLevel?: LogLevelDesc, - ): AuthorizationOptionsProvider { - return new AuthorizationOptionsProvider({ - logLevel, - authorizationOptions, - }); - } - - public get className(): string { - return AuthorizationOptionsProvider.CLASS_NAME; - } - - constructor(public readonly options: IEndpointAuthzOptionsProviderOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - this.authorizationOptions = options.authorizationOptions; - Checks.truthy( - isIEndpointAuthzOptions(this.authorizationOptions), - `${fnTag} authorizationOptions invalid format`, - ); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Created instance of ${this.className} OK`); - } - - async get(): Promise { - return this.authorizationOptions; - } -} diff --git a/packages/cactus-core/src/main/typescript/web-services/configure-express-app-base.ts b/packages/cactus-core/src/main/typescript/web-services/configure-express-app-base.ts deleted file mode 100644 index 79b3a047a3..0000000000 --- a/packages/cactus-core/src/main/typescript/web-services/configure-express-app-base.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { Express } from "express"; -import bodyParser, { OptionsJson } from "body-parser"; - -import { - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { stringifyBigIntReplacer } from "./stringify-big-int-replacer"; - -export const CACTI_CORE_CONFIGURE_EXPRESS_APP_BASE_MARKER = - "CACTI_CORE_CONFIGURE_EXPRESS_APP_BASE_MARKER"; - -/** - * Implementations of this interface are objects who represent a valid execution - * context for the `configureExpressAppBase()` utility function. - * - * @see {configureExpressAppBase} - * @see {ApiServer} - */ -export interface IConfigureExpressAppContext { - readonly logLevel?: LogLevelDesc; - readonly app: Express; - readonly bodyParserJsonOpts?: OptionsJson; -} - -/** - * Configures the base functionalities for an Express.js application. - * - * The main purpose of this function is to have a reusable implementation - * of the base setup logic that the API server does. For test cases of - * plugins we can't directly import the API server because it would cause - * circular dependencies in the mono-repo that usually ends up causing mayhem - * with the build in general and also with the architecture longer term. - * - * So, with this function being here in the core package it makes it easy - * to reuse by both plugin test cases and also the API server itself. - * - * The logic here is kept very small because the order of the ExpressJS - * middleware handler's matters a lot and if you mix up the order then - * new bugs can appear. - * - * @param ctx The context object holding information about the log level - * that the caller wants and the ExpressJS instance itself which is to be - * configured. - * - * @throws {Error} If any of the required context properties are missing. - */ -export async function configureExpressAppBase( - ctx: IConfigureExpressAppContext, -): Promise { - const fn = "configureExpressAppBase()"; - Checks.truthy(ctx, `${fn} arg1 ctx`); - Checks.truthy(ctx.app, `${fn} arg1 ctx.app`); - Checks.truthy(ctx.app.use, `${fn} arg1 ctx.app.use`); - - const logLevel: LogLevelDesc = ctx.logLevel || "WARN"; - - const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: fn, - }); - - log.debug("ENTRY"); - - const didRun = ctx.app.get(CACTI_CORE_CONFIGURE_EXPRESS_APP_BASE_MARKER); - if (didRun) { - const duplicateConfigurationAttemptErrorMsg = - `Already configured this express instance before. Check the ` + - `configuration variable of the ExpressJS instance under the key ` + - `"CACTI_CORE_CONFIGURE_EXPRESS_APP_BASE_MARKER" to determine if an ` + - `instance has already been `; - throw new Error(duplicateConfigurationAttemptErrorMsg); - } - - const bodyParserJsonOpts: OptionsJson = ctx.bodyParserJsonOpts || { - limit: "50mb", - }; - log.debug("body-parser middleware opts: %o", bodyParserJsonOpts); - - const bodyParserMiddleware = bodyParser.json(bodyParserJsonOpts); - ctx.app.use(bodyParserMiddleware); - - // Add custom replacer to handle bigint responses correctly - ctx.app.set("json replacer", stringifyBigIntReplacer); - - ctx.app.set(CACTI_CORE_CONFIGURE_EXPRESS_APP_BASE_MARKER, true); - - log.debug("EXIT"); -} diff --git a/packages/cactus-core/src/main/typescript/web-services/get-open-api-spec-v1-endpoint-base.ts b/packages/cactus-core/src/main/typescript/web-services/get-open-api-spec-v1-endpoint-base.ts deleted file mode 100644 index 0a699ca6df..0000000000 --- a/packages/cactus-core/src/main/typescript/web-services/get-open-api-spec-v1-endpoint-base.ts +++ /dev/null @@ -1,187 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { PluginRegistry } from "../plugin-registry"; - -import { registerWebServiceEndpoint } from "./register-web-service-endpoint"; -import { handleRestEndpointException } from "./handle-rest-endpoint-exception"; - -export interface IGetOpenApiSpecV1EndpointBaseOptions { - logLevel?: LogLevelDesc; - pluginRegistry: PluginRegistry; - oasPath: P; - oas: S; - path: string; - verbLowerCase: string; - operationId: string; -} - -/** - * A generic base class that plugins can re-use to implement their own endpoints - * which are returning their own OpenAPI specification documents with much less - * boilerplate than otherwise would be needed. - * - * As an example, you can implement a sub-class like this: - * - * ```typescript - * import { - * GetOpenApiSpecV1EndpointBase, - * IGetOpenApiSpecV1EndpointBaseOptions, - * } from "@hyperledger/cactus-core"; - * - * import { Checks, LogLevelDesc } from "@hyperledger/cactus-common"; - * import { IWebServiceEndpoint } from "@hyperledger/cactus-core-api"; - * - * import OAS from "../../json/openapi.json"; - * - * export const OasPathGetOpenApiSpecV1 = - * OAS.paths[ - * "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec" - * ]; - * - * export type OasPathTypeGetOpenApiSpecV1 = typeof OasPathGetOpenApiSpecV1; - * - * export interface IGetOpenApiSpecV1EndpointOptions - * extends IGetOpenApiSpecV1EndpointBaseOptions< - * typeof OAS, - * OasPathTypeGetOpenApiSpecV1 - * > { - * readonly logLevel?: LogLevelDesc; - * } - * - * export class GetOpenApiSpecV1Endpoint - * extends GetOpenApiSpecV1EndpointBase - * implements IWebServiceEndpoint - * { - * public get className(): string { - * return GetOpenApiSpecV1Endpoint.CLASS_NAME; - * } - * - * constructor(public readonly options: IGetOpenApiSpecV1EndpointOptions) { - * super(options); - * const fnTag = `${this.className}#constructor()`; - * Checks.truthy(options, `${fnTag} arg options`); - * } - * } - * - * ``` - * - * The above code will also need you to update your openapi.json spec file by - * adding a new endpoint matching it (if you skip this step the compiler should - * complain about missing paths) - * - * ```json - * "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec": { - * "get": { - * "x-hyperledger-cacti": { - * "http": { - * "verbLowerCase": "get", - * "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec" - * } - * }, - * "operationId": "getOpenApiSpecV1", - * "summary": "Retrieves the .json file that contains the OpenAPI specification for the plugin.", - * "parameters": [], - * "responses": { - * "200": { - * "description": "OK", - * "content": { - * "application/json": { - * "schema": { - * "type": "string" - * } - * } - * } - * } - * } - * } - * }, - * ``` - */ -export class GetOpenApiSpecV1EndpointBase implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetOpenApiSpecV1EndpointBase"; - - protected readonly log: Logger; - - public get className(): string { - return GetOpenApiSpecV1EndpointBase.CLASS_NAME; - } - - constructor( - public readonly opts: IGetOpenApiSpecV1EndpointBaseOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.pluginRegistry, `${fnTag} arg options.pluginRegistry`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): P { - return this.opts.oasPath; - } - - public getPath(): string { - return this.opts.path; - } - - public getVerbLowerCase(): string { - return this.opts.verbLowerCase; - } - - public getOperationId(): string { - return this.opts.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - const reqMeta = `${verbUpper} ${this.getPath()}`; - this.log.debug(reqMeta); - - try { - const { oas } = this.opts; - res.status(200); - res.json(oas); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqMeta}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-core/src/main/typescript/web-services/handle-rest-endpoint-exception.ts b/packages/cactus-core/src/main/typescript/web-services/handle-rest-endpoint-exception.ts deleted file mode 100644 index 522de3454f..0000000000 --- a/packages/cactus-core/src/main/typescript/web-services/handle-rest-endpoint-exception.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { Response } from "express"; -import createHttpError from "http-errors"; - -import { - identifierByCodes, - INTERNAL_SERVER_ERROR, -} from "http-errors-enhanced-cjs"; - -import { - Logger, - createRuntimeErrorWithCause, - safeStringifyException, -} from "@hyperledger/cactus-common"; - -/** - * An interface describing the object containing the contextual information needed by the - * `#handleRestEndpointException()` method to perform its duties. - * - * @param ctx - An object containing options for handling the REST endpoint exception. - * @param ctx.errorMsg - The error message to log (if there will be error logging e.g. HTTP 500) - * @param ctx.log - The logger instance used for logging errors and/or debug messages. - * @param ctx.error - The error object representing the exception that is being handled. - * @param ctx.res - The Express response object to send the HTTP response. - */ -export interface IHandleRestEndpointExceptionOptions { - readonly errorMsg: string; - readonly log: Logger; - readonly error: unknown; - readonly res: Response; -} - -/** - * Handles exceptions thrown during REST endpoint processing and sends an appropriate HTTP response. - * - * If the exception is an instance of `HttpError` from the `http-errors` library, - * it logs the error at the debug level and sends a JSON response with the error details - * and the corresponding HTTP status code. - * - * If the exception is not an instance of `HttpError`, it logs the error at the error level, - * creates a runtime error with the original error as the cause, and sends a JSON response - * with a generic "Internal Server Error" message and a 500 HTTP status code. - * - * @param ctx - An object containing options for handling the REST endpoint exception. - */ -export async function handleRestEndpointException( - ctx: Readonly, -): Promise { - const errorAsSanitizedJson = safeStringifyException(ctx.error); - - if (createHttpError.isHttpError(ctx.error)) { - ctx.res.status(ctx.error.statusCode); - - // Log either an error or a debug message depending on what the statusCode is - // For 5xx errors we treat it as a production bug that needs to be fixed on - // our side and for everything else we treat it a user error and debug log it. - if (ctx.error.statusCode >= INTERNAL_SERVER_ERROR) { - ctx.log.debug(ctx.errorMsg, errorAsSanitizedJson); - } else { - ctx.log.error(ctx.errorMsg, errorAsSanitizedJson); - } - - // If the `expose` property is set to true it implies that we can safely - // expose the contents of the exception to the calling client. - if (ctx.error.expose) { - ctx.res.json({ - message: identifierByCodes[ctx.error.statusCode], - error: errorAsSanitizedJson, - }); - } - } else { - // If the exception was not an http-error then we assume it was an internal - // error (e.g. same behavior as if we had received an HTTP 500 statusCode) - ctx.log.error(ctx.errorMsg, errorAsSanitizedJson); - - const rex = createRuntimeErrorWithCause(ctx.errorMsg, ctx.error); - const sanitizedJsonRex = safeStringifyException(rex); - - ctx.res.status(INTERNAL_SERVER_ERROR).json({ - message: identifierByCodes[INTERNAL_SERVER_ERROR], - error: sanitizedJsonRex, - }); - } -} diff --git a/packages/cactus-core/src/main/typescript/web-services/install-open-api-validator-middleware.ts b/packages/cactus-core/src/main/typescript/web-services/install-open-api-validator-middleware.ts deleted file mode 100644 index bc9a41da37..0000000000 --- a/packages/cactus-core/src/main/typescript/web-services/install-open-api-validator-middleware.ts +++ /dev/null @@ -1,118 +0,0 @@ -import type { Application, NextFunction, Request, Response } from "express"; -import * as OpenApiValidator from "express-openapi-validator"; -import { OpenAPIV3 } from "express-openapi-validator/dist/framework/types"; - -import { error as EovErrors } from "express-openapi-validator"; - -import { - Checks, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -export interface IInstallOpenapiValidationMiddlewareRequest { - readonly logLevel: LogLevelDesc; - readonly app: Application; - readonly apiSpec: unknown; -} - -/** - * Installs the middleware that validates openapi specifications - * @param app - * @param pluginOAS - */ -export async function installOpenapiValidationMiddleware( - req: IInstallOpenapiValidationMiddlewareRequest, -): Promise { - const fnTag = "installOpenapiValidationMiddleware"; - Checks.truthy(req, `${fnTag} req`); - Checks.truthy(req.apiSpec, `${fnTag} req.apiSpec`); - Checks.truthy(req.app, `${fnTag} req.app`); - const { app, apiSpec, logLevel } = req; - const log = LoggerProvider.getOrCreate({ - label: fnTag, - level: logLevel || "INFO", - }); - log.debug(`Installing validation for OpenAPI specs: `, apiSpec); - - const paths = Object.keys((apiSpec as any).paths); - log.debug(`Paths to be ignored: `, paths); - - app.use( - OpenApiValidator.middleware({ - apiSpec: apiSpec as OpenAPIV3.Document, - validateApiSpec: false, - $refParser: { - mode: "dereference", - }, - ignorePaths: (path: string) => !paths.includes(path), - }), - ); - app.use( - ( - err: { - status?: number; - errors: [ - { - path: string; - message: string; - errorCode: string; - }, - ]; - }, - req: Request, - res: Response, - next: NextFunction, - ) => { - const tag = "[express-openapi-validator-middleware-handler]"; - if (isOpenApiRequestValidationError(err)) { - if (err.status) { - const { errors, status } = err; - log.debug("%s Got valid error, status=%s - %o", tag, status, errors); - res.status(err.status); - res.send(err.errors); - } else { - log.debug("%s Got invalid error - status missing - %o", tag, err); - res.status(500); - res.send(err); - } - } else if (err) { - log.debug("%s Got invalid error - validator crash(?) - %o", tag, err); - res.status(500); - res.send(err); - } else { - log.debug("%s Validation Passed OK - %s", tag, req.url); - next(); - } - }, - ); -} - -/** - * Determines if an error object is an instance of one of the types that are - * designed to be thrown by the "express-openapi-validator" package specifically - * when it finds issues it is designed to find. - * - * In other words, we are detecting if the error was thrown intentionally or if - * the validator had just crashed because of some other issue such as when the - * Open API spec file is invalid. - * - * To give an example to the above, the "properties" key in one of the specs - * was being assigned a string value but according to the meta schema (the - * schema of the Open API spec documents themselves) the "properties" property - * must be defined as an object that lists the properties of a schema element. - * - * The above mistake made by the person who wrote the Open API spec in question - * was causing the "express-openapi-validator" package to crash, throwing errors - * but different ones from the ones that it is "expected" to throw and we could - * not detect this at the time and hence this function was made so that in the - * future, debugging these kind of errors are much easier and can be done based - * on the logs alone (hopefully). - */ -export function isOpenApiRequestValidationError(ex: unknown): boolean { - if (ex) { - return Object.values(EovErrors).some((x) => ex instanceof x); - } else { - return false; - } -} diff --git a/packages/cactus-core/src/main/typescript/web-services/register-web-service-endpoint.ts b/packages/cactus-core/src/main/typescript/web-services/register-web-service-endpoint.ts deleted file mode 100644 index 6771175400..0000000000 --- a/packages/cactus-core/src/main/typescript/web-services/register-web-service-endpoint.ts +++ /dev/null @@ -1,49 +0,0 @@ -import expressJwtAuthz, { AuthzOptions } from "express-jwt-authz"; -import { Express } from "express"; - -import { IWebServiceEndpoint } from "@hyperledger/cactus-core-api"; - -import { createRuntimeErrorWithCause } from "@hyperledger/cactus-common"; - -/** - * Hooks up an endpoint instance to an ExpressJS web app object. - * - * @param webApp The ExpressJS application object that `endpoint` will be registered with. - * @param endpoint The `IWebServiceEndpoint` instance that will be registered. - */ -export async function registerWebServiceEndpoint( - webApp: Express, - endpoint: IWebServiceEndpoint, -): Promise { - const fnTag = "registerWebServiceEndpoint"; - const httpVerb = endpoint.getVerbLowerCase(); - const httpPath = endpoint.getPath(); - const requestHandler = endpoint.getExpressRequestHandler(); - - const provider = endpoint.getAuthorizationOptionsProvider(); - const { isProtected, requiredRoles } = await provider.get(); - - const webAppCasted = webApp as unknown as Record< - string, - (...a: unknown[]) => unknown - >; - - const registrationMethod = webAppCasted[httpVerb].bind(webApp); - try { - if (isProtected) { - const opts: AuthzOptions = { - failWithError: true, - customScopeKey: "scope", - customUserKey: "auth", - checkAllScopes: true, - }; - const scopeCheckMiddleware = expressJwtAuthz(requiredRoles, opts); - registrationMethod(httpPath, scopeCheckMiddleware, requestHandler); - } else { - registrationMethod(httpPath, requestHandler); - } - } catch (ex: unknown) { - const errorMessage = `${fnTag} Express verb method ${httpVerb} threw while registering endpoint on path ${httpPath}`; - throw createRuntimeErrorWithCause(errorMessage, ex); - } -} diff --git a/packages/cactus-core/src/main/typescript/web-services/stringify-big-int-replacer.ts b/packages/cactus-core/src/main/typescript/web-services/stringify-big-int-replacer.ts deleted file mode 100644 index ff77ddbffc..0000000000 --- a/packages/cactus-core/src/main/typescript/web-services/stringify-big-int-replacer.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * `JSON.stringify` replacer function to handle BigInt. - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json - */ -export function stringifyBigIntReplacer( - _key: string, - value: bigint | unknown, -): string | unknown { - if (typeof value === "bigint") { - return value.toString(); - } - return value; -} diff --git a/packages/cactus-core/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-core/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-core/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-core/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-core/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-core/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-core/src/test/typescript/unit/handle-rest-endpoint-exception.test.ts b/packages/cactus-core/src/test/typescript/unit/handle-rest-endpoint-exception.test.ts deleted file mode 100644 index d9ed2e3f6c..0000000000 --- a/packages/cactus-core/src/test/typescript/unit/handle-rest-endpoint-exception.test.ts +++ /dev/null @@ -1,221 +0,0 @@ -import "jest-extended"; -import createHttpError from "http-errors"; -import { createResponse } from "node-mocks-http"; - -import { safeStringifyException } from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - IHandleRestEndpointExceptionOptions, -} from "../../../main/typescript/public-api"; // replace with the correct path to your module - -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { - identifierByCodes, - INTERNAL_SERVER_ERROR, -} from "http-errors-enhanced-cjs"; - -// Since we are testing error handling, lots of false positive error logs appear -// that are hard to untangle/confusing when reading the test log output. -// The SILENT level suppresses these. -const log = LoggerProvider.getOrCreate({ - label: "handle-rest-endpoint-exception.test.ts", - level: "SILENT", -}); - -describe("handleRestEndpointException", () => { - afterEach(() => { - jest.clearAllMocks(); - }); - - it("should handle HttpError with statusCode gte 500", async () => { - const mockResponse = createResponse(); - - const rootCauseErrorMsg = "Root Cause Exception that should cause gte 500"; - const rootError = new Error(rootCauseErrorMsg); - - const reThrowErrorMsg = - "Message of the Re-thrown Exception that should have some context for debugging on top of the information already available in the rootCauseErrorMsg."; - - const ctx: IHandleRestEndpointExceptionOptions = { - errorMsg: reThrowErrorMsg, - log: jest.mocked(log), // Provide a mock logger if needed - error: rootError, // Provide appropriate error objects for testing - res: mockResponse, - }; - - const spyLog = jest.spyOn(ctx.log, "error"); - const spyStatus = jest.spyOn(mockResponse, "status"); - const spyJson = jest.spyOn(mockResponse, "json"); - - await handleRestEndpointException(ctx); - - expect(spyStatus).toHaveBeenCalledWith(500); - - expect(spyLog).toHaveBeenCalledWith( - ctx.errorMsg, - safeStringifyException(rootError), - ); - - expect(spyJson).toHaveBeenCalledWith( - expect.objectContaining({ - message: expect.stringMatching( - identifierByCodes[INTERNAL_SERVER_ERROR], - ), - error: expect.stringContaining(reThrowErrorMsg), - }), - ); - - expect(spyJson).toHaveBeenCalledWith( - expect.objectContaining({ - message: expect.stringMatching( - identifierByCodes[INTERNAL_SERVER_ERROR], - ), - error: expect.stringContaining(rootCauseErrorMsg), - }), - ); - }); - - it("should handle HttpError with statusCode < 500", async () => { - const mockResponse = createResponse(); - - const rootErrorStr = "Test HTTP 404 error"; - const mockHttpError = createHttpError(404, rootErrorStr, { - expose: true, - }); - - const ctx: IHandleRestEndpointExceptionOptions = { - errorMsg: "Test error message", - log: jest.mocked(log), // Provide a mock logger if needed - error: mockHttpError, // Provide appropriate error objects for testing - res: mockResponse, - }; - - const errorAsSanitizedJson = safeStringifyException(mockHttpError); - const spyLogError = jest.spyOn(ctx.log, "error"); - const spyStatus = jest.spyOn(mockResponse, "status"); - const spyJson = jest.spyOn(mockResponse, "json"); - - await handleRestEndpointException(ctx); - - expect(spyStatus).toHaveBeenCalledWith(404); - - expect(spyLogError).toHaveBeenCalledWith( - ctx.errorMsg, - errorAsSanitizedJson, - ); - - expect(spyJson).toHaveBeenCalledWith({ - message: "NotFound", - error: errorAsSanitizedJson, - }); - }); - - it("should handle non-HttpError", async () => { - const mockResponse = createResponse(); - const mockError = new Error("An unexpected exception. Ha!"); - - const ctx: IHandleRestEndpointExceptionOptions = { - errorMsg: "Test error message", - log: jest.mocked(log), // Provide a mock logger if needed - error: mockError, - res: mockResponse, - }; - - const mockErrorJson = safeStringifyException(mockError); - const spyLoggerFn = jest.spyOn(ctx.log, "error"); - const spyStatus = jest.spyOn(mockResponse, "status"); - const spyJson = jest.spyOn(mockResponse, "json"); - - await handleRestEndpointException(ctx); - - expect(spyStatus).toHaveBeenCalledWith(500); - expect(spyLoggerFn).toHaveBeenCalledWith(ctx.errorMsg, mockErrorJson); - expect(spyJson).toHaveBeenCalledOnce(); - - const mostRecentCall = spyJson.mock.lastCall; - expect(mostRecentCall).toBeTruthy(); - - expect(mostRecentCall?.[0].message).toBeString(); - expect(mostRecentCall?.[0].message).toEqual("InternalServerError"); - expect(mostRecentCall?.[0].error).toMatch( - /RuntimeError: Test error message(.*)An unexpected exception. Ha!/, - ); - }); - - it("should escape malicious payloads in exception messages", async () => { - const mockResponse = createResponse(); - - const dummyXssPayload = ``; - const mockError = new Error(dummyXssPayload); - - const ctx: IHandleRestEndpointExceptionOptions = { - errorMsg: "Test error message", - log: jest.mocked(log), // Provide a mock logger if needed - error: mockError, - res: mockResponse, - }; - - const mockErrorJson = safeStringifyException(mockError); - const spyLoggerFn = jest.spyOn(ctx.log, "error"); - const spyStatus = jest.spyOn(mockResponse, "status"); - const spyJson = jest.spyOn(mockResponse, "json"); - - await handleRestEndpointException(ctx); - - expect(spyStatus).toHaveBeenCalledWith(500); - - expect(spyLoggerFn).toHaveBeenCalledWith(ctx.errorMsg, mockErrorJson); - - expect(spyJson).toHaveBeenCalledOnce(); - - const mostRecentCall = spyJson.mock.lastCall; - expect(mostRecentCall).toBeTruthy(); - - expect(mostRecentCall?.[0].message).toBeString(); - expect(mostRecentCall?.[0].message).toEqual("InternalServerError"); - expect(mostRecentCall?.[0].error).toMatch( - /RuntimeError: Test error message(.*)/, - ); - expect(mostRecentCall?.[0].error).not.toMatch( - /.*stealAndUploadPrivateKeys.*/, - ); - }); - - it("should escape malicious payloads in strings thrown", async () => { - const mockResponse = createResponse(); - - const dummyXssPayload = ``; - const mockError = dummyXssPayload; - - const ctx: IHandleRestEndpointExceptionOptions = { - errorMsg: "Test error message", - log: jest.mocked(log), // Provide a mock logger if needed - error: mockError, - res: mockResponse, - }; - - const mockErrorJson = safeStringifyException(mockError); - const spyLoggerFn = jest.spyOn(ctx.log, "error"); - const spyStatus = jest.spyOn(mockResponse, "status"); - const spyJson = jest.spyOn(mockResponse, "json"); - - await handleRestEndpointException(ctx); - - expect(spyStatus).toHaveBeenCalledWith(500); - expect(spyLoggerFn).toHaveBeenCalledWith(ctx.errorMsg, mockErrorJson); - expect(spyJson).toHaveBeenCalledOnce(); - - const mostRecentCall = spyJson.mock.lastCall; - expect(mostRecentCall).toBeTruthy(); - - expect(mostRecentCall?.[0].message).toBeString(); - expect(mostRecentCall?.[0].message).toEqual("InternalServerError"); - expect(mostRecentCall?.[0].error).toMatch( - /RuntimeError: Test error message(.*)/, - ); - expect(mostRecentCall?.[0].error).not.toMatch( - /.*stealAndUploadPrivateKeys.*/, - ); - }); -}); diff --git a/packages/cactus-core/src/test/typescript/unit/plugin-registry.test.ts b/packages/cactus-core/src/test/typescript/unit/plugin-registry.test.ts deleted file mode 100644 index edbbf0d530..0000000000 --- a/packages/cactus-core/src/test/typescript/unit/plugin-registry.test.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; - -import { PluginRegistry } from "../../../main/typescript/public-api"; - -import { ICactusPlugin, IPluginKeychain } from "@hyperledger/cactus-core-api"; - -describe("PluginRegistry", () => { - const keychainId = uuidv4(); - const instanceId = uuidv4(); - - const mockKeychainPlugin: IPluginKeychain = { - getInstanceId: () => instanceId, - getKeychainId: () => keychainId, - delete: async () => { - throw new Error("This is a mock. Not implemented."); - }, - has: async () => { - throw new Error("This is a mock. Not implemented."); - }, - get: async () => { - throw new Error("This is a mock. Not implemented."); - }, - set: async () => { - throw new Error("This is a mock. Not implemented."); - }, - getPackageName: () => "@hyperledger/cactus-plugin-keychain-mock", - - onPluginInit: async () => { - throw new Error("not sure how this works"); - }, - }; - - const pluginRegistry = new PluginRegistry({ - plugins: [ - mockKeychainPlugin, - { - getInstanceId: () => "some-mock-plugin-instance-id-1", - } as ICactusPlugin, - { - getInstanceId: () => "some-mock-plugin-instance-id-2", - } as ICactusPlugin, - { - getInstanceId: () => "some-mock-plugin-instance-id-3", - } as ICactusPlugin, - ], - }); - - test("findOneByKeychainId() finds plugin by keychain ID", () => { - expect(() => pluginRegistry.findOneByKeychainId(keychainId)).not.toThrow(); - const keychainPlugin = pluginRegistry.findOneByKeychainId(keychainId); - expect(keychainPlugin).toEqual(mockKeychainPlugin); - expect(() => pluginRegistry.findOneByKeychainId("")).toThrowError( - new Error( - `PluginRegistry#findOneByKeychainId() need keychainId arg as non-blank string.`, - ), - ); - expect(() => pluginRegistry.findOneByKeychainId("x")).toThrowError( - new Error( - `PluginRegistry#findOneByKeychainId() No keychain found for ID x`, - ), - ); - }); - - test("findOneById() finds plugin by its instanceID", () => { - expect(() => pluginRegistry.findOneById(instanceId)).not.toThrow(); - const keychainPlugin = pluginRegistry.findOneById(instanceId).get(); - expect(keychainPlugin).toEqual(mockKeychainPlugin); - expect(() => pluginRegistry.findOneById("")).toThrowError( - new Error(`"instanceId" is a blank string. Need non-blank.`), - ); - - expect(pluginRegistry.findOneById("x").isEmpty()).toBe(true); - }); - - test("getOneById() finds plugin by its instanceID", () => { - expect(() => pluginRegistry.getOneById(instanceId)).not.toThrow(); - const keychainPlugin = pluginRegistry.getOneById(instanceId); - expect(keychainPlugin).toEqual(mockKeychainPlugin); - expect(() => pluginRegistry.getOneById("")).toThrowError( - new Error(`"instanceId" is a blank string. Need non-blank.`), - ); - expect(() => pluginRegistry.getOneById("x")).toThrowError( - new Error("Plugin x not present in registry"), - ); - }); -}); diff --git a/packages/cactus-core/src/test/typescript/unit/web-services/configure-express-app-base.test.ts b/packages/cactus-core/src/test/typescript/unit/web-services/configure-express-app-base.test.ts deleted file mode 100644 index 05cdaea4d7..0000000000 --- a/packages/cactus-core/src/test/typescript/unit/web-services/configure-express-app-base.test.ts +++ /dev/null @@ -1,18 +0,0 @@ -import "jest-extended"; -import express from "express"; - -import { configureExpressAppBase } from "../../../../main/typescript/public-api"; - -describe("configureExpressAppBase()", () => { - test("Crashes if missing Express instance from ctx", async () => { - const invocationPromise = configureExpressAppBase({} as never); - await expect(invocationPromise).toReject(); - }); - - test("Does not crash if parameters were valid", async () => { - const app = express(); - await expect( - async () => await configureExpressAppBase({ app, logLevel: "DEBUG" }), - ).not.toThrow(); - }); -}); diff --git a/packages/cactus-core/tsconfig.json b/packages/cactus-core/tsconfig.json deleted file mode 100644 index 6f4edcd02f..0000000000 --- a/packages/cactus-core/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-core.tsbuildinfo" - }, - "include": [ - "./src" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-bungee-hermes/CHANGELOG.md b/packages/cactus-plugin-bungee-hermes/CHANGELOG.md deleted file mode 100644 index 85c205cb8a..0000000000 --- a/packages/cactus-plugin-bungee-hermes/CHANGELOG.md +++ /dev/null @@ -1,76 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-bungee-hermes - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-bungee-hermes - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-bungee-hermes - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Features - -* **bungee-hermes:** ability to use connectors without instanciating APIs ([6a71ddf](https://github.com/hyperledger/cacti/commit/6a71ddfb5568d1fc11818e225782713bfaddc6d5)) -* **fabric-connector:** add getChainInfo, improve getBlock output ([8c030ae](https://github.com/hyperledger/cacti/commit/8c030ae9e739a28ff0900f7af27ec0fbbb4b7ff9)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari -* **fabric-connector:** It accepts `type` instead of `skipDecode` flag. -- Move common block formatting logic to `cacti-block-formatters.ts`. -- Add tests for new features. Move test common to quering `qscc` to single file - to increase CI speed. - -Signed-off-by: Michal Bajer - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-bungee-hermes - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Features - -* **bungee-hermes:** new plugin bungee-hermes ([ecf52ec](https://github.com/hyperledger/cacti/commit/ecf52ecce310d626ea96a53c2d41dcb797510c4d)) -* **bungee-hermes:** process & merge views ([231a5e5](https://github.com/hyperledger/cacti/commit/231a5e532bcb8219986dd7f5c8fa4d66cef99f34)) -* **bungee-hermes:** viewProof & ethereum strategy ([22f389f](https://github.com/hyperledger/cacti/commit/22f389fc311490e5f3959b4f80e7f4caf4ac5804)) diff --git a/packages/cactus-plugin-bungee-hermes/README.md b/packages/cactus-plugin-bungee-hermes/README.md deleted file mode 100644 index 2ada98ce32..0000000000 --- a/packages/cactus-plugin-bungee-hermes/README.md +++ /dev/null @@ -1,229 +0,0 @@ -# `@hyperledger/cactus-plugin-bungee-hermes` - -The package provides `Hyperledger Cacti` a way to create blockchain snapshots and views for different distributed ledgers currently supported by Cacti. The implementation follows the paper [BUNGEE](https://dl.acm.org/doi/pdf/10.1145/3643689) (Blockchain UNifier view GEnErator). - -The plugin will allow, as suggested in the paper, "new applications built on top -of dependable blockchain interoperability, such as stakeholder-centric snapshots for audits, cross-chain analysis, blockchain -migration, and combined on-chain-off-chain analytics". - -## Summary - -- [`@hyperledger/cactus-plugin-bungee-hermes`](#hyperledgercactus-plugin-bungee-hermes) - - [Summary](#summary) - - [Getting Started](#getting-started) - - [Prerequisites](#prerequisites) - - [Architecture](#architecture) - - [BUNGEE - Hermes API](#bungee---hermes-api) - - [Running the tests](#running-the-tests) - - [Usage](#usage) - - [Contributing](#contributing) - - [License](#license) - - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project to install the dependencies execute the command: -```sh -npm run configure -``` - -Know how to use the following plugins of the project: - - - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric) - - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu) - - [cactus-plugin-ledger-connector-ethereum](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-ethereum) - - -## Architecture - -The plugin interacts with a cactus ledger connector, using strategies with custom logic for each different network. - -Note that, so far, only strategies for Fabric, Besu and Ethereum networks were implemented. Smart-contracts for Fabric and EVM based chains must implement the interface provided in the files ITraceableContract.ts and ITraceableContract.sol, in the test directory - -The plugin stands _behind_ a cacti-ledger-connector, which is used to fetch information from the ledger to create the snapshot. -```typescript -....................................... -. Cacti Node . -. . -. . -. .......... ............. . ......... -. . . . Cacti . . . . -. . BUNGEE . ---------- . Connector . -----------. _DLT . -. . . ............. . . . -. .......... . ......... -. . -. . -. . -....................................... -``` -The plugin can then serve multiple purposes, and thus serve also other plugins or apps in more complex deployment architectures (where we link bungee to other components). - -### BUNGEE - Hermes API - -This plugin uses OpenAPI to generate the API paths. -Endpoints exposed: - - - CreateViewV1 - - GetPublicKey - - GetAvailableStrategies - - VerifyMerkleRoot - - MergeViewsV1 - - ProcessViewV1 - - -## Running the tests - - **besu-test-basic.test.ts**: A test using strategy-besu and a besu connector, testing creating views for different timeframes and states. - - **ethereum-test-basic.test.ts**: A test using strategy-ethereum and a ethereum connector, testing creating views for different timeframes and states. - - **fabric-test-basic.test.ts**: A test using strategy-fabric and a fabric connector, testing creating views for different timeframes and states. - - **besu-test-pruning.test.ts**: A test using strategy-besu and a besu connector, testing creating views for specific timeframes. - - **fabric-test-pruning.test.ts**: A test using strategy-fabric and a fabric connector, testing creating views for specific timeframes. - - **bungee-api-test.test.ts**: A more complex test, using multiple strategies, connectors, and calls to bungee-hermes API. Tests new functionalities like view proof validation. - - **bungee-merge-views.test.ts**: A test using besu-strategy and connector, to demonstrate and test the mergeView functionality of bungee-hermes. - - **bungee-process-views.test.ts**: A test using besu-strategy and connector, to demonstrate and test processView functionality of the plugin. - -Tests developed using JEST testing framework. - -## Usage -Lets imagine we want bungee-hermes to create views for a besu ledger. -Let us consider a besu ledger connector, exposing its API on URL: http://localhost:4000 - - -Then we instantiate the plugin as follows: -```typescript -const pluginBungeeHermesOptions = { - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - instanceId: uuidv4(), - logLevel, -}; -const bungee = new PluginBungeeHermes(pluginBungeeHermesOptions); -``` - -We add the desired strategies: - -```typescript -bungee.addStrategy('BESU_STRATEGY', new StrategyBesu("INFO")); -``` - -Save network details for our target ledger: - -```typescript -const besuNetworkDetails: BesuNetworkDetails = { - signingCredential: besuSigningCredential, - contractName: besuContractName, - connectorApiPath: 'http://localhost:4000', - keychainId: besuKeychainPlugin.getKeychainId(), - contractAddress: besuContractAddress, - participant: accountAddress, - }; -``` - -And we can request views, after exposing the api: -```typescript -const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - bungeeServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: bungeeServer, - }; -const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; -const { address, port } = addressInfo; - -await bungee.getOrCreateWebServices(); -await bungee.registerWebServices(expressApp); -const bungeePath = `http://${address}:${port}`; - -const config = new Configuration({ basePath: bungeePath }); -const bungeeApi = new BungeeApi(config); - -const viewBesu = await bungeeApi.createViewV1({ - strategyId: 'BESU_STRATEGY', - networkDetails: besuNetworkDetails, - tI: undefined, //default to 0 (UNIX timestamp seconds) - tF: undefined, //default to Number.MAX_SAFE_INTEGER.toString() (UNIX timestamp seconds) - stateIds: undefined, //default to capture all assets - viewID: undefined, //plugin generates the id, if not given - } as CreateViewRequest); -``` - -Note that each strategy can be used to query different ledgers (ledgers of the same type, but on different locations), and BUNGEE also supports adding multiple strategies to each bungee-hermes-plugin instance. -Each strategy implements the logic to query information from each different ledger (i.e. capture set of asset states), while bungee-hermes plugin handles the snapshot and view creation. - - -We can merge views to create an IntegratedView. Integrated views are the result of merging multiple views, with or without using a privacy policy. -IntegratedViews have a map of ExtendedStates (stateId -> ExtendedState). And ExtendedState is the data gathered for a specific stateId, from different views map(viewId -> State). - -Example: -```typescript -const mergeViewsNoPolicyReq = await bungeeApi.mergeViewsV1({ - //for previously obtained views - serializedViews: [JSON.stringify(view.view), JSON.stringify(view2.view)], - //no policy. When policy is requested, take note that order of arguments matter - mergePolicy: undefined, - policyArguments: [], - }); -expect(mergeViewsNoPolicyReq.status).toBe(200); -expect(mergeViewsNoPolicyReq.data.integratedView).toBeTruthy(); -expect(mergeViewsNoPolicyReq.data.signature).toBeTruthy(); -``` - - -'View' object contains a 'viewProof'. 'viewProof' is composed by two merkle trees, one for 'stateProofs' and another for 'transactionProofs'. The analogous exists for IntegratedView objects, a merkle tree is created for all transactions and states in the IntegratedView. -One can check if the content of a view or integratedView has no inconsistencies, by querying the VerifyMerkleRoot endpoint with the appropriate input: - -```typescript - //using a previously created View object - - const stateProofs = view?.getSnapshot() - .getStateBins() - .map((x) => JSON.stringify(x.getStateProof())); - const transactionProofs: string[] = []; - view?.getAllTransactions() - .forEach((t) => transactionProofs.push(JSON.stringify(t.getProof()))), - ); - const verifyStateRoot = await bungeeApi.verifyMerkleRoot({ - input: stateProofs?.reverse(), //check integrity, order should not matter - root: proof?.statesMerkleRoot, - }); - expect(verifyStateRoot.data.result).toBeTrue(); - - const verifyTransactionsRoot = await bungeeApi.verifyMerkleRoot({ - input: transactionProofs?.reverse(), //check integrity, order should not matter - root: proof?.transactionsMerkleRoot, - }); - expect(verifyTransactionsRoot.data.result).toBeTrue(); -``` - -Lastly, we can also process views according to a privacy-policy as follows: - -```typescript -import { hideState } from "../../../main/typescript/view-creation/privacy-policies"; - -bungee.addViewPrivacyPolicy("policy1", hideState); - -const processed = await bungeeApi.processViewV1({ - serializedView: JSON.stringify({ - view: JSON.stringify(view.view as View), - signature: view.signature, - }), - policyId: "hideState", - policyArguments: [BESU_ASSET_ID], - }); -``` -This example uses the hideState policy, which takes as arguments a stateId to remove from the new view. -When we apply a policy, the old view metadata is stored in the new View for traceability. This process can be applied multiple times - - -## Contributing -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md "CONTRIBUTING.md") to get started. - -## License -This distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE "LICENSE ")file. \ No newline at end of file diff --git a/packages/cactus-plugin-bungee-hermes/openapitools.json b/packages/cactus-plugin-bungee-hermes/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-bungee-hermes/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-bungee-hermes/package.json b/packages/cactus-plugin-bungee-hermes/package.json deleted file mode 100644 index f23f5f03ae..0000000000 --- a/packages/cactus-plugin-bungee-hermes/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-bungee-hermes", - "version": "2.0.0", - "description": "Allows Cactus nodes to create DLT views using Cactus connectors", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology", - "View" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Eduardo Vasques", - "email": "eduardovasques10@tecnico.ulisboa.pt", - "url": "https://github.com/eduv09" - }, - { - "name": "Rafael Belchior", - "email": "rafael.belchior@tecnico.ulisboa.pt", - "url": "https://rafaelapb.github.io/" - }, - { - "name": "André Augusto", - "email": "andre.augusto@tecnico.ulisboa.pt", - "url": "https://github.com/AndreAugusto11" - }, - { - "name": "Carlos Amaro", - "email": "carlosrscamaro@tecnico.ulisboa.pt", - "url": "https://github.com/LordKubaya" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "pretsc": "npm run generate-sdk", - "tsc": "tsc --project ./tsconfig.json", - "watch": "npm-watch" - }, - "dependencies": { - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "axios": "1.7.7", - "body-parser": "1.20.3", - "fs-extra": "11.2.0", - "http-errors-enhanced-cjs": "2.0.1", - "key-encoder": "2.0.3", - "merkletreejs": "0.3.11", - "typescript-optional": "2.0.1", - "uuid": "10.0.0", - "web3": "1.6.1", - "web3-core": "1.6.1" - }, - "devDependencies": { - "@hyperledger/cactus-test-geth-ledger": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/body-parser": "1.19.4", - "@types/crypto-js": "4.0.1", - "@types/express": "5.0.0", - "@types/fs-extra": "11.0.4", - "@types/tape": "4.13.4", - "@types/uuid": "10.0.0", - "express": "4.21.0", - "fabric-network": "2.2.20", - "socket.io": "4.6.2" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "watch": { - "tsc": { - "patterns": [ - "src/", - "src/*/json/**/openapi*" - ], - "ignore": [ - "src/**/generated/*" - ], - "extensions": [ - "ts", - "json" - ], - "quiet": true, - "verbose": false, - "runOnChangeOnly": true - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json b/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json deleted file mode 100644 index 4cc0d3870c..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json +++ /dev/null @@ -1,477 +0,0 @@ -{ - "openapi": "3.0.3", - "servers": [ - { - "url": "http://{host}:{port}/api/v1/@hyperledger/cactus-plugin-satp-hermes", - "description": "Development server", - "variables": { - "host": { - "default": "localhost" - }, - "port": { - "default": "3000" - } - } - } - ], - "info": { - "title": "Hyperledger Cactus Plugin - BUNGEE-Hermes", - "description": "Can create blockchain views of different networks", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "PrivacyPolicyOpts": { - "description": "identifier of the policy used to process a view", - "type": "string", - "enum": ["pruneState"], - "x-enum-varnames": ["PruneState"] - }, - "MergePolicyOpts": { - "description": "identifier of the policy used to merge views (can be none)", - "type": "string", - "enum": ["pruneState", "pruneStateFromView", "NONE"], - "x-enum-varnames": ["PruneState", "PruneStateFromView", "NONE"] - }, - "CreateViewRequest": { - "type": "object", - "description": "Request object for createViewV1 endpoint", - "required": ["strategyId", "networkDetails"], - "properties": { - "stateIds": { - "type": "array", - "items": { - "type": "string", - "example": "id-of-asset-1" - }, - "example": ["id-of-asset-1", "id-of-asset-2"] - }, - "tI": { - "type": "string", - "example": "0" - }, - "tF": { - "type": "string", - "example": "999999999999" - }, - "viewID": { - "type": "string", - "example": "view-1" - }, - "strategyId": { - "type": "string", - "example": "fabric-strategy", - "nullable": false - }, - "networkDetails": { - "type": "object", - "nullable": false, - "required": ["connectorApiPath", "participant"], - "properties": { - "connectorApiPath": { - "type": "string", - "nullable": false, - "example": "http://localhost:3000" - }, - "participant": { - "type": "string", - "nullable": false, - "example": "participant-1" - } - }, - "example": { - "connectorApiPath": "http://localhost:3000", - "participant": "participant-1" - } - } - }, - "example": { - "strategyId": "fabric-strategy", - "networkDetails": { - "connectorApiPath": "http://localhost:3000", - "participant": "participant-1" - } - } - }, - "CreateViewResponse": { - "type": "object", - "description": "This is the response for a CreateViewRequest or ProcessViewRequest", - "properties": { - "view": { - "type": "string", - "example": "Object" - }, - "signature": { - "type": "string", - "example": "signature of Object" - } - }, - "example": { - "view": "Object", - "signature": "signature of Object" - } - }, - "GetPublicKeyResponse": { - "type": "object", - "description": "public key from bungee-hermes plugin instance", - "properties": { - "pubKey": { - "type": "string", - "example": "----BEGIN CERTIFICATE----random content...." - } - } - }, - "AvailableStrategiesResponse": { - "type": "array", - "description": "Array with available strategy ids", - "items": { - "type": "string", - "example": "strategy-fabric" - } - }, - "VerifyMerkleRootRequest": { - "type": "object", - "description": "Set of transaction or state proofs and merkle tree root for verification", - "properties": { - "input": { - "nullable": false, - "type": "array", - "items": { - "type": "string", - "example": "transactionProof stringified" - } - }, - "root": { - "nullable": false, - "type": "string" - } - } - }, - "VerifyMerkleRootResponse": { - "type": "object", - "description": "true or false, wether input matched provided root", - "properties": { - "result": { - "type": "boolean", - "example": "true" - } - } - }, - "MergeViewsResponse": { - "type": "object", - "description": "This is the response of a mergeViewRequest", - "properties": { - "integratedView": { - "type": "string", - "example": "Object" - }, - "signature": { - "type": "string", - "example": "signature of Object" - } - }, - "example": { - "integratedView": "Object", - "signature": "signature of Object" - } - }, - "MergeViewsRequest": { - "type": "object", - "description": "This is the input for a mergeViewRequest", - "required": ["serializedViews", "mergePolicy"], - "properties": { - "serializedViews": { - "nullable": false, - "type": "array", - "description": "Array of serialized views", - "items": { - "type": "string", - "nullable": false, - "example": "View object stringified" - } - }, - "mergePolicy": { - "$ref": "#/components/schemas/MergePolicyOpts" - }, - "policyArguments": { - "type": "array", - "description": "Arguments for the privacy policy function. Order is important", - "items": { - "type": "string" - } - } - }, - "example": { - "serializedViews": ["View 1", "View2"], - "mergePolicy": "undefined" - } - }, - "ProcessViewRequest": { - "type": "object", - "description": "This is the input for a mergeViewRequest", - "required": ["serializedView", "policyId", "policyArguments"], - "properties": { - "serializedView": { - "type": "string", - "nullable": false, - "example": "View object stringified" - }, - "policyId": { - "$ref": "#/components/schemas/PrivacyPolicyOpts" - }, - "policyArguments": { - "type": "array", - "description": "Arguments for the privacy policy function. Order is important", - "items": { - "type": "string" - } - } - }, - "example": { - "serializedView": "View 1", - "policyId": "policy 1", - "policyArguments": ["stateId"] - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/create-view": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/create-view" - } - }, - "operationId": "createViewV1", - "summary": "Creates a Blockchain View.", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateViewRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateViewResponse" - }, - "example": { - "view": "Object", - "signature": "signature of Object" - } - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-public-key": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-public-key" - } - }, - "operationId": "GetPublicKey", - "summary": "Queries plugin's public key", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetPublicKeyResponse" - }, - "example": { - "pubKey": "----BEGIN CERTIFICATE----random content...." - } - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-available-strategies": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-available-strategies" - } - }, - "operationId": "GetAvailableStrategies", - "summary": "Queries plugin's available strategies for ledger capture", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AvailableStrategiesResponse" - }, - "example": ["strategy-fabric"] - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/verify-merkle-root": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/verify-merkle-root" - } - }, - "operationId": "verifyMerkleRoot", - "summary": "Checks validity of merkle tree root given an input", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifyMerkleRootRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifyMerkleRootResponse" - }, - "example": { - "result": true - } - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/merge-views": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/merge-views" - } - }, - "operationId": "mergeViewsV1", - "summary": "Merges multiple views according to a privacy policy", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MergeViewsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MergeViewsResponse" - } - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/process-view": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/process-view" - } - }, - "operationId": "processViewV1", - "summary": "Creates a Blockchain View.", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessViewRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateViewResponse" - }, - "example": { - "view": "Object", - "signature": "signature of Object" - } - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.tpl.json b/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.tpl.json deleted file mode 100644 index 4cc0d3870c..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,477 +0,0 @@ -{ - "openapi": "3.0.3", - "servers": [ - { - "url": "http://{host}:{port}/api/v1/@hyperledger/cactus-plugin-satp-hermes", - "description": "Development server", - "variables": { - "host": { - "default": "localhost" - }, - "port": { - "default": "3000" - } - } - } - ], - "info": { - "title": "Hyperledger Cactus Plugin - BUNGEE-Hermes", - "description": "Can create blockchain views of different networks", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "PrivacyPolicyOpts": { - "description": "identifier of the policy used to process a view", - "type": "string", - "enum": ["pruneState"], - "x-enum-varnames": ["PruneState"] - }, - "MergePolicyOpts": { - "description": "identifier of the policy used to merge views (can be none)", - "type": "string", - "enum": ["pruneState", "pruneStateFromView", "NONE"], - "x-enum-varnames": ["PruneState", "PruneStateFromView", "NONE"] - }, - "CreateViewRequest": { - "type": "object", - "description": "Request object for createViewV1 endpoint", - "required": ["strategyId", "networkDetails"], - "properties": { - "stateIds": { - "type": "array", - "items": { - "type": "string", - "example": "id-of-asset-1" - }, - "example": ["id-of-asset-1", "id-of-asset-2"] - }, - "tI": { - "type": "string", - "example": "0" - }, - "tF": { - "type": "string", - "example": "999999999999" - }, - "viewID": { - "type": "string", - "example": "view-1" - }, - "strategyId": { - "type": "string", - "example": "fabric-strategy", - "nullable": false - }, - "networkDetails": { - "type": "object", - "nullable": false, - "required": ["connectorApiPath", "participant"], - "properties": { - "connectorApiPath": { - "type": "string", - "nullable": false, - "example": "http://localhost:3000" - }, - "participant": { - "type": "string", - "nullable": false, - "example": "participant-1" - } - }, - "example": { - "connectorApiPath": "http://localhost:3000", - "participant": "participant-1" - } - } - }, - "example": { - "strategyId": "fabric-strategy", - "networkDetails": { - "connectorApiPath": "http://localhost:3000", - "participant": "participant-1" - } - } - }, - "CreateViewResponse": { - "type": "object", - "description": "This is the response for a CreateViewRequest or ProcessViewRequest", - "properties": { - "view": { - "type": "string", - "example": "Object" - }, - "signature": { - "type": "string", - "example": "signature of Object" - } - }, - "example": { - "view": "Object", - "signature": "signature of Object" - } - }, - "GetPublicKeyResponse": { - "type": "object", - "description": "public key from bungee-hermes plugin instance", - "properties": { - "pubKey": { - "type": "string", - "example": "----BEGIN CERTIFICATE----random content...." - } - } - }, - "AvailableStrategiesResponse": { - "type": "array", - "description": "Array with available strategy ids", - "items": { - "type": "string", - "example": "strategy-fabric" - } - }, - "VerifyMerkleRootRequest": { - "type": "object", - "description": "Set of transaction or state proofs and merkle tree root for verification", - "properties": { - "input": { - "nullable": false, - "type": "array", - "items": { - "type": "string", - "example": "transactionProof stringified" - } - }, - "root": { - "nullable": false, - "type": "string" - } - } - }, - "VerifyMerkleRootResponse": { - "type": "object", - "description": "true or false, wether input matched provided root", - "properties": { - "result": { - "type": "boolean", - "example": "true" - } - } - }, - "MergeViewsResponse": { - "type": "object", - "description": "This is the response of a mergeViewRequest", - "properties": { - "integratedView": { - "type": "string", - "example": "Object" - }, - "signature": { - "type": "string", - "example": "signature of Object" - } - }, - "example": { - "integratedView": "Object", - "signature": "signature of Object" - } - }, - "MergeViewsRequest": { - "type": "object", - "description": "This is the input for a mergeViewRequest", - "required": ["serializedViews", "mergePolicy"], - "properties": { - "serializedViews": { - "nullable": false, - "type": "array", - "description": "Array of serialized views", - "items": { - "type": "string", - "nullable": false, - "example": "View object stringified" - } - }, - "mergePolicy": { - "$ref": "#/components/schemas/MergePolicyOpts" - }, - "policyArguments": { - "type": "array", - "description": "Arguments for the privacy policy function. Order is important", - "items": { - "type": "string" - } - } - }, - "example": { - "serializedViews": ["View 1", "View2"], - "mergePolicy": "undefined" - } - }, - "ProcessViewRequest": { - "type": "object", - "description": "This is the input for a mergeViewRequest", - "required": ["serializedView", "policyId", "policyArguments"], - "properties": { - "serializedView": { - "type": "string", - "nullable": false, - "example": "View object stringified" - }, - "policyId": { - "$ref": "#/components/schemas/PrivacyPolicyOpts" - }, - "policyArguments": { - "type": "array", - "description": "Arguments for the privacy policy function. Order is important", - "items": { - "type": "string" - } - } - }, - "example": { - "serializedView": "View 1", - "policyId": "policy 1", - "policyArguments": ["stateId"] - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/create-view": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/create-view" - } - }, - "operationId": "createViewV1", - "summary": "Creates a Blockchain View.", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateViewRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateViewResponse" - }, - "example": { - "view": "Object", - "signature": "signature of Object" - } - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-public-key": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-public-key" - } - }, - "operationId": "GetPublicKey", - "summary": "Queries plugin's public key", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetPublicKeyResponse" - }, - "example": { - "pubKey": "----BEGIN CERTIFICATE----random content...." - } - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-available-strategies": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-available-strategies" - } - }, - "operationId": "GetAvailableStrategies", - "summary": "Queries plugin's available strategies for ledger capture", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AvailableStrategiesResponse" - }, - "example": ["strategy-fabric"] - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/verify-merkle-root": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/verify-merkle-root" - } - }, - "operationId": "verifyMerkleRoot", - "summary": "Checks validity of merkle tree root given an input", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifyMerkleRootRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifyMerkleRootResponse" - }, - "example": { - "result": true - } - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/merge-views": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/merge-views" - } - }, - "operationId": "mergeViewsV1", - "summary": "Merges multiple views according to a privacy policy", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MergeViewsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MergeViewsResponse" - } - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/process-view": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/process-view" - } - }, - "operationId": "processViewV1", - "summary": "Creates a Blockchain View.", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessViewRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateViewResponse" - }, - "example": { - "view": "Object", - "signature": "signature of Object" - } - } - } - }, - "404": { - "description": "Could not complete request." - } - } - } - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 7a3d524e57..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,687 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - BUNGEE-Hermes - * Can create blockchain views of different networks - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * Request object for createViewV1 endpoint - * @export - * @interface CreateViewRequest - */ -export interface CreateViewRequest { - /** - * - * @type {Array} - * @memberof CreateViewRequest - */ - 'stateIds'?: Array; - /** - * - * @type {string} - * @memberof CreateViewRequest - */ - 'tI'?: string; - /** - * - * @type {string} - * @memberof CreateViewRequest - */ - 'tF'?: string; - /** - * - * @type {string} - * @memberof CreateViewRequest - */ - 'viewID'?: string; - /** - * - * @type {string} - * @memberof CreateViewRequest - */ - 'strategyId': string; - /** - * - * @type {CreateViewRequestNetworkDetails} - * @memberof CreateViewRequest - */ - 'networkDetails': CreateViewRequestNetworkDetails; -} -/** - * - * @export - * @interface CreateViewRequestNetworkDetails - */ -export interface CreateViewRequestNetworkDetails { - /** - * - * @type {string} - * @memberof CreateViewRequestNetworkDetails - */ - 'connectorApiPath': string; - /** - * - * @type {string} - * @memberof CreateViewRequestNetworkDetails - */ - 'participant': string; -} -/** - * This is the response for a CreateViewRequest or ProcessViewRequest - * @export - * @interface CreateViewResponse - */ -export interface CreateViewResponse { - /** - * - * @type {string} - * @memberof CreateViewResponse - */ - 'view'?: string; - /** - * - * @type {string} - * @memberof CreateViewResponse - */ - 'signature'?: string; -} -/** - * public key from bungee-hermes plugin instance - * @export - * @interface GetPublicKeyResponse - */ -export interface GetPublicKeyResponse { - /** - * - * @type {string} - * @memberof GetPublicKeyResponse - */ - 'pubKey'?: string; -} -/** - * identifier of the policy used to merge views (can be none) - * @export - * @enum {string} - */ - -export const MergePolicyOpts = { - PruneState: 'pruneState', - PruneStateFromView: 'pruneStateFromView', - NONE: 'NONE' -} as const; - -export type MergePolicyOpts = typeof MergePolicyOpts[keyof typeof MergePolicyOpts]; - - -/** - * This is the input for a mergeViewRequest - * @export - * @interface MergeViewsRequest - */ -export interface MergeViewsRequest { - /** - * Array of serialized views - * @type {Array} - * @memberof MergeViewsRequest - */ - 'serializedViews': Array; - /** - * - * @type {MergePolicyOpts} - * @memberof MergeViewsRequest - */ - 'mergePolicy': MergePolicyOpts; - /** - * Arguments for the privacy policy function. Order is important - * @type {Array} - * @memberof MergeViewsRequest - */ - 'policyArguments'?: Array; -} - - -/** - * This is the response of a mergeViewRequest - * @export - * @interface MergeViewsResponse - */ -export interface MergeViewsResponse { - /** - * - * @type {string} - * @memberof MergeViewsResponse - */ - 'integratedView'?: string; - /** - * - * @type {string} - * @memberof MergeViewsResponse - */ - 'signature'?: string; -} -/** - * identifier of the policy used to process a view - * @export - * @enum {string} - */ - -export const PrivacyPolicyOpts = { - PruneState: 'pruneState' -} as const; - -export type PrivacyPolicyOpts = typeof PrivacyPolicyOpts[keyof typeof PrivacyPolicyOpts]; - - -/** - * This is the input for a mergeViewRequest - * @export - * @interface ProcessViewRequest - */ -export interface ProcessViewRequest { - /** - * - * @type {string} - * @memberof ProcessViewRequest - */ - 'serializedView': string; - /** - * - * @type {PrivacyPolicyOpts} - * @memberof ProcessViewRequest - */ - 'policyId': PrivacyPolicyOpts; - /** - * Arguments for the privacy policy function. Order is important - * @type {Array} - * @memberof ProcessViewRequest - */ - 'policyArguments': Array; -} - - -/** - * Set of transaction or state proofs and merkle tree root for verification - * @export - * @interface VerifyMerkleRootRequest - */ -export interface VerifyMerkleRootRequest { - /** - * - * @type {Array} - * @memberof VerifyMerkleRootRequest - */ - 'input'?: Array; - /** - * - * @type {string} - * @memberof VerifyMerkleRootRequest - */ - 'root'?: string; -} -/** - * true or false, wether input matched provided root - * @export - * @interface VerifyMerkleRootResponse - */ -export interface VerifyMerkleRootResponse { - /** - * - * @type {boolean} - * @memberof VerifyMerkleRootResponse - */ - 'result'?: boolean; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Creates a Blockchain View. - * @param {CreateViewRequest} createViewRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createViewV1: async (createViewRequest: CreateViewRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'createViewRequest' is not null or undefined - assertParamExists('createViewV1', 'createViewRequest', createViewRequest) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/create-view`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createViewRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Queries plugin\'s available strategies for ledger capture - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAvailableStrategies: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-available-strategies`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Queries plugin\'s public key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPublicKey: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-public-key`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Merges multiple views according to a privacy policy - * @param {MergeViewsRequest} mergeViewsRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - mergeViewsV1: async (mergeViewsRequest: MergeViewsRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'mergeViewsRequest' is not null or undefined - assertParamExists('mergeViewsV1', 'mergeViewsRequest', mergeViewsRequest) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/merge-views`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(mergeViewsRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Creates a Blockchain View. - * @param {ProcessViewRequest} processViewRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - processViewV1: async (processViewRequest: ProcessViewRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'processViewRequest' is not null or undefined - assertParamExists('processViewV1', 'processViewRequest', processViewRequest) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/process-view`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(processViewRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Checks validity of merkle tree root given an input - * @param {VerifyMerkleRootRequest} verifyMerkleRootRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - verifyMerkleRoot: async (verifyMerkleRootRequest: VerifyMerkleRootRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'verifyMerkleRootRequest' is not null or undefined - assertParamExists('verifyMerkleRoot', 'verifyMerkleRootRequest', verifyMerkleRootRequest) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/verify-merkle-root`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(verifyMerkleRootRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Creates a Blockchain View. - * @param {CreateViewRequest} createViewRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createViewV1(createViewRequest: CreateViewRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createViewV1(createViewRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Queries plugin\'s available strategies for ledger capture - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getAvailableStrategies(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAvailableStrategies(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Queries plugin\'s public key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPublicKey(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicKey(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Merges multiple views according to a privacy policy - * @param {MergeViewsRequest} mergeViewsRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async mergeViewsV1(mergeViewsRequest: MergeViewsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.mergeViewsV1(mergeViewsRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Creates a Blockchain View. - * @param {ProcessViewRequest} processViewRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async processViewV1(processViewRequest: ProcessViewRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.processViewV1(processViewRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Checks validity of merkle tree root given an input - * @param {VerifyMerkleRootRequest} verifyMerkleRootRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async verifyMerkleRoot(verifyMerkleRootRequest: VerifyMerkleRootRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.verifyMerkleRoot(verifyMerkleRootRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Creates a Blockchain View. - * @param {CreateViewRequest} createViewRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createViewV1(createViewRequest: CreateViewRequest, options?: any): AxiosPromise { - return localVarFp.createViewV1(createViewRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Queries plugin\'s available strategies for ledger capture - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAvailableStrategies(options?: any): AxiosPromise> { - return localVarFp.getAvailableStrategies(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Queries plugin\'s public key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPublicKey(options?: any): AxiosPromise { - return localVarFp.getPublicKey(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Merges multiple views according to a privacy policy - * @param {MergeViewsRequest} mergeViewsRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - mergeViewsV1(mergeViewsRequest: MergeViewsRequest, options?: any): AxiosPromise { - return localVarFp.mergeViewsV1(mergeViewsRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Creates a Blockchain View. - * @param {ProcessViewRequest} processViewRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - processViewV1(processViewRequest: ProcessViewRequest, options?: any): AxiosPromise { - return localVarFp.processViewV1(processViewRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Checks validity of merkle tree root given an input - * @param {VerifyMerkleRootRequest} verifyMerkleRootRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - verifyMerkleRoot(verifyMerkleRootRequest: VerifyMerkleRootRequest, options?: any): AxiosPromise { - return localVarFp.verifyMerkleRoot(verifyMerkleRootRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Creates a Blockchain View. - * @param {CreateViewRequest} createViewRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public createViewV1(createViewRequest: CreateViewRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).createViewV1(createViewRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Queries plugin\'s available strategies for ledger capture - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getAvailableStrategies(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getAvailableStrategies(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Queries plugin\'s public key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPublicKey(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPublicKey(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Merges multiple views according to a privacy policy - * @param {MergeViewsRequest} mergeViewsRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public mergeViewsV1(mergeViewsRequest: MergeViewsRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).mergeViewsV1(mergeViewsRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Creates a Blockchain View. - * @param {ProcessViewRequest} processViewRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public processViewV1(processViewRequest: ProcessViewRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).processViewV1(processViewRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Checks validity of merkle tree root given an input - * @param {VerifyMerkleRootRequest} verifyMerkleRootRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public verifyMerkleRoot(verifyMerkleRootRequest: VerifyMerkleRootRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).verifyMerkleRoot(verifyMerkleRootRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 734449dc54..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - BUNGEE-Hermes - * Can create blockchain views of different networks - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost:3000/api/v1/@hyperledger/cactus-plugin-satp-hermes".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index b97c2e50f4..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - BUNGEE-Hermes - * Can create blockchain views of different networks - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 70015980b6..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - BUNGEE-Hermes - * Can create blockchain views of different networks - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index bfd7e680ec..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - BUNGEE-Hermes - * Can create blockchain views of different networks - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/index.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/index.web.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/plugin-bungee-hermes.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/plugin-bungee-hermes.ts deleted file mode 100644 index d8373dce38..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/plugin-bungee-hermes.ts +++ /dev/null @@ -1,464 +0,0 @@ -import { - Checks, - IJsObjectSignerOptions, - JsObjectSigner, - LogLevelDesc, - Logger, - LoggerProvider, - Secp256k1Keys, -} from "@hyperledger/cactus-common"; -import { v4 as uuidV4 } from "uuid"; -import { - ICactusPlugin, - ICactusPluginOptions, - IPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { State } from "./view-creation/state"; -import OAS from "../json/openapi.json"; -import type { Express } from "express"; -import { Optional } from "typescript-optional"; - -import { Server } from "http"; -import { Server as SecureServer } from "https"; -import { - CreateViewRequest, - CreateViewResponse, - MergePolicyOpts, - MergeViewsRequest, - MergeViewsResponse, - PrivacyPolicyOpts, - ProcessViewRequest, -} from "./generated/openapi/typescript-axios"; -import { Snapshot } from "./view-creation/snapshot"; -import { View } from "./view-creation/view"; -import { IntegratedView } from "./view-merging/integrated-view"; -import { - NetworkDetails, - ObtainLedgerStrategy, -} from "./strategy/obtain-ledger-strategy"; -import { CreateViewEndpointV1 } from "./web-services/create-view-endpoint"; -import { GetPublicKeyEndpointV1 } from "./web-services/get-public-key-endpoint"; -import { GetAvailableStrategiesEndpointV1 } from "./web-services/get-available-strategies-endpoint"; -import MerkleTree from "merkletreejs"; -import { VerifyMerkleRootEndpointV1 } from "./web-services/verify-merkle-root-endpoint"; -import { MergePolicies } from "./view-merging/merge-policies"; -import { deserializeView } from "./utils"; -import { MergeViewsEndpointV1 } from "./web-services/merge-views-endpoint"; -import { ProcessViewEndpointV1 } from "./web-services/process-view-endpoint"; - -import { PrivacyPolicies } from "./view-creation/privacy-policies"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -export interface IKeyPair { - publicKey: Uint8Array; - privateKey: Uint8Array; -} - -export interface IPluginBungeeHermesOptions extends ICactusPluginOptions { - instanceId: string; - readonly pluginRegistry: PluginRegistry; - keyPair?: IKeyPair; - - logLevel?: LogLevelDesc; - - disableSignalHandlers?: true; -} - -export class PluginBungeeHermes implements ICactusPlugin, IPluginWebService { - public static readonly CLASS_NAME = "PluginBungeeHermes"; - private readonly instanceId: string; - - private log: Logger; - - private keyPair: IKeyPair; - private bungeeSigner: JsObjectSigner; - private privKeyBungee: string; - private pubKeyBungee: string; - - private strategies: Map; - - private mergePolicies: MergePolicies = new MergePolicies(); - - private viewPrivacyPolicies: PrivacyPolicies = new PrivacyPolicies(); - - private level: LogLevelDesc; - private endpoints: IWebServiceEndpoint[] | undefined; - - constructor(public readonly options: IPluginBungeeHermesOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - - this.level = options.logLevel || "INFO"; - this.strategies = new Map(); - - const label = this.className; - const level = this.level; - - this.log = LoggerProvider.getOrCreate({ label, level }); - - this.instanceId = options.instanceId; - - this.keyPair = options.keyPair - ? options.keyPair - : Secp256k1Keys.generateKeyPairsBuffer(); - this.privKeyBungee = Buffer.from(this.keyPair.privateKey).toString("hex"); - this.pubKeyBungee = Buffer.from(this.keyPair.publicKey).toString("hex"); - const bungeeSignerOptions: IJsObjectSignerOptions = { - privateKey: this.privKeyBungee, - logLevel: "debug", - }; - this.bungeeSigner = new JsObjectSigner(bungeeSignerOptions); - } - - public get className(): string { - return PluginBungeeHermes.CLASS_NAME; - } - public get logger(): Logger { - return this.log; - } - - public getPublicKey(): string { - return this.pubKeyBungee; - } - - public addStrategy(strategyId: string, strategy: ObtainLedgerStrategy) { - if (this.strategies.get(strategyId) == undefined) { - this.strategies.set(strategyId, strategy); - } else { - throw new Error("Strategy " + strategyId + " already exists."); - } - } - public getStrategy(strategyId: string): ObtainLedgerStrategy | undefined { - return this.strategies.get(strategyId); - } - public getAvailableStrategies(): string[] { - return Array.from(this.strategies.keys()); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - } - public getPackageName(): string { - return `@hyperledger/cactus-plugin-bungee-hermes`; - } - - public async onPluginInit(): Promise { - return; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const viewEndpoint = new CreateViewEndpointV1({ - bungee: this, - }); - const pubKeyEndpoint = new GetPublicKeyEndpointV1({ - bungee: this, - }); - const availableStrategiesEndpoint = new GetAvailableStrategiesEndpointV1({ - bungee: this, - }); - const verifyMerkleProofEndpoint = new VerifyMerkleRootEndpointV1({ - bungee: this, - }); - const mergeViewsEndpoint = new MergeViewsEndpointV1({ - bungee: this, - }); - const processViewEndpoint = new ProcessViewEndpointV1({ - bungee: this, - }); - - this.endpoints = [ - viewEndpoint, - pubKeyEndpoint, - availableStrategiesEndpoint, - verifyMerkleProofEndpoint, - mergeViewsEndpoint, - processViewEndpoint, - ]; - return this.endpoints; - } - - public getHttpServer(): Optional { - return Optional.empty(); - } - - public getInstanceId(): string { - return this.instanceId; - } - onProcessView(request: ProcessViewRequest): CreateViewResponse { - const view = deserializeView(request.serializedView); - const signature = JSON.parse(request.serializedView).signature; - if (signature == undefined) { - throw Error("Provided view does not include signature."); - } - const parsed = JSON.parse(request.serializedView); - if ( - !this.verifyViewSignature( - signature, - parsed.view, - JSON.parse(parsed.view).creator, - ) - ) { - this.log.info("Some signature was deemed invalid"); - throw Error( - "At least one of they views does not include a valid signature", - ); - } - const prevVersionMetadata = { - viewId: view.getKey(), - creator: view.getCreator(), - viewProof: view.getViewProof(), - signature, - policy: view.getPolicy(), - }; - this.processView(view, request.policyId, request.policyArguments); - view.addPrevVersionMetadata(prevVersionMetadata); - view.setCreator(this.pubKeyBungee); - view.setKey(uuidV4()); - return { - view: JSON.stringify(view), - signature: this.sign(JSON.stringify(view)), - }; - } - onMergeViews(request: MergeViewsRequest): MergeViewsResponse { - const policy = request.mergePolicy; - const views: View[] = []; - const signatures: string[] = []; - if (request.serializedViews.length <= 1) { - this.log.info("less than 2 views were provided"); - throw Error("Must provide more than 1 view"); - } - request.serializedViews.forEach((view) => { - const parsed = JSON.parse(view); - if ( - !this.verifyViewSignature( - parsed.signature, - parsed.view, - JSON.parse(parsed.view).creator, - ) - ) { - this.log.info("Some signature was deemed invalid"); - throw Error( - "At least one of they views does not include a valid signature", - ); - } - signatures.push(parsed.signature); - views.push(deserializeView(view)); - }); - const integratedView = this.mergeViews( - views, - signatures, - policy, - request.policyArguments ? request.policyArguments : [], - ); - return { - integratedView: JSON.stringify(integratedView), - signature: integratedView.signature, - }; - } - async onCreateView(request: CreateViewRequest): Promise { - //ti and tf are unix timestamps, represented as strings - const ti: string = request.tI ? request.tI : "0"; - const tf: string = request.tF - ? request.tF - : Number.MAX_SAFE_INTEGER.toString(); - const stateIds: string[] = request.stateIds ? request.stateIds : []; - - const snapshot = await this.generateSnapshot( - stateIds, - request.strategyId, - request.networkDetails, - ); - this.logger.info("Generating view for request: ", request); - const response = this.generateView(snapshot, ti, tf, request.viewID); - return { - view: JSON.stringify(response.view), - signature: response.signature, - }; - } - - public generateView( - snapshot: Snapshot, - tI: string, - tF: string, - id: string | undefined, - ): { view?: View; signature?: string } { - if ( - BigInt(tI) > BigInt(snapshot.getTF()) || - BigInt(tF) < BigInt(snapshot.getTI()) || - BigInt(tI) > BigInt(tF) - ) { - return {}; - } - const view = new View(this.pubKeyBungee, tI, tF, snapshot, id); - snapshot.pruneStates(tI, tF); - - const signature = this.sign(JSON.stringify(view)); - - return { view: view, signature: signature }; - } - - sign(msg: string): string { - return Buffer.from(this.bungeeSigner.sign(msg)).toString("hex"); - } - - public async generateSnapshot( - stateIds: string[], - strategyId: string, - networkDetails: NetworkDetails, - ): Promise { - const strategy = this.getStrategy(strategyId); - if (strategy == undefined) { - throw new Error("Strategy " + strategyId + " is undefined/unsupported"); - } - - const ledgerStates = await strategy.generateLedgerStates( - stateIds, - networkDetails, - ); - - const states: State[] = []; - for (const key of ledgerStates.keys()) { - if (stateIds.includes(key) || stateIds.length == 0) { - states.push(ledgerStates.get(key) as State); - } - } - - const snapShotId = uuidV4(); - const snapshot = new Snapshot( - snapShotId, - networkDetails.participant, - states, - ); - snapshot.update_TI_TF(); - - return snapshot; - } - - public verifyMerkleProof(input: string[], root: string): boolean { - const tree = new MerkleTree(input, undefined, { - sort: true, - hashLeaves: true, - }); - return tree.getRoot().toString("hex") == root; - } - - public mergeViews( - views: View[], - signatures: string[], - privacyPolicy: MergePolicyOpts, - args: string[], - ): { integratedView: IntegratedView; signature: string } { - const policy = this.mergePolicies.getMergePolicy(privacyPolicy); - - let integratedView = new IntegratedView( - privacyPolicy, - policy, - this.bungeeSigner, - ); - for (const view of views) { - if (!integratedView.isParticipant(view.getParticipant())) { - integratedView.addParticipant(view.getParticipant()); - } - integratedView.addIncludedViewMetadata({ - viewId: view.getKey(), - creator: view.getCreator(), - viewProof: view.getViewProof(), - signature: signatures[views.indexOf(view)], - policy: view.getPolicy(), - }); - for (const state of view.getSnapshot().getStateBins()) { - if (integratedView.getExtendedState(state.getId()) == undefined) { - integratedView.createExtendedState(state.getId()); - } - integratedView.addStateInExtendedState( - state.getId(), - view.getKey(), - state, - ); - if ( - BigInt(state.getInitialTime()) < BigInt(integratedView.getTI()) || - BigInt(state.getInitialTime()) < 0 - ) { - integratedView.setTI(state.getInitialTime()); - } - - if ( - BigInt(state.getFinalTime()) > BigInt(integratedView.getTF()) || - BigInt(state.getFinalTime()) < 0 - ) { - integratedView.setTF(state.getFinalTime()); - } - } - } - if (policy) { - integratedView = policy(integratedView, ...args); - } - integratedView.setIntegratedViewProof(); - return { - integratedView: integratedView, - //The paper specs suggest the integratedView should be jointly signed by all participants. - //That process is left to be addressed in the future - signature: this.sign(JSON.stringify(integratedView)), - }; - } - - public processView( - view: View, - policy: PrivacyPolicyOpts, - args: string[], - ): View { - const policyF = this.viewPrivacyPolicies.getPrivacyPolicy(policy); - if (policyF) { - view = policyF(view, ...args); - view.setPrivacyPolicy(policy, policyF, this.bungeeSigner); - view.updateViewProof(); - } - return view; - } - - verifyViewSignature( - signature: string, - view: string, - pubKey: string, - ): boolean { - const sourceSignature = new Uint8Array(Buffer.from(signature, "hex")); - const sourcePubkey = new Uint8Array(Buffer.from(pubKey, "hex")); - - return this.bungeeSigner.verify(view, sourceSignature, sourcePubkey); - } - - public isSafeToCallObjectMethod( - object: Record, - name: string, - ): boolean { - Checks.truthy( - object, - `${this.className}#isSafeToCallObjectMethod():contract`, - ); - Checks.nonBlankString( - name, - `${this.className}#isSafeToCallObjectMethod():name`, - ); - - return ( - Object.prototype.hasOwnProperty.call(object, name) && - typeof object[name] === "function" - ); - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/plugin-factory-bungee-hermes.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/plugin-factory-bungee-hermes.ts deleted file mode 100644 index 79f009bc29..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/plugin-factory-bungee-hermes.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginBungeeHermesOptions, - PluginBungeeHermes, -} from "./plugin-bungee-hermes"; -export class PluginFactoryBungeeHermes extends PluginFactory< - PluginBungeeHermes, - IPluginBungeeHermesOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginBungeeHermesOptions, - ): Promise { - return new PluginBungeeHermes(pluginOptions); - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/public-api.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/public-api.ts deleted file mode 100644 index ff3dd0e66d..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/public-api.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryBungeeHermes } from "./plugin-factory-bungee-hermes"; - -export { - PluginBungeeHermes, - IPluginBungeeHermesOptions, -} from "./plugin-bungee-hermes"; - -export async function createBungeePluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryBungeeHermes(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/obtain-ledger-strategy.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/obtain-ledger-strategy.ts deleted file mode 100644 index d4f412116c..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/obtain-ledger-strategy.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Logger } from "@hyperledger/cactus-common"; -import { State } from "../view-creation/state"; -import { IPluginLedgerConnector } from "@hyperledger/cactus-core-api/src/main/typescript/plugin/ledger-connector/i-plugin-ledger-connector"; - -export interface NetworkDetails { - connectorApiPath?: string; - connector?: IPluginLedgerConnector; - participant: string; -} -export interface ObtainLedgerStrategy { - log: Logger; - - generateLedgerStates( - stateIds: string[], - networkDetails: NetworkDetails, - ): Promise>; -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-besu.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-besu.ts deleted file mode 100644 index 9178e8f2fe..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-besu.ts +++ /dev/null @@ -1,429 +0,0 @@ -import { NetworkDetails, ObtainLedgerStrategy } from "./obtain-ledger-strategy"; -import { - Checks, - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - DefaultApi as BesuApi, - EthContractInvocationType, - EvmBlock, - EvmLog, - EvmTransaction, - GetBlockV1Request, - GetPastLogsV1Request, - GetTransactionV1Request, - InvokeContractV1Request, - PluginLedgerConnectorBesu, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { State } from "../view-creation/state"; -import { StateProof } from "../view-creation/state-proof"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { Transaction } from "../view-creation/transaction"; -import Web3 from "web3"; -import { Proof } from "../view-creation/proof"; -import { TransactionProof } from "../view-creation/transaction-proof"; -import { BadRequestError, InternalServerError } from "http-errors-enhanced-cjs"; -export interface BesuNetworkDetails extends NetworkDetails { - signingCredential: Web3SigningCredential; - keychainId: string; - contractName: string; - contractAddress: string; -} - -export class StrategyBesu implements ObtainLedgerStrategy { - public static readonly CLASS_NAME = "StrategyBesu"; - - public log: Logger; - - constructor(level: LogLevelDesc) { - this.log = LoggerProvider.getOrCreate({ - label: StrategyBesu.CLASS_NAME, - level, - }); - } - public async generateLedgerStates( - stateIds: string[], - networkDetails: BesuNetworkDetails, - ): Promise> { - const fn = `${StrategyBesu.CLASS_NAME}#generateLedgerStates()`; - this.log.debug(`Generating ledger snapshot`); - Checks.truthy(networkDetails, `${fn} networkDetails`); - - let besuApi: BesuApi | undefined; - let connector: PluginLedgerConnectorBesu | undefined; - - if (networkDetails.connector) { - connector = networkDetails.connector as PluginLedgerConnectorBesu; - } else if (networkDetails.connectorApiPath) { - const config = new Configuration({ - basePath: networkDetails.connectorApiPath, - }); - besuApi = new BesuApi(config); - } else { - throw new Error( - `${fn} networkDetails must have either connector or connectorApiPath`, - ); - } - const connectorOrApiClient = networkDetails.connector ? connector : besuApi; - if (!connectorOrApiClient) { - throw new InternalServerError(`${fn} got neither connector nor BesuAPI`); - } - const ledgerStates = new Map(); - const assetsKey = - stateIds.length == 0 - ? await this.getAllAssetsKey(networkDetails, connectorOrApiClient) - : stateIds; - this.log.debug("Current assets detected to capture: " + assetsKey); - for (const assetKey of assetsKey) { - const { transactions, values, blocks } = await this.getAllInfoByKey( - assetKey, - networkDetails, - connectorOrApiClient, - ); - - const state = new State(assetKey, values, transactions); - - const stateProof = new StateProof( - state.getValue(), - parseInt(state.getVersion()), - state.getId(), - ); - const blocksHash: string[] = []; - for (const block of blocks.values()) { - if (blocksHash.indexOf(block.hash as string) !== -1) { - continue; - } - blocksHash.push(block.hash as string); - stateProof.addBlock({ - blockHash: block.hash as string, - blockCreator: block.miner as string, - blockSigners: [], // FIXME: query blocksigners (blockchain specific) - }); - } - state.setStateProof([stateProof]); - ledgerStates.set(assetKey, state); - } - return ledgerStates; - } - - async getAllAssetsKey( - networkDetails: BesuNetworkDetails, - connectorOrApiClient: PluginLedgerConnectorBesu | BesuApi, - ): Promise { - const parameters = { - contractName: networkDetails.contractName, - keychainId: networkDetails.keychainId, - invocationType: EthContractInvocationType.Call, - methodName: "getAllAssetsIDs", - params: [], - signingCredential: networkDetails.signingCredential, - gas: 1000000, - }; - const response = await this.invokeContract( - parameters as InvokeContractV1Request, - connectorOrApiClient, - ); - return response; - } - - async getAllInfoByKey( - key: string, - networkDetails: BesuNetworkDetails, - connectorOrApiClient: PluginLedgerConnectorBesu | BesuApi, - ): Promise<{ - transactions: Transaction[]; - values: string[]; - blocks: Map; - }> { - const req = { - fromBlock: "earliest", - toBlock: "latest", - address: networkDetails.contractAddress, - topics: [[null], [Web3.utils.keccak256(key)]], //filter logs by asset key - }; - - const decoded = await this.getPastLogs(req, connectorOrApiClient); - const transactions: Transaction[] = []; - const blocks: Map = new Map(); - const values: string[] = []; - this.log.debug("Getting transaction logs for asset: " + key); - - for (const log of decoded) { - const txTx = await this.getTransaction( - { - transactionHash: log.transactionHash, - } as GetTransactionV1Request, - connectorOrApiClient, - ); - - const txBlock = await this.getBlock( - { - blockHashOrBlockNumber: log.blockHash, - } as GetBlockV1Request, - connectorOrApiClient, - ); - - this.log.debug( - "Transaction: " + - log.transactionHash + - "\nData: " + - JSON.stringify(log.data) + - "\n =========== \n", - ); - const proof = new Proof({ - creator: txTx.from as string, //no sig for besu - }); - const transaction: Transaction = new Transaction( - log.transactionHash, - txBlock.timestamp, - new TransactionProof(proof, log.transactionHash), - ); - transaction.setStateId(key); - transaction.setTarget(networkDetails.contractAddress as string); - transaction.setPayload(txTx.input ? txTx.input : ""); //FIXME: payload = transaction input ? - transactions.push(transaction); - values.push(JSON.stringify(log.data)); - - blocks.set(transaction.getId(), txBlock); - } - - return { transactions: transactions, values: values, blocks: blocks }; - } - - async invokeContract( - parameters: InvokeContractV1Request, - connectorOrApiClient: PluginLedgerConnectorBesu | BesuApi, - ): Promise { - const fn = `${StrategyBesu.CLASS_NAME}#invokeContract()`; - if (!connectorOrApiClient) { - // throw BadRequestError because it is not our fault that we did not get - // all the needed parameters, e.g. we are signaling that this is a "user error" - // where the "user" is the other developer who called our function. - throw new BadRequestError(`${fn} connectorOrApiClient is falsy`); - } else if (connectorOrApiClient instanceof PluginLedgerConnectorBesu) { - const connector: PluginLedgerConnectorBesu = connectorOrApiClient; - const response = await connector.invokeContract(parameters); - if (!response) { - // We throw an InternalServerError because the user is not responsible - // for us not being able to obtain a result from the contract invocation. - // They provided us parameters for the call (which we then validated and - // accepted) an therefore now if something goes wrong we have to throw - // an exception accordingly (e.g. us "admitting fault") - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.callOutput) { - throw new InternalServerError(`${fn} response.callOutput is falsy`); - } - const { callOutput } = response; - if (!Array.isArray(callOutput)) { - throw new InternalServerError(`${fn} callOutput not an array`); - } - const allItemsAreStrings = callOutput.every((x) => typeof x === "string"); - if (!allItemsAreStrings) { - throw new InternalServerError(`${fn} callOutput has non-string items`); - } - return response.callOutput as string[]; - } else if (connectorOrApiClient instanceof BesuApi) { - const api: BesuApi = connectorOrApiClient; - const response = await api.invokeContractV1(parameters); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - // We log the error here on the debug level so that later on we can inspect the contents - // of it in the logs if we need to. The reason that this is important is because we do not - // want to dump the full response onto our own error response that is going back to the caller - // due to that potentially being a security issue that we are exposing internal data via the - // error responses. - // With that said, we still need to make sure that we can determine the root cause of any - // issues after the fact and therefore we must save the error response details somewhere (the logs) - this.log.debug("BesuAPI non-2xx HTTP response:", data, status, config); - - // For the caller/client we just send back a generic error admitting that we somehow messed up: - const errorMessage = `${fn} BesuAPI error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - if (!data.callOutput) { - throw new InternalServerError(`${fn} data.callOutput is falsy`); - } - const { callOutput } = data; - if (!Array.isArray(callOutput)) { - throw new InternalServerError(`${fn} callOutput not an array`); - } - const allItemsAreStrings = callOutput.every((x) => typeof x === "string"); - if (!allItemsAreStrings) { - throw new InternalServerError(`${fn} callOutput has non-string items`); - } - return response.data.callOutput; - } - throw new InternalServerError(`${fn}: neither BesuAPI nor Connector given`); - } - - async getPastLogs( - req: GetPastLogsV1Request, - connectorOrApiClient: PluginLedgerConnectorBesu | BesuApi, - ): Promise { - const fn = `${StrategyBesu.CLASS_NAME}#getPastLogs()`; - if (!connectorOrApiClient) { - throw new BadRequestError(`${fn} connectorOrApiClient is falsy`); - } else if (connectorOrApiClient instanceof PluginLedgerConnectorBesu) { - const connector: PluginLedgerConnectorBesu = connectorOrApiClient; - const response = await connector.getPastLogs(req); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.logs) { - throw new InternalServerError(`${fn} response.logs is falsy`); - } - const { logs } = response; - if (!Array.isArray(logs)) { - throw new InternalServerError(`${fn} logs not an array`); - } - const allItemsAreEvmLog = logs.every((x) => this.isEvmLog(x)); - if (!allItemsAreEvmLog) { - throw new InternalServerError(`${fn} logs has non-EvmLog items`); - } - return response.logs as EvmLog[]; - } else if (connectorOrApiClient instanceof BesuApi) { - const api: BesuApi = connectorOrApiClient; - const response = await api.getPastLogsV1(req); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - this.log.debug("BesuAPI non-2xx HTTP response:", data, status, config); - const errorMessage = `${fn} BesuAPI error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - if (!data.logs) { - throw new InternalServerError(`${fn} data.logs is falsy`); - } - const { logs } = data; - if (!Array.isArray(logs)) { - throw new InternalServerError(`${fn} logs not an array`); - } - const allItemsAreEvmLog = logs.every((x) => this.isEvmLog(x)); - if (!allItemsAreEvmLog) { - throw new InternalServerError(`${fn} logs has non-EvmLog items`); - } - return response.data.logs; - } - throw new InternalServerError(`${fn}: neither BesuAPI nor Connector given`); - } - - isEvmLog(x: any): x is EvmLog { - return ( - "address" in x && - "data" in x && - "blockHash" in x && - "transactionHash" in x && - "topics" in x && - "blockNumber" in x && - "logIndex" in x && - "transactionIndex" in x - ); - } - - async getTransaction( - req: GetTransactionV1Request, - connectorOrApiClient: PluginLedgerConnectorBesu | BesuApi, - ): Promise { - const fn = `${StrategyBesu.CLASS_NAME}#getTransaction()`; - if (!connectorOrApiClient) { - } else if (connectorOrApiClient instanceof PluginLedgerConnectorBesu) { - const connector: PluginLedgerConnectorBesu = connectorOrApiClient; - const response = await connector.getTransaction(req); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.transaction) { - throw new InternalServerError(`${fn} response.transaction is falsy`); - } - return response.transaction; - } else if (connectorOrApiClient instanceof BesuApi) { - const api: BesuApi = connectorOrApiClient; - const response = await api.getTransactionV1(req); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - this.log.debug("BesuAPI non-2xx HTTP response:", data, status, config); - - const errorMessage = `${fn} BesuAPI error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - if (!data.transaction) { - throw new InternalServerError(`${fn} data.transaction is falsy`); - } - return response.data.transaction; - } - throw new InternalServerError(`${fn}: neither BesuAPI nor Connector given`); - } - - async getBlock( - req: GetBlockV1Request, - connectorOrApiClient: PluginLedgerConnectorBesu | BesuApi, - ): Promise { - const fn = `${StrategyBesu.CLASS_NAME}#getBlock()`; - if (!connectorOrApiClient) { - } else if (connectorOrApiClient instanceof PluginLedgerConnectorBesu) { - const connector: PluginLedgerConnectorBesu = connectorOrApiClient; - const response = await connector.getBlock(req); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.block) { - throw new InternalServerError(`${fn} response.block is falsy`); - } - return response.block; - } else if (connectorOrApiClient instanceof BesuApi) { - const api: BesuApi = connectorOrApiClient; - const response = await api.getBlockV1(req); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - this.log.debug("BesuAPI non-2xx HTTP response:", data, status, config); - - const errorMessage = `${fn} BesuAPI error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - if (!data.block) { - throw new InternalServerError(`${fn} data.block is falsy`); - } - return data.block; - } - throw new InternalServerError(`${fn}: neither BesuAPI nor Connector given`); - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-ethereum.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-ethereum.ts deleted file mode 100644 index 28e189c415..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-ethereum.ts +++ /dev/null @@ -1,374 +0,0 @@ -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, -} from "@hyperledger/cactus-common"; -import { - Web3SigningCredential, - DefaultApi as EthereumApi, - EthContractInvocationType, - InvokeContractV1Request, - InvokeRawWeb3EthMethodV1Request, - PluginLedgerConnectorEthereum, - InvokeRawWeb3EthMethodV1Response, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { NetworkDetails, ObtainLedgerStrategy } from "./obtain-ledger-strategy"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { State } from "../view-creation/state"; -import { StateProof } from "../view-creation/state-proof"; -import Web3 from "web3"; -import { Proof } from "../view-creation/proof"; -import { TransactionProof } from "../view-creation/transaction-proof"; -import { Transaction } from "../view-creation/transaction"; -import { BadRequestError, InternalServerError } from "http-errors-enhanced-cjs"; - -interface EvmLog { - address: string; - data: string; - blockHash: string; - transactionHash: string; - topics: Array; - logIndex: number; - transactionIndex: number; - blockNumber: number; -} - -interface EvmBlock { - number?: number; - hash?: string; - parentHash?: string; - nonce?: string; - sha3Uncles?: string; - logsBloom?: string; - transactionsRoot?: string; - stateRoot?: string; - miner?: string; - difficulty?: number; - totalDifficulty?: number; - extraData?: string; - size?: number; - gasLimit?: number; - gasUsed?: number; - timestamp?: string; - transactions?: Array; - uncles?: Array; -} -export interface EthereumNetworkDetails extends NetworkDetails { - signingCredential: Web3SigningCredential; - keychainId: string; - contractName: string; - contractAddress: string; -} -export class StrategyEthereum implements ObtainLedgerStrategy { - public static readonly CLASS_NAME = "StrategyEthereum"; - - public log: Logger; - - constructor(level: LogLevelDesc) { - this.log = LoggerProvider.getOrCreate({ - label: StrategyEthereum.CLASS_NAME, - level, - }); - } - - public async generateLedgerStates( - stateIds: string[], - networkDetails: EthereumNetworkDetails, - ): Promise> { - const fn = `${StrategyEthereum.CLASS_NAME}#generateLedgerStates()`; - this.log.debug(`Generating ledger snapshot`); - Checks.truthy(networkDetails, `${fn} networkDetails`); - - let ethereumApi: EthereumApi | undefined; - let connector: PluginLedgerConnectorEthereum | undefined; - - if (networkDetails.connector) { - connector = networkDetails.connector as PluginLedgerConnectorEthereum; - } else if (networkDetails.connectorApiPath) { - const config = new Configuration({ - basePath: networkDetails.connectorApiPath, - }); - ethereumApi = new EthereumApi(config); - } else { - throw new Error( - `${StrategyEthereum.CLASS_NAME}#generateLedgerStates: networkDetails must have either connector or connectorApiPath`, - ); - } - - const connectorOrApiClient = connector ? connector : ethereumApi; - if (!connectorOrApiClient) { - throw new InternalServerError( - `${fn} got neither connector nor EthereumApi`, - ); - } - - const ledgerStates = new Map(); - const assetsKey = - stateIds.length == 0 - ? await this.getAllAssetsKey(networkDetails, connectorOrApiClient) - : stateIds; - this.log.debug("Current assets detected to capture: " + assetsKey); - for (const assetKey of assetsKey) { - const { transactions, values, blocks } = await this.getAllInfoByKey( - assetKey, - networkDetails, - connectorOrApiClient, - ); - - const state = new State(assetKey, values, transactions); - - const stateProof = new StateProof( - state.getValue(), - parseInt(state.getVersion()), - state.getId(), - ); - const blocksHash: string[] = []; - for (const block of blocks.values()) { - if (blocksHash.indexOf(block.hash as string) !== -1) { - continue; - } - blocksHash.push(block.hash as string); - stateProof.addBlock({ - blockHash: block.hash as string, - blockCreator: block.miner as string, - blockSigners: [], // Non applicable for ethereum - }); - } - state.setStateProof([stateProof]); - ledgerStates.set(assetKey, state); - } - return ledgerStates; - } - - async getAllAssetsKey( - networkDetails: EthereumNetworkDetails, - connectorOrApiClient: PluginLedgerConnectorEthereum | EthereumApi, - ): Promise { - const parameters = { - contract: { - contractName: networkDetails.contractName, - keychainId: networkDetails.keychainId, - }, - invocationType: EthContractInvocationType.Call, - methodName: "getAllAssetsIDs", - params: [], - signingCredential: networkDetails.signingCredential, - }; - const response = await this.invokeContract( - parameters as InvokeContractV1Request, - connectorOrApiClient, - ); - return response; - } - - async getAllInfoByKey( - key: string, - networkDetails: EthereumNetworkDetails, - connectorOrApiClient: PluginLedgerConnectorEthereum | EthereumApi, - ): Promise<{ - transactions: Transaction[]; - values: string[]; - blocks: Map; - }> { - const filter = { - fromBlock: "earliest", - toBlock: "latest", - address: networkDetails.contractAddress, - topics: [null, Web3.utils.keccak256(key)], //filter logs by asset key - }; - const getLogsReq: InvokeRawWeb3EthMethodV1Request = { - methodName: "getPastLogs", - params: [filter], - }; - const response = await this.invokeWeb3EthMethod( - getLogsReq, - connectorOrApiClient, - ); - const decoded = response.data as EvmLog[]; - const transactions: Transaction[] = []; - const blocks: Map = new Map(); - const values: string[] = []; - this.log.debug("Getting transaction logs for asset: " + key); - - for (const log of decoded) { - const getTransactionReq: InvokeRawWeb3EthMethodV1Request = { - methodName: "getTransaction", - params: [log.transactionHash], - }; - const txTx = await this.invokeWeb3EthMethod( - getTransactionReq, - connectorOrApiClient, - ); - - const getBlockReq: InvokeRawWeb3EthMethodV1Request = { - methodName: "getBlock", - params: [log.blockHash], - }; - const txBlock = await this.invokeWeb3EthMethod( - getBlockReq, - connectorOrApiClient, - ); - - this.log.debug( - "Transaction: " + - log.transactionHash + - "\nData: " + - JSON.stringify(log.data) + - "\n =========== \n", - ); - const proof = new Proof({ - creator: txTx.data.from as string, //no sig for ethereum - }); - const transaction: Transaction = new Transaction( - log.transactionHash, - txBlock.data.timestamp, - new TransactionProof(proof, log.transactionHash), - ); - transaction.setStateId(key); - transaction.setTarget(networkDetails.contractAddress as string); - transaction.setPayload(txTx.data.input ? txTx.data.input : ""); //FIXME: payload = transaction input ? - transactions.push(transaction); - values.push(JSON.stringify(log.data)); - - blocks.set(transaction.getId(), txBlock.data); - } - - return { transactions: transactions, values: values, blocks: blocks }; - } - - async invokeContract( - parameters: InvokeContractV1Request, - connectorOrApiClient: PluginLedgerConnectorEthereum | EthereumApi, - ): Promise { - const fn = `${StrategyEthereum.CLASS_NAME}#invokeContract()`; - if (!connectorOrApiClient) { - // throw BadRequestError because it is not our fault that we did not get - // all the needed parameters, e.g. we are signaling that this is a "user error" - // where the "user" is the other developer who called our function. - throw new BadRequestError(`${fn} connectorOrApiClient is falsy`); - } else if (connectorOrApiClient instanceof PluginLedgerConnectorEthereum) { - const connector: PluginLedgerConnectorEthereum = connectorOrApiClient; - const response = await connector.invokeContract(parameters); - if (!response) { - // We throw an InternalServerError because the user is not responsible - // for us not being able to obtain a result from the contract invocation. - // They provided us parameters for the call (which we then validated and - // accepted) an therefore now if something goes wrong we have to throw - // an exception accordingly (e.g. us "admitting fault") - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.callOutput) { - throw new InternalServerError(`${fn} response.callOutput is falsy`); - } - const { callOutput } = response; - if (!Array.isArray(callOutput)) { - throw new InternalServerError(`${fn} callOutput not an array`); - } - const allItemsAreStrings = callOutput.every((x) => typeof x === "string"); - if (!allItemsAreStrings) { - throw new InternalServerError(`${fn} callOutput has non-string items`); - } - return response.callOutput as string[]; - } else if (connectorOrApiClient instanceof EthereumApi) { - const api: EthereumApi = connectorOrApiClient; - const response = await api.invokeContractV1(parameters); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - // We log the error here on the debug level so that later on we can inspect the contents - // of it in the logs if we need to. The reason that this is important is because we do not - // want to dump the full response onto our own error response that is going back to the caller - // due to that potentially being a security issue that we are exposing internal data via the - // error responses. - // With that said, we still need to make sure that we can determine the root cause of any - // issues after the fact and therefore we must save the error response details somewhere (the logs) - this.log.debug( - "EthereumApi non-2xx HTTP response:", - data, - status, - config, - ); - - // For the caller/client we just send back a generic error admitting that we somehow messed up: - const errorMessage = `${fn} EthereumApi error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - if (!data.callOutput) { - throw new InternalServerError(`${fn} data.callOutput is falsy`); - } - const { callOutput } = data; - if (!Array.isArray(callOutput)) { - throw new InternalServerError(`${fn} callOutput not an array`); - } - const allItemsAreStrings = callOutput.every((x) => typeof x === "string"); - if (!allItemsAreStrings) { - throw new InternalServerError(`${fn} callOutput has non-string items`); - } - return response.data.callOutput; - } - throw new InternalServerError( - `${fn}: neither EthereumApi nor Connector given`, - ); - } - - async invokeWeb3EthMethod( - parameters: InvokeRawWeb3EthMethodV1Request, - connectorOrApiClient: PluginLedgerConnectorEthereum | EthereumApi, - ): Promise { - const fn = `${StrategyEthereum.CLASS_NAME}#invokeContract()`; - if (!connectorOrApiClient) { - throw new BadRequestError(`${fn} connectorOrApiClient is falsy`); - } else if (connectorOrApiClient instanceof PluginLedgerConnectorEthereum) { - const connector: PluginLedgerConnectorEthereum = connectorOrApiClient; - const response = { - data: await connector.invokeRawWeb3EthMethod(parameters), - } as InvokeRawWeb3EthMethodV1Response; - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - return response as InvokeRawWeb3EthMethodV1Response; - } else if (connectorOrApiClient instanceof EthereumApi) { - const api: EthereumApi = connectorOrApiClient; - const response = await api.invokeWeb3EthMethodV1(parameters); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - this.log.debug( - "EthereumAPI non-2xx HTTP response:", - data, - status, - config, - ); - const errorMessage = `${fn} EthereumAPI error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - if (!data.data) { - throw new InternalServerError(`${fn} data.data is falsy`); - } - return data; - } - throw new InternalServerError( - `${fn}: neither EthereumAPI nor Connector given`, - ); - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-fabric.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-fabric.ts deleted file mode 100644 index c7ccbf60cc..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-fabric.ts +++ /dev/null @@ -1,448 +0,0 @@ -import { - FabricSigningCredential, - DefaultApi as FabricApi, - Configuration, - FabricContractInvocationType, - RunTransactionRequest, - PluginLedgerConnectorFabric, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { NetworkDetails, ObtainLedgerStrategy } from "./obtain-ledger-strategy"; -import { - Checks, - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { Transaction } from "../view-creation/transaction"; -import { State } from "../view-creation/state"; -import { StateProof } from "../view-creation/state-proof"; -import { Proof } from "../view-creation/proof"; -import { TransactionProof } from "../view-creation/transaction-proof"; -import { BadRequestError, InternalServerError } from "http-errors-enhanced-cjs"; - -export interface FabricNetworkDetails extends NetworkDetails { - signingCredential: FabricSigningCredential; - contractName: string; - channelName: string; -} -export class StrategyFabric implements ObtainLedgerStrategy { - public static readonly CLASS_NAME = "StrategyFabric"; - - public log: Logger; - - constructor(level: LogLevelDesc) { - this.log = LoggerProvider.getOrCreate({ - label: StrategyFabric.CLASS_NAME, - level, - }); - } - - public async generateLedgerStates( - stateIds: string[], - networkDetails: FabricNetworkDetails, - ): Promise> { - const fn = `${StrategyFabric.CLASS_NAME}#generateLedgerStates()`; - this.log.debug(`Generating ledger snapshot`); - Checks.truthy(networkDetails, `${fn} networkDetails`); - - let fabricApi: FabricApi | undefined; - let connector: PluginLedgerConnectorFabric | undefined; - - if (networkDetails.connector) { - connector = networkDetails.connector as PluginLedgerConnectorFabric; - } else if (networkDetails.connectorApiPath) { - const config = new Configuration({ - basePath: networkDetails.connectorApiPath, - }); - fabricApi = new FabricApi(config); - } else { - throw new Error( - `${fn} networkDetails must have either connector or connectorApiPath`, - ); - } - const connectorOrApiClient = networkDetails.connector - ? connector - : fabricApi; - if (!connectorOrApiClient) { - throw new InternalServerError( - `${fn} got neither connector nor FabricAPI`, - ); - } - const assetsKey = - stateIds.length == 0 - ? ( - await this.getAllAssetsKey(networkDetails, connectorOrApiClient) - ).split(",") - : stateIds; - const ledgerStates = new Map(); - //For each key in ledgerAssetsKey - for (const assetKey of assetsKey) { - const assetValues: string[] = []; - const txWithTimeS: Transaction[] = []; - - const txs = await this.getAllTxByKey( - networkDetails, - assetKey, - connectorOrApiClient, - ); - //For each tx get receipt - let last_receipt; - for (const tx of txs) { - const receipt = JSON.parse( - await this.fabricGetTxReceiptByTxIDV1( - networkDetails, - tx.getId(), - connectorOrApiClient, - ), - ); - tx.getProof().setCreator( - new Proof({ - creator: receipt.transactionCreator.creatorID, - mspid: receipt.transactionCreator.mspid, - }), - ); - assetValues.push(JSON.parse(receipt.rwsetWriteData).Value.toString()); - tx.setStateId(assetKey); - tx.setTarget(receipt.channelID + ": " + receipt.chainCodeName); - - for (const endorsement of receipt.transactionEndorsement) { - const signature64 = Buffer.from(endorsement.signature).toString( - "base64", - ); - tx.addEndorser( - new Proof({ - mspid: endorsement.mspid, - creator: endorsement.endorserID, - signature: signature64, - }), - ); - } - txWithTimeS.push(tx); - last_receipt = receipt; - } - const block = await this.fabricGetBlockByTxID( - networkDetails, - txs[txs.length - 1].getId(), - connectorOrApiClient, - ); - const state = new State(assetKey, assetValues, txWithTimeS); - ledgerStates.set(assetKey, state); - const stateProof = new StateProof( - state.getValue(), - parseInt(state.getVersion()), - state.getId(), - ); - //only adding last block for each state, in the state proof - stateProof.addBlock({ - blockHash: block.hash, - blockCreator: JSON.stringify({ - mspid: last_receipt.blockMetaData.mspid, - id: last_receipt.blockMetaData.blockCreatorID, - }), - blockSigners: block.signers, - }); - - state.setStateProof([stateProof]); - } - return ledgerStates; - } - - async fabricGetTxReceiptByTxIDV1( - networkDetails: FabricNetworkDetails, - transactionId: string, - connectorOrApiClient: PluginLedgerConnectorFabric | FabricApi, - ): Promise { - const fn = `${StrategyFabric.CLASS_NAME}#fabricGetTxReceiptByTxIDV1()`; - const parameters = { - signingCredential: networkDetails.signingCredential, - channelName: networkDetails.channelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [networkDetails.channelName, transactionId], - } as RunTransactionRequest; - - if (!connectorOrApiClient) { - throw new BadRequestError(`${fn} connectorOrApiClient is falsy`); - } else if (connectorOrApiClient instanceof PluginLedgerConnectorFabric) { - const connector: PluginLedgerConnectorFabric = connectorOrApiClient; - const response = await connector.getTransactionReceiptByTxID(parameters); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - const receiptLockRes = JSON.stringify(response); - if (!receiptLockRes) { - throw new InternalServerError(`${fn} receiptLockRes is falsy`); - } - return receiptLockRes; - } else if (connectorOrApiClient instanceof FabricApi) { - const api: FabricApi = connectorOrApiClient; - const response = await api.getTransactionReceiptByTxIDV1(parameters); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - this.log.debug( - "FabricAPI non-2xx HTTP response:", - data, - status, - config, - ); - const errorMessage = `${fn} FabricAPI error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - - const receiptLockRes = JSON.stringify(data); - if (!receiptLockRes) { - throw new InternalServerError(`${fn} receiptLockRes is falsy`); - } - return receiptLockRes; - } - throw new InternalServerError( - `${fn}: neither FabricAPI nor Connector given`, - ); - } - - async fabricGetBlockByTxID( - networkDetails: FabricNetworkDetails, - txId: string, - connectorOrApiClient: PluginLedgerConnectorFabric | FabricApi, - ): Promise<{ hash: string; signers: string[] }> { - const fn = `${StrategyFabric.CLASS_NAME}#fabricGetBlockByTxID()`; - const gatewayOptions = { - identity: networkDetails.signingCredential.keychainRef, - wallet: { - keychain: { - keychainId: networkDetails.signingCredential.keychainId, - keychainRef: networkDetails.signingCredential.keychainRef, - }, - }, - }; - const getBlockReq = { - channelName: networkDetails.channelName as string, - gatewayOptions, - query: { - transactionId: txId, - }, - skipDecode: false, - }; - - let block_data; - - if (!connectorOrApiClient) { - throw new BadRequestError(`${fn} connectorOrApiClient is falsy`); - } else if (connectorOrApiClient instanceof PluginLedgerConnectorFabric) { - const connector: PluginLedgerConnectorFabric = connectorOrApiClient; - const response = await connector.getBlock(getBlockReq); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - block_data = response; - } else if (connectorOrApiClient instanceof FabricApi) { - const api: FabricApi = connectorOrApiClient; - const response = await api.getBlockV1(getBlockReq); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - this.log.debug( - "FabricAPI non-2xx HTTP response:", - data, - status, - config, - ); - const errorMessage = `${fn} FabricAPI error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - block_data = response.data; - } else { - throw new InternalServerError( - `${fn}: neither FabricAPI nor Connector given`, - ); - } - - const block = JSON.parse(JSON.stringify(block_data)).decodedBlock; - - const blockSig = block.metadata.metadata[0].signatures; - const sigs = []; - for (const sig of blockSig) { - const decoded = { - creator: { - mspid: sig.signature_header.creator.mspid, - id: Buffer.from(sig.signature_header.creator.id_bytes.data).toString( - "hex", - ), - }, - signature: Buffer.from(sig.signature.data).toString("hex"), - }; - sigs.push(JSON.stringify(decoded)); - } - return { - hash: Buffer.from(block.header.data_hash.data).toString("hex"), - signers: sigs, - }; - } - - async getAllAssetsKey( - networkDetails: FabricNetworkDetails, - connectorOrApiClient: PluginLedgerConnectorFabric | FabricApi, - ): Promise { - const fn = `${StrategyFabric.CLASS_NAME}#getAllAssetsKey()`; - const parameters = { - signingCredential: networkDetails.signingCredential, - channelName: networkDetails.channelName, - contractName: networkDetails.contractName, - methodName: "GetAllAssetsKey", - invocationType: FabricContractInvocationType.Call, - params: [], - } as RunTransactionRequest; - - if (!connectorOrApiClient) { - throw new BadRequestError(`${fn} connectorOrApiClient is falsy`); - } else if (connectorOrApiClient instanceof PluginLedgerConnectorFabric) { - const connector: PluginLedgerConnectorFabric = connectorOrApiClient; - const response = await connector.transact(parameters); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.functionOutput) { - throw new InternalServerError(`${fn} response.functionOutput is falsy`); - } - const { functionOutput } = response; - if (!(typeof functionOutput === "string")) { - throw new InternalServerError( - `${fn} response.functionOutput is not a string`, - ); - } - return functionOutput; - } else if (connectorOrApiClient instanceof FabricApi) { - const api: FabricApi = connectorOrApiClient; - const response = await api.runTransactionV1(parameters); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - this.log.debug( - "FabricAPI non-2xx HTTP response:", - data, - status, - config, - ); - const errorMessage = `${fn} FabricAPI error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - if (!data.functionOutput) { - throw new InternalServerError(`${fn} response.functionOutput is falsy`); - } - const { functionOutput } = data; - if (!(typeof functionOutput === "string")) { - throw new InternalServerError( - `${fn} response.functionOutput is not a string`, - ); - } - return functionOutput; - } - throw new InternalServerError( - `${fn}: neither FabricAPI nor Connector given`, - ); - } - - async getAllTxByKey( - networkDetails: FabricNetworkDetails, - key: string, - connectorOrApiClient: PluginLedgerConnectorFabric | FabricApi, - ): Promise { - const fn = `${StrategyFabric.CLASS_NAME}#getAllTxByKey()`; - const parameters = { - signingCredential: networkDetails.signingCredential, - channelName: networkDetails.channelName, - contractName: networkDetails.contractName, - methodName: "GetAllTxByKey", - invocationType: FabricContractInvocationType.Call, - params: [key], - } as RunTransactionRequest; - - if (!connectorOrApiClient) { - throw new BadRequestError(`${fn} connectorOrApiClient is falsy`); - } else if (connectorOrApiClient instanceof PluginLedgerConnectorFabric) { - const connector: PluginLedgerConnectorFabric = connectorOrApiClient; - const response = await connector.transact(parameters); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.functionOutput) { - throw new InternalServerError(`${fn} response.functionOutput is falsy`); - } - return this.txsStringToTxs(response.functionOutput); - } else if (connectorOrApiClient instanceof FabricApi) { - const api: FabricApi = connectorOrApiClient; - const response = await api.runTransactionV1(parameters); - if (!response) { - throw new InternalServerError(`${fn} response is falsy`); - } - if (!response.status) { - throw new InternalServerError(`${fn} response.status is falsy`); - } - const { status, data, statusText, config } = response; - if (response.status < 200 || response.status > 300) { - this.log.debug( - "FabricAPI non-2xx HTTP response:", - data, - status, - config, - ); - const errorMessage = `${fn} FabricAPI error status: ${status}: ${statusText}`; - throw new InternalServerError(errorMessage); - } - if (!data) { - throw new InternalServerError(`${fn} response.data is falsy`); - } - if (!data.functionOutput) { - throw new InternalServerError(`${fn} response.functionOutput is falsy`); - } - return this.txsStringToTxs(data.functionOutput); - } - throw new InternalServerError( - `${fn}: neither FabricAPI nor Connector given`, - ); - } - - // Receive transactions in string format and parses to Transaction [] - txsStringToTxs(txString: string): Transaction[] { - const transactions: Transaction[] = []; - const txs = JSON.parse(txString); - for (const tx of txs) { - const txId = tx.value.txId; - const ts = tx.value.timestamp.seconds; - const transaction = new Transaction( - txId, - ts, - new TransactionProof(new Proof({ creator: "" }), txId), //transaction proof details are set in function 'generateLedgerStates' - ); - transaction.setPayload(JSON.stringify(tx.value)); - transactions.push(transaction); - } - return transactions.reverse(); - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/utils.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/utils.ts deleted file mode 100644 index 427cca87dc..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/utils.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { Proof } from "./view-creation/proof"; -import { Snapshot } from "./view-creation/snapshot"; -import { State } from "./view-creation/state"; -import { Block, StateProof } from "./view-creation/state-proof"; -import { Transaction } from "./view-creation/transaction"; -import { TransactionProof } from "./view-creation/transaction-proof"; -import { View, IViewMetadata } from "./view-creation/view"; - -export function deserializeView(viewStr: string): View { - const view = JSON.parse(JSON.parse(viewStr).view); - const snapshot = view.snapshot; - const states = snapshot.stateBins; - const stateBin: State[] = []; - for (const state of states) { - const transactions = state.transactions; - const txs: Transaction[] = []; - for (const t of transactions) { - const txProof: TransactionProof = new TransactionProof( - new Proof({ - creator: t.proof.transactionCreator.creator, - mspid: t.proof.transactionCreator.mspid, - signature: t.proof.transactionCreator.signature, - }), - t.proof.hash, - ); - const tx = new Transaction(t.id, t.timeStamp, txProof); - - if (t.proof.endorsements == undefined) { - txs.push(tx); - continue; - } - - for (const endors of t.proof.endorsements) { - const endorsement = new Proof({ - creator: endors.creator, - mspid: endors.mspid, - signature: endors.signature, - }); - tx.addEndorser(endorsement); - } - txs.push(tx); - } - - const stateN = new State(state.id, state.values, txs); - const stateProofs: StateProof[] = []; - for (const proof of state.stateProof) { - const stateProof = new StateProof( - proof.value, - proof.version, - proof.stateID, - ); - - proof.blocks.forEach((block: unknown) => { - stateProof.addBlock(block as Block); - }); - stateProofs.push(stateProof); - } - stateN.setStateProof(stateProofs); - stateBin.push(stateN); - } - - const snapshotNew = new Snapshot(snapshot.id, snapshot.participant, stateBin); - snapshotNew.update_TI_TF(); - const viewNew = new View( - view.creator, - view.tI, - view.tF, - snapshotNew, - view.key, - ); - for (const metadata of view.oldVersionsMetadata) { - viewNew.addPrevVersionMetadata(metadata as IViewMetadata); - } - viewNew.setPrivacyPolicyValue(view.policy); - viewNew.setCreator(view.creator); - - if ( - viewNew.getViewProof().statesMerkleRoot != view.viewProof.statesMerkleRoot - ) { - throw Error("Error Parsing view. States root does not match"); - } - if ( - viewNew.getViewProof().transactionsMerkleRoot != - view.viewProof.transactionsMerkleRoot - ) { - throw Error("Error Parsing view. Transactions root does not match"); - } - return viewNew; -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts deleted file mode 100644 index a32c5314d5..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { PrivacyPolicyOpts } from "../generated/openapi/typescript-axios"; -import { View } from "./view"; - -export interface IPrivacyPolicy { - (view: View, ...args: string[]): View; -} -export interface IPrivacyPolicyValue { - policy: PrivacyPolicyOpts; - policyHash: string; -} -export class PrivacyPolicies { - constructor() {} - - public pruneState(view: View, stateId: string): View { - const snapshot = view.getSnapshot(); - snapshot.removeState(stateId); - snapshot.update_TI_TF(); - return view; - } - - public getPrivacyPolicy(opts: PrivacyPolicyOpts): IPrivacyPolicy | undefined { - switch (opts) { - case PrivacyPolicyOpts.PruneState: - return this.pruneState; - break; - default: - return undefined; - break; - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/proof.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/proof.ts deleted file mode 100644 index 69f18b79bc..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/proof.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Proof is a general purpose type, used to represent signatures of diverse elements. -// Proof may be used, for example in Fabric, to represent an transaction endorsement -// Or simply the signature of a transaction upon is creation (in Besu) -export class Proof { - // The term creator refers to the ID of the entity who created the signature - // For example endorserID in Fabric (when Proof represents an endorsement) - // or a transaction creator ID(in TransactionProof.transactionCreator) - private creator: string; - private mspid?: string; - private signature?: string; - - constructor(settings: { - creator: string; - mspid?: string; - signature?: string; - }) { - this.creator = settings.creator; - this.mspid = settings.mspid ? settings.mspid : "undefined"; - this.signature = settings.signature ? settings.signature : "undefined"; - } - - public printEndorsement(): string { - return ( - "Endorsement: \n " + - this.creator + - " \n " + - this.mspid + - " \n " + - this.signature - ); - } - - public getEndorsementJson(): string { - const proof = { - creator: this.creator, - mspid: this.mspid, - signature: this.signature, - }; - return JSON.stringify(proof); - } - - public getCreator(): string { - return this.creator; - } - - public getMspid(): string | undefined { - return this.mspid; - } - - public getSignature(): string | undefined { - return this.signature; - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts deleted file mode 100644 index 3a22583fa8..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { State } from "./state"; - -export class Snapshot { - private id: string; - private participant; - private stateBins: State[]; //set of state bins - private tI: string = ""; - private tF: string = ""; - - constructor(id: string, participant: string, stateBins: State[]) { - this.id = id; - this.participant = participant; - this.stateBins = stateBins; - } - public getParticipant(): string { - return this.participant; - } - private getId(): string { - return this.id; - } - - public getTI() { - return this.tI; - } - public getTF() { - return this.tF; - } - public setTF(tF: string) { - this.tF = tF; - } - - public setTI(tI: string) { - this.tI = tI; - } - - public update_TI_TF() { - let ti = 999999999999999; - let tf = 0; - for (const bin of this.stateBins) { - const tI = Number(bin.getInitialTime()); - const tF = Number(bin.getFinalTime()); - if (tf < tF) { - tf = tF; - } - if (ti > tI) { - ti = tI; - } - } - this.tF = tf.toString(); - this.tI = ti.toString(); - } - - public pruneStates(tI: string, tF: string): void { - for (const state of this.stateBins) { - state.pruneState(tI, tF); - } - } - - public getStateBins() { - return this.stateBins; - } - - public filterStates(tI: string, tF: string): void { - const finalT = BigInt(tF); - const initialT = BigInt(tI); - const stateBins: State[] = []; - for (const state of this.stateBins) { - if ( - BigInt(state.getInitialTime()) > finalT || - BigInt(state.getFinalTime()) < initialT - ) { - continue; - } - stateBins.push(state); - } - this.stateBins = stateBins; - } - - public getSnapshotJson(): string { - const snapshotJson = { - id: this.id, - participant: this.participant, - stateBins: this.stateBins, - }; - - return JSON.stringify(snapshotJson); - } - - public removeState(stateId: string) { - this.stateBins = this.stateBins.filter((state) => { - return state.getId() !== stateId; - }); - this.update_TI_TF(); - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state-proof.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state-proof.ts deleted file mode 100644 index 0854254a88..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state-proof.ts +++ /dev/null @@ -1,32 +0,0 @@ -export interface Block { - blockHash: string; - blockCreator: string; - blockSigners: string[]; -} - -export class StateProof { - private stateID: string; - private value: string; - private blocks: Block[]; - private version: number; - - constructor(value: string, version: number, stateID: string) { - this.blocks = []; - this.value = value; - this.version = version; - this.stateID = stateID; - } - - public getValue() { - return this.value; - } - public getVersion() { - return this.version; - } - public getStateID() { - return this.stateID; - } - public addBlock(block: Block) { - this.blocks.push(block); - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts deleted file mode 100644 index b390afa36c..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { StateProof } from "./state-proof"; -import { Transaction } from "./transaction"; - -export class State { - private id: string; - private version: number; - private values: string[]; - private transactions: Transaction[]; - private stateProof: StateProof[] = []; - - constructor(id: string, stateBins: string[], transactions: Transaction[]) { - this.id = id; - this.version = transactions.length; - this.values = stateBins; - this.transactions = transactions; - } - - public getStateProof(): StateProof[] { - return this.stateProof; - } - public getId(): string { - return this.id; - } - - public getValues(): string[] { - return this.values; - } - - public setStateProof(proof: StateProof[]) { - this.stateProof = proof; - } - - public getStateJson(): string { - const txs: string[] = []; - const txEndorsements: string[] = []; - - for (const tx of this.transactions) { - txs.push(tx.getTxJson()); - txEndorsements.push(JSON.stringify(tx.getProof())); - } - - const jsonSnap = { - id: this.id, - version: this.getVersion(), - values: this.values, - transactions: txs, - proofs: txEndorsements, - }; - - return JSON.stringify(jsonSnap); - } - - public getTransactions() { - return this.transactions; - } - - public getInitialTime(): string { - if (this.transactions.length >= 1) { - return this.transactions[0].getTimeStamp(); - } - return ""; - } - - public getFinalTime(): string { - if (this.transactions.length >= 1) { - return this.transactions[this.transactions.length - 1].getTimeStamp(); - } - return ""; - } - public getValue(): string { - return this.values[this.values.length - 1]; - } - - public getVersion(): string { - return this.version.toString(); - } - - public pruneState(tI: string, tF: string): void { - const initialT = BigInt(tI); - const finalT = BigInt(tF); - // eslint-disable-next-line prefer-const - this.transactions.forEach((element, index) => { - if ( - BigInt(element.getTimeStamp()) < initialT || - BigInt(element.getTimeStamp()) > finalT - ) { - //this.version = this.version - 1; - this.transactions.splice(index, 1); //Remove tx - this.values?.splice(index, 1); //Remove state of tx - } - }); - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction-proof.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction-proof.ts deleted file mode 100644 index 1e3f51f065..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction-proof.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Proof } from "./proof"; - -export class TransactionProof { - private transactionCreator: Proof; - - //set of signed endorsements - //only existent for some ledgers (example Fabric) - private endorsements?: Proof[] = []; - private hash: string; - constructor(transactionCreator: Proof, hash: string) { - this.transactionCreator = transactionCreator; - this.hash = hash; - } - - public addEndorser(endorser: Proof) { - this.endorsements?.push(endorser); - } - - public printEndorsement(): string { - return ( - "Endorsement: \n " + this.transactionCreator + " \n " + this.endorsements - ); - } - - public getEndorsementJson(): string { - const proof = { - transactionCreator: this.transactionCreator, - endorsements: this.endorsements, - }; - return JSON.stringify(proof); - } - - public getCreator(): Proof { - return this.transactionCreator; - } - public setCreator(transactionCreator: Proof) { - this.transactionCreator = transactionCreator; - } - - public getEndorsements(): Proof[] | undefined { - return this.endorsements; - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction.ts deleted file mode 100644 index 07fbe6212f..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Proof } from "./proof"; -import { TransactionProof } from "./transaction-proof"; - -export class Transaction { - private id: string; - private timeStamp: string; - private proof: TransactionProof; - private stateId?: string; - private payload?: string; - private target?: string; - - constructor(id: string, timeStamp: string, proof: TransactionProof) { - this.id = id; - this.timeStamp = timeStamp; - this.proof = proof; - } - - public printTransaction(): string { - return "Transaction: \n " + this.id + " \n " + this.timeStamp; - } - - public addEndorser(endorser: Proof): void { - this.proof.addEndorser(endorser); - } - public getId(): string { - return this.id; - } - - public getTarget() { - return this.target; - } - public getPayload() { - return this.payload; - } - public getStateId() { - return this.stateId; - } - - //public setBlockN(n: number) { - // this.blockN = n; - //} - - public setTarget(target: string) { - this.target = target; - } - public setPayload(payload: string) { - this.payload = payload; - } - public setStateId(stateId: string) { - this.stateId = stateId; - } - - public getTxJson(): string { - const tx = { Id: this.id, TimeStamp: this.timeStamp }; - return JSON.stringify(tx); - } - - public getProof(): TransactionProof { - //const txProofs = { id: this.id, proof: this.proof }; - return this.proof; - } - - public getTimeStamp(): string { - return this.timeStamp; - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/view.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/view.ts deleted file mode 100644 index 9e076131f5..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/view.ts +++ /dev/null @@ -1,162 +0,0 @@ -import { v4 as uuidV4 } from "uuid"; -import { Snapshot } from "./snapshot"; -import MerkleTree from "merkletreejs"; -import { Transaction } from "./transaction"; -import { IPrivacyPolicy, IPrivacyPolicyValue } from "./privacy-policies"; -import { PrivacyPolicyOpts } from "../generated/openapi/typescript-axios"; -import { JsObjectSigner } from "@hyperledger/cactus-common"; - -export interface IViewMetadata { - viewId: string; - viewProof: { - transactionsMerkleRoot: string; - statesMerkleRoot: string; - }; - policy?: IPrivacyPolicyValue; - creator: string; - signature: string; -} - -export class View { - private key: string; - private snapshot: Snapshot; - private tI: string; - private tF: string; - private participant: string; - private creator: string; - private oldVersionsMetadata: IViewMetadata[] = []; - private policy?: IPrivacyPolicyValue; - private viewProof: { - transactionsMerkleRoot: string; - statesMerkleRoot: string; - }; - - constructor( - creator: string, - tI: string, - tF: string, - snapshot: Snapshot, - id: string | undefined, - ) { - this.creator = creator; - this.key = id ? id : uuidV4(); // FIXME receive as input maybe - this.tI = tI; - this.tF = tF; - this.snapshot = snapshot; - this.participant = snapshot.getParticipant(); - snapshot.pruneStates(this.tI, this.tF); - this.viewProof = this.generateViewProof(); - } - - public setCreator(creator: string) { - this.creator = creator; - } - public getTI() { - return this.tI; - } - public getTF() { - return this.tF; - } - - public getCreator(): string { - return this.creator; - } - - public addPrevVersionMetadata(data: IViewMetadata) { - this.oldVersionsMetadata.push(data); - } - - public getPolicy() { - return this.policy; - } - - public getKey() { - return this.key; - } - public getSnapshot(): Snapshot { - return this.snapshot; - } - public updateViewProof() { - this.viewProof = this.generateViewProof(); - } - private generateViewProof(): { - transactionsMerkleRoot: string; - statesMerkleRoot: string; - } { - const states: string[] = []; - const transactions: string[] = []; - - for (const state of this.snapshot.getStateBins()) { - states.push(JSON.stringify(state.getStateProof())); - for (const transaction of state.getTransactions()) { - transactions.push(JSON.stringify(transaction.getProof())); - } - } - - const statesTree = new MerkleTree(states, undefined, { - sort: true, - hashLeaves: true, - }); - const transactionsTree = new MerkleTree(transactions, undefined, { - sort: true, - hashLeaves: true, - }); - return { - transactionsMerkleRoot: transactionsTree.getRoot().toString("hex"), - statesMerkleRoot: statesTree.getRoot().toString("hex"), - }; - } - public getViewStr(): string { - const viewStr = { - tI: this.tI, - tF: this.tF, - snapshot: this.snapshot, - }; - return JSON.stringify(viewStr); - // return this.snapshot.getSnapshotJson(); - } - public getViewProof(): { - transactionsMerkleRoot: string; - statesMerkleRoot: string; - } { - return this.viewProof; - } - - public getParticipant(): string { - return this.participant; - } - - public getAllTransactions(): Transaction[] { - const transactions: Transaction[] = []; - this.snapshot.getStateBins().forEach((state) => { - state.getTransactions().forEach((transaction) => { - transactions.push(transaction); - }); - }); - return transactions; - } - public setPrivacyPolicyValue(value: IPrivacyPolicyValue | undefined) { - this.policy = value; - } - public setPrivacyPolicy( - policy: PrivacyPolicyOpts, - func: IPrivacyPolicy, - signer: JsObjectSigner, - ) { - this.policy = { - policy, - policyHash: signer.dataHash(func.toString()), - }; - } - - public setParticipant(participant: string) { - this.participant = participant; - } - public setKey(key: string) { - this.key = key; - } - - public getOldVersionsMetadata(): IViewMetadata[] { - return this.oldVersionsMetadata; - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/extended-state.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/extended-state.ts deleted file mode 100644 index 3e094706a9..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/extended-state.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { State } from "../view-creation/state"; - -export class ExtendedState { - private states: Map; - constructor() { - this.states = new Map(); - } - public getState(viewId: string): State | undefined { - return this.states.get(viewId); - } - public setState(viewId: string, state: State) { - if (this.getState(viewId) == undefined) { - this.states.set(viewId, state); - } - } - public getStates(): Map { - return this.states; - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/integrated-view.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/integrated-view.ts deleted file mode 100644 index 36e8607b59..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/integrated-view.ts +++ /dev/null @@ -1,167 +0,0 @@ -import MerkleTree from "merkletreejs"; -import { v4 as uuidV4 } from "uuid"; -import { State } from "../view-creation/state"; -import { ExtendedState } from "./extended-state"; -import { IMergePolicy, IMergePolicyValue } from "./merge-policies"; - -import { Transaction } from "../view-creation/transaction"; -import { IViewMetadata } from "../view-creation/view"; -import { MergePolicyOpts } from "../generated/openapi/typescript-axios"; -import { JsObjectSigner } from "@hyperledger/cactus-common"; - -export class IntegratedView { - private id: string; - private stateList: Map; - private tI: string; - private tF: string; - private participants: string[]; - //metadata about the views included in the Integrated View - private viewsMetadata: IViewMetadata[] = []; - //id of the privacy policy in the plugin instance, and hash of the policy function code used. - private integratedViewProof: { - transactionsMerkleRoot: string; - statesMerkleRoot: string; - viewsMerkleRoot: string; - }; - private privacyPolicy: IMergePolicyValue; - constructor( - privacyPolicyId: MergePolicyOpts, - privacyPolicy: IMergePolicy | undefined, - signer: JsObjectSigner, - ) { - this.stateList = new Map(); - this.id = uuidV4(); - //these are invalid values, they are changed in the process of merging Views - this.tI = "-1"; - this.tF = "-1"; - - this.participants = []; - this.privacyPolicy = { - policy: privacyPolicyId, - policyHash: privacyPolicy - ? signer.dataHash(privacyPolicy.toString()) - : undefined, - }; - - this.integratedViewProof = this.generateIntegratedViewProof(); - } - public getTI(): string { - return this.tI; - } - - public addIncludedViewMetadata(data: IViewMetadata) { - this.viewsMetadata.push(data); - } - public setTI(tI: string) { - this.tI = tI; - } - public getTF(): string { - return this.tF; - } - public setTF(TF: string) { - this.tF = TF; - } - public addParticipant(participant: string) { - this.participants.push(participant); - } - public isParticipant(participant: string): boolean { - return this.participants.includes(participant); - } - public getExtendedState(stateId: string): ExtendedState | undefined { - return this.stateList.get(stateId); - } - - public setIntegratedViewProof() { - this.integratedViewProof = this.generateIntegratedViewProof(); - } - - public getIntegratedViewProof(): { - transactionsMerkleRoot: string; - statesMerkleRoot: string; - } { - return this.integratedViewProof; - } - - public getExtendedStates(): Map { - return this.stateList; - } - - public createExtendedState(stateId: string) { - if (this.getExtendedState(stateId) == undefined) { - this.stateList.set(stateId, new ExtendedState()); - } - } - public addStateInExtendedState( - stateId: string, - viewId: string, - state: State, - ) { - const extendedState = this.getExtendedState(stateId); - if (extendedState != undefined) { - extendedState.setState(viewId, state); - } - } - - public getState(stateId: string, viewId: string): State | undefined { - return this.getExtendedState(stateId)?.getState(viewId); - } - - private generateIntegratedViewProof(): { - transactionsMerkleRoot: string; - statesMerkleRoot: string; - viewsMerkleRoot: string; - } { - const states: string[] = []; - const transactions: string[] = []; - this.getAllTransactions().forEach((transaction) => { - transactions.push(JSON.stringify(transaction.getProof())); - }); - - this.getAllStates().forEach((state) => { - states.push(JSON.stringify(state.getStateProof())); - }); - const statesTree = new MerkleTree(states, undefined, { - sort: true, - hashLeaves: true, - }); - const transactionsTree = new MerkleTree(transactions, undefined, { - sort: true, - hashLeaves: true, - }); - const viewsTree = new MerkleTree( - this.viewsMetadata.map((x) => JSON.stringify(x)), - undefined, - { - sort: true, - hashLeaves: true, - }, - ); - return { - transactionsMerkleRoot: transactionsTree.getRoot().toString("hex"), - statesMerkleRoot: statesTree.getRoot().toString("hex"), - viewsMerkleRoot: viewsTree.getRoot().toString("hex"), - }; - } - - public getAllTransactions(): Transaction[] { - const transactions: Transaction[] = []; - Array.from(this.getExtendedStates().values()).forEach((extendedState) => { - for (const state of Array.from(extendedState.getStates().values())) { - for (const transaction of state.getTransactions()) { - transactions.push(transaction); - } - } - }); - return transactions; - } - - public getAllStates(): State[] { - const states: State[] = []; - Array.from(this.getExtendedStates().values()).forEach((extendedState) => { - for (const state of Array.from(extendedState.getStates().values())) { - states.push(state); - } - }); - return states; - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/merge-policies.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/merge-policies.ts deleted file mode 100644 index ec0efaa494..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/merge-policies.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { MergePolicyOpts } from "../generated/openapi/typescript-axios"; -import { IntegratedView } from "./integrated-view"; -export interface IMergePolicy { - (view: IntegratedView, ...args: string[]): IntegratedView; -} - -export interface IMergePolicyValue { - policy: MergePolicyOpts; - policyHash?: string; //undefined if policy is NONE -} -export class MergePolicies { - constructor() {} - - public pruneState(view: IntegratedView, stateId: string): IntegratedView { - view.getExtendedStates().delete(stateId); - return view; - } - - public pruneStateFromView( - view: IntegratedView, - stateId: string, - viewId: string, - ): IntegratedView { - view.getExtendedState(stateId)?.getStates().delete(viewId); - return view; - } - - public getMergePolicy(opts: MergePolicyOpts): IMergePolicy | undefined { - switch (opts) { - case MergePolicyOpts.NONE: - return undefined; - break; - case MergePolicyOpts.PruneState: - return this.pruneState; - break; - case MergePolicyOpts.PruneStateFromView: - return this.pruneStateFromView; - break; - default: - return undefined; - break; - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/create-view-endpoint.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/create-view-endpoint.ts deleted file mode 100644 index 24575259af..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/create-view-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api/"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginBungeeHermes } from "../plugin-bungee-hermes"; - -export interface CreateViewEndpointOptions { - logLevel?: LogLevelDesc; - bungee: PluginBungeeHermes; -} - -export class CreateViewEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ClientEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return CreateViewEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: CreateViewEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.bungee, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/create-view" - ]; - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/create-view" - ]; - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/create-view" - ].get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const view = await this.options.bungee.onCreateView(req.body); - res.status(200).json(view); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/get-available-strategies-endpoint.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/get-available-strategies-endpoint.ts deleted file mode 100644 index 23fce2800d..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/get-available-strategies-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api/"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginBungeeHermes } from "../plugin-bungee-hermes"; - -export interface GetAvailableStrategiesEndpointOptions { - logLevel?: LogLevelDesc; - bungee: PluginBungeeHermes; -} - -export class GetAvailableStrategiesEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ClientEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return GetAvailableStrategiesEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: GetAvailableStrategiesEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.bungee, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-available-strategies" - ]; - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-available-strategies" - ]; - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-available-strategies" - ].get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public async handleRequest(_req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const strategies = this.options.bungee.getAvailableStrategies(); - res.status(200).json(strategies); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/get-public-key-endpoint.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/get-public-key-endpoint.ts deleted file mode 100644 index 836d1efa7d..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/get-public-key-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api/"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginBungeeHermes } from "../plugin-bungee-hermes"; - -export interface GetPublicKeyEndpointOptions { - logLevel?: LogLevelDesc; - bungee: PluginBungeeHermes; -} - -export class GetPublicKeyEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ClientEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return GetPublicKeyEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: GetPublicKeyEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.bungee, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-public-key" - ]; - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-public-key" - ]; - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/get-public-key" - ].get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public async handleRequest(_req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const pubKey = this.options.bungee.getPublicKey(); - res.status(200).json(pubKey); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/merge-views-endpoint.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/merge-views-endpoint.ts deleted file mode 100644 index 4a697f9c98..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/merge-views-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api/"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginBungeeHermes } from "../plugin-bungee-hermes"; - -export interface MergeViewsEndpointOptions { - logLevel?: LogLevelDesc; - bungee: PluginBungeeHermes; -} - -export class MergeViewsEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ClientEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return MergeViewsEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: MergeViewsEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.bungee, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/merge-views" - ]; - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/merge-views" - ]; - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/merge-views" - ].get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const view = this.options.bungee.onMergeViews(req.body); - res.status(200).json(view); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/process-view-endpoint.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/process-view-endpoint.ts deleted file mode 100644 index 86c9a83416..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/process-view-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api/"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginBungeeHermes } from "../plugin-bungee-hermes"; - -export interface ProcessViewEndpointOptions { - logLevel?: LogLevelDesc; - bungee: PluginBungeeHermes; -} - -export class ProcessViewEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ClientEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return ProcessViewEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ProcessViewEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.bungee, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/process-view" - ]; - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/process-view" - ]; - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/process-view" - ].get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const view = this.options.bungee.onProcessView(req.body); - res.status(200).json(view); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/verify-merkle-root-endpoint.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/verify-merkle-root-endpoint.ts deleted file mode 100644 index 94cbcbb32f..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/web-services/verify-merkle-root-endpoint.ts +++ /dev/null @@ -1,109 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api/"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginBungeeHermes } from "../plugin-bungee-hermes"; - -export interface VerifyMerkleRootEndpointOptions { - logLevel?: LogLevelDesc; - bungee: PluginBungeeHermes; -} - -export class VerifyMerkleRootEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ClientEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return VerifyMerkleRootEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: VerifyMerkleRootEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.bungee, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/verify-merkle-root" - ]; - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/verify-merkle-root" - ]; - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-bungee-hermes/verify-merkle-root" - ].get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const result = { - result: await this.options.bungee.verifyMerkleProof( - req.body.input, - req.body.root, - ), - }; - res.status(200).json(result); - } catch (ex: unknown) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore deleted file mode 100644 index 79bfe1a3e0..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# - - -# Coverage directory used by tools like istanbul -coverage - -# Dependency directories -node_modules/ -jspm_packages/ -package-lock.json - -# Compiled TypeScript files -dist - diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json deleted file mode 100644 index 841f7b90c7..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "asset-transfer-basic", - "version": "1.0.0", - "description": "Asset Transfer Basic contract implemented in TypeScript", - "main": "dist/index.js", - "typings": "dist/index.d.ts", - "engines": { - "node": ">=12", - "npm": ">=5" - }, - "scripts": { - "start": "fabric-chaincode-node start", - "build": "tsc" - }, - "engineStrict": true, - "author": "Hyperledger", - "license": "Apache-2.0", - "dependencies": { - "fabric-contract-api": "2.2.2", - "fabric-shim": "2.2.2" - }, - "devDependencies": { - "@types/chai": "4.3.0", - "@types/mocha": "5.2.7", - "@types/node": "10.17.60", - "@types/sinon": "5.0.7", - "@types/sinon-chai": "3.2.8", - "typescript": "5.5.2" - }, - "nyc": { - "extension": [ - ".ts", - ".tsx" - ], - "exclude": [ - "coverage/**", - "dist/**" - ], - "reporter": [ - "text-summary", - "html" - ], - "all": true, - "check-coverage": true, - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts deleted file mode 100644 index f93f19710e..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { Object, Property } from "fabric-contract-api"; - -@Object() -export class Asset { - @Property() - public docType?: string; - - @Property() - public ID: string; - - @Property() - public isLocked: boolean; - - @Property() - public size: number; -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts deleted file mode 100644 index a98006bfa5..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts +++ /dev/null @@ -1,182 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { - Context, - Contract, - Info, - Returns, - Transaction, -} from "fabric-contract-api"; -import { Asset } from "./asset"; - -@Info({ - title: "AssetTransfer", - description: "Smart contract for trading assets", -}) -export class AssetTransferContract extends Contract { - @Transaction() - public async InitLedger(ctx: Context): Promise { - const assets: Asset[] = [ - { - ID: "asset1", - size: 5, - isLocked: false, - }, - { - ID: "asset2", - size: 5, - isLocked: false, - }, - ]; - - for (const asset of assets) { - asset.docType = "asset"; - await ctx.stub.putState(asset.ID, Buffer.from(JSON.stringify(asset))); - console.info(`Asset ${asset.ID} initialized`); - } - } - - // CreateAsset issues a new asset to the world state with given details. - @Transaction() - public async CreateAsset( - ctx: Context, - id: string, - size: number, - ): Promise { - const asset: Asset = { - ID: id, - size: size, - isLocked: false, - }; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // ReadAsset returns the asset stored in the world state with given id. - @Transaction(false) - public async ReadAsset(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); // get the asset from chaincode state - if (!assetJSON || assetJSON.length === 0) { - throw new Error(`The asset ${id} does not exist`); - } - return assetJSON.toString(); - } - - // UpdateAsset updates an existing asset in the world state with provided parameters. - @Transaction() - public async UpdateAsset( - ctx: Context, - id: string, - size: number, - ): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - if (this.IsAssetLocked(ctx, id)) { - throw new Error(`The asset ${id} is locked`); - } - - // overwriting original asset with new asset - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.size = size; - return ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // DeleteAsset deletes an given asset from the world state. - @Transaction() - public async DeleteAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - return ctx.stub.deleteState(id); - } - - // AssetExists returns true when asset with given ID exists in world state. - @Transaction(false) - @Returns("boolean") - public async AssetExists(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - return assetJSON && assetJSON.length > 0; - } - - // IsAssetLocked returns true when asset with given ID is locked in world state. - @Transaction(false) - @Returns("boolean") - public async IsAssetLocked(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - - if (assetJSON && assetJSON.length > 0) { - const asset = JSON.parse(assetJSON.toString()); - return asset.isLocked; - } else { - throw new Error(`The asset ${id} does not exist`); - } - } - - @Transaction(false) - @Returns("boolean") - public async LockAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - // if (this.IsAssetLocked(ctx, id)) { - // throw new Error(`The asset ${id} is already locked`); - // } - - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.isLocked = true; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return true; - } - - @Transaction(false) - @Returns("boolean") - public async UnlockAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.isLocked = false; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return true; - } - - // GetAllAssets returns all assets found in the world state. - @Transaction(false) - @Returns("string") - public async GetAllAssets(ctx: Context): Promise { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - const strValue = Buffer.from(result.value.value.toString()).toString( - "utf8", - ); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push({ Key: result.value.key, Record: record }); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts deleted file mode 100644 index 020a09f410..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { AssetTransferContract } from "./assetTransfer"; - -export { AssetTransferContract } from "./assetTransfer"; - -export const contracts: any[] = [AssetTransferContract]; diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json deleted file mode 100644 index 80d8e12d8c..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "outDir": "dist", - "target": "es2017", - "moduleResolution": "node", - "module": "commonjs", - "declaration": true, - "sourceMap": true - }, - "include": [ - "./src/**/*" - ], - "exclude": [ - "./src/**/*.spec.ts" - ] -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/.gitignore b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/.gitignore deleted file mode 100644 index 79bfe1a3e0..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# - - -# Coverage directory used by tools like istanbul -coverage - -# Dependency directories -node_modules/ -jspm_packages/ -package-lock.json - -# Compiled TypeScript files -dist - diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/package.json b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/package.json deleted file mode 100644 index 93548fd912..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "asset-transfer-basic", - "version": "1.0.0", - "description": "Asset Transfer Basic contract implemented in TypeScript", - "main": "dist/index.js", - "typings": "dist/index.d.ts", - "engines": { - "node": ">=12", - "npm": ">=5" - }, - "scripts": { - "start": "fabric-chaincode-node start", - "build": "tsc" - }, - "engineStrict": true, - "author": "Hyperledger", - "license": "Apache-2.0", - "dependencies": { - "fabric-contract-api": "2.2.2", - "fabric-shim": "2.2.2" - }, - "devDependencies": { - "@types/chai": "4.3.0", - "@types/mocha": "5.2.7", - "@types/node": "18.11.9", - "@types/sinon": "5.0.7", - "@types/sinon-chai": "3.2.8", - "typescript": "5.5.2" - }, - "nyc": { - "extension": [ - ".ts", - ".tsx" - ], - "exclude": [ - "coverage/**", - "dist/**" - ], - "reporter": [ - "text-summary", - "html" - ], - "all": true, - "check-coverage": true, - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/ITraceableContract.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/ITraceableContract.ts deleted file mode 100644 index f0596b3843..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/ITraceableContract.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { Context } from "fabric-contract-api"; - -export interface ITraceableContract { - // GetAllAssetsKey returns all assets key found in the world state. - GetAllAssetsKey(ctx: Context): Promise; - - // GetAllTxByKey returns all transations for a specific key. - GetAllTxByKey(ctx: Context, key: string): Promise; -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/asset.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/asset.ts deleted file mode 100644 index a4336c9e7f..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/asset.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { Object, Property } from "fabric-contract-api"; - -@Object() -export class Asset { - @Property() - public docType?: string; - - @Property() - public ID: string; - - @Property() - public Value: number; -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/assetTransfer.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/assetTransfer.ts deleted file mode 100644 index 89bfdb7a71..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/assetTransfer.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ -import { ITraceableContract } from "./ITraceableContract"; -import { - Context, - Contract, - Info, - Returns, - Transaction, -} from "fabric-contract-api"; -import { Asset } from "./asset"; - -@Info({ - title: "AssetTransfer", - description: "Smart contract for trading assets", -}) -export class AssetTransferContract - extends Contract - implements ITraceableContract -{ - @Transaction() - public async InitLedger(ctx: Context): Promise { - const assets: Asset[] = [ - { - ID: "asset1", - Value: 1, - }, - { - ID: "asset2", - Value: 2, - }, - { - ID: "asset3", - Value: 3, - }, - { - ID: "asset4", - Value: 4, - }, - { - ID: "asset5", - Value: 5, - }, - { - ID: "asset6", - Value: 6, - }, - ]; - - for (const asset of assets) { - asset.docType = "asset"; - await ctx.stub.putState(asset.ID, Buffer.from(JSON.stringify(asset))); - console.info(`Asset ${asset.ID} initialized`); - } - } - - @Transaction() - public async InitLedgerV2(ctx: Context): Promise { - const assets: Asset[] = []; - for (let asset = 0; asset < 10; asset++) { - const assetName = "ASSET" + asset; - for (let state = 0; state < 10; state++) { - assets.push({ - ID: assetName, - Value: state, - }); - } - } - - for (const asset of assets) { - asset.docType = "asset"; - await ctx.stub.putState(asset.ID, Buffer.from(JSON.stringify(asset))); - console.info(`Asset ${asset.ID} initialized`); - } - } - // AssetExists returns true when asset with given ID exists in world state. - @Transaction(false) - @Returns("boolean") - public async AssetExists(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - return assetJSON && assetJSON.length > 0; - } - - // CreateAsset issues a new asset to the world state with given details. - @Transaction() - public async CreateAsset( - ctx: Context, - id: string, - value: number, - ): Promise { - const asset = { - ID: id, - Value: value, - }; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // ReadAsset returns the asset stored in the world state with given id. - @Transaction(false) - public async ReadAsset(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); // get the asset from chaincode state - if (!assetJSON || assetJSON.length === 0) { - throw new Error(`The asset ${id} does not exist`); - } - return assetJSON.toString(); - } - - // UpdateAsset updates an existing asset in the world state with provided parameters. - @Transaction() - public async UpdateAsset( - ctx: Context, - id: string, - value: number, - ): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - // overwriting original asset with new asset - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.Value = value; - return ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // GetAllAssets returns all assets found in the world state. - @Transaction(false) - @Returns("string") - public async GetAllAssets(ctx: Context): Promise { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - const strValue = Buffer.from(result.value.value.toString()).toString( - "utf8", - ); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push({ Key: result.value.key, Record: record }); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } - - // GetAllAssetsKey returns all assets key found in the world state. - @Transaction(false) - @Returns("string") - public async GetAllAssetsKey(ctx: Context): Promise { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - allResults.push(result.value.key); - result = await iterator.next(); - } - return allResults.toString(); - } - - // GetAllTxByKey returns all transations for a specific key. - @Transaction(false) - @Returns("string") - public async GetAllTxByKey(ctx: Context, key: string): Promise { - const allResults = []; - const iterator = await ctx.stub.getHistoryForKey(key); - let result = await iterator.next(); - while (!result.done) { - const strValue = JSON.stringify(result); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push(record); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } - - // // CreateAsset issues a new asset to the world state with given details. - // @Transaction() - // public async GetTransations(ctx: Context, id: string): Promise { - // const asset = { - // ID: id, - // }; - - // await ctx.stub.get; - // // await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - // } -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/index.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/index.ts deleted file mode 100644 index 020a09f410..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { AssetTransferContract } from "./assetTransfer"; - -export { AssetTransferContract } from "./assetTransfer"; - -export const contracts: any[] = [AssetTransferContract]; diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/tsconfig.json b/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/tsconfig.json deleted file mode 100644 index 80d8e12d8c..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/fabric-contracts/simple-asset/chaincode-typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "outDir": "dist", - "target": "es2017", - "moduleResolution": "node", - "module": "commonjs", - "declaration": true, - "sourceMap": true - }, - "include": [ - "./src/**/*" - ], - "exclude": [ - "./src/**/*.spec.ts" - ] -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/besu-test-basic.test.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/besu-test-basic.test.ts deleted file mode 100644 index b0211e41bb..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/besu-test-basic.test.ts +++ /dev/null @@ -1,393 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import "jest-extended"; -import LockAssetContractJson from "../solidity/lock-asset-contract/LockAsset.json"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import bodyParser from "body-parser"; - -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; - -import express from "express"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, - Containers, -} from "@hyperledger/cactus-test-tooling"; -import { Constants } from "@hyperledger/cactus-core-api"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - EthContractInvocationType, - ReceiptType, - IPluginLedgerConnectorBesuOptions, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; -import { Account } from "web3-core"; -import { - PluginBungeeHermes, - IPluginBungeeHermesOptions, -} from "../../../main/typescript/plugin-bungee-hermes"; - -import { - BesuNetworkDetails, - StrategyBesu, -} from "../../../main/typescript/strategy/strategy-besu"; - -const logLevel: LogLevelDesc = "INFO"; - -let besuLedger: BesuTestLedger; -let contractName: string; -//let besuServer: Server; - -let rpcApiHttpHost: string; -let rpcApiWsHost: string; -let web3: Web3; -let firstHighNetWorthAccount: string; -let connector: PluginLedgerConnectorBesu; -let besuKeyPair: { privateKey: string }; -let testEthAccount: Account; -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "BUNGEE - Hermes", -}); -let besuPath: string; -let pluginBungeeHermesOptions: IPluginBungeeHermesOptions; -let besuServer: Server; - -let bungeeSigningCredential: Web3SigningCredential; -let bungeeKeychainId: string; -let bungeeContractAddress: string; - -let keychainPlugin: PluginKeychainMemory; - -let networkDetailsList: BesuNetworkDetails[]; - -beforeEach(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - besuLedger = new BesuTestLedger({ - logLevel, - emitContainerLogs: true, - envVars: ["BESU_NETWORK=dev"], - }); - await besuLedger.start(); - - rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuLedger.getRpcApiWsHost(); - web3 = new Web3(rpcApiHttpHost); - firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); - - testEthAccount = await besuLedger.createEthTestAccount(); - - besuKeyPair = { - privateKey: besuLedger.getGenesisAccountPrivKey(), - }; - - contractName = "LockAsset"; - - const keychainEntryValue = besuKeyPair.privateKey; - const keychainEntryKey = uuidv4(); - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const pluginRegistry = new PluginRegistry({ - plugins: [keychainPlugin], - }); - - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - connector = new PluginLedgerConnectorBesu(options); - pluginRegistry.add(connector); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await connector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await connector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toBeGreaterThan(10e9); - - log.info("Connector initialized"); - - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - log.info("Contract Deployed successfully"); - - const res = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [BESU_ASSET_ID, 19], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res).toBeTruthy(); - expect(res.success).toBeTruthy(); - - const res3 = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res3).toBeTruthy(); - expect(res3.success).toBeTruthy(); - expect(res3.callOutput.toString()).toBeTruthy(); - - bungeeSigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - bungeeKeychainId = keychainPlugin.getKeychainId(); - - bungeeContractAddress = deployOut.transactionReceipt - .contractAddress as string; - - pluginBungeeHermesOptions = { - pluginRegistry, - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - instanceId: uuidv4(), - logLevel, - }; - } - networkDetailsList = [ - { - signingCredential: bungeeSigningCredential, - contractName, - connectorApiPath: besuPath, - keychainId: bungeeKeychainId, - contractAddress: bungeeContractAddress, - participant: firstHighNetWorthAccount, - } as BesuNetworkDetails, - { - signingCredential: bungeeSigningCredential, - contractName, - connector: connector, - keychainId: bungeeKeychainId, - contractAddress: bungeeContractAddress, - participant: firstHighNetWorthAccount, - } as BesuNetworkDetails, - ]; -}); - -test.each([{ apiPath: true }, { apiPath: false }])( - //test for both BesuApiPath and BesuConnector - "test creation of views for different timeframes and states using", - async ({ apiPath }) => { - let networkDetails: BesuNetworkDetails; - if (apiPath) { - networkDetails = networkDetailsList[0]; - } else { - networkDetails = networkDetailsList[1]; - } - const bungee = new PluginBungeeHermes(pluginBungeeHermesOptions); - const strategy = "BESU"; - bungee.addStrategy(strategy, new StrategyBesu("INFO")); - - const snapshot = await bungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view = bungee.generateView( - snapshot, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - //expect to return a view - expect(view.view).toBeTruthy(); - expect(view.signature).toBeTruthy(); - - //expect the view to have capture the new asset BESU_ASSET_ID, and attributes to match - expect(snapshot.getStateBins().length).toEqual(1); - expect(snapshot.getStateBins()[0].getId()).toEqual(BESU_ASSET_ID); - expect(snapshot.getStateBins()[0].getTransactions().length).toEqual(1); - - const view1 = bungee.generateView(snapshot, "0", "9999", undefined); - - //expects nothing to limit time of 9999 - expect(view1.view).toBeUndefined(); - expect(view1.signature).toBeUndefined(); - - //changing BESU_ASSET_ID value - const lockAsset = await connector?.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(lockAsset).not.toBeUndefined(); - expect(lockAsset.success).toBeTrue(); - - //creating new asset - const new_asset_id = uuidv4(); - const depNew = await connector?.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [new_asset_id, 10], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(depNew).not.toBeUndefined(); - expect(depNew.success).toBeTrue(); - - const snapshot1 = await bungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view2 = bungee.generateView( - snapshot1, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - //expect to return a view - expect(view2.view).toBeTruthy(); - expect(view2.signature).toBeTruthy(); - - const stateBins = snapshot1.getStateBins(); - expect(stateBins.length).toEqual(2); //expect to have captured state for both assets - - const bins = [stateBins[0].getId(), stateBins[1].getId()]; - - //checks if values match: - // - new value of BESU_ASSET_ID state in new snapshot different than value from old snapshot) - // - successfully captured transaction that created the new asset - if (bins[0] === BESU_ASSET_ID) { - expect(snapshot1.getStateBins()[0].getTransactions().length).toEqual(2); - expect(snapshot1.getStateBins()[0].getValue()).not.toEqual( - snapshot.getStateBins()[0].getValue(), - ); - expect(snapshot1.getStateBins()[1].getTransactions().length).toEqual(1); - } else { - expect(snapshot1.getStateBins()[0].getTransactions().length).toEqual(1); - expect(snapshot1.getStateBins()[1].getTransactions().length).toEqual(2); - expect(snapshot1.getStateBins()[1].getValue()).not.toEqual( - snapshot.getStateBins()[0].getValue(), - ); - } - }, -); - -afterEach(async () => { - await Servers.shutdown(besuServer); - await besuLedger.stop(); - await besuLedger.destroy(); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/besu-test-pruning.test.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/besu-test-pruning.test.ts deleted file mode 100644 index 95fae810ef..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/besu-test-pruning.test.ts +++ /dev/null @@ -1,364 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import "jest-extended"; -import LockAssetContractJson from "../solidity/lock-asset-contract/LockAsset.json"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import bodyParser from "body-parser"; - -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; - -import express from "express"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, - Containers, -} from "@hyperledger/cactus-test-tooling"; -import { Constants } from "@hyperledger/cactus-core-api"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - EthContractInvocationType, - ReceiptType, - IPluginLedgerConnectorBesuOptions, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; -import { Account } from "web3-core"; -import { - PluginBungeeHermes, - IPluginBungeeHermesOptions, -} from "../../../main/typescript/plugin-bungee-hermes"; - -import { - BesuNetworkDetails, - StrategyBesu, -} from "../../../main/typescript/strategy/strategy-besu"; - -const logLevel: LogLevelDesc = "INFO"; - -let besuLedger: BesuTestLedger; -let contractName: string; - -let rpcApiHttpHost: string; -let rpcApiWsHost: string; -let web3: Web3; -let firstHighNetWorthAccount: string; -let connector: PluginLedgerConnectorBesu; -let besuKeyPair: { privateKey: string }; -let testEthAccount: Account; -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "BUNGEE - Hermes", -}); -let besuPath: string; -let pluginBungeeHermesOptions: IPluginBungeeHermesOptions; -let besuServer: Server; - -let bungeeSigningCredential: Web3SigningCredential; -let bungeeKeychainId: string; -let bungeeContractAddress: string; - -let keychainPlugin: PluginKeychainMemory; - -let networkDetailsList: BesuNetworkDetails[]; - -beforeEach(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - besuLedger = new BesuTestLedger({ - logLevel, - emitContainerLogs: true, - envVars: ["BESU_NETWORK=dev"], - }); - await besuLedger.start(); - - rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuLedger.getRpcApiWsHost(); - web3 = new Web3(rpcApiHttpHost); - firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); - - testEthAccount = await besuLedger.createEthTestAccount(); - - besuKeyPair = { - privateKey: besuLedger.getGenesisAccountPrivKey(), - }; - - contractName = "LockAsset"; - - const keychainEntryValue = besuKeyPair.privateKey; - const keychainEntryKey = uuidv4(); - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const pluginRegistry = new PluginRegistry({ - plugins: [keychainPlugin], - }); - - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - connector = new PluginLedgerConnectorBesu(options); - pluginRegistry.add(connector); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await connector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await connector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toBeGreaterThan(10e9); - - log.info("Connector initialized"); - - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - log.info("Contract Deployed successfully"); - - const res = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [BESU_ASSET_ID, 19], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res).toBeTruthy(); - expect(res.success).toBeTruthy(); - - const res3 = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res3).toBeTruthy(); - expect(res3.success).toBeTruthy(); - expect(res3.callOutput.toString()).toBeTruthy(); - - bungeeSigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - bungeeKeychainId = keychainPlugin.getKeychainId(); - - bungeeContractAddress = deployOut.transactionReceipt - .contractAddress as string; - - pluginBungeeHermesOptions = { - pluginRegistry, - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - instanceId: uuidv4(), - logLevel, - }; - } - networkDetailsList = [ - { - signingCredential: bungeeSigningCredential, - contractName, - connectorApiPath: besuPath, - keychainId: bungeeKeychainId, - contractAddress: bungeeContractAddress, - participant: firstHighNetWorthAccount, - } as BesuNetworkDetails, - { - signingCredential: bungeeSigningCredential, - contractName, - connector: connector, - keychainId: bungeeKeychainId, - contractAddress: bungeeContractAddress, - participant: firstHighNetWorthAccount, - } as BesuNetworkDetails, - ]; -}); - -test.each([{ apiPath: true }, { apiPath: false }])( - //test for both BesuApiPath and BesuConnector - "test creation of views for specific timeframes", - async ({ apiPath }) => { - let networkDetails: BesuNetworkDetails; - if (apiPath) { - networkDetails = networkDetailsList[0]; - } else { - networkDetails = networkDetailsList[1]; - } - const bungee = new PluginBungeeHermes(pluginBungeeHermesOptions); - const strategy = "BESU"; - bungee.addStrategy(strategy, new StrategyBesu("INFO")); - - const snapshot = await bungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view = bungee.generateView( - snapshot, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - - //expect to return a view - expect(view.view).toBeTruthy(); - expect(view.signature).toBeTruthy(); - - //expect the view to have capture the new asset BESU_ASSET_ID, and attributes to match - expect(snapshot.getStateBins().length).toEqual(1); - expect(snapshot.getStateBins()[0].getId()).toEqual(BESU_ASSET_ID); - expect(snapshot.getStateBins()[0].getTransactions().length).toEqual(1); - - //changing BESU_ASSET_ID value - const lockAsset = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(lockAsset).not.toBeUndefined(); - expect(lockAsset.success).toBeTrue(); - - const snapshot1 = await bungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - - //tI is the time of the first transaction + 1 - const tI = ( - parseInt(snapshot.getStateBins()[0].getTransactions()[0].getTimeStamp()) + - 1 - ).toString(); - - const view1 = bungee.generateView( - snapshot1, - tI, - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - - //expect to return a view - expect(view1.view).toBeTruthy(); - expect(view1.signature).toBeTruthy(); - - expect(snapshot1.getStateBins().length).toEqual(1); - expect(snapshot1.getStateBins()[0].getId()).toEqual(BESU_ASSET_ID); - //expect the view to not include first transaction (made before tI) - expect(snapshot1.getStateBins()[0].getTransactions().length).toEqual(1); - //expect old and new snapshot state values to differ - expect(snapshot1.getStateBins()[0].getValue()).not.toEqual( - snapshot.getStateBins()[0].getValue(), - ); - }, -); - -afterEach(async () => { - await Servers.shutdown(besuServer); - await besuLedger.stop(); - await besuLedger.destroy(); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/bungee-api-test.test.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/bungee-api-test.test.ts deleted file mode 100644 index 5526886ecd..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/bungee-api-test.test.ts +++ /dev/null @@ -1,910 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import "jest-extended"; -import LockAssetContractJson from "../solidity/lock-asset-contract/LockAsset.json"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import bodyParser from "body-parser"; - -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import fs from "fs-extra"; -import express from "express"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, - Containers, - FabricTestLedgerV1, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, -} from "@hyperledger/cactus-test-tooling"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - EthContractInvocationType, - ReceiptType, - IPluginLedgerConnectorBesuOptions, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; -import { Account } from "web3-core"; -import { - PluginBungeeHermes, - IPluginBungeeHermesOptions, -} from "../../../main/typescript/plugin-bungee-hermes"; -import { DefaultApi as BungeeApi } from "../../../main/typescript/generated/openapi/typescript-axios/api"; -import { - FabricSigningCredential, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - DefaultEventHandlerStrategy, - IPluginLedgerConnectorFabricOptions, - ChainCodeProgrammingLanguage, - FabricContractInvocationType, - FileBase64, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { DiscoveryOptions } from "fabric-network"; -import { - PluginLedgerConnectorEthereum, - DefaultApi as EthereumApi, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, -} from "@hyperledger/cactus-test-geth-ledger"; -import { StrategyEthereum } from "../../../main/typescript/strategy/strategy-ethereum"; -import { StrategyFabric } from "../../../main/typescript/strategy/strategy-fabric"; -import { StrategyBesu } from "../../../main/typescript/strategy/strategy-besu"; - -interface BesuNetworkDetails { - connectorApiPath: string; - participant: string; - signingCredential: Web3SigningCredential; - keychainId: string; - contractName: string; - contractAddress: string; -} -interface FabricNetworkDetails { - connectorApiPath: string; - participant: string; - signingCredential: FabricSigningCredential; - contractName: string; - channelName: string; -} -interface EthereumNetworkDetails { - connectorApiPath: string; - participant: string; - signingCredential: Web3SigningCredential; - keychainId: string; - contractName: string; - contractAddress: string; -} - -const logLevel: LogLevelDesc = "INFO"; - -let besuLedger: BesuTestLedger; -let besuContractName: string; -let besuPath: string; -let besuServer: Server; -let besuConnector: PluginLedgerConnectorBesu; -let besuKeyPair: { privateKey: string }; -let testEthAccount: Account; -let firstHighNetWorthAccount: string; -let besuKeychainPlugin: PluginKeychainMemory; -let besuSigningCredential: Web3SigningCredential; -let besuContractAddress: string; - -let rpcApiHttpHost: string; -let rpcApiWsHost: string; -let web3: Web3; -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "BUNGEE - Hermes", -}); - -let ethereumPath: string; -let ethereumSigningCredential: Web3SigningCredential; -let ethereumKeychainId: string; -let ethereumContractAddress: string; -let ethereumServer: Server; -let ethereumLedger: GethTestLedger; - -let fabricKeychainPlugin: PluginKeychainMemory; -let configFabric: Configuration; -let fabricLedger: FabricTestLedgerV1; -let fabricSigningCredential: FabricSigningCredential; -let fabricConnector: PluginLedgerConnectorFabric; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; -let fabricApi: FabricApi; -let fabricServer: Server; -const FABRIC_ASSET_ID = uuidv4(); - -let pluginBungeeHermesOptions: IPluginBungeeHermesOptions; -let bungeeServer: Server; - -const BESU_STRATEGY = "BESU"; -const FABRIC_STRATEGY = "FABRIC"; -const ETH_STRATEGY = "ETHEREUM"; - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - log.info(await setupFabricTestLedger()); - log.info(await setupBesuTestLedger()); - log.info(await setupEthereumTestLedger()); - } -}); - -test("tests bungee api using different strategies", async () => { - const pluginRegistry = new PluginRegistry({ logLevel, plugins: [] }); - const keyPair = Secp256k1Keys.generateKeyPairsBuffer(); - pluginBungeeHermesOptions = { - pluginRegistry, - keyPair, - instanceId: uuidv4(), - logLevel, - }; - const bungee = new PluginBungeeHermes(pluginBungeeHermesOptions); - pluginRegistry.add(bungee); - - //add strategies to BUNGEE - Hermes - bungee.addStrategy(FABRIC_STRATEGY, new StrategyFabric("INFO")); - bungee.addStrategy(BESU_STRATEGY, new StrategyBesu("INFO")); - bungee.addStrategy(ETH_STRATEGY, new StrategyEthereum("INFO")); - - //store network details for Fabric and Besu networks - const besuNetworkDetails: BesuNetworkDetails = { - signingCredential: besuSigningCredential, - contractName: besuContractName, - connectorApiPath: besuPath, - keychainId: besuKeychainPlugin.getKeychainId(), - contractAddress: besuContractAddress, - participant: firstHighNetWorthAccount, - }; - const fabricNetworkDetails: FabricNetworkDetails = { - connectorApiPath: fabricPath, - signingCredential: fabricSigningCredential, - channelName: fabricChannelName, - contractName: fabricContractName, - participant: "Org1MSP", - }; - - const ethereumNetworkDetails: EthereumNetworkDetails = { - signingCredential: ethereumSigningCredential, - contractName: LockAssetContractJson.contractName, - connectorApiPath: ethereumPath, - keychainId: ethereumKeychainId, - contractAddress: ethereumContractAddress, - participant: WHALE_ACCOUNT_ADDRESS, - }; - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - bungeeServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: bungeeServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await bungee.getOrCreateWebServices(); - await bungee.registerWebServices(expressApp); - const bungeePath = `http://${address}:${port}`; - - const config = new Configuration({ basePath: bungeePath }); - const bungeeApi = new BungeeApi(config); - - //View creation for all networks, using the respective strategies - const viewFabric = await bungeeApi.createViewV1({ - strategyId: FABRIC_STRATEGY, - networkDetails: fabricNetworkDetails, - }); - //expect to return a view - expect(viewFabric.status).toEqual(200); - expect(viewFabric.data.view).toBeTruthy(); - - const viewBesu = await bungeeApi.createViewV1({ - strategyId: BESU_STRATEGY, - networkDetails: besuNetworkDetails, - }); - //expect to return a view - expect(viewBesu.status).toEqual(200); - expect(viewBesu.data.view).toBeTruthy(); - - const viewEth = await bungeeApi.createViewV1({ - strategyId: ETH_STRATEGY, - networkDetails: ethereumNetworkDetails, - }); - //expect to return a view - expect(viewEth.status).toEqual(200); - expect(viewEth.data.view).toBeTruthy(); - - const strategyReq = await bungeeApi.getAvailableStrategies(); - const pubKeyReq = await bungeeApi.getPublicKey(); - for (const strategy of strategyReq.data) { - expect([BESU_STRATEGY, FABRIC_STRATEGY, ETH_STRATEGY]).toInclude(strategy); - } - expect(pubKeyReq.data).toEqual( - Buffer.from(keyPair.publicKey).toString("hex"), - ); - - const viewFabric1 = bungee.generateView( - await bungee.generateSnapshot([], FABRIC_STRATEGY, fabricNetworkDetails), - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - const proof = viewFabric1.view?.getViewProof(); - const stateProofs = viewFabric1.view - ?.getSnapshot() - .getStateBins() - .map((x) => JSON.stringify(x.getStateProof())); - const transactionProofs: string[] = []; - viewFabric1.view - ?.getAllTransactions() - .forEach((t) => transactionProofs.push(JSON.stringify(t.getProof()))); - const verifyStateRoot = await bungeeApi.verifyMerkleRoot({ - input: stateProofs?.reverse(), //check integrity, order should not matter - root: proof?.statesMerkleRoot, - }); - expect(verifyStateRoot.status).toEqual(200); - expect(verifyStateRoot.data.result).toBeTrue(); - - const verifyTransactionsRoot = await bungeeApi.verifyMerkleRoot({ - input: transactionProofs?.reverse(), //check integrity, order should not matter - root: proof?.transactionsMerkleRoot, - }); - - expect(verifyTransactionsRoot.status).toEqual(200); - expect(verifyTransactionsRoot.data.result).toBeTrue(); - - const viewEth1 = bungee.generateView( - await bungee.generateSnapshot([], ETH_STRATEGY, ethereumNetworkDetails), - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - const proof1 = viewEth1.view?.getViewProof(); - const stateProofs1 = viewEth1.view - ?.getSnapshot() - .getStateBins() - .map((x) => JSON.stringify(x.getStateProof())); - const transactionProofs1: string[] = []; - viewEth1.view - ?.getAllTransactions() - .forEach((t) => transactionProofs1.push(JSON.stringify(t.getProof()))); - const verifyStateRoot1 = await bungeeApi.verifyMerkleRoot({ - input: stateProofs1?.reverse(), //check integrity, order should not matter - root: proof1?.statesMerkleRoot, - }); - expect(verifyStateRoot1.status).toEqual(200); - expect(verifyStateRoot1.data.result).toBeTrue(); - - const verifyTransactionsRoot1 = await bungeeApi.verifyMerkleRoot({ - input: transactionProofs1?.reverse(), //check integrity, order should not matter - root: proof1?.transactionsMerkleRoot, - }); - - expect(verifyTransactionsRoot1.status).toEqual(200); - expect(verifyTransactionsRoot1.data.result).toBeTrue(); -}); - -afterAll(async () => { - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(bungeeServer); - await Servers.shutdown(ethereumServer); - await ethereumLedger.stop(); - await ethereumLedger.destroy(); - await besuLedger.stop(); - await besuLedger.destroy(); - await fabricLedger.stop(); - await fabricLedger.destroy(); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); - -async function setupFabricTestLedger(): Promise { - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - await fabricLedger.start(); - log.info("Fabric Ledger started"); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - log.info("enrolled admin"); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user1"; - const keychainEntryValue = JSON.stringify(userIdentity); - - fabricKeychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ - plugins: [fabricKeychainPlugin], - }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel: "INFO", - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4100, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - log.info("Fabric Ledger connector check"); - - const apiUrl = `http://${address}:${port}`; - - fabricPath = apiUrl; - configFabric = new Configuration({ basePath: apiUrl }); - - fabricApi = new FabricApi(configFabric); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/simple-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ ├── index.ts - // │ └── ITraceableContract.ts - // ├── tsconfig.json - // -------- - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./ITraceableContract.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const res = await fabricApi.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = res.data; - expect(res.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - log.info("Fabric Contract deployed"); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await fabricApi.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - return "Fabric Network setup successful"; -} -async function setupBesuTestLedger(): Promise { - besuLedger = new BesuTestLedger({ - logLevel, - emitContainerLogs: true, - envVars: ["BESU_NETWORK=dev"], - }); - await besuLedger.start(); - log.info("Besu test ledger initialized"); - rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuLedger.getRpcApiWsHost(); - web3 = new Web3(rpcApiHttpHost); - firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); - - testEthAccount = await besuLedger.createEthTestAccount(); - - besuKeyPair = { - privateKey: besuLedger.getGenesisAccountPrivKey(), - }; - - besuContractName = "LockAsset"; - - const keychainEntryValue = besuKeyPair.privateKey; - const keychainEntryKey = uuidv4(); - besuKeychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - - besuKeychainPlugin.set( - besuContractName, - JSON.stringify(LockAssetContractJson), - ); - - const pluginRegistry = new PluginRegistry({ - plugins: [besuKeychainPlugin], - }); - - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - - besuConnector = new PluginLedgerConnectorBesu(options); - pluginRegistry.add(besuConnector); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - log.info("Besu connector initialized"); - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toBeGreaterThan(10e9); - - const deployOut = await besuConnector.deployContract({ - keychainId: besuKeychainPlugin.getKeychainId(), - contractName: besuContractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - log.info("Besu contract Deployed successfully"); - - const res = await besuConnector.invokeContract({ - contractName: besuContractName, - keychainId: besuKeychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [BESU_ASSET_ID, 19], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res).toBeTruthy(); - expect(res.success).toBeTruthy(); - - log.info("Besu asset created successfully"); - - const res1 = await besuConnector.invokeContract({ - contractName: besuContractName, - keychainId: besuKeychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res1).toBeTruthy(); - expect(res1.success).toBeTruthy(); - - const res2 = await besuConnector.invokeContract({ - contractName: besuContractName, - keychainId: besuKeychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "unLockAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res2).toBeTruthy(); - expect(res2.success).toBeTruthy(); - - besuSigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - besuContractAddress = deployOut.transactionReceipt.contractAddress as string; - return "Besu Network setup successful"; -} - -async function setupEthereumTestLedger(): Promise { - const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; - const containerImageVersion = "2023-07-27-2a8c48ed6"; - - const keychainEntryKey = uuidv4(); - const ETH_ASSET_NAME = uuidv4(); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - ethereumServer = server; - // set to address Type Error returned by Response.json() - // "Can't serialize BigInt" - expressApp.set("json replacer", stringifyBigIntReplacer); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const ledger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - ethereumLedger = ledger; - await ledger.start(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - ethereumPath = `http://${address}:${port}`; - const apiConfig = new Configuration({ basePath: ethereumPath }); - const apiClient = new EthereumApi(apiConfig); - const rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(); - - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel: logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - const connector = new PluginLedgerConnectorEthereum({ - instanceId: uuidv4(), - rpcApiHttpHost, - logLevel: logLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - // Instantiate connector with the keychain plugin that already has the - // private key we want to use for one of our tests - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - - const initTransferValue = web3.utils.toWei("5000", "ether"); - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: initTransferValue, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toBe(initTransferValue); - - const deployOut = await apiClient.deployContract({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.data).toBeTruthy(); - expect(deployOut.data.transactionReceipt).toBeTruthy(); - expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); - log.info("contract deployed successfully"); - const contractAddress = deployOut.data.transactionReceipt - .contractAddress as string; - expect(typeof contractAddress).toBe("string"); - expect(contractAddress).toBeTruthy(); - - const invokeOut = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [ETH_ASSET_NAME, 10], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(invokeOut).toBeTruthy(); - expect(invokeOut.data).toBeTruthy(); - log.info("contract call successfull"); - - const lockAsset = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: [ETH_ASSET_NAME], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(lockAsset).not.toBeUndefined(); - expect(lockAsset.status).toBe(200); - - ethereumSigningCredential = { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.PrivateKeyHex, - }; - ethereumKeychainId = keychainPlugin.getKeychainId(); - - ethereumContractAddress = deployOut.data.transactionReceipt - .contractAddress as string; - - return "Ethereum Network setup successful"; -} - -function stringifyBigIntReplacer(key: string, value: bigint): string { - if (typeof value === "bigint") { - return value.toString(); - } - return value; -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/bungee-merge-views.test.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/bungee-merge-views.test.ts deleted file mode 100644 index 8ddbfdec8d..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/bungee-merge-views.test.ts +++ /dev/null @@ -1,459 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import "jest-extended"; -import LockAssetContractJson from "../solidity/lock-asset-contract/LockAsset.json"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import bodyParser from "body-parser"; - -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; - -import express from "express"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, - Containers, -} from "@hyperledger/cactus-test-tooling"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - EthContractInvocationType, - ReceiptType, - IPluginLedgerConnectorBesuOptions, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; -import { Account } from "web3-core"; -import { - PluginBungeeHermes, - IPluginBungeeHermesOptions, -} from "../../../main/typescript/plugin-bungee-hermes"; -import { - DefaultApi as BungeeApi, - MergePolicyOpts, -} from "../../../main/typescript/generated/openapi/typescript-axios/api"; -import { - BesuNetworkDetails, - StrategyBesu, -} from "../../../main/typescript/strategy/strategy-besu"; -import { View } from "../../../main/typescript/view-creation/view"; -const logLevel: LogLevelDesc = "INFO"; - -let besuLedger: BesuTestLedger; -let contractName: string; - -let rpcApiHttpHost: string; -let rpcApiWsHost: string; -let web3: Web3; -let firstHighNetWorthAccount: string; -let connector: PluginLedgerConnectorBesu; -let besuKeyPair: { privateKey: string }; -let testEthAccount: Account; -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "BUNGEE - Hermes", -}); -let besuPath: string; -let pluginBungeeHermesOptions: IPluginBungeeHermesOptions; -let besuServer: Server; - -let bungeeSigningCredential: Web3SigningCredential; -let bungeeKeychainId: string; -let bungeeContractAddress: string; -let bungeeServer: Server; - -let keychainPlugin: PluginKeychainMemory; - -let networkDetailsList: BesuNetworkDetails[]; - -beforeEach(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - besuLedger = new BesuTestLedger({ - logLevel, - emitContainerLogs: true, - envVars: ["BESU_NETWORK=dev"], - }); - await besuLedger.start(); - - rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuLedger.getRpcApiWsHost(); - web3 = new Web3(rpcApiHttpHost); - firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); - - testEthAccount = await besuLedger.createEthTestAccount(); - - besuKeyPair = { - privateKey: besuLedger.getGenesisAccountPrivKey(), - }; - - contractName = "LockAsset"; - - const keychainEntryValue = besuKeyPair.privateKey; - const keychainEntryKey = uuidv4(); - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const pluginRegistry = new PluginRegistry({ - plugins: [keychainPlugin], - }); - - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - connector = new PluginLedgerConnectorBesu(options); - pluginRegistry.add(connector); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await connector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await connector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toBeGreaterThan(10e9); - - log.info("Connector initialized"); - - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - log.info("Contract Deployed successfully"); - - const res = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [BESU_ASSET_ID, 19], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res).toBeTruthy(); - expect(res.success).toBeTruthy(); - - const res3 = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res3).toBeTruthy(); - expect(res3.success).toBeTruthy(); - expect(res3.callOutput.toString()).toBeTruthy(); - - bungeeSigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - bungeeKeychainId = keychainPlugin.getKeychainId(); - - bungeeContractAddress = deployOut.transactionReceipt - .contractAddress as string; - - pluginBungeeHermesOptions = { - pluginRegistry, - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - instanceId: uuidv4(), - logLevel, - }; - } - networkDetailsList = [ - { - signingCredential: bungeeSigningCredential, - contractName, - connectorApiPath: besuPath, - keychainId: bungeeKeychainId, - contractAddress: bungeeContractAddress, - participant: firstHighNetWorthAccount, - } as BesuNetworkDetails, - { - signingCredential: bungeeSigningCredential, - contractName, - connector: connector, - keychainId: bungeeKeychainId, - contractAddress: bungeeContractAddress, - participant: firstHighNetWorthAccount, - } as BesuNetworkDetails, - ]; -}); - -test.each([{ apiPath: true }, { apiPath: false }])( - //test for both BesuApiPath and BesuConnector - "test merging views, and integrated view proofs", - async ({ apiPath }) => { - let networkDetails: BesuNetworkDetails; - if (apiPath) { - networkDetails = networkDetailsList[0]; - } else { - networkDetails = networkDetailsList[1]; - } - const bungee = new PluginBungeeHermes(pluginBungeeHermesOptions); - const strategy = "BESU"; - bungee.addStrategy(strategy, new StrategyBesu("INFO")); - - const snapshot = await bungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view = bungee.generateView( - snapshot, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - //expect to return a view - expect(view.view).toBeTruthy(); - expect(view.signature).toBeTruthy(); - - //changing BESU_ASSET_ID value - const lockAsset = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(lockAsset).not.toBeUndefined(); - expect(lockAsset.success).toBeTrue(); - - //creating new asset - const new_asset_id = uuidv4(); - const depNew = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [new_asset_id, 10], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(depNew).not.toBeUndefined(); - expect(depNew.success).toBeTrue(); - - const snapshot1 = await bungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view2 = bungee.generateView( - snapshot1, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - //expect to return a view - expect(view2.view).toBeTruthy(); - expect(view2.signature).toBeTruthy(); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - bungeeServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: bungeeServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await bungee.getOrCreateWebServices(); - await bungee.registerWebServices(expressApp); - const bungeePath = `http://${address}:${port}`; - - const config = new Configuration({ basePath: bungeePath }); - const bungeeApi = new BungeeApi(config); - - const mergeViewsNoPolicyReq = await bungeeApi.mergeViewsV1({ - serializedViews: [ - JSON.stringify({ - view: JSON.stringify(view.view as View), - signature: view.signature, - }), - // eslint-disable-next-line prettier/prettier - JSON.stringify({ - view: JSON.stringify(view2.view as View), - signature: view2.signature, - }), - ], - mergePolicy: MergePolicyOpts.NONE, - }); - expect(mergeViewsNoPolicyReq.status).toBe(200); - - expect(mergeViewsNoPolicyReq.data.integratedView).toBeTruthy(); - expect(mergeViewsNoPolicyReq.data.signature).toBeTruthy(); - - const mergeViewsNoPolicy = bungee.mergeViews( - [view.view as View, view2.view as View], - [view.signature as string, view2.signature as string], - MergePolicyOpts.NONE, - [], - ); - //1 transaction captured in first view, and 3 in the second - expect(mergeViewsNoPolicy.integratedView.getAllTransactions().length).toBe( - 4, - ); - //1 state captured in first view, and 2 in the second - expect(mergeViewsNoPolicy.integratedView.getAllStates().length).toBe(3); - - const transactionReceipts: string[] = []; - - mergeViewsNoPolicy.integratedView.getAllTransactions().forEach((t) => { - transactionReceipts.push(JSON.stringify(t.getProof())); - }); - expect( - ( - await bungeeApi.verifyMerkleRoot({ - input: transactionReceipts, - root: mergeViewsNoPolicy.integratedView.getIntegratedViewProof() - .transactionsMerkleRoot, - }) - ).data.result, - ).toBeTrue(); - - const mergeViewsWithPolicy = bungee.mergeViews( - [view.view as View, view2.view as View], - [view.signature as string, view2.signature as string], - MergePolicyOpts.PruneState, - [BESU_ASSET_ID], //should remove all states related to this asset - ); - - //0 transactions captured in first view, and 1 in the second (because of policy) - // eslint-disable-next-line prettier/prettier - expect( - mergeViewsWithPolicy.integratedView.getAllTransactions().length, - ).toBe(1); - //0 state captured in first view, and 1 in the second (because of policy) - expect(mergeViewsWithPolicy.integratedView.getAllStates().length).toBe(1); - - const mergeViewsWithPolicy2 = bungee.mergeViews( - [view.view as View, view2.view as View], - [view.signature as string, view2.signature as string], - MergePolicyOpts.PruneStateFromView, - [BESU_ASSET_ID, view2.view?.getKey() as string], //should remove all states related to this asset - ); - - //1 transactions captured in first view, and 1 in the second (because of policy) - // eslint-disable-next-line prettier/prettier - expect( - mergeViewsWithPolicy2.integratedView.getAllTransactions().length, - ).toBe(2); - //1 state captured in first view, and only 1 in the second (because of policy) - expect(mergeViewsWithPolicy2.integratedView.getAllStates().length).toBe(2); - }, -); - -afterEach(async () => { - await Servers.shutdown(besuServer); - await Servers.shutdown(bungeeServer); - await besuLedger.stop(); - await besuLedger.destroy(); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/bungee-process-views.test.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/bungee-process-views.test.ts deleted file mode 100644 index 9902ede8b8..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/bungee-process-views.test.ts +++ /dev/null @@ -1,395 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import "jest-extended"; -import LockAssetContractJson from "../solidity/lock-asset-contract/LockAsset.json"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import bodyParser from "body-parser"; - -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; - -import express from "express"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, - Containers, -} from "@hyperledger/cactus-test-tooling"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - EthContractInvocationType, - ReceiptType, - IPluginLedgerConnectorBesuOptions, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; -import { Account } from "web3-core"; -import { - PluginBungeeHermes, - IPluginBungeeHermesOptions, -} from "../../../main/typescript/plugin-bungee-hermes"; -import { - DefaultApi as BungeeApi, - PrivacyPolicyOpts, -} from "../../../main/typescript/generated/openapi/typescript-axios/api"; -import { - BesuNetworkDetails, - StrategyBesu, -} from "../../../main/typescript/strategy/strategy-besu"; -import { View } from "../../../main/typescript/view-creation/view"; -import { deserializeView } from "../../../main/typescript/utils"; - -const logLevel: LogLevelDesc = "INFO"; - -let besuLedger: BesuTestLedger; -let contractName: string; - -let rpcApiHttpHost: string; -let rpcApiWsHost: string; -let web3: Web3; -let firstHighNetWorthAccount: string; -let connector: PluginLedgerConnectorBesu; -let besuKeyPair: { privateKey: string }; -let testEthAccount: Account; -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "BUNGEE - Hermes", -}); -let besuPath: string; -let pluginBungeeHermesOptions: IPluginBungeeHermesOptions; -let besuServer: Server; - -let bungeeSigningCredential: Web3SigningCredential; -let bungeeKeychainId: string; -let bungeeContractAddress: string; -let bungeeServer: Server; - -let keychainPlugin: PluginKeychainMemory; - -let networkDetailsList: BesuNetworkDetails[]; - -beforeEach(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - besuLedger = new BesuTestLedger({ - logLevel, - emitContainerLogs: true, - envVars: ["BESU_NETWORK=dev"], - }); - await besuLedger.start(); - - rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuLedger.getRpcApiWsHost(); - web3 = new Web3(rpcApiHttpHost); - firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); - - testEthAccount = await besuLedger.createEthTestAccount(); - - besuKeyPair = { - privateKey: besuLedger.getGenesisAccountPrivKey(), - }; - - contractName = "LockAsset"; - - const keychainEntryValue = besuKeyPair.privateKey; - const keychainEntryKey = uuidv4(); - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const pluginRegistry = new PluginRegistry({ - plugins: [keychainPlugin], - }); - - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - connector = new PluginLedgerConnectorBesu(options); - pluginRegistry.add(connector); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await connector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await connector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toBeGreaterThan(10e9); - - log.info("Connector initialized"); - - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - log.info("Contract Deployed successfully"); - - const res = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [BESU_ASSET_ID, 19], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res).toBeTruthy(); - expect(res.success).toBeTruthy(); - - const res3 = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(res3).toBeTruthy(); - expect(res3.success).toBeTruthy(); - expect(res3.callOutput.toString()).toBeTruthy(); - - //changing BESU_ASSET_ID value - const lockAsset = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(lockAsset).not.toBeUndefined(); - expect(lockAsset.success).toBeTrue(); - - //creating new asset - const new_asset_id = uuidv4(); - const depNew = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [new_asset_id, 10], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(depNew).not.toBeUndefined(); - expect(depNew.success).toBeTrue(); - - bungeeSigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - bungeeKeychainId = keychainPlugin.getKeychainId(); - - bungeeContractAddress = deployOut.transactionReceipt - .contractAddress as string; - - pluginBungeeHermesOptions = { - pluginRegistry, - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - instanceId: uuidv4(), - logLevel, - }; - } - networkDetailsList = [ - { - signingCredential: bungeeSigningCredential, - contractName, - connectorApiPath: besuPath, - keychainId: bungeeKeychainId, - contractAddress: bungeeContractAddress, - participant: firstHighNetWorthAccount, - } as BesuNetworkDetails, - { - signingCredential: bungeeSigningCredential, - contractName, - connector: connector, - keychainId: bungeeKeychainId, - contractAddress: bungeeContractAddress, - participant: firstHighNetWorthAccount, - } as BesuNetworkDetails, - ]; -}); - -test.each([{ apiPath: true }, { apiPath: false }])( - //test for both BesuApiPath and BesuConnector - "test merging views, and integrated view proofs", - async ({ apiPath }) => { - let networkDetails: BesuNetworkDetails; - if (apiPath) { - networkDetails = networkDetailsList[0]; - } else { - networkDetails = networkDetailsList[1]; - } - - const bungee = new PluginBungeeHermes(pluginBungeeHermesOptions); - const strategy = "BESU"; - bungee.addStrategy(strategy, new StrategyBesu("INFO")); - - const snapshot = await bungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view = bungee.generateView( - snapshot, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - //expect to return a view - expect(view.view).toBeTruthy(); - expect(view.signature).toBeTruthy(); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - bungeeServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: bungeeServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await bungee.getOrCreateWebServices(); - await bungee.registerWebServices(expressApp); - const bungeePath = `http://${address}:${port}`; - - const config = new Configuration({ basePath: bungeePath }); - const bungeeApi = new BungeeApi(config); - - const processed = await bungeeApi.processViewV1({ - serializedView: JSON.stringify({ - view: JSON.stringify(view.view as View), - signature: view.signature, - }), - policyId: PrivacyPolicyOpts.PruneState, - policyArguments: [BESU_ASSET_ID], - }); - - expect(processed.status).toBe(200); - expect(processed.data.view).toBeTruthy(); - expect(processed.data.signature).toBeTruthy(); - - const processedView = deserializeView(JSON.stringify(processed.data)); - - //check view deserializer - expect(JSON.stringify(processedView)).toEqual(processed.data.view); - - expect(processedView.getPolicy()).toBeTruthy(); - expect(processedView.getOldVersionsMetadata().length).toBe(1); - expect(processedView.getOldVersionsMetadata()[0].signature).toBe( - view.signature, - ); - expect(processedView.getAllTransactions().length).toBe(1); - }, -); - -afterEach(async () => { - await Servers.shutdown(besuServer); - await Servers.shutdown(bungeeServer); - await besuLedger.stop(); - await besuLedger.destroy(); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/ethereum-test-basic.test.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/ethereum-test-basic.test.ts deleted file mode 100644 index 12a504aba5..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/ethereum-test-basic.test.ts +++ /dev/null @@ -1,409 +0,0 @@ -/** - * Tests for deploying a contract and invoking it's method by directly sending contract JSON. - * - * @note all tests must be run in order, don't use `skip()` or `only()`. @todo - fix that - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import { v4 as uuidV4 } from "uuid"; -import { AddressInfo } from "net"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import Web3 from "web3"; - -import { - LogLevelDesc, - IListenOptions, - Servers, - Logger, - LoggerProvider, - Secp256k1Keys, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { - Containers, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, -} from "@hyperledger/cactus-test-geth-ledger"; - -import LockAssetContractJson from "../../typescript/solidity/lock-asset-contract/LockAsset.json"; -import { - EthContractInvocationType, - PluginLedgerConnectorEthereum, - Web3SigningCredentialType, - DefaultApi as EthereumApi, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { Account } from "web3-core"; -import { - IPluginBungeeHermesOptions, - PluginBungeeHermes, -} from "../../../main/typescript"; -import { - EthereumNetworkDetails, - StrategyEthereum, -} from "../../../main/typescript/strategy/strategy-ethereum"; - -const log: Logger = LoggerProvider.getOrCreate({ - label: "geth-invoke-web3-contract-v1.test", - level: testLogLevel, -}); - -log.info("Test started"); -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -describe("Ethereum contract deploy and invoke using keychain", () => { - const keychainEntryKey = uuidV4(); - let testEthAccount: Account, - web3: InstanceType, - addressInfo, - address: string, - port: number, - contractAddress: string, - apiHost: string, - apiConfig, - ledger: GethTestLedger, - apiClient: EthereumApi, - connector: PluginLedgerConnectorEthereum, - rpcApiHttpHost: string, - keychainPlugin: PluginKeychainMemory; - - let bungeeSigningCredential: Web3SigningCredential; - let bungeeKeychainId: string; - let bungeeContractAddress: string; - let pluginBungeeHermesOptions: IPluginBungeeHermesOptions; - const ETH_ASSET_NAME = uuidV4(); - - let server: Server; - - ////////////////////////////////// - // Setup - ////////////////////////////////// - - let networkDetailsList: EthereumNetworkDetails[]; - - beforeEach(async () => { - pruneDockerAllIfGithubAction({ logLevel: testLogLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel: testLogLevel }); - fail("Pruning didn't throw OK"); - }); - - ledger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ledger.start(); - - const expressApp = express(); - - expressApp.use(bodyParser.json({ limit: "250mb" })); - // set to address Type Error returned by Response.json() - // "Can't serialize BigInt" - expressApp.set("json replacer", stringifyBigIntReplacer); - - server = http.createServer(expressApp); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new EthereumApi(apiConfig); - rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(); - - const keychainEntryValue = testEthAccount.privateKey; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidV4(), - keychainId: uuidV4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel: testLogLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - connector = new PluginLedgerConnectorEthereum({ - instanceId: uuidV4(), - rpcApiHttpHost, - logLevel: testLogLevel, - pluginRegistry, - }); - - // Instantiate connector with the keychain plugin that already has the - // private key we want to use for one of our tests - await connector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - await connector.registerWebServices(expressApp, wsApi); - - const initTransferValue = web3.utils.toWei("5000", "ether"); - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: initTransferValue, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toBe(initTransferValue); - - const deployOut = await apiClient.deployContract({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.data).toBeTruthy(); - expect(deployOut.data.transactionReceipt).toBeTruthy(); - expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); - log.info("contract deployed successfully"); - contractAddress = deployOut.data.transactionReceipt - .contractAddress as string; - expect(typeof contractAddress).toBe("string"); - expect(contractAddress).toBeTruthy(); - - const invokeOut = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [ETH_ASSET_NAME, 10], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(invokeOut).toBeTruthy(); - expect(invokeOut.data).toBeTruthy(); - log.info("contract call successfull"); - - bungeeSigningCredential = { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.PrivateKeyHex, - }; - bungeeKeychainId = keychainPlugin.getKeychainId(); - - bungeeContractAddress = deployOut.data.transactionReceipt - .contractAddress as string; - - pluginBungeeHermesOptions = { - pluginRegistry, - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - instanceId: uuidV4(), - logLevel: testLogLevel, - }; - networkDetailsList = [ - { - signingCredential: bungeeSigningCredential, - contractName: LockAssetContractJson.contractName, - connectorApiPath: apiHost, - keychainId: bungeeKeychainId, - contractAddress: bungeeContractAddress, - participant: WHALE_ACCOUNT_ADDRESS, - } as EthereumNetworkDetails, - { - signingCredential: bungeeSigningCredential, - contractName: LockAssetContractJson.contractName, - connector: connector, - keychainId: bungeeKeychainId, - contractAddress: bungeeContractAddress, - participant: WHALE_ACCOUNT_ADDRESS, - } as EthereumNetworkDetails, - ]; - }); - - afterEach(async () => { - await Servers.shutdown(server); - await ledger.stop(); - await ledger.destroy(); - - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel: testLogLevel }); - fail("Pruning didn't throw OK"); - }); - }); - test.each([{ apiPath: true }, { apiPath: false }])( - //test for both EthereumApiPath and EthereumConnector - "test creation of views for different timeframes and states", - async ({ apiPath }) => { - if (!apiPath) { - // set to address Type Error returned by Response.json() when using the connector by it self - // "Can't serialize BigInt" - const originalStringify = JSON.stringify; - const mock = jest.spyOn(JSON, "stringify"); - mock.mockImplementation((value: any) => { - return originalStringify(value, stringifyBigIntReplacer); - }); - } - - let networkDetails: EthereumNetworkDetails; - if (apiPath) { - networkDetails = networkDetailsList[0]; - } else { - networkDetails = networkDetailsList[1]; - } - const bungee = new PluginBungeeHermes(pluginBungeeHermesOptions); - const strategy = "ETH"; - bungee.addStrategy(strategy, new StrategyEthereum("INFO")); - const snapshot = await bungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view = bungee.generateView( - snapshot, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - - //expect to return a view - expect(view.view).toBeTruthy(); - expect(view.signature).toBeTruthy(); - - //expect the view to have capture the new asset ETH_ASSET_NAME, and attributes to match - expect(snapshot.getStateBins().length).toEqual(1); - expect(snapshot.getStateBins()[0].getId()).toEqual(ETH_ASSET_NAME); - expect(snapshot.getStateBins()[0].getTransactions().length).toEqual(1); - - const view1 = bungee.generateView(snapshot, "0", "9999", undefined); - - //expects nothing to limit time of 9999 - expect(view1.view).toBeUndefined(); - expect(view1.signature).toBeUndefined(); - - //changing ETH_ASSET_NAME value - const lockAsset = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: [ETH_ASSET_NAME], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(lockAsset).not.toBeUndefined(); - expect(lockAsset.status).toBe(200); - - //changing ETH_ASSET_NAME value - const new_asset_id = uuidV4(); - const depNew = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: [new_asset_id, 10], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(depNew).not.toBeUndefined(); - expect(depNew.status).toBe(200); - - const snapshot1 = await bungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view2 = bungee.generateView( - snapshot1, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - //expect to return a view - expect(view2.view).toBeTruthy(); - expect(view2.signature).toBeTruthy(); - - const stateBins = snapshot1.getStateBins(); - expect(stateBins.length).toEqual(2); //expect to have captured state for both assets - - const bins = [stateBins[0].getId(), stateBins[1].getId()]; - - //checks if values match: - // - new value of ETH_ASSET_NAME state in new snapshot different than value from old snapshot) - // - successfully captured transaction that created the new asset - if (bins[0] === ETH_ASSET_NAME) { - expect(snapshot1.getStateBins()[0].getTransactions().length).toEqual(2); - expect(snapshot1.getStateBins()[0].getValue()).not.toEqual( - snapshot.getStateBins()[0].getValue(), - ); - expect(snapshot1.getStateBins()[1].getTransactions().length).toEqual(1); - } else { - expect(snapshot1.getStateBins()[0].getTransactions().length).toEqual(1); - expect(snapshot1.getStateBins()[1].getTransactions().length).toEqual(2); - expect(snapshot1.getStateBins()[1].getValue()).not.toEqual( - snapshot.getStateBins()[0].getValue(), - ); - } - }, - ); -}); - -function stringifyBigIntReplacer(key: string, value: bigint): string { - if (typeof value === "bigint") { - return value.toString(); - } - return value; -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/fabric-test-basic.test.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/fabric-test-basic.test.ts deleted file mode 100644 index 43cc97dd51..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/fabric-test-basic.test.ts +++ /dev/null @@ -1,486 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import "jest-extended"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { DiscoveryOptions } from "fabric-network"; -import bodyParser from "body-parser"; -import path from "path"; - -import http, { Server } from "http"; - -import fs from "fs-extra"; - -import { - Configuration, - DefaultEventHandlerStrategy, - FabricSigningCredential, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FileBase64, - ChainCodeProgrammingLanguage, - FabricContractInvocationType, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { - Containers, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import express from "express"; -import { AddressInfo } from "net"; - -import { v4 as uuidv4 } from "uuid"; -import { - PluginBungeeHermes, - IPluginBungeeHermesOptions, -} from "../../../main/typescript/plugin-bungee-hermes"; -import { - FabricNetworkDetails, - StrategyFabric, -} from "../../../main/typescript/strategy/strategy-fabric"; - -let fabricServer: Server; - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let configFabric: Configuration; -let apiClient: FabricApi; - -let fabricConnector: PluginLedgerConnectorFabric; -let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; -let pluginBungee: PluginBungeeHermes; -const FABRIC_ASSET_ID = uuidv4(); - -let networkDetailsList: FabricNetworkDetails[]; - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "BUNGEE - Hermes", -}); - -beforeEach(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - await fabricLedger.start(); - log.info("Fabric Ledger started"); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - log.info("enrolled admin"); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user1"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel: "INFO", - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - log.info("Fabric Ledger connector check"); - - const apiUrl = `http://${address}:${port}`; - - fabricPath = apiUrl; - configFabric = new Configuration({ basePath: apiUrl }); - - apiClient = new FabricApi(configFabric); - - // deploy contracts ... - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/simple-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ ├── index.ts - // │ └── ITraceableContract.ts - // ├── tsconfig.json - // -------- - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./ITraceableContract.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const res = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = res.data; - expect(res.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - log.info("Contract deployed"); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - - pluginBungeeFabricOptions = { - pluginRegistry, - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - instanceId: uuidv4(), - }; - - networkDetailsList = [ - { - connectorApiPath: fabricPath, - signingCredential: fabricSigningCredential, - channelName: fabricChannelName, - contractName: fabricContractName, - participant: "Org1MSP", - }, - { - connector: fabricConnector, - signingCredential: fabricSigningCredential, - channelName: fabricChannelName, - contractName: fabricContractName, - participant: "Org1MSP", - }, - ]; - - pluginBungee = new PluginBungeeHermes(pluginBungeeFabricOptions); - } -}); - -test.each([{ apiPath: true }, { apiPath: false }])( - //test for both FabricApiPath and FabricConnector - "test creation of views for different timeframes and states", - async ({ apiPath }) => { - let networkDetails: FabricNetworkDetails; - if (apiPath) { - networkDetails = networkDetailsList[0]; - } else { - networkDetails = networkDetailsList[1]; - } - - const strategy = "FABRIC"; - pluginBungee.addStrategy(strategy, new StrategyFabric("INFO")); - - const snapshot = await pluginBungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view = pluginBungee.generateView( - snapshot, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - - //expect to return a view - expect(view.view).toBeTruthy(); - expect(view.signature).toBeTruthy(); - - //expect the view to have capture the new asset Fabric_ASSET_ID, and attributes to match - expect(snapshot.getStateBins().length).toEqual(1); - expect(snapshot.getStateBins()[0].getId()).toEqual(FABRIC_ASSET_ID); - expect(snapshot.getStateBins()[0].getTransactions().length).toEqual(1); - - //fabric transaction proofs include endorsements - expect( - snapshot - .getStateBins()[0] - .getTransactions()[0] - .getProof() - .getEndorsements()?.length, - ).toEqual(2); - - //no valid states for this time frame - const view1 = pluginBungee.generateView(snapshot, "0", "9999", undefined); - expect(view1.view).toBeUndefined(); - expect(view1.signature).toBeUndefined(); - - //creating new asset - const new_asset_id = uuidv4(); - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [new_asset_id, "10"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - //changing FABRIC_ASSET_ID value - const modifyResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "18"], - methodName: "UpdateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - expect(modifyResponse).not.toBeUndefined(); - expect(modifyResponse.status).toBeGreaterThan(199); - expect(modifyResponse.status).toBeLessThan(300); - - const snapshot1 = await pluginBungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view2 = pluginBungee.generateView( - snapshot1, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - - //expect to return a view - expect(view2.view).toBeTruthy(); - expect(view2.signature).toBeTruthy(); - - //expect to have captured state for both assets - const stateBins = snapshot1.getStateBins(); - expect(stateBins.length).toEqual(2); - const bins = [stateBins[0].getId(), stateBins[1].getId()]; - - expect(bins.includes(FABRIC_ASSET_ID)).toBeTrue(); - expect(bins.includes(new_asset_id)).toBeTrue(); - - //checks if values match: - // - new value of FABRIC_ASSET_ID state in new snapshot equals to new value) - // - successfully captured transaction that created the new asset - if (bins[0] === FABRIC_ASSET_ID) { - expect(snapshot1.getStateBins()[0].getTransactions().length).toEqual(2); - expect(snapshot1.getStateBins()[0].getValue()).toEqual("18"); - expect(snapshot1.getStateBins()[1].getTransactions().length).toEqual(1); - } else { - expect(snapshot1.getStateBins()[0].getTransactions().length).toEqual(1); - expect(snapshot1.getStateBins()[1].getTransactions().length).toEqual(2); - expect(snapshot1.getStateBins()[1].getValue()).toEqual("18"); - } - }, -); - -afterEach(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await Servers.shutdown(fabricServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/fabric-test-pruning.test.ts b/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/fabric-test-pruning.test.ts deleted file mode 100644 index 2bc9783690..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/integration/fabric-test-pruning.test.ts +++ /dev/null @@ -1,465 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import "jest-extended"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { DiscoveryOptions } from "fabric-network"; -import bodyParser from "body-parser"; -import path from "path"; - -import http, { Server } from "http"; - -import fs from "fs-extra"; - -import { - Configuration, - DefaultEventHandlerStrategy, - FabricSigningCredential, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FileBase64, - ChainCodeProgrammingLanguage, - FabricContractInvocationType, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { - Containers, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import express from "express"; -import { AddressInfo } from "net"; - -import { v4 as uuidv4 } from "uuid"; -import { - FabricNetworkDetails, - StrategyFabric, -} from "../../../main/typescript/strategy/strategy-fabric"; -import { - IPluginBungeeHermesOptions, - PluginBungeeHermes, -} from "../../../main/typescript/plugin-bungee-hermes"; - -let fabricServer: Server; - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let configFabric: Configuration; -let apiClient: FabricApi; - -let fabricConnector: PluginLedgerConnectorFabric; -let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; -let pluginBungee: PluginBungeeHermes; -const FABRIC_ASSET_ID = uuidv4(); - -let networkDetailsList: FabricNetworkDetails[]; - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "BUNGEE - Hermes", -}); - -beforeEach(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - await fabricLedger.start(); - log.info("Fabric Ledger started"); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - log.info("enrolled admin"); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user1"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel: "INFO", - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - log.info("Fabric Ledger connector check"); - - const apiUrl = `http://${address}:${port}`; - - fabricPath = apiUrl; - configFabric = new Configuration({ basePath: apiUrl }); - - apiClient = new FabricApi(configFabric); - - // deploy contracts ... - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/simple-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ ├── index.ts - // │ └── ITraceableContract.ts - // ├── tsconfig.json - // -------- - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./ITraceableContract.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const res = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = res.data; - expect(res.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - log.info("Contract deployed"); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - - pluginBungeeFabricOptions = { - pluginRegistry, - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - instanceId: uuidv4(), - }; - - networkDetailsList = [ - { - connectorApiPath: fabricPath, - signingCredential: fabricSigningCredential, - channelName: fabricChannelName, - contractName: fabricContractName, - participant: "Org1MSP", - }, - { - connector: fabricConnector, - signingCredential: fabricSigningCredential, - channelName: fabricChannelName, - contractName: fabricContractName, - participant: "Org1MSP", - }, - ]; - - pluginBungee = new PluginBungeeHermes(pluginBungeeFabricOptions); - } -}); - -test.each([{ apiPath: true }, { apiPath: false }])( - //test for both FabricApiPath and FabricConnector - "test creation of views for specific timeframes", - async ({ apiPath }) => { - let networkDetails: FabricNetworkDetails; - if (apiPath) { - networkDetails = networkDetailsList[0]; - } else { - networkDetails = networkDetailsList[1]; - } - - const strategy = "FABRIC"; - pluginBungee.addStrategy(strategy, new StrategyFabric("INFO")); - - const snapshot = await pluginBungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - const view = pluginBungee.generateView( - snapshot, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - //expect to return a view - expect(view.view).toBeTruthy(); - expect(view.signature).toBeTruthy(); - - //expect the view to have capture the new asset FABRIC_ASSET_ID, and attributes to match - expect(snapshot.getStateBins().length).toEqual(1); - expect(snapshot.getStateBins()[0].getId()).toEqual(FABRIC_ASSET_ID); - expect(snapshot.getStateBins()[0].getTransactions().length).toEqual(1); - //fabric transaction proofs include endorsements - expect( - snapshot - .getStateBins()[0] - .getTransactions()[0] - .getProof() - .getEndorsements()?.length, - ).toEqual(2); - - //changing FABRIC_ASSET_ID value - const modifyResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "18"], - methodName: "UpdateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - expect(modifyResponse).not.toBeUndefined(); - expect(modifyResponse.status).toBeGreaterThan(199); - expect(modifyResponse.status).toBeLessThan(300); - - const snapshot1 = await pluginBungee.generateSnapshot( - [], - strategy, - networkDetails, - ); - - //tI is the time of the first transaction +1 - const tI = ( - BigInt(snapshot.getStateBins()[0].getTransactions()[0].getTimeStamp()) + - BigInt(1) - ).toString(); - - expect(snapshot1.getStateBins().length).toEqual(1); - expect(snapshot1.getStateBins()[0].getId()).toEqual(FABRIC_ASSET_ID); - expect(snapshot1.getStateBins()[0].getTransactions().length).toEqual(2); - expect(snapshot1.getStateBins()[0].getValue()).not.toEqual( - snapshot.getStateBins()[0].getValue(), - ); - const view1 = pluginBungee.generateView( - snapshot1, - tI, - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - //expect to return a view - expect(view1.view).toBeTruthy(); - expect(view1.signature).toBeTruthy(); - - expect(snapshot1.getStateBins().length).toEqual(1); - expect(snapshot1.getStateBins()[0].getId()).toEqual(FABRIC_ASSET_ID); - //expect the view to not include first transaction (made before tI) - expect(snapshot1.getStateBins()[0].getTransactions().length).toEqual(1); - //expect old and new snapshot state values to differ - expect(snapshot1.getStateBins()[0].getValue()).not.toEqual( - snapshot.getStateBins()[0].getValue(), - ); - }, -); - -afterEach(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await Servers.shutdown(fabricServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/ITraceableContract.sol b/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/ITraceableContract.sol deleted file mode 100644 index 1e10d5f55d..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/ITraceableContract.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: UNKNOWN -pragma solidity >=0.7.0; - -interface ITraceableContract { - //All transactions that change the state of and asset, should emmit this event - event Changed(string indexed id, bytes[] value); - - //Should return a list of asset IDs to be tracked by Bungee - function getAllAssetsIDs() external view returns (string[] memory); -} diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/LockAsset.json b/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/LockAsset.json deleted file mode 100644 index 69cde87a01..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/LockAsset.json +++ /dev/null @@ -1,3865 +0,0 @@ -{ - "contractName": "LockAsset", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "indexed": false, - "internalType": "address", - "name": "creator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isLock", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "name": "Transaction", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "name": "createAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "deleteAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAllAssetsIDs", - "outputs": [ - { - "internalType": "string[]", - "name": "", - "type": "string[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "getAsset", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "creator", - "type": "address" - }, - { - "internalType": "bool", - "name": "isLock", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "internalType": "struct Asset", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isAssetLocked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isPresent", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "lockAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "unLockAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isLock\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"Transaction\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"createAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAsset\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isLock\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"internalType\":\"struct Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isAssetLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isPresent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/workspaces/blockchain-integration-framework/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/lock-asset.sol\":\"LockAsset\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/workspaces/blockchain-integration-framework/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/lock-asset.sol\":{\"keccak256\":\"0x8666cf45ca92a56370f20b5391bb801cd826f57cbfde5e717dadade9d5ed5582\",\"urls\":[\"bzz-raw://91cc30b4b79e7d9219ee39dc6d24abadc78d66d0dd650af3818cb406cf60b083\",\"dweb:/ipfs/QmV7pQLQ6WPGgEwFa1dAzn4ZxDm8ZwyikiG9aB2Dn7bbCe\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b50610b16806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063cd5286d01161005b578063cd5286d0146100f2578063db9cc41014610132578063def60e0d14610145578063e24aa37c1461015857600080fd5b80631ae4eb681461008d5780635137b8a7146100b55780635e82d0a6146100ca578063bc548275146100df575b600080fd5b6100a061009b366004610850565b61016b565b60405190151581526020015b60405180910390f35b6100bd6101d5565b6040516100ac9190610892565b6100dd6100d8366004610850565b6102ae565b005b6100a06100ed366004610850565b610404565b610105610100366004610850565b610433565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016100ac565b6100dd610140366004610924565b6104ab565b6100dd610153366004610850565b610606565b6100dd610166366004610850565b61064c565b60008060018484604051610180929190610970565b9081526040519081900360200190205460ff1690508061019f57600080fd5b600084846040516101b1929190610970565b9081526040519081900360200190205460ff600160a01b9091041691505092915050565b60606002805480602002602001604051908101604052809291908181526020016000905b828210156102a557838290600052602060002001805461021890610980565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610980565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050815260200190600101906101f9565b50505050905090565b6000600183836040516102c2929190610970565b9081526040519081900360200190205460ff169050806102e157600080fd5b6001600084846040516102f5929190610970565b9081526040519081900360200181208054921515600160a01b0260ff60a01b199093169290921790915561032c9084908490610970565b60405180910390207f9db172bd887aec98e834d86fb9ff0f1549ae602b8ca8ba1ee50902e4d502b9a060008585604051610367929190610970565b908152604051908190036020018120546001600160a01b0316906000906103919088908890610970565b9081526040519081900360200181205460ff600160a01b90910416906000906103bd9089908990610970565b908152604051908190036020018120600101546103f79392916001600160a01b039390931683529015156020830152604082015260600190565b60405180910390a2505050565b600060018383604051610418929190610970565b9081526040519081900360200190205460ff16905092915050565b604080516060810182526000808252602082018190529181019190915260008383604051610462929190610970565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116104b857600080fd5b80600084846040516104cb929190610970565b90815260200160405180910390206001018190555033600084846040516104f3929190610970565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b03199093169290921790915560009081906105359086908690610970565b9081526040519081900360200181208054921515600160a01b0260ff60a01b199093169290921790915560019061056f9085908590610970565b9081526040519081900360200190205460ff166105c557600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace016105c3838583610a1f565b505b60018084846040516105d8929190610970565b908152604051908190036020018120805492151560ff199093169290921790915561032c9084908490610970565b60006001838360405161061a929190610970565b9081526040519081900360200190205460ff1690508061063957600080fd5b60008084846040516102f5929190610970565b600060018383604051610660929190610970565b9081526040519081900360200190205460ff1690508061067f57600080fd5b6000808484604051610692929190610970565b9081526040519081900360200190205460ff600160a01b909104169050806106b957600080fd5b600084846040516106cb929190610970565b90815260405190819003602001812080546001600160a81b031916815560006001918201819055916107009087908790610970565b908152604051908190036020018120805492151560ff199093169290921790915561072e9085908590610970565b60405180910390207f9db172bd887aec98e834d86fb9ff0f1549ae602b8ca8ba1ee50902e4d502b9a060008686604051610769929190610970565b908152604051908190036020018120546001600160a01b0316906000906107939089908990610970565b9081526040519081900360200181205460ff600160a01b90910416906000906107bf908a908a90610970565b908152604051908190036020018120600101546107f99392916001600160a01b039390931683529015156020830152604082015260600190565b60405180910390a250505050565b60008083601f84011261081957600080fd5b50813567ffffffffffffffff81111561083157600080fd5b60208301915083602082850101111561084957600080fd5b9250929050565b6000806020838503121561086357600080fd5b823567ffffffffffffffff81111561087a57600080fd5b61088685828601610807565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b87010192508387016000805b8381101561091657888603603f1901855282518051808852835b818110156108ef578281018a01518982018b015289016108d4565b508781018901849052601f01601f19169096018701955093860193918601916001016108ba565b509398975050505050505050565b60008060006040848603121561093957600080fd5b833567ffffffffffffffff81111561095057600080fd5b61095c86828701610807565b909790965060209590950135949350505050565b8183823760009101908152919050565b600181811c9082168061099457607f821691505b6020821081036109b457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b601f821115610a1a57600081815260208120601f850160051c810160208610156109f75750805b601f850160051c820191505b81811015610a1657828155600101610a03565b5050505b505050565b67ffffffffffffffff831115610a3757610a376109ba565b610a4b83610a458354610980565b836109d0565b6000601f841160018114610a7f5760008515610a675750838201355b600019600387901b1c1916600186901b178355610ad9565b600083815260209020601f19861690835b82811015610ab05786850135825560209485019460019092019101610a90565b5086821015610acd5760001960f88860031b161c19848701351681555b505060018560011b0183555b505050505056fea26469706673582212204c18d4a504a078fca73e2c1077682b64833c90d807d1ce81a44c14d72869897d64736f6c63430008130033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100885760003560e01c8063cd5286d01161005b578063cd5286d0146100f2578063db9cc41014610132578063def60e0d14610145578063e24aa37c1461015857600080fd5b80631ae4eb681461008d5780635137b8a7146100b55780635e82d0a6146100ca578063bc548275146100df575b600080fd5b6100a061009b366004610850565b61016b565b60405190151581526020015b60405180910390f35b6100bd6101d5565b6040516100ac9190610892565b6100dd6100d8366004610850565b6102ae565b005b6100a06100ed366004610850565b610404565b610105610100366004610850565b610433565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016100ac565b6100dd610140366004610924565b6104ab565b6100dd610153366004610850565b610606565b6100dd610166366004610850565b61064c565b60008060018484604051610180929190610970565b9081526040519081900360200190205460ff1690508061019f57600080fd5b600084846040516101b1929190610970565b9081526040519081900360200190205460ff600160a01b9091041691505092915050565b60606002805480602002602001604051908101604052809291908181526020016000905b828210156102a557838290600052602060002001805461021890610980565b80601f016020809104026020016040519081016040528092919081815260200182805461024490610980565b80156102915780601f1061026657610100808354040283529160200191610291565b820191906000526020600020905b81548152906001019060200180831161027457829003601f168201915b5050505050815260200190600101906101f9565b50505050905090565b6000600183836040516102c2929190610970565b9081526040519081900360200190205460ff169050806102e157600080fd5b6001600084846040516102f5929190610970565b9081526040519081900360200181208054921515600160a01b0260ff60a01b199093169290921790915561032c9084908490610970565b60405180910390207f9db172bd887aec98e834d86fb9ff0f1549ae602b8ca8ba1ee50902e4d502b9a060008585604051610367929190610970565b908152604051908190036020018120546001600160a01b0316906000906103919088908890610970565b9081526040519081900360200181205460ff600160a01b90910416906000906103bd9089908990610970565b908152604051908190036020018120600101546103f79392916001600160a01b039390931683529015156020830152604082015260600190565b60405180910390a2505050565b600060018383604051610418929190610970565b9081526040519081900360200190205460ff16905092915050565b604080516060810182526000808252602082018190529181019190915260008383604051610462929190610970565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116104b857600080fd5b80600084846040516104cb929190610970565b90815260200160405180910390206001018190555033600084846040516104f3929190610970565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b03199093169290921790915560009081906105359086908690610970565b9081526040519081900360200181208054921515600160a01b0260ff60a01b199093169290921790915560019061056f9085908590610970565b9081526040519081900360200190205460ff166105c557600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace016105c3838583610a1f565b505b60018084846040516105d8929190610970565b908152604051908190036020018120805492151560ff199093169290921790915561032c9084908490610970565b60006001838360405161061a929190610970565b9081526040519081900360200190205460ff1690508061063957600080fd5b60008084846040516102f5929190610970565b600060018383604051610660929190610970565b9081526040519081900360200190205460ff1690508061067f57600080fd5b6000808484604051610692929190610970565b9081526040519081900360200190205460ff600160a01b909104169050806106b957600080fd5b600084846040516106cb929190610970565b90815260405190819003602001812080546001600160a81b031916815560006001918201819055916107009087908790610970565b908152604051908190036020018120805492151560ff199093169290921790915561072e9085908590610970565b60405180910390207f9db172bd887aec98e834d86fb9ff0f1549ae602b8ca8ba1ee50902e4d502b9a060008686604051610769929190610970565b908152604051908190036020018120546001600160a01b0316906000906107939089908990610970565b9081526040519081900360200181205460ff600160a01b90910416906000906107bf908a908a90610970565b908152604051908190036020018120600101546107f99392916001600160a01b039390931683529015156020830152604082015260600190565b60405180910390a250505050565b60008083601f84011261081957600080fd5b50813567ffffffffffffffff81111561083157600080fd5b60208301915083602082850101111561084957600080fd5b9250929050565b6000806020838503121561086357600080fd5b823567ffffffffffffffff81111561087a57600080fd5b61088685828601610807565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b87010192508387016000805b8381101561091657888603603f1901855282518051808852835b818110156108ef578281018a01518982018b015289016108d4565b508781018901849052601f01601f19169096018701955093860193918601916001016108ba565b509398975050505050505050565b60008060006040848603121561093957600080fd5b833567ffffffffffffffff81111561095057600080fd5b61095c86828701610807565b909790965060209590950135949350505050565b8183823760009101908152919050565b600181811c9082168061099457607f821691505b6020821081036109b457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b601f821115610a1a57600081815260208120601f850160051c810160208610156109f75750805b601f850160051c820191505b81811015610a1657828155600101610a03565b5050505b505050565b67ffffffffffffffff831115610a3757610a376109ba565b610a4b83610a458354610980565b836109d0565b6000601f841160018114610a7f5760008515610a675750838201355b600019600387901b1c1916600186901b178355610ad9565b600083815260209020601f19861690835b82811015610ab05786850135825560209485019460019092019101610a90565b5086821015610acd5760001960f88860031b161c19848701351681555b505060018560011b0183555b505050505056fea26469706673582212204c18d4a504a078fca73e2c1077682b64833c90d807d1ce81a44c14d72869897d64736f6c63430008130033", - "sourceMap": "543:2046:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "543:2046:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2267:231;;;;;;:::i;:::-;;:::i;:::-;;;948:14:1;;941:22;923:41;;911:2;896:18;2267:231:0;;;;;;;;2502:85;;;:::i;:::-;;;;;;;:::i;1253:229::-;;;;;;:::i;:::-;;:::i;:::-;;2162:101;;;;;;:::i;:::-;;:::i;1107:103::-;;;;;;:::i;:::-;;:::i;:::-;;;;2391:13:1;;-1:-1:-1;;;;;2387:39:1;2369:58;;2497:4;2485:17;;;2479:24;2472:32;2465:40;2443:20;;;2436:70;2550:17;;;2544:24;2522:20;;;2515:54;2357:2;2342:18;1107:103:0;2183:392:1;743:360:0;;;;;;:::i;:::-;;:::i;1527:232::-;;;;;;:::i;:::-;;:::i;1763:395::-;;;;;;:::i;:::-;;:::i;2267:231::-;2331:4;2345:11;2359;2371:2;;2359:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;2359:15:0;2382;;;;;;2476:6;2483:2;;2476:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;2476:17:0;;;;;-1:-1:-1;;2267:231:0;;;;:::o;2502:85::-;2550:15;2579:3;2572:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2502:85;:::o;1253:229::-;1307:11;1321;1333:2;;1321:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1321:15:0;1344;;;;;;1388:4;1368:6;1375:2;;1368:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:24;;;;;-1:-1:-1;;;1368:24:0;-1:-1:-1;;;;1368:24:0;;;;;;;;;;1405:71;;1417:2;;;;1405:71;:::i;:::-;;;;;;;;;1421:6;1428:2;;1421:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:18;-1:-1:-1;;;;;1421:18:0;;;;1441:10;;1448:2;;;;1441:10;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1441:17:0;;;;;;;1460:10;;1467:2;;;;1460:10;:::i;:::-;;;;;;;;;;;;;;:15;;;1405:71;;;;-1:-1:-1;;;;;3941:32:1;;;;3923:51;;4017:14;;4010:22;4005:2;3990:18;;3983:50;4064:2;4049:18;;4042:34;3911:2;3896:18;;3727:355;1405:71:0;;;;;;;;1299:183;1253:229;;:::o;2162:101::-;2222:4;2243:11;2255:2;;2243:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;2162:101:0;;;;:::o;1107:103::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;1195:6:0;1202:2;;1195:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1188:17;;;;;;;-1:-1:-1;;;;;1188:17:0;;;;-1:-1:-1;;;1188:17:0;;;;;;;;;;;;;;;;;;;;;;1195:10;1107:103;-1:-1:-1;;;1107:103:0:o;743:360::-;822:1;817:4;:6;809:15;;;;;;849:4;832:6;839:2;;832:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;:21;;;;882:10;861:6;868:2;;861:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;;-1:-1:-1;;;;;861:31:0;;;;-1:-1:-1;;;;;;861:31:0;;;;;;;;;;:18;;;;900:10;;907:2;;;;900:10;:::i;:::-;;;;;;;;;;;;;;:25;;;;;-1:-1:-1;;;900:25:0;-1:-1:-1;;;;900:25:0;;;;;;;;;;-1:-1:-1;;938:15:0;;950:2;;;;938:15;:::i;:::-;;;;;;;;;;;;;;;;;933:52;;964:3;:12;;;;;;;-1:-1:-1;964:12:0;;;;;;;973:2;;964:12;;:::i;:::-;;933:52;1010:4;992:11;1004:2;;992:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;:22;;;;;-1:-1:-1;;992:22:0;;;;;;;;;;1027:71;;1039:2;;;;1027:71;:::i;1527:232::-;1583:11;1597;1609:2;;1597:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1597:15:0;1620;;;;;;1664:5;1644:6;1651:2;;1644:10;;;;;;;:::i;1763:395::-;1819:11;1833;1845:2;;1833:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1833:15:0;1856;;;;;;1943:18;1964:6;1971:2;;1964:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1964:17:0;;;;;-1:-1:-1;1964:17:0;1989:22;;;;;;2027:6;2034:2;;2027:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;2020:17;;-1:-1:-1;;;;;;2020:17:0;;;2027:10;2020:17;;;;;;;2027:10;2045:15;;2057:2;;;;2045:15;:::i;:::-;;;;;;;;;;;;;;:23;;;;;-1:-1:-1;;2045:23:0;;;;;;;;;;2081:71;;2093:2;;;;2081:71;:::i;:::-;;;;;;;;;2097:6;2104:2;;2097:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:18;-1:-1:-1;;;;;2097:18:0;;;;2117:10;;2124:2;;;;2117:10;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;2117:17:0;;;;;;;2136:10;;2143:2;;;;2136:10;:::i;:::-;;;;;;;;;;;;;;:15;;;2081:71;;;;-1:-1:-1;;;;;3941:32:1;;;;3923:51;;4017:14;;4010:22;4005:2;3990:18;;3983:50;4064:2;4049:18;;4042:34;3911:2;3896:18;;3727:355;2081:71:0;;;;;;;;1811:347;;1763:395;;:::o;14:348:1:-;66:8;76:6;130:3;123:4;115:6;111:17;107:27;97:55;;148:1;145;138:12;97:55;-1:-1:-1;171:20:1;;214:18;203:30;;200:50;;;246:1;243;236:12;200:50;283:4;275:6;271:17;259:29;;335:3;328:4;319:6;311;307:19;303:30;300:39;297:59;;;352:1;349;342:12;297:59;14:348;;;;;:::o;367:411::-;438:6;446;499:2;487:9;478:7;474:23;470:32;467:52;;;515:1;512;505:12;467:52;555:9;542:23;588:18;580:6;577:30;574:50;;;620:1;617;610:12;574:50;659:59;710:7;701:6;690:9;686:22;659:59;:::i;:::-;737:8;;633:85;;-1:-1:-1;367:411:1;-1:-1:-1;;;;367:411:1:o;975:1203::-;1137:4;1166:2;1206;1195:9;1191:18;1236:2;1225:9;1218:21;1259:6;1294;1288:13;1325:6;1317;1310:22;1363:2;1352:9;1348:18;1341:25;;1425:2;1415:6;1412:1;1408:14;1397:9;1393:30;1389:39;1375:53;;1463:2;1455:6;1451:15;1484:1;1505;1515:634;1531:6;1526:3;1523:15;1515:634;;;1600:22;;;-1:-1:-1;;1596:36:1;1584:49;;1656:13;;1698:9;;1720:24;;;1768:1;1782:157;1798:8;1793:3;1790:17;1782:157;;;1906:12;;;1902:21;;1896:28;1873:16;;;1869:25;;1862:63;1817:12;;1782:157;;;-1:-1:-1;1963:21:1;;;1959:30;;1952:41;;;2059:2;2036:17;-1:-1:-1;;2032:31:1;2020:44;;;2016:53;;;-1:-1:-1;2127:12:1;;;;2092:15;;;;1557:1;1548:11;1515:634;;;-1:-1:-1;2166:6:1;;975:1203;-1:-1:-1;;;;;;;;975:1203:1:o;2580:479::-;2660:6;2668;2676;2729:2;2717:9;2708:7;2704:23;2700:32;2697:52;;;2745:1;2742;2735:12;2697:52;2785:9;2772:23;2818:18;2810:6;2807:30;2804:50;;;2850:1;2847;2840:12;2804:50;2889:59;2940:7;2931:6;2920:9;2916:22;2889:59;:::i;:::-;2967:8;;2863:85;;-1:-1:-1;3049:2:1;3034:18;;;;3021:32;;2580:479;-1:-1:-1;;;;2580:479:1:o;3064:273::-;3249:6;3241;3236:3;3223:33;3205:3;3275:16;;3300:13;;;3275:16;3064:273;-1:-1:-1;3064:273:1:o;3342:380::-;3421:1;3417:12;;;;3464;;;3485:61;;3539:4;3531:6;3527:17;3517:27;;3485:61;3592:2;3584:6;3581:14;3561:18;3558:38;3555:161;;3638:10;3633:3;3629:20;3626:1;3619:31;3673:4;3670:1;3663:15;3701:4;3698:1;3691:15;3555:161;;3342:380;;;:::o;4087:127::-;4148:10;4143:3;4139:20;4136:1;4129:31;4179:4;4176:1;4169:15;4203:4;4200:1;4193:15;4345:545;4447:2;4442:3;4439:11;4436:448;;;4483:1;4508:5;4504:2;4497:17;4553:4;4549:2;4539:19;4623:2;4611:10;4607:19;4604:1;4600:27;4594:4;4590:38;4659:4;4647:10;4644:20;4641:47;;;-1:-1:-1;4682:4:1;4641:47;4737:2;4732:3;4728:12;4725:1;4721:20;4715:4;4711:31;4701:41;;4792:82;4810:2;4803:5;4800:13;4792:82;;;4855:17;;;4836:1;4825:13;4792:82;;;4796:3;;;4436:448;4345:545;;;:::o;5066:1206::-;5190:18;5185:3;5182:27;5179:53;;;5212:18;;:::i;:::-;5241:94;5331:3;5291:38;5323:4;5317:11;5291:38;:::i;:::-;5285:4;5241:94;:::i;:::-;5361:1;5386:2;5381:3;5378:11;5403:1;5398:616;;;;6058:1;6075:3;6072:93;;;-1:-1:-1;6131:19:1;;;6118:33;6072:93;-1:-1:-1;;5023:1:1;5019:11;;;5015:24;5011:29;5001:40;5047:1;5043:11;;;4998:57;6178:78;;5371:895;;5398:616;4292:1;4285:14;;;4329:4;4316:18;;-1:-1:-1;;5434:17:1;;;5535:9;5557:229;5571:7;5568:1;5565:14;5557:229;;;5660:19;;;5647:33;5632:49;;5767:4;5752:20;;;;5720:1;5708:14;;;;5587:12;5557:229;;;5561:3;5814;5805:7;5802:16;5799:159;;;5938:1;5934:6;5928:3;5922;5919:1;5915:11;5911:21;5907:34;5903:39;5890:9;5885:3;5881:19;5868:33;5864:79;5856:6;5849:95;5799:159;;;6001:1;5995:3;5992:1;5988:11;5984:19;5978:4;5971:33;5371:895;;;5066:1206;;;:::o", - "sourcePath": "/workspaces/blockchain-integration-framework/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/lock-asset.sol", - "compiler": { - "name": "solc", - "version": "0.8.19+commit.7dd6d404" - }, - "ast": { - "absolutePath": "/workspaces/blockchain-integration-framework/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/lock-asset.sol", - "exportedSymbols": { - "Asset": [ - 8 - ], - "LockAsset": [ - 290 - ] - }, - "id": 291, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "canonicalName": "Asset", - "id": 8, - "members": [ - { - "constant": false, - "id": 3, - "mutability": "mutable", - "name": "creator", - "nameLocation": "464:7:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "456:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "456:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 5, - "mutability": "mutable", - "name": "isLock", - "nameLocation": "482:6:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "477:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "477:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "size", - "nameLocation": "499:4:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "494:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "494:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "name": "Asset", - "nameLocation": "445:5:0", - "nodeType": "StructDefinition", - "scope": 291, - "src": "438:68:0", - "visibility": "public" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "LockAsset", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 290, - "linearizedBaseContracts": [ - 290 - ], - "name": "LockAsset", - "nameLocation": "552:9:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13, - "mutability": "mutable", - "name": "assets", - "nameLocation": "592:6:0", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "566:32:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string => struct Asset)" - }, - "typeName": { - "id": 12, - "keyName": "", - "keyNameLocation": "-1:-1:-1", - "keyType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "575:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "566:25:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string => struct Asset)" - }, - "valueName": "", - "valueNameLocation": "-1:-1:-1", - "valueType": { - "id": 11, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 10, - "name": "Asset", - "nameLocations": [ - "585:5:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 8, - "src": "585:5:0" - }, - "referencedDeclaration": 8, - "src": "585:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", - "typeString": "struct Asset" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 17, - "mutability": "mutable", - "name": "assetExists", - "nameLocation": "627:11:0", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "602:36:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "typeName": { - "id": 16, - "keyName": "", - "keyNameLocation": "-1:-1:-1", - "keyType": { - "id": 14, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "611:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "602:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "valueName": "", - "valueNameLocation": "-1:-1:-1", - "valueType": { - "id": 15, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "621:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "ids", - "nameLocation": "651:3:0", - "nodeType": "VariableDeclaration", - "scope": 290, - "src": "642:12:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 18, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "642:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 19, - "nodeType": "ArrayTypeName", - "src": "642:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "visibility": "internal" - }, - { - "anonymous": false, - "eventSelector": "9db172bd887aec98e834d86fb9ff0f1549ae602b8ca8ba1ee50902e4d502b9a0", - "id": 30, - "name": "Transaction", - "nameLocation": "667:11:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 29, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nameLocation": "694:2:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "679:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "679:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 24, - "indexed": false, - "mutability": "mutable", - "name": "creator", - "nameLocation": "706:7:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "698:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 23, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "698:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 26, - "indexed": false, - "mutability": "mutable", - "name": "isLock", - "nameLocation": "720:6:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "715:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 25, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "715:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 28, - "indexed": false, - "mutability": "mutable", - "name": "size", - "nameLocation": "733:4:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "728:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 27, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "728:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "678:60:0" - }, - "src": "661:78:0" - }, - { - "body": { - "id": 99, - "nodeType": "Block", - "src": "801:302:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 40, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 38, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "817:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 39, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "822:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "817:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 37, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "809:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "809:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 42, - "nodeType": "ExpressionStatement", - "src": "809:15:0" - }, - { - "expression": { - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 43, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "832:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 45, - "indexExpression": { - "id": 44, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "839:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "832:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 46, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "843:4:0", - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "832:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 47, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "849:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "832:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 49, - "nodeType": "ExpressionStatement", - "src": "832:21:0" - }, - { - "expression": { - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 50, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "861:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 52, - "indexExpression": { - "id": 51, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "868:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "861:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 53, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "872:7:0", - "memberName": "creator", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "861:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "expression": { - "id": 54, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "882:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "886:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "882:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "861:31:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 57, - "nodeType": "ExpressionStatement", - "src": "861:31:0" - }, - { - "expression": { - "id": 63, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 58, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "900:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 60, - "indexExpression": { - "id": 59, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "907:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "900:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 61, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "911:6:0", - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "900:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "920:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "900:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 64, - "nodeType": "ExpressionStatement", - "src": "900:25:0" - }, - { - "condition": { - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "937:16:0", - "subExpression": { - "baseExpression": { - "id": 65, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "938:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 67, - "indexExpression": { - "id": 66, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "950:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "938:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 76, - "nodeType": "IfStatement", - "src": "933:52:0", - "trueBody": { - "id": 75, - "nodeType": "Block", - "src": "954:31:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 72, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "973:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "expression": { - "id": 69, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "964:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "968:4:0", - "memberName": "push", - "nodeType": "MemberAccess", - "src": "964:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_string_storage_$dyn_storage_ptr_$_t_string_storage_$returns$__$attached_to$_t_array$_t_string_storage_$dyn_storage_ptr_$", - "typeString": "function (string storage ref[] storage pointer,string storage ref)" - } - }, - "id": 73, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "964:12:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 74, - "nodeType": "ExpressionStatement", - "src": "964:12:0" - } - ] - } - }, - { - "expression": { - "id": 81, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 77, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "992:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 79, - "indexExpression": { - "id": 78, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1004:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "992:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 80, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1010:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "992:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 82, - "nodeType": "ExpressionStatement", - "src": "992:22:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 84, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1039:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "expression": { - "baseExpression": { - "id": 85, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1043:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 87, - "indexExpression": { - "id": 86, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1050:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1043:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 88, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1054:7:0", - "memberName": "creator", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "1043:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "baseExpression": { - "id": 89, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1063:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 91, - "indexExpression": { - "id": 90, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1070:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1063:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 92, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1074:6:0", - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1063:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "expression": { - "baseExpression": { - "id": 93, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1082:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 95, - "indexExpression": { - "id": 94, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1089:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1082:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 96, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1093:4:0", - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "1082:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 83, - "name": "Transaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "1027:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (string memory,address,bool,uint256)" - } - }, - "id": 97, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1027:71:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 98, - "nodeType": "EmitStatement", - "src": "1022:76:0" - } - ] - }, - "functionSelector": "db9cc410", - "id": 100, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "createAsset", - "nameLocation": "752:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 35, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "id", - "nameLocation": "780:2:0", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "764:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "764:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "size", - "nameLocation": "789:4:0", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "784:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 33, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "784:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "763:31:0" - }, - "returnParameters": { - "id": 36, - "nodeType": "ParameterList", - "parameters": [], - "src": "801:0:0" - }, - "scope": 290, - "src": "743:360:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 112, - "nodeType": "Block", - "src": "1180:30:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 108, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1195:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 110, - "indexExpression": { - "id": 109, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 102, - "src": "1202:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1195:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "functionReturnParameters": 107, - "id": 111, - "nodeType": "Return", - "src": "1188:17:0" - } - ] - }, - "functionSelector": "cd5286d0", - "id": 113, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAsset", - "nameLocation": "1116:8:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 103, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 102, - "mutability": "mutable", - "name": "id", - "nameLocation": "1141:2:0", - "nodeType": "VariableDeclaration", - "scope": 113, - "src": "1125:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 101, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1125:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1124:20:0" - }, - "returnParameters": { - "id": 107, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 106, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 113, - "src": "1166:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_memory_ptr", - "typeString": "struct Asset" - }, - "typeName": { - "id": 105, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 104, - "name": "Asset", - "nameLocations": [ - "1166:5:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 8, - "src": "1166:5:0" - }, - "referencedDeclaration": 8, - "src": "1166:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", - "typeString": "struct Asset" - } - }, - "visibility": "internal" - } - ], - "src": "1165:14:0" - }, - "scope": 290, - "src": "1107:103:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 151, - "nodeType": "Block", - "src": "1299:183:0", - "statements": [ - { - "assignments": [ - 119 - ], - "declarations": [ - { - "constant": false, - "id": 119, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1312:6:0", - "nodeType": "VariableDeclaration", - "scope": 151, - "src": "1307:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 118, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1307:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 123, - "initialValue": { - "baseExpression": { - "id": 120, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1321:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 122, - "indexExpression": { - "id": 121, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "1333:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1321:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1307:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 125, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 119, - "src": "1352:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 124, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1344:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1344:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 127, - "nodeType": "ExpressionStatement", - "src": "1344:15:0" - }, - { - "expression": { - "id": 133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 128, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1368:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 130, - "indexExpression": { - "id": 129, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "1375:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1368:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 131, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "1379:6:0", - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1368:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 132, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1388:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1368:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 134, - "nodeType": "ExpressionStatement", - "src": "1368:24:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 136, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "1417:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "expression": { - "baseExpression": { - "id": 137, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1421:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 139, - "indexExpression": { - "id": 138, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "1428:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1421:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 140, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1432:7:0", - "memberName": "creator", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "1421:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "baseExpression": { - "id": 141, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1441:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 143, - "indexExpression": { - "id": 142, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "1448:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1441:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 144, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1452:6:0", - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1441:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "expression": { - "baseExpression": { - "id": 145, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1460:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 147, - "indexExpression": { - "id": 146, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "1467:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1460:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 148, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1471:4:0", - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "1460:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 135, - "name": "Transaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "1405:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (string memory,address,bool,uint256)" - } - }, - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1405:71:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 150, - "nodeType": "EmitStatement", - "src": "1400:76:0" - } - ] - }, - "functionSelector": "5e82d0a6", - "id": 152, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lockAsset", - "nameLocation": "1262:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 116, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 115, - "mutability": "mutable", - "name": "id", - "nameLocation": "1288:2:0", - "nodeType": "VariableDeclaration", - "scope": 152, - "src": "1272:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 114, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1272:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1271:20:0" - }, - "returnParameters": { - "id": 117, - "nodeType": "ParameterList", - "parameters": [], - "src": "1299:0:0" - }, - "scope": 290, - "src": "1253:229:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 190, - "nodeType": "Block", - "src": "1575:184:0", - "statements": [ - { - "assignments": [ - 158 - ], - "declarations": [ - { - "constant": false, - "id": 158, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1588:6:0", - "nodeType": "VariableDeclaration", - "scope": 190, - "src": "1583:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 157, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1583:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 162, - "initialValue": { - "baseExpression": { - "id": 159, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1597:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 161, - "indexExpression": { - "id": 160, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 154, - "src": "1609:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1597:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1583:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 164, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 158, - "src": "1628:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 163, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1620:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1620:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 166, - "nodeType": "ExpressionStatement", - "src": "1620:15:0" - }, - { - "expression": { - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 167, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1644:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 169, - "indexExpression": { - "id": 168, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 154, - "src": "1651:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1644:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 170, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "1655:6:0", - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1644:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 171, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1664:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1644:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 173, - "nodeType": "ExpressionStatement", - "src": "1644:25:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 175, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 154, - "src": "1694:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "expression": { - "baseExpression": { - "id": 176, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1698:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 178, - "indexExpression": { - "id": 177, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 154, - "src": "1705:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1698:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 179, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1709:7:0", - "memberName": "creator", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "1698:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "baseExpression": { - "id": 180, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1718:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 182, - "indexExpression": { - "id": 181, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 154, - "src": "1725:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1718:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 183, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1729:6:0", - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1718:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "expression": { - "baseExpression": { - "id": 184, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1737:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 186, - "indexExpression": { - "id": 185, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 154, - "src": "1744:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1737:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 187, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1748:4:0", - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "1737:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 174, - "name": "Transaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "1682:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (string memory,address,bool,uint256)" - } - }, - "id": 188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1682:71:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 189, - "nodeType": "EmitStatement", - "src": "1677:76:0" - } - ] - }, - "functionSelector": "def60e0d", - "id": 191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "unLockAsset", - "nameLocation": "1536:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 155, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 154, - "mutability": "mutable", - "name": "id", - "nameLocation": "1564:2:0", - "nodeType": "VariableDeclaration", - "scope": 191, - "src": "1548:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 153, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1548:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1547:20:0" - }, - "returnParameters": { - "id": 156, - "nodeType": "ParameterList", - "parameters": [], - "src": "1575:0:0" - }, - "scope": 290, - "src": "1527:232:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 244, - "nodeType": "Block", - "src": "1811:347:0", - "statements": [ - { - "assignments": [ - 197 - ], - "declarations": [ - { - "constant": false, - "id": 197, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1824:6:0", - "nodeType": "VariableDeclaration", - "scope": 244, - "src": "1819:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 196, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1819:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 201, - "initialValue": { - "baseExpression": { - "id": 198, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1833:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 200, - "indexExpression": { - "id": 199, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "1845:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1833:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1819:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 203, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1864:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 202, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1856:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1856:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 205, - "nodeType": "ExpressionStatement", - "src": "1856:15:0" - }, - { - "assignments": [ - 207 - ], - "declarations": [ - { - "constant": false, - "id": 207, - "mutability": "mutable", - "name": "assetIsLocked", - "nameLocation": "1948:13:0", - "nodeType": "VariableDeclaration", - "scope": 244, - "src": "1943:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 206, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1943:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 212, - "initialValue": { - "expression": { - "baseExpression": { - "id": 208, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1964:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 210, - "indexExpression": { - "id": 209, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "1971:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1964:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 211, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1975:6:0", - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1964:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1943:38:0" - }, - { - "expression": { - "arguments": [ - { - "id": 214, - "name": "assetIsLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 207, - "src": "1997:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 213, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1989:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1989:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 216, - "nodeType": "ExpressionStatement", - "src": "1989:22:0" - }, - { - "expression": { - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "2020:17:0", - "subExpression": { - "baseExpression": { - "id": 217, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "2027:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 219, - "indexExpression": { - "id": 218, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "2034:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2027:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 221, - "nodeType": "ExpressionStatement", - "src": "2020:17:0" - }, - { - "expression": { - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 222, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "2045:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 224, - "indexExpression": { - "id": 223, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "2057:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2045:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2063:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "2045:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 227, - "nodeType": "ExpressionStatement", - "src": "2045:23:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 229, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "2093:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "expression": { - "baseExpression": { - "id": 230, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "2097:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 232, - "indexExpression": { - "id": 231, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "2104:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2097:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 233, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2108:7:0", - "memberName": "creator", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "2097:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "baseExpression": { - "id": 234, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "2117:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 236, - "indexExpression": { - "id": 235, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "2124:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2117:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 237, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2128:6:0", - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "2117:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "expression": { - "baseExpression": { - "id": 238, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "2136:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 240, - "indexExpression": { - "id": 239, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "2143:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2136:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 241, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2147:4:0", - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "2136:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 228, - "name": "Transaction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "2081:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_address_$_t_bool_$_t_uint256_$returns$__$", - "typeString": "function (string memory,address,bool,uint256)" - } - }, - "id": 242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2081:71:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 243, - "nodeType": "EmitStatement", - "src": "2076:76:0" - } - ] - }, - "functionSelector": "e24aa37c", - "id": 245, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deleteAsset", - "nameLocation": "1772:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 194, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 193, - "mutability": "mutable", - "name": "id", - "nameLocation": "1800:2:0", - "nodeType": "VariableDeclaration", - "scope": 245, - "src": "1784:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 192, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1784:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1783:20:0" - }, - "returnParameters": { - "id": 195, - "nodeType": "ParameterList", - "parameters": [], - "src": "1811:0:0" - }, - "scope": 290, - "src": "1763:395:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 256, - "nodeType": "Block", - "src": "2228:35:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 252, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "2243:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 254, - "indexExpression": { - "id": 253, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 247, - "src": "2255:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2243:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 251, - "id": 255, - "nodeType": "Return", - "src": "2236:22:0" - } - ] - }, - "functionSelector": "bc548275", - "id": 257, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isPresent", - "nameLocation": "2171:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 248, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 247, - "mutability": "mutable", - "name": "id", - "nameLocation": "2197:2:0", - "nodeType": "VariableDeclaration", - "scope": 257, - "src": "2181:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 246, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2181:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "2180:20:0" - }, - "returnParameters": { - "id": 251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 250, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 257, - "src": "2222:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 249, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2222:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "2221:6:0" - }, - "scope": 290, - "src": "2162:101:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 279, - "nodeType": "Block", - "src": "2337:161:0", - "statements": [ - { - "assignments": [ - 265 - ], - "declarations": [ - { - "constant": false, - "id": 265, - "mutability": "mutable", - "name": "exists", - "nameLocation": "2350:6:0", - "nodeType": "VariableDeclaration", - "scope": 279, - "src": "2345:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 264, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2345:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 269, - "initialValue": { - "baseExpression": { - "id": 266, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "2359:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 268, - "indexExpression": { - "id": 267, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 259, - "src": "2371:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2359:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2345:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 271, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "2390:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 270, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2382:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2382:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 273, - "nodeType": "ExpressionStatement", - "src": "2382:15:0" - }, - { - "expression": { - "expression": { - "baseExpression": { - "id": 274, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "2476:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 276, - "indexExpression": { - "id": 275, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 259, - "src": "2483:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2476:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 277, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2487:6:0", - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "2476:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 263, - "id": 278, - "nodeType": "Return", - "src": "2469:24:0" - } - ] - }, - "functionSelector": "1ae4eb68", - "id": 280, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isAssetLocked", - "nameLocation": "2276:13:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 260, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 259, - "mutability": "mutable", - "name": "id", - "nameLocation": "2306:2:0", - "nodeType": "VariableDeclaration", - "scope": 280, - "src": "2290:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 258, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2290:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "2289:20:0" - }, - "returnParameters": { - "id": 263, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 262, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 280, - "src": "2331:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 261, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2331:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "2330:6:0" - }, - "scope": 290, - "src": "2267:231:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 288, - "nodeType": "Block", - "src": "2566:21:0", - "statements": [ - { - "expression": { - "id": 286, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "2579:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "functionReturnParameters": 285, - "id": 287, - "nodeType": "Return", - "src": "2572:10:0" - } - ] - }, - "functionSelector": "5137b8a7", - "id": 289, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAllAssetsIDs", - "nameLocation": "2511:15:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 281, - "nodeType": "ParameterList", - "parameters": [], - "src": "2526:2:0" - }, - "returnParameters": { - "id": 285, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 284, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 289, - "src": "2550:15:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_memory_ptr_$dyn_memory_ptr", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 282, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2550:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 283, - "nodeType": "ArrayTypeName", - "src": "2550:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "visibility": "internal" - } - ], - "src": "2549:17:0" - }, - "scope": 290, - "src": "2502:85:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 291, - "src": "543:2046:0", - "usedErrors": [] - } - ], - "src": "413:2177:0" - }, - "functionHashes": { - "createAsset(string,uint256)": "db9cc410", - "deleteAsset(string)": "e24aa37c", - "getAllAssetsIDs()": "5137b8a7", - "getAsset(string)": "cd5286d0", - "isAssetLocked(string)": "1ae4eb68", - "isPresent(string)": "bc548275", - "lockAsset(string)": "5e82d0a6", - "unLockAsset(string)": "def60e0d" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "567600", - "executionCost": "600", - "totalCost": "568200" - }, - "external": { - "createAsset(string,uint256)": "infinite", - "deleteAsset(string)": "infinite", - "getAllAssetsIDs()": "infinite", - "getAsset(string)": "infinite", - "isAssetLocked(string)": "infinite", - "isPresent(string)": "infinite", - "lockAsset(string)": "infinite", - "unLockAsset(string)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/lock-asset.sol b/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/lock-asset.sol deleted file mode 100644 index 76a43258f4..0000000000 --- a/packages/cactus-plugin-bungee-hermes/src/test/typescript/solidity/lock-asset-contract/lock-asset.sol +++ /dev/null @@ -1,81 +0,0 @@ - -pragma solidity >=0.7.0; -struct Asset{ - address creator; - bool isLock; - uint size; -} -//TODO: DETEMINE CALLDATA VS MEMORY -contract LockAsset { - mapping (string => Asset) assets; - mapping (string => bool) assetExists; - string[] ids; - - event Transaction(string indexed id, address creator, bool isLock, uint size); - - function createAsset(string calldata id, uint size) public{ - require(size>0); - assets[id].size= size; - assets[id].creator = msg.sender; - assets[id].isLock = false; - if (!assetExists[id]){ - ids.push(id); - } - assetExists[id] = true; - emit Transaction(id, assets[id].creator, assets[id].isLock, assets[id].size); - } - - function getAsset(string calldata id) public view returns (Asset memory) { - return assets[id]; - } - - //Don't care if it is already locked - function lockAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - assets[id].isLock = true; - emit Transaction(id, assets[id].creator, assets[id].isLock, assets[id].size); - - } - - //Don't care if it is already unlocked - function unLockAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - assets[id].isLock = false; - emit Transaction(id, assets[id].creator, assets[id].isLock, assets[id].size); - - } - - function deleteAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - //an asset could only be deleted if it is already locked - bool assetIsLocked = assets[id].isLock; - require(assetIsLocked); - - delete assets[id]; - assetExists[id] = false; - emit Transaction(id, assets[id].creator, assets[id].isLock, assets[id].size); - - } - - function isPresent(string calldata id) public view returns (bool) { - return assetExists[id]; - } - - function isAssetLocked(string calldata id) public view returns (bool) { - bool exists = assetExists[id]; - require(exists); - - //an asset could only be deleted if it is already locked - return assets[id].isLock; - } - - function getAllAssetsIDs() public view returns (string[] memory){ - return ids; - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-bungee-hermes/tsconfig.json b/packages/cactus-plugin-bungee-hermes/tsconfig.json deleted file mode 100644 index 90f5d51571..0000000000 --- a/packages/cactus-plugin-bungee-hermes/tsconfig.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", /* Redirect output structure to the directory. */ - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "allowJs": false, - "skipLibCheck": true, - "rootDir": "./src/", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-bungee-hermes.tsbuildinfo", - "moduleResolution": "Node" - }, - "ts-node": { - "files": true - }, - "include": [ - "./src", - "src/**/*.json" - ], - "exclude":[ - "./src/test/typescript/fabric-contracts/**/*.ts" - ], - "references": [ - { - "path": "../cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-ethereum/tsconfig.json" - }, - { - "path": "../cactus-test-geth-ledger/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/.gitignore b/packages/cactus-plugin-consortium-manual/.gitignore deleted file mode 100644 index ce4bacc38a..0000000000 --- a/packages/cactus-plugin-consortium-manual/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -cactus-openapi-spec-plugin-consortium-manual.json -src/main/typescript/generated/openapi/typescript-axios/.npmignore \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/CHANGELOG.md b/packages/cactus-plugin-consortium-manual/CHANGELOG.md deleted file mode 100644 index f8362d3422..0000000000 --- a/packages/cactus-plugin-consortium-manual/CHANGELOG.md +++ /dev/null @@ -1,221 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -### Features - -* **core-api:** add createIsJwsGeneralTypeGuard, createAjvTypeGuard ([957da7c](https://github.com/hyperledger/cacti/commit/957da7c3e1d80068391485a825ba6bb1e68333ac)), closes [/github.com/hyperledger/cacti/pull/3471#discussion_r1731894747](https://github.com//github.com/hyperledger/cacti/pull/3471/issues/discussion_r1731894747) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Code Refactoring - -* **cmd-api-server:** clean up configuration parameters [#720](https://github.com/hyperledger/cacti/issues/720) ([b8e8388](https://github.com/hyperledger/cacti/commit/b8e8388306b6708c7d3156e005b1ee9693b35a22)) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -### BREAKING CHANGES - -* **cmd-api-server:** Removed the `keyPairPem` parameter from the API server -configuration. - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **cactus-example-supply-chain-app:** mitigate CVE-2022-24434 and CVE-2022-24999 ([d28d5e8](https://github.com/hyperledger/cactus/commit/d28d5e8f3ed5dff1aa049c8f1bccce79aa21e948)), closes [#2041](https://github.com/hyperledger/cactus/issues/2041) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* add optional auth token to api-client and consortium-manual ([c2feebf](https://github.com/hyperledger/cactus/commit/c2feebfec56f13d68c2ea1ec3a34ce67394d0720)), closes [#1579](https://github.com/hyperledger/cactus/issues/1579) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-consortium-manual - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **plugin-consortium-manual:** drop repo constructor arg [#1199](https://github.com/hyperledger/cactus/issues/1199) ([7b424d4](https://github.com/hyperledger/cactus/commit/7b424d465dd7c11900e0afea5c32514a9b585084)) -* **prometheus:** metrics.ts leaks to global registry [#1202](https://github.com/hyperledger/cactus/issues/1202) ([ce076d7](https://github.com/hyperledger/cactus/commit/ce076d709f8e0cba143f8fe9d71f1de1df8f71dc)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Bug Fixes - -* **connector-corda:** fix build broken by operationId rename ([291dd3b](https://github.com/hyperledger/cactus/commit/291dd3bc666939fffbc3780eaefd9059c756878a)) - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) - -### Features - -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **core-api:** plugin async initializer method ([9678c2e](https://github.com/hyperledger/cactus/commit/9678c2e9288a73589e84f9fd254c26aed6a93297)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Features - -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -### Bug Fixes - -* **release:** package.json publish config non-public [#753](https://github.com/hyperledger/cactus/issues/753) ([5a1b7a6](https://github.com/hyperledger/cactus/commit/5a1b7a6eba9a18d4f7474a3c44d4a4035fc99e84)) - -### Features - -* **api-server:** add prometheus exporter ([c348aa4](https://github.com/hyperledger/cactus/commit/c348aa4f858536bca350af6abd524a5d345aacc7)), closes [#539](https://github.com/hyperledger/cactus/issues/539) - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **deps:** missing uuid from plugins [#529](https://github.com/hyperledger/cactus/issues/529) ([04ea8bb](https://github.com/hyperledger/cactus/commit/04ea8bb8a035382de078d082889c8fdfd48479f8)) -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) -* **npm:** clean script was missing folders ([416b82e](https://github.com/hyperledger/cactus/commit/416b82e971607129fbdfa9e1270644d0c2f5c706)), closes [#469](https://github.com/hyperledger/cactus/issues/469) - -### Features - -* **consortium-manual:** add prometheus exporter ([853bdc4](https://github.com/hyperledger/cactus/commit/853bdc42aca59dabe2910c5dd4ddec646e80ab5a)), closes [#538](https://github.com/hyperledger/cactus/issues/538) -* **core-api:** plugin import types: LOCAL & REMOTE ([f4d51da](https://github.com/hyperledger/cactus/commit/f4d51dae5b28367e714a2b9aa35dd84a2cb4cb37)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -### Bug Fixes - -* open API generator config - protected keyword ([57e52f4](https://github.com/hyperledger/cactus/commit/57e52f42c3aaab653acb8838ba93518a5a097af8)), closes [#436](https://github.com/hyperledger/cactus/issues/436) - -### Features - -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) -* **plugin-consortium-manual:** JSON Web Signatures for Nodes, Consortium ([caf60b3](https://github.com/hyperledger/cactus/commit/caf60b3f69c81617787afe73ca12165baa2dce50)) - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -### Features - -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) -* **plugin-consortium-manual:** JSON Web Signatures for Nodes, Consortium ([caf60b3](https://github.com/hyperledger/cactus/commit/caf60b3f69c81617787afe73ca12165baa2dce50)) diff --git a/packages/cactus-plugin-consortium-manual/README.md b/packages/cactus-plugin-consortium-manual/README.md deleted file mode 100644 index 6e00b204fd..0000000000 --- a/packages/cactus-plugin-consortium-manual/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# `@hyperledger/cactus-plugin-consortium-manual` - -## Prometheus Exporter -This class creates a prometheus exporter, which scrapes the total Cactus node count. - -### Usage Prometheus -The prometheus exporter object is initialized in the `PluginConsortiumManual` class constructor itself, so instantiating the object of the `PluginConsortiumManual` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IPluginConsortiumManualOptions` interface for `PluginConsortiumManual` constructor. - -`getPrometheusMetricsV1` function returns the prometheus exporter metrics, currently displaying the total cactus node count, which currently refreshes to match the node count in the consortium, everytime `updateMetricNodeCount` method of the `PluginConsortiumManual` class is called. - -### Prometheus Integration -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'consortium_manual_exporter' - metrics_path: api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_consortium_manual_total_node_count** and click **execute** - -### Helper code - -###### response.type.ts -This file contains the various responses of the metrics. - -###### data-fetcher.ts -This file contains functions encasing the logic to process the data points. - -###### metrics.ts -This file lists all the prometheus metrics and what they are used for. \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/openapitools.json b/packages/cactus-plugin-consortium-manual/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-consortium-manual/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-consortium-manual/package.json b/packages/cactus-plugin-consortium-manual/package.json deleted file mode 100644 index af9441e8c5..0000000000 --- a/packages/cactus-plugin-consortium-manual/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-consortium-manual", - "version": "2.0.0", - "description": "A web service plugin that provides management capabilities on a Cactus consortium as a whole for administrative purposes.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-consortium-manual.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "body-parser": "1.20.3", - "express": "4.21.0", - "jose": "4.15.5", - "json-stable-stringify": "1.0.1", - "prom-client": "15.1.3", - "typescript-optional": "2.0.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@types/express": "5.0.0", - "@types/json-stable-stringify": "1.0.33", - "@types/uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-consortium-manual.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-consortium-manual.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 184b7481ff..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,14 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_get_consortium_jws_response.go -model_get_node_jws_response.go -model_jws_general.go -model_jws_recipient.go -response.go -utils.go diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 5e229720a4..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# Go API client for cactus-plugin-consortium-manual - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-consortium-manual "github.com/hyperledger/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-consortium-manual.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-consortium-manual.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-consortium-manual.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-consortium-manual.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**GetConsortiumJwsV1**](docs/DefaultApi.md#getconsortiumjwsv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws | Retrieves a consortium JWS -*DefaultApi* | [**GetNodeJwsV1**](docs/DefaultApi.md#getnodejwsv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws | Retrieves the JWT of a Cactus Node -*DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics | Get the Prometheus Metrics - - -## Documentation For Models - - - [GetConsortiumJwsResponse](docs/GetConsortiumJwsResponse.md) - - [GetNodeJwsResponse](docs/GetNodeJwsResponse.md) - - [JWSGeneral](docs/JWSGeneral.md) - - [JWSRecipient](docs/JWSRecipient.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 56cabe1eb4..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,166 +0,0 @@ -openapi: 3.0.3 -info: - description: Manage a Cactus consortium through the APIs. Needs administrative privileges. - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - Consortium Web Service - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws: - post: - description: The JWS asserting the consortium metadata (pub keys and hosts of - nodes) - operationId: getConsortiumJwsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetConsortiumJwsRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetConsortiumJwsResponse' - description: OK - summary: Retrieves a consortium JWS - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws - /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws: - post: - operationId: getNodeJwsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetNodeJwsRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetNodeJwsResponse' - description: OK - summary: Retrieves the JWT of a Cactus Node - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws - /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics -components: - schemas: - GetNodeJwsResponse: - example: - jws: - payload: payload - signatures: - - protected: protected - signature: signature - header: - key: "" - - protected: protected - signature: signature - header: - key: "" - properties: - jws: - $ref: '#/components/schemas/JWSGeneral' - required: - - jws - type: object - GetConsortiumJwsResponse: - example: - jws: - payload: payload - signatures: - - protected: protected - signature: signature - header: - key: "" - - protected: protected - signature: signature - header: - key: "" - properties: - jws: - $ref: '#/components/schemas/JWSGeneral' - required: - - jws - type: object - PrometheusExporterMetricsResponse: - nullable: false - type: string - GetNodeJwsRequest: - additionalProperties: false - properties: {} - type: object - GetConsortiumJwsRequest: - additionalProperties: false - properties: {} - type: object - JWSRecipient: - description: "A JSON Web Signature. See: https://tools.ietf.org/html/rfc7515\ - \ for info about standard." - example: - protected: protected - signature: signature - header: - key: "" - properties: - signature: - type: string - protected: - type: string - header: - additionalProperties: true - type: object - required: - - signature - type: object - JWSGeneral: - example: - payload: payload - signatures: - - protected: protected - signature: signature - header: - key: "" - - protected: protected - signature: signature - header: - key: "" - properties: - payload: - maxLength: 65535 - minLength: 1 - type: string - signatures: - items: - $ref: '#/components/schemas/JWSRecipient' - type: array - required: - - payload - - signatures - type: object diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index b15b867b26..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,332 +0,0 @@ -/* -Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-consortium-manual - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiGetConsortiumJwsV1Request struct { - ctx context.Context - ApiService *DefaultApiService - body *map[string]interface{} -} - -func (r ApiGetConsortiumJwsV1Request) Body(body map[string]interface{}) ApiGetConsortiumJwsV1Request { - r.body = &body - return r -} - -func (r ApiGetConsortiumJwsV1Request) Execute() (*GetConsortiumJwsResponse, *http.Response, error) { - return r.ApiService.GetConsortiumJwsV1Execute(r) -} - -/* -GetConsortiumJwsV1 Retrieves a consortium JWS - -The JWS asserting the consortium metadata (pub keys and hosts of nodes) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetConsortiumJwsV1Request -*/ -func (a *DefaultApiService) GetConsortiumJwsV1(ctx context.Context) ApiGetConsortiumJwsV1Request { - return ApiGetConsortiumJwsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetConsortiumJwsResponse -func (a *DefaultApiService) GetConsortiumJwsV1Execute(r ApiGetConsortiumJwsV1Request) (*GetConsortiumJwsResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetConsortiumJwsResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetConsortiumJwsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetNodeJwsV1Request struct { - ctx context.Context - ApiService *DefaultApiService - body *map[string]interface{} -} - -func (r ApiGetNodeJwsV1Request) Body(body map[string]interface{}) ApiGetNodeJwsV1Request { - r.body = &body - return r -} - -func (r ApiGetNodeJwsV1Request) Execute() (*GetNodeJwsResponse, *http.Response, error) { - return r.ApiService.GetNodeJwsV1Execute(r) -} - -/* -GetNodeJwsV1 Retrieves the JWT of a Cactus Node - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetNodeJwsV1Request -*/ -func (a *DefaultApiService) GetNodeJwsV1(ctx context.Context) ApiGetNodeJwsV1Request { - return ApiGetNodeJwsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetNodeJwsResponse -func (a *DefaultApiService) GetNodeJwsV1Execute(r ApiGetNodeJwsV1Request) (*GetNodeJwsResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetNodeJwsResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetNodeJwsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsV1Execute(r) -} - -/* -GetPrometheusMetricsV1 Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsV1Request -*/ -func (a *DefaultApiService) GetPrometheusMetricsV1(ctx context.Context) ApiGetPrometheusMetricsV1Request { - return ApiGetPrometheusMetricsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsV1Execute(r ApiGetPrometheusMetricsV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetricsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 31894fad7a..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-consortium-manual - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Consortium Web Service API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 0c1ced4f4f..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-consortium-manual - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index cdf237b0ea..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_get_consortium_jws_response.go b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_get_consortium_jws_response.go deleted file mode 100644 index 855a435ba8..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_get_consortium_jws_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-consortium-manual - -import ( - "encoding/json" -) - -// checks if the GetConsortiumJwsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetConsortiumJwsResponse{} - -// GetConsortiumJwsResponse struct for GetConsortiumJwsResponse -type GetConsortiumJwsResponse struct { - Jws JWSGeneral `json:"jws"` -} - -// NewGetConsortiumJwsResponse instantiates a new GetConsortiumJwsResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetConsortiumJwsResponse(jws JWSGeneral) *GetConsortiumJwsResponse { - this := GetConsortiumJwsResponse{} - this.Jws = jws - return &this -} - -// NewGetConsortiumJwsResponseWithDefaults instantiates a new GetConsortiumJwsResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetConsortiumJwsResponseWithDefaults() *GetConsortiumJwsResponse { - this := GetConsortiumJwsResponse{} - return &this -} - -// GetJws returns the Jws field value -func (o *GetConsortiumJwsResponse) GetJws() JWSGeneral { - if o == nil { - var ret JWSGeneral - return ret - } - - return o.Jws -} - -// GetJwsOk returns a tuple with the Jws field value -// and a boolean to check if the value has been set. -func (o *GetConsortiumJwsResponse) GetJwsOk() (*JWSGeneral, bool) { - if o == nil { - return nil, false - } - return &o.Jws, true -} - -// SetJws sets field value -func (o *GetConsortiumJwsResponse) SetJws(v JWSGeneral) { - o.Jws = v -} - -func (o GetConsortiumJwsResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetConsortiumJwsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["jws"] = o.Jws - return toSerialize, nil -} - -type NullableGetConsortiumJwsResponse struct { - value *GetConsortiumJwsResponse - isSet bool -} - -func (v NullableGetConsortiumJwsResponse) Get() *GetConsortiumJwsResponse { - return v.value -} - -func (v *NullableGetConsortiumJwsResponse) Set(val *GetConsortiumJwsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGetConsortiumJwsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGetConsortiumJwsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetConsortiumJwsResponse(val *GetConsortiumJwsResponse) *NullableGetConsortiumJwsResponse { - return &NullableGetConsortiumJwsResponse{value: val, isSet: true} -} - -func (v NullableGetConsortiumJwsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetConsortiumJwsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_get_node_jws_response.go b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_get_node_jws_response.go deleted file mode 100644 index 899c530036..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_get_node_jws_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-consortium-manual - -import ( - "encoding/json" -) - -// checks if the GetNodeJwsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetNodeJwsResponse{} - -// GetNodeJwsResponse struct for GetNodeJwsResponse -type GetNodeJwsResponse struct { - Jws JWSGeneral `json:"jws"` -} - -// NewGetNodeJwsResponse instantiates a new GetNodeJwsResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetNodeJwsResponse(jws JWSGeneral) *GetNodeJwsResponse { - this := GetNodeJwsResponse{} - this.Jws = jws - return &this -} - -// NewGetNodeJwsResponseWithDefaults instantiates a new GetNodeJwsResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetNodeJwsResponseWithDefaults() *GetNodeJwsResponse { - this := GetNodeJwsResponse{} - return &this -} - -// GetJws returns the Jws field value -func (o *GetNodeJwsResponse) GetJws() JWSGeneral { - if o == nil { - var ret JWSGeneral - return ret - } - - return o.Jws -} - -// GetJwsOk returns a tuple with the Jws field value -// and a boolean to check if the value has been set. -func (o *GetNodeJwsResponse) GetJwsOk() (*JWSGeneral, bool) { - if o == nil { - return nil, false - } - return &o.Jws, true -} - -// SetJws sets field value -func (o *GetNodeJwsResponse) SetJws(v JWSGeneral) { - o.Jws = v -} - -func (o GetNodeJwsResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetNodeJwsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["jws"] = o.Jws - return toSerialize, nil -} - -type NullableGetNodeJwsResponse struct { - value *GetNodeJwsResponse - isSet bool -} - -func (v NullableGetNodeJwsResponse) Get() *GetNodeJwsResponse { - return v.value -} - -func (v *NullableGetNodeJwsResponse) Set(val *GetNodeJwsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGetNodeJwsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGetNodeJwsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetNodeJwsResponse(val *GetNodeJwsResponse) *NullableGetNodeJwsResponse { - return &NullableGetNodeJwsResponse{value: val, isSet: true} -} - -func (v NullableGetNodeJwsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetNodeJwsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_jws_general.go b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_jws_general.go deleted file mode 100644 index 0faf0e27a2..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_jws_general.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-consortium-manual - -import ( - "encoding/json" -) - -// checks if the JWSGeneral type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &JWSGeneral{} - -// JWSGeneral struct for JWSGeneral -type JWSGeneral struct { - Payload string `json:"payload"` - Signatures []JWSRecipient `json:"signatures"` -} - -// NewJWSGeneral instantiates a new JWSGeneral object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJWSGeneral(payload string, signatures []JWSRecipient) *JWSGeneral { - this := JWSGeneral{} - this.Payload = payload - this.Signatures = signatures - return &this -} - -// NewJWSGeneralWithDefaults instantiates a new JWSGeneral object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJWSGeneralWithDefaults() *JWSGeneral { - this := JWSGeneral{} - return &this -} - -// GetPayload returns the Payload field value -func (o *JWSGeneral) GetPayload() string { - if o == nil { - var ret string - return ret - } - - return o.Payload -} - -// GetPayloadOk returns a tuple with the Payload field value -// and a boolean to check if the value has been set. -func (o *JWSGeneral) GetPayloadOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Payload, true -} - -// SetPayload sets field value -func (o *JWSGeneral) SetPayload(v string) { - o.Payload = v -} - -// GetSignatures returns the Signatures field value -func (o *JWSGeneral) GetSignatures() []JWSRecipient { - if o == nil { - var ret []JWSRecipient - return ret - } - - return o.Signatures -} - -// GetSignaturesOk returns a tuple with the Signatures field value -// and a boolean to check if the value has been set. -func (o *JWSGeneral) GetSignaturesOk() ([]JWSRecipient, bool) { - if o == nil { - return nil, false - } - return o.Signatures, true -} - -// SetSignatures sets field value -func (o *JWSGeneral) SetSignatures(v []JWSRecipient) { - o.Signatures = v -} - -func (o JWSGeneral) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JWSGeneral) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["payload"] = o.Payload - toSerialize["signatures"] = o.Signatures - return toSerialize, nil -} - -type NullableJWSGeneral struct { - value *JWSGeneral - isSet bool -} - -func (v NullableJWSGeneral) Get() *JWSGeneral { - return v.value -} - -func (v *NullableJWSGeneral) Set(val *JWSGeneral) { - v.value = val - v.isSet = true -} - -func (v NullableJWSGeneral) IsSet() bool { - return v.isSet -} - -func (v *NullableJWSGeneral) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJWSGeneral(val *JWSGeneral) *NullableJWSGeneral { - return &NullableJWSGeneral{value: val, isSet: true} -} - -func (v NullableJWSGeneral) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJWSGeneral) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_jws_recipient.go b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_jws_recipient.go deleted file mode 100644 index f79bd7820f..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/model_jws_recipient.go +++ /dev/null @@ -1,189 +0,0 @@ -/* -Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-consortium-manual - -import ( - "encoding/json" -) - -// checks if the JWSRecipient type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &JWSRecipient{} - -// JWSRecipient A JSON Web Signature. See: https://tools.ietf.org/html/rfc7515 for info about standard. -type JWSRecipient struct { - Signature string `json:"signature"` - Protected *string `json:"protected,omitempty"` - Header map[string]interface{} `json:"header,omitempty"` -} - -// NewJWSRecipient instantiates a new JWSRecipient object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJWSRecipient(signature string) *JWSRecipient { - this := JWSRecipient{} - this.Signature = signature - return &this -} - -// NewJWSRecipientWithDefaults instantiates a new JWSRecipient object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJWSRecipientWithDefaults() *JWSRecipient { - this := JWSRecipient{} - return &this -} - -// GetSignature returns the Signature field value -func (o *JWSRecipient) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *JWSRecipient) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *JWSRecipient) SetSignature(v string) { - o.Signature = v -} - -// GetProtected returns the Protected field value if set, zero value otherwise. -func (o *JWSRecipient) GetProtected() string { - if o == nil || IsNil(o.Protected) { - var ret string - return ret - } - return *o.Protected -} - -// GetProtectedOk returns a tuple with the Protected field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWSRecipient) GetProtectedOk() (*string, bool) { - if o == nil || IsNil(o.Protected) { - return nil, false - } - return o.Protected, true -} - -// HasProtected returns a boolean if a field has been set. -func (o *JWSRecipient) HasProtected() bool { - if o != nil && !IsNil(o.Protected) { - return true - } - - return false -} - -// SetProtected gets a reference to the given string and assigns it to the Protected field. -func (o *JWSRecipient) SetProtected(v string) { - o.Protected = &v -} - -// GetHeader returns the Header field value if set, zero value otherwise. -func (o *JWSRecipient) GetHeader() map[string]interface{} { - if o == nil || IsNil(o.Header) { - var ret map[string]interface{} - return ret - } - return o.Header -} - -// GetHeaderOk returns a tuple with the Header field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWSRecipient) GetHeaderOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Header) { - return map[string]interface{}{}, false - } - return o.Header, true -} - -// HasHeader returns a boolean if a field has been set. -func (o *JWSRecipient) HasHeader() bool { - if o != nil && !IsNil(o.Header) { - return true - } - - return false -} - -// SetHeader gets a reference to the given map[string]interface{} and assigns it to the Header field. -func (o *JWSRecipient) SetHeader(v map[string]interface{}) { - o.Header = v -} - -func (o JWSRecipient) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JWSRecipient) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["signature"] = o.Signature - if !IsNil(o.Protected) { - toSerialize["protected"] = o.Protected - } - if !IsNil(o.Header) { - toSerialize["header"] = o.Header - } - return toSerialize, nil -} - -type NullableJWSRecipient struct { - value *JWSRecipient - isSet bool -} - -func (v NullableJWSRecipient) Get() *JWSRecipient { - return v.value -} - -func (v *NullableJWSRecipient) Set(val *JWSRecipient) { - v.value = val - v.isSet = true -} - -func (v NullableJWSRecipient) IsSet() bool { - return v.isSet -} - -func (v *NullableJWSRecipient) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJWSRecipient(val *JWSRecipient) *NullableJWSRecipient { - return &NullableJWSRecipient{value: val, isSet: true} -} - -func (v NullableJWSRecipient) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJWSRecipient) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 124ee93cec..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-consortium-manual - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 7d4d058051..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Hyperledger Cactus Plugin - Consortium Web Service - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-consortium-manual - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-consortium-manual_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService GetConsortiumJwsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetConsortiumJwsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetNodeJwsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetNodeJwsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetricsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetricsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 10df6d7842..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-consortium-manual - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/json/openapi.json b/packages/cactus-plugin-consortium-manual/src/main/json/openapi.json deleted file mode 100644 index 4d664c6e01..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/json/openapi.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Consortium Web Service", - "description": "Manage a Cactus consortium through the APIs. Needs administrative privileges.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "GetNodeJwsResponse": { - "type": "object", - "required": ["jws"], - "properties": { - "jws": { - "description": "The JSON Web Signature of the Cactus node.", - "$ref": "#/components/schemas/JWSGeneral", - "nullable": false - } - } - }, - "GetConsortiumJwsResponse": { - "type": "object", - "required": ["jws"], - "properties": { - "jws": { - "description": "The JSON Web Signature of the Cactus consortium.", - "$ref": "#/components/schemas/JWSGeneral", - "nullable": false, - "format": "The general format which is a JSON object, not a string." - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetNodeJwsRequest": { - "type": "object", - "additionalProperties": false, - "properties": {} - }, - "GetConsortiumJwsRequest": { - "type": "object", - "additionalProperties": false, - "properties": {} - }, - "JWSRecipient": { - "description": "A JSON Web Signature. See: https://tools.ietf.org/html/rfc7515 for info about standard.", - "type": "object", - "required": ["signature"], - "properties": { - "signature": { - "type": "string" - }, - "protected": { - "type": "string" - }, - "header": { - "type": "object", - "additionalProperties": true - } - } - }, - "JWSGeneral": { - "type": "object", - "required": ["payload", "signatures"], - "properties": { - "payload": { - "type": "string", - "minLength": 1, - "maxLength": 65535 - }, - "signatures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JWSRecipient" - } - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws" - } - }, - "operationId": "getConsortiumJwsV1", - "summary": "Retrieves a consortium JWS", - "description": "The JWS asserting the consortium metadata (pub keys and hosts of nodes)", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConsortiumJwsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConsortiumJwsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws" - } - }, - "operationId": "getNodeJwsV1", - "summary": "Retrieves the JWT of a Cactus Node", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetNodeJwsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetNodeJwsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/json/openapi.tpl.json b/packages/cactus-plugin-consortium-manual/src/main/json/openapi.tpl.json deleted file mode 100644 index 847f742570..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Consortium Web Service", - "description": "Manage a Cactus consortium through the APIs. Needs administrative privileges.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "GetNodeJwsResponse": { - "type": "object", - "required": ["jws"], - "properties": { - "jws": { - "description": "The JSON Web Signature of the Cactus node.", - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/schemas/JWSGeneral", - "nullable": false - } - } - }, - "GetConsortiumJwsResponse": { - "type": "object", - "required": ["jws"], - "properties": { - "jws": { - "description": "The JSON Web Signature of the Cactus consortium.", - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/schemas/JWSGeneral", - "nullable": false, - "format": "The general format which is a JSON object, not a string." - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetNodeJwsRequest": { - "type": "object", - "additionalProperties": false, - "properties": {} - }, - "GetConsortiumJwsRequest": { - "type": "object", - "additionalProperties": false, - "properties": {} - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws" - } - }, - "operationId": "getConsortiumJwsV1", - "summary": "Retrieves a consortium JWS", - "description": "The JWS asserting the consortium metadata (pub keys and hosts of nodes)", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConsortiumJwsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConsortiumJwsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws" - } - }, - "operationId": "getNodeJwsV1", - "summary": "Retrieves the JWT of a Cactus Node", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetNodeJwsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetNodeJwsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 56a034831a..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,27 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/GetConsortiumJwsResponse.kt -src/main/kotlin/org/openapitools/client/models/GetNodeJwsResponse.kt -src/main/kotlin/org/openapitools/client/models/JWSGeneral.kt -src/main/kotlin/org/openapitools/client/models/JWSRecipient.kt diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 562dbaa95b..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - Consortium Web Service - -Manage a Cactus consortium through the APIs. Needs administrative privileges. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**getConsortiumJwsV1**](docs/DefaultApi.md#getconsortiumjwsv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws | Retrieves a consortium JWS -*DefaultApi* | [**getNodeJwsV1**](docs/DefaultApi.md#getnodejwsv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws | Retrieves the JWT of a Cactus Node -*DefaultApi* | [**getPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics | Get the Prometheus Metrics - - - -## Documentation for Models - - - [org.openapitools.client.models.GetConsortiumJwsResponse](docs/GetConsortiumJwsResponse.md) - - [org.openapitools.client.models.GetNodeJwsResponse](docs/GetNodeJwsResponse.md) - - [org.openapitools.client.models.JWSGeneral](docs/JWSGeneral.md) - - [org.openapitools.client.models.JWSRecipient](docs/JWSRecipient.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index d22519032a..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,263 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.GetConsortiumJwsResponse -import org.openapitools.client.models.GetNodeJwsResponse - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Retrieves a consortium JWS - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @param body (optional) - * @return GetConsortiumJwsResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getConsortiumJwsV1(body: kotlin.Any? = null) : GetConsortiumJwsResponse { - val localVarResponse = getConsortiumJwsV1WithHttpInfo(body = body) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetConsortiumJwsResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves a consortium JWS - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @param body (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getConsortiumJwsV1WithHttpInfo(body: kotlin.Any?) : ApiResponse { - val localVariableConfig = getConsortiumJwsV1RequestConfig(body = body) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getConsortiumJwsV1 - * - * @param body (optional) - * @return RequestConfig - */ - fun getConsortiumJwsV1RequestConfig(body: kotlin.Any?) : RequestConfig { - val localVariableBody = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Retrieves the JWT of a Cactus Node - * - * @param body (optional) - * @return GetNodeJwsResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getNodeJwsV1(body: kotlin.Any? = null) : GetNodeJwsResponse { - val localVarResponse = getNodeJwsV1WithHttpInfo(body = body) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetNodeJwsResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves the JWT of a Cactus Node - * - * @param body (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getNodeJwsV1WithHttpInfo(body: kotlin.Any?) : ApiResponse { - val localVariableConfig = getNodeJwsV1RequestConfig(body = body) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getNodeJwsV1 - * - * @param body (optional) - * @return RequestConfig - */ - fun getNodeJwsV1RequestConfig(body: kotlin.Any?) : RequestConfig { - val localVariableBody = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get the Prometheus Metrics - * - * @return kotlin.String - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getPrometheusMetricsV1() : kotlin.String { - val localVarResponse = getPrometheusMetricsV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get the Prometheus Metrics - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getPrometheusMetricsV1WithHttpInfo() : ApiResponse { - val localVariableConfig = getPrometheusMetricsV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getPrometheusMetricsV1 - * - * @return RequestConfig - */ - fun getPrometheusMetricsV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetConsortiumJwsResponse.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetConsortiumJwsResponse.kt deleted file mode 100644 index eb880bcea1..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetConsortiumJwsResponse.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.JWSGeneral - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param jws - */ - - -data class GetConsortiumJwsResponse ( - - @Json(name = "jws") - val jws: JWSGeneral - -) - diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetNodeJwsResponse.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetNodeJwsResponse.kt deleted file mode 100644 index c1d327a7d7..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetNodeJwsResponse.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.JWSGeneral - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param jws - */ - - -data class GetNodeJwsResponse ( - - @Json(name = "jws") - val jws: JWSGeneral - -) - diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSGeneral.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSGeneral.kt deleted file mode 100644 index f32650672e..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSGeneral.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.JWSRecipient - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param payload - * @param signatures - */ - - -data class JWSGeneral ( - - @Json(name = "payload") - val payload: kotlin.String, - - @Json(name = "signatures") - val signatures: kotlin.collections.List - -) - diff --git a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSRecipient.kt b/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSRecipient.kt deleted file mode 100644 index 7bf5dd698e..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JWSRecipient.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * A JSON Web Signature. See: https://tools.ietf.org/html/rfc7515 for info about standard. - * - * @param signature - * @param `protected` - * @param header - */ - - -data class JWSRecipient ( - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "protected") - val `protected`: kotlin.String? = null, - - @Json(name = "header") - val header: kotlin.collections.Map? = null - -) - diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-consortium-jws-endpoint-v1.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-consortium-jws-endpoint-v1.ts deleted file mode 100644 index 5414a64c0d..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-consortium-jws-endpoint-v1.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { GetConsortiumJwsResponse } from "../generated/openapi/typescript-axios"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - IAsyncProvider, - Checks, -} from "@hyperledger/cactus-common"; - -import { - registerWebServiceEndpoint, - ConsortiumRepository, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginConsortiumManual } from "../plugin-consortium-manual"; - -export interface IGetConsortiumJwsEndpointOptions { - plugin: PluginConsortiumManual; - keyPairPem: string; - consortiumRepo: ConsortiumRepository; - logLevel?: LogLevelDesc; -} - -export class GetConsortiumEndpointV1 implements IWebServiceEndpoint { - private readonly log: Logger; - private readonly plugin: PluginConsortiumManual; - - constructor(public readonly options: IGetConsortiumJwsEndpointOptions) { - const fnTag = "GetConsortiumJwsEndpoint#constructor()"; - if (!options) { - throw new Error(`${fnTag} options falsy.`); - } - if (!options.keyPairPem) { - throw new Error(`${fnTag} options.keyPairPem falsy.`); - } - if (!options.consortiumRepo) { - throw new Error(`${fnTag} options.consortium falsy.`); - } - Checks.truthy(options.plugin, `${fnTag} options.plugin`); - Checks.truthy( - options.plugin instanceof PluginConsortiumManual, - `${fnTag} options.plugin instanceof PluginConsortiumManual`, - ); - this.plugin = options.plugin; - - const label = "get-consortium-jws-endpoint"; - const level = options.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ label, level }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws" - ]; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetConsortiumJwsEndpointV1#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - - try { - const jws = await this.options.plugin.getConsortiumJws(); - - const body: GetConsortiumJwsResponse = { jws }; - res.status(200); - res.json(body); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-node-jws-endpoint-v1.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-node-jws-endpoint-v1.ts deleted file mode 100644 index 9fd091fa9d..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-node-jws-endpoint-v1.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { GetNodeJwsResponse } from "../generated/openapi/typescript-axios"; - -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - registerWebServiceEndpoint, - ConsortiumRepository, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginConsortiumManual } from "../plugin-consortium-manual"; - -export interface IGetNodeJwsEndpointOptions { - plugin: PluginConsortiumManual; - keyPairPem: string; - consortiumRepo: ConsortiumRepository; - logLevel?: LogLevelDesc; -} - -export class GetNodeJwsEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - private readonly plugin: PluginConsortiumManual; - - constructor(public readonly options: IGetNodeJwsEndpointOptions) { - const fnTag = "GetNodeJwsEndpoint#constructor()"; - if (!options) { - throw new Error(`${fnTag} options falsy.`); - } - if (!options.keyPairPem) { - throw new Error(`${fnTag} options.keyPairPem falsy.`); - } - Checks.truthy(options.consortiumRepo, `${fnTag} options.consortiumRepo`); - Checks.truthy(options.plugin, `${fnTag} options.plugin`); - Checks.truthy( - options.plugin instanceof PluginConsortiumManual, - `${fnTag} options.plugin instanceof PluginConsortiumManual`, - ); - this.plugin = options.plugin; - - const level = options.logLevel || "INFO"; - const label = "get-node-jws-endpoint-v1"; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws" - ]; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetNodeJwsEndpoint#createJws()"; - this.log.debug(`GET ${this.getPath()}`); - try { - const jws = await this.options.plugin.getNodeJws(); - const body: GetNodeJwsResponse = { jws }; - res.status(200); - res.json(body); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-prometheus-exporter-metrics-endpoint-v1.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-prometheus-exporter-metrics-endpoint-v1.ts deleted file mode 100644 index 8f1bd53806..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-prometheus-exporter-metrics-endpoint-v1.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginConsortiumManual } from "../plugin-consortium-manual"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - logLevel?: LogLevelDesc; - plugin: PluginConsortiumManual; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - private readonly log: Logger; - - constructor( - public readonly opts: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = "GetPrometheusExporterMetricsEndpointV1#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.plugin, `${fnTag} options.plugin`); - - this.log = LoggerProvider.getOrCreate({ - label: "get-prometheus-exporter-metrics-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetPrometheusExporterMetrics#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - const resBody = await this.opts.plugin.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 95ec1b160e..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Consortium Web Service - * Manage a Cactus consortium through the APIs. Needs administrative privileges. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface GetConsortiumJwsResponse - */ -export interface GetConsortiumJwsResponse { - /** - * - * @type {JWSGeneral} - * @memberof GetConsortiumJwsResponse - */ - 'jws': JWSGeneral; -} -/** - * - * @export - * @interface GetNodeJwsResponse - */ -export interface GetNodeJwsResponse { - /** - * - * @type {JWSGeneral} - * @memberof GetNodeJwsResponse - */ - 'jws': JWSGeneral; -} -/** - * - * @export - * @interface JWSGeneral - */ -export interface JWSGeneral { - /** - * - * @type {string} - * @memberof JWSGeneral - */ - 'payload': string; - /** - * - * @type {Array} - * @memberof JWSGeneral - */ - 'signatures': Array; -} -/** - * A JSON Web Signature. See: https://tools.ietf.org/html/rfc7515 for info about standard. - * @export - * @interface JWSRecipient - */ -export interface JWSRecipient { - /** - * - * @type {string} - * @memberof JWSRecipient - */ - 'signature': string; - /** - * - * @type {string} - * @memberof JWSRecipient - */ - 'protected'?: string; - /** - * - * @type {{ [key: string]: any; }} - * @memberof JWSRecipient - */ - 'header'?: { [key: string]: any; }; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @summary Retrieves a consortium JWS - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConsortiumJwsV1: async (body?: object, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/consortium/jws`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the JWT of a Cactus Node - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getNodeJwsV1: async (body?: object, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/node/jws`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-consortium-manual/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @summary Retrieves a consortium JWS - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConsortiumJwsV1(body?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConsortiumJwsV1(body, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the JWT of a Cactus Node - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getNodeJwsV1(body?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getNodeJwsV1(body, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @summary Retrieves a consortium JWS - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConsortiumJwsV1(body?: object, options?: any): AxiosPromise { - return localVarFp.getConsortiumJwsV1(body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the JWT of a Cactus Node - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getNodeJwsV1(body?: object, options?: any): AxiosPromise { - return localVarFp.getNodeJwsV1(body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * The JWS asserting the consortium metadata (pub keys and hosts of nodes) - * @summary Retrieves a consortium JWS - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getConsortiumJwsV1(body?: object, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getConsortiumJwsV1(body, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the JWT of a Cactus Node - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getNodeJwsV1(body?: object, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getNodeJwsV1(body, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 613e857fa8..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Consortium Web Service - * Manage a Cactus consortium through the APIs. Needs administrative privileges. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index bab611ca0b..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Consortium Web Service - * Manage a Cactus consortium through the APIs. Needs administrative privileges. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 01995a47cf..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Consortium Web Service - * Manage a Cactus consortium through the APIs. Needs administrative privileges. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 7e96917e25..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Consortium Web Service - * Manage a Cactus consortium through the APIs. Needs administrative privileges. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/index.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/index.web.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/index.web.ts deleted file mode 100755 index bdf54028d2..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/plugin-consortium-manual.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/plugin-consortium-manual.ts deleted file mode 100644 index 403929b1e1..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/plugin-consortium-manual.ts +++ /dev/null @@ -1,260 +0,0 @@ -import { Express } from "express"; -import { importPKCS8, GeneralSign } from "jose"; -import jsonStableStringify from "json-stable-stringify"; -import { v4 as uuidv4 } from "uuid"; - -import OAS from "../json/openapi.json"; - -import { - ConsortiumDatabase, - IPluginWebService, - IWebServiceEndpoint, - ICactusPlugin, - ICactusPluginOptions, - JWSGeneral, - JWSRecipient, - createIsJwsGeneralTypeGuard, -} from "@hyperledger/cactus-core-api"; - -import { PluginRegistry, ConsortiumRepository } from "@hyperledger/cactus-core"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { GetConsortiumEndpointV1 } from "./consortium/get-consortium-jws-endpoint-v1"; -import { GetNodeJwsEndpoint } from "./consortium/get-node-jws-endpoint-v1"; - -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; - -import { - IGetPrometheusExporterMetricsEndpointV1Options, - GetPrometheusExporterMetricsEndpointV1, -} from "./consortium/get-prometheus-exporter-metrics-endpoint-v1"; - -import { - Configuration, - DefaultApi, -} from "./generated/openapi/typescript-axios"; -export interface IWebAppOptions { - port: number; - hostname: string; -} - -export interface IPluginConsortiumManualOptions extends ICactusPluginOptions { - keyPairPem: string; - consortiumDatabase: ConsortiumDatabase; - prometheusExporter?: PrometheusExporter; - pluginRegistry?: PluginRegistry; - logLevel?: LogLevelDesc; - ctorArgs?: Record; -} - -export class PluginConsortiumManual - implements ICactusPlugin, IPluginWebService -{ - public static readonly CLASS_NAME = "PluginConsortiumManual"; - public prometheusExporter: PrometheusExporter; - private readonly log: Logger; - private readonly instanceId: string; - private readonly repo: ConsortiumRepository; - private readonly isJwsGeneral: (x: unknown) => x is JWSGeneral; - private endpoints: IWebServiceEndpoint[] | undefined; - - public get className(): string { - return PluginConsortiumManual.CLASS_NAME; - } - - constructor(public readonly options: IPluginConsortiumManualOptions) { - const fnTag = `PluginConsortiumManual#constructor()`; - if (!options) { - throw new Error(`${fnTag} options falsy.`); - } - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy( - options.consortiumDatabase, - `${fnTag} options.consortiumDatabase`, - ); - - this.log = LoggerProvider.getOrCreate({ - label: "plugin-consortium-manual", - }); - - this.instanceId = this.options.instanceId; - this.repo = new ConsortiumRepository({ db: options.consortiumDatabase }); - this.isJwsGeneral = createIsJwsGeneralTypeGuard(); - - this.prometheusExporter = - options.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - this.prometheusExporter.startMetricsCollection(); - this.prometheusExporter.setNodeCount(this.getNodeCount()); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public async onPluginInit(): Promise { - return; - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async shutdown(): Promise { - return; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } - - public getNodeCount(): number { - Checks.truthy(this.repo, `${this.className}.this.repo`); - return this.repo.allNodes.length; - } - - /** - * Updates the Node count Prometheus metric of the plugin. - * Note: This does not change the underlying consortium database at all, - * only affects **the metrics**. - */ - public updateMetricNodeCount(): void { - const nodeCount = this.getNodeCount(); - this.prometheusExporter.setNodeCount(nodeCount); - } - - public async registerWebServices( - app: Express, - ): Promise { - const webServices = await this.getOrCreateWebServices(); - webServices.forEach((ws) => ws.registerExpress(app)); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - const { log } = this; - const pkgName = this.getPackageName(); - - if (this.endpoints) { - return this.endpoints; - } - log.info(`Creating web services for plugin ${pkgName}...`); - // presence of webAppOptions implies that caller wants the plugin to configure it's own express instance on a custom - // host/port to listen on - - const { keyPairPem } = this.options; - const consortiumRepo = this.repo; - - const endpoints: IWebServiceEndpoint[] = []; - { - const options = { keyPairPem, consortiumRepo, plugin: this }; - const endpoint = new GetConsortiumEndpointV1(options); - endpoints.push(endpoint); - const path = endpoint.getPath(); - this.log.info(`Instantiated GetConsortiumEndpointV1 at ${path}`); - } - { - const options = { keyPairPem, consortiumRepo, plugin: this }; - const endpoint = new GetNodeJwsEndpoint(options); - const path = endpoint.getPath(); - endpoints.push(endpoint); - this.log.info(`Instantiated GetNodeJwsEndpoint at ${path}`); - } - { - const opts: IGetPrometheusExporterMetricsEndpointV1Options = { - plugin: this, - logLevel: this.options.logLevel, - }; - const endpoint = new GetPrometheusExporterMetricsEndpointV1(opts); - const path = endpoint.getPath(); - endpoints.push(endpoint); - this.log.info(`Instantiated GetNodeJwsEndpoint at ${path}`); - } - this.endpoints = endpoints; - - log.info(`Instantiated web svcs for plugin ${pkgName} OK`, { endpoints }); - return endpoints; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-consortium-manual`; - } - - public async getNodeJws(): Promise { - Checks.truthy(this.repo, `${this.className}.this.repo`); - const { keyPairPem } = this.options; - - this.updateMetricNodeCount(); - const keyPair = await importPKCS8(keyPairPem, "ES256K"); - const payloadObject = { consortiumDatabase: this.repo.consortiumDatabase }; - const payloadJson = jsonStableStringify(payloadObject); - const _protected = { - iat: Date.now(), - jti: uuidv4(), - iss: "Cacti", - }; - - const encoder = new TextEncoder(); - const encodedPayload = encoder.encode(payloadJson); - const sign = new GeneralSign(encodedPayload); - sign - .addSignature(keyPair) - .setProtectedHeader({ alg: "ES256K", _protected }); - - const jws = await sign.sign(); - - if (!this.isJwsGeneral(jws)) { - throw new TypeError("Jose GeneralSign.sign() gave non-JWSGeneral type"); - } - return jws; - } - - public async getConsortiumJws(): Promise { - const nodes = this.repo.allNodes; - - const ctorArgs = this.options.ctorArgs || {}; - - const requests = nodes - .map((cnm) => cnm.nodeApiHost) - .map(function (host) { - // overwrite basePath with node api host - ctorArgs.basePath = host; - // return the ApiClient configuration object - return new Configuration(ctorArgs); - }) - .map((configuration) => new DefaultApi(configuration)) - .map((apiClient) => apiClient.getNodeJwsV1()); - - const responses = await Promise.all(requests); - - const signatures: JWSRecipient[] = []; - - responses - .map((apiResponse) => apiResponse.data) - .map((getNodeJwsResponse) => getNodeJwsResponse.jws) - .forEach((aJws: JWSGeneral) => - aJws.signatures.forEach((signature) => signatures.push(signature)), - ); - - const [response] = responses; - const jws = response.data.jws; - jws.signatures = signatures; - return jws; - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/plugin-factory-consortium-manual.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/plugin-factory-consortium-manual.ts deleted file mode 100644 index fdcad04ad0..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/plugin-factory-consortium-manual.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginConsortiumManualOptions, - PluginConsortiumManual, -} from "./plugin-consortium-manual"; - -export class PluginFactoryWebService extends PluginFactory< - PluginConsortiumManual, - IPluginConsortiumManualOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginConsortiumManualOptions, - ): Promise { - return new PluginConsortiumManual(pluginOptions); - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index 55869bf1cf..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NodeCount } from "./response.type"; - -import { - totalTxCount, - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT, -} from "./metrics"; - -export async function collectMetrics(nodeCount: NodeCount): Promise { - totalTxCount - .labels(K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT) - .set(nodeCount.counter); -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index b965dd39f4..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT = - "cactus_consortium_manual_total_node_count"; - -export const totalTxCount = new Gauge({ - registers: [], - name: K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT, - help: "Total cactus node count", - labelNames: ["type"], -}); diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index 6c07c56008..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,43 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { NodeCount } from "./response.type"; -import { - totalTxCount, - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT, -} from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly nodeCount: NodeCount = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public setNodeCount(nodeCount: number): void { - this.nodeCount.counter = nodeCount; - totalTxCount - .labels(K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT) - .set(this.nodeCount.counter); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalTxCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 4f2cf2ac0c..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type NodeCount = { - counter: number; -}; diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/public-api.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/public-api.ts deleted file mode 100755 index f4e2d5f418..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/public-api.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as OpenApiJson from "../json/openapi.json"; -export { OpenApiJson }; - -export { - GetConsortiumEndpointV1, - IGetConsortiumJwsEndpointOptions, -} from "./consortium/get-consortium-jws-endpoint-v1"; - -export { - GetNodeJwsEndpoint, - IGetNodeJwsEndpointOptions, -} from "./consortium/get-node-jws-endpoint-v1"; - -export { - PluginConsortiumManual, - IPluginConsortiumManualOptions, - IWebAppOptions, -} from "./plugin-consortium-manual"; - -export * from "./generated/openapi/typescript-axios/index"; - -export { PluginFactoryWebService } from "./plugin-factory-consortium-manual"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryWebService } from "./plugin-factory-consortium-manual"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryWebService(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-consortium-manual/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-consortium-manual/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts b/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts deleted file mode 100644 index 070daf304a..0000000000 --- a/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts +++ /dev/null @@ -1,159 +0,0 @@ -import { generateKeyPair, exportPKCS8, generalVerify } from "jose"; -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; - -import { IListenOptions, Servers } from "@hyperledger/cactus-common"; - -import { - ConsortiumDatabase, - CactusNode, - Configuration, -} from "@hyperledger/cactus-core-api"; - -import { - PluginConsortiumManual, - IPluginConsortiumManualOptions, -} from "../../../../main/typescript/public-api"; - -import { GetNodeJwsEndpoint } from "../../../../main/typescript/public-api"; - -import { v4 as uuidv4 } from "uuid"; - -import { DefaultApi as ConsortiumManualApi } from "../../../../main/typescript/public-api"; - -import { K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT } from "../../../../main/typescript/prometheus-exporter/metrics"; - -const testCase = "Can provide JWS"; -describe(testCase, () => { - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - afterAll(async () => await Servers.shutdown(server)); - - test("Can provide JWS", async () => { - expect(GetNodeJwsEndpoint); - - const keyPair = await generateKeyPair("ES256K"); - const keyPairPem = await exportPKCS8(keyPair.privateKey); - - const db: ConsortiumDatabase = { - cactusNode: [], - consortium: [], - consortiumMember: [], - ledger: [], - pluginInstance: [], - }; - - // Creating the PluginConsortiumManual object to observe the prometheus metrics. - const options: IPluginConsortiumManualOptions = { - instanceId: uuidv4(), - keyPairPem: keyPairPem, - consortiumDatabase: db, - }; - - const pluginConsortiumManual = new PluginConsortiumManual(options); - - // Setting up of the api-server for hosting the endpoints defined in the openapi specs - // of the plugin - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const config = new Configuration({ basePath: apiHost }); - const apiClient = new ConsortiumManualApi(config); - - await pluginConsortiumManual.getOrCreateWebServices(); - await pluginConsortiumManual.registerWebServices(expressApp); - - const jws = await pluginConsortiumManual.getNodeJws(); - expect(jws).toBeTruthy(); - expect(typeof jws).toBe("object"); - await expect(generalVerify(jws, keyPair.publicKey)).not.toReject; - await expect(generalVerify(jws, keyPair.privateKey)).not.toReject; - - const { payload, protectedHeader } = await generalVerify( - jws, - keyPair.publicKey, - ); - const decoder = new TextDecoder(); - const payloadDecoded = JSON.parse(decoder.decode(payload)) as { - consortiumDatabase: ConsortiumDatabase; - }; - expect(payloadDecoded).toBeTruthy(); - if (typeof payloadDecoded === "string") { - fail(`JWS Verification result: ${payload}`); - } else { - expect(protectedHeader).toBeTruthy(); - expect(payloadDecoded.consortiumDatabase).toBeTruthy(); - } - { - // The first check shall observe the cactus_consortium_manual_total_node_count metrics - // to be valued at zero, as the ConsortiumRepo object is initialized with an empty array of - // Cactus nodes. - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " Total cactus node count\n" + - "# TYPE " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " gauge\n" + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '{type="' + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '"} 0'; - expect(res); - expect(res.data); - expect(res.status).toEqual(200); - expect(res.data.includes(promMetricsOutput)).toBe(true); - } - - // Creating a dummy cactus node for adding it to the cactus node array - // and thus observing the change in prometheus exporter metrics (should increment by 1) - const dummyCactusNode: CactusNode = { - consortiumId: "", - id: "", - ledgerIds: [], - memberId: "", - nodeApiHost: "", - pluginInstanceIds: [], - publicKeyPem: "", - }; - - db.cactusNode.push(dummyCactusNode); - // The invocation of the node JWS endpoint internally triggers the update - // of the metrics so after it has executed we can expect the metrics to - // show the new values for our assertions below - await apiClient.getNodeJwsV1(); - - { - // The second check shall observe the cactus_consortium_manual_total_node_count metrics - // to be valued at One, as the Cactus node array is pushed with a dummy cactus node. - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " Total cactus node count\n" + - "# TYPE " + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - " gauge\n" + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '{type="' + - K_CACTUS_CONSORTIUM_MANUAL_TOTAL_NODE_COUNT + - '"} 1'; - expect(res); - expect(res.data); - expect(res.status).toEqual(200); - expect(res.data.includes(promMetricsOutput)).toBeTruthy(); - } - }); -}); diff --git a/packages/cactus-plugin-consortium-manual/tsconfig.json b/packages/cactus-plugin-consortium-manual/tsconfig.json deleted file mode 100644 index 2e71f55356..0000000000 --- a/packages/cactus-plugin-consortium-manual/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-consortium-manual.tsbuildinfo" - }, - "include": [ - "./src", - "**/openapi.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/CHANGELOG.md b/packages/cactus-plugin-htlc-eth-besu-erc20/CHANGELOG.md deleted file mode 100644 index d887b98f3f..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/CHANGELOG.md +++ /dev/null @@ -1,122 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -### Features - -* **htlc-coordinator:** new htlc coordinator ([28c97d3](https://github.com/hyperledger/cactus/commit/28c97d33e97fa180f1b2b65d505f5ae36a9ddc25)), closes [#953](https://github.com/hyperledger/cactus/issues/953) - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* openapi tests for besu, htlc-eth-besu and htlc-eth-besu-erc20 ([b9170e9](https://github.com/hyperledger/cactus/commit/b9170e929492f3305a420c75c7d12d06b288e0ab)), closes [#1291](https://github.com/hyperledger/cactus/issues/1291) [#847](https://github.com/hyperledger/cactus/issues/847) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu-erc20 - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Features - -* **atomic-swap-erc20:** implemented plugin and test ([0c9423a](https://github.com/hyperledger/cactus/commit/0c9423a2a2cd4675c3c6dec4288190f148cad938)) -* **core-api:** plugin async initializer method ([9678c2e](https://github.com/hyperledger/cactus/commit/9678c2e9288a73589e84f9fd254c26aed6a93297)) diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/README.md b/packages/cactus-plugin-htlc-eth-besu-erc20/README.md deleted file mode 100644 index dce2dc1825..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# `@hyperledger/cactus-plugin-htlc-eth-besu-erc20` - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -## Summary - - - [Getting Started](#getting-started) - - [Runing the tests](#running-the-tests) - - [Deployment](#deployment) - - [Built With](#built-with) - - [Contributing](#contributing) - - [License](#license) - -## Getting Started - -### Installing - -In a Cactus root directory, need execute: -``` - npm run configure -``` -This command compile and build the project. - -## Running the tests - -For test all the plugin we have @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 -For execute the test plugin, can execute in root directory: -``` - npm run test:plugin-htlc-besu-erc20 -``` - -## Contact -* mailing list: [cactus@lists.hyperledger.org](mailto:cactus@lists.hyperledger.org) -* rocketchat channel: [https://chat.hyperledger.org/channel/cactus](https://chat.hyperledger.org/channel/cactus). - -## Contributing -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [contributing](../../CONTRIBUTING.md) guidelines to get started. - -## License -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/openapitools.json b/packages/cactus-plugin-htlc-eth-besu-erc20/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/package.json b/packages/cactus-plugin-htlc-eth-besu-erc20/package.json deleted file mode 100644 index 95a76e7bea..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-htlc-eth-besu-erc20", - "version": "2.0.0", - "description": "Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - }, - { - "name": "Jordi Giron", - "email": "jordi.giron.amezcua@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-htlc-eth-besu-erc20.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --reserved-words-mappings type=type --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --reserved-words-mappings type=type --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "axios": "1.7.7", - "express": "4.21.0", - "joi": "17.13.3", - "openapi-types": "12.1.3", - "typescript-optional": "2.0.1" - }, - "devDependencies": { - "@types/express": "5.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-htlc-eth-besu-erc20.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-htlc-eth-besu-erc20.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 183474f28f..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,25 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_get_single_status_request.go -model_get_status_request.go -model_initialize_request.go -model_invoke_contract_v1_response.go -model_new_contract_request.go -model_new_contract_request_gas.go -model_refund_request.go -model_run_transaction_response.go -model_web3_signing_credential.go -model_web3_signing_credential_cactus_keychain_ref.go -model_web3_signing_credential_none.go -model_web3_signing_credential_private_key_hex.go -model_web3_signing_credential_type.go -model_web3_transaction_receipt.go -model_withdraw_request.go -response.go -utils.go diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 95714dbf93..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# Go API client for cactus-plugin-htlc-eth-besu-erc20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-htlc-eth-besu-erc20 "github.com/hyperledger/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-htlc-eth-besu-erc20.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-htlc-eth-besu-erc20.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-htlc-eth-besu-erc20.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-htlc-eth-besu-erc20.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**GetSingleStatusV1**](docs/DefaultApi.md#getsinglestatusv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status | -*DefaultApi* | [**GetStatusV1**](docs/DefaultApi.md#getstatusv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status | -*DefaultApi* | [**InitializeV1**](docs/DefaultApi.md#initializev1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize | Initialize contract -*DefaultApi* | [**NewContractV1**](docs/DefaultApi.md#newcontractv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract | Create a new hashtimelock contract -*DefaultApi* | [**RefundV1**](docs/DefaultApi.md#refundv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund | Refund a hashtimelock contract -*DefaultApi* | [**WithdrawV1**](docs/DefaultApi.md#withdrawv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw | Withdraw a hashtimelock contract - - -## Documentation For Models - - - [GetSingleStatusRequest](docs/GetSingleStatusRequest.md) - - [GetStatusRequest](docs/GetStatusRequest.md) - - [InitializeRequest](docs/InitializeRequest.md) - - [InvokeContractV1Response](docs/InvokeContractV1Response.md) - - [NewContractRequest](docs/NewContractRequest.md) - - [NewContractRequestGas](docs/NewContractRequestGas.md) - - [RefundRequest](docs/RefundRequest.md) - - [RunTransactionResponse](docs/RunTransactionResponse.md) - - [Web3SigningCredential](docs/Web3SigningCredential.md) - - [Web3SigningCredentialCactusKeychainRef](docs/Web3SigningCredentialCactusKeychainRef.md) - - [Web3SigningCredentialNone](docs/Web3SigningCredentialNone.md) - - [Web3SigningCredentialPrivateKeyHex](docs/Web3SigningCredentialPrivateKeyHex.md) - - [Web3SigningCredentialType](docs/Web3SigningCredentialType.md) - - [Web3TransactionReceipt](docs/Web3TransactionReceipt.md) - - [WithdrawRequest](docs/WithdrawRequest.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 80221579be..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,575 +0,0 @@ -openapi: 3.0.3 -info: - description: Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize: - post: - operationId: initializeV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InitializeRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionResponse' - description: OK - summary: Initialize contract - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw: - post: - operationId: withdrawV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WithdrawRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - summary: Withdraw a hashtimelock contract - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status: - post: - operationId: getStatusV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetStatusRequest' - responses: - "200": - content: - application/json: - schema: - items: - format: uint256 - type: integer - type: array - description: Array of status - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status: - post: - operationId: getSingleStatusV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetSingleStatusRequest' - responses: - "200": - content: - application/json: - schema: - format: uint256 - type: integer - description: Status - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund: - post: - operationId: refundV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RefundRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - summary: Refund a hashtimelock contract - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract: - post: - operationId: newContractV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NewContractRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - summary: Create a new hashtimelock contract - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract -components: - responses: - GetStatusResponse: - content: - application/json: - schema: - items: - format: uint256 - type: integer - type: array - description: Array of status - GetSingleStatusResponse: - content: - application/json: - schema: - format: uint256 - type: integer - description: Status - schemas: - NewContractRequest: - additionalProperties: false - example: - receiver: receiver - outputAmount: 6.027456183070403 - outputNetwork: outputNetwork - connectorId: connectorId - hashLock: hashLock - contractAddress: contractAddress - inputAmount: 0.8008281904610115 - tokenAddress: tokenAddress - outputAddress: outputAddress - keychainId: keychainId - gas: null - web3SigningCredential: - type: null - expiration: 1.4658129805029452 - properties: - contractAddress: - description: Contract address - nullable: false - type: string - inputAmount: - description: Input amount to lock - nullable: false - type: number - outputAmount: - description: Output amount to lock - nullable: false - type: number - expiration: - description: Timestamp to expire the contract - nullable: false - type: number - hashLock: - description: Hashlock needed to refund the amount - nullable: false - type: string - tokenAddress: - description: The token address - nullable: false - type: string - receiver: - description: The receiver address - nullable: false - type: string - outputNetwork: - description: The output network id - nullable: false - type: string - outputAddress: - description: The output address to receive the tokens - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - connectorId: - description: connectorId for the connector besu plugin - nullable: false - type: string - keychainId: - description: keychainId for the keychian plugin - nullable: false - type: string - gas: - $ref: '#/components/schemas/NewContractRequest_gas' - required: - - connectorId - - contractAddress - - expiration - - hashLock - - inputAmount - - keychainId - - outputAddress - - outputAmount - - outputNetwork - - receiver - - tokenAddress - - web3SigningCredential - type: object - RefundRequest: - additionalProperties: false - example: - keychainId: keychainId - connectorId: connectorId - gas: null - web3SigningCredential: - type: null - id: id - properties: - id: - description: Contract htlc id for refund - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - connectorId: - description: connectorId for the connector besu plugin - nullable: false - type: string - keychainId: - description: keychainId for the keychain plugin - nullable: false - type: string - gas: - $ref: '#/components/schemas/NewContractRequest_gas' - required: - - connectorId - - id - - keychainId - - web3SigningCredential - type: object - WithdrawRequest: - additionalProperties: false - example: - keychainId: keychainId - connectorId: connectorId - gas: null - web3SigningCredential: - type: null - id: id - secret: secret - properties: - id: - description: Contract locked id - nullable: false - type: string - secret: - description: Secret need to unlock the contract - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - connectorId: - description: connectorId for the connector besu plugin - nullable: false - type: string - keychainId: - description: keychainId for the keychain plugin - nullable: false - type: string - gas: - $ref: '#/components/schemas/NewContractRequest_gas' - required: - - connectorId - - id - - keychainId - - secret - - web3SigningCredential - type: object - GetStatusRequest: - additionalProperties: false - description: Defines the parameters for retrieving the status of the HTLC swap. - example: - keychainId: keychainId - connectorId: connectorId - ids: - - ids - - ids - web3SigningCredential: - type: null - properties: - ids: - items: - type: string - type: array - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - connectorId: - type: string - keychainId: - type: string - required: - - connectorId - - ids - - keychainId - - web3SigningCredential - type: object - GetSingleStatusRequest: - additionalProperties: false - description: Defines the parameters for retrieving the single status of the - HTLC swap. - example: - keychainId: keychainId - connectorId: connectorId - web3SigningCredential: - type: null - id: id - properties: - id: - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - connectorId: - type: string - keychainId: - type: string - required: - - connectorId - - id - - keychainId - - web3SigningCredential - type: object - InitializeRequest: - additionalProperties: false - example: - keychainId: keychainId - connectorId: connectorId - constructorArgs: - - "" - - "" - gas: 0.8008281904610115 - web3SigningCredential: - type: null - properties: - connectorId: - description: connectorId for the connector besu plugin - nullable: false - type: string - keychainId: - description: keychainId for the keychain plugin - nullable: false - type: string - constructorArgs: - default: [] - items: {} - type: array - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - gas: - type: number - required: - - connectorId - - constructorArgs - - keychainId - - web3SigningCredential - type: object - Web3SigningCredentialType: - enum: - - CACTUS_KEYCHAIN_REF - - GETH_KEYCHAIN_PASSWORD - - PRIVATE_KEY_HEX - - NONE - type: string - Web3SigningCredentialCactusKeychainRef: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 64 - minLength: 64 - nullable: false - type: string - keychainEntryKey: - description: The key to use when looking up the the keychain entry holding - the secret pointed to by the keychainEntryKey parameter. - maxLength: 1024 - minLength: 0 - type: string - keychainId: - description: The keychain ID to use when looking up the the keychain plugin - instance that will be used to retrieve the secret pointed to by the keychainEntryKey - parameter. - maxLength: 1024 - minLength: 0 - type: string - required: - - ethAccount - - keychainEntryKey - - keychainId - - type - type: object - Web3SigningCredentialPrivateKeyHex: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 64 - minLength: 64 - nullable: false - type: string - secret: - description: The HEX encoded private key of an eth account. - maxLength: 65535 - minLength: 0 - type: string - required: - - ethAccount - - secret - - type - type: object - Web3SigningCredentialNone: - description: Using this denotes that there is no signing required because the - transaction is pre-signed. - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredential: - discriminator: - propertyName: type - example: - type: null - oneOf: - - $ref: '#/components/schemas/Web3SigningCredentialCactusKeychainRef' - - $ref: '#/components/schemas/Web3SigningCredentialPrivateKeyHex' - - $ref: '#/components/schemas/Web3SigningCredentialNone' - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3TransactionReceipt: - additionalProperties: true - example: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - properties: - status: - nullable: false - type: boolean - transactionHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - transactionIndex: - nullable: false - type: number - blockHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - blockNumber: - nullable: false - type: number - gasUsed: - nullable: false - type: number - contractAddress: - nullable: true - type: string - from: - nullable: false - type: string - to: - nullable: false - type: string - required: - - blockHash - - blockNumber - - from - - gasUsed - - status - - to - - transactionHash - - transactionIndex - type: object - RunTransactionResponse: - example: - transactionReceipt: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - required: - - transactionReceipt - type: object - InvokeContractV1Response: - example: - transactionReceipt: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - callOutput: "" - success: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - callOutput: {} - success: - nullable: false - type: boolean - required: - - success - type: object - NewContractRequest_gas: - oneOf: - - type: string - - type: number diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 6f48ab3fbf..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,653 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiGetSingleStatusV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getSingleStatusRequest *GetSingleStatusRequest -} - -func (r ApiGetSingleStatusV1Request) GetSingleStatusRequest(getSingleStatusRequest GetSingleStatusRequest) ApiGetSingleStatusV1Request { - r.getSingleStatusRequest = &getSingleStatusRequest - return r -} - -func (r ApiGetSingleStatusV1Request) Execute() (int32, *http.Response, error) { - return r.ApiService.GetSingleStatusV1Execute(r) -} - -/* -GetSingleStatusV1 Method for GetSingleStatusV1 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetSingleStatusV1Request -*/ -func (a *DefaultApiService) GetSingleStatusV1(ctx context.Context) ApiGetSingleStatusV1Request { - return ApiGetSingleStatusV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return int32 -func (a *DefaultApiService) GetSingleStatusV1Execute(r ApiGetSingleStatusV1Request) (int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetSingleStatusV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getSingleStatusRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetStatusV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getStatusRequest *GetStatusRequest -} - -func (r ApiGetStatusV1Request) GetStatusRequest(getStatusRequest GetStatusRequest) ApiGetStatusV1Request { - r.getStatusRequest = &getStatusRequest - return r -} - -func (r ApiGetStatusV1Request) Execute() ([]int32, *http.Response, error) { - return r.ApiService.GetStatusV1Execute(r) -} - -/* -GetStatusV1 Method for GetStatusV1 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetStatusV1Request -*/ -func (a *DefaultApiService) GetStatusV1(ctx context.Context) ApiGetStatusV1Request { - return ApiGetStatusV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []int32 -func (a *DefaultApiService) GetStatusV1Execute(r ApiGetStatusV1Request) ([]int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetStatusV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getStatusRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInitializeV1Request struct { - ctx context.Context - ApiService *DefaultApiService - initializeRequest *InitializeRequest -} - -func (r ApiInitializeV1Request) InitializeRequest(initializeRequest InitializeRequest) ApiInitializeV1Request { - r.initializeRequest = &initializeRequest - return r -} - -func (r ApiInitializeV1Request) Execute() (*RunTransactionResponse, *http.Response, error) { - return r.ApiService.InitializeV1Execute(r) -} - -/* -InitializeV1 Initialize contract - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInitializeV1Request -*/ -func (a *DefaultApiService) InitializeV1(ctx context.Context) ApiInitializeV1Request { - return ApiInitializeV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RunTransactionResponse -func (a *DefaultApiService) InitializeV1Execute(r ApiInitializeV1Request) (*RunTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InitializeV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.initializeRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiNewContractV1Request struct { - ctx context.Context - ApiService *DefaultApiService - newContractRequest *NewContractRequest -} - -func (r ApiNewContractV1Request) NewContractRequest(newContractRequest NewContractRequest) ApiNewContractV1Request { - r.newContractRequest = &newContractRequest - return r -} - -func (r ApiNewContractV1Request) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.NewContractV1Execute(r) -} - -/* -NewContractV1 Create a new hashtimelock contract - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiNewContractV1Request -*/ -func (a *DefaultApiService) NewContractV1(ctx context.Context) ApiNewContractV1Request { - return ApiNewContractV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) NewContractV1Execute(r ApiNewContractV1Request) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.NewContractV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.newContractRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRefundV1Request struct { - ctx context.Context - ApiService *DefaultApiService - refundRequest *RefundRequest -} - -func (r ApiRefundV1Request) RefundRequest(refundRequest RefundRequest) ApiRefundV1Request { - r.refundRequest = &refundRequest - return r -} - -func (r ApiRefundV1Request) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.RefundV1Execute(r) -} - -/* -RefundV1 Refund a hashtimelock contract - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRefundV1Request -*/ -func (a *DefaultApiService) RefundV1(ctx context.Context) ApiRefundV1Request { - return ApiRefundV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) RefundV1Execute(r ApiRefundV1Request) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RefundV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.refundRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiWithdrawV1Request struct { - ctx context.Context - ApiService *DefaultApiService - withdrawRequest *WithdrawRequest -} - -func (r ApiWithdrawV1Request) WithdrawRequest(withdrawRequest WithdrawRequest) ApiWithdrawV1Request { - r.withdrawRequest = &withdrawRequest - return r -} - -func (r ApiWithdrawV1Request) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.WithdrawV1Execute(r) -} - -/* -WithdrawV1 Withdraw a hashtimelock contract - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiWithdrawV1Request -*/ -func (a *DefaultApiService) WithdrawV1(ctx context.Context) ApiWithdrawV1Request { - return ApiWithdrawV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) WithdrawV1Execute(r ApiWithdrawV1Request) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.WithdrawV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.withdrawRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 3dbb799594..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 17e033cc91..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 08190890c0..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_get_single_status_request.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_get_single_status_request.go deleted file mode 100644 index 9163d539a2..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_get_single_status_request.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the GetSingleStatusRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetSingleStatusRequest{} - -// GetSingleStatusRequest Defines the parameters for retrieving the single status of the HTLC swap. -type GetSingleStatusRequest struct { - Id string `json:"id"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - ConnectorId string `json:"connectorId"` - KeychainId string `json:"keychainId"` -} - -// NewGetSingleStatusRequest instantiates a new GetSingleStatusRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetSingleStatusRequest(id string, web3SigningCredential Web3SigningCredential, connectorId string, keychainId string) *GetSingleStatusRequest { - this := GetSingleStatusRequest{} - this.Id = id - this.Web3SigningCredential = web3SigningCredential - this.ConnectorId = connectorId - this.KeychainId = keychainId - return &this -} - -// NewGetSingleStatusRequestWithDefaults instantiates a new GetSingleStatusRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetSingleStatusRequestWithDefaults() *GetSingleStatusRequest { - this := GetSingleStatusRequest{} - return &this -} - -// GetId returns the Id field value -func (o *GetSingleStatusRequest) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *GetSingleStatusRequest) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *GetSingleStatusRequest) SetId(v string) { - o.Id = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *GetSingleStatusRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *GetSingleStatusRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *GetSingleStatusRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *GetSingleStatusRequest) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *GetSingleStatusRequest) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *GetSingleStatusRequest) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *GetSingleStatusRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *GetSingleStatusRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *GetSingleStatusRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o GetSingleStatusRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetSingleStatusRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableGetSingleStatusRequest struct { - value *GetSingleStatusRequest - isSet bool -} - -func (v NullableGetSingleStatusRequest) Get() *GetSingleStatusRequest { - return v.value -} - -func (v *NullableGetSingleStatusRequest) Set(val *GetSingleStatusRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGetSingleStatusRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGetSingleStatusRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetSingleStatusRequest(val *GetSingleStatusRequest) *NullableGetSingleStatusRequest { - return &NullableGetSingleStatusRequest{value: val, isSet: true} -} - -func (v NullableGetSingleStatusRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetSingleStatusRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_get_status_request.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_get_status_request.go deleted file mode 100644 index e56631613d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_get_status_request.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the GetStatusRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetStatusRequest{} - -// GetStatusRequest Defines the parameters for retrieving the status of the HTLC swap. -type GetStatusRequest struct { - Ids []string `json:"ids"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - ConnectorId string `json:"connectorId"` - KeychainId string `json:"keychainId"` -} - -// NewGetStatusRequest instantiates a new GetStatusRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetStatusRequest(ids []string, web3SigningCredential Web3SigningCredential, connectorId string, keychainId string) *GetStatusRequest { - this := GetStatusRequest{} - this.Ids = ids - this.Web3SigningCredential = web3SigningCredential - this.ConnectorId = connectorId - this.KeychainId = keychainId - return &this -} - -// NewGetStatusRequestWithDefaults instantiates a new GetStatusRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetStatusRequestWithDefaults() *GetStatusRequest { - this := GetStatusRequest{} - return &this -} - -// GetIds returns the Ids field value -func (o *GetStatusRequest) GetIds() []string { - if o == nil { - var ret []string - return ret - } - - return o.Ids -} - -// GetIdsOk returns a tuple with the Ids field value -// and a boolean to check if the value has been set. -func (o *GetStatusRequest) GetIdsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Ids, true -} - -// SetIds sets field value -func (o *GetStatusRequest) SetIds(v []string) { - o.Ids = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *GetStatusRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *GetStatusRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *GetStatusRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *GetStatusRequest) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *GetStatusRequest) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *GetStatusRequest) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *GetStatusRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *GetStatusRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *GetStatusRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o GetStatusRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetStatusRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["ids"] = o.Ids - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableGetStatusRequest struct { - value *GetStatusRequest - isSet bool -} - -func (v NullableGetStatusRequest) Get() *GetStatusRequest { - return v.value -} - -func (v *NullableGetStatusRequest) Set(val *GetStatusRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGetStatusRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGetStatusRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetStatusRequest(val *GetStatusRequest) *NullableGetStatusRequest { - return &NullableGetStatusRequest{value: val, isSet: true} -} - -func (v NullableGetStatusRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetStatusRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_initialize_request.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_initialize_request.go deleted file mode 100644 index ebfe9466ab..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_initialize_request.go +++ /dev/null @@ -1,236 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the InitializeRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InitializeRequest{} - -// InitializeRequest struct for InitializeRequest -type InitializeRequest struct { - // connectorId for the connector besu plugin - ConnectorId string `json:"connectorId"` - // keychainId for the keychain plugin - KeychainId string `json:"keychainId"` - ConstructorArgs []interface{} `json:"constructorArgs"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - Gas *float32 `json:"gas,omitempty"` -} - -// NewInitializeRequest instantiates a new InitializeRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInitializeRequest(connectorId string, keychainId string, constructorArgs []interface{}, web3SigningCredential Web3SigningCredential) *InitializeRequest { - this := InitializeRequest{} - this.ConnectorId = connectorId - this.KeychainId = keychainId - this.ConstructorArgs = constructorArgs - this.Web3SigningCredential = web3SigningCredential - return &this -} - -// NewInitializeRequestWithDefaults instantiates a new InitializeRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInitializeRequestWithDefaults() *InitializeRequest { - this := InitializeRequest{} - return &this -} - -// GetConnectorId returns the ConnectorId field value -func (o *InitializeRequest) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *InitializeRequest) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *InitializeRequest) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *InitializeRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *InitializeRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *InitializeRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetConstructorArgs returns the ConstructorArgs field value -func (o *InitializeRequest) GetConstructorArgs() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value -// and a boolean to check if the value has been set. -func (o *InitializeRequest) GetConstructorArgsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.ConstructorArgs, true -} - -// SetConstructorArgs sets field value -func (o *InitializeRequest) SetConstructorArgs(v []interface{}) { - o.ConstructorArgs = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *InitializeRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *InitializeRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *InitializeRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *InitializeRequest) GetGas() float32 { - if o == nil || IsNil(o.Gas) { - var ret float32 - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InitializeRequest) GetGasOk() (*float32, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *InitializeRequest) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given float32 and assigns it to the Gas field. -func (o *InitializeRequest) SetGas(v float32) { - o.Gas = &v -} - -func (o InitializeRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InitializeRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - toSerialize["constructorArgs"] = o.ConstructorArgs - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableInitializeRequest struct { - value *InitializeRequest - isSet bool -} - -func (v NullableInitializeRequest) Get() *InitializeRequest { - return v.value -} - -func (v *NullableInitializeRequest) Set(val *InitializeRequest) { - v.value = val - v.isSet = true -} - -func (v NullableInitializeRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableInitializeRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInitializeRequest(val *InitializeRequest) *NullableInitializeRequest { - return &NullableInitializeRequest{value: val, isSet: true} -} - -func (v NullableInitializeRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInitializeRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go deleted file mode 100644 index 618cc769b2..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the InvokeContractV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractV1Response{} - -// InvokeContractV1Response struct for InvokeContractV1Response -type InvokeContractV1Response struct { - TransactionReceipt *Web3TransactionReceipt `json:"transactionReceipt,omitempty"` - CallOutput interface{} `json:"callOutput,omitempty"` - Success bool `json:"success"` -} - -// NewInvokeContractV1Response instantiates a new InvokeContractV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractV1Response(success bool) *InvokeContractV1Response { - this := InvokeContractV1Response{} - this.Success = success - return &this -} - -// NewInvokeContractV1ResponseWithDefaults instantiates a new InvokeContractV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractV1ResponseWithDefaults() *InvokeContractV1Response { - this := InvokeContractV1Response{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value if set, zero value otherwise. -func (o *InvokeContractV1Response) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil || IsNil(o.TransactionReceipt) { - var ret Web3TransactionReceipt - return ret - } - return *o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil || IsNil(o.TransactionReceipt) { - return nil, false - } - return o.TransactionReceipt, true -} - -// HasTransactionReceipt returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasTransactionReceipt() bool { - if o != nil && !IsNil(o.TransactionReceipt) { - return true - } - - return false -} - -// SetTransactionReceipt gets a reference to the given Web3TransactionReceipt and assigns it to the TransactionReceipt field. -func (o *InvokeContractV1Response) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = &v -} - -// GetCallOutput returns the CallOutput field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvokeContractV1Response) GetCallOutput() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CallOutput -} - -// GetCallOutputOk returns a tuple with the CallOutput field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvokeContractV1Response) GetCallOutputOk() (*interface{}, bool) { - if o == nil || IsNil(o.CallOutput) { - return nil, false - } - return &o.CallOutput, true -} - -// HasCallOutput returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasCallOutput() bool { - if o != nil && IsNil(o.CallOutput) { - return true - } - - return false -} - -// SetCallOutput gets a reference to the given interface{} and assigns it to the CallOutput field. -func (o *InvokeContractV1Response) SetCallOutput(v interface{}) { - o.CallOutput = v -} - -// GetSuccess returns the Success field value -func (o *InvokeContractV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *InvokeContractV1Response) SetSuccess(v bool) { - o.Success = v -} - -func (o InvokeContractV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.TransactionReceipt) { - toSerialize["transactionReceipt"] = o.TransactionReceipt - } - if o.CallOutput != nil { - toSerialize["callOutput"] = o.CallOutput - } - toSerialize["success"] = o.Success - return toSerialize, nil -} - -type NullableInvokeContractV1Response struct { - value *InvokeContractV1Response - isSet bool -} - -func (v NullableInvokeContractV1Response) Get() *InvokeContractV1Response { - return v.value -} - -func (v *NullableInvokeContractV1Response) Set(val *InvokeContractV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1Response(val *InvokeContractV1Response) *NullableInvokeContractV1Response { - return &NullableInvokeContractV1Response{value: val, isSet: true} -} - -func (v NullableInvokeContractV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_new_contract_request.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_new_contract_request.go deleted file mode 100644 index 04bbb14712..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_new_contract_request.go +++ /dev/null @@ -1,461 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the NewContractRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NewContractRequest{} - -// NewContractRequest struct for NewContractRequest -type NewContractRequest struct { - // Contract address - ContractAddress string `json:"contractAddress"` - // Input amount to lock - InputAmount float32 `json:"inputAmount"` - // Output amount to lock - OutputAmount float32 `json:"outputAmount"` - // Timestamp to expire the contract - Expiration float32 `json:"expiration"` - // Hashlock needed to refund the amount - HashLock string `json:"hashLock"` - // The token address - TokenAddress string `json:"tokenAddress"` - // The receiver address - Receiver string `json:"receiver"` - // The output network id - OutputNetwork string `json:"outputNetwork"` - // The output address to receive the tokens - OutputAddress string `json:"outputAddress"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // connectorId for the connector besu plugin - ConnectorId string `json:"connectorId"` - // keychainId for the keychian plugin - KeychainId string `json:"keychainId"` - Gas *NewContractRequestGas `json:"gas,omitempty"` -} - -// NewNewContractRequest instantiates a new NewContractRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewNewContractRequest(contractAddress string, inputAmount float32, outputAmount float32, expiration float32, hashLock string, tokenAddress string, receiver string, outputNetwork string, outputAddress string, web3SigningCredential Web3SigningCredential, connectorId string, keychainId string) *NewContractRequest { - this := NewContractRequest{} - this.ContractAddress = contractAddress - this.InputAmount = inputAmount - this.OutputAmount = outputAmount - this.Expiration = expiration - this.HashLock = hashLock - this.TokenAddress = tokenAddress - this.Receiver = receiver - this.OutputNetwork = outputNetwork - this.OutputAddress = outputAddress - this.Web3SigningCredential = web3SigningCredential - this.ConnectorId = connectorId - this.KeychainId = keychainId - return &this -} - -// NewNewContractRequestWithDefaults instantiates a new NewContractRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewNewContractRequestWithDefaults() *NewContractRequest { - this := NewContractRequest{} - return &this -} - -// GetContractAddress returns the ContractAddress field value -func (o *NewContractRequest) GetContractAddress() string { - if o == nil { - var ret string - return ret - } - - return o.ContractAddress -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractAddress, true -} - -// SetContractAddress sets field value -func (o *NewContractRequest) SetContractAddress(v string) { - o.ContractAddress = v -} - -// GetInputAmount returns the InputAmount field value -func (o *NewContractRequest) GetInputAmount() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.InputAmount -} - -// GetInputAmountOk returns a tuple with the InputAmount field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetInputAmountOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.InputAmount, true -} - -// SetInputAmount sets field value -func (o *NewContractRequest) SetInputAmount(v float32) { - o.InputAmount = v -} - -// GetOutputAmount returns the OutputAmount field value -func (o *NewContractRequest) GetOutputAmount() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.OutputAmount -} - -// GetOutputAmountOk returns a tuple with the OutputAmount field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetOutputAmountOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.OutputAmount, true -} - -// SetOutputAmount sets field value -func (o *NewContractRequest) SetOutputAmount(v float32) { - o.OutputAmount = v -} - -// GetExpiration returns the Expiration field value -func (o *NewContractRequest) GetExpiration() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Expiration -} - -// GetExpirationOk returns a tuple with the Expiration field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetExpirationOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Expiration, true -} - -// SetExpiration sets field value -func (o *NewContractRequest) SetExpiration(v float32) { - o.Expiration = v -} - -// GetHashLock returns the HashLock field value -func (o *NewContractRequest) GetHashLock() string { - if o == nil { - var ret string - return ret - } - - return o.HashLock -} - -// GetHashLockOk returns a tuple with the HashLock field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetHashLockOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashLock, true -} - -// SetHashLock sets field value -func (o *NewContractRequest) SetHashLock(v string) { - o.HashLock = v -} - -// GetTokenAddress returns the TokenAddress field value -func (o *NewContractRequest) GetTokenAddress() string { - if o == nil { - var ret string - return ret - } - - return o.TokenAddress -} - -// GetTokenAddressOk returns a tuple with the TokenAddress field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetTokenAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TokenAddress, true -} - -// SetTokenAddress sets field value -func (o *NewContractRequest) SetTokenAddress(v string) { - o.TokenAddress = v -} - -// GetReceiver returns the Receiver field value -func (o *NewContractRequest) GetReceiver() string { - if o == nil { - var ret string - return ret - } - - return o.Receiver -} - -// GetReceiverOk returns a tuple with the Receiver field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetReceiverOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Receiver, true -} - -// SetReceiver sets field value -func (o *NewContractRequest) SetReceiver(v string) { - o.Receiver = v -} - -// GetOutputNetwork returns the OutputNetwork field value -func (o *NewContractRequest) GetOutputNetwork() string { - if o == nil { - var ret string - return ret - } - - return o.OutputNetwork -} - -// GetOutputNetworkOk returns a tuple with the OutputNetwork field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetOutputNetworkOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OutputNetwork, true -} - -// SetOutputNetwork sets field value -func (o *NewContractRequest) SetOutputNetwork(v string) { - o.OutputNetwork = v -} - -// GetOutputAddress returns the OutputAddress field value -func (o *NewContractRequest) GetOutputAddress() string { - if o == nil { - var ret string - return ret - } - - return o.OutputAddress -} - -// GetOutputAddressOk returns a tuple with the OutputAddress field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetOutputAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OutputAddress, true -} - -// SetOutputAddress sets field value -func (o *NewContractRequest) SetOutputAddress(v string) { - o.OutputAddress = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *NewContractRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *NewContractRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *NewContractRequest) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *NewContractRequest) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *NewContractRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *NewContractRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *NewContractRequest) GetGas() NewContractRequestGas { - if o == nil || IsNil(o.Gas) { - var ret NewContractRequestGas - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NewContractRequest) GetGasOk() (*NewContractRequestGas, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *NewContractRequest) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given NewContractRequestGas and assigns it to the Gas field. -func (o *NewContractRequest) SetGas(v NewContractRequestGas) { - o.Gas = &v -} - -func (o NewContractRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NewContractRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractAddress"] = o.ContractAddress - toSerialize["inputAmount"] = o.InputAmount - toSerialize["outputAmount"] = o.OutputAmount - toSerialize["expiration"] = o.Expiration - toSerialize["hashLock"] = o.HashLock - toSerialize["tokenAddress"] = o.TokenAddress - toSerialize["receiver"] = o.Receiver - toSerialize["outputNetwork"] = o.OutputNetwork - toSerialize["outputAddress"] = o.OutputAddress - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableNewContractRequest struct { - value *NewContractRequest - isSet bool -} - -func (v NullableNewContractRequest) Get() *NewContractRequest { - return v.value -} - -func (v *NullableNewContractRequest) Set(val *NewContractRequest) { - v.value = val - v.isSet = true -} - -func (v NullableNewContractRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableNewContractRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNewContractRequest(val *NewContractRequest) *NullableNewContractRequest { - return &NullableNewContractRequest{value: val, isSet: true} -} - -func (v NullableNewContractRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNewContractRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_new_contract_request_gas.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_new_contract_request_gas.go deleted file mode 100644 index 524a257843..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_new_contract_request_gas.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" - "fmt" -) - -// NewContractRequestGas - struct for NewContractRequestGas -type NewContractRequestGas struct { - Float32 *float32 - String *string -} - -// float32AsNewContractRequestGas is a convenience function that returns float32 wrapped in NewContractRequestGas -func Float32AsNewContractRequestGas(v *float32) NewContractRequestGas { - return NewContractRequestGas{ - Float32: v, - } -} - -// stringAsNewContractRequestGas is a convenience function that returns string wrapped in NewContractRequestGas -func StringAsNewContractRequestGas(v *string) NewContractRequestGas { - return NewContractRequestGas{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *NewContractRequestGas) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Float32 - err = newStrictDecoder(data).Decode(&dst.Float32) - if err == nil { - jsonFloat32, _ := json.Marshal(dst.Float32) - if string(jsonFloat32) == "{}" { // empty struct - dst.Float32 = nil - } else { - match++ - } - } else { - dst.Float32 = nil - } - - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Float32 = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(NewContractRequestGas)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(NewContractRequestGas)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src NewContractRequestGas) MarshalJSON() ([]byte, error) { - if src.Float32 != nil { - return json.Marshal(&src.Float32) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *NewContractRequestGas) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Float32 != nil { - return obj.Float32 - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableNewContractRequestGas struct { - value *NewContractRequestGas - isSet bool -} - -func (v NullableNewContractRequestGas) Get() *NewContractRequestGas { - return v.value -} - -func (v *NullableNewContractRequestGas) Set(val *NewContractRequestGas) { - v.value = val - v.isSet = true -} - -func (v NullableNewContractRequestGas) IsSet() bool { - return v.isSet -} - -func (v *NullableNewContractRequestGas) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNewContractRequestGas(val *NewContractRequestGas) *NullableNewContractRequestGas { - return &NullableNewContractRequestGas{value: val, isSet: true} -} - -func (v NullableNewContractRequestGas) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNewContractRequestGas) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_refund_request.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_refund_request.go deleted file mode 100644 index aa7adb4b17..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_refund_request.go +++ /dev/null @@ -1,237 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the RefundRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RefundRequest{} - -// RefundRequest struct for RefundRequest -type RefundRequest struct { - // Contract htlc id for refund - Id string `json:"id"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // connectorId for the connector besu plugin - ConnectorId string `json:"connectorId"` - // keychainId for the keychain plugin - KeychainId string `json:"keychainId"` - Gas *NewContractRequestGas `json:"gas,omitempty"` -} - -// NewRefundRequest instantiates a new RefundRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRefundRequest(id string, web3SigningCredential Web3SigningCredential, connectorId string, keychainId string) *RefundRequest { - this := RefundRequest{} - this.Id = id - this.Web3SigningCredential = web3SigningCredential - this.ConnectorId = connectorId - this.KeychainId = keychainId - return &this -} - -// NewRefundRequestWithDefaults instantiates a new RefundRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRefundRequestWithDefaults() *RefundRequest { - this := RefundRequest{} - return &this -} - -// GetId returns the Id field value -func (o *RefundRequest) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *RefundRequest) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *RefundRequest) SetId(v string) { - o.Id = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *RefundRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *RefundRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *RefundRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *RefundRequest) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *RefundRequest) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *RefundRequest) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *RefundRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *RefundRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *RefundRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *RefundRequest) GetGas() NewContractRequestGas { - if o == nil || IsNil(o.Gas) { - var ret NewContractRequestGas - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RefundRequest) GetGasOk() (*NewContractRequestGas, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *RefundRequest) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given NewContractRequestGas and assigns it to the Gas field. -func (o *RefundRequest) SetGas(v NewContractRequestGas) { - o.Gas = &v -} - -func (o RefundRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RefundRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableRefundRequest struct { - value *RefundRequest - isSet bool -} - -func (v NullableRefundRequest) Get() *RefundRequest { - return v.value -} - -func (v *NullableRefundRequest) Set(val *RefundRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRefundRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRefundRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRefundRequest(val *RefundRequest) *NullableRefundRequest { - return &NullableRefundRequest{value: val, isSet: true} -} - -func (v NullableRefundRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRefundRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_run_transaction_response.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_run_transaction_response.go deleted file mode 100644 index a348f27b72..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_run_transaction_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the RunTransactionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionResponse{} - -// RunTransactionResponse struct for RunTransactionResponse -type RunTransactionResponse struct { - TransactionReceipt Web3TransactionReceipt `json:"transactionReceipt"` -} - -// NewRunTransactionResponse instantiates a new RunTransactionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionResponse(transactionReceipt Web3TransactionReceipt) *RunTransactionResponse { - this := RunTransactionResponse{} - this.TransactionReceipt = transactionReceipt - return &this -} - -// NewRunTransactionResponseWithDefaults instantiates a new RunTransactionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionResponseWithDefaults() *RunTransactionResponse { - this := RunTransactionResponse{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value -func (o *RunTransactionResponse) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil { - var ret Web3TransactionReceipt - return ret - } - - return o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value -// and a boolean to check if the value has been set. -func (o *RunTransactionResponse) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil { - return nil, false - } - return &o.TransactionReceipt, true -} - -// SetTransactionReceipt sets field value -func (o *RunTransactionResponse) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = v -} - -func (o RunTransactionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["transactionReceipt"] = o.TransactionReceipt - return toSerialize, nil -} - -type NullableRunTransactionResponse struct { - value *RunTransactionResponse - isSet bool -} - -func (v NullableRunTransactionResponse) Get() *RunTransactionResponse { - return v.value -} - -func (v *NullableRunTransactionResponse) Set(val *RunTransactionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionResponse(val *RunTransactionResponse) *NullableRunTransactionResponse { - return &NullableRunTransactionResponse{value: val, isSet: true} -} - -func (v NullableRunTransactionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go deleted file mode 100644 index d6511f99b1..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredential - struct for Web3SigningCredential -type Web3SigningCredential struct { - Web3SigningCredentialCactusKeychainRef *Web3SigningCredentialCactusKeychainRef - Web3SigningCredentialNone *Web3SigningCredentialNone - Web3SigningCredentialPrivateKeyHex *Web3SigningCredentialPrivateKeyHex -} - -// Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialCactusKeychainRef wrapped in Web3SigningCredential -func Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential(v *Web3SigningCredentialCactusKeychainRef) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialCactusKeychainRef: v, - } -} - -// Web3SigningCredentialNoneAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialNone wrapped in Web3SigningCredential -func Web3SigningCredentialNoneAsWeb3SigningCredential(v *Web3SigningCredentialNone) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialNone: v, - } -} - -// Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialPrivateKeyHex wrapped in Web3SigningCredential -func Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential(v *Web3SigningCredentialPrivateKeyHex) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialPrivateKeyHex: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *Web3SigningCredential) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Web3SigningCredentialCactusKeychainRef - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialCactusKeychainRef) - if err == nil { - jsonWeb3SigningCredentialCactusKeychainRef, _ := json.Marshal(dst.Web3SigningCredentialCactusKeychainRef) - if string(jsonWeb3SigningCredentialCactusKeychainRef) == "{}" { // empty struct - dst.Web3SigningCredentialCactusKeychainRef = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialCactusKeychainRef = nil - } - - // try to unmarshal data into Web3SigningCredentialNone - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialNone) - if err == nil { - jsonWeb3SigningCredentialNone, _ := json.Marshal(dst.Web3SigningCredentialNone) - if string(jsonWeb3SigningCredentialNone) == "{}" { // empty struct - dst.Web3SigningCredentialNone = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialNone = nil - } - - // try to unmarshal data into Web3SigningCredentialPrivateKeyHex - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialPrivateKeyHex) - if err == nil { - jsonWeb3SigningCredentialPrivateKeyHex, _ := json.Marshal(dst.Web3SigningCredentialPrivateKeyHex) - if string(jsonWeb3SigningCredentialPrivateKeyHex) == "{}" { // empty struct - dst.Web3SigningCredentialPrivateKeyHex = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialPrivateKeyHex = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Web3SigningCredentialCactusKeychainRef = nil - dst.Web3SigningCredentialNone = nil - dst.Web3SigningCredentialPrivateKeyHex = nil - - return fmt.Errorf("data matches more than one schema in oneOf(Web3SigningCredential)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(Web3SigningCredential)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src Web3SigningCredential) MarshalJSON() ([]byte, error) { - if src.Web3SigningCredentialCactusKeychainRef != nil { - return json.Marshal(&src.Web3SigningCredentialCactusKeychainRef) - } - - if src.Web3SigningCredentialNone != nil { - return json.Marshal(&src.Web3SigningCredentialNone) - } - - if src.Web3SigningCredentialPrivateKeyHex != nil { - return json.Marshal(&src.Web3SigningCredentialPrivateKeyHex) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *Web3SigningCredential) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Web3SigningCredentialCactusKeychainRef != nil { - return obj.Web3SigningCredentialCactusKeychainRef - } - - if obj.Web3SigningCredentialNone != nil { - return obj.Web3SigningCredentialNone - } - - if obj.Web3SigningCredentialPrivateKeyHex != nil { - return obj.Web3SigningCredentialPrivateKeyHex - } - - // all schemas are nil - return nil -} - -type NullableWeb3SigningCredential struct { - value *Web3SigningCredential - isSet bool -} - -func (v NullableWeb3SigningCredential) Get() *Web3SigningCredential { - return v.value -} - -func (v *NullableWeb3SigningCredential) Set(val *Web3SigningCredential) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredential) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredential) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredential(val *Web3SigningCredential) *NullableWeb3SigningCredential { - return &NullableWeb3SigningCredential{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredential) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredential) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go deleted file mode 100644 index a3cae7e397..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialCactusKeychainRef type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialCactusKeychainRef{} - -// Web3SigningCredentialCactusKeychainRef struct for Web3SigningCredentialCactusKeychainRef -type Web3SigningCredentialCactusKeychainRef struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - KeychainEntryKey string `json:"keychainEntryKey"` - // The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - KeychainId string `json:"keychainId"` -} - -// NewWeb3SigningCredentialCactusKeychainRef instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialCactusKeychainRef(type_ Web3SigningCredentialType, ethAccount string, keychainEntryKey string, keychainId string) *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - this.Type = type_ - this.EthAccount = ethAccount - this.KeychainEntryKey = keychainEntryKey - this.KeychainId = keychainId - return &this -} - -// NewWeb3SigningCredentialCactusKeychainRefWithDefaults instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialCactusKeychainRefWithDefaults() *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialCactusKeychainRef) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialCactusKeychainRef) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetKeychainEntryKey returns the KeychainEntryKey field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKey() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainEntryKey -} - -// GetKeychainEntryKeyOk returns a tuple with the KeychainEntryKey field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainEntryKey, true -} - -// SetKeychainEntryKey sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainEntryKey(v string) { - o.KeychainEntryKey = v -} - -// GetKeychainId returns the KeychainId field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o Web3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialCactusKeychainRef) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["keychainEntryKey"] = o.KeychainEntryKey - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableWeb3SigningCredentialCactusKeychainRef struct { - value *Web3SigningCredentialCactusKeychainRef - isSet bool -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) Get() *Web3SigningCredentialCactusKeychainRef { - return v.value -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Set(val *Web3SigningCredentialCactusKeychainRef) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialCactusKeychainRef(val *Web3SigningCredentialCactusKeychainRef) *NullableWeb3SigningCredentialCactusKeychainRef { - return &NullableWeb3SigningCredentialCactusKeychainRef{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go deleted file mode 100644 index 01c33a52e1..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialNone type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialNone{} - -// Web3SigningCredentialNone Using this denotes that there is no signing required because the transaction is pre-signed. -type Web3SigningCredentialNone struct { - Type Web3SigningCredentialType `json:"type"` -} - -// NewWeb3SigningCredentialNone instantiates a new Web3SigningCredentialNone object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialNone(type_ Web3SigningCredentialType) *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - this.Type = type_ - return &this -} - -// NewWeb3SigningCredentialNoneWithDefaults instantiates a new Web3SigningCredentialNone object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialNoneWithDefaults() *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialNone) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialNone) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialNone) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -func (o Web3SigningCredentialNone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialNone) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableWeb3SigningCredentialNone struct { - value *Web3SigningCredentialNone - isSet bool -} - -func (v NullableWeb3SigningCredentialNone) Get() *Web3SigningCredentialNone { - return v.value -} - -func (v *NullableWeb3SigningCredentialNone) Set(val *Web3SigningCredentialNone) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialNone) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialNone) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialNone(val *Web3SigningCredentialNone) *NullableWeb3SigningCredentialNone { - return &NullableWeb3SigningCredentialNone{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialNone) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialNone) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go deleted file mode 100644 index c1d23c99c3..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialPrivateKeyHex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialPrivateKeyHex{} - -// Web3SigningCredentialPrivateKeyHex struct for Web3SigningCredentialPrivateKeyHex -type Web3SigningCredentialPrivateKeyHex struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The HEX encoded private key of an eth account. - Secret string `json:"secret"` -} - -// NewWeb3SigningCredentialPrivateKeyHex instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialPrivateKeyHex(type_ Web3SigningCredentialType, ethAccount string, secret string) *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - this.Type = type_ - this.EthAccount = ethAccount - this.Secret = secret - return &this -} - -// NewWeb3SigningCredentialPrivateKeyHexWithDefaults instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialPrivateKeyHexWithDefaults() *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialPrivateKeyHex) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetSecret returns the Secret field value -func (o *Web3SigningCredentialPrivateKeyHex) GetSecret() string { - if o == nil { - var ret string - return ret - } - - return o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetSecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Secret, true -} - -// SetSecret sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetSecret(v string) { - o.Secret = v -} - -func (o Web3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialPrivateKeyHex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["secret"] = o.Secret - return toSerialize, nil -} - -type NullableWeb3SigningCredentialPrivateKeyHex struct { - value *Web3SigningCredentialPrivateKeyHex - isSet bool -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) Get() *Web3SigningCredentialPrivateKeyHex { - return v.value -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Set(val *Web3SigningCredentialPrivateKeyHex) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialPrivateKeyHex(val *Web3SigningCredentialPrivateKeyHex) *NullableWeb3SigningCredentialPrivateKeyHex { - return &NullableWeb3SigningCredentialPrivateKeyHex{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go deleted file mode 100644 index af7bf63c5e..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredentialType the model 'Web3SigningCredentialType' -type Web3SigningCredentialType string - -// List of Web3SigningCredentialType -const ( - CACTUS_KEYCHAIN_REF Web3SigningCredentialType = "CACTUS_KEYCHAIN_REF" - GETH_KEYCHAIN_PASSWORD Web3SigningCredentialType = "GETH_KEYCHAIN_PASSWORD" - PRIVATE_KEY_HEX Web3SigningCredentialType = "PRIVATE_KEY_HEX" - NONE Web3SigningCredentialType = "NONE" -) - -// All allowed values of Web3SigningCredentialType enum -var AllowedWeb3SigningCredentialTypeEnumValues = []Web3SigningCredentialType{ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE", -} - -func (v *Web3SigningCredentialType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := Web3SigningCredentialType(value) - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Web3SigningCredentialType", value) -} - -// NewWeb3SigningCredentialTypeFromValue returns a pointer to a valid Web3SigningCredentialType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWeb3SigningCredentialTypeFromValue(v string) (*Web3SigningCredentialType, error) { - ev := Web3SigningCredentialType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Web3SigningCredentialType: valid values are %v", v, AllowedWeb3SigningCredentialTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v Web3SigningCredentialType) IsValid() bool { - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to Web3SigningCredentialType value -func (v Web3SigningCredentialType) Ptr() *Web3SigningCredentialType { - return &v -} - -type NullableWeb3SigningCredentialType struct { - value *Web3SigningCredentialType - isSet bool -} - -func (v NullableWeb3SigningCredentialType) Get() *Web3SigningCredentialType { - return v.value -} - -func (v *NullableWeb3SigningCredentialType) Set(val *Web3SigningCredentialType) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialType) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialType(val *Web3SigningCredentialType) *NullableWeb3SigningCredentialType { - return &NullableWeb3SigningCredentialType{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go deleted file mode 100644 index b650a80ebc..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go +++ /dev/null @@ -1,385 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the Web3TransactionReceipt type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3TransactionReceipt{} - -// Web3TransactionReceipt struct for Web3TransactionReceipt -type Web3TransactionReceipt struct { - Status bool `json:"status"` - TransactionHash string `json:"transactionHash"` - TransactionIndex float32 `json:"transactionIndex"` - BlockHash string `json:"blockHash"` - BlockNumber float32 `json:"blockNumber"` - GasUsed float32 `json:"gasUsed"` - ContractAddress NullableString `json:"contractAddress,omitempty"` - From string `json:"from"` - To string `json:"to"` - AdditionalProperties map[string]interface{} -} - -type _Web3TransactionReceipt Web3TransactionReceipt - -// NewWeb3TransactionReceipt instantiates a new Web3TransactionReceipt object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3TransactionReceipt(status bool, transactionHash string, transactionIndex float32, blockHash string, blockNumber float32, gasUsed float32, from string, to string) *Web3TransactionReceipt { - this := Web3TransactionReceipt{} - this.Status = status - this.TransactionHash = transactionHash - this.TransactionIndex = transactionIndex - this.BlockHash = blockHash - this.BlockNumber = blockNumber - this.GasUsed = gasUsed - this.From = from - this.To = to - return &this -} - -// NewWeb3TransactionReceiptWithDefaults instantiates a new Web3TransactionReceipt object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3TransactionReceiptWithDefaults() *Web3TransactionReceipt { - this := Web3TransactionReceipt{} - return &this -} - -// GetStatus returns the Status field value -func (o *Web3TransactionReceipt) GetStatus() bool { - if o == nil { - var ret bool - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetStatusOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *Web3TransactionReceipt) SetStatus(v bool) { - o.Status = v -} - -// GetTransactionHash returns the TransactionHash field value -func (o *Web3TransactionReceipt) GetTransactionHash() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionHash -} - -// GetTransactionHashOk returns a tuple with the TransactionHash field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTransactionHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionHash, true -} - -// SetTransactionHash sets field value -func (o *Web3TransactionReceipt) SetTransactionHash(v string) { - o.TransactionHash = v -} - -// GetTransactionIndex returns the TransactionIndex field value -func (o *Web3TransactionReceipt) GetTransactionIndex() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.TransactionIndex -} - -// GetTransactionIndexOk returns a tuple with the TransactionIndex field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTransactionIndexOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.TransactionIndex, true -} - -// SetTransactionIndex sets field value -func (o *Web3TransactionReceipt) SetTransactionIndex(v float32) { - o.TransactionIndex = v -} - -// GetBlockHash returns the BlockHash field value -func (o *Web3TransactionReceipt) GetBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockHash, true -} - -// SetBlockHash sets field value -func (o *Web3TransactionReceipt) SetBlockHash(v string) { - o.BlockHash = v -} - -// GetBlockNumber returns the BlockNumber field value -func (o *Web3TransactionReceipt) GetBlockNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetBlockNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.BlockNumber, true -} - -// SetBlockNumber sets field value -func (o *Web3TransactionReceipt) SetBlockNumber(v float32) { - o.BlockNumber = v -} - -// GetGasUsed returns the GasUsed field value -func (o *Web3TransactionReceipt) GetGasUsed() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.GasUsed -} - -// GetGasUsedOk returns a tuple with the GasUsed field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetGasUsedOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.GasUsed, true -} - -// SetGasUsed sets field value -func (o *Web3TransactionReceipt) SetGasUsed(v float32) { - o.GasUsed = v -} - -// GetContractAddress returns the ContractAddress field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Web3TransactionReceipt) GetContractAddress() string { - if o == nil || IsNil(o.ContractAddress.Get()) { - var ret string - return ret - } - return *o.ContractAddress.Get() -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Web3TransactionReceipt) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ContractAddress.Get(), o.ContractAddress.IsSet() -} - -// HasContractAddress returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasContractAddress() bool { - if o != nil && o.ContractAddress.IsSet() { - return true - } - - return false -} - -// SetContractAddress gets a reference to the given NullableString and assigns it to the ContractAddress field. -func (o *Web3TransactionReceipt) SetContractAddress(v string) { - o.ContractAddress.Set(&v) -} -// SetContractAddressNil sets the value for ContractAddress to be an explicit nil -func (o *Web3TransactionReceipt) SetContractAddressNil() { - o.ContractAddress.Set(nil) -} - -// UnsetContractAddress ensures that no value is present for ContractAddress, not even an explicit nil -func (o *Web3TransactionReceipt) UnsetContractAddress() { - o.ContractAddress.Unset() -} - -// GetFrom returns the From field value -func (o *Web3TransactionReceipt) GetFrom() string { - if o == nil { - var ret string - return ret - } - - return o.From -} - -// GetFromOk returns a tuple with the From field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetFromOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.From, true -} - -// SetFrom sets field value -func (o *Web3TransactionReceipt) SetFrom(v string) { - o.From = v -} - -// GetTo returns the To field value -func (o *Web3TransactionReceipt) GetTo() string { - if o == nil { - var ret string - return ret - } - - return o.To -} - -// GetToOk returns a tuple with the To field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetToOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.To, true -} - -// SetTo sets field value -func (o *Web3TransactionReceipt) SetTo(v string) { - o.To = v -} - -func (o Web3TransactionReceipt) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3TransactionReceipt) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["status"] = o.Status - toSerialize["transactionHash"] = o.TransactionHash - toSerialize["transactionIndex"] = o.TransactionIndex - toSerialize["blockHash"] = o.BlockHash - toSerialize["blockNumber"] = o.BlockNumber - toSerialize["gasUsed"] = o.GasUsed - if o.ContractAddress.IsSet() { - toSerialize["contractAddress"] = o.ContractAddress.Get() - } - toSerialize["from"] = o.From - toSerialize["to"] = o.To - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Web3TransactionReceipt) UnmarshalJSON(bytes []byte) (err error) { - varWeb3TransactionReceipt := _Web3TransactionReceipt{} - - if err = json.Unmarshal(bytes, &varWeb3TransactionReceipt); err == nil { - *o = Web3TransactionReceipt(varWeb3TransactionReceipt) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "status") - delete(additionalProperties, "transactionHash") - delete(additionalProperties, "transactionIndex") - delete(additionalProperties, "blockHash") - delete(additionalProperties, "blockNumber") - delete(additionalProperties, "gasUsed") - delete(additionalProperties, "contractAddress") - delete(additionalProperties, "from") - delete(additionalProperties, "to") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableWeb3TransactionReceipt struct { - value *Web3TransactionReceipt - isSet bool -} - -func (v NullableWeb3TransactionReceipt) Get() *Web3TransactionReceipt { - return v.value -} - -func (v *NullableWeb3TransactionReceipt) Set(val *Web3TransactionReceipt) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3TransactionReceipt) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3TransactionReceipt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3TransactionReceipt(val *Web3TransactionReceipt) *NullableWeb3TransactionReceipt { - return &NullableWeb3TransactionReceipt{value: val, isSet: true} -} - -func (v NullableWeb3TransactionReceipt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3TransactionReceipt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_withdraw_request.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_withdraw_request.go deleted file mode 100644 index 3bfa19ecf9..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/model_withdraw_request.go +++ /dev/null @@ -1,265 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" -) - -// checks if the WithdrawRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WithdrawRequest{} - -// WithdrawRequest struct for WithdrawRequest -type WithdrawRequest struct { - // Contract locked id - Id string `json:"id"` - // Secret need to unlock the contract - Secret string `json:"secret"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // connectorId for the connector besu plugin - ConnectorId string `json:"connectorId"` - // keychainId for the keychain plugin - KeychainId string `json:"keychainId"` - Gas *NewContractRequestGas `json:"gas,omitempty"` -} - -// NewWithdrawRequest instantiates a new WithdrawRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWithdrawRequest(id string, secret string, web3SigningCredential Web3SigningCredential, connectorId string, keychainId string) *WithdrawRequest { - this := WithdrawRequest{} - this.Id = id - this.Secret = secret - this.Web3SigningCredential = web3SigningCredential - this.ConnectorId = connectorId - this.KeychainId = keychainId - return &this -} - -// NewWithdrawRequestWithDefaults instantiates a new WithdrawRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWithdrawRequestWithDefaults() *WithdrawRequest { - this := WithdrawRequest{} - return &this -} - -// GetId returns the Id field value -func (o *WithdrawRequest) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *WithdrawRequest) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *WithdrawRequest) SetId(v string) { - o.Id = v -} - -// GetSecret returns the Secret field value -func (o *WithdrawRequest) GetSecret() string { - if o == nil { - var ret string - return ret - } - - return o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -func (o *WithdrawRequest) GetSecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Secret, true -} - -// SetSecret sets field value -func (o *WithdrawRequest) SetSecret(v string) { - o.Secret = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *WithdrawRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *WithdrawRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *WithdrawRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *WithdrawRequest) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *WithdrawRequest) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *WithdrawRequest) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *WithdrawRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *WithdrawRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *WithdrawRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *WithdrawRequest) GetGas() NewContractRequestGas { - if o == nil || IsNil(o.Gas) { - var ret NewContractRequestGas - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WithdrawRequest) GetGasOk() (*NewContractRequestGas, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *WithdrawRequest) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given NewContractRequestGas and assigns it to the Gas field. -func (o *WithdrawRequest) SetGas(v NewContractRequestGas) { - o.Gas = &v -} - -func (o WithdrawRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WithdrawRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["secret"] = o.Secret - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableWithdrawRequest struct { - value *WithdrawRequest - isSet bool -} - -func (v NullableWithdrawRequest) Get() *WithdrawRequest { - return v.value -} - -func (v *NullableWithdrawRequest) Set(val *WithdrawRequest) { - v.value = val - v.isSet = true -} - -func (v NullableWithdrawRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableWithdrawRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWithdrawRequest(val *WithdrawRequest) *NullableWithdrawRequest { - return &NullableWithdrawRequest{value: val, isSet: true} -} - -func (v NullableWithdrawRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWithdrawRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 9750ae0248..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 917ea3ad32..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-htlc-eth-besu-erc20_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService GetSingleStatusV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetSingleStatusV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetStatusV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetStatusV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService InitializeV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.InitializeV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService NewContractV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.NewContractV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RefundV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.RefundV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService WithdrawV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.WithdrawV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 7897cfb605..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu-erc20 - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/json/openapi.json b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/json/openapi.json deleted file mode 100644 index 8b127b1c9d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/json/openapi.json +++ /dev/null @@ -1,670 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - HTLC ETH BESU ERC20", - "description": "Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "NewContractRequest": { - "type": "object", - "required": [ - "contractAddress", - "inputAmount", - "outputAmount", - "expiration", - "hashLock", - "tokenAddress", - "receiver", - "outputNetwork", - "outputAddress", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "contractAddress": { - "description": "Contract address", - "type": "string", - "nullable": false - }, - "inputAmount": { - "description": "Input amount to lock", - "type": "number", - "nullable": false - }, - "outputAmount": { - "description": "Output amount to lock", - "type": "number", - "nullable": false - }, - "expiration": { - "description": "Timestamp to expire the contract", - "type": "number", - "nullable": false - }, - "hashLock": { - "description": "Hashlock needed to refund the amount", - "type": "string", - "nullable": false - }, - "tokenAddress": { - "description": "The token address", - "type": "string", - "nullable": false - }, - "receiver": { - "description": "The receiver address", - "type": "string", - "nullable": false - }, - "outputNetwork": { - "description": "The output network id", - "type": "string", - "nullable": false - }, - "outputAddress": { - "description": "The output address to receive the tokens", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredentialType", - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychian plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "RefundRequest": { - "type": "object", - "required": [ - "id", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "description": "Contract htlc id for refund", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredentialType", - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "WithdrawRequest": { - "type": "object", - "required": [ - "id", - "secret", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "description": "Contract locked id", - "type": "string", - "nullable": false - }, - "secret": { - "description": "Secret need to unlock the contract", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredentialType", - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "GetStatusRequest": { - "description": "Defines the parameters for retrieving the status of the HTLC swap.", - "required": [ - "ids", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "connectorId": { - "type": "string" - }, - "keychainId": { - "type": "string" - } - } - }, - "GetSingleStatusRequest": { - "description": "Defines the parameters for retrieving the single status of the HTLC swap.", - "required": [ - "id", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "connectorId": { - "type": "string" - }, - "keychainId": { - "type": "string" - } - } - }, - "InitializeRequest": { - "type": "object", - "required": [ - "connectorId", - "keychainId", - "constructorArgs", - "web3SigningCredential" - ], - "additionalProperties": false, - "properties": { - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "description": "Web3SigningCredential", - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "gas": { - "type": "number" - } - } - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": [ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE" - ] - }, - "Web3SigningCredentialCactusKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainId", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialPrivateKeyHex": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "secret": { - "type": "string", - "description": "The HEX encoded private key of an eth account.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialCactusKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialPrivateKeyHex" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3TransactionReceipt": { - "type": "object", - "required": [ - "blockHash", - "blockNumber", - "transactionHash", - "transactionIndex", - "status", - "from", - "to", - "gasUsed" - ], - "additionalProperties": true, - "properties": { - "status": { - "type": "boolean", - "nullable": false - }, - "transactionHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "transactionIndex": { - "type": "number", - "nullable": false - }, - "blockHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "blockNumber": { - "type": "number", - "nullable": false - }, - "gasUsed": { - "type": "number", - "nullable": false - }, - "contractAddress": { - "type": "string", - "nullable": true - }, - "from": { - "type": "string", - "nullable": false - }, - "to": { - "type": "string", - "nullable": false - } - } - }, - "RunTransactionResponse": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "InvokeContractV1Response": { - "type": "object", - "required": ["success"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - }, - "callOutput": {}, - "success": { - "type": "boolean", - "nullable": false - } - } - } - }, - "responses": { - "GetStatusResponse": { - "description": "Array of status", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "uint256" - } - } - } - } - }, - "GetSingleStatusResponse": { - "description": "Status", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "uint256" - } - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize" - } - }, - "operationId": "initializeV1", - "summary": "Initialize contract", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InitializeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw" - } - }, - "operationId": "withdrawV1", - "summary": "Withdraw a hashtimelock contract", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WithdrawRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status" - } - }, - "operationId": "getStatusV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStatusRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "$ref": "#/components/responses/GetStatusResponse" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status" - } - }, - "operationId": "getSingleStatusV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSingleStatusRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "$ref": "#/components/responses/GetSingleStatusResponse" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund" - } - }, - "operationId": "refundV1", - "summary": "Refund a hashtimelock contract", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefundRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract" - } - }, - "operationId": "newContractV1", - "summary": "Create a new hashtimelock contract", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewContractRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/json/openapi.tpl.json b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/json/openapi.tpl.json deleted file mode 100644 index f3fcde65f2..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,499 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - HTLC ETH BESU ERC20", - "description": "Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "NewContractRequest": { - "type": "object", - "required": [ - "contractAddress", - "inputAmount", - "outputAmount", - "expiration", - "hashLock", - "tokenAddress", - "receiver", - "outputNetwork", - "outputAddress", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "contractAddress": { - "description": "Contract address", - "type": "string", - "nullable": false - }, - "inputAmount": { - "description": "Input amount to lock", - "type": "number", - "nullable": false - }, - "outputAmount": { - "description": "Output amount to lock", - "type": "number", - "nullable": false - }, - "expiration": { - "description": "Timestamp to expire the contract", - "type": "number", - "nullable": false - }, - "hashLock": { - "description": "Hashlock needed to refund the amount", - "type": "string", - "nullable": false - }, - "tokenAddress": { - "description": "The token address", - "type": "string", - "nullable": false - }, - "receiver": { - "description": "The receiver address", - "type": "string", - "nullable": false - }, - "outputNetwork": { - "description": "The output network id", - "type": "string", - "nullable": false - }, - "outputAddress": { - "description": "The output address to receive the tokens", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredentialType", - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychian plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "RefundRequest": { - "type": "object", - "required": [ - "id", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "description": "Contract htlc id for refund", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredentialType", - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "WithdrawRequest": { - "type": "object", - "required": [ - "id", - "secret", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "description": "Contract locked id", - "type": "string", - "nullable": false - }, - "secret": { - "description": "Secret need to unlock the contract", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredentialType", - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "GetStatusRequest": { - "description": "Defines the parameters for retrieving the status of the HTLC swap.", - "required": [ - "ids", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "web3SigningCredential": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential" - }, - "connectorId": { - "type": "string" - }, - "keychainId": { - "type": "string" - } - } - }, - "GetSingleStatusRequest": { - "description": "Defines the parameters for retrieving the single status of the HTLC swap.", - "required": [ - "id", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "web3SigningCredential": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential" - }, - "connectorId": { - "type": "string" - }, - "keychainId": { - "type": "string" - } - } - }, - "InitializeRequest": { - "type": "object", - "required": [ - "connectorId", - "keychainId", - "constructorArgs", - "web3SigningCredential" - ], - "additionalProperties": false, - "properties": { - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "description": "Web3SigningCredential", - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "gas": { - "type": "number" - } - } - } - }, - "responses": { - "GetStatusResponse": { - "description": "Array of status", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "uint256" - } - } - } - } - }, - "GetSingleStatusResponse": { - "description": "Status", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "uint256" - } - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize" - } - }, - "operationId": "initializeV1", - "summary": "Initialize contract", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InitializeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/RunTransactionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw" - } - }, - "operationId": "withdrawV1", - "summary": "Withdraw a hashtimelock contract", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WithdrawRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status" - } - }, - "operationId": "getStatusV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStatusRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "$ref": "#/components/responses/GetStatusResponse" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status" - } - }, - "operationId": "getSingleStatusV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSingleStatusRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "$ref": "#/components/responses/GetSingleStatusResponse" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund" - } - }, - "operationId": "refundV1", - "summary": "Refund a hashtimelock contract", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefundRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract" - } - }, - "operationId": "newContractV1", - "summary": "Create a new hashtimelock contract", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewContractRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 9a355f61d1..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,38 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/GetSingleStatusRequest.kt -src/main/kotlin/org/openapitools/client/models/GetStatusRequest.kt -src/main/kotlin/org/openapitools/client/models/InitializeRequest.kt -src/main/kotlin/org/openapitools/client/models/InvokeContractV1Response.kt -src/main/kotlin/org/openapitools/client/models/NewContractRequest.kt -src/main/kotlin/org/openapitools/client/models/NewContractRequestGas.kt -src/main/kotlin/org/openapitools/client/models/RefundRequest.kt -src/main/kotlin/org/openapitools/client/models/RunTransactionResponse.kt -src/main/kotlin/org/openapitools/client/models/Web3SigningCredential.kt -src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialCactusKeychainRef.kt -src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialNone.kt -src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialPrivateKeyHex.kt -src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialType.kt -src/main/kotlin/org/openapitools/client/models/Web3TransactionReceipt.kt -src/main/kotlin/org/openapitools/client/models/WithdrawRequest.kt diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 7aef4bee44..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - -Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**getSingleStatusV1**](docs/DefaultApi.md#getsinglestatusv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status | -*DefaultApi* | [**getStatusV1**](docs/DefaultApi.md#getstatusv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status | -*DefaultApi* | [**initializeV1**](docs/DefaultApi.md#initializev1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize | Initialize contract -*DefaultApi* | [**newContractV1**](docs/DefaultApi.md#newcontractv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract | Create a new hashtimelock contract -*DefaultApi* | [**refundV1**](docs/DefaultApi.md#refundv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund | Refund a hashtimelock contract -*DefaultApi* | [**withdrawV1**](docs/DefaultApi.md#withdrawv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw | Withdraw a hashtimelock contract - - - -## Documentation for Models - - - [org.openapitools.client.models.GetSingleStatusRequest](docs/GetSingleStatusRequest.md) - - [org.openapitools.client.models.GetStatusRequest](docs/GetStatusRequest.md) - - [org.openapitools.client.models.InitializeRequest](docs/InitializeRequest.md) - - [org.openapitools.client.models.InvokeContractV1Response](docs/InvokeContractV1Response.md) - - [org.openapitools.client.models.NewContractRequest](docs/NewContractRequest.md) - - [org.openapitools.client.models.NewContractRequestGas](docs/NewContractRequestGas.md) - - [org.openapitools.client.models.RefundRequest](docs/RefundRequest.md) - - [org.openapitools.client.models.RunTransactionResponse](docs/RunTransactionResponse.md) - - [org.openapitools.client.models.Web3SigningCredential](docs/Web3SigningCredential.md) - - [org.openapitools.client.models.Web3SigningCredentialCactusKeychainRef](docs/Web3SigningCredentialCactusKeychainRef.md) - - [org.openapitools.client.models.Web3SigningCredentialNone](docs/Web3SigningCredentialNone.md) - - [org.openapitools.client.models.Web3SigningCredentialPrivateKeyHex](docs/Web3SigningCredentialPrivateKeyHex.md) - - [org.openapitools.client.models.Web3SigningCredentialType](docs/Web3SigningCredentialType.md) - - [org.openapitools.client.models.Web3TransactionReceipt](docs/Web3TransactionReceipt.md) - - [org.openapitools.client.models.WithdrawRequest](docs/WithdrawRequest.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index bbfd0078d4..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,490 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.GetSingleStatusRequest -import org.openapitools.client.models.GetStatusRequest -import org.openapitools.client.models.InitializeRequest -import org.openapitools.client.models.InvokeContractV1Response -import org.openapitools.client.models.NewContractRequest -import org.openapitools.client.models.RefundRequest -import org.openapitools.client.models.RunTransactionResponse -import org.openapitools.client.models.WithdrawRequest - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * - * - * @param getSingleStatusRequest (optional) - * @return kotlin.Int - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getSingleStatusV1(getSingleStatusRequest: GetSingleStatusRequest? = null) : kotlin.Int { - val localVarResponse = getSingleStatusV1WithHttpInfo(getSingleStatusRequest = getSingleStatusRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Int - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param getSingleStatusRequest (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getSingleStatusV1WithHttpInfo(getSingleStatusRequest: GetSingleStatusRequest?) : ApiResponse { - val localVariableConfig = getSingleStatusV1RequestConfig(getSingleStatusRequest = getSingleStatusRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getSingleStatusV1 - * - * @param getSingleStatusRequest (optional) - * @return RequestConfig - */ - fun getSingleStatusV1RequestConfig(getSingleStatusRequest: GetSingleStatusRequest?) : RequestConfig { - val localVariableBody = getSingleStatusRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param getStatusRequest (optional) - * @return kotlin.collections.List - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getStatusV1(getStatusRequest: GetStatusRequest? = null) : kotlin.collections.List { - val localVarResponse = getStatusV1WithHttpInfo(getStatusRequest = getStatusRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.List - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param getStatusRequest (optional) - * @return ApiResponse?> - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getStatusV1WithHttpInfo(getStatusRequest: GetStatusRequest?) : ApiResponse?> { - val localVariableConfig = getStatusV1RequestConfig(getStatusRequest = getStatusRequest) - - return request>( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getStatusV1 - * - * @param getStatusRequest (optional) - * @return RequestConfig - */ - fun getStatusV1RequestConfig(getStatusRequest: GetStatusRequest?) : RequestConfig { - val localVariableBody = getStatusRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Initialize contract - * - * @param initializeRequest (optional) - * @return RunTransactionResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun initializeV1(initializeRequest: InitializeRequest? = null) : RunTransactionResponse { - val localVarResponse = initializeV1WithHttpInfo(initializeRequest = initializeRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as RunTransactionResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Initialize contract - * - * @param initializeRequest (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun initializeV1WithHttpInfo(initializeRequest: InitializeRequest?) : ApiResponse { - val localVariableConfig = initializeV1RequestConfig(initializeRequest = initializeRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation initializeV1 - * - * @param initializeRequest (optional) - * @return RequestConfig - */ - fun initializeV1RequestConfig(initializeRequest: InitializeRequest?) : RequestConfig { - val localVariableBody = initializeRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Create a new hashtimelock contract - * - * @param newContractRequest (optional) - * @return InvokeContractV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun newContractV1(newContractRequest: NewContractRequest? = null) : InvokeContractV1Response { - val localVarResponse = newContractV1WithHttpInfo(newContractRequest = newContractRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as InvokeContractV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Create a new hashtimelock contract - * - * @param newContractRequest (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun newContractV1WithHttpInfo(newContractRequest: NewContractRequest?) : ApiResponse { - val localVariableConfig = newContractV1RequestConfig(newContractRequest = newContractRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation newContractV1 - * - * @param newContractRequest (optional) - * @return RequestConfig - */ - fun newContractV1RequestConfig(newContractRequest: NewContractRequest?) : RequestConfig { - val localVariableBody = newContractRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Refund a hashtimelock contract - * - * @param refundRequest (optional) - * @return InvokeContractV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun refundV1(refundRequest: RefundRequest? = null) : InvokeContractV1Response { - val localVarResponse = refundV1WithHttpInfo(refundRequest = refundRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as InvokeContractV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Refund a hashtimelock contract - * - * @param refundRequest (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun refundV1WithHttpInfo(refundRequest: RefundRequest?) : ApiResponse { - val localVariableConfig = refundV1RequestConfig(refundRequest = refundRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation refundV1 - * - * @param refundRequest (optional) - * @return RequestConfig - */ - fun refundV1RequestConfig(refundRequest: RefundRequest?) : RequestConfig { - val localVariableBody = refundRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Withdraw a hashtimelock contract - * - * @param withdrawRequest (optional) - * @return InvokeContractV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun withdrawV1(withdrawRequest: WithdrawRequest? = null) : InvokeContractV1Response { - val localVarResponse = withdrawV1WithHttpInfo(withdrawRequest = withdrawRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as InvokeContractV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Withdraw a hashtimelock contract - * - * @param withdrawRequest (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun withdrawV1WithHttpInfo(withdrawRequest: WithdrawRequest?) : ApiResponse { - val localVariableConfig = withdrawV1RequestConfig(withdrawRequest = withdrawRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation withdrawV1 - * - * @param withdrawRequest (optional) - * @return RequestConfig - */ - fun withdrawV1RequestConfig(withdrawRequest: WithdrawRequest?) : RequestConfig { - val localVariableBody = withdrawRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetSingleStatusRequest.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetSingleStatusRequest.kt deleted file mode 100644 index 94e845f65f..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetSingleStatusRequest.kt +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Web3SigningCredential - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Defines the parameters for retrieving the single status of the HTLC swap. - * - * @param id - * @param web3SigningCredential - * @param connectorId - * @param keychainId - */ - - -data class GetSingleStatusRequest ( - - @Json(name = "id") - val id: kotlin.String, - - @Json(name = "web3SigningCredential") - val web3SigningCredential: Web3SigningCredential, - - @Json(name = "connectorId") - val connectorId: kotlin.String, - - @Json(name = "keychainId") - val keychainId: kotlin.String - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetStatusRequest.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetStatusRequest.kt deleted file mode 100644 index ac525f7f63..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetStatusRequest.kt +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Web3SigningCredential - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Defines the parameters for retrieving the status of the HTLC swap. - * - * @param ids - * @param web3SigningCredential - * @param connectorId - * @param keychainId - */ - - -data class GetStatusRequest ( - - @Json(name = "ids") - val ids: kotlin.collections.List, - - @Json(name = "web3SigningCredential") - val web3SigningCredential: Web3SigningCredential, - - @Json(name = "connectorId") - val connectorId: kotlin.String, - - @Json(name = "keychainId") - val keychainId: kotlin.String - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InitializeRequest.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InitializeRequest.kt deleted file mode 100644 index afd51e1efd..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InitializeRequest.kt +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Web3SigningCredential - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param connectorId connectorId for the connector besu plugin - * @param keychainId keychainId for the keychain plugin - * @param constructorArgs - * @param web3SigningCredential - * @param gas - */ - - -data class InitializeRequest ( - - /* connectorId for the connector besu plugin */ - @Json(name = "connectorId") - val connectorId: kotlin.String, - - /* keychainId for the keychain plugin */ - @Json(name = "keychainId") - val keychainId: kotlin.String, - - @Json(name = "constructorArgs") - val constructorArgs: kotlin.collections.List = arrayListOf(), - - @Json(name = "web3SigningCredential") - val web3SigningCredential: Web3SigningCredential, - - @Json(name = "gas") - val gas: java.math.BigDecimal? = null - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InvokeContractV1Response.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InvokeContractV1Response.kt deleted file mode 100644 index 3f1e8f0809..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InvokeContractV1Response.kt +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Web3TransactionReceipt - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param success - * @param transactionReceipt - * @param callOutput - */ - - -data class InvokeContractV1Response ( - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "transactionReceipt") - val transactionReceipt: Web3TransactionReceipt? = null, - - @Json(name = "callOutput") - val callOutput: kotlin.Any? = null - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NewContractRequest.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NewContractRequest.kt deleted file mode 100644 index a79468f052..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NewContractRequest.kt +++ /dev/null @@ -1,96 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.NewContractRequestGas -import org.openapitools.client.models.Web3SigningCredential - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param contractAddress Contract address - * @param inputAmount Input amount to lock - * @param outputAmount Output amount to lock - * @param expiration Timestamp to expire the contract - * @param hashLock Hashlock needed to refund the amount - * @param tokenAddress The token address - * @param `receiver` The receiver address - * @param outputNetwork The output network id - * @param outputAddress The output address to receive the tokens - * @param web3SigningCredential - * @param connectorId connectorId for the connector besu plugin - * @param keychainId keychainId for the keychian plugin - * @param gas - */ - - -data class NewContractRequest ( - - /* Contract address */ - @Json(name = "contractAddress") - val contractAddress: kotlin.String, - - /* Input amount to lock */ - @Json(name = "inputAmount") - val inputAmount: java.math.BigDecimal, - - /* Output amount to lock */ - @Json(name = "outputAmount") - val outputAmount: java.math.BigDecimal, - - /* Timestamp to expire the contract */ - @Json(name = "expiration") - val expiration: java.math.BigDecimal, - - /* Hashlock needed to refund the amount */ - @Json(name = "hashLock") - val hashLock: kotlin.String, - - /* The token address */ - @Json(name = "tokenAddress") - val tokenAddress: kotlin.String, - - /* The receiver address */ - @Json(name = "receiver") - val `receiver`: kotlin.String, - - /* The output network id */ - @Json(name = "outputNetwork") - val outputNetwork: kotlin.String, - - /* The output address to receive the tokens */ - @Json(name = "outputAddress") - val outputAddress: kotlin.String, - - @Json(name = "web3SigningCredential") - val web3SigningCredential: Web3SigningCredential, - - /* connectorId for the connector besu plugin */ - @Json(name = "connectorId") - val connectorId: kotlin.String, - - /* keychainId for the keychian plugin */ - @Json(name = "keychainId") - val keychainId: kotlin.String, - - @Json(name = "gas") - val gas: NewContractRequestGas? = null - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NewContractRequestGas.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NewContractRequestGas.kt deleted file mode 100644 index b9a366ff96..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NewContractRequestGas.kt +++ /dev/null @@ -1,31 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - */ - - -data class NewContractRequestGas ( - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RefundRequest.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RefundRequest.kt deleted file mode 100644 index 26407cf3d1..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RefundRequest.kt +++ /dev/null @@ -1,56 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.NewContractRequestGas -import org.openapitools.client.models.Web3SigningCredential - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id Contract htlc id for refund - * @param web3SigningCredential - * @param connectorId connectorId for the connector besu plugin - * @param keychainId keychainId for the keychain plugin - * @param gas - */ - - -data class RefundRequest ( - - /* Contract htlc id for refund */ - @Json(name = "id") - val id: kotlin.String, - - @Json(name = "web3SigningCredential") - val web3SigningCredential: Web3SigningCredential, - - /* connectorId for the connector besu plugin */ - @Json(name = "connectorId") - val connectorId: kotlin.String, - - /* keychainId for the keychain plugin */ - @Json(name = "keychainId") - val keychainId: kotlin.String, - - @Json(name = "gas") - val gas: NewContractRequestGas? = null - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionResponse.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionResponse.kt deleted file mode 100644 index 974fdbfa87..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionResponse.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Web3TransactionReceipt - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param transactionReceipt - */ - - -data class RunTransactionResponse ( - - @Json(name = "transactionReceipt") - val transactionReceipt: Web3TransactionReceipt - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredential.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredential.kt deleted file mode 100644 index da22e7b4c9..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredential.kt +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Web3SigningCredentialCactusKeychainRef -import org.openapitools.client.models.Web3SigningCredentialNone -import org.openapitools.client.models.Web3SigningCredentialPrivateKeyHex -import org.openapitools.client.models.Web3SigningCredentialType - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param type - * @param ethAccount The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @param keychainEntryKey The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - * @param keychainId The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - * @param secret The HEX encoded private key of an eth account. - */ - - -interface Web3SigningCredential { - - @Json(name = "type") - val type: Web3SigningCredentialType - /* The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. */ - @Json(name = "ethAccount") - val ethAccount: kotlin.String - /* The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. */ - @Json(name = "keychainEntryKey") - val keychainEntryKey: kotlin.String - /* The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. */ - @Json(name = "keychainId") - val keychainId: kotlin.String - /* The HEX encoded private key of an eth account. */ - @Json(name = "secret") - val secret: kotlin.String -} - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialCactusKeychainRef.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialCactusKeychainRef.kt deleted file mode 100644 index f296adb562..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialCactusKeychainRef.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Web3SigningCredentialType - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param type - * @param ethAccount The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @param keychainEntryKey The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - * @param keychainId The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - */ - - -data class Web3SigningCredentialCactusKeychainRef ( - - @Json(name = "type") - val type: Web3SigningCredentialType, - - /* The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. */ - @Json(name = "ethAccount") - val ethAccount: kotlin.String, - - /* The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. */ - @Json(name = "keychainEntryKey") - val keychainEntryKey: kotlin.String, - - /* The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. */ - @Json(name = "keychainId") - val keychainId: kotlin.String - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialNone.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialNone.kt deleted file mode 100644 index 2a0f6f06a9..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialNone.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Web3SigningCredentialType - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Using this denotes that there is no signing required because the transaction is pre-signed. - * - * @param type - */ - - -data class Web3SigningCredentialNone ( - - @Json(name = "type") - val type: Web3SigningCredentialType - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialPrivateKeyHex.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialPrivateKeyHex.kt deleted file mode 100644 index 8766b02b38..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialPrivateKeyHex.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.Web3SigningCredentialType - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param type - * @param ethAccount The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @param secret The HEX encoded private key of an eth account. - */ - - -data class Web3SigningCredentialPrivateKeyHex ( - - @Json(name = "type") - val type: Web3SigningCredentialType, - - /* The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. */ - @Json(name = "ethAccount") - val ethAccount: kotlin.String, - - /* The HEX encoded private key of an eth account. */ - @Json(name = "secret") - val secret: kotlin.String - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialType.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialType.kt deleted file mode 100644 index 72e9a59036..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3SigningCredentialType.kt +++ /dev/null @@ -1,69 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * Values: cACTUSKEYCHAINREF,gETHKEYCHAINPASSWORD,pRIVATEKEYHEX,nONE - */ - -@JsonClass(generateAdapter = false) -enum class Web3SigningCredentialType(val value: kotlin.String) { - - @Json(name = "CACTUS_KEYCHAIN_REF") - cACTUSKEYCHAINREF("CACTUS_KEYCHAIN_REF"), - - @Json(name = "GETH_KEYCHAIN_PASSWORD") - gETHKEYCHAINPASSWORD("GETH_KEYCHAIN_PASSWORD"), - - @Json(name = "PRIVATE_KEY_HEX") - pRIVATEKEYHEX("PRIVATE_KEY_HEX"), - - @Json(name = "NONE") - nONE("NONE"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is Web3SigningCredentialType) "$data" else null - - /** - * Returns a valid [Web3SigningCredentialType] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): Web3SigningCredentialType? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3TransactionReceipt.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3TransactionReceipt.kt deleted file mode 100644 index f42923843d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Web3TransactionReceipt.kt +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param status - * @param transactionHash - * @param transactionIndex - * @param blockHash - * @param blockNumber - * @param gasUsed - * @param from - * @param to - * @param contractAddress - */ - - -data class Web3TransactionReceipt ( - - @Json(name = "status") - val status: kotlin.Boolean, - - @Json(name = "transactionHash") - val transactionHash: kotlin.String, - - @Json(name = "transactionIndex") - val transactionIndex: java.math.BigDecimal, - - @Json(name = "blockHash") - val blockHash: kotlin.String, - - @Json(name = "blockNumber") - val blockNumber: java.math.BigDecimal, - - @Json(name = "gasUsed") - val gasUsed: java.math.BigDecimal, - - @Json(name = "from") - val from: kotlin.String, - - @Json(name = "to") - val to: kotlin.String, - - @Json(name = "contractAddress") - val contractAddress: kotlin.String? = null - -) : kotlin.collections.HashMap() - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WithdrawRequest.kt b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WithdrawRequest.kt deleted file mode 100644 index 16e6944543..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WithdrawRequest.kt +++ /dev/null @@ -1,61 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.NewContractRequestGas -import org.openapitools.client.models.Web3SigningCredential - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id Contract locked id - * @param secret Secret need to unlock the contract - * @param web3SigningCredential - * @param connectorId connectorId for the connector besu plugin - * @param keychainId keychainId for the keychain plugin - * @param gas - */ - - -data class WithdrawRequest ( - - /* Contract locked id */ - @Json(name = "id") - val id: kotlin.String, - - /* Secret need to unlock the contract */ - @Json(name = "secret") - val secret: kotlin.String, - - @Json(name = "web3SigningCredential") - val web3SigningCredential: Web3SigningCredential, - - /* connectorId for the connector besu plugin */ - @Json(name = "connectorId") - val connectorId: kotlin.String, - - /* keychainId for the keychain plugin */ - @Json(name = "keychainId") - val keychainId: kotlin.String, - - @Json(name = "gas") - val gas: NewContractRequestGas? = null - -) - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json deleted file mode 100644 index 2a6a797c47..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json +++ /dev/null @@ -1,14102 +0,0 @@ -{ - "contractName": "HashedTimeLockContract", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "outputAddress", - "type": "string" - } - ], - "name": "NewContract", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "Refund", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "secret", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "ACTIVE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXPIRED", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "INVALID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REFUNDED", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WITHDRAWN", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "contracts", - "outputs": [ - { - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "status", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "internalType": "string", - "name": "outputAddress", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "getSingleStatus", - "outputs": [ - { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "ids", - "type": "bytes32[]" - } - ], - "name": "getStatus", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "internalType": "string", - "name": "outputAddress", - "type": "string" - } - ], - "name": "newContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "secret", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"name\":\"NewContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Refund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACTIVE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EXPIRED\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INVALID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REFUNDED\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWN\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"contracts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"status\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getSingleStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"ids\",\"type\":\"bytes32[]\"}],\"name\":\"getStatus\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"name\":\"newContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.sol\":\"HashedTimeLockContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.sol\":{\"keccak256\":\"0x47e31bd971d3cb9d37bfb8e78845eb7b4f446a1d83eb596e7e035d8a9caeff8e\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c61cf12cdaa3991b644bd0578c176b3fc5c6c8bb975964a5f41095cad4499024\",\"dweb:/ipfs/QmZRmrEMccT28ZnQUL57Zsf7NgcowUVZjVxqw8Y5vLrptG\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b506111dd806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806394e15c8f1161007157806394e15c8f1461011d578063af78feef14610125578063c90bd0471461012d578063d2fd8b7614610135578063ec56a37314610148578063fbdf3b431461017157600080fd5b80632f21a663146100ae578063414ac85b146100d757806363615149146100ed5780637249fbb6146101025780637fcce2a914610115575b600080fd5b6100c16100bc366004610c3e565b610184565b6040516100ce9190610cfc565b60405180910390f35b6100df600481565b6040519081526020016100ce565b6101006100fb366004610d40565b610232565b005b610100610110366004610d62565b610407565b6100df600081565b6100df600281565b6100df600381565b6100df600181565b610100610143366004610de0565b61056d565b61015b610156366004610d62565b6108e1565b6040516100ce9a99989796959493929190610ee1565b6100df61017f366004610d62565b610a52565b60606000825167ffffffffffffffff8111156101a2576101a2610c28565b6040519080825280602002602001820160405280156101cb578160200160208202803683370190505b50905060005b835181101561022b576101fc8482815181106101ef576101ef610f5a565b6020026020010151610a52565b82828151811061020e5761020e610f5a565b60209081029190910101528061022381610f70565b9150506101d1565b5092915050565b6000828152602081905260409020600381015460011461028b5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b60448201526064015b60405180910390fd5b428160020154116102ae5760405162461bcd60e51b815260040161028290610f97565b604080516020810184905201604051602081830303815290604052805190602001208160040154146103135760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d4d150d4915560921b6044820152606401610282565b60038181015560058101546007820154825460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af1158015610375573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103999190610fbd565b506007810154600682015460058301546004840154604080518881526020810188905280820192909252516001600160a01b039485169493841693909216917fbab3eb11a71b2cd82a010d4d5b2c3df5cd25ee8c9f1a75baff879a1b87942cb89181900360600190a4505050565b6000818152602081905260409020600381015460011461045b5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b6044820152606401610282565b428160020154111561047f5760405162461bcd60e51b815260040161028290610f97565b6002600382015560058101546006820154825460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af11580156104e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105069190610fbd565b5060078101546006820154600583015460048401546040805187815260208101929092526001600160a01b039485169493841693909216917f0d4cdc2fe2a785f03bf5481e13bee5cdcb7743166bcadafebfd3f09db6108117910160405180910390a45050565b42881161058c5760405162461bcd60e51b815260040161028290610f97565b60008a116105cd5760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d05353d5539560921b6044820152606401610282565b6040516323b872dd60e01b8152336004820152306024820152604481018b90526001600160a01b038716906323b872dd906064016020604051808303816000875af1158015610620573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106449190610fbd565b50604080513360208201526001600160a01b0380881692820192909252606081018c90526080810189905260a081018a905290871660c082015260009060e00160408051601f198184030181529181528151602092830120600081815292839052912060030154909150156106e95760405162461bcd60e51b815260206004820152600b60248201526a535741505f45584953545360a81b6044820152606401610282565b6040518061014001604052808c81526020018b81526020018a815260200160018152602001898152602001886001600160a01b03168152602001336001600160a01b03168152602001876001600160a01b0316815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8701819004810282018101909252858152918101919086908690819084018382808284376000920182905250939094525050838152602081815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a08301516005820180546001600160a01b039283166001600160a01b03199182161790915560c085015160068401805491841691831691909117905560e085015160078401805491909316911617905561010083015190915060088201906108559082611069565b50610120820151600982019061086b9082611069565b50905050856001600160a01b0316336001600160a01b0316886001600160a01b03167f448581ece7da63e54a320119f9f2b80c868a954c441e70c88ecdfc95919751248e8e8e878f8d8d8d8d6040516108cc99989796959493929190611152565b60405180910390a45050505050505050505050565b600060208190529081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889018054989997989697959694956001600160a01b0394851695938516949092169261094190610fe6565b80601f016020809104026020016040519081016040528092919081815260200182805461096d90610fe6565b80156109ba5780601f1061098f576101008083540402835291602001916109ba565b820191906000526020600020905b81548152906001019060200180831161099d57829003601f168201915b5050505050908060090180546109cf90610fe6565b80601f01602080910402602001604051908101604052809291908181526020018280546109fb90610fe6565b8015610a485780601f10610a1d57610100808354040283529160200191610a48565b820191906000526020600020905b815481529060010190602001808311610a2b57829003601f168201915b505050505090508a565b60008181526020818152604080832081516101408101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a08401526006820154811660c084015260078201541660e083015260088101805484939291610100840191610adf90610fe6565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0b90610fe6565b8015610b585780601f10610b2d57610100808354040283529160200191610b58565b820191906000526020600020905b815481529060010190602001808311610b3b57829003601f168201915b50505050508152602001600982018054610b7190610fe6565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9d90610fe6565b8015610bea5780601f10610bbf57610100808354040283529160200191610bea565b820191906000526020600020905b815481529060010190602001808311610bcd57829003601f168201915b505050505081525050905060018160600151148015610c0c5750428160400151105b15610c1a5760049150610c22565b806060015191505b50919050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610c5157600080fd5b823567ffffffffffffffff80821115610c6957600080fd5b818501915085601f830112610c7d57600080fd5b813581811115610c8f57610c8f610c28565b8060051b604051601f19603f83011681018181108582111715610cb457610cb4610c28565b604052918252848201925083810185019188831115610cd257600080fd5b938501935b82851015610cf057843584529385019392850192610cd7565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610d3457835183529284019291840191600101610d18565b50909695505050505050565b60008060408385031215610d5357600080fd5b50508035926020909101359150565b600060208284031215610d7457600080fd5b5035919050565b80356001600160a01b0381168114610d9257600080fd5b919050565b60008083601f840112610da957600080fd5b50813567ffffffffffffffff811115610dc157600080fd5b602083019150836020828501011115610dd957600080fd5b9250929050565b6000806000806000806000806000806101008b8d031215610e0057600080fd5b8a35995060208b0135985060408b0135975060608b01359650610e2560808c01610d7b565b9550610e3360a08c01610d7b565b945060c08b013567ffffffffffffffff80821115610e5057600080fd5b610e5c8e838f01610d97565b909650945060e08d0135915080821115610e7557600080fd5b50610e828d828e01610d97565b915080935050809150509295989b9194979a5092959850565b6000815180845260005b81811015610ec157602081850181015186830182015201610ea5565b506000602082860101526020601f19601f83011685010191505092915050565b60006101408c83528b60208401528a604084015289606084015288608084015260018060a01b0380891660a085015280881660c085015280871660e08501525080610100840152610f3481840186610e9b565b9050828103610120840152610f498185610e9b565b9d9c50505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201610f9057634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252600c908201526b494e56414c49445f54494d4560a01b604082015260600190565b600060208284031215610fcf57600080fd5b81518015158114610fdf57600080fd5b9392505050565b600181811c90821680610ffa57607f821691505b602082108103610c2257634e487b7160e01b600052602260045260246000fd5b601f82111561106457600081815260208120601f850160051c810160208610156110415750805b601f850160051c820191505b818110156110605782815560010161104d565b5050505b505050565b815167ffffffffffffffff81111561108357611083610c28565b611097816110918454610fe6565b8461101a565b602080601f8311600181146110cc57600084156110b45750858301515b600019600386901b1c1916600185901b178555611060565b600085815260208120601f198616915b828110156110fb578886015182559484019460019091019084016110dc565b50858210156111195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b89815288602082015287604082015286606082015285608082015260e060a0820152600061118460e083018688611129565b82810360c0840152611197818587611129565b9c9b50505050505050505050505056fea26469706673582212205eae60be9c1c08bbd70551f1fad9ddf248e60861c2744f3f84860dae3dbdddb464736f6c63430008130033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100a95760003560e01c806394e15c8f1161007157806394e15c8f1461011d578063af78feef14610125578063c90bd0471461012d578063d2fd8b7614610135578063ec56a37314610148578063fbdf3b431461017157600080fd5b80632f21a663146100ae578063414ac85b146100d757806363615149146100ed5780637249fbb6146101025780637fcce2a914610115575b600080fd5b6100c16100bc366004610c3e565b610184565b6040516100ce9190610cfc565b60405180910390f35b6100df600481565b6040519081526020016100ce565b6101006100fb366004610d40565b610232565b005b610100610110366004610d62565b610407565b6100df600081565b6100df600281565b6100df600381565b6100df600181565b610100610143366004610de0565b61056d565b61015b610156366004610d62565b6108e1565b6040516100ce9a99989796959493929190610ee1565b6100df61017f366004610d62565b610a52565b60606000825167ffffffffffffffff8111156101a2576101a2610c28565b6040519080825280602002602001820160405280156101cb578160200160208202803683370190505b50905060005b835181101561022b576101fc8482815181106101ef576101ef610f5a565b6020026020010151610a52565b82828151811061020e5761020e610f5a565b60209081029190910101528061022381610f70565b9150506101d1565b5092915050565b6000828152602081905260409020600381015460011461028b5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b60448201526064015b60405180910390fd5b428160020154116102ae5760405162461bcd60e51b815260040161028290610f97565b604080516020810184905201604051602081830303815290604052805190602001208160040154146103135760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d4d150d4915560921b6044820152606401610282565b60038181015560058101546007820154825460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af1158015610375573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103999190610fbd565b506007810154600682015460058301546004840154604080518881526020810188905280820192909252516001600160a01b039485169493841693909216917fbab3eb11a71b2cd82a010d4d5b2c3df5cd25ee8c9f1a75baff879a1b87942cb89181900360600190a4505050565b6000818152602081905260409020600381015460011461045b5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b6044820152606401610282565b428160020154111561047f5760405162461bcd60e51b815260040161028290610f97565b6002600382015560058101546006820154825460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af11580156104e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105069190610fbd565b5060078101546006820154600583015460048401546040805187815260208101929092526001600160a01b039485169493841693909216917f0d4cdc2fe2a785f03bf5481e13bee5cdcb7743166bcadafebfd3f09db6108117910160405180910390a45050565b42881161058c5760405162461bcd60e51b815260040161028290610f97565b60008a116105cd5760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d05353d5539560921b6044820152606401610282565b6040516323b872dd60e01b8152336004820152306024820152604481018b90526001600160a01b038716906323b872dd906064016020604051808303816000875af1158015610620573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106449190610fbd565b50604080513360208201526001600160a01b0380881692820192909252606081018c90526080810189905260a081018a905290871660c082015260009060e00160408051601f198184030181529181528151602092830120600081815292839052912060030154909150156106e95760405162461bcd60e51b815260206004820152600b60248201526a535741505f45584953545360a81b6044820152606401610282565b6040518061014001604052808c81526020018b81526020018a815260200160018152602001898152602001886001600160a01b03168152602001336001600160a01b03168152602001876001600160a01b0316815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8701819004810282018101909252858152918101919086908690819084018382808284376000920182905250939094525050838152602081815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a08301516005820180546001600160a01b039283166001600160a01b03199182161790915560c085015160068401805491841691831691909117905560e085015160078401805491909316911617905561010083015190915060088201906108559082611069565b50610120820151600982019061086b9082611069565b50905050856001600160a01b0316336001600160a01b0316886001600160a01b03167f448581ece7da63e54a320119f9f2b80c868a954c441e70c88ecdfc95919751248e8e8e878f8d8d8d8d6040516108cc99989796959493929190611152565b60405180910390a45050505050505050505050565b600060208190529081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889018054989997989697959694956001600160a01b0394851695938516949092169261094190610fe6565b80601f016020809104026020016040519081016040528092919081815260200182805461096d90610fe6565b80156109ba5780601f1061098f576101008083540402835291602001916109ba565b820191906000526020600020905b81548152906001019060200180831161099d57829003601f168201915b5050505050908060090180546109cf90610fe6565b80601f01602080910402602001604051908101604052809291908181526020018280546109fb90610fe6565b8015610a485780601f10610a1d57610100808354040283529160200191610a48565b820191906000526020600020905b815481529060010190602001808311610a2b57829003601f168201915b505050505090508a565b60008181526020818152604080832081516101408101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a08401526006820154811660c084015260078201541660e083015260088101805484939291610100840191610adf90610fe6565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0b90610fe6565b8015610b585780601f10610b2d57610100808354040283529160200191610b58565b820191906000526020600020905b815481529060010190602001808311610b3b57829003601f168201915b50505050508152602001600982018054610b7190610fe6565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9d90610fe6565b8015610bea5780601f10610bbf57610100808354040283529160200191610bea565b820191906000526020600020905b815481529060010190602001808311610bcd57829003601f168201915b505050505081525050905060018160600151148015610c0c5750428160400151105b15610c1a5760049150610c22565b806060015191505b50919050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610c5157600080fd5b823567ffffffffffffffff80821115610c6957600080fd5b818501915085601f830112610c7d57600080fd5b813581811115610c8f57610c8f610c28565b8060051b604051601f19603f83011681018181108582111715610cb457610cb4610c28565b604052918252848201925083810185019188831115610cd257600080fd5b938501935b82851015610cf057843584529385019392850192610cd7565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610d3457835183529284019291840191600101610d18565b50909695505050505050565b60008060408385031215610d5357600080fd5b50508035926020909101359150565b600060208284031215610d7457600080fd5b5035919050565b80356001600160a01b0381168114610d9257600080fd5b919050565b60008083601f840112610da957600080fd5b50813567ffffffffffffffff811115610dc157600080fd5b602083019150836020828501011115610dd957600080fd5b9250929050565b6000806000806000806000806000806101008b8d031215610e0057600080fd5b8a35995060208b0135985060408b0135975060608b01359650610e2560808c01610d7b565b9550610e3360a08c01610d7b565b945060c08b013567ffffffffffffffff80821115610e5057600080fd5b610e5c8e838f01610d97565b909650945060e08d0135915080821115610e7557600080fd5b50610e828d828e01610d97565b915080935050809150509295989b9194979a5092959850565b6000815180845260005b81811015610ec157602081850181015186830182015201610ea5565b506000602082860101526020601f19601f83011685010191505092915050565b60006101408c83528b60208401528a604084015289606084015288608084015260018060a01b0380891660a085015280881660c085015280871660e08501525080610100840152610f3481840186610e9b565b9050828103610120840152610f498185610e9b565b9d9c50505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201610f9057634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252600c908201526b494e56414c49445f54494d4560a01b604082015260600190565b600060208284031215610fcf57600080fd5b81518015158114610fdf57600080fd5b9392505050565b600181811c90821680610ffa57607f821691505b602082108103610c2257634e487b7160e01b600052602260045260246000fd5b601f82111561106457600081815260208120601f850160051c810160208610156110415750805b601f850160051c820191505b818110156110605782815560010161104d565b5050505b505050565b815167ffffffffffffffff81111561108357611083610c28565b611097816110918454610fe6565b8461101a565b602080601f8311600181146110cc57600084156110b45750858301515b600019600386901b1c1916600185901b178555611060565b600085815260208120601f198616915b828110156110fb578886015182559484019460019091019084016110dc565b50858210156111195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b89815288602082015287604082015286606082015285608082015260e060a0820152600061118460e083018688611129565b82810360c0840152611197818587611129565b9c9b50505050505050505050505056fea26469706673582212205eae60be9c1c08bbd70551f1fad9ddf248e60861c2744f3f84860dae3dbdddb464736f6c63430008130033", - "sourceMap": "14086:4776:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "14086:4776:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18160:331;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;14657:35;;14691:1;14657:35;;;;;2049:25:1;;;2037:2;2022:18;14657:35:0;1903:177:1;17131:628:0;;;;;;:::i;:::-;;:::i;:::-;;17765:389;;;;;;:::i;:::-;;:::i;14326:35::-;;14360:1;14326:35;;14499:36;;14534:1;14499:36;;14577:37;;14613:1;14577:37;;14410:34;;14443:1;14410:34;;15753:1372;;;;;;:::i;:::-;;:::i;14156:49::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;;;;;;:::i;18497:363::-;;;;;;:::i;:::-;;:::i;18160:331::-;18246:16;18278:23;18318:3;:10;18304:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18304:25:0;;18278:51;;18345:13;18340:121;18372:3;:10;18364:5;:18;18340:121;;;18423:27;18439:3;18443:5;18439:10;;;;;;;;:::i;:::-;;;;;;;18423:15;:27::i;:::-;18407:6;18414:5;18407:13;;;;;;;;:::i;:::-;;;;;;;;;;:43;18384:7;;;;:::i;:::-;;;;18340:121;;;-1:-1:-1;18478:6:0;18160:331;-1:-1:-1;;18160:331:0:o;17131:628::-;17208:22;17233:13;;;;;;;;;;17265:8;;;;14443:1;17265:18;17257:46;;;;-1:-1:-1;;;17257:46:0;;6253:2:1;17257:46:0;;;6235:21:1;6292:2;6272:18;;;6265:30;-1:-1:-1;;;6311:18:1;;;6304:45;6366:18;;17257:46:0;;;;;;;;;17337:15;17322:1;:12;;;:30;17314:55;;;;-1:-1:-1;;;17314:55:0;;;;;;;:::i;:::-;17425:18;;;;;;2049:25:1;;;2022:18;17425::0;;;;;;;;;;;;17415:29;;;;;;17401:1;:10;;;:43;17380:104;;;;-1:-1:-1;;;17380:104:0;;7120:2:1;17380:104:0;;;7102:21:1;7159:2;7139:18;;;7132:30;-1:-1:-1;;;7178:18:1;;;7171:44;7232:18;;17380:104:0;6918:338:1;17380:104:0;14613:1;17495:8;;;:20;17533:14;;;;17558:10;;;;17570:13;;17526:58;;-1:-1:-1;;;17526:58:0;;-1:-1:-1;;;;;17558:10:0;;;17526:58;;;7435:51:1;7502:18;;;7495:34;;;;17533:14:0;;;17526:31;;7408:18:1;;17526:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;17732:10:0;;;;17710:8;;;;17682:14;;;;17658:10;;;;17600:152;;;8024:25:1;;;8080:2;8065:18;;8058:34;;;8108:18;;;8101:34;;;;17600:152:0;-1:-1:-1;;;;;17732:10:0;;;;17710:8;;;;17682:14;;;;17600:152;;;;;8012:2:1;17600:152:0;;;17198:561;17131:628;;:::o;17765:389::-;17812:22;17837:13;;;;;;;;;;17869:8;;;;14443:1;17869:18;17861:46;;;;-1:-1:-1;;;17861:46:0;;6253:2:1;17861:46:0;;;6235:21:1;6292:2;6272:18;;;6265:30;-1:-1:-1;;;6311:18:1;;;6304:45;6366:18;;17861:46:0;6051:339:1;17861:46:0;17942:15;17926:1;:12;;;:31;;17918:56;;;;-1:-1:-1;;;17918:56:0;;;;;;;:::i;:::-;14534:1;17985:8;;;:19;18022:14;;;;18047:8;;;;18057:13;;18015:56;;-1:-1:-1;;;18015:56:0;;-1:-1:-1;;;;;18047:8:0;;;18015:56;;;7435:51:1;7502:18;;;7495:34;;;;18022:14:0;;;18015:31;;7408:18:1;;18015:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;18136:10:0;;;;18126:8;;;;18110:14;;;;18098:10;;;;18087:60;;;8320:25:1;;;8376:2;8361:18;;8354:34;;;;-1:-1:-1;;;;;18136:10:0;;;;18126:8;;;;18110:14;;;;18087:60;;8293:18:1;18087:60:0;;;;;;;17802:352;17765:389;:::o;15753:1372::-;16067:15;16054:10;:28;16046:53;;;;-1:-1:-1;;;16046:53:0;;;;;;;:::i;:::-;16132:1;16118:11;:15;16110:42;;;;-1:-1:-1;;;16110:42:0;;8601:2:1;16110:42:0;;;8583:21:1;8640:2;8620:18;;;8613:30;-1:-1:-1;;;8659:18:1;;;8652:44;8713:18;;16110:42:0;8399:338:1;16110:42:0;16163:73;;-1:-1:-1;;;16163:73:0;;16197:10;16163:73;;;8982:34:1;16217:4:0;9032:18:1;;;9025:43;9084:18;;;9077:34;;;-1:-1:-1;;;;;16163:33:0;;;;;8917:18:1;;16163:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;16283:191:0;;;16311:10;16283:191;;;9447:34:1;-1:-1:-1;;;;;9517:15:1;;;9497:18;;;9490:43;;;;9549:18;;;9542:34;;;9592:18;;;9585:34;;;9635:19;;;9628:35;;;9700:15;;;9679:19;;;9672:44;16247:10:0;;9381:19:1;;16283:191:0;;;-1:-1:-1;;16283:191:0;;;;;;;;;16260:224;;16283:191;16260:224;;;;14360:1;16503:13;;;;;;;;;:20;;;16260:224;;-1:-1:-1;16503:31:0;16495:55;;;;-1:-1:-1;;;16495:55:0;;9929:2:1;16495:55:0;;;9911:21:1;9968:2;9948:18;;;9941:30;-1:-1:-1;;;9987:18:1;;;9980:41;10038:18;;16495:55:0;9727:335:1;16495:55:0;16577:265;;;;;;;;16603:11;16577:265;;;;16628:12;16577:265;;;;16654:10;16577:265;;;;14443:1;16577:265;;;;16698:8;16577:265;;;;16720:12;-1:-1:-1;;;;;16577:265:0;;;;;16746:10;-1:-1:-1;;;;;16577:265:0;;;;;16770:8;-1:-1:-1;;;;;16577:265:0;;;;;16792:13;;16577:265;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;16577:265:0;;;-1:-1:-1;16577:265:0;;;;;;;;;;;;;;;;;;;;;;;;;;;16819:13;;;;;;16577:265;;16819:13;;;;16577:265;;;;;;;;-1:-1:-1;16577:265:0;;;;-1:-1:-1;;16561:13:0;;;;;;;;;;;;:281;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16561:281:0;;;-1:-1:-1;;;;;;16561:281:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:13;;-1:-1:-1;16561:281:0;;;;;;;;:::i;:::-;-1:-1:-1;16561:281:0;;;;;;;;;;;;:::i;:::-;;;;;17046:8;-1:-1:-1;;;;;16858:260:0;17022:10;-1:-1:-1;;;;;16858:260:0;16996:12;-1:-1:-1;;;;;16858:260:0;;16883:11;16908:12;16934:10;16958:2;16974:8;17068:13;;17095;;16858:260;;;;;;;;;;;;;;:::i;:::-;;;;;;;;16036:1089;15753:1372;;;;;;;;;;:::o;14156:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14156:49:0;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;18497:363::-;18555:14;18616:13;;;;;;;;;;;18581:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18581:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18555:14;;18581:48;18616:13;18581:48;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14443:1;18657:12;:19;;;:29;:86;;;;;18728:15;18702:12;:23;;;:41;18657:86;18640:214;;;14691:1;18768:16;;18640:214;;;18824:12;:19;;;18815:28;;18640:214;18571:289;18497:363;;;:::o;14:127:1:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:1115;230:6;261:2;304;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;360:9;347:23;389:18;430:2;422:6;419:14;416:34;;;446:1;443;436:12;416:34;484:6;473:9;469:22;459:32;;529:7;522:4;518:2;514:13;510:27;500:55;;551:1;548;541:12;500:55;587:2;574:16;609:2;605;602:10;599:36;;;615:18;;:::i;:::-;661:2;658:1;654:10;693:2;687:9;756:2;752:7;747:2;743;739:11;735:25;727:6;723:38;811:6;799:10;796:22;791:2;779:10;776:18;773:46;770:72;;;822:18;;:::i;:::-;858:2;851:22;908:18;;;942:15;;;;-1:-1:-1;984:11:1;;;980:20;;;1012:19;;;1009:39;;;1044:1;1041;1034:12;1009:39;1068:11;;;;1088:142;1104:6;1099:3;1096:15;1088:142;;;1170:17;;1158:30;;1121:12;;;;1208;;;;1088:142;;;1249:6;146:1115;-1:-1:-1;;;;;;;;146:1115:1:o;1266:632::-;1437:2;1489:21;;;1559:13;;1462:18;;;1581:22;;;1408:4;;1437:2;1660:15;;;;1634:2;1619:18;;;1408:4;1703:169;1717:6;1714:1;1711:13;1703:169;;;1778:13;;1766:26;;1847:15;;;;1812:12;;;;1739:1;1732:9;1703:169;;;-1:-1:-1;1889:3:1;;1266:632;-1:-1:-1;;;;;;1266:632:1:o;2085:248::-;2153:6;2161;2214:2;2202:9;2193:7;2189:23;2185:32;2182:52;;;2230:1;2227;2220:12;2182:52;-1:-1:-1;;2253:23:1;;;2323:2;2308:18;;;2295:32;;-1:-1:-1;2085:248:1:o;2338:180::-;2397:6;2450:2;2438:9;2429:7;2425:23;2421:32;2418:52;;;2466:1;2463;2456:12;2418:52;-1:-1:-1;2489:23:1;;2338:180;-1:-1:-1;2338:180:1:o;2523:173::-;2591:20;;-1:-1:-1;;;;;2640:31:1;;2630:42;;2620:70;;2686:1;2683;2676:12;2620:70;2523:173;;;:::o;2701:348::-;2753:8;2763:6;2817:3;2810:4;2802:6;2798:17;2794:27;2784:55;;2835:1;2832;2825:12;2784:55;-1:-1:-1;2858:20:1;;2901:18;2890:30;;2887:50;;;2933:1;2930;2923:12;2887:50;2970:4;2962:6;2958:17;2946:29;;3022:3;3015:4;3006:6;2998;2994:19;2990:30;2987:39;2984:59;;;3039:1;3036;3029:12;2984:59;2701:348;;;;;:::o;3054:1146::-;3200:6;3208;3216;3224;3232;3240;3248;3256;3264;3272;3325:3;3313:9;3304:7;3300:23;3296:33;3293:53;;;3342:1;3339;3332:12;3293:53;3378:9;3365:23;3355:33;;3435:2;3424:9;3420:18;3407:32;3397:42;;3486:2;3475:9;3471:18;3458:32;3448:42;;3537:2;3526:9;3522:18;3509:32;3499:42;;3560:39;3594:3;3583:9;3579:19;3560:39;:::i;:::-;3550:49;;3618:39;3652:3;3641:9;3637:19;3618:39;:::i;:::-;3608:49;;3708:3;3697:9;3693:19;3680:33;3732:18;3773:2;3765:6;3762:14;3759:34;;;3789:1;3786;3779:12;3759:34;3828:59;3879:7;3870:6;3859:9;3855:22;3828:59;:::i;:::-;3906:8;;-1:-1:-1;3802:85:1;-1:-1:-1;3994:3:1;3979:19;;3966:33;;-1:-1:-1;4011:16:1;;;4008:36;;;4040:1;4037;4030:12;4008:36;;4079:61;4132:7;4121:8;4110:9;4106:24;4079:61;:::i;:::-;4053:87;;4159:8;4149:18;;;4186:8;4176:18;;;3054:1146;;;;;;;;;;;;;:::o;4205:423::-;4247:3;4285:5;4279:12;4312:6;4307:3;4300:19;4337:1;4347:162;4361:6;4358:1;4355:13;4347:162;;;4423:4;4479:13;;;4475:22;;4469:29;4451:11;;;4447:20;;4440:59;4376:12;4347:162;;;4351:3;4554:1;4547:4;4538:6;4533:3;4529:16;4525:27;4518:38;4617:4;4610:2;4606:7;4601:2;4593:6;4589:15;4585:29;4580:3;4576:39;4572:50;4565:57;;;4205:423;;;;:::o;4633:1044::-;5017:4;5046:3;5076:6;5065:9;5058:25;5119:6;5114:2;5103:9;5099:18;5092:34;5162:6;5157:2;5146:9;5142:18;5135:34;5205:6;5200:2;5189:9;5185:18;5178:34;5249:6;5243:3;5232:9;5228:19;5221:35;5292:1;5288;5283:3;5279:11;5275:19;5343:2;5335:6;5331:15;5325:3;5314:9;5310:19;5303:44;5396:2;5388:6;5384:15;5378:3;5367:9;5363:19;5356:44;5449:2;5441:6;5437:15;5431:3;5420:9;5416:19;5409:44;;5490:2;5484:3;5473:9;5469:19;5462:31;5516:45;5557:2;5546:9;5542:18;5534:6;5516:45;:::i;:::-;5502:59;;5610:9;5602:6;5598:22;5592:3;5581:9;5577:19;5570:51;5638:33;5664:6;5656;5638:33;:::i;:::-;5630:41;4633:1044;-1:-1:-1;;;;;;;;;;;;;4633:1044:1:o;5682:127::-;5743:10;5738:3;5734:20;5731:1;5724:31;5774:4;5771:1;5764:15;5798:4;5795:1;5788:15;5814:232;5853:3;5874:17;;;5871:140;;5933:10;5928:3;5924:20;5921:1;5914:31;5968:4;5965:1;5958:15;5996:4;5993:1;5986:15;5871:140;-1:-1:-1;6038:1:1;6027:13;;5814:232::o;6395:336::-;6597:2;6579:21;;;6636:2;6616:18;;;6609:30;-1:-1:-1;;;6670:2:1;6655:18;;6648:42;6722:2;6707:18;;6395:336::o;7540:277::-;7607:6;7660:2;7648:9;7639:7;7635:23;7631:32;7628:52;;;7676:1;7673;7666:12;7628:52;7708:9;7702:16;7761:5;7754:13;7747:21;7740:5;7737:32;7727:60;;7783:1;7780;7773:12;7727:60;7806:5;7540:277;-1:-1:-1;;;7540:277:1:o;10067:380::-;10146:1;10142:12;;;;10189;;;10210:61;;10264:4;10256:6;10252:17;10242:27;;10210:61;10317:2;10309:6;10306:14;10286:18;10283:38;10280:161;;10363:10;10358:3;10354:20;10351:1;10344:31;10398:4;10395:1;10388:15;10426:4;10423:1;10416:15;10578:545;10680:2;10675:3;10672:11;10669:448;;;10716:1;10741:5;10737:2;10730:17;10786:4;10782:2;10772:19;10856:2;10844:10;10840:19;10837:1;10833:27;10827:4;10823:38;10892:4;10880:10;10877:20;10874:47;;;-1:-1:-1;10915:4:1;10874:47;10970:2;10965:3;10961:12;10958:1;10954:20;10948:4;10944:31;10934:41;;11025:82;11043:2;11036:5;11033:13;11025:82;;;11088:17;;;11069:1;11058:13;11025:82;;;11029:3;;;10669:448;10578:545;;;:::o;11299:1352::-;11425:3;11419:10;11452:18;11444:6;11441:30;11438:56;;;11474:18;;:::i;:::-;11503:97;11593:6;11553:38;11585:4;11579:11;11553:38;:::i;:::-;11547:4;11503:97;:::i;:::-;11655:4;;11719:2;11708:14;;11736:1;11731:663;;;;12438:1;12455:6;12452:89;;;-1:-1:-1;12507:19:1;;;12501:26;12452:89;-1:-1:-1;;11256:1:1;11252:11;;;11248:24;11244:29;11234:40;11280:1;11276:11;;;11231:57;12554:81;;11701:944;;11731:663;10525:1;10518:14;;;10562:4;10549:18;;-1:-1:-1;;11767:20:1;;;11885:236;11899:7;11896:1;11893:14;11885:236;;;11988:19;;;11982:26;11967:42;;12080:27;;;;12048:1;12036:14;;;;11915:19;;11885:236;;;11889:3;12149:6;12140:7;12137:19;12134:201;;;12210:19;;;12204:26;-1:-1:-1;;12293:1:1;12289:14;;;12305:3;12285:24;12281:37;12277:42;12262:58;12247:74;;12134:201;-1:-1:-1;;;;;12381:1:1;12365:14;;;12361:22;12348:36;;-1:-1:-1;11299:1352:1:o;12656:267::-;12745:6;12740:3;12733:19;12797:6;12790:5;12783:4;12778:3;12774:14;12761:43;-1:-1:-1;12849:1:1;12824:16;;;12842:4;12820:27;;;12813:38;;;;12905:2;12884:15;;;-1:-1:-1;;12880:29:1;12871:39;;;12867:50;;12656:267::o;12928:797::-;13285:6;13274:9;13267:25;13328:6;13323:2;13312:9;13308:18;13301:34;13371:6;13366:2;13355:9;13351:18;13344:34;13414:6;13409:2;13398:9;13394:18;13387:34;13458:6;13452:3;13441:9;13437:19;13430:35;13502:3;13496;13485:9;13481:19;13474:32;13248:4;13529:63;13587:3;13576:9;13572:19;13564:6;13556;13529:63;:::i;:::-;13641:9;13633:6;13629:22;13623:3;13612:9;13608:19;13601:51;13669:50;13712:6;13704;13696;13669:50;:::i;:::-;13661:58;12928:797;-1:-1:-1;;;;;;;;;;;;12928:797:1:o", - "sourcePath": "/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.sol", - "compiler": { - "name": "solc", - "version": "0.8.19+commit.7dd6d404" - }, - "ast": { - "absolutePath": "/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.sol", - "exportedSymbols": { - "Address": [ - 295 - ], - "HashedTimeLockContract": [ - 1007 - ], - "IERC20": [ - 371 - ], - "SafeERC20": [ - 590 - ] - }, - "id": 1008, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "0.8", - ".19" - ], - "nodeType": "PragmaDirective", - "src": "40:23:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Address", - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 2, - "nodeType": "StructuredDocumentation", - "src": "66:67:0", - "text": " @dev Collection of functions related to the address type" - }, - "fullyImplemented": true, - "id": 295, - "linearizedBaseContracts": [ - 295 - ], - "name": "Address", - "nameLocation": "142:7:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 18, - "nodeType": "Block", - "src": "792:347:0", - "statements": [ - { - "assignments": [ - 11 - ], - "declarations": [ - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "size", - "nameLocation": "997:4:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "989:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "989:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "nodeType": "VariableDeclarationStatement", - "src": "989:12:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "1076:32:0", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1078:28:0", - "value": { - "arguments": [ - { - "name": "account", - "nodeType": "YulIdentifier", - "src": "1098:7:0" - } - ], - "functionName": { - "name": "extcodesize", - "nodeType": "YulIdentifier", - "src": "1086:11:0" - }, - "nodeType": "YulFunctionCall", - "src": "1086:20:0" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "1078:4:0" - } - ] - } - ] - }, - "evmVersion": "paris", - "externalReferences": [ - { - "declaration": 5, - "isOffset": false, - "isSlot": false, - "src": "1098:7:0", - "valueSize": 1 - }, - { - "declaration": 11, - "isOffset": false, - "isSlot": false, - "src": "1078:4:0", - "valueSize": 1 - } - ], - "id": 13, - "nodeType": "InlineAssembly", - "src": "1067:41:0" - }, - { - "expression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 14, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "1124:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1131:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1124:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 9, - "id": 17, - "nodeType": "Return", - "src": "1117:15:0" - } - ] - }, - "documentation": { - "id": 3, - "nodeType": "StructuredDocumentation", - "src": "156:565:0", - "text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n ====" - }, - "id": 19, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nameLocation": "735:10:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5, - "mutability": "mutable", - "name": "account", - "nameLocation": "754:7:0", - "nodeType": "VariableDeclaration", - "scope": 19, - "src": "746:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 4, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "746:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "745:17:0" - }, - "returnParameters": { - "id": 9, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 19, - "src": "786:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 7, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "786:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "785:6:0" - }, - "scope": 295, - "src": "726:413:0", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 52, - "nodeType": "Block", - "src": "2127:320:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 34, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "arguments": [ - { - "id": 30, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "2153:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$295", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$295", - "typeString": "library Address" - } - ], - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2145:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 28, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2145:7:0", - "typeDescriptions": {} - } - }, - "id": 31, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2145:13:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2159:7:0", - "memberName": "balance", - "nodeType": "MemberAccess", - "src": "2145:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 33, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 24, - "src": "2170:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2145:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 35, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2178:31:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 27, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2137:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 36, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2137:73:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 37, - "nodeType": "ExpressionStatement", - "src": "2137:73:0" - }, - { - "assignments": [ - 39, - null - ], - "declarations": [ - { - "constant": false, - "id": 39, - "mutability": "mutable", - "name": "success", - "nameLocation": "2304:7:0", - "nodeType": "VariableDeclaration", - "scope": 52, - "src": "2299:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 38, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2299:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - null - ], - "id": 46, - "initialValue": { - "arguments": [ - { - "hexValue": "", - "id": 44, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2349:2:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "id": 40, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "2317:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2327:4:0", - "memberName": "call", - "nodeType": "MemberAccess", - "src": "2317:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 43, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "id": 42, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 24, - "src": "2340:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "2317:31:0", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 45, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2317:35:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2298:54:0" - }, - { - "expression": { - "arguments": [ - { - "id": 48, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 39, - "src": "2370:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 49, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2379:60:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 47, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2362:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2362:78:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 51, - "nodeType": "ExpressionStatement", - "src": "2362:78:0" - } - ] - }, - "documentation": { - "id": 20, - "nodeType": "StructuredDocumentation", - "src": "1145:906:0", - "text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]." - }, - "id": 53, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nameLocation": "2065:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 25, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "recipient", - "nameLocation": "2091:9:0", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "2075:25:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 21, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2075:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 24, - "mutability": "mutable", - "name": "amount", - "nameLocation": "2110:6:0", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "2102:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 23, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2102:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "2074:43:0" - }, - "returnParameters": { - "id": 26, - "nodeType": "ParameterList", - "parameters": [], - "src": "2127:0:0" - }, - "scope": 295, - "src": "2056:391:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 69, - "nodeType": "Block", - "src": "3277:82:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 64, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "3305:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 65, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 58, - "src": "3313:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 66, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3319:32:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - }, - "value": "Address: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - } - ], - "id": 63, - "name": "functionCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 70, - 90 - ], - "referencedDeclaration": 90, - "src": "3292:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 67, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3292:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 62, - "id": 68, - "nodeType": "Return", - "src": "3285:67:0" - } - ] - }, - "documentation": { - "id": 54, - "nodeType": "StructuredDocumentation", - "src": "2453:730:0", - "text": " @dev Performs a Solidity function call using a low level `call`. A\n plain`call` is an unsafe replacement for a function call: use this\n function instead.\n If `target` reverts with a revert reason, it is bubbled up by this\n function (like regular Solidity function calls).\n Returns the raw returned data. To convert to the expected return value,\n use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n Requirements:\n - `target` must be a contract.\n - calling `target` with `data` must not revert.\n _Available since v3.1._" - }, - "id": 70, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nameLocation": "3197:12:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 59, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 56, - "mutability": "mutable", - "name": "target", - "nameLocation": "3218:6:0", - "nodeType": "VariableDeclaration", - "scope": 70, - "src": "3210:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 55, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3210:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 58, - "mutability": "mutable", - "name": "data", - "nameLocation": "3239:4:0", - "nodeType": "VariableDeclaration", - "scope": 70, - "src": "3226:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 57, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3226:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "3209:35:0" - }, - "returnParameters": { - "id": 62, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 61, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 70, - "src": "3263:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 60, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3263:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "3262:14:0" - }, - "scope": 295, - "src": "3188:171:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 89, - "nodeType": "Block", - "src": "3698:76:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 83, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "3737:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 84, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 75, - "src": "3745:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "30", - "id": 85, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3751:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "id": 86, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 77, - "src": "3754:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 82, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 110, - 160 - ], - "referencedDeclaration": 160, - "src": "3715:21:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 87, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3715:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 81, - "id": 88, - "nodeType": "Return", - "src": "3708:59:0" - } - ] - }, - "documentation": { - "id": 71, - "nodeType": "StructuredDocumentation", - "src": "3365:211:0", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 90, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nameLocation": "3590:12:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 78, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 73, - "mutability": "mutable", - "name": "target", - "nameLocation": "3611:6:0", - "nodeType": "VariableDeclaration", - "scope": 90, - "src": "3603:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 72, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3603:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 75, - "mutability": "mutable", - "name": "data", - "nameLocation": "3632:4:0", - "nodeType": "VariableDeclaration", - "scope": 90, - "src": "3619:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 74, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3619:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 77, - "mutability": "mutable", - "name": "errorMessage", - "nameLocation": "3652:12:0", - "nodeType": "VariableDeclaration", - "scope": 90, - "src": "3638:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 76, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3638:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "3602:63:0" - }, - "returnParameters": { - "id": 81, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 80, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 90, - "src": "3684:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 79, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3684:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "3683:14:0" - }, - "scope": 295, - "src": "3581:193:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 109, - "nodeType": "Block", - "src": "4249:111:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 103, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 93, - "src": "4288:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 104, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 95, - "src": "4296:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 105, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 97, - "src": "4302:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564", - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4309:43:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - }, - "value": "Address: low-level call with value failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - } - ], - "id": 102, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 110, - 160 - ], - "referencedDeclaration": 160, - "src": "4266:21:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4266:87:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 101, - "id": 108, - "nodeType": "Return", - "src": "4259:94:0" - } - ] - }, - "documentation": { - "id": 91, - "nodeType": "StructuredDocumentation", - "src": "3780:351:0", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but also transferring `value` wei to `target`.\n Requirements:\n - the calling contract must have an ETH balance of at least `value`.\n - the called Solidity function must be `payable`.\n _Available since v3.1._" - }, - "id": 110, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nameLocation": "4145:21:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 98, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 93, - "mutability": "mutable", - "name": "target", - "nameLocation": "4175:6:0", - "nodeType": "VariableDeclaration", - "scope": 110, - "src": "4167:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 92, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4167:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 95, - "mutability": "mutable", - "name": "data", - "nameLocation": "4196:4:0", - "nodeType": "VariableDeclaration", - "scope": 110, - "src": "4183:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 94, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4183:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 97, - "mutability": "mutable", - "name": "value", - "nameLocation": "4210:5:0", - "nodeType": "VariableDeclaration", - "scope": 110, - "src": "4202:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 96, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4202:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "4166:50:0" - }, - "returnParameters": { - "id": 101, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 100, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 110, - "src": "4235:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 99, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4235:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "4234:14:0" - }, - "scope": 295, - "src": "4136:224:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 159, - "nodeType": "Block", - "src": "4749:382:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "arguments": [ - { - "id": 127, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "4775:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$295", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$295", - "typeString": "library Address" - } - ], - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4767:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 125, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4767:7:0", - "typeDescriptions": {} - } - }, - "id": 128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4767:13:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4781:7:0", - "memberName": "balance", - "nodeType": "MemberAccess", - "src": "4767:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 130, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 117, - "src": "4792:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4767:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c", - "id": 132, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4799:40:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - }, - "value": "Address: insufficient balance for call" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - } - ], - "id": 124, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "4759:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4759:81:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 134, - "nodeType": "ExpressionStatement", - "src": "4759:81:0" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 137, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "4869:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 136, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "4858:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4858:18:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4878:31:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - }, - "value": "Address: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - } - ], - "id": 135, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "4850:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4850:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 141, - "nodeType": "ExpressionStatement", - "src": "4850:60:0" - }, - { - "assignments": [ - 143, - 145 - ], - "declarations": [ - { - "constant": false, - "id": 143, - "mutability": "mutable", - "name": "success", - "nameLocation": "4986:7:0", - "nodeType": "VariableDeclaration", - "scope": 159, - "src": "4981:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 142, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4981:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 145, - "mutability": "mutable", - "name": "returndata", - "nameLocation": "5008:10:0", - "nodeType": "VariableDeclaration", - "scope": 159, - "src": "4995:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 144, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4995:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 152, - "initialValue": { - "arguments": [ - { - "id": 150, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "5050:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 146, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "5022:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "5029:4:0", - "memberName": "call", - "nodeType": "MemberAccess", - "src": "5022:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "id": 148, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 117, - "src": "5042:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "5022:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 151, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "5022:33:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4980:75:0" - }, - { - "expression": { - "arguments": [ - { - "id": 154, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "5090:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "id": 155, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "5099:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 156, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 119, - "src": "5111:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 153, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 294, - "src": "5072:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "5072:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 123, - "id": 158, - "nodeType": "Return", - "src": "5065:59:0" - } - ] - }, - "documentation": { - "id": 111, - "nodeType": "StructuredDocumentation", - "src": "4366:237:0", - "text": " @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n with `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 160, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nameLocation": "4617:21:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 120, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 113, - "mutability": "mutable", - "name": "target", - "nameLocation": "4647:6:0", - "nodeType": "VariableDeclaration", - "scope": 160, - "src": "4639:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 112, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4639:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 115, - "mutability": "mutable", - "name": "data", - "nameLocation": "4668:4:0", - "nodeType": "VariableDeclaration", - "scope": 160, - "src": "4655:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 114, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4655:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 117, - "mutability": "mutable", - "name": "value", - "nameLocation": "4682:5:0", - "nodeType": "VariableDeclaration", - "scope": 160, - "src": "4674:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 116, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4674:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 119, - "mutability": "mutable", - "name": "errorMessage", - "nameLocation": "4703:12:0", - "nodeType": "VariableDeclaration", - "scope": 160, - "src": "4689:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 118, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4689:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "4638:78:0" - }, - "returnParameters": { - "id": 123, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 160, - "src": "4735:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 121, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4735:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "4734:14:0" - }, - "scope": 295, - "src": "4608:523:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 176, - "nodeType": "Block", - "src": "5408:97:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 171, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "5444:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 172, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "5452:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564", - "id": 173, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5458:39:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - }, - "value": "Address: low-level static call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - } - ], - "id": 170, - "name": "functionStaticCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 177, - 212 - ], - "referencedDeclaration": 212, - "src": "5425:18:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) view returns (bytes memory)" - } - }, - "id": 174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "5425:73:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 169, - "id": 175, - "nodeType": "Return", - "src": "5418:80:0" - } - ] - }, - "documentation": { - "id": 161, - "nodeType": "StructuredDocumentation", - "src": "5137:166:0", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 177, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionStaticCall", - "nameLocation": "5317:18:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 163, - "mutability": "mutable", - "name": "target", - "nameLocation": "5344:6:0", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "5336:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 162, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5336:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 165, - "mutability": "mutable", - "name": "data", - "nameLocation": "5365:4:0", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "5352:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 164, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5352:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "5335:35:0" - }, - "returnParameters": { - "id": 169, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 168, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "5394:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 167, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5394:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "5393:14:0" - }, - "scope": 295, - "src": "5308:197:0", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 211, - "nodeType": "Block", - "src": "5817:288:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 191, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "5846:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 190, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "5835:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "5835:18:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5855:38:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - }, - "value": "Address: static call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - } - ], - "id": 189, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "5827:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "5827:67:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 195, - "nodeType": "ExpressionStatement", - "src": "5827:67:0" - }, - { - "assignments": [ - 197, - 199 - ], - "declarations": [ - { - "constant": false, - "id": 197, - "mutability": "mutable", - "name": "success", - "nameLocation": "5970:7:0", - "nodeType": "VariableDeclaration", - "scope": 211, - "src": "5965:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 196, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5965:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 199, - "mutability": "mutable", - "name": "returndata", - "nameLocation": "5992:10:0", - "nodeType": "VariableDeclaration", - "scope": 211, - "src": "5979:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 198, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5979:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 204, - "initialValue": { - "arguments": [ - { - "id": 202, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 182, - "src": "6024:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 200, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "6006:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "6013:10:0", - "memberName": "staticcall", - "nodeType": "MemberAccess", - "src": "6006:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) view returns (bool,bytes memory)" - } - }, - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "6006:23:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5964:65:0" - }, - { - "expression": { - "arguments": [ - { - "id": 206, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "6064:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "id": 207, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "6073:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 208, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 184, - "src": "6085:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 205, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 294, - "src": "6046:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "6046:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 188, - "id": 210, - "nodeType": "Return", - "src": "6039:59:0" - } - ] - }, - "documentation": { - "id": 178, - "nodeType": "StructuredDocumentation", - "src": "5511:173:0", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 212, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionStaticCall", - "nameLocation": "5698:18:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 185, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 180, - "mutability": "mutable", - "name": "target", - "nameLocation": "5725:6:0", - "nodeType": "VariableDeclaration", - "scope": 212, - "src": "5717:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 179, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5717:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 182, - "mutability": "mutable", - "name": "data", - "nameLocation": "5746:4:0", - "nodeType": "VariableDeclaration", - "scope": 212, - "src": "5733:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 181, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5733:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 184, - "mutability": "mutable", - "name": "errorMessage", - "nameLocation": "5766:12:0", - "nodeType": "VariableDeclaration", - "scope": 212, - "src": "5752:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 183, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5752:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "5716:63:0" - }, - "returnParameters": { - "id": 188, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 187, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 212, - "src": "5803:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 186, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5803:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "5802:14:0" - }, - "scope": 295, - "src": "5689:416:0", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 228, - "nodeType": "Block", - "src": "6381:101:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 223, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 215, - "src": "6419:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 224, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 217, - "src": "6427:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6433:41:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398", - "typeString": "literal_string \"Address: low-level delegate call failed\"" - }, - "value": "Address: low-level delegate call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398", - "typeString": "literal_string \"Address: low-level delegate call failed\"" - } - ], - "id": 222, - "name": "functionDelegateCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 229, - 264 - ], - "referencedDeclaration": 264, - "src": "6398:20:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "6398:77:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 221, - "id": 227, - "nodeType": "Return", - "src": "6391:84:0" - } - ] - }, - "documentation": { - "id": 213, - "nodeType": "StructuredDocumentation", - "src": "6111:168:0", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._" - }, - "id": 229, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionDelegateCall", - "nameLocation": "6293:20:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 218, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 215, - "mutability": "mutable", - "name": "target", - "nameLocation": "6322:6:0", - "nodeType": "VariableDeclaration", - "scope": 229, - "src": "6314:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 214, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6314:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 217, - "mutability": "mutable", - "name": "data", - "nameLocation": "6343:4:0", - "nodeType": "VariableDeclaration", - "scope": 229, - "src": "6330:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 216, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6330:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "6313:35:0" - }, - "returnParameters": { - "id": 221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 220, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 229, - "src": "6367:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 219, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6367:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "6366:14:0" - }, - "scope": 295, - "src": "6284:198:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 263, - "nodeType": "Block", - "src": "6793:292:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 243, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 232, - "src": "6822:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 242, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "6811:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "6811:18:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 245, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6831:40:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520", - "typeString": "literal_string \"Address: delegate call to non-contract\"" - }, - "value": "Address: delegate call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520", - "typeString": "literal_string \"Address: delegate call to non-contract\"" - } - ], - "id": 241, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "6803:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "6803:69:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 247, - "nodeType": "ExpressionStatement", - "src": "6803:69:0" - }, - { - "assignments": [ - 249, - 251 - ], - "declarations": [ - { - "constant": false, - "id": 249, - "mutability": "mutable", - "name": "success", - "nameLocation": "6948:7:0", - "nodeType": "VariableDeclaration", - "scope": 263, - "src": "6943:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 248, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6943:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 251, - "mutability": "mutable", - "name": "returndata", - "nameLocation": "6970:10:0", - "nodeType": "VariableDeclaration", - "scope": 263, - "src": "6957:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 250, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6957:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 256, - "initialValue": { - "arguments": [ - { - "id": 254, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 234, - "src": "7004:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 252, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 232, - "src": "6984:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "6991:12:0", - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "src": "6984:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "6984:25:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6942:67:0" - }, - { - "expression": { - "arguments": [ - { - "id": 258, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "7044:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "id": 259, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "7053:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 260, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "7065:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 257, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 294, - "src": "7026:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "7026:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 240, - "id": 262, - "nodeType": "Return", - "src": "7019:59:0" - } - ] - }, - "documentation": { - "id": 230, - "nodeType": "StructuredDocumentation", - "src": "6488:175:0", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._" - }, - "id": 264, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionDelegateCall", - "nameLocation": "6677:20:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 237, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 232, - "mutability": "mutable", - "name": "target", - "nameLocation": "6706:6:0", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "6698:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 231, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6698:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 234, - "mutability": "mutable", - "name": "data", - "nameLocation": "6727:4:0", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "6714:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 233, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6714:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 236, - "mutability": "mutable", - "name": "errorMessage", - "nameLocation": "6747:12:0", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "6733:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 235, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6733:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "6697:63:0" - }, - "returnParameters": { - "id": 240, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 239, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "6779:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 238, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6779:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "6778:14:0" - }, - "scope": 295, - "src": "6668:417:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 293, - "nodeType": "Block", - "src": "7220:596:0", - "statements": [ - { - "condition": { - "id": 275, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "7234:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 291, - "nodeType": "Block", - "src": "7291:519:0", - "statements": [ - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 279, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "7375:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "7386:6:0", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "7375:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7395:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7375:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 289, - "nodeType": "Block", - "src": "7747:53:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 286, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 270, - "src": "7772:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 285, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967277, - 4294967277 - ], - "referencedDeclaration": 4294967277, - "src": "7765:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "7765:20:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 288, - "nodeType": "ExpressionStatement", - "src": "7765:20:0" - } - ] - }, - "id": 290, - "nodeType": "IfStatement", - "src": "7371:429:0", - "trueBody": { - "id": 284, - "nodeType": "Block", - "src": "7398:343:0", - "statements": [ - { - "AST": { - "nodeType": "YulBlock", - "src": "7582:145:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "7604:40:0", - "value": { - "arguments": [ - { - "name": "returndata", - "nodeType": "YulIdentifier", - "src": "7633:10:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "7627:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "7627:17:0" - }, - "variables": [ - { - "name": "returndata_size", - "nodeType": "YulTypedName", - "src": "7608:15:0", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7676:2:0", - "type": "", - "value": "32" - }, - { - "name": "returndata", - "nodeType": "YulIdentifier", - "src": "7680:10:0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7672:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "7672:19:0" - }, - { - "name": "returndata_size", - "nodeType": "YulIdentifier", - "src": "7693:15:0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "7665:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "7665:44:0" - }, - "nodeType": "YulExpressionStatement", - "src": "7665:44:0" - } - ] - }, - "evmVersion": "paris", - "externalReferences": [ - { - "declaration": 268, - "isOffset": false, - "isSlot": false, - "src": "7633:10:0", - "valueSize": 1 - }, - { - "declaration": 268, - "isOffset": false, - "isSlot": false, - "src": "7680:10:0", - "valueSize": 1 - } - ], - "id": 283, - "nodeType": "InlineAssembly", - "src": "7573:154:0" - } - ] - } - } - ] - }, - "id": 292, - "nodeType": "IfStatement", - "src": "7230:580:0", - "trueBody": { - "id": 278, - "nodeType": "Block", - "src": "7243:42:0", - "statements": [ - { - "expression": { - "id": 276, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "7264:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 274, - "id": 277, - "nodeType": "Return", - "src": "7257:17:0" - } - ] - } - } - ] - }, - "id": 294, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_verifyCallResult", - "nameLocation": "7100:17:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 271, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 266, - "mutability": "mutable", - "name": "success", - "nameLocation": "7123:7:0", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "7118:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 265, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7118:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 268, - "mutability": "mutable", - "name": "returndata", - "nameLocation": "7145:10:0", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "7132:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 267, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7132:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 270, - "mutability": "mutable", - "name": "errorMessage", - "nameLocation": "7171:12:0", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "7157:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 269, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7157:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "7117:67:0" - }, - "returnParameters": { - "id": 274, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 273, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "7206:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 272, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7206:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "7205:14:0" - }, - "scope": 295, - "src": "7091:725:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "private" - } - ], - "scope": 1008, - "src": "134:7684:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "IERC20", - "contractDependencies": [], - "contractKind": "interface", - "documentation": { - "id": 296, - "nodeType": "StructuredDocumentation", - "src": "7820:70:0", - "text": " @dev Interface of the ERC20 standard as defined in the EIP." - }, - "fullyImplemented": false, - "id": 371, - "linearizedBaseContracts": [ - 371 - ], - "name": "IERC20", - "nameLocation": "7901:6:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "documentation": { - "id": 297, - "nodeType": "StructuredDocumentation", - "src": "7914:66:0", - "text": " @dev Returns the amount of tokens in existence." - }, - "functionSelector": "18160ddd", - "id": 302, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nameLocation": "7994:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 298, - "nodeType": "ParameterList", - "parameters": [], - "src": "8005:2:0" - }, - "returnParameters": { - "id": 301, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 300, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 302, - "src": "8031:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 299, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8031:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8030:9:0" - }, - "scope": 371, - "src": "7985:55:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 303, - "nodeType": "StructuredDocumentation", - "src": "8046:72:0", - "text": " @dev Returns the amount of tokens owned by `account`." - }, - "functionSelector": "70a08231", - "id": 310, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nameLocation": "8132:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 306, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 305, - "mutability": "mutable", - "name": "account", - "nameLocation": "8150:7:0", - "nodeType": "VariableDeclaration", - "scope": 310, - "src": "8142:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 304, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8142:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "8141:17:0" - }, - "returnParameters": { - "id": 309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 308, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 310, - "src": "8182:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 307, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8182:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8181:9:0" - }, - "scope": 371, - "src": "8123:68:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 311, - "nodeType": "StructuredDocumentation", - "src": "8197:209:0", - "text": " @dev Moves `amount` tokens from the caller's account to `recipient`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." - }, - "functionSelector": "a9059cbb", - "id": 320, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nameLocation": "8420:8:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 316, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 313, - "mutability": "mutable", - "name": "recipient", - "nameLocation": "8437:9:0", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "8429:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 312, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8429:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 315, - "mutability": "mutable", - "name": "amount", - "nameLocation": "8456:6:0", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "8448:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 314, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8448:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8428:35:0" - }, - "returnParameters": { - "id": 319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 318, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "8482:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 317, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8482:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "8481:6:0" - }, - "scope": 371, - "src": "8411:77:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 321, - "nodeType": "StructuredDocumentation", - "src": "8494:264:0", - "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called." - }, - "functionSelector": "dd62ed3e", - "id": 330, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nameLocation": "8772:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 326, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 323, - "mutability": "mutable", - "name": "owner", - "nameLocation": "8790:5:0", - "nodeType": "VariableDeclaration", - "scope": 330, - "src": "8782:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 322, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8782:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 325, - "mutability": "mutable", - "name": "spender", - "nameLocation": "8805:7:0", - "nodeType": "VariableDeclaration", - "scope": 330, - "src": "8797:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 324, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8797:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "8781:32:0" - }, - "returnParameters": { - "id": 329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 328, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 330, - "src": "8837:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 327, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8837:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8836:9:0" - }, - "scope": 371, - "src": "8763:83:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 331, - "nodeType": "StructuredDocumentation", - "src": "8852:642:0", - "text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event." - }, - "functionSelector": "095ea7b3", - "id": 340, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nameLocation": "9508:7:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 336, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 333, - "mutability": "mutable", - "name": "spender", - "nameLocation": "9524:7:0", - "nodeType": "VariableDeclaration", - "scope": 340, - "src": "9516:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 332, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9516:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 335, - "mutability": "mutable", - "name": "amount", - "nameLocation": "9541:6:0", - "nodeType": "VariableDeclaration", - "scope": 340, - "src": "9533:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 334, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9533:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "9515:33:0" - }, - "returnParameters": { - "id": 339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 338, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 340, - "src": "9567:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 337, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9567:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "9566:6:0" - }, - "scope": 371, - "src": "9499:74:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 341, - "nodeType": "StructuredDocumentation", - "src": "9579:296:0", - "text": " @dev Moves `amount` tokens from `sender` to `recipient` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." - }, - "functionSelector": "23b872dd", - "id": 352, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nameLocation": "9889:12:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 343, - "mutability": "mutable", - "name": "sender", - "nameLocation": "9910:6:0", - "nodeType": "VariableDeclaration", - "scope": 352, - "src": "9902:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 342, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9902:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 345, - "mutability": "mutable", - "name": "recipient", - "nameLocation": "9926:9:0", - "nodeType": "VariableDeclaration", - "scope": 352, - "src": "9918:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 344, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9918:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 347, - "mutability": "mutable", - "name": "amount", - "nameLocation": "9945:6:0", - "nodeType": "VariableDeclaration", - "scope": 352, - "src": "9937:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 346, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9937:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "9901:51:0" - }, - "returnParameters": { - "id": 351, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 350, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 352, - "src": "9971:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 349, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9971:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "9970:6:0" - }, - "scope": 371, - "src": "9880:97:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": { - "id": 353, - "nodeType": "StructuredDocumentation", - "src": "9983:158:0", - "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero." - }, - "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "id": 361, - "name": "Transfer", - "nameLocation": "10152:8:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 360, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 355, - "indexed": true, - "mutability": "mutable", - "name": "from", - "nameLocation": "10177:4:0", - "nodeType": "VariableDeclaration", - "scope": 361, - "src": "10161:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 354, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10161:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 357, - "indexed": true, - "mutability": "mutable", - "name": "to", - "nameLocation": "10199:2:0", - "nodeType": "VariableDeclaration", - "scope": 361, - "src": "10183:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 356, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10183:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 359, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nameLocation": "10211:5:0", - "nodeType": "VariableDeclaration", - "scope": 361, - "src": "10203:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 358, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10203:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "10160:57:0" - }, - "src": "10146:72:0" - }, - { - "anonymous": false, - "documentation": { - "id": 362, - "nodeType": "StructuredDocumentation", - "src": "10224:148:0", - "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance." - }, - "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", - "id": 370, - "name": "Approval", - "nameLocation": "10383:8:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 369, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 364, - "indexed": true, - "mutability": "mutable", - "name": "owner", - "nameLocation": "10408:5:0", - "nodeType": "VariableDeclaration", - "scope": 370, - "src": "10392:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 363, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10392:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 366, - "indexed": true, - "mutability": "mutable", - "name": "spender", - "nameLocation": "10431:7:0", - "nodeType": "VariableDeclaration", - "scope": 370, - "src": "10415:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 365, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10415:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 368, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nameLocation": "10448:5:0", - "nodeType": "VariableDeclaration", - "scope": 370, - "src": "10440:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 367, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10440:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "10391:63:0" - }, - "src": "10377:78:0" - } - ], - "scope": 1008, - "src": "7891:2566:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "SafeERC20", - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 372, - "nodeType": "StructuredDocumentation", - "src": "10459:457:0", - "text": " @title SafeERC20\n @dev Wrappers around ERC20 operations that throw on failure (when the token\n contract returns false). Tokens that return no value (and instead revert or\n throw on failure) are also supported, non-reverting calls are assumed to be\n successful.\n To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n which allows you to call the safe operations as `token.safeTransfer(...)`, etc." - }, - "fullyImplemented": true, - "id": 590, - "linearizedBaseContracts": [ - 590 - ], - "name": "SafeERC20", - "nameLocation": "10925:9:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "global": false, - "id": 375, - "libraryName": { - "id": 373, - "name": "Address", - "nameLocations": [ - "10947:7:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 295, - "src": "10947:7:0" - }, - "nodeType": "UsingForDirective", - "src": "10941:26:0", - "typeName": { - "id": 374, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10959:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 397, - "nodeType": "Block", - "src": "11045:103:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 386, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 378, - "src": "11075:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 389, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 378, - "src": "11105:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "11111:8:0", - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 320, - "src": "11105:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "11120:8:0", - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "11105:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 392, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 380, - "src": "11130:2:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 393, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 382, - "src": "11134:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 387, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "11082:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "11086:18:0", - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "11082:22:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "11082:58:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 385, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "11055:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$371_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "11055:86:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 396, - "nodeType": "ExpressionStatement", - "src": "11055:86:0" - } - ] - }, - "id": 398, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nameLocation": "10982:12:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 383, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 378, - "mutability": "mutable", - "name": "token", - "nameLocation": "11002:5:0", - "nodeType": "VariableDeclaration", - "scope": 398, - "src": "10995:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 377, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 376, - "name": "IERC20", - "nameLocations": [ - "10995:6:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 371, - "src": "10995:6:0" - }, - "referencedDeclaration": 371, - "src": "10995:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 380, - "mutability": "mutable", - "name": "to", - "nameLocation": "11017:2:0", - "nodeType": "VariableDeclaration", - "scope": 398, - "src": "11009:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 379, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11009:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 382, - "mutability": "mutable", - "name": "value", - "nameLocation": "11029:5:0", - "nodeType": "VariableDeclaration", - "scope": 398, - "src": "11021:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 381, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11021:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "10994:41:0" - }, - "returnParameters": { - "id": 384, - "nodeType": "ParameterList", - "parameters": [], - "src": "11045:0:0" - }, - "scope": 590, - "src": "10973:175:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 423, - "nodeType": "Block", - "src": "11244:113:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 411, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 401, - "src": "11274:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 414, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 401, - "src": "11304:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "11310:12:0", - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 352, - "src": "11304:18:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "11323:8:0", - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "11304:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 417, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 403, - "src": "11333:4:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 418, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 405, - "src": "11339:2:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 419, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 407, - "src": "11343:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 412, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "11281:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 413, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "11285:18:0", - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "11281:22:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "11281:68:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 410, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "11254:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$371_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "11254:96:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 422, - "nodeType": "ExpressionStatement", - "src": "11254:96:0" - } - ] - }, - "id": 424, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nameLocation": "11163:16:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 408, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 401, - "mutability": "mutable", - "name": "token", - "nameLocation": "11187:5:0", - "nodeType": "VariableDeclaration", - "scope": 424, - "src": "11180:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 400, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 399, - "name": "IERC20", - "nameLocations": [ - "11180:6:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 371, - "src": "11180:6:0" - }, - "referencedDeclaration": 371, - "src": "11180:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 403, - "mutability": "mutable", - "name": "from", - "nameLocation": "11202:4:0", - "nodeType": "VariableDeclaration", - "scope": 424, - "src": "11194:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 402, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11194:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 405, - "mutability": "mutable", - "name": "to", - "nameLocation": "11216:2:0", - "nodeType": "VariableDeclaration", - "scope": 424, - "src": "11208:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 404, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11208:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 407, - "mutability": "mutable", - "name": "value", - "nameLocation": "11228:5:0", - "nodeType": "VariableDeclaration", - "scope": 424, - "src": "11220:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 406, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11220:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "11179:55:0" - }, - "returnParameters": { - "id": 409, - "nodeType": "ParameterList", - "parameters": [], - "src": "11244:0:0" - }, - "scope": 590, - "src": "11154:203:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 467, - "nodeType": "Block", - "src": "11693:537:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 436, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 432, - "src": "11982:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "hexValue": "30", - "id": 437, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11991:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11982:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 439, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11981:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 444, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "12022:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$590", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$590", - "typeString": "library SafeERC20" - } - ], - "id": 443, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12014:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 442, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12014:7:0", - "typeDescriptions": {} - } - }, - "id": 445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12014:13:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 446, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "12029:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 440, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 428, - "src": "11998:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12004:9:0", - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 330, - "src": "11998:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "11998:39:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "hexValue": "30", - "id": 448, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12041:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11998:44:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 450, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11997:46:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11981:62:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 452, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12057:56:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 435, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "11973:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "11973:150:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 454, - "nodeType": "ExpressionStatement", - "src": "11973:150:0" - }, - { - "expression": { - "arguments": [ - { - "id": 456, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 428, - "src": "12153:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 459, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 428, - "src": "12183:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12189:7:0", - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 340, - "src": "12183:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12197:8:0", - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "12183:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 462, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "12207:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 463, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 432, - "src": "12216:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 457, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "12160:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 458, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "12164:18:0", - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "12160:22:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12160:62:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 455, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "12133:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$371_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 465, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12133:90:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 466, - "nodeType": "ExpressionStatement", - "src": "12133:90:0" - } - ] - }, - "documentation": { - "id": 425, - "nodeType": "StructuredDocumentation", - "src": "11363:249:0", - "text": " @dev Deprecated. This function has issues similar to the ones found in\n {IERC20-approve}, and its usage is discouraged.\n Whenever possible, use {safeIncreaseAllowance} and\n {safeDecreaseAllowance} instead." - }, - "id": 468, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nameLocation": "11626:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 433, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 428, - "mutability": "mutable", - "name": "token", - "nameLocation": "11645:5:0", - "nodeType": "VariableDeclaration", - "scope": 468, - "src": "11638:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 427, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 426, - "name": "IERC20", - "nameLocations": [ - "11638:6:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 371, - "src": "11638:6:0" - }, - "referencedDeclaration": 371, - "src": "11638:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 430, - "mutability": "mutable", - "name": "spender", - "nameLocation": "11660:7:0", - "nodeType": "VariableDeclaration", - "scope": 468, - "src": "11652:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 429, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11652:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 432, - "mutability": "mutable", - "name": "value", - "nameLocation": "11677:5:0", - "nodeType": "VariableDeclaration", - "scope": 468, - "src": "11669:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 431, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11669:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "11637:46:0" - }, - "returnParameters": { - "id": 434, - "nodeType": "ParameterList", - "parameters": [], - "src": "11693:0:0" - }, - "scope": 590, - "src": "11617:613:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 503, - "nodeType": "Block", - "src": "12322:194:0", - "statements": [ - { - "assignments": [ - 479 - ], - "declarations": [ - { - "constant": false, - "id": 479, - "mutability": "mutable", - "name": "newAllowance", - "nameLocation": "12340:12:0", - "nodeType": "VariableDeclaration", - "scope": 503, - "src": "12332:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 478, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12332:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 490, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 484, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "12379:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$590", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$590", - "typeString": "library SafeERC20" - } - ], - "id": 483, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12371:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 482, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12371:7:0", - "typeDescriptions": {} - } - }, - "id": 485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12371:13:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 486, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 473, - "src": "12386:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 480, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "12355:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12361:9:0", - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 330, - "src": "12355:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12355:39:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "id": 488, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 475, - "src": "12397:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12355:47:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12332:70:0" - }, - { - "expression": { - "arguments": [ - { - "id": 492, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "12432:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 495, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "12462:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12468:7:0", - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 340, - "src": "12462:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12476:8:0", - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "12462:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 498, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 473, - "src": "12486:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 499, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 479, - "src": "12495:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 493, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "12439:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 494, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "12443:18:0", - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "12439:22:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12439:69:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 491, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "12412:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$371_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12412:97:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 502, - "nodeType": "ExpressionStatement", - "src": "12412:97:0" - } - ] - }, - "id": 504, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nameLocation": "12245:21:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 476, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 471, - "mutability": "mutable", - "name": "token", - "nameLocation": "12274:5:0", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "12267:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 470, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 469, - "name": "IERC20", - "nameLocations": [ - "12267:6:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 371, - "src": "12267:6:0" - }, - "referencedDeclaration": 371, - "src": "12267:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 473, - "mutability": "mutable", - "name": "spender", - "nameLocation": "12289:7:0", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "12281:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 472, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12281:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 475, - "mutability": "mutable", - "name": "value", - "nameLocation": "12306:5:0", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "12298:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 474, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12298:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "12266:46:0" - }, - "returnParameters": { - "id": 477, - "nodeType": "ParameterList", - "parameters": [], - "src": "12322:0:0" - }, - "scope": 590, - "src": "12236:280:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 550, - "nodeType": "Block", - "src": "12608:340:0", - "statements": [ - { - "assignments": [ - 515 - ], - "declarations": [ - { - "constant": false, - "id": 515, - "mutability": "mutable", - "name": "oldAllowance", - "nameLocation": "12630:12:0", - "nodeType": "VariableDeclaration", - "scope": 550, - "src": "12622:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 514, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12622:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 524, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "id": 520, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "12669:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$590", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$590", - "typeString": "library SafeERC20" - } - ], - "id": 519, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12661:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 518, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12661:7:0", - "typeDescriptions": {} - } - }, - "id": 521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12661:13:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 522, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "12676:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 516, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 507, - "src": "12645:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12651:9:0", - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 330, - "src": "12645:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12645:39:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12622:62:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 526, - "name": "oldAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 515, - "src": "12706:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 527, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 511, - "src": "12722:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12706:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 529, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12729:43:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "id": 525, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "12698:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12698:75:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 531, - "nodeType": "ExpressionStatement", - "src": "12698:75:0" - }, - { - "assignments": [ - 533 - ], - "declarations": [ - { - "constant": false, - "id": 533, - "mutability": "mutable", - "name": "newAllowance", - "nameLocation": "12795:12:0", - "nodeType": "VariableDeclaration", - "scope": 550, - "src": "12787:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 532, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12787:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 537, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 534, - "name": "oldAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 515, - "src": "12810:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "id": 535, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 511, - "src": "12825:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12810:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12787:43:0" - }, - { - "expression": { - "arguments": [ - { - "id": 539, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 507, - "src": "12864:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 542, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 507, - "src": "12894:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12900:7:0", - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 340, - "src": "12894:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12908:8:0", - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "12894:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 545, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "12918:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 546, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 533, - "src": "12927:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 540, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "12871:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 541, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "12875:18:0", - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "12871:22:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12871:69:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 538, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "12844:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$371_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12844:97:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 549, - "nodeType": "ExpressionStatement", - "src": "12844:97:0" - } - ] - }, - "id": 551, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nameLocation": "12531:21:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 512, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 507, - "mutability": "mutable", - "name": "token", - "nameLocation": "12560:5:0", - "nodeType": "VariableDeclaration", - "scope": 551, - "src": "12553:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 506, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 505, - "name": "IERC20", - "nameLocations": [ - "12553:6:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 371, - "src": "12553:6:0" - }, - "referencedDeclaration": 371, - "src": "12553:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 509, - "mutability": "mutable", - "name": "spender", - "nameLocation": "12575:7:0", - "nodeType": "VariableDeclaration", - "scope": 551, - "src": "12567:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 508, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12567:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 511, - "mutability": "mutable", - "name": "value", - "nameLocation": "12592:5:0", - "nodeType": "VariableDeclaration", - "scope": 551, - "src": "12584:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 510, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12584:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "12552:46:0" - }, - "returnParameters": { - "id": 513, - "nodeType": "ParameterList", - "parameters": [], - "src": "12608:0:0" - }, - "scope": 590, - "src": "12522:426:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 588, - "nodeType": "Block", - "src": "13401:681:0", - "statements": [ - { - "assignments": [ - 561 - ], - "declarations": [ - { - "constant": false, - "id": 561, - "mutability": "mutable", - "name": "returndata", - "nameLocation": "13763:10:0", - "nodeType": "VariableDeclaration", - "scope": 588, - "src": "13750:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 560, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13750:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 570, - "initialValue": { - "arguments": [ - { - "id": 567, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 557, - "src": "13804:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 568, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13810:34:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "expression": { - "arguments": [ - { - "id": 564, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 555, - "src": "13784:5:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - ], - "id": 563, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13776:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 562, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13776:7:0", - "typeDescriptions": {} - } - }, - "id": 565, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "13776:14:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "13791:12:0", - "memberName": "functionCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 90, - "src": "13776:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$attached_to$_t_address_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "13776:69:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13750:95:0" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 571, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 561, - "src": "13859:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "13870:6:0", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "13859:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 573, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13879:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "13859:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 587, - "nodeType": "IfStatement", - "src": "13855:221:0", - "trueBody": { - "id": 586, - "nodeType": "Block", - "src": "13882:194:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 578, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 561, - "src": "13999:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "components": [ - { - "id": 580, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14012:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": { - "id": 579, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14012:4:0", - "typeDescriptions": {} - } - } - ], - "id": 581, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14011:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "id": 576, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "13988:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "13992:6:0", - "memberName": "decode", - "nodeType": "MemberAccess", - "src": "13988:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "13988:30:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 583, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14020:44:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 575, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "13980:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "13980:85:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 585, - "nodeType": "ExpressionStatement", - "src": "13980:85:0" - } - ] - } - } - ] - }, - "documentation": { - "id": 552, - "nodeType": "StructuredDocumentation", - "src": "12954:372:0", - "text": " @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n on the return value: the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param data The call data (encoded using abi.encode or one of its variants)." - }, - "id": 589, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_callOptionalReturn", - "nameLocation": "13340:19:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 558, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 555, - "mutability": "mutable", - "name": "token", - "nameLocation": "13367:5:0", - "nodeType": "VariableDeclaration", - "scope": 589, - "src": "13360:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 554, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 553, - "name": "IERC20", - "nameLocations": [ - "13360:6:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 371, - "src": "13360:6:0" - }, - "referencedDeclaration": 371, - "src": "13360:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 557, - "mutability": "mutable", - "name": "data", - "nameLocation": "13387:4:0", - "nodeType": "VariableDeclaration", - "scope": 589, - "src": "13374:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 556, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13374:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "13359:33:0" - }, - "returnParameters": { - "id": 559, - "nodeType": "ParameterList", - "parameters": [], - "src": "13401:0:0" - }, - "scope": 590, - "src": "13331:751:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - } - ], - "scope": 1008, - "src": "10917:3167:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "HashedTimeLockContract", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 1007, - "linearizedBaseContracts": [ - 1007 - ], - "name": "HashedTimeLockContract", - "nameLocation": "14095:22:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "global": false, - "id": 594, - "libraryName": { - "id": 591, - "name": "SafeERC20", - "nameLocations": [ - "14130:9:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 590, - "src": "14130:9:0" - }, - "nodeType": "UsingForDirective", - "src": "14124:27:0", - "typeName": { - "id": 593, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 592, - "name": "IERC20", - "nameLocations": [ - "14144:6:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 371, - "src": "14144:6:0" - }, - "referencedDeclaration": 371, - "src": "14144:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - } - }, - { - "constant": false, - "functionSelector": "ec56a373", - "id": 599, - "mutability": "mutable", - "name": "contracts", - "nameLocation": "14196:9:0", - "nodeType": "VariableDeclaration", - "scope": 1007, - "src": "14156:49:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$635_storage_$", - "typeString": "mapping(bytes32 => struct HashedTimeLockContract.LockContract)" - }, - "typeName": { - "id": 598, - "keyName": "", - "keyNameLocation": "-1:-1:-1", - "keyType": { - "id": 595, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14164:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "14156:32:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$635_storage_$", - "typeString": "mapping(bytes32 => struct HashedTimeLockContract.LockContract)" - }, - "valueName": "", - "valueNameLocation": "-1:-1:-1", - "valueType": { - "id": 597, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 596, - "name": "LockContract", - "nameLocations": [ - "14175:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 635, - "src": "14175:12:0" - }, - "referencedDeclaration": 635, - "src": "14175:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract" - } - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "7fcce2a9", - "id": 602, - "mutability": "constant", - "name": "INVALID", - "nameLocation": "14350:7:0", - "nodeType": "VariableDeclaration", - "scope": 1007, - "src": "14326:35:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 600, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14326:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "30", - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14360:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "c90bd047", - "id": 605, - "mutability": "constant", - "name": "ACTIVE", - "nameLocation": "14434:6:0", - "nodeType": "VariableDeclaration", - "scope": 1007, - "src": "14410:34:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 603, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14410:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "31", - "id": 604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14443:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "94e15c8f", - "id": 608, - "mutability": "constant", - "name": "REFUNDED", - "nameLocation": "14523:8:0", - "nodeType": "VariableDeclaration", - "scope": 1007, - "src": "14499:36:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 606, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14499:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "32", - "id": 607, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14534:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "af78feef", - "id": 611, - "mutability": "constant", - "name": "WITHDRAWN", - "nameLocation": "14601:9:0", - "nodeType": "VariableDeclaration", - "scope": 1007, - "src": "14577:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 609, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14577:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "33", - "id": 610, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14613:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "414ac85b", - "id": 614, - "mutability": "constant", - "name": "EXPIRED", - "nameLocation": "14681:7:0", - "nodeType": "VariableDeclaration", - "scope": 1007, - "src": "14657:35:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 612, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14657:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "34", - "id": 613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14691:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - }, - "visibility": "public" - }, - { - "canonicalName": "HashedTimeLockContract.LockContract", - "id": 635, - "members": [ - { - "constant": false, - "id": 616, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "14778:11:0", - "nodeType": "VariableDeclaration", - "scope": 635, - "src": "14770:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 615, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14770:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 618, - "mutability": "mutable", - "name": "outputAmount", - "nameLocation": "14807:12:0", - "nodeType": "VariableDeclaration", - "scope": 635, - "src": "14799:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 617, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14799:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 620, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "14837:10:0", - "nodeType": "VariableDeclaration", - "scope": 635, - "src": "14829:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 619, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14829:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 622, - "mutability": "mutable", - "name": "status", - "nameLocation": "14865:6:0", - "nodeType": "VariableDeclaration", - "scope": 635, - "src": "14857:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 621, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14857:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 624, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "14889:8:0", - "nodeType": "VariableDeclaration", - "scope": 635, - "src": "14881:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 623, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14881:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 626, - "mutability": "mutable", - "name": "tokenAddress", - "nameLocation": "14915:12:0", - "nodeType": "VariableDeclaration", - "scope": 635, - "src": "14907:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 625, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14907:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 628, - "mutability": "mutable", - "name": "sender", - "nameLocation": "14945:6:0", - "nodeType": "VariableDeclaration", - "scope": 635, - "src": "14937:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 627, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14937:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 630, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "14969:8:0", - "nodeType": "VariableDeclaration", - "scope": 635, - "src": "14961:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 629, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14961:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 632, - "mutability": "mutable", - "name": "outputNetwork", - "nameLocation": "14994:13:0", - "nodeType": "VariableDeclaration", - "scope": 635, - "src": "14987:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 631, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "14987:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 634, - "mutability": "mutable", - "name": "outputAddress", - "nameLocation": "15024:13:0", - "nodeType": "VariableDeclaration", - "scope": 635, - "src": "15017:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 633, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "15017:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "name": "LockContract", - "nameLocation": "14747:12:0", - "nodeType": "StructDefinition", - "scope": 1007, - "src": "14740:304:0", - "visibility": "public" - }, - { - "anonymous": false, - "eventSelector": "bab3eb11a71b2cd82a010d4d5b2c3df5cd25ee8c9f1a75baff879a1b87942cb8", - "id": 649, - "name": "Withdraw", - "nameLocation": "15056:8:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 648, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 637, - "indexed": false, - "mutability": "mutable", - "name": "id", - "nameLocation": "15082:2:0", - "nodeType": "VariableDeclaration", - "scope": 649, - "src": "15074:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 636, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15074:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 639, - "indexed": false, - "mutability": "mutable", - "name": "secret", - "nameLocation": "15102:6:0", - "nodeType": "VariableDeclaration", - "scope": 649, - "src": "15094:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 638, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15094:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 641, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "15126:8:0", - "nodeType": "VariableDeclaration", - "scope": 649, - "src": "15118:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 640, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15118:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 643, - "indexed": true, - "mutability": "mutable", - "name": "tokenAddress", - "nameLocation": "15160:12:0", - "nodeType": "VariableDeclaration", - "scope": 649, - "src": "15144:28:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 642, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15144:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 645, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nameLocation": "15198:6:0", - "nodeType": "VariableDeclaration", - "scope": 649, - "src": "15182:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 644, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15182:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 647, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "15230:8:0", - "nodeType": "VariableDeclaration", - "scope": 649, - "src": "15214:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 646, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15214:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "15064:180:0" - }, - "src": "15050:195:0" - }, - { - "anonymous": false, - "eventSelector": "0d4cdc2fe2a785f03bf5481e13bee5cdcb7743166bcadafebfd3f09db6108117", - "id": 661, - "name": "Refund", - "nameLocation": "15257:6:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 660, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 651, - "indexed": false, - "mutability": "mutable", - "name": "id", - "nameLocation": "15281:2:0", - "nodeType": "VariableDeclaration", - "scope": 661, - "src": "15273:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 650, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15273:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 653, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "15301:8:0", - "nodeType": "VariableDeclaration", - "scope": 661, - "src": "15293:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 652, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15293:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 655, - "indexed": true, - "mutability": "mutable", - "name": "tokenAddress", - "nameLocation": "15335:12:0", - "nodeType": "VariableDeclaration", - "scope": 661, - "src": "15319:28:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 654, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15319:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 657, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nameLocation": "15373:6:0", - "nodeType": "VariableDeclaration", - "scope": 661, - "src": "15357:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 656, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15357:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 659, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "15405:8:0", - "nodeType": "VariableDeclaration", - "scope": 661, - "src": "15389:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 658, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15389:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "15263:156:0" - }, - "src": "15251:169:0" - }, - { - "anonymous": false, - "eventSelector": "448581ece7da63e54a320119f9f2b80c868a954c441e70c88ecdfc9591975124", - "id": 683, - "name": "NewContract", - "nameLocation": "15432:11:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 682, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 663, - "indexed": false, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "15461:11:0", - "nodeType": "VariableDeclaration", - "scope": 683, - "src": "15453:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 662, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15453:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 665, - "indexed": false, - "mutability": "mutable", - "name": "outputAmount", - "nameLocation": "15490:12:0", - "nodeType": "VariableDeclaration", - "scope": 683, - "src": "15482:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 664, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15482:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 667, - "indexed": false, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "15520:10:0", - "nodeType": "VariableDeclaration", - "scope": 683, - "src": "15512:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 666, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15512:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 669, - "indexed": false, - "mutability": "mutable", - "name": "id", - "nameLocation": "15548:2:0", - "nodeType": "VariableDeclaration", - "scope": 683, - "src": "15540:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 668, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15540:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 671, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "15568:8:0", - "nodeType": "VariableDeclaration", - "scope": 683, - "src": "15560:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 670, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15560:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 673, - "indexed": true, - "mutability": "mutable", - "name": "tokenAddress", - "nameLocation": "15602:12:0", - "nodeType": "VariableDeclaration", - "scope": 683, - "src": "15586:28:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 672, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15586:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 675, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nameLocation": "15640:6:0", - "nodeType": "VariableDeclaration", - "scope": 683, - "src": "15624:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 674, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15624:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 677, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "15672:8:0", - "nodeType": "VariableDeclaration", - "scope": 683, - "src": "15656:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 676, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15656:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 679, - "indexed": false, - "mutability": "mutable", - "name": "outputNetwork", - "nameLocation": "15697:13:0", - "nodeType": "VariableDeclaration", - "scope": 683, - "src": "15690:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 678, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "15690:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 681, - "indexed": false, - "mutability": "mutable", - "name": "outputAddress", - "nameLocation": "15727:13:0", - "nodeType": "VariableDeclaration", - "scope": 683, - "src": "15720:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 680, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "15720:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "15443:303:0" - }, - "src": "15426:321:0" - }, - { - "body": { - "id": 787, - "nodeType": "Block", - "src": "16036:1089:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 703, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 689, - "src": "16054:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "expression": { - "id": 704, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "16067:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 705, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "16073:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "16067:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16054:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16084:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 702, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "16046:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "16046:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 709, - "nodeType": "ExpressionStatement", - "src": "16046:53:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 711, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 685, - "src": "16118:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 712, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16132:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "16118:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f414d4f554e54", - "id": 714, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16135:16:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", - "typeString": "literal_string \"INVALID_AMOUNT\"" - }, - "value": "INVALID_AMOUNT" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", - "typeString": "literal_string \"INVALID_AMOUNT\"" - } - ], - "id": 710, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "16110:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "16110:42:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 716, - "nodeType": "ExpressionStatement", - "src": "16110:42:0" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "id": 721, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "16197:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "16201:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "16197:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "arguments": [ - { - "id": 725, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "16217:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_HashedTimeLockContract_$1007", - "typeString": "contract HashedTimeLockContract" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_HashedTimeLockContract_$1007", - "typeString": "contract HashedTimeLockContract" - } - ], - "id": 724, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "16209:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 723, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16209:7:0", - "typeDescriptions": {} - } - }, - "id": 726, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "16209:13:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 727, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 685, - "src": "16224:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "arguments": [ - { - "id": 718, - "name": "tokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 693, - "src": "16170:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 717, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "16163:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$371_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 719, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "16163:20:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "16184:12:0", - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 352, - "src": "16163:33:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "16163:73:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 729, - "nodeType": "ExpressionStatement", - "src": "16163:73:0" - }, - { - "assignments": [ - 731 - ], - "declarations": [ - { - "constant": false, - "id": 731, - "mutability": "mutable", - "name": "id", - "nameLocation": "16255:2:0", - "nodeType": "VariableDeclaration", - "scope": 787, - "src": "16247:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 730, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "16247:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "id": 744, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "expression": { - "id": 735, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "16311:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "16315:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "16311:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 737, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 695, - "src": "16339:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 738, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 685, - "src": "16365:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 739, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 691, - "src": "16394:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 740, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 689, - "src": "16420:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 741, - "name": "tokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 693, - "src": "16448:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 733, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "16283:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 734, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "16287:6:0", - "memberName": "encode", - "nodeType": "MemberAccess", - "src": "16283:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 742, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "16283:191:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 732, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "16260:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "16260:224:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16247:237:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 746, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 599, - "src": "16503:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$635_storage_$", - "typeString": "mapping(bytes32 => struct HashedTimeLockContract.LockContract storage ref)" - } - }, - "id": 748, - "indexExpression": { - "id": 747, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "16513:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16503:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage", - "typeString": "struct HashedTimeLockContract.LockContract storage ref" - } - }, - "id": 749, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "16517:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 622, - "src": "16503:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 750, - "name": "INVALID", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 602, - "src": "16527:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16503:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f455849535453", - "id": 752, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16536:13:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", - "typeString": "literal_string \"SWAP_EXISTS\"" - }, - "value": "SWAP_EXISTS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", - "typeString": "literal_string \"SWAP_EXISTS\"" - } - ], - "id": 745, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "16495:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "16495:55:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 754, - "nodeType": "ExpressionStatement", - "src": "16495:55:0" - }, - { - "expression": { - "id": 771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 755, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 599, - "src": "16561:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$635_storage_$", - "typeString": "mapping(bytes32 => struct HashedTimeLockContract.LockContract storage ref)" - } - }, - "id": 757, - "indexExpression": { - "id": 756, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "16571:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16561:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage", - "typeString": "struct HashedTimeLockContract.LockContract storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "id": 759, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 685, - "src": "16603:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 760, - "name": "outputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 687, - "src": "16628:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 761, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 689, - "src": "16654:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 762, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 605, - "src": "16678:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 763, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 691, - "src": "16698:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 764, - "name": "tokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 693, - "src": "16720:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "id": 765, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "16746:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "16750:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "16746:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 767, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 695, - "src": "16770:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 768, - "name": "outputNetwork", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 697, - "src": "16792:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "id": 769, - "name": "outputAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 699, - "src": "16819:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 758, - "name": "LockContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 635, - "src": "16577:12:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_LockContract_$635_storage_ptr_$", - "typeString": "type(struct HashedTimeLockContract.LockContract storage pointer)" - } - }, - "id": 770, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "16577:265:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_memory_ptr", - "typeString": "struct HashedTimeLockContract.LockContract memory" - } - }, - "src": "16561:281:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage", - "typeString": "struct HashedTimeLockContract.LockContract storage ref" - } - }, - "id": 772, - "nodeType": "ExpressionStatement", - "src": "16561:281:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 774, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 685, - "src": "16883:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 775, - "name": "outputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 687, - "src": "16908:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 776, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 689, - "src": "16934:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 777, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "16958:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 778, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 691, - "src": "16974:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 779, - "name": "tokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 693, - "src": "16996:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "id": 780, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "17022:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17026:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "17022:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 782, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 695, - "src": "17046:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 783, - "name": "outputNetwork", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 697, - "src": "17068:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "id": 784, - "name": "outputAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 699, - "src": "17095:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 773, - "name": "NewContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 683, - "src": "16858:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,uint256,bytes32,bytes32,address,address,address,string memory,string memory)" - } - }, - "id": 785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "16858:260:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 786, - "nodeType": "EmitStatement", - "src": "16853:265:0" - } - ] - }, - "functionSelector": "d2fd8b76", - "id": 788, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "newContract", - "nameLocation": "15762:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 700, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 685, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "15791:11:0", - "nodeType": "VariableDeclaration", - "scope": 788, - "src": "15783:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 684, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15783:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 687, - "mutability": "mutable", - "name": "outputAmount", - "nameLocation": "15820:12:0", - "nodeType": "VariableDeclaration", - "scope": 788, - "src": "15812:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 686, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15812:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 689, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "15850:10:0", - "nodeType": "VariableDeclaration", - "scope": 788, - "src": "15842:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 688, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15842:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 691, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "15878:8:0", - "nodeType": "VariableDeclaration", - "scope": 788, - "src": "15870:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 690, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "15870:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 693, - "mutability": "mutable", - "name": "tokenAddress", - "nameLocation": "15904:12:0", - "nodeType": "VariableDeclaration", - "scope": 788, - "src": "15896:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 692, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15896:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 695, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "15934:8:0", - "nodeType": "VariableDeclaration", - "scope": 788, - "src": "15926:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 694, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15926:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 697, - "mutability": "mutable", - "name": "outputNetwork", - "nameLocation": "15968:13:0", - "nodeType": "VariableDeclaration", - "scope": 788, - "src": "15952:29:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 696, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "15952:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 699, - "mutability": "mutable", - "name": "outputAddress", - "nameLocation": "16007:13:0", - "nodeType": "VariableDeclaration", - "scope": 788, - "src": "15991:29:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 698, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "15991:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "15773:253:0" - }, - "returnParameters": { - "id": 701, - "nodeType": "ParameterList", - "parameters": [], - "src": "16036:0:0" - }, - "scope": 1007, - "src": "15753:1372:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 862, - "nodeType": "Block", - "src": "17198:561:0", - "statements": [ - { - "assignments": [ - 797 - ], - "declarations": [ - { - "constant": false, - "id": 797, - "mutability": "mutable", - "name": "c", - "nameLocation": "17229:1:0", - "nodeType": "VariableDeclaration", - "scope": 862, - "src": "17208:22:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract" - }, - "typeName": { - "id": 796, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 795, - "name": "LockContract", - "nameLocations": [ - "17208:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 635, - "src": "17208:12:0" - }, - "referencedDeclaration": 635, - "src": "17208:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 801, - "initialValue": { - "baseExpression": { - "id": 798, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 599, - "src": "17233:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$635_storage_$", - "typeString": "mapping(bytes32 => struct HashedTimeLockContract.LockContract storage ref)" - } - }, - "id": 800, - "indexExpression": { - "id": 799, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 790, - "src": "17243:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17233:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage", - "typeString": "struct HashedTimeLockContract.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17208:38:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 803, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17265:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 804, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17267:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 622, - "src": "17265:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 805, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 605, - "src": "17277:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17265:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f4e4f545f414354495645", - "id": 807, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17285:17:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - }, - "value": "SWAP_NOT_ACTIVE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - } - ], - "id": 802, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "17257:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17257:46:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 809, - "nodeType": "ExpressionStatement", - "src": "17257:46:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 815, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 811, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17322:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 812, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17324:10:0", - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 620, - "src": "17322:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "expression": { - "id": 813, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "17337:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17343:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "17337:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17322:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 816, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17354:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 810, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "17314:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 817, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17314:55:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 818, - "nodeType": "ExpressionStatement", - "src": "17314:55:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 820, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17401:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 821, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17403:8:0", - "memberName": "hashLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 624, - "src": "17401:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 825, - "name": "secret", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 792, - "src": "17436:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "id": 823, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "17425:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 824, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "17429:6:0", - "memberName": "encode", - "nodeType": "MemberAccess", - "src": "17425:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17425:18:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 822, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "17415:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17415:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "17401:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f534543524554", - "id": 829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17458:16:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", - "typeString": "literal_string \"INVALID_SECRET\"" - }, - "value": "INVALID_SECRET" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", - "typeString": "literal_string \"INVALID_SECRET\"" - } - ], - "id": 819, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "17380:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 830, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17380:104:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 831, - "nodeType": "ExpressionStatement", - "src": "17380:104:0" - }, - { - "expression": { - "id": 836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "id": 832, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17495:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 834, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "17497:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 622, - "src": "17495:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 835, - "name": "WITHDRAWN", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 611, - "src": "17506:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17495:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 837, - "nodeType": "ExpressionStatement", - "src": "17495:20:0" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "id": 843, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17558:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 844, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17560:8:0", - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 630, - "src": "17558:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "id": 845, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17570:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 846, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17572:11:0", - "memberName": "inputAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 616, - "src": "17570:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "arguments": [ - { - "expression": { - "id": 839, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17533:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 840, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17535:12:0", - "memberName": "tokenAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 626, - "src": "17533:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 838, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "17526:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$371_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17526:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17549:8:0", - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 320, - "src": "17526:31:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17526:58:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 848, - "nodeType": "ExpressionStatement", - "src": "17526:58:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 850, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 790, - "src": "17622:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 851, - "name": "secret", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 792, - "src": "17638:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 852, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17658:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 853, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17660:8:0", - "memberName": "hashLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 624, - "src": "17658:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 854, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17682:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 855, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17684:12:0", - "memberName": "tokenAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 626, - "src": "17682:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "id": 856, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17710:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 857, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17712:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 628, - "src": "17710:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "id": 858, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 797, - "src": "17732:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 859, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17734:8:0", - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 630, - "src": "17732:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 849, - "name": "Withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 649, - "src": "17600:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$_t_address_$returns$__$", - "typeString": "function (bytes32,bytes32,bytes32,address,address,address)" - } - }, - "id": 860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17600:152:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 861, - "nodeType": "EmitStatement", - "src": "17595:157:0" - } - ] - }, - "functionSelector": "63615149", - "id": 863, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nameLocation": "17140:8:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 793, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 790, - "mutability": "mutable", - "name": "id", - "nameLocation": "17157:2:0", - "nodeType": "VariableDeclaration", - "scope": 863, - "src": "17149:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 789, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17149:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 792, - "mutability": "mutable", - "name": "secret", - "nameLocation": "17169:6:0", - "nodeType": "VariableDeclaration", - "scope": 863, - "src": "17161:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 791, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17161:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "17148:28:0" - }, - "returnParameters": { - "id": 794, - "nodeType": "ParameterList", - "parameters": [], - "src": "17198:0:0" - }, - "scope": 1007, - "src": "17131:628:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 921, - "nodeType": "Block", - "src": "17802:352:0", - "statements": [ - { - "assignments": [ - 870 - ], - "declarations": [ - { - "constant": false, - "id": 870, - "mutability": "mutable", - "name": "c", - "nameLocation": "17833:1:0", - "nodeType": "VariableDeclaration", - "scope": 921, - "src": "17812:22:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract" - }, - "typeName": { - "id": 869, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 868, - "name": "LockContract", - "nameLocations": [ - "17812:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 635, - "src": "17812:12:0" - }, - "referencedDeclaration": 635, - "src": "17812:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 874, - "initialValue": { - "baseExpression": { - "id": 871, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 599, - "src": "17837:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$635_storage_$", - "typeString": "mapping(bytes32 => struct HashedTimeLockContract.LockContract storage ref)" - } - }, - "id": 873, - "indexExpression": { - "id": 872, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 865, - "src": "17847:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17837:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage", - "typeString": "struct HashedTimeLockContract.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17812:38:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 876, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "17869:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 877, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17871:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 622, - "src": "17869:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 878, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 605, - "src": "17881:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17869:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f4e4f545f414354495645", - "id": 880, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17889:17:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - }, - "value": "SWAP_NOT_ACTIVE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - } - ], - "id": 875, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "17861:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17861:46:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 882, - "nodeType": "ExpressionStatement", - "src": "17861:46:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 884, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "17926:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 885, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17928:10:0", - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 620, - "src": "17926:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "expression": { - "id": 886, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "17942:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "17948:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "17942:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17926:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 889, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17959:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 883, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "17918:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 890, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17918:56:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 891, - "nodeType": "ExpressionStatement", - "src": "17918:56:0" - }, - { - "expression": { - "id": 896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "id": 892, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "17985:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 894, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "17987:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 622, - "src": "17985:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 895, - "name": "REFUNDED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 608, - "src": "17996:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17985:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 897, - "nodeType": "ExpressionStatement", - "src": "17985:19:0" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "id": 903, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "18047:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 904, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18049:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 628, - "src": "18047:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "id": 905, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "18057:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 906, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18059:11:0", - "memberName": "inputAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 616, - "src": "18057:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "arguments": [ - { - "expression": { - "id": 899, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "18022:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 900, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18024:12:0", - "memberName": "tokenAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 626, - "src": "18022:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 898, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "18015:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$371_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "18015:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$371", - "typeString": "contract IERC20" - } - }, - "id": 902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18038:8:0", - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 320, - "src": "18015:31:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "18015:56:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 908, - "nodeType": "ExpressionStatement", - "src": "18015:56:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 910, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 865, - "src": "18094:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 911, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "18098:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 912, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18100:8:0", - "memberName": "hashLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 624, - "src": "18098:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 913, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "18110:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 914, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18112:12:0", - "memberName": "tokenAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 626, - "src": "18110:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "id": 915, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "18126:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 916, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18128:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 628, - "src": "18126:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "expression": { - "id": 917, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "18136:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract storage pointer" - } - }, - "id": 918, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18138:8:0", - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 630, - "src": "18136:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 909, - "name": "Refund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 661, - "src": "18087:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$_t_address_$returns$__$", - "typeString": "function (bytes32,bytes32,address,address,address)" - } - }, - "id": 919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "18087:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 920, - "nodeType": "EmitStatement", - "src": "18082:65:0" - } - ] - }, - "functionSelector": "7249fbb6", - "id": 922, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "refund", - "nameLocation": "17774:6:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 866, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 865, - "mutability": "mutable", - "name": "id", - "nameLocation": "17789:2:0", - "nodeType": "VariableDeclaration", - "scope": 922, - "src": "17781:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 864, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "17781:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "17780:12:0" - }, - "returnParameters": { - "id": 867, - "nodeType": "ParameterList", - "parameters": [], - "src": "17802:0:0" - }, - "scope": 1007, - "src": "17765:389:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 968, - "nodeType": "Block", - "src": "18268:223:0", - "statements": [ - { - "assignments": [ - 935 - ], - "declarations": [ - { - "constant": false, - "id": 935, - "mutability": "mutable", - "name": "result", - "nameLocation": "18295:6:0", - "nodeType": "VariableDeclaration", - "scope": 968, - "src": "18278:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 933, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18278:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 934, - "nodeType": "ArrayTypeName", - "src": "18278:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "visibility": "internal" - } - ], - "id": 942, - "initialValue": { - "arguments": [ - { - "expression": { - "id": 939, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "18318:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18322:6:0", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "18318:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "18304:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 936, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18308:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 937, - "nodeType": "ArrayTypeName", - "src": "18308:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "18304:25:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18278:51:0" - }, - { - "body": { - "id": 964, - "nodeType": "Block", - "src": "18393:68:0", - "statements": [ - { - "expression": { - "id": 962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 954, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 935, - "src": "18407:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 956, - "indexExpression": { - "id": 955, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 944, - "src": "18414:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18407:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "baseExpression": { - "id": 958, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "18439:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 960, - "indexExpression": { - "id": 959, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 944, - "src": "18443:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18439:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 957, - "name": "getSingleStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1006, - "src": "18423:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view returns (uint256)" - } - }, - "id": 961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "18423:27:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18407:43:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 963, - "nodeType": "ExpressionStatement", - "src": "18407:43:0" - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 947, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 944, - "src": "18364:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 948, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 925, - "src": "18372:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18376:6:0", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "18372:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18364:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 965, - "initializationExpression": { - "assignments": [ - 944 - ], - "declarations": [ - { - "constant": false, - "id": 944, - "mutability": "mutable", - "name": "index", - "nameLocation": "18353:5:0", - "nodeType": "VariableDeclaration", - "scope": 965, - "src": "18345:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 943, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18345:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 946, - "initialValue": { - "hexValue": "30", - "id": 945, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18361:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18345:17:0" - }, - "loopExpression": { - "expression": { - "id": 952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18384:7:0", - "subExpression": { - "id": 951, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 944, - "src": "18384:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 953, - "nodeType": "ExpressionStatement", - "src": "18384:7:0" - }, - "nodeType": "ForStatement", - "src": "18340:121:0" - }, - { - "expression": { - "id": 966, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 935, - "src": "18478:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "functionReturnParameters": 930, - "id": 967, - "nodeType": "Return", - "src": "18471:13:0" - } - ] - }, - "functionSelector": "2f21a663", - "id": 969, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getStatus", - "nameLocation": "18169:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 926, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 925, - "mutability": "mutable", - "name": "ids", - "nameLocation": "18196:3:0", - "nodeType": "VariableDeclaration", - "scope": 969, - "src": "18179:20:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 923, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "18179:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 924, - "nodeType": "ArrayTypeName", - "src": "18179:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "visibility": "internal" - } - ], - "src": "18178:22:0" - }, - "returnParameters": { - "id": 930, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 929, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 969, - "src": "18246:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 927, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18246:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 928, - "nodeType": "ArrayTypeName", - "src": "18246:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "visibility": "internal" - } - ], - "src": "18245:18:0" - }, - "scope": 1007, - "src": "18160:331:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 1005, - "nodeType": "Block", - "src": "18571:289:0", - "statements": [ - { - "assignments": [ - 978 - ], - "declarations": [ - { - "constant": false, - "id": 978, - "mutability": "mutable", - "name": "tempContract", - "nameLocation": "18601:12:0", - "nodeType": "VariableDeclaration", - "scope": 1005, - "src": "18581:32:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_memory_ptr", - "typeString": "struct HashedTimeLockContract.LockContract" - }, - "typeName": { - "id": 977, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 976, - "name": "LockContract", - "nameLocations": [ - "18581:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 635, - "src": "18581:12:0" - }, - "referencedDeclaration": 635, - "src": "18581:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage_ptr", - "typeString": "struct HashedTimeLockContract.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 982, - "initialValue": { - "baseExpression": { - "id": 979, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 599, - "src": "18616:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$635_storage_$", - "typeString": "mapping(bytes32 => struct HashedTimeLockContract.LockContract storage ref)" - } - }, - "id": 981, - "indexExpression": { - "id": 980, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "18626:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18616:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_storage", - "typeString": "struct HashedTimeLockContract.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18581:48:0" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 992, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 983, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 978, - "src": "18657:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_memory_ptr", - "typeString": "struct HashedTimeLockContract.LockContract memory" - } - }, - "id": 984, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18670:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 622, - "src": "18657:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 985, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 605, - "src": "18680:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18657:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 987, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 978, - "src": "18702:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_memory_ptr", - "typeString": "struct HashedTimeLockContract.LockContract memory" - } - }, - "id": 988, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18715:10:0", - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 620, - "src": "18702:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 989, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "18728:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18734:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "18728:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18702:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "18657:86:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1003, - "nodeType": "Block", - "src": "18801:53:0", - "statements": [ - { - "expression": { - "id": 1001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 998, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 974, - "src": "18815:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "expression": { - "id": 999, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 978, - "src": "18824:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$635_memory_ptr", - "typeString": "struct HashedTimeLockContract.LockContract memory" - } - }, - "id": 1000, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "18837:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 622, - "src": "18824:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18815:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1002, - "nodeType": "ExpressionStatement", - "src": "18815:28:0" - } - ] - }, - "id": 1004, - "nodeType": "IfStatement", - "src": "18640:214:0", - "trueBody": { - "id": 997, - "nodeType": "Block", - "src": "18754:41:0", - "statements": [ - { - "expression": { - "id": 995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 993, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 974, - "src": "18768:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 994, - "name": "EXPIRED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 614, - "src": "18777:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18768:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 996, - "nodeType": "ExpressionStatement", - "src": "18768:16:0" - } - ] - } - } - ] - }, - "functionSelector": "fbdf3b43", - "id": 1006, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getSingleStatus", - "nameLocation": "18506:15:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 972, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 971, - "mutability": "mutable", - "name": "id", - "nameLocation": "18530:2:0", - "nodeType": "VariableDeclaration", - "scope": 1006, - "src": "18522:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 970, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "18522:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "18521:12:0" - }, - "returnParameters": { - "id": 975, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 974, - "mutability": "mutable", - "name": "result", - "nameLocation": "18563:6:0", - "nodeType": "VariableDeclaration", - "scope": 1006, - "src": "18555:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 973, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18555:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "18554:16:0" - }, - "scope": 1007, - "src": "18497:363:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 1008, - "src": "14086:4776:0", - "usedErrors": [] - } - ], - "src": "40:18822:0" - }, - "functionHashes": { - "ACTIVE()": "c90bd047", - "EXPIRED()": "414ac85b", - "INVALID()": "7fcce2a9", - "REFUNDED()": "94e15c8f", - "WITHDRAWN()": "af78feef", - "contracts(bytes32)": "ec56a373", - "getSingleStatus(bytes32)": "fbdf3b43", - "getStatus(bytes32[])": "2f21a663", - "newContract(uint256,uint256,uint256,bytes32,address,address,string,string)": "d2fd8b76", - "refund(bytes32)": "7249fbb6", - "withdraw(bytes32,bytes32)": "63615149" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "914600", - "executionCost": "948", - "totalCost": "915548" - }, - "external": { - "ACTIVE()": "239", - "EXPIRED()": "218", - "INVALID()": "284", - "REFUNDED()": "195", - "WITHDRAWN()": "217", - "contracts(bytes32)": "infinite", - "getSingleStatus(bytes32)": "infinite", - "getStatus(bytes32[])": "infinite", - "newContract(uint256,uint256,uint256,bytes32,address,address,string,string)": "infinite", - "refund(bytes32)": "infinite", - "withdraw(bytes32,bytes32)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.sol b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.sol deleted file mode 100644 index 6ab56c0066..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.sol +++ /dev/null @@ -1,516 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -pragma solidity 0.8.19; - - -/** - * @dev Collection of functions related to the address type - */ -library Address { - /** - * @dev Returns true if `account` is a contract. - * - * [IMPORTANT] - * ==== - * It is unsafe to assume that an address for which this function returns - * false is an externally-owned account (EOA) and not a contract. - * - * Among others, `isContract` will return false for the following - * types of addresses: - * - * - an externally-owned account - * - a contract in construction - * - an address where a contract will be created - * - an address where a contract lived, but was destroyed - * ==== - */ - function isContract(address account) internal view returns (bool) { - // This method relies on extcodesize, which returns 0 for contracts in - // construction, since the code is only stored at the end of the - // constructor execution. - - uint256 size; - // solhint-disable-next-line no-inline-assembly - assembly { size := extcodesize(account) } - return size > 0; - } - - /** - * @dev Replacement for Solidity's `transfer`: sends `amount` wei to - * `recipient`, forwarding all available gas and reverting on errors. - * - * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost - * of certain opcodes, possibly making contracts go over the 2300 gas limit - * imposed by `transfer`, making them unable to receive funds via - * `transfer`. {sendValue} removes this limitation. - * - * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. - * - * IMPORTANT: because control is transferred to `recipient`, care must be - * taken to not create reentrancy vulnerabilities. Consider using - * {ReentrancyGuard} or the - * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. - */ - function sendValue(address payable recipient, uint256 amount) internal { - require(address(this).balance >= amount, "Address: insufficient balance"); - - // solhint-disable-next-line avoid-low-level-calls, avoid-call-value - (bool success, ) = recipient.call{ value: amount }(""); - require(success, "Address: unable to send value, recipient may have reverted"); - } - - /** - * @dev Performs a Solidity function call using a low level `call`. A - * plain`call` is an unsafe replacement for a function call: use this - * function instead. - * - * If `target` reverts with a revert reason, it is bubbled up by this - * function (like regular Solidity function calls). - * - * Returns the raw returned data. To convert to the expected return value, - * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. - * - * Requirements: - * - * - `target` must be a contract. - * - calling `target` with `data` must not revert. - * - * _Available since v3.1._ - */ - function functionCall(address target, bytes memory data) internal returns (bytes memory) { - return functionCall(target, data, "Address: low-level call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with - * `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ - function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { - return functionCallWithValue(target, data, 0, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but also transferring `value` wei to `target`. - * - * Requirements: - * - * - the calling contract must have an ETH balance of at least `value`. - * - the called Solidity function must be `payable`. - * - * _Available since v3.1._ - */ - function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { - return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); - } - - /** - * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but - * with `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ - function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { - require(address(this).balance >= value, "Address: insufficient balance for call"); - require(isContract(target), "Address: call to non-contract"); - - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory returndata) = target.call{ value: value }(data); - return _verifyCallResult(success, returndata, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ - function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { - return functionStaticCall(target, data, "Address: low-level static call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ - function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { - require(isContract(target), "Address: static call to non-contract"); - - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory returndata) = target.staticcall(data); - return _verifyCallResult(success, returndata, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a delegate call. - * - * _Available since v3.4._ - */ - function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { - return functionDelegateCall(target, data, "Address: low-level delegate call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a delegate call. - * - * _Available since v3.4._ - */ - function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { - require(isContract(target), "Address: delegate call to non-contract"); - - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory returndata) = target.delegatecall(data); - return _verifyCallResult(success, returndata, errorMessage); - } - - function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { - if (success) { - return returndata; - } else { - // Look for revert reason and bubble it up if present - if (returndata.length > 0) { - // The easiest way to bubble the revert reason is using memory via assembly - - // solhint-disable-next-line no-inline-assembly - assembly { - let returndata_size := mload(returndata) - revert(add(32, returndata), returndata_size) - } - } else { - revert(errorMessage); - } - } - } -} - -/** - * @dev Interface of the ERC20 standard as defined in the EIP. - */ -interface IERC20 { - /** - * @dev Returns the amount of tokens in existence. - */ - function totalSupply() external view returns (uint256); - - /** - * @dev Returns the amount of tokens owned by `account`. - */ - function balanceOf(address account) external view returns (uint256); - - /** - * @dev Moves `amount` tokens from the caller's account to `recipient`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transfer(address recipient, uint256 amount) external returns (bool); - - /** - * @dev Returns the remaining number of tokens that `spender` will be - * allowed to spend on behalf of `owner` through {transferFrom}. This is - * zero by default. - * - * This value changes when {approve} or {transferFrom} are called. - */ - function allowance(address owner, address spender) external view returns (uint256); - - /** - * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * IMPORTANT: Beware that changing an allowance with this method brings the risk - * that someone may use both the old and the new allowance by unfortunate - * transaction ordering. One possible solution to mitigate this race - * condition is to first reduce the spender's allowance to 0 and set the - * desired value afterwards: - * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * - * Emits an {Approval} event. - */ - function approve(address spender, uint256 amount) external returns (bool); - - /** - * @dev Moves `amount` tokens from `sender` to `recipient` using the - * allowance mechanism. `amount` is then deducted from the caller's - * allowance. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); - - /** - * @dev Emitted when `value` tokens are moved from one account (`from`) to - * another (`to`). - * - * Note that `value` may be zero. - */ - event Transfer(address indexed from, address indexed to, uint256 value); - - /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by - * a call to {approve}. `value` is the new allowance. - */ - event Approval(address indexed owner, address indexed spender, uint256 value); -} - -/** - * @title SafeERC20 - * @dev Wrappers around ERC20 operations that throw on failure (when the token - * contract returns false). Tokens that return no value (and instead revert or - * throw on failure) are also supported, non-reverting calls are assumed to be - * successful. - * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, - * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. - */ -library SafeERC20 { - using Address for address; - - function safeTransfer(IERC20 token, address to, uint256 value) internal { - _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); - } - - function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { - _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); - } - - /** - * @dev Deprecated. This function has issues similar to the ones found in - * {IERC20-approve}, and its usage is discouraged. - * - * Whenever possible, use {safeIncreaseAllowance} and - * {safeDecreaseAllowance} instead. - */ - function safeApprove(IERC20 token, address spender, uint256 value) internal { - // safeApprove should only be called when setting an initial allowance, - // or when resetting it to zero. To increase and decrease it, use - // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' - // solhint-disable-next-line max-line-length - require((value == 0) || (token.allowance(address(this), spender) == 0), - "SafeERC20: approve from non-zero to non-zero allowance" - ); - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); - } - - function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { - uint256 newAllowance = token.allowance(address(this), spender) + value; - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); - } - - function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { - uint256 oldAllowance = token.allowance(address(this), spender); - require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); - uint256 newAllowance = oldAllowance - value; - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); - } - - /** - * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement - * on the return value: the return value is optional (but if data is returned, it must not be false). - * @param token The token targeted by the call. - * @param data The call data (encoded using abi.encode or one of its variants). - */ - function _callOptionalReturn(IERC20 token, bytes memory data) private { - // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since - // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that - // the target address contains contract code and also asserts for success in the low-level call. - - bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); - if (returndata.length > 0) { // Return data is optional - // solhint-disable-next-line max-line-length - require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); - } - } -} - -contract HashedTimeLockContract { - using SafeERC20 for IERC20; - mapping(bytes32 => LockContract) public contracts; - - // / - WITHDRAWN - // INVALID - ACTIVE | - // \ - EXPIRED - REFUNDED - - uint256 public constant INVALID = 0; // Uninitialized swap -> can go to ACTIVE - uint256 public constant ACTIVE = 1; // Active swap -> can go to WITHDRAWN or EXPIRED - uint256 public constant REFUNDED = 2; // Swap is refunded -> final state. - uint256 public constant WITHDRAWN = 3; // Swap is withdrawn -> final state. - uint256 public constant EXPIRED = 4; // Swap is expired -> can go to REFUNDED - - struct LockContract { - uint256 inputAmount; - uint256 outputAmount; - uint256 expiration; - uint256 status; - bytes32 hashLock; - address tokenAddress; - address sender; - address receiver; - string outputNetwork; - string outputAddress; - } - - event Withdraw( - bytes32 id, - bytes32 secret, - bytes32 hashLock, - address indexed tokenAddress, - address indexed sender, - address indexed receiver - ); - - event Refund( - bytes32 id, - bytes32 hashLock, - address indexed tokenAddress, - address indexed sender, - address indexed receiver - ); - - event NewContract( - uint256 inputAmount, - uint256 outputAmount, - uint256 expiration, - bytes32 id, - bytes32 hashLock, - address indexed tokenAddress, - address indexed sender, - address indexed receiver, - string outputNetwork, - string outputAddress - ); - - function newContract( - uint256 inputAmount, - uint256 outputAmount, - uint256 expiration, - bytes32 hashLock, - address tokenAddress, - address receiver, - string calldata outputNetwork, - string calldata outputAddress - ) external { - require(expiration > block.timestamp, "INVALID_TIME"); - - require(inputAmount > 0, "INVALID_AMOUNT"); - - IERC20(tokenAddress).transferFrom(msg.sender, address(this), inputAmount); - - bytes32 id = keccak256( - abi.encode( - msg.sender, - receiver, - inputAmount, - hashLock, - expiration, - tokenAddress - ) - ); - - require(contracts[id].status == INVALID, "SWAP_EXISTS"); - - contracts[id] = LockContract( - inputAmount, - outputAmount, - expiration, - ACTIVE, - hashLock, - tokenAddress, - msg.sender, - receiver, - outputNetwork, - outputAddress - ); - - emit NewContract( - inputAmount, - outputAmount, - expiration, - id, - hashLock, - tokenAddress, - msg.sender, - receiver, - outputNetwork, - outputAddress - ); - } - - function withdraw(bytes32 id, bytes32 secret) - external - { - LockContract storage c = contracts[id]; - - require(c.status == ACTIVE, "SWAP_NOT_ACTIVE"); - - require(c.expiration > block.timestamp, "INVALID_TIME"); - - require( - c.hashLock == keccak256(abi.encode(secret)), - "INVALID_SECRET" - ); - - c.status = WITHDRAWN; - - IERC20(c.tokenAddress).transfer(c.receiver, c.inputAmount); - - emit Withdraw( - id, - secret, - c.hashLock, - c.tokenAddress, - c.sender, - c.receiver - ); - } - - function refund(bytes32 id) external { - LockContract storage c = contracts[id]; - - require(c.status == ACTIVE, "SWAP_NOT_ACTIVE"); - - require(c.expiration <= block.timestamp, "INVALID_TIME"); - - c.status = REFUNDED; - - IERC20(c.tokenAddress).transfer(c.sender, c.inputAmount); - - emit Refund(id, c.hashLock, c.tokenAddress, c.sender, c.receiver); - } - - function getStatus(bytes32[] memory ids) - public - view - returns (uint256[] memory) - { - uint256[] memory result = new uint256[](ids.length); - - for (uint256 index = 0; index < ids.length; index++) { - result[index] = getSingleStatus(ids[index]); - } - - return result; - } - - function getSingleStatus(bytes32 id) public view returns (uint256 result) { - LockContract memory tempContract = contracts[id]; - - if ( - tempContract.status == ACTIVE && - tempContract.expiration < block.timestamp - ) { - result = EXPIRED; - } else { - result = tempContract.status; - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index fd21b0f439..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,926 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - * Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * Defines the parameters for retrieving the single status of the HTLC swap. - * @export - * @interface GetSingleStatusRequest - */ -export interface GetSingleStatusRequest { - /** - * - * @type {string} - * @memberof GetSingleStatusRequest - */ - 'id': string; - /** - * - * @type {Web3SigningCredential} - * @memberof GetSingleStatusRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {string} - * @memberof GetSingleStatusRequest - */ - 'connectorId': string; - /** - * - * @type {string} - * @memberof GetSingleStatusRequest - */ - 'keychainId': string; -} -/** - * Defines the parameters for retrieving the status of the HTLC swap. - * @export - * @interface GetStatusRequest - */ -export interface GetStatusRequest { - /** - * - * @type {Array} - * @memberof GetStatusRequest - */ - 'ids': Array; - /** - * - * @type {Web3SigningCredential} - * @memberof GetStatusRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {string} - * @memberof GetStatusRequest - */ - 'connectorId': string; - /** - * - * @type {string} - * @memberof GetStatusRequest - */ - 'keychainId': string; -} -/** - * - * @export - * @interface InitializeRequest - */ -export interface InitializeRequest { - /** - * connectorId for the connector besu plugin - * @type {string} - * @memberof InitializeRequest - */ - 'connectorId': string; - /** - * keychainId for the keychain plugin - * @type {string} - * @memberof InitializeRequest - */ - 'keychainId': string; - /** - * - * @type {Array} - * @memberof InitializeRequest - */ - 'constructorArgs': Array; - /** - * - * @type {Web3SigningCredential} - * @memberof InitializeRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {number} - * @memberof InitializeRequest - */ - 'gas'?: number; -} -/** - * - * @export - * @interface InvokeContractV1Response - */ -export interface InvokeContractV1Response { - /** - * - * @type {Web3TransactionReceipt} - * @memberof InvokeContractV1Response - */ - 'transactionReceipt'?: Web3TransactionReceipt; - /** - * - * @type {any} - * @memberof InvokeContractV1Response - */ - 'callOutput'?: any; - /** - * - * @type {boolean} - * @memberof InvokeContractV1Response - */ - 'success': boolean; -} -/** - * - * @export - * @interface NewContractRequest - */ -export interface NewContractRequest { - /** - * Contract address - * @type {string} - * @memberof NewContractRequest - */ - 'contractAddress': string; - /** - * Input amount to lock - * @type {number} - * @memberof NewContractRequest - */ - 'inputAmount': number; - /** - * Output amount to lock - * @type {number} - * @memberof NewContractRequest - */ - 'outputAmount': number; - /** - * Timestamp to expire the contract - * @type {number} - * @memberof NewContractRequest - */ - 'expiration': number; - /** - * Hashlock needed to refund the amount - * @type {string} - * @memberof NewContractRequest - */ - 'hashLock': string; - /** - * The token address - * @type {string} - * @memberof NewContractRequest - */ - 'tokenAddress': string; - /** - * The receiver address - * @type {string} - * @memberof NewContractRequest - */ - 'receiver': string; - /** - * The output network id - * @type {string} - * @memberof NewContractRequest - */ - 'outputNetwork': string; - /** - * The output address to receive the tokens - * @type {string} - * @memberof NewContractRequest - */ - 'outputAddress': string; - /** - * - * @type {Web3SigningCredential} - * @memberof NewContractRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * connectorId for the connector besu plugin - * @type {string} - * @memberof NewContractRequest - */ - 'connectorId': string; - /** - * keychainId for the keychian plugin - * @type {string} - * @memberof NewContractRequest - */ - 'keychainId': string; - /** - * - * @type {NewContractRequestGas} - * @memberof NewContractRequest - */ - 'gas'?: NewContractRequestGas; -} -/** - * @type NewContractRequestGas - * @export - */ -export type NewContractRequestGas = number | string; - -/** - * - * @export - * @interface RefundRequest - */ -export interface RefundRequest { - /** - * Contract htlc id for refund - * @type {string} - * @memberof RefundRequest - */ - 'id': string; - /** - * - * @type {Web3SigningCredential} - * @memberof RefundRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * connectorId for the connector besu plugin - * @type {string} - * @memberof RefundRequest - */ - 'connectorId': string; - /** - * keychainId for the keychain plugin - * @type {string} - * @memberof RefundRequest - */ - 'keychainId': string; - /** - * - * @type {NewContractRequestGas} - * @memberof RefundRequest - */ - 'gas'?: NewContractRequestGas; -} -/** - * - * @export - * @interface RunTransactionResponse - */ -export interface RunTransactionResponse { - /** - * - * @type {Web3TransactionReceipt} - * @memberof RunTransactionResponse - */ - 'transactionReceipt': Web3TransactionReceipt; -} -/** - * @type Web3SigningCredential - * @export - */ -export type Web3SigningCredential = Web3SigningCredentialCactusKeychainRef | Web3SigningCredentialNone | Web3SigningCredentialPrivateKeyHex; - -/** - * - * @export - * @interface Web3SigningCredentialCactusKeychainRef - */ -export interface Web3SigningCredentialCactusKeychainRef { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'ethAccount': string; - /** - * The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainEntryKey': string; - /** - * The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainId': string; -} - - -/** - * Using this denotes that there is no signing required because the transaction is pre-signed. - * @export - * @interface Web3SigningCredentialNone - */ -export interface Web3SigningCredentialNone { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialNone - */ - 'type': Web3SigningCredentialType; -} - - -/** - * - * @export - * @interface Web3SigningCredentialPrivateKeyHex - */ -export interface Web3SigningCredentialPrivateKeyHex { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'ethAccount': string; - /** - * The HEX encoded private key of an eth account. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'secret': string; -} - - -/** - * - * @export - * @enum {string} - */ - -export const Web3SigningCredentialType = { - CactusKeychainRef: 'CACTUS_KEYCHAIN_REF', - GethKeychainPassword: 'GETH_KEYCHAIN_PASSWORD', - PrivateKeyHex: 'PRIVATE_KEY_HEX', - None: 'NONE' -} as const; - -export type Web3SigningCredentialType = typeof Web3SigningCredentialType[keyof typeof Web3SigningCredentialType]; - - -/** - * - * @export - * @interface Web3TransactionReceipt - */ -export interface Web3TransactionReceipt { - [key: string]: any; - - /** - * - * @type {boolean} - * @memberof Web3TransactionReceipt - */ - 'status': boolean; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'transactionHash': string; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'transactionIndex': number; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'blockHash': string; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'blockNumber': number; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'gasUsed': number; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'contractAddress'?: string | null; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'from': string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'to': string; -} -/** - * - * @export - * @interface WithdrawRequest - */ -export interface WithdrawRequest { - /** - * Contract locked id - * @type {string} - * @memberof WithdrawRequest - */ - 'id': string; - /** - * Secret need to unlock the contract - * @type {string} - * @memberof WithdrawRequest - */ - 'secret': string; - /** - * - * @type {Web3SigningCredential} - * @memberof WithdrawRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * connectorId for the connector besu plugin - * @type {string} - * @memberof WithdrawRequest - */ - 'connectorId': string; - /** - * keychainId for the keychain plugin - * @type {string} - * @memberof WithdrawRequest - */ - 'keychainId': string; - /** - * - * @type {NewContractRequestGas} - * @memberof WithdrawRequest - */ - 'gas'?: NewContractRequestGas; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {GetSingleStatusRequest} [getSingleStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSingleStatusV1: async (getSingleStatusRequest?: GetSingleStatusRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getSingleStatusRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {GetStatusRequest} [getStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatusV1: async (getStatusRequest?: GetStatusRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getStatusRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Initialize contract - * @param {InitializeRequest} [initializeRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - initializeV1: async (initializeRequest?: InitializeRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(initializeRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Create a new hashtimelock contract - * @param {NewContractRequest} [newContractRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newContractV1: async (newContractRequest?: NewContractRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(newContractRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Refund a hashtimelock contract - * @param {RefundRequest} [refundRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - refundV1: async (refundRequest?: RefundRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(refundRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Withdraw a hashtimelock contract - * @param {WithdrawRequest} [withdrawRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - withdrawV1: async (withdrawRequest?: WithdrawRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(withdrawRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @param {GetSingleStatusRequest} [getSingleStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSingleStatusV1(getSingleStatusRequest?: GetSingleStatusRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSingleStatusV1(getSingleStatusRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {GetStatusRequest} [getStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatusV1(getStatusRequest?: GetStatusRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatusV1(getStatusRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Initialize contract - * @param {InitializeRequest} [initializeRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async initializeV1(initializeRequest?: InitializeRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.initializeV1(initializeRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Create a new hashtimelock contract - * @param {NewContractRequest} [newContractRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async newContractV1(newContractRequest?: NewContractRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.newContractV1(newContractRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Refund a hashtimelock contract - * @param {RefundRequest} [refundRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async refundV1(refundRequest?: RefundRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.refundV1(refundRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Withdraw a hashtimelock contract - * @param {WithdrawRequest} [withdrawRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async withdrawV1(withdrawRequest?: WithdrawRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.withdrawV1(withdrawRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @param {GetSingleStatusRequest} [getSingleStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSingleStatusV1(getSingleStatusRequest?: GetSingleStatusRequest, options?: any): AxiosPromise { - return localVarFp.getSingleStatusV1(getSingleStatusRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {GetStatusRequest} [getStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatusV1(getStatusRequest?: GetStatusRequest, options?: any): AxiosPromise> { - return localVarFp.getStatusV1(getStatusRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Initialize contract - * @param {InitializeRequest} [initializeRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - initializeV1(initializeRequest?: InitializeRequest, options?: any): AxiosPromise { - return localVarFp.initializeV1(initializeRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Create a new hashtimelock contract - * @param {NewContractRequest} [newContractRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newContractV1(newContractRequest?: NewContractRequest, options?: any): AxiosPromise { - return localVarFp.newContractV1(newContractRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Refund a hashtimelock contract - * @param {RefundRequest} [refundRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - refundV1(refundRequest?: RefundRequest, options?: any): AxiosPromise { - return localVarFp.refundV1(refundRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Withdraw a hashtimelock contract - * @param {WithdrawRequest} [withdrawRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - withdrawV1(withdrawRequest?: WithdrawRequest, options?: any): AxiosPromise { - return localVarFp.withdrawV1(withdrawRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @param {GetSingleStatusRequest} [getSingleStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getSingleStatusV1(getSingleStatusRequest?: GetSingleStatusRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getSingleStatusV1(getSingleStatusRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {GetStatusRequest} [getStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getStatusV1(getStatusRequest?: GetStatusRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getStatusV1(getStatusRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Initialize contract - * @param {InitializeRequest} [initializeRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public initializeV1(initializeRequest?: InitializeRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).initializeV1(initializeRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Create a new hashtimelock contract - * @param {NewContractRequest} [newContractRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public newContractV1(newContractRequest?: NewContractRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).newContractV1(newContractRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Refund a hashtimelock contract - * @param {RefundRequest} [refundRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public refundV1(refundRequest?: RefundRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).refundV1(refundRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Withdraw a hashtimelock contract - * @param {WithdrawRequest} [withdrawRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public withdrawV1(withdrawRequest?: WithdrawRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).withdrawV1(withdrawRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index f6bf492efb..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - * Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index a6116b42a0..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - * Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 1d45a6b0c7..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - * Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index ec13f0cb50..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC ETH BESU ERC20 - * Allows Cactus nodes to interact with HTLC contracts with ERC-20 Tokens - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/index.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/index.web.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/index.web.ts deleted file mode 100644 index 10568cbc41..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/index.web.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { - PluginHtlcEthBesuErc20, - IPluginHtlcEthBesuErc20Options, -} from "./plugin-htlc-eth-besu-erc20"; diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/plugin-factory-htlc-eth-besu-erc20.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/plugin-factory-htlc-eth-besu-erc20.ts deleted file mode 100644 index a13f12579b..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/plugin-factory-htlc-eth-besu-erc20.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginHtlcEthBesuErc20Options, - PluginHtlcEthBesuErc20, -} from "./plugin-htlc-eth-besu-erc20"; - -export class PluginFactoryHtlcEthBesuErc20 extends PluginFactory< - PluginHtlcEthBesuErc20, - IPluginHtlcEthBesuErc20Options, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginHtlcEthBesuErc20Options, - ): Promise { - return new PluginHtlcEthBesuErc20(pluginOptions); - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/plugin-htlc-eth-besu-erc20.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/plugin-htlc-eth-besu-erc20.ts deleted file mode 100644 index 769a6881bf..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/plugin-htlc-eth-besu-erc20.ts +++ /dev/null @@ -1,279 +0,0 @@ -import { Express } from "express"; - -import OAS from "../json/openapi.json"; - -import { - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { Checks, LogLevelDesc } from "@hyperledger/cactus-common"; -import { - EthContractInvocationType, - InvokeContractV1Response, - PluginLedgerConnectorBesu, - RunTransactionResponse, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { GetSingleStatusEndpoint } from "./web-services/get-single-status-endpoint"; -import { GetStatusEndpoint } from "./web-services/get-status-endpoint"; -import { NewContractEndpoint } from "./web-services/new-contract-endpoint"; -import { RefundEndpoint } from "./web-services/refund-endpoint"; -import { WithdrawEndpoint } from "./web-services/withdraw-endpoint"; -import { InitializeEndpoint } from "./web-services/initialize-endpoint"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { NewContractRequest } from "."; -import HashTimeLockJSON from "../solidity/contracts/HashedTimeLockContract.json"; -import { - InitializeRequest, - RefundRequest, - WithdrawRequest, - GetStatusRequest, - GetSingleStatusRequest, -} from "./generated/openapi/typescript-axios"; -import { Optional } from "typescript-optional"; - -export interface IPluginHtlcEthBesuErc20Options extends ICactusPluginOptions { - keychainId?: string; - instanceId: string; - logLevel?: LogLevelDesc; - pluginRegistry: PluginRegistry; -} -export class PluginHtlcEthBesuErc20 - implements ICactusPlugin, IPluginWebService -{ - public static readonly CLASS_NAME = "PluginHtlcEthBesuErc20"; - private readonly instanceId: string; - private readonly keychainId: Optional; - private readonly pluginRegistry: PluginRegistry; - private readonly estimatedGas = 6721975; - private endpoints: IWebServiceEndpoint[] | undefined; - - constructor(public readonly opts: IPluginHtlcEthBesuErc20Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} opts`); - Checks.truthy(opts.instanceId, `${fnTag} opts.instanceId`); - Checks.truthy(opts.pluginRegistry, `${fnTag} opts.pluginRegistry`); - Checks.nonBlankString(opts.instanceId, `${fnTag} opts.instanceId`); - this.instanceId = opts.instanceId; - this.keychainId = opts.keychainId - ? Optional.of(opts.keychainId) - : Optional.empty(); - this.pluginRegistry = opts.pluginRegistry; - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public get className(): string { - return PluginHtlcEthBesuErc20.CLASS_NAME; - } - - /** - * Feature is deprecated, we won't need this method in the future. - */ - public async shutdown(): Promise { - return; - } - - public async onPluginInit(): Promise { - return; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getKeychainId(): Optional { - return this.keychainId; - } - - public getPackageName(): string { - return "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - webServices.forEach((ws) => ws.registerExpress(app)); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new GetSingleStatusEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - { - const endpoint = new GetStatusEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - { - const endpoint = new NewContractEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - { - const endpoint = new RefundEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - { - const endpoint = new WithdrawEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - { - const endpoint = new InitializeEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - this.endpoints = endpoints; - return endpoints; - } - - public async initialize( - initializeRequest: InitializeRequest, - ): Promise { - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == initializeRequest.connectorId, - ) as PluginLedgerConnectorBesu; - - const hashedTimeLockResponse = await connector.deployContract({ - contractName: HashTimeLockJSON.contractName, - contractAbi: HashTimeLockJSON.abi, - bytecode: HashTimeLockJSON.bytecode, - web3SigningCredential: initializeRequest.web3SigningCredential, - keychainId: initializeRequest.keychainId, - constructorArgs: initializeRequest.constructorArgs, - gas: initializeRequest.gas || this.estimatedGas, - }); - return hashedTimeLockResponse; - } - - public async newContract( - newContractRequest: NewContractRequest, - ): Promise { - const params = [ - newContractRequest.inputAmount, - newContractRequest.outputAmount, - newContractRequest.expiration, - newContractRequest.hashLock, - newContractRequest.tokenAddress, - newContractRequest.receiver, - newContractRequest.outputNetwork, - newContractRequest.outputAddress, - ]; - - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == newContractRequest.connectorId, - ) as PluginLedgerConnectorBesu; - - const result = await connector.invokeContract({ - contractName: HashTimeLockJSON.contractName, - keychainId: newContractRequest.keychainId, - signingCredential: newContractRequest.web3SigningCredential, - contractAddress: newContractRequest.contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "newContract", - params, - gas: newContractRequest.gas || this.estimatedGas, - }); - - return result; - } - - public async refund( - refundRequest: RefundRequest, - ): Promise { - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == refundRequest.connectorId, - ) as PluginLedgerConnectorBesu; - - const result = await connector.invokeContract({ - contractName: HashTimeLockJSON.contractName, - keychainId: refundRequest.keychainId, - signingCredential: refundRequest.web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "refund", - params: [refundRequest.id], - gas: refundRequest.gas || this.estimatedGas, - }); - - return result; - } - - public async withdraw( - withdrawRequest: WithdrawRequest, - ): Promise { - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == withdrawRequest.connectorId, - ) as PluginLedgerConnectorBesu; - const params = [withdrawRequest.id, withdrawRequest.secret]; - const result = await connector.invokeContract({ - contractName: HashTimeLockJSON.contractName, - keychainId: withdrawRequest.keychainId, - signingCredential: withdrawRequest.web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "withdraw", - params, - gas: withdrawRequest.gas || this.estimatedGas, - }); - - return result; - } - - public async getSingleStatus( - req: GetSingleStatusRequest, - ): Promise { - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == req.connectorId, - ) as PluginLedgerConnectorBesu; - - const result = await connector.invokeContract({ - contractName: HashTimeLockJSON.contractName, - signingCredential: req.web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getSingleStatus", - params: [req.id], - keychainId: req.keychainId, - }); - return result; - } - - public async getStatus( - req: GetStatusRequest, - ): Promise { - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == req.connectorId, - ) as PluginLedgerConnectorBesu; - - const result = await connector.invokeContract({ - contractName: HashTimeLockJSON.contractName, - signingCredential: req.web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getStatus", - params: [req.ids], - keychainId: req.keychainId, - }); - return result; - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/public-api.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/public-api.ts deleted file mode 100644 index af18f8b0ee..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/public-api.ts +++ /dev/null @@ -1,17 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; - -import { PluginFactoryHtlcEthBesuErc20 } from "./plugin-factory-htlc-eth-besu-erc20"; -export { - PluginHtlcEthBesuErc20, - IPluginHtlcEthBesuErc20Options, -} from "./plugin-htlc-eth-besu-erc20"; - -export { PluginFactoryHtlcEthBesuErc20 } from "./plugin-factory-htlc-eth-besu-erc20"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryHtlcEthBesuErc20(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/get-single-status-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/get-single-status-endpoint.ts deleted file mode 100644 index 3313d84e07..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/get-single-status-endpoint.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import OAS from "../../json/openapi.json"; -import { PluginHtlcEthBesuErc20 } from "../plugin-htlc-eth-besu-erc20"; - -export interface IGetSingleStatusEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesuErc20; -} - -export class GetSingleStatusEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetSingleStatusEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: IGetSingleStatusEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - const level = this.options.logLevel || "INFO"; - const label = this.className; - Checks.truthy(options, `${fnTag} arg options`); - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return GetSingleStatusEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-single-status" - ]; - } - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetSingleStatusEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const { callOutput } = await this.options.plugin.getSingleStatus( - req.body, - ); - - res.send(callOutput); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(400).json({ - message: "Bad request", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/get-status-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/get-status-endpoint.ts deleted file mode 100644 index cdbb364b20..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/get-status-endpoint.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import OAS from "../../json/openapi.json"; -import { PluginHtlcEthBesuErc20 } from "../plugin-htlc-eth-besu-erc20"; - -export interface IGetStatusEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesuErc20; -} - -export class GetStatusEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetStatusEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: IGetStatusEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - const level = this.options.logLevel || "INFO"; - const label = this.className; - Checks.truthy(options, `${fnTag} arg options`); - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return GetStatusEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/get-status" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetStatusEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const { callOutput } = await this.options.plugin.getStatus(req.body); - - res.send(callOutput); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(400).json({ - message: "Bad request", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/initialize-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/initialize-endpoint.ts deleted file mode 100644 index 20a3a7d365..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/initialize-endpoint.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import OAS from "../../json/openapi.json"; - -import { InitializeRequest } from "../generated/openapi/typescript-axios"; -import { PluginHtlcEthBesuErc20 } from "../plugin-htlc-eth-besu-erc20"; - -export interface IInitializeEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesuErc20; -} - -export class InitializeEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InitializeEndpoint"; - private readonly log: Logger; - private readonly estimatedGas = 6721975; - - constructor(public readonly options: IInitializeEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - const level = this.options.logLevel || "INFO"; - const label = this.className; - - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return InitializeEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/initialize" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "InitializeEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const request: InitializeRequest = req.body as InitializeRequest; - const result = await this.options.plugin.initialize(request); - res.send(result); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(400).json({ - message: "Bad request", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/new-contract-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/new-contract-endpoint.ts deleted file mode 100644 index c1a2f50897..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/new-contract-endpoint.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { NewContractRequest } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; -import { PluginHtlcEthBesuErc20 } from "../plugin-htlc-eth-besu-erc20"; - -export interface INewContractEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesuErc20; -} - -export class NewContractEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "NewContractEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: INewContractEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - const level = this.options.logLevel || "INFO"; - const label = this.className; - Checks.truthy(options, `${fnTag} arg options`); - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return NewContractEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/new-contract" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "NewContractEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const request: NewContractRequest = req.body as NewContractRequest; - const result = await this.options.plugin.newContract(request); - res.send(result); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(400).json({ - message: "Bad request", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/refund-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/refund-endpoint.ts deleted file mode 100644 index f8f816b359..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/refund-endpoint.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - IExpressRequestHandler, - IWebServiceEndpoint, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { RefundRequest } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; -import { PluginHtlcEthBesuErc20 } from "../plugin-htlc-eth-besu-erc20"; - -export interface IRefundEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesuErc20; -} - -export class RefundEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RefundEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: IRefundEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - const level = this.options.logLevel || "INFO"; - const label = this.className; - Checks.truthy(options, `${fnTag} arg options`); - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return RefundEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/refund" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "RefundEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const request: RefundRequest = req.body as RefundRequest; - const result = await this.options.plugin.refund(request); - res.send(result); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(400).json({ - message: "Bad request", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/withdraw-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/withdraw-endpoint.ts deleted file mode 100644 index e5ffbef089..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/web-services/withdraw-endpoint.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { WithdrawRequest } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; -import { PluginHtlcEthBesuErc20 } from "../plugin-htlc-eth-besu-erc20"; - -export interface IWithdrawEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesuErc20; -} - -export class WithdrawEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "WithdrawEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: IWithdrawEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - const level = this.options.logLevel || "INFO"; - const label = this.className; - Checks.truthy(options, `${fnTag} arg options`); - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return WithdrawEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu-erc20/withdraw" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "WithdrawEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const request: WithdrawRequest = req.body as WithdrawRequest; - const result = await this.options.plugin.withdraw(request); - res.send(result); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(400).json({ - message: "Bad request", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/tsconfig.json b/packages/cactus-plugin-htlc-eth-besu-erc20/tsconfig.json deleted file mode 100644 index f239b97110..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-htlc-eth-besu-erc20.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-besu/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/.gitignore b/packages/cactus-plugin-htlc-eth-besu/.gitignore deleted file mode 100644 index 58b9aa0736..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.env -cache -lib -vendor -.gas-snapshot \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/CHANGELOG.md b/packages/cactus-plugin-htlc-eth-besu/CHANGELOG.md deleted file mode 100644 index d66b7322b9..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/CHANGELOG.md +++ /dev/null @@ -1,166 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) -* **plugin-htlc-eth-besu:** add private HTLCs and forge build & test ([aade510](https://github.com/hyperledger/cacti/commit/aade510c5fc13199006466aecd8235130d6ec353)) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Bug Fixes - -* **security:** address CVE-2021-23358 ([ed71f42](https://github.com/hyperledger/cactus/commit/ed71f42aca1683dd2fd6f762fbc6cd19b4c3c253)), closes [#1775](https://github.com/hyperledger/cactus/issues/1775) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* **deps:** sibling package dependencies keychain-memory 0.6.0 [#1532](https://github.com/hyperledger/cactus/issues/1532) ([d01d72d](https://github.com/hyperledger/cactus/commit/d01d72d36200d47acac89f7ab90f6ddc96afba6f)) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* openapi tests for besu, htlc-eth-besu and htlc-eth-besu-erc20 ([b9170e9](https://github.com/hyperledger/cactus/commit/b9170e929492f3305a420c75c7d12d06b288e0ab)), closes [#1291](https://github.com/hyperledger/cactus/issues/1291) [#847](https://github.com/hyperledger/cactus/issues/847) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-htlc-eth-besu - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Features - -* **core-api:** plugin async initializer method ([9678c2e](https://github.com/hyperledger/cactus/commit/9678c2e9288a73589e84f9fd254c26aed6a93297)) -* **htlc-eth-besu:** implemented plugin + test ([6684557](https://github.com/hyperledger/cactus/commit/6684557d5de863fa3e023b4c8afe239ea62143eb)) diff --git a/packages/cactus-plugin-htlc-eth-besu/README.md b/packages/cactus-plugin-htlc-eth-besu/README.md deleted file mode 100644 index 0783018dfa..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# @hyperledger/cactus-plugin-htlc-eth-besu - -Allows `Cacti` to interact with HTLC contract manager. - - -## Summary - - - [Getting Started](#getting-started) - - [Installing](#installing) - - [Runing the tests](#running-the-tests) - - [Contributing](#contributing) - - [License](#license) - - -## Getting Started -The smart contracts and rationalle ane explained in detail in this Medium article . - -These instructions will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Installing - -Install Foundry: https://book.getfoundry.sh/getting-started/installation - -Steps to compile the project: `forge build`. - - - -## Running the tests - -The tests can be found in @hyperledger/cactus-test-htlc-eth-besu. To run this, in the root project execute: - -```sh -npm run test:plugin-htlc-besu -``` - -To run the solidity tests (within the root directory of this package): -`forge test --match-contract PrivateHashTimeLockTest` - -To run a specific function: -`forge test --match-contract PrivateHashTimeLockTest --match-test testDeployment` - -Run ALL the solidity tests: `forge test -vvvv` - - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## Nohoist configuration -Foundry uses ``forge-std``and ``ds-test``modules for testing purposes. Given that Foundry cannot access files outside of the project, we use nohoist to force lerna to download the packages within the Forge project directory: - -`` - "nohoist": [ - "**/iroha-helpers", - "**/forge-std", - "**/forge-std/**" - ] - }, -`` - -If in the future Forge supports importing Solidity files from outside the project, the imports/re-mappings can be updated and the nohoist configuration removed. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/foundry.toml b/packages/cactus-plugin-htlc-eth-besu/foundry.toml deleted file mode 100644 index a5e295f7ed..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/foundry.toml +++ /dev/null @@ -1,45 +0,0 @@ -# Foundry Configuration File -# Default definitions: https://github.com/gakonst/foundry/blob/b7917fa8491aedda4dd6db53fbb206ea233cd531/config/src/lib.rs#L782 - -[profile.default] -# The source directory -src = './src/main/solidity/contracts' -# The test directory -test = 'src/test/solidity/integration' -# The script directory -script = './src/main/solidity/contracts/scripts' -# The artifact directory -out = 'build' -solc_version = '0.8.19' -auto_detect_solc = false -optimizer_runs = 1_000 -sender = '0x00a329c0648769a73afac7f9381e08fb43dbea72' # the address of `msg.sender` in tests -tx_origin = '0x00a329c0648769a73afac7f9381e08fb43dbea72' # the address of `tx.origin` in tests -block_number = 0 # the block number we are at in tests -chain_id = 99 # the chain id we are on in tests -gas_limit = 9223372036854775807 # the gas limit in tests -gas_reports = ['*'] -gas_price = 0 # the gas price (in wei) in tests -block_base_fee_per_gas = 0 # the base fee (in wei) in tests -block_coinbase = '0x0000000000000000000000000000000000000000' # the address of `block.coinbase` in tests -block_timestamp = 0 # the value of `block.timestamp` in tests -block_difficulty = 0 -fuzz = { runs = 256 } # the number of fuzz runs for tests -libs = ["./node_modules"] -remappings = [ - "ds-test/=./node_modules/ds-test/src/", - "forge-std/=./node_modules/forge-std/src/", -] - -# Fuzzing CI -[profile.ci] -fuzz_runs = 100_00 -verbosity = 4 - -[rpc_endpoints] -goerli = "${RPC_URL_GOERLI}" -mainnet = "${RPC_URL_MAINNET}" - -[etherscan] -goerli = {key = "${ETHERSCAN_KEY}", url = "https://api-goerli.etherscan.io/api"} -mainnet = {key = "${ETHERSCAN_KEY}"} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/openapitools.json b/packages/cactus-plugin-htlc-eth-besu/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/package.json b/packages/cactus-plugin-htlc-eth-besu/package.json deleted file mode 100644 index 0e90b4b8e6..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-htlc-eth-besu", - "version": "2.0.0", - "description": "Allows Cactus nodes to interact with HTLC ETH contracts", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - }, - { - "name": "Azahara Castaño", - "email": "a.castano.benito@accenture.com", - "url": "https://accenture.com" - }, - { - "name": "Rafael Belchior", - "email": "rafael.belchior@tecnico.ulisboa.pt", - "url": "https://rafaelapb.github.io/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-htlc-eth-besu.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "compile-contracts": "forge build", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "lint": "solhint --fix", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "axios": "1.7.7", - "bn.js": "5.2.1", - "dotenv": "16.0.3", - "ethers": "6.3.0", - "express": "4.21.0", - "joi": "17.13.3", - "openapi-types": "12.1.3", - "typescript-optional": "2.0.1", - "web3js-quorum": "22.4.0" - }, - "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/express": "5.0.0", - "ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0", - "forge-std": "https://github.com/foundry-rs/forge-std.git#66bf4e2c92cf507531599845e8d5a08cc2e3b5bb" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-htlc-eth-besu.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-htlc-eth-besu.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 988f364d74..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,25 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_get_single_status_request.go -model_get_status_request.go -model_initialize_request.go -model_invoke_contract_v1_response.go -model_new_contract_obj.go -model_new_contract_obj_gas.go -model_refund_req.go -model_run_transaction_response.go -model_web3_signing_credential.go -model_web3_signing_credential_cactus_keychain_ref.go -model_web3_signing_credential_none.go -model_web3_signing_credential_private_key_hex.go -model_web3_signing_credential_type.go -model_web3_transaction_receipt.go -model_withdraw_req.go -response.go -utils.go diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 350810b733..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# Go API client for cactus-plugin-htlc-eth-besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-htlc-eth-besu "github.com/hyperledger/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-htlc-eth-besu.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-htlc-eth-besu.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-htlc-eth-besu.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-htlc-eth-besu.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**GetSingleStatusV1**](docs/DefaultApi.md#getsinglestatusv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status | -*DefaultApi* | [**GetStatusV1**](docs/DefaultApi.md#getstatusv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status | -*DefaultApi* | [**InitializeV1**](docs/DefaultApi.md#initializev1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize | -*DefaultApi* | [**NewContractV1**](docs/DefaultApi.md#newcontractv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract | -*DefaultApi* | [**RefundV1**](docs/DefaultApi.md#refundv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund | -*DefaultApi* | [**WithdrawV1**](docs/DefaultApi.md#withdrawv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw | - - -## Documentation For Models - - - [GetSingleStatusRequest](docs/GetSingleStatusRequest.md) - - [GetStatusRequest](docs/GetStatusRequest.md) - - [InitializeRequest](docs/InitializeRequest.md) - - [InvokeContractV1Response](docs/InvokeContractV1Response.md) - - [NewContractObj](docs/NewContractObj.md) - - [NewContractObjGas](docs/NewContractObjGas.md) - - [RefundReq](docs/RefundReq.md) - - [RunTransactionResponse](docs/RunTransactionResponse.md) - - [Web3SigningCredential](docs/Web3SigningCredential.md) - - [Web3SigningCredentialCactusKeychainRef](docs/Web3SigningCredentialCactusKeychainRef.md) - - [Web3SigningCredentialNone](docs/Web3SigningCredentialNone.md) - - [Web3SigningCredentialPrivateKeyHex](docs/Web3SigningCredentialPrivateKeyHex.md) - - [Web3SigningCredentialType](docs/Web3SigningCredentialType.md) - - [Web3TransactionReceipt](docs/Web3TransactionReceipt.md) - - [WithdrawReq](docs/WithdrawReq.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 804b0f0ab9..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,547 +0,0 @@ -openapi: 3.0.3 -info: - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - HTLC-ETH Besu - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract: - post: - operationId: newContractV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NewContractObj' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw: - post: - operationId: withdrawV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WithdrawReq' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund: - post: - operationId: refundV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RefundReq' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status: - post: - operationId: getStatusV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetStatusRequest' - responses: - "200": - content: - application/json: - schema: - items: - format: uint256 - type: integer - type: array - description: Array of status - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status: - post: - operationId: getSingleStatusV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetSingleStatusRequest' - responses: - "200": - content: - application/json: - schema: - format: uint256 - type: integer - description: Status - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status - /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize: - post: - operationId: initializeV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InitializeRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionResponse' - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize -components: - responses: - GetStatusResponse: - content: - application/json: - schema: - items: - format: uint256 - type: integer - type: array - description: Array of status - GetSingleStatusResponse: - content: - application/json: - schema: - format: uint256 - type: integer - description: Status - schemas: - NewContractObj: - additionalProperties: false - example: - outputAddress: outputAddress - receiver: receiver - keychainId: keychainId - outputAmount: 6.027456183070403 - outputNetwork: outputNetwork - connectorId: connectorId - hashLock: hashLock - gas: null - contractAddress: contractAddress - web3SigningCredential: - type: null - inputAmount: 0.8008281904610115 - expiration: 1.4658129805029452 - properties: - contractAddress: - description: Contract address - nullable: false - type: string - inputAmount: - type: number - outputAmount: - type: number - expiration: - type: number - hashLock: - type: string - receiver: - type: string - outputNetwork: - nullable: false - type: string - outputAddress: - nullable: false - type: string - connectorId: - description: connectorId for the connector besu plugin - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - keychainId: - description: keychainId for the keychian plugin - nullable: false - type: string - gas: - $ref: '#/components/schemas/NewContractObj_gas' - required: - - connectorId - - contractAddress - - expiration - - hashLock - - keychainId - - outputAddress - - outputAmount - - outputNetwork - - web3SigningCredential - type: object - RefundReq: - additionalProperties: false - example: - keychainId: keychainId - connectorId: connectorId - gas: null - web3SigningCredential: - type: null - id: id - properties: - id: - description: Contract htlc id for refund - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - connectorId: - description: connectorId for the connector besu plugin - nullable: false - type: string - keychainId: - description: keychainId for the keychain plugin - nullable: false - type: string - gas: - $ref: '#/components/schemas/NewContractObj_gas' - required: - - connectorId - - id - - keychainId - - web3SigningCredential - type: object - WithdrawReq: - additionalProperties: false - example: - keychainId: keychainId - connectorId: connectorId - gas: null - web3SigningCredential: - type: null - id: id - secret: secret - properties: - id: - description: Contract locked id - nullable: false - type: string - secret: - description: Secret need to unlock the contract - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - connectorId: - description: connectorId for the connector besu plugin - nullable: false - type: string - keychainId: - description: keychainId for the keychain plugin - nullable: false - type: string - gas: - $ref: '#/components/schemas/NewContractObj_gas' - required: - - connectorId - - id - - keychainId - - secret - - web3SigningCredential - type: object - InitializeRequest: - additionalProperties: false - example: - keychainId: keychainId - connectorId: connectorId - constructorArgs: - - "" - - "" - gas: 0.8008281904610115 - web3SigningCredential: - type: null - properties: - connectorId: - description: connectorId for the connector besu plugin - nullable: false - type: string - keychainId: - description: keychainId for the keychain plugin - nullable: false - type: string - constructorArgs: - default: [] - items: {} - type: array - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - gas: - type: number - required: - - connectorId - - constructorArgs - - keychainId - - web3SigningCredential - type: object - GetStatusRequest: - additionalProperties: false - description: Defines the parameters for retrieving the status of the HTLC swap. - example: - keychainId: keychainId - connectorId: connectorId - ids: - - ids - - ids - web3SigningCredential: - type: null - properties: - ids: - items: - type: string - type: array - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - connectorId: - type: string - keychainId: - type: string - required: - - connectorId - - ids - - keychainId - - web3SigningCredential - type: object - GetSingleStatusRequest: - additionalProperties: false - description: Defines the parameters for retrieving the single status of the - HTLC swap. - example: - keychainId: keychainId - connectorId: connectorId - web3SigningCredential: - type: null - id: id - properties: - id: - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - connectorId: - type: string - keychainId: - type: string - required: - - connectorId - - id - - keychainId - - web3SigningCredential - type: object - Web3SigningCredentialType: - enum: - - CACTUS_KEYCHAIN_REF - - GETH_KEYCHAIN_PASSWORD - - PRIVATE_KEY_HEX - - NONE - type: string - Web3SigningCredentialCactusKeychainRef: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 64 - minLength: 64 - nullable: false - type: string - keychainEntryKey: - description: The key to use when looking up the the keychain entry holding - the secret pointed to by the keychainEntryKey parameter. - maxLength: 1024 - minLength: 0 - type: string - keychainId: - description: The keychain ID to use when looking up the the keychain plugin - instance that will be used to retrieve the secret pointed to by the keychainEntryKey - parameter. - maxLength: 1024 - minLength: 0 - type: string - required: - - ethAccount - - keychainEntryKey - - keychainId - - type - type: object - Web3SigningCredentialPrivateKeyHex: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 64 - minLength: 64 - nullable: false - type: string - secret: - description: The HEX encoded private key of an eth account. - maxLength: 65535 - minLength: 0 - type: string - required: - - ethAccount - - secret - - type - type: object - Web3SigningCredentialNone: - description: Using this denotes that there is no signing required because the - transaction is pre-signed. - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredential: - discriminator: - propertyName: type - example: - type: null - oneOf: - - $ref: '#/components/schemas/Web3SigningCredentialCactusKeychainRef' - - $ref: '#/components/schemas/Web3SigningCredentialPrivateKeyHex' - - $ref: '#/components/schemas/Web3SigningCredentialNone' - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3TransactionReceipt: - additionalProperties: true - example: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - properties: - status: - nullable: false - type: boolean - transactionHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - transactionIndex: - nullable: false - type: number - blockHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - blockNumber: - nullable: false - type: number - gasUsed: - nullable: false - type: number - contractAddress: - nullable: true - type: string - from: - nullable: false - type: string - to: - nullable: false - type: string - required: - - blockHash - - blockNumber - - from - - gasUsed - - status - - to - - transactionHash - - transactionIndex - type: object - InvokeContractV1Response: - example: - transactionReceipt: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - callOutput: "" - success: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - callOutput: {} - success: - nullable: false - type: boolean - required: - - success - type: object - RunTransactionResponse: - example: - transactionReceipt: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - required: - - transactionReceipt - type: object - NewContractObj_gas: - oneOf: - - type: string - - type: number diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index c52cda8e7f..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,653 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiGetSingleStatusV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getSingleStatusRequest *GetSingleStatusRequest -} - -func (r ApiGetSingleStatusV1Request) GetSingleStatusRequest(getSingleStatusRequest GetSingleStatusRequest) ApiGetSingleStatusV1Request { - r.getSingleStatusRequest = &getSingleStatusRequest - return r -} - -func (r ApiGetSingleStatusV1Request) Execute() (int32, *http.Response, error) { - return r.ApiService.GetSingleStatusV1Execute(r) -} - -/* -GetSingleStatusV1 Method for GetSingleStatusV1 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetSingleStatusV1Request -*/ -func (a *DefaultApiService) GetSingleStatusV1(ctx context.Context) ApiGetSingleStatusV1Request { - return ApiGetSingleStatusV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return int32 -func (a *DefaultApiService) GetSingleStatusV1Execute(r ApiGetSingleStatusV1Request) (int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetSingleStatusV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getSingleStatusRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetStatusV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getStatusRequest *GetStatusRequest -} - -func (r ApiGetStatusV1Request) GetStatusRequest(getStatusRequest GetStatusRequest) ApiGetStatusV1Request { - r.getStatusRequest = &getStatusRequest - return r -} - -func (r ApiGetStatusV1Request) Execute() ([]int32, *http.Response, error) { - return r.ApiService.GetStatusV1Execute(r) -} - -/* -GetStatusV1 Method for GetStatusV1 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetStatusV1Request -*/ -func (a *DefaultApiService) GetStatusV1(ctx context.Context) ApiGetStatusV1Request { - return ApiGetStatusV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []int32 -func (a *DefaultApiService) GetStatusV1Execute(r ApiGetStatusV1Request) ([]int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetStatusV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getStatusRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInitializeV1Request struct { - ctx context.Context - ApiService *DefaultApiService - initializeRequest *InitializeRequest -} - -func (r ApiInitializeV1Request) InitializeRequest(initializeRequest InitializeRequest) ApiInitializeV1Request { - r.initializeRequest = &initializeRequest - return r -} - -func (r ApiInitializeV1Request) Execute() (*RunTransactionResponse, *http.Response, error) { - return r.ApiService.InitializeV1Execute(r) -} - -/* -InitializeV1 Method for InitializeV1 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInitializeV1Request -*/ -func (a *DefaultApiService) InitializeV1(ctx context.Context) ApiInitializeV1Request { - return ApiInitializeV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RunTransactionResponse -func (a *DefaultApiService) InitializeV1Execute(r ApiInitializeV1Request) (*RunTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InitializeV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.initializeRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiNewContractV1Request struct { - ctx context.Context - ApiService *DefaultApiService - newContractObj *NewContractObj -} - -func (r ApiNewContractV1Request) NewContractObj(newContractObj NewContractObj) ApiNewContractV1Request { - r.newContractObj = &newContractObj - return r -} - -func (r ApiNewContractV1Request) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.NewContractV1Execute(r) -} - -/* -NewContractV1 Method for NewContractV1 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiNewContractV1Request -*/ -func (a *DefaultApiService) NewContractV1(ctx context.Context) ApiNewContractV1Request { - return ApiNewContractV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) NewContractV1Execute(r ApiNewContractV1Request) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.NewContractV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.newContractObj - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRefundV1Request struct { - ctx context.Context - ApiService *DefaultApiService - refundReq *RefundReq -} - -func (r ApiRefundV1Request) RefundReq(refundReq RefundReq) ApiRefundV1Request { - r.refundReq = &refundReq - return r -} - -func (r ApiRefundV1Request) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.RefundV1Execute(r) -} - -/* -RefundV1 Method for RefundV1 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRefundV1Request -*/ -func (a *DefaultApiService) RefundV1(ctx context.Context) ApiRefundV1Request { - return ApiRefundV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) RefundV1Execute(r ApiRefundV1Request) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RefundV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.refundReq - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiWithdrawV1Request struct { - ctx context.Context - ApiService *DefaultApiService - withdrawReq *WithdrawReq -} - -func (r ApiWithdrawV1Request) WithdrawReq(withdrawReq WithdrawReq) ApiWithdrawV1Request { - r.withdrawReq = &withdrawReq - return r -} - -func (r ApiWithdrawV1Request) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.WithdrawV1Execute(r) -} - -/* -WithdrawV1 Method for WithdrawV1 - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiWithdrawV1Request -*/ -func (a *DefaultApiService) WithdrawV1(ctx context.Context) ApiWithdrawV1Request { - return ApiWithdrawV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) WithdrawV1Execute(r ApiWithdrawV1Request) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.WithdrawV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.withdrawReq - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 834cce4292..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - HTLC-ETH Besu API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 8c3ed42585..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index cb2f3464ec..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_get_single_status_request.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_get_single_status_request.go deleted file mode 100644 index 6248e87399..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_get_single_status_request.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the GetSingleStatusRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetSingleStatusRequest{} - -// GetSingleStatusRequest Defines the parameters for retrieving the single status of the HTLC swap. -type GetSingleStatusRequest struct { - Id string `json:"id"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - ConnectorId string `json:"connectorId"` - KeychainId string `json:"keychainId"` -} - -// NewGetSingleStatusRequest instantiates a new GetSingleStatusRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetSingleStatusRequest(id string, web3SigningCredential Web3SigningCredential, connectorId string, keychainId string) *GetSingleStatusRequest { - this := GetSingleStatusRequest{} - this.Id = id - this.Web3SigningCredential = web3SigningCredential - this.ConnectorId = connectorId - this.KeychainId = keychainId - return &this -} - -// NewGetSingleStatusRequestWithDefaults instantiates a new GetSingleStatusRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetSingleStatusRequestWithDefaults() *GetSingleStatusRequest { - this := GetSingleStatusRequest{} - return &this -} - -// GetId returns the Id field value -func (o *GetSingleStatusRequest) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *GetSingleStatusRequest) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *GetSingleStatusRequest) SetId(v string) { - o.Id = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *GetSingleStatusRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *GetSingleStatusRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *GetSingleStatusRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *GetSingleStatusRequest) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *GetSingleStatusRequest) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *GetSingleStatusRequest) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *GetSingleStatusRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *GetSingleStatusRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *GetSingleStatusRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o GetSingleStatusRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetSingleStatusRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableGetSingleStatusRequest struct { - value *GetSingleStatusRequest - isSet bool -} - -func (v NullableGetSingleStatusRequest) Get() *GetSingleStatusRequest { - return v.value -} - -func (v *NullableGetSingleStatusRequest) Set(val *GetSingleStatusRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGetSingleStatusRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGetSingleStatusRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetSingleStatusRequest(val *GetSingleStatusRequest) *NullableGetSingleStatusRequest { - return &NullableGetSingleStatusRequest{value: val, isSet: true} -} - -func (v NullableGetSingleStatusRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetSingleStatusRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_get_status_request.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_get_status_request.go deleted file mode 100644 index 352a1cb0f8..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_get_status_request.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the GetStatusRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetStatusRequest{} - -// GetStatusRequest Defines the parameters for retrieving the status of the HTLC swap. -type GetStatusRequest struct { - Ids []string `json:"ids"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - ConnectorId string `json:"connectorId"` - KeychainId string `json:"keychainId"` -} - -// NewGetStatusRequest instantiates a new GetStatusRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetStatusRequest(ids []string, web3SigningCredential Web3SigningCredential, connectorId string, keychainId string) *GetStatusRequest { - this := GetStatusRequest{} - this.Ids = ids - this.Web3SigningCredential = web3SigningCredential - this.ConnectorId = connectorId - this.KeychainId = keychainId - return &this -} - -// NewGetStatusRequestWithDefaults instantiates a new GetStatusRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetStatusRequestWithDefaults() *GetStatusRequest { - this := GetStatusRequest{} - return &this -} - -// GetIds returns the Ids field value -func (o *GetStatusRequest) GetIds() []string { - if o == nil { - var ret []string - return ret - } - - return o.Ids -} - -// GetIdsOk returns a tuple with the Ids field value -// and a boolean to check if the value has been set. -func (o *GetStatusRequest) GetIdsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Ids, true -} - -// SetIds sets field value -func (o *GetStatusRequest) SetIds(v []string) { - o.Ids = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *GetStatusRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *GetStatusRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *GetStatusRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *GetStatusRequest) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *GetStatusRequest) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *GetStatusRequest) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *GetStatusRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *GetStatusRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *GetStatusRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o GetStatusRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetStatusRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["ids"] = o.Ids - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableGetStatusRequest struct { - value *GetStatusRequest - isSet bool -} - -func (v NullableGetStatusRequest) Get() *GetStatusRequest { - return v.value -} - -func (v *NullableGetStatusRequest) Set(val *GetStatusRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGetStatusRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGetStatusRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetStatusRequest(val *GetStatusRequest) *NullableGetStatusRequest { - return &NullableGetStatusRequest{value: val, isSet: true} -} - -func (v NullableGetStatusRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetStatusRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_initialize_request.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_initialize_request.go deleted file mode 100644 index 7ed2607381..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_initialize_request.go +++ /dev/null @@ -1,236 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the InitializeRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InitializeRequest{} - -// InitializeRequest struct for InitializeRequest -type InitializeRequest struct { - // connectorId for the connector besu plugin - ConnectorId string `json:"connectorId"` - // keychainId for the keychain plugin - KeychainId string `json:"keychainId"` - ConstructorArgs []interface{} `json:"constructorArgs"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - Gas *float32 `json:"gas,omitempty"` -} - -// NewInitializeRequest instantiates a new InitializeRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInitializeRequest(connectorId string, keychainId string, constructorArgs []interface{}, web3SigningCredential Web3SigningCredential) *InitializeRequest { - this := InitializeRequest{} - this.ConnectorId = connectorId - this.KeychainId = keychainId - this.ConstructorArgs = constructorArgs - this.Web3SigningCredential = web3SigningCredential - return &this -} - -// NewInitializeRequestWithDefaults instantiates a new InitializeRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInitializeRequestWithDefaults() *InitializeRequest { - this := InitializeRequest{} - return &this -} - -// GetConnectorId returns the ConnectorId field value -func (o *InitializeRequest) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *InitializeRequest) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *InitializeRequest) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *InitializeRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *InitializeRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *InitializeRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetConstructorArgs returns the ConstructorArgs field value -func (o *InitializeRequest) GetConstructorArgs() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value -// and a boolean to check if the value has been set. -func (o *InitializeRequest) GetConstructorArgsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.ConstructorArgs, true -} - -// SetConstructorArgs sets field value -func (o *InitializeRequest) SetConstructorArgs(v []interface{}) { - o.ConstructorArgs = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *InitializeRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *InitializeRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *InitializeRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *InitializeRequest) GetGas() float32 { - if o == nil || IsNil(o.Gas) { - var ret float32 - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InitializeRequest) GetGasOk() (*float32, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *InitializeRequest) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given float32 and assigns it to the Gas field. -func (o *InitializeRequest) SetGas(v float32) { - o.Gas = &v -} - -func (o InitializeRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InitializeRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - toSerialize["constructorArgs"] = o.ConstructorArgs - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableInitializeRequest struct { - value *InitializeRequest - isSet bool -} - -func (v NullableInitializeRequest) Get() *InitializeRequest { - return v.value -} - -func (v *NullableInitializeRequest) Set(val *InitializeRequest) { - v.value = val - v.isSet = true -} - -func (v NullableInitializeRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableInitializeRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInitializeRequest(val *InitializeRequest) *NullableInitializeRequest { - return &NullableInitializeRequest{value: val, isSet: true} -} - -func (v NullableInitializeRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInitializeRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go deleted file mode 100644 index 35719c3348..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the InvokeContractV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractV1Response{} - -// InvokeContractV1Response struct for InvokeContractV1Response -type InvokeContractV1Response struct { - TransactionReceipt *Web3TransactionReceipt `json:"transactionReceipt,omitempty"` - CallOutput interface{} `json:"callOutput,omitempty"` - Success bool `json:"success"` -} - -// NewInvokeContractV1Response instantiates a new InvokeContractV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractV1Response(success bool) *InvokeContractV1Response { - this := InvokeContractV1Response{} - this.Success = success - return &this -} - -// NewInvokeContractV1ResponseWithDefaults instantiates a new InvokeContractV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractV1ResponseWithDefaults() *InvokeContractV1Response { - this := InvokeContractV1Response{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value if set, zero value otherwise. -func (o *InvokeContractV1Response) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil || IsNil(o.TransactionReceipt) { - var ret Web3TransactionReceipt - return ret - } - return *o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil || IsNil(o.TransactionReceipt) { - return nil, false - } - return o.TransactionReceipt, true -} - -// HasTransactionReceipt returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasTransactionReceipt() bool { - if o != nil && !IsNil(o.TransactionReceipt) { - return true - } - - return false -} - -// SetTransactionReceipt gets a reference to the given Web3TransactionReceipt and assigns it to the TransactionReceipt field. -func (o *InvokeContractV1Response) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = &v -} - -// GetCallOutput returns the CallOutput field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvokeContractV1Response) GetCallOutput() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CallOutput -} - -// GetCallOutputOk returns a tuple with the CallOutput field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvokeContractV1Response) GetCallOutputOk() (*interface{}, bool) { - if o == nil || IsNil(o.CallOutput) { - return nil, false - } - return &o.CallOutput, true -} - -// HasCallOutput returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasCallOutput() bool { - if o != nil && IsNil(o.CallOutput) { - return true - } - - return false -} - -// SetCallOutput gets a reference to the given interface{} and assigns it to the CallOutput field. -func (o *InvokeContractV1Response) SetCallOutput(v interface{}) { - o.CallOutput = v -} - -// GetSuccess returns the Success field value -func (o *InvokeContractV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *InvokeContractV1Response) SetSuccess(v bool) { - o.Success = v -} - -func (o InvokeContractV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.TransactionReceipt) { - toSerialize["transactionReceipt"] = o.TransactionReceipt - } - if o.CallOutput != nil { - toSerialize["callOutput"] = o.CallOutput - } - toSerialize["success"] = o.Success - return toSerialize, nil -} - -type NullableInvokeContractV1Response struct { - value *InvokeContractV1Response - isSet bool -} - -func (v NullableInvokeContractV1Response) Get() *InvokeContractV1Response { - return v.value -} - -func (v *NullableInvokeContractV1Response) Set(val *InvokeContractV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1Response(val *InvokeContractV1Response) *NullableInvokeContractV1Response { - return &NullableInvokeContractV1Response{value: val, isSet: true} -} - -func (v NullableInvokeContractV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_new_contract_obj.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_new_contract_obj.go deleted file mode 100644 index f12efbf930..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_new_contract_obj.go +++ /dev/null @@ -1,444 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the NewContractObj type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NewContractObj{} - -// NewContractObj struct for NewContractObj -type NewContractObj struct { - // Contract address - ContractAddress string `json:"contractAddress"` - InputAmount *float32 `json:"inputAmount,omitempty"` - OutputAmount float32 `json:"outputAmount"` - Expiration float32 `json:"expiration"` - HashLock string `json:"hashLock"` - Receiver *string `json:"receiver,omitempty"` - OutputNetwork string `json:"outputNetwork"` - OutputAddress string `json:"outputAddress"` - // connectorId for the connector besu plugin - ConnectorId string `json:"connectorId"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // keychainId for the keychian plugin - KeychainId string `json:"keychainId"` - Gas *NewContractObjGas `json:"gas,omitempty"` -} - -// NewNewContractObj instantiates a new NewContractObj object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewNewContractObj(contractAddress string, outputAmount float32, expiration float32, hashLock string, outputNetwork string, outputAddress string, connectorId string, web3SigningCredential Web3SigningCredential, keychainId string) *NewContractObj { - this := NewContractObj{} - this.ContractAddress = contractAddress - this.OutputAmount = outputAmount - this.Expiration = expiration - this.HashLock = hashLock - this.OutputNetwork = outputNetwork - this.OutputAddress = outputAddress - this.ConnectorId = connectorId - this.Web3SigningCredential = web3SigningCredential - this.KeychainId = keychainId - return &this -} - -// NewNewContractObjWithDefaults instantiates a new NewContractObj object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewNewContractObjWithDefaults() *NewContractObj { - this := NewContractObj{} - return &this -} - -// GetContractAddress returns the ContractAddress field value -func (o *NewContractObj) GetContractAddress() string { - if o == nil { - var ret string - return ret - } - - return o.ContractAddress -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractAddress, true -} - -// SetContractAddress sets field value -func (o *NewContractObj) SetContractAddress(v string) { - o.ContractAddress = v -} - -// GetInputAmount returns the InputAmount field value if set, zero value otherwise. -func (o *NewContractObj) GetInputAmount() float32 { - if o == nil || IsNil(o.InputAmount) { - var ret float32 - return ret - } - return *o.InputAmount -} - -// GetInputAmountOk returns a tuple with the InputAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetInputAmountOk() (*float32, bool) { - if o == nil || IsNil(o.InputAmount) { - return nil, false - } - return o.InputAmount, true -} - -// HasInputAmount returns a boolean if a field has been set. -func (o *NewContractObj) HasInputAmount() bool { - if o != nil && !IsNil(o.InputAmount) { - return true - } - - return false -} - -// SetInputAmount gets a reference to the given float32 and assigns it to the InputAmount field. -func (o *NewContractObj) SetInputAmount(v float32) { - o.InputAmount = &v -} - -// GetOutputAmount returns the OutputAmount field value -func (o *NewContractObj) GetOutputAmount() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.OutputAmount -} - -// GetOutputAmountOk returns a tuple with the OutputAmount field value -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetOutputAmountOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.OutputAmount, true -} - -// SetOutputAmount sets field value -func (o *NewContractObj) SetOutputAmount(v float32) { - o.OutputAmount = v -} - -// GetExpiration returns the Expiration field value -func (o *NewContractObj) GetExpiration() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Expiration -} - -// GetExpirationOk returns a tuple with the Expiration field value -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetExpirationOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Expiration, true -} - -// SetExpiration sets field value -func (o *NewContractObj) SetExpiration(v float32) { - o.Expiration = v -} - -// GetHashLock returns the HashLock field value -func (o *NewContractObj) GetHashLock() string { - if o == nil { - var ret string - return ret - } - - return o.HashLock -} - -// GetHashLockOk returns a tuple with the HashLock field value -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetHashLockOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashLock, true -} - -// SetHashLock sets field value -func (o *NewContractObj) SetHashLock(v string) { - o.HashLock = v -} - -// GetReceiver returns the Receiver field value if set, zero value otherwise. -func (o *NewContractObj) GetReceiver() string { - if o == nil || IsNil(o.Receiver) { - var ret string - return ret - } - return *o.Receiver -} - -// GetReceiverOk returns a tuple with the Receiver field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetReceiverOk() (*string, bool) { - if o == nil || IsNil(o.Receiver) { - return nil, false - } - return o.Receiver, true -} - -// HasReceiver returns a boolean if a field has been set. -func (o *NewContractObj) HasReceiver() bool { - if o != nil && !IsNil(o.Receiver) { - return true - } - - return false -} - -// SetReceiver gets a reference to the given string and assigns it to the Receiver field. -func (o *NewContractObj) SetReceiver(v string) { - o.Receiver = &v -} - -// GetOutputNetwork returns the OutputNetwork field value -func (o *NewContractObj) GetOutputNetwork() string { - if o == nil { - var ret string - return ret - } - - return o.OutputNetwork -} - -// GetOutputNetworkOk returns a tuple with the OutputNetwork field value -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetOutputNetworkOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OutputNetwork, true -} - -// SetOutputNetwork sets field value -func (o *NewContractObj) SetOutputNetwork(v string) { - o.OutputNetwork = v -} - -// GetOutputAddress returns the OutputAddress field value -func (o *NewContractObj) GetOutputAddress() string { - if o == nil { - var ret string - return ret - } - - return o.OutputAddress -} - -// GetOutputAddressOk returns a tuple with the OutputAddress field value -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetOutputAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OutputAddress, true -} - -// SetOutputAddress sets field value -func (o *NewContractObj) SetOutputAddress(v string) { - o.OutputAddress = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *NewContractObj) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *NewContractObj) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *NewContractObj) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *NewContractObj) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetKeychainId returns the KeychainId field value -func (o *NewContractObj) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *NewContractObj) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *NewContractObj) GetGas() NewContractObjGas { - if o == nil || IsNil(o.Gas) { - var ret NewContractObjGas - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NewContractObj) GetGasOk() (*NewContractObjGas, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *NewContractObj) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given NewContractObjGas and assigns it to the Gas field. -func (o *NewContractObj) SetGas(v NewContractObjGas) { - o.Gas = &v -} - -func (o NewContractObj) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NewContractObj) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractAddress"] = o.ContractAddress - if !IsNil(o.InputAmount) { - toSerialize["inputAmount"] = o.InputAmount - } - toSerialize["outputAmount"] = o.OutputAmount - toSerialize["expiration"] = o.Expiration - toSerialize["hashLock"] = o.HashLock - if !IsNil(o.Receiver) { - toSerialize["receiver"] = o.Receiver - } - toSerialize["outputNetwork"] = o.OutputNetwork - toSerialize["outputAddress"] = o.OutputAddress - toSerialize["connectorId"] = o.ConnectorId - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["keychainId"] = o.KeychainId - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableNewContractObj struct { - value *NewContractObj - isSet bool -} - -func (v NullableNewContractObj) Get() *NewContractObj { - return v.value -} - -func (v *NullableNewContractObj) Set(val *NewContractObj) { - v.value = val - v.isSet = true -} - -func (v NullableNewContractObj) IsSet() bool { - return v.isSet -} - -func (v *NullableNewContractObj) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNewContractObj(val *NewContractObj) *NullableNewContractObj { - return &NullableNewContractObj{value: val, isSet: true} -} - -func (v NullableNewContractObj) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNewContractObj) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_new_contract_obj_gas.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_new_contract_obj_gas.go deleted file mode 100644 index fa6d7ef8dd..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_new_contract_obj_gas.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" - "fmt" -) - -// NewContractObjGas - struct for NewContractObjGas -type NewContractObjGas struct { - Float32 *float32 - String *string -} - -// float32AsNewContractObjGas is a convenience function that returns float32 wrapped in NewContractObjGas -func Float32AsNewContractObjGas(v *float32) NewContractObjGas { - return NewContractObjGas{ - Float32: v, - } -} - -// stringAsNewContractObjGas is a convenience function that returns string wrapped in NewContractObjGas -func StringAsNewContractObjGas(v *string) NewContractObjGas { - return NewContractObjGas{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *NewContractObjGas) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Float32 - err = newStrictDecoder(data).Decode(&dst.Float32) - if err == nil { - jsonFloat32, _ := json.Marshal(dst.Float32) - if string(jsonFloat32) == "{}" { // empty struct - dst.Float32 = nil - } else { - match++ - } - } else { - dst.Float32 = nil - } - - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Float32 = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(NewContractObjGas)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(NewContractObjGas)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src NewContractObjGas) MarshalJSON() ([]byte, error) { - if src.Float32 != nil { - return json.Marshal(&src.Float32) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *NewContractObjGas) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Float32 != nil { - return obj.Float32 - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableNewContractObjGas struct { - value *NewContractObjGas - isSet bool -} - -func (v NullableNewContractObjGas) Get() *NewContractObjGas { - return v.value -} - -func (v *NullableNewContractObjGas) Set(val *NewContractObjGas) { - v.value = val - v.isSet = true -} - -func (v NullableNewContractObjGas) IsSet() bool { - return v.isSet -} - -func (v *NullableNewContractObjGas) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNewContractObjGas(val *NewContractObjGas) *NullableNewContractObjGas { - return &NullableNewContractObjGas{value: val, isSet: true} -} - -func (v NullableNewContractObjGas) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNewContractObjGas) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_refund_req.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_refund_req.go deleted file mode 100644 index b2ab789445..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_refund_req.go +++ /dev/null @@ -1,237 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the RefundReq type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RefundReq{} - -// RefundReq struct for RefundReq -type RefundReq struct { - // Contract htlc id for refund - Id string `json:"id"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // connectorId for the connector besu plugin - ConnectorId string `json:"connectorId"` - // keychainId for the keychain plugin - KeychainId string `json:"keychainId"` - Gas *NewContractObjGas `json:"gas,omitempty"` -} - -// NewRefundReq instantiates a new RefundReq object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRefundReq(id string, web3SigningCredential Web3SigningCredential, connectorId string, keychainId string) *RefundReq { - this := RefundReq{} - this.Id = id - this.Web3SigningCredential = web3SigningCredential - this.ConnectorId = connectorId - this.KeychainId = keychainId - return &this -} - -// NewRefundReqWithDefaults instantiates a new RefundReq object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRefundReqWithDefaults() *RefundReq { - this := RefundReq{} - return &this -} - -// GetId returns the Id field value -func (o *RefundReq) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *RefundReq) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *RefundReq) SetId(v string) { - o.Id = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *RefundReq) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *RefundReq) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *RefundReq) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *RefundReq) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *RefundReq) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *RefundReq) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *RefundReq) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *RefundReq) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *RefundReq) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *RefundReq) GetGas() NewContractObjGas { - if o == nil || IsNil(o.Gas) { - var ret NewContractObjGas - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RefundReq) GetGasOk() (*NewContractObjGas, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *RefundReq) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given NewContractObjGas and assigns it to the Gas field. -func (o *RefundReq) SetGas(v NewContractObjGas) { - o.Gas = &v -} - -func (o RefundReq) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RefundReq) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableRefundReq struct { - value *RefundReq - isSet bool -} - -func (v NullableRefundReq) Get() *RefundReq { - return v.value -} - -func (v *NullableRefundReq) Set(val *RefundReq) { - v.value = val - v.isSet = true -} - -func (v NullableRefundReq) IsSet() bool { - return v.isSet -} - -func (v *NullableRefundReq) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRefundReq(val *RefundReq) *NullableRefundReq { - return &NullableRefundReq{value: val, isSet: true} -} - -func (v NullableRefundReq) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRefundReq) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_run_transaction_response.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_run_transaction_response.go deleted file mode 100644 index 32a62f9472..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_run_transaction_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the RunTransactionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionResponse{} - -// RunTransactionResponse struct for RunTransactionResponse -type RunTransactionResponse struct { - TransactionReceipt Web3TransactionReceipt `json:"transactionReceipt"` -} - -// NewRunTransactionResponse instantiates a new RunTransactionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionResponse(transactionReceipt Web3TransactionReceipt) *RunTransactionResponse { - this := RunTransactionResponse{} - this.TransactionReceipt = transactionReceipt - return &this -} - -// NewRunTransactionResponseWithDefaults instantiates a new RunTransactionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionResponseWithDefaults() *RunTransactionResponse { - this := RunTransactionResponse{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value -func (o *RunTransactionResponse) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil { - var ret Web3TransactionReceipt - return ret - } - - return o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value -// and a boolean to check if the value has been set. -func (o *RunTransactionResponse) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil { - return nil, false - } - return &o.TransactionReceipt, true -} - -// SetTransactionReceipt sets field value -func (o *RunTransactionResponse) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = v -} - -func (o RunTransactionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["transactionReceipt"] = o.TransactionReceipt - return toSerialize, nil -} - -type NullableRunTransactionResponse struct { - value *RunTransactionResponse - isSet bool -} - -func (v NullableRunTransactionResponse) Get() *RunTransactionResponse { - return v.value -} - -func (v *NullableRunTransactionResponse) Set(val *RunTransactionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionResponse(val *RunTransactionResponse) *NullableRunTransactionResponse { - return &NullableRunTransactionResponse{value: val, isSet: true} -} - -func (v NullableRunTransactionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go deleted file mode 100644 index 434239483c..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredential - struct for Web3SigningCredential -type Web3SigningCredential struct { - Web3SigningCredentialCactusKeychainRef *Web3SigningCredentialCactusKeychainRef - Web3SigningCredentialNone *Web3SigningCredentialNone - Web3SigningCredentialPrivateKeyHex *Web3SigningCredentialPrivateKeyHex -} - -// Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialCactusKeychainRef wrapped in Web3SigningCredential -func Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential(v *Web3SigningCredentialCactusKeychainRef) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialCactusKeychainRef: v, - } -} - -// Web3SigningCredentialNoneAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialNone wrapped in Web3SigningCredential -func Web3SigningCredentialNoneAsWeb3SigningCredential(v *Web3SigningCredentialNone) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialNone: v, - } -} - -// Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialPrivateKeyHex wrapped in Web3SigningCredential -func Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential(v *Web3SigningCredentialPrivateKeyHex) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialPrivateKeyHex: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *Web3SigningCredential) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Web3SigningCredentialCactusKeychainRef - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialCactusKeychainRef) - if err == nil { - jsonWeb3SigningCredentialCactusKeychainRef, _ := json.Marshal(dst.Web3SigningCredentialCactusKeychainRef) - if string(jsonWeb3SigningCredentialCactusKeychainRef) == "{}" { // empty struct - dst.Web3SigningCredentialCactusKeychainRef = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialCactusKeychainRef = nil - } - - // try to unmarshal data into Web3SigningCredentialNone - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialNone) - if err == nil { - jsonWeb3SigningCredentialNone, _ := json.Marshal(dst.Web3SigningCredentialNone) - if string(jsonWeb3SigningCredentialNone) == "{}" { // empty struct - dst.Web3SigningCredentialNone = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialNone = nil - } - - // try to unmarshal data into Web3SigningCredentialPrivateKeyHex - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialPrivateKeyHex) - if err == nil { - jsonWeb3SigningCredentialPrivateKeyHex, _ := json.Marshal(dst.Web3SigningCredentialPrivateKeyHex) - if string(jsonWeb3SigningCredentialPrivateKeyHex) == "{}" { // empty struct - dst.Web3SigningCredentialPrivateKeyHex = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialPrivateKeyHex = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Web3SigningCredentialCactusKeychainRef = nil - dst.Web3SigningCredentialNone = nil - dst.Web3SigningCredentialPrivateKeyHex = nil - - return fmt.Errorf("data matches more than one schema in oneOf(Web3SigningCredential)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(Web3SigningCredential)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src Web3SigningCredential) MarshalJSON() ([]byte, error) { - if src.Web3SigningCredentialCactusKeychainRef != nil { - return json.Marshal(&src.Web3SigningCredentialCactusKeychainRef) - } - - if src.Web3SigningCredentialNone != nil { - return json.Marshal(&src.Web3SigningCredentialNone) - } - - if src.Web3SigningCredentialPrivateKeyHex != nil { - return json.Marshal(&src.Web3SigningCredentialPrivateKeyHex) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *Web3SigningCredential) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Web3SigningCredentialCactusKeychainRef != nil { - return obj.Web3SigningCredentialCactusKeychainRef - } - - if obj.Web3SigningCredentialNone != nil { - return obj.Web3SigningCredentialNone - } - - if obj.Web3SigningCredentialPrivateKeyHex != nil { - return obj.Web3SigningCredentialPrivateKeyHex - } - - // all schemas are nil - return nil -} - -type NullableWeb3SigningCredential struct { - value *Web3SigningCredential - isSet bool -} - -func (v NullableWeb3SigningCredential) Get() *Web3SigningCredential { - return v.value -} - -func (v *NullableWeb3SigningCredential) Set(val *Web3SigningCredential) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredential) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredential) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredential(val *Web3SigningCredential) *NullableWeb3SigningCredential { - return &NullableWeb3SigningCredential{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredential) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredential) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go deleted file mode 100644 index 2e85bf153d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialCactusKeychainRef type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialCactusKeychainRef{} - -// Web3SigningCredentialCactusKeychainRef struct for Web3SigningCredentialCactusKeychainRef -type Web3SigningCredentialCactusKeychainRef struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - KeychainEntryKey string `json:"keychainEntryKey"` - // The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - KeychainId string `json:"keychainId"` -} - -// NewWeb3SigningCredentialCactusKeychainRef instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialCactusKeychainRef(type_ Web3SigningCredentialType, ethAccount string, keychainEntryKey string, keychainId string) *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - this.Type = type_ - this.EthAccount = ethAccount - this.KeychainEntryKey = keychainEntryKey - this.KeychainId = keychainId - return &this -} - -// NewWeb3SigningCredentialCactusKeychainRefWithDefaults instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialCactusKeychainRefWithDefaults() *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialCactusKeychainRef) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialCactusKeychainRef) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetKeychainEntryKey returns the KeychainEntryKey field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKey() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainEntryKey -} - -// GetKeychainEntryKeyOk returns a tuple with the KeychainEntryKey field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainEntryKey, true -} - -// SetKeychainEntryKey sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainEntryKey(v string) { - o.KeychainEntryKey = v -} - -// GetKeychainId returns the KeychainId field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o Web3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialCactusKeychainRef) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["keychainEntryKey"] = o.KeychainEntryKey - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableWeb3SigningCredentialCactusKeychainRef struct { - value *Web3SigningCredentialCactusKeychainRef - isSet bool -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) Get() *Web3SigningCredentialCactusKeychainRef { - return v.value -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Set(val *Web3SigningCredentialCactusKeychainRef) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialCactusKeychainRef(val *Web3SigningCredentialCactusKeychainRef) *NullableWeb3SigningCredentialCactusKeychainRef { - return &NullableWeb3SigningCredentialCactusKeychainRef{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go deleted file mode 100644 index 8caa7833de..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialNone type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialNone{} - -// Web3SigningCredentialNone Using this denotes that there is no signing required because the transaction is pre-signed. -type Web3SigningCredentialNone struct { - Type Web3SigningCredentialType `json:"type"` -} - -// NewWeb3SigningCredentialNone instantiates a new Web3SigningCredentialNone object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialNone(type_ Web3SigningCredentialType) *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - this.Type = type_ - return &this -} - -// NewWeb3SigningCredentialNoneWithDefaults instantiates a new Web3SigningCredentialNone object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialNoneWithDefaults() *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialNone) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialNone) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialNone) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -func (o Web3SigningCredentialNone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialNone) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableWeb3SigningCredentialNone struct { - value *Web3SigningCredentialNone - isSet bool -} - -func (v NullableWeb3SigningCredentialNone) Get() *Web3SigningCredentialNone { - return v.value -} - -func (v *NullableWeb3SigningCredentialNone) Set(val *Web3SigningCredentialNone) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialNone) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialNone) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialNone(val *Web3SigningCredentialNone) *NullableWeb3SigningCredentialNone { - return &NullableWeb3SigningCredentialNone{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialNone) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialNone) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go deleted file mode 100644 index 91efe5ad93..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialPrivateKeyHex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialPrivateKeyHex{} - -// Web3SigningCredentialPrivateKeyHex struct for Web3SigningCredentialPrivateKeyHex -type Web3SigningCredentialPrivateKeyHex struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The HEX encoded private key of an eth account. - Secret string `json:"secret"` -} - -// NewWeb3SigningCredentialPrivateKeyHex instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialPrivateKeyHex(type_ Web3SigningCredentialType, ethAccount string, secret string) *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - this.Type = type_ - this.EthAccount = ethAccount - this.Secret = secret - return &this -} - -// NewWeb3SigningCredentialPrivateKeyHexWithDefaults instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialPrivateKeyHexWithDefaults() *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialPrivateKeyHex) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetSecret returns the Secret field value -func (o *Web3SigningCredentialPrivateKeyHex) GetSecret() string { - if o == nil { - var ret string - return ret - } - - return o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetSecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Secret, true -} - -// SetSecret sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetSecret(v string) { - o.Secret = v -} - -func (o Web3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialPrivateKeyHex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["secret"] = o.Secret - return toSerialize, nil -} - -type NullableWeb3SigningCredentialPrivateKeyHex struct { - value *Web3SigningCredentialPrivateKeyHex - isSet bool -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) Get() *Web3SigningCredentialPrivateKeyHex { - return v.value -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Set(val *Web3SigningCredentialPrivateKeyHex) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialPrivateKeyHex(val *Web3SigningCredentialPrivateKeyHex) *NullableWeb3SigningCredentialPrivateKeyHex { - return &NullableWeb3SigningCredentialPrivateKeyHex{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go deleted file mode 100644 index 734ca49d67..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredentialType the model 'Web3SigningCredentialType' -type Web3SigningCredentialType string - -// List of Web3SigningCredentialType -const ( - CACTUS_KEYCHAIN_REF Web3SigningCredentialType = "CACTUS_KEYCHAIN_REF" - GETH_KEYCHAIN_PASSWORD Web3SigningCredentialType = "GETH_KEYCHAIN_PASSWORD" - PRIVATE_KEY_HEX Web3SigningCredentialType = "PRIVATE_KEY_HEX" - NONE Web3SigningCredentialType = "NONE" -) - -// All allowed values of Web3SigningCredentialType enum -var AllowedWeb3SigningCredentialTypeEnumValues = []Web3SigningCredentialType{ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE", -} - -func (v *Web3SigningCredentialType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := Web3SigningCredentialType(value) - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Web3SigningCredentialType", value) -} - -// NewWeb3SigningCredentialTypeFromValue returns a pointer to a valid Web3SigningCredentialType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWeb3SigningCredentialTypeFromValue(v string) (*Web3SigningCredentialType, error) { - ev := Web3SigningCredentialType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Web3SigningCredentialType: valid values are %v", v, AllowedWeb3SigningCredentialTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v Web3SigningCredentialType) IsValid() bool { - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to Web3SigningCredentialType value -func (v Web3SigningCredentialType) Ptr() *Web3SigningCredentialType { - return &v -} - -type NullableWeb3SigningCredentialType struct { - value *Web3SigningCredentialType - isSet bool -} - -func (v NullableWeb3SigningCredentialType) Get() *Web3SigningCredentialType { - return v.value -} - -func (v *NullableWeb3SigningCredentialType) Set(val *Web3SigningCredentialType) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialType) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialType(val *Web3SigningCredentialType) *NullableWeb3SigningCredentialType { - return &NullableWeb3SigningCredentialType{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go deleted file mode 100644 index 35789eb59f..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go +++ /dev/null @@ -1,385 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the Web3TransactionReceipt type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3TransactionReceipt{} - -// Web3TransactionReceipt struct for Web3TransactionReceipt -type Web3TransactionReceipt struct { - Status bool `json:"status"` - TransactionHash string `json:"transactionHash"` - TransactionIndex float32 `json:"transactionIndex"` - BlockHash string `json:"blockHash"` - BlockNumber float32 `json:"blockNumber"` - GasUsed float32 `json:"gasUsed"` - ContractAddress NullableString `json:"contractAddress,omitempty"` - From string `json:"from"` - To string `json:"to"` - AdditionalProperties map[string]interface{} -} - -type _Web3TransactionReceipt Web3TransactionReceipt - -// NewWeb3TransactionReceipt instantiates a new Web3TransactionReceipt object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3TransactionReceipt(status bool, transactionHash string, transactionIndex float32, blockHash string, blockNumber float32, gasUsed float32, from string, to string) *Web3TransactionReceipt { - this := Web3TransactionReceipt{} - this.Status = status - this.TransactionHash = transactionHash - this.TransactionIndex = transactionIndex - this.BlockHash = blockHash - this.BlockNumber = blockNumber - this.GasUsed = gasUsed - this.From = from - this.To = to - return &this -} - -// NewWeb3TransactionReceiptWithDefaults instantiates a new Web3TransactionReceipt object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3TransactionReceiptWithDefaults() *Web3TransactionReceipt { - this := Web3TransactionReceipt{} - return &this -} - -// GetStatus returns the Status field value -func (o *Web3TransactionReceipt) GetStatus() bool { - if o == nil { - var ret bool - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetStatusOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *Web3TransactionReceipt) SetStatus(v bool) { - o.Status = v -} - -// GetTransactionHash returns the TransactionHash field value -func (o *Web3TransactionReceipt) GetTransactionHash() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionHash -} - -// GetTransactionHashOk returns a tuple with the TransactionHash field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTransactionHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionHash, true -} - -// SetTransactionHash sets field value -func (o *Web3TransactionReceipt) SetTransactionHash(v string) { - o.TransactionHash = v -} - -// GetTransactionIndex returns the TransactionIndex field value -func (o *Web3TransactionReceipt) GetTransactionIndex() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.TransactionIndex -} - -// GetTransactionIndexOk returns a tuple with the TransactionIndex field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTransactionIndexOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.TransactionIndex, true -} - -// SetTransactionIndex sets field value -func (o *Web3TransactionReceipt) SetTransactionIndex(v float32) { - o.TransactionIndex = v -} - -// GetBlockHash returns the BlockHash field value -func (o *Web3TransactionReceipt) GetBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockHash, true -} - -// SetBlockHash sets field value -func (o *Web3TransactionReceipt) SetBlockHash(v string) { - o.BlockHash = v -} - -// GetBlockNumber returns the BlockNumber field value -func (o *Web3TransactionReceipt) GetBlockNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetBlockNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.BlockNumber, true -} - -// SetBlockNumber sets field value -func (o *Web3TransactionReceipt) SetBlockNumber(v float32) { - o.BlockNumber = v -} - -// GetGasUsed returns the GasUsed field value -func (o *Web3TransactionReceipt) GetGasUsed() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.GasUsed -} - -// GetGasUsedOk returns a tuple with the GasUsed field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetGasUsedOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.GasUsed, true -} - -// SetGasUsed sets field value -func (o *Web3TransactionReceipt) SetGasUsed(v float32) { - o.GasUsed = v -} - -// GetContractAddress returns the ContractAddress field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Web3TransactionReceipt) GetContractAddress() string { - if o == nil || IsNil(o.ContractAddress.Get()) { - var ret string - return ret - } - return *o.ContractAddress.Get() -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Web3TransactionReceipt) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ContractAddress.Get(), o.ContractAddress.IsSet() -} - -// HasContractAddress returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasContractAddress() bool { - if o != nil && o.ContractAddress.IsSet() { - return true - } - - return false -} - -// SetContractAddress gets a reference to the given NullableString and assigns it to the ContractAddress field. -func (o *Web3TransactionReceipt) SetContractAddress(v string) { - o.ContractAddress.Set(&v) -} -// SetContractAddressNil sets the value for ContractAddress to be an explicit nil -func (o *Web3TransactionReceipt) SetContractAddressNil() { - o.ContractAddress.Set(nil) -} - -// UnsetContractAddress ensures that no value is present for ContractAddress, not even an explicit nil -func (o *Web3TransactionReceipt) UnsetContractAddress() { - o.ContractAddress.Unset() -} - -// GetFrom returns the From field value -func (o *Web3TransactionReceipt) GetFrom() string { - if o == nil { - var ret string - return ret - } - - return o.From -} - -// GetFromOk returns a tuple with the From field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetFromOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.From, true -} - -// SetFrom sets field value -func (o *Web3TransactionReceipt) SetFrom(v string) { - o.From = v -} - -// GetTo returns the To field value -func (o *Web3TransactionReceipt) GetTo() string { - if o == nil { - var ret string - return ret - } - - return o.To -} - -// GetToOk returns a tuple with the To field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetToOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.To, true -} - -// SetTo sets field value -func (o *Web3TransactionReceipt) SetTo(v string) { - o.To = v -} - -func (o Web3TransactionReceipt) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3TransactionReceipt) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["status"] = o.Status - toSerialize["transactionHash"] = o.TransactionHash - toSerialize["transactionIndex"] = o.TransactionIndex - toSerialize["blockHash"] = o.BlockHash - toSerialize["blockNumber"] = o.BlockNumber - toSerialize["gasUsed"] = o.GasUsed - if o.ContractAddress.IsSet() { - toSerialize["contractAddress"] = o.ContractAddress.Get() - } - toSerialize["from"] = o.From - toSerialize["to"] = o.To - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Web3TransactionReceipt) UnmarshalJSON(bytes []byte) (err error) { - varWeb3TransactionReceipt := _Web3TransactionReceipt{} - - if err = json.Unmarshal(bytes, &varWeb3TransactionReceipt); err == nil { - *o = Web3TransactionReceipt(varWeb3TransactionReceipt) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "status") - delete(additionalProperties, "transactionHash") - delete(additionalProperties, "transactionIndex") - delete(additionalProperties, "blockHash") - delete(additionalProperties, "blockNumber") - delete(additionalProperties, "gasUsed") - delete(additionalProperties, "contractAddress") - delete(additionalProperties, "from") - delete(additionalProperties, "to") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableWeb3TransactionReceipt struct { - value *Web3TransactionReceipt - isSet bool -} - -func (v NullableWeb3TransactionReceipt) Get() *Web3TransactionReceipt { - return v.value -} - -func (v *NullableWeb3TransactionReceipt) Set(val *Web3TransactionReceipt) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3TransactionReceipt) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3TransactionReceipt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3TransactionReceipt(val *Web3TransactionReceipt) *NullableWeb3TransactionReceipt { - return &NullableWeb3TransactionReceipt{value: val, isSet: true} -} - -func (v NullableWeb3TransactionReceipt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3TransactionReceipt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_withdraw_req.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_withdraw_req.go deleted file mode 100644 index 22d03135e4..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/model_withdraw_req.go +++ /dev/null @@ -1,265 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" -) - -// checks if the WithdrawReq type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WithdrawReq{} - -// WithdrawReq struct for WithdrawReq -type WithdrawReq struct { - // Contract locked id - Id string `json:"id"` - // Secret need to unlock the contract - Secret string `json:"secret"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // connectorId for the connector besu plugin - ConnectorId string `json:"connectorId"` - // keychainId for the keychain plugin - KeychainId string `json:"keychainId"` - Gas *NewContractObjGas `json:"gas,omitempty"` -} - -// NewWithdrawReq instantiates a new WithdrawReq object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWithdrawReq(id string, secret string, web3SigningCredential Web3SigningCredential, connectorId string, keychainId string) *WithdrawReq { - this := WithdrawReq{} - this.Id = id - this.Secret = secret - this.Web3SigningCredential = web3SigningCredential - this.ConnectorId = connectorId - this.KeychainId = keychainId - return &this -} - -// NewWithdrawReqWithDefaults instantiates a new WithdrawReq object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWithdrawReqWithDefaults() *WithdrawReq { - this := WithdrawReq{} - return &this -} - -// GetId returns the Id field value -func (o *WithdrawReq) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *WithdrawReq) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *WithdrawReq) SetId(v string) { - o.Id = v -} - -// GetSecret returns the Secret field value -func (o *WithdrawReq) GetSecret() string { - if o == nil { - var ret string - return ret - } - - return o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -func (o *WithdrawReq) GetSecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Secret, true -} - -// SetSecret sets field value -func (o *WithdrawReq) SetSecret(v string) { - o.Secret = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *WithdrawReq) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *WithdrawReq) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *WithdrawReq) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *WithdrawReq) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *WithdrawReq) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *WithdrawReq) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetKeychainId returns the KeychainId field value -func (o *WithdrawReq) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *WithdrawReq) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *WithdrawReq) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *WithdrawReq) GetGas() NewContractObjGas { - if o == nil || IsNil(o.Gas) { - var ret NewContractObjGas - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WithdrawReq) GetGasOk() (*NewContractObjGas, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *WithdrawReq) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given NewContractObjGas and assigns it to the Gas field. -func (o *WithdrawReq) SetGas(v NewContractObjGas) { - o.Gas = &v -} - -func (o WithdrawReq) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WithdrawReq) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["secret"] = o.Secret - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["connectorId"] = o.ConnectorId - toSerialize["keychainId"] = o.KeychainId - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - return toSerialize, nil -} - -type NullableWithdrawReq struct { - value *WithdrawReq - isSet bool -} - -func (v NullableWithdrawReq) Get() *WithdrawReq { - return v.value -} - -func (v *NullableWithdrawReq) Set(val *WithdrawReq) { - v.value = val - v.isSet = true -} - -func (v NullableWithdrawReq) IsSet() bool { - return v.isSet -} - -func (v *NullableWithdrawReq) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWithdrawReq(val *WithdrawReq) *NullableWithdrawReq { - return &NullableWithdrawReq{value: val, isSet: true} -} - -func (v NullableWithdrawReq) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWithdrawReq) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 608629dd70..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 48d38b538b..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-htlc-eth-besu - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-htlc-eth-besu_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService GetSingleStatusV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetSingleStatusV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetStatusV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetStatusV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService InitializeV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.InitializeV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService NewContractV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.NewContractV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RefundV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.RefundV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService WithdrawV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.WithdrawV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 5567db4a98..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - HTLC-ETH Besu - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-htlc-eth-besu - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/json/openapi.json b/packages/cactus-plugin-htlc-eth-besu/src/main/json/openapi.json deleted file mode 100644 index 459817ddfb..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/json/openapi.json +++ /dev/null @@ -1,638 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - HTLC-ETH Besu", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "NewContractObj": { - "type": "object", - "required": [ - "contractAddress", - "outputAmount", - "expiration", - "hashLock", - "outputNetwork", - "outputAddress", - "connectorId", - "web3SigningCredential", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "contractAddress": { - "description": "Contract address", - "type": "string", - "nullable": false - }, - "inputAmount": { - "type": "number" - }, - "outputAmount": { - "type": "number" - }, - "expiration": { - "type": "number" - }, - "hashLock": { - "type": "string" - }, - "receiver": { - "type": "string" - }, - "outputNetwork": { - "type": "string", - "nullable": false - }, - "outputAddress": { - "type": "string", - "nullable": false - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "keychainId": { - "description": "keychainId for the keychian plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "RefundReq": { - "type": "object", - "required": [ - "id", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "description": "Contract htlc id for refund", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "WithdrawReq": { - "type": "object", - "required": [ - "id", - "secret", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "description": "Contract locked id", - "type": "string", - "nullable": false - }, - "secret": { - "description": "Secret need to unlock the contract", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredentialType", - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "InitializeRequest": { - "type": "object", - "required": [ - "connectorId", - "keychainId", - "constructorArgs", - "web3SigningCredential" - ], - "additionalProperties": false, - "properties": { - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "description": "Web3SigningCredential", - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "gas": { - "type": "number" - } - } - }, - "GetStatusRequest": { - "description": "Defines the parameters for retrieving the status of the HTLC swap.", - "required": [ - "ids", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "connectorId": { - "type": "string" - }, - "keychainId": { - "type": "string" - } - } - }, - "GetSingleStatusRequest": { - "description": "Defines the parameters for retrieving the single status of the HTLC swap.", - "required": [ - "id", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "connectorId": { - "type": "string" - }, - "keychainId": { - "type": "string" - } - } - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": [ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE" - ] - }, - "Web3SigningCredentialCactusKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainId", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialPrivateKeyHex": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "secret": { - "type": "string", - "description": "The HEX encoded private key of an eth account.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialCactusKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialPrivateKeyHex" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3TransactionReceipt": { - "type": "object", - "required": [ - "blockHash", - "blockNumber", - "transactionHash", - "transactionIndex", - "status", - "from", - "to", - "gasUsed" - ], - "additionalProperties": true, - "properties": { - "status": { - "type": "boolean", - "nullable": false - }, - "transactionHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "transactionIndex": { - "type": "number", - "nullable": false - }, - "blockHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "blockNumber": { - "type": "number", - "nullable": false - }, - "gasUsed": { - "type": "number", - "nullable": false - }, - "contractAddress": { - "type": "string", - "nullable": true - }, - "from": { - "type": "string", - "nullable": false - }, - "to": { - "type": "string", - "nullable": false - } - } - }, - "InvokeContractV1Response": { - "type": "object", - "required": ["success"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - }, - "callOutput": {}, - "success": { - "type": "boolean", - "nullable": false - } - } - }, - "RunTransactionResponse": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - } - }, - "responses": { - "GetStatusResponse": { - "description": "Array of status", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "uint256" - } - } - } - } - }, - "GetSingleStatusResponse": { - "description": "Status", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "uint256" - } - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract" - } - }, - "operationId": "newContractV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewContractObj" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw" - } - }, - "operationId": "withdrawV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WithdrawReq" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund" - } - }, - "operationId": "refundV1", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefundReq" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status" - } - }, - "operationId": "getStatusV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStatusRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "$ref": "#/components/responses/GetStatusResponse" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status" - } - }, - "operationId": "getSingleStatusV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSingleStatusRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "$ref": "#/components/responses/GetSingleStatusResponse" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize" - } - }, - "operationId": "initializeV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InitializeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/json/openapi.tpl.json b/packages/cactus-plugin-htlc-eth-besu/src/main/json/openapi.tpl.json deleted file mode 100644 index a0f61f3318..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,467 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - HTLC-ETH Besu", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "NewContractObj": { - "type": "object", - "required": [ - "contractAddress", - "outputAmount", - "expiration", - "hashLock", - "outputNetwork", - "outputAddress", - "connectorId", - "web3SigningCredential", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "contractAddress": { - "description": "Contract address", - "type": "string", - "nullable": false - }, - "inputAmount": { - "type": "number" - }, - "outputAmount": { - "type": "number" - }, - "expiration": { - "type": "number" - }, - "hashLock": { - "type": "string" - }, - "receiver": { - "type": "string" - }, - "outputNetwork": { - "type": "string", - "nullable": false - }, - "outputAddress": { - "type": "string", - "nullable": false - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential" - }, - "keychainId": { - "description": "keychainId for the keychian plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "RefundReq": { - "type": "object", - "required": [ - "id", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "description": "Contract htlc id for refund", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential" - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "WithdrawReq": { - "type": "object", - "required": [ - "id", - "secret", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "description": "Contract locked id", - "type": "string", - "nullable": false - }, - "secret": { - "description": "Secret need to unlock the contract", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "description": "Web3SigningCredentialType", - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "InitializeRequest": { - "type": "object", - "required": [ - "connectorId", - "keychainId", - "constructorArgs", - "web3SigningCredential" - ], - "additionalProperties": false, - "properties": { - "connectorId": { - "description": "connectorId for the connector besu plugin", - "type": "string", - "nullable": false - }, - "keychainId": { - "description": "keychainId for the keychain plugin", - "type": "string", - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "description": "Web3SigningCredential", - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "gas": { - "type": "number" - } - } - }, - "GetStatusRequest": { - "description": "Defines the parameters for retrieving the status of the HTLC swap.", - "required": [ - "ids", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "web3SigningCredential": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential" - }, - "connectorId": { - "type": "string" - }, - "keychainId": { - "type": "string" - } - } - }, - "GetSingleStatusRequest": { - "description": "Defines the parameters for retrieving the single status of the HTLC swap.", - "required": [ - "id", - "web3SigningCredential", - "connectorId", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "web3SigningCredential": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/Web3SigningCredential" - }, - "connectorId": { - "type": "string" - }, - "keychainId": { - "type": "string" - } - } - } - }, - "responses": { - "GetStatusResponse": { - "description": "Array of status", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "uint256" - } - } - } - } - }, - "GetSingleStatusResponse": { - "description": "Status", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "uint256" - } - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract" - } - }, - "operationId": "newContractV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewContractObj" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw" - } - }, - "operationId": "withdrawV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WithdrawReq" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund" - } - }, - "operationId": "refundV1", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefundReq" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status" - } - }, - "operationId": "getStatusV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetStatusRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "$ref": "#/components/responses/GetStatusResponse" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status" - } - }, - "operationId": "getSingleStatusV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSingleStatusRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "$ref": "#/components/responses/GetSingleStatusResponse" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize" - } - }, - "operationId": "initializeV1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InitializeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "../../../../../packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json#/components/schemas/RunTransactionResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json b/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json deleted file mode 100644 index 24556a3e93..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json +++ /dev/null @@ -1,5827 +0,0 @@ -{ - "contractName": "HashTimeLock", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "outputAddress", - "type": "string" - } - ], - "name": "NewContract", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "Refund", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "secret", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "contractExists", - "outputs": [ - { - "internalType": "bool", - "name": "result", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "contracts", - "outputs": [ - { - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "status", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "internalType": "address payable", - "name": "sender", - "type": "address" - }, - { - "internalType": "address payable", - "name": "receiver", - "type": "address" - }, - { - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "internalType": "string", - "name": "outputAddress", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "getSingleStatus", - "outputs": [ - { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "ids", - "type": "bytes32[]" - } - ], - "name": "getStatus", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "internalType": "address payable", - "name": "receiver", - "type": "address" - }, - { - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "internalType": "string", - "name": "outputAddress", - "type": "string" - } - ], - "name": "newContract", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "secret", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"name\":\"NewContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Refund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"contractExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"contracts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"status\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getSingleStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"ids\",\"type\":\"bytes32[]\"}],\"name\":\"getStatus\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"}],\"name\":\"newContract\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol\":\"HashTimeLock\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol\":{\"keccak256\":\"0xef03f900c730f542f4cc625272085ccbc4e8318af9573b87d05779e6c0f3ac82\",\"urls\":[\"bzz-raw://2640489b365f0e9161335e75a31fc0c103550e6015d28dd035eca0e6537724c1\",\"dweb:/ipfs/QmWunBXi4R2jntRrCVLriicBGFUVQ35DUCiyyaV59y45nm\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b506111dd806100206000396000f3fe6080604052600436106100705760003560e01c80637249fbb61161004e5780637249fbb6146100fd578063d36320951461011d578063ec56a37314610130578063fbdf3b431461016557600080fd5b80632f21a6631461007557806363615149146100ab5780636c8244b8146100cd575b600080fd5b34801561008157600080fd5b50610095610090366004610ca4565b610193565b6040516100a29190610d62565b60405180910390f35b3480156100b757600080fd5b506100cb6100c6366004610da6565b610241565b005b3480156100d957600080fd5b506100ed6100e8366004610dc8565b6103cc565b60405190151581526020016100a2565b34801561010957600080fd5b506100cb610118366004610dc8565b610586565b6100cb61012b366004610e2a565b61069b565b34801561013c57600080fd5b5061015061014b366004610dc8565b610960565b6040516100a299989796959493929190610f1b565b34801561017157600080fd5b50610185610180366004610dc8565b610ac9565b6040519081526020016100a2565b60606000825167ffffffffffffffff8111156101b1576101b1610c8e565b6040519080825280602002602001820160405280156101da578160200160208202803683370190505b50905060005b835181101561023a5761020b8482815181106101fe576101fe610f8a565b6020026020010151610ac9565b82828151811061021d5761021d610f8a565b60209081029190910101528061023281610fa0565b9150506101e0565b5092915050565b6000828152602081905260409020600381015460011461029a5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b60448201526064015b60405180910390fd5b428160020154116102bd5760405162461bcd60e51b815260040161029190610fc7565b604080516020810184905201604051602081830303815290604052805190602001208160040154146103225760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d4d150d4915560921b6044820152606401610291565b600381810155600681015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610365573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b0393841693929092169186917f2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed131916103bf91888252602082015260400190565b60405180910390a4505050565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e084019161044c90610fed565b80601f016020809104026020016040519081016040528092919081815260200182805461047890610fed565b80156104c55780601f1061049a576101008083540402835291602001916104c5565b820191906000526020600020905b8154815290600101906020018083116104a857829003601f168201915b505050505081526020016008820180546104de90610fed565b80601f016020809104026020016040519081016040528092919081815260200182805461050a90610fed565b80156105575780601f1061052c57610100808354040283529160200191610557565b820191906000526020600020905b81548152906001019060200180831161053a57829003601f168201915b505050505081525050905060008160600151036105775750600092915050565b50600192915050565b50919050565b600081815260208190526040902060038101546001146105da5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b6044820152606401610291565b42816002015411156105fe5760405162461bcd60e51b815260040161029190610fc7565b60026003820155600581015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610642573d6000803e3d6000fd5b506006810154600582015460048301546040519081526001600160a01b03928316929091169084907f6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c25229060200160405180910390a45050565b33344289116106bc5760405162461bcd60e51b815260040161029190610fc7565b600081116106fd5760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d05353d5539560921b6044820152606401610291565b604080516001600160a01b038085166020830152891691810191909152606081018290526080810189905260a081018a905260009060c00160408051601f1981840301815291815281516020928301206000818152928390529120600301549091501561079a5760405162461bcd60e51b815260206004820152600b60248201526a535741505f45584953545360a81b6044820152606401610291565b6040518061012001604052808381526020018c81526020018b8152602001600181526020018a8152602001846001600160a01b03168152602001896001600160a01b0316815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8901819004810282018101909252878152918101919088908890819084018382808284376000920182905250939094525050838152602081815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a08301516005820180546001600160a01b039283166001600160a01b03199182161790915560c085015160068401805491909316911617905560e083015190915060078201906108df9082611070565b5061010082015160088201906108f59082611070565b50905050876001600160a01b0316836001600160a01b0316827f767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c858f8f8f8e8e8e8e60405161094b989796959493929190611159565b60405180910390a45050505050505050505050565b60006020819052908152604090208054600182015460028301546003840154600485015460058601546006870154600788018054979896979596949593946001600160a01b039384169493909216926109b890610fed565b80601f01602080910402602001604051908101604052809291908181526020018280546109e490610fed565b8015610a315780601f10610a0657610100808354040283529160200191610a31565b820191906000526020600020905b815481529060010190602001808311610a1457829003601f168201915b505050505090806008018054610a4690610fed565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7290610fed565b8015610abf5780601f10610a9457610100808354040283529160200191610abf565b820191906000526020600020905b815481529060010190602001808311610aa257829003601f168201915b5050505050905089565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e0840191610b4990610fed565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7590610fed565b8015610bc25780601f10610b9757610100808354040283529160200191610bc2565b820191906000526020600020905b815481529060010190602001808311610ba557829003601f168201915b50505050508152602001600882018054610bdb90610fed565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0790610fed565b8015610c545780601f10610c2957610100808354040283529160200191610c54565b820191906000526020600020905b815481529060010190602001808311610c3757829003601f168201915b505050505081525050905060018160600151148015610c765750428160400151105b15610c845760049150610580565b6060015192915050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610cb757600080fd5b823567ffffffffffffffff80821115610ccf57600080fd5b818501915085601f830112610ce357600080fd5b813581811115610cf557610cf5610c8e565b8060051b604051601f19603f83011681018181108582111715610d1a57610d1a610c8e565b604052918252848201925083810185019188831115610d3857600080fd5b938501935b82851015610d5657843584529385019392850192610d3d565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610d9a57835183529284019291840191600101610d7e565b50909695505050505050565b60008060408385031215610db957600080fd5b50508035926020909101359150565b600060208284031215610dda57600080fd5b5035919050565b60008083601f840112610df357600080fd5b50813567ffffffffffffffff811115610e0b57600080fd5b602083019150836020828501011115610e2357600080fd5b9250929050565b60008060008060008060008060c0898b031215610e4657600080fd5b88359750602089013596506040890135955060608901356001600160a01b0381168114610e7257600080fd5b9450608089013567ffffffffffffffff80821115610e8f57600080fd5b610e9b8c838d01610de1565b909650945060a08b0135915080821115610eb457600080fd5b50610ec18b828c01610de1565b999c989b5096995094979396929594505050565b6000815180845260005b81811015610efb57602081850181015186830182015201610edf565b506000602082860101526020601f19601f83011685010191505092915050565b60006101208b83528a602084015289604084015288606084015287608084015260018060a01b0380881660a085015280871660c0850152508060e0840152610f6581840186610ed5565b9050828103610100840152610f7a8185610ed5565b9c9b505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201610fc057634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252600c908201526b494e56414c49445f54494d4560a01b604082015260600190565b600181811c9082168061100157607f821691505b60208210810361058057634e487b7160e01b600052602260045260246000fd5b601f82111561106b57600081815260208120601f850160051c810160208610156110485750805b601f850160051c820191505b8181101561106757828155600101611054565b5050505b505050565b815167ffffffffffffffff81111561108a5761108a610c8e565b61109e816110988454610fed565b84611021565b602080601f8311600181146110d357600084156110bb5750858301515b600019600386901b1c1916600185901b178555611067565b600085815260208120601f198616915b82811015611102578886015182559484019460019091019084016110e3565b50858210156111205787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b88815287602082015286604082015285606082015260c06080820152600061118560c083018688611130565b82810360a0840152611198818587611130565b9b9a505050505050505050505056fea264697066735822122030bbf0da5a4d9f76e8e8e188736a3c81e856842b4cb98fa89761c5b98db9504364736f6c63430008130033", - "deployedBytecode": "6080604052600436106100705760003560e01c80637249fbb61161004e5780637249fbb6146100fd578063d36320951461011d578063ec56a37314610130578063fbdf3b431461016557600080fd5b80632f21a6631461007557806363615149146100ab5780636c8244b8146100cd575b600080fd5b34801561008157600080fd5b50610095610090366004610ca4565b610193565b6040516100a29190610d62565b60405180910390f35b3480156100b757600080fd5b506100cb6100c6366004610da6565b610241565b005b3480156100d957600080fd5b506100ed6100e8366004610dc8565b6103cc565b60405190151581526020016100a2565b34801561010957600080fd5b506100cb610118366004610dc8565b610586565b6100cb61012b366004610e2a565b61069b565b34801561013c57600080fd5b5061015061014b366004610dc8565b610960565b6040516100a299989796959493929190610f1b565b34801561017157600080fd5b50610185610180366004610dc8565b610ac9565b6040519081526020016100a2565b60606000825167ffffffffffffffff8111156101b1576101b1610c8e565b6040519080825280602002602001820160405280156101da578160200160208202803683370190505b50905060005b835181101561023a5761020b8482815181106101fe576101fe610f8a565b6020026020010151610ac9565b82828151811061021d5761021d610f8a565b60209081029190910101528061023281610fa0565b9150506101e0565b5092915050565b6000828152602081905260409020600381015460011461029a5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b60448201526064015b60405180910390fd5b428160020154116102bd5760405162461bcd60e51b815260040161029190610fc7565b604080516020810184905201604051602081830303815290604052805190602001208160040154146103225760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d4d150d4915560921b6044820152606401610291565b600381810155600681015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610365573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b0393841693929092169186917f2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed131916103bf91888252602082015260400190565b60405180910390a4505050565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e084019161044c90610fed565b80601f016020809104026020016040519081016040528092919081815260200182805461047890610fed565b80156104c55780601f1061049a576101008083540402835291602001916104c5565b820191906000526020600020905b8154815290600101906020018083116104a857829003601f168201915b505050505081526020016008820180546104de90610fed565b80601f016020809104026020016040519081016040528092919081815260200182805461050a90610fed565b80156105575780601f1061052c57610100808354040283529160200191610557565b820191906000526020600020905b81548152906001019060200180831161053a57829003601f168201915b505050505081525050905060008160600151036105775750600092915050565b50600192915050565b50919050565b600081815260208190526040902060038101546001146105da5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b6044820152606401610291565b42816002015411156105fe5760405162461bcd60e51b815260040161029190610fc7565b60026003820155600581015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610642573d6000803e3d6000fd5b506006810154600582015460048301546040519081526001600160a01b03928316929091169084907f6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c25229060200160405180910390a45050565b33344289116106bc5760405162461bcd60e51b815260040161029190610fc7565b600081116106fd5760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d05353d5539560921b6044820152606401610291565b604080516001600160a01b038085166020830152891691810191909152606081018290526080810189905260a081018a905260009060c00160408051601f1981840301815291815281516020928301206000818152928390529120600301549091501561079a5760405162461bcd60e51b815260206004820152600b60248201526a535741505f45584953545360a81b6044820152606401610291565b6040518061012001604052808381526020018c81526020018b8152602001600181526020018a8152602001846001600160a01b03168152602001896001600160a01b0316815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8901819004810282018101909252878152918101919088908890819084018382808284376000920182905250939094525050838152602081815260409182902084518155908401516001820155908301516002820155606083015160038201556080830151600482015560a08301516005820180546001600160a01b039283166001600160a01b03199182161790915560c085015160068401805491909316911617905560e083015190915060078201906108df9082611070565b5061010082015160088201906108f59082611070565b50905050876001600160a01b0316836001600160a01b0316827f767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c858f8f8f8e8e8e8e60405161094b989796959493929190611159565b60405180910390a45050505050505050505050565b60006020819052908152604090208054600182015460028301546003840154600485015460058601546006870154600788018054979896979596949593946001600160a01b039384169493909216926109b890610fed565b80601f01602080910402602001604051908101604052809291908181526020018280546109e490610fed565b8015610a315780601f10610a0657610100808354040283529160200191610a31565b820191906000526020600020905b815481529060010190602001808311610a1457829003601f168201915b505050505090806008018054610a4690610fed565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7290610fed565b8015610abf5780601f10610a9457610100808354040283529160200191610abf565b820191906000526020600020905b815481529060010190602001808311610aa257829003601f168201915b5050505050905089565b60008181526020818152604080832081516101208101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e0840191610b4990610fed565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7590610fed565b8015610bc25780601f10610b9757610100808354040283529160200191610bc2565b820191906000526020600020905b815481529060010190602001808311610ba557829003601f168201915b50505050508152602001600882018054610bdb90610fed565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0790610fed565b8015610c545780601f10610c2957610100808354040283529160200191610c54565b820191906000526020600020905b815481529060010190602001808311610c3757829003601f168201915b505050505081525050905060018160600151148015610c765750428160400151105b15610c845760049150610580565b6060015192915050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610cb757600080fd5b823567ffffffffffffffff80821115610ccf57600080fd5b818501915085601f830112610ce357600080fd5b813581811115610cf557610cf5610c8e565b8060051b604051601f19603f83011681018181108582111715610d1a57610d1a610c8e565b604052918252848201925083810185019188831115610d3857600080fd5b938501935b82851015610d5657843584529385019392850192610d3d565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610d9a57835183529284019291840191600101610d7e565b50909695505050505050565b60008060408385031215610db957600080fd5b50508035926020909101359150565b600060208284031215610dda57600080fd5b5035919050565b60008083601f840112610df357600080fd5b50813567ffffffffffffffff811115610e0b57600080fd5b602083019150836020828501011115610e2357600080fd5b9250929050565b60008060008060008060008060c0898b031215610e4657600080fd5b88359750602089013596506040890135955060608901356001600160a01b0381168114610e7257600080fd5b9450608089013567ffffffffffffffff80821115610e8f57600080fd5b610e9b8c838d01610de1565b909650945060a08b0135915080821115610eb457600080fd5b50610ec18b828c01610de1565b999c989b5096995094979396929594505050565b6000815180845260005b81811015610efb57602081850181015186830182015201610edf565b506000602082860101526020601f19601f83011685010191505092915050565b60006101208b83528a602084015289604084015288606084015287608084015260018060a01b0380881660a085015280871660c0850152508060e0840152610f6581840186610ed5565b9050828103610100840152610f7a8185610ed5565b9c9b505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201610fc057634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252600c908201526b494e56414c49445f54494d4560a01b604082015260600190565b600181811c9082168061100157607f821691505b60208210810361058057634e487b7160e01b600052602260045260246000fd5b601f82111561106b57600081815260208120601f850160051c810160208610156110485750805b601f850160051c820191505b8181101561106757828155600101611054565b5050505b505050565b815167ffffffffffffffff81111561108a5761108a610c8e565b61109e816110988454610fed565b84611021565b602080601f8311600181146110d357600084156110bb5750858301515b600019600386901b1c1916600185901b178555611067565b600085815260208120601f198616915b82811015611102578886015182559484019460019091019084016110e3565b50858210156111205787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b88815287602082015286604082015285606082015260c06080820152600061118560c083018688611130565b82810360a0840152611198818587611130565b9b9a505050505050505050505056fea264697066735822122030bbf0da5a4d9f76e8e8e188736a3c81e856842b4cb98fa89761c5b98db9504364736f6c63430008130033", - "sourceMap": "25:4079:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "25:4079:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3201:303;;;;;;;;;;-1:-1:-1;3201:303:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2380:460;;;;;;;;;;-1:-1:-1;2380:460:0;;;;;:::i;:::-;;:::i;:::-;;3845:257;;;;;;;;;;-1:-1:-1;3845:257:0;;;;;:::i;:::-;;:::i;:::-;;;2506:14:1;;2499:22;2481:41;;2469:2;2454:18;3845:257:0;2341:187:1;2846:349:0;;;;;;;;;;-1:-1:-1;2846:349:0;;;;;:::i;:::-;;:::i;1438:936::-;;;;;;:::i;:::-;;:::i;53:49::-;;;;;;;;;;-1:-1:-1;53:49:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;;;;;:::i;3510:329::-;;;;;;;;;;-1:-1:-1;3510:329:0;;;;;:::i;:::-;;:::i;:::-;;;5575:25:1;;;5563:2;5548:18;3510:329:0;5429:177:1;3201:303:0;3263:16;3291:23;3331:3;:10;3317:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3317:25:0;;3291:51;;3358:13;3353:121;3385:3;:10;3377:5;:18;3353:121;;;3436:27;3452:3;3456:5;3452:10;;;;;;;;:::i;:::-;;;;;;;3436:15;:27::i;:::-;3420:6;3427:5;3420:13;;;;;;;;:::i;:::-;;;;;;;;;;:43;3397:7;;;;:::i;:::-;;;;3353:121;;;-1:-1:-1;3491:6:0;3201:303;-1:-1:-1;;3201:303:0:o;2380:460::-;2445:22;2470:13;;;;;;;;;;2502:8;;;;323:1;2502:18;2494:46;;;;-1:-1:-1;;;2494:46:0;;6182:2:1;2494:46:0;;;6164:21:1;6221:2;6201:18;;;6194:30;-1:-1:-1;;;6240:18:1;;;6233:45;6295:18;;2494:46:0;;;;;;;;;2574:15;2559:1;:12;;;:30;2551:55;;;;-1:-1:-1;;;2551:55:0;;;;;;;:::i;:::-;2649:18;;;;;;5575:25:1;;;5548:18;2649::0;;;;;;;;;;;;2639:29;;;;;;2625:1;:10;;;:43;2617:70;;;;-1:-1:-1;;;2617:70:0;;7049:2:1;2617:70:0;;;7031:21:1;7088:2;7068:18;;;7061:30;-1:-1:-1;;;7107:18:1;;;7100:44;7161:18;;2617:70:0;6847:338:1;2617:70:0;479:1;2698:8;;;:20;2729:10;;;;2749:13;;2729:34;;-1:-1:-1;;;;;2729:10:0;;;;:34;;;;;2749:13;2729:10;:34;:10;:34;2749:13;2729:10;:34;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2822:10:0;;;;2812:8;;;;2800:10;;;;2779:54;;-1:-1:-1;;;;;2822:10:0;;;;2812:8;;;;;2788:2;;2779:54;;;;2792:6;7364:25:1;;7420:2;7405:18;;7398:34;7352:2;7337:18;;7190:248;2779:54:0;;;;;;;;2435:405;2380:460;;:::o;3845:257::-;3902:11;3960:13;;;;;;;;;;;3925:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3925:48:0;;;;;;;;;;;;;;;;;;;;;3902:11;;3925:48;3960:13;3925:48;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;247:1;3988:12;:19;;;:27;3984:112;;-1:-1:-1;4038:5:0;;3845:257;-1:-1:-1;;3845:257:0:o;3984:112::-;-1:-1:-1;4081:4:0;;3845:257;-1:-1:-1;;3845:257:0:o;3984:112::-;3915:187;3845:257;;;:::o;2846:349::-;2893:22;2918:13;;;;;;;;;;2950:8;;;;323:1;2950:18;2942:46;;;;-1:-1:-1;;;2942:46:0;;6182:2:1;2942:46:0;;;6164:21:1;6221:2;6201:18;;;6194:30;-1:-1:-1;;;6240:18:1;;;6233:45;6295:18;;2942:46:0;5980:339:1;2942:46:0;3023:15;3007:1;:12;;;:31;;2999:56;;;;-1:-1:-1;;;2999:56:0;;;;;;;:::i;:::-;407:1;3066:8;;;:19;3096:8;;;;3114:13;;3096:32;;-1:-1:-1;;;;;3096:8:0;;;;:32;;;;;3114:13;3096:8;:32;:8;:32;3114:13;3096:8;:32;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3177:10:0;;;;3167:8;;;;3155:10;;;;3144:44;;5575:25:1;;;-1:-1:-1;;;;;3177:10:0;;;;3167:8;;;;3151:2;;3144:44;;5563:2:1;5548:18;3144:44:0;;;;;;;2883:312;2846:349;:::o;1438:936::-;1721:10;1764:9;1805:15;1792:28;;1784:53;;;;-1:-1:-1;;;1784:53:0;;;;;;;:::i;:::-;1870:1;1856:11;:15;1848:42;;;;-1:-1:-1;;;1848:42:0;;8030:2:1;1848:42:0;;;8012:21:1;8069:2;8049:18;;;8042:30;-1:-1:-1;;;8088:18:1;;;8081:44;8142:18;;1848:42:0;7828:338:1;1848:42:0;1924:63;;;-1:-1:-1;;;;;8518:15:1;;;1924:63:0;;;8500:34:1;8570:15;;8550:18;;;8543:43;;;;8602:18;;;8595:34;;;8645:18;;;8638:34;;;8688:19;;;8681:35;;;1901:10:0;;8434:19:1;;1924:63:0;;;-1:-1:-1;;1924:63:0;;;;;;;;;1914:74;;1924:63;1914:74;;;;247:1;2007:13;;;;;;;;;:20;;;1914:74;;-1:-1:-1;2007:28:0;1999:52;;;;-1:-1:-1;;;1999:52:0;;8929:2:1;1999:52:0;;;8911:21:1;8968:2;8948:18;;;8941:30;-1:-1:-1;;;8987:18:1;;;8980:41;9038:18;;1999:52:0;8727:335:1;1999:52:0;2078:139;;;;;;;;2104:11;2078:139;;;;2117:12;2078:139;;;;2131:10;2078:139;;;;323:1;2078:139;;;;2151:8;2078:139;;;;2161:6;-1:-1:-1;;;;;2078:139:0;;;;;2169:8;-1:-1:-1;;;;;2078:139:0;;;;;2179:13;;2078:139;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2078:139:0;;;-1:-1:-1;2078:139:0;;;;;;;;;;;;;;;;;;;;;;;;;;;2194:13;;;;;;2078:139;;2194:13;;;;2078:139;;;;;;;;-1:-1:-1;2078:139:0;;;;-1:-1:-1;;2062:13:0;;;;;;;;;;;;:155;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2062:155:0;;;-1:-1:-1;;;;;;2062:155:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:13;;-1:-1:-1;2062:155:0;;;;;;;;:::i;:::-;-1:-1:-1;2062:155:0;;;;;;;;;;;;:::i;:::-;;;;;2319:8;-1:-1:-1;;;;;2233:134:0;2311:6;-1:-1:-1;;;;;2233:134:0;2297:2;2233:134;2258:11;2271:12;2285:10;2301:8;2329:13;;2344;;2233:134;;;;;;;;;;;;;:::i;:::-;;;;;;;;1678:696;;;1438:936;;;;;;;;:::o;53:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;53:49:0;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3510:329::-;3568:14;3629:13;;;;;;;;;;;3594:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3594:48:0;;;;;;;;;;;;;;;;;;;;;3568:14;;3594:48;3629:13;3594:48;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;323:1;3657:12;:19;;;:29;:74;;;;;3716:15;3690:12;:23;;;:41;3657:74;3653:180;;;550:1;3747:16;;3653:180;;;3803:19;;;;3510:329;-1:-1:-1;;3510:329:0:o;14:127:1:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:1115;230:6;261:2;304;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;360:9;347:23;389:18;430:2;422:6;419:14;416:34;;;446:1;443;436:12;416:34;484:6;473:9;469:22;459:32;;529:7;522:4;518:2;514:13;510:27;500:55;;551:1;548;541:12;500:55;587:2;574:16;609:2;605;602:10;599:36;;;615:18;;:::i;:::-;661:2;658:1;654:10;693:2;687:9;756:2;752:7;747:2;743;739:11;735:25;727:6;723:38;811:6;799:10;796:22;791:2;779:10;776:18;773:46;770:72;;;822:18;;:::i;:::-;858:2;851:22;908:18;;;942:15;;;;-1:-1:-1;984:11:1;;;980:20;;;1012:19;;;1009:39;;;1044:1;1041;1034:12;1009:39;1068:11;;;;1088:142;1104:6;1099:3;1096:15;1088:142;;;1170:17;;1158:30;;1121:12;;;;1208;;;;1088:142;;;1249:6;146:1115;-1:-1:-1;;;;;;;;146:1115:1:o;1266:632::-;1437:2;1489:21;;;1559:13;;1462:18;;;1581:22;;;1408:4;;1437:2;1660:15;;;;1634:2;1619:18;;;1408:4;1703:169;1717:6;1714:1;1711:13;1703:169;;;1778:13;;1766:26;;1847:15;;;;1812:12;;;;1739:1;1732:9;1703:169;;;-1:-1:-1;1889:3:1;;1266:632;-1:-1:-1;;;;;;1266:632:1:o;1903:248::-;1971:6;1979;2032:2;2020:9;2011:7;2007:23;2003:32;2000:52;;;2048:1;2045;2038:12;2000:52;-1:-1:-1;;2071:23:1;;;2141:2;2126:18;;;2113:32;;-1:-1:-1;1903:248:1:o;2156:180::-;2215:6;2268:2;2256:9;2247:7;2243:23;2239:32;2236:52;;;2284:1;2281;2274:12;2236:52;-1:-1:-1;2307:23:1;;2156:180;-1:-1:-1;2156:180:1:o;2533:348::-;2585:8;2595:6;2649:3;2642:4;2634:6;2630:17;2626:27;2616:55;;2667:1;2664;2657:12;2616:55;-1:-1:-1;2690:20:1;;2733:18;2722:30;;2719:50;;;2765:1;2762;2755:12;2719:50;2802:4;2794:6;2790:17;2778:29;;2854:3;2847:4;2838:6;2830;2826:19;2822:30;2819:39;2816:59;;;2871:1;2868;2861:12;2816:59;2533:348;;;;;:::o;2886:1110::-;3022:6;3030;3038;3046;3054;3062;3070;3078;3131:3;3119:9;3110:7;3106:23;3102:33;3099:53;;;3148:1;3145;3138:12;3099:53;3171:23;;;-1:-1:-1;3241:2:1;3226:18;;3213:32;;-1:-1:-1;3292:2:1;3277:18;;3264:32;;-1:-1:-1;3346:2:1;3331:18;;3318:32;-1:-1:-1;;;;;3379:31:1;;3369:42;;3359:70;;3425:1;3422;3415:12;3359:70;3448:5;-1:-1:-1;3504:3:1;3489:19;;3476:33;3528:18;3558:14;;;3555:34;;;3585:1;3582;3575:12;3555:34;3624:59;3675:7;3666:6;3655:9;3651:22;3624:59;:::i;:::-;3702:8;;-1:-1:-1;3598:85:1;-1:-1:-1;3790:3:1;3775:19;;3762:33;;-1:-1:-1;3807:16:1;;;3804:36;;;3836:1;3833;3826:12;3804:36;;3875:61;3928:7;3917:8;3906:9;3902:24;3875:61;:::i;:::-;2886:1110;;;;-1:-1:-1;2886:1110:1;;-1:-1:-1;2886:1110:1;;;;;;3955:8;-1:-1:-1;;;2886:1110:1:o;4001:423::-;4043:3;4081:5;4075:12;4108:6;4103:3;4096:19;4133:1;4143:162;4157:6;4154:1;4151:13;4143:162;;;4219:4;4275:13;;;4271:22;;4265:29;4247:11;;;4243:20;;4236:59;4172:12;4143:162;;;4147:3;4350:1;4343:4;4334:6;4329:3;4325:16;4321:27;4314:38;4413:4;4406:2;4402:7;4397:2;4389:6;4385:15;4381:29;4376:3;4372:39;4368:50;4361:57;;;4001:423;;;;:::o;4429:995::-;4817:4;4846:3;4876:6;4865:9;4858:25;4919:6;4914:2;4903:9;4899:18;4892:34;4962:6;4957:2;4946:9;4942:18;4935:34;5005:6;5000:2;4989:9;4985:18;4978:34;5049:6;5043:3;5032:9;5028:19;5021:35;5092:1;5088;5083:3;5079:11;5075:19;5143:2;5135:6;5131:15;5125:3;5114:9;5110:19;5103:44;5196:2;5188:6;5184:15;5178:3;5167:9;5163:19;5156:44;;5237:2;5231:3;5220:9;5216:19;5209:31;5263:45;5304:2;5293:9;5289:18;5281:6;5263:45;:::i;:::-;5249:59;;5357:9;5349:6;5345:22;5339:3;5328:9;5324:19;5317:51;5385:33;5411:6;5403;5385:33;:::i;:::-;5377:41;4429:995;-1:-1:-1;;;;;;;;;;;;4429:995:1:o;5611:127::-;5672:10;5667:3;5663:20;5660:1;5653:31;5703:4;5700:1;5693:15;5727:4;5724:1;5717:15;5743:232;5782:3;5803:17;;;5800:140;;5862:10;5857:3;5853:20;5850:1;5843:31;5897:4;5894:1;5887:15;5925:4;5922:1;5915:15;5800:140;-1:-1:-1;5967:1:1;5956:13;;5743:232::o;6324:336::-;6526:2;6508:21;;;6565:2;6545:18;;;6538:30;-1:-1:-1;;;6599:2:1;6584:18;;6577:42;6651:2;6636:18;;6324:336::o;7443:380::-;7522:1;7518:12;;;;7565;;;7586:61;;7640:4;7632:6;7628:17;7618:27;;7586:61;7693:2;7685:6;7682:14;7662:18;7659:38;7656:161;;7739:10;7734:3;7730:20;7727:1;7720:31;7774:4;7771:1;7764:15;7802:4;7799:1;7792:15;9193:545;9295:2;9290:3;9287:11;9284:448;;;9331:1;9356:5;9352:2;9345:17;9401:4;9397:2;9387:19;9471:2;9459:10;9455:19;9452:1;9448:27;9442:4;9438:38;9507:4;9495:10;9492:20;9489:47;;;-1:-1:-1;9530:4:1;9489:47;9585:2;9580:3;9576:12;9573:1;9569:20;9563:4;9559:31;9549:41;;9640:82;9658:2;9651:5;9648:13;9640:82;;;9703:17;;;9684:1;9673:13;9640:82;;;9644:3;;;9284:448;9193:545;;;:::o;9914:1352::-;10040:3;10034:10;10067:18;10059:6;10056:30;10053:56;;;10089:18;;:::i;:::-;10118:97;10208:6;10168:38;10200:4;10194:11;10168:38;:::i;:::-;10162:4;10118:97;:::i;:::-;10270:4;;10334:2;10323:14;;10351:1;10346:663;;;;11053:1;11070:6;11067:89;;;-1:-1:-1;11122:19:1;;;11116:26;11067:89;-1:-1:-1;;9871:1:1;9867:11;;;9863:24;9859:29;9849:40;9895:1;9891:11;;;9846:57;11169:81;;10316:944;;10346:663;9140:1;9133:14;;;9177:4;9164:18;;-1:-1:-1;;10382:20:1;;;10500:236;10514:7;10511:1;10508:14;10500:236;;;10603:19;;;10597:26;10582:42;;10695:27;;;;10663:1;10651:14;;;;10530:19;;10500:236;;;10504:3;10764:6;10755:7;10752:19;10749:201;;;10825:19;;;10819:26;-1:-1:-1;;10908:1:1;10904:14;;;10920:3;10900:24;10896:37;10892:42;10877:58;10862:74;;10749:201;-1:-1:-1;;;;;10996:1:1;10980:14;;;10976:22;10963:36;;-1:-1:-1;9914:1352:1:o;11271:267::-;11360:6;11355:3;11348:19;11412:6;11405:5;11398:4;11393:3;11389:14;11376:43;-1:-1:-1;11464:1:1;11439:16;;;11457:4;11435:27;;;11428:38;;;;11520:2;11499:15;;;-1:-1:-1;;11495:29:1;11486:39;;;11482:50;;11271:267::o;11543:725::-;11872:6;11861:9;11854:25;11915:6;11910:2;11899:9;11895:18;11888:34;11958:6;11953:2;11942:9;11938:18;11931:34;12001:6;11996:2;11985:9;11981:18;11974:34;12045:3;12039;12028:9;12024:19;12017:32;11835:4;12072:63;12130:3;12119:9;12115:19;12107:6;12099;12072:63;:::i;:::-;12184:9;12176:6;12172:22;12166:3;12155:9;12151:19;12144:51;12212:50;12255:6;12247;12239;12212:50;:::i;:::-;12204:58;11543:725;-1:-1:-1;;;;;;;;;;;11543:725:1:o", - "sourcePath": "/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol", - "compiler": { - "name": "solc", - "version": "0.8.19+commit.7dd6d404" - }, - "ast": { - "absolutePath": "/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol", - "exportedSymbols": { - "HashTimeLock": [ - 414 - ] - }, - "id": 415, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "0.8", - ".19" - ], - "nodeType": "PragmaDirective", - "src": "0:23:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "HashTimeLock", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 414, - "linearizedBaseContracts": [ - 414 - ], - "name": "HashTimeLock", - "nameLocation": "34:12:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "functionSelector": "ec56a373", - "id": 6, - "mutability": "mutable", - "name": "contracts", - "nameLocation": "93:9:0", - "nodeType": "VariableDeclaration", - "scope": 414, - "src": "53:49:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract)" - }, - "typeName": { - "id": 5, - "keyName": "", - "keyNameLocation": "-1:-1:-1", - "keyType": { - "id": 2, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "61:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "53:32:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract)" - }, - "valueName": "", - "valueNameLocation": "-1:-1:-1", - "valueType": { - "id": 4, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 3, - "name": "LockContract", - "nameLocations": [ - "72:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 40, - "src": "72:12:0" - }, - "referencedDeclaration": 40, - "src": "72:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - } - } - }, - "visibility": "public" - }, - { - "constant": true, - "id": 9, - "mutability": "constant", - "name": "INIT", - "nameLocation": "240:4:0", - "nodeType": "VariableDeclaration", - "scope": 414, - "src": "223:25:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "223:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "30", - "id": 8, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "247:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "internal" - }, - { - "constant": true, - "id": 12, - "mutability": "constant", - "name": "ACTIVE", - "nameLocation": "314:6:0", - "nodeType": "VariableDeclaration", - "scope": 414, - "src": "297:27:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "297:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "31", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "323:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "visibility": "internal" - }, - { - "constant": true, - "id": 15, - "mutability": "constant", - "name": "REFUNDED", - "nameLocation": "396:8:0", - "nodeType": "VariableDeclaration", - "scope": 414, - "src": "379:29:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "379:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "32", - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "407:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "visibility": "internal" - }, - { - "constant": true, - "id": 18, - "mutability": "constant", - "name": "WITHDRAWN", - "nameLocation": "467:9:0", - "nodeType": "VariableDeclaration", - "scope": 414, - "src": "450:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "450:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "33", - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "479:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "visibility": "internal" - }, - { - "constant": true, - "id": 21, - "mutability": "constant", - "name": "EXPIRED", - "nameLocation": "540:7:0", - "nodeType": "VariableDeclaration", - "scope": 414, - "src": "523:28:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "34", - "id": 20, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "550:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - }, - "visibility": "internal" - }, - { - "canonicalName": "HashTimeLock.LockContract", - "id": 40, - "members": [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "637:11:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "629:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "629:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "outputAmount", - "nameLocation": "666:12:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "658:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 24, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "658:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 27, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "696:10:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "688:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 26, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "688:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "status", - "nameLocation": "724:6:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "716:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "716:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 31, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "748:8:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "740:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 30, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "740:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 33, - "mutability": "mutable", - "name": "sender", - "nameLocation": "782:6:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "766:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 32, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "766:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 35, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "814:8:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "798:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 34, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "798:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "outputNetwork", - "nameLocation": "839:13:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "832:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 36, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "832:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 39, - "mutability": "mutable", - "name": "outputAddress", - "nameLocation": "869:13:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "862:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 38, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "862:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "name": "LockContract", - "nameLocation": "606:12:0", - "nodeType": "StructDefinition", - "scope": 414, - "src": "599:290:0", - "visibility": "public" - }, - { - "anonymous": false, - "eventSelector": "2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed131", - "id": 52, - "name": "Withdraw", - "nameLocation": "901:8:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 51, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 42, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nameLocation": "935:2:0", - "nodeType": "VariableDeclaration", - "scope": 52, - "src": "919:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 41, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "919:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 44, - "indexed": false, - "mutability": "mutable", - "name": "secret", - "nameLocation": "947:6:0", - "nodeType": "VariableDeclaration", - "scope": 52, - "src": "939:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 43, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "939:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "963:8:0", - "nodeType": "VariableDeclaration", - "scope": 52, - "src": "955:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 45, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "955:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nameLocation": "989:6:0", - "nodeType": "VariableDeclaration", - "scope": 52, - "src": "973:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 47, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "973:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 50, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "1013:8:0", - "nodeType": "VariableDeclaration", - "scope": 52, - "src": "997:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 49, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "997:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "909:118:0" - }, - "src": "895:133:0" - }, - { - "anonymous": false, - "eventSelector": "6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c2522", - "id": 62, - "name": "Refund", - "nameLocation": "1040:6:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 61, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 54, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nameLocation": "1063:2:0", - "nodeType": "VariableDeclaration", - "scope": 62, - "src": "1047:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 53, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1047:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 56, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "1075:8:0", - "nodeType": "VariableDeclaration", - "scope": 62, - "src": "1067:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 55, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1067:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 58, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nameLocation": "1101:6:0", - "nodeType": "VariableDeclaration", - "scope": 62, - "src": "1085:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 57, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1085:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 60, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "1125:8:0", - "nodeType": "VariableDeclaration", - "scope": 62, - "src": "1109:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 59, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1109:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "1046:88:0" - }, - "src": "1034:101:0" - }, - { - "anonymous": false, - "eventSelector": "767d0ffbc3d16cc51fc05770a22976e4b0fda9198e37878b76979429b2d5d88c", - "id": 82, - "name": "NewContract", - "nameLocation": "1147:11:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 81, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 64, - "indexed": false, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "1176:11:0", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "1168:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 63, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1168:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 66, - "indexed": false, - "mutability": "mutable", - "name": "outputAmount", - "nameLocation": "1205:12:0", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "1197:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 65, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1197:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 68, - "indexed": false, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "1235:10:0", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "1227:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1227:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 70, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nameLocation": "1271:2:0", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "1255:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 69, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1255:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 72, - "indexed": false, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "1291:8:0", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "1283:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 71, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1283:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 74, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nameLocation": "1325:6:0", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "1309:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 73, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1309:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "1357:8:0", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "1341:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 75, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1341:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 78, - "indexed": false, - "mutability": "mutable", - "name": "outputNetwork", - "nameLocation": "1382:13:0", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "1375:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 77, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1375:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 80, - "indexed": false, - "mutability": "mutable", - "name": "outputAddress", - "nameLocation": "1412:13:0", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "1405:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 79, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1405:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1158:273:0" - }, - "src": "1141:291:0" - }, - { - "body": { - "id": 176, - "nodeType": "Block", - "src": "1678:696:0", - "statements": [ - { - "assignments": [ - 98 - ], - "declarations": [ - { - "constant": false, - "id": 98, - "mutability": "mutable", - "name": "sender", - "nameLocation": "1704:6:0", - "nodeType": "VariableDeclaration", - "scope": 176, - "src": "1688:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 97, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1688:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - } - ], - "id": 104, - "initialValue": { - "arguments": [ - { - "expression": { - "id": 101, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1721:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1725:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1721:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 100, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1713:8:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_payable_$", - "typeString": "type(address payable)" - }, - "typeName": { - "id": 99, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1713:8:0", - "stateMutability": "payable", - "typeDescriptions": {} - } - }, - "id": 103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1713:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1688:44:0" - }, - { - "assignments": [ - 106 - ], - "declarations": [ - { - "constant": false, - "id": 106, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "1750:11:0", - "nodeType": "VariableDeclaration", - "scope": 176, - "src": "1742:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1742:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 109, - "initialValue": { - "expression": { - "id": 107, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1764:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1768:5:0", - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1764:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1742:31:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 111, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "1792:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "expression": { - "id": 112, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "1805:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1811:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "1805:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1792:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1822:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 110, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1784:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1784:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 117, - "nodeType": "ExpressionStatement", - "src": "1784:53:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 119, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "1856:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 120, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1870:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1856:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f414d4f554e54", - "id": 122, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1873:16:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", - "typeString": "literal_string \"INVALID_AMOUNT\"" - }, - "value": "INVALID_AMOUNT" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", - "typeString": "literal_string \"INVALID_AMOUNT\"" - } - ], - "id": 118, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1848:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1848:42:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 124, - "nodeType": "ExpressionStatement", - "src": "1848:42:0" - }, - { - "assignments": [ - 126 - ], - "declarations": [ - { - "constant": false, - "id": 126, - "mutability": "mutable", - "name": "id", - "nameLocation": "1909:2:0", - "nodeType": "VariableDeclaration", - "scope": 176, - "src": "1901:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 125, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1901:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "id": 137, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "id": 130, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "1935:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 131, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1943:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 132, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "1953:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 133, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "1966:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 134, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "1976:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 128, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "1924:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 129, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "1928:6:0", - "memberName": "encode", - "nodeType": "MemberAccess", - "src": "1924:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1924:63:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 127, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "1914:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1914:74:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1901:87:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 139, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "2007:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 141, - "indexExpression": { - "id": 140, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "2017:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2007:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "id": 142, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2021:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "2007:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 143, - "name": "INIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "2031:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2007:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f455849535453", - "id": 145, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2037:13:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", - "typeString": "literal_string \"SWAP_EXISTS\"" - }, - "value": "SWAP_EXISTS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", - "typeString": "literal_string \"SWAP_EXISTS\"" - } - ], - "id": 138, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1999:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1999:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 147, - "nodeType": "ExpressionStatement", - "src": "1999:52:0" - }, - { - "expression": { - "id": 162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 148, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "2062:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 150, - "indexExpression": { - "id": 149, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "2072:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2062:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "id": 152, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "2104:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 153, - "name": "outputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "2117:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 154, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "2131:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 155, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "2143:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 156, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "2151:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 157, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "2161:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 158, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2169:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 159, - "name": "outputNetwork", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "2179:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "id": 160, - "name": "outputAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "2194:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 151, - "name": "LockContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "2078:12:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_LockContract_$40_storage_ptr_$", - "typeString": "type(struct HashTimeLock.LockContract storage pointer)" - } - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2078:139:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", - "typeString": "struct HashTimeLock.LockContract memory" - } - }, - "src": "2062:155:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "id": 163, - "nodeType": "ExpressionStatement", - "src": "2062:155:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 165, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "2258:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 166, - "name": "outputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "2271:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 167, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 86, - "src": "2285:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 168, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "2297:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 169, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "2301:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 170, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "2311:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 171, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2319:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 172, - "name": "outputNetwork", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "2329:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "id": 173, - "name": "outputAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "2344:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 164, - "name": "NewContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 82, - "src": "2233:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,uint256,bytes32,bytes32,address,address,string memory,string memory)" - } - }, - "id": 174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2233:134:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 175, - "nodeType": "EmitStatement", - "src": "2228:139:0" - } - ] - }, - "functionSelector": "d3632095", - "id": 177, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "newContract", - "nameLocation": "1447:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 95, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 84, - "mutability": "mutable", - "name": "outputAmount", - "nameLocation": "1476:12:0", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "1468:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 83, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1468:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 86, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "1506:10:0", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "1498:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 85, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1498:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 88, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "1534:8:0", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "1526:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 87, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1526:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 90, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "1568:8:0", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "1552:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 89, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1552:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 92, - "mutability": "mutable", - "name": "outputNetwork", - "nameLocation": "1602:13:0", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "1586:29:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 91, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1586:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 94, - "mutability": "mutable", - "name": "outputAddress", - "nameLocation": "1641:13:0", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "1625:29:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 93, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1625:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1458:202:0" - }, - "returnParameters": { - "id": 96, - "nodeType": "ParameterList", - "parameters": [], - "src": "1678:0:0" - }, - "scope": 414, - "src": "1438:936:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 247, - "nodeType": "Block", - "src": "2435:405:0", - "statements": [ - { - "assignments": [ - 186 - ], - "declarations": [ - { - "constant": false, - "id": 186, - "mutability": "mutable", - "name": "c", - "nameLocation": "2466:1:0", - "nodeType": "VariableDeclaration", - "scope": 247, - "src": "2445:22:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - }, - "typeName": { - "id": 185, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 184, - "name": "LockContract", - "nameLocations": [ - "2445:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 40, - "src": "2445:12:0" - }, - "referencedDeclaration": 40, - "src": "2445:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 190, - "initialValue": { - "baseExpression": { - "id": 187, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "2470:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 189, - "indexExpression": { - "id": 188, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 179, - "src": "2480:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2470:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2445:38:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 192, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 186, - "src": "2502:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 193, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2504:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "2502:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 194, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "2514:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2502:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f4e4f545f414354495645", - "id": 196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2522:17:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - }, - "value": "SWAP_NOT_ACTIVE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - } - ], - "id": 191, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2494:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2494:46:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 198, - "nodeType": "ExpressionStatement", - "src": "2494:46:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 200, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 186, - "src": "2559:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 201, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2561:10:0", - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "2559:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "expression": { - "id": 202, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "2574:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2580:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "2574:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2559:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 205, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2591:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 199, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2551:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2551:55:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 207, - "nodeType": "ExpressionStatement", - "src": "2551:55:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 209, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 186, - "src": "2625:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 210, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2627:8:0", - "memberName": "hashLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "2625:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 214, - "name": "secret", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 181, - "src": "2660:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "id": 212, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "2649:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 213, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "2653:6:0", - "memberName": "encode", - "nodeType": "MemberAccess", - "src": "2649:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2649:18:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 211, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "2639:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2639:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "2625:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f534543524554", - "id": 218, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2670:16:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", - "typeString": "literal_string \"INVALID_SECRET\"" - }, - "value": "INVALID_SECRET" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", - "typeString": "literal_string \"INVALID_SECRET\"" - } - ], - "id": 208, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2617:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2617:70:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 220, - "nodeType": "ExpressionStatement", - "src": "2617:70:0" - }, - { - "expression": { - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "id": 221, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 186, - "src": "2698:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 223, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "2700:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "2698:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 224, - "name": "WITHDRAWN", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "2709:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2698:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 226, - "nodeType": "ExpressionStatement", - "src": "2698:20:0" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "id": 232, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 186, - "src": "2749:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 233, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2751:11:0", - "memberName": "inputAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "2749:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "expression": { - "id": 227, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 186, - "src": "2729:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 230, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2731:8:0", - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "2729:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2740:8:0", - "memberName": "transfer", - "nodeType": "MemberAccess", - "src": "2729:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2729:34:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 235, - "nodeType": "ExpressionStatement", - "src": "2729:34:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 237, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 179, - "src": "2788:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 238, - "name": "secret", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 181, - "src": "2792:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 239, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 186, - "src": "2800:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 240, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2802:8:0", - "memberName": "hashLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "2800:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 241, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 186, - "src": "2812:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 242, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2814:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "2812:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "expression": { - "id": 243, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 186, - "src": "2822:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 244, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2824:8:0", - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "2822:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 236, - "name": "Withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "2779:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$returns$__$", - "typeString": "function (bytes32,bytes32,bytes32,address,address)" - } - }, - "id": 245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2779:54:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 246, - "nodeType": "EmitStatement", - "src": "2774:59:0" - } - ] - }, - "functionSelector": "63615149", - "id": 248, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nameLocation": "2389:8:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 182, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 179, - "mutability": "mutable", - "name": "id", - "nameLocation": "2406:2:0", - "nodeType": "VariableDeclaration", - "scope": 248, - "src": "2398:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 178, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2398:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 181, - "mutability": "mutable", - "name": "secret", - "nameLocation": "2418:6:0", - "nodeType": "VariableDeclaration", - "scope": 248, - "src": "2410:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 180, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2410:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "2397:28:0" - }, - "returnParameters": { - "id": 183, - "nodeType": "ParameterList", - "parameters": [], - "src": "2435:0:0" - }, - "scope": 414, - "src": "2380:460:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 302, - "nodeType": "Block", - "src": "2883:312:0", - "statements": [ - { - "assignments": [ - 255 - ], - "declarations": [ - { - "constant": false, - "id": 255, - "mutability": "mutable", - "name": "c", - "nameLocation": "2914:1:0", - "nodeType": "VariableDeclaration", - "scope": 302, - "src": "2893:22:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - }, - "typeName": { - "id": 254, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 253, - "name": "LockContract", - "nameLocations": [ - "2893:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 40, - "src": "2893:12:0" - }, - "referencedDeclaration": 40, - "src": "2893:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 259, - "initialValue": { - "baseExpression": { - "id": 256, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "2918:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 258, - "indexExpression": { - "id": 257, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 250, - "src": "2928:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2918:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2893:38:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 261, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "2950:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 262, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2952:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "2950:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 263, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "2962:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2950:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f4e4f545f414354495645", - "id": 265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2970:17:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - }, - "value": "SWAP_NOT_ACTIVE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - } - ], - "id": 260, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2942:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2942:46:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 267, - "nodeType": "ExpressionStatement", - "src": "2942:46:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 273, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 269, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "3007:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 270, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3009:10:0", - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "3007:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "expression": { - "id": 271, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "3023:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3029:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "3023:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3007:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3040:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 268, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2999:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2999:56:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 276, - "nodeType": "ExpressionStatement", - "src": "2999:56:0" - }, - { - "expression": { - "id": 281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "id": 277, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "3066:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 279, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "3068:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "3066:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 280, - "name": "REFUNDED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "3077:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3066:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 282, - "nodeType": "ExpressionStatement", - "src": "3066:19:0" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "id": 288, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "3114:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 289, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3116:11:0", - "memberName": "inputAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "3114:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "expression": { - "id": 283, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "3096:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 286, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3098:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "3096:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3105:8:0", - "memberName": "transfer", - "nodeType": "MemberAccess", - "src": "3096:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3096:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 291, - "nodeType": "ExpressionStatement", - "src": "3096:32:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 293, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 250, - "src": "3151:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 294, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "3155:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 295, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3157:8:0", - "memberName": "hashLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 31, - "src": "3155:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 296, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "3167:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 297, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3169:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 33, - "src": "3167:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "expression": { - "id": 298, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "3177:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract storage pointer" - } - }, - "id": 299, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3179:8:0", - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "3177:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 292, - "name": "Refund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "3144:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$returns$__$", - "typeString": "function (bytes32,bytes32,address,address)" - } - }, - "id": 300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3144:44:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 301, - "nodeType": "EmitStatement", - "src": "3139:49:0" - } - ] - }, - "functionSelector": "7249fbb6", - "id": 303, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "refund", - "nameLocation": "2855:6:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 250, - "mutability": "mutable", - "name": "id", - "nameLocation": "2870:2:0", - "nodeType": "VariableDeclaration", - "scope": 303, - "src": "2862:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 249, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2862:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "2861:12:0" - }, - "returnParameters": { - "id": 252, - "nodeType": "ParameterList", - "parameters": [], - "src": "2883:0:0" - }, - "scope": 414, - "src": "2846:349:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 349, - "nodeType": "Block", - "src": "3281:223:0", - "statements": [ - { - "assignments": [ - 316 - ], - "declarations": [ - { - "constant": false, - "id": 316, - "mutability": "mutable", - "name": "result", - "nameLocation": "3308:6:0", - "nodeType": "VariableDeclaration", - "scope": 349, - "src": "3291:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 314, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3291:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 315, - "nodeType": "ArrayTypeName", - "src": "3291:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "visibility": "internal" - } - ], - "id": 323, - "initialValue": { - "arguments": [ - { - "expression": { - "id": 320, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 306, - "src": "3331:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3335:6:0", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "3331:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 319, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "3317:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 317, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3321:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 318, - "nodeType": "ArrayTypeName", - "src": "3321:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3317:25:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3291:51:0" - }, - { - "body": { - "id": 345, - "nodeType": "Block", - "src": "3406:68:0", - "statements": [ - { - "expression": { - "id": 343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 335, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 316, - "src": "3420:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 337, - "indexExpression": { - "id": 336, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 325, - "src": "3427:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3420:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "baseExpression": { - "id": 339, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 306, - "src": "3452:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 341, - "indexExpression": { - "id": 340, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 325, - "src": "3456:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3452:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 338, - "name": "getSingleStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 387, - "src": "3436:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view returns (uint256)" - } - }, - "id": 342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3436:27:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3420:43:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 344, - "nodeType": "ExpressionStatement", - "src": "3420:43:0" - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 328, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 325, - "src": "3377:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 329, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 306, - "src": "3385:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3389:6:0", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "3385:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3377:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 346, - "initializationExpression": { - "assignments": [ - 325 - ], - "declarations": [ - { - "constant": false, - "id": 325, - "mutability": "mutable", - "name": "index", - "nameLocation": "3366:5:0", - "nodeType": "VariableDeclaration", - "scope": 346, - "src": "3358:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 324, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3358:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 327, - "initialValue": { - "hexValue": "30", - "id": 326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3374:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "3358:17:0" - }, - "loopExpression": { - "expression": { - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "3397:7:0", - "subExpression": { - "id": 332, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 325, - "src": "3397:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 334, - "nodeType": "ExpressionStatement", - "src": "3397:7:0" - }, - "nodeType": "ForStatement", - "src": "3353:121:0" - }, - { - "expression": { - "id": 347, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 316, - "src": "3491:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "functionReturnParameters": 311, - "id": 348, - "nodeType": "Return", - "src": "3484:13:0" - } - ] - }, - "functionSelector": "2f21a663", - "id": 350, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getStatus", - "nameLocation": "3210:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 307, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 306, - "mutability": "mutable", - "name": "ids", - "nameLocation": "3237:3:0", - "nodeType": "VariableDeclaration", - "scope": 350, - "src": "3220:20:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 304, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3220:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 305, - "nodeType": "ArrayTypeName", - "src": "3220:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "visibility": "internal" - } - ], - "src": "3219:22:0" - }, - "returnParameters": { - "id": 311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 310, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 350, - "src": "3263:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 308, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3263:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 309, - "nodeType": "ArrayTypeName", - "src": "3263:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "visibility": "internal" - } - ], - "src": "3262:18:0" - }, - "scope": 414, - "src": "3201:303:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 386, - "nodeType": "Block", - "src": "3584:255:0", - "statements": [ - { - "assignments": [ - 359 - ], - "declarations": [ - { - "constant": false, - "id": 359, - "mutability": "mutable", - "name": "tempContract", - "nameLocation": "3614:12:0", - "nodeType": "VariableDeclaration", - "scope": 386, - "src": "3594:32:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", - "typeString": "struct HashTimeLock.LockContract" - }, - "typeName": { - "id": 358, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 357, - "name": "LockContract", - "nameLocations": [ - "3594:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 40, - "src": "3594:12:0" - }, - "referencedDeclaration": 40, - "src": "3594:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 363, - "initialValue": { - "baseExpression": { - "id": 360, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "3629:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 362, - "indexExpression": { - "id": 361, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3639:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3629:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3594:48:0" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 364, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 359, - "src": "3657:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", - "typeString": "struct HashTimeLock.LockContract memory" - } - }, - "id": 365, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3670:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "3657:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 366, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "3680:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3657:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 368, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 359, - "src": "3690:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", - "typeString": "struct HashTimeLock.LockContract memory" - } - }, - "id": 369, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3703:10:0", - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 27, - "src": "3690:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 370, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "3716:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3722:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "3716:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3690:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "3657:74:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 384, - "nodeType": "Block", - "src": "3780:53:0", - "statements": [ - { - "expression": { - "id": 382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 379, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 355, - "src": "3794:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "expression": { - "id": 380, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 359, - "src": "3803:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", - "typeString": "struct HashTimeLock.LockContract memory" - } - }, - "id": 381, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3816:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "3803:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3794:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 383, - "nodeType": "ExpressionStatement", - "src": "3794:28:0" - } - ] - }, - "id": 385, - "nodeType": "IfStatement", - "src": "3653:180:0", - "trueBody": { - "id": 378, - "nodeType": "Block", - "src": "3733:41:0", - "statements": [ - { - "expression": { - "id": 376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 374, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 355, - "src": "3747:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 375, - "name": "EXPIRED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "3756:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3747:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 377, - "nodeType": "ExpressionStatement", - "src": "3747:16:0" - } - ] - } - } - ] - }, - "functionSelector": "fbdf3b43", - "id": 387, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getSingleStatus", - "nameLocation": "3519:15:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 353, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 352, - "mutability": "mutable", - "name": "id", - "nameLocation": "3543:2:0", - "nodeType": "VariableDeclaration", - "scope": 387, - "src": "3535:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 351, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3535:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "3534:12:0" - }, - "returnParameters": { - "id": 356, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 355, - "mutability": "mutable", - "name": "result", - "nameLocation": "3576:6:0", - "nodeType": "VariableDeclaration", - "scope": 387, - "src": "3568:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 354, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3568:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "3567:16:0" - }, - "scope": 414, - "src": "3510:329:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 412, - "nodeType": "Block", - "src": "3915:187:0", - "statements": [ - { - "assignments": [ - 396 - ], - "declarations": [ - { - "constant": false, - "id": 396, - "mutability": "mutable", - "name": "tempContract", - "nameLocation": "3945:12:0", - "nodeType": "VariableDeclaration", - "scope": 412, - "src": "3925:32:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", - "typeString": "struct HashTimeLock.LockContract" - }, - "typeName": { - "id": 395, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 394, - "name": "LockContract", - "nameLocations": [ - "3925:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 40, - "src": "3925:12:0" - }, - "referencedDeclaration": 40, - "src": "3925:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage_ptr", - "typeString": "struct HashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 400, - "initialValue": { - "baseExpression": { - "id": 397, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "3960:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$40_storage_$", - "typeString": "mapping(bytes32 => struct HashTimeLock.LockContract storage ref)" - } - }, - "id": 399, - "indexExpression": { - "id": 398, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 389, - "src": "3970:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3960:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_storage", - "typeString": "struct HashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3925:48:0" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 401, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 396, - "src": "3988:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$40_memory_ptr", - "typeString": "struct HashTimeLock.LockContract memory" - } - }, - "id": 402, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4001:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 29, - "src": "3988:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 403, - "name": "INIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "4011:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3988:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 410, - "nodeType": "Block", - "src": "4060:36:0", - "statements": [ - { - "expression": { - "hexValue": "74727565", - "id": 408, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4081:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 393, - "id": 409, - "nodeType": "Return", - "src": "4074:11:0" - } - ] - }, - "id": 411, - "nodeType": "IfStatement", - "src": "3984:112:0", - "trueBody": { - "id": 407, - "nodeType": "Block", - "src": "4017:37:0", - "statements": [ - { - "expression": { - "hexValue": "66616c7365", - "id": 405, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4038:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 393, - "id": 406, - "nodeType": "Return", - "src": "4031:12:0" - } - ] - } - } - ] - }, - "functionSelector": "6c8244b8", - "id": 413, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "contractExists", - "nameLocation": "3854:14:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 390, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 389, - "mutability": "mutable", - "name": "id", - "nameLocation": "3877:2:0", - "nodeType": "VariableDeclaration", - "scope": 413, - "src": "3869:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 388, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3869:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "3868:12:0" - }, - "returnParameters": { - "id": 393, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 392, - "mutability": "mutable", - "name": "result", - "nameLocation": "3907:6:0", - "nodeType": "VariableDeclaration", - "scope": 413, - "src": "3902:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 391, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3902:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "3901:13:0" - }, - "scope": 414, - "src": "3845:257:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 415, - "src": "25:4079:0", - "usedErrors": [] - } - ], - "src": "0:4105:0" - }, - "functionHashes": { - "contractExists(bytes32)": "6c8244b8", - "contracts(bytes32)": "ec56a373", - "getSingleStatus(bytes32)": "fbdf3b43", - "getStatus(bytes32[])": "2f21a663", - "newContract(uint256,uint256,bytes32,address,string,string)": "d3632095", - "refund(bytes32)": "7249fbb6", - "withdraw(bytes32,bytes32)": "63615149" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "914600", - "executionCost": "948", - "totalCost": "915548" - }, - "external": { - "contractExists(bytes32)": "infinite", - "contracts(bytes32)": "infinite", - "getSingleStatus(bytes32)": "infinite", - "getStatus(bytes32[])": "infinite", - "newContract(uint256,uint256,bytes32,address,string,string)": "infinite", - "refund(bytes32)": "infinite", - "withdraw(bytes32,bytes32)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol b/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol deleted file mode 100644 index 166c326cff..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.sol +++ /dev/null @@ -1,135 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -pragma solidity 0.8.19; - -contract HashTimeLock { - mapping(bytes32 => LockContract) public contracts; - - // / - WITHDRAWN - // INVALID - ACTIVE | - // \ - EXPIRED - REFUNDED - - uint256 constant INIT = 0; // Uninitialized swap -> can go to ACTIVE - uint256 constant ACTIVE = 1; // Active swap -> can go to WITHDRAWN or EXPIRED - uint256 constant REFUNDED = 2; // Swap is refunded -> final state. - uint256 constant WITHDRAWN = 3; // Swap is withdrawn -> final state. - uint256 constant EXPIRED = 4; // Swap is expired -> can go to REFUNDED - - struct LockContract { - uint256 inputAmount; - uint256 outputAmount; - uint256 expiration; - uint256 status; - bytes32 hashLock; - address payable sender; - address payable receiver; - string outputNetwork; - string outputAddress; - } - - event Withdraw( - bytes32 indexed id, bytes32 secret, bytes32 hashLock, address indexed sender, address indexed receiver - ); - - event Refund(bytes32 indexed id, bytes32 hashLock, address indexed sender, address indexed receiver); - - event NewContract( - uint256 inputAmount, - uint256 outputAmount, - uint256 expiration, - bytes32 indexed id, - bytes32 hashLock, - address indexed sender, - address indexed receiver, - string outputNetwork, - string outputAddress - ); - - function newContract( - uint256 outputAmount, - uint256 expiration, - bytes32 hashLock, - address payable receiver, - string calldata outputNetwork, - string calldata outputAddress - ) external payable { - address payable sender = payable(msg.sender); - uint256 inputAmount = msg.value; - - require(expiration > block.timestamp, "INVALID_TIME"); - - require(inputAmount > 0, "INVALID_AMOUNT"); - - bytes32 id = keccak256(abi.encode(sender, receiver, inputAmount, hashLock, expiration)); - - require(contracts[id].status == INIT, "SWAP_EXISTS"); - - contracts[id] = LockContract( - inputAmount, outputAmount, expiration, ACTIVE, hashLock, sender, receiver, outputNetwork, outputAddress - ); - - emit NewContract( - inputAmount, outputAmount, expiration, id, hashLock, sender, receiver, outputNetwork, outputAddress - ); - } - - function withdraw(bytes32 id, bytes32 secret) external { - LockContract storage c = contracts[id]; - - require(c.status == ACTIVE, "SWAP_NOT_ACTIVE"); - - require(c.expiration > block.timestamp, "INVALID_TIME"); - - require(c.hashLock == keccak256(abi.encode(secret)), "INVALID_SECRET"); - - c.status = WITHDRAWN; - - c.receiver.transfer(c.inputAmount); - - emit Withdraw(id, secret, c.hashLock, c.sender, c.receiver); - } - - function refund(bytes32 id) external { - LockContract storage c = contracts[id]; - - require(c.status == ACTIVE, "SWAP_NOT_ACTIVE"); - - require(c.expiration <= block.timestamp, "INVALID_TIME"); - - c.status = REFUNDED; - - c.sender.transfer(c.inputAmount); - - emit Refund(id, c.hashLock, c.sender, c.receiver); - } - - function getStatus(bytes32[] memory ids) public view returns (uint256[] memory) { - uint256[] memory result = new uint256[](ids.length); - - for (uint256 index = 0; index < ids.length; index++) { - result[index] = getSingleStatus(ids[index]); - } - - return result; - } - - function getSingleStatus(bytes32 id) public view returns (uint256 result) { - LockContract memory tempContract = contracts[id]; - - if (tempContract.status == ACTIVE && tempContract.expiration < block.timestamp) { - result = EXPIRED; - } else { - result = tempContract.status; - } - } - - function contractExists(bytes32 id) public view returns (bool result) { - LockContract memory tempContract = contracts[id]; - - if (tempContract.status == INIT) { - return false; - } else { - return true; - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.json b/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.json deleted file mode 100644 index 8629e7bc68..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.json +++ /dev/null @@ -1,7081 +0,0 @@ -{ - "contractName": "PrivateHashTimeLock", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashSecret", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "outputAddress", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "generator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "modulus", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct PrivateHashTimeLock.PrivateEnhancing", - "name": "priv", - "type": "tuple" - } - ], - "name": "NewContract", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashSecret", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "Refund", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "secret", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hashSecret", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "contractExists", - "outputs": [ - { - "internalType": "bool", - "name": "result", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "getSingleStatus", - "outputs": [ - { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "ids", - "type": "bytes32[]" - } - ], - "name": "getStatus", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "outputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "internalType": "address payable", - "name": "receiver", - "type": "address" - }, - { - "internalType": "string", - "name": "outputNetwork", - "type": "string" - }, - { - "internalType": "string", - "name": "outputAddress", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "generator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "modulus", - "type": "uint256" - } - ], - "internalType": "struct PrivateHashTimeLock.PrivateEnhancing", - "name": "priv", - "type": "tuple" - } - ], - "name": "newPrivateContract", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "secret", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashSecret\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"generator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"modulus\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct PrivateHashTimeLock.PrivateEnhancing\",\"name\":\"priv\",\"type\":\"tuple\"}],\"name\":\"NewContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashSecret\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Refund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashSecret\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"contractExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getSingleStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"ids\",\"type\":\"bytes32[]\"}],\"name\":\"getStatus\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"outputAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"address payable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"outputNetwork\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"outputAddress\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"generator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"modulus\",\"type\":\"uint256\"}],\"internalType\":\"struct PrivateHashTimeLock.PrivateEnhancing\",\"name\":\"priv\",\"type\":\"tuple\"}],\"name\":\"newPrivateContract\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol\":\"PrivateHashTimeLock\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol\":{\"keccak256\":\"0x81cf8051705e20f124f71e0c33a8c7c76d943619aafcb84b1d9e9d1f3bb032a7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ddbbc8a037c7d7d678cf2e63802f3e9936d097656cc22aeb3df2757a96f469af\",\"dweb:/ipfs/QmTKzaS9Y8RzoBfBpyuycsJMoSNQEm5PFnQZ9YaTEq39vC\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b50611266806100206000396000f3fe6080604052600436106100555760003560e01c80632f21a6631461005a57806363615149146100905780636c8244b8146100b25780637249fbb6146100e25780639b0bcdcb14610102578063fbdf3b4314610115575b600080fd5b34801561006657600080fd5b5061007a610075366004610c41565b610143565b6040516100879190610ce7565b60405180910390f35b34801561009c57600080fd5b506100b06100ab366004610d2b565b6101f1565b005b3480156100be57600080fd5b506100d26100cd366004610d4d565b610370565b6040519015158152602001610087565b3480156100ee57600080fd5b506100b06100fd366004610d4d565b610549565b6100b0610110366004610dd6565b61065e565b34801561012157600080fd5b50610135610130366004610d4d565b610923565b604051908152602001610087565b60606000825167ffffffffffffffff81111561016157610161610bfa565b60405190808252806020026020018201604052801561018a578160200160208202803683370190505b50905060005b83518110156101ea576101bb8482815181106101ae576101ae610ec1565b6020026020010151610923565b8282815181106101cd576101cd610ec1565b6020908102919091010152806101e281610eed565b915050610190565b5092915050565b6000828152602081905260409020600381015460011461024a5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b60448201526064015b60405180910390fd5b4281600201541161026d5760405162461bcd60e51b815260040161024190610f06565b6009810154600a82015461028391908490610b0a565b8160040154146102c65760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d4d150d4915560921b6044820152606401610241565b600381810155600681015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610309573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b0393841693929092169186917f2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed1319161036391888252602082015260400190565b60405180910390a4505050565b60008181526020818152604080832081516101408101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e08401916103f090610f2c565b80601f016020809104026020016040519081016040528092919081815260200182805461041c90610f2c565b80156104695780601f1061043e57610100808354040283529160200191610469565b820191906000526020600020905b81548152906001019060200180831161044c57829003601f168201915b5050505050815260200160088201805461048290610f2c565b80601f01602080910402602001604051908101604052809291908181526020018280546104ae90610f2c565b80156104fb5780601f106104d0576101008083540402835291602001916104fb565b820191906000526020600020905b8154815290600101906020018083116104de57829003601f168201915b50505091835250506040805180820190915260098301548152600a909201546020838101919091520152606081015190915061053a5750600092915050565b50600192915050565b50919050565b6000818152602081905260409020600381015460011461059d5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b6044820152606401610241565b42816002015411156105c15760405162461bcd60e51b815260040161024190610f06565b60026003820155600581015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610605573d6000803e3d6000fd5b506006810154600582015460048301546040519081526001600160a01b03928316929091169084907f6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c25229060200160405180910390a45050565b333442881161067f5760405162461bcd60e51b815260040161024190610f06565b600081116106c05760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d05353d5539560921b6044820152606401610241565b604080516001600160a01b038085166020830152881691810191909152606081018290526080810188905260a0810189905260009060c00160408051601f1981840301815291815281516020928301206000818152928390529120600301549091501561075d5760405162461bcd60e51b815260206004820152600b60248201526a535741505f45584953545360a81b6044820152606401610241565b835161076857600080fd5b600084602001511161077957600080fd5b6040518061014001604052808381526020018b81526020018a815260200160018152602001898152602001846001600160a01b03168152602001886001600160a01b0316815260200187815260200186815260200185815250600080838152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e08201518160070190816108859190610faf565b50610100820151600882019061089b9082610faf565b506101208201518160090160008201518160000155602082015181600101555050905050866001600160a01b0316836001600160a01b0316827f1d31774ea86d945735b69a4af1ba1a0a71287ba386bc3fe658ae84927d2995c7858e8e8e8d8d8d60405161090f97969594939291906110b5565b60405180910390a450505050505050505050565b60008181526020818152604080832081516101408101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e08401916109a390610f2c565b80601f01602080910402602001604051908101604052809291908181526020018280546109cf90610f2c565b8015610a1c5780601f106109f157610100808354040283529160200191610a1c565b820191906000526020600020905b8154815290600101906020018083116109ff57829003601f168201915b50505050508152602001600882018054610a3590610f2c565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6190610f2c565b8015610aae5780601f10610a8357610100808354040283529160200191610aae565b820191906000526020600020905b815481529060010190602001808311610a9157829003601f168201915b50505091835250506040805180820190915260098301548152600a90920154602083810191909152015260608101519091506001148015610af25750428160400151105b15610b005760049150610543565b6060015192915050565b6000808211610b515760405162461bcd60e51b815260206004820152601360248201527204d6f64756c75732063616e6e6f74206265203606c1b6044820152606401610241565b60008411610b945760405162461bcd60e51b815260206004820152601060248201526f0626173652063616e6e6f7420626520360841b6044820152606401610241565b60008311610bdd5760405162461bcd60e51b815260206004820152601660248201527506578706f6e656e745f312063616e6e6f7420626520360541b6044820152606401610241565b81610be884866111fb565b610bf2919061120e565b949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c3957610c39610bfa565b604052919050565b60006020808385031215610c5457600080fd5b823567ffffffffffffffff80821115610c6c57600080fd5b818501915085601f830112610c8057600080fd5b813581811115610c9257610c92610bfa565b8060051b9150610ca3848301610c10565b8181529183018401918481019088841115610cbd57600080fd5b938501935b83851015610cdb57843582529385019390850190610cc2565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610d1f57835183529284019291840191600101610d03565b50909695505050505050565b60008060408385031215610d3e57600080fd5b50508035926020909101359150565b600060208284031215610d5f57600080fd5b5035919050565b600082601f830112610d7757600080fd5b813567ffffffffffffffff811115610d9157610d91610bfa565b610da4601f8201601f1916602001610c10565b818152846020838601011115610db957600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806000806000878903610100811215610df357600080fd5b88359750602089013596506040890135955060608901356001600160a01b0381168114610e1f57600080fd5b9450608089013567ffffffffffffffff80821115610e3c57600080fd5b610e488c838d01610d66565b955060a08b0135915080821115610e5e57600080fd5b610e6a8c838d01610d66565b9450604060bf1984011215610e7e57600080fd5b60405192506040830191508282108183111715610e9d57610e9d610bfa565b5060405260c0890135815260e0909801356020890152509497939650919490939192565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201610eff57610eff610ed7565b5060010190565b6020808252600c908201526b494e56414c49445f54494d4560a01b604082015260600190565b600181811c90821680610f4057607f821691505b60208210810361054357634e487b7160e01b600052602260045260246000fd5b601f821115610faa57600081815260208120601f850160051c81016020861015610f875750805b601f850160051c820191505b81811015610fa657828155600101610f93565b5050505b505050565b815167ffffffffffffffff811115610fc957610fc9610bfa565b610fdd81610fd78454610f2c565b84610f60565b602080601f8311600181146110125760008415610ffa5750858301515b600019600386901b1c1916600185901b178555610fa6565b600085815260208120601f198616915b8281101561104157888601518255948401946001909101908401611022565b508582101561105f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000815180845260005b8181101561109557602081850181015186830182015201611079565b506000602082860101526020601f19601f83011685010191505092915050565b60006101008983528860208401528760408401528660608401528060808401526110e18184018761106f565b905082810360a08401526110f5818661106f565b915050825160c0830152602083015160e083015298975050505050505050565b600181815b8085111561115057816000190482111561113657611136610ed7565b8085161561114357918102915b93841c939080029061111a565b509250929050565b600082611167575060016111f5565b81611174575060006111f5565b816001811461118a5760028114611194576111b0565b60019150506111f5565b60ff8411156111a5576111a5610ed7565b50506001821b6111f5565b5060208310610133831016604e8410600b84101617156111d3575081810a6111f5565b6111dd8383611115565b80600019048211156111f1576111f1610ed7565b0290505b92915050565b60006112078383611158565b9392505050565b60008261122b57634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212201394af3c806f40ac6e19a695e00b9e526948e3236a710a5c9d21625c9c979f1f64736f6c63430008130033", - "deployedBytecode": "6080604052600436106100555760003560e01c80632f21a6631461005a57806363615149146100905780636c8244b8146100b25780637249fbb6146100e25780639b0bcdcb14610102578063fbdf3b4314610115575b600080fd5b34801561006657600080fd5b5061007a610075366004610c41565b610143565b6040516100879190610ce7565b60405180910390f35b34801561009c57600080fd5b506100b06100ab366004610d2b565b6101f1565b005b3480156100be57600080fd5b506100d26100cd366004610d4d565b610370565b6040519015158152602001610087565b3480156100ee57600080fd5b506100b06100fd366004610d4d565b610549565b6100b0610110366004610dd6565b61065e565b34801561012157600080fd5b50610135610130366004610d4d565b610923565b604051908152602001610087565b60606000825167ffffffffffffffff81111561016157610161610bfa565b60405190808252806020026020018201604052801561018a578160200160208202803683370190505b50905060005b83518110156101ea576101bb8482815181106101ae576101ae610ec1565b6020026020010151610923565b8282815181106101cd576101cd610ec1565b6020908102919091010152806101e281610eed565b915050610190565b5092915050565b6000828152602081905260409020600381015460011461024a5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b60448201526064015b60405180910390fd5b4281600201541161026d5760405162461bcd60e51b815260040161024190610f06565b6009810154600a82015461028391908490610b0a565b8160040154146102c65760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d4d150d4915560921b6044820152606401610241565b600381810155600681015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610309573d6000803e3d6000fd5b506006810154600582015460048301546040516001600160a01b0393841693929092169186917f2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed1319161036391888252602082015260400190565b60405180910390a4505050565b60008181526020818152604080832081516101408101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e08401916103f090610f2c565b80601f016020809104026020016040519081016040528092919081815260200182805461041c90610f2c565b80156104695780601f1061043e57610100808354040283529160200191610469565b820191906000526020600020905b81548152906001019060200180831161044c57829003601f168201915b5050505050815260200160088201805461048290610f2c565b80601f01602080910402602001604051908101604052809291908181526020018280546104ae90610f2c565b80156104fb5780601f106104d0576101008083540402835291602001916104fb565b820191906000526020600020905b8154815290600101906020018083116104de57829003601f168201915b50505091835250506040805180820190915260098301548152600a909201546020838101919091520152606081015190915061053a5750600092915050565b50600192915050565b50919050565b6000818152602081905260409020600381015460011461059d5760405162461bcd60e51b815260206004820152600f60248201526e535741505f4e4f545f41435449564560881b6044820152606401610241565b42816002015411156105c15760405162461bcd60e51b815260040161024190610f06565b60026003820155600581015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610605573d6000803e3d6000fd5b506006810154600582015460048301546040519081526001600160a01b03928316929091169084907f6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c25229060200160405180910390a45050565b333442881161067f5760405162461bcd60e51b815260040161024190610f06565b600081116106c05760405162461bcd60e51b815260206004820152600e60248201526d1253959053125117d05353d5539560921b6044820152606401610241565b604080516001600160a01b038085166020830152881691810191909152606081018290526080810188905260a0810189905260009060c00160408051601f1981840301815291815281516020928301206000818152928390529120600301549091501561075d5760405162461bcd60e51b815260206004820152600b60248201526a535741505f45584953545360a81b6044820152606401610241565b835161076857600080fd5b600084602001511161077957600080fd5b6040518061014001604052808381526020018b81526020018a815260200160018152602001898152602001846001600160a01b03168152602001886001600160a01b0316815260200187815260200186815260200185815250600080838152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e08201518160070190816108859190610faf565b50610100820151600882019061089b9082610faf565b506101208201518160090160008201518160000155602082015181600101555050905050866001600160a01b0316836001600160a01b0316827f1d31774ea86d945735b69a4af1ba1a0a71287ba386bc3fe658ae84927d2995c7858e8e8e8d8d8d60405161090f97969594939291906110b5565b60405180910390a450505050505050505050565b60008181526020818152604080832081516101408101835281548152600182015493810193909352600281015491830191909152600381015460608301526004810154608083015260058101546001600160a01b0390811660a084015260068201541660c08301526007810180548493929160e08401916109a390610f2c565b80601f01602080910402602001604051908101604052809291908181526020018280546109cf90610f2c565b8015610a1c5780601f106109f157610100808354040283529160200191610a1c565b820191906000526020600020905b8154815290600101906020018083116109ff57829003601f168201915b50505050508152602001600882018054610a3590610f2c565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6190610f2c565b8015610aae5780601f10610a8357610100808354040283529160200191610aae565b820191906000526020600020905b815481529060010190602001808311610a9157829003601f168201915b50505091835250506040805180820190915260098301548152600a90920154602083810191909152015260608101519091506001148015610af25750428160400151105b15610b005760049150610543565b6060015192915050565b6000808211610b515760405162461bcd60e51b815260206004820152601360248201527204d6f64756c75732063616e6e6f74206265203606c1b6044820152606401610241565b60008411610b945760405162461bcd60e51b815260206004820152601060248201526f0626173652063616e6e6f7420626520360841b6044820152606401610241565b60008311610bdd5760405162461bcd60e51b815260206004820152601660248201527506578706f6e656e745f312063616e6e6f7420626520360541b6044820152606401610241565b81610be884866111fb565b610bf2919061120e565b949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c3957610c39610bfa565b604052919050565b60006020808385031215610c5457600080fd5b823567ffffffffffffffff80821115610c6c57600080fd5b818501915085601f830112610c8057600080fd5b813581811115610c9257610c92610bfa565b8060051b9150610ca3848301610c10565b8181529183018401918481019088841115610cbd57600080fd5b938501935b83851015610cdb57843582529385019390850190610cc2565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610d1f57835183529284019291840191600101610d03565b50909695505050505050565b60008060408385031215610d3e57600080fd5b50508035926020909101359150565b600060208284031215610d5f57600080fd5b5035919050565b600082601f830112610d7757600080fd5b813567ffffffffffffffff811115610d9157610d91610bfa565b610da4601f8201601f1916602001610c10565b818152846020838601011115610db957600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806000806000878903610100811215610df357600080fd5b88359750602089013596506040890135955060608901356001600160a01b0381168114610e1f57600080fd5b9450608089013567ffffffffffffffff80821115610e3c57600080fd5b610e488c838d01610d66565b955060a08b0135915080821115610e5e57600080fd5b610e6a8c838d01610d66565b9450604060bf1984011215610e7e57600080fd5b60405192506040830191508282108183111715610e9d57610e9d610bfa565b5060405260c0890135815260e0909801356020890152509497939650919490939192565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201610eff57610eff610ed7565b5060010190565b6020808252600c908201526b494e56414c49445f54494d4560a01b604082015260600190565b600181811c90821680610f4057607f821691505b60208210810361054357634e487b7160e01b600052602260045260246000fd5b601f821115610faa57600081815260208120601f850160051c81016020861015610f875750805b601f850160051c820191505b81811015610fa657828155600101610f93565b5050505b505050565b815167ffffffffffffffff811115610fc957610fc9610bfa565b610fdd81610fd78454610f2c565b84610f60565b602080601f8311600181146110125760008415610ffa5750858301515b600019600386901b1c1916600185901b178555610fa6565b600085815260208120601f198616915b8281101561104157888601518255948401946001909101908401611022565b508582101561105f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000815180845260005b8181101561109557602081850181015186830182015201611079565b506000602082860101526020601f19601f83011685010191505092915050565b60006101008983528860208401528760408401528660608401528060808401526110e18184018761106f565b905082810360a08401526110f5818661106f565b915050825160c0830152602083015160e083015298975050505050505050565b600181815b8085111561115057816000190482111561113657611136610ed7565b8085161561114357918102915b93841c939080029061111a565b509250929050565b600082611167575060016111f5565b81611174575060006111f5565b816001811461118a5760028114611194576111b0565b60019150506111f5565b60ff8411156111a5576111a5610ed7565b50506001821b6111f5565b5060208310610133831016604e8410600b84101617156111d3575081810a6111f5565b6111dd8383611115565b80600019048211156111f1576111f1610ed7565b0290505b92915050565b60006112078383611158565b9392505050565b60008261122b57634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212201394af3c806f40ac6e19a695e00b9e526948e3236a710a5c9d21625c9c979f1f64736f6c63430008130033", - "sourceMap": "57:5185:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "57:5185:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4339:303;;;;;;;;;;-1:-1:-1;4339:303:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3080:526;;;;;;;;;;-1:-1:-1;3080:526:0;;;;;:::i;:::-;;:::i;:::-;;4983:257;;;;;;;;;;-1:-1:-1;4983:257:0;;;;;:::i;:::-;;:::i;:::-;;;2617:14:1;;2610:22;2592:41;;2580:2;2565:18;4983:257:0;2452:187:1;3982:351:0;;;;;;;;;;-1:-1:-1;3982:351:0;;;;;:::i;:::-;;:::i;1905:1169::-;;;;;;:::i;:::-;;:::i;4648:329::-;;;;;;;;;;-1:-1:-1;4648:329:0;;;;;:::i;:::-;;:::i;:::-;;;4724:25:1;;;4712:2;4697:18;4648:329:0;4578:177:1;4339:303:0;4401:16;4429:23;4469:3;:10;4455:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4455:25:0;;4429:51;;4496:13;4491:121;4523:3;:10;4515:5;:18;4491:121;;;4574:27;4590:3;4594:5;4590:10;;;;;;;;:::i;:::-;;;;;;;4574:15;:27::i;:::-;4558:6;4565:5;4558:13;;;;;;;;:::i;:::-;;;;;;;;;;:43;4535:7;;;;:::i;:::-;;;;4491:121;;;-1:-1:-1;4629:6:0;4339:303;-1:-1:-1;;4339:303:0:o;3080:526::-;3145:22;3170:13;;;;;;;;;;3201:8;;;;370:1;3201:18;3193:46;;;;-1:-1:-1;;;3193:46:0;;5366:2:1;3193:46:0;;;5348:21:1;5405:2;5385:18;;;5378:30;-1:-1:-1;;;5424:18:1;;;5417:45;5479:18;;3193:46:0;;;;;;;;;3273:15;3258:1;:12;;;:30;3250:55;;;;-1:-1:-1;;;3250:55:0;;;;;;;:::i;:::-;3373:6;;;:16;3408:14;;;;3353:70;;3373:16;3399:6;;3353:19;:70::i;:::-;3337:1;:12;;;:86;3316:135;;;;-1:-1:-1;;;3316:135:0;;6051:2:1;3316:135:0;;;6033:21:1;6090:2;6070:18;;;6063:30;-1:-1:-1;;;6109:18:1;;;6102:44;6163:18;;3316:135:0;5849:338:1;3316:135:0;542:1;3462:8;;;:20;3493:10;;;;3513:13;;3493:34;;-1:-1:-1;;;;;3493:10:0;;;;:34;;;;;3513:13;3493:10;:34;:10;:34;3513:13;3493:10;:34;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3588:10:0;;;;3578:8;;;;3564:12;;;;3543:56;;-1:-1:-1;;;;;3588:10:0;;;;3578:8;;;;;3552:2;;3543:56;;;;3556:6;6366:25:1;;6422:2;6407:18;;6400:34;6354:2;6339:18;;6192:248;3543:56:0;;;;;;;;3135:471;3080:526;;:::o;4983:257::-;5040:11;5098:13;;;;;;;;;;;5063:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5063:48:0;;;;;;;;;;;;;;;;;;;;;5040:11;;5063:48;5098:13;5063:48;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5063:48:0;;;-1:-1:-1;;5063:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5126:19;;;;5063:48;;-1:-1:-1;5122:112:0;;-1:-1:-1;5176:5:0;;4983:257;-1:-1:-1;;4983:257:0:o;5122:112::-;-1:-1:-1;5219:4:0;;4983:257;-1:-1:-1;;4983:257:0:o;5122:112::-;5053:187;4983:257;;;:::o;3982:351::-;4029:22;4054:13;;;;;;;;;;4086:8;;;;370:1;4086:18;4078:46;;;;-1:-1:-1;;;4078:46:0;;5366:2:1;4078:46:0;;;5348:21:1;5405:2;5385:18;;;5378:30;-1:-1:-1;;;5424:18:1;;;5417:45;5479:18;;4078:46:0;5164:339:1;4078:46:0;4159:15;4143:1;:12;;;:31;;4135:56;;;;-1:-1:-1;;;4135:56:0;;;;;;;:::i;:::-;462:1;4202:8;;;:19;4232:8;;;;4250:13;;4232:32;;-1:-1:-1;;;;;4232:8:0;;;;:32;;;;;4250:13;4232:8;:32;:8;:32;4250:13;4232:8;:32;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4315:10:0;;;;4305:8;;;;4291:12;;;;4280:46;;4724:25:1;;;-1:-1:-1;;;;;4315:10:0;;;;4305:8;;;;4287:2;;4280:46;;4712:2:1;4697:18;4280:46:0;;;;;;;4019:314;3982:351;:::o;1905:1169::-;2229:10;2272:9;2313:15;2300:28;;2292:53;;;;-1:-1:-1;;;2292:53:0;;;;;;;:::i;:::-;2378:1;2364:11;:15;2356:42;;;;-1:-1:-1;;;2356:42:0;;7214:2:1;2356:42:0;;;7196:21:1;7253:2;7233:18;;;7226:30;-1:-1:-1;;;7272:18:1;;;7265:44;7326:18;;2356:42:0;7012:338:1;2356:42:0;2432:63;;;-1:-1:-1;;;;;7702:15:1;;;2432:63:0;;;7684:34:1;7754:15;;7734:18;;;7727:43;;;;7786:18;;;7779:34;;;7829:18;;;7822:34;;;7872:19;;;7865:35;;;2409:10:0;;7618:19:1;;2432:63:0;;;-1:-1:-1;;2432:63:0;;;;;;;;;2422:74;;2432:63;2422:74;;;;295:1;2515:13;;;;;;;;;:20;;;2422:74;;-1:-1:-1;2515:28:0;2507:52;;;;-1:-1:-1;;;2507:52:0;;8113:2:1;2507:52:0;;;8095:21:1;8152:2;8132:18;;;8125:30;-1:-1:-1;;;8171:18:1;;;8164:41;8222:18;;2507:52:0;7911:335:1;2507:52:0;2577:14;;2569:27;;;;;;2629:1;2614:4;:12;;;:16;2606:25;;;;;;2658:253;;;;;;;;2684:11;2658:253;;;;2709:12;2658:253;;;;2735:10;2658:253;;;;370:1;2658:253;;;;2779:8;2658:253;;;;2801:6;-1:-1:-1;;;;;2658:253:0;;;;;2821:8;-1:-1:-1;;;;;2658:253:0;;;;;2843:13;2658:253;;;;2870:13;2658:253;;;;2897:4;2658:253;;;2642:9;:13;2652:2;2642:13;;;;;;;;;;;:269;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2642:269:0;;;;;-1:-1:-1;;;;;2642:269:0;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2642:269:0;;;;;-1:-1:-1;;;;;2642:269:0;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2642:269:0;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3013:8;-1:-1:-1;;;;;2927:140:0;3005:6;-1:-1:-1;;;;;2927:140:0;2991:2;2927:140;2952:11;2965:12;2979:10;2995:8;3023:13;3038;3053:4;2927:140;;;;;;;;;;;;:::i;:::-;;;;;;;;2186:888;;;1905:1169;;;;;;;:::o;4648:329::-;4706:14;4767:13;;;;;;;;;;;4732:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4732:48:0;;;;;;;;;;;;;;;;;;;;;4706:14;;4732:48;4767:13;4732:48;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4732:48:0;;;-1:-1:-1;;4732:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4795:19;;;;4732:48;;-1:-1:-1;4732:48:0;4795:29;:74;;;;;4854:15;4828:12;:23;;;:41;4795:74;4791:180;;;621:1;4885:16;;4791:180;;;4941:19;;;;4648:329;-1:-1:-1;;4648:329:0:o;3612:364::-;3737:14;3785:1;3775:7;:11;3767:43;;;;-1:-1:-1;;;3767:43:0;;11984:2:1;3767:43:0;;;11966:21:1;12023:2;12003:18;;;11996:30;-1:-1:-1;;;12042:18:1;;;12035:49;12101:18;;3767:43:0;11782:343:1;3767:43:0;3835:1;3828:4;:8;3820:37;;;;-1:-1:-1;;;3820:37:0;;12332:2:1;3820:37:0;;;12314:21:1;12371:2;12351:18;;;12344:30;-1:-1:-1;;;12390:18:1;;;12383:46;12446:18;;3820:37:0;12130:340:1;3820:37:0;3886:1;3875:8;:12;3867:47;;;;-1:-1:-1;;;3867:47:0;;12677:2:1;3867:47:0;;;12659:21:1;12716:2;12696:18;;;12689:30;-1:-1:-1;;;12735:18:1;;;12728:52;12797:18;;3867:47:0;12475:346:1;3867:47:0;3961:7;3941:16;3949:8;3941:4;:16;:::i;:::-;3940:28;;;;:::i;:::-;3932:37;3612:364;-1:-1:-1;;;;3612:364:0:o;14:127:1:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:275;217:2;211:9;282:2;263:13;;-1:-1:-1;;259:27:1;247:40;;317:18;302:34;;338:22;;;299:62;296:88;;;364:18;;:::i;:::-;400:2;393:22;146:275;;-1:-1:-1;146:275:1:o;426:946::-;510:6;541:2;584;572:9;563:7;559:23;555:32;552:52;;;600:1;597;590:12;552:52;640:9;627:23;669:18;710:2;702:6;699:14;696:34;;;726:1;723;716:12;696:34;764:6;753:9;749:22;739:32;;809:7;802:4;798:2;794:13;790:27;780:55;;831:1;828;821:12;780:55;867:2;854:16;889:2;885;882:10;879:36;;;895:18;;:::i;:::-;941:2;938:1;934:10;924:20;;964:28;988:2;984;980:11;964:28;:::i;:::-;1026:15;;;1096:11;;;1092:20;;;1057:12;;;;1124:19;;;1121:39;;;1156:1;1153;1146:12;1121:39;1180:11;;;;1200:142;1216:6;1211:3;1208:15;1200:142;;;1282:17;;1270:30;;1233:12;;;;1320;;;;1200:142;;;1361:5;426:946;-1:-1:-1;;;;;;;;426:946:1:o;1377:632::-;1548:2;1600:21;;;1670:13;;1573:18;;;1692:22;;;1519:4;;1548:2;1771:15;;;;1745:2;1730:18;;;1519:4;1814:169;1828:6;1825:1;1822:13;1814:169;;;1889:13;;1877:26;;1958:15;;;;1923:12;;;;1850:1;1843:9;1814:169;;;-1:-1:-1;2000:3:1;;1377:632;-1:-1:-1;;;;;;1377:632:1:o;2014:248::-;2082:6;2090;2143:2;2131:9;2122:7;2118:23;2114:32;2111:52;;;2159:1;2156;2149:12;2111:52;-1:-1:-1;;2182:23:1;;;2252:2;2237:18;;;2224:32;;-1:-1:-1;2014:248:1:o;2267:180::-;2326:6;2379:2;2367:9;2358:7;2354:23;2350:32;2347:52;;;2395:1;2392;2385:12;2347:52;-1:-1:-1;2418:23:1;;2267:180;-1:-1:-1;2267:180:1:o;2644:531::-;2687:5;2740:3;2733:4;2725:6;2721:17;2717:27;2707:55;;2758:1;2755;2748:12;2707:55;2794:6;2781:20;2820:18;2816:2;2813:26;2810:52;;;2842:18;;:::i;:::-;2886:55;2929:2;2910:13;;-1:-1:-1;;2906:27:1;2935:4;2902:38;2886:55;:::i;:::-;2966:2;2957:7;2950:19;3012:3;3005:4;3000:2;2992:6;2988:15;2984:26;2981:35;2978:55;;;3029:1;3026;3019:12;2978:55;3094:2;3087:4;3079:6;3075:17;3068:4;3059:7;3055:18;3042:55;3142:1;3117:16;;;3135:4;3113:27;3106:38;;;;3121:7;2644:531;-1:-1:-1;;;2644:531:1:o;3180:1393::-;3353:6;3361;3369;3377;3385;3393;3401;3445:9;3436:7;3432:23;3475:3;3471:2;3467:12;3464:32;;;3492:1;3489;3482:12;3464:32;3515:23;;;-1:-1:-1;3585:2:1;3570:18;;3557:32;;-1:-1:-1;3636:2:1;3621:18;;3608:32;;-1:-1:-1;3690:2:1;3675:18;;3662:32;-1:-1:-1;;;;;3723:31:1;;3713:42;;3703:70;;3769:1;3766;3759:12;3703:70;3792:5;-1:-1:-1;3848:3:1;3833:19;;3820:33;3872:18;3902:14;;;3899:34;;;3929:1;3926;3919:12;3899:34;3952:50;3994:7;3985:6;3974:9;3970:22;3952:50;:::i;:::-;3942:60;;4055:3;4044:9;4040:19;4027:33;4011:49;;4085:2;4075:8;4072:16;4069:36;;;4101:1;4098;4091:12;4069:36;4124:52;4168:7;4157:8;4146:9;4142:24;4124:52;:::i;:::-;4114:62;-1:-1:-1;4211:2:1;-1:-1:-1;;4192:17:1;;4188:26;4185:46;;;4227:1;4224;4217:12;4185:46;4260:2;4254:9;4240:23;;4302:2;4294:6;4290:15;4272:33;;4355:6;4343:10;4340:22;4335:2;4323:10;4320:18;4317:46;4314:72;;;4366:18;;:::i;:::-;-1:-1:-1;4402:2:1;4395:22;4469:3;4454:19;;4441:33;4426:49;;4536:3;4521:19;;;4508:33;4503:2;4491:15;;4484:58;-1:-1:-1;3180:1393:1;;;;-1:-1:-1;3180:1393:1;;;;;;:::o;4760:127::-;4821:10;4816:3;4812:20;4809:1;4802:31;4852:4;4849:1;4842:15;4876:4;4873:1;4866:15;4892:127;4953:10;4948:3;4944:20;4941:1;4934:31;4984:4;4981:1;4974:15;5008:4;5005:1;4998:15;5024:135;5063:3;5084:17;;;5081:43;;5104:18;;:::i;:::-;-1:-1:-1;5151:1:1;5140:13;;5024:135::o;5508:336::-;5710:2;5692:21;;;5749:2;5729:18;;;5722:30;-1:-1:-1;;;5783:2:1;5768:18;;5761:42;5835:2;5820:18;;5508:336::o;6445:380::-;6524:1;6520:12;;;;6567;;;6588:61;;6642:4;6634:6;6630:17;6620:27;;6588:61;6695:2;6687:6;6684:14;6664:18;6661:38;6658:161;;6741:10;6736:3;6732:20;6729:1;6722:31;6776:4;6773:1;6766:15;6804:4;6801:1;6794:15;8377:545;8479:2;8474:3;8471:11;8468:448;;;8515:1;8540:5;8536:2;8529:17;8585:4;8581:2;8571:19;8655:2;8643:10;8639:19;8636:1;8632:27;8626:4;8622:38;8691:4;8679:10;8676:20;8673:47;;;-1:-1:-1;8714:4:1;8673:47;8769:2;8764:3;8760:12;8757:1;8753:20;8747:4;8743:31;8733:41;;8824:82;8842:2;8835:5;8832:13;8824:82;;;8887:17;;;8868:1;8857:13;8824:82;;;8828:3;;;8468:448;8377:545;;;:::o;9098:1352::-;9224:3;9218:10;9251:18;9243:6;9240:30;9237:56;;;9273:18;;:::i;:::-;9302:97;9392:6;9352:38;9384:4;9378:11;9352:38;:::i;:::-;9346:4;9302:97;:::i;:::-;9454:4;;9518:2;9507:14;;9535:1;9530:663;;;;10237:1;10254:6;10251:89;;;-1:-1:-1;10306:19:1;;;10300:26;10251:89;-1:-1:-1;;9055:1:1;9051:11;;;9047:24;9043:29;9033:40;9079:1;9075:11;;;9030:57;10353:81;;9500:944;;9530:663;8324:1;8317:14;;;8361:4;8348:18;;-1:-1:-1;;9566:20:1;;;9684:236;9698:7;9695:1;9692:14;9684:236;;;9787:19;;;9781:26;9766:42;;9879:27;;;;9847:1;9835:14;;;;9714:19;;9684:236;;;9688:3;9948:6;9939:7;9936:19;9933:201;;;10009:19;;;10003:26;-1:-1:-1;;10092:1:1;10088:14;;;10104:3;10084:24;10080:37;10076:42;10061:58;10046:74;;9933:201;-1:-1:-1;;;;;10180:1:1;10164:14;;;10160:22;10147:36;;-1:-1:-1;9098:1352:1:o;10455:423::-;10497:3;10535:5;10529:12;10562:6;10557:3;10550:19;10587:1;10597:162;10611:6;10608:1;10605:13;10597:162;;;10673:4;10729:13;;;10725:22;;10719:29;10701:11;;;10697:20;;10690:59;10626:12;10597:162;;;10601:3;10804:1;10797:4;10788:6;10783:3;10779:16;10775:27;10768:38;10867:4;10860:2;10856:7;10851:2;10843:6;10839:15;10835:29;10830:3;10826:39;10822:50;10815:57;;;10455:423;;;;:::o;10883:894::-;11247:4;11276:3;11306:6;11295:9;11288:25;11349:6;11344:2;11333:9;11329:18;11322:34;11392:6;11387:2;11376:9;11372:18;11365:34;11435:6;11430:2;11419:9;11415:18;11408:34;11479:2;11473:3;11462:9;11458:19;11451:31;11505:45;11546:2;11535:9;11531:18;11523:6;11505:45;:::i;:::-;11491:59;;11599:9;11591:6;11587:22;11581:3;11570:9;11566:19;11559:51;11627:33;11653:6;11645;11627:33;:::i;:::-;11619:41;;;11703:6;11697:13;11691:3;11680:9;11676:19;11669:42;11766:2;11758:6;11754:15;11748:22;11742:3;11731:9;11727:19;11720:51;10883:894;;;;;;;;;;:::o;12826:422::-;12915:1;12958:5;12915:1;12972:270;12993:7;12983:8;12980:21;12972:270;;;13052:4;13048:1;13044:6;13040:17;13034:4;13031:27;13028:53;;;13061:18;;:::i;:::-;13111:7;13101:8;13097:22;13094:55;;;13131:16;;;;13094:55;13210:22;;;;13170:15;;;;12972:270;;;12976:3;12826:422;;;;;:::o;13253:806::-;13302:5;13332:8;13322:80;;-1:-1:-1;13373:1:1;13387:5;;13322:80;13421:4;13411:76;;-1:-1:-1;13458:1:1;13472:5;;13411:76;13503:4;13521:1;13516:59;;;;13589:1;13584:130;;;;13496:218;;13516:59;13546:1;13537:10;;13560:5;;;13584:130;13621:3;13611:8;13608:17;13605:43;;;13628:18;;:::i;:::-;-1:-1:-1;;13684:1:1;13670:16;;13699:5;;13496:218;;13798:2;13788:8;13785:16;13779:3;13773:4;13770:13;13766:36;13760:2;13750:8;13747:16;13742:2;13736:4;13733:12;13729:35;13726:77;13723:159;;;-1:-1:-1;13835:19:1;;;13867:5;;13723:159;13914:34;13939:8;13933:4;13914:34;:::i;:::-;13984:6;13980:1;13976:6;13972:19;13963:7;13960:32;13957:58;;;13995:18;;:::i;:::-;14033:20;;-1:-1:-1;13253:806:1;;;;;:::o;14064:131::-;14124:5;14153:36;14180:8;14174:4;14153:36;:::i;:::-;14144:45;14064:131;-1:-1:-1;;;14064:131:1:o;14200:209::-;14232:1;14258;14248:132;;14302:10;14297:3;14293:20;14290:1;14283:31;14337:4;14334:1;14327:15;14365:4;14362:1;14355:15;14248:132;-1:-1:-1;14394:9:1;;14200:209::o", - "sourcePath": "/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol", - "compiler": { - "name": "solc", - "version": "0.8.19+commit.7dd6d404" - }, - "ast": { - "absolutePath": "/home/peter/a/cacti-1/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol", - "exportedSymbols": { - "PrivateHashTimeLock": [ - 504 - ] - }, - "id": 505, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "0.8", - ".19" - ], - "nodeType": "PragmaDirective", - "src": "32:23:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "PrivateHashTimeLock", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 504, - "linearizedBaseContracts": [ - 504 - ], - "name": "PrivateHashTimeLock", - "nameLocation": "66:19:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "contracts", - "nameLocation": "133:9:0", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "92:50:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$59_storage_$", - "typeString": "mapping(bytes32 => struct PrivateHashTimeLock.LockContract)" - }, - "typeName": { - "id": 5, - "keyName": "", - "keyNameLocation": "-1:-1:-1", - "keyType": { - "id": 2, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "100:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "92:32:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$59_storage_$", - "typeString": "mapping(bytes32 => struct PrivateHashTimeLock.LockContract)" - }, - "valueName": "", - "valueNameLocation": "-1:-1:-1", - "valueType": { - "id": 4, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 3, - "name": "LockContract", - "nameLocations": [ - "111:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 59, - "src": "111:12:0" - }, - "referencedDeclaration": 59, - "src": "111:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract" - } - } - }, - "visibility": "private" - }, - { - "constant": true, - "id": 9, - "mutability": "constant", - "name": "INIT", - "nameLocation": "288:4:0", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "263:33:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 7, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "263:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "30", - "id": 8, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "295:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "visibility": "private" - }, - { - "constant": true, - "id": 12, - "mutability": "constant", - "name": "ACTIVE", - "nameLocation": "361:6:0", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "336:35:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "336:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "31", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "370:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "visibility": "private" - }, - { - "constant": true, - "id": 15, - "mutability": "constant", - "name": "REFUNDED", - "nameLocation": "451:8:0", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "426:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "426:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "32", - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "462:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "visibility": "private" - }, - { - "constant": true, - "id": 18, - "mutability": "constant", - "name": "WITHDRAWN", - "nameLocation": "530:9:0", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "505:38:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "505:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "33", - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "542:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "visibility": "private" - }, - { - "constant": true, - "id": 21, - "mutability": "constant", - "name": "EXPIRED", - "nameLocation": "611:7:0", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "586:36:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "586:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "34", - "id": 20, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "621:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - }, - "visibility": "private" - }, - { - "canonicalName": "PrivateHashTimeLock.PrivateEnhancing", - "id": 26, - "members": [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "generator", - "nameLocation": "739:9:0", - "nodeType": "VariableDeclaration", - "scope": 26, - "src": "731:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "731:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "modulus", - "nameLocation": "793:7:0", - "nodeType": "VariableDeclaration", - "scope": 26, - "src": "785:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 24, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "785:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "name": "PrivateEnhancing", - "nameLocation": "677:16:0", - "nodeType": "StructDefinition", - "scope": 504, - "src": "670:137:0", - "visibility": "public" - }, - { - "canonicalName": "PrivateHashTimeLock.SwapDetails", - "id": 37, - "members": [ - { - "constant": false, - "id": 28, - "mutability": "mutable", - "name": "sender", - "nameLocation": "858:6:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "842:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 27, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "842:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 30, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "890:8:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "874:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 29, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "874:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "916:11:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "908:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "908:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "hashSecret", - "nameLocation": "945:10:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "937:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 33, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "937:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 36, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "973:10:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "965:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 35, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "965:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "name": "SwapDetails", - "nameLocation": "820:11:0", - "nodeType": "StructDefinition", - "scope": 504, - "src": "813:177:0", - "visibility": "public" - }, - { - "canonicalName": "PrivateHashTimeLock.LockContract", - "id": 59, - "members": [ - { - "constant": false, - "id": 39, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "1034:11:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "1026:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 38, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1026:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 41, - "mutability": "mutable", - "name": "outputAmount", - "nameLocation": "1063:12:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "1055:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 40, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1055:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "1093:10:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "1085:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 42, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1085:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 45, - "mutability": "mutable", - "name": "status", - "nameLocation": "1121:6:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "1113:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 44, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1113:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 47, - "mutability": "mutable", - "name": "hashSecret", - "nameLocation": "1145:10:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "1137:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 46, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1137:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 49, - "mutability": "mutable", - "name": "sender", - "nameLocation": "1181:6:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "1165:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 48, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1165:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "1213:8:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "1197:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 50, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1197:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 53, - "mutability": "mutable", - "name": "outputNetwork", - "nameLocation": "1238:13:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "1231:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 52, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1231:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 55, - "mutability": "mutable", - "name": "outputAddress", - "nameLocation": "1268:13:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "1261:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 54, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1261:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 58, - "mutability": "mutable", - "name": "priv", - "nameLocation": "1308:4:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "1291:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_storage_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing" - }, - "typeName": { - "id": 57, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 56, - "name": "PrivateEnhancing", - "nameLocations": [ - "1291:16:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 26, - "src": "1291:16:0" - }, - "referencedDeclaration": 26, - "src": "1291:16:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_storage_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing" - } - }, - "visibility": "internal" - } - ], - "name": "LockContract", - "nameLocation": "1003:12:0", - "nodeType": "StructDefinition", - "scope": 504, - "src": "996:323:0", - "visibility": "public" - }, - { - "anonymous": false, - "eventSelector": "2d3a5ed13d0553389b4078e01264416362e34d23520fda797fbc17f3905ed131", - "id": 71, - "name": "Withdraw", - "nameLocation": "1331:8:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 70, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 61, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nameLocation": "1365:2:0", - "nodeType": "VariableDeclaration", - "scope": 71, - "src": "1349:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 60, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1349:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 63, - "indexed": false, - "mutability": "mutable", - "name": "secret", - "nameLocation": "1377:6:0", - "nodeType": "VariableDeclaration", - "scope": 71, - "src": "1369:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 62, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1369:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 65, - "indexed": false, - "mutability": "mutable", - "name": "hashSecret", - "nameLocation": "1393:10:0", - "nodeType": "VariableDeclaration", - "scope": 71, - "src": "1385:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 64, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1385:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 67, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nameLocation": "1421:6:0", - "nodeType": "VariableDeclaration", - "scope": 71, - "src": "1405:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 66, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1405:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 69, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "1445:8:0", - "nodeType": "VariableDeclaration", - "scope": 71, - "src": "1429:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 68, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1429:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "1339:120:0" - }, - "src": "1325:135:0" - }, - { - "anonymous": false, - "eventSelector": "6fa50d56c31f3efe0cb6ff06232bffce8fe8c4155e3cbb6f2d79dd12631c2522", - "id": 81, - "name": "Refund", - "nameLocation": "1472:6:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 80, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 73, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nameLocation": "1495:2:0", - "nodeType": "VariableDeclaration", - "scope": 81, - "src": "1479:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 72, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1479:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 75, - "indexed": false, - "mutability": "mutable", - "name": "hashSecret", - "nameLocation": "1507:10:0", - "nodeType": "VariableDeclaration", - "scope": 81, - "src": "1499:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 74, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1499:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 77, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nameLocation": "1535:6:0", - "nodeType": "VariableDeclaration", - "scope": 81, - "src": "1519:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 76, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1519:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 79, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "1559:8:0", - "nodeType": "VariableDeclaration", - "scope": 81, - "src": "1543:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 78, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1543:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "1478:90:0" - }, - "src": "1466:103:0" - }, - { - "anonymous": false, - "eventSelector": "1d31774ea86d945735b69a4af1ba1a0a71287ba386bc3fe658ae84927d2995c7", - "id": 104, - "name": "NewContract", - "nameLocation": "1581:11:0", - "nodeType": "EventDefinition", - "parameters": { - "id": 103, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 83, - "indexed": false, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "1610:11:0", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "1602:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 82, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1602:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "indexed": false, - "mutability": "mutable", - "name": "outputAmount", - "nameLocation": "1639:12:0", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "1631:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 84, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1631:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 87, - "indexed": false, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "1669:10:0", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "1661:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 86, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1661:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 89, - "indexed": true, - "mutability": "mutable", - "name": "id", - "nameLocation": "1705:2:0", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "1689:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 88, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1689:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 91, - "indexed": false, - "mutability": "mutable", - "name": "hashSecret", - "nameLocation": "1725:10:0", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "1717:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 90, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1717:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 93, - "indexed": true, - "mutability": "mutable", - "name": "sender", - "nameLocation": "1761:6:0", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "1745:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 92, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1745:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 95, - "indexed": true, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "1793:8:0", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "1777:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 94, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1777:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 97, - "indexed": false, - "mutability": "mutable", - "name": "outputNetwork", - "nameLocation": "1818:13:0", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "1811:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 96, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1811:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 99, - "indexed": false, - "mutability": "mutable", - "name": "outputAddress", - "nameLocation": "1848:13:0", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "1841:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 98, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1841:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 102, - "indexed": false, - "mutability": "mutable", - "name": "priv", - "nameLocation": "1888:4:0", - "nodeType": "VariableDeclaration", - "scope": 104, - "src": "1871:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_memory_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing" - }, - "typeName": { - "id": 101, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 100, - "name": "PrivateEnhancing", - "nameLocations": [ - "1871:16:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 26, - "src": "1871:16:0" - }, - "referencedDeclaration": 26, - "src": "1871:16:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_storage_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing" - } - }, - "visibility": "internal" - } - ], - "src": "1592:306:0" - }, - "src": "1575:324:0" - }, - { - "body": { - "id": 217, - "nodeType": "Block", - "src": "2186:888:0", - "statements": [ - { - "assignments": [ - 123 - ], - "declarations": [ - { - "constant": false, - "id": 123, - "mutability": "mutable", - "name": "sender", - "nameLocation": "2212:6:0", - "nodeType": "VariableDeclaration", - "scope": 217, - "src": "2196:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 122, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2196:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - } - ], - "id": 129, - "initialValue": { - "arguments": [ - { - "expression": { - "id": 126, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "2229:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2233:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "2229:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2221:8:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_payable_$", - "typeString": "type(address payable)" - }, - "typeName": { - "id": 124, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2221:8:0", - "stateMutability": "payable", - "typeDescriptions": {} - } - }, - "id": 128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2221:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2196:44:0" - }, - { - "assignments": [ - 131 - ], - "declarations": [ - { - "constant": false, - "id": 131, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "2258:11:0", - "nodeType": "VariableDeclaration", - "scope": 217, - "src": "2250:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 130, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2250:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 134, - "initialValue": { - "expression": { - "id": 132, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "2272:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2276:5:0", - "memberName": "value", - "nodeType": "MemberAccess", - "src": "2272:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2250:31:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 136, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "2300:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "expression": { - "id": 137, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "2313:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2319:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "2313:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2300:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2330:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 135, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2292:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2292:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 142, - "nodeType": "ExpressionStatement", - "src": "2292:53:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 144, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 131, - "src": "2364:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 145, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2378:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2364:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f414d4f554e54", - "id": 147, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2381:16:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", - "typeString": "literal_string \"INVALID_AMOUNT\"" - }, - "value": "INVALID_AMOUNT" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_eb6dbbf3194e9f4dd39c8dabe51ddb59ca6ad00c50b1bc74675ce4b263687722", - "typeString": "literal_string \"INVALID_AMOUNT\"" - } - ], - "id": 143, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2356:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2356:42:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 149, - "nodeType": "ExpressionStatement", - "src": "2356:42:0" - }, - { - "assignments": [ - 151 - ], - "declarations": [ - { - "constant": false, - "id": 151, - "mutability": "mutable", - "name": "id", - "nameLocation": "2417:2:0", - "nodeType": "VariableDeclaration", - "scope": 217, - "src": "2409:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 150, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2409:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "id": 162, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "id": 155, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 123, - "src": "2443:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 156, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "2451:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 157, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 131, - "src": "2461:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 158, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 110, - "src": "2474:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 159, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "2484:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 153, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "2432:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "2436:6:0", - "memberName": "encode", - "nodeType": "MemberAccess", - "src": "2432:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 160, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2432:63:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 152, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "2422:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2422:74:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2409:87:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 164, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "2515:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$59_storage_$", - "typeString": "mapping(bytes32 => struct PrivateHashTimeLock.LockContract storage ref)" - } - }, - "id": 166, - "indexExpression": { - "id": 165, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 151, - "src": "2525:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2515:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage", - "typeString": "struct PrivateHashTimeLock.LockContract storage ref" - } - }, - "id": 167, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2529:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "2515:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 168, - "name": "INIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "2539:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2515:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f455849535453", - "id": 170, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2545:13:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", - "typeString": "literal_string \"SWAP_EXISTS\"" - }, - "value": "SWAP_EXISTS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_10858945dd31484ce6a77564821a1a6ff0e82939d9bea2b8e6caae50c7fc3750", - "typeString": "literal_string \"SWAP_EXISTS\"" - } - ], - "id": 163, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2507:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2507:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 172, - "nodeType": "ExpressionStatement", - "src": "2507:52:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 174, - "name": "priv", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 119, - "src": "2577:4:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_memory_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing memory" - } - }, - "id": 175, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2582:9:0", - "memberName": "generator", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "2577:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 176, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2594:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2577:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 173, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2569:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2569:27:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 179, - "nodeType": "ExpressionStatement", - "src": "2569:27:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 181, - "name": "priv", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 119, - "src": "2614:4:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_memory_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing memory" - } - }, - "id": 182, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2619:7:0", - "memberName": "modulus", - "nodeType": "MemberAccess", - "referencedDeclaration": 25, - "src": "2614:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 183, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2629:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2614:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 180, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2606:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2606:25:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 186, - "nodeType": "ExpressionStatement", - "src": "2606:25:0" - }, - { - "expression": { - "id": 202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 187, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "2642:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$59_storage_$", - "typeString": "mapping(bytes32 => struct PrivateHashTimeLock.LockContract storage ref)" - } - }, - "id": 189, - "indexExpression": { - "id": 188, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 151, - "src": "2652:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2642:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage", - "typeString": "struct PrivateHashTimeLock.LockContract storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "id": 191, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 131, - "src": "2684:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 192, - "name": "outputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "2709:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 193, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "2735:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 194, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "2759:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 195, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 110, - "src": "2779:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 196, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 123, - "src": "2801:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 197, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "2821:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 198, - "name": "outputNetwork", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 114, - "src": "2843:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "id": 199, - "name": "outputAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "2870:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "id": 200, - "name": "priv", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 119, - "src": "2897:4:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_memory_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_memory_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing memory" - } - ], - "id": 190, - "name": "LockContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "2658:12:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_LockContract_$59_storage_ptr_$", - "typeString": "type(struct PrivateHashTimeLock.LockContract storage pointer)" - } - }, - "id": 201, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2658:253:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_memory_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract memory" - } - }, - "src": "2642:269:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage", - "typeString": "struct PrivateHashTimeLock.LockContract storage ref" - } - }, - "id": 203, - "nodeType": "ExpressionStatement", - "src": "2642:269:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 205, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 131, - "src": "2952:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 206, - "name": "outputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "2965:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 207, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "2979:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 208, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 151, - "src": "2991:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 209, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 110, - "src": "2995:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 210, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 123, - "src": "3005:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 211, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "3013:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "id": 212, - "name": "outputNetwork", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 114, - "src": "3023:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "id": 213, - "name": "outputAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "3038:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "id": 214, - "name": "priv", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 119, - "src": "3053:4:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_memory_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_memory_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing memory" - } - ], - "id": 204, - "name": "NewContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "2927:11:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_struct$_PrivateEnhancing_$26_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,uint256,bytes32,bytes32,address,address,string memory,string memory,struct PrivateHashTimeLock.PrivateEnhancing memory)" - } - }, - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2927:140:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 216, - "nodeType": "EmitStatement", - "src": "2922:145:0" - } - ] - }, - "functionSelector": "9b0bcdcb", - "id": 218, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "newPrivateContract", - "nameLocation": "1914:18:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 120, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 106, - "mutability": "mutable", - "name": "outputAmount", - "nameLocation": "1950:12:0", - "nodeType": "VariableDeclaration", - "scope": 218, - "src": "1942:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 105, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1942:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 108, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "1980:10:0", - "nodeType": "VariableDeclaration", - "scope": 218, - "src": "1972:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 107, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1972:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 110, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "2008:8:0", - "nodeType": "VariableDeclaration", - "scope": 218, - "src": "2000:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 109, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2000:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 112, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "2042:8:0", - "nodeType": "VariableDeclaration", - "scope": 218, - "src": "2026:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 111, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2026:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 114, - "mutability": "mutable", - "name": "outputNetwork", - "nameLocation": "2074:13:0", - "nodeType": "VariableDeclaration", - "scope": 218, - "src": "2060:27:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 113, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2060:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 116, - "mutability": "mutable", - "name": "outputAddress", - "nameLocation": "2111:13:0", - "nodeType": "VariableDeclaration", - "scope": 218, - "src": "2097:27:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 115, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2097:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 119, - "mutability": "mutable", - "name": "priv", - "nameLocation": "2158:4:0", - "nodeType": "VariableDeclaration", - "scope": 218, - "src": "2134:28:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_memory_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing" - }, - "typeName": { - "id": 118, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 117, - "name": "PrivateEnhancing", - "nameLocations": [ - "2134:16:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 26, - "src": "2134:16:0" - }, - "referencedDeclaration": 26, - "src": "2134:16:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_storage_ptr", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing" - } - }, - "visibility": "internal" - } - ], - "src": "1932:236:0" - }, - "returnParameters": { - "id": 121, - "nodeType": "ParameterList", - "parameters": [], - "src": "2186:0:0" - }, - "scope": 504, - "src": "1905:1169:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 294, - "nodeType": "Block", - "src": "3135:471:0", - "statements": [ - { - "assignments": [ - 227 - ], - "declarations": [ - { - "constant": false, - "id": 227, - "mutability": "mutable", - "name": "c", - "nameLocation": "3166:1:0", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "3145:22:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract" - }, - "typeName": { - "id": 226, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 225, - "name": "LockContract", - "nameLocations": [ - "3145:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 59, - "src": "3145:12:0" - }, - "referencedDeclaration": 59, - "src": "3145:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 231, - "initialValue": { - "baseExpression": { - "id": 228, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "3170:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$59_storage_$", - "typeString": "mapping(bytes32 => struct PrivateHashTimeLock.LockContract storage ref)" - } - }, - "id": 230, - "indexExpression": { - "id": 229, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 220, - "src": "3180:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3170:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage", - "typeString": "struct PrivateHashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3145:38:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 233, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3201:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 234, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3203:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "3201:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 235, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "3213:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3201:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f4e4f545f414354495645", - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3221:17:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - }, - "value": "SWAP_NOT_ACTIVE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - } - ], - "id": 232, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "3193:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3193:46:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 239, - "nodeType": "ExpressionStatement", - "src": "3193:46:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 241, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3258:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 242, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3260:10:0", - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "3258:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "expression": { - "id": 243, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "3273:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3279:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "3273:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3258:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 246, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3290:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 240, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "3250:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3250:55:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 248, - "nodeType": "ExpressionStatement", - "src": "3250:55:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 264, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 250, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3337:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 251, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3339:10:0", - "memberName": "hashSecret", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "3337:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "arguments": [ - { - "expression": { - "expression": { - "id": 253, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3373:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 254, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3375:4:0", - "memberName": "priv", - "nodeType": "MemberAccess", - "referencedDeclaration": 58, - "src": "3373:6:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_storage", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing storage ref" - } - }, - "id": 255, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3380:9:0", - "memberName": "generator", - "nodeType": "MemberAccess", - "referencedDeclaration": 23, - "src": "3373:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "arguments": [ - { - "id": 258, - "name": "secret", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 222, - "src": "3399:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3391:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 256, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3391:7:0", - "typeDescriptions": {} - } - }, - "id": 259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3391:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "expression": { - "expression": { - "id": 260, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3408:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 261, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3410:4:0", - "memberName": "priv", - "nodeType": "MemberAccess", - "referencedDeclaration": 58, - "src": "3408:6:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_PrivateEnhancing_$26_storage", - "typeString": "struct PrivateHashTimeLock.PrivateEnhancing storage ref" - } - }, - "id": 262, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3415:7:0", - "memberName": "modulus", - "nodeType": "MemberAccess", - "referencedDeclaration": 25, - "src": "3408:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 252, - "name": "calculateHashSecret", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "3353:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)" - } - }, - "id": 263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3353:70:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "3337:86:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f534543524554", - "id": 265, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3425:16:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", - "typeString": "literal_string \"INVALID_SECRET\"" - }, - "value": "INVALID_SECRET" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_20442b474b3561be70a7e12c2acf875277f59e68e7748337cd68bf5c8ada064b", - "typeString": "literal_string \"INVALID_SECRET\"" - } - ], - "id": 249, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "3316:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3316:135:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 267, - "nodeType": "ExpressionStatement", - "src": "3316:135:0" - }, - { - "expression": { - "id": 272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "id": 268, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3462:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 270, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "3464:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "3462:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 271, - "name": "WITHDRAWN", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "3473:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3462:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 273, - "nodeType": "ExpressionStatement", - "src": "3462:20:0" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "id": 279, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3513:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 280, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3515:11:0", - "memberName": "inputAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 39, - "src": "3513:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "expression": { - "id": 274, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3493:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 277, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3495:8:0", - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 51, - "src": "3493:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3504:8:0", - "memberName": "transfer", - "nodeType": "MemberAccess", - "src": "3493:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3493:34:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 282, - "nodeType": "ExpressionStatement", - "src": "3493:34:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 284, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 220, - "src": "3552:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 285, - "name": "secret", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 222, - "src": "3556:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 286, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3564:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 287, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3566:10:0", - "memberName": "hashSecret", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "3564:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 288, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3578:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 289, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3580:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 49, - "src": "3578:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "expression": { - "id": 290, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3588:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 291, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3590:8:0", - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 51, - "src": "3588:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 283, - "name": "Withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 71, - "src": "3543:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$returns$__$", - "typeString": "function (bytes32,bytes32,bytes32,address,address)" - } - }, - "id": 292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3543:56:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 293, - "nodeType": "EmitStatement", - "src": "3538:61:0" - } - ] - }, - "functionSelector": "63615149", - "id": 295, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nameLocation": "3089:8:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 223, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 220, - "mutability": "mutable", - "name": "id", - "nameLocation": "3106:2:0", - "nodeType": "VariableDeclaration", - "scope": 295, - "src": "3098:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 219, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3098:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 222, - "mutability": "mutable", - "name": "secret", - "nameLocation": "3118:6:0", - "nodeType": "VariableDeclaration", - "scope": 295, - "src": "3110:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 221, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3110:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "3097:28:0" - }, - "returnParameters": { - "id": 224, - "nodeType": "ParameterList", - "parameters": [], - "src": "3135:0:0" - }, - "scope": 504, - "src": "3080:526:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 337, - "nodeType": "Block", - "src": "3757:219:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 307, - "name": "modulus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "3775:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 308, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3785:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3775:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "4d6f64756c75732063616e6e6f742062652030", - "id": 310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3788:21:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9abeeb3c73b526a3f82a7331ba0148e5c5651d567cb2589f67059a76ae4a2f81", - "typeString": "literal_string \"Modulus cannot be 0\"" - }, - "value": "Modulus cannot be 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9abeeb3c73b526a3f82a7331ba0148e5c5651d567cb2589f67059a76ae4a2f81", - "typeString": "literal_string \"Modulus cannot be 0\"" - } - ], - "id": 306, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "3767:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3767:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 312, - "nodeType": "ExpressionStatement", - "src": "3767:43:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 314, - "name": "base", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 297, - "src": "3828:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3835:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3828:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "626173652063616e6e6f742062652030", - "id": 317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3838:18:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9d64bf9c86f6569726beb048e0d4ccfc36d1f1db25c857d0a597dd762f52b90f", - "typeString": "literal_string \"base cannot be 0\"" - }, - "value": "base cannot be 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9d64bf9c86f6569726beb048e0d4ccfc36d1f1db25c857d0a597dd762f52b90f", - "typeString": "literal_string \"base cannot be 0\"" - } - ], - "id": 313, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "3820:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3820:37:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 319, - "nodeType": "ExpressionStatement", - "src": "3820:37:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 321, - "name": "exponent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 299, - "src": "3875:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 322, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3886:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3875:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "6578706f6e656e745f312063616e6e6f742062652030", - "id": 324, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3889:24:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cf1dcbcb74065c0b4cc75c49d3d558b90f1c4a7d0c11e0156bec635922502b78", - "typeString": "literal_string \"exponent_1 cannot be 0\"" - }, - "value": "exponent_1 cannot be 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cf1dcbcb74065c0b4cc75c49d3d558b90f1c4a7d0c11e0156bec635922502b78", - "typeString": "literal_string \"exponent_1 cannot be 0\"" - } - ], - "id": 320, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "3867:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3867:47:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 326, - "nodeType": "ExpressionStatement", - "src": "3867:47:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 329, - "name": "base", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 297, - "src": "3941:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "id": 330, - "name": "exponent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 299, - "src": "3949:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3941:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 332, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3940:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "id": 333, - "name": "modulus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "3961:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3940:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 328, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3932:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 327, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3932:7:0", - "typeDescriptions": {} - } - }, - "id": 335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3932:37:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 305, - "id": 336, - "nodeType": "Return", - "src": "3925:44:0" - } - ] - }, - "id": 338, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "calculateHashSecret", - "nameLocation": "3621:19:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 302, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 297, - "mutability": "mutable", - "name": "base", - "nameLocation": "3649:4:0", - "nodeType": "VariableDeclaration", - "scope": 338, - "src": "3641:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 296, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3641:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 299, - "mutability": "mutable", - "name": "exponent", - "nameLocation": "3663:8:0", - "nodeType": "VariableDeclaration", - "scope": 338, - "src": "3655:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 298, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3655:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 301, - "mutability": "mutable", - "name": "modulus", - "nameLocation": "3681:7:0", - "nodeType": "VariableDeclaration", - "scope": 338, - "src": "3673:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 300, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3673:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "3640:49:0" - }, - "returnParameters": { - "id": 305, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 304, - "mutability": "mutable", - "name": "result", - "nameLocation": "3745:6:0", - "nodeType": "VariableDeclaration", - "scope": 338, - "src": "3737:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 303, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3737:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "3736:16:0" - }, - "scope": 504, - "src": "3612:364:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 392, - "nodeType": "Block", - "src": "4019:314:0", - "statements": [ - { - "assignments": [ - 345 - ], - "declarations": [ - { - "constant": false, - "id": 345, - "mutability": "mutable", - "name": "c", - "nameLocation": "4050:1:0", - "nodeType": "VariableDeclaration", - "scope": 392, - "src": "4029:22:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract" - }, - "typeName": { - "id": 344, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 343, - "name": "LockContract", - "nameLocations": [ - "4029:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 59, - "src": "4029:12:0" - }, - "referencedDeclaration": 59, - "src": "4029:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 349, - "initialValue": { - "baseExpression": { - "id": 346, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "4054:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$59_storage_$", - "typeString": "mapping(bytes32 => struct PrivateHashTimeLock.LockContract storage ref)" - } - }, - "id": 348, - "indexExpression": { - "id": 347, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 340, - "src": "4064:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4054:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage", - "typeString": "struct PrivateHashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4029:38:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 351, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 345, - "src": "4086:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 352, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4088:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "4086:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 353, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "4098:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4086:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "535741505f4e4f545f414354495645", - "id": 355, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4106:17:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - }, - "value": "SWAP_NOT_ACTIVE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_afbfa7d3db262df0c92c413f0113503b1c1332dc5a4a874fcd8d6a6de57b74dd", - "typeString": "literal_string \"SWAP_NOT_ACTIVE\"" - } - ], - "id": 350, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "4078:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4078:46:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 357, - "nodeType": "ExpressionStatement", - "src": "4078:46:0" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 359, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 345, - "src": "4143:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 360, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4145:10:0", - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "4143:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "expression": { - "id": 361, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "4159:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4165:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "4159:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4143:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "494e56414c49445f54494d45", - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4176:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - }, - "value": "INVALID_TIME" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b98f3e47db5919a8c78ec10ff6bf7d1326066d3facdc164cf7441d38cae771df", - "typeString": "literal_string \"INVALID_TIME\"" - } - ], - "id": 358, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "4135:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4135:56:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 366, - "nodeType": "ExpressionStatement", - "src": "4135:56:0" - }, - { - "expression": { - "id": 371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "id": 367, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 345, - "src": "4202:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 369, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "4204:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "4202:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 370, - "name": "REFUNDED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "4213:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4202:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 372, - "nodeType": "ExpressionStatement", - "src": "4202:19:0" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "id": 378, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 345, - "src": "4250:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 379, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4252:11:0", - "memberName": "inputAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 39, - "src": "4250:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "expression": { - "id": 373, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 345, - "src": "4232:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 376, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4234:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 49, - "src": "4232:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4241:8:0", - "memberName": "transfer", - "nodeType": "MemberAccess", - "src": "4232:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4232:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 381, - "nodeType": "ExpressionStatement", - "src": "4232:32:0" - }, - { - "eventCall": { - "arguments": [ - { - "id": 383, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 340, - "src": "4287:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 384, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 345, - "src": "4291:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 385, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4293:10:0", - "memberName": "hashSecret", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "4291:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "expression": { - "id": 386, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 345, - "src": "4305:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 387, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4307:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 49, - "src": "4305:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "expression": { - "id": 388, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 345, - "src": "4315:1:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract storage pointer" - } - }, - "id": 389, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4317:8:0", - "memberName": "receiver", - "nodeType": "MemberAccess", - "referencedDeclaration": 51, - "src": "4315:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 382, - "name": "Refund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 81, - "src": "4280:6:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_address_$returns$__$", - "typeString": "function (bytes32,bytes32,address,address)" - } - }, - "id": 390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4280:46:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 391, - "nodeType": "EmitStatement", - "src": "4275:51:0" - } - ] - }, - "functionSelector": "7249fbb6", - "id": 393, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "refund", - "nameLocation": "3991:6:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 341, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 340, - "mutability": "mutable", - "name": "id", - "nameLocation": "4006:2:0", - "nodeType": "VariableDeclaration", - "scope": 393, - "src": "3998:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 339, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3998:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "3997:12:0" - }, - "returnParameters": { - "id": 342, - "nodeType": "ParameterList", - "parameters": [], - "src": "4019:0:0" - }, - "scope": 504, - "src": "3982:351:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 439, - "nodeType": "Block", - "src": "4419:223:0", - "statements": [ - { - "assignments": [ - 406 - ], - "declarations": [ - { - "constant": false, - "id": 406, - "mutability": "mutable", - "name": "result", - "nameLocation": "4446:6:0", - "nodeType": "VariableDeclaration", - "scope": 439, - "src": "4429:23:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 404, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4429:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 405, - "nodeType": "ArrayTypeName", - "src": "4429:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "visibility": "internal" - } - ], - "id": 413, - "initialValue": { - "arguments": [ - { - "expression": { - "id": 410, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 396, - "src": "4469:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4473:6:0", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "4469:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 409, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "4455:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 407, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4459:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 408, - "nodeType": "ArrayTypeName", - "src": "4459:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4455:25:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4429:51:0" - }, - { - "body": { - "id": 435, - "nodeType": "Block", - "src": "4544:68:0", - "statements": [ - { - "expression": { - "id": 433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 425, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 406, - "src": "4558:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 427, - "indexExpression": { - "id": 426, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "4565:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4558:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "baseExpression": { - "id": 429, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 396, - "src": "4590:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 431, - "indexExpression": { - "id": 430, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "4594:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4590:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 428, - "name": "getSingleStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 477, - "src": "4574:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$", - "typeString": "function (bytes32) view returns (uint256)" - } - }, - "id": 432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4574:27:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4558:43:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 434, - "nodeType": "ExpressionStatement", - "src": "4558:43:0" - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 418, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "4515:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 419, - "name": "ids", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 396, - "src": "4523:3:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4527:6:0", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "4523:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4515:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 436, - "initializationExpression": { - "assignments": [ - 415 - ], - "declarations": [ - { - "constant": false, - "id": 415, - "mutability": "mutable", - "name": "index", - "nameLocation": "4504:5:0", - "nodeType": "VariableDeclaration", - "scope": 436, - "src": "4496:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 414, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4496:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 417, - "initialValue": { - "hexValue": "30", - "id": 416, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4512:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "4496:17:0" - }, - "loopExpression": { - "expression": { - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "4535:7:0", - "subExpression": { - "id": 422, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "4535:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 424, - "nodeType": "ExpressionStatement", - "src": "4535:7:0" - }, - "nodeType": "ForStatement", - "src": "4491:121:0" - }, - { - "expression": { - "id": 437, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 406, - "src": "4629:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "functionReturnParameters": 401, - "id": 438, - "nodeType": "Return", - "src": "4622:13:0" - } - ] - }, - "functionSelector": "2f21a663", - "id": 440, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getStatus", - "nameLocation": "4348:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 397, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 396, - "mutability": "mutable", - "name": "ids", - "nameLocation": "4375:3:0", - "nodeType": "VariableDeclaration", - "scope": 440, - "src": "4358:20:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 394, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4358:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 395, - "nodeType": "ArrayTypeName", - "src": "4358:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "visibility": "internal" - } - ], - "src": "4357:22:0" - }, - "returnParameters": { - "id": 401, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 400, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 440, - "src": "4401:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 398, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4401:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 399, - "nodeType": "ArrayTypeName", - "src": "4401:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "visibility": "internal" - } - ], - "src": "4400:18:0" - }, - "scope": 504, - "src": "4339:303:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 476, - "nodeType": "Block", - "src": "4722:255:0", - "statements": [ - { - "assignments": [ - 449 - ], - "declarations": [ - { - "constant": false, - "id": 449, - "mutability": "mutable", - "name": "tempContract", - "nameLocation": "4752:12:0", - "nodeType": "VariableDeclaration", - "scope": 476, - "src": "4732:32:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_memory_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract" - }, - "typeName": { - "id": 448, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 447, - "name": "LockContract", - "nameLocations": [ - "4732:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 59, - "src": "4732:12:0" - }, - "referencedDeclaration": 59, - "src": "4732:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 453, - "initialValue": { - "baseExpression": { - "id": 450, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "4767:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$59_storage_$", - "typeString": "mapping(bytes32 => struct PrivateHashTimeLock.LockContract storage ref)" - } - }, - "id": 452, - "indexExpression": { - "id": 451, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 442, - "src": "4777:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4767:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage", - "typeString": "struct PrivateHashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4732:48:0" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 454, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4795:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_memory_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract memory" - } - }, - "id": 455, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4808:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "4795:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 456, - "name": "ACTIVE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "4818:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4795:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 462, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 458, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4828:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_memory_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract memory" - } - }, - "id": 459, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4841:10:0", - "memberName": "expiration", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "4828:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 460, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "4854:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 461, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4860:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "4854:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4828:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4795:74:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 474, - "nodeType": "Block", - "src": "4918:53:0", - "statements": [ - { - "expression": { - "id": 472, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 469, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 445, - "src": "4932:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "expression": { - "id": 470, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4941:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_memory_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract memory" - } - }, - "id": 471, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4954:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "4941:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4932:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 473, - "nodeType": "ExpressionStatement", - "src": "4932:28:0" - } - ] - }, - "id": 475, - "nodeType": "IfStatement", - "src": "4791:180:0", - "trueBody": { - "id": 468, - "nodeType": "Block", - "src": "4871:41:0", - "statements": [ - { - "expression": { - "id": 466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 464, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 445, - "src": "4885:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 465, - "name": "EXPIRED", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "4894:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4885:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 467, - "nodeType": "ExpressionStatement", - "src": "4885:16:0" - } - ] - } - } - ] - }, - "functionSelector": "fbdf3b43", - "id": 477, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getSingleStatus", - "nameLocation": "4657:15:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 443, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 442, - "mutability": "mutable", - "name": "id", - "nameLocation": "4681:2:0", - "nodeType": "VariableDeclaration", - "scope": 477, - "src": "4673:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 441, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4673:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "4672:12:0" - }, - "returnParameters": { - "id": 446, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 445, - "mutability": "mutable", - "name": "result", - "nameLocation": "4714:6:0", - "nodeType": "VariableDeclaration", - "scope": 477, - "src": "4706:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 444, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4706:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "4705:16:0" - }, - "scope": 504, - "src": "4648:329:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 502, - "nodeType": "Block", - "src": "5053:187:0", - "statements": [ - { - "assignments": [ - 486 - ], - "declarations": [ - { - "constant": false, - "id": 486, - "mutability": "mutable", - "name": "tempContract", - "nameLocation": "5083:12:0", - "nodeType": "VariableDeclaration", - "scope": 502, - "src": "5063:32:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_memory_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract" - }, - "typeName": { - "id": 485, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 484, - "name": "LockContract", - "nameLocations": [ - "5063:12:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 59, - "src": "5063:12:0" - }, - "referencedDeclaration": 59, - "src": "5063:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract" - } - }, - "visibility": "internal" - } - ], - "id": 490, - "initialValue": { - "baseExpression": { - "id": 487, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "5098:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_LockContract_$59_storage_$", - "typeString": "mapping(bytes32 => struct PrivateHashTimeLock.LockContract storage ref)" - } - }, - "id": 489, - "indexExpression": { - "id": 488, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 479, - "src": "5108:2:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5098:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_storage", - "typeString": "struct PrivateHashTimeLock.LockContract storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5063:48:0" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 491, - "name": "tempContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 486, - "src": "5126:12:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_LockContract_$59_memory_ptr", - "typeString": "struct PrivateHashTimeLock.LockContract memory" - } - }, - "id": 492, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "5139:6:0", - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "5126:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 493, - "name": "INIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "5149:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5126:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 500, - "nodeType": "Block", - "src": "5198:36:0", - "statements": [ - { - "expression": { - "hexValue": "74727565", - "id": 498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5219:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 483, - "id": 499, - "nodeType": "Return", - "src": "5212:11:0" - } - ] - }, - "id": 501, - "nodeType": "IfStatement", - "src": "5122:112:0", - "trueBody": { - "id": 497, - "nodeType": "Block", - "src": "5155:37:0", - "statements": [ - { - "expression": { - "hexValue": "66616c7365", - "id": 495, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5176:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 483, - "id": 496, - "nodeType": "Return", - "src": "5169:12:0" - } - ] - } - } - ] - }, - "functionSelector": "6c8244b8", - "id": 503, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "contractExists", - "nameLocation": "4992:14:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 480, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 479, - "mutability": "mutable", - "name": "id", - "nameLocation": "5015:2:0", - "nodeType": "VariableDeclaration", - "scope": 503, - "src": "5007:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 478, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "5007:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "5006:12:0" - }, - "returnParameters": { - "id": 483, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 482, - "mutability": "mutable", - "name": "result", - "nameLocation": "5045:6:0", - "nodeType": "VariableDeclaration", - "scope": 503, - "src": "5040:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 481, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5040:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "5039:13:0" - }, - "scope": 504, - "src": "4983:257:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 505, - "src": "57:5185:0", - "usedErrors": [] - } - ], - "src": "32:5211:0" - }, - "functionHashes": { - "contractExists(bytes32)": "6c8244b8", - "getSingleStatus(bytes32)": "fbdf3b43", - "getStatus(bytes32[])": "2f21a663", - "newPrivateContract(uint256,uint256,bytes32,address,string,string,(uint256,uint256))": "9b0bcdcb", - "refund(bytes32)": "7249fbb6", - "withdraw(bytes32,bytes32)": "63615149" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "942000", - "executionCost": "981", - "totalCost": "942981" - }, - "external": { - "contractExists(bytes32)": "infinite", - "getSingleStatus(bytes32)": "infinite", - "getStatus(bytes32[])": "infinite", - "newPrivateContract(uint256,uint256,bytes32,address,string,string,(uint256,uint256))": "infinite", - "refund(bytes32)": "infinite", - "withdraw(bytes32,bytes32)": "infinite" - }, - "internal": { - "calculateHashSecret(uint256,uint256,uint256)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol b/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol deleted file mode 100644 index e698a43277..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/PrivateHashTimeLock.sol +++ /dev/null @@ -1,176 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.19; - -contract PrivateHashTimeLock { - mapping(bytes32 => LockContract) private contracts; - - // / - WITHDRAWN - // INVALID - ACTIVE | - // \ - EXPIRED - REFUNDED - - uint256 private constant INIT = 0; // INIT swap -> can go to ACTIVE - uint256 private constant ACTIVE = 1; // Active swap -> can go to WITHDRAWN or EXPIRED - uint256 private constant REFUNDED = 2; // Swap is refunded -> final state. - uint256 private constant WITHDRAWN = 3; // Swap is withdrawn -> final state. - uint256 private constant EXPIRED = 4; // Swap is expired -> can go to REFUNDED - - struct PrivateEnhancing { - // should be large - uint256 generator; - // should be large - uint256 modulus; - } - - struct SwapDetails { - address payable sender; - address payable receiver; - uint256 inputAmount; - bytes32 hashSecret; - uint256 expiration; - } - - struct LockContract { - uint256 inputAmount; - uint256 outputAmount; - uint256 expiration; - uint256 status; - bytes32 hashSecret; - address payable sender; - address payable receiver; - string outputNetwork; - string outputAddress; - PrivateEnhancing priv; - } - - event Withdraw( - bytes32 indexed id, bytes32 secret, bytes32 hashSecret, address indexed sender, address indexed receiver - ); - - event Refund(bytes32 indexed id, bytes32 hashSecret, address indexed sender, address indexed receiver); - - event NewContract( - uint256 inputAmount, - uint256 outputAmount, - uint256 expiration, - bytes32 indexed id, - bytes32 hashSecret, - address indexed sender, - address indexed receiver, - string outputNetwork, - string outputAddress, - PrivateEnhancing priv - ); - - function newPrivateContract( - uint256 outputAmount, - uint256 expiration, - bytes32 hashLock, - address payable receiver, - string memory outputNetwork, - string memory outputAddress, - PrivateEnhancing memory priv - ) external payable { - address payable sender = payable(msg.sender); - uint256 inputAmount = msg.value; - - require(expiration > block.timestamp, "INVALID_TIME"); - - require(inputAmount > 0, "INVALID_AMOUNT"); - - bytes32 id = keccak256(abi.encode(sender, receiver, inputAmount, hashLock, expiration)); - - require(contracts[id].status == INIT, "SWAP_EXISTS"); - require(priv.generator > 0); - require(priv.modulus > 0); - - contracts[id] = LockContract( - inputAmount, - outputAmount, - expiration, - ACTIVE, - hashLock, - sender, - receiver, - outputNetwork, - outputAddress, - priv - ); - - emit NewContract( - inputAmount, outputAmount, expiration, id, hashLock, sender, receiver, outputNetwork, outputAddress, priv - ); - } - - function withdraw(bytes32 id, bytes32 secret) external { - LockContract storage c = contracts[id]; - require(c.status == ACTIVE, "SWAP_NOT_ACTIVE"); - - require(c.expiration > block.timestamp, "INVALID_TIME"); - - require( - c.hashSecret == calculateHashSecret(c.priv.generator, uint256(secret), c.priv.modulus), "INVALID_SECRET" - ); - - c.status = WITHDRAWN; - - c.receiver.transfer(c.inputAmount); - - emit Withdraw(id, secret, c.hashSecret, c.sender, c.receiver); - } - - function calculateHashSecret(uint256 base, uint256 exponent, uint256 modulus) - internal - pure - returns (bytes32 result) - { - require(modulus > 0, "Modulus cannot be 0"); - require(base > 0, "base cannot be 0"); - require(exponent > 0, "exponent_1 cannot be 0"); - - return bytes32((base ** exponent) % modulus); - } - - function refund(bytes32 id) external { - LockContract storage c = contracts[id]; - - require(c.status == ACTIVE, "SWAP_NOT_ACTIVE"); - - require(c.expiration <= block.timestamp, "INVALID_TIME"); - - c.status = REFUNDED; - - c.sender.transfer(c.inputAmount); - - emit Refund(id, c.hashSecret, c.sender, c.receiver); - } - - function getStatus(bytes32[] memory ids) public view returns (uint256[] memory) { - uint256[] memory result = new uint256[](ids.length); - - for (uint256 index = 0; index < ids.length; index++) { - result[index] = getSingleStatus(ids[index]); - } - - return result; - } - - function getSingleStatus(bytes32 id) public view returns (uint256 result) { - LockContract memory tempContract = contracts[id]; - - if (tempContract.status == ACTIVE && tempContract.expiration < block.timestamp) { - result = EXPIRED; - } else { - result = tempContract.status; - } - } - - function contractExists(bytes32 id) public view returns (bool result) { - LockContract memory tempContract = contracts[id]; - - if (tempContract.status == INIT) { - return false; - } else { - return true; - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 04a8530a2f..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,904 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC-ETH Besu - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * Defines the parameters for retrieving the single status of the HTLC swap. - * @export - * @interface GetSingleStatusRequest - */ -export interface GetSingleStatusRequest { - /** - * - * @type {string} - * @memberof GetSingleStatusRequest - */ - 'id': string; - /** - * - * @type {Web3SigningCredential} - * @memberof GetSingleStatusRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {string} - * @memberof GetSingleStatusRequest - */ - 'connectorId': string; - /** - * - * @type {string} - * @memberof GetSingleStatusRequest - */ - 'keychainId': string; -} -/** - * Defines the parameters for retrieving the status of the HTLC swap. - * @export - * @interface GetStatusRequest - */ -export interface GetStatusRequest { - /** - * - * @type {Array} - * @memberof GetStatusRequest - */ - 'ids': Array; - /** - * - * @type {Web3SigningCredential} - * @memberof GetStatusRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {string} - * @memberof GetStatusRequest - */ - 'connectorId': string; - /** - * - * @type {string} - * @memberof GetStatusRequest - */ - 'keychainId': string; -} -/** - * - * @export - * @interface InitializeRequest - */ -export interface InitializeRequest { - /** - * connectorId for the connector besu plugin - * @type {string} - * @memberof InitializeRequest - */ - 'connectorId': string; - /** - * keychainId for the keychain plugin - * @type {string} - * @memberof InitializeRequest - */ - 'keychainId': string; - /** - * - * @type {Array} - * @memberof InitializeRequest - */ - 'constructorArgs': Array; - /** - * - * @type {Web3SigningCredential} - * @memberof InitializeRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {number} - * @memberof InitializeRequest - */ - 'gas'?: number; -} -/** - * - * @export - * @interface InvokeContractV1Response - */ -export interface InvokeContractV1Response { - /** - * - * @type {Web3TransactionReceipt} - * @memberof InvokeContractV1Response - */ - 'transactionReceipt'?: Web3TransactionReceipt; - /** - * - * @type {any} - * @memberof InvokeContractV1Response - */ - 'callOutput'?: any; - /** - * - * @type {boolean} - * @memberof InvokeContractV1Response - */ - 'success': boolean; -} -/** - * - * @export - * @interface NewContractObj - */ -export interface NewContractObj { - /** - * Contract address - * @type {string} - * @memberof NewContractObj - */ - 'contractAddress': string; - /** - * - * @type {number} - * @memberof NewContractObj - */ - 'inputAmount'?: number; - /** - * - * @type {number} - * @memberof NewContractObj - */ - 'outputAmount': number; - /** - * - * @type {number} - * @memberof NewContractObj - */ - 'expiration': number; - /** - * - * @type {string} - * @memberof NewContractObj - */ - 'hashLock': string; - /** - * - * @type {string} - * @memberof NewContractObj - */ - 'receiver'?: string; - /** - * - * @type {string} - * @memberof NewContractObj - */ - 'outputNetwork': string; - /** - * - * @type {string} - * @memberof NewContractObj - */ - 'outputAddress': string; - /** - * connectorId for the connector besu plugin - * @type {string} - * @memberof NewContractObj - */ - 'connectorId': string; - /** - * - * @type {Web3SigningCredential} - * @memberof NewContractObj - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * keychainId for the keychian plugin - * @type {string} - * @memberof NewContractObj - */ - 'keychainId': string; - /** - * - * @type {NewContractObjGas} - * @memberof NewContractObj - */ - 'gas'?: NewContractObjGas; -} -/** - * @type NewContractObjGas - * @export - */ -export type NewContractObjGas = number | string; - -/** - * - * @export - * @interface RefundReq - */ -export interface RefundReq { - /** - * Contract htlc id for refund - * @type {string} - * @memberof RefundReq - */ - 'id': string; - /** - * - * @type {Web3SigningCredential} - * @memberof RefundReq - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * connectorId for the connector besu plugin - * @type {string} - * @memberof RefundReq - */ - 'connectorId': string; - /** - * keychainId for the keychain plugin - * @type {string} - * @memberof RefundReq - */ - 'keychainId': string; - /** - * - * @type {NewContractObjGas} - * @memberof RefundReq - */ - 'gas'?: NewContractObjGas; -} -/** - * - * @export - * @interface RunTransactionResponse - */ -export interface RunTransactionResponse { - /** - * - * @type {Web3TransactionReceipt} - * @memberof RunTransactionResponse - */ - 'transactionReceipt': Web3TransactionReceipt; -} -/** - * @type Web3SigningCredential - * @export - */ -export type Web3SigningCredential = Web3SigningCredentialCactusKeychainRef | Web3SigningCredentialNone | Web3SigningCredentialPrivateKeyHex; - -/** - * - * @export - * @interface Web3SigningCredentialCactusKeychainRef - */ -export interface Web3SigningCredentialCactusKeychainRef { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'ethAccount': string; - /** - * The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainEntryKey': string; - /** - * The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainId': string; -} - - -/** - * Using this denotes that there is no signing required because the transaction is pre-signed. - * @export - * @interface Web3SigningCredentialNone - */ -export interface Web3SigningCredentialNone { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialNone - */ - 'type': Web3SigningCredentialType; -} - - -/** - * - * @export - * @interface Web3SigningCredentialPrivateKeyHex - */ -export interface Web3SigningCredentialPrivateKeyHex { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'ethAccount': string; - /** - * The HEX encoded private key of an eth account. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'secret': string; -} - - -/** - * - * @export - * @enum {string} - */ - -export const Web3SigningCredentialType = { - CactusKeychainRef: 'CACTUS_KEYCHAIN_REF', - GethKeychainPassword: 'GETH_KEYCHAIN_PASSWORD', - PrivateKeyHex: 'PRIVATE_KEY_HEX', - None: 'NONE' -} as const; - -export type Web3SigningCredentialType = typeof Web3SigningCredentialType[keyof typeof Web3SigningCredentialType]; - - -/** - * - * @export - * @interface Web3TransactionReceipt - */ -export interface Web3TransactionReceipt { - [key: string]: any; - - /** - * - * @type {boolean} - * @memberof Web3TransactionReceipt - */ - 'status': boolean; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'transactionHash': string; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'transactionIndex': number; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'blockHash': string; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'blockNumber': number; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'gasUsed': number; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'contractAddress'?: string | null; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'from': string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'to': string; -} -/** - * - * @export - * @interface WithdrawReq - */ -export interface WithdrawReq { - /** - * Contract locked id - * @type {string} - * @memberof WithdrawReq - */ - 'id': string; - /** - * Secret need to unlock the contract - * @type {string} - * @memberof WithdrawReq - */ - 'secret': string; - /** - * - * @type {Web3SigningCredential} - * @memberof WithdrawReq - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * connectorId for the connector besu plugin - * @type {string} - * @memberof WithdrawReq - */ - 'connectorId': string; - /** - * keychainId for the keychain plugin - * @type {string} - * @memberof WithdrawReq - */ - 'keychainId': string; - /** - * - * @type {NewContractObjGas} - * @memberof WithdrawReq - */ - 'gas'?: NewContractObjGas; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {GetSingleStatusRequest} [getSingleStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSingleStatusV1: async (getSingleStatusRequest?: GetSingleStatusRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getSingleStatusRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {GetStatusRequest} [getStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatusV1: async (getStatusRequest?: GetStatusRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getStatusRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {InitializeRequest} [initializeRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - initializeV1: async (initializeRequest?: InitializeRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(initializeRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {NewContractObj} [newContractObj] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newContractV1: async (newContractObj?: NewContractObj, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(newContractObj, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {RefundReq} [refundReq] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - refundV1: async (refundReq?: RefundReq, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(refundReq, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {WithdrawReq} [withdrawReq] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - withdrawV1: async (withdrawReq?: WithdrawReq, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(withdrawReq, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @param {GetSingleStatusRequest} [getSingleStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSingleStatusV1(getSingleStatusRequest?: GetSingleStatusRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSingleStatusV1(getSingleStatusRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {GetStatusRequest} [getStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatusV1(getStatusRequest?: GetStatusRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatusV1(getStatusRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {InitializeRequest} [initializeRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async initializeV1(initializeRequest?: InitializeRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.initializeV1(initializeRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {NewContractObj} [newContractObj] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async newContractV1(newContractObj?: NewContractObj, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.newContractV1(newContractObj, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {RefundReq} [refundReq] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async refundV1(refundReq?: RefundReq, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.refundV1(refundReq, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {WithdrawReq} [withdrawReq] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async withdrawV1(withdrawReq?: WithdrawReq, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.withdrawV1(withdrawReq, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @param {GetSingleStatusRequest} [getSingleStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSingleStatusV1(getSingleStatusRequest?: GetSingleStatusRequest, options?: any): AxiosPromise { - return localVarFp.getSingleStatusV1(getSingleStatusRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {GetStatusRequest} [getStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatusV1(getStatusRequest?: GetStatusRequest, options?: any): AxiosPromise> { - return localVarFp.getStatusV1(getStatusRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {InitializeRequest} [initializeRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - initializeV1(initializeRequest?: InitializeRequest, options?: any): AxiosPromise { - return localVarFp.initializeV1(initializeRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {NewContractObj} [newContractObj] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newContractV1(newContractObj?: NewContractObj, options?: any): AxiosPromise { - return localVarFp.newContractV1(newContractObj, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {RefundReq} [refundReq] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - refundV1(refundReq?: RefundReq, options?: any): AxiosPromise { - return localVarFp.refundV1(refundReq, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {WithdrawReq} [withdrawReq] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - withdrawV1(withdrawReq?: WithdrawReq, options?: any): AxiosPromise { - return localVarFp.withdrawV1(withdrawReq, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @param {GetSingleStatusRequest} [getSingleStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getSingleStatusV1(getSingleStatusRequest?: GetSingleStatusRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getSingleStatusV1(getSingleStatusRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {GetStatusRequest} [getStatusRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getStatusV1(getStatusRequest?: GetStatusRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getStatusV1(getStatusRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {InitializeRequest} [initializeRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public initializeV1(initializeRequest?: InitializeRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).initializeV1(initializeRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {NewContractObj} [newContractObj] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public newContractV1(newContractObj?: NewContractObj, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).newContractV1(newContractObj, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {RefundReq} [refundReq] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public refundV1(refundReq?: RefundReq, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).refundV1(refundReq, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {WithdrawReq} [withdrawReq] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public withdrawV1(withdrawReq?: WithdrawReq, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).withdrawV1(withdrawReq, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 5fe7764693..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC-ETH Besu - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index d1ca0b15b9..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC-ETH Besu - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index a95e131f86..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC-ETH Besu - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index cacc31ce7d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - HTLC-ETH Besu - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/index.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/index.web.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/index.web.ts deleted file mode 100755 index c276ecb22b..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/index.web.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { - PluginHtlcEthBesu, - IPluginHtlcEthBesuOptions, -} from "./plugin-htlc-eth-besu"; diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-factory-htlc-eth-besu.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-factory-htlc-eth-besu.ts deleted file mode 100644 index b9fb03e184..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-factory-htlc-eth-besu.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginHtlcEthBesuOptions, - PluginHtlcEthBesu, -} from "./plugin-htlc-eth-besu"; - -export class PluginFactoryHtlcEthBesu extends PluginFactory< - PluginHtlcEthBesu, - IPluginHtlcEthBesuOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginHtlcEthBesuOptions, - ): Promise { - return new PluginHtlcEthBesu(pluginOptions); - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts deleted file mode 100644 index 2eaea2d0e2..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts +++ /dev/null @@ -1,287 +0,0 @@ -import { Express } from "express"; - -import OAS from "../json/openapi.json"; - -import { - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { Checks, LogLevelDesc } from "@hyperledger/cactus-common"; - -import { GetSingleStatusEndpoint } from "./web-services/get-single-status-endpoint"; -import { GetStatusEndpoint } from "./web-services/get-status-endpoint"; -import { NewContractEndpoint } from "./web-services/new-contract-endpoint"; -import { RefundEndpoint } from "./web-services/refund-endpoint"; -import { WithdrawEndpoint } from "./web-services/withdraw-endpoint"; -import { InitializeEndpoint } from "./web-services/initialize-endpoint"; -import { - EthContractInvocationType, - InvokeContractV1Response, - PluginLedgerConnectorBesu, - RunTransactionResponse, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import HashTimeLockJSON from "../solidity/contracts/HashTimeLock.json"; -const contractName = HashTimeLockJSON.ast.nodes[1].canonicalName || "htlc"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - RefundReq, - WithdrawReq, - NewContractObj, - InitializeRequest, - GetStatusRequest, - GetSingleStatusRequest, - Web3SigningCredentialPrivateKeyHex, -} from "./generated/openapi/typescript-axios"; -export interface IPluginHtlcEthBesuOptions extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - instanceId: string; - pluginRegistry: PluginRegistry; -} -export class PluginHtlcEthBesu implements ICactusPlugin, IPluginWebService { - public static readonly CLASS_NAME = "PluginHtlcEthBesu"; - private readonly instanceId: string; - private readonly pluginRegistry: PluginRegistry; - private readonly estimatedGas = 6721975; - private endpoints: IWebServiceEndpoint[] | undefined; - - constructor(public readonly opts: IPluginHtlcEthBesuOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} opts`); - Checks.truthy(opts.instanceId, `${fnTag} opts.instanceId`); - Checks.truthy(opts.pluginRegistry, `${fnTag} opts.pluginRegistry`); - Checks.nonBlankString(opts.instanceId, `${fnTag} opts.instanceId`); - - this.instanceId = opts.instanceId; - this.pluginRegistry = opts.pluginRegistry; - } - - public get className(): string { - return PluginHtlcEthBesu.CLASS_NAME; - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - /** - * Feature is deprecated, we won't need this method in the future. - */ - public async shutdown(): Promise { - return; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return "@hyperledger/cactus-plugin-htlc-eth-besu"; - } - - public async onPluginInit(): Promise { - return; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - webServices.forEach((ws) => ws.registerExpress(app)); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new GetSingleStatusEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - { - const endpoint = new GetStatusEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - { - const endpoint = new NewContractEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - { - const endpoint = new RefundEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - { - const endpoint = new WithdrawEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - { - const endpoint = new InitializeEndpoint({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(endpoint); - } - this.endpoints = endpoints; - return endpoints; - } - - public async initialize( - initializeRequest: InitializeRequest, - ): Promise { - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == initializeRequest.connectorId, - ) as PluginLedgerConnectorBesu; - - const hashedTimeLockResponse = await connector.deployContract({ - contractName: contractName, - contractAbi: HashTimeLockJSON.abi, - bytecode: HashTimeLockJSON.bytecode, - web3SigningCredential: initializeRequest.web3SigningCredential, - keychainId: initializeRequest.keychainId, - constructorArgs: initializeRequest.constructorArgs, - gas: initializeRequest.gas || this.estimatedGas, - }); - return hashedTimeLockResponse; - } - - public async newContract( - newContractRequest: NewContractObj, - ): Promise { - const params = [ - newContractRequest.outputAmount, - newContractRequest.expiration, - newContractRequest.hashLock, - newContractRequest.receiver, - newContractRequest.outputNetwork, - newContractRequest.outputAddress, - ]; - - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == newContractRequest.connectorId, - ) as PluginLedgerConnectorBesu; - - const result = await connector.invokeContract({ - contractName: contractName, - keychainId: newContractRequest.keychainId, - signingCredential: newContractRequest.web3SigningCredential, - contractAddress: newContractRequest.contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "newContract", - params, - gas: newContractRequest.gas || this.estimatedGas, - value: newContractRequest.inputAmount, - }); - - console.log( - "newContractV1() args to hash for ID: ", - JSON.stringify( - [ - ( - newContractRequest.web3SigningCredential as Web3SigningCredentialPrivateKeyHex - ).ethAccount, - newContractRequest.receiver, - newContractRequest.inputAmount, - newContractRequest.hashLock, - newContractRequest.expiration, - ], - null, - 4, - ), - ); - - return result; - } - - public async getSingleStatus( - req: GetSingleStatusRequest, - ): Promise { - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == req.connectorId, - ) as PluginLedgerConnectorBesu; - - const result = await connector.invokeContract({ - contractName: contractName, - signingCredential: req.web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getSingleStatus", - params: [req.id], - keychainId: req.keychainId, - }); - return result; - } - - public async getStatus( - req: GetStatusRequest, - ): Promise { - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == req.connectorId, - ) as PluginLedgerConnectorBesu; - - const result = await connector.invokeContract({ - contractName: contractName, - signingCredential: req.web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getStatus", - params: [req.ids], - keychainId: req.keychainId, - }); - return result; - } - - public async refund( - refundRequest: RefundReq, - ): Promise { - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == refundRequest.connectorId, - ) as PluginLedgerConnectorBesu; - - const result = await connector.invokeContract({ - contractName: contractName, - keychainId: refundRequest.keychainId, - signingCredential: refundRequest.web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "refund", - params: [refundRequest.id], - gas: refundRequest.gas || this.estimatedGas, - }); - return result; - } - - public async withdraw( - withdrawRequest: WithdrawReq, - ): Promise { - const connector = this.pluginRegistry.plugins.find( - (plugin) => plugin.getInstanceId() == withdrawRequest.connectorId, - ) as PluginLedgerConnectorBesu; - const params = [withdrawRequest.id, withdrawRequest.secret]; - const result = await connector.invokeContract({ - contractName: contractName, - keychainId: withdrawRequest.keychainId, - signingCredential: withdrawRequest.web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "withdraw", - params, - gas: withdrawRequest.gas || this.estimatedGas, - }); - - return result; - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/private-htlc-helper.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/private-htlc-helper.ts deleted file mode 100644 index 5cedf6f762..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/private-htlc-helper.ts +++ /dev/null @@ -1,102 +0,0 @@ -import * as ethers from "ethers"; -import BN from "bn.js"; -import * as dotenv from "dotenv"; -import path from "path"; - -const envPath = path.join(__dirname, "../../../.env"); -dotenv.config({ path: envPath }); -const providerURL = process.env.RPC; - -const main = async () => { - try { - if (!providerURL) { - throw new Error("no provider"); - } - - console.log("====== NON PRIVACY PRESERVING HTLC ======="); - const secret = "my_secret"; - const hashPair = newSecretHashPair(secret); - - const HASH_MY_SECRET_NOT_PRIVATE = hashPair.secretHash; - const BYTES32_SECRET_NOT_PRIVATE = hashPair.secretBytes; - const BYTES32_SECRET_NOT_PRIVATE_ENCODED = ethers.decodeBytes32String( - BYTES32_SECRET_NOT_PRIVATE, - ); - - console.log(`HASH_MY_SECRET_NOT_PRIVATE: ${HASH_MY_SECRET_NOT_PRIVATE}`); - console.log(`BYTES32_SECRET_NOT_PRIVATE: ${BYTES32_SECRET_NOT_PRIVATE}`); - console.log( - `BYTES32_SECRET_NOT_PRIVATE_ENCODED: ${BYTES32_SECRET_NOT_PRIVATE_ENCODED}`, - ); - - const timelockA = getEpochTimeWithHours(2); - console.log(`timelockA ${timelockA}`); - - const timelockB = getEpochTimeWithHours(1); - console.log(`timelockB ${timelockB}`); - - console.log("====== PRIVACY PRESERVING HTLC ======="); - const GENERATOR = new BN(11); - const MODULUS = new BN(109); - const SECRET_ALICE = new BN(3); - const BOB_INPUT_TO_Z = new BN(50); - - const exponentiationAliceHashLock = modExp( - GENERATOR, - MODULUS, - SECRET_ALICE, - ); - const HASH_SECRET_ALICE = toBytes32(exponentiationAliceHashLock); - console.log(`Ya: ${HASH_SECRET_ALICE}`); - console.log(`sa: ${toBytes32(SECRET_ALICE)}`); - - const Z = modExp(GENERATOR, MODULUS, SECRET_ALICE.mul(BOB_INPUT_TO_Z)); - const BYTES_32_Z = toBytes32(Z); - console.log(`Z: ${BYTES_32_Z}`); - - const YB = exponentiationAliceHashLock - .mul(modExp(GENERATOR, MODULUS, new BN(Z.toNumber()))) - .mod(MODULUS); - console.log(`Yb: ${YB}`); - console.log(`Yb: ${toBytes32(YB)}`); - - const sb = SECRET_ALICE.add(Z); - console.log(`sb: ${sb}`); - console.log(`sb: ${toBytes32(sb)}`); - } catch (error) { - console.log("There has been an error ", error); - throw new Error(); - } -}; - -main().catch((error) => { - console.log("Caught promise rejection (validation failed). Errors: ", error); - throw new Error(); -}); - -function modExp(base: BN, modulus: BN, exponent: BN): BN { - const result = base.toRed(BN.red(modulus)).redPow(exponent); - console.log(`Exponentiation is: ${result}`); - return result; -} - -function toBytes32(value: BN): string { - const hex = ethers.toBeHex(value.toString()); - return ethers.zeroPadValue(hex, 32); -} - -function getEpochTimeWithHours(hoursToAdd = 0) { - const now = new Date(); - now.setHours(now.getHours() + hoursToAdd); - - return Math.floor(now.getTime() / 1000); -} - -function newSecretHashPair(secret: string) { - const secretBytes = ethers.encodeBytes32String(secret); - const secretHash = ethers.keccak256(secretBytes); - return { - secretBytes: secretBytes, - secretHash: secretHash, - }; -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/public-api.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/public-api.ts deleted file mode 100644 index 76484e883d..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/public-api.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as HashTimeLockJson from "../solidity/contracts/HashTimeLock.json"; -export { HashTimeLockJson }; - -export * from "./generated/openapi/typescript-axios/index"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; - -import { PluginFactoryHtlcEthBesu } from "./plugin-factory-htlc-eth-besu"; -export { - PluginHtlcEthBesu, - IPluginHtlcEthBesuOptions, -} from "./plugin-htlc-eth-besu"; -export { PluginFactoryHtlcEthBesu } from "./plugin-factory-htlc-eth-besu"; -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryHtlcEthBesu(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/get-single-status-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/get-single-status-endpoint.ts deleted file mode 100644 index 0ad4a28d9e..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/get-single-status-endpoint.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginHtlcEthBesu } from "../plugin-htlc-eth-besu"; -import OAS from "../../json/openapi.json"; - -export interface IGetSingleStatusEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesu; -} -export class GetSingleStatusEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetSingleStatusEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: IGetSingleStatusEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return GetSingleStatusEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-single-status" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetSingleStatusEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const { callOutput } = await this.options.plugin.getSingleStatus( - req.body, - ); - - if (callOutput === undefined) { - res.status(400).json({ - message: "Bad request", - error: callOutput, - }); - } else { - res.status(200); - res.send(callOutput); - } - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/get-status-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/get-status-endpoint.ts deleted file mode 100644 index 5b6eab8796..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/get-status-endpoint.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import OAS from "../../json/openapi.json"; -import { PluginHtlcEthBesu } from "../plugin-htlc-eth-besu"; -export interface IGetStatusEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesu; -} -export class GetStatusEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetStatusEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: IGetStatusEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return GetStatusEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/get-status" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetStatusEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const { callOutput } = await this.options.plugin.getStatus(req.body); - - if (callOutput === undefined) { - res.status(400).json({ - message: "Bad request", - error: callOutput, - }); - } else { - res.status(200); - res.send(callOutput); - } - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/initialize-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/initialize-endpoint.ts deleted file mode 100644 index 46a5d95c61..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/initialize-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import OAS from "../../json/openapi.json"; - -import { InitializeRequest } from "../generated/openapi/typescript-axios"; -import { PluginHtlcEthBesu } from "../plugin-htlc-eth-besu"; - -export interface IInitializeEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesu; -} - -export class InitializeEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InitializeEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: IInitializeEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return InitializeEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/initialize" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "InitializeEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const request: InitializeRequest = req.body as InitializeRequest; - const result = await this.options.plugin.initialize(request); - if (result.transactionReceipt?.status === false) { - res.status(400).json({ - message: "Bad request", - error: result.transactionReceipt, - }); - } else { - res.status(200); - res.send(result); - } - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/new-contract-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/new-contract-endpoint.ts deleted file mode 100644 index fb32c1d127..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/new-contract-endpoint.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { NewContractObj } from "../generated/openapi/typescript-axios/api"; -import { PluginHtlcEthBesu } from "../plugin-htlc-eth-besu"; -import OAS from "../../json/openapi.json"; -export interface INewContractEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesu; -} - -export class NewContractEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "NewContractEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: INewContractEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return NewContractEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/new-contract" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "NewContractEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const request: NewContractObj = req.body as NewContractObj; - const result = await this.options.plugin.newContract(request); - if (result.transactionReceipt?.status === false) { - res.status(400).json({ - message: "Bad request", - error: result.transactionReceipt, - }); - } else { - res.status(200); - res.send(result); - } - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/refund-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/refund-endpoint.ts deleted file mode 100644 index e30e7083d1..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/refund-endpoint.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - IExpressRequestHandler, - IWebServiceEndpoint, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginHtlcEthBesu } from "../plugin-htlc-eth-besu"; -import { RefundReq } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; - -export interface IRefundEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesu; -} -export class RefundEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RefundEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: IRefundEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return RefundEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/refund" - ]; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "RefundEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const request: RefundReq = req.body as RefundReq; - const result = await this.options.plugin.refund(request); - this.log.debug(`${fnTag} Result: ${result}`); - if (result.transactionReceipt?.status === false) { - res.status(400).json({ - message: "Bad request", - error: result.transactionReceipt, - }); - } else { - res.send(result); - } - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/withdraw-endpoint.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/withdraw-endpoint.ts deleted file mode 100644 index f5bf16d471..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/web-services/withdraw-endpoint.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginHtlcEthBesu } from "../plugin-htlc-eth-besu"; -import { WithdrawReq } from "../generated/openapi/typescript-axios/api"; -import OAS from "../../json/openapi.json"; - -export interface IWithdrawEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginHtlcEthBesu; -} -export class WithdrawEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "WithdrawEndpoint"; - private readonly log: Logger; - - constructor(public readonly options: IWithdrawEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return WithdrawEndpoint.CLASS_NAME; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-htlc-eth-besu/withdraw" - ]; - } - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const fnTag = "WithdrawEndpoint#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - try { - const request: WithdrawReq = req.body as WithdrawReq; - const result = await this.options.plugin.withdraw(request); - this.log.debug(`${fnTag} Result: ${result}`); - if (result.transactionReceipt?.status === false) { - res.status(400).json({ - message: "Bad request", - error: result.transactionReceipt, - }); - } else { - res.send(result); - } - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/test/solidity/integration/HashTimeLock.t.sol b/packages/cactus-plugin-htlc-eth-besu/src/test/solidity/integration/HashTimeLock.t.sol deleted file mode 100644 index e0ad117013..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/test/solidity/integration/HashTimeLock.t.sol +++ /dev/null @@ -1,119 +0,0 @@ -pragma solidity 0.8.19; - -import {HashTimeLock} from "../../../main/solidity/contracts/HashTimeLock.sol"; -import "forge-std/Test.sol"; -import "forge-std/console2.sol"; - -contract HashTimeLockTest is Test { - - bytes32 AliceSecret; - bytes32 HashedAliceSecret; - bytes32 Z; - - function setUp() public { - AliceSecret = bytes32(0x0000000000000000000000000000000000000000000000000000000000000003); - // keccak256(abi.encodePacked(AliceSecret)); - HashedAliceSecret = bytes32(0xc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b); - } - - function test_Deployment() public { - new HashTimeLock(); - } - - function test_initializeHTLC() public { - // 5 eth - uint256 inputAmountEth = 5; - uint256 outputAmount = 5000000000000000000; - // 1/1/2030 - uint256 expiration = 1893515539; - // account # 1 of anvil -a 10 - address payable receiver = payable(0x70997970C51812dc3A010C7d01b50e0d17dc79C8); - string memory outputNetwork = "anvil"; - string memory outputAddress = vm.toString(msg.sender); - - - HashTimeLock HtlcManager = new HashTimeLock(); - console.log("Deployed HTLC: ", address(HtlcManager)); - - vm.expectCall( - address(HtlcManager), - 5, - abi.encodeWithSelector( - HtlcManager.newContract.selector, - outputAmount, - expiration, - HashedAliceSecret, - receiver, - outputNetwork, - outputAddress - ), - 1 - ); - - //vm.expectEmit(true, true, false, true, address(HtlcManager)); - vm.recordLogs(); - - HtlcManager.newContract{value: inputAmountEth}( - outputAmount, expiration, HashedAliceSecret, receiver, outputNetwork, outputAddress - ); - - Vm.Log[] memory entries = vm.getRecordedLogs(); - - // get contract id from event - assertEq(entries.length, 1); - bytes32 id = entries[0].topics[1]; - - bool exists = HtlcManager.contractExists(id); - assert(exists); - - // state is active - assert(HtlcManager.getSingleStatus(id) == 1); - } - - function test_process_secret() public { - // 5 eth - uint256 inputAmountEth = 5; - uint256 outputAmount = 5000000000000000000; - // 1/1/2030 - uint256 expiration = 1893515539; - // account # 1 of anvil -a 10 - address payable receiver = payable(0x70997970C51812dc3A010C7d01b50e0d17dc79C8); - string memory outputNetwork = "anvil"; - string memory outputAddress = vm.toString(msg.sender); - - - HashTimeLock HtlcManager = new HashTimeLock(); - console.log("Deployed HTLC: ", address(HtlcManager)); - - vm.expectCall( - address(HtlcManager), - 5, - abi.encodeWithSelector( - HtlcManager.newContract.selector, - outputAmount, - expiration, - HashedAliceSecret, - receiver, - outputNetwork, - outputAddress - ), - 1 - ); - - //vm.expectEmit(true, true, false, true, address(HtlcManager)); - vm.recordLogs(); - - HtlcManager.newContract{value: inputAmountEth}( - outputAmount, expiration, HashedAliceSecret, receiver, outputNetwork, outputAddress - ); - - Vm.Log[] memory entries = vm.getRecordedLogs(); - - // get contract id from event - assertEq(entries.length, 1); - bytes32 id = entries[0].topics[1]; - assertEq(HashedAliceSecret, keccak256(abi.encode(AliceSecret))); - HtlcManager.withdraw(id, AliceSecret); - } - -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/test/solidity/integration/PrivateHashTimeLock.t.sol b/packages/cactus-plugin-htlc-eth-besu/src/test/solidity/integration/PrivateHashTimeLock.t.sol deleted file mode 100644 index 7b7a003f88..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/test/solidity/integration/PrivateHashTimeLock.t.sol +++ /dev/null @@ -1,164 +0,0 @@ -pragma solidity 0.8.19; - -import {PrivateHashTimeLock} from "../../../main/solidity/contracts/PrivateHashTimeLock.sol"; -import "forge-std/Test.sol"; -import "forge-std/console2.sol"; - -contract PrivateHashTimeLockTest is Test { - event newPrivateContract( - uint256 inputAmount, - uint256 outputAmount, - uint256 expiration, - bytes32 indexed id, - bytes32 hashSecret, - address indexed sender, - address indexed receiver, - string outputNetwork, - string outputAddress, - PrivateHashTimeLock.PrivateEnhancing priv - ); - - bytes32 AliceSecret; - bytes32 HashedAliceSecret; - bytes32 Z; - - function setUp() public { - AliceSecret = bytes32(0x0000000000000000000000000000000000000000000000000000000000000003); - HashedAliceSecret = bytes32(0x0000000000000000000000000000000000000000000000000000000000000017); - Z = bytes32(0x000000000000000000000000000000000000000000000000000000000000001a); - } - - function test_Deployment() public { - new PrivateHashTimeLock(); - } - - function test_initializeHTLC() public { - // 5 eth - uint256 inputAmountEth = 5; - uint256 outputAmount = 5000000000000000000; - // 1/1/2030 - uint256 expiration = 1893515539; - bytes32 hashLock = (0x0000000000000000000000000000000000000000000000000000000000000017); - // account # 1 of anvil -a 10 - address payable receiver = payable(0x70997970C51812dc3A010C7d01b50e0d17dc79C8); - string memory outputNetwork = "anvil"; - string memory outputAddress = vm.toString(msg.sender); - PrivateHashTimeLock.PrivateEnhancing memory priv = - PrivateHashTimeLock.PrivateEnhancing({generator: 11, modulus: 109}); - - PrivateHashTimeLock HtlcManager = new PrivateHashTimeLock(); - console.log("Deployed HTLC: ", address(HtlcManager)); - - vm.expectCall( - address(HtlcManager), - 5, - abi.encodeWithSelector( - HtlcManager.newPrivateContract.selector, - outputAmount, - expiration, - hashLock, - receiver, - outputNetwork, - outputAddress, - priv - ), - 1 - ); - //vm.expectEmit(true, true, false, true, address(HtlcManager)); - vm.recordLogs(); - - HtlcManager.newPrivateContract{value: inputAmountEth}( - outputAmount, expiration, hashLock, receiver, outputNetwork, outputAddress, priv - ); - - Vm.Log[] memory entries = vm.getRecordedLogs(); - - // get contract id from event - assertEq(entries.length, 1); - bytes32 id = entries[0].topics[1]; - - bool exists = HtlcManager.contractExists(id); - assert(exists); - - // state is active - assert(HtlcManager.getSingleStatus(id) == 1); - } - - function test_process_secret() public { - // 5 eth - uint256 inputAmountEth = 5; - uint256 outputAmount = 5000000000000000000; - // 1/1/2030 - uint256 expiration = 1893515539; - bytes32 hashLock = (0x0000000000000000000000000000000000000000000000000000000000000017); - // account # 1 of anvil -a 10 - address payable receiver = payable(0x70997970C51812dc3A010C7d01b50e0d17dc79C8); - string memory outputNetwork = "anvil"; - string memory outputAddress = vm.toString(msg.sender); - PrivateHashTimeLock.PrivateEnhancing memory priv = - PrivateHashTimeLock.PrivateEnhancing({generator: 11, modulus: 109}); - - PrivateHashTimeLock HtlcManager = new PrivateHashTimeLock(); - vm.expectCall( - address(HtlcManager), - 5, - abi.encodeWithSelector( - HtlcManager.newPrivateContract.selector, - outputAmount, - expiration, - hashLock, - receiver, - outputNetwork, - outputAddress, - priv - ), - 1 - ); - vm.recordLogs(); - - HtlcManager.newPrivateContract{value: inputAmountEth}( - outputAmount, expiration, hashLock, receiver, outputNetwork, outputAddress, priv - ); - - Vm.Log[] memory entries = vm.getRecordedLogs(); - - // get contract id from event - assertEq(entries.length, 1); - bytes32 id = entries[0].topics[1]; - - // secret is 3 decimal, hashes to 0x17 - bytes32 secret = 0x0000000000000000000000000000000000000000000000000000000000000003; - - emit log_bytes32(secret); - emit log_uint(uint256(secret)); - HtlcManager.withdraw(id, secret); - } - - function test_mod_exp() public { - uint256 base = 11; - uint256 exponent = 3; - uint256 modulus = 109; - uint256 result = calculateHashSecret(base, exponent, modulus); - emit log_uint(result); - assert(result == 23); - - bytes32 modulus_bytes = bytes32(modulus); - bytes32 base_bytes = bytes32(base); - bytes32 exponent_bytes = bytes32(exponent); - uint256 result2 = calculateHashSecret(uint256(base_bytes), uint256(exponent_bytes), uint256(modulus_bytes)); - emit log_uint(result2); - assert(result2 == 23); - } - - function calculateHashSecret(uint256 base, uint256 exponent, uint256 modulus) - internal - view - returns (uint256 result) - { - require(modulus > 0, "Modulus cannot be 0"); - require(base > 0, "base cannot be 0"); - require(exponent > 0, "exponent_1 cannot be 0"); - - return (base ** exponent) % modulus; - } -} diff --git a/packages/cactus-plugin-htlc-eth-besu/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-htlc-eth-besu/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-htlc-eth-besu/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-htlc-eth-besu/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-htlc-eth-besu/tsconfig.json b/packages/cactus-plugin-htlc-eth-besu/tsconfig.json deleted file mode 100644 index 1eb1cd8efc..0000000000 --- a/packages/cactus-plugin-htlc-eth-besu/tsconfig.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-htlc-eth-besu.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "exclude": ["./vendor"], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/CHANGELOG.md b/packages/cactus-plugin-keychain-aws-sm/CHANGELOG.md deleted file mode 100644 index 899589f94c..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/CHANGELOG.md +++ /dev/null @@ -1,192 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Features - -* **keychain-aws-sm:** bootstrap readme.md ([060f351](https://github.com/hyperledger/cactus/commit/060f3514a3dfaf19dab52345c0f0d2f80b12149c)), closes [#968](https://github.com/hyperledger/cactus/issues/968) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* openapi validation for keychain-aws-sm plugin ([b270d28](https://github.com/hyperledger/cactus/commit/b270d2891d88149caa3de66096e727e82df0233e)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -### Features - -* **keychain-aws-sm:** complete request handler and endpoint ([e6099b8](https://github.com/hyperledger/cactus/commit/e6099b86152a35ac7a21aecc02824410c05eac88)), closes [#967](https://github.com/hyperledger/cactus/issues/967) [#1349](https://github.com/hyperledger/cactus/issues/1349) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-aws-sm - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Features - -* **aws-sm:** added keychain plugin for aws secret manager ([ed6db9e](https://github.com/hyperledger/cactus/commit/ed6db9edc2064046308be91b73f620cbb2a6fb58)), closes [#912](https://github.com/hyperledger/cactus/issues/912) -* **azure-kv:** added keychain plugin for azure keyvault ([69e7b50](https://github.com/hyperledger/cactus/commit/69e7b50f127fbf247a43288353388782a4301686)), closes [#971](https://github.com/hyperledger/cactus/issues/971) diff --git a/packages/cactus-plugin-keychain-aws-sm/README.md b/packages/cactus-plugin-keychain-aws-sm/README.md deleted file mode 100644 index c76ac004ad..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/README.md +++ /dev/null @@ -1,167 +0,0 @@ -# `@hyperledger/cactus-plugin-keychain-aws-sm` - -- [`@hyperledger/cactus-plugin-keychain-aws-sm`](#hyperledgercactus-plugin-keychain-aws-sm) - - [1. Usage](#1-usage) - - [1.1. Installation](#11-installation) - - [1.2. Using as a Library](#12-using-as-a-library) - - [1.3. Using via the API Client](#13-using-via-the-api-client) - - [2. Architecture](#2-architecture) - - [2.1. set-keychain-entry-endpoint](#21-set-keychain-entry-endpoint) - - [2.2. get-keychain-entry-endpoint](#22-get-keychain-entry-endpoint) - - [2.3. has-keychain-entry-endpoint](#23-has-keychain-entry-endpoint) - - [2.4. delete-keychain-entry-endpoint](#24-delete-keychain-entry-endpoint) - - [3. Monitoring](#3-monitoring) - - [3.1. Prometheus Exporter](#31-prometheus-exporter) - - [3.1.1. Usage Prometheus](#311-usage-prometheus) - - [3.1.2. Prometheus Integration](#312-prometheus-integration) - - [3.1.3. Helper code](#313-helper-code) - - [3.1.3.1. response.type.ts](#3131-responsetypets) - - [3.1.3.2. data-fetcher.ts](#3132-data-fetcherts) - - [3.1.3.3. metrics.ts](#3133-metricsts) - - [4. Contributing](#4-contributing) - - [5. License](#5-license) - - [6. Acknowledgments](#6-acknowledgments) -## 1. Usage - -This plugin provides a way to interact with the AWS Secrets Manager. -Using this one can perform: -* Set key,value pair -* Get value for a particular key -* Check if a certain key exists -* Delete a certain key,value pair - -The above functionality can either be accessed by importing hte plugin directly as a library (embedding) or by hosting it as a REST API through the [Cactus API server](https://www.npmjs.com/package/@hyperledger/cactus-cmd-api-server) - -We also publish the [Cactus API server as a container image](https://github.com/hyperledger/cactus/pkgs/container/cactus-cmd-api-server) to the Github Container Registry that you can run easily with a one liner. -The API server is also embeddable in your own NodeJS project if you choose to do so. - -### 1.1. Installation - -**npm** - -```sh -npm install @hyperledger/cactus-plugin-keychain-aws-sm -``` - -**yarn** - -```sh -yarn add @hyperledger/cactus-plugin-keychain-aws-sm -``` - -### 1.2. Using as a Library - -```typescript -import { - PluginKeychainAwsSm, - AwsCredentialType, -} from "@hyperledger/cactus-plugin-keychain-aws-sm"; - -const plugin = new PluginKeychainAwsSm({ - // See test cases for exact details on what parameters are needed -}); - -const res = await plugin.get( - // See function definition for exact details on what parameters are needed and the corresponding output -); -``` - -### 1.3. Using via the API Client - -**Prerequisites** -- An AWS account with access to AWS Secrets Manager -- You have a running Cactus API server on `$HOST:$PORT` with the AWS Secrets Manager connector plugin installed on it (and the latter configured to have access to the AWS Secrets manager from point 1) - -```typescript -import { - PluginKeychainAwsSm, - AwsCredentialType, - DefaultApi as KeychainAwsSmApi, -} from "@hyperledger/cactus-plugin-keychain-aws-sm"; - -// Step zero is to deploy the Cactus API server -const apiUrl = `https://${HOST}:${PORT}`; - -const config = new Configuration({ basePath: apiUrl }); - -const apiClient = new KeychainAwsSmApi(config); - -// Example: To set a key,value pair -const res = await apiClient.setKeychainEntryV1({ - key: key, - value: value, -}); -``` - -## 2. Architecture -The sequence diagrams for various endpoints are mentioned below - -### 2.1. set-keychain-entry-endpoint - -![set-keychain-entry-endpoint sequence diagram](docs/architecture/images/set-keychain-entry-endpoint.png) - -### 2.2. get-keychain-entry-endpoint - -![get-keychain-entry-endpoint sequence diagram](docs/architecture/images/get-keychain-entry-endpoint.png) - -### 2.3. has-keychain-entry-endpoint - -![has-keychain-entry-endpoint sequence diagram](docs/architecture/images/has-keychain-entry-endpoint.png) - -### 2.4. delete-keychain-entry-endpoint - -![delete-keychain-entry-endpoint sequence diagram](docs/architecture/images/delete-keychain-entry-endpoint.png) - -## 3. Monitoring -This section explains various monitoring tools used -### 3.1. Prometheus Exporter - -This creates a prometheus exporter, which scraps the transactions (total transaction count) for the use cases incorporating the use of AWS Secret Manager connector plugin. - - -#### 3.1.1. Usage Prometheus -The prometheus exporter object is initialized in the `PluginKeychainAwsSm` class constructor itself, so instantiating the object of the `PluginKeychainAwsSm` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IPluginKeychainAwsSmOptions` interface for `PluginKeychainAwsSm` constructor. - -`getPrometheusExporterMetricsEndpointV1` function returns the prometheus exporter metrics, currently displaying the total transaction count, which currently increments everytime the `set()` method of the `PluginKeychainAwsSm` class is called and decreases everytime the `delete()` method of the `PluginKeychainAwsSm` class is called. - -#### 3.1.2. Prometheus Integration -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'aws_sm_exporter' - metrics_path: 'api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics' - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_keychain_awssm_managed_key_count** and click **execute** - -#### 3.1.3. Helper code - -##### 3.1.3.1. response.type.ts -This file contains the various responses of the metrics. - -##### 3.1.3.2. data-fetcher.ts -This file contains functions encasing the logic to process the data points - -##### 3.1.3.3. metrics.ts -This file lists all the prometheus metrics and what they are used for. - -## 4. Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## 5. License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## 6. Acknowledgments diff --git a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/delete-keychain-entry-endpoint.puml b/packages/cactus-plugin-keychain-aws-sm/docs/architecture/delete-keychain-entry-endpoint.puml deleted file mode 100644 index d68fee4100..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/delete-keychain-entry-endpoint.puml +++ /dev/null @@ -1,31 +0,0 @@ -@startuml Sequence Diagram - Transaction - -title Hyperledger Cactus\nSequence Diagram\nDelete Keychain Entry Endpoint - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -box "Users" #LightBlue -actor "User A" as a -end box - -box "Hyperledger Cactus" #LightGray -entity "API Client" as apic -entity "API Server" as apis -end box - -box "AWS SM Connector" #LightGreen -database "AWS SM" as awssm -end box - -a --> apic : Tx DeleteKeychainEntryV1 -apic --> apis: Request -apis --> awssm: delete(key,value) -awssm -> awssm: awsClient = getAwsClient() -awssm -> awssm: await awsClient.deleteSecret() -awssm --> apis: Response -apis --> apic: Formatted Response -apic --> a: DetKeychainEntryResponse -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/get-keychain-entry-endpoint.puml b/packages/cactus-plugin-keychain-aws-sm/docs/architecture/get-keychain-entry-endpoint.puml deleted file mode 100644 index 195b74be5e..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/get-keychain-entry-endpoint.puml +++ /dev/null @@ -1,35 +0,0 @@ -@startuml Sequence Diagram - Transaction - -title Hyperledger Cactus\nSequence Diagram\nGet Keychain Entry Endpoint - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -box "Users" #LightBlue -actor "User A" as a -end box - -box "Hyperledger Cactus" #LightGray -entity "API Client" as apic -entity "API Server" as apis -end box - -box "AWS SM Connector" #LightGreen -database "AWS SM" as awssm -end box - -a --> apic : Tx GetKeychainEntryV1 -apic --> apis: Request -apis --> awssm: get(key,value) -awssm -> awssm: awsClient = getAwsClient() -group #Yellow try { await awsClient.getSecretValue() } - awssm -> apis: True -else #LightCoral catch(ex) - awssm -> apis: error= Invalid response received from AWS SecretsManager. Expected "response.SecretString" property chain to be truthy -end -awssm --> apis: Response -apis --> apic: Formatted Response -apic --> a: GetKeychainEntryResponse -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/has-keychain-entry-endpoint.puml b/packages/cactus-plugin-keychain-aws-sm/docs/architecture/has-keychain-entry-endpoint.puml deleted file mode 100644 index 12cf41debd..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/has-keychain-entry-endpoint.puml +++ /dev/null @@ -1,35 +0,0 @@ -@startuml Sequence Diagram - Transaction - -title Hyperledger Cactus\nSequence Diagram\nHas Keychain Entry Endpoint - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -box "Users" #LightBlue -actor "User A" as a -end box - -box "Hyperledger Cactus" #LightGray -entity "API Client" as apic -entity "API Server" as apis -end box - -box "AWS SM Connector" #LightGreen -database "AWS SM" as awssm -end box - -a --> apic : Tx HasKeychainEntryV1 -apic --> apis: Request -apis --> awssm: set(key,value) -awssm -> awssm: awsClient = getAwsClient() -group #Yellow try { await awsClient.describeSecret() } - awssm -> apis: True -else #LightCoral catch(ex) - awssm -> apis: error: Secrets Manager can't find the specified secret -end -awssm --> apis: Response -apis --> apic: Formatted Response -apic --> a: SetKeychainEntryResponse -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/delete-keychain-entry-endpoint.png b/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/delete-keychain-entry-endpoint.png deleted file mode 100644 index a41ae3d7aa..0000000000 Binary files a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/delete-keychain-entry-endpoint.png and /dev/null differ diff --git a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/get-keychain-entry-endpoint.png b/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/get-keychain-entry-endpoint.png deleted file mode 100644 index 6bcdf9429d..0000000000 Binary files a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/get-keychain-entry-endpoint.png and /dev/null differ diff --git a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/has-keychain-entry-endpoint.png b/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/has-keychain-entry-endpoint.png deleted file mode 100644 index 134da89db1..0000000000 Binary files a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/has-keychain-entry-endpoint.png and /dev/null differ diff --git a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/set-keychain-entry-endpoint.png b/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/set-keychain-entry-endpoint.png deleted file mode 100644 index 3270978274..0000000000 Binary files a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/images/set-keychain-entry-endpoint.png and /dev/null differ diff --git a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/set-keychain-entry-endpoint.puml b/packages/cactus-plugin-keychain-aws-sm/docs/architecture/set-keychain-entry-endpoint.puml deleted file mode 100644 index e63b1a25c2..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/set-keychain-entry-endpoint.puml +++ /dev/null @@ -1,31 +0,0 @@ -@startuml Sequence Diagram - Transaction - -title Hyperledger Cactus\nSequence Diagram\nSet Keychain Entry Endpoint - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -box "Users" #LightBlue -actor "User A" as a -end box - -box "Hyperledger Cactus" #LightGray -entity "API Client" as apic -entity "API Server" as apis -end box - -box "AWS SM Connector" #LightGreen -database "AWS SM" as awssm -end box - -a --> apic : Tx SetKeychainEntryV1 -apic --> apis: Request -apis --> awssm: set(key,value) -awssm -> awssm: awsClient = getAwsClient() -awssm -> awssm: await awsClient.createSecret() -awssm --> apis: Response -apis --> apic: Formatted Response -apic --> a: SetKeychainEntryResponse -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/openapitools.json b/packages/cactus-plugin-keychain-aws-sm/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/package.json b/packages/cactus-plugin-keychain-aws-sm/package.json deleted file mode 100644 index 6e6e5b4653..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-keychain-aws-sm", - "version": "2.0.0", - "description": "A keychain implementation storing its entries in AWS Secret Manger.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Jagpreet Singh Sasan", - "email": "jagpreet.singh.sasan@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-keychain-aws-sm.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "aws-sdk": "2.965.0", - "axios": "1.7.7", - "http-status-codes": "2.1.4", - "prom-client": "15.1.3", - "typescript-optional": "2.0.1" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/request": "2.48.7", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "internal-ip": "6.2.0", - "openapi-types": "12.1.3", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-keychain-aws-sm.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-keychain-aws-sm.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 28a644e272..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,18 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_delete_keychain_entry_request_v1.go -model_delete_keychain_entry_response_v1.go -model_get_keychain_entry_request_v1.go -model_get_keychain_entry_response_v1.go -model_has_keychain_entry_request_v1.go -model_has_keychain_entry_response_v1.go -model_set_keychain_entry_request_v1.go -model_set_keychain_entry_response_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index e48d700f9b..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# Go API client for cactus-plugin-keychain-aws-sm - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-keychain-aws-sm "github.com/hyperledger/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-aws-sm.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-aws-sm.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-aws-sm.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-keychain-aws-sm.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry | Deletes an entry under a key on the keychain backend. -*DefaultApi* | [**GetKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**HasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry | Checks that an entry exists under a key on the keychain backend -*DefaultApi* | [**SetKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry | Sets a value under a key on the keychain backend. - - -## Documentation For Models - - - [DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 635f03b82d..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,364 +0,0 @@ -openapi: 3.0.3 -info: - description: Contains/describes the Keychain API types/paths for Hyperledger Cactus. - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus - Keychain API - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry: - post: - operationId: getKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_get_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "404": - description: A keychain item with the specified key was not found. - "500": - description: Unexpected error. - summary: Retrieves the contents of a keychain entry from the backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry: - post: - operationId: setKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_set_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Sets a value under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry: - post: - operationId: deleteKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_delete_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Deletes an entry under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry: - post: - operationId: hasKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_has_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Checks that an entry exists under a key on the keychain backend - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics -components: - requestBodies: - keychain_get_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryRequestV1' - description: Request body to obtain a keychain entry via its key - required: true - keychain_set_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryRequestV1' - description: Request body to write/update a keychain entry via its key - required: true - keychain_delete_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryRequestV1' - description: Request body to delete a keychain entry via its key - required: true - keychain_has_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryRequestV1' - description: Request body for checking a keychain entry via its key - required: true - responses: - keychain_get_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - keychain_get_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_get_entry_401: - description: Authorization information is missing or invalid. - keychain_get_entry_404: - description: A keychain item with the specified key was not found. - keychain_get_entry_500: - description: Unexpected error. - keychain_set_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - keychain_set_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_set_entry_401: - description: Authorization information is missing or invalid. - keychain_set_entry_500: - description: Unexpected error. - keychain_delete_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - keychain_delete_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_delete_entry_401: - description: Authorization information is missing or invalid. - keychain_delete_entry_500: - description: Unexpected error. - keychain_has_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - keychain_has_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_has_entry_401: - description: Authorization information is missing or invalid. - keychain_has_entry_500: - description: Unexpected error. - schemas: - PrometheusExporterMetricsResponse: - nullable: false - type: string - GetSecretRequest: - additionalProperties: false - nullable: false - type: object - GetSecretResponse: - nullable: false - type: string - GetKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to get from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - GetKeychainEntryResponseV1: - example: - value: value - key: key - properties: - key: - description: The key that was used to retrieve the value from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value associated with the requested key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryRequestV1: - additionalProperties: false - example: - value: value - key: key - properties: - key: - description: The key for the entry to set on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value that will be associated with the key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was used to set the value on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to check the presence of on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was deleted from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key to check for presence in the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryResponseV1: - example: - checkedAt: checkedAt - isPresent: true - key: key - properties: - key: - description: The key that was used to check the presence of the value in - the entry store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - checkedAt: - description: Date and time encoded as JSON when the presence check was performed - by the plugin backend. - nullable: false - type: string - isPresent: - description: The boolean true or false indicating the presence or absence - of an entry under 'key'. - nullable: false - type: boolean - required: - - checkedAt - - isPresent - - key - type: object diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 4720d476d1..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,556 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeleteKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deleteKeychainEntryRequestV1 *DeleteKeychainEntryRequestV1 -} - -// Request body to delete a keychain entry via its key -func (r ApiDeleteKeychainEntryV1Request) DeleteKeychainEntryRequestV1(deleteKeychainEntryRequestV1 DeleteKeychainEntryRequestV1) ApiDeleteKeychainEntryV1Request { - r.deleteKeychainEntryRequestV1 = &deleteKeychainEntryRequestV1 - return r -} - -func (r ApiDeleteKeychainEntryV1Request) Execute() (*DeleteKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.DeleteKeychainEntryV1Execute(r) -} - -/* -DeleteKeychainEntryV1 Deletes an entry under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeleteKeychainEntryV1Request -*/ -func (a *DefaultApiService) DeleteKeychainEntryV1(ctx context.Context) ApiDeleteKeychainEntryV1Request { - return ApiDeleteKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeleteKeychainEntryResponseV1 -func (a *DefaultApiService) DeleteKeychainEntryV1Execute(r ApiDeleteKeychainEntryV1Request) (*DeleteKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeleteKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.deleteKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("deleteKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deleteKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getKeychainEntryRequestV1 *GetKeychainEntryRequestV1 -} - -// Request body to obtain a keychain entry via its key -func (r ApiGetKeychainEntryV1Request) GetKeychainEntryRequestV1(getKeychainEntryRequestV1 GetKeychainEntryRequestV1) ApiGetKeychainEntryV1Request { - r.getKeychainEntryRequestV1 = &getKeychainEntryRequestV1 - return r -} - -func (r ApiGetKeychainEntryV1Request) Execute() (*GetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.GetKeychainEntryV1Execute(r) -} - -/* -GetKeychainEntryV1 Retrieves the contents of a keychain entry from the backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetKeychainEntryV1Request -*/ -func (a *DefaultApiService) GetKeychainEntryV1(ctx context.Context) ApiGetKeychainEntryV1Request { - return ApiGetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetKeychainEntryResponseV1 -func (a *DefaultApiService) GetKeychainEntryV1Execute(r ApiGetKeychainEntryV1Request) (*GetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("getKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsV1Execute(r) -} - -/* -GetPrometheusMetricsV1 Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsV1Request -*/ -func (a *DefaultApiService) GetPrometheusMetricsV1(ctx context.Context) ApiGetPrometheusMetricsV1Request { - return ApiGetPrometheusMetricsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsV1Execute(r ApiGetPrometheusMetricsV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetricsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiHasKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - hasKeychainEntryRequestV1 *HasKeychainEntryRequestV1 -} - -// Request body for checking a keychain entry via its key -func (r ApiHasKeychainEntryV1Request) HasKeychainEntryRequestV1(hasKeychainEntryRequestV1 HasKeychainEntryRequestV1) ApiHasKeychainEntryV1Request { - r.hasKeychainEntryRequestV1 = &hasKeychainEntryRequestV1 - return r -} - -func (r ApiHasKeychainEntryV1Request) Execute() (*HasKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.HasKeychainEntryV1Execute(r) -} - -/* -HasKeychainEntryV1 Checks that an entry exists under a key on the keychain backend - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHasKeychainEntryV1Request -*/ -func (a *DefaultApiService) HasKeychainEntryV1(ctx context.Context) ApiHasKeychainEntryV1Request { - return ApiHasKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return HasKeychainEntryResponseV1 -func (a *DefaultApiService) HasKeychainEntryV1Execute(r ApiHasKeychainEntryV1Request) (*HasKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HasKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.HasKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.hasKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("hasKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.hasKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - setKeychainEntryRequestV1 *SetKeychainEntryRequestV1 -} - -// Request body to write/update a keychain entry via its key -func (r ApiSetKeychainEntryV1Request) SetKeychainEntryRequestV1(setKeychainEntryRequestV1 SetKeychainEntryRequestV1) ApiSetKeychainEntryV1Request { - r.setKeychainEntryRequestV1 = &setKeychainEntryRequestV1 - return r -} - -func (r ApiSetKeychainEntryV1Request) Execute() (*SetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.SetKeychainEntryV1Execute(r) -} - -/* -SetKeychainEntryV1 Sets a value under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSetKeychainEntryV1Request -*/ -func (a *DefaultApiService) SetKeychainEntryV1(ctx context.Context) ApiSetKeychainEntryV1Request { - return ApiSetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SetKeychainEntryResponseV1 -func (a *DefaultApiService) SetKeychainEntryV1Execute(r ApiSetKeychainEntryV1Request) (*SetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.setKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("setKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.setKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index e508c4fafa..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus - Keychain API API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index a8ebc91719..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index df401e5802..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go deleted file mode 100644 index 22a61bf5c3..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryRequestV1{} - -// DeleteKeychainEntryRequestV1 struct for DeleteKeychainEntryRequestV1 -type DeleteKeychainEntryRequestV1 struct { - // The key for the entry to check the presence of on the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryRequestV1 instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryRequestV1(key string) *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryRequestV1WithDefaults instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryRequestV1WithDefaults() *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryRequestV1 struct { - value *DeleteKeychainEntryRequestV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryRequestV1) Get() *DeleteKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryRequestV1) Set(val *DeleteKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryRequestV1(val *DeleteKeychainEntryRequestV1) *NullableDeleteKeychainEntryRequestV1 { - return &NullableDeleteKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go deleted file mode 100644 index b5d6edae47..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryResponseV1{} - -// DeleteKeychainEntryResponseV1 struct for DeleteKeychainEntryResponseV1 -type DeleteKeychainEntryResponseV1 struct { - // The key that was deleted from the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryResponseV1 instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryResponseV1(key string) *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryResponseV1WithDefaults instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryResponseV1WithDefaults() *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryResponseV1 struct { - value *DeleteKeychainEntryResponseV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryResponseV1) Get() *DeleteKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryResponseV1) Set(val *DeleteKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryResponseV1(val *DeleteKeychainEntryResponseV1) *NullableDeleteKeychainEntryResponseV1 { - return &NullableDeleteKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go deleted file mode 100644 index 66a8131e8a..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryRequestV1{} - -// GetKeychainEntryRequestV1 struct for GetKeychainEntryRequestV1 -type GetKeychainEntryRequestV1 struct { - // The key for the entry to get from the keychain. - Key string `json:"key"` -} - -// NewGetKeychainEntryRequestV1 instantiates a new GetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryRequestV1(key string) *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewGetKeychainEntryRequestV1WithDefaults instantiates a new GetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryRequestV1WithDefaults() *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o GetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableGetKeychainEntryRequestV1 struct { - value *GetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableGetKeychainEntryRequestV1) Get() *GetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableGetKeychainEntryRequestV1) Set(val *GetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryRequestV1(val *GetKeychainEntryRequestV1) *NullableGetKeychainEntryRequestV1 { - return &NullableGetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go deleted file mode 100644 index f3d2a3c3e6..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryResponseV1{} - -// GetKeychainEntryResponseV1 struct for GetKeychainEntryResponseV1 -type GetKeychainEntryResponseV1 struct { - // The key that was used to retrieve the value from the keychain. - Key string `json:"key"` - // The value associated with the requested key on the keychain. - Value string `json:"value"` -} - -// NewGetKeychainEntryResponseV1 instantiates a new GetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryResponseV1(key string, value string) *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - this.Key = key - this.Value = value - return &this -} - -// NewGetKeychainEntryResponseV1WithDefaults instantiates a new GetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryResponseV1WithDefaults() *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *GetKeychainEntryResponseV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *GetKeychainEntryResponseV1) SetValue(v string) { - o.Value = v -} - -func (o GetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableGetKeychainEntryResponseV1 struct { - value *GetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableGetKeychainEntryResponseV1) Get() *GetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableGetKeychainEntryResponseV1) Set(val *GetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryResponseV1(val *GetKeychainEntryResponseV1) *NullableGetKeychainEntryResponseV1 { - return &NullableGetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go deleted file mode 100644 index 8d9a7df364..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryRequestV1{} - -// HasKeychainEntryRequestV1 struct for HasKeychainEntryRequestV1 -type HasKeychainEntryRequestV1 struct { - // The key to check for presence in the keychain. - Key string `json:"key"` -} - -// NewHasKeychainEntryRequestV1 instantiates a new HasKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryRequestV1(key string) *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewHasKeychainEntryRequestV1WithDefaults instantiates a new HasKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryRequestV1WithDefaults() *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o HasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableHasKeychainEntryRequestV1 struct { - value *HasKeychainEntryRequestV1 - isSet bool -} - -func (v NullableHasKeychainEntryRequestV1) Get() *HasKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableHasKeychainEntryRequestV1) Set(val *HasKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryRequestV1(val *HasKeychainEntryRequestV1) *NullableHasKeychainEntryRequestV1 { - return &NullableHasKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go deleted file mode 100644 index ebc272374a..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryResponseV1{} - -// HasKeychainEntryResponseV1 struct for HasKeychainEntryResponseV1 -type HasKeychainEntryResponseV1 struct { - // The key that was used to check the presence of the value in the entry store. - Key string `json:"key"` - // Date and time encoded as JSON when the presence check was performed by the plugin backend. - CheckedAt string `json:"checkedAt"` - // The boolean true or false indicating the presence or absence of an entry under 'key'. - IsPresent bool `json:"isPresent"` -} - -// NewHasKeychainEntryResponseV1 instantiates a new HasKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryResponseV1(key string, checkedAt string, isPresent bool) *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - this.Key = key - this.CheckedAt = checkedAt - this.IsPresent = isPresent - return &this -} - -// NewHasKeychainEntryResponseV1WithDefaults instantiates a new HasKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryResponseV1WithDefaults() *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetCheckedAt returns the CheckedAt field value -func (o *HasKeychainEntryResponseV1) GetCheckedAt() string { - if o == nil { - var ret string - return ret - } - - return o.CheckedAt -} - -// GetCheckedAtOk returns a tuple with the CheckedAt field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetCheckedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CheckedAt, true -} - -// SetCheckedAt sets field value -func (o *HasKeychainEntryResponseV1) SetCheckedAt(v string) { - o.CheckedAt = v -} - -// GetIsPresent returns the IsPresent field value -func (o *HasKeychainEntryResponseV1) GetIsPresent() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPresent -} - -// GetIsPresentOk returns a tuple with the IsPresent field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetIsPresentOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPresent, true -} - -// SetIsPresent sets field value -func (o *HasKeychainEntryResponseV1) SetIsPresent(v bool) { - o.IsPresent = v -} - -func (o HasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["checkedAt"] = o.CheckedAt - toSerialize["isPresent"] = o.IsPresent - return toSerialize, nil -} - -type NullableHasKeychainEntryResponseV1 struct { - value *HasKeychainEntryResponseV1 - isSet bool -} - -func (v NullableHasKeychainEntryResponseV1) Get() *HasKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableHasKeychainEntryResponseV1) Set(val *HasKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryResponseV1(val *HasKeychainEntryResponseV1) *NullableHasKeychainEntryResponseV1 { - return &NullableHasKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go deleted file mode 100644 index 151597d8cc..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryRequestV1{} - -// SetKeychainEntryRequestV1 struct for SetKeychainEntryRequestV1 -type SetKeychainEntryRequestV1 struct { - // The key for the entry to set on the keychain. - Key string `json:"key"` - // The value that will be associated with the key on the keychain. - Value string `json:"value"` -} - -// NewSetKeychainEntryRequestV1 instantiates a new SetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryRequestV1(key string, value string) *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - this.Key = key - this.Value = value - return &this -} - -// NewSetKeychainEntryRequestV1WithDefaults instantiates a new SetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryRequestV1WithDefaults() *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *SetKeychainEntryRequestV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *SetKeychainEntryRequestV1) SetValue(v string) { - o.Value = v -} - -func (o SetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableSetKeychainEntryRequestV1 struct { - value *SetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableSetKeychainEntryRequestV1) Get() *SetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableSetKeychainEntryRequestV1) Set(val *SetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryRequestV1(val *SetKeychainEntryRequestV1) *NullableSetKeychainEntryRequestV1 { - return &NullableSetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go deleted file mode 100644 index 93a1afa1be..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryResponseV1{} - -// SetKeychainEntryResponseV1 struct for SetKeychainEntryResponseV1 -type SetKeychainEntryResponseV1 struct { - // The key that was used to set the value on the keychain. - Key string `json:"key"` -} - -// NewSetKeychainEntryResponseV1 instantiates a new SetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryResponseV1(key string) *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewSetKeychainEntryResponseV1WithDefaults instantiates a new SetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryResponseV1WithDefaults() *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o SetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableSetKeychainEntryResponseV1 struct { - value *SetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableSetKeychainEntryResponseV1) Get() *SetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableSetKeychainEntryResponseV1) Set(val *SetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryResponseV1(val *SetKeychainEntryResponseV1) *NullableSetKeychainEntryResponseV1 { - return &NullableSetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index a926467baa..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 01cebac953..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-keychain-aws-sm - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-keychain-aws-sm_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeleteKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeleteKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetricsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetricsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService HasKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.HasKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index a104770226..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-aws-sm - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/json/openapi.json b/packages/cactus-plugin-keychain-aws-sm/src/main/json/openapi.json deleted file mode 100644 index 00b0291d61..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/json/openapi.json +++ /dev/null @@ -1,438 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus - Keychain API", - "description": "Contains/describes the Keychain API types/paths for Hyperledger Cactus.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetSecretRequest": { - "type": "string", - "nullable": false, - "additionalProperties": false - }, - "GetSecretResponse": { - "type": "string", - "nullable": false - }, - "GetKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to get from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "GetKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "value"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to retrieve the value from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value associated with the requested key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryRequestV1": { - "type": "object", - "required": ["key", "value"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to set on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value that will be associated with the key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to set the value on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to check the presence of on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was deleted from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key to check for presence in the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "isPresent", "checkedAt"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to check the presence of the value in the entry store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "checkedAt": { - "type": "string", - "description": "Date and time encoded as JSON when the presence check was performed by the plugin backend.", - "nullable": false - }, - "isPresent": { - "type": "boolean", - "description": "The boolean true or false indicating the presence or absence of an entry under 'key'.", - "nullable": false - } - } - } - }, - "requestBodies": { - "keychain_get_entry_request_body": { - "description": "Request body to obtain a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryRequestV1" - } - } - } - }, - "keychain_set_entry_request_body": { - "description": "Request body to write/update a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryRequestV1" - } - } - } - }, - "keychain_delete_entry_request_body": { - "description": "Request body to delete a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryRequestV1" - } - } - } - }, - "keychain_has_entry_request_body": { - "description": "Request body for checking a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryRequestV1" - } - } - } - } - }, - "responses": { - "keychain_get_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryResponseV1" - } - } - } - }, - "keychain_get_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_get_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_get_entry_404": { - "description": "A keychain item with the specified key was not found." - }, - "keychain_get_entry_500": { - "description": "Unexpected error." - }, - "keychain_set_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryResponseV1" - } - } - } - }, - "keychain_set_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_set_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_set_entry_500": { - "description": "Unexpected error." - }, - "keychain_delete_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryResponseV1" - } - } - } - }, - "keychain_delete_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_delete_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_delete_entry_500": { - "description": "Unexpected error." - }, - "keychain_has_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryResponseV1" - } - } - } - }, - "keychain_has_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_has_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_has_entry_500": { - "description": "Unexpected error." - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes an entry under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_delete_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_delete_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_delete_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_delete_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_delete_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Checks that an entry exists under a key on the keychain backend", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_has_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_has_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_has_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_has_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_has_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/json/openapi.tpl.json b/packages/cactus-plugin-keychain-aws-sm/src/main/json/openapi.tpl.json deleted file mode 100644 index f6dc002a9d..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus - Keychain API", - "description": "Contains/describes the Keychain API types/paths for Hyperledger Cactus.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetSecretRequest": { - "type": "string", - "nullable": false, - "additionalProperties": false - }, - "GetSecretResponse": { - "type": "string", - "nullable": false - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes an entry under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_delete_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Checks that an entry exists under a key on the keychain backend", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_has_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 15e43f61f3..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,31 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 2b9d7bdf7b..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**deleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry | Deletes an entry under a key on the keychain backend. -*DefaultApi* | [**getKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**getPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**hasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry | Checks that an entry exists under a key on the keychain backend -*DefaultApi* | [**setKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry | Sets a value under a key on the keychain backend. - - - -## Documentation for Models - - - [org.openapitools.client.models.DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [org.openapitools.client.models.DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [org.openapitools.client.models.GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [org.openapitools.client.models.HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [org.openapitools.client.models.HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [org.openapitools.client.models.SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index 2a7fc00071..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,413 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.DeleteKeychainEntryRequestV1 -import org.openapitools.client.models.DeleteKeychainEntryResponseV1 -import org.openapitools.client.models.GetKeychainEntryRequestV1 -import org.openapitools.client.models.GetKeychainEntryResponseV1 -import org.openapitools.client.models.HasKeychainEntryRequestV1 -import org.openapitools.client.models.HasKeychainEntryResponseV1 -import org.openapitools.client.models.SetKeychainEntryRequestV1 -import org.openapitools.client.models.SetKeychainEntryResponseV1 - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Deletes an entry under a key on the keychain backend. - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return DeleteKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : DeleteKeychainEntryResponseV1 { - val localVarResponse = deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DeleteKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Deletes an entry under a key on the keychain backend. - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation deleteKeychainEntryV1 - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return RequestConfig - */ - fun deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = deleteKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return GetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : GetKeychainEntryResponseV1 { - val localVarResponse = getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getKeychainEntryV1 - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return RequestConfig - */ - fun getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = getKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get the Prometheus Metrics - * - * @return kotlin.String - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getPrometheusMetricsV1() : kotlin.String { - val localVarResponse = getPrometheusMetricsV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get the Prometheus Metrics - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getPrometheusMetricsV1WithHttpInfo() : ApiResponse { - val localVariableConfig = getPrometheusMetricsV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getPrometheusMetricsV1 - * - * @return RequestConfig - */ - fun getPrometheusMetricsV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Checks that an entry exists under a key on the keychain backend - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return HasKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : HasKeychainEntryResponseV1 { - val localVarResponse = hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as HasKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Checks that an entry exists under a key on the keychain backend - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation hasKeychainEntryV1 - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return RequestConfig - */ - fun hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = hasKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return SetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : SetKeychainEntryResponseV1 { - val localVarResponse = setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as SetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation setKeychainEntryV1 - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return RequestConfig - */ - fun setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = setKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt deleted file mode 100644 index 58a98174cf..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to check the presence of on the keychain. - */ - - -data class DeleteKeychainEntryRequestV1 ( - - /* The key for the entry to check the presence of on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt deleted file mode 100644 index 7b8b874e3d..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was deleted from the keychain. - */ - - -data class DeleteKeychainEntryResponseV1 ( - - /* The key that was deleted from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt deleted file mode 100644 index ea1d0da587..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to get from the keychain. - */ - - -data class GetKeychainEntryRequestV1 ( - - /* The key for the entry to get from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt deleted file mode 100644 index 21b9a38b46..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to retrieve the value from the keychain. - * @param `value` The value associated with the requested key on the keychain. - */ - - -data class GetKeychainEntryResponseV1 ( - - /* The key that was used to retrieve the value from the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value associated with the requested key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt deleted file mode 100644 index c3055c3414..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key to check for presence in the keychain. - */ - - -data class HasKeychainEntryRequestV1 ( - - /* The key to check for presence in the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt deleted file mode 100644 index 6345c51831..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to check the presence of the value in the entry store. - * @param checkedAt Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @param isPresent The boolean true or false indicating the presence or absence of an entry under 'key'. - */ - - -data class HasKeychainEntryResponseV1 ( - - /* The key that was used to check the presence of the value in the entry store. */ - @Json(name = "key") - val key: kotlin.String, - - /* Date and time encoded as JSON when the presence check was performed by the plugin backend. */ - @Json(name = "checkedAt") - val checkedAt: kotlin.String, - - /* The boolean true or false indicating the presence or absence of an entry under 'key'. */ - @Json(name = "isPresent") - val isPresent: kotlin.Boolean - -) - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt deleted file mode 100644 index d016fc72e6..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to set on the keychain. - * @param `value` The value that will be associated with the key on the keychain. - */ - - -data class SetKeychainEntryRequestV1 ( - - /* The key for the entry to set on the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value that will be associated with the key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt deleted file mode 100644 index 3f7624cd59..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to set the value on the keychain. - */ - - -data class SetKeychainEntryResponseV1 ( - - /* The key that was used to set the value on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 8c5e916afc..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,528 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface DeleteKeychainEntryRequestV1 - */ -export interface DeleteKeychainEntryRequestV1 { - /** - * The key for the entry to check the presence of on the keychain. - * @type {string} - * @memberof DeleteKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface DeleteKeychainEntryResponseV1 - */ -export interface DeleteKeychainEntryResponseV1 { - /** - * The key that was deleted from the keychain. - * @type {string} - * @memberof DeleteKeychainEntryResponseV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryRequestV1 - */ -export interface GetKeychainEntryRequestV1 { - /** - * The key for the entry to get from the keychain. - * @type {string} - * @memberof GetKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryResponseV1 - */ -export interface GetKeychainEntryResponseV1 { - /** - * The key that was used to retrieve the value from the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'key': string; - /** - * The value associated with the requested key on the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'value': string; -} -/** - * - * @export - * @interface HasKeychainEntryRequestV1 - */ -export interface HasKeychainEntryRequestV1 { - /** - * The key to check for presence in the keychain. - * @type {string} - * @memberof HasKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface HasKeychainEntryResponseV1 - */ -export interface HasKeychainEntryResponseV1 { - /** - * The key that was used to check the presence of the value in the entry store. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'key': string; - /** - * Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'checkedAt': string; - /** - * The boolean true or false indicating the presence or absence of an entry under \'key\'. - * @type {boolean} - * @memberof HasKeychainEntryResponseV1 - */ - 'isPresent': boolean; -} -/** - * - * @export - * @interface SetKeychainEntryRequestV1 - */ -export interface SetKeychainEntryRequestV1 { - /** - * The key for the entry to set on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'key': string; - /** - * The value that will be associated with the key on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'value': string; -} -/** - * - * @export - * @interface SetKeychainEntryResponseV1 - */ -export interface SetKeychainEntryResponseV1 { - /** - * The key that was used to set the value on the keychain. - * @type {string} - * @memberof SetKeychainEntryResponseV1 - */ - 'key': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1: async (deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteKeychainEntryRequestV1' is not null or undefined - assertParamExists('deleteKeychainEntryV1', 'deleteKeychainEntryRequestV1', deleteKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1: async (getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getKeychainEntryRequestV1' is not null or undefined - assertParamExists('getKeychainEntryV1', 'getKeychainEntryRequestV1', getKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1: async (hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'hasKeychainEntryRequestV1' is not null or undefined - assertParamExists('hasKeychainEntryV1', 'hasKeychainEntryRequestV1', hasKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(hasKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1: async (setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'setKeychainEntryRequestV1' is not null or undefined - assertParamExists('setKeychainEntryV1', 'setKeychainEntryRequestV1', setKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(setKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getKeychainEntryV1(getKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.hasKeychainEntryV1(hasKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.setKeychainEntryV1(setKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index e494b76932..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 61ef9f2a15..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index d36cc56c83..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 434478c164..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/index.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/index.web.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/index.web.ts deleted file mode 100644 index bdf54028d2..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/plugin-factory-keychain.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/plugin-factory-keychain.ts deleted file mode 100644 index dcb2493919..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/plugin-factory-keychain.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Checks } from "@hyperledger/cactus-common"; -import { - IPluginFactoryOptions, - IPluginKeychain, - PluginFactory, - PluginImportType, -} from "@hyperledger/cactus-core-api"; - -import { - IPluginKeychainAwsSmOptions, - PluginKeychainAwsSm, -} from "./plugin-keychain-aws-sm"; - -export class PluginFactoryKeychain extends PluginFactory< - IPluginKeychain, - IPluginKeychainAwsSmOptions, - IPluginFactoryOptions -> { - async create(options: any): Promise { - const fnTag = "PluginFactoryKeychain#create()"; - - const { pluginImportType } = this.options; - Checks.truthy(options, `${fnTag}:options`); - - if (pluginImportType === PluginImportType.Local) { - return new PluginKeychainAwsSm(options); - } else { - throw new Error(`${fnTag} No PluginImportType: ${pluginImportType}`); - } - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/plugin-keychain-aws-sm.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/plugin-keychain-aws-sm.ts deleted file mode 100644 index 6727ff7137..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/plugin-keychain-aws-sm.ts +++ /dev/null @@ -1,334 +0,0 @@ -import { - SharedIniFileCredentials, - config as awsConfig, - SecretsManager, - Credentials, -} from "aws-sdk"; - -import type { Express } from "express"; - -import OAS from "../json/openapi.json"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - ICactusPlugin, - ICactusPluginOptions, - IPluginWebService, - IWebServiceEndpoint, - IPluginKeychain, -} from "@hyperledger/cactus-core-api"; - -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; -import { GetPrometheusExporterMetricsEndpointV1 } from "./webservices/get-prometheus-exporter-metrics-endpoint-v1"; - -import { homedir } from "os"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { SetKeychainEntryV1Endpoint } from "./webservices/set-keychain-entry-endpoint-v1"; -import { GetKeychainEntryV1Endpoint } from "./webservices/get-keychain-entry-endpoint-v1"; -import { DeleteKeychainEntryV1Endpoint } from "./webservices/delete-keychain-entry-endpoint-v1"; -import { HasKeychainEntryV1Endpoint } from "./webservices/has-keychain-entry-endpoint-v1"; - -export enum AwsCredentialType { - LocalFile = "LOCAL_FILE", - InMemory = "IN_MEMORY", -} - -export interface IPluginKeychainAwsSmOptions extends ICactusPluginOptions { - instanceId: string; - pluginRegistry: PluginRegistry; - logLevel?: LogLevelDesc; - keychainId: string; - awsProfile: string; - awsRegion: string; - awsEndpoint: string; - awsCredentialType: AwsCredentialType; - /* - * awsCredentialFilePath field optional and necessary only when - * awsCredentialType == AwsCredentialType.LocalFile - * This field defaults to $HOME/.aws/credentials - */ - awsCredentialFilePath?: string; - /* - * awsAccessKeyId field optional and necessary only when - * awsCredentialType == AwsCredentialType.InMemory - */ - awsAccessKeyId?: string; - /* - * awsSecretAccessKey field optional and necessary only when - * awsCredentialType == AwsCredentialType.InMemory - */ - awsSecretAccessKey?: string; - /** - * Prometheus Exporter object for metrics monitoring - */ - - prometheusExporter?: PrometheusExporter; -} - -const SECRETMANAGER_STATUS_KEY_NOT_FOUND = - "Secrets Manager can't find the specified secret."; -export class PluginKeychainAwsSm - implements ICactusPlugin, IPluginWebService, IPluginKeychain -{ - public static readonly CLASS_NAME = "PluginKeychainAwsSm"; - - private readonly log: Logger; - private readonly instanceId: string; - /* - * awsProfile variable is used to refer to the aws profile to be consumed - * while running the plugin. The profile is located at - * ~/.aws/credentials by default and is setup when you run "aws configure" - * on the machine running this plugin. - * You can pass custom aws credential file path by defining the awsCredentialFilePath - * variable - */ - private readonly awsProfile: string; - private readonly awsRegion: string; - private readonly awsEndpoint: string; - private readonly awsClient: SecretsManager; - private endpoints: IWebServiceEndpoint[] | undefined; - private awsCredentialType: AwsCredentialType; - public prometheusExporter: PrometheusExporter; - - public get className(): string { - return PluginKeychainAwsSm.CLASS_NAME; - } - - constructor(public readonly opts: IPluginKeychainAwsSmOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.keychainId, `${fnTag} arg options.keychainId`); - Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); - Checks.truthy(opts.awsProfile, `${fnTag} options.awsProfile`); - Checks.truthy(opts.awsRegion, `${fnTag} options.awsRegion`); - Checks.truthy(opts.awsEndpoint, `${fnTag} options.awsEndpoint`); - Checks.truthy(opts.awsCredentialType, `${fnTag} options.awsCredentialType`); - Checks.nonBlankString(opts.keychainId, `${fnTag} options.keychainId`); - Checks.nonBlankString(opts.awsProfile, `${fnTag} options.awsProfile`); - Checks.nonBlankString(opts.awsRegion, `${fnTag} options.awsRegion`); - Checks.nonBlankString(opts.awsEndpoint, `${fnTag} options.awsEndpoint`); - if (opts.awsCredentialType == AwsCredentialType.InMemory) { - Checks.nonBlankString( - opts.awsAccessKeyId, - `${fnTag} options.awsAccessKeyId`, - ); - Checks.nonBlankString( - opts.awsSecretAccessKey, - `${fnTag} options.awsSecretAccessKey`, - ); - } - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = this.opts.instanceId; - this.awsProfile = this.opts.awsProfile; - this.awsRegion = this.opts.awsRegion; - this.awsEndpoint = this.opts.awsEndpoint; - this.awsCredentialType = this.opts.awsCredentialType; - - if (this.awsCredentialType == AwsCredentialType.LocalFile) { - const credentials = new SharedIniFileCredentials({ - profile: this.awsProfile, - filename: - this.opts.awsCredentialFilePath || `${homedir()}/.aws/credentials`, - }); - awsConfig.credentials = credentials; - } else if (this.awsCredentialType == AwsCredentialType.InMemory) { - const credentials = new Credentials({ - accessKeyId: this.opts.awsAccessKeyId || "", - secretAccessKey: this.opts.awsSecretAccessKey || "", - }); - awsConfig.credentials = credentials; - } - - awsConfig.region = this.awsRegion; - this.awsClient = new SecretsManager({ - endpoint: this.awsEndpoint, - }); - - this.prometheusExporter = - opts.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - this.prometheusExporter.startMetricsCollection(); - - this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - return res; - } - - public getAwsClient(): SecretsManager { - return this.awsClient; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const endpoints: IWebServiceEndpoint[] = [ - new SetKeychainEntryV1Endpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - new GetKeychainEntryV1Endpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - new DeleteKeychainEntryV1Endpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - new HasKeychainEntryV1Endpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - new GetPrometheusExporterMetricsEndpointV1({ - plugin: this, - logLevel: this.opts.logLevel, - }), - ]; - - this.endpoints = endpoints; - - return endpoints; - } - - public async onPluginInit(): Promise { - return; - } - - public async shutdown(): Promise { - throw new Error("Method not implemented."); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getKeychainId(): string { - return this.opts.keychainId; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-keychain-aws-sm`; - } - - public getEncryptionAlgorithm(): string { - return null as unknown as string; - } - - async get(key: string): Promise { - const fnTag = `${this.className}#get(key: string)`; - const awsClient = this.getAwsClient(); - try { - const res = await awsClient - .getSecretValue({ - SecretId: key, - }) - .promise(); - if (res.SecretString) { - return res.SecretString; - } else { - throw new Error( - `${fnTag}: Invalid response received from AWS SecretsManager. Expected "response.SecretString" property chain to be truthy`, - ); - } - } catch (ex) { - const errorStatus = (ex as Error).message.includes( - SECRETMANAGER_STATUS_KEY_NOT_FOUND, - ); - if (errorStatus) { - // FIXME: Throw if the value was not present instead of returning null - //return (null as unknown) as string; - throw new Error(`${key} secret not found`); - } else { - this.log.error(`Error retriving secret value for the key "${key}"`); - throw ex; - } - } - } - - async has(key: string): Promise { - const fnTag = `${this.className}#has(key: string)`; - const awsClient = this.getAwsClient(); - try { - await awsClient - .describeSecret({ - SecretId: key, - }) - .promise(); - return true; - } catch (ex) { - const errorStatus = (ex as Error).message.includes( - SECRETMANAGER_STATUS_KEY_NOT_FOUND, - ); - if (errorStatus) { - return false; - } else { - this.log.error(`${fnTag}: Presence check of "${key}" crashed:`, ex); - throw ex; - } - } - } - - async set(key: string, value: string): Promise { - const fnTag = `${this.className}#set(key: string)`; - const awsClient = this.getAwsClient(); - try { - await awsClient - .createSecret({ - Name: key, - SecretString: value, - }) - .promise(); - this.prometheusExporter.setTotalKeyCounter(key, "set"); - } catch (ex) { - this.log.error(` ${fnTag}: Error writing secret "${key}"`); - throw ex; - } - } - - async delete(key: string): Promise { - const fnTag = `${this.className}#delete(key: string)`; - const awsClient = this.getAwsClient(); - try { - await awsClient - .deleteSecret({ - SecretId: key, - ForceDeleteWithoutRecovery: true, - }) - .promise(); - this.prometheusExporter.setTotalKeyCounter(key, "delete"); - } catch (ex) { - this.log.error(`${fnTag} Error deleting secret "${key}"`); - throw ex; - } - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index 1759a5b7f3..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { AwsSmKeys } from "./response.type"; - -import { - totalKeyCount, - K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT, -} from "./metrics"; - -export async function collectMetrics(awsSmKeys: AwsSmKeys): Promise { - totalKeyCount - .labels(K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT) - .set(awsSmKeys.size); -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index 2aa724077f..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT = - "cactus_keychain_awssm_managed_key_count"; - -export const totalKeyCount = new Gauge({ - registers: [], - name: K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT, - help: "The number of keys that were set in the backing Aws Secret Manager deployment via this specific keychain plugin instance", - labelNames: ["type"], -}); diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index 60c1cea39c..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,44 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { AwsSmKeys } from "./response.type"; -import { collectMetrics } from "./data-fetcher"; -import { K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT } from "./metrics"; -import { totalKeyCount } from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly awsSmKeys: AwsSmKeys = new Map(); - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public setTotalKeyCounter(key: string, operation: string): void { - if (operation === "set") { - this.awsSmKeys.set(key, "keychain-awssm"); - } else { - this.awsSmKeys.delete(key); - } - collectMetrics(this.awsSmKeys); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalKeyCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index f652e8c8a6..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1 +0,0 @@ -export type AwsSmKeys = Map; diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/public-api.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/public-api.ts deleted file mode 100644 index f0687026a3..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/public-api.ts +++ /dev/null @@ -1,18 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; - -import { PluginFactoryKeychain } from "./plugin-factory-keychain"; -//export { PluginFactoryKeychain } from "./plugin-factory-keychain"; - -export { - IPluginKeychainAwsSmOptions, - PluginKeychainAwsSm, - AwsCredentialType, -} from "./plugin-keychain-aws-sm"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryKeychain(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 42f95ce2d8..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainAwsSm } from "../plugin-keychain-aws-sm"; -import { DeleteKeychainEntryRequestV1 } from "../generated/openapi/typescript-axios/api"; - -export interface IDeleteKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainAwsSm; -} - -export class DeleteKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeleteKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeleteKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeleteKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/delete-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - //const reqBody = req.body; - try { - const { key } = req.body as DeleteKeychainEntryRequestV1; - const resBody = await this.options.connector.delete(key); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 0228b5fa4b..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,110 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - GetKeychainEntryRequestV1, - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainAwsSm } from "../plugin-keychain-aws-sm"; - -export interface IGetKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainAwsSm; -} - -export class GetKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return GetKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const { key } = req.body as GetKeychainEntryRequestV1; - //const reqBody = req.body; - try { - const value = await this.options.connector.get(key); - //const resBody = await this.options.connector.get(reqBody.key); - res.json({ key, value }); - } catch (ex) { - if (ex?.message?.includes(`${key} secret not found`)) { - res.status(404).json({ - key, - error: ex?.stack || ex?.message, - }); - } else { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/get-prometheus-exporter-metrics-endpoint-v1.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/get-prometheus-exporter-metrics-endpoint-v1.ts deleted file mode 100644 index 9f2c868817..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/get-prometheus-exporter-metrics-endpoint-v1.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api/"; - -import OAS from "../../json/openapi.json"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginKeychainAwsSm } from "../plugin-keychain-aws-sm"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - logLevel?: LogLevelDesc; - plugin: PluginKeychainAwsSm; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - private readonly log: Logger; - - constructor( - public readonly opts: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = "GetPrometheusExporterMetricsEndpointV1#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.plugin, `${fnTag} options.plugin`); - - this.log = LoggerProvider.getOrCreate({ - label: "get-prometheus-exporter-metrics-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetPrometheusExporterMetrics#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - const resBody = await this.opts.plugin.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts deleted file mode 100644 index e23c7f18c0..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,108 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainAwsSm } from "../plugin-keychain-aws-sm"; -import { HasKeychainEntryRequestV1 } from "../generated/openapi/typescript-axios/api"; - -export interface IHasKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainAwsSm; -} - -export class HasKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "HasKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return HasKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IHasKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/has-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const reqBody = req.body as HasKeychainEntryRequestV1; - const { key } = reqBody; - const checkedAt = new Date().toJSON(); - const isPresent = await this.options.connector.has(key); - const resBody = { - isPresent, - key, - checkedAt, - }; - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 7e253d2cbd..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,101 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainAwsSm } from "../plugin-keychain-aws-sm"; -import { SetKeychainEntryRequestV1 } from "../generated/openapi/typescript-axios/api"; - -export interface ISetKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainAwsSm; -} - -export class SetKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "SetKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return SetKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: ISetKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/set-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const { key, value } = req.body as SetKeychainEntryRequestV1; - const resBody = await this.options.connector.set(key, value); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts deleted file mode 100644 index 4337b4f311..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ /dev/null @@ -1,254 +0,0 @@ -import { v4 as internalIpV4 } from "internal-ip"; -import { - Containers, - LocalStackContainer, - K_DEFAULT_LOCALSTACK_HTTP_PORT, -} from "@hyperledger/cactus-test-tooling"; -import { v4 as uuidv4 } from "uuid"; -import { - IListenOptions, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { - IPluginKeychainAwsSmOptions, - PluginKeychainAwsSm, - AwsCredentialType, - DefaultApi as KeychainAwsSmApi, - Configuration, - SetKeychainEntryRequestV1, - GetKeychainEntryRequestV1, - HasKeychainEntryRequestV1, - DeleteKeychainEntryRequestV1, -} from "../../../../main/typescript/public-api"; -import fs from "fs"; -import path from "path"; -import os from "os"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { - installOpenapiValidationMiddleware, - PluginRegistry, -} from "@hyperledger/cactus-core"; -import OAS from "../../../../main/json/openapi.json"; -import { AddressInfo } from "net"; - -const logLevel: LogLevelDesc = "INFO"; -const testCase = "cactus-plugin-keychain-aws-sm API"; - -describe("PluginKeychainAwsSm", () => { - let localStackContainer: LocalStackContainer; - let tmpDirPath: string; - let plugin: PluginKeychainAwsSm; - let expressApp: express.Express; - let server: http.Server; - let apiClient: KeychainAwsSmApi; - - beforeAll(async () => { - localStackContainer = new LocalStackContainer({ logLevel: logLevel }); - await localStackContainer.start(); - - const ci = await Containers.getById(localStackContainer.containerId); - const localstackIpAddr = await internalIpV4(); - const hostPort = await Containers.getPublicPort( - K_DEFAULT_LOCALSTACK_HTTP_PORT, - ci, - ); - const localstackHost = `http://${localstackIpAddr}:${hostPort}`; - - tmpDirPath = await fs.promises.mkdtemp(path.join(os.tmpdir(), "cactus-")); - await fs.promises.writeFile( - `${tmpDirPath}/credentials`, - "[default]\naws_secret_access_key = test\naws_access_key_id = test", - "utf-8", - ); - - const options: IPluginKeychainAwsSmOptions = { - instanceId: uuidv4(), - keychainId: uuidv4(), - pluginRegistry: new PluginRegistry({}), - awsEndpoint: localstackHost, - awsRegion: "us-east-1", - awsProfile: "default", - awsCredentialType: AwsCredentialType.LocalFile, - awsCredentialFilePath: `${tmpDirPath}/credentials`, - logLevel: logLevel, - }; - plugin = new PluginKeychainAwsSm(options); - - expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new KeychainAwsSmApi(apiConfig); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - }); - - afterAll(async () => { - await Servers.shutdown(server); - await localStackContainer.stop(); - await localStackContainer.destroy(); - fs.promises.rm(tmpDirPath, { recursive: true, force: true }); - }); - - const key = uuidv4(); - const value = uuidv4(); - - const fSet = "setKeychainEntryV1"; - const fGet = "getKeychainEntryV1"; - const fHas = "hasKeychainEntryV1"; - const fDelete = "deleteKeychainEntryV1"; - const cOk = "without bad request error"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - - test(`${testCase} - ${fSet} - ${cOk}`, async () => { - const res = await apiClient.setKeychainEntryV1({ key, value }); - expect(res.status).toBe(200); - }); - - test(`${testCase} - ${fGet} - ${cOk}`, async () => { - const res = await apiClient.getKeychainEntryV1({ key }); - expect(res.status).toBe(200); - expect(res.data.value).toBe(value); - }); - - test(`${testCase} - ${fHas} - ${cOk}`, async () => { - const res = await apiClient.hasKeychainEntryV1({ key }); - expect(res.status).toBe(200); - }); - - test(`${testCase} - ${fDelete} - ${cOk}`, async () => { - const res = await apiClient.deleteKeychainEntryV1({ key }); - expect(res.status).toBe(200); - }); - - test(`${testCase} - ${fSet} - ${cWithoutParams}`, async () => { - try { - await apiClient.setKeychainEntryV1({ - value, - } as SetKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toBe(400); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - expect(fields.includes("key")).toBeTruthy(); - } - }); - - test(`${testCase} - ${fGet} - ${cWithoutParams}`, async () => { - try { - await apiClient.getKeychainEntryV1({} as GetKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toBe(400); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - expect(fields.includes("key")).toBeTruthy(); - } - }); - - test(`${testCase} - ${fHas} - ${cWithoutParams}`, async () => { - try { - await apiClient.hasKeychainEntryV1({} as HasKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toBe(400); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - expect(fields.includes("key")).toBeTruthy(); - } - }); - - test(`${testCase} - ${fDelete} - ${cWithoutParams}`, async () => { - try { - await apiClient.deleteKeychainEntryV1({} as DeleteKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toBe(400); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - expect(fields.includes("key")).toBeTruthy(); - } - }); - - test(`${testCase} - ${fSet} - ${cInvalidParams}`, async () => { - try { - await apiClient.setKeychainEntryV1({ - key, - value, - fake: 4, - } as SetKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toBe(400); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - expect(fields.includes("fake")).toBeTruthy(); - } - }); - - test(`${testCase} - ${fGet} - ${cInvalidParams}`, async () => { - try { - await apiClient.getKeychainEntryV1({ - key, - fake: 4, - } as GetKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toBe(400); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - expect(fields.includes("fake")).toBeTruthy(); - } - }); - - test(`${testCase} - ${fHas} - ${cInvalidParams}`, async () => { - try { - await apiClient.hasKeychainEntryV1({ - key, - fake: 4, - } as HasKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toBe(400); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - expect(fields.includes("fake")).toBeTruthy(); - } - }); - - test(`${testCase} - ${fDelete} - ${cInvalidParams}`, async () => { - try { - await apiClient.deleteKeychainEntryV1({ - key, - fake: 4, - } as DeleteKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toBe(400); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - expect(fields.includes("fake")).toBeTruthy(); - } - }); -}); diff --git a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts deleted file mode 100644 index 4bc48f7c7f..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - IPluginFactoryOptions, - PluginImportType, -} from "@hyperledger/cactus-core-api"; -import test, { Test } from "tape-promise/tape"; -import { PluginFactoryKeychain } from "../../../main/typescript/plugin-factory-keychain"; -import { - AwsCredentialType, - PluginKeychainAwsSm, -} from "../../../main/typescript/plugin-keychain-aws-sm"; -import { v4 as uuidv4 } from "uuid"; - -test("get,set,has,delete alters state as expected", async (t: Test) => { - const iPluginFactoryOptions1: IPluginFactoryOptions = { - pluginImportType: PluginImportType.Local, - }; - - const invalid: IPluginFactoryOptions = { - pluginImportType: null as unknown as PluginImportType, - }; - - const pluginRegistry = new PluginRegistry(); - const iPluginKeychainAwsSmOptions = { - pluginRegistry, - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel: "TRACE", - awsProfile: "true", - awsRegion: "true", - awsEndpoint: "true", - awsAccessKeyId: "true", - awsSecretAccessKey: "true", - awsCredentialType: AwsCredentialType.InMemory, - }; - - const pluginFactoryKeychain1 = new PluginFactoryKeychain( - iPluginFactoryOptions1, - ); - - const pluginFactoryKeychain3 = new PluginFactoryKeychain(invalid); - - const pluginKeychainAwsSm = await pluginFactoryKeychain1.create( - iPluginKeychainAwsSmOptions, - ); - - t.true( - pluginKeychainAwsSm instanceof PluginKeychainAwsSm, - "pluginImportType.Local results in pluginKeychainAwsSm", - ); - - await t.rejects( - pluginFactoryKeychain3.create({ - invalid, - }), - ); - - t.end(); -}); diff --git a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts deleted file mode 100644 index d23acfc5b4..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts +++ /dev/null @@ -1,251 +0,0 @@ -import fs from "fs"; -import path from "path"; -import os from "os"; -import http from "http"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; - -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import { v4 as internalIpV4 } from "internal-ip"; - -import { - IListenOptions, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { - installOpenapiValidationMiddleware, - PluginRegistry, -} from "@hyperledger/cactus-core"; - -import { - Containers, - LocalStackContainer, - K_DEFAULT_LOCALSTACK_HTTP_PORT, -} from "@hyperledger/cactus-test-tooling"; - -import OAS from "../../../main/json/openapi.json"; -import { - IPluginKeychainAwsSmOptions, - PluginKeychainAwsSm, - AwsCredentialType, -} from "../../../main/typescript/plugin-keychain-aws-sm"; -import { - DefaultApi as KeychainAwsSmApi, - Configuration, -} from "../../../main/typescript/generated/openapi/typescript-axios/index"; -import { K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT } from "../../../main/typescript/prometheus-exporter/metrics"; - -const logLevel: LogLevelDesc = "TRACE"; - -describe("PluginKeychainAwsSm", () => { - const key = uuidv4(); - const value = uuidv4(); - const keychainId = uuidv4(); - const instanceId = uuidv4(); - const log = LoggerProvider.getOrCreate({ - label: "plugin-keychain-aws-sm.test.ts", - level: logLevel, - }); - let apiHost: string; - let localStackContainer: LocalStackContainer; - let localstackHost: string; - let tmpDirPath: string; - let plugin: PluginKeychainAwsSm; - let expressApp: express.Express; - let server: http.Server; - let apiClient: KeychainAwsSmApi; - - beforeAll(async () => { - localStackContainer = new LocalStackContainer({ logLevel: logLevel }); - await localStackContainer.start(); - - const ci = await Containers.getById(localStackContainer.containerId); - const localstackIpAddr = await internalIpV4(); - const hostPort = await Containers.getPublicPort( - K_DEFAULT_LOCALSTACK_HTTP_PORT, - ci, - ); - localstackHost = `http://${localstackIpAddr}:${hostPort}`; - log.info("LocalStack host: %s", localstackHost); - - tmpDirPath = await fs.promises.mkdtemp(path.join(os.tmpdir(), "cacti-")); - await fs.promises.writeFile( - `${tmpDirPath}/credentials`, - "[default]\naws_secret_access_key = test\naws_access_key_id = test", - "utf-8", - ); - - const options: IPluginKeychainAwsSmOptions = { - instanceId, - keychainId, - pluginRegistry: new PluginRegistry({}), - awsEndpoint: localstackHost, - awsRegion: "us-east-1", - awsProfile: "default", - awsCredentialType: AwsCredentialType.LocalFile, - awsCredentialFilePath: `${tmpDirPath}/credentials`, - logLevel: logLevel, - }; - plugin = new PluginKeychainAwsSm(options); - - expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - apiHost = `http://${address}:${port}`; - - const apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new KeychainAwsSmApi(apiConfig); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - }); - - afterAll(async () => { - await Servers.shutdown(server); - await localStackContainer.stop(); - await localStackContainer.destroy(); - fs.promises.rm(tmpDirPath, { recursive: true, force: true }); - }); - - test("get,set,has,delete alters state as expected", async () => { - // Using awsCredentialType: AwsCredentialType.FromAwsCredentialFile - { - // Create aws credential file in a local directory - let tmpDirPath = "tmpDirPath"; - tmpDirPath = await fs.promises.mkdtemp(path.join(os.tmpdir(), "cactus-")); - await fs.promises.writeFile( - `${tmpDirPath}/credentials`, - "[default]\naws_secret_access_key = test\naws_access_key_id = test", - "utf-8", - ); - - const metricsPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics" - ].get["x-hyperledger-cacti"].http.path; - const metricsUrl = `${apiHost}${metricsPath}`; - - log.debug(`Metrics URL: ${metricsUrl}`); - - await plugin.registerWebServices(expressApp); - - expect(plugin.getKeychainId()).toEqual(keychainId); - expect(plugin.getInstanceId()).toEqual(instanceId); - - const res1 = await apiClient.hasKeychainEntryV1({ key }); - expect(res1.status).toBeGreaterThanOrEqual(200); - expect(res1.status).toBeLessThan(300); - expect(res1.data).toBeTruthy(); - expect(res1.data).not.toBeEmptyObject(); - expect(res1.data.isPresent).toBeFalse(); - expect(res1.data.checkedAt).toBeTruthy(); - expect(res1.data.key).toEqual(key); - - const res2 = await apiClient.setKeychainEntryV1({ - key: key, - value: value, - }); - expect(res2.status).toBeGreaterThanOrEqual(200); - expect(res2.status).toBeLessThan(300); - expect(res2.data).toBeFalsy(); - - const res3 = await apiClient.hasKeychainEntryV1({ key }); - - expect(res3.status).toBeGreaterThanOrEqual(200); - expect(res3.status).toBeLessThan(300); - expect(res3.data).toBeTruthy(); - expect(res3.data).not.toBeEmptyObject(); - expect(res3.data.isPresent).toBeTrue(); - expect(res3.data.checkedAt).toBeTruthy(); - expect(res3.data.key).toEqual(key); - - const res3_5 = await apiClient.getPrometheusMetricsV1(); - const metricsData1 = - "# HELP " + - K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT + - " The number of keys that were set in the backing Aws Secret Manager deployment via this specific keychain plugin instance\n" + - "# TYPE " + - K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT + - " gauge\n" + - K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT + - '{type="' + - K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT + - '"} 1'; - - expect(res3_5.status).toBeGreaterThanOrEqual(200); - expect(res3_5.status).toBeLessThan(300); - expect(res3_5.data).toBeTruthy(); - expect(res3_5.data).toMatch(metricsData1); - - const res4 = await apiClient.getKeychainEntryV1({ - key: key, - }); - - expect(res4.status).toBeGreaterThanOrEqual(200); - expect(res4.status).toBeLessThan(300); - expect(res4.data).toBeTruthy(); - expect(res4.data).not.toBeEmptyObject(); - expect(res4.data.value).toEqual(value); - - const res5 = await apiClient.deleteKeychainEntryV1({ key }); - - expect(res5.status).toBeGreaterThanOrEqual(200); - expect(res5.status).toBeLessThan(300); - expect(res5.data).toBeFalsy(); - - const res6 = await apiClient.hasKeychainEntryV1({ key }); - - expect(res6.status).toBeGreaterThanOrEqual(200); - expect(res6.status).toBeLessThan(300); - expect(res6.data).toBeTruthy(); - expect(res6.data).not.toBeEmptyObject(); - expect(res6.data.isPresent).toBeFalse(); - expect(res6.data.checkedAt).toBeTruthy(); - expect(res6.data.key).toEqual(key); - - const res7 = await apiClient.getPrometheusMetricsV1(); - const metricsData2 = - "# HELP " + - K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT + - " The number of keys that were set in the backing Aws Secret Manager deployment via this specific keychain plugin instance\n" + - "# TYPE " + - K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT + - " gauge\n" + - K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT + - '{type="' + - K_CACTUS_KEYCHAIN_AWSSM_MANAGED_KEY_COUNT + - '"} 0'; - expect(res7.status).toBeGreaterThanOrEqual(200); - expect(res7.status).toBeLessThan(300); - expect(res7.data).toBeTruthy(); - expect(res7.data).toMatch(metricsData2); - - const deletionOfNonExistentKey = apiClient.getKeychainEntryV1({ key }); - await expect(deletionOfNonExistentKey).rejects.toMatchObject({ - response: expect.objectContaining({ - status: 404, - data: expect.objectContaining({ - error: expect.stringContaining(key), - }), - }), - }); - } - }); -}); diff --git a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-keychain-aws-sm/tsconfig.json b/packages/cactus-plugin-keychain-aws-sm/tsconfig.json deleted file mode 100644 index 18e531e90a..0000000000 --- a/packages/cactus-plugin-keychain-aws-sm/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-keychain-aws-sm.tsbuildinfo" - }, - "include": [ - "./src", - "**/openapi.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} diff --git a/packages/cactus-plugin-keychain-azure-kv/CHANGELOG.md b/packages/cactus-plugin-keychain-azure-kv/CHANGELOG.md deleted file mode 100644 index 2a217ca5b2..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/CHANGELOG.md +++ /dev/null @@ -1,146 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Features - -* **keychain-azure-kv:** complete request handler and endpoints ([932df10](https://github.com/hyperledger/cactus/commit/932df106734ec63146d1dc97d8db9c54d26086c6)), closes [#1010](https://github.com/hyperledger/cactus/issues/1010) [#1349](https://github.com/hyperledger/cactus/issues/1349) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-azure-kv - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Features - -* **azure-kv:** added keychain plugin for azure keyvault ([69e7b50](https://github.com/hyperledger/cactus/commit/69e7b50f127fbf247a43288353388782a4301686)), closes [#971](https://github.com/hyperledger/cactus/issues/971) diff --git a/packages/cactus-plugin-keychain-azure-kv/README.md b/packages/cactus-plugin-keychain-azure-kv/README.md deleted file mode 100644 index 71001042c8..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@hyperledger/cactus-plugin-keychain-azure-kv` - -# TO-DO \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-azure-kv/openapitools.json b/packages/cactus-plugin-keychain-azure-kv/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/package.json b/packages/cactus-plugin-keychain-azure-kv/package.json deleted file mode 100644 index 272e066667..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-keychain-azure-kv", - "version": "2.0.0", - "description": "A keychain implementation storing its entries in Azure key vault.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - }, - { - "name": "Jeffrey Ushry II", - "email": "ushryaspirant@gmail.com", - "url": "https://www.linkedin.com/in/jeffrey-ushry-ii-aa7ab8183" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-keychain-azure-kv.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@azure/identity": "4.2.1", - "@azure/keyvault-secrets": "4.3.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "http-status-codes": "2.1.4", - "typescript-optional": "2.0.1" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/request": "2.48.7", - "body-parser": "1.20.3", - "express": "4.21.0", - "internal-ip": "6.2.0", - "openapi-types": "12.1.3", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-keychain-azure-kv.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-keychain-azure-kv.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 28a644e272..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,18 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_delete_keychain_entry_request_v1.go -model_delete_keychain_entry_response_v1.go -model_get_keychain_entry_request_v1.go -model_get_keychain_entry_response_v1.go -model_has_keychain_entry_request_v1.go -model_has_keychain_entry_response_v1.go -model_set_keychain_entry_request_v1.go -model_set_keychain_entry_response_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 3418eaa2d1..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# Go API client for cactus-plugin-keychain-azure-kv - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-keychain-azure-kv "github.com/hyperledger/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-azure-kv.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-azure-kv.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-azure-kv.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-keychain-azure-kv.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry | Deletes a value under a key on the keychain backend. -*DefaultApi* | [**GetKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**HasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry | Checks that an entry exists under a key on the keychain backend -*DefaultApi* | [**SetKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry | Sets a value under a key on the keychain backend. - - -## Documentation For Models - - - [DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index fe513e72d6..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,344 +0,0 @@ -openapi: 3.0.3 -info: - description: Contains/describes the Keychain API types/paths for Hyperledger Cactus. - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus - Keychain API - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry: - post: - operationId: getKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_get_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "404": - description: A keychain item with the specified key was not found. - "500": - description: Unexpected error. - summary: Retrieves the contents of a keychain entry from the backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry: - post: - operationId: setKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_set_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Sets a value under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry: - post: - operationId: deleteKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_delete_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Deletes a value under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry: - post: - operationId: hasKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_has_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Checks that an entry exists under a key on the keychain backend - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry - verbLowerCase: post -components: - requestBodies: - keychain_get_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryRequestV1' - description: Request body to obtain a keychain entry via its key - required: true - keychain_set_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryRequestV1' - description: Request body to write/update a keychain entry via its key - required: true - keychain_delete_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryRequestV1' - description: Request body to delete a keychain entry via its key - required: true - keychain_has_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryRequestV1' - description: Request body for checking a keychain entry via its key - required: true - responses: - keychain_get_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - keychain_get_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_get_entry_401: - description: Authorization information is missing or invalid. - keychain_get_entry_404: - description: A keychain item with the specified key was not found. - keychain_get_entry_500: - description: Unexpected error. - keychain_set_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - keychain_set_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_set_entry_401: - description: Authorization information is missing or invalid. - keychain_set_entry_500: - description: Unexpected error. - keychain_delete_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - keychain_delete_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_delete_entry_401: - description: Authorization information is missing or invalid. - keychain_delete_entry_500: - description: Unexpected error. - keychain_has_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - keychain_has_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_has_entry_401: - description: Authorization information is missing or invalid. - keychain_has_entry_500: - description: Unexpected error. - schemas: - GetSecretRequest: - nullable: false - type: string - GetSecretResponse: - nullable: false - type: string - GetKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to get from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - GetKeychainEntryResponseV1: - example: - value: value - key: key - properties: - key: - description: The key that was used to retrieve the value from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value associated with the requested key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryRequestV1: - additionalProperties: false - example: - value: value - key: key - properties: - key: - description: The key for the entry to set on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value that will be associated with the key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was used to set the value on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to check the presence of on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was deleted from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key to check for presence in the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryResponseV1: - example: - checkedAt: checkedAt - isPresent: true - key: key - properties: - key: - description: The key that was used to check the presence of the value in - the entry store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - checkedAt: - description: Date and time encoded as JSON when the presence check was performed - by the plugin backend. - nullable: false - type: string - isPresent: - description: The boolean true or false indicating the presence or absence - of an entry under 'key'. - nullable: false - type: boolean - required: - - checkedAt - - isPresent - - key - type: object diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index dc0a3d684c..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,459 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeleteKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deleteKeychainEntryRequestV1 *DeleteKeychainEntryRequestV1 -} - -// Request body to delete a keychain entry via its key -func (r ApiDeleteKeychainEntryV1Request) DeleteKeychainEntryRequestV1(deleteKeychainEntryRequestV1 DeleteKeychainEntryRequestV1) ApiDeleteKeychainEntryV1Request { - r.deleteKeychainEntryRequestV1 = &deleteKeychainEntryRequestV1 - return r -} - -func (r ApiDeleteKeychainEntryV1Request) Execute() (*DeleteKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.DeleteKeychainEntryV1Execute(r) -} - -/* -DeleteKeychainEntryV1 Deletes a value under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeleteKeychainEntryV1Request -*/ -func (a *DefaultApiService) DeleteKeychainEntryV1(ctx context.Context) ApiDeleteKeychainEntryV1Request { - return ApiDeleteKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeleteKeychainEntryResponseV1 -func (a *DefaultApiService) DeleteKeychainEntryV1Execute(r ApiDeleteKeychainEntryV1Request) (*DeleteKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeleteKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.deleteKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("deleteKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deleteKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getKeychainEntryRequestV1 *GetKeychainEntryRequestV1 -} - -// Request body to obtain a keychain entry via its key -func (r ApiGetKeychainEntryV1Request) GetKeychainEntryRequestV1(getKeychainEntryRequestV1 GetKeychainEntryRequestV1) ApiGetKeychainEntryV1Request { - r.getKeychainEntryRequestV1 = &getKeychainEntryRequestV1 - return r -} - -func (r ApiGetKeychainEntryV1Request) Execute() (*GetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.GetKeychainEntryV1Execute(r) -} - -/* -GetKeychainEntryV1 Retrieves the contents of a keychain entry from the backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetKeychainEntryV1Request -*/ -func (a *DefaultApiService) GetKeychainEntryV1(ctx context.Context) ApiGetKeychainEntryV1Request { - return ApiGetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetKeychainEntryResponseV1 -func (a *DefaultApiService) GetKeychainEntryV1Execute(r ApiGetKeychainEntryV1Request) (*GetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("getKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiHasKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - hasKeychainEntryRequestV1 *HasKeychainEntryRequestV1 -} - -// Request body for checking a keychain entry via its key -func (r ApiHasKeychainEntryV1Request) HasKeychainEntryRequestV1(hasKeychainEntryRequestV1 HasKeychainEntryRequestV1) ApiHasKeychainEntryV1Request { - r.hasKeychainEntryRequestV1 = &hasKeychainEntryRequestV1 - return r -} - -func (r ApiHasKeychainEntryV1Request) Execute() (*HasKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.HasKeychainEntryV1Execute(r) -} - -/* -HasKeychainEntryV1 Checks that an entry exists under a key on the keychain backend - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHasKeychainEntryV1Request -*/ -func (a *DefaultApiService) HasKeychainEntryV1(ctx context.Context) ApiHasKeychainEntryV1Request { - return ApiHasKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return HasKeychainEntryResponseV1 -func (a *DefaultApiService) HasKeychainEntryV1Execute(r ApiHasKeychainEntryV1Request) (*HasKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HasKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.HasKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.hasKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("hasKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.hasKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - setKeychainEntryRequestV1 *SetKeychainEntryRequestV1 -} - -// Request body to write/update a keychain entry via its key -func (r ApiSetKeychainEntryV1Request) SetKeychainEntryRequestV1(setKeychainEntryRequestV1 SetKeychainEntryRequestV1) ApiSetKeychainEntryV1Request { - r.setKeychainEntryRequestV1 = &setKeychainEntryRequestV1 - return r -} - -func (r ApiSetKeychainEntryV1Request) Execute() (*SetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.SetKeychainEntryV1Execute(r) -} - -/* -SetKeychainEntryV1 Sets a value under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSetKeychainEntryV1Request -*/ -func (a *DefaultApiService) SetKeychainEntryV1(ctx context.Context) ApiSetKeychainEntryV1Request { - return ApiSetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SetKeychainEntryResponseV1 -func (a *DefaultApiService) SetKeychainEntryV1Execute(r ApiSetKeychainEntryV1Request) (*SetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.setKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("setKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.setKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index b0b1cca4de..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus - Keychain API API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 008b59eb77..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index f3e39b75dc..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go deleted file mode 100644 index 81fe33a4a3..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryRequestV1{} - -// DeleteKeychainEntryRequestV1 struct for DeleteKeychainEntryRequestV1 -type DeleteKeychainEntryRequestV1 struct { - // The key for the entry to check the presence of on the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryRequestV1 instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryRequestV1(key string) *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryRequestV1WithDefaults instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryRequestV1WithDefaults() *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryRequestV1 struct { - value *DeleteKeychainEntryRequestV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryRequestV1) Get() *DeleteKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryRequestV1) Set(val *DeleteKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryRequestV1(val *DeleteKeychainEntryRequestV1) *NullableDeleteKeychainEntryRequestV1 { - return &NullableDeleteKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go deleted file mode 100644 index e109661cbf..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryResponseV1{} - -// DeleteKeychainEntryResponseV1 struct for DeleteKeychainEntryResponseV1 -type DeleteKeychainEntryResponseV1 struct { - // The key that was deleted from the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryResponseV1 instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryResponseV1(key string) *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryResponseV1WithDefaults instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryResponseV1WithDefaults() *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryResponseV1 struct { - value *DeleteKeychainEntryResponseV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryResponseV1) Get() *DeleteKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryResponseV1) Set(val *DeleteKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryResponseV1(val *DeleteKeychainEntryResponseV1) *NullableDeleteKeychainEntryResponseV1 { - return &NullableDeleteKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go deleted file mode 100644 index ef31c7b97d..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryRequestV1{} - -// GetKeychainEntryRequestV1 struct for GetKeychainEntryRequestV1 -type GetKeychainEntryRequestV1 struct { - // The key for the entry to get from the keychain. - Key string `json:"key"` -} - -// NewGetKeychainEntryRequestV1 instantiates a new GetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryRequestV1(key string) *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewGetKeychainEntryRequestV1WithDefaults instantiates a new GetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryRequestV1WithDefaults() *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o GetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableGetKeychainEntryRequestV1 struct { - value *GetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableGetKeychainEntryRequestV1) Get() *GetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableGetKeychainEntryRequestV1) Set(val *GetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryRequestV1(val *GetKeychainEntryRequestV1) *NullableGetKeychainEntryRequestV1 { - return &NullableGetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go deleted file mode 100644 index 818920d6e3..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryResponseV1{} - -// GetKeychainEntryResponseV1 struct for GetKeychainEntryResponseV1 -type GetKeychainEntryResponseV1 struct { - // The key that was used to retrieve the value from the keychain. - Key string `json:"key"` - // The value associated with the requested key on the keychain. - Value string `json:"value"` -} - -// NewGetKeychainEntryResponseV1 instantiates a new GetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryResponseV1(key string, value string) *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - this.Key = key - this.Value = value - return &this -} - -// NewGetKeychainEntryResponseV1WithDefaults instantiates a new GetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryResponseV1WithDefaults() *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *GetKeychainEntryResponseV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *GetKeychainEntryResponseV1) SetValue(v string) { - o.Value = v -} - -func (o GetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableGetKeychainEntryResponseV1 struct { - value *GetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableGetKeychainEntryResponseV1) Get() *GetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableGetKeychainEntryResponseV1) Set(val *GetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryResponseV1(val *GetKeychainEntryResponseV1) *NullableGetKeychainEntryResponseV1 { - return &NullableGetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go deleted file mode 100644 index 94c230cede..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryRequestV1{} - -// HasKeychainEntryRequestV1 struct for HasKeychainEntryRequestV1 -type HasKeychainEntryRequestV1 struct { - // The key to check for presence in the keychain. - Key string `json:"key"` -} - -// NewHasKeychainEntryRequestV1 instantiates a new HasKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryRequestV1(key string) *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewHasKeychainEntryRequestV1WithDefaults instantiates a new HasKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryRequestV1WithDefaults() *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o HasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableHasKeychainEntryRequestV1 struct { - value *HasKeychainEntryRequestV1 - isSet bool -} - -func (v NullableHasKeychainEntryRequestV1) Get() *HasKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableHasKeychainEntryRequestV1) Set(val *HasKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryRequestV1(val *HasKeychainEntryRequestV1) *NullableHasKeychainEntryRequestV1 { - return &NullableHasKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go deleted file mode 100644 index b8db0a23d7..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryResponseV1{} - -// HasKeychainEntryResponseV1 struct for HasKeychainEntryResponseV1 -type HasKeychainEntryResponseV1 struct { - // The key that was used to check the presence of the value in the entry store. - Key string `json:"key"` - // Date and time encoded as JSON when the presence check was performed by the plugin backend. - CheckedAt string `json:"checkedAt"` - // The boolean true or false indicating the presence or absence of an entry under 'key'. - IsPresent bool `json:"isPresent"` -} - -// NewHasKeychainEntryResponseV1 instantiates a new HasKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryResponseV1(key string, checkedAt string, isPresent bool) *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - this.Key = key - this.CheckedAt = checkedAt - this.IsPresent = isPresent - return &this -} - -// NewHasKeychainEntryResponseV1WithDefaults instantiates a new HasKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryResponseV1WithDefaults() *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetCheckedAt returns the CheckedAt field value -func (o *HasKeychainEntryResponseV1) GetCheckedAt() string { - if o == nil { - var ret string - return ret - } - - return o.CheckedAt -} - -// GetCheckedAtOk returns a tuple with the CheckedAt field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetCheckedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CheckedAt, true -} - -// SetCheckedAt sets field value -func (o *HasKeychainEntryResponseV1) SetCheckedAt(v string) { - o.CheckedAt = v -} - -// GetIsPresent returns the IsPresent field value -func (o *HasKeychainEntryResponseV1) GetIsPresent() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPresent -} - -// GetIsPresentOk returns a tuple with the IsPresent field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetIsPresentOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPresent, true -} - -// SetIsPresent sets field value -func (o *HasKeychainEntryResponseV1) SetIsPresent(v bool) { - o.IsPresent = v -} - -func (o HasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["checkedAt"] = o.CheckedAt - toSerialize["isPresent"] = o.IsPresent - return toSerialize, nil -} - -type NullableHasKeychainEntryResponseV1 struct { - value *HasKeychainEntryResponseV1 - isSet bool -} - -func (v NullableHasKeychainEntryResponseV1) Get() *HasKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableHasKeychainEntryResponseV1) Set(val *HasKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryResponseV1(val *HasKeychainEntryResponseV1) *NullableHasKeychainEntryResponseV1 { - return &NullableHasKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go deleted file mode 100644 index 512339208d..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryRequestV1{} - -// SetKeychainEntryRequestV1 struct for SetKeychainEntryRequestV1 -type SetKeychainEntryRequestV1 struct { - // The key for the entry to set on the keychain. - Key string `json:"key"` - // The value that will be associated with the key on the keychain. - Value string `json:"value"` -} - -// NewSetKeychainEntryRequestV1 instantiates a new SetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryRequestV1(key string, value string) *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - this.Key = key - this.Value = value - return &this -} - -// NewSetKeychainEntryRequestV1WithDefaults instantiates a new SetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryRequestV1WithDefaults() *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *SetKeychainEntryRequestV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *SetKeychainEntryRequestV1) SetValue(v string) { - o.Value = v -} - -func (o SetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableSetKeychainEntryRequestV1 struct { - value *SetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableSetKeychainEntryRequestV1) Get() *SetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableSetKeychainEntryRequestV1) Set(val *SetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryRequestV1(val *SetKeychainEntryRequestV1) *NullableSetKeychainEntryRequestV1 { - return &NullableSetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go deleted file mode 100644 index bfbc2d1a1f..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryResponseV1{} - -// SetKeychainEntryResponseV1 struct for SetKeychainEntryResponseV1 -type SetKeychainEntryResponseV1 struct { - // The key that was used to set the value on the keychain. - Key string `json:"key"` -} - -// NewSetKeychainEntryResponseV1 instantiates a new SetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryResponseV1(key string) *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewSetKeychainEntryResponseV1WithDefaults instantiates a new SetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryResponseV1WithDefaults() *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o SetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableSetKeychainEntryResponseV1 struct { - value *SetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableSetKeychainEntryResponseV1) Get() *SetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableSetKeychainEntryResponseV1) Set(val *SetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryResponseV1(val *SetKeychainEntryResponseV1) *NullableSetKeychainEntryResponseV1 { - return &NullableSetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 626bd2891e..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 6933479ebb..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-keychain-azure-kv - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-keychain-azure-kv_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeleteKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeleteKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService HasKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.HasKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index c5d73582fb..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-azure-kv - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/json/openapi.json b/packages/cactus-plugin-keychain-azure-kv/src/main/json/openapi.json deleted file mode 100644 index 92adfe407d..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/json/openapi.json +++ /dev/null @@ -1,408 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus - Keychain API", - "description": "Contains/describes the Keychain API types/paths for Hyperledger Cactus.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "GetSecretRequest": { - "type": "string", - "nullable": false - }, - "GetSecretResponse": { - "type": "string", - "nullable": false - }, - "GetKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to get from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "GetKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "value"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to retrieve the value from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value associated with the requested key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryRequestV1": { - "type": "object", - "required": ["key", "value"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to set on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value that will be associated with the key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to set the value on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to check the presence of on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was deleted from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key to check for presence in the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "isPresent", "checkedAt"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to check the presence of the value in the entry store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "checkedAt": { - "type": "string", - "description": "Date and time encoded as JSON when the presence check was performed by the plugin backend.", - "nullable": false - }, - "isPresent": { - "type": "boolean", - "description": "The boolean true or false indicating the presence or absence of an entry under 'key'.", - "nullable": false - } - } - } - }, - "requestBodies": { - "keychain_get_entry_request_body": { - "description": "Request body to obtain a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryRequestV1" - } - } - } - }, - "keychain_set_entry_request_body": { - "description": "Request body to write/update a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryRequestV1" - } - } - } - }, - "keychain_delete_entry_request_body": { - "description": "Request body to delete a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryRequestV1" - } - } - } - }, - "keychain_has_entry_request_body": { - "description": "Request body for checking a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryRequestV1" - } - } - } - } - }, - "responses": { - "keychain_get_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryResponseV1" - } - } - } - }, - "keychain_get_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_get_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_get_entry_404": { - "description": "A keychain item with the specified key was not found." - }, - "keychain_get_entry_500": { - "description": "Unexpected error." - }, - "keychain_set_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryResponseV1" - } - } - } - }, - "keychain_set_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_set_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_set_entry_500": { - "description": "Unexpected error." - }, - "keychain_delete_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryResponseV1" - } - } - } - }, - "keychain_delete_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_delete_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_delete_entry_500": { - "description": "Unexpected error." - }, - "keychain_has_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryResponseV1" - } - } - } - }, - "keychain_has_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_has_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_has_entry_500": { - "description": "Unexpected error." - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_delete_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_delete_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_delete_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_delete_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_delete_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Checks that an entry exists under a key on the keychain backend", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_has_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_has_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_has_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_has_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_has_entry_500" - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/json/openapi.tpl.json b/packages/cactus-plugin-keychain-azure-kv/src/main/json/openapi.tpl.json deleted file mode 100644 index e51d0c93e1..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus - Keychain API", - "description": "Contains/describes the Keychain API types/paths for Hyperledger Cactus.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "GetSecretRequest": { - "type": "string", - "nullable": false - }, - "GetSecretResponse": { - "type": "string", - "nullable": false - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_delete_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Checks that an entry exists under a key on the keychain backend", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_has_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_500" - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 15e43f61f3..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,31 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 72bf6eacf4..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**deleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry | Deletes a value under a key on the keychain backend. -*DefaultApi* | [**getKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**hasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry | Checks that an entry exists under a key on the keychain backend -*DefaultApi* | [**setKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry | Sets a value under a key on the keychain backend. - - - -## Documentation for Models - - - [org.openapitools.client.models.DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [org.openapitools.client.models.DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [org.openapitools.client.models.GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [org.openapitools.client.models.HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [org.openapitools.client.models.HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [org.openapitools.client.models.SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index 68226347ec..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,346 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.DeleteKeychainEntryRequestV1 -import org.openapitools.client.models.DeleteKeychainEntryResponseV1 -import org.openapitools.client.models.GetKeychainEntryRequestV1 -import org.openapitools.client.models.GetKeychainEntryResponseV1 -import org.openapitools.client.models.HasKeychainEntryRequestV1 -import org.openapitools.client.models.HasKeychainEntryResponseV1 -import org.openapitools.client.models.SetKeychainEntryRequestV1 -import org.openapitools.client.models.SetKeychainEntryResponseV1 - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Deletes a value under a key on the keychain backend. - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return DeleteKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : DeleteKeychainEntryResponseV1 { - val localVarResponse = deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DeleteKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Deletes a value under a key on the keychain backend. - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation deleteKeychainEntryV1 - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return RequestConfig - */ - fun deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = deleteKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return GetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : GetKeychainEntryResponseV1 { - val localVarResponse = getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getKeychainEntryV1 - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return RequestConfig - */ - fun getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = getKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Checks that an entry exists under a key on the keychain backend - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return HasKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : HasKeychainEntryResponseV1 { - val localVarResponse = hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as HasKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Checks that an entry exists under a key on the keychain backend - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation hasKeychainEntryV1 - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return RequestConfig - */ - fun hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = hasKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return SetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : SetKeychainEntryResponseV1 { - val localVarResponse = setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as SetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation setKeychainEntryV1 - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return RequestConfig - */ - fun setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = setKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt deleted file mode 100644 index 58a98174cf..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to check the presence of on the keychain. - */ - - -data class DeleteKeychainEntryRequestV1 ( - - /* The key for the entry to check the presence of on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt deleted file mode 100644 index 7b8b874e3d..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was deleted from the keychain. - */ - - -data class DeleteKeychainEntryResponseV1 ( - - /* The key that was deleted from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt deleted file mode 100644 index ea1d0da587..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to get from the keychain. - */ - - -data class GetKeychainEntryRequestV1 ( - - /* The key for the entry to get from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt deleted file mode 100644 index 21b9a38b46..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to retrieve the value from the keychain. - * @param `value` The value associated with the requested key on the keychain. - */ - - -data class GetKeychainEntryResponseV1 ( - - /* The key that was used to retrieve the value from the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value associated with the requested key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt deleted file mode 100644 index c3055c3414..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key to check for presence in the keychain. - */ - - -data class HasKeychainEntryRequestV1 ( - - /* The key to check for presence in the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt deleted file mode 100644 index 6345c51831..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to check the presence of the value in the entry store. - * @param checkedAt Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @param isPresent The boolean true or false indicating the presence or absence of an entry under 'key'. - */ - - -data class HasKeychainEntryResponseV1 ( - - /* The key that was used to check the presence of the value in the entry store. */ - @Json(name = "key") - val key: kotlin.String, - - /* Date and time encoded as JSON when the presence check was performed by the plugin backend. */ - @Json(name = "checkedAt") - val checkedAt: kotlin.String, - - /* The boolean true or false indicating the presence or absence of an entry under 'key'. */ - @Json(name = "isPresent") - val isPresent: kotlin.Boolean - -) - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt deleted file mode 100644 index d016fc72e6..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to set on the keychain. - * @param `value` The value that will be associated with the key on the keychain. - */ - - -data class SetKeychainEntryRequestV1 ( - - /* The key for the entry to set on the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value that will be associated with the key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt deleted file mode 100644 index 3f7624cd59..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to set the value on the keychain. - */ - - -data class SetKeychainEntryResponseV1 ( - - /* The key that was used to set the value on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 7a00e4e1f1..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,468 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface DeleteKeychainEntryRequestV1 - */ -export interface DeleteKeychainEntryRequestV1 { - /** - * The key for the entry to check the presence of on the keychain. - * @type {string} - * @memberof DeleteKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface DeleteKeychainEntryResponseV1 - */ -export interface DeleteKeychainEntryResponseV1 { - /** - * The key that was deleted from the keychain. - * @type {string} - * @memberof DeleteKeychainEntryResponseV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryRequestV1 - */ -export interface GetKeychainEntryRequestV1 { - /** - * The key for the entry to get from the keychain. - * @type {string} - * @memberof GetKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryResponseV1 - */ -export interface GetKeychainEntryResponseV1 { - /** - * The key that was used to retrieve the value from the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'key': string; - /** - * The value associated with the requested key on the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'value': string; -} -/** - * - * @export - * @interface HasKeychainEntryRequestV1 - */ -export interface HasKeychainEntryRequestV1 { - /** - * The key to check for presence in the keychain. - * @type {string} - * @memberof HasKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface HasKeychainEntryResponseV1 - */ -export interface HasKeychainEntryResponseV1 { - /** - * The key that was used to check the presence of the value in the entry store. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'key': string; - /** - * Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'checkedAt': string; - /** - * The boolean true or false indicating the presence or absence of an entry under \'key\'. - * @type {boolean} - * @memberof HasKeychainEntryResponseV1 - */ - 'isPresent': boolean; -} -/** - * - * @export - * @interface SetKeychainEntryRequestV1 - */ -export interface SetKeychainEntryRequestV1 { - /** - * The key for the entry to set on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'key': string; - /** - * The value that will be associated with the key on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'value': string; -} -/** - * - * @export - * @interface SetKeychainEntryResponseV1 - */ -export interface SetKeychainEntryResponseV1 { - /** - * The key that was used to set the value on the keychain. - * @type {string} - * @memberof SetKeychainEntryResponseV1 - */ - 'key': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deletes a value under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1: async (deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteKeychainEntryRequestV1' is not null or undefined - assertParamExists('deleteKeychainEntryV1', 'deleteKeychainEntryRequestV1', deleteKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1: async (getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getKeychainEntryRequestV1' is not null or undefined - assertParamExists('getKeychainEntryV1', 'getKeychainEntryRequestV1', getKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1: async (hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'hasKeychainEntryRequestV1' is not null or undefined - assertParamExists('hasKeychainEntryV1', 'hasKeychainEntryRequestV1', hasKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(hasKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1: async (setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'setKeychainEntryRequestV1' is not null or undefined - assertParamExists('setKeychainEntryV1', 'setKeychainEntryRequestV1', setKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(setKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deletes a value under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getKeychainEntryV1(getKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.hasKeychainEntryV1(hasKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.setKeychainEntryV1(setKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deletes a value under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deletes a value under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index e494b76932..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 61ef9f2a15..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index d36cc56c83..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 434478c164..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/index.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/index.web.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/index.web.ts deleted file mode 100644 index bdf54028d2..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-factory-keychain.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-factory-keychain.ts deleted file mode 100644 index 4173789c42..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-factory-keychain.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Checks } from "@hyperledger/cactus-common"; -import { - IPluginFactoryOptions, - IPluginKeychain, - PluginFactory, - PluginImportType, -} from "@hyperledger/cactus-core-api"; -import { - IPluginKeychainAzureKvOptions, - PluginKeychainAzureKv, -} from "./plugin-keychain-azure-kv"; - -export class PluginFactoryKeychain extends PluginFactory< - IPluginKeychain, - IPluginKeychainAzureKvOptions, - IPluginFactoryOptions -> { - async create(options: any): Promise { - const fnTag = "PluginFactoryKeychain#create()"; - - const { pluginImportType } = this.options; - Checks.truthy(options, `${fnTag}:options`); - if (pluginImportType === PluginImportType.Local) { - return new PluginKeychainAzureKv(options); - } else { - throw new Error(`${fnTag} No PluginImportType: ${pluginImportType}`); - } - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-keychain-azure-kv.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-keychain-azure-kv.ts deleted file mode 100644 index 55fa1633a8..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-keychain-azure-kv.ts +++ /dev/null @@ -1,245 +0,0 @@ -import type { Express } from "express"; - -import OAS from "../json/openapi.json"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - ICactusPlugin, - ICactusPluginOptions, - IPluginKeychain, - IPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import { SetKeychainEntryEndpoint } from "./web-services/set-keychain-entry-endpoint"; -import { GetKeychainEntryEndpoint } from "./web-services/get-keychain-entry-endpoint"; -import { DeleteKeychainEntryEndpoint } from "./web-services/delete-keychain-entry-endpoint"; - -import { KeyVaultSecret, SecretClient } from "@azure/keyvault-secrets"; -import { - UsernamePasswordCredential, - DefaultAzureCredential, -} from "@azure/identity"; -import { HasKeychainEntryEndpoint } from "./web-services/has-keychain-entry-endpoint"; - -// TODO: Writing the getExpressRequestHandler() method for - -export enum AzureCredentialType { - LocalFile = "LOCAL_FILE", - InMemory = "IN_MEMORY", -} - -export interface IAzureInMemoryCredentials { - azureTenantId: string; - azureClientId: string; - azureUsername: string; - azurePassword: string; -} - -export interface IPluginKeychainAzureKvOptions extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - keychainId: string; - instanceId: string; - azureEndpoint: string; - azureCredentialType?: AzureCredentialType; - azureInMemoryCredentials?: IAzureInMemoryCredentials; - backend?: SecretClient; -} - -export class PluginKeychainAzureKv - implements ICactusPlugin, IPluginWebService, IPluginKeychain -{ - public static readonly CLASS_NAME = "PluginKeychainAzureKv"; - - readonly vaultUrl: string; - private readonly log: Logger; - private readonly instanceId: string; - private endpoints: IWebServiceEndpoint[] | undefined; - private azureKvClient: SecretClient; - - public get className(): string { - return PluginKeychainAzureKv.CLASS_NAME; - } - - constructor(public readonly opts: IPluginKeychainAzureKvOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.keychainId, `${fnTag} arg options.keychainId`); - Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); - Checks.nonBlankString(opts.keychainId, `${fnTag} options.keychainId`); - Checks.nonBlankString(opts.azureEndpoint, `${fnTag} options.azureEndpoint`); - if ( - opts.azureCredentialType && - opts.azureInMemoryCredentials && - opts.azureCredentialType == AzureCredentialType.InMemory - ) { - Checks.nonBlankString( - opts.azureInMemoryCredentials.azureTenantId, - `${fnTag} opts.azureInMemoryCredentials.azureTenantId`, - ); - Checks.nonBlankString( - opts.azureInMemoryCredentials.azureClientId, - `${fnTag} opts.azureInMemoryCredentials.azureClientId`, - ); - Checks.nonBlankString( - opts.azureInMemoryCredentials.azureUsername, - `${fnTag} opts.azureInMemoryCredentials.azureUsername`, - ); - Checks.nonBlankString( - opts.azureInMemoryCredentials.azurePassword, - `${fnTag} opts.azureInMemoryCredentials.azurePassword`, - ); - } - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = this.opts.instanceId; - this.vaultUrl = this.opts.azureEndpoint; - - if (opts.backend) { - this.azureKvClient = opts.backend; - } else if ( - !opts.backend && - opts.azureCredentialType == AzureCredentialType.InMemory && - opts.azureInMemoryCredentials - ) { - const azureCredentials = new UsernamePasswordCredential( - opts.azureInMemoryCredentials.azureTenantId, - opts.azureInMemoryCredentials.azureClientId, - opts.azureInMemoryCredentials.azureUsername, - opts.azureInMemoryCredentials.azurePassword, - ); - this.azureKvClient = new SecretClient(this.vaultUrl, azureCredentials); - } else { - const azureCredentials = new DefaultAzureCredential(); - this.azureKvClient = new SecretClient(this.vaultUrl, azureCredentials); - } - - this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const endpoints: IWebServiceEndpoint[] = [ - new SetKeychainEntryEndpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - new GetKeychainEntryEndpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - new DeleteKeychainEntryEndpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - new HasKeychainEntryEndpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - ]; - - // TODO: Writing the getExpressRequestHandler() method for - // GetKeychainEntryEndpointV1 and SetKeychainEntryEndpointV1 - - // { - // const ep = new GetKeychainEntryEndpointV1({ - // logLevel: this.opts.logLevel, - // }); - // ep.registerExpress(expressApp); - // endpoints.push(ep); - // } - // { - // const ep = new SetKeychainEntryEndpointV1({ - // logLevel: this.opts.logLevel, - // }); - // ep.registerExpress(expressApp); - // endpoints.push(ep); - // } - this.endpoints = endpoints; - - return endpoints; - } - - public async shutdown(): Promise { - throw new Error("Method not implemented."); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getKeychainId(): string { - return this.opts.keychainId; - } - - public async onPluginInit(): Promise { - return; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-keychain-vault`; - } - - public getEncryptionAlgorithm(): string { - return null as unknown as string; - } - - public getAzureKvClient(): SecretClient { - return this.azureKvClient; - } - - async get(key: string): Promise { - const keyVaultSecret: KeyVaultSecret = - await this.azureKvClient.getSecret(key); - if (keyVaultSecret) { - const result = keyVaultSecret.value; - return result as string; - } else { - throw new Error(`${key} secret not found`); - } - } - - /** - * Detects the presence of a key by trying to read it and then - * observing whether an HTTP 404 NOT FOUND error is returned or - * not and deciding whether the keychain has the entry ot not - * based on this. - */ - - async has(key: string): Promise { - const keyVaultSecret = await this.azureKvClient.getSecret(key); - if (keyVaultSecret) { - return true; - } else { - return false; - } - } - - async set(key: string, value: T): Promise { - await this.azureKvClient.setSecret(key, value as unknown as string); - } - - async delete(key: string): Promise { - await this.azureKvClient.beginDeleteSecret(key); - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/public-api.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/public-api.ts deleted file mode 100644 index 70b45e0015..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/public-api.ts +++ /dev/null @@ -1,18 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; - -import { PluginFactoryKeychain } from "./plugin-factory-keychain"; -export { PluginFactoryKeychain } from "./plugin-factory-keychain"; - -export { - IPluginKeychainAzureKvOptions, - PluginKeychainAzureKv, - AzureCredentialType, -} from "./plugin-keychain-azure-kv"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryKeychain(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/delete-keychain-entry-endpoint.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/delete-keychain-entry-endpoint.ts deleted file mode 100644 index 1431b4b25f..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/delete-keychain-entry-endpoint.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginKeychainAzureKv } from "../plugin-keychain-azure-kv"; - -import OAS from "../../json/openapi.json"; -import { DeleteKeychainEntryRequestV1 } from "../generated/openapi/typescript-axios"; - -export interface IDeleteKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainAzureKv; -} - -export class DeleteKeychainEntryEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeleteKeychainEntryEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeleteKeychainEntryEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeleteKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/delete-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const { key } = req.body as DeleteKeychainEntryRequestV1; - const resBody = await this.options.connector.delete(key); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/get-keychain-entry-endpoint.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/get-keychain-entry-endpoint.ts deleted file mode 100644 index 1a78260425..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/get-keychain-entry-endpoint.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginKeychainAzureKv } from "../plugin-keychain-azure-kv"; - -import OAS from "../../json/openapi.json"; -import { GetKeychainEntryRequestV1 } from "../generated/openapi/typescript-axios"; - -export interface IGetKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainAzureKv; -} - -export class GetKeychainEntryEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetKeychainEntryEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return GetKeychainEntryEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/get-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const { key } = req.body as GetKeychainEntryRequestV1; - try { - const value = await this.options.connector.get(key); - res.json({ - key, - value, - }); - } catch (ex) { - if (ex?.message?.includes(`${key} secret not found`)) { - res.status(404).json({ - key, - error: ex?.stack || ex?.message, - }); - } else { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/has-keychain-entry-endpoint.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/has-keychain-entry-endpoint.ts deleted file mode 100644 index 97cd893e63..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/has-keychain-entry-endpoint.ts +++ /dev/null @@ -1,110 +0,0 @@ -import type { Express, Response, Request } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - HasKeychainEntryRequestV1, - HasKeychainEntryResponseV1, - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginKeychainAzureKv } from "../plugin-keychain-azure-kv"; - -import OAS from "../../json/openapi.json"; - -export interface IHasKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainAzureKv; -} - -export class HasKeychainEntryEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "HasKeychainEntryEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return HasKeychainEntryEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IHasKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/has-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const reqBody = req.body as HasKeychainEntryRequestV1; - const { key } = reqBody; - const checkedAt = new Date().toJSON(); - const isPresent = await this.options.connector.has(key); - const resBody: HasKeychainEntryResponseV1 = { - isPresent, - key, - checkedAt, - }; - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/set-keychain-entry-endpoint.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/set-keychain-entry-endpoint.ts deleted file mode 100644 index 63856c47e2..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/web-services/set-keychain-entry-endpoint.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginKeychainAzureKv } from "../plugin-keychain-azure-kv"; - -import OAS from "../../json/openapi.json"; -import { SetKeychainEntryRequestV1 } from "../generated/openapi/typescript-axios"; - -export interface ISetKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainAzureKv; -} - -export class SetKeychainEntryEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "SetKeychainEntryEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return SetKeychainEntryEndpoint.CLASS_NAME; - } - - constructor(public readonly options: ISetKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-azure-kv/set-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const { key, value } = req.body as SetKeychainEntryRequestV1; - const resBody = await this.options.connector.set(key, value); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/test/typescript/integration/plugin-keychain-azure-kv.test.ts b/packages/cactus-plugin-keychain-azure-kv/src/test/typescript/integration/plugin-keychain-azure-kv.test.ts deleted file mode 100644 index 7a4dd74e43..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/test/typescript/integration/plugin-keychain-azure-kv.test.ts +++ /dev/null @@ -1,145 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; - -import test, { Test } from "tape-promise/tape"; - -import express from "express"; -import bodyParser from "body-parser"; -import { v4 as uuidv4 } from "uuid"; - -import { IListenOptions } from "@hyperledger/cactus-common"; -import { LogLevelDesc, Servers } from "@hyperledger/cactus-common"; - -import { - Configuration, - DefaultApi as KeychainAzureKvApi, - IPluginKeychainAzureKvOptions, - PluginKeychainAzureKv, -} from "../../../main/typescript/public-api"; - -import { SecretClientMock } from "../mock/plugin-keychain-azure-kv-mock"; - -const logLevel: LogLevelDesc = "TRACE"; - -test("get,set,has,delete alters state as expected for AzureCredentialType.InMemory", async (t: Test) => { - const options: IPluginKeychainAzureKvOptions = { - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel: logLevel, - azureEndpoint: "testEndpoint", - backend: new SecretClientMock({ - azureKvUrl: "testUrl", - logLevel: logLevel, - }), - }; - const plugin = new PluginKeychainAzureKv(options); - - t.equal(plugin.getKeychainId(), options.keychainId, "Keychain ID set OK"); - t.equal(plugin.getInstanceId(), options.instanceId, "Instance ID set OK"); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const apiClient = new KeychainAzureKvApi(configuration); - - await plugin.registerWebServices(expressApp); - - const key = uuidv4(); - const value = uuidv4(); - - const res1 = await apiClient.hasKeychainEntryV1({ key }); - t.true(res1.status >= 200, "res1.status >= 200 OK"); - t.true(res1.status < 300, "res1.status < 300 OK"); - - // FIXME: make it so that the hasKeychainEntryV1 endpoint returns the - // response object as defined by the openapi.json in core-api - // (remember that we have a pending pull request for applying those changes - // in the main line so there's a dependency between pull requests here at play) - t.ok(res1.data, "res1.data truthy OK"); - t.false(res1.data.isPresent, "res1.data.isPresent === false OK"); - t.ok(res1.data.checkedAt, "res1.data.checkedAt truthy OK"); - t.equal(res1.data.key, key, "res1.data.key === key OK"); - - const res2 = await apiClient.setKeychainEntryV1({ key, value }); - t.true(res2.status >= 200, "res2.status >= 200 OK"); - t.true(res2.status < 300, "res2.status < 300 OK"); - t.notOk(res2.data, "res2.data truthy OK"); - - // const hasAfter = await plugin.has(key); - // t.true(hasAfter, "hasAfter === true OK"); - - const res3 = await apiClient.hasKeychainEntryV1({ key }); - t.true(res3.status >= 200, "res3.status >= 200 OK"); - t.true(res3.status < 300, "res3.status < 300 OK"); - - // FIXME: make it so that the hasKeychainEntryV1 endpoint returns the - // response object as defined by the openapi.json in core-api - // (remember that we have a pending pull request for applying those changes - // in the main line so there's a dependency between pull requests here at play) - t.ok(res3.data, "res3.data truthy OK"); - t.true(res3.data.isPresent, "res3.data.isPresent === true OK"); - t.ok(res3.data.checkedAt, "res3.data.checkedAt truthy OK"); - t.equal(res3.data.key, key, "res3.data.key === key OK"); - - const res4 = await apiClient.getKeychainEntryV1({ key }); - t.true(res4.status >= 200, "res4.status >= 200 OK"); - t.true(res4.status < 300, "res4.status < 300 OK"); - t.ok(res4.data, "res4.data truthy OK"); - t.equal(res4.data.value, value, "res4.data.value === value OK"); - - // await plugin.delete(key); - - const res5 = await apiClient.deleteKeychainEntryV1({ key }); - t.true(res5.status >= 200, "res5.status >= 200 OK"); - t.true(res5.status < 300, "res5.status < 300 OK"); - t.notOk(res5.data, "res5.data falsy OK"); - - const res6 = await apiClient.hasKeychainEntryV1({ key }); - t.true(res6.status >= 200, "res6.status >= 200 OK"); - t.true(res6.status < 300, "res6.status < 300 OK"); - - // FIXME: make it so that the hasKeychainEntryV1 endpoint returns the - // response object as defined by the openapi.json in core-api - // (remember that we have a pending pull request for applying those changes - // in the main line so there's a dependency between pull requests here at play) - t.ok(res6.data, "res6.data truthy OK"); - t.false(res6.data.isPresent, "res6.data.isPresent === false OK"); - t.ok(res6.data.checkedAt, "res6.data.checkedAt truthy OK"); - t.equal(res6.data.key, key, "res6.data.key === key OK"); - - // const valueAfterDelete = plugin.get(key); - // const regExp = new RegExp(/secret not found*/); - // const rejectMsg = "valueAfterDelete === throws OK"; - // await t.rejects(valueAfterDelete, regExp, rejectMsg); - - try { - await apiClient.getKeychainEntryV1({ key }); - t.fail( - "Failing because getKeychainEntryV1 did not throw when called with non-existent key.", - ); - } catch (ex) { - t.ok(ex, "res7 -> ex truthy"); - const res7 = ex.response; - t.equal(res7.status, 404, "res7.status === 404 OK"); - t.ok(res7.data, "res7.data truthy OK"); - t.ok(res7.data.error, "res7.data.error truthy OK"); - t.equal(typeof res7.data.error, "string", "res7.data.error truthy OK"); - t.true( - res7.data.error.includes(`${key} secret not found`), - "res7.data.error contains legible error message about missing key OK", - ); - } - - t.end(); -}); diff --git a/packages/cactus-plugin-keychain-azure-kv/src/test/typescript/mock/plugin-keychain-azure-kv-mock.ts b/packages/cactus-plugin-keychain-azure-kv/src/test/typescript/mock/plugin-keychain-azure-kv-mock.ts deleted file mode 100644 index 07eb574a30..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/test/typescript/mock/plugin-keychain-azure-kv-mock.ts +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This class mocks the SecretClient class of "@azure/keyvault-secrets" library - * by overriding the SecretClient class methods and storing the secrets In-Memory - * TO DO: This class shall be replaced with actual usage of SecretClient class in - * the main class located at packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-keychain-azure-kv.ts - */ -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { - SecretClient, - KeyVaultSecret, - SecretProperties, - PollerLike, - PollOperationState, - DeletedSecret, - PagedAsyncIterableIterator, -} from "@azure/keyvault-secrets"; - -export interface ISecretClientMock { - azureKvUrl: string; - logLevel?: LogLevelDesc; -} - -export class SecretClientMock implements SecretClient { - public static readonly CLASS_NAME = "SecretClientMock"; - private readonly log: Logger; - readonly vaultUrl: string; - private readonly secrets: Map; - - public get className(): string { - return SecretClientMock.CLASS_NAME; - } - - constructor(public readonly options: ISecretClientMock) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.vaultUrl = this.options.azureKvUrl; - this.secrets = new Map(); - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - async setSecret(secretName: string, value: string): Promise { - this.secrets.set(secretName, value); - const secretProperties: SecretProperties = { - vaultUrl: this.vaultUrl, - name: secretName, - }; - const keyVaultSecret: KeyVaultSecret = { - properties: secretProperties, - name: secretName, - }; - return keyVaultSecret; - } - - async beginDeleteSecret( - name: string, - ): Promise, DeletedSecret>> { - this.secrets.delete(name); - const secretProperties = { - vaultUrl: this.vaultUrl, - name: name, - } as SecretProperties; - const deletedSecret = { - properties: secretProperties, - } as DeletedSecret; - const pollOperationsState = - deletedSecret as PollOperationState; - const pollerLike = pollOperationsState as PollerLike< - PollOperationState, - DeletedSecret - >; - return pollerLike; - } - - async updateSecretProperties(): Promise { - throw new Error("Method not implemented."); - } - - async getSecret(secretName: string): Promise { - const result = this.secrets.get(secretName)?.toString(); - if (result == undefined) { - return null as unknown as KeyVaultSecret; - } else { - const secretProperties: SecretProperties = { - vaultUrl: this.vaultUrl, - name: secretName, - }; - const keyVaultSecret: KeyVaultSecret = { - properties: secretProperties, - name: secretName, - value: result, - }; - return keyVaultSecret; - } - } - - async hasSecret(secretName: string): Promise { - const result = this.secrets.has(secretName); - return result; - } - - async getDeletedSecret(): Promise { - throw new Error("Method not implemented"); - } - - async purgeDeletedSecret(): Promise { - throw new Error("Method not implemented"); - } - - async beginRecoverDeletedSecret(): Promise< - PollerLike, SecretProperties> - > { - throw new Error("Method not implemented"); - } - - async backupSecret(): Promise { - throw new Error("Method not implemented"); - } - - async restoreSecretBackup(): Promise { - throw new Error("Method not implemented"); - } - - listPropertiesOfSecretVersions(): PagedAsyncIterableIterator { - throw new Error("Method not implemented"); - } - - listPropertiesOfSecrets(): PagedAsyncIterableIterator { - throw new Error("Method not implemented"); - } - - listDeletedSecrets(): PagedAsyncIterableIterator { - throw new Error("Method not implemented"); - } -} diff --git a/packages/cactus-plugin-keychain-azure-kv/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-keychain-azure-kv/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-keychain-azure-kv/tsconfig.json b/packages/cactus-plugin-keychain-azure-kv/tsconfig.json deleted file mode 100644 index 7b6c3a08bf..0000000000 --- a/packages/cactus-plugin-keychain-azure-kv/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-keychain-azure-kv.tsbuildinfo" - }, - "include": [ - "./src", - "**/openapi.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-google-sm/CHANGELOG.md b/packages/cactus-plugin-keychain-google-sm/CHANGELOG.md deleted file mode 100644 index 660a39411d..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/CHANGELOG.md +++ /dev/null @@ -1,150 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **cmd-api-server:** fix CVE-2023-36665 protobufjs try 2 ([4e8b553](https://github.com/hyperledger/cacti/commit/4e8b5534d6a86c856768c0b47af794d66304f90d)), closes [#2682](https://github.com/hyperledger/cacti/issues/2682) -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -### Bug Fixes - -* openapi validation for keychain-google-sm plugin ([45f8c7c](https://github.com/hyperledger/cactus/commit/45f8c7c007e604b0fe54af6cba888eaaff15519b)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -### Features - -* **keychain-google-sm:** complete request handler and endpoints ([9c7bab5](https://github.com/hyperledger/cactus/commit/9c7bab5b06c7081421bcbfa1ae6aa8a3577a917e)), closes [#1097](https://github.com/hyperledger/cactus/issues/1097) [#1349](https://github.com/hyperledger/cactus/issues/1349) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-google-sm - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Features - -* **google-sm:** added keychain plugin for google secret manager ([1419b2c](https://github.com/hyperledger/cactus/commit/1419b2c8c1b12a08e940ba4f0ff824420d88c233)), closes [#983](https://github.com/hyperledger/cactus/issues/983) diff --git a/packages/cactus-plugin-keychain-google-sm/README.md b/packages/cactus-plugin-keychain-google-sm/README.md deleted file mode 100644 index a7fcadb125..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@hyperledger/cactus-plugin-keychain-google-sm` - -# TO-DO \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-google-sm/openapitools.json b/packages/cactus-plugin-keychain-google-sm/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/package.json b/packages/cactus-plugin-keychain-google-sm/package.json deleted file mode 100644 index 78b899198f..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-keychain-google-sm", - "version": "2.0.0", - "description": "A keychain implementation storing its entries in Azure key vault.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-keychain-google-sm.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@google-cloud/secret-manager": "5.0.1", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "http-status-codes": "2.1.4", - "typescript-optional": "2.0.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/request": "2.48.7", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "google-gax": "4.0.5", - "internal-ip": "6.2.0", - "openapi-types": "12.1.3" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-keychain-google-sm.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-keychain-google-sm.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 28a644e272..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,18 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_delete_keychain_entry_request_v1.go -model_delete_keychain_entry_response_v1.go -model_get_keychain_entry_request_v1.go -model_get_keychain_entry_response_v1.go -model_has_keychain_entry_request_v1.go -model_has_keychain_entry_response_v1.go -model_set_keychain_entry_request_v1.go -model_set_keychain_entry_response_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index b4aa329cf3..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# Go API client for cactus-plugin-keychain-google-sm - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-keychain-google-sm "github.com/hyperledger/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-google-sm.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-google-sm.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-google-sm.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-keychain-google-sm.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry | Deletes an entry under a key on the keychain backend. -*DefaultApi* | [**GetKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**HasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry | Checks that an entry exists under a key on the keychain backend. -*DefaultApi* | [**SetKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry | Sets a value under a key on the keychain backend. - - -## Documentation For Models - - - [DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 6bb146205d..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,324 +0,0 @@ -openapi: 3.0.3 -info: - description: Contains/describes the Keychain API types/paths for Hyperledger Cactus. - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus - Keychain API - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry: - post: - operationId: getKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_get_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "404": - description: A keychain item with the specified key was not found. - "500": - description: Unexpected error. - summary: Retrieves the contents of a keychain entry from the backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry: - post: - operationId: setKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_set_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Sets a value under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry: - post: - operationId: deleteKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_delete_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - summary: Deletes an entry under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry: - post: - operationId: hasKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_has_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Checks that an entry exists under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry - verbLowerCase: post -components: - requestBodies: - keychain_get_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryRequestV1' - description: Request body to obtain a keychain entry via its key - required: true - keychain_set_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryRequestV1' - description: Request body to write/update a keychain entry via its key - required: true - keychain_delete_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryRequestV1' - description: Request body to delete a keychain entry via its key - required: true - keychain_has_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryRequestV1' - description: Request body for checking a keychain entry via its key - required: true - responses: - keychain_get_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - keychain_get_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_get_entry_401: - description: Authorization information is missing or invalid. - keychain_get_entry_404: - description: A keychain item with the specified key was not found. - keychain_get_entry_500: - description: Unexpected error. - keychain_set_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - keychain_set_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_set_entry_401: - description: Authorization information is missing or invalid. - keychain_set_entry_500: - description: Unexpected error. - keychain_delete_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - keychain_has_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - keychain_has_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_has_entry_401: - description: Authorization information is missing or invalid. - keychain_has_entry_500: - description: Unexpected error. - schemas: - GetKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to get from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - GetKeychainEntryResponseV1: - example: - value: value - key: key - properties: - key: - description: The key that was used to retrieve the value from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value associated with the requested key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryRequestV1: - additionalProperties: false - example: - value: value - key: key - properties: - key: - description: The key for the entry to set on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value that will be associated with the key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was used to set the value on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to check the presence of on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was deleted from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key to check for presence in the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryResponseV1: - example: - checkedAt: checkedAt - isPresent: true - key: key - properties: - key: - description: The key that was used to check the presence of the value in - the entry store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - checkedAt: - description: Date and time encoded as JSON when the presence check was performed - by the plugin backend. - nullable: false - type: string - isPresent: - description: The boolean true or false indicating the presence or absence - of an entry under 'key'. - nullable: false - type: boolean - required: - - checkedAt - - isPresent - - key - type: object diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 0a30fe6fae..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,459 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeleteKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deleteKeychainEntryRequestV1 *DeleteKeychainEntryRequestV1 -} - -// Request body to delete a keychain entry via its key -func (r ApiDeleteKeychainEntryV1Request) DeleteKeychainEntryRequestV1(deleteKeychainEntryRequestV1 DeleteKeychainEntryRequestV1) ApiDeleteKeychainEntryV1Request { - r.deleteKeychainEntryRequestV1 = &deleteKeychainEntryRequestV1 - return r -} - -func (r ApiDeleteKeychainEntryV1Request) Execute() (*DeleteKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.DeleteKeychainEntryV1Execute(r) -} - -/* -DeleteKeychainEntryV1 Deletes an entry under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeleteKeychainEntryV1Request -*/ -func (a *DefaultApiService) DeleteKeychainEntryV1(ctx context.Context) ApiDeleteKeychainEntryV1Request { - return ApiDeleteKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeleteKeychainEntryResponseV1 -func (a *DefaultApiService) DeleteKeychainEntryV1Execute(r ApiDeleteKeychainEntryV1Request) (*DeleteKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeleteKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.deleteKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("deleteKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deleteKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getKeychainEntryRequestV1 *GetKeychainEntryRequestV1 -} - -// Request body to obtain a keychain entry via its key -func (r ApiGetKeychainEntryV1Request) GetKeychainEntryRequestV1(getKeychainEntryRequestV1 GetKeychainEntryRequestV1) ApiGetKeychainEntryV1Request { - r.getKeychainEntryRequestV1 = &getKeychainEntryRequestV1 - return r -} - -func (r ApiGetKeychainEntryV1Request) Execute() (*GetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.GetKeychainEntryV1Execute(r) -} - -/* -GetKeychainEntryV1 Retrieves the contents of a keychain entry from the backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetKeychainEntryV1Request -*/ -func (a *DefaultApiService) GetKeychainEntryV1(ctx context.Context) ApiGetKeychainEntryV1Request { - return ApiGetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetKeychainEntryResponseV1 -func (a *DefaultApiService) GetKeychainEntryV1Execute(r ApiGetKeychainEntryV1Request) (*GetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("getKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiHasKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - hasKeychainEntryRequestV1 *HasKeychainEntryRequestV1 -} - -// Request body for checking a keychain entry via its key -func (r ApiHasKeychainEntryV1Request) HasKeychainEntryRequestV1(hasKeychainEntryRequestV1 HasKeychainEntryRequestV1) ApiHasKeychainEntryV1Request { - r.hasKeychainEntryRequestV1 = &hasKeychainEntryRequestV1 - return r -} - -func (r ApiHasKeychainEntryV1Request) Execute() (*HasKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.HasKeychainEntryV1Execute(r) -} - -/* -HasKeychainEntryV1 Checks that an entry exists under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHasKeychainEntryV1Request -*/ -func (a *DefaultApiService) HasKeychainEntryV1(ctx context.Context) ApiHasKeychainEntryV1Request { - return ApiHasKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return HasKeychainEntryResponseV1 -func (a *DefaultApiService) HasKeychainEntryV1Execute(r ApiHasKeychainEntryV1Request) (*HasKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HasKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.HasKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.hasKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("hasKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.hasKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - setKeychainEntryRequestV1 *SetKeychainEntryRequestV1 -} - -// Request body to write/update a keychain entry via its key -func (r ApiSetKeychainEntryV1Request) SetKeychainEntryRequestV1(setKeychainEntryRequestV1 SetKeychainEntryRequestV1) ApiSetKeychainEntryV1Request { - r.setKeychainEntryRequestV1 = &setKeychainEntryRequestV1 - return r -} - -func (r ApiSetKeychainEntryV1Request) Execute() (*SetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.SetKeychainEntryV1Execute(r) -} - -/* -SetKeychainEntryV1 Sets a value under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSetKeychainEntryV1Request -*/ -func (a *DefaultApiService) SetKeychainEntryV1(ctx context.Context) ApiSetKeychainEntryV1Request { - return ApiSetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SetKeychainEntryResponseV1 -func (a *DefaultApiService) SetKeychainEntryV1Execute(r ApiSetKeychainEntryV1Request) (*SetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.setKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("setKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.setKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index f46a2d094d..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus - Keychain API API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 6a88dac5ba..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index e0709f18c1..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go deleted file mode 100644 index 81b4d99bf6..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryRequestV1{} - -// DeleteKeychainEntryRequestV1 struct for DeleteKeychainEntryRequestV1 -type DeleteKeychainEntryRequestV1 struct { - // The key for the entry to check the presence of on the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryRequestV1 instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryRequestV1(key string) *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryRequestV1WithDefaults instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryRequestV1WithDefaults() *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryRequestV1 struct { - value *DeleteKeychainEntryRequestV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryRequestV1) Get() *DeleteKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryRequestV1) Set(val *DeleteKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryRequestV1(val *DeleteKeychainEntryRequestV1) *NullableDeleteKeychainEntryRequestV1 { - return &NullableDeleteKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go deleted file mode 100644 index 0d86a264e9..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryResponseV1{} - -// DeleteKeychainEntryResponseV1 struct for DeleteKeychainEntryResponseV1 -type DeleteKeychainEntryResponseV1 struct { - // The key that was deleted from the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryResponseV1 instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryResponseV1(key string) *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryResponseV1WithDefaults instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryResponseV1WithDefaults() *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryResponseV1 struct { - value *DeleteKeychainEntryResponseV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryResponseV1) Get() *DeleteKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryResponseV1) Set(val *DeleteKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryResponseV1(val *DeleteKeychainEntryResponseV1) *NullableDeleteKeychainEntryResponseV1 { - return &NullableDeleteKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go deleted file mode 100644 index e6044a10a4..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryRequestV1{} - -// GetKeychainEntryRequestV1 struct for GetKeychainEntryRequestV1 -type GetKeychainEntryRequestV1 struct { - // The key for the entry to get from the keychain. - Key string `json:"key"` -} - -// NewGetKeychainEntryRequestV1 instantiates a new GetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryRequestV1(key string) *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewGetKeychainEntryRequestV1WithDefaults instantiates a new GetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryRequestV1WithDefaults() *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o GetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableGetKeychainEntryRequestV1 struct { - value *GetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableGetKeychainEntryRequestV1) Get() *GetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableGetKeychainEntryRequestV1) Set(val *GetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryRequestV1(val *GetKeychainEntryRequestV1) *NullableGetKeychainEntryRequestV1 { - return &NullableGetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go deleted file mode 100644 index 97b529e389..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryResponseV1{} - -// GetKeychainEntryResponseV1 struct for GetKeychainEntryResponseV1 -type GetKeychainEntryResponseV1 struct { - // The key that was used to retrieve the value from the keychain. - Key string `json:"key"` - // The value associated with the requested key on the keychain. - Value string `json:"value"` -} - -// NewGetKeychainEntryResponseV1 instantiates a new GetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryResponseV1(key string, value string) *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - this.Key = key - this.Value = value - return &this -} - -// NewGetKeychainEntryResponseV1WithDefaults instantiates a new GetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryResponseV1WithDefaults() *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *GetKeychainEntryResponseV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *GetKeychainEntryResponseV1) SetValue(v string) { - o.Value = v -} - -func (o GetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableGetKeychainEntryResponseV1 struct { - value *GetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableGetKeychainEntryResponseV1) Get() *GetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableGetKeychainEntryResponseV1) Set(val *GetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryResponseV1(val *GetKeychainEntryResponseV1) *NullableGetKeychainEntryResponseV1 { - return &NullableGetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go deleted file mode 100644 index c56f015de7..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryRequestV1{} - -// HasKeychainEntryRequestV1 struct for HasKeychainEntryRequestV1 -type HasKeychainEntryRequestV1 struct { - // The key to check for presence in the keychain. - Key string `json:"key"` -} - -// NewHasKeychainEntryRequestV1 instantiates a new HasKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryRequestV1(key string) *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewHasKeychainEntryRequestV1WithDefaults instantiates a new HasKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryRequestV1WithDefaults() *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o HasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableHasKeychainEntryRequestV1 struct { - value *HasKeychainEntryRequestV1 - isSet bool -} - -func (v NullableHasKeychainEntryRequestV1) Get() *HasKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableHasKeychainEntryRequestV1) Set(val *HasKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryRequestV1(val *HasKeychainEntryRequestV1) *NullableHasKeychainEntryRequestV1 { - return &NullableHasKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go deleted file mode 100644 index 8b9947c9ba..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryResponseV1{} - -// HasKeychainEntryResponseV1 struct for HasKeychainEntryResponseV1 -type HasKeychainEntryResponseV1 struct { - // The key that was used to check the presence of the value in the entry store. - Key string `json:"key"` - // Date and time encoded as JSON when the presence check was performed by the plugin backend. - CheckedAt string `json:"checkedAt"` - // The boolean true or false indicating the presence or absence of an entry under 'key'. - IsPresent bool `json:"isPresent"` -} - -// NewHasKeychainEntryResponseV1 instantiates a new HasKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryResponseV1(key string, checkedAt string, isPresent bool) *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - this.Key = key - this.CheckedAt = checkedAt - this.IsPresent = isPresent - return &this -} - -// NewHasKeychainEntryResponseV1WithDefaults instantiates a new HasKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryResponseV1WithDefaults() *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetCheckedAt returns the CheckedAt field value -func (o *HasKeychainEntryResponseV1) GetCheckedAt() string { - if o == nil { - var ret string - return ret - } - - return o.CheckedAt -} - -// GetCheckedAtOk returns a tuple with the CheckedAt field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetCheckedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CheckedAt, true -} - -// SetCheckedAt sets field value -func (o *HasKeychainEntryResponseV1) SetCheckedAt(v string) { - o.CheckedAt = v -} - -// GetIsPresent returns the IsPresent field value -func (o *HasKeychainEntryResponseV1) GetIsPresent() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPresent -} - -// GetIsPresentOk returns a tuple with the IsPresent field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetIsPresentOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPresent, true -} - -// SetIsPresent sets field value -func (o *HasKeychainEntryResponseV1) SetIsPresent(v bool) { - o.IsPresent = v -} - -func (o HasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["checkedAt"] = o.CheckedAt - toSerialize["isPresent"] = o.IsPresent - return toSerialize, nil -} - -type NullableHasKeychainEntryResponseV1 struct { - value *HasKeychainEntryResponseV1 - isSet bool -} - -func (v NullableHasKeychainEntryResponseV1) Get() *HasKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableHasKeychainEntryResponseV1) Set(val *HasKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryResponseV1(val *HasKeychainEntryResponseV1) *NullableHasKeychainEntryResponseV1 { - return &NullableHasKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go deleted file mode 100644 index 32aa3ee859..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryRequestV1{} - -// SetKeychainEntryRequestV1 struct for SetKeychainEntryRequestV1 -type SetKeychainEntryRequestV1 struct { - // The key for the entry to set on the keychain. - Key string `json:"key"` - // The value that will be associated with the key on the keychain. - Value string `json:"value"` -} - -// NewSetKeychainEntryRequestV1 instantiates a new SetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryRequestV1(key string, value string) *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - this.Key = key - this.Value = value - return &this -} - -// NewSetKeychainEntryRequestV1WithDefaults instantiates a new SetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryRequestV1WithDefaults() *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *SetKeychainEntryRequestV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *SetKeychainEntryRequestV1) SetValue(v string) { - o.Value = v -} - -func (o SetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableSetKeychainEntryRequestV1 struct { - value *SetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableSetKeychainEntryRequestV1) Get() *SetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableSetKeychainEntryRequestV1) Set(val *SetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryRequestV1(val *SetKeychainEntryRequestV1) *NullableSetKeychainEntryRequestV1 { - return &NullableSetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go deleted file mode 100644 index b525a3515f..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryResponseV1{} - -// SetKeychainEntryResponseV1 struct for SetKeychainEntryResponseV1 -type SetKeychainEntryResponseV1 struct { - // The key that was used to set the value on the keychain. - Key string `json:"key"` -} - -// NewSetKeychainEntryResponseV1 instantiates a new SetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryResponseV1(key string) *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewSetKeychainEntryResponseV1WithDefaults instantiates a new SetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryResponseV1WithDefaults() *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o SetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableSetKeychainEntryResponseV1 struct { - value *SetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableSetKeychainEntryResponseV1) Get() *SetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableSetKeychainEntryResponseV1) Set(val *SetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryResponseV1(val *SetKeychainEntryResponseV1) *NullableSetKeychainEntryResponseV1 { - return &NullableSetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 998f9671c6..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 5d94c59dec..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-keychain-google-sm - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-keychain-google-sm_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeleteKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeleteKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService HasKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.HasKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 1eed08cc93..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-google-sm - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/json/openapi.json b/packages/cactus-plugin-keychain-google-sm/src/main/json/openapi.json deleted file mode 100644 index f3978f9202..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/json/openapi.json +++ /dev/null @@ -1,382 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus - Keychain API", - "description": "Contains/describes the Keychain API types/paths for Hyperledger Cactus.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "GetKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to get from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "GetKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "value"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to retrieve the value from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value associated with the requested key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryRequestV1": { - "type": "object", - "required": ["key", "value"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to set on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value that will be associated with the key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to set the value on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to check the presence of on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was deleted from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key to check for presence in the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "isPresent", "checkedAt"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to check the presence of the value in the entry store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "checkedAt": { - "type": "string", - "description": "Date and time encoded as JSON when the presence check was performed by the plugin backend.", - "nullable": false - }, - "isPresent": { - "type": "boolean", - "description": "The boolean true or false indicating the presence or absence of an entry under 'key'.", - "nullable": false - } - } - } - }, - "requestBodies": { - "keychain_get_entry_request_body": { - "description": "Request body to obtain a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryRequestV1" - } - } - } - }, - "keychain_set_entry_request_body": { - "description": "Request body to write/update a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryRequestV1" - } - } - } - }, - "keychain_delete_entry_request_body": { - "description": "Request body to delete a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryRequestV1" - } - } - } - }, - "keychain_has_entry_request_body": { - "description": "Request body for checking a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryRequestV1" - } - } - } - } - }, - "responses": { - "keychain_get_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryResponseV1" - } - } - } - }, - "keychain_get_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_get_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_get_entry_404": { - "description": "A keychain item with the specified key was not found." - }, - "keychain_get_entry_500": { - "description": "Unexpected error." - }, - "keychain_set_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryResponseV1" - } - } - } - }, - "keychain_set_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_set_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_set_entry_500": { - "description": "Unexpected error." - }, - "keychain_delete_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryResponseV1" - } - } - } - }, - "keychain_has_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryResponseV1" - } - } - } - }, - "keychain_has_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_has_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_has_entry_500": { - "description": "Unexpected error." - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes an entry under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_delete_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_delete_entry_200" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Checks that an entry exists under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_has_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_has_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_has_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_has_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_has_entry_500" - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/json/openapi.tpl.json b/packages/cactus-plugin-keychain-google-sm/src/main/json/openapi.tpl.json deleted file mode 100644 index ed454e7df0..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus - Keychain API", - "description": "Contains/describes the Keychain API types/paths for Hyperledger Cactus.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": {} - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes an entry under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_delete_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_200" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Checks that an entry exists under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_has_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_500" - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 15e43f61f3..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,31 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 0f65cbda95..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**deleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry | Deletes an entry under a key on the keychain backend. -*DefaultApi* | [**getKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**hasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry | Checks that an entry exists under a key on the keychain backend. -*DefaultApi* | [**setKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry | Sets a value under a key on the keychain backend. - - - -## Documentation for Models - - - [org.openapitools.client.models.DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [org.openapitools.client.models.DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [org.openapitools.client.models.GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [org.openapitools.client.models.HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [org.openapitools.client.models.HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [org.openapitools.client.models.SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index e701c73b1b..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,346 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.DeleteKeychainEntryRequestV1 -import org.openapitools.client.models.DeleteKeychainEntryResponseV1 -import org.openapitools.client.models.GetKeychainEntryRequestV1 -import org.openapitools.client.models.GetKeychainEntryResponseV1 -import org.openapitools.client.models.HasKeychainEntryRequestV1 -import org.openapitools.client.models.HasKeychainEntryResponseV1 -import org.openapitools.client.models.SetKeychainEntryRequestV1 -import org.openapitools.client.models.SetKeychainEntryResponseV1 - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Deletes an entry under a key on the keychain backend. - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return DeleteKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : DeleteKeychainEntryResponseV1 { - val localVarResponse = deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DeleteKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Deletes an entry under a key on the keychain backend. - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation deleteKeychainEntryV1 - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return RequestConfig - */ - fun deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = deleteKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return GetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : GetKeychainEntryResponseV1 { - val localVarResponse = getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getKeychainEntryV1 - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return RequestConfig - */ - fun getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = getKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Checks that an entry exists under a key on the keychain backend. - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return HasKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : HasKeychainEntryResponseV1 { - val localVarResponse = hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as HasKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Checks that an entry exists under a key on the keychain backend. - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation hasKeychainEntryV1 - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return RequestConfig - */ - fun hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = hasKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return SetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : SetKeychainEntryResponseV1 { - val localVarResponse = setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as SetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation setKeychainEntryV1 - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return RequestConfig - */ - fun setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = setKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt deleted file mode 100644 index 58a98174cf..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to check the presence of on the keychain. - */ - - -data class DeleteKeychainEntryRequestV1 ( - - /* The key for the entry to check the presence of on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt deleted file mode 100644 index 7b8b874e3d..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was deleted from the keychain. - */ - - -data class DeleteKeychainEntryResponseV1 ( - - /* The key that was deleted from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt deleted file mode 100644 index ea1d0da587..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to get from the keychain. - */ - - -data class GetKeychainEntryRequestV1 ( - - /* The key for the entry to get from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt deleted file mode 100644 index 21b9a38b46..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to retrieve the value from the keychain. - * @param `value` The value associated with the requested key on the keychain. - */ - - -data class GetKeychainEntryResponseV1 ( - - /* The key that was used to retrieve the value from the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value associated with the requested key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt deleted file mode 100644 index c3055c3414..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key to check for presence in the keychain. - */ - - -data class HasKeychainEntryRequestV1 ( - - /* The key to check for presence in the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt deleted file mode 100644 index 6345c51831..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to check the presence of the value in the entry store. - * @param checkedAt Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @param isPresent The boolean true or false indicating the presence or absence of an entry under 'key'. - */ - - -data class HasKeychainEntryResponseV1 ( - - /* The key that was used to check the presence of the value in the entry store. */ - @Json(name = "key") - val key: kotlin.String, - - /* Date and time encoded as JSON when the presence check was performed by the plugin backend. */ - @Json(name = "checkedAt") - val checkedAt: kotlin.String, - - /* The boolean true or false indicating the presence or absence of an entry under 'key'. */ - @Json(name = "isPresent") - val isPresent: kotlin.Boolean - -) - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt deleted file mode 100644 index d016fc72e6..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to set on the keychain. - * @param `value` The value that will be associated with the key on the keychain. - */ - - -data class SetKeychainEntryRequestV1 ( - - /* The key for the entry to set on the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value that will be associated with the key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt deleted file mode 100644 index 3f7624cd59..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to set the value on the keychain. - */ - - -data class SetKeychainEntryResponseV1 ( - - /* The key that was used to set the value on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index ca17a0c49c..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,468 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface DeleteKeychainEntryRequestV1 - */ -export interface DeleteKeychainEntryRequestV1 { - /** - * The key for the entry to check the presence of on the keychain. - * @type {string} - * @memberof DeleteKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface DeleteKeychainEntryResponseV1 - */ -export interface DeleteKeychainEntryResponseV1 { - /** - * The key that was deleted from the keychain. - * @type {string} - * @memberof DeleteKeychainEntryResponseV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryRequestV1 - */ -export interface GetKeychainEntryRequestV1 { - /** - * The key for the entry to get from the keychain. - * @type {string} - * @memberof GetKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryResponseV1 - */ -export interface GetKeychainEntryResponseV1 { - /** - * The key that was used to retrieve the value from the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'key': string; - /** - * The value associated with the requested key on the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'value': string; -} -/** - * - * @export - * @interface HasKeychainEntryRequestV1 - */ -export interface HasKeychainEntryRequestV1 { - /** - * The key to check for presence in the keychain. - * @type {string} - * @memberof HasKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface HasKeychainEntryResponseV1 - */ -export interface HasKeychainEntryResponseV1 { - /** - * The key that was used to check the presence of the value in the entry store. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'key': string; - /** - * Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'checkedAt': string; - /** - * The boolean true or false indicating the presence or absence of an entry under \'key\'. - * @type {boolean} - * @memberof HasKeychainEntryResponseV1 - */ - 'isPresent': boolean; -} -/** - * - * @export - * @interface SetKeychainEntryRequestV1 - */ -export interface SetKeychainEntryRequestV1 { - /** - * The key for the entry to set on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'key': string; - /** - * The value that will be associated with the key on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'value': string; -} -/** - * - * @export - * @interface SetKeychainEntryResponseV1 - */ -export interface SetKeychainEntryResponseV1 { - /** - * The key that was used to set the value on the keychain. - * @type {string} - * @memberof SetKeychainEntryResponseV1 - */ - 'key': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1: async (deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteKeychainEntryRequestV1' is not null or undefined - assertParamExists('deleteKeychainEntryV1', 'deleteKeychainEntryRequestV1', deleteKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1: async (getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getKeychainEntryRequestV1' is not null or undefined - assertParamExists('getKeychainEntryV1', 'getKeychainEntryRequestV1', getKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend. - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1: async (hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'hasKeychainEntryRequestV1' is not null or undefined - assertParamExists('hasKeychainEntryV1', 'hasKeychainEntryRequestV1', hasKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(hasKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1: async (setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'setKeychainEntryRequestV1' is not null or undefined - assertParamExists('setKeychainEntryV1', 'setKeychainEntryRequestV1', setKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(setKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getKeychainEntryV1(getKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend. - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.hasKeychainEntryV1(hasKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.setKeychainEntryV1(setKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend. - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Checks that an entry exists under a key on the keychain backend. - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index e494b76932..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 61ef9f2a15..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index d36cc56c83..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 434478c164..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/index.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/index.web.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/index.web.ts deleted file mode 100755 index bdf54028d2..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/plugin-factory-keychain.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/plugin-factory-keychain.ts deleted file mode 100644 index de36734f15..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/plugin-factory-keychain.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; - -import { - IPluginKeychainGoogleSmOptions, - PluginKeychainGoogleSm, -} from "./plugin-keychain-google-sm"; - -export class PluginFactoryKeychain extends PluginFactory< - PluginKeychainGoogleSm, - IPluginKeychainGoogleSmOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginKeychainGoogleSmOptions = { - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel: "TRACE", - }, - ): Promise { - return new PluginKeychainGoogleSm(pluginOptions); - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/plugin-keychain-google-sm.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/plugin-keychain-google-sm.ts deleted file mode 100644 index 3b1d8ede33..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/plugin-keychain-google-sm.ts +++ /dev/null @@ -1,210 +0,0 @@ -import type { Express } from "express"; - -import OAS from "../json/openapi.json"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - ICactusPlugin, - ICactusPluginOptions, - IPluginKeychain, - IPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import { SecretManagerServiceClient } from "@google-cloud/secret-manager"; -import { SetKeychainEntryV1Endpoint } from "./webservices/set-keychain-entry-endpoint-v1"; -import { GetKeychainEntryV1Endpoint } from "./webservices/get-keychain-entry-endpoint-v1"; -import { DeleteKeychainEntryV1Endpoint } from "./webservices/delete-keychain-entry-endpoint-v1"; -import { HasKeychainEntryV1Endpoint } from "./webservices/has-keychain-entry-endpoint-v1"; - -export interface IPluginKeychainGoogleSmOptions extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - keychainId: string; - instanceId: string; - backend?: SecretManagerServiceClient; -} - -export class PluginKeychainGoogleSm - implements ICactusPlugin, IPluginWebService, IPluginKeychain -{ - public static readonly CLASS_NAME = "PluginKeychainGoogleSm"; - private readonly log: Logger; - private readonly instanceId: string; - private endpoints: IWebServiceEndpoint[] | undefined; - private googleSmClient: SecretManagerServiceClient; - - public get className(): string { - return PluginKeychainGoogleSm.CLASS_NAME; - } - - constructor(public readonly opts: IPluginKeychainGoogleSmOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.keychainId, `${fnTag} arg options.keychainId`); - Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); - Checks.nonBlankString(opts.keychainId, `${fnTag} options.keychainId`); - - if (opts.backend) { - this.googleSmClient = opts.backend; - } else { - this.googleSmClient = new SecretManagerServiceClient(); - } - this.instanceId = this.opts.instanceId; - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - //const endpoints: IWebServiceEndpoint[] = []; - const endpoints: IWebServiceEndpoint[] = [ - new SetKeychainEntryV1Endpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - new GetKeychainEntryV1Endpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - new DeleteKeychainEntryV1Endpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - new HasKeychainEntryV1Endpoint({ - connector: this, - logLevel: this.opts.logLevel, - }), - ]; - // TODO: Writing the getExpressRequestHandler() method for - // GetKeychainEntryEndpointV1 and SetKeychainEntryEndpointV1 - - // { - // const ep = new GetKeychainEntryEndpointV1({ - // logLevel: this.opts.logLevel, - // }); - // ep.registerExpress(expressApp); - // endpoints.push(ep); - // } - // { - // const ep = new SetKeychainEntryEndpointV1({ - // logLevel: this.opts.logLevel, - // }); - // ep.registerExpress(expressApp); - // endpoints.push(ep); - // } - this.endpoints = endpoints; - - return endpoints; - } - - public async shutdown(): Promise { - throw new Error("Method not implemented."); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getKeychainId(): string { - return this.opts.keychainId; - } - - public getPackageName(): string { - // TODO: Add custom validation to the CI so that package names in plugin - // code are guaranteed to be correct (e.g. matching the one in package.json) - return "@hyperledger/cactus-plugin-keychain-google-sm"; - } - - public getEncryptionAlgorithm(): string { - return "AES-256"; - } - - public async onPluginInit(): Promise { - return; - } - - public getGoogleSmClient(): SecretManagerServiceClient { - return this.googleSmClient; - } - - async get(key: string): Promise { - const accessResponse = await this.googleSmClient.getSecret({ - name: key, - }); - if (accessResponse[0]) { - const result = accessResponse[0]; - // FIXME: We need to verify if this actually works because - // based on the type definitions of the underlying library it should not. - return result as unknown as string; - } else { - throw new Error(`${key} secret not found.`); - } - } - - /** - * Detects the presence of a key by trying to read it and then - * observing whether an HTTP 404 NOT FOUND error is returned or - * not and deciding whether the keychain has the entry ot not - * based on this. - */ - async has(key: string): Promise { - const accessResponse = await this.googleSmClient.accessSecretVersion({ - name: key, - }); - if (accessResponse) { - return true; - } else { - return false; - } - } - - /** - * To implement this the key should consist of parent and secretId seperated by ? - * For example, key = "projects/my-project?my-secret" - */ - async set(key: string, value: T): Promise { - const parent = key.split("?")[0]; - const secretId = key.split("?")[1]; - const secret = await this.googleSmClient.createSecret({ - parent: parent, - secretId: secretId, - secret: { - replication: { - automatic: {}, - }, - }, - }); - await this.googleSmClient.addSecretVersion({ - parent: secret[0].name, - payload: { - data: value as unknown as string, - }, - }); - } - - async delete(key: string): Promise { - await this.googleSmClient.deleteSecret({ - name: key, - }); - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/public-api.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/public-api.ts deleted file mode 100644 index c136f4159c..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/public-api.ts +++ /dev/null @@ -1,17 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; - -import { PluginFactoryKeychain } from "./plugin-factory-keychain"; -export { PluginFactoryKeychain } from "./plugin-factory-keychain"; - -export { - IPluginKeychainGoogleSmOptions, - PluginKeychainGoogleSm, -} from "./plugin-keychain-google-sm"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryKeychain(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts deleted file mode 100644 index b3744cef02..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainGoogleSm } from "../plugin-keychain-google-sm"; - -export interface IDeleteKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainGoogleSm; -} - -export class DeleteKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeleteKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeleteKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeleteKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/delete-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.delete(reqBody.key); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts deleted file mode 100644 index cddad84417..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,107 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainGoogleSm } from "../plugin-keychain-google-sm"; - -export interface IGetKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainGoogleSm; -} - -export class GetKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return GetKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/get-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.get(reqBody.key); - res.json(resBody); - } catch (ex) { - if (ex.message.includes("secret not found")) { - res.status(404).json({ - message: "Bad request", - error: ex?.stack || ex?.message, - }); - } else { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 90099efe38..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainGoogleSm } from "../plugin-keychain-google-sm"; - -export interface IHasKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainGoogleSm; -} - -export class HasKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "HasKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return HasKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IHasKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/has-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const key = reqBody.key; - const isPresent = await this.options.connector.has(reqBody.key); - const checkedAt = new Date().toJSON(); - res.json({ key, isPresent, checkedAt }); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 5a28f46664..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainGoogleSm } from "../plugin-keychain-google-sm"; - -export interface ISetKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginKeychainGoogleSm; -} - -export class SetKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "SetKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return SetKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: ISetKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-google-sm/set-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.set( - reqBody.key, - reqBody.value, - ); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts deleted file mode 100644 index ec20125c85..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ /dev/null @@ -1,281 +0,0 @@ -import "jest-extended"; -import { randomUUID } from "node:crypto"; -import http from "http"; -import type { AddressInfo } from "net"; -import express from "express"; -import bodyParser from "body-parser"; - -import { - LogLevelDesc, - IListenOptions, - Servers, - hasKey, -} from "@hyperledger/cactus-common"; -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; -import { DeleteKeychainEntryRequestV1 } from "@hyperledger/cactus-core-api"; -import { - GetKeychainEntryRequestV1, - HasKeychainEntryRequestV1, - SetKeychainEntryRequestV1, -} from "@hyperledger/cactus-core-api"; - -import { DefaultApi as KeychainGoogleSmApi } from "../../../../main/typescript/generated/openapi/typescript-axios/index"; -import { Configuration } from "../../../../main/typescript/generated/openapi/typescript-axios/index"; - -import { SecretManagerServiceClientMock } from "../../mock/plugin-keychain-google-sm-mock"; - -import OAS from "../../../../main/json/openapi.json"; -import { - IPluginKeychainGoogleSmOptions, - PluginKeychainGoogleSm, -} from "../../../../main/typescript/plugin-keychain-google-sm"; - -const logLevel: LogLevelDesc = "TRACE"; - -describe("PluginKeychainGoogleSm", () => { - const key = `${randomUUID()}?${randomUUID()}`; - const value = randomUUID(); - - const fSet = "setKeychainEntryV1"; - const fGet = "getKeychainEntryV1"; - const fHas = "hasKeychainEntryV1"; - const fDelete = "deleteKeychainEntryV1"; - const cOk = "without bad request error"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - - const options: IPluginKeychainGoogleSmOptions = { - instanceId: randomUUID(), - keychainId: randomUUID(), - logLevel: logLevel, - backend: new SecretManagerServiceClientMock({ - logLevel: logLevel, - }), - }; - const plugin = new PluginKeychainGoogleSm(options); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - let apiClient: KeychainGoogleSmApi; - - beforeAll(async () => { - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - const configuration = new Configuration({ basePath: apiHost }); - apiClient = new KeychainGoogleSmApi(configuration); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - }); - - afterAll(async () => await Servers.shutdown(server)); - - it(` ${fSet} - ${cOk}`, async () => { - const res = await apiClient.setKeychainEntryV1({ - key, - value, - }); - expect(res.status).toEqual(200); - }); - - it(` ${fGet} - ${cOk}`, async () => { - const res = await apiClient.getKeychainEntryV1({ key }); - expect(res.status).toEqual(200); - }); - - it(` ${fHas} - ${cOk}`, async () => { - const res = await apiClient.hasKeychainEntryV1({ key }); - expect(res.status).toEqual(200); - }); - - it(` ${fDelete} - ${cOk}`, async () => { - const res = await apiClient.deleteKeychainEntryV1({ key }); - expect(res.status).toEqual(200); - }); - - it(` ${fSet} - ${cWithoutParams}`, async () => { - try { - await apiClient.setKeychainEntryV1({ - value, - } as unknown as SetKeychainEntryRequestV1); - } catch (e) { - const fields = e.response.data.map((param: unknown) => { - if (!hasKey(param, "path")) { - throw new TypeError("Expected param.path to exist."); - } - if (typeof param.path !== "string") { - throw new TypeError("Expected param.path to be string"); - } - return param.path.replace("/body/", ""); - }); - - expect(fields.includes("key")).toBeTrue(); - } - }); - - it(` ${fGet} - ${cWithoutParams}`, async () => { - try { - await apiClient.getKeychainEntryV1( - {} as unknown as GetKeychainEntryRequestV1, - ); - } catch (e) { - expect(e.response.status).toEqual(400); - const fields = e.response.data.map((param: unknown) => { - if (!hasKey(param, "path")) { - throw new TypeError("Expected param.path to exist."); - } - if (typeof param.path !== "string") { - throw new TypeError("Expected param.path to be string"); - } - return param.path.replace("/body/", ""); - }); - - expect(fields.includes("key")).toBeTrue(); - } - }); - - it(` ${fHas} - ${cWithoutParams}`, async () => { - try { - await apiClient.hasKeychainEntryV1( - {} as unknown as HasKeychainEntryRequestV1, - ); - } catch (e) { - expect(e.response.status).toEqual(400); - const fields = e.response.data.map((param: unknown) => { - if (!hasKey(param, "path")) { - throw new TypeError("Expected param.path to exist."); - } - if (typeof param.path !== "string") { - throw new TypeError("Expected param.path to be string"); - } - return param.path.replace("/body/", ""); - }); - - expect(fields.includes("key")).toBeTrue(); - } - }); - - it(` ${fDelete} - ${cWithoutParams}`, async () => { - try { - await apiClient.deleteKeychainEntryV1( - {} as unknown as DeleteKeychainEntryRequestV1, - ); - } catch (e) { - expect(e.response.status).toEqual(400); - const fields = e.response.data.map((param: unknown) => { - if (!hasKey(param, "path")) { - throw new TypeError("Expected param.path to exist."); - } - if (typeof param.path !== "string") { - throw new TypeError("Expected param.path to be string"); - } - return param.path.replace("/body/", ""); - }); - - expect(fields.includes("key")).toBeTrue(); - } - }); - - it(` ${fSet} - ${cInvalidParams}`, async () => { - try { - await apiClient.setKeychainEntryV1({ - key, - value, - fake: 4, - } as any as SetKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toEqual(400); - const fields = e.response.data.map((param: unknown) => { - if (!hasKey(param, "path")) { - throw new TypeError("Expected param.path to exist."); - } - if (typeof param.path !== "string") { - throw new TypeError("Expected param.path to be string"); - } - return param.path.replace("/body/", ""); - }); - - expect(fields.includes("fake")).toBeTrue(); - } - }); - - it(` ${fGet} - ${cInvalidParams}`, async () => { - try { - await apiClient.getKeychainEntryV1({ - key, - fake: 4, - } as unknown as GetKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toEqual(400); - const fields = e.response.data.map((param: unknown) => { - if (!hasKey(param, "path")) { - throw new TypeError("Expected param.path to exist."); - } - if (typeof param.path !== "string") { - throw new TypeError("Expected param.path to be string"); - } - return param.path.replace("/body/", ""); - }); - - expect(fields.includes("fake")).toBeTrue(); - } - }); - - it(` ${fHas} - ${cInvalidParams}`, async () => { - try { - await apiClient.hasKeychainEntryV1({ - key, - fake: 4, - } as unknown as HasKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toEqual(400); - const fields = e.response.data.map((param: unknown) => { - if (!hasKey(param, "path")) { - throw new TypeError("Expected param.path to exist."); - } - if (typeof param.path !== "string") { - throw new TypeError("Expected param.path to be string"); - } - return param.path.replace("/body/", ""); - }); - - expect(fields.includes("fake")).toBeTrue(); - } - }); - - it(` ${fDelete} - ${cInvalidParams}`, async () => { - try { - await apiClient.deleteKeychainEntryV1({ - key, - fake: 4, - } as unknown as DeleteKeychainEntryRequestV1); - } catch (e) { - expect(e.response.status).toEqual(400); - const fields = e.response.data.map((param: unknown) => { - if (!hasKey(param, "path")) { - throw new TypeError("Expected param.path to exist."); - } - if (typeof param.path !== "string") { - throw new TypeError("Expected param.path to be string"); - } - return param.path.replace("/body/", ""); - }); - - expect(fields.includes("fake")).toBeTrue(); - } - }); -}); diff --git a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts deleted file mode 100644 index 35e12289d8..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -import "jest-extended"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - IPluginFactoryOptions, - PluginImportType, -} from "@hyperledger/cactus-core-api"; -import { PluginFactoryKeychain } from "../../../main/typescript/plugin-factory-keychain"; -import { PluginKeychainGoogleSm } from "../../../main/typescript/plugin-keychain-google-sm"; -import { randomUUID } from "crypto"; - -test("get,set,has,delete alters state as expected", async () => { - const iPluginFactoryOptions: IPluginFactoryOptions = { - pluginImportType: PluginImportType.Local, - }; - - const pluginRegistry = new PluginRegistry(); - const iPluginKeychainGoogleSmOptions = { - pluginRegistry, - instanceId: randomUUID(), - keychainId: randomUUID(), - googleProfile: "true", - googleRegion: "true", - googleEndpoint: "true", - googleAccessKeyId: "true", - googleSecretAccessKey: "true", - }; - - const pluginFactoryKeychain = new PluginFactoryKeychain( - iPluginFactoryOptions, - ); - - const pluginKeychainGoogleSm = await pluginFactoryKeychain.create( - iPluginKeychainGoogleSmOptions, - ); - - expect(pluginKeychainGoogleSm instanceof PluginKeychainGoogleSm).toBeTrue(); -}); diff --git a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts deleted file mode 100644 index c46e927922..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { AddressInfo } from "node:net"; -import { randomUUID } from "node:crypto"; -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { StatusCodes } from "http-status-codes"; - -import { IListenOptions, Servers } from "@hyperledger/cactus-common"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -import { - IPluginKeychainGoogleSmOptions, - PluginKeychainGoogleSm, -} from "../../../main/typescript/public-api"; - -import { - DefaultApi as KeychainGoogleSmApi, - Configuration, -} from "../../../main/typescript/generated/openapi/typescript-axios/index"; - -import { SecretManagerServiceClientMock } from "../mock/plugin-keychain-google-sm-mock"; - -const logLevel: LogLevelDesc = "TRACE"; - -describe("IPluginKeychainGoogleSm", () => { - const options: IPluginKeychainGoogleSmOptions = { - instanceId: randomUUID(), - keychainId: randomUUID(), - logLevel: logLevel, - backend: new SecretManagerServiceClientMock({ - logLevel: logLevel, - }), - }; - const plugin = new PluginKeychainGoogleSm(options); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - let apiClient: KeychainGoogleSmApi; - - afterAll(async () => await Servers.shutdown(server)); - - beforeAll(async () => { - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - const config = new Configuration({ basePath: apiHost }); - apiClient = new KeychainGoogleSmApi(config); - await plugin.registerWebServices(expressApp); - }); - - it("get,set,has,delete alters state as expected", async () => { - expect(plugin.getKeychainId()).toEqual(options.keychainId); - expect(plugin.getInstanceId()).toEqual(options.instanceId); - - /** - * To implement this the key should consist of parent and secretId seperated by ? - * For example, key = "projects/my-project?my-secret" - */ - const key = `${randomUUID()}?${randomUUID()}`; - const value = randomUUID(); - console.log(key); - console.log(value); - - const res1 = await apiClient.hasKeychainEntryV1({ key }); - expect(res1.status >= 200).toBeTrue(); - expect(res1.status < 300).toBeTrue(); - - expect(res1.data).toBeTruthy(); - expect(res1.data.isPresent).toBeFalse(); - expect(res1.data.checkedAt).toBeTruthy(); - expect(res1.data.key).toEqual(key); - - const res2 = await apiClient.setKeychainEntryV1({ - key: key, - value: value, - }); - expect(res2.status >= 200).toBeTrue(); - expect(res2.status < 300).toBeTrue(); - expect(res2.data).toBeFalsy(); - - const res3 = await apiClient.hasKeychainEntryV1({ key }); - expect(res3.status >= 200).toBeTrue(); - expect(res3.status < 300).toBeTrue(); - expect(res3.data).toBeTruthy(); - expect(res3.data.isPresent).toBeTrue(); - expect(res3.data.checkedAt).toBeTruthy(); - expect(res3.data.key).toEqual(key); - - const res4 = await apiClient.getKeychainEntryV1({ - key: key, - }); - expect(res4.status >= 200).toBeTrue(); - expect(res4.status < 300).toBeTrue(); - expect(res4.data).toBeTruthy(); - //t.equal(res4.data.value, value, "res4.data.value === value OK"); - //add try catch code and then add what the error message should be -- because of the exception wrapping - //t.equals currently does not pass the test case - - const res5 = await apiClient.deleteKeychainEntryV1({ key }); - expect(res5.status >= 200).toBeTrue(); - expect(res5.status < 300).toBeTrue(); - expect(res5.data).toBeFalsy(); - - const res6 = await apiClient.hasKeychainEntryV1({ key }); - expect(res6.status >= 200).toBeTrue(); - expect(res6.status < 300).toBeTrue(); - expect(res6.data).toBeTruthy(); - expect(res6.data.isPresent).toBeFalse(); - expect(res6.data.checkedAt).toBeTruthy(); - expect(res6.data.key).toEqual(key); - try { - await apiClient.getKeychainEntryV1({ key }); - } catch (ex) { - expect(ex).toBeTruthy(); - expect(ex.response).toBeTruthy(); - expect(ex.response.data).toBeTruthy(); - expect(ex.response.data.error).toBeTruthy(); - expect( - ex.response.data.error.includes(`${key} secret not found`), - ).toBeTrue(); - - expect(ex.response.status).toEqual(StatusCodes.NOT_FOUND); - expect(ex.response.data.success).toBeFalsy(); - } - }); -}); diff --git a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/mock/plugin-keychain-google-sm-mock.ts b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/mock/plugin-keychain-google-sm-mock.ts deleted file mode 100644 index b44534beed..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/mock/plugin-keychain-google-sm-mock.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-types */ -import { - SecretManagerServiceClient, - protos, -} from "@google-cloud/secret-manager"; - -import type { GoogleAuth } from "google-gax"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -export interface ISecretManagerServiceClientMock { - logLevel?: LogLevelDesc; -} - -export class SecretManagerServiceClientMock extends SecretManagerServiceClient { - public static readonly CLASS_NAME = "SecretManagerServiceClientMock"; - private readonly log: Logger; - - private readonly secrets: Map; - - public get className(): string { - return SecretManagerServiceClientMock.CLASS_NAME; - } - - constructor(public readonly options: ISecretManagerServiceClientMock) { - super(); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.auth = "" as unknown as GoogleAuth; - this.innerApiCalls = "" as unknown as { [name: string]: Function }; - - this.secrets = new Map(); - this.log.info(`Created ${this.className}.`); - } - - createSecret( - request: protos.google.cloud.secretmanager.v1.ICreateSecretRequest, - ): Promise< - [ - protos.google.cloud.secretmanager.v1.ISecret, - protos.google.cloud.secretmanager.v1.ICreateSecretRequest | undefined, - {} | undefined, - ] - > { - if (request.secretId && request.parent) { - this.secrets.set(request.secretId, ""); - const result = { - name: `${request.parent}?${request.secretId}`, - }; - return [result] as unknown as Promise< - [ - protos.google.cloud.secretmanager.v1.ISecret, - protos.google.cloud.secretmanager.v1.ICreateSecretRequest | undefined, - {} | undefined, - ] - >; - } else { - throw new Error( - "Incomplete secret details. Required request.secretId and request.parent", - ); - } - } - - addSecretVersion( - request: protos.google.cloud.secretmanager.v1.IAddSecretVersionRequest, - ): Promise< - [ - protos.google.cloud.secretmanager.v1.ISecretVersion, - protos.google.cloud.secretmanager.v1.IAddSecretVersionRequest | undefined, - {} | undefined, - ] - > { - if (request.parent && request.payload && request.payload.data) { - this.secrets.set( - request.parent.split("?")[1], - request.payload.data.toString(), - ); - return [request.payload.data.toString()] as unknown as Promise< - [ - protos.google.cloud.secretmanager.v1.ISecretVersion, - ( - | protos.google.cloud.secretmanager.v1.IAddSecretVersionRequest - | undefined - ), - {} | undefined, - ] - >; - } else { - throw new Error( - "Incomplete request. Required request.parent, request.payload.data", - ); - } - } - - deleteSecret( - request: protos.google.cloud.secretmanager.v1.IDeleteSecretRequest, - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.secretmanager.v1.IDeleteSecretRequest | undefined, - {} | undefined, - ] - > { - if (request.name) { - this.secrets.delete(request.name.split("?")[1]); - } else { - throw new Error("request.name not passed"); - } - return undefined as unknown as Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.secretmanager.v1.IDeleteSecretRequest | undefined, - {} | undefined, - ] - >; - } - - accessSecretVersion( - request: protos.google.cloud.secretmanager.v1.IAccessSecretVersionRequest, - ): Promise< - [ - protos.google.cloud.secretmanager.v1.IAccessSecretVersionResponse, - ( - | protos.google.cloud.secretmanager.v1.IAccessSecretVersionRequest - | undefined - ), - {} | undefined, - ] - > { - const result = this.secrets.has(request.name?.split("?")[1] || ""); - if (result) { - return true as unknown as Promise< - [ - protos.google.cloud.secretmanager.v1.IAccessSecretVersionResponse, - ( - | protos.google.cloud.secretmanager.v1.IAccessSecretVersionRequest - | undefined - ), - {} | undefined, - ] - >; - } else { - return false as unknown as Promise< - [ - protos.google.cloud.secretmanager.v1.IAccessSecretVersionResponse, - ( - | protos.google.cloud.secretmanager.v1.IAccessSecretVersionRequest - | undefined - ), - {} | undefined, - ] - >; - } - } - - getSecret( - request: protos.google.cloud.secretmanager.v1.IGetSecretRequest, - ): Promise< - [ - protos.google.cloud.secretmanager.v1.ISecret, - protos.google.cloud.secretmanager.v1.IGetSecretRequest | undefined, - {} | undefined, - ] - > { - const result = this.secrets.get(request.name?.split("?")[1] || ""); - if (result) { - return [result] as unknown as Promise< - [ - protos.google.cloud.secretmanager.v1.ISecret, - protos.google.cloud.secretmanager.v1.IGetSecretRequest | undefined, - {} | undefined, - ] - >; - } else { - throw new Error(`${request.name || ""} secret not found.`); - } - } -} diff --git a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-keychain-google-sm/tsconfig.json b/packages/cactus-plugin-keychain-google-sm/tsconfig.json deleted file mode 100644 index b1af97f4ae..0000000000 --- a/packages/cactus-plugin-keychain-google-sm/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-keychain-google-sm.tsbuildinfo" - }, - "include": [ - "./src", - "**/openapi.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/CHANGELOG.md b/packages/cactus-plugin-keychain-memory-wasm/CHANGELOG.md deleted file mode 100644 index def52ecc34..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/CHANGELOG.md +++ /dev/null @@ -1,123 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory-wasm - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory-wasm - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory-wasm - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory-wasm - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory-wasm - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **keychain-memory-wasm:** wee_alloc is Unmaintained GHSA-rc23-xxgq-x27g ([89d5102](https://github.com/hyperledger/cactus/commit/89d5102496adfe98a542a373e805dc38ecb8f269)), closes [#2352](https://github.com/hyperledger/cactus/issues/2352) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory-wasm - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory-wasm - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory-wasm - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory-wasm - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory-wasm - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* **deps:** ensure glob-parent is above 5.1.2 - CVE-2020-28469 ([23ded0f](https://github.com/hyperledger/cactus/commit/23ded0f7095559796525bbebc45ae39e65306855)), closes [#1916](https://github.com/hyperledger/cactus/issues/1916) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* **deps:** sibling package dependencies keychain-memory 0.6.0 [#1532](https://github.com/hyperledger/cactus/issues/1532) ([d01d72d](https://github.com/hyperledger/cactus/commit/d01d72d36200d47acac89f7ab90f6ddc96afba6f)) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -### Features - -* **plugin-keychain-memory-wasm:** add WebAssmebly PoC ([df94397](https://github.com/hyperledger/cactus/commit/df9439789109715839b28ba4bce89da7bb9dcb00)), closes [#1281](https://github.com/hyperledger/cactus/issues/1281) diff --git a/packages/cactus-plugin-keychain-memory-wasm/README.md b/packages/cactus-plugin-keychain-memory-wasm/README.md deleted file mode 100644 index 92bd53e72a..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# `@hyperledger/cactus-plugin-keychain-memory-wasm` - -## Table of Contents - -- [1. Summary](#1-summary) -- [Usage](#usage) - -## Summary - -Dummy keychain implementation doing NO encryption and storing everything in-memory. Only suitable for development and testing. Same as the non-wasm version but this one has the backing implementation written in Rust and compiled down to WebAssembly. - -> **Do not use this in production. It does not encrypt the stored data at all. It stores everything in plain text!** -## Usage - -Can be used the same way as the non-WASM implementation in the package: `@hyperledger/cactus-plugin-keychain-memory` -The only difference is that this one is backed by code written in Rust that is compiled down to WebAssembly modules to be loaded instead of the usual TS->JS transpilation process. diff --git a/packages/cactus-plugin-keychain-memory-wasm/openapitools.json b/packages/cactus-plugin-keychain-memory-wasm/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/package.json b/packages/cactus-plugin-keychain-memory-wasm/package.json deleted file mode 100644 index e5104b35d6..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-keychain-memory-wasm", - "version": "2.0.0", - "description": "Dummy keychain implementation doing NO encryption and storing everything in-memory. Only suitable for development and testing. Same as the non-wasm version but this one has the backing implementation written in Rust and compiled down to WebAssembly.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-keychain-memory-wasm.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "copy-wasm-bg": "cpy './main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg*' '../dist/lib/' --cwd=src --parents", - "del-wasm-pack-project-files": "del-cli src/main/typescript/generated/wasm-pack/{package.json,README.md,.gitignore}", - "generate-rust-server": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g rust-server -o ./src/main/rust/generated/openapi/rust-server", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "wasm-pack": "CARGO_TARGET_DIR=${PWD}/dist/target-rustc/ wasm-pack build src/main/rust/cactus-plugin-keychain-memory-wasm/ --release --scope=hyperledger --target=nodejs --out-dir=../../../../src/main/typescript/generated/wasm-pack/", - "postwasm-pack": "run-s del-wasm-pack-project-files copy-wasm-bg", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "express": "4.21.0", - "prom-client": "15.1.3", - "uuid": "10.0.0" - }, - "devDependencies": { - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "body-parser": "1.20.3", - "cpy-cli": "4.2.0", - "del-cli": "5.1.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-keychain-memory-wasm.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-keychain-memory-wasm.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 28a644e272..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,18 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_delete_keychain_entry_request_v1.go -model_delete_keychain_entry_response_v1.go -model_get_keychain_entry_request_v1.go -model_get_keychain_entry_response_v1.go -model_has_keychain_entry_request_v1.go -model_has_keychain_entry_response_v1.go -model_set_keychain_entry_request_v1.go -model_set_keychain_entry_response_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 649fa49aa9..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# Go API client for cactus-plugin-keychain-memory-wasm - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-keychain-memory-wasm "github.com/hyperledger/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-memory-wasm.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-memory-wasm.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-memory-wasm.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-keychain-memory-wasm.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry | Deletes an entry under a key on the keychain backend. -*DefaultApi* | [**GetKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**HasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry | Checks that an entry exists under a key on the keychain backend -*DefaultApi* | [**SetKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry | Sets a value under a key on the keychain backend. - - -## Documentation For Models - - - [DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index abd92f7c33..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,340 +0,0 @@ -openapi: 3.0.3 -info: - description: Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin - which is designed to help with testing and development and is implemented in Rust - instead of Typescript. - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - Keychain Memory WASM - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry: - post: - operationId: getKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_get_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "404": - description: A keychain item with the specified key was not found. - "500": - description: Unexpected error. - summary: Retrieves the contents of a keychain entry from the backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry: - post: - operationId: setKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_set_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Sets a value under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry: - post: - operationId: deleteKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_delete_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Deletes an entry under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry: - post: - operationId: hasKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_has_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Checks that an entry exists under a key on the keychain backend - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry - verbLowerCase: post -components: - requestBodies: - keychain_get_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryRequestV1' - description: Request body to obtain a keychain entry via its key - required: true - keychain_set_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryRequestV1' - description: Request body to write/update a keychain entry via its key - required: true - keychain_delete_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryRequestV1' - description: Request body to delete a keychain entry via its key - required: true - keychain_has_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryRequestV1' - description: Request body for checking a keychain entry via its key - required: true - responses: - keychain_get_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - keychain_get_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_get_entry_401: - description: Authorization information is missing or invalid. - keychain_get_entry_404: - description: A keychain item with the specified key was not found. - keychain_get_entry_500: - description: Unexpected error. - keychain_set_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - keychain_set_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_set_entry_401: - description: Authorization information is missing or invalid. - keychain_set_entry_500: - description: Unexpected error. - keychain_delete_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - keychain_delete_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_delete_entry_401: - description: Authorization information is missing or invalid. - keychain_delete_entry_500: - description: Unexpected error. - keychain_has_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - keychain_has_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_has_entry_401: - description: Authorization information is missing or invalid. - keychain_has_entry_500: - description: Unexpected error. - schemas: - GetKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to get from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - GetKeychainEntryResponseV1: - example: - value: value - key: key - properties: - key: - description: The key that was used to retrieve the value from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value associated with the requested key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryRequestV1: - additionalProperties: false - example: - value: value - key: key - properties: - key: - description: The key for the entry to set on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value that will be associated with the key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was used to set the value on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to check the presence of on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was deleted from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key to check for presence in the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryResponseV1: - example: - checkedAt: checkedAt - isPresent: true - key: key - properties: - key: - description: The key that was used to check the presence of the value in - the entry store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - checkedAt: - description: Date and time encoded as JSON when the presence check was performed - by the plugin backend. - nullable: false - type: string - isPresent: - description: The boolean true or false indicating the presence or absence - of an entry under 'key'. - nullable: false - type: boolean - required: - - checkedAt - - isPresent - - key - type: object diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index adacedd67e..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,459 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeleteKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deleteKeychainEntryRequestV1 *DeleteKeychainEntryRequestV1 -} - -// Request body to delete a keychain entry via its key -func (r ApiDeleteKeychainEntryV1Request) DeleteKeychainEntryRequestV1(deleteKeychainEntryRequestV1 DeleteKeychainEntryRequestV1) ApiDeleteKeychainEntryV1Request { - r.deleteKeychainEntryRequestV1 = &deleteKeychainEntryRequestV1 - return r -} - -func (r ApiDeleteKeychainEntryV1Request) Execute() (*DeleteKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.DeleteKeychainEntryV1Execute(r) -} - -/* -DeleteKeychainEntryV1 Deletes an entry under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeleteKeychainEntryV1Request -*/ -func (a *DefaultApiService) DeleteKeychainEntryV1(ctx context.Context) ApiDeleteKeychainEntryV1Request { - return ApiDeleteKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeleteKeychainEntryResponseV1 -func (a *DefaultApiService) DeleteKeychainEntryV1Execute(r ApiDeleteKeychainEntryV1Request) (*DeleteKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeleteKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.deleteKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("deleteKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deleteKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getKeychainEntryRequestV1 *GetKeychainEntryRequestV1 -} - -// Request body to obtain a keychain entry via its key -func (r ApiGetKeychainEntryV1Request) GetKeychainEntryRequestV1(getKeychainEntryRequestV1 GetKeychainEntryRequestV1) ApiGetKeychainEntryV1Request { - r.getKeychainEntryRequestV1 = &getKeychainEntryRequestV1 - return r -} - -func (r ApiGetKeychainEntryV1Request) Execute() (*GetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.GetKeychainEntryV1Execute(r) -} - -/* -GetKeychainEntryV1 Retrieves the contents of a keychain entry from the backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetKeychainEntryV1Request -*/ -func (a *DefaultApiService) GetKeychainEntryV1(ctx context.Context) ApiGetKeychainEntryV1Request { - return ApiGetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetKeychainEntryResponseV1 -func (a *DefaultApiService) GetKeychainEntryV1Execute(r ApiGetKeychainEntryV1Request) (*GetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("getKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiHasKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - hasKeychainEntryRequestV1 *HasKeychainEntryRequestV1 -} - -// Request body for checking a keychain entry via its key -func (r ApiHasKeychainEntryV1Request) HasKeychainEntryRequestV1(hasKeychainEntryRequestV1 HasKeychainEntryRequestV1) ApiHasKeychainEntryV1Request { - r.hasKeychainEntryRequestV1 = &hasKeychainEntryRequestV1 - return r -} - -func (r ApiHasKeychainEntryV1Request) Execute() (*HasKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.HasKeychainEntryV1Execute(r) -} - -/* -HasKeychainEntryV1 Checks that an entry exists under a key on the keychain backend - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHasKeychainEntryV1Request -*/ -func (a *DefaultApiService) HasKeychainEntryV1(ctx context.Context) ApiHasKeychainEntryV1Request { - return ApiHasKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return HasKeychainEntryResponseV1 -func (a *DefaultApiService) HasKeychainEntryV1Execute(r ApiHasKeychainEntryV1Request) (*HasKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HasKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.HasKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.hasKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("hasKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.hasKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - setKeychainEntryRequestV1 *SetKeychainEntryRequestV1 -} - -// Request body to write/update a keychain entry via its key -func (r ApiSetKeychainEntryV1Request) SetKeychainEntryRequestV1(setKeychainEntryRequestV1 SetKeychainEntryRequestV1) ApiSetKeychainEntryV1Request { - r.setKeychainEntryRequestV1 = &setKeychainEntryRequestV1 - return r -} - -func (r ApiSetKeychainEntryV1Request) Execute() (*SetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.SetKeychainEntryV1Execute(r) -} - -/* -SetKeychainEntryV1 Sets a value under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSetKeychainEntryV1Request -*/ -func (a *DefaultApiService) SetKeychainEntryV1(ctx context.Context) ApiSetKeychainEntryV1Request { - return ApiSetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SetKeychainEntryResponseV1 -func (a *DefaultApiService) SetKeychainEntryV1Execute(r ApiSetKeychainEntryV1Request) (*SetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.setKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("setKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.setKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 2b09e57381..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Keychain Memory WASM API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 7cb4ee80b3..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 2d7bbd85dc..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go deleted file mode 100644 index eee66a4b31..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryRequestV1{} - -// DeleteKeychainEntryRequestV1 struct for DeleteKeychainEntryRequestV1 -type DeleteKeychainEntryRequestV1 struct { - // The key for the entry to check the presence of on the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryRequestV1 instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryRequestV1(key string) *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryRequestV1WithDefaults instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryRequestV1WithDefaults() *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryRequestV1 struct { - value *DeleteKeychainEntryRequestV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryRequestV1) Get() *DeleteKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryRequestV1) Set(val *DeleteKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryRequestV1(val *DeleteKeychainEntryRequestV1) *NullableDeleteKeychainEntryRequestV1 { - return &NullableDeleteKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go deleted file mode 100644 index 7e65660386..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryResponseV1{} - -// DeleteKeychainEntryResponseV1 struct for DeleteKeychainEntryResponseV1 -type DeleteKeychainEntryResponseV1 struct { - // The key that was deleted from the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryResponseV1 instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryResponseV1(key string) *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryResponseV1WithDefaults instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryResponseV1WithDefaults() *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryResponseV1 struct { - value *DeleteKeychainEntryResponseV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryResponseV1) Get() *DeleteKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryResponseV1) Set(val *DeleteKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryResponseV1(val *DeleteKeychainEntryResponseV1) *NullableDeleteKeychainEntryResponseV1 { - return &NullableDeleteKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go deleted file mode 100644 index 444613c9d2..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryRequestV1{} - -// GetKeychainEntryRequestV1 struct for GetKeychainEntryRequestV1 -type GetKeychainEntryRequestV1 struct { - // The key for the entry to get from the keychain. - Key string `json:"key"` -} - -// NewGetKeychainEntryRequestV1 instantiates a new GetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryRequestV1(key string) *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewGetKeychainEntryRequestV1WithDefaults instantiates a new GetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryRequestV1WithDefaults() *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o GetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableGetKeychainEntryRequestV1 struct { - value *GetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableGetKeychainEntryRequestV1) Get() *GetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableGetKeychainEntryRequestV1) Set(val *GetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryRequestV1(val *GetKeychainEntryRequestV1) *NullableGetKeychainEntryRequestV1 { - return &NullableGetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go deleted file mode 100644 index 0ddabedf89..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryResponseV1{} - -// GetKeychainEntryResponseV1 struct for GetKeychainEntryResponseV1 -type GetKeychainEntryResponseV1 struct { - // The key that was used to retrieve the value from the keychain. - Key string `json:"key"` - // The value associated with the requested key on the keychain. - Value string `json:"value"` -} - -// NewGetKeychainEntryResponseV1 instantiates a new GetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryResponseV1(key string, value string) *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - this.Key = key - this.Value = value - return &this -} - -// NewGetKeychainEntryResponseV1WithDefaults instantiates a new GetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryResponseV1WithDefaults() *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *GetKeychainEntryResponseV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *GetKeychainEntryResponseV1) SetValue(v string) { - o.Value = v -} - -func (o GetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableGetKeychainEntryResponseV1 struct { - value *GetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableGetKeychainEntryResponseV1) Get() *GetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableGetKeychainEntryResponseV1) Set(val *GetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryResponseV1(val *GetKeychainEntryResponseV1) *NullableGetKeychainEntryResponseV1 { - return &NullableGetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go deleted file mode 100644 index f61968744e..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryRequestV1{} - -// HasKeychainEntryRequestV1 struct for HasKeychainEntryRequestV1 -type HasKeychainEntryRequestV1 struct { - // The key to check for presence in the keychain. - Key string `json:"key"` -} - -// NewHasKeychainEntryRequestV1 instantiates a new HasKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryRequestV1(key string) *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewHasKeychainEntryRequestV1WithDefaults instantiates a new HasKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryRequestV1WithDefaults() *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o HasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableHasKeychainEntryRequestV1 struct { - value *HasKeychainEntryRequestV1 - isSet bool -} - -func (v NullableHasKeychainEntryRequestV1) Get() *HasKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableHasKeychainEntryRequestV1) Set(val *HasKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryRequestV1(val *HasKeychainEntryRequestV1) *NullableHasKeychainEntryRequestV1 { - return &NullableHasKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go deleted file mode 100644 index 5d997c0be6..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryResponseV1{} - -// HasKeychainEntryResponseV1 struct for HasKeychainEntryResponseV1 -type HasKeychainEntryResponseV1 struct { - // The key that was used to check the presence of the value in the entry store. - Key string `json:"key"` - // Date and time encoded as JSON when the presence check was performed by the plugin backend. - CheckedAt string `json:"checkedAt"` - // The boolean true or false indicating the presence or absence of an entry under 'key'. - IsPresent bool `json:"isPresent"` -} - -// NewHasKeychainEntryResponseV1 instantiates a new HasKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryResponseV1(key string, checkedAt string, isPresent bool) *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - this.Key = key - this.CheckedAt = checkedAt - this.IsPresent = isPresent - return &this -} - -// NewHasKeychainEntryResponseV1WithDefaults instantiates a new HasKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryResponseV1WithDefaults() *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetCheckedAt returns the CheckedAt field value -func (o *HasKeychainEntryResponseV1) GetCheckedAt() string { - if o == nil { - var ret string - return ret - } - - return o.CheckedAt -} - -// GetCheckedAtOk returns a tuple with the CheckedAt field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetCheckedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CheckedAt, true -} - -// SetCheckedAt sets field value -func (o *HasKeychainEntryResponseV1) SetCheckedAt(v string) { - o.CheckedAt = v -} - -// GetIsPresent returns the IsPresent field value -func (o *HasKeychainEntryResponseV1) GetIsPresent() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPresent -} - -// GetIsPresentOk returns a tuple with the IsPresent field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetIsPresentOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPresent, true -} - -// SetIsPresent sets field value -func (o *HasKeychainEntryResponseV1) SetIsPresent(v bool) { - o.IsPresent = v -} - -func (o HasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["checkedAt"] = o.CheckedAt - toSerialize["isPresent"] = o.IsPresent - return toSerialize, nil -} - -type NullableHasKeychainEntryResponseV1 struct { - value *HasKeychainEntryResponseV1 - isSet bool -} - -func (v NullableHasKeychainEntryResponseV1) Get() *HasKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableHasKeychainEntryResponseV1) Set(val *HasKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryResponseV1(val *HasKeychainEntryResponseV1) *NullableHasKeychainEntryResponseV1 { - return &NullableHasKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go deleted file mode 100644 index 083f6a8800..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryRequestV1{} - -// SetKeychainEntryRequestV1 struct for SetKeychainEntryRequestV1 -type SetKeychainEntryRequestV1 struct { - // The key for the entry to set on the keychain. - Key string `json:"key"` - // The value that will be associated with the key on the keychain. - Value string `json:"value"` -} - -// NewSetKeychainEntryRequestV1 instantiates a new SetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryRequestV1(key string, value string) *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - this.Key = key - this.Value = value - return &this -} - -// NewSetKeychainEntryRequestV1WithDefaults instantiates a new SetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryRequestV1WithDefaults() *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *SetKeychainEntryRequestV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *SetKeychainEntryRequestV1) SetValue(v string) { - o.Value = v -} - -func (o SetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableSetKeychainEntryRequestV1 struct { - value *SetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableSetKeychainEntryRequestV1) Get() *SetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableSetKeychainEntryRequestV1) Set(val *SetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryRequestV1(val *SetKeychainEntryRequestV1) *NullableSetKeychainEntryRequestV1 { - return &NullableSetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go deleted file mode 100644 index 539873a2ca..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryResponseV1{} - -// SetKeychainEntryResponseV1 struct for SetKeychainEntryResponseV1 -type SetKeychainEntryResponseV1 struct { - // The key that was used to set the value on the keychain. - Key string `json:"key"` -} - -// NewSetKeychainEntryResponseV1 instantiates a new SetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryResponseV1(key string) *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewSetKeychainEntryResponseV1WithDefaults instantiates a new SetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryResponseV1WithDefaults() *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o SetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableSetKeychainEntryResponseV1 struct { - value *SetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableSetKeychainEntryResponseV1) Get() *SetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableSetKeychainEntryResponseV1) Set(val *SetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryResponseV1(val *SetKeychainEntryResponseV1) *NullableSetKeychainEntryResponseV1 { - return &NullableSetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index c08d1d09b7..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 6cc6dd021e..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-keychain-memory-wasm - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-keychain-memory-wasm_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeleteKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeleteKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService HasKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.HasKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 0ccb2efaca..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory-wasm - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/json/openapi.json b/packages/cactus-plugin-keychain-memory-wasm/src/main/json/openapi.json deleted file mode 100644 index 158a7b8fac..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/json/openapi.json +++ /dev/null @@ -1,400 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Keychain Memory WASM", - "description": "Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes an entry under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_delete_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_delete_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_delete_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_delete_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_delete_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Checks that an entry exists under a key on the keychain backend", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_has_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_has_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_has_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_has_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_has_entry_500" - } - } - } - } - }, - "components": { - "schemas": { - "GetKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to get from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "GetKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "value"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to retrieve the value from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value associated with the requested key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryRequestV1": { - "type": "object", - "required": ["key", "value"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to set on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value that will be associated with the key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to set the value on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to check the presence of on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was deleted from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key to check for presence in the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "isPresent", "checkedAt"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to check the presence of the value in the entry store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "checkedAt": { - "type": "string", - "description": "Date and time encoded as JSON when the presence check was performed by the plugin backend.", - "nullable": false - }, - "isPresent": { - "type": "boolean", - "description": "The boolean true or false indicating the presence or absence of an entry under 'key'.", - "nullable": false - } - } - } - }, - "requestBodies": { - "keychain_get_entry_request_body": { - "description": "Request body to obtain a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryRequestV1" - } - } - } - }, - "keychain_set_entry_request_body": { - "description": "Request body to write/update a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryRequestV1" - } - } - } - }, - "keychain_delete_entry_request_body": { - "description": "Request body to delete a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryRequestV1" - } - } - } - }, - "keychain_has_entry_request_body": { - "description": "Request body for checking a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryRequestV1" - } - } - } - } - }, - "responses": { - "keychain_get_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryResponseV1" - } - } - } - }, - "keychain_get_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_get_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_get_entry_404": { - "description": "A keychain item with the specified key was not found." - }, - "keychain_get_entry_500": { - "description": "Unexpected error." - }, - "keychain_set_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryResponseV1" - } - } - } - }, - "keychain_set_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_set_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_set_entry_500": { - "description": "Unexpected error." - }, - "keychain_delete_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryResponseV1" - } - } - } - }, - "keychain_delete_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_delete_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_delete_entry_500": { - "description": "Unexpected error." - }, - "keychain_has_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryResponseV1" - } - } - } - }, - "keychain_has_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_has_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_has_entry_500": { - "description": "Unexpected error." - } - } - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/json/openapi.tpl.json b/packages/cactus-plugin-keychain-memory-wasm/src/main/json/openapi.tpl.json deleted file mode 100644 index 6c003e8b4b..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Keychain Memory WASM", - "description": "Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes an entry under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_delete_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Checks that an entry exists under a key on the keychain backend", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_has_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_500" - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 15e43f61f3..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,31 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index bbc2c39e06..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - Keychain Memory WASM - -Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**deleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry | Deletes an entry under a key on the keychain backend. -*DefaultApi* | [**getKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**hasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry | Checks that an entry exists under a key on the keychain backend -*DefaultApi* | [**setKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry | Sets a value under a key on the keychain backend. - - - -## Documentation for Models - - - [org.openapitools.client.models.DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [org.openapitools.client.models.DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [org.openapitools.client.models.GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [org.openapitools.client.models.HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [org.openapitools.client.models.HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [org.openapitools.client.models.SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index cc12d5c4bc..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,346 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.DeleteKeychainEntryRequestV1 -import org.openapitools.client.models.DeleteKeychainEntryResponseV1 -import org.openapitools.client.models.GetKeychainEntryRequestV1 -import org.openapitools.client.models.GetKeychainEntryResponseV1 -import org.openapitools.client.models.HasKeychainEntryRequestV1 -import org.openapitools.client.models.HasKeychainEntryResponseV1 -import org.openapitools.client.models.SetKeychainEntryRequestV1 -import org.openapitools.client.models.SetKeychainEntryResponseV1 - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Deletes an entry under a key on the keychain backend. - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return DeleteKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : DeleteKeychainEntryResponseV1 { - val localVarResponse = deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DeleteKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Deletes an entry under a key on the keychain backend. - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation deleteKeychainEntryV1 - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return RequestConfig - */ - fun deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = deleteKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return GetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : GetKeychainEntryResponseV1 { - val localVarResponse = getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getKeychainEntryV1 - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return RequestConfig - */ - fun getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = getKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Checks that an entry exists under a key on the keychain backend - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return HasKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : HasKeychainEntryResponseV1 { - val localVarResponse = hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as HasKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Checks that an entry exists under a key on the keychain backend - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation hasKeychainEntryV1 - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return RequestConfig - */ - fun hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = hasKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return SetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : SetKeychainEntryResponseV1 { - val localVarResponse = setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as SetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation setKeychainEntryV1 - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return RequestConfig - */ - fun setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = setKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt deleted file mode 100644 index 58a98174cf..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to check the presence of on the keychain. - */ - - -data class DeleteKeychainEntryRequestV1 ( - - /* The key for the entry to check the presence of on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt deleted file mode 100644 index 7b8b874e3d..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was deleted from the keychain. - */ - - -data class DeleteKeychainEntryResponseV1 ( - - /* The key that was deleted from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt deleted file mode 100644 index ea1d0da587..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to get from the keychain. - */ - - -data class GetKeychainEntryRequestV1 ( - - /* The key for the entry to get from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt deleted file mode 100644 index 21b9a38b46..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to retrieve the value from the keychain. - * @param `value` The value associated with the requested key on the keychain. - */ - - -data class GetKeychainEntryResponseV1 ( - - /* The key that was used to retrieve the value from the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value associated with the requested key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt deleted file mode 100644 index c3055c3414..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key to check for presence in the keychain. - */ - - -data class HasKeychainEntryRequestV1 ( - - /* The key to check for presence in the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt deleted file mode 100644 index 6345c51831..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to check the presence of the value in the entry store. - * @param checkedAt Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @param isPresent The boolean true or false indicating the presence or absence of an entry under 'key'. - */ - - -data class HasKeychainEntryResponseV1 ( - - /* The key that was used to check the presence of the value in the entry store. */ - @Json(name = "key") - val key: kotlin.String, - - /* Date and time encoded as JSON when the presence check was performed by the plugin backend. */ - @Json(name = "checkedAt") - val checkedAt: kotlin.String, - - /* The boolean true or false indicating the presence or absence of an entry under 'key'. */ - @Json(name = "isPresent") - val isPresent: kotlin.Boolean - -) - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt deleted file mode 100644 index d016fc72e6..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to set on the keychain. - * @param `value` The value that will be associated with the key on the keychain. - */ - - -data class SetKeychainEntryRequestV1 ( - - /* The key for the entry to set on the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value that will be associated with the key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt deleted file mode 100644 index 3f7624cd59..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to set the value on the keychain. - */ - - -data class SetKeychainEntryResponseV1 ( - - /* The key that was used to set the value on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/.cargo-ok b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/.cargo-ok deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/.gitignore b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/.gitignore deleted file mode 100644 index 4e301317e5..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/target -**/*.rs.bk -Cargo.lock -bin/ -pkg/ -wasm-pack.log diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/Cargo.toml b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/Cargo.toml deleted file mode 100644 index d55ea866a0..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/Cargo.toml +++ /dev/null @@ -1,37 +0,0 @@ -[package] -name = "cactus-plugin-keychain-memory-wasm" -version = "2.0.0" -authors = ["Peter Somogyvari "] -edition = "2018" - -[build] -target-dir = "../../../../dist/target-rustc/" - -[lib] -crate-type = ["cdylib", "rlib"] - -[features] -default = ["console_error_panic_hook"] - -[dependencies] -wasm-bindgen = { version = "0.2.63", features = ["serde-serialize"] } -wasm-bindgen-futures = "0.4.28" - -# The `console_error_panic_hook` crate provides better debugging of panics by -# logging them with `console.error`. This is great for development, but requires -# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for -# code size when deploying. -console_error_panic_hook = { version = "0.1.6", optional = true } - -js-sys = "0.3.55" -serde = { version = "1.0.130", features = ["derive"] } -serde_json = "1.0.68" -# hashicorp_vault = { version = "2.1.0" } -ureq = { version = "2.2.0", features = ["json", "charset"] } - -[dev-dependencies] -wasm-bindgen-test = "0.3.13" - -[profile.release] -# Tell `rustc` to optimize for small code size. -opt-level = "s" diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/LICENSE_APACHE b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/LICENSE_APACHE deleted file mode 100644 index 1b5ec8b78e..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/LICENSE_APACHE +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/README.md b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/README.md deleted file mode 100644 index 38ed96fc11..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/README.md +++ /dev/null @@ -1,67 +0,0 @@ -

- -

wasm-pack-template

- - A template for kick starting a Rust and WebAssembly project using wasm-pack. - -

- Build Status -

- -

- Tutorial - | - Chat -

- - Built with 🦀🕸 by The Rust and WebAssembly Working Group -
- -## About - -[**📚 Read this template tutorial! 📚**][template-docs] - -This template is designed for compiling Rust libraries into WebAssembly and -publishing the resulting package to NPM. - -Be sure to check out [other `wasm-pack` tutorials online][tutorials] for other -templates and usages of `wasm-pack`. - -[tutorials]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html -[template-docs]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html - -## 🚴 Usage - -### 🐑 Use `cargo generate` to Clone this Template - -[Learn more about `cargo generate` here.](https://github.com/ashleygwilliams/cargo-generate) - -``` -cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project -cd my-project -``` - -### 🛠️ Build with `wasm-pack build` - -``` -wasm-pack build -``` - -### 🔬 Test in Headless Browsers with `wasm-pack test` - -``` -wasm-pack test --headless --firefox -``` - -### 🎁 Publish to NPM with `wasm-pack publish` - -``` -wasm-pack publish -``` - -## 🔋 Batteries Included - -* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating - between WebAssembly and JavaScript. -* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook) - for logging panic messages to the developer console. diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/lib.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/lib.rs deleted file mode 100644 index ceefa6eaf2..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/lib.rs +++ /dev/null @@ -1,105 +0,0 @@ -mod utils; - -use std::collections::HashMap; -use serde::{Serialize, Deserialize}; -use wasm_bindgen::prelude::*; - -// We have to allow snake case because the JS side expects it. -#[allow(non_snake_case)] -#[wasm_bindgen] -#[derive(Serialize, Deserialize)] -pub struct PluginKeychainMemoryWasmOptions { - #[wasm_bindgen(getter_with_clone)] - pub instanceId: String, - - #[wasm_bindgen(getter_with_clone)] - pub keychainId: String, -} - -#[wasm_bindgen] -impl PluginKeychainMemoryWasmOptions { -} - -#[wasm_bindgen] -pub struct PluginKeychainMemoryWasm { - data: HashMap, - options: PluginKeychainMemoryWasmOptions, -} - -#[wasm_bindgen] -impl PluginKeychainMemoryWasm { - #[wasm_bindgen(constructor)] - pub fn new(options: PluginKeychainMemoryWasmOptions) -> Self { - PluginKeychainMemoryWasm { data: HashMap::new(), options } - } - - // We have to allow snake case because the JS side expects it. - #[allow(non_snake_case)] - pub fn getPackageName(&self) -> String { - "@hyperledger/cactus-plugin-keychain-memory-wasm".to_string() - } - - // We have to allow snake case because the JS side expects it. - #[allow(non_snake_case)] - pub fn getKeychainId(&self) -> String { - self.options.keychainId.clone() - } - - // We have to allow snake case because the JS side expects it. - #[allow(non_snake_case)] - pub fn getInstanceId(&self) -> String { - self.options.instanceId.clone() - } - - // We have to allow snake case because the JS side expects it. - #[allow(non_snake_case)] - pub fn onPluginInit(&self) -> js_sys::Promise { - js_sys::Promise::resolve(&"Initialization OK".into()) - } - - pub fn get(&self, key: &str) -> js_sys::Promise { - let value = self.data.get(key); - js_sys::Promise::resolve(&value.into()) - } - - pub fn set(&mut self, key: &str, value: &str) -> js_sys::Promise { - self.data.insert(key.to_string(), value.to_string()); - js_sys::Promise::resolve(&JsValue::UNDEFINED.into()) - } - - pub fn has(&self, key: &str) -> js_sys::Promise { - let is_present = self.data.contains_key(key); - js_sys::Promise::resolve(&is_present.into()) - } - - pub fn delete(&mut self, key: &str) -> js_sys::Promise { - self.data.remove(key); - js_sys::Promise::resolve(&JsValue::UNDEFINED.into()) - } -} - - -#[wasm_bindgen] -pub struct PluginFactoryKeychain { -} - -#[wasm_bindgen] -impl PluginFactoryKeychain { - #[wasm_bindgen(constructor)] - pub fn new() -> Self { - PluginFactoryKeychain {} - } - - pub fn create(&self, options_raw: &JsValue) -> PluginKeychainMemoryWasm { - let options: PluginKeychainMemoryWasmOptions = options_raw.into_serde().unwrap(); - PluginKeychainMemoryWasm::new(options) - } -} - -// We have to allow snake case because the JS side expects it. -#[allow(non_snake_case)] -#[wasm_bindgen] -pub async fn createPluginFactory() -> PluginFactoryKeychain { - utils::set_panic_hook(); - PluginFactoryKeychain::new() -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/utils.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/utils.rs deleted file mode 100644 index b1d7929dc9..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/src/utils.rs +++ /dev/null @@ -1,10 +0,0 @@ -pub fn set_panic_hook() { - // When the `console_error_panic_hook` feature is enabled, we can call the - // `set_panic_hook` function at least once during initialization, and then - // we will get better error messages if our code ever panics. - // - // For more details see - // https://github.com/rustwasm/console_error_panic_hook#readme - #[cfg(feature = "console_error_panic_hook")] - console_error_panic_hook::set_once(); -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/tests/web.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/tests/web.rs deleted file mode 100644 index de5c1dafef..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/cactus-plugin-keychain-memory-wasm/tests/web.rs +++ /dev/null @@ -1,13 +0,0 @@ -//! Test suite for the Web and headless browsers. - -#![cfg(target_arch = "wasm32")] - -extern crate wasm_bindgen_test; -use wasm_bindgen_test::*; - -wasm_bindgen_test_configure!(run_in_browser); - -#[wasm_bindgen_test] -fn pass() { - assert_eq!(1 + 1, 2); -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.cargo/config b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.cargo/config deleted file mode 100644 index b8acc9c00c..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.cargo/config +++ /dev/null @@ -1,18 +0,0 @@ -[build] -rustflags = [ - "-W", "missing_docs", # detects missing documentation for public members - - "-W", "trivial_casts", # detects trivial casts which could be removed - - "-W", "trivial_numeric_casts", # detects trivial casts of numeric types which could be removed - - "-W", "unsafe_code", # usage of `unsafe` code - - "-W", "unused_qualifications", # detects unnecessarily qualified names - - "-W", "unused_extern_crates", # extern crates that are never used - - "-W", "unused_import_braces", # unnecessary braces around an imported item - - "-D", "warnings", # all warnings should be denied -] diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.gitignore b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.gitignore deleted file mode 100644 index a9d37c560c..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -target -Cargo.lock diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator-ignore b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator-ignore deleted file mode 100644 index f40de3e6f3..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator-ignore +++ /dev/null @@ -1,39 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md - -api/openapi.yaml -docs/**/*.md -examples/ca.pem -examples/client/main.rs -examples/server-chain.pem -examples/server-key.pem - -# examples/server/main.rs -# examples/server/server.rs -# src/client/mod.rs -# src/context.rs -# src/header.rs -# src/lib.rs -# src/models.rs -# src/server/mod.rs diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/FILES b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/FILES deleted file mode 100644 index 7396771dbf..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/FILES +++ /dev/null @@ -1,28 +0,0 @@ -.cargo/config -.gitignore -.openapi-generator-ignore -Cargo.toml -README.md -api/openapi.yaml -docs/DeleteKeychainEntryRequestV1.md -docs/DeleteKeychainEntryResponseV1.md -docs/GetKeychainEntryRequest.md -docs/GetKeychainEntryResponse.md -docs/HasKeychainEntryRequestV1.md -docs/HasKeychainEntryResponseV1.md -docs/PrometheusExporterMetricsResponse.md -docs/SetKeychainEntryRequest.md -docs/SetKeychainEntryResponse.md -docs/default_api.md -examples/ca.pem -examples/client/main.rs -examples/server-chain.pem -examples/server-key.pem -examples/server/main.rs -examples/server/server.rs -src/client/mod.rs -src/context.rs -src/header.rs -src/lib.rs -src/models.rs -src/server/mod.rs diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/VERSION deleted file mode 100644 index 7cbea073be..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.2.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/Cargo.toml b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/Cargo.toml deleted file mode 100644 index 697d4a44e5..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/Cargo.toml +++ /dev/null @@ -1,77 +0,0 @@ -[package] -name = "openapi_client" -version = "2.0.0" -authors = [] -description = "Contains/describes the Keychain API types/paths for Hyperledger Cactus." -license = "Unlicense" -edition = "2018" - -[features] -default = ["client", "server"] -client = [ - "hyper", "hyper-openssl", "hyper-tls", "native-tls", "openssl", "url" -] -server = [ - "serde_ignored", "hyper", "regex", "percent-encoding", "url", "lazy_static" -] -conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk-enum-derive"] - -[target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] -native-tls = { version = "0.2", optional = true } -hyper-tls = { version = "0.4", optional = true } - -[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] -hyper-openssl = { version = "0.8", optional = true } -openssl = {version = "0.10", optional = true } - -[dependencies] -# Common -async-trait = "0.1.24" -chrono = { version = "0.4", features = ["serde"] } -futures = "0.3" -swagger = "5.0.2" -log = "0.4.0" -mime = "0.3" - -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" - -# Crates included if required by the API definition - -# Common between server and client features -hyper = {version = "0.13", optional = true} -serde_ignored = {version = "0.1.1", optional = true} -url = {version = "2.1", optional = true} - -# Client-specific - -# Server, and client callback-specific -lazy_static = { version = "1.4", optional = true } -percent-encoding = {version = "2.1.0", optional = true} -regex = {version = "1.3", optional = true} - -# Conversion -frunk = { version = "0.3.0", optional = true } -frunk_derives = { version = "0.3.0", optional = true } -frunk_core = { version = "0.3.0", optional = true } -frunk-enum-derive = { version = "0.2.0", optional = true } -frunk-enum-core = { version = "0.2.0", optional = true } - -[dev-dependencies] -clap = "2.25" -env_logger = "0.7" -tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] } -native-tls = "0.2" -tokio-tls = "0.3" - -[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] -tokio-openssl = "0.4" -openssl = "0.10" - -[[example]] -name = "client" -required-features = ["client"] - -[[example]] -name = "server" -required-features = ["server"] diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/README.md b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/README.md deleted file mode 100644 index ba40b3c718..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# Rust API for openapi_client - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -## Overview - -This client/server was generated by the [openapi-generator] -(https://openapi-generator.tech) project. By using the -[OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote -server, you can easily generate a server stub. - -To see how to make this your own, look here: - -[README]((https://openapi-generator.tech)) - -- API version: 0.3.0 -- Build date: 2021-10-04T20:30:49.096004-07:00[America/Los_Angeles] - - - -This autogenerated project defines an API crate `openapi_client` which contains: -* An `Api` trait defining the API in Rust. -* Data types representing the underlying data model. -* A `Client` type which implements `Api` and issues HTTP requests for each operation. -* A router which accepts HTTP requests and invokes the appropriate `Api` method for each operation. - -It also contains an example server and client which make use of `openapi_client`: - -* The example server starts up a web server using the `openapi_client` - router, and supplies a trivial implementation of `Api` which returns failure - for every operation. -* The example client provides a CLI which lets you invoke - any single operation on the `openapi_client` client by passing appropriate - arguments on the command line. - -You can use the example server and client as a basis for your own code. -See below for [more detail on implementing a server](#writing-a-server). - -## Examples - -Run examples with: - -``` -cargo run --example -``` - -To pass in arguments to the examples, put them after `--`, for example: - -``` -cargo run --example client -- --help -``` - -### Running the example server -To run the server, follow these simple steps: - -``` -cargo run --example server -``` - -### Running the example client -To run a client, follow one of the following simple steps: - -``` -cargo run --example client DeleteKeychainEntryV1 -cargo run --example client GetPrometheusMetricsV1 -cargo run --example client HasKeychainEntryV1 -``` - -### HTTPS -The examples can be run in HTTPS mode by passing in the flag `--https`, for example: - -``` -cargo run --example server -- --https -``` - -This will use the keys/certificates from the examples directory. Note that the -server chain is signed with `CN=localhost`. - -## Using the generated library - -The generated library has a few optional features that can be activated through Cargo. - -* `server` - * This defaults to enabled and creates the basic skeleton of a server implementation based on hyper - * To create the server stack you'll need to provide an implementation of the API trait to provide the server function. -* `client` - * This defaults to enabled and creates the basic skeleton of a client implementation based on hyper - * The constructed client implements the API trait by making remote API call. -* `conversions` - * This defaults to disabled and creates extra derives on models to allow "transmogrification" between objects of structurally similar types. - -See https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section for how to use features in your `Cargo.toml`. - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteKeychainEntryV1**](docs/default_api.md#deleteKeychainEntryV1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry | Deletes an entry from the keychain stored under the provided key. -[**getKeychainEntryV1**](docs/default_api.md#getKeychainEntryV1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -[**getPrometheusMetricsV1**](docs/default_api.md#getPrometheusMetricsV1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics | Get the Prometheus Metrics -[**hasKeychainEntryV1**](docs/default_api.md#hasKeychainEntryV1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry | Retrieves the information regarding a key being present on the keychain or not. -[**setKeychainEntryV1**](docs/default_api.md#setKeychainEntryV1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry | Sets a value under a key on the keychain backend. - - -## Documentation For Models - - - [DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [GetKeychainEntryRequest](docs/GetKeychainEntryRequest.md) - - [GetKeychainEntryResponse](docs/GetKeychainEntryResponse.md) - - [HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [PrometheusExporterMetricsResponse](docs/PrometheusExporterMetricsResponse.md) - - [SetKeychainEntryRequest](docs/SetKeychainEntryRequest.md) - - [SetKeychainEntryResponse](docs/SetKeychainEntryResponse.md) - - -## Documentation For Authorization - Endpoints do not require authorization. - - -## Author - - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/client/main.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/client/main.rs deleted file mode 100644 index f081334656..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/client/main.rs +++ /dev/null @@ -1,117 +0,0 @@ -#![allow(missing_docs, unused_variables, trivial_casts)] - - -#[allow(unused_imports)] -use futures::{future, Stream, stream}; -#[allow(unused_imports)] -use openapi_client::{Api, ApiNoContext, Client, ContextWrapperExt, models, - DeleteKeychainEntryV1Response, - GetKeychainEntryV1Response, - GetPrometheusMetricsV1Response, - HasKeychainEntryV1Response, - SetKeychainEntryV1Response, - }; -use clap::{App, Arg}; - -#[allow(unused_imports)] -use log::info; - -// swagger::Has may be unused if there are no examples -#[allow(unused_imports)] -use swagger::{AuthData, ContextBuilder, EmptyContext, Has, Push, XSpanIdString}; - -type ClientContext = swagger::make_context_ty!(ContextBuilder, EmptyContext, Option, XSpanIdString); - -// rt may be unused if there are no examples -#[allow(unused_mut)] -fn main() { - env_logger::init(); - - let matches = App::new("client") - .arg(Arg::with_name("operation") - .help("Sets the operation to run") - .possible_values(&[ - "DeleteKeychainEntryV1", - "GetPrometheusMetricsV1", - "HasKeychainEntryV1", - ]) - .required(true) - .index(1)) - .arg(Arg::with_name("https") - .long("https") - .help("Whether to use HTTPS or not")) - .arg(Arg::with_name("host") - .long("host") - .takes_value(true) - .default_value("localhost") - .help("Hostname to contact")) - .arg(Arg::with_name("port") - .long("port") - .takes_value(true) - .default_value("8080") - .help("Port to contact")) - .get_matches(); - - let is_https = matches.is_present("https"); - let base_url = format!("{}://{}:{}", - if is_https { "https" } else { "http" }, - matches.value_of("host").unwrap(), - matches.value_of("port").unwrap()); - - let context: ClientContext = - swagger::make_context!(ContextBuilder, EmptyContext, None as Option, XSpanIdString::default()); - - let mut client : Box> = if matches.is_present("https") { - // Using Simple HTTPS - let client = Box::new(Client::try_new_https(&base_url) - .expect("Failed to create HTTPS client")); - Box::new(client.with_context(context)) - } else { - // Using HTTP - let client = Box::new(Client::try_new_http( - &base_url) - .expect("Failed to create HTTP client")); - Box::new(client.with_context(context)) - }; - - let mut rt = tokio::runtime::Runtime::new().unwrap(); - - match matches.value_of("operation") { - Some("DeleteKeychainEntryV1") => { - let result = rt.block_on(client.delete_keychain_entry_v1( - None - )); - info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); - }, - /* Disabled because there's no example. - Some("GetKeychainEntryV1") => { - let result = rt.block_on(client.get_keychain_entry_v1( - ??? - )); - info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); - }, - */ - Some("GetPrometheusMetricsV1") => { - let result = rt.block_on(client.get_prometheus_metrics_v1( - )); - info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); - }, - Some("HasKeychainEntryV1") => { - let result = rt.block_on(client.has_keychain_entry_v1( - None - )); - info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); - }, - /* Disabled because there's no example. - Some("SetKeychainEntryV1") => { - let result = rt.block_on(client.set_keychain_entry_v1( - ??? - )); - info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); - }, - */ - _ => { - panic!("Invalid operation provided") - } - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/main.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/main.rs deleted file mode 100644 index 39f7b35da9..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/main.rs +++ /dev/null @@ -1,25 +0,0 @@ -//! Main binary entry point for openapi_client implementation. - -#![allow(missing_docs)] - -use clap::{App, Arg}; - -mod server; - - -/// Create custom server, wire it to the autogenerated router, -/// and pass it to the web server. -#[tokio::main] -async fn main() { - env_logger::init(); - - let matches = App::new("server") - .arg(Arg::with_name("https") - .long("https") - .help("Whether to use HTTPS or not")) - .get_matches(); - - let addr = "127.0.0.1:8080"; - - server::create(addr, matches.is_present("https")).await; -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/server.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/server.rs deleted file mode 100644 index 7c4102d77c..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/examples/server/server.rs +++ /dev/null @@ -1,166 +0,0 @@ -//! Main library entry point for openapi_client implementation. - -#![allow(unused_imports)] - -use async_trait::async_trait; -use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; -use hyper::server::conn::Http; -use hyper::service::Service; -use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; -use std::future::Future; -use std::marker::PhantomData; -use std::net::SocketAddr; -use std::sync::{Arc, Mutex}; -use std::task::{Context, Poll}; -use swagger::{Has, XSpanIdString}; -use swagger::auth::MakeAllowAllAuthenticator; -use swagger::EmptyContext; -use tokio::net::TcpListener; - -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; - -use openapi_client::models; - -/// Builds an SSL implementation for Simple HTTPS from some hard-coded file names -pub async fn create(addr: &str, https: bool) { - let addr = addr.parse().expect("Failed to parse bind address"); - - let server = Server::new(); - - let service = MakeService::new(server); - - let service = MakeAllowAllAuthenticator::new(service, "cosmo"); - - let mut service = - openapi_client::server::context::MakeAddContext::<_, EmptyContext>::new( - service - ); - - if https { - #[cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))] - { - unimplemented!("SSL is not implemented for the examples on MacOS, Windows or iOS"); - } - - #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] - { - let mut ssl = SslAcceptor::mozilla_intermediate_v5(SslMethod::tls()).expect("Failed to create SSL Acceptor"); - - // Server authentication - ssl.set_private_key_file("examples/server-key.pem", SslFiletype::PEM).expect("Failed to set private key"); - ssl.set_certificate_chain_file("examples/server-chain.pem").expect("Failed to set cerificate chain"); - ssl.check_private_key().expect("Failed to check private key"); - - let tls_acceptor = Arc::new(ssl.build()); - let mut tcp_listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = tcp_listener.incoming(); - - while let (Some(tcp), rest) = incoming.into_future().await { - if let Ok(tcp) = tcp { - let addr = tcp.peer_addr().expect("Unable to get remote address"); - let service = service.call(addr); - let tls_acceptor = Arc::clone(&tls_acceptor); - - tokio::spawn(async move { - let tls = tokio_openssl::accept(&*tls_acceptor, tcp).await.map_err(|_| ())?; - - let service = service.await.map_err(|_| ())?; - - Http::new().serve_connection(tls, service).await.map_err(|_| ()) - }); - } - - incoming = rest; - } - } - } else { - // Using HTTP - hyper::server::Server::bind(&addr).serve(service).await.unwrap() - } -} - -#[derive(Copy, Clone)] -pub struct Server { - marker: PhantomData, -} - -impl Server { - pub fn new() -> Self { - Server{marker: PhantomData} - } -} - - -use openapi_client::{ - Api, - DeleteKeychainEntryV1Response, - GetKeychainEntryV1Response, - GetPrometheusMetricsV1Response, - HasKeychainEntryV1Response, - SetKeychainEntryV1Response, -}; -use openapi_client::server::MakeService; -use std::error::Error; -use swagger::ApiError; - -#[async_trait] -impl Api for Server where C: Has + Send + Sync -{ - /// Deletes an entry from the keychain stored under the provided key. - async fn delete_keychain_entry_v1( - &self, - delete_keychain_entry_request_v1: Option, - context: &C) -> Result - { - let context = context.clone(); - info!("delete_keychain_entry_v1({:?}) - X-Span-ID: {:?}", delete_keychain_entry_request_v1, context.get().0.clone()); - Err("Generic failuare".into()) - } - - /// Retrieves the contents of a keychain entry from the backend. - async fn get_keychain_entry_v1( - &self, - get_keychain_entry_request: models::GetKeychainEntryRequest, - context: &C) -> Result - { - let context = context.clone(); - info!("get_keychain_entry_v1({:?}) - X-Span-ID: {:?}", get_keychain_entry_request, context.get().0.clone()); - Err("Generic failuare".into()) - } - - /// Get the Prometheus Metrics - async fn get_prometheus_metrics_v1( - &self, - context: &C) -> Result - { - let context = context.clone(); - info!("get_prometheus_metrics_v1() - X-Span-ID: {:?}", context.get().0.clone()); - Err("Generic failuare".into()) - } - - /// Retrieves the information regarding a key being present on the keychain or not. - async fn has_keychain_entry_v1( - &self, - has_keychain_entry_request_v1: Option, - context: &C) -> Result - { - let context = context.clone(); - info!("has_keychain_entry_v1({:?}) - X-Span-ID: {:?}", has_keychain_entry_request_v1, context.get().0.clone()); - Err("Generic failuare".into()) - } - - /// Sets a value under a key on the keychain backend. - async fn set_keychain_entry_v1( - &self, - set_keychain_entry_request: models::SetKeychainEntryRequest, - context: &C) -> Result - { - let context = context.clone(); - info!("set_keychain_entry_v1({:?}) - X-Span-ID: {:?}", set_keychain_entry_request, context.get().0.clone()); - Err("Generic failuare".into()) - } - -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/client/mod.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/client/mod.rs deleted file mode 100644 index 4a7db5e393..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/client/mod.rs +++ /dev/null @@ -1,851 +0,0 @@ -use async_trait::async_trait; -use futures::{Stream, future, future::BoxFuture, stream, future::TryFutureExt, future::FutureExt, stream::StreamExt}; -use hyper::header::{HeaderName, HeaderValue, CONTENT_TYPE}; -use hyper::{Body, Request, Response, service::Service, Uri}; -use percent_encoding::{utf8_percent_encode, AsciiSet}; -use std::borrow::Cow; -use std::convert::TryInto; -use std::io::{ErrorKind, Read}; -use std::error::Error; -use std::future::Future; -use std::fmt; -use std::marker::PhantomData; -use std::path::Path; -use std::sync::{Arc, Mutex}; -use std::str; -use std::str::FromStr; -use std::string::ToString; -use std::task::{Context, Poll}; -use swagger::{ApiError, AuthData, BodyExt, Connector, DropContextService, Has, XSpanIdString}; -use url::form_urlencoded; - - -use crate::models; -use crate::header; - -/// https://url.spec.whatwg.org/#fragment-percent-encode-set -#[allow(dead_code)] -const FRAGMENT_ENCODE_SET: &AsciiSet = &percent_encoding::CONTROLS - .add(b' ').add(b'"').add(b'<').add(b'>').add(b'`'); - -/// This encode set is used for object IDs -/// -/// Aside from the special characters defined in the `PATH_SEGMENT_ENCODE_SET`, -/// the vertical bar (|) is encoded. -#[allow(dead_code)] -const ID_ENCODE_SET: &AsciiSet = &FRAGMENT_ENCODE_SET.add(b'|'); - -use crate::{Api, - DeleteKeychainEntryV1Response, - GetKeychainEntryV1Response, - GetPrometheusMetricsV1Response, - HasKeychainEntryV1Response, - SetKeychainEntryV1Response - }; - -/// Convert input into a base path, e.g. "http://example:123". Also checks the scheme as it goes. -fn into_base_path(input: impl TryInto, correct_scheme: Option<&'static str>) -> Result { - // First convert to Uri, since a base path is a subset of Uri. - let uri = input.try_into()?; - - let scheme = uri.scheme_str().ok_or(ClientInitError::InvalidScheme)?; - - // Check the scheme if necessary - if let Some(correct_scheme) = correct_scheme { - if scheme != correct_scheme { - return Err(ClientInitError::InvalidScheme); - } - } - - let host = uri.host().ok_or_else(|| ClientInitError::MissingHost)?; - let port = uri.port_u16().map(|x| format!(":{}", x)).unwrap_or_default(); - Ok(format!("{}://{}{}{}", scheme, host, port, uri.path().trim_end_matches('/'))) -} - -/// A client that implements the API by making HTTP calls out to a server. -pub struct Client where - S: Service< - (Request, C), - Response=Response> + Clone + Sync + Send + 'static, - S::Future: Send + 'static, - S::Error: Into + fmt::Display, - C: Clone + Send + Sync + 'static -{ - /// Inner service - client_service: S, - - /// Base path of the API - base_path: String, - - /// Marker - marker: PhantomData, -} - -impl fmt::Debug for Client where - S: Service< - (Request, C), - Response=Response> + Clone + Sync + Send + 'static, - S::Future: Send + 'static, - S::Error: Into + fmt::Display, - C: Clone + Send + Sync + 'static -{ - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "Client {{ base_path: {} }}", self.base_path) - } -} - -impl Clone for Client where - S: Service< - (Request, C), - Response=Response> + Clone + Sync + Send + 'static, - S::Future: Send + 'static, - S::Error: Into + fmt::Display, - C: Clone + Send + Sync + 'static -{ - fn clone(&self) -> Self { - Self { - client_service: self.client_service.clone(), - base_path: self.base_path.clone(), - marker: PhantomData, - } - } -} - -impl Client, C>, C> where - Connector: hyper::client::connect::Connect + Clone + Send + Sync + 'static, - C: Clone + Send + Sync + 'static, -{ - /// Create a client with a custom implementation of hyper::client::Connect. - /// - /// Intended for use with custom implementations of connect for e.g. protocol logging - /// or similar functionality which requires wrapping the transport layer. When wrapping a TCP connection, - /// this function should be used in conjunction with `swagger::Connector::builder()`. - /// - /// For ordinary tcp connections, prefer the use of `try_new_http`, `try_new_https` - /// and `try_new_https_mutual`, to avoid introducing a dependency on the underlying transport layer. - /// - /// # Arguments - /// - /// * `base_path` - base path of the client API, i.e. "http://www.my-api-implementation.com" - /// * `protocol` - Which protocol to use when constructing the request url, e.g. `Some("http")` - /// * `connector` - Implementation of `hyper::client::Connect` to use for the client - pub fn try_new_with_connector( - base_path: &str, - protocol: Option<&'static str>, - connector: Connector, - ) -> Result - { - let client_service = hyper::client::Client::builder().build(connector); - let client_service = DropContextService::new(client_service); - - Ok(Self { - client_service, - base_path: into_base_path(base_path, protocol)?, - marker: PhantomData, - }) - } -} - -#[derive(Debug, Clone)] -pub enum HyperClient { - Http(hyper::client::Client), - Https(hyper::client::Client), -} - -impl Service> for HyperClient { - type Response = Response; - type Error = hyper::Error; - type Future = hyper::client::ResponseFuture; - - fn poll_ready(&mut self, cx: &mut Context) -> Poll> { - match self { - HyperClient::Http(client) => client.poll_ready(cx), - HyperClient::Https(client) => client.poll_ready(cx), - } - } - - fn call(&mut self, req: Request) -> Self::Future { - match self { - HyperClient::Http(client) => client.call(req), - HyperClient::Https(client) => client.call(req) - } - } -} - -impl Client, C> where - C: Clone + Send + Sync + 'static, -{ - /// Create an HTTP client. - /// - /// # Arguments - /// * `base_path` - base path of the client API, i.e. "http://www.my-api-implementation.com" - pub fn try_new( - base_path: &str, - ) -> Result { - let uri = Uri::from_str(base_path)?; - - let scheme = uri.scheme_str().ok_or(ClientInitError::InvalidScheme)?; - let scheme = scheme.to_ascii_lowercase(); - - let connector = Connector::builder(); - - let client_service = match scheme.as_str() { - "http" => { - HyperClient::Http(hyper::client::Client::builder().build(connector.build())) - }, - "https" => { - let connector = connector.https() - .build() - .map_err(|e| ClientInitError::SslError(e))?; - HyperClient::Https(hyper::client::Client::builder().build(connector)) - }, - _ => { - return Err(ClientInitError::InvalidScheme); - } - }; - - let client_service = DropContextService::new(client_service); - - Ok(Self { - client_service, - base_path: into_base_path(base_path, None)?, - marker: PhantomData, - }) - } -} - -impl Client, C>, C> where - C: Clone + Send + Sync + 'static -{ - /// Create an HTTP client. - /// - /// # Arguments - /// * `base_path` - base path of the client API, i.e. "http://www.my-api-implementation.com" - pub fn try_new_http( - base_path: &str, - ) -> Result { - let http_connector = Connector::builder().build(); - - Self::try_new_with_connector(base_path, Some("http"), http_connector) - } -} - -#[cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))] -type HttpsConnector = hyper_tls::HttpsConnector; - -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -type HttpsConnector = hyper_openssl::HttpsConnector; - -impl Client, C>, C> where - C: Clone + Send + Sync + 'static -{ - /// Create a client with a TLS connection to the server - /// - /// # Arguments - /// * `base_path` - base path of the client API, i.e. "https://www.my-api-implementation.com" - pub fn try_new_https(base_path: &str) -> Result - { - let https_connector = Connector::builder() - .https() - .build() - .map_err(|e| ClientInitError::SslError(e))?; - Self::try_new_with_connector(base_path, Some("https"), https_connector) - } - - /// Create a client with a TLS connection to the server using a pinned certificate - /// - /// # Arguments - /// * `base_path` - base path of the client API, i.e. "https://www.my-api-implementation.com" - /// * `ca_certificate` - Path to CA certificate used to authenticate the server - #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] - pub fn try_new_https_pinned( - base_path: &str, - ca_certificate: CA, - ) -> Result - where - CA: AsRef, - { - let https_connector = Connector::builder() - .https() - .pin_server_certificate(ca_certificate) - .build() - .map_err(|e| ClientInitError::SslError(e))?; - Self::try_new_with_connector(base_path, Some("https"), https_connector) - } - - /// Create a client with a mutually authenticated TLS connection to the server. - /// - /// # Arguments - /// * `base_path` - base path of the client API, i.e. "https://www.my-api-implementation.com" - /// * `ca_certificate` - Path to CA certificate used to authenticate the server - /// * `client_key` - Path to the client private key - /// * `client_certificate` - Path to the client's public certificate associated with the private key - #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] - pub fn try_new_https_mutual( - base_path: &str, - ca_certificate: CA, - client_key: K, - client_certificate: D, - ) -> Result - where - CA: AsRef, - K: AsRef, - D: AsRef, - { - let https_connector = Connector::builder() - .https() - .pin_server_certificate(ca_certificate) - .client_authentication(client_key, client_certificate) - .build() - .map_err(|e| ClientInitError::SslError(e))?; - Self::try_new_with_connector(base_path, Some("https"), https_connector) - } -} - -impl Client where - S: Service< - (Request, C), - Response=Response> + Clone + Sync + Send + 'static, - S::Future: Send + 'static, - S::Error: Into + fmt::Display, - C: Clone + Send + Sync + 'static -{ - /// Constructor for creating a `Client` by passing in a pre-made `hyper::service::Service` / - /// `tower::Service` - /// - /// This allows adding custom wrappers around the underlying transport, for example for logging. - pub fn try_new_with_client_service( - client_service: S, - base_path: &str, - ) -> Result - { - Ok(Self { - client_service, - base_path: into_base_path(base_path, None)?, - marker: PhantomData, - }) - } -} - -/// Error type failing to create a Client -#[derive(Debug)] -pub enum ClientInitError { - /// Invalid URL Scheme - InvalidScheme, - - /// Invalid URI - InvalidUri(hyper::http::uri::InvalidUri), - - /// Missing Hostname - MissingHost, - - /// SSL Connection Error - #[cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))] - SslError(native_tls::Error), - - /// SSL Connection Error - #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] - SslError(openssl::error::ErrorStack), -} - -impl From for ClientInitError { - fn from(err: hyper::http::uri::InvalidUri) -> ClientInitError { - ClientInitError::InvalidUri(err) - } -} - -impl fmt::Display for ClientInitError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let s: &dyn fmt::Debug = self; - s.fmt(f) - } -} - -impl Error for ClientInitError { - fn description(&self) -> &str { - "Failed to produce a hyper client." - } -} - -#[async_trait] -impl Api for Client where - S: Service< - (Request, C), - Response=Response> + Clone + Sync + Send + 'static, - S::Future: Send + 'static, - S::Error: Into + fmt::Display, - C: Has + Clone + Send + Sync + 'static, -{ - fn poll_ready(&self, cx: &mut Context) -> Poll> { - match self.client_service.clone().poll_ready(cx) { - Poll::Ready(Err(e)) => Poll::Ready(Err(e.into())), - Poll::Ready(Ok(o)) => Poll::Ready(Ok(o)), - Poll::Pending => Poll::Pending, - } - } - - async fn delete_keychain_entry_v1( - &self, - param_delete_keychain_entry_request_v1: Option, - context: &C) -> Result - { - let mut client_service = self.client_service.clone(); - let mut uri = format!( - "{}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry", - self.base_path - ); - - // Query parameters - let query_string = { - let mut query_string = form_urlencoded::Serializer::new("".to_owned()); - query_string.finish() - }; - if !query_string.is_empty() { - uri += "?"; - uri += &query_string; - } - - let uri = match Uri::from_str(&uri) { - Ok(uri) => uri, - Err(err) => return Err(ApiError(format!("Unable to build URI: {}", err))), - }; - - let mut request = match Request::builder() - .method("POST") - .uri(uri) - .body(Body::empty()) { - Ok(req) => req, - Err(e) => return Err(ApiError(format!("Unable to create request: {}", e))) - }; - - // Body parameter - let body = param_delete_keychain_entry_request_v1.map(|ref body| { - serde_json::to_string(body).expect("impossible to fail to serialize") - }); - if let Some(body) = body { - *request.body_mut() = Body::from(body); - } - - let header = "application/json"; - request.headers_mut().insert(CONTENT_TYPE, match HeaderValue::from_str(header) { - Ok(h) => h, - Err(e) => return Err(ApiError(format!("Unable to create header: {} - {}", header, e))) - }); - let header = HeaderValue::from_str(Has::::get(context).0.clone().to_string().as_str()); - request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { - Ok(h) => h, - Err(e) => return Err(ApiError(format!("Unable to create X-Span ID header value: {}", e))) - }); - - let mut response = client_service.call((request, context.clone())) - .map_err(|e| ApiError(format!("No response received: {}", e))).await?; - - match response.status().as_u16() { - 200 => { - let body = response.into_body(); - let body = body - .to_raw() - .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; - let body = str::from_utf8(&body) - .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; - Ok(DeleteKeychainEntryV1Response::OK - (body) - ) - } - code => { - let headers = response.headers().clone(); - let body = response.into_body() - .take(100) - .to_raw().await; - Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", - code, - headers, - match body { - Ok(body) => match String::from_utf8(body) { - Ok(body) => body, - Err(e) => format!("", e), - }, - Err(e) => format!("", e), - } - ))) - } - } - } - - async fn get_keychain_entry_v1( - &self, - param_get_keychain_entry_request: models::GetKeychainEntryRequest, - context: &C) -> Result - { - let mut client_service = self.client_service.clone(); - let mut uri = format!( - "{}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry", - self.base_path - ); - - // Query parameters - let query_string = { - let mut query_string = form_urlencoded::Serializer::new("".to_owned()); - query_string.finish() - }; - if !query_string.is_empty() { - uri += "?"; - uri += &query_string; - } - - let uri = match Uri::from_str(&uri) { - Ok(uri) => uri, - Err(err) => return Err(ApiError(format!("Unable to build URI: {}", err))), - }; - - let mut request = match Request::builder() - .method("POST") - .uri(uri) - .body(Body::empty()) { - Ok(req) => req, - Err(e) => return Err(ApiError(format!("Unable to create request: {}", e))) - }; - - let body = serde_json::to_string(¶m_get_keychain_entry_request).expect("impossible to fail to serialize"); - *request.body_mut() = Body::from(body); - - let header = "application/json"; - request.headers_mut().insert(CONTENT_TYPE, match HeaderValue::from_str(header) { - Ok(h) => h, - Err(e) => return Err(ApiError(format!("Unable to create header: {} - {}", header, e))) - }); - let header = HeaderValue::from_str(Has::::get(context).0.clone().to_string().as_str()); - request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { - Ok(h) => h, - Err(e) => return Err(ApiError(format!("Unable to create X-Span ID header value: {}", e))) - }); - - let mut response = client_service.call((request, context.clone())) - .map_err(|e| ApiError(format!("No response received: {}", e))).await?; - - match response.status().as_u16() { - 200 => { - let body = response.into_body(); - let body = body - .to_raw() - .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; - let body = str::from_utf8(&body) - .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; - Ok(GetKeychainEntryV1Response::OK - (body) - ) - } - 400 => { - let body = response.into_body(); - Ok( - GetKeychainEntryV1Response::BadRequest - ) - } - 401 => { - let body = response.into_body(); - Ok( - GetKeychainEntryV1Response::AuthorizationInformationIsMissingOrInvalid - ) - } - 404 => { - let body = response.into_body(); - Ok( - GetKeychainEntryV1Response::AKeychainItemWithTheSpecifiedKeyWasNotFound - ) - } - 500 => { - let body = response.into_body(); - Ok( - GetKeychainEntryV1Response::UnexpectedError - ) - } - code => { - let headers = response.headers().clone(); - let body = response.into_body() - .take(100) - .to_raw().await; - Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", - code, - headers, - match body { - Ok(body) => match String::from_utf8(body) { - Ok(body) => body, - Err(e) => format!("", e), - }, - Err(e) => format!("", e), - } - ))) - } - } - } - - async fn get_prometheus_metrics_v1( - &self, - context: &C) -> Result - { - let mut client_service = self.client_service.clone(); - let mut uri = format!( - "{}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics", - self.base_path - ); - - // Query parameters - let query_string = { - let mut query_string = form_urlencoded::Serializer::new("".to_owned()); - query_string.finish() - }; - if !query_string.is_empty() { - uri += "?"; - uri += &query_string; - } - - let uri = match Uri::from_str(&uri) { - Ok(uri) => uri, - Err(err) => return Err(ApiError(format!("Unable to build URI: {}", err))), - }; - - let mut request = match Request::builder() - .method("GET") - .uri(uri) - .body(Body::empty()) { - Ok(req) => req, - Err(e) => return Err(ApiError(format!("Unable to create request: {}", e))) - }; - - let header = HeaderValue::from_str(Has::::get(context).0.clone().to_string().as_str()); - request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { - Ok(h) => h, - Err(e) => return Err(ApiError(format!("Unable to create X-Span ID header value: {}", e))) - }); - - let mut response = client_service.call((request, context.clone())) - .map_err(|e| ApiError(format!("No response received: {}", e))).await?; - - match response.status().as_u16() { - 200 => { - let body = response.into_body(); - let body = body - .to_raw() - .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; - let body = str::from_utf8(&body) - .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = body.to_string(); - Ok(GetPrometheusMetricsV1Response::OK - (body) - ) - } - code => { - let headers = response.headers().clone(); - let body = response.into_body() - .take(100) - .to_raw().await; - Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", - code, - headers, - match body { - Ok(body) => match String::from_utf8(body) { - Ok(body) => body, - Err(e) => format!("", e), - }, - Err(e) => format!("", e), - } - ))) - } - } - } - - async fn has_keychain_entry_v1( - &self, - param_has_keychain_entry_request_v1: Option, - context: &C) -> Result - { - let mut client_service = self.client_service.clone(); - let mut uri = format!( - "{}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry", - self.base_path - ); - - // Query parameters - let query_string = { - let mut query_string = form_urlencoded::Serializer::new("".to_owned()); - query_string.finish() - }; - if !query_string.is_empty() { - uri += "?"; - uri += &query_string; - } - - let uri = match Uri::from_str(&uri) { - Ok(uri) => uri, - Err(err) => return Err(ApiError(format!("Unable to build URI: {}", err))), - }; - - let mut request = match Request::builder() - .method("POST") - .uri(uri) - .body(Body::empty()) { - Ok(req) => req, - Err(e) => return Err(ApiError(format!("Unable to create request: {}", e))) - }; - - let body = param_has_keychain_entry_request_v1.map(|ref body| { - serde_json::to_string(body).expect("impossible to fail to serialize") - }); - if let Some(body) = body { - *request.body_mut() = Body::from(body); - } - - let header = "application/json"; - request.headers_mut().insert(CONTENT_TYPE, match HeaderValue::from_str(header) { - Ok(h) => h, - Err(e) => return Err(ApiError(format!("Unable to create header: {} - {}", header, e))) - }); - let header = HeaderValue::from_str(Has::::get(context).0.clone().to_string().as_str()); - request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { - Ok(h) => h, - Err(e) => return Err(ApiError(format!("Unable to create X-Span ID header value: {}", e))) - }); - - let mut response = client_service.call((request, context.clone())) - .map_err(|e| ApiError(format!("No response received: {}", e))).await?; - - match response.status().as_u16() { - 200 => { - let body = response.into_body(); - let body = body - .to_raw() - .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; - let body = str::from_utf8(&body) - .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; - Ok(HasKeychainEntryV1Response::OK - (body) - ) - } - code => { - let headers = response.headers().clone(); - let body = response.into_body() - .take(100) - .to_raw().await; - Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", - code, - headers, - match body { - Ok(body) => match String::from_utf8(body) { - Ok(body) => body, - Err(e) => format!("", e), - }, - Err(e) => format!("", e), - } - ))) - } - } - } - - async fn set_keychain_entry_v1( - &self, - param_set_keychain_entry_request: models::SetKeychainEntryRequest, - context: &C) -> Result - { - let mut client_service = self.client_service.clone(); - let mut uri = format!( - "{}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry", - self.base_path - ); - - // Query parameters - let query_string = { - let mut query_string = form_urlencoded::Serializer::new("".to_owned()); - query_string.finish() - }; - if !query_string.is_empty() { - uri += "?"; - uri += &query_string; - } - - let uri = match Uri::from_str(&uri) { - Ok(uri) => uri, - Err(err) => return Err(ApiError(format!("Unable to build URI: {}", err))), - }; - - let mut request = match Request::builder() - .method("POST") - .uri(uri) - .body(Body::empty()) { - Ok(req) => req, - Err(e) => return Err(ApiError(format!("Unable to create request: {}", e))) - }; - - let body = serde_json::to_string(¶m_set_keychain_entry_request).expect("impossible to fail to serialize"); - - *request.body_mut() = Body::from(body); - - let header = "application/json"; - request.headers_mut().insert(CONTENT_TYPE, match HeaderValue::from_str(header) { - Ok(h) => h, - Err(e) => return Err(ApiError(format!("Unable to create header: {} - {}", header, e))) - }); - - let header = HeaderValue::from_str(Has::::get(context).0.clone().to_string().as_str()); - request.headers_mut().insert(HeaderName::from_static("x-span-id"), match header { - Ok(h) => h, - Err(e) => return Err(ApiError(format!("Unable to create X-Span ID header value: {}", e))) - }); - - let mut response = client_service.call((request, context.clone())) - .map_err(|e| ApiError(format!("No response received: {}", e))).await?; - - match response.status().as_u16() { - 200 => { - let body = response.into_body(); - let body = body - .to_raw() - .map_err(|e| ApiError(format!("Failed to read response: {}", e))).await?; - let body = str::from_utf8(&body) - .map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?; - let body = serde_json::from_str::(body)?; - Ok(SetKeychainEntryV1Response::OK - (body) - ) - } - 400 => { - let body = response.into_body(); - Ok( - SetKeychainEntryV1Response::BadRequest - ) - } - 401 => { - let body = response.into_body(); - Ok( - SetKeychainEntryV1Response::AuthorizationInformationIsMissingOrInvalid - ) - } - 500 => { - let body = response.into_body(); - Ok( - SetKeychainEntryV1Response::UnexpectedError - ) - } - code => { - let headers = response.headers().clone(); - let body = response.into_body() - .take(100) - .to_raw().await; - Err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", - code, - headers, - match body { - Ok(body) => match String::from_utf8(body) { - Ok(body) => body, - Err(e) => format!("", e), - }, - Err(e) => format!("", e), - } - ))) - } - } - } - -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/context.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/context.rs deleted file mode 100644 index fadd880b96..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/context.rs +++ /dev/null @@ -1,113 +0,0 @@ -use futures::future::BoxFuture; -use hyper::header::HeaderName; -use hyper::{Error, Request, Response, StatusCode, service::Service}; -use url::form_urlencoded; -use std::default::Default; -use std::io; -use std::marker::PhantomData; -use std::task::{Poll, Context}; -use swagger::auth::{AuthData, Authorization, Bearer, Scopes}; -use swagger::{EmptyContext, Has, Pop, Push, XSpanIdString}; -use crate::Api; - -pub struct MakeAddContext { - inner: T, - marker: PhantomData, -} - -impl MakeAddContext -where - A: Default + Push, - B: Push, Result = C>, - C: Push, Result = D>, -{ - pub fn new(inner: T) -> MakeAddContext { - MakeAddContext { - inner, - marker: PhantomData, - } - } -} - -// Make a service that adds context. -impl Service for - MakeAddContext -where - Target: Send, - A: Default + Push + Send, - B: Push, Result = C>, - C: Push, Result = D>, - D: Send + 'static, - T: Service + Send, - T::Future: Send + 'static -{ - type Error = T::Error; - type Response = AddContext; - type Future = BoxFuture<'static, Result>; - - fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { - self.inner.poll_ready(cx) - } - - fn call(&mut self, target: Target) -> Self::Future { - let service = self.inner.call(target); - - Box::pin(async move { - Ok(AddContext::new(service.await?)) - }) - } -} - -/// Middleware to add context data from the request -pub struct AddContext -where - A: Default + Push, - B: Push, Result = C>, - C: Push, Result = D> -{ - inner: T, - marker: PhantomData, -} - -impl AddContext -where - A: Default + Push, - B: Push, Result = C>, - C: Push, Result = D>, -{ - pub fn new(inner: T) -> Self { - AddContext { - inner, - marker: PhantomData, - } - } -} - -impl Service> for AddContext - where - A: Default + Push, - B: Push, Result=C>, - C: Push, Result=D>, - D: Send + 'static, - T: Service<(Request, D)> -{ - type Error = T::Error; - type Future = T::Future; - type Response = T::Response; - - fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { - self.inner.poll_ready(cx) - } - - - fn call(&mut self, request: Request) -> Self::Future { - let context = A::default().push(XSpanIdString::get_or_generate(&request)); - let headers = request.headers(); - - - let context = context.push(None::); - let context = context.push(None::); - - self.inner.call((request, context)) - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/header.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/header.rs deleted file mode 100644 index 5bc6ebe929..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/header.rs +++ /dev/null @@ -1,180 +0,0 @@ -use chrono::{DateTime, Utc}; -use hyper::header::HeaderValue; -use std::convert::TryFrom; -use std::fmt; -use std::ops::Deref; - -/// A struct to allow homogeneous conversion into a HeaderValue. We can't -/// implement the From/Into trait on HeaderValue because we don't own -/// either of the types. -#[derive(Debug, Clone)] -pub(crate) struct IntoHeaderValue(pub T); - -// Generic implementations - -impl Deref for IntoHeaderValue { - type Target = T; - - fn deref(&self) -> &T { - &self.0 - } -} - -// Derive for each TryFrom in hyper::header::HeaderValue - -macro_rules! ihv_generate { - ($t:ident) => { - impl TryFrom for IntoHeaderValue<$t> { - type Error = String; - - fn try_from(hdr_value: HeaderValue) -> Result { - match hdr_value.to_str() { - Ok(hdr_value) => match hdr_value.parse::<$t>() { - Ok(hdr_value) => Ok(IntoHeaderValue(hdr_value)), - Err(e) => Err(format!("Unable to parse {} as a string: {}", - stringify!($t), e)), - }, - Err(e) => Err(format!("Unable to parse header {:?} as a string - {}", - hdr_value, e)), - } - } - } - - impl TryFrom> for HeaderValue { - type Error = String; - - fn try_from(hdr_value: IntoHeaderValue<$t>) -> Result { - Ok(hdr_value.0.into()) - } - } - }; -} - -ihv_generate!(u64); -ihv_generate!(i64); -ihv_generate!(i16); -ihv_generate!(u16); -ihv_generate!(u32); -ihv_generate!(usize); -ihv_generate!(isize); -ihv_generate!(i32); - -// Custom derivations - -// Vec - -impl TryFrom for IntoHeaderValue> { - type Error = String; - - fn try_from(hdr_value: HeaderValue) -> Result { - match hdr_value.to_str() { - Ok(hdr_value) => Ok(IntoHeaderValue( - hdr_value - .split(',') - .filter_map(|x| match x.trim() { - "" => None, - y => Some(y.to_string()), - }) - .collect())), - Err(e) => Err(format!("Unable to parse header: {:?} as a string - {}", - hdr_value, e)), - } - } -} - -impl TryFrom>> for HeaderValue { - type Error = String; - - fn try_from(hdr_value: IntoHeaderValue>) -> Result { - match HeaderValue::from_str(&hdr_value.0.join(", ")) { - Ok(hdr_value) => Ok(hdr_value), - Err(e) => Err(format!("Unable to convert {:?} into a header - {}", - hdr_value, e)) - } - } -} - -// String - -impl TryFrom for IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: HeaderValue) -> Result { - match hdr_value.to_str() { - Ok(hdr_value) => Ok(IntoHeaderValue(hdr_value.to_string())), - Err(e) => Err(format!("Unable to convert header {:?} to {}", - hdr_value, e)), - } - } -} - -impl TryFrom> for HeaderValue { - type Error = String; - - fn try_from(hdr_value: IntoHeaderValue) -> Result { - match HeaderValue::from_str(&hdr_value.0) { - Ok(hdr_value) => Ok(hdr_value), - Err(e) => Err(format!("Unable to convert {:?} from a header {}", - hdr_value, e)) - } - } -} - -// bool -impl TryFrom for IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: HeaderValue) -> Result { - match hdr_value.to_str() { - Ok(hdr_value) => match hdr_value.parse() { - Ok(hdr_value) => Ok(IntoHeaderValue(hdr_value)), - Err(e) => Err(format!("Unable to parse bool from {} - {}", - hdr_value, e)), - }, - Err(e) => Err(format!("Unable to convert {:?} from a header {}", - hdr_value, e)), - } - } -} - -impl TryFrom> for HeaderValue { - type Error = String; - - fn try_from(hdr_value: IntoHeaderValue) -> Result { - match HeaderValue::from_str(&hdr_value.0.to_string()) { - Ok(hdr_value) => Ok(hdr_value), - Err(e) => Err(format!("Unable to convert: {:?} into a header: {}", - hdr_value, e)) - } - } -} - -// DateTime - -impl TryFrom for IntoHeaderValue> { - type Error = String; - - fn try_from(hdr_value: HeaderValue) -> Result { - match hdr_value.to_str() { - Ok(hdr_value) => match DateTime::parse_from_rfc3339(hdr_value) { - Ok(date) => Ok(IntoHeaderValue(date.with_timezone(&Utc))), - Err(e) => Err(format!("Unable to parse: {} as date - {}", - hdr_value, e)), - }, - Err(e) => Err(format!("Unable to convert header {:?} to string {}", - hdr_value, e)), - } - } -} - -impl TryFrom>> for HeaderValue { - type Error = String; - - fn try_from(hdr_value: IntoHeaderValue>) -> Result { - match HeaderValue::from_str(hdr_value.0.to_rfc3339().as_str()) { - Ok(hdr_value) => Ok(hdr_value), - Err(e) => Err(format!("Unable to convert {:?} to a header: {}", - hdr_value, e)), - } - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/lib.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/lib.rs deleted file mode 100644 index 610c0250fe..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/lib.rs +++ /dev/null @@ -1,245 +0,0 @@ -#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] - -use async_trait::async_trait; -use futures::Stream; -use std::error::Error; -use std::task::{Poll, Context}; -use swagger::{ApiError, ContextWrapper}; -use serde::{Serialize, Deserialize}; - -type ServiceError = Box; - -pub const BASE_PATH: &'static str = ""; -pub const API_VERSION: &'static str = "0.3.0"; - -#[derive(Debug, PartialEq, Serialize, Deserialize)] -pub enum DeleteKeychainEntryV1Response { - /// OK - OK - (models::DeleteKeychainEntryResponseV1) -} - -#[derive(Debug, PartialEq, Serialize, Deserialize)] -#[must_use] -pub enum GetKeychainEntryV1Response { - /// OK - OK - (models::GetKeychainEntryResponse) - , - /// Bad request. Key must be a string and longer than 0, shorter than 1024 characters. - BadRequest - , - /// Authorization information is missing or invalid. - AuthorizationInformationIsMissingOrInvalid - , - /// A keychain item with the specified key was not found. - AKeychainItemWithTheSpecifiedKeyWasNotFound - , - /// Unexpected error. - UnexpectedError -} - -#[derive(Debug, PartialEq, Serialize, Deserialize)] -pub enum GetPrometheusMetricsV1Response { - /// OK - OK - (String) -} - -#[derive(Debug, PartialEq, Serialize, Deserialize)] -pub enum HasKeychainEntryV1Response { - /// OK - OK - (models::HasKeychainEntryResponseV1) -} - -#[derive(Debug, PartialEq, Serialize, Deserialize)] -#[must_use] -pub enum SetKeychainEntryV1Response { - /// OK - OK - (models::SetKeychainEntryResponse) - , - /// Bad request. Key must be a string and longer than 0, shorter than 1024 characters. - BadRequest - , - /// Authorization information is missing or invalid. - AuthorizationInformationIsMissingOrInvalid - , - /// Unexpected error. - UnexpectedError -} - -/// API -#[async_trait] -pub trait Api { - fn poll_ready(&self, _cx: &mut Context) -> Poll>> { - Poll::Ready(Ok(())) - } - - /// Deletes an entry from the keychain stored under the provided key. - async fn delete_keychain_entry_v1( - &self, - delete_keychain_entry_request_v1: Option, - context: &C) -> Result; - - /// Retrieves the contents of a keychain entry from the backend. - async fn get_keychain_entry_v1( - &self, - get_keychain_entry_request: models::GetKeychainEntryRequest, - context: &C) -> Result; - - /// Get the Prometheus Metrics - async fn get_prometheus_metrics_v1( - &self, - context: &C) -> Result; - - /// Retrieves the information regarding a key being present on the keychain or not. - async fn has_keychain_entry_v1( - &self, - has_keychain_entry_request_v1: Option, - context: &C) -> Result; - - /// Sets a value under a key on the keychain backend. - async fn set_keychain_entry_v1( - &self, - set_keychain_entry_request: models::SetKeychainEntryRequest, - context: &C) -> Result; - -} - -/// API where `Context` isn't passed on every API call -#[async_trait] -pub trait ApiNoContext { - - fn poll_ready(&self, _cx: &mut Context) -> Poll>>; - - fn context(&self) -> &C; - - /// Deletes an entry from the keychain stored under the provided key. - async fn delete_keychain_entry_v1( - &self, - delete_keychain_entry_request_v1: Option, - ) -> Result; - - /// Retrieves the contents of a keychain entry from the backend. - async fn get_keychain_entry_v1( - &self, - get_keychain_entry_request: models::GetKeychainEntryRequest, - ) -> Result; - - /// Get the Prometheus Metrics - async fn get_prometheus_metrics_v1( - &self, - ) -> Result; - - /// Retrieves the information regarding a key being present on the keychain or not. - async fn has_keychain_entry_v1( - &self, - has_keychain_entry_request_v1: Option, - ) -> Result; - - /// Sets a value under a key on the keychain backend. - async fn set_keychain_entry_v1( - &self, - set_keychain_entry_request: models::SetKeychainEntryRequest, - ) -> Result; - -} - -/// Trait to extend an API to make it easy to bind it to a context. -pub trait ContextWrapperExt where Self: Sized -{ - /// Binds this API to a context. - fn with_context(self: Self, context: C) -> ContextWrapper; -} - -impl + Send + Sync, C: Clone + Send + Sync> ContextWrapperExt for T { - fn with_context(self: T, context: C) -> ContextWrapper { - ContextWrapper::::new(self, context) - } -} - -#[async_trait] -impl + Send + Sync, C: Clone + Send + Sync> ApiNoContext for ContextWrapper { - fn poll_ready(&self, cx: &mut Context) -> Poll> { - self.api().poll_ready(cx) - } - - fn context(&self) -> &C { - ContextWrapper::context(self) - } - - /// Deletes an entry from the keychain stored under the provided key. - async fn delete_keychain_entry_v1( - &self, - delete_keychain_entry_request_v1: Option, - ) -> Result - { - let context = self.context().clone(); - self.api().delete_keychain_entry_v1(delete_keychain_entry_request_v1, &context).await - } - - /// Retrieves the contents of a keychain entry from the backend. - async fn get_keychain_entry_v1( - &self, - get_keychain_entry_request: models::GetKeychainEntryRequest, - ) -> Result - { - let context = self.context().clone(); - self.api().get_keychain_entry_v1(get_keychain_entry_request, &context).await - } - - /// Get the Prometheus Metrics - async fn get_prometheus_metrics_v1( - &self, - ) -> Result - { - let context = self.context().clone(); - self.api().get_prometheus_metrics_v1(&context).await - } - - /// Retrieves the information regarding a key being present on the keychain or not. - async fn has_keychain_entry_v1( - &self, - has_keychain_entry_request_v1: Option, - ) -> Result - { - let context = self.context().clone(); - self.api().has_keychain_entry_v1(has_keychain_entry_request_v1, &context).await - } - - /// Sets a value under a key on the keychain backend. - async fn set_keychain_entry_v1( - &self, - set_keychain_entry_request: models::SetKeychainEntryRequest, - ) -> Result - { - let context = self.context().clone(); - self.api().set_keychain_entry_v1(set_keychain_entry_request, &context).await - } - -} - - -#[cfg(feature = "client")] -pub mod client; - -// Re-export Client as a top-level name -#[cfg(feature = "client")] -pub use client::Client; - -#[cfg(feature = "server")] -pub mod server; - -// Re-export router() as a top-level name -#[cfg(feature = "server")] -pub use self::server::Service; - -#[cfg(feature = "server")] -pub mod context; - -pub mod models; - -#[cfg(any(feature = "client", feature = "server"))] -pub(crate) mod header; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/models.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/models.rs deleted file mode 100644 index 913b7721d3..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/models.rs +++ /dev/null @@ -1,1000 +0,0 @@ -#![allow(unused_qualifications)] - -use crate::models; -#[cfg(any(feature = "client", feature = "server"))] -use crate::header; - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct DeleteKeychainEntryRequestV1 { - /// The key of the entry to delete from the keychain. - #[serde(rename = "key")] - pub key: String, - -} - -impl DeleteKeychainEntryRequestV1 { - pub fn new(key: String, ) -> DeleteKeychainEntryRequestV1 { - DeleteKeychainEntryRequestV1 { - key: key, - } - } -} - -/// Converts the DeleteKeychainEntryRequestV1 value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for DeleteKeychainEntryRequestV1 { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a DeleteKeychainEntryRequestV1 value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for DeleteKeychainEntryRequestV1 { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing DeleteKeychainEntryRequestV1".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing DeleteKeychainEntryRequestV1".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(DeleteKeychainEntryRequestV1 { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in DeleteKeychainEntryRequestV1".to_string())?, - }) - } -} - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for DeleteKeychainEntryRequestV1 - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into DeleteKeychainEntryRequestV1 - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct DeleteKeychainEntryResponseV1 { - /// The key of the entry that was deleted from the keychain. - #[serde(rename = "key")] - pub key: String, - -} - -impl DeleteKeychainEntryResponseV1 { - pub fn new(key: String, ) -> DeleteKeychainEntryResponseV1 { - DeleteKeychainEntryResponseV1 { - key: key, - } - } -} - -/// Converts the DeleteKeychainEntryResponseV1 value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for DeleteKeychainEntryResponseV1 { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a DeleteKeychainEntryResponseV1 value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for DeleteKeychainEntryResponseV1 { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing DeleteKeychainEntryResponseV1".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing DeleteKeychainEntryResponseV1".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(DeleteKeychainEntryResponseV1 { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in DeleteKeychainEntryResponseV1".to_string())?, - }) - } -} - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for DeleteKeychainEntryResponseV1 - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into DeleteKeychainEntryResponseV1 - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct GetKeychainEntryRequest { - /// The key for the entry to get from the keychain. - #[serde(rename = "key")] - pub key: String, - -} - -impl GetKeychainEntryRequest { - pub fn new(key: String, ) -> GetKeychainEntryRequest { - GetKeychainEntryRequest { - key: key, - } - } -} - -/// Converts the GetKeychainEntryRequest value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for GetKeychainEntryRequest { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a GetKeychainEntryRequest value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for GetKeychainEntryRequest { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing GetKeychainEntryRequest".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing GetKeychainEntryRequest".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(GetKeychainEntryRequest { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in GetKeychainEntryRequest".to_string())?, - }) - } -} - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for GetKeychainEntryRequest - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into GetKeychainEntryRequest - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct GetKeychainEntryResponse { - /// The key that was used to retrieve the value from the keychain. - #[serde(rename = "key")] - pub key: String, - - /// The value associated with the requested key on the keychain. - #[serde(rename = "value")] - pub value: String, - -} - -impl GetKeychainEntryResponse { - pub fn new(key: String, value: String, ) -> GetKeychainEntryResponse { - GetKeychainEntryResponse { - key: key, - value: value, - } - } -} - -/// Converts the GetKeychainEntryResponse value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for GetKeychainEntryResponse { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - - params.push("value".to_string()); - params.push(self.value.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a GetKeychainEntryResponse value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for GetKeychainEntryResponse { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - pub value: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing GetKeychainEntryResponse".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), - "value" => intermediate_rep.value.push(::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing GetKeychainEntryResponse".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(GetKeychainEntryResponse { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in GetKeychainEntryResponse".to_string())?, - value: intermediate_rep.value.into_iter().next().ok_or("value missing in GetKeychainEntryResponse".to_string())?, - }) - } -} - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for GetKeychainEntryResponse - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into GetKeychainEntryResponse - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct HasKeychainEntryRequestV1 { - /// The key to check for presence in the keychain. - #[serde(rename = "key")] - pub key: String, - -} - -impl HasKeychainEntryRequestV1 { - pub fn new(key: String, ) -> HasKeychainEntryRequestV1 { - HasKeychainEntryRequestV1 { - key: key, - } - } -} - -/// Converts the HasKeychainEntryRequestV1 value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for HasKeychainEntryRequestV1 { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a HasKeychainEntryRequestV1 value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for HasKeychainEntryRequestV1 { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing HasKeychainEntryRequestV1".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing HasKeychainEntryRequestV1".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(HasKeychainEntryRequestV1 { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in HasKeychainEntryRequestV1".to_string())?, - }) - } -} - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for HasKeychainEntryRequestV1 - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into HasKeychainEntryRequestV1 - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct HasKeychainEntryResponseV1 { - /// The key that was used to check the presence of the value in the keychain. - #[serde(rename = "key")] - pub key: String, - - /// Date and time encoded as JSON when the presence check was performed by the plugin backend. - #[serde(rename = "checkedAt")] - pub checked_at: String, - - /// The boolean true or false indicating the presence or absence of an entry under 'key'. - #[serde(rename = "isPresent")] - pub is_present: bool, - -} - -impl HasKeychainEntryResponseV1 { - pub fn new(key: String, checked_at: String, is_present: bool, ) -> HasKeychainEntryResponseV1 { - HasKeychainEntryResponseV1 { - key: key, - checked_at: checked_at, - is_present: is_present, - } - } -} - -/// Converts the HasKeychainEntryResponseV1 value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for HasKeychainEntryResponseV1 { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - - params.push("checkedAt".to_string()); - params.push(self.checked_at.to_string()); - - - params.push("isPresent".to_string()); - params.push(self.is_present.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a HasKeychainEntryResponseV1 value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for HasKeychainEntryResponseV1 { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - pub checked_at: Vec, - pub is_present: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing HasKeychainEntryResponseV1".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), - "checkedAt" => intermediate_rep.checked_at.push(::from_str(val).map_err(|x| format!("{}", x))?), - "isPresent" => intermediate_rep.is_present.push(::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing HasKeychainEntryResponseV1".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(HasKeychainEntryResponseV1 { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in HasKeychainEntryResponseV1".to_string())?, - checked_at: intermediate_rep.checked_at.into_iter().next().ok_or("checkedAt missing in HasKeychainEntryResponseV1".to_string())?, - is_present: intermediate_rep.is_present.into_iter().next().ok_or("isPresent missing in HasKeychainEntryResponseV1".to_string())?, - }) - } -} - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for HasKeychainEntryResponseV1 - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into HasKeychainEntryResponseV1 - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, PartialOrd, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct PrometheusExporterMetricsResponse(String); - -impl std::convert::From for PrometheusExporterMetricsResponse { - fn from(x: String) -> Self { - PrometheusExporterMetricsResponse(x) - } -} - -impl std::string::ToString for PrometheusExporterMetricsResponse { - fn to_string(&self) -> String { - self.0.to_string() - } -} - -impl std::str::FromStr for PrometheusExporterMetricsResponse { - type Err = std::string::ParseError; - fn from_str(x: &str) -> std::result::Result { - std::result::Result::Ok(PrometheusExporterMetricsResponse(x.to_string())) - } -} - -impl std::convert::From for String { - fn from(x: PrometheusExporterMetricsResponse) -> Self { - x.0 - } -} - -impl std::ops::Deref for PrometheusExporterMetricsResponse { - type Target = String; - fn deref(&self) -> &String { - &self.0 - } -} - -impl std::ops::DerefMut for PrometheusExporterMetricsResponse { - fn deref_mut(&mut self) -> &mut String { - &mut self.0 - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct SetKeychainEntryRequest { - /// The key for the entry to set on the keychain. - #[serde(rename = "key")] - pub key: String, - - /// The value that will be associated with the key on the keychain. - #[serde(rename = "value")] - pub value: String, - -} - -impl SetKeychainEntryRequest { - pub fn new(key: String, value: String, ) -> SetKeychainEntryRequest { - SetKeychainEntryRequest { - key: key, - value: value, - } - } -} - -/// Converts the SetKeychainEntryRequest value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for SetKeychainEntryRequest { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - - params.push("value".to_string()); - params.push(self.value.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a SetKeychainEntryRequest value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for SetKeychainEntryRequest { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - pub value: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing SetKeychainEntryRequest".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), - "value" => intermediate_rep.value.push(::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing SetKeychainEntryRequest".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(SetKeychainEntryRequest { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in SetKeychainEntryRequest".to_string())?, - value: intermediate_rep.value.into_iter().next().ok_or("value missing in SetKeychainEntryRequest".to_string())?, - }) - } -} - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for SetKeychainEntryRequest - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into SetKeychainEntryRequest - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct SetKeychainEntryResponse { - /// The key that was used to set the value on the keychain. - #[serde(rename = "key")] - pub key: String, - -} - -impl SetKeychainEntryResponse { - pub fn new(key: String, ) -> SetKeychainEntryResponse { - SetKeychainEntryResponse { - key: key, - } - } -} - -/// Converts the SetKeychainEntryResponse value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for SetKeychainEntryResponse { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a SetKeychainEntryResponse value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for SetKeychainEntryResponse { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing SetKeychainEntryResponse".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing SetKeychainEntryResponse".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(SetKeychainEntryResponse { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in SetKeychainEntryResponse".to_string())?, - }) - } -} - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for SetKeychainEntryResponse - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into SetKeychainEntryResponse - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/server/mod.rs b/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/server/mod.rs deleted file mode 100644 index f8a7b0c102..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/rust/generated/openapi/rust-server/src/server/mod.rs +++ /dev/null @@ -1,549 +0,0 @@ -use futures::{future, future::BoxFuture, Stream, stream, future::FutureExt, stream::TryStreamExt}; -use hyper::{Request, Response, StatusCode, Body, HeaderMap}; -use hyper::header::{HeaderName, HeaderValue, CONTENT_TYPE}; -use log::warn; -#[allow(unused_imports)] -use std::convert::{TryFrom, TryInto}; -use std::error::Error; -use std::future::Future; -use std::marker::PhantomData; -use std::task::{Context, Poll}; -use swagger::{ApiError, BodyExt, Has, RequestParser, XSpanIdString}; -pub use swagger::auth::Authorization; -use swagger::auth::Scopes; -use url::form_urlencoded; - -#[allow(unused_imports)] -use crate::models; -use crate::header; - -pub use crate::context; - -type ServiceFuture = BoxFuture<'static, Result, crate::ServiceError>>; - -use crate::{Api, - DeleteKeychainEntryV1Response, - GetKeychainEntryV1Response, - GetPrometheusMetricsV1Response, - HasKeychainEntryV1Response, - SetKeychainEntryV1Response -}; - -mod paths { - use lazy_static::lazy_static; - - lazy_static! { - pub static ref GLOBAL_REGEX_SET: regex::RegexSet = regex::RegexSet::new(vec![ - r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry$", - r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry$", - r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics$", - r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry$", - r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry$" - ]) - .expect("Unable to create global regex set"); - } - pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_DELETE_KEYCHAIN_ENTRY: usize = 0; - pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY: usize = 1; - pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_PROMETHEUS_EXPORTER_METRICS: usize = 2; - pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_HAS_KEYCHAIN_ENTRY: usize = 3; - pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY: usize = 4; -} - -pub struct MakeService where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - api_impl: T, - marker: PhantomData, -} - -impl MakeService where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - pub fn new(api_impl: T) -> Self { - MakeService { - api_impl, - marker: PhantomData - } - } -} - -impl hyper::service::Service for MakeService where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - type Response = Service; - type Error = crate::ServiceError; - type Future = future::Ready>; - - fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { - Poll::Ready(Ok(())) - } - - fn call(&mut self, target: Target) -> Self::Future { - futures::future::ok(Service::new( - self.api_impl.clone(), - )) - } -} - -fn method_not_allowed() -> Result, crate::ServiceError> { - Ok( - Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) - .body(Body::empty()) - .expect("Unable to create Method Not Allowed response") - ) -} - -pub struct Service where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - api_impl: T, - marker: PhantomData, -} - -impl Service where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - pub fn new(api_impl: T) -> Self { - Service { - api_impl: api_impl, - marker: PhantomData - } - } -} - -impl Clone for Service where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - fn clone(&self) -> Self { - Service { - api_impl: self.api_impl.clone(), - marker: self.marker.clone(), - } - } -} - -impl hyper::service::Service<(Request, C)> for Service where - T: Api + Clone + Send + Sync + 'static, - C: Has + Send + Sync + 'static -{ - type Response = Response; - type Error = crate::ServiceError; - type Future = ServiceFuture; - - fn poll_ready(&mut self, cx: &mut Context) -> Poll> { - self.api_impl.poll_ready(cx) - } - - fn call(&mut self, req: (Request, C)) -> Self::Future { async fn run(mut api_impl: T, req: (Request, C)) -> Result, crate::ServiceError> where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static - { - let (request, context) = req; - let (parts, body) = request.into_parts(); - let (method, uri, headers) = (parts.method, parts.uri, parts.headers); - let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); - - match &method { - - // DeleteKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_DELETE_KEYCHAIN_ENTRY) => { - // Body parameters (note that non-required body parameters will ignore garbage - // values, rather than causing a 400 response). Produce warning header and logs for - // any unused fields. - let result = body.to_raw().await; - match result { - Ok(body) => { - let mut unused_elements = Vec::new(); - let param_delete_keychain_entry_request_v1: Option = if !body.is_empty() { - let deserializer = &mut serde_json::Deserializer::from_slice(&*body); - match serde_ignored::deserialize(deserializer, |path| { - warn!("Ignoring unknown field in body: {}", path); - unused_elements.push(path.to_string()); - }) { - Ok(param_delete_keychain_entry_request_v1) => param_delete_keychain_entry_request_v1, - Err(_) => None, - } - } else { - None - }; - - let result = api_impl.delete_keychain_entry_v1( - param_delete_keychain_entry_request_v1, - &context - ).await; - let mut response = Response::new(Body::empty()); - response.headers_mut().insert( - HeaderName::from_static("x-span-id"), - HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) - .expect("Unable to create X-Span-ID header value")); - - if !unused_elements.is_empty() { - response.headers_mut().insert( - HeaderName::from_static("warning"), - HeaderValue::from_str(format!("Ignoring unknown fields in body: {:?}", unused_elements).as_str()) - .expect("Unable to create Warning header value")); - } - - match result { - Ok(rsp) => match rsp { - DeleteKeychainEntryV1Response::OK - (body) - => { - *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); - response.headers_mut().insert( - CONTENT_TYPE, - HeaderValue::from_str("application/json") - .expect("Unable to create Content-Type header for DELETE_KEYCHAIN_ENTRY_V1_OK")); - let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); - *response.body_mut() = Body::from(body); - }, - }, - Err(_) => { - // Application code returned an error. This should not happen, as the implementation should - // return a valid response. - *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; - *response.body_mut() = Body::from("An internal error occurred"); - }, - } - - Ok(response) - }, - Err(e) => Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from(format!("Couldn't read body parameter DeleteKeychainEntryRequestV1: {}", e))) - .expect("Unable to create Bad Request response due to unable to read body parameter DeleteKeychainEntryRequestV1")), - } - }, - - // GetKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY) => { - // Body parameters (note that non-required body parameters will ignore garbage - // values, rather than causing a 400 response). Produce warning header and logs for - // any unused fields. - let result = body.to_raw().await; - match result { - Ok(body) => { - let mut unused_elements = Vec::new(); - let param_get_keychain_entry_request: Option = if !body.is_empty() { - let deserializer = &mut serde_json::Deserializer::from_slice(&*body); - match serde_ignored::deserialize(deserializer, |path| { - warn!("Ignoring unknown field in body: {}", path); - unused_elements.push(path.to_string()); - }) { - Ok(param_get_keychain_entry_request) => param_get_keychain_entry_request, - Err(e) => return Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from(format!("Couldn't parse body parameter GetKeychainEntryRequest - doesn't match schema: {}", e))) - .expect("Unable to create Bad Request response for invalid body parameter GetKeychainEntryRequest due to schema")), - } - } else { - None - }; - let param_get_keychain_entry_request = match param_get_keychain_entry_request { - Some(param_get_keychain_entry_request) => param_get_keychain_entry_request, - None => return Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from("Missing required body parameter GetKeychainEntryRequest")) - .expect("Unable to create Bad Request response for missing body parameter GetKeychainEntryRequest")), - }; - - let result = api_impl.get_keychain_entry_v1( - param_get_keychain_entry_request, - &context - ).await; - let mut response = Response::new(Body::empty()); - response.headers_mut().insert( - HeaderName::from_static("x-span-id"), - HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) - .expect("Unable to create X-Span-ID header value")); - - if !unused_elements.is_empty() { - response.headers_mut().insert( - HeaderName::from_static("warning"), - HeaderValue::from_str(format!("Ignoring unknown fields in body: {:?}", unused_elements).as_str()) - .expect("Unable to create Warning header value")); - } - - match result { - Ok(rsp) => match rsp { - GetKeychainEntryV1Response::OK - (body) - => { - *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); - response.headers_mut().insert( - CONTENT_TYPE, - HeaderValue::from_str("application/json") - .expect("Unable to create Content-Type header for GET_KEYCHAIN_ENTRY_V1_OK")); - let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); - *response.body_mut() = Body::from(body); - }, - GetKeychainEntryV1Response::BadRequest - => { - *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); - }, - GetKeychainEntryV1Response::AuthorizationInformationIsMissingOrInvalid - => { - *response.status_mut() = StatusCode::from_u16(401).expect("Unable to turn 401 into a StatusCode"); - }, - GetKeychainEntryV1Response::AKeychainItemWithTheSpecifiedKeyWasNotFound - => { - *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); - }, - GetKeychainEntryV1Response::UnexpectedError - => { - *response.status_mut() = StatusCode::from_u16(500).expect("Unable to turn 500 into a StatusCode"); - }, - }, - Err(_) => { - // Application code returned an error. This should not happen, as the implementation should - // return a valid response. - *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; - *response.body_mut() = Body::from("An internal error occurred"); - }, - } - - Ok(response) - }, - Err(e) => Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from(format!("Couldn't read body parameter GetKeychainEntryRequest: {}", e))) - .expect("Unable to create Bad Request response due to unable to read body parameter GetKeychainEntryRequest")), - } - }, - - // GetPrometheusMetricsV1 - GET /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics - &hyper::Method::GET if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_PROMETHEUS_EXPORTER_METRICS) => { - let result = api_impl.get_prometheus_metrics_v1( - &context - ).await; - let mut response = Response::new(Body::empty()); - response.headers_mut().insert( - HeaderName::from_static("x-span-id"), - HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) - .expect("Unable to create X-Span-ID header value")); - - match result { - Ok(rsp) => match rsp { - GetPrometheusMetricsV1Response::OK - (body) - => { - *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); - response.headers_mut().insert( - CONTENT_TYPE, - HeaderValue::from_str("text/plain") - .expect("Unable to create Content-Type header for GET_PROMETHEUS_METRICS_V1_OK")); - let body = body; - *response.body_mut() = Body::from(body); - }, - }, - Err(_) => { - // Application code returned an error. This should not happen, as the implementation should - // return a valid response. - *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; - *response.body_mut() = Body::from("An internal error occurred"); - }, - } - - Ok(response) - }, - - // HasKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_HAS_KEYCHAIN_ENTRY) => { - // Body parameters (note that non-required body parameters will ignore garbage - // values, rather than causing a 400 response). Produce warning header and logs for - // any unused fields. - let result = body.to_raw().await; - match result { - Ok(body) => { - let mut unused_elements = Vec::new(); - let param_has_keychain_entry_request_v1: Option = if !body.is_empty() { - let deserializer = &mut serde_json::Deserializer::from_slice(&*body); - match serde_ignored::deserialize(deserializer, |path| { - warn!("Ignoring unknown field in body: {}", path); - unused_elements.push(path.to_string()); - }) { - Ok(param_has_keychain_entry_request_v1) => param_has_keychain_entry_request_v1, - Err(_) => None, - } - } else { - None - }; - - let result = api_impl.has_keychain_entry_v1( - param_has_keychain_entry_request_v1, - &context - ).await; - let mut response = Response::new(Body::empty()); - response.headers_mut().insert( - HeaderName::from_static("x-span-id"), - HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) - .expect("Unable to create X-Span-ID header value")); - - if !unused_elements.is_empty() { - response.headers_mut().insert( - HeaderName::from_static("warning"), - HeaderValue::from_str(format!("Ignoring unknown fields in body: {:?}", unused_elements).as_str()) - .expect("Unable to create Warning header value")); - } - - match result { - Ok(rsp) => match rsp { - HasKeychainEntryV1Response::OK - (body) - => { - *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); - response.headers_mut().insert( - CONTENT_TYPE, - HeaderValue::from_str("application/json") - .expect("Unable to create Content-Type header for HAS_KEYCHAIN_ENTRY_V1_OK")); - let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); - *response.body_mut() = Body::from(body); - }, - }, - Err(_) => { - // Application code returned an error. This should not happen, as the implementation should - // return a valid response. - *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; - *response.body_mut() = Body::from("An internal error occurred"); - }, - } - - Ok(response) - }, - Err(e) => Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from(format!("Couldn't read body parameter HasKeychainEntryRequestV1: {}", e))) - .expect("Unable to create Bad Request response due to unable to read body parameter HasKeychainEntryRequestV1")), - } - }, - - // SetKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY) => { - // Body parameters (note that non-required body parameters will ignore garbage - // values, rather than causing a 400 response). Produce warning header and logs for - // any unused fields. - let result = body.to_raw().await; - match result { - Ok(body) => { - let mut unused_elements = Vec::new(); - let param_set_keychain_entry_request: Option = if !body.is_empty() { - let deserializer = &mut serde_json::Deserializer::from_slice(&*body); - match serde_ignored::deserialize(deserializer, |path| { - warn!("Ignoring unknown field in body: {}", path); - unused_elements.push(path.to_string()); - }) { - Ok(param_set_keychain_entry_request) => param_set_keychain_entry_request, - Err(e) => return Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from(format!("Couldn't parse body parameter SetKeychainEntryRequest - doesn't match schema: {}", e))) - .expect("Unable to create Bad Request response for invalid body parameter SetKeychainEntryRequest due to schema")), - } - } else { - None - }; - let param_set_keychain_entry_request = match param_set_keychain_entry_request { - Some(param_set_keychain_entry_request) => param_set_keychain_entry_request, - None => return Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from("Missing required body parameter SetKeychainEntryRequest")) - .expect("Unable to create Bad Request response for missing body parameter SetKeychainEntryRequest")), - }; - - let result = api_impl.set_keychain_entry_v1( - param_set_keychain_entry_request, - &context - ).await; - let mut response = Response::new(Body::empty()); - response.headers_mut().insert( - HeaderName::from_static("x-span-id"), - HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) - .expect("Unable to create X-Span-ID header value")); - - if !unused_elements.is_empty() { - response.headers_mut().insert( - HeaderName::from_static("warning"), - HeaderValue::from_str(format!("Ignoring unknown fields in body: {:?}", unused_elements).as_str()) - .expect("Unable to create Warning header value")); - } - - match result { - Ok(rsp) => match rsp { - SetKeychainEntryV1Response::OK - (body) - => { - *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); - response.headers_mut().insert( - CONTENT_TYPE, - HeaderValue::from_str("application/json") - .expect("Unable to create Content-Type header for SET_KEYCHAIN_ENTRY_V1_OK")); - let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); - *response.body_mut() = Body::from(body); - }, - SetKeychainEntryV1Response::BadRequest - => { - *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); - }, - SetKeychainEntryV1Response::AuthorizationInformationIsMissingOrInvalid - => { - *response.status_mut() = StatusCode::from_u16(401).expect("Unable to turn 401 into a StatusCode"); - }, - SetKeychainEntryV1Response::UnexpectedError - => { - *response.status_mut() = StatusCode::from_u16(500).expect("Unable to turn 500 into a StatusCode"); - }, - }, - Err(_) => { - // Application code returned an error. This should not happen, as the implementation should - // return a valid response. - *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; - *response.body_mut() = Body::from("An internal error occurred"); - }, - } - - Ok(response) - }, - Err(e) => Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from(format!("Couldn't read body parameter SetKeychainEntryRequest: {}", e))) - .expect("Unable to create Bad Request response due to unable to read body parameter SetKeychainEntryRequest")), - } - }, - - _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_DELETE_KEYCHAIN_ENTRY) => method_not_allowed(), - _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY) => method_not_allowed(), - _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_PROMETHEUS_EXPORTER_METRICS) => method_not_allowed(), - _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_HAS_KEYCHAIN_ENTRY) => method_not_allowed(), - _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY) => method_not_allowed(), - _ => Ok(Response::builder().status(StatusCode::NOT_FOUND) - .body(Body::empty()) - .expect("Unable to create Not Found response")) - } - } Box::pin(run(self.api_impl.clone(), req)) } -} - -/// Request parser for `Api`. -pub struct ApiRequestParser; -impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { - let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); - match request.method() { - // DeleteKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_DELETE_KEYCHAIN_ENTRY) => Ok("DeleteKeychainEntryV1"), - // GetKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY) => Ok("GetKeychainEntryV1"), - // GetPrometheusMetricsV1 - GET /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics - &hyper::Method::GET if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_PROMETHEUS_EXPORTER_METRICS) => Ok("GetPrometheusMetricsV1"), - // HasKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_HAS_KEYCHAIN_ENTRY) => Ok("HasKeychainEntryV1"), - // SetKeychainEntryV1 - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY) => Ok("SetKeychainEntryV1"), - _ => Err(()), - } - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 84cd58b4e1..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,468 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Keychain Memory WASM - * Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface DeleteKeychainEntryRequestV1 - */ -export interface DeleteKeychainEntryRequestV1 { - /** - * The key for the entry to check the presence of on the keychain. - * @type {string} - * @memberof DeleteKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface DeleteKeychainEntryResponseV1 - */ -export interface DeleteKeychainEntryResponseV1 { - /** - * The key that was deleted from the keychain. - * @type {string} - * @memberof DeleteKeychainEntryResponseV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryRequestV1 - */ -export interface GetKeychainEntryRequestV1 { - /** - * The key for the entry to get from the keychain. - * @type {string} - * @memberof GetKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryResponseV1 - */ -export interface GetKeychainEntryResponseV1 { - /** - * The key that was used to retrieve the value from the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'key': string; - /** - * The value associated with the requested key on the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'value': string; -} -/** - * - * @export - * @interface HasKeychainEntryRequestV1 - */ -export interface HasKeychainEntryRequestV1 { - /** - * The key to check for presence in the keychain. - * @type {string} - * @memberof HasKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface HasKeychainEntryResponseV1 - */ -export interface HasKeychainEntryResponseV1 { - /** - * The key that was used to check the presence of the value in the entry store. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'key': string; - /** - * Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'checkedAt': string; - /** - * The boolean true or false indicating the presence or absence of an entry under \'key\'. - * @type {boolean} - * @memberof HasKeychainEntryResponseV1 - */ - 'isPresent': boolean; -} -/** - * - * @export - * @interface SetKeychainEntryRequestV1 - */ -export interface SetKeychainEntryRequestV1 { - /** - * The key for the entry to set on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'key': string; - /** - * The value that will be associated with the key on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'value': string; -} -/** - * - * @export - * @interface SetKeychainEntryResponseV1 - */ -export interface SetKeychainEntryResponseV1 { - /** - * The key that was used to set the value on the keychain. - * @type {string} - * @memberof SetKeychainEntryResponseV1 - */ - 'key': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1: async (deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteKeychainEntryRequestV1' is not null or undefined - assertParamExists('deleteKeychainEntryV1', 'deleteKeychainEntryRequestV1', deleteKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1: async (getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getKeychainEntryRequestV1' is not null or undefined - assertParamExists('getKeychainEntryV1', 'getKeychainEntryRequestV1', getKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1: async (hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'hasKeychainEntryRequestV1' is not null or undefined - assertParamExists('hasKeychainEntryV1', 'hasKeychainEntryRequestV1', hasKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(hasKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1: async (setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'setKeychainEntryRequestV1' is not null or undefined - assertParamExists('setKeychainEntryV1', 'setKeychainEntryRequestV1', setKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(setKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getKeychainEntryV1(getKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.hasKeychainEntryV1(hasKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.setKeychainEntryV1(setKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index fecd34dedc..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Keychain Memory WASM - * Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index c01eab8580..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Keychain Memory WASM - * Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 1a3bfd0837..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Keychain Memory WASM - * Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 3cd2080805..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Keychain Memory WASM - * Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.d.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.d.ts deleted file mode 100644 index cec698a76a..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** -* @returns {Promise} -*/ -export function createPluginFactory(): Promise; -/** -*/ -export class PluginFactoryKeychain { - free(): void; -/** -*/ - constructor(); -/** -* @param {any} options_raw -* @returns {PluginKeychainMemoryWasm} -*/ - create(options_raw: any): PluginKeychainMemoryWasm; -} -/** -*/ -export class PluginKeychainMemoryWasm { - free(): void; -/** -* @param {PluginKeychainMemoryWasmOptions} options -*/ - constructor(options: PluginKeychainMemoryWasmOptions); -/** -* @returns {string} -*/ - getPackageName(): string; -/** -* @returns {string} -*/ - getKeychainId(): string; -/** -* @returns {string} -*/ - getInstanceId(): string; -/** -* @returns {Promise} -*/ - onPluginInit(): Promise; -/** -* @param {string} key -* @returns {Promise} -*/ - get(key: string): Promise; -/** -* @param {string} key -* @param {string} value -* @returns {Promise} -*/ - set(key: string, value: string): Promise; -/** -* @param {string} key -* @returns {Promise} -*/ - has(key: string): Promise; -/** -* @param {string} key -* @returns {Promise} -*/ - delete(key: string): Promise; -} -/** -*/ -export class PluginKeychainMemoryWasmOptions { - free(): void; -/** -*/ - instanceId: string; -/** -*/ - keychainId: string; -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.js b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.js deleted file mode 100644 index 7f70182589..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm.js +++ /dev/null @@ -1,512 +0,0 @@ -let imports = {}; -imports['__wbindgen_placeholder__'] = module.exports; -let wasm; -const { TextDecoder, TextEncoder } = require(`util`); - -let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); - -cachedTextDecoder.decode(); - -let cachegetUint8Memory0 = null; -function getUint8Memory0() { - if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) { - cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); - } - return cachegetUint8Memory0; -} - -function getStringFromWasm0(ptr, len) { - return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); -} - -const heap = new Array(32).fill(undefined); - -heap.push(undefined, null, true, false); - -let heap_next = heap.length; - -function addHeapObject(obj) { - if (heap_next === heap.length) heap.push(heap.length + 1); - const idx = heap_next; - heap_next = heap[idx]; - - heap[idx] = obj; - return idx; -} - -function getObject(idx) { return heap[idx]; } - -function dropObject(idx) { - if (idx < 36) return; - heap[idx] = heap_next; - heap_next = idx; -} - -function takeObject(idx) { - const ret = getObject(idx); - dropObject(idx); - return ret; -} - -let WASM_VECTOR_LEN = 0; - -let cachedTextEncoder = new TextEncoder('utf-8'); - -const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' - ? function (arg, view) { - return cachedTextEncoder.encodeInto(arg, view); -} - : function (arg, view) { - const buf = cachedTextEncoder.encode(arg); - view.set(buf); - return { - read: arg.length, - written: buf.length - }; -}); - -function passStringToWasm0(arg, malloc, realloc) { - - if (realloc === undefined) { - const buf = cachedTextEncoder.encode(arg); - const ptr = malloc(buf.length); - getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); - WASM_VECTOR_LEN = buf.length; - return ptr; - } - - let len = arg.length; - let ptr = malloc(len); - - const mem = getUint8Memory0(); - - let offset = 0; - - for (; offset < len; offset++) { - const code = arg.charCodeAt(offset); - if (code > 0x7F) break; - mem[ptr + offset] = code; - } - - if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } - ptr = realloc(ptr, len, len = offset + arg.length * 3); - const view = getUint8Memory0().subarray(ptr + offset, ptr + len); - const ret = encodeString(arg, view); - - offset += ret.written; - } - - WASM_VECTOR_LEN = offset; - return ptr; -} - -let cachegetInt32Memory0 = null; -function getInt32Memory0() { - if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) { - cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); - } - return cachegetInt32Memory0; -} - -function makeMutClosure(arg0, arg1, dtor, f) { - const state = { a: arg0, b: arg1, cnt: 1, dtor }; - const real = (...args) => { - // First up with a closure we increment the internal reference - // count. This ensures that the Rust closure environment won't - // be deallocated while we're invoking it. - state.cnt++; - const a = state.a; - state.a = 0; - try { - return f(a, state.b, ...args); - } finally { - if (--state.cnt === 0) { - wasm.__wbindgen_export_2.get(state.dtor)(a, state.b); - - } else { - state.a = a; - } - } - }; - real.original = state; - - return real; -} -function __wbg_adapter_12(arg0, arg1, arg2) { - wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3fc6a2433749b2e5(arg0, arg1, addHeapObject(arg2)); -} - -function _assertClass(instance, klass) { - if (!(instance instanceof klass)) { - throw new Error(`expected instance of ${klass.name}`); - } - return instance.ptr; -} - -let stack_pointer = 32; - -function addBorrowedObject(obj) { - if (stack_pointer == 1) throw new Error('out of js stack'); - heap[--stack_pointer] = obj; - return stack_pointer; -} -/** -* @returns {Promise} -*/ -module.exports.createPluginFactory = function() { - var ret = wasm.createPluginFactory(); - return takeObject(ret); -}; - -function handleError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - wasm.__wbindgen_exn_store(addHeapObject(e)); - } -} -function __wbg_adapter_33(arg0, arg1, arg2, arg3) { - wasm.wasm_bindgen__convert__closures__invoke2_mut__h86e348db1f6fdb62(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); -} - -/** -*/ -class PluginFactoryKeychain { - - static __wrap(ptr) { - const obj = Object.create(PluginFactoryKeychain.prototype); - obj.ptr = ptr; - - return obj; - } - - __destroy_into_raw() { - const ptr = this.ptr; - this.ptr = 0; - - return ptr; - } - - free() { - const ptr = this.__destroy_into_raw(); - wasm.__wbg_pluginfactorykeychain_free(ptr); - } - /** - */ - constructor() { - var ret = wasm.pluginfactorykeychain_new(); - return PluginFactoryKeychain.__wrap(ret); - } - /** - * @param {any} options_raw - * @returns {PluginKeychainMemoryWasm} - */ - create(options_raw) { - try { - var ret = wasm.pluginfactorykeychain_create(this.ptr, addBorrowedObject(options_raw)); - return PluginKeychainMemoryWasm.__wrap(ret); - } finally { - heap[stack_pointer++] = undefined; - } - } -} -module.exports.PluginFactoryKeychain = PluginFactoryKeychain; -/** -*/ -class PluginKeychainMemoryWasm { - - static __wrap(ptr) { - const obj = Object.create(PluginKeychainMemoryWasm.prototype); - obj.ptr = ptr; - - return obj; - } - - __destroy_into_raw() { - const ptr = this.ptr; - this.ptr = 0; - - return ptr; - } - - free() { - const ptr = this.__destroy_into_raw(); - wasm.__wbg_pluginkeychainmemorywasm_free(ptr); - } - /** - * @param {PluginKeychainMemoryWasmOptions} options - */ - constructor(options) { - _assertClass(options, PluginKeychainMemoryWasmOptions); - var ptr0 = options.ptr; - options.ptr = 0; - var ret = wasm.pluginkeychainmemorywasm_new(ptr0); - return PluginKeychainMemoryWasm.__wrap(ret); - } - /** - * @returns {string} - */ - getPackageName() { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.pluginkeychainmemorywasm_getPackageName(retptr, this.ptr); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - return getStringFromWasm0(r0, r1); - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - wasm.__wbindgen_free(r0, r1); - } - } - /** - * @returns {string} - */ - getKeychainId() { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.pluginkeychainmemorywasm_getKeychainId(retptr, this.ptr); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - return getStringFromWasm0(r0, r1); - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - wasm.__wbindgen_free(r0, r1); - } - } - /** - * @returns {string} - */ - getInstanceId() { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.pluginkeychainmemorywasm_getInstanceId(retptr, this.ptr); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - return getStringFromWasm0(r0, r1); - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - wasm.__wbindgen_free(r0, r1); - } - } - /** - * @returns {Promise} - */ - onPluginInit() { - var ret = wasm.pluginkeychainmemorywasm_onPluginInit(this.ptr); - return takeObject(ret); - } - /** - * @param {string} key - * @returns {Promise} - */ - get(key) { - var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - var ret = wasm.pluginkeychainmemorywasm_get(this.ptr, ptr0, len0); - return takeObject(ret); - } - /** - * @param {string} key - * @param {string} value - * @returns {Promise} - */ - set(key, value) { - var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - var ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - var ret = wasm.pluginkeychainmemorywasm_set(this.ptr, ptr0, len0, ptr1, len1); - return takeObject(ret); - } - /** - * @param {string} key - * @returns {Promise} - */ - has(key) { - var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - var ret = wasm.pluginkeychainmemorywasm_has(this.ptr, ptr0, len0); - return takeObject(ret); - } - /** - * @param {string} key - * @returns {Promise} - */ - delete(key) { - var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - var ret = wasm.pluginkeychainmemorywasm_delete(this.ptr, ptr0, len0); - return takeObject(ret); - } -} -module.exports.PluginKeychainMemoryWasm = PluginKeychainMemoryWasm; -/** -*/ -class PluginKeychainMemoryWasmOptions { - - __destroy_into_raw() { - const ptr = this.ptr; - this.ptr = 0; - - return ptr; - } - - free() { - const ptr = this.__destroy_into_raw(); - wasm.__wbg_pluginkeychainmemorywasmoptions_free(ptr); - } - /** - */ - get instanceId() { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.__wbg_get_pluginkeychainmemorywasmoptions_instanceId(retptr, this.ptr); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - return getStringFromWasm0(r0, r1); - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - wasm.__wbindgen_free(r0, r1); - } - } - /** - * @param {string} arg0 - */ - set instanceId(arg0) { - var ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - wasm.__wbg_set_pluginkeychainmemorywasmoptions_instanceId(this.ptr, ptr0, len0); - } - /** - */ - get keychainId() { - try { - const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.__wbg_get_pluginkeychainmemorywasmoptions_keychainId(retptr, this.ptr); - var r0 = getInt32Memory0()[retptr / 4 + 0]; - var r1 = getInt32Memory0()[retptr / 4 + 1]; - return getStringFromWasm0(r0, r1); - } finally { - wasm.__wbindgen_add_to_stack_pointer(16); - wasm.__wbindgen_free(r0, r1); - } - } - /** - * @param {string} arg0 - */ - set keychainId(arg0) { - var ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - wasm.__wbg_set_pluginkeychainmemorywasmoptions_keychainId(this.ptr, ptr0, len0); - } -} -module.exports.PluginKeychainMemoryWasmOptions = PluginKeychainMemoryWasmOptions; - -module.exports.__wbindgen_string_new = function(arg0, arg1) { - var ret = getStringFromWasm0(arg0, arg1); - return addHeapObject(ret); -}; - -module.exports.__wbindgen_object_drop_ref = function(arg0) { - takeObject(arg0); -}; - -module.exports.__wbg_pluginfactorykeychain_new = function(arg0) { - var ret = PluginFactoryKeychain.__wrap(arg0); - return addHeapObject(ret); -}; - -module.exports.__wbindgen_json_serialize = function(arg0, arg1) { - const obj = getObject(arg1); - var ret = JSON.stringify(obj === undefined ? null : obj); - var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; -}; - -module.exports.__wbindgen_cb_drop = function(arg0) { - const obj = takeObject(arg0).original; - if (obj.cnt-- == 1) { - obj.a = 0; - return true; - } - var ret = false; - return ret; -}; - -module.exports.__wbg_call_346669c262382ad7 = function() { return handleError(function (arg0, arg1, arg2) { - var ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); - return addHeapObject(ret); -}, arguments) }; - -module.exports.__wbg_new_b1d61b5687f5e73a = function(arg0, arg1) { - try { - var state0 = {a: arg0, b: arg1}; - var cb0 = (arg0, arg1) => { - const a = state0.a; - state0.a = 0; - try { - return __wbg_adapter_33(a, state0.b, arg0, arg1); - } finally { - state0.a = a; - } - }; - var ret = new Promise(cb0); - return addHeapObject(ret); - } finally { - state0.a = state0.b = 0; - } -}; - -module.exports.__wbg_resolve_d23068002f584f22 = function(arg0) { - var ret = Promise.resolve(getObject(arg0)); - return addHeapObject(ret); -}; - -module.exports.__wbg_then_2fcac196782070cc = function(arg0, arg1) { - var ret = getObject(arg0).then(getObject(arg1)); - return addHeapObject(ret); -}; - -module.exports.__wbg_new_693216e109162396 = function() { - var ret = new Error(); - return addHeapObject(ret); -}; - -module.exports.__wbg_stack_0ddaca5d1abfb52f = function(arg0, arg1) { - var ret = getObject(arg1).stack; - var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; -}; - -module.exports.__wbg_error_09919627ac0992f5 = function(arg0, arg1) { - try { - console.error(getStringFromWasm0(arg0, arg1)); - } finally { - wasm.__wbindgen_free(arg0, arg1); - } -}; - -module.exports.__wbindgen_throw = function(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); -}; - -module.exports.__wbindgen_closure_wrapper161 = function(arg0, arg1, arg2) { - var ret = makeMutClosure(arg0, arg1, 42, __wbg_adapter_12); - return addHeapObject(ret); -}; - -const path = require('path').join(__dirname, 'cactus_plugin_keychain_memory_wasm_bg.wasm'); -const bytes = require('fs').readFileSync(path); - -const wasmModule = new WebAssembly.Module(bytes); -const wasmInstance = new WebAssembly.Instance(wasmModule, imports); -wasm = wasmInstance.exports; -module.exports.__wasm = wasm; - diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm deleted file mode 100644 index d53b938684..0000000000 Binary files a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm and /dev/null differ diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm.d.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm.d.ts deleted file mode 100644 index 23bbe53793..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export const memory: WebAssembly.Memory; -export function __wbg_pluginkeychainmemorywasmoptions_free(a: number): void; -export function __wbg_get_pluginkeychainmemorywasmoptions_instanceId(a: number, b: number): void; -export function __wbg_set_pluginkeychainmemorywasmoptions_instanceId(a: number, b: number, c: number): void; -export function __wbg_get_pluginkeychainmemorywasmoptions_keychainId(a: number, b: number): void; -export function __wbg_set_pluginkeychainmemorywasmoptions_keychainId(a: number, b: number, c: number): void; -export function __wbg_pluginkeychainmemorywasm_free(a: number): void; -export function pluginkeychainmemorywasm_new(a: number): number; -export function pluginkeychainmemorywasm_getPackageName(a: number, b: number): void; -export function pluginkeychainmemorywasm_getKeychainId(a: number, b: number): void; -export function pluginkeychainmemorywasm_getInstanceId(a: number, b: number): void; -export function pluginkeychainmemorywasm_onPluginInit(a: number): number; -export function pluginkeychainmemorywasm_get(a: number, b: number, c: number): number; -export function pluginkeychainmemorywasm_set(a: number, b: number, c: number, d: number, e: number): number; -export function pluginkeychainmemorywasm_has(a: number, b: number, c: number): number; -export function pluginkeychainmemorywasm_delete(a: number, b: number, c: number): number; -export function __wbg_pluginfactorykeychain_free(a: number): void; -export function pluginfactorykeychain_new(): number; -export function pluginfactorykeychain_create(a: number, b: number): number; -export function createPluginFactory(): number; -export function __wbindgen_malloc(a: number): number; -export function __wbindgen_realloc(a: number, b: number, c: number): number; -export const __wbindgen_export_2: WebAssembly.Table; -export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3fc6a2433749b2e5(a: number, b: number, c: number): void; -export function __wbindgen_add_to_stack_pointer(a: number): number; -export function __wbindgen_free(a: number, b: number): void; -export function __wbindgen_exn_store(a: number): void; -export function wasm_bindgen__convert__closures__invoke2_mut__h86e348db1f6fdb62(a: number, b: number, c: number, d: number): void; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.web.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-factory-keychain.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-factory-keychain.ts deleted file mode 100644 index 4cd9bc1864..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-factory-keychain.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactory } from "@hyperledger/cactus-core-api"; - -import { - IPluginKeychainMemoryWasmOptions, - PluginKeychainMemoryWasm, -} from "./plugin-keychain-memory-wasm"; - -import { createPluginFactory } from "./generated/wasm-pack/cactus_plugin_keychain_memory_wasm"; - -export class PluginFactoryKeychain extends PluginFactory< - PluginKeychainMemoryWasm, - IPluginKeychainMemoryWasmOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions?: IPluginKeychainMemoryWasmOptions, - ): Promise { - const instanceId = uuidv4(); - const keychainId = uuidv4(); - const logLevel = "TRACE"; - const wasmPluginFactory = await createPluginFactory(); - const wasmPlugin = await wasmPluginFactory.create({ - instanceId, - keychainId, - }); - - const options = pluginOptions || { - instanceId, - keychainId, - logLevel, - wasmPlugin, - }; - return new PluginKeychainMemoryWasm(options); - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-keychain-memory-wasm.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-keychain-memory-wasm.ts deleted file mode 100644 index 6410d4f0c0..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/plugin-keychain-memory-wasm.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { Express } from "express"; - -import { Checks } from "@hyperledger/cactus-common"; -import { Logger, LogLevelDesc } from "@hyperledger/cactus-common"; -import { LoggerProvider } from "@hyperledger/cactus-common"; - -import { - ICactusPluginOptions, - IPluginKeychain, - IPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../json/openapi.json"; -import { SetKeychainEntryV1Endpoint } from "./webservices/set-keychain-entry-endpoint-v1"; -import { GetKeychainEntryV1Endpoint } from "./webservices/get-keychain-entry-endpoint-v1"; -import { DeleteKeychainEntryV1Endpoint } from "./webservices/delete-keychain-entry-endpoint-v1"; -import { HasKeychainEntryV1Endpoint } from "./webservices/has-keychain-entry-endpoint-v1"; - -export interface IPluginKeychainMemoryWasmOptions extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - wasmPlugin: IPluginKeychain; - keychainId: string; -} - -export class PluginKeychainMemoryWasm - implements IPluginKeychain, IPluginWebService -{ - public static readonly CLASS_NAME = "PluginKeychainMemoryWasm"; - - private readonly wasm: IPluginKeychain; - private readonly log: Logger; - private readonly instanceId: string; - private endpoints: IWebServiceEndpoint[] | undefined; - - public get className(): string { - return PluginKeychainMemoryWasm.CLASS_NAME; - } - - constructor(public readonly opts: IPluginKeychainMemoryWasmOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.keychainId, `${fnTag} arg options.keychainId`); - Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); - Checks.nonBlankString(opts.keychainId, `${fnTag} options.keychainId`); - Checks.nonBlankString(opts.instanceId, `${fnTag} options.instanceId`); - Checks.truthy(opts.wasmPlugin, `${fnTag} arg options.wasmPlugin`); - - this.wasm = opts.wasmPlugin; - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = this.opts.instanceId; - - this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); - this.log.warn( - `Never use ${this.className} in production. ` + - `It does not support encryption. It stores everything in plain text.`, - ); - } - - public async shutdown(): Promise { - return; - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const endpoints: IWebServiceEndpoint[] = [ - new SetKeychainEntryV1Endpoint({ - plugin: this, - logLevel: this.opts.logLevel, - }), - new GetKeychainEntryV1Endpoint({ - plugin: this, - logLevel: this.opts.logLevel, - }), - new DeleteKeychainEntryV1Endpoint({ - plugin: this, - logLevel: this.opts.logLevel, - }), - new HasKeychainEntryV1Endpoint({ - plugin: this, - logLevel: this.opts.logLevel, - }), - ]; - - this.endpoints = endpoints; - - return endpoints; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getKeychainId(): string { - return this.opts.keychainId; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-keychain-memory-wasm`; - } - - public async onPluginInit(): Promise { - return; - } - - async get(key: string): Promise { - const value = this.wasm.get(key); - if (value) { - return value; - } else { - throw new Error(`Keychain entry for "${key}" not found.`); - } - } - - async has(key: string): Promise { - return this.wasm.has(key); - } - - async set(key: string, value: string): Promise { - return this.wasm.set(key, value); - } - - async delete(key: string): Promise { - return this.wasm.delete(key); - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/public-api.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/public-api.ts deleted file mode 100755 index adb992a739..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/public-api.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { PluginFactoryKeychain } from "./plugin-factory-keychain"; -import * as OpenApiJson from "../json/openapi.json"; -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; - -export { OpenApiJson }; - -export * from "./generated/openapi/typescript-axios/index"; - -export { - PluginKeychainMemoryWasm, - IPluginKeychainMemoryWasmOptions, -} from "./plugin-keychain-memory-wasm"; - -export { PluginFactoryKeychain } from "./plugin-factory-keychain"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryKeychain(pluginFactoryOptions); -} - -export * as wasm from "./generated/wasm-pack/cactus_plugin_keychain_memory_wasm"; -// export * as wasm_bg from "./generated/wasm-pack/cactus_plugin_keychain_memory_wasm_bg.wasm"; diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts deleted file mode 100644 index adb4aff167..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/delete-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,101 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { DeleteKeychainEntryRequestV1 } from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainMemoryWasm } from "../plugin-keychain-memory-wasm"; - -export interface IDeleteKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginKeychainMemoryWasm; -} - -export class DeleteKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeleteKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeleteKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeleteKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/delete-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const { key } = req.body as DeleteKeychainEntryRequestV1; - const resBody = await this.options.plugin.delete(key); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts deleted file mode 100644 index b39e4d7aa7..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/get-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,108 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - GetKeychainEntryRequestV1, - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainMemoryWasm } from "../plugin-keychain-memory-wasm"; - -export interface IGetKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginKeychainMemoryWasm; -} - -export class GetKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return GetKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/get-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const { key } = req.body as GetKeychainEntryRequestV1; - try { - const value = await this.options.plugin.get(key); - res.json({ key, value }); - } catch (ex) { - if (ex?.message?.includes(`${key} secret not found`)) { - res.status(404).json({ - key, - error: ex?.stack || ex?.message, - }); - } else { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts deleted file mode 100644 index a251a63dc7..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/has-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,108 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainMemoryWasm } from "../plugin-keychain-memory-wasm"; -import { HasKeychainEntryRequestV1 } from "@hyperledger/cactus-core-api"; - -export interface IHasKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginKeychainMemoryWasm; -} - -export class HasKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "HasKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return HasKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IHasKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/has-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const reqBody = req.body as HasKeychainEntryRequestV1; - const { key } = reqBody; - const checkedAt = new Date().toJSON(); - const isPresent = await this.options.plugin.has(key); - const resBody = { - isPresent, - key, - checkedAt, - }; - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 039e4c516d..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/main/typescript/webservices/set-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,101 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainMemoryWasm } from "../plugin-keychain-memory-wasm"; -import { SetKeychainEntryRequestV1 } from "@hyperledger/cactus-core-api"; - -export interface ISetKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginKeychainMemoryWasm; -} - -export class SetKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "SetKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return SetKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: ISetKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory-wasm/set-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const { key, value } = req.body as SetKeychainEntryRequestV1; - const resBody = await this.options.plugin.set(key, value); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts deleted file mode 100644 index 9c7340df4b..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts +++ /dev/null @@ -1,144 +0,0 @@ -import bodyParser from "body-parser"; -import express from "express"; -import http from "http"; -import "jest-extended"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; - -import { Bools, IListenOptions, Servers } from "@hyperledger/cactus-common"; - -import { - Configuration, - DefaultApi as KeychainMemoryApi, -} from "../../../main/typescript/public-api"; -import { wasm } from "../../../main/typescript/public-api"; - -import { PluginKeychainMemoryWasm } from "../../../main/typescript"; -import { IPluginKeychainMemoryWasmOptions } from "../../../main/typescript/public-api"; - -describe("PluginKeychainMemoryWasm", () => { - let server: http.Server; - afterAll(async () => { - await Servers.shutdown(server); - }); - it("should not throw when creating a valid instance", () => { - expect( - () => - new PluginKeychainMemoryWasm({ - instanceId: "a", - keychainId: "a", - wasmPlugin: {} as PluginKeychainMemoryWasm, - }), - ).not.toThrow(); - }); - - describe("constructor argument validation", () => { - it("throws for null or empty instanceId", () => { - expect( - () => - new PluginKeychainMemoryWasm({ - instanceId: null as unknown as string, - keychainId: "valid-value", - wasmPlugin: {} as PluginKeychainMemoryWasm, - }), - ).toThrow(); - expect( - () => - new PluginKeychainMemoryWasm({ - instanceId: "", - keychainId: "valid-value", - wasmPlugin: {} as PluginKeychainMemoryWasm, - }), - ).toThrow(); - }); - - it("throws for null or empty keychainId", () => { - expect( - () => - new PluginKeychainMemoryWasm({ - instanceId: "valid-value", - keychainId: null as unknown as string, - wasmPlugin: {} as PluginKeychainMemoryWasm, - }), - ).toThrow(); - expect( - () => - new PluginKeychainMemoryWasm({ - instanceId: "valid-value", - keychainId: "", - wasmPlugin: {} as PluginKeychainMemoryWasm, - }), - ).toThrow(); - }); - }); - - it("get, set, has, delete alters state as expected", async () => { - const instanceId = await uuidv4(); // Assuming uuidv4 is available - const keychainId = await uuidv4(); - - const pluginFactory = await wasm.createPluginFactory(); - const pluginWasm = await pluginFactory.create({ - instanceId, - keychainId, - }); - const options: IPluginKeychainMemoryWasmOptions = { - instanceId, - keychainId, - wasmPlugin: pluginWasm, - }; - const plugin = new PluginKeychainMemoryWasm(options); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const config = new Configuration({ basePath: apiHost }); - const apiClient = new KeychainMemoryApi(config); - - await plugin.registerWebServices(expressApp); - - expect(plugin.getKeychainId()).toBe(options.keychainId); - expect(plugin.getInstanceId()).toBe(options.instanceId); - - const key1 = await uuidv4(); - const value1 = await uuidv4(); - - const hasPriorRes = await apiClient.hasKeychainEntryV1({ key: key1 }); - expect(hasPriorRes).toBeTruthy(); - expect(hasPriorRes.data).toBeTruthy(); - expect(Bools.isBooleanStrict(hasPriorRes.data.isPresent)).toBeTrue(); - - expect(hasPriorRes.data.isPresent).toBeFalsy(); - - await plugin.set(key1, value1); - - expect(await plugin.has(key1)).toBeTruthy(); - - const valueAfter1 = await plugin.get(key1); - expect(valueAfter1).toBeTruthy(); - expect(valueAfter1).toBe(value1); - - await plugin.delete(key1); - - expect(await plugin.has(key1)).toBeFalsy(); - - const key2 = await uuidv4(); - const value2 = await uuidv4(); - - await plugin.set(key2, value2); - - expect(await plugin.has(key2)).toBeTruthy(); - - const valueAfter2 = await plugin.get(key2); - expect(valueAfter2).toBeTruthy(); - expect(valueAfter2).toBe(value2); - }); -}); diff --git a/packages/cactus-plugin-keychain-memory-wasm/tsconfig.json b/packages/cactus-plugin-keychain-memory-wasm/tsconfig.json deleted file mode 100644 index c0d9e767ec..0000000000 --- a/packages/cactus-plugin-keychain-memory-wasm/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "allowJs": true, - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-keychain-memory-wasm.tsbuildinfo" - }, - "include": [ - "./src", - "**/openapi.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/CHANGELOG.md b/packages/cactus-plugin-keychain-memory/CHANGELOG.md deleted file mode 100644 index 36e4a7da26..0000000000 --- a/packages/cactus-plugin-keychain-memory/CHANGELOG.md +++ /dev/null @@ -1,220 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **cactus-common:** coerceUnknownToError() now uses HTML sanitize ([d70488a](https://github.com/hyperledger/cacti/commit/d70488a82e9c1d6958ac3ab0368f3c3bfca378c6)) -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **plugin-keychain-memory:** add ConnectRPC support ([c5fecf6](https://github.com/hyperledger/cacti/commit/c5fecf6802efba0c982db1adc4a98b785c9cb8e0)), closes [#3183](https://github.com/hyperledger/cacti/issues/3183) -* **plugin-keychain-memory:** add observability via RxJS ReplaySubjects ([9b41377](https://github.com/hyperledger/cacti/commit/9b41377c3885cf12be3c0f49bd2745200b0d07d3)) -* **plugin-keychain-memory:** add REST API endpoint implementations ([c7a8fa5](https://github.com/hyperledger/cacti/commit/c7a8fa5e3e33b3c6a1464d9762a66337176e6cdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **cactus-example-supply-chain-app:** mitigate CVE-2022-24434 and CVE-2022-24999 ([d28d5e8](https://github.com/hyperledger/cactus/commit/d28d5e8f3ed5dff1aa049c8f1bccce79aa21e948)), closes [#2041](https://github.com/hyperledger/cactus/issues/2041) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-memory - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **prometheus:** metrics.ts leaks to global registry [#1202](https://github.com/hyperledger/cactus/issues/1202) ([ce076d7](https://github.com/hyperledger/cactus/commit/ce076d709f8e0cba143f8fe9d71f1de1df8f71dc)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Bug Fixes - -* **connector-corda:** fix build broken by operationId rename ([291dd3b](https://github.com/hyperledger/cactus/commit/291dd3bc666939fffbc3780eaefd9059c756878a)) - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) -* keychain to registry, uuid dep, add back missing gas req parameter ([4635d81](https://github.com/hyperledger/cactus/commit/4635d817a719bcdaa2a3bf1b4aa3b5d8cc1f6961)) - -### Features - -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **core-api:** plugin async initializer method ([9678c2e](https://github.com/hyperledger/cactus/commit/9678c2e9288a73589e84f9fd254c26aed6a93297)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* keychain to registry, uuid dep, add back missing gas req parameter ([4635d81](https://github.com/hyperledger/cactus/commit/4635d817a719bcdaa2a3bf1b4aa3b5d8cc1f6961)) - -### Features - -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -### Features - -* **api-server:** add prometheus exporter ([c348aa4](https://github.com/hyperledger/cactus/commit/c348aa4f858536bca350af6abd524a5d345aacc7)), closes [#539](https://github.com/hyperledger/cactus/issues/539) - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **deps:** missing uuid from plugins [#529](https://github.com/hyperledger/cactus/issues/529) ([04ea8bb](https://github.com/hyperledger/cactus/commit/04ea8bb8a035382de078d082889c8fdfd48479f8)) -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) - -### Features - -* **core-api:** plugin import types: LOCAL & REMOTE ([f4d51da](https://github.com/hyperledger/cactus/commit/f4d51dae5b28367e714a2b9aa35dd84a2cb4cb37)) -* **keychain-memory:** add prometheus exporter ([a5affc5](https://github.com/hyperledger/cactus/commit/a5affc526123769cafa878d6a29312596511688e)), closes [#537](https://github.com/hyperledger/cactus/issues/537) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -### Bug Fixes - -* bundle name typos: plugin-keychain-memory ([43a127b](https://github.com/hyperledger/cactus/commit/43a127b2d0cfab7cdcf48d75a452d4ab44721551)) - -### Features - -* **cmd-api-server:** fully dynamic plugin imports via config file/env/CLI ([fe396c9](https://github.com/hyperledger/cactus/commit/fe396c969436f1c1a99b6d03d8b58b160e1a93bb)) -* **core-api:** 🎸 add IKeychainPlugin#getKeychainId() ([34656b0](https://github.com/hyperledger/cactus/commit/34656b0730f886619efbbddb512c094029cbbebd)) -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -### Bug Fixes - -* bundle name typos: plugin-keychain-memory ([43a127b](https://github.com/hyperledger/cactus/commit/43a127b2d0cfab7cdcf48d75a452d4ab44721551)) - -### Features - -* **cmd-api-server:** fully dynamic plugin imports via config file/env/CLI ([fe396c9](https://github.com/hyperledger/cactus/commit/fe396c969436f1c1a99b6d03d8b58b160e1a93bb)) -* **core-api:** 🎸 add IKeychainPlugin#getKeychainId() ([34656b0](https://github.com/hyperledger/cactus/commit/34656b0730f886619efbbddb512c094029cbbebd)) -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) diff --git a/packages/cactus-plugin-keychain-memory/README.md b/packages/cactus-plugin-keychain-memory/README.md deleted file mode 100644 index 5bd00a44f0..0000000000 --- a/packages/cactus-plugin-keychain-memory/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# `@hyperledger/cactus-plugin-keychain-memory` - -## Prometheus Exporter - -This class creates a prometheus exporter, which scrapes the transactions (total transaction count) for the use cases incorporating the use of Keychain memory plugin. - - -### Usage -The prometheus exporter object is initialized in the `PluginKeychainMemory` class constructor itself, so instantiating the object of the `PluginKeychainMemory` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IPluginKeychainMemoryOptions` interface for `PluginKeychainMemory` constructor. - -`getPrometheusMetricsV1` function returns the prometheus exporter metrics, currently displaying the total key count, which currently updates everytime a new key is added/removed from the list of total keys. - -### Prometheus Integration -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'keychain_memory_exporter' - metrics_path: api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory.test.ts) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_keychain_memory_total_key_count** and click **execute** - -### Helper code - -###### response.type.ts -This file contains the various responses of the metrics. - -###### data-fetcher.ts -This file contains functions encasing the logic to process the data points - -###### metrics.ts -This file lists all the prometheus metrics and what they are used for. diff --git a/packages/cactus-plugin-keychain-memory/buf.gen.yaml b/packages/cactus-plugin-keychain-memory/buf.gen.yaml deleted file mode 100644 index f8a5f69913..0000000000 --- a/packages/cactus-plugin-keychain-memory/buf.gen.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# buf.gen.yaml defines a local generation template. -# For details, see https://buf.build/docs/configuration/v1/buf-gen-yaml -version: v1 -plugins: - # This will invoke protoc-gen-es and write output to src/gen - - plugin: es - # packages/cactus-plugin-keychain-memory/src/main/typescript/generated/protoc-gen-es - out: ../../crpc - opt: - # Add more plugin options here - - target=ts - # This will invoke protoc-gen-connect-es - - plugin: connect-es - # packages/cactus-plugin-keychain-memory/src/main/typescript/generated/protoc-gen-connect-es - out: ../../crpc - opt: - # Add more plugin options here - - target=ts \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/openapitools.json b/packages/cactus-plugin-keychain-memory/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-keychain-memory/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-keychain-memory/package.json b/packages/cactus-plugin-keychain-memory/package.json deleted file mode 100644 index 175afa9996..0000000000 --- a/packages/cactus-plugin-keychain-memory/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-keychain-memory", - "version": "2.0.0", - "description": "Dummy keychain implementation doing NO encryption and storing everything in-memory. Only suitable for development and testing.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-keychain-memory.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "codegen:proto": "run-s proto:openapi proto:crpc", - "generate-sdk": "run-s 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "proto:crpc": "yarn run --top-level buf generate --debug --verbose --template=./buf.gen.yaml --output ./src/main/typescript/generated/proto/crpc/ ./src/main/proto/generated/openapi/", - "proto:openapi": "yarn run --top-level openapi-generator-cli generate -i ./src/main/json/openapi.json -g protobuf-schema --model-name-suffix=PB --language-specific-primitives=google.protobuf.Any --type-mappings=AnyType=google.protobuf.Any --type-mappings=object=google.protobuf.Any --additional-properties=packageName=org.hyperledger.cacti.plugin.keychain.memory -o ./src/main/proto/generated/openapi/ -t=./src/main/mustache/openapi-generator/templates/protobuf-schema/ --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@bufbuild/protobuf": "1.10.0", - "@connectrpc/connect": "1.4.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "express": "4.21.0", - "prom-client": "15.1.3", - "rxjs": "7.8.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@bufbuild/buf": "1.30.0", - "@bufbuild/protoc-gen-es": "1.8.0", - "@connectrpc/protoc-gen-connect-es": "1.4.0", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "body-parser": "1.20.3", - "npm-run-all2": "6.1.2" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-keychain-memory.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-keychain-memory.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 28a644e272..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,18 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_delete_keychain_entry_request_v1.go -model_delete_keychain_entry_response_v1.go -model_get_keychain_entry_request_v1.go -model_get_keychain_entry_response_v1.go -model_has_keychain_entry_request_v1.go -model_has_keychain_entry_response_v1.go -model_set_keychain_entry_request_v1.go -model_set_keychain_entry_response_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 966ef5364a..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# Go API client for cactus-plugin-keychain-memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-keychain-memory "github.com/hyperledger/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-memory.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-memory.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-memory.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-keychain-memory.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry | Deletes an entry under a key on the keychain backend. -*DefaultApi* | [**GetKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**HasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry | Checks that an entry exists under a key on the keychain backend -*DefaultApi* | [**SetKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry | Sets a value under a key on the keychain backend. - - -## Documentation For Models - - - [DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 56b49f0547..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,357 +0,0 @@ -openapi: 3.0.3 -info: - description: Contains/describes the Hyperledger Cacti Keychain Memory plugin. - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: 'Hyperledger Cactus Plugin - Keychain Memory ' - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry: - post: - operationId: getKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_get_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "404": - description: A keychain item with the specified key was not found. - "500": - description: Unexpected error. - summary: Retrieves the contents of a keychain entry from the backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry: - post: - operationId: setKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_set_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Sets a value under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry: - post: - operationId: deleteKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_delete_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Deletes an entry under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry: - post: - operationId: hasKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_has_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Checks that an entry exists under a key on the keychain backend - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics -components: - requestBodies: - keychain_get_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryRequestV1' - description: Request body to obtain a keychain entry via its key - required: true - keychain_set_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryRequestV1' - description: Request body to write/update a keychain entry via its key - required: true - keychain_delete_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryRequestV1' - description: Request body to delete a keychain entry via its key - required: true - keychain_has_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryRequestV1' - description: Request body for checking a keychain entry via its key - required: true - responses: - keychain_get_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - keychain_get_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_get_entry_401: - description: Authorization information is missing or invalid. - keychain_get_entry_404: - description: A keychain item with the specified key was not found. - keychain_get_entry_500: - description: Unexpected error. - keychain_set_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - keychain_set_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_set_entry_401: - description: Authorization information is missing or invalid. - keychain_set_entry_500: - description: Unexpected error. - keychain_delete_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - keychain_delete_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_delete_entry_401: - description: Authorization information is missing or invalid. - keychain_delete_entry_500: - description: Unexpected error. - keychain_has_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - keychain_has_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_has_entry_401: - description: Authorization information is missing or invalid. - keychain_has_entry_500: - description: Unexpected error. - schemas: - PrometheusExporterMetricsResponse: - nullable: false - type: string - GetKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to get from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - GetKeychainEntryResponseV1: - example: - value: value - key: key - properties: - key: - description: The key that was used to retrieve the value from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value associated with the requested key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryRequestV1: - additionalProperties: false - example: - value: value - key: key - properties: - key: - description: The key for the entry to set on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value that will be associated with the key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was used to set the value on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to check the presence of on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was deleted from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key to check for presence in the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryResponseV1: - example: - checkedAt: checkedAt - isPresent: true - key: key - properties: - key: - description: The key that was used to check the presence of the value in - the entry store. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - checkedAt: - description: Date and time encoded as JSON when the presence check was performed - by the plugin backend. - nullable: false - type: string - isPresent: - description: The boolean true or false indicating the presence or absence - of an entry under 'key'. - nullable: false - type: boolean - required: - - checkedAt - - isPresent - - key - type: object diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 4d2287bc80..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,556 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeleteKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deleteKeychainEntryRequestV1 *DeleteKeychainEntryRequestV1 -} - -// Request body to delete a keychain entry via its key -func (r ApiDeleteKeychainEntryV1Request) DeleteKeychainEntryRequestV1(deleteKeychainEntryRequestV1 DeleteKeychainEntryRequestV1) ApiDeleteKeychainEntryV1Request { - r.deleteKeychainEntryRequestV1 = &deleteKeychainEntryRequestV1 - return r -} - -func (r ApiDeleteKeychainEntryV1Request) Execute() (*DeleteKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.DeleteKeychainEntryV1Execute(r) -} - -/* -DeleteKeychainEntryV1 Deletes an entry under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeleteKeychainEntryV1Request -*/ -func (a *DefaultApiService) DeleteKeychainEntryV1(ctx context.Context) ApiDeleteKeychainEntryV1Request { - return ApiDeleteKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeleteKeychainEntryResponseV1 -func (a *DefaultApiService) DeleteKeychainEntryV1Execute(r ApiDeleteKeychainEntryV1Request) (*DeleteKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeleteKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.deleteKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("deleteKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deleteKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getKeychainEntryRequestV1 *GetKeychainEntryRequestV1 -} - -// Request body to obtain a keychain entry via its key -func (r ApiGetKeychainEntryV1Request) GetKeychainEntryRequestV1(getKeychainEntryRequestV1 GetKeychainEntryRequestV1) ApiGetKeychainEntryV1Request { - r.getKeychainEntryRequestV1 = &getKeychainEntryRequestV1 - return r -} - -func (r ApiGetKeychainEntryV1Request) Execute() (*GetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.GetKeychainEntryV1Execute(r) -} - -/* -GetKeychainEntryV1 Retrieves the contents of a keychain entry from the backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetKeychainEntryV1Request -*/ -func (a *DefaultApiService) GetKeychainEntryV1(ctx context.Context) ApiGetKeychainEntryV1Request { - return ApiGetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetKeychainEntryResponseV1 -func (a *DefaultApiService) GetKeychainEntryV1Execute(r ApiGetKeychainEntryV1Request) (*GetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("getKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsV1Execute(r) -} - -/* -GetPrometheusMetricsV1 Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsV1Request -*/ -func (a *DefaultApiService) GetPrometheusMetricsV1(ctx context.Context) ApiGetPrometheusMetricsV1Request { - return ApiGetPrometheusMetricsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsV1Execute(r ApiGetPrometheusMetricsV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetricsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiHasKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - hasKeychainEntryRequestV1 *HasKeychainEntryRequestV1 -} - -// Request body for checking a keychain entry via its key -func (r ApiHasKeychainEntryV1Request) HasKeychainEntryRequestV1(hasKeychainEntryRequestV1 HasKeychainEntryRequestV1) ApiHasKeychainEntryV1Request { - r.hasKeychainEntryRequestV1 = &hasKeychainEntryRequestV1 - return r -} - -func (r ApiHasKeychainEntryV1Request) Execute() (*HasKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.HasKeychainEntryV1Execute(r) -} - -/* -HasKeychainEntryV1 Checks that an entry exists under a key on the keychain backend - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHasKeychainEntryV1Request -*/ -func (a *DefaultApiService) HasKeychainEntryV1(ctx context.Context) ApiHasKeychainEntryV1Request { - return ApiHasKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return HasKeychainEntryResponseV1 -func (a *DefaultApiService) HasKeychainEntryV1Execute(r ApiHasKeychainEntryV1Request) (*HasKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HasKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.HasKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.hasKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("hasKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.hasKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - setKeychainEntryRequestV1 *SetKeychainEntryRequestV1 -} - -// Request body to write/update a keychain entry via its key -func (r ApiSetKeychainEntryV1Request) SetKeychainEntryRequestV1(setKeychainEntryRequestV1 SetKeychainEntryRequestV1) ApiSetKeychainEntryV1Request { - r.setKeychainEntryRequestV1 = &setKeychainEntryRequestV1 - return r -} - -func (r ApiSetKeychainEntryV1Request) Execute() (*SetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.SetKeychainEntryV1Execute(r) -} - -/* -SetKeychainEntryV1 Sets a value under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSetKeychainEntryV1Request -*/ -func (a *DefaultApiService) SetKeychainEntryV1(ctx context.Context) ApiSetKeychainEntryV1Request { - return ApiSetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SetKeychainEntryResponseV1 -func (a *DefaultApiService) SetKeychainEntryV1Execute(r ApiSetKeychainEntryV1Request) (*SetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.setKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("setKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.setKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 5db2ce2e2f..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Keychain Memory API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 335715ae82..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 00a696dcdd..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go deleted file mode 100644 index 655da6e627..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryRequestV1{} - -// DeleteKeychainEntryRequestV1 struct for DeleteKeychainEntryRequestV1 -type DeleteKeychainEntryRequestV1 struct { - // The key for the entry to check the presence of on the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryRequestV1 instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryRequestV1(key string) *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryRequestV1WithDefaults instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryRequestV1WithDefaults() *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryRequestV1 struct { - value *DeleteKeychainEntryRequestV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryRequestV1) Get() *DeleteKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryRequestV1) Set(val *DeleteKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryRequestV1(val *DeleteKeychainEntryRequestV1) *NullableDeleteKeychainEntryRequestV1 { - return &NullableDeleteKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go deleted file mode 100644 index 482f97f7b0..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryResponseV1{} - -// DeleteKeychainEntryResponseV1 struct for DeleteKeychainEntryResponseV1 -type DeleteKeychainEntryResponseV1 struct { - // The key that was deleted from the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryResponseV1 instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryResponseV1(key string) *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryResponseV1WithDefaults instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryResponseV1WithDefaults() *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryResponseV1 struct { - value *DeleteKeychainEntryResponseV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryResponseV1) Get() *DeleteKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryResponseV1) Set(val *DeleteKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryResponseV1(val *DeleteKeychainEntryResponseV1) *NullableDeleteKeychainEntryResponseV1 { - return &NullableDeleteKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go deleted file mode 100644 index 259172aaa1..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryRequestV1{} - -// GetKeychainEntryRequestV1 struct for GetKeychainEntryRequestV1 -type GetKeychainEntryRequestV1 struct { - // The key for the entry to get from the keychain. - Key string `json:"key"` -} - -// NewGetKeychainEntryRequestV1 instantiates a new GetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryRequestV1(key string) *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewGetKeychainEntryRequestV1WithDefaults instantiates a new GetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryRequestV1WithDefaults() *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o GetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableGetKeychainEntryRequestV1 struct { - value *GetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableGetKeychainEntryRequestV1) Get() *GetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableGetKeychainEntryRequestV1) Set(val *GetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryRequestV1(val *GetKeychainEntryRequestV1) *NullableGetKeychainEntryRequestV1 { - return &NullableGetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go deleted file mode 100644 index d54d9d47e2..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryResponseV1{} - -// GetKeychainEntryResponseV1 struct for GetKeychainEntryResponseV1 -type GetKeychainEntryResponseV1 struct { - // The key that was used to retrieve the value from the keychain. - Key string `json:"key"` - // The value associated with the requested key on the keychain. - Value string `json:"value"` -} - -// NewGetKeychainEntryResponseV1 instantiates a new GetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryResponseV1(key string, value string) *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - this.Key = key - this.Value = value - return &this -} - -// NewGetKeychainEntryResponseV1WithDefaults instantiates a new GetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryResponseV1WithDefaults() *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *GetKeychainEntryResponseV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *GetKeychainEntryResponseV1) SetValue(v string) { - o.Value = v -} - -func (o GetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableGetKeychainEntryResponseV1 struct { - value *GetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableGetKeychainEntryResponseV1) Get() *GetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableGetKeychainEntryResponseV1) Set(val *GetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryResponseV1(val *GetKeychainEntryResponseV1) *NullableGetKeychainEntryResponseV1 { - return &NullableGetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go deleted file mode 100644 index a509a526e8..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryRequestV1{} - -// HasKeychainEntryRequestV1 struct for HasKeychainEntryRequestV1 -type HasKeychainEntryRequestV1 struct { - // The key to check for presence in the keychain. - Key string `json:"key"` -} - -// NewHasKeychainEntryRequestV1 instantiates a new HasKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryRequestV1(key string) *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewHasKeychainEntryRequestV1WithDefaults instantiates a new HasKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryRequestV1WithDefaults() *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o HasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableHasKeychainEntryRequestV1 struct { - value *HasKeychainEntryRequestV1 - isSet bool -} - -func (v NullableHasKeychainEntryRequestV1) Get() *HasKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableHasKeychainEntryRequestV1) Set(val *HasKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryRequestV1(val *HasKeychainEntryRequestV1) *NullableHasKeychainEntryRequestV1 { - return &NullableHasKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go deleted file mode 100644 index 6827435ade..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryResponseV1{} - -// HasKeychainEntryResponseV1 struct for HasKeychainEntryResponseV1 -type HasKeychainEntryResponseV1 struct { - // The key that was used to check the presence of the value in the entry store. - Key string `json:"key"` - // Date and time encoded as JSON when the presence check was performed by the plugin backend. - CheckedAt string `json:"checkedAt"` - // The boolean true or false indicating the presence or absence of an entry under 'key'. - IsPresent bool `json:"isPresent"` -} - -// NewHasKeychainEntryResponseV1 instantiates a new HasKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryResponseV1(key string, checkedAt string, isPresent bool) *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - this.Key = key - this.CheckedAt = checkedAt - this.IsPresent = isPresent - return &this -} - -// NewHasKeychainEntryResponseV1WithDefaults instantiates a new HasKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryResponseV1WithDefaults() *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetCheckedAt returns the CheckedAt field value -func (o *HasKeychainEntryResponseV1) GetCheckedAt() string { - if o == nil { - var ret string - return ret - } - - return o.CheckedAt -} - -// GetCheckedAtOk returns a tuple with the CheckedAt field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetCheckedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CheckedAt, true -} - -// SetCheckedAt sets field value -func (o *HasKeychainEntryResponseV1) SetCheckedAt(v string) { - o.CheckedAt = v -} - -// GetIsPresent returns the IsPresent field value -func (o *HasKeychainEntryResponseV1) GetIsPresent() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPresent -} - -// GetIsPresentOk returns a tuple with the IsPresent field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetIsPresentOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPresent, true -} - -// SetIsPresent sets field value -func (o *HasKeychainEntryResponseV1) SetIsPresent(v bool) { - o.IsPresent = v -} - -func (o HasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["checkedAt"] = o.CheckedAt - toSerialize["isPresent"] = o.IsPresent - return toSerialize, nil -} - -type NullableHasKeychainEntryResponseV1 struct { - value *HasKeychainEntryResponseV1 - isSet bool -} - -func (v NullableHasKeychainEntryResponseV1) Get() *HasKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableHasKeychainEntryResponseV1) Set(val *HasKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryResponseV1(val *HasKeychainEntryResponseV1) *NullableHasKeychainEntryResponseV1 { - return &NullableHasKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go deleted file mode 100644 index ca2a910aa1..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryRequestV1{} - -// SetKeychainEntryRequestV1 struct for SetKeychainEntryRequestV1 -type SetKeychainEntryRequestV1 struct { - // The key for the entry to set on the keychain. - Key string `json:"key"` - // The value that will be associated with the key on the keychain. - Value string `json:"value"` -} - -// NewSetKeychainEntryRequestV1 instantiates a new SetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryRequestV1(key string, value string) *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - this.Key = key - this.Value = value - return &this -} - -// NewSetKeychainEntryRequestV1WithDefaults instantiates a new SetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryRequestV1WithDefaults() *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *SetKeychainEntryRequestV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *SetKeychainEntryRequestV1) SetValue(v string) { - o.Value = v -} - -func (o SetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableSetKeychainEntryRequestV1 struct { - value *SetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableSetKeychainEntryRequestV1) Get() *SetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableSetKeychainEntryRequestV1) Set(val *SetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryRequestV1(val *SetKeychainEntryRequestV1) *NullableSetKeychainEntryRequestV1 { - return &NullableSetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go deleted file mode 100644 index 5fb9d55d3f..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryResponseV1{} - -// SetKeychainEntryResponseV1 struct for SetKeychainEntryResponseV1 -type SetKeychainEntryResponseV1 struct { - // The key that was used to set the value on the keychain. - Key string `json:"key"` -} - -// NewSetKeychainEntryResponseV1 instantiates a new SetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryResponseV1(key string) *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewSetKeychainEntryResponseV1WithDefaults instantiates a new SetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryResponseV1WithDefaults() *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o SetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableSetKeychainEntryResponseV1 struct { - value *SetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableSetKeychainEntryResponseV1) Get() *SetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableSetKeychainEntryResponseV1) Set(val *SetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryResponseV1(val *SetKeychainEntryResponseV1) *NullableSetKeychainEntryResponseV1 { - return &NullableSetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index e8ac28e861..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 1c39df8756..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-keychain-memory - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-keychain-memory_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeleteKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeleteKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetricsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetricsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService HasKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.HasKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index ddb6f82b2d..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-memory - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/json/openapi.json b/packages/cactus-plugin-keychain-memory/src/main/json/openapi.json deleted file mode 100644 index 0c82886a4b..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/json/openapi.json +++ /dev/null @@ -1,429 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Keychain Memory ", - "description": "Contains/describes the Hyperledger Cacti Keychain Memory plugin.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to get from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "GetKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "value"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to retrieve the value from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value associated with the requested key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryRequestV1": { - "type": "object", - "required": ["key", "value"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to set on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value that will be associated with the key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to set the value on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to check the presence of on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was deleted from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key to check for presence in the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "isPresent", "checkedAt"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to check the presence of the value in the entry store.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "checkedAt": { - "type": "string", - "description": "Date and time encoded as JSON when the presence check was performed by the plugin backend.", - "nullable": false - }, - "isPresent": { - "type": "boolean", - "description": "The boolean true or false indicating the presence or absence of an entry under 'key'.", - "nullable": false - } - } - } - }, - "requestBodies": { - "keychain_get_entry_request_body": { - "description": "Request body to obtain a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryRequestV1" - } - } - } - }, - "keychain_set_entry_request_body": { - "description": "Request body to write/update a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryRequestV1" - } - } - } - }, - "keychain_delete_entry_request_body": { - "description": "Request body to delete a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryRequestV1" - } - } - } - }, - "keychain_has_entry_request_body": { - "description": "Request body for checking a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryRequestV1" - } - } - } - } - }, - "responses": { - "keychain_get_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryResponseV1" - } - } - } - }, - "keychain_get_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_get_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_get_entry_404": { - "description": "A keychain item with the specified key was not found." - }, - "keychain_get_entry_500": { - "description": "Unexpected error." - }, - "keychain_set_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryResponseV1" - } - } - } - }, - "keychain_set_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_set_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_set_entry_500": { - "description": "Unexpected error." - }, - "keychain_delete_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryResponseV1" - } - } - } - }, - "keychain_delete_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_delete_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_delete_entry_500": { - "description": "Unexpected error." - }, - "keychain_has_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryResponseV1" - } - } - } - }, - "keychain_has_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_has_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_has_entry_500": { - "description": "Unexpected error." - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes an entry under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_delete_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_delete_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_delete_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_delete_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_delete_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Checks that an entry exists under a key on the keychain backend", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_has_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_has_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_has_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_has_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_has_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/json/openapi.tpl.json b/packages/cactus-plugin-keychain-memory/src/main/json/openapi.tpl.json deleted file mode 100644 index 943a5f9843..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Keychain Memory ", - "description": "Contains/describes the Hyperledger Cacti Keychain Memory plugin.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes an entry under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_delete_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Checks that an entry exists under a key on the keychain backend", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_has_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 15e43f61f3..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,31 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 1aed89212f..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - Keychain Memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**deleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry | Deletes an entry under a key on the keychain backend. -*DefaultApi* | [**getKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**getPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**hasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry | Checks that an entry exists under a key on the keychain backend -*DefaultApi* | [**setKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry | Sets a value under a key on the keychain backend. - - - -## Documentation for Models - - - [org.openapitools.client.models.DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [org.openapitools.client.models.DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [org.openapitools.client.models.GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [org.openapitools.client.models.HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [org.openapitools.client.models.HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [org.openapitools.client.models.SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index 9655b8dd95..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,413 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.DeleteKeychainEntryRequestV1 -import org.openapitools.client.models.DeleteKeychainEntryResponseV1 -import org.openapitools.client.models.GetKeychainEntryRequestV1 -import org.openapitools.client.models.GetKeychainEntryResponseV1 -import org.openapitools.client.models.HasKeychainEntryRequestV1 -import org.openapitools.client.models.HasKeychainEntryResponseV1 -import org.openapitools.client.models.SetKeychainEntryRequestV1 -import org.openapitools.client.models.SetKeychainEntryResponseV1 - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Deletes an entry under a key on the keychain backend. - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return DeleteKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : DeleteKeychainEntryResponseV1 { - val localVarResponse = deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DeleteKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Deletes an entry under a key on the keychain backend. - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation deleteKeychainEntryV1 - * - * @param deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @return RequestConfig - */ - fun deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = deleteKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return GetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : GetKeychainEntryResponseV1 { - val localVarResponse = getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getKeychainEntryV1 - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return RequestConfig - */ - fun getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = getKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get the Prometheus Metrics - * - * @return kotlin.String - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getPrometheusMetricsV1() : kotlin.String { - val localVarResponse = getPrometheusMetricsV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get the Prometheus Metrics - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getPrometheusMetricsV1WithHttpInfo() : ApiResponse { - val localVariableConfig = getPrometheusMetricsV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getPrometheusMetricsV1 - * - * @return RequestConfig - */ - fun getPrometheusMetricsV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Checks that an entry exists under a key on the keychain backend - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return HasKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : HasKeychainEntryResponseV1 { - val localVarResponse = hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as HasKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Checks that an entry exists under a key on the keychain backend - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation hasKeychainEntryV1 - * - * @param hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @return RequestConfig - */ - fun hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = hasKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return SetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : SetKeychainEntryResponseV1 { - val localVarResponse = setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as SetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation setKeychainEntryV1 - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return RequestConfig - */ - fun setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = setKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt deleted file mode 100644 index 58a98174cf..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to check the presence of on the keychain. - */ - - -data class DeleteKeychainEntryRequestV1 ( - - /* The key for the entry to check the presence of on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt deleted file mode 100644 index 7b8b874e3d..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was deleted from the keychain. - */ - - -data class DeleteKeychainEntryResponseV1 ( - - /* The key that was deleted from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt deleted file mode 100644 index ea1d0da587..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to get from the keychain. - */ - - -data class GetKeychainEntryRequestV1 ( - - /* The key for the entry to get from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt deleted file mode 100644 index 21b9a38b46..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to retrieve the value from the keychain. - * @param `value` The value associated with the requested key on the keychain. - */ - - -data class GetKeychainEntryResponseV1 ( - - /* The key that was used to retrieve the value from the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value associated with the requested key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt deleted file mode 100644 index c3055c3414..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key to check for presence in the keychain. - */ - - -data class HasKeychainEntryRequestV1 ( - - /* The key to check for presence in the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt deleted file mode 100644 index 6345c51831..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to check the presence of the value in the entry store. - * @param checkedAt Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @param isPresent The boolean true or false indicating the presence or absence of an entry under 'key'. - */ - - -data class HasKeychainEntryResponseV1 ( - - /* The key that was used to check the presence of the value in the entry store. */ - @Json(name = "key") - val key: kotlin.String, - - /* Date and time encoded as JSON when the presence check was performed by the plugin backend. */ - @Json(name = "checkedAt") - val checkedAt: kotlin.String, - - /* The boolean true or false indicating the presence or absence of an entry under 'key'. */ - @Json(name = "isPresent") - val isPresent: kotlin.Boolean - -) - diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt deleted file mode 100644 index d016fc72e6..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to set on the keychain. - * @param `value` The value that will be associated with the key on the keychain. - */ - - -data class SetKeychainEntryRequestV1 ( - - /* The key for the entry to set on the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value that will be associated with the key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt deleted file mode 100644 index 3f7624cd59..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to set the value on the keychain. - */ - - -data class SetKeychainEntryResponseV1 ( - - /* The key that was used to set the value on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-memory/src/main/mustache/openapi-generator/templates/protobuf-schema/api.mustache b/packages/cactus-plugin-keychain-memory/src/main/mustache/openapi-generator/templates/protobuf-schema/api.mustache deleted file mode 100644 index b728d9e71f..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/mustache/openapi-generator/templates/protobuf-schema/api.mustache +++ /dev/null @@ -1,46 +0,0 @@ -{{>partial_header}} -syntax = "proto3"; - -package {{#lambda.lowercase}}{{{packageName}}}.{{{apiPackage}}}.{{{classname}}};{{/lambda.lowercase}} - -import "google/protobuf/empty.proto"; -{{#imports}} -{{#import}} -import "{{{modelPackage}}}/{{{.}}}.proto"; -{{/import}} -{{/imports}} - -service {{classname}} { -{{#operations}} -{{#operation}} - {{#description}} - // {{{.}}} - {{/description}} - rpc {{operationId}} ({{#hasParams}}{{operationId}}Request{{/hasParams}}{{^hasParams}}google.protobuf.Empty{{/hasParams}}) returns ({{#vendorExtensions.x-grpc-response}}{{.}}{{/vendorExtensions.x-grpc-response}}{{^vendorExtensions.x-grpc-response}}{{operationId}}Response{{/vendorExtensions.x-grpc-response}}); - -{{/operation}} -{{/operations}} -} - -{{#operations}} -{{#operation}} -{{#hasParams}} -message {{operationId}}Request { - {{#allParams}} - {{#description}} - // {{{.}}} - {{/description}} - {{#vendorExtensions.x-protobuf-type}}{{.}} {{/vendorExtensions.x-protobuf-type}}{{vendorExtensions.x-protobuf-data-type}} {{paramName}} = {{vendorExtensions.x-protobuf-index}}; - {{/allParams}} - -} - -{{/hasParams}} -{{^vendorExtensions.x-grpc-response}} -message {{operationId}}Response { - {{{vendorExtensions.x-grpc-response-type}}} data = 1; -} - -{{/vendorExtensions.x-grpc-response}} -{{/operation}} -{{/operations}} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/mustache/openapi-generator/templates/protobuf-schema/model.mustache b/packages/cactus-plugin-keychain-memory/src/main/mustache/openapi-generator/templates/protobuf-schema/model.mustache deleted file mode 100644 index a350fd9e14..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/mustache/openapi-generator/templates/protobuf-schema/model.mustache +++ /dev/null @@ -1,41 +0,0 @@ -{{>partial_header}} -syntax = "proto3"; - -package {{#lambda.lowercase}}{{{packageName}}};{{/lambda.lowercase}} - -import "google/protobuf/any.proto"; - -{{#imports}} -{{#import}} -import "{{{modelPackage}}}/{{{import}}}.proto"; -{{/import}} -{{/imports}} - -{{#models}} -{{#model}} -{{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}message {{classname}} { - - {{#vars}} - {{#description}} - // {{{.}}} - {{/description}} - {{^isEnum}} - {{#vendorExtensions.x-protobuf-type}}{{{.}}} {{/vendorExtensions.x-protobuf-type}}{{{vendorExtensions.x-protobuf-data-type}}} {{{name}}} = {{vendorExtensions.x-protobuf-index}}{{#vendorExtensions.x-protobuf-packed}} [packed=true]{{/vendorExtensions.x-protobuf-packed}}; - {{/isEnum}} - {{#isEnum}} - enum {{enumName}} { - {{#allowableValues}} - {{#enumVars}} - {{{name}}} = {{{protobuf-enum-index}}}; - {{/enumVars}} - {{/allowableValues}} - } - - {{enumName}} {{name}} = {{vendorExtensions.x-protobuf-index}}; - {{/isEnum}} - - {{/vars}} -} -{{/isEnum}} -{{/model}} -{{/models}} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/mustache/openapi-generator/templates/protobuf-schema/root.mustache b/packages/cactus-plugin-keychain-memory/src/main/mustache/openapi-generator/templates/protobuf-schema/root.mustache deleted file mode 100644 index e2df456144..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/mustache/openapi-generator/templates/protobuf-schema/root.mustache +++ /dev/null @@ -1,22 +0,0 @@ -{{>partial_header}} -syntax = "proto3"; - -package {{{packageName}}}; - -{{#vendorExtensions.x-grpc-options}} -option {{{.}}}; -{{/vendorExtensions.x-grpc-options}} - -// Models -{{#models}} -{{#model}} -import "{{modelPackage}}/{{classFilename}}.proto"; -{{/model}} -{{/models}} - -// APIs -{{#apiInfo}} -{{#apis}} -import "{{apiPackage}}/{{classFilename}}.proto"; -{{/apis}} -{{/apiInfo}} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/.openapi-generator/FILES b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/.openapi-generator/FILES deleted file mode 100644 index 5eba9835cf..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/.openapi-generator/FILES +++ /dev/null @@ -1,10 +0,0 @@ -README.md -models/delete_keychain_entry_request_v1_pb.proto -models/delete_keychain_entry_response_v1_pb.proto -models/get_keychain_entry_request_v1_pb.proto -models/get_keychain_entry_response_v1_pb.proto -models/has_keychain_entry_request_v1_pb.proto -models/has_keychain_entry_response_v1_pb.proto -models/set_keychain_entry_request_v1_pb.proto -models/set_keychain_entry_response_v1_pb.proto -services/default_service.proto diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/README.md b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/README.md deleted file mode 100644 index 9399195450..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# gPRC for org.hyperledger.cacti.plugin.keychain.memory - -Contains/describes the Hyperledger Cacti Keychain Memory plugin. - -## Overview -These files were generated by the [OpenAPI Generator](https://openapi-generator.tech) project. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.ProtobufSchemaCodegen - -## Usage - -Below are some usage examples for Go and Ruby. For other languages, please refer to https://grpc.io/docs/quickstart/. - -### Go -``` -# assuming `protoc-gen-go` has been installed with `go get -u github.com/golang/protobuf/protoc-gen-go` -mkdir /var/tmp/go/org.hyperledger.cacti.plugin.keychain.memory -protoc --go_out=/var/tmp/go/org.hyperledger.cacti.plugin.keychain.memory services/* -protoc --go_out=/var/tmp/go/org.hyperledger.cacti.plugin.keychain.memory models/* -``` - -### Ruby -``` -# assuming `grpc_tools_ruby_protoc` has been installed via `gem install grpc-tools` -RUBY_OUTPUT_DIR="/var/tmp/ruby/org.hyperledger.cacti.plugin.keychain.memory" -mkdir $RUBY_OUTPUT_DIR -grpc_tools_ruby_protoc --ruby_out=$RUBY_OUTPUT_DIR --grpc_out=$RUBY_OUTPUT_DIR/lib services/* -grpc_tools_ruby_protoc --ruby_out=$RUBY_OUTPUT_DIR --grpc_out=$RUBY_OUTPUT_DIR/lib models/* -``` diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/delete_keychain_entry_request_v1_pb.proto b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/delete_keychain_entry_request_v1_pb.proto deleted file mode 100644 index c81f014ff6..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/delete_keychain_entry_request_v1_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Keychain Memory - - Contains/describes the Hyperledger Cacti Keychain Memory plugin. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.keychain.memory; - -import "google/protobuf/any.proto"; - - -message DeleteKeychainEntryRequestV1PB { - - // The key for the entry to check the presence of on the keychain. - string key = 106079; - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/delete_keychain_entry_response_v1_pb.proto b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/delete_keychain_entry_response_v1_pb.proto deleted file mode 100644 index 511a5ad80e..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/delete_keychain_entry_response_v1_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Keychain Memory - - Contains/describes the Hyperledger Cacti Keychain Memory plugin. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.keychain.memory; - -import "google/protobuf/any.proto"; - - -message DeleteKeychainEntryResponseV1PB { - - // The key that was deleted from the keychain. - string key = 106079; - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/get_keychain_entry_request_v1_pb.proto b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/get_keychain_entry_request_v1_pb.proto deleted file mode 100644 index 1b1421282f..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/get_keychain_entry_request_v1_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Keychain Memory - - Contains/describes the Hyperledger Cacti Keychain Memory plugin. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.keychain.memory; - -import "google/protobuf/any.proto"; - - -message GetKeychainEntryRequestV1PB { - - // The key for the entry to get from the keychain. - string key = 106079; - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/get_keychain_entry_response_v1_pb.proto b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/get_keychain_entry_response_v1_pb.proto deleted file mode 100644 index 772516c70b..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/get_keychain_entry_response_v1_pb.proto +++ /dev/null @@ -1,26 +0,0 @@ -/* - Hyperledger Cactus Plugin - Keychain Memory - - Contains/describes the Hyperledger Cacti Keychain Memory plugin. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.keychain.memory; - -import "google/protobuf/any.proto"; - - -message GetKeychainEntryResponseV1PB { - - // The key that was used to retrieve the value from the keychain. - string key = 106079; - - // The value associated with the requested key on the keychain. - string value = 111972721; - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/has_keychain_entry_request_v1_pb.proto b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/has_keychain_entry_request_v1_pb.proto deleted file mode 100644 index b869f511fb..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/has_keychain_entry_request_v1_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Keychain Memory - - Contains/describes the Hyperledger Cacti Keychain Memory plugin. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.keychain.memory; - -import "google/protobuf/any.proto"; - - -message HasKeychainEntryRequestV1PB { - - // The key to check for presence in the keychain. - string key = 106079; - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/has_keychain_entry_response_v1_pb.proto b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/has_keychain_entry_response_v1_pb.proto deleted file mode 100644 index 7b79bd1d3a..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/has_keychain_entry_response_v1_pb.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - Hyperledger Cactus Plugin - Keychain Memory - - Contains/describes the Hyperledger Cacti Keychain Memory plugin. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.keychain.memory; - -import "google/protobuf/any.proto"; - - -message HasKeychainEntryResponseV1PB { - - // The key that was used to check the presence of the value in the entry store. - string key = 106079; - - // Date and time encoded as JSON when the presence check was performed by the plugin backend. - string checkedAt = 399084090; - - // The boolean true or false indicating the presence or absence of an entry under 'key'. - bool isPresent = 361185232; - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/set_keychain_entry_request_v1_pb.proto b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/set_keychain_entry_request_v1_pb.proto deleted file mode 100644 index fdf08bb37b..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/set_keychain_entry_request_v1_pb.proto +++ /dev/null @@ -1,26 +0,0 @@ -/* - Hyperledger Cactus Plugin - Keychain Memory - - Contains/describes the Hyperledger Cacti Keychain Memory plugin. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.keychain.memory; - -import "google/protobuf/any.proto"; - - -message SetKeychainEntryRequestV1PB { - - // The key for the entry to set on the keychain. - string key = 106079; - - // The value that will be associated with the key on the keychain. - string value = 111972721; - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/set_keychain_entry_response_v1_pb.proto b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/set_keychain_entry_response_v1_pb.proto deleted file mode 100644 index 09a0ef37c8..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/models/set_keychain_entry_response_v1_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Keychain Memory - - Contains/describes the Hyperledger Cacti Keychain Memory plugin. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.keychain.memory; - -import "google/protobuf/any.proto"; - - -message SetKeychainEntryResponseV1PB { - - // The key that was used to set the value on the keychain. - string key = 106079; - -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/services/default_service.proto b/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/services/default_service.proto deleted file mode 100644 index a64171930a..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/proto/generated/openapi/services/default_service.proto +++ /dev/null @@ -1,65 +0,0 @@ -/* - Hyperledger Cactus Plugin - Keychain Memory - - Contains/describes the Hyperledger Cacti Keychain Memory plugin. - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice; - -import "google/protobuf/empty.proto"; -import "models/delete_keychain_entry_request_v1_pb.proto"; -import "models/delete_keychain_entry_response_v1_pb.proto"; -import "models/get_keychain_entry_request_v1_pb.proto"; -import "models/get_keychain_entry_response_v1_pb.proto"; -import "models/has_keychain_entry_request_v1_pb.proto"; -import "models/has_keychain_entry_response_v1_pb.proto"; -import "models/set_keychain_entry_request_v1_pb.proto"; -import "models/set_keychain_entry_response_v1_pb.proto"; - -service DefaultService { - rpc DeleteKeychainEntryV1 (DeleteKeychainEntryV1Request) returns (DeleteKeychainEntryResponseV1PB); - - rpc GetKeychainEntryV1 (GetKeychainEntryV1Request) returns (GetKeychainEntryResponseV1PB); - - rpc GetPrometheusMetricsV1 (google.protobuf.Empty) returns (GetPrometheusMetricsV1Response); - - rpc HasKeychainEntryV1 (HasKeychainEntryV1Request) returns (HasKeychainEntryResponseV1PB); - - rpc SetKeychainEntryV1 (SetKeychainEntryV1Request) returns (SetKeychainEntryResponseV1PB); - -} - -message DeleteKeychainEntryV1Request { - // Request body to delete a keychain entry via its key - DeleteKeychainEntryRequestV1PB deleteKeychainEntryRequestV1PB = 1; - -} - -message GetKeychainEntryV1Request { - // Request body to obtain a keychain entry via its key - GetKeychainEntryRequestV1PB getKeychainEntryRequestV1PB = 1; - -} - -message GetPrometheusMetricsV1Response { - string data = 1; -} - -message HasKeychainEntryV1Request { - // Request body for checking a keychain entry via its key - HasKeychainEntryRequestV1PB hasKeychainEntryRequestV1PB = 1; - -} - -message SetKeychainEntryV1Request { - // Request body to write/update a keychain entry via its key - SetKeychainEntryRequestV1PB setKeychainEntryRequestV1PB = 1; - -} - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/crpc-services/keychain-memory-crpc-svc-openapi.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/crpc-services/keychain-memory-crpc-svc-openapi.ts deleted file mode 100644 index c85796a2bb..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/crpc-services/keychain-memory-crpc-svc-openapi.ts +++ /dev/null @@ -1,235 +0,0 @@ -import { ConnectError, Code, ServiceImpl } from "@connectrpc/connect"; -import { ServiceType } from "@bufbuild/protobuf"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Strings, -} from "@hyperledger/cactus-common"; - -import { PluginKeychainMemory } from "../plugin-keychain-memory"; - -import { DefaultService } from "../generated/crpc/services/default_service_connect"; - -import { DeleteKeychainEntryResponseV1PB } from "../generated/crpc/models/delete_keychain_entry_response_v1_pb_pb"; -import { DeleteKeychainEntryV1Request } from "../generated/crpc/services/default_service_pb"; - -import { GetKeychainEntryResponseV1PB } from "../generated/crpc/models/get_keychain_entry_response_v1_pb_pb"; -import { GetKeychainEntryV1Request } from "../generated/crpc/services/default_service_pb"; - -import { HasKeychainEntryV1Request } from "../generated/crpc/services/default_service_pb"; -import { HasKeychainEntryResponseV1PB } from "../generated/crpc/models/has_keychain_entry_response_v1_pb_pb"; - -import { SetKeychainEntryV1Request } from "../generated/crpc/services/default_service_pb"; -import { SetKeychainEntryResponseV1PB } from "../generated/crpc/models/set_keychain_entry_response_v1_pb_pb"; - -type DefaultServiceMethodDefinitions = typeof DefaultService.methods; -type DefaultServiceMethodNames = keyof DefaultServiceMethodDefinitions; - -type IKeychainMemoryCrpcSvcOpenApi = { - [key in DefaultServiceMethodNames]: (...args: never[]) => unknown; -}; - -export interface IKeychainMemoryCrpcSvcOpenApiOptions { - readonly logLevel?: LogLevelDesc; - readonly keychain: PluginKeychainMemory; -} - -export class KeychainMemoryCrpcSvcOpenApi - implements IKeychainMemoryCrpcSvcOpenApi, Partial> -{ - // We cannot avoid this due to how the types of the upstream library are - // structured/designed hence we just disable the linter on this particular line. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [k: string]: any; - - public static readonly CLASS_NAME = "KeychainMemoryCrpcSvcOpenApi"; - public readonly logLevel: LogLevelDesc; - private readonly log: Logger; - private readonly keychain: PluginKeychainMemory; - - constructor(readonly opts: IKeychainMemoryCrpcSvcOpenApiOptions) { - this.logLevel = opts.logLevel ? opts.logLevel : "WARN"; - this.log = LoggerProvider.getOrCreate({ - level: this.logLevel, - label: this.className, - }); - if (!opts.keychain) { - throw new Error("Expected truthy opts.keychain property"); - } - if (!(opts.keychain instanceof PluginKeychainMemory)) { - throw new Error("Need opts.keychain as instanceof PluginKeychainMemory"); - } - this.keychain = opts.keychain; - } - - public get className(): string { - return KeychainMemoryCrpcSvcOpenApi.CLASS_NAME; - } - - public async deleteKeychainEntryV1( - req: DeleteKeychainEntryV1Request, - ): Promise { - const fn = "deleteKeychainEntryV1()"; - - this.log.debug("%s ENTRY req=%o", fn, req); - - if (!req) { - throw new ConnectError("Falsy request object.", Code.InvalidArgument); - } - if (!req.deleteKeychainEntryRequestV1PB) { - throw new ConnectError( - "req.deleteKeychainEntryRequestV1PB falsy.", - Code.InvalidArgument, - ); - } - - if (!req.deleteKeychainEntryRequestV1PB.key) { - throw new ConnectError( - "req.deleteKeychainEntryRequestV1PB.key falsy.", - Code.InvalidArgument, - ); - } - - if (!Strings.isNonBlank(req.deleteKeychainEntryRequestV1PB.key)) { - throw new ConnectError( - "req.deleteKeychainEntryRequestV1PB.key wasn't non-blank string.", - Code.InvalidArgument, - ); - } - - const key = req.deleteKeychainEntryRequestV1PB.key; - await this.keychain.delete(key); - this.log.debug("%s Deleted value for key=%s", fn, key); - - const res = new DeleteKeychainEntryResponseV1PB({ key }); - this.log.debug("%s EXIT res=%o", fn, res); - return res; - } - - public async getKeychainEntryV1( - req: GetKeychainEntryV1Request, - ): Promise { - const fn = "getKeychainEntryV1()"; - - this.log.debug("%s ENTRY req=%o", fn, req); - - if (!req) { - throw new ConnectError("Falsy request object.", Code.InvalidArgument); - } - if (!req.getKeychainEntryRequestV1PB) { - throw new ConnectError( - "req.getKeychainEntryRequestV1PB falsy.", - Code.InvalidArgument, - ); - } - - if (!req.getKeychainEntryRequestV1PB.key) { - throw new ConnectError( - "req.getKeychainEntryRequestV1PB.key falsy.", - Code.InvalidArgument, - ); - } - - if (!Strings.isNonBlank(req.getKeychainEntryRequestV1PB.key)) { - throw new ConnectError( - "req.getKeychainEntryRequestV1PB.key wasn't non-blank string.", - Code.InvalidArgument, - ); - } - - const key = req.getKeychainEntryRequestV1PB.key; - const value = await this.keychain.get(key); - this.log.debug("%s Got value=%s for key=%s", fn, value, key); - - const res = new GetKeychainEntryResponseV1PB({ key, value }); - this.log.debug("%s EXIT res=%o", fn, res); - return res; - } - - public async getPrometheusMetricsV1(): Promise { - return; - } - - public async hasKeychainEntryV1( - req: HasKeychainEntryV1Request, - ): Promise { - const fn = "hasKeychainEntryV1()"; - - this.log.debug("%s ENTRY req=%o", fn, req); - - if (!req) { - throw new ConnectError("Falsy request object.", Code.InvalidArgument); - } - if (!req.hasKeychainEntryRequestV1PB) { - throw new ConnectError( - "req.hasKeychainEntryRequestV1PB falsy.", - Code.InvalidArgument, - ); - } - - if (!req.hasKeychainEntryRequestV1PB.key) { - throw new ConnectError( - "req.hasKeychainEntryRequestV1PB.key falsy.", - Code.InvalidArgument, - ); - } - - if (!Strings.isNonBlank(req.hasKeychainEntryRequestV1PB.key)) { - throw new ConnectError( - "req.hasKeychainEntryRequestV1PB.key wasn't non-blank string.", - Code.InvalidArgument, - ); - } - - const key = req.hasKeychainEntryRequestV1PB.key; - const isPresent = await this.keychain.has(key); - const res = new HasKeychainEntryResponseV1PB({ - checkedAt: new Date().toJSON(), - isPresent, - key, - }); - this.log.debug("%s EXIT res=%o", fn, res); - return res; - } - - public async setKeychainEntryV1( - req: SetKeychainEntryV1Request, - ): Promise { - const fn = "setKeychainEntryV1()"; - - this.log.debug("%s ENTRY req=%o", fn, req); - - if (!req) { - throw new ConnectError("Falsy request object.", Code.InvalidArgument); - } - if (!req.setKeychainEntryRequestV1PB) { - throw new ConnectError( - "req.setKeychainEntryRequestV1PB falsy.", - Code.InvalidArgument, - ); - } - - if (!req.setKeychainEntryRequestV1PB.key) { - throw new ConnectError( - "req.setKeychainEntryRequestV1PB.key falsy.", - Code.InvalidArgument, - ); - } - - if (!Strings.isNonBlank(req.setKeychainEntryRequestV1PB.key)) { - throw new ConnectError( - "req.setKeychainEntryRequestV1PB.key wasn't non-blank string.", - Code.InvalidArgument, - ); - } - - const key = req.setKeychainEntryRequestV1PB.key; - const value = req.setKeychainEntryRequestV1PB.value; - await this.keychain.set(key, value); - const res = new SetKeychainEntryResponseV1PB({ key }); - this.log.debug("%s EXIT res=%o", fn, res); - return res; - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/delete_keychain_entry_request_v1_pb_pb.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/delete_keychain_entry_request_v1_pb_pb.ts deleted file mode 100644 index cdb1b6c7d7..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/delete_keychain_entry_request_v1_pb_pb.ts +++ /dev/null @@ -1,56 +0,0 @@ -// -//Hyperledger Cactus Plugin - Keychain Memory -// -//Contains/describes the Hyperledger Cacti Keychain Memory plugin. -// -//The version of the OpenAPI document: 2.0.0 -// -//Generated by OpenAPI Generator: https://openapi-generator.tech - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file models/delete_keychain_entry_request_v1_pb.proto (package org.hyperledger.cacti.plugin.keychain.memory, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.DeleteKeychainEntryRequestV1PB - */ -export class DeleteKeychainEntryRequestV1PB extends Message { - /** - * The key for the entry to check the presence of on the keychain. - * - * @generated from field: string key = 106079; - */ - key = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.DeleteKeychainEntryRequestV1PB"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 106079, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteKeychainEntryRequestV1PB { - return new DeleteKeychainEntryRequestV1PB().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteKeychainEntryRequestV1PB { - return new DeleteKeychainEntryRequestV1PB().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteKeychainEntryRequestV1PB { - return new DeleteKeychainEntryRequestV1PB().fromJsonString(jsonString, options); - } - - static equals(a: DeleteKeychainEntryRequestV1PB | PlainMessage | undefined, b: DeleteKeychainEntryRequestV1PB | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteKeychainEntryRequestV1PB, a, b); - } -} - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/delete_keychain_entry_response_v1_pb_pb.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/delete_keychain_entry_response_v1_pb_pb.ts deleted file mode 100644 index 7a5b815fa4..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/delete_keychain_entry_response_v1_pb_pb.ts +++ /dev/null @@ -1,56 +0,0 @@ -// -//Hyperledger Cactus Plugin - Keychain Memory -// -//Contains/describes the Hyperledger Cacti Keychain Memory plugin. -// -//The version of the OpenAPI document: 2.0.0 -// -//Generated by OpenAPI Generator: https://openapi-generator.tech - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file models/delete_keychain_entry_response_v1_pb.proto (package org.hyperledger.cacti.plugin.keychain.memory, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.DeleteKeychainEntryResponseV1PB - */ -export class DeleteKeychainEntryResponseV1PB extends Message { - /** - * The key that was deleted from the keychain. - * - * @generated from field: string key = 106079; - */ - key = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.DeleteKeychainEntryResponseV1PB"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 106079, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteKeychainEntryResponseV1PB { - return new DeleteKeychainEntryResponseV1PB().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteKeychainEntryResponseV1PB { - return new DeleteKeychainEntryResponseV1PB().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteKeychainEntryResponseV1PB { - return new DeleteKeychainEntryResponseV1PB().fromJsonString(jsonString, options); - } - - static equals(a: DeleteKeychainEntryResponseV1PB | PlainMessage | undefined, b: DeleteKeychainEntryResponseV1PB | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteKeychainEntryResponseV1PB, a, b); - } -} - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/get_keychain_entry_request_v1_pb_pb.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/get_keychain_entry_request_v1_pb_pb.ts deleted file mode 100644 index a537b074f3..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/get_keychain_entry_request_v1_pb_pb.ts +++ /dev/null @@ -1,56 +0,0 @@ -// -//Hyperledger Cactus Plugin - Keychain Memory -// -//Contains/describes the Hyperledger Cacti Keychain Memory plugin. -// -//The version of the OpenAPI document: 2.0.0 -// -//Generated by OpenAPI Generator: https://openapi-generator.tech - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file models/get_keychain_entry_request_v1_pb.proto (package org.hyperledger.cacti.plugin.keychain.memory, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.GetKeychainEntryRequestV1PB - */ -export class GetKeychainEntryRequestV1PB extends Message { - /** - * The key for the entry to get from the keychain. - * - * @generated from field: string key = 106079; - */ - key = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.GetKeychainEntryRequestV1PB"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 106079, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeychainEntryRequestV1PB { - return new GetKeychainEntryRequestV1PB().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeychainEntryRequestV1PB { - return new GetKeychainEntryRequestV1PB().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetKeychainEntryRequestV1PB { - return new GetKeychainEntryRequestV1PB().fromJsonString(jsonString, options); - } - - static equals(a: GetKeychainEntryRequestV1PB | PlainMessage | undefined, b: GetKeychainEntryRequestV1PB | PlainMessage | undefined): boolean { - return proto3.util.equals(GetKeychainEntryRequestV1PB, a, b); - } -} - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/get_keychain_entry_response_v1_pb_pb.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/get_keychain_entry_response_v1_pb_pb.ts deleted file mode 100644 index 4dde5ee5b8..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/get_keychain_entry_response_v1_pb_pb.ts +++ /dev/null @@ -1,64 +0,0 @@ -// -//Hyperledger Cactus Plugin - Keychain Memory -// -//Contains/describes the Hyperledger Cacti Keychain Memory plugin. -// -//The version of the OpenAPI document: 2.0.0 -// -//Generated by OpenAPI Generator: https://openapi-generator.tech - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file models/get_keychain_entry_response_v1_pb.proto (package org.hyperledger.cacti.plugin.keychain.memory, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.GetKeychainEntryResponseV1PB - */ -export class GetKeychainEntryResponseV1PB extends Message { - /** - * The key that was used to retrieve the value from the keychain. - * - * @generated from field: string key = 106079; - */ - key = ""; - - /** - * The value associated with the requested key on the keychain. - * - * @generated from field: string value = 111972721; - */ - value = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.GetKeychainEntryResponseV1PB"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 106079, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 111972721, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeychainEntryResponseV1PB { - return new GetKeychainEntryResponseV1PB().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeychainEntryResponseV1PB { - return new GetKeychainEntryResponseV1PB().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetKeychainEntryResponseV1PB { - return new GetKeychainEntryResponseV1PB().fromJsonString(jsonString, options); - } - - static equals(a: GetKeychainEntryResponseV1PB | PlainMessage | undefined, b: GetKeychainEntryResponseV1PB | PlainMessage | undefined): boolean { - return proto3.util.equals(GetKeychainEntryResponseV1PB, a, b); - } -} - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/has_keychain_entry_request_v1_pb_pb.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/has_keychain_entry_request_v1_pb_pb.ts deleted file mode 100644 index 23aebf715a..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/has_keychain_entry_request_v1_pb_pb.ts +++ /dev/null @@ -1,56 +0,0 @@ -// -//Hyperledger Cactus Plugin - Keychain Memory -// -//Contains/describes the Hyperledger Cacti Keychain Memory plugin. -// -//The version of the OpenAPI document: 2.0.0 -// -//Generated by OpenAPI Generator: https://openapi-generator.tech - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file models/has_keychain_entry_request_v1_pb.proto (package org.hyperledger.cacti.plugin.keychain.memory, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.HasKeychainEntryRequestV1PB - */ -export class HasKeychainEntryRequestV1PB extends Message { - /** - * The key to check for presence in the keychain. - * - * @generated from field: string key = 106079; - */ - key = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.HasKeychainEntryRequestV1PB"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 106079, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeychainEntryRequestV1PB { - return new HasKeychainEntryRequestV1PB().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeychainEntryRequestV1PB { - return new HasKeychainEntryRequestV1PB().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): HasKeychainEntryRequestV1PB { - return new HasKeychainEntryRequestV1PB().fromJsonString(jsonString, options); - } - - static equals(a: HasKeychainEntryRequestV1PB | PlainMessage | undefined, b: HasKeychainEntryRequestV1PB | PlainMessage | undefined): boolean { - return proto3.util.equals(HasKeychainEntryRequestV1PB, a, b); - } -} - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/has_keychain_entry_response_v1_pb_pb.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/has_keychain_entry_response_v1_pb_pb.ts deleted file mode 100644 index b24c210c1a..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/has_keychain_entry_response_v1_pb_pb.ts +++ /dev/null @@ -1,72 +0,0 @@ -// -//Hyperledger Cactus Plugin - Keychain Memory -// -//Contains/describes the Hyperledger Cacti Keychain Memory plugin. -// -//The version of the OpenAPI document: 2.0.0 -// -//Generated by OpenAPI Generator: https://openapi-generator.tech - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file models/has_keychain_entry_response_v1_pb.proto (package org.hyperledger.cacti.plugin.keychain.memory, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.HasKeychainEntryResponseV1PB - */ -export class HasKeychainEntryResponseV1PB extends Message { - /** - * The key that was used to check the presence of the value in the entry store. - * - * @generated from field: string key = 106079; - */ - key = ""; - - /** - * Date and time encoded as JSON when the presence check was performed by the plugin backend. - * - * @generated from field: string checkedAt = 399084090; - */ - checkedAt = ""; - - /** - * The boolean true or false indicating the presence or absence of an entry under 'key'. - * - * @generated from field: bool isPresent = 361185232; - */ - isPresent = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.HasKeychainEntryResponseV1PB"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 106079, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 399084090, name: "checkedAt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 361185232, name: "isPresent", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeychainEntryResponseV1PB { - return new HasKeychainEntryResponseV1PB().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeychainEntryResponseV1PB { - return new HasKeychainEntryResponseV1PB().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): HasKeychainEntryResponseV1PB { - return new HasKeychainEntryResponseV1PB().fromJsonString(jsonString, options); - } - - static equals(a: HasKeychainEntryResponseV1PB | PlainMessage | undefined, b: HasKeychainEntryResponseV1PB | PlainMessage | undefined): boolean { - return proto3.util.equals(HasKeychainEntryResponseV1PB, a, b); - } -} - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/set_keychain_entry_request_v1_pb_pb.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/set_keychain_entry_request_v1_pb_pb.ts deleted file mode 100644 index b265118d81..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/set_keychain_entry_request_v1_pb_pb.ts +++ /dev/null @@ -1,64 +0,0 @@ -// -//Hyperledger Cactus Plugin - Keychain Memory -// -//Contains/describes the Hyperledger Cacti Keychain Memory plugin. -// -//The version of the OpenAPI document: 2.0.0 -// -//Generated by OpenAPI Generator: https://openapi-generator.tech - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file models/set_keychain_entry_request_v1_pb.proto (package org.hyperledger.cacti.plugin.keychain.memory, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.SetKeychainEntryRequestV1PB - */ -export class SetKeychainEntryRequestV1PB extends Message { - /** - * The key for the entry to set on the keychain. - * - * @generated from field: string key = 106079; - */ - key = ""; - - /** - * The value that will be associated with the key on the keychain. - * - * @generated from field: string value = 111972721; - */ - value = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.SetKeychainEntryRequestV1PB"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 106079, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 111972721, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetKeychainEntryRequestV1PB { - return new SetKeychainEntryRequestV1PB().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetKeychainEntryRequestV1PB { - return new SetKeychainEntryRequestV1PB().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetKeychainEntryRequestV1PB { - return new SetKeychainEntryRequestV1PB().fromJsonString(jsonString, options); - } - - static equals(a: SetKeychainEntryRequestV1PB | PlainMessage | undefined, b: SetKeychainEntryRequestV1PB | PlainMessage | undefined): boolean { - return proto3.util.equals(SetKeychainEntryRequestV1PB, a, b); - } -} - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/set_keychain_entry_response_v1_pb_pb.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/set_keychain_entry_response_v1_pb_pb.ts deleted file mode 100644 index ac283fdc2f..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/models/set_keychain_entry_response_v1_pb_pb.ts +++ /dev/null @@ -1,56 +0,0 @@ -// -//Hyperledger Cactus Plugin - Keychain Memory -// -//Contains/describes the Hyperledger Cacti Keychain Memory plugin. -// -//The version of the OpenAPI document: 2.0.0 -// -//Generated by OpenAPI Generator: https://openapi-generator.tech - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file models/set_keychain_entry_response_v1_pb.proto (package org.hyperledger.cacti.plugin.keychain.memory, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.SetKeychainEntryResponseV1PB - */ -export class SetKeychainEntryResponseV1PB extends Message { - /** - * The key that was used to set the value on the keychain. - * - * @generated from field: string key = 106079; - */ - key = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.SetKeychainEntryResponseV1PB"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 106079, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetKeychainEntryResponseV1PB { - return new SetKeychainEntryResponseV1PB().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetKeychainEntryResponseV1PB { - return new SetKeychainEntryResponseV1PB().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetKeychainEntryResponseV1PB { - return new SetKeychainEntryResponseV1PB().fromJsonString(jsonString, options); - } - - static equals(a: SetKeychainEntryResponseV1PB | PlainMessage | undefined, b: SetKeychainEntryResponseV1PB | PlainMessage | undefined): boolean { - return proto3.util.equals(SetKeychainEntryResponseV1PB, a, b); - } -} - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/services/default_service_connect.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/services/default_service_connect.ts deleted file mode 100644 index 2e518890a6..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/services/default_service_connect.ts +++ /dev/null @@ -1,75 +0,0 @@ -// -//Hyperledger Cactus Plugin - Keychain Memory -// -//Contains/describes the Hyperledger Cacti Keychain Memory plugin. -// -//The version of the OpenAPI document: 2.0.0 -// -//Generated by OpenAPI Generator: https://openapi-generator.tech - -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" -// @generated from file services/default_service.proto (package org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { DeleteKeychainEntryV1Request, GetKeychainEntryV1Request, GetPrometheusMetricsV1Response, HasKeychainEntryV1Request, SetKeychainEntryV1Request } from "./default_service_pb.js"; -import { DeleteKeychainEntryResponseV1PB } from "../models/delete_keychain_entry_response_v1_pb_pb.js"; -import { Empty, MethodKind } from "@bufbuild/protobuf"; -import { GetKeychainEntryResponseV1PB } from "../models/get_keychain_entry_response_v1_pb_pb.js"; -import { HasKeychainEntryResponseV1PB } from "../models/has_keychain_entry_response_v1_pb_pb.js"; -import { SetKeychainEntryResponseV1PB } from "../models/set_keychain_entry_response_v1_pb_pb.js"; - -/** - * @generated from service org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.DefaultService - */ -export const DefaultService = { - typeName: "org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.DefaultService", - methods: { - /** - * @generated from rpc org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.DefaultService.DeleteKeychainEntryV1 - */ - deleteKeychainEntryV1: { - name: "DeleteKeychainEntryV1", - I: DeleteKeychainEntryV1Request, - O: DeleteKeychainEntryResponseV1PB, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.DefaultService.GetKeychainEntryV1 - */ - getKeychainEntryV1: { - name: "GetKeychainEntryV1", - I: GetKeychainEntryV1Request, - O: GetKeychainEntryResponseV1PB, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.DefaultService.GetPrometheusMetricsV1 - */ - getPrometheusMetricsV1: { - name: "GetPrometheusMetricsV1", - I: Empty, - O: GetPrometheusMetricsV1Response, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.DefaultService.HasKeychainEntryV1 - */ - hasKeychainEntryV1: { - name: "HasKeychainEntryV1", - I: HasKeychainEntryV1Request, - O: HasKeychainEntryResponseV1PB, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.DefaultService.SetKeychainEntryV1 - */ - setKeychainEntryV1: { - name: "SetKeychainEntryV1", - I: SetKeychainEntryV1Request, - O: SetKeychainEntryResponseV1PB, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/services/default_service_pb.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/services/default_service_pb.ts deleted file mode 100644 index 9a069b85cf..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/crpc/services/default_service_pb.ts +++ /dev/null @@ -1,214 +0,0 @@ -// -//Hyperledger Cactus Plugin - Keychain Memory -// -//Contains/describes the Hyperledger Cacti Keychain Memory plugin. -// -//The version of the OpenAPI document: 2.0.0 -// -//Generated by OpenAPI Generator: https://openapi-generator.tech - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file services/default_service.proto (package org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import { DeleteKeychainEntryRequestV1PB } from "../models/delete_keychain_entry_request_v1_pb_pb.js"; -import { GetKeychainEntryRequestV1PB } from "../models/get_keychain_entry_request_v1_pb_pb.js"; -import { HasKeychainEntryRequestV1PB } from "../models/has_keychain_entry_request_v1_pb_pb.js"; -import { SetKeychainEntryRequestV1PB } from "../models/set_keychain_entry_request_v1_pb_pb.js"; - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.DeleteKeychainEntryV1Request - */ -export class DeleteKeychainEntryV1Request extends Message { - /** - * Request body to delete a keychain entry via its key - * - * @generated from field: org.hyperledger.cacti.plugin.keychain.memory.DeleteKeychainEntryRequestV1PB deleteKeychainEntryRequestV1PB = 1; - */ - deleteKeychainEntryRequestV1PB?: DeleteKeychainEntryRequestV1PB; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.DeleteKeychainEntryV1Request"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "deleteKeychainEntryRequestV1PB", kind: "message", T: DeleteKeychainEntryRequestV1PB }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteKeychainEntryV1Request { - return new DeleteKeychainEntryV1Request().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteKeychainEntryV1Request { - return new DeleteKeychainEntryV1Request().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteKeychainEntryV1Request { - return new DeleteKeychainEntryV1Request().fromJsonString(jsonString, options); - } - - static equals(a: DeleteKeychainEntryV1Request | PlainMessage | undefined, b: DeleteKeychainEntryV1Request | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteKeychainEntryV1Request, a, b); - } -} - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.GetKeychainEntryV1Request - */ -export class GetKeychainEntryV1Request extends Message { - /** - * Request body to obtain a keychain entry via its key - * - * @generated from field: org.hyperledger.cacti.plugin.keychain.memory.GetKeychainEntryRequestV1PB getKeychainEntryRequestV1PB = 1; - */ - getKeychainEntryRequestV1PB?: GetKeychainEntryRequestV1PB; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.GetKeychainEntryV1Request"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "getKeychainEntryRequestV1PB", kind: "message", T: GetKeychainEntryRequestV1PB }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetKeychainEntryV1Request { - return new GetKeychainEntryV1Request().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetKeychainEntryV1Request { - return new GetKeychainEntryV1Request().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetKeychainEntryV1Request { - return new GetKeychainEntryV1Request().fromJsonString(jsonString, options); - } - - static equals(a: GetKeychainEntryV1Request | PlainMessage | undefined, b: GetKeychainEntryV1Request | PlainMessage | undefined): boolean { - return proto3.util.equals(GetKeychainEntryV1Request, a, b); - } -} - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.GetPrometheusMetricsV1Response - */ -export class GetPrometheusMetricsV1Response extends Message { - /** - * @generated from field: string data = 1; - */ - data = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.GetPrometheusMetricsV1Response"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "data", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GetPrometheusMetricsV1Response { - return new GetPrometheusMetricsV1Response().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GetPrometheusMetricsV1Response { - return new GetPrometheusMetricsV1Response().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GetPrometheusMetricsV1Response { - return new GetPrometheusMetricsV1Response().fromJsonString(jsonString, options); - } - - static equals(a: GetPrometheusMetricsV1Response | PlainMessage | undefined, b: GetPrometheusMetricsV1Response | PlainMessage | undefined): boolean { - return proto3.util.equals(GetPrometheusMetricsV1Response, a, b); - } -} - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.HasKeychainEntryV1Request - */ -export class HasKeychainEntryV1Request extends Message { - /** - * Request body for checking a keychain entry via its key - * - * @generated from field: org.hyperledger.cacti.plugin.keychain.memory.HasKeychainEntryRequestV1PB hasKeychainEntryRequestV1PB = 1; - */ - hasKeychainEntryRequestV1PB?: HasKeychainEntryRequestV1PB; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.HasKeychainEntryV1Request"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "hasKeychainEntryRequestV1PB", kind: "message", T: HasKeychainEntryRequestV1PB }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): HasKeychainEntryV1Request { - return new HasKeychainEntryV1Request().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): HasKeychainEntryV1Request { - return new HasKeychainEntryV1Request().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): HasKeychainEntryV1Request { - return new HasKeychainEntryV1Request().fromJsonString(jsonString, options); - } - - static equals(a: HasKeychainEntryV1Request | PlainMessage | undefined, b: HasKeychainEntryV1Request | PlainMessage | undefined): boolean { - return proto3.util.equals(HasKeychainEntryV1Request, a, b); - } -} - -/** - * @generated from message org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.SetKeychainEntryV1Request - */ -export class SetKeychainEntryV1Request extends Message { - /** - * Request body to write/update a keychain entry via its key - * - * @generated from field: org.hyperledger.cacti.plugin.keychain.memory.SetKeychainEntryRequestV1PB setKeychainEntryRequestV1PB = 1; - */ - setKeychainEntryRequestV1PB?: SetKeychainEntryRequestV1PB; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "org.hyperledger.cacti.plugin.keychain.memory.services.defaultservice.SetKeychainEntryV1Request"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "setKeychainEntryRequestV1PB", kind: "message", T: SetKeychainEntryRequestV1PB }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SetKeychainEntryV1Request { - return new SetKeychainEntryV1Request().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SetKeychainEntryV1Request { - return new SetKeychainEntryV1Request().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SetKeychainEntryV1Request { - return new SetKeychainEntryV1Request().fromJsonString(jsonString, options); - } - - static equals(a: SetKeychainEntryV1Request | PlainMessage | undefined, b: SetKeychainEntryV1Request | PlainMessage | undefined): boolean { - return proto3.util.equals(SetKeychainEntryV1Request, a, b); - } -} - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 86ab0581ca..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,528 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Keychain Memory - * Contains/describes the Hyperledger Cacti Keychain Memory plugin. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface DeleteKeychainEntryRequestV1 - */ -export interface DeleteKeychainEntryRequestV1 { - /** - * The key for the entry to check the presence of on the keychain. - * @type {string} - * @memberof DeleteKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface DeleteKeychainEntryResponseV1 - */ -export interface DeleteKeychainEntryResponseV1 { - /** - * The key that was deleted from the keychain. - * @type {string} - * @memberof DeleteKeychainEntryResponseV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryRequestV1 - */ -export interface GetKeychainEntryRequestV1 { - /** - * The key for the entry to get from the keychain. - * @type {string} - * @memberof GetKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryResponseV1 - */ -export interface GetKeychainEntryResponseV1 { - /** - * The key that was used to retrieve the value from the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'key': string; - /** - * The value associated with the requested key on the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'value': string; -} -/** - * - * @export - * @interface HasKeychainEntryRequestV1 - */ -export interface HasKeychainEntryRequestV1 { - /** - * The key to check for presence in the keychain. - * @type {string} - * @memberof HasKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface HasKeychainEntryResponseV1 - */ -export interface HasKeychainEntryResponseV1 { - /** - * The key that was used to check the presence of the value in the entry store. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'key': string; - /** - * Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'checkedAt': string; - /** - * The boolean true or false indicating the presence or absence of an entry under \'key\'. - * @type {boolean} - * @memberof HasKeychainEntryResponseV1 - */ - 'isPresent': boolean; -} -/** - * - * @export - * @interface SetKeychainEntryRequestV1 - */ -export interface SetKeychainEntryRequestV1 { - /** - * The key for the entry to set on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'key': string; - /** - * The value that will be associated with the key on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'value': string; -} -/** - * - * @export - * @interface SetKeychainEntryResponseV1 - */ -export interface SetKeychainEntryResponseV1 { - /** - * The key that was used to set the value on the keychain. - * @type {string} - * @memberof SetKeychainEntryResponseV1 - */ - 'key': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1: async (deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteKeychainEntryRequestV1' is not null or undefined - assertParamExists('deleteKeychainEntryV1', 'deleteKeychainEntryRequestV1', deleteKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1: async (getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getKeychainEntryRequestV1' is not null or undefined - assertParamExists('getKeychainEntryV1', 'getKeychainEntryRequestV1', getKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1: async (hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'hasKeychainEntryRequestV1' is not null or undefined - assertParamExists('hasKeychainEntryV1', 'hasKeychainEntryRequestV1', hasKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(hasKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1: async (setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'setKeychainEntryRequestV1' is not null or undefined - assertParamExists('setKeychainEntryV1', 'setKeychainEntryRequestV1', setKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(setKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getKeychainEntryV1(getKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.hasKeychainEntryV1(hasKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.setKeychainEntryV1(setKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deletes an entry under a key on the keychain backend. - * @param {DeleteKeychainEntryRequestV1} deleteKeychainEntryRequestV1 Request body to delete a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Checks that an entry exists under a key on the keychain backend - * @param {HasKeychainEntryRequestV1} hasKeychainEntryRequestV1 Request body for checking a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 7aa00c0139..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Keychain Memory - * Contains/describes the Hyperledger Cacti Keychain Memory plugin. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 8f76d8de81..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Keychain Memory - * Contains/describes the Hyperledger Cacti Keychain Memory plugin. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 319c3d8360..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Keychain Memory - * Contains/describes the Hyperledger Cacti Keychain Memory plugin. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index c421b43b56..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Keychain Memory - * Contains/describes the Hyperledger Cacti Keychain Memory plugin. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/get-prometheus-exporter-metrics/get-prometheus-exporter-metrics-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/get-prometheus-exporter-metrics/get-prometheus-exporter-metrics-endpoint-v1.ts deleted file mode 100644 index 053ca59527..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/get-prometheus-exporter-metrics/get-prometheus-exporter-metrics-endpoint-v1.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api/"; - -import OAS from "../../json/openapi.json"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "../plugin-keychain-memory"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - logLevel?: LogLevelDesc; - plugin: PluginKeychainMemory; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - private readonly log: Logger; - - constructor( - public readonly opts: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = "GetPrometheusExporterMetricsEndpointV1#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.plugin, `${fnTag} options.plugin`); - - this.log = LoggerProvider.getOrCreate({ - label: "get-prometheus-exporter-metrics-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetPrometheusExporterMetrics#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - const resBody = await this.opts.plugin.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/index.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/index.ts deleted file mode 100755 index 358eab3683..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -export * from "./public-api"; - -export { - DeleteKeychainEntryV1Endpoint, - IDeleteKeychainEntryEndpointOptions, -} from "./web-services/delete-keychain-entry-endpoint-v1"; - -export { - GetKeychainEntryV1Endpoint, - IGetKeychainEntryEndpointOptions, -} from "./web-services/get-keychain-entry-endpoint-v1"; - -export { - HasKeychainEntryV1Endpoint, - IHasKeychainEntryEndpointOptions, -} from "./web-services/has-keychain-entry-endpoint-v1"; - -export { - ISetKeychainEntryEndpointOptions, - SetKeychainEntryV1Endpoint, -} from "./web-services/set-keychain-entry-endpoint-v1"; diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/index.web.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-factory-keychain.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-factory-keychain.ts deleted file mode 100644 index 9ee99fc17a..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-factory-keychain.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactory } from "@hyperledger/cactus-core-api"; - -import { - IPluginKeychainMemoryOptions, - PluginKeychainMemory, -} from "./plugin-keychain-memory"; - -export class PluginFactoryKeychain extends PluginFactory< - PluginKeychainMemory, - IPluginKeychainMemoryOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginKeychainMemoryOptions = { - backend: new Map(), - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel: "TRACE", - }, - ): Promise { - return new PluginKeychainMemory(pluginOptions); - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-keychain-memory.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-keychain-memory.ts deleted file mode 100644 index 7c0de0135f..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-keychain-memory.ts +++ /dev/null @@ -1,274 +0,0 @@ -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - ICactusPluginOptions, - ICrpcSvcRegistration, - IPluginCrpcService, - IPluginKeychain, - IPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../json/openapi.json"; - -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; -import { Express } from "express"; - -import { GetPrometheusExporterMetricsEndpointV1 } from "./get-prometheus-exporter-metrics/get-prometheus-exporter-metrics-endpoint-v1"; -import { SetKeychainEntryV1Endpoint } from "./web-services/set-keychain-entry-endpoint-v1"; -import { GetKeychainEntryV1Endpoint } from "./web-services/get-keychain-entry-endpoint-v1"; -import { DeleteKeychainEntryV1Endpoint } from "./web-services/delete-keychain-entry-endpoint-v1"; -import { HasKeychainEntryV1Endpoint } from "./web-services/has-keychain-entry-endpoint-v1"; -import { DefaultService } from "./generated/crpc/services/default_service_connect"; -import { KeychainMemoryCrpcSvcOpenApi } from "./crpc-services/keychain-memory-crpc-svc-openapi"; -import { ServiceType } from "@bufbuild/protobuf"; -import { Observable, ReplaySubject, Subject } from "rxjs"; - -export interface IPluginKeychainMemoryOptions extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - backend?: Map; - keychainId: string; - prometheusExporter?: PrometheusExporter; - readonly observabilityBufferSize?: number; - readonly observabilityTtlSeconds?: number; -} - -export class PluginKeychainMemory - implements IPluginCrpcService, IPluginKeychain, IPluginWebService -{ - public static readonly CLASS_NAME = "PluginKeychainMemory"; - - private readonly backend: Map; - private readonly log: Logger; - private readonly instanceId: string; - private readonly observabilityBufferSize: number; - private readonly observabilityTtlSeconds: number; - - private readonly getSubject: Subject<{ - readonly key: string; - readonly value: string; - }>; - private readonly setSubject: Subject<{ - readonly key: string; - readonly value: string; - }>; - private readonly hasSubject: Subject<{ - readonly key: string; - readonly isPresent: boolean; - }>; - private readonly deleteSubject: Subject<{ readonly key: string }>; - private endpoints: IWebServiceEndpoint[] | undefined; - public prometheusExporter: PrometheusExporter; - - public get className(): string { - return PluginKeychainMemory.CLASS_NAME; - } - - constructor(public readonly opts: IPluginKeychainMemoryOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.keychainId, `${fnTag} arg options.keychainId`); - Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); - Checks.nonBlankString(opts.keychainId, `${fnTag} options.keychainId`); - - this.observabilityBufferSize = opts.observabilityBufferSize || 1; - this.observabilityTtlSeconds = opts.observabilityTtlSeconds || 1; - - this.backend = opts.backend || new Map(); - Checks.truthy(this.backend, `${fnTag} arg options.backend`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.log.debug("observabilityBufferSize=%o", this.observabilityBufferSize); - this.log.debug("observabilityTtlSeconds=%o", this.observabilityTtlSeconds); - - this.instanceId = this.opts.instanceId; - this.prometheusExporter = - opts.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - this.prometheusExporter.startMetricsCollection(); - - this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); - this.log.warn( - `Never use ${this.className} in production. ` + - `It does not support encryption. It stores everything in plain text.`, - ); - - this.getSubject = new ReplaySubject( - this.observabilityBufferSize, - this.observabilityTtlSeconds, - ); - this.setSubject = new ReplaySubject( - this.observabilityBufferSize, - this.observabilityTtlSeconds, - ); - this.hasSubject = new ReplaySubject( - this.observabilityBufferSize, - this.observabilityTtlSeconds, - ); - this.deleteSubject = new ReplaySubject( - this.observabilityBufferSize, - this.observabilityTtlSeconds, - ); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } - - public async createCrpcSvcRegistrations(): Promise< - ICrpcSvcRegistration[] - > { - const out: ICrpcSvcRegistration[] = []; - - const implementation = new KeychainMemoryCrpcSvcOpenApi({ - keychain: this, - logLevel: this.opts.logLevel, - }); - - const crpcSvcRegistration: ICrpcSvcRegistration = { - definition: DefaultService, - serviceName: DefaultService.typeName, - implementation, - }; - out.push(crpcSvcRegistration); - return out; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - const { log } = this; - - log.info(`Installing web services for plugin ${this.getPackageName()}...`); - - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const endpoints: IWebServiceEndpoint[] = [ - new SetKeychainEntryV1Endpoint({ - plugin: this, - logLevel: this.opts.logLevel, - }), - new GetKeychainEntryV1Endpoint({ - plugin: this, - logLevel: this.opts.logLevel, - }), - new DeleteKeychainEntryV1Endpoint({ - plugin: this, - logLevel: this.opts.logLevel, - }), - new HasKeychainEntryV1Endpoint({ - plugin: this, - logLevel: this.opts.logLevel, - }), - new GetPrometheusExporterMetricsEndpointV1({ - plugin: this, - logLevel: this.opts.logLevel, - }), - ]; - - this.endpoints = endpoints; - - const pkg = this.getPackageName(); - log.info(`Installed web services for plugin ${pkg} OK`, { endpoints }); - - return endpoints; - } - - public async shutdown(): Promise { - return; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getKeychainId(): string { - return this.opts.keychainId; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-keychain-memory`; - } - - public async onPluginInit(): Promise { - return; - } - - async get(key: string): Promise { - const value = this.backend.get(key); - if (value) { - this.getSubject.next({ key, value }); - return value; - } else { - throw new Error(`Keychain entry for "${key}" not found.`); - } - } - - public observeGet(): Observable<{ readonly key: string }> { - return this.getSubject.asObservable(); - } - - async has(key: string): Promise { - const isPresent = this.backend.has(key); - this.hasSubject.next({ key, isPresent }); - return isPresent; - } - - public observeHas(): Observable<{ - readonly key: string; - readonly isPresent: boolean; - }> { - return this.hasSubject.asObservable(); - } - - async set(key: string, value: string): Promise { - this.backend.set(key, value); - this.setSubject.next({ key, value }); - this.prometheusExporter.setTotalKeyCounter(this.backend.size); - } - - public observeSet(): Observable<{ - readonly key: string; - readonly value: string; - }> { - return this.setSubject.asObservable(); - } - - async delete(key: string): Promise { - this.backend.delete(key); - this.deleteSubject.next({ key }); - this.prometheusExporter.setTotalKeyCounter(this.backend.size); - } - - public observeDelete(): Observable<{ - readonly key: string; - }> { - return this.deleteSubject.asObservable(); - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index 224b49a24a..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { KeyCount } from "./response.type"; - -import { - totalKeyCount, - K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT, -} from "./metrics"; - -export async function collectMetrics(keyCount: KeyCount): Promise { - totalKeyCount - .labels(`${K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT}`) - .set(keyCount.counter); -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index ff644d22cf..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT = - "cactus_keychain_memory_total_key_count"; - -export const totalKeyCount = new Gauge({ - registers: [], - name: K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT, - help: "Total keys present in memory", - labelNames: ["type"], -}); diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index a0975c45bc..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,40 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { KeyCount } from "./response.type"; -import { collectMetrics } from "./data-fetcher"; -import { K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT } from "./metrics"; -import { totalKeyCount } from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly keyCount: KeyCount = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public setTotalKeyCounter(keyCount: number): void { - this.keyCount.counter = keyCount; - collectMetrics(this.keyCount); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalKeyCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 0c60f06d2e..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type KeyCount = { - counter: number; -}; diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/public-api.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/public-api.ts deleted file mode 100755 index ea50c63554..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/public-api.ts +++ /dev/null @@ -1,39 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; - -export { - PluginKeychainMemory, - IPluginKeychainMemoryOptions, -} from "./plugin-keychain-memory"; -export { PluginFactoryKeychain } from "./plugin-factory-keychain"; - -import { PluginFactoryKeychain } from "./plugin-factory-keychain"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryKeychain(pluginFactoryOptions); -} - -export { IKeychainMemoryCrpcSvcOpenApiOptions } from "./crpc-services/keychain-memory-crpc-svc-openapi"; -export { KeychainMemoryCrpcSvcOpenApi } from "./crpc-services/keychain-memory-crpc-svc-openapi"; - -export { DefaultService } from "./generated/crpc/services/default_service_connect"; - -export { DeleteKeychainEntryRequestV1PB } from "./generated/crpc/models/delete_keychain_entry_request_v1_pb_pb"; -export { DeleteKeychainEntryResponseV1PB } from "./generated/crpc/models/delete_keychain_entry_response_v1_pb_pb"; - -export { GetKeychainEntryRequestV1PB } from "./generated/crpc/models/get_keychain_entry_request_v1_pb_pb"; -export { GetKeychainEntryResponseV1PB } from "./generated/crpc/models/get_keychain_entry_response_v1_pb_pb"; - -export { HasKeychainEntryRequestV1PB } from "./generated/crpc/models/has_keychain_entry_request_v1_pb_pb"; -export { HasKeychainEntryResponseV1PB } from "./generated/crpc/models/has_keychain_entry_response_v1_pb_pb"; - -export { SetKeychainEntryRequestV1PB } from "./generated/crpc/models/set_keychain_entry_request_v1_pb_pb"; -export { SetKeychainEntryResponseV1PB } from "./generated/crpc/models/set_keychain_entry_response_v1_pb_pb"; - -export { DeleteKeychainEntryV1Request } from "./generated/crpc/services/default_service_pb"; -export { GetKeychainEntryV1Request } from "./generated/crpc/services/default_service_pb"; -export { GetPrometheusMetricsV1Response } from "./generated/crpc/services/default_service_pb"; -export { HasKeychainEntryV1Request } from "./generated/crpc/services/default_service_pb"; -export { SetKeychainEntryV1Request } from "./generated/crpc/services/default_service_pb"; diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/delete-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/delete-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 33f9ab3874..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/delete-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; -import { DeleteKeychainEntryRequestV1 } from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainMemory } from "../plugin-keychain-memory"; - -export interface IDeleteKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginKeychainMemory; -} - -export class DeleteKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeleteKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeleteKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeleteKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/delete-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const { log } = this; - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const { key } = req.body as DeleteKeychainEntryRequestV1; - const resBody = await this.options.plugin.delete(key); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to deploy contract:`; - await handleRestEndpointException({ errorMsg, log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/get-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/get-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 87ed6b2ce8..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/get-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - GetKeychainEntryRequestV1, - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainMemory } from "../plugin-keychain-memory"; - -export interface IGetKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginKeychainMemory; -} - -export class GetKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return GetKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const { log } = this; - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const { key } = req.body as GetKeychainEntryRequestV1; - const value = await this.options.plugin.get(key); - res.json({ key, value }); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to deploy contract:`; - await handleRestEndpointException({ errorMsg, log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/has-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/has-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 8d0452a436..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/has-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,110 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainMemory } from "../plugin-keychain-memory"; -import { HasKeychainEntryRequestV1 } from "@hyperledger/cactus-core-api"; - -export interface IHasKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginKeychainMemory; -} - -export class HasKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "HasKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return HasKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IHasKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/has-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const { log } = this; - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const reqBody = req.body as HasKeychainEntryRequestV1; - const { key } = reqBody; - const checkedAt = new Date().toJSON(); - const isPresent = await this.options.plugin.has(key); - const resBody = { - isPresent, - key, - checkedAt, - }; - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to deploy contract:`; - await handleRestEndpointException({ errorMsg, log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/set-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/set-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 743221d45c..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/web-services/set-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainMemory } from "../plugin-keychain-memory"; -import { SetKeychainEntryRequestV1 } from "@hyperledger/cactus-core-api"; - -export interface ISetKeychainEntryEndpointOptions { - logLevel?: LogLevelDesc; - plugin: PluginKeychainMemory; -} - -export class SetKeychainEntryV1Endpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "SetKeychainEntryV1Endpoint"; - - private readonly log: Logger; - - public get className(): string { - return SetKeychainEntryV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: ISetKeychainEntryEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/set-keychain-entry" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const { log } = this; - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const { key, value } = req.body as SetKeychainEntryRequestV1; - const resBody = await this.options.plugin.set(key, value); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to deploy contract:`; - await handleRestEndpointException({ errorMsg, log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-keychain-memory/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-keychain-memory/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory-api-client.test.ts b/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory-api-client.test.ts deleted file mode 100644 index 402e1dd59d..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory-api-client.test.ts +++ /dev/null @@ -1,143 +0,0 @@ -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; - -import { Bools, IListenOptions, Servers } from "@hyperledger/cactus-common"; - -import { v4 as uuidv4 } from "uuid"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -import { - IPluginKeychainMemoryOptions, - DefaultApi as KeychainMemoryApi, - PluginKeychainMemory, -} from "../../../main/typescript/public-api"; - -describe("PluginKeychainMemory", () => { - let addressInfo: AddressInfo; - let httpServer: http.Server; - let expressApp: express.Express; - beforeAll(async () => { - expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - - httpServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: httpServer, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - }); - - afterAll(async () => { - await Servers.shutdown(httpServer); - }); - - it("has a constructor that works with valid parameters", () => { - expect( - () => - new PluginKeychainMemory({ - instanceId: "a", - keychainId: "a", - }), - ).not.toThrow(); - }); - - it("has a constructor that validates the instanceId", () => { - expect( - () => - new PluginKeychainMemory({ - instanceId: null as unknown as string, - keychainId: "valid-value", - }), - ).toThrow(); - - expect( - () => - new PluginKeychainMemory({ - instanceId: "", - keychainId: "valid-value", - }), - ).toThrow(); - }); - - it("has a constructor that validates the keychainId", () => { - expect( - () => - new PluginKeychainMemory({ - instanceId: "valid-value", - keychainId: null as unknown as string, - }), - ).toThrow(); - - expect( - () => - new PluginKeychainMemory({ - instanceId: "valid-value", - keychainId: "", - }), - ).toThrow(); - }); - - it("has get,set,has,delete ops which alter state as expected", async () => { - const instanceId = uuidv4(); - const keychainId = uuidv4(); - - const options: IPluginKeychainMemoryOptions = { - instanceId, - keychainId, - }; - const plugin = new PluginKeychainMemory(options); - - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const config = new Configuration({ basePath: apiHost }); - const apiClient = new KeychainMemoryApi(config); - - await plugin.registerWebServices(expressApp); - - expect(plugin.getKeychainId()).toBe(options.keychainId); - expect(plugin.getInstanceId()).toBe(options.instanceId); - - const key1 = uuidv4(); - const value1 = uuidv4(); - - const hasPriorRes = await apiClient.hasKeychainEntryV1({ key: key1 }); - expect(hasPriorRes).toBeTruthy(); - expect(hasPriorRes.data).toBeTruthy(); - expect(Bools.isBooleanStrict(hasPriorRes.data.isPresent)).toBeTrue(); - - const hasPrior = hasPriorRes.data.isPresent; - expect(hasPrior).toBeFalse(); - - await plugin.set(key1, value1); - - const hasAfter1 = await plugin.has(key1); - expect(hasAfter1).toBeTrue(); - - const valueAfter1 = await plugin.get(key1); - expect(valueAfter1).toBeTruthy(); - expect(valueAfter1).toEqual(value1); - - await plugin.delete(key1); - - const hasAfterDelete1 = await plugin.has(key1); - expect(hasAfterDelete1).toBeFalse(); - - const key2 = uuidv4(); - const value2 = uuidv4(); - - await plugin.set(key2, value2); - - const hasAfter = await plugin.has(key2); - expect(hasAfter).toBeTrue(); - - const valueAfter2 = await plugin.get(key2); - expect(valueAfter2).toBeTruthy(); - expect(valueAfter2).toEqual(value2); - }); -}); diff --git a/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory-observability.test.ts b/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory-observability.test.ts deleted file mode 100644 index cb608d540d..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory-observability.test.ts +++ /dev/null @@ -1,84 +0,0 @@ -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; - -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; - -import { PluginKeychainMemory } from "../../../main/typescript/public-api"; - -const logLevel: LogLevelDesc = "INFO"; - -describe("PluginKeychainMemory", () => { - const log = LoggerProvider.getOrCreate({ - label: "plugin-keychain-memory-observability.test.ts", - level: logLevel, - }); - - test("can observe set operations", async () => { - const keychain = new PluginKeychainMemory({ - instanceId: uuidV4(), - keychainId: uuidV4(), - logLevel, - }); - - let getCount = 0; - const stratedAt = new Date(); - - const taskPromise = new Promise((resolve) => { - keychain.observeSet().subscribe({ - next: (value) => { - getCount++; - log.debug("NEXT_SET: startedAt=%o value=%o", stratedAt, value); - if (getCount >= 5) { - resolve(); - } - }, - }); - - keychain.set("some-key-that-does-not-matter-1", uuidV4()); - keychain.set("some-key-that-does-not-matter-2", uuidV4()); - keychain.set("some-key-that-does-not-matter-3", uuidV4()); - keychain.set("some-key-that-does-not-matter-4", uuidV4()); - keychain.set("some-key-that-does-not-matter-5", uuidV4()); - }); - await expect(taskPromise).toResolve(); - }, 500); - - test("can observe set operations with buffer", async () => { - const keychain = new PluginKeychainMemory({ - instanceId: uuidV4(), - keychainId: uuidV4(), - logLevel, - observabilityBufferSize: 5, - observabilityTtlSeconds: 1000, - }); - - let getCount = 0; - const stratedAt = new Date(); - - keychain.set("some-key-that-does-not-matter-1", uuidV4()); - keychain.set("some-key-that-does-not-matter-2", uuidV4()); - keychain.set("some-key-that-does-not-matter-3", uuidV4()); - keychain.set("some-key-that-does-not-matter-4", uuidV4()); - keychain.set("some-key-that-does-not-matter-5", uuidV4()); - - const taskPromise = new Promise((resolve) => { - keychain.observeSet().subscribe({ - next: (value) => { - getCount++; - log.debug("NEXT_SET_1: startedAt=%o value=%o", stratedAt, value); - }, - }); - keychain.observeSet().subscribe({ - next: (value) => { - getCount++; - log.debug("NEXT_SET_2: startedAt=%o value=%o", stratedAt, value); - if (getCount >= 10) { - resolve(); - } - }, - }); - }); - - await expect(taskPromise).toResolve(); - }, 500); -}); diff --git a/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory.test.ts b/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory.test.ts deleted file mode 100644 index d80205e460..0000000000 --- a/packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory.test.ts +++ /dev/null @@ -1,159 +0,0 @@ -import express from "express"; -import "jest-extended"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; - -import { IListenOptions, Servers } from "@hyperledger/cactus-common"; - -import { v4 as uuidv4 } from "uuid"; -import { - IPluginKeychainMemoryOptions, - PluginKeychainMemory, -} from "../../../main/typescript"; - -import { K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT } from "../../../main/typescript/prometheus-exporter/metrics"; - -import { DefaultApi as KeychainMemoryApi } from "../../../main/typescript/public-api"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -const testcase = "PluginKeychainMemory"; -describe(testcase, () => { - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - afterAll(async () => await Servers.shutdown(server)); - - expect( - () => new PluginKeychainMemory({ instanceId: "a", keychainId: "a" }), - ).not.toThrow(); - - test("Validates constructor arg instanceId", () => { - expect( - () => - new PluginKeychainMemory({ - instanceId: null as any, - keychainId: "valid-value", - }), - ).toThrow(); - expect( - () => - new PluginKeychainMemory({ - instanceId: "", - keychainId: "valid-value", - }), - ).toThrow(); - }); - - test("Validates constructor arg keychainId", () => { - expect( - () => - new PluginKeychainMemory({ - instanceId: "valid-value", - keychainId: null as any, - }), - ).toThrow(); - expect( - () => - new PluginKeychainMemory({ - instanceId: "valid-value", - keychainId: "", - }), - ).toThrow(); - }); - - test("get,set,has,delete alters state as expected", async () => { - const options: IPluginKeychainMemoryOptions = { - instanceId: uuidv4(), - keychainId: uuidv4(), - }; - const plugin = new PluginKeychainMemory(options); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - const config = new Configuration({ basePath: apiHost }); - const apiClient = new KeychainMemoryApi(config); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - - expect(plugin.getKeychainId()).toBe(options.keychainId); - expect(plugin.getInstanceId()).toBe(options.instanceId); - - const key1 = uuidv4(); - const value1 = uuidv4(); - - const hasPrior = await plugin.has(key1); - expect(hasPrior).toBe(false); - - await plugin.set(key1, value1); - - const hasAfter1 = await plugin.has(key1); - expect(hasAfter1).toBe(true); - - const valueAfter1 = await plugin.get(key1); - expect(valueAfter1).toBeTruthy(); - expect(valueAfter1).toBe(value1); - - await plugin.delete(key1); - - const hasAfterDelete1 = await plugin.has(key1); - expect(hasAfterDelete1).not.toBeTruthy(); - await expect(plugin.get(key1)).not.toResolve(); - - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT + - " Total keys present in memory\n" + - "# TYPE " + - K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT + - " gauge\n" + - K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT + - '{type="' + - K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT + - '"} 0'; - expect(res); - expect(res.data); - expect(res.status).toEqual(200); - expect(res.data.includes(promMetricsOutput)).toBe(true); - } - - const key2 = uuidv4(); - const value2 = uuidv4(); - - await plugin.set(key2, value2); - - const hasAfter = await plugin.has(key2); - expect(hasAfter).toBe(true); - - const valueAfter2 = await plugin.get(key2); - expect(valueAfter2).toBeTruthy(); - expect(valueAfter2).toEqual(value2); - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT + - " Total keys present in memory\n" + - "# TYPE " + - K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT + - " gauge\n" + - K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT + - '{type="' + - K_CACTUS_KEYCHAIN_MEMORY_TOTAL_KEY_COUNT + - '"} 1'; - expect(res); - expect(res.data); - expect(res.status).toEqual(200); - expect(res.data.includes(promMetricsOutput)).toBe(true); - } - }); -}); diff --git a/packages/cactus-plugin-keychain-memory/tsconfig.json b/packages/cactus-plugin-keychain-memory/tsconfig.json deleted file mode 100644 index 9052d94438..0000000000 --- a/packages/cactus-plugin-keychain-memory/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "allowJs": true, - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-keychain-memory.tsbuildinfo" - }, - "include": [ - "./src", - "**/openapi.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/CHANGELOG.md b/packages/cactus-plugin-keychain-vault/CHANGELOG.md deleted file mode 100644 index 2c3ff7214c..0000000000 --- a/packages/cactus-plugin-keychain-vault/CHANGELOG.md +++ /dev/null @@ -1,198 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **plugin-keychain-vault:** fix CVE-2024-0553 in vault server image ([1eacf7e](https://github.com/hyperledger/cacti/commit/1eacf7e2a33349de794d486a47cc6bd62d93311a)) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -### Bug Fixes - -* **plugin-keychain-vault:** hyper upgrade ([3062343](https://github.com/hyperledger/cactus/commit/3062343d47a492d6a15f7189a72e6ab3bb6a52f2)), closes [#2120](https://github.com/hyperledger/cactus/issues/2120) - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -### Bug Fixes - -* **lint:** fix issue [#1359](https://github.com/hyperledger/cactus/issues/1359) ([f7eb39b](https://github.com/hyperledger/cactus/commit/f7eb39bb1392b2762adac3a189da071249f4eca3)) -* **lint:** fix issue [#1359](https://github.com/hyperledger/cactus/issues/1359) ([d067df2](https://github.com/hyperledger/cactus/commit/d067df29db21325ba9b29b52d244066fce0e3a02)) - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Bug Fixes - -* openapi validation test for keychain-vault plugin ([6630ebe](https://github.com/hyperledger/cactus/commit/6630ebed4c2d4c7aa3ddd6c5e306b9bb1613f827)), closes [#1329](https://github.com/hyperledger/cactus/issues/1329) [#847](https://github.com/hyperledger/cactus/issues/847) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **prometheus:** metrics.ts leaks to global registry [#1202](https://github.com/hyperledger/cactus/issues/1202) ([ce076d7](https://github.com/hyperledger/cactus/commit/ce076d709f8e0cba143f8fe9d71f1de1df8f71dc)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Bug Fixes - -* **connector-corda:** fix build broken by operationId rename ([291dd3b](https://github.com/hyperledger/cactus/commit/291dd3bc666939fffbc3780eaefd9059c756878a)) - -### Features - -* **aws-sm:** added keychain plugin for aws secret manager ([ed6db9e](https://github.com/hyperledger/cactus/commit/ed6db9edc2064046308be91b73f620cbb2a6fb58)), closes [#912](https://github.com/hyperledger/cactus/issues/912) - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) - -### Features - -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **core-api:** plugin async initializer method ([9678c2e](https://github.com/hyperledger/cactus/commit/9678c2e9288a73589e84f9fd254c26aed6a93297)) -* **core-api:** plugin interface async initializer ([d40f68b](https://github.com/hyperledger/cactus/commit/d40f68bd9eaff498df8514fe7397986b5a2f865d)) -* **keychain-vault:** add the missing endpoint classes [#676](https://github.com/hyperledger/cactus/issues/676) ([341cffc](https://github.com/hyperledger/cactus/commit/341cffcef72286169a4ceced69414618d5059d0e)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Features - -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-keychain-vault - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **keychain-vault:** add missing license to openapi.json ([70dcb7f](https://github.com/hyperledger/cactus/commit/70dcb7fab3ba5bf4a1ecc49c3ee997c3b0ef170f)), closes [#493](https://github.com/hyperledger/cactus/issues/493) - -### Features - -* **keychain:** add rust keychain plugin vault implementation ([6dcdb8a](https://github.com/hyperledger/cactus/commit/6dcdb8a02db30e4dfe3d912bd56d5979b0cb3bc3)) -* **keychain:** implement OpenAPI endpoints ([3a0acf4](https://github.com/hyperledger/cactus/commit/3a0acf4cb350a286500aa80ed4ac5d15f9501ea4)) -* **keychain-vault:** add prometheus exporter ([fea547f](https://github.com/hyperledger/cactus/commit/fea547fdf9992ffa444274e7d7f9199a671dd71e)), closes [#536](https://github.com/hyperledger/cactus/issues/536) diff --git a/packages/cactus-plugin-keychain-vault/README.md b/packages/cactus-plugin-keychain-vault/README.md deleted file mode 100644 index 4f1879410c..0000000000 --- a/packages/cactus-plugin-keychain-vault/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# `@hyperledger/cactus-plugin-keychain-vault` - -## Prometheus Exporter - -This class creates a prometheus exporter, which scrapes the transactions (total transaction count) for the use cases incorporating the use of Keychain vault plugin. - - -### Usage -The prometheus exporter object is initialized in the `PluginKeychainVault` class constructor itself, so instantiating the object of the `PluginKeychainVault` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IPluginKeychainVaultOptions` interface for `PluginKeychainVault` constructor. - -`getPrometheusMetricsV1` function returns the prometheus exporter metrics, currently displaying the total key count, which currently increments everytime the `set()` and `delete()` method of the `PluginKeychainVault` class is called. - -### Prometheus Integration -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'keychain_vault_exporter' - metrics_path: api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-keychain-plugin/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_keychain_vault_total_key_count** and click **execute** - -### Helper code - -###### response.type.ts -This file contains the various responses of the metrics. - -###### data-fetcher.ts -This file contains functions encasing the logic to process the data points - -###### metrics.ts -This file lists all the prometheus metrics and what they are used for. diff --git a/packages/cactus-plugin-keychain-vault/openapitools.json b/packages/cactus-plugin-keychain-vault/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-keychain-vault/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-keychain-vault/package.json b/packages/cactus-plugin-keychain-vault/package.json deleted file mode 100644 index 05e2611a9b..0000000000 --- a/packages/cactus-plugin-keychain-vault/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-keychain-vault", - "version": "2.0.0", - "description": "A keychain implementation storing its entries in Hashicorp Vault. Actual logic is implemented in Rust.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-keychain-vault.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "http-status-codes": "2.1.4", - "node-vault": "0.9.22", - "prom-client": "15.1.3", - "typescript-optional": "2.0.1" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/body-parser": "1.19.3", - "@types/express": "5.0.0", - "@types/internal-ip": "4.1.0", - "@types/request": "2.48.7", - "@types/tape-promise": "4.0.1", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "internal-ip": "6.2.0", - "openapi-types": "12.1.3", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-keychain-vault.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-keychain-vault.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/Dockerfile b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/Dockerfile deleted file mode 100644 index fe00009ea6..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/Dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -FROM rust:1.76.0-slim-bookworm as builder - -RUN apt-get update -y && \ - apt-get upgrade -y && \ - apt-get install -y libssl-dev pkg-config - -WORKDIR / -RUN USER=root cargo new --bin cactus-keychain-vault-server -WORKDIR /cactus-keychain-vault-server -ADD ./rust/gen/ ./ -RUN cargo build --release --example server - -FROM ubuntu:24.04 -ARG APP=/usr/src/app - - -RUN apt-get update -y && \ - apt-get upgrade -y && \ - apt-get install -y ca-certificates tzdata curl tini -RUN rm -rf /var/lib/apt/lists/* - - -ENV TZ=Etc/UTC \ - APP_USER=appuser - -RUN groupadd $APP_USER \ - && useradd -g $APP_USER $APP_USER \ - && mkdir -p ${APP} - -COPY --from=builder /cactus-keychain-vault-server/target/release/examples/server ${APP}/cactus-keychain-vault-server - -RUN chown -R $APP_USER:$APP_USER ${APP} - -USER $APP_USER -WORKDIR ${APP} - -COPY healthcheck.sh / - -EXPOSE 8080 - -ENTRYPOINT ["/usr/bin/tini", "--"] -CMD ["./cactus-keychain-vault-server"] - -HEALTHCHECK --interval=1s --timeout=5s --start-period=1s --retries=30 CMD /healthcheck.sh - diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/README.md b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/README.md deleted file mode 100644 index 7bfbfbe857..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Rust API for openapi_client - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -## Overview - -This client/server was generated by the [openapi-generator] -(https://openapi-generator.tech) project. By using the -[OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote -server, you can easily generate a server stub. - -To see how to make this your own, look here: - -[README]((https://openapi-generator.tech)) - -- API version: 0.3.0 -- Build date: 2021-01-10T23:14:36.828Z[GMT] - - - -This autogenerated project defines an API crate `openapi_client` which contains: -* An `Api` trait defining the API in Rust. -* Data types representing the underlying data model. -* A `Client` type which implements `Api` and issues HTTP requests for each operation. -* A router which accepts HTTP requests and invokes the appropriate `Api` method for each operation. - -It also contains an example server and client which make use of `openapi_client`: - -* The example server starts up a web server using the `openapi_client` - router, and supplies a trivial implementation of `Api` which returns failure - for every operation. -* The example client provides a CLI which lets you invoke - any single operation on the `openapi_client` client by passing appropriate - arguments on the command line. - -You can use the example server and client as a basis for your own code. -See below for [more detail on implementing a server](#writing-a-server). - -## Examples - -Run examples with: - -``` -cargo run --example -``` - -To pass in arguments to the examples, put them after `--`, for example: - -``` -cargo run --example client -- --help -``` - -### Building and running an example server docker container - -```sh -docker run --cap-add=IPC_LOCK -e 'VAULT_DEV_ROOT_TOKEN_ID=myroot' -p 8200:8200 vault -docker build ./packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/ -t ckvs -docker run --net="host" --rm -e VAULT_TOKEN=myroot -p 8080:8080 ckvs - -export THE_SECRET=$(uuidgen) - -curl --location --request POST 'http://127.0.0.1:8080/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "key": "mysecret", - "value": "'"$THE_SECRET"'" -}' - -curl --location --request POST 'http://127.0.0.1:8080/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "key": "mysecret" -}' - -> {"key":"mysecret","value":"3e87c7a5-758c-4953-afb8-20e04e05b746"} - -``` - -### Running the example server -To run the server, follow these simple steps: - -``` -VAULT_TOKEN=myroot cargo run --example server -``` - -### Running the example client -To run a client, follow one of the following simple steps: - -``` -``` - -### HTTPS -The examples can be run in HTTPS mode by passing in the flag `--https`, for example: - -``` -VAULT_TOKEN=myroot cargo run --example server -- --https -``` - -This will use the keys/certificates from the examples directory. Note that the -server chain is signed with `CN=localhost`. - -## Using the generated library - -The generated library has a few optional features that can be activated through Cargo. - -* `server` - * This defaults to enabled and creates the basic skeleton of a server implementation based on hyper - * To create the server stack you'll need to provide an implementation of the API trait to provide the server function. -* `client` - * This defaults to enabled and creates the basic skeleton of a client implementation based on hyper - * The constructed client implements the API trait by making remote API call. -* `conversions` - * This defaults to disabled and creates extra derives on models to allow "transmogrification" between objects of structurally similar types. - -See https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section for how to use features in your `Cargo.toml`. - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getKeychainEntry**](docs/default_api.md#getKeychainEntry) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -[**setKeychainEntry**](docs/default_api.md#setKeychainEntry) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry | Sets a value under a key on the keychain backend. - - -## Documentation For Models - - - [GetKeychainEntryRequest](docs/GetKeychainEntryRequest.md) - - [GetKeychainEntryResponse](docs/GetKeychainEntryResponse.md) - - [SetKeychainEntryRequest](docs/SetKeychainEntryRequest.md) - - [SetKeychainEntryResponse](docs/SetKeychainEntryResponse.md) - - -## Documentation For Authorization - Endpoints do not require authorization. - - -## Author - - - diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/healthcheck.sh b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/healthcheck.sh deleted file mode 100755 index e04f27f9ff..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/healthcheck.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -curl -vv -i -X OPTIONS http://127.0.0.1:8080/ diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.cargo/config b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.cargo/config deleted file mode 100644 index b8acc9c00c..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.cargo/config +++ /dev/null @@ -1,18 +0,0 @@ -[build] -rustflags = [ - "-W", "missing_docs", # detects missing documentation for public members - - "-W", "trivial_casts", # detects trivial casts which could be removed - - "-W", "trivial_numeric_casts", # detects trivial casts of numeric types which could be removed - - "-W", "unsafe_code", # usage of `unsafe` code - - "-W", "unused_qualifications", # detects unnecessarily qualified names - - "-W", "unused_extern_crates", # extern crates that are never used - - "-W", "unused_import_braces", # unnecessary braces around an imported item - - "-D", "warnings", # all warnings should be denied -] diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.dockerignore b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.dockerignore deleted file mode 100644 index 9f970225ad..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -target/ \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.gitignore b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.gitignore deleted file mode 100644 index 535037eca6..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -target - -# We do not ignore Cargo.lock because this is an application, not a library. -# https://github.com/rust-lang/cargo/issues/315#issuecomment-51075730 diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.openapi-generator-ignore b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.openapi-generator-ignore deleted file mode 100644 index 095d66d1bb..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.openapi-generator-ignore +++ /dev/null @@ -1,26 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md - -docs/ -api/ \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.openapi-generator/FILES b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.openapi-generator/FILES deleted file mode 100644 index 26a60bb2e0..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.openapi-generator/FILES +++ /dev/null @@ -1,23 +0,0 @@ -.cargo/config -.gitignore -.openapi-generator-ignore -Cargo.toml -README.md -api/openapi.yaml -docs/GetKeychainEntryRequest.md -docs/GetKeychainEntryResponse.md -docs/SetKeychainEntryRequest.md -docs/SetKeychainEntryResponse.md -docs/default_api.md -examples/ca.pem -examples/client/main.rs -examples/server-chain.pem -examples/server-key.pem -examples/server/main.rs -examples/server/server.rs -src/client/mod.rs -src/context.rs -src/header.rs -src/lib.rs -src/models.rs -src/server/mod.rs diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.openapi-generator/VERSION deleted file mode 100644 index 3fa3b389a5..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.1-SNAPSHOT \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/Cargo.lock b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/Cargo.lock deleted file mode 100644 index 23fa93210b..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/Cargo.lock +++ /dev/null @@ -1,2060 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aho-corasick" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" -dependencies = [ - "memchr", -] - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "async-trait" -version = "0.1.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" -dependencies = [ - "proc-macro2 1.0.56", - "quote 1.0.26", - "syn 2.0.15", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -dependencies = [ - "byteorder", - "safemem", -] - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "bumpalo" -version = "3.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "iovec", -] - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - -[[package]] -name = "bytes" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" - -[[package]] -name = "cc" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-integer", - "num-traits", - "serde", - "time", - "wasm-bindgen", - "winapi", -] - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "cxx" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2 1.0.56", - "quote 1.0.26", - "scratch", - "syn 2.0.15", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" -dependencies = [ - "proc-macro2 1.0.56", - "quote 1.0.26", - "syn 2.0.15", -] - -[[package]] -name = "either" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" - -[[package]] -name = "encoding_rs" -version = "0.8.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" -dependencies = [ - "percent-encoding 2.2.0", -] - -[[package]] -name = "frunk" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd01808c133782ef54e23f527c997819c7825e9f698c3175ae8f9f013aa756ca" -dependencies = [ - "frunk_core", - "frunk_derives", - "frunk_proc_macros", -] - -[[package]] -name = "frunk-enum-core" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b752626f1f25ccc9c2309f27206a456798c572149c0eecace0f80a3a8792e845" -dependencies = [ - "frunk", -] - -[[package]] -name = "frunk-enum-derive" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2fe96f31066b7735d1cf74b483d213396e3a6d78d83d052608da7339f1b799" -dependencies = [ - "frunk_proc_macro_helpers 0.0.4", - "itertools", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "frunk_core" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8c14d645fa326a22a08400b896663e4efb7c92139f09eeccfffffa239d5858" - -[[package]] -name = "frunk_derives" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52413eaa1ba7ce16246c3ece23220c79c48c2bef32e19dc34ca039ed73ac1966" -dependencies = [ - "frunk_proc_macro_helpers 0.0.5", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "frunk_proc_macro_helpers" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24546dac1974be0df3e61144eff911672404bad46a76f39f6c72829f6254dbe" -dependencies = [ - "frunk_core", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "frunk_proc_macro_helpers" -version = "0.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d60db7eb6dd2ac8de66c09118788482343970d0d9ad86938bca97279a6ddee5c" -dependencies = [ - "frunk_core", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "frunk_proc_macros" -version = "0.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4735f7fbe65ed61442264f1d2cc98c93c5df4ca1a308851a645351c4912ebeb9" -dependencies = [ - "frunk_core", - "frunk_proc_macros_impl", - "proc-macro-hack", -] - -[[package]] -name = "frunk_proc_macros_impl" -version = "0.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0dd6736f34da423e773fe1276fd5e58aed45cb2386c670d6a106be6eef1d1cb" -dependencies = [ - "frunk_core", - "frunk_proc_macro_helpers 0.0.5", - "proc-macro-hack", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "futures" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" - -[[package]] -name = "futures-executor" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-macro" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2 1.0.56", - "quote 1.0.26", - "syn 2.0.15", -] - -[[package]] -name = "futures-sink" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" - -[[package]] -name = "futures-task" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" - -[[package]] -name = "futures-util" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite 0.2.9", - "pin-utils", - "slab", -] - -[[package]] -name = "getrandom" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "gimli" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes 1.4.0", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio 1.29.1", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "hashicorp_vault" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55d829f72fad7263fada3eb758f6ee9af60132c425e470c6a4af45a6cafab16d" -dependencies = [ - "base64 0.13.1", - "chrono", - "log", - "quick-error 2.0.1", - "reqwest", - "serde", - "serde_derive", - "serde_json", - "url", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" - -[[package]] -name = "http" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" -dependencies = [ - "bytes 1.4.0", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" -dependencies = [ - "bytes 1.4.0", - "http", - "pin-project-lite 0.2.9", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" - -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error 1.2.3", -] - -[[package]] -name = "hyper" -version = "0.14.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" -dependencies = [ - "bytes 1.4.0", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite 0.2.9", - "socket2", - "tokio 1.29.1", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-old-types" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6896be51ecf3966c0fa14ff2da3233dbb9aef57ccea1be1afe55f105f4d4c9c4" -dependencies = [ - "base64 0.9.3", - "bytes 0.4.12", - "httparse", - "language-tags", - "log", - "mime", - "percent-encoding 1.0.1", - "time", - "unicase", -] - -[[package]] -name = "hyper-openssl" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ee5d7a8f718585d1c3c61dfde28ef5b0bb14734b4db13f5ada856cdc6c612b" -dependencies = [ - "http", - "hyper", - "linked_hash_set", - "once_cell", - "openssl", - "openssl-sys", - "parking_lot", - "tokio 1.29.1", - "tokio-openssl", - "tower-layer", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes 1.4.0", - "hyper", - "native-tls", - "tokio 1.29.1", - "tokio-native-tls", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" -dependencies = [ - "cxx", - "cxx-build", -] - -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - -[[package]] -name = "ipnet" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" - -[[package]] -name = "js-sys" -version = "0.3.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linked_hash_set" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" -dependencies = [ - "linked-hash-map", -] - -[[package]] -name = "linux-raw-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" - -[[package]] -name = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" -dependencies = [ - "hermit-abi 0.2.6", - "libc", -] - -[[package]] -name = "object" -version = "0.36.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" - -[[package]] -name = "openapi_client" -version = "2.0.0" -dependencies = [ - "async-trait", - "chrono", - "clap", - "env_logger", - "frunk", - "frunk-enum-core", - "frunk-enum-derive", - "frunk_core", - "frunk_derives", - "futures", - "hashicorp_vault", - "hyper", - "hyper-openssl", - "hyper-tls", - "lazy_static", - "log", - "mime", - "native-tls", - "openssl", - "percent-encoding 2.2.0", - "regex", - "serde", - "serde_ignored", - "serde_json", - "swagger", - "tokio 1.29.1", - "tokio-openssl", - "tokio-tls", - "url", -] - -[[package]] -name = "openssl" -version = "0.10.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2 1.0.56", - "quote 1.0.26", - "syn 2.0.15", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "windows-sys 0.45.0", -] - -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - -[[package]] -name = "percent-encoding" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" - -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - -[[package]] -name = "pin-project-lite" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "proc-macro2" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - -[[package]] -name = "quote" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" -dependencies = [ - "proc-macro2 1.0.56", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "regex" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" - -[[package]] -name = "reqwest" -version = "0.11.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" -dependencies = [ - "base64 0.21.0", - "bytes 1.4.0", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding 2.2.0", - "pin-project-lite 0.2.9", - "serde", - "serde_json", - "serde_urlencoded", - "tokio 1.29.1", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys 0.48.0", -] - -[[package]] -name = "ryu" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" - -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - -[[package]] -name = "schannel" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" -dependencies = [ - "windows-sys 0.42.0", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" - -[[package]] -name = "security-framework" -version = "2.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "serde" -version = "1.0.160" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.160" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" -dependencies = [ - "proc-macro2 1.0.56", - "quote 1.0.26", - "syn 2.0.15", -] - -[[package]] -name = "serde_ignored" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94eb4a4087ba8bdf14a9208ac44fddbf55c01a6195f7edfc511ddaff6cae45a6" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_json" -version = "1.0.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "slab" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" -dependencies = [ - "autocfg", -] - -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" - -[[package]] -name = "smallvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "swagger" -version = "6.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2a82d64a679ef6395eafe5ca645f0861ab296928b3946070b51afc8cadbcd6d" -dependencies = [ - "base64 0.13.1", - "futures", - "hyper", - "hyper-old-types", - "hyper-openssl", - "hyper-tls", - "native-tls", - "openssl", - "serde", - "serde_json", - "slog", - "uuid", -] - -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2 1.0.56", - "quote 1.0.26", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" -dependencies = [ - "proc-macro2 1.0.56", - "quote 1.0.26", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall 0.3.5", - "rustix", - "windows-sys 0.45.0", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" -dependencies = [ - "bytes 0.5.6", - "pin-project-lite 0.1.12", -] - -[[package]] -name = "tokio" -version = "1.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" -dependencies = [ - "autocfg", - "backtrace", - "bytes 1.4.0", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite 0.2.9", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" -dependencies = [ - "proc-macro2 1.0.56", - "quote 1.0.26", - "syn 2.0.15", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio 1.29.1", -] - -[[package]] -name = "tokio-openssl" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08f9ffb7809f1b20c1b398d92acf4cc719874b3b2b2d9ea2f09b4a80350878a" -dependencies = [ - "futures-util", - "openssl", - "openssl-sys", - "tokio 1.29.1", -] - -[[package]] -name = "tokio-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" -dependencies = [ - "native-tls", - "tokio 0.2.25", -] - -[[package]] -name = "tokio-util" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" -dependencies = [ - "bytes 1.4.0", - "futures-core", - "futures-sink", - "pin-project-lite 0.2.9", - "tokio 1.29.1", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" -dependencies = [ - "cfg-if", - "pin-project-lite 0.2.9", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - -[[package]] -name = "url" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding 2.2.0", -] - -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom", - "serde", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2 1.0.56", - "quote 1.0.26", - "syn 1.0.109", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" -dependencies = [ - "quote 1.0.26", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" -dependencies = [ - "proc-macro2 1.0.56", - "quote 1.0.26", - "syn 1.0.109", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" - -[[package]] -name = "web-sys" -version = "0.3.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" -dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/Cargo.toml b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/Cargo.toml deleted file mode 100644 index c4df6c407e..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/Cargo.toml +++ /dev/null @@ -1,72 +0,0 @@ -[package] -name = "openapi_client" -version = "2.0.0" -authors = [] -description = "Contains/describes the Keychain API types/paths for Hyperledger Cactus." -license = "Unlicense" -edition = "2018" - -[features] -default = ["server"] - -server = [ - "serde_ignored", "hyper", "regex", "percent-encoding", "url", "lazy_static" -] -conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk-enum-derive"] - -[target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies] -native-tls = { version = "0.2", optional = true } -hyper-tls = { version = "0.5", optional = true } - -[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies] -hyper-openssl = { version = "0.9", optional = true } -openssl = {version = "0.10.66", optional = true } - -[dependencies] -# Common -async-trait = "0.1.24" -chrono = { version = "0.4", features = ["serde"] } -futures = "0.3" -swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] } -log = "0.4.0" -mime = "0.3" - -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" - -# Crates included if required by the API definition - -# Common between server and client features -hyper = {version = "0.14", features = ["full"], optional = true} -serde_ignored = {version = "0.1.1", optional = true} -url = {version = "2.1", optional = true} - -# Client-specific - -# Server, and client callback-specific -lazy_static = { version = "1.4", optional = true } -percent-encoding = {version = "2.1.0", optional = true} -regex = {version = "1.3", optional = true} -hashicorp_vault = { version = "2.1.1" } - -# Conversion -frunk = { version = "0.3.0", optional = true } -frunk_derives = { version = "0.3.0", optional = true } -frunk_core = { version = "0.3.0", optional = true } -frunk-enum-derive = { version = "0.2.0", optional = true } -frunk-enum-core = { version = "0.2.0", optional = true } - -[dev-dependencies] -clap = "2.25" -env_logger = "0.7" -tokio = { version = "1.29", features = ["full"] } -native-tls = "0.2" -tokio-tls = "0.3" - -[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies] -tokio-openssl = "0.6" -openssl = "0.10.66" - -[[example]] -name = "server" -required-features = ["server"] diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/examples/server/main.rs b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/examples/server/main.rs deleted file mode 100644 index 96ec9abb87..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/examples/server/main.rs +++ /dev/null @@ -1,48 +0,0 @@ -//! Main binary entry point for openapi_client implementation. - -#![allow(missing_docs)] - -use clap::{App, Arg}; -use std::env; - -mod server; - - -/// Create custom server, wire it to the autogenerated router, -/// and pass it to the web server. -#[tokio::main] -async fn main() { - env_logger::init(); - - let matches = App::new("server") - .arg(Arg::with_name("https") - .long("https") - .help("Whether to use HTTPS or not")) - // FIXME find a way to propagate these into the context of the hyper handlers and then use them - // FIXME make sure environment variables can also be used to specify the same configuration arguments - // (no idea if clap does that by default or not) - // .arg(Arg::with_name("vault-host") - // .short("h") - // .long("vault-host") - // .takes_value(true) - // .default_value("http://localhost:8200") - // .help("The address/DNS name + port number where the targeted Vault instance can be reached.")) - // .arg(Arg::with_name("vault-token") - // .short("t") - // .long("vault-token") - // .takes_value(true) - // .help("The token to use when authenticating against the targeted Vault instance.")) - .get_matches(); - - let temp_host; - let host: &str; - if env::var("HOST").is_err() { - host = "127.0.0.1:8080" - } else { - temp_host = env::var("HOST").unwrap(); - host = &*temp_host; - } - - let r = server::create(host, matches.is_present("https"), "", "").await; - println!("{:?}", r) -} diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/examples/server/server.rs b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/examples/server/server.rs deleted file mode 100644 index 70211d9577..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/examples/server/server.rs +++ /dev/null @@ -1,134 +0,0 @@ -//! Main library entry point for openapi_client implementation. - -#![allow(unused_imports)] - -use async_trait::async_trait; -use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt}; -use hyper::server::conn::Http; -use hyper::service::Service; -use log::info; -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::SslAcceptorBuilder; -use std::future::Future; -use std::marker::PhantomData; -use std::net::SocketAddr; -use std::sync::{Arc, Mutex}; -use std::task::{Context, Poll}; -use swagger::{Has, XSpanIdString}; -use swagger::auth::MakeAllowAllAuthenticator; -use swagger::EmptyContext; -use tokio::net::TcpListener; - -#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))] -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; - -use openapi_client::models; - -type GenericError = Box; -type YoloResult = Result; - -extern crate hashicorp_vault as vault; - -/// Builds an SSL implementation for Simple HTTPS from some hard-coded file names -pub async fn create(addr: &str, _https: bool, _vault_host: &str, _vault_token: &str) -> YoloResult<()> { - let addr = addr.parse().expect("Failed to parse bind address"); - - // let vaulthost = vaulthost.parse().expect("Failed to parse Vault address"); - - let server = Server::new(); - - let service = MakeService::new(server); - - let service = MakeAllowAllAuthenticator::new(service, "cosmo"); - - let service = - openapi_client::server::context::MakeAddContext::<_, EmptyContext>::new( - service - ); - - eprintln!("Binding server to network interface ..."); - - let hyper_server = hyper::server::Server::bind(&addr).serve(service); - println!("Listening on http://{}", addr); - hyper_server.await?; - Ok(()) -} - -#[derive(Copy, Clone)] -pub struct Server { - marker: PhantomData, -} - -impl Server { - pub fn new() -> Self { - Server{marker: PhantomData} - } -} - - -use openapi_client::{ - Api, - GetKeychainEntryResponse, - SetKeychainEntryResponse, -}; -use openapi_client::server::MakeService; -use std::error::Error; -use swagger::ApiError; -use std::env; - -#[async_trait] -impl Api for Server where C: Has + Send + Sync -{ - /// Retrieves the contents of a keychain entry from the backend. - async fn get_keychain_entry( - &self, - get_keychain_entry_request: models::GetKeychainEntryRequest, - context: &C) -> Result - { - info!("get_keychain_entry({:?}) - X-Span-ID: {:?}", get_keychain_entry_request, context.get().0.clone()); - - // FIXME implement connection pooling - // FIXME move configuration parsing logic to main instead - let temp_host; - let host: &str; - if env::var("VAULT_HOST").is_err() { - host = "http://localhost:8200" - } else { - temp_host = env::var("VAULT_HOST").unwrap(); - host = &*temp_host; - } - let token = env::var("VAULT_TOKEN").unwrap(); - let client = vault::Client::new(host, token).unwrap(); - - let secret = client.get_secret(get_keychain_entry_request.key.clone()).unwrap(); - - Ok(GetKeychainEntryResponse::OK(models::GetKeychainEntryResponse::new(get_keychain_entry_request.key.clone(), secret.to_string()))) - } - - /// Sets a value under a key on the keychain backend. - async fn set_keychain_entry( - &self, - set_keychain_entry_request: models::SetKeychainEntryRequest, - context: &C) -> Result - { - info!("set_keychain_entry({:?}) - X-Span-ID: {:?}", set_keychain_entry_request, context.get().0.clone()); - - // FIXME implement connection pooling - // FIXME move configuration parsing logic to main instead - let temp_host; - let host: &str; - if env::var("VAULT_HOST").is_err() { - host = "http://localhost:8200" - } else { - temp_host = env::var("VAULT_HOST").unwrap(); - host = &*temp_host; - } - let token = env::var("VAULT_TOKEN").unwrap(); - let client = vault::Client::new(host, token).unwrap(); - - let _ = client.set_secret(set_keychain_entry_request.key.clone(), set_keychain_entry_request.value.clone()); - - Ok(SetKeychainEntryResponse::OK(models::SetKeychainEntryResponse::new(set_keychain_entry_request.key.clone()))) - } - -} diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/context.rs b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/context.rs deleted file mode 100644 index fadd880b96..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/context.rs +++ /dev/null @@ -1,113 +0,0 @@ -use futures::future::BoxFuture; -use hyper::header::HeaderName; -use hyper::{Error, Request, Response, StatusCode, service::Service}; -use url::form_urlencoded; -use std::default::Default; -use std::io; -use std::marker::PhantomData; -use std::task::{Poll, Context}; -use swagger::auth::{AuthData, Authorization, Bearer, Scopes}; -use swagger::{EmptyContext, Has, Pop, Push, XSpanIdString}; -use crate::Api; - -pub struct MakeAddContext { - inner: T, - marker: PhantomData, -} - -impl MakeAddContext -where - A: Default + Push, - B: Push, Result = C>, - C: Push, Result = D>, -{ - pub fn new(inner: T) -> MakeAddContext { - MakeAddContext { - inner, - marker: PhantomData, - } - } -} - -// Make a service that adds context. -impl Service for - MakeAddContext -where - Target: Send, - A: Default + Push + Send, - B: Push, Result = C>, - C: Push, Result = D>, - D: Send + 'static, - T: Service + Send, - T::Future: Send + 'static -{ - type Error = T::Error; - type Response = AddContext; - type Future = BoxFuture<'static, Result>; - - fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { - self.inner.poll_ready(cx) - } - - fn call(&mut self, target: Target) -> Self::Future { - let service = self.inner.call(target); - - Box::pin(async move { - Ok(AddContext::new(service.await?)) - }) - } -} - -/// Middleware to add context data from the request -pub struct AddContext -where - A: Default + Push, - B: Push, Result = C>, - C: Push, Result = D> -{ - inner: T, - marker: PhantomData, -} - -impl AddContext -where - A: Default + Push, - B: Push, Result = C>, - C: Push, Result = D>, -{ - pub fn new(inner: T) -> Self { - AddContext { - inner, - marker: PhantomData, - } - } -} - -impl Service> for AddContext - where - A: Default + Push, - B: Push, Result=C>, - C: Push, Result=D>, - D: Send + 'static, - T: Service<(Request, D)> -{ - type Error = T::Error; - type Future = T::Future; - type Response = T::Response; - - fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { - self.inner.poll_ready(cx) - } - - - fn call(&mut self, request: Request) -> Self::Future { - let context = A::default().push(XSpanIdString::get_or_generate(&request)); - let headers = request.headers(); - - - let context = context.push(None::); - let context = context.push(None::); - - self.inner.call((request, context)) - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/header.rs b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/header.rs deleted file mode 100644 index 5bc6ebe929..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/header.rs +++ /dev/null @@ -1,180 +0,0 @@ -use chrono::{DateTime, Utc}; -use hyper::header::HeaderValue; -use std::convert::TryFrom; -use std::fmt; -use std::ops::Deref; - -/// A struct to allow homogeneous conversion into a HeaderValue. We can't -/// implement the From/Into trait on HeaderValue because we don't own -/// either of the types. -#[derive(Debug, Clone)] -pub(crate) struct IntoHeaderValue(pub T); - -// Generic implementations - -impl Deref for IntoHeaderValue { - type Target = T; - - fn deref(&self) -> &T { - &self.0 - } -} - -// Derive for each TryFrom in hyper::header::HeaderValue - -macro_rules! ihv_generate { - ($t:ident) => { - impl TryFrom for IntoHeaderValue<$t> { - type Error = String; - - fn try_from(hdr_value: HeaderValue) -> Result { - match hdr_value.to_str() { - Ok(hdr_value) => match hdr_value.parse::<$t>() { - Ok(hdr_value) => Ok(IntoHeaderValue(hdr_value)), - Err(e) => Err(format!("Unable to parse {} as a string: {}", - stringify!($t), e)), - }, - Err(e) => Err(format!("Unable to parse header {:?} as a string - {}", - hdr_value, e)), - } - } - } - - impl TryFrom> for HeaderValue { - type Error = String; - - fn try_from(hdr_value: IntoHeaderValue<$t>) -> Result { - Ok(hdr_value.0.into()) - } - } - }; -} - -ihv_generate!(u64); -ihv_generate!(i64); -ihv_generate!(i16); -ihv_generate!(u16); -ihv_generate!(u32); -ihv_generate!(usize); -ihv_generate!(isize); -ihv_generate!(i32); - -// Custom derivations - -// Vec - -impl TryFrom for IntoHeaderValue> { - type Error = String; - - fn try_from(hdr_value: HeaderValue) -> Result { - match hdr_value.to_str() { - Ok(hdr_value) => Ok(IntoHeaderValue( - hdr_value - .split(',') - .filter_map(|x| match x.trim() { - "" => None, - y => Some(y.to_string()), - }) - .collect())), - Err(e) => Err(format!("Unable to parse header: {:?} as a string - {}", - hdr_value, e)), - } - } -} - -impl TryFrom>> for HeaderValue { - type Error = String; - - fn try_from(hdr_value: IntoHeaderValue>) -> Result { - match HeaderValue::from_str(&hdr_value.0.join(", ")) { - Ok(hdr_value) => Ok(hdr_value), - Err(e) => Err(format!("Unable to convert {:?} into a header - {}", - hdr_value, e)) - } - } -} - -// String - -impl TryFrom for IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: HeaderValue) -> Result { - match hdr_value.to_str() { - Ok(hdr_value) => Ok(IntoHeaderValue(hdr_value.to_string())), - Err(e) => Err(format!("Unable to convert header {:?} to {}", - hdr_value, e)), - } - } -} - -impl TryFrom> for HeaderValue { - type Error = String; - - fn try_from(hdr_value: IntoHeaderValue) -> Result { - match HeaderValue::from_str(&hdr_value.0) { - Ok(hdr_value) => Ok(hdr_value), - Err(e) => Err(format!("Unable to convert {:?} from a header {}", - hdr_value, e)) - } - } -} - -// bool -impl TryFrom for IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: HeaderValue) -> Result { - match hdr_value.to_str() { - Ok(hdr_value) => match hdr_value.parse() { - Ok(hdr_value) => Ok(IntoHeaderValue(hdr_value)), - Err(e) => Err(format!("Unable to parse bool from {} - {}", - hdr_value, e)), - }, - Err(e) => Err(format!("Unable to convert {:?} from a header {}", - hdr_value, e)), - } - } -} - -impl TryFrom> for HeaderValue { - type Error = String; - - fn try_from(hdr_value: IntoHeaderValue) -> Result { - match HeaderValue::from_str(&hdr_value.0.to_string()) { - Ok(hdr_value) => Ok(hdr_value), - Err(e) => Err(format!("Unable to convert: {:?} into a header: {}", - hdr_value, e)) - } - } -} - -// DateTime - -impl TryFrom for IntoHeaderValue> { - type Error = String; - - fn try_from(hdr_value: HeaderValue) -> Result { - match hdr_value.to_str() { - Ok(hdr_value) => match DateTime::parse_from_rfc3339(hdr_value) { - Ok(date) => Ok(IntoHeaderValue(date.with_timezone(&Utc))), - Err(e) => Err(format!("Unable to parse: {} as date - {}", - hdr_value, e)), - }, - Err(e) => Err(format!("Unable to convert header {:?} to string {}", - hdr_value, e)), - } - } -} - -impl TryFrom>> for HeaderValue { - type Error = String; - - fn try_from(hdr_value: IntoHeaderValue>) -> Result { - match HeaderValue::from_str(hdr_value.0.to_rfc3339().as_str()) { - Ok(hdr_value) => Ok(hdr_value), - Err(e) => Err(format!("Unable to convert {:?} to a header: {}", - hdr_value, e)), - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/lib.rs b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/lib.rs deleted file mode 100644 index 6d6a745f60..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/lib.rs +++ /dev/null @@ -1,160 +0,0 @@ -#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] - -use async_trait::async_trait; -use futures::Stream; -use std::error::Error; -use std::task::{Poll, Context}; -use swagger::{ApiError, ContextWrapper}; - -type ServiceError = Box; - -pub const BASE_PATH: &'static str = ""; -pub const API_VERSION: &'static str = "0.3.0"; - -#[derive(Debug, PartialEq)] -#[must_use] -pub enum GetKeychainEntryResponse { - /// OK - OK - (models::GetKeychainEntryResponse) - , - /// Bad request. Key must be a string and longer than 0, shorter than 1024 characters. - BadRequest - , - /// Authorization information is missing or invalid. - AuthorizationInformationIsMissingOrInvalid - , - /// A keychain item with the specified key was not found. - AKeychainItemWithTheSpecifiedKeyWasNotFound - , - /// Unexpected error. - UnexpectedError -} - -#[derive(Debug, PartialEq)] -#[must_use] -pub enum SetKeychainEntryResponse { - /// OK - OK - (models::SetKeychainEntryResponse) - , - /// Bad request. Key must be a string and longer than 0, shorter than 1024 characters. - BadRequest - , - /// Authorization information is missing or invalid. - AuthorizationInformationIsMissingOrInvalid - , - /// Unexpected error. - UnexpectedError -} - -/// API -#[async_trait] -pub trait Api { - fn poll_ready(&self, _cx: &mut Context) -> Poll>> { - Poll::Ready(Ok(())) - } - - /// Retrieves the contents of a keychain entry from the backend. - async fn get_keychain_entry( - &self, - get_keychain_entry_request: models::GetKeychainEntryRequest, - context: &C) -> Result; - - /// Sets a value under a key on the keychain backend. - async fn set_keychain_entry( - &self, - set_keychain_entry_request: models::SetKeychainEntryRequest, - context: &C) -> Result; - -} - -/// API where `Context` isn't passed on every API call -#[async_trait] -pub trait ApiNoContext { - - fn poll_ready(&self, _cx: &mut Context) -> Poll>>; - - fn context(&self) -> &C; - - /// Retrieves the contents of a keychain entry from the backend. - async fn get_keychain_entry( - &self, - get_keychain_entry_request: models::GetKeychainEntryRequest, - ) -> Result; - - /// Sets a value under a key on the keychain backend. - async fn set_keychain_entry( - &self, - set_keychain_entry_request: models::SetKeychainEntryRequest, - ) -> Result; - -} - -/// Trait to extend an API to make it easy to bind it to a context. -pub trait ContextWrapperExt where Self: Sized -{ - /// Binds this API to a context. - fn with_context(self: Self, context: C) -> ContextWrapper; -} - -impl + Send + Sync, C: Clone + Send + Sync> ContextWrapperExt for T { - fn with_context(self: T, context: C) -> ContextWrapper { - ContextWrapper::::new(self, context) - } -} - -#[async_trait] -impl + Send + Sync, C: Clone + Send + Sync> ApiNoContext for ContextWrapper { - fn poll_ready(&self, cx: &mut Context) -> Poll> { - self.api().poll_ready(cx) - } - - fn context(&self) -> &C { - ContextWrapper::context(self) - } - - /// Retrieves the contents of a keychain entry from the backend. - async fn get_keychain_entry( - &self, - get_keychain_entry_request: models::GetKeychainEntryRequest, - ) -> Result - { - let context = self.context().clone(); - self.api().get_keychain_entry(get_keychain_entry_request, &context).await - } - - /// Sets a value under a key on the keychain backend. - async fn set_keychain_entry( - &self, - set_keychain_entry_request: models::SetKeychainEntryRequest, - ) -> Result - { - let context = self.context().clone(); - self.api().set_keychain_entry(set_keychain_entry_request, &context).await - } - -} - - -#[cfg(feature = "client")] -pub mod client; - -// Re-export Client as a top-level name -#[cfg(feature = "client")] -pub use client::Client; - -#[cfg(feature = "server")] -pub mod server; - -// Re-export router() as a top-level name -#[cfg(feature = "server")] -pub use self::server::Service; - -#[cfg(feature = "server")] -pub mod context; - -pub mod models; - -#[cfg(any(feature = "client", feature = "server"))] -pub(crate) mod header; diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/models.rs b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/models.rs deleted file mode 100644 index d33ef6120c..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/models.rs +++ /dev/null @@ -1,490 +0,0 @@ -#![allow(unused_qualifications)] - -use crate::models; -#[cfg(any(feature = "client", feature = "server"))] -use crate::header; - - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for GetKeychainEntryRequest - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into GetKeychainEntryRequest - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct GetKeychainEntryRequest { - /// The key for the entry to get from the keychain. - #[serde(rename = "key")] - pub key: String, - -} - -impl GetKeychainEntryRequest { - pub fn new(key: String, ) -> GetKeychainEntryRequest { - GetKeychainEntryRequest { - key: key, - } - } -} - -/// Converts the GetKeychainEntryRequest value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for GetKeychainEntryRequest { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a GetKeychainEntryRequest value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for GetKeychainEntryRequest { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing GetKeychainEntryRequest".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(String::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing GetKeychainEntryRequest".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(GetKeychainEntryRequest { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in GetKeychainEntryRequest".to_string())?, - }) - } -} - - - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for GetKeychainEntryResponse - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into GetKeychainEntryResponse - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct GetKeychainEntryResponse { - /// The key that was used to retrieve the value from the keychain. - #[serde(rename = "key")] - pub key: String, - - /// The value associated with the requested key on the keychain. - #[serde(rename = "value")] - pub value: String, - -} - -impl GetKeychainEntryResponse { - pub fn new(key: String, value: String, ) -> GetKeychainEntryResponse { - GetKeychainEntryResponse { - key: key, - value: value, - } - } -} - -/// Converts the GetKeychainEntryResponse value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for GetKeychainEntryResponse { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - - params.push("value".to_string()); - params.push(self.value.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a GetKeychainEntryResponse value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for GetKeychainEntryResponse { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - pub value: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing GetKeychainEntryResponse".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(String::from_str(val).map_err(|x| format!("{}", x))?), - "value" => intermediate_rep.value.push(String::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing GetKeychainEntryResponse".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(GetKeychainEntryResponse { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in GetKeychainEntryResponse".to_string())?, - value: intermediate_rep.value.into_iter().next().ok_or("value missing in GetKeychainEntryResponse".to_string())?, - }) - } -} - - - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for SetKeychainEntryRequest - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into SetKeychainEntryRequest - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct SetKeychainEntryRequest { - /// The key for the entry to set on the keychain. - #[serde(rename = "key")] - pub key: String, - - /// The value that will be associated with the key on the keychain. - #[serde(rename = "value")] - pub value: String, - -} - -impl SetKeychainEntryRequest { - pub fn new(key: String, value: String, ) -> SetKeychainEntryRequest { - SetKeychainEntryRequest { - key: key, - value: value, - } - } -} - -/// Converts the SetKeychainEntryRequest value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for SetKeychainEntryRequest { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - - params.push("value".to_string()); - params.push(self.value.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a SetKeychainEntryRequest value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for SetKeychainEntryRequest { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - pub value: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing SetKeychainEntryRequest".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(String::from_str(val).map_err(|x| format!("{}", x))?), - "value" => intermediate_rep.value.push(String::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing SetKeychainEntryRequest".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(SetKeychainEntryRequest { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in SetKeychainEntryRequest".to_string())?, - value: intermediate_rep.value.into_iter().next().ok_or("value missing in SetKeychainEntryRequest".to_string())?, - }) - } -} - - - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for SetKeychainEntryResponse - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into SetKeychainEntryResponse - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct SetKeychainEntryResponse { - /// The key that was used to set the value on the keychain. - #[serde(rename = "key")] - pub key: String, - -} - -impl SetKeychainEntryResponse { - pub fn new(key: String, ) -> SetKeychainEntryResponse { - SetKeychainEntryResponse { - key: key, - } - } -} - -/// Converts the SetKeychainEntryResponse value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for SetKeychainEntryResponse { - fn to_string(&self) -> String { - let mut params: Vec = vec![]; - - params.push("key".to_string()); - params.push(self.key.to_string()); - - params.join(",").to_string() - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a SetKeychainEntryResponse value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for SetKeychainEntryResponse { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - #[derive(Default)] - // An intermediate representation of the struct to use for parsing. - struct IntermediateRep { - pub key: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(',').into_iter(); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing SetKeychainEntryResponse".to_string()) - }; - - if let Some(key) = key_result { - match key { - "key" => intermediate_rep.key.push(String::from_str(val).map_err(|x| format!("{}", x))?), - _ => return std::result::Result::Err("Unexpected key while parsing SetKeychainEntryResponse".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(SetKeychainEntryResponse { - key: intermediate_rep.key.into_iter().next().ok_or("key missing in SetKeychainEntryResponse".to_string())?, - }) - } -} - - diff --git a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/server/mod.rs b/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/server/mod.rs deleted file mode 100644 index 0bc83965bf..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/rust/gen/src/server/mod.rs +++ /dev/null @@ -1,355 +0,0 @@ -use futures::{future, future::BoxFuture, Stream, stream, future::FutureExt, stream::TryStreamExt}; -use hyper::{Request, Response, StatusCode, Body, HeaderMap}; -use hyper::header::{HeaderName, HeaderValue, CONTENT_TYPE}; -use log::warn; -#[allow(unused_imports)] -use std::convert::{TryFrom, TryInto}; -use std::error::Error; -use std::future::Future; -use std::marker::PhantomData; -use std::task::{Context, Poll}; -use swagger::{ApiError, BodyExt, Has, RequestParser, XSpanIdString}; -pub use swagger::auth::Authorization; -use swagger::auth::Scopes; -use url::form_urlencoded; - -#[allow(unused_imports)] -use crate::models; -use crate::header; - -pub use crate::context; - -type ServiceFuture = BoxFuture<'static, Result, crate::ServiceError>>; - -use crate::{Api, - GetKeychainEntryResponse, - SetKeychainEntryResponse -}; - -mod paths { - use lazy_static::lazy_static; - - lazy_static! { - pub static ref GLOBAL_REGEX_SET: regex::RegexSet = regex::RegexSet::new(vec![ - r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry$", - r"^/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry$" - ]) - .expect("Unable to create global regex set"); - } - pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY: usize = 0; - pub(crate) static ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY: usize = 1; -} - -pub struct MakeService where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - api_impl: T, - marker: PhantomData, -} - -impl MakeService where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - pub fn new(api_impl: T) -> Self { - MakeService { - api_impl, - marker: PhantomData - } - } -} - -impl hyper::service::Service for MakeService where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - type Response = Service; - type Error = crate::ServiceError; - type Future = future::Ready>; - - fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { - Poll::Ready(Ok(())) - } - - fn call(&mut self, target: Target) -> Self::Future { - futures::future::ok(Service::new( - self.api_impl.clone(), - )) - } -} - -fn method_not_allowed() -> Result, crate::ServiceError> { - Ok( - Response::builder().status(StatusCode::METHOD_NOT_ALLOWED) - .body(Body::empty()) - .expect("Unable to create Method Not Allowed response") - ) -} - -pub struct Service where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - api_impl: T, - marker: PhantomData, -} - -impl Service where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - pub fn new(api_impl: T) -> Self { - Service { - api_impl: api_impl, - marker: PhantomData - } - } -} - -impl Clone for Service where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static -{ - fn clone(&self) -> Self { - Service { - api_impl: self.api_impl.clone(), - marker: self.marker.clone(), - } - } -} - -impl hyper::service::Service<(Request, C)> for Service where - T: Api + Clone + Send + Sync + 'static, - C: Has + Send + Sync + 'static -{ - type Response = Response; - type Error = crate::ServiceError; - type Future = ServiceFuture; - - fn poll_ready(&mut self, cx: &mut Context) -> Poll> { - self.api_impl.poll_ready(cx) - } - - fn call(&mut self, req: (Request, C)) -> Self::Future { async fn run(mut api_impl: T, req: (Request, C)) -> Result, crate::ServiceError> where - T: Api + Clone + Send + 'static, - C: Has + Send + Sync + 'static - { - let (request, context) = req; - let (parts, body) = request.into_parts(); - let (method, uri, headers) = (parts.method, parts.uri, parts.headers); - let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); - - match &method { - - // GetKeychainEntry - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY) => { - // Body parameters (note that non-required body parameters will ignore garbage - // values, rather than causing a 400 response). Produce warning header and logs for - // any unused fields. - let result = hyper::body::to_bytes(body).await; - match result { - Ok(body) => { - let mut unused_elements = Vec::new(); - let param_get_keychain_entry_request: Option = if !body.is_empty() { - let deserializer = &mut serde_json::Deserializer::from_slice(&*body); - match serde_ignored::deserialize(deserializer, |path| { - warn!("Ignoring unknown field in body: {}", path); - unused_elements.push(path.to_string()); - }) { - Ok(param_get_keychain_entry_request) => param_get_keychain_entry_request, - Err(e) => return Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from(format!("Couldn't parse body parameter GetKeychainEntryRequest - doesn't match schema: {}", e))) - .expect("Unable to create Bad Request response for invalid body parameter GetKeychainEntryRequest due to schema")), - } - } else { - None - }; - let param_get_keychain_entry_request = match param_get_keychain_entry_request { - Some(param_get_keychain_entry_request) => param_get_keychain_entry_request, - None => return Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from("Missing required body parameter GetKeychainEntryRequest")) - .expect("Unable to create Bad Request response for missing body parameter GetKeychainEntryRequest")), - }; - - let result = api_impl.get_keychain_entry( - param_get_keychain_entry_request, - &context - ).await; - let mut response = Response::new(Body::empty()); - response.headers_mut().insert( - HeaderName::from_static("x-span-id"), - HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) - .expect("Unable to create X-Span-ID header value")); - - if !unused_elements.is_empty() { - response.headers_mut().insert( - HeaderName::from_static("warning"), - HeaderValue::from_str(format!("Ignoring unknown fields in body: {:?}", unused_elements).as_str()) - .expect("Unable to create Warning header value")); - } - - match result { - Ok(rsp) => match rsp { - GetKeychainEntryResponse::OK - (body) - => { - *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); - response.headers_mut().insert( - CONTENT_TYPE, - HeaderValue::from_str("application/json") - .expect("Unable to create Content-Type header for GET_KEYCHAIN_ENTRY_OK")); - let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); - *response.body_mut() = Body::from(body); - }, - GetKeychainEntryResponse::BadRequest - => { - *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); - }, - GetKeychainEntryResponse::AuthorizationInformationIsMissingOrInvalid - => { - *response.status_mut() = StatusCode::from_u16(401).expect("Unable to turn 401 into a StatusCode"); - }, - GetKeychainEntryResponse::AKeychainItemWithTheSpecifiedKeyWasNotFound - => { - *response.status_mut() = StatusCode::from_u16(404).expect("Unable to turn 404 into a StatusCode"); - }, - GetKeychainEntryResponse::UnexpectedError - => { - *response.status_mut() = StatusCode::from_u16(500).expect("Unable to turn 500 into a StatusCode"); - }, - }, - Err(_) => { - // Application code returned an error. This should not happen, as the implementation should - // return a valid response. - *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; - *response.body_mut() = Body::from("An internal error occurred"); - }, - } - - Ok(response) - }, - Err(e) => Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from(format!("Couldn't read body parameter GetKeychainEntryRequest: {}", e))) - .expect("Unable to create Bad Request response due to unable to read body parameter GetKeychainEntryRequest")), - } - }, - - // SetKeychainEntry - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY) => { - // Body parameters (note that non-required body parameters will ignore garbage - // values, rather than causing a 400 response). Produce warning header and logs for - // any unused fields. - let result = hyper::body::to_bytes(body).await; - match result { - Ok(body) => { - let mut unused_elements = Vec::new(); - let param_set_keychain_entry_request: Option = if !body.is_empty() { - let deserializer = &mut serde_json::Deserializer::from_slice(&*body); - match serde_ignored::deserialize(deserializer, |path| { - warn!("Ignoring unknown field in body: {}", path); - unused_elements.push(path.to_string()); - }) { - Ok(param_set_keychain_entry_request) => param_set_keychain_entry_request, - Err(e) => return Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from(format!("Couldn't parse body parameter SetKeychainEntryRequest - doesn't match schema: {}", e))) - .expect("Unable to create Bad Request response for invalid body parameter SetKeychainEntryRequest due to schema")), - } - } else { - None - }; - let param_set_keychain_entry_request = match param_set_keychain_entry_request { - Some(param_set_keychain_entry_request) => param_set_keychain_entry_request, - None => return Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from("Missing required body parameter SetKeychainEntryRequest")) - .expect("Unable to create Bad Request response for missing body parameter SetKeychainEntryRequest")), - }; - - let result = api_impl.set_keychain_entry( - param_set_keychain_entry_request, - &context - ).await; - let mut response = Response::new(Body::empty()); - response.headers_mut().insert( - HeaderName::from_static("x-span-id"), - HeaderValue::from_str((&context as &dyn Has).get().0.clone().to_string().as_str()) - .expect("Unable to create X-Span-ID header value")); - - if !unused_elements.is_empty() { - response.headers_mut().insert( - HeaderName::from_static("warning"), - HeaderValue::from_str(format!("Ignoring unknown fields in body: {:?}", unused_elements).as_str()) - .expect("Unable to create Warning header value")); - } - - match result { - Ok(rsp) => match rsp { - SetKeychainEntryResponse::OK - (body) - => { - *response.status_mut() = StatusCode::from_u16(200).expect("Unable to turn 200 into a StatusCode"); - response.headers_mut().insert( - CONTENT_TYPE, - HeaderValue::from_str("application/json") - .expect("Unable to create Content-Type header for SET_KEYCHAIN_ENTRY_OK")); - let body = serde_json::to_string(&body).expect("impossible to fail to serialize"); - *response.body_mut() = Body::from(body); - }, - SetKeychainEntryResponse::BadRequest - => { - *response.status_mut() = StatusCode::from_u16(400).expect("Unable to turn 400 into a StatusCode"); - }, - SetKeychainEntryResponse::AuthorizationInformationIsMissingOrInvalid - => { - *response.status_mut() = StatusCode::from_u16(401).expect("Unable to turn 401 into a StatusCode"); - }, - SetKeychainEntryResponse::UnexpectedError - => { - *response.status_mut() = StatusCode::from_u16(500).expect("Unable to turn 500 into a StatusCode"); - }, - }, - Err(_) => { - // Application code returned an error. This should not happen, as the implementation should - // return a valid response. - *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; - *response.body_mut() = Body::from("An internal error occurred"); - }, - } - - Ok(response) - }, - Err(e) => Ok(Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(Body::from(format!("Couldn't read body parameter SetKeychainEntryRequest: {}", e))) - .expect("Unable to create Bad Request response due to unable to read body parameter SetKeychainEntryRequest")), - } - }, - - _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY) => method_not_allowed(), - _ if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY) => method_not_allowed(), - _ => Ok(Response::builder().status(StatusCode::NOT_FOUND) - .body(Body::empty()) - .expect("Unable to create Not Found response")) - } - } Box::pin(run(self.api_impl.clone(), req)) } -} - -/// Request parser for `Api`. -pub struct ApiRequestParser; -impl RequestParser for ApiRequestParser { - fn parse_operation_id(request: &Request) -> Option<&'static str> { - let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); - match request.method() { - // GetKeychainEntry - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_GET_KEYCHAIN_ENTRY) => Some("GetKeychainEntry"), - // SetKeychainEntry - POST /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry - &hyper::Method::POST if path.matched(paths::ID_API_V1_PLUGINS_HYPERLEDGER_CACTUS_PLUGIN_KEYCHAIN_VAULT_SET_KEYCHAIN_ENTRY) => Some("SetKeychainEntry"), - _ => None, - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 28a644e272..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,18 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_delete_keychain_entry_request_v1.go -model_delete_keychain_entry_response_v1.go -model_get_keychain_entry_request_v1.go -model_get_keychain_entry_response_v1.go -model_has_keychain_entry_request_v1.go -model_has_keychain_entry_response_v1.go -model_set_keychain_entry_request_v1.go -model_set_keychain_entry_response_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 5bf0b205a5..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# Go API client for cactus-plugin-keychain-vault - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-keychain-vault "github.com/hyperledger/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-vault.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-vault.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-keychain-vault.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-keychain-vault.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry | Deletes an entry from the keychain stored under the provided key. -*DefaultApi* | [**GetKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**HasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry | Retrieves the information regarding a key being present on the keychain or not. -*DefaultApi* | [**SetKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry | Sets a value under a key on the keychain backend. - - -## Documentation For Models - - - [DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 04c39d1675..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,310 +0,0 @@ -openapi: 3.0.3 -info: - description: Contains/describes the Keychain API types/paths for Hyperledger Cactus. - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus - Keychain API - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry: - post: - operationId: getKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_get_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "404": - description: A keychain item with the specified key was not found. - "500": - description: Unexpected error. - summary: Retrieves the contents of a keychain entry from the backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry: - post: - operationId: deleteKeychainEntryV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryRequestV1' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteKeychainEntryResponseV1' - description: OK - summary: Deletes an entry from the keychain stored under the provided key. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry: - post: - operationId: hasKeychainEntryV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryRequestV1' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HasKeychainEntryResponseV1' - description: OK - summary: Retrieves the information regarding a key being present on the keychain - or not. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry: - post: - operationId: setKeychainEntryV1 - parameters: [] - requestBody: - $ref: '#/components/requestBodies/keychain_set_entry_request_body' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - "400": - description: "Bad request. Key must be a string and longer than 0, shorter\ - \ than 1024 characters." - "401": - description: Authorization information is missing or invalid. - "500": - description: Unexpected error. - summary: Sets a value under a key on the keychain backend. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics -components: - requestBodies: - keychain_get_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryRequestV1' - description: Request body to obtain a keychain entry via its key - required: true - keychain_set_entry_request_body: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryRequestV1' - description: Request body to write/update a keychain entry via its key - required: true - responses: - keychain_get_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/GetKeychainEntryResponseV1' - description: OK - keychain_get_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_get_entry_401: - description: Authorization information is missing or invalid. - keychain_get_entry_404: - description: A keychain item with the specified key was not found. - keychain_get_entry_500: - description: Unexpected error. - keychain_set_entry_200: - content: - application/json: - schema: - $ref: '#/components/schemas/SetKeychainEntryResponseV1' - description: OK - keychain_set_entry_400: - description: "Bad request. Key must be a string and longer than 0, shorter than\ - \ 1024 characters." - keychain_set_entry_401: - description: Authorization information is missing or invalid. - keychain_set_entry_500: - description: Unexpected error. - schemas: - PrometheusExporterMetricsResponse: - nullable: false - type: string - HasKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key to check for presence in the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - HasKeychainEntryResponseV1: - example: - checkedAt: checkedAt - isPresent: true - key: key - properties: - key: - description: The key that was used to check the presence of the value in - the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - checkedAt: - description: Date and time encoded as JSON when the presence check was performed - by the plugin backend. - nullable: false - type: string - isPresent: - description: The boolean true or false indicating the presence or absence - of an entry under 'key'. - nullable: false - type: boolean - required: - - checkedAt - - isPresent - - key - type: object - DeleteKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key of the entry to delete from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - DeleteKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key of the entry that was deleted from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - GetKeychainEntryRequestV1: - additionalProperties: false - example: - key: key - properties: - key: - description: The key for the entry to get from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object - GetKeychainEntryResponseV1: - example: - value: value - key: key - properties: - key: - description: The key that was used to retrieve the value from the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value associated with the requested key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryRequestV1: - additionalProperties: false - example: - value: value - key: key - properties: - key: - description: The key for the entry to set on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - value: - description: The value that will be associated with the key on the keychain. - maxLength: 10485760 - minLength: 0 - nullable: false - type: string - required: - - key - - value - type: object - SetKeychainEntryResponseV1: - example: - key: key - properties: - key: - description: The key that was used to set the value on the keychain. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - key - type: object diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index a95a9ed171..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,548 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeleteKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deleteKeychainEntryRequestV1 *DeleteKeychainEntryRequestV1 -} - -func (r ApiDeleteKeychainEntryV1Request) DeleteKeychainEntryRequestV1(deleteKeychainEntryRequestV1 DeleteKeychainEntryRequestV1) ApiDeleteKeychainEntryV1Request { - r.deleteKeychainEntryRequestV1 = &deleteKeychainEntryRequestV1 - return r -} - -func (r ApiDeleteKeychainEntryV1Request) Execute() (*DeleteKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.DeleteKeychainEntryV1Execute(r) -} - -/* -DeleteKeychainEntryV1 Deletes an entry from the keychain stored under the provided key. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeleteKeychainEntryV1Request -*/ -func (a *DefaultApiService) DeleteKeychainEntryV1(ctx context.Context) ApiDeleteKeychainEntryV1Request { - return ApiDeleteKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeleteKeychainEntryResponseV1 -func (a *DefaultApiService) DeleteKeychainEntryV1Execute(r ApiDeleteKeychainEntryV1Request) (*DeleteKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeleteKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deleteKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getKeychainEntryRequestV1 *GetKeychainEntryRequestV1 -} - -// Request body to obtain a keychain entry via its key -func (r ApiGetKeychainEntryV1Request) GetKeychainEntryRequestV1(getKeychainEntryRequestV1 GetKeychainEntryRequestV1) ApiGetKeychainEntryV1Request { - r.getKeychainEntryRequestV1 = &getKeychainEntryRequestV1 - return r -} - -func (r ApiGetKeychainEntryV1Request) Execute() (*GetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.GetKeychainEntryV1Execute(r) -} - -/* -GetKeychainEntryV1 Retrieves the contents of a keychain entry from the backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetKeychainEntryV1Request -*/ -func (a *DefaultApiService) GetKeychainEntryV1(ctx context.Context) ApiGetKeychainEntryV1Request { - return ApiGetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetKeychainEntryResponseV1 -func (a *DefaultApiService) GetKeychainEntryV1Execute(r ApiGetKeychainEntryV1Request) (*GetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("getKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsV1Execute(r) -} - -/* -GetPrometheusMetricsV1 Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsV1Request -*/ -func (a *DefaultApiService) GetPrometheusMetricsV1(ctx context.Context) ApiGetPrometheusMetricsV1Request { - return ApiGetPrometheusMetricsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsV1Execute(r ApiGetPrometheusMetricsV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetricsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiHasKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - hasKeychainEntryRequestV1 *HasKeychainEntryRequestV1 -} - -func (r ApiHasKeychainEntryV1Request) HasKeychainEntryRequestV1(hasKeychainEntryRequestV1 HasKeychainEntryRequestV1) ApiHasKeychainEntryV1Request { - r.hasKeychainEntryRequestV1 = &hasKeychainEntryRequestV1 - return r -} - -func (r ApiHasKeychainEntryV1Request) Execute() (*HasKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.HasKeychainEntryV1Execute(r) -} - -/* -HasKeychainEntryV1 Retrieves the information regarding a key being present on the keychain or not. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHasKeychainEntryV1Request -*/ -func (a *DefaultApiService) HasKeychainEntryV1(ctx context.Context) ApiHasKeychainEntryV1Request { - return ApiHasKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return HasKeychainEntryResponseV1 -func (a *DefaultApiService) HasKeychainEntryV1Execute(r ApiHasKeychainEntryV1Request) (*HasKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HasKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.HasKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.hasKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSetKeychainEntryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - setKeychainEntryRequestV1 *SetKeychainEntryRequestV1 -} - -// Request body to write/update a keychain entry via its key -func (r ApiSetKeychainEntryV1Request) SetKeychainEntryRequestV1(setKeychainEntryRequestV1 SetKeychainEntryRequestV1) ApiSetKeychainEntryV1Request { - r.setKeychainEntryRequestV1 = &setKeychainEntryRequestV1 - return r -} - -func (r ApiSetKeychainEntryV1Request) Execute() (*SetKeychainEntryResponseV1, *http.Response, error) { - return r.ApiService.SetKeychainEntryV1Execute(r) -} - -/* -SetKeychainEntryV1 Sets a value under a key on the keychain backend. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSetKeychainEntryV1Request -*/ -func (a *DefaultApiService) SetKeychainEntryV1(ctx context.Context) ApiSetKeychainEntryV1Request { - return ApiSetKeychainEntryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SetKeychainEntryResponseV1 -func (a *DefaultApiService) SetKeychainEntryV1Execute(r ApiSetKeychainEntryV1Request) (*SetKeychainEntryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SetKeychainEntryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SetKeychainEntryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.setKeychainEntryRequestV1 == nil { - return localVarReturnValue, nil, reportError("setKeychainEntryRequestV1 is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.setKeychainEntryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 5123b7c8f3..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus - Keychain API API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 0005c7dfab..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index ea23cb8260..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go deleted file mode 100644 index 407306d3b7..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryRequestV1{} - -// DeleteKeychainEntryRequestV1 struct for DeleteKeychainEntryRequestV1 -type DeleteKeychainEntryRequestV1 struct { - // The key of the entry to delete from the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryRequestV1 instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryRequestV1(key string) *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryRequestV1WithDefaults instantiates a new DeleteKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryRequestV1WithDefaults() *DeleteKeychainEntryRequestV1 { - this := DeleteKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryRequestV1 struct { - value *DeleteKeychainEntryRequestV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryRequestV1) Get() *DeleteKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryRequestV1) Set(val *DeleteKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryRequestV1(val *DeleteKeychainEntryRequestV1) *NullableDeleteKeychainEntryRequestV1 { - return &NullableDeleteKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go deleted file mode 100644 index a92b38ea83..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_delete_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "encoding/json" -) - -// checks if the DeleteKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteKeychainEntryResponseV1{} - -// DeleteKeychainEntryResponseV1 struct for DeleteKeychainEntryResponseV1 -type DeleteKeychainEntryResponseV1 struct { - // The key of the entry that was deleted from the keychain. - Key string `json:"key"` -} - -// NewDeleteKeychainEntryResponseV1 instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeleteKeychainEntryResponseV1(key string) *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewDeleteKeychainEntryResponseV1WithDefaults instantiates a new DeleteKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeleteKeychainEntryResponseV1WithDefaults() *DeleteKeychainEntryResponseV1 { - this := DeleteKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *DeleteKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *DeleteKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *DeleteKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o DeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeleteKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableDeleteKeychainEntryResponseV1 struct { - value *DeleteKeychainEntryResponseV1 - isSet bool -} - -func (v NullableDeleteKeychainEntryResponseV1) Get() *DeleteKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableDeleteKeychainEntryResponseV1) Set(val *DeleteKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeleteKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeleteKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeleteKeychainEntryResponseV1(val *DeleteKeychainEntryResponseV1) *NullableDeleteKeychainEntryResponseV1 { - return &NullableDeleteKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableDeleteKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeleteKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go deleted file mode 100644 index bb2104b40a..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_get_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryRequestV1{} - -// GetKeychainEntryRequestV1 struct for GetKeychainEntryRequestV1 -type GetKeychainEntryRequestV1 struct { - // The key for the entry to get from the keychain. - Key string `json:"key"` -} - -// NewGetKeychainEntryRequestV1 instantiates a new GetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryRequestV1(key string) *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewGetKeychainEntryRequestV1WithDefaults instantiates a new GetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryRequestV1WithDefaults() *GetKeychainEntryRequestV1 { - this := GetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o GetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableGetKeychainEntryRequestV1 struct { - value *GetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableGetKeychainEntryRequestV1) Get() *GetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableGetKeychainEntryRequestV1) Set(val *GetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryRequestV1(val *GetKeychainEntryRequestV1) *NullableGetKeychainEntryRequestV1 { - return &NullableGetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go deleted file mode 100644 index d18cad7db4..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_get_keychain_entry_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "encoding/json" -) - -// checks if the GetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetKeychainEntryResponseV1{} - -// GetKeychainEntryResponseV1 struct for GetKeychainEntryResponseV1 -type GetKeychainEntryResponseV1 struct { - // The key that was used to retrieve the value from the keychain. - Key string `json:"key"` - // The value associated with the requested key on the keychain. - Value string `json:"value"` -} - -// NewGetKeychainEntryResponseV1 instantiates a new GetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetKeychainEntryResponseV1(key string, value string) *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - this.Key = key - this.Value = value - return &this -} - -// NewGetKeychainEntryResponseV1WithDefaults instantiates a new GetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetKeychainEntryResponseV1WithDefaults() *GetKeychainEntryResponseV1 { - this := GetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *GetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *GetKeychainEntryResponseV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *GetKeychainEntryResponseV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *GetKeychainEntryResponseV1) SetValue(v string) { - o.Value = v -} - -func (o GetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableGetKeychainEntryResponseV1 struct { - value *GetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableGetKeychainEntryResponseV1) Get() *GetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableGetKeychainEntryResponseV1) Set(val *GetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetKeychainEntryResponseV1(val *GetKeychainEntryResponseV1) *NullableGetKeychainEntryResponseV1 { - return &NullableGetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableGetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go deleted file mode 100644 index 6656755324..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_has_keychain_entry_request_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryRequestV1{} - -// HasKeychainEntryRequestV1 struct for HasKeychainEntryRequestV1 -type HasKeychainEntryRequestV1 struct { - // The key to check for presence in the keychain. - Key string `json:"key"` -} - -// NewHasKeychainEntryRequestV1 instantiates a new HasKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryRequestV1(key string) *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - this.Key = key - return &this -} - -// NewHasKeychainEntryRequestV1WithDefaults instantiates a new HasKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryRequestV1WithDefaults() *HasKeychainEntryRequestV1 { - this := HasKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -func (o HasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableHasKeychainEntryRequestV1 struct { - value *HasKeychainEntryRequestV1 - isSet bool -} - -func (v NullableHasKeychainEntryRequestV1) Get() *HasKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableHasKeychainEntryRequestV1) Set(val *HasKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryRequestV1(val *HasKeychainEntryRequestV1) *NullableHasKeychainEntryRequestV1 { - return &NullableHasKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go deleted file mode 100644 index babe8dfa70..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_has_keychain_entry_response_v1.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "encoding/json" -) - -// checks if the HasKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HasKeychainEntryResponseV1{} - -// HasKeychainEntryResponseV1 struct for HasKeychainEntryResponseV1 -type HasKeychainEntryResponseV1 struct { - // The key that was used to check the presence of the value in the keychain. - Key string `json:"key"` - // Date and time encoded as JSON when the presence check was performed by the plugin backend. - CheckedAt string `json:"checkedAt"` - // The boolean true or false indicating the presence or absence of an entry under 'key'. - IsPresent bool `json:"isPresent"` -} - -// NewHasKeychainEntryResponseV1 instantiates a new HasKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHasKeychainEntryResponseV1(key string, checkedAt string, isPresent bool) *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - this.Key = key - this.CheckedAt = checkedAt - this.IsPresent = isPresent - return &this -} - -// NewHasKeychainEntryResponseV1WithDefaults instantiates a new HasKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHasKeychainEntryResponseV1WithDefaults() *HasKeychainEntryResponseV1 { - this := HasKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *HasKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *HasKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -// GetCheckedAt returns the CheckedAt field value -func (o *HasKeychainEntryResponseV1) GetCheckedAt() string { - if o == nil { - var ret string - return ret - } - - return o.CheckedAt -} - -// GetCheckedAtOk returns a tuple with the CheckedAt field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetCheckedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CheckedAt, true -} - -// SetCheckedAt sets field value -func (o *HasKeychainEntryResponseV1) SetCheckedAt(v string) { - o.CheckedAt = v -} - -// GetIsPresent returns the IsPresent field value -func (o *HasKeychainEntryResponseV1) GetIsPresent() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPresent -} - -// GetIsPresentOk returns a tuple with the IsPresent field value -// and a boolean to check if the value has been set. -func (o *HasKeychainEntryResponseV1) GetIsPresentOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPresent, true -} - -// SetIsPresent sets field value -func (o *HasKeychainEntryResponseV1) SetIsPresent(v bool) { - o.IsPresent = v -} - -func (o HasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HasKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["checkedAt"] = o.CheckedAt - toSerialize["isPresent"] = o.IsPresent - return toSerialize, nil -} - -type NullableHasKeychainEntryResponseV1 struct { - value *HasKeychainEntryResponseV1 - isSet bool -} - -func (v NullableHasKeychainEntryResponseV1) Get() *HasKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableHasKeychainEntryResponseV1) Set(val *HasKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableHasKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableHasKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHasKeychainEntryResponseV1(val *HasKeychainEntryResponseV1) *NullableHasKeychainEntryResponseV1 { - return &NullableHasKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableHasKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHasKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go deleted file mode 100644 index c30648c4e6..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_set_keychain_entry_request_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryRequestV1{} - -// SetKeychainEntryRequestV1 struct for SetKeychainEntryRequestV1 -type SetKeychainEntryRequestV1 struct { - // The key for the entry to set on the keychain. - Key string `json:"key"` - // The value that will be associated with the key on the keychain. - Value string `json:"value"` -} - -// NewSetKeychainEntryRequestV1 instantiates a new SetKeychainEntryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryRequestV1(key string, value string) *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - this.Key = key - this.Value = value - return &this -} - -// NewSetKeychainEntryRequestV1WithDefaults instantiates a new SetKeychainEntryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryRequestV1WithDefaults() *SetKeychainEntryRequestV1 { - this := SetKeychainEntryRequestV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryRequestV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryRequestV1) SetKey(v string) { - o.Key = v -} - -// GetValue returns the Value field value -func (o *SetKeychainEntryRequestV1) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryRequestV1) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *SetKeychainEntryRequestV1) SetValue(v string) { - o.Value = v -} - -func (o SetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableSetKeychainEntryRequestV1 struct { - value *SetKeychainEntryRequestV1 - isSet bool -} - -func (v NullableSetKeychainEntryRequestV1) Get() *SetKeychainEntryRequestV1 { - return v.value -} - -func (v *NullableSetKeychainEntryRequestV1) Set(val *SetKeychainEntryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryRequestV1(val *SetKeychainEntryRequestV1) *NullableSetKeychainEntryRequestV1 { - return &NullableSetKeychainEntryRequestV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go deleted file mode 100644 index 7a0df00846..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/model_set_keychain_entry_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "encoding/json" -) - -// checks if the SetKeychainEntryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetKeychainEntryResponseV1{} - -// SetKeychainEntryResponseV1 struct for SetKeychainEntryResponseV1 -type SetKeychainEntryResponseV1 struct { - // The key that was used to set the value on the keychain. - Key string `json:"key"` -} - -// NewSetKeychainEntryResponseV1 instantiates a new SetKeychainEntryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSetKeychainEntryResponseV1(key string) *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - this.Key = key - return &this -} - -// NewSetKeychainEntryResponseV1WithDefaults instantiates a new SetKeychainEntryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSetKeychainEntryResponseV1WithDefaults() *SetKeychainEntryResponseV1 { - this := SetKeychainEntryResponseV1{} - return &this -} - -// GetKey returns the Key field value -func (o *SetKeychainEntryResponseV1) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SetKeychainEntryResponseV1) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SetKeychainEntryResponseV1) SetKey(v string) { - o.Key = v -} - -func (o SetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetKeychainEntryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - return toSerialize, nil -} - -type NullableSetKeychainEntryResponseV1 struct { - value *SetKeychainEntryResponseV1 - isSet bool -} - -func (v NullableSetKeychainEntryResponseV1) Get() *SetKeychainEntryResponseV1 { - return v.value -} - -func (v *NullableSetKeychainEntryResponseV1) Set(val *SetKeychainEntryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableSetKeychainEntryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSetKeychainEntryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetKeychainEntryResponseV1(val *SetKeychainEntryResponseV1) *NullableSetKeychainEntryResponseV1 { - return &NullableSetKeychainEntryResponseV1{value: val, isSet: true} -} - -func (v NullableSetKeychainEntryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetKeychainEntryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 99032fc9f7..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 9406f12e36..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-keychain-vault - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-keychain-vault_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeleteKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeleteKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetricsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetricsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService HasKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.HasKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SetKeychainEntryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SetKeychainEntryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 635313d72e..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-keychain-vault - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/json/openapi.json b/packages/cactus-plugin-keychain-vault/src/main/json/openapi.json deleted file mode 100644 index ffa891158d..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/json/openapi.json +++ /dev/null @@ -1,377 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus - Keychain API", - "description": "Contains/describes the Keychain API types/paths for Hyperledger Cactus.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "HasKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key to check for presence in the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "isPresent", "checkedAt"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to check the presence of the value in the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "checkedAt": { - "type": "string", - "description": "Date and time encoded as JSON when the presence check was performed by the plugin backend.", - "nullable": false - }, - "isPresent": { - "type": "boolean", - "description": "The boolean true or false indicating the presence or absence of an entry under 'key'.", - "nullable": false - } - } - }, - "DeleteKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key of the entry to delete from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key of the entry that was deleted from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "GetKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to get from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "GetKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "value"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to retrieve the value from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value associated with the requested key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryRequestV1": { - "type": "object", - "required": ["key", "value"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key for the entry to set on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "value": { - "type": "string", - "description": "The value that will be associated with the key on the keychain.", - "minLength": 0, - "maxLength": 10485760, - "nullable": false - } - } - }, - "SetKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to set the value on the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - } - }, - "requestBodies": { - "keychain_get_entry_request_body": { - "description": "Request body to obtain a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryRequestV1" - } - } - } - }, - "keychain_set_entry_request_body": { - "description": "Request body to write/update a keychain entry via its key", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryRequestV1" - } - } - } - } - }, - "responses": { - "keychain_get_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetKeychainEntryResponseV1" - } - } - } - }, - "keychain_get_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_get_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_get_entry_404": { - "description": "A keychain item with the specified key was not found." - }, - "keychain_get_entry_500": { - "description": "Unexpected error." - }, - "keychain_set_entry_200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetKeychainEntryResponseV1" - } - } - } - }, - "keychain_set_entry_400": { - "description": "Bad request. Key must be a string and longer than 0, shorter than 1024 characters." - }, - "keychain_set_entry_401": { - "description": "Authorization information is missing or invalid." - }, - "keychain_set_entry_500": { - "description": "Unexpected error." - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes an entry from the keychain stored under the provided key.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Retrieves the information regarding a key being present on the keychain or not.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/json/openapi.tpl.json b/packages/cactus-plugin-keychain-vault/src/main/json/openapi.tpl.json deleted file mode 100644 index 2cf795862c..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,242 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus - Keychain API", - "description": "Contains/describes the Keychain API types/paths for Hyperledger Cactus.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "HasKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key to check for presence in the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "HasKeychainEntryResponseV1": { - "type": "object", - "required": ["key", "isPresent", "checkedAt"], - "properties": { - "key": { - "type": "string", - "description": "The key that was used to check the presence of the value in the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "checkedAt": { - "type": "string", - "description": "Date and time encoded as JSON when the presence check was performed by the plugin backend.", - "nullable": false - }, - "isPresent": { - "type": "boolean", - "description": "The boolean true or false indicating the presence or absence of an entry under 'key'.", - "nullable": false - } - } - }, - "DeleteKeychainEntryRequestV1": { - "type": "object", - "required": ["key"], - "additionalProperties": false, - "properties": { - "key": { - "type": "string", - "description": "The key of the entry to delete from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "DeleteKeychainEntryResponseV1": { - "type": "object", - "required": ["key"], - "properties": { - "key": { - "type": "string", - "description": "The key of the entry that was deleted from the keychain.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "getKeychainEntryV1", - "summary": "Retrieves the contents of a keychain entry from the backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401" - }, - "404": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "deleteKeychainEntryV1", - "summary": "Deletes an entry from the keychain stored under the provided key.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteKeychainEntryResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "hasKeychainEntryV1", - "summary": "Retrieves the information regarding a key being present on the keychain or not.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HasKeychainEntryResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry": { - "post": { - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry", - "verbLowerCase": "post" - } - }, - "operationId": "setKeychainEntryV1", - "summary": "Sets a value under a key on the keychain backend.", - "parameters": [], - "requestBody": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body" - }, - "responses": { - "200": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200" - }, - "400": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400" - }, - "401": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401" - }, - "500": { - "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 15e43f61f3..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,31 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt -src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index eb733ea3b4..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus - Keychain API - -Contains/describes the Keychain API types/paths for Hyperledger Cactus. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**deleteKeychainEntryV1**](docs/DefaultApi.md#deletekeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry | Deletes an entry from the keychain stored under the provided key. -*DefaultApi* | [**getKeychainEntryV1**](docs/DefaultApi.md#getkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry | Retrieves the contents of a keychain entry from the backend. -*DefaultApi* | [**getPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**hasKeychainEntryV1**](docs/DefaultApi.md#haskeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry | Retrieves the information regarding a key being present on the keychain or not. -*DefaultApi* | [**setKeychainEntryV1**](docs/DefaultApi.md#setkeychainentryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry | Sets a value under a key on the keychain backend. - - - -## Documentation for Models - - - [org.openapitools.client.models.DeleteKeychainEntryRequestV1](docs/DeleteKeychainEntryRequestV1.md) - - [org.openapitools.client.models.DeleteKeychainEntryResponseV1](docs/DeleteKeychainEntryResponseV1.md) - - [org.openapitools.client.models.GetKeychainEntryRequestV1](docs/GetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.GetKeychainEntryResponseV1](docs/GetKeychainEntryResponseV1.md) - - [org.openapitools.client.models.HasKeychainEntryRequestV1](docs/HasKeychainEntryRequestV1.md) - - [org.openapitools.client.models.HasKeychainEntryResponseV1](docs/HasKeychainEntryResponseV1.md) - - [org.openapitools.client.models.SetKeychainEntryRequestV1](docs/SetKeychainEntryRequestV1.md) - - [org.openapitools.client.models.SetKeychainEntryResponseV1](docs/SetKeychainEntryResponseV1.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index be5097ab78..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,413 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.DeleteKeychainEntryRequestV1 -import org.openapitools.client.models.DeleteKeychainEntryResponseV1 -import org.openapitools.client.models.GetKeychainEntryRequestV1 -import org.openapitools.client.models.GetKeychainEntryResponseV1 -import org.openapitools.client.models.HasKeychainEntryRequestV1 -import org.openapitools.client.models.HasKeychainEntryResponseV1 -import org.openapitools.client.models.SetKeychainEntryRequestV1 -import org.openapitools.client.models.SetKeychainEntryResponseV1 - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Deletes an entry from the keychain stored under the provided key. - * - * @param deleteKeychainEntryRequestV1 (optional) - * @return DeleteKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun deleteKeychainEntryV1(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1? = null) : DeleteKeychainEntryResponseV1 { - val localVarResponse = deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DeleteKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Deletes an entry from the keychain stored under the provided key. - * - * @param deleteKeychainEntryRequestV1 (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun deleteKeychainEntryV1WithHttpInfo(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1?) : ApiResponse { - val localVariableConfig = deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1 = deleteKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation deleteKeychainEntryV1 - * - * @param deleteKeychainEntryRequestV1 (optional) - * @return RequestConfig - */ - fun deleteKeychainEntryV1RequestConfig(deleteKeychainEntryRequestV1: DeleteKeychainEntryRequestV1?) : RequestConfig { - val localVariableBody = deleteKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return GetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : GetKeychainEntryResponseV1 { - val localVarResponse = getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves the contents of a keychain entry from the backend. - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getKeychainEntryV1WithHttpInfo(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1 = getKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getKeychainEntryV1 - * - * @param getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @return RequestConfig - */ - fun getKeychainEntryV1RequestConfig(getKeychainEntryRequestV1: GetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = getKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get the Prometheus Metrics - * - * @return kotlin.String - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getPrometheusMetricsV1() : kotlin.String { - val localVarResponse = getPrometheusMetricsV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get the Prometheus Metrics - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getPrometheusMetricsV1WithHttpInfo() : ApiResponse { - val localVariableConfig = getPrometheusMetricsV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getPrometheusMetricsV1 - * - * @return RequestConfig - */ - fun getPrometheusMetricsV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Retrieves the information regarding a key being present on the keychain or not. - * - * @param hasKeychainEntryRequestV1 (optional) - * @return HasKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun hasKeychainEntryV1(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1? = null) : HasKeychainEntryResponseV1 { - val localVarResponse = hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as HasKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Retrieves the information regarding a key being present on the keychain or not. - * - * @param hasKeychainEntryRequestV1 (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun hasKeychainEntryV1WithHttpInfo(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1?) : ApiResponse { - val localVariableConfig = hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1 = hasKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation hasKeychainEntryV1 - * - * @param hasKeychainEntryRequestV1 (optional) - * @return RequestConfig - */ - fun hasKeychainEntryV1RequestConfig(hasKeychainEntryRequestV1: HasKeychainEntryRequestV1?) : RequestConfig { - val localVariableBody = hasKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return SetKeychainEntryResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : SetKeychainEntryResponseV1 { - val localVarResponse = setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as SetKeychainEntryResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Sets a value under a key on the keychain backend. - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun setKeychainEntryV1WithHttpInfo(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : ApiResponse { - val localVariableConfig = setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1 = setKeychainEntryRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation setKeychainEntryV1 - * - * @param setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @return RequestConfig - */ - fun setKeychainEntryV1RequestConfig(setKeychainEntryRequestV1: SetKeychainEntryRequestV1) : RequestConfig { - val localVariableBody = setKeychainEntryRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt deleted file mode 100644 index 5b316bb583..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key of the entry to delete from the keychain. - */ - - -data class DeleteKeychainEntryRequestV1 ( - - /* The key of the entry to delete from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt deleted file mode 100644 index a9a375194b..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeleteKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key of the entry that was deleted from the keychain. - */ - - -data class DeleteKeychainEntryResponseV1 ( - - /* The key of the entry that was deleted from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt deleted file mode 100644 index ea1d0da587..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to get from the keychain. - */ - - -data class GetKeychainEntryRequestV1 ( - - /* The key for the entry to get from the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt deleted file mode 100644 index 21b9a38b46..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to retrieve the value from the keychain. - * @param `value` The value associated with the requested key on the keychain. - */ - - -data class GetKeychainEntryResponseV1 ( - - /* The key that was used to retrieve the value from the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value associated with the requested key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt deleted file mode 100644 index c3055c3414..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryRequestV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key to check for presence in the keychain. - */ - - -data class HasKeychainEntryRequestV1 ( - - /* The key to check for presence in the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt deleted file mode 100644 index a6d9980be8..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/HasKeychainEntryResponseV1.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to check the presence of the value in the keychain. - * @param checkedAt Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @param isPresent The boolean true or false indicating the presence or absence of an entry under 'key'. - */ - - -data class HasKeychainEntryResponseV1 ( - - /* The key that was used to check the presence of the value in the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* Date and time encoded as JSON when the presence check was performed by the plugin backend. */ - @Json(name = "checkedAt") - val checkedAt: kotlin.String, - - /* The boolean true or false indicating the presence or absence of an entry under 'key'. */ - @Json(name = "isPresent") - val isPresent: kotlin.Boolean - -) - diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt deleted file mode 100644 index d016fc72e6..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryRequestV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key for the entry to set on the keychain. - * @param `value` The value that will be associated with the key on the keychain. - */ - - -data class SetKeychainEntryRequestV1 ( - - /* The key for the entry to set on the keychain. */ - @Json(name = "key") - val key: kotlin.String, - - /* The value that will be associated with the key on the keychain. */ - @Json(name = "value") - val `value`: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt b/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt deleted file mode 100644 index 3f7624cd59..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SetKeychainEntryResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param key The key that was used to set the value on the keychain. - */ - - -data class SetKeychainEntryResponseV1 ( - - /* The key that was used to set the value on the keychain. */ - @Json(name = "key") - val key: kotlin.String - -) - diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 3a5a22963f..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,524 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface DeleteKeychainEntryRequestV1 - */ -export interface DeleteKeychainEntryRequestV1 { - /** - * The key of the entry to delete from the keychain. - * @type {string} - * @memberof DeleteKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface DeleteKeychainEntryResponseV1 - */ -export interface DeleteKeychainEntryResponseV1 { - /** - * The key of the entry that was deleted from the keychain. - * @type {string} - * @memberof DeleteKeychainEntryResponseV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryRequestV1 - */ -export interface GetKeychainEntryRequestV1 { - /** - * The key for the entry to get from the keychain. - * @type {string} - * @memberof GetKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface GetKeychainEntryResponseV1 - */ -export interface GetKeychainEntryResponseV1 { - /** - * The key that was used to retrieve the value from the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'key': string; - /** - * The value associated with the requested key on the keychain. - * @type {string} - * @memberof GetKeychainEntryResponseV1 - */ - 'value': string; -} -/** - * - * @export - * @interface HasKeychainEntryRequestV1 - */ -export interface HasKeychainEntryRequestV1 { - /** - * The key to check for presence in the keychain. - * @type {string} - * @memberof HasKeychainEntryRequestV1 - */ - 'key': string; -} -/** - * - * @export - * @interface HasKeychainEntryResponseV1 - */ -export interface HasKeychainEntryResponseV1 { - /** - * The key that was used to check the presence of the value in the keychain. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'key': string; - /** - * Date and time encoded as JSON when the presence check was performed by the plugin backend. - * @type {string} - * @memberof HasKeychainEntryResponseV1 - */ - 'checkedAt': string; - /** - * The boolean true or false indicating the presence or absence of an entry under \'key\'. - * @type {boolean} - * @memberof HasKeychainEntryResponseV1 - */ - 'isPresent': boolean; -} -/** - * - * @export - * @interface SetKeychainEntryRequestV1 - */ -export interface SetKeychainEntryRequestV1 { - /** - * The key for the entry to set on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'key': string; - /** - * The value that will be associated with the key on the keychain. - * @type {string} - * @memberof SetKeychainEntryRequestV1 - */ - 'value': string; -} -/** - * - * @export - * @interface SetKeychainEntryResponseV1 - */ -export interface SetKeychainEntryResponseV1 { - /** - * The key that was used to set the value on the keychain. - * @type {string} - * @memberof SetKeychainEntryResponseV1 - */ - 'key': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deletes an entry from the keychain stored under the provided key. - * @param {DeleteKeychainEntryRequestV1} [deleteKeychainEntryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1: async (deleteKeychainEntryRequestV1?: DeleteKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1: async (getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getKeychainEntryRequestV1' is not null or undefined - assertParamExists('getKeychainEntryV1', 'getKeychainEntryRequestV1', getKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the information regarding a key being present on the keychain or not. - * @param {HasKeychainEntryRequestV1} [hasKeychainEntryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1: async (hasKeychainEntryRequestV1?: HasKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(hasKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1: async (setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'setKeychainEntryRequestV1' is not null or undefined - assertParamExists('setKeychainEntryV1', 'setKeychainEntryRequestV1', setKeychainEntryRequestV1) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(setKeychainEntryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deletes an entry from the keychain stored under the provided key. - * @param {DeleteKeychainEntryRequestV1} [deleteKeychainEntryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteKeychainEntryV1(deleteKeychainEntryRequestV1?: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getKeychainEntryV1(getKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the information regarding a key being present on the keychain or not. - * @param {HasKeychainEntryRequestV1} [hasKeychainEntryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async hasKeychainEntryV1(hasKeychainEntryRequestV1?: HasKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.hasKeychainEntryV1(hasKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.setKeychainEntryV1(setKeychainEntryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deletes an entry from the keychain stored under the provided key. - * @param {DeleteKeychainEntryRequestV1} [deleteKeychainEntryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteKeychainEntryV1(deleteKeychainEntryRequestV1?: DeleteKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the information regarding a key being present on the keychain or not. - * @param {HasKeychainEntryRequestV1} [hasKeychainEntryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - hasKeychainEntryV1(hasKeychainEntryRequestV1?: HasKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: any): AxiosPromise { - return localVarFp.setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deletes an entry from the keychain stored under the provided key. - * @param {DeleteKeychainEntryRequestV1} [deleteKeychainEntryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deleteKeychainEntryV1(deleteKeychainEntryRequestV1?: DeleteKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deleteKeychainEntryV1(deleteKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the contents of a keychain entry from the backend. - * @param {GetKeychainEntryRequestV1} getKeychainEntryRequestV1 Request body to obtain a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getKeychainEntryV1(getKeychainEntryRequestV1: GetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getKeychainEntryV1(getKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the information regarding a key being present on the keychain or not. - * @param {HasKeychainEntryRequestV1} [hasKeychainEntryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public hasKeychainEntryV1(hasKeychainEntryRequestV1?: HasKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).hasKeychainEntryV1(hasKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Sets a value under a key on the keychain backend. - * @param {SetKeychainEntryRequestV1} setKeychainEntryRequestV1 Request body to write/update a keychain entry via its key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public setKeychainEntryV1(setKeychainEntryRequestV1: SetKeychainEntryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).setKeychainEntryV1(setKeychainEntryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index e494b76932..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 61ef9f2a15..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index d36cc56c83..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 434478c164..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus - Keychain API - * Contains/describes the Keychain API types/paths for Hyperledger Cactus. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/index.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/index.web.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-factory-keychain.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-factory-keychain.ts deleted file mode 100644 index c73a9ca23e..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-factory-keychain.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Checks } from "@hyperledger/cactus-common"; -import { - IPluginFactoryOptions, - IPluginKeychain, - PluginFactory, - PluginImportType, -} from "@hyperledger/cactus-core-api"; -import { - Configuration, - DefaultApi, -} from "./generated/openapi/typescript-axios"; - -import { - IPluginKeychainVaultOptions, - PluginKeychainVault, -} from "./plugin-keychain-vault"; - -import { PluginKeychainVaultRemoteAdapter } from "./plugin-keychain-vault-remote-adapter"; - -export class PluginFactoryKeychain extends PluginFactory< - IPluginKeychain, - IPluginKeychainVaultOptions, - IPluginFactoryOptions -> { - async create(options: any): Promise { - const fnTag = "PluginFactoryKeychain#create()"; - - const { pluginImportType } = this.options; - Checks.truthy(options, `${fnTag}:options`); - - switch (pluginImportType) { - case PluginImportType.Local: { - return new PluginKeychainVault(options); - } - case PluginImportType.Remote: { - const { remoteConfig } = options; - Checks.truthy(remoteConfig, `${fnTag}:options.remoteConfig`); - Checks.truthy(remoteConfig.basePath, `${fnTag}:remoteConfig.basePath`); - const configuration: Configuration = options.remoteConfig; - const backend = new DefaultApi(configuration); - const optionsDecorated = { ...options, backend }; - return new PluginKeychainVaultRemoteAdapter(optionsDecorated); - } - default: { - throw new Error(`${fnTag} No PluginImportType: ${pluginImportType}`); - } - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault-remote-adapter.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault-remote-adapter.ts deleted file mode 100644 index ff619a8e2f..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault-remote-adapter.ts +++ /dev/null @@ -1,148 +0,0 @@ -import type { Express } from "express"; - -import OAS from "../json/openapi.json"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - ICactusPlugin, - ICactusPluginOptions, - IPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import { DefaultApi } from "./generated/openapi/typescript-axios"; - -export interface IPluginKeychainVaultRemoteAdapterOptions - extends ICactusPluginOptions { - backend: DefaultApi; - keychainId: string; - logLevel?: LogLevelDesc; -} - -/** - * Class responsible for encapsulating an API client object and then acting as - * an adapter (ta-da) between said API client object and the calling code to - * which it is (should be) transparent whether it is talking to an in-process - * plugin instance of the keychain plugin or an adapter backed by an API client - * object in which scenario the real keychain plugin object can be anywhere - * else on the network and also can be written in any programming language that - * the author so desires. - */ -export class PluginKeychainVaultRemoteAdapter - implements ICactusPlugin, IPluginWebService -{ - public static readonly CLASS_NAME = "PluginKeychainVaultRemoteAdapter"; - - private readonly instanceId: string; - private readonly keychainId: string; - private readonly log: Logger; - private readonly backend: DefaultApi; - - public get className(): string { - return PluginKeychainVaultRemoteAdapter.CLASS_NAME; - } - - constructor(public readonly opts: IPluginKeychainVaultRemoteAdapterOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.keychainId, `${fnTag} arg options.keychainId`); - Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); - Checks.nonBlankString(opts.keychainId, `${fnTag} options.keychainId`); - Checks.truthy(opts.backend, `${fnTag} options.backend`); - Checks.truthy( - opts.backend instanceof DefaultApi, - `${fnTag} opts.backend instanceof DefaultApi`, - ); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = this.opts.instanceId; - this.backend = opts.backend; - this.keychainId = opts.keychainId; - - this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - /** - * Dummy implementation that wires no web services on the host API server - * because there is no need. All the functionality is implemented somewhere - * else on a host that's accessible through the network to this object - * (because this class is a remote adapter not an actual plugin impl.). - * - * @param _expressApp - */ - public async getOrCreateWebServices(): Promise { - return []; - } - - /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ - public registerWebServices(app: Express): Promise { - return this.getOrCreateWebServices(); - } - - public async shutdown(): Promise { - return; - } - - public getEncryptionAlgorithm(): string { - throw new Error("Method not implemented."); - } - - public getKeychainId(): string { - return this.keychainId; - } - - public async has(key: string): Promise { - try { - await this.backend.getKeychainEntryV1({ key }); - return true; - } catch (ex) { - // FIXME check for errors being thrown due to something other than - // the key not being present... - return false; - } - } - - public async get(key: string): Promise { - const { data } = await this.backend.getKeychainEntryV1({ key }); - // FIXME what to do here? Does it make any sense to have the get() method - // of the keychain be generically parameterized when we know we can only - // return a string anyway? - return data.value; - } - - public async set(key: string, value: string): Promise { - // FIXME Does it make any sense to have the set() method be generic? - await this.backend.setKeychainEntryV1({ key, value }); - } - - public async delete(key: string): Promise { - // FIXME Pretty sure vault can do delete so we don't have to hack it like this - // but it cannot be done in this code until the rust code has been updated - // to have that endpoint as well... - await this.backend.setKeychainEntryV1({ key, value: "" }); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-keychain-vault`; - } - - public async onPluginInit(): Promise { - return; - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault.ts deleted file mode 100644 index 4c2764d4cf..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault.ts +++ /dev/null @@ -1,279 +0,0 @@ -import type { Express } from "express"; -import Vault from "node-vault"; -import HttpStatus from "http-status-codes"; - -import OAS from "../json/openapi.json"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - ICactusPluginOptions, - IPluginKeychain, - IPluginWebService, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; - -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; - -import { - IGetPrometheusExporterMetricsEndpointV1Options, - GetPrometheusExporterMetricsEndpointV1, -} from "./web-services/get-prometheus-exporter-metrics-endpoint-v1"; -import { GetKeychainEntryEndpointV1 } from "./web-services/get-keychain-entry-endpoint-v1"; -import { SetKeychainEntryEndpointV1 } from "./web-services/set-keychain-entry-endpoint-v1"; -import { HasKeychainEntryEndpointV1 } from "./web-services/has-keychain-entry-endpoint-v1"; -import { DeleteKeychainEntryEndpointV1 } from "./web-services/delete-keychain-entry-endpoint-v1"; - -export interface IPluginKeychainVaultOptions extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - keychainId: string; - /** - * API version to use when talking to the backing Vault instance through - * the NodeJS vault-node client. - * Optional, defaults to `v1` - */ - apiVersion?: string; - /** - * Network host where the backing Vault instance is accessible. - */ - endpoint: string; - /** - * The `VAULT_TOKEN` which the backing Vault instance will accept as valid. - */ - token: string; - /** - * Prometheus Exporter object for metrics monitoring - */ - - prometheusExporter?: PrometheusExporter; - - /** - * The HTTP path prefix where the KV Secrets Engine is mounted. - */ - kvSecretsMountPath?: string; -} - -export const K_DEFAULT_KV_SECRETS_MOUNT_PATH = "secret/"; - -export class PluginKeychainVault implements IPluginWebService, IPluginKeychain { - public static readonly CLASS_NAME = "PluginKeychainVault"; - - private readonly apiVersion: string; - private readonly token: string; - private readonly endpoint: string; - private readonly log: Logger; - private readonly instanceId: string; - private readonly kvSecretsMountPath: string; - private readonly backend: Vault.client; - private endpoints: IWebServiceEndpoint[] | undefined; - public prometheusExporter: PrometheusExporter; - - public get className(): string { - return PluginKeychainVault.CLASS_NAME; - } - - constructor(public readonly opts: IPluginKeychainVaultOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.keychainId, `${fnTag} arg options.keychainId`); - Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); - Checks.nonBlankString(opts.keychainId, `${fnTag} options.keychainId`); - - Checks.nonBlankString(opts.endpoint, `${fnTag} options.endpoint`); - Checks.nonBlankString(opts.token, `${fnTag} options.token`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = this.opts.instanceId; - this.token = this.opts.token; - this.endpoint = this.opts.endpoint; - this.apiVersion = this.opts.apiVersion || "v1"; - - this.kvSecretsMountPath = - opts.kvSecretsMountPath || K_DEFAULT_KV_SECRETS_MOUNT_PATH; - this.log.info(`this.kvSecretsMountPath=${this.kvSecretsMountPath}`); - - this.backend = Vault({ - apiVersion: this.apiVersion, - endpoint: this.endpoint, - token: this.token, - }); - - this.prometheusExporter = - opts.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - this.prometheusExporter.startMetricsCollection(); - - this.log.info(`Created Vault backend OK. Endpoint=${this.endpoint}`); - - this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const endpoints: IWebServiceEndpoint[] = []; - - { - const ep = new GetKeychainEntryEndpointV1({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(ep); - } - { - const ep = new SetKeychainEntryEndpointV1({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(ep); - } - { - const ep = new HasKeychainEntryEndpointV1({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(ep); - } - { - const ep = new DeleteKeychainEntryEndpointV1({ - logLevel: this.opts.logLevel, - plugin: this, - }); - endpoints.push(ep); - } - { - const opts: IGetPrometheusExporterMetricsEndpointV1Options = { - plugin: this, - logLevel: this.opts.logLevel, - }; - const ep = new GetPrometheusExporterMetricsEndpointV1(opts); - endpoints.push(ep); - } - this.endpoints = endpoints; - - return endpoints; - } - - public async shutdown(): Promise { - throw new Error("Method not implemented."); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getKeychainId(): string { - return this.opts.keychainId; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-keychain-vault`; - } - - public async onPluginInit(): Promise { - return; - } - - public getEncryptionAlgorithm(): string { - return "AES256"; - } - - protected pathFor(key: string): string { - return `${this.kvSecretsMountPath}${key}`; - } - - async get(key: string): Promise { - const fnTag = `${this.className}#get(key: string)`; - const path = this.pathFor(key); - try { - const res = await this.backend.read(path); - this.log.debug(`Response from Vault: %o`, () => JSON.stringify(res)); - if (res?.data?.data?.value) { - return res.data.data.value; - } else { - throw new Error( - `${fnTag}: Invalid response received from Vault. Expected "response.data.data.value" property chain to be truthy`, - ); - } - } catch (ex) { - // FIXME: Throw if not found, detect it in the endpoint code, status=404 - if (ex?.response?.statusCode === HttpStatus.NOT_FOUND) { - return null as unknown as string; - } else { - this.log.error(`Retrieval of "${key}" crashed:`, ex); - throw ex; - } - } - } - - /** - * Detects the presence of a key by trying to read it and then - * observing whether an HTTP 404 NOT FOUND error is returned or - * not and deciding whether the keychain has the entry ot not - * based on this. - */ - async has(key: string): Promise { - const path = this.pathFor(key); - try { - const res = await this.backend.read(path); - return res; - } catch (ex) { - // We have to make sure that the exception is either an expected - // or an unexpected one where the expected exception is what we - // get when the key is not present in the keychain and anything - // else being an unexpected exception that we do not want to - // handle nor suppress under any circumstances since doing so - // would lead to silent failures or worse. - if (ex?.response?.statusCode === HttpStatus.NOT_FOUND) { - return false; - } else { - this.log.error(`Presence check of "${key}" crashed:`, ex); - throw ex; - } - } - } - - async set(key: string, value: string): Promise { - const path = this.pathFor(key); - await this.backend.write(path, { data: { value } }); - this.prometheusExporter.setTotalKeyCounter(key, "set"); - } - - async delete(key: string): Promise { - const path = this.pathFor(key); - await this.backend.delete(path); - this.prometheusExporter.setTotalKeyCounter(key, "delete"); - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index 9306d802fe..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { VaultKeys } from "./response.type"; - -import { - totalKeyCount, - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT, -} from "./metrics"; - -export async function collectMetrics(vaultKeys: VaultKeys): Promise { - totalKeyCount - .labels(K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT) - .set(vaultKeys.size); -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index d8638e1609..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT = - "cactus_keychain_vault_managed_key_count"; - -export const totalKeyCount = new Gauge({ - registers: [], - name: K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT, - help: "The number of keys that were set in the backing Vault deployment via this specific keychain plugin instance", - labelNames: ["type"], -}); diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index e05f3e26ff..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,44 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { VaultKeys } from "./response.type"; -import { collectMetrics } from "./data-fetcher"; -import { K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT } from "./metrics"; -import { totalKeyCount } from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly vaultKeys: VaultKeys = new Map(); - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public setTotalKeyCounter(key: string, operation: string): void { - if (operation === "set") { - this.vaultKeys.set(key, "keychain-vault"); - } else { - this.vaultKeys.delete(key); - } - collectMetrics(this.vaultKeys); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalKeyCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 7af951c533..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1 +0,0 @@ -export type VaultKeys = Map; diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/public-api.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/public-api.ts deleted file mode 100755 index ccbfe55cdb..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/public-api.ts +++ /dev/null @@ -1,16 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; - -import { PluginFactoryKeychain } from "./plugin-factory-keychain"; -export { PluginFactoryKeychain } from "./plugin-factory-keychain"; -export { - IPluginKeychainVaultOptions, - PluginKeychainVault, -} from "./plugin-keychain-vault"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryKeychain(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/delete-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/delete-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 508bc67e6d..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/delete-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,108 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainVault } from "../plugin-keychain-vault"; -import { DeleteKeychainEntryResponseV1 } from "../generated/openapi/typescript-axios"; - -export interface IDeleteKeychainEntryEndpointV1Options { - logLevel?: LogLevelDesc; - plugin: PluginKeychainVault; -} - -export class DeleteKeychainEntryEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeleteKeychainEntryEndpointV1"; - - private readonly log: Logger; - private readonly plugin: PluginKeychainVault; - - public get className(): string { - return DeleteKeychainEntryEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IDeleteKeychainEntryEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.plugin`); - Checks.truthy( - options.plugin instanceof PluginKeychainVault, - `${fnTag} arg options.plugin instanceof PluginKeychainVault`, - ); - - this.plugin = options.plugin; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Instantiated ${this.className} OK`); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/delete-keychain-entry" - ]; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - this.log.debug(`${tag} %o`, req.body); - await this.plugin.delete(req.body.key); - const resBody: DeleteKeychainEntryResponseV1 = { - key: req.body.key, - }; - res.status(200); - res.json(resBody); - } catch (ex) { - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/get-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/get-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 2972a38f2e..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/get-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,109 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainVault } from "../plugin-keychain-vault"; -import { GetKeychainEntryResponseV1 } from "../generated/openapi/typescript-axios"; - -export interface IGetKeychainEntryEndpointV1Options { - logLevel?: LogLevelDesc; - plugin: PluginKeychainVault; -} - -export class GetKeychainEntryEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetKeychainEntryEndpointV1"; - - private readonly log: Logger; - private readonly plugin: PluginKeychainVault; - - public get className(): string { - return GetKeychainEntryEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IGetKeychainEntryEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.plugin`); - Checks.truthy( - options.plugin instanceof PluginKeychainVault, - `${fnTag} arg options.plugin instanceof PluginKeychainVault`, - ); - - this.plugin = options.plugin; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Instantiated ${this.className} OK`); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-keychain-entry" - ]; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - this.log.debug(`${tag} %o`, req.body); - const value = await this.plugin.get(req.body.key); - const resBody: GetKeychainEntryResponseV1 = { - key: req.body.key, - value: value as string, - }; - res.status(200); - res.json(resBody); - } catch (ex) { - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts deleted file mode 100644 index 9110275b8d..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api/"; - -import OAS from "../../json/openapi.json"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginKeychainVault } from "../plugin-keychain-vault"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - logLevel?: LogLevelDesc; - plugin: PluginKeychainVault; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - private readonly log: Logger; - - constructor( - public readonly opts: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = "GetPrometheusExporterMetricsEndpointV1#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.plugin, `${fnTag} options.plugin`); - - this.log = LoggerProvider.getOrCreate({ - label: "get-prometheus-exporter-metrics-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetPrometheusExporterMetrics#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - const resBody = await this.opts.plugin.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/has-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/has-keychain-entry-endpoint-v1.ts deleted file mode 100644 index da2a9fa4d8..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/has-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,110 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainVault } from "../plugin-keychain-vault"; -import { HasKeychainEntryResponseV1 } from "../generated/openapi/typescript-axios"; - -export interface IHasKeychainEntryEndpointV1Options { - logLevel?: LogLevelDesc; - plugin: PluginKeychainVault; -} - -export class HasKeychainEntryEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "HasKeychainEntryEndpointV1"; - - private readonly log: Logger; - private readonly plugin: PluginKeychainVault; - - public get className(): string { - return HasKeychainEntryEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IHasKeychainEntryEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.plugin`); - Checks.truthy( - options.plugin instanceof PluginKeychainVault, - `${fnTag} arg options.plugin instanceof PluginKeychainVault`, - ); - - this.plugin = options.plugin; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Instantiated ${this.className} OK`); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/has-keychain-entry" - ]; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - this.log.debug(`${tag} %o`, req.body); - const isPresent = await this.plugin.has(req.body.key); - const resBody: HasKeychainEntryResponseV1 = { - isPresent, - checkedAt: new Date().toJSON(), - key: req.body.key, - }; - res.status(200); - res.json(resBody); - } catch (ex) { - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/set-keychain-entry-endpoint-v1.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/set-keychain-entry-endpoint-v1.ts deleted file mode 100644 index 4d4ad5f197..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/web-services/set-keychain-entry-endpoint-v1.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginKeychainVault } from "../plugin-keychain-vault"; - -export interface ISetKeychainEntryEndpointV1Options { - logLevel?: LogLevelDesc; - plugin: PluginKeychainVault; -} - -export class SetKeychainEntryEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "SetKeychainEntryEndpointV1"; - - private readonly log: Logger; - private readonly plugin: PluginKeychainVault; - - public get className(): string { - return SetKeychainEntryEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ISetKeychainEntryEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.plugin, `${fnTag} arg options.plugin`); - Checks.truthy( - options.plugin instanceof PluginKeychainVault, - `${fnTag} arg options.plugin instanceof PluginKeychainVault`, - ); - - this.plugin = options.plugin; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Instantiated ${this.className} OK`); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/set-keychain-entry" - ]; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const tag = `${this.getVerbLowerCase().toUpperCase()} ${this.getPath()}`; - try { - this.log.debug(`${tag} %o`, req.body); - const { key, value } = req.body; - const resBody = await this.plugin.set(key, value); - res.status(200); - res.json(resBody); - } catch (ex) { - this.log.debug(`${tag} Failed to serve request:`, ex); - res.status(500); - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts deleted file mode 100644 index 287c5561ea..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts +++ /dev/null @@ -1,65 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; - -import { - CactusKeychainVaultServer, - Containers, - K_DEFAULT_VAULT_DEV_ROOT_TOKEN, - K_DEFAULT_VAULT_HTTP_PORT, - VaultTestServer, -} from "@hyperledger/cactus-test-tooling"; - -import { Configuration, DefaultApi } from "../../../main/typescript/public-api"; - -test("NodeJS API client + Rust plugin works together", async (tMain: Test) => { - const vaultTestContainer = new VaultTestServer({}); - await vaultTestContainer.start(); - - const ci = await Containers.getById(vaultTestContainer.containerId); - const vaultIpAddr = await Containers.getContainerInternalIp(ci); - tMain.comment(`Container VaultTestServer has IPv4: ${vaultIpAddr}`); - - test.onFinish(async () => { - await vaultTestContainer.stop(); - await vaultTestContainer.destroy(); - }); - - const hostPortVault = await vaultTestContainer.getHostPortHttp(); - tMain.comment(`Container VaultTestServer (Port=${hostPortVault}) started OK`); - const vaultHost = `http://${vaultIpAddr}:${K_DEFAULT_VAULT_HTTP_PORT}`; - - const pluginContainer = new CactusKeychainVaultServer({ - envVars: [ - `VAULT_HOST=${vaultHost}`, - `VAULT_TOKEN=${K_DEFAULT_VAULT_DEV_ROOT_TOKEN}`, - "HOST=0.0.0.0:8080", - ], - }); - await pluginContainer.start(); - - test.onFinish(async () => { - await pluginContainer.stop(); - await pluginContainer.destroy(); - }); - - const hostPort = await pluginContainer.getHostPortHttp(); - tMain.comment(`CactusKeychainVaultServer (Port=${hostPort}) started OK`); - - const configuration = new Configuration({ - basePath: `http://127.0.0.1:${hostPort}`, - }); - const apiClient = new DefaultApi(configuration); - - const key = uuidv4(); - const expected = uuidv4(); - - tMain.comment("Calling set keychain entry..."); - await apiClient.setKeychainEntryV1({ key, value: expected }); - const { - data: { value: actual }, - } = await apiClient.getKeychainEntryV1({ key }); - - tMain.equal(actual, expected, "Keychain stored value matches input OK"); - - tMain.end(); -}); diff --git a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts deleted file mode 100644 index 55174f1250..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ /dev/null @@ -1,309 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { v4 as internalIpV4 } from "internal-ip"; -import { AxiosError } from "axios"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { - Containers, - K_DEFAULT_VAULT_DEV_ROOT_TOKEN, - K_DEFAULT_VAULT_HTTP_PORT, - VaultTestServer, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; - -import { - Configuration, - DeleteKeychainEntryRequestV1, - GetKeychainEntryRequestV1, - HasKeychainEntryRequestV1, - IPluginKeychainVaultOptions, - PluginKeychainVault, - SetKeychainEntryRequestV1, -} from "../../../../main/typescript/public-api"; - -import { DefaultApi as KeychainVaultApi } from "../../../../main/typescript/public-api"; - -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; -import OAS from "../../../../main/json/openapi.json"; - -const logLevel: LogLevelDesc = "TRACE"; -const testCase = "cactus-plugin-keychain-vault API"; - -test(`${testCase}`, async (t: Test) => { - const vaultTestContainer = new VaultTestServer({}); - await vaultTestContainer.start(); - - const ci = await Containers.getById(vaultTestContainer.containerId); - const vaultIpAddr = await internalIpV4(); - const hostPort = await Containers.getPublicPort( - K_DEFAULT_VAULT_HTTP_PORT, - ci, - ); - const vaultHost = `http://${vaultIpAddr}:${hostPort}`; - - test.onFinish(async () => { - await vaultTestContainer.stop(); - await vaultTestContainer.destroy(); - }); - - const options: IPluginKeychainVaultOptions = { - instanceId: uuidv4(), - keychainId: uuidv4(), - endpoint: vaultHost, - token: K_DEFAULT_VAULT_DEV_ROOT_TOKEN, - apiVersion: "v1", - kvSecretsMountPath: "secret/data/", - logLevel, - }; - const plugin = new PluginKeychainVault(options); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const apiConfig = new Configuration({ basePath: apiHost }); - const apiClient = new KeychainVaultApi(apiConfig); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - - t.equal(plugin.getKeychainId(), options.keychainId, "Keychain ID set OK"); - t.equal(plugin.getInstanceId(), options.instanceId, "Instance ID set OK"); - - const key1 = uuidv4(); - const value1 = uuidv4(); - - const fSet = "setKeychainEntryV1"; - const fGet = "getKeychainEntryV1"; - const fDelete = "deleteKeychainEntryV1"; - const fHas = "hasKeychainEntryV1"; - const cOk = "without bad request error"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - - test(`${testCase} - ${fSet} - ${cOk}`, async (t2: Test) => { - const res = await apiClient.setKeychainEntryV1({ - key: key1, - value: value1, - }); - t2.equal(res.status, 200, `Endpoint ${fSet}: response.status === 200 OK`); - t2.end(); - }); - - test(`${testCase} - ${fHas} - ${cOk}`, async (t2: Test) => { - const res = await apiClient.hasKeychainEntryV1({ key: key1 }); - t2.equal(res.status, 200, `Endpoint ${fHas}: response.status === 200 OK`); - t2.end(); - }); - - test(`${testCase} - ${fGet} - ${cOk}`, async (t2: Test) => { - const res = await apiClient.getKeychainEntryV1({ key: key1 }); - t2.equal(res.status, 200, `Endpoint ${fGet}: response.status === 200 OK`); - t2.end(); - }); - - test(`${testCase} - ${fDelete} - ${cOk}`, async (t2: Test) => { - const res = await apiClient.deleteKeychainEntryV1({ key: key1 }); - t2.equal( - res.status, - 200, - `Endpoint ${fDelete}: response.status === 200 OK`, - ); - t2.end(); - }); - - test(`${testCase} - ${fSet} - ${cWithoutParams}`, async (t2: Test) => { - try { - await apiClient.setKeychainEntryV1({ - value: value1, - } as SetKeychainEntryRequestV1); - } catch (err) { - const e = err as AxiosError<{ path: string }[]>; - t2.equal( - e?.response?.status, - 400, - `Endpoint ${fSet} without required key: response.status === 400 OK`, - ); - const fields = e?.response?.data.map((param) => - param.path.replace("/body/", ""), - ); - t2.ok(fields?.includes("key"), "Rejected because key is required"); - } - t2.end(); - }); - - test(`${testCase} - ${fHas} - ${cWithoutParams}`, async (t2: Test) => { - try { - await apiClient.hasKeychainEntryV1({} as HasKeychainEntryRequestV1); - } catch (err) { - const e = err as AxiosError<{ path: string }[]>; - t2.equal( - e?.response?.status, - 400, - `Endpoint ${fHas} without required key: response.status === 400 OK`, - ); - const fields = e?.response?.data.map((param) => - param.path.replace("/body/", ""), - ); - t2.ok(fields?.includes("key"), "Rejected because key is required"); - } - t2.end(); - }); - - test(`${testCase} - ${fGet} - ${cWithoutParams}`, async (t2: Test) => { - try { - await apiClient.getKeychainEntryV1({} as GetKeychainEntryRequestV1); - } catch (err) { - const e = err as AxiosError<{ path: string }[]>; - t2.equal( - e?.response?.status, - 400, - `Endpoint ${fGet} without required key: response.status === 400 OK`, - ); - const fields = e?.response?.data.map((param) => - param.path.replace("/body/", ""), - ); - t2.ok(fields?.includes("key"), "Rejected because key is required"); - } - t2.end(); - }); - - test(`${testCase} - ${fDelete} - ${cWithoutParams}`, async (t2: Test) => { - try { - await apiClient.deleteKeychainEntryV1({} as DeleteKeychainEntryRequestV1); - } catch (err) { - const e = err as AxiosError<{ path: string }[]>; - t2.equal( - e?.response?.status, - 400, - `Endpoint ${fDelete} without required key: response.status === 400 OK`, - ); - const fields = e?.response?.data.map((param) => - param.path.replace("/body/", ""), - ); - t2.ok(fields?.includes("key"), "Rejected because key is required"); - } - t2.end(); - }); - - test(`${testCase} - ${fSet} - ${cInvalidParams}`, async (t2: Test) => { - try { - await apiClient.setKeychainEntryV1({ - key: key1, - value: value1, - fake: 4, - } as SetKeychainEntryRequestV1); - } catch (err) { - const e = err as AxiosError<{ path: string }[]>; - t2.equal( - e?.response?.status, - 400, - `Endpoint ${fSet} with fake=4: response.status === 400 OK`, - ); - const fields = e?.response?.data.map((param) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields?.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - t2.end(); - }); - - test(`${testCase} - ${fHas} - ${cInvalidParams}`, async (t2: Test) => { - try { - await apiClient.hasKeychainEntryV1({ - key: key1, - fake: 4, - } as HasKeychainEntryRequestV1); - } catch (err) { - const e = err as AxiosError<{ path: string }[]>; - t2.equal( - e?.response?.status, - 400, - `Endpoint ${fHas} with fake=4: response.status === 400 OK`, - ); - const fields = e?.response?.data.map((param) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields?.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - t2.end(); - }); - - test(`${testCase} - ${fGet} - ${cInvalidParams}`, async (t2: Test) => { - try { - await apiClient.getKeychainEntryV1({ - key: key1, - fake: 4, - } as GetKeychainEntryRequestV1); - } catch (err) { - const e = err as AxiosError<{ path: string }[]>; - t2.equal( - e?.response?.status, - 400, - `Endpoint ${fGet} with fake=4: response.status === 400 OK`, - ); - const fields = - e?.response?.data.map((param) => param.path.replace("/body/", "")) || - []; - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - t2.end(); - }); - - test(`${testCase} - ${fDelete} - ${cInvalidParams}`, async (t2: Test) => { - try { - await apiClient.deleteKeychainEntryV1({ - key: key1, - fake: 4, - } as GetKeychainEntryRequestV1); - } catch (err) { - const e = err as AxiosError; - t2.equal( - (e as AxiosError)?.response?.status, - 400, - `Endpoint ${fDelete} with fake=4: response.status === 400 OK`, - ); - const fields = (e?.response?.data as []).map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields?.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - t2.end(); - }); - - t.end(); -}); diff --git a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts deleted file mode 100644 index ba5d3cc921..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts +++ /dev/null @@ -1,335 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { v4 as internalIpV4 } from "internal-ip"; - -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; - -import { - Containers, - K_DEFAULT_VAULT_DEV_ROOT_TOKEN, - K_DEFAULT_VAULT_HTTP_PORT, - VaultTestServer, -} from "@hyperledger/cactus-test-tooling"; - -import { v4 as uuidv4 } from "uuid"; - -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; - -import { - Configuration, - IPluginKeychainVaultOptions, - PluginKeychainVault, -} from "../../../main/typescript/public-api"; - -import { K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT } from "../../../main/typescript/prometheus-exporter/metrics"; - -import { DefaultApi as KeychainVaultApi } from "../../../main/typescript/public-api"; - -const logLevel: LogLevelDesc = "TRACE"; - -test("get,set,has,delete alters state", async (t: Test) => { - const vaultTestContainer = new VaultTestServer({}); - await vaultTestContainer.start(); - - const ci = await Containers.getById(vaultTestContainer.containerId); - const vaultIpAddr = await internalIpV4(); - const hostPort = await Containers.getPublicPort( - K_DEFAULT_VAULT_HTTP_PORT, - ci, - ); - const vaultHost = `http://${vaultIpAddr}:${hostPort}`; - - test.onFinish(async () => { - await vaultTestContainer.stop(); - await vaultTestContainer.destroy(); - }); - - const options: IPluginKeychainVaultOptions = { - instanceId: uuidv4(), - keychainId: uuidv4(), - endpoint: vaultHost, - token: K_DEFAULT_VAULT_DEV_ROOT_TOKEN, - apiVersion: "v1", - kvSecretsMountPath: "secret/data/", - logLevel, - }; - const plugin = new PluginKeychainVault(options); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - t.comment( - `Metrics URL: ${apiHost}/api/v1/plugins/@hyperledger/cactus-plugin-keychain-vault/get-prometheus-exporter-metrics`, - ); - - const apiConfig = new Configuration({ basePath: apiHost }); - const apiClient = new KeychainVaultApi(apiConfig); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - - t.equal(plugin.getKeychainId(), options.keychainId, "Keychain ID set OK"); - t.equal(plugin.getInstanceId(), options.instanceId, "Instance ID set OK"); - - const key1 = uuidv4(); - const value1 = uuidv4(); - - const hasPrior1 = await plugin.has(key1); - - t.false(hasPrior1, "hasPrior === false OK"); - - await plugin.set(key1, value1); - - const hasAfter1 = await plugin.has(key1); - t.true(hasAfter1, "hasAfter === true OK"); - - const valueAfter1 = await plugin.get(key1); - t.ok(valueAfter1, "valueAfter truthy OK"); - t.equal(valueAfter1, value1, "valueAfter === value OK"); - - await plugin.delete(key1); - - const hasAfterDelete1 = await plugin.has(key1); - t.false(hasAfterDelete1, "hasAfterDelete === false OK"); - - const valueAfterDelete1 = await plugin.get(key1); - t.notok(valueAfterDelete1, "valueAfterDelete falsy OK"); - - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - " The number of keys that were set in the backing Vault deployment via this specific keychain plugin instance\n" + - "# TYPE " + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - " gauge\n" + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - '{type="' + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - '"} 0'; - t.ok(res); - t.ok(res.data); - t.equal(res.status, 200); - t.true( - res.data.includes(promMetricsOutput), - "Total Key Count 0 recorded as expected. RESULT OK", - ); - } - - const key2 = uuidv4(); - const value2 = uuidv4(); - - const hasPrior2 = await plugin.has(key2); - - t.false(hasPrior2, "hasPrior === false OK"); - - await plugin.set(key2, value2); - - const hasAfter2 = await plugin.has(key2); - t.true(hasAfter2, "hasAfter === true OK"); - - const valueAfter2 = await plugin.get(key2); - t.ok(valueAfter2, "valueAfter2 truthy OK"); - t.equal(valueAfter2, value2, "valueAfter2 === value OK"); - - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - " The number of keys that were set in the backing Vault deployment via this specific keychain plugin instance\n" + - "# TYPE " + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - " gauge\n" + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - '{type="' + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - '"} 1'; - t.ok(res); - t.ok(res.data); - t.equal(res.status, 200); - t.true( - res.data.includes(promMetricsOutput), - "Total Key Count 1 recorded as expected. RESULT OK", - ); - } - - t.end(); -}); - -test("API client get,set,has,delete alters state", async (t: Test) => { - const vaultTestContainer = new VaultTestServer({}); - await vaultTestContainer.start(); - - const ci = await Containers.getById(vaultTestContainer.containerId); - const vaultIpAddr = await internalIpV4(); - const hostPort = await Containers.getPublicPort( - K_DEFAULT_VAULT_HTTP_PORT, - ci, - ); - const vaultHost = `http://${vaultIpAddr}:${hostPort}`; - - test.onFinish(async () => { - await vaultTestContainer.stop(); - await vaultTestContainer.destroy(); - }); - - const options: IPluginKeychainVaultOptions = { - instanceId: uuidv4(), - keychainId: uuidv4(), - endpoint: vaultHost, - token: K_DEFAULT_VAULT_DEV_ROOT_TOKEN, - apiVersion: "v1", - kvSecretsMountPath: "secret/data/", - logLevel, - }; - const plugin = new PluginKeychainVault(options); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const apiConfig = new Configuration({ basePath: apiHost }); - const apiClient = new KeychainVaultApi(apiConfig); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - - t.equal(plugin.getKeychainId(), options.keychainId, "Keychain ID set OK"); - t.equal(plugin.getInstanceId(), options.instanceId, "Instance ID set OK"); - - const key1 = uuidv4(); - const value1 = uuidv4(); - - const hasPrior1 = await apiClient.hasKeychainEntryV1({ key: key1 }); - t.ok(hasPrior1, "hasPrior1 truthy OK"); - - t.false(hasPrior1.data.isPresent, "hasPrior1.data.isPresent === false OK"); - - await apiClient.setKeychainEntryV1({ key: key1, value: value1 }); - - const hasAfter1 = await apiClient.hasKeychainEntryV1({ key: key1 }); - t.ok(hasAfter1, "hasAfter1 truthy OK"); - t.true(hasAfter1.data.isPresent, "hasAfter1.data.isPresent === true OK"); - - const valueAfter1 = await apiClient.getKeychainEntryV1({ key: key1 }); - t.ok(valueAfter1, "valueAfter1 truthy OK"); - t.equal(valueAfter1.data.value, value1, "valueAfter1.data.value EQ value OK"); - - await apiClient.deleteKeychainEntryV1({ key: key1 }); - - const hasAfterDelete1 = await apiClient.hasKeychainEntryV1({ key: key1 }); - t.ok(hasAfterDelete1, "hasAfterDelete1 truthy OK"); - t.false( - hasAfterDelete1.data.isPresent, - "hasAfterDelete1.data.isPresent === false OK", - ); - - const valueAfterDelete1 = await apiClient.getKeychainEntryV1({ key: key1 }); - t.ok(valueAfterDelete1, "valueAfterDelete1 truthy OK"); - t.notok( - valueAfterDelete1.data.value, - "valueAfterDelete1.data.value falsy OK", - ); - - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - " The number of keys that were set in the backing Vault deployment via this specific keychain plugin instance\n" + - "# TYPE " + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - " gauge\n" + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - '{type="' + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - '"} 0'; - t.ok(res); - t.ok(res.data); - t.equal(res.status, 200); - t.true( - res.data.includes(promMetricsOutput), - "Total Key Count 0 recorded as expected. RESULT OK", - ); - } - - const key2 = uuidv4(); - const value2 = uuidv4(); - - const hasPrior2 = await apiClient.hasKeychainEntryV1({ key: key2 }); - t.ok(hasPrior2, "hasPrior2 API response truthy OK"); - t.false(hasPrior2.data.isPresent, "hasPrior2.data.isPresent EQ false OK"); - - await apiClient.setKeychainEntryV1({ key: key2, value: value2 }); - - const hasAfter2 = await apiClient.hasKeychainEntryV1({ key: key2 }); - t.true(hasAfter2, "hasAfter === true OK"); - - const valueAfter2 = await apiClient.getKeychainEntryV1({ key: key2 }); - t.ok(valueAfter2, "valueAfter2 API response truthy OK"); - t.equal(valueAfter2.data.value, value2, "valueAfter2.data.value EQ value OK"); - - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - " The number of keys that were set in the backing Vault deployment via this specific keychain plugin instance\n" + - "# TYPE " + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - " gauge\n" + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - '{type="' + - K_CACTUS_KEYCHAIN_VAULT_MANAGED_KEY_COUNT + - '"} 1'; - t.ok(res); - t.ok(res.data); - t.equal(res.status, 200); - t.true( - res.data.includes(promMetricsOutput), - "Total Key Count 1 recorded as expected. RESULT OK", - ); - } - - t.end(); -}); - -test("getEncryptionAlgorithm() returns null", (t: Test) => { - const options: IPluginKeychainVaultOptions = { - instanceId: uuidv4(), - keychainId: uuidv4(), - endpoint: "http://127.0.0.1:9200", - token: "root", - }; - const plugin = new PluginKeychainVault(options); - - t.ok(plugin.getEncryptionAlgorithm(), "encryption algorithm truthy OK"); - - t.end(); -}); diff --git a/packages/cactus-plugin-keychain-vault/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-keychain-vault/tsconfig.json b/packages/cactus-plugin-keychain-vault/tsconfig.json deleted file mode 100644 index a0e2f8f937..0000000000 --- a/packages/cactus-plugin-keychain-vault/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-keychain-vault.tsbuildinfo" - }, - "include": [ - "./src", - "**/openapi.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-aries/CHANGELOG.md b/packages/cactus-plugin-ledger-connector-aries/CHANGELOG.md deleted file mode 100644 index 3df45a3897..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/CHANGELOG.md +++ /dev/null @@ -1,107 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-aries - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-aries - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-aries - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **indy-vdr-nodejs:** update dependency version ([f81b46b](https://github.com/hyperledger/cacti/commit/f81b46bce5ca0880e6bf6b51be2233e2616759a5)) - -### Features - -* **cactus-plugin-ledger-connector-aries:** add new connector plugin ([afef5ae](https://github.com/hyperledger/cacti/commit/afef5ae3e2f36bf7f25928ee75f82bc4800b3172)), closes [#2946](https://github.com/hyperledger/cacti/issues/2946) diff --git a/packages/cactus-plugin-ledger-connector-aries/README.md b/packages/cactus-plugin-ledger-connector-aries/README.md deleted file mode 100644 index 1a9dca3e5b..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/README.md +++ /dev/null @@ -1,188 +0,0 @@ -# `@hyperledger/cactus-plugin-ledger-connector-aries` - -This plugin provides `Cacti` a way to interact with Aries agents and other aries connectors. Using this we can: - -- Connect with another Aries agents. -- Request proof from peer. -- Monitor connection and proof state changes. - -Limitations: - -- AnonCreds V2 protocols only. -- Indy VDR only. -- Only sqlite Askar wallet on the same machine as the connector. - -## Summary -- [Getting Started](#getting-started) -- [Usage](#usage) -- [AriesApiClient](#ariesapiclient) -- [Runing the tests](#running-the-tests) -- [Contributing](#contributing) -- [License](#license) -- [Acknowledgments](#acknowledgments) - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project to install the dependencies execute the command: - -```sh -npm run configure -``` - -## Usage - -To use this plugin, import public-api, create new **PluginLedgerConnectorAries** and initialize it. - -```typescript -const connector = new PluginLedgerConnectorAries({ - instanceId: uuidV4(), - logLevel: testLogLevel, - pluginRegistry: new PluginRegistry({ plugins: [] }), - walletPath: "/home/user/my-wallet", - invitationDomain: "https://example.org", - ariesAgents: [ - { - name: aliceAgentName, - walletKey: aliceAgentName, - indyNetworks: [await ledger.getIndyVdrPoolConfig(indyNamespace)], - inboundUrl: aliceInboundUrl, - autoAcceptConnections: true, - }, - { - name: bobAgentName, - walletKey: bobAgentName, - indyNetworks: [await ledger.getIndyVdrPoolConfig(indyNamespace)], - inboundUrl: bobInboundUrl, - autoAcceptConnections: true, - }, - ], -}); - -// Register endpoints -await connector.getOrCreateWebServices(); -await connector.registerWebServices(expressApp, wsApi); - -// Initialize Aries agents -await connector.onPluginInit(); -``` - -### Configuration - -#### Connector Setup - -- `instanceId` - unique ID of the connector -- `logLevel` - connector log level -- `walletPath` - Default Aries agents sqlite wallet location. - Under this location each agent will create its wallet using agent name. - Path can be set explicitly for any agent managed by the connector. -- `invitationDomain`: Invitations created by this connector will use invitationDomain. - Can be overwriten when creating invitation. -- `ariesAgents`: List of aries agent managed by the connector to be created on startup. - Additional agents can be configured during runtime with `addAriesAgent` connector method. - See `Agent Setup` section below for details on agent configuration. - -#### Agent Setup - -- `name`: Aries agent label that will also be used as wallet id. -- `walletKey`: Wallet private key - do not share with anyone. -- `walletPath`: Path to wallet sqlite database to use. If not provided, the connector default path and agent name will be used. -- `indyNetworks`: List of indy networks to connect the agent to. -- `inboundUrl`: Inbound endpoint URL for this agent. Must be unique for this connector. Must contain port. -- `autoAcceptConnections`: Flag to accept new connection by default. -- `autoAcceptCredentials`: Policy of accepting credentials. -- `autoAcceptProofs`: Policy of accepting proof requests. - -> **Warning - Currently `autoAcceptConnections`, `autoAcceptCredentials`, and `autoAcceptProofs` are ignored! The defaults are used instead (autoAcceptConnections - `true`, credential and proof policies - `ContentApproved`)** - -### Connector Methods - -- Connector can be used directly through it's public methods. -- Most methods require `agentName` to identify Aries agent which should perform operation (single connector can control many agents). - -#### Methods - -```typescript -// Managing Agents -public async getAgents(): Promise -public async getAriesAgentOrThrow(agentName: string): Promise -public async addAriesAgent(agentConfig: AriesAgentConfigV1): Promise -public async removeAriesAgent(agentName: string): Promise -public async importExistingIndyDidFromPrivateKey(agentName: string, seed: string, indyNamespace: string): Promise - -// Connecting -public async getConnections(agentName: string, filter: AgentConnectionsFilterV1 = {}): Promise -public async createNewConnectionInvitation(agentName: string, invitationDomain?: string) -public async acceptInvitation(agentName: string, invitationUrl: string) - -// Proof requesting -public async requestProof(agentName: string, connectionId: string, proofAttributes: CactiProofRequestAttributeV1[]) -``` - -## AriesApiClient - -All connector API endpoints are defined in [open-api specification](./src/main/json/openapi.json). You can use [AriesApiClient](./src/main/typescript/api-client) to call remote aries connector functions. It also contain additional utility functions to ease integration. - -See [DefaultApi](./src/main/typescript/generated/openapi/typescript-axios/api.ts) and [AriesApiClient](./src/main/typescript/api-client/aries-api-client.ts) -for up-to-date listing of supported endpoints. - -### REST Functions - -- `getAgentsV1` -- `getConnectionsV1` -- `createNewConnectionInvitationV1` -- `acceptInvitationV1` -- `requestProofV1` - -### Monitoring methods - -- `watchConnectionStateV1` -- `watchProofStateV1` - -### Helper methods - -- `waitForConnectionReadyV1` -- `waitForInvitedPeerConnectionV1` -- `waitForProofCompletionV1` -- `requestProofAndWaitV1` - -## Running the tests - -To check that all has been installed correctly and that the plugin has no errors run jest test suites. - -- Run this command at the project's root: - -```sh -npx jest cactus-plugin-ledger-connector-aries -``` - -### Example apps -- [Discounted Asset Trade](../../examples/cactus-example-discounted-asset-trade/README.md) sample app uses aries connector to verify remote aries agent employment proof. - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -### TODO - -- Add option of connecting cacti aries agents directly (invitation / accept performed by connector directly). -- Add create credential option (will register schema and credental definition when necessary). -- Add issue credential option. -- Implement own aries wallet plugin that will use our keychain plugin as secure storage. -- Write functional test for proof verification. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments - -``` - -``` diff --git a/packages/cactus-plugin-ledger-connector-aries/openapitools.json b/packages/cactus-plugin-ledger-connector-aries/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/package.json b/packages/cactus-plugin-ledger-connector-aries/package.json deleted file mode 100644 index 35cce6c99f..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-ledger-connector-aries", - "version": "2.0.0", - "description": "Allows Cactus nodes to connect to an Indy ledger and Aries agents.", - "keywords": [ - "Hyperledger", - "Cacti", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-ledger-connector-aries.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --ignore-file-override ../../openapi-generator-ignore --reserved-words-mappings protected=protected", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@aries-framework/anoncreds": "0.5.0-alpha.71", - "@aries-framework/anoncreds-rs": "0.5.0-alpha.71", - "@aries-framework/askar": "0.5.0-alpha.71", - "@aries-framework/core": "0.5.0-alpha.71", - "@aries-framework/indy-vdr": "0.5.0-alpha.71", - "@aries-framework/node": "0.5.0-alpha.71", - "@hyperledger/anoncreds-nodejs": "0.2.0", - "@hyperledger/aries-askar-nodejs": "0.2.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/indy-vdr-nodejs": "0.2.0", - "axios": "1.7.7", - "rxjs": "7.8.1", - "socket.io-client-fixed-types": "4.5.4" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "jest": "29.6.2", - "jest-extended": "4.0.1", - "socket.io": "4.6.2", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-ledger-connector-aries.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-ledger-connector-aries.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index c2951976b4..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,32 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_accept_invitation_v1_request.go -model_accept_invitation_v1_response.go -model_agent_connection_record_v1.go -model_agent_connections_filter_v1.go -model_aries_agent_config_v1.go -model_aries_agent_summary_v1.go -model_aries_agent_summary_v1_wallet_config.go -model_aries_indy_vdr_pool_config_v1.go -model_aries_proof_exchange_record_v1.go -model_cacti_accept_policy_v1.go -model_cacti_proof_request_attribute_v1.go -model_create_new_connection_invitation_v1_request.go -model_create_new_connection_invitation_v1_response.go -model_error_exception_v1_response.go -model_get_connections_v1_request.go -model_request_proof_v1_request.go -model_watch_connection_state_options_v1.go -model_watch_connection_state_progress_v1.go -model_watch_connection_state_v1.go -model_watch_proof_state_options_v1.go -model_watch_proof_state_progress_v1.go -model_watch_proof_state_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 7f56c642b7..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,137 +0,0 @@ -# Go API client for cactus-plugin-ledger-connector-aries - -Can communicate with other Aries agents and Cacti Aries connectors - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-ledger-connector-aries "github.com/hyperledger/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-aries.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-aries.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-aries.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-ledger-connector-aries.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**AcceptInvitationV1**](docs/DefaultApi.md#acceptinvitationv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation | Connect to another agent using it's invitation URL -*DefaultApi* | [**CreateNewConnectionInvitationV1**](docs/DefaultApi.md#createnewconnectioninvitationv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation | Create new aries agent invitation that other agents can use to connect. -*DefaultApi* | [**GetAgentsV1**](docs/DefaultApi.md#getagentsv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents | Get all Aries agents configured in this connector plugin. -*DefaultApi* | [**GetConnectionsV1**](docs/DefaultApi.md#getconnectionsv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections | Get all connections of given aries agent. -*DefaultApi* | [**RequestProofV1**](docs/DefaultApi.md#requestproofv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof | Request proof matching provided requriements from connected peer agent. - - -## Documentation For Models - - - [AcceptInvitationV1Request](docs/AcceptInvitationV1Request.md) - - [AcceptInvitationV1Response](docs/AcceptInvitationV1Response.md) - - [AgentConnectionRecordV1](docs/AgentConnectionRecordV1.md) - - [AgentConnectionsFilterV1](docs/AgentConnectionsFilterV1.md) - - [AriesAgentConfigV1](docs/AriesAgentConfigV1.md) - - [AriesAgentSummaryV1](docs/AriesAgentSummaryV1.md) - - [AriesAgentSummaryV1WalletConfig](docs/AriesAgentSummaryV1WalletConfig.md) - - [AriesIndyVdrPoolConfigV1](docs/AriesIndyVdrPoolConfigV1.md) - - [AriesProofExchangeRecordV1](docs/AriesProofExchangeRecordV1.md) - - [CactiAcceptPolicyV1](docs/CactiAcceptPolicyV1.md) - - [CactiProofRequestAttributeV1](docs/CactiProofRequestAttributeV1.md) - - [CreateNewConnectionInvitationV1Request](docs/CreateNewConnectionInvitationV1Request.md) - - [CreateNewConnectionInvitationV1Response](docs/CreateNewConnectionInvitationV1Response.md) - - [ErrorExceptionV1Response](docs/ErrorExceptionV1Response.md) - - [GetConnectionsV1Request](docs/GetConnectionsV1Request.md) - - [RequestProofV1Request](docs/RequestProofV1Request.md) - - [WatchConnectionStateOptionsV1](docs/WatchConnectionStateOptionsV1.md) - - [WatchConnectionStateProgressV1](docs/WatchConnectionStateProgressV1.md) - - [WatchConnectionStateV1](docs/WatchConnectionStateV1.md) - - [WatchProofStateOptionsV1](docs/WatchProofStateOptionsV1.md) - - [WatchProofStateProgressV1](docs/WatchProofStateProgressV1.md) - - [WatchProofStateV1](docs/WatchProofStateV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index d328a89bcf..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,651 +0,0 @@ -openapi: 3.0.3 -info: - description: Can communicate with other Aries agents and Cacti Aries connectors - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cacti Plugin - Connector Aries - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents: - post: - operationId: getAgentsV1 - parameters: [] - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetAgentsV1Response' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionV1Response' - description: Internal Server Error - summary: Get all Aries agents configured in this connector plugin. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections: - post: - operationId: getConnectionsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetConnectionsV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetConnectionsV1Response' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionV1Response' - description: Internal Server Error - summary: Get all connections of given aries agent. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation: - post: - operationId: createNewConnectionInvitationV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateNewConnectionInvitationV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/CreateNewConnectionInvitationV1Response' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionV1Response' - description: Internal Server Error - summary: Create new aries agent invitation that other agents can use to connect. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation: - post: - operationId: acceptInvitationV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AcceptInvitationV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/AcceptInvitationV1Response' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionV1Response' - description: Internal Server Error - summary: Connect to another agent using it's invitation URL - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof: - post: - operationId: requestProofV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RequestProofV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/AriesProofExchangeRecordV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionV1Response' - description: Internal Server Error - summary: Request proof matching provided requriements from connected peer agent. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof -components: - schemas: - WatchConnectionStateV1: - description: Websocket requests for monitoring connection change events. - enum: - - org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Subscribe - - org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Next - - org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Unsubscribe - - org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Error - - org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Complete - type: string - x-enum-varnames: - - Subscribe - - Next - - Unsubscribe - - Error - - Complete - WatchConnectionStateOptionsV1: - description: Options passed when monitoring connection change events. - properties: - agentName: - description: Aries agent label that will also be used as wallet id. - nullable: false - type: string - required: - - agentName - type: object - WatchConnectionStateProgressV1: - description: Values pushed on each connection state change. - properties: - connectionRecord: - $ref: '#/components/schemas/AgentConnectionRecordV1' - previousState: - nullable: true - type: string - required: - - connectionRecord - - previousState - type: object - WatchProofStateV1: - description: Websocket requests for monitoring proof state change events. - enum: - - org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Subscribe - - org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Next - - org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Unsubscribe - - org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Error - - org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Complete - type: string - x-enum-varnames: - - Subscribe - - Next - - Unsubscribe - - Error - - Complete - WatchProofStateOptionsV1: - description: Options passed when monitoring proof state change events. - properties: - agentName: - description: Aries agent label that will also be used as wallet id. - nullable: false - type: string - required: - - agentName - type: object - WatchProofStateProgressV1: - description: Values pushed on each proof state change. - properties: - proofRecord: - $ref: '#/components/schemas/AriesProofExchangeRecordV1' - previousState: - nullable: true - type: string - required: - - previousState - - proofRecord - type: object - CactiAcceptPolicyV1: - description: Credential / Proof requests acceptance policies for Aries agent - enum: - - always - - contentApproved - - never - type: string - x-enum-varnames: - - Always - - ContentApproved - - Never - CactiProofRequestAttributeV1: - description: Credential attribute checks to be performed by a proof request. - example: - name: name - isValueEqual: "" - isCredentialDefinitionIdEqual: "" - properties: - name: - description: Attribute name. - nullable: false - type: string - isValueEqual: - description: Check if attribute has specified value - nullable: false - isCredentialDefinitionIdEqual: - description: Check if credentialDefinitionId has specified value - nullable: false - required: - - name - type: object - AriesProofExchangeRecordV1: - additionalProperties: true - description: Proof exchange record from Aries framework (simplified) - example: - threadId: threadId - isVerified: true - errorMessage: errorMessage - connectionId: connectionId - protocolVersion: protocolVersion - id: id - state: state - properties: - id: - nullable: false - type: string - connectionId: - nullable: false - type: string - threadId: - nullable: false - type: string - state: - nullable: false - type: string - protocolVersion: - nullable: false - type: string - isVerified: - nullable: false - type: boolean - errorMessage: - nullable: false - type: string - required: - - id - - protocolVersion - - state - - threadId - type: object - AriesIndyVdrPoolConfigV1: - description: Indy VDR network configuration - properties: - genesisTransactions: - description: Indy genesis transactions. - nullable: false - type: string - isProduction: - description: Flag to specify whether this is production or development ledger. - nullable: false - type: boolean - indyNamespace: - description: Indy namespace - nullable: false - type: string - connectOnStartup: - description: Connect to the ledger on startup flag - nullable: false - type: boolean - required: - - genesisTransactions - - indyNamespace - - isProduction - type: object - AriesAgentConfigV1: - description: Aries agent configuration to be setup and used by the connector. - properties: - name: - description: Aries agent label that will also be used as wallet id. - nullable: false - type: string - walletKey: - description: Wallet private key - do not share with anyone. - nullable: false - type: string - walletPath: - description: "Path to wallet sqlite database to use. If not provided, the\ - \ connector default path and agent name will be used." - nullable: false - type: string - indyNetworks: - items: - $ref: '#/components/schemas/AriesIndyVdrPoolConfigV1' - nullable: false - type: array - inboundUrl: - default: undefined - description: Inbound endpoint URL for this agent. Must be unique for this - connector. Must contain port. - example: http://127.0.0.1:1234 - nullable: false - type: string - autoAcceptConnections: - default: false - description: Flag to accept new connection by default - nullable: false - type: boolean - autoAcceptCredentials: - $ref: '#/components/schemas/CactiAcceptPolicyV1' - autoAcceptProofs: - $ref: '#/components/schemas/CactiAcceptPolicyV1' - required: - - indyNetworks - - name - - walletKey - type: object - AriesAgentSummaryV1: - description: Summary of an Aries Agent configured in the connector. - example: - isAgentInitialized: true - isWalletInitialized: true - endpoints: - - endpoints - - endpoints - isWalletProvisioned: true - name: name - walletConfig: - id: id - type: type - properties: - name: - description: Aries label of an agent - nullable: false - type: string - isAgentInitialized: - description: True when Aries agent has been initialized properly. - nullable: false - type: boolean - isWalletInitialized: - description: True when this agents wallet has been initialized properly. - nullable: false - type: boolean - isWalletProvisioned: - description: True when this agents wallet has been provisioned properly. - nullable: false - type: boolean - walletConfig: - $ref: '#/components/schemas/AriesAgentSummaryV1_walletConfig' - endpoints: - description: Aries agent endpoints configured - items: - nullable: false - type: string - nullable: false - type: array - required: - - endpoints - - isAgentInitialized - - isWalletInitialized - - isWalletProvisioned - - name - - walletConfig - type: object - AgentConnectionsFilterV1: - description: Fields that can be used to filter agent connection list. - example: - threadId: threadId - role: role - theirDid: theirDid - invitationDid: invitationDid - outOfBandId: outOfBandId - state: state - did: did - properties: - did: - nullable: false - type: string - invitationDid: - nullable: false - type: string - outOfBandId: - nullable: false - type: string - role: - nullable: false - type: string - state: - nullable: false - type: string - theirDid: - nullable: false - type: string - threadId: - nullable: false - type: string - type: object - AgentConnectionRecordV1: - additionalProperties: true - description: Aries agent connection information. - example: - threadId: threadId - role: role - theirDid: theirDid - theirLabel: theirLabel - isReady: true - errorMessage: errorMessage - alias: alias - invitationDid: invitationDid - outOfBandId: outOfBandId - state: state - did: did - properties: - state: - nullable: false - type: string - role: - nullable: false - type: string - isReady: - nullable: false - type: boolean - did: - nullable: false - type: string - theirDid: - nullable: false - type: string - theirLabel: - nullable: false - type: string - alias: - nullable: false - type: string - threadId: - nullable: false - type: string - errorMessage: - nullable: false - type: string - outOfBandId: - nullable: false - type: string - invitationDid: - nullable: false - type: string - required: - - isReady - - role - - state - type: object - GetConnectionsV1Request: - description: Request for GetConnections endpoint. - example: - filter: - threadId: threadId - role: role - theirDid: theirDid - invitationDid: invitationDid - outOfBandId: outOfBandId - state: state - did: did - agentName: agentName - properties: - agentName: - nullable: false - type: string - filter: - $ref: '#/components/schemas/AgentConnectionsFilterV1' - required: - - agentName - type: object - GetConnectionsV1Response: - default: [] - description: Response for GetConnections endpoint. - items: - $ref: '#/components/schemas/AgentConnectionRecordV1' - type: array - GetAgentsV1Response: - default: [] - description: Response for GetAgents endpoint. - items: - $ref: '#/components/schemas/AriesAgentSummaryV1' - type: array - CreateNewConnectionInvitationV1Request: - description: Request for CreateNewConnectionInvitation endpoint. - example: - invitationDomain: invitationDomain - agentName: agentName - properties: - agentName: - description: Aries label of an agent to use to generate an invitation - nullable: false - type: string - invitationDomain: - description: "Invitation URL domain to use. If not specified, then connector\ - \ default domain will be used" - nullable: false - type: string - required: - - agentName - type: object - CreateNewConnectionInvitationV1Response: - description: Response for CreateNewConnectionInvitation endpoint. - example: - invitationUrl: invitationUrl - outOfBandId: outOfBandId - properties: - invitationUrl: - description: Invitation URL that can be used by another aries agent to connect - to us. - nullable: false - type: string - outOfBandId: - description: ID that can be used to track status of the connection - nullable: false - type: string - required: - - invitationUrl - - outOfBandId - type: object - AcceptInvitationV1Request: - description: Request for AcceptInvitation endpoint. - example: - invitationUrl: invitationUrl - agentName: agentName - properties: - agentName: - description: Aries label of an agent to be used to connect using URL - nullable: false - type: string - invitationUrl: - description: Invitation URL generated by another aries agent. - nullable: false - type: string - required: - - agentName - - invitationUrl - type: object - AcceptInvitationV1Response: - description: Response for AcceptInvitation endpoint. - example: - outOfBandId: outOfBandId - properties: - outOfBandId: - description: ID that can be used to track status of the connection - nullable: false - type: string - required: - - outOfBandId - type: object - RequestProofV1Request: - description: Request for RequestProof endpoint. - example: - agentName: agentName - connectionId: connectionId - proofAttributes: - - name: name - isValueEqual: "" - isCredentialDefinitionIdEqual: "" - - name: name - isValueEqual: "" - isCredentialDefinitionIdEqual: "" - properties: - agentName: - description: Aries label of an agent to be used to connect using URL - nullable: false - type: string - connectionId: - description: Peer connection ID from which we want to request a proof. - nullable: false - type: string - proofAttributes: - items: - $ref: '#/components/schemas/CactiProofRequestAttributeV1' - nullable: false - type: array - required: - - agentName - - connectionId - - proofAttributes - type: object - ErrorExceptionV1Response: - description: Error response from the connector. - properties: - message: - description: Short error description message. - nullable: false - type: string - error: - description: Detailed error information. - nullable: false - type: string - required: - - error - - message - type: object - AriesAgentSummaryV1_walletConfig: - example: - id: id - type: type - nullable: false - properties: - id: - description: Wallet entry ID - nullable: false - type: string - type: - description: Wallet storage type - nullable: false - type: string - required: - - id - - type - type: object diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 70e73465d3..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,590 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiAcceptInvitationV1Request struct { - ctx context.Context - ApiService *DefaultApiService - acceptInvitationV1Request *AcceptInvitationV1Request -} - -func (r ApiAcceptInvitationV1Request) AcceptInvitationV1Request(acceptInvitationV1Request AcceptInvitationV1Request) ApiAcceptInvitationV1Request { - r.acceptInvitationV1Request = &acceptInvitationV1Request - return r -} - -func (r ApiAcceptInvitationV1Request) Execute() (*AcceptInvitationV1Response, *http.Response, error) { - return r.ApiService.AcceptInvitationV1Execute(r) -} - -/* -AcceptInvitationV1 Connect to another agent using it's invitation URL - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAcceptInvitationV1Request -*/ -func (a *DefaultApiService) AcceptInvitationV1(ctx context.Context) ApiAcceptInvitationV1Request { - return ApiAcceptInvitationV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return AcceptInvitationV1Response -func (a *DefaultApiService) AcceptInvitationV1Execute(r ApiAcceptInvitationV1Request) (*AcceptInvitationV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AcceptInvitationV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AcceptInvitationV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.acceptInvitationV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionV1Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateNewConnectionInvitationV1Request struct { - ctx context.Context - ApiService *DefaultApiService - createNewConnectionInvitationV1Request *CreateNewConnectionInvitationV1Request -} - -func (r ApiCreateNewConnectionInvitationV1Request) CreateNewConnectionInvitationV1Request(createNewConnectionInvitationV1Request CreateNewConnectionInvitationV1Request) ApiCreateNewConnectionInvitationV1Request { - r.createNewConnectionInvitationV1Request = &createNewConnectionInvitationV1Request - return r -} - -func (r ApiCreateNewConnectionInvitationV1Request) Execute() (*CreateNewConnectionInvitationV1Response, *http.Response, error) { - return r.ApiService.CreateNewConnectionInvitationV1Execute(r) -} - -/* -CreateNewConnectionInvitationV1 Create new aries agent invitation that other agents can use to connect. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateNewConnectionInvitationV1Request -*/ -func (a *DefaultApiService) CreateNewConnectionInvitationV1(ctx context.Context) ApiCreateNewConnectionInvitationV1Request { - return ApiCreateNewConnectionInvitationV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return CreateNewConnectionInvitationV1Response -func (a *DefaultApiService) CreateNewConnectionInvitationV1Execute(r ApiCreateNewConnectionInvitationV1Request) (*CreateNewConnectionInvitationV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateNewConnectionInvitationV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateNewConnectionInvitationV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.createNewConnectionInvitationV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionV1Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetAgentsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetAgentsV1Request) Execute() ([]AriesAgentSummaryV1, *http.Response, error) { - return r.ApiService.GetAgentsV1Execute(r) -} - -/* -GetAgentsV1 Get all Aries agents configured in this connector plugin. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetAgentsV1Request -*/ -func (a *DefaultApiService) GetAgentsV1(ctx context.Context) ApiGetAgentsV1Request { - return ApiGetAgentsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []AriesAgentSummaryV1 -func (a *DefaultApiService) GetAgentsV1Execute(r ApiGetAgentsV1Request) ([]AriesAgentSummaryV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []AriesAgentSummaryV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAgentsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionV1Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetConnectionsV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getConnectionsV1Request *GetConnectionsV1Request -} - -func (r ApiGetConnectionsV1Request) GetConnectionsV1Request(getConnectionsV1Request GetConnectionsV1Request) ApiGetConnectionsV1Request { - r.getConnectionsV1Request = &getConnectionsV1Request - return r -} - -func (r ApiGetConnectionsV1Request) Execute() ([]AgentConnectionRecordV1, *http.Response, error) { - return r.ApiService.GetConnectionsV1Execute(r) -} - -/* -GetConnectionsV1 Get all connections of given aries agent. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetConnectionsV1Request -*/ -func (a *DefaultApiService) GetConnectionsV1(ctx context.Context) ApiGetConnectionsV1Request { - return ApiGetConnectionsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []AgentConnectionRecordV1 -func (a *DefaultApiService) GetConnectionsV1Execute(r ApiGetConnectionsV1Request) ([]AgentConnectionRecordV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []AgentConnectionRecordV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetConnectionsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getConnectionsV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionV1Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRequestProofV1Request struct { - ctx context.Context - ApiService *DefaultApiService - requestProofV1Request *RequestProofV1Request -} - -func (r ApiRequestProofV1Request) RequestProofV1Request(requestProofV1Request RequestProofV1Request) ApiRequestProofV1Request { - r.requestProofV1Request = &requestProofV1Request - return r -} - -func (r ApiRequestProofV1Request) Execute() (*AriesProofExchangeRecordV1, *http.Response, error) { - return r.ApiService.RequestProofV1Execute(r) -} - -/* -RequestProofV1 Request proof matching provided requriements from connected peer agent. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRequestProofV1Request -*/ -func (a *DefaultApiService) RequestProofV1(ctx context.Context) ApiRequestProofV1Request { - return ApiRequestProofV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return AriesProofExchangeRecordV1 -func (a *DefaultApiService) RequestProofV1Execute(r ApiRequestProofV1Request) (*AriesProofExchangeRecordV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AriesProofExchangeRecordV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RequestProofV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestProofV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionV1Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index c23e2b614a..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cacti Plugin - Connector Aries API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 1bcb0b6de8..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 83df8fee32..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_accept_invitation_v1_request.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_accept_invitation_v1_request.go deleted file mode 100644 index 351a062253..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_accept_invitation_v1_request.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the AcceptInvitationV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AcceptInvitationV1Request{} - -// AcceptInvitationV1Request Request for AcceptInvitation endpoint. -type AcceptInvitationV1Request struct { - // Aries label of an agent to be used to connect using URL - AgentName string `json:"agentName"` - // Invitation URL generated by another aries agent. - InvitationUrl string `json:"invitationUrl"` -} - -// NewAcceptInvitationV1Request instantiates a new AcceptInvitationV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAcceptInvitationV1Request(agentName string, invitationUrl string) *AcceptInvitationV1Request { - this := AcceptInvitationV1Request{} - this.AgentName = agentName - this.InvitationUrl = invitationUrl - return &this -} - -// NewAcceptInvitationV1RequestWithDefaults instantiates a new AcceptInvitationV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAcceptInvitationV1RequestWithDefaults() *AcceptInvitationV1Request { - this := AcceptInvitationV1Request{} - return &this -} - -// GetAgentName returns the AgentName field value -func (o *AcceptInvitationV1Request) GetAgentName() string { - if o == nil { - var ret string - return ret - } - - return o.AgentName -} - -// GetAgentNameOk returns a tuple with the AgentName field value -// and a boolean to check if the value has been set. -func (o *AcceptInvitationV1Request) GetAgentNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AgentName, true -} - -// SetAgentName sets field value -func (o *AcceptInvitationV1Request) SetAgentName(v string) { - o.AgentName = v -} - -// GetInvitationUrl returns the InvitationUrl field value -func (o *AcceptInvitationV1Request) GetInvitationUrl() string { - if o == nil { - var ret string - return ret - } - - return o.InvitationUrl -} - -// GetInvitationUrlOk returns a tuple with the InvitationUrl field value -// and a boolean to check if the value has been set. -func (o *AcceptInvitationV1Request) GetInvitationUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.InvitationUrl, true -} - -// SetInvitationUrl sets field value -func (o *AcceptInvitationV1Request) SetInvitationUrl(v string) { - o.InvitationUrl = v -} - -func (o AcceptInvitationV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AcceptInvitationV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["agentName"] = o.AgentName - toSerialize["invitationUrl"] = o.InvitationUrl - return toSerialize, nil -} - -type NullableAcceptInvitationV1Request struct { - value *AcceptInvitationV1Request - isSet bool -} - -func (v NullableAcceptInvitationV1Request) Get() *AcceptInvitationV1Request { - return v.value -} - -func (v *NullableAcceptInvitationV1Request) Set(val *AcceptInvitationV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableAcceptInvitationV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableAcceptInvitationV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAcceptInvitationV1Request(val *AcceptInvitationV1Request) *NullableAcceptInvitationV1Request { - return &NullableAcceptInvitationV1Request{value: val, isSet: true} -} - -func (v NullableAcceptInvitationV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAcceptInvitationV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_accept_invitation_v1_response.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_accept_invitation_v1_response.go deleted file mode 100644 index ef82d022e5..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_accept_invitation_v1_response.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the AcceptInvitationV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AcceptInvitationV1Response{} - -// AcceptInvitationV1Response Response for AcceptInvitation endpoint. -type AcceptInvitationV1Response struct { - // ID that can be used to track status of the connection - OutOfBandId string `json:"outOfBandId"` -} - -// NewAcceptInvitationV1Response instantiates a new AcceptInvitationV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAcceptInvitationV1Response(outOfBandId string) *AcceptInvitationV1Response { - this := AcceptInvitationV1Response{} - this.OutOfBandId = outOfBandId - return &this -} - -// NewAcceptInvitationV1ResponseWithDefaults instantiates a new AcceptInvitationV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAcceptInvitationV1ResponseWithDefaults() *AcceptInvitationV1Response { - this := AcceptInvitationV1Response{} - return &this -} - -// GetOutOfBandId returns the OutOfBandId field value -func (o *AcceptInvitationV1Response) GetOutOfBandId() string { - if o == nil { - var ret string - return ret - } - - return o.OutOfBandId -} - -// GetOutOfBandIdOk returns a tuple with the OutOfBandId field value -// and a boolean to check if the value has been set. -func (o *AcceptInvitationV1Response) GetOutOfBandIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OutOfBandId, true -} - -// SetOutOfBandId sets field value -func (o *AcceptInvitationV1Response) SetOutOfBandId(v string) { - o.OutOfBandId = v -} - -func (o AcceptInvitationV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AcceptInvitationV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["outOfBandId"] = o.OutOfBandId - return toSerialize, nil -} - -type NullableAcceptInvitationV1Response struct { - value *AcceptInvitationV1Response - isSet bool -} - -func (v NullableAcceptInvitationV1Response) Get() *AcceptInvitationV1Response { - return v.value -} - -func (v *NullableAcceptInvitationV1Response) Set(val *AcceptInvitationV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableAcceptInvitationV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableAcceptInvitationV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAcceptInvitationV1Response(val *AcceptInvitationV1Response) *NullableAcceptInvitationV1Response { - return &NullableAcceptInvitationV1Response{value: val, isSet: true} -} - -func (v NullableAcceptInvitationV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAcceptInvitationV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_agent_connection_record_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_agent_connection_record_v1.go deleted file mode 100644 index 8587cee739..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_agent_connection_record_v1.go +++ /dev/null @@ -1,494 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the AgentConnectionRecordV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AgentConnectionRecordV1{} - -// AgentConnectionRecordV1 Aries agent connection information. -type AgentConnectionRecordV1 struct { - State string `json:"state"` - Role string `json:"role"` - IsReady bool `json:"isReady"` - Did *string `json:"did,omitempty"` - TheirDid *string `json:"theirDid,omitempty"` - TheirLabel *string `json:"theirLabel,omitempty"` - Alias *string `json:"alias,omitempty"` - ThreadId *string `json:"threadId,omitempty"` - ErrorMessage *string `json:"errorMessage,omitempty"` - OutOfBandId *string `json:"outOfBandId,omitempty"` - InvitationDid *string `json:"invitationDid,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _AgentConnectionRecordV1 AgentConnectionRecordV1 - -// NewAgentConnectionRecordV1 instantiates a new AgentConnectionRecordV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAgentConnectionRecordV1(state string, role string, isReady bool) *AgentConnectionRecordV1 { - this := AgentConnectionRecordV1{} - this.State = state - this.Role = role - this.IsReady = isReady - return &this -} - -// NewAgentConnectionRecordV1WithDefaults instantiates a new AgentConnectionRecordV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAgentConnectionRecordV1WithDefaults() *AgentConnectionRecordV1 { - this := AgentConnectionRecordV1{} - return &this -} - -// GetState returns the State field value -func (o *AgentConnectionRecordV1) GetState() string { - if o == nil { - var ret string - return ret - } - - return o.State -} - -// GetStateOk returns a tuple with the State field value -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.State, true -} - -// SetState sets field value -func (o *AgentConnectionRecordV1) SetState(v string) { - o.State = v -} - -// GetRole returns the Role field value -func (o *AgentConnectionRecordV1) GetRole() string { - if o == nil { - var ret string - return ret - } - - return o.Role -} - -// GetRoleOk returns a tuple with the Role field value -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Role, true -} - -// SetRole sets field value -func (o *AgentConnectionRecordV1) SetRole(v string) { - o.Role = v -} - -// GetIsReady returns the IsReady field value -func (o *AgentConnectionRecordV1) GetIsReady() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsReady -} - -// GetIsReadyOk returns a tuple with the IsReady field value -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetIsReadyOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsReady, true -} - -// SetIsReady sets field value -func (o *AgentConnectionRecordV1) SetIsReady(v bool) { - o.IsReady = v -} - -// GetDid returns the Did field value if set, zero value otherwise. -func (o *AgentConnectionRecordV1) GetDid() string { - if o == nil || IsNil(o.Did) { - var ret string - return ret - } - return *o.Did -} - -// GetDidOk returns a tuple with the Did field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetDidOk() (*string, bool) { - if o == nil || IsNil(o.Did) { - return nil, false - } - return o.Did, true -} - -// HasDid returns a boolean if a field has been set. -func (o *AgentConnectionRecordV1) HasDid() bool { - if o != nil && !IsNil(o.Did) { - return true - } - - return false -} - -// SetDid gets a reference to the given string and assigns it to the Did field. -func (o *AgentConnectionRecordV1) SetDid(v string) { - o.Did = &v -} - -// GetTheirDid returns the TheirDid field value if set, zero value otherwise. -func (o *AgentConnectionRecordV1) GetTheirDid() string { - if o == nil || IsNil(o.TheirDid) { - var ret string - return ret - } - return *o.TheirDid -} - -// GetTheirDidOk returns a tuple with the TheirDid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetTheirDidOk() (*string, bool) { - if o == nil || IsNil(o.TheirDid) { - return nil, false - } - return o.TheirDid, true -} - -// HasTheirDid returns a boolean if a field has been set. -func (o *AgentConnectionRecordV1) HasTheirDid() bool { - if o != nil && !IsNil(o.TheirDid) { - return true - } - - return false -} - -// SetTheirDid gets a reference to the given string and assigns it to the TheirDid field. -func (o *AgentConnectionRecordV1) SetTheirDid(v string) { - o.TheirDid = &v -} - -// GetTheirLabel returns the TheirLabel field value if set, zero value otherwise. -func (o *AgentConnectionRecordV1) GetTheirLabel() string { - if o == nil || IsNil(o.TheirLabel) { - var ret string - return ret - } - return *o.TheirLabel -} - -// GetTheirLabelOk returns a tuple with the TheirLabel field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetTheirLabelOk() (*string, bool) { - if o == nil || IsNil(o.TheirLabel) { - return nil, false - } - return o.TheirLabel, true -} - -// HasTheirLabel returns a boolean if a field has been set. -func (o *AgentConnectionRecordV1) HasTheirLabel() bool { - if o != nil && !IsNil(o.TheirLabel) { - return true - } - - return false -} - -// SetTheirLabel gets a reference to the given string and assigns it to the TheirLabel field. -func (o *AgentConnectionRecordV1) SetTheirLabel(v string) { - o.TheirLabel = &v -} - -// GetAlias returns the Alias field value if set, zero value otherwise. -func (o *AgentConnectionRecordV1) GetAlias() string { - if o == nil || IsNil(o.Alias) { - var ret string - return ret - } - return *o.Alias -} - -// GetAliasOk returns a tuple with the Alias field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetAliasOk() (*string, bool) { - if o == nil || IsNil(o.Alias) { - return nil, false - } - return o.Alias, true -} - -// HasAlias returns a boolean if a field has been set. -func (o *AgentConnectionRecordV1) HasAlias() bool { - if o != nil && !IsNil(o.Alias) { - return true - } - - return false -} - -// SetAlias gets a reference to the given string and assigns it to the Alias field. -func (o *AgentConnectionRecordV1) SetAlias(v string) { - o.Alias = &v -} - -// GetThreadId returns the ThreadId field value if set, zero value otherwise. -func (o *AgentConnectionRecordV1) GetThreadId() string { - if o == nil || IsNil(o.ThreadId) { - var ret string - return ret - } - return *o.ThreadId -} - -// GetThreadIdOk returns a tuple with the ThreadId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetThreadIdOk() (*string, bool) { - if o == nil || IsNil(o.ThreadId) { - return nil, false - } - return o.ThreadId, true -} - -// HasThreadId returns a boolean if a field has been set. -func (o *AgentConnectionRecordV1) HasThreadId() bool { - if o != nil && !IsNil(o.ThreadId) { - return true - } - - return false -} - -// SetThreadId gets a reference to the given string and assigns it to the ThreadId field. -func (o *AgentConnectionRecordV1) SetThreadId(v string) { - o.ThreadId = &v -} - -// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise. -func (o *AgentConnectionRecordV1) GetErrorMessage() string { - if o == nil || IsNil(o.ErrorMessage) { - var ret string - return ret - } - return *o.ErrorMessage -} - -// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetErrorMessageOk() (*string, bool) { - if o == nil || IsNil(o.ErrorMessage) { - return nil, false - } - return o.ErrorMessage, true -} - -// HasErrorMessage returns a boolean if a field has been set. -func (o *AgentConnectionRecordV1) HasErrorMessage() bool { - if o != nil && !IsNil(o.ErrorMessage) { - return true - } - - return false -} - -// SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field. -func (o *AgentConnectionRecordV1) SetErrorMessage(v string) { - o.ErrorMessage = &v -} - -// GetOutOfBandId returns the OutOfBandId field value if set, zero value otherwise. -func (o *AgentConnectionRecordV1) GetOutOfBandId() string { - if o == nil || IsNil(o.OutOfBandId) { - var ret string - return ret - } - return *o.OutOfBandId -} - -// GetOutOfBandIdOk returns a tuple with the OutOfBandId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetOutOfBandIdOk() (*string, bool) { - if o == nil || IsNil(o.OutOfBandId) { - return nil, false - } - return o.OutOfBandId, true -} - -// HasOutOfBandId returns a boolean if a field has been set. -func (o *AgentConnectionRecordV1) HasOutOfBandId() bool { - if o != nil && !IsNil(o.OutOfBandId) { - return true - } - - return false -} - -// SetOutOfBandId gets a reference to the given string and assigns it to the OutOfBandId field. -func (o *AgentConnectionRecordV1) SetOutOfBandId(v string) { - o.OutOfBandId = &v -} - -// GetInvitationDid returns the InvitationDid field value if set, zero value otherwise. -func (o *AgentConnectionRecordV1) GetInvitationDid() string { - if o == nil || IsNil(o.InvitationDid) { - var ret string - return ret - } - return *o.InvitationDid -} - -// GetInvitationDidOk returns a tuple with the InvitationDid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionRecordV1) GetInvitationDidOk() (*string, bool) { - if o == nil || IsNil(o.InvitationDid) { - return nil, false - } - return o.InvitationDid, true -} - -// HasInvitationDid returns a boolean if a field has been set. -func (o *AgentConnectionRecordV1) HasInvitationDid() bool { - if o != nil && !IsNil(o.InvitationDid) { - return true - } - - return false -} - -// SetInvitationDid gets a reference to the given string and assigns it to the InvitationDid field. -func (o *AgentConnectionRecordV1) SetInvitationDid(v string) { - o.InvitationDid = &v -} - -func (o AgentConnectionRecordV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AgentConnectionRecordV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["state"] = o.State - toSerialize["role"] = o.Role - toSerialize["isReady"] = o.IsReady - if !IsNil(o.Did) { - toSerialize["did"] = o.Did - } - if !IsNil(o.TheirDid) { - toSerialize["theirDid"] = o.TheirDid - } - if !IsNil(o.TheirLabel) { - toSerialize["theirLabel"] = o.TheirLabel - } - if !IsNil(o.Alias) { - toSerialize["alias"] = o.Alias - } - if !IsNil(o.ThreadId) { - toSerialize["threadId"] = o.ThreadId - } - if !IsNil(o.ErrorMessage) { - toSerialize["errorMessage"] = o.ErrorMessage - } - if !IsNil(o.OutOfBandId) { - toSerialize["outOfBandId"] = o.OutOfBandId - } - if !IsNil(o.InvitationDid) { - toSerialize["invitationDid"] = o.InvitationDid - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AgentConnectionRecordV1) UnmarshalJSON(bytes []byte) (err error) { - varAgentConnectionRecordV1 := _AgentConnectionRecordV1{} - - if err = json.Unmarshal(bytes, &varAgentConnectionRecordV1); err == nil { - *o = AgentConnectionRecordV1(varAgentConnectionRecordV1) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "state") - delete(additionalProperties, "role") - delete(additionalProperties, "isReady") - delete(additionalProperties, "did") - delete(additionalProperties, "theirDid") - delete(additionalProperties, "theirLabel") - delete(additionalProperties, "alias") - delete(additionalProperties, "threadId") - delete(additionalProperties, "errorMessage") - delete(additionalProperties, "outOfBandId") - delete(additionalProperties, "invitationDid") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAgentConnectionRecordV1 struct { - value *AgentConnectionRecordV1 - isSet bool -} - -func (v NullableAgentConnectionRecordV1) Get() *AgentConnectionRecordV1 { - return v.value -} - -func (v *NullableAgentConnectionRecordV1) Set(val *AgentConnectionRecordV1) { - v.value = val - v.isSet = true -} - -func (v NullableAgentConnectionRecordV1) IsSet() bool { - return v.isSet -} - -func (v *NullableAgentConnectionRecordV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAgentConnectionRecordV1(val *AgentConnectionRecordV1) *NullableAgentConnectionRecordV1 { - return &NullableAgentConnectionRecordV1{value: val, isSet: true} -} - -func (v NullableAgentConnectionRecordV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAgentConnectionRecordV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_agent_connections_filter_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_agent_connections_filter_v1.go deleted file mode 100644 index 7d89b9f48d..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_agent_connections_filter_v1.go +++ /dev/null @@ -1,342 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the AgentConnectionsFilterV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AgentConnectionsFilterV1{} - -// AgentConnectionsFilterV1 Fields that can be used to filter agent connection list. -type AgentConnectionsFilterV1 struct { - Did *string `json:"did,omitempty"` - InvitationDid *string `json:"invitationDid,omitempty"` - OutOfBandId *string `json:"outOfBandId,omitempty"` - Role *string `json:"role,omitempty"` - State *string `json:"state,omitempty"` - TheirDid *string `json:"theirDid,omitempty"` - ThreadId *string `json:"threadId,omitempty"` -} - -// NewAgentConnectionsFilterV1 instantiates a new AgentConnectionsFilterV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAgentConnectionsFilterV1() *AgentConnectionsFilterV1 { - this := AgentConnectionsFilterV1{} - return &this -} - -// NewAgentConnectionsFilterV1WithDefaults instantiates a new AgentConnectionsFilterV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAgentConnectionsFilterV1WithDefaults() *AgentConnectionsFilterV1 { - this := AgentConnectionsFilterV1{} - return &this -} - -// GetDid returns the Did field value if set, zero value otherwise. -func (o *AgentConnectionsFilterV1) GetDid() string { - if o == nil || IsNil(o.Did) { - var ret string - return ret - } - return *o.Did -} - -// GetDidOk returns a tuple with the Did field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionsFilterV1) GetDidOk() (*string, bool) { - if o == nil || IsNil(o.Did) { - return nil, false - } - return o.Did, true -} - -// HasDid returns a boolean if a field has been set. -func (o *AgentConnectionsFilterV1) HasDid() bool { - if o != nil && !IsNil(o.Did) { - return true - } - - return false -} - -// SetDid gets a reference to the given string and assigns it to the Did field. -func (o *AgentConnectionsFilterV1) SetDid(v string) { - o.Did = &v -} - -// GetInvitationDid returns the InvitationDid field value if set, zero value otherwise. -func (o *AgentConnectionsFilterV1) GetInvitationDid() string { - if o == nil || IsNil(o.InvitationDid) { - var ret string - return ret - } - return *o.InvitationDid -} - -// GetInvitationDidOk returns a tuple with the InvitationDid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionsFilterV1) GetInvitationDidOk() (*string, bool) { - if o == nil || IsNil(o.InvitationDid) { - return nil, false - } - return o.InvitationDid, true -} - -// HasInvitationDid returns a boolean if a field has been set. -func (o *AgentConnectionsFilterV1) HasInvitationDid() bool { - if o != nil && !IsNil(o.InvitationDid) { - return true - } - - return false -} - -// SetInvitationDid gets a reference to the given string and assigns it to the InvitationDid field. -func (o *AgentConnectionsFilterV1) SetInvitationDid(v string) { - o.InvitationDid = &v -} - -// GetOutOfBandId returns the OutOfBandId field value if set, zero value otherwise. -func (o *AgentConnectionsFilterV1) GetOutOfBandId() string { - if o == nil || IsNil(o.OutOfBandId) { - var ret string - return ret - } - return *o.OutOfBandId -} - -// GetOutOfBandIdOk returns a tuple with the OutOfBandId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionsFilterV1) GetOutOfBandIdOk() (*string, bool) { - if o == nil || IsNil(o.OutOfBandId) { - return nil, false - } - return o.OutOfBandId, true -} - -// HasOutOfBandId returns a boolean if a field has been set. -func (o *AgentConnectionsFilterV1) HasOutOfBandId() bool { - if o != nil && !IsNil(o.OutOfBandId) { - return true - } - - return false -} - -// SetOutOfBandId gets a reference to the given string and assigns it to the OutOfBandId field. -func (o *AgentConnectionsFilterV1) SetOutOfBandId(v string) { - o.OutOfBandId = &v -} - -// GetRole returns the Role field value if set, zero value otherwise. -func (o *AgentConnectionsFilterV1) GetRole() string { - if o == nil || IsNil(o.Role) { - var ret string - return ret - } - return *o.Role -} - -// GetRoleOk returns a tuple with the Role field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionsFilterV1) GetRoleOk() (*string, bool) { - if o == nil || IsNil(o.Role) { - return nil, false - } - return o.Role, true -} - -// HasRole returns a boolean if a field has been set. -func (o *AgentConnectionsFilterV1) HasRole() bool { - if o != nil && !IsNil(o.Role) { - return true - } - - return false -} - -// SetRole gets a reference to the given string and assigns it to the Role field. -func (o *AgentConnectionsFilterV1) SetRole(v string) { - o.Role = &v -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *AgentConnectionsFilterV1) GetState() string { - if o == nil || IsNil(o.State) { - var ret string - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionsFilterV1) GetStateOk() (*string, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *AgentConnectionsFilterV1) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given string and assigns it to the State field. -func (o *AgentConnectionsFilterV1) SetState(v string) { - o.State = &v -} - -// GetTheirDid returns the TheirDid field value if set, zero value otherwise. -func (o *AgentConnectionsFilterV1) GetTheirDid() string { - if o == nil || IsNil(o.TheirDid) { - var ret string - return ret - } - return *o.TheirDid -} - -// GetTheirDidOk returns a tuple with the TheirDid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionsFilterV1) GetTheirDidOk() (*string, bool) { - if o == nil || IsNil(o.TheirDid) { - return nil, false - } - return o.TheirDid, true -} - -// HasTheirDid returns a boolean if a field has been set. -func (o *AgentConnectionsFilterV1) HasTheirDid() bool { - if o != nil && !IsNil(o.TheirDid) { - return true - } - - return false -} - -// SetTheirDid gets a reference to the given string and assigns it to the TheirDid field. -func (o *AgentConnectionsFilterV1) SetTheirDid(v string) { - o.TheirDid = &v -} - -// GetThreadId returns the ThreadId field value if set, zero value otherwise. -func (o *AgentConnectionsFilterV1) GetThreadId() string { - if o == nil || IsNil(o.ThreadId) { - var ret string - return ret - } - return *o.ThreadId -} - -// GetThreadIdOk returns a tuple with the ThreadId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AgentConnectionsFilterV1) GetThreadIdOk() (*string, bool) { - if o == nil || IsNil(o.ThreadId) { - return nil, false - } - return o.ThreadId, true -} - -// HasThreadId returns a boolean if a field has been set. -func (o *AgentConnectionsFilterV1) HasThreadId() bool { - if o != nil && !IsNil(o.ThreadId) { - return true - } - - return false -} - -// SetThreadId gets a reference to the given string and assigns it to the ThreadId field. -func (o *AgentConnectionsFilterV1) SetThreadId(v string) { - o.ThreadId = &v -} - -func (o AgentConnectionsFilterV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AgentConnectionsFilterV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Did) { - toSerialize["did"] = o.Did - } - if !IsNil(o.InvitationDid) { - toSerialize["invitationDid"] = o.InvitationDid - } - if !IsNil(o.OutOfBandId) { - toSerialize["outOfBandId"] = o.OutOfBandId - } - if !IsNil(o.Role) { - toSerialize["role"] = o.Role - } - if !IsNil(o.State) { - toSerialize["state"] = o.State - } - if !IsNil(o.TheirDid) { - toSerialize["theirDid"] = o.TheirDid - } - if !IsNil(o.ThreadId) { - toSerialize["threadId"] = o.ThreadId - } - return toSerialize, nil -} - -type NullableAgentConnectionsFilterV1 struct { - value *AgentConnectionsFilterV1 - isSet bool -} - -func (v NullableAgentConnectionsFilterV1) Get() *AgentConnectionsFilterV1 { - return v.value -} - -func (v *NullableAgentConnectionsFilterV1) Set(val *AgentConnectionsFilterV1) { - v.value = val - v.isSet = true -} - -func (v NullableAgentConnectionsFilterV1) IsSet() bool { - return v.isSet -} - -func (v *NullableAgentConnectionsFilterV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAgentConnectionsFilterV1(val *AgentConnectionsFilterV1) *NullableAgentConnectionsFilterV1 { - return &NullableAgentConnectionsFilterV1{value: val, isSet: true} -} - -func (v NullableAgentConnectionsFilterV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAgentConnectionsFilterV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_agent_config_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_agent_config_v1.go deleted file mode 100644 index 5d8c3c65a0..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_agent_config_v1.go +++ /dev/null @@ -1,364 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the AriesAgentConfigV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AriesAgentConfigV1{} - -// AriesAgentConfigV1 Aries agent configuration to be setup and used by the connector. -type AriesAgentConfigV1 struct { - // Aries agent label that will also be used as wallet id. - Name string `json:"name"` - // Wallet private key - do not share with anyone. - WalletKey string `json:"walletKey"` - // Path to wallet sqlite database to use. If not provided, the connector default path and agent name will be used. - WalletPath *string `json:"walletPath,omitempty"` - IndyNetworks []AriesIndyVdrPoolConfigV1 `json:"indyNetworks"` - // Inbound endpoint URL for this agent. Must be unique for this connector. Must contain port. - InboundUrl *string `json:"inboundUrl,omitempty"` - // Flag to accept new connection by default - AutoAcceptConnections *bool `json:"autoAcceptConnections,omitempty"` - AutoAcceptCredentials *CactiAcceptPolicyV1 `json:"autoAcceptCredentials,omitempty"` - AutoAcceptProofs *CactiAcceptPolicyV1 `json:"autoAcceptProofs,omitempty"` -} - -// NewAriesAgentConfigV1 instantiates a new AriesAgentConfigV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAriesAgentConfigV1(name string, walletKey string, indyNetworks []AriesIndyVdrPoolConfigV1) *AriesAgentConfigV1 { - this := AriesAgentConfigV1{} - this.Name = name - this.WalletKey = walletKey - this.IndyNetworks = indyNetworks - var inboundUrl string = "undefined" - this.InboundUrl = &inboundUrl - var autoAcceptConnections bool = false - this.AutoAcceptConnections = &autoAcceptConnections - return &this -} - -// NewAriesAgentConfigV1WithDefaults instantiates a new AriesAgentConfigV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAriesAgentConfigV1WithDefaults() *AriesAgentConfigV1 { - this := AriesAgentConfigV1{} - var inboundUrl string = "undefined" - this.InboundUrl = &inboundUrl - var autoAcceptConnections bool = false - this.AutoAcceptConnections = &autoAcceptConnections - return &this -} - -// GetName returns the Name field value -func (o *AriesAgentConfigV1) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *AriesAgentConfigV1) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *AriesAgentConfigV1) SetName(v string) { - o.Name = v -} - -// GetWalletKey returns the WalletKey field value -func (o *AriesAgentConfigV1) GetWalletKey() string { - if o == nil { - var ret string - return ret - } - - return o.WalletKey -} - -// GetWalletKeyOk returns a tuple with the WalletKey field value -// and a boolean to check if the value has been set. -func (o *AriesAgentConfigV1) GetWalletKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.WalletKey, true -} - -// SetWalletKey sets field value -func (o *AriesAgentConfigV1) SetWalletKey(v string) { - o.WalletKey = v -} - -// GetWalletPath returns the WalletPath field value if set, zero value otherwise. -func (o *AriesAgentConfigV1) GetWalletPath() string { - if o == nil || IsNil(o.WalletPath) { - var ret string - return ret - } - return *o.WalletPath -} - -// GetWalletPathOk returns a tuple with the WalletPath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AriesAgentConfigV1) GetWalletPathOk() (*string, bool) { - if o == nil || IsNil(o.WalletPath) { - return nil, false - } - return o.WalletPath, true -} - -// HasWalletPath returns a boolean if a field has been set. -func (o *AriesAgentConfigV1) HasWalletPath() bool { - if o != nil && !IsNil(o.WalletPath) { - return true - } - - return false -} - -// SetWalletPath gets a reference to the given string and assigns it to the WalletPath field. -func (o *AriesAgentConfigV1) SetWalletPath(v string) { - o.WalletPath = &v -} - -// GetIndyNetworks returns the IndyNetworks field value -func (o *AriesAgentConfigV1) GetIndyNetworks() []AriesIndyVdrPoolConfigV1 { - if o == nil { - var ret []AriesIndyVdrPoolConfigV1 - return ret - } - - return o.IndyNetworks -} - -// GetIndyNetworksOk returns a tuple with the IndyNetworks field value -// and a boolean to check if the value has been set. -func (o *AriesAgentConfigV1) GetIndyNetworksOk() ([]AriesIndyVdrPoolConfigV1, bool) { - if o == nil { - return nil, false - } - return o.IndyNetworks, true -} - -// SetIndyNetworks sets field value -func (o *AriesAgentConfigV1) SetIndyNetworks(v []AriesIndyVdrPoolConfigV1) { - o.IndyNetworks = v -} - -// GetInboundUrl returns the InboundUrl field value if set, zero value otherwise. -func (o *AriesAgentConfigV1) GetInboundUrl() string { - if o == nil || IsNil(o.InboundUrl) { - var ret string - return ret - } - return *o.InboundUrl -} - -// GetInboundUrlOk returns a tuple with the InboundUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AriesAgentConfigV1) GetInboundUrlOk() (*string, bool) { - if o == nil || IsNil(o.InboundUrl) { - return nil, false - } - return o.InboundUrl, true -} - -// HasInboundUrl returns a boolean if a field has been set. -func (o *AriesAgentConfigV1) HasInboundUrl() bool { - if o != nil && !IsNil(o.InboundUrl) { - return true - } - - return false -} - -// SetInboundUrl gets a reference to the given string and assigns it to the InboundUrl field. -func (o *AriesAgentConfigV1) SetInboundUrl(v string) { - o.InboundUrl = &v -} - -// GetAutoAcceptConnections returns the AutoAcceptConnections field value if set, zero value otherwise. -func (o *AriesAgentConfigV1) GetAutoAcceptConnections() bool { - if o == nil || IsNil(o.AutoAcceptConnections) { - var ret bool - return ret - } - return *o.AutoAcceptConnections -} - -// GetAutoAcceptConnectionsOk returns a tuple with the AutoAcceptConnections field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AriesAgentConfigV1) GetAutoAcceptConnectionsOk() (*bool, bool) { - if o == nil || IsNil(o.AutoAcceptConnections) { - return nil, false - } - return o.AutoAcceptConnections, true -} - -// HasAutoAcceptConnections returns a boolean if a field has been set. -func (o *AriesAgentConfigV1) HasAutoAcceptConnections() bool { - if o != nil && !IsNil(o.AutoAcceptConnections) { - return true - } - - return false -} - -// SetAutoAcceptConnections gets a reference to the given bool and assigns it to the AutoAcceptConnections field. -func (o *AriesAgentConfigV1) SetAutoAcceptConnections(v bool) { - o.AutoAcceptConnections = &v -} - -// GetAutoAcceptCredentials returns the AutoAcceptCredentials field value if set, zero value otherwise. -func (o *AriesAgentConfigV1) GetAutoAcceptCredentials() CactiAcceptPolicyV1 { - if o == nil || IsNil(o.AutoAcceptCredentials) { - var ret CactiAcceptPolicyV1 - return ret - } - return *o.AutoAcceptCredentials -} - -// GetAutoAcceptCredentialsOk returns a tuple with the AutoAcceptCredentials field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AriesAgentConfigV1) GetAutoAcceptCredentialsOk() (*CactiAcceptPolicyV1, bool) { - if o == nil || IsNil(o.AutoAcceptCredentials) { - return nil, false - } - return o.AutoAcceptCredentials, true -} - -// HasAutoAcceptCredentials returns a boolean if a field has been set. -func (o *AriesAgentConfigV1) HasAutoAcceptCredentials() bool { - if o != nil && !IsNil(o.AutoAcceptCredentials) { - return true - } - - return false -} - -// SetAutoAcceptCredentials gets a reference to the given CactiAcceptPolicyV1 and assigns it to the AutoAcceptCredentials field. -func (o *AriesAgentConfigV1) SetAutoAcceptCredentials(v CactiAcceptPolicyV1) { - o.AutoAcceptCredentials = &v -} - -// GetAutoAcceptProofs returns the AutoAcceptProofs field value if set, zero value otherwise. -func (o *AriesAgentConfigV1) GetAutoAcceptProofs() CactiAcceptPolicyV1 { - if o == nil || IsNil(o.AutoAcceptProofs) { - var ret CactiAcceptPolicyV1 - return ret - } - return *o.AutoAcceptProofs -} - -// GetAutoAcceptProofsOk returns a tuple with the AutoAcceptProofs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AriesAgentConfigV1) GetAutoAcceptProofsOk() (*CactiAcceptPolicyV1, bool) { - if o == nil || IsNil(o.AutoAcceptProofs) { - return nil, false - } - return o.AutoAcceptProofs, true -} - -// HasAutoAcceptProofs returns a boolean if a field has been set. -func (o *AriesAgentConfigV1) HasAutoAcceptProofs() bool { - if o != nil && !IsNil(o.AutoAcceptProofs) { - return true - } - - return false -} - -// SetAutoAcceptProofs gets a reference to the given CactiAcceptPolicyV1 and assigns it to the AutoAcceptProofs field. -func (o *AriesAgentConfigV1) SetAutoAcceptProofs(v CactiAcceptPolicyV1) { - o.AutoAcceptProofs = &v -} - -func (o AriesAgentConfigV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AriesAgentConfigV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["walletKey"] = o.WalletKey - if !IsNil(o.WalletPath) { - toSerialize["walletPath"] = o.WalletPath - } - toSerialize["indyNetworks"] = o.IndyNetworks - if !IsNil(o.InboundUrl) { - toSerialize["inboundUrl"] = o.InboundUrl - } - if !IsNil(o.AutoAcceptConnections) { - toSerialize["autoAcceptConnections"] = o.AutoAcceptConnections - } - if !IsNil(o.AutoAcceptCredentials) { - toSerialize["autoAcceptCredentials"] = o.AutoAcceptCredentials - } - if !IsNil(o.AutoAcceptProofs) { - toSerialize["autoAcceptProofs"] = o.AutoAcceptProofs - } - return toSerialize, nil -} - -type NullableAriesAgentConfigV1 struct { - value *AriesAgentConfigV1 - isSet bool -} - -func (v NullableAriesAgentConfigV1) Get() *AriesAgentConfigV1 { - return v.value -} - -func (v *NullableAriesAgentConfigV1) Set(val *AriesAgentConfigV1) { - v.value = val - v.isSet = true -} - -func (v NullableAriesAgentConfigV1) IsSet() bool { - return v.isSet -} - -func (v *NullableAriesAgentConfigV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAriesAgentConfigV1(val *AriesAgentConfigV1) *NullableAriesAgentConfigV1 { - return &NullableAriesAgentConfigV1{value: val, isSet: true} -} - -func (v NullableAriesAgentConfigV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAriesAgentConfigV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_agent_summary_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_agent_summary_v1.go deleted file mode 100644 index ca57f03aa6..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_agent_summary_v1.go +++ /dev/null @@ -1,257 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the AriesAgentSummaryV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AriesAgentSummaryV1{} - -// AriesAgentSummaryV1 Summary of an Aries Agent configured in the connector. -type AriesAgentSummaryV1 struct { - // Aries label of an agent - Name string `json:"name"` - // True when Aries agent has been initialized properly. - IsAgentInitialized bool `json:"isAgentInitialized"` - // True when this agents wallet has been initialized properly. - IsWalletInitialized bool `json:"isWalletInitialized"` - // True when this agents wallet has been provisioned properly. - IsWalletProvisioned bool `json:"isWalletProvisioned"` - WalletConfig AriesAgentSummaryV1WalletConfig `json:"walletConfig"` - // Aries agent endpoints configured - Endpoints []string `json:"endpoints"` -} - -// NewAriesAgentSummaryV1 instantiates a new AriesAgentSummaryV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAriesAgentSummaryV1(name string, isAgentInitialized bool, isWalletInitialized bool, isWalletProvisioned bool, walletConfig AriesAgentSummaryV1WalletConfig, endpoints []string) *AriesAgentSummaryV1 { - this := AriesAgentSummaryV1{} - this.Name = name - this.IsAgentInitialized = isAgentInitialized - this.IsWalletInitialized = isWalletInitialized - this.IsWalletProvisioned = isWalletProvisioned - this.WalletConfig = walletConfig - this.Endpoints = endpoints - return &this -} - -// NewAriesAgentSummaryV1WithDefaults instantiates a new AriesAgentSummaryV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAriesAgentSummaryV1WithDefaults() *AriesAgentSummaryV1 { - this := AriesAgentSummaryV1{} - return &this -} - -// GetName returns the Name field value -func (o *AriesAgentSummaryV1) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *AriesAgentSummaryV1) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *AriesAgentSummaryV1) SetName(v string) { - o.Name = v -} - -// GetIsAgentInitialized returns the IsAgentInitialized field value -func (o *AriesAgentSummaryV1) GetIsAgentInitialized() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsAgentInitialized -} - -// GetIsAgentInitializedOk returns a tuple with the IsAgentInitialized field value -// and a boolean to check if the value has been set. -func (o *AriesAgentSummaryV1) GetIsAgentInitializedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsAgentInitialized, true -} - -// SetIsAgentInitialized sets field value -func (o *AriesAgentSummaryV1) SetIsAgentInitialized(v bool) { - o.IsAgentInitialized = v -} - -// GetIsWalletInitialized returns the IsWalletInitialized field value -func (o *AriesAgentSummaryV1) GetIsWalletInitialized() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsWalletInitialized -} - -// GetIsWalletInitializedOk returns a tuple with the IsWalletInitialized field value -// and a boolean to check if the value has been set. -func (o *AriesAgentSummaryV1) GetIsWalletInitializedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsWalletInitialized, true -} - -// SetIsWalletInitialized sets field value -func (o *AriesAgentSummaryV1) SetIsWalletInitialized(v bool) { - o.IsWalletInitialized = v -} - -// GetIsWalletProvisioned returns the IsWalletProvisioned field value -func (o *AriesAgentSummaryV1) GetIsWalletProvisioned() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsWalletProvisioned -} - -// GetIsWalletProvisionedOk returns a tuple with the IsWalletProvisioned field value -// and a boolean to check if the value has been set. -func (o *AriesAgentSummaryV1) GetIsWalletProvisionedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsWalletProvisioned, true -} - -// SetIsWalletProvisioned sets field value -func (o *AriesAgentSummaryV1) SetIsWalletProvisioned(v bool) { - o.IsWalletProvisioned = v -} - -// GetWalletConfig returns the WalletConfig field value -func (o *AriesAgentSummaryV1) GetWalletConfig() AriesAgentSummaryV1WalletConfig { - if o == nil { - var ret AriesAgentSummaryV1WalletConfig - return ret - } - - return o.WalletConfig -} - -// GetWalletConfigOk returns a tuple with the WalletConfig field value -// and a boolean to check if the value has been set. -func (o *AriesAgentSummaryV1) GetWalletConfigOk() (*AriesAgentSummaryV1WalletConfig, bool) { - if o == nil { - return nil, false - } - return &o.WalletConfig, true -} - -// SetWalletConfig sets field value -func (o *AriesAgentSummaryV1) SetWalletConfig(v AriesAgentSummaryV1WalletConfig) { - o.WalletConfig = v -} - -// GetEndpoints returns the Endpoints field value -func (o *AriesAgentSummaryV1) GetEndpoints() []string { - if o == nil { - var ret []string - return ret - } - - return o.Endpoints -} - -// GetEndpointsOk returns a tuple with the Endpoints field value -// and a boolean to check if the value has been set. -func (o *AriesAgentSummaryV1) GetEndpointsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Endpoints, true -} - -// SetEndpoints sets field value -func (o *AriesAgentSummaryV1) SetEndpoints(v []string) { - o.Endpoints = v -} - -func (o AriesAgentSummaryV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AriesAgentSummaryV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["isAgentInitialized"] = o.IsAgentInitialized - toSerialize["isWalletInitialized"] = o.IsWalletInitialized - toSerialize["isWalletProvisioned"] = o.IsWalletProvisioned - toSerialize["walletConfig"] = o.WalletConfig - toSerialize["endpoints"] = o.Endpoints - return toSerialize, nil -} - -type NullableAriesAgentSummaryV1 struct { - value *AriesAgentSummaryV1 - isSet bool -} - -func (v NullableAriesAgentSummaryV1) Get() *AriesAgentSummaryV1 { - return v.value -} - -func (v *NullableAriesAgentSummaryV1) Set(val *AriesAgentSummaryV1) { - v.value = val - v.isSet = true -} - -func (v NullableAriesAgentSummaryV1) IsSet() bool { - return v.isSet -} - -func (v *NullableAriesAgentSummaryV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAriesAgentSummaryV1(val *AriesAgentSummaryV1) *NullableAriesAgentSummaryV1 { - return &NullableAriesAgentSummaryV1{value: val, isSet: true} -} - -func (v NullableAriesAgentSummaryV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAriesAgentSummaryV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_agent_summary_v1_wallet_config.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_agent_summary_v1_wallet_config.go deleted file mode 100644 index d7ea47936c..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_agent_summary_v1_wallet_config.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the AriesAgentSummaryV1WalletConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AriesAgentSummaryV1WalletConfig{} - -// AriesAgentSummaryV1WalletConfig struct for AriesAgentSummaryV1WalletConfig -type AriesAgentSummaryV1WalletConfig struct { - // Wallet entry ID - Id string `json:"id"` - // Wallet storage type - Type string `json:"type"` -} - -// NewAriesAgentSummaryV1WalletConfig instantiates a new AriesAgentSummaryV1WalletConfig object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAriesAgentSummaryV1WalletConfig(id string, type_ string) *AriesAgentSummaryV1WalletConfig { - this := AriesAgentSummaryV1WalletConfig{} - this.Id = id - this.Type = type_ - return &this -} - -// NewAriesAgentSummaryV1WalletConfigWithDefaults instantiates a new AriesAgentSummaryV1WalletConfig object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAriesAgentSummaryV1WalletConfigWithDefaults() *AriesAgentSummaryV1WalletConfig { - this := AriesAgentSummaryV1WalletConfig{} - return &this -} - -// GetId returns the Id field value -func (o *AriesAgentSummaryV1WalletConfig) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *AriesAgentSummaryV1WalletConfig) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *AriesAgentSummaryV1WalletConfig) SetId(v string) { - o.Id = v -} - -// GetType returns the Type field value -func (o *AriesAgentSummaryV1WalletConfig) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *AriesAgentSummaryV1WalletConfig) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *AriesAgentSummaryV1WalletConfig) SetType(v string) { - o.Type = v -} - -func (o AriesAgentSummaryV1WalletConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AriesAgentSummaryV1WalletConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableAriesAgentSummaryV1WalletConfig struct { - value *AriesAgentSummaryV1WalletConfig - isSet bool -} - -func (v NullableAriesAgentSummaryV1WalletConfig) Get() *AriesAgentSummaryV1WalletConfig { - return v.value -} - -func (v *NullableAriesAgentSummaryV1WalletConfig) Set(val *AriesAgentSummaryV1WalletConfig) { - v.value = val - v.isSet = true -} - -func (v NullableAriesAgentSummaryV1WalletConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableAriesAgentSummaryV1WalletConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAriesAgentSummaryV1WalletConfig(val *AriesAgentSummaryV1WalletConfig) *NullableAriesAgentSummaryV1WalletConfig { - return &NullableAriesAgentSummaryV1WalletConfig{value: val, isSet: true} -} - -func (v NullableAriesAgentSummaryV1WalletConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAriesAgentSummaryV1WalletConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_indy_vdr_pool_config_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_indy_vdr_pool_config_v1.go deleted file mode 100644 index 20338a0194..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_indy_vdr_pool_config_v1.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the AriesIndyVdrPoolConfigV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AriesIndyVdrPoolConfigV1{} - -// AriesIndyVdrPoolConfigV1 Indy VDR network configuration -type AriesIndyVdrPoolConfigV1 struct { - // Indy genesis transactions. - GenesisTransactions string `json:"genesisTransactions"` - // Flag to specify whether this is production or development ledger. - IsProduction bool `json:"isProduction"` - // Indy namespace - IndyNamespace string `json:"indyNamespace"` - // Connect to the ledger on startup flag - ConnectOnStartup *bool `json:"connectOnStartup,omitempty"` -} - -// NewAriesIndyVdrPoolConfigV1 instantiates a new AriesIndyVdrPoolConfigV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAriesIndyVdrPoolConfigV1(genesisTransactions string, isProduction bool, indyNamespace string) *AriesIndyVdrPoolConfigV1 { - this := AriesIndyVdrPoolConfigV1{} - this.GenesisTransactions = genesisTransactions - this.IsProduction = isProduction - this.IndyNamespace = indyNamespace - return &this -} - -// NewAriesIndyVdrPoolConfigV1WithDefaults instantiates a new AriesIndyVdrPoolConfigV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAriesIndyVdrPoolConfigV1WithDefaults() *AriesIndyVdrPoolConfigV1 { - this := AriesIndyVdrPoolConfigV1{} - return &this -} - -// GetGenesisTransactions returns the GenesisTransactions field value -func (o *AriesIndyVdrPoolConfigV1) GetGenesisTransactions() string { - if o == nil { - var ret string - return ret - } - - return o.GenesisTransactions -} - -// GetGenesisTransactionsOk returns a tuple with the GenesisTransactions field value -// and a boolean to check if the value has been set. -func (o *AriesIndyVdrPoolConfigV1) GetGenesisTransactionsOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GenesisTransactions, true -} - -// SetGenesisTransactions sets field value -func (o *AriesIndyVdrPoolConfigV1) SetGenesisTransactions(v string) { - o.GenesisTransactions = v -} - -// GetIsProduction returns the IsProduction field value -func (o *AriesIndyVdrPoolConfigV1) GetIsProduction() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsProduction -} - -// GetIsProductionOk returns a tuple with the IsProduction field value -// and a boolean to check if the value has been set. -func (o *AriesIndyVdrPoolConfigV1) GetIsProductionOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsProduction, true -} - -// SetIsProduction sets field value -func (o *AriesIndyVdrPoolConfigV1) SetIsProduction(v bool) { - o.IsProduction = v -} - -// GetIndyNamespace returns the IndyNamespace field value -func (o *AriesIndyVdrPoolConfigV1) GetIndyNamespace() string { - if o == nil { - var ret string - return ret - } - - return o.IndyNamespace -} - -// GetIndyNamespaceOk returns a tuple with the IndyNamespace field value -// and a boolean to check if the value has been set. -func (o *AriesIndyVdrPoolConfigV1) GetIndyNamespaceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.IndyNamespace, true -} - -// SetIndyNamespace sets field value -func (o *AriesIndyVdrPoolConfigV1) SetIndyNamespace(v string) { - o.IndyNamespace = v -} - -// GetConnectOnStartup returns the ConnectOnStartup field value if set, zero value otherwise. -func (o *AriesIndyVdrPoolConfigV1) GetConnectOnStartup() bool { - if o == nil || IsNil(o.ConnectOnStartup) { - var ret bool - return ret - } - return *o.ConnectOnStartup -} - -// GetConnectOnStartupOk returns a tuple with the ConnectOnStartup field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AriesIndyVdrPoolConfigV1) GetConnectOnStartupOk() (*bool, bool) { - if o == nil || IsNil(o.ConnectOnStartup) { - return nil, false - } - return o.ConnectOnStartup, true -} - -// HasConnectOnStartup returns a boolean if a field has been set. -func (o *AriesIndyVdrPoolConfigV1) HasConnectOnStartup() bool { - if o != nil && !IsNil(o.ConnectOnStartup) { - return true - } - - return false -} - -// SetConnectOnStartup gets a reference to the given bool and assigns it to the ConnectOnStartup field. -func (o *AriesIndyVdrPoolConfigV1) SetConnectOnStartup(v bool) { - o.ConnectOnStartup = &v -} - -func (o AriesIndyVdrPoolConfigV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AriesIndyVdrPoolConfigV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["genesisTransactions"] = o.GenesisTransactions - toSerialize["isProduction"] = o.IsProduction - toSerialize["indyNamespace"] = o.IndyNamespace - if !IsNil(o.ConnectOnStartup) { - toSerialize["connectOnStartup"] = o.ConnectOnStartup - } - return toSerialize, nil -} - -type NullableAriesIndyVdrPoolConfigV1 struct { - value *AriesIndyVdrPoolConfigV1 - isSet bool -} - -func (v NullableAriesIndyVdrPoolConfigV1) Get() *AriesIndyVdrPoolConfigV1 { - return v.value -} - -func (v *NullableAriesIndyVdrPoolConfigV1) Set(val *AriesIndyVdrPoolConfigV1) { - v.value = val - v.isSet = true -} - -func (v NullableAriesIndyVdrPoolConfigV1) IsSet() bool { - return v.isSet -} - -func (v *NullableAriesIndyVdrPoolConfigV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAriesIndyVdrPoolConfigV1(val *AriesIndyVdrPoolConfigV1) *NullableAriesIndyVdrPoolConfigV1 { - return &NullableAriesIndyVdrPoolConfigV1{value: val, isSet: true} -} - -func (v NullableAriesIndyVdrPoolConfigV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAriesIndyVdrPoolConfigV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_proof_exchange_record_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_proof_exchange_record_v1.go deleted file mode 100644 index 102301fddf..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_aries_proof_exchange_record_v1.go +++ /dev/null @@ -1,337 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the AriesProofExchangeRecordV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AriesProofExchangeRecordV1{} - -// AriesProofExchangeRecordV1 Proof exchange record from Aries framework (simplified) -type AriesProofExchangeRecordV1 struct { - Id string `json:"id"` - ConnectionId *string `json:"connectionId,omitempty"` - ThreadId string `json:"threadId"` - State string `json:"state"` - ProtocolVersion string `json:"protocolVersion"` - IsVerified *bool `json:"isVerified,omitempty"` - ErrorMessage *string `json:"errorMessage,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _AriesProofExchangeRecordV1 AriesProofExchangeRecordV1 - -// NewAriesProofExchangeRecordV1 instantiates a new AriesProofExchangeRecordV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAriesProofExchangeRecordV1(id string, threadId string, state string, protocolVersion string) *AriesProofExchangeRecordV1 { - this := AriesProofExchangeRecordV1{} - this.Id = id - this.ThreadId = threadId - this.State = state - this.ProtocolVersion = protocolVersion - return &this -} - -// NewAriesProofExchangeRecordV1WithDefaults instantiates a new AriesProofExchangeRecordV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAriesProofExchangeRecordV1WithDefaults() *AriesProofExchangeRecordV1 { - this := AriesProofExchangeRecordV1{} - return &this -} - -// GetId returns the Id field value -func (o *AriesProofExchangeRecordV1) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *AriesProofExchangeRecordV1) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *AriesProofExchangeRecordV1) SetId(v string) { - o.Id = v -} - -// GetConnectionId returns the ConnectionId field value if set, zero value otherwise. -func (o *AriesProofExchangeRecordV1) GetConnectionId() string { - if o == nil || IsNil(o.ConnectionId) { - var ret string - return ret - } - return *o.ConnectionId -} - -// GetConnectionIdOk returns a tuple with the ConnectionId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AriesProofExchangeRecordV1) GetConnectionIdOk() (*string, bool) { - if o == nil || IsNil(o.ConnectionId) { - return nil, false - } - return o.ConnectionId, true -} - -// HasConnectionId returns a boolean if a field has been set. -func (o *AriesProofExchangeRecordV1) HasConnectionId() bool { - if o != nil && !IsNil(o.ConnectionId) { - return true - } - - return false -} - -// SetConnectionId gets a reference to the given string and assigns it to the ConnectionId field. -func (o *AriesProofExchangeRecordV1) SetConnectionId(v string) { - o.ConnectionId = &v -} - -// GetThreadId returns the ThreadId field value -func (o *AriesProofExchangeRecordV1) GetThreadId() string { - if o == nil { - var ret string - return ret - } - - return o.ThreadId -} - -// GetThreadIdOk returns a tuple with the ThreadId field value -// and a boolean to check if the value has been set. -func (o *AriesProofExchangeRecordV1) GetThreadIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ThreadId, true -} - -// SetThreadId sets field value -func (o *AriesProofExchangeRecordV1) SetThreadId(v string) { - o.ThreadId = v -} - -// GetState returns the State field value -func (o *AriesProofExchangeRecordV1) GetState() string { - if o == nil { - var ret string - return ret - } - - return o.State -} - -// GetStateOk returns a tuple with the State field value -// and a boolean to check if the value has been set. -func (o *AriesProofExchangeRecordV1) GetStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.State, true -} - -// SetState sets field value -func (o *AriesProofExchangeRecordV1) SetState(v string) { - o.State = v -} - -// GetProtocolVersion returns the ProtocolVersion field value -func (o *AriesProofExchangeRecordV1) GetProtocolVersion() string { - if o == nil { - var ret string - return ret - } - - return o.ProtocolVersion -} - -// GetProtocolVersionOk returns a tuple with the ProtocolVersion field value -// and a boolean to check if the value has been set. -func (o *AriesProofExchangeRecordV1) GetProtocolVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ProtocolVersion, true -} - -// SetProtocolVersion sets field value -func (o *AriesProofExchangeRecordV1) SetProtocolVersion(v string) { - o.ProtocolVersion = v -} - -// GetIsVerified returns the IsVerified field value if set, zero value otherwise. -func (o *AriesProofExchangeRecordV1) GetIsVerified() bool { - if o == nil || IsNil(o.IsVerified) { - var ret bool - return ret - } - return *o.IsVerified -} - -// GetIsVerifiedOk returns a tuple with the IsVerified field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AriesProofExchangeRecordV1) GetIsVerifiedOk() (*bool, bool) { - if o == nil || IsNil(o.IsVerified) { - return nil, false - } - return o.IsVerified, true -} - -// HasIsVerified returns a boolean if a field has been set. -func (o *AriesProofExchangeRecordV1) HasIsVerified() bool { - if o != nil && !IsNil(o.IsVerified) { - return true - } - - return false -} - -// SetIsVerified gets a reference to the given bool and assigns it to the IsVerified field. -func (o *AriesProofExchangeRecordV1) SetIsVerified(v bool) { - o.IsVerified = &v -} - -// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise. -func (o *AriesProofExchangeRecordV1) GetErrorMessage() string { - if o == nil || IsNil(o.ErrorMessage) { - var ret string - return ret - } - return *o.ErrorMessage -} - -// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AriesProofExchangeRecordV1) GetErrorMessageOk() (*string, bool) { - if o == nil || IsNil(o.ErrorMessage) { - return nil, false - } - return o.ErrorMessage, true -} - -// HasErrorMessage returns a boolean if a field has been set. -func (o *AriesProofExchangeRecordV1) HasErrorMessage() bool { - if o != nil && !IsNil(o.ErrorMessage) { - return true - } - - return false -} - -// SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field. -func (o *AriesProofExchangeRecordV1) SetErrorMessage(v string) { - o.ErrorMessage = &v -} - -func (o AriesProofExchangeRecordV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AriesProofExchangeRecordV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - if !IsNil(o.ConnectionId) { - toSerialize["connectionId"] = o.ConnectionId - } - toSerialize["threadId"] = o.ThreadId - toSerialize["state"] = o.State - toSerialize["protocolVersion"] = o.ProtocolVersion - if !IsNil(o.IsVerified) { - toSerialize["isVerified"] = o.IsVerified - } - if !IsNil(o.ErrorMessage) { - toSerialize["errorMessage"] = o.ErrorMessage - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AriesProofExchangeRecordV1) UnmarshalJSON(bytes []byte) (err error) { - varAriesProofExchangeRecordV1 := _AriesProofExchangeRecordV1{} - - if err = json.Unmarshal(bytes, &varAriesProofExchangeRecordV1); err == nil { - *o = AriesProofExchangeRecordV1(varAriesProofExchangeRecordV1) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "id") - delete(additionalProperties, "connectionId") - delete(additionalProperties, "threadId") - delete(additionalProperties, "state") - delete(additionalProperties, "protocolVersion") - delete(additionalProperties, "isVerified") - delete(additionalProperties, "errorMessage") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAriesProofExchangeRecordV1 struct { - value *AriesProofExchangeRecordV1 - isSet bool -} - -func (v NullableAriesProofExchangeRecordV1) Get() *AriesProofExchangeRecordV1 { - return v.value -} - -func (v *NullableAriesProofExchangeRecordV1) Set(val *AriesProofExchangeRecordV1) { - v.value = val - v.isSet = true -} - -func (v NullableAriesProofExchangeRecordV1) IsSet() bool { - return v.isSet -} - -func (v *NullableAriesProofExchangeRecordV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAriesProofExchangeRecordV1(val *AriesProofExchangeRecordV1) *NullableAriesProofExchangeRecordV1 { - return &NullableAriesProofExchangeRecordV1{value: val, isSet: true} -} - -func (v NullableAriesProofExchangeRecordV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAriesProofExchangeRecordV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_cacti_accept_policy_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_cacti_accept_policy_v1.go deleted file mode 100644 index e158fc3de9..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_cacti_accept_policy_v1.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" - "fmt" -) - -// CactiAcceptPolicyV1 Credential / Proof requests acceptance policies for Aries agent -type CactiAcceptPolicyV1 string - -// List of CactiAcceptPolicyV1 -const ( - Always CactiAcceptPolicyV1 = "always" - ContentApproved CactiAcceptPolicyV1 = "contentApproved" - Never CactiAcceptPolicyV1 = "never" -) - -// All allowed values of CactiAcceptPolicyV1 enum -var AllowedCactiAcceptPolicyV1EnumValues = []CactiAcceptPolicyV1{ - "always", - "contentApproved", - "never", -} - -func (v *CactiAcceptPolicyV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := CactiAcceptPolicyV1(value) - for _, existing := range AllowedCactiAcceptPolicyV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid CactiAcceptPolicyV1", value) -} - -// NewCactiAcceptPolicyV1FromValue returns a pointer to a valid CactiAcceptPolicyV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewCactiAcceptPolicyV1FromValue(v string) (*CactiAcceptPolicyV1, error) { - ev := CactiAcceptPolicyV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for CactiAcceptPolicyV1: valid values are %v", v, AllowedCactiAcceptPolicyV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v CactiAcceptPolicyV1) IsValid() bool { - for _, existing := range AllowedCactiAcceptPolicyV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to CactiAcceptPolicyV1 value -func (v CactiAcceptPolicyV1) Ptr() *CactiAcceptPolicyV1 { - return &v -} - -type NullableCactiAcceptPolicyV1 struct { - value *CactiAcceptPolicyV1 - isSet bool -} - -func (v NullableCactiAcceptPolicyV1) Get() *CactiAcceptPolicyV1 { - return v.value -} - -func (v *NullableCactiAcceptPolicyV1) Set(val *CactiAcceptPolicyV1) { - v.value = val - v.isSet = true -} - -func (v NullableCactiAcceptPolicyV1) IsSet() bool { - return v.isSet -} - -func (v *NullableCactiAcceptPolicyV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCactiAcceptPolicyV1(val *CactiAcceptPolicyV1) *NullableCactiAcceptPolicyV1 { - return &NullableCactiAcceptPolicyV1{value: val, isSet: true} -} - -func (v NullableCactiAcceptPolicyV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCactiAcceptPolicyV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_cacti_proof_request_attribute_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_cacti_proof_request_attribute_v1.go deleted file mode 100644 index 103a0d0342..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_cacti_proof_request_attribute_v1.go +++ /dev/null @@ -1,194 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the CactiProofRequestAttributeV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CactiProofRequestAttributeV1{} - -// CactiProofRequestAttributeV1 Credential attribute checks to be performed by a proof request. -type CactiProofRequestAttributeV1 struct { - // Attribute name. - Name string `json:"name"` - // Check if attribute has specified value - IsValueEqual interface{} `json:"isValueEqual,omitempty"` - // Check if credentialDefinitionId has specified value - IsCredentialDefinitionIdEqual interface{} `json:"isCredentialDefinitionIdEqual,omitempty"` -} - -// NewCactiProofRequestAttributeV1 instantiates a new CactiProofRequestAttributeV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCactiProofRequestAttributeV1(name string) *CactiProofRequestAttributeV1 { - this := CactiProofRequestAttributeV1{} - this.Name = name - return &this -} - -// NewCactiProofRequestAttributeV1WithDefaults instantiates a new CactiProofRequestAttributeV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCactiProofRequestAttributeV1WithDefaults() *CactiProofRequestAttributeV1 { - this := CactiProofRequestAttributeV1{} - return &this -} - -// GetName returns the Name field value -func (o *CactiProofRequestAttributeV1) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CactiProofRequestAttributeV1) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CactiProofRequestAttributeV1) SetName(v string) { - o.Name = v -} - -// GetIsValueEqual returns the IsValueEqual field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CactiProofRequestAttributeV1) GetIsValueEqual() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.IsValueEqual -} - -// GetIsValueEqualOk returns a tuple with the IsValueEqual field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CactiProofRequestAttributeV1) GetIsValueEqualOk() (*interface{}, bool) { - if o == nil || IsNil(o.IsValueEqual) { - return nil, false - } - return &o.IsValueEqual, true -} - -// HasIsValueEqual returns a boolean if a field has been set. -func (o *CactiProofRequestAttributeV1) HasIsValueEqual() bool { - if o != nil && IsNil(o.IsValueEqual) { - return true - } - - return false -} - -// SetIsValueEqual gets a reference to the given interface{} and assigns it to the IsValueEqual field. -func (o *CactiProofRequestAttributeV1) SetIsValueEqual(v interface{}) { - o.IsValueEqual = v -} - -// GetIsCredentialDefinitionIdEqual returns the IsCredentialDefinitionIdEqual field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CactiProofRequestAttributeV1) GetIsCredentialDefinitionIdEqual() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.IsCredentialDefinitionIdEqual -} - -// GetIsCredentialDefinitionIdEqualOk returns a tuple with the IsCredentialDefinitionIdEqual field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CactiProofRequestAttributeV1) GetIsCredentialDefinitionIdEqualOk() (*interface{}, bool) { - if o == nil || IsNil(o.IsCredentialDefinitionIdEqual) { - return nil, false - } - return &o.IsCredentialDefinitionIdEqual, true -} - -// HasIsCredentialDefinitionIdEqual returns a boolean if a field has been set. -func (o *CactiProofRequestAttributeV1) HasIsCredentialDefinitionIdEqual() bool { - if o != nil && IsNil(o.IsCredentialDefinitionIdEqual) { - return true - } - - return false -} - -// SetIsCredentialDefinitionIdEqual gets a reference to the given interface{} and assigns it to the IsCredentialDefinitionIdEqual field. -func (o *CactiProofRequestAttributeV1) SetIsCredentialDefinitionIdEqual(v interface{}) { - o.IsCredentialDefinitionIdEqual = v -} - -func (o CactiProofRequestAttributeV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CactiProofRequestAttributeV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - if o.IsValueEqual != nil { - toSerialize["isValueEqual"] = o.IsValueEqual - } - if o.IsCredentialDefinitionIdEqual != nil { - toSerialize["isCredentialDefinitionIdEqual"] = o.IsCredentialDefinitionIdEqual - } - return toSerialize, nil -} - -type NullableCactiProofRequestAttributeV1 struct { - value *CactiProofRequestAttributeV1 - isSet bool -} - -func (v NullableCactiProofRequestAttributeV1) Get() *CactiProofRequestAttributeV1 { - return v.value -} - -func (v *NullableCactiProofRequestAttributeV1) Set(val *CactiProofRequestAttributeV1) { - v.value = val - v.isSet = true -} - -func (v NullableCactiProofRequestAttributeV1) IsSet() bool { - return v.isSet -} - -func (v *NullableCactiProofRequestAttributeV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCactiProofRequestAttributeV1(val *CactiProofRequestAttributeV1) *NullableCactiProofRequestAttributeV1 { - return &NullableCactiProofRequestAttributeV1{value: val, isSet: true} -} - -func (v NullableCactiProofRequestAttributeV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCactiProofRequestAttributeV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_create_new_connection_invitation_v1_request.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_create_new_connection_invitation_v1_request.go deleted file mode 100644 index 2ff2dee62d..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_create_new_connection_invitation_v1_request.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the CreateNewConnectionInvitationV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNewConnectionInvitationV1Request{} - -// CreateNewConnectionInvitationV1Request Request for CreateNewConnectionInvitation endpoint. -type CreateNewConnectionInvitationV1Request struct { - // Aries label of an agent to use to generate an invitation - AgentName string `json:"agentName"` - // Invitation URL domain to use. If not specified, then connector default domain will be used - InvitationDomain *string `json:"invitationDomain,omitempty"` -} - -// NewCreateNewConnectionInvitationV1Request instantiates a new CreateNewConnectionInvitationV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateNewConnectionInvitationV1Request(agentName string) *CreateNewConnectionInvitationV1Request { - this := CreateNewConnectionInvitationV1Request{} - this.AgentName = agentName - return &this -} - -// NewCreateNewConnectionInvitationV1RequestWithDefaults instantiates a new CreateNewConnectionInvitationV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateNewConnectionInvitationV1RequestWithDefaults() *CreateNewConnectionInvitationV1Request { - this := CreateNewConnectionInvitationV1Request{} - return &this -} - -// GetAgentName returns the AgentName field value -func (o *CreateNewConnectionInvitationV1Request) GetAgentName() string { - if o == nil { - var ret string - return ret - } - - return o.AgentName -} - -// GetAgentNameOk returns a tuple with the AgentName field value -// and a boolean to check if the value has been set. -func (o *CreateNewConnectionInvitationV1Request) GetAgentNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AgentName, true -} - -// SetAgentName sets field value -func (o *CreateNewConnectionInvitationV1Request) SetAgentName(v string) { - o.AgentName = v -} - -// GetInvitationDomain returns the InvitationDomain field value if set, zero value otherwise. -func (o *CreateNewConnectionInvitationV1Request) GetInvitationDomain() string { - if o == nil || IsNil(o.InvitationDomain) { - var ret string - return ret - } - return *o.InvitationDomain -} - -// GetInvitationDomainOk returns a tuple with the InvitationDomain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateNewConnectionInvitationV1Request) GetInvitationDomainOk() (*string, bool) { - if o == nil || IsNil(o.InvitationDomain) { - return nil, false - } - return o.InvitationDomain, true -} - -// HasInvitationDomain returns a boolean if a field has been set. -func (o *CreateNewConnectionInvitationV1Request) HasInvitationDomain() bool { - if o != nil && !IsNil(o.InvitationDomain) { - return true - } - - return false -} - -// SetInvitationDomain gets a reference to the given string and assigns it to the InvitationDomain field. -func (o *CreateNewConnectionInvitationV1Request) SetInvitationDomain(v string) { - o.InvitationDomain = &v -} - -func (o CreateNewConnectionInvitationV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateNewConnectionInvitationV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["agentName"] = o.AgentName - if !IsNil(o.InvitationDomain) { - toSerialize["invitationDomain"] = o.InvitationDomain - } - return toSerialize, nil -} - -type NullableCreateNewConnectionInvitationV1Request struct { - value *CreateNewConnectionInvitationV1Request - isSet bool -} - -func (v NullableCreateNewConnectionInvitationV1Request) Get() *CreateNewConnectionInvitationV1Request { - return v.value -} - -func (v *NullableCreateNewConnectionInvitationV1Request) Set(val *CreateNewConnectionInvitationV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableCreateNewConnectionInvitationV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateNewConnectionInvitationV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateNewConnectionInvitationV1Request(val *CreateNewConnectionInvitationV1Request) *NullableCreateNewConnectionInvitationV1Request { - return &NullableCreateNewConnectionInvitationV1Request{value: val, isSet: true} -} - -func (v NullableCreateNewConnectionInvitationV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateNewConnectionInvitationV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_create_new_connection_invitation_v1_response.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_create_new_connection_invitation_v1_response.go deleted file mode 100644 index d548557f31..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_create_new_connection_invitation_v1_response.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the CreateNewConnectionInvitationV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateNewConnectionInvitationV1Response{} - -// CreateNewConnectionInvitationV1Response Response for CreateNewConnectionInvitation endpoint. -type CreateNewConnectionInvitationV1Response struct { - // Invitation URL that can be used by another aries agent to connect to us. - InvitationUrl string `json:"invitationUrl"` - // ID that can be used to track status of the connection - OutOfBandId string `json:"outOfBandId"` -} - -// NewCreateNewConnectionInvitationV1Response instantiates a new CreateNewConnectionInvitationV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateNewConnectionInvitationV1Response(invitationUrl string, outOfBandId string) *CreateNewConnectionInvitationV1Response { - this := CreateNewConnectionInvitationV1Response{} - this.InvitationUrl = invitationUrl - this.OutOfBandId = outOfBandId - return &this -} - -// NewCreateNewConnectionInvitationV1ResponseWithDefaults instantiates a new CreateNewConnectionInvitationV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateNewConnectionInvitationV1ResponseWithDefaults() *CreateNewConnectionInvitationV1Response { - this := CreateNewConnectionInvitationV1Response{} - return &this -} - -// GetInvitationUrl returns the InvitationUrl field value -func (o *CreateNewConnectionInvitationV1Response) GetInvitationUrl() string { - if o == nil { - var ret string - return ret - } - - return o.InvitationUrl -} - -// GetInvitationUrlOk returns a tuple with the InvitationUrl field value -// and a boolean to check if the value has been set. -func (o *CreateNewConnectionInvitationV1Response) GetInvitationUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.InvitationUrl, true -} - -// SetInvitationUrl sets field value -func (o *CreateNewConnectionInvitationV1Response) SetInvitationUrl(v string) { - o.InvitationUrl = v -} - -// GetOutOfBandId returns the OutOfBandId field value -func (o *CreateNewConnectionInvitationV1Response) GetOutOfBandId() string { - if o == nil { - var ret string - return ret - } - - return o.OutOfBandId -} - -// GetOutOfBandIdOk returns a tuple with the OutOfBandId field value -// and a boolean to check if the value has been set. -func (o *CreateNewConnectionInvitationV1Response) GetOutOfBandIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OutOfBandId, true -} - -// SetOutOfBandId sets field value -func (o *CreateNewConnectionInvitationV1Response) SetOutOfBandId(v string) { - o.OutOfBandId = v -} - -func (o CreateNewConnectionInvitationV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateNewConnectionInvitationV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["invitationUrl"] = o.InvitationUrl - toSerialize["outOfBandId"] = o.OutOfBandId - return toSerialize, nil -} - -type NullableCreateNewConnectionInvitationV1Response struct { - value *CreateNewConnectionInvitationV1Response - isSet bool -} - -func (v NullableCreateNewConnectionInvitationV1Response) Get() *CreateNewConnectionInvitationV1Response { - return v.value -} - -func (v *NullableCreateNewConnectionInvitationV1Response) Set(val *CreateNewConnectionInvitationV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableCreateNewConnectionInvitationV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateNewConnectionInvitationV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateNewConnectionInvitationV1Response(val *CreateNewConnectionInvitationV1Response) *NullableCreateNewConnectionInvitationV1Response { - return &NullableCreateNewConnectionInvitationV1Response{value: val, isSet: true} -} - -func (v NullableCreateNewConnectionInvitationV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateNewConnectionInvitationV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_error_exception_v1_response.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_error_exception_v1_response.go deleted file mode 100644 index 23e7e73de2..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_error_exception_v1_response.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the ErrorExceptionV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorExceptionV1Response{} - -// ErrorExceptionV1Response Error response from the connector. -type ErrorExceptionV1Response struct { - // Short error description message. - Message string `json:"message"` - // Detailed error information. - Error string `json:"error"` -} - -// NewErrorExceptionV1Response instantiates a new ErrorExceptionV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorExceptionV1Response(message string, error_ string) *ErrorExceptionV1Response { - this := ErrorExceptionV1Response{} - this.Message = message - this.Error = error_ - return &this -} - -// NewErrorExceptionV1ResponseWithDefaults instantiates a new ErrorExceptionV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorExceptionV1ResponseWithDefaults() *ErrorExceptionV1Response { - this := ErrorExceptionV1Response{} - return &this -} - -// GetMessage returns the Message field value -func (o *ErrorExceptionV1Response) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionV1Response) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ErrorExceptionV1Response) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -func (o *ErrorExceptionV1Response) GetError() string { - if o == nil { - var ret string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionV1Response) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ErrorExceptionV1Response) SetError(v string) { - o.Error = v -} - -func (o ErrorExceptionV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorExceptionV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error - return toSerialize, nil -} - -type NullableErrorExceptionV1Response struct { - value *ErrorExceptionV1Response - isSet bool -} - -func (v NullableErrorExceptionV1Response) Get() *ErrorExceptionV1Response { - return v.value -} - -func (v *NullableErrorExceptionV1Response) Set(val *ErrorExceptionV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableErrorExceptionV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorExceptionV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorExceptionV1Response(val *ErrorExceptionV1Response) *NullableErrorExceptionV1Response { - return &NullableErrorExceptionV1Response{value: val, isSet: true} -} - -func (v NullableErrorExceptionV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorExceptionV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_get_connections_v1_request.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_get_connections_v1_request.go deleted file mode 100644 index 5d53af7c75..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_get_connections_v1_request.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the GetConnectionsV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetConnectionsV1Request{} - -// GetConnectionsV1Request Request for GetConnections endpoint. -type GetConnectionsV1Request struct { - AgentName string `json:"agentName"` - Filter *AgentConnectionsFilterV1 `json:"filter,omitempty"` -} - -// NewGetConnectionsV1Request instantiates a new GetConnectionsV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetConnectionsV1Request(agentName string) *GetConnectionsV1Request { - this := GetConnectionsV1Request{} - this.AgentName = agentName - return &this -} - -// NewGetConnectionsV1RequestWithDefaults instantiates a new GetConnectionsV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetConnectionsV1RequestWithDefaults() *GetConnectionsV1Request { - this := GetConnectionsV1Request{} - return &this -} - -// GetAgentName returns the AgentName field value -func (o *GetConnectionsV1Request) GetAgentName() string { - if o == nil { - var ret string - return ret - } - - return o.AgentName -} - -// GetAgentNameOk returns a tuple with the AgentName field value -// and a boolean to check if the value has been set. -func (o *GetConnectionsV1Request) GetAgentNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AgentName, true -} - -// SetAgentName sets field value -func (o *GetConnectionsV1Request) SetAgentName(v string) { - o.AgentName = v -} - -// GetFilter returns the Filter field value if set, zero value otherwise. -func (o *GetConnectionsV1Request) GetFilter() AgentConnectionsFilterV1 { - if o == nil || IsNil(o.Filter) { - var ret AgentConnectionsFilterV1 - return ret - } - return *o.Filter -} - -// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnectionsV1Request) GetFilterOk() (*AgentConnectionsFilterV1, bool) { - if o == nil || IsNil(o.Filter) { - return nil, false - } - return o.Filter, true -} - -// HasFilter returns a boolean if a field has been set. -func (o *GetConnectionsV1Request) HasFilter() bool { - if o != nil && !IsNil(o.Filter) { - return true - } - - return false -} - -// SetFilter gets a reference to the given AgentConnectionsFilterV1 and assigns it to the Filter field. -func (o *GetConnectionsV1Request) SetFilter(v AgentConnectionsFilterV1) { - o.Filter = &v -} - -func (o GetConnectionsV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetConnectionsV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["agentName"] = o.AgentName - if !IsNil(o.Filter) { - toSerialize["filter"] = o.Filter - } - return toSerialize, nil -} - -type NullableGetConnectionsV1Request struct { - value *GetConnectionsV1Request - isSet bool -} - -func (v NullableGetConnectionsV1Request) Get() *GetConnectionsV1Request { - return v.value -} - -func (v *NullableGetConnectionsV1Request) Set(val *GetConnectionsV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableGetConnectionsV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableGetConnectionsV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetConnectionsV1Request(val *GetConnectionsV1Request) *NullableGetConnectionsV1Request { - return &NullableGetConnectionsV1Request{value: val, isSet: true} -} - -func (v NullableGetConnectionsV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetConnectionsV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_request_proof_v1_request.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_request_proof_v1_request.go deleted file mode 100644 index 76c3dce38f..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_request_proof_v1_request.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the RequestProofV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RequestProofV1Request{} - -// RequestProofV1Request Request for RequestProof endpoint. -type RequestProofV1Request struct { - // Aries label of an agent to be used to connect using URL - AgentName string `json:"agentName"` - // Peer connection ID from which we want to request a proof. - ConnectionId string `json:"connectionId"` - ProofAttributes []CactiProofRequestAttributeV1 `json:"proofAttributes"` -} - -// NewRequestProofV1Request instantiates a new RequestProofV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRequestProofV1Request(agentName string, connectionId string, proofAttributes []CactiProofRequestAttributeV1) *RequestProofV1Request { - this := RequestProofV1Request{} - this.AgentName = agentName - this.ConnectionId = connectionId - this.ProofAttributes = proofAttributes - return &this -} - -// NewRequestProofV1RequestWithDefaults instantiates a new RequestProofV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRequestProofV1RequestWithDefaults() *RequestProofV1Request { - this := RequestProofV1Request{} - return &this -} - -// GetAgentName returns the AgentName field value -func (o *RequestProofV1Request) GetAgentName() string { - if o == nil { - var ret string - return ret - } - - return o.AgentName -} - -// GetAgentNameOk returns a tuple with the AgentName field value -// and a boolean to check if the value has been set. -func (o *RequestProofV1Request) GetAgentNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AgentName, true -} - -// SetAgentName sets field value -func (o *RequestProofV1Request) SetAgentName(v string) { - o.AgentName = v -} - -// GetConnectionId returns the ConnectionId field value -func (o *RequestProofV1Request) GetConnectionId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectionId -} - -// GetConnectionIdOk returns a tuple with the ConnectionId field value -// and a boolean to check if the value has been set. -func (o *RequestProofV1Request) GetConnectionIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectionId, true -} - -// SetConnectionId sets field value -func (o *RequestProofV1Request) SetConnectionId(v string) { - o.ConnectionId = v -} - -// GetProofAttributes returns the ProofAttributes field value -func (o *RequestProofV1Request) GetProofAttributes() []CactiProofRequestAttributeV1 { - if o == nil { - var ret []CactiProofRequestAttributeV1 - return ret - } - - return o.ProofAttributes -} - -// GetProofAttributesOk returns a tuple with the ProofAttributes field value -// and a boolean to check if the value has been set. -func (o *RequestProofV1Request) GetProofAttributesOk() ([]CactiProofRequestAttributeV1, bool) { - if o == nil { - return nil, false - } - return o.ProofAttributes, true -} - -// SetProofAttributes sets field value -func (o *RequestProofV1Request) SetProofAttributes(v []CactiProofRequestAttributeV1) { - o.ProofAttributes = v -} - -func (o RequestProofV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RequestProofV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["agentName"] = o.AgentName - toSerialize["connectionId"] = o.ConnectionId - toSerialize["proofAttributes"] = o.ProofAttributes - return toSerialize, nil -} - -type NullableRequestProofV1Request struct { - value *RequestProofV1Request - isSet bool -} - -func (v NullableRequestProofV1Request) Get() *RequestProofV1Request { - return v.value -} - -func (v *NullableRequestProofV1Request) Set(val *RequestProofV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableRequestProofV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableRequestProofV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRequestProofV1Request(val *RequestProofV1Request) *NullableRequestProofV1Request { - return &NullableRequestProofV1Request{value: val, isSet: true} -} - -func (v NullableRequestProofV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRequestProofV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_connection_state_options_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_connection_state_options_v1.go deleted file mode 100644 index ef5ed11fde..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_connection_state_options_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the WatchConnectionStateOptionsV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchConnectionStateOptionsV1{} - -// WatchConnectionStateOptionsV1 Options passed when monitoring connection change events. -type WatchConnectionStateOptionsV1 struct { - // Aries agent label that will also be used as wallet id. - AgentName string `json:"agentName"` -} - -// NewWatchConnectionStateOptionsV1 instantiates a new WatchConnectionStateOptionsV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchConnectionStateOptionsV1(agentName string) *WatchConnectionStateOptionsV1 { - this := WatchConnectionStateOptionsV1{} - this.AgentName = agentName - return &this -} - -// NewWatchConnectionStateOptionsV1WithDefaults instantiates a new WatchConnectionStateOptionsV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchConnectionStateOptionsV1WithDefaults() *WatchConnectionStateOptionsV1 { - this := WatchConnectionStateOptionsV1{} - return &this -} - -// GetAgentName returns the AgentName field value -func (o *WatchConnectionStateOptionsV1) GetAgentName() string { - if o == nil { - var ret string - return ret - } - - return o.AgentName -} - -// GetAgentNameOk returns a tuple with the AgentName field value -// and a boolean to check if the value has been set. -func (o *WatchConnectionStateOptionsV1) GetAgentNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AgentName, true -} - -// SetAgentName sets field value -func (o *WatchConnectionStateOptionsV1) SetAgentName(v string) { - o.AgentName = v -} - -func (o WatchConnectionStateOptionsV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchConnectionStateOptionsV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["agentName"] = o.AgentName - return toSerialize, nil -} - -type NullableWatchConnectionStateOptionsV1 struct { - value *WatchConnectionStateOptionsV1 - isSet bool -} - -func (v NullableWatchConnectionStateOptionsV1) Get() *WatchConnectionStateOptionsV1 { - return v.value -} - -func (v *NullableWatchConnectionStateOptionsV1) Set(val *WatchConnectionStateOptionsV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchConnectionStateOptionsV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchConnectionStateOptionsV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchConnectionStateOptionsV1(val *WatchConnectionStateOptionsV1) *NullableWatchConnectionStateOptionsV1 { - return &NullableWatchConnectionStateOptionsV1{value: val, isSet: true} -} - -func (v NullableWatchConnectionStateOptionsV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchConnectionStateOptionsV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_connection_state_progress_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_connection_state_progress_v1.go deleted file mode 100644 index ea6927fa23..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_connection_state_progress_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the WatchConnectionStateProgressV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchConnectionStateProgressV1{} - -// WatchConnectionStateProgressV1 Values pushed on each connection state change. -type WatchConnectionStateProgressV1 struct { - ConnectionRecord AgentConnectionRecordV1 `json:"connectionRecord"` - PreviousState NullableString `json:"previousState"` -} - -// NewWatchConnectionStateProgressV1 instantiates a new WatchConnectionStateProgressV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchConnectionStateProgressV1(connectionRecord AgentConnectionRecordV1, previousState NullableString) *WatchConnectionStateProgressV1 { - this := WatchConnectionStateProgressV1{} - this.ConnectionRecord = connectionRecord - this.PreviousState = previousState - return &this -} - -// NewWatchConnectionStateProgressV1WithDefaults instantiates a new WatchConnectionStateProgressV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchConnectionStateProgressV1WithDefaults() *WatchConnectionStateProgressV1 { - this := WatchConnectionStateProgressV1{} - return &this -} - -// GetConnectionRecord returns the ConnectionRecord field value -func (o *WatchConnectionStateProgressV1) GetConnectionRecord() AgentConnectionRecordV1 { - if o == nil { - var ret AgentConnectionRecordV1 - return ret - } - - return o.ConnectionRecord -} - -// GetConnectionRecordOk returns a tuple with the ConnectionRecord field value -// and a boolean to check if the value has been set. -func (o *WatchConnectionStateProgressV1) GetConnectionRecordOk() (*AgentConnectionRecordV1, bool) { - if o == nil { - return nil, false - } - return &o.ConnectionRecord, true -} - -// SetConnectionRecord sets field value -func (o *WatchConnectionStateProgressV1) SetConnectionRecord(v AgentConnectionRecordV1) { - o.ConnectionRecord = v -} - -// GetPreviousState returns the PreviousState field value -// If the value is explicit nil, the zero value for string will be returned -func (o *WatchConnectionStateProgressV1) GetPreviousState() string { - if o == nil || o.PreviousState.Get() == nil { - var ret string - return ret - } - - return *o.PreviousState.Get() -} - -// GetPreviousStateOk returns a tuple with the PreviousState field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *WatchConnectionStateProgressV1) GetPreviousStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PreviousState.Get(), o.PreviousState.IsSet() -} - -// SetPreviousState sets field value -func (o *WatchConnectionStateProgressV1) SetPreviousState(v string) { - o.PreviousState.Set(&v) -} - -func (o WatchConnectionStateProgressV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchConnectionStateProgressV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["connectionRecord"] = o.ConnectionRecord - toSerialize["previousState"] = o.PreviousState.Get() - return toSerialize, nil -} - -type NullableWatchConnectionStateProgressV1 struct { - value *WatchConnectionStateProgressV1 - isSet bool -} - -func (v NullableWatchConnectionStateProgressV1) Get() *WatchConnectionStateProgressV1 { - return v.value -} - -func (v *NullableWatchConnectionStateProgressV1) Set(val *WatchConnectionStateProgressV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchConnectionStateProgressV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchConnectionStateProgressV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchConnectionStateProgressV1(val *WatchConnectionStateProgressV1) *NullableWatchConnectionStateProgressV1 { - return &NullableWatchConnectionStateProgressV1{value: val, isSet: true} -} - -func (v NullableWatchConnectionStateProgressV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchConnectionStateProgressV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_connection_state_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_connection_state_v1.go deleted file mode 100644 index a8c795ca6f..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_connection_state_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" - "fmt" -) - -// WatchConnectionStateV1 Websocket requests for monitoring connection change events. -type WatchConnectionStateV1 string - -// List of WatchConnectionStateV1 -const ( - Subscribe WatchConnectionStateV1 = "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Subscribe" - Next WatchConnectionStateV1 = "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Next" - Unsubscribe WatchConnectionStateV1 = "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Unsubscribe" - Error WatchConnectionStateV1 = "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Error" - Complete WatchConnectionStateV1 = "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Complete" -) - -// All allowed values of WatchConnectionStateV1 enum -var AllowedWatchConnectionStateV1EnumValues = []WatchConnectionStateV1{ - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Subscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Next", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Error", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Complete", -} - -func (v *WatchConnectionStateV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := WatchConnectionStateV1(value) - for _, existing := range AllowedWatchConnectionStateV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WatchConnectionStateV1", value) -} - -// NewWatchConnectionStateV1FromValue returns a pointer to a valid WatchConnectionStateV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWatchConnectionStateV1FromValue(v string) (*WatchConnectionStateV1, error) { - ev := WatchConnectionStateV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WatchConnectionStateV1: valid values are %v", v, AllowedWatchConnectionStateV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v WatchConnectionStateV1) IsValid() bool { - for _, existing := range AllowedWatchConnectionStateV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WatchConnectionStateV1 value -func (v WatchConnectionStateV1) Ptr() *WatchConnectionStateV1 { - return &v -} - -type NullableWatchConnectionStateV1 struct { - value *WatchConnectionStateV1 - isSet bool -} - -func (v NullableWatchConnectionStateV1) Get() *WatchConnectionStateV1 { - return v.value -} - -func (v *NullableWatchConnectionStateV1) Set(val *WatchConnectionStateV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchConnectionStateV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchConnectionStateV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchConnectionStateV1(val *WatchConnectionStateV1) *NullableWatchConnectionStateV1 { - return &NullableWatchConnectionStateV1{value: val, isSet: true} -} - -func (v NullableWatchConnectionStateV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchConnectionStateV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_proof_state_options_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_proof_state_options_v1.go deleted file mode 100644 index 1ddd0e1423..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_proof_state_options_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the WatchProofStateOptionsV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchProofStateOptionsV1{} - -// WatchProofStateOptionsV1 Options passed when monitoring proof state change events. -type WatchProofStateOptionsV1 struct { - // Aries agent label that will also be used as wallet id. - AgentName string `json:"agentName"` -} - -// NewWatchProofStateOptionsV1 instantiates a new WatchProofStateOptionsV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchProofStateOptionsV1(agentName string) *WatchProofStateOptionsV1 { - this := WatchProofStateOptionsV1{} - this.AgentName = agentName - return &this -} - -// NewWatchProofStateOptionsV1WithDefaults instantiates a new WatchProofStateOptionsV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchProofStateOptionsV1WithDefaults() *WatchProofStateOptionsV1 { - this := WatchProofStateOptionsV1{} - return &this -} - -// GetAgentName returns the AgentName field value -func (o *WatchProofStateOptionsV1) GetAgentName() string { - if o == nil { - var ret string - return ret - } - - return o.AgentName -} - -// GetAgentNameOk returns a tuple with the AgentName field value -// and a boolean to check if the value has been set. -func (o *WatchProofStateOptionsV1) GetAgentNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AgentName, true -} - -// SetAgentName sets field value -func (o *WatchProofStateOptionsV1) SetAgentName(v string) { - o.AgentName = v -} - -func (o WatchProofStateOptionsV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchProofStateOptionsV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["agentName"] = o.AgentName - return toSerialize, nil -} - -type NullableWatchProofStateOptionsV1 struct { - value *WatchProofStateOptionsV1 - isSet bool -} - -func (v NullableWatchProofStateOptionsV1) Get() *WatchProofStateOptionsV1 { - return v.value -} - -func (v *NullableWatchProofStateOptionsV1) Set(val *WatchProofStateOptionsV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchProofStateOptionsV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchProofStateOptionsV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchProofStateOptionsV1(val *WatchProofStateOptionsV1) *NullableWatchProofStateOptionsV1 { - return &NullableWatchProofStateOptionsV1{value: val, isSet: true} -} - -func (v NullableWatchProofStateOptionsV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchProofStateOptionsV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_proof_state_progress_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_proof_state_progress_v1.go deleted file mode 100644 index 19238bd81c..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_proof_state_progress_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" -) - -// checks if the WatchProofStateProgressV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchProofStateProgressV1{} - -// WatchProofStateProgressV1 Values pushed on each proof state change. -type WatchProofStateProgressV1 struct { - ProofRecord AriesProofExchangeRecordV1 `json:"proofRecord"` - PreviousState NullableString `json:"previousState"` -} - -// NewWatchProofStateProgressV1 instantiates a new WatchProofStateProgressV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchProofStateProgressV1(proofRecord AriesProofExchangeRecordV1, previousState NullableString) *WatchProofStateProgressV1 { - this := WatchProofStateProgressV1{} - this.ProofRecord = proofRecord - this.PreviousState = previousState - return &this -} - -// NewWatchProofStateProgressV1WithDefaults instantiates a new WatchProofStateProgressV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchProofStateProgressV1WithDefaults() *WatchProofStateProgressV1 { - this := WatchProofStateProgressV1{} - return &this -} - -// GetProofRecord returns the ProofRecord field value -func (o *WatchProofStateProgressV1) GetProofRecord() AriesProofExchangeRecordV1 { - if o == nil { - var ret AriesProofExchangeRecordV1 - return ret - } - - return o.ProofRecord -} - -// GetProofRecordOk returns a tuple with the ProofRecord field value -// and a boolean to check if the value has been set. -func (o *WatchProofStateProgressV1) GetProofRecordOk() (*AriesProofExchangeRecordV1, bool) { - if o == nil { - return nil, false - } - return &o.ProofRecord, true -} - -// SetProofRecord sets field value -func (o *WatchProofStateProgressV1) SetProofRecord(v AriesProofExchangeRecordV1) { - o.ProofRecord = v -} - -// GetPreviousState returns the PreviousState field value -// If the value is explicit nil, the zero value for string will be returned -func (o *WatchProofStateProgressV1) GetPreviousState() string { - if o == nil || o.PreviousState.Get() == nil { - var ret string - return ret - } - - return *o.PreviousState.Get() -} - -// GetPreviousStateOk returns a tuple with the PreviousState field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *WatchProofStateProgressV1) GetPreviousStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PreviousState.Get(), o.PreviousState.IsSet() -} - -// SetPreviousState sets field value -func (o *WatchProofStateProgressV1) SetPreviousState(v string) { - o.PreviousState.Set(&v) -} - -func (o WatchProofStateProgressV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchProofStateProgressV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["proofRecord"] = o.ProofRecord - toSerialize["previousState"] = o.PreviousState.Get() - return toSerialize, nil -} - -type NullableWatchProofStateProgressV1 struct { - value *WatchProofStateProgressV1 - isSet bool -} - -func (v NullableWatchProofStateProgressV1) Get() *WatchProofStateProgressV1 { - return v.value -} - -func (v *NullableWatchProofStateProgressV1) Set(val *WatchProofStateProgressV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchProofStateProgressV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchProofStateProgressV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchProofStateProgressV1(val *WatchProofStateProgressV1) *NullableWatchProofStateProgressV1 { - return &NullableWatchProofStateProgressV1{value: val, isSet: true} -} - -func (v NullableWatchProofStateProgressV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchProofStateProgressV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_proof_state_v1.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_proof_state_v1.go deleted file mode 100644 index 79bbb65237..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/model_watch_proof_state_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" - "fmt" -) - -// WatchProofStateV1 Websocket requests for monitoring proof state change events. -type WatchProofStateV1 string - -// List of WatchProofStateV1 -const ( - Subscribe WatchProofStateV1 = "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Subscribe" - Next WatchProofStateV1 = "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Next" - Unsubscribe WatchProofStateV1 = "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Unsubscribe" - Error WatchProofStateV1 = "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Error" - Complete WatchProofStateV1 = "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Complete" -) - -// All allowed values of WatchProofStateV1 enum -var AllowedWatchProofStateV1EnumValues = []WatchProofStateV1{ - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Subscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Next", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Error", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Complete", -} - -func (v *WatchProofStateV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := WatchProofStateV1(value) - for _, existing := range AllowedWatchProofStateV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WatchProofStateV1", value) -} - -// NewWatchProofStateV1FromValue returns a pointer to a valid WatchProofStateV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWatchProofStateV1FromValue(v string) (*WatchProofStateV1, error) { - ev := WatchProofStateV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WatchProofStateV1: valid values are %v", v, AllowedWatchProofStateV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v WatchProofStateV1) IsValid() bool { - for _, existing := range AllowedWatchProofStateV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WatchProofStateV1 value -func (v WatchProofStateV1) Ptr() *WatchProofStateV1 { - return &v -} - -type NullableWatchProofStateV1 struct { - value *WatchProofStateV1 - isSet bool -} - -func (v NullableWatchProofStateV1) Get() *WatchProofStateV1 { - return v.value -} - -func (v *NullableWatchProofStateV1) Set(val *WatchProofStateV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchProofStateV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchProofStateV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchProofStateV1(val *WatchProofStateV1) *NullableWatchProofStateV1 { - return &NullableWatchProofStateV1{value: val, isSet: true} -} - -func (v NullableWatchProofStateV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchProofStateV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index e6b7f7ca60..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 427f8fdfd3..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-ledger-connector-aries - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-ledger-connector-aries_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService AcceptInvitationV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.AcceptInvitationV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService CreateNewConnectionInvitationV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.CreateNewConnectionInvitationV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetAgentsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetAgentsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetConnectionsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetConnectionsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RequestProofV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.RequestProofV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index bbd5cc7bcf..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Aries - -Can communicate with other Aries agents and Cacti Aries connectors - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-aries - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-aries/src/main/json/openapi.json deleted file mode 100644 index a0dce24b94..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/json/openapi.json +++ /dev/null @@ -1,745 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector Aries", - "description": "Can communicate with other Aries agents and Cacti Aries connectors", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "WatchConnectionStateV1": { - "type": "string", - "description": "Websocket requests for monitoring connection change events.", - "enum": [ - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Subscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Next", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Error", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchConnectionStateOptionsV1": { - "type": "object", - "description": "Options passed when monitoring connection change events.", - "required": ["agentName"], - "properties": { - "agentName": { - "type": "string", - "nullable": false, - "description": "Aries agent label that will also be used as wallet id." - } - } - }, - "WatchConnectionStateProgressV1": { - "type": "object", - "description": "Values pushed on each connection state change.", - "required": ["connectionRecord", "previousState"], - "properties": { - "connectionRecord": { - "$ref": "#/components/schemas/AgentConnectionRecordV1", - "nullable": false - }, - "previousState": { - "type": "string", - "nullable": true - } - } - }, - "WatchProofStateV1": { - "type": "string", - "description": "Websocket requests for monitoring proof state change events.", - "enum": [ - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Subscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Next", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Error", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchProofStateOptionsV1": { - "type": "object", - "description": "Options passed when monitoring proof state change events.", - "required": ["agentName"], - "properties": { - "agentName": { - "type": "string", - "nullable": false, - "description": "Aries agent label that will also be used as wallet id." - } - } - }, - "WatchProofStateProgressV1": { - "type": "object", - "description": "Values pushed on each proof state change.", - "required": ["proofRecord", "previousState"], - "properties": { - "proofRecord": { - "$ref": "#/components/schemas/AriesProofExchangeRecordV1", - "nullable": false - }, - "previousState": { - "type": "string", - "nullable": true - } - } - }, - "CactiAcceptPolicyV1": { - "type": "string", - "description": "Credential / Proof requests acceptance policies for Aries agent", - "enum": ["always", "contentApproved", "never"], - "x-enum-varnames": ["Always", "ContentApproved", "Never"] - }, - "CactiProofRequestAttributeV1": { - "type": "object", - "description": "Credential attribute checks to be performed by a proof request.", - "required": ["name"], - "properties": { - "name": { - "type": "string", - "nullable": false, - "description": "Attribute name." - }, - "isValueEqual": { - "nullable": false, - "description": "Check if attribute has specified value" - }, - "isCredentialDefinitionIdEqual": { - "nullable": false, - "description": "Check if credentialDefinitionId has specified value" - } - } - }, - "AriesProofExchangeRecordV1": { - "type": "object", - "description": "Proof exchange record from Aries framework (simplified)", - "additionalProperties": true, - "required": ["id", "threadId", "state", "protocolVersion"], - "properties": { - "id": { - "type": "string", - "nullable": false - }, - "connectionId": { - "type": "string", - "nullable": false - }, - "threadId": { - "type": "string", - "nullable": false - }, - "state": { - "type": "string", - "nullable": false - }, - "protocolVersion": { - "type": "string", - "nullable": false - }, - "isVerified": { - "type": "boolean", - "nullable": false - }, - "errorMessage": { - "type": "string", - "nullable": false - } - } - }, - "AriesIndyVdrPoolConfigV1": { - "type": "object", - "description": "Indy VDR network configuration", - "required": ["genesisTransactions", "isProduction", "indyNamespace"], - "properties": { - "genesisTransactions": { - "type": "string", - "nullable": false, - "description": "Indy genesis transactions." - }, - "isProduction": { - "type": "boolean", - "nullable": false, - "description": "Flag to specify whether this is production or development ledger." - }, - "indyNamespace": { - "type": "string", - "nullable": false, - "description": "Indy namespace" - }, - "connectOnStartup": { - "type": "boolean", - "nullable": false, - "description": "Connect to the ledger on startup flag" - } - } - }, - "AriesAgentConfigV1": { - "type": "object", - "description": "Aries agent configuration to be setup and used by the connector.", - "required": ["name", "walletKey", "indyNetworks"], - "properties": { - "name": { - "type": "string", - "nullable": false, - "description": "Aries agent label that will also be used as wallet id." - }, - "walletKey": { - "type": "string", - "nullable": false, - "description": "Wallet private key - do not share with anyone." - }, - "walletPath": { - "type": "string", - "nullable": false, - "description": "Path to wallet sqlite database to use. If not provided, the connector default path and agent name will be used." - }, - "indyNetworks": { - "type": "array", - "nullable": false, - "items": { - "$ref": "#/components/schemas/AriesIndyVdrPoolConfigV1", - "minItems": 1 - } - }, - "inboundUrl": { - "type": "string", - "nullable": false, - "description": "Inbound endpoint URL for this agent. Must be unique for this connector. Must contain port.", - "example": "http://127.0.0.1:1234", - "default": "undefined" - }, - "autoAcceptConnections": { - "type": "boolean", - "nullable": false, - "description": "Flag to accept new connection by default", - "default": "false" - }, - "autoAcceptCredentials": { - "$ref": "#/components/schemas/CactiAcceptPolicyV1", - "nullable": false, - "description": "Policy for accepting new credentials by this agent", - "default": "never" - }, - "autoAcceptProofs": { - "$ref": "#/components/schemas/CactiAcceptPolicyV1", - "nullable": false, - "description": "Policy for accepting new proof requests by this agent", - "default": "never" - } - } - }, - "AriesAgentSummaryV1": { - "type": "object", - "description": "Summary of an Aries Agent configured in the connector.", - "required": [ - "name", - "isAgentInitialized", - "isWalletInitialized", - "isWalletProvisioned", - "walletConfig", - "endpoints" - ], - "properties": { - "name": { - "type": "string", - "nullable": false, - "description": "Aries label of an agent" - }, - "isAgentInitialized": { - "type": "boolean", - "nullable": false, - "description": "True when Aries agent has been initialized properly." - }, - "isWalletInitialized": { - "type": "boolean", - "nullable": false, - "description": "True when this agents wallet has been initialized properly." - }, - "isWalletProvisioned": { - "type": "boolean", - "nullable": false, - "description": "True when this agents wallet has been provisioned properly." - }, - "walletConfig": { - "type": "object", - "nullable": false, - "required": ["id", "type"], - "properties": { - "id": { - "type": "string", - "nullable": false, - "description": "Wallet entry ID" - }, - "type": { - "type": "string", - "nullable": false, - "description": "Wallet storage type" - } - } - }, - "endpoints": { - "type": "array", - "nullable": false, - "description": "Aries agent endpoints configured", - "items": { - "type": "string", - "nullable": false - } - } - } - }, - "AgentConnectionsFilterV1": { - "type": "object", - "description": "Fields that can be used to filter agent connection list.", - "properties": { - "did": { - "type": "string", - "nullable": false - }, - "invitationDid": { - "type": "string", - "nullable": false - }, - "outOfBandId": { - "type": "string", - "nullable": false - }, - "role": { - "type": "string", - "nullable": false - }, - "state": { - "type": "string", - "nullable": false - }, - "theirDid": { - "type": "string", - "nullable": false - }, - "threadId": { - "type": "string", - "nullable": false - } - } - }, - "AgentConnectionRecordV1": { - "type": "object", - "description": "Aries agent connection information.", - "additionalProperties": true, - "required": ["state", "role", "isReady"], - "properties": { - "state": { - "type": "string", - "nullable": false - }, - "role": { - "type": "string", - "nullable": false - }, - "isReady": { - "type": "boolean", - "nullable": false - }, - "did": { - "type": "string", - "nullable": false - }, - "theirDid": { - "type": "string", - "nullable": false - }, - "theirLabel": { - "type": "string", - "nullable": false - }, - "alias": { - "type": "string", - "nullable": false - }, - "threadId": { - "type": "string", - "nullable": false - }, - "errorMessage": { - "type": "string", - "nullable": false - }, - "outOfBandId": { - "type": "string", - "nullable": false - }, - "invitationDid": { - "type": "string", - "nullable": false - } - } - }, - "GetConnectionsV1Request": { - "type": "object", - "description": "Request for GetConnections endpoint.", - "required": ["agentName"], - "properties": { - "agentName": { - "type": "string", - "nullable": false - }, - "filter": { - "$ref": "#/components/schemas/AgentConnectionsFilterV1", - "nullable": false - } - } - }, - "GetConnectionsV1Response": { - "type": "array", - "description": "Response for GetConnections endpoint.", - "default": [], - "items": { - "$ref": "#/components/schemas/AgentConnectionRecordV1" - } - }, - "GetAgentsV1Response": { - "type": "array", - "description": "Response for GetAgents endpoint.", - "default": [], - "items": { - "$ref": "#/components/schemas/AriesAgentSummaryV1" - } - }, - "CreateNewConnectionInvitationV1Request": { - "type": "object", - "description": "Request for CreateNewConnectionInvitation endpoint.", - "required": ["agentName"], - "properties": { - "agentName": { - "type": "string", - "description": "Aries label of an agent to use to generate an invitation", - "nullable": false - }, - "invitationDomain": { - "type": "string", - "description": "Invitation URL domain to use. If not specified, then connector default domain will be used", - "nullable": false - } - } - }, - "CreateNewConnectionInvitationV1Response": { - "type": "object", - "description": "Response for CreateNewConnectionInvitation endpoint.", - "required": ["invitationUrl", "outOfBandId"], - "properties": { - "invitationUrl": { - "type": "string", - "description": "Invitation URL that can be used by another aries agent to connect to us.", - "nullable": false - }, - "outOfBandId": { - "type": "string", - "description": "ID that can be used to track status of the connection", - "nullable": false - } - } - }, - "AcceptInvitationV1Request": { - "type": "object", - "description": "Request for AcceptInvitation endpoint.", - "required": ["agentName", "invitationUrl"], - "properties": { - "agentName": { - "type": "string", - "description": "Aries label of an agent to be used to connect using URL", - "nullable": false - }, - "invitationUrl": { - "type": "string", - "description": "Invitation URL generated by another aries agent.", - "nullable": false - } - } - }, - "AcceptInvitationV1Response": { - "type": "object", - "description": "Response for AcceptInvitation endpoint.", - "required": ["outOfBandId"], - "properties": { - "outOfBandId": { - "type": "string", - "description": "ID that can be used to track status of the connection", - "nullable": false - } - } - }, - "RequestProofV1Request": { - "type": "object", - "description": "Request for RequestProof endpoint.", - "required": ["agentName", "connectionId", "proofAttributes"], - "properties": { - "agentName": { - "type": "string", - "description": "Aries label of an agent to be used to connect using URL", - "nullable": false - }, - "connectionId": { - "type": "string", - "description": "Peer connection ID from which we want to request a proof.", - "nullable": false - }, - "proofAttributes": { - "type": "array", - "nullable": false, - "items": { - "$ref": "#/components/schemas/CactiProofRequestAttributeV1", - "minItems": 1 - } - } - } - }, - "ErrorExceptionV1Response": { - "type": "object", - "description": "Error response from the connector.", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "description": "Short error description message.", - "nullable": false - }, - "error": { - "type": "string", - "description": "Detailed error information.", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents" - } - }, - "operationId": "getAgentsV1", - "summary": "Get all Aries agents configured in this connector plugin.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetAgentsV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections" - } - }, - "operationId": "getConnectionsV1", - "summary": "Get all connections of given aries agent.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConnectionsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConnectionsV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation" - } - }, - "operationId": "createNewConnectionInvitationV1", - "summary": "Create new aries agent invitation that other agents can use to connect.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateNewConnectionInvitationV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateNewConnectionInvitationV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation" - } - }, - "operationId": "acceptInvitationV1", - "summary": "Connect to another agent using it's invitation URL", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptInvitationV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptInvitationV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof" - } - }, - "operationId": "requestProofV1", - "summary": "Request proof matching provided requriements from connected peer agent.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestProofV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AriesProofExchangeRecordV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionV1Response" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-aries/src/main/json/openapi.tpl.json deleted file mode 100644 index a0dce24b94..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,745 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector Aries", - "description": "Can communicate with other Aries agents and Cacti Aries connectors", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "WatchConnectionStateV1": { - "type": "string", - "description": "Websocket requests for monitoring connection change events.", - "enum": [ - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Subscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Next", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Error", - "org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchConnectionStateOptionsV1": { - "type": "object", - "description": "Options passed when monitoring connection change events.", - "required": ["agentName"], - "properties": { - "agentName": { - "type": "string", - "nullable": false, - "description": "Aries agent label that will also be used as wallet id." - } - } - }, - "WatchConnectionStateProgressV1": { - "type": "object", - "description": "Values pushed on each connection state change.", - "required": ["connectionRecord", "previousState"], - "properties": { - "connectionRecord": { - "$ref": "#/components/schemas/AgentConnectionRecordV1", - "nullable": false - }, - "previousState": { - "type": "string", - "nullable": true - } - } - }, - "WatchProofStateV1": { - "type": "string", - "description": "Websocket requests for monitoring proof state change events.", - "enum": [ - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Subscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Next", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Error", - "org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchProofStateOptionsV1": { - "type": "object", - "description": "Options passed when monitoring proof state change events.", - "required": ["agentName"], - "properties": { - "agentName": { - "type": "string", - "nullable": false, - "description": "Aries agent label that will also be used as wallet id." - } - } - }, - "WatchProofStateProgressV1": { - "type": "object", - "description": "Values pushed on each proof state change.", - "required": ["proofRecord", "previousState"], - "properties": { - "proofRecord": { - "$ref": "#/components/schemas/AriesProofExchangeRecordV1", - "nullable": false - }, - "previousState": { - "type": "string", - "nullable": true - } - } - }, - "CactiAcceptPolicyV1": { - "type": "string", - "description": "Credential / Proof requests acceptance policies for Aries agent", - "enum": ["always", "contentApproved", "never"], - "x-enum-varnames": ["Always", "ContentApproved", "Never"] - }, - "CactiProofRequestAttributeV1": { - "type": "object", - "description": "Credential attribute checks to be performed by a proof request.", - "required": ["name"], - "properties": { - "name": { - "type": "string", - "nullable": false, - "description": "Attribute name." - }, - "isValueEqual": { - "nullable": false, - "description": "Check if attribute has specified value" - }, - "isCredentialDefinitionIdEqual": { - "nullable": false, - "description": "Check if credentialDefinitionId has specified value" - } - } - }, - "AriesProofExchangeRecordV1": { - "type": "object", - "description": "Proof exchange record from Aries framework (simplified)", - "additionalProperties": true, - "required": ["id", "threadId", "state", "protocolVersion"], - "properties": { - "id": { - "type": "string", - "nullable": false - }, - "connectionId": { - "type": "string", - "nullable": false - }, - "threadId": { - "type": "string", - "nullable": false - }, - "state": { - "type": "string", - "nullable": false - }, - "protocolVersion": { - "type": "string", - "nullable": false - }, - "isVerified": { - "type": "boolean", - "nullable": false - }, - "errorMessage": { - "type": "string", - "nullable": false - } - } - }, - "AriesIndyVdrPoolConfigV1": { - "type": "object", - "description": "Indy VDR network configuration", - "required": ["genesisTransactions", "isProduction", "indyNamespace"], - "properties": { - "genesisTransactions": { - "type": "string", - "nullable": false, - "description": "Indy genesis transactions." - }, - "isProduction": { - "type": "boolean", - "nullable": false, - "description": "Flag to specify whether this is production or development ledger." - }, - "indyNamespace": { - "type": "string", - "nullable": false, - "description": "Indy namespace" - }, - "connectOnStartup": { - "type": "boolean", - "nullable": false, - "description": "Connect to the ledger on startup flag" - } - } - }, - "AriesAgentConfigV1": { - "type": "object", - "description": "Aries agent configuration to be setup and used by the connector.", - "required": ["name", "walletKey", "indyNetworks"], - "properties": { - "name": { - "type": "string", - "nullable": false, - "description": "Aries agent label that will also be used as wallet id." - }, - "walletKey": { - "type": "string", - "nullable": false, - "description": "Wallet private key - do not share with anyone." - }, - "walletPath": { - "type": "string", - "nullable": false, - "description": "Path to wallet sqlite database to use. If not provided, the connector default path and agent name will be used." - }, - "indyNetworks": { - "type": "array", - "nullable": false, - "items": { - "$ref": "#/components/schemas/AriesIndyVdrPoolConfigV1", - "minItems": 1 - } - }, - "inboundUrl": { - "type": "string", - "nullable": false, - "description": "Inbound endpoint URL for this agent. Must be unique for this connector. Must contain port.", - "example": "http://127.0.0.1:1234", - "default": "undefined" - }, - "autoAcceptConnections": { - "type": "boolean", - "nullable": false, - "description": "Flag to accept new connection by default", - "default": "false" - }, - "autoAcceptCredentials": { - "$ref": "#/components/schemas/CactiAcceptPolicyV1", - "nullable": false, - "description": "Policy for accepting new credentials by this agent", - "default": "never" - }, - "autoAcceptProofs": { - "$ref": "#/components/schemas/CactiAcceptPolicyV1", - "nullable": false, - "description": "Policy for accepting new proof requests by this agent", - "default": "never" - } - } - }, - "AriesAgentSummaryV1": { - "type": "object", - "description": "Summary of an Aries Agent configured in the connector.", - "required": [ - "name", - "isAgentInitialized", - "isWalletInitialized", - "isWalletProvisioned", - "walletConfig", - "endpoints" - ], - "properties": { - "name": { - "type": "string", - "nullable": false, - "description": "Aries label of an agent" - }, - "isAgentInitialized": { - "type": "boolean", - "nullable": false, - "description": "True when Aries agent has been initialized properly." - }, - "isWalletInitialized": { - "type": "boolean", - "nullable": false, - "description": "True when this agents wallet has been initialized properly." - }, - "isWalletProvisioned": { - "type": "boolean", - "nullable": false, - "description": "True when this agents wallet has been provisioned properly." - }, - "walletConfig": { - "type": "object", - "nullable": false, - "required": ["id", "type"], - "properties": { - "id": { - "type": "string", - "nullable": false, - "description": "Wallet entry ID" - }, - "type": { - "type": "string", - "nullable": false, - "description": "Wallet storage type" - } - } - }, - "endpoints": { - "type": "array", - "nullable": false, - "description": "Aries agent endpoints configured", - "items": { - "type": "string", - "nullable": false - } - } - } - }, - "AgentConnectionsFilterV1": { - "type": "object", - "description": "Fields that can be used to filter agent connection list.", - "properties": { - "did": { - "type": "string", - "nullable": false - }, - "invitationDid": { - "type": "string", - "nullable": false - }, - "outOfBandId": { - "type": "string", - "nullable": false - }, - "role": { - "type": "string", - "nullable": false - }, - "state": { - "type": "string", - "nullable": false - }, - "theirDid": { - "type": "string", - "nullable": false - }, - "threadId": { - "type": "string", - "nullable": false - } - } - }, - "AgentConnectionRecordV1": { - "type": "object", - "description": "Aries agent connection information.", - "additionalProperties": true, - "required": ["state", "role", "isReady"], - "properties": { - "state": { - "type": "string", - "nullable": false - }, - "role": { - "type": "string", - "nullable": false - }, - "isReady": { - "type": "boolean", - "nullable": false - }, - "did": { - "type": "string", - "nullable": false - }, - "theirDid": { - "type": "string", - "nullable": false - }, - "theirLabel": { - "type": "string", - "nullable": false - }, - "alias": { - "type": "string", - "nullable": false - }, - "threadId": { - "type": "string", - "nullable": false - }, - "errorMessage": { - "type": "string", - "nullable": false - }, - "outOfBandId": { - "type": "string", - "nullable": false - }, - "invitationDid": { - "type": "string", - "nullable": false - } - } - }, - "GetConnectionsV1Request": { - "type": "object", - "description": "Request for GetConnections endpoint.", - "required": ["agentName"], - "properties": { - "agentName": { - "type": "string", - "nullable": false - }, - "filter": { - "$ref": "#/components/schemas/AgentConnectionsFilterV1", - "nullable": false - } - } - }, - "GetConnectionsV1Response": { - "type": "array", - "description": "Response for GetConnections endpoint.", - "default": [], - "items": { - "$ref": "#/components/schemas/AgentConnectionRecordV1" - } - }, - "GetAgentsV1Response": { - "type": "array", - "description": "Response for GetAgents endpoint.", - "default": [], - "items": { - "$ref": "#/components/schemas/AriesAgentSummaryV1" - } - }, - "CreateNewConnectionInvitationV1Request": { - "type": "object", - "description": "Request for CreateNewConnectionInvitation endpoint.", - "required": ["agentName"], - "properties": { - "agentName": { - "type": "string", - "description": "Aries label of an agent to use to generate an invitation", - "nullable": false - }, - "invitationDomain": { - "type": "string", - "description": "Invitation URL domain to use. If not specified, then connector default domain will be used", - "nullable": false - } - } - }, - "CreateNewConnectionInvitationV1Response": { - "type": "object", - "description": "Response for CreateNewConnectionInvitation endpoint.", - "required": ["invitationUrl", "outOfBandId"], - "properties": { - "invitationUrl": { - "type": "string", - "description": "Invitation URL that can be used by another aries agent to connect to us.", - "nullable": false - }, - "outOfBandId": { - "type": "string", - "description": "ID that can be used to track status of the connection", - "nullable": false - } - } - }, - "AcceptInvitationV1Request": { - "type": "object", - "description": "Request for AcceptInvitation endpoint.", - "required": ["agentName", "invitationUrl"], - "properties": { - "agentName": { - "type": "string", - "description": "Aries label of an agent to be used to connect using URL", - "nullable": false - }, - "invitationUrl": { - "type": "string", - "description": "Invitation URL generated by another aries agent.", - "nullable": false - } - } - }, - "AcceptInvitationV1Response": { - "type": "object", - "description": "Response for AcceptInvitation endpoint.", - "required": ["outOfBandId"], - "properties": { - "outOfBandId": { - "type": "string", - "description": "ID that can be used to track status of the connection", - "nullable": false - } - } - }, - "RequestProofV1Request": { - "type": "object", - "description": "Request for RequestProof endpoint.", - "required": ["agentName", "connectionId", "proofAttributes"], - "properties": { - "agentName": { - "type": "string", - "description": "Aries label of an agent to be used to connect using URL", - "nullable": false - }, - "connectionId": { - "type": "string", - "description": "Peer connection ID from which we want to request a proof.", - "nullable": false - }, - "proofAttributes": { - "type": "array", - "nullable": false, - "items": { - "$ref": "#/components/schemas/CactiProofRequestAttributeV1", - "minItems": 1 - } - } - } - }, - "ErrorExceptionV1Response": { - "type": "object", - "description": "Error response from the connector.", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "description": "Short error description message.", - "nullable": false - }, - "error": { - "type": "string", - "description": "Detailed error information.", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents" - } - }, - "operationId": "getAgentsV1", - "summary": "Get all Aries agents configured in this connector plugin.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetAgentsV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections" - } - }, - "operationId": "getConnectionsV1", - "summary": "Get all connections of given aries agent.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConnectionsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetConnectionsV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation" - } - }, - "operationId": "createNewConnectionInvitationV1", - "summary": "Create new aries agent invitation that other agents can use to connect.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateNewConnectionInvitationV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateNewConnectionInvitationV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation" - } - }, - "operationId": "acceptInvitationV1", - "summary": "Connect to another agent using it's invitation URL", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptInvitationV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptInvitationV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof" - } - }, - "operationId": "requestProofV1", - "summary": "Request proof matching provided requriements from connected peer agent.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestProofV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AriesProofExchangeRecordV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionV1Response" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/api-client/aries-api-client.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/api-client/aries-api-client.ts deleted file mode 100644 index 6fc3fed8fe..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/api-client/aries-api-client.ts +++ /dev/null @@ -1,427 +0,0 @@ -import { Observable, ReplaySubject } from "rxjs"; -import { finalize } from "rxjs/operators"; -import { io } from "socket.io-client-fixed-types"; -import { ProofState } from "@aries-framework/core"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { Constants } from "@hyperledger/cactus-core-api"; - -import { - AgentConnectionRecordV1, - AriesProofExchangeRecordV1, - CactiProofRequestAttributeV1, - DefaultApi, - WatchConnectionStateOptionsV1, - WatchConnectionStateProgressV1, - WatchConnectionStateV1, - WatchProofStateOptionsV1, - WatchProofStateProgressV1, - WatchProofStateV1, -} from "../generated/openapi/typescript-axios"; -import { Configuration } from "../generated/openapi/typescript-axios/configuration"; - -export class AriesApiClientOptions extends Configuration { - readonly logLevel?: LogLevelDesc; - readonly wsApiHost?: string; - readonly wsApiPath?: string; -} - -/** - * Default timeout when waiting for certain operations (accepting proof, establishing connection, etc...) - */ -const DEFAULT_ARIES_OPERATION_TIMEOUT = 60 * 1000; - -/** - * How often to poll endpoints when waiting for operation to finish. - */ -const WAIT_FOR_CONNECTION_READY_POLL_INTERVAL = 500; - -export class AriesApiClient extends DefaultApi { - private readonly log: Logger; - private readonly wsApiHost: string; - private readonly wsApiPath: string; - - public get className(): string { - return "AriesApiClient"; - } - - constructor(public readonly options: AriesApiClientOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.wsApiHost = options.wsApiHost || options.basePath || location.host; - this.wsApiPath = options.wsApiPath || Constants.SocketIoConnectionPathV1; - this.log.debug(`Created ${this.className} OK.`); - this.log.debug(`wsApiHost=${this.wsApiHost}`); - this.log.debug(`wsApiPath=${this.wsApiPath}`); - this.log.debug(`basePath=${this.options.basePath}`); - } - - /** - * Watch for connection state changes on given agent. - * Example: New connection request, connection accepted. - * - * @param options Monitor options - * @returns rxjs `Observable` - */ - public watchConnectionStateV1( - options: WatchConnectionStateOptionsV1, - ): Observable { - const socket = io(this.wsApiHost, { path: this.wsApiPath }); - const subject = new ReplaySubject(0); - - socket.on( - WatchConnectionStateV1.Next, - (data: WatchConnectionStateProgressV1) => { - this.log.debug("Received WatchConnectionStateV1.Next"); - subject.next(data); - }, - ); - - socket.on(WatchConnectionStateV1.Error, (ex: string) => { - this.log.warn("Received WatchConnectionStateV1.Error:", ex); - subject.error(ex); - }); - - socket.on(WatchConnectionStateV1.Complete, () => { - this.log.debug("Received WatchConnectionStateV1.Complete"); - subject.complete(); - }); - - socket.on("connect", () => { - this.log.info( - "Connected OK, sending WatchConnectionStateV1.Subscribe request...", - ); - socket.emit(WatchConnectionStateV1.Subscribe, options); - }); - - socket.connect(); - - return subject.pipe( - finalize(() => { - this.log.info("FINALIZE - unsubscribing from the stream..."); - socket.emit(WatchConnectionStateV1.Unsubscribe); - socket.close(); - }), - ); - } - - /** - * Watch for proof state changes on given agent. - * Example: Proof request received, proof request was accepted by peer - * - * @param options Monitor options - * @returns rxjs `Observable` - */ - public watchProofStateV1( - options: WatchProofStateOptionsV1, - ): Observable { - const socket = io(this.wsApiHost, { path: this.wsApiPath }); - const subject = new ReplaySubject(0); - - socket.on(WatchProofStateV1.Next, (data: WatchProofStateProgressV1) => { - this.log.debug("Received WatchProofStateV1.Next"); - subject.next(data); - }); - - socket.on(WatchProofStateV1.Error, (ex: string) => { - this.log.warn("Received WatchProofStateV1.Error:", ex); - subject.error(ex); - }); - - socket.on(WatchProofStateV1.Complete, () => { - this.log.debug("Received WatchProofStateV1.Complete"); - subject.complete(); - }); - - socket.on("connect", () => { - this.log.info( - "Connected OK, sending WatchProofStateV1.Subscribe request...", - ); - socket.emit(WatchProofStateV1.Subscribe, options); - }); - - socket.connect(); - - return subject.pipe( - finalize(() => { - this.log.info("FINALIZE - unsubscribing from the stream..."); - socket.emit(WatchProofStateV1.Unsubscribe); - socket.close(); - }), - ); - } - - /** - * Helper method to wait for connection record to be created. - * This does not mean that connection is ready though, just that it was accepted by the peer. - * Will block until operation is completed. - * - * @param agentName agent that requested the connection. - * @param outOfBandId new connection outOfBandId - * @param timeout how much time to wait before giving up. - */ - private async waitForConnectionRecordV1( - agentName: string, - outOfBandId: string, - timeout = DEFAULT_ARIES_OPERATION_TIMEOUT, - ): Promise { - Checks.truthy(agentName, "waitForConnectionRecordV1 arg agentName"); - Checks.truthy(outOfBandId, "waitForConnectionRecordV1 arg outOfBandId"); - this.log.debug( - "waitForConnectionRecordV1 for agent", - agentName, - "outOfBandId", - outOfBandId, - ); - - return new Promise(async (resolve, reject) => { - // Common cleanup method for leaving the method - const cleanup = () => { - if (conStateSubscription) { - conStateSubscription.unsubscribe(); - } - - if (timeoutId) { - clearTimeout(timeoutId); - } - }; - - // Handle timeouts - const timeoutId = setTimeout(() => { - cleanup(); - reject( - new Error( - "waitForConnectionRecordV1() timeout - no connection found", - ), - ); - }, timeout); - - // Listen for connection establishment event - const conStateObservable = this.watchConnectionStateV1({ - agentName, - }); - const conStateSubscription = conStateObservable.subscribe((e) => { - if ( - e.connectionRecord.outOfBandId !== outOfBandId || - e.connectionRecord.state !== "completed" - ) { - return; - } - this.log.debug( - "waitForConnectionRecordV1() - received ConnectionStateChanged event for given outOfBandId", - ); - cleanup(); - resolve(); - }); - - // Also retrieve the connection record by invitation if the event has already fired - const connectionsResponse = await this.getConnectionsV1({ - agentName, - filter: { - outOfBandId, - }, - }); - const connection = connectionsResponse.data.pop(); - if (connection) { - this.log.debug( - "waitForConnectionRecordV1() - connection record already present", - ); - cleanup(); - resolve(); - } - }); - } - - /** - * Wait (block execution) until connection with specified `outOfBandId` is ready (connected). - * - * @param agentName agent with specific connection - * @param outOfBandId connection outOfBandId - * @param timeout how much time to wait before giving up. Must be at least 1 second. - */ - public async waitForConnectionReadyV1( - agentName: string, - outOfBandId: string, - timeout = DEFAULT_ARIES_OPERATION_TIMEOUT, - ): Promise { - Checks.truthy(agentName, "waitForConnectionReadyV1 arg agentName"); - Checks.truthy(outOfBandId, "waitForConnectionReadyV1 arg outOfBandId"); - Checks.truthy( - timeout > 2 * WAIT_FOR_CONNECTION_READY_POLL_INTERVAL, - "waitForConnectionReadyV1 arg timeout to small", - ); - let connection: AgentConnectionRecordV1 | undefined; - let counter = Math.ceil(timeout / WAIT_FOR_CONNECTION_READY_POLL_INTERVAL); - this.log.debug( - `waitForConnectionReadyV1() timeout ${timeout}, retry ${counter} times...`, - ); - - do { - try { - counter--; - await new Promise((resolve) => - setTimeout(resolve, WAIT_FOR_CONNECTION_READY_POLL_INTERVAL), - ); - - const connections = await this.getConnectionsV1({ - agentName, - filter: { - outOfBandId, - }, - }); - connection = connections.data.pop(); - } catch (error) { - this.log.error("waitForConnectionReadyV1() error:", error); - } - } while (counter > 0 && (!connection || !connection.isReady)); - - if (counter <= 0) { - throw new Error( - `waitForConnectionReadyV1() agent ${agentName} oobId ${outOfBandId} timeout reached!`, - ); - } - - this.log.info( - `waitForConnectionReadyV1() agent ${agentName} oobId ${outOfBandId} OK!`, - ); - } - - /** - * Wait until invitation URL is accepted by remote client and connection is established. - * Will block until operation is completed. - * - * @param agentName agent that requested the connection (sent the invitation) - * @param outOfBandId new connection outOfBandId - * @param timeout how much time to wait before giving up. - */ - public async waitForInvitedPeerConnectionV1( - agentName: string, - outOfBandId: string, - timeout = DEFAULT_ARIES_OPERATION_TIMEOUT, - ): Promise { - Checks.truthy(agentName, "waitForInvitedPeerConnectionV1 arg agentName"); - Checks.truthy( - outOfBandId, - "waitForInvitedPeerConnectionV1 arg outOfBandId", - ); - Checks.truthy( - timeout > 2 * WAIT_FOR_CONNECTION_READY_POLL_INTERVAL, - "waitForInvitedPeerConnectionV1 arg timeout to small", - ); - - await this.waitForConnectionRecordV1(agentName, outOfBandId, timeout); - this.log.info("waitForInvitedPeerConnectionV1() - connection record found"); - - await this.waitForConnectionReadyV1(agentName, outOfBandId, timeout); - } - - /** - * Wait until proof with specified ID was either accepted or denied. - * Will block until operation is completed. - * - * @param agentName agent that requested the proof. - * @param proofId id of the proof request. - * @param timeout how much time to wait before giving up. - */ - public async waitForProofCompletionV1( - agentName: string, - proofId: string, - timeout = DEFAULT_ARIES_OPERATION_TIMEOUT, - ): Promise { - Checks.truthy(agentName, "waitForProofCompletionV1 arg agentName"); - Checks.truthy(proofId, "waitForProofCompletionV1 arg proofId"); - - return new Promise((resolve, reject) => { - // Common cleanup method for leaving the method - const cleanup = () => { - if (proofStateSubscription) { - proofStateSubscription.unsubscribe(); - } - - if (timeoutId) { - clearTimeout(timeoutId); - } - }; - - const timeoutId = setTimeout(() => { - cleanup(); - reject( - new Error( - "Timeout reached - could not receive proof confirmation from peer", - ), - ); - }, timeout); - - // Listener for proof state changes - const proofStateObservable = this.watchProofStateV1({ - agentName, - }); - const proofStateSubscription = proofStateObservable.subscribe((e) => { - const { id, state } = e.proofRecord; - if (id === proofId) { - this.log.debug( - "Found proof state change with a matching ID", - e.proofRecord.id, - e.proofRecord.state, - ); - - if (state === ProofState.Abandoned || state === ProofState.Declined) { - cleanup(); - reject( - new Error( - `Proof ${id} was rejected! ${JSON.stringify(e.proofRecord)}`, - ), - ); - } - - if (state === ProofState.Done) { - cleanup(); - this.log.info(`Proof ${id} was accepted by the peer`); - resolve(e.proofRecord); - } - } - }); - }); - } - - /** - * Send proof request and wait for response (accepted / denied by a peer) - * Will block until operation is completed. - * - * @param agentName agent that will request the proof. - * @param connectionId peer connection id that should provide the proof. - * @param proofAttributes proof attributes to validate. - * @param timeout how much time to wait before giving up. - */ - public async requestProofAndWaitV1( - agentName: string, - connectionId: string, - proofAttributes: CactiProofRequestAttributeV1[], - timeout = DEFAULT_ARIES_OPERATION_TIMEOUT, - ): Promise { - Checks.truthy(agentName, "requestProofAndWaitV1 arg agentName"); - Checks.truthy(connectionId, "requestProofAndWaitV1 arg connectionId"); - Checks.truthy(proofAttributes, "requestProofAndWaitV1 arg proofAttributes"); - - const proof = await this.requestProofV1({ - agentName, - connectionId, - proofAttributes, - }); - const proofId = proof.data.id; - this.log.info("Sent proof request with id", proofId); - - return this.waitForProofCompletionV1(agentName, proofId, timeout); - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/aries-types.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/aries-types.ts deleted file mode 100644 index ec2681c106..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/aries-types.ts +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Helper functions used mostly to convert from Open API endpoint inputs to Aries compatible structures. - */ - -import { - Agent, - ConnectionsModule, - DidsModule, - CredentialsModule, - V2CredentialProtocol, - ProofsModule, - AutoAcceptProof, - V2ProofProtocol, - AutoAcceptCredential, - Query, - ConnectionRecord, - DidExchangeState, - DidExchangeRole, -} from "@aries-framework/core"; -import type { AskarModule } from "@aries-framework/askar"; -import type { IndyVdrModule } from "@aries-framework/indy-vdr"; -import type { - AnonCredsCredentialFormatService, - AnonCredsModule, - AnonCredsProofFormatService, - AnonCredsRequestedAttribute, -} from "@aries-framework/anoncreds"; -import type { AnonCredsRsModule } from "@aries-framework/anoncreds-rs"; - -import { - AgentConnectionsFilterV1, - CactiAcceptPolicyV1, - CactiProofRequestAttributeV1, -} from "./public-api"; - -/** - * Aries JS Agent with Anoncreds/Indy/Askar modules configured. - * This is exact Agent type returned by factories used by this connector for now. - */ -export type AnoncredAgent = Agent<{ - readonly connections: ConnectionsModule; - readonly credentials: CredentialsModule< - V2CredentialProtocol[] - >; - readonly proofs: ProofsModule< - V2ProofProtocol[] - >; - readonly anoncreds: AnonCredsModule; - readonly anoncredsRs: AnonCredsRsModule; - readonly indyVdr: IndyVdrModule; - readonly dids: DidsModule; - readonly askar: AskarModule; -}>; - -/** - * Convert Cacti OpenAPI input to Aries compatible `AutoAcceptProof` - * - * @param policy `CactiAcceptPolicyV1` - * @returns `AutoAcceptProof` - */ -export function cactiAcceptPolicyToAutoAcceptProof( - policy: CactiAcceptPolicyV1, -): AutoAcceptProof { - switch (policy) { - case CactiAcceptPolicyV1.Always: - return AutoAcceptProof.Always; - case CactiAcceptPolicyV1.ContentApproved: - return AutoAcceptProof.ContentApproved; - case CactiAcceptPolicyV1.Never: - return AutoAcceptProof.Never; - default: - const _unknownPolicy: never = policy; - throw new Error(`Unknown CactiAcceptPolicyV1: ${_unknownPolicy}`); - } -} - -/** - * Convert Cacti OpenAPI input to Aries compatible `AutoAcceptCredential` - * - * @param policy `CactiAcceptPolicyV1` - * @returns `AutoAcceptCredential` - */ -export function cactiAcceptPolicyToAutoAcceptCredential( - policy: CactiAcceptPolicyV1, -): AutoAcceptCredential { - switch (policy) { - case CactiAcceptPolicyV1.Always: - return AutoAcceptCredential.Always; - case CactiAcceptPolicyV1.ContentApproved: - return AutoAcceptCredential.ContentApproved; - case CactiAcceptPolicyV1.Never: - return AutoAcceptCredential.Never; - default: - const _unknownPolicy: never = policy; - throw new Error(`Unknown CactiAcceptPolicyV1: ${_unknownPolicy}`); - } -} - -/** - * Validate and convert value to any enum (intended to use with AFJ but should work with any enum) - * - * @param enumType enum to validate the value against - * @param value string value - * @returns same value converted to the enum or undefined if value missing. Throws exception if validation failed. - */ -export function validateEnumValue>( - enumType: T, - value?: string, -): T[keyof T] | undefined { - if (!value) { - return undefined; - } - - if (!Object.values(enumType).includes(value)) { - throw new Error(`Invalid aries enum value: ${value}`); - } - - return value as unknown as T[keyof T]; -} - -/** - * Convert Cacti OpenAPI input to Aries compatible `ConnectionRecord` filter `Query`. - * Validates enums and throws exception if invalid value was used. - * - * @param filter `AgentConnectionsFilterV1` - * @returns `Query` - */ -export function cactiAgentConnectionsFilterToQuery( - filter: AgentConnectionsFilterV1, -): Query { - return { - ...filter, - state: validateEnumValue(DidExchangeState, filter.state), - role: validateEnumValue(DidExchangeRole, filter.role), - }; -} - -/** - * Convert Cacti OpenAPI input to Aries compatible proof request restrictions. - * - * @param proofAttributes `CactiProofRequestAttributeV1[]` - * @returns `Record` - */ -export async function cactiAttributesToAnonCredsRequestedAttributes( - proofAttributes: CactiProofRequestAttributeV1[], -): Promise> { - const attributesArray = proofAttributes.map((attr) => { - return [ - attr.name, - { - name: attr.name, - restrictions: [ - { - [`attr::${attr.name}::value`]: attr.isValueEqual, - cred_def_id: attr.isCredentialDefinitionIdEqual, - }, - ], - }, - ]; - }); - - return Object.fromEntries(attributesArray); -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index f3bea71196..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,988 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Aries - * Can communicate with other Aries agents and Cacti Aries connectors - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * Request for AcceptInvitation endpoint. - * @export - * @interface AcceptInvitationV1Request - */ -export interface AcceptInvitationV1Request { - /** - * Aries label of an agent to be used to connect using URL - * @type {string} - * @memberof AcceptInvitationV1Request - */ - 'agentName': string; - /** - * Invitation URL generated by another aries agent. - * @type {string} - * @memberof AcceptInvitationV1Request - */ - 'invitationUrl': string; -} -/** - * Response for AcceptInvitation endpoint. - * @export - * @interface AcceptInvitationV1Response - */ -export interface AcceptInvitationV1Response { - /** - * ID that can be used to track status of the connection - * @type {string} - * @memberof AcceptInvitationV1Response - */ - 'outOfBandId': string; -} -/** - * Aries agent connection information. - * @export - * @interface AgentConnectionRecordV1 - */ -export interface AgentConnectionRecordV1 { - [key: string]: any; - - /** - * - * @type {string} - * @memberof AgentConnectionRecordV1 - */ - 'state': string; - /** - * - * @type {string} - * @memberof AgentConnectionRecordV1 - */ - 'role': string; - /** - * - * @type {boolean} - * @memberof AgentConnectionRecordV1 - */ - 'isReady': boolean; - /** - * - * @type {string} - * @memberof AgentConnectionRecordV1 - */ - 'did'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionRecordV1 - */ - 'theirDid'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionRecordV1 - */ - 'theirLabel'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionRecordV1 - */ - 'alias'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionRecordV1 - */ - 'threadId'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionRecordV1 - */ - 'errorMessage'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionRecordV1 - */ - 'outOfBandId'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionRecordV1 - */ - 'invitationDid'?: string; -} -/** - * Fields that can be used to filter agent connection list. - * @export - * @interface AgentConnectionsFilterV1 - */ -export interface AgentConnectionsFilterV1 { - /** - * - * @type {string} - * @memberof AgentConnectionsFilterV1 - */ - 'did'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionsFilterV1 - */ - 'invitationDid'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionsFilterV1 - */ - 'outOfBandId'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionsFilterV1 - */ - 'role'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionsFilterV1 - */ - 'state'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionsFilterV1 - */ - 'theirDid'?: string; - /** - * - * @type {string} - * @memberof AgentConnectionsFilterV1 - */ - 'threadId'?: string; -} -/** - * Aries agent configuration to be setup and used by the connector. - * @export - * @interface AriesAgentConfigV1 - */ -export interface AriesAgentConfigV1 { - /** - * Aries agent label that will also be used as wallet id. - * @type {string} - * @memberof AriesAgentConfigV1 - */ - 'name': string; - /** - * Wallet private key - do not share with anyone. - * @type {string} - * @memberof AriesAgentConfigV1 - */ - 'walletKey': string; - /** - * Path to wallet sqlite database to use. If not provided, the connector default path and agent name will be used. - * @type {string} - * @memberof AriesAgentConfigV1 - */ - 'walletPath'?: string; - /** - * - * @type {Array} - * @memberof AriesAgentConfigV1 - */ - 'indyNetworks': Array; - /** - * Inbound endpoint URL for this agent. Must be unique for this connector. Must contain port. - * @type {string} - * @memberof AriesAgentConfigV1 - */ - 'inboundUrl'?: string; - /** - * Flag to accept new connection by default - * @type {boolean} - * @memberof AriesAgentConfigV1 - */ - 'autoAcceptConnections'?: boolean; - /** - * - * @type {CactiAcceptPolicyV1} - * @memberof AriesAgentConfigV1 - */ - 'autoAcceptCredentials'?: CactiAcceptPolicyV1; - /** - * - * @type {CactiAcceptPolicyV1} - * @memberof AriesAgentConfigV1 - */ - 'autoAcceptProofs'?: CactiAcceptPolicyV1; -} - - -/** - * Summary of an Aries Agent configured in the connector. - * @export - * @interface AriesAgentSummaryV1 - */ -export interface AriesAgentSummaryV1 { - /** - * Aries label of an agent - * @type {string} - * @memberof AriesAgentSummaryV1 - */ - 'name': string; - /** - * True when Aries agent has been initialized properly. - * @type {boolean} - * @memberof AriesAgentSummaryV1 - */ - 'isAgentInitialized': boolean; - /** - * True when this agents wallet has been initialized properly. - * @type {boolean} - * @memberof AriesAgentSummaryV1 - */ - 'isWalletInitialized': boolean; - /** - * True when this agents wallet has been provisioned properly. - * @type {boolean} - * @memberof AriesAgentSummaryV1 - */ - 'isWalletProvisioned': boolean; - /** - * - * @type {AriesAgentSummaryV1WalletConfig} - * @memberof AriesAgentSummaryV1 - */ - 'walletConfig': AriesAgentSummaryV1WalletConfig; - /** - * Aries agent endpoints configured - * @type {Array} - * @memberof AriesAgentSummaryV1 - */ - 'endpoints': Array; -} -/** - * - * @export - * @interface AriesAgentSummaryV1WalletConfig - */ -export interface AriesAgentSummaryV1WalletConfig { - /** - * Wallet entry ID - * @type {string} - * @memberof AriesAgentSummaryV1WalletConfig - */ - 'id': string; - /** - * Wallet storage type - * @type {string} - * @memberof AriesAgentSummaryV1WalletConfig - */ - 'type': string; -} -/** - * Indy VDR network configuration - * @export - * @interface AriesIndyVdrPoolConfigV1 - */ -export interface AriesIndyVdrPoolConfigV1 { - /** - * Indy genesis transactions. - * @type {string} - * @memberof AriesIndyVdrPoolConfigV1 - */ - 'genesisTransactions': string; - /** - * Flag to specify whether this is production or development ledger. - * @type {boolean} - * @memberof AriesIndyVdrPoolConfigV1 - */ - 'isProduction': boolean; - /** - * Indy namespace - * @type {string} - * @memberof AriesIndyVdrPoolConfigV1 - */ - 'indyNamespace': string; - /** - * Connect to the ledger on startup flag - * @type {boolean} - * @memberof AriesIndyVdrPoolConfigV1 - */ - 'connectOnStartup'?: boolean; -} -/** - * Proof exchange record from Aries framework (simplified) - * @export - * @interface AriesProofExchangeRecordV1 - */ -export interface AriesProofExchangeRecordV1 { - [key: string]: any; - - /** - * - * @type {string} - * @memberof AriesProofExchangeRecordV1 - */ - 'id': string; - /** - * - * @type {string} - * @memberof AriesProofExchangeRecordV1 - */ - 'connectionId'?: string; - /** - * - * @type {string} - * @memberof AriesProofExchangeRecordV1 - */ - 'threadId': string; - /** - * - * @type {string} - * @memberof AriesProofExchangeRecordV1 - */ - 'state': string; - /** - * - * @type {string} - * @memberof AriesProofExchangeRecordV1 - */ - 'protocolVersion': string; - /** - * - * @type {boolean} - * @memberof AriesProofExchangeRecordV1 - */ - 'isVerified'?: boolean; - /** - * - * @type {string} - * @memberof AriesProofExchangeRecordV1 - */ - 'errorMessage'?: string; -} -/** - * Credential / Proof requests acceptance policies for Aries agent - * @export - * @enum {string} - */ - -export const CactiAcceptPolicyV1 = { - Always: 'always', - ContentApproved: 'contentApproved', - Never: 'never' -} as const; - -export type CactiAcceptPolicyV1 = typeof CactiAcceptPolicyV1[keyof typeof CactiAcceptPolicyV1]; - - -/** - * Credential attribute checks to be performed by a proof request. - * @export - * @interface CactiProofRequestAttributeV1 - */ -export interface CactiProofRequestAttributeV1 { - /** - * Attribute name. - * @type {string} - * @memberof CactiProofRequestAttributeV1 - */ - 'name': string; - /** - * Check if attribute has specified value - * @type {any} - * @memberof CactiProofRequestAttributeV1 - */ - 'isValueEqual'?: any; - /** - * Check if credentialDefinitionId has specified value - * @type {any} - * @memberof CactiProofRequestAttributeV1 - */ - 'isCredentialDefinitionIdEqual'?: any; -} -/** - * Request for CreateNewConnectionInvitation endpoint. - * @export - * @interface CreateNewConnectionInvitationV1Request - */ -export interface CreateNewConnectionInvitationV1Request { - /** - * Aries label of an agent to use to generate an invitation - * @type {string} - * @memberof CreateNewConnectionInvitationV1Request - */ - 'agentName': string; - /** - * Invitation URL domain to use. If not specified, then connector default domain will be used - * @type {string} - * @memberof CreateNewConnectionInvitationV1Request - */ - 'invitationDomain'?: string; -} -/** - * Response for CreateNewConnectionInvitation endpoint. - * @export - * @interface CreateNewConnectionInvitationV1Response - */ -export interface CreateNewConnectionInvitationV1Response { - /** - * Invitation URL that can be used by another aries agent to connect to us. - * @type {string} - * @memberof CreateNewConnectionInvitationV1Response - */ - 'invitationUrl': string; - /** - * ID that can be used to track status of the connection - * @type {string} - * @memberof CreateNewConnectionInvitationV1Response - */ - 'outOfBandId': string; -} -/** - * Error response from the connector. - * @export - * @interface ErrorExceptionV1Response - */ -export interface ErrorExceptionV1Response { - /** - * Short error description message. - * @type {string} - * @memberof ErrorExceptionV1Response - */ - 'message': string; - /** - * Detailed error information. - * @type {string} - * @memberof ErrorExceptionV1Response - */ - 'error': string; -} -/** - * Request for GetConnections endpoint. - * @export - * @interface GetConnectionsV1Request - */ -export interface GetConnectionsV1Request { - /** - * - * @type {string} - * @memberof GetConnectionsV1Request - */ - 'agentName': string; - /** - * - * @type {AgentConnectionsFilterV1} - * @memberof GetConnectionsV1Request - */ - 'filter'?: AgentConnectionsFilterV1; -} -/** - * Request for RequestProof endpoint. - * @export - * @interface RequestProofV1Request - */ -export interface RequestProofV1Request { - /** - * Aries label of an agent to be used to connect using URL - * @type {string} - * @memberof RequestProofV1Request - */ - 'agentName': string; - /** - * Peer connection ID from which we want to request a proof. - * @type {string} - * @memberof RequestProofV1Request - */ - 'connectionId': string; - /** - * - * @type {Array} - * @memberof RequestProofV1Request - */ - 'proofAttributes': Array; -} -/** - * Options passed when monitoring connection change events. - * @export - * @interface WatchConnectionStateOptionsV1 - */ -export interface WatchConnectionStateOptionsV1 { - /** - * Aries agent label that will also be used as wallet id. - * @type {string} - * @memberof WatchConnectionStateOptionsV1 - */ - 'agentName': string; -} -/** - * Values pushed on each connection state change. - * @export - * @interface WatchConnectionStateProgressV1 - */ -export interface WatchConnectionStateProgressV1 { - /** - * - * @type {AgentConnectionRecordV1} - * @memberof WatchConnectionStateProgressV1 - */ - 'connectionRecord': AgentConnectionRecordV1; - /** - * - * @type {string} - * @memberof WatchConnectionStateProgressV1 - */ - 'previousState': string | null; -} -/** - * Websocket requests for monitoring connection change events. - * @export - * @enum {string} - */ - -export const WatchConnectionStateV1 = { - Subscribe: 'org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Subscribe', - Next: 'org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Next', - Unsubscribe: 'org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Unsubscribe', - Error: 'org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Error', - Complete: 'org.hyperledger.cactus.api.async.hlaries.WatchConnectionStateV1.Complete' -} as const; - -export type WatchConnectionStateV1 = typeof WatchConnectionStateV1[keyof typeof WatchConnectionStateV1]; - - -/** - * Options passed when monitoring proof state change events. - * @export - * @interface WatchProofStateOptionsV1 - */ -export interface WatchProofStateOptionsV1 { - /** - * Aries agent label that will also be used as wallet id. - * @type {string} - * @memberof WatchProofStateOptionsV1 - */ - 'agentName': string; -} -/** - * Values pushed on each proof state change. - * @export - * @interface WatchProofStateProgressV1 - */ -export interface WatchProofStateProgressV1 { - /** - * - * @type {AriesProofExchangeRecordV1} - * @memberof WatchProofStateProgressV1 - */ - 'proofRecord': AriesProofExchangeRecordV1; - /** - * - * @type {string} - * @memberof WatchProofStateProgressV1 - */ - 'previousState': string | null; -} -/** - * Websocket requests for monitoring proof state change events. - * @export - * @enum {string} - */ - -export const WatchProofStateV1 = { - Subscribe: 'org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Subscribe', - Next: 'org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Next', - Unsubscribe: 'org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Unsubscribe', - Error: 'org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Error', - Complete: 'org.hyperledger.cactus.api.async.hlaries.WatchProofStateV1.Complete' -} as const; - -export type WatchProofStateV1 = typeof WatchProofStateV1[keyof typeof WatchProofStateV1]; - - - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Connect to another agent using it\'s invitation URL - * @param {AcceptInvitationV1Request} [acceptInvitationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - acceptInvitationV1: async (acceptInvitationV1Request?: AcceptInvitationV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(acceptInvitationV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Create new aries agent invitation that other agents can use to connect. - * @param {CreateNewConnectionInvitationV1Request} [createNewConnectionInvitationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createNewConnectionInvitationV1: async (createNewConnectionInvitationV1Request?: CreateNewConnectionInvitationV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createNewConnectionInvitationV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get all Aries agents configured in this connector plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAgentsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get all connections of given aries agent. - * @param {GetConnectionsV1Request} [getConnectionsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConnectionsV1: async (getConnectionsV1Request?: GetConnectionsV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getConnectionsV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Request proof matching provided requriements from connected peer agent. - * @param {RequestProofV1Request} [requestProofV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - requestProofV1: async (requestProofV1Request?: RequestProofV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(requestProofV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Connect to another agent using it\'s invitation URL - * @param {AcceptInvitationV1Request} [acceptInvitationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async acceptInvitationV1(acceptInvitationV1Request?: AcceptInvitationV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.acceptInvitationV1(acceptInvitationV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Create new aries agent invitation that other agents can use to connect. - * @param {CreateNewConnectionInvitationV1Request} [createNewConnectionInvitationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createNewConnectionInvitationV1(createNewConnectionInvitationV1Request?: CreateNewConnectionInvitationV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createNewConnectionInvitationV1(createNewConnectionInvitationV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get all Aries agents configured in this connector plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getAgentsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAgentsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get all connections of given aries agent. - * @param {GetConnectionsV1Request} [getConnectionsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConnectionsV1(getConnectionsV1Request?: GetConnectionsV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConnectionsV1(getConnectionsV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Request proof matching provided requriements from connected peer agent. - * @param {RequestProofV1Request} [requestProofV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async requestProofV1(requestProofV1Request?: RequestProofV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.requestProofV1(requestProofV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Connect to another agent using it\'s invitation URL - * @param {AcceptInvitationV1Request} [acceptInvitationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - acceptInvitationV1(acceptInvitationV1Request?: AcceptInvitationV1Request, options?: any): AxiosPromise { - return localVarFp.acceptInvitationV1(acceptInvitationV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Create new aries agent invitation that other agents can use to connect. - * @param {CreateNewConnectionInvitationV1Request} [createNewConnectionInvitationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createNewConnectionInvitationV1(createNewConnectionInvitationV1Request?: CreateNewConnectionInvitationV1Request, options?: any): AxiosPromise { - return localVarFp.createNewConnectionInvitationV1(createNewConnectionInvitationV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get all Aries agents configured in this connector plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAgentsV1(options?: any): AxiosPromise> { - return localVarFp.getAgentsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get all connections of given aries agent. - * @param {GetConnectionsV1Request} [getConnectionsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConnectionsV1(getConnectionsV1Request?: GetConnectionsV1Request, options?: any): AxiosPromise> { - return localVarFp.getConnectionsV1(getConnectionsV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Request proof matching provided requriements from connected peer agent. - * @param {RequestProofV1Request} [requestProofV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - requestProofV1(requestProofV1Request?: RequestProofV1Request, options?: any): AxiosPromise { - return localVarFp.requestProofV1(requestProofV1Request, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Connect to another agent using it\'s invitation URL - * @param {AcceptInvitationV1Request} [acceptInvitationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public acceptInvitationV1(acceptInvitationV1Request?: AcceptInvitationV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).acceptInvitationV1(acceptInvitationV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Create new aries agent invitation that other agents can use to connect. - * @param {CreateNewConnectionInvitationV1Request} [createNewConnectionInvitationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public createNewConnectionInvitationV1(createNewConnectionInvitationV1Request?: CreateNewConnectionInvitationV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).createNewConnectionInvitationV1(createNewConnectionInvitationV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get all Aries agents configured in this connector plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getAgentsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getAgentsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get all connections of given aries agent. - * @param {GetConnectionsV1Request} [getConnectionsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getConnectionsV1(getConnectionsV1Request?: GetConnectionsV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getConnectionsV1(getConnectionsV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Request proof matching provided requriements from connected peer agent. - * @param {RequestProofV1Request} [requestProofV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public requestProofV1(requestProofV1Request?: RequestProofV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).requestProofV1(requestProofV1Request, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index f21b4cd6cb..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Aries - * Can communicate with other Aries agents and Cacti Aries connectors - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 1a9fa58445..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Aries - * Can communicate with other Aries agents and Cacti Aries connectors - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 92dbe5e8ef..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Aries - * Can communicate with other Aries agents and Cacti Aries connectors - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index ac22566a76..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Aries - * Can communicate with other Aries agents and Cacti Aries connectors - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/index.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/index.web.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/index.web.ts deleted file mode 100755 index 1c773242d5..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./generated/openapi/typescript-axios"; diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/plugin-factory-ledger-connector.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/plugin-factory-ledger-connector.ts deleted file mode 100644 index 3a3f0cc94c..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginLedgerConnectorAriesOptions, - PluginLedgerConnectorAries, -} from "./plugin-ledger-connector-aries"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorAries, - IPluginLedgerConnectorAriesOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorAriesOptions, - ): Promise { - return new PluginLedgerConnectorAries(pluginOptions); - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/plugin-ledger-connector-aries.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/plugin-ledger-connector-aries.ts deleted file mode 100644 index 5836337ef2..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/plugin-ledger-connector-aries.ts +++ /dev/null @@ -1,672 +0,0 @@ -import type { - Server as SocketIoServer, - Socket as SocketIoSocket, -} from "socket.io"; -import type { Express } from "express"; -import * as path from "node:path"; -import * as os from "node:os"; -import { AskarModule } from "@aries-framework/askar"; -import { - Agent, - InitConfig, - HttpOutboundTransport, - ConnectionsModule, - DidsModule, - TypedArrayEncoder, - KeyType, - CredentialsModule, - V2CredentialProtocol, - ProofsModule, - AutoAcceptProof, - V2ProofProtocol, - AutoAcceptCredential, -} from "@aries-framework/core"; -import { agentDependencies, HttpInboundTransport } from "@aries-framework/node"; -import { ariesAskar } from "@hyperledger/aries-askar-nodejs"; -import { - IndyVdrAnonCredsRegistry, - IndyVdrIndyDidRegistrar, - IndyVdrIndyDidResolver, - IndyVdrModule, - IndyVdrPoolConfig, -} from "@aries-framework/indy-vdr"; -import { indyVdr } from "@hyperledger/indy-vdr-nodejs"; -import { - AnonCredsCredentialFormatService, - AnonCredsModule, - AnonCredsProofFormatService, -} from "@aries-framework/anoncreds"; -import { AnonCredsRsModule } from "@aries-framework/anoncreds-rs"; -import { anoncreds } from "@hyperledger/anoncreds-nodejs"; - -import { - IWebServiceEndpoint, - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, - safeStringifyException, -} from "@hyperledger/cactus-common"; - -import OAS from "../json/openapi.json"; -import { - AcceptInvitationV1Response, - AgentConnectionRecordV1, - AgentConnectionsFilterV1, - AriesAgentConfigV1, - AriesAgentSummaryV1, - AriesProofExchangeRecordV1, - CactiProofRequestAttributeV1, - CreateNewConnectionInvitationV1Response, - WatchConnectionStateOptionsV1, - WatchConnectionStateV1, - WatchProofStateOptionsV1, - WatchProofStateV1, -} from "./generated/openapi/typescript-axios"; -import { - AnoncredAgent, - cactiAgentConnectionsFilterToQuery, - cactiAttributesToAnonCredsRequestedAttributes, -} from "./aries-types"; - -import { WatchConnectionStateV1Endpoint } from "./web-services/watch-connection-state-v1-endpoint"; -import { WatchProofStateV1Endpoint } from "./web-services/watch-proof-state-v1-endpoint"; -import { GetAgentsEndpoint } from "./web-services/get-agents-v1-endpoint"; -import { RequestProofEndpoint } from "./web-services/request-proof-v1-endpoint"; -import { GetConnectionsEndpoint } from "./web-services/get-connections-v1-endpoint"; -import { CreateNewConnectionInvitationEndpoint } from "./web-services/create-new-connection-invitation-v1-endpoint"; -import { AcceptInvitationEndpoint } from "./web-services/accept-invitation-v1-endpoint"; - -const DEFAULT_INVITATION_DOMAIN = "https://example.org"; -const DEFAULT_WALLET_PATH = path.join( - os.homedir(), - ".cacti/cactus-plugin-ledger-connector-aries/wallet", -); - -export interface IPluginLedgerConnectorAriesOptions - extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - // pluginRegistry: PluginRegistry; - ariesAgents?: AriesAgentConfigV1[]; - invitationDomain?: string; - walletPath?: string; -} - -export class PluginLedgerConnectorAries - implements ICactusPlugin, IPluginWebService -{ - // private readonly pluginRegistry: PluginRegistry; - private readonly instanceId: string; - private readonly invitationDomain: string; - private readonly walletPath: string; - private readonly log: Logger; - private endpoints: IWebServiceEndpoint[] | undefined; - private ariesAgentConfigs: AriesAgentConfigV1[] | undefined; - private ariesAgents = new Map(); - private connectedSockets = new Map(); - - public get className(): string { - return "PluginLedgerConnectorAries"; - } - - constructor(public readonly options: IPluginLedgerConnectorAriesOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - // Checks.truthy(options.pluginRegistry, `${fnTag} options.pluginRegistry`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = options.instanceId; - this.invitationDomain = - options.invitationDomain ?? DEFAULT_INVITATION_DOMAIN; - this.walletPath = options.walletPath ?? DEFAULT_WALLET_PATH; - this.ariesAgentConfigs = options.ariesAgents; - // this.pluginRegistry = options.pluginRegistry as PluginRegistry; - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getInstanceId(): string { - return this.instanceId; - } - - /** - * Closes all socketio connections and shutdowns every agent configured in this connector. - */ - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - - this.log.debug("Disconnect all the sockets"); - this.connectedSockets.forEach((socket) => socket.disconnect()); - - for (const [agentName, agent] of this.ariesAgents) { - this.log.debug("Shutdown agent", agentName); - await agent.shutdown(); - } - - this.ariesAgents.clear(); - } - - /** - * Creates Aries agent instances defined in connector constructor. - */ - public async onPluginInit(): Promise { - if (this.ariesAgentConfigs) { - this.log.info("Create aries agent instances"); - for (const agentConfig of this.ariesAgentConfigs) { - await this.addAriesAgent(agentConfig); - } - } - } - - async registerWebServices( - app: Express, - wsApi: SocketIoServer, - ): Promise { - const { logLevel } = this.options; - - // Register OpenAPI - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - - // Register SocketIO (on new connection from the client) - wsApi.on("connection", (socket: SocketIoSocket) => { - this.log.info(`New Socket connected. ID=${socket.id}`); - this.connectedSockets.set(socket.id, socket); - - // WatchConnectionStateV1 - socket.on( - WatchConnectionStateV1.Subscribe, - async (options: WatchConnectionStateOptionsV1) => { - try { - const agent = await this.getAriesAgentOrThrow(options.agentName); - new WatchConnectionStateV1Endpoint({ - socket, - logLevel, - agent, - }).subscribe(); - } catch (error) { - this.log.warn(WatchConnectionStateV1.Error, error); - socket.emit( - WatchConnectionStateV1.Error, - safeStringifyException(error), - ); - socket.disconnect(); - } - }, - ); - - // WatchProofStateV1Endpoint - socket.on( - WatchProofStateV1.Subscribe, - async (options: WatchProofStateOptionsV1) => { - try { - const agent = await this.getAriesAgentOrThrow(options.agentName); - new WatchProofStateV1Endpoint({ - socket, - logLevel, - agent, - }).subscribe(); - } catch (error) { - this.log.warn(WatchProofStateV1.Error, error); - socket.emit(WatchProofStateV1.Error, safeStringifyException(error)); - socket.disconnect(); - } - }, - ); - - // Disconnect - socket.on("disconnect", () => { - this.connectedSockets.delete(socket.id); - }); - }); - - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new GetAgentsEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new RequestProofEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new GetConnectionsEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new CreateNewConnectionInvitationEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new AcceptInvitationEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - - this.endpoints = endpoints; - return endpoints; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-ledger-connector-aries`; - } - - /** - * Get summary of Aries agents managed by this connector. - * - * @returns Summary of Aries agents. - */ - public async getAgents(): Promise { - const allAgents = new Array(...this.ariesAgents.values()); - return allAgents.map((agent) => { - if (!agent.config.walletConfig) { - this.log.error( - `Agent ${agent.config.label} doesn't have a wallet configured!`, - ); - } - - return { - name: agent.config.label, - isAgentInitialized: agent.isInitialized, - isWalletInitialized: agent.wallet.isInitialized, - isWalletProvisioned: agent.wallet.isProvisioned, - walletConfig: { - id: agent.config?.walletConfig?.id ?? "unknown", - type: agent.config?.walletConfig?.storage?.type ?? "unknown", - }, - endpoints: agent.config.endpoints, - }; - }); - } - - /** - * Get Aries agent with provided name from this connector or throw error. - * @param agentName agent name to get. - * - * @returns `AnoncredAgent` - */ - public async getAriesAgentOrThrow(agentName: string): Promise { - const agent = this.ariesAgents.get(agentName); - if (!agent) { - throw new Error(`No agent with a name ${agentName}`); - } - return agent; - } - - /** - * Get Aries agent modules that matches current default configuration for this connector. - * Right now only Anoncreds on Indy is supported. - * - * @param agentConfig Agent configuration. - * @returns Modules that can be used to create new Aries agent. - */ - private getAskarAnonCredsIndyModules(agentConfig: AriesAgentConfigV1) { - if (!agentConfig.indyNetworks || agentConfig.indyNetworks.length === 0) { - throw new Error( - `Agent ${agentConfig.name} must have at least one Indy network defined!`, - ); - } - - // For now we assume default accept policies but in the future we can use the user input: - // const autoAcceptConnections = agentConfig.autoAcceptConnections ?? false; - // this.log.debug( - // `Agent ${agentConfig.name} autoAcceptConnections:`, - // autoAcceptConnections, - // ); - // const autoAcceptCredentials = agentConfig.autoAcceptCredentials - // ? cactiAcceptPolicyToAutoAcceptCredential( - // agentConfig.autoAcceptCredentials, - // ) - // : AutoAcceptCredential.Never; - // this.log.debug( - // `Agent ${agentConfig.name} autoAcceptCredentials:`, - // autoAcceptCredentials, - // ); - // const autoAcceptProofs = agentConfig.autoAcceptProofs - // ? cactiAcceptPolicyToAutoAcceptProof(agentConfig.autoAcceptProofs) - // : AutoAcceptProof.Never; - // this.log.debug( - // `Agent ${agentConfig.name} autoAcceptProofs:`, - // autoAcceptProofs, - // ); - - const autoAcceptConnections = true; - this.log.debug( - `Agent ${agentConfig.name} autoAcceptConnections:`, - autoAcceptConnections, - ); - const autoAcceptCredentials = AutoAcceptCredential.ContentApproved; - this.log.debug( - `Agent ${agentConfig.name} autoAcceptCredentials:`, - autoAcceptCredentials, - ); - const autoAcceptProofs = AutoAcceptProof.ContentApproved; - this.log.debug( - `Agent ${agentConfig.name} autoAcceptProofs:`, - autoAcceptProofs, - ); - - return { - connections: new ConnectionsModule({ - autoAcceptConnections, - }), - - credentials: new CredentialsModule({ - autoAcceptCredentials, - credentialProtocols: [ - new V2CredentialProtocol({ - credentialFormats: [new AnonCredsCredentialFormatService()], - }), - ], - }), - - proofs: new ProofsModule({ - autoAcceptProofs, - proofProtocols: [ - new V2ProofProtocol({ - proofFormats: [new AnonCredsProofFormatService()], - }), - ], - }), - - anoncreds: new AnonCredsModule({ - registries: [new IndyVdrAnonCredsRegistry()], - }), - - anoncredsRs: new AnonCredsRsModule({ - anoncreds, - }), - - indyVdr: new IndyVdrModule({ - indyVdr, - networks: agentConfig.indyNetworks as [ - IndyVdrPoolConfig, - ...IndyVdrPoolConfig[], - ], - }), - - dids: new DidsModule({ - registrars: [new IndyVdrIndyDidRegistrar()], - resolvers: [new IndyVdrIndyDidResolver()], - }), - - askar: new AskarModule({ ariesAskar }), - } as const; - } - - /** - * Create and add new Aries agent to this connector. - * Agent can later be used to interact with other Aries agent and Indy VDR. - * Wallet ID and agent label will be the same as provided agent name. - * - * @param agentConfig Agent configuration. - * @returns newly created Aries agent. - */ - public async addAriesAgent( - agentConfig: AriesAgentConfigV1, - ): Promise { - Checks.truthy(agentConfig, `addAriesAgent arg agentConfig`); - Checks.truthy(agentConfig.name, `addAriesAgent arg agentConfig.name`); - Checks.truthy( - !this.ariesAgents.has(agentConfig.name), - `addAriesAgent arg agentConfig.name already used`, - ); - Checks.truthy( - agentConfig.walletKey, - `addAriesAgent arg agentConfig.walletKey`, - ); - Checks.truthy( - agentConfig.indyNetworks, - `addAriesAgent arg agentConfig.indyNetworks`, - ); - - let walletPath = path.join(this.walletPath, `${agentConfig.name}.sqlite`); - if (agentConfig.walletPath) { - walletPath = agentConfig.walletPath; - } - const config: InitConfig = { - label: agentConfig.name, - walletConfig: { - id: agentConfig.name, - key: agentConfig.walletKey, - storage: { - type: "sqlite", - path: walletPath, - }, - }, - endpoints: agentConfig.inboundUrl ? [agentConfig.inboundUrl] : undefined, - }; - - const agent = new Agent({ - config, - modules: this.getAskarAnonCredsIndyModules(agentConfig), - dependencies: agentDependencies, - }); - - if (agentConfig.inboundUrl) { - const port = parseInt(new URL(agentConfig.inboundUrl).port, 10); - if (!port) { - throw new Error( - `inboundUrl (${agentConfig.inboundUrl}) for agent ${agentConfig.name} must contain port`, - ); - } - agent.registerInboundTransport(new HttpInboundTransport({ port })); - } - agent.registerOutboundTransport(new HttpOutboundTransport()); - - await agent.initialize(); - this.ariesAgents.set(agentConfig.name, agent); - this.log.info("addAriesAgent(): New agent", agentConfig.name); - - return agent; - } - - /** - * Remove Aries agent with provided name from this connector. - * - * @param agentName agent name to remove - */ - public async removeAriesAgent(agentName: string): Promise { - Checks.truthy(agentName, `removeAriesAgent arg agentName`); - const agent = this.ariesAgents.get(agentName); - - if (agent) { - await agent.shutdown(); - this.ariesAgents.delete(agentName); - this.log.info("removeAriesAgent(): Agent removed:", agentName); - } else { - this.log.warn( - "removeAriesAgent(): No agent to remove with a name", - agentName, - ); - } - } - - /** - * Import existing DID using private key. - * - * @param agentName Name of an agent that should own the DID. - * @param seed private seed to recreate DID. - * @param indyNamespace VDR namespace. - * @returns newly created DID string. - */ - public async importExistingIndyDidFromPrivateKey( - agentName: string, - seed: string, - indyNamespace: string, - ): Promise { - Checks.truthy( - agentName, - `importExistingIndyDidFromPrivateKey arg agentName`, - ); - Checks.truthy(seed, `importExistingIndyDidFromPrivateKey arg seed`); - Checks.truthy( - indyNamespace, - `importExistingIndyDidFromPrivateKey arg indyNamespace`, - ); - const agent = await this.getAriesAgentOrThrow(agentName); - - const seedBuffer = TypedArrayEncoder.fromString(seed); - const key = await agent.wallet.createKey({ - keyType: KeyType.Ed25519, - privateKey: seedBuffer, - }); - - // did is first 16 bytes of public key encoded as base58 - const unqualifiedIndyDid = TypedArrayEncoder.toBase58( - key.publicKey.slice(0, 16), - ); - - const did = `did:indy:${indyNamespace}:${unqualifiedIndyDid}`; - - await agent.dids.import({ - did, - }); - - return did; - } - - /** - * Get connections established by an agent (both completed and in progress). - * List can be filtered. - * - * @param agentName get connections for specific agent - * @param filter fields to filter connections by - * @returns list of matching connection records - */ - public async getConnections( - agentName: string, - filter: AgentConnectionsFilterV1 = {}, - ): Promise { - Checks.truthy(agentName, "getConnections agentName options"); - const agent = await this.getAriesAgentOrThrow(agentName); - const allRecords = await agent.connections.findAllByQuery( - cactiAgentConnectionsFilterToQuery(filter), - ); - return allRecords.map((c) => { - return { - ...c, - isReady: c.isReady, - }; - }); - } - - /** - * Create Aries agent invitation URL that other agents can use to connect to this one. - * - * @param agentName agent name that should create invitation. - * @param invitationDomain URL domain to use (will use connector default if not specified) - * @returns `invitationURL` and connection `outOfBandId` - */ - public async createNewConnectionInvitation( - agentName: string, - invitationDomain?: string, - ): Promise { - Checks.truthy(agentName, `createNewConnectionInvitation arg agentName`); - const agent = await this.getAriesAgentOrThrow(agentName); - const outOfBandRecord = await agent.oob.createInvitation(); - - return { - invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ - domain: invitationDomain ?? this.invitationDomain, - }), - outOfBandId: outOfBandRecord.id, - }; - } - - /** - * Accept invitation from another agent using invitation URL. - * - * @param agentName agent name that should accept invitation. - * @param invitationUrl aries agent invitation URL. - * @returns established connection `outOfBandId` - */ - public async acceptInvitation( - agentName: string, - invitationUrl: string, - ): Promise { - Checks.truthy(agentName, `acceptInvitation arg agentName`); - Checks.truthy(invitationUrl, `acceptInvitation arg invitationUrl`); - const agent = await this.getAriesAgentOrThrow(agentName); - - const { outOfBandRecord } = - await agent.oob.receiveInvitationFromUrl(invitationUrl); - - return { - outOfBandId: outOfBandRecord.id, - }; - } - - /** - * Request credential proof from connected agent. - * - * @param agentName agent name requesting the proof. - * @param connectionId peer agent connection ID that must provide the proof. - * @param proofAttributes credential attributes to verify. - * @returns proof record - */ - public async requestProof( - agentName: string, - connectionId: string, - proofAttributes: CactiProofRequestAttributeV1[], - ): Promise { - Checks.truthy(agentName, "requestProof agentName options"); - Checks.truthy(connectionId, "requestProof connectionId options"); - Checks.truthy(proofAttributes, "requestProof proofAttributes options"); - Checks.truthy( - proofAttributes.length > 0, - "requestProof proofAttributes - must be at least one", - ); - const agent = await this.getAriesAgentOrThrow(agentName); - - const proof = await agent.proofs.requestProof({ - protocolVersion: "v2", - connectionId, - proofFormats: { - anoncreds: { - name: "proof-request", - version: "1.0", - requested_attributes: - await cactiAttributesToAnonCredsRequestedAttributes( - proofAttributes, - ), - }, - }, - }); - - return proof; - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/public-api.ts deleted file mode 100755 index c09a28308b..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/public-api.ts +++ /dev/null @@ -1,24 +0,0 @@ -export * from "./generated/openapi/typescript-axios"; - -export { - PluginLedgerConnectorAries, - IPluginLedgerConnectorAriesOptions, -} from "./plugin-ledger-connector-aries"; - -export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export { - AriesApiClient, - AriesApiClientOptions, -} from "./api-client/aries-api-client"; - -export * from "./generated/openapi/typescript-axios/api"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/accept-invitation-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/accept-invitation-v1-endpoint.ts deleted file mode 100644 index 123d8edc18..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/accept-invitation-v1-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorAries } from "../plugin-ledger-connector-aries"; -import OAS from "../../json/openapi.json"; - -export interface IAcceptInvitationOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorAries; -} - -export class AcceptInvitationEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - - public get className(): string { - return "AcceptInvitationEndpoint"; - } - - constructor(public readonly options: IAcceptInvitationOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/accept-invitation" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res - .status(200) - .json( - await this.options.connector.acceptInvitation( - req.body.agentName, - req.body.invitationUrl, - ), - ); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/create-new-connection-invitation-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/create-new-connection-invitation-v1-endpoint.ts deleted file mode 100644 index f2805929bf..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/create-new-connection-invitation-v1-endpoint.ts +++ /dev/null @@ -1,105 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorAries } from "../plugin-ledger-connector-aries"; -import OAS from "../../json/openapi.json"; - -export interface ICreateNewConnectionInvitationOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorAries; -} - -export class CreateNewConnectionInvitationEndpoint - implements IWebServiceEndpoint -{ - private readonly log: Logger; - - public get className(): string { - return "CreateNewConnectionInvitationEndpoint"; - } - - constructor(public readonly options: ICreateNewConnectionInvitationOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/create-new-connection-invitation" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res - .status(200) - .json( - await this.options.connector.createNewConnectionInvitation( - req.body.agentName, - req.body.invitationDomain, - ), - ); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/get-agents-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/get-agents-v1-endpoint.ts deleted file mode 100644 index 5d896b8354..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/get-agents-v1-endpoint.ts +++ /dev/null @@ -1,96 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorAries } from "../plugin-ledger-connector-aries"; -import OAS from "../../json/openapi.json"; - -export interface IGetAgentsOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorAries; -} - -export class GetAgentsEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - - public get className(): string { - return "GetAgentsEndpoint"; - } - - constructor(public readonly options: IGetAgentsOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-agents" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res.status(200).json(await this.options.connector.getAgents()); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/get-connections-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/get-connections-v1-endpoint.ts deleted file mode 100644 index bd23474054..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/get-connections-v1-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorAries } from "../plugin-ledger-connector-aries"; -import OAS from "../../json/openapi.json"; - -export interface IGetConnectionsOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorAries; -} - -export class GetConnectionsEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - - public get className(): string { - return "GetConnectionsEndpoint"; - } - - constructor(public readonly options: IGetConnectionsOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/get-connections" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res - .status(200) - .json( - await this.options.connector.getConnections( - req.body.agentName, - req.body.filter, - ), - ); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/request-proof-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/request-proof-v1-endpoint.ts deleted file mode 100644 index 948e894ec2..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/request-proof-v1-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorAries } from "../plugin-ledger-connector-aries"; -import OAS from "../../json/openapi.json"; - -export interface IRequestProofOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorAries; -} - -export class RequestProofEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - - public get className(): string { - return "RequestProofEndpoint"; - } - - constructor(public readonly options: IRequestProofOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-aries/request-proof" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res - .status(200) - .json( - await this.options.connector.requestProof( - req.body.agentName, - req.body.connectionId, - req.body.proofAttributes, - ), - ); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/watch-connection-state-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/watch-connection-state-v1-endpoint.ts deleted file mode 100644 index f27db167fc..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/watch-connection-state-v1-endpoint.ts +++ /dev/null @@ -1,89 +0,0 @@ -import type { Socket as SocketIoSocket } from "socket.io"; -import { - ConnectionEventTypes, - ConnectionStateChangedEvent, -} from "@aries-framework/core"; - -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, -} from "@hyperledger/cactus-common"; - -import { - WatchConnectionStateProgressV1, - WatchConnectionStateV1, -} from "../generated/openapi/typescript-axios"; -import { AnoncredAgent } from "../aries-types"; - -export interface IWatchConnectionStateV1EndpointConfiguration { - logLevel?: LogLevelDesc; - socket: SocketIoSocket; - agent: AnoncredAgent; -} - -export class WatchConnectionStateV1Endpoint { - private readonly log: Logger; - private readonly socket: SocketIoSocket< - Record void>, - Record< - WatchConnectionStateV1, - (next: WatchConnectionStateProgressV1) => void - > - >; - private readonly agent: AnoncredAgent; - - public get className(): string { - return "WatchConnectionStateV1Endpoint"; - } - - constructor( - public readonly config: IWatchConnectionStateV1EndpointConfiguration, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(config, `${fnTag} arg options`); - Checks.truthy(config.socket, `${fnTag} arg options.socket`); - - const level = this.config.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.socket = config.socket; - this.agent = config.agent; - } - - public async subscribe(): Promise { - const { socket, log, agent } = this; - log.info(`${WatchConnectionStateV1.Subscribe} => ${socket.id}`); - - const eventListener = (e: ConnectionStateChangedEvent) => { - socket.emit(WatchConnectionStateV1.Next, e.payload); - }; - - agent.events.on( - ConnectionEventTypes.ConnectionStateChanged, - eventListener, - ); - - socket.on("disconnect", async (reason: string) => { - log.info("WebSocket:disconnect reason=%o", reason); - agent.events.off( - ConnectionEventTypes.ConnectionStateChanged, - eventListener, - ); - }); - - socket.on(WatchConnectionStateV1.Unsubscribe, async () => { - agent.events.off( - ConnectionEventTypes.ConnectionStateChanged, - eventListener, - ); - log.debug("WatchConnectionStateV1 unsubscribe done."); - }); - - log.debug( - `Subscribing to connection state changes on aries agent ${agent.config.label}...`, - ); - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/watch-proof-state-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/watch-proof-state-v1-endpoint.ts deleted file mode 100644 index 7d8d954655..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/main/typescript/web-services/watch-proof-state-v1-endpoint.ts +++ /dev/null @@ -1,81 +0,0 @@ -import type { Socket as SocketIoSocket } from "socket.io"; -import { ProofStateChangedEvent, ProofEventTypes } from "@aries-framework/core"; - -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, -} from "@hyperledger/cactus-common"; - -import { - WatchProofStateProgressV1, - WatchProofStateV1, -} from "../generated/openapi/typescript-axios"; -import { AnoncredAgent } from "../aries-types"; - -export interface IWatchProofStateV1EndpointConfiguration { - logLevel?: LogLevelDesc; - socket: SocketIoSocket; - agent: AnoncredAgent; -} - -export class WatchProofStateV1Endpoint { - private readonly log: Logger; - private readonly socket: SocketIoSocket< - Record void>, - Record void> - >; - private readonly agent: AnoncredAgent; - - public get className(): string { - return "WatchProofStateV1Endpoint"; - } - - constructor(public readonly config: IWatchProofStateV1EndpointConfiguration) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(config, `${fnTag} arg options`); - Checks.truthy(config.socket, `${fnTag} arg options.socket`); - - const level = this.config.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.socket = config.socket; - this.agent = config.agent; - } - - public async subscribe(): Promise { - const { socket, log, agent } = this; - log.info(`${WatchProofStateV1.Subscribe} => ${socket.id}`); - - const eventListener = (e: ProofStateChangedEvent) => { - socket.emit(WatchProofStateV1.Next, e.payload); - }; - - agent.events.on( - ProofEventTypes.ProofStateChanged, - eventListener, - ); - - socket.on("disconnect", async (reason: string) => { - log.info("WebSocket:disconnect reason=%o", reason); - agent.events.off( - ProofEventTypes.ProofStateChanged, - eventListener, - ); - }); - - socket.on(WatchProofStateV1.Unsubscribe, async () => { - agent.events.off( - ProofEventTypes.ProofStateChanged, - eventListener, - ); - log.debug("WatchProofStateV1 unsubscribe done."); - }); - - log.debug( - `Subscribing to proof state changes on aries agent ${agent.config.label}...`, - ); - } -} diff --git a/packages/cactus-plugin-ledger-connector-aries/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-aries/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-aries/src/test/typescript/integration/aries-setup-and-connections.test.ts b/packages/cactus-plugin-ledger-connector-aries/src/test/typescript/integration/aries-setup-and-connections.test.ts deleted file mode 100644 index a1514901d6..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/test/typescript/integration/aries-setup-and-connections.test.ts +++ /dev/null @@ -1,423 +0,0 @@ -////////////////////////////////// -// Constants -////////////////////////////////// - -// Ledger settings -const containerImageName = "ghcr.io/outsh/cactus-indy-all-in-one"; -const containerImageVersion = "0.1"; - -// For development on local indy network -// 1. leaveLedgerRunning = true, useRunningLedger = false to run ledger and leave it running after test finishes. -// 2. leaveLedgerRunning = true, useRunningLedger = true to use that ledger in future runs. -const leaveLedgerRunning = false; -const useRunningLedger = false; - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { v4 as uuidV4 } from "uuid"; -import { AddressInfo } from "net"; -import { Server as SocketIoServer } from "socket.io"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, - Servers, -} from "@hyperledger/cactus-common"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { - IndyTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import * as path from "node:path"; -import * as os from "node:os"; -import { rm } from "node:fs/promises"; - -import { - PluginLedgerConnectorAries, - AriesApiClient, - AriesAgentSummaryV1, - AgentConnectionRecordV1, -} from "../../../main/typescript/public-api"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "aries-setup-and-connections.test", - level: testLogLevel, -}); - -const testWalletPath = path.join( - os.tmpdir(), - "aries-setup-and-connections-test-wallet", -); - -////////////////////////////////// -// Setup Tests -////////////////////////////////// - -describe("Aries connector setup tests", () => { - const fakeIndyNetworkConfig = { - isProduction: false, - genesisTransactions: JSON.stringify({ - reqSignature: {}, - txn: { - data: { - data: { - alias: "Node1", - client_ip: "172.16.0.2", - client_port: 9702, - node_ip: "172.16.0.2", - node_port: 9701, - services: ["VALIDATOR"], - }, - dest: "foo", - }, - metadata: { from: "foo" }, - type: "0", - }, - txnMetadata: { - seqNo: 1, - txnId: - "fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62", - }, - ver: "1", - }), - indyNamespace: "cacti:test", - connectOnStartup: true, - }; - let connector: PluginLedgerConnectorAries; - - beforeEach(() => { - connector = new PluginLedgerConnectorAries({ - instanceId: uuidV4(), - logLevel: testLogLevel, - walletPath: testWalletPath, - }); - }); - - afterEach(async () => { - if (connector) { - log.info("Cleanup the temporary connector..."); - await connector.shutdown(); - } - }); - - afterAll(async () => { - try { - await rm(testWalletPath, { - recursive: true, - force: true, - maxRetries: 5, - }); - log.info(`${testWalletPath} removed successfully.`); - } catch (error) { - log.warn(`${testWalletPath} could not be removed:`, error); - } - }); - - test("Basic connector construction works", async () => { - expect(connector).toBeTruthy(); - const allAgents = await connector.getAgents(); - expect(allAgents.length).toBe(0); - }); - - test("Adding simple aries agent works", async () => { - const agentName = `simple-${uuidV4()}`; - - await connector.addAriesAgent({ - name: agentName, - walletKey: agentName, - indyNetworks: [fakeIndyNetworkConfig], - }); - - const allAgents = await connector.getAgents(); - expect(allAgents.length).toBe(1); - const agent = allAgents.pop() as AriesAgentSummaryV1; - expect(agent).toBeTruthy(); - expect(agent.name).toEqual(agentName); - expect(agent.walletConfig.id).toEqual(agentName); - expect(agent.isAgentInitialized).toBeTrue(); - expect(agent.isWalletInitialized).toBeTrue(); - expect(agent.isWalletProvisioned).toBeTrue(); - }); - - test("Adding aries agent with inbound url works", async () => { - const agentName = `inbound-${uuidV4()}`; - const inboundUrl = "http://127.0.0.1:8253"; - - await connector.addAriesAgent({ - name: agentName, - walletKey: agentName, - indyNetworks: [fakeIndyNetworkConfig], - inboundUrl, - }); - - const allAgents = await connector.getAgents(); - expect(allAgents.length).toBe(1); - const agent = allAgents.pop() as AriesAgentSummaryV1; - expect(agent).toBeTruthy(); - expect(agent.name).toEqual(agentName); - expect(agent.walletConfig.id).toEqual(agentName); - expect(agent.isAgentInitialized).toBeTrue(); - expect(agent.isWalletInitialized).toBeTrue(); - expect(agent.isWalletProvisioned).toBeTrue(); - - // Check endpoint - expect(agent.endpoints.length).toBe(1); - const agentEndpoint = agent.endpoints.pop() as string; - expect(agentEndpoint).toBeTruthy(); - expect(agentEndpoint).toEqual(inboundUrl); - }); - - test("Adding aries agent with invalid inbound url throws error", async () => { - const agentName = `shouldThrow-${uuidV4()}`; - - await expect( - connector.addAriesAgent({ - name: agentName, - walletKey: agentName, - indyNetworks: [fakeIndyNetworkConfig], - inboundUrl: "foo", - }), - ).rejects.toThrow(); - - log.info( - "Adding aries agent with inbound url 'foo' throws error as expected", - ); - - await expect( - connector.addAriesAgent({ - name: agentName, - walletKey: agentName, - indyNetworks: [fakeIndyNetworkConfig], - inboundUrl: "http://127.0.0.1", - }), - ).rejects.toThrow(); - - log.info( - "Adding aries agent without inbound url port throws error as expected", - ); - - const allAgents = await connector.getAgents(); - expect(allAgents.length).toBe(0); - }); - - test("Removing single aries agent works", async () => { - const agentName = `removeCheck-${uuidV4()}`; - - await connector.addAriesAgent({ - name: agentName, - walletKey: agentName, - indyNetworks: [fakeIndyNetworkConfig], - }); - - const allAgents = await connector.getAgents(); - expect(allAgents.length).toBe(1); - await connector.removeAriesAgent(agentName); - const allAgentsAfterRemoval = await connector.getAgents(); - expect(allAgentsAfterRemoval.length).toBe(0); - }); - - test("Connector shutdown clears aries agent", async () => { - const agentName = `shutdownCheck-${uuidV4()}`; - - await connector.addAriesAgent({ - name: agentName, - walletKey: agentName, - indyNetworks: [fakeIndyNetworkConfig], - }); - - const allAgents = await connector.getAgents(); - expect(allAgents.length).toBe(1); - await connector.shutdown(); - const allAgentsAfterShutdown = await connector.getAgents(); - expect(allAgentsAfterShutdown.length).toBe(0); - }); -}); - -////////////////////////////////// -// Connect Tests -////////////////////////////////// - -describe("Connect Aries agents through connector tests", () => { - let addressInfo, - address: string, - port: number, - apiHost, - apiConfig, - ledger: IndyTestLedger, - apiClient: AriesApiClient, - connector: PluginLedgerConnectorAries; - - const indyNamespace = "cacti:test"; - const aliceAgentName = `cacti-alice-${uuidV4()}`; - const aliceInboundUrl = "http://127.0.0.1:8255"; - const bobAgentName = `cacti-bob-${uuidV4()}`; - const bobInboundUrl = "http://127.0.0.1:8256"; - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - await expect(pruning).resolves.toBeTruthy(); - - ledger = new IndyTestLedger({ - containerImageName, - containerImageVersion, - useRunningLedger, - emitContainerLogs: false, - logLevel: testLogLevel, - }); - await ledger.start(); - - addressInfo = (await Servers.listen({ - hostname: "127.0.0.1", - port: 0, - server, - })) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new AriesApiClient(apiConfig); - - connector = new PluginLedgerConnectorAries({ - instanceId: uuidV4(), - logLevel: testLogLevel, - walletPath: testWalletPath, - ariesAgents: [ - { - name: aliceAgentName, - walletKey: aliceAgentName, - indyNetworks: [await ledger.getIndyVdrPoolConfig(indyNamespace)], - inboundUrl: aliceInboundUrl, - autoAcceptConnections: true, - }, - { - name: bobAgentName, - walletKey: bobAgentName, - indyNetworks: [await ledger.getIndyVdrPoolConfig(indyNamespace)], - inboundUrl: bobInboundUrl, - autoAcceptConnections: true, - }, - ], - }); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - await connector.onPluginInit(); - - // Import endorser DID for Alice Agent - await connector.importExistingIndyDidFromPrivateKey( - aliceAgentName, - ledger.getEndorserDidSeed(), - indyNamespace, - ); - }); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (server) { - log.info("Stop the connector server..."); - await Servers.shutdown(server); - } - - if (connector) { - log.info("Stop the connector..."); - await connector.shutdown(); - } - - if (ledger && !leaveLedgerRunning) { - log.info("Stop the indy ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - try { - await rm(testWalletPath, { - recursive: true, - force: true, - maxRetries: 5, - }); - log.info(`${testWalletPath} remove successfully.`); - } catch (error) { - log.warn(`${testWalletPath} could not be removed:`, error); - } - }); - - test("Aries agent created on plugin init", async () => { - const allAgents = await connector.getAgents(); - expect(allAgents.length).toBe(2); - }); - - test("Invitation with custom domain works", async () => { - const customDomain = "https://my-custom-domain.org"; - const invitationResponse = await apiClient.createNewConnectionInvitationV1({ - agentName: aliceAgentName, - invitationDomain: customDomain, - }); - const { invitationUrl, outOfBandId } = invitationResponse.data; - expect(invitationUrl).toBeTruthy(); - expect(outOfBandId).toBeTruthy(); - expect(new URL(invitationUrl).origin).toEqual(customDomain); - }); - - test("Connect to another aries agent using invitation URL", async () => { - // Connect Alice and Bob - log.info("1. Create invitation from Alice"); - const invitationResponse = await apiClient.createNewConnectionInvitationV1({ - agentName: aliceAgentName, - }); - const invitationUrl = invitationResponse.data.invitationUrl; - const aliceOutOfBandId = invitationResponse.data.outOfBandId; - expect(invitationUrl).toBeTruthy(); - expect(aliceOutOfBandId).toBeTruthy(); - const isPeerConnectedPromise = apiClient.waitForInvitedPeerConnectionV1( - aliceAgentName, - aliceOutOfBandId, - ); - - log.info("2. Accept invitation as Bob"); - const acceptResponse = await apiClient.acceptInvitationV1({ - agentName: bobAgentName, - invitationUrl: invitationUrl, - }); - const bobOutOfBandId = acceptResponse.data.outOfBandId; - expect(bobOutOfBandId).toBeTruthy(); - - log.info("3. Wait for connection readiness on Bob side"); - await apiClient.waitForConnectionReadyV1(bobAgentName, bobOutOfBandId); - - log.info("4. Wait for connection readiness on Alice side"); - await isPeerConnectedPromise; - - log.info("Connection between Alice and Bob connectors established!"); - - // Check getConnectionsV1 endpoint - const bobConnectionsResponse = await apiClient.getConnectionsV1({ - agentName: bobAgentName, - filter: { - state: "completed", - }, - }); - expect(bobConnectionsResponse).toBeTruthy(); - expect(bobConnectionsResponse.data).toBeTruthy(); - const firstBobConnection = - bobConnectionsResponse.data.pop() as AgentConnectionRecordV1; - expect(firstBobConnection).toBeTruthy(); - expect(firstBobConnection.state).toEqual("completed"); - expect(firstBobConnection.isReady).toBeTrue(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-aries/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-aries/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-aries/tsconfig.json b/packages/cactus-plugin-ledger-connector-aries/tsconfig.json deleted file mode 100644 index 67a17b3ca7..0000000000 --- a/packages/cactus-plugin-ledger-connector-aries/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib", - "declarationDir": "./dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ledger-connector-aries.tsbuildinfo" - }, - "include": ["./src", "src/**/*.json"], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} diff --git a/packages/cactus-plugin-ledger-connector-besu/CHANGELOG.md b/packages/cactus-plugin-ledger-connector-besu/CHANGELOG.md deleted file mode 100644 index 7aa9cf59b4..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/CHANGELOG.md +++ /dev/null @@ -1,350 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-besu - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-besu - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-besu - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Bug Fixes - -* address CVE-2022-24434, GHSA-wm7h-9275-46v2 caused by dicer ([6ff8111](https://github.com/hyperledger/cacti/commit/6ff8111c2534f71a5f623433eba59a610d84f4eb)) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### Features - -* **besu:** remove hard dependency on keychain ([f5b60b4](https://github.com/hyperledger/cacti/commit/f5b60b4d25acc7a4bc53f3b9b87433b18a5d9153)), closes [#963](https://github.com/hyperledger/cacti/issues/963) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -### Features - -* **connector-besu:** expose API client and OpenAPI code for web builds ([199c1f0](https://github.com/hyperledger/cacti/commit/199c1f05c282d15ba2ded9e7a69253483fbac2ec)) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **cactus-common:** coerceUnknownToError() now uses HTML sanitize ([d70488a](https://github.com/hyperledger/cacti/commit/d70488a82e9c1d6958ac3ab0368f3c3bfca378c6)) -* **connector-besu:** error handling of DeployContractSolidityBytecodeEndpoint ([89d9b93](https://github.com/hyperledger/cacti/commit/89d9b93b7380477c10d8da78fcd259c95b495fa9)), closes [#2868](https://github.com/hyperledger/cacti/issues/2868) -* **connector-besu:** toBuffer only supports 0x-prefixed hex ([1d00e32](https://github.com/hyperledger/cacti/commit/1d00e32ed0f76b1d9081a7cea55ad41c956ec25b)) -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **connector-besu:** add continuous benchmarking with JMeter ([379d41d](https://github.com/hyperledger/cacti/commit/379d41dd4b2cc994801c85f1fa16ea854f0301f7)) -* **connector-besu:** add gRPC support for operations ([ab676d2](https://github.com/hyperledger/cacti/commit/ab676d23e1781aa17b5f2c61cb7dec643443bded)), closes [#3173](https://github.com/hyperledger/cacti/issues/3173) -* **plugin-satp-hermes:** replace IPFS dependency in SATP package ([3bb7157](https://github.com/hyperledger/cacti/commit/3bb7157b8c910c31aa3fe125ecfb3437c2bef5bb)), closes [#2984](https://github.com/hyperledger/cacti/issues/2984) [#3006](https://github.com/hyperledger/cacti/issues/3006) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* **security:** the CVE-2022-2421 - upgrade socket.io-parser to >=4.2.1 ([9172172](https://github.com/hyperledger/cacti/commit/917217227a3fa53a00429f047cd6318862e6ab8d)), closes [#2229](https://github.com/hyperledger/cacti/issues/2229) [#2228](https://github.com/hyperledger/cacti/issues/2228) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **connector-besu:** add GetOpenApiSpecV1Endpoint (HTTP GET) ([76744f0](https://github.com/hyperledger/cacti/commit/76744f0f7b6629959f59939de0fea0f71ff7a5f0)) -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-besu - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **cmd-api-server:** mitigate CVE-2022-24434 and CVE-2022-24999 [#2039](https://github.com/hyperledger/cactus/issues/2039) ([1cc9667](https://github.com/hyperledger/cactus/commit/1cc9667e2432d1d27c2647b86e42707a2e78e4c3)), closes [#2241](https://github.com/hyperledger/cactus/issues/2241) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-besu - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-besu - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-besu - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-besu - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Bug Fixes - -* **security:** address CVE-2021-23358 ([ed71f42](https://github.com/hyperledger/cactus/commit/ed71f42aca1683dd2fd6f762fbc6cd19b4c3c253)), closes [#1775](https://github.com/hyperledger/cactus/issues/1775) -* **security:** close DDoS vulnerability in eth tx consistenty strategy ([64b61a7](https://github.com/hyperledger/cactus/commit/64b61a742a885f0027543bc620b5db08b5444669)), closes [#2001](https://github.com/hyperledger/cactus/issues/2001) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* **cmd-api-server:** upgrade socket.io - CVE-2022-21676 ([8e1c69e](https://github.com/hyperledger/cactus/commit/8e1c69e7b8ab5e4ccc31a0ec183a9777ccc22cdc)), closes [#1914](https://github.com/hyperledger/cactus/issues/1914) -* **connector-besu/quorum/xdai:** unvalidated dynamic method call ([bdc1aba](https://github.com/hyperledger/cactus/commit/bdc1aba982cc2ec1a74b0458c98ceeacc7acb9e7)), closes [#1911](https://github.com/hyperledger/cactus/issues/1911) -* **security:** upgrade to yarn > 1.22.0 - CVE-2019-10773, CVE-2020-8131 ([43d591d](https://github.com/hyperledger/cactus/commit/43d591d2eff576cb581a2a92d98edf7f4f6ecf13)), closes [#1922](https://github.com/hyperledger/cactus/issues/1922) -* **security:** upgrade web3 to upgrade elliptic > 6.5.4 ([5513848](https://github.com/hyperledger/cactus/commit/55138483e43dd840a6c3822d1ff8f2f7ce8c35e8)), closes [#1639](https://github.com/hyperledger/cactus/issues/1639) - -### Features - -* **cactus-api-client:** add support for plain socketio validators in api-server and api-client ([634b10e](https://github.com/hyperledger/cactus/commit/634b10e5eaf82df08b04c11c3af5b109ede5b942)), closes [#1602](https://github.com/hyperledger/cactus/issues/1602) [#1602](https://github.com/hyperledger/cactus/issues/1602) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* fixes 1445 and implementing correct interface types ([9022064](https://github.com/hyperledger/cactus/commit/9022064e245a92f71d2d303d77bfdaf64d1b1678)), closes [#1445](https://github.com/hyperledger/cactus/issues/1445) - -### Features - -* **odap:** first implemenation for odap plugin and endpoints ([51bf753](https://github.com/hyperledger/cactus/commit/51bf753d421cdd255c178036fe901eb9c1c04130)) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -### Bug Fixes - -* **lint:** fix issue [#1359](https://github.com/hyperledger/cactus/issues/1359) ([f7eb39b](https://github.com/hyperledger/cactus/commit/f7eb39bb1392b2762adac3a189da071249f4eca3)) - -### Features - -* **htlc-coordinator:** new htlc coordinator ([28c97d3](https://github.com/hyperledger/cactus/commit/28c97d33e97fa180f1b2b65d505f5ae36a9ddc25)), closes [#953](https://github.com/hyperledger/cactus/issues/953) - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* openapi tests for besu, htlc-eth-besu and htlc-eth-besu-erc20 ([b9170e9](https://github.com/hyperledger/cactus/commit/b9170e929492f3305a420c75c7d12d06b288e0ab)), closes [#1291](https://github.com/hyperledger/cactus/issues/1291) [#847](https://github.com/hyperledger/cactus/issues/847) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **besu:** support besu v21.1.6 [#982](https://github.com/hyperledger/cactus/issues/982) ([d715c67](https://github.com/hyperledger/cactus/commit/d715c679fee681844f29ed30f09f6d651daf087e)) -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **prometheus:** metrics.ts leaks to global registry [#1202](https://github.com/hyperledger/cactus/issues/1202) ([ce076d7](https://github.com/hyperledger/cactus/commit/ce076d709f8e0cba143f8fe9d71f1de1df8f71dc)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Bug Fixes - -* **connector-corda:** fix build broken by operationId rename ([291dd3b](https://github.com/hyperledger/cactus/commit/291dd3bc666939fffbc3780eaefd9059c756878a)) - -### Features - -* **besu:** record locator ([2410d6d](https://github.com/hyperledger/cactus/commit/2410d6d4430f5b1f587befa01824a7674c6e11fa)) - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-besu:** network update only if present in keychain ([8ac2444](https://github.com/hyperledger/cactus/commit/8ac2444f86f9a1310f045ff0f7e4e78b91635be0)) -* **connector-besu:** remove magic strings ([6d9ae53](https://github.com/hyperledger/cactus/commit/6d9ae53c64bd4e6c3eb33164bfa5d5507582220b)), closes [#1104](https://github.com/hyperledger/cactus/issues/1104) -* **connector-besu:** removed repeated check ([a4cb63b](https://github.com/hyperledger/cactus/commit/a4cb63b483d61578dd0d356fc0c9c20d8a2024e0)) -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) - -### Features - -* besu WatchBlocksV1Endpoint with SocketIO ([d5e1708](https://github.com/hyperledger/cactus/commit/d5e1708e84ab5192d07410d5120e144d477ef6ce)) -* **besu:** add sequence diagram of run transaction endpoint ([754a11a](https://github.com/hyperledger/cactus/commit/754a11a449d9a67dd8d6ebecbeb1b65cefa71b7f)), closes [#755](https://github.com/hyperledger/cactus/issues/755) -* **connector-besu, connector-quorum:** filesystem replaced by keychain ([14d1790](https://github.com/hyperledger/cactus/commit/14d17904442723450790644653ff18dda79dfa5e)) -* **connector-besu,connector-quorum:** updated ([985f12f](https://github.com/hyperledger/cactus/commit/985f12f69c52a139a72aecc9b050e71545a90df8)) -* **connector-besu:** add get balance method ([db71c5c](https://github.com/hyperledger/cactus/commit/db71c5ce1af09bd1c60b9dbc841ca13c3eb75782)) -* **connector-besu:** add get past logs method ([e3fcfa7](https://github.com/hyperledger/cactus/commit/e3fcfa7173667b0d3c7a4bd92a6706444e0717b1)) -* **connector-besu:** add get past logs method ([c4900e9](https://github.com/hyperledger/cactus/commit/c4900e98f753e733e07170cea7003aefcee0dbdd)) -* **connector-besu:** add getBalance web service ([50107f6](https://github.com/hyperledger/cactus/commit/50107f62cda1e3be688576b9074b9408757e9b49)), closes [#1066](https://github.com/hyperledger/cactus/issues/1066) -* **connector-besu:** add getBlock web service [#1065](https://github.com/hyperledger/cactus/issues/1065) ([869c48b](https://github.com/hyperledger/cactus/commit/869c48ba4d8000b50d1d64a8a0897b50dde21d5d)) -* **connector-besu:** add getPastLogs web service ([c037ec5](https://github.com/hyperledger/cactus/commit/c037ec55bc07e5314cd2104579b1a882d79f1488)), closes [#1067](https://github.com/hyperledger/cactus/issues/1067) -* **connector-besu:** add getTransaction web service ([0ca0769](https://github.com/hyperledger/cactus/commit/0ca0769ac4d1c3d43afc553813cf31983e5cb1b1)), closes [#1062](https://github.com/hyperledger/cactus/issues/1062) [#1061](https://github.com/hyperledger/cactus/issues/1061) -* **connector-besu:** contract deployment with constructor arguments ([48d67a7](https://github.com/hyperledger/cactus/commit/48d67a7a7af223337777917a01002426a79f8463)), closes [#810](https://github.com/hyperledger/cactus/issues/810) -* **connector-besu:** contractAbi optional parameter ([26cf7c2](https://github.com/hyperledger/cactus/commit/26cf7c23919436ca82107b532309b5197ad2e39d)) -* **connector-besu:** dockerfile ([7174004](https://github.com/hyperledger/cactus/commit/71740048eb97e2855febc96a91a5f64215591187)) -* **connector-besu:** getTransaction method ([d470540](https://github.com/hyperledger/cactus/commit/d4705403b88023ecd3b7f68223215019053982cd)) -* **connector-besu:** replace invokeContractV2 ([ecd62ea](https://github.com/hyperledger/cactus/commit/ecd62eac5721514dbcfc401d5f28dfdc58ef8873)) -* **connector-quorum:** contractAbi optional parameter ([c79d763](https://github.com/hyperledger/cactus/commit/c79d763e0cb093647209417cfed7a2645283f302)) -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** hasTransactionFinality() on connector API [#354](https://github.com/hyperledger/cactus/issues/354) ([a2d0582](https://github.com/hyperledger/cactus/commit/a2d058218780e5e4c81e5f847cc875879a946e3f)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **core-api:** plugin async initializer method ([9678c2e](https://github.com/hyperledger/cactus/commit/9678c2e9288a73589e84f9fd254c26aed6a93297)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* **connector-besu:** network update only if present in keychain ([8ac2444](https://github.com/hyperledger/cactus/commit/8ac2444f86f9a1310f045ff0f7e4e78b91635be0)) -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) - -### Features - -* **besu:** add sequence diagram of run transaction endpoint ([754a11a](https://github.com/hyperledger/cactus/commit/754a11a449d9a67dd8d6ebecbeb1b65cefa71b7f)), closes [#755](https://github.com/hyperledger/cactus/issues/755) -* **connector-besu:** contract deployment with constructor arguments ([48d67a7](https://github.com/hyperledger/cactus/commit/48d67a7a7af223337777917a01002426a79f8463)), closes [#810](https://github.com/hyperledger/cactus/issues/810) -* **connector-besu:** contractAbi optional parameter ([26cf7c2](https://github.com/hyperledger/cactus/commit/26cf7c23919436ca82107b532309b5197ad2e39d)) -* **connector-besu:** dockerfile ([7174004](https://github.com/hyperledger/cactus/commit/71740048eb97e2855febc96a91a5f64215591187)) -* **connector-besu:** replace invokeContractV2 ([ecd62ea](https://github.com/hyperledger/cactus/commit/ecd62eac5721514dbcfc401d5f28dfdc58ef8873)) -* **connector-besu, connector-quorum:** filesystem replaced by keychain ([14d1790](https://github.com/hyperledger/cactus/commit/14d17904442723450790644653ff18dda79dfa5e)) -* **connector-besu,connector-quorum:** updated ([985f12f](https://github.com/hyperledger/cactus/commit/985f12f69c52a139a72aecc9b050e71545a90df8)) -* **connector-quorum:** contractAbi optional parameter ([c79d763](https://github.com/hyperledger/cactus/commit/c79d763e0cb093647209417cfed7a2645283f302)) -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** hasTransactionFinality() on connector API [#354](https://github.com/hyperledger/cactus/issues/354) ([a2d0582](https://github.com/hyperledger/cactus/commit/a2d058218780e5e4c81e5f847cc875879a946e3f)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-besu - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **ci:** disk full issues on GitHub Action Workflow runner [#698](https://github.com/hyperledger/cactus/issues/698) ([61e3f76](https://github.com/hyperledger/cactus/commit/61e3f76ed910c9b04b36f995456213018cc0e7ba)) -* **connector-besu:** added test for call with parameters ([1fa24be](https://github.com/hyperledger/cactus/commit/1fa24bed8f42d39dd7b9ce989b8192774a9c7257)) -* **connector-besu:** avoid req.params repetition ([64d6cf1](https://github.com/hyperledger/cactus/commit/64d6cf1f56375c9dd97c7cdf0d11c573fdf26b5a)) -* **connector-besu:** fixed transaction value assignment and added test ([48bb129](https://github.com/hyperledger/cactus/commit/48bb1294f03f8b488c6f570b1e248f26aef2ccd1)) -* **connector-besu:** revert change in generated code ([075ad90](https://github.com/hyperledger/cactus/commit/075ad90000507b95774065b7fad280b09a49c5f7)) -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) -* reverting accidental manual change in generated code ([e67369f](https://github.com/hyperledger/cactus/commit/e67369f6b9bded6f54231cbcb34de534b6a80f5b)), closes [#453](https://github.com/hyperledger/cactus/issues/453) - -### Features - -* **besu:** add prometheus exporter ([7352203](https://github.com/hyperledger/cactus/commit/7352203842f0aa47f5b474732c09806465814474)), closes [#533](https://github.com/hyperledger/cactus/issues/533) -* **connector-besu:** added ether value in contract invoke request ([add9cd9](https://github.com/hyperledger/cactus/commit/add9cd94ed7fe4a7facda89749895f7b04de89a8)) -* **connector-besu:** common interface invoke-contract ([ee93120](https://github.com/hyperledger/cactus/commit/ee93120abc7551d22eb94ba7e0521feaffa479bb)) -* **connector-besu:** customizable nonce and gas ([89c0060](https://github.com/hyperledger/cactus/commit/89c00604084a80cdd2c1f42a918f5028660703db)) -* **connector-besu:** implemented contract instance map ([17fdd94](https://github.com/hyperledger/cactus/commit/17fdd94bb4063fd8eaa1bd53d25d87f343ab9ba4)) -* **connector-besu:** request param: wait for ledger tx receipt [#685](https://github.com/hyperledger/cactus/issues/685) ([dc8c564](https://github.com/hyperledger/cactus/commit/dc8c564b2819a6f7c2ccc3f6cf37c68900a0c552)) -* **core-api:** plugin import types: LOCAL & REMOTE ([f4d51da](https://github.com/hyperledger/cactus/commit/f4d51dae5b28367e714a2b9aa35dd84a2cb4cb37)) -* **refactor:** openapi endpoint paths ([261c17b](https://github.com/hyperledger/cactus/commit/261c17b08124070c7be0890d6bc3da380255893b)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -### Bug Fixes - -* open API generator config - protected keyword ([57e52f4](https://github.com/hyperledger/cactus/commit/57e52f42c3aaab653acb8838ba93518a5a097af8)), closes [#436](https://github.com/hyperledger/cactus/issues/436) - -### Features - -* **besu:** 🎸 OpenAPI support => arbitrary TX, contract deployments ([6d7e788](https://github.com/hyperledger/cactus/commit/6d7e7882eb0e11102a7e06b508433203c7cd821d)) -* **besu:** add keychain reference signing support ([768c4cc](https://github.com/hyperledger/cactus/commit/768c4cc67837699f5e153545cc7350f2807c4460)) -* **besu:** remove references to gethkeychainpassword ([2640b52](https://github.com/hyperledger/cactus/commit/2640b521967de51dc84e30f27749256da6369434)) -* **cmd-api-server:** fully dynamic plugin imports via config file/env/CLI ([fe396c9](https://github.com/hyperledger/cactus/commit/fe396c969436f1c1a99b6d03d8b58b160e1a93bb)) -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) -* **core-api:** getConsensusAlgorithmFamily() on connector API ([477dc7e](https://github.com/hyperledger/cactus/commit/477dc7ed5dfba9ae56060772d478aae349919f10)), closes [#355](https://github.com/hyperledger/cactus/issues/355) -* **plugin-ledger-connector-besu:** add log level to options ([29402d0](https://github.com/hyperledger/cactus/commit/29402d0814bf9ebc642430cd0acb660eb4d50b97)) - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -### Features - -* **besu:** 🎸 OpenAPI support => arbitrary TX, contract deployments ([6d7e788](https://github.com/hyperledger/cactus/commit/6d7e7882eb0e11102a7e06b508433203c7cd821d)) -* **besu:** add keychain reference signing support ([768c4cc](https://github.com/hyperledger/cactus/commit/768c4cc67837699f5e153545cc7350f2807c4460)) -* **cmd-api-server:** fully dynamic plugin imports via config file/env/CLI ([fe396c9](https://github.com/hyperledger/cactus/commit/fe396c969436f1c1a99b6d03d8b58b160e1a93bb)) -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) -* **plugin-ledger-connector-besu:** add log level to options ([29402d0](https://github.com/hyperledger/cactus/commit/29402d0814bf9ebc642430cd0acb660eb4d50b97)) diff --git a/packages/cactus-plugin-ledger-connector-besu/README.md b/packages/cactus-plugin-ledger-connector-besu/README.md deleted file mode 100644 index 570fe6fa6e..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/README.md +++ /dev/null @@ -1,343 +0,0 @@ -# `@hyperledger/cactus-plugin-ledger-connector-besu` - -This plugin provides `Cactus` a way to interact with Besu networks. Using this we can perform: -* Deploy Smart-contracts through bytecode. -* Build and sign transactions using different keystores. -* Invoke smart-contract functions that we have deployed on the network. -## Summary - - - [Getting Started](#getting-started) - - [Architecture](#architecture) - - [Usage](#usage) - - [Prometheus Exporter](#prometheus-exporter) - - [Runing the tests](#running-the-tests) - - [Built With](#built-with) - - [Contributing](#contributing) - - [License](#license) - - [Acknowledgments](#acknowledgments) - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project to install the dependencies execute the command: -```sh -npm run configure -``` - -### Compiling - -In the project root folder, run this command to compile the plugin and create the dist directory: -```sh -npm run tsc -``` - -### Architecture -The sequence diagrams for various endpoints are mentioned below - -#### run-transaction-endpoint -![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png) -The above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. API server then executes transact() method which is explained in detailed in the subsequent diagrams. -![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png) -The above diagram shows the sequence diagram of transact() method of the PluginLedgerConnectorBesu class. The caller to this function, which in reference to the above sequence diagram is API server, sends RunTransactionRequest object as an argument to the transact() method. Based on the type of Web3SigningCredentialType, corresponsing responses are sent back to the caller. -![run-transaction-endpoint transactCactusKeychainRef() method](docs/architecture/images/run-transaction-endpoint-transact-cactuskeychainref.png) -The above diagram shows transactCactusKeychainReference() method being called by the transact() method of the PluginLedgerConnector class when the Web3SigningCredentialType is CACTUSKEYCHAINREF. This method inturn calls transactPrivateKey() which calls the signTransaction() method of web3 library. -![runtransaction-endpoint transactPrivateKey() method](docs/architecture/images/run-transaction-endpoint-transact-privatekey.png) -The above diagram shows transactPrivateKey() method being called by the transact() method of the PluginLedgerConnector class when the Web3SigningCredentialType is PRIVATEKEYHEX. This method then calls the signTransaction() method of the web3 library. -![run-transaction-endpoint transactSigned() method](docs/architecture/images/run-transaction-endpoint-transact-signed.png) -The above diagram shows transactSigned() method being called by the transact() method of the PluginLedgerConnector class when the Web3SigningCredentialType is NONE. This method calls the sendSignedTransaction() of the web3 library and then calls pollForTxReceipt() method. -![run-transaction-endpoint pollForTxReceipt() method](docs/architecture/images/run-transaction-endpoint-transact-pollfortxreceipt.png) -The above diagram shows pollForTxReceipt() method which is called by the transactSigned() method as described in the previous sequence diagram. This method waits for the block confirmation in a loop and then sends the corresponding response back to the caller. - -### Usage - -To use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector. -```typescript -const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.LOCAL, - }); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry(), - }); -``` -You can make calls through the connector to the plugin API: - -```typescript -async invokeContract(req: InvokeContractV1Request):Promise; -async transactSigned(rawTransaction: string): Promise; -async transactPrivateKey(req: RunTransactionRequest): Promise; -async transactCactusKeychainRef(req: RunTransactionRequest):Promise; -async deployContract(req: DeployContractSolidityBytecodeV1Request):Promise; -async signTransaction(req: SignTransactionRequest):Promise>; -``` - -Call example to deploy a contract: -```typescript -const deployOut = await connector.deployContract({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: SmartContractJson.bytecode, - gas: 1000000, -}); -``` -The field "type" can have the following values: -```typescript -enum Web3SigningCredentialType { - CACTUSKEYCHAINREF = 'CACTUS_KEYCHAIN_REF', - GETHKEYCHAINPASSWORD = 'GETH_KEYCHAIN_PASSWORD', - PRIVATEKEYHEX = 'PRIVATE_KEY_HEX', - NONE = 'NONE' -} -``` - -### Transaction Privacy Feature -Private transactions using Besu are currently enabled. - -The privateFor and privateFrom fields must be populated, more information about Besu Private Transactions [here](https://besu.hyperledger.org/en/stable/Concepts/Privacy/Private-Transactions/). - -Call example to deploy a private contract: -```typescript - const deployOut = await connector1.deployContract({ - bytecode: SmartContract.bytecode, - contractAbi: SmartContract.abi, - contractName: SmartContract.contractName, - constructorArgs: [], - privateTransactionConfig: { - privateFrom: SendingTesseraPublicKey, - privateFor: [ - Member1TesseraPrivateKey, - Member2TesseraPrivateKey, - ], - }, - web3SigningCredential: { - secret:SendingBesuPrivateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 3000000 - }); -``` - -> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) - - -#### Running the container - -Launch container with plugin configuration as an **environment variable**: -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --plugins='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": {"rpcApiHttpHost": "http://localhost:8545", "rpcApiWsHost":"ws://localhost:8546", "instanceId": "some-unique-besu-connector-instance-id"}}]' -``` - -Launch container with plugin configuration as a **CLI argument**: -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --plugins='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": {"rpcApiHttpHost": "http://localhost:8545", "rpcApiWsHost":"ws://localhost:8546", "instanceId": "some-unique-besu-connector-instance-id"}}]' -``` - -Launch container with **configuration file** mounted from host machine: -```sh -echo '{"plugins": [{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": {"rpcApiHttpHost": "http://localhost:8545", "rpcApiWsHost":"ws://localhost:8546", "instanceId": "some-unique-besu-connector-instance-id"}}]}' > .cacti-config.json -``` - -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - --mount type=bind,source="$(pwd)"/.cacti-config.json,target=/.cacti-config.json \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --config-file=/.cacti-config.json -``` - -#### Testing API calls with the container - -Don't have a Besu network on hand to test with? Test or develop against our Besu All-In-One container! - -**Terminal Window 1 (Ledger)** -```sh -docker run \ - --publish 0.0.0.0:8545:8545/tcp \ - --publish 0.0.0.0:8546:8546/tcp \ - --publish 0.0.0.0:8888:8888/tcp \ - --publish 0.0.0.0:9001:9001/tcp \ - --publish 0.0.0.0:9545:9545/tcp \ - ghcr.io/hyperledger/cactus-besu-all-in-one:2024-07-04-8c030ae -``` - -**Terminal Window 2 (Cacti API Server)** -```sh -docker run \ - --network=host \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --plugins='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-besu", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": {"rpcApiHttpHost": "http://127.0.0.1:8545", "rpcApiWsHost":"ws://127.0.0.1:8546", "instanceId": "some-unique-besu-connector-instance-id"}}]' -``` - -**Terminal Window 3 (curl - replace eth accounts as needed)** -```sh -curl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "web3SigningCredential": { - "ethAccount": "627306090abaB3A6e1400e9345bC60c78a8BEf57", - "secret": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3", - "type": "PRIVATE_KEY_HEX" - }, - "consistencyStrategy": { - "blockConfirmations": 0, - "receiptType": "NODE_TX_POOL_ACK" - }, - "transactionConfig": { - "from": "627306090abaB3A6e1400e9345bC60c78a8BEf57", - "to": "f17f52151EbEF6C7334FAD080c5704D77216b732", - "value": 1, - "gas": 10000000 - } -}' -``` - -The above should produce a response that looks similar to this: - -```json -{ - "success": true, - "data": { - "transactionReceipt": { - "blockHash": "0x7c97c038a5d3bd84613fe23ed442695276d5d2df97f4e7c4f10ca06765033ffd", - "blockNumber": 1218, - "contractAddress": null, - "cumulativeGasUsed": 21000, - "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "gasUsed": 21000, - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "status": true, - "to": "0xf17f52151ebef6c7334fad080c5704d77216b732", - "transactionHash": "0xc7fcb46c735bdc696d500bfc70c72595a2b8c31813929e5c61d9a5aec3376d6f", - "transactionIndex": 0 - } - } -} -``` - -## Prometheus Exporter - -This class creates a prometheus exporter, which scrapes the transactions (total transaction count) for the use cases incorporating the use of Besu connector plugin. - -### Prometheus Exporter Usage -The prometheus exporter object is initialized in the `PluginLedgerConnectorBesu` class constructor itself, so instantiating the object of the `PluginLedgerConnectorBesu` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IPluginLedgerConnectorBesuOptions` interface for `PluginLedgerConnectoBesu` constructor. - -`getPrometheusMetricsV1` function returns the prometheus exporter metrics, currently displaying the total transaction count, which currently increments everytime the `transact()` method of the `PluginLedgerConnectorBesu` class is called. - -### Prometheus Integration -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'besu_ledger_connector_exporter' - metrics_path: api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_besu_total_tx_count** and click **execute** - -### Helper code - -###### response.type.ts -This file contains the various responses of the metrics. - -###### data-fetcher.ts -This file contains functions encasing the logic to process the data points - -###### metrics.ts -This file lists all the prometheus metrics and what they are used for. - -## Running the tests - -To check that all has been installed correctly and that the pugin has no errors run the tests: - -* Run this command at the project's root: -```sh -npm run test:plugin-ledger-connector-besu -``` - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-cactuskeychainref.png b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-cactuskeychainref.png deleted file mode 100644 index 20647e8258..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-cactuskeychainref.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-pollfortxreceipt.png b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-pollfortxreceipt.png deleted file mode 100644 index c7d4296abe..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-pollfortxreceipt.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-privatekey.png b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-privatekey.png deleted file mode 100644 index 1ff8188248..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-privatekey.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-signed.png b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-signed.png deleted file mode 100644 index 967eb22b71..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact-signed.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact.png b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact.png deleted file mode 100644 index dc51fe46fd..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint-transact.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint.png b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint.png deleted file mode 100644 index 4ad53b872d..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/images/run-transaction-endpoint.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-cactuskeychainref.puml b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-cactuskeychainref.puml deleted file mode 100644 index a9ddd1622f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-cactuskeychainref.puml +++ /dev/null @@ -1,33 +0,0 @@ -@startuml -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\ntransactCactusKeychainReference() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "transactCactusKeychainReference()" as tckr -participant "transactPrivateKey()" as tpk -participant "web3.eth.accounts.signTransaction()" as weas - -caller-> tckr: req -activate caller -group #LightBlue if web3SigningCredential == CACTUSKEYCHAINREF - activate tckr - tckr -> tpk: [transactionConfig, web3SigningCredential] - activate tpk - tpk -> weas: [transactionConfig, secret] - activate weas - weas --> tpk: return [signedTx] - deactivate weas - group #LightGray if defined: signedTx.rawTransaction - tpk --> tckr: return [req with rawTransaction] - tckr --> caller : return {transactionConfig, web3SigningCredential, consistencyStrategy} as resBody - deactivate tckr - else #LightCoral - tpk --> tckr: throw Error: Failed to sign eth transaction. signedTransaction.rawTransaction is blank after .signTransaction() - end - deactivate tpk -end -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-pollfortxreceipt.puml b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-pollfortxreceipt.puml deleted file mode 100644 index 85c4727fd6..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-pollfortxreceipt.puml +++ /dev/null @@ -1,35 +0,0 @@ -@startuml Sequence Diagram - transact method - -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\npollForTxReceipt() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 100 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "pollForTxReceipt()" as pftr -participant "web3.eth.getTransactionReceipt" as wegt - -caller -> pftr: txHash, consistencyStrategy -activate caller -group #Orange - activate pftr - pftr -> wegt: - activate wegt - loop #LightGreen until confirmationCount >= \n consistencyStrategy.blockConfirmations - wegt --> pftr: txReceipt - deactivate wegt - end loop - - group #LightGreen if defined: txReceipt - pftr --> caller: txReceipt - else #LightCoral - pftr --> caller: Timed out - deactivate pftr - end -end -deactivate caller - - -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-privatekey.puml b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-privatekey.puml deleted file mode 100644 index 8b2ddbd128..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-privatekey.puml +++ /dev/null @@ -1,30 +0,0 @@ -@startuml Sequence Diagram - transact method - -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\ntransactPrivateKey() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "transactPrivateKey()" as tpk -participant "web3.eth.accounts.signTransaction()" as weas - -caller -> tpk: req -activate caller -alt #LightGreen web3SigningCredential == PRIVATEKEYHEX - group #LightGray if defined: signedTx.rawTransaction - activate tpk - tpk -> weas: [transactionConfig, secret] - activate weas - weas --> tpk: return [signedTx] - deactivate weas - tpk --> caller: return [req with rawTransaction] as resBody - else #LightCoral - tpk --> caller: throw Error: Failed to sign eth transaction. signedTransaction.rawTransaction is blank after .signTransaction() - deactivate tpk - end -end - -@enduml diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-signed.puml b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-signed.puml deleted file mode 100644 index 7c40ebcc00..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact-signed.puml +++ /dev/null @@ -1,35 +0,0 @@ -@startuml Sequence Diagram - transact method - -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\ntransactSigned() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "transactSigned()" as ts -participant "web3.eth.sendSignedTransaction()" as wesst - -caller -> ts: req -activate caller -group #e6e632 if web3SigningCredential == NONE - activate ts - ts -> wesst: rawTransaction - activate wesst - wesst --> ts: txPoolReceipt - deactivate wesst - group #ecec66 if ReceiptType == NODETXPOOLACK - ts --> caller: returns [txPoolReceipt] as resBody - else #f2f299 ReceiptType == LEDGERBLOCKACK - ts -> ts: pollForTxReceipt(txHash, consistencyStrategy) - ts --> caller: return [ledgerReceipt as transactionReceipt] as resBody - else #LightCoral - ts --> caller: throw Error: Unrecognized ReceiptType - deactivate ts - end -end -deactivate caller - - -@enduml diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact.puml b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact.puml deleted file mode 100644 index c8efaf061a..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint-transact.puml +++ /dev/null @@ -1,40 +0,0 @@ -@startuml -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\ntransact() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "PluginLedgerConnectorBesu" as t << (C,#ADD1B2) class >> - -autoactivate on - -activate caller -caller -> t: transact(RunTransactionRequest) - -alt #LightBlue web3SigningCredential == CACTUSKEYCHAINREF - t -> t: transactCactusKeychainRef(RunTransactionRequest) - return RunTransactionResponse - t --> caller: return RunTransactionResponse -else #LightGreen web3SigningCredential == PRIVATEKEYHEX - group #LightGray if defined: signedTx.rawTransaction - t -> t: transactPrivateKey(RunTransactionRequest) - return RunTransactionResponse - t --> caller: return RunTransactionResponse - else #LightCoral - t --> caller: throw Error: Failed to sign eth transaction. signedTransaction.rawTransaction is blank after .signTransaction() - end -else #e6e632 web3SigningCredential == NONE - group #LightGray if defined: req.transactionConfig.rawTransaction - t -> t: transactSigned(RunTransactionRequest) - return RunTransactionResponse - t --> caller: return RunTransactionResponse - else #LightCoral - t --> caller: throw Error: Expected pre-signed raw transaction - end -else #LightCoral default - t --> caller: throw Error: Unrecognized Web3SigningCredentialType -end -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint.puml b/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint.puml deleted file mode 100644 index 42b3b0ba6b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/docs/architecture/run-transaction-endpoint.puml +++ /dev/null @@ -1,29 +0,0 @@ -@startuml Sequence Diagram - Transaction - -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -box "Users" #LightBlue -actor "User A" as a -end box - -box "Hyperledger Cactus" #LightGray -entity "API Client" as apic -entity "API Server" as apis -end box - -box "Ledger Connector" #LightGreen -database "Besu" as besucon -end box - -a --> apic : Tx Besu Ledger -apic --> apis: Request -apis --> besucon: transact() -besucon --> apis: Response -apis --> apic: Formatted Response - -@enduml diff --git a/packages/cactus-plugin-ledger-connector-besu/openapitools.json b/packages/cactus-plugin-ledger-connector-besu/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/package.json b/packages/cactus-plugin-ledger-connector-besu/package.json deleted file mode 100644 index 432992f5c7..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/package.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-ledger-connector-besu", - "version": "2.0.0", - "description": "Allows Cactus nodes to connect to a Besu ledger.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-ledger-connector-besu.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "benchmark": "tsx ./src/test/typescript/benchmark/run-plugin-ledger-connector-besu-benchmark.ts .tmp/benchmark-results/plugin-ledger-connector-besu/run-plugin-ledger-connector-besu-benchmark.ts.log", - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "codegen:proto": "run-s proto:openapi proto:protoc-gen-ts", - "generate-sdk": "run-s 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "proto:openapi": "yarn run --top-level openapi-generator-cli generate -i ./src/main/json/openapi.json -g protobuf-schema --model-name-suffix=PB --language-specific-primitives=google.protobuf.Any --type-mappings=AnyType=google.protobuf.Any --type-mappings=object=google.protobuf.Any --additional-properties=packageName=org.hyperledger.cacti.plugin.ledger.connector.besu -o ./src/main/proto/generated/openapi/ -t=./src/main/mustache/openapi-generator/templates/protobuf-schema/ --ignore-file-override ../../openapi-generator-ignore", - "proto:protoc-gen-ts": "yarn run --top-level grpc_tools_node_protoc --plugin=protoc-gen-ts=../../node_modules/.bin/protoc-gen-ts --ts_out=grpc_js:./src/main/typescript/generated/proto/protoc-gen-ts/ --proto_path ./src/main/proto/generated/openapi/ --proto_path ./src/main/proto/generated/openapi/models/ --proto_path ./src/main/proto/ ./src/main/proto/generated/openapi/services/*.proto ./src/main/proto/services/*.proto", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@grpc/grpc-js": "1.11.3", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "express": "4.21.0", - "google-protobuf": "3.21.4", - "http-errors": "2.0.0", - "http-errors-enhanced-cjs": "2.0.1", - "joi": "17.13.3", - "openapi-types": "12.1.3", - "prom-client": "15.1.3", - "run-time-error-cjs": "1.4.0", - "rxjs": "7.8.1", - "socket.io-client-fixed-types": "4.5.4", - "typescript-optional": "2.0.1", - "web3": "1.6.1", - "web3-core": "1.6.1", - "web3-eth": "1.6.1", - "web3-eth-contract": "1.6.1", - "web3-utils": "1.6.1", - "web3js-quorum": "22.4.0" - }, - "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@openapitools/openapi-generator-cli": "2.7.0", - "@types/benchmark": "2.1.5", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/fs-extra": "11.0.4", - "@types/google-protobuf": "3.15.5", - "@types/http-errors": "2.0.4", - "@types/uuid": "10.0.0", - "benchmark": "2.1.4", - "body-parser": "1.20.3", - "fs-extra": "11.2.0", - "grpc-tools": "1.12.4", - "grpc_tools_node_protoc_ts": "5.3.3", - "key-encoder": "2.0.3", - "npm-run-all2": "6.1.2", - "protobufjs": "7.4.0", - "socket.io": "4.6.2", - "tsx": "4.16.2", - "uuid": "10.0.0", - "web3-core": "1.6.1", - "web3-eth": "1.6.1" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-ledger-connector-besu.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-ledger-connector-besu.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 5281a8735b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,53 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_besu_private_transaction_config.go -model_besu_transaction_config.go -model_besu_transaction_config_to.go -model_consistency_strategy.go -model_deploy_contract_solidity_bytecode_no_keychain_v1_request.go -model_deploy_contract_solidity_bytecode_v1_request.go -model_deploy_contract_solidity_bytecode_v1_response.go -model_eth_contract_invocation_type.go -model_evm_block.go -model_evm_log.go -model_evm_transaction.go -model_get_balance_v1_request.go -model_get_balance_v1_response.go -model_get_besu_record_v1_request.go -model_get_besu_record_v1_response.go -model_get_block_v1_request.go -model_get_block_v1_response.go -model_get_past_logs_v1_request.go -model_get_past_logs_v1_response.go -model_get_transaction_v1_request.go -model_get_transaction_v1_response.go -model_invoke_contract_v1_request.go -model_invoke_contract_v1_response.go -model_receipt_type.go -model_run_transaction_request.go -model_run_transaction_response.go -model_sign_transaction_request.go -model_sign_transaction_response.go -model_solidity_contract_json_artifact.go -model_solidity_contract_json_artifact_compiler.go -model_solidity_contract_json_artifact_gas_estimates.go -model_solidity_contract_json_artifact_gas_estimates_creation.go -model_watch_blocks_v1.go -model_watch_blocks_v1_progress.go -model_watch_blocks_v1_request.go -model_web3_block_header.go -model_web3_block_header_timestamp.go -model_web3_signing_credential.go -model_web3_signing_credential_cactus_keychain_ref.go -model_web3_signing_credential_none.go -model_web3_signing_credential_private_key_hex.go -model_web3_signing_credential_type.go -model_web3_transaction_receipt.go -response.go -utils.go diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index b251cc4c7d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,165 +0,0 @@ -# Go API client for cactus-plugin-ledger-connector-besu - -Can perform basic tasks on a Besu ledger - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-ledger-connector-besu "github.com/hyperledger/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-besu.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-besu.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-besu.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-ledger-connector-besu.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeployContractSolBytecodeNoKeychainV1**](docs/DefaultApi.md#deploycontractsolbytecodenokeychainv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain | Deploys the bytecode of a Solidity contract without the need of keychain -*DefaultApi* | [**DeployContractSolBytecodeV1**](docs/DefaultApi.md#deploycontractsolbytecodev1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode | Deploys the bytecode of a Solidity contract. -*DefaultApi* | [**GetBalanceV1**](docs/DefaultApi.md#getbalancev1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance | Return balance of an address of a given block -*DefaultApi* | [**GetBesuRecordV1**](docs/DefaultApi.md#getbesurecordv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record | Retrieves an arbitrary record (any piece of information) from the ledger. Ledger records can be call outputs, transaction input, etc. -*DefaultApi* | [**GetBlockV1**](docs/DefaultApi.md#getblockv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block | Returns a block matching the block -*DefaultApi* | [**GetOpenApiSpecV1**](docs/DefaultApi.md#getopenapispecv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec | Retrieves the .json file that contains the OpenAPI specification for the plugin. -*DefaultApi* | [**GetPastLogsV1**](docs/DefaultApi.md#getpastlogsv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs | Gets past logs, matching the given options. -*DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**GetTransactionV1**](docs/DefaultApi.md#gettransactionv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction | Executes a transaction on a besu ledger -*DefaultApi* | [**InvokeContractV1**](docs/DefaultApi.md#invokecontractv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract | Invokes a contract on a besu ledger -*DefaultApi* | [**RunTransactionV1**](docs/DefaultApi.md#runtransactionv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction | Executes a transaction on a besu ledger -*DefaultApi* | [**SignTransactionV1**](docs/DefaultApi.md#signtransactionv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction | Obtain signatures of ledger from the corresponding transaction hash. - - -## Documentation For Models - - - [BesuPrivateTransactionConfig](docs/BesuPrivateTransactionConfig.md) - - [BesuTransactionConfig](docs/BesuTransactionConfig.md) - - [BesuTransactionConfigTo](docs/BesuTransactionConfigTo.md) - - [ConsistencyStrategy](docs/ConsistencyStrategy.md) - - [DeployContractSolidityBytecodeNoKeychainV1Request](docs/DeployContractSolidityBytecodeNoKeychainV1Request.md) - - [DeployContractSolidityBytecodeV1Request](docs/DeployContractSolidityBytecodeV1Request.md) - - [DeployContractSolidityBytecodeV1Response](docs/DeployContractSolidityBytecodeV1Response.md) - - [EthContractInvocationType](docs/EthContractInvocationType.md) - - [EvmBlock](docs/EvmBlock.md) - - [EvmLog](docs/EvmLog.md) - - [EvmTransaction](docs/EvmTransaction.md) - - [GetBalanceV1Request](docs/GetBalanceV1Request.md) - - [GetBalanceV1Response](docs/GetBalanceV1Response.md) - - [GetBesuRecordV1Request](docs/GetBesuRecordV1Request.md) - - [GetBesuRecordV1Response](docs/GetBesuRecordV1Response.md) - - [GetBlockV1Request](docs/GetBlockV1Request.md) - - [GetBlockV1Response](docs/GetBlockV1Response.md) - - [GetPastLogsV1Request](docs/GetPastLogsV1Request.md) - - [GetPastLogsV1Response](docs/GetPastLogsV1Response.md) - - [GetTransactionV1Request](docs/GetTransactionV1Request.md) - - [GetTransactionV1Response](docs/GetTransactionV1Response.md) - - [InvokeContractV1Request](docs/InvokeContractV1Request.md) - - [InvokeContractV1Response](docs/InvokeContractV1Response.md) - - [ReceiptType](docs/ReceiptType.md) - - [RunTransactionRequest](docs/RunTransactionRequest.md) - - [RunTransactionResponse](docs/RunTransactionResponse.md) - - [SignTransactionRequest](docs/SignTransactionRequest.md) - - [SignTransactionResponse](docs/SignTransactionResponse.md) - - [SolidityContractJsonArtifact](docs/SolidityContractJsonArtifact.md) - - [SolidityContractJsonArtifactCompiler](docs/SolidityContractJsonArtifactCompiler.md) - - [SolidityContractJsonArtifactGasEstimates](docs/SolidityContractJsonArtifactGasEstimates.md) - - [SolidityContractJsonArtifactGasEstimatesCreation](docs/SolidityContractJsonArtifactGasEstimatesCreation.md) - - [WatchBlocksV1](docs/WatchBlocksV1.md) - - [WatchBlocksV1Progress](docs/WatchBlocksV1Progress.md) - - [WatchBlocksV1Request](docs/WatchBlocksV1Request.md) - - [Web3BlockHeader](docs/Web3BlockHeader.md) - - [Web3BlockHeaderTimestamp](docs/Web3BlockHeaderTimestamp.md) - - [Web3SigningCredential](docs/Web3SigningCredential.md) - - [Web3SigningCredentialCactusKeychainRef](docs/Web3SigningCredentialCactusKeychainRef.md) - - [Web3SigningCredentialNone](docs/Web3SigningCredentialNone.md) - - [Web3SigningCredentialPrivateKeyHex](docs/Web3SigningCredentialPrivateKeyHex.md) - - [Web3SigningCredentialType](docs/Web3SigningCredentialType.md) - - [Web3TransactionReceipt](docs/Web3TransactionReceipt.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 50e642bff4..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,1325 +0,0 @@ -openapi: 3.0.3 -info: - description: Can perform basic tasks on a Besu ledger - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - Connector Besu - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec: - get: - operationId: getOpenApiSpecV1 - parameters: [] - responses: - "200": - content: - application/json: - schema: - type: string - description: OK - summary: Retrieves the .json file that contains the OpenAPI specification for - the plugin. - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode: - post: - operationId: deployContractSolBytecodeV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractSolidityBytecodeV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractSolidityBytecodeV1Response' - description: OK - summary: Deploys the bytecode of a Solidity contract. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain: - post: - operationId: deployContractSolBytecodeNoKeychainV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractSolidityBytecodeNoKeychainV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractSolidityBytecodeV1Response' - description: OK - summary: Deploys the bytecode of a Solidity contract without the need of keychain - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance: - post: - operationId: getBalanceV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetBalanceV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetBalanceV1Response' - description: OK - summary: Return balance of an address of a given block - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block: - post: - operationId: getBlockV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetBlockV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetBlockV1Response' - description: OK - summary: Returns a block matching the block - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction: - post: - operationId: runTransactionV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionResponse' - description: OK - summary: Executes a transaction on a besu ledger - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction: - post: - operationId: getTransactionV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetTransactionV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetTransactionV1Response' - description: OK - summary: Executes a transaction on a besu ledger - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs: - post: - operationId: getPastLogsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetPastLogsV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetPastLogsV1Response' - description: OK - summary: "Gets past logs, matching the given options." - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract: - post: - operationId: invokeContractV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - summary: Invokes a contract on a besu ledger - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction: - post: - description: Obtain signatures of ledger from the corresponding transaction - hash. - operationId: signTransactionV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SignTransactionRequest' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SignTransactionResponse' - description: OK - "404": - description: Not able to find the corresponding tranaction from the transaction - hash - summary: Obtain signatures of ledger from the corresponding transaction hash. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record: - post: - operationId: getBesuRecordV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetBesuRecordV1Request' - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/GetBesuRecordV1Response' - description: OK - summary: "Retrieves an arbitrary record (any piece of information) from the\ - \ ledger. Ledger records can be call outputs, transaction input, etc." - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record -components: - schemas: - GetBalanceV1Response: - example: - balance: balance - properties: - balance: - type: string - required: - - balance - type: object - GetBalanceV1Request: - additionalProperties: false - example: - address: address - defaultBlock: "" - properties: - address: - type: string - defaultBlock: {} - required: - - address - type: object - EvmBlock: - example: - logsBloom: logsBloom - totalDifficulty: 1.4658129805029452 - extraData: extraData - transactions: - - "" - - "" - nonce: nonce - miner: miner - difficulty: 6.027456183070403 - number: 0.8008281904610115 - gasLimit: 5.637376656633329 - gasUsed: 2.3021358869347655 - uncles: - - "" - - "" - sha3Uncles: sha3Uncles - size: 5.962133916683182 - transactionsRoot: transactionsRoot - stateRoot: stateRoot - parentHash: parentHash - hash: hash - timestamp: "" - properties: - number: - type: number - hash: - type: string - parentHash: - type: string - nonce: - type: string - sha3Uncles: - type: string - logsBloom: - type: string - transactionsRoot: - type: string - stateRoot: - type: string - miner: - type: string - difficulty: - type: number - totalDifficulty: - type: number - extraData: - type: string - size: - type: number - gasLimit: - type: number - gasUsed: - type: number - timestamp: {} - transactions: - items: {} - type: array - uncles: - items: {} - type: array - type: object - GetBlockV1Response: - example: - block: - logsBloom: logsBloom - totalDifficulty: 1.4658129805029452 - extraData: extraData - transactions: - - "" - - "" - nonce: nonce - miner: miner - difficulty: 6.027456183070403 - number: 0.8008281904610115 - gasLimit: 5.637376656633329 - gasUsed: 2.3021358869347655 - uncles: - - "" - - "" - sha3Uncles: sha3Uncles - size: 5.962133916683182 - transactionsRoot: transactionsRoot - stateRoot: stateRoot - parentHash: parentHash - hash: hash - timestamp: "" - properties: - block: - $ref: '#/components/schemas/EvmBlock' - required: - - block - type: object - EvmTransaction: - example: - blockHash: "" - input: input - blockNumber: "" - gas: 6.027456183070403 - transactionIndex: "" - from: from - to: "" - nonce: 0.8008281904610115 - value: value - hash: hash - gasPrice: gasPrice - properties: - hash: - type: string - nonce: - type: number - blockHash: {} - blockNumber: {} - transactionIndex: {} - from: - type: string - to: {} - value: - type: string - gasPrice: - type: string - gas: - type: number - input: - type: string - type: object - GetTransactionV1Response: - example: - transaction: - blockHash: "" - input: input - blockNumber: "" - gas: 6.027456183070403 - transactionIndex: "" - from: from - to: "" - nonce: 0.8008281904610115 - value: value - hash: hash - gasPrice: gasPrice - properties: - transaction: - $ref: '#/components/schemas/EvmTransaction' - required: - - transaction - type: object - GetTransactionV1Request: - additionalProperties: false - example: - transactionHash: transactionHash - properties: - transactionHash: - type: string - required: - - transactionHash - type: object - GetPastLogsV1Response: - example: - logs: - - blockHash: blockHash - address: address - logIndex: 0.8008281904610115 - data: data - topics: - - topics - - topics - blockNumber: 1.4658129805029452 - transactionIndex: 6.027456183070403 - transactionHash: transactionHash - - blockHash: blockHash - address: address - logIndex: 0.8008281904610115 - data: data - topics: - - topics - - topics - blockNumber: 1.4658129805029452 - transactionIndex: 6.027456183070403 - transactionHash: transactionHash - properties: - logs: - items: - $ref: '#/components/schemas/EvmLog' - type: array - required: - - logs - type: object - GetPastLogsV1Request: - additionalProperties: false - example: - fromBlock: "" - toBlock: "" - address: "" - topics: - - "" - - "" - properties: - toBlock: {} - fromBlock: {} - address: {} - topics: - items: {} - type: array - type: object - EvmLog: - example: - blockHash: blockHash - address: address - logIndex: 0.8008281904610115 - data: data - topics: - - topics - - topics - blockNumber: 1.4658129805029452 - transactionIndex: 6.027456183070403 - transactionHash: transactionHash - properties: - address: - type: string - data: - type: string - blockHash: - type: string - transactionHash: - type: string - topics: - items: - type: string - type: array - logIndex: - type: number - transactionIndex: - type: number - blockNumber: - type: number - required: - - address - - blockHash - - blockNumber - - data - - logIndex - - topics - - transactionHash - - transactionIndex - type: object - GetBlockV1Request: - additionalProperties: false - example: - blockHashOrBlockNumber: "" - properties: - blockHashOrBlockNumber: {} - required: - - blockHashOrBlockNumber - type: object - WatchBlocksV1: - enum: - - org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Subscribe - - org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Next - - org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Unsubscribe - - org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Error - - org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Complete - type: string - x-enum-varnames: - - Subscribe - - Next - - Unsubscribe - - Error - - Complete - WatchBlocksV1Request: - properties: - event: - $ref: '#/components/schemas/WatchBlocksV1' - required: - - event - type: object - Web3BlockHeader: - properties: - number: - type: number - hash: - type: string - parentHash: - type: string - nonce: - type: string - sha3Uncles: - type: string - logsBloom: - type: string - transactionRoot: - type: string - stateRoot: - type: string - receiptRoot: - type: string - miner: - type: string - extraData: - type: string - gasLimit: - type: integer - gasUsed: - type: integer - timestamp: - $ref: '#/components/schemas/Web3BlockHeader_timestamp' - required: - - extraData - - gasLimit - - gasUsed - - hash - - logsBloom - - miner - - nonce - - number - - parentHash - - receiptRoot - - sha3Uncles - - stateRoot - - timestamp - - transactionRoot - type: object - WatchBlocksV1Progress: - properties: - blockHeader: - $ref: '#/components/schemas/Web3BlockHeader' - required: - - blockHeader - type: object - ReceiptType: - description: Enumerates the possible types of receipts that can be waited for - by someone or something that has requested the execution of a transaction - on a ledger. - enum: - - NODE_TX_POOL_ACK - - LEDGER_BLOCK_ACK - type: string - ConsistencyStrategy: - example: - blockConfirmations: 2931 - receiptType: null - timeoutMs: 0 - properties: - receiptType: - $ref: '#/components/schemas/ReceiptType' - timeoutMs: - description: "The amount of milliseconds to wait for the receipt to arrive\ - \ to the connector. Defaults to 0 which means to wait for an unlimited\ - \ amount of time. Note that this wait may be interrupted still by other\ - \ parts of the infrastructure such as load balancers cutting of HTTP requests\ - \ after some time even if they are the type that is supposed to be kept\ - \ alive. The question of re-entrance is a broader topic not in scope to\ - \ discuss here, but it is important to mention it." - minimum: 0 - type: integer - blockConfirmations: - description: "The number of blocks to wait to be confirmed in addition to\ - \ the block containing the transaction in question. Note that if the receipt\ - \ type is set to only wait for node transaction pool ACK and this parameter\ - \ is set to anything, but zero then the API will not accept the request\ - \ due to conflicting parameters." - maximum: 20000 - minimum: 0 - type: integer - required: - - blockConfirmations - - receiptType - type: object - Web3SigningCredential: - discriminator: - propertyName: type - example: - type: null - oneOf: - - $ref: '#/components/schemas/Web3SigningCredentialCactusKeychainRef' - - $ref: '#/components/schemas/Web3SigningCredentialPrivateKeyHex' - - $ref: '#/components/schemas/Web3SigningCredentialNone' - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredentialCactusKeychainRef: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 64 - minLength: 64 - nullable: false - type: string - keychainEntryKey: - description: The key to use when looking up the the keychain entry holding - the secret pointed to by the keychainEntryKey parameter. - maxLength: 1024 - minLength: 0 - type: string - keychainId: - description: The keychain ID to use when looking up the the keychain plugin - instance that will be used to retrieve the secret pointed to by the keychainEntryKey - parameter. - maxLength: 1024 - minLength: 0 - type: string - required: - - ethAccount - - keychainEntryKey - - keychainId - - type - type: object - Web3SigningCredentialPrivateKeyHex: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 64 - minLength: 64 - nullable: false - type: string - secret: - description: The HEX encoded private key of an eth account. - maxLength: 65535 - minLength: 0 - type: string - required: - - ethAccount - - secret - - type - type: object - Web3SigningCredentialNone: - description: Using this denotes that there is no signing required because the - transaction is pre-signed. - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredentialType: - enum: - - CACTUS_KEYCHAIN_REF - - GETH_KEYCHAIN_PASSWORD - - PRIVATE_KEY_HEX - - NONE - type: string - EthContractInvocationType: - enum: - - SEND - - CALL - type: string - SolidityContractJsonArtifact: - properties: - contractName: - nullable: false - type: string - metadata: - nullable: false - type: string - bytecode: - nullable: false - type: string - deployedBytecode: - nullable: false - type: string - sourceMap: - nullable: false - type: string - deployedSourceMap: - nullable: false - type: string - sourcePath: - type: string - compiler: - $ref: '#/components/schemas/SolidityContractJsonArtifact_compiler' - functionHashes: - additionalProperties: true - type: object - gasEstimates: - $ref: '#/components/schemas/SolidityContractJsonArtifact_gasEstimates' - required: - - contractName - type: object - BesuTransactionConfig: - additionalProperties: true - example: - rawTransaction: rawTransaction - data: null - gas: null - from: null - to: null - value: null - nonce: 0.8008281904610115 - gasPrice: null - properties: - rawTransaction: - nullable: false - type: string - from: - $ref: '#/components/schemas/Web3BlockHeader_timestamp' - to: - $ref: '#/components/schemas/BesuTransactionConfig_to' - value: - $ref: '#/components/schemas/Web3BlockHeader_timestamp' - gas: - $ref: '#/components/schemas/Web3BlockHeader_timestamp' - gasPrice: - $ref: '#/components/schemas/Web3BlockHeader_timestamp' - nonce: - type: number - data: - $ref: '#/components/schemas/BesuTransactionConfig_to' - type: object - BesuPrivateTransactionConfig: - example: - privateFrom: privateFrom - privateFor: - - "" - - "" - properties: - privateFrom: - nullable: false - type: string - privateFor: - default: [] - items: {} - nullable: false - type: array - required: - - privateFor - - privateFrom - type: object - Web3TransactionReceipt: - additionalProperties: true - example: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - properties: - status: - nullable: false - type: boolean - transactionHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - transactionIndex: - nullable: false - type: number - blockHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - blockNumber: - nullable: false - type: number - gasUsed: - nullable: false - type: number - contractAddress: - nullable: true - type: string - from: - nullable: false - type: string - to: - nullable: false - type: string - required: - - blockHash - - blockNumber - - from - - gasUsed - - status - - to - - transactionHash - - transactionIndex - type: object - RunTransactionRequest: - additionalProperties: false - example: - privateTransactionConfig: - privateFrom: privateFrom - privateFor: - - "" - - "" - transactionConfig: - rawTransaction: rawTransaction - data: null - gas: null - from: null - to: null - value: null - nonce: 0.8008281904610115 - gasPrice: null - consistencyStrategy: - blockConfirmations: 2931 - receiptType: null - timeoutMs: 0 - web3SigningCredential: - type: null - properties: - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - transactionConfig: - $ref: '#/components/schemas/BesuTransactionConfig' - consistencyStrategy: - $ref: '#/components/schemas/ConsistencyStrategy' - privateTransactionConfig: - $ref: '#/components/schemas/BesuPrivateTransactionConfig' - required: - - consistencyStrategy - - transactionConfig - - web3SigningCredential - type: object - RunTransactionResponse: - example: - transactionReceipt: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - required: - - transactionReceipt - type: object - DeployContractSolidityBytecodeV1Request: - additionalProperties: false - example: - bytecode: bytecode - privateTransactionConfig: - privateFrom: privateFrom - privateFor: - - "" - - "" - keychainId: keychainId - constructorArgs: - - "" - - "" - timeoutMs: 0.6027456183070403 - contractAbi: - - "" - - "" - gas: 0.8008281904610115 - web3SigningCredential: - type: null - contractName: contractName - gasPrice: gasPrice - properties: - contractName: - description: The contract name for retrieve the contracts json on the keychain. - maxLength: 100 - minLength: 1 - nullable: false - type: string - contractAbi: - description: The application binary interface of the solidity contract - items: {} - nullable: false - type: array - constructorArgs: - default: [] - items: {} - type: array - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - bytecode: - description: See https://ethereum.stackexchange.com/a/47556 regarding the - maximum length of the bytecode - maxLength: 24576 - minLength: 1 - nullable: false - type: string - keychainId: - description: The keychainId for retrieve the contracts json. - maxLength: 100 - minLength: 1 - nullable: false - type: string - gas: - nullable: false - type: number - gasPrice: - nullable: false - type: string - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - with theaddress of the contract(which indicates successful deployment) - beforegiving up and crashing. - minimum: 0 - nullable: false - type: number - privateTransactionConfig: - $ref: '#/components/schemas/BesuPrivateTransactionConfig' - required: - - bytecode - - constructorArgs - - contractAbi - - contractName - - keychainId - - web3SigningCredential - type: object - DeployContractSolidityBytecodeNoKeychainV1Request: - additionalProperties: false - example: - bytecode: bytecode - privateTransactionConfig: - privateFrom: privateFrom - privateFor: - - "" - - "" - constructorArgs: - - "" - - "" - timeoutMs: 0.6027456183070403 - contractAbi: - - "" - - "" - gas: 0.8008281904610115 - web3SigningCredential: - type: null - contractName: contractName - gasPrice: gasPrice - properties: - contractName: - description: The contract name for retrieve the contracts json on the keychain. - maxLength: 100 - minLength: 1 - nullable: false - type: string - contractAbi: - description: The application binary interface of the solidity contract - items: {} - nullable: false - type: array - constructorArgs: - default: [] - items: {} - type: array - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - bytecode: - description: See https://ethereum.stackexchange.com/a/47556 regarding the - maximum length of the bytecode - maxLength: 24576 - minLength: 1 - nullable: false - type: string - gas: - nullable: false - type: number - gasPrice: - nullable: false - type: string - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - with theaddress of the contract(which indicates successful deployment) - beforegiving up and crashing. - minimum: 0 - nullable: false - type: number - privateTransactionConfig: - $ref: '#/components/schemas/BesuPrivateTransactionConfig' - required: - - bytecode - - constructorArgs - - contractAbi - - contractName - - web3SigningCredential - type: object - DeployContractSolidityBytecodeV1Response: - example: - transactionReceipt: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - required: - - transactionReceipt - type: object - InvokeContractV1Request: - additionalProperties: false - example: - privateTransactionConfig: - privateFrom: privateFrom - privateFor: - - "" - - "" - methodName: methodName - contractAddress: contractAddress - params: - - "" - - "" - nonce: 0.8008281904610115 - invocationType: null - keychainId: keychainId - timeoutMs: 0.6027456183070403 - contractAbi: - - "" - - "" - gas: null - contractName: contractName - value: null - signingCredential: - type: null - gasPrice: null - properties: - contractName: - nullable: false - type: string - signingCredential: - $ref: '#/components/schemas/Web3SigningCredential' - invocationType: - $ref: '#/components/schemas/EthContractInvocationType' - methodName: - description: The name of the contract method to invoke. - maxLength: 2048 - minLength: 1 - nullable: false - type: string - params: - default: [] - description: The list of arguments to pass in to the contract method being - invoked. - items: {} - type: array - contractAbi: - description: "The application binary interface of the solidity contract,\ - \ optional parameter" - items: {} - nullable: false - type: array - contractAddress: - description: "Address of the solidity contract, optional parameter" - nullable: false - type: string - value: - $ref: '#/components/schemas/Web3BlockHeader_timestamp' - gas: - $ref: '#/components/schemas/Web3BlockHeader_timestamp' - gasPrice: - $ref: '#/components/schemas/Web3BlockHeader_timestamp' - nonce: - type: number - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - beforegiving up and crashing. Only has any effect if the invocation type - is SEND - minimum: 0 - nullable: false - type: number - keychainId: - description: The keychainId for retrieve the contracts json. - maxLength: 100 - minLength: 1 - type: string - privateTransactionConfig: - $ref: '#/components/schemas/BesuPrivateTransactionConfig' - required: - - contractName - - invocationType - - methodName - - params - - signingCredential - type: object - InvokeContractV1Response: - example: - transactionReceipt: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - callOutput: "" - success: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - callOutput: {} - success: - nullable: false - type: boolean - required: - - success - type: object - SignTransactionRequest: - additionalProperties: false - example: - keychainId: keychainId - keychainRef: keychainRef - transactionHash: transactionHash - properties: - keychainId: - maxLength: 100 - minLength: 1 - nullable: false - type: string - keychainRef: - maxLength: 100 - minLength: 1 - nullable: false - type: string - transactionHash: - description: The transaction hash of ledger will be used to fetch the contain. - maxLength: 2048 - minLength: 0 - nullable: false - type: string - required: - - keychainId - - keychainRef - - transactionHash - type: object - SignTransactionResponse: - example: - signature: signature - properties: - signature: - description: The signatures of ledger from the corresponding transaction - hash. - maxLength: 2048 - minLength: 0 - nullable: false - type: string - required: - - signature - type: object - PrometheusExporterMetricsResponse: - nullable: false - type: string - GetBesuRecordV1Request: - additionalProperties: false - example: - invokeCall: - privateTransactionConfig: - privateFrom: privateFrom - privateFor: - - "" - - "" - methodName: methodName - contractAddress: contractAddress - params: - - "" - - "" - nonce: 0.8008281904610115 - invocationType: null - keychainId: keychainId - timeoutMs: 0.6027456183070403 - contractAbi: - - "" - - "" - gas: null - contractName: contractName - value: null - signingCredential: - type: null - gasPrice: null - transactionHash: transactionHash - properties: - invokeCall: - $ref: '#/components/schemas/InvokeContractV1Request' - transactionHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - type: object - GetBesuRecordV1Response: - properties: - ledgerId: - type: string - stateContract: - type: string - transactionInputData: {} - callOutput: {} - type: object - Web3BlockHeader_timestamp: - oneOf: - - type: string - - type: number - SolidityContractJsonArtifact_compiler: - additionalProperties: true - properties: - name: - type: string - version: - type: string - type: object - SolidityContractJsonArtifact_gasEstimates_creation: - properties: - codeDepositCost: - type: string - executionCost: - type: string - totalCost: - type: string - type: object - SolidityContractJsonArtifact_gasEstimates: - properties: - creation: - $ref: '#/components/schemas/SolidityContractJsonArtifact_gasEstimates_creation' - external: - additionalProperties: true - type: object - BesuTransactionConfig_to: - oneOf: - - type: string diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index fc28f440ca..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,1272 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeployContractSolBytecodeNoKeychainV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deployContractSolidityBytecodeNoKeychainV1Request *DeployContractSolidityBytecodeNoKeychainV1Request -} - -func (r ApiDeployContractSolBytecodeNoKeychainV1Request) DeployContractSolidityBytecodeNoKeychainV1Request(deployContractSolidityBytecodeNoKeychainV1Request DeployContractSolidityBytecodeNoKeychainV1Request) ApiDeployContractSolBytecodeNoKeychainV1Request { - r.deployContractSolidityBytecodeNoKeychainV1Request = &deployContractSolidityBytecodeNoKeychainV1Request - return r -} - -func (r ApiDeployContractSolBytecodeNoKeychainV1Request) Execute() (*DeployContractSolidityBytecodeV1Response, *http.Response, error) { - return r.ApiService.DeployContractSolBytecodeNoKeychainV1Execute(r) -} - -/* -DeployContractSolBytecodeNoKeychainV1 Deploys the bytecode of a Solidity contract without the need of keychain - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeployContractSolBytecodeNoKeychainV1Request -*/ -func (a *DefaultApiService) DeployContractSolBytecodeNoKeychainV1(ctx context.Context) ApiDeployContractSolBytecodeNoKeychainV1Request { - return ApiDeployContractSolBytecodeNoKeychainV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeployContractSolidityBytecodeV1Response -func (a *DefaultApiService) DeployContractSolBytecodeNoKeychainV1Execute(r ApiDeployContractSolBytecodeNoKeychainV1Request) (*DeployContractSolidityBytecodeV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeployContractSolidityBytecodeV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeployContractSolBytecodeNoKeychainV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deployContractSolidityBytecodeNoKeychainV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeployContractSolBytecodeV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deployContractSolidityBytecodeV1Request *DeployContractSolidityBytecodeV1Request -} - -func (r ApiDeployContractSolBytecodeV1Request) DeployContractSolidityBytecodeV1Request(deployContractSolidityBytecodeV1Request DeployContractSolidityBytecodeV1Request) ApiDeployContractSolBytecodeV1Request { - r.deployContractSolidityBytecodeV1Request = &deployContractSolidityBytecodeV1Request - return r -} - -func (r ApiDeployContractSolBytecodeV1Request) Execute() (*DeployContractSolidityBytecodeV1Response, *http.Response, error) { - return r.ApiService.DeployContractSolBytecodeV1Execute(r) -} - -/* -DeployContractSolBytecodeV1 Deploys the bytecode of a Solidity contract. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeployContractSolBytecodeV1Request -*/ -func (a *DefaultApiService) DeployContractSolBytecodeV1(ctx context.Context) ApiDeployContractSolBytecodeV1Request { - return ApiDeployContractSolBytecodeV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeployContractSolidityBytecodeV1Response -func (a *DefaultApiService) DeployContractSolBytecodeV1Execute(r ApiDeployContractSolBytecodeV1Request) (*DeployContractSolidityBytecodeV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeployContractSolidityBytecodeV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeployContractSolBytecodeV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deployContractSolidityBytecodeV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetBalanceV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getBalanceV1Request *GetBalanceV1Request -} - -func (r ApiGetBalanceV1Request) GetBalanceV1Request(getBalanceV1Request GetBalanceV1Request) ApiGetBalanceV1Request { - r.getBalanceV1Request = &getBalanceV1Request - return r -} - -func (r ApiGetBalanceV1Request) Execute() (*GetBalanceV1Response, *http.Response, error) { - return r.ApiService.GetBalanceV1Execute(r) -} - -/* -GetBalanceV1 Return balance of an address of a given block - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetBalanceV1Request -*/ -func (a *DefaultApiService) GetBalanceV1(ctx context.Context) ApiGetBalanceV1Request { - return ApiGetBalanceV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetBalanceV1Response -func (a *DefaultApiService) GetBalanceV1Execute(r ApiGetBalanceV1Request) (*GetBalanceV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetBalanceV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetBalanceV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getBalanceV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetBesuRecordV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getBesuRecordV1Request *GetBesuRecordV1Request -} - -func (r ApiGetBesuRecordV1Request) GetBesuRecordV1Request(getBesuRecordV1Request GetBesuRecordV1Request) ApiGetBesuRecordV1Request { - r.getBesuRecordV1Request = &getBesuRecordV1Request - return r -} - -func (r ApiGetBesuRecordV1Request) Execute() (*GetBesuRecordV1Response, *http.Response, error) { - return r.ApiService.GetBesuRecordV1Execute(r) -} - -/* -GetBesuRecordV1 Retrieves an arbitrary record (any piece of information) from the ledger. Ledger records can be call outputs, transaction input, etc. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetBesuRecordV1Request -*/ -func (a *DefaultApiService) GetBesuRecordV1(ctx context.Context) ApiGetBesuRecordV1Request { - return ApiGetBesuRecordV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetBesuRecordV1Response -func (a *DefaultApiService) GetBesuRecordV1Execute(r ApiGetBesuRecordV1Request) (*GetBesuRecordV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetBesuRecordV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetBesuRecordV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getBesuRecordV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetBlockV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getBlockV1Request *GetBlockV1Request -} - -func (r ApiGetBlockV1Request) GetBlockV1Request(getBlockV1Request GetBlockV1Request) ApiGetBlockV1Request { - r.getBlockV1Request = &getBlockV1Request - return r -} - -func (r ApiGetBlockV1Request) Execute() (*GetBlockV1Response, *http.Response, error) { - return r.ApiService.GetBlockV1Execute(r) -} - -/* -GetBlockV1 Returns a block matching the block - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetBlockV1Request -*/ -func (a *DefaultApiService) GetBlockV1(ctx context.Context) ApiGetBlockV1Request { - return ApiGetBlockV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetBlockV1Response -func (a *DefaultApiService) GetBlockV1Execute(r ApiGetBlockV1Request) (*GetBlockV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetBlockV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetBlockV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getBlockV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetOpenApiSpecV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetOpenApiSpecV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetOpenApiSpecV1Execute(r) -} - -/* -GetOpenApiSpecV1 Retrieves the .json file that contains the OpenAPI specification for the plugin. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetOpenApiSpecV1Request -*/ -func (a *DefaultApiService) GetOpenApiSpecV1(ctx context.Context) ApiGetOpenApiSpecV1Request { - return ApiGetOpenApiSpecV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetOpenApiSpecV1Execute(r ApiGetOpenApiSpecV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetOpenApiSpecV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPastLogsV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getPastLogsV1Request *GetPastLogsV1Request -} - -func (r ApiGetPastLogsV1Request) GetPastLogsV1Request(getPastLogsV1Request GetPastLogsV1Request) ApiGetPastLogsV1Request { - r.getPastLogsV1Request = &getPastLogsV1Request - return r -} - -func (r ApiGetPastLogsV1Request) Execute() (*GetPastLogsV1Response, *http.Response, error) { - return r.ApiService.GetPastLogsV1Execute(r) -} - -/* -GetPastLogsV1 Gets past logs, matching the given options. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPastLogsV1Request -*/ -func (a *DefaultApiService) GetPastLogsV1(ctx context.Context) ApiGetPastLogsV1Request { - return ApiGetPastLogsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetPastLogsV1Response -func (a *DefaultApiService) GetPastLogsV1Execute(r ApiGetPastLogsV1Request) (*GetPastLogsV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetPastLogsV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPastLogsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getPastLogsV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsV1Execute(r) -} - -/* -GetPrometheusMetricsV1 Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsV1Request -*/ -func (a *DefaultApiService) GetPrometheusMetricsV1(ctx context.Context) ApiGetPrometheusMetricsV1Request { - return ApiGetPrometheusMetricsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsV1Execute(r ApiGetPrometheusMetricsV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetricsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetTransactionV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getTransactionV1Request *GetTransactionV1Request -} - -func (r ApiGetTransactionV1Request) GetTransactionV1Request(getTransactionV1Request GetTransactionV1Request) ApiGetTransactionV1Request { - r.getTransactionV1Request = &getTransactionV1Request - return r -} - -func (r ApiGetTransactionV1Request) Execute() (*GetTransactionV1Response, *http.Response, error) { - return r.ApiService.GetTransactionV1Execute(r) -} - -/* -GetTransactionV1 Executes a transaction on a besu ledger - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetTransactionV1Request -*/ -func (a *DefaultApiService) GetTransactionV1(ctx context.Context) ApiGetTransactionV1Request { - return ApiGetTransactionV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetTransactionV1Response -func (a *DefaultApiService) GetTransactionV1Execute(r ApiGetTransactionV1Request) (*GetTransactionV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetTransactionV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetTransactionV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getTransactionV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInvokeContractV1Request struct { - ctx context.Context - ApiService *DefaultApiService - invokeContractV1Request *InvokeContractV1Request -} - -func (r ApiInvokeContractV1Request) InvokeContractV1Request(invokeContractV1Request InvokeContractV1Request) ApiInvokeContractV1Request { - r.invokeContractV1Request = &invokeContractV1Request - return r -} - -func (r ApiInvokeContractV1Request) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.InvokeContractV1Execute(r) -} - -/* -InvokeContractV1 Invokes a contract on a besu ledger - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInvokeContractV1Request -*/ -func (a *DefaultApiService) InvokeContractV1(ctx context.Context) ApiInvokeContractV1Request { - return ApiInvokeContractV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) InvokeContractV1Execute(r ApiInvokeContractV1Request) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InvokeContractV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.invokeContractV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRunTransactionV1Request struct { - ctx context.Context - ApiService *DefaultApiService - runTransactionRequest *RunTransactionRequest -} - -func (r ApiRunTransactionV1Request) RunTransactionRequest(runTransactionRequest RunTransactionRequest) ApiRunTransactionV1Request { - r.runTransactionRequest = &runTransactionRequest - return r -} - -func (r ApiRunTransactionV1Request) Execute() (*RunTransactionResponse, *http.Response, error) { - return r.ApiService.RunTransactionV1Execute(r) -} - -/* -RunTransactionV1 Executes a transaction on a besu ledger - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRunTransactionV1Request -*/ -func (a *DefaultApiService) RunTransactionV1(ctx context.Context) ApiRunTransactionV1Request { - return ApiRunTransactionV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RunTransactionResponse -func (a *DefaultApiService) RunTransactionV1Execute(r ApiRunTransactionV1Request) (*RunTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RunTransactionV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.runTransactionRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSignTransactionV1Request struct { - ctx context.Context - ApiService *DefaultApiService - signTransactionRequest *SignTransactionRequest -} - -func (r ApiSignTransactionV1Request) SignTransactionRequest(signTransactionRequest SignTransactionRequest) ApiSignTransactionV1Request { - r.signTransactionRequest = &signTransactionRequest - return r -} - -func (r ApiSignTransactionV1Request) Execute() (*SignTransactionResponse, *http.Response, error) { - return r.ApiService.SignTransactionV1Execute(r) -} - -/* -SignTransactionV1 Obtain signatures of ledger from the corresponding transaction hash. - -Obtain signatures of ledger from the corresponding transaction hash. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSignTransactionV1Request -*/ -func (a *DefaultApiService) SignTransactionV1(ctx context.Context) ApiSignTransactionV1Request { - return ApiSignTransactionV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SignTransactionResponse -func (a *DefaultApiService) SignTransactionV1Execute(r ApiSignTransactionV1Request) (*SignTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SignTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SignTransactionV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.signTransactionRequest == nil { - return localVarReturnValue, nil, reportError("signTransactionRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.signTransactionRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 4ca816dfc2..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Connector Besu API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 4215ffb7fc..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 9ed243b897..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_besu_private_transaction_config.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_besu_private_transaction_config.go deleted file mode 100644 index 05ed0fda11..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_besu_private_transaction_config.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the BesuPrivateTransactionConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BesuPrivateTransactionConfig{} - -// BesuPrivateTransactionConfig struct for BesuPrivateTransactionConfig -type BesuPrivateTransactionConfig struct { - PrivateFrom string `json:"privateFrom"` - PrivateFor []interface{} `json:"privateFor"` -} - -// NewBesuPrivateTransactionConfig instantiates a new BesuPrivateTransactionConfig object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBesuPrivateTransactionConfig(privateFrom string, privateFor []interface{}) *BesuPrivateTransactionConfig { - this := BesuPrivateTransactionConfig{} - this.PrivateFrom = privateFrom - this.PrivateFor = privateFor - return &this -} - -// NewBesuPrivateTransactionConfigWithDefaults instantiates a new BesuPrivateTransactionConfig object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBesuPrivateTransactionConfigWithDefaults() *BesuPrivateTransactionConfig { - this := BesuPrivateTransactionConfig{} - return &this -} - -// GetPrivateFrom returns the PrivateFrom field value -func (o *BesuPrivateTransactionConfig) GetPrivateFrom() string { - if o == nil { - var ret string - return ret - } - - return o.PrivateFrom -} - -// GetPrivateFromOk returns a tuple with the PrivateFrom field value -// and a boolean to check if the value has been set. -func (o *BesuPrivateTransactionConfig) GetPrivateFromOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PrivateFrom, true -} - -// SetPrivateFrom sets field value -func (o *BesuPrivateTransactionConfig) SetPrivateFrom(v string) { - o.PrivateFrom = v -} - -// GetPrivateFor returns the PrivateFor field value -func (o *BesuPrivateTransactionConfig) GetPrivateFor() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.PrivateFor -} - -// GetPrivateForOk returns a tuple with the PrivateFor field value -// and a boolean to check if the value has been set. -func (o *BesuPrivateTransactionConfig) GetPrivateForOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.PrivateFor, true -} - -// SetPrivateFor sets field value -func (o *BesuPrivateTransactionConfig) SetPrivateFor(v []interface{}) { - o.PrivateFor = v -} - -func (o BesuPrivateTransactionConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BesuPrivateTransactionConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["privateFrom"] = o.PrivateFrom - toSerialize["privateFor"] = o.PrivateFor - return toSerialize, nil -} - -type NullableBesuPrivateTransactionConfig struct { - value *BesuPrivateTransactionConfig - isSet bool -} - -func (v NullableBesuPrivateTransactionConfig) Get() *BesuPrivateTransactionConfig { - return v.value -} - -func (v *NullableBesuPrivateTransactionConfig) Set(val *BesuPrivateTransactionConfig) { - v.value = val - v.isSet = true -} - -func (v NullableBesuPrivateTransactionConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableBesuPrivateTransactionConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBesuPrivateTransactionConfig(val *BesuPrivateTransactionConfig) *NullableBesuPrivateTransactionConfig { - return &NullableBesuPrivateTransactionConfig{value: val, isSet: true} -} - -func (v NullableBesuPrivateTransactionConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBesuPrivateTransactionConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_besu_transaction_config.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_besu_transaction_config.go deleted file mode 100644 index 54aa540c08..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_besu_transaction_config.go +++ /dev/null @@ -1,410 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the BesuTransactionConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BesuTransactionConfig{} - -// BesuTransactionConfig struct for BesuTransactionConfig -type BesuTransactionConfig struct { - RawTransaction *string `json:"rawTransaction,omitempty"` - From *Web3BlockHeaderTimestamp `json:"from,omitempty"` - To *BesuTransactionConfigTo `json:"to,omitempty"` - Value *Web3BlockHeaderTimestamp `json:"value,omitempty"` - Gas *Web3BlockHeaderTimestamp `json:"gas,omitempty"` - GasPrice *Web3BlockHeaderTimestamp `json:"gasPrice,omitempty"` - Nonce *float32 `json:"nonce,omitempty"` - Data *BesuTransactionConfigTo `json:"data,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _BesuTransactionConfig BesuTransactionConfig - -// NewBesuTransactionConfig instantiates a new BesuTransactionConfig object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBesuTransactionConfig() *BesuTransactionConfig { - this := BesuTransactionConfig{} - return &this -} - -// NewBesuTransactionConfigWithDefaults instantiates a new BesuTransactionConfig object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBesuTransactionConfigWithDefaults() *BesuTransactionConfig { - this := BesuTransactionConfig{} - return &this -} - -// GetRawTransaction returns the RawTransaction field value if set, zero value otherwise. -func (o *BesuTransactionConfig) GetRawTransaction() string { - if o == nil || IsNil(o.RawTransaction) { - var ret string - return ret - } - return *o.RawTransaction -} - -// GetRawTransactionOk returns a tuple with the RawTransaction field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BesuTransactionConfig) GetRawTransactionOk() (*string, bool) { - if o == nil || IsNil(o.RawTransaction) { - return nil, false - } - return o.RawTransaction, true -} - -// HasRawTransaction returns a boolean if a field has been set. -func (o *BesuTransactionConfig) HasRawTransaction() bool { - if o != nil && !IsNil(o.RawTransaction) { - return true - } - - return false -} - -// SetRawTransaction gets a reference to the given string and assigns it to the RawTransaction field. -func (o *BesuTransactionConfig) SetRawTransaction(v string) { - o.RawTransaction = &v -} - -// GetFrom returns the From field value if set, zero value otherwise. -func (o *BesuTransactionConfig) GetFrom() Web3BlockHeaderTimestamp { - if o == nil || IsNil(o.From) { - var ret Web3BlockHeaderTimestamp - return ret - } - return *o.From -} - -// GetFromOk returns a tuple with the From field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BesuTransactionConfig) GetFromOk() (*Web3BlockHeaderTimestamp, bool) { - if o == nil || IsNil(o.From) { - return nil, false - } - return o.From, true -} - -// HasFrom returns a boolean if a field has been set. -func (o *BesuTransactionConfig) HasFrom() bool { - if o != nil && !IsNil(o.From) { - return true - } - - return false -} - -// SetFrom gets a reference to the given Web3BlockHeaderTimestamp and assigns it to the From field. -func (o *BesuTransactionConfig) SetFrom(v Web3BlockHeaderTimestamp) { - o.From = &v -} - -// GetTo returns the To field value if set, zero value otherwise. -func (o *BesuTransactionConfig) GetTo() BesuTransactionConfigTo { - if o == nil || IsNil(o.To) { - var ret BesuTransactionConfigTo - return ret - } - return *o.To -} - -// GetToOk returns a tuple with the To field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BesuTransactionConfig) GetToOk() (*BesuTransactionConfigTo, bool) { - if o == nil || IsNil(o.To) { - return nil, false - } - return o.To, true -} - -// HasTo returns a boolean if a field has been set. -func (o *BesuTransactionConfig) HasTo() bool { - if o != nil && !IsNil(o.To) { - return true - } - - return false -} - -// SetTo gets a reference to the given BesuTransactionConfigTo and assigns it to the To field. -func (o *BesuTransactionConfig) SetTo(v BesuTransactionConfigTo) { - o.To = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *BesuTransactionConfig) GetValue() Web3BlockHeaderTimestamp { - if o == nil || IsNil(o.Value) { - var ret Web3BlockHeaderTimestamp - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BesuTransactionConfig) GetValueOk() (*Web3BlockHeaderTimestamp, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *BesuTransactionConfig) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given Web3BlockHeaderTimestamp and assigns it to the Value field. -func (o *BesuTransactionConfig) SetValue(v Web3BlockHeaderTimestamp) { - o.Value = &v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *BesuTransactionConfig) GetGas() Web3BlockHeaderTimestamp { - if o == nil || IsNil(o.Gas) { - var ret Web3BlockHeaderTimestamp - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BesuTransactionConfig) GetGasOk() (*Web3BlockHeaderTimestamp, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *BesuTransactionConfig) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given Web3BlockHeaderTimestamp and assigns it to the Gas field. -func (o *BesuTransactionConfig) SetGas(v Web3BlockHeaderTimestamp) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *BesuTransactionConfig) GetGasPrice() Web3BlockHeaderTimestamp { - if o == nil || IsNil(o.GasPrice) { - var ret Web3BlockHeaderTimestamp - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BesuTransactionConfig) GetGasPriceOk() (*Web3BlockHeaderTimestamp, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *BesuTransactionConfig) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given Web3BlockHeaderTimestamp and assigns it to the GasPrice field. -func (o *BesuTransactionConfig) SetGasPrice(v Web3BlockHeaderTimestamp) { - o.GasPrice = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *BesuTransactionConfig) GetNonce() float32 { - if o == nil || IsNil(o.Nonce) { - var ret float32 - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BesuTransactionConfig) GetNonceOk() (*float32, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *BesuTransactionConfig) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given float32 and assigns it to the Nonce field. -func (o *BesuTransactionConfig) SetNonce(v float32) { - o.Nonce = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *BesuTransactionConfig) GetData() BesuTransactionConfigTo { - if o == nil || IsNil(o.Data) { - var ret BesuTransactionConfigTo - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BesuTransactionConfig) GetDataOk() (*BesuTransactionConfigTo, bool) { - if o == nil || IsNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *BesuTransactionConfig) HasData() bool { - if o != nil && !IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given BesuTransactionConfigTo and assigns it to the Data field. -func (o *BesuTransactionConfig) SetData(v BesuTransactionConfigTo) { - o.Data = &v -} - -func (o BesuTransactionConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BesuTransactionConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.RawTransaction) { - toSerialize["rawTransaction"] = o.RawTransaction - } - if !IsNil(o.From) { - toSerialize["from"] = o.From - } - if !IsNil(o.To) { - toSerialize["to"] = o.To - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - if !IsNil(o.Data) { - toSerialize["data"] = o.Data - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *BesuTransactionConfig) UnmarshalJSON(bytes []byte) (err error) { - varBesuTransactionConfig := _BesuTransactionConfig{} - - if err = json.Unmarshal(bytes, &varBesuTransactionConfig); err == nil { - *o = BesuTransactionConfig(varBesuTransactionConfig) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "rawTransaction") - delete(additionalProperties, "from") - delete(additionalProperties, "to") - delete(additionalProperties, "value") - delete(additionalProperties, "gas") - delete(additionalProperties, "gasPrice") - delete(additionalProperties, "nonce") - delete(additionalProperties, "data") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableBesuTransactionConfig struct { - value *BesuTransactionConfig - isSet bool -} - -func (v NullableBesuTransactionConfig) Get() *BesuTransactionConfig { - return v.value -} - -func (v *NullableBesuTransactionConfig) Set(val *BesuTransactionConfig) { - v.value = val - v.isSet = true -} - -func (v NullableBesuTransactionConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableBesuTransactionConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBesuTransactionConfig(val *BesuTransactionConfig) *NullableBesuTransactionConfig { - return &NullableBesuTransactionConfig{value: val, isSet: true} -} - -func (v NullableBesuTransactionConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBesuTransactionConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_besu_transaction_config_to.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_besu_transaction_config_to.go deleted file mode 100644 index 720ee5d532..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_besu_transaction_config_to.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" - "fmt" -) - -// BesuTransactionConfigTo - struct for BesuTransactionConfigTo -type BesuTransactionConfigTo struct { - String *string -} - -// stringAsBesuTransactionConfigTo is a convenience function that returns string wrapped in BesuTransactionConfigTo -func StringAsBesuTransactionConfigTo(v *string) BesuTransactionConfigTo { - return BesuTransactionConfigTo{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *BesuTransactionConfigTo) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(BesuTransactionConfigTo)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(BesuTransactionConfigTo)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src BesuTransactionConfigTo) MarshalJSON() ([]byte, error) { - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *BesuTransactionConfigTo) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableBesuTransactionConfigTo struct { - value *BesuTransactionConfigTo - isSet bool -} - -func (v NullableBesuTransactionConfigTo) Get() *BesuTransactionConfigTo { - return v.value -} - -func (v *NullableBesuTransactionConfigTo) Set(val *BesuTransactionConfigTo) { - v.value = val - v.isSet = true -} - -func (v NullableBesuTransactionConfigTo) IsSet() bool { - return v.isSet -} - -func (v *NullableBesuTransactionConfigTo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBesuTransactionConfigTo(val *BesuTransactionConfigTo) *NullableBesuTransactionConfigTo { - return &NullableBesuTransactionConfigTo{value: val, isSet: true} -} - -func (v NullableBesuTransactionConfigTo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBesuTransactionConfigTo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_consistency_strategy.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_consistency_strategy.go deleted file mode 100644 index 7f9e2f4169..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_consistency_strategy.go +++ /dev/null @@ -1,182 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the ConsistencyStrategy type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConsistencyStrategy{} - -// ConsistencyStrategy struct for ConsistencyStrategy -type ConsistencyStrategy struct { - ReceiptType ReceiptType `json:"receiptType"` - // The amount of milliseconds to wait for the receipt to arrive to the connector. Defaults to 0 which means to wait for an unlimited amount of time. Note that this wait may be interrupted still by other parts of the infrastructure such as load balancers cutting of HTTP requests after some time even if they are the type that is supposed to be kept alive. The question of re-entrance is a broader topic not in scope to discuss here, but it is important to mention it. - TimeoutMs *int32 `json:"timeoutMs,omitempty"` - // The number of blocks to wait to be confirmed in addition to the block containing the transaction in question. Note that if the receipt type is set to only wait for node transaction pool ACK and this parameter is set to anything, but zero then the API will not accept the request due to conflicting parameters. - BlockConfirmations int32 `json:"blockConfirmations"` -} - -// NewConsistencyStrategy instantiates a new ConsistencyStrategy object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConsistencyStrategy(receiptType ReceiptType, blockConfirmations int32) *ConsistencyStrategy { - this := ConsistencyStrategy{} - this.ReceiptType = receiptType - this.BlockConfirmations = blockConfirmations - return &this -} - -// NewConsistencyStrategyWithDefaults instantiates a new ConsistencyStrategy object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConsistencyStrategyWithDefaults() *ConsistencyStrategy { - this := ConsistencyStrategy{} - return &this -} - -// GetReceiptType returns the ReceiptType field value -func (o *ConsistencyStrategy) GetReceiptType() ReceiptType { - if o == nil { - var ret ReceiptType - return ret - } - - return o.ReceiptType -} - -// GetReceiptTypeOk returns a tuple with the ReceiptType field value -// and a boolean to check if the value has been set. -func (o *ConsistencyStrategy) GetReceiptTypeOk() (*ReceiptType, bool) { - if o == nil { - return nil, false - } - return &o.ReceiptType, true -} - -// SetReceiptType sets field value -func (o *ConsistencyStrategy) SetReceiptType(v ReceiptType) { - o.ReceiptType = v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *ConsistencyStrategy) GetTimeoutMs() int32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret int32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsistencyStrategy) GetTimeoutMsOk() (*int32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *ConsistencyStrategy) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given int32 and assigns it to the TimeoutMs field. -func (o *ConsistencyStrategy) SetTimeoutMs(v int32) { - o.TimeoutMs = &v -} - -// GetBlockConfirmations returns the BlockConfirmations field value -func (o *ConsistencyStrategy) GetBlockConfirmations() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.BlockConfirmations -} - -// GetBlockConfirmationsOk returns a tuple with the BlockConfirmations field value -// and a boolean to check if the value has been set. -func (o *ConsistencyStrategy) GetBlockConfirmationsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.BlockConfirmations, true -} - -// SetBlockConfirmations sets field value -func (o *ConsistencyStrategy) SetBlockConfirmations(v int32) { - o.BlockConfirmations = v -} - -func (o ConsistencyStrategy) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConsistencyStrategy) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["receiptType"] = o.ReceiptType - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - toSerialize["blockConfirmations"] = o.BlockConfirmations - return toSerialize, nil -} - -type NullableConsistencyStrategy struct { - value *ConsistencyStrategy - isSet bool -} - -func (v NullableConsistencyStrategy) Get() *ConsistencyStrategy { - return v.value -} - -func (v *NullableConsistencyStrategy) Set(val *ConsistencyStrategy) { - v.value = val - v.isSet = true -} - -func (v NullableConsistencyStrategy) IsSet() bool { - return v.isSet -} - -func (v *NullableConsistencyStrategy) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConsistencyStrategy(val *ConsistencyStrategy) *NullableConsistencyStrategy { - return &NullableConsistencyStrategy{value: val, isSet: true} -} - -func (v NullableConsistencyStrategy) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConsistencyStrategy) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_deploy_contract_solidity_bytecode_no_keychain_v1_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_deploy_contract_solidity_bytecode_no_keychain_v1_request.go deleted file mode 100644 index a23d97391c..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_deploy_contract_solidity_bytecode_no_keychain_v1_request.go +++ /dev/null @@ -1,377 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the DeployContractSolidityBytecodeNoKeychainV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractSolidityBytecodeNoKeychainV1Request{} - -// DeployContractSolidityBytecodeNoKeychainV1Request struct for DeployContractSolidityBytecodeNoKeychainV1Request -type DeployContractSolidityBytecodeNoKeychainV1Request struct { - // The contract name for retrieve the contracts json on the keychain. - ContractName string `json:"contractName"` - // The application binary interface of the solidity contract - ContractAbi []interface{} `json:"contractAbi"` - ConstructorArgs []interface{} `json:"constructorArgs"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode - Bytecode string `json:"bytecode"` - Gas *float32 `json:"gas,omitempty"` - GasPrice *string `json:"gasPrice,omitempty"` - // The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - TimeoutMs *float32 `json:"timeoutMs,omitempty"` - PrivateTransactionConfig *BesuPrivateTransactionConfig `json:"privateTransactionConfig,omitempty"` -} - -// NewDeployContractSolidityBytecodeNoKeychainV1Request instantiates a new DeployContractSolidityBytecodeNoKeychainV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractSolidityBytecodeNoKeychainV1Request(contractName string, contractAbi []interface{}, constructorArgs []interface{}, web3SigningCredential Web3SigningCredential, bytecode string) *DeployContractSolidityBytecodeNoKeychainV1Request { - this := DeployContractSolidityBytecodeNoKeychainV1Request{} - this.ContractName = contractName - this.ContractAbi = contractAbi - this.ConstructorArgs = constructorArgs - this.Web3SigningCredential = web3SigningCredential - this.Bytecode = bytecode - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// NewDeployContractSolidityBytecodeNoKeychainV1RequestWithDefaults instantiates a new DeployContractSolidityBytecodeNoKeychainV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractSolidityBytecodeNoKeychainV1RequestWithDefaults() *DeployContractSolidityBytecodeNoKeychainV1Request { - this := DeployContractSolidityBytecodeNoKeychainV1Request{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetContractName returns the ContractName field value -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) SetContractName(v string) { - o.ContractName = v -} - -// GetContractAbi returns the ContractAbi field value -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetContractAbi() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.ContractAbi -} - -// GetContractAbiOk returns a tuple with the ContractAbi field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetContractAbiOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.ContractAbi, true -} - -// SetContractAbi sets field value -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) SetContractAbi(v []interface{}) { - o.ContractAbi = v -} - -// GetConstructorArgs returns the ConstructorArgs field value -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetConstructorArgs() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetConstructorArgsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.ConstructorArgs, true -} - -// SetConstructorArgs sets field value -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) SetConstructorArgs(v []interface{}) { - o.ConstructorArgs = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetBytecode returns the Bytecode field value -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetBytecode() string { - if o == nil { - var ret string - return ret - } - - return o.Bytecode -} - -// GetBytecodeOk returns a tuple with the Bytecode field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetBytecodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Bytecode, true -} - -// SetBytecode sets field value -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) SetBytecode(v string) { - o.Bytecode = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetGas() float32 { - if o == nil || IsNil(o.Gas) { - var ret float32 - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetGasOk() (*float32, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given float32 and assigns it to the Gas field. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) SetGas(v float32) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetGasPrice() string { - if o == nil || IsNil(o.GasPrice) { - var ret string - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetGasPriceOk() (*string, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given string and assigns it to the GasPrice field. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) SetGasPrice(v string) { - o.GasPrice = &v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -// GetPrivateTransactionConfig returns the PrivateTransactionConfig field value if set, zero value otherwise. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetPrivateTransactionConfig() BesuPrivateTransactionConfig { - if o == nil || IsNil(o.PrivateTransactionConfig) { - var ret BesuPrivateTransactionConfig - return ret - } - return *o.PrivateTransactionConfig -} - -// GetPrivateTransactionConfigOk returns a tuple with the PrivateTransactionConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) GetPrivateTransactionConfigOk() (*BesuPrivateTransactionConfig, bool) { - if o == nil || IsNil(o.PrivateTransactionConfig) { - return nil, false - } - return o.PrivateTransactionConfig, true -} - -// HasPrivateTransactionConfig returns a boolean if a field has been set. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) HasPrivateTransactionConfig() bool { - if o != nil && !IsNil(o.PrivateTransactionConfig) { - return true - } - - return false -} - -// SetPrivateTransactionConfig gets a reference to the given BesuPrivateTransactionConfig and assigns it to the PrivateTransactionConfig field. -func (o *DeployContractSolidityBytecodeNoKeychainV1Request) SetPrivateTransactionConfig(v BesuPrivateTransactionConfig) { - o.PrivateTransactionConfig = &v -} - -func (o DeployContractSolidityBytecodeNoKeychainV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractSolidityBytecodeNoKeychainV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractName"] = o.ContractName - toSerialize["contractAbi"] = o.ContractAbi - toSerialize["constructorArgs"] = o.ConstructorArgs - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["bytecode"] = o.Bytecode - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - if !IsNil(o.PrivateTransactionConfig) { - toSerialize["privateTransactionConfig"] = o.PrivateTransactionConfig - } - return toSerialize, nil -} - -type NullableDeployContractSolidityBytecodeNoKeychainV1Request struct { - value *DeployContractSolidityBytecodeNoKeychainV1Request - isSet bool -} - -func (v NullableDeployContractSolidityBytecodeNoKeychainV1Request) Get() *DeployContractSolidityBytecodeNoKeychainV1Request { - return v.value -} - -func (v *NullableDeployContractSolidityBytecodeNoKeychainV1Request) Set(val *DeployContractSolidityBytecodeNoKeychainV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractSolidityBytecodeNoKeychainV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractSolidityBytecodeNoKeychainV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractSolidityBytecodeNoKeychainV1Request(val *DeployContractSolidityBytecodeNoKeychainV1Request) *NullableDeployContractSolidityBytecodeNoKeychainV1Request { - return &NullableDeployContractSolidityBytecodeNoKeychainV1Request{value: val, isSet: true} -} - -func (v NullableDeployContractSolidityBytecodeNoKeychainV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractSolidityBytecodeNoKeychainV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_deploy_contract_solidity_bytecode_v1_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_deploy_contract_solidity_bytecode_v1_request.go deleted file mode 100644 index 72087f01d6..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_deploy_contract_solidity_bytecode_v1_request.go +++ /dev/null @@ -1,405 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the DeployContractSolidityBytecodeV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractSolidityBytecodeV1Request{} - -// DeployContractSolidityBytecodeV1Request struct for DeployContractSolidityBytecodeV1Request -type DeployContractSolidityBytecodeV1Request struct { - // The contract name for retrieve the contracts json on the keychain. - ContractName string `json:"contractName"` - // The application binary interface of the solidity contract - ContractAbi []interface{} `json:"contractAbi"` - ConstructorArgs []interface{} `json:"constructorArgs"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode - Bytecode string `json:"bytecode"` - // The keychainId for retrieve the contracts json. - KeychainId string `json:"keychainId"` - Gas *float32 `json:"gas,omitempty"` - GasPrice *string `json:"gasPrice,omitempty"` - // The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - TimeoutMs *float32 `json:"timeoutMs,omitempty"` - PrivateTransactionConfig *BesuPrivateTransactionConfig `json:"privateTransactionConfig,omitempty"` -} - -// NewDeployContractSolidityBytecodeV1Request instantiates a new DeployContractSolidityBytecodeV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractSolidityBytecodeV1Request(contractName string, contractAbi []interface{}, constructorArgs []interface{}, web3SigningCredential Web3SigningCredential, bytecode string, keychainId string) *DeployContractSolidityBytecodeV1Request { - this := DeployContractSolidityBytecodeV1Request{} - this.ContractName = contractName - this.ContractAbi = contractAbi - this.ConstructorArgs = constructorArgs - this.Web3SigningCredential = web3SigningCredential - this.Bytecode = bytecode - this.KeychainId = keychainId - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// NewDeployContractSolidityBytecodeV1RequestWithDefaults instantiates a new DeployContractSolidityBytecodeV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractSolidityBytecodeV1RequestWithDefaults() *DeployContractSolidityBytecodeV1Request { - this := DeployContractSolidityBytecodeV1Request{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetContractName returns the ContractName field value -func (o *DeployContractSolidityBytecodeV1Request) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Request) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *DeployContractSolidityBytecodeV1Request) SetContractName(v string) { - o.ContractName = v -} - -// GetContractAbi returns the ContractAbi field value -func (o *DeployContractSolidityBytecodeV1Request) GetContractAbi() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.ContractAbi -} - -// GetContractAbiOk returns a tuple with the ContractAbi field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Request) GetContractAbiOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.ContractAbi, true -} - -// SetContractAbi sets field value -func (o *DeployContractSolidityBytecodeV1Request) SetContractAbi(v []interface{}) { - o.ContractAbi = v -} - -// GetConstructorArgs returns the ConstructorArgs field value -func (o *DeployContractSolidityBytecodeV1Request) GetConstructorArgs() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Request) GetConstructorArgsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.ConstructorArgs, true -} - -// SetConstructorArgs sets field value -func (o *DeployContractSolidityBytecodeV1Request) SetConstructorArgs(v []interface{}) { - o.ConstructorArgs = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *DeployContractSolidityBytecodeV1Request) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Request) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *DeployContractSolidityBytecodeV1Request) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetBytecode returns the Bytecode field value -func (o *DeployContractSolidityBytecodeV1Request) GetBytecode() string { - if o == nil { - var ret string - return ret - } - - return o.Bytecode -} - -// GetBytecodeOk returns a tuple with the Bytecode field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Request) GetBytecodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Bytecode, true -} - -// SetBytecode sets field value -func (o *DeployContractSolidityBytecodeV1Request) SetBytecode(v string) { - o.Bytecode = v -} - -// GetKeychainId returns the KeychainId field value -func (o *DeployContractSolidityBytecodeV1Request) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Request) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *DeployContractSolidityBytecodeV1Request) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *DeployContractSolidityBytecodeV1Request) GetGas() float32 { - if o == nil || IsNil(o.Gas) { - var ret float32 - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Request) GetGasOk() (*float32, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *DeployContractSolidityBytecodeV1Request) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given float32 and assigns it to the Gas field. -func (o *DeployContractSolidityBytecodeV1Request) SetGas(v float32) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *DeployContractSolidityBytecodeV1Request) GetGasPrice() string { - if o == nil || IsNil(o.GasPrice) { - var ret string - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Request) GetGasPriceOk() (*string, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *DeployContractSolidityBytecodeV1Request) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given string and assigns it to the GasPrice field. -func (o *DeployContractSolidityBytecodeV1Request) SetGasPrice(v string) { - o.GasPrice = &v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *DeployContractSolidityBytecodeV1Request) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Request) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *DeployContractSolidityBytecodeV1Request) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *DeployContractSolidityBytecodeV1Request) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -// GetPrivateTransactionConfig returns the PrivateTransactionConfig field value if set, zero value otherwise. -func (o *DeployContractSolidityBytecodeV1Request) GetPrivateTransactionConfig() BesuPrivateTransactionConfig { - if o == nil || IsNil(o.PrivateTransactionConfig) { - var ret BesuPrivateTransactionConfig - return ret - } - return *o.PrivateTransactionConfig -} - -// GetPrivateTransactionConfigOk returns a tuple with the PrivateTransactionConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Request) GetPrivateTransactionConfigOk() (*BesuPrivateTransactionConfig, bool) { - if o == nil || IsNil(o.PrivateTransactionConfig) { - return nil, false - } - return o.PrivateTransactionConfig, true -} - -// HasPrivateTransactionConfig returns a boolean if a field has been set. -func (o *DeployContractSolidityBytecodeV1Request) HasPrivateTransactionConfig() bool { - if o != nil && !IsNil(o.PrivateTransactionConfig) { - return true - } - - return false -} - -// SetPrivateTransactionConfig gets a reference to the given BesuPrivateTransactionConfig and assigns it to the PrivateTransactionConfig field. -func (o *DeployContractSolidityBytecodeV1Request) SetPrivateTransactionConfig(v BesuPrivateTransactionConfig) { - o.PrivateTransactionConfig = &v -} - -func (o DeployContractSolidityBytecodeV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractSolidityBytecodeV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractName"] = o.ContractName - toSerialize["contractAbi"] = o.ContractAbi - toSerialize["constructorArgs"] = o.ConstructorArgs - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["bytecode"] = o.Bytecode - toSerialize["keychainId"] = o.KeychainId - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - if !IsNil(o.PrivateTransactionConfig) { - toSerialize["privateTransactionConfig"] = o.PrivateTransactionConfig - } - return toSerialize, nil -} - -type NullableDeployContractSolidityBytecodeV1Request struct { - value *DeployContractSolidityBytecodeV1Request - isSet bool -} - -func (v NullableDeployContractSolidityBytecodeV1Request) Get() *DeployContractSolidityBytecodeV1Request { - return v.value -} - -func (v *NullableDeployContractSolidityBytecodeV1Request) Set(val *DeployContractSolidityBytecodeV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractSolidityBytecodeV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractSolidityBytecodeV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractSolidityBytecodeV1Request(val *DeployContractSolidityBytecodeV1Request) *NullableDeployContractSolidityBytecodeV1Request { - return &NullableDeployContractSolidityBytecodeV1Request{value: val, isSet: true} -} - -func (v NullableDeployContractSolidityBytecodeV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractSolidityBytecodeV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_deploy_contract_solidity_bytecode_v1_response.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_deploy_contract_solidity_bytecode_v1_response.go deleted file mode 100644 index 96b34a7f9c..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_deploy_contract_solidity_bytecode_v1_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the DeployContractSolidityBytecodeV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractSolidityBytecodeV1Response{} - -// DeployContractSolidityBytecodeV1Response struct for DeployContractSolidityBytecodeV1Response -type DeployContractSolidityBytecodeV1Response struct { - TransactionReceipt Web3TransactionReceipt `json:"transactionReceipt"` -} - -// NewDeployContractSolidityBytecodeV1Response instantiates a new DeployContractSolidityBytecodeV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractSolidityBytecodeV1Response(transactionReceipt Web3TransactionReceipt) *DeployContractSolidityBytecodeV1Response { - this := DeployContractSolidityBytecodeV1Response{} - this.TransactionReceipt = transactionReceipt - return &this -} - -// NewDeployContractSolidityBytecodeV1ResponseWithDefaults instantiates a new DeployContractSolidityBytecodeV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractSolidityBytecodeV1ResponseWithDefaults() *DeployContractSolidityBytecodeV1Response { - this := DeployContractSolidityBytecodeV1Response{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value -func (o *DeployContractSolidityBytecodeV1Response) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil { - var ret Web3TransactionReceipt - return ret - } - - return o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value -// and a boolean to check if the value has been set. -func (o *DeployContractSolidityBytecodeV1Response) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil { - return nil, false - } - return &o.TransactionReceipt, true -} - -// SetTransactionReceipt sets field value -func (o *DeployContractSolidityBytecodeV1Response) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = v -} - -func (o DeployContractSolidityBytecodeV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractSolidityBytecodeV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["transactionReceipt"] = o.TransactionReceipt - return toSerialize, nil -} - -type NullableDeployContractSolidityBytecodeV1Response struct { - value *DeployContractSolidityBytecodeV1Response - isSet bool -} - -func (v NullableDeployContractSolidityBytecodeV1Response) Get() *DeployContractSolidityBytecodeV1Response { - return v.value -} - -func (v *NullableDeployContractSolidityBytecodeV1Response) Set(val *DeployContractSolidityBytecodeV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractSolidityBytecodeV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractSolidityBytecodeV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractSolidityBytecodeV1Response(val *DeployContractSolidityBytecodeV1Response) *NullableDeployContractSolidityBytecodeV1Response { - return &NullableDeployContractSolidityBytecodeV1Response{value: val, isSet: true} -} - -func (v NullableDeployContractSolidityBytecodeV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractSolidityBytecodeV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_type.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_type.go deleted file mode 100644 index d11b662a4d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_type.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" - "fmt" -) - -// EthContractInvocationType the model 'EthContractInvocationType' -type EthContractInvocationType string - -// List of EthContractInvocationType -const ( - SEND EthContractInvocationType = "SEND" - CALL EthContractInvocationType = "CALL" -) - -// All allowed values of EthContractInvocationType enum -var AllowedEthContractInvocationTypeEnumValues = []EthContractInvocationType{ - "SEND", - "CALL", -} - -func (v *EthContractInvocationType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := EthContractInvocationType(value) - for _, existing := range AllowedEthContractInvocationTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid EthContractInvocationType", value) -} - -// NewEthContractInvocationTypeFromValue returns a pointer to a valid EthContractInvocationType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewEthContractInvocationTypeFromValue(v string) (*EthContractInvocationType, error) { - ev := EthContractInvocationType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for EthContractInvocationType: valid values are %v", v, AllowedEthContractInvocationTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v EthContractInvocationType) IsValid() bool { - for _, existing := range AllowedEthContractInvocationTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to EthContractInvocationType value -func (v EthContractInvocationType) Ptr() *EthContractInvocationType { - return &v -} - -type NullableEthContractInvocationType struct { - value *EthContractInvocationType - isSet bool -} - -func (v NullableEthContractInvocationType) Get() *EthContractInvocationType { - return v.value -} - -func (v *NullableEthContractInvocationType) Set(val *EthContractInvocationType) { - v.value = val - v.isSet = true -} - -func (v NullableEthContractInvocationType) IsSet() bool { - return v.isSet -} - -func (v *NullableEthContractInvocationType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEthContractInvocationType(val *EthContractInvocationType) *NullableEthContractInvocationType { - return &NullableEthContractInvocationType{value: val, isSet: true} -} - -func (v NullableEthContractInvocationType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEthContractInvocationType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_evm_block.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_evm_block.go deleted file mode 100644 index e6a8903f7b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_evm_block.go +++ /dev/null @@ -1,739 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the EvmBlock type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EvmBlock{} - -// EvmBlock struct for EvmBlock -type EvmBlock struct { - Number *float32 `json:"number,omitempty"` - Hash *string `json:"hash,omitempty"` - ParentHash *string `json:"parentHash,omitempty"` - Nonce *string `json:"nonce,omitempty"` - Sha3Uncles *string `json:"sha3Uncles,omitempty"` - LogsBloom *string `json:"logsBloom,omitempty"` - TransactionsRoot *string `json:"transactionsRoot,omitempty"` - StateRoot *string `json:"stateRoot,omitempty"` - Miner *string `json:"miner,omitempty"` - Difficulty *float32 `json:"difficulty,omitempty"` - TotalDifficulty *float32 `json:"totalDifficulty,omitempty"` - ExtraData *string `json:"extraData,omitempty"` - Size *float32 `json:"size,omitempty"` - GasLimit *float32 `json:"gasLimit,omitempty"` - GasUsed *float32 `json:"gasUsed,omitempty"` - Timestamp interface{} `json:"timestamp,omitempty"` - Transactions []interface{} `json:"transactions,omitempty"` - Uncles []interface{} `json:"uncles,omitempty"` -} - -// NewEvmBlock instantiates a new EvmBlock object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewEvmBlock() *EvmBlock { - this := EvmBlock{} - return &this -} - -// NewEvmBlockWithDefaults instantiates a new EvmBlock object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewEvmBlockWithDefaults() *EvmBlock { - this := EvmBlock{} - return &this -} - -// GetNumber returns the Number field value if set, zero value otherwise. -func (o *EvmBlock) GetNumber() float32 { - if o == nil || IsNil(o.Number) { - var ret float32 - return ret - } - return *o.Number -} - -// GetNumberOk returns a tuple with the Number field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetNumberOk() (*float32, bool) { - if o == nil || IsNil(o.Number) { - return nil, false - } - return o.Number, true -} - -// HasNumber returns a boolean if a field has been set. -func (o *EvmBlock) HasNumber() bool { - if o != nil && !IsNil(o.Number) { - return true - } - - return false -} - -// SetNumber gets a reference to the given float32 and assigns it to the Number field. -func (o *EvmBlock) SetNumber(v float32) { - o.Number = &v -} - -// GetHash returns the Hash field value if set, zero value otherwise. -func (o *EvmBlock) GetHash() string { - if o == nil || IsNil(o.Hash) { - var ret string - return ret - } - return *o.Hash -} - -// GetHashOk returns a tuple with the Hash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetHashOk() (*string, bool) { - if o == nil || IsNil(o.Hash) { - return nil, false - } - return o.Hash, true -} - -// HasHash returns a boolean if a field has been set. -func (o *EvmBlock) HasHash() bool { - if o != nil && !IsNil(o.Hash) { - return true - } - - return false -} - -// SetHash gets a reference to the given string and assigns it to the Hash field. -func (o *EvmBlock) SetHash(v string) { - o.Hash = &v -} - -// GetParentHash returns the ParentHash field value if set, zero value otherwise. -func (o *EvmBlock) GetParentHash() string { - if o == nil || IsNil(o.ParentHash) { - var ret string - return ret - } - return *o.ParentHash -} - -// GetParentHashOk returns a tuple with the ParentHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetParentHashOk() (*string, bool) { - if o == nil || IsNil(o.ParentHash) { - return nil, false - } - return o.ParentHash, true -} - -// HasParentHash returns a boolean if a field has been set. -func (o *EvmBlock) HasParentHash() bool { - if o != nil && !IsNil(o.ParentHash) { - return true - } - - return false -} - -// SetParentHash gets a reference to the given string and assigns it to the ParentHash field. -func (o *EvmBlock) SetParentHash(v string) { - o.ParentHash = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *EvmBlock) GetNonce() string { - if o == nil || IsNil(o.Nonce) { - var ret string - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetNonceOk() (*string, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *EvmBlock) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given string and assigns it to the Nonce field. -func (o *EvmBlock) SetNonce(v string) { - o.Nonce = &v -} - -// GetSha3Uncles returns the Sha3Uncles field value if set, zero value otherwise. -func (o *EvmBlock) GetSha3Uncles() string { - if o == nil || IsNil(o.Sha3Uncles) { - var ret string - return ret - } - return *o.Sha3Uncles -} - -// GetSha3UnclesOk returns a tuple with the Sha3Uncles field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetSha3UnclesOk() (*string, bool) { - if o == nil || IsNil(o.Sha3Uncles) { - return nil, false - } - return o.Sha3Uncles, true -} - -// HasSha3Uncles returns a boolean if a field has been set. -func (o *EvmBlock) HasSha3Uncles() bool { - if o != nil && !IsNil(o.Sha3Uncles) { - return true - } - - return false -} - -// SetSha3Uncles gets a reference to the given string and assigns it to the Sha3Uncles field. -func (o *EvmBlock) SetSha3Uncles(v string) { - o.Sha3Uncles = &v -} - -// GetLogsBloom returns the LogsBloom field value if set, zero value otherwise. -func (o *EvmBlock) GetLogsBloom() string { - if o == nil || IsNil(o.LogsBloom) { - var ret string - return ret - } - return *o.LogsBloom -} - -// GetLogsBloomOk returns a tuple with the LogsBloom field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetLogsBloomOk() (*string, bool) { - if o == nil || IsNil(o.LogsBloom) { - return nil, false - } - return o.LogsBloom, true -} - -// HasLogsBloom returns a boolean if a field has been set. -func (o *EvmBlock) HasLogsBloom() bool { - if o != nil && !IsNil(o.LogsBloom) { - return true - } - - return false -} - -// SetLogsBloom gets a reference to the given string and assigns it to the LogsBloom field. -func (o *EvmBlock) SetLogsBloom(v string) { - o.LogsBloom = &v -} - -// GetTransactionsRoot returns the TransactionsRoot field value if set, zero value otherwise. -func (o *EvmBlock) GetTransactionsRoot() string { - if o == nil || IsNil(o.TransactionsRoot) { - var ret string - return ret - } - return *o.TransactionsRoot -} - -// GetTransactionsRootOk returns a tuple with the TransactionsRoot field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetTransactionsRootOk() (*string, bool) { - if o == nil || IsNil(o.TransactionsRoot) { - return nil, false - } - return o.TransactionsRoot, true -} - -// HasTransactionsRoot returns a boolean if a field has been set. -func (o *EvmBlock) HasTransactionsRoot() bool { - if o != nil && !IsNil(o.TransactionsRoot) { - return true - } - - return false -} - -// SetTransactionsRoot gets a reference to the given string and assigns it to the TransactionsRoot field. -func (o *EvmBlock) SetTransactionsRoot(v string) { - o.TransactionsRoot = &v -} - -// GetStateRoot returns the StateRoot field value if set, zero value otherwise. -func (o *EvmBlock) GetStateRoot() string { - if o == nil || IsNil(o.StateRoot) { - var ret string - return ret - } - return *o.StateRoot -} - -// GetStateRootOk returns a tuple with the StateRoot field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetStateRootOk() (*string, bool) { - if o == nil || IsNil(o.StateRoot) { - return nil, false - } - return o.StateRoot, true -} - -// HasStateRoot returns a boolean if a field has been set. -func (o *EvmBlock) HasStateRoot() bool { - if o != nil && !IsNil(o.StateRoot) { - return true - } - - return false -} - -// SetStateRoot gets a reference to the given string and assigns it to the StateRoot field. -func (o *EvmBlock) SetStateRoot(v string) { - o.StateRoot = &v -} - -// GetMiner returns the Miner field value if set, zero value otherwise. -func (o *EvmBlock) GetMiner() string { - if o == nil || IsNil(o.Miner) { - var ret string - return ret - } - return *o.Miner -} - -// GetMinerOk returns a tuple with the Miner field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetMinerOk() (*string, bool) { - if o == nil || IsNil(o.Miner) { - return nil, false - } - return o.Miner, true -} - -// HasMiner returns a boolean if a field has been set. -func (o *EvmBlock) HasMiner() bool { - if o != nil && !IsNil(o.Miner) { - return true - } - - return false -} - -// SetMiner gets a reference to the given string and assigns it to the Miner field. -func (o *EvmBlock) SetMiner(v string) { - o.Miner = &v -} - -// GetDifficulty returns the Difficulty field value if set, zero value otherwise. -func (o *EvmBlock) GetDifficulty() float32 { - if o == nil || IsNil(o.Difficulty) { - var ret float32 - return ret - } - return *o.Difficulty -} - -// GetDifficultyOk returns a tuple with the Difficulty field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetDifficultyOk() (*float32, bool) { - if o == nil || IsNil(o.Difficulty) { - return nil, false - } - return o.Difficulty, true -} - -// HasDifficulty returns a boolean if a field has been set. -func (o *EvmBlock) HasDifficulty() bool { - if o != nil && !IsNil(o.Difficulty) { - return true - } - - return false -} - -// SetDifficulty gets a reference to the given float32 and assigns it to the Difficulty field. -func (o *EvmBlock) SetDifficulty(v float32) { - o.Difficulty = &v -} - -// GetTotalDifficulty returns the TotalDifficulty field value if set, zero value otherwise. -func (o *EvmBlock) GetTotalDifficulty() float32 { - if o == nil || IsNil(o.TotalDifficulty) { - var ret float32 - return ret - } - return *o.TotalDifficulty -} - -// GetTotalDifficultyOk returns a tuple with the TotalDifficulty field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetTotalDifficultyOk() (*float32, bool) { - if o == nil || IsNil(o.TotalDifficulty) { - return nil, false - } - return o.TotalDifficulty, true -} - -// HasTotalDifficulty returns a boolean if a field has been set. -func (o *EvmBlock) HasTotalDifficulty() bool { - if o != nil && !IsNil(o.TotalDifficulty) { - return true - } - - return false -} - -// SetTotalDifficulty gets a reference to the given float32 and assigns it to the TotalDifficulty field. -func (o *EvmBlock) SetTotalDifficulty(v float32) { - o.TotalDifficulty = &v -} - -// GetExtraData returns the ExtraData field value if set, zero value otherwise. -func (o *EvmBlock) GetExtraData() string { - if o == nil || IsNil(o.ExtraData) { - var ret string - return ret - } - return *o.ExtraData -} - -// GetExtraDataOk returns a tuple with the ExtraData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetExtraDataOk() (*string, bool) { - if o == nil || IsNil(o.ExtraData) { - return nil, false - } - return o.ExtraData, true -} - -// HasExtraData returns a boolean if a field has been set. -func (o *EvmBlock) HasExtraData() bool { - if o != nil && !IsNil(o.ExtraData) { - return true - } - - return false -} - -// SetExtraData gets a reference to the given string and assigns it to the ExtraData field. -func (o *EvmBlock) SetExtraData(v string) { - o.ExtraData = &v -} - -// GetSize returns the Size field value if set, zero value otherwise. -func (o *EvmBlock) GetSize() float32 { - if o == nil || IsNil(o.Size) { - var ret float32 - return ret - } - return *o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetSizeOk() (*float32, bool) { - if o == nil || IsNil(o.Size) { - return nil, false - } - return o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *EvmBlock) HasSize() bool { - if o != nil && !IsNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given float32 and assigns it to the Size field. -func (o *EvmBlock) SetSize(v float32) { - o.Size = &v -} - -// GetGasLimit returns the GasLimit field value if set, zero value otherwise. -func (o *EvmBlock) GetGasLimit() float32 { - if o == nil || IsNil(o.GasLimit) { - var ret float32 - return ret - } - return *o.GasLimit -} - -// GetGasLimitOk returns a tuple with the GasLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetGasLimitOk() (*float32, bool) { - if o == nil || IsNil(o.GasLimit) { - return nil, false - } - return o.GasLimit, true -} - -// HasGasLimit returns a boolean if a field has been set. -func (o *EvmBlock) HasGasLimit() bool { - if o != nil && !IsNil(o.GasLimit) { - return true - } - - return false -} - -// SetGasLimit gets a reference to the given float32 and assigns it to the GasLimit field. -func (o *EvmBlock) SetGasLimit(v float32) { - o.GasLimit = &v -} - -// GetGasUsed returns the GasUsed field value if set, zero value otherwise. -func (o *EvmBlock) GetGasUsed() float32 { - if o == nil || IsNil(o.GasUsed) { - var ret float32 - return ret - } - return *o.GasUsed -} - -// GetGasUsedOk returns a tuple with the GasUsed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetGasUsedOk() (*float32, bool) { - if o == nil || IsNil(o.GasUsed) { - return nil, false - } - return o.GasUsed, true -} - -// HasGasUsed returns a boolean if a field has been set. -func (o *EvmBlock) HasGasUsed() bool { - if o != nil && !IsNil(o.GasUsed) { - return true - } - - return false -} - -// SetGasUsed gets a reference to the given float32 and assigns it to the GasUsed field. -func (o *EvmBlock) SetGasUsed(v float32) { - o.GasUsed = &v -} - -// GetTimestamp returns the Timestamp field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EvmBlock) GetTimestamp() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *EvmBlock) GetTimestampOk() (*interface{}, bool) { - if o == nil || IsNil(o.Timestamp) { - return nil, false - } - return &o.Timestamp, true -} - -// HasTimestamp returns a boolean if a field has been set. -func (o *EvmBlock) HasTimestamp() bool { - if o != nil && IsNil(o.Timestamp) { - return true - } - - return false -} - -// SetTimestamp gets a reference to the given interface{} and assigns it to the Timestamp field. -func (o *EvmBlock) SetTimestamp(v interface{}) { - o.Timestamp = v -} - -// GetTransactions returns the Transactions field value if set, zero value otherwise. -func (o *EvmBlock) GetTransactions() []interface{} { - if o == nil || IsNil(o.Transactions) { - var ret []interface{} - return ret - } - return o.Transactions -} - -// GetTransactionsOk returns a tuple with the Transactions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetTransactionsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.Transactions) { - return nil, false - } - return o.Transactions, true -} - -// HasTransactions returns a boolean if a field has been set. -func (o *EvmBlock) HasTransactions() bool { - if o != nil && !IsNil(o.Transactions) { - return true - } - - return false -} - -// SetTransactions gets a reference to the given []interface{} and assigns it to the Transactions field. -func (o *EvmBlock) SetTransactions(v []interface{}) { - o.Transactions = v -} - -// GetUncles returns the Uncles field value if set, zero value otherwise. -func (o *EvmBlock) GetUncles() []interface{} { - if o == nil || IsNil(o.Uncles) { - var ret []interface{} - return ret - } - return o.Uncles -} - -// GetUnclesOk returns a tuple with the Uncles field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmBlock) GetUnclesOk() ([]interface{}, bool) { - if o == nil || IsNil(o.Uncles) { - return nil, false - } - return o.Uncles, true -} - -// HasUncles returns a boolean if a field has been set. -func (o *EvmBlock) HasUncles() bool { - if o != nil && !IsNil(o.Uncles) { - return true - } - - return false -} - -// SetUncles gets a reference to the given []interface{} and assigns it to the Uncles field. -func (o *EvmBlock) SetUncles(v []interface{}) { - o.Uncles = v -} - -func (o EvmBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EvmBlock) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Number) { - toSerialize["number"] = o.Number - } - if !IsNil(o.Hash) { - toSerialize["hash"] = o.Hash - } - if !IsNil(o.ParentHash) { - toSerialize["parentHash"] = o.ParentHash - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - if !IsNil(o.Sha3Uncles) { - toSerialize["sha3Uncles"] = o.Sha3Uncles - } - if !IsNil(o.LogsBloom) { - toSerialize["logsBloom"] = o.LogsBloom - } - if !IsNil(o.TransactionsRoot) { - toSerialize["transactionsRoot"] = o.TransactionsRoot - } - if !IsNil(o.StateRoot) { - toSerialize["stateRoot"] = o.StateRoot - } - if !IsNil(o.Miner) { - toSerialize["miner"] = o.Miner - } - if !IsNil(o.Difficulty) { - toSerialize["difficulty"] = o.Difficulty - } - if !IsNil(o.TotalDifficulty) { - toSerialize["totalDifficulty"] = o.TotalDifficulty - } - if !IsNil(o.ExtraData) { - toSerialize["extraData"] = o.ExtraData - } - if !IsNil(o.Size) { - toSerialize["size"] = o.Size - } - if !IsNil(o.GasLimit) { - toSerialize["gasLimit"] = o.GasLimit - } - if !IsNil(o.GasUsed) { - toSerialize["gasUsed"] = o.GasUsed - } - if o.Timestamp != nil { - toSerialize["timestamp"] = o.Timestamp - } - if !IsNil(o.Transactions) { - toSerialize["transactions"] = o.Transactions - } - if !IsNil(o.Uncles) { - toSerialize["uncles"] = o.Uncles - } - return toSerialize, nil -} - -type NullableEvmBlock struct { - value *EvmBlock - isSet bool -} - -func (v NullableEvmBlock) Get() *EvmBlock { - return v.value -} - -func (v *NullableEvmBlock) Set(val *EvmBlock) { - v.value = val - v.isSet = true -} - -func (v NullableEvmBlock) IsSet() bool { - return v.isSet -} - -func (v *NullableEvmBlock) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEvmBlock(val *EvmBlock) *NullableEvmBlock { - return &NullableEvmBlock{value: val, isSet: true} -} - -func (v NullableEvmBlock) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEvmBlock) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_evm_log.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_evm_log.go deleted file mode 100644 index f6cde55ecc..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_evm_log.go +++ /dev/null @@ -1,306 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the EvmLog type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EvmLog{} - -// EvmLog struct for EvmLog -type EvmLog struct { - Address string `json:"address"` - Data string `json:"data"` - BlockHash string `json:"blockHash"` - TransactionHash string `json:"transactionHash"` - Topics []string `json:"topics"` - LogIndex float32 `json:"logIndex"` - TransactionIndex float32 `json:"transactionIndex"` - BlockNumber float32 `json:"blockNumber"` -} - -// NewEvmLog instantiates a new EvmLog object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewEvmLog(address string, data string, blockHash string, transactionHash string, topics []string, logIndex float32, transactionIndex float32, blockNumber float32) *EvmLog { - this := EvmLog{} - this.Address = address - this.Data = data - this.BlockHash = blockHash - this.TransactionHash = transactionHash - this.Topics = topics - this.LogIndex = logIndex - this.TransactionIndex = transactionIndex - this.BlockNumber = blockNumber - return &this -} - -// NewEvmLogWithDefaults instantiates a new EvmLog object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewEvmLogWithDefaults() *EvmLog { - this := EvmLog{} - return &this -} - -// GetAddress returns the Address field value -func (o *EvmLog) GetAddress() string { - if o == nil { - var ret string - return ret - } - - return o.Address -} - -// GetAddressOk returns a tuple with the Address field value -// and a boolean to check if the value has been set. -func (o *EvmLog) GetAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Address, true -} - -// SetAddress sets field value -func (o *EvmLog) SetAddress(v string) { - o.Address = v -} - -// GetData returns the Data field value -func (o *EvmLog) GetData() string { - if o == nil { - var ret string - return ret - } - - return o.Data -} - -// GetDataOk returns a tuple with the Data field value -// and a boolean to check if the value has been set. -func (o *EvmLog) GetDataOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Data, true -} - -// SetData sets field value -func (o *EvmLog) SetData(v string) { - o.Data = v -} - -// GetBlockHash returns the BlockHash field value -func (o *EvmLog) GetBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value -// and a boolean to check if the value has been set. -func (o *EvmLog) GetBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockHash, true -} - -// SetBlockHash sets field value -func (o *EvmLog) SetBlockHash(v string) { - o.BlockHash = v -} - -// GetTransactionHash returns the TransactionHash field value -func (o *EvmLog) GetTransactionHash() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionHash -} - -// GetTransactionHashOk returns a tuple with the TransactionHash field value -// and a boolean to check if the value has been set. -func (o *EvmLog) GetTransactionHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionHash, true -} - -// SetTransactionHash sets field value -func (o *EvmLog) SetTransactionHash(v string) { - o.TransactionHash = v -} - -// GetTopics returns the Topics field value -func (o *EvmLog) GetTopics() []string { - if o == nil { - var ret []string - return ret - } - - return o.Topics -} - -// GetTopicsOk returns a tuple with the Topics field value -// and a boolean to check if the value has been set. -func (o *EvmLog) GetTopicsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Topics, true -} - -// SetTopics sets field value -func (o *EvmLog) SetTopics(v []string) { - o.Topics = v -} - -// GetLogIndex returns the LogIndex field value -func (o *EvmLog) GetLogIndex() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.LogIndex -} - -// GetLogIndexOk returns a tuple with the LogIndex field value -// and a boolean to check if the value has been set. -func (o *EvmLog) GetLogIndexOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.LogIndex, true -} - -// SetLogIndex sets field value -func (o *EvmLog) SetLogIndex(v float32) { - o.LogIndex = v -} - -// GetTransactionIndex returns the TransactionIndex field value -func (o *EvmLog) GetTransactionIndex() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.TransactionIndex -} - -// GetTransactionIndexOk returns a tuple with the TransactionIndex field value -// and a boolean to check if the value has been set. -func (o *EvmLog) GetTransactionIndexOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.TransactionIndex, true -} - -// SetTransactionIndex sets field value -func (o *EvmLog) SetTransactionIndex(v float32) { - o.TransactionIndex = v -} - -// GetBlockNumber returns the BlockNumber field value -func (o *EvmLog) GetBlockNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value -// and a boolean to check if the value has been set. -func (o *EvmLog) GetBlockNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.BlockNumber, true -} - -// SetBlockNumber sets field value -func (o *EvmLog) SetBlockNumber(v float32) { - o.BlockNumber = v -} - -func (o EvmLog) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EvmLog) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["address"] = o.Address - toSerialize["data"] = o.Data - toSerialize["blockHash"] = o.BlockHash - toSerialize["transactionHash"] = o.TransactionHash - toSerialize["topics"] = o.Topics - toSerialize["logIndex"] = o.LogIndex - toSerialize["transactionIndex"] = o.TransactionIndex - toSerialize["blockNumber"] = o.BlockNumber - return toSerialize, nil -} - -type NullableEvmLog struct { - value *EvmLog - isSet bool -} - -func (v NullableEvmLog) Get() *EvmLog { - return v.value -} - -func (v *NullableEvmLog) Set(val *EvmLog) { - v.value = val - v.isSet = true -} - -func (v NullableEvmLog) IsSet() bool { - return v.isSet -} - -func (v *NullableEvmLog) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEvmLog(val *EvmLog) *NullableEvmLog { - return &NullableEvmLog{value: val, isSet: true} -} - -func (v NullableEvmLog) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEvmLog) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_evm_transaction.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_evm_transaction.go deleted file mode 100644 index 84bd4f1a1b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_evm_transaction.go +++ /dev/null @@ -1,490 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the EvmTransaction type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EvmTransaction{} - -// EvmTransaction struct for EvmTransaction -type EvmTransaction struct { - Hash *string `json:"hash,omitempty"` - Nonce *float32 `json:"nonce,omitempty"` - BlockHash interface{} `json:"blockHash,omitempty"` - BlockNumber interface{} `json:"blockNumber,omitempty"` - TransactionIndex interface{} `json:"transactionIndex,omitempty"` - From *string `json:"from,omitempty"` - To interface{} `json:"to,omitempty"` - Value *string `json:"value,omitempty"` - GasPrice *string `json:"gasPrice,omitempty"` - Gas *float32 `json:"gas,omitempty"` - Input *string `json:"input,omitempty"` -} - -// NewEvmTransaction instantiates a new EvmTransaction object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewEvmTransaction() *EvmTransaction { - this := EvmTransaction{} - return &this -} - -// NewEvmTransactionWithDefaults instantiates a new EvmTransaction object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewEvmTransactionWithDefaults() *EvmTransaction { - this := EvmTransaction{} - return &this -} - -// GetHash returns the Hash field value if set, zero value otherwise. -func (o *EvmTransaction) GetHash() string { - if o == nil || IsNil(o.Hash) { - var ret string - return ret - } - return *o.Hash -} - -// GetHashOk returns a tuple with the Hash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmTransaction) GetHashOk() (*string, bool) { - if o == nil || IsNil(o.Hash) { - return nil, false - } - return o.Hash, true -} - -// HasHash returns a boolean if a field has been set. -func (o *EvmTransaction) HasHash() bool { - if o != nil && !IsNil(o.Hash) { - return true - } - - return false -} - -// SetHash gets a reference to the given string and assigns it to the Hash field. -func (o *EvmTransaction) SetHash(v string) { - o.Hash = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *EvmTransaction) GetNonce() float32 { - if o == nil || IsNil(o.Nonce) { - var ret float32 - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmTransaction) GetNonceOk() (*float32, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *EvmTransaction) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given float32 and assigns it to the Nonce field. -func (o *EvmTransaction) SetNonce(v float32) { - o.Nonce = &v -} - -// GetBlockHash returns the BlockHash field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EvmTransaction) GetBlockHash() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *EvmTransaction) GetBlockHashOk() (*interface{}, bool) { - if o == nil || IsNil(o.BlockHash) { - return nil, false - } - return &o.BlockHash, true -} - -// HasBlockHash returns a boolean if a field has been set. -func (o *EvmTransaction) HasBlockHash() bool { - if o != nil && IsNil(o.BlockHash) { - return true - } - - return false -} - -// SetBlockHash gets a reference to the given interface{} and assigns it to the BlockHash field. -func (o *EvmTransaction) SetBlockHash(v interface{}) { - o.BlockHash = v -} - -// GetBlockNumber returns the BlockNumber field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EvmTransaction) GetBlockNumber() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *EvmTransaction) GetBlockNumberOk() (*interface{}, bool) { - if o == nil || IsNil(o.BlockNumber) { - return nil, false - } - return &o.BlockNumber, true -} - -// HasBlockNumber returns a boolean if a field has been set. -func (o *EvmTransaction) HasBlockNumber() bool { - if o != nil && IsNil(o.BlockNumber) { - return true - } - - return false -} - -// SetBlockNumber gets a reference to the given interface{} and assigns it to the BlockNumber field. -func (o *EvmTransaction) SetBlockNumber(v interface{}) { - o.BlockNumber = v -} - -// GetTransactionIndex returns the TransactionIndex field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EvmTransaction) GetTransactionIndex() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TransactionIndex -} - -// GetTransactionIndexOk returns a tuple with the TransactionIndex field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *EvmTransaction) GetTransactionIndexOk() (*interface{}, bool) { - if o == nil || IsNil(o.TransactionIndex) { - return nil, false - } - return &o.TransactionIndex, true -} - -// HasTransactionIndex returns a boolean if a field has been set. -func (o *EvmTransaction) HasTransactionIndex() bool { - if o != nil && IsNil(o.TransactionIndex) { - return true - } - - return false -} - -// SetTransactionIndex gets a reference to the given interface{} and assigns it to the TransactionIndex field. -func (o *EvmTransaction) SetTransactionIndex(v interface{}) { - o.TransactionIndex = v -} - -// GetFrom returns the From field value if set, zero value otherwise. -func (o *EvmTransaction) GetFrom() string { - if o == nil || IsNil(o.From) { - var ret string - return ret - } - return *o.From -} - -// GetFromOk returns a tuple with the From field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmTransaction) GetFromOk() (*string, bool) { - if o == nil || IsNil(o.From) { - return nil, false - } - return o.From, true -} - -// HasFrom returns a boolean if a field has been set. -func (o *EvmTransaction) HasFrom() bool { - if o != nil && !IsNil(o.From) { - return true - } - - return false -} - -// SetFrom gets a reference to the given string and assigns it to the From field. -func (o *EvmTransaction) SetFrom(v string) { - o.From = &v -} - -// GetTo returns the To field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EvmTransaction) GetTo() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.To -} - -// GetToOk returns a tuple with the To field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *EvmTransaction) GetToOk() (*interface{}, bool) { - if o == nil || IsNil(o.To) { - return nil, false - } - return &o.To, true -} - -// HasTo returns a boolean if a field has been set. -func (o *EvmTransaction) HasTo() bool { - if o != nil && IsNil(o.To) { - return true - } - - return false -} - -// SetTo gets a reference to the given interface{} and assigns it to the To field. -func (o *EvmTransaction) SetTo(v interface{}) { - o.To = v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *EvmTransaction) GetValue() string { - if o == nil || IsNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmTransaction) GetValueOk() (*string, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *EvmTransaction) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *EvmTransaction) SetValue(v string) { - o.Value = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *EvmTransaction) GetGasPrice() string { - if o == nil || IsNil(o.GasPrice) { - var ret string - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmTransaction) GetGasPriceOk() (*string, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *EvmTransaction) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given string and assigns it to the GasPrice field. -func (o *EvmTransaction) SetGasPrice(v string) { - o.GasPrice = &v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *EvmTransaction) GetGas() float32 { - if o == nil || IsNil(o.Gas) { - var ret float32 - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmTransaction) GetGasOk() (*float32, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *EvmTransaction) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given float32 and assigns it to the Gas field. -func (o *EvmTransaction) SetGas(v float32) { - o.Gas = &v -} - -// GetInput returns the Input field value if set, zero value otherwise. -func (o *EvmTransaction) GetInput() string { - if o == nil || IsNil(o.Input) { - var ret string - return ret - } - return *o.Input -} - -// GetInputOk returns a tuple with the Input field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EvmTransaction) GetInputOk() (*string, bool) { - if o == nil || IsNil(o.Input) { - return nil, false - } - return o.Input, true -} - -// HasInput returns a boolean if a field has been set. -func (o *EvmTransaction) HasInput() bool { - if o != nil && !IsNil(o.Input) { - return true - } - - return false -} - -// SetInput gets a reference to the given string and assigns it to the Input field. -func (o *EvmTransaction) SetInput(v string) { - o.Input = &v -} - -func (o EvmTransaction) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EvmTransaction) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Hash) { - toSerialize["hash"] = o.Hash - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - if o.BlockHash != nil { - toSerialize["blockHash"] = o.BlockHash - } - if o.BlockNumber != nil { - toSerialize["blockNumber"] = o.BlockNumber - } - if o.TransactionIndex != nil { - toSerialize["transactionIndex"] = o.TransactionIndex - } - if !IsNil(o.From) { - toSerialize["from"] = o.From - } - if o.To != nil { - toSerialize["to"] = o.To - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.Input) { - toSerialize["input"] = o.Input - } - return toSerialize, nil -} - -type NullableEvmTransaction struct { - value *EvmTransaction - isSet bool -} - -func (v NullableEvmTransaction) Get() *EvmTransaction { - return v.value -} - -func (v *NullableEvmTransaction) Set(val *EvmTransaction) { - v.value = val - v.isSet = true -} - -func (v NullableEvmTransaction) IsSet() bool { - return v.isSet -} - -func (v *NullableEvmTransaction) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEvmTransaction(val *EvmTransaction) *NullableEvmTransaction { - return &NullableEvmTransaction{value: val, isSet: true} -} - -func (v NullableEvmTransaction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEvmTransaction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_balance_v1_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_balance_v1_request.go deleted file mode 100644 index d7f01c3de9..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_balance_v1_request.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the GetBalanceV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBalanceV1Request{} - -// GetBalanceV1Request struct for GetBalanceV1Request -type GetBalanceV1Request struct { - Address string `json:"address"` - DefaultBlock interface{} `json:"defaultBlock,omitempty"` -} - -// NewGetBalanceV1Request instantiates a new GetBalanceV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBalanceV1Request(address string) *GetBalanceV1Request { - this := GetBalanceV1Request{} - this.Address = address - return &this -} - -// NewGetBalanceV1RequestWithDefaults instantiates a new GetBalanceV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBalanceV1RequestWithDefaults() *GetBalanceV1Request { - this := GetBalanceV1Request{} - return &this -} - -// GetAddress returns the Address field value -func (o *GetBalanceV1Request) GetAddress() string { - if o == nil { - var ret string - return ret - } - - return o.Address -} - -// GetAddressOk returns a tuple with the Address field value -// and a boolean to check if the value has been set. -func (o *GetBalanceV1Request) GetAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Address, true -} - -// SetAddress sets field value -func (o *GetBalanceV1Request) SetAddress(v string) { - o.Address = v -} - -// GetDefaultBlock returns the DefaultBlock field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetBalanceV1Request) GetDefaultBlock() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.DefaultBlock -} - -// GetDefaultBlockOk returns a tuple with the DefaultBlock field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetBalanceV1Request) GetDefaultBlockOk() (*interface{}, bool) { - if o == nil || IsNil(o.DefaultBlock) { - return nil, false - } - return &o.DefaultBlock, true -} - -// HasDefaultBlock returns a boolean if a field has been set. -func (o *GetBalanceV1Request) HasDefaultBlock() bool { - if o != nil && IsNil(o.DefaultBlock) { - return true - } - - return false -} - -// SetDefaultBlock gets a reference to the given interface{} and assigns it to the DefaultBlock field. -func (o *GetBalanceV1Request) SetDefaultBlock(v interface{}) { - o.DefaultBlock = v -} - -func (o GetBalanceV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBalanceV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["address"] = o.Address - if o.DefaultBlock != nil { - toSerialize["defaultBlock"] = o.DefaultBlock - } - return toSerialize, nil -} - -type NullableGetBalanceV1Request struct { - value *GetBalanceV1Request - isSet bool -} - -func (v NullableGetBalanceV1Request) Get() *GetBalanceV1Request { - return v.value -} - -func (v *NullableGetBalanceV1Request) Set(val *GetBalanceV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableGetBalanceV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBalanceV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBalanceV1Request(val *GetBalanceV1Request) *NullableGetBalanceV1Request { - return &NullableGetBalanceV1Request{value: val, isSet: true} -} - -func (v NullableGetBalanceV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBalanceV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_balance_v1_response.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_balance_v1_response.go deleted file mode 100644 index 2bd334e575..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_balance_v1_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the GetBalanceV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBalanceV1Response{} - -// GetBalanceV1Response struct for GetBalanceV1Response -type GetBalanceV1Response struct { - Balance string `json:"balance"` -} - -// NewGetBalanceV1Response instantiates a new GetBalanceV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBalanceV1Response(balance string) *GetBalanceV1Response { - this := GetBalanceV1Response{} - this.Balance = balance - return &this -} - -// NewGetBalanceV1ResponseWithDefaults instantiates a new GetBalanceV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBalanceV1ResponseWithDefaults() *GetBalanceV1Response { - this := GetBalanceV1Response{} - return &this -} - -// GetBalance returns the Balance field value -func (o *GetBalanceV1Response) GetBalance() string { - if o == nil { - var ret string - return ret - } - - return o.Balance -} - -// GetBalanceOk returns a tuple with the Balance field value -// and a boolean to check if the value has been set. -func (o *GetBalanceV1Response) GetBalanceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Balance, true -} - -// SetBalance sets field value -func (o *GetBalanceV1Response) SetBalance(v string) { - o.Balance = v -} - -func (o GetBalanceV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBalanceV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["balance"] = o.Balance - return toSerialize, nil -} - -type NullableGetBalanceV1Response struct { - value *GetBalanceV1Response - isSet bool -} - -func (v NullableGetBalanceV1Response) Get() *GetBalanceV1Response { - return v.value -} - -func (v *NullableGetBalanceV1Response) Set(val *GetBalanceV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetBalanceV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBalanceV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBalanceV1Response(val *GetBalanceV1Response) *NullableGetBalanceV1Response { - return &NullableGetBalanceV1Response{value: val, isSet: true} -} - -func (v NullableGetBalanceV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBalanceV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_besu_record_v1_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_besu_record_v1_request.go deleted file mode 100644 index 7d6b793cd1..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_besu_record_v1_request.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the GetBesuRecordV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBesuRecordV1Request{} - -// GetBesuRecordV1Request struct for GetBesuRecordV1Request -type GetBesuRecordV1Request struct { - InvokeCall *InvokeContractV1Request `json:"invokeCall,omitempty"` - TransactionHash *string `json:"transactionHash,omitempty"` -} - -// NewGetBesuRecordV1Request instantiates a new GetBesuRecordV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBesuRecordV1Request() *GetBesuRecordV1Request { - this := GetBesuRecordV1Request{} - return &this -} - -// NewGetBesuRecordV1RequestWithDefaults instantiates a new GetBesuRecordV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBesuRecordV1RequestWithDefaults() *GetBesuRecordV1Request { - this := GetBesuRecordV1Request{} - return &this -} - -// GetInvokeCall returns the InvokeCall field value if set, zero value otherwise. -func (o *GetBesuRecordV1Request) GetInvokeCall() InvokeContractV1Request { - if o == nil || IsNil(o.InvokeCall) { - var ret InvokeContractV1Request - return ret - } - return *o.InvokeCall -} - -// GetInvokeCallOk returns a tuple with the InvokeCall field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBesuRecordV1Request) GetInvokeCallOk() (*InvokeContractV1Request, bool) { - if o == nil || IsNil(o.InvokeCall) { - return nil, false - } - return o.InvokeCall, true -} - -// HasInvokeCall returns a boolean if a field has been set. -func (o *GetBesuRecordV1Request) HasInvokeCall() bool { - if o != nil && !IsNil(o.InvokeCall) { - return true - } - - return false -} - -// SetInvokeCall gets a reference to the given InvokeContractV1Request and assigns it to the InvokeCall field. -func (o *GetBesuRecordV1Request) SetInvokeCall(v InvokeContractV1Request) { - o.InvokeCall = &v -} - -// GetTransactionHash returns the TransactionHash field value if set, zero value otherwise. -func (o *GetBesuRecordV1Request) GetTransactionHash() string { - if o == nil || IsNil(o.TransactionHash) { - var ret string - return ret - } - return *o.TransactionHash -} - -// GetTransactionHashOk returns a tuple with the TransactionHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBesuRecordV1Request) GetTransactionHashOk() (*string, bool) { - if o == nil || IsNil(o.TransactionHash) { - return nil, false - } - return o.TransactionHash, true -} - -// HasTransactionHash returns a boolean if a field has been set. -func (o *GetBesuRecordV1Request) HasTransactionHash() bool { - if o != nil && !IsNil(o.TransactionHash) { - return true - } - - return false -} - -// SetTransactionHash gets a reference to the given string and assigns it to the TransactionHash field. -func (o *GetBesuRecordV1Request) SetTransactionHash(v string) { - o.TransactionHash = &v -} - -func (o GetBesuRecordV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBesuRecordV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.InvokeCall) { - toSerialize["invokeCall"] = o.InvokeCall - } - if !IsNil(o.TransactionHash) { - toSerialize["transactionHash"] = o.TransactionHash - } - return toSerialize, nil -} - -type NullableGetBesuRecordV1Request struct { - value *GetBesuRecordV1Request - isSet bool -} - -func (v NullableGetBesuRecordV1Request) Get() *GetBesuRecordV1Request { - return v.value -} - -func (v *NullableGetBesuRecordV1Request) Set(val *GetBesuRecordV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableGetBesuRecordV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBesuRecordV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBesuRecordV1Request(val *GetBesuRecordV1Request) *NullableGetBesuRecordV1Request { - return &NullableGetBesuRecordV1Request{value: val, isSet: true} -} - -func (v NullableGetBesuRecordV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBesuRecordV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_besu_record_v1_response.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_besu_record_v1_response.go deleted file mode 100644 index 255c2037c9..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_besu_record_v1_response.go +++ /dev/null @@ -1,236 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the GetBesuRecordV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBesuRecordV1Response{} - -// GetBesuRecordV1Response struct for GetBesuRecordV1Response -type GetBesuRecordV1Response struct { - LedgerId *string `json:"ledgerId,omitempty"` - StateContract *string `json:"stateContract,omitempty"` - TransactionInputData interface{} `json:"transactionInputData,omitempty"` - CallOutput interface{} `json:"callOutput,omitempty"` -} - -// NewGetBesuRecordV1Response instantiates a new GetBesuRecordV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBesuRecordV1Response() *GetBesuRecordV1Response { - this := GetBesuRecordV1Response{} - return &this -} - -// NewGetBesuRecordV1ResponseWithDefaults instantiates a new GetBesuRecordV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBesuRecordV1ResponseWithDefaults() *GetBesuRecordV1Response { - this := GetBesuRecordV1Response{} - return &this -} - -// GetLedgerId returns the LedgerId field value if set, zero value otherwise. -func (o *GetBesuRecordV1Response) GetLedgerId() string { - if o == nil || IsNil(o.LedgerId) { - var ret string - return ret - } - return *o.LedgerId -} - -// GetLedgerIdOk returns a tuple with the LedgerId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBesuRecordV1Response) GetLedgerIdOk() (*string, bool) { - if o == nil || IsNil(o.LedgerId) { - return nil, false - } - return o.LedgerId, true -} - -// HasLedgerId returns a boolean if a field has been set. -func (o *GetBesuRecordV1Response) HasLedgerId() bool { - if o != nil && !IsNil(o.LedgerId) { - return true - } - - return false -} - -// SetLedgerId gets a reference to the given string and assigns it to the LedgerId field. -func (o *GetBesuRecordV1Response) SetLedgerId(v string) { - o.LedgerId = &v -} - -// GetStateContract returns the StateContract field value if set, zero value otherwise. -func (o *GetBesuRecordV1Response) GetStateContract() string { - if o == nil || IsNil(o.StateContract) { - var ret string - return ret - } - return *o.StateContract -} - -// GetStateContractOk returns a tuple with the StateContract field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBesuRecordV1Response) GetStateContractOk() (*string, bool) { - if o == nil || IsNil(o.StateContract) { - return nil, false - } - return o.StateContract, true -} - -// HasStateContract returns a boolean if a field has been set. -func (o *GetBesuRecordV1Response) HasStateContract() bool { - if o != nil && !IsNil(o.StateContract) { - return true - } - - return false -} - -// SetStateContract gets a reference to the given string and assigns it to the StateContract field. -func (o *GetBesuRecordV1Response) SetStateContract(v string) { - o.StateContract = &v -} - -// GetTransactionInputData returns the TransactionInputData field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetBesuRecordV1Response) GetTransactionInputData() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TransactionInputData -} - -// GetTransactionInputDataOk returns a tuple with the TransactionInputData field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetBesuRecordV1Response) GetTransactionInputDataOk() (*interface{}, bool) { - if o == nil || IsNil(o.TransactionInputData) { - return nil, false - } - return &o.TransactionInputData, true -} - -// HasTransactionInputData returns a boolean if a field has been set. -func (o *GetBesuRecordV1Response) HasTransactionInputData() bool { - if o != nil && IsNil(o.TransactionInputData) { - return true - } - - return false -} - -// SetTransactionInputData gets a reference to the given interface{} and assigns it to the TransactionInputData field. -func (o *GetBesuRecordV1Response) SetTransactionInputData(v interface{}) { - o.TransactionInputData = v -} - -// GetCallOutput returns the CallOutput field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetBesuRecordV1Response) GetCallOutput() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CallOutput -} - -// GetCallOutputOk returns a tuple with the CallOutput field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetBesuRecordV1Response) GetCallOutputOk() (*interface{}, bool) { - if o == nil || IsNil(o.CallOutput) { - return nil, false - } - return &o.CallOutput, true -} - -// HasCallOutput returns a boolean if a field has been set. -func (o *GetBesuRecordV1Response) HasCallOutput() bool { - if o != nil && IsNil(o.CallOutput) { - return true - } - - return false -} - -// SetCallOutput gets a reference to the given interface{} and assigns it to the CallOutput field. -func (o *GetBesuRecordV1Response) SetCallOutput(v interface{}) { - o.CallOutput = v -} - -func (o GetBesuRecordV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBesuRecordV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.LedgerId) { - toSerialize["ledgerId"] = o.LedgerId - } - if !IsNil(o.StateContract) { - toSerialize["stateContract"] = o.StateContract - } - if o.TransactionInputData != nil { - toSerialize["transactionInputData"] = o.TransactionInputData - } - if o.CallOutput != nil { - toSerialize["callOutput"] = o.CallOutput - } - return toSerialize, nil -} - -type NullableGetBesuRecordV1Response struct { - value *GetBesuRecordV1Response - isSet bool -} - -func (v NullableGetBesuRecordV1Response) Get() *GetBesuRecordV1Response { - return v.value -} - -func (v *NullableGetBesuRecordV1Response) Set(val *GetBesuRecordV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetBesuRecordV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBesuRecordV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBesuRecordV1Response(val *GetBesuRecordV1Response) *NullableGetBesuRecordV1Response { - return &NullableGetBesuRecordV1Response{value: val, isSet: true} -} - -func (v NullableGetBesuRecordV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBesuRecordV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_block_v1_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_block_v1_request.go deleted file mode 100644 index 52286368e3..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_block_v1_request.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the GetBlockV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBlockV1Request{} - -// GetBlockV1Request struct for GetBlockV1Request -type GetBlockV1Request struct { - BlockHashOrBlockNumber interface{} `json:"blockHashOrBlockNumber"` -} - -// NewGetBlockV1Request instantiates a new GetBlockV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBlockV1Request(blockHashOrBlockNumber interface{}) *GetBlockV1Request { - this := GetBlockV1Request{} - this.BlockHashOrBlockNumber = blockHashOrBlockNumber - return &this -} - -// NewGetBlockV1RequestWithDefaults instantiates a new GetBlockV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBlockV1RequestWithDefaults() *GetBlockV1Request { - this := GetBlockV1Request{} - return &this -} - -// GetBlockHashOrBlockNumber returns the BlockHashOrBlockNumber field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *GetBlockV1Request) GetBlockHashOrBlockNumber() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.BlockHashOrBlockNumber -} - -// GetBlockHashOrBlockNumberOk returns a tuple with the BlockHashOrBlockNumber field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetBlockV1Request) GetBlockHashOrBlockNumberOk() (*interface{}, bool) { - if o == nil || IsNil(o.BlockHashOrBlockNumber) { - return nil, false - } - return &o.BlockHashOrBlockNumber, true -} - -// SetBlockHashOrBlockNumber sets field value -func (o *GetBlockV1Request) SetBlockHashOrBlockNumber(v interface{}) { - o.BlockHashOrBlockNumber = v -} - -func (o GetBlockV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBlockV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.BlockHashOrBlockNumber != nil { - toSerialize["blockHashOrBlockNumber"] = o.BlockHashOrBlockNumber - } - return toSerialize, nil -} - -type NullableGetBlockV1Request struct { - value *GetBlockV1Request - isSet bool -} - -func (v NullableGetBlockV1Request) Get() *GetBlockV1Request { - return v.value -} - -func (v *NullableGetBlockV1Request) Set(val *GetBlockV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableGetBlockV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBlockV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBlockV1Request(val *GetBlockV1Request) *NullableGetBlockV1Request { - return &NullableGetBlockV1Request{value: val, isSet: true} -} - -func (v NullableGetBlockV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBlockV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_block_v1_response.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_block_v1_response.go deleted file mode 100644 index 2226921398..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_block_v1_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the GetBlockV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBlockV1Response{} - -// GetBlockV1Response struct for GetBlockV1Response -type GetBlockV1Response struct { - Block EvmBlock `json:"block"` -} - -// NewGetBlockV1Response instantiates a new GetBlockV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBlockV1Response(block EvmBlock) *GetBlockV1Response { - this := GetBlockV1Response{} - this.Block = block - return &this -} - -// NewGetBlockV1ResponseWithDefaults instantiates a new GetBlockV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBlockV1ResponseWithDefaults() *GetBlockV1Response { - this := GetBlockV1Response{} - return &this -} - -// GetBlock returns the Block field value -func (o *GetBlockV1Response) GetBlock() EvmBlock { - if o == nil { - var ret EvmBlock - return ret - } - - return o.Block -} - -// GetBlockOk returns a tuple with the Block field value -// and a boolean to check if the value has been set. -func (o *GetBlockV1Response) GetBlockOk() (*EvmBlock, bool) { - if o == nil { - return nil, false - } - return &o.Block, true -} - -// SetBlock sets field value -func (o *GetBlockV1Response) SetBlock(v EvmBlock) { - o.Block = v -} - -func (o GetBlockV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBlockV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["block"] = o.Block - return toSerialize, nil -} - -type NullableGetBlockV1Response struct { - value *GetBlockV1Response - isSet bool -} - -func (v NullableGetBlockV1Response) Get() *GetBlockV1Response { - return v.value -} - -func (v *NullableGetBlockV1Response) Set(val *GetBlockV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetBlockV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBlockV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBlockV1Response(val *GetBlockV1Response) *NullableGetBlockV1Response { - return &NullableGetBlockV1Response{value: val, isSet: true} -} - -func (v NullableGetBlockV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBlockV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_past_logs_v1_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_past_logs_v1_request.go deleted file mode 100644 index 9056636330..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_past_logs_v1_request.go +++ /dev/null @@ -1,237 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the GetPastLogsV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetPastLogsV1Request{} - -// GetPastLogsV1Request struct for GetPastLogsV1Request -type GetPastLogsV1Request struct { - ToBlock interface{} `json:"toBlock,omitempty"` - FromBlock interface{} `json:"fromBlock,omitempty"` - Address interface{} `json:"address,omitempty"` - Topics []interface{} `json:"topics,omitempty"` -} - -// NewGetPastLogsV1Request instantiates a new GetPastLogsV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetPastLogsV1Request() *GetPastLogsV1Request { - this := GetPastLogsV1Request{} - return &this -} - -// NewGetPastLogsV1RequestWithDefaults instantiates a new GetPastLogsV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetPastLogsV1RequestWithDefaults() *GetPastLogsV1Request { - this := GetPastLogsV1Request{} - return &this -} - -// GetToBlock returns the ToBlock field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPastLogsV1Request) GetToBlock() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.ToBlock -} - -// GetToBlockOk returns a tuple with the ToBlock field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPastLogsV1Request) GetToBlockOk() (*interface{}, bool) { - if o == nil || IsNil(o.ToBlock) { - return nil, false - } - return &o.ToBlock, true -} - -// HasToBlock returns a boolean if a field has been set. -func (o *GetPastLogsV1Request) HasToBlock() bool { - if o != nil && IsNil(o.ToBlock) { - return true - } - - return false -} - -// SetToBlock gets a reference to the given interface{} and assigns it to the ToBlock field. -func (o *GetPastLogsV1Request) SetToBlock(v interface{}) { - o.ToBlock = v -} - -// GetFromBlock returns the FromBlock field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPastLogsV1Request) GetFromBlock() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.FromBlock -} - -// GetFromBlockOk returns a tuple with the FromBlock field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPastLogsV1Request) GetFromBlockOk() (*interface{}, bool) { - if o == nil || IsNil(o.FromBlock) { - return nil, false - } - return &o.FromBlock, true -} - -// HasFromBlock returns a boolean if a field has been set. -func (o *GetPastLogsV1Request) HasFromBlock() bool { - if o != nil && IsNil(o.FromBlock) { - return true - } - - return false -} - -// SetFromBlock gets a reference to the given interface{} and assigns it to the FromBlock field. -func (o *GetPastLogsV1Request) SetFromBlock(v interface{}) { - o.FromBlock = v -} - -// GetAddress returns the Address field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPastLogsV1Request) GetAddress() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Address -} - -// GetAddressOk returns a tuple with the Address field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPastLogsV1Request) GetAddressOk() (*interface{}, bool) { - if o == nil || IsNil(o.Address) { - return nil, false - } - return &o.Address, true -} - -// HasAddress returns a boolean if a field has been set. -func (o *GetPastLogsV1Request) HasAddress() bool { - if o != nil && IsNil(o.Address) { - return true - } - - return false -} - -// SetAddress gets a reference to the given interface{} and assigns it to the Address field. -func (o *GetPastLogsV1Request) SetAddress(v interface{}) { - o.Address = v -} - -// GetTopics returns the Topics field value if set, zero value otherwise. -func (o *GetPastLogsV1Request) GetTopics() []interface{} { - if o == nil || IsNil(o.Topics) { - var ret []interface{} - return ret - } - return o.Topics -} - -// GetTopicsOk returns a tuple with the Topics field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetPastLogsV1Request) GetTopicsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.Topics) { - return nil, false - } - return o.Topics, true -} - -// HasTopics returns a boolean if a field has been set. -func (o *GetPastLogsV1Request) HasTopics() bool { - if o != nil && !IsNil(o.Topics) { - return true - } - - return false -} - -// SetTopics gets a reference to the given []interface{} and assigns it to the Topics field. -func (o *GetPastLogsV1Request) SetTopics(v []interface{}) { - o.Topics = v -} - -func (o GetPastLogsV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetPastLogsV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.ToBlock != nil { - toSerialize["toBlock"] = o.ToBlock - } - if o.FromBlock != nil { - toSerialize["fromBlock"] = o.FromBlock - } - if o.Address != nil { - toSerialize["address"] = o.Address - } - if !IsNil(o.Topics) { - toSerialize["topics"] = o.Topics - } - return toSerialize, nil -} - -type NullableGetPastLogsV1Request struct { - value *GetPastLogsV1Request - isSet bool -} - -func (v NullableGetPastLogsV1Request) Get() *GetPastLogsV1Request { - return v.value -} - -func (v *NullableGetPastLogsV1Request) Set(val *GetPastLogsV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableGetPastLogsV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableGetPastLogsV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetPastLogsV1Request(val *GetPastLogsV1Request) *NullableGetPastLogsV1Request { - return &NullableGetPastLogsV1Request{value: val, isSet: true} -} - -func (v NullableGetPastLogsV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetPastLogsV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_past_logs_v1_response.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_past_logs_v1_response.go deleted file mode 100644 index 5f5e352359..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_past_logs_v1_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the GetPastLogsV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetPastLogsV1Response{} - -// GetPastLogsV1Response struct for GetPastLogsV1Response -type GetPastLogsV1Response struct { - Logs []EvmLog `json:"logs"` -} - -// NewGetPastLogsV1Response instantiates a new GetPastLogsV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetPastLogsV1Response(logs []EvmLog) *GetPastLogsV1Response { - this := GetPastLogsV1Response{} - this.Logs = logs - return &this -} - -// NewGetPastLogsV1ResponseWithDefaults instantiates a new GetPastLogsV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetPastLogsV1ResponseWithDefaults() *GetPastLogsV1Response { - this := GetPastLogsV1Response{} - return &this -} - -// GetLogs returns the Logs field value -func (o *GetPastLogsV1Response) GetLogs() []EvmLog { - if o == nil { - var ret []EvmLog - return ret - } - - return o.Logs -} - -// GetLogsOk returns a tuple with the Logs field value -// and a boolean to check if the value has been set. -func (o *GetPastLogsV1Response) GetLogsOk() ([]EvmLog, bool) { - if o == nil { - return nil, false - } - return o.Logs, true -} - -// SetLogs sets field value -func (o *GetPastLogsV1Response) SetLogs(v []EvmLog) { - o.Logs = v -} - -func (o GetPastLogsV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetPastLogsV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["logs"] = o.Logs - return toSerialize, nil -} - -type NullableGetPastLogsV1Response struct { - value *GetPastLogsV1Response - isSet bool -} - -func (v NullableGetPastLogsV1Response) Get() *GetPastLogsV1Response { - return v.value -} - -func (v *NullableGetPastLogsV1Response) Set(val *GetPastLogsV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetPastLogsV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetPastLogsV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetPastLogsV1Response(val *GetPastLogsV1Response) *NullableGetPastLogsV1Response { - return &NullableGetPastLogsV1Response{value: val, isSet: true} -} - -func (v NullableGetPastLogsV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetPastLogsV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_transaction_v1_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_transaction_v1_request.go deleted file mode 100644 index d4e818955d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_transaction_v1_request.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the GetTransactionV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetTransactionV1Request{} - -// GetTransactionV1Request struct for GetTransactionV1Request -type GetTransactionV1Request struct { - TransactionHash string `json:"transactionHash"` -} - -// NewGetTransactionV1Request instantiates a new GetTransactionV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetTransactionV1Request(transactionHash string) *GetTransactionV1Request { - this := GetTransactionV1Request{} - this.TransactionHash = transactionHash - return &this -} - -// NewGetTransactionV1RequestWithDefaults instantiates a new GetTransactionV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetTransactionV1RequestWithDefaults() *GetTransactionV1Request { - this := GetTransactionV1Request{} - return &this -} - -// GetTransactionHash returns the TransactionHash field value -func (o *GetTransactionV1Request) GetTransactionHash() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionHash -} - -// GetTransactionHashOk returns a tuple with the TransactionHash field value -// and a boolean to check if the value has been set. -func (o *GetTransactionV1Request) GetTransactionHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionHash, true -} - -// SetTransactionHash sets field value -func (o *GetTransactionV1Request) SetTransactionHash(v string) { - o.TransactionHash = v -} - -func (o GetTransactionV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetTransactionV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["transactionHash"] = o.TransactionHash - return toSerialize, nil -} - -type NullableGetTransactionV1Request struct { - value *GetTransactionV1Request - isSet bool -} - -func (v NullableGetTransactionV1Request) Get() *GetTransactionV1Request { - return v.value -} - -func (v *NullableGetTransactionV1Request) Set(val *GetTransactionV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableGetTransactionV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableGetTransactionV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetTransactionV1Request(val *GetTransactionV1Request) *NullableGetTransactionV1Request { - return &NullableGetTransactionV1Request{value: val, isSet: true} -} - -func (v NullableGetTransactionV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetTransactionV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_transaction_v1_response.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_transaction_v1_response.go deleted file mode 100644 index 792ab10155..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_get_transaction_v1_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the GetTransactionV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetTransactionV1Response{} - -// GetTransactionV1Response struct for GetTransactionV1Response -type GetTransactionV1Response struct { - Transaction EvmTransaction `json:"transaction"` -} - -// NewGetTransactionV1Response instantiates a new GetTransactionV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetTransactionV1Response(transaction EvmTransaction) *GetTransactionV1Response { - this := GetTransactionV1Response{} - this.Transaction = transaction - return &this -} - -// NewGetTransactionV1ResponseWithDefaults instantiates a new GetTransactionV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetTransactionV1ResponseWithDefaults() *GetTransactionV1Response { - this := GetTransactionV1Response{} - return &this -} - -// GetTransaction returns the Transaction field value -func (o *GetTransactionV1Response) GetTransaction() EvmTransaction { - if o == nil { - var ret EvmTransaction - return ret - } - - return o.Transaction -} - -// GetTransactionOk returns a tuple with the Transaction field value -// and a boolean to check if the value has been set. -func (o *GetTransactionV1Response) GetTransactionOk() (*EvmTransaction, bool) { - if o == nil { - return nil, false - } - return &o.Transaction, true -} - -// SetTransaction sets field value -func (o *GetTransactionV1Response) SetTransaction(v EvmTransaction) { - o.Transaction = v -} - -func (o GetTransactionV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetTransactionV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["transaction"] = o.Transaction - return toSerialize, nil -} - -type NullableGetTransactionV1Response struct { - value *GetTransactionV1Response - isSet bool -} - -func (v NullableGetTransactionV1Response) Get() *GetTransactionV1Response { - return v.value -} - -func (v *NullableGetTransactionV1Response) Set(val *GetTransactionV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetTransactionV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetTransactionV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetTransactionV1Response(val *GetTransactionV1Response) *NullableGetTransactionV1Response { - return &NullableGetTransactionV1Response{value: val, isSet: true} -} - -func (v NullableGetTransactionV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetTransactionV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go deleted file mode 100644 index ce38203b5b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go +++ /dev/null @@ -1,559 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the InvokeContractV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractV1Request{} - -// InvokeContractV1Request struct for InvokeContractV1Request -type InvokeContractV1Request struct { - ContractName string `json:"contractName"` - SigningCredential Web3SigningCredential `json:"signingCredential"` - InvocationType EthContractInvocationType `json:"invocationType"` - // The name of the contract method to invoke. - MethodName string `json:"methodName"` - // The list of arguments to pass in to the contract method being invoked. - Params []interface{} `json:"params"` - // The application binary interface of the solidity contract, optional parameter - ContractAbi []interface{} `json:"contractAbi,omitempty"` - // Address of the solidity contract, optional parameter - ContractAddress *string `json:"contractAddress,omitempty"` - Value *Web3BlockHeaderTimestamp `json:"value,omitempty"` - Gas *Web3BlockHeaderTimestamp `json:"gas,omitempty"` - GasPrice *Web3BlockHeaderTimestamp `json:"gasPrice,omitempty"` - Nonce *float32 `json:"nonce,omitempty"` - // The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND - TimeoutMs *float32 `json:"timeoutMs,omitempty"` - // The keychainId for retrieve the contracts json. - KeychainId *string `json:"keychainId,omitempty"` - PrivateTransactionConfig *BesuPrivateTransactionConfig `json:"privateTransactionConfig,omitempty"` -} - -// NewInvokeContractV1Request instantiates a new InvokeContractV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractV1Request(contractName string, signingCredential Web3SigningCredential, invocationType EthContractInvocationType, methodName string, params []interface{}) *InvokeContractV1Request { - this := InvokeContractV1Request{} - this.ContractName = contractName - this.SigningCredential = signingCredential - this.InvocationType = invocationType - this.MethodName = methodName - this.Params = params - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// NewInvokeContractV1RequestWithDefaults instantiates a new InvokeContractV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractV1RequestWithDefaults() *InvokeContractV1Request { - this := InvokeContractV1Request{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetContractName returns the ContractName field value -func (o *InvokeContractV1Request) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *InvokeContractV1Request) SetContractName(v string) { - o.ContractName = v -} - -// GetSigningCredential returns the SigningCredential field value -func (o *InvokeContractV1Request) GetSigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.SigningCredential -} - -// GetSigningCredentialOk returns a tuple with the SigningCredential field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetSigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.SigningCredential, true -} - -// SetSigningCredential sets field value -func (o *InvokeContractV1Request) SetSigningCredential(v Web3SigningCredential) { - o.SigningCredential = v -} - -// GetInvocationType returns the InvocationType field value -func (o *InvokeContractV1Request) GetInvocationType() EthContractInvocationType { - if o == nil { - var ret EthContractInvocationType - return ret - } - - return o.InvocationType -} - -// GetInvocationTypeOk returns a tuple with the InvocationType field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetInvocationTypeOk() (*EthContractInvocationType, bool) { - if o == nil { - return nil, false - } - return &o.InvocationType, true -} - -// SetInvocationType sets field value -func (o *InvokeContractV1Request) SetInvocationType(v EthContractInvocationType) { - o.InvocationType = v -} - -// GetMethodName returns the MethodName field value -func (o *InvokeContractV1Request) GetMethodName() string { - if o == nil { - var ret string - return ret - } - - return o.MethodName -} - -// GetMethodNameOk returns a tuple with the MethodName field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetMethodNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MethodName, true -} - -// SetMethodName sets field value -func (o *InvokeContractV1Request) SetMethodName(v string) { - o.MethodName = v -} - -// GetParams returns the Params field value -func (o *InvokeContractV1Request) GetParams() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetParamsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Params, true -} - -// SetParams sets field value -func (o *InvokeContractV1Request) SetParams(v []interface{}) { - o.Params = v -} - -// GetContractAbi returns the ContractAbi field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetContractAbi() []interface{} { - if o == nil || IsNil(o.ContractAbi) { - var ret []interface{} - return ret - } - return o.ContractAbi -} - -// GetContractAbiOk returns a tuple with the ContractAbi field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetContractAbiOk() ([]interface{}, bool) { - if o == nil || IsNil(o.ContractAbi) { - return nil, false - } - return o.ContractAbi, true -} - -// HasContractAbi returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasContractAbi() bool { - if o != nil && !IsNil(o.ContractAbi) { - return true - } - - return false -} - -// SetContractAbi gets a reference to the given []interface{} and assigns it to the ContractAbi field. -func (o *InvokeContractV1Request) SetContractAbi(v []interface{}) { - o.ContractAbi = v -} - -// GetContractAddress returns the ContractAddress field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetContractAddress() string { - if o == nil || IsNil(o.ContractAddress) { - var ret string - return ret - } - return *o.ContractAddress -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetContractAddressOk() (*string, bool) { - if o == nil || IsNil(o.ContractAddress) { - return nil, false - } - return o.ContractAddress, true -} - -// HasContractAddress returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasContractAddress() bool { - if o != nil && !IsNil(o.ContractAddress) { - return true - } - - return false -} - -// SetContractAddress gets a reference to the given string and assigns it to the ContractAddress field. -func (o *InvokeContractV1Request) SetContractAddress(v string) { - o.ContractAddress = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetValue() Web3BlockHeaderTimestamp { - if o == nil || IsNil(o.Value) { - var ret Web3BlockHeaderTimestamp - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetValueOk() (*Web3BlockHeaderTimestamp, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given Web3BlockHeaderTimestamp and assigns it to the Value field. -func (o *InvokeContractV1Request) SetValue(v Web3BlockHeaderTimestamp) { - o.Value = &v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetGas() Web3BlockHeaderTimestamp { - if o == nil || IsNil(o.Gas) { - var ret Web3BlockHeaderTimestamp - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetGasOk() (*Web3BlockHeaderTimestamp, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given Web3BlockHeaderTimestamp and assigns it to the Gas field. -func (o *InvokeContractV1Request) SetGas(v Web3BlockHeaderTimestamp) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetGasPrice() Web3BlockHeaderTimestamp { - if o == nil || IsNil(o.GasPrice) { - var ret Web3BlockHeaderTimestamp - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetGasPriceOk() (*Web3BlockHeaderTimestamp, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given Web3BlockHeaderTimestamp and assigns it to the GasPrice field. -func (o *InvokeContractV1Request) SetGasPrice(v Web3BlockHeaderTimestamp) { - o.GasPrice = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetNonce() float32 { - if o == nil || IsNil(o.Nonce) { - var ret float32 - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetNonceOk() (*float32, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given float32 and assigns it to the Nonce field. -func (o *InvokeContractV1Request) SetNonce(v float32) { - o.Nonce = &v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *InvokeContractV1Request) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -// GetKeychainId returns the KeychainId field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetKeychainId() string { - if o == nil || IsNil(o.KeychainId) { - var ret string - return ret - } - return *o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetKeychainIdOk() (*string, bool) { - if o == nil || IsNil(o.KeychainId) { - return nil, false - } - return o.KeychainId, true -} - -// HasKeychainId returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasKeychainId() bool { - if o != nil && !IsNil(o.KeychainId) { - return true - } - - return false -} - -// SetKeychainId gets a reference to the given string and assigns it to the KeychainId field. -func (o *InvokeContractV1Request) SetKeychainId(v string) { - o.KeychainId = &v -} - -// GetPrivateTransactionConfig returns the PrivateTransactionConfig field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetPrivateTransactionConfig() BesuPrivateTransactionConfig { - if o == nil || IsNil(o.PrivateTransactionConfig) { - var ret BesuPrivateTransactionConfig - return ret - } - return *o.PrivateTransactionConfig -} - -// GetPrivateTransactionConfigOk returns a tuple with the PrivateTransactionConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetPrivateTransactionConfigOk() (*BesuPrivateTransactionConfig, bool) { - if o == nil || IsNil(o.PrivateTransactionConfig) { - return nil, false - } - return o.PrivateTransactionConfig, true -} - -// HasPrivateTransactionConfig returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasPrivateTransactionConfig() bool { - if o != nil && !IsNil(o.PrivateTransactionConfig) { - return true - } - - return false -} - -// SetPrivateTransactionConfig gets a reference to the given BesuPrivateTransactionConfig and assigns it to the PrivateTransactionConfig field. -func (o *InvokeContractV1Request) SetPrivateTransactionConfig(v BesuPrivateTransactionConfig) { - o.PrivateTransactionConfig = &v -} - -func (o InvokeContractV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractName"] = o.ContractName - toSerialize["signingCredential"] = o.SigningCredential - toSerialize["invocationType"] = o.InvocationType - toSerialize["methodName"] = o.MethodName - toSerialize["params"] = o.Params - if !IsNil(o.ContractAbi) { - toSerialize["contractAbi"] = o.ContractAbi - } - if !IsNil(o.ContractAddress) { - toSerialize["contractAddress"] = o.ContractAddress - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - if !IsNil(o.KeychainId) { - toSerialize["keychainId"] = o.KeychainId - } - if !IsNil(o.PrivateTransactionConfig) { - toSerialize["privateTransactionConfig"] = o.PrivateTransactionConfig - } - return toSerialize, nil -} - -type NullableInvokeContractV1Request struct { - value *InvokeContractV1Request - isSet bool -} - -func (v NullableInvokeContractV1Request) Get() *InvokeContractV1Request { - return v.value -} - -func (v *NullableInvokeContractV1Request) Set(val *InvokeContractV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1Request(val *InvokeContractV1Request) *NullableInvokeContractV1Request { - return &NullableInvokeContractV1Request{value: val, isSet: true} -} - -func (v NullableInvokeContractV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go deleted file mode 100644 index 068af36056..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the InvokeContractV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractV1Response{} - -// InvokeContractV1Response struct for InvokeContractV1Response -type InvokeContractV1Response struct { - TransactionReceipt *Web3TransactionReceipt `json:"transactionReceipt,omitempty"` - CallOutput interface{} `json:"callOutput,omitempty"` - Success bool `json:"success"` -} - -// NewInvokeContractV1Response instantiates a new InvokeContractV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractV1Response(success bool) *InvokeContractV1Response { - this := InvokeContractV1Response{} - this.Success = success - return &this -} - -// NewInvokeContractV1ResponseWithDefaults instantiates a new InvokeContractV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractV1ResponseWithDefaults() *InvokeContractV1Response { - this := InvokeContractV1Response{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value if set, zero value otherwise. -func (o *InvokeContractV1Response) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil || IsNil(o.TransactionReceipt) { - var ret Web3TransactionReceipt - return ret - } - return *o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil || IsNil(o.TransactionReceipt) { - return nil, false - } - return o.TransactionReceipt, true -} - -// HasTransactionReceipt returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasTransactionReceipt() bool { - if o != nil && !IsNil(o.TransactionReceipt) { - return true - } - - return false -} - -// SetTransactionReceipt gets a reference to the given Web3TransactionReceipt and assigns it to the TransactionReceipt field. -func (o *InvokeContractV1Response) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = &v -} - -// GetCallOutput returns the CallOutput field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvokeContractV1Response) GetCallOutput() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CallOutput -} - -// GetCallOutputOk returns a tuple with the CallOutput field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvokeContractV1Response) GetCallOutputOk() (*interface{}, bool) { - if o == nil || IsNil(o.CallOutput) { - return nil, false - } - return &o.CallOutput, true -} - -// HasCallOutput returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasCallOutput() bool { - if o != nil && IsNil(o.CallOutput) { - return true - } - - return false -} - -// SetCallOutput gets a reference to the given interface{} and assigns it to the CallOutput field. -func (o *InvokeContractV1Response) SetCallOutput(v interface{}) { - o.CallOutput = v -} - -// GetSuccess returns the Success field value -func (o *InvokeContractV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *InvokeContractV1Response) SetSuccess(v bool) { - o.Success = v -} - -func (o InvokeContractV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.TransactionReceipt) { - toSerialize["transactionReceipt"] = o.TransactionReceipt - } - if o.CallOutput != nil { - toSerialize["callOutput"] = o.CallOutput - } - toSerialize["success"] = o.Success - return toSerialize, nil -} - -type NullableInvokeContractV1Response struct { - value *InvokeContractV1Response - isSet bool -} - -func (v NullableInvokeContractV1Response) Get() *InvokeContractV1Response { - return v.value -} - -func (v *NullableInvokeContractV1Response) Set(val *InvokeContractV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1Response(val *InvokeContractV1Response) *NullableInvokeContractV1Response { - return &NullableInvokeContractV1Response{value: val, isSet: true} -} - -func (v NullableInvokeContractV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_receipt_type.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_receipt_type.go deleted file mode 100644 index 217457db12..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_receipt_type.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" - "fmt" -) - -// ReceiptType Enumerates the possible types of receipts that can be waited for by someone or something that has requested the execution of a transaction on a ledger. -type ReceiptType string - -// List of ReceiptType -const ( - NODE_TX_POOL_ACK ReceiptType = "NODE_TX_POOL_ACK" - LEDGER_BLOCK_ACK ReceiptType = "LEDGER_BLOCK_ACK" -) - -// All allowed values of ReceiptType enum -var AllowedReceiptTypeEnumValues = []ReceiptType{ - "NODE_TX_POOL_ACK", - "LEDGER_BLOCK_ACK", -} - -func (v *ReceiptType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := ReceiptType(value) - for _, existing := range AllowedReceiptTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid ReceiptType", value) -} - -// NewReceiptTypeFromValue returns a pointer to a valid ReceiptType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewReceiptTypeFromValue(v string) (*ReceiptType, error) { - ev := ReceiptType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ReceiptType: valid values are %v", v, AllowedReceiptTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v ReceiptType) IsValid() bool { - for _, existing := range AllowedReceiptTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to ReceiptType value -func (v ReceiptType) Ptr() *ReceiptType { - return &v -} - -type NullableReceiptType struct { - value *ReceiptType - isSet bool -} - -func (v NullableReceiptType) Get() *ReceiptType { - return v.value -} - -func (v *NullableReceiptType) Set(val *ReceiptType) { - v.value = val - v.isSet = true -} - -func (v NullableReceiptType) IsSet() bool { - return v.isSet -} - -func (v *NullableReceiptType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableReceiptType(val *ReceiptType) *NullableReceiptType { - return &NullableReceiptType{value: val, isSet: true} -} - -func (v NullableReceiptType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableReceiptType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_run_transaction_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_run_transaction_request.go deleted file mode 100644 index c4155ef08b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_run_transaction_request.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the RunTransactionRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionRequest{} - -// RunTransactionRequest struct for RunTransactionRequest -type RunTransactionRequest struct { - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - TransactionConfig BesuTransactionConfig `json:"transactionConfig"` - ConsistencyStrategy ConsistencyStrategy `json:"consistencyStrategy"` - PrivateTransactionConfig *BesuPrivateTransactionConfig `json:"privateTransactionConfig,omitempty"` -} - -// NewRunTransactionRequest instantiates a new RunTransactionRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionRequest(web3SigningCredential Web3SigningCredential, transactionConfig BesuTransactionConfig, consistencyStrategy ConsistencyStrategy) *RunTransactionRequest { - this := RunTransactionRequest{} - this.Web3SigningCredential = web3SigningCredential - this.TransactionConfig = transactionConfig - this.ConsistencyStrategy = consistencyStrategy - return &this -} - -// NewRunTransactionRequestWithDefaults instantiates a new RunTransactionRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionRequestWithDefaults() *RunTransactionRequest { - this := RunTransactionRequest{} - return &this -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *RunTransactionRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *RunTransactionRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetTransactionConfig returns the TransactionConfig field value -func (o *RunTransactionRequest) GetTransactionConfig() BesuTransactionConfig { - if o == nil { - var ret BesuTransactionConfig - return ret - } - - return o.TransactionConfig -} - -// GetTransactionConfigOk returns a tuple with the TransactionConfig field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetTransactionConfigOk() (*BesuTransactionConfig, bool) { - if o == nil { - return nil, false - } - return &o.TransactionConfig, true -} - -// SetTransactionConfig sets field value -func (o *RunTransactionRequest) SetTransactionConfig(v BesuTransactionConfig) { - o.TransactionConfig = v -} - -// GetConsistencyStrategy returns the ConsistencyStrategy field value -func (o *RunTransactionRequest) GetConsistencyStrategy() ConsistencyStrategy { - if o == nil { - var ret ConsistencyStrategy - return ret - } - - return o.ConsistencyStrategy -} - -// GetConsistencyStrategyOk returns a tuple with the ConsistencyStrategy field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetConsistencyStrategyOk() (*ConsistencyStrategy, bool) { - if o == nil { - return nil, false - } - return &o.ConsistencyStrategy, true -} - -// SetConsistencyStrategy sets field value -func (o *RunTransactionRequest) SetConsistencyStrategy(v ConsistencyStrategy) { - o.ConsistencyStrategy = v -} - -// GetPrivateTransactionConfig returns the PrivateTransactionConfig field value if set, zero value otherwise. -func (o *RunTransactionRequest) GetPrivateTransactionConfig() BesuPrivateTransactionConfig { - if o == nil || IsNil(o.PrivateTransactionConfig) { - var ret BesuPrivateTransactionConfig - return ret - } - return *o.PrivateTransactionConfig -} - -// GetPrivateTransactionConfigOk returns a tuple with the PrivateTransactionConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetPrivateTransactionConfigOk() (*BesuPrivateTransactionConfig, bool) { - if o == nil || IsNil(o.PrivateTransactionConfig) { - return nil, false - } - return o.PrivateTransactionConfig, true -} - -// HasPrivateTransactionConfig returns a boolean if a field has been set. -func (o *RunTransactionRequest) HasPrivateTransactionConfig() bool { - if o != nil && !IsNil(o.PrivateTransactionConfig) { - return true - } - - return false -} - -// SetPrivateTransactionConfig gets a reference to the given BesuPrivateTransactionConfig and assigns it to the PrivateTransactionConfig field. -func (o *RunTransactionRequest) SetPrivateTransactionConfig(v BesuPrivateTransactionConfig) { - o.PrivateTransactionConfig = &v -} - -func (o RunTransactionRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["transactionConfig"] = o.TransactionConfig - toSerialize["consistencyStrategy"] = o.ConsistencyStrategy - if !IsNil(o.PrivateTransactionConfig) { - toSerialize["privateTransactionConfig"] = o.PrivateTransactionConfig - } - return toSerialize, nil -} - -type NullableRunTransactionRequest struct { - value *RunTransactionRequest - isSet bool -} - -func (v NullableRunTransactionRequest) Get() *RunTransactionRequest { - return v.value -} - -func (v *NullableRunTransactionRequest) Set(val *RunTransactionRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionRequest(val *RunTransactionRequest) *NullableRunTransactionRequest { - return &NullableRunTransactionRequest{value: val, isSet: true} -} - -func (v NullableRunTransactionRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_run_transaction_response.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_run_transaction_response.go deleted file mode 100644 index 77caa76749..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_run_transaction_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the RunTransactionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionResponse{} - -// RunTransactionResponse struct for RunTransactionResponse -type RunTransactionResponse struct { - TransactionReceipt Web3TransactionReceipt `json:"transactionReceipt"` -} - -// NewRunTransactionResponse instantiates a new RunTransactionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionResponse(transactionReceipt Web3TransactionReceipt) *RunTransactionResponse { - this := RunTransactionResponse{} - this.TransactionReceipt = transactionReceipt - return &this -} - -// NewRunTransactionResponseWithDefaults instantiates a new RunTransactionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionResponseWithDefaults() *RunTransactionResponse { - this := RunTransactionResponse{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value -func (o *RunTransactionResponse) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil { - var ret Web3TransactionReceipt - return ret - } - - return o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value -// and a boolean to check if the value has been set. -func (o *RunTransactionResponse) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil { - return nil, false - } - return &o.TransactionReceipt, true -} - -// SetTransactionReceipt sets field value -func (o *RunTransactionResponse) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = v -} - -func (o RunTransactionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["transactionReceipt"] = o.TransactionReceipt - return toSerialize, nil -} - -type NullableRunTransactionResponse struct { - value *RunTransactionResponse - isSet bool -} - -func (v NullableRunTransactionResponse) Get() *RunTransactionResponse { - return v.value -} - -func (v *NullableRunTransactionResponse) Set(val *RunTransactionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionResponse(val *RunTransactionResponse) *NullableRunTransactionResponse { - return &NullableRunTransactionResponse{value: val, isSet: true} -} - -func (v NullableRunTransactionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_sign_transaction_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_sign_transaction_request.go deleted file mode 100644 index e67ab4ca40..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_sign_transaction_request.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the SignTransactionRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SignTransactionRequest{} - -// SignTransactionRequest struct for SignTransactionRequest -type SignTransactionRequest struct { - KeychainId string `json:"keychainId"` - KeychainRef string `json:"keychainRef"` - // The transaction hash of ledger will be used to fetch the contain. - TransactionHash string `json:"transactionHash"` -} - -// NewSignTransactionRequest instantiates a new SignTransactionRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSignTransactionRequest(keychainId string, keychainRef string, transactionHash string) *SignTransactionRequest { - this := SignTransactionRequest{} - this.KeychainId = keychainId - this.KeychainRef = keychainRef - this.TransactionHash = transactionHash - return &this -} - -// NewSignTransactionRequestWithDefaults instantiates a new SignTransactionRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSignTransactionRequestWithDefaults() *SignTransactionRequest { - this := SignTransactionRequest{} - return &this -} - -// GetKeychainId returns the KeychainId field value -func (o *SignTransactionRequest) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *SignTransactionRequest) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *SignTransactionRequest) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetKeychainRef returns the KeychainRef field value -func (o *SignTransactionRequest) GetKeychainRef() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainRef -} - -// GetKeychainRefOk returns a tuple with the KeychainRef field value -// and a boolean to check if the value has been set. -func (o *SignTransactionRequest) GetKeychainRefOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainRef, true -} - -// SetKeychainRef sets field value -func (o *SignTransactionRequest) SetKeychainRef(v string) { - o.KeychainRef = v -} - -// GetTransactionHash returns the TransactionHash field value -func (o *SignTransactionRequest) GetTransactionHash() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionHash -} - -// GetTransactionHashOk returns a tuple with the TransactionHash field value -// and a boolean to check if the value has been set. -func (o *SignTransactionRequest) GetTransactionHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionHash, true -} - -// SetTransactionHash sets field value -func (o *SignTransactionRequest) SetTransactionHash(v string) { - o.TransactionHash = v -} - -func (o SignTransactionRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SignTransactionRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["keychainId"] = o.KeychainId - toSerialize["keychainRef"] = o.KeychainRef - toSerialize["transactionHash"] = o.TransactionHash - return toSerialize, nil -} - -type NullableSignTransactionRequest struct { - value *SignTransactionRequest - isSet bool -} - -func (v NullableSignTransactionRequest) Get() *SignTransactionRequest { - return v.value -} - -func (v *NullableSignTransactionRequest) Set(val *SignTransactionRequest) { - v.value = val - v.isSet = true -} - -func (v NullableSignTransactionRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableSignTransactionRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSignTransactionRequest(val *SignTransactionRequest) *NullableSignTransactionRequest { - return &NullableSignTransactionRequest{value: val, isSet: true} -} - -func (v NullableSignTransactionRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSignTransactionRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_sign_transaction_response.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_sign_transaction_response.go deleted file mode 100644 index 0624911e42..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_sign_transaction_response.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the SignTransactionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SignTransactionResponse{} - -// SignTransactionResponse struct for SignTransactionResponse -type SignTransactionResponse struct { - // The signatures of ledger from the corresponding transaction hash. - Signature string `json:"signature"` -} - -// NewSignTransactionResponse instantiates a new SignTransactionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSignTransactionResponse(signature string) *SignTransactionResponse { - this := SignTransactionResponse{} - this.Signature = signature - return &this -} - -// NewSignTransactionResponseWithDefaults instantiates a new SignTransactionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSignTransactionResponseWithDefaults() *SignTransactionResponse { - this := SignTransactionResponse{} - return &this -} - -// GetSignature returns the Signature field value -func (o *SignTransactionResponse) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *SignTransactionResponse) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *SignTransactionResponse) SetSignature(v string) { - o.Signature = v -} - -func (o SignTransactionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SignTransactionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["signature"] = o.Signature - return toSerialize, nil -} - -type NullableSignTransactionResponse struct { - value *SignTransactionResponse - isSet bool -} - -func (v NullableSignTransactionResponse) Get() *SignTransactionResponse { - return v.value -} - -func (v *NullableSignTransactionResponse) Set(val *SignTransactionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableSignTransactionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableSignTransactionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSignTransactionResponse(val *SignTransactionResponse) *NullableSignTransactionResponse { - return &NullableSignTransactionResponse{value: val, isSet: true} -} - -func (v NullableSignTransactionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSignTransactionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact.go deleted file mode 100644 index 910937984b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact.go +++ /dev/null @@ -1,441 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the SolidityContractJsonArtifact type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SolidityContractJsonArtifact{} - -// SolidityContractJsonArtifact struct for SolidityContractJsonArtifact -type SolidityContractJsonArtifact struct { - ContractName string `json:"contractName"` - Metadata *string `json:"metadata,omitempty"` - Bytecode *string `json:"bytecode,omitempty"` - DeployedBytecode *string `json:"deployedBytecode,omitempty"` - SourceMap *string `json:"sourceMap,omitempty"` - DeployedSourceMap *string `json:"deployedSourceMap,omitempty"` - SourcePath *string `json:"sourcePath,omitempty"` - Compiler *SolidityContractJsonArtifactCompiler `json:"compiler,omitempty"` - FunctionHashes map[string]interface{} `json:"functionHashes,omitempty"` - GasEstimates *SolidityContractJsonArtifactGasEstimates `json:"gasEstimates,omitempty"` -} - -// NewSolidityContractJsonArtifact instantiates a new SolidityContractJsonArtifact object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSolidityContractJsonArtifact(contractName string) *SolidityContractJsonArtifact { - this := SolidityContractJsonArtifact{} - this.ContractName = contractName - return &this -} - -// NewSolidityContractJsonArtifactWithDefaults instantiates a new SolidityContractJsonArtifact object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSolidityContractJsonArtifactWithDefaults() *SolidityContractJsonArtifact { - this := SolidityContractJsonArtifact{} - return &this -} - -// GetContractName returns the ContractName field value -func (o *SolidityContractJsonArtifact) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *SolidityContractJsonArtifact) SetContractName(v string) { - o.ContractName = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetMetadata() string { - if o == nil || IsNil(o.Metadata) { - var ret string - return ret - } - return *o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetMetadataOk() (*string, bool) { - if o == nil || IsNil(o.Metadata) { - return nil, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasMetadata() bool { - if o != nil && !IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given string and assigns it to the Metadata field. -func (o *SolidityContractJsonArtifact) SetMetadata(v string) { - o.Metadata = &v -} - -// GetBytecode returns the Bytecode field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetBytecode() string { - if o == nil || IsNil(o.Bytecode) { - var ret string - return ret - } - return *o.Bytecode -} - -// GetBytecodeOk returns a tuple with the Bytecode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetBytecodeOk() (*string, bool) { - if o == nil || IsNil(o.Bytecode) { - return nil, false - } - return o.Bytecode, true -} - -// HasBytecode returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasBytecode() bool { - if o != nil && !IsNil(o.Bytecode) { - return true - } - - return false -} - -// SetBytecode gets a reference to the given string and assigns it to the Bytecode field. -func (o *SolidityContractJsonArtifact) SetBytecode(v string) { - o.Bytecode = &v -} - -// GetDeployedBytecode returns the DeployedBytecode field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetDeployedBytecode() string { - if o == nil || IsNil(o.DeployedBytecode) { - var ret string - return ret - } - return *o.DeployedBytecode -} - -// GetDeployedBytecodeOk returns a tuple with the DeployedBytecode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetDeployedBytecodeOk() (*string, bool) { - if o == nil || IsNil(o.DeployedBytecode) { - return nil, false - } - return o.DeployedBytecode, true -} - -// HasDeployedBytecode returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasDeployedBytecode() bool { - if o != nil && !IsNil(o.DeployedBytecode) { - return true - } - - return false -} - -// SetDeployedBytecode gets a reference to the given string and assigns it to the DeployedBytecode field. -func (o *SolidityContractJsonArtifact) SetDeployedBytecode(v string) { - o.DeployedBytecode = &v -} - -// GetSourceMap returns the SourceMap field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetSourceMap() string { - if o == nil || IsNil(o.SourceMap) { - var ret string - return ret - } - return *o.SourceMap -} - -// GetSourceMapOk returns a tuple with the SourceMap field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetSourceMapOk() (*string, bool) { - if o == nil || IsNil(o.SourceMap) { - return nil, false - } - return o.SourceMap, true -} - -// HasSourceMap returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasSourceMap() bool { - if o != nil && !IsNil(o.SourceMap) { - return true - } - - return false -} - -// SetSourceMap gets a reference to the given string and assigns it to the SourceMap field. -func (o *SolidityContractJsonArtifact) SetSourceMap(v string) { - o.SourceMap = &v -} - -// GetDeployedSourceMap returns the DeployedSourceMap field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetDeployedSourceMap() string { - if o == nil || IsNil(o.DeployedSourceMap) { - var ret string - return ret - } - return *o.DeployedSourceMap -} - -// GetDeployedSourceMapOk returns a tuple with the DeployedSourceMap field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetDeployedSourceMapOk() (*string, bool) { - if o == nil || IsNil(o.DeployedSourceMap) { - return nil, false - } - return o.DeployedSourceMap, true -} - -// HasDeployedSourceMap returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasDeployedSourceMap() bool { - if o != nil && !IsNil(o.DeployedSourceMap) { - return true - } - - return false -} - -// SetDeployedSourceMap gets a reference to the given string and assigns it to the DeployedSourceMap field. -func (o *SolidityContractJsonArtifact) SetDeployedSourceMap(v string) { - o.DeployedSourceMap = &v -} - -// GetSourcePath returns the SourcePath field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetSourcePath() string { - if o == nil || IsNil(o.SourcePath) { - var ret string - return ret - } - return *o.SourcePath -} - -// GetSourcePathOk returns a tuple with the SourcePath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetSourcePathOk() (*string, bool) { - if o == nil || IsNil(o.SourcePath) { - return nil, false - } - return o.SourcePath, true -} - -// HasSourcePath returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasSourcePath() bool { - if o != nil && !IsNil(o.SourcePath) { - return true - } - - return false -} - -// SetSourcePath gets a reference to the given string and assigns it to the SourcePath field. -func (o *SolidityContractJsonArtifact) SetSourcePath(v string) { - o.SourcePath = &v -} - -// GetCompiler returns the Compiler field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetCompiler() SolidityContractJsonArtifactCompiler { - if o == nil || IsNil(o.Compiler) { - var ret SolidityContractJsonArtifactCompiler - return ret - } - return *o.Compiler -} - -// GetCompilerOk returns a tuple with the Compiler field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetCompilerOk() (*SolidityContractJsonArtifactCompiler, bool) { - if o == nil || IsNil(o.Compiler) { - return nil, false - } - return o.Compiler, true -} - -// HasCompiler returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasCompiler() bool { - if o != nil && !IsNil(o.Compiler) { - return true - } - - return false -} - -// SetCompiler gets a reference to the given SolidityContractJsonArtifactCompiler and assigns it to the Compiler field. -func (o *SolidityContractJsonArtifact) SetCompiler(v SolidityContractJsonArtifactCompiler) { - o.Compiler = &v -} - -// GetFunctionHashes returns the FunctionHashes field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetFunctionHashes() map[string]interface{} { - if o == nil || IsNil(o.FunctionHashes) { - var ret map[string]interface{} - return ret - } - return o.FunctionHashes -} - -// GetFunctionHashesOk returns a tuple with the FunctionHashes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetFunctionHashesOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.FunctionHashes) { - return map[string]interface{}{}, false - } - return o.FunctionHashes, true -} - -// HasFunctionHashes returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasFunctionHashes() bool { - if o != nil && !IsNil(o.FunctionHashes) { - return true - } - - return false -} - -// SetFunctionHashes gets a reference to the given map[string]interface{} and assigns it to the FunctionHashes field. -func (o *SolidityContractJsonArtifact) SetFunctionHashes(v map[string]interface{}) { - o.FunctionHashes = v -} - -// GetGasEstimates returns the GasEstimates field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetGasEstimates() SolidityContractJsonArtifactGasEstimates { - if o == nil || IsNil(o.GasEstimates) { - var ret SolidityContractJsonArtifactGasEstimates - return ret - } - return *o.GasEstimates -} - -// GetGasEstimatesOk returns a tuple with the GasEstimates field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetGasEstimatesOk() (*SolidityContractJsonArtifactGasEstimates, bool) { - if o == nil || IsNil(o.GasEstimates) { - return nil, false - } - return o.GasEstimates, true -} - -// HasGasEstimates returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasGasEstimates() bool { - if o != nil && !IsNil(o.GasEstimates) { - return true - } - - return false -} - -// SetGasEstimates gets a reference to the given SolidityContractJsonArtifactGasEstimates and assigns it to the GasEstimates field. -func (o *SolidityContractJsonArtifact) SetGasEstimates(v SolidityContractJsonArtifactGasEstimates) { - o.GasEstimates = &v -} - -func (o SolidityContractJsonArtifact) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SolidityContractJsonArtifact) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractName"] = o.ContractName - if !IsNil(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !IsNil(o.Bytecode) { - toSerialize["bytecode"] = o.Bytecode - } - if !IsNil(o.DeployedBytecode) { - toSerialize["deployedBytecode"] = o.DeployedBytecode - } - if !IsNil(o.SourceMap) { - toSerialize["sourceMap"] = o.SourceMap - } - if !IsNil(o.DeployedSourceMap) { - toSerialize["deployedSourceMap"] = o.DeployedSourceMap - } - if !IsNil(o.SourcePath) { - toSerialize["sourcePath"] = o.SourcePath - } - if !IsNil(o.Compiler) { - toSerialize["compiler"] = o.Compiler - } - if !IsNil(o.FunctionHashes) { - toSerialize["functionHashes"] = o.FunctionHashes - } - if !IsNil(o.GasEstimates) { - toSerialize["gasEstimates"] = o.GasEstimates - } - return toSerialize, nil -} - -type NullableSolidityContractJsonArtifact struct { - value *SolidityContractJsonArtifact - isSet bool -} - -func (v NullableSolidityContractJsonArtifact) Get() *SolidityContractJsonArtifact { - return v.value -} - -func (v *NullableSolidityContractJsonArtifact) Set(val *SolidityContractJsonArtifact) { - v.value = val - v.isSet = true -} - -func (v NullableSolidityContractJsonArtifact) IsSet() bool { - return v.isSet -} - -func (v *NullableSolidityContractJsonArtifact) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSolidityContractJsonArtifact(val *SolidityContractJsonArtifact) *NullableSolidityContractJsonArtifact { - return &NullableSolidityContractJsonArtifact{value: val, isSet: true} -} - -func (v NullableSolidityContractJsonArtifact) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSolidityContractJsonArtifact) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_compiler.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_compiler.go deleted file mode 100644 index 9447cbd801..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_compiler.go +++ /dev/null @@ -1,188 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the SolidityContractJsonArtifactCompiler type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SolidityContractJsonArtifactCompiler{} - -// SolidityContractJsonArtifactCompiler struct for SolidityContractJsonArtifactCompiler -type SolidityContractJsonArtifactCompiler struct { - Name *string `json:"name,omitempty"` - Version *string `json:"version,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _SolidityContractJsonArtifactCompiler SolidityContractJsonArtifactCompiler - -// NewSolidityContractJsonArtifactCompiler instantiates a new SolidityContractJsonArtifactCompiler object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSolidityContractJsonArtifactCompiler() *SolidityContractJsonArtifactCompiler { - this := SolidityContractJsonArtifactCompiler{} - return &this -} - -// NewSolidityContractJsonArtifactCompilerWithDefaults instantiates a new SolidityContractJsonArtifactCompiler object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSolidityContractJsonArtifactCompilerWithDefaults() *SolidityContractJsonArtifactCompiler { - this := SolidityContractJsonArtifactCompiler{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactCompiler) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactCompiler) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactCompiler) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *SolidityContractJsonArtifactCompiler) SetName(v string) { - o.Name = &v -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactCompiler) GetVersion() string { - if o == nil || IsNil(o.Version) { - var ret string - return ret - } - return *o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactCompiler) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactCompiler) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *SolidityContractJsonArtifactCompiler) SetVersion(v string) { - o.Version = &v -} - -func (o SolidityContractJsonArtifactCompiler) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SolidityContractJsonArtifactCompiler) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *SolidityContractJsonArtifactCompiler) UnmarshalJSON(bytes []byte) (err error) { - varSolidityContractJsonArtifactCompiler := _SolidityContractJsonArtifactCompiler{} - - if err = json.Unmarshal(bytes, &varSolidityContractJsonArtifactCompiler); err == nil { - *o = SolidityContractJsonArtifactCompiler(varSolidityContractJsonArtifactCompiler) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "name") - delete(additionalProperties, "version") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableSolidityContractJsonArtifactCompiler struct { - value *SolidityContractJsonArtifactCompiler - isSet bool -} - -func (v NullableSolidityContractJsonArtifactCompiler) Get() *SolidityContractJsonArtifactCompiler { - return v.value -} - -func (v *NullableSolidityContractJsonArtifactCompiler) Set(val *SolidityContractJsonArtifactCompiler) { - v.value = val - v.isSet = true -} - -func (v NullableSolidityContractJsonArtifactCompiler) IsSet() bool { - return v.isSet -} - -func (v *NullableSolidityContractJsonArtifactCompiler) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSolidityContractJsonArtifactCompiler(val *SolidityContractJsonArtifactCompiler) *NullableSolidityContractJsonArtifactCompiler { - return &NullableSolidityContractJsonArtifactCompiler{value: val, isSet: true} -} - -func (v NullableSolidityContractJsonArtifactCompiler) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSolidityContractJsonArtifactCompiler) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates.go deleted file mode 100644 index 6db1cb0eb8..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the SolidityContractJsonArtifactGasEstimates type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SolidityContractJsonArtifactGasEstimates{} - -// SolidityContractJsonArtifactGasEstimates struct for SolidityContractJsonArtifactGasEstimates -type SolidityContractJsonArtifactGasEstimates struct { - Creation *SolidityContractJsonArtifactGasEstimatesCreation `json:"creation,omitempty"` - External map[string]interface{} `json:"external,omitempty"` -} - -// NewSolidityContractJsonArtifactGasEstimates instantiates a new SolidityContractJsonArtifactGasEstimates object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSolidityContractJsonArtifactGasEstimates() *SolidityContractJsonArtifactGasEstimates { - this := SolidityContractJsonArtifactGasEstimates{} - return &this -} - -// NewSolidityContractJsonArtifactGasEstimatesWithDefaults instantiates a new SolidityContractJsonArtifactGasEstimates object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSolidityContractJsonArtifactGasEstimatesWithDefaults() *SolidityContractJsonArtifactGasEstimates { - this := SolidityContractJsonArtifactGasEstimates{} - return &this -} - -// GetCreation returns the Creation field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactGasEstimates) GetCreation() SolidityContractJsonArtifactGasEstimatesCreation { - if o == nil || IsNil(o.Creation) { - var ret SolidityContractJsonArtifactGasEstimatesCreation - return ret - } - return *o.Creation -} - -// GetCreationOk returns a tuple with the Creation field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactGasEstimates) GetCreationOk() (*SolidityContractJsonArtifactGasEstimatesCreation, bool) { - if o == nil || IsNil(o.Creation) { - return nil, false - } - return o.Creation, true -} - -// HasCreation returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactGasEstimates) HasCreation() bool { - if o != nil && !IsNil(o.Creation) { - return true - } - - return false -} - -// SetCreation gets a reference to the given SolidityContractJsonArtifactGasEstimatesCreation and assigns it to the Creation field. -func (o *SolidityContractJsonArtifactGasEstimates) SetCreation(v SolidityContractJsonArtifactGasEstimatesCreation) { - o.Creation = &v -} - -// GetExternal returns the External field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactGasEstimates) GetExternal() map[string]interface{} { - if o == nil || IsNil(o.External) { - var ret map[string]interface{} - return ret - } - return o.External -} - -// GetExternalOk returns a tuple with the External field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactGasEstimates) GetExternalOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.External) { - return map[string]interface{}{}, false - } - return o.External, true -} - -// HasExternal returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactGasEstimates) HasExternal() bool { - if o != nil && !IsNil(o.External) { - return true - } - - return false -} - -// SetExternal gets a reference to the given map[string]interface{} and assigns it to the External field. -func (o *SolidityContractJsonArtifactGasEstimates) SetExternal(v map[string]interface{}) { - o.External = v -} - -func (o SolidityContractJsonArtifactGasEstimates) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SolidityContractJsonArtifactGasEstimates) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Creation) { - toSerialize["creation"] = o.Creation - } - if !IsNil(o.External) { - toSerialize["external"] = o.External - } - return toSerialize, nil -} - -type NullableSolidityContractJsonArtifactGasEstimates struct { - value *SolidityContractJsonArtifactGasEstimates - isSet bool -} - -func (v NullableSolidityContractJsonArtifactGasEstimates) Get() *SolidityContractJsonArtifactGasEstimates { - return v.value -} - -func (v *NullableSolidityContractJsonArtifactGasEstimates) Set(val *SolidityContractJsonArtifactGasEstimates) { - v.value = val - v.isSet = true -} - -func (v NullableSolidityContractJsonArtifactGasEstimates) IsSet() bool { - return v.isSet -} - -func (v *NullableSolidityContractJsonArtifactGasEstimates) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSolidityContractJsonArtifactGasEstimates(val *SolidityContractJsonArtifactGasEstimates) *NullableSolidityContractJsonArtifactGasEstimates { - return &NullableSolidityContractJsonArtifactGasEstimates{value: val, isSet: true} -} - -func (v NullableSolidityContractJsonArtifactGasEstimates) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSolidityContractJsonArtifactGasEstimates) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates_creation.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates_creation.go deleted file mode 100644 index 6a4ad4f235..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates_creation.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the SolidityContractJsonArtifactGasEstimatesCreation type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SolidityContractJsonArtifactGasEstimatesCreation{} - -// SolidityContractJsonArtifactGasEstimatesCreation struct for SolidityContractJsonArtifactGasEstimatesCreation -type SolidityContractJsonArtifactGasEstimatesCreation struct { - CodeDepositCost *string `json:"codeDepositCost,omitempty"` - ExecutionCost *string `json:"executionCost,omitempty"` - TotalCost *string `json:"totalCost,omitempty"` -} - -// NewSolidityContractJsonArtifactGasEstimatesCreation instantiates a new SolidityContractJsonArtifactGasEstimatesCreation object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSolidityContractJsonArtifactGasEstimatesCreation() *SolidityContractJsonArtifactGasEstimatesCreation { - this := SolidityContractJsonArtifactGasEstimatesCreation{} - return &this -} - -// NewSolidityContractJsonArtifactGasEstimatesCreationWithDefaults instantiates a new SolidityContractJsonArtifactGasEstimatesCreation object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSolidityContractJsonArtifactGasEstimatesCreationWithDefaults() *SolidityContractJsonArtifactGasEstimatesCreation { - this := SolidityContractJsonArtifactGasEstimatesCreation{} - return &this -} - -// GetCodeDepositCost returns the CodeDepositCost field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetCodeDepositCost() string { - if o == nil || IsNil(o.CodeDepositCost) { - var ret string - return ret - } - return *o.CodeDepositCost -} - -// GetCodeDepositCostOk returns a tuple with the CodeDepositCost field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetCodeDepositCostOk() (*string, bool) { - if o == nil || IsNil(o.CodeDepositCost) { - return nil, false - } - return o.CodeDepositCost, true -} - -// HasCodeDepositCost returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) HasCodeDepositCost() bool { - if o != nil && !IsNil(o.CodeDepositCost) { - return true - } - - return false -} - -// SetCodeDepositCost gets a reference to the given string and assigns it to the CodeDepositCost field. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) SetCodeDepositCost(v string) { - o.CodeDepositCost = &v -} - -// GetExecutionCost returns the ExecutionCost field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetExecutionCost() string { - if o == nil || IsNil(o.ExecutionCost) { - var ret string - return ret - } - return *o.ExecutionCost -} - -// GetExecutionCostOk returns a tuple with the ExecutionCost field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetExecutionCostOk() (*string, bool) { - if o == nil || IsNil(o.ExecutionCost) { - return nil, false - } - return o.ExecutionCost, true -} - -// HasExecutionCost returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) HasExecutionCost() bool { - if o != nil && !IsNil(o.ExecutionCost) { - return true - } - - return false -} - -// SetExecutionCost gets a reference to the given string and assigns it to the ExecutionCost field. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) SetExecutionCost(v string) { - o.ExecutionCost = &v -} - -// GetTotalCost returns the TotalCost field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetTotalCost() string { - if o == nil || IsNil(o.TotalCost) { - var ret string - return ret - } - return *o.TotalCost -} - -// GetTotalCostOk returns a tuple with the TotalCost field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetTotalCostOk() (*string, bool) { - if o == nil || IsNil(o.TotalCost) { - return nil, false - } - return o.TotalCost, true -} - -// HasTotalCost returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) HasTotalCost() bool { - if o != nil && !IsNil(o.TotalCost) { - return true - } - - return false -} - -// SetTotalCost gets a reference to the given string and assigns it to the TotalCost field. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) SetTotalCost(v string) { - o.TotalCost = &v -} - -func (o SolidityContractJsonArtifactGasEstimatesCreation) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SolidityContractJsonArtifactGasEstimatesCreation) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CodeDepositCost) { - toSerialize["codeDepositCost"] = o.CodeDepositCost - } - if !IsNil(o.ExecutionCost) { - toSerialize["executionCost"] = o.ExecutionCost - } - if !IsNil(o.TotalCost) { - toSerialize["totalCost"] = o.TotalCost - } - return toSerialize, nil -} - -type NullableSolidityContractJsonArtifactGasEstimatesCreation struct { - value *SolidityContractJsonArtifactGasEstimatesCreation - isSet bool -} - -func (v NullableSolidityContractJsonArtifactGasEstimatesCreation) Get() *SolidityContractJsonArtifactGasEstimatesCreation { - return v.value -} - -func (v *NullableSolidityContractJsonArtifactGasEstimatesCreation) Set(val *SolidityContractJsonArtifactGasEstimatesCreation) { - v.value = val - v.isSet = true -} - -func (v NullableSolidityContractJsonArtifactGasEstimatesCreation) IsSet() bool { - return v.isSet -} - -func (v *NullableSolidityContractJsonArtifactGasEstimatesCreation) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSolidityContractJsonArtifactGasEstimatesCreation(val *SolidityContractJsonArtifactGasEstimatesCreation) *NullableSolidityContractJsonArtifactGasEstimatesCreation { - return &NullableSolidityContractJsonArtifactGasEstimatesCreation{value: val, isSet: true} -} - -func (v NullableSolidityContractJsonArtifactGasEstimatesCreation) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSolidityContractJsonArtifactGasEstimatesCreation) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go deleted file mode 100644 index 5a9381e73e..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksV1 the model 'WatchBlocksV1' -type WatchBlocksV1 string - -// List of WatchBlocksV1 -const ( - Subscribe WatchBlocksV1 = "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Subscribe" - Next WatchBlocksV1 = "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Next" - Unsubscribe WatchBlocksV1 = "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Unsubscribe" - Error WatchBlocksV1 = "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Error" - Complete WatchBlocksV1 = "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Complete" -) - -// All allowed values of WatchBlocksV1 enum -var AllowedWatchBlocksV1EnumValues = []WatchBlocksV1{ - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Subscribe", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Next", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Error", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Complete", -} - -func (v *WatchBlocksV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := WatchBlocksV1(value) - for _, existing := range AllowedWatchBlocksV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WatchBlocksV1", value) -} - -// NewWatchBlocksV1FromValue returns a pointer to a valid WatchBlocksV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWatchBlocksV1FromValue(v string) (*WatchBlocksV1, error) { - ev := WatchBlocksV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WatchBlocksV1: valid values are %v", v, AllowedWatchBlocksV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v WatchBlocksV1) IsValid() bool { - for _, existing := range AllowedWatchBlocksV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WatchBlocksV1 value -func (v WatchBlocksV1) Ptr() *WatchBlocksV1 { - return &v -} - -type NullableWatchBlocksV1 struct { - value *WatchBlocksV1 - isSet bool -} - -func (v NullableWatchBlocksV1) Get() *WatchBlocksV1 { - return v.value -} - -func (v *NullableWatchBlocksV1) Set(val *WatchBlocksV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1(val *WatchBlocksV1) *NullableWatchBlocksV1 { - return &NullableWatchBlocksV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_progress.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_progress.go deleted file mode 100644 index df071773a4..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_progress.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the WatchBlocksV1Progress type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksV1Progress{} - -// WatchBlocksV1Progress struct for WatchBlocksV1Progress -type WatchBlocksV1Progress struct { - BlockHeader Web3BlockHeader `json:"blockHeader"` -} - -// NewWatchBlocksV1Progress instantiates a new WatchBlocksV1Progress object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksV1Progress(blockHeader Web3BlockHeader) *WatchBlocksV1Progress { - this := WatchBlocksV1Progress{} - this.BlockHeader = blockHeader - return &this -} - -// NewWatchBlocksV1ProgressWithDefaults instantiates a new WatchBlocksV1Progress object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksV1ProgressWithDefaults() *WatchBlocksV1Progress { - this := WatchBlocksV1Progress{} - return &this -} - -// GetBlockHeader returns the BlockHeader field value -func (o *WatchBlocksV1Progress) GetBlockHeader() Web3BlockHeader { - if o == nil { - var ret Web3BlockHeader - return ret - } - - return o.BlockHeader -} - -// GetBlockHeaderOk returns a tuple with the BlockHeader field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1Progress) GetBlockHeaderOk() (*Web3BlockHeader, bool) { - if o == nil { - return nil, false - } - return &o.BlockHeader, true -} - -// SetBlockHeader sets field value -func (o *WatchBlocksV1Progress) SetBlockHeader(v Web3BlockHeader) { - o.BlockHeader = v -} - -func (o WatchBlocksV1Progress) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksV1Progress) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["blockHeader"] = o.BlockHeader - return toSerialize, nil -} - -type NullableWatchBlocksV1Progress struct { - value *WatchBlocksV1Progress - isSet bool -} - -func (v NullableWatchBlocksV1Progress) Get() *WatchBlocksV1Progress { - return v.value -} - -func (v *NullableWatchBlocksV1Progress) Set(val *WatchBlocksV1Progress) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1Progress) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1Progress) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1Progress(val *WatchBlocksV1Progress) *NullableWatchBlocksV1Progress { - return &NullableWatchBlocksV1Progress{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1Progress) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1Progress) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_request.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_request.go deleted file mode 100644 index aa70fd6250..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_request.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the WatchBlocksV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksV1Request{} - -// WatchBlocksV1Request struct for WatchBlocksV1Request -type WatchBlocksV1Request struct { - Event WatchBlocksV1 `json:"event"` -} - -// NewWatchBlocksV1Request instantiates a new WatchBlocksV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksV1Request(event WatchBlocksV1) *WatchBlocksV1Request { - this := WatchBlocksV1Request{} - this.Event = event - return &this -} - -// NewWatchBlocksV1RequestWithDefaults instantiates a new WatchBlocksV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksV1RequestWithDefaults() *WatchBlocksV1Request { - this := WatchBlocksV1Request{} - return &this -} - -// GetEvent returns the Event field value -func (o *WatchBlocksV1Request) GetEvent() WatchBlocksV1 { - if o == nil { - var ret WatchBlocksV1 - return ret - } - - return o.Event -} - -// GetEventOk returns a tuple with the Event field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1Request) GetEventOk() (*WatchBlocksV1, bool) { - if o == nil { - return nil, false - } - return &o.Event, true -} - -// SetEvent sets field value -func (o *WatchBlocksV1Request) SetEvent(v WatchBlocksV1) { - o.Event = v -} - -func (o WatchBlocksV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["event"] = o.Event - return toSerialize, nil -} - -type NullableWatchBlocksV1Request struct { - value *WatchBlocksV1Request - isSet bool -} - -func (v NullableWatchBlocksV1Request) Get() *WatchBlocksV1Request { - return v.value -} - -func (v *NullableWatchBlocksV1Request) Set(val *WatchBlocksV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1Request(val *WatchBlocksV1Request) *NullableWatchBlocksV1Request { - return &NullableWatchBlocksV1Request{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_block_header.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_block_header.go deleted file mode 100644 index 210b70846f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_block_header.go +++ /dev/null @@ -1,468 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the Web3BlockHeader type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3BlockHeader{} - -// Web3BlockHeader struct for Web3BlockHeader -type Web3BlockHeader struct { - Number float32 `json:"number"` - Hash string `json:"hash"` - ParentHash string `json:"parentHash"` - Nonce string `json:"nonce"` - Sha3Uncles string `json:"sha3Uncles"` - LogsBloom string `json:"logsBloom"` - TransactionRoot string `json:"transactionRoot"` - StateRoot string `json:"stateRoot"` - ReceiptRoot string `json:"receiptRoot"` - Miner string `json:"miner"` - ExtraData string `json:"extraData"` - GasLimit int32 `json:"gasLimit"` - GasUsed int32 `json:"gasUsed"` - Timestamp Web3BlockHeaderTimestamp `json:"timestamp"` -} - -// NewWeb3BlockHeader instantiates a new Web3BlockHeader object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3BlockHeader(number float32, hash string, parentHash string, nonce string, sha3Uncles string, logsBloom string, transactionRoot string, stateRoot string, receiptRoot string, miner string, extraData string, gasLimit int32, gasUsed int32, timestamp Web3BlockHeaderTimestamp) *Web3BlockHeader { - this := Web3BlockHeader{} - this.Number = number - this.Hash = hash - this.ParentHash = parentHash - this.Nonce = nonce - this.Sha3Uncles = sha3Uncles - this.LogsBloom = logsBloom - this.TransactionRoot = transactionRoot - this.StateRoot = stateRoot - this.ReceiptRoot = receiptRoot - this.Miner = miner - this.ExtraData = extraData - this.GasLimit = gasLimit - this.GasUsed = gasUsed - this.Timestamp = timestamp - return &this -} - -// NewWeb3BlockHeaderWithDefaults instantiates a new Web3BlockHeader object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3BlockHeaderWithDefaults() *Web3BlockHeader { - this := Web3BlockHeader{} - return &this -} - -// GetNumber returns the Number field value -func (o *Web3BlockHeader) GetNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Number -} - -// GetNumberOk returns a tuple with the Number field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Number, true -} - -// SetNumber sets field value -func (o *Web3BlockHeader) SetNumber(v float32) { - o.Number = v -} - -// GetHash returns the Hash field value -func (o *Web3BlockHeader) GetHash() string { - if o == nil { - var ret string - return ret - } - - return o.Hash -} - -// GetHashOk returns a tuple with the Hash field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Hash, true -} - -// SetHash sets field value -func (o *Web3BlockHeader) SetHash(v string) { - o.Hash = v -} - -// GetParentHash returns the ParentHash field value -func (o *Web3BlockHeader) GetParentHash() string { - if o == nil { - var ret string - return ret - } - - return o.ParentHash -} - -// GetParentHashOk returns a tuple with the ParentHash field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetParentHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ParentHash, true -} - -// SetParentHash sets field value -func (o *Web3BlockHeader) SetParentHash(v string) { - o.ParentHash = v -} - -// GetNonce returns the Nonce field value -func (o *Web3BlockHeader) GetNonce() string { - if o == nil { - var ret string - return ret - } - - return o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetNonceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Nonce, true -} - -// SetNonce sets field value -func (o *Web3BlockHeader) SetNonce(v string) { - o.Nonce = v -} - -// GetSha3Uncles returns the Sha3Uncles field value -func (o *Web3BlockHeader) GetSha3Uncles() string { - if o == nil { - var ret string - return ret - } - - return o.Sha3Uncles -} - -// GetSha3UnclesOk returns a tuple with the Sha3Uncles field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetSha3UnclesOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Sha3Uncles, true -} - -// SetSha3Uncles sets field value -func (o *Web3BlockHeader) SetSha3Uncles(v string) { - o.Sha3Uncles = v -} - -// GetLogsBloom returns the LogsBloom field value -func (o *Web3BlockHeader) GetLogsBloom() string { - if o == nil { - var ret string - return ret - } - - return o.LogsBloom -} - -// GetLogsBloomOk returns a tuple with the LogsBloom field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetLogsBloomOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LogsBloom, true -} - -// SetLogsBloom sets field value -func (o *Web3BlockHeader) SetLogsBloom(v string) { - o.LogsBloom = v -} - -// GetTransactionRoot returns the TransactionRoot field value -func (o *Web3BlockHeader) GetTransactionRoot() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionRoot -} - -// GetTransactionRootOk returns a tuple with the TransactionRoot field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetTransactionRootOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionRoot, true -} - -// SetTransactionRoot sets field value -func (o *Web3BlockHeader) SetTransactionRoot(v string) { - o.TransactionRoot = v -} - -// GetStateRoot returns the StateRoot field value -func (o *Web3BlockHeader) GetStateRoot() string { - if o == nil { - var ret string - return ret - } - - return o.StateRoot -} - -// GetStateRootOk returns a tuple with the StateRoot field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetStateRootOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StateRoot, true -} - -// SetStateRoot sets field value -func (o *Web3BlockHeader) SetStateRoot(v string) { - o.StateRoot = v -} - -// GetReceiptRoot returns the ReceiptRoot field value -func (o *Web3BlockHeader) GetReceiptRoot() string { - if o == nil { - var ret string - return ret - } - - return o.ReceiptRoot -} - -// GetReceiptRootOk returns a tuple with the ReceiptRoot field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetReceiptRootOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ReceiptRoot, true -} - -// SetReceiptRoot sets field value -func (o *Web3BlockHeader) SetReceiptRoot(v string) { - o.ReceiptRoot = v -} - -// GetMiner returns the Miner field value -func (o *Web3BlockHeader) GetMiner() string { - if o == nil { - var ret string - return ret - } - - return o.Miner -} - -// GetMinerOk returns a tuple with the Miner field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetMinerOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Miner, true -} - -// SetMiner sets field value -func (o *Web3BlockHeader) SetMiner(v string) { - o.Miner = v -} - -// GetExtraData returns the ExtraData field value -func (o *Web3BlockHeader) GetExtraData() string { - if o == nil { - var ret string - return ret - } - - return o.ExtraData -} - -// GetExtraDataOk returns a tuple with the ExtraData field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetExtraDataOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ExtraData, true -} - -// SetExtraData sets field value -func (o *Web3BlockHeader) SetExtraData(v string) { - o.ExtraData = v -} - -// GetGasLimit returns the GasLimit field value -func (o *Web3BlockHeader) GetGasLimit() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.GasLimit -} - -// GetGasLimitOk returns a tuple with the GasLimit field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetGasLimitOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.GasLimit, true -} - -// SetGasLimit sets field value -func (o *Web3BlockHeader) SetGasLimit(v int32) { - o.GasLimit = v -} - -// GetGasUsed returns the GasUsed field value -func (o *Web3BlockHeader) GetGasUsed() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.GasUsed -} - -// GetGasUsedOk returns a tuple with the GasUsed field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetGasUsedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.GasUsed, true -} - -// SetGasUsed sets field value -func (o *Web3BlockHeader) SetGasUsed(v int32) { - o.GasUsed = v -} - -// GetTimestamp returns the Timestamp field value -func (o *Web3BlockHeader) GetTimestamp() Web3BlockHeaderTimestamp { - if o == nil { - var ret Web3BlockHeaderTimestamp - return ret - } - - return o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetTimestampOk() (*Web3BlockHeaderTimestamp, bool) { - if o == nil { - return nil, false - } - return &o.Timestamp, true -} - -// SetTimestamp sets field value -func (o *Web3BlockHeader) SetTimestamp(v Web3BlockHeaderTimestamp) { - o.Timestamp = v -} - -func (o Web3BlockHeader) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3BlockHeader) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["number"] = o.Number - toSerialize["hash"] = o.Hash - toSerialize["parentHash"] = o.ParentHash - toSerialize["nonce"] = o.Nonce - toSerialize["sha3Uncles"] = o.Sha3Uncles - toSerialize["logsBloom"] = o.LogsBloom - toSerialize["transactionRoot"] = o.TransactionRoot - toSerialize["stateRoot"] = o.StateRoot - toSerialize["receiptRoot"] = o.ReceiptRoot - toSerialize["miner"] = o.Miner - toSerialize["extraData"] = o.ExtraData - toSerialize["gasLimit"] = o.GasLimit - toSerialize["gasUsed"] = o.GasUsed - toSerialize["timestamp"] = o.Timestamp - return toSerialize, nil -} - -type NullableWeb3BlockHeader struct { - value *Web3BlockHeader - isSet bool -} - -func (v NullableWeb3BlockHeader) Get() *Web3BlockHeader { - return v.value -} - -func (v *NullableWeb3BlockHeader) Set(val *Web3BlockHeader) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3BlockHeader) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3BlockHeader) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3BlockHeader(val *Web3BlockHeader) *NullableWeb3BlockHeader { - return &NullableWeb3BlockHeader{value: val, isSet: true} -} - -func (v NullableWeb3BlockHeader) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3BlockHeader) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_block_header_timestamp.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_block_header_timestamp.go deleted file mode 100644 index f9fc7a8ea7..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_block_header_timestamp.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" - "fmt" -) - -// Web3BlockHeaderTimestamp - struct for Web3BlockHeaderTimestamp -type Web3BlockHeaderTimestamp struct { - Float32 *float32 - String *string -} - -// float32AsWeb3BlockHeaderTimestamp is a convenience function that returns float32 wrapped in Web3BlockHeaderTimestamp -func Float32AsWeb3BlockHeaderTimestamp(v *float32) Web3BlockHeaderTimestamp { - return Web3BlockHeaderTimestamp{ - Float32: v, - } -} - -// stringAsWeb3BlockHeaderTimestamp is a convenience function that returns string wrapped in Web3BlockHeaderTimestamp -func StringAsWeb3BlockHeaderTimestamp(v *string) Web3BlockHeaderTimestamp { - return Web3BlockHeaderTimestamp{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *Web3BlockHeaderTimestamp) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Float32 - err = newStrictDecoder(data).Decode(&dst.Float32) - if err == nil { - jsonFloat32, _ := json.Marshal(dst.Float32) - if string(jsonFloat32) == "{}" { // empty struct - dst.Float32 = nil - } else { - match++ - } - } else { - dst.Float32 = nil - } - - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Float32 = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(Web3BlockHeaderTimestamp)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(Web3BlockHeaderTimestamp)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src Web3BlockHeaderTimestamp) MarshalJSON() ([]byte, error) { - if src.Float32 != nil { - return json.Marshal(&src.Float32) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *Web3BlockHeaderTimestamp) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Float32 != nil { - return obj.Float32 - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableWeb3BlockHeaderTimestamp struct { - value *Web3BlockHeaderTimestamp - isSet bool -} - -func (v NullableWeb3BlockHeaderTimestamp) Get() *Web3BlockHeaderTimestamp { - return v.value -} - -func (v *NullableWeb3BlockHeaderTimestamp) Set(val *Web3BlockHeaderTimestamp) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3BlockHeaderTimestamp) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3BlockHeaderTimestamp) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3BlockHeaderTimestamp(val *Web3BlockHeaderTimestamp) *NullableWeb3BlockHeaderTimestamp { - return &NullableWeb3BlockHeaderTimestamp{value: val, isSet: true} -} - -func (v NullableWeb3BlockHeaderTimestamp) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3BlockHeaderTimestamp) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go deleted file mode 100644 index 38054adfcb..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredential - struct for Web3SigningCredential -type Web3SigningCredential struct { - Web3SigningCredentialCactusKeychainRef *Web3SigningCredentialCactusKeychainRef - Web3SigningCredentialNone *Web3SigningCredentialNone - Web3SigningCredentialPrivateKeyHex *Web3SigningCredentialPrivateKeyHex -} - -// Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialCactusKeychainRef wrapped in Web3SigningCredential -func Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential(v *Web3SigningCredentialCactusKeychainRef) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialCactusKeychainRef: v, - } -} - -// Web3SigningCredentialNoneAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialNone wrapped in Web3SigningCredential -func Web3SigningCredentialNoneAsWeb3SigningCredential(v *Web3SigningCredentialNone) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialNone: v, - } -} - -// Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialPrivateKeyHex wrapped in Web3SigningCredential -func Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential(v *Web3SigningCredentialPrivateKeyHex) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialPrivateKeyHex: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *Web3SigningCredential) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Web3SigningCredentialCactusKeychainRef - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialCactusKeychainRef) - if err == nil { - jsonWeb3SigningCredentialCactusKeychainRef, _ := json.Marshal(dst.Web3SigningCredentialCactusKeychainRef) - if string(jsonWeb3SigningCredentialCactusKeychainRef) == "{}" { // empty struct - dst.Web3SigningCredentialCactusKeychainRef = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialCactusKeychainRef = nil - } - - // try to unmarshal data into Web3SigningCredentialNone - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialNone) - if err == nil { - jsonWeb3SigningCredentialNone, _ := json.Marshal(dst.Web3SigningCredentialNone) - if string(jsonWeb3SigningCredentialNone) == "{}" { // empty struct - dst.Web3SigningCredentialNone = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialNone = nil - } - - // try to unmarshal data into Web3SigningCredentialPrivateKeyHex - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialPrivateKeyHex) - if err == nil { - jsonWeb3SigningCredentialPrivateKeyHex, _ := json.Marshal(dst.Web3SigningCredentialPrivateKeyHex) - if string(jsonWeb3SigningCredentialPrivateKeyHex) == "{}" { // empty struct - dst.Web3SigningCredentialPrivateKeyHex = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialPrivateKeyHex = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Web3SigningCredentialCactusKeychainRef = nil - dst.Web3SigningCredentialNone = nil - dst.Web3SigningCredentialPrivateKeyHex = nil - - return fmt.Errorf("data matches more than one schema in oneOf(Web3SigningCredential)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(Web3SigningCredential)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src Web3SigningCredential) MarshalJSON() ([]byte, error) { - if src.Web3SigningCredentialCactusKeychainRef != nil { - return json.Marshal(&src.Web3SigningCredentialCactusKeychainRef) - } - - if src.Web3SigningCredentialNone != nil { - return json.Marshal(&src.Web3SigningCredentialNone) - } - - if src.Web3SigningCredentialPrivateKeyHex != nil { - return json.Marshal(&src.Web3SigningCredentialPrivateKeyHex) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *Web3SigningCredential) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Web3SigningCredentialCactusKeychainRef != nil { - return obj.Web3SigningCredentialCactusKeychainRef - } - - if obj.Web3SigningCredentialNone != nil { - return obj.Web3SigningCredentialNone - } - - if obj.Web3SigningCredentialPrivateKeyHex != nil { - return obj.Web3SigningCredentialPrivateKeyHex - } - - // all schemas are nil - return nil -} - -type NullableWeb3SigningCredential struct { - value *Web3SigningCredential - isSet bool -} - -func (v NullableWeb3SigningCredential) Get() *Web3SigningCredential { - return v.value -} - -func (v *NullableWeb3SigningCredential) Set(val *Web3SigningCredential) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredential) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredential) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredential(val *Web3SigningCredential) *NullableWeb3SigningCredential { - return &NullableWeb3SigningCredential{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredential) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredential) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go deleted file mode 100644 index 0b1dd9c930..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialCactusKeychainRef type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialCactusKeychainRef{} - -// Web3SigningCredentialCactusKeychainRef struct for Web3SigningCredentialCactusKeychainRef -type Web3SigningCredentialCactusKeychainRef struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - KeychainEntryKey string `json:"keychainEntryKey"` - // The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - KeychainId string `json:"keychainId"` -} - -// NewWeb3SigningCredentialCactusKeychainRef instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialCactusKeychainRef(type_ Web3SigningCredentialType, ethAccount string, keychainEntryKey string, keychainId string) *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - this.Type = type_ - this.EthAccount = ethAccount - this.KeychainEntryKey = keychainEntryKey - this.KeychainId = keychainId - return &this -} - -// NewWeb3SigningCredentialCactusKeychainRefWithDefaults instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialCactusKeychainRefWithDefaults() *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialCactusKeychainRef) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialCactusKeychainRef) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetKeychainEntryKey returns the KeychainEntryKey field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKey() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainEntryKey -} - -// GetKeychainEntryKeyOk returns a tuple with the KeychainEntryKey field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainEntryKey, true -} - -// SetKeychainEntryKey sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainEntryKey(v string) { - o.KeychainEntryKey = v -} - -// GetKeychainId returns the KeychainId field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o Web3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialCactusKeychainRef) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["keychainEntryKey"] = o.KeychainEntryKey - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableWeb3SigningCredentialCactusKeychainRef struct { - value *Web3SigningCredentialCactusKeychainRef - isSet bool -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) Get() *Web3SigningCredentialCactusKeychainRef { - return v.value -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Set(val *Web3SigningCredentialCactusKeychainRef) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialCactusKeychainRef(val *Web3SigningCredentialCactusKeychainRef) *NullableWeb3SigningCredentialCactusKeychainRef { - return &NullableWeb3SigningCredentialCactusKeychainRef{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go deleted file mode 100644 index 1abe727538..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialNone type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialNone{} - -// Web3SigningCredentialNone Using this denotes that there is no signing required because the transaction is pre-signed. -type Web3SigningCredentialNone struct { - Type Web3SigningCredentialType `json:"type"` -} - -// NewWeb3SigningCredentialNone instantiates a new Web3SigningCredentialNone object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialNone(type_ Web3SigningCredentialType) *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - this.Type = type_ - return &this -} - -// NewWeb3SigningCredentialNoneWithDefaults instantiates a new Web3SigningCredentialNone object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialNoneWithDefaults() *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialNone) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialNone) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialNone) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -func (o Web3SigningCredentialNone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialNone) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableWeb3SigningCredentialNone struct { - value *Web3SigningCredentialNone - isSet bool -} - -func (v NullableWeb3SigningCredentialNone) Get() *Web3SigningCredentialNone { - return v.value -} - -func (v *NullableWeb3SigningCredentialNone) Set(val *Web3SigningCredentialNone) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialNone) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialNone) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialNone(val *Web3SigningCredentialNone) *NullableWeb3SigningCredentialNone { - return &NullableWeb3SigningCredentialNone{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialNone) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialNone) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go deleted file mode 100644 index 968632274e..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialPrivateKeyHex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialPrivateKeyHex{} - -// Web3SigningCredentialPrivateKeyHex struct for Web3SigningCredentialPrivateKeyHex -type Web3SigningCredentialPrivateKeyHex struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The HEX encoded private key of an eth account. - Secret string `json:"secret"` -} - -// NewWeb3SigningCredentialPrivateKeyHex instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialPrivateKeyHex(type_ Web3SigningCredentialType, ethAccount string, secret string) *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - this.Type = type_ - this.EthAccount = ethAccount - this.Secret = secret - return &this -} - -// NewWeb3SigningCredentialPrivateKeyHexWithDefaults instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialPrivateKeyHexWithDefaults() *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialPrivateKeyHex) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetSecret returns the Secret field value -func (o *Web3SigningCredentialPrivateKeyHex) GetSecret() string { - if o == nil { - var ret string - return ret - } - - return o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetSecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Secret, true -} - -// SetSecret sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetSecret(v string) { - o.Secret = v -} - -func (o Web3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialPrivateKeyHex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["secret"] = o.Secret - return toSerialize, nil -} - -type NullableWeb3SigningCredentialPrivateKeyHex struct { - value *Web3SigningCredentialPrivateKeyHex - isSet bool -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) Get() *Web3SigningCredentialPrivateKeyHex { - return v.value -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Set(val *Web3SigningCredentialPrivateKeyHex) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialPrivateKeyHex(val *Web3SigningCredentialPrivateKeyHex) *NullableWeb3SigningCredentialPrivateKeyHex { - return &NullableWeb3SigningCredentialPrivateKeyHex{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go deleted file mode 100644 index 4ed8458935..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredentialType the model 'Web3SigningCredentialType' -type Web3SigningCredentialType string - -// List of Web3SigningCredentialType -const ( - CACTUS_KEYCHAIN_REF Web3SigningCredentialType = "CACTUS_KEYCHAIN_REF" - GETH_KEYCHAIN_PASSWORD Web3SigningCredentialType = "GETH_KEYCHAIN_PASSWORD" - PRIVATE_KEY_HEX Web3SigningCredentialType = "PRIVATE_KEY_HEX" - NONE Web3SigningCredentialType = "NONE" -) - -// All allowed values of Web3SigningCredentialType enum -var AllowedWeb3SigningCredentialTypeEnumValues = []Web3SigningCredentialType{ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE", -} - -func (v *Web3SigningCredentialType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := Web3SigningCredentialType(value) - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Web3SigningCredentialType", value) -} - -// NewWeb3SigningCredentialTypeFromValue returns a pointer to a valid Web3SigningCredentialType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWeb3SigningCredentialTypeFromValue(v string) (*Web3SigningCredentialType, error) { - ev := Web3SigningCredentialType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Web3SigningCredentialType: valid values are %v", v, AllowedWeb3SigningCredentialTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v Web3SigningCredentialType) IsValid() bool { - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to Web3SigningCredentialType value -func (v Web3SigningCredentialType) Ptr() *Web3SigningCredentialType { - return &v -} - -type NullableWeb3SigningCredentialType struct { - value *Web3SigningCredentialType - isSet bool -} - -func (v NullableWeb3SigningCredentialType) Get() *Web3SigningCredentialType { - return v.value -} - -func (v *NullableWeb3SigningCredentialType) Set(val *Web3SigningCredentialType) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialType) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialType(val *Web3SigningCredentialType) *NullableWeb3SigningCredentialType { - return &NullableWeb3SigningCredentialType{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go deleted file mode 100644 index 2677bcb983..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go +++ /dev/null @@ -1,385 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" -) - -// checks if the Web3TransactionReceipt type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3TransactionReceipt{} - -// Web3TransactionReceipt struct for Web3TransactionReceipt -type Web3TransactionReceipt struct { - Status bool `json:"status"` - TransactionHash string `json:"transactionHash"` - TransactionIndex float32 `json:"transactionIndex"` - BlockHash string `json:"blockHash"` - BlockNumber float32 `json:"blockNumber"` - GasUsed float32 `json:"gasUsed"` - ContractAddress NullableString `json:"contractAddress,omitempty"` - From string `json:"from"` - To string `json:"to"` - AdditionalProperties map[string]interface{} -} - -type _Web3TransactionReceipt Web3TransactionReceipt - -// NewWeb3TransactionReceipt instantiates a new Web3TransactionReceipt object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3TransactionReceipt(status bool, transactionHash string, transactionIndex float32, blockHash string, blockNumber float32, gasUsed float32, from string, to string) *Web3TransactionReceipt { - this := Web3TransactionReceipt{} - this.Status = status - this.TransactionHash = transactionHash - this.TransactionIndex = transactionIndex - this.BlockHash = blockHash - this.BlockNumber = blockNumber - this.GasUsed = gasUsed - this.From = from - this.To = to - return &this -} - -// NewWeb3TransactionReceiptWithDefaults instantiates a new Web3TransactionReceipt object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3TransactionReceiptWithDefaults() *Web3TransactionReceipt { - this := Web3TransactionReceipt{} - return &this -} - -// GetStatus returns the Status field value -func (o *Web3TransactionReceipt) GetStatus() bool { - if o == nil { - var ret bool - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetStatusOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *Web3TransactionReceipt) SetStatus(v bool) { - o.Status = v -} - -// GetTransactionHash returns the TransactionHash field value -func (o *Web3TransactionReceipt) GetTransactionHash() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionHash -} - -// GetTransactionHashOk returns a tuple with the TransactionHash field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTransactionHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionHash, true -} - -// SetTransactionHash sets field value -func (o *Web3TransactionReceipt) SetTransactionHash(v string) { - o.TransactionHash = v -} - -// GetTransactionIndex returns the TransactionIndex field value -func (o *Web3TransactionReceipt) GetTransactionIndex() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.TransactionIndex -} - -// GetTransactionIndexOk returns a tuple with the TransactionIndex field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTransactionIndexOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.TransactionIndex, true -} - -// SetTransactionIndex sets field value -func (o *Web3TransactionReceipt) SetTransactionIndex(v float32) { - o.TransactionIndex = v -} - -// GetBlockHash returns the BlockHash field value -func (o *Web3TransactionReceipt) GetBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockHash, true -} - -// SetBlockHash sets field value -func (o *Web3TransactionReceipt) SetBlockHash(v string) { - o.BlockHash = v -} - -// GetBlockNumber returns the BlockNumber field value -func (o *Web3TransactionReceipt) GetBlockNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetBlockNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.BlockNumber, true -} - -// SetBlockNumber sets field value -func (o *Web3TransactionReceipt) SetBlockNumber(v float32) { - o.BlockNumber = v -} - -// GetGasUsed returns the GasUsed field value -func (o *Web3TransactionReceipt) GetGasUsed() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.GasUsed -} - -// GetGasUsedOk returns a tuple with the GasUsed field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetGasUsedOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.GasUsed, true -} - -// SetGasUsed sets field value -func (o *Web3TransactionReceipt) SetGasUsed(v float32) { - o.GasUsed = v -} - -// GetContractAddress returns the ContractAddress field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Web3TransactionReceipt) GetContractAddress() string { - if o == nil || IsNil(o.ContractAddress.Get()) { - var ret string - return ret - } - return *o.ContractAddress.Get() -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Web3TransactionReceipt) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ContractAddress.Get(), o.ContractAddress.IsSet() -} - -// HasContractAddress returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasContractAddress() bool { - if o != nil && o.ContractAddress.IsSet() { - return true - } - - return false -} - -// SetContractAddress gets a reference to the given NullableString and assigns it to the ContractAddress field. -func (o *Web3TransactionReceipt) SetContractAddress(v string) { - o.ContractAddress.Set(&v) -} -// SetContractAddressNil sets the value for ContractAddress to be an explicit nil -func (o *Web3TransactionReceipt) SetContractAddressNil() { - o.ContractAddress.Set(nil) -} - -// UnsetContractAddress ensures that no value is present for ContractAddress, not even an explicit nil -func (o *Web3TransactionReceipt) UnsetContractAddress() { - o.ContractAddress.Unset() -} - -// GetFrom returns the From field value -func (o *Web3TransactionReceipt) GetFrom() string { - if o == nil { - var ret string - return ret - } - - return o.From -} - -// GetFromOk returns a tuple with the From field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetFromOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.From, true -} - -// SetFrom sets field value -func (o *Web3TransactionReceipt) SetFrom(v string) { - o.From = v -} - -// GetTo returns the To field value -func (o *Web3TransactionReceipt) GetTo() string { - if o == nil { - var ret string - return ret - } - - return o.To -} - -// GetToOk returns a tuple with the To field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetToOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.To, true -} - -// SetTo sets field value -func (o *Web3TransactionReceipt) SetTo(v string) { - o.To = v -} - -func (o Web3TransactionReceipt) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3TransactionReceipt) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["status"] = o.Status - toSerialize["transactionHash"] = o.TransactionHash - toSerialize["transactionIndex"] = o.TransactionIndex - toSerialize["blockHash"] = o.BlockHash - toSerialize["blockNumber"] = o.BlockNumber - toSerialize["gasUsed"] = o.GasUsed - if o.ContractAddress.IsSet() { - toSerialize["contractAddress"] = o.ContractAddress.Get() - } - toSerialize["from"] = o.From - toSerialize["to"] = o.To - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Web3TransactionReceipt) UnmarshalJSON(bytes []byte) (err error) { - varWeb3TransactionReceipt := _Web3TransactionReceipt{} - - if err = json.Unmarshal(bytes, &varWeb3TransactionReceipt); err == nil { - *o = Web3TransactionReceipt(varWeb3TransactionReceipt) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "status") - delete(additionalProperties, "transactionHash") - delete(additionalProperties, "transactionIndex") - delete(additionalProperties, "blockHash") - delete(additionalProperties, "blockNumber") - delete(additionalProperties, "gasUsed") - delete(additionalProperties, "contractAddress") - delete(additionalProperties, "from") - delete(additionalProperties, "to") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableWeb3TransactionReceipt struct { - value *Web3TransactionReceipt - isSet bool -} - -func (v NullableWeb3TransactionReceipt) Get() *Web3TransactionReceipt { - return v.value -} - -func (v *NullableWeb3TransactionReceipt) Set(val *Web3TransactionReceipt) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3TransactionReceipt) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3TransactionReceipt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3TransactionReceipt(val *Web3TransactionReceipt) *NullableWeb3TransactionReceipt { - return &NullableWeb3TransactionReceipt{value: val, isSet: true} -} - -func (v NullableWeb3TransactionReceipt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3TransactionReceipt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 76c8e41a0f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 92a89ef0d2..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,157 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-ledger-connector-besu - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-ledger-connector-besu_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeployContractSolBytecodeV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeployContractSolBytecodeV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetBalanceV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetBalanceV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetBesuRecordV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetBesuRecordV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetBlockV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetBlockV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetOpenApiSpecV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetOpenApiSpecV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPastLogsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPastLogsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetricsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetricsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetTransactionV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetTransactionV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService InvokeContractV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.InvokeContractV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RunTransactionV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.RunTransactionV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SignTransactionV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SignTransactionV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 675939c802..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Besu - -Can perform basic tasks on a Besu ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-besu - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json deleted file mode 100644 index 545d518403..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json +++ /dev/null @@ -1,1416 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Connector Besu", - "description": "Can perform basic tasks on a Besu ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "GetBalanceV1Response": { - "type": "object", - "required": ["balance"], - "properties": { - "balance": { - "type": "string" - } - } - }, - "GetBalanceV1Request": { - "type": "object", - "required": ["address"], - "additionalProperties": false, - "properties": { - "address": { - "type": "string" - }, - "defaultBlock": {} - } - }, - "EvmBlock": { - "type": "object", - "properties": { - "number": { - "type": "number" - }, - "hash": { - "type": "string" - }, - "parentHash": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "sha3Uncles": { - "type": "string" - }, - "logsBloom": { - "type": "string" - }, - "transactionsRoot": { - "type": "string" - }, - "stateRoot": { - "type": "string" - }, - "miner": { - "type": "string" - }, - "difficulty": { - "type": "number" - }, - "totalDifficulty": { - "type": "number" - }, - "extraData": { - "type": "string" - }, - "size": { - "type": "number" - }, - "gasLimit": { - "type": "number" - }, - "gasUsed": { - "type": "number" - }, - "timestamp": {}, - "transactions": { - "type": "array", - "items": {} - }, - "uncles": { - "type": "array", - "items": {} - } - } - }, - "GetBlockV1Response": { - "type": "object", - "required": ["block"], - "properties": { - "block": { - "$ref": "#/components/schemas/EvmBlock" - } - } - }, - "EvmTransaction": { - "type": "object", - "properties": { - "hash": { - "type": "string" - }, - "nonce": { - "type": "number" - }, - "blockHash": {}, - "blockNumber": {}, - "transactionIndex": {}, - "from": { - "type": "string" - }, - "to": {}, - "value": { - "type": "string" - }, - "gasPrice": { - "type": "string" - }, - "gas": { - "type": "number" - }, - "input": { - "type": "string" - } - } - }, - "GetTransactionV1Response": { - "type": "object", - "required": ["transaction"], - "properties": { - "transaction": { - "$ref": "#/components/schemas/EvmTransaction" - } - } - }, - "GetTransactionV1Request": { - "type": "object", - "required": ["transactionHash"], - "additionalProperties": false, - "properties": { - "transactionHash": { - "type": "string" - } - } - }, - "GetPastLogsV1Response": { - "type": "object", - "required": ["logs"], - "properties": { - "logs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvmLog" - } - } - } - }, - "GetPastLogsV1Request": { - "type": "object", - "additionalProperties": false, - "properties": { - "toBlock": {}, - "fromBlock": {}, - "address": {}, - "topics": { - "type": "array", - "items": {} - } - } - }, - "EvmLog": { - "type": "object", - "required": [ - "address", - "data", - "blockHash", - "transactionHash", - "topics", - "logIndex", - "transactionIndex", - "blockNumber" - ], - "properties": { - "address": { - "type": "string" - }, - "data": { - "type": "string" - }, - "blockHash": { - "type": "string" - }, - "transactionHash": { - "type": "string" - }, - "topics": { - "type": "array", - "items": { - "type": "string" - } - }, - "logIndex": { - "type": "number" - }, - "transactionIndex": { - "type": "number" - }, - "blockNumber": { - "type": "number" - } - } - }, - "GetBlockV1Request": { - "required": ["blockHashOrBlockNumber"], - "additionalProperties": false, - "type": "object", - "properties": { - "blockHashOrBlockNumber": {} - } - }, - "WatchBlocksV1": { - "type": "string", - "enum": [ - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Subscribe", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Next", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Error", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchBlocksV1Request": { - "type": "object", - "required": ["event"], - "properties": { - "event": { - "$ref": "#/components/schemas/WatchBlocksV1" - } - } - }, - "Web3BlockHeader": { - "type": "object", - "required": [ - "number", - "hash", - "parentHash", - "nonce", - "sha3Uncles", - "logsBloom", - "transactionRoot", - "stateRoot", - "receiptRoot", - "miner", - "extraData", - "gasLimit", - "gasUsed", - "timestamp" - ], - "properties": { - "number": { - "type": "number" - }, - "hash": { - "type": "string" - }, - "parentHash": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "sha3Uncles": { - "type": "string" - }, - "logsBloom": { - "type": "string" - }, - "transactionRoot": { - "type": "string" - }, - "stateRoot": { - "type": "string" - }, - "receiptRoot": { - "type": "string" - }, - "miner": { - "type": "string" - }, - "extraData": { - "type": "string" - }, - "gasLimit": { - "type": "integer" - }, - "gasUsed": { - "type": "integer" - }, - "timestamp": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "WatchBlocksV1Progress": { - "type": "object", - "required": ["blockHeader"], - "properties": { - "blockHeader": { - "$ref": "#/components/schemas/Web3BlockHeader" - } - } - }, - "ReceiptType": { - "description": "Enumerates the possible types of receipts that can be waited for by someone or something that has requested the execution of a transaction on a ledger.", - "type": "string", - "enum": ["NODE_TX_POOL_ACK", "LEDGER_BLOCK_ACK"] - }, - "ConsistencyStrategy": { - "type": "object", - "required": ["receiptType", "blockConfirmations"], - "properties": { - "receiptType": { - "$ref": "#/components/schemas/ReceiptType" - }, - "timeoutMs": { - "type": "integer", - "description": "The amount of milliseconds to wait for the receipt to arrive to the connector. Defaults to 0 which means to wait for an unlimited amount of time. Note that this wait may be interrupted still by other parts of the infrastructure such as load balancers cutting of HTTP requests after some time even if they are the type that is supposed to be kept alive. The question of re-entrance is a broader topic not in scope to discuss here, but it is important to mention it.", - "minimum": 0 - }, - "blockConfirmations": { - "type": "integer", - "minimum": 0, - "maximum": 20000, - "description": "The number of blocks to wait to be confirmed in addition to the block containing the transaction in question. Note that if the receipt type is set to only wait for node transaction pool ACK and this parameter is set to anything, but zero then the API will not accept the request due to conflicting parameters." - } - } - }, - "Web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialCactusKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialPrivateKeyHex" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialCactusKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainId", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialPrivateKeyHex": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "secret": { - "type": "string", - "description": "The HEX encoded private key of an eth account.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": [ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE" - ] - }, - "EthContractInvocationType": { - "type": "string", - "enum": ["SEND", "CALL"] - }, - "SolidityContractJsonArtifact": { - "type": "object", - "required": ["contractName"], - "properties": { - "contractName": { - "type": "string", - "nullable": false - }, - "metadata": { - "type": "string", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false - }, - "deployedBytecode": { - "type": "string", - "nullable": false - }, - "sourceMap": { - "type": "string", - "nullable": false - }, - "deployedSourceMap": { - "type": "string", - "nullable": false - }, - "sourcePath": { - "type": "string" - }, - "compiler": { - "type": "object", - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "functionHashes": { - "type": "object", - "additionalProperties": true - }, - "gasEstimates": { - "properties": { - "creation": { - "type": "object", - "properties": { - "codeDepositCost": { - "type": "string" - }, - "executionCost": { - "type": "string" - }, - "totalCost": { - "type": "string" - } - } - }, - "external": { - "type": "object", - "additionalProperties": true - } - } - } - } - }, - "BesuTransactionConfig": { - "type": "object", - "additionalProperties": true, - "properties": { - "rawTransaction": { - "type": "string", - "nullable": false - }, - "from": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "to": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "data": { - "oneOf": [ - { - "type": "string" - } - ] - } - } - }, - "BesuPrivateTransactionConfig": { - "type": "object", - "required": ["privateFrom", "privateFor"], - "properties": { - "privateFrom": { - "type": "string", - "nullable": false - }, - "privateFor": { - "type": "array", - "default": [], - "items": {}, - "nullable": false - } - } - }, - "Web3TransactionReceipt": { - "type": "object", - "required": [ - "blockHash", - "blockNumber", - "transactionHash", - "transactionIndex", - "status", - "from", - "to", - "gasUsed" - ], - "additionalProperties": true, - "properties": { - "status": { - "type": "boolean", - "nullable": false - }, - "transactionHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "transactionIndex": { - "type": "number", - "nullable": false - }, - "blockHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "blockNumber": { - "type": "number", - "nullable": false - }, - "gasUsed": { - "type": "number", - "nullable": false - }, - "contractAddress": { - "type": "string", - "nullable": true - }, - "from": { - "type": "string", - "nullable": false - }, - "to": { - "type": "string", - "nullable": false - } - } - }, - "RunTransactionRequest": { - "type": "object", - "required": [ - "web3SigningCredential", - "transactionConfig", - "consistencyStrategy" - ], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "transactionConfig": { - "$ref": "#/components/schemas/BesuTransactionConfig", - "nullable": false - }, - "consistencyStrategy": { - "$ref": "#/components/schemas/ConsistencyStrategy" - }, - "privateTransactionConfig": { - "$ref": "#/components/schemas/BesuPrivateTransactionConfig" - } - } - }, - "RunTransactionResponse": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "DeployContractSolidityBytecodeV1Request": { - "type": "object", - "required": [ - "contractName", - "contractAbi", - "bytecode", - "web3SigningCredential", - "keychainId", - "constructorArgs" - ], - "additionalProperties": false, - "properties": { - "contractName": { - "type": "string", - "description": "The contract name for retrieve the contracts json on the keychain.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "contractAbi": { - "description": "The application binary interface of the solidity contract", - "type": "array", - "items": {}, - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 24576, - "description": "See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode" - }, - "keychainId": { - "type": "string", - "description": "The keychainId for retrieve the contracts json.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "gas": { - "type": "number", - "nullable": false - }, - "gasPrice": { - "type": "string", - "nullable": false - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "privateTransactionConfig": { - "$ref": "#/components/schemas/BesuPrivateTransactionConfig" - } - } - }, - "DeployContractSolidityBytecodeNoKeychainV1Request": { - "type": "object", - "required": [ - "contractName", - "contractAbi", - "bytecode", - "web3SigningCredential", - "constructorArgs" - ], - "additionalProperties": false, - "properties": { - "contractName": { - "type": "string", - "description": "The contract name for retrieve the contracts json on the keychain.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "contractAbi": { - "description": "The application binary interface of the solidity contract", - "type": "array", - "items": {}, - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 24576, - "description": "See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode" - }, - "gas": { - "type": "number", - "nullable": false - }, - "gasPrice": { - "type": "string", - "nullable": false - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "privateTransactionConfig": { - "$ref": "#/components/schemas/BesuPrivateTransactionConfig" - } - } - }, - "DeployContractSolidityBytecodeV1Response": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "InvokeContractV1Request": { - "type": "object", - "required": [ - "contractName", - "signingCredential", - "invocationType", - "methodName", - "params" - ], - "additionalProperties": false, - "properties": { - "contractName": { - "type": "string", - "nullable": false - }, - "signingCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationType", - "nullable": false, - "description": "Indicates wether it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": {} - }, - "contractAbi": { - "description": "The application binary interface of the solidity contract, optional parameter", - "type": "array", - "items": {}, - "nullable": false - }, - "contractAddress": { - "description": "Address of the solidity contract, optional parameter", - "type": "string", - "nullable": false - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "keychainId": { - "type": "string", - "description": "The keychainId for retrieve the contracts json.", - "minLength": 1, - "maxLength": 100 - }, - "privateTransactionConfig": { - "$ref": "#/components/schemas/BesuPrivateTransactionConfig" - } - } - }, - "InvokeContractV1Response": { - "type": "object", - "required": ["success"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - }, - "callOutput": {}, - "success": { - "type": "boolean", - "nullable": false - } - } - }, - "SignTransactionRequest": { - "type": "object", - "required": ["transactionHash", "keychainId", "keychainRef"], - "additionalProperties": false, - "properties": { - "keychainId": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "keychainRef": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "transactionHash": { - "description": "The transaction hash of ledger will be used to fetch the contain.", - "type": "string", - "minLength": 0, - "maxLength": 2048, - "nullable": false - } - } - }, - "SignTransactionResponse": { - "type": "object", - "required": ["signature"], - "properties": { - "signature": { - "description": "The signatures of ledger from the corresponding transaction hash.", - "type": "string", - "minLength": 0, - "maxLength": 2048, - "nullable": false - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetBesuRecordV1Request": { - "type": "object", - "additionalProperties": false, - "properties": { - "invokeCall": { - "$ref": "#/components/schemas/InvokeContractV1Request" - }, - "transactionHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - } - } - }, - "GetBesuRecordV1Response": { - "type": "object", - "properties": { - "ledgerId": { - "type": "string" - }, - "stateContract": { - "type": "string" - }, - "transactionInputData": {}, - "callOutput": {} - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec" - } - }, - "operationId": "getOpenApiSpecV1", - "summary": "Retrieves the .json file that contains the OpenAPI specification for the plugin.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode" - } - }, - "operationId": "deployContractSolBytecodeV1", - "summary": "Deploys the bytecode of a Solidity contract.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractSolidityBytecodeV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractSolidityBytecodeV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain" - } - }, - "operationId": "deployContractSolBytecodeNoKeychainV1", - "summary": "Deploys the bytecode of a Solidity contract without the need of keychain", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractSolidityBytecodeNoKeychainV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractSolidityBytecodeV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance" - } - }, - "operationId": "getBalanceV1", - "summary": "Return balance of an address of a given block", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBalanceV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBalanceV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block" - } - }, - "operationId": "getBlockV1", - "summary": "Returns a block matching the block", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBlockV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBlockV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction" - } - }, - "operationId": "runTransactionV1", - "summary": "Executes a transaction on a besu ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction" - } - }, - "operationId": "getTransactionV1", - "summary": "Executes a transaction on a besu ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTransactionV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTransactionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs" - } - }, - "operationId": "getPastLogsV1", - "summary": "Gets past logs, matching the given options.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetPastLogsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetPastLogsV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract" - } - }, - "operationId": "invokeContractV1", - "summary": "Invokes a contract on a besu ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction" - } - }, - "operationId": "signTransactionV1", - "summary": "Obtain signatures of ledger from the corresponding transaction hash.", - "description": "Obtain signatures of ledger from the corresponding transaction hash.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignTransactionResponse" - } - } - } - }, - "404": { - "description": "Not able to find the corresponding tranaction from the transaction hash" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record" - } - }, - "operationId": "getBesuRecordV1", - "summary": "Retrieves an arbitrary record (any piece of information) from the ledger. Ledger records can be call outputs, transaction input, etc.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBesuRecordV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GetBesuRecordV1Response" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.tpl.json deleted file mode 100644 index 545d518403..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,1416 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Connector Besu", - "description": "Can perform basic tasks on a Besu ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "GetBalanceV1Response": { - "type": "object", - "required": ["balance"], - "properties": { - "balance": { - "type": "string" - } - } - }, - "GetBalanceV1Request": { - "type": "object", - "required": ["address"], - "additionalProperties": false, - "properties": { - "address": { - "type": "string" - }, - "defaultBlock": {} - } - }, - "EvmBlock": { - "type": "object", - "properties": { - "number": { - "type": "number" - }, - "hash": { - "type": "string" - }, - "parentHash": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "sha3Uncles": { - "type": "string" - }, - "logsBloom": { - "type": "string" - }, - "transactionsRoot": { - "type": "string" - }, - "stateRoot": { - "type": "string" - }, - "miner": { - "type": "string" - }, - "difficulty": { - "type": "number" - }, - "totalDifficulty": { - "type": "number" - }, - "extraData": { - "type": "string" - }, - "size": { - "type": "number" - }, - "gasLimit": { - "type": "number" - }, - "gasUsed": { - "type": "number" - }, - "timestamp": {}, - "transactions": { - "type": "array", - "items": {} - }, - "uncles": { - "type": "array", - "items": {} - } - } - }, - "GetBlockV1Response": { - "type": "object", - "required": ["block"], - "properties": { - "block": { - "$ref": "#/components/schemas/EvmBlock" - } - } - }, - "EvmTransaction": { - "type": "object", - "properties": { - "hash": { - "type": "string" - }, - "nonce": { - "type": "number" - }, - "blockHash": {}, - "blockNumber": {}, - "transactionIndex": {}, - "from": { - "type": "string" - }, - "to": {}, - "value": { - "type": "string" - }, - "gasPrice": { - "type": "string" - }, - "gas": { - "type": "number" - }, - "input": { - "type": "string" - } - } - }, - "GetTransactionV1Response": { - "type": "object", - "required": ["transaction"], - "properties": { - "transaction": { - "$ref": "#/components/schemas/EvmTransaction" - } - } - }, - "GetTransactionV1Request": { - "type": "object", - "required": ["transactionHash"], - "additionalProperties": false, - "properties": { - "transactionHash": { - "type": "string" - } - } - }, - "GetPastLogsV1Response": { - "type": "object", - "required": ["logs"], - "properties": { - "logs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvmLog" - } - } - } - }, - "GetPastLogsV1Request": { - "type": "object", - "additionalProperties": false, - "properties": { - "toBlock": {}, - "fromBlock": {}, - "address": {}, - "topics": { - "type": "array", - "items": {} - } - } - }, - "EvmLog": { - "type": "object", - "required": [ - "address", - "data", - "blockHash", - "transactionHash", - "topics", - "logIndex", - "transactionIndex", - "blockNumber" - ], - "properties": { - "address": { - "type": "string" - }, - "data": { - "type": "string" - }, - "blockHash": { - "type": "string" - }, - "transactionHash": { - "type": "string" - }, - "topics": { - "type": "array", - "items": { - "type": "string" - } - }, - "logIndex": { - "type": "number" - }, - "transactionIndex": { - "type": "number" - }, - "blockNumber": { - "type": "number" - } - } - }, - "GetBlockV1Request": { - "required": ["blockHashOrBlockNumber"], - "additionalProperties": false, - "type": "object", - "properties": { - "blockHashOrBlockNumber": {} - } - }, - "WatchBlocksV1": { - "type": "string", - "enum": [ - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Subscribe", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Next", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Error", - "org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchBlocksV1Request": { - "type": "object", - "required": ["event"], - "properties": { - "event": { - "$ref": "#/components/schemas/WatchBlocksV1" - } - } - }, - "Web3BlockHeader": { - "type": "object", - "required": [ - "number", - "hash", - "parentHash", - "nonce", - "sha3Uncles", - "logsBloom", - "transactionRoot", - "stateRoot", - "receiptRoot", - "miner", - "extraData", - "gasLimit", - "gasUsed", - "timestamp" - ], - "properties": { - "number": { - "type": "number" - }, - "hash": { - "type": "string" - }, - "parentHash": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "sha3Uncles": { - "type": "string" - }, - "logsBloom": { - "type": "string" - }, - "transactionRoot": { - "type": "string" - }, - "stateRoot": { - "type": "string" - }, - "receiptRoot": { - "type": "string" - }, - "miner": { - "type": "string" - }, - "extraData": { - "type": "string" - }, - "gasLimit": { - "type": "integer" - }, - "gasUsed": { - "type": "integer" - }, - "timestamp": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } - }, - "WatchBlocksV1Progress": { - "type": "object", - "required": ["blockHeader"], - "properties": { - "blockHeader": { - "$ref": "#/components/schemas/Web3BlockHeader" - } - } - }, - "ReceiptType": { - "description": "Enumerates the possible types of receipts that can be waited for by someone or something that has requested the execution of a transaction on a ledger.", - "type": "string", - "enum": ["NODE_TX_POOL_ACK", "LEDGER_BLOCK_ACK"] - }, - "ConsistencyStrategy": { - "type": "object", - "required": ["receiptType", "blockConfirmations"], - "properties": { - "receiptType": { - "$ref": "#/components/schemas/ReceiptType" - }, - "timeoutMs": { - "type": "integer", - "description": "The amount of milliseconds to wait for the receipt to arrive to the connector. Defaults to 0 which means to wait for an unlimited amount of time. Note that this wait may be interrupted still by other parts of the infrastructure such as load balancers cutting of HTTP requests after some time even if they are the type that is supposed to be kept alive. The question of re-entrance is a broader topic not in scope to discuss here, but it is important to mention it.", - "minimum": 0 - }, - "blockConfirmations": { - "type": "integer", - "minimum": 0, - "maximum": 20000, - "description": "The number of blocks to wait to be confirmed in addition to the block containing the transaction in question. Note that if the receipt type is set to only wait for node transaction pool ACK and this parameter is set to anything, but zero then the API will not accept the request due to conflicting parameters." - } - } - }, - "Web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialCactusKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialPrivateKeyHex" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialCactusKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainId", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialPrivateKeyHex": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "secret": { - "type": "string", - "description": "The HEX encoded private key of an eth account.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": [ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE" - ] - }, - "EthContractInvocationType": { - "type": "string", - "enum": ["SEND", "CALL"] - }, - "SolidityContractJsonArtifact": { - "type": "object", - "required": ["contractName"], - "properties": { - "contractName": { - "type": "string", - "nullable": false - }, - "metadata": { - "type": "string", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false - }, - "deployedBytecode": { - "type": "string", - "nullable": false - }, - "sourceMap": { - "type": "string", - "nullable": false - }, - "deployedSourceMap": { - "type": "string", - "nullable": false - }, - "sourcePath": { - "type": "string" - }, - "compiler": { - "type": "object", - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "functionHashes": { - "type": "object", - "additionalProperties": true - }, - "gasEstimates": { - "properties": { - "creation": { - "type": "object", - "properties": { - "codeDepositCost": { - "type": "string" - }, - "executionCost": { - "type": "string" - }, - "totalCost": { - "type": "string" - } - } - }, - "external": { - "type": "object", - "additionalProperties": true - } - } - } - } - }, - "BesuTransactionConfig": { - "type": "object", - "additionalProperties": true, - "properties": { - "rawTransaction": { - "type": "string", - "nullable": false - }, - "from": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "to": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "data": { - "oneOf": [ - { - "type": "string" - } - ] - } - } - }, - "BesuPrivateTransactionConfig": { - "type": "object", - "required": ["privateFrom", "privateFor"], - "properties": { - "privateFrom": { - "type": "string", - "nullable": false - }, - "privateFor": { - "type": "array", - "default": [], - "items": {}, - "nullable": false - } - } - }, - "Web3TransactionReceipt": { - "type": "object", - "required": [ - "blockHash", - "blockNumber", - "transactionHash", - "transactionIndex", - "status", - "from", - "to", - "gasUsed" - ], - "additionalProperties": true, - "properties": { - "status": { - "type": "boolean", - "nullable": false - }, - "transactionHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "transactionIndex": { - "type": "number", - "nullable": false - }, - "blockHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "blockNumber": { - "type": "number", - "nullable": false - }, - "gasUsed": { - "type": "number", - "nullable": false - }, - "contractAddress": { - "type": "string", - "nullable": true - }, - "from": { - "type": "string", - "nullable": false - }, - "to": { - "type": "string", - "nullable": false - } - } - }, - "RunTransactionRequest": { - "type": "object", - "required": [ - "web3SigningCredential", - "transactionConfig", - "consistencyStrategy" - ], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "transactionConfig": { - "$ref": "#/components/schemas/BesuTransactionConfig", - "nullable": false - }, - "consistencyStrategy": { - "$ref": "#/components/schemas/ConsistencyStrategy" - }, - "privateTransactionConfig": { - "$ref": "#/components/schemas/BesuPrivateTransactionConfig" - } - } - }, - "RunTransactionResponse": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "DeployContractSolidityBytecodeV1Request": { - "type": "object", - "required": [ - "contractName", - "contractAbi", - "bytecode", - "web3SigningCredential", - "keychainId", - "constructorArgs" - ], - "additionalProperties": false, - "properties": { - "contractName": { - "type": "string", - "description": "The contract name for retrieve the contracts json on the keychain.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "contractAbi": { - "description": "The application binary interface of the solidity contract", - "type": "array", - "items": {}, - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 24576, - "description": "See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode" - }, - "keychainId": { - "type": "string", - "description": "The keychainId for retrieve the contracts json.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "gas": { - "type": "number", - "nullable": false - }, - "gasPrice": { - "type": "string", - "nullable": false - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "privateTransactionConfig": { - "$ref": "#/components/schemas/BesuPrivateTransactionConfig" - } - } - }, - "DeployContractSolidityBytecodeNoKeychainV1Request": { - "type": "object", - "required": [ - "contractName", - "contractAbi", - "bytecode", - "web3SigningCredential", - "constructorArgs" - ], - "additionalProperties": false, - "properties": { - "contractName": { - "type": "string", - "description": "The contract name for retrieve the contracts json on the keychain.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "contractAbi": { - "description": "The application binary interface of the solidity contract", - "type": "array", - "items": {}, - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 24576, - "description": "See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode" - }, - "gas": { - "type": "number", - "nullable": false - }, - "gasPrice": { - "type": "string", - "nullable": false - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "privateTransactionConfig": { - "$ref": "#/components/schemas/BesuPrivateTransactionConfig" - } - } - }, - "DeployContractSolidityBytecodeV1Response": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "InvokeContractV1Request": { - "type": "object", - "required": [ - "contractName", - "signingCredential", - "invocationType", - "methodName", - "params" - ], - "additionalProperties": false, - "properties": { - "contractName": { - "type": "string", - "nullable": false - }, - "signingCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationType", - "nullable": false, - "description": "Indicates wether it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": {} - }, - "contractAbi": { - "description": "The application binary interface of the solidity contract, optional parameter", - "type": "array", - "items": {}, - "nullable": false - }, - "contractAddress": { - "description": "Address of the solidity contract, optional parameter", - "type": "string", - "nullable": false - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "keychainId": { - "type": "string", - "description": "The keychainId for retrieve the contracts json.", - "minLength": 1, - "maxLength": 100 - }, - "privateTransactionConfig": { - "$ref": "#/components/schemas/BesuPrivateTransactionConfig" - } - } - }, - "InvokeContractV1Response": { - "type": "object", - "required": ["success"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - }, - "callOutput": {}, - "success": { - "type": "boolean", - "nullable": false - } - } - }, - "SignTransactionRequest": { - "type": "object", - "required": ["transactionHash", "keychainId", "keychainRef"], - "additionalProperties": false, - "properties": { - "keychainId": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "keychainRef": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "transactionHash": { - "description": "The transaction hash of ledger will be used to fetch the contain.", - "type": "string", - "minLength": 0, - "maxLength": 2048, - "nullable": false - } - } - }, - "SignTransactionResponse": { - "type": "object", - "required": ["signature"], - "properties": { - "signature": { - "description": "The signatures of ledger from the corresponding transaction hash.", - "type": "string", - "minLength": 0, - "maxLength": 2048, - "nullable": false - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "GetBesuRecordV1Request": { - "type": "object", - "additionalProperties": false, - "properties": { - "invokeCall": { - "$ref": "#/components/schemas/InvokeContractV1Request" - }, - "transactionHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - } - } - }, - "GetBesuRecordV1Response": { - "type": "object", - "properties": { - "ledgerId": { - "type": "string" - }, - "stateContract": { - "type": "string" - }, - "transactionInputData": {}, - "callOutput": {} - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec" - } - }, - "operationId": "getOpenApiSpecV1", - "summary": "Retrieves the .json file that contains the OpenAPI specification for the plugin.", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode" - } - }, - "operationId": "deployContractSolBytecodeV1", - "summary": "Deploys the bytecode of a Solidity contract.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractSolidityBytecodeV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractSolidityBytecodeV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain" - } - }, - "operationId": "deployContractSolBytecodeNoKeychainV1", - "summary": "Deploys the bytecode of a Solidity contract without the need of keychain", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractSolidityBytecodeNoKeychainV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractSolidityBytecodeV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance" - } - }, - "operationId": "getBalanceV1", - "summary": "Return balance of an address of a given block", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBalanceV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBalanceV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block" - } - }, - "operationId": "getBlockV1", - "summary": "Returns a block matching the block", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBlockV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBlockV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction" - } - }, - "operationId": "runTransactionV1", - "summary": "Executes a transaction on a besu ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction" - } - }, - "operationId": "getTransactionV1", - "summary": "Executes a transaction on a besu ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTransactionV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTransactionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs" - } - }, - "operationId": "getPastLogsV1", - "summary": "Gets past logs, matching the given options.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetPastLogsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetPastLogsV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract" - } - }, - "operationId": "invokeContractV1", - "summary": "Invokes a contract on a besu ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction" - } - }, - "operationId": "signTransactionV1", - "summary": "Obtain signatures of ledger from the corresponding transaction hash.", - "description": "Obtain signatures of ledger from the corresponding transaction hash.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignTransactionResponse" - } - } - } - }, - "404": { - "description": "Not able to find the corresponding tranaction from the transaction hash" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record" - } - }, - "operationId": "getBesuRecordV1", - "summary": "Retrieves an arbitrary record (any piece of information) from the ledger. Ledger records can be call outputs, transaction input, etc.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBesuRecordV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GetBesuRecordV1Response" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/mustache/openapi-generator/templates/protobuf-schema/api.mustache b/packages/cactus-plugin-ledger-connector-besu/src/main/mustache/openapi-generator/templates/protobuf-schema/api.mustache deleted file mode 100644 index b728d9e71f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/mustache/openapi-generator/templates/protobuf-schema/api.mustache +++ /dev/null @@ -1,46 +0,0 @@ -{{>partial_header}} -syntax = "proto3"; - -package {{#lambda.lowercase}}{{{packageName}}}.{{{apiPackage}}}.{{{classname}}};{{/lambda.lowercase}} - -import "google/protobuf/empty.proto"; -{{#imports}} -{{#import}} -import "{{{modelPackage}}}/{{{.}}}.proto"; -{{/import}} -{{/imports}} - -service {{classname}} { -{{#operations}} -{{#operation}} - {{#description}} - // {{{.}}} - {{/description}} - rpc {{operationId}} ({{#hasParams}}{{operationId}}Request{{/hasParams}}{{^hasParams}}google.protobuf.Empty{{/hasParams}}) returns ({{#vendorExtensions.x-grpc-response}}{{.}}{{/vendorExtensions.x-grpc-response}}{{^vendorExtensions.x-grpc-response}}{{operationId}}Response{{/vendorExtensions.x-grpc-response}}); - -{{/operation}} -{{/operations}} -} - -{{#operations}} -{{#operation}} -{{#hasParams}} -message {{operationId}}Request { - {{#allParams}} - {{#description}} - // {{{.}}} - {{/description}} - {{#vendorExtensions.x-protobuf-type}}{{.}} {{/vendorExtensions.x-protobuf-type}}{{vendorExtensions.x-protobuf-data-type}} {{paramName}} = {{vendorExtensions.x-protobuf-index}}; - {{/allParams}} - -} - -{{/hasParams}} -{{^vendorExtensions.x-grpc-response}} -message {{operationId}}Response { - {{{vendorExtensions.x-grpc-response-type}}} data = 1; -} - -{{/vendorExtensions.x-grpc-response}} -{{/operation}} -{{/operations}} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/mustache/openapi-generator/templates/protobuf-schema/model.mustache b/packages/cactus-plugin-ledger-connector-besu/src/main/mustache/openapi-generator/templates/protobuf-schema/model.mustache deleted file mode 100644 index a350fd9e14..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/mustache/openapi-generator/templates/protobuf-schema/model.mustache +++ /dev/null @@ -1,41 +0,0 @@ -{{>partial_header}} -syntax = "proto3"; - -package {{#lambda.lowercase}}{{{packageName}}};{{/lambda.lowercase}} - -import "google/protobuf/any.proto"; - -{{#imports}} -{{#import}} -import "{{{modelPackage}}}/{{{import}}}.proto"; -{{/import}} -{{/imports}} - -{{#models}} -{{#model}} -{{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}message {{classname}} { - - {{#vars}} - {{#description}} - // {{{.}}} - {{/description}} - {{^isEnum}} - {{#vendorExtensions.x-protobuf-type}}{{{.}}} {{/vendorExtensions.x-protobuf-type}}{{{vendorExtensions.x-protobuf-data-type}}} {{{name}}} = {{vendorExtensions.x-protobuf-index}}{{#vendorExtensions.x-protobuf-packed}} [packed=true]{{/vendorExtensions.x-protobuf-packed}}; - {{/isEnum}} - {{#isEnum}} - enum {{enumName}} { - {{#allowableValues}} - {{#enumVars}} - {{{name}}} = {{{protobuf-enum-index}}}; - {{/enumVars}} - {{/allowableValues}} - } - - {{enumName}} {{name}} = {{vendorExtensions.x-protobuf-index}}; - {{/isEnum}} - - {{/vars}} -} -{{/isEnum}} -{{/model}} -{{/models}} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/mustache/openapi-generator/templates/protobuf-schema/root.mustache b/packages/cactus-plugin-ledger-connector-besu/src/main/mustache/openapi-generator/templates/protobuf-schema/root.mustache deleted file mode 100644 index e2df456144..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/mustache/openapi-generator/templates/protobuf-schema/root.mustache +++ /dev/null @@ -1,22 +0,0 @@ -{{>partial_header}} -syntax = "proto3"; - -package {{{packageName}}}; - -{{#vendorExtensions.x-grpc-options}} -option {{{.}}}; -{{/vendorExtensions.x-grpc-options}} - -// Models -{{#models}} -{{#model}} -import "{{modelPackage}}/{{classFilename}}.proto"; -{{/model}} -{{/models}} - -// APIs -{{#apiInfo}} -{{#apis}} -import "{{apiPackage}}/{{classFilename}}.proto"; -{{/apis}} -{{/apiInfo}} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/.openapi-generator/FILES deleted file mode 100644 index 54faef8d5c..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/.openapi-generator/FILES +++ /dev/null @@ -1,45 +0,0 @@ -README.md -models/besu_private_transaction_config_pb.proto -models/besu_transaction_config_pb.proto -models/besu_transaction_config_to_pb.proto -models/consistency_strategy_pb.proto -models/deploy_contract_solidity_bytecode_no_keychain_v1_request_pb.proto -models/deploy_contract_solidity_bytecode_v1_request_pb.proto -models/deploy_contract_solidity_bytecode_v1_response_pb.proto -models/eth_contract_invocation_type_pb.proto -models/evm_block_pb.proto -models/evm_log_pb.proto -models/evm_transaction_pb.proto -models/get_balance_v1_request_pb.proto -models/get_balance_v1_response_pb.proto -models/get_besu_record_v1_request_pb.proto -models/get_besu_record_v1_response_pb.proto -models/get_block_v1_request_pb.proto -models/get_block_v1_response_pb.proto -models/get_past_logs_v1_request_pb.proto -models/get_past_logs_v1_response_pb.proto -models/get_transaction_v1_request_pb.proto -models/get_transaction_v1_response_pb.proto -models/invoke_contract_v1_request_pb.proto -models/invoke_contract_v1_response_pb.proto -models/receipt_type_pb.proto -models/run_transaction_request_pb.proto -models/run_transaction_response_pb.proto -models/sign_transaction_request_pb.proto -models/sign_transaction_response_pb.proto -models/solidity_contract_json_artifact_compiler_pb.proto -models/solidity_contract_json_artifact_gas_estimates_creation_pb.proto -models/solidity_contract_json_artifact_gas_estimates_pb.proto -models/solidity_contract_json_artifact_pb.proto -models/watch_blocks_v1_pb.proto -models/watch_blocks_v1_progress_pb.proto -models/watch_blocks_v1_request_pb.proto -models/web3_block_header_pb.proto -models/web3_block_header_timestamp_pb.proto -models/web3_signing_credential_cactus_keychain_ref_pb.proto -models/web3_signing_credential_none_pb.proto -models/web3_signing_credential_pb.proto -models/web3_signing_credential_private_key_hex_pb.proto -models/web3_signing_credential_type_pb.proto -models/web3_transaction_receipt_pb.proto -services/default_service.proto diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/README.md b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/README.md deleted file mode 100644 index e38495bf47..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# gPRC for org.hyperledger.cacti.plugin.ledger.connector.besu - -Can perform basic tasks on a Besu ledger - -## Overview -These files were generated by the [OpenAPI Generator](https://openapi-generator.tech) project. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.ProtobufSchemaCodegen - -## Usage - -Below are some usage examples for Go and Ruby. For other languages, please refer to https://grpc.io/docs/quickstart/. - -### Go -``` -# assuming `protoc-gen-go` has been installed with `go get -u github.com/golang/protobuf/protoc-gen-go` -mkdir /var/tmp/go/org.hyperledger.cacti.plugin.ledger.connector.besu -protoc --go_out=/var/tmp/go/org.hyperledger.cacti.plugin.ledger.connector.besu services/* -protoc --go_out=/var/tmp/go/org.hyperledger.cacti.plugin.ledger.connector.besu models/* -``` - -### Ruby -``` -# assuming `grpc_tools_ruby_protoc` has been installed via `gem install grpc-tools` -RUBY_OUTPUT_DIR="/var/tmp/ruby/org.hyperledger.cacti.plugin.ledger.connector.besu" -mkdir $RUBY_OUTPUT_DIR -grpc_tools_ruby_protoc --ruby_out=$RUBY_OUTPUT_DIR --grpc_out=$RUBY_OUTPUT_DIR/lib services/* -grpc_tools_ruby_protoc --ruby_out=$RUBY_OUTPUT_DIR --grpc_out=$RUBY_OUTPUT_DIR/lib models/* -``` diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/besu_private_transaction_config_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/besu_private_transaction_config_pb.proto deleted file mode 100644 index 2f1aa44a82..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/besu_private_transaction_config_pb.proto +++ /dev/null @@ -1,24 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message BesuPrivateTransactionConfigPB { - - string privateFrom = 360593360; - - repeated google.protobuf.Any privateFor = 265462717; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/besu_transaction_config_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/besu_transaction_config_pb.proto deleted file mode 100644 index f344e70f58..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/besu_transaction_config_pb.proto +++ /dev/null @@ -1,38 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/besu_transaction_config_to_pb.proto"; -import "models/web3_block_header_timestamp_pb.proto"; - -message BesuTransactionConfigPB { - - string rawTransaction = 185047449; - - Web3BlockHeaderTimestampPB from = 3151786; - - BesuTransactionConfigToPB to = 3707; - - Web3BlockHeaderTimestampPB value = 111972721; - - Web3BlockHeaderTimestampPB gas = 102105; - - Web3BlockHeaderTimestampPB gasPrice = 5271059; - - float nonce = 105002991; - - BesuTransactionConfigToPB data = 3076010; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/besu_transaction_config_to_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/besu_transaction_config_to_pb.proto deleted file mode 100644 index a524674a6b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/besu_transaction_config_to_pb.proto +++ /dev/null @@ -1,20 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message BesuTransactionConfigToPB { - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/consistency_strategy_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/consistency_strategy_pb.proto deleted file mode 100644 index b097341592..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/consistency_strategy_pb.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/receipt_type_pb.proto"; - -message ConsistencyStrategyPB { - - ReceiptTypePB receiptType = 423008661; - - // The amount of milliseconds to wait for the receipt to arrive to the connector. Defaults to 0 which means to wait for an unlimited amount of time. Note that this wait may be interrupted still by other parts of the infrastructure such as load balancers cutting of HTTP requests after some time even if they are the type that is supposed to be kept alive. The question of re-entrance is a broader topic not in scope to discuss here, but it is important to mention it. - int32 timeoutMs = 51479271; - - // The number of blocks to wait to be confirmed in addition to the block containing the transaction in question. Note that if the receipt type is set to only wait for node transaction pool ACK and this parameter is set to anything, but zero then the API will not accept the request due to conflicting parameters. - int32 blockConfirmations = 207555762; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/deploy_contract_solidity_bytecode_no_keychain_v1_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/deploy_contract_solidity_bytecode_no_keychain_v1_request_pb.proto deleted file mode 100644 index e28f470ea6..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/deploy_contract_solidity_bytecode_no_keychain_v1_request_pb.proto +++ /dev/null @@ -1,44 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/besu_private_transaction_config_pb.proto"; -import "models/web3_signing_credential_pb.proto"; - -message DeployContractSolidityBytecodeNoKeychainV1RequestPB { - - // The contract name for retrieve the contracts json on the keychain. - string contractName = 328784197; - - // The application binary interface of the solidity contract - repeated google.protobuf.Any contractAbi = 512852493; - - repeated google.protobuf.Any constructorArgs = 336490508; - - Web3SigningCredentialPB web3SigningCredential = 451211679; - - // See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode - string bytecode = 256554254; - - float gas = 102105; - - string gasPrice = 5271059; - - // The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - float timeoutMs = 51479271; - - BesuPrivateTransactionConfigPB privateTransactionConfig = 276796542; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/deploy_contract_solidity_bytecode_v1_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/deploy_contract_solidity_bytecode_v1_request_pb.proto deleted file mode 100644 index 7d02655c1d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/deploy_contract_solidity_bytecode_v1_request_pb.proto +++ /dev/null @@ -1,47 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/besu_private_transaction_config_pb.proto"; -import "models/web3_signing_credential_pb.proto"; - -message DeployContractSolidityBytecodeV1RequestPB { - - // The contract name for retrieve the contracts json on the keychain. - string contractName = 328784197; - - // The application binary interface of the solidity contract - repeated google.protobuf.Any contractAbi = 512852493; - - repeated google.protobuf.Any constructorArgs = 336490508; - - Web3SigningCredentialPB web3SigningCredential = 451211679; - - // See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode - string bytecode = 256554254; - - // The keychainId for retrieve the contracts json. - string keychainId = 14058372; - - float gas = 102105; - - string gasPrice = 5271059; - - // The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - float timeoutMs = 51479271; - - BesuPrivateTransactionConfigPB privateTransactionConfig = 276796542; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/deploy_contract_solidity_bytecode_v1_response_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/deploy_contract_solidity_bytecode_v1_response_pb.proto deleted file mode 100644 index a7a6a01b1d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/deploy_contract_solidity_bytecode_v1_response_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/web3_transaction_receipt_pb.proto"; - -message DeployContractSolidityBytecodeV1ResponsePB { - - Web3TransactionReceiptPB transactionReceipt = 472834426; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/eth_contract_invocation_type_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/eth_contract_invocation_type_pb.proto deleted file mode 100644 index a347426425..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/eth_contract_invocation_type_pb.proto +++ /dev/null @@ -1,21 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -enum EthContractInvocationTypePB { - EthContractInvocationTypePB_SEND = 0; - EthContractInvocationTypePB_CALL = 1; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/evm_block_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/evm_block_pb.proto deleted file mode 100644 index 964dd5f80f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/evm_block_pb.proto +++ /dev/null @@ -1,56 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message EvmBlockPB { - - float number = 497493176; - - string hash = 3195150; - - string parentHash = 245049128; - - string nonce = 105002991; - - string sha3Uncles = 373514458; - - string logsBloom = 399161966; - - string transactionsRoot = 526502871; - - string stateRoot = 475330288; - - string miner = 103900799; - - float difficulty = 218888126; - - float totalDifficulty = 413035041; - - string extraData = 253792294; - - float size = 3530753; - - float gasLimit = 9229217; - - float gasUsed = 190522826; - - optional google.protobuf.Any timestamp = 55126294; - - repeated google.protobuf.Any transactions = 343509336; - - repeated google.protobuf.Any uncles = 303842065; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/evm_log_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/evm_log_pb.proto deleted file mode 100644 index e435c4983c..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/evm_log_pb.proto +++ /dev/null @@ -1,36 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message EvmLogPB { - - string address = 73950222; - - string data = 3076010; - - string blockHash = 335211324; - - string transactionHash = 188901646; - - repeated string topics = 331163357; - - float logIndex = 382599153; - - float transactionIndex = 488538260; - - float blockNumber = 205598263; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/evm_transaction_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/evm_transaction_pb.proto deleted file mode 100644 index ce446aa45f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/evm_transaction_pb.proto +++ /dev/null @@ -1,42 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message EvmTransactionPB { - - string hash = 3195150; - - float nonce = 105002991; - - optional google.protobuf.Any blockHash = 335211324; - - optional google.protobuf.Any blockNumber = 205598263; - - optional google.protobuf.Any transactionIndex = 488538260; - - string from = 3151786; - - optional google.protobuf.Any to = 3707; - - string value = 111972721; - - string gasPrice = 5271059; - - float gas = 102105; - - string input = 100358090; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_balance_v1_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_balance_v1_request_pb.proto deleted file mode 100644 index 43b4f40df8..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_balance_v1_request_pb.proto +++ /dev/null @@ -1,24 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message GetBalanceV1RequestPB { - - string address = 73950222; - - optional google.protobuf.Any defaultBlock = 140394805; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_balance_v1_response_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_balance_v1_response_pb.proto deleted file mode 100644 index 2fd88d70a6..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_balance_v1_response_pb.proto +++ /dev/null @@ -1,22 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message GetBalanceV1ResponsePB { - - string balance = 339185956; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_besu_record_v1_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_besu_record_v1_request_pb.proto deleted file mode 100644 index bb91d66ae2..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_besu_record_v1_request_pb.proto +++ /dev/null @@ -1,25 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/invoke_contract_v1_request_pb.proto"; - -message GetBesuRecordV1RequestPB { - - InvokeContractV1RequestPB invokeCall = 359347961; - - string transactionHash = 188901646; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_besu_record_v1_response_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_besu_record_v1_response_pb.proto deleted file mode 100644 index de2d7d8957..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_besu_record_v1_response_pb.proto +++ /dev/null @@ -1,28 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message GetBesuRecordV1ResponsePB { - - string ledgerId = 39059559; - - string stateContract = 509155523; - - optional google.protobuf.Any transactionInputData = 134507862; - - optional google.protobuf.Any callOutput = 401260801; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_block_v1_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_block_v1_request_pb.proto deleted file mode 100644 index 1dbd081e9d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_block_v1_request_pb.proto +++ /dev/null @@ -1,22 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message GetBlockV1RequestPB { - - optional google.protobuf.Any blockHashOrBlockNumber = 273815337; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_block_v1_response_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_block_v1_response_pb.proto deleted file mode 100644 index c7f06b14ba..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_block_v1_response_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/evm_block_pb.proto"; - -message GetBlockV1ResponsePB { - - EvmBlockPB block = 93832333; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_past_logs_v1_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_past_logs_v1_request_pb.proto deleted file mode 100644 index b672c4fb50..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_past_logs_v1_request_pb.proto +++ /dev/null @@ -1,28 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message GetPastLogsV1RequestPB { - - optional google.protobuf.Any toBlock = 107898160; - - optional google.protobuf.Any fromBlock = 53671683; - - optional google.protobuf.Any address = 73950222; - - repeated google.protobuf.Any topics = 331163357; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_past_logs_v1_response_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_past_logs_v1_response_pb.proto deleted file mode 100644 index 812290f318..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_past_logs_v1_response_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/evm_log_pb.proto"; - -message GetPastLogsV1ResponsePB { - - repeated EvmLogPB logs = 3327407; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_transaction_v1_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_transaction_v1_request_pb.proto deleted file mode 100644 index f589371e8e..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_transaction_v1_request_pb.proto +++ /dev/null @@ -1,22 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message GetTransactionV1RequestPB { - - string transactionHash = 188901646; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_transaction_v1_response_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_transaction_v1_response_pb.proto deleted file mode 100644 index 3a7d228d49..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/get_transaction_v1_response_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/evm_transaction_pb.proto"; - -message GetTransactionV1ResponsePB { - - EvmTransactionPB transaction = 530633441; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/invoke_contract_v1_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/invoke_contract_v1_request_pb.proto deleted file mode 100644 index 48ae5f55c5..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/invoke_contract_v1_request_pb.proto +++ /dev/null @@ -1,58 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/besu_private_transaction_config_pb.proto"; -import "models/eth_contract_invocation_type_pb.proto"; -import "models/web3_block_header_timestamp_pb.proto"; -import "models/web3_signing_credential_pb.proto"; - -message InvokeContractV1RequestPB { - - string contractName = 328784197; - - Web3SigningCredentialPB signingCredential = 233015102; - - EthContractInvocationTypePB invocationType = 163296237; - - // The name of the contract method to invoke. - string methodName = 186292469; - - // The list of arguments to pass in to the contract method being invoked. - repeated google.protobuf.Any params = 458557051; - - // The application binary interface of the solidity contract, optional parameter - repeated google.protobuf.Any contractAbi = 512852493; - - // Address of the solidity contract, optional parameter - string contractAddress = 214641282; - - Web3BlockHeaderTimestampPB value = 111972721; - - Web3BlockHeaderTimestampPB gas = 102105; - - Web3BlockHeaderTimestampPB gasPrice = 5271059; - - float nonce = 105002991; - - // The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND - float timeoutMs = 51479271; - - // The keychainId for retrieve the contracts json. - string keychainId = 14058372; - - BesuPrivateTransactionConfigPB privateTransactionConfig = 276796542; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/invoke_contract_v1_response_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/invoke_contract_v1_response_pb.proto deleted file mode 100644 index 22c88f6326..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/invoke_contract_v1_response_pb.proto +++ /dev/null @@ -1,27 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/web3_transaction_receipt_pb.proto"; - -message InvokeContractV1ResponsePB { - - Web3TransactionReceiptPB transactionReceipt = 472834426; - - optional google.protobuf.Any callOutput = 401260801; - - bool success = 256557056; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/receipt_type_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/receipt_type_pb.proto deleted file mode 100644 index 26c0a392d9..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/receipt_type_pb.proto +++ /dev/null @@ -1,21 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -enum ReceiptTypePB { - ReceiptTypePB_NODE_TX_POOL_ACK = 0; - ReceiptTypePB_LEDGER_BLOCK_ACK = 1; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/run_transaction_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/run_transaction_request_pb.proto deleted file mode 100644 index 89e19e17d6..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/run_transaction_request_pb.proto +++ /dev/null @@ -1,32 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/besu_private_transaction_config_pb.proto"; -import "models/besu_transaction_config_pb.proto"; -import "models/consistency_strategy_pb.proto"; -import "models/web3_signing_credential_pb.proto"; - -message RunTransactionRequestPB { - - Web3SigningCredentialPB web3SigningCredential = 451211679; - - BesuTransactionConfigPB transactionConfig = 478618563; - - ConsistencyStrategyPB consistencyStrategy = 86789548; - - BesuPrivateTransactionConfigPB privateTransactionConfig = 276796542; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/run_transaction_response_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/run_transaction_response_pb.proto deleted file mode 100644 index 60b79b217b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/run_transaction_response_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/web3_transaction_receipt_pb.proto"; - -message RunTransactionResponsePB { - - Web3TransactionReceiptPB transactionReceipt = 472834426; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/sign_transaction_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/sign_transaction_request_pb.proto deleted file mode 100644 index 683024811d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/sign_transaction_request_pb.proto +++ /dev/null @@ -1,27 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message SignTransactionRequestPB { - - string keychainId = 14058372; - - string keychainRef = 101070193; - - // The transaction hash of ledger will be used to fetch the contain. - string transactionHash = 188901646; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/sign_transaction_response_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/sign_transaction_response_pb.proto deleted file mode 100644 index b00c411d46..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/sign_transaction_response_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message SignTransactionResponsePB { - - // The signatures of ledger from the corresponding transaction hash. - string signature = 536713401; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_compiler_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_compiler_pb.proto deleted file mode 100644 index e447cecaac..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_compiler_pb.proto +++ /dev/null @@ -1,24 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message SolidityContractJsonArtifactCompilerPB { - - string name = 3373707; - - string version = 351608024; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_gas_estimates_creation_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_gas_estimates_creation_pb.proto deleted file mode 100644 index b5073addd8..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_gas_estimates_creation_pb.proto +++ /dev/null @@ -1,26 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message SolidityContractJsonArtifactGasEstimatesCreationPB { - - string codeDepositCost = 380743519; - - string executionCost = 384688902; - - string totalCost = 40911568; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_gas_estimates_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_gas_estimates_pb.proto deleted file mode 100644 index bf93685737..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_gas_estimates_pb.proto +++ /dev/null @@ -1,25 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/solidity_contract_json_artifact_gas_estimates_creation_pb.proto"; - -message SolidityContractJsonArtifactGasEstimatesPB { - - SolidityContractJsonArtifactGasEstimatesCreationPB creation = 209809122; - - map external = 210148408; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_pb.proto deleted file mode 100644 index dac8dc88b2..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/solidity_contract_json_artifact_pb.proto +++ /dev/null @@ -1,42 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/solidity_contract_json_artifact_compiler_pb.proto"; -import "models/solidity_contract_json_artifact_gas_estimates_pb.proto"; - -message SolidityContractJsonArtifactPB { - - string contractName = 328784197; - - string metadata = 450004177; - - string bytecode = 256554254; - - string deployedBytecode = 146904872; - - string sourceMap = 87815362; - - string deployedSourceMap = 90090014; - - string sourcePath = 37831970; - - SolidityContractJsonArtifactCompilerPB compiler = 62657378; - - map functionHashes = 363274190; - - SolidityContractJsonArtifactGasEstimatesPB gasEstimates = 228215441; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/watch_blocks_v1_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/watch_blocks_v1_pb.proto deleted file mode 100644 index 62c4c17e5b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/watch_blocks_v1_pb.proto +++ /dev/null @@ -1,24 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -enum WatchBlocksV1PB { - WatchBlocksV1PB_Subscribe = 0; - WatchBlocksV1PB_Next = 1; - WatchBlocksV1PB_Unsubscribe = 2; - WatchBlocksV1PB_Error = 3; - WatchBlocksV1PB_Complete = 4; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/watch_blocks_v1_progress_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/watch_blocks_v1_progress_pb.proto deleted file mode 100644 index af3cdf8c2b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/watch_blocks_v1_progress_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/web3_block_header_pb.proto"; - -message WatchBlocksV1ProgressPB { - - Web3BlockHeaderPB blockHeader = 18691451; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/watch_blocks_v1_request_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/watch_blocks_v1_request_pb.proto deleted file mode 100644 index d95346c7bd..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/watch_blocks_v1_request_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/watch_blocks_v1_pb.proto"; - -message WatchBlocksV1RequestPB { - - WatchBlocksV1PB event = 96891546; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_block_header_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_block_header_pb.proto deleted file mode 100644 index dd2d55351f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_block_header_pb.proto +++ /dev/null @@ -1,49 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/web3_block_header_timestamp_pb.proto"; - -message Web3BlockHeaderPB { - - float number = 497493176; - - string hash = 3195150; - - string parentHash = 245049128; - - string nonce = 105002991; - - string sha3Uncles = 373514458; - - string logsBloom = 399161966; - - string transactionRoot = 189212898; - - string stateRoot = 475330288; - - string receiptRoot = 422939453; - - string miner = 103900799; - - string extraData = 253792294; - - int32 gasLimit = 9229217; - - int32 gasUsed = 190522826; - - Web3BlockHeaderTimestampPB timestamp = 55126294; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_block_header_timestamp_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_block_header_timestamp_pb.proto deleted file mode 100644 index e4782e4d67..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_block_header_timestamp_pb.proto +++ /dev/null @@ -1,20 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message Web3BlockHeaderTimestampPB { - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_cactus_keychain_ref_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_cactus_keychain_ref_pb.proto deleted file mode 100644 index de6ae7a1e7..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_cactus_keychain_ref_pb.proto +++ /dev/null @@ -1,32 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/web3_signing_credential_type_pb.proto"; - -message Web3SigningCredentialCactusKeychainRefPB { - - Web3SigningCredentialTypePB type = 3575610; - - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - string ethAccount = 528332204; - - // The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - string keychainEntryKey = 210645395; - - // The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - string keychainId = 14058372; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_none_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_none_pb.proto deleted file mode 100644 index 0b1a400338..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_none_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/web3_signing_credential_type_pb.proto"; - -message Web3SigningCredentialNonePB { - - Web3SigningCredentialTypePB type = 3575610; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_pb.proto deleted file mode 100644 index 3ecf095691..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_pb.proto +++ /dev/null @@ -1,38 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/web3_signing_credential_cactus_keychain_ref_pb.proto"; -import "models/web3_signing_credential_none_pb.proto"; -import "models/web3_signing_credential_private_key_hex_pb.proto"; -import "models/web3_signing_credential_type_pb.proto"; - -message Web3SigningCredentialPB { - - Web3SigningCredentialTypePB type = 3575610; - - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - string ethAccount = 528332204; - - // The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - string keychainEntryKey = 210645395; - - // The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - string keychainId = 14058372; - - // The HEX encoded private key of an eth account. - string secret = 369406289; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_private_key_hex_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_private_key_hex_pb.proto deleted file mode 100644 index 43649b5e91..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_private_key_hex_pb.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - -import "models/web3_signing_credential_type_pb.proto"; - -message Web3SigningCredentialPrivateKeyHexPB { - - Web3SigningCredentialTypePB type = 3575610; - - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - string ethAccount = 528332204; - - // The HEX encoded private key of an eth account. - string secret = 369406289; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_type_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_type_pb.proto deleted file mode 100644 index b3e6c468eb..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_signing_credential_type_pb.proto +++ /dev/null @@ -1,23 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -enum Web3SigningCredentialTypePB { - Web3SigningCredentialTypePB_CACTUS_KEYCHAIN_REF = 0; - Web3SigningCredentialTypePB_GETH_KEYCHAIN_PASSWORD = 1; - Web3SigningCredentialTypePB_PRIVATE_KEY_HEX = 2; - Web3SigningCredentialTypePB_NONE = 3; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_transaction_receipt_pb.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_transaction_receipt_pb.proto deleted file mode 100644 index b3e7692d10..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/models/web3_transaction_receipt_pb.proto +++ /dev/null @@ -1,38 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu; - -import "google/protobuf/any.proto"; - - -message Web3TransactionReceiptPB { - - bool status = 355610639; - - string transactionHash = 188901646; - - float transactionIndex = 488538260; - - string blockHash = 335211324; - - float blockNumber = 205598263; - - float gasUsed = 190522826; - - optional string contractAddress = 214641282; - - string from = 3151786; - - string to = 3707; - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/services/default_service.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/services/default_service.proto deleted file mode 100644 index 65405d44e2..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/generated/openapi/services/default_service.proto +++ /dev/null @@ -1,120 +0,0 @@ -/* - Hyperledger Cactus Plugin - Connector Besu - - Can perform basic tasks on a Besu ledger - - The version of the OpenAPI document: 2.0.0 - - Generated by OpenAPI Generator: https://openapi-generator.tech -*/ - -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice; - -import "google/protobuf/empty.proto"; -import "models/deploy_contract_solidity_bytecode_no_keychain_v1_request_pb.proto"; -import "models/deploy_contract_solidity_bytecode_v1_request_pb.proto"; -import "models/deploy_contract_solidity_bytecode_v1_response_pb.proto"; -import "models/get_balance_v1_request_pb.proto"; -import "models/get_balance_v1_response_pb.proto"; -import "models/get_besu_record_v1_request_pb.proto"; -import "models/get_besu_record_v1_response_pb.proto"; -import "models/get_block_v1_request_pb.proto"; -import "models/get_block_v1_response_pb.proto"; -import "models/get_past_logs_v1_request_pb.proto"; -import "models/get_past_logs_v1_response_pb.proto"; -import "models/get_transaction_v1_request_pb.proto"; -import "models/get_transaction_v1_response_pb.proto"; -import "models/invoke_contract_v1_request_pb.proto"; -import "models/invoke_contract_v1_response_pb.proto"; -import "models/run_transaction_request_pb.proto"; -import "models/run_transaction_response_pb.proto"; -import "models/sign_transaction_request_pb.proto"; -import "models/sign_transaction_response_pb.proto"; - -service DefaultService { - rpc DeployContractSolBytecodeNoKeychainV1 (DeployContractSolBytecodeNoKeychainV1Request) returns (DeployContractSolidityBytecodeV1ResponsePB); - - rpc DeployContractSolBytecodeV1 (DeployContractSolBytecodeV1Request) returns (DeployContractSolidityBytecodeV1ResponsePB); - - rpc GetBalanceV1 (GetBalanceV1Request) returns (GetBalanceV1ResponsePB); - - rpc GetBesuRecordV1 (GetBesuRecordV1Request) returns (GetBesuRecordV1ResponsePB); - - rpc GetBlockV1 (GetBlockV1Request) returns (GetBlockV1ResponsePB); - - rpc GetOpenApiSpecV1 (google.protobuf.Empty) returns (GetOpenApiSpecV1Response); - - rpc GetPastLogsV1 (GetPastLogsV1Request) returns (GetPastLogsV1ResponsePB); - - rpc GetPrometheusMetricsV1 (google.protobuf.Empty) returns (GetPrometheusMetricsV1Response); - - rpc GetTransactionV1 (GetTransactionV1Request) returns (GetTransactionV1ResponsePB); - - rpc InvokeContractV1 (InvokeContractV1Request) returns (InvokeContractV1ResponsePB); - - rpc RunTransactionV1 (RunTransactionV1Request) returns (RunTransactionResponsePB); - - rpc SignTransactionV1 (SignTransactionV1Request) returns (SignTransactionResponsePB); - -} - -message DeployContractSolBytecodeNoKeychainV1Request { - DeployContractSolidityBytecodeNoKeychainV1RequestPB deployContractSolidityBytecodeNoKeychainV1RequestPB = 1; - -} - -message DeployContractSolBytecodeV1Request { - DeployContractSolidityBytecodeV1RequestPB deployContractSolidityBytecodeV1RequestPB = 1; - -} - -message GetBalanceV1Request { - GetBalanceV1RequestPB getBalanceV1RequestPB = 1; - -} - -message GetBesuRecordV1Request { - GetBesuRecordV1RequestPB getBesuRecordV1RequestPB = 1; - -} - -message GetBlockV1Request { - GetBlockV1RequestPB getBlockV1RequestPB = 1; - -} - -message GetOpenApiSpecV1Response { - string data = 1; -} - -message GetPastLogsV1Request { - GetPastLogsV1RequestPB getPastLogsV1RequestPB = 1; - -} - -message GetPrometheusMetricsV1Response { - string data = 1; -} - -message GetTransactionV1Request { - GetTransactionV1RequestPB getTransactionV1RequestPB = 1; - -} - -message InvokeContractV1Request { - InvokeContractV1RequestPB invokeContractV1RequestPB = 1; - -} - -message RunTransactionV1Request { - RunTransactionRequestPB runTransactionRequestPB = 1; - -} - -message SignTransactionV1Request { - SignTransactionRequestPB signTransactionRequestPB = 1; - -} - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/services/besu-grpc-svc-streams.proto b/packages/cactus-plugin-ledger-connector-besu/src/main/proto/services/besu-grpc-svc-streams.proto deleted file mode 100644 index f0b2f2df61..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/proto/services/besu-grpc-svc-streams.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package org.hyperledger.cacti.plugin.ledger.connector.besu.services.besuservice; - -import "models/watch_blocks_v1_progress_pb.proto"; -import "models/watch_blocks_v1_request_pb.proto"; - -service BesuGrpcSvcStreams { - rpc WatchBlocksV1(stream WatchBlocksV1RequestPB) returns (stream WatchBlocksV1ProgressPB) {}; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/api-client/besu-api-client.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/api-client/besu-api-client.ts deleted file mode 100644 index 463085f681..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/api-client/besu-api-client.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Observable, ReplaySubject } from "rxjs"; -import { finalize } from "rxjs/operators"; -import { Socket, io } from "socket.io-client-fixed-types"; -import { Logger, Checks } from "@hyperledger/cactus-common"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { Constants, ISocketApiClient } from "@hyperledger/cactus-core-api"; -import { - DefaultApi, - WatchBlocksV1, - WatchBlocksV1Progress, -} from "../generated/openapi/typescript-axios"; -import { Configuration } from "../generated/openapi/typescript-axios/configuration"; - -export class BesuApiClientOptions extends Configuration { - readonly logLevel?: LogLevelDesc; - readonly wsApiHost?: string; - readonly wsApiPath?: string; -} - -export class BesuApiClient - extends DefaultApi - implements ISocketApiClient -{ - public static readonly CLASS_NAME = "BesuApiClient"; - - private readonly log: Logger; - private readonly wsApiHost: string; - private readonly wsApiPath: string; - - public get className(): string { - return BesuApiClient.CLASS_NAME; - } - - constructor(public readonly options: BesuApiClientOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.wsApiHost = options.wsApiHost || options.basePath || location.host; - this.wsApiPath = options.wsApiPath || Constants.SocketIoConnectionPathV1; - this.log.debug(`Created ${this.className} OK.`); - this.log.debug(`wsApiHost=${this.wsApiHost}`); - this.log.debug(`wsApiPath=${this.wsApiPath}`); - this.log.debug(`basePath=${this.options.basePath}`); - } - - public watchBlocksV1(): Observable { - const socket: Socket = io(this.wsApiHost, { path: this.wsApiPath }); - const subject = new ReplaySubject(0); - - socket.on(WatchBlocksV1.Next, (data: WatchBlocksV1Progress) => { - subject.next(data); - }); - - socket.on("connect", () => { - console.log("connected OK..."); - socket.emit(WatchBlocksV1.Subscribe); - }); - - socket.connect(); - - return subject.pipe( - finalize(() => { - console.log("FINALIZE - unsubscribing from the stream..."); - socket.emit(WatchBlocksV1.Unsubscribe); - socket.disconnect(); - }), - // TODO: Investigate if we need these below - in theory without these - // it could happen that only the fist subscriber gets the last emitted value - // publishReplay(1), - // refCount(), - ); - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 31cb240ce2..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,2189 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Besu - * Can perform basic tasks on a Besu ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface BesuPrivateTransactionConfig - */ -export interface BesuPrivateTransactionConfig { - /** - * - * @type {string} - * @memberof BesuPrivateTransactionConfig - */ - 'privateFrom': string; - /** - * - * @type {Array} - * @memberof BesuPrivateTransactionConfig - */ - 'privateFor': Array; -} -/** - * - * @export - * @interface BesuTransactionConfig - */ -export interface BesuTransactionConfig { - [key: string]: any; - - /** - * - * @type {string} - * @memberof BesuTransactionConfig - */ - 'rawTransaction'?: string; - /** - * - * @type {Web3BlockHeaderTimestamp} - * @memberof BesuTransactionConfig - */ - 'from'?: Web3BlockHeaderTimestamp; - /** - * - * @type {BesuTransactionConfigTo} - * @memberof BesuTransactionConfig - */ - 'to'?: BesuTransactionConfigTo; - /** - * - * @type {Web3BlockHeaderTimestamp} - * @memberof BesuTransactionConfig - */ - 'value'?: Web3BlockHeaderTimestamp; - /** - * - * @type {Web3BlockHeaderTimestamp} - * @memberof BesuTransactionConfig - */ - 'gas'?: Web3BlockHeaderTimestamp; - /** - * - * @type {Web3BlockHeaderTimestamp} - * @memberof BesuTransactionConfig - */ - 'gasPrice'?: Web3BlockHeaderTimestamp; - /** - * - * @type {number} - * @memberof BesuTransactionConfig - */ - 'nonce'?: number; - /** - * - * @type {BesuTransactionConfigTo} - * @memberof BesuTransactionConfig - */ - 'data'?: BesuTransactionConfigTo; -} -/** - * @type BesuTransactionConfigTo - * @export - */ -export type BesuTransactionConfigTo = string; - -/** - * - * @export - * @interface ConsistencyStrategy - */ -export interface ConsistencyStrategy { - /** - * - * @type {ReceiptType} - * @memberof ConsistencyStrategy - */ - 'receiptType': ReceiptType; - /** - * The amount of milliseconds to wait for the receipt to arrive to the connector. Defaults to 0 which means to wait for an unlimited amount of time. Note that this wait may be interrupted still by other parts of the infrastructure such as load balancers cutting of HTTP requests after some time even if they are the type that is supposed to be kept alive. The question of re-entrance is a broader topic not in scope to discuss here, but it is important to mention it. - * @type {number} - * @memberof ConsistencyStrategy - */ - 'timeoutMs'?: number; - /** - * The number of blocks to wait to be confirmed in addition to the block containing the transaction in question. Note that if the receipt type is set to only wait for node transaction pool ACK and this parameter is set to anything, but zero then the API will not accept the request due to conflicting parameters. - * @type {number} - * @memberof ConsistencyStrategy - */ - 'blockConfirmations': number; -} - - -/** - * - * @export - * @interface DeployContractSolidityBytecodeNoKeychainV1Request - */ -export interface DeployContractSolidityBytecodeNoKeychainV1Request { - /** - * The contract name for retrieve the contracts json on the keychain. - * @type {string} - * @memberof DeployContractSolidityBytecodeNoKeychainV1Request - */ - 'contractName': string; - /** - * The application binary interface of the solidity contract - * @type {Array} - * @memberof DeployContractSolidityBytecodeNoKeychainV1Request - */ - 'contractAbi': Array; - /** - * - * @type {Array} - * @memberof DeployContractSolidityBytecodeNoKeychainV1Request - */ - 'constructorArgs': Array; - /** - * - * @type {Web3SigningCredential} - * @memberof DeployContractSolidityBytecodeNoKeychainV1Request - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode - * @type {string} - * @memberof DeployContractSolidityBytecodeNoKeychainV1Request - */ - 'bytecode': string; - /** - * - * @type {number} - * @memberof DeployContractSolidityBytecodeNoKeychainV1Request - */ - 'gas'?: number; - /** - * - * @type {string} - * @memberof DeployContractSolidityBytecodeNoKeychainV1Request - */ - 'gasPrice'?: string; - /** - * The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - * @type {number} - * @memberof DeployContractSolidityBytecodeNoKeychainV1Request - */ - 'timeoutMs'?: number; - /** - * - * @type {BesuPrivateTransactionConfig} - * @memberof DeployContractSolidityBytecodeNoKeychainV1Request - */ - 'privateTransactionConfig'?: BesuPrivateTransactionConfig; -} -/** - * - * @export - * @interface DeployContractSolidityBytecodeV1Request - */ -export interface DeployContractSolidityBytecodeV1Request { - /** - * The contract name for retrieve the contracts json on the keychain. - * @type {string} - * @memberof DeployContractSolidityBytecodeV1Request - */ - 'contractName': string; - /** - * The application binary interface of the solidity contract - * @type {Array} - * @memberof DeployContractSolidityBytecodeV1Request - */ - 'contractAbi': Array; - /** - * - * @type {Array} - * @memberof DeployContractSolidityBytecodeV1Request - */ - 'constructorArgs': Array; - /** - * - * @type {Web3SigningCredential} - * @memberof DeployContractSolidityBytecodeV1Request - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode - * @type {string} - * @memberof DeployContractSolidityBytecodeV1Request - */ - 'bytecode': string; - /** - * The keychainId for retrieve the contracts json. - * @type {string} - * @memberof DeployContractSolidityBytecodeV1Request - */ - 'keychainId': string; - /** - * - * @type {number} - * @memberof DeployContractSolidityBytecodeV1Request - */ - 'gas'?: number; - /** - * - * @type {string} - * @memberof DeployContractSolidityBytecodeV1Request - */ - 'gasPrice'?: string; - /** - * The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - * @type {number} - * @memberof DeployContractSolidityBytecodeV1Request - */ - 'timeoutMs'?: number; - /** - * - * @type {BesuPrivateTransactionConfig} - * @memberof DeployContractSolidityBytecodeV1Request - */ - 'privateTransactionConfig'?: BesuPrivateTransactionConfig; -} -/** - * - * @export - * @interface DeployContractSolidityBytecodeV1Response - */ -export interface DeployContractSolidityBytecodeV1Response { - /** - * - * @type {Web3TransactionReceipt} - * @memberof DeployContractSolidityBytecodeV1Response - */ - 'transactionReceipt': Web3TransactionReceipt; -} -/** - * - * @export - * @enum {string} - */ - -export const EthContractInvocationType = { - Send: 'SEND', - Call: 'CALL' -} as const; - -export type EthContractInvocationType = typeof EthContractInvocationType[keyof typeof EthContractInvocationType]; - - -/** - * - * @export - * @interface EvmBlock - */ -export interface EvmBlock { - /** - * - * @type {number} - * @memberof EvmBlock - */ - 'number'?: number; - /** - * - * @type {string} - * @memberof EvmBlock - */ - 'hash'?: string; - /** - * - * @type {string} - * @memberof EvmBlock - */ - 'parentHash'?: string; - /** - * - * @type {string} - * @memberof EvmBlock - */ - 'nonce'?: string; - /** - * - * @type {string} - * @memberof EvmBlock - */ - 'sha3Uncles'?: string; - /** - * - * @type {string} - * @memberof EvmBlock - */ - 'logsBloom'?: string; - /** - * - * @type {string} - * @memberof EvmBlock - */ - 'transactionsRoot'?: string; - /** - * - * @type {string} - * @memberof EvmBlock - */ - 'stateRoot'?: string; - /** - * - * @type {string} - * @memberof EvmBlock - */ - 'miner'?: string; - /** - * - * @type {number} - * @memberof EvmBlock - */ - 'difficulty'?: number; - /** - * - * @type {number} - * @memberof EvmBlock - */ - 'totalDifficulty'?: number; - /** - * - * @type {string} - * @memberof EvmBlock - */ - 'extraData'?: string; - /** - * - * @type {number} - * @memberof EvmBlock - */ - 'size'?: number; - /** - * - * @type {number} - * @memberof EvmBlock - */ - 'gasLimit'?: number; - /** - * - * @type {number} - * @memberof EvmBlock - */ - 'gasUsed'?: number; - /** - * - * @type {any} - * @memberof EvmBlock - */ - 'timestamp'?: any; - /** - * - * @type {Array} - * @memberof EvmBlock - */ - 'transactions'?: Array; - /** - * - * @type {Array} - * @memberof EvmBlock - */ - 'uncles'?: Array; -} -/** - * - * @export - * @interface EvmLog - */ -export interface EvmLog { - /** - * - * @type {string} - * @memberof EvmLog - */ - 'address': string; - /** - * - * @type {string} - * @memberof EvmLog - */ - 'data': string; - /** - * - * @type {string} - * @memberof EvmLog - */ - 'blockHash': string; - /** - * - * @type {string} - * @memberof EvmLog - */ - 'transactionHash': string; - /** - * - * @type {Array} - * @memberof EvmLog - */ - 'topics': Array; - /** - * - * @type {number} - * @memberof EvmLog - */ - 'logIndex': number; - /** - * - * @type {number} - * @memberof EvmLog - */ - 'transactionIndex': number; - /** - * - * @type {number} - * @memberof EvmLog - */ - 'blockNumber': number; -} -/** - * - * @export - * @interface EvmTransaction - */ -export interface EvmTransaction { - /** - * - * @type {string} - * @memberof EvmTransaction - */ - 'hash'?: string; - /** - * - * @type {number} - * @memberof EvmTransaction - */ - 'nonce'?: number; - /** - * - * @type {any} - * @memberof EvmTransaction - */ - 'blockHash'?: any; - /** - * - * @type {any} - * @memberof EvmTransaction - */ - 'blockNumber'?: any; - /** - * - * @type {any} - * @memberof EvmTransaction - */ - 'transactionIndex'?: any; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - 'from'?: string; - /** - * - * @type {any} - * @memberof EvmTransaction - */ - 'to'?: any; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - 'value'?: string; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - 'gasPrice'?: string; - /** - * - * @type {number} - * @memberof EvmTransaction - */ - 'gas'?: number; - /** - * - * @type {string} - * @memberof EvmTransaction - */ - 'input'?: string; -} -/** - * - * @export - * @interface GetBalanceV1Request - */ -export interface GetBalanceV1Request { - /** - * - * @type {string} - * @memberof GetBalanceV1Request - */ - 'address': string; - /** - * - * @type {any} - * @memberof GetBalanceV1Request - */ - 'defaultBlock'?: any; -} -/** - * - * @export - * @interface GetBalanceV1Response - */ -export interface GetBalanceV1Response { - /** - * - * @type {string} - * @memberof GetBalanceV1Response - */ - 'balance': string; -} -/** - * - * @export - * @interface GetBesuRecordV1Request - */ -export interface GetBesuRecordV1Request { - /** - * - * @type {InvokeContractV1Request} - * @memberof GetBesuRecordV1Request - */ - 'invokeCall'?: InvokeContractV1Request; - /** - * - * @type {string} - * @memberof GetBesuRecordV1Request - */ - 'transactionHash'?: string; -} -/** - * - * @export - * @interface GetBesuRecordV1Response - */ -export interface GetBesuRecordV1Response { - /** - * - * @type {string} - * @memberof GetBesuRecordV1Response - */ - 'ledgerId'?: string; - /** - * - * @type {string} - * @memberof GetBesuRecordV1Response - */ - 'stateContract'?: string; - /** - * - * @type {any} - * @memberof GetBesuRecordV1Response - */ - 'transactionInputData'?: any; - /** - * - * @type {any} - * @memberof GetBesuRecordV1Response - */ - 'callOutput'?: any; -} -/** - * - * @export - * @interface GetBlockV1Request - */ -export interface GetBlockV1Request { - /** - * - * @type {any} - * @memberof GetBlockV1Request - */ - 'blockHashOrBlockNumber': any; -} -/** - * - * @export - * @interface GetBlockV1Response - */ -export interface GetBlockV1Response { - /** - * - * @type {EvmBlock} - * @memberof GetBlockV1Response - */ - 'block': EvmBlock; -} -/** - * - * @export - * @interface GetPastLogsV1Request - */ -export interface GetPastLogsV1Request { - /** - * - * @type {any} - * @memberof GetPastLogsV1Request - */ - 'toBlock'?: any; - /** - * - * @type {any} - * @memberof GetPastLogsV1Request - */ - 'fromBlock'?: any; - /** - * - * @type {any} - * @memberof GetPastLogsV1Request - */ - 'address'?: any; - /** - * - * @type {Array} - * @memberof GetPastLogsV1Request - */ - 'topics'?: Array; -} -/** - * - * @export - * @interface GetPastLogsV1Response - */ -export interface GetPastLogsV1Response { - /** - * - * @type {Array} - * @memberof GetPastLogsV1Response - */ - 'logs': Array; -} -/** - * - * @export - * @interface GetTransactionV1Request - */ -export interface GetTransactionV1Request { - /** - * - * @type {string} - * @memberof GetTransactionV1Request - */ - 'transactionHash': string; -} -/** - * - * @export - * @interface GetTransactionV1Response - */ -export interface GetTransactionV1Response { - /** - * - * @type {EvmTransaction} - * @memberof GetTransactionV1Response - */ - 'transaction': EvmTransaction; -} -/** - * - * @export - * @interface InvokeContractV1Request - */ -export interface InvokeContractV1Request { - /** - * - * @type {string} - * @memberof InvokeContractV1Request - */ - 'contractName': string; - /** - * - * @type {Web3SigningCredential} - * @memberof InvokeContractV1Request - */ - 'signingCredential': Web3SigningCredential; - /** - * - * @type {EthContractInvocationType} - * @memberof InvokeContractV1Request - */ - 'invocationType': EthContractInvocationType; - /** - * The name of the contract method to invoke. - * @type {string} - * @memberof InvokeContractV1Request - */ - 'methodName': string; - /** - * The list of arguments to pass in to the contract method being invoked. - * @type {Array} - * @memberof InvokeContractV1Request - */ - 'params': Array; - /** - * The application binary interface of the solidity contract, optional parameter - * @type {Array} - * @memberof InvokeContractV1Request - */ - 'contractAbi'?: Array; - /** - * Address of the solidity contract, optional parameter - * @type {string} - * @memberof InvokeContractV1Request - */ - 'contractAddress'?: string; - /** - * - * @type {Web3BlockHeaderTimestamp} - * @memberof InvokeContractV1Request - */ - 'value'?: Web3BlockHeaderTimestamp; - /** - * - * @type {Web3BlockHeaderTimestamp} - * @memberof InvokeContractV1Request - */ - 'gas'?: Web3BlockHeaderTimestamp; - /** - * - * @type {Web3BlockHeaderTimestamp} - * @memberof InvokeContractV1Request - */ - 'gasPrice'?: Web3BlockHeaderTimestamp; - /** - * - * @type {number} - * @memberof InvokeContractV1Request - */ - 'nonce'?: number; - /** - * The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND - * @type {number} - * @memberof InvokeContractV1Request - */ - 'timeoutMs'?: number; - /** - * The keychainId for retrieve the contracts json. - * @type {string} - * @memberof InvokeContractV1Request - */ - 'keychainId'?: string; - /** - * - * @type {BesuPrivateTransactionConfig} - * @memberof InvokeContractV1Request - */ - 'privateTransactionConfig'?: BesuPrivateTransactionConfig; -} - - -/** - * - * @export - * @interface InvokeContractV1Response - */ -export interface InvokeContractV1Response { - /** - * - * @type {Web3TransactionReceipt} - * @memberof InvokeContractV1Response - */ - 'transactionReceipt'?: Web3TransactionReceipt; - /** - * - * @type {any} - * @memberof InvokeContractV1Response - */ - 'callOutput'?: any; - /** - * - * @type {boolean} - * @memberof InvokeContractV1Response - */ - 'success': boolean; -} -/** - * Enumerates the possible types of receipts that can be waited for by someone or something that has requested the execution of a transaction on a ledger. - * @export - * @enum {string} - */ - -export const ReceiptType = { - NodeTxPoolAck: 'NODE_TX_POOL_ACK', - LedgerBlockAck: 'LEDGER_BLOCK_ACK' -} as const; - -export type ReceiptType = typeof ReceiptType[keyof typeof ReceiptType]; - - -/** - * - * @export - * @interface RunTransactionRequest - */ -export interface RunTransactionRequest { - /** - * - * @type {Web3SigningCredential} - * @memberof RunTransactionRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {BesuTransactionConfig} - * @memberof RunTransactionRequest - */ - 'transactionConfig': BesuTransactionConfig; - /** - * - * @type {ConsistencyStrategy} - * @memberof RunTransactionRequest - */ - 'consistencyStrategy': ConsistencyStrategy; - /** - * - * @type {BesuPrivateTransactionConfig} - * @memberof RunTransactionRequest - */ - 'privateTransactionConfig'?: BesuPrivateTransactionConfig; -} -/** - * - * @export - * @interface RunTransactionResponse - */ -export interface RunTransactionResponse { - /** - * - * @type {Web3TransactionReceipt} - * @memberof RunTransactionResponse - */ - 'transactionReceipt': Web3TransactionReceipt; -} -/** - * - * @export - * @interface SignTransactionRequest - */ -export interface SignTransactionRequest { - /** - * - * @type {string} - * @memberof SignTransactionRequest - */ - 'keychainId': string; - /** - * - * @type {string} - * @memberof SignTransactionRequest - */ - 'keychainRef': string; - /** - * The transaction hash of ledger will be used to fetch the contain. - * @type {string} - * @memberof SignTransactionRequest - */ - 'transactionHash': string; -} -/** - * - * @export - * @interface SignTransactionResponse - */ -export interface SignTransactionResponse { - /** - * The signatures of ledger from the corresponding transaction hash. - * @type {string} - * @memberof SignTransactionResponse - */ - 'signature': string; -} -/** - * - * @export - * @interface SolidityContractJsonArtifact - */ -export interface SolidityContractJsonArtifact { - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'contractName': string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'metadata'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'bytecode'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'deployedBytecode'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'sourceMap'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'deployedSourceMap'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'sourcePath'?: string; - /** - * - * @type {SolidityContractJsonArtifactCompiler} - * @memberof SolidityContractJsonArtifact - */ - 'compiler'?: SolidityContractJsonArtifactCompiler; - /** - * - * @type {{ [key: string]: any; }} - * @memberof SolidityContractJsonArtifact - */ - 'functionHashes'?: { [key: string]: any; }; - /** - * - * @type {SolidityContractJsonArtifactGasEstimates} - * @memberof SolidityContractJsonArtifact - */ - 'gasEstimates'?: SolidityContractJsonArtifactGasEstimates; -} -/** - * - * @export - * @interface SolidityContractJsonArtifactCompiler - */ -export interface SolidityContractJsonArtifactCompiler { - [key: string]: any; - - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifactCompiler - */ - 'name'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifactCompiler - */ - 'version'?: string; -} -/** - * - * @export - * @interface SolidityContractJsonArtifactGasEstimates - */ -export interface SolidityContractJsonArtifactGasEstimates { - /** - * - * @type {SolidityContractJsonArtifactGasEstimatesCreation} - * @memberof SolidityContractJsonArtifactGasEstimates - */ - 'creation'?: SolidityContractJsonArtifactGasEstimatesCreation; - /** - * - * @type {{ [key: string]: any; }} - * @memberof SolidityContractJsonArtifactGasEstimates - */ - 'external'?: { [key: string]: any; }; -} -/** - * - * @export - * @interface SolidityContractJsonArtifactGasEstimatesCreation - */ -export interface SolidityContractJsonArtifactGasEstimatesCreation { - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifactGasEstimatesCreation - */ - 'codeDepositCost'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifactGasEstimatesCreation - */ - 'executionCost'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifactGasEstimatesCreation - */ - 'totalCost'?: string; -} -/** - * - * @export - * @enum {string} - */ - -export const WatchBlocksV1 = { - Subscribe: 'org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Subscribe', - Next: 'org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Next', - Unsubscribe: 'org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Unsubscribe', - Error: 'org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Error', - Complete: 'org.hyperledger.cactus.api.async.besu.WatchBlocksV1.Complete' -} as const; - -export type WatchBlocksV1 = typeof WatchBlocksV1[keyof typeof WatchBlocksV1]; - - -/** - * - * @export - * @interface WatchBlocksV1Progress - */ -export interface WatchBlocksV1Progress { - /** - * - * @type {Web3BlockHeader} - * @memberof WatchBlocksV1Progress - */ - 'blockHeader': Web3BlockHeader; -} -/** - * - * @export - * @interface WatchBlocksV1Request - */ -export interface WatchBlocksV1Request { - /** - * - * @type {WatchBlocksV1} - * @memberof WatchBlocksV1Request - */ - 'event': WatchBlocksV1; -} - - -/** - * - * @export - * @interface Web3BlockHeader - */ -export interface Web3BlockHeader { - /** - * - * @type {number} - * @memberof Web3BlockHeader - */ - 'number': number; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'hash': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'parentHash': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'nonce': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'sha3Uncles': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'logsBloom': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'transactionRoot': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'stateRoot': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'receiptRoot': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'miner': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'extraData': string; - /** - * - * @type {number} - * @memberof Web3BlockHeader - */ - 'gasLimit': number; - /** - * - * @type {number} - * @memberof Web3BlockHeader - */ - 'gasUsed': number; - /** - * - * @type {Web3BlockHeaderTimestamp} - * @memberof Web3BlockHeader - */ - 'timestamp': Web3BlockHeaderTimestamp; -} -/** - * @type Web3BlockHeaderTimestamp - * @export - */ -export type Web3BlockHeaderTimestamp = number | string; - -/** - * @type Web3SigningCredential - * @export - */ -export type Web3SigningCredential = Web3SigningCredentialCactusKeychainRef | Web3SigningCredentialNone | Web3SigningCredentialPrivateKeyHex; - -/** - * - * @export - * @interface Web3SigningCredentialCactusKeychainRef - */ -export interface Web3SigningCredentialCactusKeychainRef { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'ethAccount': string; - /** - * The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainEntryKey': string; - /** - * The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainId': string; -} - - -/** - * Using this denotes that there is no signing required because the transaction is pre-signed. - * @export - * @interface Web3SigningCredentialNone - */ -export interface Web3SigningCredentialNone { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialNone - */ - 'type': Web3SigningCredentialType; -} - - -/** - * - * @export - * @interface Web3SigningCredentialPrivateKeyHex - */ -export interface Web3SigningCredentialPrivateKeyHex { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'ethAccount': string; - /** - * The HEX encoded private key of an eth account. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'secret': string; -} - - -/** - * - * @export - * @enum {string} - */ - -export const Web3SigningCredentialType = { - CactusKeychainRef: 'CACTUS_KEYCHAIN_REF', - GethKeychainPassword: 'GETH_KEYCHAIN_PASSWORD', - PrivateKeyHex: 'PRIVATE_KEY_HEX', - None: 'NONE' -} as const; - -export type Web3SigningCredentialType = typeof Web3SigningCredentialType[keyof typeof Web3SigningCredentialType]; - - -/** - * - * @export - * @interface Web3TransactionReceipt - */ -export interface Web3TransactionReceipt { - [key: string]: any; - - /** - * - * @type {boolean} - * @memberof Web3TransactionReceipt - */ - 'status': boolean; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'transactionHash': string; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'transactionIndex': number; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'blockHash': string; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'blockNumber': number; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'gasUsed': number; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'contractAddress'?: string | null; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'from': string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'to': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deploys the bytecode of a Solidity contract without the need of keychain - * @param {DeployContractSolidityBytecodeNoKeychainV1Request} [deployContractSolidityBytecodeNoKeychainV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractSolBytecodeNoKeychainV1: async (deployContractSolidityBytecodeNoKeychainV1Request?: DeployContractSolidityBytecodeNoKeychainV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deployContractSolidityBytecodeNoKeychainV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractSolidityBytecodeV1Request} [deployContractSolidityBytecodeV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractSolBytecodeV1: async (deployContractSolidityBytecodeV1Request?: DeployContractSolidityBytecodeV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deployContractSolidityBytecodeV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Return balance of an address of a given block - * @param {GetBalanceV1Request} [getBalanceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBalanceV1: async (getBalanceV1Request?: GetBalanceV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getBalanceV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves an arbitrary record (any piece of information) from the ledger. Ledger records can be call outputs, transaction input, etc. - * @param {GetBesuRecordV1Request} [getBesuRecordV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBesuRecordV1: async (getBesuRecordV1Request?: GetBesuRecordV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getBesuRecordV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Returns a block matching the block - * @param {GetBlockV1Request} [getBlockV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBlockV1: async (getBlockV1Request?: GetBlockV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getBlockV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Retrieves the .json file that contains the OpenAPI specification for the plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOpenApiSpecV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Gets past logs, matching the given options. - * @param {GetPastLogsV1Request} [getPastLogsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPastLogsV1: async (getPastLogsV1Request?: GetPastLogsV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getPastLogsV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Executes a transaction on a besu ledger - * @param {GetTransactionV1Request} [getTransactionV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTransactionV1: async (getTransactionV1Request?: GetTransactionV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getTransactionV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Invokes a contract on a besu ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContractV1: async (invokeContractV1Request?: InvokeContractV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(invokeContractV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Executes a transaction on a besu ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runTransactionV1: async (runTransactionRequest?: RunTransactionRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(runTransactionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Obtain signatures of ledger from the corresponding transaction hash. - * @summary Obtain signatures of ledger from the corresponding transaction hash. - * @param {SignTransactionRequest} signTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - signTransactionV1: async (signTransactionRequest: SignTransactionRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'signTransactionRequest' is not null or undefined - assertParamExists('signTransactionV1', 'signTransactionRequest', signTransactionRequest) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(signTransactionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deploys the bytecode of a Solidity contract without the need of keychain - * @param {DeployContractSolidityBytecodeNoKeychainV1Request} [deployContractSolidityBytecodeNoKeychainV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deployContractSolBytecodeNoKeychainV1(deployContractSolidityBytecodeNoKeychainV1Request?: DeployContractSolidityBytecodeNoKeychainV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deployContractSolBytecodeNoKeychainV1(deployContractSolidityBytecodeNoKeychainV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractSolidityBytecodeV1Request} [deployContractSolidityBytecodeV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deployContractSolBytecodeV1(deployContractSolidityBytecodeV1Request?: DeployContractSolidityBytecodeV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deployContractSolBytecodeV1(deployContractSolidityBytecodeV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Return balance of an address of a given block - * @param {GetBalanceV1Request} [getBalanceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBalanceV1(getBalanceV1Request?: GetBalanceV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getBalanceV1(getBalanceV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves an arbitrary record (any piece of information) from the ledger. Ledger records can be call outputs, transaction input, etc. - * @param {GetBesuRecordV1Request} [getBesuRecordV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBesuRecordV1(getBesuRecordV1Request?: GetBesuRecordV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getBesuRecordV1(getBesuRecordV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Returns a block matching the block - * @param {GetBlockV1Request} [getBlockV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBlockV1(getBlockV1Request?: GetBlockV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getBlockV1(getBlockV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Retrieves the .json file that contains the OpenAPI specification for the plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getOpenApiSpecV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOpenApiSpecV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Gets past logs, matching the given options. - * @param {GetPastLogsV1Request} [getPastLogsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPastLogsV1(getPastLogsV1Request?: GetPastLogsV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPastLogsV1(getPastLogsV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Executes a transaction on a besu ledger - * @param {GetTransactionV1Request} [getTransactionV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTransactionV1(getTransactionV1Request?: GetTransactionV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTransactionV1(getTransactionV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Invokes a contract on a besu ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async invokeContractV1(invokeContractV1Request?: InvokeContractV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.invokeContractV1(invokeContractV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Executes a transaction on a besu ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async runTransactionV1(runTransactionRequest?: RunTransactionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.runTransactionV1(runTransactionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Obtain signatures of ledger from the corresponding transaction hash. - * @summary Obtain signatures of ledger from the corresponding transaction hash. - * @param {SignTransactionRequest} signTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async signTransactionV1(signTransactionRequest: SignTransactionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.signTransactionV1(signTransactionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deploys the bytecode of a Solidity contract without the need of keychain - * @param {DeployContractSolidityBytecodeNoKeychainV1Request} [deployContractSolidityBytecodeNoKeychainV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractSolBytecodeNoKeychainV1(deployContractSolidityBytecodeNoKeychainV1Request?: DeployContractSolidityBytecodeNoKeychainV1Request, options?: any): AxiosPromise { - return localVarFp.deployContractSolBytecodeNoKeychainV1(deployContractSolidityBytecodeNoKeychainV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractSolidityBytecodeV1Request} [deployContractSolidityBytecodeV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractSolBytecodeV1(deployContractSolidityBytecodeV1Request?: DeployContractSolidityBytecodeV1Request, options?: any): AxiosPromise { - return localVarFp.deployContractSolBytecodeV1(deployContractSolidityBytecodeV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Return balance of an address of a given block - * @param {GetBalanceV1Request} [getBalanceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBalanceV1(getBalanceV1Request?: GetBalanceV1Request, options?: any): AxiosPromise { - return localVarFp.getBalanceV1(getBalanceV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves an arbitrary record (any piece of information) from the ledger. Ledger records can be call outputs, transaction input, etc. - * @param {GetBesuRecordV1Request} [getBesuRecordV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBesuRecordV1(getBesuRecordV1Request?: GetBesuRecordV1Request, options?: any): AxiosPromise { - return localVarFp.getBesuRecordV1(getBesuRecordV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Returns a block matching the block - * @param {GetBlockV1Request} [getBlockV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBlockV1(getBlockV1Request?: GetBlockV1Request, options?: any): AxiosPromise { - return localVarFp.getBlockV1(getBlockV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieves the .json file that contains the OpenAPI specification for the plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOpenApiSpecV1(options?: any): AxiosPromise { - return localVarFp.getOpenApiSpecV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Gets past logs, matching the given options. - * @param {GetPastLogsV1Request} [getPastLogsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPastLogsV1(getPastLogsV1Request?: GetPastLogsV1Request, options?: any): AxiosPromise { - return localVarFp.getPastLogsV1(getPastLogsV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Executes a transaction on a besu ledger - * @param {GetTransactionV1Request} [getTransactionV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTransactionV1(getTransactionV1Request?: GetTransactionV1Request, options?: any): AxiosPromise { - return localVarFp.getTransactionV1(getTransactionV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Invokes a contract on a besu ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContractV1(invokeContractV1Request?: InvokeContractV1Request, options?: any): AxiosPromise { - return localVarFp.invokeContractV1(invokeContractV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Executes a transaction on a besu ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runTransactionV1(runTransactionRequest?: RunTransactionRequest, options?: any): AxiosPromise { - return localVarFp.runTransactionV1(runTransactionRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Obtain signatures of ledger from the corresponding transaction hash. - * @summary Obtain signatures of ledger from the corresponding transaction hash. - * @param {SignTransactionRequest} signTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - signTransactionV1(signTransactionRequest: SignTransactionRequest, options?: any): AxiosPromise { - return localVarFp.signTransactionV1(signTransactionRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deploys the bytecode of a Solidity contract without the need of keychain - * @param {DeployContractSolidityBytecodeNoKeychainV1Request} [deployContractSolidityBytecodeNoKeychainV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deployContractSolBytecodeNoKeychainV1(deployContractSolidityBytecodeNoKeychainV1Request?: DeployContractSolidityBytecodeNoKeychainV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deployContractSolBytecodeNoKeychainV1(deployContractSolidityBytecodeNoKeychainV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractSolidityBytecodeV1Request} [deployContractSolidityBytecodeV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deployContractSolBytecodeV1(deployContractSolidityBytecodeV1Request?: DeployContractSolidityBytecodeV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deployContractSolBytecodeV1(deployContractSolidityBytecodeV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Return balance of an address of a given block - * @param {GetBalanceV1Request} [getBalanceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getBalanceV1(getBalanceV1Request?: GetBalanceV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getBalanceV1(getBalanceV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves an arbitrary record (any piece of information) from the ledger. Ledger records can be call outputs, transaction input, etc. - * @param {GetBesuRecordV1Request} [getBesuRecordV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getBesuRecordV1(getBesuRecordV1Request?: GetBesuRecordV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getBesuRecordV1(getBesuRecordV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Returns a block matching the block - * @param {GetBlockV1Request} [getBlockV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getBlockV1(getBlockV1Request?: GetBlockV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getBlockV1(getBlockV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Retrieves the .json file that contains the OpenAPI specification for the plugin. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getOpenApiSpecV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getOpenApiSpecV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Gets past logs, matching the given options. - * @param {GetPastLogsV1Request} [getPastLogsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPastLogsV1(getPastLogsV1Request?: GetPastLogsV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPastLogsV1(getPastLogsV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Executes a transaction on a besu ledger - * @param {GetTransactionV1Request} [getTransactionV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getTransactionV1(getTransactionV1Request?: GetTransactionV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getTransactionV1(getTransactionV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Invokes a contract on a besu ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public invokeContractV1(invokeContractV1Request?: InvokeContractV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).invokeContractV1(invokeContractV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Executes a transaction on a besu ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public runTransactionV1(runTransactionRequest?: RunTransactionRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).runTransactionV1(runTransactionRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Obtain signatures of ledger from the corresponding transaction hash. - * @summary Obtain signatures of ledger from the corresponding transaction hash. - * @param {SignTransactionRequest} signTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public signTransactionV1(signTransactionRequest: SignTransactionRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).signTransactionV1(signTransactionRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 296ff3bc90..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Besu - * Can perform basic tasks on a Besu ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 15911e772f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Besu - * Can perform basic tasks on a Besu ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 3954e5b8dd..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Besu - * Can perform basic tasks on a Besu ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 05d45af6ea..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Besu - * Can perform basic tasks on a Besu ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/any.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/any.ts deleted file mode 100644 index d3816d414f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/any.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: google/protobuf/any.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as pb_1 from "google-protobuf"; -export namespace google.protobuf { - export class Any extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - type_url?: string; - value?: Uint8Array; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("type_url" in data && data.type_url != undefined) { - this.type_url = data.type_url; - } - if ("value" in data && data.value != undefined) { - this.value = data.value; - } - } - } - get type_url() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set type_url(value: string) { - pb_1.Message.setField(this, 1, value); - } - get value() { - return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; - } - set value(value: Uint8Array) { - pb_1.Message.setField(this, 2, value); - } - static fromObject(data: { - type_url?: string; - value?: Uint8Array; - }): Any { - const message = new Any({}); - if (data.type_url != null) { - message.type_url = data.type_url; - } - if (data.value != null) { - message.value = data.value; - } - return message; - } - toObject() { - const data: { - type_url?: string; - value?: Uint8Array; - } = {}; - if (this.type_url != null) { - data.type_url = this.type_url; - } - if (this.value != null) { - data.value = this.value; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.type_url.length) - writer.writeString(1, this.type_url); - if (this.value.length) - writer.writeBytes(2, this.value); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Any { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Any(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.type_url = reader.readString(); - break; - case 2: - message.value = reader.readBytes(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Any { - return Any.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/empty.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/empty.ts deleted file mode 100644 index 7b5a551bf9..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/empty.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: google/protobuf/empty.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as pb_1 from "google-protobuf"; -export namespace google.protobuf { - export class Empty extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): Empty { - const message = new Empty({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Empty { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Empty(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Empty { - return Empty.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/besu_private_transaction_config_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/besu_private_transaction_config_pb.ts deleted file mode 100644 index e02638d4f2..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/besu_private_transaction_config_pb.ts +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/besu_private_transaction_config_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class BesuPrivateTransactionConfigPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - privateFrom?: string; - privateFor?: dependency_1.google.protobuf.Any[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [265462717], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("privateFrom" in data && data.privateFrom != undefined) { - this.privateFrom = data.privateFrom; - } - if ("privateFor" in data && data.privateFor != undefined) { - this.privateFor = data.privateFor; - } - } - } - get privateFrom() { - return pb_1.Message.getFieldWithDefault(this, 360593360, "") as string; - } - set privateFrom(value: string) { - pb_1.Message.setField(this, 360593360, value); - } - get privateFor() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 265462717) as dependency_1.google.protobuf.Any[]; - } - set privateFor(value: dependency_1.google.protobuf.Any[]) { - pb_1.Message.setRepeatedWrapperField(this, 265462717, value); - } - static fromObject(data: { - privateFrom?: string; - privateFor?: ReturnType[]; - }): BesuPrivateTransactionConfigPB { - const message = new BesuPrivateTransactionConfigPB({}); - if (data.privateFrom != null) { - message.privateFrom = data.privateFrom; - } - if (data.privateFor != null) { - message.privateFor = data.privateFor.map(item => dependency_1.google.protobuf.Any.fromObject(item)); - } - return message; - } - toObject() { - const data: { - privateFrom?: string; - privateFor?: ReturnType[]; - } = {}; - if (this.privateFrom != null) { - data.privateFrom = this.privateFrom; - } - if (this.privateFor != null) { - data.privateFor = this.privateFor.map((item: dependency_1.google.protobuf.Any) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.privateFrom.length) - writer.writeString(360593360, this.privateFrom); - if (this.privateFor.length) - writer.writeRepeatedMessage(265462717, this.privateFor, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BesuPrivateTransactionConfigPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BesuPrivateTransactionConfigPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 360593360: - message.privateFrom = reader.readString(); - break; - case 265462717: - reader.readMessage(message.privateFor, () => pb_1.Message.addToRepeatedWrapperField(message, 265462717, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): BesuPrivateTransactionConfigPB { - return BesuPrivateTransactionConfigPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/besu_transaction_config_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/besu_transaction_config_pb.ts deleted file mode 100644 index 03ecb7278e..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/besu_transaction_config_pb.ts +++ /dev/null @@ -1,257 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/besu_transaction_config_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./besu_transaction_config_to_pb"; -import * as dependency_3 from "./web3_block_header_timestamp_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class BesuTransactionConfigPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - rawTransaction?: string; - from?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - to?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB; - value?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - gas?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - gasPrice?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - nonce?: number; - data?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("rawTransaction" in data && data.rawTransaction != undefined) { - this.rawTransaction = data.rawTransaction; - } - if ("from" in data && data.from != undefined) { - this.from = data.from; - } - if ("to" in data && data.to != undefined) { - this.to = data.to; - } - if ("value" in data && data.value != undefined) { - this.value = data.value; - } - if ("gas" in data && data.gas != undefined) { - this.gas = data.gas; - } - if ("gasPrice" in data && data.gasPrice != undefined) { - this.gasPrice = data.gasPrice; - } - if ("nonce" in data && data.nonce != undefined) { - this.nonce = data.nonce; - } - if ("data" in data && data.data != undefined) { - this.data = data.data; - } - } - } - get rawTransaction() { - return pb_1.Message.getFieldWithDefault(this, 185047449, "") as string; - } - set rawTransaction(value: string) { - pb_1.Message.setField(this, 185047449, value); - } - get from() { - return pb_1.Message.getWrapperField(this, dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB, 3151786) as dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - } - set from(value: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB) { - pb_1.Message.setWrapperField(this, 3151786, value); - } - get has_from() { - return pb_1.Message.getField(this, 3151786) != null; - } - get to() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB, 3707) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB; - } - set to(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB) { - pb_1.Message.setWrapperField(this, 3707, value); - } - get has_to() { - return pb_1.Message.getField(this, 3707) != null; - } - get value() { - return pb_1.Message.getWrapperField(this, dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB, 111972721) as dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - } - set value(value: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB) { - pb_1.Message.setWrapperField(this, 111972721, value); - } - get has_value() { - return pb_1.Message.getField(this, 111972721) != null; - } - get gas() { - return pb_1.Message.getWrapperField(this, dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB, 102105) as dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - } - set gas(value: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB) { - pb_1.Message.setWrapperField(this, 102105, value); - } - get has_gas() { - return pb_1.Message.getField(this, 102105) != null; - } - get gasPrice() { - return pb_1.Message.getWrapperField(this, dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB, 5271059) as dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - } - set gasPrice(value: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB) { - pb_1.Message.setWrapperField(this, 5271059, value); - } - get has_gasPrice() { - return pb_1.Message.getField(this, 5271059) != null; - } - get nonce() { - return pb_1.Message.getFieldWithDefault(this, 105002991, 0) as number; - } - set nonce(value: number) { - pb_1.Message.setField(this, 105002991, value); - } - get data() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB, 3076010) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB; - } - set data(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB) { - pb_1.Message.setWrapperField(this, 3076010, value); - } - get has_data() { - return pb_1.Message.getField(this, 3076010) != null; - } - static fromObject(data: { - rawTransaction?: string; - from?: ReturnType; - to?: ReturnType; - value?: ReturnType; - gas?: ReturnType; - gasPrice?: ReturnType; - nonce?: number; - data?: ReturnType; - }): BesuTransactionConfigPB { - const message = new BesuTransactionConfigPB({}); - if (data.rawTransaction != null) { - message.rawTransaction = data.rawTransaction; - } - if (data.from != null) { - message.from = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.fromObject(data.from); - } - if (data.to != null) { - message.to = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB.fromObject(data.to); - } - if (data.value != null) { - message.value = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.fromObject(data.value); - } - if (data.gas != null) { - message.gas = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.fromObject(data.gas); - } - if (data.gasPrice != null) { - message.gasPrice = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.fromObject(data.gasPrice); - } - if (data.nonce != null) { - message.nonce = data.nonce; - } - if (data.data != null) { - message.data = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB.fromObject(data.data); - } - return message; - } - toObject() { - const data: { - rawTransaction?: string; - from?: ReturnType; - to?: ReturnType; - value?: ReturnType; - gas?: ReturnType; - gasPrice?: ReturnType; - nonce?: number; - data?: ReturnType; - } = {}; - if (this.rawTransaction != null) { - data.rawTransaction = this.rawTransaction; - } - if (this.from != null) { - data.from = this.from.toObject(); - } - if (this.to != null) { - data.to = this.to.toObject(); - } - if (this.value != null) { - data.value = this.value.toObject(); - } - if (this.gas != null) { - data.gas = this.gas.toObject(); - } - if (this.gasPrice != null) { - data.gasPrice = this.gasPrice.toObject(); - } - if (this.nonce != null) { - data.nonce = this.nonce; - } - if (this.data != null) { - data.data = this.data.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.rawTransaction.length) - writer.writeString(185047449, this.rawTransaction); - if (this.has_from) - writer.writeMessage(3151786, this.from, () => this.from.serialize(writer)); - if (this.has_to) - writer.writeMessage(3707, this.to, () => this.to.serialize(writer)); - if (this.has_value) - writer.writeMessage(111972721, this.value, () => this.value.serialize(writer)); - if (this.has_gas) - writer.writeMessage(102105, this.gas, () => this.gas.serialize(writer)); - if (this.has_gasPrice) - writer.writeMessage(5271059, this.gasPrice, () => this.gasPrice.serialize(writer)); - if (this.nonce != 0) - writer.writeFloat(105002991, this.nonce); - if (this.has_data) - writer.writeMessage(3076010, this.data, () => this.data.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BesuTransactionConfigPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BesuTransactionConfigPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 185047449: - message.rawTransaction = reader.readString(); - break; - case 3151786: - reader.readMessage(message.from, () => message.from = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.deserialize(reader)); - break; - case 3707: - reader.readMessage(message.to, () => message.to = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB.deserialize(reader)); - break; - case 111972721: - reader.readMessage(message.value, () => message.value = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.deserialize(reader)); - break; - case 102105: - reader.readMessage(message.gas, () => message.gas = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.deserialize(reader)); - break; - case 5271059: - reader.readMessage(message.gasPrice, () => message.gasPrice = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.deserialize(reader)); - break; - case 105002991: - message.nonce = reader.readFloat(); - break; - case 3076010: - reader.readMessage(message.data, () => message.data = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigToPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): BesuTransactionConfigPB { - return BesuTransactionConfigPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/besu_transaction_config_to_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/besu_transaction_config_to_pb.ts deleted file mode 100644 index 4b286db032..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/besu_transaction_config_to_pb.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/besu_transaction_config_to_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class BesuTransactionConfigToPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): BesuTransactionConfigToPB { - const message = new BesuTransactionConfigToPB({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BesuTransactionConfigToPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BesuTransactionConfigToPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): BesuTransactionConfigToPB { - return BesuTransactionConfigToPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/consistency_strategy_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/consistency_strategy_pb.ts deleted file mode 100644 index b2aa6e3f76..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/consistency_strategy_pb.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/consistency_strategy_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./receipt_type_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class ConsistencyStrategyPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - receiptType?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.ReceiptTypePB; - timeoutMs?: number; - blockConfirmations?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("receiptType" in data && data.receiptType != undefined) { - this.receiptType = data.receiptType; - } - if ("timeoutMs" in data && data.timeoutMs != undefined) { - this.timeoutMs = data.timeoutMs; - } - if ("blockConfirmations" in data && data.blockConfirmations != undefined) { - this.blockConfirmations = data.blockConfirmations; - } - } - } - get receiptType() { - return pb_1.Message.getFieldWithDefault(this, 423008661, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.ReceiptTypePB.ReceiptTypePB_NODE_TX_POOL_ACK) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.ReceiptTypePB; - } - set receiptType(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.ReceiptTypePB) { - pb_1.Message.setField(this, 423008661, value); - } - get timeoutMs() { - return pb_1.Message.getFieldWithDefault(this, 51479271, 0) as number; - } - set timeoutMs(value: number) { - pb_1.Message.setField(this, 51479271, value); - } - get blockConfirmations() { - return pb_1.Message.getFieldWithDefault(this, 207555762, 0) as number; - } - set blockConfirmations(value: number) { - pb_1.Message.setField(this, 207555762, value); - } - static fromObject(data: { - receiptType?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.ReceiptTypePB; - timeoutMs?: number; - blockConfirmations?: number; - }): ConsistencyStrategyPB { - const message = new ConsistencyStrategyPB({}); - if (data.receiptType != null) { - message.receiptType = data.receiptType; - } - if (data.timeoutMs != null) { - message.timeoutMs = data.timeoutMs; - } - if (data.blockConfirmations != null) { - message.blockConfirmations = data.blockConfirmations; - } - return message; - } - toObject() { - const data: { - receiptType?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.ReceiptTypePB; - timeoutMs?: number; - blockConfirmations?: number; - } = {}; - if (this.receiptType != null) { - data.receiptType = this.receiptType; - } - if (this.timeoutMs != null) { - data.timeoutMs = this.timeoutMs; - } - if (this.blockConfirmations != null) { - data.blockConfirmations = this.blockConfirmations; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.receiptType != dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.ReceiptTypePB.ReceiptTypePB_NODE_TX_POOL_ACK) - writer.writeEnum(423008661, this.receiptType); - if (this.timeoutMs != 0) - writer.writeInt32(51479271, this.timeoutMs); - if (this.blockConfirmations != 0) - writer.writeInt32(207555762, this.blockConfirmations); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ConsistencyStrategyPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConsistencyStrategyPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 423008661: - message.receiptType = reader.readEnum(); - break; - case 51479271: - message.timeoutMs = reader.readInt32(); - break; - case 207555762: - message.blockConfirmations = reader.readInt32(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): ConsistencyStrategyPB { - return ConsistencyStrategyPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_no_keychain_v1_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_no_keychain_v1_request_pb.ts deleted file mode 100644 index 6579e0eb6c..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_no_keychain_v1_request_pb.ts +++ /dev/null @@ -1,268 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/deploy_contract_solidity_bytecode_no_keychain_v1_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./besu_private_transaction_config_pb"; -import * as dependency_3 from "./web3_signing_credential_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class DeployContractSolidityBytecodeNoKeychainV1RequestPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - contractName?: string; - contractAbi?: dependency_1.google.protobuf.Any[]; - constructorArgs?: dependency_1.google.protobuf.Any[]; - web3SigningCredential?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB; - bytecode?: string; - gas?: number; - gasPrice?: string; - timeoutMs?: number; - privateTransactionConfig?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [512852493, 336490508], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("contractName" in data && data.contractName != undefined) { - this.contractName = data.contractName; - } - if ("contractAbi" in data && data.contractAbi != undefined) { - this.contractAbi = data.contractAbi; - } - if ("constructorArgs" in data && data.constructorArgs != undefined) { - this.constructorArgs = data.constructorArgs; - } - if ("web3SigningCredential" in data && data.web3SigningCredential != undefined) { - this.web3SigningCredential = data.web3SigningCredential; - } - if ("bytecode" in data && data.bytecode != undefined) { - this.bytecode = data.bytecode; - } - if ("gas" in data && data.gas != undefined) { - this.gas = data.gas; - } - if ("gasPrice" in data && data.gasPrice != undefined) { - this.gasPrice = data.gasPrice; - } - if ("timeoutMs" in data && data.timeoutMs != undefined) { - this.timeoutMs = data.timeoutMs; - } - if ("privateTransactionConfig" in data && data.privateTransactionConfig != undefined) { - this.privateTransactionConfig = data.privateTransactionConfig; - } - } - } - get contractName() { - return pb_1.Message.getFieldWithDefault(this, 328784197, "") as string; - } - set contractName(value: string) { - pb_1.Message.setField(this, 328784197, value); - } - get contractAbi() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 512852493) as dependency_1.google.protobuf.Any[]; - } - set contractAbi(value: dependency_1.google.protobuf.Any[]) { - pb_1.Message.setRepeatedWrapperField(this, 512852493, value); - } - get constructorArgs() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 336490508) as dependency_1.google.protobuf.Any[]; - } - set constructorArgs(value: dependency_1.google.protobuf.Any[]) { - pb_1.Message.setRepeatedWrapperField(this, 336490508, value); - } - get web3SigningCredential() { - return pb_1.Message.getWrapperField(this, dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB, 451211679) as dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB; - } - set web3SigningCredential(value: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB) { - pb_1.Message.setWrapperField(this, 451211679, value); - } - get has_web3SigningCredential() { - return pb_1.Message.getField(this, 451211679) != null; - } - get bytecode() { - return pb_1.Message.getFieldWithDefault(this, 256554254, "") as string; - } - set bytecode(value: string) { - pb_1.Message.setField(this, 256554254, value); - } - get gas() { - return pb_1.Message.getFieldWithDefault(this, 102105, 0) as number; - } - set gas(value: number) { - pb_1.Message.setField(this, 102105, value); - } - get gasPrice() { - return pb_1.Message.getFieldWithDefault(this, 5271059, "") as string; - } - set gasPrice(value: string) { - pb_1.Message.setField(this, 5271059, value); - } - get timeoutMs() { - return pb_1.Message.getFieldWithDefault(this, 51479271, 0) as number; - } - set timeoutMs(value: number) { - pb_1.Message.setField(this, 51479271, value); - } - get privateTransactionConfig() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB, 276796542) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB; - } - set privateTransactionConfig(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB) { - pb_1.Message.setWrapperField(this, 276796542, value); - } - get has_privateTransactionConfig() { - return pb_1.Message.getField(this, 276796542) != null; - } - static fromObject(data: { - contractName?: string; - contractAbi?: ReturnType[]; - constructorArgs?: ReturnType[]; - web3SigningCredential?: ReturnType; - bytecode?: string; - gas?: number; - gasPrice?: string; - timeoutMs?: number; - privateTransactionConfig?: ReturnType; - }): DeployContractSolidityBytecodeNoKeychainV1RequestPB { - const message = new DeployContractSolidityBytecodeNoKeychainV1RequestPB({}); - if (data.contractName != null) { - message.contractName = data.contractName; - } - if (data.contractAbi != null) { - message.contractAbi = data.contractAbi.map(item => dependency_1.google.protobuf.Any.fromObject(item)); - } - if (data.constructorArgs != null) { - message.constructorArgs = data.constructorArgs.map(item => dependency_1.google.protobuf.Any.fromObject(item)); - } - if (data.web3SigningCredential != null) { - message.web3SigningCredential = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB.fromObject(data.web3SigningCredential); - } - if (data.bytecode != null) { - message.bytecode = data.bytecode; - } - if (data.gas != null) { - message.gas = data.gas; - } - if (data.gasPrice != null) { - message.gasPrice = data.gasPrice; - } - if (data.timeoutMs != null) { - message.timeoutMs = data.timeoutMs; - } - if (data.privateTransactionConfig != null) { - message.privateTransactionConfig = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB.fromObject(data.privateTransactionConfig); - } - return message; - } - toObject() { - const data: { - contractName?: string; - contractAbi?: ReturnType[]; - constructorArgs?: ReturnType[]; - web3SigningCredential?: ReturnType; - bytecode?: string; - gas?: number; - gasPrice?: string; - timeoutMs?: number; - privateTransactionConfig?: ReturnType; - } = {}; - if (this.contractName != null) { - data.contractName = this.contractName; - } - if (this.contractAbi != null) { - data.contractAbi = this.contractAbi.map((item: dependency_1.google.protobuf.Any) => item.toObject()); - } - if (this.constructorArgs != null) { - data.constructorArgs = this.constructorArgs.map((item: dependency_1.google.protobuf.Any) => item.toObject()); - } - if (this.web3SigningCredential != null) { - data.web3SigningCredential = this.web3SigningCredential.toObject(); - } - if (this.bytecode != null) { - data.bytecode = this.bytecode; - } - if (this.gas != null) { - data.gas = this.gas; - } - if (this.gasPrice != null) { - data.gasPrice = this.gasPrice; - } - if (this.timeoutMs != null) { - data.timeoutMs = this.timeoutMs; - } - if (this.privateTransactionConfig != null) { - data.privateTransactionConfig = this.privateTransactionConfig.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.contractName.length) - writer.writeString(328784197, this.contractName); - if (this.contractAbi.length) - writer.writeRepeatedMessage(512852493, this.contractAbi, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); - if (this.constructorArgs.length) - writer.writeRepeatedMessage(336490508, this.constructorArgs, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); - if (this.has_web3SigningCredential) - writer.writeMessage(451211679, this.web3SigningCredential, () => this.web3SigningCredential.serialize(writer)); - if (this.bytecode.length) - writer.writeString(256554254, this.bytecode); - if (this.gas != 0) - writer.writeFloat(102105, this.gas); - if (this.gasPrice.length) - writer.writeString(5271059, this.gasPrice); - if (this.timeoutMs != 0) - writer.writeFloat(51479271, this.timeoutMs); - if (this.has_privateTransactionConfig) - writer.writeMessage(276796542, this.privateTransactionConfig, () => this.privateTransactionConfig.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeployContractSolidityBytecodeNoKeychainV1RequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeployContractSolidityBytecodeNoKeychainV1RequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 328784197: - message.contractName = reader.readString(); - break; - case 512852493: - reader.readMessage(message.contractAbi, () => pb_1.Message.addToRepeatedWrapperField(message, 512852493, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); - break; - case 336490508: - reader.readMessage(message.constructorArgs, () => pb_1.Message.addToRepeatedWrapperField(message, 336490508, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); - break; - case 451211679: - reader.readMessage(message.web3SigningCredential, () => message.web3SigningCredential = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB.deserialize(reader)); - break; - case 256554254: - message.bytecode = reader.readString(); - break; - case 102105: - message.gas = reader.readFloat(); - break; - case 5271059: - message.gasPrice = reader.readString(); - break; - case 51479271: - message.timeoutMs = reader.readFloat(); - break; - case 276796542: - reader.readMessage(message.privateTransactionConfig, () => message.privateTransactionConfig = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): DeployContractSolidityBytecodeNoKeychainV1RequestPB { - return DeployContractSolidityBytecodeNoKeychainV1RequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_v1_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_v1_request_pb.ts deleted file mode 100644 index 5c669c6e11..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_v1_request_pb.ts +++ /dev/null @@ -1,291 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/deploy_contract_solidity_bytecode_v1_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./besu_private_transaction_config_pb"; -import * as dependency_3 from "./web3_signing_credential_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class DeployContractSolidityBytecodeV1RequestPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - contractName?: string; - contractAbi?: dependency_1.google.protobuf.Any[]; - constructorArgs?: dependency_1.google.protobuf.Any[]; - web3SigningCredential?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB; - bytecode?: string; - keychainId?: string; - gas?: number; - gasPrice?: string; - timeoutMs?: number; - privateTransactionConfig?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [512852493, 336490508], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("contractName" in data && data.contractName != undefined) { - this.contractName = data.contractName; - } - if ("contractAbi" in data && data.contractAbi != undefined) { - this.contractAbi = data.contractAbi; - } - if ("constructorArgs" in data && data.constructorArgs != undefined) { - this.constructorArgs = data.constructorArgs; - } - if ("web3SigningCredential" in data && data.web3SigningCredential != undefined) { - this.web3SigningCredential = data.web3SigningCredential; - } - if ("bytecode" in data && data.bytecode != undefined) { - this.bytecode = data.bytecode; - } - if ("keychainId" in data && data.keychainId != undefined) { - this.keychainId = data.keychainId; - } - if ("gas" in data && data.gas != undefined) { - this.gas = data.gas; - } - if ("gasPrice" in data && data.gasPrice != undefined) { - this.gasPrice = data.gasPrice; - } - if ("timeoutMs" in data && data.timeoutMs != undefined) { - this.timeoutMs = data.timeoutMs; - } - if ("privateTransactionConfig" in data && data.privateTransactionConfig != undefined) { - this.privateTransactionConfig = data.privateTransactionConfig; - } - } - } - get contractName() { - return pb_1.Message.getFieldWithDefault(this, 328784197, "") as string; - } - set contractName(value: string) { - pb_1.Message.setField(this, 328784197, value); - } - get contractAbi() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 512852493) as dependency_1.google.protobuf.Any[]; - } - set contractAbi(value: dependency_1.google.protobuf.Any[]) { - pb_1.Message.setRepeatedWrapperField(this, 512852493, value); - } - get constructorArgs() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 336490508) as dependency_1.google.protobuf.Any[]; - } - set constructorArgs(value: dependency_1.google.protobuf.Any[]) { - pb_1.Message.setRepeatedWrapperField(this, 336490508, value); - } - get web3SigningCredential() { - return pb_1.Message.getWrapperField(this, dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB, 451211679) as dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB; - } - set web3SigningCredential(value: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB) { - pb_1.Message.setWrapperField(this, 451211679, value); - } - get has_web3SigningCredential() { - return pb_1.Message.getField(this, 451211679) != null; - } - get bytecode() { - return pb_1.Message.getFieldWithDefault(this, 256554254, "") as string; - } - set bytecode(value: string) { - pb_1.Message.setField(this, 256554254, value); - } - get keychainId() { - return pb_1.Message.getFieldWithDefault(this, 14058372, "") as string; - } - set keychainId(value: string) { - pb_1.Message.setField(this, 14058372, value); - } - get gas() { - return pb_1.Message.getFieldWithDefault(this, 102105, 0) as number; - } - set gas(value: number) { - pb_1.Message.setField(this, 102105, value); - } - get gasPrice() { - return pb_1.Message.getFieldWithDefault(this, 5271059, "") as string; - } - set gasPrice(value: string) { - pb_1.Message.setField(this, 5271059, value); - } - get timeoutMs() { - return pb_1.Message.getFieldWithDefault(this, 51479271, 0) as number; - } - set timeoutMs(value: number) { - pb_1.Message.setField(this, 51479271, value); - } - get privateTransactionConfig() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB, 276796542) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB; - } - set privateTransactionConfig(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB) { - pb_1.Message.setWrapperField(this, 276796542, value); - } - get has_privateTransactionConfig() { - return pb_1.Message.getField(this, 276796542) != null; - } - static fromObject(data: { - contractName?: string; - contractAbi?: ReturnType[]; - constructorArgs?: ReturnType[]; - web3SigningCredential?: ReturnType; - bytecode?: string; - keychainId?: string; - gas?: number; - gasPrice?: string; - timeoutMs?: number; - privateTransactionConfig?: ReturnType; - }): DeployContractSolidityBytecodeV1RequestPB { - const message = new DeployContractSolidityBytecodeV1RequestPB({}); - if (data.contractName != null) { - message.contractName = data.contractName; - } - if (data.contractAbi != null) { - message.contractAbi = data.contractAbi.map(item => dependency_1.google.protobuf.Any.fromObject(item)); - } - if (data.constructorArgs != null) { - message.constructorArgs = data.constructorArgs.map(item => dependency_1.google.protobuf.Any.fromObject(item)); - } - if (data.web3SigningCredential != null) { - message.web3SigningCredential = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB.fromObject(data.web3SigningCredential); - } - if (data.bytecode != null) { - message.bytecode = data.bytecode; - } - if (data.keychainId != null) { - message.keychainId = data.keychainId; - } - if (data.gas != null) { - message.gas = data.gas; - } - if (data.gasPrice != null) { - message.gasPrice = data.gasPrice; - } - if (data.timeoutMs != null) { - message.timeoutMs = data.timeoutMs; - } - if (data.privateTransactionConfig != null) { - message.privateTransactionConfig = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB.fromObject(data.privateTransactionConfig); - } - return message; - } - toObject() { - const data: { - contractName?: string; - contractAbi?: ReturnType[]; - constructorArgs?: ReturnType[]; - web3SigningCredential?: ReturnType; - bytecode?: string; - keychainId?: string; - gas?: number; - gasPrice?: string; - timeoutMs?: number; - privateTransactionConfig?: ReturnType; - } = {}; - if (this.contractName != null) { - data.contractName = this.contractName; - } - if (this.contractAbi != null) { - data.contractAbi = this.contractAbi.map((item: dependency_1.google.protobuf.Any) => item.toObject()); - } - if (this.constructorArgs != null) { - data.constructorArgs = this.constructorArgs.map((item: dependency_1.google.protobuf.Any) => item.toObject()); - } - if (this.web3SigningCredential != null) { - data.web3SigningCredential = this.web3SigningCredential.toObject(); - } - if (this.bytecode != null) { - data.bytecode = this.bytecode; - } - if (this.keychainId != null) { - data.keychainId = this.keychainId; - } - if (this.gas != null) { - data.gas = this.gas; - } - if (this.gasPrice != null) { - data.gasPrice = this.gasPrice; - } - if (this.timeoutMs != null) { - data.timeoutMs = this.timeoutMs; - } - if (this.privateTransactionConfig != null) { - data.privateTransactionConfig = this.privateTransactionConfig.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.contractName.length) - writer.writeString(328784197, this.contractName); - if (this.contractAbi.length) - writer.writeRepeatedMessage(512852493, this.contractAbi, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); - if (this.constructorArgs.length) - writer.writeRepeatedMessage(336490508, this.constructorArgs, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); - if (this.has_web3SigningCredential) - writer.writeMessage(451211679, this.web3SigningCredential, () => this.web3SigningCredential.serialize(writer)); - if (this.bytecode.length) - writer.writeString(256554254, this.bytecode); - if (this.keychainId.length) - writer.writeString(14058372, this.keychainId); - if (this.gas != 0) - writer.writeFloat(102105, this.gas); - if (this.gasPrice.length) - writer.writeString(5271059, this.gasPrice); - if (this.timeoutMs != 0) - writer.writeFloat(51479271, this.timeoutMs); - if (this.has_privateTransactionConfig) - writer.writeMessage(276796542, this.privateTransactionConfig, () => this.privateTransactionConfig.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeployContractSolidityBytecodeV1RequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeployContractSolidityBytecodeV1RequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 328784197: - message.contractName = reader.readString(); - break; - case 512852493: - reader.readMessage(message.contractAbi, () => pb_1.Message.addToRepeatedWrapperField(message, 512852493, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); - break; - case 336490508: - reader.readMessage(message.constructorArgs, () => pb_1.Message.addToRepeatedWrapperField(message, 336490508, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); - break; - case 451211679: - reader.readMessage(message.web3SigningCredential, () => message.web3SigningCredential = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB.deserialize(reader)); - break; - case 256554254: - message.bytecode = reader.readString(); - break; - case 14058372: - message.keychainId = reader.readString(); - break; - case 102105: - message.gas = reader.readFloat(); - break; - case 5271059: - message.gasPrice = reader.readString(); - break; - case 51479271: - message.timeoutMs = reader.readFloat(); - break; - case 276796542: - reader.readMessage(message.privateTransactionConfig, () => message.privateTransactionConfig = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): DeployContractSolidityBytecodeV1RequestPB { - return DeployContractSolidityBytecodeV1RequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_v1_response_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_v1_response_pb.ts deleted file mode 100644 index 0f53c99238..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_v1_response_pb.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/deploy_contract_solidity_bytecode_v1_response_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./web3_transaction_receipt_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class DeployContractSolidityBytecodeV1ResponsePB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - transactionReceipt?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("transactionReceipt" in data && data.transactionReceipt != undefined) { - this.transactionReceipt = data.transactionReceipt; - } - } - } - get transactionReceipt() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB, 472834426) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB; - } - set transactionReceipt(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB) { - pb_1.Message.setWrapperField(this, 472834426, value); - } - get has_transactionReceipt() { - return pb_1.Message.getField(this, 472834426) != null; - } - static fromObject(data: { - transactionReceipt?: ReturnType; - }): DeployContractSolidityBytecodeV1ResponsePB { - const message = new DeployContractSolidityBytecodeV1ResponsePB({}); - if (data.transactionReceipt != null) { - message.transactionReceipt = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB.fromObject(data.transactionReceipt); - } - return message; - } - toObject() { - const data: { - transactionReceipt?: ReturnType; - } = {}; - if (this.transactionReceipt != null) { - data.transactionReceipt = this.transactionReceipt.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_transactionReceipt) - writer.writeMessage(472834426, this.transactionReceipt, () => this.transactionReceipt.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeployContractSolidityBytecodeV1ResponsePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeployContractSolidityBytecodeV1ResponsePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 472834426: - reader.readMessage(message.transactionReceipt, () => message.transactionReceipt = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): DeployContractSolidityBytecodeV1ResponsePB { - return DeployContractSolidityBytecodeV1ResponsePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/eth_contract_invocation_type_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/eth_contract_invocation_type_pb.ts deleted file mode 100644 index 1db19d91fe..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/eth_contract_invocation_type_pb.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/eth_contract_invocation_type_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export enum EthContractInvocationTypePB { - EthContractInvocationTypePB_SEND = 0, - EthContractInvocationTypePB_CALL = 1 - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/evm_block_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/evm_block_pb.ts deleted file mode 100644 index 32e836805c..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/evm_block_pb.ts +++ /dev/null @@ -1,480 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/evm_block_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class EvmBlockPB extends pb_1.Message { - #one_of_decls: number[][] = [[55126294]]; - constructor(data?: any[] | ({ - number?: number; - hash?: string; - parentHash?: string; - nonce?: string; - sha3Uncles?: string; - logsBloom?: string; - transactionsRoot?: string; - stateRoot?: string; - miner?: string; - difficulty?: number; - totalDifficulty?: number; - extraData?: string; - size?: number; - gasLimit?: number; - gasUsed?: number; - transactions?: dependency_1.google.protobuf.Any[]; - uncles?: dependency_1.google.protobuf.Any[]; - } & (({ - timestamp?: dependency_1.google.protobuf.Any; - })))) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [343509336, 303842065], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("number" in data && data.number != undefined) { - this.number = data.number; - } - if ("hash" in data && data.hash != undefined) { - this.hash = data.hash; - } - if ("parentHash" in data && data.parentHash != undefined) { - this.parentHash = data.parentHash; - } - if ("nonce" in data && data.nonce != undefined) { - this.nonce = data.nonce; - } - if ("sha3Uncles" in data && data.sha3Uncles != undefined) { - this.sha3Uncles = data.sha3Uncles; - } - if ("logsBloom" in data && data.logsBloom != undefined) { - this.logsBloom = data.logsBloom; - } - if ("transactionsRoot" in data && data.transactionsRoot != undefined) { - this.transactionsRoot = data.transactionsRoot; - } - if ("stateRoot" in data && data.stateRoot != undefined) { - this.stateRoot = data.stateRoot; - } - if ("miner" in data && data.miner != undefined) { - this.miner = data.miner; - } - if ("difficulty" in data && data.difficulty != undefined) { - this.difficulty = data.difficulty; - } - if ("totalDifficulty" in data && data.totalDifficulty != undefined) { - this.totalDifficulty = data.totalDifficulty; - } - if ("extraData" in data && data.extraData != undefined) { - this.extraData = data.extraData; - } - if ("size" in data && data.size != undefined) { - this.size = data.size; - } - if ("gasLimit" in data && data.gasLimit != undefined) { - this.gasLimit = data.gasLimit; - } - if ("gasUsed" in data && data.gasUsed != undefined) { - this.gasUsed = data.gasUsed; - } - if ("timestamp" in data && data.timestamp != undefined) { - this.timestamp = data.timestamp; - } - if ("transactions" in data && data.transactions != undefined) { - this.transactions = data.transactions; - } - if ("uncles" in data && data.uncles != undefined) { - this.uncles = data.uncles; - } - } - } - get number() { - return pb_1.Message.getFieldWithDefault(this, 497493176, 0) as number; - } - set number(value: number) { - pb_1.Message.setField(this, 497493176, value); - } - get hash() { - return pb_1.Message.getFieldWithDefault(this, 3195150, "") as string; - } - set hash(value: string) { - pb_1.Message.setField(this, 3195150, value); - } - get parentHash() { - return pb_1.Message.getFieldWithDefault(this, 245049128, "") as string; - } - set parentHash(value: string) { - pb_1.Message.setField(this, 245049128, value); - } - get nonce() { - return pb_1.Message.getFieldWithDefault(this, 105002991, "") as string; - } - set nonce(value: string) { - pb_1.Message.setField(this, 105002991, value); - } - get sha3Uncles() { - return pb_1.Message.getFieldWithDefault(this, 373514458, "") as string; - } - set sha3Uncles(value: string) { - pb_1.Message.setField(this, 373514458, value); - } - get logsBloom() { - return pb_1.Message.getFieldWithDefault(this, 399161966, "") as string; - } - set logsBloom(value: string) { - pb_1.Message.setField(this, 399161966, value); - } - get transactionsRoot() { - return pb_1.Message.getFieldWithDefault(this, 526502871, "") as string; - } - set transactionsRoot(value: string) { - pb_1.Message.setField(this, 526502871, value); - } - get stateRoot() { - return pb_1.Message.getFieldWithDefault(this, 475330288, "") as string; - } - set stateRoot(value: string) { - pb_1.Message.setField(this, 475330288, value); - } - get miner() { - return pb_1.Message.getFieldWithDefault(this, 103900799, "") as string; - } - set miner(value: string) { - pb_1.Message.setField(this, 103900799, value); - } - get difficulty() { - return pb_1.Message.getFieldWithDefault(this, 218888126, 0) as number; - } - set difficulty(value: number) { - pb_1.Message.setField(this, 218888126, value); - } - get totalDifficulty() { - return pb_1.Message.getFieldWithDefault(this, 413035041, 0) as number; - } - set totalDifficulty(value: number) { - pb_1.Message.setField(this, 413035041, value); - } - get extraData() { - return pb_1.Message.getFieldWithDefault(this, 253792294, "") as string; - } - set extraData(value: string) { - pb_1.Message.setField(this, 253792294, value); - } - get size() { - return pb_1.Message.getFieldWithDefault(this, 3530753, 0) as number; - } - set size(value: number) { - pb_1.Message.setField(this, 3530753, value); - } - get gasLimit() { - return pb_1.Message.getFieldWithDefault(this, 9229217, 0) as number; - } - set gasLimit(value: number) { - pb_1.Message.setField(this, 9229217, value); - } - get gasUsed() { - return pb_1.Message.getFieldWithDefault(this, 190522826, 0) as number; - } - set gasUsed(value: number) { - pb_1.Message.setField(this, 190522826, value); - } - get timestamp() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 55126294) as dependency_1.google.protobuf.Any; - } - set timestamp(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 55126294, this.#one_of_decls[0], value); - } - get has_timestamp() { - return pb_1.Message.getField(this, 55126294) != null; - } - get transactions() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 343509336) as dependency_1.google.protobuf.Any[]; - } - set transactions(value: dependency_1.google.protobuf.Any[]) { - pb_1.Message.setRepeatedWrapperField(this, 343509336, value); - } - get uncles() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 303842065) as dependency_1.google.protobuf.Any[]; - } - set uncles(value: dependency_1.google.protobuf.Any[]) { - pb_1.Message.setRepeatedWrapperField(this, 303842065, value); - } - get _timestamp() { - const cases: { - [index: number]: "none" | "timestamp"; - } = { - 0: "none", - 55126294: "timestamp" - }; - return cases[pb_1.Message.computeOneofCase(this, [55126294])]; - } - static fromObject(data: { - number?: number; - hash?: string; - parentHash?: string; - nonce?: string; - sha3Uncles?: string; - logsBloom?: string; - transactionsRoot?: string; - stateRoot?: string; - miner?: string; - difficulty?: number; - totalDifficulty?: number; - extraData?: string; - size?: number; - gasLimit?: number; - gasUsed?: number; - timestamp?: ReturnType; - transactions?: ReturnType[]; - uncles?: ReturnType[]; - }): EvmBlockPB { - const message = new EvmBlockPB({}); - if (data.number != null) { - message.number = data.number; - } - if (data.hash != null) { - message.hash = data.hash; - } - if (data.parentHash != null) { - message.parentHash = data.parentHash; - } - if (data.nonce != null) { - message.nonce = data.nonce; - } - if (data.sha3Uncles != null) { - message.sha3Uncles = data.sha3Uncles; - } - if (data.logsBloom != null) { - message.logsBloom = data.logsBloom; - } - if (data.transactionsRoot != null) { - message.transactionsRoot = data.transactionsRoot; - } - if (data.stateRoot != null) { - message.stateRoot = data.stateRoot; - } - if (data.miner != null) { - message.miner = data.miner; - } - if (data.difficulty != null) { - message.difficulty = data.difficulty; - } - if (data.totalDifficulty != null) { - message.totalDifficulty = data.totalDifficulty; - } - if (data.extraData != null) { - message.extraData = data.extraData; - } - if (data.size != null) { - message.size = data.size; - } - if (data.gasLimit != null) { - message.gasLimit = data.gasLimit; - } - if (data.gasUsed != null) { - message.gasUsed = data.gasUsed; - } - if (data.timestamp != null) { - message.timestamp = dependency_1.google.protobuf.Any.fromObject(data.timestamp); - } - if (data.transactions != null) { - message.transactions = data.transactions.map(item => dependency_1.google.protobuf.Any.fromObject(item)); - } - if (data.uncles != null) { - message.uncles = data.uncles.map(item => dependency_1.google.protobuf.Any.fromObject(item)); - } - return message; - } - toObject() { - const data: { - number?: number; - hash?: string; - parentHash?: string; - nonce?: string; - sha3Uncles?: string; - logsBloom?: string; - transactionsRoot?: string; - stateRoot?: string; - miner?: string; - difficulty?: number; - totalDifficulty?: number; - extraData?: string; - size?: number; - gasLimit?: number; - gasUsed?: number; - timestamp?: ReturnType; - transactions?: ReturnType[]; - uncles?: ReturnType[]; - } = {}; - if (this.number != null) { - data.number = this.number; - } - if (this.hash != null) { - data.hash = this.hash; - } - if (this.parentHash != null) { - data.parentHash = this.parentHash; - } - if (this.nonce != null) { - data.nonce = this.nonce; - } - if (this.sha3Uncles != null) { - data.sha3Uncles = this.sha3Uncles; - } - if (this.logsBloom != null) { - data.logsBloom = this.logsBloom; - } - if (this.transactionsRoot != null) { - data.transactionsRoot = this.transactionsRoot; - } - if (this.stateRoot != null) { - data.stateRoot = this.stateRoot; - } - if (this.miner != null) { - data.miner = this.miner; - } - if (this.difficulty != null) { - data.difficulty = this.difficulty; - } - if (this.totalDifficulty != null) { - data.totalDifficulty = this.totalDifficulty; - } - if (this.extraData != null) { - data.extraData = this.extraData; - } - if (this.size != null) { - data.size = this.size; - } - if (this.gasLimit != null) { - data.gasLimit = this.gasLimit; - } - if (this.gasUsed != null) { - data.gasUsed = this.gasUsed; - } - if (this.timestamp != null) { - data.timestamp = this.timestamp.toObject(); - } - if (this.transactions != null) { - data.transactions = this.transactions.map((item: dependency_1.google.protobuf.Any) => item.toObject()); - } - if (this.uncles != null) { - data.uncles = this.uncles.map((item: dependency_1.google.protobuf.Any) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.number != 0) - writer.writeFloat(497493176, this.number); - if (this.hash.length) - writer.writeString(3195150, this.hash); - if (this.parentHash.length) - writer.writeString(245049128, this.parentHash); - if (this.nonce.length) - writer.writeString(105002991, this.nonce); - if (this.sha3Uncles.length) - writer.writeString(373514458, this.sha3Uncles); - if (this.logsBloom.length) - writer.writeString(399161966, this.logsBloom); - if (this.transactionsRoot.length) - writer.writeString(526502871, this.transactionsRoot); - if (this.stateRoot.length) - writer.writeString(475330288, this.stateRoot); - if (this.miner.length) - writer.writeString(103900799, this.miner); - if (this.difficulty != 0) - writer.writeFloat(218888126, this.difficulty); - if (this.totalDifficulty != 0) - writer.writeFloat(413035041, this.totalDifficulty); - if (this.extraData.length) - writer.writeString(253792294, this.extraData); - if (this.size != 0) - writer.writeFloat(3530753, this.size); - if (this.gasLimit != 0) - writer.writeFloat(9229217, this.gasLimit); - if (this.gasUsed != 0) - writer.writeFloat(190522826, this.gasUsed); - if (this.has_timestamp) - writer.writeMessage(55126294, this.timestamp, () => this.timestamp.serialize(writer)); - if (this.transactions.length) - writer.writeRepeatedMessage(343509336, this.transactions, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); - if (this.uncles.length) - writer.writeRepeatedMessage(303842065, this.uncles, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EvmBlockPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EvmBlockPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 497493176: - message.number = reader.readFloat(); - break; - case 3195150: - message.hash = reader.readString(); - break; - case 245049128: - message.parentHash = reader.readString(); - break; - case 105002991: - message.nonce = reader.readString(); - break; - case 373514458: - message.sha3Uncles = reader.readString(); - break; - case 399161966: - message.logsBloom = reader.readString(); - break; - case 526502871: - message.transactionsRoot = reader.readString(); - break; - case 475330288: - message.stateRoot = reader.readString(); - break; - case 103900799: - message.miner = reader.readString(); - break; - case 218888126: - message.difficulty = reader.readFloat(); - break; - case 413035041: - message.totalDifficulty = reader.readFloat(); - break; - case 253792294: - message.extraData = reader.readString(); - break; - case 3530753: - message.size = reader.readFloat(); - break; - case 9229217: - message.gasLimit = reader.readFloat(); - break; - case 190522826: - message.gasUsed = reader.readFloat(); - break; - case 55126294: - reader.readMessage(message.timestamp, () => message.timestamp = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - case 343509336: - reader.readMessage(message.transactions, () => pb_1.Message.addToRepeatedWrapperField(message, 343509336, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); - break; - case 303842065: - reader.readMessage(message.uncles, () => pb_1.Message.addToRepeatedWrapperField(message, 303842065, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): EvmBlockPB { - return EvmBlockPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/evm_log_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/evm_log_pb.ts deleted file mode 100644 index 9db4807c88..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/evm_log_pb.ts +++ /dev/null @@ -1,237 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/evm_log_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class EvmLogPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - address?: string; - data?: string; - blockHash?: string; - transactionHash?: string; - topics?: string[]; - logIndex?: number; - transactionIndex?: number; - blockNumber?: number; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [331163357], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("address" in data && data.address != undefined) { - this.address = data.address; - } - if ("data" in data && data.data != undefined) { - this.data = data.data; - } - if ("blockHash" in data && data.blockHash != undefined) { - this.blockHash = data.blockHash; - } - if ("transactionHash" in data && data.transactionHash != undefined) { - this.transactionHash = data.transactionHash; - } - if ("topics" in data && data.topics != undefined) { - this.topics = data.topics; - } - if ("logIndex" in data && data.logIndex != undefined) { - this.logIndex = data.logIndex; - } - if ("transactionIndex" in data && data.transactionIndex != undefined) { - this.transactionIndex = data.transactionIndex; - } - if ("blockNumber" in data && data.blockNumber != undefined) { - this.blockNumber = data.blockNumber; - } - } - } - get address() { - return pb_1.Message.getFieldWithDefault(this, 73950222, "") as string; - } - set address(value: string) { - pb_1.Message.setField(this, 73950222, value); - } - get data() { - return pb_1.Message.getFieldWithDefault(this, 3076010, "") as string; - } - set data(value: string) { - pb_1.Message.setField(this, 3076010, value); - } - get blockHash() { - return pb_1.Message.getFieldWithDefault(this, 335211324, "") as string; - } - set blockHash(value: string) { - pb_1.Message.setField(this, 335211324, value); - } - get transactionHash() { - return pb_1.Message.getFieldWithDefault(this, 188901646, "") as string; - } - set transactionHash(value: string) { - pb_1.Message.setField(this, 188901646, value); - } - get topics() { - return pb_1.Message.getFieldWithDefault(this, 331163357, []) as string[]; - } - set topics(value: string[]) { - pb_1.Message.setField(this, 331163357, value); - } - get logIndex() { - return pb_1.Message.getFieldWithDefault(this, 382599153, 0) as number; - } - set logIndex(value: number) { - pb_1.Message.setField(this, 382599153, value); - } - get transactionIndex() { - return pb_1.Message.getFieldWithDefault(this, 488538260, 0) as number; - } - set transactionIndex(value: number) { - pb_1.Message.setField(this, 488538260, value); - } - get blockNumber() { - return pb_1.Message.getFieldWithDefault(this, 205598263, 0) as number; - } - set blockNumber(value: number) { - pb_1.Message.setField(this, 205598263, value); - } - static fromObject(data: { - address?: string; - data?: string; - blockHash?: string; - transactionHash?: string; - topics?: string[]; - logIndex?: number; - transactionIndex?: number; - blockNumber?: number; - }): EvmLogPB { - const message = new EvmLogPB({}); - if (data.address != null) { - message.address = data.address; - } - if (data.data != null) { - message.data = data.data; - } - if (data.blockHash != null) { - message.blockHash = data.blockHash; - } - if (data.transactionHash != null) { - message.transactionHash = data.transactionHash; - } - if (data.topics != null) { - message.topics = data.topics; - } - if (data.logIndex != null) { - message.logIndex = data.logIndex; - } - if (data.transactionIndex != null) { - message.transactionIndex = data.transactionIndex; - } - if (data.blockNumber != null) { - message.blockNumber = data.blockNumber; - } - return message; - } - toObject() { - const data: { - address?: string; - data?: string; - blockHash?: string; - transactionHash?: string; - topics?: string[]; - logIndex?: number; - transactionIndex?: number; - blockNumber?: number; - } = {}; - if (this.address != null) { - data.address = this.address; - } - if (this.data != null) { - data.data = this.data; - } - if (this.blockHash != null) { - data.blockHash = this.blockHash; - } - if (this.transactionHash != null) { - data.transactionHash = this.transactionHash; - } - if (this.topics != null) { - data.topics = this.topics; - } - if (this.logIndex != null) { - data.logIndex = this.logIndex; - } - if (this.transactionIndex != null) { - data.transactionIndex = this.transactionIndex; - } - if (this.blockNumber != null) { - data.blockNumber = this.blockNumber; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.address.length) - writer.writeString(73950222, this.address); - if (this.data.length) - writer.writeString(3076010, this.data); - if (this.blockHash.length) - writer.writeString(335211324, this.blockHash); - if (this.transactionHash.length) - writer.writeString(188901646, this.transactionHash); - if (this.topics.length) - writer.writeRepeatedString(331163357, this.topics); - if (this.logIndex != 0) - writer.writeFloat(382599153, this.logIndex); - if (this.transactionIndex != 0) - writer.writeFloat(488538260, this.transactionIndex); - if (this.blockNumber != 0) - writer.writeFloat(205598263, this.blockNumber); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EvmLogPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EvmLogPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 73950222: - message.address = reader.readString(); - break; - case 3076010: - message.data = reader.readString(); - break; - case 335211324: - message.blockHash = reader.readString(); - break; - case 188901646: - message.transactionHash = reader.readString(); - break; - case 331163357: - pb_1.Message.addToRepeatedField(message, 331163357, reader.readString()); - break; - case 382599153: - message.logIndex = reader.readFloat(); - break; - case 488538260: - message.transactionIndex = reader.readFloat(); - break; - case 205598263: - message.blockNumber = reader.readFloat(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): EvmLogPB { - return EvmLogPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/evm_transaction_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/evm_transaction_pb.ts deleted file mode 100644 index 89d90b94fc..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/evm_transaction_pb.ts +++ /dev/null @@ -1,358 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/evm_transaction_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class EvmTransactionPB extends pb_1.Message { - #one_of_decls: number[][] = [[335211324], [205598263], [488538260], [3707]]; - constructor(data?: any[] | ({ - hash?: string; - nonce?: number; - from?: string; - value?: string; - gasPrice?: string; - gas?: number; - input?: string; - } & (({ - blockHash?: dependency_1.google.protobuf.Any; - }) | ({ - blockNumber?: dependency_1.google.protobuf.Any; - }) | ({ - transactionIndex?: dependency_1.google.protobuf.Any; - }) | ({ - to?: dependency_1.google.protobuf.Any; - })))) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("hash" in data && data.hash != undefined) { - this.hash = data.hash; - } - if ("nonce" in data && data.nonce != undefined) { - this.nonce = data.nonce; - } - if ("blockHash" in data && data.blockHash != undefined) { - this.blockHash = data.blockHash; - } - if ("blockNumber" in data && data.blockNumber != undefined) { - this.blockNumber = data.blockNumber; - } - if ("transactionIndex" in data && data.transactionIndex != undefined) { - this.transactionIndex = data.transactionIndex; - } - if ("from" in data && data.from != undefined) { - this.from = data.from; - } - if ("to" in data && data.to != undefined) { - this.to = data.to; - } - if ("value" in data && data.value != undefined) { - this.value = data.value; - } - if ("gasPrice" in data && data.gasPrice != undefined) { - this.gasPrice = data.gasPrice; - } - if ("gas" in data && data.gas != undefined) { - this.gas = data.gas; - } - if ("input" in data && data.input != undefined) { - this.input = data.input; - } - } - } - get hash() { - return pb_1.Message.getFieldWithDefault(this, 3195150, "") as string; - } - set hash(value: string) { - pb_1.Message.setField(this, 3195150, value); - } - get nonce() { - return pb_1.Message.getFieldWithDefault(this, 105002991, 0) as number; - } - set nonce(value: number) { - pb_1.Message.setField(this, 105002991, value); - } - get blockHash() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 335211324) as dependency_1.google.protobuf.Any; - } - set blockHash(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 335211324, this.#one_of_decls[0], value); - } - get has_blockHash() { - return pb_1.Message.getField(this, 335211324) != null; - } - get blockNumber() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 205598263) as dependency_1.google.protobuf.Any; - } - set blockNumber(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 205598263, this.#one_of_decls[1], value); - } - get has_blockNumber() { - return pb_1.Message.getField(this, 205598263) != null; - } - get transactionIndex() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 488538260) as dependency_1.google.protobuf.Any; - } - set transactionIndex(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 488538260, this.#one_of_decls[2], value); - } - get has_transactionIndex() { - return pb_1.Message.getField(this, 488538260) != null; - } - get from() { - return pb_1.Message.getFieldWithDefault(this, 3151786, "") as string; - } - set from(value: string) { - pb_1.Message.setField(this, 3151786, value); - } - get to() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 3707) as dependency_1.google.protobuf.Any; - } - set to(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 3707, this.#one_of_decls[3], value); - } - get has_to() { - return pb_1.Message.getField(this, 3707) != null; - } - get value() { - return pb_1.Message.getFieldWithDefault(this, 111972721, "") as string; - } - set value(value: string) { - pb_1.Message.setField(this, 111972721, value); - } - get gasPrice() { - return pb_1.Message.getFieldWithDefault(this, 5271059, "") as string; - } - set gasPrice(value: string) { - pb_1.Message.setField(this, 5271059, value); - } - get gas() { - return pb_1.Message.getFieldWithDefault(this, 102105, 0) as number; - } - set gas(value: number) { - pb_1.Message.setField(this, 102105, value); - } - get input() { - return pb_1.Message.getFieldWithDefault(this, 100358090, "") as string; - } - set input(value: string) { - pb_1.Message.setField(this, 100358090, value); - } - get _blockHash() { - const cases: { - [index: number]: "none" | "blockHash"; - } = { - 0: "none", - 335211324: "blockHash" - }; - return cases[pb_1.Message.computeOneofCase(this, [335211324])]; - } - get _blockNumber() { - const cases: { - [index: number]: "none" | "blockNumber"; - } = { - 0: "none", - 205598263: "blockNumber" - }; - return cases[pb_1.Message.computeOneofCase(this, [205598263])]; - } - get _transactionIndex() { - const cases: { - [index: number]: "none" | "transactionIndex"; - } = { - 0: "none", - 488538260: "transactionIndex" - }; - return cases[pb_1.Message.computeOneofCase(this, [488538260])]; - } - get _to() { - const cases: { - [index: number]: "none" | "to"; - } = { - 0: "none", - 3707: "to" - }; - return cases[pb_1.Message.computeOneofCase(this, [3707])]; - } - static fromObject(data: { - hash?: string; - nonce?: number; - blockHash?: ReturnType; - blockNumber?: ReturnType; - transactionIndex?: ReturnType; - from?: string; - to?: ReturnType; - value?: string; - gasPrice?: string; - gas?: number; - input?: string; - }): EvmTransactionPB { - const message = new EvmTransactionPB({}); - if (data.hash != null) { - message.hash = data.hash; - } - if (data.nonce != null) { - message.nonce = data.nonce; - } - if (data.blockHash != null) { - message.blockHash = dependency_1.google.protobuf.Any.fromObject(data.blockHash); - } - if (data.blockNumber != null) { - message.blockNumber = dependency_1.google.protobuf.Any.fromObject(data.blockNumber); - } - if (data.transactionIndex != null) { - message.transactionIndex = dependency_1.google.protobuf.Any.fromObject(data.transactionIndex); - } - if (data.from != null) { - message.from = data.from; - } - if (data.to != null) { - message.to = dependency_1.google.protobuf.Any.fromObject(data.to); - } - if (data.value != null) { - message.value = data.value; - } - if (data.gasPrice != null) { - message.gasPrice = data.gasPrice; - } - if (data.gas != null) { - message.gas = data.gas; - } - if (data.input != null) { - message.input = data.input; - } - return message; - } - toObject() { - const data: { - hash?: string; - nonce?: number; - blockHash?: ReturnType; - blockNumber?: ReturnType; - transactionIndex?: ReturnType; - from?: string; - to?: ReturnType; - value?: string; - gasPrice?: string; - gas?: number; - input?: string; - } = {}; - if (this.hash != null) { - data.hash = this.hash; - } - if (this.nonce != null) { - data.nonce = this.nonce; - } - if (this.blockHash != null) { - data.blockHash = this.blockHash.toObject(); - } - if (this.blockNumber != null) { - data.blockNumber = this.blockNumber.toObject(); - } - if (this.transactionIndex != null) { - data.transactionIndex = this.transactionIndex.toObject(); - } - if (this.from != null) { - data.from = this.from; - } - if (this.to != null) { - data.to = this.to.toObject(); - } - if (this.value != null) { - data.value = this.value; - } - if (this.gasPrice != null) { - data.gasPrice = this.gasPrice; - } - if (this.gas != null) { - data.gas = this.gas; - } - if (this.input != null) { - data.input = this.input; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.hash.length) - writer.writeString(3195150, this.hash); - if (this.nonce != 0) - writer.writeFloat(105002991, this.nonce); - if (this.has_blockHash) - writer.writeMessage(335211324, this.blockHash, () => this.blockHash.serialize(writer)); - if (this.has_blockNumber) - writer.writeMessage(205598263, this.blockNumber, () => this.blockNumber.serialize(writer)); - if (this.has_transactionIndex) - writer.writeMessage(488538260, this.transactionIndex, () => this.transactionIndex.serialize(writer)); - if (this.from.length) - writer.writeString(3151786, this.from); - if (this.has_to) - writer.writeMessage(3707, this.to, () => this.to.serialize(writer)); - if (this.value.length) - writer.writeString(111972721, this.value); - if (this.gasPrice.length) - writer.writeString(5271059, this.gasPrice); - if (this.gas != 0) - writer.writeFloat(102105, this.gas); - if (this.input.length) - writer.writeString(100358090, this.input); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): EvmTransactionPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EvmTransactionPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 3195150: - message.hash = reader.readString(); - break; - case 105002991: - message.nonce = reader.readFloat(); - break; - case 335211324: - reader.readMessage(message.blockHash, () => message.blockHash = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - case 205598263: - reader.readMessage(message.blockNumber, () => message.blockNumber = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - case 488538260: - reader.readMessage(message.transactionIndex, () => message.transactionIndex = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - case 3151786: - message.from = reader.readString(); - break; - case 3707: - reader.readMessage(message.to, () => message.to = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - case 111972721: - message.value = reader.readString(); - break; - case 5271059: - message.gasPrice = reader.readString(); - break; - case 102105: - message.gas = reader.readFloat(); - break; - case 100358090: - message.input = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): EvmTransactionPB { - return EvmTransactionPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_balance_v1_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_balance_v1_request_pb.ts deleted file mode 100644 index 32918b4910..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_balance_v1_request_pb.ts +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/get_balance_v1_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class GetBalanceV1RequestPB extends pb_1.Message { - #one_of_decls: number[][] = [[140394805]]; - constructor(data?: any[] | ({ - address?: string; - } & (({ - defaultBlock?: dependency_1.google.protobuf.Any; - })))) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("address" in data && data.address != undefined) { - this.address = data.address; - } - if ("defaultBlock" in data && data.defaultBlock != undefined) { - this.defaultBlock = data.defaultBlock; - } - } - } - get address() { - return pb_1.Message.getFieldWithDefault(this, 73950222, "") as string; - } - set address(value: string) { - pb_1.Message.setField(this, 73950222, value); - } - get defaultBlock() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 140394805) as dependency_1.google.protobuf.Any; - } - set defaultBlock(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 140394805, this.#one_of_decls[0], value); - } - get has_defaultBlock() { - return pb_1.Message.getField(this, 140394805) != null; - } - get _defaultBlock() { - const cases: { - [index: number]: "none" | "defaultBlock"; - } = { - 0: "none", - 140394805: "defaultBlock" - }; - return cases[pb_1.Message.computeOneofCase(this, [140394805])]; - } - static fromObject(data: { - address?: string; - defaultBlock?: ReturnType; - }): GetBalanceV1RequestPB { - const message = new GetBalanceV1RequestPB({}); - if (data.address != null) { - message.address = data.address; - } - if (data.defaultBlock != null) { - message.defaultBlock = dependency_1.google.protobuf.Any.fromObject(data.defaultBlock); - } - return message; - } - toObject() { - const data: { - address?: string; - defaultBlock?: ReturnType; - } = {}; - if (this.address != null) { - data.address = this.address; - } - if (this.defaultBlock != null) { - data.defaultBlock = this.defaultBlock.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.address.length) - writer.writeString(73950222, this.address); - if (this.has_defaultBlock) - writer.writeMessage(140394805, this.defaultBlock, () => this.defaultBlock.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBalanceV1RequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBalanceV1RequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 73950222: - message.address = reader.readString(); - break; - case 140394805: - reader.readMessage(message.defaultBlock, () => message.defaultBlock = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetBalanceV1RequestPB { - return GetBalanceV1RequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_balance_v1_response_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_balance_v1_response_pb.ts deleted file mode 100644 index 1de83322f3..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_balance_v1_response_pb.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/get_balance_v1_response_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class GetBalanceV1ResponsePB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - balance?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("balance" in data && data.balance != undefined) { - this.balance = data.balance; - } - } - } - get balance() { - return pb_1.Message.getFieldWithDefault(this, 339185956, "") as string; - } - set balance(value: string) { - pb_1.Message.setField(this, 339185956, value); - } - static fromObject(data: { - balance?: string; - }): GetBalanceV1ResponsePB { - const message = new GetBalanceV1ResponsePB({}); - if (data.balance != null) { - message.balance = data.balance; - } - return message; - } - toObject() { - const data: { - balance?: string; - } = {}; - if (this.balance != null) { - data.balance = this.balance; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.balance.length) - writer.writeString(339185956, this.balance); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBalanceV1ResponsePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBalanceV1ResponsePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 339185956: - message.balance = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetBalanceV1ResponsePB { - return GetBalanceV1ResponsePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_besu_record_v1_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_besu_record_v1_request_pb.ts deleted file mode 100644 index 0df5c100e7..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_besu_record_v1_request_pb.ts +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/get_besu_record_v1_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./invoke_contract_v1_request_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class GetBesuRecordV1RequestPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - invokeCall?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB; - transactionHash?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("invokeCall" in data && data.invokeCall != undefined) { - this.invokeCall = data.invokeCall; - } - if ("transactionHash" in data && data.transactionHash != undefined) { - this.transactionHash = data.transactionHash; - } - } - } - get invokeCall() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB, 359347961) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB; - } - set invokeCall(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB) { - pb_1.Message.setWrapperField(this, 359347961, value); - } - get has_invokeCall() { - return pb_1.Message.getField(this, 359347961) != null; - } - get transactionHash() { - return pb_1.Message.getFieldWithDefault(this, 188901646, "") as string; - } - set transactionHash(value: string) { - pb_1.Message.setField(this, 188901646, value); - } - static fromObject(data: { - invokeCall?: ReturnType; - transactionHash?: string; - }): GetBesuRecordV1RequestPB { - const message = new GetBesuRecordV1RequestPB({}); - if (data.invokeCall != null) { - message.invokeCall = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB.fromObject(data.invokeCall); - } - if (data.transactionHash != null) { - message.transactionHash = data.transactionHash; - } - return message; - } - toObject() { - const data: { - invokeCall?: ReturnType; - transactionHash?: string; - } = {}; - if (this.invokeCall != null) { - data.invokeCall = this.invokeCall.toObject(); - } - if (this.transactionHash != null) { - data.transactionHash = this.transactionHash; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_invokeCall) - writer.writeMessage(359347961, this.invokeCall, () => this.invokeCall.serialize(writer)); - if (this.transactionHash.length) - writer.writeString(188901646, this.transactionHash); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBesuRecordV1RequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBesuRecordV1RequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 359347961: - reader.readMessage(message.invokeCall, () => message.invokeCall = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB.deserialize(reader)); - break; - case 188901646: - message.transactionHash = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetBesuRecordV1RequestPB { - return GetBesuRecordV1RequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_besu_record_v1_response_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_besu_record_v1_response_pb.ts deleted file mode 100644 index f1d57f5671..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_besu_record_v1_response_pb.ts +++ /dev/null @@ -1,171 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/get_besu_record_v1_response_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class GetBesuRecordV1ResponsePB extends pb_1.Message { - #one_of_decls: number[][] = [[134507862], [401260801]]; - constructor(data?: any[] | ({ - ledgerId?: string; - stateContract?: string; - } & (({ - transactionInputData?: dependency_1.google.protobuf.Any; - }) | ({ - callOutput?: dependency_1.google.protobuf.Any; - })))) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("ledgerId" in data && data.ledgerId != undefined) { - this.ledgerId = data.ledgerId; - } - if ("stateContract" in data && data.stateContract != undefined) { - this.stateContract = data.stateContract; - } - if ("transactionInputData" in data && data.transactionInputData != undefined) { - this.transactionInputData = data.transactionInputData; - } - if ("callOutput" in data && data.callOutput != undefined) { - this.callOutput = data.callOutput; - } - } - } - get ledgerId() { - return pb_1.Message.getFieldWithDefault(this, 39059559, "") as string; - } - set ledgerId(value: string) { - pb_1.Message.setField(this, 39059559, value); - } - get stateContract() { - return pb_1.Message.getFieldWithDefault(this, 509155523, "") as string; - } - set stateContract(value: string) { - pb_1.Message.setField(this, 509155523, value); - } - get transactionInputData() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 134507862) as dependency_1.google.protobuf.Any; - } - set transactionInputData(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 134507862, this.#one_of_decls[0], value); - } - get has_transactionInputData() { - return pb_1.Message.getField(this, 134507862) != null; - } - get callOutput() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 401260801) as dependency_1.google.protobuf.Any; - } - set callOutput(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 401260801, this.#one_of_decls[1], value); - } - get has_callOutput() { - return pb_1.Message.getField(this, 401260801) != null; - } - get _transactionInputData() { - const cases: { - [index: number]: "none" | "transactionInputData"; - } = { - 0: "none", - 134507862: "transactionInputData" - }; - return cases[pb_1.Message.computeOneofCase(this, [134507862])]; - } - get _callOutput() { - const cases: { - [index: number]: "none" | "callOutput"; - } = { - 0: "none", - 401260801: "callOutput" - }; - return cases[pb_1.Message.computeOneofCase(this, [401260801])]; - } - static fromObject(data: { - ledgerId?: string; - stateContract?: string; - transactionInputData?: ReturnType; - callOutput?: ReturnType; - }): GetBesuRecordV1ResponsePB { - const message = new GetBesuRecordV1ResponsePB({}); - if (data.ledgerId != null) { - message.ledgerId = data.ledgerId; - } - if (data.stateContract != null) { - message.stateContract = data.stateContract; - } - if (data.transactionInputData != null) { - message.transactionInputData = dependency_1.google.protobuf.Any.fromObject(data.transactionInputData); - } - if (data.callOutput != null) { - message.callOutput = dependency_1.google.protobuf.Any.fromObject(data.callOutput); - } - return message; - } - toObject() { - const data: { - ledgerId?: string; - stateContract?: string; - transactionInputData?: ReturnType; - callOutput?: ReturnType; - } = {}; - if (this.ledgerId != null) { - data.ledgerId = this.ledgerId; - } - if (this.stateContract != null) { - data.stateContract = this.stateContract; - } - if (this.transactionInputData != null) { - data.transactionInputData = this.transactionInputData.toObject(); - } - if (this.callOutput != null) { - data.callOutput = this.callOutput.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.ledgerId.length) - writer.writeString(39059559, this.ledgerId); - if (this.stateContract.length) - writer.writeString(509155523, this.stateContract); - if (this.has_transactionInputData) - writer.writeMessage(134507862, this.transactionInputData, () => this.transactionInputData.serialize(writer)); - if (this.has_callOutput) - writer.writeMessage(401260801, this.callOutput, () => this.callOutput.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBesuRecordV1ResponsePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBesuRecordV1ResponsePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 39059559: - message.ledgerId = reader.readString(); - break; - case 509155523: - message.stateContract = reader.readString(); - break; - case 134507862: - reader.readMessage(message.transactionInputData, () => message.transactionInputData = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - case 401260801: - reader.readMessage(message.callOutput, () => message.callOutput = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetBesuRecordV1ResponsePB { - return GetBesuRecordV1ResponsePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_block_v1_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_block_v1_request_pb.ts deleted file mode 100644 index b67937f5a8..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_block_v1_request_pb.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/get_block_v1_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class GetBlockV1RequestPB extends pb_1.Message { - #one_of_decls: number[][] = [[273815337]]; - constructor(data?: any[] | ({} & (({ - blockHashOrBlockNumber?: dependency_1.google.protobuf.Any; - })))) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("blockHashOrBlockNumber" in data && data.blockHashOrBlockNumber != undefined) { - this.blockHashOrBlockNumber = data.blockHashOrBlockNumber; - } - } - } - get blockHashOrBlockNumber() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 273815337) as dependency_1.google.protobuf.Any; - } - set blockHashOrBlockNumber(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 273815337, this.#one_of_decls[0], value); - } - get has_blockHashOrBlockNumber() { - return pb_1.Message.getField(this, 273815337) != null; - } - get _blockHashOrBlockNumber() { - const cases: { - [index: number]: "none" | "blockHashOrBlockNumber"; - } = { - 0: "none", - 273815337: "blockHashOrBlockNumber" - }; - return cases[pb_1.Message.computeOneofCase(this, [273815337])]; - } - static fromObject(data: { - blockHashOrBlockNumber?: ReturnType; - }): GetBlockV1RequestPB { - const message = new GetBlockV1RequestPB({}); - if (data.blockHashOrBlockNumber != null) { - message.blockHashOrBlockNumber = dependency_1.google.protobuf.Any.fromObject(data.blockHashOrBlockNumber); - } - return message; - } - toObject() { - const data: { - blockHashOrBlockNumber?: ReturnType; - } = {}; - if (this.blockHashOrBlockNumber != null) { - data.blockHashOrBlockNumber = this.blockHashOrBlockNumber.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_blockHashOrBlockNumber) - writer.writeMessage(273815337, this.blockHashOrBlockNumber, () => this.blockHashOrBlockNumber.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockV1RequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBlockV1RequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 273815337: - reader.readMessage(message.blockHashOrBlockNumber, () => message.blockHashOrBlockNumber = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetBlockV1RequestPB { - return GetBlockV1RequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_block_v1_response_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_block_v1_response_pb.ts deleted file mode 100644 index ca393cbef3..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_block_v1_response_pb.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/get_block_v1_response_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./evm_block_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class GetBlockV1ResponsePB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - block?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmBlockPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("block" in data && data.block != undefined) { - this.block = data.block; - } - } - } - get block() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmBlockPB, 93832333) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmBlockPB; - } - set block(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmBlockPB) { - pb_1.Message.setWrapperField(this, 93832333, value); - } - get has_block() { - return pb_1.Message.getField(this, 93832333) != null; - } - static fromObject(data: { - block?: ReturnType; - }): GetBlockV1ResponsePB { - const message = new GetBlockV1ResponsePB({}); - if (data.block != null) { - message.block = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmBlockPB.fromObject(data.block); - } - return message; - } - toObject() { - const data: { - block?: ReturnType; - } = {}; - if (this.block != null) { - data.block = this.block.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_block) - writer.writeMessage(93832333, this.block, () => this.block.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockV1ResponsePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBlockV1ResponsePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 93832333: - reader.readMessage(message.block, () => message.block = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmBlockPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetBlockV1ResponsePB { - return GetBlockV1ResponsePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_past_logs_v1_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_past_logs_v1_request_pb.ts deleted file mode 100644 index f0a85ec018..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_past_logs_v1_request_pb.ts +++ /dev/null @@ -1,184 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/get_past_logs_v1_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class GetPastLogsV1RequestPB extends pb_1.Message { - #one_of_decls: number[][] = [[107898160], [53671683], [73950222]]; - constructor(data?: any[] | ({ - topics?: dependency_1.google.protobuf.Any[]; - } & (({ - toBlock?: dependency_1.google.protobuf.Any; - }) | ({ - fromBlock?: dependency_1.google.protobuf.Any; - }) | ({ - address?: dependency_1.google.protobuf.Any; - })))) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [331163357], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("toBlock" in data && data.toBlock != undefined) { - this.toBlock = data.toBlock; - } - if ("fromBlock" in data && data.fromBlock != undefined) { - this.fromBlock = data.fromBlock; - } - if ("address" in data && data.address != undefined) { - this.address = data.address; - } - if ("topics" in data && data.topics != undefined) { - this.topics = data.topics; - } - } - } - get toBlock() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 107898160) as dependency_1.google.protobuf.Any; - } - set toBlock(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 107898160, this.#one_of_decls[0], value); - } - get has_toBlock() { - return pb_1.Message.getField(this, 107898160) != null; - } - get fromBlock() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 53671683) as dependency_1.google.protobuf.Any; - } - set fromBlock(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 53671683, this.#one_of_decls[1], value); - } - get has_fromBlock() { - return pb_1.Message.getField(this, 53671683) != null; - } - get address() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 73950222) as dependency_1.google.protobuf.Any; - } - set address(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 73950222, this.#one_of_decls[2], value); - } - get has_address() { - return pb_1.Message.getField(this, 73950222) != null; - } - get topics() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 331163357) as dependency_1.google.protobuf.Any[]; - } - set topics(value: dependency_1.google.protobuf.Any[]) { - pb_1.Message.setRepeatedWrapperField(this, 331163357, value); - } - get _toBlock() { - const cases: { - [index: number]: "none" | "toBlock"; - } = { - 0: "none", - 107898160: "toBlock" - }; - return cases[pb_1.Message.computeOneofCase(this, [107898160])]; - } - get _fromBlock() { - const cases: { - [index: number]: "none" | "fromBlock"; - } = { - 0: "none", - 53671683: "fromBlock" - }; - return cases[pb_1.Message.computeOneofCase(this, [53671683])]; - } - get _address() { - const cases: { - [index: number]: "none" | "address"; - } = { - 0: "none", - 73950222: "address" - }; - return cases[pb_1.Message.computeOneofCase(this, [73950222])]; - } - static fromObject(data: { - toBlock?: ReturnType; - fromBlock?: ReturnType; - address?: ReturnType; - topics?: ReturnType[]; - }): GetPastLogsV1RequestPB { - const message = new GetPastLogsV1RequestPB({}); - if (data.toBlock != null) { - message.toBlock = dependency_1.google.protobuf.Any.fromObject(data.toBlock); - } - if (data.fromBlock != null) { - message.fromBlock = dependency_1.google.protobuf.Any.fromObject(data.fromBlock); - } - if (data.address != null) { - message.address = dependency_1.google.protobuf.Any.fromObject(data.address); - } - if (data.topics != null) { - message.topics = data.topics.map(item => dependency_1.google.protobuf.Any.fromObject(item)); - } - return message; - } - toObject() { - const data: { - toBlock?: ReturnType; - fromBlock?: ReturnType; - address?: ReturnType; - topics?: ReturnType[]; - } = {}; - if (this.toBlock != null) { - data.toBlock = this.toBlock.toObject(); - } - if (this.fromBlock != null) { - data.fromBlock = this.fromBlock.toObject(); - } - if (this.address != null) { - data.address = this.address.toObject(); - } - if (this.topics != null) { - data.topics = this.topics.map((item: dependency_1.google.protobuf.Any) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_toBlock) - writer.writeMessage(107898160, this.toBlock, () => this.toBlock.serialize(writer)); - if (this.has_fromBlock) - writer.writeMessage(53671683, this.fromBlock, () => this.fromBlock.serialize(writer)); - if (this.has_address) - writer.writeMessage(73950222, this.address, () => this.address.serialize(writer)); - if (this.topics.length) - writer.writeRepeatedMessage(331163357, this.topics, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetPastLogsV1RequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetPastLogsV1RequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 107898160: - reader.readMessage(message.toBlock, () => message.toBlock = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - case 53671683: - reader.readMessage(message.fromBlock, () => message.fromBlock = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - case 73950222: - reader.readMessage(message.address, () => message.address = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - case 331163357: - reader.readMessage(message.topics, () => pb_1.Message.addToRepeatedWrapperField(message, 331163357, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetPastLogsV1RequestPB { - return GetPastLogsV1RequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_past_logs_v1_response_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_past_logs_v1_response_pb.ts deleted file mode 100644 index 719aa57319..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_past_logs_v1_response_pb.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/get_past_logs_v1_response_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./evm_log_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class GetPastLogsV1ResponsePB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - logs?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmLogPB[]; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3327407], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("logs" in data && data.logs != undefined) { - this.logs = data.logs; - } - } - } - get logs() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmLogPB, 3327407) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmLogPB[]; - } - set logs(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmLogPB[]) { - pb_1.Message.setRepeatedWrapperField(this, 3327407, value); - } - static fromObject(data: { - logs?: ReturnType[]; - }): GetPastLogsV1ResponsePB { - const message = new GetPastLogsV1ResponsePB({}); - if (data.logs != null) { - message.logs = data.logs.map(item => dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmLogPB.fromObject(item)); - } - return message; - } - toObject() { - const data: { - logs?: ReturnType[]; - } = {}; - if (this.logs != null) { - data.logs = this.logs.map((item: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmLogPB) => item.toObject()); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.logs.length) - writer.writeRepeatedMessage(3327407, this.logs, (item: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmLogPB) => item.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetPastLogsV1ResponsePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetPastLogsV1ResponsePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 3327407: - reader.readMessage(message.logs, () => pb_1.Message.addToRepeatedWrapperField(message, 3327407, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmLogPB.deserialize(reader), dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmLogPB)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetPastLogsV1ResponsePB { - return GetPastLogsV1ResponsePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_transaction_v1_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_transaction_v1_request_pb.ts deleted file mode 100644 index f6dfad2cbe..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_transaction_v1_request_pb.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/get_transaction_v1_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class GetTransactionV1RequestPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - transactionHash?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("transactionHash" in data && data.transactionHash != undefined) { - this.transactionHash = data.transactionHash; - } - } - } - get transactionHash() { - return pb_1.Message.getFieldWithDefault(this, 188901646, "") as string; - } - set transactionHash(value: string) { - pb_1.Message.setField(this, 188901646, value); - } - static fromObject(data: { - transactionHash?: string; - }): GetTransactionV1RequestPB { - const message = new GetTransactionV1RequestPB({}); - if (data.transactionHash != null) { - message.transactionHash = data.transactionHash; - } - return message; - } - toObject() { - const data: { - transactionHash?: string; - } = {}; - if (this.transactionHash != null) { - data.transactionHash = this.transactionHash; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.transactionHash.length) - writer.writeString(188901646, this.transactionHash); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetTransactionV1RequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTransactionV1RequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 188901646: - message.transactionHash = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetTransactionV1RequestPB { - return GetTransactionV1RequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_transaction_v1_response_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_transaction_v1_response_pb.ts deleted file mode 100644 index 6ee76c1247..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/get_transaction_v1_response_pb.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/get_transaction_v1_response_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./evm_transaction_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class GetTransactionV1ResponsePB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - transaction?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmTransactionPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("transaction" in data && data.transaction != undefined) { - this.transaction = data.transaction; - } - } - } - get transaction() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmTransactionPB, 530633441) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmTransactionPB; - } - set transaction(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmTransactionPB) { - pb_1.Message.setWrapperField(this, 530633441, value); - } - get has_transaction() { - return pb_1.Message.getField(this, 530633441) != null; - } - static fromObject(data: { - transaction?: ReturnType; - }): GetTransactionV1ResponsePB { - const message = new GetTransactionV1ResponsePB({}); - if (data.transaction != null) { - message.transaction = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmTransactionPB.fromObject(data.transaction); - } - return message; - } - toObject() { - const data: { - transaction?: ReturnType; - } = {}; - if (this.transaction != null) { - data.transaction = this.transaction.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_transaction) - writer.writeMessage(530633441, this.transaction, () => this.transaction.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetTransactionV1ResponsePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTransactionV1ResponsePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 530633441: - reader.readMessage(message.transaction, () => message.transaction = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmTransactionPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetTransactionV1ResponsePB { - return GetTransactionV1ResponsePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/invoke_contract_v1_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/invoke_contract_v1_request_pb.ts deleted file mode 100644 index bb7475d42b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/invoke_contract_v1_request_pb.ts +++ /dev/null @@ -1,394 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/invoke_contract_v1_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./besu_private_transaction_config_pb"; -import * as dependency_3 from "./eth_contract_invocation_type_pb"; -import * as dependency_4 from "./web3_block_header_timestamp_pb"; -import * as dependency_5 from "./web3_signing_credential_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class InvokeContractV1RequestPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - contractName?: string; - signingCredential?: dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB; - invocationType?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.EthContractInvocationTypePB; - methodName?: string; - params?: dependency_1.google.protobuf.Any[]; - contractAbi?: dependency_1.google.protobuf.Any[]; - contractAddress?: string; - value?: dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - gas?: dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - gasPrice?: dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - nonce?: number; - timeoutMs?: number; - keychainId?: string; - privateTransactionConfig?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [458557051, 512852493], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("contractName" in data && data.contractName != undefined) { - this.contractName = data.contractName; - } - if ("signingCredential" in data && data.signingCredential != undefined) { - this.signingCredential = data.signingCredential; - } - if ("invocationType" in data && data.invocationType != undefined) { - this.invocationType = data.invocationType; - } - if ("methodName" in data && data.methodName != undefined) { - this.methodName = data.methodName; - } - if ("params" in data && data.params != undefined) { - this.params = data.params; - } - if ("contractAbi" in data && data.contractAbi != undefined) { - this.contractAbi = data.contractAbi; - } - if ("contractAddress" in data && data.contractAddress != undefined) { - this.contractAddress = data.contractAddress; - } - if ("value" in data && data.value != undefined) { - this.value = data.value; - } - if ("gas" in data && data.gas != undefined) { - this.gas = data.gas; - } - if ("gasPrice" in data && data.gasPrice != undefined) { - this.gasPrice = data.gasPrice; - } - if ("nonce" in data && data.nonce != undefined) { - this.nonce = data.nonce; - } - if ("timeoutMs" in data && data.timeoutMs != undefined) { - this.timeoutMs = data.timeoutMs; - } - if ("keychainId" in data && data.keychainId != undefined) { - this.keychainId = data.keychainId; - } - if ("privateTransactionConfig" in data && data.privateTransactionConfig != undefined) { - this.privateTransactionConfig = data.privateTransactionConfig; - } - } - } - get contractName() { - return pb_1.Message.getFieldWithDefault(this, 328784197, "") as string; - } - set contractName(value: string) { - pb_1.Message.setField(this, 328784197, value); - } - get signingCredential() { - return pb_1.Message.getWrapperField(this, dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB, 233015102) as dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB; - } - set signingCredential(value: dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB) { - pb_1.Message.setWrapperField(this, 233015102, value); - } - get has_signingCredential() { - return pb_1.Message.getField(this, 233015102) != null; - } - get invocationType() { - return pb_1.Message.getFieldWithDefault(this, 163296237, dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.EthContractInvocationTypePB.EthContractInvocationTypePB_SEND) as dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.EthContractInvocationTypePB; - } - set invocationType(value: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.EthContractInvocationTypePB) { - pb_1.Message.setField(this, 163296237, value); - } - get methodName() { - return pb_1.Message.getFieldWithDefault(this, 186292469, "") as string; - } - set methodName(value: string) { - pb_1.Message.setField(this, 186292469, value); - } - get params() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 458557051) as dependency_1.google.protobuf.Any[]; - } - set params(value: dependency_1.google.protobuf.Any[]) { - pb_1.Message.setRepeatedWrapperField(this, 458557051, value); - } - get contractAbi() { - return pb_1.Message.getRepeatedWrapperField(this, dependency_1.google.protobuf.Any, 512852493) as dependency_1.google.protobuf.Any[]; - } - set contractAbi(value: dependency_1.google.protobuf.Any[]) { - pb_1.Message.setRepeatedWrapperField(this, 512852493, value); - } - get contractAddress() { - return pb_1.Message.getFieldWithDefault(this, 214641282, "") as string; - } - set contractAddress(value: string) { - pb_1.Message.setField(this, 214641282, value); - } - get value() { - return pb_1.Message.getWrapperField(this, dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB, 111972721) as dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - } - set value(value: dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB) { - pb_1.Message.setWrapperField(this, 111972721, value); - } - get has_value() { - return pb_1.Message.getField(this, 111972721) != null; - } - get gas() { - return pb_1.Message.getWrapperField(this, dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB, 102105) as dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - } - set gas(value: dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB) { - pb_1.Message.setWrapperField(this, 102105, value); - } - get has_gas() { - return pb_1.Message.getField(this, 102105) != null; - } - get gasPrice() { - return pb_1.Message.getWrapperField(this, dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB, 5271059) as dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - } - set gasPrice(value: dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB) { - pb_1.Message.setWrapperField(this, 5271059, value); - } - get has_gasPrice() { - return pb_1.Message.getField(this, 5271059) != null; - } - get nonce() { - return pb_1.Message.getFieldWithDefault(this, 105002991, 0) as number; - } - set nonce(value: number) { - pb_1.Message.setField(this, 105002991, value); - } - get timeoutMs() { - return pb_1.Message.getFieldWithDefault(this, 51479271, 0) as number; - } - set timeoutMs(value: number) { - pb_1.Message.setField(this, 51479271, value); - } - get keychainId() { - return pb_1.Message.getFieldWithDefault(this, 14058372, "") as string; - } - set keychainId(value: string) { - pb_1.Message.setField(this, 14058372, value); - } - get privateTransactionConfig() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB, 276796542) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB; - } - set privateTransactionConfig(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB) { - pb_1.Message.setWrapperField(this, 276796542, value); - } - get has_privateTransactionConfig() { - return pb_1.Message.getField(this, 276796542) != null; - } - static fromObject(data: { - contractName?: string; - signingCredential?: ReturnType; - invocationType?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.EthContractInvocationTypePB; - methodName?: string; - params?: ReturnType[]; - contractAbi?: ReturnType[]; - contractAddress?: string; - value?: ReturnType; - gas?: ReturnType; - gasPrice?: ReturnType; - nonce?: number; - timeoutMs?: number; - keychainId?: string; - privateTransactionConfig?: ReturnType; - }): InvokeContractV1RequestPB { - const message = new InvokeContractV1RequestPB({}); - if (data.contractName != null) { - message.contractName = data.contractName; - } - if (data.signingCredential != null) { - message.signingCredential = dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB.fromObject(data.signingCredential); - } - if (data.invocationType != null) { - message.invocationType = data.invocationType; - } - if (data.methodName != null) { - message.methodName = data.methodName; - } - if (data.params != null) { - message.params = data.params.map(item => dependency_1.google.protobuf.Any.fromObject(item)); - } - if (data.contractAbi != null) { - message.contractAbi = data.contractAbi.map(item => dependency_1.google.protobuf.Any.fromObject(item)); - } - if (data.contractAddress != null) { - message.contractAddress = data.contractAddress; - } - if (data.value != null) { - message.value = dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.fromObject(data.value); - } - if (data.gas != null) { - message.gas = dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.fromObject(data.gas); - } - if (data.gasPrice != null) { - message.gasPrice = dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.fromObject(data.gasPrice); - } - if (data.nonce != null) { - message.nonce = data.nonce; - } - if (data.timeoutMs != null) { - message.timeoutMs = data.timeoutMs; - } - if (data.keychainId != null) { - message.keychainId = data.keychainId; - } - if (data.privateTransactionConfig != null) { - message.privateTransactionConfig = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB.fromObject(data.privateTransactionConfig); - } - return message; - } - toObject() { - const data: { - contractName?: string; - signingCredential?: ReturnType; - invocationType?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.EthContractInvocationTypePB; - methodName?: string; - params?: ReturnType[]; - contractAbi?: ReturnType[]; - contractAddress?: string; - value?: ReturnType; - gas?: ReturnType; - gasPrice?: ReturnType; - nonce?: number; - timeoutMs?: number; - keychainId?: string; - privateTransactionConfig?: ReturnType; - } = {}; - if (this.contractName != null) { - data.contractName = this.contractName; - } - if (this.signingCredential != null) { - data.signingCredential = this.signingCredential.toObject(); - } - if (this.invocationType != null) { - data.invocationType = this.invocationType; - } - if (this.methodName != null) { - data.methodName = this.methodName; - } - if (this.params != null) { - data.params = this.params.map((item: dependency_1.google.protobuf.Any) => item.toObject()); - } - if (this.contractAbi != null) { - data.contractAbi = this.contractAbi.map((item: dependency_1.google.protobuf.Any) => item.toObject()); - } - if (this.contractAddress != null) { - data.contractAddress = this.contractAddress; - } - if (this.value != null) { - data.value = this.value.toObject(); - } - if (this.gas != null) { - data.gas = this.gas.toObject(); - } - if (this.gasPrice != null) { - data.gasPrice = this.gasPrice.toObject(); - } - if (this.nonce != null) { - data.nonce = this.nonce; - } - if (this.timeoutMs != null) { - data.timeoutMs = this.timeoutMs; - } - if (this.keychainId != null) { - data.keychainId = this.keychainId; - } - if (this.privateTransactionConfig != null) { - data.privateTransactionConfig = this.privateTransactionConfig.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.contractName.length) - writer.writeString(328784197, this.contractName); - if (this.has_signingCredential) - writer.writeMessage(233015102, this.signingCredential, () => this.signingCredential.serialize(writer)); - if (this.invocationType != dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.EthContractInvocationTypePB.EthContractInvocationTypePB_SEND) - writer.writeEnum(163296237, this.invocationType); - if (this.methodName.length) - writer.writeString(186292469, this.methodName); - if (this.params.length) - writer.writeRepeatedMessage(458557051, this.params, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); - if (this.contractAbi.length) - writer.writeRepeatedMessage(512852493, this.contractAbi, (item: dependency_1.google.protobuf.Any) => item.serialize(writer)); - if (this.contractAddress.length) - writer.writeString(214641282, this.contractAddress); - if (this.has_value) - writer.writeMessage(111972721, this.value, () => this.value.serialize(writer)); - if (this.has_gas) - writer.writeMessage(102105, this.gas, () => this.gas.serialize(writer)); - if (this.has_gasPrice) - writer.writeMessage(5271059, this.gasPrice, () => this.gasPrice.serialize(writer)); - if (this.nonce != 0) - writer.writeFloat(105002991, this.nonce); - if (this.timeoutMs != 0) - writer.writeFloat(51479271, this.timeoutMs); - if (this.keychainId.length) - writer.writeString(14058372, this.keychainId); - if (this.has_privateTransactionConfig) - writer.writeMessage(276796542, this.privateTransactionConfig, () => this.privateTransactionConfig.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InvokeContractV1RequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InvokeContractV1RequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 328784197: - message.contractName = reader.readString(); - break; - case 233015102: - reader.readMessage(message.signingCredential, () => message.signingCredential = dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB.deserialize(reader)); - break; - case 163296237: - message.invocationType = reader.readEnum(); - break; - case 186292469: - message.methodName = reader.readString(); - break; - case 458557051: - reader.readMessage(message.params, () => pb_1.Message.addToRepeatedWrapperField(message, 458557051, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); - break; - case 512852493: - reader.readMessage(message.contractAbi, () => pb_1.Message.addToRepeatedWrapperField(message, 512852493, dependency_1.google.protobuf.Any.deserialize(reader), dependency_1.google.protobuf.Any)); - break; - case 214641282: - message.contractAddress = reader.readString(); - break; - case 111972721: - reader.readMessage(message.value, () => message.value = dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.deserialize(reader)); - break; - case 102105: - reader.readMessage(message.gas, () => message.gas = dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.deserialize(reader)); - break; - case 5271059: - reader.readMessage(message.gasPrice, () => message.gasPrice = dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.deserialize(reader)); - break; - case 105002991: - message.nonce = reader.readFloat(); - break; - case 51479271: - message.timeoutMs = reader.readFloat(); - break; - case 14058372: - message.keychainId = reader.readString(); - break; - case 276796542: - reader.readMessage(message.privateTransactionConfig, () => message.privateTransactionConfig = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): InvokeContractV1RequestPB { - return InvokeContractV1RequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/invoke_contract_v1_response_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/invoke_contract_v1_response_pb.ts deleted file mode 100644 index 90f5b842ab..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/invoke_contract_v1_response_pb.ts +++ /dev/null @@ -1,139 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/invoke_contract_v1_response_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./web3_transaction_receipt_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class InvokeContractV1ResponsePB extends pb_1.Message { - #one_of_decls: number[][] = [[401260801]]; - constructor(data?: any[] | ({ - transactionReceipt?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB; - success?: boolean; - } & (({ - callOutput?: dependency_1.google.protobuf.Any; - })))) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("transactionReceipt" in data && data.transactionReceipt != undefined) { - this.transactionReceipt = data.transactionReceipt; - } - if ("callOutput" in data && data.callOutput != undefined) { - this.callOutput = data.callOutput; - } - if ("success" in data && data.success != undefined) { - this.success = data.success; - } - } - } - get transactionReceipt() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB, 472834426) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB; - } - set transactionReceipt(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB) { - pb_1.Message.setWrapperField(this, 472834426, value); - } - get has_transactionReceipt() { - return pb_1.Message.getField(this, 472834426) != null; - } - get callOutput() { - return pb_1.Message.getWrapperField(this, dependency_1.google.protobuf.Any, 401260801) as dependency_1.google.protobuf.Any; - } - set callOutput(value: dependency_1.google.protobuf.Any) { - pb_1.Message.setOneofWrapperField(this, 401260801, this.#one_of_decls[0], value); - } - get has_callOutput() { - return pb_1.Message.getField(this, 401260801) != null; - } - get success() { - return pb_1.Message.getFieldWithDefault(this, 256557056, false) as boolean; - } - set success(value: boolean) { - pb_1.Message.setField(this, 256557056, value); - } - get _callOutput() { - const cases: { - [index: number]: "none" | "callOutput"; - } = { - 0: "none", - 401260801: "callOutput" - }; - return cases[pb_1.Message.computeOneofCase(this, [401260801])]; - } - static fromObject(data: { - transactionReceipt?: ReturnType; - callOutput?: ReturnType; - success?: boolean; - }): InvokeContractV1ResponsePB { - const message = new InvokeContractV1ResponsePB({}); - if (data.transactionReceipt != null) { - message.transactionReceipt = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB.fromObject(data.transactionReceipt); - } - if (data.callOutput != null) { - message.callOutput = dependency_1.google.protobuf.Any.fromObject(data.callOutput); - } - if (data.success != null) { - message.success = data.success; - } - return message; - } - toObject() { - const data: { - transactionReceipt?: ReturnType; - callOutput?: ReturnType; - success?: boolean; - } = {}; - if (this.transactionReceipt != null) { - data.transactionReceipt = this.transactionReceipt.toObject(); - } - if (this.callOutput != null) { - data.callOutput = this.callOutput.toObject(); - } - if (this.success != null) { - data.success = this.success; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_transactionReceipt) - writer.writeMessage(472834426, this.transactionReceipt, () => this.transactionReceipt.serialize(writer)); - if (this.has_callOutput) - writer.writeMessage(401260801, this.callOutput, () => this.callOutput.serialize(writer)); - if (this.success != false) - writer.writeBool(256557056, this.success); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InvokeContractV1ResponsePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InvokeContractV1ResponsePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 472834426: - reader.readMessage(message.transactionReceipt, () => message.transactionReceipt = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB.deserialize(reader)); - break; - case 401260801: - reader.readMessage(message.callOutput, () => message.callOutput = dependency_1.google.protobuf.Any.deserialize(reader)); - break; - case 256557056: - message.success = reader.readBool(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): InvokeContractV1ResponsePB { - return InvokeContractV1ResponsePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/receipt_type_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/receipt_type_pb.ts deleted file mode 100644 index eeb30946d1..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/receipt_type_pb.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/receipt_type_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export enum ReceiptTypePB { - ReceiptTypePB_NODE_TX_POOL_ACK = 0, - ReceiptTypePB_LEDGER_BLOCK_ACK = 1 - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/run_transaction_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/run_transaction_request_pb.ts deleted file mode 100644 index 0d17029d84..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/run_transaction_request_pb.ts +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/run_transaction_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./besu_private_transaction_config_pb"; -import * as dependency_3 from "./besu_transaction_config_pb"; -import * as dependency_4 from "./consistency_strategy_pb"; -import * as dependency_5 from "./web3_signing_credential_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class RunTransactionRequestPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - web3SigningCredential?: dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB; - transactionConfig?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigPB; - consistencyStrategy?: dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.ConsistencyStrategyPB; - privateTransactionConfig?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("web3SigningCredential" in data && data.web3SigningCredential != undefined) { - this.web3SigningCredential = data.web3SigningCredential; - } - if ("transactionConfig" in data && data.transactionConfig != undefined) { - this.transactionConfig = data.transactionConfig; - } - if ("consistencyStrategy" in data && data.consistencyStrategy != undefined) { - this.consistencyStrategy = data.consistencyStrategy; - } - if ("privateTransactionConfig" in data && data.privateTransactionConfig != undefined) { - this.privateTransactionConfig = data.privateTransactionConfig; - } - } - } - get web3SigningCredential() { - return pb_1.Message.getWrapperField(this, dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB, 451211679) as dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB; - } - set web3SigningCredential(value: dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB) { - pb_1.Message.setWrapperField(this, 451211679, value); - } - get has_web3SigningCredential() { - return pb_1.Message.getField(this, 451211679) != null; - } - get transactionConfig() { - return pb_1.Message.getWrapperField(this, dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigPB, 478618563) as dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigPB; - } - set transactionConfig(value: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigPB) { - pb_1.Message.setWrapperField(this, 478618563, value); - } - get has_transactionConfig() { - return pb_1.Message.getField(this, 478618563) != null; - } - get consistencyStrategy() { - return pb_1.Message.getWrapperField(this, dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.ConsistencyStrategyPB, 86789548) as dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.ConsistencyStrategyPB; - } - set consistencyStrategy(value: dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.ConsistencyStrategyPB) { - pb_1.Message.setWrapperField(this, 86789548, value); - } - get has_consistencyStrategy() { - return pb_1.Message.getField(this, 86789548) != null; - } - get privateTransactionConfig() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB, 276796542) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB; - } - set privateTransactionConfig(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB) { - pb_1.Message.setWrapperField(this, 276796542, value); - } - get has_privateTransactionConfig() { - return pb_1.Message.getField(this, 276796542) != null; - } - static fromObject(data: { - web3SigningCredential?: ReturnType; - transactionConfig?: ReturnType; - consistencyStrategy?: ReturnType; - privateTransactionConfig?: ReturnType; - }): RunTransactionRequestPB { - const message = new RunTransactionRequestPB({}); - if (data.web3SigningCredential != null) { - message.web3SigningCredential = dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB.fromObject(data.web3SigningCredential); - } - if (data.transactionConfig != null) { - message.transactionConfig = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigPB.fromObject(data.transactionConfig); - } - if (data.consistencyStrategy != null) { - message.consistencyStrategy = dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.ConsistencyStrategyPB.fromObject(data.consistencyStrategy); - } - if (data.privateTransactionConfig != null) { - message.privateTransactionConfig = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB.fromObject(data.privateTransactionConfig); - } - return message; - } - toObject() { - const data: { - web3SigningCredential?: ReturnType; - transactionConfig?: ReturnType; - consistencyStrategy?: ReturnType; - privateTransactionConfig?: ReturnType; - } = {}; - if (this.web3SigningCredential != null) { - data.web3SigningCredential = this.web3SigningCredential.toObject(); - } - if (this.transactionConfig != null) { - data.transactionConfig = this.transactionConfig.toObject(); - } - if (this.consistencyStrategy != null) { - data.consistencyStrategy = this.consistencyStrategy.toObject(); - } - if (this.privateTransactionConfig != null) { - data.privateTransactionConfig = this.privateTransactionConfig.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_web3SigningCredential) - writer.writeMessage(451211679, this.web3SigningCredential, () => this.web3SigningCredential.serialize(writer)); - if (this.has_transactionConfig) - writer.writeMessage(478618563, this.transactionConfig, () => this.transactionConfig.serialize(writer)); - if (this.has_consistencyStrategy) - writer.writeMessage(86789548, this.consistencyStrategy, () => this.consistencyStrategy.serialize(writer)); - if (this.has_privateTransactionConfig) - writer.writeMessage(276796542, this.privateTransactionConfig, () => this.privateTransactionConfig.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RunTransactionRequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RunTransactionRequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 451211679: - reader.readMessage(message.web3SigningCredential, () => message.web3SigningCredential = dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialPB.deserialize(reader)); - break; - case 478618563: - reader.readMessage(message.transactionConfig, () => message.transactionConfig = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuTransactionConfigPB.deserialize(reader)); - break; - case 86789548: - reader.readMessage(message.consistencyStrategy, () => message.consistencyStrategy = dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.ConsistencyStrategyPB.deserialize(reader)); - break; - case 276796542: - reader.readMessage(message.privateTransactionConfig, () => message.privateTransactionConfig = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.BesuPrivateTransactionConfigPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): RunTransactionRequestPB { - return RunTransactionRequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/run_transaction_response_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/run_transaction_response_pb.ts deleted file mode 100644 index fb91ccf3d4..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/run_transaction_response_pb.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/run_transaction_response_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./web3_transaction_receipt_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class RunTransactionResponsePB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - transactionReceipt?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("transactionReceipt" in data && data.transactionReceipt != undefined) { - this.transactionReceipt = data.transactionReceipt; - } - } - } - get transactionReceipt() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB, 472834426) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB; - } - set transactionReceipt(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB) { - pb_1.Message.setWrapperField(this, 472834426, value); - } - get has_transactionReceipt() { - return pb_1.Message.getField(this, 472834426) != null; - } - static fromObject(data: { - transactionReceipt?: ReturnType; - }): RunTransactionResponsePB { - const message = new RunTransactionResponsePB({}); - if (data.transactionReceipt != null) { - message.transactionReceipt = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB.fromObject(data.transactionReceipt); - } - return message; - } - toObject() { - const data: { - transactionReceipt?: ReturnType; - } = {}; - if (this.transactionReceipt != null) { - data.transactionReceipt = this.transactionReceipt.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_transactionReceipt) - writer.writeMessage(472834426, this.transactionReceipt, () => this.transactionReceipt.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RunTransactionResponsePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RunTransactionResponsePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 472834426: - reader.readMessage(message.transactionReceipt, () => message.transactionReceipt = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3TransactionReceiptPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): RunTransactionResponsePB { - return RunTransactionResponsePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/sign_transaction_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/sign_transaction_request_pb.ts deleted file mode 100644 index 42ee672815..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/sign_transaction_request_pb.ts +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/sign_transaction_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class SignTransactionRequestPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - keychainId?: string; - keychainRef?: string; - transactionHash?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("keychainId" in data && data.keychainId != undefined) { - this.keychainId = data.keychainId; - } - if ("keychainRef" in data && data.keychainRef != undefined) { - this.keychainRef = data.keychainRef; - } - if ("transactionHash" in data && data.transactionHash != undefined) { - this.transactionHash = data.transactionHash; - } - } - } - get keychainId() { - return pb_1.Message.getFieldWithDefault(this, 14058372, "") as string; - } - set keychainId(value: string) { - pb_1.Message.setField(this, 14058372, value); - } - get keychainRef() { - return pb_1.Message.getFieldWithDefault(this, 101070193, "") as string; - } - set keychainRef(value: string) { - pb_1.Message.setField(this, 101070193, value); - } - get transactionHash() { - return pb_1.Message.getFieldWithDefault(this, 188901646, "") as string; - } - set transactionHash(value: string) { - pb_1.Message.setField(this, 188901646, value); - } - static fromObject(data: { - keychainId?: string; - keychainRef?: string; - transactionHash?: string; - }): SignTransactionRequestPB { - const message = new SignTransactionRequestPB({}); - if (data.keychainId != null) { - message.keychainId = data.keychainId; - } - if (data.keychainRef != null) { - message.keychainRef = data.keychainRef; - } - if (data.transactionHash != null) { - message.transactionHash = data.transactionHash; - } - return message; - } - toObject() { - const data: { - keychainId?: string; - keychainRef?: string; - transactionHash?: string; - } = {}; - if (this.keychainId != null) { - data.keychainId = this.keychainId; - } - if (this.keychainRef != null) { - data.keychainRef = this.keychainRef; - } - if (this.transactionHash != null) { - data.transactionHash = this.transactionHash; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.keychainId.length) - writer.writeString(14058372, this.keychainId); - if (this.keychainRef.length) - writer.writeString(101070193, this.keychainRef); - if (this.transactionHash.length) - writer.writeString(188901646, this.transactionHash); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignTransactionRequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignTransactionRequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 14058372: - message.keychainId = reader.readString(); - break; - case 101070193: - message.keychainRef = reader.readString(); - break; - case 188901646: - message.transactionHash = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): SignTransactionRequestPB { - return SignTransactionRequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/sign_transaction_response_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/sign_transaction_response_pb.ts deleted file mode 100644 index 76f12c2823..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/sign_transaction_response_pb.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/sign_transaction_response_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class SignTransactionResponsePB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - signature?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("signature" in data && data.signature != undefined) { - this.signature = data.signature; - } - } - } - get signature() { - return pb_1.Message.getFieldWithDefault(this, 536713401, "") as string; - } - set signature(value: string) { - pb_1.Message.setField(this, 536713401, value); - } - static fromObject(data: { - signature?: string; - }): SignTransactionResponsePB { - const message = new SignTransactionResponsePB({}); - if (data.signature != null) { - message.signature = data.signature; - } - return message; - } - toObject() { - const data: { - signature?: string; - } = {}; - if (this.signature != null) { - data.signature = this.signature; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.signature.length) - writer.writeString(536713401, this.signature); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignTransactionResponsePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignTransactionResponsePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 536713401: - message.signature = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): SignTransactionResponsePB { - return SignTransactionResponsePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/watch_blocks_v1_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/watch_blocks_v1_pb.ts deleted file mode 100644 index a504480b17..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/watch_blocks_v1_pb.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/watch_blocks_v1_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export enum WatchBlocksV1PB { - WatchBlocksV1PB_Subscribe = 0, - WatchBlocksV1PB_Next = 1, - WatchBlocksV1PB_Unsubscribe = 2, - WatchBlocksV1PB_Error = 3, - WatchBlocksV1PB_Complete = 4 - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/watch_blocks_v1_progress_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/watch_blocks_v1_progress_pb.ts deleted file mode 100644 index 471a164c2f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/watch_blocks_v1_progress_pb.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/watch_blocks_v1_progress_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./web3_block_header_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class WatchBlocksV1ProgressPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - blockHeader?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("blockHeader" in data && data.blockHeader != undefined) { - this.blockHeader = data.blockHeader; - } - } - } - get blockHeader() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderPB, 18691451) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderPB; - } - set blockHeader(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderPB) { - pb_1.Message.setWrapperField(this, 18691451, value); - } - get has_blockHeader() { - return pb_1.Message.getField(this, 18691451) != null; - } - static fromObject(data: { - blockHeader?: ReturnType; - }): WatchBlocksV1ProgressPB { - const message = new WatchBlocksV1ProgressPB({}); - if (data.blockHeader != null) { - message.blockHeader = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderPB.fromObject(data.blockHeader); - } - return message; - } - toObject() { - const data: { - blockHeader?: ReturnType; - } = {}; - if (this.blockHeader != null) { - data.blockHeader = this.blockHeader.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_blockHeader) - writer.writeMessage(18691451, this.blockHeader, () => this.blockHeader.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WatchBlocksV1ProgressPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WatchBlocksV1ProgressPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 18691451: - reader.readMessage(message.blockHeader, () => message.blockHeader = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): WatchBlocksV1ProgressPB { - return WatchBlocksV1ProgressPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/watch_blocks_v1_request_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/watch_blocks_v1_request_pb.ts deleted file mode 100644 index 17ac510f3a..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/watch_blocks_v1_request_pb.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/watch_blocks_v1_request_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./watch_blocks_v1_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class WatchBlocksV1RequestPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - event?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1PB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("event" in data && data.event != undefined) { - this.event = data.event; - } - } - } - get event() { - return pb_1.Message.getFieldWithDefault(this, 96891546, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1PB.WatchBlocksV1PB_Subscribe) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1PB; - } - set event(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1PB) { - pb_1.Message.setField(this, 96891546, value); - } - static fromObject(data: { - event?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1PB; - }): WatchBlocksV1RequestPB { - const message = new WatchBlocksV1RequestPB({}); - if (data.event != null) { - message.event = data.event; - } - return message; - } - toObject() { - const data: { - event?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1PB; - } = {}; - if (this.event != null) { - data.event = this.event; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.event != dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1PB.WatchBlocksV1PB_Subscribe) - writer.writeEnum(96891546, this.event); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WatchBlocksV1RequestPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WatchBlocksV1RequestPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 96891546: - message.event = reader.readEnum(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): WatchBlocksV1RequestPB { - return WatchBlocksV1RequestPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_block_header_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_block_header_pb.ts deleted file mode 100644 index 2a3eeb9f4f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_block_header_pb.ts +++ /dev/null @@ -1,379 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/web3_block_header_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./web3_block_header_timestamp_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class Web3BlockHeaderPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - number?: number; - hash?: string; - parentHash?: string; - nonce?: string; - sha3Uncles?: string; - logsBloom?: string; - transactionRoot?: string; - stateRoot?: string; - receiptRoot?: string; - miner?: string; - extraData?: string; - gasLimit?: number; - gasUsed?: number; - timestamp?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("number" in data && data.number != undefined) { - this.number = data.number; - } - if ("hash" in data && data.hash != undefined) { - this.hash = data.hash; - } - if ("parentHash" in data && data.parentHash != undefined) { - this.parentHash = data.parentHash; - } - if ("nonce" in data && data.nonce != undefined) { - this.nonce = data.nonce; - } - if ("sha3Uncles" in data && data.sha3Uncles != undefined) { - this.sha3Uncles = data.sha3Uncles; - } - if ("logsBloom" in data && data.logsBloom != undefined) { - this.logsBloom = data.logsBloom; - } - if ("transactionRoot" in data && data.transactionRoot != undefined) { - this.transactionRoot = data.transactionRoot; - } - if ("stateRoot" in data && data.stateRoot != undefined) { - this.stateRoot = data.stateRoot; - } - if ("receiptRoot" in data && data.receiptRoot != undefined) { - this.receiptRoot = data.receiptRoot; - } - if ("miner" in data && data.miner != undefined) { - this.miner = data.miner; - } - if ("extraData" in data && data.extraData != undefined) { - this.extraData = data.extraData; - } - if ("gasLimit" in data && data.gasLimit != undefined) { - this.gasLimit = data.gasLimit; - } - if ("gasUsed" in data && data.gasUsed != undefined) { - this.gasUsed = data.gasUsed; - } - if ("timestamp" in data && data.timestamp != undefined) { - this.timestamp = data.timestamp; - } - } - } - get number() { - return pb_1.Message.getFieldWithDefault(this, 497493176, 0) as number; - } - set number(value: number) { - pb_1.Message.setField(this, 497493176, value); - } - get hash() { - return pb_1.Message.getFieldWithDefault(this, 3195150, "") as string; - } - set hash(value: string) { - pb_1.Message.setField(this, 3195150, value); - } - get parentHash() { - return pb_1.Message.getFieldWithDefault(this, 245049128, "") as string; - } - set parentHash(value: string) { - pb_1.Message.setField(this, 245049128, value); - } - get nonce() { - return pb_1.Message.getFieldWithDefault(this, 105002991, "") as string; - } - set nonce(value: string) { - pb_1.Message.setField(this, 105002991, value); - } - get sha3Uncles() { - return pb_1.Message.getFieldWithDefault(this, 373514458, "") as string; - } - set sha3Uncles(value: string) { - pb_1.Message.setField(this, 373514458, value); - } - get logsBloom() { - return pb_1.Message.getFieldWithDefault(this, 399161966, "") as string; - } - set logsBloom(value: string) { - pb_1.Message.setField(this, 399161966, value); - } - get transactionRoot() { - return pb_1.Message.getFieldWithDefault(this, 189212898, "") as string; - } - set transactionRoot(value: string) { - pb_1.Message.setField(this, 189212898, value); - } - get stateRoot() { - return pb_1.Message.getFieldWithDefault(this, 475330288, "") as string; - } - set stateRoot(value: string) { - pb_1.Message.setField(this, 475330288, value); - } - get receiptRoot() { - return pb_1.Message.getFieldWithDefault(this, 422939453, "") as string; - } - set receiptRoot(value: string) { - pb_1.Message.setField(this, 422939453, value); - } - get miner() { - return pb_1.Message.getFieldWithDefault(this, 103900799, "") as string; - } - set miner(value: string) { - pb_1.Message.setField(this, 103900799, value); - } - get extraData() { - return pb_1.Message.getFieldWithDefault(this, 253792294, "") as string; - } - set extraData(value: string) { - pb_1.Message.setField(this, 253792294, value); - } - get gasLimit() { - return pb_1.Message.getFieldWithDefault(this, 9229217, 0) as number; - } - set gasLimit(value: number) { - pb_1.Message.setField(this, 9229217, value); - } - get gasUsed() { - return pb_1.Message.getFieldWithDefault(this, 190522826, 0) as number; - } - set gasUsed(value: number) { - pb_1.Message.setField(this, 190522826, value); - } - get timestamp() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB, 55126294) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB; - } - set timestamp(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB) { - pb_1.Message.setWrapperField(this, 55126294, value); - } - get has_timestamp() { - return pb_1.Message.getField(this, 55126294) != null; - } - static fromObject(data: { - number?: number; - hash?: string; - parentHash?: string; - nonce?: string; - sha3Uncles?: string; - logsBloom?: string; - transactionRoot?: string; - stateRoot?: string; - receiptRoot?: string; - miner?: string; - extraData?: string; - gasLimit?: number; - gasUsed?: number; - timestamp?: ReturnType; - }): Web3BlockHeaderPB { - const message = new Web3BlockHeaderPB({}); - if (data.number != null) { - message.number = data.number; - } - if (data.hash != null) { - message.hash = data.hash; - } - if (data.parentHash != null) { - message.parentHash = data.parentHash; - } - if (data.nonce != null) { - message.nonce = data.nonce; - } - if (data.sha3Uncles != null) { - message.sha3Uncles = data.sha3Uncles; - } - if (data.logsBloom != null) { - message.logsBloom = data.logsBloom; - } - if (data.transactionRoot != null) { - message.transactionRoot = data.transactionRoot; - } - if (data.stateRoot != null) { - message.stateRoot = data.stateRoot; - } - if (data.receiptRoot != null) { - message.receiptRoot = data.receiptRoot; - } - if (data.miner != null) { - message.miner = data.miner; - } - if (data.extraData != null) { - message.extraData = data.extraData; - } - if (data.gasLimit != null) { - message.gasLimit = data.gasLimit; - } - if (data.gasUsed != null) { - message.gasUsed = data.gasUsed; - } - if (data.timestamp != null) { - message.timestamp = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.fromObject(data.timestamp); - } - return message; - } - toObject() { - const data: { - number?: number; - hash?: string; - parentHash?: string; - nonce?: string; - sha3Uncles?: string; - logsBloom?: string; - transactionRoot?: string; - stateRoot?: string; - receiptRoot?: string; - miner?: string; - extraData?: string; - gasLimit?: number; - gasUsed?: number; - timestamp?: ReturnType; - } = {}; - if (this.number != null) { - data.number = this.number; - } - if (this.hash != null) { - data.hash = this.hash; - } - if (this.parentHash != null) { - data.parentHash = this.parentHash; - } - if (this.nonce != null) { - data.nonce = this.nonce; - } - if (this.sha3Uncles != null) { - data.sha3Uncles = this.sha3Uncles; - } - if (this.logsBloom != null) { - data.logsBloom = this.logsBloom; - } - if (this.transactionRoot != null) { - data.transactionRoot = this.transactionRoot; - } - if (this.stateRoot != null) { - data.stateRoot = this.stateRoot; - } - if (this.receiptRoot != null) { - data.receiptRoot = this.receiptRoot; - } - if (this.miner != null) { - data.miner = this.miner; - } - if (this.extraData != null) { - data.extraData = this.extraData; - } - if (this.gasLimit != null) { - data.gasLimit = this.gasLimit; - } - if (this.gasUsed != null) { - data.gasUsed = this.gasUsed; - } - if (this.timestamp != null) { - data.timestamp = this.timestamp.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.number != 0) - writer.writeFloat(497493176, this.number); - if (this.hash.length) - writer.writeString(3195150, this.hash); - if (this.parentHash.length) - writer.writeString(245049128, this.parentHash); - if (this.nonce.length) - writer.writeString(105002991, this.nonce); - if (this.sha3Uncles.length) - writer.writeString(373514458, this.sha3Uncles); - if (this.logsBloom.length) - writer.writeString(399161966, this.logsBloom); - if (this.transactionRoot.length) - writer.writeString(189212898, this.transactionRoot); - if (this.stateRoot.length) - writer.writeString(475330288, this.stateRoot); - if (this.receiptRoot.length) - writer.writeString(422939453, this.receiptRoot); - if (this.miner.length) - writer.writeString(103900799, this.miner); - if (this.extraData.length) - writer.writeString(253792294, this.extraData); - if (this.gasLimit != 0) - writer.writeInt32(9229217, this.gasLimit); - if (this.gasUsed != 0) - writer.writeInt32(190522826, this.gasUsed); - if (this.has_timestamp) - writer.writeMessage(55126294, this.timestamp, () => this.timestamp.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Web3BlockHeaderPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Web3BlockHeaderPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 497493176: - message.number = reader.readFloat(); - break; - case 3195150: - message.hash = reader.readString(); - break; - case 245049128: - message.parentHash = reader.readString(); - break; - case 105002991: - message.nonce = reader.readString(); - break; - case 373514458: - message.sha3Uncles = reader.readString(); - break; - case 399161966: - message.logsBloom = reader.readString(); - break; - case 189212898: - message.transactionRoot = reader.readString(); - break; - case 475330288: - message.stateRoot = reader.readString(); - break; - case 422939453: - message.receiptRoot = reader.readString(); - break; - case 103900799: - message.miner = reader.readString(); - break; - case 253792294: - message.extraData = reader.readString(); - break; - case 9229217: - message.gasLimit = reader.readInt32(); - break; - case 190522826: - message.gasUsed = reader.readInt32(); - break; - case 55126294: - reader.readMessage(message.timestamp, () => message.timestamp = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3BlockHeaderTimestampPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Web3BlockHeaderPB { - return Web3BlockHeaderPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_block_header_timestamp_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_block_header_timestamp_pb.ts deleted file mode 100644 index d6aed612f7..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_block_header_timestamp_pb.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/web3_block_header_timestamp_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class Web3BlockHeaderTimestampPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | {}) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { } - } - static fromObject(data: {}): Web3BlockHeaderTimestampPB { - const message = new Web3BlockHeaderTimestampPB({}); - return message; - } - toObject() { - const data: {} = {}; - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Web3BlockHeaderTimestampPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Web3BlockHeaderTimestampPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Web3BlockHeaderTimestampPB { - return Web3BlockHeaderTimestampPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_cactus_keychain_ref_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_cactus_keychain_ref_pb.ts deleted file mode 100644 index d1c115b2c8..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_cactus_keychain_ref_pb.ts +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/web3_signing_credential_cactus_keychain_ref_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./web3_signing_credential_type_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class Web3SigningCredentialCactusKeychainRefPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - type?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - ethAccount?: string; - keychainEntryKey?: string; - keychainId?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("type" in data && data.type != undefined) { - this.type = data.type; - } - if ("ethAccount" in data && data.ethAccount != undefined) { - this.ethAccount = data.ethAccount; - } - if ("keychainEntryKey" in data && data.keychainEntryKey != undefined) { - this.keychainEntryKey = data.keychainEntryKey; - } - if ("keychainId" in data && data.keychainId != undefined) { - this.keychainId = data.keychainId; - } - } - } - get type() { - return pb_1.Message.getFieldWithDefault(this, 3575610, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB.Web3SigningCredentialTypePB_CACTUS_KEYCHAIN_REF) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - } - set type(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB) { - pb_1.Message.setField(this, 3575610, value); - } - get ethAccount() { - return pb_1.Message.getFieldWithDefault(this, 528332204, "") as string; - } - set ethAccount(value: string) { - pb_1.Message.setField(this, 528332204, value); - } - get keychainEntryKey() { - return pb_1.Message.getFieldWithDefault(this, 210645395, "") as string; - } - set keychainEntryKey(value: string) { - pb_1.Message.setField(this, 210645395, value); - } - get keychainId() { - return pb_1.Message.getFieldWithDefault(this, 14058372, "") as string; - } - set keychainId(value: string) { - pb_1.Message.setField(this, 14058372, value); - } - static fromObject(data: { - type?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - ethAccount?: string; - keychainEntryKey?: string; - keychainId?: string; - }): Web3SigningCredentialCactusKeychainRefPB { - const message = new Web3SigningCredentialCactusKeychainRefPB({}); - if (data.type != null) { - message.type = data.type; - } - if (data.ethAccount != null) { - message.ethAccount = data.ethAccount; - } - if (data.keychainEntryKey != null) { - message.keychainEntryKey = data.keychainEntryKey; - } - if (data.keychainId != null) { - message.keychainId = data.keychainId; - } - return message; - } - toObject() { - const data: { - type?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - ethAccount?: string; - keychainEntryKey?: string; - keychainId?: string; - } = {}; - if (this.type != null) { - data.type = this.type; - } - if (this.ethAccount != null) { - data.ethAccount = this.ethAccount; - } - if (this.keychainEntryKey != null) { - data.keychainEntryKey = this.keychainEntryKey; - } - if (this.keychainId != null) { - data.keychainId = this.keychainId; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.type != dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB.Web3SigningCredentialTypePB_CACTUS_KEYCHAIN_REF) - writer.writeEnum(3575610, this.type); - if (this.ethAccount.length) - writer.writeString(528332204, this.ethAccount); - if (this.keychainEntryKey.length) - writer.writeString(210645395, this.keychainEntryKey); - if (this.keychainId.length) - writer.writeString(14058372, this.keychainId); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Web3SigningCredentialCactusKeychainRefPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Web3SigningCredentialCactusKeychainRefPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 3575610: - message.type = reader.readEnum(); - break; - case 528332204: - message.ethAccount = reader.readString(); - break; - case 210645395: - message.keychainEntryKey = reader.readString(); - break; - case 14058372: - message.keychainId = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Web3SigningCredentialCactusKeychainRefPB { - return Web3SigningCredentialCactusKeychainRefPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_none_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_none_pb.ts deleted file mode 100644 index e475a7ae99..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_none_pb.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/web3_signing_credential_none_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./web3_signing_credential_type_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class Web3SigningCredentialNonePB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - type?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("type" in data && data.type != undefined) { - this.type = data.type; - } - } - } - get type() { - return pb_1.Message.getFieldWithDefault(this, 3575610, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB.Web3SigningCredentialTypePB_CACTUS_KEYCHAIN_REF) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - } - set type(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB) { - pb_1.Message.setField(this, 3575610, value); - } - static fromObject(data: { - type?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - }): Web3SigningCredentialNonePB { - const message = new Web3SigningCredentialNonePB({}); - if (data.type != null) { - message.type = data.type; - } - return message; - } - toObject() { - const data: { - type?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - } = {}; - if (this.type != null) { - data.type = this.type; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.type != dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB.Web3SigningCredentialTypePB_CACTUS_KEYCHAIN_REF) - writer.writeEnum(3575610, this.type); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Web3SigningCredentialNonePB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Web3SigningCredentialNonePB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 3575610: - message.type = reader.readEnum(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Web3SigningCredentialNonePB { - return Web3SigningCredentialNonePB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_pb.ts deleted file mode 100644 index c67f531563..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_pb.ts +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/web3_signing_credential_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./web3_signing_credential_cactus_keychain_ref_pb"; -import * as dependency_3 from "./web3_signing_credential_none_pb"; -import * as dependency_4 from "./web3_signing_credential_private_key_hex_pb"; -import * as dependency_5 from "./web3_signing_credential_type_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class Web3SigningCredentialPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - type?: dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - ethAccount?: string; - keychainEntryKey?: string; - keychainId?: string; - secret?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("type" in data && data.type != undefined) { - this.type = data.type; - } - if ("ethAccount" in data && data.ethAccount != undefined) { - this.ethAccount = data.ethAccount; - } - if ("keychainEntryKey" in data && data.keychainEntryKey != undefined) { - this.keychainEntryKey = data.keychainEntryKey; - } - if ("keychainId" in data && data.keychainId != undefined) { - this.keychainId = data.keychainId; - } - if ("secret" in data && data.secret != undefined) { - this.secret = data.secret; - } - } - } - get type() { - return pb_1.Message.getFieldWithDefault(this, 3575610, dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB.Web3SigningCredentialTypePB_CACTUS_KEYCHAIN_REF) as dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - } - set type(value: dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB) { - pb_1.Message.setField(this, 3575610, value); - } - get ethAccount() { - return pb_1.Message.getFieldWithDefault(this, 528332204, "") as string; - } - set ethAccount(value: string) { - pb_1.Message.setField(this, 528332204, value); - } - get keychainEntryKey() { - return pb_1.Message.getFieldWithDefault(this, 210645395, "") as string; - } - set keychainEntryKey(value: string) { - pb_1.Message.setField(this, 210645395, value); - } - get keychainId() { - return pb_1.Message.getFieldWithDefault(this, 14058372, "") as string; - } - set keychainId(value: string) { - pb_1.Message.setField(this, 14058372, value); - } - get secret() { - return pb_1.Message.getFieldWithDefault(this, 369406289, "") as string; - } - set secret(value: string) { - pb_1.Message.setField(this, 369406289, value); - } - static fromObject(data: { - type?: dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - ethAccount?: string; - keychainEntryKey?: string; - keychainId?: string; - secret?: string; - }): Web3SigningCredentialPB { - const message = new Web3SigningCredentialPB({}); - if (data.type != null) { - message.type = data.type; - } - if (data.ethAccount != null) { - message.ethAccount = data.ethAccount; - } - if (data.keychainEntryKey != null) { - message.keychainEntryKey = data.keychainEntryKey; - } - if (data.keychainId != null) { - message.keychainId = data.keychainId; - } - if (data.secret != null) { - message.secret = data.secret; - } - return message; - } - toObject() { - const data: { - type?: dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - ethAccount?: string; - keychainEntryKey?: string; - keychainId?: string; - secret?: string; - } = {}; - if (this.type != null) { - data.type = this.type; - } - if (this.ethAccount != null) { - data.ethAccount = this.ethAccount; - } - if (this.keychainEntryKey != null) { - data.keychainEntryKey = this.keychainEntryKey; - } - if (this.keychainId != null) { - data.keychainId = this.keychainId; - } - if (this.secret != null) { - data.secret = this.secret; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.type != dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB.Web3SigningCredentialTypePB_CACTUS_KEYCHAIN_REF) - writer.writeEnum(3575610, this.type); - if (this.ethAccount.length) - writer.writeString(528332204, this.ethAccount); - if (this.keychainEntryKey.length) - writer.writeString(210645395, this.keychainEntryKey); - if (this.keychainId.length) - writer.writeString(14058372, this.keychainId); - if (this.secret.length) - writer.writeString(369406289, this.secret); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Web3SigningCredentialPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Web3SigningCredentialPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 3575610: - message.type = reader.readEnum(); - break; - case 528332204: - message.ethAccount = reader.readString(); - break; - case 210645395: - message.keychainEntryKey = reader.readString(); - break; - case 14058372: - message.keychainId = reader.readString(); - break; - case 369406289: - message.secret = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Web3SigningCredentialPB { - return Web3SigningCredentialPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_private_key_hex_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_private_key_hex_pb.ts deleted file mode 100644 index def9a1f71b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_private_key_hex_pb.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/web3_signing_credential_private_key_hex_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as dependency_2 from "./web3_signing_credential_type_pb"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class Web3SigningCredentialPrivateKeyHexPB extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - type?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - ethAccount?: string; - secret?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("type" in data && data.type != undefined) { - this.type = data.type; - } - if ("ethAccount" in data && data.ethAccount != undefined) { - this.ethAccount = data.ethAccount; - } - if ("secret" in data && data.secret != undefined) { - this.secret = data.secret; - } - } - } - get type() { - return pb_1.Message.getFieldWithDefault(this, 3575610, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB.Web3SigningCredentialTypePB_CACTUS_KEYCHAIN_REF) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - } - set type(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB) { - pb_1.Message.setField(this, 3575610, value); - } - get ethAccount() { - return pb_1.Message.getFieldWithDefault(this, 528332204, "") as string; - } - set ethAccount(value: string) { - pb_1.Message.setField(this, 528332204, value); - } - get secret() { - return pb_1.Message.getFieldWithDefault(this, 369406289, "") as string; - } - set secret(value: string) { - pb_1.Message.setField(this, 369406289, value); - } - static fromObject(data: { - type?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - ethAccount?: string; - secret?: string; - }): Web3SigningCredentialPrivateKeyHexPB { - const message = new Web3SigningCredentialPrivateKeyHexPB({}); - if (data.type != null) { - message.type = data.type; - } - if (data.ethAccount != null) { - message.ethAccount = data.ethAccount; - } - if (data.secret != null) { - message.secret = data.secret; - } - return message; - } - toObject() { - const data: { - type?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB; - ethAccount?: string; - secret?: string; - } = {}; - if (this.type != null) { - data.type = this.type; - } - if (this.ethAccount != null) { - data.ethAccount = this.ethAccount; - } - if (this.secret != null) { - data.secret = this.secret; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.type != dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.Web3SigningCredentialTypePB.Web3SigningCredentialTypePB_CACTUS_KEYCHAIN_REF) - writer.writeEnum(3575610, this.type); - if (this.ethAccount.length) - writer.writeString(528332204, this.ethAccount); - if (this.secret.length) - writer.writeString(369406289, this.secret); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Web3SigningCredentialPrivateKeyHexPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Web3SigningCredentialPrivateKeyHexPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 3575610: - message.type = reader.readEnum(); - break; - case 528332204: - message.ethAccount = reader.readString(); - break; - case 369406289: - message.secret = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Web3SigningCredentialPrivateKeyHexPB { - return Web3SigningCredentialPrivateKeyHexPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_type_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_type_pb.ts deleted file mode 100644 index ae4da26e1e..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_signing_credential_type_pb.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/web3_signing_credential_type_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export enum Web3SigningCredentialTypePB { - Web3SigningCredentialTypePB_CACTUS_KEYCHAIN_REF = 0, - Web3SigningCredentialTypePB_GETH_KEYCHAIN_PASSWORD = 1, - Web3SigningCredentialTypePB_PRIVATE_KEY_HEX = 2, - Web3SigningCredentialTypePB_NONE = 3 - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_transaction_receipt_pb.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_transaction_receipt_pb.ts deleted file mode 100644 index 5347618eb8..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/models/web3_transaction_receipt_pb.ts +++ /dev/null @@ -1,273 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: models/web3_transaction_receipt_pb.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/any"; -import * as pb_1 from "google-protobuf"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu { - export class Web3TransactionReceiptPB extends pb_1.Message { - #one_of_decls: number[][] = [[214641282]]; - constructor(data?: any[] | ({ - status?: boolean; - transactionHash?: string; - transactionIndex?: number; - blockHash?: string; - blockNumber?: number; - gasUsed?: number; - from?: string; - to?: string; - } & (({ - contractAddress?: string; - })))) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("status" in data && data.status != undefined) { - this.status = data.status; - } - if ("transactionHash" in data && data.transactionHash != undefined) { - this.transactionHash = data.transactionHash; - } - if ("transactionIndex" in data && data.transactionIndex != undefined) { - this.transactionIndex = data.transactionIndex; - } - if ("blockHash" in data && data.blockHash != undefined) { - this.blockHash = data.blockHash; - } - if ("blockNumber" in data && data.blockNumber != undefined) { - this.blockNumber = data.blockNumber; - } - if ("gasUsed" in data && data.gasUsed != undefined) { - this.gasUsed = data.gasUsed; - } - if ("contractAddress" in data && data.contractAddress != undefined) { - this.contractAddress = data.contractAddress; - } - if ("from" in data && data.from != undefined) { - this.from = data.from; - } - if ("to" in data && data.to != undefined) { - this.to = data.to; - } - } - } - get status() { - return pb_1.Message.getFieldWithDefault(this, 355610639, false) as boolean; - } - set status(value: boolean) { - pb_1.Message.setField(this, 355610639, value); - } - get transactionHash() { - return pb_1.Message.getFieldWithDefault(this, 188901646, "") as string; - } - set transactionHash(value: string) { - pb_1.Message.setField(this, 188901646, value); - } - get transactionIndex() { - return pb_1.Message.getFieldWithDefault(this, 488538260, 0) as number; - } - set transactionIndex(value: number) { - pb_1.Message.setField(this, 488538260, value); - } - get blockHash() { - return pb_1.Message.getFieldWithDefault(this, 335211324, "") as string; - } - set blockHash(value: string) { - pb_1.Message.setField(this, 335211324, value); - } - get blockNumber() { - return pb_1.Message.getFieldWithDefault(this, 205598263, 0) as number; - } - set blockNumber(value: number) { - pb_1.Message.setField(this, 205598263, value); - } - get gasUsed() { - return pb_1.Message.getFieldWithDefault(this, 190522826, 0) as number; - } - set gasUsed(value: number) { - pb_1.Message.setField(this, 190522826, value); - } - get contractAddress() { - return pb_1.Message.getFieldWithDefault(this, 214641282, "") as string; - } - set contractAddress(value: string) { - pb_1.Message.setOneofField(this, 214641282, this.#one_of_decls[0], value); - } - get has_contractAddress() { - return pb_1.Message.getField(this, 214641282) != null; - } - get from() { - return pb_1.Message.getFieldWithDefault(this, 3151786, "") as string; - } - set from(value: string) { - pb_1.Message.setField(this, 3151786, value); - } - get to() { - return pb_1.Message.getFieldWithDefault(this, 3707, "") as string; - } - set to(value: string) { - pb_1.Message.setField(this, 3707, value); - } - get _contractAddress() { - const cases: { - [index: number]: "none" | "contractAddress"; - } = { - 0: "none", - 214641282: "contractAddress" - }; - return cases[pb_1.Message.computeOneofCase(this, [214641282])]; - } - static fromObject(data: { - status?: boolean; - transactionHash?: string; - transactionIndex?: number; - blockHash?: string; - blockNumber?: number; - gasUsed?: number; - contractAddress?: string; - from?: string; - to?: string; - }): Web3TransactionReceiptPB { - const message = new Web3TransactionReceiptPB({}); - if (data.status != null) { - message.status = data.status; - } - if (data.transactionHash != null) { - message.transactionHash = data.transactionHash; - } - if (data.transactionIndex != null) { - message.transactionIndex = data.transactionIndex; - } - if (data.blockHash != null) { - message.blockHash = data.blockHash; - } - if (data.blockNumber != null) { - message.blockNumber = data.blockNumber; - } - if (data.gasUsed != null) { - message.gasUsed = data.gasUsed; - } - if (data.contractAddress != null) { - message.contractAddress = data.contractAddress; - } - if (data.from != null) { - message.from = data.from; - } - if (data.to != null) { - message.to = data.to; - } - return message; - } - toObject() { - const data: { - status?: boolean; - transactionHash?: string; - transactionIndex?: number; - blockHash?: string; - blockNumber?: number; - gasUsed?: number; - contractAddress?: string; - from?: string; - to?: string; - } = {}; - if (this.status != null) { - data.status = this.status; - } - if (this.transactionHash != null) { - data.transactionHash = this.transactionHash; - } - if (this.transactionIndex != null) { - data.transactionIndex = this.transactionIndex; - } - if (this.blockHash != null) { - data.blockHash = this.blockHash; - } - if (this.blockNumber != null) { - data.blockNumber = this.blockNumber; - } - if (this.gasUsed != null) { - data.gasUsed = this.gasUsed; - } - if (this.contractAddress != null) { - data.contractAddress = this.contractAddress; - } - if (this.from != null) { - data.from = this.from; - } - if (this.to != null) { - data.to = this.to; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.status != false) - writer.writeBool(355610639, this.status); - if (this.transactionHash.length) - writer.writeString(188901646, this.transactionHash); - if (this.transactionIndex != 0) - writer.writeFloat(488538260, this.transactionIndex); - if (this.blockHash.length) - writer.writeString(335211324, this.blockHash); - if (this.blockNumber != 0) - writer.writeFloat(205598263, this.blockNumber); - if (this.gasUsed != 0) - writer.writeFloat(190522826, this.gasUsed); - if (this.has_contractAddress) - writer.writeString(214641282, this.contractAddress); - if (this.from.length) - writer.writeString(3151786, this.from); - if (this.to.length) - writer.writeString(3707, this.to); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Web3TransactionReceiptPB { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Web3TransactionReceiptPB(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 355610639: - message.status = reader.readBool(); - break; - case 188901646: - message.transactionHash = reader.readString(); - break; - case 488538260: - message.transactionIndex = reader.readFloat(); - break; - case 335211324: - message.blockHash = reader.readString(); - break; - case 205598263: - message.blockNumber = reader.readFloat(); - break; - case 190522826: - message.gasUsed = reader.readFloat(); - break; - case 214641282: - message.contractAddress = reader.readString(); - break; - case 3151786: - message.from = reader.readString(); - break; - case 3707: - message.to = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): Web3TransactionReceiptPB { - return Web3TransactionReceiptPB.deserialize(bytes); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/services/besu-grpc-svc-streams.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/services/besu-grpc-svc-streams.ts deleted file mode 100644 index b9d22bab85..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/services/besu-grpc-svc-streams.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: services/besu-grpc-svc-streams.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../models/watch_blocks_v1_progress_pb"; -import * as dependency_2 from "./../models/watch_blocks_v1_request_pb"; -import * as grpc_1 from "@grpc/grpc-js"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu.services.besuservice { - interface GrpcUnaryServiceInterface { - (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - } - interface GrpcStreamServiceInterface { - (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; - (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; - } - interface GrpWritableServiceInterface { - (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - } - interface GrpcChunkServiceInterface { - (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; - (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; - } - interface GrpcPromiseServiceInterface { - (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; - (message: P, options?: grpc_1.CallOptions): Promise; - } - export abstract class UnimplementedBesuGrpcSvcStreamsService { - static definition = { - WatchBlocksV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.besuservice.BesuGrpcSvcStreams/WatchBlocksV1", - requestStream: true, - responseStream: true, - requestSerialize: (message: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1RequestPB) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1RequestPB.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_1.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1ProgressPB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_1.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1ProgressPB.deserialize(new Uint8Array(bytes)) - } - }; - [method: string]: grpc_1.UntypedHandleCall; - abstract WatchBlocksV1(call: grpc_1.ServerDuplexStream): void; - } - export class BesuGrpcSvcStreamsClient extends grpc_1.makeGenericClientConstructor(UnimplementedBesuGrpcSvcStreamsService.definition, "BesuGrpcSvcStreams", {}) { - constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { - super(address, credentials, options); - } - WatchBlocksV1: GrpcChunkServiceInterface = (metadata?: grpc_1.Metadata | grpc_1.CallOptions, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream => { - return super.WatchBlocksV1(metadata, options); - }; - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service.ts deleted file mode 100644 index d469d422aa..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service.ts +++ /dev/null @@ -1,1053 +0,0 @@ -/** - * Generated by the protoc-gen-ts. DO NOT EDIT! - * compiler version: 3.19.1 - * source: services/default_service.proto - * git: https://github.com/thesayyn/protoc-gen-ts */ -import * as dependency_1 from "./../google/protobuf/empty"; -import * as dependency_2 from "./../models/deploy_contract_solidity_bytecode_no_keychain_v1_request_pb"; -import * as dependency_3 from "./../models/deploy_contract_solidity_bytecode_v1_request_pb"; -import * as dependency_4 from "./../models/deploy_contract_solidity_bytecode_v1_response_pb"; -import * as dependency_5 from "./../models/get_balance_v1_request_pb"; -import * as dependency_6 from "./../models/get_balance_v1_response_pb"; -import * as dependency_7 from "./../models/get_besu_record_v1_request_pb"; -import * as dependency_8 from "./../models/get_besu_record_v1_response_pb"; -import * as dependency_9 from "./../models/get_block_v1_request_pb"; -import * as dependency_10 from "./../models/get_block_v1_response_pb"; -import * as dependency_11 from "./../models/get_past_logs_v1_request_pb"; -import * as dependency_12 from "./../models/get_past_logs_v1_response_pb"; -import * as dependency_13 from "./../models/get_transaction_v1_request_pb"; -import * as dependency_14 from "./../models/get_transaction_v1_response_pb"; -import * as dependency_15 from "./../models/invoke_contract_v1_request_pb"; -import * as dependency_16 from "./../models/invoke_contract_v1_response_pb"; -import * as dependency_17 from "./../models/run_transaction_request_pb"; -import * as dependency_18 from "./../models/run_transaction_response_pb"; -import * as dependency_19 from "./../models/sign_transaction_request_pb"; -import * as dependency_20 from "./../models/sign_transaction_response_pb"; -import * as pb_1 from "google-protobuf"; -import * as grpc_1 from "@grpc/grpc-js"; -export namespace org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice { - export class DeployContractSolBytecodeNoKeychainV1Request extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - deployContractSolidityBytecodeNoKeychainV1RequestPB?: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeNoKeychainV1RequestPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("deployContractSolidityBytecodeNoKeychainV1RequestPB" in data && data.deployContractSolidityBytecodeNoKeychainV1RequestPB != undefined) { - this.deployContractSolidityBytecodeNoKeychainV1RequestPB = data.deployContractSolidityBytecodeNoKeychainV1RequestPB; - } - } - } - get deployContractSolidityBytecodeNoKeychainV1RequestPB() { - return pb_1.Message.getWrapperField(this, dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeNoKeychainV1RequestPB, 1) as dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeNoKeychainV1RequestPB; - } - set deployContractSolidityBytecodeNoKeychainV1RequestPB(value: dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeNoKeychainV1RequestPB) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_deployContractSolidityBytecodeNoKeychainV1RequestPB() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - deployContractSolidityBytecodeNoKeychainV1RequestPB?: ReturnType; - }): DeployContractSolBytecodeNoKeychainV1Request { - const message = new DeployContractSolBytecodeNoKeychainV1Request({}); - if (data.deployContractSolidityBytecodeNoKeychainV1RequestPB != null) { - message.deployContractSolidityBytecodeNoKeychainV1RequestPB = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeNoKeychainV1RequestPB.fromObject(data.deployContractSolidityBytecodeNoKeychainV1RequestPB); - } - return message; - } - toObject() { - const data: { - deployContractSolidityBytecodeNoKeychainV1RequestPB?: ReturnType; - } = {}; - if (this.deployContractSolidityBytecodeNoKeychainV1RequestPB != null) { - data.deployContractSolidityBytecodeNoKeychainV1RequestPB = this.deployContractSolidityBytecodeNoKeychainV1RequestPB.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_deployContractSolidityBytecodeNoKeychainV1RequestPB) - writer.writeMessage(1, this.deployContractSolidityBytecodeNoKeychainV1RequestPB, () => this.deployContractSolidityBytecodeNoKeychainV1RequestPB.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeployContractSolBytecodeNoKeychainV1Request { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeployContractSolBytecodeNoKeychainV1Request(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.deployContractSolidityBytecodeNoKeychainV1RequestPB, () => message.deployContractSolidityBytecodeNoKeychainV1RequestPB = dependency_2.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeNoKeychainV1RequestPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): DeployContractSolBytecodeNoKeychainV1Request { - return DeployContractSolBytecodeNoKeychainV1Request.deserialize(bytes); - } - } - export class DeployContractSolBytecodeV1Request extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - deployContractSolidityBytecodeV1RequestPB?: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1RequestPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("deployContractSolidityBytecodeV1RequestPB" in data && data.deployContractSolidityBytecodeV1RequestPB != undefined) { - this.deployContractSolidityBytecodeV1RequestPB = data.deployContractSolidityBytecodeV1RequestPB; - } - } - } - get deployContractSolidityBytecodeV1RequestPB() { - return pb_1.Message.getWrapperField(this, dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1RequestPB, 1) as dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1RequestPB; - } - set deployContractSolidityBytecodeV1RequestPB(value: dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1RequestPB) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_deployContractSolidityBytecodeV1RequestPB() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - deployContractSolidityBytecodeV1RequestPB?: ReturnType; - }): DeployContractSolBytecodeV1Request { - const message = new DeployContractSolBytecodeV1Request({}); - if (data.deployContractSolidityBytecodeV1RequestPB != null) { - message.deployContractSolidityBytecodeV1RequestPB = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1RequestPB.fromObject(data.deployContractSolidityBytecodeV1RequestPB); - } - return message; - } - toObject() { - const data: { - deployContractSolidityBytecodeV1RequestPB?: ReturnType; - } = {}; - if (this.deployContractSolidityBytecodeV1RequestPB != null) { - data.deployContractSolidityBytecodeV1RequestPB = this.deployContractSolidityBytecodeV1RequestPB.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_deployContractSolidityBytecodeV1RequestPB) - writer.writeMessage(1, this.deployContractSolidityBytecodeV1RequestPB, () => this.deployContractSolidityBytecodeV1RequestPB.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeployContractSolBytecodeV1Request { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeployContractSolBytecodeV1Request(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.deployContractSolidityBytecodeV1RequestPB, () => message.deployContractSolidityBytecodeV1RequestPB = dependency_3.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1RequestPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): DeployContractSolBytecodeV1Request { - return DeployContractSolBytecodeV1Request.deserialize(bytes); - } - } - export class GetBalanceV1Request extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - getBalanceV1RequestPB?: dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBalanceV1RequestPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("getBalanceV1RequestPB" in data && data.getBalanceV1RequestPB != undefined) { - this.getBalanceV1RequestPB = data.getBalanceV1RequestPB; - } - } - } - get getBalanceV1RequestPB() { - return pb_1.Message.getWrapperField(this, dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBalanceV1RequestPB, 1) as dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBalanceV1RequestPB; - } - set getBalanceV1RequestPB(value: dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBalanceV1RequestPB) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_getBalanceV1RequestPB() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - getBalanceV1RequestPB?: ReturnType; - }): GetBalanceV1Request { - const message = new GetBalanceV1Request({}); - if (data.getBalanceV1RequestPB != null) { - message.getBalanceV1RequestPB = dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBalanceV1RequestPB.fromObject(data.getBalanceV1RequestPB); - } - return message; - } - toObject() { - const data: { - getBalanceV1RequestPB?: ReturnType; - } = {}; - if (this.getBalanceV1RequestPB != null) { - data.getBalanceV1RequestPB = this.getBalanceV1RequestPB.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_getBalanceV1RequestPB) - writer.writeMessage(1, this.getBalanceV1RequestPB, () => this.getBalanceV1RequestPB.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBalanceV1Request { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBalanceV1Request(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.getBalanceV1RequestPB, () => message.getBalanceV1RequestPB = dependency_5.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBalanceV1RequestPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetBalanceV1Request { - return GetBalanceV1Request.deserialize(bytes); - } - } - export class GetBesuRecordV1Request extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - getBesuRecordV1RequestPB?: dependency_7.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBesuRecordV1RequestPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("getBesuRecordV1RequestPB" in data && data.getBesuRecordV1RequestPB != undefined) { - this.getBesuRecordV1RequestPB = data.getBesuRecordV1RequestPB; - } - } - } - get getBesuRecordV1RequestPB() { - return pb_1.Message.getWrapperField(this, dependency_7.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBesuRecordV1RequestPB, 1) as dependency_7.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBesuRecordV1RequestPB; - } - set getBesuRecordV1RequestPB(value: dependency_7.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBesuRecordV1RequestPB) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_getBesuRecordV1RequestPB() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - getBesuRecordV1RequestPB?: ReturnType; - }): GetBesuRecordV1Request { - const message = new GetBesuRecordV1Request({}); - if (data.getBesuRecordV1RequestPB != null) { - message.getBesuRecordV1RequestPB = dependency_7.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBesuRecordV1RequestPB.fromObject(data.getBesuRecordV1RequestPB); - } - return message; - } - toObject() { - const data: { - getBesuRecordV1RequestPB?: ReturnType; - } = {}; - if (this.getBesuRecordV1RequestPB != null) { - data.getBesuRecordV1RequestPB = this.getBesuRecordV1RequestPB.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_getBesuRecordV1RequestPB) - writer.writeMessage(1, this.getBesuRecordV1RequestPB, () => this.getBesuRecordV1RequestPB.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBesuRecordV1Request { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBesuRecordV1Request(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.getBesuRecordV1RequestPB, () => message.getBesuRecordV1RequestPB = dependency_7.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBesuRecordV1RequestPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetBesuRecordV1Request { - return GetBesuRecordV1Request.deserialize(bytes); - } - } - export class GetBlockV1Request extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - getBlockV1RequestPB?: dependency_9.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1RequestPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("getBlockV1RequestPB" in data && data.getBlockV1RequestPB != undefined) { - this.getBlockV1RequestPB = data.getBlockV1RequestPB; - } - } - } - get getBlockV1RequestPB() { - return pb_1.Message.getWrapperField(this, dependency_9.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1RequestPB, 1) as dependency_9.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1RequestPB; - } - set getBlockV1RequestPB(value: dependency_9.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1RequestPB) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_getBlockV1RequestPB() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - getBlockV1RequestPB?: ReturnType; - }): GetBlockV1Request { - const message = new GetBlockV1Request({}); - if (data.getBlockV1RequestPB != null) { - message.getBlockV1RequestPB = dependency_9.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1RequestPB.fromObject(data.getBlockV1RequestPB); - } - return message; - } - toObject() { - const data: { - getBlockV1RequestPB?: ReturnType; - } = {}; - if (this.getBlockV1RequestPB != null) { - data.getBlockV1RequestPB = this.getBlockV1RequestPB.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_getBlockV1RequestPB) - writer.writeMessage(1, this.getBlockV1RequestPB, () => this.getBlockV1RequestPB.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBlockV1Request { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBlockV1Request(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.getBlockV1RequestPB, () => message.getBlockV1RequestPB = dependency_9.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1RequestPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetBlockV1Request { - return GetBlockV1Request.deserialize(bytes); - } - } - export class GetOpenApiSpecV1Response extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - data?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("data" in data && data.data != undefined) { - this.data = data.data; - } - } - } - get data() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set data(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - data?: string; - }): GetOpenApiSpecV1Response { - const message = new GetOpenApiSpecV1Response({}); - if (data.data != null) { - message.data = data.data; - } - return message; - } - toObject() { - const data: { - data?: string; - } = {}; - if (this.data != null) { - data.data = this.data; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.data.length) - writer.writeString(1, this.data); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetOpenApiSpecV1Response { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetOpenApiSpecV1Response(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.data = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetOpenApiSpecV1Response { - return GetOpenApiSpecV1Response.deserialize(bytes); - } - } - export class GetPastLogsV1Request extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - getPastLogsV1RequestPB?: dependency_11.org.hyperledger.cacti.plugin.ledger.connector.besu.GetPastLogsV1RequestPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("getPastLogsV1RequestPB" in data && data.getPastLogsV1RequestPB != undefined) { - this.getPastLogsV1RequestPB = data.getPastLogsV1RequestPB; - } - } - } - get getPastLogsV1RequestPB() { - return pb_1.Message.getWrapperField(this, dependency_11.org.hyperledger.cacti.plugin.ledger.connector.besu.GetPastLogsV1RequestPB, 1) as dependency_11.org.hyperledger.cacti.plugin.ledger.connector.besu.GetPastLogsV1RequestPB; - } - set getPastLogsV1RequestPB(value: dependency_11.org.hyperledger.cacti.plugin.ledger.connector.besu.GetPastLogsV1RequestPB) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_getPastLogsV1RequestPB() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - getPastLogsV1RequestPB?: ReturnType; - }): GetPastLogsV1Request { - const message = new GetPastLogsV1Request({}); - if (data.getPastLogsV1RequestPB != null) { - message.getPastLogsV1RequestPB = dependency_11.org.hyperledger.cacti.plugin.ledger.connector.besu.GetPastLogsV1RequestPB.fromObject(data.getPastLogsV1RequestPB); - } - return message; - } - toObject() { - const data: { - getPastLogsV1RequestPB?: ReturnType; - } = {}; - if (this.getPastLogsV1RequestPB != null) { - data.getPastLogsV1RequestPB = this.getPastLogsV1RequestPB.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_getPastLogsV1RequestPB) - writer.writeMessage(1, this.getPastLogsV1RequestPB, () => this.getPastLogsV1RequestPB.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetPastLogsV1Request { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetPastLogsV1Request(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.getPastLogsV1RequestPB, () => message.getPastLogsV1RequestPB = dependency_11.org.hyperledger.cacti.plugin.ledger.connector.besu.GetPastLogsV1RequestPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetPastLogsV1Request { - return GetPastLogsV1Request.deserialize(bytes); - } - } - export class GetPrometheusMetricsV1Response extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - data?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("data" in data && data.data != undefined) { - this.data = data.data; - } - } - } - get data() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set data(value: string) { - pb_1.Message.setField(this, 1, value); - } - static fromObject(data: { - data?: string; - }): GetPrometheusMetricsV1Response { - const message = new GetPrometheusMetricsV1Response({}); - if (data.data != null) { - message.data = data.data; - } - return message; - } - toObject() { - const data: { - data?: string; - } = {}; - if (this.data != null) { - data.data = this.data; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.data.length) - writer.writeString(1, this.data); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetPrometheusMetricsV1Response { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetPrometheusMetricsV1Response(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.data = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetPrometheusMetricsV1Response { - return GetPrometheusMetricsV1Response.deserialize(bytes); - } - } - export class GetTransactionV1Request extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - getTransactionV1RequestPB?: dependency_13.org.hyperledger.cacti.plugin.ledger.connector.besu.GetTransactionV1RequestPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("getTransactionV1RequestPB" in data && data.getTransactionV1RequestPB != undefined) { - this.getTransactionV1RequestPB = data.getTransactionV1RequestPB; - } - } - } - get getTransactionV1RequestPB() { - return pb_1.Message.getWrapperField(this, dependency_13.org.hyperledger.cacti.plugin.ledger.connector.besu.GetTransactionV1RequestPB, 1) as dependency_13.org.hyperledger.cacti.plugin.ledger.connector.besu.GetTransactionV1RequestPB; - } - set getTransactionV1RequestPB(value: dependency_13.org.hyperledger.cacti.plugin.ledger.connector.besu.GetTransactionV1RequestPB) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_getTransactionV1RequestPB() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - getTransactionV1RequestPB?: ReturnType; - }): GetTransactionV1Request { - const message = new GetTransactionV1Request({}); - if (data.getTransactionV1RequestPB != null) { - message.getTransactionV1RequestPB = dependency_13.org.hyperledger.cacti.plugin.ledger.connector.besu.GetTransactionV1RequestPB.fromObject(data.getTransactionV1RequestPB); - } - return message; - } - toObject() { - const data: { - getTransactionV1RequestPB?: ReturnType; - } = {}; - if (this.getTransactionV1RequestPB != null) { - data.getTransactionV1RequestPB = this.getTransactionV1RequestPB.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_getTransactionV1RequestPB) - writer.writeMessage(1, this.getTransactionV1RequestPB, () => this.getTransactionV1RequestPB.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetTransactionV1Request { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTransactionV1Request(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.getTransactionV1RequestPB, () => message.getTransactionV1RequestPB = dependency_13.org.hyperledger.cacti.plugin.ledger.connector.besu.GetTransactionV1RequestPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): GetTransactionV1Request { - return GetTransactionV1Request.deserialize(bytes); - } - } - export class InvokeContractV1Request extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - invokeContractV1RequestPB?: dependency_15.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("invokeContractV1RequestPB" in data && data.invokeContractV1RequestPB != undefined) { - this.invokeContractV1RequestPB = data.invokeContractV1RequestPB; - } - } - } - get invokeContractV1RequestPB() { - return pb_1.Message.getWrapperField(this, dependency_15.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB, 1) as dependency_15.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB; - } - set invokeContractV1RequestPB(value: dependency_15.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_invokeContractV1RequestPB() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - invokeContractV1RequestPB?: ReturnType; - }): InvokeContractV1Request { - const message = new InvokeContractV1Request({}); - if (data.invokeContractV1RequestPB != null) { - message.invokeContractV1RequestPB = dependency_15.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB.fromObject(data.invokeContractV1RequestPB); - } - return message; - } - toObject() { - const data: { - invokeContractV1RequestPB?: ReturnType; - } = {}; - if (this.invokeContractV1RequestPB != null) { - data.invokeContractV1RequestPB = this.invokeContractV1RequestPB.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_invokeContractV1RequestPB) - writer.writeMessage(1, this.invokeContractV1RequestPB, () => this.invokeContractV1RequestPB.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): InvokeContractV1Request { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InvokeContractV1Request(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.invokeContractV1RequestPB, () => message.invokeContractV1RequestPB = dependency_15.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1RequestPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): InvokeContractV1Request { - return InvokeContractV1Request.deserialize(bytes); - } - } - export class RunTransactionV1Request extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - runTransactionRequestPB?: dependency_17.org.hyperledger.cacti.plugin.ledger.connector.besu.RunTransactionRequestPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("runTransactionRequestPB" in data && data.runTransactionRequestPB != undefined) { - this.runTransactionRequestPB = data.runTransactionRequestPB; - } - } - } - get runTransactionRequestPB() { - return pb_1.Message.getWrapperField(this, dependency_17.org.hyperledger.cacti.plugin.ledger.connector.besu.RunTransactionRequestPB, 1) as dependency_17.org.hyperledger.cacti.plugin.ledger.connector.besu.RunTransactionRequestPB; - } - set runTransactionRequestPB(value: dependency_17.org.hyperledger.cacti.plugin.ledger.connector.besu.RunTransactionRequestPB) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_runTransactionRequestPB() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - runTransactionRequestPB?: ReturnType; - }): RunTransactionV1Request { - const message = new RunTransactionV1Request({}); - if (data.runTransactionRequestPB != null) { - message.runTransactionRequestPB = dependency_17.org.hyperledger.cacti.plugin.ledger.connector.besu.RunTransactionRequestPB.fromObject(data.runTransactionRequestPB); - } - return message; - } - toObject() { - const data: { - runTransactionRequestPB?: ReturnType; - } = {}; - if (this.runTransactionRequestPB != null) { - data.runTransactionRequestPB = this.runTransactionRequestPB.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_runTransactionRequestPB) - writer.writeMessage(1, this.runTransactionRequestPB, () => this.runTransactionRequestPB.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RunTransactionV1Request { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RunTransactionV1Request(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.runTransactionRequestPB, () => message.runTransactionRequestPB = dependency_17.org.hyperledger.cacti.plugin.ledger.connector.besu.RunTransactionRequestPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): RunTransactionV1Request { - return RunTransactionV1Request.deserialize(bytes); - } - } - export class SignTransactionV1Request extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - signTransactionRequestPB?: dependency_19.org.hyperledger.cacti.plugin.ledger.connector.besu.SignTransactionRequestPB; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("signTransactionRequestPB" in data && data.signTransactionRequestPB != undefined) { - this.signTransactionRequestPB = data.signTransactionRequestPB; - } - } - } - get signTransactionRequestPB() { - return pb_1.Message.getWrapperField(this, dependency_19.org.hyperledger.cacti.plugin.ledger.connector.besu.SignTransactionRequestPB, 1) as dependency_19.org.hyperledger.cacti.plugin.ledger.connector.besu.SignTransactionRequestPB; - } - set signTransactionRequestPB(value: dependency_19.org.hyperledger.cacti.plugin.ledger.connector.besu.SignTransactionRequestPB) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_signTransactionRequestPB() { - return pb_1.Message.getField(this, 1) != null; - } - static fromObject(data: { - signTransactionRequestPB?: ReturnType; - }): SignTransactionV1Request { - const message = new SignTransactionV1Request({}); - if (data.signTransactionRequestPB != null) { - message.signTransactionRequestPB = dependency_19.org.hyperledger.cacti.plugin.ledger.connector.besu.SignTransactionRequestPB.fromObject(data.signTransactionRequestPB); - } - return message; - } - toObject() { - const data: { - signTransactionRequestPB?: ReturnType; - } = {}; - if (this.signTransactionRequestPB != null) { - data.signTransactionRequestPB = this.signTransactionRequestPB.toObject(); - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_signTransactionRequestPB) - writer.writeMessage(1, this.signTransactionRequestPB, () => this.signTransactionRequestPB.serialize(writer)); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SignTransactionV1Request { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SignTransactionV1Request(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.signTransactionRequestPB, () => message.signTransactionRequestPB = dependency_19.org.hyperledger.cacti.plugin.ledger.connector.besu.SignTransactionRequestPB.deserialize(reader)); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): SignTransactionV1Request { - return SignTransactionV1Request.deserialize(bytes); - } - } - interface GrpcUnaryServiceInterface { - (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; - } - interface GrpcStreamServiceInterface { - (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; - (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; - } - interface GrpWritableServiceInterface { - (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; - } - interface GrpcChunkServiceInterface { - (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; - (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; - } - interface GrpcPromiseServiceInterface { - (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; - (message: P, options?: grpc_1.CallOptions): Promise; - } - export abstract class UnimplementedDefaultServiceService { - static definition = { - DeployContractSolBytecodeNoKeychainV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/DeployContractSolBytecodeNoKeychainV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: DeployContractSolBytecodeNoKeychainV1Request) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => DeployContractSolBytecodeNoKeychainV1Request.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1ResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1ResponsePB.deserialize(new Uint8Array(bytes)) - }, - DeployContractSolBytecodeV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/DeployContractSolBytecodeV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: DeployContractSolBytecodeV1Request) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => DeployContractSolBytecodeV1Request.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1ResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_4.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1ResponsePB.deserialize(new Uint8Array(bytes)) - }, - GetBalanceV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/GetBalanceV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: GetBalanceV1Request) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetBalanceV1Request.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_6.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBalanceV1ResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_6.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBalanceV1ResponsePB.deserialize(new Uint8Array(bytes)) - }, - GetBesuRecordV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/GetBesuRecordV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: GetBesuRecordV1Request) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetBesuRecordV1Request.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_8.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBesuRecordV1ResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_8.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBesuRecordV1ResponsePB.deserialize(new Uint8Array(bytes)) - }, - GetBlockV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/GetBlockV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: GetBlockV1Request) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetBlockV1Request.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_10.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1ResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_10.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1ResponsePB.deserialize(new Uint8Array(bytes)) - }, - GetOpenApiSpecV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/GetOpenApiSpecV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: dependency_1.google.protobuf.Empty) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => dependency_1.google.protobuf.Empty.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: GetOpenApiSpecV1Response) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => GetOpenApiSpecV1Response.deserialize(new Uint8Array(bytes)) - }, - GetPastLogsV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/GetPastLogsV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: GetPastLogsV1Request) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetPastLogsV1Request.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_12.org.hyperledger.cacti.plugin.ledger.connector.besu.GetPastLogsV1ResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_12.org.hyperledger.cacti.plugin.ledger.connector.besu.GetPastLogsV1ResponsePB.deserialize(new Uint8Array(bytes)) - }, - GetPrometheusMetricsV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/GetPrometheusMetricsV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: dependency_1.google.protobuf.Empty) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => dependency_1.google.protobuf.Empty.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: GetPrometheusMetricsV1Response) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => GetPrometheusMetricsV1Response.deserialize(new Uint8Array(bytes)) - }, - GetTransactionV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/GetTransactionV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: GetTransactionV1Request) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => GetTransactionV1Request.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_14.org.hyperledger.cacti.plugin.ledger.connector.besu.GetTransactionV1ResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_14.org.hyperledger.cacti.plugin.ledger.connector.besu.GetTransactionV1ResponsePB.deserialize(new Uint8Array(bytes)) - }, - InvokeContractV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/InvokeContractV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: InvokeContractV1Request) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => InvokeContractV1Request.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_16.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1ResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_16.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1ResponsePB.deserialize(new Uint8Array(bytes)) - }, - RunTransactionV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/RunTransactionV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: RunTransactionV1Request) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => RunTransactionV1Request.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_18.org.hyperledger.cacti.plugin.ledger.connector.besu.RunTransactionResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_18.org.hyperledger.cacti.plugin.ledger.connector.besu.RunTransactionResponsePB.deserialize(new Uint8Array(bytes)) - }, - SignTransactionV1: { - path: "/org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultService/SignTransactionV1", - requestStream: false, - responseStream: false, - requestSerialize: (message: SignTransactionV1Request) => Buffer.from(message.serialize()), - requestDeserialize: (bytes: Buffer) => SignTransactionV1Request.deserialize(new Uint8Array(bytes)), - responseSerialize: (message: dependency_20.org.hyperledger.cacti.plugin.ledger.connector.besu.SignTransactionResponsePB) => Buffer.from(message.serialize()), - responseDeserialize: (bytes: Buffer) => dependency_20.org.hyperledger.cacti.plugin.ledger.connector.besu.SignTransactionResponsePB.deserialize(new Uint8Array(bytes)) - } - }; - [method: string]: grpc_1.UntypedHandleCall; - abstract DeployContractSolBytecodeNoKeychainV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract DeployContractSolBytecodeV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract GetBalanceV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract GetBesuRecordV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract GetBlockV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract GetOpenApiSpecV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract GetPastLogsV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract GetPrometheusMetricsV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract GetTransactionV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract InvokeContractV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract RunTransactionV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - abstract SignTransactionV1(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; - } - export class DefaultServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedDefaultServiceService.definition, "DefaultService", {}) { - constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { - super(address, credentials, options); - } - DeployContractSolBytecodeNoKeychainV1: GrpcUnaryServiceInterface = (message: DeployContractSolBytecodeNoKeychainV1Request, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.DeployContractSolBytecodeNoKeychainV1(message, metadata, options, callback); - }; - DeployContractSolBytecodeV1: GrpcUnaryServiceInterface = (message: DeployContractSolBytecodeV1Request, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.DeployContractSolBytecodeV1(message, metadata, options, callback); - }; - GetBalanceV1: GrpcUnaryServiceInterface = (message: GetBalanceV1Request, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.GetBalanceV1(message, metadata, options, callback); - }; - GetBesuRecordV1: GrpcUnaryServiceInterface = (message: GetBesuRecordV1Request, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.GetBesuRecordV1(message, metadata, options, callback); - }; - GetBlockV1: GrpcUnaryServiceInterface = (message: GetBlockV1Request, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.GetBlockV1(message, metadata, options, callback); - }; - GetOpenApiSpecV1: GrpcUnaryServiceInterface = (message: dependency_1.google.protobuf.Empty, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.GetOpenApiSpecV1(message, metadata, options, callback); - }; - GetPastLogsV1: GrpcUnaryServiceInterface = (message: GetPastLogsV1Request, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.GetPastLogsV1(message, metadata, options, callback); - }; - GetPrometheusMetricsV1: GrpcUnaryServiceInterface = (message: dependency_1.google.protobuf.Empty, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.GetPrometheusMetricsV1(message, metadata, options, callback); - }; - GetTransactionV1: GrpcUnaryServiceInterface = (message: GetTransactionV1Request, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.GetTransactionV1(message, metadata, options, callback); - }; - InvokeContractV1: GrpcUnaryServiceInterface = (message: InvokeContractV1Request, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.InvokeContractV1(message, metadata, options, callback); - }; - RunTransactionV1: GrpcUnaryServiceInterface = (message: RunTransactionV1Request, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.RunTransactionV1(message, metadata, options, callback); - }; - SignTransactionV1: GrpcUnaryServiceInterface = (message: SignTransactionV1Request, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { - return super.SignTransactionV1(message, metadata, options, callback); - }; - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/besu-grpc-svc-open-api.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/besu-grpc-svc-open-api.ts deleted file mode 100644 index cad8510795..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/besu-grpc-svc-open-api.ts +++ /dev/null @@ -1,240 +0,0 @@ -import { ServerUnaryCall, sendUnaryData } from "@grpc/grpc-js"; -import { status } from "@grpc/grpc-js"; - -import { google } from "../generated/proto/protoc-gen-ts/google/protobuf/empty"; -import * as deploy_contract_solidity_bytecode_v1_response_pb from "../generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_v1_response_pb"; -import * as get_balance_v1_response_pb from "../generated/proto/protoc-gen-ts/models/get_balance_v1_response_pb"; -import * as get_besu_record_v1_response_pb from "../generated/proto/protoc-gen-ts/models/get_besu_record_v1_response_pb"; -import * as get_block_v1_response_pb from "../generated/proto/protoc-gen-ts/models/get_block_v1_response_pb"; -import * as get_past_logs_v1_response_pb from "../generated/proto/protoc-gen-ts/models/get_past_logs_v1_response_pb"; -import * as get_transaction_v1_response_pb from "../generated/proto/protoc-gen-ts/models/get_transaction_v1_response_pb"; -import * as invoke_contract_v1_response_pb from "../generated/proto/protoc-gen-ts/models/invoke_contract_v1_response_pb"; -import * as run_transaction_response_pb from "../generated/proto/protoc-gen-ts/models/run_transaction_response_pb"; -import * as sign_transaction_response_pb from "../generated/proto/protoc-gen-ts/models/sign_transaction_response_pb"; -import * as default_service from "../generated/proto/protoc-gen-ts/services/default_service"; -import { getBlockV1Grpc } from "../impl/get-block-v1/get-block-v1-grpc"; -import { - LogLevelDesc, - Logger, - LoggerProvider, - createRuntimeErrorWithCause, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import Web3 from "web3"; - -export interface IBesuGrpcSvcOpenApiOptions { - readonly logLevel?: LogLevelDesc; - readonly web3: Web3; -} - -export class BesuGrpcSvcOpenApi extends default_service.org.hyperledger.cacti - .plugin.ledger.connector.besu.services.defaultservice - .UnimplementedDefaultServiceService { - // No choice but to disable the linter here because we need to be able to - // declare fields on the implementation class but the parent class forces to - // only have methods implementations not fields. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [field: string]: any; - - public static readonly CLASS_NAME = "BesuGrpcSvcOpenApi"; - - public get className(): string { - return BesuGrpcSvcOpenApi.CLASS_NAME; - } - - private readonly log: Logger; - - private readonly web3: Web3; - - /** - * The log level that will be used throughout all the methods of this class. - */ - private readonly logLevel: LogLevelDesc; - constructor(public readonly opts: IBesuGrpcSvcOpenApiOptions) { - super(); - this.logLevel = opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level: this.logLevel, label }); - this.web3 = opts.web3; - this.log.debug(`Created instance of ${this.className} OK`); - } - - public DeployContractSolBytecodeV1( - call: ServerUnaryCall< - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DeployContractSolBytecodeV1Request, - deploy_contract_solidity_bytecode_v1_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1ResponsePB - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } - - public DeployContractSolBytecodeNoKeychainV1( - call: ServerUnaryCall< - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DeployContractSolBytecodeNoKeychainV1Request, - deploy_contract_solidity_bytecode_v1_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.DeployContractSolidityBytecodeV1ResponsePB - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } - - public GetBalanceV1( - call: ServerUnaryCall< - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.GetBalanceV1Request, - get_balance_v1_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBalanceV1ResponsePB - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } - - public GetBesuRecordV1( - call: ServerUnaryCall< - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.GetBesuRecordV1Request, - get_besu_record_v1_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBesuRecordV1ResponsePB - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } - - public GetBlockV1( - call: ServerUnaryCall< - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.GetBlockV1Request, - get_block_v1_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1ResponsePB - >, - callback: sendUnaryData, - ): void { - getBlockV1Grpc({ web3: this.web3, logLevel: this.logLevel }, call.request) - .then((res) => { - callback(null, res); - }) - .catch((cause: unknown) => { - const ex = createRuntimeErrorWithCause("getBlockGrpc() crashed", cause); - const exJson = safeStringifyException(ex); - this.log.debug("getBlockGrpc() crashed with %o", cause); - callback({ - message: "status.INTERNAL - getBlockGrpc() call crashed.", - code: status.INTERNAL, - stack: ex.stack, - name: ex.name, - details: exJson, - }); - }); - } - - public GetOpenApiSpecV1( - call: ServerUnaryCall< - google.protobuf.Empty, - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.GetOpenApiSpecV1Response - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } - - public GetPastLogsV1( - call: ServerUnaryCall< - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.GetPastLogsV1Request, - get_past_logs_v1_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.GetPastLogsV1ResponsePB - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } - - public GetPrometheusMetricsV1( - call: ServerUnaryCall< - google.protobuf.Empty, - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.GetPrometheusMetricsV1Response - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } - - public GetTransactionV1( - call: ServerUnaryCall< - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.GetTransactionV1Request, - get_transaction_v1_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.GetTransactionV1ResponsePB - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } - - public InvokeContractV1( - call: ServerUnaryCall< - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.InvokeContractV1Request, - invoke_contract_v1_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.InvokeContractV1ResponsePB - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } - - public RunTransactionV1( - call: ServerUnaryCall< - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.RunTransactionV1Request, - run_transaction_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.RunTransactionResponsePB - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } - - public SignTransactionV1( - call: ServerUnaryCall< - default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.SignTransactionV1Request, - sign_transaction_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.SignTransactionResponsePB - >, - callback: sendUnaryData, - ): void { - return callback({ - message: "Status.UNIMPLEMENTED", - code: status.UNIMPLEMENTED, - details: "Service endpoint not yet implemented.", - }); - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/besu-grpc-svc-streams.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/besu-grpc-svc-streams.ts deleted file mode 100644 index 1df238519d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/besu-grpc-svc-streams.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { ServerDuplexStream } from "@grpc/grpc-js"; -import Web3 from "web3"; -import { BlockHeader } from "web3-eth"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import * as watch_blocks_v1_progress_pb from "../generated/proto/protoc-gen-ts/models/watch_blocks_v1_progress_pb"; -import * as watch_blocks_v1_request_pb from "../generated/proto/protoc-gen-ts/models/watch_blocks_v1_request_pb"; -import * as besu_grpc_svc_streams from "../generated/proto/protoc-gen-ts/services/besu-grpc-svc-streams"; -import { watch_blocks_v1_pb } from "../public-api"; - -const WatchBlocksV1ProgressPB = - watch_blocks_v1_progress_pb.org.hyperledger.cacti.plugin.ledger.connector.besu - .WatchBlocksV1ProgressPB; - -export interface IBesuGrpcSvcStreamsOptions { - readonly logLevel?: LogLevelDesc; - readonly web3: Web3; -} - -export class BesuGrpcSvcStreams extends besu_grpc_svc_streams.org.hyperledger - .cacti.plugin.ledger.connector.besu.services.besuservice - .UnimplementedBesuGrpcSvcStreamsService { - // No choice but to disable the linter here because we need to be able to - // declare fields on the implementation class but the parent class forces to - // only have methods implementations not fields. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [field: string]: any; - - public static readonly CLASS_NAME = "BesuGrpcSvcStreams"; - - public get className(): string { - return BesuGrpcSvcStreams.CLASS_NAME; - } - - private readonly log: Logger; - - private readonly web3: Web3; - - /** - * The log level that will be used throughout all the methods of this class. - */ - private readonly logLevel: LogLevelDesc; - - constructor(public readonly opts: IBesuGrpcSvcStreamsOptions) { - super(); - this.logLevel = opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level: this.logLevel, label }); - this.web3 = opts.web3; - this.log.debug(`Created instance of ${this.className} OK`); - } - - WatchBlocksV1( - call: ServerDuplexStream< - watch_blocks_v1_request_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1RequestPB, - watch_blocks_v1_progress_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1ProgressPB - >, - ): void { - this.log.debug("WatchBlocksV1::MAIN_FN="); - - const EVENT = "newBlockHeaders" as const; - - const sub = this.web3.eth.subscribe(EVENT, (ex: Error, bh: BlockHeader) => { - this.log.debug("subscribe_newBlockHeaders::error=%o, bh=%o", ex, bh); - const chunk = new WatchBlocksV1ProgressPB(); - call.write(chunk); - }); - - const WatchBlocksV1PB = - watch_blocks_v1_pb.org.hyperledger.cacti.plugin.ledger.connector.besu - .WatchBlocksV1PB; - - type WatchBlocksV1RequestPB = - watch_blocks_v1_request_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1RequestPB; - - call.on("data", (chunk: WatchBlocksV1RequestPB) => { - this.log.debug("WatchBlocksV1::data=%o", chunk); - if (chunk.event === WatchBlocksV1PB.WatchBlocksV1PB_Unsubscribe) { - this.log.debug("WatchBlocksV1::data=WatchBlocksV1PB_Unsubscribe"); - call.end(); - } - }); - - call.once("close", () => { - this.log.debug("subscribe_newBlockHeaders::event=CLOSE"); - sub.unsubscribe(); - }); - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/common/grpc-credentials-factory.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/common/grpc-credentials-factory.ts deleted file mode 100644 index f587e18285..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/common/grpc-credentials-factory.ts +++ /dev/null @@ -1,91 +0,0 @@ -import * as grpc from "@grpc/grpc-js"; - -/** - * Re-exports the underlying `grpc.ServerCredentials.createInsecure()` call - * verbatim. - * Why though? This is necessary because the {grpc.Server} object does an `instanceof` - * validation on credential objects that are passed to it and this check comes back - * negative if you've constructed the credentials object with a different instance - * of the library, **even** if the versions of the library instances are the **same**. - * - * Therefore this is a workaround that allows callers to construct credentials - * objects with the same import of the `@grpc/grpc-js` library that the {ApiServer} - * of this package is using. - * - * @returns {grpc.ServerCredentials} - */ -export function createGrpcInsecureServerCredentials(): grpc.ServerCredentials { - return grpc.ServerCredentials.createInsecure(); -} - -/** - * Re-exports the underlying `grpc.ServerCredentials.createInsecure()` call - * verbatim. - * Why though? This is necessary because the {grpc.Server} object does an `instanceof` - * validation on credential objects that are passed to it and this check comes back - * negative if you've constructed the credentials object with a different instance - * of the library, **even** if the versions of the library instances are the **same**. - * - * Therefore this is a workaround that allows callers to construct credentials - * objects with the same import of the `@grpc/grpc-js` library that the {ApiServer} - * of this package is using. - * - * @returns {grpc.ServerCredentials} - */ -export function createGrpcSslServerCredentials( - rootCerts: Buffer | null, - keyCertPairs: grpc.KeyCertPair[], - checkClientCertificate?: boolean, -): grpc.ServerCredentials { - return grpc.ServerCredentials.createSsl( - rootCerts, - keyCertPairs, - checkClientCertificate, - ); -} - -/** - * Re-exports the underlying `grpc.ServerCredentials.createInsecure()` call - * verbatim. - * Why though? This is necessary because the {grpc.Server} object does an `instanceof` - * validation on credential objects that are passed to it and this check comes back - * negative if you've constructed the credentials object with a different instance - * of the library, **even** if the versions of the library instances are the **same**. - * - * Therefore this is a workaround that allows callers to construct credentials - * objects with the same import of the `@grpc/grpc-js` library that the {ApiServer} - * of this package is using. - * - * @returns {grpc.ChannelCredentials} - */ -export function createGrpcInsecureChannelCredentials(): grpc.ChannelCredentials { - return grpc.ChannelCredentials.createInsecure(); -} - -/** - * Re-exports the underlying `grpc.ServerCredentials.createInsecure()` call - * verbatim. - * Why though? This is necessary because the {grpc.Server} object does an `instanceof` - * validation on credential objects that are passed to it and this check comes back - * negative if you've constructed the credentials object with a different instance - * of the library, **even** if the versions of the library instances are the **same**. - * - * Therefore this is a workaround that allows callers to construct credentials - * objects with the same import of the `@grpc/grpc-js` library that the {ApiServer} - * of this package is using. - * - * @returns {grpc.ChannelCredentials} - */ -export function createGrpcSslChannelCredentials( - rootCerts?: Buffer | null, - privateKey?: Buffer | null, - certChain?: Buffer | null, - verifyOptions?: grpc.VerifyOptions, -): grpc.ChannelCredentials { - return grpc.ChannelCredentials.createSsl( - rootCerts, - privateKey, - certChain, - verifyOptions, - ); -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/common/grpc-server-factory.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/common/grpc-server-factory.ts deleted file mode 100644 index 288bd7ea85..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/grpc-services/common/grpc-server-factory.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as grpc from "@grpc/grpc-js"; - -/** - * Re-exports the underlying `new grpc.Server()` call verbatim. - * - * Why though? This is necessary because the {grpc.Server} object does an `instanceof` - * validation on credential objects that are passed to it and this check comes back - * negative if you've constructed the credentials object with a different instance - * of the library, **even** if the versions of the library instances are the **same**. - * - * Therefore this is a workaround that allows callers to construct credentials - * objects/servers with the same import of the `@grpc/grpc-js` library that the - * {ApiServer} of this package is using internally. - * - * @returns {grpc.Server} - */ -export function createGrpcServer( - options?: grpc.ServerOptions | undefined, -): grpc.Server { - return new grpc.Server(options); -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/deploy-contract-v1/deploy-contract-v1-keychain.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/deploy-contract-v1/deploy-contract-v1-keychain.ts deleted file mode 100644 index bcbdc8ff50..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/deploy-contract-v1/deploy-contract-v1-keychain.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - DeployContractSolidityBytecodeV1Request, - DeployContractSolidityBytecodeV1Response, - ReceiptType, - Web3SigningCredentialCactusKeychainRef, - Web3SigningCredentialPrivateKeyHex, -} from "../../generated/openapi/typescript-axios"; -import { isWeb3SigningCredentialNone } from "../../model-type-guards"; -import createHttpError from "http-errors"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PrometheusExporter } from "../../prometheus-exporter/prometheus-exporter"; -import Web3 from "web3"; -import { transactV1Impl } from "../transact-v1/transact-v1-impl"; -import Contract from "web3-eth-contract"; - -export interface IDeployContractV1KeychainResponse { - status: boolean; - contractAddress: string; - contractName: string; - contract?: Contract.Contract; - deployResponse: DeployContractSolidityBytecodeV1Response; -} - -export async function deployContractV1Keychain( - ctx: { - readonly pluginRegistry: PluginRegistry; - readonly prometheusExporter: PrometheusExporter; - readonly web3: Web3; - readonly logLevel: LogLevelDesc; - }, - req: DeployContractSolidityBytecodeV1Request, -): Promise { - const fnTag = `deployContractV1Keychain()`; - Checks.truthy(req, `${fnTag} req`); - - const log = LoggerProvider.getOrCreate({ - label: fnTag, - level: ctx.logLevel, - }); - - if (isWeb3SigningCredentialNone(req.web3SigningCredential)) { - throw createHttpError[400]( - `${fnTag} Cannot deploy contract with pre-signed TX`, - ); - } - const { keychainId, contractName } = req; - if (!keychainId || !req.contractName) { - const errorMessage = `${fnTag} Cannot deploy contract without keychainId and the contractName.`; - throw createHttpError[400](errorMessage); - } - - const keychainPlugin = ctx.pluginRegistry.findOneByKeychainId(keychainId); - - if (!keychainPlugin) { - const errorMessage = - `${fnTag} The plugin registry does not contain` + - ` a keychain plugin for ID:"${req.keychainId}"`; - throw createHttpError[400](errorMessage); - } - - if (!keychainPlugin.has(contractName)) { - const errorMessage = - `${fnTag} Cannot create an instance of the contract instance because` + - `the contractName in the request does not exist on the keychain`; - throw new createHttpError[400](errorMessage); - } - - const networkId = await ctx.web3.eth.net.getId(); - - const tmpContract = new ctx.web3.eth.Contract(req.contractAbi); - const deployment = tmpContract.deploy({ - data: req.bytecode, - arguments: req.constructorArgs, - }); - - const abi = deployment.encodeABI(); - const data = abi.startsWith("0x") ? abi : `0x${abi}`; - log.debug(`Deploying "${req.contractName}" with data %o`, data); - - const web3SigningCredential = req.web3SigningCredential as - | Web3SigningCredentialPrivateKeyHex - | Web3SigningCredentialCactusKeychainRef; - - const transactV1ImplCtx = { - prometheusExporter: ctx.prometheusExporter, - pluginRegistry: ctx.pluginRegistry, - logLevel: ctx.logLevel, - web3: ctx.web3, - }; - const transactV1ImplReq = { - transactionConfig: { - data, - from: web3SigningCredential.ethAccount, - gas: req.gas, - gasPrice: req.gasPrice, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: req.timeoutMs || 60000, - }, - web3SigningCredential, - privateTransactionConfig: req.privateTransactionConfig, - }; - const runTransactionResponse = await transactV1Impl( - transactV1ImplCtx, - transactV1ImplReq, - ); - - const keychainHasContract = await keychainPlugin.has(contractName); - - if (!keychainHasContract) { - const errorMessage = - `${fnTag} Cannot create an instance of the contract instance because` + - `the contractName in the request does not exist on the keychain`; - throw new createHttpError[400](errorMessage); - } - - log.debug(`Keychain has the contract, updating networks...`); - - const { transactionReceipt: receipt } = runTransactionResponse; - const { status, contractAddress } = receipt; - - if (status && contractAddress) { - const networkInfo = { address: contractAddress }; - const contractStr = await keychainPlugin.get(contractName); - const contractJSON = JSON.parse(contractStr); - log.debug("Contract JSON: \n%o", JSON.stringify(contractJSON)); - const contract = new ctx.web3.eth.Contract( - contractJSON.abi, - contractAddress, - ); - - const network = { [networkId]: networkInfo }; - contractJSON.networks = network; - - await keychainPlugin.set(contractName, JSON.stringify(contractJSON)); - const deployResponse: DeployContractSolidityBytecodeV1Response = { - transactionReceipt: runTransactionResponse.transactionReceipt, - }; - const deployContractV1KeychainResponse: IDeployContractV1KeychainResponse = - { - status: status, - contractAddress: contractAddress, - contractName: contractName, - contract: contract, - deployResponse: deployResponse, - }; - return deployContractV1KeychainResponse; - } else { - const deployResponse: DeployContractSolidityBytecodeV1Response = { - transactionReceipt: runTransactionResponse.transactionReceipt, - }; - const deployContractV1KeychainResponse: IDeployContractV1KeychainResponse = - { - status: status, - contractAddress: "", - contractName: contractName, - deployResponse: deployResponse, - }; - return deployContractV1KeychainResponse; - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/deploy-contract-v1/deploy-contract-v1-no-keychain.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/deploy-contract-v1/deploy-contract-v1-no-keychain.ts deleted file mode 100644 index 8fe1d3a2d0..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/deploy-contract-v1/deploy-contract-v1-no-keychain.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - DeployContractSolidityBytecodeNoKeychainV1Request, - DeployContractSolidityBytecodeV1Response, - ReceiptType, - Web3SigningCredentialCactusKeychainRef, - Web3SigningCredentialPrivateKeyHex, -} from "../../generated/openapi/typescript-axios"; -import { isWeb3SigningCredentialNone } from "../../model-type-guards"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PrometheusExporter } from "../../prometheus-exporter/prometheus-exporter"; -import Web3 from "web3"; -import { transactV1Impl } from "../transact-v1/transact-v1-impl"; - -export async function deployContractV1NoKeychain( - ctx: { - readonly pluginRegistry: PluginRegistry; - readonly prometheusExporter: PrometheusExporter; - readonly web3: Web3; - readonly logLevel: LogLevelDesc; - }, - req: DeployContractSolidityBytecodeNoKeychainV1Request, -): Promise { - const fnTag = `deployContractNoKeychain()`; - Checks.truthy(req, `${fnTag} req`); - - const log = LoggerProvider.getOrCreate({ - label: "deployContractV1NoKeychain()", - level: ctx.logLevel, - }); - - if (isWeb3SigningCredentialNone(req.web3SigningCredential)) { - throw new Error(`${fnTag} Cannot deploy contract with pre-signed TX`); - } - - const tmpContract = new ctx.web3.eth.Contract(req.contractAbi); - const deployment = tmpContract.deploy({ - data: req.bytecode, - arguments: req.constructorArgs, - }); - - const abi = deployment.encodeABI(); - const data = abi.startsWith("0x") ? abi : `0x${abi}`; - log.debug(`Deploying "${req.contractName}" with data %o`, data); - - const web3SigningCredential = req.web3SigningCredential as - | Web3SigningCredentialPrivateKeyHex - | Web3SigningCredentialCactusKeychainRef; - - const transactV1ImplCtx = { - prometheusExporter: ctx.prometheusExporter, - pluginRegistry: ctx.pluginRegistry, - logLevel: ctx.logLevel, - web3: ctx.web3, - }; - const transactV1ImplReq = { - transactionConfig: { - data, - from: web3SigningCredential.ethAccount, - gas: req.gas, - gasPrice: req.gasPrice, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: req.timeoutMs || 60000, - }, - web3SigningCredential, - privateTransactionConfig: req.privateTransactionConfig, - }; - const runTxResponse = await transactV1Impl( - transactV1ImplCtx, - transactV1ImplReq, - ); - - const { transactionReceipt: receipt } = runTxResponse; - const { status, contractAddress } = receipt; - - Checks.truthy(status, `deployContractNoKeychain():status`); - - Checks.truthy(contractAddress, `deployContractNoKeychain():contractAddress`); - - const res: DeployContractSolidityBytecodeV1Response = { - transactionReceipt: runTxResponse.transactionReceipt, - }; - return res; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/get-block-v1/get-block-v1-grpc.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/get-block-v1/get-block-v1-grpc.ts deleted file mode 100644 index 26b0fe052f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/get-block-v1/get-block-v1-grpc.ts +++ /dev/null @@ -1,46 +0,0 @@ -import Web3 from "web3"; - -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; - -import * as get_block_v1_response_pb from "../../generated/proto/protoc-gen-ts/models/get_block_v1_response_pb"; -import * as default_service from "../../generated/proto/protoc-gen-ts/services/default_service"; -import { evm_block_pb, EvmBlock } from "../../public-api"; -import { getBlockV1Impl, isBlockNumber } from "./get-block-v1-impl"; - -export async function getBlockV1Grpc( - ctx: { readonly web3: Web3; readonly logLevel: LogLevelDesc }, - req: default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.GetBlockV1Request, -): Promise { - const log = LoggerProvider.getOrCreate({ - label: "getBlockGrpc()", - level: ctx.logLevel, - }); - log.debug( - "req.getBlockV1RequestPB.blockHashOrBlockNumber=%o", - req.getBlockV1RequestPB.blockHashOrBlockNumber, - ); - const blockHashOrBlockNumber = Buffer.from( - req.getBlockV1RequestPB.blockHashOrBlockNumber.value, - ).toString("utf-8"); - - log.debug("blockHashOrBlockNumber=%s", blockHashOrBlockNumber); - - if (!isBlockNumber(blockHashOrBlockNumber)) { - throw new Error("Input was not a block number: " + blockHashOrBlockNumber); - } - - const block = await getBlockV1Impl(ctx, blockHashOrBlockNumber); - log.debug("getBlockV1Impl() => block=%o", block); - - const getBlockV1ResponsePb = - new get_block_v1_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1ResponsePB(); - - const evmBlockPb = - evm_block_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.EvmBlockPB.fromObject( - block as EvmBlock, - ); - - getBlockV1ResponsePb.block = evmBlockPb; - - return getBlockV1ResponsePb; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/get-block-v1/get-block-v1-http.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/get-block-v1/get-block-v1-http.ts deleted file mode 100644 index 8a5a1a49df..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/get-block-v1/get-block-v1-http.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Web3 from "web3"; -import { - GetBlockV1Request, - GetBlockV1Response, -} from "../../generated/openapi/typescript-axios/api"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { getBlockV1Impl } from "./get-block-v1-impl"; - -export async function getBlockV1Http( - ctx: { readonly logLevel: LogLevelDesc; readonly web3: Web3 }, - request: GetBlockV1Request, -): Promise { - const block = await getBlockV1Impl(ctx, request.blockHashOrBlockNumber); - return { block }; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/get-block-v1/get-block-v1-impl.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/get-block-v1/get-block-v1-impl.ts deleted file mode 100644 index 570ae160b9..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/get-block-v1/get-block-v1-impl.ts +++ /dev/null @@ -1,39 +0,0 @@ -import Web3 from "web3"; -import { BlockNumber } from "web3-core"; - -import { - LoggerProvider, - LogLevelDesc, - Strings, -} from "@hyperledger/cactus-common"; - -import { EvmBlock } from "../../public-api"; - -export async function getBlockV1Impl( - ctx: { readonly web3: Web3; readonly logLevel: LogLevelDesc }, - blockHashOrBlockNumber: BlockNumber, -): Promise { - const log = LoggerProvider.getOrCreate({ - label: "getBlockV1Impl()", - level: ctx.logLevel, - }); - log.debug("blockHashOrBlockNumber=%s", blockHashOrBlockNumber); - - if (!isBlockNumber(blockHashOrBlockNumber)) { - throw new Error("Input was not a block number: " + blockHashOrBlockNumber); - } - - const block = await ctx.web3.eth.getBlock(blockHashOrBlockNumber, true); - log.debug("block=%o", block); - - return block; -} - -//string | number | BN | BigNumber | 'latest' | 'pending' | 'earliest' | 'genesis' -export function isBlockNumber(x: unknown): x is BlockNumber { - return ( - Strings.isString(x) || - (typeof x === "number" && isFinite(x)) || - typeof x === "bigint" - ); -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-cactus-keychain-ref.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-cactus-keychain-ref.ts deleted file mode 100644 index 4bf76d8023..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-cactus-keychain-ref.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - ReceiptType, - RunTransactionRequest, - RunTransactionResponse, - Web3SigningCredentialCactusKeychainRef, - Web3SigningCredentialType, -} from "../../generated/openapi/typescript-axios"; -import { Checks, LogLevelDesc } from "@hyperledger/cactus-common"; -import Web3 from "web3"; -import { transactV1PrivateKey } from "./transact-v1-private-key"; -import { PrometheusExporter } from "../../prometheus-exporter/prometheus-exporter"; - -export async function transactV1CactusKeychainRef( - ctx: { - readonly pluginRegistry: PluginRegistry; - readonly prometheusExporter: PrometheusExporter; - readonly web3: Web3; - readonly logLevel: LogLevelDesc; - }, - req: RunTransactionRequest, -): Promise { - const fnTag = `transactCactusKeychainRef()`; - const { transactionConfig, web3SigningCredential, privateTransactionConfig } = - req; - const { ethAccount, keychainEntryKey, keychainId } = - web3SigningCredential as Web3SigningCredentialCactusKeychainRef; - - // locate the keychain plugin that has access to the keychain backend - // denoted by the keychainID from the request. - const keychainPlugin = ctx.pluginRegistry.findOneByKeychainId(keychainId); - - Checks.truthy(keychainPlugin, `${fnTag} keychain for ID:"${keychainId}"`); - - // Now use the found keychain plugin to actually perform the lookup of - // the private key that we need to run the transaction. - const privateKeyHex = await keychainPlugin?.get(keychainEntryKey); - - return transactV1PrivateKey(ctx, { - privateTransactionConfig, - transactionConfig, - web3SigningCredential: { - ethAccount, - type: Web3SigningCredentialType.PrivateKeyHex, - secret: privateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-impl.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-impl.ts deleted file mode 100644 index 908bc562a8..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-impl.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - RunTransactionRequest, - RunTransactionResponse, - Web3SigningCredentialType, -} from "../../generated/openapi/typescript-axios"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { transactV1CactusKeychainRef } from "./transact-v1-cactus-keychain-ref"; -import Web3 from "web3"; -import { transactV1PrivateKey } from "./transact-v1-private-key"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { transactV1Signed } from "./transact-v1-signed"; -import { PrometheusExporter } from "../../prometheus-exporter/prometheus-exporter"; - -export async function transactV1Impl( - ctx: { - readonly pluginRegistry: PluginRegistry; - readonly prometheusExporter: PrometheusExporter; - readonly web3: Web3; - readonly logLevel: LogLevelDesc; - }, - req: RunTransactionRequest, -): Promise { - const fnTag = `transact()`; - - switch (req.web3SigningCredential.type) { - // Web3SigningCredentialType.GETHKEYCHAINPASSWORD is removed as Hyperledger Besu doesn't support the PERSONAL api - // for --rpc-http-api as per the discussion mentioned here - // https://chat.hyperledger.org/channel/besu-contributors?msg=GqQXfW3k79ygRtx5Q - case Web3SigningCredentialType.CactusKeychainRef: { - return transactV1CactusKeychainRef(ctx, req); - } - case Web3SigningCredentialType.PrivateKeyHex: { - return transactV1PrivateKey(ctx, req); - } - case Web3SigningCredentialType.None: { - if (req.transactionConfig.rawTransaction) { - return transactV1Signed(ctx, req); - } else { - throw new Error( - `${fnTag} Expected pre-signed raw transaction ` + - ` since signing credential is specified as` + - `Web3SigningCredentialType.NONE`, - ); - } - } - default: { - throw new Error( - `${fnTag} Unrecognized Web3SigningCredentialType: ` + - `${req.web3SigningCredential.type} Supported ones are: ` + - `${Object.values(Web3SigningCredentialType).join(";")}`, - ); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-private-key.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-private-key.ts deleted file mode 100644 index 66fcf2f73a..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-private-key.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - RunTransactionRequest, - RunTransactionResponse, - Web3SigningCredentialPrivateKeyHex, - Web3TransactionReceipt, -} from "../../generated/openapi/typescript-axios"; -import Web3 from "web3"; -import { transactV1Signed } from "./transact-v1-signed"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import Web3JsQuorum from "web3js-quorum"; -import { RuntimeError } from "run-time-error-cjs"; -import { PrometheusExporter } from "../../prometheus-exporter/prometheus-exporter"; - -export async function transactV1PrivateKey( - ctx: { - readonly pluginRegistry: PluginRegistry; - readonly prometheusExporter: PrometheusExporter; - readonly web3: Web3; - readonly logLevel: LogLevelDesc; - }, - req: RunTransactionRequest, -): Promise { - const fnTag = `transactPrivateKey()`; - const { transactionConfig, web3SigningCredential } = req; - const { secret } = - web3SigningCredential as Web3SigningCredentialPrivateKeyHex; - - // Run transaction to EEA client here if private transaction - - if (req.privateTransactionConfig) { - const options = { - nonce: transactionConfig.nonce, - gasPrice: transactionConfig.gasPrice, - gasLimit: transactionConfig.gas, - to: transactionConfig.to, - value: transactionConfig.value, - data: transactionConfig.data, - privateKey: secret, - privateFrom: req.privateTransactionConfig.privateFrom, - privateFor: req.privateTransactionConfig.privateFor, - restriction: "restricted", - }; - - return transactPrivate(ctx, options); - } - - const signedTx = await ctx.web3.eth.accounts.signTransaction( - transactionConfig, - secret, - ); - - if (signedTx.rawTransaction) { - req.transactionConfig.rawTransaction = signedTx.rawTransaction; - return transactV1Signed(ctx, req); - } else { - throw new Error( - `${fnTag} Failed to sign eth transaction. ` + - `signedTransaction.rawTransaction is blank after .signTransaction().`, - ); - } -} - -export async function transactPrivate( - ctx: { readonly web3: Web3 }, - options: any, -): Promise { - const fnTag = `transactPrivate()`; - - const web3Quorum = Web3JsQuorum(ctx.web3); - if (!web3Quorum) { - throw new Error(`${fnTag} Web3 EEA client not initialized.`); - } - - const txHash = await web3Quorum.priv.generateAndSendRawTransaction(options); - - if (!txHash) { - throw new Error(`${fnTag} eea.sendRawTransaction provided no tx hash.`); - } - return getPrivateTxReceipt(ctx, options.privateFrom, txHash); -} - -export async function getPrivateTxReceipt( - ctx: { readonly web3: Web3 }, - privateFrom: string, - txHash: string, -): Promise { - const fnTag = `getPrivateTxReceipt()`; - - const web3Quorum = Web3JsQuorum(ctx.web3); - if (!web3Quorum) { - throw new Error(`${fnTag} Web3 Quorum client not initialized.`); - } - - const txPoolReceipt = await web3Quorum.priv.waitForTransactionReceipt(txHash); - if (!txPoolReceipt) { - throw new RuntimeError(`priv.getTransactionReceipt provided no receipt.`); - } - - return { - transactionReceipt: txPoolReceipt as unknown as Web3TransactionReceipt, - }; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-signed.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-signed.ts deleted file mode 100644 index a22daca130..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/impl/transact-v1/transact-v1-signed.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - ConsistencyStrategy, - ReceiptType, - RunTransactionRequest, - RunTransactionResponse, -} from "../../generated/openapi/typescript-axios"; -import Web3 from "web3"; -import type { TransactionReceipt } from "web3-eth"; -import { PrometheusExporter } from "../../prometheus-exporter/prometheus-exporter"; -import { setTimeout } from "timers/promises"; - -export async function transactV1Signed( - ctx: { - readonly web3: Web3; - readonly prometheusExporter: PrometheusExporter; - readonly logLevel: LogLevelDesc; - }, - req: RunTransactionRequest, -): Promise { - const fnTag = `transactSigned()`; - Checks.truthy(req.consistencyStrategy, `${fnTag}:req.consistencyStrategy`); - Checks.truthy( - req.transactionConfig.rawTransaction, - `${fnTag}:req.transactionConfig.rawTransaction`, - ); - const log = LoggerProvider.getOrCreate({ - label: "transactV1Signed()", - level: ctx.logLevel, - }); - const rawTx = req.transactionConfig.rawTransaction as string; - - log.debug("Starting web3.eth.sendSignedTransaction(rawTransaction) "); - - const txPoolReceipt = await ctx.web3.eth.sendSignedTransaction(rawTx); - - return getTxReceipt(ctx, req, txPoolReceipt); -} - -export async function getTxReceipt( - ctx: { - readonly web3: Web3; - readonly prometheusExporter: PrometheusExporter; - readonly logLevel: LogLevelDesc; - }, - request: RunTransactionRequest, - txPoolReceipt: TransactionReceipt, -): Promise { - const fnTag = `getTxReceipt()`; - - const log = LoggerProvider.getOrCreate({ - label: "getTxReceipt", - level: ctx.logLevel, - }); - log.debug("Received preliminary receipt from Besu node."); - - if (txPoolReceipt instanceof Error) { - log.debug(`${fnTag} sendSignedTransaction failed`, txPoolReceipt); - throw txPoolReceipt; - } - ctx.prometheusExporter.addCurrentTransaction(); - - if ( - request.consistencyStrategy.receiptType === ReceiptType.NodeTxPoolAck && - request.consistencyStrategy.blockConfirmations > 0 - ) { - throw new Error( - `${fnTag} Conflicting parameters for consistency` + - ` strategy: Cannot wait for >0 block confirmations AND only wait ` + - ` for the tx pool ACK at the same time.`, - ); - } - - switch (request.consistencyStrategy.receiptType) { - case ReceiptType.NodeTxPoolAck: - return { transactionReceipt: txPoolReceipt }; - case ReceiptType.LedgerBlockAck: - log.debug("Starting poll for ledger TX receipt ..."); - const txHash = txPoolReceipt.transactionHash; - const { consistencyStrategy } = request; - const ledgerReceipt = await pollForTxReceipt( - ctx, - txHash, - consistencyStrategy, - ); - log.debug("Finished poll for ledger TX receipt: %o", ledgerReceipt); - return { transactionReceipt: ledgerReceipt }; - default: - throw new Error( - `${fnTag} Unrecognized ReceiptType: ${request.consistencyStrategy.receiptType}`, - ); - } -} - -export async function pollForTxReceipt( - ctx: { readonly web3: Web3; readonly logLevel: LogLevelDesc }, - txHash: string, - consistencyStrategy: ConsistencyStrategy, -): Promise { - const fnTag = `pollForTxReceipt()`; - const log = LoggerProvider.getOrCreate({ - label: "pollForTxReceipt()", - level: ctx.logLevel, - }); - let txReceipt; - let timedOut = false; - let tries = 0; - let confirmationCount = 0; - const timeoutMs = consistencyStrategy.timeoutMs || Number.MAX_SAFE_INTEGER; - const startedAt = new Date(); - - do { - const now = Date.now(); - const elapsedTime = now - startedAt.getTime(); - timedOut = now >= startedAt.getTime() + timeoutMs; - log.debug("%s tries=%n elapsedMs=%n", fnTag, tries, elapsedTime); - if (tries > 0) { - await setTimeout(1000); - } - tries++; - if (timedOut) { - break; - } - - txReceipt = await ctx.web3.eth.getTransactionReceipt(txHash); - if (!txReceipt) { - continue; - } - - const latestBlockNo = await ctx.web3.eth.getBlockNumber(); - confirmationCount = latestBlockNo - txReceipt.blockNumber; - } while (confirmationCount >= consistencyStrategy.blockConfirmations); - - if (!txReceipt) { - throw new Error(`${fnTag} Timed out ${timeoutMs}ms, polls=${tries}`); - } - return txReceipt; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/index.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/index.web.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/index.web.ts deleted file mode 100755 index aff65e4ec2..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/index.web.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { - BesuApiClient, - BesuApiClientOptions, -} from "./api-client/besu-api-client"; - -export * from "./generated/openapi/typescript-axios/api"; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/model-type-guards.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/model-type-guards.ts deleted file mode 100644 index 53c0ed829b..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/model-type-guards.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { - Web3SigningCredentialNone, - Web3SigningCredentialPrivateKeyHex, - Web3SigningCredentialType, -} from "./generated/openapi/typescript-axios/api"; - -export function isWeb3SigningCredentialPrivateKeyHex(x?: { - type?: Web3SigningCredentialType; -}): x is Web3SigningCredentialPrivateKeyHex { - return x?.type === Web3SigningCredentialType.PrivateKeyHex; -} - -export function isWeb3SigningCredentialNone(x?: { - type?: Web3SigningCredentialType; -}): x is Web3SigningCredentialNone { - return x?.type === Web3SigningCredentialType.None; -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-factory-ledger-connector.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-factory-ledger-connector.ts deleted file mode 100644 index 0d573f9a50..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, -} from "./plugin-ledger-connector-besu"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorBesu, - IPluginLedgerConnectorBesuOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorBesuOptions, - ): Promise { - return new PluginLedgerConnectorBesu(pluginOptions); - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts deleted file mode 100644 index 36aca2bcae..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts +++ /dev/null @@ -1,807 +0,0 @@ -import type { Server as SocketIoServer } from "socket.io"; -import type { Socket as SocketIoSocket } from "socket.io"; -import type { Express } from "express"; -import { Optional } from "typescript-optional"; - -import OAS from "../json/openapi.json"; - -import Web3 from "web3"; - -import type { WebsocketProvider } from "web3-core"; -import Web3JsQuorum, { IWeb3Quorum } from "web3js-quorum"; - -import { Contract, ContractSendMethod } from "web3-eth-contract"; -import { - GetBalanceV1Request, - GetBalanceV1Response, - DeployContractSolidityBytecodeNoKeychainV1Request, -} from "./generated/openapi/typescript-axios/index"; - -import { - GetPastLogsV1Request, - GetPastLogsV1Response, -} from "./generated/openapi/typescript-axios/index"; -import { - ConsensusAlgorithmFamily, - IPluginLedgerConnector, - IWebServiceEndpoint, - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, - IPluginGrpcService, - IGrpcSvcDefAndImplPair, -} from "@hyperledger/cactus-core-api"; - -import { - PluginRegistry, - consensusHasTransactionFinality, -} from "@hyperledger/cactus-core"; - -import { - Checks, - CodedError, - IJsObjectSignerOptions, - JsObjectSigner, - KeyConverter, - KeyFormat, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { DeployContractSolidityBytecodeEndpoint } from "./web-services/deploy-contract-solidity-bytecode-endpoint"; -import { DeployContractSolidityBytecodeNoKeychainEndpoint } from "./web-services/deploy-contract-solidity-bytecode-no-keychain-endpoint"; - -import { - WatchBlocksV1, - DeployContractSolidityBytecodeV1Request, - DeployContractSolidityBytecodeV1Response, - EthContractInvocationType, - InvokeContractV1Request, - InvokeContractV1Response, - ReceiptType, - RunTransactionRequest, - RunTransactionResponse, - SignTransactionRequest, - SignTransactionResponse, - Web3SigningCredentialCactusKeychainRef, - Web3SigningCredentialPrivateKeyHex, - Web3SigningCredentialType, - GetTransactionV1Request, - GetTransactionV1Response, - GetBlockV1Request, - GetBlockV1Response, - GetBesuRecordV1Request, - GetBesuRecordV1Response, -} from "./generated/openapi/typescript-axios"; - -import { InvokeContractEndpoint } from "./web-services/invoke-contract-endpoint"; -import { isWeb3SigningCredentialNone } from "./model-type-guards"; -import { BesuSignTransactionEndpointV1 } from "./web-services/sign-transaction-endpoint-v1"; -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; -import { - GetPrometheusExporterMetricsEndpointV1, - IGetPrometheusExporterMetricsEndpointV1Options, -} from "./web-services/get-prometheus-exporter-metrics-endpoint-v1"; -import { WatchBlocksV1Endpoint } from "./web-services/watch-blocks-v1-endpoint"; -import { RuntimeError } from "run-time-error-cjs"; -import { GetBalanceEndpoint } from "./web-services/get-balance-endpoint"; -import { GetTransactionEndpoint } from "./web-services/get-transaction-endpoint"; -import { GetPastLogsEndpoint } from "./web-services/get-past-logs-endpoint"; -import { RunTransactionEndpoint } from "./web-services/run-transaction-endpoint"; -import { GetBlockEndpoint } from "./web-services/get-block-v1-endpoint-"; -import { GetBesuRecordEndpointV1 } from "./web-services/get-besu-record-endpoint-v1"; -import { AbiItem } from "web3-utils"; -import { - GetOpenApiSpecV1Endpoint, - IGetOpenApiSpecV1EndpointOptions, -} from "./web-services/get-open-api-spec-v1-endpoint"; -import * as grpc_default_service from "./generated/proto/protoc-gen-ts/services/default_service"; -import * as besu_grpc_svc_streams from "./generated/proto/protoc-gen-ts/services/besu-grpc-svc-streams"; -import { BesuGrpcSvcOpenApi } from "./grpc-services/besu-grpc-svc-open-api"; -import { BesuGrpcSvcStreams } from "./grpc-services/besu-grpc-svc-streams"; -import { getBlockV1Http } from "./impl/get-block-v1/get-block-v1-http"; -import { transactV1Impl } from "./impl/transact-v1/transact-v1-impl"; -import { deployContractV1Keychain } from "./impl/deploy-contract-v1/deploy-contract-v1-keychain"; -import { deployContractV1NoKeychain } from "./impl/deploy-contract-v1/deploy-contract-v1-no-keychain"; - -export const E_KEYCHAIN_NOT_FOUND = "cactus.connector.besu.keychain_not_found"; - -export interface IPluginLedgerConnectorBesuOptions - extends ICactusPluginOptions { - rpcApiHttpHost: string; - rpcApiWsHost: string; - pluginRegistry: PluginRegistry; - prometheusExporter?: PrometheusExporter; - logLevel?: LogLevelDesc; -} - -export class PluginLedgerConnectorBesu - implements - IPluginLedgerConnector< - DeployContractSolidityBytecodeV1Request, - DeployContractSolidityBytecodeV1Response, - RunTransactionRequest, - RunTransactionResponse - >, - ICactusPlugin, - IPluginGrpcService, - IPluginWebService -{ - private readonly instanceId: string; - public prometheusExporter: PrometheusExporter; - private readonly log: Logger; - private readonly logLevel: LogLevelDesc; - private readonly web3Provider: WebsocketProvider; - private readonly web3: Web3; - private web3Quorum: IWeb3Quorum | undefined; - private readonly pluginRegistry: PluginRegistry; - private contracts: { - [name: string]: Contract; - } = {}; - - private endpoints: IWebServiceEndpoint[] | undefined; - - public static readonly CLASS_NAME = "PluginLedgerConnectorBesu"; - - public get className(): string { - return PluginLedgerConnectorBesu.CLASS_NAME; - } - - constructor(public readonly options: IPluginLedgerConnectorBesuOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.rpcApiHttpHost, `${fnTag} options.rpcApiHttpHost`); - Checks.truthy(options.rpcApiWsHost, `${fnTag} options.rpcApiWsHost`); - Checks.truthy(options.pluginRegistry, `${fnTag} options.pluginRegistry`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - - this.logLevel = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level: this.logLevel, label }); - - this.log.debug("Creating WebsocketProvider for %s", options.rpcApiWsHost); - this.web3Provider = new Web3.providers.WebsocketProvider( - this.options.rpcApiWsHost, - ); - this.web3 = new Web3(this.web3Provider); - this.instanceId = options.instanceId; - this.pluginRegistry = options.pluginRegistry; - this.prometheusExporter = - options.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - - this.prometheusExporter.startMetricsCollection(); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public async onPluginInit(): Promise { - this.web3Quorum = Web3JsQuorum(this.web3); - this.log.info("onPluginInit() querying networkId..."); - const networkId = await this.web3.eth.net.getId(); - this.log.info("onPluginInit() obtained networkId: %d", networkId); - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - } - - async registerWebServices( - app: Express, - wsApi: SocketIoServer, - ): Promise { - const { web3 } = this; - const { logLevel } = this.options; - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - - wsApi.on("connection", (socket: SocketIoSocket) => { - this.log.debug(`New Socket connected. ID=${socket.id}`); - - socket.on(WatchBlocksV1.Subscribe, () => { - new WatchBlocksV1Endpoint({ web3, socket, logLevel }).subscribe(); - }); - }); - return webServices; - } - public async createGrpcSvcDefAndImplPairs(): Promise< - IGrpcSvcDefAndImplPair[] - > { - const openApiSvc = await this.createGrpcOpenApiSvcDefAndImplPair(); - const streamsSvc = await this.createGrpcStreamsSvcDefAndImplPair(); - return [openApiSvc, streamsSvc]; - } - - public async createGrpcStreamsSvcDefAndImplPair(): Promise { - const definition = - besu_grpc_svc_streams.org.hyperledger.cacti.plugin.ledger.connector.besu - .services.besuservice.UnimplementedBesuGrpcSvcStreamsService.definition; - - const implementation = new BesuGrpcSvcStreams({ - logLevel: this.logLevel, - web3: this.web3, - }); - - return { definition, implementation }; - } - - /** - * Create a new instance of the service implementation. - * Note: This does not cache the returned objects internally. A new instance - * is created during every invocation. - * - * @returns The gRPC service definition+implementation pair that is backed - * by the code generated by the OpenAPI generator from the openapi.json spec - * of this package. Used by the API server to obtain the service objects dynamically - * at runtime so that the plugin's gRPC services can be exposed in a similar - * fashion how the HTTP REST endpoints are registered as well. - */ - public async createGrpcOpenApiSvcDefAndImplPair(): Promise { - const definition = - grpc_default_service.org.hyperledger.cacti.plugin.ledger.connector.besu - .services.defaultservice.DefaultServiceClient.service; - - const implementation = new BesuGrpcSvcOpenApi({ - logLevel: this.logLevel, - web3: this.web3, - }); - - return { definition, implementation }; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new DeployContractSolidityBytecodeEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new DeployContractSolidityBytecodeNoKeychainEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new GetBalanceEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new GetTransactionEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new GetPastLogsEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new RunTransactionEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new GetBlockEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new InvokeContractEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new BesuSignTransactionEndpointV1({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new GetBesuRecordEndpointV1({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const opts: IGetPrometheusExporterMetricsEndpointV1Options = { - connector: this, - logLevel: this.options.logLevel, - }; - const endpoint = new GetPrometheusExporterMetricsEndpointV1(opts); - endpoints.push(endpoint); - } - { - const oasPath = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec" - ]; - - const operationId = oasPath.get.operationId; - const opts: IGetOpenApiSpecV1EndpointOptions = { - oas: OAS, - oasPath, - operationId, - path: oasPath.get["x-hyperledger-cacti"].http.path, - pluginRegistry: this.pluginRegistry, - verbLowerCase: oasPath.get["x-hyperledger-cacti"].http.verbLowerCase, - logLevel: this.options.logLevel, - }; - const endpoint = new GetOpenApiSpecV1Endpoint(opts); - endpoints.push(endpoint); - } - - this.endpoints = endpoints; - return endpoints; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-ledger-connector-besu`; - } - - public async getConsensusAlgorithmFamily(): Promise { - return ConsensusAlgorithmFamily.Authority; - } - public async hasTransactionFinality(): Promise { - const currentConsensusAlgorithmFamily = - await this.getConsensusAlgorithmFamily(); - - return consensusHasTransactionFinality(currentConsensusAlgorithmFamily); - } - - /** - * Verifies that it is safe to call a specific method of a Web3 Contract. - * - * @param contract The Web3 Contract instance to check whether it has a method with a specific name or not. - * @param name The name of the method that will be checked if it's usable on `contract` or not. - * @returns Boolean `true` when it IS safe to call the method named `name` on the contract. - * @throws If the contract instance is falsy or it's methods object is falsy. Also throws if the method name is a blank string. - */ - public async isSafeToCallContractMethod( - contract: Contract, - name: string, - ): Promise { - Checks.truthy( - contract, - `${this.className}#isSafeToCallContractMethod():contract`, - ); - - Checks.truthy( - contract.methods, - `${this.className}#isSafeToCallContractMethod():contract.methods`, - ); - - Checks.nonBlankString( - name, - `${this.className}#isSafeToCallContractMethod():name`, - ); - - const { methods } = contract; - - return Object.prototype.hasOwnProperty.call(methods, name); - } - - public async invokeContract( - req: InvokeContractV1Request, - ): Promise { - const fnTag = `${this.className}#invokeContract()`; - const contractName = req.contractName; - let contractInstance: Contract; - - if (req.keychainId != undefined) { - const networkId = await this.web3.eth.net.getId(); - const keychainPlugin = this.pluginRegistry.findOneByKeychainId( - req.keychainId, - ); - Checks.truthy( - keychainPlugin, - `${fnTag} keychain for ID:"${req.keychainId}"`, - ); - if (!keychainPlugin.has(contractName)) { - throw new Error( - `${fnTag} Cannot create an instance of the contract because the contractName and the contractName of the JSON doesn't match`, - ); - } - const contractStr = await keychainPlugin.get(contractName); - const contractJSON = JSON.parse(contractStr); - if ( - contractJSON.networks === undefined || - contractJSON.networks[networkId] === undefined || - contractJSON.networks[networkId].address === undefined - ) { - if (isWeb3SigningCredentialNone(req.signingCredential)) { - throw new Error(`${fnTag} Cannot deploy contract with pre-signed TX`); - } - const web3SigningCredential = req.signingCredential as - | Web3SigningCredentialPrivateKeyHex - | Web3SigningCredentialCactusKeychainRef; - - const receipt = await this.transact({ - transactionConfig: { - data: `0x${contractJSON.bytecode}`, - from: web3SigningCredential.ethAccount, - gas: req.gas, - gasPrice: req.gasPrice, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: req.timeoutMs || 60000, - }, - web3SigningCredential, - privateTransactionConfig: req.privateTransactionConfig, - }); - - const address = { - address: receipt.transactionReceipt.contractAddress, - }; - const network = { [networkId]: address }; - contractJSON.networks = network; - keychainPlugin.set(contractName, JSON.stringify(contractJSON)); - } - const contract = new this.web3.eth.Contract( - contractJSON.abi, - contractJSON.networks[networkId].address, - ); - - this.contracts[contractName] = contract; - } else if ( - req.keychainId == undefined && - req.contractAbi == undefined && - req.contractAddress == undefined - ) { - throw new Error( - `${fnTag} Cannot invoke a contract without contract instance, the keychainId param is needed`, - ); - } - - contractInstance = this.contracts[contractName]; - if (req.contractAbi != undefined) { - let abi; - if (typeof req.contractAbi === "string") { - abi = JSON.parse(req.contractAbi); - } else { - abi = req.contractAbi; - } - - const { contractAddress } = req; - contractInstance = new this.web3.eth.Contract(abi, contractAddress); - } - - const isSafeToCall = await this.isSafeToCallContractMethod( - contractInstance, - req.methodName, - ); - if (!isSafeToCall) { - throw new RuntimeError( - `Invalid method name provided in request. ${req.methodName} does not exist on the Web3 contract object's "methods" property.`, - ); - } - - const methodRef = contractInstance.methods[req.methodName]; - Checks.truthy(methodRef, `${fnTag} YourContract.${req.methodName}`); - const method: ContractSendMethod = methodRef(...req.params); - - if (req.invocationType === EthContractInvocationType.Call) { - let callOutput; - let success = false; - if (req.privateTransactionConfig) { - const data = method.encodeABI(); - let privKey: string; - - if ( - req.signingCredential.type == - Web3SigningCredentialType.CactusKeychainRef - ) { - const { keychainEntryKey, keychainId } = - req.signingCredential as Web3SigningCredentialCactusKeychainRef; - - const keychainPlugin = - this.pluginRegistry.findOneByKeychainId(keychainId); - privKey = await keychainPlugin?.get(keychainEntryKey); - } else { - privKey = ( - req.signingCredential as Web3SigningCredentialPrivateKeyHex - ).secret; - } - - const fnParams = { - to: contractInstance.options.address, - data, - privateFrom: req.privateTransactionConfig.privateFrom, - privateKey: privKey, - privateFor: req.privateTransactionConfig.privateFor, - }; - if (!this.web3Quorum) { - throw new RuntimeError(`InvalidState: web3Quorum not initialized.`); - } - - const privacyGroupId = - this.web3Quorum.utils.generatePrivacyGroup(fnParams); - this.log.debug("Generated privacyGroupId: ", privacyGroupId); - callOutput = await this.web3Quorum.priv.call(privacyGroupId, { - to: contractInstance.options.address, - data, - // TODO: Update the "from" property of ICallOptions to be optional - }); - - success = true; - this.log.debug(`Web3 EEA Call output: `, callOutput); - } else { - callOutput = await method.call(); - success = true; - } - return { success, callOutput }; - } else if (req.invocationType === EthContractInvocationType.Send) { - if (isWeb3SigningCredentialNone(req.signingCredential)) { - throw new Error(`${fnTag} Cannot deploy contract with pre-signed TX`); - } - const web3SigningCredential = req.signingCredential as - | Web3SigningCredentialPrivateKeyHex - | Web3SigningCredentialCactusKeychainRef; - const payload = (method.send as any).request(); - const { params } = payload; - const [transactionConfig] = params; - if (req.gas == undefined) { - req.gas = await this.web3.eth.estimateGas(transactionConfig); - } - transactionConfig.from = web3SigningCredential.ethAccount; - transactionConfig.gas = req.gas; - transactionConfig.gasPrice = req.gasPrice; - transactionConfig.value = req.value; - transactionConfig.nonce = req.nonce; - const txReq: RunTransactionRequest = { - transactionConfig, - web3SigningCredential, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: req.timeoutMs || 60000, - }, - privateTransactionConfig: req.privateTransactionConfig, - }; - const out = await this.transact(txReq); - const success = out.transactionReceipt.status; - const data = { success, out }; - return data; - } else { - throw new Error( - `${fnTag} Unsupported invocation type ${req.invocationType}`, - ); - } - } - - public async transact( - req: RunTransactionRequest, - ): Promise { - const ctx = { - prometheusExporter: this.prometheusExporter, - pluginRegistry: this.pluginRegistry, - logLevel: this.logLevel, - web3: this.web3, - }; - const runTransactionResponse = transactV1Impl(ctx, req); - return runTransactionResponse; - } - - public async deployContract( - req: DeployContractSolidityBytecodeV1Request, - ): Promise { - const ctx = { - pluginRegistry: this.pluginRegistry, - prometheusExporter: this.prometheusExporter, - web3: this.web3, - logLevel: this.logLevel, - }; - - const res = await deployContractV1Keychain(ctx, req); - const { status, contractAddress, contractName, contract } = res; - if (status && contractAddress && contract) { - this.contracts[contractName] = contract; - } - return res.deployResponse; - } - - public async deployContractNoKeychain( - req: DeployContractSolidityBytecodeNoKeychainV1Request, - ): Promise { - const ctx = { - pluginRegistry: this.pluginRegistry, - prometheusExporter: this.prometheusExporter, - web3: this.web3, - logLevel: this.logLevel, - }; - this.log.debug("Invoking deployContractV1NoKeychain()..."); - const res = deployContractV1NoKeychain(ctx, req); - this.log.debug("Ran deployContractV1NoKeychain() OK"); - return res; - } - - public async signTransaction( - req: SignTransactionRequest, - ): Promise> { - const { pluginRegistry, rpcApiHttpHost, logLevel } = this.options; - const { keychainId, keychainRef, transactionHash } = req; - - const converter = new KeyConverter(); - - const web3Provider = new Web3.providers.HttpProvider(rpcApiHttpHost); - const web3 = new Web3(web3Provider); - - // Make sure the transaction exists on the ledger first... - const transaction = await web3.eth.getTransaction(transactionHash); - if (!transaction) { - return Optional.empty(); - } - - const keychain = pluginRegistry.findOneByKeychainId(keychainId); - - if (!keychain) { - const msg = `Keychain for ID ${keychainId} not found.`; - throw new CodedError(msg, E_KEYCHAIN_NOT_FOUND); - } - - const pem: string = await keychain.get(keychainRef); - - const pkRaw = converter.privateKeyAs(pem, KeyFormat.PEM, KeyFormat.Raw); - - const jsObjectSignerOptions: IJsObjectSignerOptions = { - privateKey: pkRaw, - logLevel, - }; - - const jsObjectSigner = new JsObjectSigner(jsObjectSignerOptions); - - if (transaction !== undefined && transaction !== null) { - const singData = jsObjectSigner.sign(transaction.input); - const signDataHex = Buffer.from(singData).toString("hex"); - - const resBody: SignTransactionResponse = { signature: signDataHex }; - return Optional.ofNullable(resBody); - } - - return Optional.empty(); - } - - public async getBalance( - request: GetBalanceV1Request, - ): Promise { - const balance = await this.web3.eth.getBalance( - request.address, - request.defaultBlock, - ); - return { balance }; - } - - public async getTransaction( - request: GetTransactionV1Request, - ): Promise { - const transaction = await this.web3.eth.getTransaction( - request.transactionHash, - ); - return { transaction }; - } - - public async getPastLogs( - request: GetPastLogsV1Request, - ): Promise { - const logs = await this.web3.eth.getPastLogs(request); - return { logs }; - } - - public async getBlock( - request: GetBlockV1Request, - ): Promise { - const ctx = { logLevel: this.logLevel, web3: this.web3 }; - const getBlockV1Response = await getBlockV1Http(ctx, request); - this.log.debug("getBlockV1Response=%o", getBlockV1Response); - return getBlockV1Response; - } - - public async getBesuRecord( - request: GetBesuRecordV1Request, - ): Promise { - const fnTag = `${this.className}#getBesuRecord()`; - ////////////////////////////////////////////// - let abi: AbiItem[] | AbiItem = []; - const resp: GetBesuRecordV1Response = {}; - const txHash = request.transactionHash; - - if (txHash) { - const transaction = await this.web3.eth.getTransaction(txHash); - if (transaction.input) { - resp.transactionInputData = transaction.input; - return resp; - } - } - - if (request.invokeCall) { - if (request.invokeCall.contractAbi) { - if (typeof request.invokeCall.contractAbi === "string") { - abi = JSON.parse(request.invokeCall.contractAbi); - } else { - abi = request.invokeCall.contractAbi; - } - } - const { contractAddress } = request.invokeCall; - const contractInstance = new this.web3.eth.Contract(abi, contractAddress); - - const isSafeToCall = await this.isSafeToCallContractMethod( - contractInstance, - request.invokeCall.methodName, - ); - if (!isSafeToCall) { - throw new RuntimeError( - `Invalid method name provided in request. ${request.invokeCall.methodName} does not exist on the Web3 contract object's "methods" property.`, - ); - } - - const methodRef = contractInstance.methods[request.invokeCall.methodName]; - Checks.truthy( - methodRef, - `${fnTag} YourContract.${request.invokeCall.methodName}`, - ); - const method: ContractSendMethod = methodRef( - ...request.invokeCall.params, - ); - - if ( - request.invokeCall.invocationType === EthContractInvocationType.Call - ) { - const callOutput = await (method as any).call(); - const res: GetBesuRecordV1Response = { - callOutput, - }; - return res; - } else { - throw new Error( - `${fnTag} Unsupported invocation type ${request.invokeCall.invocationType}`, - ); - } - } - return resp; - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index 3f468e9eb2..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Transactions } from "./response.type"; - -import { totalTxCount, K_CACTUS_BESU_TOTAL_TX_COUNT } from "./metrics"; - -export async function collectMetrics( - transactions: Transactions, -): Promise { - transactions.counter++; - totalTxCount.labels(K_CACTUS_BESU_TOTAL_TX_COUNT).set(transactions.counter); -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index 8b1addf43e..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_BESU_TOTAL_TX_COUNT = "cactus_besu_total_tx_count"; - -export const totalTxCount = new Gauge({ - registers: [], - name: "cactus_besu_total_tx_count", - help: "Total transactions executed", - labelNames: ["type"], -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index 4ece66e25e..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,39 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { Transactions } from "./response.type"; -import { collectMetrics } from "./data-fetcher"; -import { K_CACTUS_BESU_TOTAL_TX_COUNT } from "./metrics"; -import { totalTxCount } from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly transactions: Transactions = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public addCurrentTransaction(): void { - collectMetrics(this.transactions); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_BESU_TOTAL_TX_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalTxCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 3f1bc7f491..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type Transactions = { - counter: number; -}; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api.ts deleted file mode 100755 index 8e686fb328..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api.ts +++ /dev/null @@ -1,93 +0,0 @@ -export { - E_KEYCHAIN_NOT_FOUND, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, -} from "./plugin-ledger-connector-besu"; -export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export { - BesuApiClient, - BesuApiClientOptions, -} from "./api-client/besu-api-client"; - -export * from "./generated/openapi/typescript-axios/api"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} - -export { - IBesuGrpcSvcOpenApiOptions, - BesuGrpcSvcOpenApi, -} from "./grpc-services/besu-grpc-svc-open-api"; - -export { - BesuGrpcSvcStreams, - IBesuGrpcSvcStreamsOptions, -} from "./grpc-services/besu-grpc-svc-streams"; - -export * as google_protobuf_any from "./generated/proto/protoc-gen-ts/google/protobuf/any"; -export * as google_protobuf_empty from "./generated/proto/protoc-gen-ts/google/protobuf/empty"; - -export * as besu_private_transaction_config_pb from "./generated/proto/protoc-gen-ts/models/besu_private_transaction_config_pb"; -export * as besu_transaction_config_pb from "./generated/proto/protoc-gen-ts/models/besu_transaction_config_pb"; -export * as besu_transaction_config_to_pb from "./generated/proto/protoc-gen-ts/models/besu_transaction_config_to_pb"; -export * as consistency_strategy_pb from "./generated/proto/protoc-gen-ts/models/consistency_strategy_pb"; -export * as deploy_contract_solidity_bytecode_v1_request_pb from "./generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_v1_request_pb"; -export * as deploy_contract_solidity_bytecode_v1_response_pb from "./generated/proto/protoc-gen-ts/models/deploy_contract_solidity_bytecode_v1_response_pb"; -export * as eth_contract_invocation_type_pb from "./generated/proto/protoc-gen-ts/models/eth_contract_invocation_type_pb"; -export * as evm_block_pb from "./generated/proto/protoc-gen-ts/models/evm_block_pb"; -export * as evm_log_pb from "./generated/proto/protoc-gen-ts/models/evm_log_pb"; -export * as evm_transaction_pb from "./generated/proto/protoc-gen-ts/models/evm_transaction_pb"; -export * as get_balance_v1_request_pb from "./generated/proto/protoc-gen-ts/models/get_balance_v1_request_pb"; -export * as get_balance_v1_response_pb from "./generated/proto/protoc-gen-ts/models/get_balance_v1_response_pb"; -export * as get_besu_record_v1_request_pb from "./generated/proto/protoc-gen-ts/models/get_besu_record_v1_request_pb"; -export * as get_besu_record_v1_response_pb from "./generated/proto/protoc-gen-ts/models/get_besu_record_v1_response_pb"; -export * as get_block_v1_request_pb from "./generated/proto/protoc-gen-ts/models/get_block_v1_request_pb"; -export * as get_block_v1_response_pb from "./generated/proto/protoc-gen-ts/models/get_block_v1_response_pb"; -export * as get_past_logs_v1_request_pb from "./generated/proto/protoc-gen-ts/models/get_past_logs_v1_request_pb"; -export * as get_past_logs_v1_response_pb from "./generated/proto/protoc-gen-ts/models/get_past_logs_v1_response_pb"; -export * as get_transaction_v1_request_pb from "./generated/proto/protoc-gen-ts/models/get_transaction_v1_request_pb"; -export * as get_transaction_v1_response_pb from "./generated/proto/protoc-gen-ts/models/get_transaction_v1_response_pb"; -export * as invoke_contract_v1_request_pb from "./generated/proto/protoc-gen-ts/models/invoke_contract_v1_request_pb"; -export * as invoke_contract_v1_response_pb from "./generated/proto/protoc-gen-ts/models/invoke_contract_v1_response_pb"; -export * as receipt_type_pb from "./generated/proto/protoc-gen-ts/models/receipt_type_pb"; -export * as run_transaction_request_pb from "./generated/proto/protoc-gen-ts/models/run_transaction_request_pb"; -export * as run_transaction_response_pb from "./generated/proto/protoc-gen-ts/models/run_transaction_response_pb"; -export * as sign_transaction_request_pb from "./generated/proto/protoc-gen-ts/models/sign_transaction_request_pb"; -export * as sign_transaction_response_pb from "./generated/proto/protoc-gen-ts/models/sign_transaction_response_pb"; -export * as web3_block_header_timestamp_pb from "./generated/proto/protoc-gen-ts/models/web3_block_header_timestamp_pb"; -export * as web3_signing_credential_cactus_keychain_ref_pb from "./generated/proto/protoc-gen-ts/models/web3_signing_credential_cactus_keychain_ref_pb"; -export * as web3_signing_credential_none_pb from "./generated/proto/protoc-gen-ts/models/web3_signing_credential_none_pb"; -export * as web3_signing_credential_pb from "./generated/proto/protoc-gen-ts/models/web3_signing_credential_pb"; -export * as web3_signing_credential_private_key_hex_pb from "./generated/proto/protoc-gen-ts/models/web3_signing_credential_private_key_hex_pb"; -export * as web3_signing_credential_type_pb from "./generated/proto/protoc-gen-ts/models/web3_signing_credential_type_pb"; -export * as web3_transaction_receipt_pb from "./generated/proto/protoc-gen-ts/models/web3_transaction_receipt_pb"; - -export * as default_service from "./generated/proto/protoc-gen-ts/services/default_service"; - -export * as besu_grpc_svc_streams from "./generated/proto/protoc-gen-ts/services/besu-grpc-svc-streams"; -export * as watch_blocks_v1_progress_pb from "./generated/proto/protoc-gen-ts/models/watch_blocks_v1_progress_pb"; -export * as watch_blocks_v1_request_pb from "./generated/proto/protoc-gen-ts/models/watch_blocks_v1_request_pb"; -export * as watch_blocks_v1_pb from "./generated/proto/protoc-gen-ts/models/watch_blocks_v1_pb"; - -export { - createGrpcInsecureChannelCredentials, - createGrpcInsecureServerCredentials, - createGrpcSslChannelCredentials, - createGrpcSslServerCredentials, -} from "./grpc-services/common/grpc-credentials-factory"; - -export { createGrpcServer } from "./grpc-services/common/grpc-server-factory"; - -export { getBlockV1Grpc } from "./impl/get-block-v1/get-block-v1-grpc"; -export { getBlockV1Http } from "./impl/get-block-v1/get-block-v1-http"; -export { - getBlockV1Impl, - isBlockNumber, -} from "./impl/get-block-v1/get-block-v1-impl"; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/deploy-contract-solidity-bytecode-endpoint.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/deploy-contract-solidity-bytecode-endpoint.ts deleted file mode 100644 index 5d14aaef7e..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/deploy-contract-solidity-bytecode-endpoint.ts +++ /dev/null @@ -1,105 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; -import { DeployContractSolidityBytecodeV1Request } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; - -export interface IDeployContractSolidityBytecodeOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorBesu; -} - -export class DeployContractSolidityBytecodeEndpoint - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "DeployContractSolidityBytecodeEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeployContractSolidityBytecodeEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeployContractSolidityBytecodeOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const { log } = this; - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody: DeployContractSolidityBytecodeV1Request = req.body; - try { - const resBody = await this.options.connector.deployContract(reqBody); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to deploy contract:`; - await handleRestEndpointException({ errorMsg, log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/deploy-contract-solidity-bytecode-no-keychain-endpoint.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/deploy-contract-solidity-bytecode-no-keychain-endpoint.ts deleted file mode 100644 index 8df4ff857a..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/deploy-contract-solidity-bytecode-no-keychain-endpoint.ts +++ /dev/null @@ -1,109 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; -import type { DeployContractSolidityBytecodeNoKeychainV1Request } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; - -export interface IDeployContractSolidityBytecodeNoKeychainOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorBesu; -} - -export class DeployContractSolidityBytecodeNoKeychainEndpoint - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = - "DeployContractSolidityBytecodeNoKeychainEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeployContractSolidityBytecodeNoKeychainEndpoint.CLASS_NAME; - } - - constructor( - public readonly options: IDeployContractSolidityBytecodeNoKeychainOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/deploy-contract-solidity-bytecode-no-keychain" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const { log } = this; - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody: DeployContractSolidityBytecodeNoKeychainV1Request = req.body; - try { - const resBody = - await this.options.connector.deployContractNoKeychain(reqBody); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to deploy contract:`; - await handleRestEndpointException({ errorMsg, log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-balance-endpoint.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-balance-endpoint.ts deleted file mode 100644 index 95f2332898..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-balance-endpoint.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; - -import OAS from "../../json/openapi.json"; - -export interface IGetBalanceEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorBesu; -} - -export class GetBalanceEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetBalanceEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return GetBalanceEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetBalanceEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-balance" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.getBalance(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-besu-record-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-besu-record-endpoint-v1.ts deleted file mode 100644 index 84a530909c..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-besu-record-endpoint-v1.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; -import { GetBesuRecordV1Request } from "../generated/openapi/typescript-axios/api"; - -import OAS from "../../json/openapi.json"; - -export interface IGetBesuRecordEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorBesu; -} - -export class GetBesuRecordEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetBesuRecordEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return GetBesuRecordEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IGetBesuRecordEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath() { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-besu-record" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const reqBody: GetBesuRecordV1Request = - req.body as GetBesuRecordV1Request; - const resBody = await this.options.connector.getBesuRecord(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-block-v1-endpoint-.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-block-v1-endpoint-.ts deleted file mode 100644 index 23f6f4d6ec..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-block-v1-endpoint-.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; - -import OAS from "../../json/openapi.json"; - -export interface IGetBlockEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorBesu; -} - -export class GetBlockEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetBlockEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return GetBlockEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetBlockEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-block" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.getBlock(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-open-api-spec-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-open-api-spec-v1-endpoint.ts deleted file mode 100644 index b3029ae0aa..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-open-api-spec-v1-endpoint.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { - GetOpenApiSpecV1EndpointBase, - IGetOpenApiSpecV1EndpointBaseOptions, -} from "@hyperledger/cactus-core"; - -import { Checks, LogLevelDesc } from "@hyperledger/cactus-common"; -import { IWebServiceEndpoint } from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -export const OasPathGetOpenApiSpecV1 = - OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-open-api-spec" - ]; - -export type OasPathTypeGetOpenApiSpecV1 = typeof OasPathGetOpenApiSpecV1; - -export interface IGetOpenApiSpecV1EndpointOptions - extends IGetOpenApiSpecV1EndpointBaseOptions< - typeof OAS, - OasPathTypeGetOpenApiSpecV1 - > { - readonly logLevel?: LogLevelDesc; -} - -export class GetOpenApiSpecV1Endpoint - extends GetOpenApiSpecV1EndpointBase - implements IWebServiceEndpoint -{ - public get className(): string { - return GetOpenApiSpecV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetOpenApiSpecV1EndpointOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-past-logs-endpoint.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-past-logs-endpoint.ts deleted file mode 100644 index ff3f14b764..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-past-logs-endpoint.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; - -import OAS from "../../json/openapi.json"; - -export interface IGetPastLogsEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorBesu; -} - -export class GetPastLogsEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetPastLogsEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return GetPastLogsEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetPastLogsEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-past-logs" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.getPastLogs(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts deleted file mode 100644 index 416190ed0f..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - connector: PluginLedgerConnectorBesu; - logLevel?: LogLevelDesc; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - private readonly log: Logger; - - constructor( - public readonly options: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = "GetPrometheusExporterMetricsEndpointV1#constructor()"; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.connector, `${fnTag} options.connector`); - - const label = "get-prometheus-exporter-metrics-endpoint"; - const level = options.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ label, level }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetPrometheusExporterMetrics#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - const resBody = - await this.options.connector.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-transaction-endpoint.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-transaction-endpoint.ts deleted file mode 100644 index 84807e8da9..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/get-transaction-endpoint.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; - -import OAS from "../../json/openapi.json"; - -export interface IGetTransactionEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorBesu; -} - -export class GetTransactionEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetTransactionEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return GetTransactionEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetTransactionEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-transaction" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.getTransaction(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/invoke-contract-endpoint.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/invoke-contract-endpoint.ts deleted file mode 100644 index cd398a6290..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/invoke-contract-endpoint.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; - -import OAS from "../../json/openapi.json"; -import { InvokeContractV1Request } from "../generated/openapi/typescript-axios"; - -export interface IInvokeContractEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorBesu; -} - -export class InvokeContractEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InvokeContractEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return InvokeContractEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IInvokeContractEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody: InvokeContractV1Request = req.body; - try { - const resBody = await this.options.connector.invokeContract(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/run-transaction-endpoint.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/run-transaction-endpoint.ts deleted file mode 100644 index 096be62d00..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/run-transaction-endpoint.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; - -import OAS from "../../json/openapi.json"; -import { RunTransactionRequest } from "../generated/openapi/typescript-axios"; - -export interface IRunTransactionEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorBesu; -} - -export class RunTransactionEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RunTransactionEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return RunTransactionEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IRunTransactionEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/run-transaction" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody: RunTransactionRequest = req.body; - try { - const resBody = await this.options.connector.transact(reqBody); - res.json({ success: true, data: resBody }); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/sign-transaction-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/sign-transaction-endpoint-v1.ts deleted file mode 100644 index 88a352065d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/sign-transaction-endpoint-v1.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { SignTransactionRequest } from "../generated/openapi/typescript-axios/api"; - -import { PluginLedgerConnectorBesu } from "../plugin-ledger-connector-besu"; -import OAS from "../../json/openapi.json"; - -export interface IBesuSignTransactionEndpointOptions { - connector: PluginLedgerConnectorBesu; - logLevel?: LogLevelDesc; -} - -export class BesuSignTransactionEndpointV1 implements IWebServiceEndpoint { - private readonly log: Logger; - - constructor(public readonly options: IBesuSignTransactionEndpointOptions) { - const fnTag = "BesuSignTransactionEndpointV1#constructor()"; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.connector, `${fnTag} options.connector`); - - const label = "besu-sign-transaction-endpoint"; - const level = options.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ label, level }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/sign-transaction" - ]; - } - - getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "BesuSignTransactionEndpointV1#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - - try { - const request: SignTransactionRequest = - req.body as SignTransactionRequest; - - const trxResponse = await this.options.connector.signTransaction(request); - - if (trxResponse.isPresent()) { - res.status(200); - res.json(trxResponse.get()); - } else { - this.log.error(`${fnTag} failed to find the transaction`); - res.status(404); - res.statusMessage = "Transaction not found"; - res.json({ error: "Transaction not found" }); - } - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts deleted file mode 100644 index d7d86da7e4..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { Socket as SocketIoSocket } from "socket.io"; -import Web3 from "web3"; - -import { Logger, Checks } from "@hyperledger/cactus-common"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { WatchBlocksV1Progress } from "../generated/openapi/typescript-axios"; -import { WatchBlocksV1 } from "../generated/openapi/typescript-axios"; -import { Web3BlockHeader } from "../generated/openapi/typescript-axios"; - -export interface IWatchBlocksV1EndpointOptions { - logLevel?: LogLevelDesc; - socket: SocketIoSocket; - web3: Web3; -} - -export class WatchBlocksV1Endpoint { - public static readonly CLASS_NAME = "WatchBlocksV1Endpoint"; - - private readonly log: Logger; - private readonly socket: SocketIoSocket< - Record void>, - Record void> - >; - private readonly web3: Web3; - - public get className(): string { - return WatchBlocksV1Endpoint.CLASS_NAME; - } - - constructor(public readonly options: IWatchBlocksV1EndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.web3, `${fnTag} arg options.web3`); - Checks.truthy(options.socket, `${fnTag} arg options.socket`); - - this.web3 = options.web3; - this.socket = options.socket; - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public async subscribe(): Promise { - const { socket, log, web3 } = this; - log.debug(`${WatchBlocksV1.Subscribe} => ${socket.id}`); - const sub = web3.eth.subscribe("newBlockHeaders", (ex, blockHeader) => { - log.debug("newBlockHeaders: Error=%o BlockHeader=%o", ex, blockHeader); - if (blockHeader) { - const next: WatchBlocksV1Progress = { - // Cast needed because somewhere between Web3 v1.5.2 and v1.6.1 they - // made the receiptRoot property of the BlockHeader type optional. - // This could be accompanied by a breaking change in their code or - // it could've been just a mistake in their typings that they corrected. - // Either way, with the next major release, we need to make it optional - // in our API specs as well so that they match up. - blockHeader: blockHeader as unknown as Web3BlockHeader, - }; - socket.emit(WatchBlocksV1.Next, next); - } - if (ex) { - socket.emit(WatchBlocksV1.Error, ex); - sub.unsubscribe(); - } - }); - - log.debug("Subscribing to Web3 new block headers event..."); - - socket.on("disconnect", async (reason: string) => { - log.debug("WebSocket:disconnect reason=%o", reason); - sub.unsubscribe((ex: Error, success: boolean) => { - log.debug("Web3 unsubscribe success=%o, ex=%", success, ex); - }); - }); - - socket.on(WatchBlocksV1.Unsubscribe, () => { - log.debug(`${WatchBlocksV1.Unsubscribe}: unsubscribing Web3...`); - sub.unsubscribe((ex: Error, success: boolean) => { - log.debug("Web3 unsubscribe error=%o, success=%", ex, success); - }); - }); - } -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json b/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json deleted file mode 100644 index 286294b996..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json +++ /dev/null @@ -1,5619 +0,0 @@ -{ - "contractName": "HelloWorld", - "abi": [ - { - "inputs": [], - "name": "sayHello", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getName", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getNameByIndex", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "setName", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getNameByIndex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sayHello\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol\":\"HelloWorld\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol\":{\"keccak256\":\"0x1e97027d32e8c3433b793d7b2b45e30ea2d341c96a3943508ba068dea106efab\",\"urls\":[\"bzz-raw://96e37a0bb119b1fe14a4e71627c077b180f4deb9acc4284aa987a3ca1a6f45b1\",\"dweb:/ipfs/QmTAiGsxb38hMgDgbrtLLdYxc76CposiN9moBuJXAg2Mgk\"]}},\"version\":1}", - "bytecode": "60806040526040518060400160405280600d81526020017f4361707461696e436163747573000000000000000000000000000000000000008152506000908051906020019061004f929190610062565b5034801561005c57600080fd5b50610166565b82805461006e90610105565b90600052602060002090601f01602090048101928261009057600085556100d7565b82601f106100a957805160ff19168380011785556100d7565b828001600101855582156100d7579182015b828111156100d65782518255916020019190600101906100bb565b5b5090506100e491906100e8565b5090565b5b808211156101015760008160009055506001016100e9565b5090565b6000600282049050600182168061011d57607f821691505b6020821081141561013157610130610137565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b61082c806101756000396000f3fe60806040526004361061004a5760003560e01c806317d7de7c1461004f57806359c293f11461007a578063c47f0027146100b7578063d0e30db0146100e0578063ef5fb05b146100ea575b600080fd5b34801561005b57600080fd5b50610064610115565b60405161007191906105ae565b60405180910390f35b34801561008657600080fd5b506100a1600480360381019061009c919061050c565b6101a7565b6040516100ae91906105ae565b60405180910390f35b3480156100c357600080fd5b506100de60048036038101906100d991906104cb565b61027d565b005b6100e86102d3565b005b3480156100f657600080fd5b506100ff61036e565b60405161010c91906105ae565b60405180910390f35b6060600080546101249061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546101509061070f565b801561019d5780601f106101725761010080835404028352916020019161019d565b820191906000526020600020905b81548152906001019060200180831161018057829003601f168201915b5050505050905090565b6060600282815481106101e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180546101f89061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546102249061070f565b80156102715780601f1061024657610100808354040283529160200191610271565b820191906000526020600020905b81548152906001019060200180831161025457829003601f168201915b50505050509050919050565b80600090805190602001906102939291906103ab565b506002819080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906102cf9291906103ab565b5050565b60003411610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d906105d0565b60405180910390fd5b34600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610365919061066d565b92505081905550565b60606040518060400160405280600c81526020017f48656c6c6f20576f726c64210000000000000000000000000000000000000000815250905090565b8280546103b79061070f565b90600052602060002090601f0160209004810192826103d95760008555610420565b82601f106103f257805160ff1916838001178555610420565b82800160010185558215610420579182015b8281111561041f578251825591602001919060010190610404565b5b50905061042d9190610431565b5090565b5b8082111561044a576000816000905550600101610432565b5090565b600061046161045c84610621565b6105f0565b90508281526020810184848401111561047957600080fd5b6104848482856106cd565b509392505050565b600082601f83011261049d57600080fd5b81356104ad84826020860161044e565b91505092915050565b6000813590506104c5816107df565b92915050565b6000602082840312156104dd57600080fd5b600082013567ffffffffffffffff8111156104f757600080fd5b6105038482850161048c565b91505092915050565b60006020828403121561051e57600080fd5b600061052c848285016104b6565b91505092915050565b600061054082610651565b61054a818561065c565b935061055a8185602086016106dc565b610563816107ce565b840191505092915050565b600061057b601b8361065c565b91507f56616c7565206d757374206265206469666572656e74206f66203000000000006000830152602082019050919050565b600060208201905081810360008301526105c88184610535565b905092915050565b600060208201905081810360008301526105e98161056e565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156106175761061661079f565b5b8060405250919050565b600067ffffffffffffffff82111561063c5761063b61079f565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610678826106c3565b9150610683836106c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106b8576106b7610741565b5b828201905092915050565b6000819050919050565b82818337600083830152505050565b60005b838110156106fa5780820151818401526020810190506106df565b83811115610709576000848401525b50505050565b6000600282049050600182168061072757607f821691505b6020821081141561073b5761073a610770565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6107e8816106c3565b81146107f357600080fd5b5056fea2646970667358221220450aa5d16069485df7d037ffe43b6593e232f4ac514d9169ba271384cc5d841964736f6c63430008000033", - "deployedBytecode": "60806040526004361061004a5760003560e01c806317d7de7c1461004f57806359c293f11461007a578063c47f0027146100b7578063d0e30db0146100e0578063ef5fb05b146100ea575b600080fd5b34801561005b57600080fd5b50610064610115565b60405161007191906105ae565b60405180910390f35b34801561008657600080fd5b506100a1600480360381019061009c919061050c565b6101a7565b6040516100ae91906105ae565b60405180910390f35b3480156100c357600080fd5b506100de60048036038101906100d991906104cb565b61027d565b005b6100e86102d3565b005b3480156100f657600080fd5b506100ff61036e565b60405161010c91906105ae565b60405180910390f35b6060600080546101249061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546101509061070f565b801561019d5780601f106101725761010080835404028352916020019161019d565b820191906000526020600020905b81548152906001019060200180831161018057829003601f168201915b5050505050905090565b6060600282815481106101e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180546101f89061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546102249061070f565b80156102715780601f1061024657610100808354040283529160200191610271565b820191906000526020600020905b81548152906001019060200180831161025457829003601f168201915b50505050509050919050565b80600090805190602001906102939291906103ab565b506002819080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906102cf9291906103ab565b5050565b60003411610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d906105d0565b60405180910390fd5b34600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610365919061066d565b92505081905550565b60606040518060400160405280600c81526020017f48656c6c6f20576f726c64210000000000000000000000000000000000000000815250905090565b8280546103b79061070f565b90600052602060002090601f0160209004810192826103d95760008555610420565b82601f106103f257805160ff1916838001178555610420565b82800160010185558215610420579182015b8281111561041f578251825591602001919060010190610404565b5b50905061042d9190610431565b5090565b5b8082111561044a576000816000905550600101610432565b5090565b600061046161045c84610621565b6105f0565b90508281526020810184848401111561047957600080fd5b6104848482856106cd565b509392505050565b600082601f83011261049d57600080fd5b81356104ad84826020860161044e565b91505092915050565b6000813590506104c5816107df565b92915050565b6000602082840312156104dd57600080fd5b600082013567ffffffffffffffff8111156104f757600080fd5b6105038482850161048c565b91505092915050565b60006020828403121561051e57600080fd5b600061052c848285016104b6565b91505092915050565b600061054082610651565b61054a818561065c565b935061055a8185602086016106dc565b610563816107ce565b840191505092915050565b600061057b601b8361065c565b91507f56616c7565206d757374206265206469666572656e74206f66203000000000006000830152602082019050919050565b600060208201905081810360008301526105c88184610535565b905092915050565b600060208201905081810360008301526105e98161056e565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156106175761061661079f565b5b8060405250919050565b600067ffffffffffffffff82111561063c5761063b61079f565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610678826106c3565b9150610683836106c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106b8576106b7610741565b5b828201905092915050565b6000819050919050565b82818337600083830152505050565b60005b838110156106fa5780820151818401526020810190506106df565b83811115610709576000848401525b50505050565b6000600282049050600182168061072757607f821691505b6020821081141561073b5761073a610770565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6107e8816106c3565b81146107f357600080fd5b5056fea2646970667358221220450aa5d16069485df7d037ffe43b6593e232f4ac514d9169ba271384cc5d841964736f6c63430008000033", - "immutableReferences": {}, - "generatedSources": [ - { - "ast": { - "nodeType": "YulBlock", - "src": "0:516:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "58:269:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "68:22:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "82:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "88:1:2", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "78:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "78:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "68:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "99:38:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "129:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "135:1:2", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "125:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "125:12:2" - }, - "variables": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulTypedName", - "src": "103:18:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "176:51:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "190:27:2", - "value": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "204:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "212:4:2", - "type": "", - "value": "0x7f" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "200:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "200:17:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "190:6:2" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "156:18:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "149:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "149:26:2" - }, - "nodeType": "YulIf", - "src": "146:2:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "279:42:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x22", - "nodeType": "YulIdentifier", - "src": "293:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "293:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "293:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "243:18:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "266:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "274:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "263:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "263:14:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "240:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "240:38:2" - }, - "nodeType": "YulIf", - "src": "237:2:2" - } - ] - }, - "name": "extract_byte_array_length", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "data", - "nodeType": "YulTypedName", - "src": "42:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "51:6:2", - "type": "" - } - ], - "src": "7:320:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "361:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "378:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "381:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "371:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "371:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "371:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "475:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "478:4:2", - "type": "", - "value": "0x22" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "468:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "468:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "468:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "499:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "502:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "492:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "492:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "492:15:2" - } - ] - }, - "name": "panic_error_0x22", - "nodeType": "YulFunctionDefinition", - "src": "333:180:2" - } - ] - }, - "contents": "{\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n}\n", - "id": 2, - "language": "Yul", - "name": "#utility.yul" - } - ], - "deployedGeneratedSources": [ - { - "ast": { - "nodeType": "YulBlock", - "src": "0:5780:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "91:260:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "101:74:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "167:6:2" - } - ], - "functionName": { - "name": "array_allocation_size_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "125:41:2" - }, - "nodeType": "YulFunctionCall", - "src": "125:49:2" - } - ], - "functionName": { - "name": "allocateMemory", - "nodeType": "YulIdentifier", - "src": "110:14:2" - }, - "nodeType": "YulFunctionCall", - "src": "110:65:2" - }, - "variableNames": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "101:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "191:5:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "198:6:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "184:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "184:21:2" - }, - "nodeType": "YulExpressionStatement", - "src": "184:21:2" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "214:27:2", - "value": { - "arguments": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "229:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "236:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "225:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "225:16:2" - }, - "variables": [ - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "218:3:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "279:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "288:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "291:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "281:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "281:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "281:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "260:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "265:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "256:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "256:16:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "274:3:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "253:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "253:25:2" - }, - "nodeType": "YulIf", - "src": "250:2:2" - }, - { - "expression": { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "328:3:2" - }, - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "333:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "338:6:2" - } - ], - "functionName": { - "name": "copy_calldata_to_memory", - "nodeType": "YulIdentifier", - "src": "304:23:2" - }, - "nodeType": "YulFunctionCall", - "src": "304:41:2" - }, - "nodeType": "YulExpressionStatement", - "src": "304:41:2" - } - ] - }, - "name": "abi_decode_available_length_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "64:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "69:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "77:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "array", - "nodeType": "YulTypedName", - "src": "85:5:2", - "type": "" - } - ], - "src": "7:344:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "433:211:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "482:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "491:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "494:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "484:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "484:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "484:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "461:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "469:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "457:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "457:17:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "476:3:2" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "453:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "453:27:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "446:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "446:35:2" - }, - "nodeType": "YulIf", - "src": "443:2:2" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "507:34:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "534:6:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "521:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "521:20:2" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "511:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "550:88:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "611:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "619:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "607:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "607:17:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "626:6:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "634:3:2" - } - ], - "functionName": { - "name": "abi_decode_available_length_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "559:47:2" - }, - "nodeType": "YulFunctionCall", - "src": "559:79:2" - }, - "variableNames": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "550:5:2" - } - ] - } - ] - }, - "name": "abi_decode_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "411:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "419:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "array", - "nodeType": "YulTypedName", - "src": "427:5:2", - "type": "" - } - ], - "src": "371:273:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "702:87:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "712:29:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "734:6:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "721:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "721:20:2" - }, - "variableNames": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "712:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "777:5:2" - } - ], - "functionName": { - "name": "validator_revert_t_uint256", - "nodeType": "YulIdentifier", - "src": "750:26:2" - }, - "nodeType": "YulFunctionCall", - "src": "750:33:2" - }, - "nodeType": "YulExpressionStatement", - "src": "750:33:2" - } - ] - }, - "name": "abi_decode_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "680:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "688:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "696:5:2", - "type": "" - } - ], - "src": "650:139:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "871:299:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "917:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "926:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "929:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "919:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "919:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "919:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "892:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "901:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "888:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "888:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "913:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "884:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "884:32:2" - }, - "nodeType": "YulIf", - "src": "881:2:2" - }, - { - "nodeType": "YulBlock", - "src": "943:220:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "958:45:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "989:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1000:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "985:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "985:17:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "972:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "972:31:2" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "962:6:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1050:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1059:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1062:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1052:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1052:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1052:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1022:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1030:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "1019:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "1019:30:2" - }, - "nodeType": "YulIf", - "src": "1016:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "1080:73:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1125:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1136:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1121:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1121:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1145:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "1090:30:2" - }, - "nodeType": "YulFunctionCall", - "src": "1090:63:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1080:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "841:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "852:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "864:6:2", - "type": "" - } - ], - "src": "795:375:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1242:196:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "1288:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1297:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1300:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1290:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1290:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1290:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1263:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1272:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "1259:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1259:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1284:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "1255:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1255:32:2" - }, - "nodeType": "YulIf", - "src": "1252:2:2" - }, - { - "nodeType": "YulBlock", - "src": "1314:117:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1329:15:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1343:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1333:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1358:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1393:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1404:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1389:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1389:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1413:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_uint256", - "nodeType": "YulIdentifier", - "src": "1368:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "1368:53:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1358:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "1212:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "1223:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "1235:6:2", - "type": "" - } - ], - "src": "1176:262:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1536:272:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1546:53:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "1593:5:2" - } - ], - "functionName": { - "name": "array_length_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "1560:32:2" - }, - "nodeType": "YulFunctionCall", - "src": "1560:39:2" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "1550:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1608:78:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1674:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1679:6:2" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "1615:58:2" - }, - "nodeType": "YulFunctionCall", - "src": "1615:71:2" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1608:3:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "1721:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1728:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1717:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1717:16:2" - }, - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1735:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1740:6:2" - } - ], - "functionName": { - "name": "copy_memory_to_memory", - "nodeType": "YulIdentifier", - "src": "1695:21:2" - }, - "nodeType": "YulFunctionCall", - "src": "1695:52:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1695:52:2" - }, - { - "nodeType": "YulAssignment", - "src": "1756:46:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1767:3:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1794:6:2" - } - ], - "functionName": { - "name": "round_up_to_mul_of_32", - "nodeType": "YulIdentifier", - "src": "1772:21:2" - }, - "nodeType": "YulFunctionCall", - "src": "1772:29:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1763:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1763:39:2" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "1756:3:2" - } - ] - } - ] - }, - "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "1517:5:2", - "type": "" - }, - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "1524:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "1532:3:2", - "type": "" - } - ], - "src": "1444:364:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1960:179:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1970:74:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2036:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2041:2:2", - "type": "", - "value": "27" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "1977:58:2" - }, - "nodeType": "YulFunctionCall", - "src": "1977:67:2" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1970:3:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2065:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2070:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2061:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2061:11:2" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "2074:29:2", - "type": "", - "value": "Value must be diferent of 0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2054:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2054:50:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2054:50:2" - }, - { - "nodeType": "YulAssignment", - "src": "2114:19:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2125:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2130:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2121:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2121:12:2" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "2114:3:2" - } - ] - } - ] - }, - "name": "abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "1948:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "1956:3:2", - "type": "" - } - ], - "src": "1814:325:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2263:195:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2273:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2285:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2296:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2281:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2281:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2273:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2320:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2331:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2316:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2316:17:2" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2339:4:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2345:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "2335:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2335:20:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2309:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2309:47:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2309:47:2" - }, - { - "nodeType": "YulAssignment", - "src": "2365:86:2", - "value": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "2437:6:2" - }, - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2446:4:2" - } - ], - "functionName": { - "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2373:63:2" - }, - "nodeType": "YulFunctionCall", - "src": "2373:78:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2365:4:2" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "2235:9:2", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "2247:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "2258:4:2", - "type": "" - } - ], - "src": "2145:313:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2635:248:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2645:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2657:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2668:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2653:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2653:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2645:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2692:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2703:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2688:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2688:17:2" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2711:4:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2717:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "2707:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2707:20:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2681:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2681:47:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2681:47:2" - }, - { - "nodeType": "YulAssignment", - "src": "2737:139:2", - "value": { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2871:4:2" - } - ], - "functionName": { - "name": "abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2745:124:2" - }, - "nodeType": "YulFunctionCall", - "src": "2745:131:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2737:4:2" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "2615:9:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "2630:4:2", - "type": "" - } - ], - "src": "2464:419:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2929:243:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2939:19:2", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2955:2:2", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "2949:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "2949:9:2" - }, - "variableNames": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "2939:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "2967:35:2", - "value": { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "2989:6:2" - }, - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "2997:4:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2985:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2985:17:2" - }, - "variables": [ - { - "name": "newFreePtr", - "nodeType": "YulTypedName", - "src": "2971:10:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3113:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x41", - "nodeType": "YulIdentifier", - "src": "3115:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "3115:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3115:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "3056:10:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3068:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "3053:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3053:34:2" - }, - { - "arguments": [ - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "3092:10:2" - }, - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "3104:6:2" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "3089:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3089:22:2" - } - ], - "functionName": { - "name": "or", - "nodeType": "YulIdentifier", - "src": "3050:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3050:62:2" - }, - "nodeType": "YulIf", - "src": "3047:2:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3151:2:2", - "type": "", - "value": "64" - }, - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "3155:10:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3144:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3144:22:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3144:22:2" - } - ] - }, - "name": "allocateMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "size", - "nodeType": "YulTypedName", - "src": "2913:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "memPtr", - "nodeType": "YulTypedName", - "src": "2922:6:2", - "type": "" - } - ], - "src": "2889:283:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3245:265:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "3350:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x41", - "nodeType": "YulIdentifier", - "src": "3352:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "3352:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3352:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3322:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3330:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "3319:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3319:30:2" - }, - "nodeType": "YulIf", - "src": "3316:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "3402:41:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3418:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3426:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3414:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3414:17:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3437:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "3433:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3433:9:2" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "3410:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3410:33:2" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "3402:4:2" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "3480:23:2", - "value": { - "arguments": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "3492:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3498:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3488:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3488:15:2" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "3480:4:2" - } - ] - } - ] - }, - "name": "array_allocation_size_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3229:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "size", - "nodeType": "YulTypedName", - "src": "3240:4:2", - "type": "" - } - ], - "src": "3178:332:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3575:40:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3586:22:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3602:5:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "3596:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "3596:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3586:6:2" - } - ] - } - ] - }, - "name": "array_length_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "3558:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3568:6:2", - "type": "" - } - ], - "src": "3516:99:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3717:73:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3734:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3739:6:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3727:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3727:19:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3727:19:2" - }, - { - "nodeType": "YulAssignment", - "src": "3755:29:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3774:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3779:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3770:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3770:14:2" - }, - "variableNames": [ - { - "name": "updated_pos", - "nodeType": "YulIdentifier", - "src": "3755:11:2" - } - ] - } - ] - }, - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "3689:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3694:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "updated_pos", - "nodeType": "YulTypedName", - "src": "3705:11:2", - "type": "" - } - ], - "src": "3621:169:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3840:261:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3850:25:2", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "3873:1:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "3855:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "3855:20:2" - }, - "variableNames": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "3850:1:2" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "3884:25:2", - "value": { - "arguments": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "3907:1:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "3889:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "3889:20:2" - }, - "variableNames": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "3884:1:2" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4047:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x11", - "nodeType": "YulIdentifier", - "src": "4049:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "4049:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4049:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "3968:1:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3975:66:2", - "type": "", - "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "4043:1:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "3971:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3971:74:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "3965:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3965:81:2" - }, - "nodeType": "YulIf", - "src": "3962:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "4079:16:2", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "4090:1:2" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "4093:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4086:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4086:9:2" - }, - "variableNames": [ - { - "name": "sum", - "nodeType": "YulIdentifier", - "src": "4079:3:2" - } - ] - } - ] - }, - "name": "checked_add_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "x", - "nodeType": "YulTypedName", - "src": "3827:1:2", - "type": "" - }, - { - "name": "y", - "nodeType": "YulTypedName", - "src": "3830:1:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "sum", - "nodeType": "YulTypedName", - "src": "3836:3:2", - "type": "" - } - ], - "src": "3796:305:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4152:32:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4162:16:2", - "value": { - "name": "value", - "nodeType": "YulIdentifier", - "src": "4173:5:2" - }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "4162:7:2" - } - ] - } - ] - }, - "name": "cleanup_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "4134:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "4144:7:2", - "type": "" - } - ], - "src": "4107:77:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4241:103:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4264:3:2" - }, - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "4269:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4274:6:2" - } - ], - "functionName": { - "name": "calldatacopy", - "nodeType": "YulIdentifier", - "src": "4251:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "4251:30:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4251:30:2" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4322:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4327:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4318:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4318:16:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4336:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4311:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4311:27:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4311:27:2" - } - ] - }, - "name": "copy_calldata_to_memory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "4223:3:2", - "type": "" - }, - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "4228:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "4233:6:2", - "type": "" - } - ], - "src": "4190:154:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4399:258:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "4409:10:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4418:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "i", - "nodeType": "YulTypedName", - "src": "4413:1:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4478:63:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4503:3:2" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4508:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4499:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4499:11:2" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "4522:3:2" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4527:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4518:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4518:11:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "4512:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "4512:18:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4492:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4492:39:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4492:39:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4439:1:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4442:6:2" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "4436:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4436:13:2" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "4450:19:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4452:15:2", - "value": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4461:1:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4464:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4457:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4457:10:2" - }, - "variableNames": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4452:1:2" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "4432:3:2", - "statements": [] - }, - "src": "4428:113:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4575:76:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4625:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4630:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4621:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4621:16:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4639:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4614:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4614:27:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4614:27:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4556:1:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4559:6:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "4553:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4553:13:2" - }, - "nodeType": "YulIf", - "src": "4550:2:2" - } - ] - }, - "name": "copy_memory_to_memory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "4381:3:2", - "type": "" - }, - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "4386:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "4391:6:2", - "type": "" - } - ], - "src": "4350:307:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4714:269:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4724:22:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "4738:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4744:1:2", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "4734:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4734:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4724:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "4755:38:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "4785:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4791:1:2", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "4781:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4781:12:2" - }, - "variables": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulTypedName", - "src": "4759:18:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4832:51:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4846:27:2", - "value": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4860:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4868:4:2", - "type": "", - "value": "0x7f" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "4856:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4856:17:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4846:6:2" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "4812:18:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "4805:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4805:26:2" - }, - "nodeType": "YulIf", - "src": "4802:2:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4935:42:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x22", - "nodeType": "YulIdentifier", - "src": "4949:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "4949:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4949:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "4899:18:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4922:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4930:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "4919:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4919:14:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "4896:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4896:38:2" - }, - "nodeType": "YulIf", - "src": "4893:2:2" - } - ] - }, - "name": "extract_byte_array_length", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "data", - "nodeType": "YulTypedName", - "src": "4698:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "4707:6:2", - "type": "" - } - ], - "src": "4663:320:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5017:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5034:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5037:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5027:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5027:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5027:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5131:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5134:4:2", - "type": "", - "value": "0x11" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5124:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5124:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5124:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5155:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5158:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5148:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5148:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5148:15:2" - } - ] - }, - "name": "panic_error_0x11", - "nodeType": "YulFunctionDefinition", - "src": "4989:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5203:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5220:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5223:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5213:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5213:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5213:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5317:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5320:4:2", - "type": "", - "value": "0x22" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5310:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5310:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5310:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5341:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5344:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5334:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5334:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5334:15:2" - } - ] - }, - "name": "panic_error_0x22", - "nodeType": "YulFunctionDefinition", - "src": "5175:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5389:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5406:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5409:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5399:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5399:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5399:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5503:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5506:4:2", - "type": "", - "value": "0x41" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5496:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5496:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5496:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5527:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5530:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5520:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5520:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5520:15:2" - } - ] - }, - "name": "panic_error_0x41", - "nodeType": "YulFunctionDefinition", - "src": "5361:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5595:54:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5605:38:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "5623:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5630:2:2", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5619:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5619:14:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5639:2:2", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "5635:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5635:7:2" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "5615:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5615:28:2" - }, - "variableNames": [ - { - "name": "result", - "nodeType": "YulIdentifier", - "src": "5605:6:2" - } - ] - } - ] - }, - "name": "round_up_to_mul_of_32", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "5578:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "result", - "nodeType": "YulTypedName", - "src": "5588:6:2", - "type": "" - } - ], - "src": "5547:102:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5698:79:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "5755:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5764:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5767:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5757:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5757:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5757:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "5721:5:2" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "5746:5:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "5728:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "5728:24:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "5718:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "5718:35:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "5711:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5711:43:2" - }, - "nodeType": "YulIf", - "src": "5708:2:2" - } - ] - }, - "name": "validator_revert_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "5691:5:2", - "type": "" - } - ], - "src": "5655:122:2" - } - ] - }, - "contents": "{\n\n function abi_decode_available_length_t_string_memory_ptr(src, length, end) -> array {\n array := allocateMemory(array_allocation_size_t_string_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert(0, 0) }\n copy_calldata_to_memory(src, dst, length)\n }\n\n // string\n function abi_decode_t_string_memory_ptr(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n let length := calldataload(offset)\n array := abi_decode_available_length_t_string_memory_ptr(add(offset, 0x20), length, end)\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_string_memory_ptr(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := calldataload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n\n value0 := abi_decode_t_string_memory_ptr(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 27)\n\n mstore(add(pos, 0), \"Value must be diferent of 0\")\n\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function allocateMemory(size) -> memPtr {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, size)\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function array_allocation_size_t_string_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n // round up\n size := and(add(length, 0x1f), not(0x1f))\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function copy_calldata_to_memory(src, dst, length) {\n calldatacopy(dst, src, length)\n // clear end\n mstore(add(dst, length), 0)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n", - "id": 2, - "language": "Yul", - "name": "#utility.yul" - } - ], - "sourceMap": "439:671:0:-:0;;;463:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;439:671;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:320:2:-;;88:1;82:4;78:12;68:22;;135:1;129:4;125:12;156:18;146:2;;212:4;204:6;200:17;190:27;;146:2;274;266:6;263:14;243:18;240:38;237:2;;;293:18;;:::i;:::-;237:2;58:269;;;;:::o;333:180::-;381:77;378:1;371:88;478:4;475:1;468:15;502:4;499:1;492:15;439:671:0;;;;;;;", - "deployedSourceMap": "439:671:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;666:81;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;751:109;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;864:103;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;971:137;;;:::i;:::-;;573:89;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;666:81;706:13;738:4;731:11;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;666:81;:::o;751:109::-;811:13;843:5;849;843:12;;;;;;;;;;;;;;;;;;;;;;;836:19;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;751:109;;;:::o;864:103::-;928:7;921:4;:14;;;;;;;;;;;;:::i;:::-;;943:5;954:7;943:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;864:103;:::o;971:137::-;1031:1;1019:9;:13;1011:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;1094:9;1070:8;:20;1079:10;1070:20;;;;;;;;;;;;;;;;:33;;;;;;;:::i;:::-;;;;;;;;971:137::o;573:89::-;615:13;636:21;;;;;;;;;;;;;;;;;;;573:89;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:344:2:-;;110:65;125:49;167:6;125:49;:::i;:::-;110:65;:::i;:::-;101:74;;198:6;191:5;184:21;236:4;229:5;225:16;274:3;265:6;260:3;256:16;253:25;250:2;;;291:1;288;281:12;250:2;304:41;338:6;333:3;328;304:41;:::i;:::-;91:260;;;;;;:::o;371:273::-;;476:3;469:4;461:6;457:17;453:27;443:2;;494:1;491;484:12;443:2;534:6;521:20;559:79;634:3;626:6;619:4;611:6;607:17;559:79;:::i;:::-;550:88;;433:211;;;;;:::o;650:139::-;;734:6;721:20;712:29;;750:33;777:5;750:33;:::i;:::-;702:87;;;;:::o;795:375::-;;913:2;901:9;892:7;888:23;884:32;881:2;;;929:1;926;919:12;881:2;1000:1;989:9;985:17;972:31;1030:18;1022:6;1019:30;1016:2;;;1062:1;1059;1052:12;1016:2;1090:63;1145:7;1136:6;1125:9;1121:22;1090:63;:::i;:::-;1080:73;;943:220;871:299;;;;:::o;1176:262::-;;1284:2;1272:9;1263:7;1259:23;1255:32;1252:2;;;1300:1;1297;1290:12;1252:2;1343:1;1368:53;1413:7;1404:6;1393:9;1389:22;1368:53;:::i;:::-;1358:63;;1314:117;1242:196;;;;:::o;1444:364::-;;1560:39;1593:5;1560:39;:::i;:::-;1615:71;1679:6;1674:3;1615:71;:::i;:::-;1608:78;;1695:52;1740:6;1735:3;1728:4;1721:5;1717:16;1695:52;:::i;:::-;1772:29;1794:6;1772:29;:::i;:::-;1767:3;1763:39;1756:46;;1536:272;;;;;:::o;1814:325::-;;1977:67;2041:2;2036:3;1977:67;:::i;:::-;1970:74;;2074:29;2070:1;2065:3;2061:11;2054:50;2130:2;2125:3;2121:12;2114:19;;1960:179;;;:::o;2145:313::-;;2296:2;2285:9;2281:18;2273:26;;2345:9;2339:4;2335:20;2331:1;2320:9;2316:17;2309:47;2373:78;2446:4;2437:6;2373:78;:::i;:::-;2365:86;;2263:195;;;;:::o;2464:419::-;;2668:2;2657:9;2653:18;2645:26;;2717:9;2711:4;2707:20;2703:1;2692:9;2688:17;2681:47;2745:131;2871:4;2745:131;:::i;:::-;2737:139;;2635:248;;;:::o;2889:283::-;;2955:2;2949:9;2939:19;;2997:4;2989:6;2985:17;3104:6;3092:10;3089:22;3068:18;3056:10;3053:34;3050:62;3047:2;;;3115:18;;:::i;:::-;3047:2;3155:10;3151:2;3144:22;2929:243;;;;:::o;3178:332::-;;3330:18;3322:6;3319:30;3316:2;;;3352:18;;:::i;:::-;3316:2;3437:4;3433:9;3426:4;3418:6;3414:17;3410:33;3402:41;;3498:4;3492;3488:15;3480:23;;3245:265;;;:::o;3516:99::-;;3602:5;3596:12;3586:22;;3575:40;;;:::o;3621:169::-;;3739:6;3734:3;3727:19;3779:4;3774:3;3770:14;3755:29;;3717:73;;;;:::o;3796:305::-;;3855:20;3873:1;3855:20;:::i;:::-;3850:25;;3889:20;3907:1;3889:20;:::i;:::-;3884:25;;4043:1;3975:66;3971:74;3968:1;3965:81;3962:2;;;4049:18;;:::i;:::-;3962:2;4093:1;4090;4086:9;4079:16;;3840:261;;;;:::o;4107:77::-;;4173:5;4162:16;;4152:32;;;:::o;4190:154::-;4274:6;4269:3;4264;4251:30;4336:1;4327:6;4322:3;4318:16;4311:27;4241:103;;;:::o;4350:307::-;4418:1;4428:113;4442:6;4439:1;4436:13;4428:113;;;4527:1;4522:3;4518:11;4512:18;4508:1;4503:3;4499:11;4492:39;4464:2;4461:1;4457:10;4452:15;;4428:113;;;4559:6;4556:1;4553:13;4550:2;;;4639:1;4630:6;4625:3;4621:16;4614:27;4550:2;4399:258;;;;:::o;4663:320::-;;4744:1;4738:4;4734:12;4724:22;;4791:1;4785:4;4781:12;4812:18;4802:2;;4868:4;4860:6;4856:17;4846:27;;4802:2;4930;4922:6;4919:14;4899:18;4896:38;4893:2;;;4949:18;;:::i;:::-;4893:2;4714:269;;;;:::o;4989:180::-;5037:77;5034:1;5027:88;5134:4;5131:1;5124:15;5158:4;5155:1;5148:15;5175:180;5223:77;5220:1;5213:88;5320:4;5317:1;5310:15;5344:4;5341:1;5334:15;5361:180;5409:77;5406:1;5399:88;5506:4;5503:1;5496:15;5530:4;5527:1;5520:15;5547:102;;5639:2;5635:7;5630:2;5623:5;5619:14;5615:28;5605:38;;5595:54;;;:::o;5655:122::-;5728:24;5746:5;5728:24;:::i;:::-;5721:5;5718:35;5708:2;;5767:1;5764;5757:12;5708:2;5698:79;:::o", - "source": "// *****************************************************************************\n// IMPORTANT: If you update this code then make sure to recompile\n// it and update the .json file as well so that they\n// remain in sync for consistent test executions.\n// With that said, there shouldn't be any reason to recompile this, like ever...\n// *****************************************************************************\n\npragma solidity >=0.7.0;\n\ncontract HelloWorld {\n string private name = \"CaptainCactus\";\n mapping (address => uint256) deposits;\n string[] private names; \n\n function sayHello () public pure returns (string memory) {\n return 'Hello World!';\n }\n\n function getName() public view returns (string memory)\n {\n return name;\n }\n\n function getNameByIndex(uint256 index) public view returns (string memory)\n {\n return names[index];\n }\n\n function setName(string memory newName) public\n {\n name = newName;\n names.push(newName);\n }\n\n function deposit() public payable {\n require(msg.value > 0, \"Value must be diferent of 0\");\n deposits[msg.sender] += msg.value;\n }\n}\n", - "sourcePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", - "ast": { - "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", - "exportedSymbols": { - "HelloWorld": [ - 76 - ] - }, - "id": 77, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 76, - "linearizedBaseContracts": [ - 76 - ], - "name": "HelloWorld", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "463:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "463:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "hexValue": "4361707461696e436163747573", - "id": 3, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:15:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", - "typeString": "literal_string \"CaptainCactus\"" - }, - "value": "CaptainCactus" - }, - "visibility": "private" - }, - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "deposits", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "504:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7, - "keyType": { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "513:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "504:28:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "524:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "names", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "545:22:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "545:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 10, - "nodeType": "ArrayTypeName", - "src": "545:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "visibility": "private" - }, - { - "body": { - "id": 18, - "nodeType": "Block", - "src": "630:32:0", - "statements": [ - { - "expression": { - "hexValue": "48656c6c6f20576f726c6421", - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "643:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", - "typeString": "literal_string \"Hello World!\"" - }, - "value": "Hello World!" - }, - "functionReturnParameters": 15, - "id": 17, - "nodeType": "Return", - "src": "636:21:0" - } - ] - }, - "functionSelector": "ef5fb05b", - "id": 19, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sayHello", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12, - "nodeType": "ParameterList", - "parameters": [], - "src": "591:2:0" - }, - "returnParameters": { - "id": 15, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19, - "src": "615:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "615:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "614:15:0" - }, - "scope": 76, - "src": "573:89:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 26, - "nodeType": "Block", - "src": "723:24:0", - "statements": [ - { - "expression": { - "id": 24, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "738:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 23, - "id": 25, - "nodeType": "Return", - "src": "731:11:0" - } - ] - }, - "functionSelector": "17d7de7c", - "id": 27, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 20, - "nodeType": "ParameterList", - "parameters": [], - "src": "682:2:0" - }, - "returnParameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "706:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "706:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "705:15:0" - }, - "scope": 76, - "src": "666:81:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 38, - "nodeType": "Block", - "src": "828:32:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 34, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "843:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 36, - "indexExpression": { - "id": 35, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "849:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "843:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 33, - "id": 37, - "nodeType": "Return", - "src": "836:19:0" - } - ] - }, - "functionSelector": "59c293f1", - "id": 39, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNameByIndex", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 30, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "775:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "775:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "774:15:0" - }, - "returnParameters": { - "id": 33, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "811:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "811:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "810:15:0" - }, - "scope": 76, - "src": "751:109:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "913:54:0", - "statements": [ - { - "expression": { - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 44, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "921:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 45, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "928:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "921:14:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 47, - "nodeType": "ExpressionStatement", - "src": "921:14:0" - }, - { - "expression": { - "arguments": [ - { - "id": 51, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "954:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "id": 48, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "943:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "src": "943:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", - "typeString": "function (string storage ref)" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "943:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 53, - "nodeType": "ExpressionStatement", - "src": "943:19:0" - } - ] - }, - "functionSelector": "c47f0027", - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 42, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 41, - "mutability": "mutable", - "name": "newName", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "881:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 40, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "881:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "880:23:0" - }, - "returnParameters": { - "id": 43, - "nodeType": "ParameterList", - "parameters": [], - "src": "913:0:0" - }, - "scope": 76, - "src": "864:103:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 74, - "nodeType": "Block", - "src": "1005:103:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 59, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1019:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1019:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 61, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1031:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1019:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "56616c7565206d757374206265206469666572656e74206f662030", - "id": 63, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1034:29:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - }, - "value": "Value must be diferent of 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - } - ], - "id": 58, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1011:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1011:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "1011:53:0" - }, - { - "expression": { - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 66, - "name": "deposits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "1070:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 69, - "indexExpression": { - "expression": { - "id": 67, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1079:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1079:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1070:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "expression": { - "id": 70, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1094:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1094:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1070:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 73, - "nodeType": "ExpressionStatement", - "src": "1070:33:0" - } - ] - }, - "functionSelector": "d0e30db0", - "id": 75, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [], - "src": "987:2:0" - }, - "returnParameters": { - "id": 57, - "nodeType": "ParameterList", - "parameters": [], - "src": "1005:0:0" - }, - "scope": 76, - "src": "971:137:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 77, - "src": "439:671:0" - } - ], - "src": "413:698:0" - }, - "legacyAST": { - "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", - "exportedSymbols": { - "HelloWorld": [ - 76 - ] - }, - "id": 77, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 76, - "linearizedBaseContracts": [ - 76 - ], - "name": "HelloWorld", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "463:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "463:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "hexValue": "4361707461696e436163747573", - "id": 3, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:15:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", - "typeString": "literal_string \"CaptainCactus\"" - }, - "value": "CaptainCactus" - }, - "visibility": "private" - }, - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "deposits", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "504:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7, - "keyType": { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "513:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "504:28:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "524:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "names", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "545:22:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "545:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 10, - "nodeType": "ArrayTypeName", - "src": "545:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "visibility": "private" - }, - { - "body": { - "id": 18, - "nodeType": "Block", - "src": "630:32:0", - "statements": [ - { - "expression": { - "hexValue": "48656c6c6f20576f726c6421", - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "643:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", - "typeString": "literal_string \"Hello World!\"" - }, - "value": "Hello World!" - }, - "functionReturnParameters": 15, - "id": 17, - "nodeType": "Return", - "src": "636:21:0" - } - ] - }, - "functionSelector": "ef5fb05b", - "id": 19, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sayHello", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12, - "nodeType": "ParameterList", - "parameters": [], - "src": "591:2:0" - }, - "returnParameters": { - "id": 15, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19, - "src": "615:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "615:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "614:15:0" - }, - "scope": 76, - "src": "573:89:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 26, - "nodeType": "Block", - "src": "723:24:0", - "statements": [ - { - "expression": { - "id": 24, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "738:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 23, - "id": 25, - "nodeType": "Return", - "src": "731:11:0" - } - ] - }, - "functionSelector": "17d7de7c", - "id": 27, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 20, - "nodeType": "ParameterList", - "parameters": [], - "src": "682:2:0" - }, - "returnParameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "706:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "706:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "705:15:0" - }, - "scope": 76, - "src": "666:81:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 38, - "nodeType": "Block", - "src": "828:32:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 34, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "843:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 36, - "indexExpression": { - "id": 35, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "849:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "843:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 33, - "id": 37, - "nodeType": "Return", - "src": "836:19:0" - } - ] - }, - "functionSelector": "59c293f1", - "id": 39, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNameByIndex", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 30, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "775:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "775:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "774:15:0" - }, - "returnParameters": { - "id": 33, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "811:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "811:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "810:15:0" - }, - "scope": 76, - "src": "751:109:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "913:54:0", - "statements": [ - { - "expression": { - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 44, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "921:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 45, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "928:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "921:14:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 47, - "nodeType": "ExpressionStatement", - "src": "921:14:0" - }, - { - "expression": { - "arguments": [ - { - "id": 51, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "954:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "id": 48, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "943:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "src": "943:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", - "typeString": "function (string storage ref)" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "943:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 53, - "nodeType": "ExpressionStatement", - "src": "943:19:0" - } - ] - }, - "functionSelector": "c47f0027", - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 42, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 41, - "mutability": "mutable", - "name": "newName", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "881:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 40, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "881:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "880:23:0" - }, - "returnParameters": { - "id": 43, - "nodeType": "ParameterList", - "parameters": [], - "src": "913:0:0" - }, - "scope": 76, - "src": "864:103:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 74, - "nodeType": "Block", - "src": "1005:103:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 59, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1019:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1019:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 61, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1031:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1019:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "56616c7565206d757374206265206469666572656e74206f662030", - "id": 63, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1034:29:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - }, - "value": "Value must be diferent of 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - } - ], - "id": 58, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1011:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1011:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "1011:53:0" - }, - { - "expression": { - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 66, - "name": "deposits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "1070:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 69, - "indexExpression": { - "expression": { - "id": 67, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1079:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1079:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1070:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "expression": { - "id": 70, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1094:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1094:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1070:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 73, - "nodeType": "ExpressionStatement", - "src": "1070:33:0" - } - ] - }, - "functionSelector": "d0e30db0", - "id": 75, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [], - "src": "987:2:0" - }, - "returnParameters": { - "id": 57, - "nodeType": "ParameterList", - "parameters": [], - "src": "1005:0:0" - }, - "scope": 76, - "src": "971:137:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 77, - "src": "439:671:0" - } - ], - "src": "413:698:0" - }, - "compiler": { - "name": "solc", - "version": "0.8.0+commit.c7dfd78e.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.3", - "updatedAt": "2021-02-12T11:15:58.676Z", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol b/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol deleted file mode 100644 index 30bc8f7134..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol +++ /dev/null @@ -1,40 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; - -contract HelloWorld { - string private name = "CaptainCactus"; - mapping (address => uint256) deposits; - string[] private names; - - function sayHello () public pure returns (string memory) { - return 'Hello World!'; - } - - function getName() public view returns (string memory) - { - return name; - } - - function getNameByIndex(uint256 index) public view returns (string memory) - { - return names[index]; - } - - function setName(string memory newName) public - { - name = newName; - names.push(newName); - } - - function deposit() public payable { - require(msg.value > 0, "Value must be diferent of 0"); - deposits[msg.sender] += msg.value; - } - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/LockAsset.json b/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/LockAsset.json deleted file mode 100644 index 8d4ba2c7f8..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/LockAsset.json +++ /dev/null @@ -1,2007 +0,0 @@ -{ - "contractName": "LockAsset", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "name": "createAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "deleteAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "getAsset", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "creator", - "type": "address" - }, - { - "internalType": "bool", - "name": "isLock", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "internalType": "struct Asset", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "lockAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "unLockAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"createAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAsset\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isLock\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"internalType\":\"struct Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jasonwang/cactus-satp-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol\":\"LockAsset\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jasonwang/cactus-satp-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol\":{\"keccak256\":\"0x878fc27f22785593c1b35005ecf333e1f93e6dcf932b3d6e2b24d6be790b996a\",\"urls\":[\"bzz-raw://d8be1567f5e11fb718d8849f4dc9b8a8e467135ecd04c5f796c938b7363daaf2\",\"dweb:/ipfs/QmQuteuiTygZxjDnLiq3GNgJNFmPSRqbE2Q9vm85WgVbox\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b50610475806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80635e82d0a61461005c578063cd5286d014610071578063db9cc410146100b5578063def60e0d146100c8578063e24aa37c146100db575b600080fd5b61006f61006a3660046103a1565b6100ee565b005b61008461007f3660046103a1565b610164565b6040805182516001600160a01b03168152602080840151151590820152918101519082015260600160405180910390f35b61006f6100c33660046103e3565b6101dc565b61006f6100d63660046103a1565b610266565b61006f6100e93660046103a1565b6102ad565b6000806000848460405161010392919061042f565b9081526020016040518091039020600101541190508061012257600080fd5b60016000848460405161013692919061042f565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60408051606081018252600080825260208201819052918101919091526000838360405161019392919061042f565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116101e957600080fd5b80600084846040516101fc92919061042f565b908152602001604051809103902060010181905550336000848460405161022492919061042f565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b0319909316929092179091556000908190610136908690869061042f565b6000806000848460405161027b92919061042f565b9081526020016040518091039020600101541190508061029a57600080fd5b600080848460405161013692919061042f565b600080600084846040516102c292919061042f565b908152602001604051809103902060010154119050806102e157600080fd5b60008084846040516102f492919061042f565b9081526040519081900360200190205460ff600160a01b9091041690508061031b57600080fd5b6000848460405161032d92919061042f565b90815260405190819003602001902080546001600160a81b0319168155600060019091015550505050565b60008083601f84011261036a57600080fd5b50813567ffffffffffffffff81111561038257600080fd5b60208301915083602082850101111561039a57600080fd5b9250929050565b600080602083850312156103b457600080fd5b823567ffffffffffffffff8111156103cb57600080fd5b6103d785828601610358565b90969095509350505050565b6000806000604084860312156103f857600080fd5b833567ffffffffffffffff81111561040f57600080fd5b61041b86828701610358565b909790965060209590950135949350505050565b818382376000910190815291905056fea26469706673582212203e656ee2af105d66466451b5ca09a2a5780b62c439dd43befb63a10687d2423b64736f6c63430008070033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100575760003560e01c80635e82d0a61461005c578063cd5286d014610071578063db9cc410146100b5578063def60e0d146100c8578063e24aa37c146100db575b600080fd5b61006f61006a3660046103a1565b6100ee565b005b61008461007f3660046103a1565b610164565b6040805182516001600160a01b03168152602080840151151590820152918101519082015260600160405180910390f35b61006f6100c33660046103e3565b6101dc565b61006f6100d63660046103a1565b610266565b61006f6100e93660046103a1565b6102ad565b6000806000848460405161010392919061042f565b9081526020016040518091039020600101541190508061012257600080fd5b60016000848460405161013692919061042f565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60408051606081018252600080825260208201819052918101919091526000838360405161019392919061042f565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116101e957600080fd5b80600084846040516101fc92919061042f565b908152602001604051809103902060010181905550336000848460405161022492919061042f565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b0319909316929092179091556000908190610136908690869061042f565b6000806000848460405161027b92919061042f565b9081526020016040518091039020600101541190508061029a57600080fd5b600080848460405161013692919061042f565b600080600084846040516102c292919061042f565b908152602001604051809103902060010154119050806102e157600080fd5b60008084846040516102f492919061042f565b9081526040519081900360200190205460ff600160a01b9091041690508061031b57600080fd5b6000848460405161032d92919061042f565b90815260405190819003602001902080546001600160a81b0319168155600060019091015550505050565b60008083601f84011261036a57600080fd5b50813567ffffffffffffffff81111561038257600080fd5b60208301915083602082850101111561039a57600080fd5b9250929050565b600080602083850312156103b457600080fd5b823567ffffffffffffffff8111156103cb57600080fd5b6103d785828601610358565b90969095509350505050565b6000806000604084860312156103f857600080fd5b833567ffffffffffffffff81111561040f57600080fd5b61041b86828701610358565b909790965060209590950135949350505050565b818382376000910190815291905056fea26469706673582212203e656ee2af105d66466451b5ca09a2a5780b62c439dd43befb63a10687d2423b64736f6c63430008070033", - "sourceMap": "543:1053:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "543:1053:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;946:154;;;;;;:::i;:::-;;:::i;:::-;;798:105;;;;;;:::i;:::-;;:::i;:::-;;;;1753:13:1;;-1:-1:-1;;;;;1749:39:1;1731:58;;1859:4;1847:17;;;1841:24;1834:32;1827:40;1805:20;;;1798:70;1912:17;;;1906:24;1884:20;;;1877:54;1719:2;1704:18;798:105:0;;;;;;;607:188;;;;;;:::i;:::-;;:::i;1144:157::-;;;;;;:::i;:::-;;:::i;1304:289::-;;;;;;:::i;:::-;;:::i;946:154::-;999:16;1034:1;1018:6;1025:2;;1018:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;;:17;999:36;;1051:11;1043:20;;;;;;1091:4;1071:6;1078:2;;1071:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:24;;;;;-1:-1:-1;;;1071:24:0;-1:-1:-1;;;;1071:24:0;;;;;;;;;-1:-1:-1;;;946:154:0:o;798:105::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;888:6:0;895:2;;888:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;881:17;;;;;;;-1:-1:-1;;;;;881:17:0;;;;-1:-1:-1;;;881:17:0;;;;;;;;;;;;;;;;;;;;;;888:10;798:105;-1:-1:-1;;;798:105:0:o;607:188::-;687:1;682:4;:6;674:15;;;;;;714:4;697:6;704:2;;697:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;:21;;;;747:10;726:6;733:2;;726:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;;-1:-1:-1;;;;;726:31:0;;;;-1:-1:-1;;;;;;726:31:0;;;;;;;;;;:18;;;;765:10;;772:2;;;;765:10;:::i;1144:157::-;1199:16;1234:1;1218:6;1225:2;;1218:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;;:17;1199:36;;1251:11;1243:20;;;;;;1291:5;1271:6;1278:2;;1271:10;;;;;;;:::i;1304:289::-;1360:16;1395:1;1379:6;1386:2;;1379:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;;:17;1360:36;;1412:11;1404:20;;;;;;1495:18;1516:6;1523:2;;1516:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1516:17:0;;;;;-1:-1:-1;1516:17:0;1541:22;;;;;;1578:6;1585:2;;1578:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;1571:17;;-1:-1:-1;;;;;;1571:17:0;;;1578:10;1571:17;;;;;-1:-1:-1;;;;1304:289:0:o;14:348:1:-;66:8;76:6;130:3;123:4;115:6;111:17;107:27;97:55;;148:1;145;138:12;97:55;-1:-1:-1;171:20:1;;214:18;203:30;;200:50;;;246:1;243;236:12;200:50;283:4;275:6;271:17;259:29;;335:3;328:4;319:6;311;307:19;303:30;300:39;297:59;;;352:1;349;342:12;297:59;14:348;;;;;:::o;367:411::-;438:6;446;499:2;487:9;478:7;474:23;470:32;467:52;;;515:1;512;505:12;467:52;555:9;542:23;588:18;580:6;577:30;574:50;;;620:1;617;610:12;574:50;659:59;710:7;701:6;690:9;686:22;659:59;:::i;:::-;737:8;;633:85;;-1:-1:-1;367:411:1;-1:-1:-1;;;;367:411:1:o;783:479::-;863:6;871;879;932:2;920:9;911:7;907:23;903:32;900:52;;;948:1;945;938:12;900:52;988:9;975:23;1021:18;1013:6;1010:30;1007:50;;;1053:1;1050;1043:12;1007:50;1092:59;1143:7;1134:6;1123:9;1119:22;1092:59;:::i;:::-;1170:8;;1066:85;;-1:-1:-1;1252:2:1;1237:18;;;;1224:32;;783:479;-1:-1:-1;;;;783:479:1:o;1267:273::-;1452:6;1444;1439:3;1426:33;1408:3;1478:16;;1503:13;;;1478:16;1267:273;-1:-1:-1;1267:273:1:o", - "sourcePath": "/Users/jasonwang/cactus-satp-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol", - "compiler": { - "name": "solc", - "version": "0.8.7+commit.e28d00a7" - }, - "ast": { - "absolutePath": "/Users/jasonwang/cactus-satp-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol", - "exportedSymbols": { - "Asset": [ - 8 - ], - "LockAsset": [ - 150 - ] - }, - "id": 151, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "canonicalName": "Asset", - "id": 8, - "members": [ - { - "constant": false, - "id": 3, - "mutability": "mutable", - "name": "creator", - "nameLocation": "464:7:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "456:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "456:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 5, - "mutability": "mutable", - "name": "isLock", - "nameLocation": "482:6:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "477:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "477:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "size", - "nameLocation": "499:4:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "494:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "494:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "name": "Asset", - "nameLocation": "445:5:0", - "nodeType": "StructDefinition", - "scope": 151, - "src": "438:68:0", - "visibility": "public" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 150, - "linearizedBaseContracts": [ - 150 - ], - "name": "LockAsset", - "nameLocation": "552:9:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13, - "mutability": "mutable", - "name": "assets", - "nameLocation": "597:6:0", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "571:32:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string => struct Asset)" - }, - "typeName": { - "id": 12, - "keyType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "580:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "571:25:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string => struct Asset)" - }, - "valueType": { - "id": 11, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 10, - "name": "Asset", - "nodeType": "IdentifierPath", - "referencedDeclaration": 8, - "src": "590:5:0" - }, - "referencedDeclaration": 8, - "src": "590:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", - "typeString": "struct Asset" - } - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 48, - "nodeType": "Block", - "src": "666:129:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 21, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "682:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 22, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "687:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "682:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 20, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "674:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "674:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 25, - "nodeType": "ExpressionStatement", - "src": "674:15:0" - }, - { - "expression": { - "id": 31, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 26, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "697:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 28, - "indexExpression": { - "id": 27, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "704:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "697:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 29, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "697:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 30, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "714:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "697:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 32, - "nodeType": "ExpressionStatement", - "src": "697:21:0" - }, - { - "expression": { - "id": 39, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 33, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "726:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 35, - "indexExpression": { - "id": 34, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "733:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "726:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 36, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "creator", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "726:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "expression": { - "id": 37, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "747:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 38, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "747:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "726:31:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 40, - "nodeType": "ExpressionStatement", - "src": "726:31:0" - }, - { - "expression": { - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 41, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "765:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 43, - "indexExpression": { - "id": 42, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "772:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "765:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 44, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "765:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 45, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "785:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "765:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 47, - "nodeType": "ExpressionStatement", - "src": "765:25:0" - } - ] - }, - "functionSelector": "db9cc410", - "id": 49, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "createAsset", - "nameLocation": "616:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15, - "mutability": "mutable", - "name": "id", - "nameLocation": "645:2:0", - "nodeType": "VariableDeclaration", - "scope": 49, - "src": "629:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "629:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 17, - "mutability": "mutable", - "name": "size", - "nameLocation": "654:4:0", - "nodeType": "VariableDeclaration", - "scope": 49, - "src": "649:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 16, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "649:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "627:32:0" - }, - "returnParameters": { - "id": 19, - "nodeType": "ParameterList", - "parameters": [], - "src": "666:0:0" - }, - "scope": 150, - "src": "607:188:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 61, - "nodeType": "Block", - "src": "873:30:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 57, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "888:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 59, - "indexExpression": { - "id": 58, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51, - "src": "895:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "888:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "functionReturnParameters": 56, - "id": 60, - "nodeType": "Return", - "src": "881:17:0" - } - ] - }, - "functionSelector": "cd5286d0", - "id": 62, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAsset", - "nameLocation": "807:8:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 52, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "id", - "nameLocation": "832:2:0", - "nodeType": "VariableDeclaration", - "scope": 62, - "src": "816:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 50, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "816:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "815:20:0" - }, - "returnParameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 55, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 62, - "src": "857:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_memory_ptr", - "typeString": "struct Asset" - }, - "typeName": { - "id": 54, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 53, - "name": "Asset", - "nodeType": "IdentifierPath", - "referencedDeclaration": 8, - "src": "857:5:0" - }, - "referencedDeclaration": 8, - "src": "857:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", - "typeString": "struct Asset" - } - }, - "visibility": "internal" - } - ], - "src": "856:14:0" - }, - "scope": 150, - "src": "798:105:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 87, - "nodeType": "Block", - "src": "991:109:0", - "statements": [ - { - "assignments": [ - 68 - ], - "declarations": [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "assetExsist", - "nameLocation": "1004:11:0", - "nodeType": "VariableDeclaration", - "scope": 87, - "src": "999:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 67, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "999:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 75, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 74, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 69, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1018:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 71, - "indexExpression": { - "id": 70, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "1025:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1018:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 72, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "1018:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 73, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1034:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1018:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "999:36:0" - }, - { - "expression": { - "arguments": [ - { - "id": 77, - "name": "assetExsist", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "1051:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 76, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1043:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 78, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1043:20:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 79, - "nodeType": "ExpressionStatement", - "src": "1043:20:0" - }, - { - "expression": { - "id": 85, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 80, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1071:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 82, - "indexExpression": { - "id": 81, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "1078:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1071:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 83, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1071:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 84, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1091:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1071:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 86, - "nodeType": "ExpressionStatement", - "src": "1071:24:0" - } - ] - }, - "functionSelector": "5e82d0a6", - "id": 88, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lockAsset", - "nameLocation": "955:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 65, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 64, - "mutability": "mutable", - "name": "id", - "nameLocation": "981:2:0", - "nodeType": "VariableDeclaration", - "scope": 88, - "src": "965:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 63, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "965:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "964:20:0" - }, - "returnParameters": { - "id": 66, - "nodeType": "ParameterList", - "parameters": [], - "src": "991:0:0" - }, - "scope": 150, - "src": "946:154:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 113, - "nodeType": "Block", - "src": "1191:110:0", - "statements": [ - { - "assignments": [ - 94 - ], - "declarations": [ - { - "constant": false, - "id": 94, - "mutability": "mutable", - "name": "assetExsist", - "nameLocation": "1204:11:0", - "nodeType": "VariableDeclaration", - "scope": 113, - "src": "1199:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 93, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1199:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 101, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 95, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1218:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 97, - "indexExpression": { - "id": 96, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1225:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1218:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 98, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "1218:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1234:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1218:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1199:36:0" - }, - { - "expression": { - "arguments": [ - { - "id": 103, - "name": "assetExsist", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "1251:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 102, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1243:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1243:20:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 105, - "nodeType": "ExpressionStatement", - "src": "1243:20:0" - }, - { - "expression": { - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 106, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1271:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 108, - "indexExpression": { - "id": 107, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1278:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1271:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 109, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1271:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1291:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1271:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 112, - "nodeType": "ExpressionStatement", - "src": "1271:25:0" - } - ] - }, - "functionSelector": "def60e0d", - "id": 114, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "unLockAsset", - "nameLocation": "1153:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 91, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 90, - "mutability": "mutable", - "name": "id", - "nameLocation": "1181:2:0", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "1165:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 89, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1165:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1164:20:0" - }, - "returnParameters": { - "id": 92, - "nodeType": "ParameterList", - "parameters": [], - "src": "1191:0:0" - }, - "scope": 150, - "src": "1144:157:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 148, - "nodeType": "Block", - "src": "1352:241:0", - "statements": [ - { - "assignments": [ - 120 - ], - "declarations": [ - { - "constant": false, - "id": 120, - "mutability": "mutable", - "name": "assetExsist", - "nameLocation": "1365:11:0", - "nodeType": "VariableDeclaration", - "scope": 148, - "src": "1360:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 119, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1360:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 127, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 121, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1379:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 123, - "indexExpression": { - "id": 122, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1386:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1379:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 124, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "1379:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1395:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1379:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1360:36:0" - }, - { - "expression": { - "arguments": [ - { - "id": 129, - "name": "assetExsist", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1412:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 128, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1404:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 130, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1404:20:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 131, - "nodeType": "ExpressionStatement", - "src": "1404:20:0" - }, - { - "assignments": [ - 133 - ], - "declarations": [ - { - "constant": false, - "id": 133, - "mutability": "mutable", - "name": "assetIsLocked", - "nameLocation": "1500:13:0", - "nodeType": "VariableDeclaration", - "scope": 148, - "src": "1495:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 132, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1495:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 138, - "initialValue": { - "expression": { - "baseExpression": { - "id": 134, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1516:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 136, - "indexExpression": { - "id": 135, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1523:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1516:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 137, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1516:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1495:38:0" - }, - { - "expression": { - "arguments": [ - { - "id": 140, - "name": "assetIsLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "1549:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 139, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1541:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1541:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 142, - "nodeType": "ExpressionStatement", - "src": "1541:22:0" - }, - { - "expression": { - "id": 146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "1571:17:0", - "subExpression": { - "baseExpression": { - "id": 143, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1578:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 145, - "indexExpression": { - "id": 144, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1585:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1578:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 147, - "nodeType": "ExpressionStatement", - "src": "1571:17:0" - } - ] - }, - "functionSelector": "e24aa37c", - "id": 149, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deleteAsset", - "nameLocation": "1313:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 117, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 116, - "mutability": "mutable", - "name": "id", - "nameLocation": "1341:2:0", - "nodeType": "VariableDeclaration", - "scope": 149, - "src": "1325:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 115, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1325:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1324:20:0" - }, - "returnParameters": { - "id": 118, - "nodeType": "ParameterList", - "parameters": [], - "src": "1352:0:0" - }, - "scope": 150, - "src": "1304:289:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 151, - "src": "543:1053:0", - "usedErrors": [] - } - ], - "src": "413:1184:0" - }, - "functionHashes": { - "createAsset(string,uint256)": "db9cc410", - "deleteAsset(string)": "e24aa37c", - "getAsset(string)": "cd5286d0", - "lockAsset(string)": "5e82d0a6", - "unLockAsset(string)": "def60e0d" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "228200", - "executionCost": "269", - "totalCost": "228469" - }, - "external": { - "createAsset(string,uint256)": "infinite", - "deleteAsset(string)": "infinite", - "getAsset(string)": "infinite", - "lockAsset(string)": "infinite", - "unLockAsset(string)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol b/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol deleted file mode 100644 index 4f6ef87386..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol +++ /dev/null @@ -1,50 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; -struct Asset{ - address creator; - bool isLock; - uint size; -} -//TODO: DETEMINE CALLDATA VS MEMORY -contract LockAsset { - // - mapping (string => Asset) assets; - function createAsset( string calldata id, uint size) public{ - require(size>0); - assets[id].size= size; - assets[id].creator = msg.sender; - assets[id].isLock = false; - } - function getAsset(string calldata id) public view returns (Asset memory) - { - return assets[id]; - } - - //Don't care if it is already locked - function lockAsset(string calldata id) public{ - bool assetExsist = assets[id].size>0; - require(assetExsist); - assets[id].isLock = true; - } - //Don't care if it is already unlocked - function unLockAsset(string calldata id) public{ - bool assetExsist = assets[id].size>0; - require(assetExsist); - assets[id].isLock = false; - } - function deleteAsset(string calldata id) public { - bool assetExsist = assets[id].size>0; - require(assetExsist); - //an asset could only be deleted if it is already locked - bool assetIsLocked = assets[id].isLock; - require(assetIsLocked); - delete assets[id]; - } - -} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/benchmark/run-plugin-ledger-connector-besu-benchmark.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/benchmark/run-plugin-ledger-connector-besu-benchmark.ts deleted file mode 100644 index a3a1abb036..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/benchmark/run-plugin-ledger-connector-besu-benchmark.ts +++ /dev/null @@ -1,239 +0,0 @@ -import path from "path"; -import { EOL } from "os"; -import * as Benchmark from "benchmark"; - -import { v4 as uuidv4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import fse from "fs-extra"; -import KeyEncoder from "key-encoder"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; - -import { - PluginLedgerConnectorBesu, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, -} from "../../../main/typescript/public-api"; -import HelloWorldContractJson from "../../solidity/hello-world-contract/HelloWorld.json"; -import { BesuApiClientOptions } from "../../../main/typescript/api-client/besu-api-client"; -import OAS from "../../../main/json/openapi.json"; - -import { - IListenOptions, - KeyFormat, - LogLevelDesc, - Logger, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { Constants } from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; - -const LOG_TAG = - "[packages/cactus-plugin-ledger-connector-besu/src/test/typescript/benchmark/run-plugin-ledger-connector-besu-benchmark.ts]"; - -const createTestInfrastructure = async (opts: { - readonly logLevel: LogLevelDesc; -}) => { - const logLevel = opts.logLevel || "DEBUG"; - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainIdForSigned = uuidv4(); - const keychainIdForUnsigned = uuidv4(); - const keychainRefForSigned = uuidv4(); - const keychainRefForUnsigned = uuidv4(); - - const besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - const testEthAccount1 = await besuTestLedger.createEthTestAccount(); - - // keychainPlugin for signed transactions - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - const signedKeychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: keychainIdForSigned, - backend: new Map([[keychainRefForSigned, pem]]), - logLevel, - }); - - // keychainPlugin for unsigned transactions - const keychainEntryValue = testEthAccount1.privateKey; - const unsignedKeychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: keychainIdForUnsigned, - backend: new Map([[keychainRefForUnsigned, keychainEntryValue]]), - logLevel, - }); - unsignedKeychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - - const pluginRegistry = new PluginRegistry({ - plugins: [signedKeychainPlugin, unsignedKeychainPlugin], - }); - - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const connector = new PluginLedgerConnectorBesu(options); - pluginRegistry.add(connector); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const besuApiClientOptions = new BesuApiClientOptions({ - basePath: apiHost, - }); - const apiClient = new BesuApiClient(besuApiClientOptions); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - - return { - httpApi: apiClient, - apiServer: connector, - besuTestLedger, - }; -}; - -const main = async (opts: { readonly argv: Readonly> }) => { - const logLevel: LogLevelDesc = "INFO"; - - const { apiServer, httpApi, besuTestLedger } = await createTestInfrastructure( - { logLevel }, - ); - - const level = apiServer.options.logLevel || "INFO"; - const label = apiServer.className; - const log: Logger = LoggerProvider.getOrCreate({ level, label }); - - try { - const gitRootPath = path.join( - __dirname, - "../../../../../../", // walk back up to the project root - ); - - log.info("%s gitRootPath=%s", LOG_TAG, gitRootPath); - - const DEFAULT_OUTPUT_FILE_RELATIVE_PATH = - ".tmp/benchmark-results/plugin-ledger-connector-besu/run-plugin-ledger-connector-besu-benchmark.ts.log"; - - const relativeOutputFilePath = - opts.argv[2] === undefined - ? DEFAULT_OUTPUT_FILE_RELATIVE_PATH - : opts.argv[2]; - - log.info( - "%s DEFAULT_OUTPUT_FILE_RELATIVE_PATH=%s", - LOG_TAG, - DEFAULT_OUTPUT_FILE_RELATIVE_PATH, - ); - - log.info("%s opts.argv[2]=%s", LOG_TAG, opts.argv[2]); - - log.info("%s relativeOutputFilePath=%s", LOG_TAG, relativeOutputFilePath); - - const absoluteOutputFilePath = path.join( - gitRootPath, - relativeOutputFilePath, - ); - - log.info("%s absoluteOutputFilePath=%s", LOG_TAG, absoluteOutputFilePath); - - const absoluteOutputDirPath = path.dirname(absoluteOutputFilePath); - log.info("%s absoluteOutputDirPath=%s", LOG_TAG, absoluteOutputDirPath); - - await fse.mkdirp(absoluteOutputDirPath); - log.info("%s mkdir -p OK: %s", LOG_TAG, absoluteOutputDirPath); - - const minSamples = 100; - const suite = new Benchmark.Suite({}); - - const cycles: string[] = []; - - await new Promise((resolve, reject) => { - suite - .add("plugin-ledger-connector-besu_HTTP_GET_getOpenApiSpecV1", { - defer: true, - minSamples, - fn: async function (deferred: Benchmark.Deferred) { - await httpApi.getOpenApiSpecV1(); - deferred.resolve(); - }, - }) - .on("cycle", (event: { target: unknown }) => { - // Output benchmark result by converting benchmark result to string - // Example line on stdout: - // plugin-ledger-connector-besu_HTTP_GET_getOpenApiSpecV1 x 1,020 ops/sec ±2.25% (177 runs sampled) - const cycle = String(event.target); - log.info("%s Benchmark.js CYCLE: %s", LOG_TAG, cycle); - cycles.push(cycle); - }) - .on("complete", function () { - log.info("%s Benchmark.js COMPLETE.", LOG_TAG); - resolve(suite); - }) - .on("error", async (ex: unknown) => { - log.info("%s Benchmark.js ERROR: %o", LOG_TAG, ex); - reject(ex); - }) - .run(); - }); - - const data = cycles.join(EOL); - log.info("%s Writing results...", LOG_TAG); - await fse.writeFile(absoluteOutputFilePath, data, { encoding: "utf-8" }); - log.info("%s Wrote results to %s", LOG_TAG, absoluteOutputFilePath); - } finally { - await apiServer.shutdown(); - log.info("%s Shut down API server OK", LOG_TAG); - - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - } -}; - -main({ argv: process.argv }) - .then(async () => { - console.log("%s Script execution completed successfully", LOG_TAG); - process.exit(0); - }) - .catch((ex) => { - console.error("%s process crashed with:", LOG_TAG, ex); - process.exit(1); - }); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/besu-get-transaction.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/besu-get-transaction.test.ts deleted file mode 100644 index f760085102..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/besu-get-transaction.test.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import "jest-extended"; - -import { - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredentialType, -} from "../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { GetTransactionV1Request } from "../../../../main/typescript/generated/openapi/typescript-axios/api"; - -const testCase = "PluginLedgerConnectorBesu"; -describe(testCase, () => { - const logLevel: LogLevelDesc = "TRACE"; - const besuTestLedger = new BesuTestLedger(); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - test("can get past logs of an account", async () => { - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await connector.onPluginInit(); - - const privateKey = await besuTestLedger.getGenesisAccountPrivKey(); - const { transactionReceipt } = await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.LedgerBlockAck, - timeoutMs: 60000, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const req: GetTransactionV1Request = { - transactionHash: transactionReceipt.transactionHash, - }; - const response = await connector.getTransaction(req); - expect(response.transaction).toBeTruthy(); - expect(typeof response.transaction).toBe("object"); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/besu-test-ledger-parameters.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/besu-test-ledger-parameters.test.ts deleted file mode 100644 index 6fa71cca44..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/besu-test-ledger-parameters.test.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import "jest-extended"; - -const testCase = "PluginLedgerConnectorBesu:deploy-contract"; - -describe(testCase, () => { - test("constructor does not throw with the default config", async () => { - // No options - const besuTestLedger = new BesuTestLedger(); - - expect(besuTestLedger).toBeTruthy(); - }); - - test("Besu environment variables passed correctly", async () => { - const simpleEnvVars = [ - "BESU_MINER_ENABLED", - "BESU_NETWORK=dev", - "BESU_MIN_GAS_PRICE=0", - ]; - - const besuOptions = { - envVars: simpleEnvVars, - }; - const besuTestLedger = new BesuTestLedger(besuOptions); - - expect(besuTestLedger.envVars).toEqual(simpleEnvVars); - expect(besuTestLedger).toBeTruthy(); - }); - - test("deploys a Besu Node on the Rinkeby network", async () => { - const rinkebyNetworkEnvVars = [ - "BESU_MOUNT_TYPE=bind", - "BESU_MINER_ENABLED", - "BESU_MINER_COINBASE=fe3b557e8fb62b89f4916b721be55ceb828dbd73", - "BESU_SOURCE=/", - "BESU_NETWORK=rinkeby", - "BESU_MIN_GAS_PRICE=0", - "BESU_TARGET=/var/lib/besu hyperledger/besu:latest", - ]; - const besuOptions = { - envVars: rinkebyNetworkEnvVars, - }; - - const besuTestLedger = new BesuTestLedger(besuOptions); - - expect(besuTestLedger.envVars).toEqual(rinkebyNetworkEnvVars); - expect(besuTestLedger).toBeTruthy(); - }); - - test("deploys a Besu Node on the Ropsten network", async () => { - // const rinkebyNetworkParameters = "--mount type=bind,source=/,target=/var/lib/besu hyperledger/besu:latest --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73--network=dev --min-gas-price=0"; - const rinkebyNetworkEnvVars = [ - "BESU_MOUNT_TYPE=bind", - "BESU_MINER_ENABLED", - "BESU_MINER_COINBASE=fe3b557e8fb62b89f4916b721be55ceb828dbd73", - "BESU_SOURCE=/", - "BESU_NETWORK=ropsten", - "BESU_MIN_GAS_PRICE=0", - "BESU_TARGET=/var/lib/besu hyperledger/besu:latest", - ]; - const besuOptions = { - envVars: rinkebyNetworkEnvVars, - }; - - const besuTestLedger = new BesuTestLedger(besuOptions); - - expect(besuTestLedger.envVars).toEqual(rinkebyNetworkEnvVars); - expect(besuTestLedger).toBeTruthy(); - }); - - test("deploys a Besu Node on the Goerli network", async () => { - // const rinkebyNetworkParameters = "--mount type=bind,source=/,target=/var/lib/besu hyperledger/besu:latest --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73--network=dev --min-gas-price=0"; - const rinkebyNetworkEnvVars = [ - "BESU_MOUNT_TYPE=bind", - "BESU_MINER_ENABLED", - "BESU_MINER_COINBASE=fe3b557e8fb62b89f4916b721be55ceb828dbd73", - "BESU_SOURCE=/", - "BESU_NETWORK=goerli", - "BESU_MIN_GAS_PRICE=0", - "BESU_TARGET=/var/lib/besu hyperledger/besu:latest", - ]; - const besuOptions = { - envVars: rinkebyNetworkEnvVars, - }; - - const besuTestLedger = new BesuTestLedger(besuOptions); - - expect(besuTestLedger.envVars).toEqual(rinkebyNetworkEnvVars); - expect(besuTestLedger).toBeTruthy(); - }); - - test("deploys a Besu Node on the Ethereum main network", async () => { - const ethereumEnvVars = [ - "BESU_TARGET=/var/lib/besu", - "BESU_PORT=30303:30303", - "BESU_RCP_HTTP_ENABLED", - ]; - const besuOptions = { - envVars: ethereumEnvVars, - }; - const besuTestLedger = new BesuTestLedger(besuOptions); - - expect(besuTestLedger.envVars).toEqual(ethereumEnvVars); - expect(besuTestLedger).toBeTruthy(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts deleted file mode 100644 index 328d40afc4..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts +++ /dev/null @@ -1,476 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - Web3SigningCredentialCactusKeychainRef, - ReceiptType, - BesuApiClient, - WatchBlocksV1Progress, - Web3BlockHeader, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; -import { K_CACTUS_BESU_TOTAL_TX_COUNT } from "../../../../../main/typescript/prometheus-exporter/metrics"; -import { BesuApiClientOptions } from "../../../../../main/typescript/api-client/besu-api-client"; -import { Account } from "web3-core"; - -describe("PluginLedgerConnectorBesu", () => { - const testCase = "deploys contract via .json file"; - const logLevel: LogLevelDesc = "INFO"; - const besuTestLedger = new BesuTestLedger(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - const keychainEntryKey = uuidv4(); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map(), - logLevel, - }); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - let rpcApiHttpHost: string; - let rpcApiWsHost: string; - let firstHighNetWorthAccount: string; - let web3: Web3; - let testEthAccount: Account; - let keychainEntryValue: string; - let connector: PluginLedgerConnectorBesu; - let addressInfo: AddressInfo; - let apiClient: BesuApiClient; - let apiHost: string; - let contractAddress: string; - - beforeAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(uuidv4()); - keychainEntryValue = testEthAccount.privateKey; - keychainPlugin.set(keychainEntryKey, keychainEntryValue); - - addressInfo = await Servers.listen(listenOptions); - - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }); - - const { address, port } = addressInfo; - apiHost = `http://${address}:${port}`; - const besuApiClientOptions = new BesuApiClientOptions({ - basePath: apiHost, - }); - apiClient = new BesuApiClient(besuApiClientOptions); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }); - - afterAll(async () => { - await Servers.shutdown(server); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - test(testCase, async () => { - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - - const blocks = await apiClient.watchBlocksV1(); - - const aBlockHeader = await new Promise( - (resolve, reject) => { - let done = false; - const timerId = setTimeout(() => { - if (!done) { - reject("Waiting for block header notification to arrive timed out"); - } - }, 10000); - const subscription = blocks.subscribe((res: WatchBlocksV1Progress) => { - subscription.unsubscribe(); - done = true; - clearTimeout(timerId); - resolve(res.blockHeader); - }); - }, - ); - expect(aBlockHeader).toBeTruthy(); - expect(aBlockHeader).toBeObject(); - expect(aBlockHeader).not.toBeEmptyObject(); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toEqual(10e9); - }); - - test("deploys contract via .json file", async () => { - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: HelloWorldContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut).toBeObject(); - - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeObject(); - - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeString(); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - - const { callOutput: helloMsg } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(helloMsg).toBeTruthy(); - expect(helloMsg).toBeString(); - expect(helloMsg).not.toBeEmpty(); - }); - - test("invoke Web3SigningCredentialType.NONE", async () => { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - transactionConfig: { - rawTransaction, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - - const balance2 = await web3.eth.getBalance(testEthAccount2.address); - expect(parseInt(balance2, 10)).toEqual(10e6); - }); - - test("invoke Web3SigningCredentialType.PrivateKeyHex", async () => { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - expect(setNameOut).toBeTruthy(); - - const setNameOutPromise1 = connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - - await expect(setNameOutPromise1).rejects.toMatchObject>({ - message: expect.stringContaining("Nonce too low"), - }); - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(callOutput).toEqual(newName); - }); - - test("invoke Web3SigningCredentialType.CactusKeychainRef", async () => { - const newName = `DrCactus${uuidv4()}`; - - const signingCredential: Web3SigningCredentialCactusKeychainRef = { - ethAccount: testEthAccount.address, - keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - type: Web3SigningCredentialType.CactusKeychainRef, - }; - - const setNameOut = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential, - nonce: 4, - }); - expect(setNameOut).toBeTruthy(); - - const setNameOutPromise2 = connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential, - nonce: 4, - }); - - await expect(setNameOutPromise2).rejects.toMatchObject>({ - message: expect.stringContaining("Nonce too low"), - }); - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [1], - gas: 1000000, - signingCredential, - }); - - expect(callOutput).toEqual(newName); - }); - - test("get prometheus exporter metrics", async () => { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_BESU_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTUS_BESU_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTUS_BESU_TOTAL_TX_COUNT + - '{type="' + - K_CACTUS_BESU_TOTAL_TX_COUNT + - '"} 9'; - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data.includes(promMetricsOutput)).toBeTrue(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-balance.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-balance.test.ts deleted file mode 100644 index 775eb19481..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-balance.test.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { Account } from "web3-core"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - GetBalanceV1Request, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -const testcase = "can get balance of an account"; -describe(testcase, () => { - const logLevel: LogLevelDesc = "TRACE"; - const besuTestLedger = new BesuTestLedger(); - - let rpcApiHttpHost: string, - rpcApiWsHost: string, - web3: Web3, - keychainPlugin: PluginKeychainMemory, - firstHighNetWorthAccount: string, - testEthAccount: Account, - keychainEntryKey: string, - keychainEntryValue: string; - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - beforeAll(async () => { - await besuTestLedger.start(); - web3 = new Web3(rpcApiHttpHost); - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - testEthAccount = web3.eth.accounts.create(uuidv4()); - - keychainEntryKey = uuidv4(); - keychainEntryValue = testEthAccount.privateKey; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - }); - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - - test(testcase, async () => { - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - await connector.onPluginInit(); - - const req: GetBalanceV1Request = { address: firstHighNetWorthAccount }; - const currentBalance = await connector.getBalance(req); - //makes the information in to string - expect(currentBalance).toBeTruthy(); - expect(typeof currentBalance).toBe("object"); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-block.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-block.test.ts deleted file mode 100644 index 277cbee811..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-block.test.ts +++ /dev/null @@ -1,75 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - GetBlockV1Request, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -describe("PluginLedgerConnectorBesu", () => { - const logLevel: LogLevelDesc = "INFO"; - const log = LoggerProvider.getOrCreate({ - label: "besu-get-block-test.ts", - level: logLevel, - }); - const besuTestLedger = new BesuTestLedger(); - let connector: PluginLedgerConnectorBesu; - - beforeAll(async () => { - const omitContainerImagePull = false; - await besuTestLedger.start(omitContainerImagePull); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - await connector.onPluginInit(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - it("can get block from blockchain", async () => { - const request: GetBlockV1Request = { blockHashOrBlockNumber: 0 }; - const currentBlock = await connector.getBlock(request); - log.debug("Current Block=%o", currentBlock); - //makes the information in to string - expect(currentBlock).toBeTruthy(); - expect(currentBlock).toBeObject(); - expect(currentBlock).not.toBeEmptyObject(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-past-logs.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-past-logs.test.ts deleted file mode 100644 index 7985c8c6d9..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-past-logs.test.ts +++ /dev/null @@ -1,75 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - GetPastLogsV1Request, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -const logLevel: LogLevelDesc = "INFO"; - -describe("PluginLedgerConnectorBesu", () => { - const besuTestLedger = new BesuTestLedger(); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - test("can get past logs of an account", async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - await connector.onPluginInit(); - - const req: GetPastLogsV1Request = { address: firstHighNetWorthAccount }; - const pastLogs = await connector.getPastLogs(req); - expect(pastLogs).toBeTruthy(); - expect(pastLogs).toBeObject(); - expect(pastLogs.logs).toBeTruthy(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts deleted file mode 100644 index 63b2161aa8..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts +++ /dev/null @@ -1,347 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import Web3 from "web3"; -import { AddressInfo } from "net"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { Account } from "web3-core"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - InvokeContractV1Request, - BesuApiClientOptions, - BesuApiClient, - GetBesuRecordV1Request, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - IListenOptions, - Servers, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; - -const logLevel: LogLevelDesc = "INFO"; - -describe("PluginLedgerConnectorBesu", () => { - const log = LoggerProvider.getOrCreate({ - label: "besu-get-record-locator.test.ts", - level: logLevel, - }); - const besuTestLedger = new BesuTestLedger(); - let api: BesuApiClient; - let firstHighNetWorthAccount: string; - let besuKeyPair: { - privateKey: string; - }; - let server: http.Server; - let connector: PluginLedgerConnectorBesu; - let testEthAccount: Account; - let web3: Web3; - let keychainPlugin: PluginKeychainMemory; - let contractAddress: string; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).not.toReject(); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => { - if (server) { - await Servers.shutdown(server); - } - }); - - beforeAll(async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await connector.onPluginInit(); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - log.debug( - `Metrics URL: ${apiHost}/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics`, - ); - - const wsBasePath = apiHost + Constants.SocketIoConnectionPathV1; - log.debug("WS base path: " + wsBasePath); - const besuApiClientOptions = new BesuApiClientOptions({ - basePath: apiHost, - }); - api = new BesuApiClient(besuApiClientOptions); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }); - - it("can get record locator from Besu ledger", async () => { - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toEqual(10e9); - }); - - it("deploys contract", async () => { - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: HelloWorldContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - expect(contractAddress).toBeString(); - expect(contractAddress).not.toBeEmpty(); - - const { callOutput: helloMsg } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(helloMsg).toBeTruthy(); - expect(helloMsg).toBeString(); - expect(helloMsg).not.toBeEmpty(); - }); - - test("getBesuRecord test 1", async () => { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - const transactionReceipt = await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - rawTransaction, - }, - }); - - const request: GetBesuRecordV1Request = { - transactionHash: transactionReceipt.transactionReceipt.transactionHash, - }; - const getInputData = await api.getBesuRecordV1(request); - expect(getInputData).toBeTruthy(); - }); - - test("getBesuRecord test 2", async () => { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - expect(setNameOut).toBeTruthy(); - - await expect( - connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }), - ).rejects.toThrowError( - expect.objectContaining({ - message: expect.stringContaining("Nonce too low"), - stack: expect.stringContaining("Nonce too low"), - }), - ); - - const req: InvokeContractV1Request = { - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }; - const { callOutput: getNameOut } = await connector.getBesuRecord({ - invokeCall: req, - }); - expect(getNameOut).toEqual(newName); - - const response = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - }); - expect(response).toBeTruthy(); - - const req2: InvokeContractV1Request = { - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }; - - const { callOutput } = await connector.getBesuRecord({ - invokeCall: req2, - }); - expect(callOutput).toEqual(newName); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/invoke-contract.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/invoke-contract.test.ts deleted file mode 100644 index 4dddf7203d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/invoke-contract.test.ts +++ /dev/null @@ -1,349 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - Web3SigningCredentialCactusKeychainRef, - ReceiptType, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -const testCase = "deploys contract via .json file"; - -describe(testCase, () => { - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - const logLevel: LogLevelDesc = "TRACE"; - const besuTestLedger = new BesuTestLedger(); - - test(testCase, async () => { - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - const contractName = "HelloWorld"; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await connector.onPluginInit(); - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toEqual(10e9); - - let contractAddress: string; - - { - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: HelloWorldContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - expect(typeof contractAddress === "string").toBeTrue(); - - const { callOutput: helloMsg } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(helloMsg).toBeTruthy(); - expect(typeof helloMsg === "string").toBeTrue(); - } - - { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - rawTransaction, - }, - }); - - const balance2 = await web3.eth.getBalance(testEthAccount2.address); - expect(balance2).toBeTruthy(); - expect(parseInt(balance2, 10)).toEqual(10e6); - } - - { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - expect(setNameOut).toBeTruthy(); - - await expect( - connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }), - ).rejects.toThrowError( - expect.objectContaining({ - message: expect.stringContaining("Nonce too low"), - }), - ); - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(callOutput).toEqual(newName); - } - - { - const newName = `DrCactus${uuidv4()}`; - const signingCredential: Web3SigningCredentialCactusKeychainRef = { - ethAccount: testEthAccount.address, - keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - type: Web3SigningCredentialType.CactusKeychainRef, - }; - - const setNameOut = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential, - nonce: 4, - }); - expect(setNameOut).toBeTruthy(); - - await expect( - connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential, - nonce: 4, - }), - ).rejects.toThrow("Nonce too low"); - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput: callOut } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [1], - gas: 1000000, - signingCredential, - }); - expect(callOut).toEqual(newName); - } - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/private-deploy-contract-from-json-cactus.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/private-deploy-contract-from-json-cactus.test.ts deleted file mode 100644 index f48a673292..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/private-deploy-contract-from-json-cactus.test.ts +++ /dev/null @@ -1,519 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import Web3JsQuorum, { IPrivateTransactionReceipt } from "web3js-quorum"; -import { BesuMpTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - Web3SigningCredentialType, -} from "../../../../../main/typescript"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -describe("PluginLedgerConnectorBesu", () => { - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-all-in-one-multi-party"; - const containerImageTag = "2023-08-08-pr-2596"; - const testCase = "Executes private transactions on Hyperledger Besu"; - const logLevel: LogLevelDesc = "INFO"; - - const doctorCactusHex = - "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000d446f63746f722043616374757300000000000000000000000000000000000000"; - - // WARNING: the keys here are demo purposes ONLY. Please use a tool like Orchestrate or EthSigner for production, rather than hard coding private keys - const keysStatic = { - tessera: { - member1: { - publicKey: "BULeR8JyUWhiuuCMU/HLA0Q5pzkYT+cHII3ZKBey3Bo=", - }, - member2: { - publicKey: "QfeDAys9MPDs2XHExtc84jKGHxZg/aj52DTh0vtA3Xc=", - }, - member3: { - publicKey: "1iTZde/ndBHvzhcl7V68x44Vx7pl8nwx9LqnM/AfJUg=", - }, - }, - besu: { - member1: { - url: "http://127.0.0.1:20000", - wsUrl: "ws://127.0.0.1:20001", - privateKey: - "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63", - }, - member2: { - url: "http://127.0.0.1:20002", - wsUrl: "ws://127.0.0.1:20003", - privateKey: - "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3", - }, - member3: { - url: "http://127.0.0.1:20004", - wsUrl: "ws://127.0.0.1:20005", - privateKey: - "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f", - }, - ethsignerProxy: { - url: "http://127.0.0.1:18545", - accountAddress: "9b790656b9ec0db1936ed84b3bea605873558198", - }, - }, - }; - - const infrastructureElements: Array<{ stop: () => Promise }> = []; - afterAll(async () => { - for (let index = 0; index < infrastructureElements.length; index++) { - const aStoppable = infrastructureElements[index]; - await aStoppable.stop(); - } - }); - - test(testCase, async () => { - // At development time one can specify this environment variable if there is - // a multi-party network already running, which is doable with something like - // this on the terminal: - // docker run --rm --privileged --publish 2222:22 --publish 3000:3000 --publish 8545:8545 --publish 8546:8546 --publish 9001:9001 --publish 9081:9081 --publish 9082:9082 --publish 9083:9083 --publish 9090:9090 --publish 18545:18545 --publish 20000:20000 --publish 20001:20001 --publish 20002:20002 --publish 20003:20003 --publish 20004:20004 --publish 20005:20005 --publish 25000:25000 petermetz/cactus-besu-multi-party-all-in-one:0.1.2 - // - // The upside of this approach is that a new container is not launched from - // scratch for every test execution which enables faster iteration. - const preWarmedLedger = - process.env.CACTUS_TEST_PRE_WARMED_LEDGER === "true"; - - let keys: any; - if (preWarmedLedger) { - keys = keysStatic; - } else { - const ledger = new BesuMpTestLedger({ - logLevel, - imageName: containerImageName, - imageTag: containerImageTag, - emitContainerLogs: false, - }); - infrastructureElements.push(ledger); - await ledger.start(); - keys = await ledger.getKeys(); - } - - const rpcApiHttpHostMember1 = keys.besu.member1.url; - const rpcApiHttpHostMember2 = keys.besu.member2.url; - const rpcApiHttpHostMember3 = keys.besu.member3.url; - - const rpcApiWsHostMember1 = keys.besu.member1.wsUrl; - const rpcApiWsHostMember2 = keys.besu.member2.wsUrl; - const rpcApiWsHostMember3 = keys.besu.member3.wsUrl; - - const web3Member1 = new Web3(rpcApiHttpHostMember1); - const web3Member2 = new Web3(rpcApiHttpHostMember2); - const web3Member3 = new Web3(rpcApiHttpHostMember3); - - const pluginRegistry1 = new PluginRegistry(); - const pluginRegistry2 = new PluginRegistry(); - const pluginRegistry3 = new PluginRegistry(); - - const pluginFactoryLedgerConnector = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const connectorInstanceId1 = "besu1_" + uuidv4(); - const connectorInstanceId2 = "besu2_" + uuidv4(); - const connectorInstanceId3 = "besu3_" + uuidv4(); - - const keychainInstanceId1 = "keychain_instance1_" + uuidv4(); - const keychainId1 = "keychain1_" + uuidv4(); - const keychain1 = new PluginKeychainMemory({ - instanceId: keychainInstanceId1, - keychainId: keychainId1, - logLevel, - }); - expect(keychain1).toBeTruthy(); - keychain1.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - pluginRegistry1.add(keychain1); - - const keychainInstanceId2 = "keychain_instance2_" + uuidv4(); - const keychainId2 = "keychain2_" + uuidv4(); - const keychain2 = new PluginKeychainMemory({ - instanceId: keychainInstanceId2, - keychainId: keychainId2, - logLevel, - }); - expect(keychain2).toBeTruthy(); - keychain2.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - pluginRegistry2.add(keychain2); - - const keychainInstanceId3 = "keychain_instance3_" + uuidv4(); - const keychainId3 = "keychain3_" + uuidv4(); - const keychain3 = new PluginKeychainMemory({ - instanceId: keychainInstanceId3, - keychainId: keychainId3, - logLevel, - }); - expect(keychain3).toBeTruthy(); - keychain3.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - pluginRegistry3.add(keychain3); - - const connector1 = await pluginFactoryLedgerConnector.create({ - instanceId: connectorInstanceId1, - pluginRegistry: pluginRegistry1, - rpcApiHttpHost: rpcApiHttpHostMember1, - rpcApiWsHost: rpcApiWsHostMember1, - logLevel, - }); - expect(connector1).toBeTruthy(); - infrastructureElements.push({ stop: () => connector1.shutdown() }); - pluginRegistry1.add(connector1); - - const connector2 = await pluginFactoryLedgerConnector.create({ - instanceId: connectorInstanceId2, - pluginRegistry: pluginRegistry2, - rpcApiHttpHost: rpcApiHttpHostMember2, - rpcApiWsHost: rpcApiWsHostMember2, - logLevel, - }); - expect(connector2).toBeTruthy(); - infrastructureElements.push({ stop: () => connector2.shutdown() }); - pluginRegistry2.add(connector2); - - const connector3 = await pluginFactoryLedgerConnector.create({ - instanceId: connectorInstanceId3, - pluginRegistry: pluginRegistry3, - rpcApiHttpHost: rpcApiHttpHostMember3, - rpcApiWsHost: rpcApiWsHostMember3, - logLevel, - }); - expect(connector3).toBeTruthy(); - infrastructureElements.push({ stop: () => connector3.shutdown() }); - pluginRegistry3.add(connector3); - - await connector1.onPluginInit(); - await connector2.onPluginInit(); - await connector3.onPluginInit(); - - const web3QuorumMember1 = Web3JsQuorum(web3Member1); - expect(web3QuorumMember1).toBeTruthy(); - - const web3QuorumMember2 = Web3JsQuorum(web3Member2); - expect(web3QuorumMember2).toBeTruthy(); - - const web3QuorumMember3 = Web3JsQuorum(web3Member3); - expect(web3QuorumMember3).toBeTruthy(); - - const deployOut = await connector1.deployContract({ - bytecode: HelloWorldContractJson.bytecode, - contractAbi: HelloWorldContractJson.abi, - contractName: HelloWorldContractJson.contractName, - constructorArgs: [], - privateTransactionConfig: { - privateFrom: keys.tessera.member1.publicKey, - privateFor: [ - keys.tessera.member1.publicKey, - keys.tessera.member2.publicKey, - ], - }, - web3SigningCredential: { - secret: keys.besu.member1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - keychainId: keychain1.getKeychainId(), - gas: 3000000, - }); - - expect(deployOut).toBeTruthy(); - expect(deployOut).toBeObject(); - - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeObject(); - - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeString(); - - expect(deployOut.transactionReceipt.commitmentHash).toBeTruthy(); - expect(deployOut.transactionReceipt.commitmentHash).toBeString(); - - // t.ok(deployRes.status, "deployRes.status truthy OK"); - // t.equal(deployRes.status, 200, "deployRes.status === 200 OK"); - // t.ok(deployRes.data, "deployRes.data truthy OK"); - // t.ok( - // deployRes.data.transactionReceipt, - // "deployRes.data.transactionReceipt truthy OK", - // ); - - // t.ok(privacyMarkerTxHash, "privacyMarkerTxHash truthy OK"); - - const contractDeployReceipt = - (await web3QuorumMember1.priv.waitForTransactionReceipt( - deployOut.transactionReceipt.commitmentHash, - )) as IPrivateTransactionReceipt; - - expect(contractDeployReceipt).toBeTruthy(); - const receipt = contractDeployReceipt as IPrivateTransactionReceipt; - - const { contractAddress } = receipt; - expect(contractAddress).toBeTruthy(); - expect(contractAddress).toBeString(); - expect(contractAddress).not.toBeEmpty(); - - // Check that the third node does not see the transaction of the contract - // deployment that was sent to node 1 and 2 only, not 3. - const txReceiptNever = - await web3QuorumMember3.priv.waitForTransactionReceipt( - deployOut.transactionReceipt.commitmentHash, - ); - expect(txReceiptNever).toBeFalsy(); - - // Check that node 1 and 2 can indeed see the transaction for the contract - // deployment that was sent to them and them only (node 3 was left out) - - // Note that changing this to use web3QuorumMember3 breaks it and I'm suspecting - // that this is what's plaguing the tests that are based on the connector - // which is instantiated with a single web3+web3 Quorum client. - // What I will try next is to have 3 connectors each with a web3 Quorum client - // that points to one of the 3 nodes and see if that makes it work. - const txReceiptAlways1 = - await web3QuorumMember1.priv.waitForTransactionReceipt( - deployOut.transactionReceipt.commitmentHash, - ); - expect(txReceiptAlways1).toBeTruthy(); - - const txReceiptAlways2 = - await web3QuorumMember2.priv.waitForTransactionReceipt( - deployOut.transactionReceipt.commitmentHash, - ); - expect(txReceiptAlways2).toBeTruthy(); - - const contract = new web3Member1.eth.Contract( - HelloWorldContractJson.abi as never, - ); - - { - const data = contract.methods.setName("ProfessorCactus - #1").encodeABI(); - const functionParams = { - to: contractDeployReceipt.contractAddress, - data, - privateFrom: keys.tessera.member1.publicKey, - privateFor: [keys.tessera.member2.publicKey], - privateKey: keys.besu.member1.privateKey, - }; - const transactionHash = - await web3QuorumMember1.priv.generateAndSendRawTransaction( - functionParams, - ); - expect(transactionHash).toBeTruthy(); - expect(transactionHash).not.toBeEmpty(); - expect(transactionHash).toBeString(); - - const result = - await web3QuorumMember1.priv.waitForTransactionReceipt(transactionHash); - expect(result).toBeTruthy(); - } - - { - const data = contract.methods.getName().encodeABI(); - const fnParams = { - to: contractDeployReceipt.contractAddress, - data, - privateFrom: keys.tessera.member1.publicKey, - privateFor: [keys.tessera.member2.publicKey], - privateKey: keys.besu.member1.privateKey, - }; - - const privacyGroupId = - web3QuorumMember1.utils.generatePrivacyGroup(fnParams); - const callOutput = await web3QuorumMember1.priv.call(privacyGroupId, { - to: contractDeployReceipt.contractAddress, - data: contract.methods.getName().encodeABI(), - }); - expect(callOutput).toBeTruthy(); - const name = web3Member1.eth.abi.decodeParameter("string", callOutput); - expect(name).toEqual("ProfessorCactus - #1"); - } - - { - // Member 3 cannot see into the privacy group of 1 and 2 so the getName - // will not return the value that was set earlier in that privacy group. - const data = contract.methods.getName().encodeABI(); - const fnParams = { - to: contractDeployReceipt.contractAddress, - data, - privateFrom: keys.tessera.member1.publicKey, - privateFor: [keys.tessera.member2.publicKey], - privateKey: keys.besu.member3.privateKey, - }; - - const privacyGroupId = - web3QuorumMember3.utils.generatePrivacyGroup(fnParams); - const callOutput = await web3QuorumMember3.priv.call(privacyGroupId, { - to: contractDeployReceipt.contractAddress, - data, - }); - expect(callOutput).toEqual("0x"); - } - - { - const data = contract.methods.setName("ProfessorCactus - #2").encodeABI(); - const functionParams = { - to: contractDeployReceipt.contractAddress, - data, - privateFrom: keys.tessera.member2.publicKey, - privateFor: [keys.tessera.member2.publicKey], - privateKey: keys.besu.member2.privateKey, - }; - const transactionHash = - await web3QuorumMember2.priv.generateAndSendRawTransaction( - functionParams, - ); - expect(transactionHash).toBeTruthy(); - - const result = - await web3QuorumMember2.priv.waitForTransactionReceipt(transactionHash); - expect(result).toBeTruthy(); - } - - { - const data = contract.methods.setName("ProfessorCactus - #3").encodeABI(); - const functionParams = { - to: contractDeployReceipt.contractAddress, - data, - privateFrom: keys.tessera.member3.publicKey, - privateKey: keys.besu.member3.privateKey, - privateFor: [keys.tessera.member2.publicKey], - }; - const transactionHash = - await web3QuorumMember3.priv.generateAndSendRawTransaction( - functionParams, - ); - expect(transactionHash).toBeTruthy(); - - const result = - await web3QuorumMember3.priv.waitForTransactionReceipt(transactionHash); - expect(result).toBeTruthy(); - } - - { - const contractInvocationNoPrivTxConfig = connector1.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress: contractDeployReceipt.contractAddress, - invocationType: EthContractInvocationType.Call, - gas: 3000000, - methodName: "getName", - params: [], - signingCredential: { - secret: "incorrect-secret", - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - // try { - // await contractInvocationNoPrivTxConfig; - // } catch (ex) { - // console.log(ex); - // } - const wrongSecretErrorMsgPattern = - /Returned values aren't valid, did it run Out of Gas\? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced\./; - - await expect(contractInvocationNoPrivTxConfig).rejects.toHaveProperty( - "message", - expect.stringMatching(wrongSecretErrorMsgPattern), - ); - } - - { - const res = await connector1.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress: contractDeployReceipt.contractAddress, - invocationType: EthContractInvocationType.Send, - gas: 3000000, - methodName: "setName", - params: ["Doctor Cactus"], - privateTransactionConfig: { - privateFrom: keys.tessera.member1.publicKey, - privateFor: [keys.tessera.member2.publicKey], - }, - signingCredential: { - secret: keys.besu.member1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(res.success).toEqual("0x1"); - } - - { - const res = await connector1.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress: contractDeployReceipt.contractAddress, - invocationType: EthContractInvocationType.Call, - gas: 3000000, - methodName: "getName", - params: [], - privateTransactionConfig: { - privateFrom: keys.tessera.member1.publicKey, - privateFor: [keys.tessera.member2.publicKey], - }, - signingCredential: { - secret: keys.besu.member1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(res.callOutput).toEqual(doctorCactusHex); - } - - { - const res = await connector2.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress: contractDeployReceipt.contractAddress, - invocationType: EthContractInvocationType.Call, - gas: 3000000, - methodName: "getName", - params: [], - privateTransactionConfig: { - privateFrom: keys.tessera.member1.publicKey, - privateFor: [keys.tessera.member2.publicKey], - }, - signingCredential: { - secret: keys.besu.member1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(res.callOutput).toEqual(doctorCactusHex); - } - - { - const res = await connector3.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress: contractDeployReceipt.contractAddress, - invocationType: EthContractInvocationType.Call, - gas: 3000000, - methodName: "getName", - params: [], - privateTransactionConfig: { - privateFrom: keys.tessera.member1.publicKey, - privateFor: [keys.tessera.member2.publicKey], - }, - signingCredential: { - secret: keys.besu.member3.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(res.callOutput).toEqual("0x"); - } - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/private-deploy-contract-from-json-web3-eea.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/private-deploy-contract-from-json-web3-eea.test.ts deleted file mode 100644 index 60e89a5bf1..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/private-deploy-contract-from-json-web3-eea.test.ts +++ /dev/null @@ -1,292 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import Web3JsQuorum, { IPrivateTransactionReceipt } from "web3js-quorum"; -import { BesuMpTestLedger } from "@hyperledger/cactus-test-tooling"; -import { AbiItem } from "web3-utils"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -const containerImageName = - "ghcr.io/hyperledger/cactus-besu-all-in-one-multi-party"; -const containerImageTag = "2023-08-08-pr-2596"; -const testCase = "Executes private transactions on Hyperledger Besu"; -const logLevel: LogLevelDesc = "TRACE"; - -// WARNING: the keys here are demo purposes ONLY. Please use a tool like Orchestrate or EthSigner for production, rather than hard coding private keys -const keysStatic = { - tessera: { - member1: { - publicKey: "BULeR8JyUWhiuuCMU/HLA0Q5pzkYT+cHII3ZKBey3Bo=", - }, - member2: { - publicKey: "QfeDAys9MPDs2XHExtc84jKGHxZg/aj52DTh0vtA3Xc=", - }, - member3: { - publicKey: "1iTZde/ndBHvzhcl7V68x44Vx7pl8nwx9LqnM/AfJUg=", - }, - }, - besu: { - member1: { - url: "http://127.0.0.1:20000", - wsUrl: "ws://127.0.0.1:20001", - privateKey: - "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63", - }, - member2: { - url: "http://127.0.0.1:20002", - wsUrl: "ws://127.0.0.1:20003", - privateKey: - "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3", - }, - member3: { - url: "http://127.0.0.1:20004", - wsUrl: "ws://127.0.0.1:20005", - privateKey: - "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f", - }, - ethsignerProxy: { - url: "http://127.0.0.1:18545", - accountAddress: "9b790656b9ec0db1936ed84b3bea605873558198", - }, - }, -}; - -test(testCase, async (t: Test) => { - // At development time one can specify this environment variable if there is - // a multi-party network already running, which is doable with something like - // this on the terminal: - // docker run --rm --privileged --publish 2222:22 --publish 3000:3000 --publish 8545:8545 --publish 8546:8546 --publish 9001:9001 --publish 9081:9081 --publish 9082:9082 --publish 9083:9083 --publish 9090:9090 --publish 18545:18545 --publish 20000:20000 --publish 20001:20001 --publish 20002:20002 --publish 20003:20003 --publish 20004:20004 --publish 20005:20005 --publish 25000:25000 petermetz/cactus-besu-multi-party-all-in-one:0.1.2 - // - // The upside of this approach is that a new container is not launched from - // scratch for every test execution which enables faster iteration. - const preWarmedLedger = process.env.CACTUS_TEST_PRE_WARMED_LEDGER === "true"; - - let keys: any; - if (preWarmedLedger) { - keys = keysStatic; - } else { - const ledger = new BesuMpTestLedger({ - logLevel, - imageName: containerImageName, - imageTag: containerImageTag, - emitContainerLogs: false, - }); - test.onFinish(() => ledger.stop()); - await ledger.start(); - keys = await ledger.getKeys(); - } - - const rpcApiHttpHostMember1 = keys.besu.member1.url; - const rpcApiHttpHostMember2 = keys.besu.member2.url; - const rpcApiHttpHostMember3 = keys.besu.member3.url; - - const web3Member1 = new Web3(rpcApiHttpHostMember1); - const web3Member2 = new Web3(rpcApiHttpHostMember2); - const web3Member3 = new Web3(rpcApiHttpHostMember3); - - const chainIdMember1 = await web3Member1.eth.getChainId(); - t.comment(`chainIdMember1=${chainIdMember1}`); - const chainIdMember2 = await web3Member2.eth.getChainId(); - t.comment(`chainIdMember2=${chainIdMember2}`); - const chainIdMember3 = await web3Member3.eth.getChainId(); - t.comment(`chainIdMember3=${chainIdMember3}`); - - const web3QuorumMember1 = Web3JsQuorum(web3Member1); - t.ok(web3QuorumMember1, "web3QuorumMember1 truthy OK"); - - const web3QuorumMember2 = Web3JsQuorum(web3Member2); - t.ok(web3QuorumMember2, "web3QuorumMember2 truthy OK"); - - const web3QuorumMember3 = Web3JsQuorum(web3Member3); - t.ok(web3QuorumMember3, "web3QuorumMember3 truthy OK"); - - const commitmentHash = - await web3QuorumMember1.priv.generateAndSendRawTransaction({ - data: "0x" + HelloWorldContractJson.bytecode, - privateFrom: keys.tessera.member1.publicKey, - privateFor: [ - keys.tessera.member1.publicKey, - keys.tessera.member2.publicKey, - ], - privateKey: keys.besu.member1.privateKey, - gasLimit: "0x2DC6C0", - }); - - t.ok(commitmentHash, "commitmentHash truthy OK"); - - const contractDeployReceipt = - (await web3QuorumMember1.priv.waitForTransactionReceipt( - commitmentHash, - )) as IPrivateTransactionReceipt; - - t.ok(contractDeployReceipt, "contractDeployReceipt truthy OK"); - const receipt = contractDeployReceipt as IPrivateTransactionReceipt; - - const { contractAddress } = receipt; - t.comment(`Private contract address: ${contractAddress}`); - t.ok(contractAddress, "contractAddress truthy OK"); - - // Check that the third node does not see the transaction of the contract - // deployment that was sent to node 1 and 2 only, not 3. - const txReceiptNever = - await web3QuorumMember3.priv.waitForTransactionReceipt(commitmentHash); - t.notok(txReceiptNever, "txReceiptNever falsy OK"); - - // Check that node 1 and 2 can indeed see the transaction for the contract - // deployment that was sent to them and them only (node 3 was left out) - - // Note that changing this to use web3QuorumMember3 breaks it and I'm suspecting - // that this is what's plaguing the tests that are based on the connector - // which is instantiated with a single web3+web3 Quorum client. - // What I will try next is to have 3 connectors each with a web3 Quorum client - // that points to one of the 3 nodes and see if that makes it work. - const txReceiptAlways1 = - await web3QuorumMember1.priv.waitForTransactionReceipt(commitmentHash); - t.ok(txReceiptAlways1, "txReceiptAlways1 truthy OK"); - - const txReceiptAlways2 = - await web3QuorumMember2.priv.waitForTransactionReceipt(commitmentHash); - t.ok(txReceiptAlways2, "txReceiptAlways2 truthy OK"); - - const contract = new web3Member1.eth.Contract( - HelloWorldContractJson.abi as never, - ); - const setNameAbi = contract["_jsonInterface"].find( - (e) => e.name === "setName", - ) as AbiItem & { signature: string; inputs: AbiItem[] }; - t.ok(setNameAbi, "setNameAbi truthy OK"); - t.ok(setNameAbi.inputs, "setNameAbi.inputs truthy OK"); - t.ok(setNameAbi.signature, "setNameAbi.signature truthy OK"); - - const getNameAbi = contract["_jsonInterface"].find( - (e) => e.name === "getName", - ) as AbiItem & { signature: string; inputs: AbiItem[] }; - t.ok(getNameAbi, "getNameAbi truthy OK"); - t.ok(getNameAbi.inputs, "getNameAbi.inputs truthy OK"); - t.ok(getNameAbi.signature, "getNameAbi.signature truthy OK"); - - { - t.comment("Checking if member1 can call setName()"); - const functionArgs = web3Member1.eth.abi - .encodeParameters(setNameAbi.inputs, ["ProfessorCactus - #1"]) - .slice(2); - const functionParams = { - to: contractDeployReceipt.contractAddress, - data: setNameAbi.signature + functionArgs, - privateFrom: keys.tessera.member1.publicKey, - privateFor: [keys.tessera.member2.publicKey], - privateKey: keys.besu.member1.privateKey, - }; - const transactionHash = - await web3QuorumMember1.priv.generateAndSendRawTransaction( - functionParams, - ); - t.comment(`Transaction hash: ${transactionHash}`); - t.ok(transactionHash, "transactionHash truthy OK"); - - const result = - await web3QuorumMember1.priv.waitForTransactionReceipt(transactionHash); - t.comment(`Transaction receipt for set() call: ${JSON.stringify(result)}`); - t.ok(result, "set() result member 1 truthy OK"); - } - - { - t.comment("Checking if member1 can see new name via getName()"); - const functionArgs = web3Member1.eth.abi - .encodeParameters(getNameAbi.inputs, []) - .slice(2); - - const fnParams = { - to: contractDeployReceipt.contractAddress, - data: getNameAbi.signature + functionArgs, - privateFrom: keys.tessera.member1.publicKey, - privateFor: [keys.tessera.member2.publicKey], - privateKey: keys.besu.member1.privateKey, - }; - - const privacyGroupId = - web3QuorumMember1.utils.generatePrivacyGroup(fnParams); - const callOutput = await web3QuorumMember1.priv.call(privacyGroupId, { - to: contractDeployReceipt.contractAddress, - data: contract.methods.getName().encodeABI(), - }); - t.comment(`getName Call output: ${JSON.stringify(callOutput)}`); - t.ok(callOutput, "callOutput truthy OK"); - const name = web3Member1.eth.abi.decodeParameter("string", callOutput); - t.equal(name, "ProfessorCactus - #1", "getName() member 1 equals #1"); - } - - { - // Member 3 cannot see into the privacy group of 1 and 2 so the getName - // will not return the value that was set earlier in that privacy group. - t.comment("Checking if member3 can see new name via getName()"); - const fnParams = { - to: contractDeployReceipt.contractAddress, - data: contract.methods.getName().encodeABI(), - privateFrom: keys.tessera.member1.publicKey, - privateFor: [keys.tessera.member2.publicKey], - privateKey: keys.besu.member3.privateKey, - }; - - const privacyGroupId = - web3QuorumMember3.utils.generatePrivacyGroup(fnParams); - const callOutput = await web3QuorumMember3.priv.call(privacyGroupId, { - to: contractDeployReceipt.contractAddress, - data: getNameAbi.signature, - }); - t.comment(`getName member3 output: ${JSON.stringify(callOutput)}`); - t.equal(callOutput, "0x", "member3 getName callOutput === 0x OK"); - } - - { - t.comment("Checking if member2 can call setName()"); - const functionArgs = web3Member2.eth.abi - .encodeParameters(setNameAbi.inputs, ["ProfessorCactus - #2"]) - .slice(2); - const functionParams = { - to: contractDeployReceipt.contractAddress, - data: setNameAbi.signature + functionArgs, - privateFrom: keys.tessera.member2.publicKey, - privateFor: [keys.tessera.member2.publicKey], - privateKey: keys.besu.member2.privateKey, - }; - const transactionHash = - await web3QuorumMember2.priv.generateAndSendRawTransaction( - functionParams, - ); - t.comment(`Transaction hash: ${transactionHash}`); - t.ok(transactionHash, "transactionHash truthy OK"); - - const result = - await web3QuorumMember2.priv.waitForTransactionReceipt(transactionHash); - t.comment(`Transaction receipt for set() call: ${JSON.stringify(result)}`); - t.ok(result, "set() result member 2 truthy OK"); - } - - { - t.comment("Checking if member3 can call setName()"); - const functionArgs = web3Member3.eth.abi - .encodeParameters(setNameAbi.inputs, ["ProfessorCactus - #3"]) - .slice(2); - const functionParams = { - to: contractDeployReceipt.contractAddress, - data: setNameAbi.signature + functionArgs, - privateFrom: keys.tessera.member3.publicKey, - privateKey: keys.besu.member3.privateKey, - privateFor: [keys.tessera.member2.publicKey], - }; - const transactionHash = - await web3QuorumMember3.priv.generateAndSendRawTransaction( - functionParams, - ); - t.comment(`setName tx hash for member 3: ${transactionHash}`); - t.ok(transactionHash, "setName tx hash for member 3 truthy OK"); - - const result = - await web3QuorumMember3.priv.waitForTransactionReceipt(transactionHash); - t.comment(`Transaction receipt for set() call: ${JSON.stringify(result)}`); - t.ok(result, "set() result for member 3 truthy OK"); - } - - t.end(); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json-no-keychain.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json-no-keychain.test.ts deleted file mode 100644 index 2b01785d90..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json-no-keychain.test.ts +++ /dev/null @@ -1,477 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - Web3SigningCredentialCactusKeychainRef, - ReceiptType, - BesuApiClient, - WatchBlocksV1Progress, - Web3BlockHeader, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; -import { K_CACTUS_BESU_TOTAL_TX_COUNT } from "../../../../../main/typescript/prometheus-exporter/metrics"; -import { BesuApiClientOptions } from "../../../../../main/typescript/api-client/besu-api-client"; -import { Account } from "web3-core"; - -describe("PluginLedgerConnectorBesu", () => { - const testCase = "deploys contract via .json file"; - const logLevel: LogLevelDesc = "INFO"; - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - const keychainEntryKey = uuidv4(); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map(), - logLevel, - }); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - let rpcApiHttpHost: string; - let rpcApiWsHost: string; - let firstHighNetWorthAccount: string; - let web3: Web3; - let testEthAccount: Account; - let keychainEntryValue: string; - let connector: PluginLedgerConnectorBesu; - let addressInfo: AddressInfo; - let apiClient: BesuApiClient; - let apiHost: string; - let contractAddress: string; - - beforeAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(uuidv4()); - keychainEntryValue = testEthAccount.privateKey; - keychainPlugin.set(keychainEntryKey, keychainEntryValue); - - addressInfo = await Servers.listen(listenOptions); - - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }); - - const { address, port } = addressInfo; - apiHost = `http://${address}:${port}`; - const besuApiClientOptions = new BesuApiClientOptions({ - basePath: apiHost, - }); - apiClient = new BesuApiClient(besuApiClientOptions); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }); - - afterAll(async () => { - await Servers.shutdown(server); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - test(testCase, async () => { - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - - const blocks = await apiClient.watchBlocksV1(); - - const aBlockHeader = await new Promise( - (resolve, reject) => { - let done = false; - const timerId = setTimeout(() => { - if (!done) { - reject("Waiting for block header notification to arrive timed out"); - } - }, 10000); - const subscription = blocks.subscribe((res: WatchBlocksV1Progress) => { - subscription.unsubscribe(); - done = true; - clearTimeout(timerId); - resolve(res.blockHeader); - }); - }, - ); - expect(aBlockHeader).toBeTruthy(); - expect(aBlockHeader).toBeObject(); - expect(aBlockHeader).not.toBeEmptyObject(); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toEqual(10e9); - }); - - test("deploys contract via .json file", async () => { - const deployOut = await connector.deployContractNoKeychain({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: HelloWorldContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut).toBeObject(); - - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeObject(); - - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeString(); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - - const { callOutput: helloMsg } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(helloMsg).toBeTruthy(); - expect(helloMsg).toBeString(); - expect(helloMsg).not.toBeEmpty(); - }); - - test("invoke Web3SigningCredentialType.NONE", async () => { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - transactionConfig: { - rawTransaction, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - - const balance2 = await web3.eth.getBalance(testEthAccount2.address); - expect(parseInt(balance2, 10)).toEqual(10e6); - }); - - test("invoke Web3SigningCredentialType.PrivateKeyHex", async () => { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - expect(setNameOut).toBeTruthy(); - - const setNameOutPromise1 = connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - - await expect(setNameOutPromise1).rejects.toMatchObject>({ - message: expect.stringContaining("Nonce too low"), - }); - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(callOutput).toEqual(newName); - }); - - test("invoke Web3SigningCredentialType.CactusKeychainRef", async () => { - const newName = `DrCactus${uuidv4()}`; - - const signingCredential: Web3SigningCredentialCactusKeychainRef = { - ethAccount: testEthAccount.address, - keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - type: Web3SigningCredentialType.CactusKeychainRef, - }; - - const setNameOut = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential, - nonce: 4, - }); - expect(setNameOut).toBeTruthy(); - - const setNameOutPromise2 = connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential, - nonce: 4, - }); - - await expect(setNameOutPromise2).rejects.toMatchObject>({ - message: expect.stringContaining("Nonce too low"), - }); - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential, - }); - - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential, - value: 10, - }); - - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [1], - gas: 1000000, - signingCredential, - }); - - expect(callOutput).toEqual(newName); - }); - - test("get prometheus exporter metrics", async () => { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_BESU_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTUS_BESU_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTUS_BESU_TOTAL_TX_COUNT + - '{type="' + - K_CACTUS_BESU_TOTAL_TX_COUNT + - '"} 9'; - - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data.includes(promMetricsOutput)).toBeTrue(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts deleted file mode 100644 index 553c963016..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts +++ /dev/null @@ -1,483 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - Web3SigningCredentialCactusKeychainRef, - ReceiptType, - BesuApiClient, - WatchBlocksV1Progress, - Web3BlockHeader, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; -import { K_CACTUS_BESU_TOTAL_TX_COUNT } from "../../../../../main/typescript/prometheus-exporter/metrics"; -import { BesuApiClientOptions } from "../../../../../main/typescript/api-client/besu-api-client"; -import { Account } from "web3-core"; - -describe("PluginLedgerConnectorBesu", () => { - const testCase = "deploys contract via .json file"; - const logLevel: LogLevelDesc = "INFO"; - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - const keychainEntryKey = uuidv4(); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map(), - logLevel, - }); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - let rpcApiHttpHost: string; - let rpcApiWsHost: string; - let firstHighNetWorthAccount: string; - let web3: Web3; - let testEthAccount: Account; - let keychainEntryValue: string; - let connector: PluginLedgerConnectorBesu; - let addressInfo: AddressInfo; - let apiClient: BesuApiClient; - let apiHost: string; - let contractAddress: string; - - beforeAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(uuidv4()); - keychainEntryValue = testEthAccount.privateKey; - keychainPlugin.set(keychainEntryKey, keychainEntryValue); - - addressInfo = await Servers.listen(listenOptions); - - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }); - - const { address, port } = addressInfo; - apiHost = `http://${address}:${port}`; - const besuApiClientOptions = new BesuApiClientOptions({ - basePath: apiHost, - }); - apiClient = new BesuApiClient(besuApiClientOptions); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }); - - afterAll(async () => { - await Servers.shutdown(server); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - test(testCase, async () => { - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - - const blocks = await apiClient.watchBlocksV1(); - - const aBlockHeader = await new Promise( - (resolve, reject) => { - let done = false; - const timerId = setTimeout(() => { - if (!done) { - reject("Waiting for block header notification to arrive timed out"); - } - }, 10000); - const subscription = blocks.subscribe((res: WatchBlocksV1Progress) => { - subscription.unsubscribe(); - done = true; - clearTimeout(timerId); - resolve(res.blockHeader); - }); - }, - ); - expect(aBlockHeader).toBeTruthy(); - expect(aBlockHeader).toBeObject(); - expect(aBlockHeader).not.toBeEmptyObject(); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toEqual(10e9); - }); - - test("deploys contract via .json file", async () => { - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: HelloWorldContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut).toBeObject(); - - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeObject(); - - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeString(); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - - const { callOutput: helloMsg } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(helloMsg).toBeTruthy(); - expect(helloMsg).toBeString(); - expect(helloMsg).not.toBeEmpty(); - }); - - test("invoke Web3SigningCredentialType.NONE", async () => { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - transactionConfig: { - rawTransaction, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - - const balance2 = await web3.eth.getBalance(testEthAccount2.address); - expect(parseInt(balance2, 10)).toEqual(10e6); - }); - - test("invoke Web3SigningCredentialType.PrivateKeyHex", async () => { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - expect(setNameOut).toBeTruthy(); - - const setNameOutPromise1 = connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - - await expect(setNameOutPromise1).rejects.toMatchObject>({ - message: expect.stringContaining("Nonce too low"), - }); - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(callOutput).toEqual(newName); - }); - - test("invoke Web3SigningCredentialType.CactusKeychainRef", async () => { - const newName = `DrCactus${uuidv4()}`; - - const signingCredential: Web3SigningCredentialCactusKeychainRef = { - ethAccount: testEthAccount.address, - keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - type: Web3SigningCredentialType.CactusKeychainRef, - }; - - const setNameOut = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential, - nonce: 4, - }); - expect(setNameOut).toBeTruthy(); - - const setNameOutPromise2 = connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential, - nonce: 4, - }); - - await expect(setNameOutPromise2).rejects.toMatchObject>({ - message: expect.stringContaining("Nonce too low"), - }); - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential, - }); - - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential, - value: 10, - }); - - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [1], - gas: 1000000, - signingCredential, - }); - - expect(callOutput).toEqual(newName); - }); - - test("get prometheus exporter metrics", async () => { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_BESU_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTUS_BESU_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTUS_BESU_TOTAL_TX_COUNT + - '{type="' + - K_CACTUS_BESU_TOTAL_TX_COUNT + - '"} 9'; - - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data.includes(promMetricsOutput)).toBeTrue(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-balance.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-balance.test.ts deleted file mode 100644 index 52756363fc..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-balance.test.ts +++ /dev/null @@ -1,77 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - GetBalanceV1Request, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -describe("PluginLedgerConnectorBesu", () => { - const logLevel: LogLevelDesc = "TRACE"; - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - test("can get balance of an ETH account", async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/21.1.6/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const req: GetBalanceV1Request = { address: firstHighNetWorthAccount }; - const currentBalance = await connector.getBalance(req); - expect(currentBalance).toBeTruthy(); - expect(currentBalance).toBeObject(); - expect(currentBalance).not.toBeEmptyObject(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-block.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-block.test.ts deleted file mode 100644 index fc2bbda92d..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-block.test.ts +++ /dev/null @@ -1,85 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - GetBlockV1Request, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { Account } from "web3-core"; - -describe("PluginLedgerConnectorBesu", () => { - const logLevel: LogLevelDesc = "TRACE"; - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - const keychainEntryKey = uuidv4(); - - let rpcApiHttpHost: string; - let rpcApiWsHost: string; - let web3: Web3; - let testEthAccount: Account; - let keychainEntryValue; - let connector: PluginLedgerConnectorBesu; - - beforeAll(async () => { - await besuTestLedger.start(); - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(uuidv4()); - keychainEntryValue = testEthAccount.privateKey; - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - it("can query the ledger for specific blocks", async () => { - const request: GetBlockV1Request = { blockHashOrBlockNumber: 0 }; - const response = await connector.getBlock(request); - expect(response).toBeTruthy(); - expect(response).toBeObject(); - expect(response.block).toBeObject(); - expect(response.block.number).not.toBeNull(); - expect(response.block.number).toBeNumber(); - expect(response.block.number).toBeFinite(); - expect(response.block.nonce).toBeTruthy(); - expect(response.block.nonce).toBeString(); - expect(response.block.nonce).not.toBeEmpty(); - expect(response.block.transactionsRoot).toBeString(); - expect(response.block.transactionsRoot).not.toBeEmpty(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-past-logs.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-past-logs.test.ts deleted file mode 100644 index 98385a432c..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-past-logs.test.ts +++ /dev/null @@ -1,84 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import Web3 from "web3"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - GetPastLogsV1Request, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -describe("PluginLedgerConnectorBesu", () => { - const logLevel: LogLevelDesc = "INFO"; - const log = LoggerProvider.getOrCreate({ - label: "v21-get-past-logs.test.ts", - level: logLevel, - }); - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - test("can get past logs of an account", async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/21.1.6/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const req: GetPastLogsV1Request = { address: firstHighNetWorthAccount }; - const pastLogs = await connector.getPastLogs(req); - log.debug("Past logs fetched from the Besu ledger: %o", pastLogs); - expect(pastLogs).toBeObject(); - expect(pastLogs).not.toBeEmptyObject(); - expect(pastLogs).toHaveProperty("logs", expect.toBeArrayOfSize(0)); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts deleted file mode 100644 index b7126d7f51..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts +++ /dev/null @@ -1,345 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - InvokeContractV1Request, - BesuApiClientOptions, - BesuApiClient, - GetBesuRecordV1Request, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import { AddressInfo } from "net"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { Server as SocketIoServer } from "socket.io"; - -const testCase = "get record locator"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - await besuTestLedger.start(); - - test.onFinish(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/21.1.6/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - t.comment( - `Metrics URL: ${apiHost}/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics`, - ); - - const wsBasePath = apiHost + Constants.SocketIoConnectionPathV1; - t.comment("WS base path: " + wsBasePath); - const besuApiClientOptions = new BesuApiClientOptions({ basePath: apiHost }); - const api = new BesuApiClient(besuApiClientOptions); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - t.ok(balance, "Retrieved balance of test account OK"); - t.equals(parseInt(balance, 10), 10e9, "Balance of test account is OK"); - - let contractAddress: string; - - test("deploys contract", async (t2: Test) => { - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: HelloWorldContractJson.bytecode, - gas: 1000000, - }); - t2.ok(deployOut, "deployContract() output is truthy OK"); - t2.ok( - deployOut.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t2.ok( - deployOut.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - t2.ok( - typeof contractAddress === "string", - "contractAddress typeof string OK", - ); - - const { callOutput: helloMsg } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - t2.ok(helloMsg, "sayHello() output is truthy"); - t2.true( - typeof helloMsg === "string", - "sayHello() output is type of string", - ); - }); - - test("getBesuRecord test 1", async (t2: Test) => { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - const transactionReceipt = await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - rawTransaction, - }, - }); - - const request: GetBesuRecordV1Request = { - transactionHash: transactionReceipt.transactionReceipt.transactionHash, - }; - const getInputData = await api.getBesuRecordV1(request); - t2.ok(getInputData, "API response object is truthy"); - t2.end(); - }); - - test("getBesuRecord test 2", async (t2: Test) => { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - t2.ok(setNameOut, "setName() invocation #1 output is truthy OK"); - - try { - const setNameOutInvalid = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - t2.ifError(setNameOutInvalid); - } catch (error) { - t2.notStrictEqual( - error, - "Nonce too low", - "setName() invocation with invalid nonce", - ); - } - const req: InvokeContractV1Request = { - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }; - const { callOutput: getNameOut } = await connector.getBesuRecord({ - invokeCall: req, - }); - t2.equal(getNameOut, newName, `getName() output reflects the update OK`); - - const response = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - }); - t2.ok(response, "deposit() payable invocation output is truthy OK"); - - const req2: InvokeContractV1Request = { - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }; - - const { callOutput } = await connector.getBesuRecord({ invokeCall: req2 }); - t2.equal( - callOutput, - newName, - `getNameByIndex() output reflects the update OK`, - ); - - t2.end(); - }); - - t.end(); -}); - -test("AFTER " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-invoke-contract.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-invoke-contract.test.ts deleted file mode 100644 index 39a1c27605..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-invoke-contract.test.ts +++ /dev/null @@ -1,368 +0,0 @@ -import "jest-extended"; - -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - Web3SigningCredentialCactusKeychainRef, - ReceiptType, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { Account } from "web3-core"; - -describe("PluginLedgerConnectorBesu", () => { - const logLevel: LogLevelDesc = "TRACE"; - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - const keychainEntryKey = uuidv4(); - - let rpcApiHttpHost: string; - let rpcApiWsHost: string; - let web3: Web3; - let testEthAccount: Account; - let contractAddress: string; - let firstHighNetWorthAccount: string; - let connector: PluginLedgerConnectorBesu; - let keychainPlugin: PluginKeychainMemory; - let besuKeyPair: { privateKey: string }; - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - beforeAll(async () => { - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(uuidv4()); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/21.1.6/config/src/main/resources/dev.json - */ - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const keychainEntryValue = testEthAccount.privateKey; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toEqual(10e9); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - it("deploys contract via .json file", async () => { - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: HelloWorldContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - expect(contractAddress).toBeString(); - expect(contractAddress).not.toBeEmpty(); - - const { callOutput: helloMsg } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(helloMsg).toBeTruthy(); - expect(helloMsg).toBeString(); - expect(helloMsg).not.toBeEmpty(); - }); - - it("invokes contracts with Web3SigningCredentialType.NONE", async () => { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - rawTransaction, - }, - }); - - const balance2 = await web3.eth.getBalance(testEthAccount2.address); - expect(balance2).toBeTruthy(); - expect(parseInt(balance2, 10)).toEqual(10e6); - }); - - it("invokes contracts with Web3SigningCredentialType.PrivateKeyHex", async () => { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - expect(setNameOut).toBeTruthy(); - expect(setNameOut).toBeObject(); - - const setNameOutInvalidTask = connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - - expect(setNameOutInvalidTask).rejects.toThrowWithMessage( - Error, - "Returned error: Nonce too low", - ); - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - signingCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(callOutput).toEqual(newName); - }); - - it("invokes contracts with Web3SigningCredentialType.CactusKeychainRef", async () => { - const newName = `DrCactus${uuidv4()}`; - const signingCredential: Web3SigningCredentialCactusKeychainRef = { - ethAccount: testEthAccount.address, - keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - type: Web3SigningCredentialType.CactusKeychainRef, - }; - - const setNameOut = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential, - nonce: 4, - }); - - expect(setNameOut).toBeTruthy(); - - const setNameOutInvalidTask = connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - signingCredential, - nonce: 4, - }); - - await expect(setNameOutInvalidTask).rejects.toThrowWithMessage( - Error, - "Returned error: Nonce too low", - ); - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - signingCredential, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - signingCredential, - value: 10, - }); - - expect(response).toBeTruthy(); - - const { callOutput: callOut } = await connector.invokeContract({ - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [1], - gas: 1000000, - signingCredential, - }); - - expect(callOut).toEqual(newName); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/lock-contract.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/lock-contract.test.ts deleted file mode 100644 index d70f4a4a26..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/lock-contract.test.ts +++ /dev/null @@ -1,218 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import Web3 from "web3"; -import { Account } from "web3-core"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -import LockAssetContractJson from "../../../solidity/hello-world-contract/LockAsset.json"; - -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, -} from "../../../../main/typescript/public-api"; - -const logLevel: LogLevelDesc = "INFO"; - -describe("PluginLedgerConnectorBesu", () => { - const besuTestLedger = new BesuTestLedger(); - let besuKeyPair: { privateKey: string }; - let firstHighNetWorthAccount: string; - let keychainPlugin: PluginKeychainMemory; - let testEthAccount: Account; - let connector: PluginLedgerConnectorBesu; - - beforeAll(async () => { - await besuTestLedger.start(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => { - await connector.shutdown(); - }); - - it("creates test account from scratch with seed money", async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - const web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - logLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - - expect(parseInt(balance, 10)).toEqual(10e9); - }); - - it("deploys contract via .json file, verifies lock/unlock ops", async () => { - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - - const contractAddress = deployOut.transactionReceipt.contractAddress; - expect(contractAddress).toBeString(); - expect(contractAddress).not.toBeEmpty(); - - const { success: createRes } = await connector.invokeContract({ - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: ["asset1", 5], - signingCredential: { - ethAccount: testEthAccount.address, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(createRes).toBeTruthy(); - expect(createRes).toBeTrue(); - - const { success: lockRes } = await connector.invokeContract({ - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: ["asset1"], - signingCredential: { - ethAccount: testEthAccount.address, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - - expect(lockRes).toBeTruthy(); - expect(lockRes).toEqual(true); - - const { success: unLockRes } = await connector.invokeContract({ - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "unLockAsset", - params: ["asset1"], - signingCredential: { - ethAccount: testEthAccount.address, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - - expect(unLockRes).toBeTruthy(); - expect(unLockRes).toBeTrue(); - - const { success: lockRes2 } = await connector.invokeContract({ - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: ["asset1"], - signingCredential: { - ethAccount: testEthAccount.address, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - - expect(lockRes2).toBeTruthy(); - expect(lockRes2).toBeTrue(); - - const { success: deleteRes } = await connector.invokeContract({ - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "deleteAsset", - params: ["asset1"], - signingCredential: { - ethAccount: testEthAccount.address, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - - expect(deleteRes).toBeTruthy(); - expect(deleteRes).toBeTrue(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/openapi/openapi-validation.test.ts deleted file mode 100644 index 33f24ccaa2..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/openapi/openapi-validation.test.ts +++ /dev/null @@ -1,819 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - ReceiptType, - RunTransactionRequest, - InvokeContractV1Request, - EthContractInvocationType, - DeployContractSolidityBytecodeV1Request, - SignTransactionRequest, - GetBalanceV1Request, - GetPastLogsV1Request, - GetBlockV1Request, - GetBesuRecordV1Request, - RunTransactionResponse, -} from "../../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import KeyEncoder from "key-encoder"; -import { - IListenOptions, - KeyFormat, - LogLevelDesc, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { Constants } from "@hyperledger/cactus-core-api"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import HelloWorldContractJson from "../../../../solidity/hello-world-contract/HelloWorld.json"; -import { AddressInfo } from "net"; -import { BesuApiClientOptions } from "../../../../../main/typescript/api-client/besu-api-client"; - -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; -import OAS from "../../../../../main/json/openapi.json"; -import { Account } from "web3-core"; - -const logLevel: LogLevelDesc = "TRACE"; -const testCase = "able to validate OpenAPI requests"; - -const log = LoggerProvider.getOrCreate({ - label: "connector-besu-openapi-validation.test.ts", - level: logLevel, -}); - -describe("PluginLedgerConnectorBesu", () => { - const fDeploy = "deployContractSolBytecodeV1"; - const fInvoke = "invokeContractV1"; - const fRun = "runTransactionV1"; - const fSign = "signTransactionV1"; - const fBalance = "getBalanceV1"; - const fBlock = "getBlockV1"; - const fPastLogs = "getPastLogsV1"; - const fRecord = "getBesuRecordV1"; - const cOk = "without bad request error"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainIdForSigned = uuidv4(); - const keychainIdForUnsigned = uuidv4(); - const keychainRefForSigned = uuidv4(); - const keychainRefForUnsigned = uuidv4(); - - let besuTestLedger: BesuTestLedger; - let testEthAccount2: Account; - let firstHighNetWorthAccount: string; - let apiClient: BesuApiClient; - let testEthAccount1: Account; - let httpServer: http.Server; - - beforeAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => await Servers.shutdown(httpServer)); - - beforeAll(async () => { - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - testEthAccount1 = await besuTestLedger.createEthTestAccount(); - testEthAccount2 = await besuTestLedger.createEthTestAccount(); - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - - // keychainPlugin for signed transactions - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - const signedKeychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: keychainIdForSigned, - backend: new Map([[keychainRefForSigned, pem]]), - logLevel, - }); - - // keychainPlugin for unsigned transactions - const keychainEntryValue = testEthAccount1.privateKey; - const unsignedKeychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: keychainIdForUnsigned, - backend: new Map([[keychainRefForUnsigned, keychainEntryValue]]), - logLevel, - }); - unsignedKeychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - - const pluginRegistry = new PluginRegistry({ - plugins: [signedKeychainPlugin, unsignedKeychainPlugin], - }); - - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const connector = new PluginLedgerConnectorBesu(options); - pluginRegistry.add(connector); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - httpServer = http.createServer(expressApp); - - const wsApi = new SocketIoServer(httpServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: httpServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const wsBasePath = apiHost + Constants.SocketIoConnectionPathV1; - log.info("WS base path: " + wsBasePath); - - const besuApiClientOptions = new BesuApiClientOptions({ - basePath: apiHost, - }); - apiClient = new BesuApiClient(besuApiClientOptions); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }); - - test(`${testCase} - ${fDeploy} - ${cOk}`, async () => { - const parameters = { - keychainId: keychainIdForUnsigned, - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: HelloWorldContractJson.bytecode, - gas: 1000000, - }; - const res = await apiClient.deployContractSolBytecodeV1( - parameters as DeployContractSolidityBytecodeV1Request, - ); - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - }); - - test(`${testCase} - ${fDeploy} - ${cWithoutParams}`, async () => { - const parameters = { - keychainId: keychainIdForUnsigned, - contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }; - - await expect( - apiClient.deployContractSolBytecodeV1( - parameters as unknown as DeployContractSolidityBytecodeV1Request, - ), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/contractName"), - }), - expect.objectContaining({ - path: expect.stringContaining("/body/bytecode"), - }), - expect.not.objectContaining({ - path: expect.stringContaining("/body/gas"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fDeploy} - ${cInvalidParams}`, async () => { - const parameters = { - keychainId: keychainIdForUnsigned, - contractName: HelloWorldContractJson.contractName, - contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: HelloWorldContractJson.bytecode, - gas: 1000000, - fake: 4, - }; - - await expect( - apiClient.deployContractSolBytecodeV1( - parameters as DeployContractSolidityBytecodeV1Request, - ), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ path: "/body/fake" }), - ]), - }, - }); - }); - - test(`${testCase} - ${fInvoke} - ${cOk}`, async () => { - const parameters = { - contractName: "HelloWorld", - keychainId: keychainIdForUnsigned, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - signingCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }; - const res = await apiClient.invokeContractV1( - parameters as InvokeContractV1Request, - ); - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - }); - - test(`${testCase} - ${fInvoke} - ${cWithoutParams}`, async () => { - const parameters = { - keychainId: keychainIdForUnsigned, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - signingCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }; - - await expect( - apiClient.invokeContractV1(parameters as any as InvokeContractV1Request), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/contractName"), - }), - expect.not.objectContaining({ - path: expect.stringContaining("/body/gas"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fInvoke} - ${cInvalidParams}`, async () => { - const parameters = { - contractName: "HelloWorld", - keychainId: keychainIdForUnsigned, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - signingCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - fake: 4, - }; - - await expect( - apiClient.invokeContractV1(parameters as InvokeContractV1Request), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/fake"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fRun} - ${cOk}`, async () => { - const parameters = { - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: testEthAccount1.address, - to: testEthAccount2.address, - value: 10e7, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 5000, - }, - }; - const res = await apiClient.runTransactionV1( - parameters as RunTransactionRequest, - ); - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.data).toBeObject(); - expect(res.status).toEqual(200); - }); - - test(`${testCase} - ${fRun} - ${cWithoutParams}`, async () => { - const parameters = { - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: testEthAccount1.address, - to: testEthAccount2.address, - value: 10e7, - gas: 1000000, - }, - }; - - await expect( - apiClient.runTransactionV1(parameters as RunTransactionRequest), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/consistencyStrategy"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fRun} - ${cInvalidParams}`, async () => { - const parameters = { - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: testEthAccount1.address, - to: testEthAccount2.address, - value: 10e7, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 5000, - }, - fake: 4, - }; - - await expect( - apiClient.runTransactionV1(parameters as RunTransactionRequest), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/fake"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fSign} - ${cOk}`, async () => { - const runTxRes = await apiClient.runTransactionV1({ - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.LedgerBlockAck, - timeoutMs: 5000, - }, - transactionConfig: { - from: testEthAccount1.address, - to: testEthAccount2.address, - value: 1, - gas: 10000000, - }, - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(runTxRes).toBeTruthy(); - expect(runTxRes).toBeObject(); - expect(runTxRes.status).toBeTruthy(); - expect(runTxRes.status).toEqual(200); - expect(runTxRes.data).toBeTruthy(); - - const body = runTxRes.data as unknown as { - readonly data: RunTransactionResponse; - }; - expect(body.data).toBeObject(); - expect(body.data.transactionReceipt).toBeObject(); - - const parameters = { - keychainId: keychainIdForSigned, - keychainRef: keychainRefForSigned, - transactionHash: (runTxRes.data as any).data.transactionReceipt - .transactionHash, - }; - - const res = await apiClient.signTransactionV1( - parameters as SignTransactionRequest, - ); - - expect(res).toBeTruthy(); - expect(res).toBeObject(); - expect(res.data).toBeTruthy(); - expect(res.data).toBeObject(); - expect(res.status).toEqual(200); - }); - - test(`${testCase} - ${fSign} - ${cWithoutParams}`, async () => { - const runTxRes = await apiClient.runTransactionV1({ - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.LedgerBlockAck, - timeoutMs: 5000, - }, - transactionConfig: { - from: testEthAccount1.address, - to: testEthAccount2.address, - value: 1, - gas: 10000000, - }, - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(runTxRes).toBeTruthy(); - expect(runTxRes.status).toEqual(200); - expect(runTxRes.data).toBeTruthy(); - expect((runTxRes.data as any).data.transactionReceipt).toBeTruthy(); - - const parameters = { - keychainRef: keychainRefForSigned, - transactionHash: (runTxRes.data as any).data.transactionReceipt - .transactionHash, - }; - - await expect( - apiClient.signTransactionV1(parameters as SignTransactionRequest), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/keychainId"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fSign} - ${cInvalidParams}`, async () => { - const runTxRes = await apiClient.runTransactionV1({ - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.LedgerBlockAck, - timeoutMs: 5000, - }, - transactionConfig: { - from: testEthAccount1.address, - to: testEthAccount2.address, - value: 1, - gas: 10000000, - }, - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(runTxRes).toBeTruthy(); - expect(runTxRes.status).toEqual(200); - expect(runTxRes.data).toBeTruthy(); - expect((runTxRes.data as any).data.transactionReceipt).toBeTruthy(); - - const parameters = { - keychainId: keychainIdForSigned, - keychainRef: keychainRefForSigned, - transactionHash: (runTxRes.data as any).data.transactionReceipt - .transactionHash, - fake: 4, - }; - - await expect( - apiClient.signTransactionV1(parameters as SignTransactionRequest), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/fake"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fBalance} - ${cOk}`, async () => { - const parameters = { address: firstHighNetWorthAccount }; - const res = await apiClient.getBalanceV1(parameters as GetBalanceV1Request); - expect(res.status).toEqual(200); - expect(res.data.balance).toBeTruthy(); - }); - - test(`${testCase} - ${fBalance} - ${cWithoutParams}`, async () => { - const parameters = {}; // Empty parameters object - - await expect( - apiClient.getBalanceV1(parameters as GetBalanceV1Request), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/address"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fBalance} - ${cInvalidParams}`, async () => { - const parameters = { - address: firstHighNetWorthAccount, - fake: 4, - }; - - await expect( - apiClient.getBalanceV1(parameters as GetBalanceV1Request), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/fake"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fBlock} - ${cOk}`, async () => { - const parameters = { blockHashOrBlockNumber: 0 }; - const res = await apiClient.getBlockV1(parameters as GetBlockV1Request); - expect(res.status).toEqual(200); - expect(res.data.block).toBeTruthy(); - }); - - test(`${testCase} - ${fBlock} - ${cWithoutParams}`, async () => { - const parameters = {}; // Empty parameters object - - await expect( - apiClient.getBlockV1(parameters as GetBlockV1Request), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/blockHashOrBlockNumber"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fBlock} - ${cInvalidParams}`, async () => { - const parameters = { - blockHashOrBlockNumber: 0, - fake: 4, - }; - - await expect( - apiClient.getBlockV1(parameters as GetBlockV1Request), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/fake"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fPastLogs} - ${cOk}`, async () => { - const parameters = { address: firstHighNetWorthAccount }; - const res = await apiClient.getPastLogsV1( - parameters as GetPastLogsV1Request, - ); - expect(res.status).toEqual(200); - expect(res.data.logs).toBeTruthy(); - }); - - test(`${testCase} - ${fPastLogs} - ${cWithoutParams}`, async () => { - try { - const parameters = {}; - const response = await apiClient.getPastLogsV1( - parameters as GetPastLogsV1Request, - ); - console.log( - "e.response.status should be 400 but actually is,", - response.status, - ); - } catch (e) { - expect(e.response.status).toEqual(400); - const fields = e.response.data.map((param: { readonly path: string }) => - param.path.replace("/body/", ""), - ); - expect(fields.includes("address")).toBeTrue(); - } - - //since status code is actually 200 refactored approach does not work - - // const parameters = {}; // Empty parameters object - - // await expect(apiClient.getPastLogsV1(parameters as GetPastLogsV1Request)) - // .rejects.toMatchObject({ - // response: { - // status: 400, - // data: expect.arrayContaining([ - // expect.objectContaining({ path: expect.stringContaining("/body/address") }) - // ]) - // } - // }); - }); - - test(`${testCase} - ${fPastLogs} - ${cInvalidParams}`, async () => { - const parameters = { - address: firstHighNetWorthAccount, - fake: 4, - }; - - await expect( - apiClient.getPastLogsV1(parameters as GetPastLogsV1Request), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/fake"), - }), - ]), - }, - }); - }); - - test(`${testCase} - ${fRecord} - ${cOk}`, async () => { - const runTxRes = await apiClient.runTransactionV1({ - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.LedgerBlockAck, - timeoutMs: 5000, - }, - transactionConfig: { - from: testEthAccount1.address, - to: testEthAccount2.address, - value: 1, - gas: 10000000, - }, - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(runTxRes).toBeTruthy(); - expect(runTxRes.status).toBeNumber(); - expect(runTxRes.status).toEqual(200); - expect(runTxRes.data).toBeTruthy(); - expect((runTxRes.data as any).data.transactionReceipt).toBeTruthy(); - - const parameters = { - transactionHash: (runTxRes.data as any).data.transactionReceipt - .transactionHash, - }; - const res = await apiClient.getBesuRecordV1( - parameters as GetBesuRecordV1Request, - ); - expect(res.status).toEqual(200); - expect(res.data).toBeTruthy(); - }); - - test(`${testCase} - ${fRecord} - ${cWithoutParams}`, async () => { - try { - const parameters = {}; - const response = await apiClient.getBesuRecordV1( - parameters as GetBesuRecordV1Request, - ); - console.log( - "e.response.status should be 400 but actually is,", - response.status, - ); - } catch (e) { - expect(e.response.status).toEqual(400); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - expect(fields.includes("transactionHash")).toBeTrue(); - } - - // since status code is actually 200 refactored approach does not work - - // const parameters = {}; // Empty parameters object - - // await expect(apiClient.getBesuRecordV1(parameters as GetBesuRecordV1Request)) - // .rejects.toMatchObject({ - // response: { - // status: 400, - // data: expect.arrayContaining([ - // expect.objectContaining({ path: expect.stringContaining("/body/transactionHash") }) - // ]) - // } - // }); - }); - - test(`${testCase} - ${fRecord} - ${cInvalidParams}`, async () => { - const parameters = { - transactionHash: "", - fake: 5, - }; - - await expect( - apiClient.getBesuRecordV1(parameters as GetBesuRecordV1Request), - ).rejects.toMatchObject({ - response: { - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/fake"), - }), - ]), - }, - }); - }); - - afterAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/v21-besu-get-transaction.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/v21-besu-get-transaction.test.ts deleted file mode 100644 index ff90302359..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/v21-besu-get-transaction.test.ts +++ /dev/null @@ -1,108 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredentialType, -} from "../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { GetTransactionV1Request } from "../../../../main/typescript/generated/openapi/typescript-axios/api"; - -describe("PluginLedgerConnectorBesu", () => { - const logLevel: LogLevelDesc = "TRACE"; - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - const log = LoggerProvider.getOrCreate({ - label: "v21-besu-get-transaction.test.ts", - level: logLevel, - }); - - let rpcApiHttpHost: string; - let rpcApiWsHost: string; - let firstHighNetWorthAccount: string; - - beforeAll(async () => { - await besuTestLedger.start(); - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - test("can get past logs of an account", async () => { - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const privateKey = await besuTestLedger.getGenesisAccountPrivKey(); - const { transactionReceipt } = await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.LedgerBlockAck, - timeoutMs: 60000, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const req: GetTransactionV1Request = { - transactionHash: transactionReceipt.transactionHash, - }; - const response = await connector.getTransaction(req); - log.debug("Transaction in HTTP response: %o", response.transaction); - expect(response).toBeTruthy(); - expect(response.transaction).toBeTruthy(); - - expect(response.transaction).toBeObject(); - expect(response.transaction).not.toBeEmptyObject(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts deleted file mode 100644 index c7b258e916..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Constants, PluginImportType } from "@hyperledger/cactus-core-api"; -import bodyParser from "body-parser"; -import express from "express"; -import http from "http"; -import "jest-extended"; -import { AddressInfo } from "net"; -import { Server as SocketIoServer } from "socket.io"; -import { v4 as uuidv4 } from "uuid"; -import { - BesuApiClient, - BesuApiClientOptions, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, -} from "../../../main/typescript/public-api"; - -describe(__filename, () => { - const logLevel: LogLevelDesc = "TRACE"; - - const log = LoggerProvider.getOrCreate({ - label: __filename, - level: logLevel, - }); - - const rpcApiHttpHost = "http://127.0.0.1:8000"; - const rpcApiWsHost = "ws://127.0.0.1:9000"; - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - let apiClient: BesuApiClient; - - afterAll(async () => { - await Servers.shutdown(server); - }); - - beforeAll(async () => { - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [] }), - }); - - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - await connector.registerWebServices(expressApp, wsApi); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const besuApiClientOptions = new BesuApiClientOptions({ - basePath: apiHost, - }); - apiClient = new BesuApiClient(besuApiClientOptions); - log.debug("Instantiated BesuApiClient OK"); - }); - - it("Returns a JSON document containing the Open API specification of the plugin.", async () => { - const res1Promise = apiClient.getOpenApiSpecV1(); - await expect(res1Promise).resolves.not.toThrow(); - const res1 = await res1Promise; - expect(res1.status).toEqual(200); - expect(res1.data).toBeTruthy(); - expect(res1.config).toBeTruthy(); - expect(res1.config.url).toBeString(); - log.debug("Fetched URL OK=%s", res1.config.url); - expect(res1.data).toBeObject(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-besu/tsconfig.json b/packages/cactus-plugin-ledger-connector-besu/tsconfig.json deleted file mode 100644 index c9a1259304..0000000000 --- a/packages/cactus-plugin-ledger-connector-besu/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ledger-connector-besu.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-cdl/CHANGELOG.md b/packages/cactus-plugin-ledger-connector-cdl/CHANGELOG.md deleted file mode 100644 index a829523264..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/CHANGELOG.md +++ /dev/null @@ -1,102 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-cdl - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-cdl - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-cdl - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **relay:** curl openssl added -L; upgrade openssl from 1.1.1 to 3.0.14 ([935e4b8](https://github.com/hyperledger/cacti/commit/935e4b872becb4034becd9f31cf03e958b9abbde)) -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-cdl - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Features - -* **cactus-plugin-ledger-connector-cdl:** add new connector plugin ([6efd8de](https://github.com/hyperledger/cacti/commit/6efd8de9ff5bb8d6b894147e5c6e49aed2fa8ae4)) diff --git a/packages/cactus-plugin-ledger-connector-cdl/README.md b/packages/cactus-plugin-ledger-connector-cdl/README.md deleted file mode 100644 index 35cdd735ab..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# `@hyperledger/cactus-plugin-ledger-connector-cdl` - -This plugin provides `Cacti` a way to interact with Fujitsu CDL networks. Using this you can: - -- Register new data trail. -- Get events. -- Search for events using header / global data fields as a query. - -## Summary - -- [`@hyperledger/cactus-plugin-ledger-connector-cdl`](#hyperledgercactus-plugin-ledger-connector-cdl) - - [Summary](#summary) - - [Getting Started](#getting-started) - - [Prerequisites](#prerequisites) - - [Usage](#usage) - - [Configuration](#configuration) - - [Connector Setup](#connector-setup) - - [Gateway Setup](#gateway-setup) - - [Connector Methods](#connector-methods) - - [Methods](#methods) - - [ApiClient](#apiclient) - - [REST Functions](#rest-functions) - - [Running the tests](#running-the-tests) - - [Manual Tests](#manual-tests) - - [Contributing](#contributing) - - [License](#license) - - [Acknowledgments](#acknowledgments) - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project to install the dependencies execute the command: - -```sh -npm run configure -``` - -## Usage - -To use this plugin, import public-api, create new **PluginLedgerConnectorCDL** and initialize it. - -```typescript -const connector = new PluginLedgerConnectorCDL({ - instanceId: uuidV4(), - logLevel, - cdlApiGateway: { - url: cdlUrl, - }, - cdlApiSubscriptionGateway: { - url: cdlSubscriptionUrl, - }, -}); - -// Register endpoints -await connector.getOrCreateWebServices(); -await connector.registerWebServices(expressApp); -``` - -### Configuration - -#### Connector Setup - -- `logLevel` - connector log level -- `cdlApiGateway` - configuration of regular CDL endpoint (use it if you want to use access token to authenticate) -- `cdlApiSubscriptionGateway` - configuration of CDL endpoint for applications (use it if you want to use subscriptionId to authenticate). - -#### Gateway Setup - -- `url`: Gateway URL -- `userAgent`: Value of User-Agent header sent to CDL (to identify this client). -- `skipCertCheck`: Set to true to ignore self-signed and other rejected certificates. -- `caPath`: CA of CDL API gateway server in PEM format to use. -- `serverName`: Overwrite server name from cdlApiGateway.url to match one specified in CA. - -### Connector Methods - -- Connector can be used directly through it's public methods. - -#### Methods - -```typescript -async registerHistoryData(args: RegisterHistoryDataRequestV1): Promise -async getLineage(args: GetLineageRequestV1): Promise -async searchLineageByHeader(args: SearchLineageRequestV1): Promise -async searchLineageByGlobalData(args: SearchLineageRequestV1): Promise -``` - -## ApiClient - -All connector API endpoints are defined in [open-api specification](./src/main/json/openapi.json). -See [DefaultApi](./src/main/typescript/generated/openapi/typescript-axios/api.ts) for up-to-date listing of supported endpoints. - -### REST Functions - -- `registerHistoryDataV1` -- `getLineageV1` -- `searchLineageByHeaderV1` -- `searchLineageByGlobalDataV1` - -## Running the tests - -To check that all has been installed correctly and that the plugin has no errors run jest test suites. - -- Run this command at the project's root: - -```sh -npx jest cactus-plugin-ledger-connector-cdl -``` - -### Manual Tests - -- There are no automatic tests for this plugin because there's no private instance of CDL available at a time. -- `./src/test/typescript/manual/cdl-connector-manual.test.ts` contains a Jest test script that will check every implemented operation on a running CDL service. -- **You need access to a running instance of CDL in order to run this script.** - - You can check https://en-portal.research.global.fujitsu.com/ for free test access to a service. - - Please note that rate limiting set on a service may cause some tests to fail. -- Before running the script you must update the following variables in it: - - `authInfo` - either `accessToken` or `subscriptionKey` based configuration. - - `cdlUrl / cdlSubscriptionUrl` - URL to CDL service (only base path) -- Script can be used as a quick reference for using this connector plugin. -- Since script is not part of project jest suite, to run in execute the following commands from a package dir: - - `npx tsc` - - `npx jest dist/lib/test/typescript/manual/cdl-connector-manual.test.js` - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments - -``` - -``` diff --git a/packages/cactus-plugin-ledger-connector-cdl/openapitools.json b/packages/cactus-plugin-ledger-connector-cdl/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/package.json b/packages/cactus-plugin-ledger-connector-cdl/package.json deleted file mode 100644 index 0c7cb6520d..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-ledger-connector-cdl", - "version": "2.0.0", - "description": "Allows Cacti nodes to connect to Fujitsu CDL.", - "keywords": [ - "Hyperledger", - "Cacti", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-ledger-connector-cdl.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "sanitize-html": "2.12.1" - }, - "devDependencies": { - "@types/express": "5.0.0", - "@types/node": "18.11.9", - "@types/sanitize-html": "2.6.2", - "body-parser": "1.20.3", - "express": "4.21.0", - "jest-extended": "4.0.1", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-ledger-connector-cdl.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-ledger-connector-cdl.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index f21f7bb062..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,26 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_auth_info_access_token_v1.go -model_auth_info_subscription_key_v1.go -model_auth_info_v1.go -model_cdl_common_response_v1.go -model_error_exception_response_v1.go -model_event_lineage_v1.go -model_gateway_configuration_v1.go -model_get_lineage_option_direction_v1.go -model_get_lineage_request_v1.go -model_get_lineage_response_v1.go -model_register_history_data_request_v1.go -model_register_history_data_v1_response.go -model_search_lineage_request_v1.go -model_search_lineage_response_v1.go -model_search_lineage_type_v1.go -model_trail_event_details_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 1392c70841..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,130 +0,0 @@ -# Go API client for cactus-plugin-ledger-connector-cdl - -Can perform basic tasks on Fujitsu CDL service. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-ledger-connector-cdl "github.com/hyperledger/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-cdl.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-cdl.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-cdl.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-ledger-connector-cdl.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**GetLineageV1**](docs/DefaultApi.md#getlineagev1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage | Get lineage trail from CDL. -*DefaultApi* | [**RegisterHistoryDataV1**](docs/DefaultApi.md#registerhistorydatav1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data | Register new data trail on CDL -*DefaultApi* | [**SearchLineageByGlobalDataV1**](docs/DefaultApi.md#searchlineagebyglobaldatav1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata | Search lineage using global data fields. -*DefaultApi* | [**SearchLineageByHeaderV1**](docs/DefaultApi.md#searchlineagebyheaderv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header | Search lineage using header fields. - - -## Documentation For Models - - - [AuthInfoAccessTokenV1](docs/AuthInfoAccessTokenV1.md) - - [AuthInfoSubscriptionKeyV1](docs/AuthInfoSubscriptionKeyV1.md) - - [AuthInfoV1](docs/AuthInfoV1.md) - - [CDLCommonResponseV1](docs/CDLCommonResponseV1.md) - - [ErrorExceptionResponseV1](docs/ErrorExceptionResponseV1.md) - - [EventLineageV1](docs/EventLineageV1.md) - - [GatewayConfigurationV1](docs/GatewayConfigurationV1.md) - - [GetLineageOptionDirectionV1](docs/GetLineageOptionDirectionV1.md) - - [GetLineageRequestV1](docs/GetLineageRequestV1.md) - - [GetLineageResponseV1](docs/GetLineageResponseV1.md) - - [RegisterHistoryDataRequestV1](docs/RegisterHistoryDataRequestV1.md) - - [RegisterHistoryDataV1Response](docs/RegisterHistoryDataV1Response.md) - - [SearchLineageRequestV1](docs/SearchLineageRequestV1.md) - - [SearchLineageResponseV1](docs/SearchLineageResponseV1.md) - - [SearchLineageTypeV1](docs/SearchLineageTypeV1.md) - - [TrailEventDetailsV1](docs/TrailEventDetailsV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index c26aa8e2ac..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,498 +0,0 @@ -openapi: 3.0.3 -info: - description: Can perform basic tasks on Fujitsu CDL service. - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cacti Plugin - Connector CDL - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data: - post: - operationId: registerHistoryDataV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterHistoryDataRequestV1' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterHistoryDataV1Response' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Register new data trail on CDL - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage: - post: - operationId: getLineageV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetLineageRequestV1' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetLineageResponseV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Get lineage trail from CDL. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header: - post: - operationId: searchLineageByHeaderV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SearchLineageRequestV1' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SearchLineageResponseV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Search lineage using header fields. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata: - post: - operationId: searchLineageByGlobalDataV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SearchLineageRequestV1' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SearchLineageResponseV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Search lineage using global data fields. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata -components: - schemas: - GetLineageOptionDirectionV1: - enum: - - backward - - forward - - both - type: string - x-enum-varnames: - - Backward - - Forward - - Both - SearchLineageTypeV1: - enum: - - exactmatch - - partialmatch - - regexpmatch - type: string - x-enum-varnames: - - ExactMatch - - PartialMatch - - RegexMatch - GatewayConfigurationV1: - properties: - url: - description: Gateway URL - nullable: false - type: string - userAgent: - description: Value of User-Agent header sent to CDL (to identify this client) - nullable: false - type: string - skipCertCheck: - default: false - description: Set to true to ignore self-signed and other rejected certificates - nullable: false - type: boolean - caPath: - description: CA of CDL API gateway server in PEM format to use - nullable: false - type: string - serverName: - description: Overwrite server name from cdlApiGateway.url to match one specified - in CA - nullable: false - type: string - required: - - url - type: object - AuthInfoAccessTokenV1: - properties: - accessToken: - nullable: false - type: string - trustAgentId: - nullable: false - type: string - required: - - accessToken - - trustAgentId - type: object - AuthInfoSubscriptionKeyV1: - properties: - subscriptionKey: - nullable: false - type: string - trustAgentId: - nullable: false - type: string - trustAgentRole: - nullable: false - type: string - trustUserId: - nullable: false - type: string - trustUserRole: - nullable: false - type: string - required: - - subscriptionKey - - trustAgentId - - trustAgentRole - - trustUserId - - trustUserRole - type: object - AuthInfoV1: - oneOf: - - $ref: '#/components/schemas/AuthInfoAccessTokenV1' - - $ref: '#/components/schemas/AuthInfoSubscriptionKeyV1' - type: object - EventLineageV1: - description: CDL event linage information (used to identify related events) - example: - cdl:NextEventIdList: - - "" - - "" - cdl:DataModelMode: "" - cdl:EventId: "" - cdl:PreviousEventIdList: - - "" - - "" - cdl:LineageId: "" - cdl:DataRegistrationTimeStamp: "" - cdl:DataModelVersion: "" - properties: - cdl:EventId: - nullable: false - type: ' string' - cdl:LineageId: - nullable: false - type: ' string' - cdl:DataModelMode: - nullable: false - type: ' string' - cdl:DataModelVersion: - nullable: false - type: ' string' - cdl:DataRegistrationTimeStamp: - nullable: false - type: ' string' - cdl:NextEventIdList: - items: - nullable: false - type: ' string' - type: array - cdl:PreviousEventIdList: - items: - nullable: false - type: ' string' - type: array - required: - - cdl:DataModelMode - - cdl:DataModelVersion - - cdl:DataRegistrationTimeStamp - - cdl:EventId - - cdl:LineageId - - cdl:NextEventIdList - - cdl:PreviousEventIdList - type: object - TrailEventDetailsV1: - description: Details of newly created CDL event. - example: - cdl:Event: "" - cdl:Lineage: - cdl:NextEventIdList: - - "" - - "" - cdl:DataModelMode: "" - cdl:EventId: "" - cdl:PreviousEventIdList: - - "" - - "" - cdl:LineageId: "" - cdl:DataRegistrationTimeStamp: "" - cdl:DataModelVersion: "" - cdl:Verification: "" - cdl:Tags: "" - properties: - cdl:Event: - nullable: false - cdl:Lineage: - $ref: '#/components/schemas/EventLineageV1' - cdl:Tags: - nullable: false - cdl:Verification: - nullable: false - required: - - cdl:Lineage - - cdl:Tags - - cdl:Verification - type: object - CDLCommonResponseV1: - properties: - detail: - nullable: false - result: - nullable: false - type: ' string' - required: - - result - type: object - RegisterHistoryDataRequestV1: - example: - eventId: eventId - lineageId: lineageId - properties: "" - authInfo: null - tags: "" - properties: - authInfo: - $ref: '#/components/schemas/AuthInfoV1' - eventId: - nullable: false - type: string - lineageId: - nullable: false - type: string - tags: - nullable: false - properties: - nullable: false - required: - - authInfo - type: object - RegisterHistoryDataV1Response: - example: - result: "" - detail: - cdl:Event: "" - cdl:Lineage: - cdl:NextEventIdList: - - "" - - "" - cdl:DataModelMode: "" - cdl:EventId: "" - cdl:PreviousEventIdList: - - "" - - "" - cdl:LineageId: "" - cdl:DataRegistrationTimeStamp: "" - cdl:DataModelVersion: "" - cdl:Verification: "" - cdl:Tags: "" - properties: - detail: - $ref: '#/components/schemas/TrailEventDetailsV1' - result: - nullable: false - type: ' string' - required: - - detail - - result - type: object - GetLineageRequestV1: - example: - eventId: eventId - depth: "-1" - authInfo: null - direction: null - properties: - authInfo: - $ref: '#/components/schemas/AuthInfoV1' - eventId: - nullable: false - type: string - direction: - $ref: '#/components/schemas/GetLineageOptionDirectionV1' - depth: - default: "-1" - nullable: false - type: string - required: - - authInfo - - eventId - type: object - GetLineageResponseV1: - example: - result: "" - detail: - - cdl:Event: "" - cdl:Lineage: - cdl:NextEventIdList: - - "" - - "" - cdl:DataModelMode: "" - cdl:EventId: "" - cdl:PreviousEventIdList: - - "" - - "" - cdl:LineageId: "" - cdl:DataRegistrationTimeStamp: "" - cdl:DataModelVersion: "" - cdl:Verification: "" - cdl:Tags: "" - - cdl:Event: "" - cdl:Lineage: - cdl:NextEventIdList: - - "" - - "" - cdl:DataModelMode: "" - cdl:EventId: "" - cdl:PreviousEventIdList: - - "" - - "" - cdl:LineageId: "" - cdl:DataRegistrationTimeStamp: "" - cdl:DataModelVersion: "" - cdl:Verification: "" - cdl:Tags: "" - properties: - detail: - items: - $ref: '#/components/schemas/TrailEventDetailsV1' - type: array - result: - nullable: false - type: ' string' - required: - - detail - - result - type: object - SearchLineageRequestV1: - example: - searchType: null - fields: "" - authInfo: null - properties: - authInfo: - $ref: '#/components/schemas/AuthInfoV1' - searchType: - $ref: '#/components/schemas/SearchLineageTypeV1' - fields: - nullable: false - required: - - authInfo - - fields - - searchType - type: object - SearchLineageResponseV1: - example: - result: "" - detail: - - cdl:Event: "" - cdl:Lineage: - cdl:NextEventIdList: - - "" - - "" - cdl:DataModelMode: "" - cdl:EventId: "" - cdl:PreviousEventIdList: - - "" - - "" - cdl:LineageId: "" - cdl:DataRegistrationTimeStamp: "" - cdl:DataModelVersion: "" - cdl:Verification: "" - cdl:Tags: "" - - cdl:Event: "" - cdl:Lineage: - cdl:NextEventIdList: - - "" - - "" - cdl:DataModelMode: "" - cdl:EventId: "" - cdl:PreviousEventIdList: - - "" - - "" - cdl:LineageId: "" - cdl:DataRegistrationTimeStamp: "" - cdl:DataModelVersion: "" - cdl:Verification: "" - cdl:Tags: "" - properties: - detail: - items: - $ref: '#/components/schemas/TrailEventDetailsV1' - type: array - result: - nullable: false - type: ' string' - required: - - detail - - result - type: object - ErrorExceptionResponseV1: - description: Error response from the connector. - properties: - message: - description: Short error description message. - nullable: false - type: string - error: - description: Detailed error information. - nullable: false - type: string - required: - - error - - message - type: object diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 0ef4d22754..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,483 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiGetLineageV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getLineageRequestV1 *GetLineageRequestV1 -} - -func (r ApiGetLineageV1Request) GetLineageRequestV1(getLineageRequestV1 GetLineageRequestV1) ApiGetLineageV1Request { - r.getLineageRequestV1 = &getLineageRequestV1 - return r -} - -func (r ApiGetLineageV1Request) Execute() (*GetLineageResponseV1, *http.Response, error) { - return r.ApiService.GetLineageV1Execute(r) -} - -/* -GetLineageV1 Get lineage trail from CDL. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetLineageV1Request -*/ -func (a *DefaultApiService) GetLineageV1(ctx context.Context) ApiGetLineageV1Request { - return ApiGetLineageV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetLineageResponseV1 -func (a *DefaultApiService) GetLineageV1Execute(r ApiGetLineageV1Request) (*GetLineageResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetLineageResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetLineageV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getLineageRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRegisterHistoryDataV1Request struct { - ctx context.Context - ApiService *DefaultApiService - registerHistoryDataRequestV1 *RegisterHistoryDataRequestV1 -} - -func (r ApiRegisterHistoryDataV1Request) RegisterHistoryDataRequestV1(registerHistoryDataRequestV1 RegisterHistoryDataRequestV1) ApiRegisterHistoryDataV1Request { - r.registerHistoryDataRequestV1 = ®isterHistoryDataRequestV1 - return r -} - -func (r ApiRegisterHistoryDataV1Request) Execute() (*RegisterHistoryDataV1Response, *http.Response, error) { - return r.ApiService.RegisterHistoryDataV1Execute(r) -} - -/* -RegisterHistoryDataV1 Register new data trail on CDL - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRegisterHistoryDataV1Request -*/ -func (a *DefaultApiService) RegisterHistoryDataV1(ctx context.Context) ApiRegisterHistoryDataV1Request { - return ApiRegisterHistoryDataV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RegisterHistoryDataV1Response -func (a *DefaultApiService) RegisterHistoryDataV1Execute(r ApiRegisterHistoryDataV1Request) (*RegisterHistoryDataV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RegisterHistoryDataV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RegisterHistoryDataV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.registerHistoryDataRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSearchLineageByGlobalDataV1Request struct { - ctx context.Context - ApiService *DefaultApiService - searchLineageRequestV1 *SearchLineageRequestV1 -} - -func (r ApiSearchLineageByGlobalDataV1Request) SearchLineageRequestV1(searchLineageRequestV1 SearchLineageRequestV1) ApiSearchLineageByGlobalDataV1Request { - r.searchLineageRequestV1 = &searchLineageRequestV1 - return r -} - -func (r ApiSearchLineageByGlobalDataV1Request) Execute() (*SearchLineageResponseV1, *http.Response, error) { - return r.ApiService.SearchLineageByGlobalDataV1Execute(r) -} - -/* -SearchLineageByGlobalDataV1 Search lineage using global data fields. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSearchLineageByGlobalDataV1Request -*/ -func (a *DefaultApiService) SearchLineageByGlobalDataV1(ctx context.Context) ApiSearchLineageByGlobalDataV1Request { - return ApiSearchLineageByGlobalDataV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SearchLineageResponseV1 -func (a *DefaultApiService) SearchLineageByGlobalDataV1Execute(r ApiSearchLineageByGlobalDataV1Request) (*SearchLineageResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SearchLineageResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SearchLineageByGlobalDataV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.searchLineageRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSearchLineageByHeaderV1Request struct { - ctx context.Context - ApiService *DefaultApiService - searchLineageRequestV1 *SearchLineageRequestV1 -} - -func (r ApiSearchLineageByHeaderV1Request) SearchLineageRequestV1(searchLineageRequestV1 SearchLineageRequestV1) ApiSearchLineageByHeaderV1Request { - r.searchLineageRequestV1 = &searchLineageRequestV1 - return r -} - -func (r ApiSearchLineageByHeaderV1Request) Execute() (*SearchLineageResponseV1, *http.Response, error) { - return r.ApiService.SearchLineageByHeaderV1Execute(r) -} - -/* -SearchLineageByHeaderV1 Search lineage using header fields. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSearchLineageByHeaderV1Request -*/ -func (a *DefaultApiService) SearchLineageByHeaderV1(ctx context.Context) ApiSearchLineageByHeaderV1Request { - return ApiSearchLineageByHeaderV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SearchLineageResponseV1 -func (a *DefaultApiService) SearchLineageByHeaderV1Execute(r ApiSearchLineageByHeaderV1Request) (*SearchLineageResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SearchLineageResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SearchLineageByHeaderV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.searchLineageRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 18091a1dd4..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cacti Plugin - Connector CDL API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 3f1ff1bfb1..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 011eb8681a..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_auth_info_access_token_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_auth_info_access_token_v1.go deleted file mode 100644 index af3cac4a0f..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_auth_info_access_token_v1.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the AuthInfoAccessTokenV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthInfoAccessTokenV1{} - -// AuthInfoAccessTokenV1 struct for AuthInfoAccessTokenV1 -type AuthInfoAccessTokenV1 struct { - AccessToken string `json:"accessToken"` - TrustAgentId string `json:"trustAgentId"` -} - -// NewAuthInfoAccessTokenV1 instantiates a new AuthInfoAccessTokenV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuthInfoAccessTokenV1(accessToken string, trustAgentId string) *AuthInfoAccessTokenV1 { - this := AuthInfoAccessTokenV1{} - this.AccessToken = accessToken - this.TrustAgentId = trustAgentId - return &this -} - -// NewAuthInfoAccessTokenV1WithDefaults instantiates a new AuthInfoAccessTokenV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuthInfoAccessTokenV1WithDefaults() *AuthInfoAccessTokenV1 { - this := AuthInfoAccessTokenV1{} - return &this -} - -// GetAccessToken returns the AccessToken field value -func (o *AuthInfoAccessTokenV1) GetAccessToken() string { - if o == nil { - var ret string - return ret - } - - return o.AccessToken -} - -// GetAccessTokenOk returns a tuple with the AccessToken field value -// and a boolean to check if the value has been set. -func (o *AuthInfoAccessTokenV1) GetAccessTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccessToken, true -} - -// SetAccessToken sets field value -func (o *AuthInfoAccessTokenV1) SetAccessToken(v string) { - o.AccessToken = v -} - -// GetTrustAgentId returns the TrustAgentId field value -func (o *AuthInfoAccessTokenV1) GetTrustAgentId() string { - if o == nil { - var ret string - return ret - } - - return o.TrustAgentId -} - -// GetTrustAgentIdOk returns a tuple with the TrustAgentId field value -// and a boolean to check if the value has been set. -func (o *AuthInfoAccessTokenV1) GetTrustAgentIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TrustAgentId, true -} - -// SetTrustAgentId sets field value -func (o *AuthInfoAccessTokenV1) SetTrustAgentId(v string) { - o.TrustAgentId = v -} - -func (o AuthInfoAccessTokenV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuthInfoAccessTokenV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["accessToken"] = o.AccessToken - toSerialize["trustAgentId"] = o.TrustAgentId - return toSerialize, nil -} - -type NullableAuthInfoAccessTokenV1 struct { - value *AuthInfoAccessTokenV1 - isSet bool -} - -func (v NullableAuthInfoAccessTokenV1) Get() *AuthInfoAccessTokenV1 { - return v.value -} - -func (v *NullableAuthInfoAccessTokenV1) Set(val *AuthInfoAccessTokenV1) { - v.value = val - v.isSet = true -} - -func (v NullableAuthInfoAccessTokenV1) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthInfoAccessTokenV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthInfoAccessTokenV1(val *AuthInfoAccessTokenV1) *NullableAuthInfoAccessTokenV1 { - return &NullableAuthInfoAccessTokenV1{value: val, isSet: true} -} - -func (v NullableAuthInfoAccessTokenV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthInfoAccessTokenV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_auth_info_subscription_key_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_auth_info_subscription_key_v1.go deleted file mode 100644 index 9a827232bf..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_auth_info_subscription_key_v1.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the AuthInfoSubscriptionKeyV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthInfoSubscriptionKeyV1{} - -// AuthInfoSubscriptionKeyV1 struct for AuthInfoSubscriptionKeyV1 -type AuthInfoSubscriptionKeyV1 struct { - SubscriptionKey string `json:"subscriptionKey"` - TrustAgentId string `json:"trustAgentId"` - TrustAgentRole string `json:"trustAgentRole"` - TrustUserId string `json:"trustUserId"` - TrustUserRole string `json:"trustUserRole"` -} - -// NewAuthInfoSubscriptionKeyV1 instantiates a new AuthInfoSubscriptionKeyV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuthInfoSubscriptionKeyV1(subscriptionKey string, trustAgentId string, trustAgentRole string, trustUserId string, trustUserRole string) *AuthInfoSubscriptionKeyV1 { - this := AuthInfoSubscriptionKeyV1{} - this.SubscriptionKey = subscriptionKey - this.TrustAgentId = trustAgentId - this.TrustAgentRole = trustAgentRole - this.TrustUserId = trustUserId - this.TrustUserRole = trustUserRole - return &this -} - -// NewAuthInfoSubscriptionKeyV1WithDefaults instantiates a new AuthInfoSubscriptionKeyV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuthInfoSubscriptionKeyV1WithDefaults() *AuthInfoSubscriptionKeyV1 { - this := AuthInfoSubscriptionKeyV1{} - return &this -} - -// GetSubscriptionKey returns the SubscriptionKey field value -func (o *AuthInfoSubscriptionKeyV1) GetSubscriptionKey() string { - if o == nil { - var ret string - return ret - } - - return o.SubscriptionKey -} - -// GetSubscriptionKeyOk returns a tuple with the SubscriptionKey field value -// and a boolean to check if the value has been set. -func (o *AuthInfoSubscriptionKeyV1) GetSubscriptionKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubscriptionKey, true -} - -// SetSubscriptionKey sets field value -func (o *AuthInfoSubscriptionKeyV1) SetSubscriptionKey(v string) { - o.SubscriptionKey = v -} - -// GetTrustAgentId returns the TrustAgentId field value -func (o *AuthInfoSubscriptionKeyV1) GetTrustAgentId() string { - if o == nil { - var ret string - return ret - } - - return o.TrustAgentId -} - -// GetTrustAgentIdOk returns a tuple with the TrustAgentId field value -// and a boolean to check if the value has been set. -func (o *AuthInfoSubscriptionKeyV1) GetTrustAgentIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TrustAgentId, true -} - -// SetTrustAgentId sets field value -func (o *AuthInfoSubscriptionKeyV1) SetTrustAgentId(v string) { - o.TrustAgentId = v -} - -// GetTrustAgentRole returns the TrustAgentRole field value -func (o *AuthInfoSubscriptionKeyV1) GetTrustAgentRole() string { - if o == nil { - var ret string - return ret - } - - return o.TrustAgentRole -} - -// GetTrustAgentRoleOk returns a tuple with the TrustAgentRole field value -// and a boolean to check if the value has been set. -func (o *AuthInfoSubscriptionKeyV1) GetTrustAgentRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TrustAgentRole, true -} - -// SetTrustAgentRole sets field value -func (o *AuthInfoSubscriptionKeyV1) SetTrustAgentRole(v string) { - o.TrustAgentRole = v -} - -// GetTrustUserId returns the TrustUserId field value -func (o *AuthInfoSubscriptionKeyV1) GetTrustUserId() string { - if o == nil { - var ret string - return ret - } - - return o.TrustUserId -} - -// GetTrustUserIdOk returns a tuple with the TrustUserId field value -// and a boolean to check if the value has been set. -func (o *AuthInfoSubscriptionKeyV1) GetTrustUserIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TrustUserId, true -} - -// SetTrustUserId sets field value -func (o *AuthInfoSubscriptionKeyV1) SetTrustUserId(v string) { - o.TrustUserId = v -} - -// GetTrustUserRole returns the TrustUserRole field value -func (o *AuthInfoSubscriptionKeyV1) GetTrustUserRole() string { - if o == nil { - var ret string - return ret - } - - return o.TrustUserRole -} - -// GetTrustUserRoleOk returns a tuple with the TrustUserRole field value -// and a boolean to check if the value has been set. -func (o *AuthInfoSubscriptionKeyV1) GetTrustUserRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TrustUserRole, true -} - -// SetTrustUserRole sets field value -func (o *AuthInfoSubscriptionKeyV1) SetTrustUserRole(v string) { - o.TrustUserRole = v -} - -func (o AuthInfoSubscriptionKeyV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuthInfoSubscriptionKeyV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subscriptionKey"] = o.SubscriptionKey - toSerialize["trustAgentId"] = o.TrustAgentId - toSerialize["trustAgentRole"] = o.TrustAgentRole - toSerialize["trustUserId"] = o.TrustUserId - toSerialize["trustUserRole"] = o.TrustUserRole - return toSerialize, nil -} - -type NullableAuthInfoSubscriptionKeyV1 struct { - value *AuthInfoSubscriptionKeyV1 - isSet bool -} - -func (v NullableAuthInfoSubscriptionKeyV1) Get() *AuthInfoSubscriptionKeyV1 { - return v.value -} - -func (v *NullableAuthInfoSubscriptionKeyV1) Set(val *AuthInfoSubscriptionKeyV1) { - v.value = val - v.isSet = true -} - -func (v NullableAuthInfoSubscriptionKeyV1) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthInfoSubscriptionKeyV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthInfoSubscriptionKeyV1(val *AuthInfoSubscriptionKeyV1) *NullableAuthInfoSubscriptionKeyV1 { - return &NullableAuthInfoSubscriptionKeyV1{value: val, isSet: true} -} - -func (v NullableAuthInfoSubscriptionKeyV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthInfoSubscriptionKeyV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_auth_info_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_auth_info_v1.go deleted file mode 100644 index 0e138490f0..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_auth_info_v1.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" - "fmt" -) - -// AuthInfoV1 - struct for AuthInfoV1 -type AuthInfoV1 struct { - AuthInfoAccessTokenV1 *AuthInfoAccessTokenV1 - AuthInfoSubscriptionKeyV1 *AuthInfoSubscriptionKeyV1 -} - -// AuthInfoAccessTokenV1AsAuthInfoV1 is a convenience function that returns AuthInfoAccessTokenV1 wrapped in AuthInfoV1 -func AuthInfoAccessTokenV1AsAuthInfoV1(v *AuthInfoAccessTokenV1) AuthInfoV1 { - return AuthInfoV1{ - AuthInfoAccessTokenV1: v, - } -} - -// AuthInfoSubscriptionKeyV1AsAuthInfoV1 is a convenience function that returns AuthInfoSubscriptionKeyV1 wrapped in AuthInfoV1 -func AuthInfoSubscriptionKeyV1AsAuthInfoV1(v *AuthInfoSubscriptionKeyV1) AuthInfoV1 { - return AuthInfoV1{ - AuthInfoSubscriptionKeyV1: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *AuthInfoV1) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into AuthInfoAccessTokenV1 - err = newStrictDecoder(data).Decode(&dst.AuthInfoAccessTokenV1) - if err == nil { - jsonAuthInfoAccessTokenV1, _ := json.Marshal(dst.AuthInfoAccessTokenV1) - if string(jsonAuthInfoAccessTokenV1) == "{}" { // empty struct - dst.AuthInfoAccessTokenV1 = nil - } else { - match++ - } - } else { - dst.AuthInfoAccessTokenV1 = nil - } - - // try to unmarshal data into AuthInfoSubscriptionKeyV1 - err = newStrictDecoder(data).Decode(&dst.AuthInfoSubscriptionKeyV1) - if err == nil { - jsonAuthInfoSubscriptionKeyV1, _ := json.Marshal(dst.AuthInfoSubscriptionKeyV1) - if string(jsonAuthInfoSubscriptionKeyV1) == "{}" { // empty struct - dst.AuthInfoSubscriptionKeyV1 = nil - } else { - match++ - } - } else { - dst.AuthInfoSubscriptionKeyV1 = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.AuthInfoAccessTokenV1 = nil - dst.AuthInfoSubscriptionKeyV1 = nil - - return fmt.Errorf("data matches more than one schema in oneOf(AuthInfoV1)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(AuthInfoV1)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src AuthInfoV1) MarshalJSON() ([]byte, error) { - if src.AuthInfoAccessTokenV1 != nil { - return json.Marshal(&src.AuthInfoAccessTokenV1) - } - - if src.AuthInfoSubscriptionKeyV1 != nil { - return json.Marshal(&src.AuthInfoSubscriptionKeyV1) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *AuthInfoV1) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.AuthInfoAccessTokenV1 != nil { - return obj.AuthInfoAccessTokenV1 - } - - if obj.AuthInfoSubscriptionKeyV1 != nil { - return obj.AuthInfoSubscriptionKeyV1 - } - - // all schemas are nil - return nil -} - -type NullableAuthInfoV1 struct { - value *AuthInfoV1 - isSet bool -} - -func (v NullableAuthInfoV1) Get() *AuthInfoV1 { - return v.value -} - -func (v *NullableAuthInfoV1) Set(val *AuthInfoV1) { - v.value = val - v.isSet = true -} - -func (v NullableAuthInfoV1) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthInfoV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthInfoV1(val *AuthInfoV1) *NullableAuthInfoV1 { - return &NullableAuthInfoV1{value: val, isSet: true} -} - -func (v NullableAuthInfoV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthInfoV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_cdl_common_response_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_cdl_common_response_v1.go deleted file mode 100644 index 8962a6576f..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_cdl_common_response_v1.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the CDLCommonResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CDLCommonResponseV1{} - -// CDLCommonResponseV1 struct for CDLCommonResponseV1 -type CDLCommonResponseV1 struct { - Detail interface{} `json:"detail,omitempty"` - Result String `json:"result"` -} - -// NewCDLCommonResponseV1 instantiates a new CDLCommonResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCDLCommonResponseV1(result String) *CDLCommonResponseV1 { - this := CDLCommonResponseV1{} - this.Result = result - return &this -} - -// NewCDLCommonResponseV1WithDefaults instantiates a new CDLCommonResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCDLCommonResponseV1WithDefaults() *CDLCommonResponseV1 { - this := CDLCommonResponseV1{} - return &this -} - -// GetDetail returns the Detail field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CDLCommonResponseV1) GetDetail() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Detail -} - -// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CDLCommonResponseV1) GetDetailOk() (*interface{}, bool) { - if o == nil || IsNil(o.Detail) { - return nil, false - } - return &o.Detail, true -} - -// HasDetail returns a boolean if a field has been set. -func (o *CDLCommonResponseV1) HasDetail() bool { - if o != nil && IsNil(o.Detail) { - return true - } - - return false -} - -// SetDetail gets a reference to the given interface{} and assigns it to the Detail field. -func (o *CDLCommonResponseV1) SetDetail(v interface{}) { - o.Detail = v -} - -// GetResult returns the Result field value -func (o *CDLCommonResponseV1) GetResult() String { - if o == nil { - var ret String - return ret - } - - return o.Result -} - -// GetResultOk returns a tuple with the Result field value -// and a boolean to check if the value has been set. -func (o *CDLCommonResponseV1) GetResultOk() (*String, bool) { - if o == nil { - return nil, false - } - return &o.Result, true -} - -// SetResult sets field value -func (o *CDLCommonResponseV1) SetResult(v String) { - o.Result = v -} - -func (o CDLCommonResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CDLCommonResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Detail != nil { - toSerialize["detail"] = o.Detail - } - toSerialize["result"] = o.Result - return toSerialize, nil -} - -type NullableCDLCommonResponseV1 struct { - value *CDLCommonResponseV1 - isSet bool -} - -func (v NullableCDLCommonResponseV1) Get() *CDLCommonResponseV1 { - return v.value -} - -func (v *NullableCDLCommonResponseV1) Set(val *CDLCommonResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableCDLCommonResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableCDLCommonResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCDLCommonResponseV1(val *CDLCommonResponseV1) *NullableCDLCommonResponseV1 { - return &NullableCDLCommonResponseV1{value: val, isSet: true} -} - -func (v NullableCDLCommonResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCDLCommonResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go deleted file mode 100644 index 57b409209d..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the ErrorExceptionResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorExceptionResponseV1{} - -// ErrorExceptionResponseV1 Error response from the connector. -type ErrorExceptionResponseV1 struct { - // Short error description message. - Message string `json:"message"` - // Detailed error information. - Error string `json:"error"` -} - -// NewErrorExceptionResponseV1 instantiates a new ErrorExceptionResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorExceptionResponseV1(message string, error_ string) *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - this.Message = message - this.Error = error_ - return &this -} - -// NewErrorExceptionResponseV1WithDefaults instantiates a new ErrorExceptionResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorExceptionResponseV1WithDefaults() *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - return &this -} - -// GetMessage returns the Message field value -func (o *ErrorExceptionResponseV1) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ErrorExceptionResponseV1) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -func (o *ErrorExceptionResponseV1) GetError() string { - if o == nil { - var ret string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ErrorExceptionResponseV1) SetError(v string) { - o.Error = v -} - -func (o ErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorExceptionResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error - return toSerialize, nil -} - -type NullableErrorExceptionResponseV1 struct { - value *ErrorExceptionResponseV1 - isSet bool -} - -func (v NullableErrorExceptionResponseV1) Get() *ErrorExceptionResponseV1 { - return v.value -} - -func (v *NullableErrorExceptionResponseV1) Set(val *ErrorExceptionResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableErrorExceptionResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorExceptionResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorExceptionResponseV1(val *ErrorExceptionResponseV1) *NullableErrorExceptionResponseV1 { - return &NullableErrorExceptionResponseV1{value: val, isSet: true} -} - -func (v NullableErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorExceptionResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_event_lineage_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_event_lineage_v1.go deleted file mode 100644 index cfe62669f2..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_event_lineage_v1.go +++ /dev/null @@ -1,279 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the EventLineageV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EventLineageV1{} - -// EventLineageV1 CDL event linage information (used to identify related events) -type EventLineageV1 struct { - CdlEventId String `json:"cdl:EventId"` - CdlLineageId String `json:"cdl:LineageId"` - CdlDataModelMode String `json:"cdl:DataModelMode"` - CdlDataModelVersion String `json:"cdl:DataModelVersion"` - CdlDataRegistrationTimeStamp String `json:"cdl:DataRegistrationTimeStamp"` - CdlNextEventIdList []String `json:"cdl:NextEventIdList"` - CdlPreviousEventIdList []String `json:"cdl:PreviousEventIdList"` -} - -// NewEventLineageV1 instantiates a new EventLineageV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewEventLineageV1(cdlEventId String, cdlLineageId String, cdlDataModelMode String, cdlDataModelVersion String, cdlDataRegistrationTimeStamp String, cdlNextEventIdList []String, cdlPreviousEventIdList []String) *EventLineageV1 { - this := EventLineageV1{} - this.CdlEventId = cdlEventId - this.CdlLineageId = cdlLineageId - this.CdlDataModelMode = cdlDataModelMode - this.CdlDataModelVersion = cdlDataModelVersion - this.CdlDataRegistrationTimeStamp = cdlDataRegistrationTimeStamp - this.CdlNextEventIdList = cdlNextEventIdList - this.CdlPreviousEventIdList = cdlPreviousEventIdList - return &this -} - -// NewEventLineageV1WithDefaults instantiates a new EventLineageV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewEventLineageV1WithDefaults() *EventLineageV1 { - this := EventLineageV1{} - return &this -} - -// GetCdlEventId returns the CdlEventId field value -func (o *EventLineageV1) GetCdlEventId() String { - if o == nil { - var ret String - return ret - } - - return o.CdlEventId -} - -// GetCdlEventIdOk returns a tuple with the CdlEventId field value -// and a boolean to check if the value has been set. -func (o *EventLineageV1) GetCdlEventIdOk() (*String, bool) { - if o == nil { - return nil, false - } - return &o.CdlEventId, true -} - -// SetCdlEventId sets field value -func (o *EventLineageV1) SetCdlEventId(v String) { - o.CdlEventId = v -} - -// GetCdlLineageId returns the CdlLineageId field value -func (o *EventLineageV1) GetCdlLineageId() String { - if o == nil { - var ret String - return ret - } - - return o.CdlLineageId -} - -// GetCdlLineageIdOk returns a tuple with the CdlLineageId field value -// and a boolean to check if the value has been set. -func (o *EventLineageV1) GetCdlLineageIdOk() (*String, bool) { - if o == nil { - return nil, false - } - return &o.CdlLineageId, true -} - -// SetCdlLineageId sets field value -func (o *EventLineageV1) SetCdlLineageId(v String) { - o.CdlLineageId = v -} - -// GetCdlDataModelMode returns the CdlDataModelMode field value -func (o *EventLineageV1) GetCdlDataModelMode() String { - if o == nil { - var ret String - return ret - } - - return o.CdlDataModelMode -} - -// GetCdlDataModelModeOk returns a tuple with the CdlDataModelMode field value -// and a boolean to check if the value has been set. -func (o *EventLineageV1) GetCdlDataModelModeOk() (*String, bool) { - if o == nil { - return nil, false - } - return &o.CdlDataModelMode, true -} - -// SetCdlDataModelMode sets field value -func (o *EventLineageV1) SetCdlDataModelMode(v String) { - o.CdlDataModelMode = v -} - -// GetCdlDataModelVersion returns the CdlDataModelVersion field value -func (o *EventLineageV1) GetCdlDataModelVersion() String { - if o == nil { - var ret String - return ret - } - - return o.CdlDataModelVersion -} - -// GetCdlDataModelVersionOk returns a tuple with the CdlDataModelVersion field value -// and a boolean to check if the value has been set. -func (o *EventLineageV1) GetCdlDataModelVersionOk() (*String, bool) { - if o == nil { - return nil, false - } - return &o.CdlDataModelVersion, true -} - -// SetCdlDataModelVersion sets field value -func (o *EventLineageV1) SetCdlDataModelVersion(v String) { - o.CdlDataModelVersion = v -} - -// GetCdlDataRegistrationTimeStamp returns the CdlDataRegistrationTimeStamp field value -func (o *EventLineageV1) GetCdlDataRegistrationTimeStamp() String { - if o == nil { - var ret String - return ret - } - - return o.CdlDataRegistrationTimeStamp -} - -// GetCdlDataRegistrationTimeStampOk returns a tuple with the CdlDataRegistrationTimeStamp field value -// and a boolean to check if the value has been set. -func (o *EventLineageV1) GetCdlDataRegistrationTimeStampOk() (*String, bool) { - if o == nil { - return nil, false - } - return &o.CdlDataRegistrationTimeStamp, true -} - -// SetCdlDataRegistrationTimeStamp sets field value -func (o *EventLineageV1) SetCdlDataRegistrationTimeStamp(v String) { - o.CdlDataRegistrationTimeStamp = v -} - -// GetCdlNextEventIdList returns the CdlNextEventIdList field value -func (o *EventLineageV1) GetCdlNextEventIdList() []String { - if o == nil { - var ret []String - return ret - } - - return o.CdlNextEventIdList -} - -// GetCdlNextEventIdListOk returns a tuple with the CdlNextEventIdList field value -// and a boolean to check if the value has been set. -func (o *EventLineageV1) GetCdlNextEventIdListOk() ([]String, bool) { - if o == nil { - return nil, false - } - return o.CdlNextEventIdList, true -} - -// SetCdlNextEventIdList sets field value -func (o *EventLineageV1) SetCdlNextEventIdList(v []String) { - o.CdlNextEventIdList = v -} - -// GetCdlPreviousEventIdList returns the CdlPreviousEventIdList field value -func (o *EventLineageV1) GetCdlPreviousEventIdList() []String { - if o == nil { - var ret []String - return ret - } - - return o.CdlPreviousEventIdList -} - -// GetCdlPreviousEventIdListOk returns a tuple with the CdlPreviousEventIdList field value -// and a boolean to check if the value has been set. -func (o *EventLineageV1) GetCdlPreviousEventIdListOk() ([]String, bool) { - if o == nil { - return nil, false - } - return o.CdlPreviousEventIdList, true -} - -// SetCdlPreviousEventIdList sets field value -func (o *EventLineageV1) SetCdlPreviousEventIdList(v []String) { - o.CdlPreviousEventIdList = v -} - -func (o EventLineageV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EventLineageV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cdl:EventId"] = o.CdlEventId - toSerialize["cdl:LineageId"] = o.CdlLineageId - toSerialize["cdl:DataModelMode"] = o.CdlDataModelMode - toSerialize["cdl:DataModelVersion"] = o.CdlDataModelVersion - toSerialize["cdl:DataRegistrationTimeStamp"] = o.CdlDataRegistrationTimeStamp - toSerialize["cdl:NextEventIdList"] = o.CdlNextEventIdList - toSerialize["cdl:PreviousEventIdList"] = o.CdlPreviousEventIdList - return toSerialize, nil -} - -type NullableEventLineageV1 struct { - value *EventLineageV1 - isSet bool -} - -func (v NullableEventLineageV1) Get() *EventLineageV1 { - return v.value -} - -func (v *NullableEventLineageV1) Set(val *EventLineageV1) { - v.value = val - v.isSet = true -} - -func (v NullableEventLineageV1) IsSet() bool { - return v.isSet -} - -func (v *NullableEventLineageV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEventLineageV1(val *EventLineageV1) *NullableEventLineageV1 { - return &NullableEventLineageV1{value: val, isSet: true} -} - -func (v NullableEventLineageV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEventLineageV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_gateway_configuration_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_gateway_configuration_v1.go deleted file mode 100644 index 24d1062c63..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_gateway_configuration_v1.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the GatewayConfigurationV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GatewayConfigurationV1{} - -// GatewayConfigurationV1 struct for GatewayConfigurationV1 -type GatewayConfigurationV1 struct { - // Gateway URL - Url string `json:"url"` - // Value of User-Agent header sent to CDL (to identify this client) - UserAgent *string `json:"userAgent,omitempty"` - // Set to true to ignore self-signed and other rejected certificates - SkipCertCheck *bool `json:"skipCertCheck,omitempty"` - // CA of CDL API gateway server in PEM format to use - CaPath *string `json:"caPath,omitempty"` - // Overwrite server name from cdlApiGateway.url to match one specified in CA - ServerName *string `json:"serverName,omitempty"` -} - -// NewGatewayConfigurationV1 instantiates a new GatewayConfigurationV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGatewayConfigurationV1(url string) *GatewayConfigurationV1 { - this := GatewayConfigurationV1{} - this.Url = url - var skipCertCheck bool = false - this.SkipCertCheck = &skipCertCheck - return &this -} - -// NewGatewayConfigurationV1WithDefaults instantiates a new GatewayConfigurationV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGatewayConfigurationV1WithDefaults() *GatewayConfigurationV1 { - this := GatewayConfigurationV1{} - var skipCertCheck bool = false - this.SkipCertCheck = &skipCertCheck - return &this -} - -// GetUrl returns the Url field value -func (o *GatewayConfigurationV1) GetUrl() string { - if o == nil { - var ret string - return ret - } - - return o.Url -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *GatewayConfigurationV1) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Url, true -} - -// SetUrl sets field value -func (o *GatewayConfigurationV1) SetUrl(v string) { - o.Url = v -} - -// GetUserAgent returns the UserAgent field value if set, zero value otherwise. -func (o *GatewayConfigurationV1) GetUserAgent() string { - if o == nil || IsNil(o.UserAgent) { - var ret string - return ret - } - return *o.UserAgent -} - -// GetUserAgentOk returns a tuple with the UserAgent field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayConfigurationV1) GetUserAgentOk() (*string, bool) { - if o == nil || IsNil(o.UserAgent) { - return nil, false - } - return o.UserAgent, true -} - -// HasUserAgent returns a boolean if a field has been set. -func (o *GatewayConfigurationV1) HasUserAgent() bool { - if o != nil && !IsNil(o.UserAgent) { - return true - } - - return false -} - -// SetUserAgent gets a reference to the given string and assigns it to the UserAgent field. -func (o *GatewayConfigurationV1) SetUserAgent(v string) { - o.UserAgent = &v -} - -// GetSkipCertCheck returns the SkipCertCheck field value if set, zero value otherwise. -func (o *GatewayConfigurationV1) GetSkipCertCheck() bool { - if o == nil || IsNil(o.SkipCertCheck) { - var ret bool - return ret - } - return *o.SkipCertCheck -} - -// GetSkipCertCheckOk returns a tuple with the SkipCertCheck field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayConfigurationV1) GetSkipCertCheckOk() (*bool, bool) { - if o == nil || IsNil(o.SkipCertCheck) { - return nil, false - } - return o.SkipCertCheck, true -} - -// HasSkipCertCheck returns a boolean if a field has been set. -func (o *GatewayConfigurationV1) HasSkipCertCheck() bool { - if o != nil && !IsNil(o.SkipCertCheck) { - return true - } - - return false -} - -// SetSkipCertCheck gets a reference to the given bool and assigns it to the SkipCertCheck field. -func (o *GatewayConfigurationV1) SetSkipCertCheck(v bool) { - o.SkipCertCheck = &v -} - -// GetCaPath returns the CaPath field value if set, zero value otherwise. -func (o *GatewayConfigurationV1) GetCaPath() string { - if o == nil || IsNil(o.CaPath) { - var ret string - return ret - } - return *o.CaPath -} - -// GetCaPathOk returns a tuple with the CaPath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayConfigurationV1) GetCaPathOk() (*string, bool) { - if o == nil || IsNil(o.CaPath) { - return nil, false - } - return o.CaPath, true -} - -// HasCaPath returns a boolean if a field has been set. -func (o *GatewayConfigurationV1) HasCaPath() bool { - if o != nil && !IsNil(o.CaPath) { - return true - } - - return false -} - -// SetCaPath gets a reference to the given string and assigns it to the CaPath field. -func (o *GatewayConfigurationV1) SetCaPath(v string) { - o.CaPath = &v -} - -// GetServerName returns the ServerName field value if set, zero value otherwise. -func (o *GatewayConfigurationV1) GetServerName() string { - if o == nil || IsNil(o.ServerName) { - var ret string - return ret - } - return *o.ServerName -} - -// GetServerNameOk returns a tuple with the ServerName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayConfigurationV1) GetServerNameOk() (*string, bool) { - if o == nil || IsNil(o.ServerName) { - return nil, false - } - return o.ServerName, true -} - -// HasServerName returns a boolean if a field has been set. -func (o *GatewayConfigurationV1) HasServerName() bool { - if o != nil && !IsNil(o.ServerName) { - return true - } - - return false -} - -// SetServerName gets a reference to the given string and assigns it to the ServerName field. -func (o *GatewayConfigurationV1) SetServerName(v string) { - o.ServerName = &v -} - -func (o GatewayConfigurationV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GatewayConfigurationV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["url"] = o.Url - if !IsNil(o.UserAgent) { - toSerialize["userAgent"] = o.UserAgent - } - if !IsNil(o.SkipCertCheck) { - toSerialize["skipCertCheck"] = o.SkipCertCheck - } - if !IsNil(o.CaPath) { - toSerialize["caPath"] = o.CaPath - } - if !IsNil(o.ServerName) { - toSerialize["serverName"] = o.ServerName - } - return toSerialize, nil -} - -type NullableGatewayConfigurationV1 struct { - value *GatewayConfigurationV1 - isSet bool -} - -func (v NullableGatewayConfigurationV1) Get() *GatewayConfigurationV1 { - return v.value -} - -func (v *NullableGatewayConfigurationV1) Set(val *GatewayConfigurationV1) { - v.value = val - v.isSet = true -} - -func (v NullableGatewayConfigurationV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGatewayConfigurationV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGatewayConfigurationV1(val *GatewayConfigurationV1) *NullableGatewayConfigurationV1 { - return &NullableGatewayConfigurationV1{value: val, isSet: true} -} - -func (v NullableGatewayConfigurationV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGatewayConfigurationV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_get_lineage_option_direction_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_get_lineage_option_direction_v1.go deleted file mode 100644 index 05095f66fd..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_get_lineage_option_direction_v1.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" - "fmt" -) - -// GetLineageOptionDirectionV1 the model 'GetLineageOptionDirectionV1' -type GetLineageOptionDirectionV1 string - -// List of GetLineageOptionDirectionV1 -const ( - Backward GetLineageOptionDirectionV1 = "backward" - Forward GetLineageOptionDirectionV1 = "forward" - Both GetLineageOptionDirectionV1 = "both" -) - -// All allowed values of GetLineageOptionDirectionV1 enum -var AllowedGetLineageOptionDirectionV1EnumValues = []GetLineageOptionDirectionV1{ - "backward", - "forward", - "both", -} - -func (v *GetLineageOptionDirectionV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := GetLineageOptionDirectionV1(value) - for _, existing := range AllowedGetLineageOptionDirectionV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid GetLineageOptionDirectionV1", value) -} - -// NewGetLineageOptionDirectionV1FromValue returns a pointer to a valid GetLineageOptionDirectionV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewGetLineageOptionDirectionV1FromValue(v string) (*GetLineageOptionDirectionV1, error) { - ev := GetLineageOptionDirectionV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for GetLineageOptionDirectionV1: valid values are %v", v, AllowedGetLineageOptionDirectionV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v GetLineageOptionDirectionV1) IsValid() bool { - for _, existing := range AllowedGetLineageOptionDirectionV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to GetLineageOptionDirectionV1 value -func (v GetLineageOptionDirectionV1) Ptr() *GetLineageOptionDirectionV1 { - return &v -} - -type NullableGetLineageOptionDirectionV1 struct { - value *GetLineageOptionDirectionV1 - isSet bool -} - -func (v NullableGetLineageOptionDirectionV1) Get() *GetLineageOptionDirectionV1 { - return v.value -} - -func (v *NullableGetLineageOptionDirectionV1) Set(val *GetLineageOptionDirectionV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetLineageOptionDirectionV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetLineageOptionDirectionV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetLineageOptionDirectionV1(val *GetLineageOptionDirectionV1) *NullableGetLineageOptionDirectionV1 { - return &NullableGetLineageOptionDirectionV1{value: val, isSet: true} -} - -func (v NullableGetLineageOptionDirectionV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetLineageOptionDirectionV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_get_lineage_request_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_get_lineage_request_v1.go deleted file mode 100644 index 74841a6097..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_get_lineage_request_v1.go +++ /dev/null @@ -1,220 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the GetLineageRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetLineageRequestV1{} - -// GetLineageRequestV1 struct for GetLineageRequestV1 -type GetLineageRequestV1 struct { - AuthInfo AuthInfoV1 `json:"authInfo"` - EventId string `json:"eventId"` - Direction *GetLineageOptionDirectionV1 `json:"direction,omitempty"` - Depth *string `json:"depth,omitempty"` -} - -// NewGetLineageRequestV1 instantiates a new GetLineageRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetLineageRequestV1(authInfo AuthInfoV1, eventId string) *GetLineageRequestV1 { - this := GetLineageRequestV1{} - this.AuthInfo = authInfo - this.EventId = eventId - var depth string = "-1" - this.Depth = &depth - return &this -} - -// NewGetLineageRequestV1WithDefaults instantiates a new GetLineageRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetLineageRequestV1WithDefaults() *GetLineageRequestV1 { - this := GetLineageRequestV1{} - var depth string = "-1" - this.Depth = &depth - return &this -} - -// GetAuthInfo returns the AuthInfo field value -func (o *GetLineageRequestV1) GetAuthInfo() AuthInfoV1 { - if o == nil { - var ret AuthInfoV1 - return ret - } - - return o.AuthInfo -} - -// GetAuthInfoOk returns a tuple with the AuthInfo field value -// and a boolean to check if the value has been set. -func (o *GetLineageRequestV1) GetAuthInfoOk() (*AuthInfoV1, bool) { - if o == nil { - return nil, false - } - return &o.AuthInfo, true -} - -// SetAuthInfo sets field value -func (o *GetLineageRequestV1) SetAuthInfo(v AuthInfoV1) { - o.AuthInfo = v -} - -// GetEventId returns the EventId field value -func (o *GetLineageRequestV1) GetEventId() string { - if o == nil { - var ret string - return ret - } - - return o.EventId -} - -// GetEventIdOk returns a tuple with the EventId field value -// and a boolean to check if the value has been set. -func (o *GetLineageRequestV1) GetEventIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EventId, true -} - -// SetEventId sets field value -func (o *GetLineageRequestV1) SetEventId(v string) { - o.EventId = v -} - -// GetDirection returns the Direction field value if set, zero value otherwise. -func (o *GetLineageRequestV1) GetDirection() GetLineageOptionDirectionV1 { - if o == nil || IsNil(o.Direction) { - var ret GetLineageOptionDirectionV1 - return ret - } - return *o.Direction -} - -// GetDirectionOk returns a tuple with the Direction field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetLineageRequestV1) GetDirectionOk() (*GetLineageOptionDirectionV1, bool) { - if o == nil || IsNil(o.Direction) { - return nil, false - } - return o.Direction, true -} - -// HasDirection returns a boolean if a field has been set. -func (o *GetLineageRequestV1) HasDirection() bool { - if o != nil && !IsNil(o.Direction) { - return true - } - - return false -} - -// SetDirection gets a reference to the given GetLineageOptionDirectionV1 and assigns it to the Direction field. -func (o *GetLineageRequestV1) SetDirection(v GetLineageOptionDirectionV1) { - o.Direction = &v -} - -// GetDepth returns the Depth field value if set, zero value otherwise. -func (o *GetLineageRequestV1) GetDepth() string { - if o == nil || IsNil(o.Depth) { - var ret string - return ret - } - return *o.Depth -} - -// GetDepthOk returns a tuple with the Depth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetLineageRequestV1) GetDepthOk() (*string, bool) { - if o == nil || IsNil(o.Depth) { - return nil, false - } - return o.Depth, true -} - -// HasDepth returns a boolean if a field has been set. -func (o *GetLineageRequestV1) HasDepth() bool { - if o != nil && !IsNil(o.Depth) { - return true - } - - return false -} - -// SetDepth gets a reference to the given string and assigns it to the Depth field. -func (o *GetLineageRequestV1) SetDepth(v string) { - o.Depth = &v -} - -func (o GetLineageRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetLineageRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["authInfo"] = o.AuthInfo - toSerialize["eventId"] = o.EventId - if !IsNil(o.Direction) { - toSerialize["direction"] = o.Direction - } - if !IsNil(o.Depth) { - toSerialize["depth"] = o.Depth - } - return toSerialize, nil -} - -type NullableGetLineageRequestV1 struct { - value *GetLineageRequestV1 - isSet bool -} - -func (v NullableGetLineageRequestV1) Get() *GetLineageRequestV1 { - return v.value -} - -func (v *NullableGetLineageRequestV1) Set(val *GetLineageRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetLineageRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetLineageRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetLineageRequestV1(val *GetLineageRequestV1) *NullableGetLineageRequestV1 { - return &NullableGetLineageRequestV1{value: val, isSet: true} -} - -func (v NullableGetLineageRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetLineageRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_get_lineage_response_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_get_lineage_response_v1.go deleted file mode 100644 index ed045ce587..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_get_lineage_response_v1.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the GetLineageResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetLineageResponseV1{} - -// GetLineageResponseV1 struct for GetLineageResponseV1 -type GetLineageResponseV1 struct { - Detail []TrailEventDetailsV1 `json:"detail"` - Result String `json:"result"` -} - -// NewGetLineageResponseV1 instantiates a new GetLineageResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetLineageResponseV1(detail []TrailEventDetailsV1, result String) *GetLineageResponseV1 { - this := GetLineageResponseV1{} - this.Detail = detail - this.Result = result - return &this -} - -// NewGetLineageResponseV1WithDefaults instantiates a new GetLineageResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetLineageResponseV1WithDefaults() *GetLineageResponseV1 { - this := GetLineageResponseV1{} - return &this -} - -// GetDetail returns the Detail field value -func (o *GetLineageResponseV1) GetDetail() []TrailEventDetailsV1 { - if o == nil { - var ret []TrailEventDetailsV1 - return ret - } - - return o.Detail -} - -// GetDetailOk returns a tuple with the Detail field value -// and a boolean to check if the value has been set. -func (o *GetLineageResponseV1) GetDetailOk() ([]TrailEventDetailsV1, bool) { - if o == nil { - return nil, false - } - return o.Detail, true -} - -// SetDetail sets field value -func (o *GetLineageResponseV1) SetDetail(v []TrailEventDetailsV1) { - o.Detail = v -} - -// GetResult returns the Result field value -func (o *GetLineageResponseV1) GetResult() String { - if o == nil { - var ret String - return ret - } - - return o.Result -} - -// GetResultOk returns a tuple with the Result field value -// and a boolean to check if the value has been set. -func (o *GetLineageResponseV1) GetResultOk() (*String, bool) { - if o == nil { - return nil, false - } - return &o.Result, true -} - -// SetResult sets field value -func (o *GetLineageResponseV1) SetResult(v String) { - o.Result = v -} - -func (o GetLineageResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetLineageResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["detail"] = o.Detail - toSerialize["result"] = o.Result - return toSerialize, nil -} - -type NullableGetLineageResponseV1 struct { - value *GetLineageResponseV1 - isSet bool -} - -func (v NullableGetLineageResponseV1) Get() *GetLineageResponseV1 { - return v.value -} - -func (v *NullableGetLineageResponseV1) Set(val *GetLineageResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetLineageResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetLineageResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetLineageResponseV1(val *GetLineageResponseV1) *NullableGetLineageResponseV1 { - return &NullableGetLineageResponseV1{value: val, isSet: true} -} - -func (v NullableGetLineageResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetLineageResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_register_history_data_request_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_register_history_data_request_v1.go deleted file mode 100644 index 8ce4cc3b2d..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_register_history_data_request_v1.go +++ /dev/null @@ -1,263 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the RegisterHistoryDataRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RegisterHistoryDataRequestV1{} - -// RegisterHistoryDataRequestV1 struct for RegisterHistoryDataRequestV1 -type RegisterHistoryDataRequestV1 struct { - AuthInfo AuthInfoV1 `json:"authInfo"` - EventId *string `json:"eventId,omitempty"` - LineageId *string `json:"lineageId,omitempty"` - Tags interface{} `json:"tags,omitempty"` - Properties interface{} `json:"properties,omitempty"` -} - -// NewRegisterHistoryDataRequestV1 instantiates a new RegisterHistoryDataRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRegisterHistoryDataRequestV1(authInfo AuthInfoV1) *RegisterHistoryDataRequestV1 { - this := RegisterHistoryDataRequestV1{} - this.AuthInfo = authInfo - return &this -} - -// NewRegisterHistoryDataRequestV1WithDefaults instantiates a new RegisterHistoryDataRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRegisterHistoryDataRequestV1WithDefaults() *RegisterHistoryDataRequestV1 { - this := RegisterHistoryDataRequestV1{} - return &this -} - -// GetAuthInfo returns the AuthInfo field value -func (o *RegisterHistoryDataRequestV1) GetAuthInfo() AuthInfoV1 { - if o == nil { - var ret AuthInfoV1 - return ret - } - - return o.AuthInfo -} - -// GetAuthInfoOk returns a tuple with the AuthInfo field value -// and a boolean to check if the value has been set. -func (o *RegisterHistoryDataRequestV1) GetAuthInfoOk() (*AuthInfoV1, bool) { - if o == nil { - return nil, false - } - return &o.AuthInfo, true -} - -// SetAuthInfo sets field value -func (o *RegisterHistoryDataRequestV1) SetAuthInfo(v AuthInfoV1) { - o.AuthInfo = v -} - -// GetEventId returns the EventId field value if set, zero value otherwise. -func (o *RegisterHistoryDataRequestV1) GetEventId() string { - if o == nil || IsNil(o.EventId) { - var ret string - return ret - } - return *o.EventId -} - -// GetEventIdOk returns a tuple with the EventId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RegisterHistoryDataRequestV1) GetEventIdOk() (*string, bool) { - if o == nil || IsNil(o.EventId) { - return nil, false - } - return o.EventId, true -} - -// HasEventId returns a boolean if a field has been set. -func (o *RegisterHistoryDataRequestV1) HasEventId() bool { - if o != nil && !IsNil(o.EventId) { - return true - } - - return false -} - -// SetEventId gets a reference to the given string and assigns it to the EventId field. -func (o *RegisterHistoryDataRequestV1) SetEventId(v string) { - o.EventId = &v -} - -// GetLineageId returns the LineageId field value if set, zero value otherwise. -func (o *RegisterHistoryDataRequestV1) GetLineageId() string { - if o == nil || IsNil(o.LineageId) { - var ret string - return ret - } - return *o.LineageId -} - -// GetLineageIdOk returns a tuple with the LineageId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RegisterHistoryDataRequestV1) GetLineageIdOk() (*string, bool) { - if o == nil || IsNil(o.LineageId) { - return nil, false - } - return o.LineageId, true -} - -// HasLineageId returns a boolean if a field has been set. -func (o *RegisterHistoryDataRequestV1) HasLineageId() bool { - if o != nil && !IsNil(o.LineageId) { - return true - } - - return false -} - -// SetLineageId gets a reference to the given string and assigns it to the LineageId field. -func (o *RegisterHistoryDataRequestV1) SetLineageId(v string) { - o.LineageId = &v -} - -// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *RegisterHistoryDataRequestV1) GetTags() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RegisterHistoryDataRequestV1) GetTagsOk() (*interface{}, bool) { - if o == nil || IsNil(o.Tags) { - return nil, false - } - return &o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *RegisterHistoryDataRequestV1) HasTags() bool { - if o != nil && IsNil(o.Tags) { - return true - } - - return false -} - -// SetTags gets a reference to the given interface{} and assigns it to the Tags field. -func (o *RegisterHistoryDataRequestV1) SetTags(v interface{}) { - o.Tags = v -} - -// GetProperties returns the Properties field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *RegisterHistoryDataRequestV1) GetProperties() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Properties -} - -// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RegisterHistoryDataRequestV1) GetPropertiesOk() (*interface{}, bool) { - if o == nil || IsNil(o.Properties) { - return nil, false - } - return &o.Properties, true -} - -// HasProperties returns a boolean if a field has been set. -func (o *RegisterHistoryDataRequestV1) HasProperties() bool { - if o != nil && IsNil(o.Properties) { - return true - } - - return false -} - -// SetProperties gets a reference to the given interface{} and assigns it to the Properties field. -func (o *RegisterHistoryDataRequestV1) SetProperties(v interface{}) { - o.Properties = v -} - -func (o RegisterHistoryDataRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RegisterHistoryDataRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["authInfo"] = o.AuthInfo - if !IsNil(o.EventId) { - toSerialize["eventId"] = o.EventId - } - if !IsNil(o.LineageId) { - toSerialize["lineageId"] = o.LineageId - } - if o.Tags != nil { - toSerialize["tags"] = o.Tags - } - if o.Properties != nil { - toSerialize["properties"] = o.Properties - } - return toSerialize, nil -} - -type NullableRegisterHistoryDataRequestV1 struct { - value *RegisterHistoryDataRequestV1 - isSet bool -} - -func (v NullableRegisterHistoryDataRequestV1) Get() *RegisterHistoryDataRequestV1 { - return v.value -} - -func (v *NullableRegisterHistoryDataRequestV1) Set(val *RegisterHistoryDataRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableRegisterHistoryDataRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableRegisterHistoryDataRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRegisterHistoryDataRequestV1(val *RegisterHistoryDataRequestV1) *NullableRegisterHistoryDataRequestV1 { - return &NullableRegisterHistoryDataRequestV1{value: val, isSet: true} -} - -func (v NullableRegisterHistoryDataRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRegisterHistoryDataRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_register_history_data_v1_response.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_register_history_data_v1_response.go deleted file mode 100644 index 55deba89ff..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_register_history_data_v1_response.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the RegisterHistoryDataV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RegisterHistoryDataV1Response{} - -// RegisterHistoryDataV1Response struct for RegisterHistoryDataV1Response -type RegisterHistoryDataV1Response struct { - Detail TrailEventDetailsV1 `json:"detail"` - Result String `json:"result"` -} - -// NewRegisterHistoryDataV1Response instantiates a new RegisterHistoryDataV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRegisterHistoryDataV1Response(detail TrailEventDetailsV1, result String) *RegisterHistoryDataV1Response { - this := RegisterHistoryDataV1Response{} - this.Detail = detail - this.Result = result - return &this -} - -// NewRegisterHistoryDataV1ResponseWithDefaults instantiates a new RegisterHistoryDataV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRegisterHistoryDataV1ResponseWithDefaults() *RegisterHistoryDataV1Response { - this := RegisterHistoryDataV1Response{} - return &this -} - -// GetDetail returns the Detail field value -func (o *RegisterHistoryDataV1Response) GetDetail() TrailEventDetailsV1 { - if o == nil { - var ret TrailEventDetailsV1 - return ret - } - - return o.Detail -} - -// GetDetailOk returns a tuple with the Detail field value -// and a boolean to check if the value has been set. -func (o *RegisterHistoryDataV1Response) GetDetailOk() (*TrailEventDetailsV1, bool) { - if o == nil { - return nil, false - } - return &o.Detail, true -} - -// SetDetail sets field value -func (o *RegisterHistoryDataV1Response) SetDetail(v TrailEventDetailsV1) { - o.Detail = v -} - -// GetResult returns the Result field value -func (o *RegisterHistoryDataV1Response) GetResult() String { - if o == nil { - var ret String - return ret - } - - return o.Result -} - -// GetResultOk returns a tuple with the Result field value -// and a boolean to check if the value has been set. -func (o *RegisterHistoryDataV1Response) GetResultOk() (*String, bool) { - if o == nil { - return nil, false - } - return &o.Result, true -} - -// SetResult sets field value -func (o *RegisterHistoryDataV1Response) SetResult(v String) { - o.Result = v -} - -func (o RegisterHistoryDataV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RegisterHistoryDataV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["detail"] = o.Detail - toSerialize["result"] = o.Result - return toSerialize, nil -} - -type NullableRegisterHistoryDataV1Response struct { - value *RegisterHistoryDataV1Response - isSet bool -} - -func (v NullableRegisterHistoryDataV1Response) Get() *RegisterHistoryDataV1Response { - return v.value -} - -func (v *NullableRegisterHistoryDataV1Response) Set(val *RegisterHistoryDataV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableRegisterHistoryDataV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableRegisterHistoryDataV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRegisterHistoryDataV1Response(val *RegisterHistoryDataV1Response) *NullableRegisterHistoryDataV1Response { - return &NullableRegisterHistoryDataV1Response{value: val, isSet: true} -} - -func (v NullableRegisterHistoryDataV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRegisterHistoryDataV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_search_lineage_request_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_search_lineage_request_v1.go deleted file mode 100644 index f1d2168274..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_search_lineage_request_v1.go +++ /dev/null @@ -1,175 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the SearchLineageRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SearchLineageRequestV1{} - -// SearchLineageRequestV1 struct for SearchLineageRequestV1 -type SearchLineageRequestV1 struct { - AuthInfo AuthInfoV1 `json:"authInfo"` - SearchType SearchLineageTypeV1 `json:"searchType"` - Fields interface{} `json:"fields"` -} - -// NewSearchLineageRequestV1 instantiates a new SearchLineageRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSearchLineageRequestV1(authInfo AuthInfoV1, searchType SearchLineageTypeV1, fields interface{}) *SearchLineageRequestV1 { - this := SearchLineageRequestV1{} - this.AuthInfo = authInfo - this.SearchType = searchType - this.Fields = fields - return &this -} - -// NewSearchLineageRequestV1WithDefaults instantiates a new SearchLineageRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSearchLineageRequestV1WithDefaults() *SearchLineageRequestV1 { - this := SearchLineageRequestV1{} - return &this -} - -// GetAuthInfo returns the AuthInfo field value -func (o *SearchLineageRequestV1) GetAuthInfo() AuthInfoV1 { - if o == nil { - var ret AuthInfoV1 - return ret - } - - return o.AuthInfo -} - -// GetAuthInfoOk returns a tuple with the AuthInfo field value -// and a boolean to check if the value has been set. -func (o *SearchLineageRequestV1) GetAuthInfoOk() (*AuthInfoV1, bool) { - if o == nil { - return nil, false - } - return &o.AuthInfo, true -} - -// SetAuthInfo sets field value -func (o *SearchLineageRequestV1) SetAuthInfo(v AuthInfoV1) { - o.AuthInfo = v -} - -// GetSearchType returns the SearchType field value -func (o *SearchLineageRequestV1) GetSearchType() SearchLineageTypeV1 { - if o == nil { - var ret SearchLineageTypeV1 - return ret - } - - return o.SearchType -} - -// GetSearchTypeOk returns a tuple with the SearchType field value -// and a boolean to check if the value has been set. -func (o *SearchLineageRequestV1) GetSearchTypeOk() (*SearchLineageTypeV1, bool) { - if o == nil { - return nil, false - } - return &o.SearchType, true -} - -// SetSearchType sets field value -func (o *SearchLineageRequestV1) SetSearchType(v SearchLineageTypeV1) { - o.SearchType = v -} - -// GetFields returns the Fields field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *SearchLineageRequestV1) GetFields() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.Fields -} - -// GetFieldsOk returns a tuple with the Fields field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SearchLineageRequestV1) GetFieldsOk() (*interface{}, bool) { - if o == nil || IsNil(o.Fields) { - return nil, false - } - return &o.Fields, true -} - -// SetFields sets field value -func (o *SearchLineageRequestV1) SetFields(v interface{}) { - o.Fields = v -} - -func (o SearchLineageRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SearchLineageRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["authInfo"] = o.AuthInfo - toSerialize["searchType"] = o.SearchType - if o.Fields != nil { - toSerialize["fields"] = o.Fields - } - return toSerialize, nil -} - -type NullableSearchLineageRequestV1 struct { - value *SearchLineageRequestV1 - isSet bool -} - -func (v NullableSearchLineageRequestV1) Get() *SearchLineageRequestV1 { - return v.value -} - -func (v *NullableSearchLineageRequestV1) Set(val *SearchLineageRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableSearchLineageRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSearchLineageRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSearchLineageRequestV1(val *SearchLineageRequestV1) *NullableSearchLineageRequestV1 { - return &NullableSearchLineageRequestV1{value: val, isSet: true} -} - -func (v NullableSearchLineageRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSearchLineageRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_search_lineage_response_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_search_lineage_response_v1.go deleted file mode 100644 index 8c22e09717..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_search_lineage_response_v1.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the SearchLineageResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SearchLineageResponseV1{} - -// SearchLineageResponseV1 struct for SearchLineageResponseV1 -type SearchLineageResponseV1 struct { - Detail []TrailEventDetailsV1 `json:"detail"` - Result String `json:"result"` -} - -// NewSearchLineageResponseV1 instantiates a new SearchLineageResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSearchLineageResponseV1(detail []TrailEventDetailsV1, result String) *SearchLineageResponseV1 { - this := SearchLineageResponseV1{} - this.Detail = detail - this.Result = result - return &this -} - -// NewSearchLineageResponseV1WithDefaults instantiates a new SearchLineageResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSearchLineageResponseV1WithDefaults() *SearchLineageResponseV1 { - this := SearchLineageResponseV1{} - return &this -} - -// GetDetail returns the Detail field value -func (o *SearchLineageResponseV1) GetDetail() []TrailEventDetailsV1 { - if o == nil { - var ret []TrailEventDetailsV1 - return ret - } - - return o.Detail -} - -// GetDetailOk returns a tuple with the Detail field value -// and a boolean to check if the value has been set. -func (o *SearchLineageResponseV1) GetDetailOk() ([]TrailEventDetailsV1, bool) { - if o == nil { - return nil, false - } - return o.Detail, true -} - -// SetDetail sets field value -func (o *SearchLineageResponseV1) SetDetail(v []TrailEventDetailsV1) { - o.Detail = v -} - -// GetResult returns the Result field value -func (o *SearchLineageResponseV1) GetResult() String { - if o == nil { - var ret String - return ret - } - - return o.Result -} - -// GetResultOk returns a tuple with the Result field value -// and a boolean to check if the value has been set. -func (o *SearchLineageResponseV1) GetResultOk() (*String, bool) { - if o == nil { - return nil, false - } - return &o.Result, true -} - -// SetResult sets field value -func (o *SearchLineageResponseV1) SetResult(v String) { - o.Result = v -} - -func (o SearchLineageResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SearchLineageResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["detail"] = o.Detail - toSerialize["result"] = o.Result - return toSerialize, nil -} - -type NullableSearchLineageResponseV1 struct { - value *SearchLineageResponseV1 - isSet bool -} - -func (v NullableSearchLineageResponseV1) Get() *SearchLineageResponseV1 { - return v.value -} - -func (v *NullableSearchLineageResponseV1) Set(val *SearchLineageResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableSearchLineageResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSearchLineageResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSearchLineageResponseV1(val *SearchLineageResponseV1) *NullableSearchLineageResponseV1 { - return &NullableSearchLineageResponseV1{value: val, isSet: true} -} - -func (v NullableSearchLineageResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSearchLineageResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_search_lineage_type_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_search_lineage_type_v1.go deleted file mode 100644 index 4b60266125..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_search_lineage_type_v1.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" - "fmt" -) - -// SearchLineageTypeV1 the model 'SearchLineageTypeV1' -type SearchLineageTypeV1 string - -// List of SearchLineageTypeV1 -const ( - ExactMatch SearchLineageTypeV1 = "exactmatch" - PartialMatch SearchLineageTypeV1 = "partialmatch" - RegexMatch SearchLineageTypeV1 = "regexpmatch" -) - -// All allowed values of SearchLineageTypeV1 enum -var AllowedSearchLineageTypeV1EnumValues = []SearchLineageTypeV1{ - "exactmatch", - "partialmatch", - "regexpmatch", -} - -func (v *SearchLineageTypeV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := SearchLineageTypeV1(value) - for _, existing := range AllowedSearchLineageTypeV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid SearchLineageTypeV1", value) -} - -// NewSearchLineageTypeV1FromValue returns a pointer to a valid SearchLineageTypeV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewSearchLineageTypeV1FromValue(v string) (*SearchLineageTypeV1, error) { - ev := SearchLineageTypeV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for SearchLineageTypeV1: valid values are %v", v, AllowedSearchLineageTypeV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v SearchLineageTypeV1) IsValid() bool { - for _, existing := range AllowedSearchLineageTypeV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to SearchLineageTypeV1 value -func (v SearchLineageTypeV1) Ptr() *SearchLineageTypeV1 { - return &v -} - -type NullableSearchLineageTypeV1 struct { - value *SearchLineageTypeV1 - isSet bool -} - -func (v NullableSearchLineageTypeV1) Get() *SearchLineageTypeV1 { - return v.value -} - -func (v *NullableSearchLineageTypeV1) Set(val *SearchLineageTypeV1) { - v.value = val - v.isSet = true -} - -func (v NullableSearchLineageTypeV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSearchLineageTypeV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSearchLineageTypeV1(val *SearchLineageTypeV1) *NullableSearchLineageTypeV1 { - return &NullableSearchLineageTypeV1{value: val, isSet: true} -} - -func (v NullableSearchLineageTypeV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSearchLineageTypeV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_trail_event_details_v1.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_trail_event_details_v1.go deleted file mode 100644 index 6c5f886bed..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/model_trail_event_details_v1.go +++ /dev/null @@ -1,216 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" -) - -// checks if the TrailEventDetailsV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TrailEventDetailsV1{} - -// TrailEventDetailsV1 Details of newly created CDL event. -type TrailEventDetailsV1 struct { - CdlEvent interface{} `json:"cdl:Event,omitempty"` - CdlLineage EventLineageV1 `json:"cdl:Lineage"` - CdlTags interface{} `json:"cdl:Tags"` - CdlVerification interface{} `json:"cdl:Verification"` -} - -// NewTrailEventDetailsV1 instantiates a new TrailEventDetailsV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTrailEventDetailsV1(cdlLineage EventLineageV1, cdlTags interface{}, cdlVerification interface{}) *TrailEventDetailsV1 { - this := TrailEventDetailsV1{} - this.CdlLineage = cdlLineage - this.CdlTags = cdlTags - this.CdlVerification = cdlVerification - return &this -} - -// NewTrailEventDetailsV1WithDefaults instantiates a new TrailEventDetailsV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTrailEventDetailsV1WithDefaults() *TrailEventDetailsV1 { - this := TrailEventDetailsV1{} - return &this -} - -// GetCdlEvent returns the CdlEvent field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TrailEventDetailsV1) GetCdlEvent() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CdlEvent -} - -// GetCdlEventOk returns a tuple with the CdlEvent field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TrailEventDetailsV1) GetCdlEventOk() (*interface{}, bool) { - if o == nil || IsNil(o.CdlEvent) { - return nil, false - } - return &o.CdlEvent, true -} - -// HasCdlEvent returns a boolean if a field has been set. -func (o *TrailEventDetailsV1) HasCdlEvent() bool { - if o != nil && IsNil(o.CdlEvent) { - return true - } - - return false -} - -// SetCdlEvent gets a reference to the given interface{} and assigns it to the CdlEvent field. -func (o *TrailEventDetailsV1) SetCdlEvent(v interface{}) { - o.CdlEvent = v -} - -// GetCdlLineage returns the CdlLineage field value -func (o *TrailEventDetailsV1) GetCdlLineage() EventLineageV1 { - if o == nil { - var ret EventLineageV1 - return ret - } - - return o.CdlLineage -} - -// GetCdlLineageOk returns a tuple with the CdlLineage field value -// and a boolean to check if the value has been set. -func (o *TrailEventDetailsV1) GetCdlLineageOk() (*EventLineageV1, bool) { - if o == nil { - return nil, false - } - return &o.CdlLineage, true -} - -// SetCdlLineage sets field value -func (o *TrailEventDetailsV1) SetCdlLineage(v EventLineageV1) { - o.CdlLineage = v -} - -// GetCdlTags returns the CdlTags field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *TrailEventDetailsV1) GetCdlTags() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.CdlTags -} - -// GetCdlTagsOk returns a tuple with the CdlTags field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TrailEventDetailsV1) GetCdlTagsOk() (*interface{}, bool) { - if o == nil || IsNil(o.CdlTags) { - return nil, false - } - return &o.CdlTags, true -} - -// SetCdlTags sets field value -func (o *TrailEventDetailsV1) SetCdlTags(v interface{}) { - o.CdlTags = v -} - -// GetCdlVerification returns the CdlVerification field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *TrailEventDetailsV1) GetCdlVerification() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.CdlVerification -} - -// GetCdlVerificationOk returns a tuple with the CdlVerification field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TrailEventDetailsV1) GetCdlVerificationOk() (*interface{}, bool) { - if o == nil || IsNil(o.CdlVerification) { - return nil, false - } - return &o.CdlVerification, true -} - -// SetCdlVerification sets field value -func (o *TrailEventDetailsV1) SetCdlVerification(v interface{}) { - o.CdlVerification = v -} - -func (o TrailEventDetailsV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TrailEventDetailsV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.CdlEvent != nil { - toSerialize["cdl:Event"] = o.CdlEvent - } - toSerialize["cdl:Lineage"] = o.CdlLineage - if o.CdlTags != nil { - toSerialize["cdl:Tags"] = o.CdlTags - } - if o.CdlVerification != nil { - toSerialize["cdl:Verification"] = o.CdlVerification - } - return toSerialize, nil -} - -type NullableTrailEventDetailsV1 struct { - value *TrailEventDetailsV1 - isSet bool -} - -func (v NullableTrailEventDetailsV1) Get() *TrailEventDetailsV1 { - return v.value -} - -func (v *NullableTrailEventDetailsV1) Set(val *TrailEventDetailsV1) { - v.value = val - v.isSet = true -} - -func (v NullableTrailEventDetailsV1) IsSet() bool { - return v.isSet -} - -func (v *NullableTrailEventDetailsV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTrailEventDetailsV1(val *TrailEventDetailsV1) *NullableTrailEventDetailsV1 { - return &NullableTrailEventDetailsV1{value: val, isSet: true} -} - -func (v NullableTrailEventDetailsV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTrailEventDetailsV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 958b632a41..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 085fedbbcb..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-ledger-connector-cdl - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-ledger-connector-cdl_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService GetLineageV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetLineageV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RegisterHistoryDataV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.RegisterHistoryDataV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SearchLineageByGlobalDataV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SearchLineageByGlobalDataV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SearchLineageByHeaderV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SearchLineageByHeaderV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 3a1b7b9cb8..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector CDL - -Can perform basic tasks on Fujitsu CDL service. - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-cdl - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-cdl/src/main/json/openapi.json deleted file mode 100644 index b5bbfae404..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/json/openapi.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector CDL", - "description": "Can perform basic tasks on Fujitsu CDL service.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "GetLineageOptionDirectionV1": { - "type": "string", - "enum": ["backward", "forward", "both"], - "x-enum-varnames": ["Backward", "Forward", "Both"] - }, - "SearchLineageTypeV1": { - "type": "string", - "enum": ["exactmatch", "partialmatch", "regexpmatch"], - "x-enum-varnames": ["ExactMatch", "PartialMatch", "RegexMatch"] - }, - "GatewayConfigurationV1": { - "type": "object", - "required": ["url"], - "properties": { - "url": { - "type": "string", - "description": "Gateway URL", - "nullable": false - }, - "userAgent": { - "type": "string", - "description": "Value of User-Agent header sent to CDL (to identify this client)", - "nullable": false - }, - "skipCertCheck": { - "type": "boolean", - "description": "Set to true to ignore self-signed and other rejected certificates", - "default": "false", - "nullable": false - }, - "caPath": { - "type": "string", - "description": "CA of CDL API gateway server in PEM format to use", - "nullable": false - }, - "serverName": { - "type": "string", - "description": "Overwrite server name from cdlApiGateway.url to match one specified in CA", - "nullable": false - } - } - }, - "AuthInfoAccessTokenV1": { - "type": "object", - "required": ["accessToken", "trustAgentId"], - "properties": { - "accessToken": { - "type": "string", - "nullable": false - }, - "trustAgentId": { - "type": "string", - "nullable": false - } - } - }, - "AuthInfoSubscriptionKeyV1": { - "type": "object", - "required": [ - "subscriptionKey", - "trustAgentId", - "trustAgentRole", - "trustUserId", - "trustUserRole" - ], - "properties": { - "subscriptionKey": { - "type": "string", - "nullable": false - }, - "trustAgentId": { - "type": "string", - "nullable": false - }, - "trustAgentRole": { - "type": "string", - "nullable": false - }, - "trustUserId": { - "type": "string", - "nullable": false - }, - "trustUserRole": { - "type": "string", - "nullable": false - } - } - }, - "AuthInfoV1": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/AuthInfoAccessTokenV1" - }, - { - "$ref": "#/components/schemas/AuthInfoSubscriptionKeyV1" - } - ] - }, - "EventLineageV1": { - "type": "object", - "description": "CDL event linage information (used to identify related events)", - "required": [ - "cdl:EventId", - "cdl:LineageId", - "cdl:DataModelMode", - "cdl:DataModelVersion", - "cdl:DataRegistrationTimeStamp", - "cdl:NextEventIdList", - "cdl:PreviousEventIdList" - ], - "properties": { - "cdl:EventId": { - "nullable": false, - "type": " string" - }, - "cdl:LineageId": { - "nullable": false, - "type": " string" - }, - "cdl:DataModelMode": { - "nullable": false, - "type": " string" - }, - "cdl:DataModelVersion": { - "nullable": false, - "type": " string" - }, - "cdl:DataRegistrationTimeStamp": { - "nullable": false, - "type": " string" - }, - "cdl:NextEventIdList": { - "type": "array", - "items": { - "nullable": false, - "type": " string" - } - }, - "cdl:PreviousEventIdList": { - "type": "array", - "items": { - "nullable": false, - "type": " string" - } - } - } - }, - "TrailEventDetailsV1": { - "type": "object", - "description": "Details of newly created CDL event.", - "required": ["cdl:Lineage", "cdl:Tags", "cdl:Verification"], - "properties": { - "cdl:Event": { - "nullable": false - }, - "cdl:Lineage": { - "$ref": "#/components/schemas/EventLineageV1", - "nullable": false - }, - "cdl:Tags": { - "nullable": false - }, - "cdl:Verification": { - "nullable": false - } - } - }, - "CDLCommonResponseV1": { - "type": "object", - "required": ["result"], - "properties": { - "detail": { - "nullable": false - }, - "result": { - "type": " string", - "nullable": false - } - } - }, - "RegisterHistoryDataRequestV1": { - "type": "object", - "required": ["authInfo"], - "properties": { - "authInfo": { - "$ref": "#/components/schemas/AuthInfoV1", - "nullable": false - }, - "eventId": { - "type": "string", - "nullable": false - }, - "lineageId": { - "type": "string", - "nullable": false - }, - "tags": { - "nullable": false - }, - "properties": { - "nullable": false - } - } - }, - "RegisterHistoryDataV1Response": { - "type": "object", - "required": ["detail", "result"], - "properties": { - "detail": { - "$ref": "#/components/schemas/TrailEventDetailsV1", - "nullable": false - }, - "result": { - "type": " string", - "nullable": false - } - } - }, - "GetLineageRequestV1": { - "type": "object", - "required": ["authInfo", "eventId"], - "properties": { - "authInfo": { - "$ref": "#/components/schemas/AuthInfoV1", - "nullable": false - }, - "eventId": { - "type": "string", - "nullable": false - }, - "direction": { - "$ref": "#/components/schemas/GetLineageOptionDirectionV1", - "default": "backward", - "nullable": false - }, - "depth": { - "type": "string", - "default": "-1", - "nullable": false - } - } - }, - "GetLineageResponseV1": { - "type": "object", - "required": ["detail", "result"], - "properties": { - "detail": { - "type": "array", - "items": { - "nullable": false, - "$ref": "#/components/schemas/TrailEventDetailsV1" - } - }, - "result": { - "type": " string", - "nullable": false - } - } - }, - "SearchLineageRequestV1": { - "type": "object", - "required": ["authInfo", "searchType", "fields"], - "properties": { - "authInfo": { - "$ref": "#/components/schemas/AuthInfoV1", - "nullable": false - }, - "searchType": { - "$ref": "#/components/schemas/SearchLineageTypeV1", - "nullable": false - }, - "fields": { - "nullable": false - } - } - }, - "SearchLineageResponseV1": { - "type": "object", - "required": ["detail", "result"], - "properties": { - "detail": { - "type": "array", - "items": { - "nullable": false, - "$ref": "#/components/schemas/TrailEventDetailsV1" - } - }, - "result": { - "type": " string", - "nullable": false - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "description": "Error response from the connector.", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "description": "Short error description message.", - "nullable": false - }, - "error": { - "type": "string", - "description": "Detailed error information.", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data" - } - }, - "operationId": "registerHistoryDataV1", - "summary": "Register new data trail on CDL", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterHistoryDataRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterHistoryDataV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage" - } - }, - "operationId": "getLineageV1", - "summary": "Get lineage trail from CDL.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetLineageRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetLineageResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header" - } - }, - "operationId": "searchLineageByHeaderV1", - "summary": "Search lineage using header fields.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchLineageRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchLineageResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata" - } - }, - "operationId": "searchLineageByGlobalDataV1", - "summary": "Search lineage using global data fields.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchLineageRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchLineageResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-cdl/src/main/json/openapi.tpl.json deleted file mode 100644 index b5bbfae404..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector CDL", - "description": "Can perform basic tasks on Fujitsu CDL service.", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "GetLineageOptionDirectionV1": { - "type": "string", - "enum": ["backward", "forward", "both"], - "x-enum-varnames": ["Backward", "Forward", "Both"] - }, - "SearchLineageTypeV1": { - "type": "string", - "enum": ["exactmatch", "partialmatch", "regexpmatch"], - "x-enum-varnames": ["ExactMatch", "PartialMatch", "RegexMatch"] - }, - "GatewayConfigurationV1": { - "type": "object", - "required": ["url"], - "properties": { - "url": { - "type": "string", - "description": "Gateway URL", - "nullable": false - }, - "userAgent": { - "type": "string", - "description": "Value of User-Agent header sent to CDL (to identify this client)", - "nullable": false - }, - "skipCertCheck": { - "type": "boolean", - "description": "Set to true to ignore self-signed and other rejected certificates", - "default": "false", - "nullable": false - }, - "caPath": { - "type": "string", - "description": "CA of CDL API gateway server in PEM format to use", - "nullable": false - }, - "serverName": { - "type": "string", - "description": "Overwrite server name from cdlApiGateway.url to match one specified in CA", - "nullable": false - } - } - }, - "AuthInfoAccessTokenV1": { - "type": "object", - "required": ["accessToken", "trustAgentId"], - "properties": { - "accessToken": { - "type": "string", - "nullable": false - }, - "trustAgentId": { - "type": "string", - "nullable": false - } - } - }, - "AuthInfoSubscriptionKeyV1": { - "type": "object", - "required": [ - "subscriptionKey", - "trustAgentId", - "trustAgentRole", - "trustUserId", - "trustUserRole" - ], - "properties": { - "subscriptionKey": { - "type": "string", - "nullable": false - }, - "trustAgentId": { - "type": "string", - "nullable": false - }, - "trustAgentRole": { - "type": "string", - "nullable": false - }, - "trustUserId": { - "type": "string", - "nullable": false - }, - "trustUserRole": { - "type": "string", - "nullable": false - } - } - }, - "AuthInfoV1": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/AuthInfoAccessTokenV1" - }, - { - "$ref": "#/components/schemas/AuthInfoSubscriptionKeyV1" - } - ] - }, - "EventLineageV1": { - "type": "object", - "description": "CDL event linage information (used to identify related events)", - "required": [ - "cdl:EventId", - "cdl:LineageId", - "cdl:DataModelMode", - "cdl:DataModelVersion", - "cdl:DataRegistrationTimeStamp", - "cdl:NextEventIdList", - "cdl:PreviousEventIdList" - ], - "properties": { - "cdl:EventId": { - "nullable": false, - "type": " string" - }, - "cdl:LineageId": { - "nullable": false, - "type": " string" - }, - "cdl:DataModelMode": { - "nullable": false, - "type": " string" - }, - "cdl:DataModelVersion": { - "nullable": false, - "type": " string" - }, - "cdl:DataRegistrationTimeStamp": { - "nullable": false, - "type": " string" - }, - "cdl:NextEventIdList": { - "type": "array", - "items": { - "nullable": false, - "type": " string" - } - }, - "cdl:PreviousEventIdList": { - "type": "array", - "items": { - "nullable": false, - "type": " string" - } - } - } - }, - "TrailEventDetailsV1": { - "type": "object", - "description": "Details of newly created CDL event.", - "required": ["cdl:Lineage", "cdl:Tags", "cdl:Verification"], - "properties": { - "cdl:Event": { - "nullable": false - }, - "cdl:Lineage": { - "$ref": "#/components/schemas/EventLineageV1", - "nullable": false - }, - "cdl:Tags": { - "nullable": false - }, - "cdl:Verification": { - "nullable": false - } - } - }, - "CDLCommonResponseV1": { - "type": "object", - "required": ["result"], - "properties": { - "detail": { - "nullable": false - }, - "result": { - "type": " string", - "nullable": false - } - } - }, - "RegisterHistoryDataRequestV1": { - "type": "object", - "required": ["authInfo"], - "properties": { - "authInfo": { - "$ref": "#/components/schemas/AuthInfoV1", - "nullable": false - }, - "eventId": { - "type": "string", - "nullable": false - }, - "lineageId": { - "type": "string", - "nullable": false - }, - "tags": { - "nullable": false - }, - "properties": { - "nullable": false - } - } - }, - "RegisterHistoryDataV1Response": { - "type": "object", - "required": ["detail", "result"], - "properties": { - "detail": { - "$ref": "#/components/schemas/TrailEventDetailsV1", - "nullable": false - }, - "result": { - "type": " string", - "nullable": false - } - } - }, - "GetLineageRequestV1": { - "type": "object", - "required": ["authInfo", "eventId"], - "properties": { - "authInfo": { - "$ref": "#/components/schemas/AuthInfoV1", - "nullable": false - }, - "eventId": { - "type": "string", - "nullable": false - }, - "direction": { - "$ref": "#/components/schemas/GetLineageOptionDirectionV1", - "default": "backward", - "nullable": false - }, - "depth": { - "type": "string", - "default": "-1", - "nullable": false - } - } - }, - "GetLineageResponseV1": { - "type": "object", - "required": ["detail", "result"], - "properties": { - "detail": { - "type": "array", - "items": { - "nullable": false, - "$ref": "#/components/schemas/TrailEventDetailsV1" - } - }, - "result": { - "type": " string", - "nullable": false - } - } - }, - "SearchLineageRequestV1": { - "type": "object", - "required": ["authInfo", "searchType", "fields"], - "properties": { - "authInfo": { - "$ref": "#/components/schemas/AuthInfoV1", - "nullable": false - }, - "searchType": { - "$ref": "#/components/schemas/SearchLineageTypeV1", - "nullable": false - }, - "fields": { - "nullable": false - } - } - }, - "SearchLineageResponseV1": { - "type": "object", - "required": ["detail", "result"], - "properties": { - "detail": { - "type": "array", - "items": { - "nullable": false, - "$ref": "#/components/schemas/TrailEventDetailsV1" - } - }, - "result": { - "type": " string", - "nullable": false - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "description": "Error response from the connector.", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "description": "Short error description message.", - "nullable": false - }, - "error": { - "type": "string", - "description": "Detailed error information.", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data" - } - }, - "operationId": "registerHistoryDataV1", - "summary": "Register new data trail on CDL", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterHistoryDataRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterHistoryDataV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage" - } - }, - "operationId": "getLineageV1", - "summary": "Get lineage trail from CDL.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetLineageRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetLineageResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header" - } - }, - "operationId": "searchLineageByHeaderV1", - "summary": "Search lineage using header fields.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchLineageRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchLineageResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata" - } - }, - "operationId": "searchLineageByGlobalDataV1", - "summary": "Search lineage using global data fields.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchLineageRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchLineageResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/cdl-gateway.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/cdl-gateway.ts deleted file mode 100644 index 8007464f3a..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/cdl-gateway.ts +++ /dev/null @@ -1,127 +0,0 @@ -import axios from "axios"; -import https from "node:https"; -import { readFileSync } from "node:fs"; -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { getAuthorizationHeaders } from "./type-defs"; -import { - AuthInfoV1, - CDLCommonResponseV1, - GatewayConfigurationV1, -} from "./public-api"; - -const DEFAULT_USER_AGENT = "CactiCDLConnector"; - -/** - * Helper class for sending requests to CDL Node. - */ -export class CDLGateway { - private readonly log: Logger; - private readonly baseURL: string; - private readonly userAgent: string; - private readonly httpsAgent: https.Agent; - - public get className(): string { - return "CDLGateway"; - } - - /** - * @param gatewayConfig gateway configuration (URL, certificates, etc...) - * @param logLevel log level for gateway - */ - constructor( - gatewayConfig: GatewayConfigurationV1, - logLevel: LogLevelDesc = "INFO", - ) { - Checks.truthy(gatewayConfig, `${this.className} arg gatewayConfig`); - Checks.truthy(gatewayConfig.url, `${this.className} arg gatewayConfig.url`); - const { skipCertCheck, caPath, serverName } = gatewayConfig; - this.baseURL = gatewayConfig.url; - this.userAgent = gatewayConfig.userAgent ?? DEFAULT_USER_AGENT; - - this.log = LoggerProvider.getOrCreate({ - level: logLevel, - label: this.className, - }); - - const agentOptions: https.AgentOptions = {}; - - if (skipCertCheck && typeof skipCertCheck === "boolean") { - this.log.info( - `Allowing self signed CDL API GW certificates (skipCertCheck=${skipCertCheck})`, - ); - agentOptions.rejectUnauthorized = false; - } - - if (caPath && typeof caPath === "string") { - this.log.info(`Using CDL API GW CA ${caPath}`); - const gatewayCAString = readFileSync(caPath, "ascii"); - this.log.debug("CDL Gateway certificate read:", gatewayCAString); - agentOptions.ca = gatewayCAString; - } - - if (serverName && typeof serverName === "string") { - this.log.info(`Overwrite CDL API GW server name with '${serverName}'`); - agentOptions.servername = serverName; - } - - this.httpsAgent = new https.Agent(agentOptions); - } - - /** - * Send request to CDL node. - * HTTP method is determined based on presence of arguments (i.e. dataPayload triggers POST request). - * Headers are set according to authInfo argument. - * - * @param url endpoint path to call (without base URL) - * @param authInfo authentication info - * @param queryParams query parameters (passed in URL) - * @param dataPayload post body - * @returns response from CDL - */ - public async request( - url: string, - authInfo: AuthInfoV1, - queryParams?: Record, - dataPayload?: Record, - ): Promise { - const { httpsAgent, baseURL, userAgent } = this; - - let httpMethod = "get"; - if (dataPayload) { - httpMethod = "post"; - } - const authHeaders = getAuthorizationHeaders(authInfo); - - this.log.debug(`cdl request ${httpMethod} ${url} executed`); - - try { - const requestResponse = await axios({ - httpsAgent, - method: httpMethod, - baseURL, - url, - responseType: "json", - headers: { - "User-Agent": userAgent, - "Content-Type": "application/json;charset=UTF-8", - ...authHeaders, - }, - params: queryParams, - data: dataPayload, - }); - - return requestResponse.data; - } catch (error) { - if ("toJSON" in error) { - this.log.error("CDL API request failed:", error.toJSON()); - } - - throw error; - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index dd659e302d..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,733 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector CDL - * Can perform basic tasks on Fujitsu CDL service. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface AuthInfoAccessTokenV1 - */ -export interface AuthInfoAccessTokenV1 { - /** - * - * @type {string} - * @memberof AuthInfoAccessTokenV1 - */ - 'accessToken': string; - /** - * - * @type {string} - * @memberof AuthInfoAccessTokenV1 - */ - 'trustAgentId': string; -} -/** - * - * @export - * @interface AuthInfoSubscriptionKeyV1 - */ -export interface AuthInfoSubscriptionKeyV1 { - /** - * - * @type {string} - * @memberof AuthInfoSubscriptionKeyV1 - */ - 'subscriptionKey': string; - /** - * - * @type {string} - * @memberof AuthInfoSubscriptionKeyV1 - */ - 'trustAgentId': string; - /** - * - * @type {string} - * @memberof AuthInfoSubscriptionKeyV1 - */ - 'trustAgentRole': string; - /** - * - * @type {string} - * @memberof AuthInfoSubscriptionKeyV1 - */ - 'trustUserId': string; - /** - * - * @type {string} - * @memberof AuthInfoSubscriptionKeyV1 - */ - 'trustUserRole': string; -} -/** - * @type AuthInfoV1 - * @export - */ -export type AuthInfoV1 = AuthInfoAccessTokenV1 | AuthInfoSubscriptionKeyV1; - -/** - * - * @export - * @interface CDLCommonResponseV1 - */ -export interface CDLCommonResponseV1 { - /** - * - * @type {any} - * @memberof CDLCommonResponseV1 - */ - 'detail'?: any; - /** - * - * @type { String} - * @memberof CDLCommonResponseV1 - */ - 'result': String; -} -/** - * Error response from the connector. - * @export - * @interface ErrorExceptionResponseV1 - */ -export interface ErrorExceptionResponseV1 { - /** - * Short error description message. - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'message': string; - /** - * Detailed error information. - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'error': string; -} -/** - * CDL event linage information (used to identify related events) - * @export - * @interface EventLineageV1 - */ -export interface EventLineageV1 { - /** - * - * @type { String} - * @memberof EventLineageV1 - */ - 'cdl:EventId': String; - /** - * - * @type { String} - * @memberof EventLineageV1 - */ - 'cdl:LineageId': String; - /** - * - * @type { String} - * @memberof EventLineageV1 - */ - 'cdl:DataModelMode': String; - /** - * - * @type { String} - * @memberof EventLineageV1 - */ - 'cdl:DataModelVersion': String; - /** - * - * @type { String} - * @memberof EventLineageV1 - */ - 'cdl:DataRegistrationTimeStamp': String; - /** - * - * @type {Array< String>} - * @memberof EventLineageV1 - */ - 'cdl:NextEventIdList': Array< String>; - /** - * - * @type {Array< String>} - * @memberof EventLineageV1 - */ - 'cdl:PreviousEventIdList': Array< String>; -} -/** - * - * @export - * @interface GatewayConfigurationV1 - */ -export interface GatewayConfigurationV1 { - /** - * Gateway URL - * @type {string} - * @memberof GatewayConfigurationV1 - */ - 'url': string; - /** - * Value of User-Agent header sent to CDL (to identify this client) - * @type {string} - * @memberof GatewayConfigurationV1 - */ - 'userAgent'?: string; - /** - * Set to true to ignore self-signed and other rejected certificates - * @type {boolean} - * @memberof GatewayConfigurationV1 - */ - 'skipCertCheck'?: boolean; - /** - * CA of CDL API gateway server in PEM format to use - * @type {string} - * @memberof GatewayConfigurationV1 - */ - 'caPath'?: string; - /** - * Overwrite server name from cdlApiGateway.url to match one specified in CA - * @type {string} - * @memberof GatewayConfigurationV1 - */ - 'serverName'?: string; -} -/** - * - * @export - * @enum {string} - */ - -export const GetLineageOptionDirectionV1 = { - Backward: 'backward', - Forward: 'forward', - Both: 'both' -} as const; - -export type GetLineageOptionDirectionV1 = typeof GetLineageOptionDirectionV1[keyof typeof GetLineageOptionDirectionV1]; - - -/** - * - * @export - * @interface GetLineageRequestV1 - */ -export interface GetLineageRequestV1 { - /** - * - * @type {AuthInfoV1} - * @memberof GetLineageRequestV1 - */ - 'authInfo': AuthInfoV1; - /** - * - * @type {string} - * @memberof GetLineageRequestV1 - */ - 'eventId': string; - /** - * - * @type {GetLineageOptionDirectionV1} - * @memberof GetLineageRequestV1 - */ - 'direction'?: GetLineageOptionDirectionV1; - /** - * - * @type {string} - * @memberof GetLineageRequestV1 - */ - 'depth'?: string; -} - - -/** - * - * @export - * @interface GetLineageResponseV1 - */ -export interface GetLineageResponseV1 { - /** - * - * @type {Array} - * @memberof GetLineageResponseV1 - */ - 'detail': Array; - /** - * - * @type { String} - * @memberof GetLineageResponseV1 - */ - 'result': String; -} -/** - * - * @export - * @interface RegisterHistoryDataRequestV1 - */ -export interface RegisterHistoryDataRequestV1 { - /** - * - * @type {AuthInfoV1} - * @memberof RegisterHistoryDataRequestV1 - */ - 'authInfo': AuthInfoV1; - /** - * - * @type {string} - * @memberof RegisterHistoryDataRequestV1 - */ - 'eventId'?: string; - /** - * - * @type {string} - * @memberof RegisterHistoryDataRequestV1 - */ - 'lineageId'?: string; - /** - * - * @type {any} - * @memberof RegisterHistoryDataRequestV1 - */ - 'tags'?: any; - /** - * - * @type {any} - * @memberof RegisterHistoryDataRequestV1 - */ - 'properties'?: any; -} -/** - * - * @export - * @interface RegisterHistoryDataV1Response - */ -export interface RegisterHistoryDataV1Response { - /** - * - * @type {TrailEventDetailsV1} - * @memberof RegisterHistoryDataV1Response - */ - 'detail': TrailEventDetailsV1; - /** - * - * @type { String} - * @memberof RegisterHistoryDataV1Response - */ - 'result': String; -} -/** - * - * @export - * @interface SearchLineageRequestV1 - */ -export interface SearchLineageRequestV1 { - /** - * - * @type {AuthInfoV1} - * @memberof SearchLineageRequestV1 - */ - 'authInfo': AuthInfoV1; - /** - * - * @type {SearchLineageTypeV1} - * @memberof SearchLineageRequestV1 - */ - 'searchType': SearchLineageTypeV1; - /** - * - * @type {any} - * @memberof SearchLineageRequestV1 - */ - 'fields': any; -} - - -/** - * - * @export - * @interface SearchLineageResponseV1 - */ -export interface SearchLineageResponseV1 { - /** - * - * @type {Array} - * @memberof SearchLineageResponseV1 - */ - 'detail': Array; - /** - * - * @type { String} - * @memberof SearchLineageResponseV1 - */ - 'result': String; -} -/** - * - * @export - * @enum {string} - */ - -export const SearchLineageTypeV1 = { - ExactMatch: 'exactmatch', - PartialMatch: 'partialmatch', - RegexMatch: 'regexpmatch' -} as const; - -export type SearchLineageTypeV1 = typeof SearchLineageTypeV1[keyof typeof SearchLineageTypeV1]; - - -/** - * Details of newly created CDL event. - * @export - * @interface TrailEventDetailsV1 - */ -export interface TrailEventDetailsV1 { - /** - * - * @type {any} - * @memberof TrailEventDetailsV1 - */ - 'cdl:Event'?: any; - /** - * - * @type {EventLineageV1} - * @memberof TrailEventDetailsV1 - */ - 'cdl:Lineage': EventLineageV1; - /** - * - * @type {any} - * @memberof TrailEventDetailsV1 - */ - 'cdl:Tags': any; - /** - * - * @type {any} - * @memberof TrailEventDetailsV1 - */ - 'cdl:Verification': any; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Get lineage trail from CDL. - * @param {GetLineageRequestV1} [getLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLineageV1: async (getLineageRequestV1?: GetLineageRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getLineageRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Register new data trail on CDL - * @param {RegisterHistoryDataRequestV1} [registerHistoryDataRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - registerHistoryDataV1: async (registerHistoryDataRequestV1?: RegisterHistoryDataRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(registerHistoryDataRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Search lineage using global data fields. - * @param {SearchLineageRequestV1} [searchLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - searchLineageByGlobalDataV1: async (searchLineageRequestV1?: SearchLineageRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(searchLineageRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Search lineage using header fields. - * @param {SearchLineageRequestV1} [searchLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - searchLineageByHeaderV1: async (searchLineageRequestV1?: SearchLineageRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(searchLineageRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Get lineage trail from CDL. - * @param {GetLineageRequestV1} [getLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLineageV1(getLineageRequestV1?: GetLineageRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLineageV1(getLineageRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Register new data trail on CDL - * @param {RegisterHistoryDataRequestV1} [registerHistoryDataRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async registerHistoryDataV1(registerHistoryDataRequestV1?: RegisterHistoryDataRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.registerHistoryDataV1(registerHistoryDataRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Search lineage using global data fields. - * @param {SearchLineageRequestV1} [searchLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async searchLineageByGlobalDataV1(searchLineageRequestV1?: SearchLineageRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.searchLineageByGlobalDataV1(searchLineageRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Search lineage using header fields. - * @param {SearchLineageRequestV1} [searchLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async searchLineageByHeaderV1(searchLineageRequestV1?: SearchLineageRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.searchLineageByHeaderV1(searchLineageRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Get lineage trail from CDL. - * @param {GetLineageRequestV1} [getLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLineageV1(getLineageRequestV1?: GetLineageRequestV1, options?: any): AxiosPromise { - return localVarFp.getLineageV1(getLineageRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Register new data trail on CDL - * @param {RegisterHistoryDataRequestV1} [registerHistoryDataRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - registerHistoryDataV1(registerHistoryDataRequestV1?: RegisterHistoryDataRequestV1, options?: any): AxiosPromise { - return localVarFp.registerHistoryDataV1(registerHistoryDataRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Search lineage using global data fields. - * @param {SearchLineageRequestV1} [searchLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - searchLineageByGlobalDataV1(searchLineageRequestV1?: SearchLineageRequestV1, options?: any): AxiosPromise { - return localVarFp.searchLineageByGlobalDataV1(searchLineageRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Search lineage using header fields. - * @param {SearchLineageRequestV1} [searchLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - searchLineageByHeaderV1(searchLineageRequestV1?: SearchLineageRequestV1, options?: any): AxiosPromise { - return localVarFp.searchLineageByHeaderV1(searchLineageRequestV1, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Get lineage trail from CDL. - * @param {GetLineageRequestV1} [getLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getLineageV1(getLineageRequestV1?: GetLineageRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getLineageV1(getLineageRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Register new data trail on CDL - * @param {RegisterHistoryDataRequestV1} [registerHistoryDataRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public registerHistoryDataV1(registerHistoryDataRequestV1?: RegisterHistoryDataRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).registerHistoryDataV1(registerHistoryDataRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Search lineage using global data fields. - * @param {SearchLineageRequestV1} [searchLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public searchLineageByGlobalDataV1(searchLineageRequestV1?: SearchLineageRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).searchLineageByGlobalDataV1(searchLineageRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Search lineage using header fields. - * @param {SearchLineageRequestV1} [searchLineageRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public searchLineageByHeaderV1(searchLineageRequestV1?: SearchLineageRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).searchLineageByHeaderV1(searchLineageRequestV1, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index ec44266b87..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector CDL - * Can perform basic tasks on Fujitsu CDL service. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 254b42f09e..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector CDL - * Can perform basic tasks on Fujitsu CDL service. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 0acd10ee1c..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector CDL - * Can perform basic tasks on Fujitsu CDL service. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 465bfb346f..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector CDL - * Can perform basic tasks on Fujitsu CDL service. - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/index.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/index.web.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/plugin-factory-ledger-connector.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/plugin-factory-ledger-connector.ts deleted file mode 100644 index 8f4432ee89..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginLedgerConnectorCDLOptions, - PluginLedgerConnectorCDL, -} from "./plugin-ledger-connector-cdl"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorCDL, - IPluginLedgerConnectorCDLOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorCDLOptions, - ): Promise { - return new PluginLedgerConnectorCDL(pluginOptions); - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/plugin-ledger-connector-cdl.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/plugin-ledger-connector-cdl.ts deleted file mode 100644 index 1438f67972..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/plugin-ledger-connector-cdl.ts +++ /dev/null @@ -1,338 +0,0 @@ -import type { Express } from "express"; -import sanitizeHtml from "sanitize-html"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { consensusHasTransactionFinality } from "@hyperledger/cactus-core"; -import { - ConsensusAlgorithmFamily, - IWebServiceEndpoint, - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; - -import { RegisterHistoryDataEndpoint } from "./web-services/register-history-data-v1-endpoint"; -import { GetLineageDataEndpoint } from "./web-services/get-lineage-v1-endpoint"; -import { SearchLineageByHeaderEndpoint } from "./web-services/search-lineage-by-header-v1-endpoint"; -import { SearchLineageByGlobalDataEndpoint } from "./web-services/search-lineage-by-globaldata-v1-endpoint"; - -import OAS from "../json/openapi.json"; -import { - RegisterHistoryDataRequestV1, - GatewayConfigurationV1, - AuthInfoV1, - GetLineageRequestV1, - GetLineageOptionDirectionV1, - GetLineageResponseV1, - SearchLineageRequestV1, - SearchLineageResponseV1, - RegisterHistoryDataV1Response, -} from "./generated/openapi/typescript-axios"; -import { - HTTP_HEADER_SUBSCRIPTION_KEY, - getAuthorizationHeaders, -} from "./type-defs"; -import { CDLGateway } from "./cdl-gateway"; - -export interface IPluginLedgerConnectorCDLOptions extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - cdlApiGateway?: GatewayConfigurationV1; - cdlApiSubscriptionGateway?: GatewayConfigurationV1; -} - -/** - * Connector plugin for interacting with Fujitsu CDL service. - */ -export class PluginLedgerConnectorCDL - implements ICactusPlugin, IPluginWebService -{ - private readonly instanceId: string; - private readonly log: Logger; - private endpoints: IWebServiceEndpoint[] | undefined; - private cdlApiGateway: CDLGateway | undefined; - private cdlApiSubscriptionGateway: CDLGateway | undefined; - - public get className(): string { - return "PluginLedgerConnectorCDL"; - } - - constructor(public readonly options: IPluginLedgerConnectorCDLOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy( - options.cdlApiGateway || options.cdlApiSubscriptionGateway, - `${fnTag} options.cdlApiGateway or options.cdlApiSubscriptionGateway must be defined`, - ); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = options.instanceId; - - if (options.cdlApiGateway) { - this.log.info("cdlApiGateway created"); - this.cdlApiGateway = new CDLGateway(options.cdlApiGateway, level); - } - - if (options.cdlApiSubscriptionGateway) { - this.log.info("cdlApiSubscriptionGateway created"); - this.cdlApiSubscriptionGateway = new CDLGateway( - options.cdlApiSubscriptionGateway, - level, - ); - } - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - } - - public async onPluginInit(): Promise { - return; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const endpoints: IWebServiceEndpoint[] = []; - - { - const endpoint = new RegisterHistoryDataEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new GetLineageDataEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new SearchLineageByHeaderEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new SearchLineageByGlobalDataEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - - this.endpoints = endpoints; - return endpoints; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-ledger-connector-cdl`; - } - - public async getConsensusAlgorithmFamily(): Promise { - return ConsensusAlgorithmFamily.Authority; - } - - public async hasTransactionFinality(): Promise { - const currentConsensusAlgorithmFamily = - await this.getConsensusAlgorithmFamily(); - - return consensusHasTransactionFinality(currentConsensusAlgorithmFamily); - } - - /** - * Throws if any property in an object starts with `cdl:` (not allowed by the API) - * @param properties object with string fields. - */ - private checkPropertyNames(properties?: Record) { - const invalidProps = Object.keys(properties ?? {}).filter((k) => - k.startsWith("cdl:"), - ); - if (invalidProps.length > 0) { - throw new Error( - `Properties can't start with 'cdl:'. Invalid properties provided: ${invalidProps}`, - ); - } - } - - /** - * Get correct gateway based on authInfo. - * Can return either gateway for regular users (i.e. access token one) or for apps (subscriptionId one). - * Will throw an error if valid gateway could not be found / wrong configuration provided. - * - * @param authInfo authentication info - * @returns `CDLGateway` - */ - private getGatewayByAuthInfo(authInfo: AuthInfoV1): CDLGateway { - const headers = getAuthorizationHeaders(authInfo); - - if (HTTP_HEADER_SUBSCRIPTION_KEY in headers) { - if (this.cdlApiSubscriptionGateway) { - this.log.debug("Using subscription key gateway for this request"); - return this.cdlApiSubscriptionGateway; - } else { - throw new Error( - `cdlApiSubscriptionGateway not configured but found ${HTTP_HEADER_SUBSCRIPTION_KEY} in request header!`, - ); - } - } - - if (this.cdlApiGateway) { - this.log.debug("Using access token gateway for this request"); - return this.cdlApiGateway; - } else { - throw new Error( - `cdlApiGateway not configured, provide ${HTTP_HEADER_SUBSCRIPTION_KEY} to use subscription gateway!`, - ); - } - } - - /** - * Common logic for sending trail search requests - */ - private async searchRequest( - searchEndpoint: string, - args: SearchLineageRequestV1, - ): Promise { - Checks.truthy(searchEndpoint, "searchRequest() searchEndpoint"); - Checks.truthy(args.searchType, "searchRequest() args.searchType"); - Checks.truthy(args.fields, "searchRequest() args.fields"); - - const gateway = this.getGatewayByAuthInfo(args.authInfo); - const responseData = await gateway.request( - searchEndpoint, - args.authInfo, - {}, - { - searchType: args.searchType, - body: args.fields, - }, - ); - - if (responseData.result !== "OK") { - throw new Error(JSON.stringify(responseData)); - } - - this.log.debug(`searchRequest ${searchEndpoint} results:`, responseData); - - return responseData as SearchLineageResponseV1; - } - - /** - * Send request to `trail_registration` CDL endpoint. - */ - async registerHistoryData( - args: RegisterHistoryDataRequestV1, - ): Promise { - this.log.debug("registerHistoryData() args:", JSON.stringify(args)); - - // Check args - this.checkPropertyNames(args.tags); - this.checkPropertyNames(args.properties); - - const gateway = this.getGatewayByAuthInfo(args.authInfo); - const responseData = await gateway.request( - `trail_registration`, - args.authInfo, - {}, - { - "cdl:EventId": args.eventId ?? "", - "cdl:LineageId": args.lineageId ?? "", - "cdl:Tags": args.tags, - ...args.properties, - }, - ); - - if (responseData.result !== "OK") { - throw new Error(JSON.stringify(responseData)); - } - - this.log.debug("registerHistoryData results:", responseData); - return responseData as RegisterHistoryDataV1Response; - } - - /** - * Get data from `trail_acquisition` CDL endpoint. - */ - async getLineage(args: GetLineageRequestV1): Promise { - this.log.debug("getLineage() args:", JSON.stringify(args)); - Checks.truthy(args.eventId, "getLineage() args.eventId"); - - const direction = ( - args.direction ?? GetLineageOptionDirectionV1.Backward - ).toUpperCase(); - let depth = parseInt(args.depth ?? "-1", 10); - if (isNaN(depth)) { - this.log.warn( - "Could not parse depth from the argument, using default (-1). Wrong input:", - args.depth, - ); - depth = -1; - } - - const gateway = this.getGatewayByAuthInfo(args.authInfo); - const responseData = await gateway.request( - `trail_acquisition/${sanitizeHtml(args.eventId)}`, - args.authInfo, - { - direction, - depth, - }, - ); - - if (responseData.result !== "OK") { - throw new Error(JSON.stringify(responseData)); - } - - this.log.debug("getLineage results:", responseData); - - return responseData as GetLineageResponseV1; - } - - /** - * Search data using `trail_search_headers` CDL endpoint. - */ - async searchLineageByHeader( - args: SearchLineageRequestV1, - ): Promise { - this.log.debug("searchByHeader() args:", JSON.stringify(args)); - return this.searchRequest("trail_search_headers", args); - } - - /** - * Search data using `trail_search_globaldata` CDL endpoint. - */ - async searchLineageByGlobalData( - args: SearchLineageRequestV1, - ): Promise { - this.log.debug("searchByGlobalData() args:", JSON.stringify(args)); - return this.searchRequest("trail_search_globaldata", args); - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/public-api.ts deleted file mode 100755 index 1678204b1e..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/public-api.ts +++ /dev/null @@ -1,19 +0,0 @@ -export * from "./generated/openapi/typescript-axios"; - -export { - PluginLedgerConnectorCDL, - IPluginLedgerConnectorCDLOptions, -} from "./plugin-ledger-connector-cdl"; - -export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export * from "./generated/openapi/typescript-axios/api"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/type-defs.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/type-defs.ts deleted file mode 100644 index 68af391529..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/type-defs.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { - AuthInfoAccessTokenV1, - AuthInfoSubscriptionKeyV1, - AuthInfoV1, -} from "./public-api"; - -// CDL specific header names -export const HTTP_HEADER_SUBSCRIPTION_KEY = "Ocp-Apim-Subscription-Key"; -export const HTTP_HEADER_TRUST_USER_ID = "Trust-User-Id"; -export const HTTP_HEADER_TRUST_USER_ROLE = "Trust-User-Role"; -export const HTTP_HEADER_TRUST_AGENT_ID = "Trust-Agent-Id"; -export const HTTP_HEADER_TRUST_AGENT_ROLE = "Trust-Agent-Role"; - -export type HTTPAuthHeadersType = Record; - -/** - * Get HTTP request headers based on `AuthInfoV1` provided by the user. - * Will throw if mixed / invalid authInfo was provided. - * - * @param authInfo authentication data - * @returns object with headers and their values - */ -export function getAuthorizationHeaders( - authInfo: AuthInfoV1, -): HTTPAuthHeadersType { - if ( - isAuthInfoAccessTokenV1(authInfo) && - isAuthInfoSubscriptionKeyV1(authInfo) - ) { - throw new Error( - "Mixed authInfo configuration detected - use either accessToken or subscriptionKey!", - ); - } - - if (isAuthInfoAccessTokenV1(authInfo)) { - return { - Authorization: `Bearer ${authInfo.accessToken}`, - [HTTP_HEADER_TRUST_AGENT_ID]: authInfo.trustAgentId, - }; - } else if (isAuthInfoSubscriptionKeyV1(authInfo)) { - return { - [HTTP_HEADER_SUBSCRIPTION_KEY]: authInfo.subscriptionKey, - [HTTP_HEADER_TRUST_USER_ID]: authInfo.trustUserId, - [HTTP_HEADER_TRUST_USER_ROLE]: authInfo.trustUserRole, - [HTTP_HEADER_TRUST_AGENT_ID]: authInfo.trustAgentId, - [HTTP_HEADER_TRUST_AGENT_ROLE]: authInfo.trustAgentRole, - }; - } else { - throw new Error( - "Missing authInfo information or information not complete!", - ); - } -} - -/** - * True if provided argument is of `AuthInfoAccessTokenV1` type. - * Use for type narrowing. - */ -export function isAuthInfoAccessTokenV1( - authInfo: AuthInfoV1, -): authInfo is AuthInfoAccessTokenV1 { - const typedAuthInfo = authInfo as AuthInfoAccessTokenV1; - return ( - typedAuthInfo && - typeof typedAuthInfo.accessToken !== "undefined" && - typeof typedAuthInfo.trustAgentId !== "undefined" - ); -} - -/** - * True if provided argument is of `AuthInfoSubscriptionKeyV1` type. - * Use for type narrowing. - */ -export function isAuthInfoSubscriptionKeyV1( - authInfo: AuthInfoV1, -): authInfo is AuthInfoSubscriptionKeyV1 { - const typedAuthInfo = authInfo as AuthInfoSubscriptionKeyV1; - return ( - typedAuthInfo && - typeof typedAuthInfo.subscriptionKey !== "undefined" && - typeof typedAuthInfo.trustAgentId !== "undefined" && - typeof typedAuthInfo.trustAgentRole !== "undefined" && - typeof typedAuthInfo.trustUserId !== "undefined" && - typeof typedAuthInfo.trustUserRole !== "undefined" - ); -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/get-lineage-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/get-lineage-v1-endpoint.ts deleted file mode 100644 index d511a572fb..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/get-lineage-v1-endpoint.ts +++ /dev/null @@ -1,99 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginLedgerConnectorCDL } from "../plugin-ledger-connector-cdl"; -import OAS from "../../json/openapi.json"; - -export interface IGetLineageDataOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorCDL; -} - -export class GetLineageDataEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetLineageDataEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return GetLineageDataEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IGetLineageDataOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/get-lineage" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res.status(200).json(await this.options.connector.getLineage(req.body)); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/register-history-data-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/register-history-data-v1-endpoint.ts deleted file mode 100644 index 81155dc4e2..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/register-history-data-v1-endpoint.ts +++ /dev/null @@ -1,101 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginLedgerConnectorCDL } from "../plugin-ledger-connector-cdl"; -import OAS from "../../json/openapi.json"; - -export interface IRegisterHistoryDataOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorCDL; -} - -export class RegisterHistoryDataEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RegisterHistoryDataEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return RegisterHistoryDataEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IRegisterHistoryDataOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/register-history-data" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res - .status(200) - .json(await this.options.connector.registerHistoryData(req.body)); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/search-lineage-by-globaldata-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/search-lineage-by-globaldata-v1-endpoint.ts deleted file mode 100644 index 1e6d7e7e8c..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/search-lineage-by-globaldata-v1-endpoint.ts +++ /dev/null @@ -1,101 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginLedgerConnectorCDL } from "../plugin-ledger-connector-cdl"; -import OAS from "../../json/openapi.json"; - -export interface ISearchLineageByGlobalDataOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorCDL; -} - -export class SearchLineageByGlobalDataEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "SearchLineageByGlobalDataEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return SearchLineageByGlobalDataEndpoint.CLASS_NAME; - } - - constructor(public readonly options: ISearchLineageByGlobalDataOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-globaldata" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res - .status(200) - .json(await this.options.connector.searchLineageByGlobalData(req.body)); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/search-lineage-by-header-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/search-lineage-by-header-v1-endpoint.ts deleted file mode 100644 index 31f8de6948..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/main/typescript/web-services/search-lineage-by-header-v1-endpoint.ts +++ /dev/null @@ -1,101 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginLedgerConnectorCDL } from "../plugin-ledger-connector-cdl"; -import OAS from "../../json/openapi.json"; - -export interface ISearchLineageByHeaderOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorCDL; -} - -export class SearchLineageByHeaderEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "SearchLineageByHeaderEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return SearchLineageByHeaderEndpoint.CLASS_NAME; - } - - constructor(public readonly options: ISearchLineageByHeaderOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-cdl/search-lineage-by-header" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res - .status(200) - .json(await this.options.connector.searchLineageByHeader(req.body)); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/test/typescript/manual/cdl-connector-manual.test.ts b/packages/cactus-plugin-ledger-connector-cdl/src/test/typescript/manual/cdl-connector-manual.test.ts deleted file mode 100644 index ce9d13ed7e..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/test/typescript/manual/cdl-connector-manual.test.ts +++ /dev/null @@ -1,492 +0,0 @@ -/** - * Manual tests for CDL connector. - * Must be executed with access to CDL service. - * Check out CDL connector readme for instructions on how to run these tests. - * To run: - * npx jest dist/lib/test/typescript/manual/cdl-connector-manual.test.js - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Setup: Obtain either accessToken or subscription key and fill matching authInfo structure below. -const cdlUrl = "https://en-apigateway.research.global.fujitsu.com/dataetrust/"; -const cdlSubscriptionUrl = - "https://en-apigateway.research.global.fujitsu.com/dataetrust/"; -const skipCertCheck = true; -// const authInfo = { -// accessToken: "_____accessToken_____" -// trustAgentId: "_____trustAgentId_____", -// }; -const authInfo = { - subscriptionKey: "_____subscriptionKey_____", - trustAgentId: "_____trustAgentId_____", - trustAgentRole: "_____trustAgentRole_____", - trustUserId: "_____trustUserId_____", - trustUserRole: "_____trustUserRole_____", -}; - -const rateLimitTimeout = 1000 * 2; // 2 seconds -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; -const setupTimeout = 1000 * 60; // 1 minute timeout for setup - -// ApiClient settings -const syncReqTimeout = 1000 * 10; // 10 seconds - -import http from "node:http"; -import { AddressInfo } from "node:net"; -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import { v4 as uuidV4 } from "uuid"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; - -import { - AuthInfoV1, - DefaultApi as CDLApi, - GetLineageOptionDirectionV1, - GetLineageRequestV1, - PluginLedgerConnectorCDL, - RegisterHistoryDataRequestV1, - SearchLineageRequestV1, - SearchLineageTypeV1, - TrailEventDetailsV1, -} from "../../../main/typescript/index"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "cdl-connector-manual.test", - level: testLogLevel, -}); - -describe("CDL Connector manual tests", () => { - let apiClient: CDLApi; - let connector: PluginLedgerConnectorCDL; - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - - ////////////////////////////////// - // Helper Methods - ////////////////////////////////// - - async function registerHistoryDataOnCDL( - request: RegisterHistoryDataRequestV1, - ) { - const response = await apiClient.registerHistoryDataV1(request); - - const status = response.status; - log.info( - "registerHistoryDataOnCDL done. Status", - status, - response.statusText, - ); - expect(status).toEqual(200); - - expect(response.data).toBeTruthy(); - expect(response.data.result).toEqual("OK"); - expect(response.data.detail).toBeTruthy(); - const event = response.data.detail; - log.debug("registerHistoryDataOnCDL event", event); - expect(event).toBeTruthy(); - expect(event["cdl:Lineage"]).toBeTruthy(); - expect(event["cdl:Lineage"]["cdl:EventId"]).toBeTruthy(); - expect(event["cdl:Lineage"]["cdl:LineageId"]).toBeTruthy(); - expect(event["cdl:Tags"]).toBeTruthy(); - expect(event["cdl:Verification"]).toBeTruthy(); - return event; - } - - async function getLineageFromCDL( - request: GetLineageRequestV1, - ): Promise { - const response = await apiClient.getLineageV1(request); - - const status = response.status; - log.info("getLineageFromCDL done. Status", status, response.statusText); - expect(status).toEqual(200); - - expect(response.data).toBeTruthy(); - expect(response.data.result).toEqual("OK"); - expect(response.data.detail).toBeTruthy(); - const eventList = response.data.detail; - log.debug("getLineageFromCDL eventList", eventList); - expect(eventList).toBeTruthy(); - expect(eventList.length).toBeGreaterThan(0); - return eventList; - } - - async function searchByHeaderOnCDL( - request: SearchLineageRequestV1, - ): Promise { - const response = await apiClient.searchLineageByHeaderV1(request); - - const status = response.status; - log.info("searchByHeaderOnCDL done. Status", status, response.statusText); - expect(status).toEqual(200); - - expect(response.data).toBeTruthy(); - expect(response.data.result).toEqual("OK"); - expect(response.data.detail).toBeTruthy(); - const eventList = response.data.detail; - log.debug("searchByHeaderOnCDL eventList", eventList); - expect(eventList).toBeTruthy(); - return eventList; - } - - async function searchByGlobalDataOnCDL( - request: SearchLineageRequestV1, - ): Promise { - const response = await apiClient.searchLineageByGlobalDataV1(request); - - const status = response.status; - log.info( - "searchByGlobalDataOnCDL done. Status", - status, - response.statusText, - ); - expect(status).toEqual(200); - - expect(response.data).toBeTruthy(); - expect(response.data.result).toEqual("OK"); - expect(response.data.detail).toBeTruthy(); - const eventList = response.data.detail; - log.debug("searchByGlobalDataOnCDL eventList", eventList); - expect(eventList).toBeTruthy(); - return eventList; - } - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - apiClient = new CDLApi(new Configuration({ basePath: apiHost })); - - connector = new PluginLedgerConnectorCDL({ - instanceId: uuidV4(), - logLevel: sutLogLevel, - cdlApiGateway: { - url: cdlUrl, - userAgent: "cactiCdlConnectorManualTest", - skipCertCheck, - }, - cdlApiSubscriptionGateway: { - url: cdlSubscriptionUrl, - userAgent: "cactiCdlConnectorManualTest", - skipCertCheck, - }, - }); - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp); - }, setupTimeout); - - afterAll(async () => { - log.info("Close connector server..."); - await Servers.shutdown(server); - - if (connector) { - log.info("Close the connector..."); - await connector.shutdown(); - } - }, setupTimeout); - - afterEach(async () => { - // Limit number of requests send to prevent errors - await new Promise((resolve) => setTimeout(resolve, rateLimitTimeout)); - }); - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - test( - "Request fails when authInfo is missing", - async () => { - try { - await registerHistoryDataOnCDL({ - authInfo: {} as AuthInfoV1, - tags: { - test: "abc", - }, - properties: { - prop1: "abc", - prop2: "cba", - }, - }); - expect(true).toBeFalse(); // Should fail! - } catch (error) { - log.info("Failed as expected!"); - } - }, - syncReqTimeout * 2, - ); - - test( - "Request fails when mixed authInfo is used", - async () => { - try { - await registerHistoryDataOnCDL({ - authInfo: { - accessToken: "foo-accessToken", - subscriptionKey: "foo-subscriptionKey", - trustAgentId: "foo-trustAgentId", - trustAgentRole: "foo-trustAgentRole", - trustUserId: "foo-trustUserId", - trustUserRole: "foo-trustUserRole", - }, - tags: { - test: "abc", - }, - properties: { - prop1: "abc", - prop2: "cba", - }, - }); - expect(true).toBeFalse(); // Should fail! - } catch (error) { - log.info("Failed as expected!"); - } - }, - syncReqTimeout * 2, - ); - - test("Register single history data", async () => { - const newEvent = await registerHistoryDataOnCDL({ - authInfo, - tags: { - test: "abc", - }, - properties: { - prop1: "abc", - prop2: "cba", - }, - }); - - // Check custom properties and tags - expect(newEvent["cdl:Event"]["prop1"]).toEqual("abc"); - expect(newEvent["cdl:Event"]["prop2"]).toEqual("cba"); - expect(newEvent["cdl:Tags"]["test"]).toEqual("abc"); - }); - - test("Register history data in single lineage", async () => { - const firstEvent = await registerHistoryDataOnCDL({ - authInfo, - }); - const firstEventId = firstEvent["cdl:Lineage"]["cdl:EventId"].toString(); - - const secondEvent = await registerHistoryDataOnCDL({ - authInfo, - lineageId: firstEventId, - }); - - // Check if two events belong to same lineage - expect(secondEvent["cdl:Lineage"]["cdl:LineageId"]).toEqual(firstEventId); - }); - - /** - * Tests for getLineage endpoint - */ - describe("Get lineage tests", () => { - const eventsInLineage: string[] = []; - - beforeAll(async () => { - const firstEvent = await registerHistoryDataOnCDL({ - authInfo, - }); - const firstEventId = firstEvent["cdl:Lineage"]["cdl:EventId"].toString(); - log.info("First eventId (lineageId):", firstEventId); - eventsInLineage.push(firstEventId); - - for (let i = 0; i < 2; i++) { - const event = await registerHistoryDataOnCDL({ - authInfo, - lineageId: firstEventId, - }); - eventsInLineage.push(event["cdl:Lineage"]["cdl:EventId"].toString()); - } - - log.info("Events in test lineage:", eventsInLineage); - }); - - // both middle - test("Get lineage forward all (default) on the first event (lineageId)", async () => { - const eventList = await getLineageFromCDL({ - authInfo, - eventId: eventsInLineage[0], - direction: GetLineageOptionDirectionV1.Forward, - depth: "-1", - }); - - // Forward from first should return all events in lineage - expect(eventList.length).toEqual(eventsInLineage.length); - }); - - test("Get lineage forward all (default) on the last event", async () => { - const eventList = await getLineageFromCDL({ - authInfo, - eventId: eventsInLineage[eventsInLineage.length - 1], - direction: GetLineageOptionDirectionV1.Forward, - depth: "-1", - }); - - // Forward from last should return only one event - expect(eventList.length).toEqual(1); - }); - - test("Get lineage backward all on the last event", async () => { - const eventList = await getLineageFromCDL({ - authInfo, - eventId: eventsInLineage[eventsInLineage.length - 1], - direction: GetLineageOptionDirectionV1.Backward, - depth: "-1", - }); - - // Backward from last should return all events in lineage - expect(eventList.length).toEqual(eventsInLineage.length); - }); - - test("Get lineage both all on the middle event", async () => { - const eventList = await getLineageFromCDL({ - authInfo, - eventId: eventsInLineage[1], - direction: GetLineageOptionDirectionV1.Both, - depth: "-1", - }); - - // Both on middle event should return all events in lineage - expect(eventList.length).toEqual(eventsInLineage.length); - }); - }); - - /** - * Tests for searchByHeader and searchByGlobalData endpoints - */ - describe("Search data tests", () => { - const privateTagValue = uuidV4(); - const customEventPropValue = uuidV4(); - let searchedEvent: TrailEventDetailsV1; - let searchedEventTimestamp: string; - - beforeAll(async () => { - searchedEvent = await registerHistoryDataOnCDL({ - authInfo, - tags: { - privateTag: privateTagValue, - }, - properties: { - customEventProp: customEventPropValue, - }, - }); - log.info("Event to search for:", searchedEvent); - - searchedEventTimestamp = - searchedEvent["cdl:Lineage"][ - "cdl:DataRegistrationTimeStamp" - ].toString(); - }); - - test("Search header data using exact match", async () => { - log.info( - "Search for events with exact timestamp:", - searchedEventTimestamp, - ); - const events = await searchByHeaderOnCDL({ - authInfo, - searchType: SearchLineageTypeV1.ExactMatch, - fields: { - "cdl:DataRegistrationTimeStamp": searchedEventTimestamp, - }, - }); - - expect(events).toBeTruthy(); - expect(events.length).toBeGreaterThan(0); - for (const e of events) { - expect(e["cdl:Lineage"]["cdl:DataRegistrationTimeStamp"]).toEqual( - searchedEventTimestamp, - ); - } - }); - - test("Search header data using partial match", async () => { - const datePart = searchedEventTimestamp.split("T")[0]; - log.info("Search for events with partialmatch (date):", datePart); - - const events = await searchByHeaderOnCDL({ - authInfo, - searchType: SearchLineageTypeV1.PartialMatch, - fields: { - "cdl:DataRegistrationTimeStamp": datePart, - }, - }); - - expect(events).toBeTruthy(); - expect(events.length).toBeGreaterThan(0); - for (const e of events) { - expect(e["cdl:Lineage"]["cdl:DataRegistrationTimeStamp"]).toMatch( - datePart, - ); - } - }); - - test("Search header data using regex match", async () => { - const datePart = searchedEventTimestamp.split("T")[0]; - const dateRegex = `^${datePart}.*$`; - log.info("Search for events with regexpmatch:", dateRegex); - - const events = await searchByHeaderOnCDL({ - authInfo, - searchType: SearchLineageTypeV1.RegexMatch, - fields: { - "cdl:DataRegistrationTimeStamp": dateRegex, - }, - }); - - expect(events).toBeTruthy(); - expect(events.length).toBeGreaterThan(0); - for (const e of events) { - expect(e["cdl:Lineage"]["cdl:DataRegistrationTimeStamp"]).toMatch( - datePart, - ); - } - }); - - test("Search global data using exact match", async () => { - log.info( - "Search for events with exact customEventProp:", - customEventPropValue, - ); - const events = await searchByGlobalDataOnCDL({ - authInfo, - searchType: SearchLineageTypeV1.ExactMatch, - fields: { - customEventProp: customEventPropValue, - }, - }); - - expect(events).toBeTruthy(); - expect(events.length).toEqual(1); - for (const e of events) { - expect(e["cdl:Event"]["customEventProp"]).toEqual(customEventPropValue); - } - }); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-cdl/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-cdl/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-cdl/tsconfig.json b/packages/cactus-plugin-ledger-connector-cdl/tsconfig.json deleted file mode 100644 index 3e32cda3c2..0000000000 --- a/packages/cactus-plugin-ledger-connector-cdl/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib", - "declarationDir": "./dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ledger-connector-cdl.tsbuildinfo" - }, - "include": ["./src", "src/**/*.json"], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - } - ] -} diff --git a/packages/cactus-plugin-ledger-connector-corda/CHANGELOG.md b/packages/cactus-plugin-ledger-connector-corda/CHANGELOG.md deleted file mode 100644 index e0edb80114..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/CHANGELOG.md +++ /dev/null @@ -1,227 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-corda - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-corda - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-corda - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -### Features - -* **corda:** support 5.1 via TS/HTTP (no JVM) ([ec9683d](https://github.com/hyperledger/cacti/commit/ec9683d38670fe5d657b602db8215e602fd4209d)), closes [#2978](https://github.com/hyperledger/cacti/issues/2978) [#3293](https://github.com/hyperledger/cacti/issues/3293) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Bug Fixes - -* address CVE-2022-24434, GHSA-wm7h-9275-46v2 caused by dicer ([6ff8111](https://github.com/hyperledger/cacti/commit/6ff8111c2534f71a5f623433eba59a610d84f4eb)) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Features - -* **connector-corda:** add vaultQueryV1 REST API operation + endpoint ([d2bf145](https://github.com/hyperledger/cacti/commit/d2bf1458ce2f1342fe330d9118aae7fc2fdd3312)) -* **connector-corda:** support JVM 17 Cordapps ([1994128](https://github.com/hyperledger/cacti/commit/19941280469a3f66cb678525a4088f86b9cacee3)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -### Features - -* **connector-corda:** add initial set of JvmObject factory functions ([d9d5904](https://github.com/hyperledger/cacti/commit/d9d590450af6d231c5e38046bffd6d08786c29f4)) -* **connector-corda:** add JSON classname->JVM class object deserialize ([0508f14](https://github.com/hyperledger/cacti/commit/0508f14c64e452f8f89881db363cd00b3c8c255c)) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **connector-corda:** contract deployment SSH reconnect race condition ([0af2eb1](https://github.com/hyperledger/cacti/commit/0af2eb13235d4dda5dfe92912be48722caea09b1)) -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-corda - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-corda - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-corda - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-corda - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-corda - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-corda - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Features - -* **corda4:** implement monitoring of state changes ([865ec2f](https://github.com/hyperledger/cactus/commit/865ec2f097df73e4907d812b18c2acf25e7896b1)), closes [#1610](https://github.com/hyperledger/cactus/issues/1610) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Features - -* **connector-corda:** enable Flow Database Access CorDapp ([60dfe1a](https://github.com/hyperledger/cactus/commit/60dfe1a772d06436132f79bf3e89589e181a783e)), closes [#1493](https://github.com/hyperledger/cactus/issues/1493) -* **connector-corda:** read privateKey from filesystem ([e7e39fd](https://github.com/hyperledger/cactus/commit/e7e39fd5f7ef2d6ec49b4ebebde35875bbf1df44)), closes [#789](https://github.com/hyperledger/cactus/issues/789) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* endpoints implementation in corda plugin ([21a22b5](https://github.com/hyperledger/cactus/commit/21a22b574fb2e08c8c69106a6b3ecf1cb252c654)), closes [#1346](https://github.com/hyperledger/cactus/issues/1346) -* openapi validation for corda server endpoints ([21fc5ba](https://github.com/hyperledger/cactus/commit/21fc5ba874e0d1974a7e9524aff5103bb8af4b53)) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-corda - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **corda:** support corda v4.8 [#889](https://github.com/hyperledger/cactus/issues/889) ([5f45813](https://github.com/hyperledger/cactus/commit/5f45813efd98507a59e8f6a84417819bc0c80742)) -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* **corda:** resolves [#888](https://github.com/hyperledger/cactus/issues/888) ([d4af647](https://github.com/hyperledger/cactus/commit/d4af647f96b9eda592ffe1797679e086e32a039d)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **prometheus:** metrics.ts leaks to global registry [#1202](https://github.com/hyperledger/cactus/issues/1202) ([ce076d7](https://github.com/hyperledger/cactus/commit/ce076d709f8e0cba143f8fe9d71f1de1df8f71dc)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Bug Fixes - -* **connector-corda:** fix build broken by operationId rename ([291dd3b](https://github.com/hyperledger/cactus/commit/291dd3bc666939fffbc3780eaefd9059c756878a)) - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) -* **connector-corda:** kotlin compilation error due to missing method ([403f135](https://github.com/hyperledger/cactus/commit/403f13592734cfdcbbfa3714b76a9557aaa4a8b4)) - -### Features - -* **corda:** prometheus exporter metrics integration ([9f37755](https://github.com/hyperledger/cactus/commit/9f3775580381cbdf314c6a75188114315d1844c6)), closes [#535](https://github.com/hyperledger/cactus/issues/535) -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** hasTransactionFinality() on connector API [#354](https://github.com/hyperledger/cactus/issues/354) ([a2d0582](https://github.com/hyperledger/cactus/commit/a2d058218780e5e4c81e5f847cc875879a946e3f)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **core-api:** plugin async initializer method ([9678c2e](https://github.com/hyperledger/cactus/commit/9678c2e9288a73589e84f9fd254c26aed6a93297)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Features - -* **corda:** prometheus exporter metrics integration ([9f37755](https://github.com/hyperledger/cactus/commit/9f3775580381cbdf314c6a75188114315d1844c6)), closes [#535](https://github.com/hyperledger/cactus/issues/535) -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** hasTransactionFinality() on connector API [#354](https://github.com/hyperledger/cactus/issues/354) ([a2d0582](https://github.com/hyperledger/cactus/commit/a2d058218780e5e4c81e5f847cc875879a946e3f)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -### Bug Fixes - -* **connector-corda:** regenerate kotlin backend with correct version ([34f8e17](https://github.com/hyperledger/cactus/commit/34f8e17a06a8b58647e8d5e59b9d32d15ef6c8ef)) - -### Features - -* **corda-connector:** dsl to support collections, enums [#622](https://github.com/hyperledger/cactus/issues/622) ([78e6754](https://github.com/hyperledger/cactus/commit/78e675424ebed5bb36e5d076252a05a424e5a170)) - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **ci:** disk full issues on GitHub Action Workflow runner [#698](https://github.com/hyperledger/cactus/issues/698) ([61e3f76](https://github.com/hyperledger/cactus/commit/61e3f76ed910c9b04b36f995456213018cc0e7ba)) -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) - -### Features - -* **corda:** add Corda ledger support ([5623369](https://github.com/hyperledger/cactus/commit/5623369aa3b5f3b75cbafb58499b24da6efc896d)) -* **corda-connector:** list flows endpoint [#624](https://github.com/hyperledger/cactus/issues/624) ([438dcda](https://github.com/hyperledger/cactus/commit/438dcda8ff9c44f8d98515e6ff5aee7daec2179d)) -* **corda-connector:** node diagnostics endpoint [#623](https://github.com/hyperledger/cactus/issues/623) ([edb8eac](https://github.com/hyperledger/cactus/commit/edb8eac3f2b6e9dfc62f4278f2ec11b8130e9344)) -* **corda-connector:** params factory pattern support [#620](https://github.com/hyperledger/cactus/issues/620) ([0c3e58c](https://github.com/hyperledger/cactus/commit/0c3e58c4d1acd90d480682c7a4dfd77b95980948)) -* **corda-connector:** scp jars to nodes [#621](https://github.com/hyperledger/cactus/issues/621) ([c966769](https://github.com/hyperledger/cactus/commit/c966769ec7654596eea36d1fbc56cbf20d4e2233)) -* **test-tooling:** add corda AIO emitContainerLogs option ([13fe677](https://github.com/hyperledger/cactus/commit/13fe67782addaccabec1d24bb2032da2d8ea3f94)) diff --git a/packages/cactus-plugin-ledger-connector-corda/README.md b/packages/cactus-plugin-ledger-connector-corda/README.md deleted file mode 100644 index 7b3c3786c6..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/README.md +++ /dev/null @@ -1,727 +0,0 @@ -# `@hyperledger/cactus-plugin-ledger-connector-corda` - -## Table of Contents - -- [Summary](#summary) -- [Concepts](#concepts) - - [Contract Invocation JSON DSL](#contract-invocation-json-dsl) - - [Expressing Primitive vs Reference Types with the DLS](#expressing-primitive-vs-reference-types-with-the-dls) - - [Flow Invocation Types](#flow-invocation-types) -- [Usage](#usage) - - [Invoke Contract (flow) with no parameters](#invoke-contract-flow-with-no-parameters) - - [Invoke Contract (flow) with a single integer parameter](#invoke-contract-flow-with-a-single-integer-parameter) - - [Invoke Contract (flow) with a custom class parameter](#invoke-contract-flow-with-a-custom-class-parameter) - - [Vault Queries](#vault-queries) - - [Transaction Monitoring](#transaction-monitoring) - - [watchBlocksV1](#watchblocksv1) - - [Low-level HTTP API](#low-level-http-api) - - [Custom Configuration via Env Variables](#custom-configuration-via-env-variables) -- [Testing Environment for Manual Tests via Docker Compose](#testing-environment-for-manual-tests-via-docker-compose) -- [Building Docker Image Locally](#building-docker-image-locally) -- [Scan The Locally Built Container Image for Vulnerabilities with Trivy](#scan-the-locally-built-container-image-for-vulnerabilities-with-trivy) -- [Scan The Locally Built .jar File For Vulnerabilities with Trivy](#scan-the-locally-built-jar-file-for-vulnerabilities-with-trivy) -- [Example NodeDiagnosticInfo JSON Response](#example-nodediagnosticinfo-json-response) -- [Monitoring](#monitoring) - - [Usage Prometheus](#usage-prometheus) - - [Prometheus Integration](#prometheus-integration) - - [Helper code](#helper-code) - - [response.type.ts](#responsetypets) - - [data-fetcher.ts](#data-fetcherts) - - [metrics.ts](#metricsts) - -## Summary - -The Corda connector is written in Kotlin and ships as a Spring Boot JVM application -that accepts API requests and translates those into Corda RPC calls. - -Deploying the Corda connector therefore involves also deploying the mentioned JVM -application **in addition** to deploying the Cactus API server with the desired -plugins configured. - -## Concepts - -### Contract Invocation JSON DSL - -One of our core design principles for Hyperledger Cactus is to have low impact -deployments meaning that changes to the ledgers themselves should be kept to a -minimum or preferably have no need for any at all. With this in mind, we had to -solve the challenge of providing users with the ability to invoke Corda flows -as dynamically as possible within the confines of the strongly typed JVM contrasted -with the weakly typed Javascript language runtime of NodeJS. - -Corda might release some convenience features to ease this in the future, but -in the meantime we have the *Contract Invocation JSON DSL* which allows developers -to specify truly arbitrary JVM types as part of their contract invocation arguments -even if otherwise these types would not be possible to serialize or deserialize -with traditional tooling such as the excellent -[Jackson JSON Java library](https://github.com/FasterXML/jackson) or similar ones. - -### Expressing Primitive vs Reference Types with the DLS - -The features of the DSL include expressing whether a contract invocation parameter -is a reference or a primitive JVM data types. -This is a language feature that Javascript has as well to some extent, but for -those in need of a refresher, here's a writeup from a well known Q/A website that -I found on the internet: [What's the difference between primitive and reference types? -](https://stackoverflow.com/a/32049775/698470) - -To keep it simple, the following types are primitive data types in the -Java Virtual Machine (JVM) and everything else not included in the list below -can be safely considered a reference type: -- boolean -- byte -- short -- char -- int -- long -- float -- double - -If you'd like to further clarify how this works and feel like an exciting adventure -then we recommend that you dive into the source code of the -[deserializer implementation of the JSON DSL](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/JsonJvmObjectDeserializer.kt) and take a look at the following points of interest -in the code located there: -- `val exoticTypes: Map>` -- `fun instantiate(jvmObject: JvmObject)` - -### Flow Invocation Types - -Can be **dynamic** or **tracked dynamic** and the corresponding enum values -are defined as: - -```typescript -/** - * Determines which flow starting method will be used on the back-end when invoking the flow. Based on the value here the plugin back-end might invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() method. Streamed responses are aggregated and returned in a single response to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. do. - * @export - * @enum {string} - */ -export enum FlowInvocationType { - TRACKEDFLOWDYNAMIC = 'TRACKED_FLOW_DYNAMIC', - FLOWDYNAMIC = 'FLOW_DYNAMIC' -} -``` - -[Official Corda Java Docs - startFlowDynamic()](https://api.corda.net/api/corda-os/4.7/html/api/kotlin/corda/net.corda.core.messaging/-corda-r-p-c-ops/start-flow-dynamic.html) - -[Official Corda Java Docs - startTrackedFlowDynamic()](https://api.corda.net/api/corda-os/4.7/html/api/kotlin/corda/net.corda.core.messaging/-corda-r-p-c-ops/start-tracked-flow-dynamic.html) - - -## Usage - -Take a look at how the API client can be used to run transactions on a Corda ledger: -`packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/jvm-kotlin-spring-server.test.ts` - - -### Invoke Contract (flow) with no parameters - -Below, we'll demonstrate invoking a simple contract with no parameters. - -**The contract source:** - -```java -package com.example.organization.samples.application.flows; - -class SomeCoolFlow { - // constructor with no arguments - public SomeCoolFlow() { - this.doSomething(); - } - - public doSomething(): void { - throw new RuntimeException("Method not implemented."); - } -} -``` - -**Steps to build your request:** - -1. Find out the fully qualified class name of your contract (flow) and set this as the value for the request parameter `flowFullClassName` -2. Decide on your flow invocation type which largely comes down to answering the question of: Does your invocation follow a request/response pattern or more like a channel subscription where multiple updates at different times are streamed to the client in response to the invocation request? In our example we assume the simpler request/response communication pattern and therefore will set the `flowInvocationType` to `FlowInvocationType.FLOWDYNAMIC` -3. Invoke the flow via the API client with the `params` argument being specified as an empty array `[]` - ```typescript - import { DefaultApi as CordaApi } from "@hyperledger/cactus-plugin-ledger-connector-corda"; - import { FlowInvocationType } from "@hyperledger/cactus-plugin-ledger-connector-corda"; - - const apiUrl = "your-cactus-host.example.com"; // don't forget to specify the port if applicable - const apiClient = new CordaApi({ basePath: apiUrl }); - - const res = await apiClient.invokeContractV1({ - flowFullClassName: "com.example.organization.samples.application.flows.SomeCoolFlow", - flowInvocationType: FlowInvocationType.FLOWDYNAMIC, - params: [], - timeoutMs: 60000, - }); - ``` - -### Invoke Contract (flow) with a single integer parameter - -Below, we'll demonstrate invoking a simple contract with a single numeric parameter. - -**The contract source:** - -```java -package com.example.organization.samples.application.flows; - -class SomeCoolFlow { - // constructor with a primitive type long argument - public SomeCoolFlow(long myParameterThatIsLong) { - // do something with the parameter here - } -} -``` - -**Steps to build your request:** - -1. Find out the fully qualified class name of your contract (flow) and set this as the value for the request parameter `flowFullClassName` -2. Decide on your flow invocation type. More details at [Invoke Contract (flow) with no parameters](#invoke-contract-flow-with-no-parameters) -3. Find out what is the fully qualified class name of the parameter you wish to pass in. You can do this be inspecting the sources of the contract itself. If you do not have access to those sources, then the documentation of the contract should have answers or the person who authored said contract. In our case here the fully qualified class name for the number parameter is simply `long` because it is a primitive data type and as such these can be referred to in their short form, but the fully qualified version also works such as: `java.lang.Long`. -When in doubt about these, you can always consult the [official java.lang.Long Java Docs](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Long.html) -After having determined the above, you can construct your first `JvmObject` JSON object as follows in order to pass in the number `42` as the first and only parameter for our flow invocation: - ```json - params: [ - { - jvmTypeKind: JvmTypeKind.PRIMITIVE, - jvmType: { - fqClassName: "long", - }, - primitiveValue: 42, - } - ] - ``` -1. Invoke the flow via the API client with the `params` populated as explained above: - ```typescript - import { DefaultApi as CordaApi } from "@hyperledger/cactus-plugin-ledger-connector-corda"; - import { FlowInvocationType } from "@hyperledger/cactus-plugin-ledger-connector-corda"; - - // don't forget to specify the port if applicable - const apiUrl = "your-cactus-host.example.com"; - const apiClient = new CordaApi({ basePath: apiUrl }); - - const res = await apiClient.invokeContractV1({ - flowFullClassName: "com.example.organization.samples.application.flows.SomeCoolFlow", - flowInvocationType: FlowInvocationType.FLOWDYNAMIC, - params: [ - { - jvmTypeKind: JvmTypeKind.PRIMITIVE, - jvmType: { - fqClassName: "long", - }, - primitiveValue: 42, - } - ], - timeoutMs: 60000, - }); - ``` - -### Invoke Contract (flow) with a custom class parameter - -Below, we'll demonstrate invoking a contract with a single class instance parameter. - -**The contract sources:** - -```java -package com.example.organization.samples.application.flows; - -// contract with a class instance parameter -class BuildSpaceshipFlow { - public BuildSpaceshipFlow(SpaceshipInfo buildSpecs) { - // build spaceship as per the specs - } -} -``` - -```java -package com.example.organization.samples.application.flows; - -// The type that the contract accepts as an input parameter -class SpaceshipInfo { - public SpaceshipInfo(String name, Integer seatsForHumans) { - } -} -``` - -**Assembling and Sending your request:** - -Invoke the flow via the API client with the `params` populated as shown below. - -Key thing notice here is that we now have a class instance as a parameter for our contract (flow) invocation so we have to describe how this class instance itself will be instantiated by providing a nested array of parameters via the `jvmCtorArgs` which stands for Java Virtual Machine Constructor Arguments meaning that elements of this array will be passed in dynamically (via Reflection) to the class constructor. - -**Java Equivalent** - -```java -cordaRpcClient.startFlowDynamic( - BuildSpaceshipFlow.class, - new SpaceshipInfo( - "The last spaceship you'll ever need.", - 10000000 - ) -); -``` - -**Cactus Invocation JSON DLS Equivalent to the Above Java Snippet** - -```typescript -import { DefaultApi as CordaApi } from "@hyperledger/cactus-plugin-ledger-connector-corda"; -import { FlowInvocationType } from "@hyperledger/cactus-plugin-ledger-connector-corda"; - -// don't forget to specify the port if applicable -const apiUrl = "your-cactus-host.example.com"; -const apiClient = new CordaApi({ basePath: apiUrl }); - -const res = await apiClient.invokeContractV1({ - flowFullClassName: "com.example.organization.samples.application.flows.BuildSpaceshipFlow", - flowInvocationType: FlowInvocationType.FLOWDYNAMIC, - params: [ - { - jvmTypeKind: JvmTypeKind.REFERENCE, - jvmType: { - fqClassName: "com.example.organization.samples.application.flows.SpaceshipInfo", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.PRIMITIVE, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "The last spaceship you'll ever need.", - }, - { - jvmTypeKind: JvmTypeKind.PRIMITIVE, - jvmType: { - fqClassName: "java.lang.Long", - }, - primitiveValue: 10000000000, - }, - ], - } - ], - timeoutMs: 60000, -}); -``` - -### Vault Queries - -1. Run manual test infrastructure: - ```sh - docker compose \ - --project-directory=./ \ - --file=./packages/cactus-plugin-ledger-connector-corda/src/test/yaml/fixtures/docker-compose.yaml \ - up \ - --build connector - ``` -2. Deploy contract: - ```sh -curl --location 'http://127.0.0.1:8080/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars' \ ---header 'Content-Type: application/json' \ ---data '{ - "jarFiles": [ - { - "contentBase64": "UEsDBBQACAgIAFqSa1cAAAAAAAAAAAAAAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUalk1tzojAUgN8743/goW+uIqJCndkHBIpYUBSk6MtOChG5hUuCoL9+0baznWmZ6XTfkpzkfN/JSXSAggPEpGfDAgcpmlJMf9C5E9PCA1nWE1NECuBew8hLiyl1C1CrDCLKTMvChV/ufU/1RXAJEjil5BokWQx7b2HqPYw7dxYofEh6RgzIIS2SD9madCYEMfSmFCnKhqwHqGXfJ6wWuBC5DVnIgHuE1G2O4S/q7Rg1vJbduXvVQ5DQ7jUFjW+emIavws3qmyitrrbv2e/FNEkA8vC9WEBAYL9zR7kxwE015lzoDceTnhT4zS1PKVMboovj6KaytVnWVFAYBYSw9p4JLEdzhapaJ85JY41c+P1fPlnT2BT1WzRgNMrGu61T4RE/wP7uOUqZOfGDmeqvNoJbrvPyOBudtDCSv6WBmztNwNXBvI3auCVXJNUTGR3DhbIfK1lqexfXrF8ObPScOpE+0Ljh0ai6tTj6eflt8KBIuAq7p3I5ewSc5I/wXLIZdUaLUNTUkMsTToitMXuYuN8rmjS9vpHN66gNu/eLUB+jlcKG9uKw0c/L2OPm7p7X11Au+JWzNWQdGLkG0v9r+e0JtlmEaqjUhdiVzwO/uhzrWh4aKrOQN+dcx5NFQs7Zxsr9XVbxHyx02RJ66vLxH7QfpSQO0J8k9coYfuaA2rEz5WH07MYalF4s1adxWSbGyU/9pwKeJImvmUd2Pe4OfvSybObeuH5ZTCAizWpbvRxeVGeGv0jzp8msq5nGQQXZy8G2LZGfRd1jsavzBXko99r2hx5tZFdP6rO4lWi7qm2W68p8bimeq9VxaglrLt/T3hDGaMg86DfyX1BLBwiMgpnKeAIAAIMFAABQSwMEFAAICAgAWpJrVwAAAAAAAAAAAAAAABQAAABNRVRBLUlORi9DT1JEQUNPRC5TRqWUT4+iQBDF7yZ+Bw9z2M1GAQVRkzkIMoKCqDjy5zJpoEUUuoFuBfz0q84mu5mNyWTm9roO9X6vqtJWHCFATwVsb2FBYoxGLa7DNhuWOm53hX57EkeQ0LYBULx7FzFqjyktYv9EIRm1KMOjk87mAgVeklDP3omrxNkVznxziJuNVrGLpOV0nC7IIOPx88POo5Z7PiQFzvWlnrGrXZYfz2eFKSuuyqXxGp/gcq2pAdiIvLC6tpELCCgM21J9Ix502Lee2G390AIYbiD42Ww0GwuQwlELQcoEuAgBQ0CaJZAwsLqLaxXRAgSUMJr5Kv95PMk4TQEKydO7Q+eaIUgAIR/JR62+73Mee+xxtScppwxKnMJX9kzBJTVlkftVsYKn1WNhM2Sfv8WTXWeEUecBhusNaJ3NhZVSrSZoqXlS1zksLGH9EsnowpiMT6qw1BlhwH8KgwR7mIIbg3VXj3wjGPChNKETHBuOtZZkmbW3kc5XKpyQF8PkXkHMW16p7I9fj//IPOmm5vRsqpv61QtqhIsUHlVVnG7Lg+6si9xn0EmdBZj18edC0+uu787WTT3MLDOSTTkIejg3qtq1bSMdGuXO1jXeLd1jVu9AD/X21C2/t/L7CT6igMKwLwsqr/KDbI9mQ7tbc73o19QghmhqfdGckZ3MnggGwT8UhrIZt7XFy1/TzhHTJEZvKQ5PCfzfZ6MeNDETZnLtQlmBK9/xJXc+v7CWp+hm1vcJQuswJLXyySF/uKwt97S8/TqEQkSv1Ud5Q7Q0a0fBbLkRBLofgkGpDYaWPa7LQSKKuVVxesig6Or4RY6HZ3ZwF11l4jgysiC7z4bORdDXFo0Ol+1KIcdcAELOlpakKXfn31BLBwjy/7ayiwIAAE8FAABQSwMEFAAICAgAWpJrVwAAAAAAAAAAAAAAABQAAABNRVRBLUlORi9DT1JEQUNPRC5FQzNoYvrPxqnV5tH2nZeRnWlBE9MHgyamN0yMjIb8BrxsnAltHoypzCxMjKwMBtwIhYwLmhg/GzQxvgfiyQuYmRiZmFjEVavLDXjYOIBqztmyMDMBdUQbchtwsjGHsrAJM7k7gU0Ecth52Hzy81Ly8wz5gOqBAlw8rM75RSmJMNXcPExBxoZyBjIgDjOPKFhSwSW1TME5PyVVITgzPS+1yEBOnNfIwMDMyNTQwtTI1CRKnNcYxDWGcnFZLoxuuTCa5cLIlgvjsDzSQJiNHexTJkaol5kZ2ZmdGFiYe5Vyz/IvLTHMXVKxqlQpLudhf+rpm3kJ+22aAjdOCxEPe3rn+5nVituFEuQuqLcyfvpsyx1/a8mBeUnJU1KeTOQoXOxs4Ag0nDlUVpWFx4CLjUObjZGVlZ2ZGRj+QEF+FmDQsjcYyII4fCxiLCKbVfQznyYKvW+clvUmiWPl9h2l/zRR44HZg8HAlUmRYUNJ15wqoZnBV79d0Voh827H8V9TS135NDTiJ0/8cb5c8gCTgjbrBY7rszve+8j/lvQ+6z+xeE7P1sMzHv9ckeq1/dVejmmGjRcNGs8BU4dBMk0jF5qaMBIgLMhZGVg8DNyAXprhEiSzSj3tWg2vUcKNKk2GX5dufU+6+C9gZ9jV3DezhFcBlZwL3NgbXsj+9EOWnvexhM991t8mvXm6vmX1qsd6Cu9O7p0PAFBLBwjPSflgEwIAAAMDAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAAAkAAABNRVRBLUlORi8DAFBLBwgAAAAAAgAAAAAAAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAACAAAABNRVRBLUlORi9jb250cmFjdHMua290bGluX21vZHVsZWNgYGBmYGBghGJuAFBLBwjgw7jsDAAAABAAAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAAAQAAABuZXQvAwBQSwcIAAAAAAIAAAAAAAAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAAKAAAAbmV0L2NvcmRhLwMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAEgAAAG5ldC9jb3JkYS9zYW1wbGVzLwMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAGgAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvAwBQSwcIAAAAAAIAAAAAAAAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAAkAAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9jb250cmFjdHMvAwBQSwcIAAAAAAIAAAAAAAAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAABFAAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9jb250cmFjdHMvSU9VQ29udHJhY3QkQ29tbWFuZHMkQ3JlYXRlLmNsYXNzpVFNb9NAEH2zTuwkNW0avhK+W4IEHDAtHBAgoERCihSoVGguOW3sFWxjr5F3U3Hsb+HElRMSB1T1yI9CjJ0WcaXIu2/nvZ19Gs/8/PX9B4CHuEV4bpSL4rxIZGRl9jFVNlKfqoBV4woZOxsNt3cHx6Q/yLNMmsT2B4WSTgUgQntP7ssoleZ9tD3dU7EL4BEendY6QJ3gP9VGu2cE7/adcYgAjRZqaBJq7oO2hK3Rf1b+hLA6muUu1SZ6rZxMpJOsiWzf4+ZQCUtMpxVFCYJAM5aSDcL64UHYEl2x2A3RPTzYFPfpZf3osy/a4uiL75WZm4THpy6Uq2n+yeCOLOomRP9oGOAyoXHiSlj+6+7ezHFLB3nCvp1RHst0LAstp6l6VwJhZaSNejPPpqo4Vlpv83kRq1e6JOHQGFUMUmmtYuveztw4namxtpqTt4zJnXQ6NxYbEDxA/o2yu/zxRBmvM4sqDtTvfkPra9lo3GAMFyKWOALWePuV8oCHsV5lXcNNPjscCb67hB7jFVz1m+iz/oKzz/D75Qm8IVaq1cbqCesMcRbnOMT5CcjiAi5OULMILboWDYveb1BLBwgzZGz2twEAACgDAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAAD4AAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2NvbnRyYWN0cy9JT1VDb250cmFjdCRDb21tYW5kcy5jbGFzc51RS08CMRD+ZsFdQHzhC3xeiEerxIPRgxqMCQnGRKMXToWtZmW3a7aFePTn+Bs8GOPRH2UcXupRSTrTma9fv850Pj5fXgHsYZOwr5UVrTjxpTAyegiVEeqxHzCqbSJb1ojaxXV1mJSrcRRJ7RsPRJi9l10pQqnvxEXzXrWshxSh/KPJ/rfQ8PKptNLDBGGu3o5tGGhxrqz0GT0kOFE3xdVRz01y2uyn6DmHQG2G/F3C5ttTPucUnYFlnMxt8e2p4uzQATnvz26qR6sQDurjNsilbNX/0gkT3WqipFWE7DeDcDTuy+WBmoclgviniIciITNSIkz/OttuW0LuKu4kLXUWhFxuvqa1SqqhNEYxuXTZ0TaI1E1ggmaoTrSOrbRBrI3L34k0uFMMhrHWGwdWsc57gaNltgWU2Jew4maxwfgx83nMyDSQqiHbXzlMjrJ8DVNcH7KYaYAMZjHXQNqgYDBvsGCw+AVQSwcImapmjmYBAACpAgAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAA/AAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9jb250cmFjdHMvSU9VQ29udHJhY3QkQ29tcGFuaW9uLmNsYXNznVJNb9NAEH3rJE5i0tZNS7/5bICmQN1WHKiKkKARUlDaSi1ESD2gjbMEt8468m4ijj3B/+DEkZ5AHFCVIz8KMeumHwIuYNmzM29mnnffzo+f374DeIAVhjUptOdHcZN7irc7oVCeeJc4hEodc18rr7r9cmMQlDaidofLIJJZMAZ3n/e4F3LZ8rYb+8LXWaQYhquVEpcy0lxToWJILZTrDBO1g0iHgfT2e23vea+9a/L+OkOmJXS1wjC+UK6dE+7qOJAtSs/Xorjl7QvdiHkglXeB2tuK9FY3DKnK+8eTZHGJYYT7vlCqlGyg5HcKGELeQQHDDGn9NqC9r9f+WyLalf0okIF+XEARtoM0xhhWFi7qEEgtYslDryLe8G6oiUXpuOvrKN7k8YGI18t1B5ZpHCv558nX7STLsPRvbAyjpw2bQvMm15wwq91L0UgwY0gWq5GEMMZiYAcENWlado4Pxx1rynIs9/jQsXLGGaY1neu/T00dH65ay+xpNmf1P9qWa+3MuakZazn90H7V/1AhbNg5PiymcxnXmknnbDfb/2TnDPMqo1/DMiOQP5OU/DMhzUidC7x0oOl2NqKmYHAqohMLn2vRZJje6UodtEU9UEEjFE8ujmCxFvk8rPM44JR6YQxdfy2QYqvbboh4gMwOKKqy9xcSZzfqxr54FpjSQlVKEW+EXCmhsEJ3lDaaIe3mkYFN4pUpGsLJw46SZTGxd+mz6chZWkeRQ56aTfESYcxQfMXIZ6M97pEtnGBwqRa4P+gFpqn+xHeS2mLiGx5vwJNZ/ILxo9+IMn8QTbqkDy4PmtfMXQyaJ86bJ07AQbPxJjFFpRdo6MheUr+AZVqdhKiAO7RTc+Jtiqepb2YPqSpmk3cOV06jq1Vcw3VycWMPTOEm5veQVxhVKCnYCrcSJ6OQUwa//QtQSwcIBP2DpbcCAADIBAAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAA1AAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9jb250cmFjdHMvSU9VQ29udHJhY3QuY2xhc3OtWHl8HFUd/77NMclk26bpQbcgbpst3TTHNmmSpptypGkKS9OkNKG1VKmT3Wky7exuujObNuBRiygeKCgeBUWkYhFFoWjaEoFQDwRFxVtRAe8Dbz8f/7N+38zuZpMsacvHfLLzfu/3ftf7Xe/NPPPfRx8H0Ix/C4QSuh2KJlMxLWRp8WFTt0L6QQcgNmGntKhthSK913ZmJgqEQOVebUQLmVpiMNQ7sFeX2CKBZZOi+Mznn2QuESgd0VPGnlGBpmD3NA4SJSzSGcmEFerWY4N6qn8S1V6zXcBjHxSo7k6mBkN7dXsgpRkk1RKJpK25bD1Juydtmu1lKBe4eF/SNo1EaO9IPGQkbD2V0MxQhMaQy4haCrwCF0SH9Oi+rVpKi+ukiFgZCQIrg93TN9qeh+mTYgZplRdzMU/FHFQK1J/XlhRUCVQM6nZnMh7XEjFLoCpY4+pI24YZ6jYsu92LhVikYgEWCyycXOtMmqaeEbNE4PLzjGQgqzPQmdI1W1ewVGDFWWNobezrVnARLUnp+9NGSu+jE0w9I0xge7C7kIn5jus0Nctqr5ke/XxdjrAdhj3EuNiGbtEHF+O1Kl4D/2xGbnNNiusJm8FdLlAW6enr7+jp7GI0X1lfPhs1BbCiHNW4RKCxJ+k3EsNp2/JbQ8m0GfMP6H7yWem4HvMfGNITfsOy0vSAX0v46dyGMgQFyhnRiMPmxSo3dLUCc6eGVUG9gGJYXfFhm9VQFKy5zosQVlegAY0Cyyf9FaETBzWzIzWYliZ2HYzqw27Y1zB9pyfkhrRhxvSUghbW2nojYdiXOdKZpmvRpqIV6xi8TZphcgupyZ2H/WVoJ4s2PKzLQNYHC+T6DFRGG712KS6Twi+n0+2ku0g9wZkspO3ABknbKbCokBbH1C6VHWqTwILJ9f6hVPKANmAyV68SCPYmzFF/MqH7k2mbzvZb7AF6fqCcvI4xJlcLqIxJr0PHoHS7QdkiUGwZN+iOfyJe9GKr9P41AjWvXEyOFqeS+mynbPoEamer+g2apU+p+WsF5rgmW717+keHqb86WKA+ZrSBHXidiu3YKeDPNLZorsCsvGKzNjO7djGWllObAoHgdGE1M1ubF2/A9Spej90Crf1Dut9kHugpZnbMb3M6kEzR/UREnX4rPSzR9I/uZ/4Y9ig9rbnZ3+2w8kwIzihzI+YSh2Rpj1JrFDEV/dDdTrgho8WLQRc/xITSUnrX/rR29p6cwchS2ot9sieTJ9hhmv7kHsfaYdlPosawxlL3x9OWsw3LGEzoKYvmJ2bGcra2pGDYzaw+V4IXKZlZ+8FGPo/orXnavEjLtX6MsMnnFTfPHDelD2Zz3YlSRyqljbp94gZ5SOWC28eE7U1t1PdoadMWWJLvkKyw9ohM5zfhzTKcb2GWByNuUR1ScSPeRo8aktJOMkSLpxw4kQyecbkJb6/AKG7OmjtlXcE72b2GNKtHP2h78S7Zt27Bu6kqQcT0ws9l2Htxq6R738wmnkuLjgHL8beTHgpuE/DK0j2QYC5v1tkpL8yKtvRoOuVkUnrANKJcpIYP4IMqbscdrGktFpvWYPLS48P4SAV8+CizTkZY3iM65KHve4XzS/Lcibtkf/gYrZf1wRaw0vKPaGZaz6VSIpngFWCQl5ERnfl0N11N67dLGi/uwVaZAJ/klgIpPaqTJhUwmA+LC+ukNQEjsCdQ+KQVEdlqhwxrtyOjamYjZYT0g8OuCnEdM9WRlrac1lw/6+1rWtOiqCqHeVrf8hh2gZO1cCzbXQO0QGMgrsm6YQ7GadsM6zNRYgnle8khW1go2QXmx3TLNhLOFTBL6m6WmvqT9FN2wrTgFljl3efc4Sm/PGeI6we5h0xQ+oc0iqvMj5OLUqLZQM3w9Kw3HZaQDCovH7OYWPBGR9bQeV6pp9zl3axRcFpFsbwkeCIb3ReEBkdgQ8aIhowRDTkjGvKMKMPX6e71UTNz8yjnFtn/qEyg/Xx3FMgxy2zQolHdsgLycrUxEB324mu4vxwefIsJ0J05ELfothbTbI30nvhIEV9zhHxUcDrgTCEfHtbDPqJivGhFJg4tVT1LPO6vjL9KjzpxKDMtWjJxyF/W5Fktwh6lbEPJ6XtLuX51ZWXRUs/q4qbSyhKOpVctPn1/abkU2CTfTs56iaZ1oJcmb/3lORqBEmeDXjyNZ+Tufimw7lW7TcGLTKRgd6H3oMwRQiYWaTrKpr5FS+3jXc49Kn6l4iX8WqDt1b5XKPgtL715Kw37WBZzHH08EJ2eyG6+Lc1eEdcjiRHDMljOHZMvcyyFzmRMl90hGdXM7VrKkAXfLx/Mh24jofek4wNMaRczh/Ua3beFJe/OK5kNQ8lY7t2OAgPT1eUWp+hV+5LpVFTfZEgxC93JRn0gPdh10Nb57iiz2RtJ8Mx3Lms6WXwZydtnbAONDGMxA17KcanMWo5/kGmIp/BHjqVcUzn6ZMw5lnCuoIyp+ieg+GbyLmK+nK6tqjiJ+bVjuGACvp76qgtPYtkWHMdKwjXh4nAJl+pOgSnYWrqo9E4sH0fzznG07jyBcNX6MVzhK+ZjDBtP4MoJRJ5AfdXmDFvPKWyjt++BUnwMxUXnyF8bLvYVV/WP4bqTeOME+sMl9VUD4VJiS8awRz6Mk4gXH25VFimFxJVONycpmevGYEveAxMYDSvhMp8SLh/HjTt9SqV6Em89gcPcflj1lZ/COwTCFb6KU3iPwBHUSuj9RHl9qs87gdvDc8JzfXPG8KHwPN9c37xTOOLBjmNnnvOpE2jgUplvLkWdwsc9OGcTP5Hd3713Z511bqz8e9hpP39mLG/BSsxl3I/iU8RI6D58mnGuwwoc46/EgY4yU1zcZ/AAaST0WdIpMHN0Zo7OzNGZObo7+DuGz3FVQg8SV4rxDG+xA0leFyd5FQeSvOWihdI/jy9gjgM9RFylWIWLuIvj8Iq5fOF7BF8knYS+xH2oDjRGuvn4D99VjnJVcaATxFWJ67N6HcjR60COXgdy9R7J0R3J0R3J0R3J0uGouBAncYq2LRX34VHiixxonKvyW8kD+DKhhVgkHsRjeJzVxhrCE5iQoSBUjidZZy9zchh++mAZ47CW9MtYbcuxGG2s1QB9vg5bEcY1lG+iHbdhPa+Xl9Cfl+IujkcZyXFchhdwOV5EkPu9gn7ooKc20G9BsYlwhG+6Owhfj43iMLrETajlPjaJx3CleBx14knU4y+04y5UnKEyRYFHwQIF+xVUK/gKnzwvllwhVpxBD8qmrvK/nzQkOEPrvQUXFfAi3eA8fQqv32g8w93NKyxoKiVnwAKqxl9lY+JJxeFv/Cki07SE/KzAJ1sVQpBY0q06ga8+7HQ4Zju8LjLj+5czHQ/0cRm+kWOucY5mYP44XtopTuA3j+CFqqcewbMPO1qybLy1V/rwTWygcMl2kSOKffI4nn1oCqVUMLW9/iLHtUCmg9zGcbyQYcQU4mL83bH/9/gHh1v7tnRsVaeeZepm51BVV/X5s9Amtdbf6J9Gdp7nJ0U0+fO/tk2VMctnOXKuOXfO/I9e5Gz2T7vyF2Ce7Q2BIlr8u/O+QUj+s32l2L1795S5uqpbbaxurGtpDjeqa1uqm8ItLeqa1XJsVZtaq9fUEVqbg9ZlodamHNSWhdauVttaq5vDrY1qY1NjW3VLuLWZUNva6pa6NeHWFnVV12TonLP9/xQ/7mHNmupGx/RmObY6o2t6FlqXhWh6FmrLQjTd4aTp7tjsrmTNxj+ZmlVMzt/x93xpOS9qHl4dfPgX8duYwN9msX1nF4oi+K7z/xy+l519P4If4IcE8aNdEBZ+jJ/sgmphwsJPLbRZUCz8zEK5hSctPG/haQs//x9QSwcIsucK20wLAAAxGAAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAAhAAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9zY2hlbWEvAwBQSwcIAAAAAAIAAAAAAAAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAAwAAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9zY2hlbWEvSU9VU2NoZW1hLmNsYXNzjVBbaxNBGD0zm+5utlu7rbfEW70gtKG4bfHNItaiEIwpmBqQPE02g51mL7IzKX3Mkz/EJ1+LDwUFCfXNHyV+s7bio8zMN+ec7zbf/Pz19TuAx3jA0MqliZOiHIlYi+xDKnUsjysQ6+RAZiJu773tVcgDY4gOxZGIU5G/j/eGhzIxHhwGd1vlyjxlcFbX+iHm4AaowWOomQOlGdY7/9/mCYPf7vb2d7q7LwhuJ+l57aXOuDBE4tfSiJEwNpJnRw6NwqyZJzqsKKzhDGxM0miTYW02DQPe4AGPZtOA+9z/8ZE3ZtMtvsGeez4/++TyiJ99dh2bsMWoIupJkZtSJEYH4PBCzCOoE7rJEP597KOxoSF3i5FkWO4UiUj7olRimMp9axgWOyqX3Uk2lOW5EvSKSZnIl8qS5ptJblQm+0or8u7keWGEUUWusUm9anY2NG1rOxEt+lpS7hCL6aaHYq51Cv+kcq+QDf+IqFcpd+m4lRLBJ99F8kOKturCN/B3p7jxqvUFt06qbv+mcNyrCt/GfbqfkbpApS8N4LSxWO0ISxdsuY3LuEIQVwdgGtdwfYCaRqDR0HA1mr8BUEsHCGZggFq5AQAAeQIAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAQAAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvc2NoZW1hL0lPVVNjaGVtYVYxJFBlcnNpc3RlbnRJT1UuY2xhc3OdVltXE1cU/k4yJEMMOEm4W6kiSkiAQbwLKoLapkW0IFRLrZ0kIwxMZlhzJlTffGof+x/61Acf2rXq0tWHLpeP/Tf9A13d52Ryj7euxZzb/vbe39ln7x3+/vfPvwCchcVw2TF9veB6RUPnRmnfNrluPpELnRd2zJKh5+5srMvV5unxu6bHLe6bjk+nUTCGU3V9GqtKXK8j133DN6MIM4ys7BoHxhN9vyormPpNx7f8p/MMwx2E94y8bZJMcYySyRCz3PIjLsxx2timUzS9VSlJSmXdNpxtfd33LGd7vrO7ZdculxwSRirqDCdWXG9b3zX9vGdYDtcNx3HJheXSetX1V8u2TfCebdNfaXDYl55sdxlHN2LdCEEjyv6ORSwXVv5/fIVb3uy2P93udXKTIbpAwOlrV1UMMIzuub5tOfruQUm3HN/0HMPWc45Ac6vAoxhiGCSPhb27hkdmCZHjwVUZJhpd3MnvmgV/vpPTOEZwJIZhfMIQz7ue5/5QZalWtwyHKW5LDcI4RishOk4y3ixj6Dow7DLNLEdGSHOzsg2nJ3NxjOOkUEyTiNdESjon7q/SfU3DyxUZtArZsm/Z+sZG7gZFsbsifWSR+Jh87h0rL8Lim03Pfe/pvsw2n2bSKpet4nRhx6BrHBLPX3ORrD5+3UkcU5gW9M4SmDeCU+lWrCAcWbAcy7/KcLHDi7af5NptqOhWMapiiuFheuXDqnDNfEymOqXHDfOxUbb9ZQqD75ULvuvdNrw905MPfRFXYlBwVb4EkYeK6wy9zZSiWKai9Ayn6JbEPo6bOBPDDdxiSIiDmbosPanic4ajMglvPtn3TM7pBeSb1lIxji8qCfalYHApRsG9Taaq9G+bvlE0fIMeLFQ6CFM/Y2I4RNu83EIMIUqmPToqnmb45/WzsVhoKFT5VPq03mBWY6+fBceaGh16/WwuNMuWourAm18iIS20dDIZ0cIjoVmF5q5gjtAcpVmluVviYmujFenFyGLk/pufeum0lyyPKOohLT6mqD1aL0HCnSGHJUSTEGmzHZLQkgRJaX0Eke7bIf3aAEEGtaE3v0aGxcXnGD40PUSpFFxqFEbBp9419TGtK4pvqV019S/qCzXAzJ5PLX6tTN2+ZG5a3KLGfr1eegxHAlnOOeggVZbdomzzbsGwNw3PEj8M8teB2oiotdVyiSo6ONEoN3bcYq27kYHxVvM1YZOf2Lpb9grmLUuYieccx/SWbYNzk+M05Z9CGaXQTG2exu9FuoHJL8oRh0EHEdr0iMQTja4d9GkLiJoarVtA4ySgdhJo99EcCGag02JWkGk0E0MCvThMuDztBIRqFF2ZP5D4TXop0BivHCKJFM3FQB043mQqQe76qXKEoUXSDAnNbHLwFY5msi+Q+L1mb6AiC+yJ1QARYTXLEbJsCo+MBMBj+qKs5uVYR7pj76c73kL3xLvojn0M3fF30D2FCVq30p18/l66E6ScQTa46+WAYiRz5AUmW8lFauQidHKygZyw00AugTmc6RC+c+8PX7YlfOdx4e3hO/fu8E03hS/71vAx0b4DLz9S/XTRPJtNXiYvU8l5GoeV5IJwyRT2EtdknmWm6PUyRylKmWGlicnZin6NyaysRiZXlZITK1FXYbkShaRInkKWogocpDPBNaGQKkhJZBXosMK7X6nx7pEe6rdYDJLgCqLSYyqTXEouhV/hswfJ3CusvMRqnWjlCVJtTzBDxLYl6hF2JC1q03iI7+inTtT7zyTvCtBU8yru0PbuFsI5fCX/1rBe3d3LYQObtMTXW2Ac9/FgCyMcKY5vOBY5ujmuc4xST5GLKY5pjkscxzj9+4UTHP0cvRx9HHMcZzjOc1zgOMUxwZHhyHJs/QdQSwcID8FfbHwFAAAuDAAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAAyAAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9zY2hlbWEvSU9VU2NoZW1hVjEuY2xhc3OVU1FvG0UQ/vZ88Z0dp3VcJ3USoKVNwE6bXBJKKXEopC6VrF4clBQLlKf1eetscr6LbtcRj33iJ/ADeOKRgkQRSCgKb/woxOzFrWnz0kje3ZnPM7PffHP7z79//AXgDh4y3I6E9oI46XJP8f5RKJQnvksNTwX7os+95vbXu6nVXnXAGG6OMmh/Gaa8LX50JLpnoQ4yDOWe0Fuyl3At42hHqHiQBILgas0/4MfcC3nU83Z1IqNenWHej5OedyB0J+EyUh6PolinqcprDcKQd0JBYWUZD5aDfUoVYdxboou1SFy4DLbel4ph2b9IR1QxuyEjqe8zZKq1NsPi26c7uMTgNlu7TzZbjS9JywtcXS+giMkcLqPEUBzpsd05EIF2UKbKpF8j5IqauvKaZilIBaZxNY8pVBjWL9Lz/FciUZJ0izShDmYZrh/GOpQRlQhDuj4VvTGyHxOhd0ipkLK2n9Ksqv6bjOtDggMtQ8+nOOL3Hq7l8S6uM5RG4U2al5mlgxsMteq5tpr++dh6rV1AAfN52FggYTaCcDizSX/IfEto3uWa00Ct/nGGPm9mtnFyO6kLs1kM7JCg7irD1smzct6qWGfLpVW8RKft/v29VTl5tmatsHXmPHBc6/THrFW0dqaLmVm7wlbse+1vTn+wCc3O2u5YMXv6U9Y1RdcYFvy3eB3EcbJ//mGAYeK10TDkgjjSCQ+0Mv1P5GHhnvlwxnNkrTMUXo11+VDTE2jEXSpU8uOAh22eSCPeE7MxXPZlJFqDfkckQ2RuZxBp2RfN6FgqSdDm6Mkx5HdTWo+kCS00o0gk6YAE/TczzGyfy8MqEbON+pgxPFPdGcaQJfwz8pbIYwYt5X42A8F92gtnEPJpwue0sikyhy+GtpPGkgRkmzItusRElBd/wZXfMGOX5n7H+ye4+QIfPH+jbvl/daeJCujNMLIcXIWLCtGcovPDV7UXKNvkTfwJ69sX+PTx4q+oP097GlGbIrqb6UUbeEBnntA58u5S3w3yt8mv0mW1PWSaWEx/t3D7pbfUxDI8MrGyB2ZkW9tDTmFc4SOFCYU7Ch8rjClkFe4qfPIfUEsHCNMoSBorAwAAtAUAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAIQAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvc3RhdGVzLwMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAALwAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvc3RhdGVzL0lPVVN0YXRlLmNsYXNzvVj7e1TFGX5ns7dsFjzZJIQEkAUi5OomiK01qOGmLCYBSYgGauvJ7iFZ2OwuZ84i9KK03nq/F4u1rbVVbEtbtJJQqRqhtbW/95/p41P7zjlnd7OXhPCLz5Od+c43890vM5N//++d9wDswEcCXRnDiiWyZlKPSX02lzZkzDhjAzFp6RY/4wePjCkoACGgndBP67G0npmOHZw6YSSsAOoEOkpMOBocMpapJywZG05lDN106X0Cd1TslIkZY1aXsUfyhnlWn0ob7taAQO/wklx3G+lsZlqOZ/e4qEEB32k9nTcEBoaXtqjEgUYtor1t2rAO6aaVSqRyesaSApHOrmHb1LyVStMKqbZtGc6a07EThjVl6qmMjOmZTJbqprKER7PWaD6d5q4NFWqnkkbGSllnY0rC2QBuE/CnjUzSMAU2VtpYvnkwjEZE6uFBk0BwKmua2ScNM4wWB7lGIHoya6VTGRKn04yGrcqeEvww47NWyaMBB4/T/Z3HhisjOFhlaRjtWBdCG9YLeK2ZFP3Rs4xXK/KELmieNjKGSXhEz+WMpCNH4GBnpbmF8Dv7xuwv6rPErkOGKakfPVQQ5HeWgtgscLvrihOnZ2OpjGWYGT0dizPGDFUqIQPoEGjl9sRJ+lafNbgjLt2wCWzrrHbMIsyYYjM92DURxlZsC+EOdDJDl/GJrZftExuaGAigW+DeW6HoKNlLbAC9AgEm6ih1Z912VrmpmDt7FO6xu/v71VZG807EQtDQX11+tUkC2M50s7KO0QxnoRgWuyLM/nF3CHfhMwIiHkYI96ic/JxAA5V06j6eFOirVrRUhkcyqVN5I25rcTxlmOQ6iJ0h8rmvrDXdhCyAB9gAKFYJLC/dI0fie8l1F3aHMIQ9TJmdqUzKul/gns5qo6ox8UpeKgX24cEQ+vCQwNaVpWoAcYHNJeZxVui0nt5lTudnuWffmYSRUwUbwMNM0koldudT6aSyckSgrtNR4GAIozjE2BzJmEYiO51JSSMZdcRHgzhMQ1VNZewI1EjkKpQrhL4axxHFfKKCsrxbLEH5mKKcVAPToqWWYFv7z4cwjMcFmkrr4zNsbuoECOCLTNQVdQq25BVsC2CKB5fM53JZ0yog2dPWlKV1nP1AiSfTYHx0bHzX6J59Ancu1/eqKpYuOI7pevRghofi0s4rb7UnVKs9ycStViaAWarDxJ5wDjdGn4lUrwrMPUE2LdMHnDPEKcjd7uFBdulibfbcUmVayKsKPy0w2xm/idBbXF5GbtdEEI1BtARhheBVKf/ypyg9PlzrVNlrHNfzaYs3CGmZ+YSVNUd086StrMD4kn2l1ERuma0qmqdUB3taQWdUh/yaQCiRnc1lM9R2YPHH9sUfdy3+2MEDPZHNnRV48dMM4S1dHsJKwY6k4wuB/3TeAvWnmRg1invliobxAr6hovht3j4L2E77CntfEN8VWN8ZX77Tfl812R+wGfRGndsk6X7EWu+NFu6JRPzERhQKnojzPKy7gvgZ28CMLmf2ZJPsKo2LGg9zcVodNT9nplAFHuwv4RchvIxfKiinSvAVni3GqbyelhUtvuCHo2x+y12VeeEqdFrdNPYpVje9gBV5h/EaXlcXsItUvFBGI4alJ3VLnQie2dN1fNwINTTwc8r+hBo8NJ591pMcEOKjhXMTIc9aT/G3cC7k0YL2pDBBdyUYIDrqwiHCDc5ODu7WxRTaemd1Nafg9ReCaxfObff0C/48u7dF/Fpdu6ffy9nH2c85YM/BICUTqr/+qt+jhQ7Ua61q3/4bz9cRXqv2uHDbIrhdUdjwgLaOMEUpRrYIG7KF2FCgCAVdInGgSVtPeMP2oHZ7u3et6N+4/8b5ugOaFiV203a/tpnzlv1rKKjDUea8OLBau6M9GPFGuNK/1V7bxrVOtXa40ZFCE5QT273BBi1MpK8cuYrIZkeLx66f95YWVmu3HW7XNJd9pL/xngl3g5+rTVozedmmlUhatDXX3/B3qYCy421dungXPUKZINuWulqUv0G5E2xGubJnYRVtsYHsmpK2tMKZ68taM+q0XfLJU/2YqS9qzKot9IQ7T7IHrjucp5RZI545nZIparirVE6sU6eKI8PZhJ6e0M2UsmFcDewtyvbR/OyUYbqY+rHUdEa38ibhwapX7s4VGng/9V1FBRMnedNyOWuswplssvi6omodlYoXF8ssuK/mTaxKl5p3QKVJaCybNxPGgymlRpsrc6LKVRhgw/Xy50eQc0S9WdgWIuqRzVi/S9jPebWNa6mB4w2oCsccwSq2F/UflSFyZdpgje9daJN13W+jeWzSy6l17Co2XFYtCO9zDDu7cDs2cl5w+YFfH9h7rpfJ4Csfm8j5PXuv325lR3siW66iq2ek9wP0XEDsGvomlbg5DMzhs0piEbq3ew73z2HvPPYv4MBFbLqG4clrGJ2cxyORsTk82jOHo3M4No8vLOCJ9y/bzfJ9Wz+PkuRqqaDN0KmN0ncr6qnJZvpxC5rQgQ1syNuI7eG4nbhBdGGS6zdsaz0fYzCAxOMBHMDfifHxMcRpsZH/4C8gihYnYbg+3QFh+yb0FlJXkV5AptKPoSo/9rl+/LBMRCOyyBFWXGMuV59y0KUKhr4qhm0kPgWTuyqJmyu1qSZur9BC1mTUenNG6yrSgk/lGoyevDmj9RWMeKN0vf00KX3Kg72Rs8yvvsiXOLZ5I1/m1D2Pr3Svu8KE6r2C5u6+K2jtbvNewZNvFgXucIiLKdNnl5gTElVkHhtSpVVnQ6qgvEXFmuhnlR6NXpIpT4FbwU1OerR4bWVXl4+aUv+rbliHyCegCqnFpwWfugDtGoYmhfCLeZy719u9rrevzTuPrzsKF8QG6Y8bdtaLFgp9ppgkWyqTRNTwaiOeLcZzS2Vi1CIoT4bnahK3roz4+WIClIhZ7Csj5gXUbSrHiVVxi9YI+jV4JgtuK/F14hwtxjlajHO0GOdoMc5RN85LxLayDSwR5zi+iW+55o5Tvorzzhafl2EOqgAR9rlw80iLL+DCraNuLtQr1xSSYA7fcay5YQv3hhsaVlUUxQ7c7Uob5qxsGyp0ze+xayqRc/hh5McOzM57NPJTB25V8IsKtjvv0cgFwuywl21flUt5qZhtr6sE5LxXcb6KX2kbZxTfyQ9RP4dfX4Tv0bonHFxrFY5yynCXirYdgv8TrIUI0AYPR+0TlSnOl/iEcVjBytDiFYKv4jeuZ1Tuqggf7u55DcM9H8BzAQ/1LMAzoozo5e8VBLwX4a3jGaWsIar5Kt64gE3KDn612l9NyoJe/uwvn/dSXcmC1fB+jCilD4n/qv+BFk+K39pV/E97/Bv+xZnJynNJPXjRgN8xR35/DHVx/MH+u4Q/Fr7+FMefcZkg3jwGIfEW/nIM3RIbJd6WuCIRkpiTaJSISLRIWBJ5iTMSkr1b4pTEoMROiXl721WJsMQqiaxETuIZiWclnpN4XuIFiVftPX+1x6jEOxKbJXSJlySSNnKHPV77P1BLBwjANrL8QgoAAJUZAABQSwECFAAUAAgICABakmtXjIKZyngCAACDBQAAFAAAAAAAAAAAAAAAAAAAAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZQSwECFAAUAAgICABakmtX8v+2sosCAABPBQAAFAAAAAAAAAAAAAAAAAC6AgAATUVUQS1JTkYvQ09SREFDT0QuU0ZQSwECFAAUAAgICABakmtXz0n5YBMCAAADAwAAFAAAAAAAAAAAAAAAAACHBQAATUVUQS1JTkYvQ09SREFDT0QuRUNQSwECFAAUAAgICAAAAEEAAAAAAAIAAAAAAAAACQAAAAAAAAAAAAAAAADcBwAATUVUQS1JTkYvUEsBAhQAFAAICAgAAABBAODDuOwMAAAAEAAAACAAAAAAAAAAAAAAAAAAFQgAAE1FVEEtSU5GL2NvbnRyYWN0cy5rb3RsaW5fbW9kdWxlUEsBAhQAFAAICAgAAABBAAAAAAACAAAAAAAAAAQAAAAAAAAAAAAAAAAAbwgAAG5ldC9QSwECFAAUAAgICAAAAEEAAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAACjCAAAbmV0L2NvcmRhL1BLAQIUABQACAgIAAAAQQAAAAAAAgAAAAAAAAASAAAAAAAAAAAAAAAAAN0IAABuZXQvY29yZGEvc2FtcGxlcy9QSwECFAAUAAgICAAAAEEAAAAAAAIAAAAAAAAAGgAAAAAAAAAAAAAAAAAfCQAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9QSwECFAAUAAgICAAAAEEAAAAAAAIAAAAAAAAAJAAAAAAAAAAAAAAAAABpCQAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9jb250cmFjdHMvUEsBAhQAFAAICAgAAABBADNkbPa3AQAAKAMAAEUAAAAAAAAAAAAAAAAAvQkAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvY29udHJhY3RzL0lPVUNvbnRyYWN0JENvbW1hbmRzJENyZWF0ZS5jbGFzc1BLAQIUABQACAgIAAAAQQCZqmaOZgEAAKkCAAA+AAAAAAAAAAAAAAAAAOcLAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2NvbnRyYWN0cy9JT1VDb250cmFjdCRDb21tYW5kcy5jbGFzc1BLAQIUABQACAgIAAAAQQAE/YOltwIAAMgEAAA/AAAAAAAAAAAAAAAAALkNAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2NvbnRyYWN0cy9JT1VDb250cmFjdCRDb21wYW5pb24uY2xhc3NQSwECFAAUAAgICAAAAEEAsucK20wLAAAxGAAANQAAAAAAAAAAAAAAAADdEAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9jb250cmFjdHMvSU9VQ29udHJhY3QuY2xhc3NQSwECFAAUAAgICAAAAEEAAAAAAAIAAAAAAAAAIQAAAAAAAAAAAAAAAACMHAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9zY2hlbWEvUEsBAhQAFAAICAgAAABBAGZggFq5AQAAeQIAADAAAAAAAAAAAAAAAAAA3RwAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvc2NoZW1hL0lPVVNjaGVtYS5jbGFzc1BLAQIUABQACAgIAAAAQQAPwV9sfAUAAC4MAABAAAAAAAAAAAAAAAAAAPQeAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL3NjaGVtYS9JT1VTY2hlbWFWMSRQZXJzaXN0ZW50SU9VLmNsYXNzUEsBAhQAFAAICAgAAABBANMoSBorAwAAtAUAADIAAAAAAAAAAAAAAAAA3iQAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvc2NoZW1hL0lPVVNjaGVtYVYxLmNsYXNzUEsBAhQAFAAICAgAAABBAAAAAAACAAAAAAAAACEAAAAAAAAAAAAAAAAAaSgAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvc3RhdGVzL1BLAQIUABQACAgIAAAAQQDANrL8QgoAAJUZAAAvAAAAAAAAAAAAAAAAALooAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL3N0YXRlcy9JT1VTdGF0ZS5jbGFzc1BLBQYAAAAAFAAUAGUGAABZMwAAAAA=", - "filename": "BASIC_CORDAPP_contracts-1.0.jar", - "hasDbMigrations": true - }, - { - "contentBase64": "UEsDBBQACAgIAGGSa1cAAAAAAAAAAAAAAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUatlU9zqkgUxfepyndg4S6jCBLUVM0CBRQRVEBBNq/atgWkobFpFPPph/yZmtS8WJXKy5I69D2/On3vbQvkyQGVrL1BtExI/sQJne793ZjQPSiKtk9oesDk0p4nEOUQPXFKAWCMuNfvEv3FvZ/jxE+P/Vf1/s4DNEKsvcSAHQjNPmiN6CKA0f6JY7RCn9SxQdZ4azXICoza7zKnN1J5f2cl+Y2qn/Dke0KfuFeBWxQo51xSUdh43t+9meSI8fBF5stXt5JHb7b8S4WSf4d48W4pEKKCEdqCAONWmUS5R+/vOJCXALKG4vUnoQMxKBtOd6q0xUe5rSZRk/gTtwiySymv3EDCeYjY/FpdR1OLOFIkTOXdfh7Ik2XE6l0Qdf/+Hp+RJywBDeAthH6ZP1rwOMYyO4XLRRjK2hFv/NDZ2dd5QIawf5k7gbIdj7Z/itAak6xouo3krSYi15jYhj355TmK7Spjz1jYtxgVwRSqUeyPvHkt5p63YLZ3Yo5fi4iMy8t55Fp+5Swurrr6WcaN5hj69ouUPEoD1SrFTbKvcMaWgigfEyk9rbO8ewbMA7kmDUaVg9Lym5T/NtstgtF5MMcqGhCDCv1pYl8KpJ1OLLccydZccbXDw8OxUtbrA/y5nDpNTjd4xhDGsR0efA9nV7wcbtxBsoZ2OPPSwJx0GcDidoR8U+J/+N50w1bmhvvFi9Nq5k31nqQApsz7wdm0np/rCsimvNxoxwQovWdvpsRiX01/FnOi2ZqjeF/EjDNDKerd6mDKVeZSXZ+N02wkZGzLi/0JH3f1vXLcdQ/uXPuAmSURBS+biE9I1YExyCOESdQ+C506w7+76Lvjdji5Loa6wxDpkqUvnS8TsRcoijUbOmm4iEy/crPsIn1wsTRPaRu2zl/e92zZSQnDSf4rI800oN99QB1sislQ8iGeI3XnGRFfVlW2PEckMik6q+qgFvTe6vHhj1ff/0JXvGkz1k3mzQZyb4Vd1ITpbpRawHCPs6q+hoJapGlMoL4q4HVAQ9EOoaodBpcvhJ2BkiH6eeCP/sN+h/zKPo9MmufDSXyNgC31Qpho5ORFx/PzerOyhAfwsfuaqtJR/LyiijOTeljs92RvCN2hQeCGxtuQXkaSTWdr4M7CnaHw6uqbY3fzOaMO5qmD9vkpXpIrXkWT6XS6jB4PDyFMz9tr3/Sq3pWMu2/G/wBQSwcIhnN2h4QDAAB7CAAAUEsDBBQACAgIAGGSa1cAAAAAAAAAAAAAAAAUAAAATUVUQS1JTkYvQ09SREFDT0QuU0atlMuPqkgUh/ed9P/gohczMQoiKHZyF4AgKOADfMDmhkeBpVTxKBDkr7/cvpmkM9MmnZ7eVSXk/L7zneJYMMZeWRVgcAAFgSl+7Y2G9POTpQoDhpsM5jAGpBwYHobRnwPEA6EsC+hXJSCvvVl/HhFkhJaB2qVYHmQ04VVJ8Zukoarnp97RO2992b07Glvz2o+HlV97xaVZ52GkLM2T3af7l6w+XpJKFke1X7Q6io1K4lbWiWdz0pWRCuCVIByI99/E/JD+OZ4yvb+0AIQ28P5+fnp+Mj0EXnsYlFSQFqFHEQ9lCSAUaN4OVJSkNaHkPzelu7wIQQCyMi1eAi9JXkjnxi66HjxMvKDs5Lx9NBoGiUfIvzt57UHplKl7Qb41bpAy9T2+1zC3lC23sdLdan7hg2Suw7W/zIUfX+PTMCyh1wE+QliuFdEZ7054aTmSeWtRf8liN15HGC2VC50vuxn4uDGJWP9fhBcpRVk3vBS/dIosbWFq5uKnvRNMS5BsbW0+YqzyEbNvIx+FcwofZvYlg6fNtsWu75nOFkpu3Lp8O1V9Jv1exoO80xTnk5Qtc+IqydZv7OG6v+sjepxCrcoZVSqN1XwXVeyeS+2Ib4X4i5T/PLZHBBLT2KG7YRS68aJycXMEyrYP0f3aAh5crI21yZzdWJyH8VcJPvA07Dw94Bk5Mr3I1sv7pZrKnHiXdOOs+/l9zbbypMpd2Jilcs0l6ep879wUzRR0zfrk4AwUHm/AdSk84071hIxlbe5EGSeXssUqko2mmko2hsPn1+/FXMimvBPsT2KmxzqJ8p3u9IlupA5HE4A2S3+R180+3VvmKozxTqtOVrV/h4lgXHi/NxEF02oYnD0cgySNB7fRsEHJBylY8PYoDwUoMAaixUObhGrNQYNWmGIT4xPILyS/3pjF9l2KIdvCQDMVqk6L61v/w2taJhD/RGlYJeC/OeMzGU/yZsPfQuZst/kinREu5bcMa+U6b+xXbj/mgG8KO/qbpQu22v3WnfNuA1mPZO9MmJEpg85iDfSaNWZhcBsfrYIvRbcohFGO8728ETNka5+QjTxSguJj4RBNM9fGM/PMBpEk6k3MiH4IdEsjbCutpnzdSMIIpTAk75K6quyF+bhisSlCih9Jtz57canGZu7XiVpl8W18GK/SEtPq/GQfNTlvvrjSH0lzTU9SjseR4LbWxGeWlHo9F9cE0DCq9PmRnW/FA1fPkIqNt+BfUEsHCJr13oCdAwAASwgAAFBLAwQUAAgICABhkmtXAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL0NPUkRBQ09ELkVDM2hi+s/GqdXm0fadl5GdaUET0weDJqY3TIyMhvwGvGycCW0ejKnMLEyMrAwG3AiFjAuaGD8bNDG+B+LJC5iZGJmYWMRVq8sNeNg4gGrO2bIwMwF1RBtyG3CyMYeysAkzuTuBTQRy2HnYfPLzUvLzDPmA6oECXDyszvlFKYkw1dw8TEHGhnIGMiAOM48oWFLBJbVMwTk/JVUhODM9L7XIQE6c18jAwMzI1NDC1MjUJEqc1xjENYZycVkujG65MJrlwsiWC+OwPNJAmI0d7FMmRqiXmRnZmZ0YWJh7lXLP8i8tMcxdUrGqVCku52F/6umbeQn7bZoCN04LEQ97euf7mdWK24US5C6otzJ++mzLHX9ryYF5SclTUp5M5Chc7GzgCDScOVRWlYXHgIuNQ5uNkZWVnZkZGP5AQX4WYNCyNxjIgjh8LGIsIptV9DOfJgq9b5yW9SaJY+X2HaX/NFHjgdmDwcCVSZFhQ0nXnCqhmcFXv13RWiHzbsfxX1NLXfk0NOInT/xxvlzyAJOCNusFjuuzO977yP+W9D7rP7F4Ts/WwzMe/1yR6rX91V6OaYaNFw0azwFTh0EyTSMXmpowEiAsyFkZWDwM3IBeOvhvyqaCiZ+NNj+aUyDDtUVO/YJhxqyCwzYyUrd9wuvrHIFK3lYc0H8NNG3ZbzVmmWxffwbrqzW7Mx69mZOvpiUkc3A5AFBLBwg+KnpUEQIAAAMDAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAAAkAAABNRVRBLUlORi8DAFBLBwgAAAAAAgAAAAAAAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAACAAAABNRVRBLUlORi93b3JrZmxvd3Mua290bGluX21vZHVsZWNgYGBmYGBghGJuAFBLBwjgw7jsDAAAABAAAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAAAQAAABuZXQvAwBQSwcIAAAAAAIAAAAAAAAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAAKAAAAbmV0L2NvcmRhLwMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAEgAAAG5ldC9jb3JkYS9zYW1wbGVzLwMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAGgAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvAwBQSwcIAAAAAAIAAAAAAAAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAAgAAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9mbG93cy8DAFBLBwgAAAAAAgAAAAAAAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAAFUAAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2Zsb3dzL0V4YW1wbGVGbG93JEFjY2VwdG9yJGNhbGwkc2lnblRyYW5zYWN0aW9uRmxvdyQxLmNsYXNzvVfrcxtXFf9dWdbaGyVRnaSxSyhLrDTyU5Yc3FRuQx0/qBr50ch1cQ2E9epGXnu9q+zdtd0Crfvg/X6XfoABPsDXMoPTITPU8IUZ4E9iKOdeyZYsu8TJMMxYu+feex6/e87v3Lv++7//9GcAV/ALhlmXB2nL80tmWpjrFYeLNN9SQvq2422K9GR1NEWD5Jhl8Urg+UnLdJyksMvuvG+6wrQC23OVRkYDY0jVndJzz1PxsL6GFoYrDwNBQytDVOJgyKR6Ck0Rg3qcamBeagg9GoeGNoaEtcKttYYFhmzqAV31LDC0iGCLobvg+eX0Kg+WfdMmXdN1vcCs2s14wUzoOKNtiDM8vuYFju2mVzfW07YbcN81nXTeDXyysi2h4TTDeQVtzvTNdU4aeVHzwHA5VVg1N8y0Y7rl9OzyKreC0YaZonRTJlhxPIIOHQmcYbjUtCfLo2i0AZG+ye+Ets/XuRtQ4HMMbfmZ4vzYzPgkRWpOxdFmlM3z6GzHo+hiGHig7Gn4GENrmQfzlL/0fcr4EgU8WMSP43EdF/AJhr4HMNTwSQadgs6GQSUMBEMHRVYZDAPbSRdsEZDzbiR1XMQlBqNWL8tzHF7zOV6XbwQaLjPEBOXd4QzJVLOznsMVi6MHvTpS6GPo+cg0N6AuEpW4hgEGjaBPmIHJ0Hs4Y3Xb8ZqkDCleGkM6BpGh/cyv2MJYD0VgLHPDdI387ItGQ8YG2zB8AFVzWwrpUqTJrIbqUwwX61vMU2rKpjPml0NJkMkt2bIq8U8SsZupej20nRKnhn6Kcvi07drBNeqolCTwKJ7WkcMzDGenTNvhJcOv8y5ntOHTZGJWKtwtEfNSR3TBoalaNMrHGK5L5+NE+cCrLlKc1GET0p3ElNT9DMO5o6IoqHkdV/E8w5n6+vyK722ayw5lqMDQWaPR/CsVPm6KxrzMMMy41N2GpQ4NWRaLNIzAM1zPHVBLAZkZVJNBVZPBWk0GazUZrNZkcK8mbZjTMSvx9OaNTc+9HBimOjplsYWxaQcrhmlsmE7IDW+D+0ZmaIjqXqRsEL0W5LyqQj6OF7GgYwQvyUQRcW4l7Q2GeNLnFrfJUg07DmeFiMq3KtVl9jJ1XNJO3k6GQuWZ5cm77YXUuYVj84xcxjzVs3TFHJf4DO37UAkngTCTmWSNR/MrJvlKKGQHpqJypwwv/BdwD3U9Epz0A14wDE8cb6saVmkvzXXQQHfGUuqhNjLaDLWqKnWKXIi96y8mk5UcoqyZfpnOl5GHCxaHhzvtiIDq9Nqh+h4O3awhz1s7sCnYnO+VfdKiNFpr1Oz5wlE37gS/bYZOQDkUgR9aBGHa9KV6tZ8DHVEQQWNJ4pzkzpmkCCvcvyWre6sib+Ykbfbi/YEyPLIHYJoHZonObpqLrG+00FcYk48TNFxWQ8hHhBpkjaZK5P/a7vZ5fXdbj3RG1CsRqY962e52m965u52NDLHnE4nIY5GhlmwsEaV363Nn//r7WEx6ydIhcDTKIz7JCBmoZzY9f03pHLhb71tNDd+gY2KvpAynGtYG12RjjXslLs8Lj9K4YPq2PB7n5YPhdMF2+Uy4vsz92sxJIra1Nm1WauME5W/FK+1/FhG65M3QDex1nnc3bGGT1v7iWP37izYkt2oGoU9eLh2DXJLXetELfYtP2TL02epggi+H5cmtgLtCfS+ennQtx5OHWhUanYx51+X+uGMKwSlwVw3fQhVdAyhkiOtRSYFEQlJfFp7GOk4QCb5D0/+k0Qma/U1fx6n3cRZ/wGPTfTswdvDE++jfxeAOsjP9HVdy0VzrwF8wMhI7F3sXF+/h6uI95Bbv4lrHszuY6IrSYwfP3cWNXUx/gIHFv+HkPcwudrxwFzc/2MVIrrW/Yz4Xy0W7Wnfw2UTpt9Civ0O0ZUQ7px3lMHbQIfCeIu536fkOTtOXzSUsohOtSnoZS7QPKX0On0dMSV/ALfoCf7WmF1WS1IspSepVV6VeG5bxDL4Ik/xdwFs0sijWCfwUJbKNKImTXjvZvIvbJOkyZyhjRfYTSXHYROnvkZwlOQafNLfJTpC/gPC8gWm8iRmE5HuD4r6FX+Jt/Aqb+DX9vk9219H6ISlpGiIaLmh4VMOahnUSqFtmafAhuppX6TlCOsCz7F/yK/IH5If+Z4nT64f006jHcVIhHIVbrTjmaI/yADjV2/dHiN5+1sruYuM9xQyZXaO6ur+3U4TvDvmR0hZeIS25S53eoHmdfj9Stj9W0dsj8LaBSoKA4Cdq4duUPLB/FKfH5vSDrarfUCeW3ls09qQpvc/IGE1q/+MLkkJkjb1rTUwUCwdjfMT9JxXJcvj4lo3/wOi9BT3TnenPZJ/MZfThoe5sLpO9qmdHuof7pfjUvjic0Xsn6ylRh8H/KS8SY+ZKd0ZBU1IN275cBYefUWGjxPJ2/JykDipyRHGli+a+iW/R+x0a5Yk1rxINvrSEljy+rP6+gtf2Rq/nqUPeIBFvLoEJaom3l6AJKX5VQBf4mkBcwBb4+n8AUEsHCLJkgftfBwAAThAAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAOgAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvZmxvd3MvRXhhbXBsZUZsb3ckQWNjZXB0b3IuY2xhc3OtVd1TW0UU/21IcpMUaEhbvvqFbbAhtFzAStVglY8iqQEKQbSDL8vNFi5c7sW7m7SMPvB3+OiTj3VGwbEzDtNH/yjHs/kihVhMx5l79+zuOXs+f3v2r7//+BPAfXzDcN8VyrQ8v8BNyXf3HCFN8aI8MZ853nNpPqqs5miRnLIssac83wBjWM6dHKWxJq8Fc96mbU2e5iufu5JbyvZcaebtTVcUVk+2Mg8zDDfertJAkOFWc7tZ11Y2V6IwvU+KQiXuFAXDg1wr8VV1eD5pCFrccRjGUkMtxsFwmc5s8xI3He5umksb28JSmXZEEYshgHaGVM7yzD3ukwXhFF27JHxJ/tgbRM18Ue4Jt8A3HEG6buc8f9PcFmrD5zbZ467rKV6xveipxaLjkNTSu1QxqSNMSgqgwf2yxJiBOEOXp7aE/4T7aj8vpCTmvyZfn6rKUKAJXIpSoJcZwpM2pfQhw3qqpULUXMycb25orR3d6ImhC70MhixuaC4BO3UOPjNNi9SPq7pI1xjutVR2AzcIdZtCZQsMybOgsfx9CsjMC6voi3kut8jWAN6L4SZuESCauroiLEHYmLNd7thqX3tuIMnw41tCq6XlfPunJVyvIMw8YUvIVY9MEyeTze14yrFdc7u0a9quEj65Ys6KZ7zoqBlKhPKLFtVpgfs7wq/W4v0YBnGHbpB6oZNxBjJnXWG41ASGb7aY/wXX+l6rLVsyTLwbHulyU42Xzl6MJiU/WxSGwf9QuqG1CBLUC5ulPusqn9qAbUkDHzD0WFvC2iFP+K4giaystgSGO6mz6G7YyWs1m+WCfYiJGL0FDxjaUpUCfhxDCJ9QA6hVf0EoXuCKUwCB3VIbvR1MDxdouVFeQg8BBrZDW4Uxhm+PD7pjgd5A/T8+qEwjoYjRe3wwHkkEE4HRwCib7kiE4239gdHg65/CgXjocSQeoVVgvmelq74fofP9wUg4brz+ORzVNsYZBs674Axmy707+tzzd8qKGIZbgIiBxwyRGk4YOht4IzuK4epK0VX2rsi6JVva1NynTjo5oXKGbh9DIucReNe4b+v2v6oHhos52xWLxV16Hao7fVVda000xalYW16hjgnaSp42XWe+cTKq88EVXUqGWN4r+ha1Hm2uPeu6wp9xuJRCYozaY0hDgPo8dXqii7QKE71INEiUHjoCxBKtfkCkDI2JV+h6mk7/iitH6Mulh48ROsT1Y9w8xO2F9CsMPtW8u8xgR0jVmS81qPCExgHSco168xDStNNBdBh3yRJpxj2MEF2mv7Ns6zvi75P091ip+tVJtMHH+BR5eIHm2sPrRLWeUPoQHS/LYS1XRQGXHhUTo2RSi5p1UfL1xLf2ymaDH7XDjXlhdK/GqlmZpZMBovHhxPjv+Ch9hEx6+Ddc+aWus7vCr+rUs0qma9rDpD2vreoiAKv0G6xega/KetqwVqYL+JpogmZdZV19NPsSOaI6P+u00hoNi0o1SWF8uo62LB6Wv8/weW01lcU0ZmiK2XUwiUeYW0dMYkTiC4l5iYSkJo4xCVNiVCIqkf0HUEsHCDgU5AyKBAAAaAoAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAXAAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvZmxvd3MvRXhhbXBsZUZsb3ckSW5pdGlhdG9yJENvbXBhbmlvbiRGSU5BTElTSU5HX1RSQU5TQUNUSU9OLmNsYXNztVRbbxNHFP5mnXhtYyCkISSBUlNMmwTwJoG0QALUtXC7rbtU2LJa5aEa21MzeD0bzYxDectTfwhPfeQiFalIKII3fhTq2bWbtKGi0KqS99zPt+e2fvnqt2cALuIzhqYS1mtHusM9w/uboTCe+CkRvB/D6K7xbgy1KilFX0kruY10sRL1N7mSkSpW/aBc8+t+8MUPjVvloF6uNPybgQvGcH4Pm6jwBlaGBECv+FZHXS2MaWje7gldrFux6SLFMNW+LcPOPjfDufmF2tuCrTGcrkW6690RtqW5VMbjSkWWWyrXeEFkg0EYUtSpfYjDfqtScQK+FzfsIsOQ3e2VOtpfxes5e6NZyyOHA1lkkWc4+w6JLg4xuHbYTh4TSOdwGEcYxuxtaRi+q/0/S6OZpNclhV9jSM0vNBlWb7YsTVCqbiGeoL5XMLKruB1oUeCqU9AiriJ2U7XK8HY841IGxxiOztfu8C3uhVx1vbrVFLS20MzjKGZzGMMcQ8YP6o1yULlB4no7HL34SK0XWVK8b4TlHW45VeX0t1J0sCwmB0htJSpi4jCwHpk6ywyXd7Ync86MM3wyQ76znXnxszOzs73iLLHP3Yzz/H7amXC+ykyk5pylsS+nn/+SHo8BVhi8tz6y5GKpssV3Ocvs3Uj3kgXFY5jOwcG5PE5gKktSieH6f1yriyWG6b/fLe3yX6G7uPCX4/3HVBer1OluPsOhPzlLPUtXXIk6gmGyFrV52ORa8lYoGjFhOFyTSgSDfkvokeX4rYGysi98tSWNJFN572NmyNWjgW6LqoxD875SQldCbowg3+wos/laHpZp4GPxRWE2nn9ySwzjSJP9MmnLpDHi7iMc/BWTD+JDwxWi+aEZ7yVJa/SkE4uH9ZHsJrG0XpJjqFXSkpzFyZknOP7wDVDxQQAlspeQwfu7EGdGEAefwvn+Cc5/vfgY3sOk/L0KStTC1QT8Eq4RnyPdoUZWqMVl+q/PEb+IT/Ap8evkr1LWSWr5gw2kfBSS3yl8+Id22kcRZ0jERxtgBh9jfgNpgymDBYNpg3GDRYOzvwNQSwcI6w9NCBoDAABMBgAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAABUAAAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9mbG93cy9FeGFtcGxlRmxvdyRJbml0aWF0b3IkQ29tcGFuaW9uJEdBVEhFUklOR19TSUdTLmNsYXNzrVRbTxNBFP5mC922lIsVkIsX1CqlCEsRUARBbACrtTGWNDE8mKEdy9LtLtmZgr7x5A/xyUfRRBNNDNE3f5Tx7LZQxcR4S3bPbeZ8ey5f++Xr+48ApnCLIWcLZRQdt8QNyavblpCGeOobxhPL2ZXGct1bISeesU1lcuW48bRT3ea26djx1aW1O8sPM7nVx/nMal4HYxhrYpIURk2ZFiUS9APXKbtCyjWXFyvCjeeV2NYRYOgubppW6dgxw5XESPZ3weYYLmYdt2xsCbXhctOWBrdtR3FFZUoj56hczbLoVvIYYr3PtGNZoqjyZtnmqka4Xsc6Qgzho2YZZo6X84vk5pDmooigLYwwogxTf4Ogo4NBV/VOo+hCMIJOnGBoUZumZHiQ/b97pDEF5026tsAQSIwUGIZXudoUrmmXh0gPFZ2arYS7zV31bFgOycO6x0M4xdCTyG7xHW5Y3C4beeVlzY0UouhBfwQtGGAIZXL5taVcepnM+aLV+NSJbMVR5Bj3heIlrjjVoVV3AsRW5ok2cjd8F57QGFiFQqUUw+zBXiyi9Wn1N1TXB3uhz8+1voO9SW2C3dZD2qcXQa1LuxvqCgxoEy13ej+9DLZ6AJMMxm8zzaetR6Q/4WZ413Er/iq8MfRGoOFKFKfRHSZrnGHxHxeoY4Kh48ctMkz/FaqOqwyjf5CqY5o6PMqnQr47HK8o4mnaKQmGWNYpcqvAXZNvWGLNEwydWdMWuVp1Q7iNyOBDYpdZFRl7x5QmhZaav2SGSN6puUWxYnpXoxnbFm7a4lIKOutvZBZ+ykOKBt3iMQn93tx9DjG0IkjxWfJS5DHS+mu0v0XslUcw3CAZrYdx0k+aozfoR0Yx37B1/y6tlWwPapo8PycZ63uHwf1fQHlEAJIUTyKEM0cQlxoQ7R+gPXqHsXvJNzD2/fKbFSSphZs++HUskB4gX6NGJqnFFP3BR0hPYQbXSC/S+QplnaWWz60jkMGQ/5zHhUPvYgZxXCITl9fBJIaRWEdQoltiRKJXolUiKTH6DVBLBwgn0qvaBwMAAEEGAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAAFwAAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2Zsb3dzL0V4YW1wbGVGbG93JEluaXRpYXRvciRDb21wYW5pb24kR0VORVJBVElOR19UUkFOU0FDVElPTi5jbGFzc7VSz08TQRT+Zlu7Syk/FQT8VbHYAsICkRNErU0hG+tiaG00HMy0HXHtdpbsTMEjJ/8QT16JBxJNDMGbf5Tx7YLogQsaszvvve/NvO/NvPe+//j8FcB9LDLUpdB2Mwhb3Fa8s+MLZYt3sWG/9oM9ZZdP0BqBnCM97XEdhLlS0Nnh0gtkbr3sljeLNcddf1XbLLrVYqnmbLgmGMPcb26Swu5qzycCSvEsDLZDoVQt5M22CHNVLXZMJBhSqx7leMCQKEzXGQrrQoqQa09uZ3XIpeJNTUmzDa5EK0uGFHtZZ+P5vAWTYaRQect3ue1zuW1XdUhRK9P1DC6hJ40k0gxJ/cZTDC8q/+fVKwyW41ZrRbdUJnO16Z++ZqjSDjQB+6nQvMU1p5NGZzdBXWCR6CXYiCEiYTCwNrla1KDC0X4mbYwZJ8syrG/vjbGj/SVjgT02LeP4Q8oYNI4/phLR+SUGu3KhqtNFevaCsB0/OypVKg0DNzLoR18PWbcYHv5jsUzcZhg9v2IMy3/FbiJHFz9LwTB7ARoTeQo+42Lo/2Nzvq1pTkpBSzAMV4Im9+s89HjDF7VIMAxUPCncbqchwlNPuhp0w6ZY8yKQcSSNbMnnSgkatfHNrtReR9Q95dHhopSB5tEMKyxSeZPRBGA8qnbUd/qoA+SZJbRMiJE2Z4atQ/QexAfukcycuElHQXO0op4BefLnYWHgjGLqlKLvC4yXh7j5ZOYTsgdxzigsFW/maebmY/IZ2KQnCBuYxB261yRR3CU9hQKmSS/Q/iOKGqR7Dm0h4WA4/i/jyi804mAUV8nE2BaYoqCJLSQV+hSuKaQUrv8EUEsHCINt9SxyAgAAgAQAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAWQAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvZmxvd3MvRXhhbXBsZUZsb3ckSW5pdGlhdG9yJENvbXBhbmlvbiRTSUdOSU5HX1RSQU5TQUNUSU9OLmNsYXNztVLPTxNBFP5mW7tLKb9FAX9VLNqCsEDkBFFrA2RjrYatTUwPZmjHMna72+xMQW+c/EM8eSUeSDQxBG/+Uca3C6IHL2jM7rz3vjfvfTPz3vv2/dMXAPewxOD6QtuNIGxyW/FO1xPKFm9iw37lBXvKXj9BGwRyji+15DoIc6Wg0+W+DPyc62xWnMrmy+pWseIWS1XnacUEY5j/RUxS2D0tPcom/mdh0AqFUtWQN9oizLladE0kGFJrkg64z5DIF2oMBVe2fOm3sjrkvuINTcdl96TeyQa9MNsN5S7XItsWbxcsmAzj+fJrvsttj/st29UhZa4WahlcQF8aSaQZknpHKobn5f/w5lUGy6m41WKltE7mWsM7fctIuR1oAvYToXmTa06RRmc3QQ1gkegnuB1DRMJgYG1yNak3+aP9TNqYME6WZVhf3xkTR/vLxiJ7ZFrG8fuUMWwcf0glovhlBrt8rprTRfr2grAdvzmqUyoNA9cyGMRAH1k3GB78Y6VM3GQY+0O5GFb+itpEjm59xs8wdw4aE3co+YyLYfC3zYW2pgkpBU3BMFoOGtyr8VDybU9UI8EwVJa+qPQ62yI89aRdGsSG2JARyDi+L8KSx5USNGSTWz1fy46oSSUpuOj7gebRBCssUW2TUfsxGZU6ajp9VH7yzBFaIcRIm7Oj1iH6D+KAuyQzJ27SUdI8rahhQIH8BVgYOqOYOaUY+AzjxSGuP579iOxBfGaUloo3CzRwCzH5LGzSU4QNTOMW3WuaKG6TnkGe4iaxSPsPKWuY7jlSR8LBaPyP4eJPNO7gEi6TiYk6mKKkqTqSCgMKVxRSCld/AFBLBwhkkcwlcQIAAHgEAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAAFsAAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2Zsb3dzL0V4YW1wbGVGbG93JEluaXRpYXRvciRDb21wYW5pb24kVkVSSUZZSU5HX1RSQU5TQUNUSU9OLmNsYXNztVLNTxNBFP/NtnaXUj4VBfwAsWgLwgKRE0StDZCNtRpaawgHM20HHLudJTtT0Bsn/xBPXokHEk0MwZt/lPHtgujBCxqzO++935v3Ne+9b98/fQFwD/MMz5UwbiMIm9zVvL3jC+2KN7HgbvnBnnZXTtAqgaynpJHcBGG2GLR3uJKBytZW1r3VDa+89rK6XihXCsWq97RsgzHM/ApNVLgdI33ypwzPwmA7FFpXQ95oiTBbMWLHRoIhtSwpxX2GRC5fYxiriVBuvZVqe7wRKEPWJhI0SVIZPevAZhjKlV7zXe76XG27FROS9VK+lsEFdKWRRJohaV5JzfCi9F/eusTgeOVKtVAurpC43PBP3zBQagWGgPtEGN7khpOl1d5NUOtZRLoJ1mOIiFgMrEWqJk0ld7SfSVvD1slxLOfrO2v4aH/BmmOPbMc6fp+y+q3jD6lEZL/A4JbO1WsqpGsvCFvxq6NOpdKwcD2DXvR0kTTG8OAfe2XjJo3mjw1jWPyr4DayVPdZBobpc4SxcYecz2Ix9P52OdsytCXFoCkYBktBg/s1Hkpe90U1Igx9JalEudOui/BUk64EnbAhVmUEMp5SIiz6XGtBizay3lFGtkVNaknGBaUCww2VrDFP3U1GC4CRqNnR2OmjAZBmmtAiIUbcnhp0DtF9EBvcJZo5UROPnGboRCMDcqTPwUHfWYjJ0xA9n2FtHOLG46mPGD+Ic0ZuqfgyRys3Gwefgkt8lLCFCdyiuiYoxG3ik2SVJz5H9w/Jq5/qHNhEwsNg/F/EpZ9oyMNlXCERw5tgmpxGN5HU6NG4qpHSuPYDUEsHCMwKgIhnAgAAdAQAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAARQAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvZmxvd3MvRXhhbXBsZUZsb3ckSW5pdGlhdG9yJENvbXBhbmlvbi5jbGFzc7VWS1MbRxD+ZvVYSci2wDYBEycxVoh4Lg9jO+DYCCHJ64iFaGUlFAfXSKzJotUutbPCuYVTfkhOOSa6uCqppCiO+VGp9K6wwUYHiJySNN090/31NzM9M/r7n9//AnAPFYYntuEpdcfd4YrgzX3LEIrxQ6AoLy3nlVDyHatARlq1Tc/knuOmc05zn9umY8tgDKk9fsAVi9u7ykZtz6h7MkIMsufyesNwGaYy46XTPNQaSsszLQKjdJuus+saQlQ63ssMd0uOu6vsGV7N5aYtFG7bjsc9yiYUzfG0lmWRV+aiiDJiDNMX9U7rnrEvI8FQ7XFp0sW8li9nK6pWfFEpZzU9m6uoG5qMJENM1fRKVsvlGb4r/T95lpO4imtxXEGK4XmvOar5slrYOjeVAYZve+bfFTugfyOO67jJoPeaQleL2jnyH9G69Ey+C3JAfTiOIdxi0Hre3WzlKS0QpaBUuoyPGTZ7L5l3QAPCn8RxG59+gLIvqFq2pOrnlvvOh6j17uDBBO7GMYo0Q/SRSYGPGRYy2xe+doJjvzxeTWIMXyQQR4Yh7H1vCoZsr6TpsgplOtBTCYQxzTCXKTUczzJtZe+gqZi2Z7g2t5Q14yVvWV6ObjrPbdUJZZ27/qU4Xk1A8gOvp+ungy+awSjDzOXQGPrfBKwbHt/hHqc+qXkQomeB+U0fmbXAhN9IDKxBXTtzDCtHhzcS0pCUkFJHhwkpJnWMWDR2/FNo6OhwXpplS5FIVI7FV+WYdPxzVEpJz6Kp0C1pNnz8SzTh48wzSoSJy7wKg923nuHqu8VMnt0vRFq8LoeV4WbX+4ch/spxG8EGMyz+pxKQUSCYt3XAMHkJGBkqBb/FonmeGZxpeFSfOWfHYBgoOXVuVblr8pplVPyG4VrJtA2t1awZ7knPSLlle2bTUO0DU5jUlT19VhkSutNy60bB9F2Tqm0bbs7iQhg0NnwSWT0XhzmqyjA6ZdKPCKJkr5P1I2m0xfjyD8S3Yn+ibyvURv8R+vStcBuDgRJpYyRQom18FihyG5/7ymuM/+pXHTRqkx0gTGCS5Ab9RhGjdp4O6QIG6G/MCBaRxn1M4wFp83hIn03y8CnIAQ4dPNJ9YgpJHy8y8Rozv72XJHImSYf/GL2dY0HQekCCavckePY0eLDTeRLsa3PEgp2FoeX5JvAvoUxyiXhdIWsVw/TASVgjOUQyR/I2ySzJUZIrJCUU8ZRkEc/wNUmd4p8T6gLlubeNkIrF4HsfD95YD1WiukQqlrfBBB7hq230CUwKPBaYEogIPBFYEcgKrArkBNYE8v8CUEsHCMWpmhjUAwAAGAoAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAOwAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvZmxvd3MvRXhhbXBsZUZsb3ckSW5pdGlhdG9yLmNsYXNzrVkJeFxVFf7vNMmbeZm2k7SlnZa2aTtAmi7TBLDthKVp2tKBdNJm0kIoUF8mL8lrJzPpe2+6IGoBcVdcWRQ3UEBFZU1aghhRUKuo4K6Igoq44YrKIvjf9yaZZGaSNC3fl867y7n3nHvOf8495/boK/c/COAMsUrgzJRuhxNps0MLW1pPb1K3wvoBpxHuTKb3W+GNbm8TO6FoyrANzU6bCoTAtqbcWv4OLZCUTekuI3FW/rxtailLS9hGOmWF40ZXSu9ozQ3Vn1MvsGD8LRWUCJxSnG9WOCPVJcnrx6SL25ppa+1Jff3Blq2NpJvea6a7TN2yKExij24K1OSvzNhGkrtTOVtH03L5kqa02RXerdvtpmbwYFoqlbY195CxtB3LJJOkquzS7a35fJZXLz12Tn544fPBg6kCJXa3YQmsbjou61GckoSWTArUFgowgZEEZnLNbm2fFk5qqa5wc/tuPWFTuApUqhRupkB1UyId7tVMctCTmZSxTzctymO08xuOZ6xePdUh9c+9plIrcd3cZyT0zZl2gcWF8qTSHXo4R0NOszFHcgoWoiWPVsE8V/Ex3d6fNvds0XobtUS3LrBqDD6Wu5aGG72CXOdjQTlOxkJabTIrFSwSmCFlICjMg9EOPWU79qVkQ4qUNg83GZZU4xKEyrEYpwhU7UnbSSNFHtRj1h6NufYFtoLTBMosAj7JI4Wq8zcraqalqFFRjWUC8/OOYbiiHQxvpX8cVLDCj3L4pabDAjuOC2ihxnRPr5aiuKHzNsY2tjS0RmPn7WptaYjFGxpbo80xBbUC3mgs3toQa9wocNHxAXpCPjz46TjDhzqcKbDiWF0uFLf1XgWrCeljXaJgrcA0S7cbM6ZJfcodBOqqj9nNHZ71S3f4UY+zVERwtsDSsZViMdKwG23eHpctBedSn0Y6s0NLZggKEfWjAetl1GgU8BGGWw5GU51pomsMD4jxR1JQYxuxSSL+PIGTx6NUEHW9rEnv0pI5gPtxAUIqzkeTQGmnYVq2HzEXfc0Catru1k0HagIL80UZjUXKsg0t8hBxAv4sg2Y/R+Cm6ugEyyY5nUinGPwSthXenjL2ZnT3KJ0GY2+0KeuMu/f1hI2UrZspLRneoHdqmaTdSG+0zUyCQNyimTJUS/Ntxw4V63AhVT0mH8K2R0t1KGgTOHdsI+cW0M6N2U4ou9gKNZq6Y/qdAlOqXdaXqrgElzEoTMR6g2ZrCl7PS1DeT1SLkTDoSTat1y6ttw4JGjcXR6I8uozdCoiuGbmA02Ca2kEZdRR0CczOxay4cbnebGY1JTCnuqlws/roUuLUwG6JjT28nKqj7jF6VHQjxSsnxygXARX0SqzLPah5gZNGhdNodpzYMWGVoxP20EFGzSvYJ6B0a1ZMP2A7CrzYjwM4WI79uJyipDjsxxWYIQfeyKRiLEw1tFuOarPR880Cfqq0eX+K8fkCnSCfNySfpScypgPDTHvSSHCSQl6Jq1QcwtUUQevoEJhVXRi9pWjX4K3l2Iu3McqMDvcK3iGwtiDQFLV4fcFV4aj7XSouxrsFVo6XEoxIBtZnjGSHjHnvlTf3BN7msnifimvxfoFTxxHTbWXj2QcFwpP0DAUfZqwbvhIE6se5Vcb0LXcxLXM9bvDhOtxI7R73Ngo+yiBIPEQ35CdQcdskQsjnY/i4ipvwCSKZCGjO2L0ZVwmhjiHvebJAyROYZpwYN0rP9YUCjb2ywbaZ2fTQum7kY9ZrM0IWwnWywvrxKdwsAXIL7wfqIItYgdaJYX083D6DWyW32wS2n2jasWNjS3RTW0F281mBC084pSm6t5PRfN6Hz+EO3olMsY1OxpglBYrKT5+lG34RX5LnvlMgfqKyxaPnxQpOfTcVesKnLrKzc+Z7fbgH99FJLNYm7sLkCOsKaJN2ksnWQH7047BMjY4IxE44YW1o3UwD86Q8cVzBgMDWE8+CR23q6O3LPjyAB3krGS69s1igccK4PXaVH2fa6upjEF+VhcJDLJ2LUmdvbalKzc4w3ZXLFXxdIFikyonrtlPePMKYyVS6udMBdpH4krvFuIRifBPfUvENHGWMTXTTtnm5tR/fkQXNA3hUwBwfJYVGbyqWgxREybHLd/f++56Kh/F9ZhxWpt01wBkFguS9eRSv4x7HD6TGf1hYzox/DgU/fg2quU3RWENTNF7g+T99LUq44ps7IP65Dz/DLwQWFVeZwaycyHXB9UuVtI+qeFLq22Pw+jxtTKiPSt7qefuEjJAWqg31aMwxVeaYPSFjH/+YQhYag8lzyNQTunzoGCKbWSzNFajo0C2bUkpLDJGeVBxZrhCdUoRW1mv+kSyY9w7NCUztzCSTB7OGPsB0adIvOhW5Wizr0sznJnZ7CtXLNTnOPvtANqQKrJpsEHaWD9/4BewLL3y30HXSF4Fl46Aur0bmwrKU8xgjUC5TsuFqmcl/1H2Tah5RnC4qrJTzQqQMTxPVokt3eLFNYEGxOjKakimXZSQsBa/K6qlbT+zhMq1HJ0XUyr4iEsBFomBh5sZII4TwqCz/p6golXVgw4k6pcyDRRlLcKGMW6oe02aK8DEC2tmgLOQrk1CFnwY9K5HMVvcVQxX3Ft3WOmTNQifu2TcF4Kn4U85uu9OF/PHwsKwcPR21ArcOHgqpnjme4X+Dh1RPwOt85Ii3LPst9SpzBg9VVdR5K0sqPas8q0REVKyfVVkWmDLXs6qE31J+yx66ucwTUM73BgLseTbPbqlw5zkuN51b4vUGfBwcIs4OqoHylpkBPwenXvTQdSOopwWmP3R7WaWUtk6gaqLwL3hi+OSbojMjH22P4zVCzJc6XkBPmYTxFFFF1sMWZM05YnLlHobUeS0ZorxHj6b2GZbBINeQe/1m9dzI7FPGzHRCS+7QTEOGwVb5w5jZZKT0WKanXTezI1Ppngn5cJrtB7N77yiyc4Cw6E53DDsJh0L5ogxPjlrpG05CGGHj6YyZ0DcZkt1Mt7NBb890bTxg6yk3EPqjqZRuNiY1y9It1PLOLSXeSlApn+MhRIi9MlpI5bdSPrY5321oyZsLSgfiV2GfiCdiT2EvzB4NjNKaezHtTgfIp/LX7w5iOgK0/mnZbYD6UVsK+eiOKXIjz1MUp5JDV9b0Ye4R0G5HcKrAYSwfxMomDq66G68bxJo+nDOAdW1kt8Gl3CzQhy2HsZV0HG0VAa/ox0VbBnBx2wAuaevHrkFoy/vQMYjOSElkemRaZGqwJFI6gO62YElAPYxkP9KD2BspC5YeQUYgogSVI3iDwI1YJltv4pA3WBb0DuJQxBcJBH19eEukIhgIVhzB2z248LZXHwuWDeKdnJoanBacHgz04z2xAVzbtqwfH+AJPnQ3PtKHTzL4HManV/Th9kiJe6QvuEcKyu7cPtzljva5o3IsWHIE93sQKXVnvpKdkSftw9ciZTUDeLgtWBosO4xv8wyk6MN3+/HYIEr78KNB/CSiuCufyK4cwJNtQSVH/0QfftWPXw/TSyNOcYx4M413C434FJ4mUmTrN0SHihtYOfwWv6PBrsDZeAa/54xsPYs/0LSy9UfSlUPHhfgTZ0uc1p855hctRMxf8BwUESbC/oq/oUzMgYG/c6yUO9yIf+CfXHGUJcq/8Dxj42axFv/Gf4jbWSKJ/0pcSpiMgJZJeYDzMQsxLMZWbCZ6dRyiJFdS1qso+Tbcy3Y/rsYjbB/lHkfRmv3Gne/j/D7NsWfYfpbSPo82vIJLGNsvo3waIZqgxB2Uv0vsgiGqyXElPK/iGgQUeBSsVLCOvtHp/O1VsF9GdqpoM/8UaECtWJqF/kmUe4QbBBroBjPobdKf5g/7Ux9mSVOIEd5TRcIX8GKWdKTrbbhjQteTi1/Cy0X8tnViv12U57fb8T/Xb6loj3OBLVxe+cphUVLTL0pr5t1H51x+H1pr7hbePjH1Pky7a5hFlUvusnBaMuYIpyWjjsdhO41UZaRVsAgzGTZqOObzkBQkgljmdpEVyCum4dKsWuY4+/MoA0JtE/1i4T3Ce5czUiqWSyko+ApHmiViJTeIx7c0bFVH3wvqBc79pNbEq4Zam9RlVbVVeWTHlUdwo7qqXSP+J0zuNNH/le3atWtUX61pUmuX1C6vrVsdqVVr62rXLKmL1NatYXPN6iV1y09nZ61aszF3BOdeeE3PQRHWUAaHrWzkmNJV5CXiEbLEu55Xh0csEosRdFwg45hWXiQQ02mUwE5MiYoK569SzBjqzYyKWeIkNsXsnRCWmCOCOzHDQsAScy08Z6HBEvMsbLPQYuF/Fl6w8KKFlyy8bMFrwWeh3ILfQoWF6y1x8v8BUEsHCHJvTK6rDAAANCAAAFBLAwQUAAgICAAAAEEAAAAAAAAAAAAAAAAAMQAAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvZmxvd3MvRXhhbXBsZUZsb3cuY2xhc3OVUU1vEzEQffYmu5tt2qbhKymUzxbaIFhalQtUSCFqpIg0SLSKhHJyNga22exWa6flmBM/hBPXikMlkFBUbvwoxOymQb1GtsfvPc+Mx+M/f3/8ArCNCsPjUGrXi+KecJUYHAVSufJzCtwPQXSi3N0JqxOxwBgKh+JYuIEIP7pvu4fS0xYMBnPHD339isFY32jnkYXpIAOLIaM/+YrhSXOGe14y2I3W/kG1VdsluOMFF8mXmv1IE3H3pBY9oQV58sGxQY9hiZkj2k0pEsMZWJ+k3iYVMB7lHV7iDi+MRw63M/bvL7w0Hm3xZ+wFNzKvLZuffzV5gZ9/M7NJ0BajrLCrniePdBQz5BpUhS8m+CSK+2nhDjisPObg5AitMDyf4aWr/1NauMOwPUvotDAL9xgWLp087Wvqey3qSYZiM/JE0BaxL7qBPEgMw2LTD2VrOOjK+EJx9qNh7Mm6n5B8IwxlXAuEUpK+rvxuGGp/INu+8sm5GoaRFtqPQoVNenEmaT7KSQOSltOgzydllZhLO3UR2coZ7NP0eI1sfiIil4Y8pGWmygpsOpsGr5F3os7/BH9/hltvKt9x+zS97XKIgUdp4gdYp71I6C6tZaroPu1lGhuk18l7nq5c6MBoYDGdBSxNWbGBK7hKENc6YArXcaMDU8FRKKkElBWWFW7+A1BLBwi2WOa6/QEAADoDAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAAAoAAABsb2c0ajIueG1sxVZNb9s4EL37V0yJ6tJGln3YoCgsF85m3QaIk0XsolgUxYKWRhJRSjREKo1r6L93qA9HSuSgtwqwQc1whm/ePI49+/CQSrjHXAuV+Ww6njDALFChyGKffd4s3Xfsw3w0+1tlkYiLnBvaB9pwU2ifiSxSbD4aAT2zf3O1w9wI1PPK0DXuIeMp+kyq2N1xk7A5rfTMa90vR9gVm2cqRPf1IVHa3JCh/J1ongeJuKfg14f26NJrjE/jj+9VBbVpk+SoEyXDpZAGc5B4j9JnJucBMq/dtdjtMAuJww4QIkwriQ2O5s1tdzIwPI/R+Gz933rzz+r/288b9hhdl8INHZld870qTN9X+Xe1/7nHPk4i4kTSxxycCvRBYhabxJ+W4ISHT5/ep+l7rellA05wmJZjZwUuOKmOnaw8XN0sb/0fiTB49mVxd+PnGJ4tF5vFtb/NbVIgA2ylyL6Xz4F5LbInBXknKpp5DT0Nn5XtlevCFyElxJghyQ6h2IFRMJ0AdRIiIVFDpHLgEFMzMwj5fgyXRU7CBSo430OupFS0AmHgh00VokSDfcCG9IT0zQ3wHIFaTQH0msH5xObUZ7AtDHxHpOMThJTkR9UHmBmL5eMFuG6nlDs6kxCQXNrWdyyP7R/sWVXUTRXUlWu9tsnKMa1eiG34teGNxvvR1Pg9Pe5q5YZh6TrC5hvHP1mH+KqKXqNg16b96rh/VWL6ZjV0tb59dz6ZloePq83bSQlfHfOt1tJRSMcr8phZSRH0RsTRtREpXnCN4YYkFqNtZLV77w1sXoufw5tBk4cG2WR1wbxnAjye3ndcYsQLae4awayNFVy8h1TYmcgg5Q82JRsAcllpCraEhVhLutxXcZe4s9bpQGwVfxUtm65DLNW2bX3VsDdtfwYYaIKvuTYrmtaRoAvJY6r8fBKeOKsJWWT70/52TxAUaSGJBTv50LIN+BAghtoSQbI/halK4L1winV2UQ9w6tWkPu3eiS51p4bXuW3tVO9M59pyraxidO/WKtPO9uY3rXd0m+IOI7r70cA8fyq1ZxGDY8Cb96Cr7lCsUTZDJEMzDlQectaDCTwMhRH3wux9FnGp8Y8gr6G2fB/pHVWD/fFvw3z0C1BLBwibnhWnRgMAAG4IAABQSwMEFAAICAgAAABBAAAAAAAAAAAAAAAAAAoAAABtaWdyYXRpb24vAwBQSwcIAAAAAAIAAAAAAAAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAAiAAAAbWlncmF0aW9uL2lvdS5jaGFuZ2Vsb2ctbWFzdGVyLnhtbJ2SwU7EIBCG730KMvfC1o2JadruwcRTPamJVxaQTkIHLXTbx5dyMbrGpHLl/75hhmlO6+jYxUwBPbVQ8QqYIeU1km3h5fmhvAMWoiQtnSfTAnk4dUWjZZRnGcz9IMma3luWPBRaGGJ8r4VYloU7/JhxC3E/WZHuBQWhzyojzlso2PXJmtqscZeqTMAfujXgN91yzJ6bw6ESr4/9kxrMKEukrVFlfhcFrEPO9V7JmKe184FsR/4ny9eg9/D/rnXkt1st6Io8hQZJuVkb9oYu/f6IdsrNC/Qz/6IuFU9eEGkzxNVqdJ9QSwcIj8ZCEuUAAABlAgAAUEsDBBQACAgIAAAAQQAAAAAAAAAAAAAAAAAeAAAAbWlncmF0aW9uL2lvdS5jaGFuZ2Vsb2ctdjEueG1snZNNT8MwDIbv+xVRTnBYszFAaGo3TZMQSGOHMRC3ym2sNlKajCRdy7+n7T40GKrocsghfp/Xjp340zKTZIvGCq0COvSGlKCKNRcqCejb+rH/QIl1oDhIrTCgStPppOdzcBCBxXkKKsGFTkjlo2xAU+c2Y8aKovCk+MxFLfK0SVgVZ8oyHsUNInVCe+R8NTZjLF0nq34FtNiVVvywK0aNz81gMGQfL4vXOMUM+kLVF43xbyMrxrbRLXQMrulWxwJJB/1v1ist78JfnGvk3dW56KRpgr8LvKIjkLtUm4CuRt5cGw6UCB7Q2CA4DIXOw6p5Dvfcjm1ia4gkElfvS8iqF3TU2hPxDtAyzxRRjUznbpO7UCiOJSXua1OdPS/XlLVBzoCyENfjCQU/YMv32Wr+NFtd3d9et/NbkDkeMKFcu1piVZzpniXSxujiElIKhWD+cTWfnXR/P0t2HGb1gdnZD558A1BLBwjeuV4pYwEAAAwEAABQSwECFAAUAAgICABhkmtXhnN2h4QDAAB7CAAAFAAAAAAAAAAAAAAAAAAAAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZQSwECFAAUAAgICABhkmtXmvXegJ0DAABLCAAAFAAAAAAAAAAAAAAAAADGAwAATUVUQS1JTkYvQ09SREFDT0QuU0ZQSwECFAAUAAgICABhkmtXPip6VBECAAADAwAAFAAAAAAAAAAAAAAAAAClBwAATUVUQS1JTkYvQ09SREFDT0QuRUNQSwECFAAUAAgICAAAAEEAAAAAAAIAAAAAAAAACQAAAAAAAAAAAAAAAAD4CQAATUVUQS1JTkYvUEsBAhQAFAAICAgAAABBAODDuOwMAAAAEAAAACAAAAAAAAAAAAAAAAAAMQoAAE1FVEEtSU5GL3dvcmtmbG93cy5rb3RsaW5fbW9kdWxlUEsBAhQAFAAICAgAAABBAAAAAAACAAAAAAAAAAQAAAAAAAAAAAAAAAAAiwoAAG5ldC9QSwECFAAUAAgICAAAAEEAAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAC/CgAAbmV0L2NvcmRhL1BLAQIUABQACAgIAAAAQQAAAAAAAgAAAAAAAAASAAAAAAAAAAAAAAAAAPkKAABuZXQvY29yZGEvc2FtcGxlcy9QSwECFAAUAAgICAAAAEEAAAAAAAIAAAAAAAAAGgAAAAAAAAAAAAAAAAA7CwAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9QSwECFAAUAAgICAAAAEEAAAAAAAIAAAAAAAAAIAAAAAAAAAAAAAAAAACFCwAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9mbG93cy9QSwECFAAUAAgICAAAAEEAsmSB+18HAABOEAAAVQAAAAAAAAAAAAAAAADVCwAAbmV0L2NvcmRhL3NhbXBsZXMvZXhhbXBsZS9mbG93cy9FeGFtcGxlRmxvdyRBY2NlcHRvciRjYWxsJHNpZ25UcmFuc2FjdGlvbkZsb3ckMS5jbGFzc1BLAQIUABQACAgIAAAAQQA4FOQMigQAAGgKAAA6AAAAAAAAAAAAAAAAALcTAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2Zsb3dzL0V4YW1wbGVGbG93JEFjY2VwdG9yLmNsYXNzUEsBAhQAFAAICAgAAABBAOsPTQgaAwAATAYAAFwAAAAAAAAAAAAAAAAAqRgAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvZmxvd3MvRXhhbXBsZUZsb3ckSW5pdGlhdG9yJENvbXBhbmlvbiRGSU5BTElTSU5HX1RSQU5TQUNUSU9OLmNsYXNzUEsBAhQAFAAICAgAAABBACfSq9oHAwAAQQYAAFQAAAAAAAAAAAAAAAAATRwAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvZmxvd3MvRXhhbXBsZUZsb3ckSW5pdGlhdG9yJENvbXBhbmlvbiRHQVRIRVJJTkdfU0lHUy5jbGFzc1BLAQIUABQACAgIAAAAQQCDbfUscgIAAIAEAABcAAAAAAAAAAAAAAAAANYfAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2Zsb3dzL0V4YW1wbGVGbG93JEluaXRpYXRvciRDb21wYW5pb24kR0VORVJBVElOR19UUkFOU0FDVElPTi5jbGFzc1BLAQIUABQACAgIAAAAQQBkkcwlcQIAAHgEAABZAAAAAAAAAAAAAAAAANIiAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2Zsb3dzL0V4YW1wbGVGbG93JEluaXRpYXRvciRDb21wYW5pb24kU0lHTklOR19UUkFOU0FDVElPTi5jbGFzc1BLAQIUABQACAgIAAAAQQDMCoCIZwIAAHQEAABbAAAAAAAAAAAAAAAAAMolAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2Zsb3dzL0V4YW1wbGVGbG93JEluaXRpYXRvciRDb21wYW5pb24kVkVSSUZZSU5HX1RSQU5TQUNUSU9OLmNsYXNzUEsBAhQAFAAICAgAAABBAMWpmhjUAwAAGAoAAEUAAAAAAAAAAAAAAAAAuigAAG5ldC9jb3JkYS9zYW1wbGVzL2V4YW1wbGUvZmxvd3MvRXhhbXBsZUZsb3ckSW5pdGlhdG9yJENvbXBhbmlvbi5jbGFzc1BLAQIUABQACAgIAAAAQQByb0yuqwwAADQgAAA7AAAAAAAAAAAAAAAAAAEtAABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2Zsb3dzL0V4YW1wbGVGbG93JEluaXRpYXRvci5jbGFzc1BLAQIUABQACAgIAAAAQQC2WOa6/QEAADoDAAAxAAAAAAAAAAAAAAAAABU6AABuZXQvY29yZGEvc2FtcGxlcy9leGFtcGxlL2Zsb3dzL0V4YW1wbGVGbG93LmNsYXNzUEsBAhQAFAAICAgAAABBAJueFadGAwAAbggAAAoAAAAAAAAAAAAAAAAAcTwAAGxvZzRqMi54bWxQSwECFAAUAAgICAAAAEEAAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAADvPwAAbWlncmF0aW9uL1BLAQIUABQACAgIAAAAQQCPxkIS5QAAAGUCAAAiAAAAAAAAAAAAAAAAAClAAABtaWdyYXRpb24vaW91LmNoYW5nZWxvZy1tYXN0ZXIueG1sUEsBAhQAFAAICAgAAABBAN65XiljAQAADAQAAB4AAAAAAAAAAAAAAAAAXkEAAG1pZ3JhdGlvbi9pb3UuY2hhbmdlbG9nLXYxLnhtbFBLBQYAAAAAGAAYAGMIAAANQwAAAAA=", - "filename": "BASIC_CORDAPP_workflows-1.0.jar", - "hasDbMigrations": true - } - ], - "cordappDeploymentConfigs": [ - { - "cordappDir": "/samples-kotlin/Advanced/negotiation-cordapp/build/nodes/PartyA/cordapps", - "cordaNodeStartCmd": "supervisorctl start corda-a", - "cordaJarPath": "/samples-kotlin/Advanced/negotiation-cordapp/build/nodes/PartyA/corda.jar", - "nodeBaseDirPath": "/samples-kotlin/Advanced/negotiation-cordapp/build/nodes/PartyA/", - "rpcCredentials": { - "hostname": "127.0.0.1", - "port": 10006, - "username": "user1", - "password": "test" - }, - "sshCredentials": { - "hostKeyEntry": "not-used-right-now-so-this-does-not-matter... ;-(", - "hostname": "127.0.0.1", - "password": "root", - "port": 22, - "username": "root" - } - }, - { - "cordappDir": "/samples-kotlin/Advanced/negotiation-cordapp/build/nodes/PartyB/cordapps", - "cordaNodeStartCmd": "supervisorctl start corda-b", - "cordaJarPath": "/samples-kotlin/Advanced/negotiation-cordapp/build/nodes/PartyB/corda.jar", - "nodeBaseDirPath": "/samples-kotlin/Advanced/negotiation-cordapp/build/nodes/PartyB/", - "rpcCredentials": { - "hostname": "127.0.0.1", - "port": 10009, - "username": "user1", - "password": "test" - }, - "sshCredentials": { - "hostKeyEntry": "not-used-right-now-so-this-does-not-matter... ;-(", - "hostname": "127.0.0.1", - "password": "root", - "port": 22, - "username": "root" - } - } - ] -}' -``` -3. Invoke new Endpoint - ```sh - curl --location 'http://127.0.0.1:8080/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query' \ - --header 'Content-Type: application/json' \ - --data '{ - "contractStateType": "net.corda.samples.example.states.IOUState" - }' - ``` - - -### Transaction Monitoring -- There are two interfaces to monitor changes of vault states - reactive `watchBlocksV1` method, and low-level HTTP API calls. -- Note: The monitoring APIs are implemented only on kotlin-server connector (`main-server`), not typescript connector! -- For usage examples review the functional test file: `packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/monitor-transactions-v4.8.test.ts` -- Because transactions read from corda are stored on the connector, they will be lost if connector is closed/killed before transaction were read by the clients. -- Each client has own set of state monitors that are managed independently. After starting the monitoring, each new transaction is queued on the connector until read and explicitly cleared by `watchBlocksV1` or direct HTTP API call. -- Client monitors can be periodically removed by the connector, if there was no action from the client for specified amount of time. -- Client expiration delay can be configured with `cactus.sessionExpireMinutes` option. It default to 30 minutes. -- Each transaction has own index assigned by the corda connector. Index is unique for each client monitoring session. For instance: - - Stopping monitoring for given state will reset the transaction index counter for given client. After restart, it will report first transaction with index 0. - - Each client can see tha same transaction with different index. - - Index can be used to determine the transaction order for given client session. - -#### watchBlocksV1 -- `watchBlocksV1(options: watchBlocksV1Options): Observable` -- Reactive (RxJS) interface to observe state changes. -- Internally, it uses polling of low-level HTTP APIs. -- Watching block should return each block at least once, no blocks should be missed after startMonitor has started. The only case when transaction is lost is when connector we were connected to died. -- Transactions can be duplicated in case internal `ClearMonitorTransactionsV1` call was not successful (for instance, because of connection problems). -- Options: - - `stateFullClassName: string`: state to monitor. - - `pollRate?: number`: how often poll the kotlin server for changes (default 5 seconds). - -#### Low-level HTTP API -- These should not be used when watchBlocks API is sufficient. -- Consists of the following methods: - - `startMonitorV1`: Start monitoring for specified state changes. All changes after calling this function will be stored in internal kotlin-server buffer, ready to be read by calls to `GetMonitorTransactionsV1`. Transactions occuring before the call to startMonitorV1 will not be reported. - - `GetMonitorTransactionsV1`: Read all transactions for given state name still remaining in internal buffer. - - `ClearMonitorTransactionsV1`: Remove transaction for given state name with specified index number from internal buffer. Should be used to acknowledge receiving specified transactions in user code, so that transactions are not reported multiple times. - - `stopMonitorV1`: Don't watch for transactions changes anymore, remove any transactions that were not read until now. - -### Custom Configuration via Env Variables - -```json -{ - "cactus": { - "threadCount": 3, - "sessionExpireMinutes": 10, - "corda": { - "node": { - "host": "localhost" - }, - "rpc": { - "port": 10006, - "username": "user1", - "password": "test" - } - } - } -} -``` - -```sh -SPRING_APPLICATION_JSON='{"cactus":{"corda":{"node": {"host": "localhost"}, "rpc":{"port": 10006, "username":"user1", "password": "test"}}}}' gradle test -``` - -```json -{ - "flowFullClassName" : "net.corda.samples.example.flows.ExampleFlow${"$"}Initiator", - "flowInvocationType" : "FLOW_DYNAMIC", - "params" : [ { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.Integer" - }, - "primitiveValue" : 42, - "jvmCtorArgs" : null - }, { - "jvmTypeKind" : "REFERENCE", - "jvmType" : { - "fqClassName" : "net.corda.core.identity.Party" - }, - "primitiveValue" : null, - "jvmCtorArgs" : [ { - "jvmTypeKind" : "REFERENCE", - "jvmType" : { - "fqClassName" : "net.corda.core.identity.CordaX500Name" - }, - "primitiveValue" : null, - "jvmCtorArgs" : [ { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "PartyB", - "jvmCtorArgs" : null - }, { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "New York", - "jvmCtorArgs" : null - }, { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "US", - "jvmCtorArgs" : null - } ] - }, { - "jvmTypeKind" : "REFERENCE", - "jvmType" : { - "fqClassName" : "org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl" - }, - "primitiveValue" : null, - "jvmCtorArgs" : [ { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "EdDSA", - "jvmCtorArgs" : null - }, { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "X.509", - "jvmCtorArgs" : null - }, { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "MCowBQYDK2VwAyEAoOv19eiCDJ7HzR9UrfwbFig7qcD1jkewKkkS4WF9kPA=", - "jvmCtorArgs" : null - } ] - } ] - } ], - "timeoutMs" : null -} -``` - -```json -I 16:51:01 1 Client.main - nodeDiagnosticInfo= -{ - "version" : "4.6", - "revision" : "85e387ea730d9be7d6dc2b23caba1ee18305af74", - "platformVersion" : 8, - "vendor" : "Corda Open Source", - "cordapps" : [ { - "type" : "Workflow CorDapp", - "name" : "workflows-1.0", - "shortName" : "Example-Cordapp Flows", - "minimumPlatformVersion" : 8, - "targetPlatformVersion" : 8, - "version" : "1", - "vendor" : "Corda Open Source", - "licence" : "Apache License, Version 2.0", - "jarHash" : { - "offset" : 0, - "size" : 32, - "bytes" : "V7ssTw0etgg3nSGk1amArB+fBH8fQUyBwIFs0DhID+0=" - } - }, { - "type" : "Contract CorDapp", - "name" : "contracts-1.0", - "shortName" : "Example-Cordapp Contracts", - "minimumPlatformVersion" : 8, - "targetPlatformVersion" : 8, - "version" : "1", - "vendor" : "Corda Open Source", - "licence" : "Apache License, Version 2.0", - "jarHash" : { - "offset" : 0, - "size" : 32, - "bytes" : "Xe0eoh4+T6fsq4u0QKqkVsVDMYSWhuspHqE0wlOlyqU=" - } - } ] -} -``` - -## Testing Environment for Manual Tests via Docker Compose - -From the project root directory, execute this command to build both the all-in-one ledger and JVM connector images: - -```sh -docker compose \ - --project-directory=./ \ - --file=./packages/cactus-plugin-ledger-connector-corda/src/test/yaml/fixtures/docker-compose.yaml \ - up -``` - -## Building Docker Image Locally - -The `cccs` tag used in the below example commands is a shorthand for the -full name of the container image otherwise referred to as `cactus-corda-connector-server`. - -From the project root: - -```sh -DOCKER_BUILDKIT=1 docker build \ - ./packages/cactus-plugin-ledger-connector-corda/src/main-server/ \ - --progress=plain \ - --tag cccs \ - --tag cccs:latest \ - --tag "ghcr.io/hyperledger/cactus-connector-corda-server:$(date +%F)-$(git rev-parse --symbolic-full-name --abbrev-ref HEAD)-$(git rev-parse --short HEAD)" -``` - -## Scan The Locally Built Container Image for Vulnerabilities with Trivy - -Here, we are assuming that -1. You've just built the container image and tagged it as `cccs` in the previous section. -2. You have a working [Trivy Installation](https://aquasecurity.github.io/trivy/v0.53/getting-started/installation/) -on your host OS or you are using the VSCode Dev Container which ships with Trivy installed by default. - -```sh -trivy image cccs --scanners=vuln --severity=CRITICAL --severity=HIGH -``` - -## Scan The Locally Built .jar File For Vulnerabilities with Trivy - -```sh -cd packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/ - -./gradlew clean build -Pversion=dev -DrootProjectName=cacti-connector-corda-server - -trivy rootfs ./build/libs/cacti-connector-corda-server-dev.jar --scanners=vuln --severity=CRITICAL --severity=HIGH -``` - -## Example NodeDiagnosticInfo JSON Response - -```json -{ - "version": "4.6", - "revision": "85e387ea730d9be7d6dc2b23caba1ee18305af74", - "platformVersion": 8, - "vendor": "Corda Open Source", - "cordapps": [ - { - "type": "Workflow CorDapp", - "name": "workflows-1.0", - "shortName": "Obligation Flows", - "minimumPlatformVersion": 8, - "targetPlatformVersion": 8, - "version": "1", - "vendor": "Corda Open Source", - "licence": "Apache License, Version 2.0", - "jarHash": { - "bytes": "Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc=", - "offset": 0, - "size": 32 - } - }, - { - "type": "CorDapp", - "name": "corda-confidential-identities-4.6", - "shortName": "corda-confidential-identities-4.6", - "minimumPlatformVersion": 1, - "targetPlatformVersion": 1, - "version": "Unknown", - "vendor": "Unknown", - "licence": "Unknown", - "jarHash": { - "bytes": "nqBwqHJMbLW80hmRbKEYk0eAknFiX8N40LKuGsD0bPo=", - "offset": 0, - "size": 32 - } - }, - { - "type": "Contract CorDapp", - "name": "corda-finance-contracts-4.6", - "shortName": "Corda Finance Demo", - "minimumPlatformVersion": 1, - "targetPlatformVersion": 8, - "version": "1", - "vendor": "R3", - "licence": "Open Source (Apache 2)", - "jarHash": { - "bytes": "a43Q/GJG6JKTZzq3U80P8L1DWWcB/D+Pl5uitEtAeQQ=", - "offset": 0, - "size": 32 - } - }, - { - "type": "Workflow CorDapp", - "name": "corda-finance-workflows-4.6", - "shortName": "Corda Finance Demo", - "minimumPlatformVersion": 1, - "targetPlatformVersion": 8, - "version": "1", - "vendor": "R3", - "licence": "Open Source (Apache 2)", - "jarHash": { - "bytes": "wXdD4Iy50RaWzPp7n9s1xwf4K4MB8eA1nmhPquTMvxg=", - "offset": 0, - "size": 32 - } - }, - { - "type": "Contract CorDapp", - "name": "contracts-1.0", - "shortName": "Obligation Contracts", - "minimumPlatformVersion": 8, - "targetPlatformVersion": 8, - "version": "1", - "vendor": "Corda Open Source", - "licence": "Apache License, Version 2.0", - "jarHash": { - "bytes": "grTZzN71Cpxw6rZe/U5SB6/ehl99B6VQ1+ZJEx1rixs=", - "offset": 0, - "size": 32 - } - } - ] -} -``` - -## Monitoring - -### Usage Prometheus -The prometheus exporter object is initialized in the `PluginLedgerConnectorCorda` class constructor itself, so instantiating the object of the `PluginLedgerConnectorCorda` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IPluginLedgerConnectorCordaOptions` interface for `PluginLedgerConnectoCorda` constructor. - -`getPrometheusExporterMetricsEndpointV1` function returns the prometheus exporter metrics, currently displaying the total transaction count, which currently increments everytime the `transact()` method of the `PluginLedgerConnectorCorda` class is called. - -### Prometheus Integration -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'corda_ledger_connector_exporter' - metrics_path: api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. -Example metrics URL: `http://localhost:42379/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_corda_total_tx_count** and click **execute** - -### Helper code - -###### response.type.ts -This file contains the various responses of the metrics. - -###### data-fetcher.ts -This file contains functions encasing the logic to process the data points - -###### metrics.ts -This file lists all the prometheus metrics and what they are used for. diff --git a/packages/cactus-plugin-ledger-connector-corda/Request-Example-ExampleFlow-Initiator.json b/packages/cactus-plugin-ledger-connector-corda/Request-Example-ExampleFlow-Initiator.json deleted file mode 100644 index 84f7aeab10..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/Request-Example-ExampleFlow-Initiator.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "flowFullClassName" : "net.corda.samples.example.flows.ExampleFlow$Initiator", - "flowInvocationType" : "FLOW_DYNAMIC", - "params" : [ { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.Integer" - }, - "primitiveValue" : 42, - "jvmCtorArgs" : null - }, { - "jvmTypeKind" : "REFERENCE", - "jvmType" : { - "fqClassName" : "net.corda.core.identity.Party" - }, - "primitiveValue" : null, - "jvmCtorArgs" : [ { - "jvmTypeKind" : "REFERENCE", - "jvmType" : { - "fqClassName" : "net.corda.core.identity.CordaX500Name" - }, - "primitiveValue" : null, - "jvmCtorArgs" : [ { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "PartyB", - "jvmCtorArgs" : null - }, { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "New York", - "jvmCtorArgs" : null - }, { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "US", - "jvmCtorArgs" : null - } ] - }, { - "jvmTypeKind" : "REFERENCE", - "jvmType" : { - "fqClassName" : "net.corda.samples.example.PublicKeyImpl" - }, - "primitiveValue" : null, - "jvmCtorArgs" : [ { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "EdDSA", - "jvmCtorArgs" : null - }, { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "java.lang.String" - }, - "primitiveValue" : "X.509", - "jvmCtorArgs" : null - }, { - "jvmTypeKind" : "PRIMITIVE", - "jvmType" : { - "fqClassName" : "[B" - }, - "primitiveValue" : "MCowBQYDK2VwAyEAoOv19eiCDJ7HzR9UrfwbFig7qcD1jkewKkkS4WF9kPA=", - "jvmCtorArgs" : null - } ] - } ] - } ], - "timeoutMs" : null -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/openapitools.json b/packages/cactus-plugin-ledger-connector-corda/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/package.json b/packages/cactus-plugin-ledger-connector-corda/package.json deleted file mode 100644 index 4f819810df..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-ledger-connector-corda", - "version": "2.0.0", - "description": "Allows Cactus nodes to connect to a Corda ledger.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-ledger-connector-corda.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "run-p generate-sdk generate-server", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --ignore-file-override ../../openapi-generator-ignore", - "generate-server": "yarn run --top-level openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin-spring -o ./src/main-server/kotlin/gen/kotlin-spring/ -c ./src/main-server/openapi-generator-config.yaml --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "express": "4.21.0", - "express-openapi-validator": "5.2.0", - "http-errors-enhanced-cjs": "2.0.1", - "internal-ip": "6.2.0", - "joi": "17.13.3", - "node-fetch": "2.7.0", - "node-ssh": "13.1.0", - "prom-client": "15.1.3", - "rxjs": "7.8.1", - "temp": "0.9.4", - "typescript-optional": "2.0.1", - "urlcat": "3.1.0" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/multer": "1.4.7", - "@types/temp": "0.9.1", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-ledger-connector-corda.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-ledger-connector-corda.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/Dockerfile b/packages/cactus-plugin-ledger-connector-corda/src/main-server/Dockerfile deleted file mode 100644 index 2f9f83a0ba..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -FROM gradle:8.1.1-jdk17-jammy as builder - -WORKDIR / -COPY ./kotlin/gen/kotlin-spring /kotlin-spring/ - -WORKDIR /kotlin-spring/ - -RUN gradle clean build -WORKDIR / - -FROM openjdk:24-slim-bookworm - -ARG APP=/usr/src/app -ENV APP=/usr/src/app - -RUN apt update -RUN apt install -y ca-certificates tzdata curl tini iputils-ping netcat-openbsd -RUN rm -rf /var/lib/apt/lists/* - -ENV TZ=Etc/UTC \ - APP_USER=appuser - -RUN groupadd $APP_USER \ - && useradd -g $APP_USER $APP_USER \ - && mkdir -p ${APP} - -COPY --from=builder /kotlin-spring/build/libs/ ${APP}/kotlin-spring/build/libs/ - -RUN chown -R $APP_USER:$APP_USER ${APP} - -USER $APP_USER -WORKDIR ${APP} - -COPY healthcheck.sh / -COPY start-app.sh / - -EXPOSE 8080 - -ENTRYPOINT ["/usr/bin/tini", "--"] -CMD ["/start-app.sh"] -HEALTHCHECK --interval=1s --timeout=5s --start-period=1s --retries=90 CMD /healthcheck.sh diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/healthcheck.sh b/packages/cactus-plugin-ledger-connector-corda/src/main-server/healthcheck.sh deleted file mode 100755 index 20796597a7..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/healthcheck.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -curl -vv -i -X POST http://127.0.0.1:8080/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map - -# curl -vv -i -X OPTIONS http://127.0.0.1:8080/ diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.gitignore b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.gitignore deleted file mode 100644 index b155595eba..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.gitignore +++ /dev/null @@ -1,71 +0,0 @@ -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/artifacts -# .idea/compiler.xml -# .idea/jarRepositories.xml -# .idea/modules.xml -# .idea/*.iml -# .idea/modules -# *.iml -# *.ipr - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/.name b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/.name deleted file mode 100644 index b08fe5aa99..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -cactus-connector-corda-server \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/compiler.xml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/compiler.xml deleted file mode 100644 index a756f94314..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/compiler.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/encodings.xml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/encodings.xml deleted file mode 100644 index 942f3a230a..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/encodings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/jarRepositories.xml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/jarRepositories.xml deleted file mode 100644 index a1c808323c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/jarRepositories.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/misc.xml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/misc.xml deleted file mode 100644 index 15d18a0640..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/misc.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/modules/gen.kotlin-spring.iml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/modules/gen.kotlin-spring.iml deleted file mode 100644 index f491540554..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/modules/gen.kotlin-spring.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/vcs.xml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/vcs.xml deleted file mode 100644 index b082f7b0ef..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator-ignore b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator-ignore deleted file mode 100644 index 85d3b7cde3..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator-ignore +++ /dev/null @@ -1,29 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md - -build.gradle.kts -src/test/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaTest.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/ApiPluginLedgerConnectorCordaServiceImpl.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/Application.kt -.gitignore \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES deleted file mode 100644 index daff5c5015..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES +++ /dev/null @@ -1,55 +0,0 @@ -README.md -settings.gradle -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiUtil.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CPIIDV1.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaNodeSshCredentials.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaRpcCredentials.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaX500Name.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappDeploymentConfig.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappInfo.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsBadRequestV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsSuccessV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowInvocationType.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1Responses.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1ResponsesFlowStatusResponsesInner.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowV1Error.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1ResponseTxInner.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JarFile.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmObject.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmType.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmTypeKind.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInner.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInnerCpksInner.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NetworkHostAndPort.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeDiagnosticInfo.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeInfo.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/Party.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/PublicKey.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/SHA256.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1RequestRequestBody.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Response.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/VaultQueryV1Request.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/X500Principal.kt -src/main/resources/application.yaml diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.trivyignore b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.trivyignore deleted file mode 100644 index f2bc18b79e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.trivyignore +++ /dev/null @@ -1,17 +0,0 @@ -# SNYK-JAVA-ORGYAML-3016888: -# - '*': -# reason: >- -# Snakeyaml is being used by Jackson and liquidbase. Corda does not use -# Jackson for deserialization except in the optional shell which we -# recommend using standalone. The Corda node itself is not exposed. -# Corda does however provide mappings of Corda types to allow CorDapps -# to use Jackson, and CorDapps using Jackson should make their own -# assessment. Liquibase is used to apply the database migration changes. -# XML files are used here to define the changes not YAML and therefore -# the Corda node itself is not exposed to this deserialisation -# vulnerability. -# expires: 2023-07-21T13:39:49.450Z -# created: 2022-12-29T13:39:49.470Z -# -# Source: https://github.com/corda/corda/blob/release/os/4.12/.snyk -CVE-2022-1471 diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/README.md b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/README.md deleted file mode 100644 index 54438b2bac..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Hyperledger Cacti - Corda V4 JVM Ledger Connector Plugin - -This Kotlin based [Spring Boot](https://spring.io/projects/spring-boot) application has been generated using the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator). - -## Getting Started - -This document assumes you have either maven or gradle available, either via the wrapper or otherwise. This does not come with a gradle / maven wrapper checked in. - -By default a [`pom.xml`](pom.xml) file will be generated. If you specified `gradleBuildFile=true` when generating this project, a `build.gradle.kts` will also be generated. Note this uses [Gradle Kotlin DSL](https://github.com/gradle/kotlin-dsl). - -To build the project using maven, run: -```bash -mvn package && java -jar target/cactus-connector-corda-server-2.0.0.jar -``` - -To build the project using gradle, run: -```bash -gradle build && java -jar build/libs/cactus-connector-corda-server-2.0.0.jar -``` - -If all builds successfully, the server should run on [http://localhost:8080/](http://localhost:8080/) diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/build.gradle.kts b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/build.gradle.kts deleted file mode 100644 index f1f3314bc5..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/build.gradle.kts +++ /dev/null @@ -1,106 +0,0 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - -group = "org.hyperledger.cactus.plugin.ledger.connector.corda.server" -version = project.properties["version"]!! - -val corda_release_group = "net.corda" -val corda_core_release_group = "net.corda" -val corda_release_version = "4.12" -val corda_core_release_version = "4.12" -val spring_boot_version = "3.3.1" -val jackson_version = "2.16.1" - -tasks.named("test") { - useJUnitPlatform() -} - -buildscript { - repositories { - maven { url = uri("https://repo1.maven.org/maven2") } - maven { url = uri("https://download.corda.net/maven/corda-releases") } - maven { url = uri("https://jitpack.io") } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:3.3.1") - } -} - -repositories { - maven { url = uri("https://repo1.maven.org/maven2") } - maven { url = uri("https://download.corda.net/maven/corda-releases") } - maven { url = uri("https://jitpack.io") } -} - -tasks.withType { - kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() -} - -plugins { - val kotlinVersion = "1.9.24" - id("org.jetbrains.kotlin.jvm") version kotlinVersion - id("org.springframework.boot") version "3.3.1" -} - -dependencies { - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") - implementation("org.jetbrains.kotlin:kotlin-reflect") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1") - implementation("org.springframework.boot:spring-boot-starter-web:$spring_boot_version") - implementation("org.springframework.boot:spring-boot-starter-validation:$spring_boot_version") - implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version") - implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version") - implementation("javax.json:javax.json-api:1.1.4") - implementation("$corda_core_release_group:corda-core:$corda_core_release_version") - implementation("$corda_core_release_group:corda-rpc:$corda_core_release_version") - implementation("$corda_release_group:corda-jackson:$corda_release_version") - implementation("$corda_release_group:corda-node-api:$corda_release_version") - implementation("$corda_release_group:corda:$corda_release_version") - - implementation("co.paralleluniverse:quasar-core:0.7.12_r3") - implementation("org.xeustechnologies:jcl-core:2.8") - implementation("org.xeustechnologies:jcl-spring:2.8") - implementation("com.fasterxml.jackson.core:jackson-core:$jackson_version") - implementation("com.fasterxml.jackson.core:jackson-databind:$jackson_version") - implementation("com.fasterxml.jackson.core:jackson-annotations:$jackson_version") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version") - - implementation("com.hierynomus:sshj:0.38.0") - - testImplementation("org.jetbrains.kotlin:kotlin-test-junit5") - testImplementation("org.springframework.boot:spring-boot-starter-validation:$spring_boot_version") - testImplementation("org.springframework.boot:spring-boot-starter-test:$spring_boot_version") { - exclude(module = "junit") - } -} - -configurations { - all { - exclude(group = "junit", module = "junit") - exclude(group = "org.junit.vintage", module = "junit-vintage-engine") - - resolutionStrategy.eachDependency { - if (requested.group == "org.yaml" && requested.name == "snakeyaml") { - useVersion("2.+") - because("CVE-2022-1471, CVE-2022-25857, CVE-2022-1471 - SnakeYaml: Constructor Deserialization Remote Code Execution, snakeyaml: Denial of Service due to missing nested depth limitation for collections") - } else if (requested.group == "org.springframework" && requested.name == "spring-web") { - useVersion("[6.0.0,99[") - because("CVE-2016-1000027 - https://avd.aquasec.com/nvd/cve-2016-1000027 spring: HttpInvokerServiceExporter readRemoteInvocation method untrusted java deserialization") - } else if (requested.group == "org.apache.commons" && requested.name == "commons-configuration2") { - useVersion("[2.8.0,99[") - because("CVE-2022-33980 - CRITICAL - https://avd.aquasec.com/nvd/cve-2022-33980 - apache-commons-configuration: Apache Commons Configuration insecure interpolation defaults") - } - } - } -} - -repositories { - maven { url = uri("https://repo1.maven.org/maven2") } - maven { url = uri("https://repo.spring.io/snapshot") } - maven { url = uri("https://repo.spring.io/milestone") } - - mavenLocal() - mavenCentral() - maven { url = uri("https://download.corda.net/maven/corda-dependencies") } - maven { url = uri("https://jitpack.io") } - maven { url = uri("https://repo.gradle.org/gradle/libs-releases-local") } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradle.properties b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradle.properties deleted file mode 100644 index f1859671a1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -version = 2.0.0 diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradle/wrapper/gradle-wrapper.jar b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index c1962a79e2..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradle/wrapper/gradle-wrapper.properties b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 37aef8d3f0..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip -networkTimeout=10000 -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradlew b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradlew deleted file mode 100755 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradlew.bat b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/settings.gradle b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/settings.gradle deleted file mode 100644 index 1b10305b32..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/settings.gradle +++ /dev/null @@ -1,21 +0,0 @@ -pluginManagement { - repositories { - maven { url = uri("https://repo.spring.io/snapshot") } - maven { url = uri("https://repo.spring.io/milestone") } - gradlePluginPortal() - } - resolutionStrategy { - eachPlugin { - if (requested.id.id == "org.springframework.boot") { - useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}") - } - } - } -} - -rootProject.name = "cactus-connector-corda-server" -// The template modification Cacti needs so that we can alter the artifact name -// at build time in our scripts. This is handy when we build a .jar to be scanned -// by trivy and we don't want to have to guess what the .jar filename ended up being -// (which is different after each release) -rootProject.name = System.getProperty('rootProjectName') ?: rootProject.name diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/Application.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/Application.kt deleted file mode 100644 index 9e8653e0ff..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/Application.kt +++ /dev/null @@ -1,67 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server - -import com.fasterxml.jackson.databind.DeserializationFeature -import com.fasterxml.jackson.databind.SerializationFeature -// import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule -import net.corda.client.jackson.JacksonSupport -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.NodeRPCConnection -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.beans.factory.annotation.Value -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.CommandLineRunner -import org.springframework.boot.runApplication -import org.springframework.context.ApplicationContext -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.ComponentScan -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter -import org.springframework.scheduling.TaskScheduler -import org.springframework.scheduling.annotation.EnableScheduling -import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler - -private const val ThreadPoolCount = "cactus.threadCount" -private const val ThreadPoolCountDefault = "3" - -@SpringBootApplication -@ComponentScan( basePackages = ["org.hyperledger.cactus.plugin.ledger.connector.corda.server", "org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl", "org.hyperledger.cactus.plugin.ledger.connector.corda.server.api", "org.hyperledger.cactus.plugin.ledger.connector.corda.server.model"]) -@EnableScheduling -open class Application(@Value("\${$ThreadPoolCount:$ThreadPoolCountDefault}") val threadCount: Int) { - /** - * Spring Bean that binds a Corda Jackson object-mapper to HTTP message types used in Spring. - */ - @Bean - open fun mappingJackson2HttpMessageConverter(@Autowired rpcConnection: NodeRPCConnection): MappingJackson2HttpMessageConverter { - val mapper = JacksonSupport.createDefaultMapper(rpcConnection.proxy) - .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS) - .disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE) - // .registerModule(JavaTimeModule()) - val converter = MappingJackson2HttpMessageConverter() - converter.objectMapper = mapper - return converter - } - - @Bean - open fun taskScheduler(): TaskScheduler? { - val taskScheduler = ThreadPoolTaskScheduler() - taskScheduler.poolSize = this.threadCount - return taskScheduler - } - - @Bean - open fun commandLineRunner(ctx: ApplicationContext): CommandLineRunner { - return object : CommandLineRunner { - override fun run(vararg args: String?) { - System.out.println("Let's inspect the beans provided by Spring Boot:"); - - val beanNames = ctx.getBeanDefinitionNames() - beanNames.sortedArray() - for (beanName in beanNames) { - System.out.println(beanName) - } - } - } - } -} - -fun main(args: Array) { - runApplication(*args) -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt deleted file mode 100644 index 5006a30917..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt +++ /dev/null @@ -1,219 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.api - -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ClearMonitorTransactionsV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ClearMonitorTransactionsV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsBadRequestV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsSuccessV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DiagnoseNodeV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DiagnoseNodeV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowStatusV1Responses -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetFlowCidV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetFlowCidV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListFlowsV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListFlowsV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.NodeInfo -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartFlowV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartFlowV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StopMonitorV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StopMonitorV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.VaultQueryV1Request -import org.springframework.http.HttpStatus -import org.springframework.http.MediaType -import org.springframework.http.ResponseEntity - -import org.springframework.web.bind.annotation.* -import org.springframework.validation.annotation.Validated -import org.springframework.web.context.request.NativeWebRequest -import org.springframework.beans.factory.annotation.Autowired - -import jakarta.validation.Valid -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size - -import kotlin.collections.List -import kotlin.collections.Map - -@RestController -@Validated -@RequestMapping("\${api.base-path:}") -open class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val service: ApiPluginLedgerConnectorCordaService) { - - - @RequestMapping( - method = [RequestMethod.DELETE], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun clearMonitorTransactionsV1( @Valid @RequestBody clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request): ResponseEntity { - return ResponseEntity(service.clearMonitorTransactionsV1(clearMonitorTransactionsV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.POST], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun deployContractJarsV1( @Valid @RequestBody deployContractJarsV1Request: DeployContractJarsV1Request): ResponseEntity { - return ResponseEntity(service.deployContractJarsV1(deployContractJarsV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.POST], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun diagnoseNodeV1( @Valid @RequestBody(required = false) diagnoseNodeV1Request: DiagnoseNodeV1Request?): ResponseEntity { - return ResponseEntity(service.diagnoseNodeV1(diagnoseNodeV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.GET], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid"], - produces = ["text/plain"], - consumes = ["application/json"] - ) - open fun getFlowV1( @Valid @RequestBody getFlowCidV1Request: GetFlowCidV1Request): ResponseEntity { - return ResponseEntity(service.getFlowV1(getFlowCidV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.GET], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun getMonitorTransactionsV1( @Valid @RequestBody getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request): ResponseEntity { - return ResponseEntity(service.getMonitorTransactionsV1(getMonitorTransactionsV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.GET], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics"], - produces = ["text/plain"] - ) - open fun getPrometheusMetricsV1(): ResponseEntity { - return ResponseEntity(service.getPrometheusMetricsV1(), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.POST], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun invokeContractV1( @Valid @RequestBody invokeContractV1Request: InvokeContractV1Request): ResponseEntity { - return ResponseEntity(service.invokeContractV1(invokeContractV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.GET], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun listCpiV1( @Valid @RequestBody listCpiV1Request: ListCpiV1Request): ResponseEntity { - return ResponseEntity(service.listCpiV1(listCpiV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.GET], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow"], - produces = ["text/plain"], - consumes = ["application/json"] - ) - open fun listFlowV1( @Valid @RequestBody getFlowCidV1Request: GetFlowCidV1Request): ResponseEntity { - return ResponseEntity(service.listFlowV1(getFlowCidV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.POST], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun listFlowsV1( @Valid @RequestBody(required = false) listFlowsV1Request: ListFlowsV1Request?): ResponseEntity { - return ResponseEntity(service.listFlowsV1(listFlowsV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.POST], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun networkMapV1( @Valid @RequestBody(required = false) body: kotlin.Any?): ResponseEntity> { - return ResponseEntity(service.networkMapV1(body), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.POST], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun startFlowV1( @Valid @RequestBody startFlowV1Request: StartFlowV1Request): ResponseEntity { - return ResponseEntity(service.startFlowV1(startFlowV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.POST], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun startMonitorV1( @Valid @RequestBody startMonitorV1Request: StartMonitorV1Request): ResponseEntity { - return ResponseEntity(service.startMonitorV1(startMonitorV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.DELETE], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun stopMonitorV1( @Valid @RequestBody stopMonitorV1Request: StopMonitorV1Request): ResponseEntity { - return ResponseEntity(service.stopMonitorV1(stopMonitorV1Request), HttpStatus.valueOf(200)) - } - - - @RequestMapping( - method = [RequestMethod.POST], - value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query"], - produces = ["application/json"], - consumes = ["application/json"] - ) - open fun vaultQueryV1( @Valid @RequestBody vaultQueryV1Request: VaultQueryV1Request): ResponseEntity { - return ResponseEntity(service.vaultQueryV1(vaultQueryV1Request), HttpStatus.valueOf(200)) - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt deleted file mode 100644 index 5d22e8b386..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt +++ /dev/null @@ -1,174 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.api - -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ClearMonitorTransactionsV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ClearMonitorTransactionsV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsBadRequestV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsSuccessV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DiagnoseNodeV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DiagnoseNodeV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowStatusV1Responses -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetFlowCidV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetFlowCidV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListFlowsV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListFlowsV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.NodeInfo -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartFlowV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartFlowV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StopMonitorV1Request -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StopMonitorV1Response -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.VaultQueryV1Request - -interface ApiPluginLedgerConnectorCordaService { - - /** - * DELETE /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions : Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore. - * - * @param clearMonitorTransactionsV1Request (required) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#clearMonitorTransactionsV1 - */ - fun clearMonitorTransactionsV1(clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request): ClearMonitorTransactionsV1Response - - /** - * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars : Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). - * - * @param deployContractJarsV1Request (required) - * @return OK (status code 200) - * or Bad Request (status code 400) - * @see ApiPluginLedgerConnectorCorda#deployContractJarsV1 - */ - fun deployContractJarsV1(deployContractJarsV1Request: DeployContractJarsV1Request): DeployContractJarsSuccessV1Response - - /** - * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node - * Responds with diagnostic information about the Corda node - * - * @param diagnoseNodeV1Request (optional) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#diagnoseNodeV1 - */ - fun diagnoseNodeV1(diagnoseNodeV1Request: DiagnoseNodeV1Request?): DiagnoseNodeV1Response - - /** - * GET /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid : This method gets the current status of the specified flow instance. - * - * @param getFlowCidV1Request This method gets the current status of the specified flow instance. (required) - * @return OK (status code 200) - * or Unauthorized (status code 401) - * or Forbidden (status code 403) - * @see ApiPluginLedgerConnectorCorda#getFlowV1 - */ - fun getFlowV1(getFlowCidV1Request: GetFlowCidV1Request): GetFlowCidV1Response - - /** - * GET /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions : Get transactions for monitored state classes. - * - * @param getMonitorTransactionsV1Request (required) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#getMonitorTransactionsV1 - */ - fun getMonitorTransactionsV1(getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request): GetMonitorTransactionsV1Response - - /** - * GET /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics : Get the Prometheus Metrics - * - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#getPrometheusMetricsV1 - */ - fun getPrometheusMetricsV1(): kotlin.String - - /** - * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract : Invokes a contract on a Corda ledger (e.g. a flow) - * - * @param invokeContractV1Request (required) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#invokeContractV1 - */ - fun invokeContractV1(invokeContractV1Request: InvokeContractV1Request): InvokeContractV1Response - - /** - * GET /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi : List all CPIs uploaded to the cluster - * - * @param listCpiV1Request (required) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#listCpiV1 - */ - fun listCpiV1(listCpiV1Request: ListCpiV1Request): ListCpiV1Response - - /** - * GET /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow : This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. - * - * @param getFlowCidV1Request This method gets the current status of the specified flow instance. (required) - * @return OK (status code 200) - * or Unauthorized (status code 401) - * or Forbidden (status code 403) - * @see ApiPluginLedgerConnectorCorda#listFlowV1 - */ - fun listFlowV1(getFlowCidV1Request: GetFlowCidV1Request): FlowStatusV1Responses - - /** - * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows - * Responds with a list of the flows on the Corda node. - * - * @param listFlowsV1Request (optional) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#listFlowsV1 - */ - fun listFlowsV1(listFlowsV1Request: ListFlowsV1Request?): ListFlowsV1Response - - /** - * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map - * Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List<NodeInfo> - * - * @param body (optional) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#networkMapV1 - */ - fun networkMapV1(body: kotlin.Any?): List - - /** - * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow : This method starts a new instance for the specified flow for the specified holding identity. - * - * @param startFlowV1Request Request body for starting a flow (required) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#startFlowV1 - */ - fun startFlowV1(startFlowV1Request: StartFlowV1Request): StartFlowV1Response - - /** - * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor : Start monitoring corda changes (transactions) of given state class - * - * @param startMonitorV1Request (required) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#startMonitorV1 - */ - fun startMonitorV1(startMonitorV1Request: StartMonitorV1Request): StartMonitorV1Response - - /** - * DELETE /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor : Stop monitoring corda changes (transactions) of given state class - * - * @param stopMonitorV1Request (required) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#stopMonitorV1 - */ - fun stopMonitorV1(stopMonitorV1Request: StopMonitorV1Request): StopMonitorV1Response - - /** - * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query - * Queryes the vault service for state references based on JVM class names. Custom filters are not supported by this endpoint. - * - * @param vaultQueryV1Request (required) - * @return OK (status code 200) - * @see ApiPluginLedgerConnectorCorda#vaultQueryV1 - */ - fun vaultQueryV1(vaultQueryV1Request: VaultQueryV1Request): kotlin.Any -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiUtil.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiUtil.kt deleted file mode 100644 index 634125a306..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiUtil.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.api - -import org.springframework.web.context.request.NativeWebRequest - -import jakarta.servlet.http.HttpServletResponse -import java.io.IOException - -object ApiUtil { - fun setExampleResponse(req: NativeWebRequest, contentType: String, example: String) { - try { - val res = req.getNativeResponse(HttpServletResponse::class.java) - res?.characterEncoding = "UTF-8" - res?.addHeader("Content-Type", contentType) - res?.writer?.print(example) - } catch (e: IOException) { - throw RuntimeException(e) - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/ApiPluginLedgerConnectorCordaServiceImpl.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/ApiPluginLedgerConnectorCordaServiceImpl.kt deleted file mode 100644 index ed9d456da1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/ApiPluginLedgerConnectorCordaServiceImpl.kt +++ /dev/null @@ -1,542 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl - -// import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule - -import com.fasterxml.jackson.annotation.JsonInclude -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.databind.* -import com.fasterxml.jackson.databind.module.SimpleModule -import com.fasterxml.jackson.databind.ser.BeanSerializerModifier -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper -import net.corda.core.contracts.ContractState -import net.corda.core.flows.FlowLogic -import net.corda.core.messaging.CordaRPCOps -import net.corda.core.messaging.FlowProgressHandle -import net.corda.core.transactions.SignedTransaction -import net.corda.core.utilities.loggerFor -import net.schmizz.sshj.SSHClient -import net.schmizz.sshj.connection.channel.direct.Session -import net.schmizz.sshj.transport.TransportException -import net.schmizz.sshj.transport.verification.PromiscuousVerifier -import net.schmizz.sshj.userauth.method.AuthPassword -import net.schmizz.sshj.userauth.password.PasswordUtils -import net.schmizz.sshj.xfer.InMemorySourceFile -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.api.ApiPluginLedgerConnectorCordaService -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.* -import org.springframework.http.HttpStatus -import org.springframework.http.HttpStatusCode -import org.springframework.stereotype.Service -import org.springframework.web.server.ResponseStatusException -import org.springframework.web.util.HtmlUtils.htmlEscape -import java.io.IOException -import java.io.InputStream -import java.util.* -import java.util.concurrent.TimeUnit - - -// TODO Look into this project for powering the connector of ours: -// https://github.com/180Protocol/codaptor -@Service -class ApiPluginLedgerConnectorCordaServiceImpl( - // FIXME: We already have the code/annotations set up "the spring boot way" so that credentials do not need - // to be hardcoded like this. Not even sure if these magic strings here actually get used at all or if spring just - // overwrites the bean property with whatever it constructed internally based on the configuration. - // Either way, these magic strings gotta go. - val rpc: NodeRPCConnection, - val monitorManager: StateMonitorSessionsManager -) : ApiPluginLedgerConnectorCordaService { - - companion object { - val logger = loggerFor() - - // FIXME: do not recreate the mapper for every service implementation instance that we create... - val mapper: ObjectMapper = jacksonObjectMapper() - .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS) - // .registerModule(JavaTimeModule()) - - val writer: ObjectWriter = mapper.writer() - - val jsonJvmObjectDeserializer = JsonJvmObjectDeserializer() - } - - private fun dynamicInvoke(rpc: CordaRPCOps, req: InvokeContractV1Request): InvokeContractV1Response { - val classFlowLogic = try { - @Suppress("UNCHECKED_CAST") - jsonJvmObjectDeserializer.getOrInferType(req.flowFullClassName) as Class> - } catch (ex: ClassNotFoundException) { - val reason = "flowFullClassName ${req.flowFullClassName} could not be loaded. Are you sure you have installed the correct .jar file(s)?" - throw ResponseStatusException(HttpStatus.BAD_REQUEST, reason, ex) - } - val params = req.params.map { p -> jsonJvmObjectDeserializer.instantiate(p) }.toTypedArray() - logger.info("params={}", params) - - val flowHandle = when (req.flowInvocationType) { - FlowInvocationType.TRACKED_FLOW_DYNAMIC -> rpc.startTrackedFlowDynamic(classFlowLogic, *params) - FlowInvocationType.FLOW_DYNAMIC -> rpc.startFlowDynamic(classFlowLogic, *params) - } - - val timeoutMs: Long = req.timeoutMs?.toLong() ?: 60000 - logger.debug("Invoking flow with timeout of $timeoutMs ms ...") - val progress: List = when (req.flowInvocationType) { - FlowInvocationType.TRACKED_FLOW_DYNAMIC -> (flowHandle as FlowProgressHandle<*>) - .progress - .toList() - .toBlocking() - .first() - FlowInvocationType.FLOW_DYNAMIC -> emptyList() - } - logger.debug("Starting to wait for flow completion now...") - val returnValue = flowHandle.returnValue.get(timeoutMs, TimeUnit.MILLISECONDS) - val id = flowHandle.id - - // allow returnValue to be something different to SignedTransaction - var callOutput: kotlin.Any = "" - var transactionId: kotlin.String? = null - - if (returnValue is SignedTransaction) { - logger.trace("returnValue is SignedTransaction - using returnValue.id.toString() ..."); - transactionId = returnValue.id.toString(); - - callOutput = mapOf( - "tx" to mapOf( - "id" to returnValue.tx.id, - "notary" to returnValue.tx.notary, - "requiredSigningKeys" to returnValue.tx.requiredSigningKeys, - "merkleTree" to returnValue.tx.merkleTree, - "privacySalt" to returnValue.tx.privacySalt, - "attachments" to returnValue.tx.attachments, - "commands" to returnValue.tx.commands, - // "digestService" to returnValue.tx.digestService, - "inputs" to returnValue.tx.inputs, - "networkParametersHash" to returnValue.tx.networkParametersHash, - "references" to returnValue.tx.references, - "timeWindow" to returnValue.tx.timeWindow - ), - "id" to returnValue.id, - "inputs" to returnValue.inputs, - "networkParametersHash" to returnValue.networkParametersHash, - "notary" to returnValue.notary, - "references" to returnValue.references, - "requiredSigningKeys" to returnValue.requiredSigningKeys, - "sigs" to returnValue.sigs - ); - - } else if (returnValue != null) { - callOutput = try { - val returnValueJson = writer.writeValueAsString(returnValue); - logger.trace("returnValue JSON serialized OK, using returnValue ..."); - returnValueJson; - } catch (ex: Exception) { - logger.trace("returnValue JSON serialized failed, using returnValue.toString() ..."); - returnValue.toString(); - } - } - - logger.info("Progress(${progress.size})={}", progress) - logger.info("ReturnValue={}", returnValue) - logger.info("Id=$id") - // FIXME: If the full return value (SignedTransaction instance) gets returned as "returnValue" - // then Jackson crashes like this: - // 2021-03-01 06:58:25.608 ERROR 7 --- [nio-8080-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet]: - // Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception - // [Request processing failed; nested exception is org.springframework.http.converter.HttpMessageNotWritableException: - // Could not write JSON: Failed to deserialize group OUTPUTS_GROUP at index 0 in transaction: - // net.corda.samples.obligation.states.IOUState: Interface net.corda.core.contracts.LinearState - // requires a field named participants but that isn't found in the schema or any superclass schemas; - // nested exception is com.fasterxml.jackson.databind.JsonMappingException: - // Failed to deserialize group OUTPUTS_GROUP at index 0 in transaction: net.corda.samples.obligation.states.IOUState: - // Interface net.corda.core.contracts.LinearState requires a field named participants but that isn't found in - // the schema or any superclass schemas (through reference chain: - // org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Response["returnValue"]-> - // net.corda.client.jackson.internal.StxJson["wire"]->net.corda.client.jackson.internal.WireTransactionJson["outputs"])] - // with root cause - return InvokeContractV1Response(true, callOutput, id.toString(), transactionId, progress) - } - - // FIXME - make it clear in the documentation that this deployment endpoint is not recommended for production - // because it does not support taking all the precautionary steps that are recommended by the official docs here - // https://docs.corda.net/docs/corda-enterprise/4.6/node-upgrade-notes.html#step-1-drain-the-node - // The other solution is of course to make it so that this endpoint is a fully fledged, robust, production ready - // implementation and that would be preferred over the longer term, but maybe it's actually just scope creep... - override fun deployContractJarsV1(deployContractJarsV1Request: DeployContractJarsV1Request): DeployContractJarsSuccessV1Response { - try { - val decoder = Base64.getDecoder() - - deployContractJarsV1Request.cordappDeploymentConfigs.forEachIndexed { index, cdc -> - val cred = cdc.sshCredentials - logger.debug("Creating new SSHClient object for CordappDeploymentConfig #$index...") - val ssh = SSHClient() - // FIXME we need to support host key verification as a minimum in order to claim that we - // are secure by default - // ssh.addHostKeyVerifier(cred.hostKeyEntry) - ssh.addHostKeyVerifier(PromiscuousVerifier()) - - logger.debug("Connecting with new SSHClient object for CordappDeploymentConfig #$index...") - val maxTries = 10; - val tryIntervalMs = 1000L; - var tries = 0 - - // TODO: pull this out to be a class level function instead of an inline one - fun tryConnectingToSshHost () { - tries++ - try { - logger.debug("Connecting to node via SSH... ${cred.hostname}:${cred.port}") - ssh.connect(cred.hostname, cred.port) - } catch (ex: TransportException) { - if (tries < maxTries) { - Thread.sleep(tryIntervalMs) - tryConnectingToSshHost() - } else { - throw RuntimeException("Fed up after $maxTries retries while connecting to SSH host:", ex) - } - } - } - tryConnectingToSshHost() - - try { - // FIXME - plain text passwords sent in in the request is the worst possible solution (but was also - // the one that we could quickly get to work with) - // Need to implement public key authentication, also need to support pulling credentials from the keychain - // at least support pulling the private key being retrieved from the keychain and also to be specified - // as a file on the node's file system and also as an environment variable. - // Also need to document which one of these options is the most secure and that one has to be the default - // so that we are adhering to the "secure by default" design principle of ours. - ssh.auth(cred.username, AuthPassword(PasswordUtils.createOneOff(cred.password.toCharArray()))) - - logger.debug("Deploying to Node {} at host {}:{}:{}", index, cred.hostname, cred.port, cdc.cordappDir) - - try { - val nodeRPCConnection = NodeRPCConnection( - cdc.rpcCredentials.hostname, - cdc.rpcCredentials.username, - cdc.rpcCredentials.password, - cdc.rpcCredentials.port - ) - - nodeRPCConnection.initialiseNodeRPCConnection() - nodeRPCConnection.gracefulShutdown() - - } catch (ex: Exception) { - throw RuntimeException("Failed to gracefully shut down the node prior to cordapp deployment onto ${cred.hostname}:${cred.port}:${cdc.cordappDir}", ex) - } - - try { - deployContractJarsV1Request.jarFiles.map { - val jarFileString = decoder.decode(it.contentBase64) - - // TODO refactor this: write an actual class that implements the interface and then use that - // instead of creating anonymous classes inline... - val localSourceFile = object : InMemorySourceFile() { - - private val filename = it.filename - private val contentBase64 = it.contentBase64 - private val byteArray: ByteArray = decoder.decode(contentBase64) - private val inputStream: InputStream - - init { - inputStream = byteArray.inputStream() - } - - override fun getName(): String { - return filename - } - - override fun getLength(): Long { - val jarFileLength = byteArray.size.toLong() - logger.debug("jarFileLength: $jarFileLength for $filename") - return jarFileLength - } - - override fun getInputStream(): InputStream { - return inputStream - } - } - - val taskDescription = "SCP upload ${it.filename} (size=${jarFileString.size}) onto ${cred.hostname}:${cred.port}:${cdc.cordappDir}" - logger.debug("Starting $taskDescription") - ssh.newSCPFileTransfer().upload(localSourceFile, cdc.cordappDir) - logger.debug("Finished $taskDescription") - - if (it.hasDbMigrations) { - logger.debug("${it.filename} has db migrations declared, executing those now...") - val session = ssh.startSession() - session.allocateDefaultPTY() - val migrateCmd = "java -jar ${cdc.cordaJarPath} run-migration-scripts --verbose --app-schemas --base-directory=${cdc.nodeBaseDirPath}" - logger.debug("migrateCmd=$migrateCmd") - val migrateCmdRes = session.exec(migrateCmd) - val migrateCmdOut = net.schmizz.sshj.common.IOUtils.readFully(migrateCmdRes.inputStream).toString() - logger.debug("migrateCmdOut=${migrateCmdOut}") - session.close() - logger.debug("Closed the db migrations CMD SSH session successfully.") - } - it.filename - } - } catch (ex: Exception) { - throw RuntimeException("Failed to upload jars to corda node.", ex) - } - - val session: Session = ssh.startSession() - try { - val startNodeTask = "Starting of Corda node ${cred.hostname}:${cred.port} with CMD=${cdc.cordaNodeStartCmd}" - logger.debug("$startNodeTask ...") - session.allocateDefaultPTY() - val startNodeRes = session.exec(cdc.cordaNodeStartCmd) - val startNodeOut = net.schmizz.sshj.common.IOUtils.readFully(startNodeRes.inputStream).toString() - logger.debug("$startNodeTask successfully finished with: {}", startNodeOut) - } catch (ex: Exception) { - throw RuntimeException("Failed to start the node after the cordapp deployment onto ${cred.hostname}:${cred.port}:${cdc.cordappDir}", ex) - } finally { - try { - session.close() - logger.debug("Closed Corda Start CMD SSH session successfully.") - } catch (e: IOException) { - logger.warn("SSH session failed to close, but this might be normal based on the SSHJ docs/examples: ", e) - } - } - } finally { - logger.debug("Disconnecting from SSH host ${cred.hostname}:${cred.port}...") - try { - ssh.disconnect() - logger.debug("Disconnected OK from SSH host ${cred.hostname}:${cred.port}") - // This is a hack to force the code to wait for the OS to close down the port. Without it, deployments - // can fail intermittently because it'll try to reconnect too fast. The right way to fix it is - // to make it probe the port openness and have retries with exponential backoff. - // TODO: Implement the proper fix as described above. - Thread.sleep(5000) - } catch (ex: Exception) { - logger.warn("Disconnect failed from SSH host ${cred.hostname}:${cred.port}. Ignoring since we are done anyway...") - } - } - } - val deployedJarFileNames = deployContractJarsV1Request.jarFiles.map { - val jarFileInputStream = decoder.decode(it.contentBase64).inputStream() - jsonJvmObjectDeserializer.jcl.add(jarFileInputStream) - logger.info("Added jar to classpath of Corda Connector Plugin Server: ${it.filename}") - it.filename - } - - return DeployContractJarsSuccessV1Response(deployedJarFileNames) - } catch (ex: Throwable) { - logger.error("Failed to serve DeployContractJarsV1Request", ex) - throw ex - } - } - - override fun diagnoseNodeV1(diagnoseNodeV1Request: DiagnoseNodeV1Request?): DiagnoseNodeV1Response { - val reader = mapper.readerFor(object : TypeReference() {}) - - val nodeDiagnosticInfoCorda = rpc.proxy.nodeDiagnosticInfo() - - val json = writer.writeValueAsString(nodeDiagnosticInfoCorda) - logger.debug("NodeDiagnosticInfo JSON=\n{}", json) - - val nodeDiagnosticInfoCactus = reader.readValue(json) - logger.debug("Responding with marshalled ${NodeDiagnosticInfo::class.qualifiedName}: {}", nodeDiagnosticInfoCactus) - return DiagnoseNodeV1Response(nodeDiagnosticInfo = nodeDiagnosticInfoCactus) - } - - override fun getPrometheusMetricsV1(): String { - TODO("Not yet implemented") - } - - override fun invokeContractV1(invokeContractV1Request: InvokeContractV1Request): InvokeContractV1Response { - return dynamicInvoke(rpc.proxy, invokeContractV1Request) - } - - override fun listFlowsV1(listFlowsV1Request: ListFlowsV1Request?): ListFlowsV1Response { - val flows = rpc.proxy.registeredFlows() - return ListFlowsV1Response(flows) - } - - override fun networkMapV1(body: Any?): List { - val reader = mapper.readerFor(object : TypeReference?>() {}) - val networkMapSnapshot = rpc.proxy.networkMapSnapshot() - val serializer = CordaNetworkMapSnapshotJsonSerializer(networkMapSnapshot) - val x = serializer.asListOfMaps() - val networkMapJson = writer.writeValueAsString(x) - logger.trace("networkMapSnapshot=\n{}", networkMapJson) - - val nodeInfoList = reader.readValue>(networkMapJson) - logger.debug("Returning {} NodeInfo elements in response.", nodeInfoList.size) - return nodeInfoList - } - - override fun vaultQueryV1(vaultQueryV1Request: VaultQueryV1Request): Any { - if (vaultQueryV1Request.contractStateType == null) { - throw ResponseStatusException(HttpStatus.BAD_REQUEST, "QueryBySimpleV1Request.contractStateType cannot be null") - } - logger.trace("ENTER vaultQueryV1() vaultQueryV1Request.contractStateType={}", vaultQueryV1Request.contractStateType); - val contractStateType = vaultQueryV1Request.contractStateType; - - val clazz: Class; - try { - clazz = jsonJvmObjectDeserializer.getOrInferType(contractStateType) as Class - } catch (ex: Throwable) { - throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Could not load $contractStateType class from classpath:", ex) - } - - if(!ContractState::class.java.isAssignableFrom(clazz)) { - throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Provided QueryBySimpleV1Request.contractStateType (${contractStateType}) must be assignable from (e.g. a sub-class of) ${ContractState::class.java.name}") - } - - logger.debug("vaultQueryV1() Querying Corda vault..."); - val results = rpc.proxy.vaultQuery(clazz) - logger.debug("vaultQueryV1() Queried Corda vault OK"); - logger.trace("EXIT vaultQueryV1() results={}", results); - - return results - } - - /** - * Start monitoring state changes for clientAppID of stateClass specified in the request body. - */ - override fun startMonitorV1(startMonitorV1Request: StartMonitorV1Request): StartMonitorV1Response { - val clientAppId = startMonitorV1Request.clientAppId - val stateName = startMonitorV1Request.stateFullClassName - - if (clientAppId.isEmpty()) { - val message = "Request rejected because missing client app ID" - logger.info(message) - return StartMonitorV1Response(false, message) - } - - if (stateName.isEmpty()) { - val message = "Request rejected because missing state class name" - logger.info(message) - return StartMonitorV1Response(false, message) - } - - try { - @Suppress("UNCHECKED_CAST") - val contractState = jsonJvmObjectDeserializer.getOrInferType(stateName) as Class - - monitorManager.withClient(clientAppId) { - startMonitor(stateName, contractState) - return StartMonitorV1Response(true, "OK") - } - } catch (ex: ClassNotFoundException) { - val message = "Unknown corda state name to monitor: ${htmlEscape(stateName)}" - logger.warn("startMonitorV1 error: {}", message) - return StartMonitorV1Response(false, message) - } catch (ex: Throwable) { - logger.warn("startMonitorV1 error: {}, cause: {}", ex.toString(), ex.cause.toString()) - return StartMonitorV1Response(false, htmlEscape(ex.toString())) - } - } - - /** - * Read all transactions that were not read by its client yet. - * Must be called after startMonitorV1 and before stopMonitorV1. - * Transactions buffer must be explicitly cleared with clearMonitorTransactionsV1 - */ - override fun getMonitorTransactionsV1(getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request): GetMonitorTransactionsV1Response { - val clientAppId = getMonitorTransactionsV1Request.clientAppId - val stateName = getMonitorTransactionsV1Request.stateFullClassName - - if (clientAppId.isEmpty()) { - val message = "Request rejected because missing client app ID" - logger.info(message) - return GetMonitorTransactionsV1Response(false, message) - } - - if (stateName.isEmpty()) { - val message = "Request rejected because missing state class name" - logger.info(message) - return GetMonitorTransactionsV1Response(false, message) - } - - try { - monitorManager.withClient(clientAppId) { - return GetMonitorTransactionsV1Response(true, "OK", stateName, getTransactions(stateName).toList()) - } - } - catch (ex: Throwable) { - logger.warn("getMonitorTransactionsV1 error: {}, cause: {}", ex.toString(), ex.cause.toString()) - return GetMonitorTransactionsV1Response(false, htmlEscape(ex.toString())) - } - } - - /** - * Clear monitored transactions based on index from internal client buffer. - * Any future call to getMonitorTransactionsV1 will not return transactions removed by this call. - */ - override fun clearMonitorTransactionsV1(clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request): ClearMonitorTransactionsV1Response { - val clientAppId = clearMonitorTransactionsV1Request.clientAppId - val stateName = clearMonitorTransactionsV1Request.stateFullClassName - val indexesToRemove = clearMonitorTransactionsV1Request.txIndexes - - if (clientAppId.isEmpty()) { - val message = "Request rejected because missing client app ID" - logger.info(message) - return ClearMonitorTransactionsV1Response(false, message) - } - - if (stateName.isEmpty()) { - val message = "Request rejected because missing state class name" - logger.info(message) - return ClearMonitorTransactionsV1Response(false, message) - } - - if (indexesToRemove.isEmpty()) { - val message = "No indexes to remove" - logger.info(message) - return ClearMonitorTransactionsV1Response(true, message) - } - - try { - monitorManager.withClient(clientAppId) { - clearTransactions(stateName, indexesToRemove) - return ClearMonitorTransactionsV1Response(true, "OK") - } - } - catch (ex: Throwable) { - logger.warn("clearMonitorTransactionsV1 error: {}, cause: {}", ex.toString(), ex.cause.toString()) - return ClearMonitorTransactionsV1Response(false, htmlEscape(ex.toString())) - } - } - - /** - * Stop monitoring state changes for clientAppID of stateClass specified in the request body. - * Removes all transactions that were not read yet, unsubscribes from the monitor. - */ - override fun stopMonitorV1(stopMonitorV1Request: StopMonitorV1Request): StopMonitorV1Response { - val clientAppId = stopMonitorV1Request.clientAppId - val stateName = stopMonitorV1Request.stateFullClassName - - if (clientAppId.isEmpty()) { - val message = "Request rejected because missing client app ID" - logger.info(message) - return StopMonitorV1Response(false, message) - } - - if (stateName.isEmpty()) { - val message = "Request rejected because missing state class name" - logger.info(message) - return StopMonitorV1Response(false, message) - } - - try { - monitorManager.withClient(clientAppId) { - stopMonitor(stateName) - return StopMonitorV1Response(true, "OK") - } - } - catch (ex: Throwable) { - logger.warn("clearMonitorTransactionsV1 error: {}, cause: {}", ex.toString(), ex.cause.toString()) - return StopMonitorV1Response(false, htmlEscape(ex.toString())) - } - } - override fun getFlowV1(getFlowCidV1Request: GetFlowCidV1Request): GetFlowCidV1Response { - TODO("Not yet implemented") - } - override fun listCpiV1(listCpiV1Request: ListCpiV1Request): ListCpiV1Response { - TODO("Not yet implemented") - } - override fun startFlowV1(startFlowV1Request: StartFlowV1Request): StartFlowV1Response { - TODO("Not yet implemented") - } - override fun listFlowV1(getFlowCidV1Request: GetFlowCidV1Request): FlowStatusV1Responses { - TODO("Not yet implemented") - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/ConstructorLookupException.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/ConstructorLookupException.kt deleted file mode 100644 index ceec019fd4..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/ConstructorLookupException.kt +++ /dev/null @@ -1,10 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl - -import java.lang.RuntimeException - - -open class InstantiationException(override val message: String, override val cause: Throwable? = null) - : RuntimeException(message, cause) - -open class ConstructorLookupException(override val message: String, override val cause: Throwable? = null) - : InstantiationException(message, cause) diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/CordaNetworkMapSnapshotJsonSerializer.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/CordaNetworkMapSnapshotJsonSerializer.kt deleted file mode 100644 index 9ac7f8a9f7..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/CordaNetworkMapSnapshotJsonSerializer.kt +++ /dev/null @@ -1,76 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl - -import net.corda.core.crypto.keys -import net.corda.core.node.NodeInfo -import net.corda.core.utilities.toBase58String -import net.corda.nodeapi.internal.config.toConfig - -// org.bouncycastle.math.ec.custom.sec.SecP256R1Curve["infinity"] - -/** - * We need this to avoid the serialization exception of the Corda Network map in Corda v4.12 where without this, the - * Jackson serialization of the network map will crash with the following error: - * - * ```sh - * com.fasterxml.jackson.databind.JsonMappingException: - * Document nesting depth (1001) exceeds the maximum allowed (1000, from `StreamWriteConstraints.getMaxNestingDepth()`) - * (through reference chain: - * net.corda.core.node.NodeInfo["legalIdentitiesAndCerts"] - * ->java.util.Collections$UnmodifiableRandomAccessList[0] - * ->net.corda.core.identity.PartyAndCertificate["certPath"] - * ->sun.security.provider.certpath.X509CertPath["certificates"] - * ->java.util.Collections$UnmodifiableRandomAccessList[1] - * ->sun.security.x509.X509CertImpl["publicKey"] - * ->org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey["parameters"] - * ->org.bouncycastle.jce.spec.ECNamedCurveParameterSpec["curve"] - * ->org.bouncycastle.math.ec.custom.sec.SecP256R1Curve["infinity"] - * ->org.bouncycastle.math.ec.custom.sec.SecP256R1Point["curve"] - * ->org.bouncycastle.math.ec.custom.sec.SecP256R1Curve["infinity"] - * ->org.bouncycastle.math.ec.custom.sec.SecP256R1Point["curve"] - * ... - * ``` - * - */ -class CordaNetworkMapSnapshotJsonSerializer(private val data: List) { - fun asListOfMaps(): List> { - return data.map { nodeInfo -> asMap(nodeInfo) }; - } - - private fun asMap(ni: NodeInfo): Map { - ni.legalIdentitiesAndCerts - return mapOf( - "legalIdentitiesAndCerts" to ni.legalIdentitiesAndCerts.map { pac -> - mapOf( - "name" to pac.name, - "certificate" to pac.certificate, - "party" to pac.party, - "owningKey" to pac.owningKey, - "certPath" to mapOf( - "type" to pac.certPath.type, - "certificates" to pac.certPath.certificates.map { c -> - mapOf( - "type" to c.type, - "publicKey" to mapOf( - "algorithm" to c.publicKey.algorithm, - "format" to c.publicKey.format, - "toBase58String" to c.publicKey.toBase58String(), - "keys" to c.publicKey.keys.map { k -> - mapOf( - "algorithm" to k.algorithm, - "format" to k.format, - "toBase58String" to k.toBase58String() - ) - } - ), - ) - } - ) - ) - }, - "serial" to ni.serial, - "legalIdentities" to ni.legalIdentities, - "addresses" to ni.addresses, - "platformVersion" to ni.platformVersion, - ); - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/InMemoryHostKeyVerifier.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/InMemoryHostKeyVerifier.kt deleted file mode 100644 index be2d860c84..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/InMemoryHostKeyVerifier.kt +++ /dev/null @@ -1,82 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl - -import net.corda.core.utilities.loggerFor -import net.schmizz.sshj.common.KeyType -import net.schmizz.sshj.transport.verification.HostKeyVerifier -import net.schmizz.sshj.transport.verification.OpenSSHKnownHosts -import net.schmizz.sshj.transport.verification.OpenSSHKnownHosts.KnownHostEntry -import java.io.* -import java.lang.RuntimeException -import java.nio.charset.Charset -import java.security.PublicKey -import java.util.* - -// TODO: Once we are able to support host key verification this can be either -// deleted or just left alone if it actually ends up being used by the -// fix that makes it so that we can do host key verification. -class InMemoryHostKeyVerifier(inputStream: InputStream?, charset: Charset?) : - HostKeyVerifier { - private val entries: MutableList = ArrayList() - - companion object { - val logger = loggerFor() - } - - init { - - // we construct the OpenSSHKnownHosts instance with a dummy file that does not exist because - // that's the only way to trick it into doing nothing on the file system which is what we want - // since this implementation is about providing an in-memory host key verification process... - val nonExistentFilePath = UUID.randomUUID().toString() - val hostsFile = File(nonExistentFilePath) - val openSSHKnownHosts = OpenSSHKnownHosts(hostsFile) - - // we just wanted an EntryFactory which we could not instantiate without instantiating the OpenSSHKnownHosts - // class as well (which is a limitation of Kotlin compared to Java it seems). - val entryFactory: OpenSSHKnownHosts.EntryFactory = openSSHKnownHosts.EntryFactory() - val reader = BufferedReader(InputStreamReader(inputStream, charset)) - while (reader.ready()) { - val line = reader.readLine() - try { - logger.debug("Parsing line {}", line) - val entry = entryFactory.parseEntry(line) - if (entry != null) { - entries.add(entry) - logger.debug("Added entry {}", entry) - } - } catch (e: Exception) { - throw RuntimeException("Failed to init InMemoryHostKeyVerifier", e) - } - } - logger.info("Parsing of host key entries successful.") - } - - override fun verify(hostname: String, port: Int, key: PublicKey): Boolean { - logger.debug("Verifying {}:{} {}", hostname, port, key) - val type = KeyType.fromKey(key) - if (type === KeyType.UNKNOWN) { - logger.debug("Rejecting key due to unknown key type {}", type) - return false - } - for (e in entries) { - try { - if (e.appliesTo(type, hostname) && e.verify(key)) { - logger.debug("Accepting key type {} for host {} with key of {}", type, hostname, key) - return true - } - } catch (ioe: IOException) { - throw RuntimeException("Crashed while attempting to verify key type $type for host $hostname ", ioe) - } - } - logger.debug("Rejecting due to none of the {} entries being acceptable.", entries.size) - return false - } - - // FIXME: 2024-01-03 Peter - host key verification is needed. SSH is only used - // for contract deployment via the connector which is an experimental feature not - // ready for production use so this is not an issue until we decide to make it - // production ready (the contract deployment endpoint) - override fun findExistingAlgorithms(hostname: String, port: Int): List { - return listOf() - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/JsonJvmObjectDeserializer.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/JsonJvmObjectDeserializer.kt deleted file mode 100644 index 82c84b65a9..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/JsonJvmObjectDeserializer.kt +++ /dev/null @@ -1,234 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl - -import net.corda.core.utilities.loggerFor -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.JvmObject -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.JvmTypeKind -import org.xeustechnologies.jcl.JarClassLoader -import java.lang.Exception -import java.lang.IllegalStateException -import java.lang.RuntimeException -import java.lang.reflect.Constructor -import java.lang.reflect.Method -import java.util.* -import kotlin.collections.ArrayList - -// FIXME: Make it so that this has a memory, remembering the .jar files that were added before (file-system?) or -// maybe use the keychain to save it there and then it can pre-populate at boot? -class JsonJvmObjectDeserializer( - val jcl: JarClassLoader = JarClassLoader(JsonJvmObjectDeserializer::class.java.classLoader) -) { - - companion object { - val logger = loggerFor() - - // If something is missing from here that's because they also missed at in the documentation: - // https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html - val exoticTypes: Map> = mapOf( - - "byte" to Byte::class.java, - "char" to Char::class.java, - "int" to Int::class.java, - "short" to Short::class.java, - "long" to Long::class.java, - "float" to Float::class.java, - "double" to Double::class.java, - "boolean" to Boolean::class.java, - - "byte[]" to ByteArray::class.java, - "char[]" to CharArray::class.java, - "int[]" to IntArray::class.java, - "short[]" to ShortArray::class.java, - "long[]" to LongArray::class.java, - "float[]" to FloatArray::class.java, - "double[]" to DoubleArray::class.java, - "boolean[]" to BooleanArray::class.java - ) - } - - fun getOrInferType(fqClassName: String): Class<*> { - Objects.requireNonNull(fqClassName, "fqClassName must not be null for its type to be inferred.") - - return if (exoticTypes.containsKey(fqClassName)) { - exoticTypes.getOrElse( - fqClassName, - { throw IllegalStateException("Could not locate Class<*> for $fqClassName Exotic JVM types map must have been modified on a concurrent threat.") }) - } else { - try { - jcl.loadClass(fqClassName, true) - } catch (ex: ClassNotFoundException) { - Class.forName(fqClassName) - } - } - } - - fun instantiate(jvmObject: JvmObject): Any? { - logger.info("Instantiating ... JvmObject={}", jvmObject) - - val clazz = getOrInferType(jvmObject.jvmType.fqClassName) - - when (jvmObject.jvmTypeKind) { - JvmTypeKind.REFERENCE -> { - if (jvmObject.jvmCtorArgs == null) { - throw IllegalArgumentException("jvmObject.jvmCtorArgs cannot be null when jvmObject.jvmTypeKind == JvmTypeKind.REFERENCE") - } - val constructorArgs: Array = jvmObject.jvmCtorArgs.map { x -> instantiate(x) }.toTypedArray() - - when { - Class::class.java.isAssignableFrom(clazz) -> { - val x = constructorArgs.map { ca -> ca as String }.first() - return Class.forName(x) - } - DoubleArray::class.java.isAssignableFrom(clazz) -> { - return constructorArgs - .map { ca -> ca as Double } - .toDoubleArray() - } - FloatArray::class.java.isAssignableFrom(clazz) -> { - return constructorArgs - .map { ca -> ca as Float } - .toFloatArray() - } - LongArray::class.java.isAssignableFrom(clazz) -> { - return constructorArgs - .map { ca -> ca as Long } - .toLongArray() - } - ShortArray::class.java.isAssignableFrom(clazz) -> { - return constructorArgs - .map { ca -> ca as Short } - .toShortArray() - } - CharArray::class.java.isAssignableFrom(clazz) -> { - return constructorArgs - .map { ca -> ca as Char } - .toCharArray() - } - BooleanArray::class.java.isAssignableFrom(clazz) -> { - return constructorArgs - .map { ca -> ca as Boolean } - .toBooleanArray() - } - IntArray::class.java.isAssignableFrom(clazz) -> { - return constructorArgs - .map { ca -> ca as Int } - .toIntArray() - } - ByteArray::class.java.isAssignableFrom(clazz) -> { - return constructorArgs - .map { ca -> ca as Byte } - .toByteArray() - } - ArrayList::class.java.isAssignableFrom(clazz) -> { - return arrayListOf(*constructorArgs) - } - Array::class.java.isAssignableFrom(clazz) -> { - return arrayOf(*constructorArgs) - } - List::class.java.isAssignableFrom(clazz) -> { - return listOf(*constructorArgs) - } - Set::class.java.isAssignableFrom(clazz) -> { - return setOf(*constructorArgs) - } - Map::class.java.isAssignableFrom(clazz) -> { - val constructorArgsCasted = constructorArgs - .map { ca -> ca as Pair<*, *> } - .toTypedArray() - - return mapOf(*constructorArgsCasted) - } - jvmObject.jvmType.constructorName != null -> { - val methodArgTypes: List> = - jvmObject.jvmCtorArgs.map { x -> getOrInferType(x.jvmType.fqClassName) } - - var invocationTarget: Any? = null - if (jvmObject.jvmType.invocationTarget != null) { - try { - logger.debug("Instantiating InvocationTarget: ${jvmObject.jvmType.invocationTarget}") - invocationTarget = instantiate(jvmObject.jvmType.invocationTarget) - logger.debug("Instantiated OK InvocationTarget: ${jvmObject.jvmType.invocationTarget}") - logger.debug("InvocationTarget: $invocationTarget") - } catch (ex: Exception) { - val argTypes = jvmObject.jvmCtorArgs.joinToString(",") { x -> x.jvmType.fqClassName } - val className = jvmObject.jvmType.fqClassName - val constructorName = jvmObject.jvmType.constructorName - val message = "Failed to instantiate invocation target for " + - "JvmType:${className}${constructorName}(${argTypes}) with an " + - "InvocationTarget: ${jvmObject.jvmType.invocationTarget}" - throw InstantiationException(message, ex) - } - } - - val factoryClass: Class<*> = if (invocationTarget == null) clazz else invocationTarget::class.java - - val factoryMethod: Method - try { - factoryMethod = factoryClass.methods - .filter { c -> c.name == jvmObject.jvmType.constructorName } - .filter { c -> c.parameterCount == methodArgTypes.size } - .single { c -> - c.parameterTypes - .mapIndexed { index, clazz -> clazz.isAssignableFrom(methodArgTypes[index]) } - .all { x -> x } - } - } catch (ex: NoSuchElementException) { - val argTypes = jvmObject.jvmCtorArgs.joinToString(",") { x -> x.jvmType.fqClassName } - val className = factoryClass.name - val methodsAsStrings = - factoryClass.methods.joinToString("\n") { c -> "$className#${c.name}(${c.parameterTypes.joinToString { p -> p.name }})" } - val targetMethod = "Cannot find matching method for ${className}#${jvmObject.jvmType.constructorName}(${argTypes})" - val availableMethods = - "Searched among the ${clazz.methods.size} available methods: $methodsAsStrings" - throw ConstructorLookupException("$targetMethod --- $availableMethods") - } - - logger.info("Constructor=${factoryMethod}") - constructorArgs.forEachIndexed { index, it -> logger.info("Constructor ARGS: #${index} -> $it") } - - val instance = factoryMethod.invoke(invocationTarget, *constructorArgs) - logger.info("Instantiated REFERENCE OK {}", instance) - return instance - } - else -> { - val constructorArgTypes: List> = - jvmObject.jvmCtorArgs.map { x -> getOrInferType(x.jvmType.fqClassName) } - val constructor: Constructor<*> - try { - constructor = clazz.constructors - .filter { c -> c.parameterCount == constructorArgTypes.size } - .single { c -> - c.parameterTypes - .mapIndexed { index, clazz -> clazz.isAssignableFrom(constructorArgTypes[index]) } - .all { x -> x } - } - } catch (ex: NoSuchElementException) { - val argTypes = jvmObject.jvmCtorArgs.joinToString(",") { x -> x.jvmType.fqClassName } - val className = jvmObject.jvmType.fqClassName - val constructorsAsStrings = clazz.constructors - .mapIndexed { i, c -> "$className->Constructor#${i + 1}(${c.parameterTypes.joinToString { p -> p.name }})" } - .joinToString(" ;; ") - val targetConstructor = "Cannot find matching constructor for ${className}(${argTypes})" - val availableConstructors = - "Searched among the ${clazz.constructors.size} available constructors: $constructorsAsStrings" - throw RuntimeException("$targetConstructor --- $availableConstructors") - } - - logger.info("Constructor=${constructor}") - constructorArgs.forEachIndexed { index, it -> logger.info("Constructor ARGS: #${index} -> $it") } - val instance = constructor.newInstance(*constructorArgs) - logger.info("Instantiated REFERENCE OK {}", instance) - return instance - } - } - - } - JvmTypeKind.PRIMITIVE -> { - logger.info("Instantiated PRIMITIVE OK {}", jvmObject.primitiveValue) - return jvmObject.primitiveValue - } - else -> { - throw IllegalArgumentException("Unknown jvmObject.jvmTypeKind (${jvmObject.jvmTypeKind})") - } - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/NodeRPCConnection.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/NodeRPCConnection.kt deleted file mode 100644 index 47eb7d88f0..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/NodeRPCConnection.kt +++ /dev/null @@ -1,135 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl - -import kotlinx.coroutines.* -import kotlin.time.toDuration -import kotlin.time.DurationUnit - -import net.corda.client.rpc.CordaRPCClient -import net.corda.client.rpc.CordaRPCClientConfiguration -import net.corda.client.rpc.CordaRPCConnection -import net.corda.client.rpc.GracefulReconnect -import net.corda.core.messaging.CordaRPCOps -import net.corda.core.messaging.pendingFlowsCount -import net.corda.core.utilities.NetworkHostAndPort -import net.corda.core.utilities.loggerFor -import org.springframework.beans.factory.annotation.Value -import org.springframework.stereotype.Component -import jakarta.annotation.PostConstruct -import jakarta.annotation.PreDestroy -import jakarta.validation.Valid - -import java.net.InetAddress - -import org.springframework.boot.context.properties.ConfigurationProperties -import org.springframework.validation.annotation.Validated -import java.util.concurrent.CountDownLatch -import jakarta.validation.constraints.NotEmpty -import jakarta.validation.constraints.NotNull - - -private const val CACTUS_CORDA_RPC_USERNAME = "cactus.corda.rpc.username" -private const val CACTUS_CORDA_RPC_PASSWORD = "cactus.corda.rpc.password" -private const val CACTUS_CORDA_NODE_HOST = "cactus.corda.node.host" -private const val CACTUS_CORDA_RPC_PORT = "cactus.corda.rpc.port" - -/** - * Wraps an RPC connection to a Corda node. - * - * The RPC connection is configured using command line arguments. - * - * @param host The host of the node we are connecting to. - * @param rpcPort The RPC port of the node we are connecting to. - * @param username The username for logging into the RPC client. - * @param password The password for logging into the RPC client. - * @property proxy The RPC proxy. - */ -@Component -open class NodeRPCConnection( - @Value("\${$CACTUS_CORDA_NODE_HOST}") private val host: String, - @Value("\${$CACTUS_CORDA_RPC_USERNAME}") private val username: String, - @Value("\${$CACTUS_CORDA_RPC_PASSWORD}") private val password: String, - @Value("\${$CACTUS_CORDA_RPC_PORT}") private val rpcPort: Int - ): AutoCloseable { - - final lateinit var rpcConnection: CordaRPCConnection - private set - final lateinit var proxy: CordaRPCOps - private set - - companion object { - val logger = loggerFor(); - } - - @PostConstruct - fun initialiseNodeRPCConnection() { - val rpcAddress = NetworkHostAndPort(host, rpcPort) - val rpcClient = CordaRPCClient(haAddressPool = listOf(rpcAddress)) - - var numReconnects = 0 - val gracefulReconnect = GracefulReconnect( - onDisconnect={ logger.info("GracefulReconnect:onDisconnect()")}, - onReconnect={ logger.info("GracefulReconnect:onReconnect() #${++numReconnects}")}, - maxAttempts = 30 - ) - - // this workaround here is due to the Graceful Reconnect above not actually doing what it's supposed to - // either because it has a bug or because I misread the documentation. - // So this manual retry on top of the graceful reconnects is to make it resilient - var tryIntervalSec = 2 - var numberOfTriesRemaining = 5 - while (numberOfTriesRemaining > 0) { - numberOfTriesRemaining-- - try { - logger.info("Trying to connect to RPC numberOfTriesRemaining=$numberOfTriesRemaining") - rpcConnection = rpcClient.start(username, password, gracefulReconnect = gracefulReconnect) - runBlocking { - val tryIntervalDuration = tryIntervalSec.toDuration(DurationUnit.SECONDS) - delay(tryIntervalDuration) - tryIntervalSec *= 2 - } - break; - } catch (ex: net.corda.client.rpc.RPCException) { - logger.info("ManualReconnect:numberOfTriesRemaining=$numberOfTriesRemaining") - if (numberOfTriesRemaining <= 0) { - throw ex - } - } - } - - proxy = rpcConnection.proxy - } - - @PreDestroy - override fun close() { - rpcConnection.notifyServerAndClose() - } - - fun gracefulShutdown() { - logger.debug(("Beginning graceful shutdown...")) - val latch = CountDownLatch(1) - @Suppress("DEPRECATION") - val subscription = proxy.pendingFlowsCount().updates - .doAfterTerminate(latch::countDown) - .subscribe( - // For each update. - { (completed, total) -> logger.info("...remaining flows: $completed / $total") }, - // On error. - { - logger.error(it.message) - throw it - }, - // When completed. - { - // This will only show up in the standalone Shell, because the embedded one - // is killed as part of a node's shutdown. - logger.info("...done shutting down gracefully.") - } - ) - proxy.terminate(true) - latch.await() - logger.debug("Concluded graceful shutdown OK") - // Unsubscribe or we hold up the shutdown - subscription.unsubscribe() - rpcConnection.forceClose() - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/PublicKeyImpl.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/PublicKeyImpl.kt deleted file mode 100644 index a4cc6f1100..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/PublicKeyImpl.kt +++ /dev/null @@ -1,45 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl - -import java.security.PublicKey -import java.util.* - -data class PublicKeyImpl( - private val _algorithm: String, - private val _format: String, - private val _base64Value: String -) : PublicKey { - - private var _byteArray: ByteArray = Base64.getDecoder().decode(_base64Value); - - override fun getAlgorithm(): String { - return _algorithm - } - - override fun getFormat(): String { - return _format - } - - override fun getEncoded(): ByteArray { - return _byteArray - } - - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (javaClass != other?.javaClass) return false - - other as PublicKeyImpl - - if (_algorithm != other._algorithm) return false - if (_format != other._format) return false - if (!_byteArray.contentEquals(other._byteArray)) return false - - return true - } - - override fun hashCode(): Int { - var result = _algorithm.hashCode() - result = 31 * result + _format.hashCode() - result = 31 * result + _byteArray.contentHashCode() - return result - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/StateMonitorClientSession.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/StateMonitorClientSession.kt deleted file mode 100644 index 94095b1c76..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/StateMonitorClientSession.kt +++ /dev/null @@ -1,144 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl - -import net.corda.core.contracts.ContractState -import net.corda.core.node.services.Vault -import net.corda.core.node.services.vault.DEFAULT_PAGE_NUM -import net.corda.core.node.services.vault.PageSpecification -import net.corda.core.node.services.vault.QueryCriteria -import net.corda.core.utilities.loggerFor -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1ResponseTxInner -import rx.Subscription -import java.math.BigInteger -import java.time.LocalDateTime -import jakarta.annotation.PreDestroy - -/** - * Monitoring session for single client, can track multiple state changes. - * - * @param rpc The Corda RPC connection - * @param sessionExpireMinutes Period after which the session will become expired - * - * @author michal.bajer@fujitsu.com - */ -class StateMonitorClientSession(private val rpc: NodeRPCConnection, private val sessionExpireMinutes: Long) : - AutoCloseable { - /** - * Simple data class for monitor reactive `subscription`, and queue of `stateChanges` received from corda - */ - private data class StateMonitor( - val stateChanges: MutableSet, - val subscription: Subscription - ) - - private val monitors = mutableMapOf() - private var sessionExpireTime = LocalDateTime.now().plusMinutes(sessionExpireMinutes) - - companion object { - val logger = loggerFor() - } - - /** - * Start monitoring of corda state changes. - * - * Changes can be later read by `getTransactions`. - * When monitoring is already running, this function does nothing. - * - * @param stateName String representation of corda state to monitor. - * @param cordaState ContractState object of state to monitor. - */ - fun startMonitor(stateName: String, cordaState: Class) { - if (monitors.containsKey(stateName)) { - logger.info("Monitoring of state {} is already running", stateName) - return - } - - val criteria = QueryCriteria.VaultQueryCriteria(status = Vault.StateStatus.UNCONSUMED) - val pagingSpec = PageSpecification(DEFAULT_PAGE_NUM, 1) - val stateUpdates = this.rpc.proxy.vaultTrackByWithPagingSpec(cordaState, criteria, pagingSpec).updates - - var indexCounter = BigInteger.valueOf(0) - val stateChanges = mutableSetOf() - val monitorSub = stateUpdates.subscribe { update -> - update.produced.forEach { change -> - val txResponse = GetMonitorTransactionsV1ResponseTxInner(indexCounter.toString(), change.toString()) - indexCounter = indexCounter.add(BigInteger.valueOf(1)) - logger.debug("Pushing new transaction for state '{}', index {}", stateName, indexCounter) - stateChanges.add(txResponse) - } - } - monitors[stateName] = StateMonitor(stateChanges, monitorSub) - logger.info("Monitoring for changes of state '{}' started.", stateName) - } - - /** - * Get transactions (state changes) from internal buffer. - * - * Throws an error if there's no monitor for specified state. Make sure startMonitor was already called first. - * - * @param stateName String representation of corda state to monitor. - * @return Set of corda state changes - */ - fun getTransactions(stateName: String): MutableSet { - if (!monitors.containsKey(stateName)) { - throw Exception("No monitor running for corda state $stateName on requested client") - } - - return monitors[stateName]?.stateChanges ?: mutableSetOf() - } - - /** - * Remove transactions with specified indexes from internal buffer. - * - * Throws an error if there's no monitor for specified state. Make sure startMonitor was already called first. - * - * @param stateName String representation of corda state to monitor. - * @param indexesToRemove List of string indexes of transactions to remove. - */ - fun clearTransactions(stateName: String, indexesToRemove: List) { - val transactions = this.getTransactions(stateName) - logger.debug("Transactions before remove: {}", transactions.size) - transactions.removeAll { it.index in indexesToRemove } - logger.debug("Transactions after remove: {}", transactions.size) - } - - /** - * Stop monitoring of corda state changes. - * - * Clears the transactions that were not read yet. - * When there is no monitor running for specified state, it does nothing. - * - * @param stateName String representation of corda state to monitor. - */ - fun stopMonitor(stateName: String) { - monitors[stateName]?.subscription?.unsubscribe() - monitors.remove(stateName) - logger.info("Monitoring for state '{}' stopped.", stateName) - } - - /** - * Removes all active monitors from this session - */ - @PreDestroy - override fun close() { - monitors.forEach { it.value.subscription.unsubscribe() } - monitors.clear() - } - - /** - * Increase time until this session is marked as expired. - * Make sure to call from time to time when the session is still in use. - */ - fun refreshExpireTime() { - this.sessionExpireTime = LocalDateTime.now().plusMinutes(sessionExpireMinutes) - } - - /** - * Return true if this session is expired - */ - fun isExpired() = LocalDateTime.now().isAfter(sessionExpireTime) - - /** - * Return true if there are active monitors in this session - */ - fun hasMonitorRunning() = monitors.isNotEmpty() -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/StateMonitorSessionsManager.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/StateMonitorSessionsManager.kt deleted file mode 100644 index 68612be09e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/StateMonitorSessionsManager.kt +++ /dev/null @@ -1,94 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl - -import net.corda.core.utilities.loggerFor -import org.springframework.beans.factory.annotation.Value -import org.springframework.scheduling.annotation.Scheduled -import org.springframework.stereotype.Component -import jakarta.annotation.PreDestroy - -private const val SessionExpireMinutes = "cactus.sessionExpireMinutes" -private const val SessionExpireMinutesDefault = "30" -private const val SessionExpireCheckInterval: Long = 60 * 1000 // every minute - -/** - * Client session manager for corda state monitoring. - * - * Manages monitoring session for each client calling this connector. - * Endpoint handlers can use withClient function to execute monitoring-session code in context of particular client. - * Sessions of clients who do not perform any operation for specified amount of time (cactus.sessionExpireMinutes) are removed periodically. - * - * @param sessionExpireMinutes How long to wait for action until removing the client session (config: cactus.sessionExpireMinutes) - * @param rpc The Corda RPC connection - * - * @property clientSessions Map of client sessions. Should not be accessed directly - it's public only because `withClient` is inlined in caller code. - * - * @author michal.bajer@fujitsu.com - */ -@Component -class StateMonitorSessionsManager( - @Value("\${$SessionExpireMinutes:${SessionExpireMinutesDefault}}") val sessionExpireMinutes: Long, - val rpc: NodeRPCConnection -) : AutoCloseable { - companion object { - val logger = loggerFor() - } - - val clientSessions = mutableMapOf() - - /** - * Remove all client sessions that has no state monitors running or are expired (there was no action on them for some time) - * - * It's executed periodically by the framework, but can be run manually as well when needed. - * Polling period taken from const `$SessionExpireCheckInterval` - */ - @Scheduled(fixedDelay = SessionExpireCheckInterval) - fun cleanInvalidClientSessions() { - synchronized (this.clientSessions) { - logger.info("Remove all invalid client sessions. Before - {}", clientSessions.size) - clientSessions.entries.removeAll { !it.value.hasMonitorRunning() || it.value.isExpired() } - logger.info("Remove all invalid client sessions. After - {}", clientSessions.size) - } - } - - /** - * Remove all running client monitors. - */ - @PreDestroy - override fun close() { - logger.info("StateMonitorQueuesManager close - stop all running monitors.") - clientSessions.forEach { it.value.close() } - } - - /** - * Run StateMonitorClientSession functions in specified client session context. - * - * When client with specified ID is not found, then new client session is created. - * Function is inlined in callers code, it's possible to return values from this block. - * After each call the access time for given client is refreshed. - * If client has no running monitors after the user-defined block, then it's session is removed. - * - * @param clientAppId string representation of client ID - * @param block lambda function to be executed in given client session context - */ - final inline fun withClient(clientAppId: String, block: StateMonitorClientSession.() -> T): T { - synchronized (this.clientSessions) { - // Get client session and update it's expire time - val clientSession = - this.clientSessions - .getOrPut(clientAppId) { StateMonitorClientSession(rpc, sessionExpireMinutes) } - .also { it.refreshExpireTime() } - - // Run the caller logic on specific client session - val results = clientSession.block() - logger.debug("Monitor withClient block response: {}", results) - - // Check if client session still valid - if (!clientSession.hasMonitorRunning()) { - logger.info("Client session {} not valid anymore - remove.", clientAppId) - this.clientSessions.remove(clientAppId) - } - - return results - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CPIIDV1.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CPIIDV1.kt deleted file mode 100644 index 2e7171ff64..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CPIIDV1.kt +++ /dev/null @@ -1,30 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param name - * @param version - * @param signerSummaryHash - */ -data class CPIIDV1( - - @get:JsonProperty("name", required = true) val name: kotlin.String, - - @get:JsonProperty("version", required = true) val version: kotlin.String, - - @get:JsonProperty("signerSummaryHash") val signerSummaryHash: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Request.kt deleted file mode 100644 index bebd7e96bf..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Request.kt +++ /dev/null @@ -1,32 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param clientAppId ID of a client application that wants to monitor the state changes - * @param stateFullClassName The fully qualified name of the Corda state to monitor - * @param txIndexes - */ -data class ClearMonitorTransactionsV1Request( - - @get:Size(min=1,max=1024) - @get:JsonProperty("clientAppId", required = true) val clientAppId: kotlin.String, - - @get:Size(min=1,max=1024) - @get:JsonProperty("stateFullClassName", required = true) val stateFullClassName: kotlin.String, - - @get:JsonProperty("txIndexes", required = true) val txIndexes: kotlin.collections.List = arrayListOf() -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Response.kt deleted file mode 100644 index f435606cb2..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Response.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param success Flag set to true if operation completed correctly. - * @param msg Message describing operation status or any errors that occurred. - */ -data class ClearMonitorTransactionsV1Response( - - @get:JsonProperty("success", required = true) val success: kotlin.Boolean, - - @get:JsonProperty("msg", required = true) val msg: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaNodeSshCredentials.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaNodeSshCredentials.kt deleted file mode 100644 index 7a0e3c2aaf..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaNodeSshCredentials.kt +++ /dev/null @@ -1,42 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param hostKeyEntry - * @param username - * @param password - * @param hostname - * @param port - */ -data class CordaNodeSshCredentials( - - @get:Size(min=1,max=65535) - @get:JsonProperty("hostKeyEntry", required = true) val hostKeyEntry: kotlin.String, - - @get:Size(min=1,max=32) - @get:JsonProperty("username", required = true) val username: kotlin.String, - - @get:Size(min=1,max=4096) - @get:JsonProperty("password", required = true) val password: kotlin.String, - - @get:Size(min=1,max=4096) - @get:JsonProperty("hostname", required = true) val hostname: kotlin.String, - - @get:Min(1) - @get:Max(65535) - @get:JsonProperty("port", required = true) val port: kotlin.Int -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaRpcCredentials.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaRpcCredentials.kt deleted file mode 100644 index 9f852bf286..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaRpcCredentials.kt +++ /dev/null @@ -1,38 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param hostname - * @param port - * @param username - * @param password - */ -data class CordaRpcCredentials( - - @get:Size(min=1,max=65535) - @get:JsonProperty("hostname", required = true) val hostname: kotlin.String, - - @get:Min(1) - @get:Max(65535) - @get:JsonProperty("port", required = true) val port: kotlin.Int, - - @get:Size(min=1,max=1024) - @get:JsonProperty("username", required = true) val username: kotlin.String, - - @get:Size(min=1,max=65535) - @get:JsonProperty("password", required = true) val password: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaX500Name.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaX500Name.kt deleted file mode 100644 index 9e429e1f51..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaX500Name.kt +++ /dev/null @@ -1,44 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.X500Principal -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param organisation - * @param locality - * @param country - * @param x500Principal - * @param commonName - * @param organisationUnit - * @param state - */ -data class CordaX500Name( - - @get:JsonProperty("organisation", required = true) val organisation: kotlin.String, - - @get:JsonProperty("locality", required = true) val locality: kotlin.String, - - @get:JsonProperty("country", required = true) val country: kotlin.String, - - @field:Valid - @get:JsonProperty("x500Principal", required = true) val x500Principal: X500Principal, - - @get:JsonProperty("commonName") val commonName: kotlin.String? = null, - - @get:JsonProperty("organisationUnit") val organisationUnit: kotlin.String? = null, - - @get:JsonProperty("state") val state: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappDeploymentConfig.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappDeploymentConfig.kt deleted file mode 100644 index 88b4022e0a..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappDeploymentConfig.kt +++ /dev/null @@ -1,47 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.CordaNodeSshCredentials -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.CordaRpcCredentials -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param sshCredentials - * @param rpcCredentials - * @param cordaNodeStartCmd The shell command to execute in order to start back up a Corda node after having placed new jars in the cordapp directory of said node. - * @param cordappDir The absolute file system path where the Corda Node is expecting deployed Cordapp jar files to be placed. - * @param cordaJarPath The absolute file system path where the corda.jar file of the node can be found. This is used to execute database schema migrations where applicable (H2 database in use in development environments). - * @param nodeBaseDirPath The absolute file system path where the base directory of the Corda node can be found. This is used to pass in to corda.jar when being invoked for certain tasks such as executing database schema migrations for a deployed contract. - */ -data class CordappDeploymentConfig( - - @field:Valid - @get:JsonProperty("sshCredentials", required = true) val sshCredentials: CordaNodeSshCredentials, - - @field:Valid - @get:JsonProperty("rpcCredentials", required = true) val rpcCredentials: CordaRpcCredentials, - - @get:Size(min=1,max=65535) - @get:JsonProperty("cordaNodeStartCmd", required = true) val cordaNodeStartCmd: kotlin.String, - - @get:Size(min=1,max=2048) - @get:JsonProperty("cordappDir", required = true) val cordappDir: kotlin.String, - - @get:Size(min=1,max=2048) - @get:JsonProperty("cordaJarPath", required = true) val cordaJarPath: kotlin.String, - - @get:Size(min=1,max=2048) - @get:JsonProperty("nodeBaseDirPath", required = true) val nodeBaseDirPath: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappInfo.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappInfo.kt deleted file mode 100644 index 738d8cac90..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappInfo.kt +++ /dev/null @@ -1,50 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.SHA256 -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * A CordappInfo describes a single CorDapp currently installed on the node - * @param jarHash - * @param licence The name of the licence this CorDapp is released under - * @param minimumPlatformVersion The minimum platform version the node must be at for the CorDapp to run - * @param name The name of the JAR file that defines the CorDapp - * @param shortName The name of the CorDapp - * @param targetPlatformVersion The target platform version this CorDapp has been tested against - * @param type A description of what sort of CorDapp this is - either a contract, workflow, or a combination. - * @param vendor The vendor of this CorDapp - * @param version The version of this CorDapp - */ -data class CordappInfo( - - @field:Valid - @get:JsonProperty("jarHash", required = true) val jarHash: SHA256, - - @get:JsonProperty("licence", required = true) val licence: kotlin.String, - - @get:JsonProperty("minimumPlatformVersion", required = true) val minimumPlatformVersion: kotlin.Int, - - @get:JsonProperty("name", required = true) val name: kotlin.String, - - @get:JsonProperty("shortName", required = true) val shortName: kotlin.String, - - @get:JsonProperty("targetPlatformVersion", required = true) val targetPlatformVersion: kotlin.Int, - - @get:JsonProperty("type", required = true) val type: kotlin.String, - - @get:JsonProperty("vendor", required = true) val vendor: kotlin.String, - - @get:JsonProperty("version", required = true) val version: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsBadRequestV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsBadRequestV1Response.kt deleted file mode 100644 index 0835a699f8..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsBadRequestV1Response.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param errors - */ -data class DeployContractJarsBadRequestV1Response( - - @get:JsonProperty("errors", required = true) val errors: kotlin.collections.List -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsSuccessV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsSuccessV1Response.kt deleted file mode 100644 index 55f96b68c0..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsSuccessV1Response.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param deployedJarFiles - */ -data class DeployContractJarsSuccessV1Response( - - @get:JsonProperty("deployedJarFiles", required = true) val deployedJarFiles: kotlin.collections.List -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsV1Request.kt deleted file mode 100644 index f99ef6793d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsV1Request.kt +++ /dev/null @@ -1,31 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.CordappDeploymentConfig -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.JarFile -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param cordappDeploymentConfigs The list of deployment configurations pointing to the nodes where the provided cordapp jar files are to be deployed . - * @param jarFiles - */ -data class DeployContractJarsV1Request( - - @field:Valid - @get:JsonProperty("cordappDeploymentConfigs", required = true) val cordappDeploymentConfigs: kotlin.collections.List = arrayListOf(), - - @field:Valid - @get:JsonProperty("jarFiles", required = true) val jarFiles: kotlin.collections.List -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Request.kt deleted file mode 100644 index 8689169608..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Request.kt +++ /dev/null @@ -1,25 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param nodeIds Optional property specifying which Corda Node should be the one being diagnosed in case the Connector has multiple connections established for different nodes (which is not yet a supported feature, but we want to keep this possibility open for the future). - */ -data class DiagnoseNodeV1Request( - - @get:Size(min=0,max=1024) - @get:JsonProperty("nodeIds") val nodeIds: kotlin.collections.List? = arrayListOf() -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Response.kt deleted file mode 100644 index f2882bf68e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Response.kt +++ /dev/null @@ -1,26 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.NodeDiagnosticInfo -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param nodeDiagnosticInfo - */ -data class DiagnoseNodeV1Response( - - @field:Valid - @get:JsonProperty("nodeDiagnosticInfo", required = true) val nodeDiagnosticInfo: NodeDiagnosticInfo -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowInvocationType.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowInvocationType.kt deleted file mode 100644 index eef42f04ec..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowInvocationType.kt +++ /dev/null @@ -1,25 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonValue -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** -* Determines which flow starting method will be used on the back-end when invoking the flow. Based on the value here the plugin back-end might invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() method. Streamed responses are aggregated and returned in a single response to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. do. -* Values: TRACKED_FLOW_DYNAMIC,FLOW_DYNAMIC -*/ -enum class FlowInvocationType(val value: kotlin.String) { - - @JsonProperty("TRACKED_FLOW_DYNAMIC") TRACKED_FLOW_DYNAMIC("TRACKED_FLOW_DYNAMIC"), - @JsonProperty("FLOW_DYNAMIC") FLOW_DYNAMIC("FLOW_DYNAMIC") -} - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1Responses.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1Responses.kt deleted file mode 100644 index 10f256de80..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1Responses.kt +++ /dev/null @@ -1,26 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowStatusV1ResponsesFlowStatusResponsesInner -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param flowStatusResponses - */ -data class FlowStatusV1Responses( - - @field:Valid - @get:JsonProperty("flowStatusResponses") val flowStatusResponses: kotlin.collections.List? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1ResponsesFlowStatusResponsesInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1ResponsesFlowStatusResponsesInner.kt deleted file mode 100644 index bbecc6b24d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1ResponsesFlowStatusResponsesInner.kt +++ /dev/null @@ -1,44 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowV1Error -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param clientRequestId - * @param flowError - * @param flowId - * @param flowResult - * @param flowStatus - * @param holdingIDShortHash - * @param timestamp - */ -data class FlowStatusV1ResponsesFlowStatusResponsesInner( - - @get:JsonProperty("clientRequestId") val clientRequestId: kotlin.String? = null, - - @field:Valid - @get:JsonProperty("flowError") val flowError: FlowV1Error? = null, - - @get:JsonProperty("flowId") val flowId: kotlin.String? = null, - - @get:JsonProperty("flowResult") val flowResult: kotlin.String? = null, - - @get:JsonProperty("flowStatus") val flowStatus: kotlin.String? = null, - - @get:JsonProperty("holdingIDShortHash") val holdingIDShortHash: kotlin.String? = null, - - @get:JsonProperty("timestamp") val timestamp: java.time.OffsetDateTime? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowV1Error.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowV1Error.kt deleted file mode 100644 index 3433ce5b63..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowV1Error.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param message - * @param type - */ -data class FlowV1Error( - - @get:JsonProperty("message", required = true) val message: kotlin.String, - - @get:JsonProperty("type", required = true) val type: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Request.kt deleted file mode 100644 index f5156c7fff..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Request.kt +++ /dev/null @@ -1,36 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * This method gets the current status of the specified flow instance. - * @param username - * @param password - * @param rejectUnauthorized - * @param holdingIDShortHash - * @param clientRequestId - */ -data class GetFlowCidV1Request( - - @get:JsonProperty("username", required = true) val username: kotlin.String, - - @get:JsonProperty("password", required = true) val password: kotlin.String, - - @get:JsonProperty("rejectUnauthorized", required = true) val rejectUnauthorized: kotlin.Boolean, - - @get:JsonProperty("holdingIDShortHash") val holdingIDShortHash: kotlin.String? = null, - - @get:JsonProperty("clientRequestId") val clientRequestId: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Response.kt deleted file mode 100644 index 5a884fdd8c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Response.kt +++ /dev/null @@ -1,44 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowV1Error -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param flowStatus - * @param holdingIDShortHash - * @param timestamp - * @param clientRequestId - * @param flowError - * @param flowId - * @param flowResult - */ -data class GetFlowCidV1Response( - - @get:JsonProperty("flowStatus", required = true) val flowStatus: kotlin.String, - - @get:JsonProperty("holdingIDShortHash", required = true) val holdingIDShortHash: kotlin.String, - - @get:JsonProperty("timestamp", required = true) val timestamp: java.time.OffsetDateTime, - - @get:JsonProperty("clientRequestId") val clientRequestId: kotlin.String? = null, - - @field:Valid - @get:JsonProperty("flowError") val flowError: FlowV1Error? = null, - - @get:JsonProperty("flowId") val flowId: kotlin.String? = null, - - @get:JsonProperty("flowResult") val flowResult: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Request.kt deleted file mode 100644 index 970fbebcf1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Request.kt +++ /dev/null @@ -1,29 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param clientAppId ID of a client application that wants to monitor the state changes - * @param stateFullClassName The fully qualified name of the Corda state to monitor - */ -data class GetMonitorTransactionsV1Request( - - @get:Size(min=1,max=1024) - @get:JsonProperty("clientAppId", required = true) val clientAppId: kotlin.String, - - @get:Size(min=1,max=1024) - @get:JsonProperty("stateFullClassName", required = true) val stateFullClassName: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Response.kt deleted file mode 100644 index 4274f8f0e8..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Response.kt +++ /dev/null @@ -1,36 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1ResponseTxInner -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param success Flag set to true if operation completed correctly. - * @param msg Message describing operation status or any errors that occurred. - * @param stateFullClassName The fully qualified name of the Corda state to monitor - * @param tx - */ -data class GetMonitorTransactionsV1Response( - - @get:JsonProperty("success", required = true) val success: kotlin.Boolean, - - @get:JsonProperty("msg", required = true) val msg: kotlin.String, - - @get:Size(min=1,max=1024) - @get:JsonProperty("stateFullClassName") val stateFullClassName: kotlin.String? = null, - - @field:Valid - @get:JsonProperty("tx") val tx: kotlin.collections.List? = arrayListOf() -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1ResponseTxInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1ResponseTxInner.kt deleted file mode 100644 index 1c00b2c938..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1ResponseTxInner.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param index - * @param `data` - */ -data class GetMonitorTransactionsV1ResponseTxInner( - - @get:JsonProperty("index") val index: kotlin.String? = null, - - @get:JsonProperty("data") val `data`: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Request.kt deleted file mode 100644 index 376bcebdba..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Request.kt +++ /dev/null @@ -1,40 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.annotation.JsonValue -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowInvocationType -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.JvmObject -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param flowFullClassName The fully qualified name of the Corda flow to invoke - * @param flowInvocationType - * @param params The list of arguments to pass in to the contract method being invoked. - * @param timeoutMs The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. - */ -data class InvokeContractV1Request( - - @get:Size(min=1,max=1024) - @get:JsonProperty("flowFullClassName", required = true) val flowFullClassName: kotlin.String, - - @field:Valid - @get:JsonProperty("flowInvocationType", required = true) val flowInvocationType: FlowInvocationType, - - @field:Valid - @get:JsonProperty("params", required = true) val params: kotlin.collections.List = arrayListOf(), - - @get:Min(0) - @get:JsonProperty("timeoutMs") val timeoutMs: kotlin.Int? = 60000 -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Response.kt deleted file mode 100644 index b80ad21f3e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Response.kt +++ /dev/null @@ -1,38 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param success - * @param callOutput Data returned from the JVM when no transaction is running - * @param flowId The id for the flow handle - * @param transactionId The net.corda.core.flows.StateMachineRunId value returned by the flow execution. - * @param progress An array of strings representing the aggregated stream of progress updates provided by a *tracked* flow invocation. If the flow invocation was not tracked, this array is still returned, but as empty. - */ -data class InvokeContractV1Response( - - @get:JsonProperty("success", required = true) val success: kotlin.Boolean, - - @field:Valid - @get:JsonProperty("callOutput", required = true) val callOutput: kotlin.Any, - - @get:JsonProperty("flowId", required = true) val flowId: kotlin.String, - - @get:Size(min=1,max=1024) - @get:JsonProperty("transactionId") val transactionId: kotlin.String? = null, - - @get:JsonProperty("progress") val progress: kotlin.collections.List? = arrayListOf() -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JarFile.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JarFile.kt deleted file mode 100644 index f3a757715c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JarFile.kt +++ /dev/null @@ -1,32 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param filename - * @param hasDbMigrations Indicates whether the cordapp jar in question contains any embedded migrations that Cactus can/should execute between copying the jar into the cordapp directory and starting the node back up. - * @param contentBase64 - */ -data class JarFile( - - @get:Size(min=1,max=255) - @get:JsonProperty("filename", required = true) val filename: kotlin.String, - - @get:JsonProperty("hasDbMigrations", required = true) val hasDbMigrations: kotlin.Boolean, - - @get:Size(min=1,max=1073741824) - @get:JsonProperty("contentBase64", required = true) val contentBase64: kotlin.String -) : kotlin.collections.HashMap() { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmObject.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmObject.kt deleted file mode 100644 index bcb31caeb1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmObject.kt +++ /dev/null @@ -1,40 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import com.fasterxml.jackson.annotation.JsonValue -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.JvmType -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.JvmTypeKind -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * Can represent JVM primitive and reference types as well. The jvmTypeKind field indicates which one is being stored. If the jvmTypeKind field is set to REFERENCE then the jvmCtorArgs array is expected to be filled, otherwise (e.g. PRIMITIVE jvmTypeKind) it is expected that the primitiveValue property is filled with a primitive data type supported by the JSON standard such as strings, booleans, numbers, etc. - * @param jvmTypeKind - * @param jvmType - * @param primitiveValue - * @param jvmCtorArgs - */ -data class JvmObject( - - @field:Valid - @get:JsonProperty("jvmTypeKind", required = true) val jvmTypeKind: JvmTypeKind, - - @field:Valid - @get:JsonProperty("jvmType", required = true) val jvmType: JvmType, - - @field:Valid - @get:JsonProperty("primitiveValue") val primitiveValue: kotlin.Any? = null, - - @field:Valid - @get:JsonProperty("jvmCtorArgs") val jvmCtorArgs: kotlin.collections.List? = arrayListOf() -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmType.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmType.kt deleted file mode 100644 index 1e0919bb4b..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmType.kt +++ /dev/null @@ -1,34 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.JvmObject -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * Represents a reference to a JVM type (such as a Java class) - * @param fqClassName - * @param constructorName This parameter is used to specify that the function used to construct this JvmType is not a constructor function but instead is a factory function. Setting this parameter will cause the plugin to look up methods of the class denoted by fqClassName instead of its constructors. - * @param invocationTarget - */ -data class JvmType( - - @get:Size(min=1,max=65535) - @get:JsonProperty("fqClassName", required = true) val fqClassName: kotlin.String, - - @get:Size(min=1,max=65535) - @get:JsonProperty("constructorName") val constructorName: kotlin.String? = null, - - @field:Valid - @get:JsonProperty("invocationTarget") val invocationTarget: JvmObject? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmTypeKind.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmTypeKind.kt deleted file mode 100644 index 1be2461e04..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmTypeKind.kt +++ /dev/null @@ -1,25 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonValue -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** -* -* Values: PRIMITIVE,REFERENCE -*/ -enum class JvmTypeKind(val value: kotlin.String) { - - @JsonProperty("PRIMITIVE") PRIMITIVE("PRIMITIVE"), - @JsonProperty("REFERENCE") REFERENCE("REFERENCE") -} - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Request.kt deleted file mode 100644 index 4bb5669f48..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Request.kt +++ /dev/null @@ -1,30 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param username - * @param password - * @param rejectUnauthorized - */ -data class ListCpiV1Request( - - @get:JsonProperty("username", required = true) val username: kotlin.String, - - @get:JsonProperty("password", required = true) val password: kotlin.String, - - @get:JsonProperty("rejectUnauthorized", required = true) val rejectUnauthorized: kotlin.Boolean -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Response.kt deleted file mode 100644 index 29cb9e163e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Response.kt +++ /dev/null @@ -1,26 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1ResponseCpisInner -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param cpis - */ -data class ListCpiV1Response( - - @field:Valid - @get:JsonProperty("cpis") val cpis: kotlin.collections.List? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInner.kt deleted file mode 100644 index 0d8c291817..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInner.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.CPIIDV1 -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1ResponseCpisInnerCpksInner -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param cpiFileChecksum - * @param cpiFileFullChecksum - * @param cpks - * @param groupPolicy - * @param id - * @param timestamp - */ -data class ListCpiV1ResponseCpisInner( - - @get:JsonProperty("cpiFileChecksum") val cpiFileChecksum: kotlin.String? = null, - - @get:JsonProperty("cpiFileFullChecksum") val cpiFileFullChecksum: kotlin.String? = null, - - @field:Valid - @get:JsonProperty("cpks") val cpks: kotlin.collections.List? = null, - - @get:JsonProperty("groupPolicy") val groupPolicy: kotlin.String? = null, - - @field:Valid - @get:JsonProperty("id") val id: CPIIDV1? = null, - - @get:JsonProperty("timestamp") val timestamp: java.time.OffsetDateTime? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInnerCpksInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInnerCpksInner.kt deleted file mode 100644 index 34e91309fb..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInnerCpksInner.kt +++ /dev/null @@ -1,41 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.CPIIDV1 -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param hash - * @param id - * @param libraries - * @param mainBundle - * @param timestamp - * @param type - */ -data class ListCpiV1ResponseCpisInnerCpksInner( - - @get:JsonProperty("hash") val hash: kotlin.String? = null, - - @field:Valid - @get:JsonProperty("id") val id: CPIIDV1? = null, - - @get:JsonProperty("libraries") val libraries: kotlin.collections.List? = null, - - @get:JsonProperty("mainBundle") val mainBundle: kotlin.String? = null, - - @get:JsonProperty("timestamp") val timestamp: java.time.OffsetDateTime? = null, - - @get:JsonProperty("type") val type: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Request.kt deleted file mode 100644 index 4c8c2f836c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Request.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param filter - */ -data class ListFlowsV1Request( - - @get:JsonProperty("filter") val filter: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Response.kt deleted file mode 100644 index 1e963b1887..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Response.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param flowNames An array of strings storing the names of the flows as returned by the flowList Corda RPC. - */ -data class ListFlowsV1Response( - - @get:JsonProperty("flowNames", required = true) val flowNames: kotlin.collections.List = arrayListOf() -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NetworkHostAndPort.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NetworkHostAndPort.kt deleted file mode 100644 index c0bff400c1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NetworkHostAndPort.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param host - * @param port - */ -data class NetworkHostAndPort( - - @get:JsonProperty("host", required = true) val host: kotlin.String, - - @get:JsonProperty("port", required = true) val port: java.math.BigDecimal -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeDiagnosticInfo.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeDiagnosticInfo.kt deleted file mode 100644 index 77eba1ac3c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeDiagnosticInfo.kt +++ /dev/null @@ -1,39 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.CordappInfo -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * A NodeDiagnosticInfo holds information about the current node version. - * @param cordapps A list of CorDapps currently installed on this node - * @param platformVersion The platform version of this node. This number represents a released API version, and should be used to make functionality decisions (e.g. enabling an app feature only if an underlying platform feature exists) - * @param revision The git commit hash this node was built from - * @param vendor The vendor of this node - * @param version The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note that this string is effectively freeform, and so should only be used for providing diagnostic information. It should not be used to make functionality decisions (the platformVersion is a better fit for this). - */ -data class NodeDiagnosticInfo( - - @field:Valid - @get:Size(min=0,max=4096) - @get:JsonProperty("cordapps", required = true) val cordapps: kotlin.collections.List, - - @get:JsonProperty("platformVersion", required = true) val platformVersion: kotlin.Int, - - @get:JsonProperty("revision", required = true) val revision: kotlin.String, - - @get:JsonProperty("vendor", required = true) val vendor: kotlin.String, - - @get:JsonProperty("version", required = true) val version: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeInfo.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeInfo.kt deleted file mode 100644 index c822eb1877..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeInfo.kt +++ /dev/null @@ -1,41 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.NetworkHostAndPort -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.Party -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param addresses - * @param platformVersion - * @param serial - * @param legalIdentities - * @param legalIdentitiesAndCerts - */ -data class NodeInfo( - - @field:Valid - @get:JsonProperty("addresses", required = true) val addresses: kotlin.collections.List, - - @get:JsonProperty("platformVersion", required = true) val platformVersion: kotlin.Int, - - @get:JsonProperty("serial", required = true) val serial: java.math.BigDecimal, - - @field:Valid - @get:JsonProperty("legalIdentities", required = true) val legalIdentities: kotlin.collections.List, - - @field:Valid - @get:JsonProperty("legalIdentitiesAndCerts", required = true) val legalIdentitiesAndCerts: kotlin.collections.List -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/Party.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/Party.kt deleted file mode 100644 index 972dc97317..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/Party.kt +++ /dev/null @@ -1,31 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.CordaX500Name -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.PublicKey -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param name - * @param owningKey - */ -data class Party( - - @field:Valid - @get:JsonProperty("name", required = true) val name: CordaX500Name, - - @field:Valid - @get:JsonProperty("owningKey", required = true) val owningKey: PublicKey -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/PublicKey.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/PublicKey.kt deleted file mode 100644 index d373dedce5..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/PublicKey.kt +++ /dev/null @@ -1,30 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * An instance of a java.security.PublicKey (which is an interface) implementation such as org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl - * @param algorithm - * @param format - * @param encoded - */ -data class PublicKey( - - @get:JsonProperty("algorithm", required = true) val algorithm: kotlin.String, - - @get:JsonProperty("format", required = true) val format: kotlin.String, - - @get:JsonProperty("encoded", required = true) val encoded: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/SHA256.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/SHA256.kt deleted file mode 100644 index fb1de54dbb..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/SHA256.kt +++ /dev/null @@ -1,30 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * SHA-256 is part of the SHA-2 hash function family. Generated hash is fixed size, 256-bits (32-bytes). - * @param bytes - * @param offset - * @param propertySize - */ -data class SHA256( - - @get:JsonProperty("bytes", required = true) val bytes: kotlin.String, - - @get:JsonProperty("offset", required = true) val offset: kotlin.Int, - - @get:JsonProperty("size", required = true) val propertySize: kotlin.Int -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Request.kt deleted file mode 100644 index d164e8a01e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Request.kt +++ /dev/null @@ -1,44 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartFlowV1RequestRequestBody -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * This method starts a new instance for the specified flow for the specified holding identity. - * @param username - * @param password - * @param rejectUnauthorized - * @param clientRequestId - * @param flowClassName - * @param requestBody - * @param holdingIDShortHash - */ -data class StartFlowV1Request( - - @get:JsonProperty("username", required = true) val username: kotlin.String, - - @get:JsonProperty("password", required = true) val password: kotlin.String, - - @get:JsonProperty("rejectUnauthorized", required = true) val rejectUnauthorized: kotlin.Boolean, - - @get:JsonProperty("clientRequestId", required = true) val clientRequestId: kotlin.String, - - @get:JsonProperty("flowClassName", required = true) val flowClassName: kotlin.String, - - @field:Valid - @get:JsonProperty("requestBody", required = true) val requestBody: StartFlowV1RequestRequestBody, - - @get:JsonProperty("holdingIDShortHash") val holdingIDShortHash: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1RequestRequestBody.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1RequestRequestBody.kt deleted file mode 100644 index 1ff348e505..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1RequestRequestBody.kt +++ /dev/null @@ -1,33 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param chatName - * @param otherMember - * @param message - * @param numberOfRecords - */ -data class StartFlowV1RequestRequestBody( - - @get:JsonProperty("chatName") val chatName: kotlin.String? = null, - - @get:JsonProperty("otherMember") val otherMember: kotlin.String? = null, - - @get:JsonProperty("message") val message: kotlin.String? = null, - - @get:JsonProperty("numberOfRecords") val numberOfRecords: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Response.kt deleted file mode 100644 index 7334382294..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Response.kt +++ /dev/null @@ -1,44 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowV1Error -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param flowStatus - * @param holdingIDShortHash - * @param timestamp - * @param clientRequestId - * @param flowError - * @param flowId - * @param flowResult - */ -data class StartFlowV1Response( - - @get:JsonProperty("flowStatus", required = true) val flowStatus: kotlin.String, - - @get:JsonProperty("holdingIDShortHash", required = true) val holdingIDShortHash: kotlin.String, - - @get:JsonProperty("timestamp", required = true) val timestamp: java.time.OffsetDateTime, - - @get:JsonProperty("clientRequestId") val clientRequestId: kotlin.String? = null, - - @field:Valid - @get:JsonProperty("flowError") val flowError: FlowV1Error? = null, - - @get:JsonProperty("flowId") val flowId: kotlin.String? = null, - - @get:JsonProperty("flowResult") val flowResult: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Request.kt deleted file mode 100644 index cf28717052..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Request.kt +++ /dev/null @@ -1,29 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param clientAppId ID of a client application that wants to monitor the state changes - * @param stateFullClassName The fully qualified name of the Corda state to monitor - */ -data class StartMonitorV1Request( - - @get:Size(min=1,max=1024) - @get:JsonProperty("clientAppId", required = true) val clientAppId: kotlin.String, - - @get:Size(min=1,max=1024) - @get:JsonProperty("stateFullClassName", required = true) val stateFullClassName: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Response.kt deleted file mode 100644 index c5a79e042d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Response.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param success Flag set to true if monitoring started correctly. - * @param msg Message describing operation status or any errors that occurred. - */ -data class StartMonitorV1Response( - - @get:JsonProperty("success", required = true) val success: kotlin.Boolean, - - @get:JsonProperty("msg", required = true) val msg: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Request.kt deleted file mode 100644 index c6821d462f..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Request.kt +++ /dev/null @@ -1,29 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param clientAppId ID of a client application that wants to monitor the state changes - * @param stateFullClassName The fully qualified name of the Corda state to monitor - */ -data class StopMonitorV1Request( - - @get:Size(min=1,max=1024) - @get:JsonProperty("clientAppId", required = true) val clientAppId: kotlin.String, - - @get:Size(min=1,max=1024) - @get:JsonProperty("stateFullClassName", required = true) val stateFullClassName: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Response.kt deleted file mode 100644 index c156bdaeab..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Response.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param success Flag set to true if operation completed correctly. - * @param msg Message describing operation status or any errors that occurred. - */ -data class StopMonitorV1Response( - - @get:JsonProperty("success", required = true) val success: kotlin.Boolean, - - @get:JsonProperty("msg", required = true) val msg: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/VaultQueryV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/VaultQueryV1Request.kt deleted file mode 100644 index 15adf7af16..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/VaultQueryV1Request.kt +++ /dev/null @@ -1,25 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param contractStateType Valid, fully qualified JVM class name which will be fed into Class.forName(...) - */ -data class VaultQueryV1Request( - - @get:Size(min=1) - @get:JsonProperty("contractStateType") val contractStateType: kotlin.String? = null -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/X500Principal.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/X500Principal.kt deleted file mode 100644 index 3278c037fa..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/X500Principal.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - -import java.util.Objects -import com.fasterxml.jackson.annotation.JsonProperty -import jakarta.validation.constraints.DecimalMax -import jakarta.validation.constraints.DecimalMin -import jakarta.validation.constraints.Email -import jakarta.validation.constraints.Max -import jakarta.validation.constraints.Min -import jakarta.validation.constraints.NotNull -import jakarta.validation.constraints.Pattern -import jakarta.validation.constraints.Size -import jakarta.validation.Valid - -/** - * - * @param name - * @param encoded Base64 encoded public key - */ -data class X500Principal( - - @get:JsonProperty("name", required = true) val name: kotlin.String, - - @get:JsonProperty("encoded", required = true) val encoded: kotlin.String -) { - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/application.yaml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/application.yaml deleted file mode 100644 index c421877f07..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/application.yaml +++ /dev/null @@ -1,10 +0,0 @@ -spring: - application: - name: Hyperledger Cacti - Corda V4 JVM Ledger Connector Plugin - - jackson: - serialization: - WRITE_DATES_AS_TIMESTAMPS: false - -server: - port: 8080 diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/openapi.yaml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/openapi.yaml deleted file mode 100644 index 41948d4a55..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/openapi.yaml +++ /dev/null @@ -1,1837 +0,0 @@ -openapi: 3.0.3 -info: - description: Can perform basic tasks on a Corda ledger - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cacti Plugin - Connector Corda - version: v2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars: - post: - operationId: deployContractJarsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractJarsV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractJarsSuccessV1Response' - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractJarsBadRequestV1Response' - description: Bad Request - summary: "Deploys a set of jar files (Cordapps, e.g. the contracts in Corda\ - \ speak)." - x-hyperledger-cactus: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract: - post: - operationId: invokeContractV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - summary: Invokes a contract on a Corda ledger (e.g. a flow) - x-hyperledger-cactus: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor: - post: - operationId: startMonitorV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StartMonitorV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/StartMonitorV1Response' - description: OK - summary: Start monitoring corda changes (transactions) of given state class - x-hyperledger-cactus: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions: - get: - operationId: GetMonitorTransactionsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetMonitorTransactionsV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetMonitorTransactionsV1Response' - description: OK - summary: Get transactions for monitored state classes. - x-hyperledger-cactus: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions - verbLowerCase: get - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions: - delete: - operationId: ClearMonitorTransactionsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ClearMonitorTransactionsV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ClearMonitorTransactionsV1Response' - description: OK - summary: Clear transactions from internal store so they'll not be available - by GetMonitorTransactionsV1 anymore. - x-hyperledger-cactus: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions - verbLowerCase: delete - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor: - delete: - operationId: stopMonitorV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StopMonitorV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/StopMonitorV1Response' - description: OK - summary: Stop monitoring corda changes (transactions) of given state class - x-hyperledger-cactus: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor - verbLowerCase: delete - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map: - post: - description: "Responds with a snapshot of the network map as provided by the\ - \ Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun\ - \ networkMapSnapshot(): List" - operationId: networkMapV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NetworkMapV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/NetworkMapV1Response' - description: OK - x-hyperledger-cactus: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows: - post: - description: Responds with a list of the flows on the Corda node. - operationId: listFlowsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ListFlowsV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ListFlowsV1Response' - description: OK - x-hyperledger-cactus: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node: - post: - description: Responds with diagnostic information about the Corda node - operationId: diagnoseNodeV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DiagnoseNodeV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DiagnoseNodeV1Response' - description: OK - x-hyperledger-cactus: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cactus: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/cpi: - get: - operationId: getCPIResponse - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/CPIV5Response' - description: OK - summary: List all CPIs uploaded to the cluster - x-hyperledger-cactus: - https: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/cpi - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/flow/{holdingIDShortHash}: - get: - operationId: flowStatusResponses - parameters: - - description: Holding identity short hash - explode: false - in: path - name: holdingIDShortHash - required: true - schema: - type: string - style: simple - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/FlowStatusV5Responses' - description: OK - "401": - description: Unauthorized - "403": - description: Forbidden - summary: This method returns an array containing the statuses of all flows running - for a specified holding identity. An empty array is returned if there are - no flows running. - x-hyperledger-cactus: - http: - verbLowerCase: get - path: "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/flow/{holdingIDShortHash}" - post: - operationId: startFlowParameters - parameters: - - description: Holding identity short hash - explode: false - in: path - name: holdingIDShortHash - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StartFlowV5Request' - description: Request body for starting a flow - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FlowStatusV5Response' - description: OK - summary: This method starts a new instance for the specified flow for the specified - holding identity. - x-hyperledger-cactus: - http: - verbLowerCase: post - path: "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/flow/{holdingIDShortHash}" - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/flow/{holdingIDShortHash}/{clientRequestID}: - get: - operationId: flowStatusResponse - parameters: - - description: Holding identity short hash - explode: false - in: path - name: holdingIDShortHash - required: true - schema: - type: string - style: simple - - description: Client request ID - explode: false - in: path - name: clientRequestID - required: true - schema: - type: string - style: simple - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/FlowStatusV5Response' - description: OK - "401": - description: Unauthorized - "403": - description: Forbidden - summary: This method gets the current status of the specified flow instance. - x-hyperledger-cactus: - http: - verbLowerCase: get - path: "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/flow/{holdingIDShortHash}/{clientRequestID}" -components: - schemas: - SHA256: - description: "SHA-256 is part of the SHA-2 hash function family. Generated hash\ - \ is fixed size, 256-bits (32-bytes)." - example: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - externalDocs: - description: Official Corda documentation of the SHA256 class. - url: https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.crypto/-secure-hash/-s-h-a256/index.html - properties: - bytes: - example: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - type: string - offset: - example: 0 - type: integer - size: - example: 32 - type: integer - required: - - bytes - - offset - - size - type: object - CordappInfo: - description: A CordappInfo describes a single CorDapp currently installed on - the node - example: - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - externalDocs: - description: Official Corda Documentation of the class CordappInfo - url: https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.cordapp/-cordapp-info/index.html - properties: - jarHash: - $ref: '#/components/schemas/SHA256' - licence: - description: The name of the licence this CorDapp is released under - type: string - minimumPlatformVersion: - description: The minimum platform version the node must be at for the CorDapp - to run - type: integer - name: - description: The name of the JAR file that defines the CorDapp - type: string - shortName: - description: The name of the CorDapp - type: string - targetPlatformVersion: - description: The target platform version this CorDapp has been tested against - type: integer - type: - description: "A description of what sort of CorDapp this is - either a contract,\ - \ workflow, or a combination." - type: string - vendor: - description: The vendor of this CorDapp - type: string - version: - description: The version of this CorDapp - type: string - required: - - jarHash - - licence - - minimumPlatformVersion - - name - - shortName - - targetPlatformVersion - - type - - vendor - - version - type: object - NodeDiagnosticInfo: - description: A NodeDiagnosticInfo holds information about the current node version. - example: - vendor: vendor - platformVersion: 1 - version: version - cordapps: - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - revision: revision - externalDocs: - description: Official Corda Documentation of the class NodeDiagnosticInfo - url: https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.node/-node-diagnostic-info/index.html - properties: - cordapps: - description: A list of CorDapps currently installed on this node - items: - $ref: '#/components/schemas/CordappInfo' - maxItems: 4096 - minItems: 0 - type: array - platformVersion: - description: "The platform version of this node. This number represents\ - \ a released API version, and should be used to make functionality decisions\ - \ (e.g. enabling an app feature only if an underlying platform feature\ - \ exists)" - type: integer - revision: - description: The git commit hash this node was built from - type: string - vendor: - description: The vendor of this node - type: string - version: - description: "The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note\ - \ that this string is effectively freeform, and so should only be used\ - \ for providing diagnostic information. It should not be used to make\ - \ functionality decisions (the platformVersion is a better fit for this)." - type: string - required: - - cordapps - - platformVersion - - revision - - vendor - - version - type: object - FlowInvocationType: - description: Determines which flow starting method will be used on the back-end - when invoking the flow. Based on the value here the plugin back-end might - invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() - method. Streamed responses are aggregated and returned in a single response - to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. - do. - enum: - - TRACKED_FLOW_DYNAMIC - - FLOW_DYNAMIC - nullable: false - type: string - JarFile: - additionalProperties: true - example: - filename: filename - contentBase64: contentBase64 - hasDbMigrations: true - properties: - filename: - maxLength: 255 - minLength: 1 - nullable: false - type: string - hasDbMigrations: - description: Indicates whether the cordapp jar in question contains any - embedded migrations that Cactus can/should execute between copying the - jar into the cordapp directory and starting the node back up. - nullable: false - type: boolean - contentBase64: - format: base64 - maxLength: 1073741824 - minLength: 1 - nullable: false - type: string - required: - - contentBase64 - - filename - - hasDbMigrations - type: object - JvmType: - description: Represents a reference to a JVM type (such as a Java class) - example: - constructorName: constructorName - invocationTarget: null - fqClassName: fqClassName - properties: - fqClassName: - maxLength: 65535 - minLength: 1 - nullable: false - type: string - constructorName: - description: This parameter is used to specify that the function used to - construct this JvmType is not a constructor function but instead is a - factory function. Setting this parameter will cause the plugin to look - up methods of the class denoted by fqClassName instead of its constructors. - maxLength: 65535 - minLength: 1 - nullable: false - type: string - invocationTarget: - $ref: '#/components/schemas/JvmObject' - required: - - fqClassName - type: object - JvmTypeKind: - enum: - - PRIMITIVE - - REFERENCE - nullable: false - type: string - JvmObject: - description: "Can represent JVM primitive and reference types as well. The jvmTypeKind\ - \ field indicates which one is being stored. If the jvmTypeKind field is set\ - \ to REFERENCE then the jvmCtorArgs array is expected to be filled, otherwise\ - \ (e.g. PRIMITIVE jvmTypeKind) it is expected that the primitiveValue property\ - \ is filled with a primitive data type supported by the JSON standard such\ - \ as strings, booleans, numbers, etc." - example: - jvmCtorArgs: - - null - - null - jvmType: - constructorName: constructorName - invocationTarget: null - fqClassName: fqClassName - primitiveValue: "{}" - jvmTypeKind: null - properties: - jvmTypeKind: - $ref: '#/components/schemas/JvmTypeKind' - primitiveValue: - type: object - jvmCtorArgs: - default: [] - items: - $ref: '#/components/schemas/JvmObject' - maxLength: 1024 - minLength: 0 - nullable: false - type: array - jvmType: - $ref: '#/components/schemas/JvmType' - required: - - jvmType - - jvmTypeKind - type: object - CordappDeploymentConfig: - example: - cordaJarPath: cordaJarPath - cordaNodeStartCmd: ./build/nodes/runNodes - cordappDir: cordappDir - nodeBaseDirPath: nodeBaseDirPath - rpcCredentials: - hostname: hostname - password: password - port: 39501 - username: username - sshCredentials: - password: password - hostname: hostname - port: 5249 - hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 - username: username - properties: - sshCredentials: - $ref: '#/components/schemas/CordaNodeSshCredentials' - rpcCredentials: - $ref: '#/components/schemas/CordaRpcCredentials' - cordaNodeStartCmd: - description: The shell command to execute in order to start back up a Corda - node after having placed new jars in the cordapp directory of said node. - example: ./build/nodes/runNodes - maxLength: 65535 - minLength: 1 - nullable: false - type: string - cordappDir: - description: The absolute file system path where the Corda Node is expecting - deployed Cordapp jar files to be placed. - maxLength: 2048 - minLength: 1 - nullable: false - type: string - cordaJarPath: - description: The absolute file system path where the corda.jar file of the - node can be found. This is used to execute database schema migrations - where applicable (H2 database in use in development environments). - maxLength: 2048 - minLength: 1 - nullable: false - type: string - nodeBaseDirPath: - description: The absolute file system path where the base directory of the - Corda node can be found. This is used to pass in to corda.jar when being - invoked for certain tasks such as executing database schema migrations - for a deployed contract. - maxLength: 2048 - minLength: 1 - nullable: false - type: string - required: - - cordaJarPath - - cordaNodeStartCmd - - cordappDir - - nodeBaseDirPath - - rpcCredentials - - sshCredentials - type: object - CordaRpcCredentials: - example: - hostname: hostname - password: password - port: 39501 - username: username - properties: - hostname: - maxLength: 65535 - minLength: 1 - nullable: false - type: string - port: - maximum: 65535 - minimum: 1 - nullable: false - type: integer - username: - maxLength: 1024 - minLength: 1 - nullable: false - type: string - password: - maxLength: 65535 - minLength: 1 - nullable: false - type: string - required: - - hostname - - password - - port - - username - type: object - CordaNodeSshCredentials: - example: - password: password - hostname: hostname - port: 5249 - hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 - username: username - properties: - hostKeyEntry: - example: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 - maxLength: 65535 - minLength: 1 - nullable: false - type: string - username: - maxLength: 32 - minLength: 1 - nullable: false - type: string - password: - maxLength: 4096 - minLength: 1 - nullable: false - type: string - hostname: - maxLength: 4096 - minLength: 1 - nullable: false - type: string - port: - maximum: 65535 - minimum: 1 - nullable: false - type: integer - required: - - hostKeyEntry - - hostname - - password - - port - - username - type: object - DeployContractJarsV1Request: - additionalProperties: false - example: - jarFiles: - - filename: filename - contentBase64: contentBase64 - hasDbMigrations: true - - filename: filename - contentBase64: contentBase64 - hasDbMigrations: true - cordappDeploymentConfigs: - - cordaJarPath: cordaJarPath - cordaNodeStartCmd: ./build/nodes/runNodes - cordappDir: cordappDir - nodeBaseDirPath: nodeBaseDirPath - rpcCredentials: - hostname: hostname - password: password - port: 39501 - username: username - sshCredentials: - password: password - hostname: hostname - port: 5249 - hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 - username: username - - cordaJarPath: cordaJarPath - cordaNodeStartCmd: ./build/nodes/runNodes - cordappDir: cordappDir - nodeBaseDirPath: nodeBaseDirPath - rpcCredentials: - hostname: hostname - password: password - port: 39501 - username: username - sshCredentials: - password: password - hostname: hostname - port: 5249 - hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 - username: username - properties: - cordappDeploymentConfigs: - default: [] - description: The list of deployment configurations pointing to the nodes - where the provided cordapp jar files are to be deployed . - items: - $ref: '#/components/schemas/CordappDeploymentConfig' - maxLength: 1024 - minLength: 0 - type: array - jarFiles: - items: - $ref: '#/components/schemas/JarFile' - nullable: false - type: array - required: - - cordappDeploymentConfigs - - jarFiles - type: object - DeployContractJarsSuccessV1Response: - example: - deployedJarFiles: - - deployedJarFiles - - deployedJarFiles - properties: - deployedJarFiles: - items: - minItems: 1 - nullable: false - type: string - type: array - required: - - deployedJarFiles - type: object - DeployContractJarsBadRequestV1Response: - properties: - errors: - items: - maxItems: 2048 - maxLength: 65535 - minItems: 1 - minLength: 1 - type: string - type: array - required: - - errors - type: object - InvokeContractV1Request: - additionalProperties: false - example: - flowInvocationType: null - timeoutMs: 0 - flowFullClassName: net.corda.samples.obligation.flows.IOUIssueFlow - params: - - jvmCtorArgs: - - null - - null - jvmType: - constructorName: constructorName - invocationTarget: null - fqClassName: fqClassName - primitiveValue: "{}" - jvmTypeKind: null - - jvmCtorArgs: - - null - - null - jvmType: - constructorName: constructorName - invocationTarget: null - fqClassName: fqClassName - primitiveValue: "{}" - jvmTypeKind: null - properties: - flowFullClassName: - description: The fully qualified name of the Corda flow to invoke - example: net.corda.samples.obligation.flows.IOUIssueFlow - maxLength: 1024 - minLength: 1 - nullable: false - type: string - flowInvocationType: - $ref: '#/components/schemas/FlowInvocationType' - params: - default: [] - description: The list of arguments to pass in to the contract method being - invoked. - items: - $ref: '#/components/schemas/JvmObject' - nullable: false - type: array - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - beforegiving up and crashing. - minimum: 0 - nullable: false - type: integer - required: - - flowFullClassName - - flowInvocationType - - params - - signingCredential - type: object - InvokeContractV1Response: - example: - callOutput: "{}" - success: true - progress: - - progress - - progress - flowId: flowId - transactionId: transactionId - properties: - success: - nullable: false - type: boolean - callOutput: - description: Data returned from the JVM when no transaction is running - type: object - transactionId: - description: The net.corda.core.flows.StateMachineRunId value returned by - the flow execution. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - progress: - default: [] - description: "An array of strings representing the aggregated stream of\ - \ progress updates provided by a *tracked* flow invocation. If the flow\ - \ invocation was not tracked, this array is still returned, but as empty." - items: - maxItems: 10000000 - minItems: 0 - type: string - type: array - flowId: - description: The id for the flow handle - type: string - required: - - callOutput - - flowId - - success - type: object - StartMonitorV1Request: - additionalProperties: false - example: - stateFullClassName: net.corda.samples.example.states.IOUState - clientAppId: frond_v1_x_7Hdg6s - properties: - clientAppId: - description: ID of a client application that wants to monitor the state - changes - example: frond_v1_x_7Hdg6s - maxLength: 1024 - minLength: 1 - nullable: false - type: string - stateFullClassName: - description: The fully qualified name of the Corda state to monitor - example: net.corda.samples.example.states.IOUState - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - clientAppId - - stateFullClassName - type: object - StartMonitorV1Response: - example: - msg: msg - success: true - properties: - success: - description: Flag set to true if monitoring started correctly. - nullable: false - type: boolean - msg: - description: Message describing operation status or any errors that occurred. - nullable: false - type: string - required: - - msg - - success - type: object - GetMonitorTransactionsV1Request: - additionalProperties: false - example: - stateFullClassName: net.corda.samples.example.states.IOUState - clientAppId: frond_v1_x_7Hdg6s - properties: - clientAppId: - description: ID of a client application that wants to monitor the state - changes - example: frond_v1_x_7Hdg6s - maxLength: 1024 - minLength: 1 - nullable: false - type: string - stateFullClassName: - description: The fully qualified name of the Corda state to monitor - example: net.corda.samples.example.states.IOUState - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - clientAppId - - stateFullClassName - type: object - GetMonitorTransactionsV1Response: - example: - msg: msg - tx: - - data: data - index: index - - data: data - index: index - success: true - stateFullClassName: net.corda.samples.example.states.IOUState - properties: - success: - description: Flag set to true if operation completed correctly. - nullable: false - type: boolean - msg: - description: Message describing operation status or any errors that occurred. - nullable: false - type: string - stateFullClassName: - description: The fully qualified name of the Corda state to monitor - example: net.corda.samples.example.states.IOUState - maxLength: 1024 - minLength: 1 - nullable: false - type: string - tx: - default: [] - items: - $ref: '#/components/schemas/GetMonitorTransactionsV1Response_tx_inner' - type: array - required: - - msg - - success - type: object - ClearMonitorTransactionsV1Request: - additionalProperties: false - example: - txIndexes: - - txIndexes - - txIndexes - stateFullClassName: net.corda.samples.example.states.IOUState - clientAppId: frond_v1_x_7Hdg6s - properties: - clientAppId: - description: ID of a client application that wants to monitor the state - changes - example: frond_v1_x_7Hdg6s - maxLength: 1024 - minLength: 1 - nullable: false - type: string - stateFullClassName: - description: The fully qualified name of the Corda state to monitor - example: net.corda.samples.example.states.IOUState - maxLength: 1024 - minLength: 1 - nullable: false - type: string - txIndexes: - default: [] - items: - type: string - type: array - required: - - clientAppId - - stateFullClassName - - txIndexes - type: object - ClearMonitorTransactionsV1Response: - additionalProperties: false - example: - msg: msg - success: true - properties: - success: - description: Flag set to true if operation completed correctly. - nullable: false - type: boolean - msg: - description: Message describing operation status or any errors that occurred. - nullable: false - type: string - required: - - msg - - success - type: object - StopMonitorV1Request: - additionalProperties: false - example: - stateFullClassName: net.corda.samples.example.states.IOUState - clientAppId: frond_v1_x_7Hdg6s - properties: - clientAppId: - description: ID of a client application that wants to monitor the state - changes - example: frond_v1_x_7Hdg6s - maxLength: 1024 - minLength: 1 - nullable: false - type: string - stateFullClassName: - description: The fully qualified name of the Corda state to monitor - example: net.corda.samples.example.states.IOUState - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - clientAppId - - stateFullClassName - type: object - StopMonitorV1Response: - example: - msg: msg - success: true - properties: - success: - description: Flag set to true if operation completed correctly. - nullable: false - type: boolean - msg: - description: Message describing operation status or any errors that occurred. - nullable: false - type: string - required: - - msg - - success - type: object - ListFlowsV1Request: - additionalProperties: false - example: - filter: filter - properties: - filter: - type: string - type: object - ListFlowsV1Response: - example: - flowNames: - - net.corda.finance.flows.CashExitFlow - - net.corda.finance.flows.CashIssueAndPaymentFlow - - net.corda.finance.flows.CashIssueFlow - - net.corda.finance.flows.CashPaymentFlow - - net.corda.finance.internal.CashConfigDataFlow - - net.corda.samples.obligation.flows.IOUIssueFlow - - net.corda.samples.obligation.flows.IOUSettleFlow - - net.corda.samples.obligation.flows.IOUTransferFlow - - net.corda.samples.obligation.flows.SelfIssueCashFlow - properties: - flowNames: - default: [] - description: An array of strings storing the names of the flows as returned - by the flowList Corda RPC. - example: - - net.corda.finance.flows.CashExitFlow - - net.corda.finance.flows.CashIssueAndPaymentFlow - - net.corda.finance.flows.CashIssueFlow - - net.corda.finance.flows.CashPaymentFlow - - net.corda.finance.internal.CashConfigDataFlow - - net.corda.samples.obligation.flows.IOUIssueFlow - - net.corda.samples.obligation.flows.IOUSettleFlow - - net.corda.samples.obligation.flows.IOUTransferFlow - - net.corda.samples.obligation.flows.SelfIssueCashFlow - items: - maxItems: 10000000 - minItems: 0 - type: string - type: array - required: - - flowNames - type: object - NetworkHostAndPort: - example: - port: 0.8008281904610115 - host: host - properties: - host: - type: string - port: - type: number - required: - - host - - port - type: object - PartyAndCertificate: - type: object - PublicKey: - description: An instance of a java.security.PublicKey (which is an interface) - implementation such as org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl - example: - format: X.509 - algorithm: EdDSA - encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= - properties: - algorithm: - example: EdDSA - type: string - format: - example: X.509 - type: string - encoded: - example: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= - type: string - required: - - algorithm - - encoded - - format - type: object - X500Principal: - example: - name: "O=PartyA,L=London,C=GB" - encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - properties: - name: - example: "O=PartyA,L=London,C=GB" - type: string - encoded: - description: Base64 encoded public key - example: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - type: string - required: - - encoded - - name - type: object - CordaX500Name: - example: - commonName: commonName - country: GB - organisationUnit: organisationUnit - locality: London - x500Principal: - name: "O=PartyA,L=London,C=GB" - encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - organisation: PartyA - state: state - properties: - commonName: - type: string - organisationUnit: - type: string - organisation: - example: PartyA - type: string - locality: - example: London - type: string - state: - type: string - country: - example: GB - type: string - x500Principal: - $ref: '#/components/schemas/X500Principal' - required: - - country - - locality - - organisation - - x500Principal - type: object - Party: - example: - owningKey: - format: X.509 - algorithm: EdDSA - encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= - name: - commonName: commonName - country: GB - organisationUnit: organisationUnit - locality: London - x500Principal: - name: "O=PartyA,L=London,C=GB" - encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - organisation: PartyA - state: state - properties: - name: - $ref: '#/components/schemas/CordaX500Name' - owningKey: - $ref: '#/components/schemas/PublicKey' - required: - - name - - owningKey - type: object - NodeInfo: - example: - legalIdentities: - - owningKey: - format: X.509 - algorithm: EdDSA - encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= - name: - commonName: commonName - country: GB - organisationUnit: organisationUnit - locality: London - x500Principal: - name: "O=PartyA,L=London,C=GB" - encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - organisation: PartyA - state: state - - owningKey: - format: X.509 - algorithm: EdDSA - encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= - name: - commonName: commonName - country: GB - organisationUnit: organisationUnit - locality: London - x500Principal: - name: "O=PartyA,L=London,C=GB" - encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - organisation: PartyA - state: state - addresses: - - port: 0.8008281904610115 - host: host - - port: 0.8008281904610115 - host: host - serial: 1.4658129805029452 - platformVersion: 6 - legalIdentitiesAndCerts: - - null - - null - properties: - addresses: - items: - $ref: '#/components/schemas/NetworkHostAndPort' - type: array - platformVersion: - type: integer - serial: - type: number - legalIdentities: - items: - $ref: '#/components/schemas/Party' - type: array - legalIdentitiesAndCerts: - items: - $ref: '#/components/schemas/PartyAndCertificate' - type: array - required: - - addresses - - legalIdentities - - legalIdentitiesAndCerts - - platformVersion - - serial - type: object - NetworkMapV1Request: - type: object - NetworkMapV1Response: - items: - $ref: '#/components/schemas/NodeInfo' - maxItems: 2048 - minItems: 1 - nullable: false - type: array - DiagnoseNodeV1Request: - additionalProperties: false - example: - nodeIds: - - nodeIds - - nodeIds - - nodeIds - - nodeIds - - nodeIds - properties: - nodeIds: - default: [] - description: "Optional property specifying which Corda Node should be the\ - \ one being diagnosed in case the Connector has multiple connections established\ - \ for different nodes (which is not yet a supported feature, but we want\ - \ to keep this possibility open for the future)." - items: - nullable: false - type: string - maxItems: 1024 - minItems: 0 - type: array - type: object - DiagnoseNodeV1Response: - example: - nodeDiagnosticInfo: - vendor: vendor - platformVersion: 1 - version: version - cordapps: - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - revision: revision - properties: - nodeDiagnosticInfo: - $ref: '#/components/schemas/NodeDiagnosticInfo' - required: - - nodeDiagnosticInfo - type: object - PrometheusExporterMetricsResponse: - nullable: false - type: string - CPIV5Response: - example: - cpis: - - cpiFileFullChecksum: string - cpiFileChecksum: string - cpks: - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - groupPolicy: string - id: - signerSummaryHash: string - name: string - version: string - timestamp: 2022-06-24T10:15:30Z - - cpiFileFullChecksum: string - cpiFileChecksum: string - cpks: - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - groupPolicy: string - id: - signerSummaryHash: string - name: string - version: string - timestamp: 2022-06-24T10:15:30Z - properties: - cpis: - items: - $ref: '#/components/schemas/CPIV5Response_cpis_inner' - type: array - required: - - hash - - id - - libraries - - mainBundle - - timestamp - - type - type: object - StartFlowV5Request: - description: This method starts a new instance for the specified flow for the - specified holding identity. - example: - requestBody: - numberOfRecords: numberOfRecords - otherMember: otherMember - chatName: chatName - message: message - clientRequestId: clientRequestId - flowClassName: flowClassName - properties: - clientRequestId: - nullable: false - type: string - flowClassName: - nullable: false - type: string - requestBody: - $ref: '#/components/schemas/StartFlowV5Request_requestBody' - required: - - clientRequestId - - flowClassName - - requestBody - type: object - FlowStatusV5Response: - example: - holdingIDShortHash: string - flowError: - message: string - type: string - clientRequestId: string - flowResult: string - flowStatus: string - flowId: string - timestamp: 2022-06-24T10:15:30Z - properties: - clientRequestId: - example: string - nullable: true - type: string - flowError: - $ref: '#/components/schemas/FlowV5Error' - flowId: - example: string - nullable: true - type: string - flowResult: - example: string - nullable: true - type: string - flowStatus: - example: string - nullable: false - type: string - holdingIDShortHash: - example: string - nullable: false - type: string - timestamp: - example: 2022-06-24T10:15:30Z - format: date-time - nullable: false - type: string - required: - - flowStatus - - holdingIDShortHash - - timestamp - type: object - FlowStatusV5Responses: - properties: - flowStatusResponses: - items: - $ref: '#/components/schemas/FlowStatusV5Responses_flowStatusResponses_inner' - type: array - required: - - flowStatus - - holdingIDShortHash - - timestamp - type: object - CPIIDV5: - example: - signerSummaryHash: string - name: string - version: string - properties: - name: - example: string - nullable: false - type: string - signerSummaryHash: - example: string - nullable: true - type: string - version: - example: string - nullable: false - type: string - required: - - name - - version - type: object - FlowV5Error: - example: - message: string - type: string - properties: - message: - example: string - nullable: false - type: string - type: - example: string - nullable: false - type: string - required: - - message - - type - type: object - GetMonitorTransactionsV1Response_tx_inner: - example: - data: data - index: index - properties: - index: - type: string - data: - maxItems: 10000000 - minItems: 0 - type: string - type: object - CPIV5Response_cpis_inner_cpks_inner: - example: - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - properties: - hash: - example: string - nullable: false - type: string - id: - $ref: '#/components/schemas/CPIIDV5' - libraries: - items: - example: string - nullable: false - type: string - type: array - mainBundle: - example: string - nullable: false - type: string - timestamp: - example: 2022-06-24T10:15:30Z - format: date-time - nullable: false - type: string - type: - example: string - nullable: false - type: string - type: object - CPIV5Response_cpis_inner: - example: - cpiFileFullChecksum: string - cpiFileChecksum: string - cpks: - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - groupPolicy: string - id: - signerSummaryHash: string - name: string - version: string - timestamp: 2022-06-24T10:15:30Z - properties: - cpiFileChecksum: - example: string - nullable: false - type: string - cpiFileFullChecksum: - example: string - nullable: false - type: string - cpks: - items: - $ref: '#/components/schemas/CPIV5Response_cpis_inner_cpks_inner' - type: array - groupPolicy: - example: string - nullable: true - type: string - id: - $ref: '#/components/schemas/CPIIDV5' - timestamp: - example: 2022-06-24T10:15:30Z - format: date-time - nullable: false - type: string - type: object - StartFlowV5Request_requestBody: - example: - numberOfRecords: numberOfRecords - otherMember: otherMember - chatName: chatName - message: message - properties: - chatName: - type: string - otherMember: - type: string - message: - type: string - numberOfRecords: - type: string - type: object - FlowStatusV5Responses_flowStatusResponses_inner: - properties: - clientRequestId: - example: string - nullable: true - type: string - flowError: - $ref: '#/components/schemas/FlowV5Error' - flowId: - example: string - nullable: true - type: string - flowResult: - example: string - nullable: true - type: string - flowStatus: - example: string - nullable: false - type: string - holdingIDShortHash: - example: string - nullable: false - type: string - timestamp: - example: 2022-06-24T10:15:30Z - format: date-time - nullable: false - type: string - type: object diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/test/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/JsonJvmObjectDeserializerTest.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/test/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/JsonJvmObjectDeserializerTest.kt deleted file mode 100644 index e9cc8f7c0c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/test/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/JsonJvmObjectDeserializerTest.kt +++ /dev/null @@ -1,437 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl - -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.* -import org.junit.jupiter.api.Test -import java.util.* -import kotlin.collections.ArrayList - -enum class Direction { - NORTH, SOUTH, WEST, EAST -} - -class TestTxData {} -class JsonJvmObjectDeserializerTest { - - companion object { - val deserializer = JsonJvmObjectDeserializer() - } - - - @Test - fun classForNameHappyPath() { - - val jvmObject = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = Class::class.java.name - ), - jvmCtorArgs = listOf( - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(String::class.java.name), - primitiveValue = TestTxData::class.java.name - ) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - - assert(deserializedObject == TestTxData::class.java) - } - @Test - fun enumHappyPath() { - val actual = Direction.WEST - - class FlightPlan(val direction: Direction) - - val jvmObject = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = FlightPlan::class.java.name - ), - jvmCtorArgs = listOf( - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(Direction::class.java.name), - primitiveValue = actual) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is FlightPlan) - val flightPlan = deserializedObject as FlightPlan - val expected = flightPlan.direction - assert(actual == expected) - } - - @Test - fun floatArrayHappyPath() { - - val actual = 42.42F - - val jvmObject = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = FloatArray::class.java.name - ), - jvmCtorArgs = listOf( - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(Double::class.java.name), - primitiveValue = actual) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is FloatArray) - val array = deserializedObject as FloatArray - val expected = array[0] - assert(actual == expected) - } - - @Test - fun doubleArrayHappyPath() { - - val actual = 42.42 - - val jvmObject = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = DoubleArray::class.java.name - ), - jvmCtorArgs = listOf( - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(Double::class.java.name), - primitiveValue = actual) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is DoubleArray) - val array = deserializedObject as DoubleArray - val expected = array[0] - assert(actual == expected) - } - - @Test - fun intArrayHappyPath() { - - val actual = 42 - - val jvmObject = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = IntArray::class.java.name - ), - jvmCtorArgs = listOf( - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(Int::class.java.name), - primitiveValue = actual) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is IntArray) - val anIntArray = deserializedObject as IntArray - val expected = anIntArray[0] - assert(actual == expected) - } - - @Test - fun byteArrayHappyPath() { - - val actual: Byte = 42 - - val jvmObject = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = ByteArray::class.java.name - ), - jvmCtorArgs = listOf( - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(Byte::class.java.name), - primitiveValue = actual) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is ByteArray) - val byteArray = deserializedObject as ByteArray - val expected = byteArray[0] - assert(actual == expected) - } - - @Test - fun booleanArrayHappyPath() { - - val actual1 = true - val actual2 = false - - val jvmObject = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = BooleanArray::class.java.name - ), - jvmCtorArgs = listOf( - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(Boolean::class.java.name), - primitiveValue = actual1 - ), - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(Boolean::class.java.name), - primitiveValue = actual2 - ) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is BooleanArray) - val array = deserializedObject as BooleanArray - val expected1 = array[0] - assert(actual1 == expected1) - - val expected2 = array[1] - assert(actual2 == expected2) - } - - @Test - fun invocationTargetHappyPath() { - - data class MyCustomClass(val id: String) - - class MyCustomFactory { - fun createMyCustomClass(id: String): MyCustomClass { - return MyCustomClass(id) - } - } - - val actual = UUID.randomUUID().toString() - - val jvmObject = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = MyCustomClass::class.java.name, - constructorName = "createMyCustomClass", - invocationTarget = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = MyCustomFactory::class.java.name - ), - jvmCtorArgs = emptyList() - ) - ), - jvmCtorArgs = listOf( - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(String::class.java.name), - primitiveValue = actual) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is MyCustomClass) - val myCustomClass = deserializedObject as MyCustomClass - val expected = myCustomClass.id - assert(actual == expected) - } - - @Test - fun invocationTargetSadPath() { - data class MyCustomClass(val id: String) - - class MyCustomFactory { - fun createMyCustomClass(id: String): MyCustomClass { - return MyCustomClass(id) - } - } - - val actual = UUID.randomUUID().toString() - - val jvmObject = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = MyCustomClass::class.java.name, - constructorName = "createMyCustomClass", - invocationTarget = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = MyCustomFactory::class.java.name - ), - jvmCtorArgs = listOf( - // this will make the constructor of the factory class (the invocation target) - // crash hard and we'll be there to assert that the exception message contains - // useful information - JvmObject(JvmTypeKind.PRIMITIVE, JvmType(Long::class.java.name), 1L) - ) - ) - ), - jvmCtorArgs = listOf( - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(String::class.java.name), - primitiveValue = actual) - ) - ) - - try { - deserializer.instantiate(jvmObject) - } catch (ex: InstantiationException) { - assert(ex.message.contains("Failed to instantiate invocation target for")) - val factoryMethodName = jvmObject.jvmType.constructorName as String - val factoryClassName = jvmObject.jvmType.invocationTarget?.jvmType?.fqClassName - assert(ex.message.contains(factoryMethodName)) - assert(ex.message.contains(factoryClassName as String)) - } - } - - @Test - fun factoryMethodSadPath() { - data class MyCustomClass(val id: String) - - class MyCustomFactory { - fun createMyCustomClass(id: String): MyCustomClass { - return MyCustomClass(id) - } - } - - val actual = UUID.randomUUID().toString() - - val jvmObject = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = MyCustomClass::class.java.name, - constructorName = "some-non-existent-method-name", - invocationTarget = JvmObject( - jvmTypeKind = JvmTypeKind.REFERENCE, - jvmType = JvmType( - fqClassName = MyCustomFactory::class.java.name - ), - jvmCtorArgs = emptyList() - ) - ), - jvmCtorArgs = listOf( - JvmObject( - jvmTypeKind = JvmTypeKind.PRIMITIVE, - jvmType = JvmType(String::class.java.name), - primitiveValue = actual) - ) - ) - - try { - deserializer.instantiate(jvmObject) - } catch (ex: ConstructorLookupException) { - assert(ex.message.contains("Cannot find matching method for")) - val factoryMethodName = jvmObject.jvmType.constructorName as String - val factoryClassName = jvmObject.jvmType.invocationTarget?.jvmType?.fqClassName - assert(ex.message.contains(factoryMethodName)) - assert(ex.message.contains(factoryClassName as String)) - } - } - - @Test - fun listOf() { - val actual = UUID.randomUUID().toString() - val jvmObject = JvmObject( - JvmTypeKind.REFERENCE, - JvmType(List::class.java.name), - jvmCtorArgs = listOf( - JvmObject(JvmTypeKind.PRIMITIVE, JvmType(String::class.java.name), primitiveValue = actual) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is List<*>) - val list = deserializedObject as List<*> - assert(list.size == 1) - val expected = list[0] - assert(actual == expected) - } - - @Test - fun arrayOf() { - val actual = UUID.randomUUID().toString() - val jvmObject = JvmObject( - JvmTypeKind.REFERENCE, - JvmType(Array::class.java.name), - jvmCtorArgs = listOf( - JvmObject(JvmTypeKind.PRIMITIVE, JvmType(String::class.java.name), primitiveValue = actual) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is Array<*>) - val list = deserializedObject as Array<*> - assert(list.size == 1) - val expected = list[0] - assert(actual == expected) - } - - @Test - fun arrayListOf() { - val actual = UUID.randomUUID().toString() - val jvmObject = JvmObject( - JvmTypeKind.REFERENCE, - JvmType(ArrayList::class.java.name), - jvmCtorArgs = listOf( - JvmObject(JvmTypeKind.PRIMITIVE, JvmType(String::class.java.name), primitiveValue = actual) - ) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is ArrayList<*>) - val list = deserializedObject as ArrayList<*> - assert(list.size == 1) - val expected = list[0] - assert(actual == expected) - } - - @Test - fun setOf() { - val actual = UUID.randomUUID().toString() - val listJvmObject = JvmObject( - JvmTypeKind.REFERENCE, - JvmType(Set::class.java.name), - jvmCtorArgs = listOf( - JvmObject(JvmTypeKind.PRIMITIVE, JvmType(String::class.java.name), primitiveValue = actual) - ) - ) - - val jvmObject = deserializer.instantiate(listJvmObject) - assert(jvmObject is Set<*>) - val list = jvmObject as Set<*> - assert(list.size == 1) - val containsActual = list.contains(actual) - assert(containsActual) - } - - @Test - fun mapOf() { - val actualKey = UUID.randomUUID().toString() - val actualValue = UUID.randomUUID().toString() - val actualKeyJvmObject = JvmObject(JvmTypeKind.PRIMITIVE, JvmType(String::class.java.name), primitiveValue = actualKey) - val actualValueJvmObject = JvmObject(JvmTypeKind.PRIMITIVE, JvmType(String::class.java.name), primitiveValue = actualValue) - val actualPairJvmObject = JvmObject( - JvmTypeKind.REFERENCE, - jvmType = JvmType(Pair::class.java.name), - jvmCtorArgs = listOf(actualKeyJvmObject, actualValueJvmObject) - ) - val jvmObject = JvmObject( - JvmTypeKind.REFERENCE, - JvmType(Map::class.java.name), - jvmCtorArgs = listOf(actualPairJvmObject) - ) - - val deserializedObject = deserializer.instantiate(jvmObject) - assert(deserializedObject is Map<*, *>) - val map = deserializedObject as Map<*, *> - assert(map.keys.contains(actualKey)) - val expectedValue = map[actualKey] - assert(actualValue == expectedValue) - } - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/api.mustache b/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/api.mustache deleted file mode 100644 index fa61f4a7b0..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/api.mustache +++ /dev/null @@ -1,95 +0,0 @@ -package {{package}} - -{{#imports}}import {{import}} -{{/imports}} -{{#swagger2AnnotationLibrary}} -import io.swagger.v3.oas.annotations.* -import io.swagger.v3.oas.annotations.enums.* -import io.swagger.v3.oas.annotations.media.* -import io.swagger.v3.oas.annotations.responses.* -import io.swagger.v3.oas.annotations.security.* -{{/swagger2AnnotationLibrary}} -{{#swagger1AnnotationLibrary}} -import io.swagger.annotations.Api -import io.swagger.annotations.ApiOperation -import io.swagger.annotations.ApiParam -import io.swagger.annotations.ApiResponse -import io.swagger.annotations.ApiResponses -import io.swagger.annotations.Authorization -import io.swagger.annotations.AuthorizationScope -{{/swagger1AnnotationLibrary}} -import org.springframework.http.HttpStatus -import org.springframework.http.MediaType -import org.springframework.http.ResponseEntity - -import org.springframework.web.bind.annotation.* -{{#useBeanValidation}} -import org.springframework.validation.annotation.Validated -{{/useBeanValidation}} -import org.springframework.web.context.request.NativeWebRequest -import org.springframework.beans.factory.annotation.Autowired - -{{#useBeanValidation}} -import {{javaxPackage}}.validation.Valid -import {{javaxPackage}}.validation.constraints.DecimalMax -import {{javaxPackage}}.validation.constraints.DecimalMin -import {{javaxPackage}}.validation.constraints.Email -import {{javaxPackage}}.validation.constraints.Max -import {{javaxPackage}}.validation.constraints.Min -import {{javaxPackage}}.validation.constraints.NotNull -import {{javaxPackage}}.validation.constraints.Pattern -import {{javaxPackage}}.validation.constraints.Size -{{/useBeanValidation}} - -{{#reactive}} -import kotlinx.coroutines.flow.Flow -{{/reactive}} -import kotlin.collections.List -import kotlin.collections.Map - -@RestController{{#beanQualifiers}}("{{package}}.{{classname}}Controller"){{/beanQualifiers}} -{{#useBeanValidation}} -@Validated -{{/useBeanValidation}} -{{#swagger1AnnotationLibrary}} -@Api(value = "{{{baseName}}}", description = "The {{{baseName}}} API") -{{/swagger1AnnotationLibrary}} -{{=<% %>=}} -@RequestMapping("\${api.base-path:<%contextPath%>}") -<%={{ }}=%> -{{#operations}} -open class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) val service: {{classname}}Service{{/serviceInterface}}) { -{{#operation}} - - {{#swagger2AnnotationLibrary}} - @Operation( - summary = "{{{summary}}}", - operationId = "{{{operationId}}}", - description = """{{{unescapedNotes}}}""", - responses = [{{#responses}} - ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = [Content(schema = Schema(implementation = {{{baseType}}}::class))]{{/baseType}}){{^-last}},{{/-last}}{{/responses}} ]{{#hasAuthMethods}}, - security = [ {{#authMethods}}SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes = [ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} ]{{/isOAuth}}){{^-last}},{{/-last}}{{/authMethods}} ]{{/hasAuthMethods}} - ){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} - @ApiOperation( - value = "{{{summary}}}", - nickname = "{{{operationId}}}", - notes = "{{{notes}}}"{{#returnBaseType}}, - response = {{{.}}}::class{{/returnBaseType}}{{#returnContainer}}, - responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, - authorizations = [{{#authMethods}}Authorization(value = "{{name}}"{{#isOAuth}}, scopes = [{{#scopes}}AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}}]{{/isOAuth}}){{^-last}}, {{/-last}}{{/authMethods}}]{{/hasAuthMethods}}) - @ApiResponses( - value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}]){{/swagger1AnnotationLibrary}} - @RequestMapping( - method = [RequestMethod.{{httpMethod}}], - value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"]{{#singleContentTypes}}{{#hasProduces}}, - produces = "{{{vendorExtensions.x-accepts}}}"{{/hasProduces}}{{#hasConsumes}}, - consumes = "{{{vendorExtensions.x-content-type}}}"{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, - produces = [{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}]{{/hasProduces}}{{#hasConsumes}}, - consumes = [{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}]{{/hasConsumes}}{{/singleContentTypes}} - ) - {{#reactive}}{{^isArray}}suspend {{/isArray}}{{/reactive}}open fun {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}): ResponseEntity<{{>returnTypes}}> { - return {{>returnValue}} - } -{{/operation}} -} -{{/operations}} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/dataClass.mustache b/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/dataClass.mustache deleted file mode 100644 index e9559f8fd8..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/dataClass.mustache +++ /dev/null @@ -1,33 +0,0 @@ -/** - * {{{description}}} -{{#vars}} - * @param {{name}} {{{description}}} -{{/vars}} - */{{#discriminator}} -{{>typeInfoAnnotation}}{{/discriminator}} -{{#discriminator}}interface {{classname}}{{/discriminator}}{{^discriminator}}{{#hasVars}}data {{/hasVars}}class {{classname}}( -{{#requiredVars}} -{{>dataClassReqVar}}{{^-last}}, -{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, -{{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>dataClassOptVar}}{{^-last}}, -{{/-last}}{{/optionalVars}} -) {{/discriminator}}{{#parent}}: {{{.}}}() {{/parent}}{ -{{#discriminator}} - {{#requiredVars}} - {{>interfaceReqVar}} - {{/requiredVars}} - {{#optionalVars}} - {{>interfaceOptVar}} - {{/optionalVars}} -{{/discriminator}} -{{#hasEnums}}{{#vars}}{{#isEnum}} - /** - * {{{description}}} - * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} - */ - enum class {{{nameInCamelCase}}}(val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) { -{{#allowableValues}}{{#enumVars}} - @JsonProperty({{{value}}}) {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} - } -{{/isEnum}}{{/vars}}{{/hasEnums}} -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/libraries/spring-boot/settingsGradle.mustache b/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/libraries/spring-boot/settingsGradle.mustache deleted file mode 100644 index 4deed84141..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/libraries/spring-boot/settingsGradle.mustache +++ /dev/null @@ -1,21 +0,0 @@ -pluginManagement { - repositories { - maven { url = uri("https://repo.spring.io/snapshot") } - maven { url = uri("https://repo.spring.io/milestone") } - gradlePluginPortal() - } - resolutionStrategy { - eachPlugin { - if (requested.id.id == "org.springframework.boot") { - useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}") - } - } - } -} - -rootProject.name = "{{artifactId}}" -// The template modification Cacti needs so that we can alter the artifact name -// at build time in our scripts. This is handy when we build a .jar to be scanned -// by trivy and we don't want to have to guess what the .jar filename ended up being -// (which is different after each release) -rootProject.name = System.getProperty('rootProjectName') ?: rootProject.name diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/openapi-generator-config.yaml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/openapi-generator-config.yaml deleted file mode 100644 index b15803ccf9..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/openapi-generator-config.yaml +++ /dev/null @@ -1,38 +0,0 @@ -templateDir: src/main-server/mustache/generator-template-overrides/ - -additionalProperties: - title: "Hyperledger Cacti - Corda V4 JVM Ledger Connector Plugin" - groupId: org.hyperledger.cactus - artifactId: cactus-connector-corda-server - # TODO: Make sure this automatically gets bumped during releases so that it - # remains in sync with the package.json version number. - artifactVersion: 2.0.0 - apiSuffix: PluginLedgerConnectorCorda - basePackage: org.hyperledger.cactus.plugin.ledger.connector.corda.server - packageName: org.hyperledger.cactus.plugin.ledger.connector.corda.server - apiPackage: org.hyperledger.cactus.plugin.ledger.connector.corda.server.api - modelPackage: org.hyperledger.cactus.plugin.ledger.connector.corda.server.model - - documentationProvider: none - - enumPropertyNaming: UPPERCASE - delegatePattern: false - serviceImplementation: true - serviceInterface: true - - # TODO: - # Currently the reactive flavor of the template does not seem to work - # When specified as true, it produces compiler errors such as: - # e: /kotlin-spring/src/test/kotlin/org/openapitools/api/ApiApiTest.kt: (11, 32): Unresolved reference: runBlockingTest - # e: /kotlin-spring/src/test/kotlin/org/openapitools/api/ApiApiTest.kt: (29, 43): Unresolved reference: runBlockingTest - # e: /kotlin-spring/src/test/kotlin/org/openapitools/api/ApiApiTest.kt: (31, 81): Suspend function 'cordaDeployContractJarsV1' should be called only from a coroutine or another suspend function - # e: /kotlin-spring/src/test/kotlin/org/openapitools/api/ApiApiTest.kt: (45, 39): Unresolved reference: runBlockingTest - # e: /kotlin-spring/src/test/kotlin/org/openapitools/api/ApiApiTest.kt: (47, 70): Suspend function 'cordaInvokeContractV1' should be called only from a coroutine or another suspend function - # - reactive: false - - # annotationLibrary: none - # useSwaggerUI: "false" - # serializableModel: "true" - # beanValidations: "true" - useSpringBoot3: "true" diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/start-app.sh b/packages/cactus-plugin-ledger-connector-corda/src/main-server/start-app.sh deleted file mode 100755 index 11cf1d4a1f..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/start-app.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Without these we get crashes on JDK 17 an above since the introduction of the -# Java Modules system. - -EXTRA_JVM_ARGS="--add-exports java.base/sun.security.ec.ed=ALL-UNNAMED" -EXTRA_JVM_ARGS="--add-exports java.base/sun.security.provider.certpath=ALL-UNNAMED ${EXTRA_JVM_ARGS}" -EXTRA_JVM_ARGS="--add-exports java.base/sun.security.util=ALL-UNNAMED ${EXTRA_JVM_ARGS}" -EXTRA_JVM_ARGS="--add-exports java.base/sun.security.rsa=ALL-UNNAMED ${EXTRA_JVM_ARGS}" -EXTRA_JVM_ARGS="--add-exports jdk.crypto.ec/sun.security.ec=ALL-UNNAMED ${EXTRA_JVM_ARGS}" -EXTRA_JVM_ARGS="--add-exports java.base/sun.security.x509=ALL-UNNAMED ${EXTRA_JVM_ARGS}" -EXTRA_JVM_ARGS="--add-opens java.base/java.util=ALL-UNNAMED ${EXTRA_JVM_ARGS}" -EXTRA_JVM_ARGS="--add-opens java.base/java.time=ALL-UNNAMED ${EXTRA_JVM_ARGS}" -EXTRA_JVM_ARGS="--add-opens java.base/java.io=ALL-UNNAMED ${EXTRA_JVM_ARGS}" - -for i in 1 2 3; do java $EXTRA_JVM_ARGS -jar ${APP}/kotlin-spring/build/libs/cactus-connector-corda-server-2.0.0.jar && break || sleep 5; done diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index cc8cc54d82..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,59 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_clear_monitor_transactions_v1_request.go -model_clear_monitor_transactions_v1_response.go -model_corda_node_ssh_credentials.go -model_corda_rpc_credentials.go -model_corda_x500_name.go -model_cordapp_deployment_config.go -model_cordapp_info.go -model_cpiidv1.go -model_deploy_contract_jars_bad_request_v1_response.go -model_deploy_contract_jars_success_v1_response.go -model_deploy_contract_jars_v1_request.go -model_diagnose_node_v1_request.go -model_diagnose_node_v1_response.go -model_flow_invocation_type.go -model_flow_status_v1_responses.go -model_flow_status_v1_responses_flow_status_responses_inner.go -model_flow_v1_error.go -model_get_flow_cid_v1_request.go -model_get_flow_cid_v1_response.go -model_get_monitor_transactions_v1_request.go -model_get_monitor_transactions_v1_response.go -model_get_monitor_transactions_v1_response_tx_inner.go -model_invoke_contract_v1_request.go -model_invoke_contract_v1_response.go -model_jar_file.go -model_jvm_object.go -model_jvm_type.go -model_jvm_type_kind.go -model_list_cpi_v1_request.go -model_list_cpi_v1_response.go -model_list_cpi_v1_response_cpis_inner.go -model_list_cpi_v1_response_cpis_inner_cpks_inner.go -model_list_flows_v1_request.go -model_list_flows_v1_response.go -model_network_host_and_port.go -model_node_diagnostic_info.go -model_node_info.go -model_party.go -model_public_key.go -model_sha256.go -model_start_flow_v1_request.go -model_start_flow_v1_request_request_body.go -model_start_flow_v1_response.go -model_start_monitor_v1_request.go -model_start_monitor_v1_response.go -model_stop_monitor_v1_request.go -model_stop_monitor_v1_response.go -model_vault_query_v1_request.go -model_x500_principal.go -response.go -utils.go diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 3098f7a864..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,174 +0,0 @@ -# Go API client for cactus-plugin-ledger-connector-corda - -Can perform basic tasks on a Corda ledger - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-ledger-connector-corda "github.com/hyperledger/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-corda.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-corda.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-corda.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-ledger-connector-corda.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**ClearMonitorTransactionsV1**](docs/DefaultApi.md#clearmonitortransactionsv1) | **Delete** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions | Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore. -*DefaultApi* | [**DeployContractJarsV1**](docs/DefaultApi.md#deploycontractjarsv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars | Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). -*DefaultApi* | [**DiagnoseNodeV1**](docs/DefaultApi.md#diagnosenodev1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node | -*DefaultApi* | [**GetFlowV1**](docs/DefaultApi.md#getflowv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid | This method gets the current status of the specified flow instance. -*DefaultApi* | [**GetMonitorTransactionsV1**](docs/DefaultApi.md#getmonitortransactionsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions | Get transactions for monitored state classes. -*DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**InvokeContractV1**](docs/DefaultApi.md#invokecontractv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract | Invokes a contract on a Corda ledger (e.g. a flow) -*DefaultApi* | [**ListCpiV1**](docs/DefaultApi.md#listcpiv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi | List all CPIs uploaded to the cluster -*DefaultApi* | [**ListFlowV1**](docs/DefaultApi.md#listflowv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow | This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. -*DefaultApi* | [**ListFlowsV1**](docs/DefaultApi.md#listflowsv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows | -*DefaultApi* | [**NetworkMapV1**](docs/DefaultApi.md#networkmapv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map | -*DefaultApi* | [**StartFlowV1**](docs/DefaultApi.md#startflowv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow | This method starts a new instance for the specified flow for the specified holding identity. -*DefaultApi* | [**StartMonitorV1**](docs/DefaultApi.md#startmonitorv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor | Start monitoring corda changes (transactions) of given state class -*DefaultApi* | [**StopMonitorV1**](docs/DefaultApi.md#stopmonitorv1) | **Delete** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor | Stop monitoring corda changes (transactions) of given state class -*DefaultApi* | [**VaultQueryV1**](docs/DefaultApi.md#vaultqueryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query | - - -## Documentation For Models - - - [CPIIDV1](docs/CPIIDV1.md) - - [ClearMonitorTransactionsV1Request](docs/ClearMonitorTransactionsV1Request.md) - - [ClearMonitorTransactionsV1Response](docs/ClearMonitorTransactionsV1Response.md) - - [CordaNodeSshCredentials](docs/CordaNodeSshCredentials.md) - - [CordaRpcCredentials](docs/CordaRpcCredentials.md) - - [CordaX500Name](docs/CordaX500Name.md) - - [CordappDeploymentConfig](docs/CordappDeploymentConfig.md) - - [CordappInfo](docs/CordappInfo.md) - - [DeployContractJarsBadRequestV1Response](docs/DeployContractJarsBadRequestV1Response.md) - - [DeployContractJarsSuccessV1Response](docs/DeployContractJarsSuccessV1Response.md) - - [DeployContractJarsV1Request](docs/DeployContractJarsV1Request.md) - - [DiagnoseNodeV1Request](docs/DiagnoseNodeV1Request.md) - - [DiagnoseNodeV1Response](docs/DiagnoseNodeV1Response.md) - - [FlowInvocationType](docs/FlowInvocationType.md) - - [FlowStatusV1Responses](docs/FlowStatusV1Responses.md) - - [FlowStatusV1ResponsesFlowStatusResponsesInner](docs/FlowStatusV1ResponsesFlowStatusResponsesInner.md) - - [FlowV1Error](docs/FlowV1Error.md) - - [GetFlowCidV1Request](docs/GetFlowCidV1Request.md) - - [GetFlowCidV1Response](docs/GetFlowCidV1Response.md) - - [GetMonitorTransactionsV1Request](docs/GetMonitorTransactionsV1Request.md) - - [GetMonitorTransactionsV1Response](docs/GetMonitorTransactionsV1Response.md) - - [GetMonitorTransactionsV1ResponseTxInner](docs/GetMonitorTransactionsV1ResponseTxInner.md) - - [InvokeContractV1Request](docs/InvokeContractV1Request.md) - - [InvokeContractV1Response](docs/InvokeContractV1Response.md) - - [JarFile](docs/JarFile.md) - - [JvmObject](docs/JvmObject.md) - - [JvmType](docs/JvmType.md) - - [JvmTypeKind](docs/JvmTypeKind.md) - - [ListCpiV1Request](docs/ListCpiV1Request.md) - - [ListCpiV1Response](docs/ListCpiV1Response.md) - - [ListCpiV1ResponseCpisInner](docs/ListCpiV1ResponseCpisInner.md) - - [ListCpiV1ResponseCpisInnerCpksInner](docs/ListCpiV1ResponseCpisInnerCpksInner.md) - - [ListFlowsV1Request](docs/ListFlowsV1Request.md) - - [ListFlowsV1Response](docs/ListFlowsV1Response.md) - - [NetworkHostAndPort](docs/NetworkHostAndPort.md) - - [NodeDiagnosticInfo](docs/NodeDiagnosticInfo.md) - - [NodeInfo](docs/NodeInfo.md) - - [Party](docs/Party.md) - - [PublicKey](docs/PublicKey.md) - - [SHA256](docs/SHA256.md) - - [StartFlowV1Request](docs/StartFlowV1Request.md) - - [StartFlowV1RequestRequestBody](docs/StartFlowV1RequestRequestBody.md) - - [StartFlowV1Response](docs/StartFlowV1Response.md) - - [StartMonitorV1Request](docs/StartMonitorV1Request.md) - - [StartMonitorV1Response](docs/StartMonitorV1Response.md) - - [StopMonitorV1Request](docs/StopMonitorV1Request.md) - - [StopMonitorV1Response](docs/StopMonitorV1Response.md) - - [VaultQueryV1Request](docs/VaultQueryV1Request.md) - - [X500Principal](docs/X500Principal.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 7454312251..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,1970 +0,0 @@ -openapi: 3.0.3 -info: - description: Can perform basic tasks on a Corda ledger - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cacti Plugin - Connector Corda - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query: - post: - description: Queryes the vault service for state references based on JVM class - names. Custom filters are not supported by this endpoint. - operationId: vaultQueryV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VaultQueryV1Request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VaultQueryV1Response' - description: OK - x-hyperledger-cactus: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars: - post: - operationId: deployContractJarsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractJarsV1Request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractJarsSuccessV1Response' - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractJarsBadRequestV1Response' - description: Bad Request - summary: "Deploys a set of jar files (Cordapps, e.g. the contracts in Corda\ - \ speak)." - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract: - post: - operationId: invokeContractV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - summary: Invokes a contract on a Corda ledger (e.g. a flow) - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor: - post: - operationId: startMonitorV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StartMonitorV1Request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/StartMonitorV1Response' - description: OK - summary: Start monitoring corda changes (transactions) of given state class - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions: - get: - operationId: GetMonitorTransactionsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetMonitorTransactionsV1Request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetMonitorTransactionsV1Response' - description: OK - summary: Get transactions for monitored state classes. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions - verbLowerCase: get - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions: - delete: - operationId: ClearMonitorTransactionsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ClearMonitorTransactionsV1Request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ClearMonitorTransactionsV1Response' - description: OK - summary: Clear transactions from internal store so they'll not be available - by GetMonitorTransactionsV1 anymore. - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions - verbLowerCase: delete - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor: - delete: - operationId: stopMonitorV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StopMonitorV1Request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/StopMonitorV1Response' - description: OK - summary: Stop monitoring corda changes (transactions) of given state class - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor - verbLowerCase: delete - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map: - post: - description: "Responds with a snapshot of the network map as provided by the\ - \ Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun\ - \ networkMapSnapshot(): List" - operationId: networkMapV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NetworkMapV1Request' - required: false - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/NetworkMapV1Response' - description: OK - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows: - post: - description: Responds with a list of the flows on the Corda node. - operationId: listFlowsV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ListFlowsV1Request' - required: false - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ListFlowsV1Response' - description: OK - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node: - post: - description: Responds with diagnostic information about the Corda node - operationId: diagnoseNodeV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DiagnoseNodeV1Request' - required: false - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DiagnoseNodeV1Response' - description: OK - x-hyperledger-cacti: - http: - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node - verbLowerCase: post - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi: - get: - operationId: listCpiV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ListCpiV1Request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ListCpiV1Response' - description: OK - summary: List all CPIs uploaded to the cluster - x-hyperledger-cactus: - https: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow: - get: - operationId: listFlowV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetFlowCidV1Request' - description: This method gets the current status of the specified flow instance. - required: true - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/FlowStatusV1Responses' - description: OK - "401": - description: Unauthorized - "403": - description: Forbidden - summary: This method returns an array containing the statuses of all flows running - for a specified holding identity. An empty array is returned if there are - no flows running. - x-hyperledger-cactus: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid: - get: - operationId: getFlowV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetFlowCidV1Request' - description: This method gets the current status of the specified flow instance. - required: true - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/GetFlowCidV1Response' - description: OK - "401": - description: Unauthorized - "403": - description: Forbidden - summary: This method gets the current status of the specified flow instance. - x-hyperledger-cactus: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow: - post: - operationId: startFlowV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StartFlowV1Request' - description: Request body for starting a flow - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/StartFlowV1Response' - description: OK - summary: This method starts a new instance for the specified flow for the specified - holding identity. - x-hyperledger-cactus: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow -components: - schemas: - SHA256: - description: "SHA-256 is part of the SHA-2 hash function family. Generated hash\ - \ is fixed size, 256-bits (32-bytes)." - example: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - externalDocs: - description: Official Corda documentation of the SHA256 class. - url: https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.crypto/-secure-hash/-s-h-a256/index.html - properties: - bytes: - example: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - type: string - offset: - example: 0 - type: integer - size: - example: 32 - type: integer - required: - - bytes - - offset - - size - type: object - CordappInfo: - description: A CordappInfo describes a single CorDapp currently installed on - the node - example: - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - externalDocs: - description: Official Corda Documentation of the class CordappInfo - url: https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.cordapp/-cordapp-info/index.html - properties: - jarHash: - $ref: '#/components/schemas/SHA256' - licence: - description: The name of the licence this CorDapp is released under - type: string - minimumPlatformVersion: - description: The minimum platform version the node must be at for the CorDapp - to run - type: integer - name: - description: The name of the JAR file that defines the CorDapp - type: string - shortName: - description: The name of the CorDapp - type: string - targetPlatformVersion: - description: The target platform version this CorDapp has been tested against - type: integer - type: - description: "A description of what sort of CorDapp this is - either a contract,\ - \ workflow, or a combination." - type: string - vendor: - description: The vendor of this CorDapp - type: string - version: - description: The version of this CorDapp - type: string - required: - - jarHash - - licence - - minimumPlatformVersion - - name - - shortName - - targetPlatformVersion - - type - - vendor - - version - type: object - NodeDiagnosticInfo: - description: A NodeDiagnosticInfo holds information about the current node version. - example: - vendor: vendor - platformVersion: 1 - version: version - cordapps: - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - revision: revision - externalDocs: - description: Official Corda Documentation of the class NodeDiagnosticInfo - url: https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.node/-node-diagnostic-info/index.html - properties: - cordapps: - description: A list of CorDapps currently installed on this node - items: - $ref: '#/components/schemas/CordappInfo' - maxItems: 4096 - minItems: 0 - type: array - platformVersion: - description: "The platform version of this node. This number represents\ - \ a released API version, and should be used to make functionality decisions\ - \ (e.g. enabling an app feature only if an underlying platform feature\ - \ exists)" - type: integer - revision: - description: The git commit hash this node was built from - type: string - vendor: - description: The vendor of this node - type: string - version: - description: "The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note\ - \ that this string is effectively freeform, and so should only be used\ - \ for providing diagnostic information. It should not be used to make\ - \ functionality decisions (the platformVersion is a better fit for this)." - type: string - required: - - cordapps - - platformVersion - - revision - - vendor - - version - type: object - FlowInvocationType: - description: Determines which flow starting method will be used on the back-end - when invoking the flow. Based on the value here the plugin back-end might - invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() - method. Streamed responses are aggregated and returned in a single response - to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. - do. - enum: - - TRACKED_FLOW_DYNAMIC - - FLOW_DYNAMIC - nullable: false - type: string - JarFile: - additionalProperties: true - example: - filename: filename - contentBase64: contentBase64 - hasDbMigrations: true - properties: - filename: - maxLength: 255 - minLength: 1 - nullable: false - type: string - hasDbMigrations: - description: Indicates whether the cordapp jar in question contains any - embedded migrations that Cactus can/should execute between copying the - jar into the cordapp directory and starting the node back up. - nullable: false - type: boolean - contentBase64: - format: base64 - maxLength: 1073741824 - minLength: 1 - nullable: false - type: string - required: - - contentBase64 - - filename - - hasDbMigrations - type: object - JvmType: - description: Represents a reference to a JVM type (such as a Java class) - example: - constructorName: constructorName - invocationTarget: null - fqClassName: fqClassName - properties: - fqClassName: - maxLength: 65535 - minLength: 1 - nullable: false - type: string - constructorName: - description: This parameter is used to specify that the function used to - construct this JvmType is not a constructor function but instead is a - factory function. Setting this parameter will cause the plugin to look - up methods of the class denoted by fqClassName instead of its constructors. - maxLength: 65535 - minLength: 1 - nullable: false - type: string - invocationTarget: - $ref: '#/components/schemas/JvmObject' - required: - - fqClassName - type: object - JvmTypeKind: - enum: - - PRIMITIVE - - REFERENCE - nullable: false - type: string - JvmObject: - description: "Can represent JVM primitive and reference types as well. The jvmTypeKind\ - \ field indicates which one is being stored. If the jvmTypeKind field is set\ - \ to REFERENCE then the jvmCtorArgs array is expected to be filled, otherwise\ - \ (e.g. PRIMITIVE jvmTypeKind) it is expected that the primitiveValue property\ - \ is filled with a primitive data type supported by the JSON standard such\ - \ as strings, booleans, numbers, etc." - example: - jvmCtorArgs: - - null - - null - jvmType: - constructorName: constructorName - invocationTarget: null - fqClassName: fqClassName - primitiveValue: "" - jvmTypeKind: null - properties: - jvmTypeKind: - $ref: '#/components/schemas/JvmTypeKind' - primitiveValue: {} - jvmCtorArgs: - default: [] - items: - $ref: '#/components/schemas/JvmObject' - maxLength: 1024 - minLength: 0 - nullable: false - type: array - jvmType: - $ref: '#/components/schemas/JvmType' - required: - - jvmType - - jvmTypeKind - type: object - CordappDeploymentConfig: - example: - cordaJarPath: cordaJarPath - cordaNodeStartCmd: ./build/nodes/runNodes - cordappDir: cordappDir - nodeBaseDirPath: nodeBaseDirPath - rpcCredentials: - hostname: hostname - password: password - port: 39501 - username: username - sshCredentials: - password: password - hostname: hostname - port: 5249 - hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 - username: username - properties: - sshCredentials: - $ref: '#/components/schemas/CordaNodeSshCredentials' - rpcCredentials: - $ref: '#/components/schemas/CordaRpcCredentials' - cordaNodeStartCmd: - description: The shell command to execute in order to start back up a Corda - node after having placed new jars in the cordapp directory of said node. - example: ./build/nodes/runNodes - maxLength: 65535 - minLength: 1 - nullable: false - type: string - cordappDir: - description: The absolute file system path where the Corda Node is expecting - deployed Cordapp jar files to be placed. - maxLength: 2048 - minLength: 1 - nullable: false - type: string - cordaJarPath: - description: The absolute file system path where the corda.jar file of the - node can be found. This is used to execute database schema migrations - where applicable (H2 database in use in development environments). - maxLength: 2048 - minLength: 1 - nullable: false - type: string - nodeBaseDirPath: - description: The absolute file system path where the base directory of the - Corda node can be found. This is used to pass in to corda.jar when being - invoked for certain tasks such as executing database schema migrations - for a deployed contract. - maxLength: 2048 - minLength: 1 - nullable: false - type: string - required: - - cordaJarPath - - cordaNodeStartCmd - - cordappDir - - nodeBaseDirPath - - rpcCredentials - - sshCredentials - type: object - CordaRpcCredentials: - example: - hostname: hostname - password: password - port: 39501 - username: username - properties: - hostname: - maxLength: 65535 - minLength: 1 - nullable: false - type: string - port: - maximum: 65535 - minimum: 1 - nullable: false - type: integer - username: - maxLength: 1024 - minLength: 1 - nullable: false - type: string - password: - maxLength: 65535 - minLength: 1 - nullable: false - type: string - required: - - hostname - - password - - port - - username - type: object - CordaNodeSshCredentials: - example: - password: password - hostname: hostname - port: 5249 - hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 - username: username - properties: - hostKeyEntry: - example: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 - maxLength: 65535 - minLength: 1 - nullable: false - type: string - username: - maxLength: 32 - minLength: 1 - nullable: false - type: string - password: - maxLength: 4096 - minLength: 1 - nullable: false - type: string - hostname: - maxLength: 4096 - minLength: 1 - nullable: false - type: string - port: - maximum: 65535 - minimum: 1 - nullable: false - type: integer - required: - - hostKeyEntry - - hostname - - password - - port - - username - type: object - DeployContractJarsV1Request: - additionalProperties: false - example: - jarFiles: - - filename: filename - contentBase64: contentBase64 - hasDbMigrations: true - - filename: filename - contentBase64: contentBase64 - hasDbMigrations: true - cordappDeploymentConfigs: - - cordaJarPath: cordaJarPath - cordaNodeStartCmd: ./build/nodes/runNodes - cordappDir: cordappDir - nodeBaseDirPath: nodeBaseDirPath - rpcCredentials: - hostname: hostname - password: password - port: 39501 - username: username - sshCredentials: - password: password - hostname: hostname - port: 5249 - hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 - username: username - - cordaJarPath: cordaJarPath - cordaNodeStartCmd: ./build/nodes/runNodes - cordappDir: cordappDir - nodeBaseDirPath: nodeBaseDirPath - rpcCredentials: - hostname: hostname - password: password - port: 39501 - username: username - sshCredentials: - password: password - hostname: hostname - port: 5249 - hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 - username: username - properties: - cordappDeploymentConfigs: - default: [] - description: The list of deployment configurations pointing to the nodes - where the provided cordapp jar files are to be deployed . - items: - $ref: '#/components/schemas/CordappDeploymentConfig' - maxLength: 1024 - minLength: 0 - type: array - jarFiles: - items: - $ref: '#/components/schemas/JarFile' - nullable: false - type: array - required: - - cordappDeploymentConfigs - - jarFiles - type: object - DeployContractJarsSuccessV1Response: - example: - deployedJarFiles: - - deployedJarFiles - - deployedJarFiles - properties: - deployedJarFiles: - items: - minItems: 1 - nullable: false - type: string - type: array - required: - - deployedJarFiles - type: object - DeployContractJarsBadRequestV1Response: - properties: - errors: - items: - maxItems: 2048 - maxLength: 65535 - minItems: 1 - minLength: 1 - type: string - type: array - required: - - errors - type: object - InvokeContractV1Request: - additionalProperties: false - example: - flowInvocationType: null - timeoutMs: 0 - flowFullClassName: net.corda.samples.obligation.flows.IOUIssueFlow - params: - - jvmCtorArgs: - - null - - null - jvmType: - constructorName: constructorName - invocationTarget: null - fqClassName: fqClassName - primitiveValue: "" - jvmTypeKind: null - - jvmCtorArgs: - - null - - null - jvmType: - constructorName: constructorName - invocationTarget: null - fqClassName: fqClassName - primitiveValue: "" - jvmTypeKind: null - properties: - flowFullClassName: - description: The fully qualified name of the Corda flow to invoke - example: net.corda.samples.obligation.flows.IOUIssueFlow - maxLength: 1024 - minLength: 1 - nullable: false - type: string - flowInvocationType: - $ref: '#/components/schemas/FlowInvocationType' - params: - default: [] - description: The list of arguments to pass in to the contract method being - invoked. - items: - $ref: '#/components/schemas/JvmObject' - nullable: false - type: array - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - beforegiving up and crashing. - minimum: 0 - nullable: false - type: integer - required: - - flowFullClassName - - flowInvocationType - - params - - signingCredential - type: object - InvokeContractV1Response: - example: - callOutput: "{}" - success: true - progress: - - progress - - progress - flowId: flowId - transactionId: transactionId - properties: - success: - nullable: false - type: boolean - callOutput: - description: Data returned from the JVM when no transaction is running - type: object - transactionId: - description: The net.corda.core.flows.StateMachineRunId value returned by - the flow execution. - maxLength: 1024 - minLength: 1 - nullable: false - type: string - progress: - default: [] - description: "An array of strings representing the aggregated stream of\ - \ progress updates provided by a *tracked* flow invocation. If the flow\ - \ invocation was not tracked, this array is still returned, but as empty." - items: - maxItems: 10000000 - minItems: 0 - type: string - type: array - flowId: - description: The id for the flow handle - type: string - required: - - callOutput - - flowId - - success - type: object - StartMonitorV1Request: - additionalProperties: false - example: - stateFullClassName: net.corda.samples.example.states.IOUState - clientAppId: frond_v1_x_7Hdg6s - properties: - clientAppId: - description: ID of a client application that wants to monitor the state - changes - example: frond_v1_x_7Hdg6s - maxLength: 1024 - minLength: 1 - nullable: false - type: string - stateFullClassName: - description: The fully qualified name of the Corda state to monitor - example: net.corda.samples.example.states.IOUState - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - clientAppId - - stateFullClassName - type: object - StartMonitorV1Response: - example: - msg: msg - success: true - properties: - success: - description: Flag set to true if monitoring started correctly. - nullable: false - type: boolean - msg: - description: Message describing operation status or any errors that occurred. - nullable: false - type: string - required: - - msg - - success - type: object - GetMonitorTransactionsV1Request: - additionalProperties: false - example: - stateFullClassName: net.corda.samples.example.states.IOUState - clientAppId: frond_v1_x_7Hdg6s - properties: - clientAppId: - description: ID of a client application that wants to monitor the state - changes - example: frond_v1_x_7Hdg6s - maxLength: 1024 - minLength: 1 - nullable: false - type: string - stateFullClassName: - description: The fully qualified name of the Corda state to monitor - example: net.corda.samples.example.states.IOUState - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - clientAppId - - stateFullClassName - type: object - GetMonitorTransactionsV1Response: - example: - msg: msg - tx: - - data: data - index: index - - data: data - index: index - success: true - stateFullClassName: net.corda.samples.example.states.IOUState - properties: - success: - description: Flag set to true if operation completed correctly. - nullable: false - type: boolean - msg: - description: Message describing operation status or any errors that occurred. - nullable: false - type: string - stateFullClassName: - description: The fully qualified name of the Corda state to monitor - example: net.corda.samples.example.states.IOUState - maxLength: 1024 - minLength: 1 - nullable: false - type: string - tx: - default: [] - items: - $ref: '#/components/schemas/GetMonitorTransactionsV1Response_tx_inner' - type: array - required: - - msg - - success - type: object - ClearMonitorTransactionsV1Request: - additionalProperties: false - example: - txIndexes: - - txIndexes - - txIndexes - stateFullClassName: net.corda.samples.example.states.IOUState - clientAppId: frond_v1_x_7Hdg6s - properties: - clientAppId: - description: ID of a client application that wants to monitor the state - changes - example: frond_v1_x_7Hdg6s - maxLength: 1024 - minLength: 1 - nullable: false - type: string - stateFullClassName: - description: The fully qualified name of the Corda state to monitor - example: net.corda.samples.example.states.IOUState - maxLength: 1024 - minLength: 1 - nullable: false - type: string - txIndexes: - default: [] - items: - type: string - type: array - required: - - clientAppId - - stateFullClassName - - txIndexes - type: object - ClearMonitorTransactionsV1Response: - additionalProperties: false - example: - msg: msg - success: true - properties: - success: - description: Flag set to true if operation completed correctly. - nullable: false - type: boolean - msg: - description: Message describing operation status or any errors that occurred. - nullable: false - type: string - required: - - msg - - success - type: object - StopMonitorV1Request: - additionalProperties: false - example: - stateFullClassName: net.corda.samples.example.states.IOUState - clientAppId: frond_v1_x_7Hdg6s - properties: - clientAppId: - description: ID of a client application that wants to monitor the state - changes - example: frond_v1_x_7Hdg6s - maxLength: 1024 - minLength: 1 - nullable: false - type: string - stateFullClassName: - description: The fully qualified name of the Corda state to monitor - example: net.corda.samples.example.states.IOUState - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - clientAppId - - stateFullClassName - type: object - StopMonitorV1Response: - example: - msg: msg - success: true - properties: - success: - description: Flag set to true if operation completed correctly. - nullable: false - type: boolean - msg: - description: Message describing operation status or any errors that occurred. - nullable: false - type: string - required: - - msg - - success - type: object - ListFlowsV1Request: - additionalProperties: false - example: - filter: filter - properties: - filter: - type: string - type: object - ListFlowsV1Response: - example: - flowNames: - - net.corda.finance.flows.CashExitFlow - - net.corda.finance.flows.CashIssueAndPaymentFlow - - net.corda.finance.flows.CashIssueFlow - - net.corda.finance.flows.CashPaymentFlow - - net.corda.finance.internal.CashConfigDataFlow - - net.corda.samples.obligation.flows.IOUIssueFlow - - net.corda.samples.obligation.flows.IOUSettleFlow - - net.corda.samples.obligation.flows.IOUTransferFlow - - net.corda.samples.obligation.flows.SelfIssueCashFlow - properties: - flowNames: - default: [] - description: An array of strings storing the names of the flows as returned - by the flowList Corda RPC. - example: - - net.corda.finance.flows.CashExitFlow - - net.corda.finance.flows.CashIssueAndPaymentFlow - - net.corda.finance.flows.CashIssueFlow - - net.corda.finance.flows.CashPaymentFlow - - net.corda.finance.internal.CashConfigDataFlow - - net.corda.samples.obligation.flows.IOUIssueFlow - - net.corda.samples.obligation.flows.IOUSettleFlow - - net.corda.samples.obligation.flows.IOUTransferFlow - - net.corda.samples.obligation.flows.SelfIssueCashFlow - items: - maxItems: 10000000 - minItems: 0 - type: string - type: array - required: - - flowNames - type: object - NetworkHostAndPort: - example: - port: 0.8008281904610115 - host: host - properties: - host: - type: string - port: - type: number - required: - - host - - port - type: object - PartyAndCertificate: - type: object - PublicKey: - description: An instance of a java.security.PublicKey (which is an interface) - implementation such as org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl - example: - format: X.509 - algorithm: EdDSA - encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= - properties: - algorithm: - example: EdDSA - type: string - format: - example: X.509 - type: string - encoded: - example: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= - type: string - required: - - algorithm - - encoded - - format - type: object - X500Principal: - example: - name: "O=PartyA,L=London,C=GB" - encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - properties: - name: - example: "O=PartyA,L=London,C=GB" - type: string - encoded: - description: Base64 encoded public key - example: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - type: string - required: - - encoded - - name - type: object - CordaX500Name: - example: - commonName: commonName - country: GB - organisationUnit: organisationUnit - locality: London - x500Principal: - name: "O=PartyA,L=London,C=GB" - encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - organisation: PartyA - state: state - properties: - commonName: - type: string - organisationUnit: - type: string - organisation: - example: PartyA - type: string - locality: - example: London - type: string - state: - type: string - country: - example: GB - type: string - x500Principal: - $ref: '#/components/schemas/X500Principal' - required: - - country - - locality - - organisation - - x500Principal - type: object - Party: - example: - owningKey: - format: X.509 - algorithm: EdDSA - encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= - name: - commonName: commonName - country: GB - organisationUnit: organisationUnit - locality: London - x500Principal: - name: "O=PartyA,L=London,C=GB" - encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - organisation: PartyA - state: state - properties: - name: - $ref: '#/components/schemas/CordaX500Name' - owningKey: - $ref: '#/components/schemas/PublicKey' - required: - - name - - owningKey - type: object - NodeInfo: - example: - legalIdentities: - - owningKey: - format: X.509 - algorithm: EdDSA - encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= - name: - commonName: commonName - country: GB - organisationUnit: organisationUnit - locality: London - x500Principal: - name: "O=PartyA,L=London,C=GB" - encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - organisation: PartyA - state: state - - owningKey: - format: X.509 - algorithm: EdDSA - encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= - name: - commonName: commonName - country: GB - organisationUnit: organisationUnit - locality: London - x500Principal: - name: "O=PartyA,L=London,C=GB" - encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== - organisation: PartyA - state: state - addresses: - - port: 0.8008281904610115 - host: host - - port: 0.8008281904610115 - host: host - serial: 1.4658129805029452 - platformVersion: 6 - legalIdentitiesAndCerts: - - null - - null - properties: - addresses: - items: - $ref: '#/components/schemas/NetworkHostAndPort' - type: array - platformVersion: - type: integer - serial: - type: number - legalIdentities: - items: - $ref: '#/components/schemas/Party' - type: array - legalIdentitiesAndCerts: - items: - $ref: '#/components/schemas/PartyAndCertificate' - type: array - required: - - addresses - - legalIdentities - - legalIdentitiesAndCerts - - platformVersion - - serial - type: object - NetworkMapV1Request: - type: object - NetworkMapV1Response: - items: - $ref: '#/components/schemas/NodeInfo' - maxItems: 2048 - minItems: 1 - nullable: false - type: array - DiagnoseNodeV1Request: - additionalProperties: false - example: - nodeIds: - - nodeIds - - nodeIds - - nodeIds - - nodeIds - - nodeIds - properties: - nodeIds: - default: [] - description: "Optional property specifying which Corda Node should be the\ - \ one being diagnosed in case the Connector has multiple connections established\ - \ for different nodes (which is not yet a supported feature, but we want\ - \ to keep this possibility open for the future)." - items: - nullable: false - type: string - maxItems: 1024 - minItems: 0 - type: array - type: object - DiagnoseNodeV1Response: - example: - nodeDiagnosticInfo: - vendor: vendor - platformVersion: 1 - version: version - cordapps: - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - - licence: licence - targetPlatformVersion: 6 - vendor: vendor - name: name - jarHash: - offset: 0 - size: 32 - bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= - shortName: shortName - type: type - version: version - minimumPlatformVersion: 0 - revision: revision - properties: - nodeDiagnosticInfo: - $ref: '#/components/schemas/NodeDiagnosticInfo' - required: - - nodeDiagnosticInfo - type: object - PrometheusExporterMetricsResponse: - nullable: false - type: string - VaultQueryV1Request: - additionalProperties: false - example: - contractStateType: contractStateType - properties: - contractStateType: - description: "Valid, fully qualified JVM class name which will be fed into\ - \ Class.forName(...)" - minLength: 1 - type: string - type: object - VaultQueryV1Response: - type: object - ListCpiV1Response: - example: - cpis: - - cpiFileFullChecksum: string - cpiFileChecksum: string - cpks: - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - groupPolicy: string - id: - signerSummaryHash: string - name: string - version: string - timestamp: 2022-06-24T10:15:30Z - - cpiFileFullChecksum: string - cpiFileChecksum: string - cpks: - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - groupPolicy: string - id: - signerSummaryHash: string - name: string - version: string - timestamp: 2022-06-24T10:15:30Z - properties: - cpis: - items: - $ref: '#/components/schemas/ListCpiV1Response_cpis_inner' - type: array - required: - - hash - - id - - libraries - - mainBundle - - timestamp - - type - type: object - ListCpiV1Request: - example: - rejectUnauthorized: true - password: password - username: username - properties: - username: - nullable: false - type: string - password: - nullable: false - type: string - rejectUnauthorized: - nullable: false - type: boolean - required: - - password - - rejectUnauthorized - - username - StartFlowV1Request: - description: This method starts a new instance for the specified flow for the - specified holding identity. - example: - rejectUnauthorized: true - holdingIDShortHash: holdingIDShortHash - password: password - requestBody: - numberOfRecords: numberOfRecords - otherMember: otherMember - chatName: chatName - message: message - clientRequestId: clientRequestId - flowClassName: flowClassName - username: username - properties: - username: - nullable: false - type: string - password: - nullable: false - type: string - rejectUnauthorized: - nullable: false - type: boolean - holdingIDShortHash: - nullable: false - type: string - clientRequestId: - nullable: false - type: string - flowClassName: - nullable: false - type: string - requestBody: - $ref: '#/components/schemas/StartFlowV1Request_requestBody' - required: - - clientRequestId - - flowClassName - - password - - rejectUnauthorized - - requestBody - - username - type: object - GetFlowCidV1Request: - description: This method gets the current status of the specified flow instance. - example: - rejectUnauthorized: true - holdingIDShortHash: holdingIDShortHash - password: password - clientRequestId: clientRequestId - username: username - properties: - username: - nullable: false - type: string - password: - nullable: false - type: string - rejectUnauthorized: - nullable: false - type: boolean - holdingIDShortHash: - nullable: false - type: string - clientRequestId: - nullable: false - type: string - required: - - password - - rejectUnauthorized - - username - GetFlowCidV1Response: - properties: - clientRequestId: - example: string - nullable: true - type: string - flowError: - $ref: '#/components/schemas/FlowV1Error' - flowId: - example: string - nullable: true - type: string - flowResult: - example: string - nullable: true - type: string - flowStatus: - example: string - nullable: false - type: string - holdingIDShortHash: - example: string - nullable: false - type: string - timestamp: - example: 2022-06-24T10:15:30Z - format: date-time - nullable: false - type: string - required: - - flowStatus - - holdingIDShortHash - - timestamp - type: object - FlowStatusV1Responses: - properties: - flowStatusResponses: - items: - $ref: '#/components/schemas/FlowStatusV1Responses_flowStatusResponses_inner' - type: array - required: - - flowStatus - - holdingIDShortHash - - timestamp - type: object - StartFlowV1Response: - example: - holdingIDShortHash: string - flowError: - message: string - type: string - clientRequestId: string - flowResult: string - flowStatus: string - flowId: string - timestamp: 2022-06-24T10:15:30Z - properties: - clientRequestId: - example: string - nullable: true - type: string - flowError: - $ref: '#/components/schemas/FlowV1Error' - flowId: - example: string - nullable: true - type: string - flowResult: - example: string - nullable: true - type: string - flowStatus: - example: string - nullable: false - type: string - holdingIDShortHash: - example: string - nullable: false - type: string - timestamp: - example: 2022-06-24T10:15:30Z - format: date-time - nullable: false - type: string - required: - - flowStatus - - holdingIDShortHash - - timestamp - type: object - CPIIDV1: - example: - signerSummaryHash: string - name: string - version: string - properties: - name: - example: string - nullable: false - type: string - signerSummaryHash: - example: string - nullable: true - type: string - version: - example: string - nullable: false - type: string - required: - - name - - version - type: object - FlowV1Error: - example: - message: string - type: string - properties: - message: - example: string - nullable: false - type: string - type: - example: string - nullable: false - type: string - required: - - message - - type - type: object - GetMonitorTransactionsV1Response_tx_inner: - example: - data: data - index: index - properties: - index: - type: string - data: - maxItems: 10000000 - minItems: 0 - type: string - type: object - ListCpiV1Response_cpis_inner_cpks_inner: - example: - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - properties: - hash: - example: string - nullable: false - type: string - id: - $ref: '#/components/schemas/CPIIDV1' - libraries: - items: - example: string - nullable: false - type: string - type: array - mainBundle: - example: string - nullable: false - type: string - timestamp: - example: 2022-06-24T10:15:30Z - format: date-time - nullable: false - type: string - type: - example: string - nullable: false - type: string - type: object - ListCpiV1Response_cpis_inner: - example: - cpiFileFullChecksum: string - cpiFileChecksum: string - cpks: - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - - libraries: - - string - - string - id: - signerSummaryHash: string - name: string - version: string - mainBundle: string - type: string - hash: string - timestamp: 2022-06-24T10:15:30Z - groupPolicy: string - id: - signerSummaryHash: string - name: string - version: string - timestamp: 2022-06-24T10:15:30Z - properties: - cpiFileChecksum: - example: string - nullable: false - type: string - cpiFileFullChecksum: - example: string - nullable: false - type: string - cpks: - items: - $ref: '#/components/schemas/ListCpiV1Response_cpis_inner_cpks_inner' - type: array - groupPolicy: - example: string - nullable: true - type: string - id: - $ref: '#/components/schemas/CPIIDV1' - timestamp: - example: 2022-06-24T10:15:30Z - format: date-time - nullable: false - type: string - type: object - StartFlowV1Request_requestBody: - example: - numberOfRecords: numberOfRecords - otherMember: otherMember - chatName: chatName - message: message - properties: - chatName: - type: string - otherMember: - type: string - message: - type: string - numberOfRecords: - type: string - type: object - FlowStatusV1Responses_flowStatusResponses_inner: - properties: - clientRequestId: - example: string - nullable: true - type: string - flowError: - $ref: '#/components/schemas/FlowV1Error' - flowId: - example: string - nullable: true - type: string - flowResult: - example: string - nullable: true - type: string - flowStatus: - example: string - nullable: false - type: string - holdingIDShortHash: - example: string - nullable: false - type: string - timestamp: - example: 2022-06-24T10:15:30Z - format: date-time - nullable: false - type: string - type: object diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index f9461f232b..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,1644 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiClearMonitorTransactionsV1Request struct { - ctx context.Context - ApiService *DefaultApiService - clearMonitorTransactionsV1Request *ClearMonitorTransactionsV1Request -} - -func (r ApiClearMonitorTransactionsV1Request) ClearMonitorTransactionsV1Request(clearMonitorTransactionsV1Request ClearMonitorTransactionsV1Request) ApiClearMonitorTransactionsV1Request { - r.clearMonitorTransactionsV1Request = &clearMonitorTransactionsV1Request - return r -} - -func (r ApiClearMonitorTransactionsV1Request) Execute() (*ClearMonitorTransactionsV1Response, *http.Response, error) { - return r.ApiService.ClearMonitorTransactionsV1Execute(r) -} - -/* -ClearMonitorTransactionsV1 Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiClearMonitorTransactionsV1Request -*/ -func (a *DefaultApiService) ClearMonitorTransactionsV1(ctx context.Context) ApiClearMonitorTransactionsV1Request { - return ApiClearMonitorTransactionsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ClearMonitorTransactionsV1Response -func (a *DefaultApiService) ClearMonitorTransactionsV1Execute(r ApiClearMonitorTransactionsV1Request) (*ClearMonitorTransactionsV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ClearMonitorTransactionsV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ClearMonitorTransactionsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.clearMonitorTransactionsV1Request == nil { - return localVarReturnValue, nil, reportError("clearMonitorTransactionsV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.clearMonitorTransactionsV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeployContractJarsV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deployContractJarsV1Request *DeployContractJarsV1Request -} - -func (r ApiDeployContractJarsV1Request) DeployContractJarsV1Request(deployContractJarsV1Request DeployContractJarsV1Request) ApiDeployContractJarsV1Request { - r.deployContractJarsV1Request = &deployContractJarsV1Request - return r -} - -func (r ApiDeployContractJarsV1Request) Execute() (*DeployContractJarsSuccessV1Response, *http.Response, error) { - return r.ApiService.DeployContractJarsV1Execute(r) -} - -/* -DeployContractJarsV1 Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeployContractJarsV1Request -*/ -func (a *DefaultApiService) DeployContractJarsV1(ctx context.Context) ApiDeployContractJarsV1Request { - return ApiDeployContractJarsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeployContractJarsSuccessV1Response -func (a *DefaultApiService) DeployContractJarsV1Execute(r ApiDeployContractJarsV1Request) (*DeployContractJarsSuccessV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeployContractJarsSuccessV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeployContractJarsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.deployContractJarsV1Request == nil { - return localVarReturnValue, nil, reportError("deployContractJarsV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deployContractJarsV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v DeployContractJarsBadRequestV1Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDiagnoseNodeV1Request struct { - ctx context.Context - ApiService *DefaultApiService - diagnoseNodeV1Request *DiagnoseNodeV1Request -} - -func (r ApiDiagnoseNodeV1Request) DiagnoseNodeV1Request(diagnoseNodeV1Request DiagnoseNodeV1Request) ApiDiagnoseNodeV1Request { - r.diagnoseNodeV1Request = &diagnoseNodeV1Request - return r -} - -func (r ApiDiagnoseNodeV1Request) Execute() (*DiagnoseNodeV1Response, *http.Response, error) { - return r.ApiService.DiagnoseNodeV1Execute(r) -} - -/* -DiagnoseNodeV1 Method for DiagnoseNodeV1 - -Responds with diagnostic information about the Corda node - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDiagnoseNodeV1Request -*/ -func (a *DefaultApiService) DiagnoseNodeV1(ctx context.Context) ApiDiagnoseNodeV1Request { - return ApiDiagnoseNodeV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DiagnoseNodeV1Response -func (a *DefaultApiService) DiagnoseNodeV1Execute(r ApiDiagnoseNodeV1Request) (*DiagnoseNodeV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DiagnoseNodeV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DiagnoseNodeV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.diagnoseNodeV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetFlowV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getFlowCidV1Request *GetFlowCidV1Request -} - -// This method gets the current status of the specified flow instance. -func (r ApiGetFlowV1Request) GetFlowCidV1Request(getFlowCidV1Request GetFlowCidV1Request) ApiGetFlowV1Request { - r.getFlowCidV1Request = &getFlowCidV1Request - return r -} - -func (r ApiGetFlowV1Request) Execute() (*GetFlowCidV1Response, *http.Response, error) { - return r.ApiService.GetFlowV1Execute(r) -} - -/* -GetFlowV1 This method gets the current status of the specified flow instance. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetFlowV1Request -*/ -func (a *DefaultApiService) GetFlowV1(ctx context.Context) ApiGetFlowV1Request { - return ApiGetFlowV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetFlowCidV1Response -func (a *DefaultApiService) GetFlowV1Execute(r ApiGetFlowV1Request) (*GetFlowCidV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetFlowCidV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetFlowV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getFlowCidV1Request == nil { - return localVarReturnValue, nil, reportError("getFlowCidV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getFlowCidV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetMonitorTransactionsV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getMonitorTransactionsV1Request *GetMonitorTransactionsV1Request -} - -func (r ApiGetMonitorTransactionsV1Request) GetMonitorTransactionsV1Request(getMonitorTransactionsV1Request GetMonitorTransactionsV1Request) ApiGetMonitorTransactionsV1Request { - r.getMonitorTransactionsV1Request = &getMonitorTransactionsV1Request - return r -} - -func (r ApiGetMonitorTransactionsV1Request) Execute() (*GetMonitorTransactionsV1Response, *http.Response, error) { - return r.ApiService.GetMonitorTransactionsV1Execute(r) -} - -/* -GetMonitorTransactionsV1 Get transactions for monitored state classes. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetMonitorTransactionsV1Request -*/ -func (a *DefaultApiService) GetMonitorTransactionsV1(ctx context.Context) ApiGetMonitorTransactionsV1Request { - return ApiGetMonitorTransactionsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetMonitorTransactionsV1Response -func (a *DefaultApiService) GetMonitorTransactionsV1Execute(r ApiGetMonitorTransactionsV1Request) (*GetMonitorTransactionsV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetMonitorTransactionsV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetMonitorTransactionsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getMonitorTransactionsV1Request == nil { - return localVarReturnValue, nil, reportError("getMonitorTransactionsV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getMonitorTransactionsV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsV1Execute(r) -} - -/* -GetPrometheusMetricsV1 Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsV1Request -*/ -func (a *DefaultApiService) GetPrometheusMetricsV1(ctx context.Context) ApiGetPrometheusMetricsV1Request { - return ApiGetPrometheusMetricsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsV1Execute(r ApiGetPrometheusMetricsV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetricsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInvokeContractV1Request struct { - ctx context.Context - ApiService *DefaultApiService - invokeContractV1Request *InvokeContractV1Request -} - -func (r ApiInvokeContractV1Request) InvokeContractV1Request(invokeContractV1Request InvokeContractV1Request) ApiInvokeContractV1Request { - r.invokeContractV1Request = &invokeContractV1Request - return r -} - -func (r ApiInvokeContractV1Request) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.InvokeContractV1Execute(r) -} - -/* -InvokeContractV1 Invokes a contract on a Corda ledger (e.g. a flow) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInvokeContractV1Request -*/ -func (a *DefaultApiService) InvokeContractV1(ctx context.Context) ApiInvokeContractV1Request { - return ApiInvokeContractV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) InvokeContractV1Execute(r ApiInvokeContractV1Request) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InvokeContractV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.invokeContractV1Request == nil { - return localVarReturnValue, nil, reportError("invokeContractV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.invokeContractV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListCpiV1Request struct { - ctx context.Context - ApiService *DefaultApiService - listCpiV1Request *ListCpiV1Request -} - -func (r ApiListCpiV1Request) ListCpiV1Request(listCpiV1Request ListCpiV1Request) ApiListCpiV1Request { - r.listCpiV1Request = &listCpiV1Request - return r -} - -func (r ApiListCpiV1Request) Execute() (*ListCpiV1Response, *http.Response, error) { - return r.ApiService.ListCpiV1Execute(r) -} - -/* -ListCpiV1 List all CPIs uploaded to the cluster - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListCpiV1Request -*/ -func (a *DefaultApiService) ListCpiV1(ctx context.Context) ApiListCpiV1Request { - return ApiListCpiV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ListCpiV1Response -func (a *DefaultApiService) ListCpiV1Execute(r ApiListCpiV1Request) (*ListCpiV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListCpiV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListCpiV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.listCpiV1Request == nil { - return localVarReturnValue, nil, reportError("listCpiV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.listCpiV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListFlowV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getFlowCidV1Request *GetFlowCidV1Request -} - -// This method gets the current status of the specified flow instance. -func (r ApiListFlowV1Request) GetFlowCidV1Request(getFlowCidV1Request GetFlowCidV1Request) ApiListFlowV1Request { - r.getFlowCidV1Request = &getFlowCidV1Request - return r -} - -func (r ApiListFlowV1Request) Execute() (*FlowStatusV1Responses, *http.Response, error) { - return r.ApiService.ListFlowV1Execute(r) -} - -/* -ListFlowV1 This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListFlowV1Request -*/ -func (a *DefaultApiService) ListFlowV1(ctx context.Context) ApiListFlowV1Request { - return ApiListFlowV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return FlowStatusV1Responses -func (a *DefaultApiService) ListFlowV1Execute(r ApiListFlowV1Request) (*FlowStatusV1Responses, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FlowStatusV1Responses - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListFlowV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getFlowCidV1Request == nil { - return localVarReturnValue, nil, reportError("getFlowCidV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getFlowCidV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListFlowsV1Request struct { - ctx context.Context - ApiService *DefaultApiService - listFlowsV1Request *ListFlowsV1Request -} - -func (r ApiListFlowsV1Request) ListFlowsV1Request(listFlowsV1Request ListFlowsV1Request) ApiListFlowsV1Request { - r.listFlowsV1Request = &listFlowsV1Request - return r -} - -func (r ApiListFlowsV1Request) Execute() (*ListFlowsV1Response, *http.Response, error) { - return r.ApiService.ListFlowsV1Execute(r) -} - -/* -ListFlowsV1 Method for ListFlowsV1 - -Responds with a list of the flows on the Corda node. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListFlowsV1Request -*/ -func (a *DefaultApiService) ListFlowsV1(ctx context.Context) ApiListFlowsV1Request { - return ApiListFlowsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ListFlowsV1Response -func (a *DefaultApiService) ListFlowsV1Execute(r ApiListFlowsV1Request) (*ListFlowsV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListFlowsV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListFlowsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.listFlowsV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiNetworkMapV1Request struct { - ctx context.Context - ApiService *DefaultApiService - body *map[string]interface{} -} - -func (r ApiNetworkMapV1Request) Body(body map[string]interface{}) ApiNetworkMapV1Request { - r.body = &body - return r -} - -func (r ApiNetworkMapV1Request) Execute() ([]NodeInfo, *http.Response, error) { - return r.ApiService.NetworkMapV1Execute(r) -} - -/* -NetworkMapV1 Method for NetworkMapV1 - -Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiNetworkMapV1Request -*/ -func (a *DefaultApiService) NetworkMapV1(ctx context.Context) ApiNetworkMapV1Request { - return ApiNetworkMapV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []NodeInfo -func (a *DefaultApiService) NetworkMapV1Execute(r ApiNetworkMapV1Request) ([]NodeInfo, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []NodeInfo - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.NetworkMapV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiStartFlowV1Request struct { - ctx context.Context - ApiService *DefaultApiService - startFlowV1Request *StartFlowV1Request -} - -// Request body for starting a flow -func (r ApiStartFlowV1Request) StartFlowV1Request(startFlowV1Request StartFlowV1Request) ApiStartFlowV1Request { - r.startFlowV1Request = &startFlowV1Request - return r -} - -func (r ApiStartFlowV1Request) Execute() (*StartFlowV1Response, *http.Response, error) { - return r.ApiService.StartFlowV1Execute(r) -} - -/* -StartFlowV1 This method starts a new instance for the specified flow for the specified holding identity. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiStartFlowV1Request -*/ -func (a *DefaultApiService) StartFlowV1(ctx context.Context) ApiStartFlowV1Request { - return ApiStartFlowV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return StartFlowV1Response -func (a *DefaultApiService) StartFlowV1Execute(r ApiStartFlowV1Request) (*StartFlowV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *StartFlowV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.StartFlowV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.startFlowV1Request == nil { - return localVarReturnValue, nil, reportError("startFlowV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.startFlowV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiStartMonitorV1Request struct { - ctx context.Context - ApiService *DefaultApiService - startMonitorV1Request *StartMonitorV1Request -} - -func (r ApiStartMonitorV1Request) StartMonitorV1Request(startMonitorV1Request StartMonitorV1Request) ApiStartMonitorV1Request { - r.startMonitorV1Request = &startMonitorV1Request - return r -} - -func (r ApiStartMonitorV1Request) Execute() (*StartMonitorV1Response, *http.Response, error) { - return r.ApiService.StartMonitorV1Execute(r) -} - -/* -StartMonitorV1 Start monitoring corda changes (transactions) of given state class - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiStartMonitorV1Request -*/ -func (a *DefaultApiService) StartMonitorV1(ctx context.Context) ApiStartMonitorV1Request { - return ApiStartMonitorV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return StartMonitorV1Response -func (a *DefaultApiService) StartMonitorV1Execute(r ApiStartMonitorV1Request) (*StartMonitorV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *StartMonitorV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.StartMonitorV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.startMonitorV1Request == nil { - return localVarReturnValue, nil, reportError("startMonitorV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.startMonitorV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiStopMonitorV1Request struct { - ctx context.Context - ApiService *DefaultApiService - stopMonitorV1Request *StopMonitorV1Request -} - -func (r ApiStopMonitorV1Request) StopMonitorV1Request(stopMonitorV1Request StopMonitorV1Request) ApiStopMonitorV1Request { - r.stopMonitorV1Request = &stopMonitorV1Request - return r -} - -func (r ApiStopMonitorV1Request) Execute() (*StopMonitorV1Response, *http.Response, error) { - return r.ApiService.StopMonitorV1Execute(r) -} - -/* -StopMonitorV1 Stop monitoring corda changes (transactions) of given state class - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiStopMonitorV1Request -*/ -func (a *DefaultApiService) StopMonitorV1(ctx context.Context) ApiStopMonitorV1Request { - return ApiStopMonitorV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return StopMonitorV1Response -func (a *DefaultApiService) StopMonitorV1Execute(r ApiStopMonitorV1Request) (*StopMonitorV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *StopMonitorV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.StopMonitorV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.stopMonitorV1Request == nil { - return localVarReturnValue, nil, reportError("stopMonitorV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.stopMonitorV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiVaultQueryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - vaultQueryV1Request *VaultQueryV1Request -} - -func (r ApiVaultQueryV1Request) VaultQueryV1Request(vaultQueryV1Request VaultQueryV1Request) ApiVaultQueryV1Request { - r.vaultQueryV1Request = &vaultQueryV1Request - return r -} - -func (r ApiVaultQueryV1Request) Execute() (map[string]interface{}, *http.Response, error) { - return r.ApiService.VaultQueryV1Execute(r) -} - -/* -VaultQueryV1 Method for VaultQueryV1 - -Queryes the vault service for state references based on JVM class names. Custom filters are not supported by this endpoint. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiVaultQueryV1Request -*/ -func (a *DefaultApiService) VaultQueryV1(ctx context.Context) ApiVaultQueryV1Request { - return ApiVaultQueryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return map[string]interface{} -func (a *DefaultApiService) VaultQueryV1Execute(r ApiVaultQueryV1Request) (map[string]interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VaultQueryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.vaultQueryV1Request == nil { - return localVarReturnValue, nil, reportError("vaultQueryV1Request is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.vaultQueryV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 1af87214ec..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cacti Plugin - Connector Corda API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 1826de4bb5..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index b77723a206..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_clear_monitor_transactions_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_clear_monitor_transactions_v1_request.go deleted file mode 100644 index de5a31ce65..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_clear_monitor_transactions_v1_request.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the ClearMonitorTransactionsV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ClearMonitorTransactionsV1Request{} - -// ClearMonitorTransactionsV1Request struct for ClearMonitorTransactionsV1Request -type ClearMonitorTransactionsV1Request struct { - // ID of a client application that wants to monitor the state changes - ClientAppId string `json:"clientAppId"` - // The fully qualified name of the Corda state to monitor - StateFullClassName string `json:"stateFullClassName"` - TxIndexes []string `json:"txIndexes"` -} - -// NewClearMonitorTransactionsV1Request instantiates a new ClearMonitorTransactionsV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewClearMonitorTransactionsV1Request(clientAppId string, stateFullClassName string, txIndexes []string) *ClearMonitorTransactionsV1Request { - this := ClearMonitorTransactionsV1Request{} - this.ClientAppId = clientAppId - this.StateFullClassName = stateFullClassName - this.TxIndexes = txIndexes - return &this -} - -// NewClearMonitorTransactionsV1RequestWithDefaults instantiates a new ClearMonitorTransactionsV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewClearMonitorTransactionsV1RequestWithDefaults() *ClearMonitorTransactionsV1Request { - this := ClearMonitorTransactionsV1Request{} - return &this -} - -// GetClientAppId returns the ClientAppId field value -func (o *ClearMonitorTransactionsV1Request) GetClientAppId() string { - if o == nil { - var ret string - return ret - } - - return o.ClientAppId -} - -// GetClientAppIdOk returns a tuple with the ClientAppId field value -// and a boolean to check if the value has been set. -func (o *ClearMonitorTransactionsV1Request) GetClientAppIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientAppId, true -} - -// SetClientAppId sets field value -func (o *ClearMonitorTransactionsV1Request) SetClientAppId(v string) { - o.ClientAppId = v -} - -// GetStateFullClassName returns the StateFullClassName field value -func (o *ClearMonitorTransactionsV1Request) GetStateFullClassName() string { - if o == nil { - var ret string - return ret - } - - return o.StateFullClassName -} - -// GetStateFullClassNameOk returns a tuple with the StateFullClassName field value -// and a boolean to check if the value has been set. -func (o *ClearMonitorTransactionsV1Request) GetStateFullClassNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StateFullClassName, true -} - -// SetStateFullClassName sets field value -func (o *ClearMonitorTransactionsV1Request) SetStateFullClassName(v string) { - o.StateFullClassName = v -} - -// GetTxIndexes returns the TxIndexes field value -func (o *ClearMonitorTransactionsV1Request) GetTxIndexes() []string { - if o == nil { - var ret []string - return ret - } - - return o.TxIndexes -} - -// GetTxIndexesOk returns a tuple with the TxIndexes field value -// and a boolean to check if the value has been set. -func (o *ClearMonitorTransactionsV1Request) GetTxIndexesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.TxIndexes, true -} - -// SetTxIndexes sets field value -func (o *ClearMonitorTransactionsV1Request) SetTxIndexes(v []string) { - o.TxIndexes = v -} - -func (o ClearMonitorTransactionsV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ClearMonitorTransactionsV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["clientAppId"] = o.ClientAppId - toSerialize["stateFullClassName"] = o.StateFullClassName - toSerialize["txIndexes"] = o.TxIndexes - return toSerialize, nil -} - -type NullableClearMonitorTransactionsV1Request struct { - value *ClearMonitorTransactionsV1Request - isSet bool -} - -func (v NullableClearMonitorTransactionsV1Request) Get() *ClearMonitorTransactionsV1Request { - return v.value -} - -func (v *NullableClearMonitorTransactionsV1Request) Set(val *ClearMonitorTransactionsV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableClearMonitorTransactionsV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableClearMonitorTransactionsV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClearMonitorTransactionsV1Request(val *ClearMonitorTransactionsV1Request) *NullableClearMonitorTransactionsV1Request { - return &NullableClearMonitorTransactionsV1Request{value: val, isSet: true} -} - -func (v NullableClearMonitorTransactionsV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClearMonitorTransactionsV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_clear_monitor_transactions_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_clear_monitor_transactions_v1_response.go deleted file mode 100644 index 7afed0f8d6..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_clear_monitor_transactions_v1_response.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the ClearMonitorTransactionsV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ClearMonitorTransactionsV1Response{} - -// ClearMonitorTransactionsV1Response struct for ClearMonitorTransactionsV1Response -type ClearMonitorTransactionsV1Response struct { - // Flag set to true if operation completed correctly. - Success bool `json:"success"` - // Message describing operation status or any errors that occurred. - Msg string `json:"msg"` -} - -// NewClearMonitorTransactionsV1Response instantiates a new ClearMonitorTransactionsV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewClearMonitorTransactionsV1Response(success bool, msg string) *ClearMonitorTransactionsV1Response { - this := ClearMonitorTransactionsV1Response{} - this.Success = success - this.Msg = msg - return &this -} - -// NewClearMonitorTransactionsV1ResponseWithDefaults instantiates a new ClearMonitorTransactionsV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewClearMonitorTransactionsV1ResponseWithDefaults() *ClearMonitorTransactionsV1Response { - this := ClearMonitorTransactionsV1Response{} - return &this -} - -// GetSuccess returns the Success field value -func (o *ClearMonitorTransactionsV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *ClearMonitorTransactionsV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *ClearMonitorTransactionsV1Response) SetSuccess(v bool) { - o.Success = v -} - -// GetMsg returns the Msg field value -func (o *ClearMonitorTransactionsV1Response) GetMsg() string { - if o == nil { - var ret string - return ret - } - - return o.Msg -} - -// GetMsgOk returns a tuple with the Msg field value -// and a boolean to check if the value has been set. -func (o *ClearMonitorTransactionsV1Response) GetMsgOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Msg, true -} - -// SetMsg sets field value -func (o *ClearMonitorTransactionsV1Response) SetMsg(v string) { - o.Msg = v -} - -func (o ClearMonitorTransactionsV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ClearMonitorTransactionsV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["success"] = o.Success - toSerialize["msg"] = o.Msg - return toSerialize, nil -} - -type NullableClearMonitorTransactionsV1Response struct { - value *ClearMonitorTransactionsV1Response - isSet bool -} - -func (v NullableClearMonitorTransactionsV1Response) Get() *ClearMonitorTransactionsV1Response { - return v.value -} - -func (v *NullableClearMonitorTransactionsV1Response) Set(val *ClearMonitorTransactionsV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableClearMonitorTransactionsV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableClearMonitorTransactionsV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClearMonitorTransactionsV1Response(val *ClearMonitorTransactionsV1Response) *NullableClearMonitorTransactionsV1Response { - return &NullableClearMonitorTransactionsV1Response{value: val, isSet: true} -} - -func (v NullableClearMonitorTransactionsV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClearMonitorTransactionsV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_corda_node_ssh_credentials.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_corda_node_ssh_credentials.go deleted file mode 100644 index fac71d9912..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_corda_node_ssh_credentials.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the CordaNodeSshCredentials type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CordaNodeSshCredentials{} - -// CordaNodeSshCredentials struct for CordaNodeSshCredentials -type CordaNodeSshCredentials struct { - HostKeyEntry string `json:"hostKeyEntry"` - Username string `json:"username"` - Password string `json:"password"` - Hostname string `json:"hostname"` - Port int32 `json:"port"` -} - -// NewCordaNodeSshCredentials instantiates a new CordaNodeSshCredentials object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCordaNodeSshCredentials(hostKeyEntry string, username string, password string, hostname string, port int32) *CordaNodeSshCredentials { - this := CordaNodeSshCredentials{} - this.HostKeyEntry = hostKeyEntry - this.Username = username - this.Password = password - this.Hostname = hostname - this.Port = port - return &this -} - -// NewCordaNodeSshCredentialsWithDefaults instantiates a new CordaNodeSshCredentials object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCordaNodeSshCredentialsWithDefaults() *CordaNodeSshCredentials { - this := CordaNodeSshCredentials{} - return &this -} - -// GetHostKeyEntry returns the HostKeyEntry field value -func (o *CordaNodeSshCredentials) GetHostKeyEntry() string { - if o == nil { - var ret string - return ret - } - - return o.HostKeyEntry -} - -// GetHostKeyEntryOk returns a tuple with the HostKeyEntry field value -// and a boolean to check if the value has been set. -func (o *CordaNodeSshCredentials) GetHostKeyEntryOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HostKeyEntry, true -} - -// SetHostKeyEntry sets field value -func (o *CordaNodeSshCredentials) SetHostKeyEntry(v string) { - o.HostKeyEntry = v -} - -// GetUsername returns the Username field value -func (o *CordaNodeSshCredentials) GetUsername() string { - if o == nil { - var ret string - return ret - } - - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value -// and a boolean to check if the value has been set. -func (o *CordaNodeSshCredentials) GetUsernameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Username, true -} - -// SetUsername sets field value -func (o *CordaNodeSshCredentials) SetUsername(v string) { - o.Username = v -} - -// GetPassword returns the Password field value -func (o *CordaNodeSshCredentials) GetPassword() string { - if o == nil { - var ret string - return ret - } - - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value -// and a boolean to check if the value has been set. -func (o *CordaNodeSshCredentials) GetPasswordOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Password, true -} - -// SetPassword sets field value -func (o *CordaNodeSshCredentials) SetPassword(v string) { - o.Password = v -} - -// GetHostname returns the Hostname field value -func (o *CordaNodeSshCredentials) GetHostname() string { - if o == nil { - var ret string - return ret - } - - return o.Hostname -} - -// GetHostnameOk returns a tuple with the Hostname field value -// and a boolean to check if the value has been set. -func (o *CordaNodeSshCredentials) GetHostnameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Hostname, true -} - -// SetHostname sets field value -func (o *CordaNodeSshCredentials) SetHostname(v string) { - o.Hostname = v -} - -// GetPort returns the Port field value -func (o *CordaNodeSshCredentials) GetPort() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Port -} - -// GetPortOk returns a tuple with the Port field value -// and a boolean to check if the value has been set. -func (o *CordaNodeSshCredentials) GetPortOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Port, true -} - -// SetPort sets field value -func (o *CordaNodeSshCredentials) SetPort(v int32) { - o.Port = v -} - -func (o CordaNodeSshCredentials) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CordaNodeSshCredentials) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["hostKeyEntry"] = o.HostKeyEntry - toSerialize["username"] = o.Username - toSerialize["password"] = o.Password - toSerialize["hostname"] = o.Hostname - toSerialize["port"] = o.Port - return toSerialize, nil -} - -type NullableCordaNodeSshCredentials struct { - value *CordaNodeSshCredentials - isSet bool -} - -func (v NullableCordaNodeSshCredentials) Get() *CordaNodeSshCredentials { - return v.value -} - -func (v *NullableCordaNodeSshCredentials) Set(val *CordaNodeSshCredentials) { - v.value = val - v.isSet = true -} - -func (v NullableCordaNodeSshCredentials) IsSet() bool { - return v.isSet -} - -func (v *NullableCordaNodeSshCredentials) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCordaNodeSshCredentials(val *CordaNodeSshCredentials) *NullableCordaNodeSshCredentials { - return &NullableCordaNodeSshCredentials{value: val, isSet: true} -} - -func (v NullableCordaNodeSshCredentials) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCordaNodeSshCredentials) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_corda_rpc_credentials.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_corda_rpc_credentials.go deleted file mode 100644 index bd3a6ff357..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_corda_rpc_credentials.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the CordaRpcCredentials type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CordaRpcCredentials{} - -// CordaRpcCredentials struct for CordaRpcCredentials -type CordaRpcCredentials struct { - Hostname string `json:"hostname"` - Port int32 `json:"port"` - Username string `json:"username"` - Password string `json:"password"` -} - -// NewCordaRpcCredentials instantiates a new CordaRpcCredentials object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCordaRpcCredentials(hostname string, port int32, username string, password string) *CordaRpcCredentials { - this := CordaRpcCredentials{} - this.Hostname = hostname - this.Port = port - this.Username = username - this.Password = password - return &this -} - -// NewCordaRpcCredentialsWithDefaults instantiates a new CordaRpcCredentials object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCordaRpcCredentialsWithDefaults() *CordaRpcCredentials { - this := CordaRpcCredentials{} - return &this -} - -// GetHostname returns the Hostname field value -func (o *CordaRpcCredentials) GetHostname() string { - if o == nil { - var ret string - return ret - } - - return o.Hostname -} - -// GetHostnameOk returns a tuple with the Hostname field value -// and a boolean to check if the value has been set. -func (o *CordaRpcCredentials) GetHostnameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Hostname, true -} - -// SetHostname sets field value -func (o *CordaRpcCredentials) SetHostname(v string) { - o.Hostname = v -} - -// GetPort returns the Port field value -func (o *CordaRpcCredentials) GetPort() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Port -} - -// GetPortOk returns a tuple with the Port field value -// and a boolean to check if the value has been set. -func (o *CordaRpcCredentials) GetPortOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Port, true -} - -// SetPort sets field value -func (o *CordaRpcCredentials) SetPort(v int32) { - o.Port = v -} - -// GetUsername returns the Username field value -func (o *CordaRpcCredentials) GetUsername() string { - if o == nil { - var ret string - return ret - } - - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value -// and a boolean to check if the value has been set. -func (o *CordaRpcCredentials) GetUsernameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Username, true -} - -// SetUsername sets field value -func (o *CordaRpcCredentials) SetUsername(v string) { - o.Username = v -} - -// GetPassword returns the Password field value -func (o *CordaRpcCredentials) GetPassword() string { - if o == nil { - var ret string - return ret - } - - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value -// and a boolean to check if the value has been set. -func (o *CordaRpcCredentials) GetPasswordOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Password, true -} - -// SetPassword sets field value -func (o *CordaRpcCredentials) SetPassword(v string) { - o.Password = v -} - -func (o CordaRpcCredentials) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CordaRpcCredentials) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["hostname"] = o.Hostname - toSerialize["port"] = o.Port - toSerialize["username"] = o.Username - toSerialize["password"] = o.Password - return toSerialize, nil -} - -type NullableCordaRpcCredentials struct { - value *CordaRpcCredentials - isSet bool -} - -func (v NullableCordaRpcCredentials) Get() *CordaRpcCredentials { - return v.value -} - -func (v *NullableCordaRpcCredentials) Set(val *CordaRpcCredentials) { - v.value = val - v.isSet = true -} - -func (v NullableCordaRpcCredentials) IsSet() bool { - return v.isSet -} - -func (v *NullableCordaRpcCredentials) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCordaRpcCredentials(val *CordaRpcCredentials) *NullableCordaRpcCredentials { - return &NullableCordaRpcCredentials{value: val, isSet: true} -} - -func (v NullableCordaRpcCredentials) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCordaRpcCredentials) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_corda_x500_name.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_corda_x500_name.go deleted file mode 100644 index 9e996a773f..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_corda_x500_name.go +++ /dev/null @@ -1,306 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the CordaX500Name type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CordaX500Name{} - -// CordaX500Name struct for CordaX500Name -type CordaX500Name struct { - CommonName *string `json:"commonName,omitempty"` - OrganisationUnit *string `json:"organisationUnit,omitempty"` - Organisation string `json:"organisation"` - Locality string `json:"locality"` - State *string `json:"state,omitempty"` - Country string `json:"country"` - X500Principal X500Principal `json:"x500Principal"` -} - -// NewCordaX500Name instantiates a new CordaX500Name object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCordaX500Name(organisation string, locality string, country string, x500Principal X500Principal) *CordaX500Name { - this := CordaX500Name{} - this.Organisation = organisation - this.Locality = locality - this.Country = country - this.X500Principal = x500Principal - return &this -} - -// NewCordaX500NameWithDefaults instantiates a new CordaX500Name object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCordaX500NameWithDefaults() *CordaX500Name { - this := CordaX500Name{} - return &this -} - -// GetCommonName returns the CommonName field value if set, zero value otherwise. -func (o *CordaX500Name) GetCommonName() string { - if o == nil || IsNil(o.CommonName) { - var ret string - return ret - } - return *o.CommonName -} - -// GetCommonNameOk returns a tuple with the CommonName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CordaX500Name) GetCommonNameOk() (*string, bool) { - if o == nil || IsNil(o.CommonName) { - return nil, false - } - return o.CommonName, true -} - -// HasCommonName returns a boolean if a field has been set. -func (o *CordaX500Name) HasCommonName() bool { - if o != nil && !IsNil(o.CommonName) { - return true - } - - return false -} - -// SetCommonName gets a reference to the given string and assigns it to the CommonName field. -func (o *CordaX500Name) SetCommonName(v string) { - o.CommonName = &v -} - -// GetOrganisationUnit returns the OrganisationUnit field value if set, zero value otherwise. -func (o *CordaX500Name) GetOrganisationUnit() string { - if o == nil || IsNil(o.OrganisationUnit) { - var ret string - return ret - } - return *o.OrganisationUnit -} - -// GetOrganisationUnitOk returns a tuple with the OrganisationUnit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CordaX500Name) GetOrganisationUnitOk() (*string, bool) { - if o == nil || IsNil(o.OrganisationUnit) { - return nil, false - } - return o.OrganisationUnit, true -} - -// HasOrganisationUnit returns a boolean if a field has been set. -func (o *CordaX500Name) HasOrganisationUnit() bool { - if o != nil && !IsNil(o.OrganisationUnit) { - return true - } - - return false -} - -// SetOrganisationUnit gets a reference to the given string and assigns it to the OrganisationUnit field. -func (o *CordaX500Name) SetOrganisationUnit(v string) { - o.OrganisationUnit = &v -} - -// GetOrganisation returns the Organisation field value -func (o *CordaX500Name) GetOrganisation() string { - if o == nil { - var ret string - return ret - } - - return o.Organisation -} - -// GetOrganisationOk returns a tuple with the Organisation field value -// and a boolean to check if the value has been set. -func (o *CordaX500Name) GetOrganisationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Organisation, true -} - -// SetOrganisation sets field value -func (o *CordaX500Name) SetOrganisation(v string) { - o.Organisation = v -} - -// GetLocality returns the Locality field value -func (o *CordaX500Name) GetLocality() string { - if o == nil { - var ret string - return ret - } - - return o.Locality -} - -// GetLocalityOk returns a tuple with the Locality field value -// and a boolean to check if the value has been set. -func (o *CordaX500Name) GetLocalityOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Locality, true -} - -// SetLocality sets field value -func (o *CordaX500Name) SetLocality(v string) { - o.Locality = v -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *CordaX500Name) GetState() string { - if o == nil || IsNil(o.State) { - var ret string - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CordaX500Name) GetStateOk() (*string, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *CordaX500Name) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given string and assigns it to the State field. -func (o *CordaX500Name) SetState(v string) { - o.State = &v -} - -// GetCountry returns the Country field value -func (o *CordaX500Name) GetCountry() string { - if o == nil { - var ret string - return ret - } - - return o.Country -} - -// GetCountryOk returns a tuple with the Country field value -// and a boolean to check if the value has been set. -func (o *CordaX500Name) GetCountryOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Country, true -} - -// SetCountry sets field value -func (o *CordaX500Name) SetCountry(v string) { - o.Country = v -} - -// GetX500Principal returns the X500Principal field value -func (o *CordaX500Name) GetX500Principal() X500Principal { - if o == nil { - var ret X500Principal - return ret - } - - return o.X500Principal -} - -// GetX500PrincipalOk returns a tuple with the X500Principal field value -// and a boolean to check if the value has been set. -func (o *CordaX500Name) GetX500PrincipalOk() (*X500Principal, bool) { - if o == nil { - return nil, false - } - return &o.X500Principal, true -} - -// SetX500Principal sets field value -func (o *CordaX500Name) SetX500Principal(v X500Principal) { - o.X500Principal = v -} - -func (o CordaX500Name) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CordaX500Name) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CommonName) { - toSerialize["commonName"] = o.CommonName - } - if !IsNil(o.OrganisationUnit) { - toSerialize["organisationUnit"] = o.OrganisationUnit - } - toSerialize["organisation"] = o.Organisation - toSerialize["locality"] = o.Locality - if !IsNil(o.State) { - toSerialize["state"] = o.State - } - toSerialize["country"] = o.Country - toSerialize["x500Principal"] = o.X500Principal - return toSerialize, nil -} - -type NullableCordaX500Name struct { - value *CordaX500Name - isSet bool -} - -func (v NullableCordaX500Name) Get() *CordaX500Name { - return v.value -} - -func (v *NullableCordaX500Name) Set(val *CordaX500Name) { - v.value = val - v.isSet = true -} - -func (v NullableCordaX500Name) IsSet() bool { - return v.isSet -} - -func (v *NullableCordaX500Name) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCordaX500Name(val *CordaX500Name) *NullableCordaX500Name { - return &NullableCordaX500Name{value: val, isSet: true} -} - -func (v NullableCordaX500Name) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCordaX500Name) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cordapp_deployment_config.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cordapp_deployment_config.go deleted file mode 100644 index 0aa8f03c1c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cordapp_deployment_config.go +++ /dev/null @@ -1,256 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the CordappDeploymentConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CordappDeploymentConfig{} - -// CordappDeploymentConfig struct for CordappDeploymentConfig -type CordappDeploymentConfig struct { - SshCredentials CordaNodeSshCredentials `json:"sshCredentials"` - RpcCredentials CordaRpcCredentials `json:"rpcCredentials"` - // The shell command to execute in order to start back up a Corda node after having placed new jars in the cordapp directory of said node. - CordaNodeStartCmd string `json:"cordaNodeStartCmd"` - // The absolute file system path where the Corda Node is expecting deployed Cordapp jar files to be placed. - CordappDir string `json:"cordappDir"` - // The absolute file system path where the corda.jar file of the node can be found. This is used to execute database schema migrations where applicable (H2 database in use in development environments). - CordaJarPath string `json:"cordaJarPath"` - // The absolute file system path where the base directory of the Corda node can be found. This is used to pass in to corda.jar when being invoked for certain tasks such as executing database schema migrations for a deployed contract. - NodeBaseDirPath string `json:"nodeBaseDirPath"` -} - -// NewCordappDeploymentConfig instantiates a new CordappDeploymentConfig object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCordappDeploymentConfig(sshCredentials CordaNodeSshCredentials, rpcCredentials CordaRpcCredentials, cordaNodeStartCmd string, cordappDir string, cordaJarPath string, nodeBaseDirPath string) *CordappDeploymentConfig { - this := CordappDeploymentConfig{} - this.SshCredentials = sshCredentials - this.RpcCredentials = rpcCredentials - this.CordaNodeStartCmd = cordaNodeStartCmd - this.CordappDir = cordappDir - this.CordaJarPath = cordaJarPath - this.NodeBaseDirPath = nodeBaseDirPath - return &this -} - -// NewCordappDeploymentConfigWithDefaults instantiates a new CordappDeploymentConfig object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCordappDeploymentConfigWithDefaults() *CordappDeploymentConfig { - this := CordappDeploymentConfig{} - return &this -} - -// GetSshCredentials returns the SshCredentials field value -func (o *CordappDeploymentConfig) GetSshCredentials() CordaNodeSshCredentials { - if o == nil { - var ret CordaNodeSshCredentials - return ret - } - - return o.SshCredentials -} - -// GetSshCredentialsOk returns a tuple with the SshCredentials field value -// and a boolean to check if the value has been set. -func (o *CordappDeploymentConfig) GetSshCredentialsOk() (*CordaNodeSshCredentials, bool) { - if o == nil { - return nil, false - } - return &o.SshCredentials, true -} - -// SetSshCredentials sets field value -func (o *CordappDeploymentConfig) SetSshCredentials(v CordaNodeSshCredentials) { - o.SshCredentials = v -} - -// GetRpcCredentials returns the RpcCredentials field value -func (o *CordappDeploymentConfig) GetRpcCredentials() CordaRpcCredentials { - if o == nil { - var ret CordaRpcCredentials - return ret - } - - return o.RpcCredentials -} - -// GetRpcCredentialsOk returns a tuple with the RpcCredentials field value -// and a boolean to check if the value has been set. -func (o *CordappDeploymentConfig) GetRpcCredentialsOk() (*CordaRpcCredentials, bool) { - if o == nil { - return nil, false - } - return &o.RpcCredentials, true -} - -// SetRpcCredentials sets field value -func (o *CordappDeploymentConfig) SetRpcCredentials(v CordaRpcCredentials) { - o.RpcCredentials = v -} - -// GetCordaNodeStartCmd returns the CordaNodeStartCmd field value -func (o *CordappDeploymentConfig) GetCordaNodeStartCmd() string { - if o == nil { - var ret string - return ret - } - - return o.CordaNodeStartCmd -} - -// GetCordaNodeStartCmdOk returns a tuple with the CordaNodeStartCmd field value -// and a boolean to check if the value has been set. -func (o *CordappDeploymentConfig) GetCordaNodeStartCmdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CordaNodeStartCmd, true -} - -// SetCordaNodeStartCmd sets field value -func (o *CordappDeploymentConfig) SetCordaNodeStartCmd(v string) { - o.CordaNodeStartCmd = v -} - -// GetCordappDir returns the CordappDir field value -func (o *CordappDeploymentConfig) GetCordappDir() string { - if o == nil { - var ret string - return ret - } - - return o.CordappDir -} - -// GetCordappDirOk returns a tuple with the CordappDir field value -// and a boolean to check if the value has been set. -func (o *CordappDeploymentConfig) GetCordappDirOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CordappDir, true -} - -// SetCordappDir sets field value -func (o *CordappDeploymentConfig) SetCordappDir(v string) { - o.CordappDir = v -} - -// GetCordaJarPath returns the CordaJarPath field value -func (o *CordappDeploymentConfig) GetCordaJarPath() string { - if o == nil { - var ret string - return ret - } - - return o.CordaJarPath -} - -// GetCordaJarPathOk returns a tuple with the CordaJarPath field value -// and a boolean to check if the value has been set. -func (o *CordappDeploymentConfig) GetCordaJarPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CordaJarPath, true -} - -// SetCordaJarPath sets field value -func (o *CordappDeploymentConfig) SetCordaJarPath(v string) { - o.CordaJarPath = v -} - -// GetNodeBaseDirPath returns the NodeBaseDirPath field value -func (o *CordappDeploymentConfig) GetNodeBaseDirPath() string { - if o == nil { - var ret string - return ret - } - - return o.NodeBaseDirPath -} - -// GetNodeBaseDirPathOk returns a tuple with the NodeBaseDirPath field value -// and a boolean to check if the value has been set. -func (o *CordappDeploymentConfig) GetNodeBaseDirPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.NodeBaseDirPath, true -} - -// SetNodeBaseDirPath sets field value -func (o *CordappDeploymentConfig) SetNodeBaseDirPath(v string) { - o.NodeBaseDirPath = v -} - -func (o CordappDeploymentConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CordappDeploymentConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sshCredentials"] = o.SshCredentials - toSerialize["rpcCredentials"] = o.RpcCredentials - toSerialize["cordaNodeStartCmd"] = o.CordaNodeStartCmd - toSerialize["cordappDir"] = o.CordappDir - toSerialize["cordaJarPath"] = o.CordaJarPath - toSerialize["nodeBaseDirPath"] = o.NodeBaseDirPath - return toSerialize, nil -} - -type NullableCordappDeploymentConfig struct { - value *CordappDeploymentConfig - isSet bool -} - -func (v NullableCordappDeploymentConfig) Get() *CordappDeploymentConfig { - return v.value -} - -func (v *NullableCordappDeploymentConfig) Set(val *CordappDeploymentConfig) { - v.value = val - v.isSet = true -} - -func (v NullableCordappDeploymentConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableCordappDeploymentConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCordappDeploymentConfig(val *CordappDeploymentConfig) *NullableCordappDeploymentConfig { - return &NullableCordappDeploymentConfig{value: val, isSet: true} -} - -func (v NullableCordappDeploymentConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCordappDeploymentConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cordapp_info.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cordapp_info.go deleted file mode 100644 index 0109948bc5..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cordapp_info.go +++ /dev/null @@ -1,341 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the CordappInfo type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CordappInfo{} - -// CordappInfo A CordappInfo describes a single CorDapp currently installed on the node -type CordappInfo struct { - JarHash SHA256 `json:"jarHash"` - // The name of the licence this CorDapp is released under - Licence string `json:"licence"` - // The minimum platform version the node must be at for the CorDapp to run - MinimumPlatformVersion int32 `json:"minimumPlatformVersion"` - // The name of the JAR file that defines the CorDapp - Name string `json:"name"` - // The name of the CorDapp - ShortName string `json:"shortName"` - // The target platform version this CorDapp has been tested against - TargetPlatformVersion int32 `json:"targetPlatformVersion"` - // A description of what sort of CorDapp this is - either a contract, workflow, or a combination. - Type string `json:"type"` - // The vendor of this CorDapp - Vendor string `json:"vendor"` - // The version of this CorDapp - Version string `json:"version"` -} - -// NewCordappInfo instantiates a new CordappInfo object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCordappInfo(jarHash SHA256, licence string, minimumPlatformVersion int32, name string, shortName string, targetPlatformVersion int32, type_ string, vendor string, version string) *CordappInfo { - this := CordappInfo{} - this.JarHash = jarHash - this.Licence = licence - this.MinimumPlatformVersion = minimumPlatformVersion - this.Name = name - this.ShortName = shortName - this.TargetPlatformVersion = targetPlatformVersion - this.Type = type_ - this.Vendor = vendor - this.Version = version - return &this -} - -// NewCordappInfoWithDefaults instantiates a new CordappInfo object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCordappInfoWithDefaults() *CordappInfo { - this := CordappInfo{} - return &this -} - -// GetJarHash returns the JarHash field value -func (o *CordappInfo) GetJarHash() SHA256 { - if o == nil { - var ret SHA256 - return ret - } - - return o.JarHash -} - -// GetJarHashOk returns a tuple with the JarHash field value -// and a boolean to check if the value has been set. -func (o *CordappInfo) GetJarHashOk() (SHA256, bool) { - if o == nil { - return SHA256{}, false - } - return o.JarHash, true -} - -// SetJarHash sets field value -func (o *CordappInfo) SetJarHash(v SHA256) { - o.JarHash = v -} - -// GetLicence returns the Licence field value -func (o *CordappInfo) GetLicence() string { - if o == nil { - var ret string - return ret - } - - return o.Licence -} - -// GetLicenceOk returns a tuple with the Licence field value -// and a boolean to check if the value has been set. -func (o *CordappInfo) GetLicenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Licence, true -} - -// SetLicence sets field value -func (o *CordappInfo) SetLicence(v string) { - o.Licence = v -} - -// GetMinimumPlatformVersion returns the MinimumPlatformVersion field value -func (o *CordappInfo) GetMinimumPlatformVersion() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.MinimumPlatformVersion -} - -// GetMinimumPlatformVersionOk returns a tuple with the MinimumPlatformVersion field value -// and a boolean to check if the value has been set. -func (o *CordappInfo) GetMinimumPlatformVersionOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.MinimumPlatformVersion, true -} - -// SetMinimumPlatformVersion sets field value -func (o *CordappInfo) SetMinimumPlatformVersion(v int32) { - o.MinimumPlatformVersion = v -} - -// GetName returns the Name field value -func (o *CordappInfo) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CordappInfo) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CordappInfo) SetName(v string) { - o.Name = v -} - -// GetShortName returns the ShortName field value -func (o *CordappInfo) GetShortName() string { - if o == nil { - var ret string - return ret - } - - return o.ShortName -} - -// GetShortNameOk returns a tuple with the ShortName field value -// and a boolean to check if the value has been set. -func (o *CordappInfo) GetShortNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ShortName, true -} - -// SetShortName sets field value -func (o *CordappInfo) SetShortName(v string) { - o.ShortName = v -} - -// GetTargetPlatformVersion returns the TargetPlatformVersion field value -func (o *CordappInfo) GetTargetPlatformVersion() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.TargetPlatformVersion -} - -// GetTargetPlatformVersionOk returns a tuple with the TargetPlatformVersion field value -// and a boolean to check if the value has been set. -func (o *CordappInfo) GetTargetPlatformVersionOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.TargetPlatformVersion, true -} - -// SetTargetPlatformVersion sets field value -func (o *CordappInfo) SetTargetPlatformVersion(v int32) { - o.TargetPlatformVersion = v -} - -// GetType returns the Type field value -func (o *CordappInfo) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *CordappInfo) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *CordappInfo) SetType(v string) { - o.Type = v -} - -// GetVendor returns the Vendor field value -func (o *CordappInfo) GetVendor() string { - if o == nil { - var ret string - return ret - } - - return o.Vendor -} - -// GetVendorOk returns a tuple with the Vendor field value -// and a boolean to check if the value has been set. -func (o *CordappInfo) GetVendorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Vendor, true -} - -// SetVendor sets field value -func (o *CordappInfo) SetVendor(v string) { - o.Vendor = v -} - -// GetVersion returns the Version field value -func (o *CordappInfo) GetVersion() string { - if o == nil { - var ret string - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *CordappInfo) GetVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *CordappInfo) SetVersion(v string) { - o.Version = v -} - -func (o CordappInfo) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CordappInfo) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["jarHash"] = o.JarHash - toSerialize["licence"] = o.Licence - toSerialize["minimumPlatformVersion"] = o.MinimumPlatformVersion - toSerialize["name"] = o.Name - toSerialize["shortName"] = o.ShortName - toSerialize["targetPlatformVersion"] = o.TargetPlatformVersion - toSerialize["type"] = o.Type - toSerialize["vendor"] = o.Vendor - toSerialize["version"] = o.Version - return toSerialize, nil -} - -type NullableCordappInfo struct { - value *CordappInfo - isSet bool -} - -func (v NullableCordappInfo) Get() *CordappInfo { - return v.value -} - -func (v *NullableCordappInfo) Set(val *CordappInfo) { - v.value = val - v.isSet = true -} - -func (v NullableCordappInfo) IsSet() bool { - return v.isSet -} - -func (v *NullableCordappInfo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCordappInfo(val *CordappInfo) *NullableCordappInfo { - return &NullableCordappInfo{value: val, isSet: true} -} - -func (v NullableCordappInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCordappInfo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cpiidv1.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cpiidv1.go deleted file mode 100644 index c86b864433..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cpiidv1.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the CPIIDV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CPIIDV1{} - -// CPIIDV1 struct for CPIIDV1 -type CPIIDV1 struct { - Name string `json:"name"` - SignerSummaryHash NullableString `json:"signerSummaryHash,omitempty"` - Version string `json:"version"` -} - -// NewCPIIDV1 instantiates a new CPIIDV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCPIIDV1(name string, version string) *CPIIDV1 { - this := CPIIDV1{} - this.Name = name - this.Version = version - return &this -} - -// NewCPIIDV1WithDefaults instantiates a new CPIIDV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCPIIDV1WithDefaults() *CPIIDV1 { - this := CPIIDV1{} - return &this -} - -// GetName returns the Name field value -func (o *CPIIDV1) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CPIIDV1) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CPIIDV1) SetName(v string) { - o.Name = v -} - -// GetSignerSummaryHash returns the SignerSummaryHash field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CPIIDV1) GetSignerSummaryHash() string { - if o == nil || IsNil(o.SignerSummaryHash.Get()) { - var ret string - return ret - } - return *o.SignerSummaryHash.Get() -} - -// GetSignerSummaryHashOk returns a tuple with the SignerSummaryHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CPIIDV1) GetSignerSummaryHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.SignerSummaryHash.Get(), o.SignerSummaryHash.IsSet() -} - -// HasSignerSummaryHash returns a boolean if a field has been set. -func (o *CPIIDV1) HasSignerSummaryHash() bool { - if o != nil && o.SignerSummaryHash.IsSet() { - return true - } - - return false -} - -// SetSignerSummaryHash gets a reference to the given NullableString and assigns it to the SignerSummaryHash field. -func (o *CPIIDV1) SetSignerSummaryHash(v string) { - o.SignerSummaryHash.Set(&v) -} -// SetSignerSummaryHashNil sets the value for SignerSummaryHash to be an explicit nil -func (o *CPIIDV1) SetSignerSummaryHashNil() { - o.SignerSummaryHash.Set(nil) -} - -// UnsetSignerSummaryHash ensures that no value is present for SignerSummaryHash, not even an explicit nil -func (o *CPIIDV1) UnsetSignerSummaryHash() { - o.SignerSummaryHash.Unset() -} - -// GetVersion returns the Version field value -func (o *CPIIDV1) GetVersion() string { - if o == nil { - var ret string - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *CPIIDV1) GetVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *CPIIDV1) SetVersion(v string) { - o.Version = v -} - -func (o CPIIDV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CPIIDV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - if o.SignerSummaryHash.IsSet() { - toSerialize["signerSummaryHash"] = o.SignerSummaryHash.Get() - } - toSerialize["version"] = o.Version - return toSerialize, nil -} - -type NullableCPIIDV1 struct { - value *CPIIDV1 - isSet bool -} - -func (v NullableCPIIDV1) Get() *CPIIDV1 { - return v.value -} - -func (v *NullableCPIIDV1) Set(val *CPIIDV1) { - v.value = val - v.isSet = true -} - -func (v NullableCPIIDV1) IsSet() bool { - return v.isSet -} - -func (v *NullableCPIIDV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCPIIDV1(val *CPIIDV1) *NullableCPIIDV1 { - return &NullableCPIIDV1{value: val, isSet: true} -} - -func (v NullableCPIIDV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCPIIDV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_deploy_contract_jars_bad_request_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_deploy_contract_jars_bad_request_v1_response.go deleted file mode 100644 index de2f2a4421..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_deploy_contract_jars_bad_request_v1_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the DeployContractJarsBadRequestV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractJarsBadRequestV1Response{} - -// DeployContractJarsBadRequestV1Response struct for DeployContractJarsBadRequestV1Response -type DeployContractJarsBadRequestV1Response struct { - Errors []string `json:"errors"` -} - -// NewDeployContractJarsBadRequestV1Response instantiates a new DeployContractJarsBadRequestV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractJarsBadRequestV1Response(errors []string) *DeployContractJarsBadRequestV1Response { - this := DeployContractJarsBadRequestV1Response{} - this.Errors = errors - return &this -} - -// NewDeployContractJarsBadRequestV1ResponseWithDefaults instantiates a new DeployContractJarsBadRequestV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractJarsBadRequestV1ResponseWithDefaults() *DeployContractJarsBadRequestV1Response { - this := DeployContractJarsBadRequestV1Response{} - return &this -} - -// GetErrors returns the Errors field value -func (o *DeployContractJarsBadRequestV1Response) GetErrors() []string { - if o == nil { - var ret []string - return ret - } - - return o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value -// and a boolean to check if the value has been set. -func (o *DeployContractJarsBadRequestV1Response) GetErrorsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Errors, true -} - -// SetErrors sets field value -func (o *DeployContractJarsBadRequestV1Response) SetErrors(v []string) { - o.Errors = v -} - -func (o DeployContractJarsBadRequestV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractJarsBadRequestV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["errors"] = o.Errors - return toSerialize, nil -} - -type NullableDeployContractJarsBadRequestV1Response struct { - value *DeployContractJarsBadRequestV1Response - isSet bool -} - -func (v NullableDeployContractJarsBadRequestV1Response) Get() *DeployContractJarsBadRequestV1Response { - return v.value -} - -func (v *NullableDeployContractJarsBadRequestV1Response) Set(val *DeployContractJarsBadRequestV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractJarsBadRequestV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractJarsBadRequestV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractJarsBadRequestV1Response(val *DeployContractJarsBadRequestV1Response) *NullableDeployContractJarsBadRequestV1Response { - return &NullableDeployContractJarsBadRequestV1Response{value: val, isSet: true} -} - -func (v NullableDeployContractJarsBadRequestV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractJarsBadRequestV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_deploy_contract_jars_success_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_deploy_contract_jars_success_v1_response.go deleted file mode 100644 index fa3879280f..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_deploy_contract_jars_success_v1_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the DeployContractJarsSuccessV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractJarsSuccessV1Response{} - -// DeployContractJarsSuccessV1Response struct for DeployContractJarsSuccessV1Response -type DeployContractJarsSuccessV1Response struct { - DeployedJarFiles []string `json:"deployedJarFiles"` -} - -// NewDeployContractJarsSuccessV1Response instantiates a new DeployContractJarsSuccessV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractJarsSuccessV1Response(deployedJarFiles []string) *DeployContractJarsSuccessV1Response { - this := DeployContractJarsSuccessV1Response{} - this.DeployedJarFiles = deployedJarFiles - return &this -} - -// NewDeployContractJarsSuccessV1ResponseWithDefaults instantiates a new DeployContractJarsSuccessV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractJarsSuccessV1ResponseWithDefaults() *DeployContractJarsSuccessV1Response { - this := DeployContractJarsSuccessV1Response{} - return &this -} - -// GetDeployedJarFiles returns the DeployedJarFiles field value -func (o *DeployContractJarsSuccessV1Response) GetDeployedJarFiles() []string { - if o == nil { - var ret []string - return ret - } - - return o.DeployedJarFiles -} - -// GetDeployedJarFilesOk returns a tuple with the DeployedJarFiles field value -// and a boolean to check if the value has been set. -func (o *DeployContractJarsSuccessV1Response) GetDeployedJarFilesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.DeployedJarFiles, true -} - -// SetDeployedJarFiles sets field value -func (o *DeployContractJarsSuccessV1Response) SetDeployedJarFiles(v []string) { - o.DeployedJarFiles = v -} - -func (o DeployContractJarsSuccessV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractJarsSuccessV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["deployedJarFiles"] = o.DeployedJarFiles - return toSerialize, nil -} - -type NullableDeployContractJarsSuccessV1Response struct { - value *DeployContractJarsSuccessV1Response - isSet bool -} - -func (v NullableDeployContractJarsSuccessV1Response) Get() *DeployContractJarsSuccessV1Response { - return v.value -} - -func (v *NullableDeployContractJarsSuccessV1Response) Set(val *DeployContractJarsSuccessV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractJarsSuccessV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractJarsSuccessV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractJarsSuccessV1Response(val *DeployContractJarsSuccessV1Response) *NullableDeployContractJarsSuccessV1Response { - return &NullableDeployContractJarsSuccessV1Response{value: val, isSet: true} -} - -func (v NullableDeployContractJarsSuccessV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractJarsSuccessV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_deploy_contract_jars_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_deploy_contract_jars_v1_request.go deleted file mode 100644 index 63f8287028..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_deploy_contract_jars_v1_request.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the DeployContractJarsV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractJarsV1Request{} - -// DeployContractJarsV1Request struct for DeployContractJarsV1Request -type DeployContractJarsV1Request struct { - // The list of deployment configurations pointing to the nodes where the provided cordapp jar files are to be deployed . - CordappDeploymentConfigs []CordappDeploymentConfig `json:"cordappDeploymentConfigs"` - JarFiles []JarFile `json:"jarFiles"` -} - -// NewDeployContractJarsV1Request instantiates a new DeployContractJarsV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractJarsV1Request(cordappDeploymentConfigs []CordappDeploymentConfig, jarFiles []JarFile) *DeployContractJarsV1Request { - this := DeployContractJarsV1Request{} - this.CordappDeploymentConfigs = cordappDeploymentConfigs - this.JarFiles = jarFiles - return &this -} - -// NewDeployContractJarsV1RequestWithDefaults instantiates a new DeployContractJarsV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractJarsV1RequestWithDefaults() *DeployContractJarsV1Request { - this := DeployContractJarsV1Request{} - return &this -} - -// GetCordappDeploymentConfigs returns the CordappDeploymentConfigs field value -func (o *DeployContractJarsV1Request) GetCordappDeploymentConfigs() []CordappDeploymentConfig { - if o == nil { - var ret []CordappDeploymentConfig - return ret - } - - return o.CordappDeploymentConfigs -} - -// GetCordappDeploymentConfigsOk returns a tuple with the CordappDeploymentConfigs field value -// and a boolean to check if the value has been set. -func (o *DeployContractJarsV1Request) GetCordappDeploymentConfigsOk() ([]CordappDeploymentConfig, bool) { - if o == nil { - return nil, false - } - return o.CordappDeploymentConfigs, true -} - -// SetCordappDeploymentConfigs sets field value -func (o *DeployContractJarsV1Request) SetCordappDeploymentConfigs(v []CordappDeploymentConfig) { - o.CordappDeploymentConfigs = v -} - -// GetJarFiles returns the JarFiles field value -func (o *DeployContractJarsV1Request) GetJarFiles() []JarFile { - if o == nil { - var ret []JarFile - return ret - } - - return o.JarFiles -} - -// GetJarFilesOk returns a tuple with the JarFiles field value -// and a boolean to check if the value has been set. -func (o *DeployContractJarsV1Request) GetJarFilesOk() ([]JarFile, bool) { - if o == nil { - return nil, false - } - return o.JarFiles, true -} - -// SetJarFiles sets field value -func (o *DeployContractJarsV1Request) SetJarFiles(v []JarFile) { - o.JarFiles = v -} - -func (o DeployContractJarsV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractJarsV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cordappDeploymentConfigs"] = o.CordappDeploymentConfigs - toSerialize["jarFiles"] = o.JarFiles - return toSerialize, nil -} - -type NullableDeployContractJarsV1Request struct { - value *DeployContractJarsV1Request - isSet bool -} - -func (v NullableDeployContractJarsV1Request) Get() *DeployContractJarsV1Request { - return v.value -} - -func (v *NullableDeployContractJarsV1Request) Set(val *DeployContractJarsV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractJarsV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractJarsV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractJarsV1Request(val *DeployContractJarsV1Request) *NullableDeployContractJarsV1Request { - return &NullableDeployContractJarsV1Request{value: val, isSet: true} -} - -func (v NullableDeployContractJarsV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractJarsV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_diagnose_node_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_diagnose_node_v1_request.go deleted file mode 100644 index 506b24ffb2..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_diagnose_node_v1_request.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the DiagnoseNodeV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DiagnoseNodeV1Request{} - -// DiagnoseNodeV1Request struct for DiagnoseNodeV1Request -type DiagnoseNodeV1Request struct { - // Optional property specifying which Corda Node should be the one being diagnosed in case the Connector has multiple connections established for different nodes (which is not yet a supported feature, but we want to keep this possibility open for the future). - NodeIds []string `json:"nodeIds,omitempty"` -} - -// NewDiagnoseNodeV1Request instantiates a new DiagnoseNodeV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDiagnoseNodeV1Request() *DiagnoseNodeV1Request { - this := DiagnoseNodeV1Request{} - return &this -} - -// NewDiagnoseNodeV1RequestWithDefaults instantiates a new DiagnoseNodeV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDiagnoseNodeV1RequestWithDefaults() *DiagnoseNodeV1Request { - this := DiagnoseNodeV1Request{} - return &this -} - -// GetNodeIds returns the NodeIds field value if set, zero value otherwise. -func (o *DiagnoseNodeV1Request) GetNodeIds() []string { - if o == nil || IsNil(o.NodeIds) { - var ret []string - return ret - } - return o.NodeIds -} - -// GetNodeIdsOk returns a tuple with the NodeIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DiagnoseNodeV1Request) GetNodeIdsOk() ([]string, bool) { - if o == nil || IsNil(o.NodeIds) { - return nil, false - } - return o.NodeIds, true -} - -// HasNodeIds returns a boolean if a field has been set. -func (o *DiagnoseNodeV1Request) HasNodeIds() bool { - if o != nil && !IsNil(o.NodeIds) { - return true - } - - return false -} - -// SetNodeIds gets a reference to the given []string and assigns it to the NodeIds field. -func (o *DiagnoseNodeV1Request) SetNodeIds(v []string) { - o.NodeIds = v -} - -func (o DiagnoseNodeV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DiagnoseNodeV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.NodeIds) { - toSerialize["nodeIds"] = o.NodeIds - } - return toSerialize, nil -} - -type NullableDiagnoseNodeV1Request struct { - value *DiagnoseNodeV1Request - isSet bool -} - -func (v NullableDiagnoseNodeV1Request) Get() *DiagnoseNodeV1Request { - return v.value -} - -func (v *NullableDiagnoseNodeV1Request) Set(val *DiagnoseNodeV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableDiagnoseNodeV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableDiagnoseNodeV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDiagnoseNodeV1Request(val *DiagnoseNodeV1Request) *NullableDiagnoseNodeV1Request { - return &NullableDiagnoseNodeV1Request{value: val, isSet: true} -} - -func (v NullableDiagnoseNodeV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDiagnoseNodeV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_diagnose_node_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_diagnose_node_v1_response.go deleted file mode 100644 index 53041ac7c1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_diagnose_node_v1_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the DiagnoseNodeV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DiagnoseNodeV1Response{} - -// DiagnoseNodeV1Response struct for DiagnoseNodeV1Response -type DiagnoseNodeV1Response struct { - NodeDiagnosticInfo NodeDiagnosticInfo `json:"nodeDiagnosticInfo"` -} - -// NewDiagnoseNodeV1Response instantiates a new DiagnoseNodeV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDiagnoseNodeV1Response(nodeDiagnosticInfo NodeDiagnosticInfo) *DiagnoseNodeV1Response { - this := DiagnoseNodeV1Response{} - this.NodeDiagnosticInfo = nodeDiagnosticInfo - return &this -} - -// NewDiagnoseNodeV1ResponseWithDefaults instantiates a new DiagnoseNodeV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDiagnoseNodeV1ResponseWithDefaults() *DiagnoseNodeV1Response { - this := DiagnoseNodeV1Response{} - return &this -} - -// GetNodeDiagnosticInfo returns the NodeDiagnosticInfo field value -func (o *DiagnoseNodeV1Response) GetNodeDiagnosticInfo() NodeDiagnosticInfo { - if o == nil { - var ret NodeDiagnosticInfo - return ret - } - - return o.NodeDiagnosticInfo -} - -// GetNodeDiagnosticInfoOk returns a tuple with the NodeDiagnosticInfo field value -// and a boolean to check if the value has been set. -func (o *DiagnoseNodeV1Response) GetNodeDiagnosticInfoOk() (*NodeDiagnosticInfo, bool) { - if o == nil { - return nil, false - } - return &o.NodeDiagnosticInfo, true -} - -// SetNodeDiagnosticInfo sets field value -func (o *DiagnoseNodeV1Response) SetNodeDiagnosticInfo(v NodeDiagnosticInfo) { - o.NodeDiagnosticInfo = v -} - -func (o DiagnoseNodeV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DiagnoseNodeV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["nodeDiagnosticInfo"] = o.NodeDiagnosticInfo - return toSerialize, nil -} - -type NullableDiagnoseNodeV1Response struct { - value *DiagnoseNodeV1Response - isSet bool -} - -func (v NullableDiagnoseNodeV1Response) Get() *DiagnoseNodeV1Response { - return v.value -} - -func (v *NullableDiagnoseNodeV1Response) Set(val *DiagnoseNodeV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableDiagnoseNodeV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableDiagnoseNodeV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDiagnoseNodeV1Response(val *DiagnoseNodeV1Response) *NullableDiagnoseNodeV1Response { - return &NullableDiagnoseNodeV1Response{value: val, isSet: true} -} - -func (v NullableDiagnoseNodeV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDiagnoseNodeV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_invocation_type.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_invocation_type.go deleted file mode 100644 index f7c5250aff..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_invocation_type.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" - "fmt" -) - -// FlowInvocationType Determines which flow starting method will be used on the back-end when invoking the flow. Based on the value here the plugin back-end might invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() method. Streamed responses are aggregated and returned in a single response to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. do. -type FlowInvocationType string - -// List of FlowInvocationType -const ( - TRACKED_FLOW_DYNAMIC FlowInvocationType = "TRACKED_FLOW_DYNAMIC" - FLOW_DYNAMIC FlowInvocationType = "FLOW_DYNAMIC" -) - -// All allowed values of FlowInvocationType enum -var AllowedFlowInvocationTypeEnumValues = []FlowInvocationType{ - "TRACKED_FLOW_DYNAMIC", - "FLOW_DYNAMIC", -} - -func (v *FlowInvocationType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := FlowInvocationType(value) - for _, existing := range AllowedFlowInvocationTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid FlowInvocationType", value) -} - -// NewFlowInvocationTypeFromValue returns a pointer to a valid FlowInvocationType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewFlowInvocationTypeFromValue(v string) (*FlowInvocationType, error) { - ev := FlowInvocationType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for FlowInvocationType: valid values are %v", v, AllowedFlowInvocationTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v FlowInvocationType) IsValid() bool { - for _, existing := range AllowedFlowInvocationTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to FlowInvocationType value -func (v FlowInvocationType) Ptr() *FlowInvocationType { - return &v -} - -type NullableFlowInvocationType struct { - value *FlowInvocationType - isSet bool -} - -func (v NullableFlowInvocationType) Get() *FlowInvocationType { - return v.value -} - -func (v *NullableFlowInvocationType) Set(val *FlowInvocationType) { - v.value = val - v.isSet = true -} - -func (v NullableFlowInvocationType) IsSet() bool { - return v.isSet -} - -func (v *NullableFlowInvocationType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFlowInvocationType(val *FlowInvocationType) *NullableFlowInvocationType { - return &NullableFlowInvocationType{value: val, isSet: true} -} - -func (v NullableFlowInvocationType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFlowInvocationType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses.go deleted file mode 100644 index 98fe3fd575..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the FlowStatusV1Responses type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FlowStatusV1Responses{} - -// FlowStatusV1Responses struct for FlowStatusV1Responses -type FlowStatusV1Responses struct { - FlowStatusResponses []FlowStatusV1ResponsesFlowStatusResponsesInner `json:"flowStatusResponses,omitempty"` -} - -// NewFlowStatusV1Responses instantiates a new FlowStatusV1Responses object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFlowStatusV1Responses() *FlowStatusV1Responses { - this := FlowStatusV1Responses{} - return &this -} - -// NewFlowStatusV1ResponsesWithDefaults instantiates a new FlowStatusV1Responses object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFlowStatusV1ResponsesWithDefaults() *FlowStatusV1Responses { - this := FlowStatusV1Responses{} - return &this -} - -// GetFlowStatusResponses returns the FlowStatusResponses field value if set, zero value otherwise. -func (o *FlowStatusV1Responses) GetFlowStatusResponses() []FlowStatusV1ResponsesFlowStatusResponsesInner { - if o == nil || IsNil(o.FlowStatusResponses) { - var ret []FlowStatusV1ResponsesFlowStatusResponsesInner - return ret - } - return o.FlowStatusResponses -} - -// GetFlowStatusResponsesOk returns a tuple with the FlowStatusResponses field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FlowStatusV1Responses) GetFlowStatusResponsesOk() ([]FlowStatusV1ResponsesFlowStatusResponsesInner, bool) { - if o == nil || IsNil(o.FlowStatusResponses) { - return nil, false - } - return o.FlowStatusResponses, true -} - -// HasFlowStatusResponses returns a boolean if a field has been set. -func (o *FlowStatusV1Responses) HasFlowStatusResponses() bool { - if o != nil && !IsNil(o.FlowStatusResponses) { - return true - } - - return false -} - -// SetFlowStatusResponses gets a reference to the given []FlowStatusV1ResponsesFlowStatusResponsesInner and assigns it to the FlowStatusResponses field. -func (o *FlowStatusV1Responses) SetFlowStatusResponses(v []FlowStatusV1ResponsesFlowStatusResponsesInner) { - o.FlowStatusResponses = v -} - -func (o FlowStatusV1Responses) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FlowStatusV1Responses) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.FlowStatusResponses) { - toSerialize["flowStatusResponses"] = o.FlowStatusResponses - } - return toSerialize, nil -} - -type NullableFlowStatusV1Responses struct { - value *FlowStatusV1Responses - isSet bool -} - -func (v NullableFlowStatusV1Responses) Get() *FlowStatusV1Responses { - return v.value -} - -func (v *NullableFlowStatusV1Responses) Set(val *FlowStatusV1Responses) { - v.value = val - v.isSet = true -} - -func (v NullableFlowStatusV1Responses) IsSet() bool { - return v.isSet -} - -func (v *NullableFlowStatusV1Responses) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFlowStatusV1Responses(val *FlowStatusV1Responses) *NullableFlowStatusV1Responses { - return &NullableFlowStatusV1Responses{value: val, isSet: true} -} - -func (v NullableFlowStatusV1Responses) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFlowStatusV1Responses) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses_flow_status_responses_inner.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses_flow_status_responses_inner.go deleted file mode 100644 index 71cb992f4d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses_flow_status_responses_inner.go +++ /dev/null @@ -1,373 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" - "time" -) - -// checks if the FlowStatusV1ResponsesFlowStatusResponsesInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FlowStatusV1ResponsesFlowStatusResponsesInner{} - -// FlowStatusV1ResponsesFlowStatusResponsesInner struct for FlowStatusV1ResponsesFlowStatusResponsesInner -type FlowStatusV1ResponsesFlowStatusResponsesInner struct { - ClientRequestId NullableString `json:"clientRequestId,omitempty"` - FlowError *FlowV1Error `json:"flowError,omitempty"` - FlowId NullableString `json:"flowId,omitempty"` - FlowResult NullableString `json:"flowResult,omitempty"` - FlowStatus *string `json:"flowStatus,omitempty"` - HoldingIDShortHash *string `json:"holdingIDShortHash,omitempty"` - Timestamp *time.Time `json:"timestamp,omitempty"` -} - -// NewFlowStatusV1ResponsesFlowStatusResponsesInner instantiates a new FlowStatusV1ResponsesFlowStatusResponsesInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFlowStatusV1ResponsesFlowStatusResponsesInner() *FlowStatusV1ResponsesFlowStatusResponsesInner { - this := FlowStatusV1ResponsesFlowStatusResponsesInner{} - return &this -} - -// NewFlowStatusV1ResponsesFlowStatusResponsesInnerWithDefaults instantiates a new FlowStatusV1ResponsesFlowStatusResponsesInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFlowStatusV1ResponsesFlowStatusResponsesInnerWithDefaults() *FlowStatusV1ResponsesFlowStatusResponsesInner { - this := FlowStatusV1ResponsesFlowStatusResponsesInner{} - return &this -} - -// GetClientRequestId returns the ClientRequestId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetClientRequestId() string { - if o == nil || IsNil(o.ClientRequestId.Get()) { - var ret string - return ret - } - return *o.ClientRequestId.Get() -} - -// GetClientRequestIdOk returns a tuple with the ClientRequestId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetClientRequestIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ClientRequestId.Get(), o.ClientRequestId.IsSet() -} - -// HasClientRequestId returns a boolean if a field has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasClientRequestId() bool { - if o != nil && o.ClientRequestId.IsSet() { - return true - } - - return false -} - -// SetClientRequestId gets a reference to the given NullableString and assigns it to the ClientRequestId field. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetClientRequestId(v string) { - o.ClientRequestId.Set(&v) -} -// SetClientRequestIdNil sets the value for ClientRequestId to be an explicit nil -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetClientRequestIdNil() { - o.ClientRequestId.Set(nil) -} - -// UnsetClientRequestId ensures that no value is present for ClientRequestId, not even an explicit nil -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) UnsetClientRequestId() { - o.ClientRequestId.Unset() -} - -// GetFlowError returns the FlowError field value if set, zero value otherwise. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowError() FlowV1Error { - if o == nil || IsNil(o.FlowError) { - var ret FlowV1Error - return ret - } - return *o.FlowError -} - -// GetFlowErrorOk returns a tuple with the FlowError field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowErrorOk() (*FlowV1Error, bool) { - if o == nil || IsNil(o.FlowError) { - return nil, false - } - return o.FlowError, true -} - -// HasFlowError returns a boolean if a field has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasFlowError() bool { - if o != nil && !IsNil(o.FlowError) { - return true - } - - return false -} - -// SetFlowError gets a reference to the given FlowV1Error and assigns it to the FlowError field. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowError(v FlowV1Error) { - o.FlowError = &v -} - -// GetFlowId returns the FlowId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowId() string { - if o == nil || IsNil(o.FlowId.Get()) { - var ret string - return ret - } - return *o.FlowId.Get() -} - -// GetFlowIdOk returns a tuple with the FlowId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FlowId.Get(), o.FlowId.IsSet() -} - -// HasFlowId returns a boolean if a field has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasFlowId() bool { - if o != nil && o.FlowId.IsSet() { - return true - } - - return false -} - -// SetFlowId gets a reference to the given NullableString and assigns it to the FlowId field. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowId(v string) { - o.FlowId.Set(&v) -} -// SetFlowIdNil sets the value for FlowId to be an explicit nil -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowIdNil() { - o.FlowId.Set(nil) -} - -// UnsetFlowId ensures that no value is present for FlowId, not even an explicit nil -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) UnsetFlowId() { - o.FlowId.Unset() -} - -// GetFlowResult returns the FlowResult field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowResult() string { - if o == nil || IsNil(o.FlowResult.Get()) { - var ret string - return ret - } - return *o.FlowResult.Get() -} - -// GetFlowResultOk returns a tuple with the FlowResult field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowResultOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FlowResult.Get(), o.FlowResult.IsSet() -} - -// HasFlowResult returns a boolean if a field has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasFlowResult() bool { - if o != nil && o.FlowResult.IsSet() { - return true - } - - return false -} - -// SetFlowResult gets a reference to the given NullableString and assigns it to the FlowResult field. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowResult(v string) { - o.FlowResult.Set(&v) -} -// SetFlowResultNil sets the value for FlowResult to be an explicit nil -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowResultNil() { - o.FlowResult.Set(nil) -} - -// UnsetFlowResult ensures that no value is present for FlowResult, not even an explicit nil -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) UnsetFlowResult() { - o.FlowResult.Unset() -} - -// GetFlowStatus returns the FlowStatus field value if set, zero value otherwise. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowStatus() string { - if o == nil || IsNil(o.FlowStatus) { - var ret string - return ret - } - return *o.FlowStatus -} - -// GetFlowStatusOk returns a tuple with the FlowStatus field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowStatusOk() (*string, bool) { - if o == nil || IsNil(o.FlowStatus) { - return nil, false - } - return o.FlowStatus, true -} - -// HasFlowStatus returns a boolean if a field has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasFlowStatus() bool { - if o != nil && !IsNil(o.FlowStatus) { - return true - } - - return false -} - -// SetFlowStatus gets a reference to the given string and assigns it to the FlowStatus field. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowStatus(v string) { - o.FlowStatus = &v -} - -// GetHoldingIDShortHash returns the HoldingIDShortHash field value if set, zero value otherwise. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetHoldingIDShortHash() string { - if o == nil || IsNil(o.HoldingIDShortHash) { - var ret string - return ret - } - return *o.HoldingIDShortHash -} - -// GetHoldingIDShortHashOk returns a tuple with the HoldingIDShortHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetHoldingIDShortHashOk() (*string, bool) { - if o == nil || IsNil(o.HoldingIDShortHash) { - return nil, false - } - return o.HoldingIDShortHash, true -} - -// HasHoldingIDShortHash returns a boolean if a field has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasHoldingIDShortHash() bool { - if o != nil && !IsNil(o.HoldingIDShortHash) { - return true - } - - return false -} - -// SetHoldingIDShortHash gets a reference to the given string and assigns it to the HoldingIDShortHash field. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetHoldingIDShortHash(v string) { - o.HoldingIDShortHash = &v -} - -// GetTimestamp returns the Timestamp field value if set, zero value otherwise. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetTimestamp() time.Time { - if o == nil || IsNil(o.Timestamp) { - var ret time.Time - return ret - } - return *o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetTimestampOk() (*time.Time, bool) { - if o == nil || IsNil(o.Timestamp) { - return nil, false - } - return o.Timestamp, true -} - -// HasTimestamp returns a boolean if a field has been set. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasTimestamp() bool { - if o != nil && !IsNil(o.Timestamp) { - return true - } - - return false -} - -// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. -func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetTimestamp(v time.Time) { - o.Timestamp = &v -} - -func (o FlowStatusV1ResponsesFlowStatusResponsesInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FlowStatusV1ResponsesFlowStatusResponsesInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.ClientRequestId.IsSet() { - toSerialize["clientRequestId"] = o.ClientRequestId.Get() - } - if !IsNil(o.FlowError) { - toSerialize["flowError"] = o.FlowError - } - if o.FlowId.IsSet() { - toSerialize["flowId"] = o.FlowId.Get() - } - if o.FlowResult.IsSet() { - toSerialize["flowResult"] = o.FlowResult.Get() - } - if !IsNil(o.FlowStatus) { - toSerialize["flowStatus"] = o.FlowStatus - } - if !IsNil(o.HoldingIDShortHash) { - toSerialize["holdingIDShortHash"] = o.HoldingIDShortHash - } - if !IsNil(o.Timestamp) { - toSerialize["timestamp"] = o.Timestamp - } - return toSerialize, nil -} - -type NullableFlowStatusV1ResponsesFlowStatusResponsesInner struct { - value *FlowStatusV1ResponsesFlowStatusResponsesInner - isSet bool -} - -func (v NullableFlowStatusV1ResponsesFlowStatusResponsesInner) Get() *FlowStatusV1ResponsesFlowStatusResponsesInner { - return v.value -} - -func (v *NullableFlowStatusV1ResponsesFlowStatusResponsesInner) Set(val *FlowStatusV1ResponsesFlowStatusResponsesInner) { - v.value = val - v.isSet = true -} - -func (v NullableFlowStatusV1ResponsesFlowStatusResponsesInner) IsSet() bool { - return v.isSet -} - -func (v *NullableFlowStatusV1ResponsesFlowStatusResponsesInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFlowStatusV1ResponsesFlowStatusResponsesInner(val *FlowStatusV1ResponsesFlowStatusResponsesInner) *NullableFlowStatusV1ResponsesFlowStatusResponsesInner { - return &NullableFlowStatusV1ResponsesFlowStatusResponsesInner{value: val, isSet: true} -} - -func (v NullableFlowStatusV1ResponsesFlowStatusResponsesInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFlowStatusV1ResponsesFlowStatusResponsesInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_v1_error.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_v1_error.go deleted file mode 100644 index 7515d556be..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_v1_error.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the FlowV1Error type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FlowV1Error{} - -// FlowV1Error struct for FlowV1Error -type FlowV1Error struct { - Message string `json:"message"` - Type string `json:"type"` -} - -// NewFlowV1Error instantiates a new FlowV1Error object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFlowV1Error(message string, type_ string) *FlowV1Error { - this := FlowV1Error{} - this.Message = message - this.Type = type_ - return &this -} - -// NewFlowV1ErrorWithDefaults instantiates a new FlowV1Error object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFlowV1ErrorWithDefaults() *FlowV1Error { - this := FlowV1Error{} - return &this -} - -// GetMessage returns the Message field value -func (o *FlowV1Error) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *FlowV1Error) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *FlowV1Error) SetMessage(v string) { - o.Message = v -} - -// GetType returns the Type field value -func (o *FlowV1Error) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *FlowV1Error) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *FlowV1Error) SetType(v string) { - o.Type = v -} - -func (o FlowV1Error) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FlowV1Error) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableFlowV1Error struct { - value *FlowV1Error - isSet bool -} - -func (v NullableFlowV1Error) Get() *FlowV1Error { - return v.value -} - -func (v *NullableFlowV1Error) Set(val *FlowV1Error) { - v.value = val - v.isSet = true -} - -func (v NullableFlowV1Error) IsSet() bool { - return v.isSet -} - -func (v *NullableFlowV1Error) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFlowV1Error(val *FlowV1Error) *NullableFlowV1Error { - return &NullableFlowV1Error{value: val, isSet: true} -} - -func (v NullableFlowV1Error) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFlowV1Error) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_request.go deleted file mode 100644 index 4d0badd975..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_request.go +++ /dev/null @@ -1,243 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the GetFlowCidV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetFlowCidV1Request{} - -// GetFlowCidV1Request This method gets the current status of the specified flow instance. -type GetFlowCidV1Request struct { - Username string `json:"username"` - Password string `json:"password"` - RejectUnauthorized bool `json:"rejectUnauthorized"` - HoldingIDShortHash *string `json:"holdingIDShortHash,omitempty"` - ClientRequestId *string `json:"clientRequestId,omitempty"` -} - -// NewGetFlowCidV1Request instantiates a new GetFlowCidV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetFlowCidV1Request(username string, password string, rejectUnauthorized bool) *GetFlowCidV1Request { - this := GetFlowCidV1Request{} - this.Username = username - this.Password = password - this.RejectUnauthorized = rejectUnauthorized - return &this -} - -// NewGetFlowCidV1RequestWithDefaults instantiates a new GetFlowCidV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetFlowCidV1RequestWithDefaults() *GetFlowCidV1Request { - this := GetFlowCidV1Request{} - return &this -} - -// GetUsername returns the Username field value -func (o *GetFlowCidV1Request) GetUsername() string { - if o == nil { - var ret string - return ret - } - - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value -// and a boolean to check if the value has been set. -func (o *GetFlowCidV1Request) GetUsernameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Username, true -} - -// SetUsername sets field value -func (o *GetFlowCidV1Request) SetUsername(v string) { - o.Username = v -} - -// GetPassword returns the Password field value -func (o *GetFlowCidV1Request) GetPassword() string { - if o == nil { - var ret string - return ret - } - - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value -// and a boolean to check if the value has been set. -func (o *GetFlowCidV1Request) GetPasswordOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Password, true -} - -// SetPassword sets field value -func (o *GetFlowCidV1Request) SetPassword(v string) { - o.Password = v -} - -// GetRejectUnauthorized returns the RejectUnauthorized field value -func (o *GetFlowCidV1Request) GetRejectUnauthorized() bool { - if o == nil { - var ret bool - return ret - } - - return o.RejectUnauthorized -} - -// GetRejectUnauthorizedOk returns a tuple with the RejectUnauthorized field value -// and a boolean to check if the value has been set. -func (o *GetFlowCidV1Request) GetRejectUnauthorizedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.RejectUnauthorized, true -} - -// SetRejectUnauthorized sets field value -func (o *GetFlowCidV1Request) SetRejectUnauthorized(v bool) { - o.RejectUnauthorized = v -} - -// GetHoldingIDShortHash returns the HoldingIDShortHash field value if set, zero value otherwise. -func (o *GetFlowCidV1Request) GetHoldingIDShortHash() string { - if o == nil || IsNil(o.HoldingIDShortHash) { - var ret string - return ret - } - return *o.HoldingIDShortHash -} - -// GetHoldingIDShortHashOk returns a tuple with the HoldingIDShortHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetFlowCidV1Request) GetHoldingIDShortHashOk() (*string, bool) { - if o == nil || IsNil(o.HoldingIDShortHash) { - return nil, false - } - return o.HoldingIDShortHash, true -} - -// HasHoldingIDShortHash returns a boolean if a field has been set. -func (o *GetFlowCidV1Request) HasHoldingIDShortHash() bool { - if o != nil && !IsNil(o.HoldingIDShortHash) { - return true - } - - return false -} - -// SetHoldingIDShortHash gets a reference to the given string and assigns it to the HoldingIDShortHash field. -func (o *GetFlowCidV1Request) SetHoldingIDShortHash(v string) { - o.HoldingIDShortHash = &v -} - -// GetClientRequestId returns the ClientRequestId field value if set, zero value otherwise. -func (o *GetFlowCidV1Request) GetClientRequestId() string { - if o == nil || IsNil(o.ClientRequestId) { - var ret string - return ret - } - return *o.ClientRequestId -} - -// GetClientRequestIdOk returns a tuple with the ClientRequestId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetFlowCidV1Request) GetClientRequestIdOk() (*string, bool) { - if o == nil || IsNil(o.ClientRequestId) { - return nil, false - } - return o.ClientRequestId, true -} - -// HasClientRequestId returns a boolean if a field has been set. -func (o *GetFlowCidV1Request) HasClientRequestId() bool { - if o != nil && !IsNil(o.ClientRequestId) { - return true - } - - return false -} - -// SetClientRequestId gets a reference to the given string and assigns it to the ClientRequestId field. -func (o *GetFlowCidV1Request) SetClientRequestId(v string) { - o.ClientRequestId = &v -} - -func (o GetFlowCidV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetFlowCidV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["username"] = o.Username - toSerialize["password"] = o.Password - toSerialize["rejectUnauthorized"] = o.RejectUnauthorized - if !IsNil(o.HoldingIDShortHash) { - toSerialize["holdingIDShortHash"] = o.HoldingIDShortHash - } - if !IsNil(o.ClientRequestId) { - toSerialize["clientRequestId"] = o.ClientRequestId - } - return toSerialize, nil -} - -type NullableGetFlowCidV1Request struct { - value *GetFlowCidV1Request - isSet bool -} - -func (v NullableGetFlowCidV1Request) Get() *GetFlowCidV1Request { - return v.value -} - -func (v *NullableGetFlowCidV1Request) Set(val *GetFlowCidV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableGetFlowCidV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableGetFlowCidV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetFlowCidV1Request(val *GetFlowCidV1Request) *NullableGetFlowCidV1Request { - return &NullableGetFlowCidV1Request{value: val, isSet: true} -} - -func (v NullableGetFlowCidV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetFlowCidV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_response.go deleted file mode 100644 index 419bdb1cc2..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_response.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" - "time" -) - -// checks if the GetFlowCidV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetFlowCidV1Response{} - -// GetFlowCidV1Response struct for GetFlowCidV1Response -type GetFlowCidV1Response struct { - ClientRequestId NullableString `json:"clientRequestId,omitempty"` - FlowError *FlowV1Error `json:"flowError,omitempty"` - FlowId NullableString `json:"flowId,omitempty"` - FlowResult NullableString `json:"flowResult,omitempty"` - FlowStatus string `json:"flowStatus"` - HoldingIDShortHash string `json:"holdingIDShortHash"` - Timestamp time.Time `json:"timestamp"` -} - -// NewGetFlowCidV1Response instantiates a new GetFlowCidV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetFlowCidV1Response(flowStatus string, holdingIDShortHash string, timestamp time.Time) *GetFlowCidV1Response { - this := GetFlowCidV1Response{} - this.FlowStatus = flowStatus - this.HoldingIDShortHash = holdingIDShortHash - this.Timestamp = timestamp - return &this -} - -// NewGetFlowCidV1ResponseWithDefaults instantiates a new GetFlowCidV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetFlowCidV1ResponseWithDefaults() *GetFlowCidV1Response { - this := GetFlowCidV1Response{} - return &this -} - -// GetClientRequestId returns the ClientRequestId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetFlowCidV1Response) GetClientRequestId() string { - if o == nil || IsNil(o.ClientRequestId.Get()) { - var ret string - return ret - } - return *o.ClientRequestId.Get() -} - -// GetClientRequestIdOk returns a tuple with the ClientRequestId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetFlowCidV1Response) GetClientRequestIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ClientRequestId.Get(), o.ClientRequestId.IsSet() -} - -// HasClientRequestId returns a boolean if a field has been set. -func (o *GetFlowCidV1Response) HasClientRequestId() bool { - if o != nil && o.ClientRequestId.IsSet() { - return true - } - - return false -} - -// SetClientRequestId gets a reference to the given NullableString and assigns it to the ClientRequestId field. -func (o *GetFlowCidV1Response) SetClientRequestId(v string) { - o.ClientRequestId.Set(&v) -} -// SetClientRequestIdNil sets the value for ClientRequestId to be an explicit nil -func (o *GetFlowCidV1Response) SetClientRequestIdNil() { - o.ClientRequestId.Set(nil) -} - -// UnsetClientRequestId ensures that no value is present for ClientRequestId, not even an explicit nil -func (o *GetFlowCidV1Response) UnsetClientRequestId() { - o.ClientRequestId.Unset() -} - -// GetFlowError returns the FlowError field value if set, zero value otherwise. -func (o *GetFlowCidV1Response) GetFlowError() FlowV1Error { - if o == nil || IsNil(o.FlowError) { - var ret FlowV1Error - return ret - } - return *o.FlowError -} - -// GetFlowErrorOk returns a tuple with the FlowError field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetFlowCidV1Response) GetFlowErrorOk() (*FlowV1Error, bool) { - if o == nil || IsNil(o.FlowError) { - return nil, false - } - return o.FlowError, true -} - -// HasFlowError returns a boolean if a field has been set. -func (o *GetFlowCidV1Response) HasFlowError() bool { - if o != nil && !IsNil(o.FlowError) { - return true - } - - return false -} - -// SetFlowError gets a reference to the given FlowV1Error and assigns it to the FlowError field. -func (o *GetFlowCidV1Response) SetFlowError(v FlowV1Error) { - o.FlowError = &v -} - -// GetFlowId returns the FlowId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetFlowCidV1Response) GetFlowId() string { - if o == nil || IsNil(o.FlowId.Get()) { - var ret string - return ret - } - return *o.FlowId.Get() -} - -// GetFlowIdOk returns a tuple with the FlowId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetFlowCidV1Response) GetFlowIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FlowId.Get(), o.FlowId.IsSet() -} - -// HasFlowId returns a boolean if a field has been set. -func (o *GetFlowCidV1Response) HasFlowId() bool { - if o != nil && o.FlowId.IsSet() { - return true - } - - return false -} - -// SetFlowId gets a reference to the given NullableString and assigns it to the FlowId field. -func (o *GetFlowCidV1Response) SetFlowId(v string) { - o.FlowId.Set(&v) -} -// SetFlowIdNil sets the value for FlowId to be an explicit nil -func (o *GetFlowCidV1Response) SetFlowIdNil() { - o.FlowId.Set(nil) -} - -// UnsetFlowId ensures that no value is present for FlowId, not even an explicit nil -func (o *GetFlowCidV1Response) UnsetFlowId() { - o.FlowId.Unset() -} - -// GetFlowResult returns the FlowResult field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetFlowCidV1Response) GetFlowResult() string { - if o == nil || IsNil(o.FlowResult.Get()) { - var ret string - return ret - } - return *o.FlowResult.Get() -} - -// GetFlowResultOk returns a tuple with the FlowResult field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetFlowCidV1Response) GetFlowResultOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FlowResult.Get(), o.FlowResult.IsSet() -} - -// HasFlowResult returns a boolean if a field has been set. -func (o *GetFlowCidV1Response) HasFlowResult() bool { - if o != nil && o.FlowResult.IsSet() { - return true - } - - return false -} - -// SetFlowResult gets a reference to the given NullableString and assigns it to the FlowResult field. -func (o *GetFlowCidV1Response) SetFlowResult(v string) { - o.FlowResult.Set(&v) -} -// SetFlowResultNil sets the value for FlowResult to be an explicit nil -func (o *GetFlowCidV1Response) SetFlowResultNil() { - o.FlowResult.Set(nil) -} - -// UnsetFlowResult ensures that no value is present for FlowResult, not even an explicit nil -func (o *GetFlowCidV1Response) UnsetFlowResult() { - o.FlowResult.Unset() -} - -// GetFlowStatus returns the FlowStatus field value -func (o *GetFlowCidV1Response) GetFlowStatus() string { - if o == nil { - var ret string - return ret - } - - return o.FlowStatus -} - -// GetFlowStatusOk returns a tuple with the FlowStatus field value -// and a boolean to check if the value has been set. -func (o *GetFlowCidV1Response) GetFlowStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FlowStatus, true -} - -// SetFlowStatus sets field value -func (o *GetFlowCidV1Response) SetFlowStatus(v string) { - o.FlowStatus = v -} - -// GetHoldingIDShortHash returns the HoldingIDShortHash field value -func (o *GetFlowCidV1Response) GetHoldingIDShortHash() string { - if o == nil { - var ret string - return ret - } - - return o.HoldingIDShortHash -} - -// GetHoldingIDShortHashOk returns a tuple with the HoldingIDShortHash field value -// and a boolean to check if the value has been set. -func (o *GetFlowCidV1Response) GetHoldingIDShortHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HoldingIDShortHash, true -} - -// SetHoldingIDShortHash sets field value -func (o *GetFlowCidV1Response) SetHoldingIDShortHash(v string) { - o.HoldingIDShortHash = v -} - -// GetTimestamp returns the Timestamp field value -func (o *GetFlowCidV1Response) GetTimestamp() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value -// and a boolean to check if the value has been set. -func (o *GetFlowCidV1Response) GetTimestampOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.Timestamp, true -} - -// SetTimestamp sets field value -func (o *GetFlowCidV1Response) SetTimestamp(v time.Time) { - o.Timestamp = v -} - -func (o GetFlowCidV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetFlowCidV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.ClientRequestId.IsSet() { - toSerialize["clientRequestId"] = o.ClientRequestId.Get() - } - if !IsNil(o.FlowError) { - toSerialize["flowError"] = o.FlowError - } - if o.FlowId.IsSet() { - toSerialize["flowId"] = o.FlowId.Get() - } - if o.FlowResult.IsSet() { - toSerialize["flowResult"] = o.FlowResult.Get() - } - toSerialize["flowStatus"] = o.FlowStatus - toSerialize["holdingIDShortHash"] = o.HoldingIDShortHash - toSerialize["timestamp"] = o.Timestamp - return toSerialize, nil -} - -type NullableGetFlowCidV1Response struct { - value *GetFlowCidV1Response - isSet bool -} - -func (v NullableGetFlowCidV1Response) Get() *GetFlowCidV1Response { - return v.value -} - -func (v *NullableGetFlowCidV1Response) Set(val *GetFlowCidV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetFlowCidV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetFlowCidV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetFlowCidV1Response(val *GetFlowCidV1Response) *NullableGetFlowCidV1Response { - return &NullableGetFlowCidV1Response{value: val, isSet: true} -} - -func (v NullableGetFlowCidV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetFlowCidV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_monitor_transactions_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_monitor_transactions_v1_request.go deleted file mode 100644 index 3bd4235098..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_monitor_transactions_v1_request.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the GetMonitorTransactionsV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetMonitorTransactionsV1Request{} - -// GetMonitorTransactionsV1Request struct for GetMonitorTransactionsV1Request -type GetMonitorTransactionsV1Request struct { - // ID of a client application that wants to monitor the state changes - ClientAppId string `json:"clientAppId"` - // The fully qualified name of the Corda state to monitor - StateFullClassName string `json:"stateFullClassName"` -} - -// NewGetMonitorTransactionsV1Request instantiates a new GetMonitorTransactionsV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetMonitorTransactionsV1Request(clientAppId string, stateFullClassName string) *GetMonitorTransactionsV1Request { - this := GetMonitorTransactionsV1Request{} - this.ClientAppId = clientAppId - this.StateFullClassName = stateFullClassName - return &this -} - -// NewGetMonitorTransactionsV1RequestWithDefaults instantiates a new GetMonitorTransactionsV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetMonitorTransactionsV1RequestWithDefaults() *GetMonitorTransactionsV1Request { - this := GetMonitorTransactionsV1Request{} - return &this -} - -// GetClientAppId returns the ClientAppId field value -func (o *GetMonitorTransactionsV1Request) GetClientAppId() string { - if o == nil { - var ret string - return ret - } - - return o.ClientAppId -} - -// GetClientAppIdOk returns a tuple with the ClientAppId field value -// and a boolean to check if the value has been set. -func (o *GetMonitorTransactionsV1Request) GetClientAppIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientAppId, true -} - -// SetClientAppId sets field value -func (o *GetMonitorTransactionsV1Request) SetClientAppId(v string) { - o.ClientAppId = v -} - -// GetStateFullClassName returns the StateFullClassName field value -func (o *GetMonitorTransactionsV1Request) GetStateFullClassName() string { - if o == nil { - var ret string - return ret - } - - return o.StateFullClassName -} - -// GetStateFullClassNameOk returns a tuple with the StateFullClassName field value -// and a boolean to check if the value has been set. -func (o *GetMonitorTransactionsV1Request) GetStateFullClassNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StateFullClassName, true -} - -// SetStateFullClassName sets field value -func (o *GetMonitorTransactionsV1Request) SetStateFullClassName(v string) { - o.StateFullClassName = v -} - -func (o GetMonitorTransactionsV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetMonitorTransactionsV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["clientAppId"] = o.ClientAppId - toSerialize["stateFullClassName"] = o.StateFullClassName - return toSerialize, nil -} - -type NullableGetMonitorTransactionsV1Request struct { - value *GetMonitorTransactionsV1Request - isSet bool -} - -func (v NullableGetMonitorTransactionsV1Request) Get() *GetMonitorTransactionsV1Request { - return v.value -} - -func (v *NullableGetMonitorTransactionsV1Request) Set(val *GetMonitorTransactionsV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableGetMonitorTransactionsV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableGetMonitorTransactionsV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetMonitorTransactionsV1Request(val *GetMonitorTransactionsV1Request) *NullableGetMonitorTransactionsV1Request { - return &NullableGetMonitorTransactionsV1Request{value: val, isSet: true} -} - -func (v NullableGetMonitorTransactionsV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetMonitorTransactionsV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_monitor_transactions_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_monitor_transactions_v1_response.go deleted file mode 100644 index 77029cb2ec..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_monitor_transactions_v1_response.go +++ /dev/null @@ -1,219 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the GetMonitorTransactionsV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetMonitorTransactionsV1Response{} - -// GetMonitorTransactionsV1Response struct for GetMonitorTransactionsV1Response -type GetMonitorTransactionsV1Response struct { - // Flag set to true if operation completed correctly. - Success bool `json:"success"` - // Message describing operation status or any errors that occurred. - Msg string `json:"msg"` - // The fully qualified name of the Corda state to monitor - StateFullClassName *string `json:"stateFullClassName,omitempty"` - Tx []GetMonitorTransactionsV1ResponseTxInner `json:"tx,omitempty"` -} - -// NewGetMonitorTransactionsV1Response instantiates a new GetMonitorTransactionsV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetMonitorTransactionsV1Response(success bool, msg string) *GetMonitorTransactionsV1Response { - this := GetMonitorTransactionsV1Response{} - this.Success = success - this.Msg = msg - return &this -} - -// NewGetMonitorTransactionsV1ResponseWithDefaults instantiates a new GetMonitorTransactionsV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetMonitorTransactionsV1ResponseWithDefaults() *GetMonitorTransactionsV1Response { - this := GetMonitorTransactionsV1Response{} - return &this -} - -// GetSuccess returns the Success field value -func (o *GetMonitorTransactionsV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *GetMonitorTransactionsV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *GetMonitorTransactionsV1Response) SetSuccess(v bool) { - o.Success = v -} - -// GetMsg returns the Msg field value -func (o *GetMonitorTransactionsV1Response) GetMsg() string { - if o == nil { - var ret string - return ret - } - - return o.Msg -} - -// GetMsgOk returns a tuple with the Msg field value -// and a boolean to check if the value has been set. -func (o *GetMonitorTransactionsV1Response) GetMsgOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Msg, true -} - -// SetMsg sets field value -func (o *GetMonitorTransactionsV1Response) SetMsg(v string) { - o.Msg = v -} - -// GetStateFullClassName returns the StateFullClassName field value if set, zero value otherwise. -func (o *GetMonitorTransactionsV1Response) GetStateFullClassName() string { - if o == nil || IsNil(o.StateFullClassName) { - var ret string - return ret - } - return *o.StateFullClassName -} - -// GetStateFullClassNameOk returns a tuple with the StateFullClassName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetMonitorTransactionsV1Response) GetStateFullClassNameOk() (*string, bool) { - if o == nil || IsNil(o.StateFullClassName) { - return nil, false - } - return o.StateFullClassName, true -} - -// HasStateFullClassName returns a boolean if a field has been set. -func (o *GetMonitorTransactionsV1Response) HasStateFullClassName() bool { - if o != nil && !IsNil(o.StateFullClassName) { - return true - } - - return false -} - -// SetStateFullClassName gets a reference to the given string and assigns it to the StateFullClassName field. -func (o *GetMonitorTransactionsV1Response) SetStateFullClassName(v string) { - o.StateFullClassName = &v -} - -// GetTx returns the Tx field value if set, zero value otherwise. -func (o *GetMonitorTransactionsV1Response) GetTx() []GetMonitorTransactionsV1ResponseTxInner { - if o == nil || IsNil(o.Tx) { - var ret []GetMonitorTransactionsV1ResponseTxInner - return ret - } - return o.Tx -} - -// GetTxOk returns a tuple with the Tx field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetMonitorTransactionsV1Response) GetTxOk() ([]GetMonitorTransactionsV1ResponseTxInner, bool) { - if o == nil || IsNil(o.Tx) { - return nil, false - } - return o.Tx, true -} - -// HasTx returns a boolean if a field has been set. -func (o *GetMonitorTransactionsV1Response) HasTx() bool { - if o != nil && !IsNil(o.Tx) { - return true - } - - return false -} - -// SetTx gets a reference to the given []GetMonitorTransactionsV1ResponseTxInner and assigns it to the Tx field. -func (o *GetMonitorTransactionsV1Response) SetTx(v []GetMonitorTransactionsV1ResponseTxInner) { - o.Tx = v -} - -func (o GetMonitorTransactionsV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetMonitorTransactionsV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["success"] = o.Success - toSerialize["msg"] = o.Msg - if !IsNil(o.StateFullClassName) { - toSerialize["stateFullClassName"] = o.StateFullClassName - } - if !IsNil(o.Tx) { - toSerialize["tx"] = o.Tx - } - return toSerialize, nil -} - -type NullableGetMonitorTransactionsV1Response struct { - value *GetMonitorTransactionsV1Response - isSet bool -} - -func (v NullableGetMonitorTransactionsV1Response) Get() *GetMonitorTransactionsV1Response { - return v.value -} - -func (v *NullableGetMonitorTransactionsV1Response) Set(val *GetMonitorTransactionsV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetMonitorTransactionsV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetMonitorTransactionsV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetMonitorTransactionsV1Response(val *GetMonitorTransactionsV1Response) *NullableGetMonitorTransactionsV1Response { - return &NullableGetMonitorTransactionsV1Response{value: val, isSet: true} -} - -func (v NullableGetMonitorTransactionsV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetMonitorTransactionsV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_monitor_transactions_v1_response_tx_inner.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_monitor_transactions_v1_response_tx_inner.go deleted file mode 100644 index 6b729b133c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_monitor_transactions_v1_response_tx_inner.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the GetMonitorTransactionsV1ResponseTxInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetMonitorTransactionsV1ResponseTxInner{} - -// GetMonitorTransactionsV1ResponseTxInner struct for GetMonitorTransactionsV1ResponseTxInner -type GetMonitorTransactionsV1ResponseTxInner struct { - Index *string `json:"index,omitempty"` - Data *string `json:"data,omitempty"` -} - -// NewGetMonitorTransactionsV1ResponseTxInner instantiates a new GetMonitorTransactionsV1ResponseTxInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetMonitorTransactionsV1ResponseTxInner() *GetMonitorTransactionsV1ResponseTxInner { - this := GetMonitorTransactionsV1ResponseTxInner{} - return &this -} - -// NewGetMonitorTransactionsV1ResponseTxInnerWithDefaults instantiates a new GetMonitorTransactionsV1ResponseTxInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetMonitorTransactionsV1ResponseTxInnerWithDefaults() *GetMonitorTransactionsV1ResponseTxInner { - this := GetMonitorTransactionsV1ResponseTxInner{} - return &this -} - -// GetIndex returns the Index field value if set, zero value otherwise. -func (o *GetMonitorTransactionsV1ResponseTxInner) GetIndex() string { - if o == nil || IsNil(o.Index) { - var ret string - return ret - } - return *o.Index -} - -// GetIndexOk returns a tuple with the Index field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetMonitorTransactionsV1ResponseTxInner) GetIndexOk() (*string, bool) { - if o == nil || IsNil(o.Index) { - return nil, false - } - return o.Index, true -} - -// HasIndex returns a boolean if a field has been set. -func (o *GetMonitorTransactionsV1ResponseTxInner) HasIndex() bool { - if o != nil && !IsNil(o.Index) { - return true - } - - return false -} - -// SetIndex gets a reference to the given string and assigns it to the Index field. -func (o *GetMonitorTransactionsV1ResponseTxInner) SetIndex(v string) { - o.Index = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetMonitorTransactionsV1ResponseTxInner) GetData() string { - if o == nil || IsNil(o.Data) { - var ret string - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetMonitorTransactionsV1ResponseTxInner) GetDataOk() (*string, bool) { - if o == nil || IsNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetMonitorTransactionsV1ResponseTxInner) HasData() bool { - if o != nil && !IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given string and assigns it to the Data field. -func (o *GetMonitorTransactionsV1ResponseTxInner) SetData(v string) { - o.Data = &v -} - -func (o GetMonitorTransactionsV1ResponseTxInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetMonitorTransactionsV1ResponseTxInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Index) { - toSerialize["index"] = o.Index - } - if !IsNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetMonitorTransactionsV1ResponseTxInner struct { - value *GetMonitorTransactionsV1ResponseTxInner - isSet bool -} - -func (v NullableGetMonitorTransactionsV1ResponseTxInner) Get() *GetMonitorTransactionsV1ResponseTxInner { - return v.value -} - -func (v *NullableGetMonitorTransactionsV1ResponseTxInner) Set(val *GetMonitorTransactionsV1ResponseTxInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetMonitorTransactionsV1ResponseTxInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetMonitorTransactionsV1ResponseTxInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetMonitorTransactionsV1ResponseTxInner(val *GetMonitorTransactionsV1ResponseTxInner) *NullableGetMonitorTransactionsV1ResponseTxInner { - return &NullableGetMonitorTransactionsV1ResponseTxInner{value: val, isSet: true} -} - -func (v NullableGetMonitorTransactionsV1ResponseTxInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetMonitorTransactionsV1ResponseTxInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go deleted file mode 100644 index 54a5de9f32..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go +++ /dev/null @@ -1,214 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the InvokeContractV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractV1Request{} - -// InvokeContractV1Request struct for InvokeContractV1Request -type InvokeContractV1Request struct { - // The fully qualified name of the Corda flow to invoke - FlowFullClassName string `json:"flowFullClassName"` - FlowInvocationType FlowInvocationType `json:"flowInvocationType"` - // The list of arguments to pass in to the contract method being invoked. - Params []JvmObject `json:"params"` - // The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. - TimeoutMs *int32 `json:"timeoutMs,omitempty"` -} - -// NewInvokeContractV1Request instantiates a new InvokeContractV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractV1Request(flowFullClassName string, flowInvocationType FlowInvocationType, params []JvmObject) *InvokeContractV1Request { - this := InvokeContractV1Request{} - this.FlowFullClassName = flowFullClassName - this.FlowInvocationType = flowInvocationType - this.Params = params - var timeoutMs int32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// NewInvokeContractV1RequestWithDefaults instantiates a new InvokeContractV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractV1RequestWithDefaults() *InvokeContractV1Request { - this := InvokeContractV1Request{} - var timeoutMs int32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetFlowFullClassName returns the FlowFullClassName field value -func (o *InvokeContractV1Request) GetFlowFullClassName() string { - if o == nil { - var ret string - return ret - } - - return o.FlowFullClassName -} - -// GetFlowFullClassNameOk returns a tuple with the FlowFullClassName field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetFlowFullClassNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FlowFullClassName, true -} - -// SetFlowFullClassName sets field value -func (o *InvokeContractV1Request) SetFlowFullClassName(v string) { - o.FlowFullClassName = v -} - -// GetFlowInvocationType returns the FlowInvocationType field value -func (o *InvokeContractV1Request) GetFlowInvocationType() FlowInvocationType { - if o == nil { - var ret FlowInvocationType - return ret - } - - return o.FlowInvocationType -} - -// GetFlowInvocationTypeOk returns a tuple with the FlowInvocationType field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetFlowInvocationTypeOk() (*FlowInvocationType, bool) { - if o == nil { - return nil, false - } - return &o.FlowInvocationType, true -} - -// SetFlowInvocationType sets field value -func (o *InvokeContractV1Request) SetFlowInvocationType(v FlowInvocationType) { - o.FlowInvocationType = v -} - -// GetParams returns the Params field value -func (o *InvokeContractV1Request) GetParams() []JvmObject { - if o == nil { - var ret []JvmObject - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetParamsOk() ([]JvmObject, bool) { - if o == nil { - return nil, false - } - return o.Params, true -} - -// SetParams sets field value -func (o *InvokeContractV1Request) SetParams(v []JvmObject) { - o.Params = v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetTimeoutMs() int32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret int32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetTimeoutMsOk() (*int32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given int32 and assigns it to the TimeoutMs field. -func (o *InvokeContractV1Request) SetTimeoutMs(v int32) { - o.TimeoutMs = &v -} - -func (o InvokeContractV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["flowFullClassName"] = o.FlowFullClassName - toSerialize["flowInvocationType"] = o.FlowInvocationType - toSerialize["params"] = o.Params - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - return toSerialize, nil -} - -type NullableInvokeContractV1Request struct { - value *InvokeContractV1Request - isSet bool -} - -func (v NullableInvokeContractV1Request) Get() *InvokeContractV1Request { - return v.value -} - -func (v *NullableInvokeContractV1Request) Set(val *InvokeContractV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1Request(val *InvokeContractV1Request) *NullableInvokeContractV1Request { - return &NullableInvokeContractV1Request{value: val, isSet: true} -} - -func (v NullableInvokeContractV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go deleted file mode 100644 index aa84a6cad9..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go +++ /dev/null @@ -1,247 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the InvokeContractV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractV1Response{} - -// InvokeContractV1Response struct for InvokeContractV1Response -type InvokeContractV1Response struct { - Success bool `json:"success"` - // Data returned from the JVM when no transaction is running - CallOutput map[string]interface{} `json:"callOutput"` - // The net.corda.core.flows.StateMachineRunId value returned by the flow execution. - TransactionId *string `json:"transactionId,omitempty"` - // An array of strings representing the aggregated stream of progress updates provided by a *tracked* flow invocation. If the flow invocation was not tracked, this array is still returned, but as empty. - Progress []string `json:"progress,omitempty"` - // The id for the flow handle - FlowId string `json:"flowId"` -} - -// NewInvokeContractV1Response instantiates a new InvokeContractV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractV1Response(success bool, callOutput map[string]interface{}, flowId string) *InvokeContractV1Response { - this := InvokeContractV1Response{} - this.Success = success - this.CallOutput = callOutput - this.FlowId = flowId - return &this -} - -// NewInvokeContractV1ResponseWithDefaults instantiates a new InvokeContractV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractV1ResponseWithDefaults() *InvokeContractV1Response { - this := InvokeContractV1Response{} - return &this -} - -// GetSuccess returns the Success field value -func (o *InvokeContractV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *InvokeContractV1Response) SetSuccess(v bool) { - o.Success = v -} - -// GetCallOutput returns the CallOutput field value -func (o *InvokeContractV1Response) GetCallOutput() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.CallOutput -} - -// GetCallOutputOk returns a tuple with the CallOutput field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetCallOutputOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.CallOutput, true -} - -// SetCallOutput sets field value -func (o *InvokeContractV1Response) SetCallOutput(v map[string]interface{}) { - o.CallOutput = v -} - -// GetTransactionId returns the TransactionId field value if set, zero value otherwise. -func (o *InvokeContractV1Response) GetTransactionId() string { - if o == nil || IsNil(o.TransactionId) { - var ret string - return ret - } - return *o.TransactionId -} - -// GetTransactionIdOk returns a tuple with the TransactionId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetTransactionIdOk() (*string, bool) { - if o == nil || IsNil(o.TransactionId) { - return nil, false - } - return o.TransactionId, true -} - -// HasTransactionId returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasTransactionId() bool { - if o != nil && !IsNil(o.TransactionId) { - return true - } - - return false -} - -// SetTransactionId gets a reference to the given string and assigns it to the TransactionId field. -func (o *InvokeContractV1Response) SetTransactionId(v string) { - o.TransactionId = &v -} - -// GetProgress returns the Progress field value if set, zero value otherwise. -func (o *InvokeContractV1Response) GetProgress() []string { - if o == nil || IsNil(o.Progress) { - var ret []string - return ret - } - return o.Progress -} - -// GetProgressOk returns a tuple with the Progress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetProgressOk() ([]string, bool) { - if o == nil || IsNil(o.Progress) { - return nil, false - } - return o.Progress, true -} - -// HasProgress returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasProgress() bool { - if o != nil && !IsNil(o.Progress) { - return true - } - - return false -} - -// SetProgress gets a reference to the given []string and assigns it to the Progress field. -func (o *InvokeContractV1Response) SetProgress(v []string) { - o.Progress = v -} - -// GetFlowId returns the FlowId field value -func (o *InvokeContractV1Response) GetFlowId() string { - if o == nil { - var ret string - return ret - } - - return o.FlowId -} - -// GetFlowIdOk returns a tuple with the FlowId field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetFlowIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FlowId, true -} - -// SetFlowId sets field value -func (o *InvokeContractV1Response) SetFlowId(v string) { - o.FlowId = v -} - -func (o InvokeContractV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["success"] = o.Success - toSerialize["callOutput"] = o.CallOutput - if !IsNil(o.TransactionId) { - toSerialize["transactionId"] = o.TransactionId - } - if !IsNil(o.Progress) { - toSerialize["progress"] = o.Progress - } - toSerialize["flowId"] = o.FlowId - return toSerialize, nil -} - -type NullableInvokeContractV1Response struct { - value *InvokeContractV1Response - isSet bool -} - -func (v NullableInvokeContractV1Response) Get() *InvokeContractV1Response { - return v.value -} - -func (v *NullableInvokeContractV1Response) Set(val *InvokeContractV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1Response(val *InvokeContractV1Response) *NullableInvokeContractV1Response { - return &NullableInvokeContractV1Response{value: val, isSet: true} -} - -func (v NullableInvokeContractV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jar_file.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jar_file.go deleted file mode 100644 index f543137f70..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jar_file.go +++ /dev/null @@ -1,199 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the JarFile type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &JarFile{} - -// JarFile struct for JarFile -type JarFile struct { - Filename string `json:"filename"` - // Indicates whether the cordapp jar in question contains any embedded migrations that Cactus can/should execute between copying the jar into the cordapp directory and starting the node back up. - HasDbMigrations bool `json:"hasDbMigrations"` - ContentBase64 string `json:"contentBase64"` - AdditionalProperties map[string]interface{} -} - -type _JarFile JarFile - -// NewJarFile instantiates a new JarFile object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJarFile(filename string, hasDbMigrations bool, contentBase64 string) *JarFile { - this := JarFile{} - this.Filename = filename - this.HasDbMigrations = hasDbMigrations - this.ContentBase64 = contentBase64 - return &this -} - -// NewJarFileWithDefaults instantiates a new JarFile object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJarFileWithDefaults() *JarFile { - this := JarFile{} - return &this -} - -// GetFilename returns the Filename field value -func (o *JarFile) GetFilename() string { - if o == nil { - var ret string - return ret - } - - return o.Filename -} - -// GetFilenameOk returns a tuple with the Filename field value -// and a boolean to check if the value has been set. -func (o *JarFile) GetFilenameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Filename, true -} - -// SetFilename sets field value -func (o *JarFile) SetFilename(v string) { - o.Filename = v -} - -// GetHasDbMigrations returns the HasDbMigrations field value -func (o *JarFile) GetHasDbMigrations() bool { - if o == nil { - var ret bool - return ret - } - - return o.HasDbMigrations -} - -// GetHasDbMigrationsOk returns a tuple with the HasDbMigrations field value -// and a boolean to check if the value has been set. -func (o *JarFile) GetHasDbMigrationsOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.HasDbMigrations, true -} - -// SetHasDbMigrations sets field value -func (o *JarFile) SetHasDbMigrations(v bool) { - o.HasDbMigrations = v -} - -// GetContentBase64 returns the ContentBase64 field value -func (o *JarFile) GetContentBase64() string { - if o == nil { - var ret string - return ret - } - - return o.ContentBase64 -} - -// GetContentBase64Ok returns a tuple with the ContentBase64 field value -// and a boolean to check if the value has been set. -func (o *JarFile) GetContentBase64Ok() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContentBase64, true -} - -// SetContentBase64 sets field value -func (o *JarFile) SetContentBase64(v string) { - o.ContentBase64 = v -} - -func (o JarFile) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JarFile) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["filename"] = o.Filename - toSerialize["hasDbMigrations"] = o.HasDbMigrations - toSerialize["contentBase64"] = o.ContentBase64 - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *JarFile) UnmarshalJSON(bytes []byte) (err error) { - varJarFile := _JarFile{} - - if err = json.Unmarshal(bytes, &varJarFile); err == nil { - *o = JarFile(varJarFile) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "filename") - delete(additionalProperties, "hasDbMigrations") - delete(additionalProperties, "contentBase64") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableJarFile struct { - value *JarFile - isSet bool -} - -func (v NullableJarFile) Get() *JarFile { - return v.value -} - -func (v *NullableJarFile) Set(val *JarFile) { - v.value = val - v.isSet = true -} - -func (v NullableJarFile) IsSet() bool { - return v.isSet -} - -func (v *NullableJarFile) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJarFile(val *JarFile) *NullableJarFile { - return &NullableJarFile{value: val, isSet: true} -} - -func (v NullableJarFile) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJarFile) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jvm_object.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jvm_object.go deleted file mode 100644 index e1fb00ea7b..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jvm_object.go +++ /dev/null @@ -1,217 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the JvmObject type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &JvmObject{} - -// JvmObject Can represent JVM primitive and reference types as well. The jvmTypeKind field indicates which one is being stored. If the jvmTypeKind field is set to REFERENCE then the jvmCtorArgs array is expected to be filled, otherwise (e.g. PRIMITIVE jvmTypeKind) it is expected that the primitiveValue property is filled with a primitive data type supported by the JSON standard such as strings, booleans, numbers, etc. -type JvmObject struct { - JvmTypeKind JvmTypeKind `json:"jvmTypeKind"` - PrimitiveValue interface{} `json:"primitiveValue,omitempty"` - JvmCtorArgs []JvmObject `json:"jvmCtorArgs,omitempty"` - JvmType JvmType `json:"jvmType"` -} - -// NewJvmObject instantiates a new JvmObject object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJvmObject(jvmTypeKind JvmTypeKind, jvmType JvmType) *JvmObject { - this := JvmObject{} - this.JvmTypeKind = jvmTypeKind - this.JvmType = jvmType - return &this -} - -// NewJvmObjectWithDefaults instantiates a new JvmObject object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJvmObjectWithDefaults() *JvmObject { - this := JvmObject{} - return &this -} - -// GetJvmTypeKind returns the JvmTypeKind field value -func (o *JvmObject) GetJvmTypeKind() JvmTypeKind { - if o == nil { - var ret JvmTypeKind - return ret - } - - return o.JvmTypeKind -} - -// GetJvmTypeKindOk returns a tuple with the JvmTypeKind field value -// and a boolean to check if the value has been set. -func (o *JvmObject) GetJvmTypeKindOk() (*JvmTypeKind, bool) { - if o == nil { - return nil, false - } - return &o.JvmTypeKind, true -} - -// SetJvmTypeKind sets field value -func (o *JvmObject) SetJvmTypeKind(v JvmTypeKind) { - o.JvmTypeKind = v -} - -// GetPrimitiveValue returns the PrimitiveValue field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *JvmObject) GetPrimitiveValue() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.PrimitiveValue -} - -// GetPrimitiveValueOk returns a tuple with the PrimitiveValue field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *JvmObject) GetPrimitiveValueOk() (*interface{}, bool) { - if o == nil || IsNil(o.PrimitiveValue) { - return nil, false - } - return &o.PrimitiveValue, true -} - -// HasPrimitiveValue returns a boolean if a field has been set. -func (o *JvmObject) HasPrimitiveValue() bool { - if o != nil && IsNil(o.PrimitiveValue) { - return true - } - - return false -} - -// SetPrimitiveValue gets a reference to the given interface{} and assigns it to the PrimitiveValue field. -func (o *JvmObject) SetPrimitiveValue(v interface{}) { - o.PrimitiveValue = v -} - -// GetJvmCtorArgs returns the JvmCtorArgs field value if set, zero value otherwise. -func (o *JvmObject) GetJvmCtorArgs() []JvmObject { - if o == nil || IsNil(o.JvmCtorArgs) { - var ret []JvmObject - return ret - } - return o.JvmCtorArgs -} - -// GetJvmCtorArgsOk returns a tuple with the JvmCtorArgs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JvmObject) GetJvmCtorArgsOk() ([]JvmObject, bool) { - if o == nil || IsNil(o.JvmCtorArgs) { - return nil, false - } - return o.JvmCtorArgs, true -} - -// HasJvmCtorArgs returns a boolean if a field has been set. -func (o *JvmObject) HasJvmCtorArgs() bool { - if o != nil && !IsNil(o.JvmCtorArgs) { - return true - } - - return false -} - -// SetJvmCtorArgs gets a reference to the given []JvmObject and assigns it to the JvmCtorArgs field. -func (o *JvmObject) SetJvmCtorArgs(v []JvmObject) { - o.JvmCtorArgs = v -} - -// GetJvmType returns the JvmType field value -func (o *JvmObject) GetJvmType() JvmType { - if o == nil { - var ret JvmType - return ret - } - - return o.JvmType -} - -// GetJvmTypeOk returns a tuple with the JvmType field value -// and a boolean to check if the value has been set. -func (o *JvmObject) GetJvmTypeOk() (*JvmType, bool) { - if o == nil { - return nil, false - } - return &o.JvmType, true -} - -// SetJvmType sets field value -func (o *JvmObject) SetJvmType(v JvmType) { - o.JvmType = v -} - -func (o JvmObject) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JvmObject) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["jvmTypeKind"] = o.JvmTypeKind - if o.PrimitiveValue != nil { - toSerialize["primitiveValue"] = o.PrimitiveValue - } - if !IsNil(o.JvmCtorArgs) { - toSerialize["jvmCtorArgs"] = o.JvmCtorArgs - } - toSerialize["jvmType"] = o.JvmType - return toSerialize, nil -} - -type NullableJvmObject struct { - value *JvmObject - isSet bool -} - -func (v NullableJvmObject) Get() *JvmObject { - return v.value -} - -func (v *NullableJvmObject) Set(val *JvmObject) { - v.value = val - v.isSet = true -} - -func (v NullableJvmObject) IsSet() bool { - return v.isSet -} - -func (v *NullableJvmObject) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJvmObject(val *JvmObject) *NullableJvmObject { - return &NullableJvmObject{value: val, isSet: true} -} - -func (v NullableJvmObject) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJvmObject) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jvm_type.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jvm_type.go deleted file mode 100644 index 03441a4a7d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jvm_type.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the JvmType type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &JvmType{} - -// JvmType Represents a reference to a JVM type (such as a Java class) -type JvmType struct { - FqClassName string `json:"fqClassName"` - // This parameter is used to specify that the function used to construct this JvmType is not a constructor function but instead is a factory function. Setting this parameter will cause the plugin to look up methods of the class denoted by fqClassName instead of its constructors. - ConstructorName *string `json:"constructorName,omitempty"` - InvocationTarget *JvmObject `json:"invocationTarget,omitempty"` -} - -// NewJvmType instantiates a new JvmType object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJvmType(fqClassName string) *JvmType { - this := JvmType{} - this.FqClassName = fqClassName - return &this -} - -// NewJvmTypeWithDefaults instantiates a new JvmType object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJvmTypeWithDefaults() *JvmType { - this := JvmType{} - return &this -} - -// GetFqClassName returns the FqClassName field value -func (o *JvmType) GetFqClassName() string { - if o == nil { - var ret string - return ret - } - - return o.FqClassName -} - -// GetFqClassNameOk returns a tuple with the FqClassName field value -// and a boolean to check if the value has been set. -func (o *JvmType) GetFqClassNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FqClassName, true -} - -// SetFqClassName sets field value -func (o *JvmType) SetFqClassName(v string) { - o.FqClassName = v -} - -// GetConstructorName returns the ConstructorName field value if set, zero value otherwise. -func (o *JvmType) GetConstructorName() string { - if o == nil || IsNil(o.ConstructorName) { - var ret string - return ret - } - return *o.ConstructorName -} - -// GetConstructorNameOk returns a tuple with the ConstructorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JvmType) GetConstructorNameOk() (*string, bool) { - if o == nil || IsNil(o.ConstructorName) { - return nil, false - } - return o.ConstructorName, true -} - -// HasConstructorName returns a boolean if a field has been set. -func (o *JvmType) HasConstructorName() bool { - if o != nil && !IsNil(o.ConstructorName) { - return true - } - - return false -} - -// SetConstructorName gets a reference to the given string and assigns it to the ConstructorName field. -func (o *JvmType) SetConstructorName(v string) { - o.ConstructorName = &v -} - -// GetInvocationTarget returns the InvocationTarget field value if set, zero value otherwise. -func (o *JvmType) GetInvocationTarget() JvmObject { - if o == nil || IsNil(o.InvocationTarget) { - var ret JvmObject - return ret - } - return *o.InvocationTarget -} - -// GetInvocationTargetOk returns a tuple with the InvocationTarget field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JvmType) GetInvocationTargetOk() (*JvmObject, bool) { - if o == nil || IsNil(o.InvocationTarget) { - return nil, false - } - return o.InvocationTarget, true -} - -// HasInvocationTarget returns a boolean if a field has been set. -func (o *JvmType) HasInvocationTarget() bool { - if o != nil && !IsNil(o.InvocationTarget) { - return true - } - - return false -} - -// SetInvocationTarget gets a reference to the given JvmObject and assigns it to the InvocationTarget field. -func (o *JvmType) SetInvocationTarget(v JvmObject) { - o.InvocationTarget = &v -} - -func (o JvmType) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JvmType) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["fqClassName"] = o.FqClassName - if !IsNil(o.ConstructorName) { - toSerialize["constructorName"] = o.ConstructorName - } - if !IsNil(o.InvocationTarget) { - toSerialize["invocationTarget"] = o.InvocationTarget - } - return toSerialize, nil -} - -type NullableJvmType struct { - value *JvmType - isSet bool -} - -func (v NullableJvmType) Get() *JvmType { - return v.value -} - -func (v *NullableJvmType) Set(val *JvmType) { - v.value = val - v.isSet = true -} - -func (v NullableJvmType) IsSet() bool { - return v.isSet -} - -func (v *NullableJvmType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJvmType(val *JvmType) *NullableJvmType { - return &NullableJvmType{value: val, isSet: true} -} - -func (v NullableJvmType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJvmType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jvm_type_kind.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jvm_type_kind.go deleted file mode 100644 index d26dbe6d3c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_jvm_type_kind.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" - "fmt" -) - -// JvmTypeKind the model 'JvmTypeKind' -type JvmTypeKind string - -// List of JvmTypeKind -const ( - PRIMITIVE JvmTypeKind = "PRIMITIVE" - REFERENCE JvmTypeKind = "REFERENCE" -) - -// All allowed values of JvmTypeKind enum -var AllowedJvmTypeKindEnumValues = []JvmTypeKind{ - "PRIMITIVE", - "REFERENCE", -} - -func (v *JvmTypeKind) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := JvmTypeKind(value) - for _, existing := range AllowedJvmTypeKindEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid JvmTypeKind", value) -} - -// NewJvmTypeKindFromValue returns a pointer to a valid JvmTypeKind -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewJvmTypeKindFromValue(v string) (*JvmTypeKind, error) { - ev := JvmTypeKind(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for JvmTypeKind: valid values are %v", v, AllowedJvmTypeKindEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v JvmTypeKind) IsValid() bool { - for _, existing := range AllowedJvmTypeKindEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to JvmTypeKind value -func (v JvmTypeKind) Ptr() *JvmTypeKind { - return &v -} - -type NullableJvmTypeKind struct { - value *JvmTypeKind - isSet bool -} - -func (v NullableJvmTypeKind) Get() *JvmTypeKind { - return v.value -} - -func (v *NullableJvmTypeKind) Set(val *JvmTypeKind) { - v.value = val - v.isSet = true -} - -func (v NullableJvmTypeKind) IsSet() bool { - return v.isSet -} - -func (v *NullableJvmTypeKind) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJvmTypeKind(val *JvmTypeKind) *NullableJvmTypeKind { - return &NullableJvmTypeKind{value: val, isSet: true} -} - -func (v NullableJvmTypeKind) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJvmTypeKind) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_request.go deleted file mode 100644 index 5bb9051ea9..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_request.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the ListCpiV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListCpiV1Request{} - -// ListCpiV1Request struct for ListCpiV1Request -type ListCpiV1Request struct { - Username string `json:"username"` - Password string `json:"password"` - RejectUnauthorized bool `json:"rejectUnauthorized"` -} - -// NewListCpiV1Request instantiates a new ListCpiV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListCpiV1Request(username string, password string, rejectUnauthorized bool) *ListCpiV1Request { - this := ListCpiV1Request{} - this.Username = username - this.Password = password - this.RejectUnauthorized = rejectUnauthorized - return &this -} - -// NewListCpiV1RequestWithDefaults instantiates a new ListCpiV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListCpiV1RequestWithDefaults() *ListCpiV1Request { - this := ListCpiV1Request{} - return &this -} - -// GetUsername returns the Username field value -func (o *ListCpiV1Request) GetUsername() string { - if o == nil { - var ret string - return ret - } - - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value -// and a boolean to check if the value has been set. -func (o *ListCpiV1Request) GetUsernameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Username, true -} - -// SetUsername sets field value -func (o *ListCpiV1Request) SetUsername(v string) { - o.Username = v -} - -// GetPassword returns the Password field value -func (o *ListCpiV1Request) GetPassword() string { - if o == nil { - var ret string - return ret - } - - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value -// and a boolean to check if the value has been set. -func (o *ListCpiV1Request) GetPasswordOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Password, true -} - -// SetPassword sets field value -func (o *ListCpiV1Request) SetPassword(v string) { - o.Password = v -} - -// GetRejectUnauthorized returns the RejectUnauthorized field value -func (o *ListCpiV1Request) GetRejectUnauthorized() bool { - if o == nil { - var ret bool - return ret - } - - return o.RejectUnauthorized -} - -// GetRejectUnauthorizedOk returns a tuple with the RejectUnauthorized field value -// and a boolean to check if the value has been set. -func (o *ListCpiV1Request) GetRejectUnauthorizedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.RejectUnauthorized, true -} - -// SetRejectUnauthorized sets field value -func (o *ListCpiV1Request) SetRejectUnauthorized(v bool) { - o.RejectUnauthorized = v -} - -func (o ListCpiV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListCpiV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["username"] = o.Username - toSerialize["password"] = o.Password - toSerialize["rejectUnauthorized"] = o.RejectUnauthorized - return toSerialize, nil -} - -type NullableListCpiV1Request struct { - value *ListCpiV1Request - isSet bool -} - -func (v NullableListCpiV1Request) Get() *ListCpiV1Request { - return v.value -} - -func (v *NullableListCpiV1Request) Set(val *ListCpiV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableListCpiV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableListCpiV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListCpiV1Request(val *ListCpiV1Request) *NullableListCpiV1Request { - return &NullableListCpiV1Request{value: val, isSet: true} -} - -func (v NullableListCpiV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListCpiV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response.go deleted file mode 100644 index 1bf3df3546..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the ListCpiV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListCpiV1Response{} - -// ListCpiV1Response struct for ListCpiV1Response -type ListCpiV1Response struct { - Cpis []ListCpiV1ResponseCpisInner `json:"cpis,omitempty"` -} - -// NewListCpiV1Response instantiates a new ListCpiV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListCpiV1Response() *ListCpiV1Response { - this := ListCpiV1Response{} - return &this -} - -// NewListCpiV1ResponseWithDefaults instantiates a new ListCpiV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListCpiV1ResponseWithDefaults() *ListCpiV1Response { - this := ListCpiV1Response{} - return &this -} - -// GetCpis returns the Cpis field value if set, zero value otherwise. -func (o *ListCpiV1Response) GetCpis() []ListCpiV1ResponseCpisInner { - if o == nil || IsNil(o.Cpis) { - var ret []ListCpiV1ResponseCpisInner - return ret - } - return o.Cpis -} - -// GetCpisOk returns a tuple with the Cpis field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1Response) GetCpisOk() ([]ListCpiV1ResponseCpisInner, bool) { - if o == nil || IsNil(o.Cpis) { - return nil, false - } - return o.Cpis, true -} - -// HasCpis returns a boolean if a field has been set. -func (o *ListCpiV1Response) HasCpis() bool { - if o != nil && !IsNil(o.Cpis) { - return true - } - - return false -} - -// SetCpis gets a reference to the given []ListCpiV1ResponseCpisInner and assigns it to the Cpis field. -func (o *ListCpiV1Response) SetCpis(v []ListCpiV1ResponseCpisInner) { - o.Cpis = v -} - -func (o ListCpiV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListCpiV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Cpis) { - toSerialize["cpis"] = o.Cpis - } - return toSerialize, nil -} - -type NullableListCpiV1Response struct { - value *ListCpiV1Response - isSet bool -} - -func (v NullableListCpiV1Response) Get() *ListCpiV1Response { - return v.value -} - -func (v *NullableListCpiV1Response) Set(val *ListCpiV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableListCpiV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableListCpiV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListCpiV1Response(val *ListCpiV1Response) *NullableListCpiV1Response { - return &NullableListCpiV1Response{value: val, isSet: true} -} - -func (v NullableListCpiV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListCpiV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner.go deleted file mode 100644 index 0ecd1424ea..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner.go +++ /dev/null @@ -1,317 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" - "time" -) - -// checks if the ListCpiV1ResponseCpisInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListCpiV1ResponseCpisInner{} - -// ListCpiV1ResponseCpisInner struct for ListCpiV1ResponseCpisInner -type ListCpiV1ResponseCpisInner struct { - CpiFileChecksum *string `json:"cpiFileChecksum,omitempty"` - CpiFileFullChecksum *string `json:"cpiFileFullChecksum,omitempty"` - Cpks []ListCpiV1ResponseCpisInnerCpksInner `json:"cpks,omitempty"` - GroupPolicy NullableString `json:"groupPolicy,omitempty"` - Id *CPIIDV1 `json:"id,omitempty"` - Timestamp *time.Time `json:"timestamp,omitempty"` -} - -// NewListCpiV1ResponseCpisInner instantiates a new ListCpiV1ResponseCpisInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListCpiV1ResponseCpisInner() *ListCpiV1ResponseCpisInner { - this := ListCpiV1ResponseCpisInner{} - return &this -} - -// NewListCpiV1ResponseCpisInnerWithDefaults instantiates a new ListCpiV1ResponseCpisInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListCpiV1ResponseCpisInnerWithDefaults() *ListCpiV1ResponseCpisInner { - this := ListCpiV1ResponseCpisInner{} - return &this -} - -// GetCpiFileChecksum returns the CpiFileChecksum field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInner) GetCpiFileChecksum() string { - if o == nil || IsNil(o.CpiFileChecksum) { - var ret string - return ret - } - return *o.CpiFileChecksum -} - -// GetCpiFileChecksumOk returns a tuple with the CpiFileChecksum field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInner) GetCpiFileChecksumOk() (*string, bool) { - if o == nil || IsNil(o.CpiFileChecksum) { - return nil, false - } - return o.CpiFileChecksum, true -} - -// HasCpiFileChecksum returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInner) HasCpiFileChecksum() bool { - if o != nil && !IsNil(o.CpiFileChecksum) { - return true - } - - return false -} - -// SetCpiFileChecksum gets a reference to the given string and assigns it to the CpiFileChecksum field. -func (o *ListCpiV1ResponseCpisInner) SetCpiFileChecksum(v string) { - o.CpiFileChecksum = &v -} - -// GetCpiFileFullChecksum returns the CpiFileFullChecksum field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInner) GetCpiFileFullChecksum() string { - if o == nil || IsNil(o.CpiFileFullChecksum) { - var ret string - return ret - } - return *o.CpiFileFullChecksum -} - -// GetCpiFileFullChecksumOk returns a tuple with the CpiFileFullChecksum field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInner) GetCpiFileFullChecksumOk() (*string, bool) { - if o == nil || IsNil(o.CpiFileFullChecksum) { - return nil, false - } - return o.CpiFileFullChecksum, true -} - -// HasCpiFileFullChecksum returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInner) HasCpiFileFullChecksum() bool { - if o != nil && !IsNil(o.CpiFileFullChecksum) { - return true - } - - return false -} - -// SetCpiFileFullChecksum gets a reference to the given string and assigns it to the CpiFileFullChecksum field. -func (o *ListCpiV1ResponseCpisInner) SetCpiFileFullChecksum(v string) { - o.CpiFileFullChecksum = &v -} - -// GetCpks returns the Cpks field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInner) GetCpks() []ListCpiV1ResponseCpisInnerCpksInner { - if o == nil || IsNil(o.Cpks) { - var ret []ListCpiV1ResponseCpisInnerCpksInner - return ret - } - return o.Cpks -} - -// GetCpksOk returns a tuple with the Cpks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInner) GetCpksOk() ([]ListCpiV1ResponseCpisInnerCpksInner, bool) { - if o == nil || IsNil(o.Cpks) { - return nil, false - } - return o.Cpks, true -} - -// HasCpks returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInner) HasCpks() bool { - if o != nil && !IsNil(o.Cpks) { - return true - } - - return false -} - -// SetCpks gets a reference to the given []ListCpiV1ResponseCpisInnerCpksInner and assigns it to the Cpks field. -func (o *ListCpiV1ResponseCpisInner) SetCpks(v []ListCpiV1ResponseCpisInnerCpksInner) { - o.Cpks = v -} - -// GetGroupPolicy returns the GroupPolicy field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ListCpiV1ResponseCpisInner) GetGroupPolicy() string { - if o == nil || IsNil(o.GroupPolicy.Get()) { - var ret string - return ret - } - return *o.GroupPolicy.Get() -} - -// GetGroupPolicyOk returns a tuple with the GroupPolicy field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ListCpiV1ResponseCpisInner) GetGroupPolicyOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.GroupPolicy.Get(), o.GroupPolicy.IsSet() -} - -// HasGroupPolicy returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInner) HasGroupPolicy() bool { - if o != nil && o.GroupPolicy.IsSet() { - return true - } - - return false -} - -// SetGroupPolicy gets a reference to the given NullableString and assigns it to the GroupPolicy field. -func (o *ListCpiV1ResponseCpisInner) SetGroupPolicy(v string) { - o.GroupPolicy.Set(&v) -} -// SetGroupPolicyNil sets the value for GroupPolicy to be an explicit nil -func (o *ListCpiV1ResponseCpisInner) SetGroupPolicyNil() { - o.GroupPolicy.Set(nil) -} - -// UnsetGroupPolicy ensures that no value is present for GroupPolicy, not even an explicit nil -func (o *ListCpiV1ResponseCpisInner) UnsetGroupPolicy() { - o.GroupPolicy.Unset() -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInner) GetId() CPIIDV1 { - if o == nil || IsNil(o.Id) { - var ret CPIIDV1 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInner) GetIdOk() (*CPIIDV1, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInner) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given CPIIDV1 and assigns it to the Id field. -func (o *ListCpiV1ResponseCpisInner) SetId(v CPIIDV1) { - o.Id = &v -} - -// GetTimestamp returns the Timestamp field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInner) GetTimestamp() time.Time { - if o == nil || IsNil(o.Timestamp) { - var ret time.Time - return ret - } - return *o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInner) GetTimestampOk() (*time.Time, bool) { - if o == nil || IsNil(o.Timestamp) { - return nil, false - } - return o.Timestamp, true -} - -// HasTimestamp returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInner) HasTimestamp() bool { - if o != nil && !IsNil(o.Timestamp) { - return true - } - - return false -} - -// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. -func (o *ListCpiV1ResponseCpisInner) SetTimestamp(v time.Time) { - o.Timestamp = &v -} - -func (o ListCpiV1ResponseCpisInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListCpiV1ResponseCpisInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CpiFileChecksum) { - toSerialize["cpiFileChecksum"] = o.CpiFileChecksum - } - if !IsNil(o.CpiFileFullChecksum) { - toSerialize["cpiFileFullChecksum"] = o.CpiFileFullChecksum - } - if !IsNil(o.Cpks) { - toSerialize["cpks"] = o.Cpks - } - if o.GroupPolicy.IsSet() { - toSerialize["groupPolicy"] = o.GroupPolicy.Get() - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Timestamp) { - toSerialize["timestamp"] = o.Timestamp - } - return toSerialize, nil -} - -type NullableListCpiV1ResponseCpisInner struct { - value *ListCpiV1ResponseCpisInner - isSet bool -} - -func (v NullableListCpiV1ResponseCpisInner) Get() *ListCpiV1ResponseCpisInner { - return v.value -} - -func (v *NullableListCpiV1ResponseCpisInner) Set(val *ListCpiV1ResponseCpisInner) { - v.value = val - v.isSet = true -} - -func (v NullableListCpiV1ResponseCpisInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListCpiV1ResponseCpisInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListCpiV1ResponseCpisInner(val *ListCpiV1ResponseCpisInner) *NullableListCpiV1ResponseCpisInner { - return &NullableListCpiV1ResponseCpisInner{value: val, isSet: true} -} - -func (v NullableListCpiV1ResponseCpisInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListCpiV1ResponseCpisInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner_cpks_inner.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner_cpks_inner.go deleted file mode 100644 index 73c65995fd..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner_cpks_inner.go +++ /dev/null @@ -1,307 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" - "time" -) - -// checks if the ListCpiV1ResponseCpisInnerCpksInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListCpiV1ResponseCpisInnerCpksInner{} - -// ListCpiV1ResponseCpisInnerCpksInner struct for ListCpiV1ResponseCpisInnerCpksInner -type ListCpiV1ResponseCpisInnerCpksInner struct { - Hash *string `json:"hash,omitempty"` - Id *CPIIDV1 `json:"id,omitempty"` - Libraries []string `json:"libraries,omitempty"` - MainBundle *string `json:"mainBundle,omitempty"` - Timestamp *time.Time `json:"timestamp,omitempty"` - Type *string `json:"type,omitempty"` -} - -// NewListCpiV1ResponseCpisInnerCpksInner instantiates a new ListCpiV1ResponseCpisInnerCpksInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListCpiV1ResponseCpisInnerCpksInner() *ListCpiV1ResponseCpisInnerCpksInner { - this := ListCpiV1ResponseCpisInnerCpksInner{} - return &this -} - -// NewListCpiV1ResponseCpisInnerCpksInnerWithDefaults instantiates a new ListCpiV1ResponseCpisInnerCpksInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListCpiV1ResponseCpisInnerCpksInnerWithDefaults() *ListCpiV1ResponseCpisInnerCpksInner { - this := ListCpiV1ResponseCpisInnerCpksInner{} - return &this -} - -// GetHash returns the Hash field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetHash() string { - if o == nil || IsNil(o.Hash) { - var ret string - return ret - } - return *o.Hash -} - -// GetHashOk returns a tuple with the Hash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetHashOk() (*string, bool) { - if o == nil || IsNil(o.Hash) { - return nil, false - } - return o.Hash, true -} - -// HasHash returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) HasHash() bool { - if o != nil && !IsNil(o.Hash) { - return true - } - - return false -} - -// SetHash gets a reference to the given string and assigns it to the Hash field. -func (o *ListCpiV1ResponseCpisInnerCpksInner) SetHash(v string) { - o.Hash = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetId() CPIIDV1 { - if o == nil || IsNil(o.Id) { - var ret CPIIDV1 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetIdOk() (*CPIIDV1, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given CPIIDV1 and assigns it to the Id field. -func (o *ListCpiV1ResponseCpisInnerCpksInner) SetId(v CPIIDV1) { - o.Id = &v -} - -// GetLibraries returns the Libraries field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetLibraries() []string { - if o == nil || IsNil(o.Libraries) { - var ret []string - return ret - } - return o.Libraries -} - -// GetLibrariesOk returns a tuple with the Libraries field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetLibrariesOk() ([]string, bool) { - if o == nil || IsNil(o.Libraries) { - return nil, false - } - return o.Libraries, true -} - -// HasLibraries returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) HasLibraries() bool { - if o != nil && !IsNil(o.Libraries) { - return true - } - - return false -} - -// SetLibraries gets a reference to the given []string and assigns it to the Libraries field. -func (o *ListCpiV1ResponseCpisInnerCpksInner) SetLibraries(v []string) { - o.Libraries = v -} - -// GetMainBundle returns the MainBundle field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetMainBundle() string { - if o == nil || IsNil(o.MainBundle) { - var ret string - return ret - } - return *o.MainBundle -} - -// GetMainBundleOk returns a tuple with the MainBundle field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetMainBundleOk() (*string, bool) { - if o == nil || IsNil(o.MainBundle) { - return nil, false - } - return o.MainBundle, true -} - -// HasMainBundle returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) HasMainBundle() bool { - if o != nil && !IsNil(o.MainBundle) { - return true - } - - return false -} - -// SetMainBundle gets a reference to the given string and assigns it to the MainBundle field. -func (o *ListCpiV1ResponseCpisInnerCpksInner) SetMainBundle(v string) { - o.MainBundle = &v -} - -// GetTimestamp returns the Timestamp field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetTimestamp() time.Time { - if o == nil || IsNil(o.Timestamp) { - var ret time.Time - return ret - } - return *o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetTimestampOk() (*time.Time, bool) { - if o == nil || IsNil(o.Timestamp) { - return nil, false - } - return o.Timestamp, true -} - -// HasTimestamp returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) HasTimestamp() bool { - if o != nil && !IsNil(o.Timestamp) { - return true - } - - return false -} - -// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. -func (o *ListCpiV1ResponseCpisInnerCpksInner) SetTimestamp(v time.Time) { - o.Timestamp = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *ListCpiV1ResponseCpisInnerCpksInner) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *ListCpiV1ResponseCpisInnerCpksInner) SetType(v string) { - o.Type = &v -} - -func (o ListCpiV1ResponseCpisInnerCpksInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListCpiV1ResponseCpisInnerCpksInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Hash) { - toSerialize["hash"] = o.Hash - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Libraries) { - toSerialize["libraries"] = o.Libraries - } - if !IsNil(o.MainBundle) { - toSerialize["mainBundle"] = o.MainBundle - } - if !IsNil(o.Timestamp) { - toSerialize["timestamp"] = o.Timestamp - } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - return toSerialize, nil -} - -type NullableListCpiV1ResponseCpisInnerCpksInner struct { - value *ListCpiV1ResponseCpisInnerCpksInner - isSet bool -} - -func (v NullableListCpiV1ResponseCpisInnerCpksInner) Get() *ListCpiV1ResponseCpisInnerCpksInner { - return v.value -} - -func (v *NullableListCpiV1ResponseCpisInnerCpksInner) Set(val *ListCpiV1ResponseCpisInnerCpksInner) { - v.value = val - v.isSet = true -} - -func (v NullableListCpiV1ResponseCpisInnerCpksInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListCpiV1ResponseCpisInnerCpksInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListCpiV1ResponseCpisInnerCpksInner(val *ListCpiV1ResponseCpisInnerCpksInner) *NullableListCpiV1ResponseCpisInnerCpksInner { - return &NullableListCpiV1ResponseCpisInnerCpksInner{value: val, isSet: true} -} - -func (v NullableListCpiV1ResponseCpisInnerCpksInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListCpiV1ResponseCpisInnerCpksInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_flows_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_flows_v1_request.go deleted file mode 100644 index be3694c05d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_flows_v1_request.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the ListFlowsV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListFlowsV1Request{} - -// ListFlowsV1Request struct for ListFlowsV1Request -type ListFlowsV1Request struct { - Filter *string `json:"filter,omitempty"` -} - -// NewListFlowsV1Request instantiates a new ListFlowsV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListFlowsV1Request() *ListFlowsV1Request { - this := ListFlowsV1Request{} - return &this -} - -// NewListFlowsV1RequestWithDefaults instantiates a new ListFlowsV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListFlowsV1RequestWithDefaults() *ListFlowsV1Request { - this := ListFlowsV1Request{} - return &this -} - -// GetFilter returns the Filter field value if set, zero value otherwise. -func (o *ListFlowsV1Request) GetFilter() string { - if o == nil || IsNil(o.Filter) { - var ret string - return ret - } - return *o.Filter -} - -// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListFlowsV1Request) GetFilterOk() (*string, bool) { - if o == nil || IsNil(o.Filter) { - return nil, false - } - return o.Filter, true -} - -// HasFilter returns a boolean if a field has been set. -func (o *ListFlowsV1Request) HasFilter() bool { - if o != nil && !IsNil(o.Filter) { - return true - } - - return false -} - -// SetFilter gets a reference to the given string and assigns it to the Filter field. -func (o *ListFlowsV1Request) SetFilter(v string) { - o.Filter = &v -} - -func (o ListFlowsV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListFlowsV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Filter) { - toSerialize["filter"] = o.Filter - } - return toSerialize, nil -} - -type NullableListFlowsV1Request struct { - value *ListFlowsV1Request - isSet bool -} - -func (v NullableListFlowsV1Request) Get() *ListFlowsV1Request { - return v.value -} - -func (v *NullableListFlowsV1Request) Set(val *ListFlowsV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableListFlowsV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableListFlowsV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListFlowsV1Request(val *ListFlowsV1Request) *NullableListFlowsV1Request { - return &NullableListFlowsV1Request{value: val, isSet: true} -} - -func (v NullableListFlowsV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListFlowsV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_flows_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_flows_v1_response.go deleted file mode 100644 index 76a46fded8..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_flows_v1_response.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the ListFlowsV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListFlowsV1Response{} - -// ListFlowsV1Response struct for ListFlowsV1Response -type ListFlowsV1Response struct { - // An array of strings storing the names of the flows as returned by the flowList Corda RPC. - FlowNames []string `json:"flowNames"` -} - -// NewListFlowsV1Response instantiates a new ListFlowsV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListFlowsV1Response(flowNames []string) *ListFlowsV1Response { - this := ListFlowsV1Response{} - this.FlowNames = flowNames - return &this -} - -// NewListFlowsV1ResponseWithDefaults instantiates a new ListFlowsV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListFlowsV1ResponseWithDefaults() *ListFlowsV1Response { - this := ListFlowsV1Response{} - return &this -} - -// GetFlowNames returns the FlowNames field value -func (o *ListFlowsV1Response) GetFlowNames() []string { - if o == nil { - var ret []string - return ret - } - - return o.FlowNames -} - -// GetFlowNamesOk returns a tuple with the FlowNames field value -// and a boolean to check if the value has been set. -func (o *ListFlowsV1Response) GetFlowNamesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.FlowNames, true -} - -// SetFlowNames sets field value -func (o *ListFlowsV1Response) SetFlowNames(v []string) { - o.FlowNames = v -} - -func (o ListFlowsV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListFlowsV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["flowNames"] = o.FlowNames - return toSerialize, nil -} - -type NullableListFlowsV1Response struct { - value *ListFlowsV1Response - isSet bool -} - -func (v NullableListFlowsV1Response) Get() *ListFlowsV1Response { - return v.value -} - -func (v *NullableListFlowsV1Response) Set(val *ListFlowsV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableListFlowsV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableListFlowsV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListFlowsV1Response(val *ListFlowsV1Response) *NullableListFlowsV1Response { - return &NullableListFlowsV1Response{value: val, isSet: true} -} - -func (v NullableListFlowsV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListFlowsV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_network_host_and_port.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_network_host_and_port.go deleted file mode 100644 index f08b35301b..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_network_host_and_port.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the NetworkHostAndPort type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkHostAndPort{} - -// NetworkHostAndPort struct for NetworkHostAndPort -type NetworkHostAndPort struct { - Host string `json:"host"` - Port float32 `json:"port"` -} - -// NewNetworkHostAndPort instantiates a new NetworkHostAndPort object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewNetworkHostAndPort(host string, port float32) *NetworkHostAndPort { - this := NetworkHostAndPort{} - this.Host = host - this.Port = port - return &this -} - -// NewNetworkHostAndPortWithDefaults instantiates a new NetworkHostAndPort object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewNetworkHostAndPortWithDefaults() *NetworkHostAndPort { - this := NetworkHostAndPort{} - return &this -} - -// GetHost returns the Host field value -func (o *NetworkHostAndPort) GetHost() string { - if o == nil { - var ret string - return ret - } - - return o.Host -} - -// GetHostOk returns a tuple with the Host field value -// and a boolean to check if the value has been set. -func (o *NetworkHostAndPort) GetHostOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Host, true -} - -// SetHost sets field value -func (o *NetworkHostAndPort) SetHost(v string) { - o.Host = v -} - -// GetPort returns the Port field value -func (o *NetworkHostAndPort) GetPort() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Port -} - -// GetPortOk returns a tuple with the Port field value -// and a boolean to check if the value has been set. -func (o *NetworkHostAndPort) GetPortOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Port, true -} - -// SetPort sets field value -func (o *NetworkHostAndPort) SetPort(v float32) { - o.Port = v -} - -func (o NetworkHostAndPort) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NetworkHostAndPort) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["host"] = o.Host - toSerialize["port"] = o.Port - return toSerialize, nil -} - -type NullableNetworkHostAndPort struct { - value *NetworkHostAndPort - isSet bool -} - -func (v NullableNetworkHostAndPort) Get() *NetworkHostAndPort { - return v.value -} - -func (v *NullableNetworkHostAndPort) Set(val *NetworkHostAndPort) { - v.value = val - v.isSet = true -} - -func (v NullableNetworkHostAndPort) IsSet() bool { - return v.isSet -} - -func (v *NullableNetworkHostAndPort) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetworkHostAndPort(val *NetworkHostAndPort) *NullableNetworkHostAndPort { - return &NullableNetworkHostAndPort{value: val, isSet: true} -} - -func (v NullableNetworkHostAndPort) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetworkHostAndPort) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_node_diagnostic_info.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_node_diagnostic_info.go deleted file mode 100644 index 469ca11e4a..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_node_diagnostic_info.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the NodeDiagnosticInfo type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NodeDiagnosticInfo{} - -// NodeDiagnosticInfo A NodeDiagnosticInfo holds information about the current node version. -type NodeDiagnosticInfo struct { - // A list of CorDapps currently installed on this node - Cordapps []CordappInfo `json:"cordapps"` - // The platform version of this node. This number represents a released API version, and should be used to make functionality decisions (e.g. enabling an app feature only if an underlying platform feature exists) - PlatformVersion int32 `json:"platformVersion"` - // The git commit hash this node was built from - Revision string `json:"revision"` - // The vendor of this node - Vendor string `json:"vendor"` - // The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note that this string is effectively freeform, and so should only be used for providing diagnostic information. It should not be used to make functionality decisions (the platformVersion is a better fit for this). - Version string `json:"version"` -} - -// NewNodeDiagnosticInfo instantiates a new NodeDiagnosticInfo object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewNodeDiagnosticInfo(cordapps []CordappInfo, platformVersion int32, revision string, vendor string, version string) *NodeDiagnosticInfo { - this := NodeDiagnosticInfo{} - this.Cordapps = cordapps - this.PlatformVersion = platformVersion - this.Revision = revision - this.Vendor = vendor - this.Version = version - return &this -} - -// NewNodeDiagnosticInfoWithDefaults instantiates a new NodeDiagnosticInfo object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewNodeDiagnosticInfoWithDefaults() *NodeDiagnosticInfo { - this := NodeDiagnosticInfo{} - return &this -} - -// GetCordapps returns the Cordapps field value -func (o *NodeDiagnosticInfo) GetCordapps() []CordappInfo { - if o == nil { - var ret []CordappInfo - return ret - } - - return o.Cordapps -} - -// GetCordappsOk returns a tuple with the Cordapps field value -// and a boolean to check if the value has been set. -func (o *NodeDiagnosticInfo) GetCordappsOk() ([]CordappInfo, bool) { - if o == nil { - return nil, false - } - return o.Cordapps, true -} - -// SetCordapps sets field value -func (o *NodeDiagnosticInfo) SetCordapps(v []CordappInfo) { - o.Cordapps = v -} - -// GetPlatformVersion returns the PlatformVersion field value -func (o *NodeDiagnosticInfo) GetPlatformVersion() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.PlatformVersion -} - -// GetPlatformVersionOk returns a tuple with the PlatformVersion field value -// and a boolean to check if the value has been set. -func (o *NodeDiagnosticInfo) GetPlatformVersionOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.PlatformVersion, true -} - -// SetPlatformVersion sets field value -func (o *NodeDiagnosticInfo) SetPlatformVersion(v int32) { - o.PlatformVersion = v -} - -// GetRevision returns the Revision field value -func (o *NodeDiagnosticInfo) GetRevision() string { - if o == nil { - var ret string - return ret - } - - return o.Revision -} - -// GetRevisionOk returns a tuple with the Revision field value -// and a boolean to check if the value has been set. -func (o *NodeDiagnosticInfo) GetRevisionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Revision, true -} - -// SetRevision sets field value -func (o *NodeDiagnosticInfo) SetRevision(v string) { - o.Revision = v -} - -// GetVendor returns the Vendor field value -func (o *NodeDiagnosticInfo) GetVendor() string { - if o == nil { - var ret string - return ret - } - - return o.Vendor -} - -// GetVendorOk returns a tuple with the Vendor field value -// and a boolean to check if the value has been set. -func (o *NodeDiagnosticInfo) GetVendorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Vendor, true -} - -// SetVendor sets field value -func (o *NodeDiagnosticInfo) SetVendor(v string) { - o.Vendor = v -} - -// GetVersion returns the Version field value -func (o *NodeDiagnosticInfo) GetVersion() string { - if o == nil { - var ret string - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *NodeDiagnosticInfo) GetVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *NodeDiagnosticInfo) SetVersion(v string) { - o.Version = v -} - -func (o NodeDiagnosticInfo) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NodeDiagnosticInfo) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cordapps"] = o.Cordapps - toSerialize["platformVersion"] = o.PlatformVersion - toSerialize["revision"] = o.Revision - toSerialize["vendor"] = o.Vendor - toSerialize["version"] = o.Version - return toSerialize, nil -} - -type NullableNodeDiagnosticInfo struct { - value *NodeDiagnosticInfo - isSet bool -} - -func (v NullableNodeDiagnosticInfo) Get() *NodeDiagnosticInfo { - return v.value -} - -func (v *NullableNodeDiagnosticInfo) Set(val *NodeDiagnosticInfo) { - v.value = val - v.isSet = true -} - -func (v NullableNodeDiagnosticInfo) IsSet() bool { - return v.isSet -} - -func (v *NullableNodeDiagnosticInfo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNodeDiagnosticInfo(val *NodeDiagnosticInfo) *NullableNodeDiagnosticInfo { - return &NullableNodeDiagnosticInfo{value: val, isSet: true} -} - -func (v NullableNodeDiagnosticInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNodeDiagnosticInfo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_node_info.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_node_info.go deleted file mode 100644 index b50af1940e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_node_info.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the NodeInfo type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NodeInfo{} - -// NodeInfo struct for NodeInfo -type NodeInfo struct { - Addresses []NetworkHostAndPort `json:"addresses"` - PlatformVersion int32 `json:"platformVersion"` - Serial float32 `json:"serial"` - LegalIdentities []Party `json:"legalIdentities"` - LegalIdentitiesAndCerts []map[string]interface{} `json:"legalIdentitiesAndCerts"` -} - -// NewNodeInfo instantiates a new NodeInfo object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewNodeInfo(addresses []NetworkHostAndPort, platformVersion int32, serial float32, legalIdentities []Party, legalIdentitiesAndCerts []map[string]interface{}) *NodeInfo { - this := NodeInfo{} - this.Addresses = addresses - this.PlatformVersion = platformVersion - this.Serial = serial - this.LegalIdentities = legalIdentities - this.LegalIdentitiesAndCerts = legalIdentitiesAndCerts - return &this -} - -// NewNodeInfoWithDefaults instantiates a new NodeInfo object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewNodeInfoWithDefaults() *NodeInfo { - this := NodeInfo{} - return &this -} - -// GetAddresses returns the Addresses field value -func (o *NodeInfo) GetAddresses() []NetworkHostAndPort { - if o == nil { - var ret []NetworkHostAndPort - return ret - } - - return o.Addresses -} - -// GetAddressesOk returns a tuple with the Addresses field value -// and a boolean to check if the value has been set. -func (o *NodeInfo) GetAddressesOk() ([]NetworkHostAndPort, bool) { - if o == nil { - return nil, false - } - return o.Addresses, true -} - -// SetAddresses sets field value -func (o *NodeInfo) SetAddresses(v []NetworkHostAndPort) { - o.Addresses = v -} - -// GetPlatformVersion returns the PlatformVersion field value -func (o *NodeInfo) GetPlatformVersion() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.PlatformVersion -} - -// GetPlatformVersionOk returns a tuple with the PlatformVersion field value -// and a boolean to check if the value has been set. -func (o *NodeInfo) GetPlatformVersionOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.PlatformVersion, true -} - -// SetPlatformVersion sets field value -func (o *NodeInfo) SetPlatformVersion(v int32) { - o.PlatformVersion = v -} - -// GetSerial returns the Serial field value -func (o *NodeInfo) GetSerial() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Serial -} - -// GetSerialOk returns a tuple with the Serial field value -// and a boolean to check if the value has been set. -func (o *NodeInfo) GetSerialOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Serial, true -} - -// SetSerial sets field value -func (o *NodeInfo) SetSerial(v float32) { - o.Serial = v -} - -// GetLegalIdentities returns the LegalIdentities field value -func (o *NodeInfo) GetLegalIdentities() []Party { - if o == nil { - var ret []Party - return ret - } - - return o.LegalIdentities -} - -// GetLegalIdentitiesOk returns a tuple with the LegalIdentities field value -// and a boolean to check if the value has been set. -func (o *NodeInfo) GetLegalIdentitiesOk() ([]Party, bool) { - if o == nil { - return nil, false - } - return o.LegalIdentities, true -} - -// SetLegalIdentities sets field value -func (o *NodeInfo) SetLegalIdentities(v []Party) { - o.LegalIdentities = v -} - -// GetLegalIdentitiesAndCerts returns the LegalIdentitiesAndCerts field value -func (o *NodeInfo) GetLegalIdentitiesAndCerts() []map[string]interface{} { - if o == nil { - var ret []map[string]interface{} - return ret - } - - return o.LegalIdentitiesAndCerts -} - -// GetLegalIdentitiesAndCertsOk returns a tuple with the LegalIdentitiesAndCerts field value -// and a boolean to check if the value has been set. -func (o *NodeInfo) GetLegalIdentitiesAndCertsOk() ([]map[string]interface{}, bool) { - if o == nil { - return nil, false - } - return o.LegalIdentitiesAndCerts, true -} - -// SetLegalIdentitiesAndCerts sets field value -func (o *NodeInfo) SetLegalIdentitiesAndCerts(v []map[string]interface{}) { - o.LegalIdentitiesAndCerts = v -} - -func (o NodeInfo) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NodeInfo) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["addresses"] = o.Addresses - toSerialize["platformVersion"] = o.PlatformVersion - toSerialize["serial"] = o.Serial - toSerialize["legalIdentities"] = o.LegalIdentities - toSerialize["legalIdentitiesAndCerts"] = o.LegalIdentitiesAndCerts - return toSerialize, nil -} - -type NullableNodeInfo struct { - value *NodeInfo - isSet bool -} - -func (v NullableNodeInfo) Get() *NodeInfo { - return v.value -} - -func (v *NullableNodeInfo) Set(val *NodeInfo) { - v.value = val - v.isSet = true -} - -func (v NullableNodeInfo) IsSet() bool { - return v.isSet -} - -func (v *NullableNodeInfo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNodeInfo(val *NodeInfo) *NullableNodeInfo { - return &NullableNodeInfo{value: val, isSet: true} -} - -func (v NullableNodeInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNodeInfo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_party.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_party.go deleted file mode 100644 index b965654ddf..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_party.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the Party type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Party{} - -// Party struct for Party -type Party struct { - Name CordaX500Name `json:"name"` - OwningKey PublicKey `json:"owningKey"` -} - -// NewParty instantiates a new Party object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewParty(name CordaX500Name, owningKey PublicKey) *Party { - this := Party{} - this.Name = name - this.OwningKey = owningKey - return &this -} - -// NewPartyWithDefaults instantiates a new Party object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPartyWithDefaults() *Party { - this := Party{} - return &this -} - -// GetName returns the Name field value -func (o *Party) GetName() CordaX500Name { - if o == nil { - var ret CordaX500Name - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *Party) GetNameOk() (*CordaX500Name, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *Party) SetName(v CordaX500Name) { - o.Name = v -} - -// GetOwningKey returns the OwningKey field value -func (o *Party) GetOwningKey() PublicKey { - if o == nil { - var ret PublicKey - return ret - } - - return o.OwningKey -} - -// GetOwningKeyOk returns a tuple with the OwningKey field value -// and a boolean to check if the value has been set. -func (o *Party) GetOwningKeyOk() (*PublicKey, bool) { - if o == nil { - return nil, false - } - return &o.OwningKey, true -} - -// SetOwningKey sets field value -func (o *Party) SetOwningKey(v PublicKey) { - o.OwningKey = v -} - -func (o Party) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Party) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["owningKey"] = o.OwningKey - return toSerialize, nil -} - -type NullableParty struct { - value *Party - isSet bool -} - -func (v NullableParty) Get() *Party { - return v.value -} - -func (v *NullableParty) Set(val *Party) { - v.value = val - v.isSet = true -} - -func (v NullableParty) IsSet() bool { - return v.isSet -} - -func (v *NullableParty) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableParty(val *Party) *NullableParty { - return &NullableParty{value: val, isSet: true} -} - -func (v NullableParty) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableParty) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_public_key.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_public_key.go deleted file mode 100644 index 7b051a3f47..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_public_key.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the PublicKey type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PublicKey{} - -// PublicKey An instance of a java.security.PublicKey (which is an interface) implementation such as org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl -type PublicKey struct { - Algorithm string `json:"algorithm"` - Format string `json:"format"` - Encoded string `json:"encoded"` -} - -// NewPublicKey instantiates a new PublicKey object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPublicKey(algorithm string, format string, encoded string) *PublicKey { - this := PublicKey{} - this.Algorithm = algorithm - this.Format = format - this.Encoded = encoded - return &this -} - -// NewPublicKeyWithDefaults instantiates a new PublicKey object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPublicKeyWithDefaults() *PublicKey { - this := PublicKey{} - return &this -} - -// GetAlgorithm returns the Algorithm field value -func (o *PublicKey) GetAlgorithm() string { - if o == nil { - var ret string - return ret - } - - return o.Algorithm -} - -// GetAlgorithmOk returns a tuple with the Algorithm field value -// and a boolean to check if the value has been set. -func (o *PublicKey) GetAlgorithmOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Algorithm, true -} - -// SetAlgorithm sets field value -func (o *PublicKey) SetAlgorithm(v string) { - o.Algorithm = v -} - -// GetFormat returns the Format field value -func (o *PublicKey) GetFormat() string { - if o == nil { - var ret string - return ret - } - - return o.Format -} - -// GetFormatOk returns a tuple with the Format field value -// and a boolean to check if the value has been set. -func (o *PublicKey) GetFormatOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Format, true -} - -// SetFormat sets field value -func (o *PublicKey) SetFormat(v string) { - o.Format = v -} - -// GetEncoded returns the Encoded field value -func (o *PublicKey) GetEncoded() string { - if o == nil { - var ret string - return ret - } - - return o.Encoded -} - -// GetEncodedOk returns a tuple with the Encoded field value -// and a boolean to check if the value has been set. -func (o *PublicKey) GetEncodedOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Encoded, true -} - -// SetEncoded sets field value -func (o *PublicKey) SetEncoded(v string) { - o.Encoded = v -} - -func (o PublicKey) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PublicKey) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["algorithm"] = o.Algorithm - toSerialize["format"] = o.Format - toSerialize["encoded"] = o.Encoded - return toSerialize, nil -} - -type NullablePublicKey struct { - value *PublicKey - isSet bool -} - -func (v NullablePublicKey) Get() *PublicKey { - return v.value -} - -func (v *NullablePublicKey) Set(val *PublicKey) { - v.value = val - v.isSet = true -} - -func (v NullablePublicKey) IsSet() bool { - return v.isSet -} - -func (v *NullablePublicKey) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePublicKey(val *PublicKey) *NullablePublicKey { - return &NullablePublicKey{value: val, isSet: true} -} - -func (v NullablePublicKey) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePublicKey) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_sha256.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_sha256.go deleted file mode 100644 index 4ad814c83e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_sha256.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the SHA256 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SHA256{} - -// SHA256 SHA-256 is part of the SHA-2 hash function family. Generated hash is fixed size, 256-bits (32-bytes). -type SHA256 struct { - Bytes string `json:"bytes"` - Offset int32 `json:"offset"` - Size int32 `json:"size"` -} - -// NewSHA256 instantiates a new SHA256 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSHA256(bytes string, offset int32, size int32) *SHA256 { - this := SHA256{} - this.Bytes = bytes - this.Offset = offset - this.Size = size - return &this -} - -// NewSHA256WithDefaults instantiates a new SHA256 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSHA256WithDefaults() *SHA256 { - this := SHA256{} - return &this -} - -// GetBytes returns the Bytes field value -func (o *SHA256) GetBytes() string { - if o == nil { - var ret string - return ret - } - - return o.Bytes -} - -// GetBytesOk returns a tuple with the Bytes field value -// and a boolean to check if the value has been set. -func (o *SHA256) GetBytesOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Bytes, true -} - -// SetBytes sets field value -func (o *SHA256) SetBytes(v string) { - o.Bytes = v -} - -// GetOffset returns the Offset field value -func (o *SHA256) GetOffset() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Offset -} - -// GetOffsetOk returns a tuple with the Offset field value -// and a boolean to check if the value has been set. -func (o *SHA256) GetOffsetOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Offset, true -} - -// SetOffset sets field value -func (o *SHA256) SetOffset(v int32) { - o.Offset = v -} - -// GetSize returns the Size field value -func (o *SHA256) GetSize() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value -// and a boolean to check if the value has been set. -func (o *SHA256) GetSizeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Size, true -} - -// SetSize sets field value -func (o *SHA256) SetSize(v int32) { - o.Size = v -} - -func (o SHA256) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SHA256) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["bytes"] = o.Bytes - toSerialize["offset"] = o.Offset - toSerialize["size"] = o.Size - return toSerialize, nil -} - -type NullableSHA256 struct { - value *SHA256 - isSet bool -} - -func (v NullableSHA256) Get() *SHA256 { - return v.value -} - -func (v *NullableSHA256) Set(val *SHA256) { - v.value = val - v.isSet = true -} - -func (v NullableSHA256) IsSet() bool { - return v.isSet -} - -func (v *NullableSHA256) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSHA256(val *SHA256) *NullableSHA256 { - return &NullableSHA256{value: val, isSet: true} -} - -func (v NullableSHA256) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSHA256) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request.go deleted file mode 100644 index 046e28a60e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request.go +++ /dev/null @@ -1,288 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the StartFlowV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StartFlowV1Request{} - -// StartFlowV1Request This method starts a new instance for the specified flow for the specified holding identity. -type StartFlowV1Request struct { - Username string `json:"username"` - Password string `json:"password"` - RejectUnauthorized bool `json:"rejectUnauthorized"` - HoldingIDShortHash *string `json:"holdingIDShortHash,omitempty"` - ClientRequestId string `json:"clientRequestId"` - FlowClassName string `json:"flowClassName"` - RequestBody StartFlowV1RequestRequestBody `json:"requestBody"` -} - -// NewStartFlowV1Request instantiates a new StartFlowV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStartFlowV1Request(username string, password string, rejectUnauthorized bool, clientRequestId string, flowClassName string, requestBody StartFlowV1RequestRequestBody) *StartFlowV1Request { - this := StartFlowV1Request{} - this.Username = username - this.Password = password - this.RejectUnauthorized = rejectUnauthorized - this.ClientRequestId = clientRequestId - this.FlowClassName = flowClassName - this.RequestBody = requestBody - return &this -} - -// NewStartFlowV1RequestWithDefaults instantiates a new StartFlowV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStartFlowV1RequestWithDefaults() *StartFlowV1Request { - this := StartFlowV1Request{} - return &this -} - -// GetUsername returns the Username field value -func (o *StartFlowV1Request) GetUsername() string { - if o == nil { - var ret string - return ret - } - - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value -// and a boolean to check if the value has been set. -func (o *StartFlowV1Request) GetUsernameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Username, true -} - -// SetUsername sets field value -func (o *StartFlowV1Request) SetUsername(v string) { - o.Username = v -} - -// GetPassword returns the Password field value -func (o *StartFlowV1Request) GetPassword() string { - if o == nil { - var ret string - return ret - } - - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value -// and a boolean to check if the value has been set. -func (o *StartFlowV1Request) GetPasswordOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Password, true -} - -// SetPassword sets field value -func (o *StartFlowV1Request) SetPassword(v string) { - o.Password = v -} - -// GetRejectUnauthorized returns the RejectUnauthorized field value -func (o *StartFlowV1Request) GetRejectUnauthorized() bool { - if o == nil { - var ret bool - return ret - } - - return o.RejectUnauthorized -} - -// GetRejectUnauthorizedOk returns a tuple with the RejectUnauthorized field value -// and a boolean to check if the value has been set. -func (o *StartFlowV1Request) GetRejectUnauthorizedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.RejectUnauthorized, true -} - -// SetRejectUnauthorized sets field value -func (o *StartFlowV1Request) SetRejectUnauthorized(v bool) { - o.RejectUnauthorized = v -} - -// GetHoldingIDShortHash returns the HoldingIDShortHash field value if set, zero value otherwise. -func (o *StartFlowV1Request) GetHoldingIDShortHash() string { - if o == nil || IsNil(o.HoldingIDShortHash) { - var ret string - return ret - } - return *o.HoldingIDShortHash -} - -// GetHoldingIDShortHashOk returns a tuple with the HoldingIDShortHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StartFlowV1Request) GetHoldingIDShortHashOk() (*string, bool) { - if o == nil || IsNil(o.HoldingIDShortHash) { - return nil, false - } - return o.HoldingIDShortHash, true -} - -// HasHoldingIDShortHash returns a boolean if a field has been set. -func (o *StartFlowV1Request) HasHoldingIDShortHash() bool { - if o != nil && !IsNil(o.HoldingIDShortHash) { - return true - } - - return false -} - -// SetHoldingIDShortHash gets a reference to the given string and assigns it to the HoldingIDShortHash field. -func (o *StartFlowV1Request) SetHoldingIDShortHash(v string) { - o.HoldingIDShortHash = &v -} - -// GetClientRequestId returns the ClientRequestId field value -func (o *StartFlowV1Request) GetClientRequestId() string { - if o == nil { - var ret string - return ret - } - - return o.ClientRequestId -} - -// GetClientRequestIdOk returns a tuple with the ClientRequestId field value -// and a boolean to check if the value has been set. -func (o *StartFlowV1Request) GetClientRequestIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientRequestId, true -} - -// SetClientRequestId sets field value -func (o *StartFlowV1Request) SetClientRequestId(v string) { - o.ClientRequestId = v -} - -// GetFlowClassName returns the FlowClassName field value -func (o *StartFlowV1Request) GetFlowClassName() string { - if o == nil { - var ret string - return ret - } - - return o.FlowClassName -} - -// GetFlowClassNameOk returns a tuple with the FlowClassName field value -// and a boolean to check if the value has been set. -func (o *StartFlowV1Request) GetFlowClassNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FlowClassName, true -} - -// SetFlowClassName sets field value -func (o *StartFlowV1Request) SetFlowClassName(v string) { - o.FlowClassName = v -} - -// GetRequestBody returns the RequestBody field value -func (o *StartFlowV1Request) GetRequestBody() StartFlowV1RequestRequestBody { - if o == nil { - var ret StartFlowV1RequestRequestBody - return ret - } - - return o.RequestBody -} - -// GetRequestBodyOk returns a tuple with the RequestBody field value -// and a boolean to check if the value has been set. -func (o *StartFlowV1Request) GetRequestBodyOk() (*StartFlowV1RequestRequestBody, bool) { - if o == nil { - return nil, false - } - return &o.RequestBody, true -} - -// SetRequestBody sets field value -func (o *StartFlowV1Request) SetRequestBody(v StartFlowV1RequestRequestBody) { - o.RequestBody = v -} - -func (o StartFlowV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StartFlowV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["username"] = o.Username - toSerialize["password"] = o.Password - toSerialize["rejectUnauthorized"] = o.RejectUnauthorized - if !IsNil(o.HoldingIDShortHash) { - toSerialize["holdingIDShortHash"] = o.HoldingIDShortHash - } - toSerialize["clientRequestId"] = o.ClientRequestId - toSerialize["flowClassName"] = o.FlowClassName - toSerialize["requestBody"] = o.RequestBody - return toSerialize, nil -} - -type NullableStartFlowV1Request struct { - value *StartFlowV1Request - isSet bool -} - -func (v NullableStartFlowV1Request) Get() *StartFlowV1Request { - return v.value -} - -func (v *NullableStartFlowV1Request) Set(val *StartFlowV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableStartFlowV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableStartFlowV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStartFlowV1Request(val *StartFlowV1Request) *NullableStartFlowV1Request { - return &NullableStartFlowV1Request{value: val, isSet: true} -} - -func (v NullableStartFlowV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStartFlowV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request_request_body.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request_request_body.go deleted file mode 100644 index 8fe0b48559..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request_request_body.go +++ /dev/null @@ -1,234 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the StartFlowV1RequestRequestBody type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StartFlowV1RequestRequestBody{} - -// StartFlowV1RequestRequestBody struct for StartFlowV1RequestRequestBody -type StartFlowV1RequestRequestBody struct { - ChatName *string `json:"chatName,omitempty"` - OtherMember *string `json:"otherMember,omitempty"` - Message *string `json:"message,omitempty"` - NumberOfRecords *string `json:"numberOfRecords,omitempty"` -} - -// NewStartFlowV1RequestRequestBody instantiates a new StartFlowV1RequestRequestBody object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStartFlowV1RequestRequestBody() *StartFlowV1RequestRequestBody { - this := StartFlowV1RequestRequestBody{} - return &this -} - -// NewStartFlowV1RequestRequestBodyWithDefaults instantiates a new StartFlowV1RequestRequestBody object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStartFlowV1RequestRequestBodyWithDefaults() *StartFlowV1RequestRequestBody { - this := StartFlowV1RequestRequestBody{} - return &this -} - -// GetChatName returns the ChatName field value if set, zero value otherwise. -func (o *StartFlowV1RequestRequestBody) GetChatName() string { - if o == nil || IsNil(o.ChatName) { - var ret string - return ret - } - return *o.ChatName -} - -// GetChatNameOk returns a tuple with the ChatName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StartFlowV1RequestRequestBody) GetChatNameOk() (*string, bool) { - if o == nil || IsNil(o.ChatName) { - return nil, false - } - return o.ChatName, true -} - -// HasChatName returns a boolean if a field has been set. -func (o *StartFlowV1RequestRequestBody) HasChatName() bool { - if o != nil && !IsNil(o.ChatName) { - return true - } - - return false -} - -// SetChatName gets a reference to the given string and assigns it to the ChatName field. -func (o *StartFlowV1RequestRequestBody) SetChatName(v string) { - o.ChatName = &v -} - -// GetOtherMember returns the OtherMember field value if set, zero value otherwise. -func (o *StartFlowV1RequestRequestBody) GetOtherMember() string { - if o == nil || IsNil(o.OtherMember) { - var ret string - return ret - } - return *o.OtherMember -} - -// GetOtherMemberOk returns a tuple with the OtherMember field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StartFlowV1RequestRequestBody) GetOtherMemberOk() (*string, bool) { - if o == nil || IsNil(o.OtherMember) { - return nil, false - } - return o.OtherMember, true -} - -// HasOtherMember returns a boolean if a field has been set. -func (o *StartFlowV1RequestRequestBody) HasOtherMember() bool { - if o != nil && !IsNil(o.OtherMember) { - return true - } - - return false -} - -// SetOtherMember gets a reference to the given string and assigns it to the OtherMember field. -func (o *StartFlowV1RequestRequestBody) SetOtherMember(v string) { - o.OtherMember = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *StartFlowV1RequestRequestBody) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StartFlowV1RequestRequestBody) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *StartFlowV1RequestRequestBody) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *StartFlowV1RequestRequestBody) SetMessage(v string) { - o.Message = &v -} - -// GetNumberOfRecords returns the NumberOfRecords field value if set, zero value otherwise. -func (o *StartFlowV1RequestRequestBody) GetNumberOfRecords() string { - if o == nil || IsNil(o.NumberOfRecords) { - var ret string - return ret - } - return *o.NumberOfRecords -} - -// GetNumberOfRecordsOk returns a tuple with the NumberOfRecords field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StartFlowV1RequestRequestBody) GetNumberOfRecordsOk() (*string, bool) { - if o == nil || IsNil(o.NumberOfRecords) { - return nil, false - } - return o.NumberOfRecords, true -} - -// HasNumberOfRecords returns a boolean if a field has been set. -func (o *StartFlowV1RequestRequestBody) HasNumberOfRecords() bool { - if o != nil && !IsNil(o.NumberOfRecords) { - return true - } - - return false -} - -// SetNumberOfRecords gets a reference to the given string and assigns it to the NumberOfRecords field. -func (o *StartFlowV1RequestRequestBody) SetNumberOfRecords(v string) { - o.NumberOfRecords = &v -} - -func (o StartFlowV1RequestRequestBody) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StartFlowV1RequestRequestBody) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ChatName) { - toSerialize["chatName"] = o.ChatName - } - if !IsNil(o.OtherMember) { - toSerialize["otherMember"] = o.OtherMember - } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !IsNil(o.NumberOfRecords) { - toSerialize["numberOfRecords"] = o.NumberOfRecords - } - return toSerialize, nil -} - -type NullableStartFlowV1RequestRequestBody struct { - value *StartFlowV1RequestRequestBody - isSet bool -} - -func (v NullableStartFlowV1RequestRequestBody) Get() *StartFlowV1RequestRequestBody { - return v.value -} - -func (v *NullableStartFlowV1RequestRequestBody) Set(val *StartFlowV1RequestRequestBody) { - v.value = val - v.isSet = true -} - -func (v NullableStartFlowV1RequestRequestBody) IsSet() bool { - return v.isSet -} - -func (v *NullableStartFlowV1RequestRequestBody) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStartFlowV1RequestRequestBody(val *StartFlowV1RequestRequestBody) *NullableStartFlowV1RequestRequestBody { - return &NullableStartFlowV1RequestRequestBody{value: val, isSet: true} -} - -func (v NullableStartFlowV1RequestRequestBody) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStartFlowV1RequestRequestBody) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_response.go deleted file mode 100644 index c528c5c7ff..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_response.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" - "time" -) - -// checks if the StartFlowV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StartFlowV1Response{} - -// StartFlowV1Response struct for StartFlowV1Response -type StartFlowV1Response struct { - ClientRequestId NullableString `json:"clientRequestId,omitempty"` - FlowError *FlowV1Error `json:"flowError,omitempty"` - FlowId NullableString `json:"flowId,omitempty"` - FlowResult NullableString `json:"flowResult,omitempty"` - FlowStatus string `json:"flowStatus"` - HoldingIDShortHash string `json:"holdingIDShortHash"` - Timestamp time.Time `json:"timestamp"` -} - -// NewStartFlowV1Response instantiates a new StartFlowV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStartFlowV1Response(flowStatus string, holdingIDShortHash string, timestamp time.Time) *StartFlowV1Response { - this := StartFlowV1Response{} - this.FlowStatus = flowStatus - this.HoldingIDShortHash = holdingIDShortHash - this.Timestamp = timestamp - return &this -} - -// NewStartFlowV1ResponseWithDefaults instantiates a new StartFlowV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStartFlowV1ResponseWithDefaults() *StartFlowV1Response { - this := StartFlowV1Response{} - return &this -} - -// GetClientRequestId returns the ClientRequestId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *StartFlowV1Response) GetClientRequestId() string { - if o == nil || IsNil(o.ClientRequestId.Get()) { - var ret string - return ret - } - return *o.ClientRequestId.Get() -} - -// GetClientRequestIdOk returns a tuple with the ClientRequestId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *StartFlowV1Response) GetClientRequestIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ClientRequestId.Get(), o.ClientRequestId.IsSet() -} - -// HasClientRequestId returns a boolean if a field has been set. -func (o *StartFlowV1Response) HasClientRequestId() bool { - if o != nil && o.ClientRequestId.IsSet() { - return true - } - - return false -} - -// SetClientRequestId gets a reference to the given NullableString and assigns it to the ClientRequestId field. -func (o *StartFlowV1Response) SetClientRequestId(v string) { - o.ClientRequestId.Set(&v) -} -// SetClientRequestIdNil sets the value for ClientRequestId to be an explicit nil -func (o *StartFlowV1Response) SetClientRequestIdNil() { - o.ClientRequestId.Set(nil) -} - -// UnsetClientRequestId ensures that no value is present for ClientRequestId, not even an explicit nil -func (o *StartFlowV1Response) UnsetClientRequestId() { - o.ClientRequestId.Unset() -} - -// GetFlowError returns the FlowError field value if set, zero value otherwise. -func (o *StartFlowV1Response) GetFlowError() FlowV1Error { - if o == nil || IsNil(o.FlowError) { - var ret FlowV1Error - return ret - } - return *o.FlowError -} - -// GetFlowErrorOk returns a tuple with the FlowError field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StartFlowV1Response) GetFlowErrorOk() (*FlowV1Error, bool) { - if o == nil || IsNil(o.FlowError) { - return nil, false - } - return o.FlowError, true -} - -// HasFlowError returns a boolean if a field has been set. -func (o *StartFlowV1Response) HasFlowError() bool { - if o != nil && !IsNil(o.FlowError) { - return true - } - - return false -} - -// SetFlowError gets a reference to the given FlowV1Error and assigns it to the FlowError field. -func (o *StartFlowV1Response) SetFlowError(v FlowV1Error) { - o.FlowError = &v -} - -// GetFlowId returns the FlowId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *StartFlowV1Response) GetFlowId() string { - if o == nil || IsNil(o.FlowId.Get()) { - var ret string - return ret - } - return *o.FlowId.Get() -} - -// GetFlowIdOk returns a tuple with the FlowId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *StartFlowV1Response) GetFlowIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FlowId.Get(), o.FlowId.IsSet() -} - -// HasFlowId returns a boolean if a field has been set. -func (o *StartFlowV1Response) HasFlowId() bool { - if o != nil && o.FlowId.IsSet() { - return true - } - - return false -} - -// SetFlowId gets a reference to the given NullableString and assigns it to the FlowId field. -func (o *StartFlowV1Response) SetFlowId(v string) { - o.FlowId.Set(&v) -} -// SetFlowIdNil sets the value for FlowId to be an explicit nil -func (o *StartFlowV1Response) SetFlowIdNil() { - o.FlowId.Set(nil) -} - -// UnsetFlowId ensures that no value is present for FlowId, not even an explicit nil -func (o *StartFlowV1Response) UnsetFlowId() { - o.FlowId.Unset() -} - -// GetFlowResult returns the FlowResult field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *StartFlowV1Response) GetFlowResult() string { - if o == nil || IsNil(o.FlowResult.Get()) { - var ret string - return ret - } - return *o.FlowResult.Get() -} - -// GetFlowResultOk returns a tuple with the FlowResult field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *StartFlowV1Response) GetFlowResultOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FlowResult.Get(), o.FlowResult.IsSet() -} - -// HasFlowResult returns a boolean if a field has been set. -func (o *StartFlowV1Response) HasFlowResult() bool { - if o != nil && o.FlowResult.IsSet() { - return true - } - - return false -} - -// SetFlowResult gets a reference to the given NullableString and assigns it to the FlowResult field. -func (o *StartFlowV1Response) SetFlowResult(v string) { - o.FlowResult.Set(&v) -} -// SetFlowResultNil sets the value for FlowResult to be an explicit nil -func (o *StartFlowV1Response) SetFlowResultNil() { - o.FlowResult.Set(nil) -} - -// UnsetFlowResult ensures that no value is present for FlowResult, not even an explicit nil -func (o *StartFlowV1Response) UnsetFlowResult() { - o.FlowResult.Unset() -} - -// GetFlowStatus returns the FlowStatus field value -func (o *StartFlowV1Response) GetFlowStatus() string { - if o == nil { - var ret string - return ret - } - - return o.FlowStatus -} - -// GetFlowStatusOk returns a tuple with the FlowStatus field value -// and a boolean to check if the value has been set. -func (o *StartFlowV1Response) GetFlowStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FlowStatus, true -} - -// SetFlowStatus sets field value -func (o *StartFlowV1Response) SetFlowStatus(v string) { - o.FlowStatus = v -} - -// GetHoldingIDShortHash returns the HoldingIDShortHash field value -func (o *StartFlowV1Response) GetHoldingIDShortHash() string { - if o == nil { - var ret string - return ret - } - - return o.HoldingIDShortHash -} - -// GetHoldingIDShortHashOk returns a tuple with the HoldingIDShortHash field value -// and a boolean to check if the value has been set. -func (o *StartFlowV1Response) GetHoldingIDShortHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HoldingIDShortHash, true -} - -// SetHoldingIDShortHash sets field value -func (o *StartFlowV1Response) SetHoldingIDShortHash(v string) { - o.HoldingIDShortHash = v -} - -// GetTimestamp returns the Timestamp field value -func (o *StartFlowV1Response) GetTimestamp() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value -// and a boolean to check if the value has been set. -func (o *StartFlowV1Response) GetTimestampOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.Timestamp, true -} - -// SetTimestamp sets field value -func (o *StartFlowV1Response) SetTimestamp(v time.Time) { - o.Timestamp = v -} - -func (o StartFlowV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StartFlowV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.ClientRequestId.IsSet() { - toSerialize["clientRequestId"] = o.ClientRequestId.Get() - } - if !IsNil(o.FlowError) { - toSerialize["flowError"] = o.FlowError - } - if o.FlowId.IsSet() { - toSerialize["flowId"] = o.FlowId.Get() - } - if o.FlowResult.IsSet() { - toSerialize["flowResult"] = o.FlowResult.Get() - } - toSerialize["flowStatus"] = o.FlowStatus - toSerialize["holdingIDShortHash"] = o.HoldingIDShortHash - toSerialize["timestamp"] = o.Timestamp - return toSerialize, nil -} - -type NullableStartFlowV1Response struct { - value *StartFlowV1Response - isSet bool -} - -func (v NullableStartFlowV1Response) Get() *StartFlowV1Response { - return v.value -} - -func (v *NullableStartFlowV1Response) Set(val *StartFlowV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableStartFlowV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableStartFlowV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStartFlowV1Response(val *StartFlowV1Response) *NullableStartFlowV1Response { - return &NullableStartFlowV1Response{value: val, isSet: true} -} - -func (v NullableStartFlowV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStartFlowV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_monitor_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_monitor_v1_request.go deleted file mode 100644 index 607261c8bc..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_monitor_v1_request.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the StartMonitorV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StartMonitorV1Request{} - -// StartMonitorV1Request struct for StartMonitorV1Request -type StartMonitorV1Request struct { - // ID of a client application that wants to monitor the state changes - ClientAppId string `json:"clientAppId"` - // The fully qualified name of the Corda state to monitor - StateFullClassName string `json:"stateFullClassName"` -} - -// NewStartMonitorV1Request instantiates a new StartMonitorV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStartMonitorV1Request(clientAppId string, stateFullClassName string) *StartMonitorV1Request { - this := StartMonitorV1Request{} - this.ClientAppId = clientAppId - this.StateFullClassName = stateFullClassName - return &this -} - -// NewStartMonitorV1RequestWithDefaults instantiates a new StartMonitorV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStartMonitorV1RequestWithDefaults() *StartMonitorV1Request { - this := StartMonitorV1Request{} - return &this -} - -// GetClientAppId returns the ClientAppId field value -func (o *StartMonitorV1Request) GetClientAppId() string { - if o == nil { - var ret string - return ret - } - - return o.ClientAppId -} - -// GetClientAppIdOk returns a tuple with the ClientAppId field value -// and a boolean to check if the value has been set. -func (o *StartMonitorV1Request) GetClientAppIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientAppId, true -} - -// SetClientAppId sets field value -func (o *StartMonitorV1Request) SetClientAppId(v string) { - o.ClientAppId = v -} - -// GetStateFullClassName returns the StateFullClassName field value -func (o *StartMonitorV1Request) GetStateFullClassName() string { - if o == nil { - var ret string - return ret - } - - return o.StateFullClassName -} - -// GetStateFullClassNameOk returns a tuple with the StateFullClassName field value -// and a boolean to check if the value has been set. -func (o *StartMonitorV1Request) GetStateFullClassNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StateFullClassName, true -} - -// SetStateFullClassName sets field value -func (o *StartMonitorV1Request) SetStateFullClassName(v string) { - o.StateFullClassName = v -} - -func (o StartMonitorV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StartMonitorV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["clientAppId"] = o.ClientAppId - toSerialize["stateFullClassName"] = o.StateFullClassName - return toSerialize, nil -} - -type NullableStartMonitorV1Request struct { - value *StartMonitorV1Request - isSet bool -} - -func (v NullableStartMonitorV1Request) Get() *StartMonitorV1Request { - return v.value -} - -func (v *NullableStartMonitorV1Request) Set(val *StartMonitorV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableStartMonitorV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableStartMonitorV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStartMonitorV1Request(val *StartMonitorV1Request) *NullableStartMonitorV1Request { - return &NullableStartMonitorV1Request{value: val, isSet: true} -} - -func (v NullableStartMonitorV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStartMonitorV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_monitor_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_monitor_v1_response.go deleted file mode 100644 index e393166ed7..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_monitor_v1_response.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the StartMonitorV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StartMonitorV1Response{} - -// StartMonitorV1Response struct for StartMonitorV1Response -type StartMonitorV1Response struct { - // Flag set to true if monitoring started correctly. - Success bool `json:"success"` - // Message describing operation status or any errors that occurred. - Msg string `json:"msg"` -} - -// NewStartMonitorV1Response instantiates a new StartMonitorV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStartMonitorV1Response(success bool, msg string) *StartMonitorV1Response { - this := StartMonitorV1Response{} - this.Success = success - this.Msg = msg - return &this -} - -// NewStartMonitorV1ResponseWithDefaults instantiates a new StartMonitorV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStartMonitorV1ResponseWithDefaults() *StartMonitorV1Response { - this := StartMonitorV1Response{} - return &this -} - -// GetSuccess returns the Success field value -func (o *StartMonitorV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *StartMonitorV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *StartMonitorV1Response) SetSuccess(v bool) { - o.Success = v -} - -// GetMsg returns the Msg field value -func (o *StartMonitorV1Response) GetMsg() string { - if o == nil { - var ret string - return ret - } - - return o.Msg -} - -// GetMsgOk returns a tuple with the Msg field value -// and a boolean to check if the value has been set. -func (o *StartMonitorV1Response) GetMsgOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Msg, true -} - -// SetMsg sets field value -func (o *StartMonitorV1Response) SetMsg(v string) { - o.Msg = v -} - -func (o StartMonitorV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StartMonitorV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["success"] = o.Success - toSerialize["msg"] = o.Msg - return toSerialize, nil -} - -type NullableStartMonitorV1Response struct { - value *StartMonitorV1Response - isSet bool -} - -func (v NullableStartMonitorV1Response) Get() *StartMonitorV1Response { - return v.value -} - -func (v *NullableStartMonitorV1Response) Set(val *StartMonitorV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableStartMonitorV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableStartMonitorV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStartMonitorV1Response(val *StartMonitorV1Response) *NullableStartMonitorV1Response { - return &NullableStartMonitorV1Response{value: val, isSet: true} -} - -func (v NullableStartMonitorV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStartMonitorV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_stop_monitor_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_stop_monitor_v1_request.go deleted file mode 100644 index cfad93d523..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_stop_monitor_v1_request.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the StopMonitorV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StopMonitorV1Request{} - -// StopMonitorV1Request struct for StopMonitorV1Request -type StopMonitorV1Request struct { - // ID of a client application that wants to monitor the state changes - ClientAppId string `json:"clientAppId"` - // The fully qualified name of the Corda state to monitor - StateFullClassName string `json:"stateFullClassName"` -} - -// NewStopMonitorV1Request instantiates a new StopMonitorV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStopMonitorV1Request(clientAppId string, stateFullClassName string) *StopMonitorV1Request { - this := StopMonitorV1Request{} - this.ClientAppId = clientAppId - this.StateFullClassName = stateFullClassName - return &this -} - -// NewStopMonitorV1RequestWithDefaults instantiates a new StopMonitorV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStopMonitorV1RequestWithDefaults() *StopMonitorV1Request { - this := StopMonitorV1Request{} - return &this -} - -// GetClientAppId returns the ClientAppId field value -func (o *StopMonitorV1Request) GetClientAppId() string { - if o == nil { - var ret string - return ret - } - - return o.ClientAppId -} - -// GetClientAppIdOk returns a tuple with the ClientAppId field value -// and a boolean to check if the value has been set. -func (o *StopMonitorV1Request) GetClientAppIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientAppId, true -} - -// SetClientAppId sets field value -func (o *StopMonitorV1Request) SetClientAppId(v string) { - o.ClientAppId = v -} - -// GetStateFullClassName returns the StateFullClassName field value -func (o *StopMonitorV1Request) GetStateFullClassName() string { - if o == nil { - var ret string - return ret - } - - return o.StateFullClassName -} - -// GetStateFullClassNameOk returns a tuple with the StateFullClassName field value -// and a boolean to check if the value has been set. -func (o *StopMonitorV1Request) GetStateFullClassNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StateFullClassName, true -} - -// SetStateFullClassName sets field value -func (o *StopMonitorV1Request) SetStateFullClassName(v string) { - o.StateFullClassName = v -} - -func (o StopMonitorV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StopMonitorV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["clientAppId"] = o.ClientAppId - toSerialize["stateFullClassName"] = o.StateFullClassName - return toSerialize, nil -} - -type NullableStopMonitorV1Request struct { - value *StopMonitorV1Request - isSet bool -} - -func (v NullableStopMonitorV1Request) Get() *StopMonitorV1Request { - return v.value -} - -func (v *NullableStopMonitorV1Request) Set(val *StopMonitorV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableStopMonitorV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableStopMonitorV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStopMonitorV1Request(val *StopMonitorV1Request) *NullableStopMonitorV1Request { - return &NullableStopMonitorV1Request{value: val, isSet: true} -} - -func (v NullableStopMonitorV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStopMonitorV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_stop_monitor_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_stop_monitor_v1_response.go deleted file mode 100644 index b2dd5b0cb4..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_stop_monitor_v1_response.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the StopMonitorV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StopMonitorV1Response{} - -// StopMonitorV1Response struct for StopMonitorV1Response -type StopMonitorV1Response struct { - // Flag set to true if operation completed correctly. - Success bool `json:"success"` - // Message describing operation status or any errors that occurred. - Msg string `json:"msg"` -} - -// NewStopMonitorV1Response instantiates a new StopMonitorV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStopMonitorV1Response(success bool, msg string) *StopMonitorV1Response { - this := StopMonitorV1Response{} - this.Success = success - this.Msg = msg - return &this -} - -// NewStopMonitorV1ResponseWithDefaults instantiates a new StopMonitorV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStopMonitorV1ResponseWithDefaults() *StopMonitorV1Response { - this := StopMonitorV1Response{} - return &this -} - -// GetSuccess returns the Success field value -func (o *StopMonitorV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *StopMonitorV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *StopMonitorV1Response) SetSuccess(v bool) { - o.Success = v -} - -// GetMsg returns the Msg field value -func (o *StopMonitorV1Response) GetMsg() string { - if o == nil { - var ret string - return ret - } - - return o.Msg -} - -// GetMsgOk returns a tuple with the Msg field value -// and a boolean to check if the value has been set. -func (o *StopMonitorV1Response) GetMsgOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Msg, true -} - -// SetMsg sets field value -func (o *StopMonitorV1Response) SetMsg(v string) { - o.Msg = v -} - -func (o StopMonitorV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StopMonitorV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["success"] = o.Success - toSerialize["msg"] = o.Msg - return toSerialize, nil -} - -type NullableStopMonitorV1Response struct { - value *StopMonitorV1Response - isSet bool -} - -func (v NullableStopMonitorV1Response) Get() *StopMonitorV1Response { - return v.value -} - -func (v *NullableStopMonitorV1Response) Set(val *StopMonitorV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableStopMonitorV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableStopMonitorV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStopMonitorV1Response(val *StopMonitorV1Response) *NullableStopMonitorV1Response { - return &NullableStopMonitorV1Response{value: val, isSet: true} -} - -func (v NullableStopMonitorV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStopMonitorV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_vault_query_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_vault_query_v1_request.go deleted file mode 100644 index 78f50f55ab..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_vault_query_v1_request.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the VaultQueryV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VaultQueryV1Request{} - -// VaultQueryV1Request struct for VaultQueryV1Request -type VaultQueryV1Request struct { - // Valid, fully qualified JVM class name which will be fed into Class.forName(...) - ContractStateType *string `json:"contractStateType,omitempty"` -} - -// NewVaultQueryV1Request instantiates a new VaultQueryV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewVaultQueryV1Request() *VaultQueryV1Request { - this := VaultQueryV1Request{} - return &this -} - -// NewVaultQueryV1RequestWithDefaults instantiates a new VaultQueryV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewVaultQueryV1RequestWithDefaults() *VaultQueryV1Request { - this := VaultQueryV1Request{} - return &this -} - -// GetContractStateType returns the ContractStateType field value if set, zero value otherwise. -func (o *VaultQueryV1Request) GetContractStateType() string { - if o == nil || IsNil(o.ContractStateType) { - var ret string - return ret - } - return *o.ContractStateType -} - -// GetContractStateTypeOk returns a tuple with the ContractStateType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VaultQueryV1Request) GetContractStateTypeOk() (*string, bool) { - if o == nil || IsNil(o.ContractStateType) { - return nil, false - } - return o.ContractStateType, true -} - -// HasContractStateType returns a boolean if a field has been set. -func (o *VaultQueryV1Request) HasContractStateType() bool { - if o != nil && !IsNil(o.ContractStateType) { - return true - } - - return false -} - -// SetContractStateType gets a reference to the given string and assigns it to the ContractStateType field. -func (o *VaultQueryV1Request) SetContractStateType(v string) { - o.ContractStateType = &v -} - -func (o VaultQueryV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VaultQueryV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ContractStateType) { - toSerialize["contractStateType"] = o.ContractStateType - } - return toSerialize, nil -} - -type NullableVaultQueryV1Request struct { - value *VaultQueryV1Request - isSet bool -} - -func (v NullableVaultQueryV1Request) Get() *VaultQueryV1Request { - return v.value -} - -func (v *NullableVaultQueryV1Request) Set(val *VaultQueryV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableVaultQueryV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableVaultQueryV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVaultQueryV1Request(val *VaultQueryV1Request) *NullableVaultQueryV1Request { - return &NullableVaultQueryV1Request{value: val, isSet: true} -} - -func (v NullableVaultQueryV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVaultQueryV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_x500_principal.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_x500_principal.go deleted file mode 100644 index f9d5f423da..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_x500_principal.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" -) - -// checks if the X500Principal type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &X500Principal{} - -// X500Principal struct for X500Principal -type X500Principal struct { - Name string `json:"name"` - // Base64 encoded public key - Encoded string `json:"encoded"` -} - -// NewX500Principal instantiates a new X500Principal object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewX500Principal(name string, encoded string) *X500Principal { - this := X500Principal{} - this.Name = name - this.Encoded = encoded - return &this -} - -// NewX500PrincipalWithDefaults instantiates a new X500Principal object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewX500PrincipalWithDefaults() *X500Principal { - this := X500Principal{} - return &this -} - -// GetName returns the Name field value -func (o *X500Principal) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *X500Principal) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *X500Principal) SetName(v string) { - o.Name = v -} - -// GetEncoded returns the Encoded field value -func (o *X500Principal) GetEncoded() string { - if o == nil { - var ret string - return ret - } - - return o.Encoded -} - -// GetEncodedOk returns a tuple with the Encoded field value -// and a boolean to check if the value has been set. -func (o *X500Principal) GetEncodedOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Encoded, true -} - -// SetEncoded sets field value -func (o *X500Principal) SetEncoded(v string) { - o.Encoded = v -} - -func (o X500Principal) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o X500Principal) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["encoded"] = o.Encoded - return toSerialize, nil -} - -type NullableX500Principal struct { - value *X500Principal - isSet bool -} - -func (v NullableX500Principal) Get() *X500Principal { - return v.value -} - -func (v *NullableX500Principal) Set(val *X500Principal) { - v.value = val - v.isSet = true -} - -func (v NullableX500Principal) IsSet() bool { - return v.isSet -} - -func (v *NullableX500Principal) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableX500Principal(val *X500Principal) *NullableX500Principal { - return &NullableX500Principal{value: val, isSet: true} -} - -func (v NullableX500Principal) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableX500Principal) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index ba91bdfe9d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 064cfe602e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Corda - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-ledger-connector-corda - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-ledger-connector-corda_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService ClearMonitorTransactionsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.ClearMonitorTransactionsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService DeployContractJarsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeployContractJarsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService DiagnoseNodeV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DiagnoseNodeV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetMonitorTransactionsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetMonitorTransactionsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetricsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetricsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService InvokeContractV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.InvokeContractV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService ListFlowsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.ListFlowsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService NetworkMapV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.NetworkMapV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService StartMonitorV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.StartMonitorV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService StopMonitorV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.StopMonitorV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index b326463cf7..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-corda - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json deleted file mode 100644 index 15887a7d37..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json +++ /dev/null @@ -1,1773 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector Corda", - "description": "Can perform basic tasks on a Corda ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "SHA256": { - "description": "SHA-256 is part of the SHA-2 hash function family. Generated hash is fixed size, 256-bits (32-bytes).", - "externalDocs": { - "description": "Official Corda documentation of the SHA256 class.", - "url": "https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.crypto/-secure-hash/-s-h-a256/index.html" - }, - "type": "object", - "required": ["bytes", "offset", "size"], - "properties": { - "bytes": { - "type": "string", - "example": "Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc=" - }, - "offset": { - "type": "integer", - "example": 0 - }, - "size": { - "type": "integer", - "example": 32 - } - } - }, - "CordappInfo": { - "type": "object", - "externalDocs": { - "description": "Official Corda Documentation of the class CordappInfo", - "url": "https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.cordapp/-cordapp-info/index.html" - }, - "description": "A CordappInfo describes a single CorDapp currently installed on the node", - "required": [ - "jarHash", - "licence", - "minimumPlatformVersion", - "name", - "shortName", - "targetPlatformVersion", - "type", - "vendor", - "version" - ], - "properties": { - "jarHash": { - "type": "object", - "format": "SHA256", - "description": "The hash of the JAR file that defines this CorDapp", - "$ref": "#/components/schemas/SHA256" - }, - "licence": { - "type": "string", - "description": "The name of the licence this CorDapp is released under" - }, - "minimumPlatformVersion": { - "type": "integer", - "description": "The minimum platform version the node must be at for the CorDapp to run" - }, - "name": { - "type": "string", - "description": "The name of the JAR file that defines the CorDapp" - }, - "shortName": { - "type": "string", - "description": "The name of the CorDapp" - }, - "targetPlatformVersion": { - "type": "integer", - "description": "The target platform version this CorDapp has been tested against" - }, - "type": { - "type": "string", - "description": "A description of what sort of CorDapp this is - either a contract, workflow, or a combination." - }, - "vendor": { - "type": "string", - "description": "The vendor of this CorDapp" - }, - "version": { - "type": "string", - "description": "The version of this CorDapp" - } - } - }, - "NodeDiagnosticInfo": { - "type": "object", - "externalDocs": { - "description": "Official Corda Documentation of the class NodeDiagnosticInfo", - "url": "https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.node/-node-diagnostic-info/index.html" - }, - "description": "A NodeDiagnosticInfo holds information about the current node version.", - "required": [ - "cordapps", - "platformVersion", - "revision", - "vendor", - "version" - ], - "properties": { - "cordapps": { - "type": "array", - "description": "A list of CorDapps currently installed on this node", - "items": { - "$ref": "#/components/schemas/CordappInfo" - }, - "minItems": 0, - "maxItems": 4096 - }, - "platformVersion": { - "type": "integer", - "description": "The platform version of this node. This number represents a released API version, and should be used to make functionality decisions (e.g. enabling an app feature only if an underlying platform feature exists)" - }, - "revision": { - "type": "string", - "description": "The git commit hash this node was built from" - }, - "vendor": { - "type": "string", - "description": "The vendor of this node" - }, - "version": { - "type": "string", - "description": "The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note that this string is effectively freeform, and so should only be used for providing diagnostic information. It should not be used to make functionality decisions (the platformVersion is a better fit for this)." - } - } - }, - "FlowInvocationType": { - "type": "string", - "nullable": false, - "enum": ["TRACKED_FLOW_DYNAMIC", "FLOW_DYNAMIC"], - "description": "Determines which flow starting method will be used on the back-end when invoking the flow. Based on the value here the plugin back-end might invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() method. Streamed responses are aggregated and returned in a single response to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. do." - }, - "JarFile": { - "type": "object", - "required": ["filename", "contentBase64", "hasDbMigrations"], - "additionalProperties": true, - "properties": { - "filename": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 255 - }, - "hasDbMigrations": { - "description": "Indicates whether the cordapp jar in question contains any embedded migrations that Cactus can/should execute between copying the jar into the cordapp directory and starting the node back up.", - "type": "boolean", - "nullable": false - }, - "contentBase64": { - "type": "string", - "format": "base64", - "nullable": false, - "minLength": 1, - "maxLength": 1073741824 - } - } - }, - "JvmType": { - "type": "object", - "description": "Represents a reference to a JVM type (such as a Java class)", - "required": ["fqClassName"], - "properties": { - "fqClassName": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 65535 - }, - "constructorName": { - "type": "string", - "nullable": false, - "description": "This parameter is used to specify that the function used to construct this JvmType is not a constructor function but instead is a factory function. Setting this parameter will cause the plugin to look up methods of the class denoted by fqClassName instead of its constructors.", - "minLength": 1, - "maxLength": 65535 - }, - "invocationTarget": { - "$ref": "#/components/schemas/JvmObject" - } - } - }, - "JvmTypeKind": { - "type": "string", - "nullable": false, - "enum": ["PRIMITIVE", "REFERENCE"] - }, - "JvmObject": { - "description": "Can represent JVM primitive and reference types as well. The jvmTypeKind field indicates which one is being stored. If the jvmTypeKind field is set to REFERENCE then the jvmCtorArgs array is expected to be filled, otherwise (e.g. PRIMITIVE jvmTypeKind) it is expected that the primitiveValue property is filled with a primitive data type supported by the JSON standard such as strings, booleans, numbers, etc.", - "type": "object", - "required": ["jvmType", "jvmTypeKind"], - "properties": { - "jvmTypeKind": { - "$ref": "#/components/schemas/JvmTypeKind" - }, - "primitiveValue": {}, - "jvmCtorArgs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JvmObject", - "nullable": false - }, - "minLength": 0, - "maxLength": 1024, - "nullable": false, - "default": [] - }, - "jvmType": { - "$ref": "#/components/schemas/JvmType" - } - } - }, - "CordappDeploymentConfig": { - "type": "object", - "required": [ - "sshCredentials", - "rpcCredentials", - "cordappDir", - "cordaNodeStartCmd", - "cordaJarPath", - "nodeBaseDirPath" - ], - "properties": { - "sshCredentials": { - "$ref": "#/components/schemas/CordaNodeSshCredentials" - }, - "rpcCredentials": { - "$ref": "#/components/schemas/CordaRpcCredentials" - }, - "cordaNodeStartCmd": { - "type": "string", - "description": "The shell command to execute in order to start back up a Corda node after having placed new jars in the cordapp directory of said node.", - "example": "./build/nodes/runNodes", - "minLength": 1, - "maxLength": 65535, - "nullable": false - }, - "cordappDir": { - "type": "string", - "description": "The absolute file system path where the Corda Node is expecting deployed Cordapp jar files to be placed.", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "cordaJarPath": { - "type": "string", - "description": "The absolute file system path where the corda.jar file of the node can be found. This is used to execute database schema migrations where applicable (H2 database in use in development environments).", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "nodeBaseDirPath": { - "type": "string", - "description": "The absolute file system path where the base directory of the Corda node can be found. This is used to pass in to corda.jar when being invoked for certain tasks such as executing database schema migrations for a deployed contract.", - "minLength": 1, - "maxLength": 2048, - "nullable": false - } - } - }, - "CordaRpcCredentials": { - "type": "object", - "required": ["hostname", "port", "username", "password"], - "properties": { - "hostname": { - "type": "string", - "minLength": 1, - "maxLength": 65535, - "nullable": false - }, - "port": { - "type": "integer", - "minimum": 1, - "maximum": 65535, - "nullable": false - }, - "username": { - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "password": { - "type": "string", - "minLength": 1, - "maxLength": 65535, - "nullable": false - } - } - }, - "CordaNodeSshCredentials": { - "type": "object", - "required": [ - "username", - "password", - "hostname", - "port", - "hostKeyEntry" - ], - "properties": { - "hostKeyEntry": { - "type": "string", - "example": "localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13", - "minLength": 1, - "maxLength": 65535, - "nullable": false - }, - "username": { - "type": "string", - "minLength": 1, - "maxLength": 32, - "nullable": false - }, - "password": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - }, - "hostname": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - }, - "port": { - "type": "integer", - "minimum": 1, - "maximum": 65535, - "nullable": false - } - } - }, - "DeployContractJarsV1Request": { - "type": "object", - "required": ["jarFiles", "cordappDeploymentConfigs"], - "additionalProperties": false, - "properties": { - "cordappDeploymentConfigs": { - "type": "array", - "description": "The list of deployment configurations pointing to the nodes where the provided cordapp jar files are to be deployed .", - "minLength": 0, - "maxLength": 1024, - "default": [], - "items": { - "$ref": "#/components/schemas/CordappDeploymentConfig" - } - }, - "jarFiles": { - "type": "array", - "nullable": false, - "items": { - "minLength": 1, - "maxLength": 1024, - "$ref": "#/components/schemas/JarFile" - } - } - } - }, - "DeployContractJarsSuccessV1Response": { - "type": "object", - "required": ["deployedJarFiles"], - "properties": { - "deployedJarFiles": { - "type": "array", - "items": { - "type": "string", - "minItems": 1, - "nullable": false - } - } - } - }, - "DeployContractJarsBadRequestV1Response": { - "type": "object", - "required": ["errors"], - "properties": { - "errors": { - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 65535, - "minItems": 1, - "maxItems": 2048 - } - } - } - }, - "InvokeContractV1Request": { - "type": "object", - "required": [ - "flowFullClassName", - "flowInvocationType", - "params", - "signingCredential" - ], - "additionalProperties": false, - "properties": { - "flowFullClassName": { - "description": "The fully qualified name of the Corda flow to invoke", - "example": "net.corda.samples.obligation.flows.IOUIssueFlow", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "flowInvocationType": { - "$ref": "#/components/schemas/FlowInvocationType" - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": { - "$ref": "#/components/schemas/JvmObject", - "nullable": false - }, - "nullable": false - }, - "timeoutMs": { - "type": "integer", - "description": "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - } - } - }, - "InvokeContractV1Response": { - "type": "object", - "required": ["success", "callOutput", "flowId"], - "properties": { - "success": { - "type": "boolean", - "nullable": false - }, - "callOutput": { - "type": "object", - "description": "Data returned from the JVM when no transaction is running" - }, - "transactionId": { - "type": "string", - "description": "The net.corda.core.flows.StateMachineRunId value returned by the flow execution.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "progress": { - "type": "array", - "description": "An array of strings representing the aggregated stream of progress updates provided by a *tracked* flow invocation. If the flow invocation was not tracked, this array is still returned, but as empty.", - "items": { - "type": "string", - "minItems": 0, - "maxItems": 10000000 - }, - "default": [] - }, - "flowId": { - "type": "string", - "description": "The id for the flow handle" - } - } - }, - "StartMonitorV1Request": { - "type": "object", - "required": ["clientAppId", "stateFullClassName"], - "additionalProperties": false, - "properties": { - "clientAppId": { - "description": "ID of a client application that wants to monitor the state changes", - "example": "frond_v1_x_7Hdg6s", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "stateFullClassName": { - "description": "The fully qualified name of the Corda state to monitor", - "example": "net.corda.samples.example.states.IOUState", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "StartMonitorV1Response": { - "type": "object", - "required": ["success", "msg"], - "properties": { - "success": { - "type": "boolean", - "description": "Flag set to true if monitoring started correctly.", - "nullable": false - }, - "msg": { - "type": "string", - "description": "Message describing operation status or any errors that occurred.", - "nullable": false - } - } - }, - "GetMonitorTransactionsV1Request": { - "type": "object", - "required": ["clientAppId", "stateFullClassName"], - "additionalProperties": false, - "properties": { - "clientAppId": { - "description": "ID of a client application that wants to monitor the state changes", - "example": "frond_v1_x_7Hdg6s", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "stateFullClassName": { - "description": "The fully qualified name of the Corda state to monitor", - "example": "net.corda.samples.example.states.IOUState", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "GetMonitorTransactionsV1Response": { - "type": "object", - "required": ["success", "msg"], - "properties": { - "success": { - "type": "boolean", - "description": "Flag set to true if operation completed correctly.", - "nullable": false - }, - "msg": { - "type": "string", - "description": "Message describing operation status or any errors that occurred.", - "nullable": false - }, - "stateFullClassName": { - "description": "The fully qualified name of the Corda state to monitor", - "example": "net.corda.samples.example.states.IOUState", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "tx": { - "type": "array", - "default": [], - "items": { - "type": "object", - "properties": { - "index": { - "type": "string" - }, - "data": { - "type": "string", - "minItems": 0, - "maxItems": 10000000 - } - } - } - } - } - }, - "ClearMonitorTransactionsV1Request": { - "type": "object", - "required": ["clientAppId", "stateFullClassName", "txIndexes"], - "additionalProperties": false, - "properties": { - "clientAppId": { - "description": "ID of a client application that wants to monitor the state changes", - "example": "frond_v1_x_7Hdg6s", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "stateFullClassName": { - "description": "The fully qualified name of the Corda state to monitor", - "example": "net.corda.samples.example.states.IOUState", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "txIndexes": { - "type": "array", - "default": [], - "items": { - "type": "string" - } - } - } - }, - "ClearMonitorTransactionsV1Response": { - "type": "object", - "required": ["success", "msg"], - "additionalProperties": false, - "properties": { - "success": { - "type": "boolean", - "description": "Flag set to true if operation completed correctly.", - "nullable": false - }, - "msg": { - "type": "string", - "description": "Message describing operation status or any errors that occurred.", - "nullable": false - } - } - }, - "StopMonitorV1Request": { - "type": "object", - "required": ["clientAppId", "stateFullClassName"], - "additionalProperties": false, - "properties": { - "clientAppId": { - "description": "ID of a client application that wants to monitor the state changes", - "example": "frond_v1_x_7Hdg6s", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "stateFullClassName": { - "description": "The fully qualified name of the Corda state to monitor", - "example": "net.corda.samples.example.states.IOUState", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "StopMonitorV1Response": { - "type": "object", - "required": ["success", "msg"], - "properties": { - "success": { - "type": "boolean", - "description": "Flag set to true if operation completed correctly.", - "nullable": false - }, - "msg": { - "type": "string", - "description": "Message describing operation status or any errors that occurred.", - "nullable": false - } - } - }, - "ListFlowsV1Request": { - "type": "object", - "additionalProperties": false, - "properties": { - "filter": { - "type": "string" - } - } - }, - "ListFlowsV1Response": { - "type": "object", - "required": ["flowNames"], - "properties": { - "flowNames": { - "type": "array", - "description": "An array of strings storing the names of the flows as returned by the flowList Corda RPC.", - "example": [ - "net.corda.finance.flows.CashExitFlow", - "net.corda.finance.flows.CashIssueAndPaymentFlow", - "net.corda.finance.flows.CashIssueFlow", - "net.corda.finance.flows.CashPaymentFlow", - "net.corda.finance.internal.CashConfigDataFlow", - "net.corda.samples.obligation.flows.IOUIssueFlow", - "net.corda.samples.obligation.flows.IOUSettleFlow", - "net.corda.samples.obligation.flows.IOUTransferFlow", - "net.corda.samples.obligation.flows.SelfIssueCashFlow" - ], - "items": { - "type": "string", - "minItems": 0, - "maxItems": 10000000 - }, - "default": [] - } - } - }, - "NetworkHostAndPort": { - "type": "object", - "required": ["host", "port"], - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "number" - } - } - }, - "PartyAndCertificate": { - "type": "object" - }, - "PublicKey": { - "type": "object", - "description": "An instance of a java.security.PublicKey (which is an interface) implementation such as org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl", - "required": ["algorithm", "format", "encoded"], - "properties": { - "algorithm": { - "type": "string", - "example": "EdDSA" - }, - "format": { - "type": "string", - "example": "X.509" - }, - "encoded": { - "type": "string", - "example": "MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54=" - } - } - }, - "X500Principal": { - "type": "object", - "required": ["name", "encoded"], - "properties": { - "name": { - "example": "O=PartyA,L=London,C=GB", - "type": "string" - }, - "encoded": { - "type": "string", - "description": "Base64 encoded public key", - "example": "MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ==" - } - } - }, - "CordaX500Name": { - "type": "object", - "required": ["organisation", "locality", "country", "x500Principal"], - "properties": { - "commonName": { - "type": "string" - }, - "organisationUnit": { - "type": "string" - }, - "organisation": { - "type": "string", - "example": "PartyA" - }, - "locality": { - "type": "string", - "example": "London" - }, - "state": { - "type": "string" - }, - "country": { - "type": "string", - "example": "GB" - }, - "x500Principal": { - "$ref": "#/components/schemas/X500Principal" - } - } - }, - "Party": { - "type": "object", - "required": ["owningKey", "name"], - "properties": { - "name": { - "$ref": "#/components/schemas/CordaX500Name" - }, - "owningKey": { - "$ref": "#/components/schemas/PublicKey" - } - } - }, - "NodeInfo": { - "type": "object", - "required": [ - "addresses", - "legalIdentitiesAndCerts", - "platformVersion", - "serial", - "legalIdentities" - ], - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkHostAndPort" - } - }, - "platformVersion": { - "type": "integer" - }, - "serial": { - "type": "number" - }, - "legalIdentities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Party" - } - }, - "legalIdentitiesAndCerts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PartyAndCertificate" - } - } - } - }, - "NetworkMapV1Request": { - "type": "object" - }, - "NetworkMapV1Response": { - "type": "array", - "minItems": 1, - "maxItems": 2048, - "nullable": false, - "items": { - "$ref": "#/components/schemas/NodeInfo" - } - }, - "DiagnoseNodeV1Request": { - "type": "object", - "additionalProperties": false, - "properties": { - "nodeIds": { - "type": "array", - "description": "Optional property specifying which Corda Node should be the one being diagnosed in case the Connector has multiple connections established for different nodes (which is not yet a supported feature, but we want to keep this possibility open for the future).", - "minItems": 0, - "maxItems": 1024, - "default": [], - "items": { - "type": "string", - "nullable": false - } - } - } - }, - "DiagnoseNodeV1Response": { - "type": "object", - "required": ["nodeDiagnosticInfo"], - "properties": { - "nodeDiagnosticInfo": { - "$ref": "#/components/schemas/NodeDiagnosticInfo" - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "VaultQueryV1Request": { - "type": "object", - "additionalProperties": false, - "properties": { - "contractStateType": { - "type": "string", - "description": "Valid, fully qualified JVM class name which will be fed into Class.forName(...)", - "minLength": 1 - } - } - }, - "VaultQueryV1Response": { - "type": "object" - }, - "ListCpiV1Response": { - "type": "object", - "required": [ - "hash", - "id", - "libraries", - "mainBundle", - "timestamp", - "type" - ], - "properties": { - "cpis": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cpiFileChecksum": { - "type": "string", - "nullable": false, - "example": "string" - }, - "cpiFileFullChecksum": { - "type": "string", - "nullable": false, - "example": "string" - }, - "cpks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "hash": { - "type": "string", - "nullable": false, - "example": "string" - }, - "id": { - "$ref": "#/components/schemas/CPIIDV1" - }, - "libraries": { - "type": "array", - "items": { - "type": "string", - "nullable": false, - "example": "string" - } - }, - "mainBundle": { - "type": "string", - "nullable": false, - "example": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": false, - "example": "2022-06-24T10:15:30Z" - }, - "type": { - "type": "string", - "nullable": false, - "example": "string" - } - } - } - }, - "groupPolicy": { - "type": "string", - "nullable": true, - "example": "string" - }, - "id": { - "$ref": "#/components/schemas/CPIIDV1" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": false, - "example": "2022-06-24T10:15:30Z" - } - } - } - } - } - }, - "ListCpiV1Request": { - "required": ["username", "password", "rejectUnauthorized"], - "properties": { - "username": { - "type": "string", - "nullable": false - }, - "password": { - "type": "string", - "nullable": false - }, - "rejectUnauthorized": { - "type": "boolean", - "nullable": false - } - } - }, - "StartFlowV1Request": { - "description": "This method starts a new instance for the specified flow for the specified holding identity.", - "type": "object", - "required": [ - "clientRequestId", - "flowClassName", - "requestBody", - "username", - "password", - "rejectUnauthorized" - ], - "properties": { - "username": { - "type": "string", - "nullable": false - }, - "password": { - "type": "string", - "nullable": false - }, - "rejectUnauthorized": { - "type": "boolean", - "nullable": false - }, - "holdingIDShortHash": { - "type": "string", - "nullable": false - }, - "clientRequestId": { - "type": "string", - "nullable": false - }, - "flowClassName": { - "type": "string", - "nullable": false - }, - "requestBody": { - "type": "object", - "properties": { - "chatName": { - "type": "string" - }, - "otherMember": { - "type": "string" - }, - "message": { - "type": "string" - }, - "numberOfRecords": { - "type": "string" - } - } - } - } - }, - "GetFlowCidV1Request": { - "description": "This method gets the current status of the specified flow instance.", - "required": ["username", "password", "rejectUnauthorized"], - "properties": { - "username": { - "type": "string", - "nullable": false - }, - "password": { - "type": "string", - "nullable": false - }, - "rejectUnauthorized": { - "type": "boolean", - "nullable": false - }, - "holdingIDShortHash": { - "type": "string", - "nullable": false - }, - "clientRequestId": { - "type": "string", - "nullable": false - } - } - }, - "GetFlowCidV1Response": { - "type": "object", - "required": ["flowStatus", "holdingIDShortHash", "timestamp"], - "properties": { - "clientRequestId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowError": { - "$ref": "#/components/schemas/FlowV1Error" - }, - "flowId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowResult": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowStatus": { - "type": "string", - "nullable": false, - "example": "string" - }, - "holdingIDShortHash": { - "type": "string", - "nullable": false, - "example": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": false, - "example": "2022-06-24T10:15:30Z" - } - } - }, - "FlowStatusV1Responses": { - "type": "object", - "required": ["flowStatus", "holdingIDShortHash", "timestamp"], - "properties": { - "flowStatusResponses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "clientRequestId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowError": { - "$ref": "#/components/schemas/FlowV1Error" - }, - "flowId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowResult": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowStatus": { - "type": "string", - "nullable": false, - "example": "string" - }, - "holdingIDShortHash": { - "type": "string", - "nullable": false, - "example": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": false, - "example": "2022-06-24T10:15:30Z" - } - } - } - } - } - }, - "StartFlowV1Response": { - "type": "object", - "required": ["flowStatus", "holdingIDShortHash", "timestamp"], - "properties": { - "clientRequestId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowError": { - "$ref": "#/components/schemas/FlowV1Error" - }, - "flowId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowResult": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowStatus": { - "type": "string", - "nullable": false, - "example": "string" - }, - "holdingIDShortHash": { - "type": "string", - "nullable": false, - "example": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": false, - "example": "2022-06-24T10:15:30Z" - } - } - }, - "CPIIDV1": { - "type": "object", - "required": ["name", "version"], - "properties": { - "name": { - "type": "string", - "nullable": false, - "example": "string" - }, - "signerSummaryHash": { - "type": "string", - "nullable": true, - "example": "string" - }, - "version": { - "type": "string", - "nullable": false, - "example": "string" - } - } - }, - "FlowV1Error": { - "type": "object", - "required": ["message", "type"], - "properties": { - "message": { - "type": "string", - "nullable": false, - "example": "string" - }, - "type": { - "type": "string", - "nullable": false, - "example": "string" - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query": { - "post": { - "operationId": "vaultQueryV1", - "x-hyperledger-cactus": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query", - "verbLowerCase": "post" - } - }, - "description": "Queryes the vault service for state references based on JVM class names. Custom filters are not supported by this endpoint.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VaultQueryV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VaultQueryV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars": { - "post": { - "operationId": "deployContractJarsV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars", - "verbLowerCase": "post" - } - }, - "summary": "Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak).", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractJarsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractJarsSuccessV1Response" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractJarsBadRequestV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract": { - "post": { - "operationId": "invokeContractV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract", - "verbLowerCase": "post" - } - }, - "summary": "Invokes a contract on a Corda ledger (e.g. a flow)", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor": { - "post": { - "operationId": "startMonitorV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor", - "verbLowerCase": "post" - } - }, - "summary": "Start monitoring corda changes (transactions) of given state class", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartMonitorV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartMonitorV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions": { - "get": { - "operationId": "GetMonitorTransactionsV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions", - "verbLowerCase": "get" - } - }, - "summary": "Get transactions for monitored state classes.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetMonitorTransactionsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetMonitorTransactionsV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions": { - "delete": { - "operationId": "ClearMonitorTransactionsV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions", - "verbLowerCase": "delete" - } - }, - "summary": "Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClearMonitorTransactionsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClearMonitorTransactionsV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor": { - "delete": { - "operationId": "stopMonitorV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor", - "verbLowerCase": "delete" - } - }, - "summary": "Stop monitoring corda changes (transactions) of given state class", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StopMonitorV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StopMonitorV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map": { - "post": { - "operationId": "networkMapV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map", - "verbLowerCase": "post" - } - }, - "description": "Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List", - "parameters": [], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NetworkMapV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NetworkMapV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows": { - "post": { - "operationId": "listFlowsV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows", - "verbLowerCase": "post" - } - }, - "description": "Responds with a list of the flows on the Corda node.", - "parameters": [], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListFlowsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListFlowsV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node": { - "post": { - "operationId": "diagnoseNodeV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node", - "verbLowerCase": "post" - } - }, - "description": "Responds with diagnostic information about the Corda node", - "parameters": [], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DiagnoseNodeV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DiagnoseNodeV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi": { - "get": { - "x-hyperledger-cactus": { - "https": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi" - } - }, - "operationId": "listCpiV1", - "summary": "List all CPIs uploaded to the cluster", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListCpiV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListCpiV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow": { - "get": { - "x-hyperledger-cactus": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow" - } - }, - "operationId": "listFlowV1", - "summary": "This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running.", - "parameters": [], - "requestBody": { - "description": "This method gets the current status of the specified flow instance.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetFlowCidV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/FlowStatusV1Responses" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid": { - "get": { - "x-hyperledger-cactus": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid" - } - }, - "operationId": "getFlowV1", - "summary": "This method gets the current status of the specified flow instance.", - "requestBody": { - "description": "This method gets the current status of the specified flow instance.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetFlowCidV1Request" - } - } - } - }, - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GetFlowCidV1Response" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow": { - "post": { - "x-hyperledger-cactus": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow" - } - }, - "operationId": "startFlowV1", - "summary": "This method starts a new instance for the specified flow for the specified holding identity.", - "requestBody": { - "description": "Request body for starting a flow", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartFlowV1Request" - } - } - } - }, - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartFlowV1Response" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.tpl.json deleted file mode 100644 index 15887a7d37..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,1773 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector Corda", - "description": "Can perform basic tasks on a Corda ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "SHA256": { - "description": "SHA-256 is part of the SHA-2 hash function family. Generated hash is fixed size, 256-bits (32-bytes).", - "externalDocs": { - "description": "Official Corda documentation of the SHA256 class.", - "url": "https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.crypto/-secure-hash/-s-h-a256/index.html" - }, - "type": "object", - "required": ["bytes", "offset", "size"], - "properties": { - "bytes": { - "type": "string", - "example": "Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc=" - }, - "offset": { - "type": "integer", - "example": 0 - }, - "size": { - "type": "integer", - "example": 32 - } - } - }, - "CordappInfo": { - "type": "object", - "externalDocs": { - "description": "Official Corda Documentation of the class CordappInfo", - "url": "https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.cordapp/-cordapp-info/index.html" - }, - "description": "A CordappInfo describes a single CorDapp currently installed on the node", - "required": [ - "jarHash", - "licence", - "minimumPlatformVersion", - "name", - "shortName", - "targetPlatformVersion", - "type", - "vendor", - "version" - ], - "properties": { - "jarHash": { - "type": "object", - "format": "SHA256", - "description": "The hash of the JAR file that defines this CorDapp", - "$ref": "#/components/schemas/SHA256" - }, - "licence": { - "type": "string", - "description": "The name of the licence this CorDapp is released under" - }, - "minimumPlatformVersion": { - "type": "integer", - "description": "The minimum platform version the node must be at for the CorDapp to run" - }, - "name": { - "type": "string", - "description": "The name of the JAR file that defines the CorDapp" - }, - "shortName": { - "type": "string", - "description": "The name of the CorDapp" - }, - "targetPlatformVersion": { - "type": "integer", - "description": "The target platform version this CorDapp has been tested against" - }, - "type": { - "type": "string", - "description": "A description of what sort of CorDapp this is - either a contract, workflow, or a combination." - }, - "vendor": { - "type": "string", - "description": "The vendor of this CorDapp" - }, - "version": { - "type": "string", - "description": "The version of this CorDapp" - } - } - }, - "NodeDiagnosticInfo": { - "type": "object", - "externalDocs": { - "description": "Official Corda Documentation of the class NodeDiagnosticInfo", - "url": "https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.node/-node-diagnostic-info/index.html" - }, - "description": "A NodeDiagnosticInfo holds information about the current node version.", - "required": [ - "cordapps", - "platformVersion", - "revision", - "vendor", - "version" - ], - "properties": { - "cordapps": { - "type": "array", - "description": "A list of CorDapps currently installed on this node", - "items": { - "$ref": "#/components/schemas/CordappInfo" - }, - "minItems": 0, - "maxItems": 4096 - }, - "platformVersion": { - "type": "integer", - "description": "The platform version of this node. This number represents a released API version, and should be used to make functionality decisions (e.g. enabling an app feature only if an underlying platform feature exists)" - }, - "revision": { - "type": "string", - "description": "The git commit hash this node was built from" - }, - "vendor": { - "type": "string", - "description": "The vendor of this node" - }, - "version": { - "type": "string", - "description": "The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note that this string is effectively freeform, and so should only be used for providing diagnostic information. It should not be used to make functionality decisions (the platformVersion is a better fit for this)." - } - } - }, - "FlowInvocationType": { - "type": "string", - "nullable": false, - "enum": ["TRACKED_FLOW_DYNAMIC", "FLOW_DYNAMIC"], - "description": "Determines which flow starting method will be used on the back-end when invoking the flow. Based on the value here the plugin back-end might invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() method. Streamed responses are aggregated and returned in a single response to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. do." - }, - "JarFile": { - "type": "object", - "required": ["filename", "contentBase64", "hasDbMigrations"], - "additionalProperties": true, - "properties": { - "filename": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 255 - }, - "hasDbMigrations": { - "description": "Indicates whether the cordapp jar in question contains any embedded migrations that Cactus can/should execute between copying the jar into the cordapp directory and starting the node back up.", - "type": "boolean", - "nullable": false - }, - "contentBase64": { - "type": "string", - "format": "base64", - "nullable": false, - "minLength": 1, - "maxLength": 1073741824 - } - } - }, - "JvmType": { - "type": "object", - "description": "Represents a reference to a JVM type (such as a Java class)", - "required": ["fqClassName"], - "properties": { - "fqClassName": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 65535 - }, - "constructorName": { - "type": "string", - "nullable": false, - "description": "This parameter is used to specify that the function used to construct this JvmType is not a constructor function but instead is a factory function. Setting this parameter will cause the plugin to look up methods of the class denoted by fqClassName instead of its constructors.", - "minLength": 1, - "maxLength": 65535 - }, - "invocationTarget": { - "$ref": "#/components/schemas/JvmObject" - } - } - }, - "JvmTypeKind": { - "type": "string", - "nullable": false, - "enum": ["PRIMITIVE", "REFERENCE"] - }, - "JvmObject": { - "description": "Can represent JVM primitive and reference types as well. The jvmTypeKind field indicates which one is being stored. If the jvmTypeKind field is set to REFERENCE then the jvmCtorArgs array is expected to be filled, otherwise (e.g. PRIMITIVE jvmTypeKind) it is expected that the primitiveValue property is filled with a primitive data type supported by the JSON standard such as strings, booleans, numbers, etc.", - "type": "object", - "required": ["jvmType", "jvmTypeKind"], - "properties": { - "jvmTypeKind": { - "$ref": "#/components/schemas/JvmTypeKind" - }, - "primitiveValue": {}, - "jvmCtorArgs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JvmObject", - "nullable": false - }, - "minLength": 0, - "maxLength": 1024, - "nullable": false, - "default": [] - }, - "jvmType": { - "$ref": "#/components/schemas/JvmType" - } - } - }, - "CordappDeploymentConfig": { - "type": "object", - "required": [ - "sshCredentials", - "rpcCredentials", - "cordappDir", - "cordaNodeStartCmd", - "cordaJarPath", - "nodeBaseDirPath" - ], - "properties": { - "sshCredentials": { - "$ref": "#/components/schemas/CordaNodeSshCredentials" - }, - "rpcCredentials": { - "$ref": "#/components/schemas/CordaRpcCredentials" - }, - "cordaNodeStartCmd": { - "type": "string", - "description": "The shell command to execute in order to start back up a Corda node after having placed new jars in the cordapp directory of said node.", - "example": "./build/nodes/runNodes", - "minLength": 1, - "maxLength": 65535, - "nullable": false - }, - "cordappDir": { - "type": "string", - "description": "The absolute file system path where the Corda Node is expecting deployed Cordapp jar files to be placed.", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "cordaJarPath": { - "type": "string", - "description": "The absolute file system path where the corda.jar file of the node can be found. This is used to execute database schema migrations where applicable (H2 database in use in development environments).", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "nodeBaseDirPath": { - "type": "string", - "description": "The absolute file system path where the base directory of the Corda node can be found. This is used to pass in to corda.jar when being invoked for certain tasks such as executing database schema migrations for a deployed contract.", - "minLength": 1, - "maxLength": 2048, - "nullable": false - } - } - }, - "CordaRpcCredentials": { - "type": "object", - "required": ["hostname", "port", "username", "password"], - "properties": { - "hostname": { - "type": "string", - "minLength": 1, - "maxLength": 65535, - "nullable": false - }, - "port": { - "type": "integer", - "minimum": 1, - "maximum": 65535, - "nullable": false - }, - "username": { - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "password": { - "type": "string", - "minLength": 1, - "maxLength": 65535, - "nullable": false - } - } - }, - "CordaNodeSshCredentials": { - "type": "object", - "required": [ - "username", - "password", - "hostname", - "port", - "hostKeyEntry" - ], - "properties": { - "hostKeyEntry": { - "type": "string", - "example": "localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13", - "minLength": 1, - "maxLength": 65535, - "nullable": false - }, - "username": { - "type": "string", - "minLength": 1, - "maxLength": 32, - "nullable": false - }, - "password": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - }, - "hostname": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - }, - "port": { - "type": "integer", - "minimum": 1, - "maximum": 65535, - "nullable": false - } - } - }, - "DeployContractJarsV1Request": { - "type": "object", - "required": ["jarFiles", "cordappDeploymentConfigs"], - "additionalProperties": false, - "properties": { - "cordappDeploymentConfigs": { - "type": "array", - "description": "The list of deployment configurations pointing to the nodes where the provided cordapp jar files are to be deployed .", - "minLength": 0, - "maxLength": 1024, - "default": [], - "items": { - "$ref": "#/components/schemas/CordappDeploymentConfig" - } - }, - "jarFiles": { - "type": "array", - "nullable": false, - "items": { - "minLength": 1, - "maxLength": 1024, - "$ref": "#/components/schemas/JarFile" - } - } - } - }, - "DeployContractJarsSuccessV1Response": { - "type": "object", - "required": ["deployedJarFiles"], - "properties": { - "deployedJarFiles": { - "type": "array", - "items": { - "type": "string", - "minItems": 1, - "nullable": false - } - } - } - }, - "DeployContractJarsBadRequestV1Response": { - "type": "object", - "required": ["errors"], - "properties": { - "errors": { - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 65535, - "minItems": 1, - "maxItems": 2048 - } - } - } - }, - "InvokeContractV1Request": { - "type": "object", - "required": [ - "flowFullClassName", - "flowInvocationType", - "params", - "signingCredential" - ], - "additionalProperties": false, - "properties": { - "flowFullClassName": { - "description": "The fully qualified name of the Corda flow to invoke", - "example": "net.corda.samples.obligation.flows.IOUIssueFlow", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "flowInvocationType": { - "$ref": "#/components/schemas/FlowInvocationType" - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": { - "$ref": "#/components/schemas/JvmObject", - "nullable": false - }, - "nullable": false - }, - "timeoutMs": { - "type": "integer", - "description": "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - } - } - }, - "InvokeContractV1Response": { - "type": "object", - "required": ["success", "callOutput", "flowId"], - "properties": { - "success": { - "type": "boolean", - "nullable": false - }, - "callOutput": { - "type": "object", - "description": "Data returned from the JVM when no transaction is running" - }, - "transactionId": { - "type": "string", - "description": "The net.corda.core.flows.StateMachineRunId value returned by the flow execution.", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "progress": { - "type": "array", - "description": "An array of strings representing the aggregated stream of progress updates provided by a *tracked* flow invocation. If the flow invocation was not tracked, this array is still returned, but as empty.", - "items": { - "type": "string", - "minItems": 0, - "maxItems": 10000000 - }, - "default": [] - }, - "flowId": { - "type": "string", - "description": "The id for the flow handle" - } - } - }, - "StartMonitorV1Request": { - "type": "object", - "required": ["clientAppId", "stateFullClassName"], - "additionalProperties": false, - "properties": { - "clientAppId": { - "description": "ID of a client application that wants to monitor the state changes", - "example": "frond_v1_x_7Hdg6s", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "stateFullClassName": { - "description": "The fully qualified name of the Corda state to monitor", - "example": "net.corda.samples.example.states.IOUState", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "StartMonitorV1Response": { - "type": "object", - "required": ["success", "msg"], - "properties": { - "success": { - "type": "boolean", - "description": "Flag set to true if monitoring started correctly.", - "nullable": false - }, - "msg": { - "type": "string", - "description": "Message describing operation status or any errors that occurred.", - "nullable": false - } - } - }, - "GetMonitorTransactionsV1Request": { - "type": "object", - "required": ["clientAppId", "stateFullClassName"], - "additionalProperties": false, - "properties": { - "clientAppId": { - "description": "ID of a client application that wants to monitor the state changes", - "example": "frond_v1_x_7Hdg6s", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "stateFullClassName": { - "description": "The fully qualified name of the Corda state to monitor", - "example": "net.corda.samples.example.states.IOUState", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "GetMonitorTransactionsV1Response": { - "type": "object", - "required": ["success", "msg"], - "properties": { - "success": { - "type": "boolean", - "description": "Flag set to true if operation completed correctly.", - "nullable": false - }, - "msg": { - "type": "string", - "description": "Message describing operation status or any errors that occurred.", - "nullable": false - }, - "stateFullClassName": { - "description": "The fully qualified name of the Corda state to monitor", - "example": "net.corda.samples.example.states.IOUState", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "tx": { - "type": "array", - "default": [], - "items": { - "type": "object", - "properties": { - "index": { - "type": "string" - }, - "data": { - "type": "string", - "minItems": 0, - "maxItems": 10000000 - } - } - } - } - } - }, - "ClearMonitorTransactionsV1Request": { - "type": "object", - "required": ["clientAppId", "stateFullClassName", "txIndexes"], - "additionalProperties": false, - "properties": { - "clientAppId": { - "description": "ID of a client application that wants to monitor the state changes", - "example": "frond_v1_x_7Hdg6s", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "stateFullClassName": { - "description": "The fully qualified name of the Corda state to monitor", - "example": "net.corda.samples.example.states.IOUState", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "txIndexes": { - "type": "array", - "default": [], - "items": { - "type": "string" - } - } - } - }, - "ClearMonitorTransactionsV1Response": { - "type": "object", - "required": ["success", "msg"], - "additionalProperties": false, - "properties": { - "success": { - "type": "boolean", - "description": "Flag set to true if operation completed correctly.", - "nullable": false - }, - "msg": { - "type": "string", - "description": "Message describing operation status or any errors that occurred.", - "nullable": false - } - } - }, - "StopMonitorV1Request": { - "type": "object", - "required": ["clientAppId", "stateFullClassName"], - "additionalProperties": false, - "properties": { - "clientAppId": { - "description": "ID of a client application that wants to monitor the state changes", - "example": "frond_v1_x_7Hdg6s", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - }, - "stateFullClassName": { - "description": "The fully qualified name of the Corda state to monitor", - "example": "net.corda.samples.example.states.IOUState", - "type": "string", - "minLength": 1, - "maxLength": 1024, - "nullable": false - } - } - }, - "StopMonitorV1Response": { - "type": "object", - "required": ["success", "msg"], - "properties": { - "success": { - "type": "boolean", - "description": "Flag set to true if operation completed correctly.", - "nullable": false - }, - "msg": { - "type": "string", - "description": "Message describing operation status or any errors that occurred.", - "nullable": false - } - } - }, - "ListFlowsV1Request": { - "type": "object", - "additionalProperties": false, - "properties": { - "filter": { - "type": "string" - } - } - }, - "ListFlowsV1Response": { - "type": "object", - "required": ["flowNames"], - "properties": { - "flowNames": { - "type": "array", - "description": "An array of strings storing the names of the flows as returned by the flowList Corda RPC.", - "example": [ - "net.corda.finance.flows.CashExitFlow", - "net.corda.finance.flows.CashIssueAndPaymentFlow", - "net.corda.finance.flows.CashIssueFlow", - "net.corda.finance.flows.CashPaymentFlow", - "net.corda.finance.internal.CashConfigDataFlow", - "net.corda.samples.obligation.flows.IOUIssueFlow", - "net.corda.samples.obligation.flows.IOUSettleFlow", - "net.corda.samples.obligation.flows.IOUTransferFlow", - "net.corda.samples.obligation.flows.SelfIssueCashFlow" - ], - "items": { - "type": "string", - "minItems": 0, - "maxItems": 10000000 - }, - "default": [] - } - } - }, - "NetworkHostAndPort": { - "type": "object", - "required": ["host", "port"], - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "number" - } - } - }, - "PartyAndCertificate": { - "type": "object" - }, - "PublicKey": { - "type": "object", - "description": "An instance of a java.security.PublicKey (which is an interface) implementation such as org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl", - "required": ["algorithm", "format", "encoded"], - "properties": { - "algorithm": { - "type": "string", - "example": "EdDSA" - }, - "format": { - "type": "string", - "example": "X.509" - }, - "encoded": { - "type": "string", - "example": "MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54=" - } - } - }, - "X500Principal": { - "type": "object", - "required": ["name", "encoded"], - "properties": { - "name": { - "example": "O=PartyA,L=London,C=GB", - "type": "string" - }, - "encoded": { - "type": "string", - "description": "Base64 encoded public key", - "example": "MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ==" - } - } - }, - "CordaX500Name": { - "type": "object", - "required": ["organisation", "locality", "country", "x500Principal"], - "properties": { - "commonName": { - "type": "string" - }, - "organisationUnit": { - "type": "string" - }, - "organisation": { - "type": "string", - "example": "PartyA" - }, - "locality": { - "type": "string", - "example": "London" - }, - "state": { - "type": "string" - }, - "country": { - "type": "string", - "example": "GB" - }, - "x500Principal": { - "$ref": "#/components/schemas/X500Principal" - } - } - }, - "Party": { - "type": "object", - "required": ["owningKey", "name"], - "properties": { - "name": { - "$ref": "#/components/schemas/CordaX500Name" - }, - "owningKey": { - "$ref": "#/components/schemas/PublicKey" - } - } - }, - "NodeInfo": { - "type": "object", - "required": [ - "addresses", - "legalIdentitiesAndCerts", - "platformVersion", - "serial", - "legalIdentities" - ], - "properties": { - "addresses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkHostAndPort" - } - }, - "platformVersion": { - "type": "integer" - }, - "serial": { - "type": "number" - }, - "legalIdentities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Party" - } - }, - "legalIdentitiesAndCerts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PartyAndCertificate" - } - } - } - }, - "NetworkMapV1Request": { - "type": "object" - }, - "NetworkMapV1Response": { - "type": "array", - "minItems": 1, - "maxItems": 2048, - "nullable": false, - "items": { - "$ref": "#/components/schemas/NodeInfo" - } - }, - "DiagnoseNodeV1Request": { - "type": "object", - "additionalProperties": false, - "properties": { - "nodeIds": { - "type": "array", - "description": "Optional property specifying which Corda Node should be the one being diagnosed in case the Connector has multiple connections established for different nodes (which is not yet a supported feature, but we want to keep this possibility open for the future).", - "minItems": 0, - "maxItems": 1024, - "default": [], - "items": { - "type": "string", - "nullable": false - } - } - } - }, - "DiagnoseNodeV1Response": { - "type": "object", - "required": ["nodeDiagnosticInfo"], - "properties": { - "nodeDiagnosticInfo": { - "$ref": "#/components/schemas/NodeDiagnosticInfo" - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "VaultQueryV1Request": { - "type": "object", - "additionalProperties": false, - "properties": { - "contractStateType": { - "type": "string", - "description": "Valid, fully qualified JVM class name which will be fed into Class.forName(...)", - "minLength": 1 - } - } - }, - "VaultQueryV1Response": { - "type": "object" - }, - "ListCpiV1Response": { - "type": "object", - "required": [ - "hash", - "id", - "libraries", - "mainBundle", - "timestamp", - "type" - ], - "properties": { - "cpis": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cpiFileChecksum": { - "type": "string", - "nullable": false, - "example": "string" - }, - "cpiFileFullChecksum": { - "type": "string", - "nullable": false, - "example": "string" - }, - "cpks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "hash": { - "type": "string", - "nullable": false, - "example": "string" - }, - "id": { - "$ref": "#/components/schemas/CPIIDV1" - }, - "libraries": { - "type": "array", - "items": { - "type": "string", - "nullable": false, - "example": "string" - } - }, - "mainBundle": { - "type": "string", - "nullable": false, - "example": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": false, - "example": "2022-06-24T10:15:30Z" - }, - "type": { - "type": "string", - "nullable": false, - "example": "string" - } - } - } - }, - "groupPolicy": { - "type": "string", - "nullable": true, - "example": "string" - }, - "id": { - "$ref": "#/components/schemas/CPIIDV1" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": false, - "example": "2022-06-24T10:15:30Z" - } - } - } - } - } - }, - "ListCpiV1Request": { - "required": ["username", "password", "rejectUnauthorized"], - "properties": { - "username": { - "type": "string", - "nullable": false - }, - "password": { - "type": "string", - "nullable": false - }, - "rejectUnauthorized": { - "type": "boolean", - "nullable": false - } - } - }, - "StartFlowV1Request": { - "description": "This method starts a new instance for the specified flow for the specified holding identity.", - "type": "object", - "required": [ - "clientRequestId", - "flowClassName", - "requestBody", - "username", - "password", - "rejectUnauthorized" - ], - "properties": { - "username": { - "type": "string", - "nullable": false - }, - "password": { - "type": "string", - "nullable": false - }, - "rejectUnauthorized": { - "type": "boolean", - "nullable": false - }, - "holdingIDShortHash": { - "type": "string", - "nullable": false - }, - "clientRequestId": { - "type": "string", - "nullable": false - }, - "flowClassName": { - "type": "string", - "nullable": false - }, - "requestBody": { - "type": "object", - "properties": { - "chatName": { - "type": "string" - }, - "otherMember": { - "type": "string" - }, - "message": { - "type": "string" - }, - "numberOfRecords": { - "type": "string" - } - } - } - } - }, - "GetFlowCidV1Request": { - "description": "This method gets the current status of the specified flow instance.", - "required": ["username", "password", "rejectUnauthorized"], - "properties": { - "username": { - "type": "string", - "nullable": false - }, - "password": { - "type": "string", - "nullable": false - }, - "rejectUnauthorized": { - "type": "boolean", - "nullable": false - }, - "holdingIDShortHash": { - "type": "string", - "nullable": false - }, - "clientRequestId": { - "type": "string", - "nullable": false - } - } - }, - "GetFlowCidV1Response": { - "type": "object", - "required": ["flowStatus", "holdingIDShortHash", "timestamp"], - "properties": { - "clientRequestId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowError": { - "$ref": "#/components/schemas/FlowV1Error" - }, - "flowId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowResult": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowStatus": { - "type": "string", - "nullable": false, - "example": "string" - }, - "holdingIDShortHash": { - "type": "string", - "nullable": false, - "example": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": false, - "example": "2022-06-24T10:15:30Z" - } - } - }, - "FlowStatusV1Responses": { - "type": "object", - "required": ["flowStatus", "holdingIDShortHash", "timestamp"], - "properties": { - "flowStatusResponses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "clientRequestId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowError": { - "$ref": "#/components/schemas/FlowV1Error" - }, - "flowId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowResult": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowStatus": { - "type": "string", - "nullable": false, - "example": "string" - }, - "holdingIDShortHash": { - "type": "string", - "nullable": false, - "example": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": false, - "example": "2022-06-24T10:15:30Z" - } - } - } - } - } - }, - "StartFlowV1Response": { - "type": "object", - "required": ["flowStatus", "holdingIDShortHash", "timestamp"], - "properties": { - "clientRequestId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowError": { - "$ref": "#/components/schemas/FlowV1Error" - }, - "flowId": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowResult": { - "type": "string", - "nullable": true, - "example": "string" - }, - "flowStatus": { - "type": "string", - "nullable": false, - "example": "string" - }, - "holdingIDShortHash": { - "type": "string", - "nullable": false, - "example": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": false, - "example": "2022-06-24T10:15:30Z" - } - } - }, - "CPIIDV1": { - "type": "object", - "required": ["name", "version"], - "properties": { - "name": { - "type": "string", - "nullable": false, - "example": "string" - }, - "signerSummaryHash": { - "type": "string", - "nullable": true, - "example": "string" - }, - "version": { - "type": "string", - "nullable": false, - "example": "string" - } - } - }, - "FlowV1Error": { - "type": "object", - "required": ["message", "type"], - "properties": { - "message": { - "type": "string", - "nullable": false, - "example": "string" - }, - "type": { - "type": "string", - "nullable": false, - "example": "string" - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query": { - "post": { - "operationId": "vaultQueryV1", - "x-hyperledger-cactus": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query", - "verbLowerCase": "post" - } - }, - "description": "Queryes the vault service for state references based on JVM class names. Custom filters are not supported by this endpoint.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VaultQueryV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VaultQueryV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars": { - "post": { - "operationId": "deployContractJarsV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars", - "verbLowerCase": "post" - } - }, - "summary": "Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak).", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractJarsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractJarsSuccessV1Response" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractJarsBadRequestV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract": { - "post": { - "operationId": "invokeContractV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract", - "verbLowerCase": "post" - } - }, - "summary": "Invokes a contract on a Corda ledger (e.g. a flow)", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor": { - "post": { - "operationId": "startMonitorV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor", - "verbLowerCase": "post" - } - }, - "summary": "Start monitoring corda changes (transactions) of given state class", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartMonitorV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartMonitorV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions": { - "get": { - "operationId": "GetMonitorTransactionsV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions", - "verbLowerCase": "get" - } - }, - "summary": "Get transactions for monitored state classes.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetMonitorTransactionsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetMonitorTransactionsV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions": { - "delete": { - "operationId": "ClearMonitorTransactionsV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions", - "verbLowerCase": "delete" - } - }, - "summary": "Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClearMonitorTransactionsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClearMonitorTransactionsV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor": { - "delete": { - "operationId": "stopMonitorV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor", - "verbLowerCase": "delete" - } - }, - "summary": "Stop monitoring corda changes (transactions) of given state class", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StopMonitorV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StopMonitorV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map": { - "post": { - "operationId": "networkMapV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map", - "verbLowerCase": "post" - } - }, - "description": "Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List", - "parameters": [], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NetworkMapV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NetworkMapV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows": { - "post": { - "operationId": "listFlowsV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows", - "verbLowerCase": "post" - } - }, - "description": "Responds with a list of the flows on the Corda node.", - "parameters": [], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListFlowsV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListFlowsV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node": { - "post": { - "operationId": "diagnoseNodeV1", - "x-hyperledger-cacti": { - "http": { - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node", - "verbLowerCase": "post" - } - }, - "description": "Responds with diagnostic information about the Corda node", - "parameters": [], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DiagnoseNodeV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DiagnoseNodeV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi": { - "get": { - "x-hyperledger-cactus": { - "https": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi" - } - }, - "operationId": "listCpiV1", - "summary": "List all CPIs uploaded to the cluster", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListCpiV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListCpiV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow": { - "get": { - "x-hyperledger-cactus": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow" - } - }, - "operationId": "listFlowV1", - "summary": "This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running.", - "parameters": [], - "requestBody": { - "description": "This method gets the current status of the specified flow instance.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetFlowCidV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/FlowStatusV1Responses" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid": { - "get": { - "x-hyperledger-cactus": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid" - } - }, - "operationId": "getFlowV1", - "summary": "This method gets the current status of the specified flow instance.", - "requestBody": { - "description": "This method gets the current status of the specified flow instance.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetFlowCidV1Request" - } - } - } - }, - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GetFlowCidV1Response" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow": { - "post": { - "x-hyperledger-cactus": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow" - } - }, - "operationId": "startFlowV1", - "summary": "This method starts a new instance for the specified flow for the specified holding identity.", - "requestBody": { - "description": "Request body for starting a flow", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartFlowV1Request" - } - } - } - }, - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartFlowV1Response" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index f0523c86bf..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,72 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/CPIIDV1.kt -src/main/kotlin/org/openapitools/client/models/ClearMonitorTransactionsV1Request.kt -src/main/kotlin/org/openapitools/client/models/ClearMonitorTransactionsV1Response.kt -src/main/kotlin/org/openapitools/client/models/CordaNodeSshCredentials.kt -src/main/kotlin/org/openapitools/client/models/CordaRpcCredentials.kt -src/main/kotlin/org/openapitools/client/models/CordaX500Name.kt -src/main/kotlin/org/openapitools/client/models/CordappDeploymentConfig.kt -src/main/kotlin/org/openapitools/client/models/CordappInfo.kt -src/main/kotlin/org/openapitools/client/models/DeployContractJarsBadRequestV1Response.kt -src/main/kotlin/org/openapitools/client/models/DeployContractJarsSuccessV1Response.kt -src/main/kotlin/org/openapitools/client/models/DeployContractJarsV1Request.kt -src/main/kotlin/org/openapitools/client/models/DiagnoseNodeV1Request.kt -src/main/kotlin/org/openapitools/client/models/DiagnoseNodeV1Response.kt -src/main/kotlin/org/openapitools/client/models/FlowInvocationType.kt -src/main/kotlin/org/openapitools/client/models/FlowStatusV1Responses.kt -src/main/kotlin/org/openapitools/client/models/FlowStatusV1ResponsesFlowStatusResponsesInner.kt -src/main/kotlin/org/openapitools/client/models/FlowV1Error.kt -src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Request.kt -src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Response.kt -src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1Request.kt -src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1Response.kt -src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1ResponseTxInner.kt -src/main/kotlin/org/openapitools/client/models/InvokeContractV1Request.kt -src/main/kotlin/org/openapitools/client/models/InvokeContractV1Response.kt -src/main/kotlin/org/openapitools/client/models/JarFile.kt -src/main/kotlin/org/openapitools/client/models/JvmObject.kt -src/main/kotlin/org/openapitools/client/models/JvmType.kt -src/main/kotlin/org/openapitools/client/models/JvmTypeKind.kt -src/main/kotlin/org/openapitools/client/models/ListCpiV1Request.kt -src/main/kotlin/org/openapitools/client/models/ListCpiV1Response.kt -src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInner.kt -src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInnerCpksInner.kt -src/main/kotlin/org/openapitools/client/models/ListFlowsV1Request.kt -src/main/kotlin/org/openapitools/client/models/ListFlowsV1Response.kt -src/main/kotlin/org/openapitools/client/models/NetworkHostAndPort.kt -src/main/kotlin/org/openapitools/client/models/NodeDiagnosticInfo.kt -src/main/kotlin/org/openapitools/client/models/NodeInfo.kt -src/main/kotlin/org/openapitools/client/models/Party.kt -src/main/kotlin/org/openapitools/client/models/PublicKey.kt -src/main/kotlin/org/openapitools/client/models/SHA256.kt -src/main/kotlin/org/openapitools/client/models/StartFlowV1Request.kt -src/main/kotlin/org/openapitools/client/models/StartFlowV1RequestRequestBody.kt -src/main/kotlin/org/openapitools/client/models/StartFlowV1Response.kt -src/main/kotlin/org/openapitools/client/models/StartMonitorV1Request.kt -src/main/kotlin/org/openapitools/client/models/StartMonitorV1Response.kt -src/main/kotlin/org/openapitools/client/models/StopMonitorV1Request.kt -src/main/kotlin/org/openapitools/client/models/StopMonitorV1Response.kt -src/main/kotlin/org/openapitools/client/models/VaultQueryV1Request.kt -src/main/kotlin/org/openapitools/client/models/X500Principal.kt diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 669b9777fb..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cacti Plugin - Connector Corda - -Can perform basic tasks on a Corda ledger - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**clearMonitorTransactionsV1**](docs/DefaultApi.md#clearmonitortransactionsv1) | **DELETE** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions | Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore. -*DefaultApi* | [**deployContractJarsV1**](docs/DefaultApi.md#deploycontractjarsv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars | Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). -*DefaultApi* | [**diagnoseNodeV1**](docs/DefaultApi.md#diagnosenodev1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node | -*DefaultApi* | [**getFlowV1**](docs/DefaultApi.md#getflowv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid | This method gets the current status of the specified flow instance. -*DefaultApi* | [**getMonitorTransactionsV1**](docs/DefaultApi.md#getmonitortransactionsv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions | Get transactions for monitored state classes. -*DefaultApi* | [**getPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**invokeContractV1**](docs/DefaultApi.md#invokecontractv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract | Invokes a contract on a Corda ledger (e.g. a flow) -*DefaultApi* | [**listCpiV1**](docs/DefaultApi.md#listcpiv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi | List all CPIs uploaded to the cluster -*DefaultApi* | [**listFlowV1**](docs/DefaultApi.md#listflowv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow | This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. -*DefaultApi* | [**listFlowsV1**](docs/DefaultApi.md#listflowsv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows | -*DefaultApi* | [**networkMapV1**](docs/DefaultApi.md#networkmapv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map | -*DefaultApi* | [**startFlowV1**](docs/DefaultApi.md#startflowv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow | This method starts a new instance for the specified flow for the specified holding identity. -*DefaultApi* | [**startMonitorV1**](docs/DefaultApi.md#startmonitorv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor | Start monitoring corda changes (transactions) of given state class -*DefaultApi* | [**stopMonitorV1**](docs/DefaultApi.md#stopmonitorv1) | **DELETE** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor | Stop monitoring corda changes (transactions) of given state class -*DefaultApi* | [**vaultQueryV1**](docs/DefaultApi.md#vaultqueryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query | - - - -## Documentation for Models - - - [org.openapitools.client.models.CPIIDV1](docs/CPIIDV1.md) - - [org.openapitools.client.models.ClearMonitorTransactionsV1Request](docs/ClearMonitorTransactionsV1Request.md) - - [org.openapitools.client.models.ClearMonitorTransactionsV1Response](docs/ClearMonitorTransactionsV1Response.md) - - [org.openapitools.client.models.CordaNodeSshCredentials](docs/CordaNodeSshCredentials.md) - - [org.openapitools.client.models.CordaRpcCredentials](docs/CordaRpcCredentials.md) - - [org.openapitools.client.models.CordaX500Name](docs/CordaX500Name.md) - - [org.openapitools.client.models.CordappDeploymentConfig](docs/CordappDeploymentConfig.md) - - [org.openapitools.client.models.CordappInfo](docs/CordappInfo.md) - - [org.openapitools.client.models.DeployContractJarsBadRequestV1Response](docs/DeployContractJarsBadRequestV1Response.md) - - [org.openapitools.client.models.DeployContractJarsSuccessV1Response](docs/DeployContractJarsSuccessV1Response.md) - - [org.openapitools.client.models.DeployContractJarsV1Request](docs/DeployContractJarsV1Request.md) - - [org.openapitools.client.models.DiagnoseNodeV1Request](docs/DiagnoseNodeV1Request.md) - - [org.openapitools.client.models.DiagnoseNodeV1Response](docs/DiagnoseNodeV1Response.md) - - [org.openapitools.client.models.FlowInvocationType](docs/FlowInvocationType.md) - - [org.openapitools.client.models.FlowStatusV1Responses](docs/FlowStatusV1Responses.md) - - [org.openapitools.client.models.FlowStatusV1ResponsesFlowStatusResponsesInner](docs/FlowStatusV1ResponsesFlowStatusResponsesInner.md) - - [org.openapitools.client.models.FlowV1Error](docs/FlowV1Error.md) - - [org.openapitools.client.models.GetFlowCidV1Request](docs/GetFlowCidV1Request.md) - - [org.openapitools.client.models.GetFlowCidV1Response](docs/GetFlowCidV1Response.md) - - [org.openapitools.client.models.GetMonitorTransactionsV1Request](docs/GetMonitorTransactionsV1Request.md) - - [org.openapitools.client.models.GetMonitorTransactionsV1Response](docs/GetMonitorTransactionsV1Response.md) - - [org.openapitools.client.models.GetMonitorTransactionsV1ResponseTxInner](docs/GetMonitorTransactionsV1ResponseTxInner.md) - - [org.openapitools.client.models.InvokeContractV1Request](docs/InvokeContractV1Request.md) - - [org.openapitools.client.models.InvokeContractV1Response](docs/InvokeContractV1Response.md) - - [org.openapitools.client.models.JarFile](docs/JarFile.md) - - [org.openapitools.client.models.JvmObject](docs/JvmObject.md) - - [org.openapitools.client.models.JvmType](docs/JvmType.md) - - [org.openapitools.client.models.JvmTypeKind](docs/JvmTypeKind.md) - - [org.openapitools.client.models.ListCpiV1Request](docs/ListCpiV1Request.md) - - [org.openapitools.client.models.ListCpiV1Response](docs/ListCpiV1Response.md) - - [org.openapitools.client.models.ListCpiV1ResponseCpisInner](docs/ListCpiV1ResponseCpisInner.md) - - [org.openapitools.client.models.ListCpiV1ResponseCpisInnerCpksInner](docs/ListCpiV1ResponseCpisInnerCpksInner.md) - - [org.openapitools.client.models.ListFlowsV1Request](docs/ListFlowsV1Request.md) - - [org.openapitools.client.models.ListFlowsV1Response](docs/ListFlowsV1Response.md) - - [org.openapitools.client.models.NetworkHostAndPort](docs/NetworkHostAndPort.md) - - [org.openapitools.client.models.NodeDiagnosticInfo](docs/NodeDiagnosticInfo.md) - - [org.openapitools.client.models.NodeInfo](docs/NodeInfo.md) - - [org.openapitools.client.models.Party](docs/Party.md) - - [org.openapitools.client.models.PublicKey](docs/PublicKey.md) - - [org.openapitools.client.models.SHA256](docs/SHA256.md) - - [org.openapitools.client.models.StartFlowV1Request](docs/StartFlowV1Request.md) - - [org.openapitools.client.models.StartFlowV1RequestRequestBody](docs/StartFlowV1RequestRequestBody.md) - - [org.openapitools.client.models.StartFlowV1Response](docs/StartFlowV1Response.md) - - [org.openapitools.client.models.StartMonitorV1Request](docs/StartMonitorV1Request.md) - - [org.openapitools.client.models.StartMonitorV1Response](docs/StartMonitorV1Response.md) - - [org.openapitools.client.models.StopMonitorV1Request](docs/StopMonitorV1Request.md) - - [org.openapitools.client.models.StopMonitorV1Response](docs/StopMonitorV1Response.md) - - [org.openapitools.client.models.VaultQueryV1Request](docs/VaultQueryV1Request.md) - - [org.openapitools.client.models.X500Principal](docs/X500Principal.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index ef8c09c451..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,1149 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.ClearMonitorTransactionsV1Request -import org.openapitools.client.models.ClearMonitorTransactionsV1Response -import org.openapitools.client.models.DeployContractJarsBadRequestV1Response -import org.openapitools.client.models.DeployContractJarsSuccessV1Response -import org.openapitools.client.models.DeployContractJarsV1Request -import org.openapitools.client.models.DiagnoseNodeV1Request -import org.openapitools.client.models.DiagnoseNodeV1Response -import org.openapitools.client.models.FlowStatusV1Responses -import org.openapitools.client.models.GetFlowCidV1Request -import org.openapitools.client.models.GetFlowCidV1Response -import org.openapitools.client.models.GetMonitorTransactionsV1Request -import org.openapitools.client.models.GetMonitorTransactionsV1Response -import org.openapitools.client.models.InvokeContractV1Request -import org.openapitools.client.models.InvokeContractV1Response -import org.openapitools.client.models.ListCpiV1Request -import org.openapitools.client.models.ListCpiV1Response -import org.openapitools.client.models.ListFlowsV1Request -import org.openapitools.client.models.ListFlowsV1Response -import org.openapitools.client.models.NodeInfo -import org.openapitools.client.models.StartFlowV1Request -import org.openapitools.client.models.StartFlowV1Response -import org.openapitools.client.models.StartMonitorV1Request -import org.openapitools.client.models.StartMonitorV1Response -import org.openapitools.client.models.StopMonitorV1Request -import org.openapitools.client.models.StopMonitorV1Response -import org.openapitools.client.models.VaultQueryV1Request - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore. - * - * @param clearMonitorTransactionsV1Request - * @return ClearMonitorTransactionsV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun clearMonitorTransactionsV1(clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request) : ClearMonitorTransactionsV1Response { - val localVarResponse = clearMonitorTransactionsV1WithHttpInfo(clearMonitorTransactionsV1Request = clearMonitorTransactionsV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as ClearMonitorTransactionsV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore. - * - * @param clearMonitorTransactionsV1Request - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun clearMonitorTransactionsV1WithHttpInfo(clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request) : ApiResponse { - val localVariableConfig = clearMonitorTransactionsV1RequestConfig(clearMonitorTransactionsV1Request = clearMonitorTransactionsV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation clearMonitorTransactionsV1 - * - * @param clearMonitorTransactionsV1Request - * @return RequestConfig - */ - fun clearMonitorTransactionsV1RequestConfig(clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request) : RequestConfig { - val localVariableBody = clearMonitorTransactionsV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.DELETE, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). - * - * @param deployContractJarsV1Request - * @return DeployContractJarsSuccessV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun deployContractJarsV1(deployContractJarsV1Request: DeployContractJarsV1Request) : DeployContractJarsSuccessV1Response { - val localVarResponse = deployContractJarsV1WithHttpInfo(deployContractJarsV1Request = deployContractJarsV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DeployContractJarsSuccessV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). - * - * @param deployContractJarsV1Request - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun deployContractJarsV1WithHttpInfo(deployContractJarsV1Request: DeployContractJarsV1Request) : ApiResponse { - val localVariableConfig = deployContractJarsV1RequestConfig(deployContractJarsV1Request = deployContractJarsV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation deployContractJarsV1 - * - * @param deployContractJarsV1Request - * @return RequestConfig - */ - fun deployContractJarsV1RequestConfig(deployContractJarsV1Request: DeployContractJarsV1Request) : RequestConfig { - val localVariableBody = deployContractJarsV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * Responds with diagnostic information about the Corda node - * @param diagnoseNodeV1Request (optional) - * @return DiagnoseNodeV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun diagnoseNodeV1(diagnoseNodeV1Request: DiagnoseNodeV1Request? = null) : DiagnoseNodeV1Response { - val localVarResponse = diagnoseNodeV1WithHttpInfo(diagnoseNodeV1Request = diagnoseNodeV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DiagnoseNodeV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * Responds with diagnostic information about the Corda node - * @param diagnoseNodeV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun diagnoseNodeV1WithHttpInfo(diagnoseNodeV1Request: DiagnoseNodeV1Request?) : ApiResponse { - val localVariableConfig = diagnoseNodeV1RequestConfig(diagnoseNodeV1Request = diagnoseNodeV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation diagnoseNodeV1 - * - * @param diagnoseNodeV1Request (optional) - * @return RequestConfig - */ - fun diagnoseNodeV1RequestConfig(diagnoseNodeV1Request: DiagnoseNodeV1Request?) : RequestConfig { - val localVariableBody = diagnoseNodeV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * This method gets the current status of the specified flow instance. - * - * @param getFlowCidV1Request This method gets the current status of the specified flow instance. - * @return GetFlowCidV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getFlowV1(getFlowCidV1Request: GetFlowCidV1Request) : GetFlowCidV1Response { - val localVarResponse = getFlowV1WithHttpInfo(getFlowCidV1Request = getFlowCidV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetFlowCidV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * This method gets the current status of the specified flow instance. - * - * @param getFlowCidV1Request This method gets the current status of the specified flow instance. - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getFlowV1WithHttpInfo(getFlowCidV1Request: GetFlowCidV1Request) : ApiResponse { - val localVariableConfig = getFlowV1RequestConfig(getFlowCidV1Request = getFlowCidV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getFlowV1 - * - * @param getFlowCidV1Request This method gets the current status of the specified flow instance. - * @return RequestConfig - */ - fun getFlowV1RequestConfig(getFlowCidV1Request: GetFlowCidV1Request) : RequestConfig { - val localVariableBody = getFlowCidV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get transactions for monitored state classes. - * - * @param getMonitorTransactionsV1Request - * @return GetMonitorTransactionsV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getMonitorTransactionsV1(getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request) : GetMonitorTransactionsV1Response { - val localVarResponse = getMonitorTransactionsV1WithHttpInfo(getMonitorTransactionsV1Request = getMonitorTransactionsV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetMonitorTransactionsV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get transactions for monitored state classes. - * - * @param getMonitorTransactionsV1Request - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getMonitorTransactionsV1WithHttpInfo(getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request) : ApiResponse { - val localVariableConfig = getMonitorTransactionsV1RequestConfig(getMonitorTransactionsV1Request = getMonitorTransactionsV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getMonitorTransactionsV1 - * - * @param getMonitorTransactionsV1Request - * @return RequestConfig - */ - fun getMonitorTransactionsV1RequestConfig(getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request) : RequestConfig { - val localVariableBody = getMonitorTransactionsV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get the Prometheus Metrics - * - * @return kotlin.String - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getPrometheusMetricsV1() : kotlin.String { - val localVarResponse = getPrometheusMetricsV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get the Prometheus Metrics - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getPrometheusMetricsV1WithHttpInfo() : ApiResponse { - val localVariableConfig = getPrometheusMetricsV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getPrometheusMetricsV1 - * - * @return RequestConfig - */ - fun getPrometheusMetricsV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Invokes a contract on a Corda ledger (e.g. a flow) - * - * @param invokeContractV1Request - * @return InvokeContractV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun invokeContractV1(invokeContractV1Request: InvokeContractV1Request) : InvokeContractV1Response { - val localVarResponse = invokeContractV1WithHttpInfo(invokeContractV1Request = invokeContractV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as InvokeContractV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Invokes a contract on a Corda ledger (e.g. a flow) - * - * @param invokeContractV1Request - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun invokeContractV1WithHttpInfo(invokeContractV1Request: InvokeContractV1Request) : ApiResponse { - val localVariableConfig = invokeContractV1RequestConfig(invokeContractV1Request = invokeContractV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation invokeContractV1 - * - * @param invokeContractV1Request - * @return RequestConfig - */ - fun invokeContractV1RequestConfig(invokeContractV1Request: InvokeContractV1Request) : RequestConfig { - val localVariableBody = invokeContractV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * List all CPIs uploaded to the cluster - * - * @param listCpiV1Request - * @return ListCpiV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun listCpiV1(listCpiV1Request: ListCpiV1Request) : ListCpiV1Response { - val localVarResponse = listCpiV1WithHttpInfo(listCpiV1Request = listCpiV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as ListCpiV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * List all CPIs uploaded to the cluster - * - * @param listCpiV1Request - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun listCpiV1WithHttpInfo(listCpiV1Request: ListCpiV1Request) : ApiResponse { - val localVariableConfig = listCpiV1RequestConfig(listCpiV1Request = listCpiV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation listCpiV1 - * - * @param listCpiV1Request - * @return RequestConfig - */ - fun listCpiV1RequestConfig(listCpiV1Request: ListCpiV1Request) : RequestConfig { - val localVariableBody = listCpiV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. - * - * @param getFlowCidV1Request This method gets the current status of the specified flow instance. - * @return FlowStatusV1Responses - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun listFlowV1(getFlowCidV1Request: GetFlowCidV1Request) : FlowStatusV1Responses { - val localVarResponse = listFlowV1WithHttpInfo(getFlowCidV1Request = getFlowCidV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as FlowStatusV1Responses - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. - * - * @param getFlowCidV1Request This method gets the current status of the specified flow instance. - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun listFlowV1WithHttpInfo(getFlowCidV1Request: GetFlowCidV1Request) : ApiResponse { - val localVariableConfig = listFlowV1RequestConfig(getFlowCidV1Request = getFlowCidV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation listFlowV1 - * - * @param getFlowCidV1Request This method gets the current status of the specified flow instance. - * @return RequestConfig - */ - fun listFlowV1RequestConfig(getFlowCidV1Request: GetFlowCidV1Request) : RequestConfig { - val localVariableBody = getFlowCidV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * Responds with a list of the flows on the Corda node. - * @param listFlowsV1Request (optional) - * @return ListFlowsV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun listFlowsV1(listFlowsV1Request: ListFlowsV1Request? = null) : ListFlowsV1Response { - val localVarResponse = listFlowsV1WithHttpInfo(listFlowsV1Request = listFlowsV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as ListFlowsV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * Responds with a list of the flows on the Corda node. - * @param listFlowsV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun listFlowsV1WithHttpInfo(listFlowsV1Request: ListFlowsV1Request?) : ApiResponse { - val localVariableConfig = listFlowsV1RequestConfig(listFlowsV1Request = listFlowsV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation listFlowsV1 - * - * @param listFlowsV1Request (optional) - * @return RequestConfig - */ - fun listFlowsV1RequestConfig(listFlowsV1Request: ListFlowsV1Request?) : RequestConfig { - val localVariableBody = listFlowsV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List<NodeInfo> - * @param body (optional) - * @return kotlin.collections.List - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun networkMapV1(body: kotlin.Any? = null) : kotlin.collections.List { - val localVarResponse = networkMapV1WithHttpInfo(body = body) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.List - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List<NodeInfo> - * @param body (optional) - * @return ApiResponse?> - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun networkMapV1WithHttpInfo(body: kotlin.Any?) : ApiResponse?> { - val localVariableConfig = networkMapV1RequestConfig(body = body) - - return request>( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation networkMapV1 - * - * @param body (optional) - * @return RequestConfig - */ - fun networkMapV1RequestConfig(body: kotlin.Any?) : RequestConfig { - val localVariableBody = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * This method starts a new instance for the specified flow for the specified holding identity. - * - * @param startFlowV1Request Request body for starting a flow - * @return StartFlowV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun startFlowV1(startFlowV1Request: StartFlowV1Request) : StartFlowV1Response { - val localVarResponse = startFlowV1WithHttpInfo(startFlowV1Request = startFlowV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as StartFlowV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * This method starts a new instance for the specified flow for the specified holding identity. - * - * @param startFlowV1Request Request body for starting a flow - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun startFlowV1WithHttpInfo(startFlowV1Request: StartFlowV1Request) : ApiResponse { - val localVariableConfig = startFlowV1RequestConfig(startFlowV1Request = startFlowV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation startFlowV1 - * - * @param startFlowV1Request Request body for starting a flow - * @return RequestConfig - */ - fun startFlowV1RequestConfig(startFlowV1Request: StartFlowV1Request) : RequestConfig { - val localVariableBody = startFlowV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Start monitoring corda changes (transactions) of given state class - * - * @param startMonitorV1Request - * @return StartMonitorV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun startMonitorV1(startMonitorV1Request: StartMonitorV1Request) : StartMonitorV1Response { - val localVarResponse = startMonitorV1WithHttpInfo(startMonitorV1Request = startMonitorV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as StartMonitorV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Start monitoring corda changes (transactions) of given state class - * - * @param startMonitorV1Request - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun startMonitorV1WithHttpInfo(startMonitorV1Request: StartMonitorV1Request) : ApiResponse { - val localVariableConfig = startMonitorV1RequestConfig(startMonitorV1Request = startMonitorV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation startMonitorV1 - * - * @param startMonitorV1Request - * @return RequestConfig - */ - fun startMonitorV1RequestConfig(startMonitorV1Request: StartMonitorV1Request) : RequestConfig { - val localVariableBody = startMonitorV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Stop monitoring corda changes (transactions) of given state class - * - * @param stopMonitorV1Request - * @return StopMonitorV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun stopMonitorV1(stopMonitorV1Request: StopMonitorV1Request) : StopMonitorV1Response { - val localVarResponse = stopMonitorV1WithHttpInfo(stopMonitorV1Request = stopMonitorV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as StopMonitorV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Stop monitoring corda changes (transactions) of given state class - * - * @param stopMonitorV1Request - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun stopMonitorV1WithHttpInfo(stopMonitorV1Request: StopMonitorV1Request) : ApiResponse { - val localVariableConfig = stopMonitorV1RequestConfig(stopMonitorV1Request = stopMonitorV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation stopMonitorV1 - * - * @param stopMonitorV1Request - * @return RequestConfig - */ - fun stopMonitorV1RequestConfig(stopMonitorV1Request: StopMonitorV1Request) : RequestConfig { - val localVariableBody = stopMonitorV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.DELETE, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * Queryes the vault service for state references based on JVM class names. Custom filters are not supported by this endpoint. - * @param vaultQueryV1Request - * @return kotlin.Any - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun vaultQueryV1(vaultQueryV1Request: VaultQueryV1Request) : kotlin.Any { - val localVarResponse = vaultQueryV1WithHttpInfo(vaultQueryV1Request = vaultQueryV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Any - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * Queryes the vault service for state references based on JVM class names. Custom filters are not supported by this endpoint. - * @param vaultQueryV1Request - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun vaultQueryV1WithHttpInfo(vaultQueryV1Request: VaultQueryV1Request) : ApiResponse { - val localVariableConfig = vaultQueryV1RequestConfig(vaultQueryV1Request = vaultQueryV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation vaultQueryV1 - * - * @param vaultQueryV1Request - * @return RequestConfig - */ - fun vaultQueryV1RequestConfig(vaultQueryV1Request: VaultQueryV1Request) : RequestConfig { - val localVariableBody = vaultQueryV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CPIIDV1.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CPIIDV1.kt deleted file mode 100644 index a8d6a8ed1d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CPIIDV1.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param name - * @param version - * @param signerSummaryHash - */ - - -data class CPIIDV1 ( - - @Json(name = "name") - val name: kotlin.String, - - @Json(name = "version") - val version: kotlin.String, - - @Json(name = "signerSummaryHash") - val signerSummaryHash: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClearMonitorTransactionsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClearMonitorTransactionsV1Request.kt deleted file mode 100644 index 3d127aa1e6..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClearMonitorTransactionsV1Request.kt +++ /dev/null @@ -1,45 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param clientAppId ID of a client application that wants to monitor the state changes - * @param stateFullClassName The fully qualified name of the Corda state to monitor - * @param txIndexes - */ - - -data class ClearMonitorTransactionsV1Request ( - - /* ID of a client application that wants to monitor the state changes */ - @Json(name = "clientAppId") - val clientAppId: kotlin.String, - - /* The fully qualified name of the Corda state to monitor */ - @Json(name = "stateFullClassName") - val stateFullClassName: kotlin.String, - - @Json(name = "txIndexes") - val txIndexes: kotlin.collections.List = arrayListOf() - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClearMonitorTransactionsV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClearMonitorTransactionsV1Response.kt deleted file mode 100644 index 89b9cc82dc..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClearMonitorTransactionsV1Response.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param success Flag set to true if operation completed correctly. - * @param msg Message describing operation status or any errors that occurred. - */ - - -data class ClearMonitorTransactionsV1Response ( - - /* Flag set to true if operation completed correctly. */ - @Json(name = "success") - val success: kotlin.Boolean, - - /* Message describing operation status or any errors that occurred. */ - @Json(name = "msg") - val msg: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordaNodeSshCredentials.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordaNodeSshCredentials.kt deleted file mode 100644 index 780361e174..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordaNodeSshCredentials.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param hostKeyEntry - * @param username - * @param password - * @param hostname - * @param port - */ - - -data class CordaNodeSshCredentials ( - - @Json(name = "hostKeyEntry") - val hostKeyEntry: kotlin.String, - - @Json(name = "username") - val username: kotlin.String, - - @Json(name = "password") - val password: kotlin.String, - - @Json(name = "hostname") - val hostname: kotlin.String, - - @Json(name = "port") - val port: kotlin.Int - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordaRpcCredentials.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordaRpcCredentials.kt deleted file mode 100644 index 8b2c948093..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordaRpcCredentials.kt +++ /dev/null @@ -1,47 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param hostname - * @param port - * @param username - * @param password - */ - - -data class CordaRpcCredentials ( - - @Json(name = "hostname") - val hostname: kotlin.String, - - @Json(name = "port") - val port: kotlin.Int, - - @Json(name = "username") - val username: kotlin.String, - - @Json(name = "password") - val password: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordaX500Name.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordaX500Name.kt deleted file mode 100644 index 240e68f640..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordaX500Name.kt +++ /dev/null @@ -1,60 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.X500Principal - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param organisation - * @param locality - * @param country - * @param x500Principal - * @param commonName - * @param organisationUnit - * @param state - */ - - -data class CordaX500Name ( - - @Json(name = "organisation") - val organisation: kotlin.String, - - @Json(name = "locality") - val locality: kotlin.String, - - @Json(name = "country") - val country: kotlin.String, - - @Json(name = "x500Principal") - val x500Principal: X500Principal, - - @Json(name = "commonName") - val commonName: kotlin.String? = null, - - @Json(name = "organisationUnit") - val organisationUnit: kotlin.String? = null, - - @Json(name = "state") - val state: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordappDeploymentConfig.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordappDeploymentConfig.kt deleted file mode 100644 index 8934cdee63..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordappDeploymentConfig.kt +++ /dev/null @@ -1,61 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CordaNodeSshCredentials -import org.openapitools.client.models.CordaRpcCredentials - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sshCredentials - * @param rpcCredentials - * @param cordaNodeStartCmd The shell command to execute in order to start back up a Corda node after having placed new jars in the cordapp directory of said node. - * @param cordappDir The absolute file system path where the Corda Node is expecting deployed Cordapp jar files to be placed. - * @param cordaJarPath The absolute file system path where the corda.jar file of the node can be found. This is used to execute database schema migrations where applicable (H2 database in use in development environments). - * @param nodeBaseDirPath The absolute file system path where the base directory of the Corda node can be found. This is used to pass in to corda.jar when being invoked for certain tasks such as executing database schema migrations for a deployed contract. - */ - - -data class CordappDeploymentConfig ( - - @Json(name = "sshCredentials") - val sshCredentials: CordaNodeSshCredentials, - - @Json(name = "rpcCredentials") - val rpcCredentials: CordaRpcCredentials, - - /* The shell command to execute in order to start back up a Corda node after having placed new jars in the cordapp directory of said node. */ - @Json(name = "cordaNodeStartCmd") - val cordaNodeStartCmd: kotlin.String, - - /* The absolute file system path where the Corda Node is expecting deployed Cordapp jar files to be placed. */ - @Json(name = "cordappDir") - val cordappDir: kotlin.String, - - /* The absolute file system path where the corda.jar file of the node can be found. This is used to execute database schema migrations where applicable (H2 database in use in development environments). */ - @Json(name = "cordaJarPath") - val cordaJarPath: kotlin.String, - - /* The absolute file system path where the base directory of the Corda node can be found. This is used to pass in to corda.jar when being invoked for certain tasks such as executing database schema migrations for a deployed contract. */ - @Json(name = "nodeBaseDirPath") - val nodeBaseDirPath: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordappInfo.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordappInfo.kt deleted file mode 100644 index 6e1c398171..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CordappInfo.kt +++ /dev/null @@ -1,76 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.SHA256 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * A CordappInfo describes a single CorDapp currently installed on the node - * - * @param jarHash - * @param licence The name of the licence this CorDapp is released under - * @param minimumPlatformVersion The minimum platform version the node must be at for the CorDapp to run - * @param name The name of the JAR file that defines the CorDapp - * @param shortName The name of the CorDapp - * @param targetPlatformVersion The target platform version this CorDapp has been tested against - * @param type A description of what sort of CorDapp this is - either a contract, workflow, or a combination. - * @param vendor The vendor of this CorDapp - * @param version The version of this CorDapp - */ - - -data class CordappInfo ( - - @Json(name = "jarHash") - val jarHash: SHA256, - - /* The name of the licence this CorDapp is released under */ - @Json(name = "licence") - val licence: kotlin.String, - - /* The minimum platform version the node must be at for the CorDapp to run */ - @Json(name = "minimumPlatformVersion") - val minimumPlatformVersion: kotlin.Int, - - /* The name of the JAR file that defines the CorDapp */ - @Json(name = "name") - val name: kotlin.String, - - /* The name of the CorDapp */ - @Json(name = "shortName") - val shortName: kotlin.String, - - /* The target platform version this CorDapp has been tested against */ - @Json(name = "targetPlatformVersion") - val targetPlatformVersion: kotlin.Int, - - /* A description of what sort of CorDapp this is - either a contract, workflow, or a combination. */ - @Json(name = "type") - val type: kotlin.String, - - /* The vendor of this CorDapp */ - @Json(name = "vendor") - val vendor: kotlin.String, - - /* The version of this CorDapp */ - @Json(name = "version") - val version: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractJarsBadRequestV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractJarsBadRequestV1Response.kt deleted file mode 100644 index 2ad876806b..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractJarsBadRequestV1Response.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param errors - */ - - -data class DeployContractJarsBadRequestV1Response ( - - @Json(name = "errors") - val errors: kotlin.collections.List - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractJarsSuccessV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractJarsSuccessV1Response.kt deleted file mode 100644 index 57b34ab72d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractJarsSuccessV1Response.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param deployedJarFiles - */ - - -data class DeployContractJarsSuccessV1Response ( - - @Json(name = "deployedJarFiles") - val deployedJarFiles: kotlin.collections.List - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractJarsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractJarsV1Request.kt deleted file mode 100644 index fc8ff0fc6c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractJarsV1Request.kt +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CordappDeploymentConfig -import org.openapitools.client.models.JarFile - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param cordappDeploymentConfigs The list of deployment configurations pointing to the nodes where the provided cordapp jar files are to be deployed . - * @param jarFiles - */ - - -data class DeployContractJarsV1Request ( - - /* The list of deployment configurations pointing to the nodes where the provided cordapp jar files are to be deployed . */ - @Json(name = "cordappDeploymentConfigs") - val cordappDeploymentConfigs: kotlin.collections.List = arrayListOf(), - - @Json(name = "jarFiles") - val jarFiles: kotlin.collections.List - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DiagnoseNodeV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DiagnoseNodeV1Request.kt deleted file mode 100644 index 52c4f3f8eb..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DiagnoseNodeV1Request.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param nodeIds Optional property specifying which Corda Node should be the one being diagnosed in case the Connector has multiple connections established for different nodes (which is not yet a supported feature, but we want to keep this possibility open for the future). - */ - - -data class DiagnoseNodeV1Request ( - - /* Optional property specifying which Corda Node should be the one being diagnosed in case the Connector has multiple connections established for different nodes (which is not yet a supported feature, but we want to keep this possibility open for the future). */ - @Json(name = "nodeIds") - val nodeIds: kotlin.collections.List? = arrayListOf() - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DiagnoseNodeV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DiagnoseNodeV1Response.kt deleted file mode 100644 index 27c49cd557..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DiagnoseNodeV1Response.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.NodeDiagnosticInfo - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param nodeDiagnosticInfo - */ - - -data class DiagnoseNodeV1Response ( - - @Json(name = "nodeDiagnosticInfo") - val nodeDiagnosticInfo: NodeDiagnosticInfo - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowInvocationType.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowInvocationType.kt deleted file mode 100644 index 6082e2e929..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowInvocationType.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Determines which flow starting method will be used on the back-end when invoking the flow. Based on the value here the plugin back-end might invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() method. Streamed responses are aggregated and returned in a single response to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. do. - * - * Values: tRACKEDFLOWDYNAMIC,fLOWDYNAMIC - */ - -@JsonClass(generateAdapter = false) -enum class FlowInvocationType(val value: kotlin.String) { - - @Json(name = "TRACKED_FLOW_DYNAMIC") - tRACKEDFLOWDYNAMIC("TRACKED_FLOW_DYNAMIC"), - - @Json(name = "FLOW_DYNAMIC") - fLOWDYNAMIC("FLOW_DYNAMIC"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is FlowInvocationType) "$data" else null - - /** - * Returns a valid [FlowInvocationType] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): FlowInvocationType? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1Responses.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1Responses.kt deleted file mode 100644 index ec65d761cf..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1Responses.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FlowStatusV1ResponsesFlowStatusResponsesInner - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param flowStatusResponses - */ - - -data class FlowStatusV1Responses ( - - @Json(name = "flowStatusResponses") - val flowStatusResponses: kotlin.collections.List? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1ResponsesFlowStatusResponsesInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1ResponsesFlowStatusResponsesInner.kt deleted file mode 100644 index 8e97285f91..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1ResponsesFlowStatusResponsesInner.kt +++ /dev/null @@ -1,60 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FlowV1Error - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param clientRequestId - * @param flowError - * @param flowId - * @param flowResult - * @param flowStatus - * @param holdingIDShortHash - * @param timestamp - */ - - -data class FlowStatusV1ResponsesFlowStatusResponsesInner ( - - @Json(name = "clientRequestId") - val clientRequestId: kotlin.String? = null, - - @Json(name = "flowError") - val flowError: FlowV1Error? = null, - - @Json(name = "flowId") - val flowId: kotlin.String? = null, - - @Json(name = "flowResult") - val flowResult: kotlin.String? = null, - - @Json(name = "flowStatus") - val flowStatus: kotlin.String? = null, - - @Json(name = "holdingIDShortHash") - val holdingIDShortHash: kotlin.String? = null, - - @Json(name = "timestamp") - val timestamp: java.time.OffsetDateTime? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowV1Error.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowV1Error.kt deleted file mode 100644 index 937ef910a9..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowV1Error.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param message - * @param type - */ - - -data class FlowV1Error ( - - @Json(name = "message") - val message: kotlin.String, - - @Json(name = "type") - val type: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Request.kt deleted file mode 100644 index 2a4ca31b0f..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Request.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * This method gets the current status of the specified flow instance. - * - * @param username - * @param password - * @param rejectUnauthorized - * @param holdingIDShortHash - * @param clientRequestId - */ - - -data class GetFlowCidV1Request ( - - @Json(name = "username") - val username: kotlin.String, - - @Json(name = "password") - val password: kotlin.String, - - @Json(name = "rejectUnauthorized") - val rejectUnauthorized: kotlin.Boolean, - - @Json(name = "holdingIDShortHash") - val holdingIDShortHash: kotlin.String? = null, - - @Json(name = "clientRequestId") - val clientRequestId: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Response.kt deleted file mode 100644 index 4a3890b727..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Response.kt +++ /dev/null @@ -1,60 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FlowV1Error - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param flowStatus - * @param holdingIDShortHash - * @param timestamp - * @param clientRequestId - * @param flowError - * @param flowId - * @param flowResult - */ - - -data class GetFlowCidV1Response ( - - @Json(name = "flowStatus") - val flowStatus: kotlin.String, - - @Json(name = "holdingIDShortHash") - val holdingIDShortHash: kotlin.String, - - @Json(name = "timestamp") - val timestamp: java.time.OffsetDateTime, - - @Json(name = "clientRequestId") - val clientRequestId: kotlin.String? = null, - - @Json(name = "flowError") - val flowError: FlowV1Error? = null, - - @Json(name = "flowId") - val flowId: kotlin.String? = null, - - @Json(name = "flowResult") - val flowResult: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1Request.kt deleted file mode 100644 index cd51f7b19c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1Request.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param clientAppId ID of a client application that wants to monitor the state changes - * @param stateFullClassName The fully qualified name of the Corda state to monitor - */ - - -data class GetMonitorTransactionsV1Request ( - - /* ID of a client application that wants to monitor the state changes */ - @Json(name = "clientAppId") - val clientAppId: kotlin.String, - - /* The fully qualified name of the Corda state to monitor */ - @Json(name = "stateFullClassName") - val stateFullClassName: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1Response.kt deleted file mode 100644 index 03347f3464..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1Response.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.GetMonitorTransactionsV1ResponseTxInner - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param success Flag set to true if operation completed correctly. - * @param msg Message describing operation status or any errors that occurred. - * @param stateFullClassName The fully qualified name of the Corda state to monitor - * @param tx - */ - - -data class GetMonitorTransactionsV1Response ( - - /* Flag set to true if operation completed correctly. */ - @Json(name = "success") - val success: kotlin.Boolean, - - /* Message describing operation status or any errors that occurred. */ - @Json(name = "msg") - val msg: kotlin.String, - - /* The fully qualified name of the Corda state to monitor */ - @Json(name = "stateFullClassName") - val stateFullClassName: kotlin.String? = null, - - @Json(name = "tx") - val tx: kotlin.collections.List? = arrayListOf() - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1ResponseTxInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1ResponseTxInner.kt deleted file mode 100644 index cc1007bf66..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1ResponseTxInner.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param index - * @param `data` - */ - - -data class GetMonitorTransactionsV1ResponseTxInner ( - - @Json(name = "index") - val index: kotlin.String? = null, - - @Json(name = "data") - val `data`: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InvokeContractV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InvokeContractV1Request.kt deleted file mode 100644 index ac610cfcd3..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InvokeContractV1Request.kt +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FlowInvocationType -import org.openapitools.client.models.JvmObject - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param flowFullClassName The fully qualified name of the Corda flow to invoke - * @param flowInvocationType - * @param params The list of arguments to pass in to the contract method being invoked. - * @param timeoutMs The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. - */ - - -data class InvokeContractV1Request ( - - /* The fully qualified name of the Corda flow to invoke */ - @Json(name = "flowFullClassName") - val flowFullClassName: kotlin.String, - - @Json(name = "flowInvocationType") - val flowInvocationType: FlowInvocationType, - - /* The list of arguments to pass in to the contract method being invoked. */ - @Json(name = "params") - val params: kotlin.collections.List = arrayListOf(), - - /* The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. */ - @Json(name = "timeoutMs") - val timeoutMs: kotlin.Int? = 60000 - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InvokeContractV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InvokeContractV1Response.kt deleted file mode 100644 index 435c2ed826..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/InvokeContractV1Response.kt +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param success - * @param callOutput Data returned from the JVM when no transaction is running - * @param flowId The id for the flow handle - * @param transactionId The net.corda.core.flows.StateMachineRunId value returned by the flow execution. - * @param progress An array of strings representing the aggregated stream of progress updates provided by a *tracked* flow invocation. If the flow invocation was not tracked, this array is still returned, but as empty. - */ - - -data class InvokeContractV1Response ( - - @Json(name = "success") - val success: kotlin.Boolean, - - /* Data returned from the JVM when no transaction is running */ - @Json(name = "callOutput") - val callOutput: kotlin.Any, - - /* The id for the flow handle */ - @Json(name = "flowId") - val flowId: kotlin.String, - - /* The net.corda.core.flows.StateMachineRunId value returned by the flow execution. */ - @Json(name = "transactionId") - val transactionId: kotlin.String? = null, - - /* An array of strings representing the aggregated stream of progress updates provided by a *tracked* flow invocation. If the flow invocation was not tracked, this array is still returned, but as empty. */ - @Json(name = "progress") - val progress: kotlin.collections.List? = arrayListOf() - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JarFile.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JarFile.kt deleted file mode 100644 index bb62d548a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JarFile.kt +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param filename - * @param hasDbMigrations Indicates whether the cordapp jar in question contains any embedded migrations that Cactus can/should execute between copying the jar into the cordapp directory and starting the node back up. - * @param contentBase64 - */ - - -data class JarFile ( - - @Json(name = "filename") - val filename: kotlin.String, - - /* Indicates whether the cordapp jar in question contains any embedded migrations that Cactus can/should execute between copying the jar into the cordapp directory and starting the node back up. */ - @Json(name = "hasDbMigrations") - val hasDbMigrations: kotlin.Boolean, - - @Json(name = "contentBase64") - val contentBase64: kotlin.String - -) : kotlin.collections.HashMap() - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JvmObject.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JvmObject.kt deleted file mode 100644 index 80fa196c70..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JvmObject.kt +++ /dev/null @@ -1,49 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.JvmType -import org.openapitools.client.models.JvmTypeKind - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Can represent JVM primitive and reference types as well. The jvmTypeKind field indicates which one is being stored. If the jvmTypeKind field is set to REFERENCE then the jvmCtorArgs array is expected to be filled, otherwise (e.g. PRIMITIVE jvmTypeKind) it is expected that the primitiveValue property is filled with a primitive data type supported by the JSON standard such as strings, booleans, numbers, etc. - * - * @param jvmTypeKind - * @param jvmType - * @param primitiveValue - * @param jvmCtorArgs - */ - - -data class JvmObject ( - - @Json(name = "jvmTypeKind") - val jvmTypeKind: JvmTypeKind, - - @Json(name = "jvmType") - val jvmType: JvmType, - - @Json(name = "primitiveValue") - val primitiveValue: kotlin.Any? = null, - - @Json(name = "jvmCtorArgs") - val jvmCtorArgs: kotlin.collections.List? = arrayListOf() - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JvmType.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JvmType.kt deleted file mode 100644 index 68bd762e6f..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JvmType.kt +++ /dev/null @@ -1,45 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.JvmObject - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Represents a reference to a JVM type (such as a Java class) - * - * @param fqClassName - * @param constructorName This parameter is used to specify that the function used to construct this JvmType is not a constructor function but instead is a factory function. Setting this parameter will cause the plugin to look up methods of the class denoted by fqClassName instead of its constructors. - * @param invocationTarget - */ - - -data class JvmType ( - - @Json(name = "fqClassName") - val fqClassName: kotlin.String, - - /* This parameter is used to specify that the function used to construct this JvmType is not a constructor function but instead is a factory function. Setting this parameter will cause the plugin to look up methods of the class denoted by fqClassName instead of its constructors. */ - @Json(name = "constructorName") - val constructorName: kotlin.String? = null, - - @Json(name = "invocationTarget") - val invocationTarget: JvmObject? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JvmTypeKind.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JvmTypeKind.kt deleted file mode 100644 index 5028372e48..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/JvmTypeKind.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * Values: pRIMITIVE,rEFERENCE - */ - -@JsonClass(generateAdapter = false) -enum class JvmTypeKind(val value: kotlin.String) { - - @Json(name = "PRIMITIVE") - pRIMITIVE("PRIMITIVE"), - - @Json(name = "REFERENCE") - rEFERENCE("REFERENCE"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is JvmTypeKind) "$data" else null - - /** - * Returns a valid [JvmTypeKind] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): JvmTypeKind? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Request.kt deleted file mode 100644 index d89cc00789..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Request.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param username - * @param password - * @param rejectUnauthorized - */ - - -data class ListCpiV1Request ( - - @Json(name = "username") - val username: kotlin.String, - - @Json(name = "password") - val password: kotlin.String, - - @Json(name = "rejectUnauthorized") - val rejectUnauthorized: kotlin.Boolean - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Response.kt deleted file mode 100644 index cdccb81ee1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Response.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.ListCpiV1ResponseCpisInner - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param cpis - */ - - -data class ListCpiV1Response ( - - @Json(name = "cpis") - val cpis: kotlin.collections.List? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInner.kt deleted file mode 100644 index 6fe2958dc9..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInner.kt +++ /dev/null @@ -1,57 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CPIIDV1 -import org.openapitools.client.models.ListCpiV1ResponseCpisInnerCpksInner - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param cpiFileChecksum - * @param cpiFileFullChecksum - * @param cpks - * @param groupPolicy - * @param id - * @param timestamp - */ - - -data class ListCpiV1ResponseCpisInner ( - - @Json(name = "cpiFileChecksum") - val cpiFileChecksum: kotlin.String? = null, - - @Json(name = "cpiFileFullChecksum") - val cpiFileFullChecksum: kotlin.String? = null, - - @Json(name = "cpks") - val cpks: kotlin.collections.List? = null, - - @Json(name = "groupPolicy") - val groupPolicy: kotlin.String? = null, - - @Json(name = "id") - val id: CPIIDV1? = null, - - @Json(name = "timestamp") - val timestamp: java.time.OffsetDateTime? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInnerCpksInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInnerCpksInner.kt deleted file mode 100644 index ee0b917e36..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInnerCpksInner.kt +++ /dev/null @@ -1,56 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CPIIDV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param hash - * @param id - * @param libraries - * @param mainBundle - * @param timestamp - * @param type - */ - - -data class ListCpiV1ResponseCpisInnerCpksInner ( - - @Json(name = "hash") - val hash: kotlin.String? = null, - - @Json(name = "id") - val id: CPIIDV1? = null, - - @Json(name = "libraries") - val libraries: kotlin.collections.List? = null, - - @Json(name = "mainBundle") - val mainBundle: kotlin.String? = null, - - @Json(name = "timestamp") - val timestamp: java.time.OffsetDateTime? = null, - - @Json(name = "type") - val type: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListFlowsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListFlowsV1Request.kt deleted file mode 100644 index acd8dfd762..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListFlowsV1Request.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param filter - */ - - -data class ListFlowsV1Request ( - - @Json(name = "filter") - val filter: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListFlowsV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListFlowsV1Response.kt deleted file mode 100644 index 5e4a1d7a40..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListFlowsV1Response.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param flowNames An array of strings storing the names of the flows as returned by the flowList Corda RPC. - */ - - -data class ListFlowsV1Response ( - - /* An array of strings storing the names of the flows as returned by the flowList Corda RPC. */ - @Json(name = "flowNames") - val flowNames: kotlin.collections.List = arrayListOf() - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NetworkHostAndPort.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NetworkHostAndPort.kt deleted file mode 100644 index dbe858026c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NetworkHostAndPort.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param host - * @param port - */ - - -data class NetworkHostAndPort ( - - @Json(name = "host") - val host: kotlin.String, - - @Json(name = "port") - val port: java.math.BigDecimal - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NodeDiagnosticInfo.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NodeDiagnosticInfo.kt deleted file mode 100644 index 1b057ae57e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NodeDiagnosticInfo.kt +++ /dev/null @@ -1,57 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CordappInfo - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * A NodeDiagnosticInfo holds information about the current node version. - * - * @param cordapps A list of CorDapps currently installed on this node - * @param platformVersion The platform version of this node. This number represents a released API version, and should be used to make functionality decisions (e.g. enabling an app feature only if an underlying platform feature exists) - * @param revision The git commit hash this node was built from - * @param vendor The vendor of this node - * @param version The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note that this string is effectively freeform, and so should only be used for providing diagnostic information. It should not be used to make functionality decisions (the platformVersion is a better fit for this). - */ - - -data class NodeDiagnosticInfo ( - - /* A list of CorDapps currently installed on this node */ - @Json(name = "cordapps") - val cordapps: kotlin.collections.List, - - /* The platform version of this node. This number represents a released API version, and should be used to make functionality decisions (e.g. enabling an app feature only if an underlying platform feature exists) */ - @Json(name = "platformVersion") - val platformVersion: kotlin.Int, - - /* The git commit hash this node was built from */ - @Json(name = "revision") - val revision: kotlin.String, - - /* The vendor of this node */ - @Json(name = "vendor") - val vendor: kotlin.String, - - /* The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note that this string is effectively freeform, and so should only be used for providing diagnostic information. It should not be used to make functionality decisions (the platformVersion is a better fit for this). */ - @Json(name = "version") - val version: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NodeInfo.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NodeInfo.kt deleted file mode 100644 index 4174aecb4d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/NodeInfo.kt +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.NetworkHostAndPort -import org.openapitools.client.models.Party - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param addresses - * @param platformVersion - * @param serial - * @param legalIdentities - * @param legalIdentitiesAndCerts - */ - - -data class NodeInfo ( - - @Json(name = "addresses") - val addresses: kotlin.collections.List, - - @Json(name = "platformVersion") - val platformVersion: kotlin.Int, - - @Json(name = "serial") - val serial: java.math.BigDecimal, - - @Json(name = "legalIdentities") - val legalIdentities: kotlin.collections.List, - - @Json(name = "legalIdentitiesAndCerts") - val legalIdentitiesAndCerts: kotlin.collections.List - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Party.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Party.kt deleted file mode 100644 index f042e13306..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/Party.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CordaX500Name -import org.openapitools.client.models.PublicKey - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param name - * @param owningKey - */ - - -data class Party ( - - @Json(name = "name") - val name: CordaX500Name, - - @Json(name = "owningKey") - val owningKey: PublicKey - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PublicKey.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PublicKey.kt deleted file mode 100644 index 0f4e6e4afa..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PublicKey.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * An instance of a java.security.PublicKey (which is an interface) implementation such as org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl - * - * @param algorithm - * @param format - * @param encoded - */ - - -data class PublicKey ( - - @Json(name = "algorithm") - val algorithm: kotlin.String, - - @Json(name = "format") - val format: kotlin.String, - - @Json(name = "encoded") - val encoded: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SHA256.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SHA256.kt deleted file mode 100644 index c07eae447f..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SHA256.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * SHA-256 is part of the SHA-2 hash function family. Generated hash is fixed size, 256-bits (32-bytes). - * - * @param bytes - * @param offset - * @param propertySize - */ - - -data class SHA256 ( - - @Json(name = "bytes") - val bytes: kotlin.String, - - @Json(name = "offset") - val offset: kotlin.Int, - - @Json(name = "size") - val propertySize: kotlin.Int - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Request.kt deleted file mode 100644 index 9b0e6bdb56..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Request.kt +++ /dev/null @@ -1,60 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.StartFlowV1RequestRequestBody - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * This method starts a new instance for the specified flow for the specified holding identity. - * - * @param username - * @param password - * @param rejectUnauthorized - * @param clientRequestId - * @param flowClassName - * @param requestBody - * @param holdingIDShortHash - */ - - -data class StartFlowV1Request ( - - @Json(name = "username") - val username: kotlin.String, - - @Json(name = "password") - val password: kotlin.String, - - @Json(name = "rejectUnauthorized") - val rejectUnauthorized: kotlin.Boolean, - - @Json(name = "clientRequestId") - val clientRequestId: kotlin.String, - - @Json(name = "flowClassName") - val flowClassName: kotlin.String, - - @Json(name = "requestBody") - val requestBody: StartFlowV1RequestRequestBody, - - @Json(name = "holdingIDShortHash") - val holdingIDShortHash: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1RequestRequestBody.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1RequestRequestBody.kt deleted file mode 100644 index 2fe79b7768..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1RequestRequestBody.kt +++ /dev/null @@ -1,47 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param chatName - * @param otherMember - * @param message - * @param numberOfRecords - */ - - -data class StartFlowV1RequestRequestBody ( - - @Json(name = "chatName") - val chatName: kotlin.String? = null, - - @Json(name = "otherMember") - val otherMember: kotlin.String? = null, - - @Json(name = "message") - val message: kotlin.String? = null, - - @Json(name = "numberOfRecords") - val numberOfRecords: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Response.kt deleted file mode 100644 index 359b707968..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Response.kt +++ /dev/null @@ -1,60 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FlowV1Error - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param flowStatus - * @param holdingIDShortHash - * @param timestamp - * @param clientRequestId - * @param flowError - * @param flowId - * @param flowResult - */ - - -data class StartFlowV1Response ( - - @Json(name = "flowStatus") - val flowStatus: kotlin.String, - - @Json(name = "holdingIDShortHash") - val holdingIDShortHash: kotlin.String, - - @Json(name = "timestamp") - val timestamp: java.time.OffsetDateTime, - - @Json(name = "clientRequestId") - val clientRequestId: kotlin.String? = null, - - @Json(name = "flowError") - val flowError: FlowV1Error? = null, - - @Json(name = "flowId") - val flowId: kotlin.String? = null, - - @Json(name = "flowResult") - val flowResult: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartMonitorV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartMonitorV1Request.kt deleted file mode 100644 index 83228ea8d1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartMonitorV1Request.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param clientAppId ID of a client application that wants to monitor the state changes - * @param stateFullClassName The fully qualified name of the Corda state to monitor - */ - - -data class StartMonitorV1Request ( - - /* ID of a client application that wants to monitor the state changes */ - @Json(name = "clientAppId") - val clientAppId: kotlin.String, - - /* The fully qualified name of the Corda state to monitor */ - @Json(name = "stateFullClassName") - val stateFullClassName: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartMonitorV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartMonitorV1Response.kt deleted file mode 100644 index feaac0a5d0..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartMonitorV1Response.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param success Flag set to true if monitoring started correctly. - * @param msg Message describing operation status or any errors that occurred. - */ - - -data class StartMonitorV1Response ( - - /* Flag set to true if monitoring started correctly. */ - @Json(name = "success") - val success: kotlin.Boolean, - - /* Message describing operation status or any errors that occurred. */ - @Json(name = "msg") - val msg: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StopMonitorV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StopMonitorV1Request.kt deleted file mode 100644 index adc76d3856..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StopMonitorV1Request.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param clientAppId ID of a client application that wants to monitor the state changes - * @param stateFullClassName The fully qualified name of the Corda state to monitor - */ - - -data class StopMonitorV1Request ( - - /* ID of a client application that wants to monitor the state changes */ - @Json(name = "clientAppId") - val clientAppId: kotlin.String, - - /* The fully qualified name of the Corda state to monitor */ - @Json(name = "stateFullClassName") - val stateFullClassName: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StopMonitorV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StopMonitorV1Response.kt deleted file mode 100644 index 90dcab2015..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StopMonitorV1Response.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param success Flag set to true if operation completed correctly. - * @param msg Message describing operation status or any errors that occurred. - */ - - -data class StopMonitorV1Response ( - - /* Flag set to true if operation completed correctly. */ - @Json(name = "success") - val success: kotlin.Boolean, - - /* Message describing operation status or any errors that occurred. */ - @Json(name = "msg") - val msg: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/VaultQueryV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/VaultQueryV1Request.kt deleted file mode 100644 index 79546d1d71..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/VaultQueryV1Request.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param contractStateType Valid, fully qualified JVM class name which will be fed into Class.forName(...) - */ - - -data class VaultQueryV1Request ( - - /* Valid, fully qualified JVM class name which will be fed into Class.forName(...) */ - @Json(name = "contractStateType") - val contractStateType: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/X500Principal.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/X500Principal.kt deleted file mode 100644 index f7c4067b5e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/X500Principal.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param name - * @param encoded Base64 encoded public key - */ - - -data class X500Principal ( - - @Json(name = "name") - val name: kotlin.String, - - /* Base64 encoded public key */ - @Json(name = "encoded") - val encoded: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/api-client/corda-api-client.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/api-client/corda-api-client.ts deleted file mode 100644 index ce0ef39688..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/api-client/corda-api-client.ts +++ /dev/null @@ -1,238 +0,0 @@ -import { Observable, ReplaySubject } from "rxjs"; -import { finalize, share } from "rxjs/operators"; -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, -} from "@hyperledger/cactus-common"; -import { ISocketApiClient } from "@hyperledger/cactus-core-api"; -import { - DefaultApi, - GetMonitorTransactionsV1ResponseTxInner, -} from "../generated/openapi/typescript-axios"; -import { Configuration } from "../generated/openapi/typescript-axios/configuration"; - -const DEFAULT_POLL_RATE_MS = 5000; - -type CordaBlock = GetMonitorTransactionsV1ResponseTxInner; - -/** - * Options for CordaApiClient.watchBlocksV1 method. - */ -export type watchBlocksV1Options = { - readonly stateFullClassName: string; - readonly clientAppId: string; - readonly pollRate?: number; -}; - -export class CordaApiClientOptions extends Configuration { - readonly logLevel?: LogLevelDesc; -} - -/** - * ApiClient to call remote Corda connector. - */ -export class CordaApiClient - extends DefaultApi - implements ISocketApiClient -{ - public static readonly CLASS_NAME = "CordaApiClient"; - - private readonly log: Logger; - - public get className(): string { - return CordaApiClient.CLASS_NAME; - } - - constructor(public readonly options: CordaApiClientOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.log.debug(`Created ${this.className} OK.`); - this.log.debug(`basePath=${this.options.basePath}`); - } - - /** - * Send low-level HTTP API startMonitorV1 to the connector to start monitoring queue for specified client. - * Errors are pushed to RxJs subject. - * - * @param subject RxJs subject associated with this monitoring request. - * @param clientAppId Client application ID to identify monitoring queue on the connector. - * @param stateName Corda state to monitor. - */ - private async sendStartMonitorRequest( - subject: ReplaySubject, - clientAppId: string, - stateName: string, - ) { - const reportError = (err: any) => { - this.log.warn("Error in startMonitorV1:", err); - subject.error(`startMonitorV1 for '${stateName}' transactions failed`); - }; - - try { - const startMonRes = await this.startMonitorV1({ - clientAppId: clientAppId, - stateFullClassName: stateName, - }); - - if (startMonRes.status != 200 || !startMonRes.data.success) { - reportError( - `Wrong response: status ${startMonRes.status}, success ${startMonRes.data.success}, msg ${startMonRes.data.msg}`, - ); - } else { - this.log.info(`Monitoring for ${stateName} transactions started.`); - } - } catch (err) { - reportError(err); - } - } - - /** - * Function to perform single request to read and confirm retrieval of transactions from the connector. - * Should be executed periodically (i.e. connector should be polled for new transactions). - * New transactions are pushed into the subject. - * - * @param subject RxJs subject associated with this monitoring request. - * @param clientAppId Client application ID to identify monitoring queue on the connector. - * @param stateName Corda state to monitor. - */ - private async pollTransactionsLogin( - subject: ReplaySubject, - clientAppId: string, - stateName: string, - ) { - try { - const response = await this.getMonitorTransactionsV1({ - clientAppId: clientAppId, - stateFullClassName: stateName, - }); - - if (response.status != 200 || !response.data.success) { - throw new Error(`Poll error: ${response.data.msg}`); - } - - if (response.data.stateFullClassName != stateName) { - throw new Error( - `Received class name mismatch! ${stateName} != ${response.data.stateFullClassName}`, - ); - } - - if (!response.data.tx) { - this.log.debug("No new transactions, continue..."); - return; - } - - const readTxIdx = response.data.tx.map((tx) => tx.index); - await this.clearMonitorTransactionsV1({ - clientAppId: clientAppId, - stateFullClassName: stateName, - txIndexes: readTxIdx?.filter(Boolean) as string[], - }); - - response.data.tx.forEach((tx) => subject.next(tx)); - } catch (err) { - this.log.warn("Monitor poll error for state", stateName); - subject.error(err); - } - } - - /** - * Should be called to stop monitoring on the connector. - * Calling this will remove all pending transactions (that were not read yet)! - * - * @param monitor Monitoring interval set with `setTimeout`. - * @param clientAppId Client application ID to identify monitoring queue on the connector. - * @param stateName Corda state to monitor. - */ - private finalizeMonitoring( - monitor: ReturnType, - clientAppId: string, - stateName: string, - ) { - this.log.info("Unsubscribe from the monitoring..."); - - clearInterval(monitor); - - this.stopMonitorV1({ - clientAppId: clientAppId, - stateFullClassName: stateName, - }) - .then((stopMonRes) => { - if (stopMonRes.status != 200 || !stopMonRes.data.success) { - this.log.warn( - "Error response from stopMonitorV1:", - stopMonRes.data.msg, - ); - } else { - this.log.info(`Monitoring for ${stateName} transactions stopped.`); - } - }) - .catch((err) => { - this.log.warn("Error when calling stopMonitorV1:", err); - }); - } - - /** - * Watch new transactions (state changes) on the corda ledger. - * - * @param options.stateFullClassName Corda state to monitor - * @param options.clientAppId Calling app ID. Each monitoring queue on the connector is associated with a client ID. - * @param options.pollRate How often poll the connector for new transactions. Defaults to 5s - * - * @returns RxJS observable of transactions. - */ - public async watchBlocksAsyncV1( - options: watchBlocksV1Options, - ): Promise> { - Checks.truthy(options, "watchBlocksV1 missing options"); - Checks.nonBlankString( - options.stateFullClassName, - "watchBlocksV1 stateFullClassName empty", - ); - Checks.nonBlankString( - options.clientAppId, - "watchBlocksV1 clientAppId empty", - ); - const pollRate = options.pollRate ?? DEFAULT_POLL_RATE_MS; - this.log.debug("Using monitoring poll rate:", pollRate); - - const subject = new ReplaySubject(0); - - // Start monitoring - await this.sendStartMonitorRequest( - subject, - options.clientAppId, - options.stateFullClassName, - ); - - // Periodically poll - const monitoringInterval = setInterval( - () => - this.pollTransactionsLogin( - subject, - options.clientAppId, - options.stateFullClassName, - ), - pollRate, - ); - - // Share and finalize monitoring when not listened to anymore - return subject.pipe( - finalize(() => - this.finalizeMonitoring( - monitoringInterval, - options.clientAppId, - options.stateFullClassName, - ), - ), - share(), - ); - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 4757235f2c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,2397 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Corda - * Can perform basic tasks on a Corda ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface CPIIDV1 - */ -export interface CPIIDV1 { - /** - * - * @type {string} - * @memberof CPIIDV1 - */ - 'name': string; - /** - * - * @type {string} - * @memberof CPIIDV1 - */ - 'signerSummaryHash'?: string | null; - /** - * - * @type {string} - * @memberof CPIIDV1 - */ - 'version': string; -} -/** - * - * @export - * @interface ClearMonitorTransactionsV1Request - */ -export interface ClearMonitorTransactionsV1Request { - /** - * ID of a client application that wants to monitor the state changes - * @type {string} - * @memberof ClearMonitorTransactionsV1Request - */ - 'clientAppId': string; - /** - * The fully qualified name of the Corda state to monitor - * @type {string} - * @memberof ClearMonitorTransactionsV1Request - */ - 'stateFullClassName': string; - /** - * - * @type {Array} - * @memberof ClearMonitorTransactionsV1Request - */ - 'txIndexes': Array; -} -/** - * - * @export - * @interface ClearMonitorTransactionsV1Response - */ -export interface ClearMonitorTransactionsV1Response { - /** - * Flag set to true if operation completed correctly. - * @type {boolean} - * @memberof ClearMonitorTransactionsV1Response - */ - 'success': boolean; - /** - * Message describing operation status or any errors that occurred. - * @type {string} - * @memberof ClearMonitorTransactionsV1Response - */ - 'msg': string; -} -/** - * - * @export - * @interface CordaNodeSshCredentials - */ -export interface CordaNodeSshCredentials { - /** - * - * @type {string} - * @memberof CordaNodeSshCredentials - */ - 'hostKeyEntry': string; - /** - * - * @type {string} - * @memberof CordaNodeSshCredentials - */ - 'username': string; - /** - * - * @type {string} - * @memberof CordaNodeSshCredentials - */ - 'password': string; - /** - * - * @type {string} - * @memberof CordaNodeSshCredentials - */ - 'hostname': string; - /** - * - * @type {number} - * @memberof CordaNodeSshCredentials - */ - 'port': number; -} -/** - * - * @export - * @interface CordaRpcCredentials - */ -export interface CordaRpcCredentials { - /** - * - * @type {string} - * @memberof CordaRpcCredentials - */ - 'hostname': string; - /** - * - * @type {number} - * @memberof CordaRpcCredentials - */ - 'port': number; - /** - * - * @type {string} - * @memberof CordaRpcCredentials - */ - 'username': string; - /** - * - * @type {string} - * @memberof CordaRpcCredentials - */ - 'password': string; -} -/** - * - * @export - * @interface CordaX500Name - */ -export interface CordaX500Name { - /** - * - * @type {string} - * @memberof CordaX500Name - */ - 'commonName'?: string; - /** - * - * @type {string} - * @memberof CordaX500Name - */ - 'organisationUnit'?: string; - /** - * - * @type {string} - * @memberof CordaX500Name - */ - 'organisation': string; - /** - * - * @type {string} - * @memberof CordaX500Name - */ - 'locality': string; - /** - * - * @type {string} - * @memberof CordaX500Name - */ - 'state'?: string; - /** - * - * @type {string} - * @memberof CordaX500Name - */ - 'country': string; - /** - * - * @type {X500Principal} - * @memberof CordaX500Name - */ - 'x500Principal': X500Principal; -} -/** - * - * @export - * @interface CordappDeploymentConfig - */ -export interface CordappDeploymentConfig { - /** - * - * @type {CordaNodeSshCredentials} - * @memberof CordappDeploymentConfig - */ - 'sshCredentials': CordaNodeSshCredentials; - /** - * - * @type {CordaRpcCredentials} - * @memberof CordappDeploymentConfig - */ - 'rpcCredentials': CordaRpcCredentials; - /** - * The shell command to execute in order to start back up a Corda node after having placed new jars in the cordapp directory of said node. - * @type {string} - * @memberof CordappDeploymentConfig - */ - 'cordaNodeStartCmd': string; - /** - * The absolute file system path where the Corda Node is expecting deployed Cordapp jar files to be placed. - * @type {string} - * @memberof CordappDeploymentConfig - */ - 'cordappDir': string; - /** - * The absolute file system path where the corda.jar file of the node can be found. This is used to execute database schema migrations where applicable (H2 database in use in development environments). - * @type {string} - * @memberof CordappDeploymentConfig - */ - 'cordaJarPath': string; - /** - * The absolute file system path where the base directory of the Corda node can be found. This is used to pass in to corda.jar when being invoked for certain tasks such as executing database schema migrations for a deployed contract. - * @type {string} - * @memberof CordappDeploymentConfig - */ - 'nodeBaseDirPath': string; -} -/** - * A CordappInfo describes a single CorDapp currently installed on the node - * @export - * @interface CordappInfo - */ -export interface CordappInfo { - /** - * - * @type {SHA256} - * @memberof CordappInfo - */ - 'jarHash': SHA256; - /** - * The name of the licence this CorDapp is released under - * @type {string} - * @memberof CordappInfo - */ - 'licence': string; - /** - * The minimum platform version the node must be at for the CorDapp to run - * @type {number} - * @memberof CordappInfo - */ - 'minimumPlatformVersion': number; - /** - * The name of the JAR file that defines the CorDapp - * @type {string} - * @memberof CordappInfo - */ - 'name': string; - /** - * The name of the CorDapp - * @type {string} - * @memberof CordappInfo - */ - 'shortName': string; - /** - * The target platform version this CorDapp has been tested against - * @type {number} - * @memberof CordappInfo - */ - 'targetPlatformVersion': number; - /** - * A description of what sort of CorDapp this is - either a contract, workflow, or a combination. - * @type {string} - * @memberof CordappInfo - */ - 'type': string; - /** - * The vendor of this CorDapp - * @type {string} - * @memberof CordappInfo - */ - 'vendor': string; - /** - * The version of this CorDapp - * @type {string} - * @memberof CordappInfo - */ - 'version': string; -} -/** - * - * @export - * @interface DeployContractJarsBadRequestV1Response - */ -export interface DeployContractJarsBadRequestV1Response { - /** - * - * @type {Array} - * @memberof DeployContractJarsBadRequestV1Response - */ - 'errors': Array; -} -/** - * - * @export - * @interface DeployContractJarsSuccessV1Response - */ -export interface DeployContractJarsSuccessV1Response { - /** - * - * @type {Array} - * @memberof DeployContractJarsSuccessV1Response - */ - 'deployedJarFiles': Array; -} -/** - * - * @export - * @interface DeployContractJarsV1Request - */ -export interface DeployContractJarsV1Request { - /** - * The list of deployment configurations pointing to the nodes where the provided cordapp jar files are to be deployed . - * @type {Array} - * @memberof DeployContractJarsV1Request - */ - 'cordappDeploymentConfigs': Array; - /** - * - * @type {Array} - * @memberof DeployContractJarsV1Request - */ - 'jarFiles': Array; -} -/** - * - * @export - * @interface DiagnoseNodeV1Request - */ -export interface DiagnoseNodeV1Request { - /** - * Optional property specifying which Corda Node should be the one being diagnosed in case the Connector has multiple connections established for different nodes (which is not yet a supported feature, but we want to keep this possibility open for the future). - * @type {Array} - * @memberof DiagnoseNodeV1Request - */ - 'nodeIds'?: Array; -} -/** - * - * @export - * @interface DiagnoseNodeV1Response - */ -export interface DiagnoseNodeV1Response { - /** - * - * @type {NodeDiagnosticInfo} - * @memberof DiagnoseNodeV1Response - */ - 'nodeDiagnosticInfo': NodeDiagnosticInfo; -} -/** - * Determines which flow starting method will be used on the back-end when invoking the flow. Based on the value here the plugin back-end might invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() method. Streamed responses are aggregated and returned in a single response to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. do. - * @export - * @enum {string} - */ - -export const FlowInvocationType = { - TrackedFlowDynamic: 'TRACKED_FLOW_DYNAMIC', - FlowDynamic: 'FLOW_DYNAMIC' -} as const; - -export type FlowInvocationType = typeof FlowInvocationType[keyof typeof FlowInvocationType]; - - -/** - * - * @export - * @interface FlowStatusV1Responses - */ -export interface FlowStatusV1Responses { - /** - * - * @type {Array} - * @memberof FlowStatusV1Responses - */ - 'flowStatusResponses'?: Array; -} -/** - * - * @export - * @interface FlowStatusV1ResponsesFlowStatusResponsesInner - */ -export interface FlowStatusV1ResponsesFlowStatusResponsesInner { - /** - * - * @type {string} - * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner - */ - 'clientRequestId'?: string | null; - /** - * - * @type {FlowV1Error} - * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner - */ - 'flowError'?: FlowV1Error; - /** - * - * @type {string} - * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner - */ - 'flowId'?: string | null; - /** - * - * @type {string} - * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner - */ - 'flowResult'?: string | null; - /** - * - * @type {string} - * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner - */ - 'flowStatus'?: string; - /** - * - * @type {string} - * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner - */ - 'holdingIDShortHash'?: string; - /** - * - * @type {string} - * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner - */ - 'timestamp'?: string; -} -/** - * - * @export - * @interface FlowV1Error - */ -export interface FlowV1Error { - /** - * - * @type {string} - * @memberof FlowV1Error - */ - 'message': string; - /** - * - * @type {string} - * @memberof FlowV1Error - */ - 'type': string; -} -/** - * This method gets the current status of the specified flow instance. - * @export - * @interface GetFlowCidV1Request - */ -export interface GetFlowCidV1Request { - /** - * - * @type {string} - * @memberof GetFlowCidV1Request - */ - 'username': string; - /** - * - * @type {string} - * @memberof GetFlowCidV1Request - */ - 'password': string; - /** - * - * @type {boolean} - * @memberof GetFlowCidV1Request - */ - 'rejectUnauthorized': boolean; - /** - * - * @type {string} - * @memberof GetFlowCidV1Request - */ - 'holdingIDShortHash'?: string; - /** - * - * @type {string} - * @memberof GetFlowCidV1Request - */ - 'clientRequestId'?: string; -} -/** - * - * @export - * @interface GetFlowCidV1Response - */ -export interface GetFlowCidV1Response { - /** - * - * @type {string} - * @memberof GetFlowCidV1Response - */ - 'clientRequestId'?: string | null; - /** - * - * @type {FlowV1Error} - * @memberof GetFlowCidV1Response - */ - 'flowError'?: FlowV1Error; - /** - * - * @type {string} - * @memberof GetFlowCidV1Response - */ - 'flowId'?: string | null; - /** - * - * @type {string} - * @memberof GetFlowCidV1Response - */ - 'flowResult'?: string | null; - /** - * - * @type {string} - * @memberof GetFlowCidV1Response - */ - 'flowStatus': string; - /** - * - * @type {string} - * @memberof GetFlowCidV1Response - */ - 'holdingIDShortHash': string; - /** - * - * @type {string} - * @memberof GetFlowCidV1Response - */ - 'timestamp': string; -} -/** - * - * @export - * @interface GetMonitorTransactionsV1Request - */ -export interface GetMonitorTransactionsV1Request { - /** - * ID of a client application that wants to monitor the state changes - * @type {string} - * @memberof GetMonitorTransactionsV1Request - */ - 'clientAppId': string; - /** - * The fully qualified name of the Corda state to monitor - * @type {string} - * @memberof GetMonitorTransactionsV1Request - */ - 'stateFullClassName': string; -} -/** - * - * @export - * @interface GetMonitorTransactionsV1Response - */ -export interface GetMonitorTransactionsV1Response { - /** - * Flag set to true if operation completed correctly. - * @type {boolean} - * @memberof GetMonitorTransactionsV1Response - */ - 'success': boolean; - /** - * Message describing operation status or any errors that occurred. - * @type {string} - * @memberof GetMonitorTransactionsV1Response - */ - 'msg': string; - /** - * The fully qualified name of the Corda state to monitor - * @type {string} - * @memberof GetMonitorTransactionsV1Response - */ - 'stateFullClassName'?: string; - /** - * - * @type {Array} - * @memberof GetMonitorTransactionsV1Response - */ - 'tx'?: Array; -} -/** - * - * @export - * @interface GetMonitorTransactionsV1ResponseTxInner - */ -export interface GetMonitorTransactionsV1ResponseTxInner { - /** - * - * @type {string} - * @memberof GetMonitorTransactionsV1ResponseTxInner - */ - 'index'?: string; - /** - * - * @type {string} - * @memberof GetMonitorTransactionsV1ResponseTxInner - */ - 'data'?: string; -} -/** - * - * @export - * @interface InvokeContractV1Request - */ -export interface InvokeContractV1Request { - /** - * The fully qualified name of the Corda flow to invoke - * @type {string} - * @memberof InvokeContractV1Request - */ - 'flowFullClassName': string; - /** - * - * @type {FlowInvocationType} - * @memberof InvokeContractV1Request - */ - 'flowInvocationType': FlowInvocationType; - /** - * The list of arguments to pass in to the contract method being invoked. - * @type {Array} - * @memberof InvokeContractV1Request - */ - 'params': Array; - /** - * The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. - * @type {number} - * @memberof InvokeContractV1Request - */ - 'timeoutMs'?: number; -} - - -/** - * - * @export - * @interface InvokeContractV1Response - */ -export interface InvokeContractV1Response { - /** - * - * @type {boolean} - * @memberof InvokeContractV1Response - */ - 'success': boolean; - /** - * Data returned from the JVM when no transaction is running - * @type {object} - * @memberof InvokeContractV1Response - */ - 'callOutput': object; - /** - * The net.corda.core.flows.StateMachineRunId value returned by the flow execution. - * @type {string} - * @memberof InvokeContractV1Response - */ - 'transactionId'?: string; - /** - * An array of strings representing the aggregated stream of progress updates provided by a *tracked* flow invocation. If the flow invocation was not tracked, this array is still returned, but as empty. - * @type {Array} - * @memberof InvokeContractV1Response - */ - 'progress'?: Array; - /** - * The id for the flow handle - * @type {string} - * @memberof InvokeContractV1Response - */ - 'flowId': string; -} -/** - * - * @export - * @interface JarFile - */ -export interface JarFile { - [key: string]: any; - - /** - * - * @type {string} - * @memberof JarFile - */ - 'filename': string; - /** - * Indicates whether the cordapp jar in question contains any embedded migrations that Cactus can/should execute between copying the jar into the cordapp directory and starting the node back up. - * @type {boolean} - * @memberof JarFile - */ - 'hasDbMigrations': boolean; - /** - * - * @type {string} - * @memberof JarFile - */ - 'contentBase64': string; -} -/** - * Can represent JVM primitive and reference types as well. The jvmTypeKind field indicates which one is being stored. If the jvmTypeKind field is set to REFERENCE then the jvmCtorArgs array is expected to be filled, otherwise (e.g. PRIMITIVE jvmTypeKind) it is expected that the primitiveValue property is filled with a primitive data type supported by the JSON standard such as strings, booleans, numbers, etc. - * @export - * @interface JvmObject - */ -export interface JvmObject { - /** - * - * @type {JvmTypeKind} - * @memberof JvmObject - */ - 'jvmTypeKind': JvmTypeKind; - /** - * - * @type {any} - * @memberof JvmObject - */ - 'primitiveValue'?: any; - /** - * - * @type {Array} - * @memberof JvmObject - */ - 'jvmCtorArgs'?: Array; - /** - * - * @type {JvmType} - * @memberof JvmObject - */ - 'jvmType': JvmType; -} - - -/** - * Represents a reference to a JVM type (such as a Java class) - * @export - * @interface JvmType - */ -export interface JvmType { - /** - * - * @type {string} - * @memberof JvmType - */ - 'fqClassName': string; - /** - * This parameter is used to specify that the function used to construct this JvmType is not a constructor function but instead is a factory function. Setting this parameter will cause the plugin to look up methods of the class denoted by fqClassName instead of its constructors. - * @type {string} - * @memberof JvmType - */ - 'constructorName'?: string; - /** - * - * @type {JvmObject} - * @memberof JvmType - */ - 'invocationTarget'?: JvmObject; -} -/** - * - * @export - * @enum {string} - */ - -export const JvmTypeKind = { - Primitive: 'PRIMITIVE', - Reference: 'REFERENCE' -} as const; - -export type JvmTypeKind = typeof JvmTypeKind[keyof typeof JvmTypeKind]; - - -/** - * - * @export - * @interface ListCpiV1Request - */ -export interface ListCpiV1Request { - /** - * - * @type {string} - * @memberof ListCpiV1Request - */ - 'username': string; - /** - * - * @type {string} - * @memberof ListCpiV1Request - */ - 'password': string; - /** - * - * @type {boolean} - * @memberof ListCpiV1Request - */ - 'rejectUnauthorized': boolean; -} -/** - * - * @export - * @interface ListCpiV1Response - */ -export interface ListCpiV1Response { - /** - * - * @type {Array} - * @memberof ListCpiV1Response - */ - 'cpis'?: Array; -} -/** - * - * @export - * @interface ListCpiV1ResponseCpisInner - */ -export interface ListCpiV1ResponseCpisInner { - /** - * - * @type {string} - * @memberof ListCpiV1ResponseCpisInner - */ - 'cpiFileChecksum'?: string; - /** - * - * @type {string} - * @memberof ListCpiV1ResponseCpisInner - */ - 'cpiFileFullChecksum'?: string; - /** - * - * @type {Array} - * @memberof ListCpiV1ResponseCpisInner - */ - 'cpks'?: Array; - /** - * - * @type {string} - * @memberof ListCpiV1ResponseCpisInner - */ - 'groupPolicy'?: string | null; - /** - * - * @type {CPIIDV1} - * @memberof ListCpiV1ResponseCpisInner - */ - 'id'?: CPIIDV1; - /** - * - * @type {string} - * @memberof ListCpiV1ResponseCpisInner - */ - 'timestamp'?: string; -} -/** - * - * @export - * @interface ListCpiV1ResponseCpisInnerCpksInner - */ -export interface ListCpiV1ResponseCpisInnerCpksInner { - /** - * - * @type {string} - * @memberof ListCpiV1ResponseCpisInnerCpksInner - */ - 'hash'?: string; - /** - * - * @type {CPIIDV1} - * @memberof ListCpiV1ResponseCpisInnerCpksInner - */ - 'id'?: CPIIDV1; - /** - * - * @type {Array} - * @memberof ListCpiV1ResponseCpisInnerCpksInner - */ - 'libraries'?: Array; - /** - * - * @type {string} - * @memberof ListCpiV1ResponseCpisInnerCpksInner - */ - 'mainBundle'?: string; - /** - * - * @type {string} - * @memberof ListCpiV1ResponseCpisInnerCpksInner - */ - 'timestamp'?: string; - /** - * - * @type {string} - * @memberof ListCpiV1ResponseCpisInnerCpksInner - */ - 'type'?: string; -} -/** - * - * @export - * @interface ListFlowsV1Request - */ -export interface ListFlowsV1Request { - /** - * - * @type {string} - * @memberof ListFlowsV1Request - */ - 'filter'?: string; -} -/** - * - * @export - * @interface ListFlowsV1Response - */ -export interface ListFlowsV1Response { - /** - * An array of strings storing the names of the flows as returned by the flowList Corda RPC. - * @type {Array} - * @memberof ListFlowsV1Response - */ - 'flowNames': Array; -} -/** - * - * @export - * @interface NetworkHostAndPort - */ -export interface NetworkHostAndPort { - /** - * - * @type {string} - * @memberof NetworkHostAndPort - */ - 'host': string; - /** - * - * @type {number} - * @memberof NetworkHostAndPort - */ - 'port': number; -} -/** - * A NodeDiagnosticInfo holds information about the current node version. - * @export - * @interface NodeDiagnosticInfo - */ -export interface NodeDiagnosticInfo { - /** - * A list of CorDapps currently installed on this node - * @type {Array} - * @memberof NodeDiagnosticInfo - */ - 'cordapps': Array; - /** - * The platform version of this node. This number represents a released API version, and should be used to make functionality decisions (e.g. enabling an app feature only if an underlying platform feature exists) - * @type {number} - * @memberof NodeDiagnosticInfo - */ - 'platformVersion': number; - /** - * The git commit hash this node was built from - * @type {string} - * @memberof NodeDiagnosticInfo - */ - 'revision': string; - /** - * The vendor of this node - * @type {string} - * @memberof NodeDiagnosticInfo - */ - 'vendor': string; - /** - * The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note that this string is effectively freeform, and so should only be used for providing diagnostic information. It should not be used to make functionality decisions (the platformVersion is a better fit for this). - * @type {string} - * @memberof NodeDiagnosticInfo - */ - 'version': string; -} -/** - * - * @export - * @interface NodeInfo - */ -export interface NodeInfo { - /** - * - * @type {Array} - * @memberof NodeInfo - */ - 'addresses': Array; - /** - * - * @type {number} - * @memberof NodeInfo - */ - 'platformVersion': number; - /** - * - * @type {number} - * @memberof NodeInfo - */ - 'serial': number; - /** - * - * @type {Array} - * @memberof NodeInfo - */ - 'legalIdentities': Array; - /** - * - * @type {Array} - * @memberof NodeInfo - */ - 'legalIdentitiesAndCerts': Array; -} -/** - * - * @export - * @interface Party - */ -export interface Party { - /** - * - * @type {CordaX500Name} - * @memberof Party - */ - 'name': CordaX500Name; - /** - * - * @type {PublicKey} - * @memberof Party - */ - 'owningKey': PublicKey; -} -/** - * An instance of a java.security.PublicKey (which is an interface) implementation such as org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl - * @export - * @interface PublicKey - */ -export interface PublicKey { - /** - * - * @type {string} - * @memberof PublicKey - */ - 'algorithm': string; - /** - * - * @type {string} - * @memberof PublicKey - */ - 'format': string; - /** - * - * @type {string} - * @memberof PublicKey - */ - 'encoded': string; -} -/** - * SHA-256 is part of the SHA-2 hash function family. Generated hash is fixed size, 256-bits (32-bytes). - * @export - * @interface SHA256 - */ -export interface SHA256 { - /** - * - * @type {string} - * @memberof SHA256 - */ - 'bytes': string; - /** - * - * @type {number} - * @memberof SHA256 - */ - 'offset': number; - /** - * - * @type {number} - * @memberof SHA256 - */ - 'size': number; -} -/** - * This method starts a new instance for the specified flow for the specified holding identity. - * @export - * @interface StartFlowV1Request - */ -export interface StartFlowV1Request { - /** - * - * @type {string} - * @memberof StartFlowV1Request - */ - 'username': string; - /** - * - * @type {string} - * @memberof StartFlowV1Request - */ - 'password': string; - /** - * - * @type {boolean} - * @memberof StartFlowV1Request - */ - 'rejectUnauthorized': boolean; - /** - * - * @type {string} - * @memberof StartFlowV1Request - */ - 'holdingIDShortHash'?: string; - /** - * - * @type {string} - * @memberof StartFlowV1Request - */ - 'clientRequestId': string; - /** - * - * @type {string} - * @memberof StartFlowV1Request - */ - 'flowClassName': string; - /** - * - * @type {StartFlowV1RequestRequestBody} - * @memberof StartFlowV1Request - */ - 'requestBody': StartFlowV1RequestRequestBody; -} -/** - * - * @export - * @interface StartFlowV1RequestRequestBody - */ -export interface StartFlowV1RequestRequestBody { - /** - * - * @type {string} - * @memberof StartFlowV1RequestRequestBody - */ - 'chatName'?: string; - /** - * - * @type {string} - * @memberof StartFlowV1RequestRequestBody - */ - 'otherMember'?: string; - /** - * - * @type {string} - * @memberof StartFlowV1RequestRequestBody - */ - 'message'?: string; - /** - * - * @type {string} - * @memberof StartFlowV1RequestRequestBody - */ - 'numberOfRecords'?: string; -} -/** - * - * @export - * @interface StartFlowV1Response - */ -export interface StartFlowV1Response { - /** - * - * @type {string} - * @memberof StartFlowV1Response - */ - 'clientRequestId'?: string | null; - /** - * - * @type {FlowV1Error} - * @memberof StartFlowV1Response - */ - 'flowError'?: FlowV1Error; - /** - * - * @type {string} - * @memberof StartFlowV1Response - */ - 'flowId'?: string | null; - /** - * - * @type {string} - * @memberof StartFlowV1Response - */ - 'flowResult'?: string | null; - /** - * - * @type {string} - * @memberof StartFlowV1Response - */ - 'flowStatus': string; - /** - * - * @type {string} - * @memberof StartFlowV1Response - */ - 'holdingIDShortHash': string; - /** - * - * @type {string} - * @memberof StartFlowV1Response - */ - 'timestamp': string; -} -/** - * - * @export - * @interface StartMonitorV1Request - */ -export interface StartMonitorV1Request { - /** - * ID of a client application that wants to monitor the state changes - * @type {string} - * @memberof StartMonitorV1Request - */ - 'clientAppId': string; - /** - * The fully qualified name of the Corda state to monitor - * @type {string} - * @memberof StartMonitorV1Request - */ - 'stateFullClassName': string; -} -/** - * - * @export - * @interface StartMonitorV1Response - */ -export interface StartMonitorV1Response { - /** - * Flag set to true if monitoring started correctly. - * @type {boolean} - * @memberof StartMonitorV1Response - */ - 'success': boolean; - /** - * Message describing operation status or any errors that occurred. - * @type {string} - * @memberof StartMonitorV1Response - */ - 'msg': string; -} -/** - * - * @export - * @interface StopMonitorV1Request - */ -export interface StopMonitorV1Request { - /** - * ID of a client application that wants to monitor the state changes - * @type {string} - * @memberof StopMonitorV1Request - */ - 'clientAppId': string; - /** - * The fully qualified name of the Corda state to monitor - * @type {string} - * @memberof StopMonitorV1Request - */ - 'stateFullClassName': string; -} -/** - * - * @export - * @interface StopMonitorV1Response - */ -export interface StopMonitorV1Response { - /** - * Flag set to true if operation completed correctly. - * @type {boolean} - * @memberof StopMonitorV1Response - */ - 'success': boolean; - /** - * Message describing operation status or any errors that occurred. - * @type {string} - * @memberof StopMonitorV1Response - */ - 'msg': string; -} -/** - * - * @export - * @interface VaultQueryV1Request - */ -export interface VaultQueryV1Request { - /** - * Valid, fully qualified JVM class name which will be fed into Class.forName(...) - * @type {string} - * @memberof VaultQueryV1Request - */ - 'contractStateType'?: string; -} -/** - * - * @export - * @interface X500Principal - */ -export interface X500Principal { - /** - * - * @type {string} - * @memberof X500Principal - */ - 'name': string; - /** - * Base64 encoded public key - * @type {string} - * @memberof X500Principal - */ - 'encoded': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Clear transactions from internal store so they\'ll not be available by GetMonitorTransactionsV1 anymore. - * @param {ClearMonitorTransactionsV1Request} clearMonitorTransactionsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - clearMonitorTransactionsV1: async (clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'clearMonitorTransactionsV1Request' is not null or undefined - assertParamExists('clearMonitorTransactionsV1', 'clearMonitorTransactionsV1Request', clearMonitorTransactionsV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(clearMonitorTransactionsV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). - * @param {DeployContractJarsV1Request} deployContractJarsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractJarsV1: async (deployContractJarsV1Request: DeployContractJarsV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'deployContractJarsV1Request' is not null or undefined - assertParamExists('deployContractJarsV1', 'deployContractJarsV1Request', deployContractJarsV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deployContractJarsV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Responds with diagnostic information about the Corda node - * @param {DiagnoseNodeV1Request} [diagnoseNodeV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - diagnoseNodeV1: async (diagnoseNodeV1Request?: DiagnoseNodeV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(diagnoseNodeV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary This method gets the current status of the specified flow instance. - * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFlowV1: async (getFlowCidV1Request: GetFlowCidV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getFlowCidV1Request' is not null or undefined - assertParamExists('getFlowV1', 'getFlowCidV1Request', getFlowCidV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getFlowCidV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get transactions for monitored state classes. - * @param {GetMonitorTransactionsV1Request} getMonitorTransactionsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMonitorTransactionsV1: async (getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getMonitorTransactionsV1Request' is not null or undefined - assertParamExists('getMonitorTransactionsV1', 'getMonitorTransactionsV1Request', getMonitorTransactionsV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getMonitorTransactionsV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Invokes a contract on a Corda ledger (e.g. a flow) - * @param {InvokeContractV1Request} invokeContractV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContractV1: async (invokeContractV1Request: InvokeContractV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'invokeContractV1Request' is not null or undefined - assertParamExists('invokeContractV1', 'invokeContractV1Request', invokeContractV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(invokeContractV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary List all CPIs uploaded to the cluster - * @param {ListCpiV1Request} listCpiV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCpiV1: async (listCpiV1Request: ListCpiV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'listCpiV1Request' is not null or undefined - assertParamExists('listCpiV1', 'listCpiV1Request', listCpiV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(listCpiV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. - * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFlowV1: async (getFlowCidV1Request: GetFlowCidV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getFlowCidV1Request' is not null or undefined - assertParamExists('listFlowV1', 'getFlowCidV1Request', getFlowCidV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getFlowCidV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Responds with a list of the flows on the Corda node. - * @param {ListFlowsV1Request} [listFlowsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFlowsV1: async (listFlowsV1Request?: ListFlowsV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(listFlowsV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - networkMapV1: async (body?: object, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary This method starts a new instance for the specified flow for the specified holding identity. - * @param {StartFlowV1Request} startFlowV1Request Request body for starting a flow - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - startFlowV1: async (startFlowV1Request: StartFlowV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'startFlowV1Request' is not null or undefined - assertParamExists('startFlowV1', 'startFlowV1Request', startFlowV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(startFlowV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Start monitoring corda changes (transactions) of given state class - * @param {StartMonitorV1Request} startMonitorV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - startMonitorV1: async (startMonitorV1Request: StartMonitorV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'startMonitorV1Request' is not null or undefined - assertParamExists('startMonitorV1', 'startMonitorV1Request', startMonitorV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(startMonitorV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Stop monitoring corda changes (transactions) of given state class - * @param {StopMonitorV1Request} stopMonitorV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - stopMonitorV1: async (stopMonitorV1Request: StopMonitorV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'stopMonitorV1Request' is not null or undefined - assertParamExists('stopMonitorV1', 'stopMonitorV1Request', stopMonitorV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(stopMonitorV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Queryes the vault service for state references based on JVM class names. Custom filters are not supported by this endpoint. - * @param {VaultQueryV1Request} vaultQueryV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - vaultQueryV1: async (vaultQueryV1Request: VaultQueryV1Request, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'vaultQueryV1Request' is not null or undefined - assertParamExists('vaultQueryV1', 'vaultQueryV1Request', vaultQueryV1Request) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(vaultQueryV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Clear transactions from internal store so they\'ll not be available by GetMonitorTransactionsV1 anymore. - * @param {ClearMonitorTransactionsV1Request} clearMonitorTransactionsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async clearMonitorTransactionsV1(clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.clearMonitorTransactionsV1(clearMonitorTransactionsV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). - * @param {DeployContractJarsV1Request} deployContractJarsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deployContractJarsV1(deployContractJarsV1Request: DeployContractJarsV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deployContractJarsV1(deployContractJarsV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Responds with diagnostic information about the Corda node - * @param {DiagnoseNodeV1Request} [diagnoseNodeV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async diagnoseNodeV1(diagnoseNodeV1Request?: DiagnoseNodeV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.diagnoseNodeV1(diagnoseNodeV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary This method gets the current status of the specified flow instance. - * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getFlowV1(getFlowCidV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get transactions for monitored state classes. - * @param {GetMonitorTransactionsV1Request} getMonitorTransactionsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMonitorTransactionsV1(getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMonitorTransactionsV1(getMonitorTransactionsV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Invokes a contract on a Corda ledger (e.g. a flow) - * @param {InvokeContractV1Request} invokeContractV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async invokeContractV1(invokeContractV1Request: InvokeContractV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.invokeContractV1(invokeContractV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary List all CPIs uploaded to the cluster - * @param {ListCpiV1Request} listCpiV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listCpiV1(listCpiV1Request: ListCpiV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listCpiV1(listCpiV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. - * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listFlowV1(getFlowCidV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Responds with a list of the flows on the Corda node. - * @param {ListFlowsV1Request} [listFlowsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listFlowsV1(listFlowsV1Request?: ListFlowsV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listFlowsV1(listFlowsV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async networkMapV1(body?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.networkMapV1(body, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary This method starts a new instance for the specified flow for the specified holding identity. - * @param {StartFlowV1Request} startFlowV1Request Request body for starting a flow - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async startFlowV1(startFlowV1Request: StartFlowV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.startFlowV1(startFlowV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Start monitoring corda changes (transactions) of given state class - * @param {StartMonitorV1Request} startMonitorV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async startMonitorV1(startMonitorV1Request: StartMonitorV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.startMonitorV1(startMonitorV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Stop monitoring corda changes (transactions) of given state class - * @param {StopMonitorV1Request} stopMonitorV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async stopMonitorV1(stopMonitorV1Request: StopMonitorV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.stopMonitorV1(stopMonitorV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Queryes the vault service for state references based on JVM class names. Custom filters are not supported by this endpoint. - * @param {VaultQueryV1Request} vaultQueryV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async vaultQueryV1(vaultQueryV1Request: VaultQueryV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.vaultQueryV1(vaultQueryV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Clear transactions from internal store so they\'ll not be available by GetMonitorTransactionsV1 anymore. - * @param {ClearMonitorTransactionsV1Request} clearMonitorTransactionsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - clearMonitorTransactionsV1(clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request, options?: any): AxiosPromise { - return localVarFp.clearMonitorTransactionsV1(clearMonitorTransactionsV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). - * @param {DeployContractJarsV1Request} deployContractJarsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractJarsV1(deployContractJarsV1Request: DeployContractJarsV1Request, options?: any): AxiosPromise { - return localVarFp.deployContractJarsV1(deployContractJarsV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * Responds with diagnostic information about the Corda node - * @param {DiagnoseNodeV1Request} [diagnoseNodeV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - diagnoseNodeV1(diagnoseNodeV1Request?: DiagnoseNodeV1Request, options?: any): AxiosPromise { - return localVarFp.diagnoseNodeV1(diagnoseNodeV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary This method gets the current status of the specified flow instance. - * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: any): AxiosPromise { - return localVarFp.getFlowV1(getFlowCidV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get transactions for monitored state classes. - * @param {GetMonitorTransactionsV1Request} getMonitorTransactionsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMonitorTransactionsV1(getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request, options?: any): AxiosPromise { - return localVarFp.getMonitorTransactionsV1(getMonitorTransactionsV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Invokes a contract on a Corda ledger (e.g. a flow) - * @param {InvokeContractV1Request} invokeContractV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContractV1(invokeContractV1Request: InvokeContractV1Request, options?: any): AxiosPromise { - return localVarFp.invokeContractV1(invokeContractV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary List all CPIs uploaded to the cluster - * @param {ListCpiV1Request} listCpiV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCpiV1(listCpiV1Request: ListCpiV1Request, options?: any): AxiosPromise { - return localVarFp.listCpiV1(listCpiV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. - * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: any): AxiosPromise { - return localVarFp.listFlowV1(getFlowCidV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * Responds with a list of the flows on the Corda node. - * @param {ListFlowsV1Request} [listFlowsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFlowsV1(listFlowsV1Request?: ListFlowsV1Request, options?: any): AxiosPromise { - return localVarFp.listFlowsV1(listFlowsV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - networkMapV1(body?: object, options?: any): AxiosPromise> { - return localVarFp.networkMapV1(body, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary This method starts a new instance for the specified flow for the specified holding identity. - * @param {StartFlowV1Request} startFlowV1Request Request body for starting a flow - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - startFlowV1(startFlowV1Request: StartFlowV1Request, options?: any): AxiosPromise { - return localVarFp.startFlowV1(startFlowV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Start monitoring corda changes (transactions) of given state class - * @param {StartMonitorV1Request} startMonitorV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - startMonitorV1(startMonitorV1Request: StartMonitorV1Request, options?: any): AxiosPromise { - return localVarFp.startMonitorV1(startMonitorV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Stop monitoring corda changes (transactions) of given state class - * @param {StopMonitorV1Request} stopMonitorV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - stopMonitorV1(stopMonitorV1Request: StopMonitorV1Request, options?: any): AxiosPromise { - return localVarFp.stopMonitorV1(stopMonitorV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * Queryes the vault service for state references based on JVM class names. Custom filters are not supported by this endpoint. - * @param {VaultQueryV1Request} vaultQueryV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - vaultQueryV1(vaultQueryV1Request: VaultQueryV1Request, options?: any): AxiosPromise { - return localVarFp.vaultQueryV1(vaultQueryV1Request, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Clear transactions from internal store so they\'ll not be available by GetMonitorTransactionsV1 anymore. - * @param {ClearMonitorTransactionsV1Request} clearMonitorTransactionsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public clearMonitorTransactionsV1(clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).clearMonitorTransactionsV1(clearMonitorTransactionsV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). - * @param {DeployContractJarsV1Request} deployContractJarsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deployContractJarsV1(deployContractJarsV1Request: DeployContractJarsV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deployContractJarsV1(deployContractJarsV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Responds with diagnostic information about the Corda node - * @param {DiagnoseNodeV1Request} [diagnoseNodeV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public diagnoseNodeV1(diagnoseNodeV1Request?: DiagnoseNodeV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).diagnoseNodeV1(diagnoseNodeV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary This method gets the current status of the specified flow instance. - * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getFlowV1(getFlowCidV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get transactions for monitored state classes. - * @param {GetMonitorTransactionsV1Request} getMonitorTransactionsV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getMonitorTransactionsV1(getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getMonitorTransactionsV1(getMonitorTransactionsV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Invokes a contract on a Corda ledger (e.g. a flow) - * @param {InvokeContractV1Request} invokeContractV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public invokeContractV1(invokeContractV1Request: InvokeContractV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).invokeContractV1(invokeContractV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary List all CPIs uploaded to the cluster - * @param {ListCpiV1Request} listCpiV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public listCpiV1(listCpiV1Request: ListCpiV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).listCpiV1(listCpiV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. - * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public listFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).listFlowV1(getFlowCidV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Responds with a list of the flows on the Corda node. - * @param {ListFlowsV1Request} [listFlowsV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public listFlowsV1(listFlowsV1Request?: ListFlowsV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).listFlowsV1(listFlowsV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List - * @param {object} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public networkMapV1(body?: object, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).networkMapV1(body, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary This method starts a new instance for the specified flow for the specified holding identity. - * @param {StartFlowV1Request} startFlowV1Request Request body for starting a flow - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public startFlowV1(startFlowV1Request: StartFlowV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).startFlowV1(startFlowV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Start monitoring corda changes (transactions) of given state class - * @param {StartMonitorV1Request} startMonitorV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public startMonitorV1(startMonitorV1Request: StartMonitorV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).startMonitorV1(startMonitorV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Stop monitoring corda changes (transactions) of given state class - * @param {StopMonitorV1Request} stopMonitorV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public stopMonitorV1(stopMonitorV1Request: StopMonitorV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).stopMonitorV1(stopMonitorV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Queryes the vault service for state references based on JVM class names. Custom filters are not supported by this endpoint. - * @param {VaultQueryV1Request} vaultQueryV1Request - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public vaultQueryV1(vaultQueryV1Request: VaultQueryV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).vaultQueryV1(vaultQueryV1Request, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index ff21ac88e8..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Corda - * Can perform basic tasks on a Corda ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 2bdfd744d4..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Corda - * Can perform basic tasks on a Corda ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index f7e84ee975..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Corda - * Can perform basic tasks on a Corda ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index c73ebc377b..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Corda - * Can perform basic tasks on a Corda ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/index.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/index.web.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/index.web.ts deleted file mode 100644 index d926319e63..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/index.web.ts +++ /dev/null @@ -1,77 +0,0 @@ -export { ClearMonitorTransactionsV1Request } from "./generated/openapi/typescript-axios/index"; -export { ClearMonitorTransactionsV1Response } from "./generated/openapi/typescript-axios/index"; -export { Configuration } from "./generated/openapi/typescript-axios/index"; -export { ConfigurationParameters } from "./generated/openapi/typescript-axios/index"; -export { CordaNodeSshCredentials } from "./generated/openapi/typescript-axios/index"; -export { CordaRpcCredentials } from "./generated/openapi/typescript-axios/index"; -export { CordaX500Name } from "./generated/openapi/typescript-axios/index"; -export { CordappDeploymentConfig } from "./generated/openapi/typescript-axios/index"; -export { CordappInfo } from "./generated/openapi/typescript-axios/index"; -export { DefaultApi } from "./generated/openapi/typescript-axios/index"; -export { DefaultApiAxiosParamCreator } from "./generated/openapi/typescript-axios/index"; -export { DefaultApiFactory } from "./generated/openapi/typescript-axios/index"; -export { DefaultApiFp } from "./generated/openapi/typescript-axios/index"; -export { DeployContractJarsBadRequestV1Response } from "./generated/openapi/typescript-axios/index"; -export { DeployContractJarsSuccessV1Response } from "./generated/openapi/typescript-axios/index"; -export { DeployContractJarsV1Request } from "./generated/openapi/typescript-axios/index"; -export { DiagnoseNodeV1Request } from "./generated/openapi/typescript-axios/index"; -export { DiagnoseNodeV1Response } from "./generated/openapi/typescript-axios/index"; -export { FlowInvocationType } from "./generated/openapi/typescript-axios/index"; -export { GetMonitorTransactionsV1Request } from "./generated/openapi/typescript-axios/index"; -export { GetMonitorTransactionsV1Response } from "./generated/openapi/typescript-axios/index"; -export { GetMonitorTransactionsV1ResponseTxInner } from "./generated/openapi/typescript-axios/index"; -export { InvokeContractV1Request } from "./generated/openapi/typescript-axios/index"; -export { InvokeContractV1Response } from "./generated/openapi/typescript-axios/index"; -export { JarFile } from "./generated/openapi/typescript-axios/index"; -export { JvmObject } from "./generated/openapi/typescript-axios/index"; -export { JvmType } from "./generated/openapi/typescript-axios/index"; -export { JvmTypeKind } from "./generated/openapi/typescript-axios/index"; -export { ListFlowsV1Request } from "./generated/openapi/typescript-axios/index"; -export { ListFlowsV1Response } from "./generated/openapi/typescript-axios/index"; -export { NetworkHostAndPort } from "./generated/openapi/typescript-axios/index"; -export { NodeDiagnosticInfo } from "./generated/openapi/typescript-axios/index"; -export { NodeInfo } from "./generated/openapi/typescript-axios/index"; -export { Party } from "./generated/openapi/typescript-axios/index"; -export { PublicKey } from "./generated/openapi/typescript-axios/index"; -export { SHA256 } from "./generated/openapi/typescript-axios/index"; -export { StartMonitorV1Request } from "./generated/openapi/typescript-axios/index"; -export { StartMonitorV1Response } from "./generated/openapi/typescript-axios/index"; -export { StopMonitorV1Request } from "./generated/openapi/typescript-axios/index"; -export { StopMonitorV1Response } from "./generated/openapi/typescript-axios/index"; -export { X500Principal } from "./generated/openapi/typescript-axios/index"; - -export { createJvmBoolean } from "./jvm/serde/factory/create-jvm-boolean"; - -export { - ICreateJvmCactiPublicImplKeyOptions, - createJvmCactiPublicKeyImpl, -} from "./jvm/serde/factory/create-jvm-cacti-public-key-impl"; - -export { - ICreateJvmCordaIdentityPartyOptions, - createJvmCordaIdentityParty, -} from "./jvm/serde/factory/create-jvm-corda-identity-party"; - -export { - ICreateJvmCordaX500NameOptions, - createJvmCordaX500Name, -} from "./jvm/serde/factory/create-jvm-corda-x500-name"; - -export { createJvmLong } from "./jvm/serde/factory/create-jvm-long"; -export { createJvmCurrency } from "./jvm/serde/factory/create-jvm-currency"; - -export { - ICreateJvmCordaAmountOptions, - createJvmCordaAmount, -} from "./jvm/serde/factory/create-jvm-corda-amount"; - -export { - ICreateJvmCordaUniqueIdentifierOptions, - createJvmCordaUniqueIdentifier, -} from "./jvm/serde/factory/create-jvm-corda-unique-identifier"; - -export { - CordaApiClient, - CordaApiClientOptions, - watchBlocksV1Options, -} from "./api-client/corda-api-client"; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-boolean.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-boolean.ts deleted file mode 100644 index ce3c116039..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-boolean.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { JvmObject } from "../../../generated/openapi/typescript-axios/api"; -import { JvmTypeKind } from "../../../generated/openapi/typescript-axios/api"; - -export function createJvmBoolean(data: boolean): JvmObject { - return { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "boolean", - }, - primitiveValue: data, - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-cacti-public-key-impl.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-cacti-public-key-impl.ts deleted file mode 100644 index c681a57782..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-cacti-public-key-impl.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { JvmObject } from "../../../generated/openapi/typescript-axios/api"; -import { JvmTypeKind } from "../../../generated/openapi/typescript-axios/api"; -import { PublicKey } from "../../../generated/openapi/typescript-axios/api"; -import { createJvmString } from "./create-jvm-string"; - -export interface ICreateJvmCactiPublicImplKeyOptions { - readonly publicKey: PublicKey; -} - -export function createJvmCactiPublicKeyImpl( - opts: Readonly, -): JvmObject { - if (!opts) { - throw new Error("Expected arg1 to be truthy"); - } - if (!opts.publicKey) { - throw new Error("Expected arg1.publicKey to be truthy"); - } - if (!opts.publicKey.algorithm) { - throw new Error("Expected arg1.publicKey.algorithm to be truthy"); - } - if (!opts.publicKey.encoded) { - throw new Error("Expected arg1.publicKey.encoded to be truthy"); - } - if (!opts.publicKey.format) { - throw new Error("Expected arg1.publicKey.format to be truthy"); - } - - return { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: - "org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl", - }, - - jvmCtorArgs: [ - createJvmString({ data: opts.publicKey.algorithm }), - createJvmString({ data: opts.publicKey.format }), - createJvmString({ data: opts.publicKey.encoded }), - ], - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-amount.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-amount.ts deleted file mode 100644 index e0eb4663a9..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-amount.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { JvmObject } from "../../../generated/openapi/typescript-axios/api"; -import { JvmTypeKind } from "../../../generated/openapi/typescript-axios/api"; -import { createJvmCurrency } from "./create-jvm-currency"; -import { createJvmLong } from "./create-jvm-long"; - -export interface ICreateJvmCordaAmountOptions { - readonly currencyCode: Readonly; - readonly amount: Readonly; -} - -export function createJvmCordaAmount( - opts: Readonly, -): JvmObject { - if (!opts) { - throw new Error("Expected arg1 to be truthy"); - } - if (!opts.amount) { - throw new Error("Expected arg1.amount to be truthy"); - } - if (!isFinite(opts.amount)) { - throw new Error("Expected arg1.amount to be finite"); - } - if (!opts.currencyCode) { - throw new Error("Expected arg1.currencyCode to be truthy"); - } - if (typeof opts.currencyCode !== "string") { - throw new Error("Expected arg1.currencyCode to be string"); - } - if (opts.currencyCode.length <= 0) { - throw new Error("Expected arg1.currencyCode to be non-blank string"); - } - return { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.contracts.Amount", - }, - - jvmCtorArgs: [ - createJvmLong(opts.amount), - createJvmCurrency({ currencyCode: opts.currencyCode }), - ], - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-identity-party.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-identity-party.ts deleted file mode 100644 index 79c6861347..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-identity-party.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { JvmObject } from "../../../generated/openapi/typescript-axios/api"; -import { Party } from "../../../generated/openapi/typescript-axios/api"; -import { JvmTypeKind } from "../../../generated/openapi/typescript-axios/api"; -import { createJvmCactiPublicKeyImpl } from "./create-jvm-cacti-public-key-impl"; -import { createJvmCordaX500Name } from "./create-jvm-corda-x500-name"; - -export interface ICreateJvmCordaIdentityPartyOptions { - readonly party: Readonly; -} - -export function createJvmCordaIdentityParty( - opts: Readonly, -): JvmObject { - return { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.Party", - }, - - jvmCtorArgs: [ - createJvmCordaX500Name({ - country: opts.party.name.country, - locality: opts.party.name.locality, - organisation: opts.party.name.organisation, - }), - createJvmCactiPublicKeyImpl({ publicKey: opts.party.owningKey }), - ], - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-unique-identifier.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-unique-identifier.ts deleted file mode 100644 index 66488688e8..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-unique-identifier.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { JvmObject } from "../../../generated/openapi/typescript-axios/api"; -import { JvmTypeKind } from "../../../generated/openapi/typescript-axios/api"; -import { createJvmString } from "./create-jvm-string"; - -export interface ICreateJvmCordaUniqueIdentifierOptions { - readonly uniqueidentifier: Readonly; -} - -export function createJvmCordaUniqueIdentifier( - opts: Readonly, -): JvmObject { - if (!opts) { - throw new Error("Expected arg1 to be truthy"); - } - if (!opts.uniqueidentifier) { - throw new Error("Expected arg1.uniqueidentifier to be truthy"); - } - return { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.contracts.UniqueIdentifier", - }, - - jvmCtorArgs: [createJvmString({ data: opts.uniqueidentifier })], - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-x500-name.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-x500-name.ts deleted file mode 100644 index 2a41e08b13..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-corda-x500-name.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { JvmObject } from "../../../generated/openapi/typescript-axios/api"; -import { JvmTypeKind } from "../../../generated/openapi/typescript-axios/api"; -import { createJvmString } from "./create-jvm-string"; - -export interface ICreateJvmCordaX500NameOptions { - readonly commonName?: string; - readonly organisationUnit?: string; - readonly organisation: string; - readonly locality: string; - readonly state?: string; - readonly country: string; -} - -export function createJvmCordaX500Name( - opts: Readonly, -): JvmObject { - if (!opts) { - throw new Error("Expected arg1 to be truthy"); - } - return { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.CordaX500Name", - }, - - jvmCtorArgs: [ - createJvmString({ data: opts.organisation }), - createJvmString({ data: opts.locality }), - createJvmString({ data: opts.country }), - ], - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-currency.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-currency.ts deleted file mode 100644 index 468a965464..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-currency.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { JvmObject } from "../../../generated/openapi/typescript-axios/api"; -import { JvmTypeKind } from "../../../generated/openapi/typescript-axios/api"; - -export interface ICreateJvmCurrencyOptions { - readonly currencyCode: Readonly; -} - -export function createJvmCurrency( - opts: Readonly, -): JvmObject { - if (!opts) { - throw new Error("Expected arg1 to be truthy"); - } - if (!opts.currencyCode) { - throw new Error("Expected arg1.currencyCode to be truthy"); - } - if (typeof opts.currencyCode !== "string") { - throw new Error("Expected arg1.currencyCode to be string"); - } - - return { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "java.util.Currency", - constructorName: "getInstance", - }, - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: opts.currencyCode, - }, - ], - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-int.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-int.ts deleted file mode 100644 index ea799644e7..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-int.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { JvmObject } from "../../../generated/openapi/typescript-axios/api"; -import { JvmTypeKind } from "../../../generated/openapi/typescript-axios/api"; - -export function createJvmInt(data: number): JvmObject { - return { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.Integer", - }, - primitiveValue: data, - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-long.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-long.ts deleted file mode 100644 index 5cf22c7293..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-long.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { JvmObject } from "../../../generated/openapi/typescript-axios/api"; -import { JvmTypeKind } from "../../../generated/openapi/typescript-axios/api"; - -export function createJvmLong(data: number): JvmObject { - return { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "long", - }, - primitiveValue: data, - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-string.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-string.ts deleted file mode 100644 index 3ad2f6d877..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/jvm/serde/factory/create-jvm-string.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { JvmObject } from "../../../generated/openapi/typescript-axios/api"; -import { JvmTypeKind } from "../../../generated/openapi/typescript-axios/api"; - -export interface ICreateJvmStringOptions { - readonly data: Readonly; -} - -export function createJvmString( - opts: Readonly, -): JvmObject { - if (!opts) { - throw new Error("Expected arg1 to be truthy"); - } - if (!opts.data) { - throw new Error("Expected arg1.data to be truthy"); - } - if (typeof opts.data !== "string") { - throw new Error("Expected arg1.data to be string"); - } - - return { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: opts.data, - }; -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-factory-ledger-connector.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-factory-ledger-connector.ts deleted file mode 100644 index 3b61ffcbf6..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; - -import { - IPluginLedgerConnectorCordaOptions, - PluginLedgerConnectorCorda, -} from "./plugin-ledger-connector-corda"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorCorda, - IPluginLedgerConnectorCordaOptions, - IPluginFactoryOptions -> { - async create( - options: IPluginLedgerConnectorCordaOptions, - ): Promise { - return new PluginLedgerConnectorCorda(options); - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts deleted file mode 100644 index fd1b0fc57d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts +++ /dev/null @@ -1,550 +0,0 @@ -import type { Server } from "http"; -import type { Server as SecureServer } from "https"; -import type { Config as SshConfig } from "node-ssh"; -import type { Express } from "express"; -import urlcat from "urlcat"; -import OAS from "../json/openapi.json"; -import { BadRequestError, GatewayTimeoutError } from "http-errors-enhanced-cjs"; - -import { - ListCpiV1Response, - StartFlowV1Request, - GetFlowCidV1Response, - GetFlowCidV1Request, - ListCpiV1Request, -} from "./generated/openapi/typescript-axios"; - -import { - IPluginLedgerConnector, - IWebServiceEndpoint, - IPluginWebService, - ICactusPluginOptions, - ConsensusAlgorithmFamily, -} from "@hyperledger/cactus-core-api"; -import { consensusHasTransactionFinality } from "@hyperledger/cactus-core"; -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { DeployContractJarsEndpoint } from "./web-services/deploy-contract-jars-endpoint"; - -import { - IGetPrometheusExporterMetricsEndpointV1Options, - GetPrometheusExporterMetricsEndpointV1, -} from "./web-services/get-prometheus-exporter-metrics-endpoint-v1"; - -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; -import { - IInvokeContractEndpointV1Options, - InvokeContractEndpointV1, -} from "./web-services/invoke-contract-endpoint-v1"; - -import { - IListCPIEndpointV1Options, - ListCPIEndpointV1, -} from "./web-services/list-cpi-endpoint-v1"; -import { - IFlowStatusEndpointV1Options, - FlowStatusEndpointV1, -} from "./web-services/list-flow-endpoint-v1"; -import { - IFlowStatusResponseEndpointV1Options, - FlowStatusResponseEndpointV1, -} from "./web-services/get-flow-endpoint-v1"; -import { - IListFlowsEndpointV1Options, - ListFlowsEndpointV1, -} from "./web-services/list-flows-endpoint-v1"; -import { - INetworkMapEndpointV1Options, - NetworkMapEndpointV1, -} from "./web-services/network-map-endpoint-v1"; -import { - IDiagnoseNodeEndpointV1Options, - DiagnoseNodeEndpointV1, -} from "./web-services/diagnose-node-endpoint-v1"; -import { - IStartFlowEndpointV1Options, - StartFlowEndpointV1, -} from "./web-services/start-flow-endpoint-v1"; -import fs from "fs"; -import fetch from "node-fetch"; -import https from "https"; -export enum CordaVersion { - CORDA_V4X = "CORDA_V4X", - CORDA_V5 = "CORDA_V5X", -} -export interface IPluginLedgerConnectorCordaOptions - extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - sshConfigAdminShell: SshConfig; - corDappsDir: string; - prometheusExporter?: PrometheusExporter; - cordaStartCmd?: string; - cordaStopCmd?: string; - apiUrl?: string; - cordaVersion?: CordaVersion; - holdingIDShortHash?: any; - clientRequestID?: any; - /** - * Path to the file where the private key for the ssh configuration is located - * This property is optional. Its use is not recommended for most cases, it will override the privateKey property of the sshConfigAdminShell. - * @type {string} - * @memberof IPluginLedgerConnectorCordaOptions - */ - sshPrivateKeyPath?: string; - cordaApiUrl?: string; -} - -export class PluginLedgerConnectorCorda - implements - IPluginLedgerConnector< - GetFlowCidV1Response, - StartFlowV1Request, - ListCpiV1Response, - any - >, - IPluginWebService -{ - public static readonly CLASS_NAME = "DeployContractJarsEndpoint"; - - private readonly instanceId: string; - private readonly log: Logger; - public prometheusExporter: PrometheusExporter; - private endpoints: IWebServiceEndpoint[] | undefined; - public readonly cordaApiUrl: string; - public get className(): string { - return DeployContractJarsEndpoint.CLASS_NAME; - } - - private httpServer: Server | SecureServer | null = null; - - constructor(public readonly options: IPluginLedgerConnectorCordaOptions) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.sshConfigAdminShell, `${fnTag} sshConfigAdminShell`); - Checks.truthy(options.instanceId, `${fnTag} instanceId`); - - const level = options.logLevel || "INFO"; - const label = "plugin-ledger-connector-corda"; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.instanceId = this.options.instanceId; - this.prometheusExporter = - options.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - - this.cordaApiUrl = options.cordaApiUrl || "https://127.0.0.1:8888"; - - this.prometheusExporter.startMetricsCollection(); - // if privateKeyPath exists, overwrite privateKey in sshConfigAdminShell - this.readSshPrivateKeyFromFile(); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } - - public async getConsensusAlgorithmFamily(): Promise { - return ConsensusAlgorithmFamily.Authority; - } - public async hasTransactionFinality(): Promise { - const currentConsensusAlgorithmFamily = - await this.getConsensusAlgorithmFamily(); - - return consensusHasTransactionFinality(currentConsensusAlgorithmFamily); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return "@hyperledger/cactus-plugin-ledger-connector-corda"; - } - - public async onPluginInit(): Promise { - return; - } - - public deployContract(): Promise { - throw new Error("Method not implemented."); - } - - public async transact(): Promise { - this.prometheusExporter.addCurrentTransaction(); - return null as any; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - // await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - private readSshPrivateKeyFromFile(): void { - const { sshPrivateKeyPath } = this.options; - if (sshPrivateKeyPath) { - const fileContent = fs - .readFileSync(sshPrivateKeyPath, "utf-8") - .toString(); - this.options.sshConfigAdminShell.privateKey = fileContent; - } - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const pkgName = this.getPackageName(); - this.log.info(`Instantiating web services for ${pkgName}...`); - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new DeployContractJarsEndpoint({ - sshConfigAdminShell: this.options.sshConfigAdminShell, - logLevel: this.options.logLevel, - corDappsDir: this.options.corDappsDir, - cordaStartCmd: this.options.cordaStartCmd, - cordaStopCmd: this.options.cordaStopCmd, - apiUrl: this.options.apiUrl, - }); - - endpoints.push(endpoint); - } - - { - const opts: IInvokeContractEndpointV1Options = { - apiUrl: this.options.apiUrl, - logLevel: this.options.logLevel, - }; - const endpoint = new InvokeContractEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const opts: IGetPrometheusExporterMetricsEndpointV1Options = { - connector: this, - logLevel: this.options.logLevel, - }; - const endpoint = new GetPrometheusExporterMetricsEndpointV1(opts); - endpoints.push(endpoint); - } - { - const opts: IListFlowsEndpointV1Options = { - apiUrl: this.options.apiUrl, - logLevel: this.options.logLevel, - }; - const endpoint = new ListFlowsEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const opts: INetworkMapEndpointV1Options = { - apiUrl: this.options.apiUrl, - logLevel: this.options.logLevel, - }; - const endpoint = new NetworkMapEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const opts: IDiagnoseNodeEndpointV1Options = { - apiUrl: this.options.apiUrl, - logLevel: this.options.logLevel, - }; - const endpoint = new DiagnoseNodeEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const opts: IListCPIEndpointV1Options = { - apiUrl: this.options.apiUrl as string, - logLevel: this.options.logLevel, - connector: this, - }; - const endpoint = new ListCPIEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const opts: IFlowStatusEndpointV1Options = { - apiUrl: this.options.apiUrl as string, - logLevel: this.options.logLevel, - holdingIDShortHash: this.options.holdingIDShortHash, - connector: this, - }; - const endpoint = new FlowStatusEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const opts: IFlowStatusResponseEndpointV1Options = { - apiUrl: this.options.apiUrl as string, - logLevel: this.options.logLevel, - holdingIDShortHash: this.options.holdingIDShortHash, - clientRequestID: this.options.clientRequestID, - connector: this, - }; - const endpoint = new FlowStatusResponseEndpointV1(opts); - endpoints.push(endpoint); - } - { - const opts: IStartFlowEndpointV1Options = { - apiUrl: this.options.apiUrl as string, - logLevel: this.options.logLevel, - connector: this, - }; - const endpoint = new StartFlowEndpointV1(opts); - endpoints.push(endpoint); - } - this.log.info(`Instantiated endpoints of ${pkgName}`); - return endpoints; - } - - public async shutdown(): Promise { - return; - } - - public async getFlowList(): Promise { - return ["getFlowList()_NOT_IMPLEMENTED"]; - } - - private async setupRequest( - username: string, - password: string, - rejectUnauthorized: boolean, - ): Promise<{ headers: any; agent: any }> { - const authString = Buffer.from(`${username}:${password}`).toString( - "base64", - ); - const headers = { Authorization: `Basic ${authString}` }; - const httpsAgent = new https.Agent({ - rejectUnauthorized, - }); - return { headers, agent: httpsAgent }; - } - - private validateHoldingIDShortHash(inputString: string): boolean { - /* only hexadecimal characters and exactly 12 characters long as per the corda docs - https://docs.r3.com/en/platform/corda/5.2/developing-applications/cordapp-template/utxo-ledger-example-cordapp/running-the-chat-cordapp.html#using-swagger - */ - const pattern = /^[0-9A-Fa-f]{12}$/; - return pattern.test(inputString); - } - - public async startFlow(req: StartFlowV1Request): Promise { - try { - const { headers, agent } = await this.setupRequest( - req.username, - req.password, - req.rejectUnauthorized, - ); - const holdingIDShortHash = req.holdingIDShortHash; - if (typeof holdingIDShortHash === "undefined") { - throw new BadRequestError("holdingIDShortHash is undefined"); - } - if (!this.validateHoldingIDShortHash(holdingIDShortHash)) { - throw new BadRequestError( - `Invalid holdingIDShortHash: ${holdingIDShortHash}`, - ); - } - const cordaReq = { - clientRequestId: req.clientRequestId, - flowClassName: req.flowClassName, - requestBody: req.requestBody, - }; - const cordaReqBuff = Buffer.from(JSON.stringify(cordaReq)); - const startFlowUrl = urlcat( - this.cordaApiUrl, - "/api/v1/flow/:holdingIDShortHash", - { - holdingIDShortHash, - }, - ); - const response = await fetch(startFlowUrl, { - method: `POST`, - headers, - body: cordaReqBuff, - agent, - }); - await new Promise((resolve) => setTimeout(resolve, 5000)); - if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status}`); - } - const responseData = await this.pollEndpointUntilCompleted( - req.holdingIDShortHash!, - req.clientRequestId, - ); - return responseData; - } catch (error) { - console.error("Error starting flow:", error); - throw error; - } - } - - public async listCPI(req: ListCpiV1Request): Promise { - try { - const { headers, agent } = await this.setupRequest( - req.username, - req.password, - req.rejectUnauthorized, - ); - const cpiUrl = urlcat(this.cordaApiUrl, "/api/v1/cpi"); - const response = await fetch(cpiUrl, { - method: `GET`, - headers: headers, - agent, - }); - if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status}`); - } - const responseData = await response.json(); - return responseData; - } catch (error) { - console.error("Error fetching data:", error); - } - } - - public async getFlow(req: GetFlowCidV1Request): Promise { - try { - const { headers, agent } = await this.setupRequest( - req.username, - req.password, - req.rejectUnauthorized, - ); - if (typeof req.holdingIDShortHash === "undefined") { - throw new BadRequestError("holdingIDShortHash is undefined"); - } - if (!this.validateHoldingIDShortHash(req.holdingIDShortHash)) { - throw new BadRequestError( - `Invalid holdingIDShortHash: ${req.holdingIDShortHash}`, - ); - } - const getFlowUrl = urlcat( - this.cordaApiUrl, - "/api/v1/flow/:holdingIDShortHash/:clientRequestId", - { - holdingIDShortHash: req.holdingIDShortHash, - clientRequestId: req.clientRequestId, - }, - ); - const response = await fetch(getFlowUrl, { - method: `GET`, - headers: headers, - agent, - }); - if (!response.ok) { - throw new BadRequestError(`HTTP error! status: ${response.status}`); - } - const responseData = await response.json(); - return responseData; - } catch (error) { - console.error("Error fetching data:", error); - } - } - - public async listFlows(req: GetFlowCidV1Request): Promise { - try { - const { headers, agent } = await this.setupRequest( - req.username, - req.password, - req.rejectUnauthorized, - ); - if (typeof req.holdingIDShortHash === "undefined") { - throw new BadRequestError("holdingIDShortHash is undefined"); - } - if (!this.validateHoldingIDShortHash(req.holdingIDShortHash)) { - throw new BadRequestError( - `Invalid holdingIDShortHash: ${req.holdingIDShortHash}`, - ); - } - const listFlowsUrl = urlcat( - this.cordaApiUrl, - "/api/v1/flow/:holdingIDShortHash", - { - holdingIDShortHash: req.holdingIDShortHash, - }, - ); - const response = await fetch(listFlowsUrl, { - method: `GET`, - headers: headers, - agent, - }); - if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status}`); - } - const responseData = await response.json(); - return responseData; - } catch (error) { - console.error("Error fetching data:", error); - } - } - - public async pollEndpointUntilCompleted( - shortHash: string, - clientRequestId: string, - interval = 5000, - maxAttempts = 10, - ): Promise { - return new Promise(async (resolve, reject) => { - let attempts = 0; - - const poll = async () => { - attempts++; - const queryVar: GetFlowCidV1Request = { - username: "admin", - password: "admin", - rejectUnauthorized: false, - holdingIDShortHash: shortHash, - clientRequestId, - }; - try { - const response = await this.getFlow(queryVar); - if (response.flowStatus === "COMPLETED") { - resolve(response); - } else { - if (attempts < maxAttempts) { - setTimeout(poll, interval); - } else { - reject( - new Error( - `Max attempts (${maxAttempts}) reached. Flow status not completed.`, - ), - ); - } - } - } catch (error) { - if (attempts < maxAttempts) { - setTimeout(poll, interval); - } else { - reject( - new GatewayTimeoutError( - `Max attempts (${maxAttempts}) reached. Unable to get flow status.`, - ), - ); - } - } - }; - - poll(); - }); - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index 672c2da570..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Transactions } from "./response.type"; - -import { totalTxCount, K_CACTUS_CORDA_TOTAL_TX_COUNT } from "./metrics"; - -export async function collectMetrics( - transactions: Transactions, -): Promise { - totalTxCount.labels(K_CACTUS_CORDA_TOTAL_TX_COUNT).set(transactions.counter); -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index 4569ce9f14..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_CORDA_TOTAL_TX_COUNT = "cactus_corda_total_tx_count"; - -export const totalTxCount = new Gauge({ - registers: [], - name: K_CACTUS_CORDA_TOTAL_TX_COUNT, - help: "Total transactions executed", - labelNames: ["type"], -}); diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index aaa6b459b9..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,40 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { Transactions } from "./response.type"; -import { totalTxCount, K_CACTUS_CORDA_TOTAL_TX_COUNT } from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly transactions: Transactions = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public addCurrentTransaction(): void { - this.transactions.counter++; - totalTxCount - .labels(K_CACTUS_CORDA_TOTAL_TX_COUNT) - .set(this.transactions.counter); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_CORDA_TOTAL_TX_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalTxCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 3f1bc7f491..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type Transactions = { - counter: number; -}; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/public-api.ts deleted file mode 100644 index df61e94b95..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/public-api.ts +++ /dev/null @@ -1,60 +0,0 @@ -export { - PluginLedgerConnectorCorda, - IPluginLedgerConnectorCordaOptions, - CordaVersion, -} from "./plugin-ledger-connector-corda"; - -export * from "./generated/openapi/typescript-axios/index"; - -export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export { - DeployContractJarsEndpoint, - IDeployContractEndpointOptions, -} from "./web-services/deploy-contract-jars-endpoint"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} - -export { - CordaApiClient, - CordaApiClientOptions, - watchBlocksV1Options, -} from "./api-client/corda-api-client"; - -export { createJvmBoolean } from "./jvm/serde/factory/create-jvm-boolean"; - -export { - ICreateJvmCactiPublicImplKeyOptions, - createJvmCactiPublicKeyImpl, -} from "./jvm/serde/factory/create-jvm-cacti-public-key-impl"; - -export { - ICreateJvmCordaIdentityPartyOptions, - createJvmCordaIdentityParty, -} from "./jvm/serde/factory/create-jvm-corda-identity-party"; - -export { - ICreateJvmCordaX500NameOptions, - createJvmCordaX500Name, -} from "./jvm/serde/factory/create-jvm-corda-x500-name"; - -export { createJvmInt } from "./jvm/serde/factory/create-jvm-int"; -export { createJvmLong } from "./jvm/serde/factory/create-jvm-long"; -export { createJvmCurrency } from "./jvm/serde/factory/create-jvm-currency"; - -export { - ICreateJvmCordaAmountOptions, - createJvmCordaAmount, -} from "./jvm/serde/factory/create-jvm-corda-amount"; - -export { - ICreateJvmCordaUniqueIdentifierOptions, - createJvmCordaUniqueIdentifier, -} from "./jvm/serde/factory/create-jvm-corda-unique-identifier"; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/deploy-contract-jars-endpoint.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/deploy-contract-jars-endpoint.ts deleted file mode 100644 index bab2215bc0..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/deploy-contract-jars-endpoint.ts +++ /dev/null @@ -1,153 +0,0 @@ -import type { Express, Request, Response } from "express"; -import type { Config as SshConfig } from "node-ssh"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - Configuration, -} from "@hyperledger/cactus-core-api"; - -import { - AuthorizationOptionsProvider, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import type { IEndpointAuthzOptions } from "@hyperledger/cactus-core-api"; - -import { - DefaultApi, - DeployContractJarsSuccessV1Response, - DeployContractJarsV1Request, -} from "../generated/openapi/typescript-axios/api"; - -import OAS from "../../json/openapi.json"; - -export interface IDeployContractEndpointOptions { - logLevel?: LogLevelDesc; - sshConfigAdminShell: SshConfig; - corDappsDir: string; - cordaStartCmd?: string; - cordaStopCmd?: string; - authorizationOptionsProvider?: AuthorizationOptionsProvider; - apiUrl?: string; -} - -const K_DEFAULT_AUTHORIZATION_OPTIONS: IEndpointAuthzOptions = { - isProtected: true, - requiredRoles: [], -}; - -export class DeployContractJarsEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeployContractJarsEndpoint"; - - private readonly log: Logger; - private readonly authorizationOptionsProvider: AuthorizationOptionsProvider; - private readonly apiUrl?: string; - - public get className(): string { - return DeployContractJarsEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeployContractEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.sshConfigAdminShell, `${fnTag} options.sshConfig`); - - const level = options.logLevel || "INFO"; - const label = "deploy-contract-jars-endpoint"; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.authorizationOptionsProvider = - options.authorizationOptionsProvider || - AuthorizationOptionsProvider.of(K_DEFAULT_AUTHORIZATION_OPTIONS, level); - - this.log.debug(`Instantiated ${this.className} OK`); - this.apiUrl = options.apiUrl; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - return this.authorizationOptionsProvider; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars" - ]; - } - - /** - * Returns the `operationId` that connects this endpoint to it's definition in - * the openapi-spec.ts file. - */ - public get operationId(): string { - return this.oasPath.post.operationId; - } - - /** - * Returns the endpoint path to be used when installing the endpoint into the - * API server of Cactus. - */ - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - - const verb = this.getVerbLowerCase(); - const thePath = this.getPath(); - this.log.debug(`${verb} ${thePath} handleRequest()`); - - try { - if (this.apiUrl === undefined) throw "apiUrl option is necessary"; - const body = await this.callInternalContainer(req.body); - res.status(200); - res.json(body); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.json({ - error: ex?.message, - // FIXME do not include stack trace - errorStack: ex?.stack, - }); - } - } - - async callInternalContainer( - req: DeployContractJarsV1Request, - ): Promise { - const apiConfig = new Configuration({ basePath: this.apiUrl }); - const apiClient = new DefaultApi(apiConfig); - const res = await apiClient.deployContractJarsV1(req); - return res.data; - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/diagnose-node-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/diagnose-node-endpoint-v1.ts deleted file mode 100644 index 201039dda1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/diagnose-node-endpoint-v1.ts +++ /dev/null @@ -1,114 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, - Configuration, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { - DefaultApi, - DiagnoseNodeV1Request, - DiagnoseNodeV1Response, -} from "../generated/openapi/typescript-axios"; - -export interface IDiagnoseNodeEndpointV1Options { - logLevel?: LogLevelDesc; - apiUrl?: string; -} - -export class DiagnoseNodeEndpointV1 implements IWebServiceEndpoint { - private readonly log: Logger; - private readonly apiUrl?: string; - - constructor(public readonly opts: IDiagnoseNodeEndpointV1Options) { - const fnTag = "NetworkMapEndpointV1#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - - this.log = LoggerProvider.getOrCreate({ - label: "diagnose-node-endpoint-v1", - level: opts.logLevel || "INFO", - }); - - this.apiUrl = opts.apiUrl; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "DiagnoseNodeEndpointV1#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - if (this.apiUrl === undefined) throw "apiUrl option is necessary"; - const resBody = await this.callInternalContainer(req.body); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } - - async callInternalContainer( - req: DiagnoseNodeV1Request, - ): Promise { - const apiConfig = new Configuration({ basePath: this.apiUrl }); - const apiClient = new DefaultApi(apiConfig); - const res = await apiClient.diagnoseNodeV1(req); - return res.data; - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/get-flow-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/get-flow-endpoint-v1.ts deleted file mode 100644 index f29adf235a..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/get-flow-endpoint-v1.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - registerWebServiceEndpoint, - handleRestEndpointException, -} from "@hyperledger/cactus-core"; - -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { InternalServerError } from "http-errors-enhanced-cjs"; -import OAS from "../../json/openapi.json"; -import { PluginLedgerConnectorCorda } from "../plugin-ledger-connector-corda"; - -export interface IFlowStatusResponseEndpointV1Options { - logLevel?: LogLevelDesc; - apiUrl: string; - holdingIDShortHash: string; - clientRequestID: string; - connector: PluginLedgerConnectorCorda; -} - -export class FlowStatusResponseEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "FlowStatusResponseEndpointV1"; - - private readonly log: Logger; - private readonly apiUrl: string; - public get className(): string { - return FlowStatusResponseEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IFlowStatusResponseEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.connector, `${fnTag} options.connector`); - Checks.nonBlankString(options.apiUrl, `${fnTag} options.apiUrl`); - - this.log = LoggerProvider.getOrCreate({ - label: "list-flow-status-response-endpoint-v1", - level: options.logLevel || "INFO", - }); - - try { - new URL(options.apiUrl); - } catch (err) { - throw new Error(`${fnTag} Invalid URL: ${options.apiUrl}`); - } - this.apiUrl = options.apiUrl; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid" - ]; - } - - /** - * Returns the endpoint path to be used when installing the endpoint into the - * API server of Cactus. - */ - public getPath(): string { - return this.oasPath.get["x-hyperledger-cactus"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cactus"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "getFlowV1#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - try { - if (this.apiUrl === undefined) - throw new InternalServerError("apiUrl option is necessary"); - const body = await this.options.connector.getFlow(req.body); - res.status(200); - res.json(body); - } catch (ex) { - const errorMsg = `${fnTag} Failed to perform request:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts deleted file mode 100644 index 11909b458d..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorCorda } from "../plugin-ledger-connector-corda"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorCorda; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - private readonly log: Logger; - - constructor( - public readonly opts: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = "GetPrometheusExporterMetricsEndpointV1#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} options.connector`); - - this.log = LoggerProvider.getOrCreate({ - label: "get-prometheus-exporter-metrics-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetPrometheusExporterMetrics#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - const resBody = await this.opts.connector.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/invoke-contract-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/invoke-contract-endpoint-v1.ts deleted file mode 100644 index 263d52296c..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/invoke-contract-endpoint-v1.ts +++ /dev/null @@ -1,114 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, - Configuration, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { - DefaultApi, - InvokeContractV1Request, - InvokeContractV1Response, -} from "../generated/openapi/typescript-axios"; - -export interface IInvokeContractEndpointV1Options { - logLevel?: LogLevelDesc; - apiUrl?: string; -} - -export class InvokeContractEndpointV1 implements IWebServiceEndpoint { - private readonly log: Logger; - private readonly apiUrl?: string; - - constructor(public readonly opts: IInvokeContractEndpointV1Options) { - const fnTag = "InvokeContractEndpointV1#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - - this.log = LoggerProvider.getOrCreate({ - label: "invoke-contract-endpoint-v1", - level: opts.logLevel || "INFO", - }); - - this.apiUrl = opts.apiUrl; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "InvokeContractEndpointV1#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - if (this.apiUrl === undefined) throw "apiUrl option is necessary"; - const resBody = await this.callInternalContainer(req.body); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } - - async callInternalContainer( - req: InvokeContractV1Request, - ): Promise { - const apiConfig = new Configuration({ basePath: this.apiUrl }); - const apiClient = new DefaultApi(apiConfig); - const res = await apiClient.invokeContractV1(req); - return res.data; - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-cpi-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-cpi-endpoint-v1.ts deleted file mode 100644 index 5483b981d1..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-cpi-endpoint-v1.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - registerWebServiceEndpoint, - handleRestEndpointException, -} from "@hyperledger/cactus-core"; - -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { InternalServerError } from "http-errors-enhanced-cjs"; -import OAS from "../../json/openapi.json"; -import { PluginLedgerConnectorCorda } from "../plugin-ledger-connector-corda"; -export interface IListCPIEndpointV1Options { - logLevel?: LogLevelDesc; - apiUrl: string; - connector: PluginLedgerConnectorCorda; -} - -export class ListCPIEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ListCPIEndpointV1"; - - private readonly log: Logger; - private readonly apiUrl: string; - - public get className(): string { - return ListCPIEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IListCPIEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.connector, `${fnTag} options.connector`); - Checks.nonBlankString(options.apiUrl, `${fnTag} options.apiUrl`); - - this.log = LoggerProvider.getOrCreate({ - label: "list-cpi-endpoint-v1", - level: options.logLevel || "INFO", - }); - - try { - new URL(options.apiUrl); - } catch (err) { - throw new Error(`${fnTag} Invalid URL: ${options.apiUrl}`); - } - this.apiUrl = options.apiUrl; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi" - ]; - } - - /** - * Returns the endpoint path to be used when installing the endpoint into the - * API server of Cactus. - */ - public getPath(): string { - return this.oasPath.get["x-hyperledger-cactus"].https.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cactus"].https.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "listCPIV1#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - if (this.apiUrl === undefined) - throw new InternalServerError("apiUrl option is necessary"); - const body = await this.options.connector.listCPI(req.body); - res.status(200); - res.json(body); - } catch (ex) { - const errorMsg = `${fnTag} Failed to perform request:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-flow-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-flow-endpoint-v1.ts deleted file mode 100644 index 64c7618d98..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-flow-endpoint-v1.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - registerWebServiceEndpoint, - handleRestEndpointException, -} from "@hyperledger/cactus-core"; - -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { InternalServerError } from "http-errors-enhanced-cjs"; -import OAS from "../../json/openapi.json"; -import { PluginLedgerConnectorCorda } from "../plugin-ledger-connector-corda"; - -export interface IFlowStatusEndpointV1Options { - logLevel?: LogLevelDesc; - apiUrl: string; - holdingIDShortHash: string; - connector: PluginLedgerConnectorCorda; -} - -export class FlowStatusEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "FlowStatusEndpointV1"; - - private readonly log: Logger; - private readonly apiUrl: string; - - public get className(): string { - return FlowStatusEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IFlowStatusEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.connector, `${fnTag} options.connector`); - Checks.nonBlankString(options.apiUrl, `${fnTag} options.apiUrl`); - - this.log = LoggerProvider.getOrCreate({ - label: "list-flow-status-endpoint-v1", - level: options.logLevel || "INFO", - }); - - try { - new URL(options.apiUrl); - } catch (err) { - throw new Error(`${fnTag} Invalid URL: ${options.apiUrl}`); - } - this.apiUrl = options.apiUrl; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow" - ]; - } - - /** - * Returns the endpoint path to be used when installing the endpoint into the - * API server of Cactus. - */ - public getPath(): string { - return this.oasPath.get["x-hyperledger-cactus"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cactus"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "listFlowV1#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - try { - if (this.apiUrl === undefined) - throw new InternalServerError("apiUrl option is necessary"); - const body = await this.options.connector.listFlows(req.body); - res.status(200); - res.json(body); - } catch (ex) { - const errorMsg = `${fnTag} Failed to perform request:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-flows-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-flows-endpoint-v1.ts deleted file mode 100644 index f867924eeb..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-flows-endpoint-v1.ts +++ /dev/null @@ -1,119 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, - Configuration, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { - DefaultApi, - ListFlowsV1Request, - ListFlowsV1Response, -} from "../generated/openapi/typescript-axios"; - -export interface IListFlowsEndpointV1Options { - logLevel?: LogLevelDesc; - apiUrl?: string; -} - -export class ListFlowsEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ListFlowsEndpointV1"; - - private readonly log: Logger; - private readonly apiUrl?: string; - - public get className(): string { - return ListFlowsEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IListFlowsEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(options, `${fnTag} options`); - - this.log = LoggerProvider.getOrCreate({ - label: "list-flows-endpoint-v1", - level: options.logLevel || "INFO", - }); - - this.apiUrl = options.apiUrl; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "ListFlowsEndpointV1#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - try { - if (this.apiUrl === undefined) throw "apiUrl option is necessary"; - const resBody = await this.callInternalContainer(req.body); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } - - async callInternalContainer( - req: ListFlowsV1Request, - ): Promise { - const apiConfig = new Configuration({ basePath: this.apiUrl }); - const apiClient = new DefaultApi(apiConfig); - const res = await apiClient.listFlowsV1(req); - return res.data; - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/network-map-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/network-map-endpoint-v1.ts deleted file mode 100644 index c3d69db55a..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/network-map-endpoint-v1.ts +++ /dev/null @@ -1,108 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, - Configuration, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { DefaultApi, NodeInfo } from "../generated/openapi/typescript-axios"; - -export interface INetworkMapEndpointV1Options { - logLevel?: LogLevelDesc; - apiUrl?: string; -} - -export class NetworkMapEndpointV1 implements IWebServiceEndpoint { - private readonly log: Logger; - private readonly apiUrl?: string; - - constructor(public readonly opts: INetworkMapEndpointV1Options) { - const fnTag = "NetworkMapEndpointV1#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - - this.log = LoggerProvider.getOrCreate({ - label: "network-map-endpoint-v1", - level: opts.logLevel || "INFO", - }); - - this.apiUrl = opts.apiUrl; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "NetworkMapEndpointV1#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - if (this.apiUrl === undefined) throw "apiUrl option is necessary"; - const resBody = await this.callInternalContainer(); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } - - async callInternalContainer(): Promise { - const apiConfig = new Configuration({ basePath: this.apiUrl }); - const apiClient = new DefaultApi(apiConfig); - const res = await apiClient.networkMapV1(); - return res.data; - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/start-flow-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/start-flow-endpoint-v1.ts deleted file mode 100644 index 7da6f8cf1f..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/start-flow-endpoint-v1.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - registerWebServiceEndpoint, - handleRestEndpointException, -} from "@hyperledger/cactus-core"; - -import { - Checks, - IAsyncProvider, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { InternalServerError } from "http-errors-enhanced-cjs"; -import OAS from "../../json/openapi.json"; -import { PluginLedgerConnectorCorda } from "../plugin-ledger-connector-corda"; - -export interface IStartFlowEndpointV1Options { - logLevel?: LogLevelDesc; - apiUrl: string; - connector: PluginLedgerConnectorCorda; -} - -export class StartFlowEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "StartFlowEndpointV1"; - - private readonly log: Logger; - private readonly apiUrl: string; - - public get className(): string { - return StartFlowEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IStartFlowEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.connector, `${fnTag} options.connector`); - Checks.nonBlankString(options.apiUrl, `${fnTag} options.apiUrl`); - - this.log = LoggerProvider.getOrCreate({ - label: "start-flow-endpoint-v1", - level: options.logLevel || "INFO", - }); - - try { - new URL(options.apiUrl); - } catch (err) { - throw new Error(`${fnTag} Invalid URL: ${options.apiUrl}`); - } - this.apiUrl = options.apiUrl; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow" - ]; - } - - /** - * Returns the endpoint path to be used when installing the endpoint into the - * API server of Cactus. - */ - public getPath(): string { - return this.oasPath.post["x-hyperledger-cactus"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cactus"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "startFlowV1#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - try { - if (this.apiUrl === undefined) - throw new InternalServerError("apiUrl option is necessary"); - const body = await this.options.connector.startFlow(req.body); - res.status(200); - res.json(body); - } catch (ex) { - const errorMsg = `${fnTag} Failed to perform request:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/corda-v4-deploy-and-invoke-contract.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/corda-v4-deploy-and-invoke-contract.test.ts deleted file mode 100644 index 000fc50cf0..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/corda-v4-deploy-and-invoke-contract.test.ts +++ /dev/null @@ -1,621 +0,0 @@ -import "jest-extended"; - -import { BAD_REQUEST, OK } from "http-errors-enhanced-cjs"; -import { v4 as internalIpV4 } from "internal-ip"; - -import { Configuration } from "@hyperledger/cactus-core-api"; -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; -import { - buildImageConnectorCordaServer, - buildImageCordaAllInOneV412, - Containers, - CordaTestLedger, - pruneDockerAllIfGithubAction, - SAMPLE_CORDAPP_DATA, -} from "@hyperledger/cactus-test-tooling"; -import { - SampleCordappEnum, - CordaConnectorContainer, -} from "@hyperledger/cactus-test-tooling"; - -import { - CordappDeploymentConfig, - DefaultApi as CordaApi, - DeployContractJarsV1Request, - FlowInvocationType, - InvokeContractV1Request, - DiagnoseNodeV1Request, - ListFlowsV1Request, - JvmTypeKind, - CordaRpcCredentials, -} from "../../../main/typescript/generated/openapi/typescript-axios/index"; - -import { createJvmBoolean } from "../../../main/typescript/jvm/serde/factory/create-jvm-boolean"; -import { createJvmLong } from "../../../main/typescript/jvm/serde/factory/create-jvm-long"; -import { createJvmCordaIdentityParty } from "../../../main/typescript/jvm/serde/factory/create-jvm-corda-identity-party"; -import { - createJvmCordaAmount, - createJvmCordaUniqueIdentifier, -} from "../../../main/typescript"; - -describe("Corda V4 Connector", () => { - const logLevel: LogLevelDesc = "INFO"; - const logLevelJvmApp: LogLevelDesc = "INFO"; - const logLevelJvmRoot: LogLevelDesc = "WARN"; - - const cInvalidParams = "sending invalid parameters"; - const fDiagnose = "diagnoseNodeV1"; - const fDeploy = "deployContractJarsV1"; - const fInvoke = "invokeContractV1"; - const fFlows = "listFlowsV1"; - const cWithoutParams = "not sending all required parameters"; - - const REG_EXP_UUID = new RegExp( - "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", - ); - - const log = LoggerProvider.getOrCreate({ - label: "corda-v4-deploy-and-invoke-contract.test.ts", - level: logLevel, - }); - - let apiClient: CordaApi; - let ledger: CordaTestLedger; - let connector: CordaConnectorContainer; - let testAppearsSuccessful = false; - let partyARpcPort: number; - let partyBRpcPort: number; - let publicSshPort: number; - let lanIp: string; - let rpcCredentialsA: CordaRpcCredentials; - let rpcCredentialsB: CordaRpcCredentials; - - afterAll(async () => { - if (testAppearsSuccessful !== true) { - log.error("Test appears to have failed. Logging container diagnostics"); - await Containers.logDiagnostics({ logLevel }); - } - }); - - beforeAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - beforeAll(async () => { - const imgLedger = await buildImageCordaAllInOneV412({ logLevel }); - const imgConnectorJvm = await buildImageConnectorCordaServer({ - logLevel, - }); - - ledger = new CordaTestLedger({ - imageName: imgLedger.imageName, - imageVersion: imgLedger.imageVersion, - logLevel, - sshPort: 2222, - rpcPortNotary: 10003, - rpcPortA: 10006, - rpcPortB: 10009, - }); - expect(ledger).toBeTruthy(); - - const ledgerContainer = await ledger.start(true); - expect(ledgerContainer).toBeTruthy(); - - await ledger.logDebugPorts(); - partyARpcPort = await ledger.getRpcAPublicPort(); - partyBRpcPort = await ledger.getRpcBPublicPort(); - log.info("Ledger container partyARpcPort: %d", partyARpcPort); - log.info("Ledger container partyBRpcPort: %d", partyBRpcPort); - - publicSshPort = await ledger.getSSHPublicPort(); - log.info("Ledger container publicSshPort: %d", publicSshPort); - - const internalIpOrUndefined = await internalIpV4(); - expect(internalIpOrUndefined).toBeTruthy(); - - lanIp = internalIpOrUndefined as string; - log.info(`Internal/LAN IP (based on default gateway): ${lanIp}`); - - rpcCredentialsA = { - hostname: lanIp, - port: partyARpcPort, - username: "user1", - password: "test", - }; - - rpcCredentialsB = { - hostname: lanIp, - port: partyBRpcPort, - username: "user1", - password: "test", - }; - - const springAppConfig = { - logging: { - level: { - root: logLevelJvmRoot, - "org.hyperledger.cactus": logLevelJvmApp, - }, - }, - cactus: { - corda: { - node: { host: lanIp }, - // TODO: parse the gradle build files to extract the credentials? - rpc: { port: partyARpcPort, username: "user1", password: "test" }, - }, - }, - }; - const springApplicationJson = JSON.stringify(springAppConfig); - const envVarSpringAppJson = `SPRING_APPLICATION_JSON=${springApplicationJson}`; - log.debug("Spring App Config Env Var: ", envVarSpringAppJson); - - connector = new CordaConnectorContainer({ - logLevel, - imageName: imgConnectorJvm.imageName, - imageVersion: imgConnectorJvm.imageVersion, - envVars: [envVarSpringAppJson], - }); - // Set to true if you are testing an image that you've built locally and have not - // yet uploaded to the container registry where it would be publicly available. - // Do not forget to set it back to `false` afterwards! - const skipContainerImagePull = true; - expect(CordaConnectorContainer).toBeTruthy(); - - const connectorContainer = await connector.start(skipContainerImagePull); - expect(connectorContainer).toBeTruthy(); - - await connector.logDebugPorts(); - const apiUrl = await connector.getApiLocalhostUrl(); - const config = new Configuration({ basePath: apiUrl }); - apiClient = new CordaApi(config); - }); - - afterAll(async () => { - if (!ledger) { - log.info("Ledger container falsy, skipping stop & destroy."); - return; - } - try { - await ledger.stop(); - } finally { - await ledger.destroy(); - } - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - afterAll(async () => { - if (!connector) { - log.info("Connector container falsy, skipping stop & destroy."); - return; - } - try { - await connector.stop(); - } finally { - await connector.destroy(); - } - }); - - it("Runs listFlowsV1()", async () => { - const flowsRes = await apiClient.listFlowsV1(); - expect(flowsRes.status).toEqual(200); - expect(flowsRes.data).toBeTruthy(); - expect(flowsRes.data.flowNames).toBeTruthy(); - log.debug(`apiClient.listFlowsV1() => ${JSON.stringify(flowsRes.data)}`); - }); - - it("Runs diagnoseNodeV1()", async () => { - const diagRes = await apiClient.diagnoseNodeV1(); - expect(diagRes.status).toEqual(200); - expect(diagRes.data).toBeTruthy(); - expect(diagRes.data.nodeDiagnosticInfo).toBeTruthy(); - - const ndi = diagRes.data.nodeDiagnosticInfo; - expect(ndi.cordapps).toBeTruthy(); - expect(ndi.cordapps).toBeArray(); - expect(ndi.cordapps).not.toBeEmpty(); - expect(Array.isArray(ndi.cordapps)).toBeTrue(); - expect(ndi.cordapps.length > 0).toBeTrue(); - - expect(ndi.vendor).toBeTruthy(); - expect(ndi.version).toBeTruthy(); - expect(ndi.revision).toBeTruthy(); - expect(ndi.platformVersion).toBeTruthy(); - - log.debug(`apiClient.diagnoseNodeV1() => ${JSON.stringify(diagRes.data)}`); - }); - - it(`Runs deployContractJarsV1() - ${SampleCordappEnum.ADVANCED_NEGOTIATION}`, async () => { - const cordappDeploymentConfigs: CordappDeploymentConfig[] = []; - - cordappDeploymentConfigs.push({ - cordappDir: - SAMPLE_CORDAPP_DATA[SampleCordappEnum.ADVANCED_NEGOTIATION] - .cordappDirPartyA, - cordaNodeStartCmd: "supervisorctl start corda-a", - - cordaJarPath: SAMPLE_CORDAPP_DATA[ - SampleCordappEnum.ADVANCED_NEGOTIATION - ].cordappDirPartyA.replace("cordapps", "corda.jar"), - - nodeBaseDirPath: SAMPLE_CORDAPP_DATA[ - SampleCordappEnum.ADVANCED_NEGOTIATION - ].cordappDirPartyA.replace("cordapps", ""), - - rpcCredentials: rpcCredentialsA, - - sshCredentials: { - hostKeyEntry: "not-used-right-now-so-this-does-not-matter... ;-(", - hostname: lanIp, - password: "root", - port: publicSshPort, - username: "root", - }, - }); - - cordappDeploymentConfigs.push({ - cordappDir: - SAMPLE_CORDAPP_DATA[SampleCordappEnum.ADVANCED_NEGOTIATION] - .cordappDirPartyB, - cordaNodeStartCmd: "supervisorctl start corda-b", - - cordaJarPath: SAMPLE_CORDAPP_DATA[ - SampleCordappEnum.ADVANCED_NEGOTIATION - ].cordappDirPartyB.replace("cordapps", "corda.jar"), - - nodeBaseDirPath: SAMPLE_CORDAPP_DATA[ - SampleCordappEnum.ADVANCED_NEGOTIATION - ].cordappDirPartyB.replace("cordapps", ""), - - rpcCredentials: rpcCredentialsB, - - sshCredentials: { - hostKeyEntry: "not-used-right-now-so-this-does-not-matter... ;-(", - hostname: lanIp, - password: "root", - port: publicSshPort, - username: "root", - }, - }); - - const jarFiles = await ledger.pullCordappJars( - SampleCordappEnum.ADVANCED_NEGOTIATION, - ); - - await ledger.cleanCordapp(SampleCordappEnum.ADVANCED_NEGOTIATION); - - const req: DeployContractJarsV1Request = { - jarFiles, - cordappDeploymentConfigs, - }; - const res = await apiClient.deployContractJarsV1(req); - expect(res).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data).toBeTruthy(); - expect(res.data.deployedJarFiles).toBeTruthy(); - expect(res.data.deployedJarFiles.length).toEqual(jarFiles.length); - }); - - it(`Validates Requests: - ${fDeploy} - ${cWithoutParams}`, async () => { - const req = { - cordappDeploymentConfigs: [], - } as unknown as DeployContractJarsV1Request; - const contractDeployment = apiClient.deployContractJarsV1(req); - await expect(contractDeployment).rejects.toMatchObject({ - response: { data: { status: BAD_REQUEST } }, - }); - }); - - it(`Validates Requests: - ${fDiagnose} - ${cInvalidParams}`, async () => { - const req = { fake: 4 } as unknown as DiagnoseNodeV1Request; - const diagnoseNodeRequest = apiClient.diagnoseNodeV1(req); - - await expect(diagnoseNodeRequest).rejects.toMatchObject({ - response: { data: { status: BAD_REQUEST } }, - }); - }); - - it(`Validates Requests: - ${fInvoke} - ${cWithoutParams}`, async () => { - const req = { - flowFullClassName: "net.corda.samples.obligation.flows.IOUIssueFlow", - flowInvocationType: FlowInvocationType.TrackedFlowDynamic, - timeoutMs: 60000, - } as InvokeContractV1Request; - const contractInvocation = apiClient.invokeContractV1(req); - await expect(contractInvocation).rejects.toMatchObject({ - response: { - data: { - status: BAD_REQUEST, - }, - }, - }); - }); - - it(`Validates Requests: - ${fDeploy} - ${cInvalidParams} - rpcCredentials`, async () => { - const req = { - jarFiles: [], - cordappDeploymentConfigs: [ - { - sshCredentials: { - hostKeyEntry: "fake", - username: "fake", - password: "fake", - hostname: "localhost", - port: -1, - }, - // omitting the rpcCredentials property - cordaNodeStartCmd: null as unknown as string, - cordappDir: "/does/not/exist/diretory", - cordaJarPath: "/does/not/exist/", - nodeBaseDirPath: "/does/not/exist/", - } as CordappDeploymentConfig, - ], - fake: 4, - }; - const contractDeployment = apiClient.deployContractJarsV1(req); - await expect(contractDeployment).rejects.toMatchObject({ - response: { data: { status: BAD_REQUEST } }, - }); - }); - - it(`Validates Requests: - ${fDeploy} - ${cInvalidParams} - sshCredentials`, async () => { - const req = { - jarFiles: [], - cordappDeploymentConfigs: [ - { - // omitting the sshCredentials property - rpcCredentials: { - hostname: "-", - port: -1, - username: "-", - password: "-", - }, - cordaNodeStartCmd: null as unknown as string, - cordappDir: "/does/not/exist/diretory", - cordaJarPath: "/does/not/exist/", - nodeBaseDirPath: "/does/not/exist/", - } as CordappDeploymentConfig, - ], - fake: 4, - }; - const contractDeployment = apiClient.deployContractJarsV1(req); - await expect(contractDeployment).rejects.toMatchObject({ - response: { data: { status: BAD_REQUEST } }, - }); - }); - - it(`Validates Requests: - ${fFlows} - ${cInvalidParams}`, async () => { - const req = { fake: 4 } as ListFlowsV1Request; - const flowListRequest = apiClient.listFlowsV1(req); - await expect(flowListRequest).rejects.toMatchObject({ - response: { data: { status: BAD_REQUEST } }, - }); - }); - - it(`Validates Requests: - ${fInvoke} - ${cInvalidParams}`, async () => { - const req: InvokeContractV1Request = { - flowFullClassName: "net.corda.samples.obligation.flows.IOUIssueFlow", - flowInvocationType: FlowInvocationType.TrackedFlowDynamic, - params: [{}], - timeoutMs: 60000, - fake: 4, - } as unknown as InvokeContractV1Request; - - const contractInvocation = apiClient.invokeContractV1(req); - await expect(contractInvocation).rejects.toMatchObject({ - response: { data: { status: BAD_REQUEST } }, - }); - }); - - it("Runs invokeContractV1() - net.corda.samples.negotiation.flows.ProposalFlow$Initiator", async () => { - const networkMapRes = await apiClient.networkMapV1({}); - - const partyB = networkMapRes.data.find((it) => - it.legalIdentities.some((it2) => it2.name.organisation === "PartyB"), - ); - - if (process.env.VERBOSE === "true") { - const networkMapJson = JSON.stringify(networkMapRes.data, null, 4); - console.log("Corda Network Map Snapshot JSON:", networkMapJson); - } - - if (!partyB) { - throw new Error("PartyB was falsy. Cannot continue the test."); - } - - if (!partyB.legalIdentities[0]) { - throw new Error( - "PartyB had no legalIdentities. Cannot continue the test.", - ); - } - - const req: InvokeContractV1Request = { - flowFullClassName: - "net.corda.samples.negotiation.flows.ProposalFlow$Initiator", - flowInvocationType: FlowInvocationType.TrackedFlowDynamic, - params: [ - createJvmBoolean(true), - createJvmLong(42), - createJvmCordaIdentityParty({ party: partyB.legalIdentities[0] }), - ], - timeoutMs: 60000, - }; - - const contractInvocation = apiClient.invokeContractV1(req); - await expect(contractInvocation).resolves.toMatchObject({ - status: OK, - data: { - success: true, - callOutput: expect.toBeString(), - flowId: expect.stringMatching(REG_EXP_UUID), - progress: expect.toBeArray(), - }, - }); - }); - - it(`Runs deployContractJarsV1() - ${SampleCordappEnum.ADVANCED_OBLIGATION}`, async () => { - // Using the ADVANCED_NEGOTIATION sample app data here because that's the - // one that has the node up and running within the ledger container so - // even though we are deploying an obligation cordapp, we need to use the - // deployment config associated with the negotiation one. - const sampleAppNegotiation = SampleCordappEnum.ADVANCED_NEGOTIATION; - const sampleAppObligation = SampleCordappEnum.ADVANCED_OBLIGATION; - const sampleAppData = SAMPLE_CORDAPP_DATA[sampleAppNegotiation]; - - const cordappDeploymentConfigs: CordappDeploymentConfig[] = []; - - cordappDeploymentConfigs.push({ - cordappDir: sampleAppData.cordappDirPartyA, - cordaNodeStartCmd: "supervisorctl start corda-a", - - cordaJarPath: sampleAppData.cordappDirPartyA.replace( - "cordapps", - "corda.jar", - ), - - nodeBaseDirPath: sampleAppData.cordappDirPartyA.replace("cordapps", ""), - - rpcCredentials: rpcCredentialsA, - - sshCredentials: { - hostKeyEntry: "FIXME_this_does_not_yet_get_verified", - hostname: lanIp, - password: "root", - port: publicSshPort, - username: "root", - }, - }); - - cordappDeploymentConfigs.push({ - cordappDir: sampleAppData.cordappDirPartyB, - cordaNodeStartCmd: "supervisorctl start corda-b", - - cordaJarPath: sampleAppData.cordappDirPartyB.replace( - "cordapps", - "corda.jar", - ), - - nodeBaseDirPath: sampleAppData.cordappDirPartyB.replace("cordapps", ""), - - rpcCredentials: rpcCredentialsB, - - sshCredentials: { - hostKeyEntry: "FIXME_this_does_not_yet_get_verified", - hostname: lanIp, - password: "root", - port: publicSshPort, - username: "root", - }, - }); - - const jarFiles = await ledger.pullCordappJars(sampleAppObligation); - - const req: DeployContractJarsV1Request = { - jarFiles, - cordappDeploymentConfigs, - }; - const res = await apiClient.deployContractJarsV1(req); - expect(res).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data).toBeTruthy(); - expect(res.data.deployedJarFiles).toBeTruthy(); - expect(res.data.deployedJarFiles.length).toEqual(jarFiles.length); - }); - - /** - * FIXME: Need to fix this test case. For now it hangs with the ledger logging the mesage below. - * If you list the flows available, it shows that the flows we are invoking in this test case is - * available on the corda node so it is not yet know what is the actual problem since the .jar files - * are installed by the previous test case but it claims that they are not there... - * - * W 00:15:38 190 SingleThreadedStateMachineManager. - Unable to initiate flow from O=PartyA, L=London, C=GB - * (appName=ADVANCED_OBLIGATION_workflows-1.0 flowVersion=1), sending to the flow hospital - * - * net.corda.node.services.statemachine.SessionRejectException$UnknownClass: Don't know net.corda.samples.obligation.flows.IOUIssueFlow - * at net.corda.node.services.statemachine.SingleThreadedStateMachineManager.getInitiatedFlowFactory(SingleThreadedStateMachineManager.kt:899) ~[corda-node-4.12-SNAPSHOT.jar:?] - * at net.corda.node.services.statemachine.SingleThreadedStateMachineManager.onSessionInit(SingleThreadedStateMachineManager.kt:863) ~[corda-node-4.12-SNAPSHOT.jar:?] - * at net.corda.node.services.statemachine.SingleThreadedStateMachineManager.onSessionMessage(SingleThreadedStateMachineManager.kt:817) ~[corda-node-4.12-SNAPSHOT.jar:?] - * at net.corda.node.services.statemachine.SingleThreadedStateMachineManager.deliverExternalEvent(SingleThreadedStateMachineManager.kt:786) ~[corda-node-4.12-SNAPSHOT.jar:?] - * at net.corda.node.services.statemachine.SingleThreadedStateMachineManager$start$7$1.invoke$lambda$0(SingleThreadedStateMachineManager.kt:236) ~[corda-node-4.12-SNAPSHOT.jar:?] - * at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?] - * at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] - * at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?] - * at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] - * at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] - * at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:63) ~[corda-node-4.12-SNAPSHOT.jar:?] - * - * W 00:15:38 190 StaffedFlowHospital. - O=PartyA, L=London, C=GB has sent a flow request for an unknown flow net.corda.samples.obligation.flows.IOUIssueFlow. Install the missing CorDapp this flow belongs to and restart. - * W 00:15:38 190 StaffedFlowHospital. - If you know it's safe to ignore this flow request then it can be deleted permanently using the killFlow RPC and the UUID [a0078a26-15ae-4328-9cbe-afe321194177] (from the node shell you can run 'flow kill [a0078a26-15ae-4328-9cbe-afe321194177]'). - * BE VERY CAUTIOUS OF THIS SECOND APPROACH AS THE REQUEST MAY CONTAIN A NOTARISED TRANSACTION THAT NEEDS TO BE RECORDED IN YOUR VAULT. - * - * W 00:16:32 110 StaffedFlowHospital. - There are 1 erroneous session initiations kept for overnight observation. Erroneous session initiation ids: [a0078a26-15ae-4328-9cbe-afe321194177] - * - */ - it("Runs invokeContractV1() - net.corda.samples.obligation.flows.IOUIssueFlow", async () => { - const { data: netMap } = await apiClient.networkMapV1(); - const pNameA = "PartyA"; - const pNameB = "PartyB"; - - const partyA = netMap.find((it) => - it.legalIdentities.some((it2) => it2.name.organisation === pNameA), - ); - if (!partyA) { - throw new TypeError(`No Party with name ${pNameA} found in Network Map`); - } - - const partyB = netMap.find((it) => - it.legalIdentities.some((it2) => it2.name.organisation === pNameB), - ); - if (!partyB) { - throw new TypeError(`No Party with name ${pNameB} found in Network Map`); - } - - const flowsRes = await apiClient.listFlowsV1(); - log.debug("flowRes.data", flowsRes.data); - - const req: InvokeContractV1Request = { - flowFullClassName: "net.corda.samples.obligation.flows.IOUIssueFlow", - flowInvocationType: FlowInvocationType.TrackedFlowDynamic, - params: [ - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.samples.obligation.states.IOUState", - }, - - jvmCtorArgs: [ - createJvmCordaAmount({ amount: 42, currencyCode: "USD" }), - createJvmCordaIdentityParty({ party: partyA.legalIdentities[0] }), - createJvmCordaIdentityParty({ party: partyB.legalIdentities[0] }), - createJvmCordaAmount({ amount: 1, currencyCode: "USD" }), - createJvmCordaUniqueIdentifier({ - uniqueidentifier: "7fc2161e-f8d0-4c86-a596-08326bdafd56", - }), - ], - }, - ], - timeoutMs: 60000, - }; - - const contractInvocation = apiClient.invokeContractV1(req); - - await expect(contractInvocation).resolves.toMatchObject({ - status: OK, - data: { - success: true, - callOutput: { - id: expect.toBeString(), - inputs: expect.toBeArray(), - networkParametersHash: expect.toBeString(), - notary: expect.not.toBeEmpty(), - sigs: expect.toBeArray(), - tx: expect.toBeObject(), - }, - flowId: expect.stringMatching(REG_EXP_UUID), - progress: expect.toBeArray(), - }, - }); - - testAppearsSuccessful = true; - log.debug("The test appears to be successfully finished."); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/corda-v5-x/corda-v5-flow.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/corda-v5-x/corda-v5-flow.test.ts deleted file mode 100644 index 338ff7982f..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/corda-v5-x/corda-v5-flow.test.ts +++ /dev/null @@ -1,324 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { - CordaV5TestLedger, - Containers, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - IListenOptions, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { - PluginLedgerConnectorCorda, - CordaVersion, -} from "../../../../main/typescript/plugin-ledger-connector-corda"; -import { DefaultApi } from "../../../../main/typescript/generated/openapi/typescript-axios/index"; - -const logLevel: LogLevelDesc = "TRACE"; - -import http from "http"; -import { extractShortHash } from "./../../../../../../cactus-test-tooling/src/main/typescript/corda/corda-v5-test-ledger"; -import express from "express"; -import bodyParser from "body-parser"; -import { AddressInfo } from "net"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -describe("Corda Test Case", () => { - const cordaV5TestLedger = new CordaV5TestLedger(); - let apiClient: DefaultApi; - const expressApp = express(); - const server = http.createServer(expressApp); - let plugin: PluginLedgerConnectorCorda; - - beforeAll(async () => { - await cordaV5TestLedger.start(); - expect(cordaV5TestLedger).toBeTruthy(); - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const sshConfig = await cordaV5TestLedger.getSshConfig(); - - plugin = new PluginLedgerConnectorCorda({ - instanceId: uuidv4(), - sshConfigAdminShell: sshConfig, - corDappsDir: "", - logLevel, - cordaVersion: CordaVersion.CORDA_V5, - apiUrl: "https://127.0.0.1:8888", - }); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - const config = new Configuration({ basePath: apiHost }); - await plugin.registerWebServices(expressApp); - apiClient = new DefaultApi(config); - }); - afterAll(async () => { - await cordaV5TestLedger.stop(); - await cordaV5TestLedger.destroy(); - await Servers.shutdown(server); - }); - let shortHashID: string; - it("Listing VNodes", async () => { - const container = cordaV5TestLedger.getContainer(); - const cmd = ["./gradlew", "listVNodes"]; - const timeout = 180000; // 3 minutes - const cwd = "/CSDE-cordapp-template-kotlin"; - shortHashID = await Containers.exec(container, cmd, timeout, logLevel, cwd); - }); - - describe("Endpoint Testing", () => { - let shortHashAlice = ""; - let shortHashBob = ""; - let shortHashCharlie = ""; - let shortHashDave = ""; - it("Extract short hash for Alice", () => { - shortHashAlice = extractShortHash(shortHashID, "Alice"); - expect(shortHashAlice).toBeTruthy(); - expect(`Short hash ID for Alice: ${shortHashAlice}`).toMatch( - /Short hash ID for Alice:/, - ); - console.log(`Short hash ID for Alice: ${shortHashAlice}`); - }); - it("Extract short hash for Bob", () => { - shortHashBob = extractShortHash(shortHashID, "Bob"); - expect(shortHashBob).toBeTruthy(); - expect(`Short hash ID for Bob: ${shortHashBob}`).toMatch( - /Short hash ID for Bob:/, - ); - console.log(`Short hash ID for Bob: ${shortHashBob}`); - }); - it("Extract short hash for Charlie", () => { - shortHashCharlie = extractShortHash(shortHashID, "Charlie"); - expect(typeof shortHashCharlie === "string").toBe(true); - expect(shortHashCharlie).toBeTruthy(); - expect(`Short hash ID for Charlie: ${shortHashCharlie}`).toMatch( - /Short hash ID for Charlie:/, - ); - console.log(`Short hash ID for Charlie: ${shortHashCharlie}`); - }); - it("Extract short hash for Dave", () => { - shortHashDave = extractShortHash(shortHashID, "Dave"); - expect(shortHashDave).toBeTruthy(); - expect(`Short hash ID for Dave: ${shortHashDave}`).toMatch( - /Short hash ID for Dave:/, - ); - console.log(`Short hash ID for Dave: ${shortHashDave}`); - }); - - it("Listing CPIs", async () => { - const req = { - username: "admin", - password: "admin", - rejectUnauthorized: false, - }; - const listCPI = await apiClient.listCpiV1(req); - expect(listCPI).toBeTruthy(); - }); - test("Simulate conversation between Alice and Bob", async () => { - const username = "admin"; - const password = "admin"; - const rejectUnauthorized = false; - //1. Alice creates a new chat - const aliceCreateChat = { - username, - password, - rejectUnauthorized, - holdingIDShortHash: shortHashAlice, - clientRequestId: "create-1", - flowClassName: - "com.r3.developers.csdetemplate.utxoexample.workflows.CreateNewChatFlow", - requestBody: { - chatName: "Chat with Bob", - otherMember: "CN=Bob, OU=Test Dept, O=R3, L=London, C=GB", - message: "Hello Bob", - }, - }; - let startflowChat = await apiClient.startFlowV1(aliceCreateChat); - expect(startflowChat).toBeTruthy(); - - //2. Bob lists his chats - const bobListChats = { - username, - password, - rejectUnauthorized, - holdingIDShortHash: shortHashBob, - clientRequestId: "list-1", - flowClassName: - "com.r3.developers.csdetemplate.utxoexample.workflows.ListChatsFlow", - requestBody: {}, - }; - startflowChat = await apiClient.startFlowV1(bobListChats); - expect(startflowChat).toBeTruthy(); - const flowResult = - startflowChat.data !== null && startflowChat.data !== undefined - ? startflowChat.data.flowResult - : null; - const chatWithBobId = (() => { - if (typeof flowResult === "string") { - const parseFlowResult = JSON.parse(flowResult); - const chatWithBobObj = parseFlowResult.find( - (item: { chatName: string }) => item.chatName === "Chat with Bob", - ); - return chatWithBobObj && "id" in chatWithBobObj - ? chatWithBobObj.id - : undefined; - } - })(); - //3. Bob updates chat twice - const bobUpdate1 = { - username, - password, - rejectUnauthorized, - holdingIDShortHash: shortHashBob, - clientRequestId: "update-1", - flowClassName: - "com.r3.developers.csdetemplate.utxoexample.workflows.UpdateChatFlow", - requestBody: { - id: chatWithBobId, - message: "Hi Alice", - }, - }; - const bobUpdate1Response = await apiClient.startFlowV1(bobUpdate1); - expect(bobUpdate1Response).toBeTruthy(); - const bobUpdate2 = { - username, - password, - rejectUnauthorized, - holdingIDShortHash: shortHashBob, - clientRequestId: "update-2", - flowClassName: - "com.r3.developers.csdetemplate.utxoexample.workflows.UpdateChatFlow", - requestBody: { - id: chatWithBobId, - message: "How are you today?", - }, - }; - const bobUpdate2Response = await apiClient.startFlowV1(bobUpdate2); - expect(bobUpdate2Response).toBeTruthy(); - - //4. Alice lists chat - const aliceListsChat = { - username, - password, - rejectUnauthorized, - holdingIDShortHash: shortHashAlice, - clientRequestId: "list-2", - flowClassName: - "com.r3.developers.csdetemplate.utxoexample.workflows.ListChatsFlow", - requestBody: {}, - }; - const aliceList2Response = await apiClient.startFlowV1(aliceListsChat); - expect(aliceList2Response).toBeTruthy(); - - //5. Alice checks the history of the chat with Bob - const aliceHistoryRequest = { - username, - password, - rejectUnauthorized, - holdingIDShortHash: shortHashAlice, - clientRequestId: "get-1", - flowClassName: - "com.r3.developers.csdetemplate.utxoexample.workflows.GetChatFlow", - requestBody: { - id: chatWithBobId, - numberOfRecords: "4", - }, - }; - const aliceHistoryResponse = - await apiClient.startFlowV1(aliceHistoryRequest); - expect(aliceHistoryResponse).toBeTruthy(); - - //6. Alice replies to Bob - const aliceReply = { - username, - password, - rejectUnauthorized, - holdingIDShortHash: shortHashAlice, - clientRequestId: "update-4", - flowClassName: - "com.r3.developers.csdetemplate.utxoexample.workflows.UpdateChatFlow", - requestBody: { - id: chatWithBobId, - message: "I am very well thank you", - }, - }; - - const aliceReplyResponse = await apiClient.startFlowV1(aliceReply); - expect(aliceReplyResponse).toBeTruthy(); - - //7. Bob gets the chat history - const bobHistoryRequest = { - username, - password, - rejectUnauthorized, - holdingIDShortHash: shortHashBob, - clientRequestId: "get-2", - flowClassName: - "com.r3.developers.csdetemplate.utxoexample.workflows.GetChatFlow", - requestBody: { - id: chatWithBobId, - numberOfRecords: "2", - }, - }; - const bobHistoryResponse = await apiClient.startFlowV1(bobHistoryRequest); - expect(bobHistoryResponse).toBeTruthy(); - - //8. List Flows Endpoint Test - const queryVar = { - username, - password, - rejectUnauthorized, - holdingIDShortHash: shortHashBob, - }; - const response = await apiClient.listFlowV1(queryVar); - expect(response).toBeTruthy(); - }); - - describe("Negative Testing", () => { - it("Invalid username and password", async () => { - const request = { - username: "invalidUsername", - password: "invalidPassword", - rejectUnauthorized: false, - }; - try { - await apiClient.listCpiV1(request); - fail("Expected an error for unauthorized access but it succeeded."); - } catch (error) { - expect(error).toBeDefined(); - } - }); - - it("Invalid flow class name", async () => { - const invalidFlowName = "nonExistentFlow"; - const request = { - username: "admin", - password: "admin", - rejectUnauthorized: false, - holdingIDShortHash: shortHashBob, - clientRequestId: "test-1", - flowClassName: invalidFlowName, - requestBody: { - chatName: "Test-1", - otherMember: "CN=Bob, OU=Test Dept, O=R3, L=London, C=GB", - message: "Testing", - }, - }; - try { - await apiClient.startFlowV1(request); - } catch (error) { - expect(error).toBeDefined(); - } - }); - }); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/flow-database-access-v4.8.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/flow-database-access-v4.8.test.ts deleted file mode 100644 index 5b9ce9a553..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/flow-database-access-v4.8.test.ts +++ /dev/null @@ -1,218 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { v4 as internalIpV4 } from "internal-ip"; - -import { - Containers, - CordaTestLedger, - pruneDockerAllIfGithubAction, - CordaConnectorContainer, - SampleCordappEnum, -} from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -import { - CordappDeploymentConfig, - DefaultApi as CordaApi, - DeployContractJarsV1Request, - FlowInvocationType, - InvokeContractV1Request, -} from "../../../main/typescript/generated/openapi/typescript-axios/index"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { createJvmString } from "../../../main/typescript/jvm/serde/factory/create-jvm-string"; -import { createJvmInt } from "../../../main/typescript"; - -const testCase = "Tests are passing on the JVM side"; -const logLevel: LogLevelDesc = "INFO"; -const logLevelJvmApp: LogLevelDesc = "INFO"; -const logLevelJvmRoot: LogLevelDesc = "WARN"; - -test.onFailure(async () => { - await Containers.logDiagnostics({ logLevel }); -}); - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const ledger = new CordaTestLedger({ - imageName: "ghcr.io/hyperledger/cactus-corda-4-8-all-in-one-flowdb", - imageVersion: "2024-07-08-hotfix-1", - logLevel, - rpcPortA: 10006, // @see: ./tools/docker/corda-all-in-one/corda-v4_8-flowdb/build.gradle - }); - t.ok(ledger, "CordaTestLedger v4.8 instantaited OK"); - - test.onFinish(async () => { - await ledger.stop(); - await ledger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - const ledgerContainer = await ledger.start(false); - t.ok( - ledgerContainer, - "CordaTestLedger v4.8 container truthy post-start() OK", - ); - - await ledger.logDebugPorts(); - const partyARpcPort = await ledger.getRpcAPublicPort(); - - const jarFiles = await ledger.pullCordappJars(SampleCordappEnum.BASIC_FLOW); - t.comment(`Fetched ${jarFiles.length} cordapp jars OK`); - - const internalIpOrUndefined = await internalIpV4(); - t.ok(internalIpOrUndefined, "Determined LAN IPv4 address successfully OK"); - const internalIp = internalIpOrUndefined as string; - t.comment(`Internal IP (based on default gateway): ${internalIp}`); - - const partyARpcUsername = "user1"; - const partyARpcPassword = "test"; - const springAppConfig = { - logging: { - level: { - root: logLevelJvmRoot, - "net.corda": logLevelJvmRoot, - "org.hyperledger.cactus": logLevelJvmApp, - "org.hyperledger.cacti": logLevelJvmApp, - }, - }, - cactus: { - corda: { - node: { host: internalIp }, - rpc: { - port: partyARpcPort, - username: partyARpcUsername, - password: partyARpcPassword, - }, - }, - }, - }; - const springApplicationJson = JSON.stringify(springAppConfig); - const envVarSpringAppJson = `SPRING_APPLICATION_JSON=${springApplicationJson}`; - t.comment(envVarSpringAppJson); - - const connector = new CordaConnectorContainer({ - logLevel, - envVars: [envVarSpringAppJson], - }); - t.ok(CordaConnectorContainer, "CordaConnectorContainer instantiated OK"); - - test.onFinish(async () => { - try { - await connector.stop(); - } finally { - await connector.destroy(); - } - }); - - const connectorContainer = await connector.start(false); - t.ok(connectorContainer, "CordaConnectorContainer started OK"); - - await connector.logDebugPorts(); - const apiUrl = await connector.getApiLocalhostUrl(); - const config = new Configuration({ basePath: apiUrl }); - const apiClient = new CordaApi(config); - - const flowsRes = await apiClient.listFlowsV1(); - t.ok(flowsRes.status === 200, "flowsRes.status === 200 OK"); - t.ok(flowsRes.data, "flowsRes.data truthy OK"); - t.ok(flowsRes.data.flowNames, "flowsRes.data.flowNames truthy OK"); - t.comment(`apiClient.listFlowsV1() => ${JSON.stringify(flowsRes.data)}`); - - const cordappDeploymentConfigs: CordappDeploymentConfig[] = []; - const depReq: DeployContractJarsV1Request = { - jarFiles, - cordappDeploymentConfigs, - }; - const depRes = await apiClient.deployContractJarsV1(depReq); - t.ok(depRes, "Jar deployment response truthy OK"); - t.equal(depRes.status, 200, "Jar deployment status code === 200 OK"); - t.ok(depRes.data, "Jar deployment response body truthy OK"); - t.ok(depRes.data.deployedJarFiles, "Jar deployment body deployedJarFiles OK"); - t.equal( - depRes.data.deployedJarFiles.length, - jarFiles.length, - "Deployed jar file count equals count in request OK", - ); - - const myToken = "myToken"; - const initialValue = 42; - const finalValue = 11; - - // add a new token value - const reqAdd: InvokeContractV1Request = { - timeoutMs: 60000, - flowFullClassName: "net.corda.samples.flowdb.AddTokenValueFlow", - flowInvocationType: FlowInvocationType.FlowDynamic, - params: [ - createJvmString({ - data: myToken, - }), - createJvmInt(initialValue), - ], - }; - - const resAdd = await apiClient.invokeContractV1(reqAdd); - t.ok(resAdd, "InvokeContractV1Request truthy OK"); - t.equal(resAdd.status, 200, "InvokeContractV1Request status code === 200 OK"); - - // query a token value - const reqQuery: InvokeContractV1Request = { - timeoutMs: 60000, - flowFullClassName: "net.corda.samples.flowdb.QueryTokenValueFlow", - flowInvocationType: FlowInvocationType.FlowDynamic, - params: [ - createJvmString({ - data: myToken, - }), - ], - }; - - const resQuery = await apiClient.invokeContractV1(reqQuery); - t.ok(resQuery, "InvokeContractV1Request truthy OK"); - t.equal( - resQuery.status, - 200, - "InvokeContractV1Request status code === 200 OK", - ); - t.equal( - resQuery.data.callOutput, - initialValue.toString(), - "token value is equal to initialValue OK", - ); - - // update a token value - const reqUpd: InvokeContractV1Request = { - timeoutMs: 60000, - flowFullClassName: "net.corda.samples.flowdb.UpdateTokenValueFlow", - flowInvocationType: FlowInvocationType.FlowDynamic, - params: [ - createJvmString({ - data: myToken, - }), - createJvmInt(finalValue), - ], - }; - - const resUpd = await apiClient.invokeContractV1(reqUpd); - t.ok(resUpd, "InvokeContractV1Request truthy OK"); - t.equal(resUpd.status, 200, "InvokeContractV1Request status code === 200 OK"); - - // query a token value - const resQueryFinal = await apiClient.invokeContractV1(reqQuery); - t.ok(resQueryFinal, "InvokeContractV1Request truthy OK"); - t.equal( - resQueryFinal.status, - 200, - "InvokeContractV1Request status code === 200 OK", - ); - t.equal( - resQueryFinal.data.callOutput, - finalValue.toString(), - "token value is equal to finalValue OK", - ); - - t.end(); -}); diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/monitor-transactions-v4.8.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/monitor-transactions-v4.8.test.ts deleted file mode 100644 index ed52ff6a83..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/monitor-transactions-v4.8.test.ts +++ /dev/null @@ -1,836 +0,0 @@ -/** - * Test state change monitoring interface in Kotlin Corda v4 connector component. - */ - -// Contants: Log Levels -const testLogLevel: LogLevelDesc = "debug"; -const sutLogLevel: LogLevelDesc = "info"; - -// Contants: Test ledger -const ledgerImageName = - "ghcr.io/hyperledger/cactus-corda-4-8-all-in-one-obligation"; -const ledgerImageVersion = "2022-03-31-28f0cbf--1956"; -const partyARpcUsername = "user1"; -const partyARpcPassword = "password"; -const partyBRpcUsername = partyARpcUsername; -const partyBRpcPassword = partyARpcPassword; -const stateToMonitor = "net.corda.samples.example.states.IOUState"; -const flowToInvoke = "net.corda.samples.example.flows.ExampleFlow$Initiator"; -const testAppId = "monitor-transactions-test-app"; - -// Contants: Kotlin connector server -const kotlinServerImageName = - "ghcr.io/hyperledger/cactus-connector-corda-server"; -const kotlinServerImageVersion = "2022-05-26-0ff7407--pr-2021"; - -import "jest-extended"; -import { v4 as internalIpV4 } from "internal-ip"; - -import { - CordaTestLedger, - SampleCordappEnum, - CordaConnectorContainer, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - CordappDeploymentConfig, - FlowInvocationType, - InvokeContractV1Request, - JvmTypeKind, - PublicKey, -} from "../../../main/typescript/generated/openapi/typescript-axios/index"; -import { CordaApiClient } from "../../../main/typescript/api-client/corda-api-client"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { Subscription } from "rxjs"; - -// Unit Test logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "kotlin-server-monitor-transactions-v4.8.test", - level: testLogLevel, -}); - -////////////////////////////////// -// Helper Functions -////////////////////////////////// - -async function deployContract( - apiClient: CordaApiClient, - ledger: CordaTestLedger, - rpcPort: number, - internalIp: string, -) { - log.info("deployContract() called..."); - - const sshConfig = await ledger.getSshConfig(); - const corDappsDirPartyA = await ledger.getCorDappsDirPartyA(); - - const cdcA: CordappDeploymentConfig = { - cordappDir: corDappsDirPartyA, - cordaNodeStartCmd: "supervisorctl start corda-a", - cordaJarPath: - "/samples-kotlin/Advanced/obligation-cordapp/build/nodes/ParticipantA/corda.jar", - nodeBaseDirPath: - "/samples-kotlin/Advanced/obligation-cordapp/build/nodes/ParticipantA/", - rpcCredentials: { - hostname: internalIp, - port: rpcPort, - username: partyARpcUsername, - password: partyARpcPassword, - }, - sshCredentials: { - hostKeyEntry: "foo", - hostname: internalIp, - password: "root", - port: sshConfig.port as number, - username: sshConfig.username as string, - }, - }; - - const partyBRpcPort = await ledger.getRpcBPublicPort(); - const corDappsDirPartyB = await ledger.getCorDappsDirPartyB(); - - const cdcB: CordappDeploymentConfig = { - cordappDir: corDappsDirPartyB, - cordaNodeStartCmd: "supervisorctl start corda-b", - cordaJarPath: - "/samples-kotlin/Advanced/obligation-cordapp/build/nodes/ParticipantB/corda.jar", - nodeBaseDirPath: - "/samples-kotlin/Advanced/obligation-cordapp/build/nodes/ParticipantB/", - rpcCredentials: { - hostname: internalIp, - port: partyBRpcPort, - username: partyBRpcUsername, - password: partyBRpcPassword, - }, - sshCredentials: { - hostKeyEntry: "foo", - hostname: internalIp, - password: "root", - port: sshConfig.port as number, - username: sshConfig.username as string, - }, - }; - - const cordappDeploymentConfigs: CordappDeploymentConfig[] = [cdcA, cdcB]; - log.debug("cordappDeploymentConfigs:", cordappDeploymentConfigs); - - const jarFiles = await ledger.pullCordappJars( - SampleCordappEnum.BASIC_CORDAPP, - ); - expect(jarFiles).toBeTruthy(); - - const deployRes = await apiClient.deployContractJarsV1({ - jarFiles, - cordappDeploymentConfigs, - }); - expect(deployRes.data.deployedJarFiles.length).toBeGreaterThan(0); - - const flowsRes = await apiClient.listFlowsV1(); - expect(flowsRes.data.flowNames).toContain(flowToInvoke); -} - -async function invokeContract(apiClient: CordaApiClient, publicKey: PublicKey) { - const req: InvokeContractV1Request = { - timeoutMs: 60000, - flowFullClassName: flowToInvoke, - flowInvocationType: FlowInvocationType.FlowDynamic, - params: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.Integer", - }, - primitiveValue: 42, - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.Party", - }, - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.CordaX500Name", - }, - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "ParticipantB", - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "New York", - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "US", - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: - "org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl", - }, - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: publicKey?.algorithm, - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: publicKey?.format, - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: publicKey?.encoded, - }, - ], - }, - ], - }, - ], - } as unknown as InvokeContractV1Request; - - const res = await apiClient.invokeContractV1(req); - expect(res).toBeTruthy(); - expect(res.status).toBe(200); - expect(res.data.success).toBeTrue(); -} - -////////////////////////////////// -// Monitor Tests -////////////////////////////////// - -describe("Monitor Tests", () => { - let ledger: CordaTestLedger; - let connector: CordaConnectorContainer; - let apiClient: CordaApiClient; - let partyBPublicKey: PublicKey; - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - ledger = new CordaTestLedger({ - imageName: ledgerImageName, - imageVersion: ledgerImageVersion, - logLevel: testLogLevel, - }); - - const ledgerContainer = await ledger.start(); - expect(ledgerContainer).toBeTruthy(); - log.debug("Corda ledger started..."); - - await ledger.logDebugPorts(); - const partyARpcPort = await ledger.getRpcAPublicPort(); - - const internalIp = (await internalIpV4()) as string; - expect(internalIp).toBeTruthy(); - log.info("Internal IP (based on default gateway):", internalIp); - - const springAppConfig = { - logging: { - level: { - root: "info", - "net.corda": "info", - "org.hyperledger.cactus": sutLogLevel, - }, - }, - cactus: { - threadCount: 2, - sessionExpireMinutes: 10, - corda: { - node: { host: internalIp }, - rpc: { - port: partyARpcPort, - username: partyARpcUsername, - password: partyARpcPassword, - }, - }, - }, - }; - const springApplicationJson = JSON.stringify(springAppConfig); - const envVarSpringAppJson = `SPRING_APPLICATION_JSON=${springApplicationJson}`; - log.debug(envVarSpringAppJson); - - connector = new CordaConnectorContainer({ - logLevel: sutLogLevel, - imageName: kotlinServerImageName, - imageVersion: kotlinServerImageVersion, - envVars: [envVarSpringAppJson], - }); - expect(connector).toBeTruthy(); - - await connector.start(); - await connector.logDebugPorts(); - const apiUrl = await connector.getApiLocalhostUrl(); - - const config = new Configuration({ basePath: apiUrl }); - apiClient = new CordaApiClient(config); - expect(apiClient).toBeTruthy(); - - await deployContract(apiClient, ledger, partyARpcPort, internalIp); - - log.info("Fetching network map for Corda network..."); - const networkMapRes = await apiClient.networkMapV1(); - expect(networkMapRes.data).toBeTruthy(); - - const partyB = networkMapRes.data.find((it) => - it.legalIdentities.some((li) => li.name.organisation === "ParticipantB"), - ); - partyBPublicKey = partyB?.legalIdentities[0].owningKey as PublicKey; - expect(partyBPublicKey).toBeTruthy(); - }); - - afterAll(async () => { - if (ledger) { - await ledger.stop(); - await ledger.destroy(); - } - - if (connector) { - await connector.stop(); - await connector.destroy(); - } - }); - - describe("Low-level StartMonitor and StopMonitor tests", () => { - afterEach(async () => { - // Stop monitor - await apiClient.stopMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - }); - - test("Transactions can be read repeatedly until cleared or monitoring stop", async () => { - // Start monitor - const resMonitor = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitor.status).toBe(200); - expect(resMonitor.data.success).toBeTrue(); - - // Get transactions before invoke - should be 0 - const resGetTxPre = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTxPre.status).toBe(200); - expect(resGetTxPre.data.stateFullClassName).toEqual(stateToMonitor); - expect(resGetTxPre.data.tx?.length).toBe(0); - - // Invoke transactions - const transactionCount = 3; - for (let i = 0; i < transactionCount; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Get transactions after invoke - const resGetTxPost = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTxPost.status).toBe(200); - expect(resGetTxPost.data.stateFullClassName).toEqual(stateToMonitor); - expect(resGetTxPost.data.tx?.length).toBe(transactionCount); - const seenIndexes = new Set(); - resGetTxPost.data.tx?.forEach((tx) => { - expect(tx.index).toBeTruthy(); - // Expect indexes to be unique - expect(seenIndexes).not.toContain(tx.index); - seenIndexes.add(tx.index as string); - expect(tx.data).toBeTruthy(); - }); - - // Get transactions after already reading all current ones - should be the same as before - const resGetTxPostRead = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTxPostRead.status).toBe(200); - expect(resGetTxPostRead.data.stateFullClassName).toEqual(stateToMonitor); - expect(resGetTxPostRead.data.tx).toEqual(resGetTxPost.data.tx); - }); - - test("Received transactions can be cleared so they can't be read anymore", async () => { - // Start monitor - const resMonitor = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitor.status).toBe(200); - expect(resMonitor.data.success).toBeTrue(); - - // Invoke transactions - const transactionCount = 3; - for (let i = 0; i < transactionCount; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Get transactions after invoke - const resGetTx = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTx.status).toBe(200); - expect(resGetTx.data.stateFullClassName).toEqual(stateToMonitor); - expect(resGetTx.data.tx?.length).toBe(transactionCount); - - // Clear seen transactions - const readTxIdx = resGetTx.data.tx?.map((tx) => tx.index); - const resClearTx = await apiClient.clearMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - txIndexes: readTxIdx as string[], - }); - expect(resClearTx.status).toBe(200); - expect(resClearTx.data.success).toBeTrue(); - - // Get transactions after clear - should be 0 - const resGetTxPostClear = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTxPostClear.status).toBe(200); - expect(resGetTxPostClear.data.stateFullClassName).toEqual(stateToMonitor); - expect(resGetTxPostClear.data.tx?.length).toBe(0); - }); - - test("Sending startMonitor repeatedly doesn't affect monitor results", async () => { - // Start monitor - const resMonitor = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitor.status).toBe(200); - expect(resMonitor.data.success).toBeTrue(); - - // Invoke first transactions - const firstTransactionCount = 3; - for (let i = 0; i < firstTransactionCount; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Start monitor once again - const resMonitorAgain = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitorAgain.status).toBe(200); - expect(resMonitorAgain.data.success).toBeTrue(); - - // Invoke second transactions - const secondTransactionCount = 3; - for (let i = 0; i < secondTransactionCount; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Get final transactions - const resGetTx = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTx.status).toBe(200); - expect(resGetTx.data.stateFullClassName).toEqual(stateToMonitor); - expect(resGetTx.data.tx?.length).toEqual( - firstTransactionCount + secondTransactionCount, - ); - }); - - test("Monitoring restart after previous stop works", async () => { - // Start monitor - const resMonitor = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitor.status).toBe(200); - expect(resMonitor.data.success).toBeTrue(); - - // Invoke transactions - const transactionCount = 3; - for (let i = 0; i < transactionCount; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Stop Monitor - const resStopMonitor = await apiClient.stopMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resStopMonitor.status).toBe(200); - expect(resStopMonitor.data.success).toBeTrue(); - - // Restart Monitor - const resMonitorRestart = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitorRestart.status).toBe(200); - expect(resMonitorRestart.data.success).toBeTrue(); - - // Invoke transactions after restart - const transactionCountAfterRestart = 2; - for (let i = 0; i < transactionCountAfterRestart; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Get transactions should return only new transactions - const resGetTxPostRestart = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTxPostRestart.status).toBe(200); - expect(resGetTxPostRestart.data.stateFullClassName).toEqual( - stateToMonitor, - ); - expect(resGetTxPostRestart.data.tx?.length).toBe( - transactionCountAfterRestart, - ); - }); - - test("Monitor returns only transactions after monitor was started, not previous ones", async () => { - // Invoke initial transactions - const transactionCountFirst = 5; - for (let i = 0; i < transactionCountFirst; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Start monitor - const resMonitor = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitor.status).toBe(200); - expect(resMonitor.data.success).toBeTrue(); - - // Invoke transactions after start - const transactionCountAfterStart = 2; - for (let i = 0; i < transactionCountAfterStart; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Get transactions - const resGetTx = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTx.status).toBe(200); - expect(resGetTx.data.stateFullClassName).toEqual(stateToMonitor); - expect(resGetTx.data.tx?.length).toBe(transactionCountAfterStart); - }); - - test("Start monitoring with unknown state returns error", async () => { - const unknownState = "foo.bar.non.existent"; - - // Start monitor - const resMonitor = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: unknownState, - }); - expect(resMonitor.status).toBe(200); - expect(resMonitor.data.success).toBeFalse(); - expect(resMonitor.data.msg).toContain(unknownState); - }); - - test("Stop monitoring with unknown state does nothing and returns success", async () => { - // Stop monitor - const resStopMon = await apiClient.stopMonitorV1({ - clientAppId: testAppId, - stateFullClassName: "foo.bar.non.existent", - }); - expect(resStopMon.status).toBe(200); - expect(resStopMon.data.success).toBeTrue(); - }); - - test("Reading / clearing transactions without monitor running returns an error", async () => { - // Get transactions before start monitor - const resGet = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGet.status).toBe(200); - expect(resGet.data.success).toBeFalse(); - expect(resGet.data.msg).toBeTruthy(); - expect(resGet.data.stateFullClassName).toBeFalsy(); - expect(resGet.data.tx).toBeFalsy(); - - // Clear transactions before start monitor - const resClear = await apiClient.clearMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - txIndexes: ["1", "2"], - }); - expect(resClear.status).toBe(200); - expect(resClear.data.success).toBeFalse(); - expect(resClear.data.msg).toBeTruthy(); - }); - - test("Reading / clearing unknown state returns an error", async () => { - // Start monitor - const resMonitor = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitor.status).toBe(200); - expect(resMonitor.data.success).toBeTrue(); - - // Get transactions of unknown state - const resGet = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: "foo.bar.non.existent", - }); - expect(resGet.status).toBe(200); - expect(resGet.data.success).toBeFalse(); - expect(resGet.data.msg).toBeTruthy(); - expect(resGet.data.stateFullClassName).toBeFalsy(); - expect(resGet.data.tx).toBeFalsy(); - - // Clear transactions of unknown state - const resClear = await apiClient.clearMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: "foo.bar.non.existent", - txIndexes: ["1", "2"], - }); - expect(resClear.status).toBe(200); - expect(resClear.data.msg).toBeTruthy(); - expect(resClear.data.success).toBeFalse(); - }); - }); - - describe("Multiple clients tests", () => { - const anotherAppId = "anotherTestApp"; - - afterEach(async () => { - // Stop Monitors - await apiClient.stopMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - - await apiClient.stopMonitorV1({ - clientAppId: anotherAppId, - stateFullClassName: stateToMonitor, - }); - }); - - test("State change can be read by all listening clients separately", async () => { - // Start monitor for first client - const resMonitorFirst = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitorFirst.status).toBe(200); - expect(resMonitorFirst.data.success).toBeTrue(); - - // Start monitor for second client - const resMonitorAnother = await apiClient.startMonitorV1({ - clientAppId: anotherAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitorAnother.status).toBe(200); - expect(resMonitorAnother.data.success).toBeTrue(); - - // Invoke transactions - const transactionCountAfterStart = 3; - for (let i = 0; i < transactionCountAfterStart; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Get transactions for first client - const resGetTxFirstClient = await apiClient.getMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTxFirstClient.status).toBe(200); - expect(resGetTxFirstClient.data.stateFullClassName).toEqual( - stateToMonitor, - ); - expect(resGetTxFirstClient.data.tx?.length).toBe( - transactionCountAfterStart, - ); - - // Clear transactions seen by the first client - const readTxIdx = resGetTxFirstClient.data.tx?.map((tx) => tx.index); - const resClearTx = await apiClient.clearMonitorTransactionsV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - txIndexes: readTxIdx as string[], - }); - expect(resClearTx.status).toBe(200); - expect(resClearTx.data.success).toBeTrue(); - - // Get transactions for second client - should have all transactions available - const resGetTxSecondClient = await apiClient.getMonitorTransactionsV1({ - clientAppId: anotherAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTxSecondClient.status).toBe(200); - expect(resGetTxSecondClient.data.stateFullClassName).toEqual( - stateToMonitor, - ); - expect(resGetTxSecondClient.data.tx?.length).toBe( - transactionCountAfterStart, - ); - }); - - test("State change unsubscribe doesn't affect other client monitors", async () => { - // Start monitor for first client - const resMonitorFirst = await apiClient.startMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitorFirst.status).toBe(200); - expect(resMonitorFirst.data.success).toBeTrue(); - - // Start monitor for second client - const resMonitorAnother = await apiClient.startMonitorV1({ - clientAppId: anotherAppId, - stateFullClassName: stateToMonitor, - }); - expect(resMonitorAnother.status).toBe(200); - expect(resMonitorAnother.data.success).toBeTrue(); - - // Invoke transactions - const transactionCountAfterStart = 3; - for (let i = 0; i < transactionCountAfterStart; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Stop first client monitoring - await apiClient.stopMonitorV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - }); - - // Invoke transactions for second client only - const transactionCountOnlySecondClient = 4; - for (let i = 0; i < transactionCountOnlySecondClient; i++) { - await invokeContract(apiClient, partyBPublicKey); - } - - // Get transactions for second client - const resGetTxSecondClient = await apiClient.getMonitorTransactionsV1({ - clientAppId: anotherAppId, - stateFullClassName: stateToMonitor, - }); - expect(resGetTxSecondClient.status).toBe(200); - expect(resGetTxSecondClient.data.stateFullClassName).toEqual( - stateToMonitor, - ); - expect(resGetTxSecondClient.data.tx?.length).toBe( - transactionCountAfterStart + transactionCountOnlySecondClient, - ); - }); - }); - - describe("watchBlocks tests", () => { - // watchBlocks tests are async, don't wait so long if something goes wrong - const watchBlockTestTimeout = 5 * 60 * 1000; // 5 minutes - - test( - "watchBlocksAsyncV1 reports all transactions", - async () => { - const transactionCount = 10; - - const observable = await apiClient.watchBlocksAsyncV1({ - clientAppId: testAppId, - stateFullClassName: stateToMonitor, - pollRate: 1000, - }); - - let sub: Subscription | undefined; - const monitor = new Promise((resolve, reject) => { - let transactionsReceived = 0; - - sub = observable.subscribe({ - next(tx) { - let error: string | undefined; - - log.debug("Received transaction from monitor:", tx); - - if (tx.index === undefined || !tx.data) { - error = `Wrong transaction format - idx ${tx.index} data ${tx.data}`; - } - - transactionsReceived++; - - if (error) { - log.error(error); - reject(error); - } - - if (transactionsReceived === transactionCount) { - log.info(`Read all ${transactionCount} transactions - OK`); - resolve(); - } - }, - error(err) { - log.error("watchBlocksAsyncV1 failed:", err); - reject(err); - }, - }); - }).finally(() => sub?.unsubscribe()); - - // Invoke transactions - for (let i = 0; i < transactionCount; i++) { - invokeContract(apiClient, partyBPublicKey); - } - - await monitor; - }, - watchBlockTestTimeout, - ); - - test( - "Running watchBlocksAsyncV1 with unknown state report an error on rxjs subject", - async () => { - const observable = await apiClient.watchBlocksAsyncV1({ - clientAppId: testAppId, - stateFullClassName: "foo.bar.unknown", - }); - - let sub: Subscription | undefined; - await new Promise((resolve, reject) => { - sub = observable.subscribe({ - next() { - reject("Monitor reported new transaction when it should fail."); - }, - error(err) { - log.info("watchBlocksAsyncV1 error reported as expected:", err); - resolve(); - }, - }); - }).finally(() => sub?.unsubscribe()); - }, - watchBlockTestTimeout, - ); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/openapi/openapi-validation.test.ts deleted file mode 100644 index e672fe640e..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ /dev/null @@ -1,769 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { v4 as internalIpV4 } from "internal-ip"; - -import { - Containers, - CordaTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { - SampleCordappEnum, - CordaConnectorContainer, -} from "@hyperledger/cactus-test-tooling"; - -import { - CordappDeploymentConfig, - DefaultApi as CordaApi, - DeployContractJarsV1Request, - DiagnoseNodeV1Request, - FlowInvocationType, - InvokeContractV1Request, - JvmTypeKind, - ListFlowsV1Request, - PublicKey, -} from "../../../../main/typescript/generated/openapi/typescript-axios/index"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -const testCase = "openapi validation on corda JVM implementation"; -const logLevel: LogLevelDesc = "TRACE"; - -test.onFailure(async () => { - await Containers.logDiagnostics({ logLevel }); -}); - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const ledger = new CordaTestLedger({ - imageName: "ghcr.io/hyperledger/cactus-corda-4-8-all-in-one-obligation", - imageVersion: "2021-08-31--feat-889", - logLevel, - }); - t.ok(ledger, "CordaTestLedger instantaited OK"); - - test.onFinish(async () => { - await ledger.stop(); - await ledger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - const ledgerContainer = await ledger.start(); - t.ok(ledgerContainer, "CordaTestLedger container truthy post-start() OK"); - - await ledger.logDebugPorts(); - const partyARpcPort = await ledger.getRpcAPublicPort(); - - const cordappDeploymentConfigs: CordappDeploymentConfig[] = []; - const jarFiles = await ledger.pullCordappJars( - SampleCordappEnum.ADVANCED_OBLIGATION, - ); - t.comment(`Fetched ${jarFiles.length} cordapp jars OK`); - - const internalIpOrUndefined = await internalIpV4(); - t.ok(internalIpOrUndefined, "Determined LAN IPv4 address successfully OK"); - const internalIp = internalIpOrUndefined as string; - t.comment(`Internal IP (based on default gateway): ${internalIp}`); - - const springAppConfig = { - logging: { - level: { - root: "INFO", - "org.hyperledger.cactus": "DEBUG", - }, - }, - cactus: { - corda: { - node: { host: internalIp }, - // TODO: parse the gradle build files to extract the credentials? - rpc: { port: partyARpcPort, username: "user1", password: "password" }, - }, - }, - }; - const springApplicationJson = JSON.stringify(springAppConfig); - const envVarSpringAppJson = `SPRING_APPLICATION_JSON=${springApplicationJson}`; - t.comment(envVarSpringAppJson); - - const connector = new CordaConnectorContainer({ - logLevel, - imageName: "ghcr.io/hyperledger/cactus-connector-corda-server", - imageVersion: "2021-11-23--feat-1493", - envVars: [envVarSpringAppJson], - }); - t.ok(CordaConnectorContainer, "CordaConnectorContainer instantiated OK"); - - test.onFinish(async () => { - try { - await connector.stop(); - } finally { - await connector.destroy(); - } - }); - - const connectorContainer = await connector.start(); - t.ok(connectorContainer, "CordaConnectorContainer started OK"); - - await connector.logDebugPorts(); - const apiUrl = await connector.getApiLocalhostUrl(); - const config = new Configuration({ basePath: apiUrl }); - const apiClient = new CordaApi(config); - - const fDeploy = "deployContractJarsV1"; - const fInvoke = "invokeContractV1"; - const fDiagnose = "diagnoseNodeV1"; - const fFlows = "listFlowsV1"; - const fNetwork = "networkMapV1"; - const cOk = "without bad request error"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - - test(`${testCase} - ${fDeploy} - ${cOk}`, async (t2: Test) => { - const depReq: DeployContractJarsV1Request = { - jarFiles, - cordappDeploymentConfigs, - }; - const depRes = await apiClient.deployContractJarsV1(depReq); - t2.ok(depRes, "Jar deployment response truthy OK"); - t2.ok(depRes.status === 200, "Jar deployment status code === 200 OK"); - t2.ok(depRes.data, "Jar deployment response body truthy OK"); - t2.ok( - depRes.data?.deployedJarFiles, - "Jar deployment body deployedJarFiles OK", - ); - t2.equal( - depRes.data?.deployedJarFiles?.length, - jarFiles.length, - "Deployed jar file count equals count in request OK", - ); - t2.end(); - }); - - test(`${testCase} - ${fFlows} - ${cOk}`, async (t2: Test) => { - const flowsRes = await apiClient.listFlowsV1(); - t2.ok(flowsRes.status === 200, "flowsRes.status === 200 OK"); - t2.ok(flowsRes.data, "flowsRes.data truthy OK"); - t2.ok(flowsRes.data.flowNames, "flowsRes.data.flowNames truthy OK"); - t2.comment(`apiClient.listFlowsV1() => ${JSON.stringify(flowsRes.data)}`); - t2.end(); - }); - - test(`${testCase} - ${fDiagnose} - ${cOk}`, async (t2: Test) => { - const diagRes = await apiClient.diagnoseNodeV1(); - t2.ok(diagRes.status === 200, "diagRes.status === 200 OK"); - t2.ok(diagRes.data, "diagRes.data truthy OK"); - t2.ok(diagRes.data.nodeDiagnosticInfo, "nodeDiagnosticInfo truthy OK"); - t2.end(); - }); - - let partyAPublicKey: PublicKey | undefined; - let partyBPublicKey: PublicKey | undefined; - - test(`${testCase} - ${fNetwork} - ${cOk}`, async (t2: Test) => { - const networkMapRes = await apiClient.networkMapV1(); - t2.ok(networkMapRes.status === 200, "networkMapRes.status === 200 OK"); - const partyA = networkMapRes.data.find((it) => - it.legalIdentities.some( - (it2) => it2.name.organisation === "ParticipantA", - ), - ); - partyAPublicKey = partyA?.legalIdentities[0].owningKey; - - const partyB = networkMapRes.data.find((it) => - it.legalIdentities.some( - (it2) => it2.name.organisation === "ParticipantB", - ), - ); - partyBPublicKey = partyB?.legalIdentities[0].owningKey; - t2.end(); - }); - - test(`${testCase} - ${fInvoke} - ${cOk}`, async (t2: Test) => { - const req: InvokeContractV1Request = { - flowFullClassName: "net.corda.samples.obligation.flows.IOUIssueFlow", - flowInvocationType: FlowInvocationType.TrackedFlowDynamic, - params: [ - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.samples.obligation.states.IOUState", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.contracts.Amount", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "long", - }, - primitiveValue: 42, - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "java.util.Currency", - constructorName: "getInstance", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "USD", - }, - ], - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.Party", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.CordaX500Name", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "ParticipantA", - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "London", - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "GB", - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: - "org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyAPublicKey?.algorithm, - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyAPublicKey?.format, - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyAPublicKey?.encoded, - }, - ], - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.Party", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.CordaX500Name", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "ParticipantB", - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "New York", - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "US", - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: - "org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyBPublicKey?.algorithm, - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyBPublicKey?.format, - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyBPublicKey?.encoded, - }, - ], - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.contracts.Amount", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "long", - }, - primitiveValue: 1, - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "java.util.Currency", - constructorName: "getInstance", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "USD", - }, - ], - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.contracts.UniqueIdentifier", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "7fc2161e-f8d0-4c86-a596-08326bdafd56", - }, - ], - }, - ], - }, - ], - timeoutMs: 60000, - } as unknown as InvokeContractV1Request; - - const res = await apiClient.invokeContractV1(req); - t2.ok(res, "InvokeContractV1Request truthy OK"); - t2.ok(res.status === 200, "InvokeContractV1Request status code === 200 OK"); - t2.end(); - }); - - test(`${testCase} - ${fDeploy} - ${cWithoutParams}`, async (t2: Test) => { - try { - const depReq = { - jarFiles, - } as unknown as DeployContractJarsV1Request; - await apiClient.deployContractJarsV1(depReq); - t2.fail(`${fDeploy} - ${cWithoutParams}: should fail`); - } catch (e) { - t2.equal( - e.response?.data?.status, - 400, - "Deploy contract response status code === 400 OK", - ); - } - t2.end(); - }); - - test(`${testCase} - ${fInvoke} - ${cWithoutParams}`, async (t2: Test) => { - try { - const req = { - flowFullClassName: "net.corda.samples.obligation.flows.IOUIssueFlow", - flowInvocationType: FlowInvocationType.TrackedFlowDynamic, - timeoutMs: 60000, - } as unknown as InvokeContractV1Request; - await apiClient.invokeContractV1(req); - t2.fail(`${fInvoke} - ${cWithoutParams}: should fail`); - } catch (e) { - t2.equal( - e.response?.data?.status, - 400, - "Invoke contract response status code === 400 OK", - ); - } - t2.end(); - }); - - test(`${testCase} - ${fDeploy} - ${cInvalidParams}`, async (t2: Test) => { - try { - const depReq = { - jarFiles, - cordappDeploymentConfigs, - fake: 4, - }; - await apiClient.deployContractJarsV1(depReq); - t2.fail(`${fDeploy} - ${cInvalidParams}: should fail`); - } catch (e) { - t2.equal( - e.response?.data?.status, - 400, - "Deploy contract response status code === 400 OK", - ); - } - t2.end(); - }); - - test(`${testCase} - ${fFlows} - ${cInvalidParams}`, async (t2: Test) => { - try { - const req = { fake: 4 } as ListFlowsV1Request; - await apiClient.listFlowsV1(req); - t2.fail(`${fFlows} - ${cInvalidParams}: should fail`); - } catch (e) { - t2.equal( - e.response?.data?.status, - 400, - "List flows response status code === 400 OK", - ); - } - t2.end(); - }); - - test(`${testCase} - ${fDiagnose} - ${cInvalidParams}`, async (t2: Test) => { - try { - const req = { fake: 4 } as unknown as DiagnoseNodeV1Request; - await apiClient.diagnoseNodeV1(req); - t2.fail(`${fDiagnose} - ${cInvalidParams}: should fail`); - } catch (e) { - t2.equal( - e.response?.data?.status, - 400, - "Diagnose node response status code === 400 OK", - ); - } - t2.end(); - }); - - test(`${testCase} - ${fInvoke} - ${cInvalidParams}`, async (t2: Test) => { - const req: InvokeContractV1Request = { - flowFullClassName: "net.corda.samples.obligation.flows.IOUIssueFlow", - flowInvocationType: FlowInvocationType.TrackedFlowDynamic, - params: [ - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.samples.obligation.states.IOUState", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.contracts.Amount", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "long", - }, - primitiveValue: 42, - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "java.util.Currency", - constructorName: "getInstance", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "USD", - }, - ], - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.Party", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.CordaX500Name", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "ParticipantA", - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "London", - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "GB", - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: - "org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyAPublicKey?.algorithm, - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyAPublicKey?.format, - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyAPublicKey?.encoded, - }, - ], - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.Party", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.identity.CordaX500Name", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "ParticipantB", - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "New York", - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "US", - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: - "org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyBPublicKey?.algorithm, - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyBPublicKey?.format, - }, - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: partyBPublicKey?.encoded, - }, - ], - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.contracts.Amount", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "long", - }, - primitiveValue: 1, - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "java.util.Currency", - constructorName: "getInstance", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "USD", - }, - ], - }, - ], - }, - { - jvmTypeKind: JvmTypeKind.Reference, - jvmType: { - fqClassName: "net.corda.core.contracts.UniqueIdentifier", - }, - - jvmCtorArgs: [ - { - jvmTypeKind: JvmTypeKind.Primitive, - jvmType: { - fqClassName: "java.lang.String", - }, - primitiveValue: "7fc2161e-f8d0-4c86-a596-08326bdafd56", - }, - ], - }, - ], - }, - ], - timeoutMs: 60000, - fake: 4, - } as unknown as InvokeContractV1Request; - - try { - await apiClient.invokeContractV1(req); - t2.fail(`${fInvoke} - ${cInvalidParams}: should fail`); - } catch (e) { - t2.equal( - e.response?.data?.status, - 400, - "Invoke contract response status code === 400 OK", - ); - } - t2.end(); - }); - - t.end(); -}); diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/tap-parallel-not-ok b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/tap-parallel-not-ok deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/yaml/fixtures/docker-compose.yaml b/packages/cactus-plugin-ledger-connector-corda/src/test/yaml/fixtures/docker-compose.yaml deleted file mode 100644 index 3372eed9b3..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/yaml/fixtures/docker-compose.yaml +++ /dev/null @@ -1,18 +0,0 @@ -services: - - connector: - build: - context: ./packages/cactus-plugin-ledger-connector-corda/src/main-server/ - dockerfile: Dockerfile - network_mode: host - depends_on: - - ledger - environment: - - SPRING_APPLICATION_JSON={"logging":{"level":{"root":"INFO","net.corda":"INFO","org.hyperledger.cactus":"DEBUG"}},"cactus":{"corda":{"node":{"host":"127.0.0.1"},"rpc":{"port":10006,"username":"user1","password":"test"}}}} - - ledger: - build: - context: ./tools/docker/corda-all-in-one/corda-v4_12/ - dockerfile: Dockerfile - network_mode: host - privileged: true diff --git a/packages/cactus-plugin-ledger-connector-corda/tsconfig.json b/packages/cactus-plugin-ledger-connector-corda/tsconfig.json deleted file mode 100644 index f9320ac3e8..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ledger-connector-corda.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-ethereum/CHANGELOG.md b/packages/cactus-plugin-ledger-connector-ethereum/CHANGELOG.md deleted file mode 100644 index 44d3e80a4d..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/CHANGELOG.md +++ /dev/null @@ -1,129 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-ethereum - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-ethereum - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-ethereum - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -### Features - -* **persistence-ethereum:** add sample setup scripts, improve documentation ([ed915cf](https://github.com/hyperledger/cacti/commit/ed915cf6f8f1388cbfdc16c954102da1e381920b)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **connector-quorum/ethereum:** strengthen contract parameter validation ([779bb7e](https://github.com/hyperledger/cacti/commit/779bb7e24b06352bad64c96eab3b24c0961d1381)), closes [#2760](https://github.com/hyperledger/cacti/issues/2760) -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **cactus-example-electricity-trade:** use openapi ethereum connector ([9e66850](https://github.com/hyperledger/cacti/commit/9e66850438c97883a8999c3def36e807bfbb1a76)) -* **cactus-plugin-ledger-connector-aries:** add new connector plugin ([afef5ae](https://github.com/hyperledger/cacti/commit/afef5ae3e2f36bf7f25928ee75f82bc4800b3172)), closes [#2946](https://github.com/hyperledger/cacti/issues/2946) -* **cactus-plugin-ledger-connector-ethereum:** add json-rpc proxy ([ed04201](https://github.com/hyperledger/cacti/commit/ed04201671bdb614549e995b3d88cc2cae218e56)) -* **cactus-plugin-ledger-connector-ethereum:** add signing utils ([84c5b34](https://github.com/hyperledger/cacti/commit/84c5b34afa73b4f906e413c4d5dd3ff46a1dd7a8)) -* **cactus-plugin-ledger-connector-ethereum:** add stress test ([55fa26e](https://github.com/hyperledger/cacti/commit/55fa26ef41d405b26da02b099418da5fa281c78f)), closes [#2631](https://github.com/hyperledger/cacti/issues/2631) -* **cactus-plugin-ledger-connector-ethereum:** refactor connector API ([cda279f](https://github.com/hyperledger/cacti/commit/cda279fb0009a4d5756c461024ad88f525bfe946)), closes [#2630](https://github.com/hyperledger/cacti/issues/2630) -* **cactus-plugin-ledger-connector-ethereum:** support London fork gas prices ([80a89dd](https://github.com/hyperledger/cacti/commit/80a89dd95d51bdc604392dbe96ab27d233b116a4)), closes [#2581](https://github.com/hyperledger/cacti/issues/2581) -* **cactus-plugin-ledger-connector-ethereum:** update web3js to 4.X ([55f82c9](https://github.com/hyperledger/cacti/commit/55f82c9568b3e875de4f3ceb89a828f8b23d65be)), closes [#2580](https://github.com/hyperledger/cacti/issues/2580) [#2535](https://github.com/hyperledger/cacti/issues/2535) [#2578](https://github.com/hyperledger/cacti/issues/2578) -* **cactus-plugin-persistence-ethereum:** use openapi ethereum connector ([b8f9b79](https://github.com/hyperledger/cacti/commit/b8f9b79daa7a97cbd75325eba00c7458bfed5ce5)), closes [#2631](https://github.com/hyperledger/cacti/issues/2631) -* **ethereum-connector:** support block monitoring with http only connection ([f4373a9](https://github.com/hyperledger/cacti/commit/f4373a90020cbc8bfbc16da6c32babe627e7d4ae)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Features - -* **cactus-plugin-ledger-connector-ethereum:** add new connector plugin ([f8a2131](https://github.com/hyperledger/cacti/commit/f8a2131e9fc0ea05c1c1c8863489a43a74f019ae)), closes [#2534](https://github.com/hyperledger/cacti/issues/2534) diff --git a/packages/cactus-plugin-ledger-connector-ethereum/README.md b/packages/cactus-plugin-ledger-connector-ethereum/README.md deleted file mode 100644 index 9b4fb19431..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/README.md +++ /dev/null @@ -1,476 +0,0 @@ -# `@hyperledger/cactus-plugin-ledger-connector-ethereum` - -This plugin provides `Cactus` a way to interact with Ethereum networks. Using this we can perform: - -- Deploy Smart-contracts through bytecode. -- Build and sign transactions using different keystores. -- Invoke smart-contract functions that we have deployed on the network. - -## Summary - -- [Getting Started](#getting-started) -- [Usage](#usage) -- [EthereumApiClient](#ethereumapiclient) -- [Runing the tests](#running-the-tests) -- [Prometheus Exporter](#prometheus-exporter) -- [Contributing](#contributing) -- [License](#license) -- [Acknowledgments](#acknowledgments) - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project to install the dependencies execute the command: - -```sh -npm run configure -``` - -## Usage - -To use this import public-api and create new **PluginLedgerConnectorEthereum**. - -```typescript -const connector: PluginLedgerConnectorEthereum = new PluginLedgerConnectorEthereum( - { - instanceId: uuidV4(), - rpcApiHttpHost, - pluginRegistry: new PluginRegistry(), - }, -); -``` - -You can make calls through the connector to the plugin API: - -```typescript -async invokeContract(req: InvokeContractJsonObjectV1Request):Promise; -async transact(req: RunTransactionRequest): Promise; -async transactSigned(rawTransaction: string): Promise; -async transactGethKeychain(txIn: RunTransactionRequest): Promise; -async transactPrivateKey(req: RunTransactionRequest): Promise; -async transactCactiKeychainRef(req: RunTransactionRequest):Promise; -async deployContract(req: DeployContractSolidityBytecodeV1Request :Promise; -async deployContractJsonObject(req: DeployContractSolidityBytecodeJsonObjectV1Request): Promise -async invokeRawWeb3EthMethod(req: InvokeRawWeb3EthMethodV1Request): Promise; -async invokeRawWeb3EthContract(req: InvokeRawWeb3EthContractV1Request): Promise; -``` - -Call example to deploy a contract: - -```typescript -const deployOut = await connector.deployContract({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: "", - type: Web3SigningCredentialType.GETHKEYCHAINPASSWORD, - }, - bytecode: ContractJson.bytecode, - gas: 1000000, -}); -``` - -The field "type" can have the following values: - -```typescript -enum Web3SigningCredentialType { - CACTUSKEYCHAINREF = "CACTI_KEYCHAIN_REF", - GETHKEYCHAINPASSWORD = "GETH_KEYCHAIN_PASSWORD", - PRIVATEKEYHEX = "PRIVATE_KEY_HEX", - NONE = "NONE", -} -``` - -> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) - -## EthereumApiClient - -All connector API endpoints are defined in [open-api specification](./src/main/json/openapi.json). You can use [EthereumApiClient](./src/main/typescript/api-client) to call remote ethereum connector functions. It also contain additional utility functions to ease integration. - -### REST Functions - -See [DefaultApi](./src/main/typescript/generated/openapi/typescript-axios/api.ts) for up-to-date listing of supported endpoints. - -- deployContractSolBytecodeJsonObjectV1 -- deployContractSolBytecodeV1 -- getPrometheusMetricsV1 -- invokeContractV1 -- invokeContractV1NoKeychain -- invokeRawWeb3EthContractV1 -- invokeRawWeb3EthMethodV1 -- runTransactionV1 - -### Asynchronous Functions (socket.io) - -- watchBlocksV1 - -### Send Request Methods - -Both methods are deprecated, async version returns immediately while sync respond with Promise of a call results. - -- `sendAsyncRequest` -- `sendSyncRequest` - -#### Supported Requests - -- `web3Eth`: Calls `invokeRawWeb3EthMethodV1` -- `web3EthContract`: Calls `invokeRawWeb3EthContractV1` - -#### Arguments - -- The same for both async and sync methods. -- Arguments interpretation depends on `method.type` (i.e. request type) - -```typescript -// Contract definition for web3EthContract request, ignored otherwise -contract: { - abi?: AbiItem[], - address?: string -}, - -// Request definition -method: { - type: "web3Eth" | "web3EthContract", - command: string // web3 method - function?: string; // contract function - params?: any[]; // contract parameters -} - -// web3 method arguments -args: { - { - args?: any[] | Record; - } -}, -``` - -### Offline signing utils -- Use `signTransaction` from this package to sign transactions payload locally (outside of connector process). -- Offline signed transaction can be send with `Web3SigningCredentialType.None` signing credetnial type in runTransactionV1 endpoint. - -``` typescript -// Offline sign transaction -const { serializedTransactionHex } = signTransaction( - { - to: anotherAccount, - value: 10e6, - maxPriorityFeePerGas: 0, - maxFeePerGas: 0x40000000, - gasLimit: 21000, - type: 2 - }, - myPrivateKey, - { - networkId: 10, - chainId: 10, - defaultHardfork: "london", - }, -); - -// Send transaction payload to connector -await apiClient.runTransactionV1({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - transactionConfig: { - rawTransaction: serializedTransactionHex, - }, -}); -``` - -### watchBlocksV1 -- ApiClient can be used to monitor for new blocks from the ledger with `watchBlocksV1` method. -- When etherum node supports subscription (e.g. websocket protocol is used), then blocks connector will subscribe to new block header event (recommended). -- If ethereum node supports HTTP access only, then polling method will be used. - -#### Example - -``` typescript -const watchObservable = apiClient.watchBlocksV1({ - getBlockData, // true - return transactions, false - return header only (default) - lastSeenBlock, // connector will push all blocks since lastSeenBlock (default - latest) - httpPollInterval // how often to poll the node (only for http-polling method) -}); - -const subscription = watchObservable.subscribe({ - next(event) { - // process block data - }, - error(err) { - // handle error - subscription.unsubscribe(); - }, -}); -``` - -## JSON-RPC Proxy -- Connector can be used with web3js to send any JSON-RPC request to the ethereum node. - -### Example -``` typescript - const proxyUrl = new URL( - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/json-rpc", - apiHost, - ); - const web3ProxyClient = new Web3(proxyUrl.toString()); - const gasPrice = await web3ProxyClient.eth.getGasPrice(); -``` - -## Running the tests - -To check that all has been installed correctly and that the pugin has no errors run jest test suites. - -- Run this command at the project's root: - -```sh -npx jest cactus-plugin-ledger-connector-ethereum -``` - -### Stess test -- Use CLI for manual setup of test environment and geneartion of artillery config. -- `artillery` must be installed separately (we do not recommend running it if they are any known open vulnerabilities) - -#### Setup - -``` sh -# Start the test environment -node ./packages/cactus-plugin-ledger-connector-ethereum/dist/lib/test/typescript/benchmark/cli/run-benchmark-environment.js -# Wait until `> artillery run ./.manual-geth-artillery-config.yaml` is printed - -# Review artillery config - change scenarios weights or load configuration, adjust target if running on separate machine etc... -vim ./.manual-geth-artillery-config.yaml # config is created in cwd() when starting the environment - -# Run artillery -artillery run ./.manual-geth-artillery-config.yaml -``` - -#### Files -- `./src/test/typescript/benchmark/setup` - - `geth-benchmark-env.ts` contains helper file for setting up an environment used by both CLI and jest test. - - `geth-benchmark-config.yaml` template artillery configuration. You can modify test load and scenarios there. - - `artillery-helper-functions.js` request handlers used by artillery to correcty process some response codes. -- `./src/test/typescript/benchmark/cli` - - `run-benchmark-environment.ts` CLI for starting test environment and patching template artillery config - - -#### Running the container - -Launch container with plugin configuration as an **environment variable**: -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --plugins='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-ethereum", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": {"rpcApiHttpHost": "http://localhost:8545", "rpcApiWsHost":"ws://localhost:8546", "instanceId": "some-unique-ethereum-connector-instance-id"}}]' -``` - -Launch container with plugin configuration as a **CLI argument**: -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --plugins='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-ethereum", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": {"rpcApiHttpHost": "http://localhost:8545", "rpcApiWsHost":"ws://localhost:8546", "instanceId": "some-unique-ethereum-connector-instance-id"}}]' -``` - -Launch container with **configuration file** mounted from host machine: -```sh -echo '{"plugins": [{"packageName": "@hyperledger/cactus-plugin-ledger-connector-ethereum", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": {"rpcApiHttpHost": "http://127.0.0.1:8545", "rpcApiWsHost":"ws://127.0.0.1:8546", "instanceId": "some-unique-ethereum-connector-instance-id"}}]}' > .cacti-config.json -``` - -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - --mount type=bind,source="$(pwd)"/.cacti-config.json,target=/.cacti-config.json \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --config-file=/.cacti-config.json -``` - -#### Testing API calls with the container - -Don't have a Ethereum network on hand to test with? Test or develop against our Besu All-In-One container! - -**Terminal Window 1 (Ledger)** -```sh -docker run \ - --publish 0.0.0.0:8545:8545/tcp \ - --publish 0.0.0.0:8546:8546/tcp \ - --publish 0.0.0.0:8888:8888/tcp \ - --publish 0.0.0.0:9001:9001/tcp \ - --publish 0.0.0.0:9545:9545/tcp \ - ghcr.io/hyperledger/cactus-besu-all-in-one:2024-07-04-8c030ae -``` - -**Terminal Window 2 (Cacti API Server)** -```sh -docker run \ - --network=host \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --plugins='[{"packageName": "@hyperledger/cactus-plugin-ledger-connector-ethereum", "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", "options": {"rpcApiHttpHost": "http://127.0.0.1:8545", "rpcApiWsHost":"ws://127.0.0.1:8546", "instanceId": "some-unique-besu-connector-instance-id"}}]' -``` - -**Terminal Window 3 (curl - replace eth accounts as needed)** -```sh -curl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "web3SigningCredential": { - "ethAccount": "627306090abaB3A6e1400e9345bC60c78a8BEf57", - "secret": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3", - "type": "PRIVATE_KEY_HEX" - }, - "transactionConfig": { - "from": "627306090abaB3A6e1400e9345bC60c78a8BEf57", - "to": "f17f52151EbEF6C7334FAD080c5704D77216b732", - "value": "1", - "maxPriorityFeePerGas": "0", - "maxFeePerGas": "40000000", - "gasLimit": "21000", - "type": 2 - } -}' -``` -The above should produce a response that looks similar to this: - -```json -{ - "success": true, - "data": { - "transactionReceipt": { - "blockHash": "0x7c97c038a5d3bd84613fe23ed442695276d5d2df97f4e7c4f10ca06765033ffd", - "blockNumber": 1218, - "contractAddress": null, - "cumulativeGasUsed": 21000, - "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "gasUsed": 21000, - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "status": true, - "to": "0xf17f52151ebef6c7334fad080c5704d77216b732", - "transactionHash": "0xc7fcb46c735bdc696d500bfc70c72595a2b8c31813929e5c61d9a5aec3376d6f", - "transactionIndex": 0 - } - } -} -``` - -## Prometheus Exporter - -This class creates a prometheus exporter, which scrapes the transactions (total transaction count) for the use cases incorporating the use of Ethereum connector plugin. - -### Prometheus Exporter Usage - -The prometheus exporter object is initialized in the `PluginLedgerConnectorEthereum` class constructor itself, so instantiating the object of the `PluginLedgerConnectorEthereum` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IPluginLedgerConnectorEthereumOptions` interface for `PluginLedgerConnectoEthereum` constructor. - -`getPrometheusMetricsV1` function returns the prometheus exporter metrics, currently displaying the total transaction count, which currently increments everytime the `transact()` method of the `PluginLedgerConnectorEthereum` class is called. - -### Prometheus Integration - -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'ethereum_ledger_connector_exporter' - metrics_path: api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/plugin-ledger-connector-ethereum/deploy-contract/deploy-contract-from-json.test.ts) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_ethereum_total_tx_count** and click **execute** - -### Manual Alchemy integration test - -There's a simple script for checking integration with [alchemy platform](https://www.alchemy.com/) in `./src/test/typescript/manual/geth-alchemy-integration-manual-check.test.ts`. To run it follow these steps: - -- Sign up on Alchemy platform. -- Prepare your wallet address and private key. -- Use free Sepolia faucet to get some test ether: https://sepoliafaucet.com/ - - note: script assumes Sepolia testnet but it should work with any other testnets from alchemy, you just need to adjust the script accordingly. -- `Create App` on Alchemy dashboard. - - Use any name and description. - - Select `Chain: Ethereum` - - Select `Network: Ethereum Sepolia` -- Click `View Key` (on the dashboard) next to the newly created App. -- Copy HTTPS RPC endpoint to `ALCHEMY_ENDPOINT` variable near top of `geth-invoke-web3-contract-v1.test.ts` file (or just replace **\_\_**API_KEY**\_\_** with your API key). - - note: if you misspell it you'll get authentication errors. -- Copy your account address to `ETH_ADDRESS` variable. -- Copy your private key to `ETH_PRIVATE_KEY` variable. -- **Build the project, or at least this package (`npx tsc`). Remember to run the build after each change in script - it will not happen automatically!** -- Execute inside this package directory: - - `npx jest dist/lib/test/typescript/manual/geth-alchemy-integration-manual-check.test.js` - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments - -``` - -``` diff --git a/packages/cactus-plugin-ledger-connector-ethereum/openapitools.json b/packages/cactus-plugin-ledger-connector-ethereum/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/package.json b/packages/cactus-plugin-ledger-connector-ethereum/package.json deleted file mode 100644 index 4c1b066f4f..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/package.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-ledger-connector-ethereum", - "version": "2.0.0", - "description": "Allows Cactus nodes to connect to a Ethereum ledger.", - "keywords": [ - "Hyperledger", - "Cacti", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-ledger-connector-ethereum.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "bin": { - "cacti-ethereum-connector-status": "dist/lib/scripts/get-ethereum-connector-status.js" - }, - "files": [ - "dist/*" - ], - "scripts": { - "build:dev:backend:postbuild": "npm run copy-artillery-config", - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "copy-artillery-config": "cp -af ./src/test/typescript/benchmark/setup/geth-benchmark-config.yaml ./src/test/typescript/benchmark/setup/artillery-helper-functions.js ./dist/lib/test/typescript/benchmark/setup", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@ethereumjs/common": "4.0.0", - "@ethereumjs/tx": "5.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "ethers": "6.8.1", - "express": "4.21.0", - "http-proxy-middleware": "2.0.6", - "minimist": "1.2.8", - "prom-client": "15.1.3", - "run-time-error-cjs": "1.4.0", - "rxjs": "7.8.1", - "sanitize-html": "2.12.1", - "socket.io-client-fixed-types": "4.5.4", - "typescript-optional": "2.0.1", - "web3": "4.4.0", - "web3-eth": "4.4.0", - "web3-eth-contract": "4.2.0" - }, - "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-geth-ledger": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/js-yaml": "4.0.5", - "@types/minimist": "1.2.2", - "@types/sanitize-html": "2.9.5", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "chalk": "4.1.2", - "js-yaml": "4.1.0", - "socket.io": "4.6.2", - "uuid": "10.0.0", - "web3-eth-accounts": "4.1.1" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-ledger-connector-ethereum.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-ledger-connector-ethereum.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 4850eda068..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,46 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_contract_json.go -model_contract_json_definition.go -model_contract_keychain_definition.go -model_deploy_contract_v1_request.go -model_deploy_contract_v1_request_contract.go -model_deployed_contract_json_definition.go -model_error_exception_response_v1.go -model_eth_contract_invocation_type.go -model_eth_contract_invocation_web3_method.go -model_ethereum_transaction_config.go -model_gas_transaction_config.go -model_gas_transaction_config_eip1559.go -model_gas_transaction_config_legacy.go -model_invoke_contract_v1_request.go -model_invoke_contract_v1_request_contract.go -model_invoke_contract_v1_response.go -model_invoke_raw_web3_eth_contract_v1_request.go -model_invoke_raw_web3_eth_contract_v1_response.go -model_invoke_raw_web3_eth_method_v1_request.go -model_invoke_raw_web3_eth_method_v1_response.go -model_run_transaction_request.go -model_run_transaction_response.go -model_watch_blocks_v1.go -model_watch_blocks_v1_block_data.go -model_watch_blocks_v1_block_data_timestamp.go -model_watch_blocks_v1_options.go -model_watch_blocks_v1_progress.go -model_web3_block_header.go -model_web3_signing_credential.go -model_web3_signing_credential_cacti_keychain_ref.go -model_web3_signing_credential_geth_keychain_password.go -model_web3_signing_credential_none.go -model_web3_signing_credential_private_key_hex.go -model_web3_signing_credential_type.go -model_web3_transaction.go -model_web3_transaction_receipt.go -response.go -utils.go diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 76144559bf..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,152 +0,0 @@ -# Go API client for cactus-plugin-ledger-connector-ethereum - -Can perform basic tasks on a Ethereum ledger - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-ledger-connector-ethereum "github.com/hyperledger/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-ethereum.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-ethereum.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-ethereum.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-ledger-connector-ethereum.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeployContract**](docs/DefaultApi.md#deploycontract) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract | Deploys the contract to ethereum ledger. -*DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**InvokeContractV1**](docs/DefaultApi.md#invokecontractv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract | Invokes a contract on an ethereum ledger -*DefaultApi* | [**InvokeRawWeb3EthContractV1**](docs/DefaultApi.md#invokerawweb3ethcontractv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract | Low-level endpoint to invoke a method on deployed contract. -*DefaultApi* | [**InvokeWeb3EthMethodV1**](docs/DefaultApi.md#invokeweb3ethmethodv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method | Invoke any method from web3.eth (low-level) -*DefaultApi* | [**RunTransactionV1**](docs/DefaultApi.md#runtransactionv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction | Executes a transaction on a ethereum ledger - - -## Documentation For Models - - - [ContractJSON](docs/ContractJSON.md) - - [ContractJsonDefinition](docs/ContractJsonDefinition.md) - - [ContractKeychainDefinition](docs/ContractKeychainDefinition.md) - - [DeployContractV1Request](docs/DeployContractV1Request.md) - - [DeployContractV1RequestContract](docs/DeployContractV1RequestContract.md) - - [DeployedContractJsonDefinition](docs/DeployedContractJsonDefinition.md) - - [ErrorExceptionResponseV1](docs/ErrorExceptionResponseV1.md) - - [EthContractInvocationType](docs/EthContractInvocationType.md) - - [EthContractInvocationWeb3Method](docs/EthContractInvocationWeb3Method.md) - - [EthereumTransactionConfig](docs/EthereumTransactionConfig.md) - - [GasTransactionConfig](docs/GasTransactionConfig.md) - - [GasTransactionConfigEIP1559](docs/GasTransactionConfigEIP1559.md) - - [GasTransactionConfigLegacy](docs/GasTransactionConfigLegacy.md) - - [InvokeContractV1Request](docs/InvokeContractV1Request.md) - - [InvokeContractV1RequestContract](docs/InvokeContractV1RequestContract.md) - - [InvokeContractV1Response](docs/InvokeContractV1Response.md) - - [InvokeRawWeb3EthContractV1Request](docs/InvokeRawWeb3EthContractV1Request.md) - - [InvokeRawWeb3EthContractV1Response](docs/InvokeRawWeb3EthContractV1Response.md) - - [InvokeRawWeb3EthMethodV1Request](docs/InvokeRawWeb3EthMethodV1Request.md) - - [InvokeRawWeb3EthMethodV1Response](docs/InvokeRawWeb3EthMethodV1Response.md) - - [RunTransactionRequest](docs/RunTransactionRequest.md) - - [RunTransactionResponse](docs/RunTransactionResponse.md) - - [WatchBlocksV1](docs/WatchBlocksV1.md) - - [WatchBlocksV1BlockData](docs/WatchBlocksV1BlockData.md) - - [WatchBlocksV1BlockDataTimestamp](docs/WatchBlocksV1BlockDataTimestamp.md) - - [WatchBlocksV1Options](docs/WatchBlocksV1Options.md) - - [WatchBlocksV1Progress](docs/WatchBlocksV1Progress.md) - - [Web3BlockHeader](docs/Web3BlockHeader.md) - - [Web3SigningCredential](docs/Web3SigningCredential.md) - - [Web3SigningCredentialCactiKeychainRef](docs/Web3SigningCredentialCactiKeychainRef.md) - - [Web3SigningCredentialGethKeychainPassword](docs/Web3SigningCredentialGethKeychainPassword.md) - - [Web3SigningCredentialNone](docs/Web3SigningCredentialNone.md) - - [Web3SigningCredentialPrivateKeyHex](docs/Web3SigningCredentialPrivateKeyHex.md) - - [Web3SigningCredentialType](docs/Web3SigningCredentialType.md) - - [Web3Transaction](docs/Web3Transaction.md) - - [Web3TransactionReceipt](docs/Web3TransactionReceipt.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 71b75f6713..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,1012 +0,0 @@ -openapi: 3.0.3 -info: - description: Can perform basic tasks on a Ethereum ledger - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cacti Plugin - Connector Ethereum - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract: - post: - operationId: deployContract - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Deploys the contract to ethereum ledger. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction: - post: - operationId: runTransactionV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Executes a transaction on a ethereum ledger - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract: - post: - operationId: invokeContractV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Invokes a contract on an ethereum ledger - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method: - post: - operationId: invokeWeb3EthMethodV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeRawWeb3EthMethodV1Request' - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/InvokeRawWeb3EthMethodV1Response' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Invoke any method from web3.eth (low-level) - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract: - post: - operationId: invokeRawWeb3EthContractV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeRawWeb3EthContractV1Request' - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/InvokeRawWeb3EthContractV1Response' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Low-level endpoint to invoke a method on deployed contract. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/json-rpc: - summary: Proxy endpoint to pass JSON-RPC requests to remote ethereum node. -components: - schemas: - Web3SigningCredential: - discriminator: - propertyName: type - example: - type: null - oneOf: - - $ref: '#/components/schemas/Web3SigningCredentialGethKeychainPassword' - - $ref: '#/components/schemas/Web3SigningCredentialCactiKeychainRef' - - $ref: '#/components/schemas/Web3SigningCredentialPrivateKeyHex' - - $ref: '#/components/schemas/Web3SigningCredentialNone' - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredentialGethKeychainPassword: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 66 - minLength: 66 - nullable: false - type: string - secret: - description: A geth keychain unlock password. - maxLength: 65535 - minLength: 0 - type: string - required: - - ethAccount - - secret - - type - type: object - Web3SigningCredentialCactiKeychainRef: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 66 - minLength: 66 - nullable: false - type: string - keychainEntryKey: - description: The key to use when looking up the the keychain entry holding - the secret pointed to by the keychainEntryKey parameter. - maxLength: 1024 - minLength: 0 - type: string - keychainId: - description: The keychain ID to use when looking up the the keychain plugin - instance that will be used to retrieve the secret pointed to by the keychainEntryKey - parameter. - maxLength: 1024 - minLength: 0 - type: string - required: - - ethAccount - - keychainEntryKey - - type - type: object - Web3SigningCredentialPrivateKeyHex: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 66 - minLength: 66 - nullable: false - type: string - secret: - description: The HEX encoded private key of an eth account. - maxLength: 65535 - minLength: 0 - type: string - required: - - ethAccount - - secret - - type - type: object - Web3SigningCredentialNone: - description: Using this denotes that there is no signing required because the - transaction is pre-signed. - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredentialType: - enum: - - CACTI_KEYCHAIN_REF - - GETH_KEYCHAIN_PASSWORD - - PRIVATE_KEY_HEX - - NONE - type: string - EthContractInvocationType: - enum: - - SEND - - CALL - type: string - EthContractInvocationWeb3Method: - enum: - - send - - call - - encodeABI - - estimateGas - type: string - GasTransactionConfigLegacy: - description: Transaction gas settings in networks before EIP-1559 (London fork). - properties: - gas: - description: A maximum amount of gas a user is willing to provide for the - execution of the transaction. (gasLimit) - type: string - gasPrice: - description: "A price (in Wei) a user is willing to pay for each unit of\ - \ gas used during the execution of the transaction. In EIP-1559 (London\ - \ fork) networks, it will be set as both maxFeePerGas and maxPriorityFeePerGas." - type: string - type: object - GasTransactionConfigEIP1559: - description: Transaction gas settings in networks after EIP-1559 (London fork). - properties: - gasLimit: - description: A maximum amount of gas a user is willing to provide for the - execution of the transaction. - nullable: false - type: string - maxFeePerGas: - description: A maximum fee (including the base fee and the tip) a user is - willing to pay per unit of gas. - nullable: false - type: string - maxPriorityFeePerGas: - description: A maximum tip amount a user is willing to pay per unit of gas. - nullable: false - type: string - type: object - GasTransactionConfig: - description: Transaction gas settings. - oneOf: - - $ref: '#/components/schemas/GasTransactionConfigLegacy' - - $ref: '#/components/schemas/GasTransactionConfigEIP1559' - type: object - EthereumTransactionConfig: - example: - gasConfig: null - rawTransaction: rawTransaction - data: data - from: from - to: to - value: value - nonce: nonce - properties: - rawTransaction: - nullable: false - type: string - from: - type: string - to: - type: string - value: - type: string - nonce: - type: string - data: - type: string - gasConfig: - $ref: '#/components/schemas/GasTransactionConfig' - type: object - Web3TransactionReceipt: - additionalProperties: true - example: - blockHash: blockHash - logsBloom: logsBloom - contractAddress: contractAddress - transactionIndex: transactionIndex - commitmentHash: commitmentHash - type: type - transactionHash: transactionHash - output: output - gasUsed: gasUsed - blockNumber: blockNumber - cumulativeGasUsed: cumulativeGasUsed - from: from - to: to - revertReason: revertReason - effectiveGasPrice: effectiveGasPrice - logs: - - "" - - "" - status: true - properties: - status: - nullable: false - type: boolean - transactionHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - transactionIndex: - nullable: false - type: string - blockHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - blockNumber: - nullable: false - type: string - gasUsed: - nullable: false - type: string - effectiveGasPrice: - nullable: false - type: string - contractAddress: - nullable: true - type: string - from: - nullable: false - type: string - to: - nullable: false - type: string - logs: - default: [] - items: {} - nullable: false - type: array - logsBloom: - nullable: false - type: string - revertReason: - nullable: false - type: string - output: - nullable: false - type: string - commitmentHash: - nullable: false - type: string - cumulativeGasUsed: - nullable: false - type: string - type: - nullable: false - type: string - required: - - blockHash - - blockNumber - - from - - gasUsed - - status - - to - - transactionHash - - transactionIndex - type: object - ContractJSON: - additionalProperties: true - properties: - contractName: - nullable: false - type: string - bytecode: - description: See https://ethereum.stackexchange.com/a/47556 regarding the - maximum length of the bytecode - maxLength: 24576 - minLength: 1 - nullable: false - type: string - abi: - description: "The application binary interface of the solidity contract,\ - \ optional parameter" - items: {} - nullable: false - type: array - metadata: - type: string - deployedBytecode: - type: string - sourceMap: - type: string - deployedSourceMap: - type: string - sourcePath: - type: string - compiler: - type: object - networks: - type: object - ast: - type: object - functionHashes: - type: object - gasEstimates: - type: object - required: - - abi - - bytecode - - contractName - type: object - ContractJsonDefinition: - additionalProperties: false - properties: - contractJSON: - $ref: '#/components/schemas/ContractJSON' - required: - - contractJSON - type: object - DeployedContractJsonDefinition: - additionalProperties: false - properties: - contractJSON: - $ref: '#/components/schemas/ContractJSON' - contractAddress: - nullable: false - type: string - required: - - contractAddress - - contractJSON - type: object - ContractKeychainDefinition: - additionalProperties: false - properties: - contractName: - description: The contract name for retrieve the contracts json on the keychain. - maxLength: 100 - minLength: 1 - nullable: false - type: string - keychainId: - description: The keychainId for retrieve the contracts json. - maxLength: 100 - minLength: 1 - nullable: false - type: string - required: - - contractName - - keychainId - type: object - RunTransactionRequest: - additionalProperties: false - example: - timeoutMs: 0.08008281904610115 - transactionConfig: - gasConfig: null - rawTransaction: rawTransaction - data: data - from: from - to: to - value: value - nonce: nonce - web3SigningCredential: - type: null - properties: - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - transactionConfig: - $ref: '#/components/schemas/EthereumTransactionConfig' - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - with thehash of the transaction(which indicates successful execution) - beforegiving up and crashing. - minimum: 0 - nullable: false - type: number - required: - - transactionConfig - - web3SigningCredential - type: object - RunTransactionResponse: - example: - transactionReceipt: - blockHash: blockHash - logsBloom: logsBloom - contractAddress: contractAddress - transactionIndex: transactionIndex - commitmentHash: commitmentHash - type: type - transactionHash: transactionHash - output: output - gasUsed: gasUsed - blockNumber: blockNumber - cumulativeGasUsed: cumulativeGasUsed - from: from - to: to - revertReason: revertReason - effectiveGasPrice: effectiveGasPrice - logs: - - "" - - "" - status: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - required: - - transactionReceipt - type: object - DeployContractV1Request: - additionalProperties: false - example: - gasConfig: null - constructorArgs: - - "" - - "" - contract: null - web3SigningCredential: - type: null - value: value - properties: - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - contract: - $ref: '#/components/schemas/DeployContractV1Request_contract' - constructorArgs: - default: [] - description: The list of arguments to pass in to the constructor of the - contract being deployed. - items: {} - type: array - gasConfig: - $ref: '#/components/schemas/GasTransactionConfig' - value: - description: Ether balance to send on deployment. - nullable: false - type: string - required: - - contract - - web3SigningCredential - type: object - InvokeContractV1Request: - additionalProperties: false - example: - gasConfig: null - invocationType: null - timeoutMs: 0.08008281904610115 - contract: null - methodName: methodName - web3SigningCredential: - type: null - params: - - "" - - "" - value: value - properties: - contract: - $ref: '#/components/schemas/InvokeContractV1Request_contract' - methodName: - description: The name of the contract method to invoke. - maxLength: 2048 - minLength: 1 - nullable: false - type: string - params: - default: [] - description: The list of arguments to pass in to the contract method being - invoked. - items: {} - type: array - invocationType: - $ref: '#/components/schemas/EthContractInvocationType' - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - gasConfig: - $ref: '#/components/schemas/GasTransactionConfig' - value: - type: string - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - before returning an error. Only has any effect if the invocation type - is SEND - minimum: 0 - nullable: false - type: number - required: - - contract - - invocationType - - methodName - - params - type: object - InvokeContractV1Response: - example: - transactionReceipt: - blockHash: blockHash - logsBloom: logsBloom - contractAddress: contractAddress - transactionIndex: transactionIndex - commitmentHash: commitmentHash - type: type - transactionHash: transactionHash - output: output - gasUsed: gasUsed - blockNumber: blockNumber - cumulativeGasUsed: cumulativeGasUsed - from: from - to: to - revertReason: revertReason - effectiveGasPrice: effectiveGasPrice - logs: - - "" - - "" - status: true - callOutput: "" - success: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - callOutput: {} - success: - nullable: false - type: boolean - required: - - success - type: object - InvokeRawWeb3EthMethodV1Request: - additionalProperties: false - example: - methodName: methodName - params: - - "" - - "" - properties: - methodName: - description: The name of the web3.eth method to invoke - maxLength: 2048 - minLength: 1 - nullable: false - type: string - params: - default: [] - description: The list of arguments to pass to web3.eth method specified - in methodName - items: {} - type: array - required: - - methodName - type: object - InvokeRawWeb3EthMethodV1Response: - additionalProperties: false - example: - data: "" - errorDetail: errorDetail - status: 0.8008281904610115 - properties: - status: - description: Status code of the operation - nullable: false - type: number - data: - description: Output of requested web3.eth method - errorDetail: - description: Error details - nullable: false - type: string - required: - - status - type: object - InvokeRawWeb3EthContractV1Request: - additionalProperties: false - example: - invocationType: null - address: address - abi: "" - contractMethodArgs: - - "" - - "" - contractMethod: contractMethod - invocationParams: "{}" - properties: - abi: - description: The application binary interface of the solidity contract - address: - description: Deployed solidity contract address - type: string - invocationType: - $ref: '#/components/schemas/EthContractInvocationWeb3Method' - invocationParams: - default: {} - description: "The list of arguments for contract invocation method (send,\ - \ call, etc...)" - type: object - contractMethod: - description: Method of deployed solidity contract to execute - type: string - contractMethodArgs: - default: [] - description: The list of arguments for deployed solidity contract method - items: {} - type: array - required: - - abi - - address - - contractMethod - - invocationType - type: object - InvokeRawWeb3EthContractV1Response: - additionalProperties: false - example: - data: "" - errorDetail: errorDetail - status: 0.8008281904610115 - properties: - status: - description: Status code of the operation - type: number - data: - description: Output of contract invocation method - errorDetail: - description: Error details - type: string - required: - - status - type: object - PrometheusExporterMetricsResponse: - nullable: false - type: string - WatchBlocksV1: - enum: - - org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Subscribe - - org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Next - - org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Unsubscribe - - org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Error - - org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Complete - type: string - x-enum-varnames: - - Subscribe - - Next - - Unsubscribe - - Error - - Complete - WatchBlocksV1Options: - properties: - getBlockData: - default: false - description: "Include entire block data if flag is true, otherwise just\ - \ a header is returned (default)" - type: boolean - lastSeenBlock: - description: Block from which we want to start the monitoring process. - type: number - httpPollInterval: - description: How often to poll ethereum node for new blocks. Not used if - the node supports subscription based monitoring (i.e. WebSocket). - type: number - type: object - Web3BlockHeader: - properties: - number: - type: string - parentHash: - type: string - sha3Uncles: - type: string - transactionsRoot: - type: string - receiptsRoot: - type: string - difficulty: - type: string - mixHash: - type: string - miner: - type: string - gasLimit: - type: string - gasUsed: - type: string - stateRoot: - type: string - logsBloom: - type: string - extraData: - type: string - nonce: - type: string - timestamp: - type: string - required: - - gasLimit - - gasUsed - - sha3Uncles - - transactionRoot - type: object - Web3Transaction: - properties: - hash: - type: string - nonce: - type: string - blockHash: - type: string - blockNumber: - type: string - transactionIndex: - type: string - from: - type: string - to: - type: string - value: - type: string - gasPrice: - type: string - gas: - type: string - input: - type: string - type: - type: string - chainId: - type: string - v: - type: string - r: - type: string - s: - type: string - required: - - blockHash - - blockNumber - - chainId - - from - - gas - - gasPrice - - hash - - input - - nonce - - to - - transactionIndex - - type - - value - type: object - WatchBlocksV1BlockData: - properties: - number: - type: string - hash: - type: string - parentHash: - type: string - nonce: - type: string - sha3Uncles: - type: string - logsBloom: - type: string - transactionsRoot: - type: string - stateRoot: - type: string - receiptsRoot: - type: string - difficulty: - type: string - mixHash: - type: string - miner: - type: string - extraData: - type: string - gasLimit: - type: string - gasUsed: - type: string - timestamp: - $ref: '#/components/schemas/WatchBlocksV1BlockData_timestamp' - size: - type: string - totalDifficulty: - type: string - uncles: - items: - type: string - type: array - baseFeePerGas: - type: string - transactions: - items: - $ref: '#/components/schemas/Web3Transaction' - type: array - required: - - extraData - - gasLimit - - gasUsed - - miner - - nonce - - number - - parentHash - - receiptRoot - - sha3Uncles - - size - - stateRoot - - timestamp - - totalDifficulty - - transactionRoot - - transactions - - uncles - type: object - WatchBlocksV1Progress: - properties: - blockHeader: - $ref: '#/components/schemas/Web3BlockHeader' - blockData: - $ref: '#/components/schemas/WatchBlocksV1BlockData' - type: object - ErrorExceptionResponseV1: - description: Error response from the connector. - properties: - message: - description: Short error description message. - nullable: false - type: string - error: - description: Detailed error information. - nullable: false - type: string - required: - - error - - message - type: object - DeployContractV1Request_contract: - nullable: false - oneOf: - - $ref: '#/components/schemas/ContractJsonDefinition' - - $ref: '#/components/schemas/ContractKeychainDefinition' - InvokeContractV1Request_contract: - oneOf: - - $ref: '#/components/schemas/DeployedContractJsonDefinition' - - $ref: '#/components/schemas/ContractKeychainDefinition' - WatchBlocksV1BlockData_timestamp: - oneOf: - - type: string - - type: number diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 1b81b80a0f..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,695 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeployContractRequest struct { - ctx context.Context - ApiService *DefaultApiService - deployContractV1Request *DeployContractV1Request -} - -func (r ApiDeployContractRequest) DeployContractV1Request(deployContractV1Request DeployContractV1Request) ApiDeployContractRequest { - r.deployContractV1Request = &deployContractV1Request - return r -} - -func (r ApiDeployContractRequest) Execute() (*RunTransactionResponse, *http.Response, error) { - return r.ApiService.DeployContractExecute(r) -} - -/* -DeployContract Deploys the contract to ethereum ledger. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeployContractRequest -*/ -func (a *DefaultApiService) DeployContract(ctx context.Context) ApiDeployContractRequest { - return ApiDeployContractRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RunTransactionResponse -func (a *DefaultApiService) DeployContractExecute(r ApiDeployContractRequest) (*RunTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeployContract") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deployContractV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsV1Execute(r) -} - -/* -GetPrometheusMetricsV1 Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsV1Request -*/ -func (a *DefaultApiService) GetPrometheusMetricsV1(ctx context.Context) ApiGetPrometheusMetricsV1Request { - return ApiGetPrometheusMetricsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsV1Execute(r ApiGetPrometheusMetricsV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetricsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInvokeContractV1Request struct { - ctx context.Context - ApiService *DefaultApiService - invokeContractV1Request *InvokeContractV1Request -} - -func (r ApiInvokeContractV1Request) InvokeContractV1Request(invokeContractV1Request InvokeContractV1Request) ApiInvokeContractV1Request { - r.invokeContractV1Request = &invokeContractV1Request - return r -} - -func (r ApiInvokeContractV1Request) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.InvokeContractV1Execute(r) -} - -/* -InvokeContractV1 Invokes a contract on an ethereum ledger - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInvokeContractV1Request -*/ -func (a *DefaultApiService) InvokeContractV1(ctx context.Context) ApiInvokeContractV1Request { - return ApiInvokeContractV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) InvokeContractV1Execute(r ApiInvokeContractV1Request) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InvokeContractV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.invokeContractV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInvokeRawWeb3EthContractV1Request struct { - ctx context.Context - ApiService *DefaultApiService - invokeRawWeb3EthContractV1Request *InvokeRawWeb3EthContractV1Request -} - -func (r ApiInvokeRawWeb3EthContractV1Request) InvokeRawWeb3EthContractV1Request(invokeRawWeb3EthContractV1Request InvokeRawWeb3EthContractV1Request) ApiInvokeRawWeb3EthContractV1Request { - r.invokeRawWeb3EthContractV1Request = &invokeRawWeb3EthContractV1Request - return r -} - -func (r ApiInvokeRawWeb3EthContractV1Request) Execute() (*InvokeRawWeb3EthContractV1Response, *http.Response, error) { - return r.ApiService.InvokeRawWeb3EthContractV1Execute(r) -} - -/* -InvokeRawWeb3EthContractV1 Low-level endpoint to invoke a method on deployed contract. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInvokeRawWeb3EthContractV1Request -*/ -func (a *DefaultApiService) InvokeRawWeb3EthContractV1(ctx context.Context) ApiInvokeRawWeb3EthContractV1Request { - return ApiInvokeRawWeb3EthContractV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeRawWeb3EthContractV1Response -func (a *DefaultApiService) InvokeRawWeb3EthContractV1Execute(r ApiInvokeRawWeb3EthContractV1Request) (*InvokeRawWeb3EthContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeRawWeb3EthContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InvokeRawWeb3EthContractV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.invokeRawWeb3EthContractV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInvokeWeb3EthMethodV1Request struct { - ctx context.Context - ApiService *DefaultApiService - invokeRawWeb3EthMethodV1Request *InvokeRawWeb3EthMethodV1Request -} - -func (r ApiInvokeWeb3EthMethodV1Request) InvokeRawWeb3EthMethodV1Request(invokeRawWeb3EthMethodV1Request InvokeRawWeb3EthMethodV1Request) ApiInvokeWeb3EthMethodV1Request { - r.invokeRawWeb3EthMethodV1Request = &invokeRawWeb3EthMethodV1Request - return r -} - -func (r ApiInvokeWeb3EthMethodV1Request) Execute() (*InvokeRawWeb3EthMethodV1Response, *http.Response, error) { - return r.ApiService.InvokeWeb3EthMethodV1Execute(r) -} - -/* -InvokeWeb3EthMethodV1 Invoke any method from web3.eth (low-level) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInvokeWeb3EthMethodV1Request -*/ -func (a *DefaultApiService) InvokeWeb3EthMethodV1(ctx context.Context) ApiInvokeWeb3EthMethodV1Request { - return ApiInvokeWeb3EthMethodV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeRawWeb3EthMethodV1Response -func (a *DefaultApiService) InvokeWeb3EthMethodV1Execute(r ApiInvokeWeb3EthMethodV1Request) (*InvokeRawWeb3EthMethodV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeRawWeb3EthMethodV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InvokeWeb3EthMethodV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.invokeRawWeb3EthMethodV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRunTransactionV1Request struct { - ctx context.Context - ApiService *DefaultApiService - runTransactionRequest *RunTransactionRequest -} - -func (r ApiRunTransactionV1Request) RunTransactionRequest(runTransactionRequest RunTransactionRequest) ApiRunTransactionV1Request { - r.runTransactionRequest = &runTransactionRequest - return r -} - -func (r ApiRunTransactionV1Request) Execute() (*RunTransactionResponse, *http.Response, error) { - return r.ApiService.RunTransactionV1Execute(r) -} - -/* -RunTransactionV1 Executes a transaction on a ethereum ledger - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRunTransactionV1Request -*/ -func (a *DefaultApiService) RunTransactionV1(ctx context.Context) ApiRunTransactionV1Request { - return ApiRunTransactionV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RunTransactionResponse -func (a *DefaultApiService) RunTransactionV1Execute(r ApiRunTransactionV1Request) (*RunTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RunTransactionV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.runTransactionRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 965bbfdeb1..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cacti Plugin - Connector Ethereum API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 2850edb5b3..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 614c6075bd..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_contract_json.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_contract_json.go deleted file mode 100644 index ce98ea8062..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_contract_json.go +++ /dev/null @@ -1,570 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the ContractJSON type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ContractJSON{} - -// ContractJSON struct for ContractJSON -type ContractJSON struct { - ContractName string `json:"contractName"` - // See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode - Bytecode string `json:"bytecode"` - // The application binary interface of the solidity contract, optional parameter - Abi []interface{} `json:"abi"` - Metadata *string `json:"metadata,omitempty"` - DeployedBytecode *string `json:"deployedBytecode,omitempty"` - SourceMap *string `json:"sourceMap,omitempty"` - DeployedSourceMap *string `json:"deployedSourceMap,omitempty"` - SourcePath *string `json:"sourcePath,omitempty"` - Compiler map[string]interface{} `json:"compiler,omitempty"` - Networks map[string]interface{} `json:"networks,omitempty"` - Ast map[string]interface{} `json:"ast,omitempty"` - FunctionHashes map[string]interface{} `json:"functionHashes,omitempty"` - GasEstimates map[string]interface{} `json:"gasEstimates,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ContractJSON ContractJSON - -// NewContractJSON instantiates a new ContractJSON object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewContractJSON(contractName string, bytecode string, abi []interface{}) *ContractJSON { - this := ContractJSON{} - this.ContractName = contractName - this.Bytecode = bytecode - this.Abi = abi - return &this -} - -// NewContractJSONWithDefaults instantiates a new ContractJSON object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewContractJSONWithDefaults() *ContractJSON { - this := ContractJSON{} - return &this -} - -// GetContractName returns the ContractName field value -func (o *ContractJSON) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *ContractJSON) SetContractName(v string) { - o.ContractName = v -} - -// GetBytecode returns the Bytecode field value -func (o *ContractJSON) GetBytecode() string { - if o == nil { - var ret string - return ret - } - - return o.Bytecode -} - -// GetBytecodeOk returns a tuple with the Bytecode field value -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetBytecodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Bytecode, true -} - -// SetBytecode sets field value -func (o *ContractJSON) SetBytecode(v string) { - o.Bytecode = v -} - -// GetAbi returns the Abi field value -func (o *ContractJSON) GetAbi() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.Abi -} - -// GetAbiOk returns a tuple with the Abi field value -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetAbiOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Abi, true -} - -// SetAbi sets field value -func (o *ContractJSON) SetAbi(v []interface{}) { - o.Abi = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *ContractJSON) GetMetadata() string { - if o == nil || IsNil(o.Metadata) { - var ret string - return ret - } - return *o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetMetadataOk() (*string, bool) { - if o == nil || IsNil(o.Metadata) { - return nil, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *ContractJSON) HasMetadata() bool { - if o != nil && !IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given string and assigns it to the Metadata field. -func (o *ContractJSON) SetMetadata(v string) { - o.Metadata = &v -} - -// GetDeployedBytecode returns the DeployedBytecode field value if set, zero value otherwise. -func (o *ContractJSON) GetDeployedBytecode() string { - if o == nil || IsNil(o.DeployedBytecode) { - var ret string - return ret - } - return *o.DeployedBytecode -} - -// GetDeployedBytecodeOk returns a tuple with the DeployedBytecode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetDeployedBytecodeOk() (*string, bool) { - if o == nil || IsNil(o.DeployedBytecode) { - return nil, false - } - return o.DeployedBytecode, true -} - -// HasDeployedBytecode returns a boolean if a field has been set. -func (o *ContractJSON) HasDeployedBytecode() bool { - if o != nil && !IsNil(o.DeployedBytecode) { - return true - } - - return false -} - -// SetDeployedBytecode gets a reference to the given string and assigns it to the DeployedBytecode field. -func (o *ContractJSON) SetDeployedBytecode(v string) { - o.DeployedBytecode = &v -} - -// GetSourceMap returns the SourceMap field value if set, zero value otherwise. -func (o *ContractJSON) GetSourceMap() string { - if o == nil || IsNil(o.SourceMap) { - var ret string - return ret - } - return *o.SourceMap -} - -// GetSourceMapOk returns a tuple with the SourceMap field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetSourceMapOk() (*string, bool) { - if o == nil || IsNil(o.SourceMap) { - return nil, false - } - return o.SourceMap, true -} - -// HasSourceMap returns a boolean if a field has been set. -func (o *ContractJSON) HasSourceMap() bool { - if o != nil && !IsNil(o.SourceMap) { - return true - } - - return false -} - -// SetSourceMap gets a reference to the given string and assigns it to the SourceMap field. -func (o *ContractJSON) SetSourceMap(v string) { - o.SourceMap = &v -} - -// GetDeployedSourceMap returns the DeployedSourceMap field value if set, zero value otherwise. -func (o *ContractJSON) GetDeployedSourceMap() string { - if o == nil || IsNil(o.DeployedSourceMap) { - var ret string - return ret - } - return *o.DeployedSourceMap -} - -// GetDeployedSourceMapOk returns a tuple with the DeployedSourceMap field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetDeployedSourceMapOk() (*string, bool) { - if o == nil || IsNil(o.DeployedSourceMap) { - return nil, false - } - return o.DeployedSourceMap, true -} - -// HasDeployedSourceMap returns a boolean if a field has been set. -func (o *ContractJSON) HasDeployedSourceMap() bool { - if o != nil && !IsNil(o.DeployedSourceMap) { - return true - } - - return false -} - -// SetDeployedSourceMap gets a reference to the given string and assigns it to the DeployedSourceMap field. -func (o *ContractJSON) SetDeployedSourceMap(v string) { - o.DeployedSourceMap = &v -} - -// GetSourcePath returns the SourcePath field value if set, zero value otherwise. -func (o *ContractJSON) GetSourcePath() string { - if o == nil || IsNil(o.SourcePath) { - var ret string - return ret - } - return *o.SourcePath -} - -// GetSourcePathOk returns a tuple with the SourcePath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetSourcePathOk() (*string, bool) { - if o == nil || IsNil(o.SourcePath) { - return nil, false - } - return o.SourcePath, true -} - -// HasSourcePath returns a boolean if a field has been set. -func (o *ContractJSON) HasSourcePath() bool { - if o != nil && !IsNil(o.SourcePath) { - return true - } - - return false -} - -// SetSourcePath gets a reference to the given string and assigns it to the SourcePath field. -func (o *ContractJSON) SetSourcePath(v string) { - o.SourcePath = &v -} - -// GetCompiler returns the Compiler field value if set, zero value otherwise. -func (o *ContractJSON) GetCompiler() map[string]interface{} { - if o == nil || IsNil(o.Compiler) { - var ret map[string]interface{} - return ret - } - return o.Compiler -} - -// GetCompilerOk returns a tuple with the Compiler field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetCompilerOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Compiler) { - return map[string]interface{}{}, false - } - return o.Compiler, true -} - -// HasCompiler returns a boolean if a field has been set. -func (o *ContractJSON) HasCompiler() bool { - if o != nil && !IsNil(o.Compiler) { - return true - } - - return false -} - -// SetCompiler gets a reference to the given map[string]interface{} and assigns it to the Compiler field. -func (o *ContractJSON) SetCompiler(v map[string]interface{}) { - o.Compiler = v -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *ContractJSON) GetNetworks() map[string]interface{} { - if o == nil || IsNil(o.Networks) { - var ret map[string]interface{} - return ret - } - return o.Networks -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetNetworksOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Networks) { - return map[string]interface{}{}, false - } - return o.Networks, true -} - -// HasNetworks returns a boolean if a field has been set. -func (o *ContractJSON) HasNetworks() bool { - if o != nil && !IsNil(o.Networks) { - return true - } - - return false -} - -// SetNetworks gets a reference to the given map[string]interface{} and assigns it to the Networks field. -func (o *ContractJSON) SetNetworks(v map[string]interface{}) { - o.Networks = v -} - -// GetAst returns the Ast field value if set, zero value otherwise. -func (o *ContractJSON) GetAst() map[string]interface{} { - if o == nil || IsNil(o.Ast) { - var ret map[string]interface{} - return ret - } - return o.Ast -} - -// GetAstOk returns a tuple with the Ast field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetAstOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Ast) { - return map[string]interface{}{}, false - } - return o.Ast, true -} - -// HasAst returns a boolean if a field has been set. -func (o *ContractJSON) HasAst() bool { - if o != nil && !IsNil(o.Ast) { - return true - } - - return false -} - -// SetAst gets a reference to the given map[string]interface{} and assigns it to the Ast field. -func (o *ContractJSON) SetAst(v map[string]interface{}) { - o.Ast = v -} - -// GetFunctionHashes returns the FunctionHashes field value if set, zero value otherwise. -func (o *ContractJSON) GetFunctionHashes() map[string]interface{} { - if o == nil || IsNil(o.FunctionHashes) { - var ret map[string]interface{} - return ret - } - return o.FunctionHashes -} - -// GetFunctionHashesOk returns a tuple with the FunctionHashes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetFunctionHashesOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.FunctionHashes) { - return map[string]interface{}{}, false - } - return o.FunctionHashes, true -} - -// HasFunctionHashes returns a boolean if a field has been set. -func (o *ContractJSON) HasFunctionHashes() bool { - if o != nil && !IsNil(o.FunctionHashes) { - return true - } - - return false -} - -// SetFunctionHashes gets a reference to the given map[string]interface{} and assigns it to the FunctionHashes field. -func (o *ContractJSON) SetFunctionHashes(v map[string]interface{}) { - o.FunctionHashes = v -} - -// GetGasEstimates returns the GasEstimates field value if set, zero value otherwise. -func (o *ContractJSON) GetGasEstimates() map[string]interface{} { - if o == nil || IsNil(o.GasEstimates) { - var ret map[string]interface{} - return ret - } - return o.GasEstimates -} - -// GetGasEstimatesOk returns a tuple with the GasEstimates field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetGasEstimatesOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.GasEstimates) { - return map[string]interface{}{}, false - } - return o.GasEstimates, true -} - -// HasGasEstimates returns a boolean if a field has been set. -func (o *ContractJSON) HasGasEstimates() bool { - if o != nil && !IsNil(o.GasEstimates) { - return true - } - - return false -} - -// SetGasEstimates gets a reference to the given map[string]interface{} and assigns it to the GasEstimates field. -func (o *ContractJSON) SetGasEstimates(v map[string]interface{}) { - o.GasEstimates = v -} - -func (o ContractJSON) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ContractJSON) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractName"] = o.ContractName - toSerialize["bytecode"] = o.Bytecode - toSerialize["abi"] = o.Abi - if !IsNil(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !IsNil(o.DeployedBytecode) { - toSerialize["deployedBytecode"] = o.DeployedBytecode - } - if !IsNil(o.SourceMap) { - toSerialize["sourceMap"] = o.SourceMap - } - if !IsNil(o.DeployedSourceMap) { - toSerialize["deployedSourceMap"] = o.DeployedSourceMap - } - if !IsNil(o.SourcePath) { - toSerialize["sourcePath"] = o.SourcePath - } - if !IsNil(o.Compiler) { - toSerialize["compiler"] = o.Compiler - } - if !IsNil(o.Networks) { - toSerialize["networks"] = o.Networks - } - if !IsNil(o.Ast) { - toSerialize["ast"] = o.Ast - } - if !IsNil(o.FunctionHashes) { - toSerialize["functionHashes"] = o.FunctionHashes - } - if !IsNil(o.GasEstimates) { - toSerialize["gasEstimates"] = o.GasEstimates - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ContractJSON) UnmarshalJSON(bytes []byte) (err error) { - varContractJSON := _ContractJSON{} - - if err = json.Unmarshal(bytes, &varContractJSON); err == nil { - *o = ContractJSON(varContractJSON) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "contractName") - delete(additionalProperties, "bytecode") - delete(additionalProperties, "abi") - delete(additionalProperties, "metadata") - delete(additionalProperties, "deployedBytecode") - delete(additionalProperties, "sourceMap") - delete(additionalProperties, "deployedSourceMap") - delete(additionalProperties, "sourcePath") - delete(additionalProperties, "compiler") - delete(additionalProperties, "networks") - delete(additionalProperties, "ast") - delete(additionalProperties, "functionHashes") - delete(additionalProperties, "gasEstimates") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableContractJSON struct { - value *ContractJSON - isSet bool -} - -func (v NullableContractJSON) Get() *ContractJSON { - return v.value -} - -func (v *NullableContractJSON) Set(val *ContractJSON) { - v.value = val - v.isSet = true -} - -func (v NullableContractJSON) IsSet() bool { - return v.isSet -} - -func (v *NullableContractJSON) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContractJSON(val *ContractJSON) *NullableContractJSON { - return &NullableContractJSON{value: val, isSet: true} -} - -func (v NullableContractJSON) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContractJSON) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_contract_json_definition.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_contract_json_definition.go deleted file mode 100644 index 0205dd4915..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_contract_json_definition.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the ContractJsonDefinition type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ContractJsonDefinition{} - -// ContractJsonDefinition struct for ContractJsonDefinition -type ContractJsonDefinition struct { - ContractJSON ContractJSON `json:"contractJSON"` -} - -// NewContractJsonDefinition instantiates a new ContractJsonDefinition object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewContractJsonDefinition(contractJSON ContractJSON) *ContractJsonDefinition { - this := ContractJsonDefinition{} - this.ContractJSON = contractJSON - return &this -} - -// NewContractJsonDefinitionWithDefaults instantiates a new ContractJsonDefinition object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewContractJsonDefinitionWithDefaults() *ContractJsonDefinition { - this := ContractJsonDefinition{} - return &this -} - -// GetContractJSON returns the ContractJSON field value -func (o *ContractJsonDefinition) GetContractJSON() ContractJSON { - if o == nil { - var ret ContractJSON - return ret - } - - return o.ContractJSON -} - -// GetContractJSONOk returns a tuple with the ContractJSON field value -// and a boolean to check if the value has been set. -func (o *ContractJsonDefinition) GetContractJSONOk() (*ContractJSON, bool) { - if o == nil { - return nil, false - } - return &o.ContractJSON, true -} - -// SetContractJSON sets field value -func (o *ContractJsonDefinition) SetContractJSON(v ContractJSON) { - o.ContractJSON = v -} - -func (o ContractJsonDefinition) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ContractJsonDefinition) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractJSON"] = o.ContractJSON - return toSerialize, nil -} - -type NullableContractJsonDefinition struct { - value *ContractJsonDefinition - isSet bool -} - -func (v NullableContractJsonDefinition) Get() *ContractJsonDefinition { - return v.value -} - -func (v *NullableContractJsonDefinition) Set(val *ContractJsonDefinition) { - v.value = val - v.isSet = true -} - -func (v NullableContractJsonDefinition) IsSet() bool { - return v.isSet -} - -func (v *NullableContractJsonDefinition) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContractJsonDefinition(val *ContractJsonDefinition) *NullableContractJsonDefinition { - return &NullableContractJsonDefinition{value: val, isSet: true} -} - -func (v NullableContractJsonDefinition) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContractJsonDefinition) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_contract_keychain_definition.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_contract_keychain_definition.go deleted file mode 100644 index 9500551e31..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_contract_keychain_definition.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the ContractKeychainDefinition type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ContractKeychainDefinition{} - -// ContractKeychainDefinition struct for ContractKeychainDefinition -type ContractKeychainDefinition struct { - // The contract name for retrieve the contracts json on the keychain. - ContractName string `json:"contractName"` - // The keychainId for retrieve the contracts json. - KeychainId string `json:"keychainId"` -} - -// NewContractKeychainDefinition instantiates a new ContractKeychainDefinition object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewContractKeychainDefinition(contractName string, keychainId string) *ContractKeychainDefinition { - this := ContractKeychainDefinition{} - this.ContractName = contractName - this.KeychainId = keychainId - return &this -} - -// NewContractKeychainDefinitionWithDefaults instantiates a new ContractKeychainDefinition object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewContractKeychainDefinitionWithDefaults() *ContractKeychainDefinition { - this := ContractKeychainDefinition{} - return &this -} - -// GetContractName returns the ContractName field value -func (o *ContractKeychainDefinition) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *ContractKeychainDefinition) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *ContractKeychainDefinition) SetContractName(v string) { - o.ContractName = v -} - -// GetKeychainId returns the KeychainId field value -func (o *ContractKeychainDefinition) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *ContractKeychainDefinition) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *ContractKeychainDefinition) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o ContractKeychainDefinition) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ContractKeychainDefinition) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractName"] = o.ContractName - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableContractKeychainDefinition struct { - value *ContractKeychainDefinition - isSet bool -} - -func (v NullableContractKeychainDefinition) Get() *ContractKeychainDefinition { - return v.value -} - -func (v *NullableContractKeychainDefinition) Set(val *ContractKeychainDefinition) { - v.value = val - v.isSet = true -} - -func (v NullableContractKeychainDefinition) IsSet() bool { - return v.isSet -} - -func (v *NullableContractKeychainDefinition) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContractKeychainDefinition(val *ContractKeychainDefinition) *NullableContractKeychainDefinition { - return &NullableContractKeychainDefinition{value: val, isSet: true} -} - -func (v NullableContractKeychainDefinition) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContractKeychainDefinition) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request.go deleted file mode 100644 index 36d0aa4333..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request.go +++ /dev/null @@ -1,254 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the DeployContractV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractV1Request{} - -// DeployContractV1Request struct for DeployContractV1Request -type DeployContractV1Request struct { - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - Contract DeployContractV1RequestContract `json:"contract"` - // The list of arguments to pass in to the constructor of the contract being deployed. - ConstructorArgs []interface{} `json:"constructorArgs,omitempty"` - GasConfig *GasTransactionConfig `json:"gasConfig,omitempty"` - // Ether balance to send on deployment. - Value *string `json:"value,omitempty"` -} - -// NewDeployContractV1Request instantiates a new DeployContractV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractV1Request(web3SigningCredential Web3SigningCredential, contract DeployContractV1RequestContract) *DeployContractV1Request { - this := DeployContractV1Request{} - this.Web3SigningCredential = web3SigningCredential - this.Contract = contract - return &this -} - -// NewDeployContractV1RequestWithDefaults instantiates a new DeployContractV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractV1RequestWithDefaults() *DeployContractV1Request { - this := DeployContractV1Request{} - return &this -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *DeployContractV1Request) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *DeployContractV1Request) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetContract returns the Contract field value -func (o *DeployContractV1Request) GetContract() DeployContractV1RequestContract { - if o == nil { - var ret DeployContractV1RequestContract - return ret - } - - return o.Contract -} - -// GetContractOk returns a tuple with the Contract field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetContractOk() (*DeployContractV1RequestContract, bool) { - if o == nil { - return nil, false - } - return &o.Contract, true -} - -// SetContract sets field value -func (o *DeployContractV1Request) SetContract(v DeployContractV1RequestContract) { - o.Contract = v -} - -// GetConstructorArgs returns the ConstructorArgs field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetConstructorArgs() []interface{} { - if o == nil || IsNil(o.ConstructorArgs) { - var ret []interface{} - return ret - } - return o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetConstructorArgsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.ConstructorArgs) { - return nil, false - } - return o.ConstructorArgs, true -} - -// HasConstructorArgs returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasConstructorArgs() bool { - if o != nil && !IsNil(o.ConstructorArgs) { - return true - } - - return false -} - -// SetConstructorArgs gets a reference to the given []interface{} and assigns it to the ConstructorArgs field. -func (o *DeployContractV1Request) SetConstructorArgs(v []interface{}) { - o.ConstructorArgs = v -} - -// GetGasConfig returns the GasConfig field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetGasConfig() GasTransactionConfig { - if o == nil || IsNil(o.GasConfig) { - var ret GasTransactionConfig - return ret - } - return *o.GasConfig -} - -// GetGasConfigOk returns a tuple with the GasConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetGasConfigOk() (*GasTransactionConfig, bool) { - if o == nil || IsNil(o.GasConfig) { - return nil, false - } - return o.GasConfig, true -} - -// HasGasConfig returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasGasConfig() bool { - if o != nil && !IsNil(o.GasConfig) { - return true - } - - return false -} - -// SetGasConfig gets a reference to the given GasTransactionConfig and assigns it to the GasConfig field. -func (o *DeployContractV1Request) SetGasConfig(v GasTransactionConfig) { - o.GasConfig = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetValue() string { - if o == nil || IsNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetValueOk() (*string, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *DeployContractV1Request) SetValue(v string) { - o.Value = &v -} - -func (o DeployContractV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["contract"] = o.Contract - if !IsNil(o.ConstructorArgs) { - toSerialize["constructorArgs"] = o.ConstructorArgs - } - if !IsNil(o.GasConfig) { - toSerialize["gasConfig"] = o.GasConfig - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableDeployContractV1Request struct { - value *DeployContractV1Request - isSet bool -} - -func (v NullableDeployContractV1Request) Get() *DeployContractV1Request { - return v.value -} - -func (v *NullableDeployContractV1Request) Set(val *DeployContractV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractV1Request(val *DeployContractV1Request) *NullableDeployContractV1Request { - return &NullableDeployContractV1Request{value: val, isSet: true} -} - -func (v NullableDeployContractV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request_contract.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request_contract.go deleted file mode 100644 index bcad0e3fba..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request_contract.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" - "fmt" -) - -// DeployContractV1RequestContract - struct for DeployContractV1RequestContract -type DeployContractV1RequestContract struct { - ContractJsonDefinition *ContractJsonDefinition - ContractKeychainDefinition *ContractKeychainDefinition -} - -// ContractJsonDefinitionAsDeployContractV1RequestContract is a convenience function that returns ContractJsonDefinition wrapped in DeployContractV1RequestContract -func ContractJsonDefinitionAsDeployContractV1RequestContract(v *ContractJsonDefinition) DeployContractV1RequestContract { - return DeployContractV1RequestContract{ - ContractJsonDefinition: v, - } -} - -// ContractKeychainDefinitionAsDeployContractV1RequestContract is a convenience function that returns ContractKeychainDefinition wrapped in DeployContractV1RequestContract -func ContractKeychainDefinitionAsDeployContractV1RequestContract(v *ContractKeychainDefinition) DeployContractV1RequestContract { - return DeployContractV1RequestContract{ - ContractKeychainDefinition: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *DeployContractV1RequestContract) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into ContractJsonDefinition - err = newStrictDecoder(data).Decode(&dst.ContractJsonDefinition) - if err == nil { - jsonContractJsonDefinition, _ := json.Marshal(dst.ContractJsonDefinition) - if string(jsonContractJsonDefinition) == "{}" { // empty struct - dst.ContractJsonDefinition = nil - } else { - match++ - } - } else { - dst.ContractJsonDefinition = nil - } - - // try to unmarshal data into ContractKeychainDefinition - err = newStrictDecoder(data).Decode(&dst.ContractKeychainDefinition) - if err == nil { - jsonContractKeychainDefinition, _ := json.Marshal(dst.ContractKeychainDefinition) - if string(jsonContractKeychainDefinition) == "{}" { // empty struct - dst.ContractKeychainDefinition = nil - } else { - match++ - } - } else { - dst.ContractKeychainDefinition = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ContractJsonDefinition = nil - dst.ContractKeychainDefinition = nil - - return fmt.Errorf("data matches more than one schema in oneOf(DeployContractV1RequestContract)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(DeployContractV1RequestContract)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src DeployContractV1RequestContract) MarshalJSON() ([]byte, error) { - if src.ContractJsonDefinition != nil { - return json.Marshal(&src.ContractJsonDefinition) - } - - if src.ContractKeychainDefinition != nil { - return json.Marshal(&src.ContractKeychainDefinition) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *DeployContractV1RequestContract) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.ContractJsonDefinition != nil { - return obj.ContractJsonDefinition - } - - if obj.ContractKeychainDefinition != nil { - return obj.ContractKeychainDefinition - } - - // all schemas are nil - return nil -} - -type NullableDeployContractV1RequestContract struct { - value *DeployContractV1RequestContract - isSet bool -} - -func (v NullableDeployContractV1RequestContract) Get() *DeployContractV1RequestContract { - return v.value -} - -func (v *NullableDeployContractV1RequestContract) Set(val *DeployContractV1RequestContract) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractV1RequestContract) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractV1RequestContract) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractV1RequestContract(val *DeployContractV1RequestContract) *NullableDeployContractV1RequestContract { - return &NullableDeployContractV1RequestContract{value: val, isSet: true} -} - -func (v NullableDeployContractV1RequestContract) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractV1RequestContract) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_deployed_contract_json_definition.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_deployed_contract_json_definition.go deleted file mode 100644 index 2c02e57866..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_deployed_contract_json_definition.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the DeployedContractJsonDefinition type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployedContractJsonDefinition{} - -// DeployedContractJsonDefinition struct for DeployedContractJsonDefinition -type DeployedContractJsonDefinition struct { - ContractJSON ContractJSON `json:"contractJSON"` - ContractAddress string `json:"contractAddress"` -} - -// NewDeployedContractJsonDefinition instantiates a new DeployedContractJsonDefinition object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployedContractJsonDefinition(contractJSON ContractJSON, contractAddress string) *DeployedContractJsonDefinition { - this := DeployedContractJsonDefinition{} - this.ContractJSON = contractJSON - this.ContractAddress = contractAddress - return &this -} - -// NewDeployedContractJsonDefinitionWithDefaults instantiates a new DeployedContractJsonDefinition object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployedContractJsonDefinitionWithDefaults() *DeployedContractJsonDefinition { - this := DeployedContractJsonDefinition{} - return &this -} - -// GetContractJSON returns the ContractJSON field value -func (o *DeployedContractJsonDefinition) GetContractJSON() ContractJSON { - if o == nil { - var ret ContractJSON - return ret - } - - return o.ContractJSON -} - -// GetContractJSONOk returns a tuple with the ContractJSON field value -// and a boolean to check if the value has been set. -func (o *DeployedContractJsonDefinition) GetContractJSONOk() (*ContractJSON, bool) { - if o == nil { - return nil, false - } - return &o.ContractJSON, true -} - -// SetContractJSON sets field value -func (o *DeployedContractJsonDefinition) SetContractJSON(v ContractJSON) { - o.ContractJSON = v -} - -// GetContractAddress returns the ContractAddress field value -func (o *DeployedContractJsonDefinition) GetContractAddress() string { - if o == nil { - var ret string - return ret - } - - return o.ContractAddress -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value -// and a boolean to check if the value has been set. -func (o *DeployedContractJsonDefinition) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractAddress, true -} - -// SetContractAddress sets field value -func (o *DeployedContractJsonDefinition) SetContractAddress(v string) { - o.ContractAddress = v -} - -func (o DeployedContractJsonDefinition) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployedContractJsonDefinition) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractJSON"] = o.ContractJSON - toSerialize["contractAddress"] = o.ContractAddress - return toSerialize, nil -} - -type NullableDeployedContractJsonDefinition struct { - value *DeployedContractJsonDefinition - isSet bool -} - -func (v NullableDeployedContractJsonDefinition) Get() *DeployedContractJsonDefinition { - return v.value -} - -func (v *NullableDeployedContractJsonDefinition) Set(val *DeployedContractJsonDefinition) { - v.value = val - v.isSet = true -} - -func (v NullableDeployedContractJsonDefinition) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployedContractJsonDefinition) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployedContractJsonDefinition(val *DeployedContractJsonDefinition) *NullableDeployedContractJsonDefinition { - return &NullableDeployedContractJsonDefinition{value: val, isSet: true} -} - -func (v NullableDeployedContractJsonDefinition) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployedContractJsonDefinition) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go deleted file mode 100644 index 0eb8c12243..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the ErrorExceptionResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorExceptionResponseV1{} - -// ErrorExceptionResponseV1 Error response from the connector. -type ErrorExceptionResponseV1 struct { - // Short error description message. - Message string `json:"message"` - // Detailed error information. - Error string `json:"error"` -} - -// NewErrorExceptionResponseV1 instantiates a new ErrorExceptionResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorExceptionResponseV1(message string, error_ string) *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - this.Message = message - this.Error = error_ - return &this -} - -// NewErrorExceptionResponseV1WithDefaults instantiates a new ErrorExceptionResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorExceptionResponseV1WithDefaults() *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - return &this -} - -// GetMessage returns the Message field value -func (o *ErrorExceptionResponseV1) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ErrorExceptionResponseV1) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -func (o *ErrorExceptionResponseV1) GetError() string { - if o == nil { - var ret string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ErrorExceptionResponseV1) SetError(v string) { - o.Error = v -} - -func (o ErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorExceptionResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error - return toSerialize, nil -} - -type NullableErrorExceptionResponseV1 struct { - value *ErrorExceptionResponseV1 - isSet bool -} - -func (v NullableErrorExceptionResponseV1) Get() *ErrorExceptionResponseV1 { - return v.value -} - -func (v *NullableErrorExceptionResponseV1) Set(val *ErrorExceptionResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableErrorExceptionResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorExceptionResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorExceptionResponseV1(val *ErrorExceptionResponseV1) *NullableErrorExceptionResponseV1 { - return &NullableErrorExceptionResponseV1{value: val, isSet: true} -} - -func (v NullableErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorExceptionResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_type.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_type.go deleted file mode 100644 index 0656e89d13..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_type.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" - "fmt" -) - -// EthContractInvocationType the model 'EthContractInvocationType' -type EthContractInvocationType string - -// List of EthContractInvocationType -const ( - SEND EthContractInvocationType = "SEND" - CALL EthContractInvocationType = "CALL" -) - -// All allowed values of EthContractInvocationType enum -var AllowedEthContractInvocationTypeEnumValues = []EthContractInvocationType{ - "SEND", - "CALL", -} - -func (v *EthContractInvocationType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := EthContractInvocationType(value) - for _, existing := range AllowedEthContractInvocationTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid EthContractInvocationType", value) -} - -// NewEthContractInvocationTypeFromValue returns a pointer to a valid EthContractInvocationType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewEthContractInvocationTypeFromValue(v string) (*EthContractInvocationType, error) { - ev := EthContractInvocationType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for EthContractInvocationType: valid values are %v", v, AllowedEthContractInvocationTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v EthContractInvocationType) IsValid() bool { - for _, existing := range AllowedEthContractInvocationTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to EthContractInvocationType value -func (v EthContractInvocationType) Ptr() *EthContractInvocationType { - return &v -} - -type NullableEthContractInvocationType struct { - value *EthContractInvocationType - isSet bool -} - -func (v NullableEthContractInvocationType) Get() *EthContractInvocationType { - return v.value -} - -func (v *NullableEthContractInvocationType) Set(val *EthContractInvocationType) { - v.value = val - v.isSet = true -} - -func (v NullableEthContractInvocationType) IsSet() bool { - return v.isSet -} - -func (v *NullableEthContractInvocationType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEthContractInvocationType(val *EthContractInvocationType) *NullableEthContractInvocationType { - return &NullableEthContractInvocationType{value: val, isSet: true} -} - -func (v NullableEthContractInvocationType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEthContractInvocationType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_web3_method.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_web3_method.go deleted file mode 100644 index e2c87b632a..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_web3_method.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" - "fmt" -) - -// EthContractInvocationWeb3Method the model 'EthContractInvocationWeb3Method' -type EthContractInvocationWeb3Method string - -// List of EthContractInvocationWeb3Method -const ( - SEND EthContractInvocationWeb3Method = "send" - CALL EthContractInvocationWeb3Method = "call" - ENCODE_ABI EthContractInvocationWeb3Method = "encodeABI" - ESTIMATE_GAS EthContractInvocationWeb3Method = "estimateGas" -) - -// All allowed values of EthContractInvocationWeb3Method enum -var AllowedEthContractInvocationWeb3MethodEnumValues = []EthContractInvocationWeb3Method{ - "send", - "call", - "encodeABI", - "estimateGas", -} - -func (v *EthContractInvocationWeb3Method) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := EthContractInvocationWeb3Method(value) - for _, existing := range AllowedEthContractInvocationWeb3MethodEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid EthContractInvocationWeb3Method", value) -} - -// NewEthContractInvocationWeb3MethodFromValue returns a pointer to a valid EthContractInvocationWeb3Method -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewEthContractInvocationWeb3MethodFromValue(v string) (*EthContractInvocationWeb3Method, error) { - ev := EthContractInvocationWeb3Method(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for EthContractInvocationWeb3Method: valid values are %v", v, AllowedEthContractInvocationWeb3MethodEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v EthContractInvocationWeb3Method) IsValid() bool { - for _, existing := range AllowedEthContractInvocationWeb3MethodEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to EthContractInvocationWeb3Method value -func (v EthContractInvocationWeb3Method) Ptr() *EthContractInvocationWeb3Method { - return &v -} - -type NullableEthContractInvocationWeb3Method struct { - value *EthContractInvocationWeb3Method - isSet bool -} - -func (v NullableEthContractInvocationWeb3Method) Get() *EthContractInvocationWeb3Method { - return v.value -} - -func (v *NullableEthContractInvocationWeb3Method) Set(val *EthContractInvocationWeb3Method) { - v.value = val - v.isSet = true -} - -func (v NullableEthContractInvocationWeb3Method) IsSet() bool { - return v.isSet -} - -func (v *NullableEthContractInvocationWeb3Method) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEthContractInvocationWeb3Method(val *EthContractInvocationWeb3Method) *NullableEthContractInvocationWeb3Method { - return &NullableEthContractInvocationWeb3Method{value: val, isSet: true} -} - -func (v NullableEthContractInvocationWeb3Method) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEthContractInvocationWeb3Method) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_ethereum_transaction_config.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_ethereum_transaction_config.go deleted file mode 100644 index f486c18162..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_ethereum_transaction_config.go +++ /dev/null @@ -1,342 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the EthereumTransactionConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EthereumTransactionConfig{} - -// EthereumTransactionConfig struct for EthereumTransactionConfig -type EthereumTransactionConfig struct { - RawTransaction *string `json:"rawTransaction,omitempty"` - From *string `json:"from,omitempty"` - To *string `json:"to,omitempty"` - Value *string `json:"value,omitempty"` - Nonce *string `json:"nonce,omitempty"` - Data *string `json:"data,omitempty"` - GasConfig *GasTransactionConfig `json:"gasConfig,omitempty"` -} - -// NewEthereumTransactionConfig instantiates a new EthereumTransactionConfig object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewEthereumTransactionConfig() *EthereumTransactionConfig { - this := EthereumTransactionConfig{} - return &this -} - -// NewEthereumTransactionConfigWithDefaults instantiates a new EthereumTransactionConfig object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewEthereumTransactionConfigWithDefaults() *EthereumTransactionConfig { - this := EthereumTransactionConfig{} - return &this -} - -// GetRawTransaction returns the RawTransaction field value if set, zero value otherwise. -func (o *EthereumTransactionConfig) GetRawTransaction() string { - if o == nil || IsNil(o.RawTransaction) { - var ret string - return ret - } - return *o.RawTransaction -} - -// GetRawTransactionOk returns a tuple with the RawTransaction field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EthereumTransactionConfig) GetRawTransactionOk() (*string, bool) { - if o == nil || IsNil(o.RawTransaction) { - return nil, false - } - return o.RawTransaction, true -} - -// HasRawTransaction returns a boolean if a field has been set. -func (o *EthereumTransactionConfig) HasRawTransaction() bool { - if o != nil && !IsNil(o.RawTransaction) { - return true - } - - return false -} - -// SetRawTransaction gets a reference to the given string and assigns it to the RawTransaction field. -func (o *EthereumTransactionConfig) SetRawTransaction(v string) { - o.RawTransaction = &v -} - -// GetFrom returns the From field value if set, zero value otherwise. -func (o *EthereumTransactionConfig) GetFrom() string { - if o == nil || IsNil(o.From) { - var ret string - return ret - } - return *o.From -} - -// GetFromOk returns a tuple with the From field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EthereumTransactionConfig) GetFromOk() (*string, bool) { - if o == nil || IsNil(o.From) { - return nil, false - } - return o.From, true -} - -// HasFrom returns a boolean if a field has been set. -func (o *EthereumTransactionConfig) HasFrom() bool { - if o != nil && !IsNil(o.From) { - return true - } - - return false -} - -// SetFrom gets a reference to the given string and assigns it to the From field. -func (o *EthereumTransactionConfig) SetFrom(v string) { - o.From = &v -} - -// GetTo returns the To field value if set, zero value otherwise. -func (o *EthereumTransactionConfig) GetTo() string { - if o == nil || IsNil(o.To) { - var ret string - return ret - } - return *o.To -} - -// GetToOk returns a tuple with the To field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EthereumTransactionConfig) GetToOk() (*string, bool) { - if o == nil || IsNil(o.To) { - return nil, false - } - return o.To, true -} - -// HasTo returns a boolean if a field has been set. -func (o *EthereumTransactionConfig) HasTo() bool { - if o != nil && !IsNil(o.To) { - return true - } - - return false -} - -// SetTo gets a reference to the given string and assigns it to the To field. -func (o *EthereumTransactionConfig) SetTo(v string) { - o.To = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *EthereumTransactionConfig) GetValue() string { - if o == nil || IsNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EthereumTransactionConfig) GetValueOk() (*string, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *EthereumTransactionConfig) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *EthereumTransactionConfig) SetValue(v string) { - o.Value = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *EthereumTransactionConfig) GetNonce() string { - if o == nil || IsNil(o.Nonce) { - var ret string - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EthereumTransactionConfig) GetNonceOk() (*string, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *EthereumTransactionConfig) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given string and assigns it to the Nonce field. -func (o *EthereumTransactionConfig) SetNonce(v string) { - o.Nonce = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *EthereumTransactionConfig) GetData() string { - if o == nil || IsNil(o.Data) { - var ret string - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EthereumTransactionConfig) GetDataOk() (*string, bool) { - if o == nil || IsNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *EthereumTransactionConfig) HasData() bool { - if o != nil && !IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given string and assigns it to the Data field. -func (o *EthereumTransactionConfig) SetData(v string) { - o.Data = &v -} - -// GetGasConfig returns the GasConfig field value if set, zero value otherwise. -func (o *EthereumTransactionConfig) GetGasConfig() GasTransactionConfig { - if o == nil || IsNil(o.GasConfig) { - var ret GasTransactionConfig - return ret - } - return *o.GasConfig -} - -// GetGasConfigOk returns a tuple with the GasConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EthereumTransactionConfig) GetGasConfigOk() (*GasTransactionConfig, bool) { - if o == nil || IsNil(o.GasConfig) { - return nil, false - } - return o.GasConfig, true -} - -// HasGasConfig returns a boolean if a field has been set. -func (o *EthereumTransactionConfig) HasGasConfig() bool { - if o != nil && !IsNil(o.GasConfig) { - return true - } - - return false -} - -// SetGasConfig gets a reference to the given GasTransactionConfig and assigns it to the GasConfig field. -func (o *EthereumTransactionConfig) SetGasConfig(v GasTransactionConfig) { - o.GasConfig = &v -} - -func (o EthereumTransactionConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EthereumTransactionConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.RawTransaction) { - toSerialize["rawTransaction"] = o.RawTransaction - } - if !IsNil(o.From) { - toSerialize["from"] = o.From - } - if !IsNil(o.To) { - toSerialize["to"] = o.To - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - if !IsNil(o.Data) { - toSerialize["data"] = o.Data - } - if !IsNil(o.GasConfig) { - toSerialize["gasConfig"] = o.GasConfig - } - return toSerialize, nil -} - -type NullableEthereumTransactionConfig struct { - value *EthereumTransactionConfig - isSet bool -} - -func (v NullableEthereumTransactionConfig) Get() *EthereumTransactionConfig { - return v.value -} - -func (v *NullableEthereumTransactionConfig) Set(val *EthereumTransactionConfig) { - v.value = val - v.isSet = true -} - -func (v NullableEthereumTransactionConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableEthereumTransactionConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEthereumTransactionConfig(val *EthereumTransactionConfig) *NullableEthereumTransactionConfig { - return &NullableEthereumTransactionConfig{value: val, isSet: true} -} - -func (v NullableEthereumTransactionConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEthereumTransactionConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_gas_transaction_config.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_gas_transaction_config.go deleted file mode 100644 index c552497ee9..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_gas_transaction_config.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" - "fmt" -) - -// GasTransactionConfig - Transaction gas settings. -type GasTransactionConfig struct { - GasTransactionConfigEIP1559 *GasTransactionConfigEIP1559 - GasTransactionConfigLegacy *GasTransactionConfigLegacy -} - -// GasTransactionConfigEIP1559AsGasTransactionConfig is a convenience function that returns GasTransactionConfigEIP1559 wrapped in GasTransactionConfig -func GasTransactionConfigEIP1559AsGasTransactionConfig(v *GasTransactionConfigEIP1559) GasTransactionConfig { - return GasTransactionConfig{ - GasTransactionConfigEIP1559: v, - } -} - -// GasTransactionConfigLegacyAsGasTransactionConfig is a convenience function that returns GasTransactionConfigLegacy wrapped in GasTransactionConfig -func GasTransactionConfigLegacyAsGasTransactionConfig(v *GasTransactionConfigLegacy) GasTransactionConfig { - return GasTransactionConfig{ - GasTransactionConfigLegacy: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *GasTransactionConfig) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into GasTransactionConfigEIP1559 - err = newStrictDecoder(data).Decode(&dst.GasTransactionConfigEIP1559) - if err == nil { - jsonGasTransactionConfigEIP1559, _ := json.Marshal(dst.GasTransactionConfigEIP1559) - if string(jsonGasTransactionConfigEIP1559) == "{}" { // empty struct - dst.GasTransactionConfigEIP1559 = nil - } else { - match++ - } - } else { - dst.GasTransactionConfigEIP1559 = nil - } - - // try to unmarshal data into GasTransactionConfigLegacy - err = newStrictDecoder(data).Decode(&dst.GasTransactionConfigLegacy) - if err == nil { - jsonGasTransactionConfigLegacy, _ := json.Marshal(dst.GasTransactionConfigLegacy) - if string(jsonGasTransactionConfigLegacy) == "{}" { // empty struct - dst.GasTransactionConfigLegacy = nil - } else { - match++ - } - } else { - dst.GasTransactionConfigLegacy = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.GasTransactionConfigEIP1559 = nil - dst.GasTransactionConfigLegacy = nil - - return fmt.Errorf("data matches more than one schema in oneOf(GasTransactionConfig)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(GasTransactionConfig)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src GasTransactionConfig) MarshalJSON() ([]byte, error) { - if src.GasTransactionConfigEIP1559 != nil { - return json.Marshal(&src.GasTransactionConfigEIP1559) - } - - if src.GasTransactionConfigLegacy != nil { - return json.Marshal(&src.GasTransactionConfigLegacy) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *GasTransactionConfig) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.GasTransactionConfigEIP1559 != nil { - return obj.GasTransactionConfigEIP1559 - } - - if obj.GasTransactionConfigLegacy != nil { - return obj.GasTransactionConfigLegacy - } - - // all schemas are nil - return nil -} - -type NullableGasTransactionConfig struct { - value *GasTransactionConfig - isSet bool -} - -func (v NullableGasTransactionConfig) Get() *GasTransactionConfig { - return v.value -} - -func (v *NullableGasTransactionConfig) Set(val *GasTransactionConfig) { - v.value = val - v.isSet = true -} - -func (v NullableGasTransactionConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableGasTransactionConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGasTransactionConfig(val *GasTransactionConfig) *NullableGasTransactionConfig { - return &NullableGasTransactionConfig{value: val, isSet: true} -} - -func (v NullableGasTransactionConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGasTransactionConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_gas_transaction_config_eip1559.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_gas_transaction_config_eip1559.go deleted file mode 100644 index 688c0e1c50..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_gas_transaction_config_eip1559.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the GasTransactionConfigEIP1559 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GasTransactionConfigEIP1559{} - -// GasTransactionConfigEIP1559 Transaction gas settings in networks after EIP-1559 (London fork). -type GasTransactionConfigEIP1559 struct { - // A maximum amount of gas a user is willing to provide for the execution of the transaction. - GasLimit *string `json:"gasLimit,omitempty"` - // A maximum fee (including the base fee and the tip) a user is willing to pay per unit of gas. - MaxFeePerGas *string `json:"maxFeePerGas,omitempty"` - // A maximum tip amount a user is willing to pay per unit of gas. - MaxPriorityFeePerGas *string `json:"maxPriorityFeePerGas,omitempty"` -} - -// NewGasTransactionConfigEIP1559 instantiates a new GasTransactionConfigEIP1559 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGasTransactionConfigEIP1559() *GasTransactionConfigEIP1559 { - this := GasTransactionConfigEIP1559{} - return &this -} - -// NewGasTransactionConfigEIP1559WithDefaults instantiates a new GasTransactionConfigEIP1559 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGasTransactionConfigEIP1559WithDefaults() *GasTransactionConfigEIP1559 { - this := GasTransactionConfigEIP1559{} - return &this -} - -// GetGasLimit returns the GasLimit field value if set, zero value otherwise. -func (o *GasTransactionConfigEIP1559) GetGasLimit() string { - if o == nil || IsNil(o.GasLimit) { - var ret string - return ret - } - return *o.GasLimit -} - -// GetGasLimitOk returns a tuple with the GasLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasTransactionConfigEIP1559) GetGasLimitOk() (*string, bool) { - if o == nil || IsNil(o.GasLimit) { - return nil, false - } - return o.GasLimit, true -} - -// HasGasLimit returns a boolean if a field has been set. -func (o *GasTransactionConfigEIP1559) HasGasLimit() bool { - if o != nil && !IsNil(o.GasLimit) { - return true - } - - return false -} - -// SetGasLimit gets a reference to the given string and assigns it to the GasLimit field. -func (o *GasTransactionConfigEIP1559) SetGasLimit(v string) { - o.GasLimit = &v -} - -// GetMaxFeePerGas returns the MaxFeePerGas field value if set, zero value otherwise. -func (o *GasTransactionConfigEIP1559) GetMaxFeePerGas() string { - if o == nil || IsNil(o.MaxFeePerGas) { - var ret string - return ret - } - return *o.MaxFeePerGas -} - -// GetMaxFeePerGasOk returns a tuple with the MaxFeePerGas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasTransactionConfigEIP1559) GetMaxFeePerGasOk() (*string, bool) { - if o == nil || IsNil(o.MaxFeePerGas) { - return nil, false - } - return o.MaxFeePerGas, true -} - -// HasMaxFeePerGas returns a boolean if a field has been set. -func (o *GasTransactionConfigEIP1559) HasMaxFeePerGas() bool { - if o != nil && !IsNil(o.MaxFeePerGas) { - return true - } - - return false -} - -// SetMaxFeePerGas gets a reference to the given string and assigns it to the MaxFeePerGas field. -func (o *GasTransactionConfigEIP1559) SetMaxFeePerGas(v string) { - o.MaxFeePerGas = &v -} - -// GetMaxPriorityFeePerGas returns the MaxPriorityFeePerGas field value if set, zero value otherwise. -func (o *GasTransactionConfigEIP1559) GetMaxPriorityFeePerGas() string { - if o == nil || IsNil(o.MaxPriorityFeePerGas) { - var ret string - return ret - } - return *o.MaxPriorityFeePerGas -} - -// GetMaxPriorityFeePerGasOk returns a tuple with the MaxPriorityFeePerGas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasTransactionConfigEIP1559) GetMaxPriorityFeePerGasOk() (*string, bool) { - if o == nil || IsNil(o.MaxPriorityFeePerGas) { - return nil, false - } - return o.MaxPriorityFeePerGas, true -} - -// HasMaxPriorityFeePerGas returns a boolean if a field has been set. -func (o *GasTransactionConfigEIP1559) HasMaxPriorityFeePerGas() bool { - if o != nil && !IsNil(o.MaxPriorityFeePerGas) { - return true - } - - return false -} - -// SetMaxPriorityFeePerGas gets a reference to the given string and assigns it to the MaxPriorityFeePerGas field. -func (o *GasTransactionConfigEIP1559) SetMaxPriorityFeePerGas(v string) { - o.MaxPriorityFeePerGas = &v -} - -func (o GasTransactionConfigEIP1559) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GasTransactionConfigEIP1559) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.GasLimit) { - toSerialize["gasLimit"] = o.GasLimit - } - if !IsNil(o.MaxFeePerGas) { - toSerialize["maxFeePerGas"] = o.MaxFeePerGas - } - if !IsNil(o.MaxPriorityFeePerGas) { - toSerialize["maxPriorityFeePerGas"] = o.MaxPriorityFeePerGas - } - return toSerialize, nil -} - -type NullableGasTransactionConfigEIP1559 struct { - value *GasTransactionConfigEIP1559 - isSet bool -} - -func (v NullableGasTransactionConfigEIP1559) Get() *GasTransactionConfigEIP1559 { - return v.value -} - -func (v *NullableGasTransactionConfigEIP1559) Set(val *GasTransactionConfigEIP1559) { - v.value = val - v.isSet = true -} - -func (v NullableGasTransactionConfigEIP1559) IsSet() bool { - return v.isSet -} - -func (v *NullableGasTransactionConfigEIP1559) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGasTransactionConfigEIP1559(val *GasTransactionConfigEIP1559) *NullableGasTransactionConfigEIP1559 { - return &NullableGasTransactionConfigEIP1559{value: val, isSet: true} -} - -func (v NullableGasTransactionConfigEIP1559) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGasTransactionConfigEIP1559) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_gas_transaction_config_legacy.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_gas_transaction_config_legacy.go deleted file mode 100644 index db8f0f74b1..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_gas_transaction_config_legacy.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the GasTransactionConfigLegacy type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GasTransactionConfigLegacy{} - -// GasTransactionConfigLegacy Transaction gas settings in networks before EIP-1559 (London fork). -type GasTransactionConfigLegacy struct { - // A maximum amount of gas a user is willing to provide for the execution of the transaction. (gasLimit) - Gas *string `json:"gas,omitempty"` - // A price (in Wei) a user is willing to pay for each unit of gas used during the execution of the transaction. In EIP-1559 (London fork) networks, it will be set as both maxFeePerGas and maxPriorityFeePerGas. - GasPrice *string `json:"gasPrice,omitempty"` -} - -// NewGasTransactionConfigLegacy instantiates a new GasTransactionConfigLegacy object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGasTransactionConfigLegacy() *GasTransactionConfigLegacy { - this := GasTransactionConfigLegacy{} - return &this -} - -// NewGasTransactionConfigLegacyWithDefaults instantiates a new GasTransactionConfigLegacy object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGasTransactionConfigLegacyWithDefaults() *GasTransactionConfigLegacy { - this := GasTransactionConfigLegacy{} - return &this -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *GasTransactionConfigLegacy) GetGas() string { - if o == nil || IsNil(o.Gas) { - var ret string - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasTransactionConfigLegacy) GetGasOk() (*string, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *GasTransactionConfigLegacy) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given string and assigns it to the Gas field. -func (o *GasTransactionConfigLegacy) SetGas(v string) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *GasTransactionConfigLegacy) GetGasPrice() string { - if o == nil || IsNil(o.GasPrice) { - var ret string - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasTransactionConfigLegacy) GetGasPriceOk() (*string, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *GasTransactionConfigLegacy) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given string and assigns it to the GasPrice field. -func (o *GasTransactionConfigLegacy) SetGasPrice(v string) { - o.GasPrice = &v -} - -func (o GasTransactionConfigLegacy) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GasTransactionConfigLegacy) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - return toSerialize, nil -} - -type NullableGasTransactionConfigLegacy struct { - value *GasTransactionConfigLegacy - isSet bool -} - -func (v NullableGasTransactionConfigLegacy) Get() *GasTransactionConfigLegacy { - return v.value -} - -func (v *NullableGasTransactionConfigLegacy) Set(val *GasTransactionConfigLegacy) { - v.value = val - v.isSet = true -} - -func (v NullableGasTransactionConfigLegacy) IsSet() bool { - return v.isSet -} - -func (v *NullableGasTransactionConfigLegacy) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGasTransactionConfigLegacy(val *GasTransactionConfigLegacy) *NullableGasTransactionConfigLegacy { - return &NullableGasTransactionConfigLegacy{value: val, isSet: true} -} - -func (v NullableGasTransactionConfigLegacy) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGasTransactionConfigLegacy) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go deleted file mode 100644 index 04e988d601..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go +++ /dev/null @@ -1,349 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the InvokeContractV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractV1Request{} - -// InvokeContractV1Request struct for InvokeContractV1Request -type InvokeContractV1Request struct { - Contract InvokeContractV1RequestContract `json:"contract"` - // The name of the contract method to invoke. - MethodName string `json:"methodName"` - // The list of arguments to pass in to the contract method being invoked. - Params []interface{} `json:"params"` - InvocationType EthContractInvocationType `json:"invocationType"` - Web3SigningCredential *Web3SigningCredential `json:"web3SigningCredential,omitempty"` - GasConfig *GasTransactionConfig `json:"gasConfig,omitempty"` - Value *string `json:"value,omitempty"` - // The amount of milliseconds to wait for a transaction receipt before returning an error. Only has any effect if the invocation type is SEND - TimeoutMs *float32 `json:"timeoutMs,omitempty"` -} - -// NewInvokeContractV1Request instantiates a new InvokeContractV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractV1Request(contract InvokeContractV1RequestContract, methodName string, params []interface{}, invocationType EthContractInvocationType) *InvokeContractV1Request { - this := InvokeContractV1Request{} - this.Contract = contract - this.MethodName = methodName - this.Params = params - this.InvocationType = invocationType - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// NewInvokeContractV1RequestWithDefaults instantiates a new InvokeContractV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractV1RequestWithDefaults() *InvokeContractV1Request { - this := InvokeContractV1Request{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetContract returns the Contract field value -func (o *InvokeContractV1Request) GetContract() InvokeContractV1RequestContract { - if o == nil { - var ret InvokeContractV1RequestContract - return ret - } - - return o.Contract -} - -// GetContractOk returns a tuple with the Contract field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetContractOk() (*InvokeContractV1RequestContract, bool) { - if o == nil { - return nil, false - } - return &o.Contract, true -} - -// SetContract sets field value -func (o *InvokeContractV1Request) SetContract(v InvokeContractV1RequestContract) { - o.Contract = v -} - -// GetMethodName returns the MethodName field value -func (o *InvokeContractV1Request) GetMethodName() string { - if o == nil { - var ret string - return ret - } - - return o.MethodName -} - -// GetMethodNameOk returns a tuple with the MethodName field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetMethodNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MethodName, true -} - -// SetMethodName sets field value -func (o *InvokeContractV1Request) SetMethodName(v string) { - o.MethodName = v -} - -// GetParams returns the Params field value -func (o *InvokeContractV1Request) GetParams() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetParamsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Params, true -} - -// SetParams sets field value -func (o *InvokeContractV1Request) SetParams(v []interface{}) { - o.Params = v -} - -// GetInvocationType returns the InvocationType field value -func (o *InvokeContractV1Request) GetInvocationType() EthContractInvocationType { - if o == nil { - var ret EthContractInvocationType - return ret - } - - return o.InvocationType -} - -// GetInvocationTypeOk returns a tuple with the InvocationType field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetInvocationTypeOk() (*EthContractInvocationType, bool) { - if o == nil { - return nil, false - } - return &o.InvocationType, true -} - -// SetInvocationType sets field value -func (o *InvokeContractV1Request) SetInvocationType(v EthContractInvocationType) { - o.InvocationType = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil || IsNil(o.Web3SigningCredential) { - var ret Web3SigningCredential - return ret - } - return *o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil || IsNil(o.Web3SigningCredential) { - return nil, false - } - return o.Web3SigningCredential, true -} - -// HasWeb3SigningCredential returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasWeb3SigningCredential() bool { - if o != nil && !IsNil(o.Web3SigningCredential) { - return true - } - - return false -} - -// SetWeb3SigningCredential gets a reference to the given Web3SigningCredential and assigns it to the Web3SigningCredential field. -func (o *InvokeContractV1Request) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = &v -} - -// GetGasConfig returns the GasConfig field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetGasConfig() GasTransactionConfig { - if o == nil || IsNil(o.GasConfig) { - var ret GasTransactionConfig - return ret - } - return *o.GasConfig -} - -// GetGasConfigOk returns a tuple with the GasConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetGasConfigOk() (*GasTransactionConfig, bool) { - if o == nil || IsNil(o.GasConfig) { - return nil, false - } - return o.GasConfig, true -} - -// HasGasConfig returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasGasConfig() bool { - if o != nil && !IsNil(o.GasConfig) { - return true - } - - return false -} - -// SetGasConfig gets a reference to the given GasTransactionConfig and assigns it to the GasConfig field. -func (o *InvokeContractV1Request) SetGasConfig(v GasTransactionConfig) { - o.GasConfig = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetValue() string { - if o == nil || IsNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetValueOk() (*string, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *InvokeContractV1Request) SetValue(v string) { - o.Value = &v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *InvokeContractV1Request) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -func (o InvokeContractV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contract"] = o.Contract - toSerialize["methodName"] = o.MethodName - toSerialize["params"] = o.Params - toSerialize["invocationType"] = o.InvocationType - if !IsNil(o.Web3SigningCredential) { - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - } - if !IsNil(o.GasConfig) { - toSerialize["gasConfig"] = o.GasConfig - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - return toSerialize, nil -} - -type NullableInvokeContractV1Request struct { - value *InvokeContractV1Request - isSet bool -} - -func (v NullableInvokeContractV1Request) Get() *InvokeContractV1Request { - return v.value -} - -func (v *NullableInvokeContractV1Request) Set(val *InvokeContractV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1Request(val *InvokeContractV1Request) *NullableInvokeContractV1Request { - return &NullableInvokeContractV1Request{value: val, isSet: true} -} - -func (v NullableInvokeContractV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request_contract.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request_contract.go deleted file mode 100644 index 4567300205..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request_contract.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" - "fmt" -) - -// InvokeContractV1RequestContract - struct for InvokeContractV1RequestContract -type InvokeContractV1RequestContract struct { - ContractKeychainDefinition *ContractKeychainDefinition - DeployedContractJsonDefinition *DeployedContractJsonDefinition -} - -// ContractKeychainDefinitionAsInvokeContractV1RequestContract is a convenience function that returns ContractKeychainDefinition wrapped in InvokeContractV1RequestContract -func ContractKeychainDefinitionAsInvokeContractV1RequestContract(v *ContractKeychainDefinition) InvokeContractV1RequestContract { - return InvokeContractV1RequestContract{ - ContractKeychainDefinition: v, - } -} - -// DeployedContractJsonDefinitionAsInvokeContractV1RequestContract is a convenience function that returns DeployedContractJsonDefinition wrapped in InvokeContractV1RequestContract -func DeployedContractJsonDefinitionAsInvokeContractV1RequestContract(v *DeployedContractJsonDefinition) InvokeContractV1RequestContract { - return InvokeContractV1RequestContract{ - DeployedContractJsonDefinition: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *InvokeContractV1RequestContract) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into ContractKeychainDefinition - err = newStrictDecoder(data).Decode(&dst.ContractKeychainDefinition) - if err == nil { - jsonContractKeychainDefinition, _ := json.Marshal(dst.ContractKeychainDefinition) - if string(jsonContractKeychainDefinition) == "{}" { // empty struct - dst.ContractKeychainDefinition = nil - } else { - match++ - } - } else { - dst.ContractKeychainDefinition = nil - } - - // try to unmarshal data into DeployedContractJsonDefinition - err = newStrictDecoder(data).Decode(&dst.DeployedContractJsonDefinition) - if err == nil { - jsonDeployedContractJsonDefinition, _ := json.Marshal(dst.DeployedContractJsonDefinition) - if string(jsonDeployedContractJsonDefinition) == "{}" { // empty struct - dst.DeployedContractJsonDefinition = nil - } else { - match++ - } - } else { - dst.DeployedContractJsonDefinition = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ContractKeychainDefinition = nil - dst.DeployedContractJsonDefinition = nil - - return fmt.Errorf("data matches more than one schema in oneOf(InvokeContractV1RequestContract)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(InvokeContractV1RequestContract)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src InvokeContractV1RequestContract) MarshalJSON() ([]byte, error) { - if src.ContractKeychainDefinition != nil { - return json.Marshal(&src.ContractKeychainDefinition) - } - - if src.DeployedContractJsonDefinition != nil { - return json.Marshal(&src.DeployedContractJsonDefinition) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *InvokeContractV1RequestContract) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.ContractKeychainDefinition != nil { - return obj.ContractKeychainDefinition - } - - if obj.DeployedContractJsonDefinition != nil { - return obj.DeployedContractJsonDefinition - } - - // all schemas are nil - return nil -} - -type NullableInvokeContractV1RequestContract struct { - value *InvokeContractV1RequestContract - isSet bool -} - -func (v NullableInvokeContractV1RequestContract) Get() *InvokeContractV1RequestContract { - return v.value -} - -func (v *NullableInvokeContractV1RequestContract) Set(val *InvokeContractV1RequestContract) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1RequestContract) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1RequestContract) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1RequestContract(val *InvokeContractV1RequestContract) *NullableInvokeContractV1RequestContract { - return &NullableInvokeContractV1RequestContract{value: val, isSet: true} -} - -func (v NullableInvokeContractV1RequestContract) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1RequestContract) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go deleted file mode 100644 index 7bdeeb8b7a..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the InvokeContractV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractV1Response{} - -// InvokeContractV1Response struct for InvokeContractV1Response -type InvokeContractV1Response struct { - TransactionReceipt *Web3TransactionReceipt `json:"transactionReceipt,omitempty"` - CallOutput interface{} `json:"callOutput,omitempty"` - Success bool `json:"success"` -} - -// NewInvokeContractV1Response instantiates a new InvokeContractV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractV1Response(success bool) *InvokeContractV1Response { - this := InvokeContractV1Response{} - this.Success = success - return &this -} - -// NewInvokeContractV1ResponseWithDefaults instantiates a new InvokeContractV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractV1ResponseWithDefaults() *InvokeContractV1Response { - this := InvokeContractV1Response{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value if set, zero value otherwise. -func (o *InvokeContractV1Response) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil || IsNil(o.TransactionReceipt) { - var ret Web3TransactionReceipt - return ret - } - return *o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil || IsNil(o.TransactionReceipt) { - return nil, false - } - return o.TransactionReceipt, true -} - -// HasTransactionReceipt returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasTransactionReceipt() bool { - if o != nil && !IsNil(o.TransactionReceipt) { - return true - } - - return false -} - -// SetTransactionReceipt gets a reference to the given Web3TransactionReceipt and assigns it to the TransactionReceipt field. -func (o *InvokeContractV1Response) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = &v -} - -// GetCallOutput returns the CallOutput field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvokeContractV1Response) GetCallOutput() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CallOutput -} - -// GetCallOutputOk returns a tuple with the CallOutput field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvokeContractV1Response) GetCallOutputOk() (*interface{}, bool) { - if o == nil || IsNil(o.CallOutput) { - return nil, false - } - return &o.CallOutput, true -} - -// HasCallOutput returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasCallOutput() bool { - if o != nil && IsNil(o.CallOutput) { - return true - } - - return false -} - -// SetCallOutput gets a reference to the given interface{} and assigns it to the CallOutput field. -func (o *InvokeContractV1Response) SetCallOutput(v interface{}) { - o.CallOutput = v -} - -// GetSuccess returns the Success field value -func (o *InvokeContractV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *InvokeContractV1Response) SetSuccess(v bool) { - o.Success = v -} - -func (o InvokeContractV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.TransactionReceipt) { - toSerialize["transactionReceipt"] = o.TransactionReceipt - } - if o.CallOutput != nil { - toSerialize["callOutput"] = o.CallOutput - } - toSerialize["success"] = o.Success - return toSerialize, nil -} - -type NullableInvokeContractV1Response struct { - value *InvokeContractV1Response - isSet bool -} - -func (v NullableInvokeContractV1Response) Get() *InvokeContractV1Response { - return v.value -} - -func (v *NullableInvokeContractV1Response) Set(val *InvokeContractV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1Response(val *InvokeContractV1Response) *NullableInvokeContractV1Response { - return &NullableInvokeContractV1Response{value: val, isSet: true} -} - -func (v NullableInvokeContractV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_contract_v1_request.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_contract_v1_request.go deleted file mode 100644 index e491e14883..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_contract_v1_request.go +++ /dev/null @@ -1,279 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the InvokeRawWeb3EthContractV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeRawWeb3EthContractV1Request{} - -// InvokeRawWeb3EthContractV1Request struct for InvokeRawWeb3EthContractV1Request -type InvokeRawWeb3EthContractV1Request struct { - // The application binary interface of the solidity contract - Abi interface{} `json:"abi"` - // Deployed solidity contract address - Address string `json:"address"` - InvocationType EthContractInvocationWeb3Method `json:"invocationType"` - // The list of arguments for contract invocation method (send, call, etc...) - InvocationParams map[string]interface{} `json:"invocationParams,omitempty"` - // Method of deployed solidity contract to execute - ContractMethod string `json:"contractMethod"` - // The list of arguments for deployed solidity contract method - ContractMethodArgs []interface{} `json:"contractMethodArgs,omitempty"` -} - -// NewInvokeRawWeb3EthContractV1Request instantiates a new InvokeRawWeb3EthContractV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeRawWeb3EthContractV1Request(abi interface{}, address string, invocationType EthContractInvocationWeb3Method, contractMethod string) *InvokeRawWeb3EthContractV1Request { - this := InvokeRawWeb3EthContractV1Request{} - this.Abi = abi - this.Address = address - this.InvocationType = invocationType - this.ContractMethod = contractMethod - return &this -} - -// NewInvokeRawWeb3EthContractV1RequestWithDefaults instantiates a new InvokeRawWeb3EthContractV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeRawWeb3EthContractV1RequestWithDefaults() *InvokeRawWeb3EthContractV1Request { - this := InvokeRawWeb3EthContractV1Request{} - return &this -} - -// GetAbi returns the Abi field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *InvokeRawWeb3EthContractV1Request) GetAbi() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.Abi -} - -// GetAbiOk returns a tuple with the Abi field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvokeRawWeb3EthContractV1Request) GetAbiOk() (*interface{}, bool) { - if o == nil || IsNil(o.Abi) { - return nil, false - } - return &o.Abi, true -} - -// SetAbi sets field value -func (o *InvokeRawWeb3EthContractV1Request) SetAbi(v interface{}) { - o.Abi = v -} - -// GetAddress returns the Address field value -func (o *InvokeRawWeb3EthContractV1Request) GetAddress() string { - if o == nil { - var ret string - return ret - } - - return o.Address -} - -// GetAddressOk returns a tuple with the Address field value -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthContractV1Request) GetAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Address, true -} - -// SetAddress sets field value -func (o *InvokeRawWeb3EthContractV1Request) SetAddress(v string) { - o.Address = v -} - -// GetInvocationType returns the InvocationType field value -func (o *InvokeRawWeb3EthContractV1Request) GetInvocationType() EthContractInvocationWeb3Method { - if o == nil { - var ret EthContractInvocationWeb3Method - return ret - } - - return o.InvocationType -} - -// GetInvocationTypeOk returns a tuple with the InvocationType field value -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthContractV1Request) GetInvocationTypeOk() (*EthContractInvocationWeb3Method, bool) { - if o == nil { - return nil, false - } - return &o.InvocationType, true -} - -// SetInvocationType sets field value -func (o *InvokeRawWeb3EthContractV1Request) SetInvocationType(v EthContractInvocationWeb3Method) { - o.InvocationType = v -} - -// GetInvocationParams returns the InvocationParams field value if set, zero value otherwise. -func (o *InvokeRawWeb3EthContractV1Request) GetInvocationParams() map[string]interface{} { - if o == nil || IsNil(o.InvocationParams) { - var ret map[string]interface{} - return ret - } - return o.InvocationParams -} - -// GetInvocationParamsOk returns a tuple with the InvocationParams field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthContractV1Request) GetInvocationParamsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.InvocationParams) { - return map[string]interface{}{}, false - } - return o.InvocationParams, true -} - -// HasInvocationParams returns a boolean if a field has been set. -func (o *InvokeRawWeb3EthContractV1Request) HasInvocationParams() bool { - if o != nil && !IsNil(o.InvocationParams) { - return true - } - - return false -} - -// SetInvocationParams gets a reference to the given map[string]interface{} and assigns it to the InvocationParams field. -func (o *InvokeRawWeb3EthContractV1Request) SetInvocationParams(v map[string]interface{}) { - o.InvocationParams = v -} - -// GetContractMethod returns the ContractMethod field value -func (o *InvokeRawWeb3EthContractV1Request) GetContractMethod() string { - if o == nil { - var ret string - return ret - } - - return o.ContractMethod -} - -// GetContractMethodOk returns a tuple with the ContractMethod field value -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthContractV1Request) GetContractMethodOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractMethod, true -} - -// SetContractMethod sets field value -func (o *InvokeRawWeb3EthContractV1Request) SetContractMethod(v string) { - o.ContractMethod = v -} - -// GetContractMethodArgs returns the ContractMethodArgs field value if set, zero value otherwise. -func (o *InvokeRawWeb3EthContractV1Request) GetContractMethodArgs() []interface{} { - if o == nil || IsNil(o.ContractMethodArgs) { - var ret []interface{} - return ret - } - return o.ContractMethodArgs -} - -// GetContractMethodArgsOk returns a tuple with the ContractMethodArgs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthContractV1Request) GetContractMethodArgsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.ContractMethodArgs) { - return nil, false - } - return o.ContractMethodArgs, true -} - -// HasContractMethodArgs returns a boolean if a field has been set. -func (o *InvokeRawWeb3EthContractV1Request) HasContractMethodArgs() bool { - if o != nil && !IsNil(o.ContractMethodArgs) { - return true - } - - return false -} - -// SetContractMethodArgs gets a reference to the given []interface{} and assigns it to the ContractMethodArgs field. -func (o *InvokeRawWeb3EthContractV1Request) SetContractMethodArgs(v []interface{}) { - o.ContractMethodArgs = v -} - -func (o InvokeRawWeb3EthContractV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeRawWeb3EthContractV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Abi != nil { - toSerialize["abi"] = o.Abi - } - toSerialize["address"] = o.Address - toSerialize["invocationType"] = o.InvocationType - if !IsNil(o.InvocationParams) { - toSerialize["invocationParams"] = o.InvocationParams - } - toSerialize["contractMethod"] = o.ContractMethod - if !IsNil(o.ContractMethodArgs) { - toSerialize["contractMethodArgs"] = o.ContractMethodArgs - } - return toSerialize, nil -} - -type NullableInvokeRawWeb3EthContractV1Request struct { - value *InvokeRawWeb3EthContractV1Request - isSet bool -} - -func (v NullableInvokeRawWeb3EthContractV1Request) Get() *InvokeRawWeb3EthContractV1Request { - return v.value -} - -func (v *NullableInvokeRawWeb3EthContractV1Request) Set(val *InvokeRawWeb3EthContractV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeRawWeb3EthContractV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeRawWeb3EthContractV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeRawWeb3EthContractV1Request(val *InvokeRawWeb3EthContractV1Request) *NullableInvokeRawWeb3EthContractV1Request { - return &NullableInvokeRawWeb3EthContractV1Request{value: val, isSet: true} -} - -func (v NullableInvokeRawWeb3EthContractV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeRawWeb3EthContractV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_contract_v1_response.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_contract_v1_response.go deleted file mode 100644 index 210460657b..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_contract_v1_response.go +++ /dev/null @@ -1,193 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the InvokeRawWeb3EthContractV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeRawWeb3EthContractV1Response{} - -// InvokeRawWeb3EthContractV1Response struct for InvokeRawWeb3EthContractV1Response -type InvokeRawWeb3EthContractV1Response struct { - // Status code of the operation - Status float32 `json:"status"` - // Output of contract invocation method - Data interface{} `json:"data,omitempty"` - // Error details - ErrorDetail *string `json:"errorDetail,omitempty"` -} - -// NewInvokeRawWeb3EthContractV1Response instantiates a new InvokeRawWeb3EthContractV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeRawWeb3EthContractV1Response(status float32) *InvokeRawWeb3EthContractV1Response { - this := InvokeRawWeb3EthContractV1Response{} - this.Status = status - return &this -} - -// NewInvokeRawWeb3EthContractV1ResponseWithDefaults instantiates a new InvokeRawWeb3EthContractV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeRawWeb3EthContractV1ResponseWithDefaults() *InvokeRawWeb3EthContractV1Response { - this := InvokeRawWeb3EthContractV1Response{} - return &this -} - -// GetStatus returns the Status field value -func (o *InvokeRawWeb3EthContractV1Response) GetStatus() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthContractV1Response) GetStatusOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *InvokeRawWeb3EthContractV1Response) SetStatus(v float32) { - o.Status = v -} - -// GetData returns the Data field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvokeRawWeb3EthContractV1Response) GetData() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvokeRawWeb3EthContractV1Response) GetDataOk() (*interface{}, bool) { - if o == nil || IsNil(o.Data) { - return nil, false - } - return &o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *InvokeRawWeb3EthContractV1Response) HasData() bool { - if o != nil && IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given interface{} and assigns it to the Data field. -func (o *InvokeRawWeb3EthContractV1Response) SetData(v interface{}) { - o.Data = v -} - -// GetErrorDetail returns the ErrorDetail field value if set, zero value otherwise. -func (o *InvokeRawWeb3EthContractV1Response) GetErrorDetail() string { - if o == nil || IsNil(o.ErrorDetail) { - var ret string - return ret - } - return *o.ErrorDetail -} - -// GetErrorDetailOk returns a tuple with the ErrorDetail field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthContractV1Response) GetErrorDetailOk() (*string, bool) { - if o == nil || IsNil(o.ErrorDetail) { - return nil, false - } - return o.ErrorDetail, true -} - -// HasErrorDetail returns a boolean if a field has been set. -func (o *InvokeRawWeb3EthContractV1Response) HasErrorDetail() bool { - if o != nil && !IsNil(o.ErrorDetail) { - return true - } - - return false -} - -// SetErrorDetail gets a reference to the given string and assigns it to the ErrorDetail field. -func (o *InvokeRawWeb3EthContractV1Response) SetErrorDetail(v string) { - o.ErrorDetail = &v -} - -func (o InvokeRawWeb3EthContractV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeRawWeb3EthContractV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["status"] = o.Status - if o.Data != nil { - toSerialize["data"] = o.Data - } - if !IsNil(o.ErrorDetail) { - toSerialize["errorDetail"] = o.ErrorDetail - } - return toSerialize, nil -} - -type NullableInvokeRawWeb3EthContractV1Response struct { - value *InvokeRawWeb3EthContractV1Response - isSet bool -} - -func (v NullableInvokeRawWeb3EthContractV1Response) Get() *InvokeRawWeb3EthContractV1Response { - return v.value -} - -func (v *NullableInvokeRawWeb3EthContractV1Response) Set(val *InvokeRawWeb3EthContractV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeRawWeb3EthContractV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeRawWeb3EthContractV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeRawWeb3EthContractV1Response(val *InvokeRawWeb3EthContractV1Response) *NullableInvokeRawWeb3EthContractV1Response { - return &NullableInvokeRawWeb3EthContractV1Response{value: val, isSet: true} -} - -func (v NullableInvokeRawWeb3EthContractV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeRawWeb3EthContractV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_method_v1_request.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_method_v1_request.go deleted file mode 100644 index f93a6b035b..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_method_v1_request.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the InvokeRawWeb3EthMethodV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeRawWeb3EthMethodV1Request{} - -// InvokeRawWeb3EthMethodV1Request struct for InvokeRawWeb3EthMethodV1Request -type InvokeRawWeb3EthMethodV1Request struct { - // The name of the web3.eth method to invoke - MethodName string `json:"methodName"` - // The list of arguments to pass to web3.eth method specified in methodName - Params []interface{} `json:"params,omitempty"` -} - -// NewInvokeRawWeb3EthMethodV1Request instantiates a new InvokeRawWeb3EthMethodV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeRawWeb3EthMethodV1Request(methodName string) *InvokeRawWeb3EthMethodV1Request { - this := InvokeRawWeb3EthMethodV1Request{} - this.MethodName = methodName - return &this -} - -// NewInvokeRawWeb3EthMethodV1RequestWithDefaults instantiates a new InvokeRawWeb3EthMethodV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeRawWeb3EthMethodV1RequestWithDefaults() *InvokeRawWeb3EthMethodV1Request { - this := InvokeRawWeb3EthMethodV1Request{} - return &this -} - -// GetMethodName returns the MethodName field value -func (o *InvokeRawWeb3EthMethodV1Request) GetMethodName() string { - if o == nil { - var ret string - return ret - } - - return o.MethodName -} - -// GetMethodNameOk returns a tuple with the MethodName field value -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthMethodV1Request) GetMethodNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MethodName, true -} - -// SetMethodName sets field value -func (o *InvokeRawWeb3EthMethodV1Request) SetMethodName(v string) { - o.MethodName = v -} - -// GetParams returns the Params field value if set, zero value otherwise. -func (o *InvokeRawWeb3EthMethodV1Request) GetParams() []interface{} { - if o == nil || IsNil(o.Params) { - var ret []interface{} - return ret - } - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthMethodV1Request) GetParamsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.Params) { - return nil, false - } - return o.Params, true -} - -// HasParams returns a boolean if a field has been set. -func (o *InvokeRawWeb3EthMethodV1Request) HasParams() bool { - if o != nil && !IsNil(o.Params) { - return true - } - - return false -} - -// SetParams gets a reference to the given []interface{} and assigns it to the Params field. -func (o *InvokeRawWeb3EthMethodV1Request) SetParams(v []interface{}) { - o.Params = v -} - -func (o InvokeRawWeb3EthMethodV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeRawWeb3EthMethodV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["methodName"] = o.MethodName - if !IsNil(o.Params) { - toSerialize["params"] = o.Params - } - return toSerialize, nil -} - -type NullableInvokeRawWeb3EthMethodV1Request struct { - value *InvokeRawWeb3EthMethodV1Request - isSet bool -} - -func (v NullableInvokeRawWeb3EthMethodV1Request) Get() *InvokeRawWeb3EthMethodV1Request { - return v.value -} - -func (v *NullableInvokeRawWeb3EthMethodV1Request) Set(val *InvokeRawWeb3EthMethodV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeRawWeb3EthMethodV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeRawWeb3EthMethodV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeRawWeb3EthMethodV1Request(val *InvokeRawWeb3EthMethodV1Request) *NullableInvokeRawWeb3EthMethodV1Request { - return &NullableInvokeRawWeb3EthMethodV1Request{value: val, isSet: true} -} - -func (v NullableInvokeRawWeb3EthMethodV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeRawWeb3EthMethodV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_method_v1_response.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_method_v1_response.go deleted file mode 100644 index 1761d270cf..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_invoke_raw_web3_eth_method_v1_response.go +++ /dev/null @@ -1,193 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the InvokeRawWeb3EthMethodV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeRawWeb3EthMethodV1Response{} - -// InvokeRawWeb3EthMethodV1Response struct for InvokeRawWeb3EthMethodV1Response -type InvokeRawWeb3EthMethodV1Response struct { - // Status code of the operation - Status float32 `json:"status"` - // Output of requested web3.eth method - Data interface{} `json:"data,omitempty"` - // Error details - ErrorDetail *string `json:"errorDetail,omitempty"` -} - -// NewInvokeRawWeb3EthMethodV1Response instantiates a new InvokeRawWeb3EthMethodV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeRawWeb3EthMethodV1Response(status float32) *InvokeRawWeb3EthMethodV1Response { - this := InvokeRawWeb3EthMethodV1Response{} - this.Status = status - return &this -} - -// NewInvokeRawWeb3EthMethodV1ResponseWithDefaults instantiates a new InvokeRawWeb3EthMethodV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeRawWeb3EthMethodV1ResponseWithDefaults() *InvokeRawWeb3EthMethodV1Response { - this := InvokeRawWeb3EthMethodV1Response{} - return &this -} - -// GetStatus returns the Status field value -func (o *InvokeRawWeb3EthMethodV1Response) GetStatus() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthMethodV1Response) GetStatusOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *InvokeRawWeb3EthMethodV1Response) SetStatus(v float32) { - o.Status = v -} - -// GetData returns the Data field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvokeRawWeb3EthMethodV1Response) GetData() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvokeRawWeb3EthMethodV1Response) GetDataOk() (*interface{}, bool) { - if o == nil || IsNil(o.Data) { - return nil, false - } - return &o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *InvokeRawWeb3EthMethodV1Response) HasData() bool { - if o != nil && IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given interface{} and assigns it to the Data field. -func (o *InvokeRawWeb3EthMethodV1Response) SetData(v interface{}) { - o.Data = v -} - -// GetErrorDetail returns the ErrorDetail field value if set, zero value otherwise. -func (o *InvokeRawWeb3EthMethodV1Response) GetErrorDetail() string { - if o == nil || IsNil(o.ErrorDetail) { - var ret string - return ret - } - return *o.ErrorDetail -} - -// GetErrorDetailOk returns a tuple with the ErrorDetail field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeRawWeb3EthMethodV1Response) GetErrorDetailOk() (*string, bool) { - if o == nil || IsNil(o.ErrorDetail) { - return nil, false - } - return o.ErrorDetail, true -} - -// HasErrorDetail returns a boolean if a field has been set. -func (o *InvokeRawWeb3EthMethodV1Response) HasErrorDetail() bool { - if o != nil && !IsNil(o.ErrorDetail) { - return true - } - - return false -} - -// SetErrorDetail gets a reference to the given string and assigns it to the ErrorDetail field. -func (o *InvokeRawWeb3EthMethodV1Response) SetErrorDetail(v string) { - o.ErrorDetail = &v -} - -func (o InvokeRawWeb3EthMethodV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeRawWeb3EthMethodV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["status"] = o.Status - if o.Data != nil { - toSerialize["data"] = o.Data - } - if !IsNil(o.ErrorDetail) { - toSerialize["errorDetail"] = o.ErrorDetail - } - return toSerialize, nil -} - -type NullableInvokeRawWeb3EthMethodV1Response struct { - value *InvokeRawWeb3EthMethodV1Response - isSet bool -} - -func (v NullableInvokeRawWeb3EthMethodV1Response) Get() *InvokeRawWeb3EthMethodV1Response { - return v.value -} - -func (v *NullableInvokeRawWeb3EthMethodV1Response) Set(val *InvokeRawWeb3EthMethodV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeRawWeb3EthMethodV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeRawWeb3EthMethodV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeRawWeb3EthMethodV1Response(val *InvokeRawWeb3EthMethodV1Response) *NullableInvokeRawWeb3EthMethodV1Response { - return &NullableInvokeRawWeb3EthMethodV1Response{value: val, isSet: true} -} - -func (v NullableInvokeRawWeb3EthMethodV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeRawWeb3EthMethodV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_run_transaction_request.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_run_transaction_request.go deleted file mode 100644 index 817a36aa93..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_run_transaction_request.go +++ /dev/null @@ -1,185 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the RunTransactionRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionRequest{} - -// RunTransactionRequest struct for RunTransactionRequest -type RunTransactionRequest struct { - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - TransactionConfig EthereumTransactionConfig `json:"transactionConfig"` - // The amount of milliseconds to wait for a transaction receipt with thehash of the transaction(which indicates successful execution) beforegiving up and crashing. - TimeoutMs *float32 `json:"timeoutMs,omitempty"` -} - -// NewRunTransactionRequest instantiates a new RunTransactionRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionRequest(web3SigningCredential Web3SigningCredential, transactionConfig EthereumTransactionConfig) *RunTransactionRequest { - this := RunTransactionRequest{} - this.Web3SigningCredential = web3SigningCredential - this.TransactionConfig = transactionConfig - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// NewRunTransactionRequestWithDefaults instantiates a new RunTransactionRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionRequestWithDefaults() *RunTransactionRequest { - this := RunTransactionRequest{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *RunTransactionRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *RunTransactionRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetTransactionConfig returns the TransactionConfig field value -func (o *RunTransactionRequest) GetTransactionConfig() EthereumTransactionConfig { - if o == nil { - var ret EthereumTransactionConfig - return ret - } - - return o.TransactionConfig -} - -// GetTransactionConfigOk returns a tuple with the TransactionConfig field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetTransactionConfigOk() (*EthereumTransactionConfig, bool) { - if o == nil { - return nil, false - } - return &o.TransactionConfig, true -} - -// SetTransactionConfig sets field value -func (o *RunTransactionRequest) SetTransactionConfig(v EthereumTransactionConfig) { - o.TransactionConfig = v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *RunTransactionRequest) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *RunTransactionRequest) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *RunTransactionRequest) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -func (o RunTransactionRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["transactionConfig"] = o.TransactionConfig - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - return toSerialize, nil -} - -type NullableRunTransactionRequest struct { - value *RunTransactionRequest - isSet bool -} - -func (v NullableRunTransactionRequest) Get() *RunTransactionRequest { - return v.value -} - -func (v *NullableRunTransactionRequest) Set(val *RunTransactionRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionRequest(val *RunTransactionRequest) *NullableRunTransactionRequest { - return &NullableRunTransactionRequest{value: val, isSet: true} -} - -func (v NullableRunTransactionRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_run_transaction_response.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_run_transaction_response.go deleted file mode 100644 index 20139e59c9..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_run_transaction_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the RunTransactionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionResponse{} - -// RunTransactionResponse struct for RunTransactionResponse -type RunTransactionResponse struct { - TransactionReceipt Web3TransactionReceipt `json:"transactionReceipt"` -} - -// NewRunTransactionResponse instantiates a new RunTransactionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionResponse(transactionReceipt Web3TransactionReceipt) *RunTransactionResponse { - this := RunTransactionResponse{} - this.TransactionReceipt = transactionReceipt - return &this -} - -// NewRunTransactionResponseWithDefaults instantiates a new RunTransactionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionResponseWithDefaults() *RunTransactionResponse { - this := RunTransactionResponse{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value -func (o *RunTransactionResponse) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil { - var ret Web3TransactionReceipt - return ret - } - - return o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value -// and a boolean to check if the value has been set. -func (o *RunTransactionResponse) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil { - return nil, false - } - return &o.TransactionReceipt, true -} - -// SetTransactionReceipt sets field value -func (o *RunTransactionResponse) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = v -} - -func (o RunTransactionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["transactionReceipt"] = o.TransactionReceipt - return toSerialize, nil -} - -type NullableRunTransactionResponse struct { - value *RunTransactionResponse - isSet bool -} - -func (v NullableRunTransactionResponse) Get() *RunTransactionResponse { - return v.value -} - -func (v *NullableRunTransactionResponse) Set(val *RunTransactionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionResponse(val *RunTransactionResponse) *NullableRunTransactionResponse { - return &NullableRunTransactionResponse{value: val, isSet: true} -} - -func (v NullableRunTransactionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go deleted file mode 100644 index 6f5c051d7b..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksV1 the model 'WatchBlocksV1' -type WatchBlocksV1 string - -// List of WatchBlocksV1 -const ( - Subscribe WatchBlocksV1 = "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Subscribe" - Next WatchBlocksV1 = "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Next" - Unsubscribe WatchBlocksV1 = "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Unsubscribe" - Error WatchBlocksV1 = "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Error" - Complete WatchBlocksV1 = "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Complete" -) - -// All allowed values of WatchBlocksV1 enum -var AllowedWatchBlocksV1EnumValues = []WatchBlocksV1{ - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Subscribe", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Next", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Error", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Complete", -} - -func (v *WatchBlocksV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := WatchBlocksV1(value) - for _, existing := range AllowedWatchBlocksV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WatchBlocksV1", value) -} - -// NewWatchBlocksV1FromValue returns a pointer to a valid WatchBlocksV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWatchBlocksV1FromValue(v string) (*WatchBlocksV1, error) { - ev := WatchBlocksV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WatchBlocksV1: valid values are %v", v, AllowedWatchBlocksV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v WatchBlocksV1) IsValid() bool { - for _, existing := range AllowedWatchBlocksV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WatchBlocksV1 value -func (v WatchBlocksV1) Ptr() *WatchBlocksV1 { - return &v -} - -type NullableWatchBlocksV1 struct { - value *WatchBlocksV1 - isSet bool -} - -func (v NullableWatchBlocksV1) Get() *WatchBlocksV1 { - return v.value -} - -func (v *NullableWatchBlocksV1) Set(val *WatchBlocksV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1(val *WatchBlocksV1) *NullableWatchBlocksV1 { - return &NullableWatchBlocksV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_block_data.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_block_data.go deleted file mode 100644 index 85cb4965cd..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_block_data.go +++ /dev/null @@ -1,720 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the WatchBlocksV1BlockData type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksV1BlockData{} - -// WatchBlocksV1BlockData struct for WatchBlocksV1BlockData -type WatchBlocksV1BlockData struct { - Number string `json:"number"` - Hash *string `json:"hash,omitempty"` - ParentHash string `json:"parentHash"` - Nonce string `json:"nonce"` - Sha3Uncles string `json:"sha3Uncles"` - LogsBloom *string `json:"logsBloom,omitempty"` - TransactionsRoot *string `json:"transactionsRoot,omitempty"` - StateRoot string `json:"stateRoot"` - ReceiptsRoot *string `json:"receiptsRoot,omitempty"` - Difficulty *string `json:"difficulty,omitempty"` - MixHash *string `json:"mixHash,omitempty"` - Miner string `json:"miner"` - ExtraData string `json:"extraData"` - GasLimit string `json:"gasLimit"` - GasUsed string `json:"gasUsed"` - Timestamp WatchBlocksV1BlockDataTimestamp `json:"timestamp"` - Size string `json:"size"` - TotalDifficulty string `json:"totalDifficulty"` - Uncles []string `json:"uncles"` - BaseFeePerGas *string `json:"baseFeePerGas,omitempty"` - Transactions []Web3Transaction `json:"transactions"` -} - -// NewWatchBlocksV1BlockData instantiates a new WatchBlocksV1BlockData object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksV1BlockData(number string, parentHash string, nonce string, sha3Uncles string, stateRoot string, miner string, extraData string, gasLimit string, gasUsed string, timestamp WatchBlocksV1BlockDataTimestamp, size string, totalDifficulty string, uncles []string, transactions []Web3Transaction) *WatchBlocksV1BlockData { - this := WatchBlocksV1BlockData{} - this.Number = number - this.ParentHash = parentHash - this.Nonce = nonce - this.Sha3Uncles = sha3Uncles - this.StateRoot = stateRoot - this.Miner = miner - this.ExtraData = extraData - this.GasLimit = gasLimit - this.GasUsed = gasUsed - this.Timestamp = timestamp - this.Size = size - this.TotalDifficulty = totalDifficulty - this.Uncles = uncles - this.Transactions = transactions - return &this -} - -// NewWatchBlocksV1BlockDataWithDefaults instantiates a new WatchBlocksV1BlockData object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksV1BlockDataWithDefaults() *WatchBlocksV1BlockData { - this := WatchBlocksV1BlockData{} - return &this -} - -// GetNumber returns the Number field value -func (o *WatchBlocksV1BlockData) GetNumber() string { - if o == nil { - var ret string - return ret - } - - return o.Number -} - -// GetNumberOk returns a tuple with the Number field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetNumberOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Number, true -} - -// SetNumber sets field value -func (o *WatchBlocksV1BlockData) SetNumber(v string) { - o.Number = v -} - -// GetHash returns the Hash field value if set, zero value otherwise. -func (o *WatchBlocksV1BlockData) GetHash() string { - if o == nil || IsNil(o.Hash) { - var ret string - return ret - } - return *o.Hash -} - -// GetHashOk returns a tuple with the Hash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetHashOk() (*string, bool) { - if o == nil || IsNil(o.Hash) { - return nil, false - } - return o.Hash, true -} - -// HasHash returns a boolean if a field has been set. -func (o *WatchBlocksV1BlockData) HasHash() bool { - if o != nil && !IsNil(o.Hash) { - return true - } - - return false -} - -// SetHash gets a reference to the given string and assigns it to the Hash field. -func (o *WatchBlocksV1BlockData) SetHash(v string) { - o.Hash = &v -} - -// GetParentHash returns the ParentHash field value -func (o *WatchBlocksV1BlockData) GetParentHash() string { - if o == nil { - var ret string - return ret - } - - return o.ParentHash -} - -// GetParentHashOk returns a tuple with the ParentHash field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetParentHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ParentHash, true -} - -// SetParentHash sets field value -func (o *WatchBlocksV1BlockData) SetParentHash(v string) { - o.ParentHash = v -} - -// GetNonce returns the Nonce field value -func (o *WatchBlocksV1BlockData) GetNonce() string { - if o == nil { - var ret string - return ret - } - - return o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetNonceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Nonce, true -} - -// SetNonce sets field value -func (o *WatchBlocksV1BlockData) SetNonce(v string) { - o.Nonce = v -} - -// GetSha3Uncles returns the Sha3Uncles field value -func (o *WatchBlocksV1BlockData) GetSha3Uncles() string { - if o == nil { - var ret string - return ret - } - - return o.Sha3Uncles -} - -// GetSha3UnclesOk returns a tuple with the Sha3Uncles field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetSha3UnclesOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Sha3Uncles, true -} - -// SetSha3Uncles sets field value -func (o *WatchBlocksV1BlockData) SetSha3Uncles(v string) { - o.Sha3Uncles = v -} - -// GetLogsBloom returns the LogsBloom field value if set, zero value otherwise. -func (o *WatchBlocksV1BlockData) GetLogsBloom() string { - if o == nil || IsNil(o.LogsBloom) { - var ret string - return ret - } - return *o.LogsBloom -} - -// GetLogsBloomOk returns a tuple with the LogsBloom field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetLogsBloomOk() (*string, bool) { - if o == nil || IsNil(o.LogsBloom) { - return nil, false - } - return o.LogsBloom, true -} - -// HasLogsBloom returns a boolean if a field has been set. -func (o *WatchBlocksV1BlockData) HasLogsBloom() bool { - if o != nil && !IsNil(o.LogsBloom) { - return true - } - - return false -} - -// SetLogsBloom gets a reference to the given string and assigns it to the LogsBloom field. -func (o *WatchBlocksV1BlockData) SetLogsBloom(v string) { - o.LogsBloom = &v -} - -// GetTransactionsRoot returns the TransactionsRoot field value if set, zero value otherwise. -func (o *WatchBlocksV1BlockData) GetTransactionsRoot() string { - if o == nil || IsNil(o.TransactionsRoot) { - var ret string - return ret - } - return *o.TransactionsRoot -} - -// GetTransactionsRootOk returns a tuple with the TransactionsRoot field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetTransactionsRootOk() (*string, bool) { - if o == nil || IsNil(o.TransactionsRoot) { - return nil, false - } - return o.TransactionsRoot, true -} - -// HasTransactionsRoot returns a boolean if a field has been set. -func (o *WatchBlocksV1BlockData) HasTransactionsRoot() bool { - if o != nil && !IsNil(o.TransactionsRoot) { - return true - } - - return false -} - -// SetTransactionsRoot gets a reference to the given string and assigns it to the TransactionsRoot field. -func (o *WatchBlocksV1BlockData) SetTransactionsRoot(v string) { - o.TransactionsRoot = &v -} - -// GetStateRoot returns the StateRoot field value -func (o *WatchBlocksV1BlockData) GetStateRoot() string { - if o == nil { - var ret string - return ret - } - - return o.StateRoot -} - -// GetStateRootOk returns a tuple with the StateRoot field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetStateRootOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StateRoot, true -} - -// SetStateRoot sets field value -func (o *WatchBlocksV1BlockData) SetStateRoot(v string) { - o.StateRoot = v -} - -// GetReceiptsRoot returns the ReceiptsRoot field value if set, zero value otherwise. -func (o *WatchBlocksV1BlockData) GetReceiptsRoot() string { - if o == nil || IsNil(o.ReceiptsRoot) { - var ret string - return ret - } - return *o.ReceiptsRoot -} - -// GetReceiptsRootOk returns a tuple with the ReceiptsRoot field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetReceiptsRootOk() (*string, bool) { - if o == nil || IsNil(o.ReceiptsRoot) { - return nil, false - } - return o.ReceiptsRoot, true -} - -// HasReceiptsRoot returns a boolean if a field has been set. -func (o *WatchBlocksV1BlockData) HasReceiptsRoot() bool { - if o != nil && !IsNil(o.ReceiptsRoot) { - return true - } - - return false -} - -// SetReceiptsRoot gets a reference to the given string and assigns it to the ReceiptsRoot field. -func (o *WatchBlocksV1BlockData) SetReceiptsRoot(v string) { - o.ReceiptsRoot = &v -} - -// GetDifficulty returns the Difficulty field value if set, zero value otherwise. -func (o *WatchBlocksV1BlockData) GetDifficulty() string { - if o == nil || IsNil(o.Difficulty) { - var ret string - return ret - } - return *o.Difficulty -} - -// GetDifficultyOk returns a tuple with the Difficulty field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetDifficultyOk() (*string, bool) { - if o == nil || IsNil(o.Difficulty) { - return nil, false - } - return o.Difficulty, true -} - -// HasDifficulty returns a boolean if a field has been set. -func (o *WatchBlocksV1BlockData) HasDifficulty() bool { - if o != nil && !IsNil(o.Difficulty) { - return true - } - - return false -} - -// SetDifficulty gets a reference to the given string and assigns it to the Difficulty field. -func (o *WatchBlocksV1BlockData) SetDifficulty(v string) { - o.Difficulty = &v -} - -// GetMixHash returns the MixHash field value if set, zero value otherwise. -func (o *WatchBlocksV1BlockData) GetMixHash() string { - if o == nil || IsNil(o.MixHash) { - var ret string - return ret - } - return *o.MixHash -} - -// GetMixHashOk returns a tuple with the MixHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetMixHashOk() (*string, bool) { - if o == nil || IsNil(o.MixHash) { - return nil, false - } - return o.MixHash, true -} - -// HasMixHash returns a boolean if a field has been set. -func (o *WatchBlocksV1BlockData) HasMixHash() bool { - if o != nil && !IsNil(o.MixHash) { - return true - } - - return false -} - -// SetMixHash gets a reference to the given string and assigns it to the MixHash field. -func (o *WatchBlocksV1BlockData) SetMixHash(v string) { - o.MixHash = &v -} - -// GetMiner returns the Miner field value -func (o *WatchBlocksV1BlockData) GetMiner() string { - if o == nil { - var ret string - return ret - } - - return o.Miner -} - -// GetMinerOk returns a tuple with the Miner field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetMinerOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Miner, true -} - -// SetMiner sets field value -func (o *WatchBlocksV1BlockData) SetMiner(v string) { - o.Miner = v -} - -// GetExtraData returns the ExtraData field value -func (o *WatchBlocksV1BlockData) GetExtraData() string { - if o == nil { - var ret string - return ret - } - - return o.ExtraData -} - -// GetExtraDataOk returns a tuple with the ExtraData field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetExtraDataOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ExtraData, true -} - -// SetExtraData sets field value -func (o *WatchBlocksV1BlockData) SetExtraData(v string) { - o.ExtraData = v -} - -// GetGasLimit returns the GasLimit field value -func (o *WatchBlocksV1BlockData) GetGasLimit() string { - if o == nil { - var ret string - return ret - } - - return o.GasLimit -} - -// GetGasLimitOk returns a tuple with the GasLimit field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetGasLimitOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GasLimit, true -} - -// SetGasLimit sets field value -func (o *WatchBlocksV1BlockData) SetGasLimit(v string) { - o.GasLimit = v -} - -// GetGasUsed returns the GasUsed field value -func (o *WatchBlocksV1BlockData) GetGasUsed() string { - if o == nil { - var ret string - return ret - } - - return o.GasUsed -} - -// GetGasUsedOk returns a tuple with the GasUsed field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetGasUsedOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GasUsed, true -} - -// SetGasUsed sets field value -func (o *WatchBlocksV1BlockData) SetGasUsed(v string) { - o.GasUsed = v -} - -// GetTimestamp returns the Timestamp field value -func (o *WatchBlocksV1BlockData) GetTimestamp() WatchBlocksV1BlockDataTimestamp { - if o == nil { - var ret WatchBlocksV1BlockDataTimestamp - return ret - } - - return o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetTimestampOk() (*WatchBlocksV1BlockDataTimestamp, bool) { - if o == nil { - return nil, false - } - return &o.Timestamp, true -} - -// SetTimestamp sets field value -func (o *WatchBlocksV1BlockData) SetTimestamp(v WatchBlocksV1BlockDataTimestamp) { - o.Timestamp = v -} - -// GetSize returns the Size field value -func (o *WatchBlocksV1BlockData) GetSize() string { - if o == nil { - var ret string - return ret - } - - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetSizeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Size, true -} - -// SetSize sets field value -func (o *WatchBlocksV1BlockData) SetSize(v string) { - o.Size = v -} - -// GetTotalDifficulty returns the TotalDifficulty field value -func (o *WatchBlocksV1BlockData) GetTotalDifficulty() string { - if o == nil { - var ret string - return ret - } - - return o.TotalDifficulty -} - -// GetTotalDifficultyOk returns a tuple with the TotalDifficulty field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetTotalDifficultyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TotalDifficulty, true -} - -// SetTotalDifficulty sets field value -func (o *WatchBlocksV1BlockData) SetTotalDifficulty(v string) { - o.TotalDifficulty = v -} - -// GetUncles returns the Uncles field value -func (o *WatchBlocksV1BlockData) GetUncles() []string { - if o == nil { - var ret []string - return ret - } - - return o.Uncles -} - -// GetUnclesOk returns a tuple with the Uncles field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetUnclesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Uncles, true -} - -// SetUncles sets field value -func (o *WatchBlocksV1BlockData) SetUncles(v []string) { - o.Uncles = v -} - -// GetBaseFeePerGas returns the BaseFeePerGas field value if set, zero value otherwise. -func (o *WatchBlocksV1BlockData) GetBaseFeePerGas() string { - if o == nil || IsNil(o.BaseFeePerGas) { - var ret string - return ret - } - return *o.BaseFeePerGas -} - -// GetBaseFeePerGasOk returns a tuple with the BaseFeePerGas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetBaseFeePerGasOk() (*string, bool) { - if o == nil || IsNil(o.BaseFeePerGas) { - return nil, false - } - return o.BaseFeePerGas, true -} - -// HasBaseFeePerGas returns a boolean if a field has been set. -func (o *WatchBlocksV1BlockData) HasBaseFeePerGas() bool { - if o != nil && !IsNil(o.BaseFeePerGas) { - return true - } - - return false -} - -// SetBaseFeePerGas gets a reference to the given string and assigns it to the BaseFeePerGas field. -func (o *WatchBlocksV1BlockData) SetBaseFeePerGas(v string) { - o.BaseFeePerGas = &v -} - -// GetTransactions returns the Transactions field value -func (o *WatchBlocksV1BlockData) GetTransactions() []Web3Transaction { - if o == nil { - var ret []Web3Transaction - return ret - } - - return o.Transactions -} - -// GetTransactionsOk returns a tuple with the Transactions field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1BlockData) GetTransactionsOk() ([]Web3Transaction, bool) { - if o == nil { - return nil, false - } - return o.Transactions, true -} - -// SetTransactions sets field value -func (o *WatchBlocksV1BlockData) SetTransactions(v []Web3Transaction) { - o.Transactions = v -} - -func (o WatchBlocksV1BlockData) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksV1BlockData) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["number"] = o.Number - if !IsNil(o.Hash) { - toSerialize["hash"] = o.Hash - } - toSerialize["parentHash"] = o.ParentHash - toSerialize["nonce"] = o.Nonce - toSerialize["sha3Uncles"] = o.Sha3Uncles - if !IsNil(o.LogsBloom) { - toSerialize["logsBloom"] = o.LogsBloom - } - if !IsNil(o.TransactionsRoot) { - toSerialize["transactionsRoot"] = o.TransactionsRoot - } - toSerialize["stateRoot"] = o.StateRoot - if !IsNil(o.ReceiptsRoot) { - toSerialize["receiptsRoot"] = o.ReceiptsRoot - } - if !IsNil(o.Difficulty) { - toSerialize["difficulty"] = o.Difficulty - } - if !IsNil(o.MixHash) { - toSerialize["mixHash"] = o.MixHash - } - toSerialize["miner"] = o.Miner - toSerialize["extraData"] = o.ExtraData - toSerialize["gasLimit"] = o.GasLimit - toSerialize["gasUsed"] = o.GasUsed - toSerialize["timestamp"] = o.Timestamp - toSerialize["size"] = o.Size - toSerialize["totalDifficulty"] = o.TotalDifficulty - toSerialize["uncles"] = o.Uncles - if !IsNil(o.BaseFeePerGas) { - toSerialize["baseFeePerGas"] = o.BaseFeePerGas - } - toSerialize["transactions"] = o.Transactions - return toSerialize, nil -} - -type NullableWatchBlocksV1BlockData struct { - value *WatchBlocksV1BlockData - isSet bool -} - -func (v NullableWatchBlocksV1BlockData) Get() *WatchBlocksV1BlockData { - return v.value -} - -func (v *NullableWatchBlocksV1BlockData) Set(val *WatchBlocksV1BlockData) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1BlockData) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1BlockData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1BlockData(val *WatchBlocksV1BlockData) *NullableWatchBlocksV1BlockData { - return &NullableWatchBlocksV1BlockData{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1BlockData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1BlockData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_block_data_timestamp.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_block_data_timestamp.go deleted file mode 100644 index 0f25021724..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_block_data_timestamp.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksV1BlockDataTimestamp - struct for WatchBlocksV1BlockDataTimestamp -type WatchBlocksV1BlockDataTimestamp struct { - Float32 *float32 - String *string -} - -// float32AsWatchBlocksV1BlockDataTimestamp is a convenience function that returns float32 wrapped in WatchBlocksV1BlockDataTimestamp -func Float32AsWatchBlocksV1BlockDataTimestamp(v *float32) WatchBlocksV1BlockDataTimestamp { - return WatchBlocksV1BlockDataTimestamp{ - Float32: v, - } -} - -// stringAsWatchBlocksV1BlockDataTimestamp is a convenience function that returns string wrapped in WatchBlocksV1BlockDataTimestamp -func StringAsWatchBlocksV1BlockDataTimestamp(v *string) WatchBlocksV1BlockDataTimestamp { - return WatchBlocksV1BlockDataTimestamp{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *WatchBlocksV1BlockDataTimestamp) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Float32 - err = newStrictDecoder(data).Decode(&dst.Float32) - if err == nil { - jsonFloat32, _ := json.Marshal(dst.Float32) - if string(jsonFloat32) == "{}" { // empty struct - dst.Float32 = nil - } else { - match++ - } - } else { - dst.Float32 = nil - } - - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Float32 = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(WatchBlocksV1BlockDataTimestamp)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(WatchBlocksV1BlockDataTimestamp)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src WatchBlocksV1BlockDataTimestamp) MarshalJSON() ([]byte, error) { - if src.Float32 != nil { - return json.Marshal(&src.Float32) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *WatchBlocksV1BlockDataTimestamp) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Float32 != nil { - return obj.Float32 - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableWatchBlocksV1BlockDataTimestamp struct { - value *WatchBlocksV1BlockDataTimestamp - isSet bool -} - -func (v NullableWatchBlocksV1BlockDataTimestamp) Get() *WatchBlocksV1BlockDataTimestamp { - return v.value -} - -func (v *NullableWatchBlocksV1BlockDataTimestamp) Set(val *WatchBlocksV1BlockDataTimestamp) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1BlockDataTimestamp) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1BlockDataTimestamp) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1BlockDataTimestamp(val *WatchBlocksV1BlockDataTimestamp) *NullableWatchBlocksV1BlockDataTimestamp { - return &NullableWatchBlocksV1BlockDataTimestamp{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1BlockDataTimestamp) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1BlockDataTimestamp) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_options.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_options.go deleted file mode 100644 index 680623e540..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_options.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the WatchBlocksV1Options type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksV1Options{} - -// WatchBlocksV1Options struct for WatchBlocksV1Options -type WatchBlocksV1Options struct { - // Include entire block data if flag is true, otherwise just a header is returned (default) - GetBlockData *bool `json:"getBlockData,omitempty"` - // Block from which we want to start the monitoring process. - LastSeenBlock *float32 `json:"lastSeenBlock,omitempty"` - // How often to poll ethereum node for new blocks. Not used if the node supports subscription based monitoring (i.e. WebSocket). - HttpPollInterval *float32 `json:"httpPollInterval,omitempty"` -} - -// NewWatchBlocksV1Options instantiates a new WatchBlocksV1Options object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksV1Options() *WatchBlocksV1Options { - this := WatchBlocksV1Options{} - var getBlockData bool = false - this.GetBlockData = &getBlockData - return &this -} - -// NewWatchBlocksV1OptionsWithDefaults instantiates a new WatchBlocksV1Options object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksV1OptionsWithDefaults() *WatchBlocksV1Options { - this := WatchBlocksV1Options{} - var getBlockData bool = false - this.GetBlockData = &getBlockData - return &this -} - -// GetGetBlockData returns the GetBlockData field value if set, zero value otherwise. -func (o *WatchBlocksV1Options) GetGetBlockData() bool { - if o == nil || IsNil(o.GetBlockData) { - var ret bool - return ret - } - return *o.GetBlockData -} - -// GetGetBlockDataOk returns a tuple with the GetBlockData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1Options) GetGetBlockDataOk() (*bool, bool) { - if o == nil || IsNil(o.GetBlockData) { - return nil, false - } - return o.GetBlockData, true -} - -// HasGetBlockData returns a boolean if a field has been set. -func (o *WatchBlocksV1Options) HasGetBlockData() bool { - if o != nil && !IsNil(o.GetBlockData) { - return true - } - - return false -} - -// SetGetBlockData gets a reference to the given bool and assigns it to the GetBlockData field. -func (o *WatchBlocksV1Options) SetGetBlockData(v bool) { - o.GetBlockData = &v -} - -// GetLastSeenBlock returns the LastSeenBlock field value if set, zero value otherwise. -func (o *WatchBlocksV1Options) GetLastSeenBlock() float32 { - if o == nil || IsNil(o.LastSeenBlock) { - var ret float32 - return ret - } - return *o.LastSeenBlock -} - -// GetLastSeenBlockOk returns a tuple with the LastSeenBlock field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1Options) GetLastSeenBlockOk() (*float32, bool) { - if o == nil || IsNil(o.LastSeenBlock) { - return nil, false - } - return o.LastSeenBlock, true -} - -// HasLastSeenBlock returns a boolean if a field has been set. -func (o *WatchBlocksV1Options) HasLastSeenBlock() bool { - if o != nil && !IsNil(o.LastSeenBlock) { - return true - } - - return false -} - -// SetLastSeenBlock gets a reference to the given float32 and assigns it to the LastSeenBlock field. -func (o *WatchBlocksV1Options) SetLastSeenBlock(v float32) { - o.LastSeenBlock = &v -} - -// GetHttpPollInterval returns the HttpPollInterval field value if set, zero value otherwise. -func (o *WatchBlocksV1Options) GetHttpPollInterval() float32 { - if o == nil || IsNil(o.HttpPollInterval) { - var ret float32 - return ret - } - return *o.HttpPollInterval -} - -// GetHttpPollIntervalOk returns a tuple with the HttpPollInterval field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1Options) GetHttpPollIntervalOk() (*float32, bool) { - if o == nil || IsNil(o.HttpPollInterval) { - return nil, false - } - return o.HttpPollInterval, true -} - -// HasHttpPollInterval returns a boolean if a field has been set. -func (o *WatchBlocksV1Options) HasHttpPollInterval() bool { - if o != nil && !IsNil(o.HttpPollInterval) { - return true - } - - return false -} - -// SetHttpPollInterval gets a reference to the given float32 and assigns it to the HttpPollInterval field. -func (o *WatchBlocksV1Options) SetHttpPollInterval(v float32) { - o.HttpPollInterval = &v -} - -func (o WatchBlocksV1Options) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksV1Options) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.GetBlockData) { - toSerialize["getBlockData"] = o.GetBlockData - } - if !IsNil(o.LastSeenBlock) { - toSerialize["lastSeenBlock"] = o.LastSeenBlock - } - if !IsNil(o.HttpPollInterval) { - toSerialize["httpPollInterval"] = o.HttpPollInterval - } - return toSerialize, nil -} - -type NullableWatchBlocksV1Options struct { - value *WatchBlocksV1Options - isSet bool -} - -func (v NullableWatchBlocksV1Options) Get() *WatchBlocksV1Options { - return v.value -} - -func (v *NullableWatchBlocksV1Options) Set(val *WatchBlocksV1Options) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1Options) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1Options) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1Options(val *WatchBlocksV1Options) *NullableWatchBlocksV1Options { - return &NullableWatchBlocksV1Options{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1Options) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1Options) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_progress.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_progress.go deleted file mode 100644 index c13c238c2f..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_progress.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the WatchBlocksV1Progress type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksV1Progress{} - -// WatchBlocksV1Progress struct for WatchBlocksV1Progress -type WatchBlocksV1Progress struct { - BlockHeader *Web3BlockHeader `json:"blockHeader,omitempty"` - BlockData *WatchBlocksV1BlockData `json:"blockData,omitempty"` -} - -// NewWatchBlocksV1Progress instantiates a new WatchBlocksV1Progress object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksV1Progress() *WatchBlocksV1Progress { - this := WatchBlocksV1Progress{} - return &this -} - -// NewWatchBlocksV1ProgressWithDefaults instantiates a new WatchBlocksV1Progress object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksV1ProgressWithDefaults() *WatchBlocksV1Progress { - this := WatchBlocksV1Progress{} - return &this -} - -// GetBlockHeader returns the BlockHeader field value if set, zero value otherwise. -func (o *WatchBlocksV1Progress) GetBlockHeader() Web3BlockHeader { - if o == nil || IsNil(o.BlockHeader) { - var ret Web3BlockHeader - return ret - } - return *o.BlockHeader -} - -// GetBlockHeaderOk returns a tuple with the BlockHeader field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1Progress) GetBlockHeaderOk() (*Web3BlockHeader, bool) { - if o == nil || IsNil(o.BlockHeader) { - return nil, false - } - return o.BlockHeader, true -} - -// HasBlockHeader returns a boolean if a field has been set. -func (o *WatchBlocksV1Progress) HasBlockHeader() bool { - if o != nil && !IsNil(o.BlockHeader) { - return true - } - - return false -} - -// SetBlockHeader gets a reference to the given Web3BlockHeader and assigns it to the BlockHeader field. -func (o *WatchBlocksV1Progress) SetBlockHeader(v Web3BlockHeader) { - o.BlockHeader = &v -} - -// GetBlockData returns the BlockData field value if set, zero value otherwise. -func (o *WatchBlocksV1Progress) GetBlockData() WatchBlocksV1BlockData { - if o == nil || IsNil(o.BlockData) { - var ret WatchBlocksV1BlockData - return ret - } - return *o.BlockData -} - -// GetBlockDataOk returns a tuple with the BlockData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1Progress) GetBlockDataOk() (*WatchBlocksV1BlockData, bool) { - if o == nil || IsNil(o.BlockData) { - return nil, false - } - return o.BlockData, true -} - -// HasBlockData returns a boolean if a field has been set. -func (o *WatchBlocksV1Progress) HasBlockData() bool { - if o != nil && !IsNil(o.BlockData) { - return true - } - - return false -} - -// SetBlockData gets a reference to the given WatchBlocksV1BlockData and assigns it to the BlockData field. -func (o *WatchBlocksV1Progress) SetBlockData(v WatchBlocksV1BlockData) { - o.BlockData = &v -} - -func (o WatchBlocksV1Progress) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksV1Progress) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.BlockHeader) { - toSerialize["blockHeader"] = o.BlockHeader - } - if !IsNil(o.BlockData) { - toSerialize["blockData"] = o.BlockData - } - return toSerialize, nil -} - -type NullableWatchBlocksV1Progress struct { - value *WatchBlocksV1Progress - isSet bool -} - -func (v NullableWatchBlocksV1Progress) Get() *WatchBlocksV1Progress { - return v.value -} - -func (v *NullableWatchBlocksV1Progress) Set(val *WatchBlocksV1Progress) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1Progress) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1Progress) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1Progress(val *WatchBlocksV1Progress) *NullableWatchBlocksV1Progress { - return &NullableWatchBlocksV1Progress{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1Progress) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1Progress) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_block_header.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_block_header.go deleted file mode 100644 index 2c73f005e2..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_block_header.go +++ /dev/null @@ -1,603 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the Web3BlockHeader type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3BlockHeader{} - -// Web3BlockHeader struct for Web3BlockHeader -type Web3BlockHeader struct { - Number *string `json:"number,omitempty"` - ParentHash *string `json:"parentHash,omitempty"` - Sha3Uncles string `json:"sha3Uncles"` - TransactionsRoot *string `json:"transactionsRoot,omitempty"` - ReceiptsRoot *string `json:"receiptsRoot,omitempty"` - Difficulty *string `json:"difficulty,omitempty"` - MixHash *string `json:"mixHash,omitempty"` - Miner *string `json:"miner,omitempty"` - GasLimit string `json:"gasLimit"` - GasUsed string `json:"gasUsed"` - StateRoot *string `json:"stateRoot,omitempty"` - LogsBloom *string `json:"logsBloom,omitempty"` - ExtraData *string `json:"extraData,omitempty"` - Nonce *string `json:"nonce,omitempty"` - Timestamp *string `json:"timestamp,omitempty"` -} - -// NewWeb3BlockHeader instantiates a new Web3BlockHeader object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3BlockHeader(sha3Uncles string, gasLimit string, gasUsed string) *Web3BlockHeader { - this := Web3BlockHeader{} - this.Sha3Uncles = sha3Uncles - this.GasLimit = gasLimit - this.GasUsed = gasUsed - return &this -} - -// NewWeb3BlockHeaderWithDefaults instantiates a new Web3BlockHeader object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3BlockHeaderWithDefaults() *Web3BlockHeader { - this := Web3BlockHeader{} - return &this -} - -// GetNumber returns the Number field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetNumber() string { - if o == nil || IsNil(o.Number) { - var ret string - return ret - } - return *o.Number -} - -// GetNumberOk returns a tuple with the Number field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetNumberOk() (*string, bool) { - if o == nil || IsNil(o.Number) { - return nil, false - } - return o.Number, true -} - -// HasNumber returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasNumber() bool { - if o != nil && !IsNil(o.Number) { - return true - } - - return false -} - -// SetNumber gets a reference to the given string and assigns it to the Number field. -func (o *Web3BlockHeader) SetNumber(v string) { - o.Number = &v -} - -// GetParentHash returns the ParentHash field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetParentHash() string { - if o == nil || IsNil(o.ParentHash) { - var ret string - return ret - } - return *o.ParentHash -} - -// GetParentHashOk returns a tuple with the ParentHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetParentHashOk() (*string, bool) { - if o == nil || IsNil(o.ParentHash) { - return nil, false - } - return o.ParentHash, true -} - -// HasParentHash returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasParentHash() bool { - if o != nil && !IsNil(o.ParentHash) { - return true - } - - return false -} - -// SetParentHash gets a reference to the given string and assigns it to the ParentHash field. -func (o *Web3BlockHeader) SetParentHash(v string) { - o.ParentHash = &v -} - -// GetSha3Uncles returns the Sha3Uncles field value -func (o *Web3BlockHeader) GetSha3Uncles() string { - if o == nil { - var ret string - return ret - } - - return o.Sha3Uncles -} - -// GetSha3UnclesOk returns a tuple with the Sha3Uncles field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetSha3UnclesOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Sha3Uncles, true -} - -// SetSha3Uncles sets field value -func (o *Web3BlockHeader) SetSha3Uncles(v string) { - o.Sha3Uncles = v -} - -// GetTransactionsRoot returns the TransactionsRoot field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetTransactionsRoot() string { - if o == nil || IsNil(o.TransactionsRoot) { - var ret string - return ret - } - return *o.TransactionsRoot -} - -// GetTransactionsRootOk returns a tuple with the TransactionsRoot field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetTransactionsRootOk() (*string, bool) { - if o == nil || IsNil(o.TransactionsRoot) { - return nil, false - } - return o.TransactionsRoot, true -} - -// HasTransactionsRoot returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasTransactionsRoot() bool { - if o != nil && !IsNil(o.TransactionsRoot) { - return true - } - - return false -} - -// SetTransactionsRoot gets a reference to the given string and assigns it to the TransactionsRoot field. -func (o *Web3BlockHeader) SetTransactionsRoot(v string) { - o.TransactionsRoot = &v -} - -// GetReceiptsRoot returns the ReceiptsRoot field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetReceiptsRoot() string { - if o == nil || IsNil(o.ReceiptsRoot) { - var ret string - return ret - } - return *o.ReceiptsRoot -} - -// GetReceiptsRootOk returns a tuple with the ReceiptsRoot field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetReceiptsRootOk() (*string, bool) { - if o == nil || IsNil(o.ReceiptsRoot) { - return nil, false - } - return o.ReceiptsRoot, true -} - -// HasReceiptsRoot returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasReceiptsRoot() bool { - if o != nil && !IsNil(o.ReceiptsRoot) { - return true - } - - return false -} - -// SetReceiptsRoot gets a reference to the given string and assigns it to the ReceiptsRoot field. -func (o *Web3BlockHeader) SetReceiptsRoot(v string) { - o.ReceiptsRoot = &v -} - -// GetDifficulty returns the Difficulty field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetDifficulty() string { - if o == nil || IsNil(o.Difficulty) { - var ret string - return ret - } - return *o.Difficulty -} - -// GetDifficultyOk returns a tuple with the Difficulty field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetDifficultyOk() (*string, bool) { - if o == nil || IsNil(o.Difficulty) { - return nil, false - } - return o.Difficulty, true -} - -// HasDifficulty returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasDifficulty() bool { - if o != nil && !IsNil(o.Difficulty) { - return true - } - - return false -} - -// SetDifficulty gets a reference to the given string and assigns it to the Difficulty field. -func (o *Web3BlockHeader) SetDifficulty(v string) { - o.Difficulty = &v -} - -// GetMixHash returns the MixHash field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetMixHash() string { - if o == nil || IsNil(o.MixHash) { - var ret string - return ret - } - return *o.MixHash -} - -// GetMixHashOk returns a tuple with the MixHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetMixHashOk() (*string, bool) { - if o == nil || IsNil(o.MixHash) { - return nil, false - } - return o.MixHash, true -} - -// HasMixHash returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasMixHash() bool { - if o != nil && !IsNil(o.MixHash) { - return true - } - - return false -} - -// SetMixHash gets a reference to the given string and assigns it to the MixHash field. -func (o *Web3BlockHeader) SetMixHash(v string) { - o.MixHash = &v -} - -// GetMiner returns the Miner field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetMiner() string { - if o == nil || IsNil(o.Miner) { - var ret string - return ret - } - return *o.Miner -} - -// GetMinerOk returns a tuple with the Miner field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetMinerOk() (*string, bool) { - if o == nil || IsNil(o.Miner) { - return nil, false - } - return o.Miner, true -} - -// HasMiner returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasMiner() bool { - if o != nil && !IsNil(o.Miner) { - return true - } - - return false -} - -// SetMiner gets a reference to the given string and assigns it to the Miner field. -func (o *Web3BlockHeader) SetMiner(v string) { - o.Miner = &v -} - -// GetGasLimit returns the GasLimit field value -func (o *Web3BlockHeader) GetGasLimit() string { - if o == nil { - var ret string - return ret - } - - return o.GasLimit -} - -// GetGasLimitOk returns a tuple with the GasLimit field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetGasLimitOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GasLimit, true -} - -// SetGasLimit sets field value -func (o *Web3BlockHeader) SetGasLimit(v string) { - o.GasLimit = v -} - -// GetGasUsed returns the GasUsed field value -func (o *Web3BlockHeader) GetGasUsed() string { - if o == nil { - var ret string - return ret - } - - return o.GasUsed -} - -// GetGasUsedOk returns a tuple with the GasUsed field value -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetGasUsedOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GasUsed, true -} - -// SetGasUsed sets field value -func (o *Web3BlockHeader) SetGasUsed(v string) { - o.GasUsed = v -} - -// GetStateRoot returns the StateRoot field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetStateRoot() string { - if o == nil || IsNil(o.StateRoot) { - var ret string - return ret - } - return *o.StateRoot -} - -// GetStateRootOk returns a tuple with the StateRoot field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetStateRootOk() (*string, bool) { - if o == nil || IsNil(o.StateRoot) { - return nil, false - } - return o.StateRoot, true -} - -// HasStateRoot returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasStateRoot() bool { - if o != nil && !IsNil(o.StateRoot) { - return true - } - - return false -} - -// SetStateRoot gets a reference to the given string and assigns it to the StateRoot field. -func (o *Web3BlockHeader) SetStateRoot(v string) { - o.StateRoot = &v -} - -// GetLogsBloom returns the LogsBloom field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetLogsBloom() string { - if o == nil || IsNil(o.LogsBloom) { - var ret string - return ret - } - return *o.LogsBloom -} - -// GetLogsBloomOk returns a tuple with the LogsBloom field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetLogsBloomOk() (*string, bool) { - if o == nil || IsNil(o.LogsBloom) { - return nil, false - } - return o.LogsBloom, true -} - -// HasLogsBloom returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasLogsBloom() bool { - if o != nil && !IsNil(o.LogsBloom) { - return true - } - - return false -} - -// SetLogsBloom gets a reference to the given string and assigns it to the LogsBloom field. -func (o *Web3BlockHeader) SetLogsBloom(v string) { - o.LogsBloom = &v -} - -// GetExtraData returns the ExtraData field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetExtraData() string { - if o == nil || IsNil(o.ExtraData) { - var ret string - return ret - } - return *o.ExtraData -} - -// GetExtraDataOk returns a tuple with the ExtraData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetExtraDataOk() (*string, bool) { - if o == nil || IsNil(o.ExtraData) { - return nil, false - } - return o.ExtraData, true -} - -// HasExtraData returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasExtraData() bool { - if o != nil && !IsNil(o.ExtraData) { - return true - } - - return false -} - -// SetExtraData gets a reference to the given string and assigns it to the ExtraData field. -func (o *Web3BlockHeader) SetExtraData(v string) { - o.ExtraData = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetNonce() string { - if o == nil || IsNil(o.Nonce) { - var ret string - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetNonceOk() (*string, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given string and assigns it to the Nonce field. -func (o *Web3BlockHeader) SetNonce(v string) { - o.Nonce = &v -} - -// GetTimestamp returns the Timestamp field value if set, zero value otherwise. -func (o *Web3BlockHeader) GetTimestamp() string { - if o == nil || IsNil(o.Timestamp) { - var ret string - return ret - } - return *o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3BlockHeader) GetTimestampOk() (*string, bool) { - if o == nil || IsNil(o.Timestamp) { - return nil, false - } - return o.Timestamp, true -} - -// HasTimestamp returns a boolean if a field has been set. -func (o *Web3BlockHeader) HasTimestamp() bool { - if o != nil && !IsNil(o.Timestamp) { - return true - } - - return false -} - -// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. -func (o *Web3BlockHeader) SetTimestamp(v string) { - o.Timestamp = &v -} - -func (o Web3BlockHeader) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3BlockHeader) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Number) { - toSerialize["number"] = o.Number - } - if !IsNil(o.ParentHash) { - toSerialize["parentHash"] = o.ParentHash - } - toSerialize["sha3Uncles"] = o.Sha3Uncles - if !IsNil(o.TransactionsRoot) { - toSerialize["transactionsRoot"] = o.TransactionsRoot - } - if !IsNil(o.ReceiptsRoot) { - toSerialize["receiptsRoot"] = o.ReceiptsRoot - } - if !IsNil(o.Difficulty) { - toSerialize["difficulty"] = o.Difficulty - } - if !IsNil(o.MixHash) { - toSerialize["mixHash"] = o.MixHash - } - if !IsNil(o.Miner) { - toSerialize["miner"] = o.Miner - } - toSerialize["gasLimit"] = o.GasLimit - toSerialize["gasUsed"] = o.GasUsed - if !IsNil(o.StateRoot) { - toSerialize["stateRoot"] = o.StateRoot - } - if !IsNil(o.LogsBloom) { - toSerialize["logsBloom"] = o.LogsBloom - } - if !IsNil(o.ExtraData) { - toSerialize["extraData"] = o.ExtraData - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - if !IsNil(o.Timestamp) { - toSerialize["timestamp"] = o.Timestamp - } - return toSerialize, nil -} - -type NullableWeb3BlockHeader struct { - value *Web3BlockHeader - isSet bool -} - -func (v NullableWeb3BlockHeader) Get() *Web3BlockHeader { - return v.value -} - -func (v *NullableWeb3BlockHeader) Set(val *Web3BlockHeader) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3BlockHeader) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3BlockHeader) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3BlockHeader(val *Web3BlockHeader) *NullableWeb3BlockHeader { - return &NullableWeb3BlockHeader{value: val, isSet: true} -} - -func (v NullableWeb3BlockHeader) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3BlockHeader) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go deleted file mode 100644 index 6c05c581ef..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go +++ /dev/null @@ -1,208 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredential - struct for Web3SigningCredential -type Web3SigningCredential struct { - Web3SigningCredentialCactiKeychainRef *Web3SigningCredentialCactiKeychainRef - Web3SigningCredentialGethKeychainPassword *Web3SigningCredentialGethKeychainPassword - Web3SigningCredentialNone *Web3SigningCredentialNone - Web3SigningCredentialPrivateKeyHex *Web3SigningCredentialPrivateKeyHex -} - -// Web3SigningCredentialCactiKeychainRefAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialCactiKeychainRef wrapped in Web3SigningCredential -func Web3SigningCredentialCactiKeychainRefAsWeb3SigningCredential(v *Web3SigningCredentialCactiKeychainRef) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialCactiKeychainRef: v, - } -} - -// Web3SigningCredentialGethKeychainPasswordAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialGethKeychainPassword wrapped in Web3SigningCredential -func Web3SigningCredentialGethKeychainPasswordAsWeb3SigningCredential(v *Web3SigningCredentialGethKeychainPassword) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialGethKeychainPassword: v, - } -} - -// Web3SigningCredentialNoneAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialNone wrapped in Web3SigningCredential -func Web3SigningCredentialNoneAsWeb3SigningCredential(v *Web3SigningCredentialNone) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialNone: v, - } -} - -// Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialPrivateKeyHex wrapped in Web3SigningCredential -func Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential(v *Web3SigningCredentialPrivateKeyHex) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialPrivateKeyHex: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *Web3SigningCredential) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Web3SigningCredentialCactiKeychainRef - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialCactiKeychainRef) - if err == nil { - jsonWeb3SigningCredentialCactiKeychainRef, _ := json.Marshal(dst.Web3SigningCredentialCactiKeychainRef) - if string(jsonWeb3SigningCredentialCactiKeychainRef) == "{}" { // empty struct - dst.Web3SigningCredentialCactiKeychainRef = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialCactiKeychainRef = nil - } - - // try to unmarshal data into Web3SigningCredentialGethKeychainPassword - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialGethKeychainPassword) - if err == nil { - jsonWeb3SigningCredentialGethKeychainPassword, _ := json.Marshal(dst.Web3SigningCredentialGethKeychainPassword) - if string(jsonWeb3SigningCredentialGethKeychainPassword) == "{}" { // empty struct - dst.Web3SigningCredentialGethKeychainPassword = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialGethKeychainPassword = nil - } - - // try to unmarshal data into Web3SigningCredentialNone - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialNone) - if err == nil { - jsonWeb3SigningCredentialNone, _ := json.Marshal(dst.Web3SigningCredentialNone) - if string(jsonWeb3SigningCredentialNone) == "{}" { // empty struct - dst.Web3SigningCredentialNone = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialNone = nil - } - - // try to unmarshal data into Web3SigningCredentialPrivateKeyHex - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialPrivateKeyHex) - if err == nil { - jsonWeb3SigningCredentialPrivateKeyHex, _ := json.Marshal(dst.Web3SigningCredentialPrivateKeyHex) - if string(jsonWeb3SigningCredentialPrivateKeyHex) == "{}" { // empty struct - dst.Web3SigningCredentialPrivateKeyHex = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialPrivateKeyHex = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Web3SigningCredentialCactiKeychainRef = nil - dst.Web3SigningCredentialGethKeychainPassword = nil - dst.Web3SigningCredentialNone = nil - dst.Web3SigningCredentialPrivateKeyHex = nil - - return fmt.Errorf("data matches more than one schema in oneOf(Web3SigningCredential)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(Web3SigningCredential)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src Web3SigningCredential) MarshalJSON() ([]byte, error) { - if src.Web3SigningCredentialCactiKeychainRef != nil { - return json.Marshal(&src.Web3SigningCredentialCactiKeychainRef) - } - - if src.Web3SigningCredentialGethKeychainPassword != nil { - return json.Marshal(&src.Web3SigningCredentialGethKeychainPassword) - } - - if src.Web3SigningCredentialNone != nil { - return json.Marshal(&src.Web3SigningCredentialNone) - } - - if src.Web3SigningCredentialPrivateKeyHex != nil { - return json.Marshal(&src.Web3SigningCredentialPrivateKeyHex) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *Web3SigningCredential) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Web3SigningCredentialCactiKeychainRef != nil { - return obj.Web3SigningCredentialCactiKeychainRef - } - - if obj.Web3SigningCredentialGethKeychainPassword != nil { - return obj.Web3SigningCredentialGethKeychainPassword - } - - if obj.Web3SigningCredentialNone != nil { - return obj.Web3SigningCredentialNone - } - - if obj.Web3SigningCredentialPrivateKeyHex != nil { - return obj.Web3SigningCredentialPrivateKeyHex - } - - // all schemas are nil - return nil -} - -type NullableWeb3SigningCredential struct { - value *Web3SigningCredential - isSet bool -} - -func (v NullableWeb3SigningCredential) Get() *Web3SigningCredential { - return v.value -} - -func (v *NullableWeb3SigningCredential) Set(val *Web3SigningCredential) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredential) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredential) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredential(val *Web3SigningCredential) *NullableWeb3SigningCredential { - return &NullableWeb3SigningCredential{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredential) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredential) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cacti_keychain_ref.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cacti_keychain_ref.go deleted file mode 100644 index 6b1fe58120..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cacti_keychain_ref.go +++ /dev/null @@ -1,210 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialCactiKeychainRef type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialCactiKeychainRef{} - -// Web3SigningCredentialCactiKeychainRef struct for Web3SigningCredentialCactiKeychainRef -type Web3SigningCredentialCactiKeychainRef struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - KeychainEntryKey string `json:"keychainEntryKey"` - // The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - KeychainId *string `json:"keychainId,omitempty"` -} - -// NewWeb3SigningCredentialCactiKeychainRef instantiates a new Web3SigningCredentialCactiKeychainRef object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialCactiKeychainRef(type_ Web3SigningCredentialType, ethAccount string, keychainEntryKey string) *Web3SigningCredentialCactiKeychainRef { - this := Web3SigningCredentialCactiKeychainRef{} - this.Type = type_ - this.EthAccount = ethAccount - this.KeychainEntryKey = keychainEntryKey - return &this -} - -// NewWeb3SigningCredentialCactiKeychainRefWithDefaults instantiates a new Web3SigningCredentialCactiKeychainRef object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialCactiKeychainRefWithDefaults() *Web3SigningCredentialCactiKeychainRef { - this := Web3SigningCredentialCactiKeychainRef{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialCactiKeychainRef) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactiKeychainRef) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialCactiKeychainRef) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialCactiKeychainRef) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactiKeychainRef) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialCactiKeychainRef) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetKeychainEntryKey returns the KeychainEntryKey field value -func (o *Web3SigningCredentialCactiKeychainRef) GetKeychainEntryKey() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainEntryKey -} - -// GetKeychainEntryKeyOk returns a tuple with the KeychainEntryKey field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactiKeychainRef) GetKeychainEntryKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainEntryKey, true -} - -// SetKeychainEntryKey sets field value -func (o *Web3SigningCredentialCactiKeychainRef) SetKeychainEntryKey(v string) { - o.KeychainEntryKey = v -} - -// GetKeychainId returns the KeychainId field value if set, zero value otherwise. -func (o *Web3SigningCredentialCactiKeychainRef) GetKeychainId() string { - if o == nil || IsNil(o.KeychainId) { - var ret string - return ret - } - return *o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactiKeychainRef) GetKeychainIdOk() (*string, bool) { - if o == nil || IsNil(o.KeychainId) { - return nil, false - } - return o.KeychainId, true -} - -// HasKeychainId returns a boolean if a field has been set. -func (o *Web3SigningCredentialCactiKeychainRef) HasKeychainId() bool { - if o != nil && !IsNil(o.KeychainId) { - return true - } - - return false -} - -// SetKeychainId gets a reference to the given string and assigns it to the KeychainId field. -func (o *Web3SigningCredentialCactiKeychainRef) SetKeychainId(v string) { - o.KeychainId = &v -} - -func (o Web3SigningCredentialCactiKeychainRef) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialCactiKeychainRef) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["keychainEntryKey"] = o.KeychainEntryKey - if !IsNil(o.KeychainId) { - toSerialize["keychainId"] = o.KeychainId - } - return toSerialize, nil -} - -type NullableWeb3SigningCredentialCactiKeychainRef struct { - value *Web3SigningCredentialCactiKeychainRef - isSet bool -} - -func (v NullableWeb3SigningCredentialCactiKeychainRef) Get() *Web3SigningCredentialCactiKeychainRef { - return v.value -} - -func (v *NullableWeb3SigningCredentialCactiKeychainRef) Set(val *Web3SigningCredentialCactiKeychainRef) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialCactiKeychainRef) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialCactiKeychainRef) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialCactiKeychainRef(val *Web3SigningCredentialCactiKeychainRef) *NullableWeb3SigningCredentialCactiKeychainRef { - return &NullableWeb3SigningCredentialCactiKeychainRef{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialCactiKeychainRef) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialCactiKeychainRef) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_geth_keychain_password.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_geth_keychain_password.go deleted file mode 100644 index 1c0cc635d7..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_geth_keychain_password.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialGethKeychainPassword type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialGethKeychainPassword{} - -// Web3SigningCredentialGethKeychainPassword struct for Web3SigningCredentialGethKeychainPassword -type Web3SigningCredentialGethKeychainPassword struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // A geth keychain unlock password. - Secret string `json:"secret"` -} - -// NewWeb3SigningCredentialGethKeychainPassword instantiates a new Web3SigningCredentialGethKeychainPassword object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialGethKeychainPassword(type_ Web3SigningCredentialType, ethAccount string, secret string) *Web3SigningCredentialGethKeychainPassword { - this := Web3SigningCredentialGethKeychainPassword{} - this.Type = type_ - this.EthAccount = ethAccount - this.Secret = secret - return &this -} - -// NewWeb3SigningCredentialGethKeychainPasswordWithDefaults instantiates a new Web3SigningCredentialGethKeychainPassword object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialGethKeychainPasswordWithDefaults() *Web3SigningCredentialGethKeychainPassword { - this := Web3SigningCredentialGethKeychainPassword{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialGethKeychainPassword) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialGethKeychainPassword) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialGethKeychainPassword) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialGethKeychainPassword) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialGethKeychainPassword) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialGethKeychainPassword) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetSecret returns the Secret field value -func (o *Web3SigningCredentialGethKeychainPassword) GetSecret() string { - if o == nil { - var ret string - return ret - } - - return o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialGethKeychainPassword) GetSecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Secret, true -} - -// SetSecret sets field value -func (o *Web3SigningCredentialGethKeychainPassword) SetSecret(v string) { - o.Secret = v -} - -func (o Web3SigningCredentialGethKeychainPassword) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialGethKeychainPassword) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["secret"] = o.Secret - return toSerialize, nil -} - -type NullableWeb3SigningCredentialGethKeychainPassword struct { - value *Web3SigningCredentialGethKeychainPassword - isSet bool -} - -func (v NullableWeb3SigningCredentialGethKeychainPassword) Get() *Web3SigningCredentialGethKeychainPassword { - return v.value -} - -func (v *NullableWeb3SigningCredentialGethKeychainPassword) Set(val *Web3SigningCredentialGethKeychainPassword) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialGethKeychainPassword) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialGethKeychainPassword) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialGethKeychainPassword(val *Web3SigningCredentialGethKeychainPassword) *NullableWeb3SigningCredentialGethKeychainPassword { - return &NullableWeb3SigningCredentialGethKeychainPassword{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialGethKeychainPassword) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialGethKeychainPassword) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go deleted file mode 100644 index b2980892fa..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialNone type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialNone{} - -// Web3SigningCredentialNone Using this denotes that there is no signing required because the transaction is pre-signed. -type Web3SigningCredentialNone struct { - Type Web3SigningCredentialType `json:"type"` -} - -// NewWeb3SigningCredentialNone instantiates a new Web3SigningCredentialNone object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialNone(type_ Web3SigningCredentialType) *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - this.Type = type_ - return &this -} - -// NewWeb3SigningCredentialNoneWithDefaults instantiates a new Web3SigningCredentialNone object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialNoneWithDefaults() *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialNone) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialNone) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialNone) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -func (o Web3SigningCredentialNone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialNone) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableWeb3SigningCredentialNone struct { - value *Web3SigningCredentialNone - isSet bool -} - -func (v NullableWeb3SigningCredentialNone) Get() *Web3SigningCredentialNone { - return v.value -} - -func (v *NullableWeb3SigningCredentialNone) Set(val *Web3SigningCredentialNone) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialNone) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialNone) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialNone(val *Web3SigningCredentialNone) *NullableWeb3SigningCredentialNone { - return &NullableWeb3SigningCredentialNone{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialNone) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialNone) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go deleted file mode 100644 index 8c16b9c519..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialPrivateKeyHex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialPrivateKeyHex{} - -// Web3SigningCredentialPrivateKeyHex struct for Web3SigningCredentialPrivateKeyHex -type Web3SigningCredentialPrivateKeyHex struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The HEX encoded private key of an eth account. - Secret string `json:"secret"` -} - -// NewWeb3SigningCredentialPrivateKeyHex instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialPrivateKeyHex(type_ Web3SigningCredentialType, ethAccount string, secret string) *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - this.Type = type_ - this.EthAccount = ethAccount - this.Secret = secret - return &this -} - -// NewWeb3SigningCredentialPrivateKeyHexWithDefaults instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialPrivateKeyHexWithDefaults() *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialPrivateKeyHex) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetSecret returns the Secret field value -func (o *Web3SigningCredentialPrivateKeyHex) GetSecret() string { - if o == nil { - var ret string - return ret - } - - return o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetSecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Secret, true -} - -// SetSecret sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetSecret(v string) { - o.Secret = v -} - -func (o Web3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialPrivateKeyHex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["secret"] = o.Secret - return toSerialize, nil -} - -type NullableWeb3SigningCredentialPrivateKeyHex struct { - value *Web3SigningCredentialPrivateKeyHex - isSet bool -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) Get() *Web3SigningCredentialPrivateKeyHex { - return v.value -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Set(val *Web3SigningCredentialPrivateKeyHex) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialPrivateKeyHex(val *Web3SigningCredentialPrivateKeyHex) *NullableWeb3SigningCredentialPrivateKeyHex { - return &NullableWeb3SigningCredentialPrivateKeyHex{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go deleted file mode 100644 index 59e7925113..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredentialType the model 'Web3SigningCredentialType' -type Web3SigningCredentialType string - -// List of Web3SigningCredentialType -const ( - CACTI_KEYCHAIN_REF Web3SigningCredentialType = "CACTI_KEYCHAIN_REF" - GETH_KEYCHAIN_PASSWORD Web3SigningCredentialType = "GETH_KEYCHAIN_PASSWORD" - PRIVATE_KEY_HEX Web3SigningCredentialType = "PRIVATE_KEY_HEX" - NONE Web3SigningCredentialType = "NONE" -) - -// All allowed values of Web3SigningCredentialType enum -var AllowedWeb3SigningCredentialTypeEnumValues = []Web3SigningCredentialType{ - "CACTI_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE", -} - -func (v *Web3SigningCredentialType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := Web3SigningCredentialType(value) - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Web3SigningCredentialType", value) -} - -// NewWeb3SigningCredentialTypeFromValue returns a pointer to a valid Web3SigningCredentialType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWeb3SigningCredentialTypeFromValue(v string) (*Web3SigningCredentialType, error) { - ev := Web3SigningCredentialType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Web3SigningCredentialType: valid values are %v", v, AllowedWeb3SigningCredentialTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v Web3SigningCredentialType) IsValid() bool { - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to Web3SigningCredentialType value -func (v Web3SigningCredentialType) Ptr() *Web3SigningCredentialType { - return &v -} - -type NullableWeb3SigningCredentialType struct { - value *Web3SigningCredentialType - isSet bool -} - -func (v NullableWeb3SigningCredentialType) Get() *Web3SigningCredentialType { - return v.value -} - -func (v *NullableWeb3SigningCredentialType) Set(val *Web3SigningCredentialType) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialType) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialType(val *Web3SigningCredentialType) *NullableWeb3SigningCredentialType { - return &NullableWeb3SigningCredentialType{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_transaction.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_transaction.go deleted file mode 100644 index f36a6e399a..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_transaction.go +++ /dev/null @@ -1,549 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the Web3Transaction type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3Transaction{} - -// Web3Transaction struct for Web3Transaction -type Web3Transaction struct { - Hash string `json:"hash"` - Nonce string `json:"nonce"` - BlockHash string `json:"blockHash"` - BlockNumber string `json:"blockNumber"` - TransactionIndex string `json:"transactionIndex"` - From string `json:"from"` - To string `json:"to"` - Value string `json:"value"` - GasPrice string `json:"gasPrice"` - Gas string `json:"gas"` - Input string `json:"input"` - Type string `json:"type"` - ChainId string `json:"chainId"` - V *string `json:"v,omitempty"` - R *string `json:"r,omitempty"` - S *string `json:"s,omitempty"` -} - -// NewWeb3Transaction instantiates a new Web3Transaction object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3Transaction(hash string, nonce string, blockHash string, blockNumber string, transactionIndex string, from string, to string, value string, gasPrice string, gas string, input string, type_ string, chainId string) *Web3Transaction { - this := Web3Transaction{} - this.Hash = hash - this.Nonce = nonce - this.BlockHash = blockHash - this.BlockNumber = blockNumber - this.TransactionIndex = transactionIndex - this.From = from - this.To = to - this.Value = value - this.GasPrice = gasPrice - this.Gas = gas - this.Input = input - this.Type = type_ - this.ChainId = chainId - return &this -} - -// NewWeb3TransactionWithDefaults instantiates a new Web3Transaction object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3TransactionWithDefaults() *Web3Transaction { - this := Web3Transaction{} - return &this -} - -// GetHash returns the Hash field value -func (o *Web3Transaction) GetHash() string { - if o == nil { - var ret string - return ret - } - - return o.Hash -} - -// GetHashOk returns a tuple with the Hash field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Hash, true -} - -// SetHash sets field value -func (o *Web3Transaction) SetHash(v string) { - o.Hash = v -} - -// GetNonce returns the Nonce field value -func (o *Web3Transaction) GetNonce() string { - if o == nil { - var ret string - return ret - } - - return o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetNonceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Nonce, true -} - -// SetNonce sets field value -func (o *Web3Transaction) SetNonce(v string) { - o.Nonce = v -} - -// GetBlockHash returns the BlockHash field value -func (o *Web3Transaction) GetBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockHash, true -} - -// SetBlockHash sets field value -func (o *Web3Transaction) SetBlockHash(v string) { - o.BlockHash = v -} - -// GetBlockNumber returns the BlockNumber field value -func (o *Web3Transaction) GetBlockNumber() string { - if o == nil { - var ret string - return ret - } - - return o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetBlockNumberOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockNumber, true -} - -// SetBlockNumber sets field value -func (o *Web3Transaction) SetBlockNumber(v string) { - o.BlockNumber = v -} - -// GetTransactionIndex returns the TransactionIndex field value -func (o *Web3Transaction) GetTransactionIndex() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionIndex -} - -// GetTransactionIndexOk returns a tuple with the TransactionIndex field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetTransactionIndexOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionIndex, true -} - -// SetTransactionIndex sets field value -func (o *Web3Transaction) SetTransactionIndex(v string) { - o.TransactionIndex = v -} - -// GetFrom returns the From field value -func (o *Web3Transaction) GetFrom() string { - if o == nil { - var ret string - return ret - } - - return o.From -} - -// GetFromOk returns a tuple with the From field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetFromOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.From, true -} - -// SetFrom sets field value -func (o *Web3Transaction) SetFrom(v string) { - o.From = v -} - -// GetTo returns the To field value -func (o *Web3Transaction) GetTo() string { - if o == nil { - var ret string - return ret - } - - return o.To -} - -// GetToOk returns a tuple with the To field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetToOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.To, true -} - -// SetTo sets field value -func (o *Web3Transaction) SetTo(v string) { - o.To = v -} - -// GetValue returns the Value field value -func (o *Web3Transaction) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *Web3Transaction) SetValue(v string) { - o.Value = v -} - -// GetGasPrice returns the GasPrice field value -func (o *Web3Transaction) GetGasPrice() string { - if o == nil { - var ret string - return ret - } - - return o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetGasPriceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GasPrice, true -} - -// SetGasPrice sets field value -func (o *Web3Transaction) SetGasPrice(v string) { - o.GasPrice = v -} - -// GetGas returns the Gas field value -func (o *Web3Transaction) GetGas() string { - if o == nil { - var ret string - return ret - } - - return o.Gas -} - -// GetGasOk returns a tuple with the Gas field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetGasOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Gas, true -} - -// SetGas sets field value -func (o *Web3Transaction) SetGas(v string) { - o.Gas = v -} - -// GetInput returns the Input field value -func (o *Web3Transaction) GetInput() string { - if o == nil { - var ret string - return ret - } - - return o.Input -} - -// GetInputOk returns a tuple with the Input field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetInputOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Input, true -} - -// SetInput sets field value -func (o *Web3Transaction) SetInput(v string) { - o.Input = v -} - -// GetType returns the Type field value -func (o *Web3Transaction) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3Transaction) SetType(v string) { - o.Type = v -} - -// GetChainId returns the ChainId field value -func (o *Web3Transaction) GetChainId() string { - if o == nil { - var ret string - return ret - } - - return o.ChainId -} - -// GetChainIdOk returns a tuple with the ChainId field value -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetChainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainId, true -} - -// SetChainId sets field value -func (o *Web3Transaction) SetChainId(v string) { - o.ChainId = v -} - -// GetV returns the V field value if set, zero value otherwise. -func (o *Web3Transaction) GetV() string { - if o == nil || IsNil(o.V) { - var ret string - return ret - } - return *o.V -} - -// GetVOk returns a tuple with the V field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetVOk() (*string, bool) { - if o == nil || IsNil(o.V) { - return nil, false - } - return o.V, true -} - -// HasV returns a boolean if a field has been set. -func (o *Web3Transaction) HasV() bool { - if o != nil && !IsNil(o.V) { - return true - } - - return false -} - -// SetV gets a reference to the given string and assigns it to the V field. -func (o *Web3Transaction) SetV(v string) { - o.V = &v -} - -// GetR returns the R field value if set, zero value otherwise. -func (o *Web3Transaction) GetR() string { - if o == nil || IsNil(o.R) { - var ret string - return ret - } - return *o.R -} - -// GetROk returns a tuple with the R field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetROk() (*string, bool) { - if o == nil || IsNil(o.R) { - return nil, false - } - return o.R, true -} - -// HasR returns a boolean if a field has been set. -func (o *Web3Transaction) HasR() bool { - if o != nil && !IsNil(o.R) { - return true - } - - return false -} - -// SetR gets a reference to the given string and assigns it to the R field. -func (o *Web3Transaction) SetR(v string) { - o.R = &v -} - -// GetS returns the S field value if set, zero value otherwise. -func (o *Web3Transaction) GetS() string { - if o == nil || IsNil(o.S) { - var ret string - return ret - } - return *o.S -} - -// GetSOk returns a tuple with the S field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3Transaction) GetSOk() (*string, bool) { - if o == nil || IsNil(o.S) { - return nil, false - } - return o.S, true -} - -// HasS returns a boolean if a field has been set. -func (o *Web3Transaction) HasS() bool { - if o != nil && !IsNil(o.S) { - return true - } - - return false -} - -// SetS gets a reference to the given string and assigns it to the S field. -func (o *Web3Transaction) SetS(v string) { - o.S = &v -} - -func (o Web3Transaction) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3Transaction) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["hash"] = o.Hash - toSerialize["nonce"] = o.Nonce - toSerialize["blockHash"] = o.BlockHash - toSerialize["blockNumber"] = o.BlockNumber - toSerialize["transactionIndex"] = o.TransactionIndex - toSerialize["from"] = o.From - toSerialize["to"] = o.To - toSerialize["value"] = o.Value - toSerialize["gasPrice"] = o.GasPrice - toSerialize["gas"] = o.Gas - toSerialize["input"] = o.Input - toSerialize["type"] = o.Type - toSerialize["chainId"] = o.ChainId - if !IsNil(o.V) { - toSerialize["v"] = o.V - } - if !IsNil(o.R) { - toSerialize["r"] = o.R - } - if !IsNil(o.S) { - toSerialize["s"] = o.S - } - return toSerialize, nil -} - -type NullableWeb3Transaction struct { - value *Web3Transaction - isSet bool -} - -func (v NullableWeb3Transaction) Get() *Web3Transaction { - return v.value -} - -func (v *NullableWeb3Transaction) Set(val *Web3Transaction) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3Transaction) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3Transaction) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3Transaction(val *Web3Transaction) *NullableWeb3Transaction { - return &NullableWeb3Transaction{value: val, isSet: true} -} - -func (v NullableWeb3Transaction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3Transaction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go deleted file mode 100644 index 1f28165b25..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go +++ /dev/null @@ -1,681 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" -) - -// checks if the Web3TransactionReceipt type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3TransactionReceipt{} - -// Web3TransactionReceipt struct for Web3TransactionReceipt -type Web3TransactionReceipt struct { - Status bool `json:"status"` - TransactionHash string `json:"transactionHash"` - TransactionIndex string `json:"transactionIndex"` - BlockHash string `json:"blockHash"` - BlockNumber string `json:"blockNumber"` - GasUsed string `json:"gasUsed"` - EffectiveGasPrice *string `json:"effectiveGasPrice,omitempty"` - ContractAddress NullableString `json:"contractAddress,omitempty"` - From string `json:"from"` - To string `json:"to"` - Logs []interface{} `json:"logs,omitempty"` - LogsBloom *string `json:"logsBloom,omitempty"` - RevertReason *string `json:"revertReason,omitempty"` - Output *string `json:"output,omitempty"` - CommitmentHash *string `json:"commitmentHash,omitempty"` - CumulativeGasUsed *string `json:"cumulativeGasUsed,omitempty"` - Type *string `json:"type,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _Web3TransactionReceipt Web3TransactionReceipt - -// NewWeb3TransactionReceipt instantiates a new Web3TransactionReceipt object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3TransactionReceipt(status bool, transactionHash string, transactionIndex string, blockHash string, blockNumber string, gasUsed string, from string, to string) *Web3TransactionReceipt { - this := Web3TransactionReceipt{} - this.Status = status - this.TransactionHash = transactionHash - this.TransactionIndex = transactionIndex - this.BlockHash = blockHash - this.BlockNumber = blockNumber - this.GasUsed = gasUsed - this.From = from - this.To = to - return &this -} - -// NewWeb3TransactionReceiptWithDefaults instantiates a new Web3TransactionReceipt object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3TransactionReceiptWithDefaults() *Web3TransactionReceipt { - this := Web3TransactionReceipt{} - return &this -} - -// GetStatus returns the Status field value -func (o *Web3TransactionReceipt) GetStatus() bool { - if o == nil { - var ret bool - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetStatusOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *Web3TransactionReceipt) SetStatus(v bool) { - o.Status = v -} - -// GetTransactionHash returns the TransactionHash field value -func (o *Web3TransactionReceipt) GetTransactionHash() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionHash -} - -// GetTransactionHashOk returns a tuple with the TransactionHash field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTransactionHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionHash, true -} - -// SetTransactionHash sets field value -func (o *Web3TransactionReceipt) SetTransactionHash(v string) { - o.TransactionHash = v -} - -// GetTransactionIndex returns the TransactionIndex field value -func (o *Web3TransactionReceipt) GetTransactionIndex() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionIndex -} - -// GetTransactionIndexOk returns a tuple with the TransactionIndex field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTransactionIndexOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionIndex, true -} - -// SetTransactionIndex sets field value -func (o *Web3TransactionReceipt) SetTransactionIndex(v string) { - o.TransactionIndex = v -} - -// GetBlockHash returns the BlockHash field value -func (o *Web3TransactionReceipt) GetBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockHash, true -} - -// SetBlockHash sets field value -func (o *Web3TransactionReceipt) SetBlockHash(v string) { - o.BlockHash = v -} - -// GetBlockNumber returns the BlockNumber field value -func (o *Web3TransactionReceipt) GetBlockNumber() string { - if o == nil { - var ret string - return ret - } - - return o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetBlockNumberOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockNumber, true -} - -// SetBlockNumber sets field value -func (o *Web3TransactionReceipt) SetBlockNumber(v string) { - o.BlockNumber = v -} - -// GetGasUsed returns the GasUsed field value -func (o *Web3TransactionReceipt) GetGasUsed() string { - if o == nil { - var ret string - return ret - } - - return o.GasUsed -} - -// GetGasUsedOk returns a tuple with the GasUsed field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetGasUsedOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GasUsed, true -} - -// SetGasUsed sets field value -func (o *Web3TransactionReceipt) SetGasUsed(v string) { - o.GasUsed = v -} - -// GetEffectiveGasPrice returns the EffectiveGasPrice field value if set, zero value otherwise. -func (o *Web3TransactionReceipt) GetEffectiveGasPrice() string { - if o == nil || IsNil(o.EffectiveGasPrice) { - var ret string - return ret - } - return *o.EffectiveGasPrice -} - -// GetEffectiveGasPriceOk returns a tuple with the EffectiveGasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetEffectiveGasPriceOk() (*string, bool) { - if o == nil || IsNil(o.EffectiveGasPrice) { - return nil, false - } - return o.EffectiveGasPrice, true -} - -// HasEffectiveGasPrice returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasEffectiveGasPrice() bool { - if o != nil && !IsNil(o.EffectiveGasPrice) { - return true - } - - return false -} - -// SetEffectiveGasPrice gets a reference to the given string and assigns it to the EffectiveGasPrice field. -func (o *Web3TransactionReceipt) SetEffectiveGasPrice(v string) { - o.EffectiveGasPrice = &v -} - -// GetContractAddress returns the ContractAddress field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Web3TransactionReceipt) GetContractAddress() string { - if o == nil || IsNil(o.ContractAddress.Get()) { - var ret string - return ret - } - return *o.ContractAddress.Get() -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Web3TransactionReceipt) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ContractAddress.Get(), o.ContractAddress.IsSet() -} - -// HasContractAddress returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasContractAddress() bool { - if o != nil && o.ContractAddress.IsSet() { - return true - } - - return false -} - -// SetContractAddress gets a reference to the given NullableString and assigns it to the ContractAddress field. -func (o *Web3TransactionReceipt) SetContractAddress(v string) { - o.ContractAddress.Set(&v) -} -// SetContractAddressNil sets the value for ContractAddress to be an explicit nil -func (o *Web3TransactionReceipt) SetContractAddressNil() { - o.ContractAddress.Set(nil) -} - -// UnsetContractAddress ensures that no value is present for ContractAddress, not even an explicit nil -func (o *Web3TransactionReceipt) UnsetContractAddress() { - o.ContractAddress.Unset() -} - -// GetFrom returns the From field value -func (o *Web3TransactionReceipt) GetFrom() string { - if o == nil { - var ret string - return ret - } - - return o.From -} - -// GetFromOk returns a tuple with the From field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetFromOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.From, true -} - -// SetFrom sets field value -func (o *Web3TransactionReceipt) SetFrom(v string) { - o.From = v -} - -// GetTo returns the To field value -func (o *Web3TransactionReceipt) GetTo() string { - if o == nil { - var ret string - return ret - } - - return o.To -} - -// GetToOk returns a tuple with the To field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetToOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.To, true -} - -// SetTo sets field value -func (o *Web3TransactionReceipt) SetTo(v string) { - o.To = v -} - -// GetLogs returns the Logs field value if set, zero value otherwise. -func (o *Web3TransactionReceipt) GetLogs() []interface{} { - if o == nil || IsNil(o.Logs) { - var ret []interface{} - return ret - } - return o.Logs -} - -// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetLogsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.Logs) { - return nil, false - } - return o.Logs, true -} - -// HasLogs returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasLogs() bool { - if o != nil && !IsNil(o.Logs) { - return true - } - - return false -} - -// SetLogs gets a reference to the given []interface{} and assigns it to the Logs field. -func (o *Web3TransactionReceipt) SetLogs(v []interface{}) { - o.Logs = v -} - -// GetLogsBloom returns the LogsBloom field value if set, zero value otherwise. -func (o *Web3TransactionReceipt) GetLogsBloom() string { - if o == nil || IsNil(o.LogsBloom) { - var ret string - return ret - } - return *o.LogsBloom -} - -// GetLogsBloomOk returns a tuple with the LogsBloom field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetLogsBloomOk() (*string, bool) { - if o == nil || IsNil(o.LogsBloom) { - return nil, false - } - return o.LogsBloom, true -} - -// HasLogsBloom returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasLogsBloom() bool { - if o != nil && !IsNil(o.LogsBloom) { - return true - } - - return false -} - -// SetLogsBloom gets a reference to the given string and assigns it to the LogsBloom field. -func (o *Web3TransactionReceipt) SetLogsBloom(v string) { - o.LogsBloom = &v -} - -// GetRevertReason returns the RevertReason field value if set, zero value otherwise. -func (o *Web3TransactionReceipt) GetRevertReason() string { - if o == nil || IsNil(o.RevertReason) { - var ret string - return ret - } - return *o.RevertReason -} - -// GetRevertReasonOk returns a tuple with the RevertReason field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetRevertReasonOk() (*string, bool) { - if o == nil || IsNil(o.RevertReason) { - return nil, false - } - return o.RevertReason, true -} - -// HasRevertReason returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasRevertReason() bool { - if o != nil && !IsNil(o.RevertReason) { - return true - } - - return false -} - -// SetRevertReason gets a reference to the given string and assigns it to the RevertReason field. -func (o *Web3TransactionReceipt) SetRevertReason(v string) { - o.RevertReason = &v -} - -// GetOutput returns the Output field value if set, zero value otherwise. -func (o *Web3TransactionReceipt) GetOutput() string { - if o == nil || IsNil(o.Output) { - var ret string - return ret - } - return *o.Output -} - -// GetOutputOk returns a tuple with the Output field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetOutputOk() (*string, bool) { - if o == nil || IsNil(o.Output) { - return nil, false - } - return o.Output, true -} - -// HasOutput returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasOutput() bool { - if o != nil && !IsNil(o.Output) { - return true - } - - return false -} - -// SetOutput gets a reference to the given string and assigns it to the Output field. -func (o *Web3TransactionReceipt) SetOutput(v string) { - o.Output = &v -} - -// GetCommitmentHash returns the CommitmentHash field value if set, zero value otherwise. -func (o *Web3TransactionReceipt) GetCommitmentHash() string { - if o == nil || IsNil(o.CommitmentHash) { - var ret string - return ret - } - return *o.CommitmentHash -} - -// GetCommitmentHashOk returns a tuple with the CommitmentHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetCommitmentHashOk() (*string, bool) { - if o == nil || IsNil(o.CommitmentHash) { - return nil, false - } - return o.CommitmentHash, true -} - -// HasCommitmentHash returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasCommitmentHash() bool { - if o != nil && !IsNil(o.CommitmentHash) { - return true - } - - return false -} - -// SetCommitmentHash gets a reference to the given string and assigns it to the CommitmentHash field. -func (o *Web3TransactionReceipt) SetCommitmentHash(v string) { - o.CommitmentHash = &v -} - -// GetCumulativeGasUsed returns the CumulativeGasUsed field value if set, zero value otherwise. -func (o *Web3TransactionReceipt) GetCumulativeGasUsed() string { - if o == nil || IsNil(o.CumulativeGasUsed) { - var ret string - return ret - } - return *o.CumulativeGasUsed -} - -// GetCumulativeGasUsedOk returns a tuple with the CumulativeGasUsed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetCumulativeGasUsedOk() (*string, bool) { - if o == nil || IsNil(o.CumulativeGasUsed) { - return nil, false - } - return o.CumulativeGasUsed, true -} - -// HasCumulativeGasUsed returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasCumulativeGasUsed() bool { - if o != nil && !IsNil(o.CumulativeGasUsed) { - return true - } - - return false -} - -// SetCumulativeGasUsed gets a reference to the given string and assigns it to the CumulativeGasUsed field. -func (o *Web3TransactionReceipt) SetCumulativeGasUsed(v string) { - o.CumulativeGasUsed = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *Web3TransactionReceipt) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *Web3TransactionReceipt) SetType(v string) { - o.Type = &v -} - -func (o Web3TransactionReceipt) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3TransactionReceipt) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["status"] = o.Status - toSerialize["transactionHash"] = o.TransactionHash - toSerialize["transactionIndex"] = o.TransactionIndex - toSerialize["blockHash"] = o.BlockHash - toSerialize["blockNumber"] = o.BlockNumber - toSerialize["gasUsed"] = o.GasUsed - if !IsNil(o.EffectiveGasPrice) { - toSerialize["effectiveGasPrice"] = o.EffectiveGasPrice - } - if o.ContractAddress.IsSet() { - toSerialize["contractAddress"] = o.ContractAddress.Get() - } - toSerialize["from"] = o.From - toSerialize["to"] = o.To - if !IsNil(o.Logs) { - toSerialize["logs"] = o.Logs - } - if !IsNil(o.LogsBloom) { - toSerialize["logsBloom"] = o.LogsBloom - } - if !IsNil(o.RevertReason) { - toSerialize["revertReason"] = o.RevertReason - } - if !IsNil(o.Output) { - toSerialize["output"] = o.Output - } - if !IsNil(o.CommitmentHash) { - toSerialize["commitmentHash"] = o.CommitmentHash - } - if !IsNil(o.CumulativeGasUsed) { - toSerialize["cumulativeGasUsed"] = o.CumulativeGasUsed - } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Web3TransactionReceipt) UnmarshalJSON(bytes []byte) (err error) { - varWeb3TransactionReceipt := _Web3TransactionReceipt{} - - if err = json.Unmarshal(bytes, &varWeb3TransactionReceipt); err == nil { - *o = Web3TransactionReceipt(varWeb3TransactionReceipt) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "status") - delete(additionalProperties, "transactionHash") - delete(additionalProperties, "transactionIndex") - delete(additionalProperties, "blockHash") - delete(additionalProperties, "blockNumber") - delete(additionalProperties, "gasUsed") - delete(additionalProperties, "effectiveGasPrice") - delete(additionalProperties, "contractAddress") - delete(additionalProperties, "from") - delete(additionalProperties, "to") - delete(additionalProperties, "logs") - delete(additionalProperties, "logsBloom") - delete(additionalProperties, "revertReason") - delete(additionalProperties, "output") - delete(additionalProperties, "commitmentHash") - delete(additionalProperties, "cumulativeGasUsed") - delete(additionalProperties, "type") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableWeb3TransactionReceipt struct { - value *Web3TransactionReceipt - isSet bool -} - -func (v NullableWeb3TransactionReceipt) Get() *Web3TransactionReceipt { - return v.value -} - -func (v *NullableWeb3TransactionReceipt) Set(val *Web3TransactionReceipt) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3TransactionReceipt) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3TransactionReceipt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3TransactionReceipt(val *Web3TransactionReceipt) *NullableWeb3TransactionReceipt { - return &NullableWeb3TransactionReceipt{value: val, isSet: true} -} - -func (v NullableWeb3TransactionReceipt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3TransactionReceipt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 989dfb23db..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 0529f5ad07..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-ledger-connector-ethereum - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-ledger-connector-ethereum_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeployContract", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeployContract(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetricsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetricsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService InvokeContractV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.InvokeContractV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService InvokeRawWeb3EthContractV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.InvokeRawWeb3EthContractV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService InvokeWeb3EthMethodV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.InvokeWeb3EthMethodV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RunTransactionV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.RunTransactionV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index e743778a46..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Ethereum - -Can perform basic tasks on a Ethereum ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-ethereum - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.json deleted file mode 100644 index a514e73364..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.json +++ /dev/null @@ -1,1162 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector Ethereum", - "description": "Can perform basic tasks on a Ethereum ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "Web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialGethKeychainPassword" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialCactiKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialPrivateKeyHex" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialGethKeychainPassword": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 66, - "maxLength": 66, - "nullable": false - }, - "secret": { - "type": "string", - "description": "A geth keychain unlock password.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialCactiKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 66, - "maxLength": 66, - "nullable": false - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialPrivateKeyHex": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 66, - "maxLength": 66, - "nullable": false - }, - "secret": { - "type": "string", - "description": "The HEX encoded private key of an eth account.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": [ - "CACTI_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE" - ] - }, - "EthContractInvocationType": { - "type": "string", - "enum": ["SEND", "CALL"] - }, - "EthContractInvocationWeb3Method": { - "type": "string", - "enum": ["send", "call", "encodeABI", "estimateGas"] - }, - "GasTransactionConfigLegacy": { - "type": "object", - "description": "Transaction gas settings in networks before EIP-1559 (London fork).", - "required": [], - "properties": { - "gas": { - "type": "string", - "description": "A maximum amount of gas a user is willing to provide for the execution of the transaction. (gasLimit)" - }, - "gasPrice": { - "type": "string", - "description": "A price (in Wei) a user is willing to pay for each unit of gas used during the execution of the transaction. In EIP-1559 (London fork) networks, it will be set as both maxFeePerGas and maxPriorityFeePerGas." - } - } - }, - "GasTransactionConfigEIP1559": { - "type": "object", - "description": "Transaction gas settings in networks after EIP-1559 (London fork).", - "required": [], - "properties": { - "gasLimit": { - "type": "string", - "description": "A maximum amount of gas a user is willing to provide for the execution of the transaction.", - "nullable": false - }, - "maxFeePerGas": { - "type": "string", - "description": "A maximum fee (including the base fee and the tip) a user is willing to pay per unit of gas.", - "nullable": false - }, - "maxPriorityFeePerGas": { - "type": "string", - "description": "A maximum tip amount a user is willing to pay per unit of gas.", - "nullable": false - } - } - }, - "GasTransactionConfig": { - "type": "object", - "description": "Transaction gas settings.", - "required": [], - "oneOf": [ - { - "$ref": "#/components/schemas/GasTransactionConfigLegacy" - }, - { - "$ref": "#/components/schemas/GasTransactionConfigEIP1559" - } - ] - }, - "EthereumTransactionConfig": { - "type": "object", - "required": [], - "properties": { - "rawTransaction": { - "type": "string", - "nullable": false - }, - "from": { - "type": "string" - }, - "to": { - "type": "string" - }, - "value": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "data": { - "type": "string" - }, - "gasConfig": { - "$ref": "#/components/schemas/GasTransactionConfig" - } - } - }, - "Web3TransactionReceipt": { - "type": "object", - "required": [ - "blockHash", - "blockNumber", - "transactionHash", - "transactionIndex", - "status", - "from", - "to", - "gasUsed" - ], - "additionalProperties": true, - "properties": { - "status": { - "type": "boolean", - "nullable": false - }, - "transactionHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "transactionIndex": { - "type": "string", - "nullable": false - }, - "blockHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "blockNumber": { - "type": "string", - "nullable": false - }, - "gasUsed": { - "type": "string", - "nullable": false - }, - "effectiveGasPrice": { - "type": "string", - "nullable": false - }, - "contractAddress": { - "type": "string", - "nullable": true - }, - "from": { - "type": "string", - "nullable": false - }, - "to": { - "type": "string", - "nullable": false - }, - "logs": { - "type": "array", - "default": [], - "items": {}, - "nullable": false - }, - "logsBloom": { - "type": "string", - "nullable": false - }, - "revertReason": { - "type": "string", - "nullable": false - }, - "output": { - "type": "string", - "nullable": false - }, - "commitmentHash": { - "type": "string", - "nullable": false - }, - "cumulativeGasUsed": { - "type": "string", - "nullable": false - }, - "type": { - "type": "string", - "nullable": false - } - } - }, - "ContractJSON": { - "type": "object", - "required": ["contractName", "bytecode", "abi"], - "additionalProperties": true, - "properties": { - "contractName": { - "type": "string", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 24576, - "description": "See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode" - }, - "abi": { - "description": "The application binary interface of the solidity contract, optional parameter", - "type": "array", - "items": {}, - "nullable": false - }, - "metadata": { - "type": "string" - }, - "deployedBytecode": { - "type": "string" - }, - "sourceMap": { - "type": "string" - }, - "deployedSourceMap": { - "type": "string" - }, - "sourcePath": { - "type": "string" - }, - "compiler": { - "type": "object" - }, - "networks": { - "type": "object" - }, - "ast": { - "type": "object" - }, - "functionHashes": { - "type": "object" - }, - "gasEstimates": { - "type": "object" - } - } - }, - "ContractJsonDefinition": { - "type": "object", - "required": ["contractJSON"], - "additionalProperties": false, - "properties": { - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON" - } - } - }, - "DeployedContractJsonDefinition": { - "type": "object", - "required": ["contractJSON", "contractAddress"], - "additionalProperties": false, - "properties": { - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON" - }, - "contractAddress": { - "type": "string", - "nullable": false - } - } - }, - "ContractKeychainDefinition": { - "type": "object", - "required": ["contractName", "keychainId"], - "additionalProperties": false, - "properties": { - "contractName": { - "type": "string", - "description": "The contract name for retrieve the contracts json on the keychain.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "keychainId": { - "type": "string", - "description": "The keychainId for retrieve the contracts json.", - "minLength": 1, - "maxLength": 100, - "nullable": false - } - } - }, - "RunTransactionRequest": { - "type": "object", - "required": ["web3SigningCredential", "transactionConfig"], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "transactionConfig": { - "$ref": "#/components/schemas/EthereumTransactionConfig" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with thehash of the transaction(which indicates successful execution) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - } - } - }, - "RunTransactionResponse": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "DeployContractV1Request": { - "type": "object", - "required": ["web3SigningCredential", "contract"], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "contract": { - "oneOf": [ - { - "$ref": "#/components/schemas/ContractJsonDefinition" - }, - { - "$ref": "#/components/schemas/ContractKeychainDefinition" - } - ], - "nullable": false - }, - "constructorArgs": { - "description": "The list of arguments to pass in to the constructor of the contract being deployed.", - "type": "array", - "default": [], - "items": {} - }, - "gasConfig": { - "$ref": "#/components/schemas/GasTransactionConfig" - }, - "value": { - "type": "string", - "description": "Ether balance to send on deployment.", - "nullable": false - } - } - }, - "InvokeContractV1Request": { - "type": "object", - "required": ["contract", "methodName", "params", "invocationType"], - "additionalProperties": false, - "properties": { - "contract": { - "oneOf": [ - { - "$ref": "#/components/schemas/DeployedContractJsonDefinition" - }, - { - "$ref": "#/components/schemas/ContractKeychainDefinition" - } - ] - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": {} - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationType" - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "gasConfig": { - "$ref": "#/components/schemas/GasTransactionConfig" - }, - "value": { - "type": "string" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt before returning an error. Only has any effect if the invocation type is SEND", - "minimum": 0, - "default": 60000, - "nullable": false - } - } - }, - "InvokeContractV1Response": { - "type": "object", - "required": ["success"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - }, - "callOutput": {}, - "success": { - "type": "boolean", - "nullable": false - } - } - }, - "InvokeRawWeb3EthMethodV1Request": { - "type": "object", - "required": ["methodName"], - "additionalProperties": false, - "properties": { - "methodName": { - "description": "The name of the web3.eth method to invoke", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass to web3.eth method specified in methodName", - "type": "array", - "default": [], - "items": {} - } - } - }, - "InvokeRawWeb3EthMethodV1Response": { - "type": "object", - "required": ["status"], - "additionalProperties": false, - "properties": { - "status": { - "type": "number", - "nullable": false, - "description": "Status code of the operation" - }, - "data": { - "description": "Output of requested web3.eth method" - }, - "errorDetail": { - "type": "string", - "nullable": false, - "description": "Error details" - } - } - }, - "InvokeRawWeb3EthContractV1Request": { - "type": "object", - "required": ["abi", "address", "invocationType", "contractMethod"], - "additionalProperties": false, - "properties": { - "abi": { - "description": "The application binary interface of the solidity contract" - }, - "address": { - "description": "Deployed solidity contract address", - "type": "string" - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationWeb3Method" - }, - "invocationParams": { - "description": "The list of arguments for contract invocation method (send, call, etc...)", - "type": "object", - "default": {} - }, - "contractMethod": { - "description": "Method of deployed solidity contract to execute", - "type": "string" - }, - "contractMethodArgs": { - "description": "The list of arguments for deployed solidity contract method", - "type": "array", - "default": [], - "items": {} - } - } - }, - "InvokeRawWeb3EthContractV1Response": { - "type": "object", - "required": ["status"], - "additionalProperties": false, - "properties": { - "status": { - "description": "Status code of the operation", - "type": "number" - }, - "data": { - "description": "Output of contract invocation method" - }, - "errorDetail": { - "description": "Error details", - "type": "string" - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "WatchBlocksV1": { - "type": "string", - "enum": [ - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Subscribe", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Next", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Error", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchBlocksV1Options": { - "type": "object", - "properties": { - "getBlockData": { - "type": "boolean", - "description": "Include entire block data if flag is true, otherwise just a header is returned (default)", - "default": "false" - }, - "lastSeenBlock": { - "type": "number", - "description": "Block from which we want to start the monitoring process.", - "default": "latest" - }, - "httpPollInterval": { - "type": "number", - "description": "How often to poll ethereum node for new blocks. Not used if the node supports subscription based monitoring (i.e. WebSocket).", - "default": "5 seconds" - } - } - }, - "Web3BlockHeader": { - "type": "object", - "required": ["sha3Uncles", "transactionRoot", "gasLimit", "gasUsed"], - "properties": { - "number": { - "type": "string" - }, - "parentHash": { - "type": "string" - }, - "sha3Uncles": { - "type": "string" - }, - "transactionsRoot": { - "type": "string" - }, - "receiptsRoot": { - "type": "string" - }, - "difficulty": { - "type": "string" - }, - "mixHash": { - "type": "string" - }, - "miner": { - "type": "string" - }, - "gasLimit": { - "type": "string" - }, - "gasUsed": { - "type": "string" - }, - "stateRoot": { - "type": "string" - }, - "logsBloom": { - "type": "string" - }, - "extraData": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "timestamp": { - "type": "string" - } - } - }, - "Web3Transaction": { - "type": "object", - "required": [ - "hash", - "nonce", - "blockHash", - "blockNumber", - "transactionIndex", - "from", - "to", - "value", - "gasPrice", - "gas", - "input", - "type", - "chainId" - ], - "properties": { - "hash": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "blockHash": { - "type": "string" - }, - "blockNumber": { - "type": "string" - }, - "transactionIndex": { - "type": "string" - }, - "from": { - "type": "string" - }, - "to": { - "type": "string" - }, - "value": { - "type": "string" - }, - "gasPrice": { - "type": "string" - }, - "gas": { - "type": "string" - }, - "input": { - "type": "string" - }, - "type": { - "type": "string" - }, - "chainId": { - "type": "string" - }, - "v": { - "type": "string" - }, - "r": { - "type": "string" - }, - "s": { - "type": "string" - } - } - }, - "WatchBlocksV1BlockData": { - "type": "object", - "required": [ - "number", - "parentHash", - "nonce", - "sha3Uncles", - "transactionRoot", - "stateRoot", - "receiptRoot", - "miner", - "extraData", - "gasLimit", - "gasUsed", - "timestamp", - "size", - "totalDifficulty", - "uncles", - "transactions" - ], - "properties": { - "number": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "parentHash": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "sha3Uncles": { - "type": "string" - }, - "logsBloom": { - "type": "string" - }, - "transactionsRoot": { - "type": "string" - }, - "stateRoot": { - "type": "string" - }, - "receiptsRoot": { - "type": "string" - }, - "difficulty": { - "type": "string" - }, - "mixHash": { - "type": "string" - }, - "miner": { - "type": "string" - }, - "extraData": { - "type": "string" - }, - "gasLimit": { - "type": "string" - }, - "gasUsed": { - "type": "string" - }, - "timestamp": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "size": { - "type": "string" - }, - "totalDifficulty": { - "type": "string" - }, - "uncles": { - "type": "array", - "items": { - "type": "string" - } - }, - "baseFeePerGas": { - "type": "string" - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Web3Transaction" - } - } - } - }, - "WatchBlocksV1Progress": { - "type": "object", - "properties": { - "blockHeader": { - "$ref": "#/components/schemas/Web3BlockHeader" - }, - "blockData": { - "$ref": "#/components/schemas/WatchBlocksV1BlockData" - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "description": "Error response from the connector.", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "description": "Short error description message.", - "nullable": false - }, - "error": { - "type": "string", - "description": "Detailed error information.", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract" - } - }, - "operationId": "deployContract", - "summary": "Deploys the contract to ethereum ledger.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction" - } - }, - "operationId": "runTransactionV1", - "summary": "Executes a transaction on a ethereum ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract" - } - }, - "operationId": "invokeContractV1", - "summary": "Invokes a contract on an ethereum ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method" - } - }, - "operationId": "invokeWeb3EthMethodV1", - "summary": "Invoke any method from web3.eth (low-level)", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeRawWeb3EthMethodV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/InvokeRawWeb3EthMethodV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract" - } - }, - "operationId": "invokeRawWeb3EthContractV1", - "summary": "Low-level endpoint to invoke a method on deployed contract.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeRawWeb3EthContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/InvokeRawWeb3EthContractV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/json-rpc": { - "summary": "Proxy endpoint to pass JSON-RPC requests to remote ethereum node." - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.tpl.json deleted file mode 100644 index a514e73364..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,1162 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector Ethereum", - "description": "Can perform basic tasks on a Ethereum ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "Web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialGethKeychainPassword" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialCactiKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialPrivateKeyHex" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialGethKeychainPassword": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 66, - "maxLength": 66, - "nullable": false - }, - "secret": { - "type": "string", - "description": "A geth keychain unlock password.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialCactiKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 66, - "maxLength": 66, - "nullable": false - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialPrivateKeyHex": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 66, - "maxLength": 66, - "nullable": false - }, - "secret": { - "type": "string", - "description": "The HEX encoded private key of an eth account.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": [ - "CACTI_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE" - ] - }, - "EthContractInvocationType": { - "type": "string", - "enum": ["SEND", "CALL"] - }, - "EthContractInvocationWeb3Method": { - "type": "string", - "enum": ["send", "call", "encodeABI", "estimateGas"] - }, - "GasTransactionConfigLegacy": { - "type": "object", - "description": "Transaction gas settings in networks before EIP-1559 (London fork).", - "required": [], - "properties": { - "gas": { - "type": "string", - "description": "A maximum amount of gas a user is willing to provide for the execution of the transaction. (gasLimit)" - }, - "gasPrice": { - "type": "string", - "description": "A price (in Wei) a user is willing to pay for each unit of gas used during the execution of the transaction. In EIP-1559 (London fork) networks, it will be set as both maxFeePerGas and maxPriorityFeePerGas." - } - } - }, - "GasTransactionConfigEIP1559": { - "type": "object", - "description": "Transaction gas settings in networks after EIP-1559 (London fork).", - "required": [], - "properties": { - "gasLimit": { - "type": "string", - "description": "A maximum amount of gas a user is willing to provide for the execution of the transaction.", - "nullable": false - }, - "maxFeePerGas": { - "type": "string", - "description": "A maximum fee (including the base fee and the tip) a user is willing to pay per unit of gas.", - "nullable": false - }, - "maxPriorityFeePerGas": { - "type": "string", - "description": "A maximum tip amount a user is willing to pay per unit of gas.", - "nullable": false - } - } - }, - "GasTransactionConfig": { - "type": "object", - "description": "Transaction gas settings.", - "required": [], - "oneOf": [ - { - "$ref": "#/components/schemas/GasTransactionConfigLegacy" - }, - { - "$ref": "#/components/schemas/GasTransactionConfigEIP1559" - } - ] - }, - "EthereumTransactionConfig": { - "type": "object", - "required": [], - "properties": { - "rawTransaction": { - "type": "string", - "nullable": false - }, - "from": { - "type": "string" - }, - "to": { - "type": "string" - }, - "value": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "data": { - "type": "string" - }, - "gasConfig": { - "$ref": "#/components/schemas/GasTransactionConfig" - } - } - }, - "Web3TransactionReceipt": { - "type": "object", - "required": [ - "blockHash", - "blockNumber", - "transactionHash", - "transactionIndex", - "status", - "from", - "to", - "gasUsed" - ], - "additionalProperties": true, - "properties": { - "status": { - "type": "boolean", - "nullable": false - }, - "transactionHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "transactionIndex": { - "type": "string", - "nullable": false - }, - "blockHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "blockNumber": { - "type": "string", - "nullable": false - }, - "gasUsed": { - "type": "string", - "nullable": false - }, - "effectiveGasPrice": { - "type": "string", - "nullable": false - }, - "contractAddress": { - "type": "string", - "nullable": true - }, - "from": { - "type": "string", - "nullable": false - }, - "to": { - "type": "string", - "nullable": false - }, - "logs": { - "type": "array", - "default": [], - "items": {}, - "nullable": false - }, - "logsBloom": { - "type": "string", - "nullable": false - }, - "revertReason": { - "type": "string", - "nullable": false - }, - "output": { - "type": "string", - "nullable": false - }, - "commitmentHash": { - "type": "string", - "nullable": false - }, - "cumulativeGasUsed": { - "type": "string", - "nullable": false - }, - "type": { - "type": "string", - "nullable": false - } - } - }, - "ContractJSON": { - "type": "object", - "required": ["contractName", "bytecode", "abi"], - "additionalProperties": true, - "properties": { - "contractName": { - "type": "string", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 24576, - "description": "See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode" - }, - "abi": { - "description": "The application binary interface of the solidity contract, optional parameter", - "type": "array", - "items": {}, - "nullable": false - }, - "metadata": { - "type": "string" - }, - "deployedBytecode": { - "type": "string" - }, - "sourceMap": { - "type": "string" - }, - "deployedSourceMap": { - "type": "string" - }, - "sourcePath": { - "type": "string" - }, - "compiler": { - "type": "object" - }, - "networks": { - "type": "object" - }, - "ast": { - "type": "object" - }, - "functionHashes": { - "type": "object" - }, - "gasEstimates": { - "type": "object" - } - } - }, - "ContractJsonDefinition": { - "type": "object", - "required": ["contractJSON"], - "additionalProperties": false, - "properties": { - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON" - } - } - }, - "DeployedContractJsonDefinition": { - "type": "object", - "required": ["contractJSON", "contractAddress"], - "additionalProperties": false, - "properties": { - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON" - }, - "contractAddress": { - "type": "string", - "nullable": false - } - } - }, - "ContractKeychainDefinition": { - "type": "object", - "required": ["contractName", "keychainId"], - "additionalProperties": false, - "properties": { - "contractName": { - "type": "string", - "description": "The contract name for retrieve the contracts json on the keychain.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "keychainId": { - "type": "string", - "description": "The keychainId for retrieve the contracts json.", - "minLength": 1, - "maxLength": 100, - "nullable": false - } - } - }, - "RunTransactionRequest": { - "type": "object", - "required": ["web3SigningCredential", "transactionConfig"], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "transactionConfig": { - "$ref": "#/components/schemas/EthereumTransactionConfig" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with thehash of the transaction(which indicates successful execution) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - } - } - }, - "RunTransactionResponse": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "DeployContractV1Request": { - "type": "object", - "required": ["web3SigningCredential", "contract"], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "contract": { - "oneOf": [ - { - "$ref": "#/components/schemas/ContractJsonDefinition" - }, - { - "$ref": "#/components/schemas/ContractKeychainDefinition" - } - ], - "nullable": false - }, - "constructorArgs": { - "description": "The list of arguments to pass in to the constructor of the contract being deployed.", - "type": "array", - "default": [], - "items": {} - }, - "gasConfig": { - "$ref": "#/components/schemas/GasTransactionConfig" - }, - "value": { - "type": "string", - "description": "Ether balance to send on deployment.", - "nullable": false - } - } - }, - "InvokeContractV1Request": { - "type": "object", - "required": ["contract", "methodName", "params", "invocationType"], - "additionalProperties": false, - "properties": { - "contract": { - "oneOf": [ - { - "$ref": "#/components/schemas/DeployedContractJsonDefinition" - }, - { - "$ref": "#/components/schemas/ContractKeychainDefinition" - } - ] - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": {} - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationType" - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential" - }, - "gasConfig": { - "$ref": "#/components/schemas/GasTransactionConfig" - }, - "value": { - "type": "string" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt before returning an error. Only has any effect if the invocation type is SEND", - "minimum": 0, - "default": 60000, - "nullable": false - } - } - }, - "InvokeContractV1Response": { - "type": "object", - "required": ["success"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - }, - "callOutput": {}, - "success": { - "type": "boolean", - "nullable": false - } - } - }, - "InvokeRawWeb3EthMethodV1Request": { - "type": "object", - "required": ["methodName"], - "additionalProperties": false, - "properties": { - "methodName": { - "description": "The name of the web3.eth method to invoke", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass to web3.eth method specified in methodName", - "type": "array", - "default": [], - "items": {} - } - } - }, - "InvokeRawWeb3EthMethodV1Response": { - "type": "object", - "required": ["status"], - "additionalProperties": false, - "properties": { - "status": { - "type": "number", - "nullable": false, - "description": "Status code of the operation" - }, - "data": { - "description": "Output of requested web3.eth method" - }, - "errorDetail": { - "type": "string", - "nullable": false, - "description": "Error details" - } - } - }, - "InvokeRawWeb3EthContractV1Request": { - "type": "object", - "required": ["abi", "address", "invocationType", "contractMethod"], - "additionalProperties": false, - "properties": { - "abi": { - "description": "The application binary interface of the solidity contract" - }, - "address": { - "description": "Deployed solidity contract address", - "type": "string" - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationWeb3Method" - }, - "invocationParams": { - "description": "The list of arguments for contract invocation method (send, call, etc...)", - "type": "object", - "default": {} - }, - "contractMethod": { - "description": "Method of deployed solidity contract to execute", - "type": "string" - }, - "contractMethodArgs": { - "description": "The list of arguments for deployed solidity contract method", - "type": "array", - "default": [], - "items": {} - } - } - }, - "InvokeRawWeb3EthContractV1Response": { - "type": "object", - "required": ["status"], - "additionalProperties": false, - "properties": { - "status": { - "description": "Status code of the operation", - "type": "number" - }, - "data": { - "description": "Output of contract invocation method" - }, - "errorDetail": { - "description": "Error details", - "type": "string" - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "WatchBlocksV1": { - "type": "string", - "enum": [ - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Subscribe", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Next", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Error", - "org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchBlocksV1Options": { - "type": "object", - "properties": { - "getBlockData": { - "type": "boolean", - "description": "Include entire block data if flag is true, otherwise just a header is returned (default)", - "default": "false" - }, - "lastSeenBlock": { - "type": "number", - "description": "Block from which we want to start the monitoring process.", - "default": "latest" - }, - "httpPollInterval": { - "type": "number", - "description": "How often to poll ethereum node for new blocks. Not used if the node supports subscription based monitoring (i.e. WebSocket).", - "default": "5 seconds" - } - } - }, - "Web3BlockHeader": { - "type": "object", - "required": ["sha3Uncles", "transactionRoot", "gasLimit", "gasUsed"], - "properties": { - "number": { - "type": "string" - }, - "parentHash": { - "type": "string" - }, - "sha3Uncles": { - "type": "string" - }, - "transactionsRoot": { - "type": "string" - }, - "receiptsRoot": { - "type": "string" - }, - "difficulty": { - "type": "string" - }, - "mixHash": { - "type": "string" - }, - "miner": { - "type": "string" - }, - "gasLimit": { - "type": "string" - }, - "gasUsed": { - "type": "string" - }, - "stateRoot": { - "type": "string" - }, - "logsBloom": { - "type": "string" - }, - "extraData": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "timestamp": { - "type": "string" - } - } - }, - "Web3Transaction": { - "type": "object", - "required": [ - "hash", - "nonce", - "blockHash", - "blockNumber", - "transactionIndex", - "from", - "to", - "value", - "gasPrice", - "gas", - "input", - "type", - "chainId" - ], - "properties": { - "hash": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "blockHash": { - "type": "string" - }, - "blockNumber": { - "type": "string" - }, - "transactionIndex": { - "type": "string" - }, - "from": { - "type": "string" - }, - "to": { - "type": "string" - }, - "value": { - "type": "string" - }, - "gasPrice": { - "type": "string" - }, - "gas": { - "type": "string" - }, - "input": { - "type": "string" - }, - "type": { - "type": "string" - }, - "chainId": { - "type": "string" - }, - "v": { - "type": "string" - }, - "r": { - "type": "string" - }, - "s": { - "type": "string" - } - } - }, - "WatchBlocksV1BlockData": { - "type": "object", - "required": [ - "number", - "parentHash", - "nonce", - "sha3Uncles", - "transactionRoot", - "stateRoot", - "receiptRoot", - "miner", - "extraData", - "gasLimit", - "gasUsed", - "timestamp", - "size", - "totalDifficulty", - "uncles", - "transactions" - ], - "properties": { - "number": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "parentHash": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "sha3Uncles": { - "type": "string" - }, - "logsBloom": { - "type": "string" - }, - "transactionsRoot": { - "type": "string" - }, - "stateRoot": { - "type": "string" - }, - "receiptsRoot": { - "type": "string" - }, - "difficulty": { - "type": "string" - }, - "mixHash": { - "type": "string" - }, - "miner": { - "type": "string" - }, - "extraData": { - "type": "string" - }, - "gasLimit": { - "type": "string" - }, - "gasUsed": { - "type": "string" - }, - "timestamp": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "size": { - "type": "string" - }, - "totalDifficulty": { - "type": "string" - }, - "uncles": { - "type": "array", - "items": { - "type": "string" - } - }, - "baseFeePerGas": { - "type": "string" - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Web3Transaction" - } - } - } - }, - "WatchBlocksV1Progress": { - "type": "object", - "properties": { - "blockHeader": { - "$ref": "#/components/schemas/Web3BlockHeader" - }, - "blockData": { - "$ref": "#/components/schemas/WatchBlocksV1BlockData" - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "description": "Error response from the connector.", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "description": "Short error description message.", - "nullable": false - }, - "error": { - "type": "string", - "description": "Detailed error information.", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract" - } - }, - "operationId": "deployContract", - "summary": "Deploys the contract to ethereum ledger.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction" - } - }, - "operationId": "runTransactionV1", - "summary": "Executes a transaction on a ethereum ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract" - } - }, - "operationId": "invokeContractV1", - "summary": "Invokes a contract on an ethereum ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method" - } - }, - "operationId": "invokeWeb3EthMethodV1", - "summary": "Invoke any method from web3.eth (low-level)", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeRawWeb3EthMethodV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/InvokeRawWeb3EthMethodV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract" - } - }, - "operationId": "invokeRawWeb3EthContractV1", - "summary": "Low-level endpoint to invoke a method on deployed contract.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeRawWeb3EthContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/InvokeRawWeb3EthContractV1Response" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/json-rpc": { - "summary": "Proxy endpoint to pass JSON-RPC requests to remote ethereum node." - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/api-client/ethereum-api-client.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/api-client/ethereum-api-client.ts deleted file mode 100644 index 8254f954ba..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/api-client/ethereum-api-client.ts +++ /dev/null @@ -1,256 +0,0 @@ -import { Observable, ReplaySubject } from "rxjs"; -import { finalize } from "rxjs/operators"; -import { io } from "socket.io-client-fixed-types"; -import { Logger, Checks } from "@hyperledger/cactus-common"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { Constants, ISocketApiClient } from "@hyperledger/cactus-core-api"; -import { - DefaultApi, - EthContractInvocationWeb3Method, - InvokeRawWeb3EthContractV1Request, - WatchBlocksV1, - WatchBlocksV1Options, - WatchBlocksV1Progress, -} from "../generated/openapi/typescript-axios"; -import { Configuration } from "../generated/openapi/typescript-axios/configuration"; -import { ContractAbi } from "web3"; - -export class EthereumApiClientOptions extends Configuration { - readonly logLevel?: LogLevelDesc; - readonly wsApiHost?: string; - readonly wsApiPath?: string; -} - -// Command 'web3Eth' input method type -export type EthereumRequestInputWeb3EthMethod = { - type: "web3Eth"; - command: string; -}; - -// Command 'web3EthContract' input method type -export type EthereumRequestInputWeb3EthContractMethod = { - type: "web3EthContract"; - command: EthContractInvocationWeb3Method; - function: string; - params?: any[]; -}; - -// Common input types for sending requests -export type EthereumRequestInputContract = { - abi?: ContractAbi; - address?: string; -}; -export type EthereumRequestInputMethod = - | EthereumRequestInputWeb3EthMethod - | EthereumRequestInputWeb3EthContractMethod; -export type EthereumRequestInputArgs = { - args?: any[] | Record; -}; - -export class EthereumApiClient - extends DefaultApi - implements ISocketApiClient -{ - public static readonly CLASS_NAME = "EthereumApiClient"; - - private readonly log: Logger; - private readonly wsApiHost: string; - private readonly wsApiPath: string; - - public get className(): string { - return EthereumApiClient.CLASS_NAME; - } - - constructor(public readonly options: EthereumApiClientOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.wsApiHost = options.wsApiHost || options.basePath || location.host; - this.wsApiPath = options.wsApiPath || Constants.SocketIoConnectionPathV1; - this.log.debug(`Created ${this.className} OK.`); - this.log.debug(`wsApiHost=${this.wsApiHost}`); - this.log.debug(`wsApiPath=${this.wsApiPath}`); - this.log.debug(`basePath=${this.options.basePath}`); - } - - public watchBlocksV1( - options?: WatchBlocksV1Options, - ): Observable { - const socket = io(this.wsApiHost, { path: this.wsApiPath }); - const subject = new ReplaySubject(0); - - socket.on(WatchBlocksV1.Next, (data: WatchBlocksV1Progress) => { - this.log.debug("Received WatchBlocksV1.Next"); - subject.next(data); - }); - - socket.on(WatchBlocksV1.Error, (ex: string) => { - this.log.warn("Received WatchBlocksV1.Error:", ex); - subject.error(ex); - }); - - socket.on(WatchBlocksV1.Complete, () => { - this.log.debug("Received WatchBlocksV1.Complete"); - subject.complete(); - }); - - socket.on("connect", () => { - this.log.info("Connected OK, sending WatchBlocksV1.Subscribe request..."); - socket.emit(WatchBlocksV1.Subscribe, options); - }); - - socket.connect(); - - return subject.pipe( - finalize(() => { - this.log.info("FINALIZE - unsubscribing from the stream..."); - socket.emit(WatchBlocksV1.Unsubscribe); - socket.close(); - }), - ); - } - - /** - * Immediately sends request to the validator, doesn't report any error or responses. - * @param contract - contract to execute on the ledger. - * @param method - function / method to be executed by validator. - * @param args - arguments. - * @note Internally, it's just a wrapper around sendSyncRequest, but handles the promise resolution seamlessly. - * @deprecated Use EthereumApiClient REST calls directly. - */ - public sendAsyncRequest( - contract: EthereumRequestInputContract, - method: EthereumRequestInputMethod, - args: EthereumRequestInputArgs, - ): void { - const callName = `${method.type} - ${method.command}`; - this.log.debug("sendAsyncRequest()", callName); - - this.sendSyncRequest(contract, method, args) - .then((value) => { - this.log.info(`sendAsyncRequest call resolved (${callName})`); - this.log.debug("sendAsyncRequest results:", JSON.stringify(value)); - }) - .catch((err) => { - this.log.warn(`sendAsyncRequest failed (${callName}). Error:`, err); - }); - } - - private sendWeb3EthRequest( - method: EthereumRequestInputWeb3EthMethod, - args?: any[], - ): Promise { - return new Promise((resolve, reject) => { - // Check parameters - Checks.nonBlankString(method.command, "Method command must not be empty"); - if (args && !Array.isArray(args)) { - throw new Error("web3Eth arguments (args) must be an array"); - } - - // Prepare input - const invokeArgs = { - methodName: method.command, - params: args, - }; - - // Call the endpoint - this.invokeWeb3EthMethodV1(invokeArgs) - .then((value) => { - this.log.debug("sendWeb3EthRequest() OK"); - resolve(value.data); - }) - .catch((err) => { - this.log.debug("sendWeb3EthRequest() Error:", err); - reject(err); - }); - }); - } - - private sendWeb3EthContractRequest( - contract: EthereumRequestInputContract, - method: EthereumRequestInputWeb3EthContractMethod, - args?: Record, - ): Promise { - return new Promise((resolve, reject) => { - // Check parameters - Checks.truthy(contract.abi, "Contract ABI must be defined"); - Checks.truthy(contract.address, "Contract address must be set"); - if ( - !Object.values(EthContractInvocationWeb3Method).includes(method.command) - ) { - throw new Error( - `Unknown invocationType (${method.command}), must be specified in EthContractInvocationWeb3Method`, - ); - } - Checks.nonBlankString( - method.function, - "contractMethod (method.function) must not be empty", - ); - if (method.params && !Array.isArray(method.params)) { - throw new Error( - "Contract method arguments (method.params) must be an array", - ); - } - - // Prepare input - const invokeArgs: InvokeRawWeb3EthContractV1Request = { - abi: contract.abi, - address: contract.address as string, - invocationType: method.command, - invocationParams: args, - contractMethod: method.function, - contractMethodArgs: method.params, - }; - - // Call the endpoint - this.invokeRawWeb3EthContractV1(invokeArgs) - .then((value) => { - resolve(value.data); - }) - .catch((err) => { - reject(err); - }); - }); - } - - /** - * Sends request to be executed on the ledger, watches and reports any error and the response from a ledger. - * @param contract - contract to execute on the ledger. - * @param method - function / method specification to be executed by validator. - * @param args - arguments. - * @returns Promise that will resolve with response from the ledger, or reject when error occurred. - * @deprecated Use EthereumApiClient REST calls directly. - */ - public sendSyncRequest( - contract: EthereumRequestInputContract, - method: EthereumRequestInputMethod, - args: EthereumRequestInputArgs, - ): Promise { - this.log.debug("sendSyncRequest()"); - - switch (method.type) { - case "web3Eth": { - this.log.info("Send 'web3Eth' request command"); - return this.sendWeb3EthRequest(method, args.args as any); - } - case "web3EthContract": { - this.log.info("Send 'web3EthContract' request command"); - return this.sendWeb3EthContractRequest( - contract, - method, - args.args as any, - ); - } - default: - const value: never = method; - return Promise.reject( - `Not support request method on Ethereum: ${JSON.stringify(value)}`, - ); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index b2b07765ec..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,1664 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Ethereum - * Can perform basic tasks on a Ethereum ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface ContractJSON - */ -export interface ContractJSON { - [key: string]: any; - - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'contractName': string; - /** - * See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode - * @type {string} - * @memberof ContractJSON - */ - 'bytecode': string; - /** - * The application binary interface of the solidity contract, optional parameter - * @type {Array} - * @memberof ContractJSON - */ - 'abi': Array; - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'metadata'?: string; - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'deployedBytecode'?: string; - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'sourceMap'?: string; - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'deployedSourceMap'?: string; - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'sourcePath'?: string; - /** - * - * @type {object} - * @memberof ContractJSON - */ - 'compiler'?: object; - /** - * - * @type {object} - * @memberof ContractJSON - */ - 'networks'?: object; - /** - * - * @type {object} - * @memberof ContractJSON - */ - 'ast'?: object; - /** - * - * @type {object} - * @memberof ContractJSON - */ - 'functionHashes'?: object; - /** - * - * @type {object} - * @memberof ContractJSON - */ - 'gasEstimates'?: object; -} -/** - * - * @export - * @interface ContractJsonDefinition - */ -export interface ContractJsonDefinition { - /** - * - * @type {ContractJSON} - * @memberof ContractJsonDefinition - */ - 'contractJSON': ContractJSON; -} -/** - * - * @export - * @interface ContractKeychainDefinition - */ -export interface ContractKeychainDefinition { - /** - * The contract name for retrieve the contracts json on the keychain. - * @type {string} - * @memberof ContractKeychainDefinition - */ - 'contractName': string; - /** - * The keychainId for retrieve the contracts json. - * @type {string} - * @memberof ContractKeychainDefinition - */ - 'keychainId': string; -} -/** - * - * @export - * @interface DeployContractV1Request - */ -export interface DeployContractV1Request { - /** - * - * @type {Web3SigningCredential} - * @memberof DeployContractV1Request - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {DeployContractV1RequestContract} - * @memberof DeployContractV1Request - */ - 'contract': DeployContractV1RequestContract; - /** - * The list of arguments to pass in to the constructor of the contract being deployed. - * @type {Array} - * @memberof DeployContractV1Request - */ - 'constructorArgs'?: Array; - /** - * - * @type {GasTransactionConfig} - * @memberof DeployContractV1Request - */ - 'gasConfig'?: GasTransactionConfig; - /** - * Ether balance to send on deployment. - * @type {string} - * @memberof DeployContractV1Request - */ - 'value'?: string; -} -/** - * @type DeployContractV1RequestContract - * @export - */ -export type DeployContractV1RequestContract = ContractJsonDefinition | ContractKeychainDefinition; - -/** - * - * @export - * @interface DeployedContractJsonDefinition - */ -export interface DeployedContractJsonDefinition { - /** - * - * @type {ContractJSON} - * @memberof DeployedContractJsonDefinition - */ - 'contractJSON': ContractJSON; - /** - * - * @type {string} - * @memberof DeployedContractJsonDefinition - */ - 'contractAddress': string; -} -/** - * Error response from the connector. - * @export - * @interface ErrorExceptionResponseV1 - */ -export interface ErrorExceptionResponseV1 { - /** - * Short error description message. - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'message': string; - /** - * Detailed error information. - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'error': string; -} -/** - * - * @export - * @enum {string} - */ - -export const EthContractInvocationType = { - Send: 'SEND', - Call: 'CALL' -} as const; - -export type EthContractInvocationType = typeof EthContractInvocationType[keyof typeof EthContractInvocationType]; - - -/** - * - * @export - * @enum {string} - */ - -export const EthContractInvocationWeb3Method = { - Send: 'send', - Call: 'call', - EncodeAbi: 'encodeABI', - EstimateGas: 'estimateGas' -} as const; - -export type EthContractInvocationWeb3Method = typeof EthContractInvocationWeb3Method[keyof typeof EthContractInvocationWeb3Method]; - - -/** - * - * @export - * @interface EthereumTransactionConfig - */ -export interface EthereumTransactionConfig { - /** - * - * @type {string} - * @memberof EthereumTransactionConfig - */ - 'rawTransaction'?: string; - /** - * - * @type {string} - * @memberof EthereumTransactionConfig - */ - 'from'?: string; - /** - * - * @type {string} - * @memberof EthereumTransactionConfig - */ - 'to'?: string; - /** - * - * @type {string} - * @memberof EthereumTransactionConfig - */ - 'value'?: string; - /** - * - * @type {string} - * @memberof EthereumTransactionConfig - */ - 'nonce'?: string; - /** - * - * @type {string} - * @memberof EthereumTransactionConfig - */ - 'data'?: string; - /** - * - * @type {GasTransactionConfig} - * @memberof EthereumTransactionConfig - */ - 'gasConfig'?: GasTransactionConfig; -} -/** - * @type GasTransactionConfig - * Transaction gas settings. - * @export - */ -export type GasTransactionConfig = GasTransactionConfigEIP1559 | GasTransactionConfigLegacy; - -/** - * Transaction gas settings in networks after EIP-1559 (London fork). - * @export - * @interface GasTransactionConfigEIP1559 - */ -export interface GasTransactionConfigEIP1559 { - /** - * A maximum amount of gas a user is willing to provide for the execution of the transaction. - * @type {string} - * @memberof GasTransactionConfigEIP1559 - */ - 'gasLimit'?: string; - /** - * A maximum fee (including the base fee and the tip) a user is willing to pay per unit of gas. - * @type {string} - * @memberof GasTransactionConfigEIP1559 - */ - 'maxFeePerGas'?: string; - /** - * A maximum tip amount a user is willing to pay per unit of gas. - * @type {string} - * @memberof GasTransactionConfigEIP1559 - */ - 'maxPriorityFeePerGas'?: string; -} -/** - * Transaction gas settings in networks before EIP-1559 (London fork). - * @export - * @interface GasTransactionConfigLegacy - */ -export interface GasTransactionConfigLegacy { - /** - * A maximum amount of gas a user is willing to provide for the execution of the transaction. (gasLimit) - * @type {string} - * @memberof GasTransactionConfigLegacy - */ - 'gas'?: string; - /** - * A price (in Wei) a user is willing to pay for each unit of gas used during the execution of the transaction. In EIP-1559 (London fork) networks, it will be set as both maxFeePerGas and maxPriorityFeePerGas. - * @type {string} - * @memberof GasTransactionConfigLegacy - */ - 'gasPrice'?: string; -} -/** - * - * @export - * @interface InvokeContractV1Request - */ -export interface InvokeContractV1Request { - /** - * - * @type {InvokeContractV1RequestContract} - * @memberof InvokeContractV1Request - */ - 'contract': InvokeContractV1RequestContract; - /** - * The name of the contract method to invoke. - * @type {string} - * @memberof InvokeContractV1Request - */ - 'methodName': string; - /** - * The list of arguments to pass in to the contract method being invoked. - * @type {Array} - * @memberof InvokeContractV1Request - */ - 'params': Array; - /** - * - * @type {EthContractInvocationType} - * @memberof InvokeContractV1Request - */ - 'invocationType': EthContractInvocationType; - /** - * - * @type {Web3SigningCredential} - * @memberof InvokeContractV1Request - */ - 'web3SigningCredential'?: Web3SigningCredential; - /** - * - * @type {GasTransactionConfig} - * @memberof InvokeContractV1Request - */ - 'gasConfig'?: GasTransactionConfig; - /** - * - * @type {string} - * @memberof InvokeContractV1Request - */ - 'value'?: string; - /** - * The amount of milliseconds to wait for a transaction receipt before returning an error. Only has any effect if the invocation type is SEND - * @type {number} - * @memberof InvokeContractV1Request - */ - 'timeoutMs'?: number; -} - - -/** - * @type InvokeContractV1RequestContract - * @export - */ -export type InvokeContractV1RequestContract = ContractKeychainDefinition | DeployedContractJsonDefinition; - -/** - * - * @export - * @interface InvokeContractV1Response - */ -export interface InvokeContractV1Response { - /** - * - * @type {Web3TransactionReceipt} - * @memberof InvokeContractV1Response - */ - 'transactionReceipt'?: Web3TransactionReceipt; - /** - * - * @type {any} - * @memberof InvokeContractV1Response - */ - 'callOutput'?: any; - /** - * - * @type {boolean} - * @memberof InvokeContractV1Response - */ - 'success': boolean; -} -/** - * - * @export - * @interface InvokeRawWeb3EthContractV1Request - */ -export interface InvokeRawWeb3EthContractV1Request { - /** - * The application binary interface of the solidity contract - * @type {any} - * @memberof InvokeRawWeb3EthContractV1Request - */ - 'abi': any; - /** - * Deployed solidity contract address - * @type {string} - * @memberof InvokeRawWeb3EthContractV1Request - */ - 'address': string; - /** - * - * @type {EthContractInvocationWeb3Method} - * @memberof InvokeRawWeb3EthContractV1Request - */ - 'invocationType': EthContractInvocationWeb3Method; - /** - * The list of arguments for contract invocation method (send, call, etc...) - * @type {object} - * @memberof InvokeRawWeb3EthContractV1Request - */ - 'invocationParams'?: object; - /** - * Method of deployed solidity contract to execute - * @type {string} - * @memberof InvokeRawWeb3EthContractV1Request - */ - 'contractMethod': string; - /** - * The list of arguments for deployed solidity contract method - * @type {Array} - * @memberof InvokeRawWeb3EthContractV1Request - */ - 'contractMethodArgs'?: Array; -} - - -/** - * - * @export - * @interface InvokeRawWeb3EthContractV1Response - */ -export interface InvokeRawWeb3EthContractV1Response { - /** - * Status code of the operation - * @type {number} - * @memberof InvokeRawWeb3EthContractV1Response - */ - 'status': number; - /** - * Output of contract invocation method - * @type {any} - * @memberof InvokeRawWeb3EthContractV1Response - */ - 'data'?: any; - /** - * Error details - * @type {string} - * @memberof InvokeRawWeb3EthContractV1Response - */ - 'errorDetail'?: string; -} -/** - * - * @export - * @interface InvokeRawWeb3EthMethodV1Request - */ -export interface InvokeRawWeb3EthMethodV1Request { - /** - * The name of the web3.eth method to invoke - * @type {string} - * @memberof InvokeRawWeb3EthMethodV1Request - */ - 'methodName': string; - /** - * The list of arguments to pass to web3.eth method specified in methodName - * @type {Array} - * @memberof InvokeRawWeb3EthMethodV1Request - */ - 'params'?: Array; -} -/** - * - * @export - * @interface InvokeRawWeb3EthMethodV1Response - */ -export interface InvokeRawWeb3EthMethodV1Response { - /** - * Status code of the operation - * @type {number} - * @memberof InvokeRawWeb3EthMethodV1Response - */ - 'status': number; - /** - * Output of requested web3.eth method - * @type {any} - * @memberof InvokeRawWeb3EthMethodV1Response - */ - 'data'?: any; - /** - * Error details - * @type {string} - * @memberof InvokeRawWeb3EthMethodV1Response - */ - 'errorDetail'?: string; -} -/** - * - * @export - * @interface RunTransactionRequest - */ -export interface RunTransactionRequest { - /** - * - * @type {Web3SigningCredential} - * @memberof RunTransactionRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {EthereumTransactionConfig} - * @memberof RunTransactionRequest - */ - 'transactionConfig': EthereumTransactionConfig; - /** - * The amount of milliseconds to wait for a transaction receipt with thehash of the transaction(which indicates successful execution) beforegiving up and crashing. - * @type {number} - * @memberof RunTransactionRequest - */ - 'timeoutMs'?: number; -} -/** - * - * @export - * @interface RunTransactionResponse - */ -export interface RunTransactionResponse { - /** - * - * @type {Web3TransactionReceipt} - * @memberof RunTransactionResponse - */ - 'transactionReceipt': Web3TransactionReceipt; -} -/** - * - * @export - * @enum {string} - */ - -export const WatchBlocksV1 = { - Subscribe: 'org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Subscribe', - Next: 'org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Next', - Unsubscribe: 'org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Unsubscribe', - Error: 'org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Error', - Complete: 'org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Complete' -} as const; - -export type WatchBlocksV1 = typeof WatchBlocksV1[keyof typeof WatchBlocksV1]; - - -/** - * - * @export - * @interface WatchBlocksV1BlockData - */ -export interface WatchBlocksV1BlockData { - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'number': string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'hash'?: string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'parentHash': string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'nonce': string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'sha3Uncles': string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'logsBloom'?: string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'transactionsRoot'?: string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'stateRoot': string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'receiptsRoot'?: string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'difficulty'?: string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'mixHash'?: string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'miner': string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'extraData': string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'gasLimit': string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'gasUsed': string; - /** - * - * @type {WatchBlocksV1BlockDataTimestamp} - * @memberof WatchBlocksV1BlockData - */ - 'timestamp': WatchBlocksV1BlockDataTimestamp; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'size': string; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'totalDifficulty': string; - /** - * - * @type {Array} - * @memberof WatchBlocksV1BlockData - */ - 'uncles': Array; - /** - * - * @type {string} - * @memberof WatchBlocksV1BlockData - */ - 'baseFeePerGas'?: string; - /** - * - * @type {Array} - * @memberof WatchBlocksV1BlockData - */ - 'transactions': Array; -} -/** - * @type WatchBlocksV1BlockDataTimestamp - * @export - */ -export type WatchBlocksV1BlockDataTimestamp = number | string; - -/** - * - * @export - * @interface WatchBlocksV1Options - */ -export interface WatchBlocksV1Options { - /** - * Include entire block data if flag is true, otherwise just a header is returned (default) - * @type {boolean} - * @memberof WatchBlocksV1Options - */ - 'getBlockData'?: boolean; - /** - * Block from which we want to start the monitoring process. - * @type {number} - * @memberof WatchBlocksV1Options - */ - 'lastSeenBlock'?: number; - /** - * How often to poll ethereum node for new blocks. Not used if the node supports subscription based monitoring (i.e. WebSocket). - * @type {number} - * @memberof WatchBlocksV1Options - */ - 'httpPollInterval'?: number; -} -/** - * - * @export - * @interface WatchBlocksV1Progress - */ -export interface WatchBlocksV1Progress { - /** - * - * @type {Web3BlockHeader} - * @memberof WatchBlocksV1Progress - */ - 'blockHeader'?: Web3BlockHeader; - /** - * - * @type {WatchBlocksV1BlockData} - * @memberof WatchBlocksV1Progress - */ - 'blockData'?: WatchBlocksV1BlockData; -} -/** - * - * @export - * @interface Web3BlockHeader - */ -export interface Web3BlockHeader { - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'number'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'parentHash'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'sha3Uncles': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'transactionsRoot'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'receiptsRoot'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'difficulty'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'mixHash'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'miner'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'gasLimit': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'gasUsed': string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'stateRoot'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'logsBloom'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'extraData'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'nonce'?: string; - /** - * - * @type {string} - * @memberof Web3BlockHeader - */ - 'timestamp'?: string; -} -/** - * @type Web3SigningCredential - * @export - */ -export type Web3SigningCredential = Web3SigningCredentialCactiKeychainRef | Web3SigningCredentialGethKeychainPassword | Web3SigningCredentialNone | Web3SigningCredentialPrivateKeyHex; - -/** - * - * @export - * @interface Web3SigningCredentialCactiKeychainRef - */ -export interface Web3SigningCredentialCactiKeychainRef { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialCactiKeychainRef - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialCactiKeychainRef - */ - 'ethAccount': string; - /** - * The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactiKeychainRef - */ - 'keychainEntryKey': string; - /** - * The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactiKeychainRef - */ - 'keychainId'?: string; -} - - -/** - * - * @export - * @interface Web3SigningCredentialGethKeychainPassword - */ -export interface Web3SigningCredentialGethKeychainPassword { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialGethKeychainPassword - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialGethKeychainPassword - */ - 'ethAccount': string; - /** - * A geth keychain unlock password. - * @type {string} - * @memberof Web3SigningCredentialGethKeychainPassword - */ - 'secret': string; -} - - -/** - * Using this denotes that there is no signing required because the transaction is pre-signed. - * @export - * @interface Web3SigningCredentialNone - */ -export interface Web3SigningCredentialNone { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialNone - */ - 'type': Web3SigningCredentialType; -} - - -/** - * - * @export - * @interface Web3SigningCredentialPrivateKeyHex - */ -export interface Web3SigningCredentialPrivateKeyHex { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'ethAccount': string; - /** - * The HEX encoded private key of an eth account. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'secret': string; -} - - -/** - * - * @export - * @enum {string} - */ - -export const Web3SigningCredentialType = { - CactiKeychainRef: 'CACTI_KEYCHAIN_REF', - GethKeychainPassword: 'GETH_KEYCHAIN_PASSWORD', - PrivateKeyHex: 'PRIVATE_KEY_HEX', - None: 'NONE' -} as const; - -export type Web3SigningCredentialType = typeof Web3SigningCredentialType[keyof typeof Web3SigningCredentialType]; - - -/** - * - * @export - * @interface Web3Transaction - */ -export interface Web3Transaction { - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'hash': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'nonce': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'blockHash': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'blockNumber': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'transactionIndex': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'from': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'to': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'value': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'gasPrice': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'gas': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'input': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'type': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'chainId': string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'v'?: string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 'r'?: string; - /** - * - * @type {string} - * @memberof Web3Transaction - */ - 's'?: string; -} -/** - * - * @export - * @interface Web3TransactionReceipt - */ -export interface Web3TransactionReceipt { - [key: string]: any; - - /** - * - * @type {boolean} - * @memberof Web3TransactionReceipt - */ - 'status': boolean; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'transactionHash': string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'transactionIndex': string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'blockHash': string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'blockNumber': string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'gasUsed': string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'effectiveGasPrice'?: string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'contractAddress'?: string | null; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'from': string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'to': string; - /** - * - * @type {Array} - * @memberof Web3TransactionReceipt - */ - 'logs'?: Array; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'logsBloom'?: string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'revertReason'?: string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'output'?: string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'commitmentHash'?: string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'cumulativeGasUsed'?: string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'type'?: string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deploys the contract to ethereum ledger. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContract: async (deployContractV1Request?: DeployContractV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deployContractV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Invokes a contract on an ethereum ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContractV1: async (invokeContractV1Request?: InvokeContractV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(invokeContractV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Low-level endpoint to invoke a method on deployed contract. - * @param {InvokeRawWeb3EthContractV1Request} [invokeRawWeb3EthContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeRawWeb3EthContractV1: async (invokeRawWeb3EthContractV1Request?: InvokeRawWeb3EthContractV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(invokeRawWeb3EthContractV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Invoke any method from web3.eth (low-level) - * @param {InvokeRawWeb3EthMethodV1Request} [invokeRawWeb3EthMethodV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeWeb3EthMethodV1: async (invokeRawWeb3EthMethodV1Request?: InvokeRawWeb3EthMethodV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(invokeRawWeb3EthMethodV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Executes a transaction on a ethereum ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runTransactionV1: async (runTransactionRequest?: RunTransactionRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(runTransactionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deploys the contract to ethereum ledger. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deployContract(deployContractV1Request?: DeployContractV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deployContract(deployContractV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Invokes a contract on an ethereum ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async invokeContractV1(invokeContractV1Request?: InvokeContractV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.invokeContractV1(invokeContractV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Low-level endpoint to invoke a method on deployed contract. - * @param {InvokeRawWeb3EthContractV1Request} [invokeRawWeb3EthContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async invokeRawWeb3EthContractV1(invokeRawWeb3EthContractV1Request?: InvokeRawWeb3EthContractV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.invokeRawWeb3EthContractV1(invokeRawWeb3EthContractV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Invoke any method from web3.eth (low-level) - * @param {InvokeRawWeb3EthMethodV1Request} [invokeRawWeb3EthMethodV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async invokeWeb3EthMethodV1(invokeRawWeb3EthMethodV1Request?: InvokeRawWeb3EthMethodV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.invokeWeb3EthMethodV1(invokeRawWeb3EthMethodV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Executes a transaction on a ethereum ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async runTransactionV1(runTransactionRequest?: RunTransactionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.runTransactionV1(runTransactionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deploys the contract to ethereum ledger. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContract(deployContractV1Request?: DeployContractV1Request, options?: any): AxiosPromise { - return localVarFp.deployContract(deployContractV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Invokes a contract on an ethereum ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContractV1(invokeContractV1Request?: InvokeContractV1Request, options?: any): AxiosPromise { - return localVarFp.invokeContractV1(invokeContractV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Low-level endpoint to invoke a method on deployed contract. - * @param {InvokeRawWeb3EthContractV1Request} [invokeRawWeb3EthContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeRawWeb3EthContractV1(invokeRawWeb3EthContractV1Request?: InvokeRawWeb3EthContractV1Request, options?: any): AxiosPromise { - return localVarFp.invokeRawWeb3EthContractV1(invokeRawWeb3EthContractV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Invoke any method from web3.eth (low-level) - * @param {InvokeRawWeb3EthMethodV1Request} [invokeRawWeb3EthMethodV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeWeb3EthMethodV1(invokeRawWeb3EthMethodV1Request?: InvokeRawWeb3EthMethodV1Request, options?: any): AxiosPromise { - return localVarFp.invokeWeb3EthMethodV1(invokeRawWeb3EthMethodV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Executes a transaction on a ethereum ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runTransactionV1(runTransactionRequest?: RunTransactionRequest, options?: any): AxiosPromise { - return localVarFp.runTransactionV1(runTransactionRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deploys the contract to ethereum ledger. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deployContract(deployContractV1Request?: DeployContractV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deployContract(deployContractV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Invokes a contract on an ethereum ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public invokeContractV1(invokeContractV1Request?: InvokeContractV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).invokeContractV1(invokeContractV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Low-level endpoint to invoke a method on deployed contract. - * @param {InvokeRawWeb3EthContractV1Request} [invokeRawWeb3EthContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public invokeRawWeb3EthContractV1(invokeRawWeb3EthContractV1Request?: InvokeRawWeb3EthContractV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).invokeRawWeb3EthContractV1(invokeRawWeb3EthContractV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Invoke any method from web3.eth (low-level) - * @param {InvokeRawWeb3EthMethodV1Request} [invokeRawWeb3EthMethodV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public invokeWeb3EthMethodV1(invokeRawWeb3EthMethodV1Request?: InvokeRawWeb3EthMethodV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).invokeWeb3EthMethodV1(invokeRawWeb3EthMethodV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Executes a transaction on a ethereum ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public runTransactionV1(runTransactionRequest?: RunTransactionRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).runTransactionV1(runTransactionRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 2acd0fa120..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Ethereum - * Can perform basic tasks on a Ethereum ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 1564e9a48f..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Ethereum - * Can perform basic tasks on a Ethereum ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 74f961d1d5..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Ethereum - * Can perform basic tasks on a Ethereum ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 36fb8b40a4..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Ethereum - * Can perform basic tasks on a Ethereum ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/index.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/index.web.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/plugin-factory-ledger-connector.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/plugin-factory-ledger-connector.ts deleted file mode 100644 index 8ae6f686cf..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginLedgerConnectorEthereumOptions, - PluginLedgerConnectorEthereum, -} from "./plugin-ledger-connector-ethereum"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorEthereum, - IPluginLedgerConnectorEthereumOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorEthereumOptions, - ): Promise { - return new PluginLedgerConnectorEthereum(pluginOptions); - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/plugin-ledger-connector-ethereum.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/plugin-ledger-connector-ethereum.ts deleted file mode 100644 index 551baf07fb..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/plugin-ledger-connector-ethereum.ts +++ /dev/null @@ -1,1186 +0,0 @@ -import type { - Server as SocketIoServer, - Socket as SocketIoSocket, -} from "socket.io"; - -import { Express } from "express"; -import Web3, { - Contract, - HttpProvider, - Transaction, - TransactionReceiptBase, - WebSocketProvider, -} from "web3"; -import { PayableMethodObject } from "web3-eth-contract"; - -import OAS from "../json/openapi.json"; - -import { Interface, FunctionFragment, isAddress } from "ethers"; - -import { - ConsensusAlgorithmFamily, - IPluginLedgerConnector, - IWebServiceEndpoint, - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; - -import { - PluginRegistry, - consensusHasTransactionFinality, -} from "@hyperledger/cactus-core"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { DeployContractEndpoint } from "./web-services/deploy-contract-v1-endpoint"; - -import { - DeployContractV1Request, - EthContractInvocationType, - EthContractInvocationWeb3Method, - InvokeContractV1Request, - InvokeContractV1Response, - RunTransactionRequest, - RunTransactionResponse, - Web3SigningCredentialGethKeychainPassword, - Web3SigningCredentialCactiKeychainRef, - Web3SigningCredentialPrivateKeyHex, - Web3SigningCredentialType, - WatchBlocksV1, - WatchBlocksV1Options, - InvokeRawWeb3EthMethodV1Request, - InvokeRawWeb3EthContractV1Request, - EthereumTransactionConfig, - ContractKeychainDefinition, - GasTransactionConfig, - ContractJSON, -} from "./generated/openapi/typescript-axios"; - -import { RunTransactionEndpoint } from "./web-services/run-transaction-v1-endpoint"; -import { InvokeContractEndpoint } from "./web-services/invoke-contract-v1-endpoint"; -import { - createWatchBlocksV1Endpoint, - WatchBlocksV1Endpoint, -} from "./web-services/watch-blocks-v1-endpoint"; -import { GetPrometheusExporterMetricsEndpointV1 } from "./web-services/get-prometheus-exporter-metrics-v1-endpoint"; -import { InvokeRawWeb3EthMethodEndpoint } from "./web-services/invoke-raw-web3eth-method-v1-endpoint"; -import { InvokeRawWeb3EthContractEndpoint } from "./web-services/invoke-raw-web3eth-contract-v1-endpoint"; - -import { - isContractJsonDefinition, - isContractKeychainDefinition, - isDeployedContractJsonDefinition, - isGasTransactionConfigEIP1559, - isGasTransactionConfigLegacy, - isWeb3SigningCredentialNone, -} from "./types/model-type-guards"; -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; -import { RuntimeError } from "run-time-error-cjs"; -import { createProxyMiddleware, fixRequestBody } from "http-proxy-middleware"; - -import { - Web3StringReturnFormat, - convertWeb3ReceiptStatusToBool, -} from "./types/util-types"; - -// Used when waiting for WS requests to be send correctly before disconnecting -const waitForWsProviderRequestsTimeout = 5 * 1000; // 5s -const waitForWsProviderRequestsStep = 500; // 500ms -type RunContractDeploymentInput = { - web3SigningCredential: - | Web3SigningCredentialCactiKeychainRef - | Web3SigningCredentialGethKeychainPassword - | Web3SigningCredentialPrivateKeyHex; - contractJSON: ContractJSON; - gasConfig?: GasTransactionConfig; - constructorArgs?: unknown[]; - value?: string; -}; - -export type HttpProviderOptions = ConstructorParameters[1]; -export type WsProviderSocketOptions = ConstructorParameters< - typeof WebSocketProvider ->[1]; -export type WsProviderReconnectOptions = ConstructorParameters< - typeof WebSocketProvider ->[2]; - -const defaultWsProviderReconnectOptions: WsProviderReconnectOptions = { - delay: 500, - autoReconnect: true, - maxAttempts: 20, -}; - -export interface IPluginLedgerConnectorEthereumOptions - extends ICactusPluginOptions { - rpcApiHttpHost?: string; - rpcApiHttpOptions?: HttpProviderOptions; - rpcApiWsHost?: string; - rpcApiWsSocketOptions?: WsProviderSocketOptions; - rpcApiWsReconnectOptions?: WsProviderReconnectOptions; - logLevel?: LogLevelDesc; - prometheusExporter?: PrometheusExporter; - pluginRegistry: PluginRegistry; -} - -export class PluginLedgerConnectorEthereum - implements - IPluginLedgerConnector< - DeployContractV1Request, - RunTransactionResponse, - RunTransactionRequest, - RunTransactionResponse - >, - ICactusPlugin, - IPluginWebService -{ - private readonly pluginRegistry: PluginRegistry; - public prometheusExporter: PrometheusExporter; - private readonly instanceId: string; - private readonly log: Logger; - private readonly web3: InstanceType; - private endpoints: IWebServiceEndpoint[] | undefined; - public static readonly CLASS_NAME = "PluginLedgerConnectorEthereum"; - private watchBlocksSubscriptions: Map = - new Map(); - - public get className(): string { - return PluginLedgerConnectorEthereum.CLASS_NAME; - } - - private createWeb3WsProvider() { - if (this.options.rpcApiWsHost) { - return new WebSocketProvider( - this.options.rpcApiWsHost, - this.options.rpcApiWsSocketOptions, - this.options.rpcApiWsReconnectOptions, - ); - } else { - throw new Error( - "Can't instantiate WebSocketProvider without a valid rpcApiWsHost!", - ); - } - } - - private createWeb3Provider() { - if (this.options.rpcApiHttpHost) { - this.log.debug( - "Using Web3 HttpProvider because rpcApiHttpHost was provided", - ); - return new HttpProvider( - this.options.rpcApiHttpHost, - this.options.rpcApiHttpOptions, - ); - } else if (this.options.rpcApiWsHost) { - this.log.debug( - "Using Web3 WebSocketProvider because rpcApiHttpHost is missing but rpcApiWsHost was provided", - ); - return this.createWeb3WsProvider(); - } else { - throw new Error( - "Missing web3js RPC Api host (either HTTP or WS is required)", - ); - } - } - - constructor(public readonly options: IPluginLedgerConnectorEthereumOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy(options.pluginRegistry, `${fnTag} options.pluginRegistry`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.web3 = new Web3(this.createWeb3Provider()); - - this.instanceId = options.instanceId; - this.pluginRegistry = options.pluginRegistry as PluginRegistry; - this.prometheusExporter = - options.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - - if (!this.options.rpcApiWsReconnectOptions) { - this.options.rpcApiWsReconnectOptions = defaultWsProviderReconnectOptions; - } - - this.prometheusExporter.startMetricsCollection(); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } - - public getInstanceId(): string { - return this.instanceId; - } - - private async removeWatchBlocksSubscriptionForSocket(socketId: string) { - try { - const subscription = this.watchBlocksSubscriptions.get(socketId); - if (subscription) { - await subscription.unsubscribe(); - this.watchBlocksSubscriptions.delete(socketId); - this.log.info(`${socketId} ${WatchBlocksV1.Unsubscribe} OK`); - } - } catch (error) { - this.log.debug( - `${socketId} ${WatchBlocksV1.Unsubscribe} Failed (possibly already closed)`, - ); - } - } - - private async closeWeb3jsConnection(wsProvider?: WebSocketProvider) { - try { - if (!wsProvider || typeof wsProvider.SocketConnection === "undefined") { - this.log.debug("Non-WS provider found - finish"); - return; - } - - // Wait for WS requests to finish - const looseWsProvider = wsProvider as any; // Used to access protected fields of WS provider - let waitForRequestRemainingSteps = - waitForWsProviderRequestsTimeout / waitForWsProviderRequestsStep; - while ( - waitForRequestRemainingSteps > 0 && - (looseWsProvider._pendingRequestsQueue.size > 0 || - looseWsProvider._sentRequestsQueue.size > 0) - ) { - this.log.debug( - `Waiting for pending and sent requests to finish on web3js WS provider (${waitForWsProviderRequestsStep})...`, - ); - await new Promise((resolve) => - setTimeout(resolve, waitForWsProviderRequestsStep), - ); - waitForRequestRemainingSteps--; - } - - // Disconnect the socket provider - wsProvider.disconnect(); - } catch (error) { - this.log.error("Error when disconnecting web3js provider!", error); - } - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - - this.log.debug("Remove any remaining web3js subscriptions"); - for (const socketId of this.watchBlocksSubscriptions.keys()) { - this.log.debug(`${WatchBlocksV1.Unsubscribe} shutdown`); - await this.removeWatchBlocksSubscriptionForSocket(socketId); - } - - await this.closeWeb3jsConnection( - this.web3.currentProvider as unknown as WebSocketProvider, - ); - } - - public async onPluginInit(): Promise { - return; - } - - async registerWebServices( - app: Express, - wsApi: SocketIoServer, - ): Promise { - const { logLevel } = this.options; - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - - wsApi.on("connection", (socket: SocketIoSocket) => { - this.log.info(`New socket connection id ${socket.id}`); - - // WatchBlocksV1Endpoint - socket.on( - WatchBlocksV1.Subscribe, - async (options?: WatchBlocksV1Options) => { - try { - const endpoint = createWatchBlocksV1Endpoint({ - web3: this.web3, - socket, - logLevel, - options, - }); - this.watchBlocksSubscriptions.set( - socket.id, - await endpoint.subscribe(), - ); - this.log.debug(`${endpoint.className} created for ${socket.id}`); - } catch (error) { - this.log.error("Error when creating WatchBlocksV1Endpoint:", error); - } - }, - ); - }); - - // Register JSON-RPC proxy to pass requests directly to ethereum node - if (this.options.rpcApiHttpHost) { - const proxyUrl = - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/json-rpc"; - const targetUrl = this.options.rpcApiHttpHost; - app.use( - proxyUrl, - createProxyMiddleware({ - target: targetUrl, - changeOrigin: true, - pathRewrite: { - [".*"]: "", - }, - onProxyReq: fixRequestBody, - logLevel: "warn", - }), - ); - this.log.info(`Registered proxy from ${proxyUrl} to ${targetUrl}`); - } - - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new DeployContractEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new RunTransactionEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new InvokeContractEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new GetPrometheusExporterMetricsEndpointV1({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new InvokeRawWeb3EthMethodEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new InvokeRawWeb3EthContractEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - this.endpoints = endpoints; - return endpoints; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-ledger-connector-ethereum`; - } - - public async getConsensusAlgorithmFamily(): Promise { - return ConsensusAlgorithmFamily.Stake; - } - - public async hasTransactionFinality(): Promise { - const currentConsensusAlgorithmFamily = - await this.getConsensusAlgorithmFamily(); - - return consensusHasTransactionFinality(currentConsensusAlgorithmFamily); - } - - /** - * Verifies that it is safe to call a specific method on an object. - * - * @param object Object instance to check whether it has a method with a specific name or not. - * @param name The name of the method that will be checked if it's usable on `object` or not. - * @returns Boolean `true` when it IS safe to call the method named `name` on the object. - * @throws If the object instance is falsy or the method name is a blank string. - */ - public isSafeToCallObjectMethod( - object: Record, - name: string, - ): boolean { - Checks.truthy( - object, - `${this.className}#isSafeToCallObjectMethod():contract`, - ); - Checks.nonBlankString( - name, - `${this.className}#isSafeToCallObjectMethod():name`, - ); - - return ( - Object.prototype.hasOwnProperty.call(object, name) && - typeof object[name] === "function" - ); - } - - /** - * Verifies that it is safe to call a specific method of a Web3 Contract. - * - * @param contract The Web3 Contract instance to check whether it has a method with a specific name or not. - * @param name The name of the method that will be checked if it's usable on `contract` or not. - * @returns Boolean `true` when it IS safe to call the method named `name` on the contract. - * @throws If the contract instance is falsy or it's methods object is falsy. Also throws if the method name is a blank string. - */ - public async isSafeToCallContractMethod( - contract: InstanceType, - name: string, - ): Promise { - Checks.truthy( - contract, - `${this.className}#isSafeToCallContractMethod():contract`, - ); - - Checks.truthy( - contract.methods, - `${this.className}#isSafeToCallContractMethod():contract.methods`, - ); - - Checks.nonBlankString( - name, - `${this.className}#isSafeToCallContractMethod():name`, - ); - - return this.isSafeToCallObjectMethod(contract.methods, name); - } - - /** - * Simple function for estimating `maxFeePerGas` to sent with transaction. - * @warn It's not optimized for either speed or cost, consider using more complex solution on production! - * @param priorityFee what priority tip you plan to include. - * @returns estimated `maxFeePerGas` value. - */ - public async estimateMaxFeePerGas( - priorityFee: number | string = 0, - ): Promise { - const pendingBlock = await this.web3.eth.getBlock("pending"); - const baseFee = pendingBlock.baseFeePerGas; - if (!baseFee) { - throw new Error( - "Can't estimate maxFeePerGas - could not get recent baseFeePerGas", - ); - } - const estimate = baseFee + BigInt(priorityFee); - return estimate.toString(); - } - - //////////////////////////// - // Invoke - //////////////////////////// - - /** - * Invoke contract method. - * - * @param req contract method and transaction definition - * @returns transaction receipt - */ - public async invokeContract( - req: InvokeContractV1Request, - ): Promise { - Checks.truthy(req, "invokeContract() request arg"); - - if (isDeployedContractJsonDefinition(req.contract)) { - return this.runContractInvoke( - req, - req.contract.contractAddress, - req.contract.contractJSON, - ); - } else if (isContractKeychainDefinition(req.contract)) { - return this.invokeContractFromKeychain(req, req.contract); - } else { - // Exhaustive check - const unknownContract: never = req.contract; - throw new Error( - `Unknown contract definition provided: ${unknownContract}`, - ); - } - } - - /** - * Invoke contract method using contract instance stored in a keychain plugin. - * - * @param req contract method and transaction definition - * @param contract contract keychain reference - * @returns transaction receipt - */ - private async invokeContractFromKeychain( - req: InvokeContractV1Request, - contract: ContractKeychainDefinition, - ): Promise { - const fnTag = `${this.className}#invokeContract()`; - Checks.truthy(contract.contractName, `${fnTag} contractName arg`); - Checks.truthy(contract.keychainId, `${fnTag} keychainId arg`); - - const keychainPlugin = this.pluginRegistry.findOneByKeychainId( - contract.keychainId, - ); - if (!keychainPlugin.has(contract.contractName)) { - throw new Error( - `${fnTag} Cannot invoke the contract because contractName is not in the keychainPlugin`, - ); - } - const contractStr = await keychainPlugin.get(contract.contractName); - const contractJSON = JSON.parse(contractStr); - - // if not exists a contract deployed, we deploy it - const networkId = (await this.web3.eth.net.getId()).toString(); - if ( - !contractJSON.networks || - !contractJSON.networks[networkId] || - !contractJSON.networks[networkId].address - ) { - throw new Error( - `Contract has not been deployed yet on this network (id ${networkId}) - can't invoke!`, - ); - } - - return this.runContractInvoke( - req, - contractJSON.networks[networkId].address, - contractJSON, - ); - } - - /** - * Internal logic for invoking actual transaction given address and ABI. - * - * @param req contract method and transaction definition - * @param contractAddress deployed contract address - * @param contractJSON contract ABI and bytecode - * @returns transaction receipt - */ - private async runContractInvoke( - req: InvokeContractV1Request, - contractAddress: string, - contractJSON: ContractJSON, - ): Promise { - const fnTag = `${this.className}#runContractInvoke()`; - Checks.truthy(req, "runContractInvoke() contractAddress arg"); - Checks.truthy(req, "runContractInvoke() contractJSON arg"); - - if (!req.web3SigningCredential) { - req.web3SigningCredential = { - type: Web3SigningCredentialType.None, - }; - } - - let abi; - if (contractJSON.abi) { - if (typeof contractJSON.abi === "string") { - abi = JSON.parse(contractJSON.abi); - } else { - abi = contractJSON.abi; - } - } else { - throw new Error(`${fnTag} Contract ABI is necessary`); - } - - const contractInstance = new this.web3.eth.Contract(abi, contractAddress); - const isSafeToCall = await this.isSafeToCallContractMethod( - contractInstance, - req.methodName, - ); - if (!isSafeToCall) { - throw new RuntimeError( - `Invalid method name provided in request. ${req.methodName} does not exist on the Web3 contract object's "methods" property.`, - ); - } - - const methodRef = contractInstance.methods[req.methodName] as ( - ...args: unknown[] - ) => PayableMethodObject; - Checks.truthy(methodRef, `${fnTag} YourContract.${req.methodName}`); - - const method = methodRef(...req.params); - if (req.invocationType === EthContractInvocationType.Call) { - const callOutput = await method.call(); - const success = true; - return { success, callOutput }; - } else if (req.invocationType === EthContractInvocationType.Send) { - if (isWeb3SigningCredentialNone(req.web3SigningCredential)) { - throw new Error(`${fnTag} Cannot deploy contract with pre-signed TX`); - } - const web3SigningCredential = req.web3SigningCredential as - | Web3SigningCredentialPrivateKeyHex - | Web3SigningCredentialCactiKeychainRef; - - const transactionConfig = { - from: web3SigningCredential.ethAccount, - to: contractAddress, - gasConfig: req.gasConfig, - value: req.value, - data: method.encodeABI(), - }; - - const out = await this.transact({ - transactionConfig, - web3SigningCredential, - timeoutMs: req.timeoutMs || 60000, - }); - const success = out.transactionReceipt.status; - const data = { success, out }; - return data; - } else { - throw new Error( - `${fnTag} Unsupported invocation type ${req.invocationType}`, - ); - } - } - - //////////////////////////// - // Transact - //////////////////////////// - - /** - * Send ethereum transaction. - * - * @param req transaction definition. - * @returns transaction receipt. - */ - public async transact( - req: RunTransactionRequest, - ): Promise { - const fnTag = `${this.className}#transact()`; - - switch (req.web3SigningCredential.type) { - case Web3SigningCredentialType.CactiKeychainRef: { - return await this.transactCactiKeychainRef(req); - } - case Web3SigningCredentialType.GethKeychainPassword: { - return await this.transactGethKeychain(req); - } - case Web3SigningCredentialType.PrivateKeyHex: { - return await this.transactPrivateKey(req); - } - case Web3SigningCredentialType.None: { - if (req.transactionConfig.rawTransaction) { - return await this.transactSigned( - req.transactionConfig.rawTransaction, - ); - } else { - throw new Error( - `${fnTag} Expected pre-signed raw transaction ` + - ` since signing credential is specified as` + - `Web3SigningCredentialType.NONE`, - ); - } - } - default: { - throw new Error( - `${fnTag} Unrecognized Web3SigningCredentialType: ` + - `${req.web3SigningCredential.type} Supported ones are: ` + - `${Object.values(Web3SigningCredentialType).join(";")}`, - ); - } - } - } - - /** - * Send already signed transaction. - * - * @param rawTransaction signed transaction payload. - * @returns transaction receipt. - */ - public async transactSigned( - rawTransaction: string, - ): Promise { - const receipt = (await this.web3.eth.sendSignedTransaction( - rawTransaction, - Web3StringReturnFormat, - )) as TransactionReceiptBase; - this.prometheusExporter.addCurrentTransaction(); - return { - transactionReceipt: { - ...receipt, - status: convertWeb3ReceiptStatusToBool(receipt.status) ?? true, - }, - }; - } - - /** - * Wait until receipt for transaction with specified hash is returned. - * Throws if timeout expires. - * - * @param txHash sent transaction hash - * @param timeoutMs timeout in milliseconds - * @returns transaction receipt. - */ - public async pollForTxReceipt( - txHash: string, - timeoutMs = 60000, - ): Promise> { - const fnTag = `${this.className}#pollForTxReceipt()`; - let timedOut = false; - let tries = 0; - const startedAt = new Date(); - - do { - try { - return (await this.web3.eth.getTransactionReceipt( - txHash, - Web3StringReturnFormat, - )) as TransactionReceiptBase; - } catch (error) { - this.log.debug( - "pollForTxReceipt getTransactionReceipt failed - (retry)", - ); - } - - // Sleep for 1 second - await new Promise((resolve) => setTimeout(resolve, 1000)); - tries++; - timedOut = Date.now() >= startedAt.getTime() + timeoutMs; - } while (!timedOut); - - throw new Error(`${fnTag} Timed out ${timeoutMs}ms, polls=${tries}`); - } - - /** - * Transact with identity stored in Geth node. - * - * @param txIn transaction definition. - * @returns transaction receipt. - */ - private async transactGethKeychain( - txIn: RunTransactionRequest, - ): Promise { - const fnTag = `${this.className}#transactGethKeychain()`; - const { transactionConfig, web3SigningCredential } = txIn; - const { secret } = - web3SigningCredential as Web3SigningCredentialGethKeychainPassword; - - try { - const txHash = await this.web3.eth.personal.sendTransaction( - await this.getTransactionFromTxConfig(transactionConfig), - secret, - ); - const transactionReceipt = await this.pollForTxReceipt(txHash); - return { - transactionReceipt: { - ...transactionReceipt, - status: - convertWeb3ReceiptStatusToBool(transactionReceipt.status) ?? true, - }, - }; - } catch (ex) { - throw new Error( - `${fnTag} Failed to invoke web3.eth.personal.sendTransaction(). ` + - `InnerException: ${ex.stack}`, - ); - } - } - - /** - * Transact with private key passed in argument. - * - * @param req transaction definition. - * @returns transaction receipt. - */ - private async transactPrivateKey( - req: RunTransactionRequest, - ): Promise { - const fnTag = `${this.className}#transactPrivateKey()`; - const { transactionConfig, web3SigningCredential } = req; - const { secret } = - web3SigningCredential as Web3SigningCredentialPrivateKeyHex; - - const signedTx = await this.web3.eth.accounts.signTransaction( - await this.getTransactionFromTxConfig(transactionConfig), - secret, - ); - - if (signedTx.rawTransaction) { - return this.transactSigned(signedTx.rawTransaction); - } else { - throw new Error( - `${fnTag} Failed to sign eth transaction. ` + - `signedTransaction.rawTransaction is blank after .signTransaction().`, - ); - } - } - - /** - * Transact with identity stored in cacti keychain. - * - * @param req transaction definition. - * @returns transaction receipt. - */ - private async transactCactiKeychainRef( - req: RunTransactionRequest, - ): Promise { - const fnTag = `${this.className}#transactCactiKeychainRef()`; - const { transactionConfig, web3SigningCredential } = req; - const { ethAccount, keychainEntryKey, keychainId } = - web3SigningCredential as Web3SigningCredentialCactiKeychainRef; - - // locate the keychain plugin that has access to the keychain backend - // denoted by the keychainID from the request. - const keychainPlugin = this.pluginRegistry.findOneByKeychainId( - keychainId as string, - ); - Checks.truthy(keychainPlugin, `${fnTag} keychain for ID:"${keychainId}"`); - - // Now use the found keychain plugin to actually perform the lookup of - // the private key that we need to run the transaction. - const privateKeyHex = await keychainPlugin?.get(keychainEntryKey as string); - - return this.transactPrivateKey({ - transactionConfig, - web3SigningCredential: { - ethAccount, - type: Web3SigningCredentialType.PrivateKeyHex, - secret: privateKeyHex, - }, - }); - } - - /** - * Convert connector transaction config to web3js transaction object. - * - * @param txConfig connector transaction config - * @returns web3js transaction - */ - private async getTransactionFromTxConfig( - txConfig: EthereumTransactionConfig, - ): Promise { - const tx: Transaction = { - from: txConfig.from, - to: txConfig.to, - value: txConfig.value, - nonce: txConfig.nonce, - data: txConfig.data, - }; - - // Apply gas config to the transaction - if (txConfig.gasConfig) { - if (isGasTransactionConfigLegacy(txConfig.gasConfig)) { - if (isGasTransactionConfigEIP1559(txConfig.gasConfig)) { - throw new RuntimeError( - `Detected mixed gasConfig! Use either legacy or EIP-1559 mode. gasConfig - ${JSON.stringify( - txConfig.gasConfig, - )}`, - ); - } - tx.maxPriorityFeePerGas = txConfig.gasConfig.gasPrice; - tx.maxFeePerGas = txConfig.gasConfig.gasPrice; - tx.gasLimit = txConfig.gasConfig.gas; - } else { - tx.maxPriorityFeePerGas = txConfig.gasConfig.maxPriorityFeePerGas; - tx.maxFeePerGas = txConfig.gasConfig.maxFeePerGas; - tx.gasLimit = txConfig.gasConfig.gasLimit; - } - } - - if (tx.maxPriorityFeePerGas && !tx.maxFeePerGas) { - tx.maxFeePerGas = await this.estimateMaxFeePerGas( - tx.maxPriorityFeePerGas.toString(), - ); - this.log.info( - `Estimated maxFeePerGas of ${tx.maxFeePerGas} because maxPriorityFeePerGas was provided.`, - ); - } - - // Fill missing gas fields (do it last) - if (!tx.gasLimit) { - const estimatedGas = await this.web3.eth.estimateGas(tx); - this.log.debug( - `Gas not specified in the transaction values, estimated ${estimatedGas.toString()}`, - ); - tx.gasLimit = estimatedGas; - } - - return tx; - } - - //////////////////////////// - // Contract Deployment - //////////////////////////// - - /** - * Deploy contract to an Ethereum based ledger. - * - * @param req contract and transaction definition - * @returns transaction receipt - */ - public async deployContract( - req: DeployContractV1Request, - ): Promise { - Checks.truthy(req, "deployContract() request arg"); - - if (isWeb3SigningCredentialNone(req.web3SigningCredential)) { - throw new Error(`Cannot deploy contract with pre-signed TX`); - } - - if (isContractJsonDefinition(req.contract)) { - return this.runContractDeployment({ - web3SigningCredential: req.web3SigningCredential, - gasConfig: req.gasConfig, - constructorArgs: req.constructorArgs, - value: req.value, - contractJSON: req.contract.contractJSON, - }); - } else if (isContractKeychainDefinition(req.contract)) { - return this.deployContractFromKeychain(req, req.contract); - } else { - // Exhaustive check - const unknownContract: never = req.contract; - throw new Error( - `Unknown contract definition provided: ${unknownContract}`, - ); - } - } - - /** - * Internal function for creating and sending contract deployment transaction. - * - * @param config deployment configuration - * @returns transaction receipt - */ - private async runContractDeployment( - config: RunContractDeploymentInput, - ): Promise { - Checks.truthy(config, "runContractDeployment() config arg"); - - const mockContract = new this.web3.eth.Contract(config.contractJSON.abi); - const mockDeployment = mockContract.deploy({ - data: config.contractJSON.bytecode, - arguments: config.constructorArgs as [], - }); - const abi = mockDeployment.encodeABI(); - - return this.transact({ - transactionConfig: { - data: abi.startsWith("0x") ? abi : `0x${abi}`, - from: config.web3SigningCredential.ethAccount, - gasConfig: config.gasConfig, - value: config.value, - }, - web3SigningCredential: config.web3SigningCredential, - }); - } - - /** - * Internal function for deploying contract that has it's JSON stored in a keychain plugin. - * - * @param req contract and transaction definition - * @param contract contract on keychain definition - * @returns transaction receipt - */ - private async deployContractFromKeychain( - req: DeployContractV1Request, - contract: ContractKeychainDefinition, - ): Promise { - Checks.truthy(req, "deployContractFromKeychain() request arg"); - Checks.truthy(req, "deployContractFromKeychain() contract arg"); - - // Obtain the contractJSON from keychainPlugin - const keychainPlugin = this.pluginRegistry.findOneByKeychainId( - contract.keychainId, - ); - Checks.truthy( - keychainPlugin, - `Deployment contract keychain with ID:"${contract.keychainId}"`, - ); - if (!keychainPlugin.has(contract.contractName)) { - throw new Error( - `Cannot create an instance of the contract because the contractName sent and the contractName of the JSON doesn't match`, - ); - } - const contractStr = await keychainPlugin.get(contract.contractName); - const contractJSON = JSON.parse(contractStr); - - const receipt = await this.runContractDeployment({ - web3SigningCredential: req.web3SigningCredential as - | Web3SigningCredentialCactiKeychainRef - | Web3SigningCredentialGethKeychainPassword - | Web3SigningCredentialPrivateKeyHex, - gasConfig: req.gasConfig, - constructorArgs: req.constructorArgs, - value: req.value, - contractJSON, - }); - - // Save the contract address in the keychainPlugin - if ( - receipt.transactionReceipt.status && - receipt.transactionReceipt.contractAddress && - receipt.transactionReceipt.contractAddress != null - ) { - this.log.info( - "Contract deployed successfully, saving address in keychain entry", - ); - const networkId = await this.web3.eth.net.getId(); - const address = { address: receipt.transactionReceipt.contractAddress }; - contractJSON.networks = { [networkId.toString()]: address }; - keychainPlugin.set(contract.contractName, JSON.stringify(contractJSON)); - } - - return receipt; - } - - //////////////////////////// - // Invoke Web3 Methods - //////////////////////////// - - /** - * Low level function to call any method from web3.eth. - * Should be used only if given functionality is not already covered by another endpoint. - * - * @param args web3.eth method and arguments - * @returns method response - */ - public async invokeRawWeb3EthMethod( - args: InvokeRawWeb3EthMethodV1Request, - ): Promise { - this.log.debug("invokeRawWeb3EthMethod input:", JSON.stringify(args)); - - Checks.nonBlankString( - args.methodName, - "web3.eth method string must not be empty", - ); - - const looseWeb3Eth = this.web3.eth as any; - // web3.eth methods in 4.X are stored in parent class - const isSafeToCall = - this.isSafeToCallObjectMethod(looseWeb3Eth, args.methodName) || - this.isSafeToCallObjectMethod( - Object.getPrototypeOf(looseWeb3Eth), - args.methodName, - ); - if (!isSafeToCall) { - throw new RuntimeError( - `Invalid method name provided in request. ${args.methodName} does not exist on the Web3.Eth object.`, - ); - } - - const web3MethodArgs = args.params || []; - return looseWeb3Eth[args.methodName](...web3MethodArgs); - } - - /** - * Low level function to invoke contract. - * Should be used only if given functionality is not already covered by another endpoint. - * - * @param args web3 contract method and arguments - * @returns method response - */ - public async invokeRawWeb3EthContract( - args: InvokeRawWeb3EthContractV1Request, - ): Promise { - this.log.debug("invokeRawWeb3EthContract input:", JSON.stringify(args)); - - const contractMethodArgs = args.contractMethodArgs || []; - - if ( - !Object.values(EthContractInvocationWeb3Method).includes( - args.invocationType, - ) - ) { - throw new Error( - `Unknown invocationType (${args.invocationType}), must be specified in EthContractInvocationWeb3Method`, - ); - } - - const contract = new this.web3.eth.Contract(args.abi, args.address); - - const isSafeToCall = await this.isSafeToCallContractMethod( - contract, - args.contractMethod, - ); - if (!isSafeToCall) { - throw new RuntimeError( - `Invalid method name provided in request. ${args.contractMethod} does not exist on the Web3 contract object's "methods" property.`, - ); - } - const abiInterface = new Interface(args.abi); - const methodFragment: FunctionFragment | null = abiInterface.getFunction( - args.contractMethod, - ); - if (!methodFragment) { - throw new RuntimeError( - `Method ${args.contractMethod} not found in ABI interface.`, - ); - } - - // validation for the contractMethod - if (methodFragment.inputs.length !== contractMethodArgs.length) { - throw new Error( - `Incorrect number of arguments for ${args.contractMethod}`, - ); - } - methodFragment.inputs.forEach((input, index) => { - const argValue = contractMethodArgs[index]; - const isValidType = typeof argValue === input.type; - - if (!isValidType) { - throw new Error( - `Invalid type for argument ${index + 1} in ${args.contractMethod}`, - ); - } - }); - - //validation for the invocationParams - const invocationParams = args.invocationParams as Record; - const allowedKeys = ["from", "gasLimit", "gasPrice", "value"]; - - if (invocationParams) { - Object.keys(invocationParams).forEach((key) => { - if (!allowedKeys.includes(key)) { - throw new Error(`Invalid key '${key}' in invocationParams`); - } - if (key === "from" && !isAddress(invocationParams[key])) { - throw new Error(`Invalid type for 'from' in invocationParams`); - } - if (key === "gasLimit" && typeof invocationParams[key] !== "number") { - throw new Error(`Invalid type for '${key}' in invocationParams`); - } - if (key === "gasPrice" && typeof invocationParams[key] !== "number") { - throw new Error(`Invalid type for '${key}'in invocationParams`); - } - }); - } - - const methodRef = contract.methods[args.contractMethod] as ( - ...args: unknown[] - ) => any; - return methodRef(...contractMethodArgs)[args.invocationType]( - args.invocationParams, - ); - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/data.fetcher.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/data.fetcher.ts deleted file mode 100644 index e20a516195..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/data.fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Transactions } from "./response.type"; - -import { totalTxCount, K_CACTI_ETHEREUM_TOTAL_TX_COUNT } from "./metrics"; - -export async function collectMetrics( - transactions: Transactions, -): Promise { - transactions.counter++; - totalTxCount - .labels(K_CACTI_ETHEREUM_TOTAL_TX_COUNT) - .set(transactions.counter); -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index 3696b1b5f7..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTI_ETHEREUM_TOTAL_TX_COUNT = "cactus_eth_total_tx_count"; - -export const totalTxCount = new Gauge({ - registers: [], - name: K_CACTI_ETHEREUM_TOTAL_TX_COUNT, - help: "Total transactions executed", - labelNames: ["type"], -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index 6a4b68d960..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,39 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { Transactions } from "./response.type"; -import { collectMetrics } from "./data.fetcher"; -import { K_CACTI_ETHEREUM_TOTAL_TX_COUNT } from "./metrics"; -import { totalTxCount } from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly transactions: Transactions = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public addCurrentTransaction(): void { - collectMetrics(this.transactions); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTI_ETHEREUM_TOTAL_TX_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalTxCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 3f1bc7f491..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type Transactions = { - counter: number; -}; diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/public-api.ts deleted file mode 100755 index 56d5b0cfbb..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/public-api.ts +++ /dev/null @@ -1,33 +0,0 @@ -export * from "./generated/openapi/typescript-axios"; - -export { - PluginLedgerConnectorEthereum, - IPluginLedgerConnectorEthereumOptions, -} from "./plugin-ledger-connector-ethereum"; - -export * from "./sign-utils"; - -export * from "./types/model-type-guards"; - -export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export { - EthereumApiClient, - EthereumApiClientOptions, - EthereumRequestInputWeb3EthMethod, - EthereumRequestInputWeb3EthContractMethod, - EthereumRequestInputContract, - EthereumRequestInputMethod, - EthereumRequestInputArgs, -} from "./api-client/ethereum-api-client"; - -export * from "./generated/openapi/typescript-axios/api"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/sign-utils.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/sign-utils.ts deleted file mode 100644 index 0c9a163268..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/sign-utils.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Chain, Common } from "@ethereumjs/common"; -import { - AccessListEIP2930Transaction, - BlobEIP4844Transaction, - FeeMarketEIP1559Transaction, - LegacyTransaction, - TransactionFactory, - TypedTxData, -} from "@ethereumjs/tx"; - -type CustomChainArg = Parameters[0]; - -/** - * Sign ethereum transaction data offline. Can be used with both mainnet and custom chains. - * - * @param txData transaction data (format must be compatible with @ethereumjs/tx) - * @param privateKey HEX private signing key - * @param customChainInfo optional custom chain information (default: mainnet) - * - * @returns serialized transaction, txId (hash) and signedTransaction object - */ -export function signTransaction( - txData: TypedTxData, - privateKey: string, - customChainInfo?: CustomChainArg, -): { - serializedTransactionHex: string; - txId: string; - signedTransactionObject: - | LegacyTransaction - | AccessListEIP2930Transaction - | FeeMarketEIP1559Transaction - | BlobEIP4844Transaction; -} { - let chainConfiguration = new Common({ chain: Chain.Mainnet }); - if (customChainInfo) { - chainConfiguration = Common.custom(customChainInfo); - } - - const transaction = TransactionFactory.fromTxData(txData, { - common: chainConfiguration, - }); - if (privateKey.toLowerCase().startsWith("0x")) { - privateKey = privateKey.slice(2); - } - const signedTransaction = transaction.sign(Buffer.from(privateKey, "hex")); - - const hash = signedTransaction.hash(); - const txId = "0x" + Buffer.from(hash).toString("hex"); - const serializedTransaction = signedTransaction.serialize(); - const serializedTransactionHex = - "0x" + Buffer.from(serializedTransaction).toString("hex"); - - return { - serializedTransactionHex, - txId, - signedTransactionObject: signedTransaction, - }; -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/types/model-type-guards.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/types/model-type-guards.ts deleted file mode 100644 index 0bab759826..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/types/model-type-guards.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Web3Error } from "web3"; -import { - ContractJsonDefinition, - ContractKeychainDefinition, - DeployedContractJsonDefinition, - GasTransactionConfig, - GasTransactionConfigEIP1559, - GasTransactionConfigLegacy, - Web3SigningCredentialCactiKeychainRef, - Web3SigningCredentialGethKeychainPassword, - Web3SigningCredentialNone, - Web3SigningCredentialPrivateKeyHex, - Web3SigningCredentialType, -} from "../generated/openapi/typescript-axios/api"; - -export function isWeb3SigningCredentialPrivateKeyHex(x?: { - type?: Web3SigningCredentialType; -}): x is Web3SigningCredentialPrivateKeyHex { - return x?.type === Web3SigningCredentialType.PrivateKeyHex; -} - -export function isWeb3SigningCredentialNone(x?: { - type?: Web3SigningCredentialType; -}): x is Web3SigningCredentialNone { - return x?.type === Web3SigningCredentialType.None; -} - -export function isWeb3SigningCredentialGethKeychainPassword(x?: { - type?: Web3SigningCredentialType; -}): x is Web3SigningCredentialGethKeychainPassword { - return x?.type === Web3SigningCredentialType.GethKeychainPassword; -} - -export function isWeb3SigningCredentialCactiKeychainRef(x?: { - type?: Web3SigningCredentialType; - keychainEntryKey?: string | unknown; - keychainId?: string | unknown; -}): x is Web3SigningCredentialCactiKeychainRef { - return ( - !!x?.type && - x?.type === Web3SigningCredentialType.CactiKeychainRef && - !!x?.keychainEntryKey && - typeof x?.keychainEntryKey === "string" && - x?.keychainEntryKey.trim().length > 0 && - !!x?.keychainId && - typeof x?.keychainId === "string" && - x?.keychainId.trim().length > 0 - ); -} - -export function isGasTransactionConfigLegacy( - gasConfig: GasTransactionConfig, -): gasConfig is GasTransactionConfigLegacy { - const typedGasConfig = gasConfig as GasTransactionConfigLegacy; - return ( - typeof typedGasConfig.gas !== "undefined" || - typeof typedGasConfig.gasPrice !== "undefined" - ); -} - -export function isGasTransactionConfigEIP1559( - gasConfig: GasTransactionConfig, -): gasConfig is GasTransactionConfigEIP1559 { - const typedGasConfig = gasConfig as GasTransactionConfigEIP1559; - return ( - typeof typedGasConfig.gasLimit !== "undefined" || - typeof typedGasConfig.maxFeePerGas !== "undefined" || - typeof typedGasConfig.maxPriorityFeePerGas !== "undefined" - ); -} - -export function isContractJsonDefinition( - contract: unknown, -): contract is ContractJsonDefinition { - const typedContract = contract as ContractJsonDefinition; - return typeof typedContract.contractJSON !== "undefined"; -} - -export function isDeployedContractJsonDefinition( - contract: unknown, -): contract is DeployedContractJsonDefinition { - const typedContract = contract as DeployedContractJsonDefinition; - return ( - typeof typedContract.contractJSON !== "undefined" && - typeof typedContract.contractAddress !== "undefined" - ); -} - -export function isContractKeychainDefinition( - contract: unknown, -): contract is ContractKeychainDefinition { - const typedContract = contract as ContractKeychainDefinition; - return ( - typeof typedContract.contractName !== "undefined" && - typeof typedContract.keychainId !== "undefined" - ); -} - -export function isWeb3Error(error: unknown): error is Web3Error { - return ( - (error as Web3Error).name !== undefined && - (error as Web3Error).code !== undefined - ); -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/types/util-types.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/types/util-types.ts deleted file mode 100644 index d7c231a8a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/types/util-types.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Bytes, FMT_BYTES, FMT_NUMBER, Numbers } from "web3"; - -const WEB3_RECEIPT_SUCCESS_CODE = "1"; - -/** - * Convert `Numbers` and `Bytes` occurrences to string. - * Use with web3js response types where custom (string) return format was applied but - * didn't affect the response type. - * - * @warn Ensure that web3 method really returns string encoded numbers and bytes before using this! - */ -export type ConvertWeb3ReturnToString = { - [K in keyof T]: T[K] extends Numbers | Bytes | undefined ? string : T[K]; -}; - -/** - * Convert status code to boolean value. - * - * @param status transaction receipt status - * @returns boolean or undefined if status not defined - */ -export function convertWeb3ReceiptStatusToBool( - status?: Numbers, -): boolean | undefined { - if (status) { - return status.toString() === WEB3_RECEIPT_SUCCESS_CODE; - } - - return undefined; -} - -/** - * Custom web3 return format that will convert numbers and bytes to string. - * - * @warn doesn't work everywhere, sometimes you must copy-paste it directly to satisfy web3 generics. - */ -export const Web3StringReturnFormat = { - number: FMT_NUMBER.STR, - bytes: FMT_BYTES.HEX, -}; diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/deploy-contract-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/deploy-contract-v1-endpoint.ts deleted file mode 100644 index b05396bdac..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/deploy-contract-v1-endpoint.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorEthereum } from "../plugin-ledger-connector-ethereum"; -import OAS from "../../json/openapi.json"; -import { ERR_INVALID_RESPONSE } from "web3"; -import { isWeb3Error } from "../public-api"; - -export interface IDeployContractSolidityBytecodeOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorEthereum; -} - -export class DeployContractEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeployContractEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeployContractEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeployContractSolidityBytecodeOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res - .status(200) - .json(await this.options.connector.deployContract(req.body)); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - // Return errors responses from ethereum node as user errors - if (isWeb3Error(ex) && ex.code === ERR_INVALID_RESPONSE) { - res.status(400).json({ - message: "Invalid Response Error", - error: safeStringifyException(ex), - }); - return; - } - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/get-prometheus-exporter-metrics-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/get-prometheus-exporter-metrics-v1-endpoint.ts deleted file mode 100644 index 34135a99e6..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/get-prometheus-exporter-metrics-v1-endpoint.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Checks, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; - -import { PluginLedgerConnectorEthereum } from "../plugin-ledger-connector-ethereum"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - connector: PluginLedgerConnectorEthereum; - logLevel?: LogLevelDesc; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - private readonly log: Logger; - - constructor( - public readonly options: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = "GetPrometheusExporterMetricsEndpointV1#constructor()"; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.connector, `${fnTag} options.connector`); - - const label = "get-prometheus-exporter-metrics-endpoint"; - const level = options.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ label, level }); - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetPrometheusExporterMetrics#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - res - .status(200) - .send(await this.options.connector.getPrometheusExporterMetrics()); - } catch (ex) { - this.log.error(`Crash while serving ${fnTag}`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: safeStringifyException(ex) }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/invoke-contract-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/invoke-contract-v1-endpoint.ts deleted file mode 100644 index a98591e7d2..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/invoke-contract-v1-endpoint.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorEthereum } from "../plugin-ledger-connector-ethereum"; - -import OAS from "../../json/openapi.json"; -import { ERR_INVALID_RESPONSE } from "web3"; -import { isWeb3Error } from "../public-api"; - -export interface IInvokeContractEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorEthereum; -} - -export class InvokeContractEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InvokeContractEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return InvokeContractEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IInvokeContractEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res.json(await this.options.connector.invokeContract(req.body)); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - // Return errors responses from ethereum node as user errors - if (isWeb3Error(ex) && ex.code === ERR_INVALID_RESPONSE) { - res.status(400).json({ - message: "Invalid Response Error", - error: safeStringifyException(ex), - }); - return; - } - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/invoke-raw-web3eth-contract-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/invoke-raw-web3eth-contract-v1-endpoint.ts deleted file mode 100644 index 040119f4d6..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/invoke-raw-web3eth-contract-v1-endpoint.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginLedgerConnectorEthereum } from "../plugin-ledger-connector-ethereum"; -import OAS from "../../json/openapi.json"; -import { InvokeRawWeb3EthContractV1Response } from "../generated/openapi/typescript-axios"; -import { ERR_INVALID_RESPONSE } from "web3"; -import { isWeb3Error } from "../public-api"; - -export interface IInvokeRawWeb3EthContractEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorEthereum; -} - -export class InvokeRawWeb3EthContractEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InvokeRawWeb3EthContractEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return InvokeRawWeb3EthContractEndpoint.CLASS_NAME; - } - - constructor( - public readonly options: IInvokeRawWeb3EthContractEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - const methodResponse = - await this.options.connector.invokeRawWeb3EthContract(req.body); - const response: InvokeRawWeb3EthContractV1Response = { - status: 200, - data: methodResponse, - }; - res.json(response); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - // Return errors responses from ethereum node as user errors - if (isWeb3Error(ex) && ex.code === ERR_INVALID_RESPONSE) { - res.status(400).json({ - message: "Invalid Response Error", - error: safeStringifyException(ex), - }); - return; - } - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/invoke-raw-web3eth-method-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/invoke-raw-web3eth-method-v1-endpoint.ts deleted file mode 100644 index 49e77093ad..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/invoke-raw-web3eth-method-v1-endpoint.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Express, Request, Response } from "express"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginLedgerConnectorEthereum } from "../plugin-ledger-connector-ethereum"; -import OAS from "../../json/openapi.json"; -import { InvokeRawWeb3EthMethodV1Response, isWeb3Error } from "../public-api"; -import { ERR_INVALID_RESPONSE } from "web3"; - -export interface IInvokeRawWeb3EthMethodEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorEthereum; -} - -export class InvokeRawWeb3EthMethodEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InvokeRawWeb3EthMethodEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return InvokeRawWeb3EthMethodEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IInvokeRawWeb3EthMethodEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - - try { - const methodResponse = - await this.options.connector.invokeRawWeb3EthMethod(req.body); - const response: InvokeRawWeb3EthMethodV1Response = { - status: 200, - data: methodResponse, - }; - res.json(response); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - // Return errors responses from ethereum node as user errors - if (isWeb3Error(ex) && ex.code === ERR_INVALID_RESPONSE) { - res.status(400).json({ - message: "Invalid Response Error", - error: safeStringifyException(ex), - }); - return; - } - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/run-transaction-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/run-transaction-v1-endpoint.ts deleted file mode 100644 index edd766d3b8..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/run-transaction-v1-endpoint.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorEthereum } from "../plugin-ledger-connector-ethereum"; - -import OAS from "../../json/openapi.json"; -import { ERR_INVALID_RESPONSE } from "web3"; -import { isWeb3Error } from "../public-api"; - -export interface IRunTransactionEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorEthereum; -} - -export class RunTransactionEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RunTransactionEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return RunTransactionEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IRunTransactionEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res.json(await this.options.connector.transact(req.body)); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - - // Return errors responses from ethereum node as user errors - if (isWeb3Error(ex) && ex.code === ERR_INVALID_RESPONSE) { - res.status(400).json({ - message: "Invalid Response Error", - error: safeStringifyException(ex), - }); - return; - } - - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts deleted file mode 100644 index cb94cce4c5..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts +++ /dev/null @@ -1,417 +0,0 @@ -/** - * Contains abstract base WatchBlocksV1Endpoint, it specific implementation (with WebSockets and HTTP polling) and some helper methods. - * In the future we may consider dividing this into separate files, but for now (since codebase is small) it makes more sense to keep - * everything in one place for simplicity. - */ - -import Web3, { BlockHeaderOutput, FMT_BYTES, FMT_NUMBER } from "web3"; -import { NewHeadsSubscription } from "web3-eth"; -import type { Socket as SocketIoSocket } from "socket.io"; - -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - WatchBlocksV1Options, - WatchBlocksV1Progress, - WatchBlocksV1, - Web3Transaction, -} from "../generated/openapi/typescript-axios"; -import { - ConvertWeb3ReturnToString, - Web3StringReturnFormat, -} from "../types/util-types"; - -const DEFAULT_HTTP_POLL_INTERVAL = 1000 * 5; // 5 seconds -const LAST_SEEN_LATEST_BLOCK = -1; // must be negative number, will be replaced with latest block in code - -export interface IWatchBlocksV1EndpointConfiguration { - logLevel?: LogLevelDesc; - socket: SocketIoSocket; - web3: InstanceType; - options?: WatchBlocksV1Options; -} - -/** - * Returns true if provider of given web3js instance supports subscriptions (e.g. websocket connection) - * - * @param web3 web3js instance - * @returns boolean - */ -function isWeb3SubscriptionSupported(web3: InstanceType) { - const provider = web3.currentProvider; - if (!provider) { - throw new Error( - "Missing Web3 provider, can't monitor new blocks in any way", - ); - } - return provider.supportsSubscriptions(); -} - -/** - * Factory method for creating either subscription based or HTTP-poll based `WatchBlocksV1Endpoint` - * (depending on web3js instance capability) - * - * @param config `WatchBlocksV1Endpoint` configuration - * @returns `WatchBlocksV1Endpoint` - */ -export function createWatchBlocksV1Endpoint( - config: IWatchBlocksV1EndpointConfiguration, -): WatchBlocksV1Endpoint { - if (isWeb3SubscriptionSupported(config.web3)) { - return new WatchBlocksV1SubscriptionEndpoint(config); - } else { - return new WatchBlocksV1HttpPollEndpoint(config); - } -} - -/** - * Base abstract class to be extended by specific WatchBlocks strategies. - * Contains common logic for all monitoring endpoints. - */ -export abstract class WatchBlocksV1Endpoint { - protected readonly log: Logger; - protected readonly socket: SocketIoSocket< - Record void>, - Record void> - >; - protected readonly web3: InstanceType; - protected readonly isGetBlockData: boolean; - protected lastSeenBlock: number; - private _isSubscribed = false; - - /** - * Note: should be overwritten by the strategy classes. - */ - public get className(): string { - return "WatchBlocksV1Endpoint"; - } - - public get isSubscribed(): boolean { - return !this.socket.disconnected && this._isSubscribed; - } - - public set isSubscribed(value: boolean) { - this._isSubscribed = value; - } - - constructor(public readonly config: IWatchBlocksV1EndpointConfiguration) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(config, `${fnTag} arg options`); - Checks.truthy(config.web3, `${fnTag} arg options.web3`); - Checks.truthy(config.socket, `${fnTag} arg options.socket`); - - this.web3 = config.web3; - this.socket = config.socket; - this.isGetBlockData = config.options?.getBlockData === true; - this.lastSeenBlock = - config.options?.lastSeenBlock ?? LAST_SEEN_LATEST_BLOCK; - - const level = this.config.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.socket.on("disconnect", async (reason: string) => { - this.log.info( - `WebSocket:disconnect => ${this.socket.id} reason: ${reason}`, - ); - await this.unsubscribe(); - }); - - this.socket.on(WatchBlocksV1.Unsubscribe, async () => { - this.log.info(`${WatchBlocksV1.Unsubscribe} => ${this.socket.id}`); - await this.unsubscribe(); - }); - } - - /** - * Get block with specific number from ethereum, parse it and return - * `WatchBlocksV1Progress` with `blockData`. - * - * @param blockNumber - * @returns `WatchBlocksV1Progress - */ - protected async getFullBlockProgress( - blockNumber: number, - ): Promise { - const web3BlockData = await this.web3.eth.getBlock(blockNumber, true, { - number: FMT_NUMBER.STR, - bytes: FMT_BYTES.HEX, - }); - - return { - blockData: { - ...web3BlockData, - // force empty transactions object instead of undefined, also narrow from string[] - transactions: (web3BlockData.transactions ?? - []) as unknown as Web3Transaction[], - }, - }; - } - - /** - * Parse block header data and return `WatchBlocksV1Progress` with `blockHeader`. - * @param web3BlockData `BlockHeaderOutput` - * @returns `WatchBlocksV1Progress` - */ - protected async headerDataToBlockProgress( - web3BlockData: BlockHeaderOutput, - ): Promise { - // Force fix type of sha3Uncles - let sha3Uncles: string = web3BlockData.sha3Uncles as unknown as string; - if (Array.isArray(web3BlockData.sha3Uncles)) { - sha3Uncles = web3BlockData.sha3Uncles.toString(); - } - - return { - blockHeader: { - ...(web3BlockData as ConvertWeb3ReturnToString), - sha3Uncles, - }, - }; - } - - /** - * Push to the socketio client all missing blocks since `lastSeenBlock`, up to the current latest block. - * Will not push if subscription was stopped in the meantime. - * Can throw exceptions. - */ - protected async emitAllSinceLastSeenBlock(): Promise { - const { socket, log, web3, isGetBlockData } = this; - - const latestBlockNumber = await web3.eth.getBlockNumber({ - number: FMT_NUMBER.NUMBER, - bytes: FMT_BYTES.HEX, - }); - - if (this.lastSeenBlock === LAST_SEEN_LATEST_BLOCK) { - this.lastSeenBlock = latestBlockNumber; - log.debug( - "emitAllSinceLastSeenBlock() - Using latest block number as lastSeenBlock:", - latestBlockNumber, - ); - } - - while (this.lastSeenBlock < latestBlockNumber) { - const blockNumber = this.lastSeenBlock + 1; - log.debug( - `emitAllSinceLastSeenBlock() - pushing block ${blockNumber} (latest ${latestBlockNumber})`, - ); - - let next: WatchBlocksV1Progress; - if (isGetBlockData) { - next = await this.getFullBlockProgress(blockNumber); - } else { - const web3BlockData = await web3.eth.getBlock(blockNumber, false, { - number: FMT_NUMBER.STR, - bytes: FMT_BYTES.HEX, - }); - next = await this.headerDataToBlockProgress({ - ...web3BlockData, - sha3Uncles: web3BlockData.sha3Uncles as any, - size: undefined, - totalDifficulty: undefined, - uncles: undefined, - transactions: undefined, - }); - } - - if (!this.isSubscribed) { - log.info( - "emitAllSinceLastSeenBlock() - not subscribed anymore, stopping...", - ); - break; - } - - socket.emit(WatchBlocksV1.Next, next); - - this.lastSeenBlock = blockNumber; - } - - log.debug("emitAllSinceLastSeenBlock() - done"); - } - - /** - * Start monitoring new blocks from the ledger (either full blocks with transaction data or just the headers). - * Will fetch and push missing blocks since `lastSeenBlock` provided. - */ - public abstract subscribe(): Promise; - - /** - * Stop monitoring new blocks. - */ - public abstract unsubscribe(): Promise; -} - -//////////////////////////////////////////////////////////////////////////////// -// WatchBlocksV1HttpPollEndpoint -//////////////////////////////////////////////////////////////////////////////// - -/** - * Implementation of `WatchBlocksV1Endpoint` using HTTP polling method. - * Should be used if ethereum node (i.e. web3js connection) doesn't support - * async subscriptions. - */ -export class WatchBlocksV1HttpPollEndpoint extends WatchBlocksV1Endpoint { - private monitoringInterval: NodeJS.Timer | undefined; - private httpPollInterval: number; - - public get className(): string { - return "WatchBlocksV1HttpPollEndpoint"; - } - - constructor(public readonly config: IWatchBlocksV1EndpointConfiguration) { - super(config); - this.httpPollInterval = - config.options?.httpPollInterval ?? DEFAULT_HTTP_POLL_INTERVAL; - } - - public async subscribe() { - const { socket, log } = this; - log.info(`${WatchBlocksV1.Subscribe} [HTTP Polling] => ${socket.id}`); - - if (this.isSubscribed) { - this.log.error( - "subscribe() - monitoring has already been started! Restarting it...", - ); - await this.unsubscribe(); - } - this.isSubscribed = true; - - socket.on("disconnect", async () => this.unsubscribe()); - socket.on(WatchBlocksV1.Unsubscribe, async () => this.unsubscribe()); - - log.debug("Starting new HTTP polling interval..."); - this.monitoringInterval = setInterval(async () => { - try { - await this.emitAllSinceLastSeenBlock(); - } catch (error) { - log.warn(`${this.className} - polling thread exception:`, error); - } - }, this.httpPollInterval); - - return this; - } - - public async unsubscribe(): Promise { - this.log.debug("Unsubscribing HTTP polling monitor..."); - try { - clearInterval(this.monitoringInterval); - } catch (error) { - this.log.info( - `Could not clear polling interval id ${this.monitoringInterval}, error:`, - error, - ); - } - this.monitoringInterval = undefined; - this.isSubscribed = false; - } -} - -//////////////////////////////////////////////////////////////////////////////// -// WatchBlocksV1SubscriptionEndpoint -//////////////////////////////////////////////////////////////////////////////// - -/** - * Implementation of `WatchBlocksV1Endpoint` using web3js subscription (WebSocket) - * Should be used if ethereum node (i.e. web3js connection) supports async subscriptions. - * Throws if wrong web3js provider was used. - */ - -export class WatchBlocksV1SubscriptionEndpoint extends WatchBlocksV1Endpoint { - private newBlocksSubscription: NewHeadsSubscription | undefined; - - public get className(): string { - return "WatchBlocksV1SubscriptionEndpoint"; - } - - constructor(public readonly config: IWatchBlocksV1EndpointConfiguration) { - super(config); - if (!isWeb3SubscriptionSupported(this.web3)) { - throw new Error("Provided web3 provider doesn't support subscriptions!"); - } - } - - public async subscribe() { - const { socket, log, web3, isGetBlockData } = this; - log.info(`${WatchBlocksV1.Subscribe} [WS Subscription] => ${socket.id}`); - - if (this.isSubscribed) { - this.log.error( - "subscribe() - monitoring has already been started! Restarting it...", - ); - await this.unsubscribe(); - } - this.isSubscribed = true; - - log.info("Pushing missing blocks since lastSeenBlock..."); - await this.emitAllSinceLastSeenBlock(); - - log.debug("Subscribing to Web3 new block headers event..."); - this.newBlocksSubscription = await web3.eth.subscribe( - "newBlockHeaders", - undefined, - Web3StringReturnFormat, - ); - - this.newBlocksSubscription.on("data", async (blockHeader) => { - try { - log.debug("newBlockHeaders:", blockHeader); - - if (typeof blockHeader.number === undefined) { - throw new Error( - `Missing block number in received block header (number: ${blockHeader.number}, hash: ${blockHeader.hash})`, - ); - } - const blockNumber = Number(blockHeader.number); - if (blockNumber - this.lastSeenBlock > 2) { - log.info( - `Detected missing blocks since latest one (blockNumber: ${blockNumber}, lastSeenBlock: ${this.lastSeenBlock})`, - ); - await this.emitAllSinceLastSeenBlock(); - } - - let next: WatchBlocksV1Progress; - if (isGetBlockData) { - next = await this.getFullBlockProgress(blockNumber); - } else { - next = await this.headerDataToBlockProgress(blockHeader); - } - - socket.emit(WatchBlocksV1.Next, next); - - this.lastSeenBlock = blockNumber; - } catch (error) { - log.warn("Error when parsing subscribed block data:", error); - } - }); - - this.newBlocksSubscription.on("error", async (error) => { - console.log("Error when subscribing to new block header: ", error); - socket.emit(WatchBlocksV1.Error, safeStringifyException(error)); - await this.unsubscribe(); - }); - - return this; - } - - public async unsubscribe(): Promise { - this.log.debug("Unsubscribing block subscription monitor..."); - if (this.newBlocksSubscription) { - try { - await this.newBlocksSubscription.unsubscribe(); - } catch (error) { - this.log.info( - "Could not unsubscribe from web3js monitor, error:", - error, - ); - } - } - this.newBlocksSubscription = undefined; - this.isSubscribed = false; - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/scripts/get-ethereum-connector-status.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/scripts/get-ethereum-connector-status.ts deleted file mode 100644 index 5b2d81ad11..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/scripts/get-ethereum-connector-status.ts +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env node - -/** - * Simple command line tool to check ledger connection of running ethereum connector. - * Will try to get latest block from the ledger. - * - * Usage: - * After installing the connector package... - * `npm install -g` in it's dir or directly from NPM - `npm install @hyperledger/cactus-plugin-ledger-connector-ethereum` - * ...you can start the command line tool with npx: - * `npx cacti-ethereum-connector-status :` - * - * TODO: - * - Add healthcheck endpoint to ethereum connector and query it instead of reading the latest block. - */ - -import { - EthereumApiClient, - EthereumApiClientOptions, -} from "../main/typescript/public-api"; - -import minimist from "minimist"; -import path from "path"; -import axios from "axios"; -import chalk from "chalk"; - -type AuthOptions = { - apiKey?: string; - accessToken?: string; - username?: string; - password?: string; -}; - -async function main(url: string, auth: AuthOptions = {}) { - try { - console.log(`Check Ethereum connector ${url}...`); - const config = new EthereumApiClientOptions({ - basePath: url, - ...auth, - }); - const ethereumApiClient = new EthereumApiClient(config); - - // Get latest block - const connectorResponse = await ethereumApiClient.invokeWeb3EthMethodV1({ - methodName: "getBlock", - params: ["latest"], - }); - - // Check response - if ( - !connectorResponse || - !connectorResponse.data || - !connectorResponse.data.data || - connectorResponse.data.status !== 200 - ) { - console.log(connectorResponse.data); - throw new Error("Invalid response from the connector"); - } - - const blockData = connectorResponse.data.data; - console.log( - chalk.green(`OK - Latest block #${blockData.number} ${blockData.hash}`), - ); - } catch (error: unknown) { - let errorMessage = `Error: ${error}`; - if (axios.isAxiosError(error)) { - errorMessage = `${error.name}: ${error.message}`; - } - - console.error(chalk.red(errorMessage)); - process.exit(2); - } -} - -function showHelp() { - const scriptName = path.basename(__filename); - console.log( - chalk.yellow( - `Usage: ${scriptName} : [-h|--help] [--apiKey ] [--accessToken ] [--username --password ]`, - ), - ); - process.exit(1); -} - -if (require.main === module) { - const argv = minimist(process.argv.slice(2)); - if ( - argv["h"] || - argv["help"] || - argv["_"].length !== 1 || - (argv["username"] && !argv["password"]) || - (argv["password"] && !argv["username"]) - ) { - showHelp(); - } - const connectorUrl = argv["_"][0]; - - // Ensure valid URL was provided. - // Without it the connector request will hang indefinitely. - try { - new URL(connectorUrl); - } catch (err) { - console.error(chalk.red(err)); - showHelp(); - } - - main(connectorUrl, { - apiKey: argv["apiKey"], - accessToken: argv["accessToken"], - username: argv["username"], - password: argv["password"], - }); -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.json b/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.json deleted file mode 100644 index 799cbad7c7..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.json +++ /dev/null @@ -1,418 +0,0 @@ -{ - "contractName": "HelloWorld", - "abi": [ - { - "inputs": [], - "name": "getName", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sayHello", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "setName", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.7.2+commit.51b20bc0\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sayHello\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol\":\"HelloWorld\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol\":{\"keccak256\":\"0x0b78fa11f33f7936a80da194c49f04198e38947e3f98f3a7b765b4adb4c455c1\",\"urls\":[\"bzz-raw://12697aa12341c70ed7a411a27a17398dcb2d4336a14dac51845e2123acf174c7\",\"dweb:/ipfs/QmPhH1UbHtUeeen9W2qMDwEVVWAtVJSMN29Nch5q8Gax1D\"]}},\"version\":1}", - "bytecode": "60c0604052600d60808190526c4361707461696e43616374757360981b60a090815261002e9160009190610041565b5034801561003b57600080fd5b506100d4565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061008257805160ff19168380011785556100af565b828001600101855582156100af579182015b828111156100af578251825591602001919060010190610094565b506100bb9291506100bf565b5090565b5b808211156100bb57600081556001016100c0565b61030f806100e36000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806317d7de7c14610046578063c47f0027146100c3578063ef5fb05b1461016b575b600080fd5b61004e610173565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610169600480360360208110156100d957600080fd5b8101906020810181356401000000008111156100f457600080fd5b82018360208201111561010657600080fd5b8035906020019184600183028401116401000000008311171561012857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610209945050505050565b005b61004e610220565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156101ff5780601f106101d4576101008083540402835291602001916101ff565b820191906000526020600020905b8154815290600101906020018083116101e257829003601f168201915b5050505050905090565b805161021c906000906020840190610246565b5050565b60408051808201909152600c81526b48656c6c6f20576f726c642160a01b602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061028757805160ff19168380011785556102b4565b828001600101855582156102b4579182015b828111156102b4578251825591602001919060010190610299565b506102c09291506102c4565b5090565b5b808211156102c057600081556001016102c556fea2646970667358221220965216915797db694e698c024753d560e1989f2aebb14463f9225b2297003b2c64736f6c63430007020033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100415760003560e01c806317d7de7c14610046578063c47f0027146100c3578063ef5fb05b1461016b575b600080fd5b61004e610173565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610169600480360360208110156100d957600080fd5b8101906020810181356401000000008111156100f457600080fd5b82018360208201111561010657600080fd5b8035906020019184600183028401116401000000008311171561012857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610209945050505050565b005b61004e610220565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156101ff5780601f106101d4576101008083540402835291602001916101ff565b820191906000526020600020905b8154815290600101906020018083116101e257829003601f168201915b5050505050905090565b805161021c906000906020840190610246565b5050565b60408051808201909152600c81526b48656c6c6f20576f726c642160a01b602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061028757805160ff19168380011785556102b4565b828001600101855582156102b4579182015b828111156102b4578251825591602001919060010190610299565b506102c09291506102c4565b5090565b5b808211156102c057600081556001016102c556fea2646970667358221220965216915797db694e698c024753d560e1989f2aebb14463f9225b2297003b2c64736f6c63430007020033", - "sourceMap": "463:37:0:-:0;439:322;463:37;;439:322;463:37;;;-1:-1:-1;;;463:37:0;;;;;;-1:-1:-1;;463:37:0;;:::i;:::-;;439:322;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;439:322:0;;;-1:-1:-1;439:322:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "439:322:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;598:81;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;683:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;683:76:0;;-1:-1:-1;683:76:0;;-1:-1:-1;;;;;683:76:0:i;:::-;;505:89;;;:::i;598:81::-;670:4;663:11;;;;;;;;-1:-1:-1;;663:11:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;638:13;;663:11;;670:4;;663:11;;670:4;663:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;598:81;:::o;683:76::-;740:14;;;;:4;;:14;;;;;:::i;:::-;;683:76;:::o;505:89::-;568:21;;;;;;;;;;;;-1:-1:-1;;;568:21:0;;;;505:89;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;", - "sourcePath": "/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol", - "compiler": { - "name": "solc", - "version": "0.7.2+commit.51b20bc0" - }, - "networks": {}, - "ast": { - "absolutePath": "/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol", - "exportedSymbols": { - "HelloWorld": [ - 31 - ] - }, - "id": 32, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 31, - "linearizedBaseContracts": [ - 31 - ], - "name": "HelloWorld", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "463:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "463:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "hexValue": "4361707461696e436163747573", - "id": 3, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:15:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", - "typeString": "literal_string \"CaptainCactus\"" - }, - "value": "CaptainCactus" - }, - "visibility": "private" - }, - { - "body": { - "id": 11, - "nodeType": "Block", - "src": "562:32:0", - "statements": [ - { - "expression": { - "hexValue": "48656c6c6f20576f726c6421", - "id": 9, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "575:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", - "typeString": "literal_string \"Hello World!\"" - }, - "value": "Hello World!" - }, - "functionReturnParameters": 8, - "id": 10, - "nodeType": "Return", - "src": "568:21:0" - } - ] - }, - "functionSelector": "ef5fb05b", - "id": 12, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sayHello", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5, - "nodeType": "ParameterList", - "parameters": [], - "src": "523:2:0" - }, - "returnParameters": { - "id": 8, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12, - "src": "547:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 6, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "547:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "546:15:0" - }, - "scope": 31, - "src": "505:89:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 19, - "nodeType": "Block", - "src": "655:24:0", - "statements": [ - { - "expression": { - "id": 17, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "670:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 16, - "id": 18, - "nodeType": "Return", - "src": "663:11:0" - } - ] - }, - "functionSelector": "17d7de7c", - "id": 20, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13, - "nodeType": "ParameterList", - "parameters": [], - "src": "614:2:0" - }, - "returnParameters": { - "id": 16, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 20, - "src": "638:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "638:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "637:15:0" - }, - "scope": 31, - "src": "598:81:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 29, - "nodeType": "Block", - "src": "732:27:0", - "statements": [ - { - "expression": { - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 25, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "740:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 26, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "747:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "740:14:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 28, - "nodeType": "ExpressionStatement", - "src": "740:14:0" - } - ] - }, - "functionSelector": "c47f0027", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "newName", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "700:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "700:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "699:23:0" - }, - "returnParameters": { - "id": 24, - "nodeType": "ParameterList", - "parameters": [], - "src": "732:0:0" - }, - "scope": 31, - "src": "683:76:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 32, - "src": "439:322:0" - } - ], - "src": "413:349:0" - }, - "functionHashes": { - "getName()": "17d7de7c", - "sayHello()": "ef5fb05b", - "setName(string)": "c47f0027" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "156600", - "executionCost": "infinite", - "totalCost": "infinite" - }, - "external": { - "getName()": "infinite", - "sayHello()": "infinite", - "setName(string)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.sol b/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.sol deleted file mode 100644 index befd843936..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.sol +++ /dev/null @@ -1,26 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; - -contract HelloWorld { - string private name = "CaptainCactus"; - - function sayHello () public pure returns (string memory) { - return 'Hello World!'; - } - - function getName() public view returns (string memory) - { - return name; - } - - function setName(string memory newName) public - { - name = newName; - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-with-arg-contract/HelloWorldWithArg.json b/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-with-arg-contract/HelloWorldWithArg.json deleted file mode 100644 index 3eb1600267..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-with-arg-contract/HelloWorldWithArg.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "contractName": "HelloWorldWithArg", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "getName", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sayHello", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "setName", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "608060405234801561001057600080fd5b5060405161053b38038061053b8339818101604052602081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b50604052505081516100f6915060009060208401906100fd565b505061019e565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826101335760008555610179565b82601f1061014c57805160ff1916838001178555610179565b82800160010185558215610179579182015b8281111561017957825182559160200191906001019061015e565b50610185929150610189565b5090565b5b80821115610185576000815560010161018a565b61038e806101ad6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806317d7de7c14610046578063c47f0027146100c3578063ef5fb05b1461016b575b600080fd5b61004e610173565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610169600480360360208110156100d957600080fd5b8101906020810181356401000000008111156100f457600080fd5b82018360208201111561010657600080fd5b8035906020019184600183028401116401000000008311171561012857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610209945050505050565b005b61004e610220565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156101ff5780601f106101d4576101008083540402835291602001916101ff565b820191906000526020600020905b8154815290600101906020018083116101e257829003601f168201915b5050505050905090565b805161021c9060009060208401906102b7565b5050565b6060600060405160200180806502432b63637960d51b815250600601828054600181600116156101000203166002900480156102935780601f10610271576101008083540402835291820191610293565b820191906000526020600020905b81548152906001019060200180831161027f575b5050602160f81b815260408051601e19818403018152600190920190529250505090565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826102ed5760008555610333565b82601f1061030657805160ff1916838001178555610333565b82800160010185558215610333579182015b82811115610333578251825591602001919060010190610318565b5061033f929150610343565b5090565b5b8082111561033f576000815560010161034456fea26469706673582212203e4ecb91cb209273de4487a748ef3afbab8f80c825bc13c7da66ac1b5c8dbe5e64736f6c63430007060033", - "gasEstimates": { - "creation": { - "codeDepositCost": "182000", - "executionCost": "infinite", - "totalCost": "infinite" - }, - "external": { - "getName()": "infinite", - "sayHello()": "infinite", - "setName(string)": "infinite" - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-with-arg-contract/HelloWorldWithArg.sol b/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-with-arg-contract/HelloWorldWithArg.sol deleted file mode 100644 index cb30edb8ac..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-with-arg-contract/HelloWorldWithArg.sol +++ /dev/null @@ -1,28 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; - -contract HelloWorldWithArg { - string private name; - - constructor(string memory _name) { - name = _name; - } - - function sayHello() public view returns (string memory) { - return string(abi.encodePacked("Hello ", name, "!")); - } - - function getName() public view returns (string memory) { - return name; - } - - function setName(string memory newName) public { - name = newName; - } -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/cli/run-benchmark-environment.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/cli/run-benchmark-environment.ts deleted file mode 100644 index 88c6ed9a49..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/cli/run-benchmark-environment.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2023 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * CLI for running the benchmark test environment manually. - * Can be used to run the environment and artillery on two separate machines / containers. - * The CLI will create matching artillery configuration in CWD of a caller. - * - * How to use: - * > node ./packages/cactus-plugin-ledger-connector-ethereum/dist/lib/test/typescript/benchmark/cli/run-benchmark-environment.js - */ - -import fs from "fs"; -import yaml from "js-yaml"; -import { - cleanupBenchmarkEnvironment, - getDefaultArtilleryConfigPath, - getDefaultArtilleryFunctionsPath, - setupBenchmarkEnvironment, -} from "../setup/geth-benchmark-env"; - -/** - * Function with main logic, will start the environment in current window and freeze until Ctrl + C or other method is used. - */ -async function run() { - // Start the environment - const envConfig = await setupBenchmarkEnvironment(); - - // Read, patch, and save artillery config for this environment - const artilleryConfig = yaml.load( - fs.readFileSync(getDefaultArtilleryConfigPath(), "utf-8"), - ) as any; - artilleryConfig.config.target = envConfig.target; - artilleryConfig.config.processor = getDefaultArtilleryFunctionsPath(); - artilleryConfig.config.variables = envConfig.variables; - const newConfig = yaml.dump(artilleryConfig); - fs.writeFileSync(".manual-geth-artillery-config.yaml", newConfig); - - console.log("Benchmark environment started..."); - console.log( - "To start the test run the following (in separate console window):", - ); - console.log("> artillery run ./.manual-geth-artillery-config.yaml"); -} - -/** - * Called on exit to cleanup the resources. - * @param exitCode process exit code - */ -async function finish(exitCode = 0) { - await cleanupBenchmarkEnvironment(); - console.log(`Done! (exit code ${exitCode})`); - process.exit(exitCode); -} - -// Cleanups -process.on("SIGTERM", async () => await finish()); -process.on("SIGINT", async () => await finish()); -process.on("uncaughtException", async (err) => { - console.error(`Uncaught error: ${err.message}`); - await finish(1); -}); - -// Main logic -run(); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/setup/artillery-helper-functions.js b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/setup/artillery-helper-functions.js deleted file mode 100644 index c2481892f1..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/setup/artillery-helper-functions.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2023 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * Helper functions used by directly by artillery framework - */ - -module.exports = { - checkInvokeContractWithPrivateKeyResponse: - checkInvokeContractWithPrivateKeyResponse, -}; - -/** - * Check response from invoke-contract endpoint when private key is used. - * It handles false-positive errors that occur due to frequent sending of transactions (not connectors fault), - * i.e. nonce to low or replacement transaction underpriced. - * - * Warning! - * Errors will be shown in report but will not fail the stress test (since they are not integrated with expect plugin) - */ -function checkInvokeContractWithPrivateKeyResponse( - requestParams, - response, - context, - ee, - next, -) { - const responseBody = JSON.parse(response.body); - if (response.statusCode === 200 && responseBody.success) { - return next(); - } - - if ( - response.statusCode === 400 && - (responseBody.error.includes("replacement transaction underpriced") || - responseBody.error.includes("nonce too low")) - ) { - return next(); - } - - console.error(`Wrong response [${response.statusCode}]: ${response.body}`); - return next(new Error(responseBody.error)); -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/setup/geth-benchmark-config.yaml b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/setup/geth-benchmark-config.yaml deleted file mode 100644 index 5afb03b759..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/setup/geth-benchmark-config.yaml +++ /dev/null @@ -1,183 +0,0 @@ -# Copyright 2023 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 -# -# Sample artillery config for stress testing ethereum connector -# You must override target and variables before running manually, e.g. (on linux): -# > artillery run geth-benchmark-config.yaml --target http://0.0.0.0:42237 --variables '{"hello_world_contract_name":["HelloWorld"],"keychain_id":["d2e2f1f8-949a-496f-ac16-ca32b6541b70"],"sender_account":["0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0"]} - -config: - target: http://0.0.0.0:80 - socketio: - path: /api/v1/async/socket-io/connect - http: - timeout: 300 - processor: "./artillery-helper-functions.js" - phases: - - duration: 60 - arrivalRate: 5 - rampTo: 10 - name: Sample load - plugins: - expect: - expectDefault200: false # TODO - status codes - reportFailuresAsErrors: true - variables: - hello_world_contract_name: - - HelloWorld - keychain_id: - - "0" - sender_account: - - "0x0" - sender_private_key: - - "0x0" -scenarios: - - name: contractCallSendWithPrivateKey - weight: 10 - flow: - - post: - url: >- - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract - json: - contract: - contractName: "{{ hello_world_contract_name }}" - keychainId: "{{ keychain_id }}" - invocationType: CALL - methodName: getName - params: [] - gasConfig: - maxPriorityFeePerGas: 2000000000 - web3SigningCredential: - ethAccount: "{{ sender_account }}" - secret: "{{ sender_private_key }}" - type: PRIVATE_KEY_HEX - headers: - Content-Type: application/json - capture: - - json: $.success - as: success - expect: - - contentType: json - - hasProperty: success - - equals: - - "true" - - "{{ success }}" - - post: - url: >- - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract - afterResponse: "checkInvokeContractWithPrivateKeyResponse" - json: - contract: - contractName: "{{ hello_world_contract_name }}" - keychainId: "{{ keychain_id }}" - invocationType: SEND - methodName: setName - params: - - "{{ $randomString() }}" - gasConfig: - maxPriorityFeePerGas: 2000000000 - web3SigningCredential: - ethAccount: "{{ sender_account }}" - secret: "{{ sender_private_key }}" - type: PRIVATE_KEY_HEX - headers: - Content-Type: application/json - expect: - - contentType: json - - statusCode: - - 200 - - 400 # Some errors are expected, other will be reported by afterResponse callback - - name: contractCallSendWithGethKeychain - weight: 3 - flow: - - post: - url: >- - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract - json: - contract: - contractName: "{{ hello_world_contract_name }}" - keychainId: "{{ keychain_id }}" - invocationType: CALL - methodName: getName - params: [] - gasConfig: - maxPriorityFeePerGas: 2000000000 - web3SigningCredential: - ethAccount: "{{ sender_account }}" - secret: "" - type: GETH_KEYCHAIN_PASSWORD - headers: - Content-Type: application/json - capture: - - json: $.success - as: success - expect: - - contentType: json - - hasProperty: success - - equals: - - "true" - - "{{ success }}" - - post: - url: >- - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract - afterResponse: "checkInvokeContractWithPrivateKeyResponse" - json: - contract: - contractName: "{{ hello_world_contract_name }}" - keychainId: "{{ keychain_id }}" - invocationType: SEND - methodName: setName - params: - - "{{ $randomString() }}" - gasConfig: - maxPriorityFeePerGas: 2000000000 - web3SigningCredential: - ethAccount: "{{ sender_account }}" - secret: "" - type: GETH_KEYCHAIN_PASSWORD - headers: - Content-Type: application/json - capture: - - json: $.success - as: success - expect: - - contentType: json - - hasProperty: success - - equals: - - "true" - - "{{ success }}" - - name: etherTransferWithGethKeychain - weight: 1 - flow: - - post: - url: >- - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction - json: - web3SigningCredential: - ethAccount: "{{ sender_account }}" - secret: "" - type: GETH_KEYCHAIN_PASSWORD - transactionConfig: - from: "{{ sender_account }}" - to: "0x000000000000000000000000000000000000dEaD" - value: 500 - headers: - Content-Type: application/json - capture: - - json: $.transactionReceipt - as: transactionReceipt - expect: - - contentType: json - - hasProperty: transactionReceipt - - name: getPrometheusMetrics - weight: 1 - flow: - - get: - url: >- - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics - - name: watchBlocksFor30Seconds - weight: 1 - engine: socketio - flow: - - emit: - channel: org.hyperledger.cacti.api.async.ethereum.WatchBlocksV1.Subscribe - - think: 30 diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/setup/geth-benchmark-env.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/setup/geth-benchmark-env.ts deleted file mode 100644 index 5ab53eb866..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/benchmark/setup/geth-benchmark-env.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright 2023 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * Helper functions for setting up test geth environment for benchmark testing with artillery. - */ - -// Constants -const logLevel = "info"; -const containerImageName = "cactus_geth_all_in_one"; -const containerImageVersion = "latest"; -const artilleryConfigFileName = "geth-benchmark-config.yaml"; -const artilleryFunctionsFileName = "artillery-helper-functions.js"; - -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import path from "path"; -import { AddressInfo } from "net"; -import { Server as SocketIoServer } from "socket.io"; -import { v4 as uuidv4 } from "uuid"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Constants } from "@hyperledger/cactus-core-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, - WHALE_ACCOUNT_PRIVATE_KEY, -} from "@hyperledger/cactus-test-geth-ledger"; - -import { - PluginLedgerConnectorEthereum, - Web3SigningCredentialType, -} from "../../../../main/typescript/index"; -import HelloWorldContractJson from "../../../solidity/hello-world-contract/HelloWorld.json"; - -const log: Logger = LoggerProvider.getOrCreate({ - label: "geth-benchmark-env", - level: logLevel, -}); - -// Global variables -let ethereumTestLedger: GethTestLedger | undefined; -let ethereumConnector: PluginLedgerConnectorEthereum | undefined; -let httpServer: http.Server | undefined; -let wsServer: SocketIoServer | undefined; - -/** - * Overwrites for artillery test config - */ -export type BenchmarkEnvironmentConfig = { - target: string; - variables: Record; -}; - -export function getDefaultArtilleryConfigPath() { - return path.resolve(path.join(__dirname, artilleryConfigFileName)); -} - -export function getDefaultArtilleryFunctionsPath() { - return path.resolve(path.join(__dirname, artilleryFunctionsFileName)); -} - -/** - * Setup new test environment (ledger and connector). - * - * @param envLogLevel log level for test environment. - * @returns configuration overwrites for newly created environment - */ -export async function setupBenchmarkEnvironment( - envLogLevel: LogLevelDesc = logLevel, -): Promise { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel }); - - log.info("Start GethTestLedger..."); - // log.debug("Ethereum version:", containerImageVersion); - ethereumTestLedger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ethereumTestLedger.start(true, ["--verbosity", "1", "--cache", "8192"]); - - const rpcApiHttpHost = await ethereumTestLedger.getRpcApiHttpHost(); - log.debug("rpcApiHttpHost:", rpcApiHttpHost); - const rpcApiWsHost = await ethereumTestLedger.getRpcApiWebSocketHost(); - log.debug("rpcApiWsHost:", rpcApiWsHost); - - log.info("Create PluginKeychainMemory..."); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel: envLogLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - - log.info("Create PluginLedgerConnectorEthereum..."); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "500mb" })); - httpServer = http.createServer(expressApp); - wsServer = new SocketIoServer(httpServer, { - path: Constants.SocketIoConnectionPathV1, - }); - const addressInfo = (await Servers.listen({ - hostname: "127.0.0.1", - port: 0, - server: httpServer, - })) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - ethereumConnector = new PluginLedgerConnectorEthereum({ - rpcApiHttpHost, - rpcApiWsHost, - rpcApiWsSocketOptions: { - timeout: 1000 * 60 * 2, // 2 minutes - }, - logLevel: envLogLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - await ethereumConnector.getOrCreateWebServices(); - await ethereumConnector.registerWebServices(expressApp, wsServer); - - log.info("Deploy HelloWorld contract to interact with..."); - const deployOut = await ethereumConnector.deployContract({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - if (!deployOut.transactionReceipt.contractAddress) { - throw new Error(`Could not deploy test contract: ${deployOut}`); - } - - return { - target: apiHost, - variables: { - hello_world_contract_name: [HelloWorldContractJson.contractName], - keychain_id: [keychainPlugin.getKeychainId()], - sender_account: [WHALE_ACCOUNT_ADDRESS], - sender_private_key: [WHALE_ACCOUNT_PRIVATE_KEY], - }, - }; -} - -/** - * Cleanup test environment (stop the ledger, close the server) - */ -export async function cleanupBenchmarkEnvironment() { - log.info("cleanupBenchmarkEnvironment() started..."); - - if (ethereumConnector) { - log.debug("Stopping the ethereum connector..."); - await ethereumConnector.shutdown(); - ethereumConnector = undefined; - } - - if (httpServer) { - log.debug("Stopping the ethereum connector HTTP server..."); - await Servers.shutdown(httpServer); - httpServer = undefined; - } - - if (wsServer) { - log.debug("Stopping the ethereum connector WS server..."); - wsServer.removeAllListeners(); - wsServer.close(); - wsServer = undefined; - } - - if (ethereumTestLedger) { - try { - log.debug("Stopping the ethereum ledger..."); - await ethereumTestLedger.stop(); - await ethereumTestLedger.destroy(); - } catch (error) { - log.warn("Error when closing ethereum ledger:", error); - } finally { - ethereumTestLedger = undefined; - } - } - - await pruneDockerAllIfGithubAction({ logLevel }); - log.info("cleanupBenchmarkEnvironment() done!"); -} diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-json-object-v1.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-json-object-v1.test.ts deleted file mode 100644 index 8c6815ad9a..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-json-object-v1.test.ts +++ /dev/null @@ -1,434 +0,0 @@ -/** - * Tests for deploying a contract and invoking it's method by directly sending contract JSON. - * - * @note all tests must be run in order, don't use `skip()` or `only()`. @todo - fix that - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { v4 as uuidV4 } from "uuid"; -import { AddressInfo } from "net"; -import { Server as SocketIoServer } from "socket.io"; -import Web3, { HexString } from "web3"; - -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, -} from "@hyperledger/cactus-test-geth-ledger"; - -import HelloWorldContractJson from "../../solidity/hello-world-contract/HelloWorld.json"; -import HelloWorldWithArgContractJson from "../../solidity/hello-world-with-arg-contract/HelloWorldWithArg.json"; -import { - EthContractInvocationType, - PluginLedgerConnectorEthereum, - Web3SigningCredentialType, - DefaultApi as EthereumApi, - ContractJsonDefinition, - DeployContractV1Request, - InvokeContractV1Request, -} from "../../../main/typescript/public-api"; - -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -describe("Ethereum contract deploy and invoke using keychain tests", () => { - const keychainEntryKey = uuidV4(); - let testEthAccount: { - address: HexString; - privateKey: HexString; - }, - web3: InstanceType, - addressInfo, - address: string, - port: number, - contractAddress: string, - apiHost, - apiConfig, - ledger: GethTestLedger, - apiClient: EthereumApi, - connector: PluginLedgerConnectorEthereum, - rpcApiHttpHost: string, - keychainPlugin: PluginKeychainMemory; - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - ////////////////////////////////// - // Setup - ////////////////////////////////// - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - await expect(pruning).resolves.toBeTruthy(); - - //ledger = new GethTestLedger({ emitContainerLogs: true, testLogLevel }); - ledger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ledger.start(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new EthereumApi(apiConfig); - rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(); - - const keychainEntryValue = testEthAccount.privateKey; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidV4(), - keychainId: uuidV4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel: testLogLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - keychainPlugin.set( - HelloWorldWithArgContractJson.contractName, - JSON.stringify(HelloWorldWithArgContractJson), - ); - connector = new PluginLedgerConnectorEthereum({ - instanceId: uuidV4(), - rpcApiHttpHost, - logLevel: testLogLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - }); - - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - await Servers.shutdown(server); - - const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - test("setup ethereum connector", async () => { - // Instantiate connector with the keychain plugin that already has the - // private key we want to use for one of our tests - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - - const initTransferValue = web3.utils.toWei(5000, "ether"); - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: initTransferValue, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toBe(initTransferValue); - }); - - ////////////////////////////////// - // Deployment Tests - ////////////////////////////////// - - test("deploys contract using json object", async () => { - const deployOut = await apiClient.deployContract({ - contract: { - contractJSON: HelloWorldContractJson, - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.data).toBeTruthy(); - expect(deployOut.data.transactionReceipt).toBeTruthy(); - expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); - - contractAddress = deployOut.data.transactionReceipt - .contractAddress as string; - expect(typeof contractAddress).toBe("string"); - expect(contractAddress).toBeTruthy(); - - const invokeOut = await apiClient.invokeContractV1({ - contract: { - contractJSON: HelloWorldContractJson, - contractAddress, - }, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(invokeOut).toBeTruthy(); - expect(invokeOut.data).toBeTruthy(); - expect(invokeOut.data.callOutput).toBeTruthy(); - expect(typeof invokeOut.data.callOutput).toBe("string"); - }); - - test("deploys contract using json object with constructorArgs", async () => { - const deployOut = await apiClient.deployContract({ - contract: { - contractJSON: HelloWorldWithArgContractJson, - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - constructorArgs: ["Johnny"], - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.data).toBeTruthy(); - expect(deployOut.data.transactionReceipt).toBeTruthy(); - expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); - }); - - test("deployContract without contractJSON should fail", async () => { - try { - await apiClient.deployContract({ - contract: {} as ContractJsonDefinition, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - fail("Expected deployContract call to fail but it succeeded."); - } catch (error) { - console.log("deployContract failed as expected"); - } - }); - - test("deployContract with additional parameters should fail", async () => { - try { - await apiClient.deployContract({ - contract: { - contractJSON: HelloWorldContractJson, - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - gas: 1000000, - fake: 4, - } as DeployContractV1Request); - fail("Expected deployContract call to fail but it succeeded."); - } catch (error) { - console.log("deployContract failed as expected"); - } - }); - - ////////////////////////////////// - // Invoke Tests - ////////////////////////////////// - - test("invoke Web3SigningCredentialType.GETHKEYCHAINPASSWORD", async () => { - const newName = `DrCactus${uuidV4()}`; - const setNameOut = await apiClient.invokeContractV1({ - contract: { - contractJSON: HelloWorldContractJson, - contractAddress, - }, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(setNameOut).toBeTruthy(); - expect(setNameOut.data).toBeTruthy(); - - try { - await apiClient.invokeContractV1({ - contract: { - contractJSON: HelloWorldContractJson, - contractAddress, - }, - invocationType: EthContractInvocationType.Send, - methodName: "foo", - params: [newName], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - fail("Expected getContractInfoKeychain call to fail but it succeeded."); - } catch (error) { - expect(error).toBeTruthy(); - } - - const getNameOut = await apiClient.invokeContractV1({ - contract: { - contractJSON: HelloWorldContractJson, - contractAddress, - }, - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(getNameOut).toBeTruthy(); - expect(getNameOut.data).toBeTruthy(); - expect(getNameOut.data.success).toBeTruthy(); - - const invokeGetNameOut = await apiClient.invokeContractV1({ - contract: { - contractJSON: HelloWorldContractJson, - contractAddress, - }, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(invokeGetNameOut).toBeTruthy(); - expect(invokeGetNameOut.data).toBeTruthy(); - expect(invokeGetNameOut.data.callOutput).toBeTruthy(); - expect(invokeGetNameOut.data.callOutput).toBe(newName); - }); - - test("invoke Web3SigningCredentialType.PrivateKeyHex", async () => { - const priorityFee = web3.utils.toWei(2, "gwei"); - const newName = `DrCactus${uuidV4()}`; - const setNameOut = await apiClient.invokeContractV1({ - contract: { - contractJSON: HelloWorldContractJson, - contractAddress, - }, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gasConfig: { - maxPriorityFeePerGas: priorityFee, - }, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(setNameOut).toBeTruthy(); - expect(setNameOut.data).toBeTruthy(); - - try { - await apiClient.invokeContractV1({ - contract: { - contractJSON: HelloWorldContractJson, - contractAddress, - }, - invocationType: EthContractInvocationType.Send, - methodName: "foo", - params: [newName], - gasConfig: { - maxPriorityFeePerGas: priorityFee, - }, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - fail("Expected getContractInfoKeychain call to fail but it succeeded."); - } catch (error) { - expect(error).toBeTruthy(); - } - - const invokeGetNameOut = await apiClient.invokeContractV1({ - contract: { - contractJSON: HelloWorldContractJson, - contractAddress, - }, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(invokeGetNameOut).toBeTruthy(); - expect(invokeGetNameOut.data).toBeTruthy(); - expect(invokeGetNameOut.data.callOutput).toBeTruthy(); - expect(invokeGetNameOut.data.callOutput).toBe(newName); - }); - - test("invokeContractV1 without methodName should fail", async () => { - try { - await apiClient.invokeContractV1({ - contract: { - contractJSON: HelloWorldContractJson, - contractAddress, - }, - invocationType: EthContractInvocationType.Send, - params: [`DrCactus${uuidV4()}`], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - } as InvokeContractV1Request); - fail( - "Expected deployContractSolBytecodeV1 call to fail but it succeeded.", - ); - } catch (error) { - console.log("deployContractSolBytecodeV1 failed as expected"); - } - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-keychain-v1.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-keychain-v1.test.ts deleted file mode 100644 index 70f4f4dda7..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-keychain-v1.test.ts +++ /dev/null @@ -1,572 +0,0 @@ -/** - * Tests for deploying a contract and invoking it's method using contract JSON stored in keystore plugin. - * - * @note all tests must be run in order, don't use `skip()` or `only()`. @todo - fix that - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { v4 as uuidV4 } from "uuid"; -import { AddressInfo } from "net"; -import { Server as SocketIoServer } from "socket.io"; -import Web3, { HexString } from "web3"; - -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, -} from "@hyperledger/cactus-test-geth-ledger"; - -import HelloWorldContractJson from "../../solidity/hello-world-contract/HelloWorld.json"; -import HelloWorldWithArgContractJson from "../../solidity/hello-world-with-arg-contract/HelloWorldWithArg.json"; -import { - EthContractInvocationType, - PluginLedgerConnectorEthereum, - Web3SigningCredentialCactiKeychainRef, - Web3SigningCredentialType, - DefaultApi as EthereumApi, - RunTransactionRequest, - InvokeContractV1Request, - DeployContractV1Request, - ContractKeychainDefinition, - signTransaction, -} from "../../../main/typescript/public-api"; -import { K_CACTI_ETHEREUM_TOTAL_TX_COUNT } from "../../../main/typescript/prometheus-exporter/metrics"; - -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -describe("Ethereum contract deploy and invoke using keychain tests", () => { - const keychainEntryKey = uuidV4(); - let testEthAccount: { - address: HexString; - privateKey: HexString; - }, - web3: InstanceType, - addressInfo, - address: string, - port: number, - contractAddress: string, - apiHost: string, - apiConfig, - ledger: GethTestLedger, - apiClient: EthereumApi, - connector: PluginLedgerConnectorEthereum, - rpcApiHttpHost: string, - keychainPlugin: PluginKeychainMemory; - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - ////////////////////////////////// - // Setup - ////////////////////////////////// - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - await expect(pruning).resolves.toBeTruthy(); - - ledger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ledger.start(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new EthereumApi(apiConfig); - rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(); - - const keychainEntryValue = testEthAccount.privateKey; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidV4(), - keychainId: uuidV4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel: testLogLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - keychainPlugin.set( - HelloWorldWithArgContractJson.contractName, - JSON.stringify(HelloWorldWithArgContractJson), - ); - connector = new PluginLedgerConnectorEthereum({ - instanceId: uuidV4(), - rpcApiHttpHost, - logLevel: testLogLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }); - - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - await Servers.shutdown(server); - - const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - test("setup ethereum connector", async () => { - // Instantiate connector with the keychain plugin that already has the - // private key we want to use for one of our tests - const initTransferValue = web3.utils.toWei(5000, "ether"); - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: initTransferValue, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toBe(initTransferValue); - }); - - ////////////////////////////////// - // Deployment Tests - ////////////////////////////////// - - test("deploys contract using keychain", async () => { - const deployOut = await apiClient.deployContract({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.data).toBeTruthy(); - expect(deployOut.data.transactionReceipt).toBeTruthy(); - expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); - - contractAddress = deployOut.data.transactionReceipt - .contractAddress as string; - expect(typeof contractAddress).toBe("string"); - const invokeOut = await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(invokeOut).toBeTruthy(); - expect(invokeOut.data).toBeTruthy(); - expect(invokeOut.data.callOutput).toBeTruthy(); - expect(typeof invokeOut.data.callOutput).toBe("string"); - }); - - test("deploys contract using keychain with constructorArgs", async () => { - const deployOut = await apiClient.deployContract({ - contract: { - contractName: HelloWorldWithArgContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - constructorArgs: ["Johnny"], - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.data).toBeTruthy(); - expect(deployOut.data.transactionReceipt).toBeTruthy(); - expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); - }); - - test("deployContract without contractName should fail", async () => { - try { - await apiClient.deployContract({ - contract: { - keychainId: keychainPlugin.getKeychainId(), - } as ContractKeychainDefinition, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - fail("Expected deployContract call to fail but it succeeded."); - } catch (error) { - console.log("deployContract failed as expected"); - } - }); - - test("deployContract with additional parameters should fail", async () => { - try { - await apiClient.deployContract({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - gas: 1000000, - fake: 4, - } as DeployContractV1Request); - fail("Expected deployContract call to fail but it succeeded."); - } catch (error) { - console.log("deployContract failed as expected"); - } - }); - - ////////////////////////////////// - // Invoke Tests - ////////////////////////////////// - - test("invoke Web3SigningCredentialType.GETHKEYCHAINPASSWORD", async () => { - const newName = `DrCactus${uuidV4()}`; - const setNameOut = await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(setNameOut).toBeTruthy(); - expect(setNameOut.data).toBeTruthy(); - - try { - await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "foo", - params: [newName], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - fail("Expected invokeContractV1 call to fail but it succeeded."); - } catch (error) { - expect(error).toBeTruthy(); - } - - const getNameOut = await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(getNameOut).toBeTruthy(); - expect(getNameOut.data).toBeTruthy(); - expect(getNameOut.data.success).toBeTruthy(); - - const invokeGetNameOut = await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(invokeGetNameOut).toBeTruthy(); - expect(invokeGetNameOut.data).toBeTruthy(); - expect(invokeGetNameOut.data.callOutput).toBeTruthy(); - expect(invokeGetNameOut.data.callOutput).toBe(newName); - }); - - test("invoke Web3SigningCredentialType.None", async () => { - const testEthAccount2 = web3.eth.accounts.create(); - - const value = 10e6; - const { serializedTransactionHex } = signTransaction( - { - to: testEthAccount2.address, - value, - maxPriorityFeePerGas: 0, - maxFeePerGas: 0x40000000, - gasLimit: 21000, - type: 2, - }, - testEthAccount.privateKey, - { - networkId: 10, - chainId: 10, - defaultHardfork: "london", - }, - ); - - await apiClient.runTransactionV1({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - transactionConfig: { - rawTransaction: serializedTransactionHex, - }, - }); - - const balance2 = await web3.eth.getBalance(testEthAccount2.address); - expect(balance2).toBeTruthy(); - expect(balance2.toString()).toBe(value.toString()); - }); - - test("runTransactionV1 without transaction config should fail", async () => { - try { - await apiClient.runTransactionV1({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - } as RunTransactionRequest); - fail("Expected runTransactionV1 call to fail but it succeeded."); - } catch (error) { - console.log("runTransactionV1 failed as expected"); - } - }); - - test("invoke Web3SigningCredentialType.PrivateKeyHex", async () => { - const priorityFee = web3.utils.toWei(2, "gwei"); - const newName = `DrCactus${uuidV4()}`; - const setNameOut = await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gasConfig: { - maxPriorityFeePerGas: priorityFee, - }, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(setNameOut).toBeTruthy(); - expect(setNameOut.data).toBeTruthy(); - - try { - await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "foo", - params: [newName], - gasConfig: { - maxPriorityFeePerGas: priorityFee, - }, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - fail("Expected invokeContractV1 call to fail but it succeeded."); - } catch (error) { - expect(error).toBeTruthy(); - } - - const invokeGetNameOut = await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(invokeGetNameOut).toBeTruthy(); - expect(invokeGetNameOut.data).toBeTruthy(); - expect(invokeGetNameOut.data.callOutput).toBeTruthy(); - expect(invokeGetNameOut.data.callOutput).toBe(newName); - }); - - test("invoke Web3SigningCredentialType.CactiKeychainRef", async () => { - const newName = `DrCactus${uuidV4()}`; - const priorityFee = web3.utils.toWei(2, "gwei"); - - const web3SigningCredential: Web3SigningCredentialCactiKeychainRef = { - ethAccount: testEthAccount.address, - keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - type: Web3SigningCredentialType.CactiKeychainRef, - }; - - const setNameOut = await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gasConfig: { - maxPriorityFeePerGas: priorityFee, - }, - web3SigningCredential, - }); - expect(setNameOut).toBeTruthy(); - expect(setNameOut.data).toBeTruthy(); - - try { - await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "foo", - params: [newName], - gasConfig: { - maxPriorityFeePerGas: priorityFee, - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - fail("Expected invokeContractV1 call to fail but it succeeded."); - } catch (error) { - expect(error).toBeTruthy(); - } - - const invokeGetNameOut = await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - web3SigningCredential, - }); - expect(invokeGetNameOut).toBeTruthy(); - expect(invokeGetNameOut.data).toBeTruthy(); - expect(invokeGetNameOut.data.callOutput).toBeTruthy(); - expect(invokeGetNameOut.data.callOutput).toBe(newName); - }); - - test("invokeContractV1 without methodName should fail", async () => { - try { - await apiClient.invokeContractV1({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - params: [`DrCactus${uuidV4()}`], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - } as InvokeContractV1Request); - fail("Expected invokeContractV1 call to fail but it succeeded."); - } catch (error) { - console.log("invokeContractV1 failed as expected"); - } - }); - - // @todo - move to separate test suite - test("get prometheus exporter metrics", async () => { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTI_ETHEREUM_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTI_ETHEREUM_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTI_ETHEREUM_TOTAL_TX_COUNT + - '{type="' + - K_CACTI_ETHEREUM_TOTAL_TX_COUNT + - '"} 3'; - expect(res); - expect(res.data); - expect(res.status).toEqual(200); - expect(res.data).toContain(promMetricsOutput); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-invoke-web3-contract-v1.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-invoke-web3-contract-v1.test.ts deleted file mode 100644 index a88bd4c136..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-invoke-web3-contract-v1.test.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel = "info"; -const sutLogLevel = "info"; - -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationWeb3Method, - InvokeRawWeb3EthContractV1Request, - PluginLedgerConnectorEthereum, - Web3SigningCredentialType, -} from "../../../main/typescript/index"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, -} from "@hyperledger/cactus-test-geth-ledger"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; - -import HelloWorldContractJson from "../../solidity/hello-world-contract/HelloWorld.json"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ContractAbi } from "web3"; - -// Unit Test logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "geth-invoke-web3-contract-v1.test", - level: testLogLevel, -}); -log.info("Test started"); - -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -describe("invokeRawWeb3EthContract Tests", () => { - let ethereumTestLedger: GethTestLedger; - let connector: PluginLedgerConnectorEthereum; - let contractAbi: ContractAbi; - let contractAddress: string; - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - log.info("Start GethTestLedger..."); - // log.debug("Ethereum version:", containerImageVersion); - ethereumTestLedger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ethereumTestLedger.start(); - - const rpcApiHttpHost = await ethereumTestLedger.getRpcApiHttpHost(); - log.debug("rpcApiHttpHost:", rpcApiHttpHost); - - log.info("Create PluginKeychainMemory..."); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel: sutLogLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - - log.info("Create PluginLedgerConnectorEthereum..."); - connector = new PluginLedgerConnectorEthereum({ - rpcApiHttpHost: rpcApiHttpHost, - logLevel: sutLogLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - log.info("Deploy contract to interact with..."); - const deployOut = await connector.deployContract({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - expect(deployOut.transactionReceipt.status).toBeTrue(); - - contractAbi = HelloWorldContractJson.abi; - contractAddress = deployOut.transactionReceipt.contractAddress as string; - }); - - afterAll(async () => { - log.info("Shutdown connector"); - await connector.shutdown(); - - log.info("Stop and destroy the test ledger..."); - await ethereumTestLedger.stop(); - await ethereumTestLedger.destroy(); - - log.info("Prune docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }); - - test("invokeRawWeb3EthContract send and call to valid contract works correctly", async () => { - const newName = "EthereumCactus"; - - // 1. Set new value (send) - const sendInvocationArgs = { - from: WHALE_ACCOUNT_ADDRESS, - }; - - const sendInvokeArgs: InvokeRawWeb3EthContractV1Request = { - abi: contractAbi, - address: contractAddress, - invocationType: EthContractInvocationWeb3Method.Send, - invocationParams: sendInvocationArgs, - contractMethod: "setName", - contractMethodArgs: [newName], - }; - - const resultsSend = - await connector.invokeRawWeb3EthContract(sendInvokeArgs); - expect(resultsSend).toBeTruthy(); - expect(resultsSend.status.toString()).toEqual("1"); - - // // 2. Get new, updated value (call) - const callInvokeArgs: InvokeRawWeb3EthContractV1Request = { - abi: contractAbi, - address: contractAddress, - invocationType: EthContractInvocationWeb3Method.Call, - contractMethod: "getName", - }; - - const resultsCall = - await connector.invokeRawWeb3EthContract(callInvokeArgs); - expect(resultsCall).toBeTruthy(); - expect(resultsCall).toEqual(newName); - }); - - test("invokeRawWeb3EthContract throws error when called on wrong contract", async () => { - const callInvokeArgs: InvokeRawWeb3EthContractV1Request = { - abi: contractAbi, - address: "0x0321", - invocationType: EthContractInvocationWeb3Method.Call, - contractMethod: "getName", - }; - - await expect(connector.invokeRawWeb3EthContract(callInvokeArgs)).toReject(); - }); - - test("invokeRawWeb3EthContract throws error when requested wrong invocation method", async () => { - const callInvokeArgs: InvokeRawWeb3EthContractV1Request = { - abi: contractAbi, - address: contractAddress, - invocationType: "foo" as EthContractInvocationWeb3Method, - contractMethod: "getName", - }; - - await expect(connector.invokeRawWeb3EthContract(callInvokeArgs)).toReject(); - }); - - test("invokeRawWeb3EthContract throws error when called non existent contract method", async () => { - const callInvokeArgs: InvokeRawWeb3EthContractV1Request = { - abi: contractAbi, - address: contractAddress, - invocationType: EthContractInvocationWeb3Method.Call, - contractMethod: "nonExistingFoo", - }; - - await expect(connector.invokeRawWeb3EthContract(callInvokeArgs)).toReject(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-invoke-web3-method-v1.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-invoke-web3-method-v1.test.ts deleted file mode 100644 index 5cf120279a..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-invoke-web3-method-v1.test.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel = "info"; -const sutLogLevel = "info"; - -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import Web3 from "web3"; -import { v4 as uuidv4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Constants } from "@hyperledger/cactus-core-api"; -import { - IListenOptions, - Logger, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, -} from "@hyperledger/cactus-test-geth-ledger"; - -import { PluginLedgerConnectorEthereum } from "../../../main/typescript/index"; - -// Unit Test logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "geth-invoke-web3-method-v1.test", - level: testLogLevel, -}); -log.info("Test started"); - -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -describe("invokeRawWeb3EthMethod Tests", () => { - let ethereumTestLedger: GethTestLedger; - let connector: PluginLedgerConnectorEthereum; - let web3: InstanceType; - let apiHost: string; - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - log.info("Start GethTestLedger..."); - // log.debug("Ethereum version:", containerImageVersion); - ethereumTestLedger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ethereumTestLedger.start(); - - const rpcApiHttpHost = await ethereumTestLedger.getRpcApiHttpHost(); - log.debug("rpcApiHttpHost:", rpcApiHttpHost); - - log.info("Create PluginLedgerConnectorEthereum..."); - connector = new PluginLedgerConnectorEthereum({ - rpcApiHttpHost: rpcApiHttpHost, - logLevel: sutLogLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry(), - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - apiHost = `http://${address}:${port}`; - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - - web3 = new Web3(rpcApiHttpHost); - }); - - afterAll(async () => { - log.info("Shutdown server"); - await Servers.shutdown(server); - - if (connector) { - log.info("Shutdown connector"); - await connector.shutdown(); - } - - if (ethereumTestLedger) { - log.info("Stop and destroy the test ledger..."); - await ethereumTestLedger.stop(); - await ethereumTestLedger.destroy(); - } - - log.info("Prune docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }); - - test("invoke method using json-rpc proxy", async () => { - const proxyUrl = new URL( - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/json-rpc", - apiHost, - ); - const web3ProxyClient = new Web3(proxyUrl.toString()); - const gasPrice = await web3ProxyClient.eth.getGasPrice(); - expect(gasPrice).toBeTruthy(); - expect(Number(gasPrice)).toBeGreaterThan(0); - }); - - test("invokeRawWeb3EthMethod with 0-argument method works (getGasPrice)", async () => { - const connectorResponse = await connector.invokeRawWeb3EthMethod({ - methodName: "getGasPrice", - }); - expect(connectorResponse).toBeTruthy(); - expect(Number(connectorResponse)).toBeGreaterThan(0); - }); - - test("invokeRawWeb3EthMethod with 1-argument method works (getBlock)", async () => { - const connectorResponse = await connector.invokeRawWeb3EthMethod({ - methodName: "getBlock", - params: ["earliest"], - }); - expect(connectorResponse).toBeTruthy(); - expect(connectorResponse.hash.length).toBeGreaterThan(5); - - // Compare with direct web3 response - const web3Response = await web3.eth.getBlock("earliest"); - expect(web3Response).toBeTruthy(); - expect(web3Response).toEqual(connectorResponse); - }); - - test("invokeRawWeb3EthMethod with 2-argument method works (getStorageAt)", async () => { - log.debug("WHALE_ACCOUNT_ADDRESS:", WHALE_ACCOUNT_ADDRESS); - - const connectorResponse = await connector.invokeRawWeb3EthMethod({ - methodName: "getStorageAt", - params: [WHALE_ACCOUNT_ADDRESS, 0], - }); - expect(connectorResponse).toBeTruthy(); - - // Compare with direct web3 response - const web3Response = await web3.eth.getStorageAt(WHALE_ACCOUNT_ADDRESS, 0); - expect(web3Response).toBeTruthy(); - expect(web3Response).toEqual(connectorResponse); - }); - - test("invokeRawWeb3EthMethod with missing arg throws error (getBlock)", async () => { - try { - const connectorResponse = connector.invokeRawWeb3EthMethod({ - methodName: "getBlock", - }); - - await connectorResponse; - fail("Calling getBlock with missing argument should throw an error"); - } catch (err) { - expect(err).toBeTruthy(); - } - }); - - test("invokeRawWeb3EthMethod with invalid arg throws error (getBlock)", async () => { - try { - const connectorResponse = connector.invokeRawWeb3EthMethod({ - methodName: "getBlock", - params: ["foo"], - }); - - await connectorResponse; - fail("Calling getBlock with argument should throw an error"); - } catch (err) { - expect(err).toBeTruthy(); - } - }); - - test("invokeRawWeb3EthMethod with non existing method throws error", async () => { - try { - const connectorResponse = connector.invokeRawWeb3EthMethod({ - methodName: "foo", - params: ["foo"], - }); - - await connectorResponse; - fail("Calling non existing method should throw an error"); - } catch (err) { - expect(err).toBeTruthy(); - } - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-monitoring-blocks.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-monitoring-blocks.test.ts deleted file mode 100644 index d8711d6ed1..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-monitoring-blocks.test.ts +++ /dev/null @@ -1,321 +0,0 @@ -/** - * Tests for block monitoring endpoint. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel: LogLevelDesc = "info"; -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; -const asyncTestTimeout = 1000 * 60 * 5; // 5 minutes - -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { v4 as uuidV4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import type { Subscription } from "rxjs"; - -import { - LogLevelDesc, - Servers, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { GethTestLedger } from "@hyperledger/cactus-test-geth-ledger"; - -import { - PluginLedgerConnectorEthereum, - EthereumApiClient, - WatchBlocksV1Progress, - Web3BlockHeader, -} from "../../../main/typescript/public-api"; - -const log: Logger = LoggerProvider.getOrCreate({ - label: "geth-monitoring-blocks.test", - level: testLogLevel, -}); -const NODE_TYPE_WEBSOCKET = "WebSocket"; -const NODE_TYPE_HTTP = "HTTP"; - -/** - * Common helper function for testing block monitoring scenarios. - * - * @param apiClient apiClient to running connector - * @param getBlockData true / false to get full block data or just the headers - * @param count test will wait and return `count` from the connector. - * @param lastSeenBlock block to start monitoring from - * @returns `count` number of blocks - */ -async function testWatchBlock( - apiClient: EthereumApiClient, - getBlockData: boolean, - count = 1, - lastSeenBlock?: number, -) { - let subscription: Subscription | undefined = undefined; - const blocksReceived: WatchBlocksV1Progress[] = []; - - // Wait for blocks - await new Promise((resolve, reject) => { - const watchObservable = apiClient.watchBlocksV1({ - getBlockData, - lastSeenBlock, - httpPollInterval: 1000, - }); - - subscription = watchObservable.subscribe({ - next(event) { - blocksReceived.push(event); - log.debug( - "Received event:", - JSON.stringify(event), - "count:", - blocksReceived.length, - ); - if (blocksReceived.length >= count) { - subscription?.unsubscribe(); - resolve(true); - } - }, - error(err) { - log.error("watchBlocksV1() error:", err); - subscription?.unsubscribe(); - reject(err); - }, - }); - }); - - return blocksReceived; -} - -/** - * Function for validating some block header fields. - * @param header block header from connector - */ -function assertBlockHeader(header?: Web3BlockHeader) { - if (!header) { - throw new Error("Header is missing!"); - } - - // Check if defined and with expected type - // Ignore nullable / undefine-able fields - expect(typeof header.parentHash).toEqual("string"); - expect(typeof header.sha3Uncles).toEqual("string"); - expect(typeof header.miner).toEqual("string"); - expect(typeof header.number).toEqual("string"); - expect(typeof header.gasLimit).toEqual("string"); - expect(typeof header.gasUsed).toEqual("string"); - expect(typeof header.difficulty).toEqual("string"); -} - -/** - * All monitoring tests use single ledger instance for performance reasons. - */ -describe("Ethereum monitoring endpoints tests", () => { - let ledger: GethTestLedger; - let rpcApiWsHost: string; - let rpcApiHttpHost: string; - - ////////////////////////////////// - // Setup ledger - ////////////////////////////////// - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - await expect(pruning).resolves.toBeTruthy(); - - ledger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ledger.start(); - rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - rpcApiWsHost = await ledger.getRpcApiWebSocketHost(); - }); - - afterAll(async () => { - if (ledger) { - log.info("Closing ethereum ledger"); - await ledger.stop(); - await ledger.destroy(); - } - - const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - /** - * Test suite will run for the following setups: - * - WS ethereum node (subscription method) - * - HTTP ethereum node (HTTP polling method) - */ - describe.each([[NODE_TYPE_WEBSOCKET], [NODE_TYPE_HTTP]])( - "Monitoring ethereum blocks with %p node connection test", - (nodeType: string) => { - let apiClient: EthereumApiClient; - let connector: PluginLedgerConnectorEthereum; - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - beforeAll(async () => { - log.warn("Using ledger node connection type:", nodeType); - - const addressInfo = await Servers.listen({ - hostname: "127.0.0.1", - port: 0, - server, - }); - apiClient = new EthereumApiClient( - new Configuration({ - basePath: `http://${addressInfo.address}:${addressInfo.port}`, - }), - ); - - connector = new PluginLedgerConnectorEthereum({ - instanceId: uuidV4(), - rpcApiHttpHost: - nodeType === NODE_TYPE_HTTP ? rpcApiHttpHost : undefined, - rpcApiWsHost: - nodeType === NODE_TYPE_WEBSOCKET ? rpcApiWsHost : undefined, - logLevel: testLogLevel, - pluginRegistry: new PluginRegistry({ plugins: [] }), - }); - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }); - - afterAll(async () => { - if (server) { - log.info("Shutdown connector servers"); - await Servers.shutdown(server); - } - - if (connector) { - log.info("Shutdown connector"); - await connector.shutdown(); - } - }); - - test( - "Monitor new blocks headers on Ethereum", - async () => { - const ledgerEvents = await testWatchBlock(apiClient, false); - expect(ledgerEvents).toBeTruthy(); - expect(ledgerEvents.length).toEqual(1); - const ledgerEvent = ledgerEvents[0]; - // blockData should not be present if called with empty options - expect(ledgerEvent.blockData).toBeUndefined(); - expect(ledgerEvent.blockHeader).toBeTruthy(); - expect((ledgerEvent as any).blockHeader.transactions).toBeUndefined(); - - // check some fields - assertBlockHeader(ledgerEvent.blockHeader); - }, - asyncTestTimeout, - ); - - test( - "Monitor new blocks data on Ethereum", - async () => { - const ledgerEvents = await testWatchBlock(apiClient, true); - expect(ledgerEvents).toBeTruthy(); - expect(ledgerEvents.length).toEqual(1); - const ledgerEvent = ledgerEvents[0]; - // blockHeader should not be present if called with getBlockData option - expect(ledgerEvent.blockHeader).toBeUndefined(); - expect(ledgerEvent.blockData).toBeTruthy(); - - // check some fields - assertBlockHeader(ledgerEvent.blockData as Web3BlockHeader); - expect(typeof ledgerEvent.blockData?.transactions).toEqual("object"); - expect(typeof ledgerEvent.blockData?.size).toEqual("string"); - expect(typeof ledgerEvent.blockData?.totalDifficulty).toEqual( - "string", - ); - expect(typeof ledgerEvent.blockData?.uncles).toEqual("object"); - }, - asyncTestTimeout, - ); - - /** - * Tests checks if missing blocks since lastSeenBlock are also pushed, and also that: - * - Blocks are reported in order - * - Blocks are not duplicated - */ - test( - "Monitor pushes missing block since lastSeenBlock", - async () => { - const missingBlocksCount = 3; - - // Wait until some blocks are created - const olderBlocks = await testWatchBlock( - apiClient, - false, - missingBlocksCount, - ); - expect(olderBlocks).toBeTruthy(); - expect(olderBlocks.length).toEqual(missingBlocksCount); - const missingBlockNumbers = olderBlocks.map((block) => - parseInt(block.blockHeader?.number as string, 10), - ); - // should be pushed in order - expect(missingBlockNumbers).toEqual( - missingBlockNumbers.sort((a, b) => a - b), - ); - // should push unique blocks (no duplicates) - expect(new Set(missingBlockNumbers).size).toEqual( - missingBlockNumbers.length, - ); - log.debug("missingBlockNumbers:", missingBlockNumbers); - - // get blocks including missing ones - const newBlocksToGet = 1; - const blocksWithMissingOnes = await testWatchBlock( - apiClient, - false, - missingBlocksCount + newBlocksToGet, // wait for all the missing and some new blocks - missingBlockNumbers[0] - 1, // assume we've seen one block before the first missing one - ); - expect(blocksWithMissingOnes).toBeTruthy(); - expect(blocksWithMissingOnes.length).toEqual( - missingBlocksCount + newBlocksToGet, - ); - const returnedBlockNumbers = blocksWithMissingOnes.map((block) => - parseInt(block.blockHeader?.number as string, 10), - ); - // should be pushed in order - expect(returnedBlockNumbers).toEqual( - returnedBlockNumbers.sort((a, b) => a - b), - ); - // should push unique blocks (no duplicates) - expect(new Set(returnedBlockNumbers).size).toEqual( - returnedBlockNumbers.length, - ); - log.debug("returnedBlockNumbers:", returnedBlockNumbers); - - // Ensure missing blocks were returned - expect(returnedBlockNumbers).toIncludeAllMembers(missingBlockNumbers); - expect(returnedBlockNumbers.slice(0, missingBlocksCount)).toEqual( - missingBlockNumbers, - ); // should start with the missing blocks - }, - asyncTestTimeout, - ); - }, - ); -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-transact-and-gas-fees.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-transact-and-gas-fees.test.ts deleted file mode 100644 index 4b8cadff0e..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-transact-and-gas-fees.test.ts +++ /dev/null @@ -1,326 +0,0 @@ -/** - * Tests for running transactions with different gas configurations (both legacy and EIP-1559) - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { v4 as uuidV4 } from "uuid"; -import { AddressInfo } from "net"; -import { Server as SocketIoServer } from "socket.io"; -import Web3 from "web3"; - -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, -} from "@hyperledger/cactus-test-geth-ledger"; - -import { - PluginLedgerConnectorEthereum, - Web3SigningCredentialType, - DefaultApi as EthereumApi, -} from "../../../main/typescript/public-api"; - -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -describe("Running ethereum transactions with different gas configurations", () => { - let web3: InstanceType, - addressInfo, - address: string, - port: number, - apiHost, - apiConfig, - ledger: GethTestLedger, - apiClient: EthereumApi, - connector: PluginLedgerConnectorEthereum, - rpcApiHttpHost: string; - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - ////////////////////////////////// - // Setup - ////////////////////////////////// - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - await expect(pruning).resolves.toBeTruthy(); - - //ledger = new GethTestLedger({ emitContainerLogs: true, testLogLevel }); - ledger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ledger.start(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new EthereumApi(apiConfig); - rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - web3 = new Web3(rpcApiHttpHost); - - connector = new PluginLedgerConnectorEthereum({ - instanceId: uuidV4(), - rpcApiHttpHost, - logLevel: testLogLevel, - pluginRegistry: new PluginRegistry({ plugins: [] }), - }); - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }); - - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - await Servers.shutdown(server); - - const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - test("sending transfer without gas config works", async () => { - const testEthAccount = web3.eth.accounts.create(); - const transferValue = web3.utils.toWei(1, "ether"); - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: transferValue, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toEqual(transferValue); - }); - - test("sending transfer with mixed gas config fails", async () => { - const testEthAccount = web3.eth.accounts.create(); - const transferValue = web3.utils.toWei(1, "ether"); - const maxFee = await connector.estimateMaxFeePerGas( - web3.utils.toWei(2, "gwei"), - ); - - try { - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: transferValue, - gasConfig: { - gas: "300000", - maxFeePerGas: maxFee, - }, - }, - }); - fail( - "Expected runTransactionV1 with mixed config to fail but it succeeded.", - ); - } catch (error) { - console.log("runTransactionV1 with mixed config failed as expected"); - } - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance.toString()).toEqual("0"); - }); - - test("sending transfer with only legacy gas price works", async () => { - const testEthAccount = web3.eth.accounts.create(); - const transferValue = web3.utils.toWei(1, "ether"); - const maxFee = await connector.estimateMaxFeePerGas( - web3.utils.toWei(2, "gwei"), - ); - - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: transferValue, - gasConfig: { - gasPrice: maxFee, - }, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toEqual(transferValue); - }); - - test("sending transfer with only legacy gas (limit) works", async () => { - const testEthAccount = web3.eth.accounts.create(); - const transferValue = web3.utils.toWei(1, "ether"); - - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: transferValue, - gasConfig: { - gas: "300000", - }, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toEqual(transferValue); - }); - - test("sending transfer with both legacy gas (limit) and gas price works", async () => { - const testEthAccount = web3.eth.accounts.create(); - const transferValue = web3.utils.toWei(1, "ether"); - const maxFee = await connector.estimateMaxFeePerGas( - web3.utils.toWei(2, "gwei"), - ); - - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: transferValue, - gasConfig: { - gas: "300000", - gasPrice: maxFee, - }, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toEqual(transferValue); - }); - - test("sending transfer with only maxFeePerGas works", async () => { - const testEthAccount = web3.eth.accounts.create(); - const transferValue = web3.utils.toWei(1, "ether"); - const maxFee = await connector.estimateMaxFeePerGas( - web3.utils.toWei(2, "gwei"), - ); - - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: transferValue, - gasConfig: { - maxFeePerGas: maxFee, - }, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toEqual(transferValue); - }); - - test("sending transfer with only maxPriorityFeePerGas works", async () => { - const testEthAccount = web3.eth.accounts.create(); - const transferValue = web3.utils.toWei(1, "ether"); - - await connector.transact({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: transferValue, - gasConfig: { - maxPriorityFeePerGas: web3.utils.toWei(2, "gwei"), - }, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toEqual(transferValue); - }); - - test("sending transfer with only maxPriorityFeePerGas works", async () => { - const testEthAccount = web3.eth.accounts.create(); - const transferValue = web3.utils.toWei(1, "ether"); - const priorityFee = web3.utils.toWei(2, "gwei"); - const maxFee = await connector.estimateMaxFeePerGas(priorityFee); - - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: transferValue, - gasConfig: { - maxFeePerGas: maxFee, - maxPriorityFeePerGas: priorityFee, - }, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toEqual(transferValue); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/manual/geth-alchemy-integration-manual-check.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/manual/geth-alchemy-integration-manual-check.test.ts deleted file mode 100644 index 725157745c..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/manual/geth-alchemy-integration-manual-check.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2020-2023 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * For instructions on how to run it see cactus-plugin-ledger-connector-ethereum README - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -const ALCHEMY_ENDPOINT = - "https://eth-sepolia.g.alchemy.com/v2/______API_KEY______"; -const ETH_ADDRESS = "______ADDRESS______"; -const ETH_PRIVATE_KEY = "______PRIVATE_KEY______"; - -const testLogLevel = "info"; -const sutLogLevel = "info"; - -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - EthContractInvocationType, - PluginLedgerConnectorEthereum, - Web3SigningCredentialType, -} from "../../../main/typescript/index"; -import HelloWorldContractJson from "../../solidity/hello-world-contract/HelloWorld.json"; - -jest.setTimeout(60 * 1000); // 1 minute timeout - -// Unit Test logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "geth-alchemy-integration-manual-check.test", - level: testLogLevel, -}); -log.info("Test started"); - -describe("Alchemy integration manual tests", () => { - let connector: PluginLedgerConnectorEthereum; - let keychainPlugin: PluginKeychainMemory; - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.debug("ALCHEMY_ENDPOINT:", ALCHEMY_ENDPOINT); - - log.info("Create PluginKeychainMemory..."); - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel: sutLogLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - - log.info("Create PluginLedgerConnectorEthereum..."); - connector = new PluginLedgerConnectorEthereum({ - rpcApiHttpHost: ALCHEMY_ENDPOINT, - logLevel: sutLogLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - }); - - afterAll(async () => { - log.info("Shutdown connector"); - await connector.shutdown(); - }); - - test("deploy sample contract to testnet", async () => { - const deployOut = await connector.deployContract({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: ETH_ADDRESS, - secret: ETH_PRIVATE_KEY, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - log.debug("Deployment receipt:", deployOut.transactionReceipt); - const { contractAddress, transactionHash } = deployOut.transactionReceipt; - expect(contractAddress).toBeTruthy(); - expect(transactionHash).toBeTruthy(); - log.info(`Transaction: https://sepolia.etherscan.io/tx/${transactionHash}`); - log.info( - `New Contract: https://sepolia.etherscan.io/address/${contractAddress}`, - ); - - expect(typeof contractAddress).toBe("string"); - const invokeOut = await connector.invokeContract({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - web3SigningCredential: { - ethAccount: ETH_ADDRESS, - secret: ETH_PRIVATE_KEY, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(invokeOut).toBeTruthy(); - expect(invokeOut.callOutput).toBeTruthy(); - expect(typeof invokeOut.callOutput).toBe("string"); - log.info("Method query OK!"); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/unit/model-type-guards.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/unit/model-type-guards.test.ts deleted file mode 100644 index 4f28cbbb96..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/unit/model-type-guards.test.ts +++ /dev/null @@ -1,210 +0,0 @@ -import "jest-extended"; -import { - isContractJsonDefinition, - isContractKeychainDefinition, - isDeployedContractJsonDefinition, - isGasTransactionConfigEIP1559, - isGasTransactionConfigLegacy, - isWeb3Error, - isWeb3SigningCredentialGethKeychainPassword, - isWeb3SigningCredentialNone, - isWeb3SigningCredentialPrivateKeyHex, -} from "../../../main/typescript/types/model-type-guards"; -import { - Web3SigningCredentialGethKeychainPassword, - Web3SigningCredentialType, - Web3SigningCredentialPrivateKeyHex, - Web3SigningCredentialNone, -} from "../../../main/typescript/public-api"; - -describe("Type guards for OpenAPI spec model type definitions", () => { - test("isWeb3SigningCredentialGethKeychainPassword()", () => { - const valid: Web3SigningCredentialGethKeychainPassword = { - secret: "yes", - ethAccount: "fake-account", - type: Web3SigningCredentialType.GethKeychainPassword, - }; - - expect(isWeb3SigningCredentialGethKeychainPassword(valid)).toBe(true); - expect(isWeb3SigningCredentialGethKeychainPassword({})).not.toBe(true); - }); - - test("isWeb3SigningCredentialPrivateKeyHex()", () => { - const valid: Web3SigningCredentialPrivateKeyHex = { - secret: "yes", - ethAccount: "fake-account", - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - expect(isWeb3SigningCredentialPrivateKeyHex(valid)).toBe(true); - expect(isWeb3SigningCredentialPrivateKeyHex({})).not.toBe(true); - }); - - test("isWeb3SigningCredentialNone()", () => { - const valid: Web3SigningCredentialNone = { - type: Web3SigningCredentialType.None, - }; - - expect(isWeb3SigningCredentialNone(valid)).toBe(true); - expect(isWeb3SigningCredentialNone({})).not.toBe(true); - }); - - test("isGasTransactionConfigLegacy()", () => { - expect( - isGasTransactionConfigLegacy({ - gas: "1234", - }), - ).toBe(true); - expect( - isGasTransactionConfigLegacy({ - gasPrice: "1234", - }), - ).toBe(true); - - expect( - isGasTransactionConfigLegacy({ - gasLimit: "1234", - }), - ).toBe(false); - expect( - isGasTransactionConfigLegacy({ - maxFeePerGas: "1234", - }), - ).toBe(false); - expect( - isGasTransactionConfigLegacy({ - maxPriorityFeePerGas: "1234", - }), - ).toBe(false); - expect(isGasTransactionConfigLegacy({})).toBe(false); - }); - - test("isGasTransactionConfigEIP1559()", () => { - expect( - isGasTransactionConfigEIP1559({ - gasLimit: "1234", - }), - ).toBe(true); - expect( - isGasTransactionConfigEIP1559({ - maxFeePerGas: "1234", - }), - ).toBe(true); - expect( - isGasTransactionConfigEIP1559({ - maxPriorityFeePerGas: "1234", - }), - ).toBe(true); - - expect( - isGasTransactionConfigEIP1559({ - gas: "1234", - }), - ).toBe(false); - expect( - isGasTransactionConfigEIP1559({ - gasPrice: "1234", - }), - ).toBe(false); - expect(isGasTransactionConfigEIP1559({})).toBe(false); - }); - - test("isContractJsonDefinition()", () => { - expect( - isContractJsonDefinition({ - contractJSON: { - abi: "test", - }, - }), - ).toBe(true); - - expect( - isContractJsonDefinition({ - foo: "1234", - }), - ).toBe(false); - expect(isContractJsonDefinition({})).toBe(false); - }); - - test("isDeployedContractJsonDefinition()", () => { - expect( - isDeployedContractJsonDefinition({ - contractJSON: { - abi: "test", - }, - contractAddress: "asd", - }), - ).toBe(true); - - expect( - isDeployedContractJsonDefinition({ - contractJSON: { - abi: "test", - }, - }), - ).toBe(false); - expect( - isDeployedContractJsonDefinition({ - contractAddress: "asd", - }), - ).toBe(false); - expect( - isDeployedContractJsonDefinition({ - foo: "1234", - }), - ).toBe(false); - expect(isDeployedContractJsonDefinition({})).toBe(false); - }); - - test("isContractKeychainDefinition()", () => { - expect( - isContractKeychainDefinition({ - contractName: "foo", - keychainId: "bar", - }), - ).toBe(true); - - expect( - isContractKeychainDefinition({ - contractName: "foo", - }), - ).toBe(false); - expect( - isContractKeychainDefinition({ - keychainId: "foo", - }), - ).toBe(false); - expect( - isContractKeychainDefinition({ - foo: "bar", - }), - ).toBe(false); - expect(isContractKeychainDefinition({})).toBe(false); - }); - - test("isWeb3Error()", () => { - expect( - isWeb3Error({ - name: "Test", - code: 123, - }), - ).toBe(true); - - expect( - isWeb3Error({ - name: "Test", - }), - ).toBe(false); - expect( - isWeb3Error({ - code: 123, - }), - ).toBe(false); - expect( - isWeb3Error({ - foo: "bar", - }), - ).toBe(false); - expect(isWeb3Error({})).toBe(false); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/tsconfig.json b/packages/cactus-plugin-ledger-connector-ethereum/tsconfig.json deleted file mode 100644 index bc70f24a84..0000000000 --- a/packages/cactus-plugin-ledger-connector-ethereum/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib", - "declarationDir": "./dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ledger-connector-ethereum.tsbuildinfo" - }, - "include": ["./src", "src/**/*.json"], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - }, - { - "path": "../cactus-test-geth-ledger/tsconfig.json" - } - ] -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/CHANGELOG.md b/packages/cactus-plugin-ledger-connector-fabric/CHANGELOG.md deleted file mode 100644 index c96e637050..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/CHANGELOG.md +++ /dev/null @@ -1,361 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-fabric - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-fabric - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-fabric - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -### Features - -* **persistence-fabric:** add sample setup scripts, improve documentation ([9fef336](https://github.com/hyperledger/cacti/commit/9fef336494911fa3673530f6945e97d3dd3ce934)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Bug Fixes - -* **connector-fabric:** decode blocks in getTransactionReceiptByTxID() ([1bdc35d](https://github.com/hyperledger/cacti/commit/1bdc35d5c9d49315e2b8b32c90c66b322d866bf9)) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### Features - -* **fabric-connector:** add getChainInfo, improve getBlock output ([8c030ae](https://github.com/hyperledger/cacti/commit/8c030ae9e739a28ff0900f7af27ec0fbbb4b7ff9)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari -* **fabric-connector:** It accepts `type` instead of `skipDecode` flag. -- Move common block formatting logic to `cacti-block-formatters.ts`. -- Add tests for new features. Move test common to quering `qscc` to single file - to increase CI speed. - -Signed-off-by: Michal Bajer - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **connector-fabric:** address CVEs: CVE-2022-21190, CVE-2021-3918 ([11e775d](https://github.com/hyperledger/cacti/commit/11e775d6e6611d0b054cd18cca620969cb947dd8)), closes [#2864](https://github.com/hyperledger/cacti/issues/2864) -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **cactus-plugin-ledger-connector-fabric-socketio:** remove fabric-socketio connector ([704e201](https://github.com/hyperledger/cacti/commit/704e201d6bd6bf7a38f0de7da60723118e18cea7)), closes [#2644](https://github.com/hyperledger/cacti/issues/2644) -* **cactus-plugin-ledger-connector-fabric:** support delegated (offline) signatures ([e2812f4](https://github.com/hyperledger/cacti/commit/e2812f4abce00a1918b8d13a6cfff382289ff998)), closes [#2598](https://github.com/hyperledger/cacti/issues/2598) -* **connector-fabric:** drop support for Fabric v1.x ([ec8123c](https://github.com/hyperledger/cacti/commit/ec8123cf954b09ba8cb213c7332dfe82224c351f)) - -### BREAKING CHANGES - -* **connector-fabric:** The Open API specification that has the enums for -ledger versions will no longer have an option for Fabric v1.x -This means that in the core-api package the LedgerType enum has changes -which means that code that depends on that enum value will need to be -updated. - -Fabric v1.x has had unmaintained dependencies associated with it such as -the native grpc package that stopped receiving security updates years ago -and therefore it's dangerous to have around. - -There are also some issues with Fabric v1.x that make the AIO image flaky -which also makes the relevant tests flaky due to which we couldn't run -the v1.x Fabric tests on the CI for a while now anyway. - -In order to reduce the CI resource usage and our own maintenance burden -I suggest that we get rid of the Fabric v1.x support meaning that we can -eliminate the AIO image build and some code complexity from the test ledger -code as well. - -In addition some old fixtures can be removed that the tests were using. -Overall a net-positive as deleting code without losing functionality (that -we care about) is always a plus. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **connector-fabric:** runTransactionV1 Open API validation crash ([516dd49](https://github.com/hyperledger/cacti/commit/516dd49fd443fc2d50b003104301b8060327b35a)) -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* **security:** upgrade fabric 2.x deps to 2.2.18 ([36988a5](https://github.com/hyperledger/cacti/commit/36988a5edbf9856a1bcc960a3b9afe443536733e)), closes [#2610](https://github.com/hyperledger/cacti/issues/2610) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **fabric-test-ledger:** add support to enrolling users in different Orgs ([b910681](https://github.com/hyperledger/cacti/commit/b9106810db11a2af19c8c06d6be39d2648f96fba)), closes [#2248](https://github.com/hyperledger/cacti/issues/2248) -* **plugin-persistence-fabric:** add new fabric persistence plugin ([47a64ee](https://github.com/hyperledger/cacti/commit/47a64ee17446db8102e2ca95f16b26f8778175a4)), closes [#2259](https://github.com/hyperledger/cacti/issues/2259) [#2265](https://github.com/hyperledger/cacti/issues/2265) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-fabric - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **cactus-example-supply-chain-app:** mitigate CVE-2022-24434 and CVE-2022-24999 ([d28d5e8](https://github.com/hyperledger/cactus/commit/d28d5e8f3ed5dff1aa049c8f1bccce79aa21e948)), closes [#2041](https://github.com/hyperledger/cactus/issues/2041) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -### Features - -* **connector-fabric:** add WatchBlocks endpoint ([6c62de4](https://github.com/hyperledger/cactus/commit/6c62de4dfb360536fc67a03cf10602e311c08a9d)), closes [#2118](https://github.com/hyperledger/cactus/issues/2118) - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-fabric - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-fabric - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-fabric - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Features - -* **connector-fabric:** add GetBlock operation to fabric connectors ([00572ed](https://github.com/hyperledger/cactus/commit/00572edfafb82420f93570129e7e233a521f82e7)), closes [#2124](https://github.com/hyperledger/cactus/issues/2124) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* **connector-fabric:** uncontrolled data used in path expression ([ef0981d](https://github.com/hyperledger/cactus/commit/ef0981d300d03fc5e5b1806f5e7355d0745700ce)), closes [#1909](https://github.com/hyperledger/cactus/issues/1909) -* **security:** upgrade to yarn > 1.22.0 - CVE-2019-10773, CVE-2020-8131 ([43d591d](https://github.com/hyperledger/cactus/commit/43d591d2eff576cb581a2a92d98edf7f4f6ecf13)), closes [#1922](https://github.com/hyperledger/cactus/issues/1922) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* **connector-fabric:** chain code deployment fails >1 scp concurrency ([71c9063](https://github.com/hyperledger/cactus/commit/71c9063a70d3ea77264d631272e792d339ffb1e3)), closes [#1570](https://github.com/hyperledger/cactus/issues/1570) -* **security:** upgrade fabric-common to 2.2.10 or later ([45c4a69](https://github.com/hyperledger/cactus/commit/45c4a69fb86964bc4e7018c31c5914a0063c7638)), closes [#1600](https://github.com/hyperledger/cactus/issues/1600) - -### Features - -* **odap:** first implemenation for odap plugin and endpoints ([51bf753](https://github.com/hyperledger/cactus/commit/51bf753d421cdd255c178036fe901eb9c1c04130)) -* **test-tooling:** embed couch-db image in the faio ([95d956d](https://github.com/hyperledger/cactus/commit/95d956d9bbfb15b15b043a753f07cbf876c33707)) -* **test-tooling:** faio features and improvements ([794e8b8](https://github.com/hyperledger/cactus/commit/794e8b89aba5a7bc6144343607893bca64affda1)) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -### Features - -* **connector-fabric:** support for FabricSigningCredentialType.WsX509 ([50e666f](https://github.com/hyperledger/cactus/commit/50e666fa522c3ae8b2f517e694c581f04c446e13)) - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* openapi validation test for fabric plugin ([01a5eb4](https://github.com/hyperledger/cactus/commit/01a5eb423abcc54aed8e2b4973251961e7849f76)), closes [#1295](https://github.com/hyperledger/cactus/issues/1295) [#847](https://github.com/hyperledger/cactus/issues/847) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -### Features - -* **fabric-connector:** add transact receipt ([c6d1b7a](https://github.com/hyperledger/cactus/commit/c6d1b7a180025f84f055bf537b5263eb44b2511f)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Bug Fixes - -* **test:** flaky fabric AIO container boot [#876](https://github.com/hyperledger/cactus/issues/876) ([beefcef](https://github.com/hyperledger/cactus/commit/beefcefbebbdb9a22d08118b6fb2e667493504cf)), closes [#718](https://github.com/hyperledger/cactus/issues/718) [#320](https://github.com/hyperledger/cactus/issues/320) [#319](https://github.com/hyperledger/cactus/issues/319) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* **connector-fabric:** add support for vault transit secret engine ([2161e0d](https://github.com/hyperledger/cactus/commit/2161e0d75bac49654f0d38c8a9e2b03234894ed8)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **prometheus:** metrics.ts leaks to global registry [#1202](https://github.com/hyperledger/cactus/issues/1202) ([ce076d7](https://github.com/hyperledger/cactus/commit/ce076d709f8e0cba143f8fe9d71f1de1df8f71dc)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Features - -* **connector-fabric:** endorsing peers request arg [#1122](https://github.com/hyperledger/cactus/issues/1122) ([c6057a7](https://github.com/hyperledger/cactus/commit/c6057a7ac508f3bd8da8c9611414a627ff772024)), closes [#1123](https://github.com/hyperledger/cactus/issues/1123) [#1130](https://github.com/hyperledger/cactus/issues/1130) -* **connector-fabric:** identity json signing credentials [#1130](https://github.com/hyperledger/cactus/issues/1130) ([bc262a2](https://github.com/hyperledger/cactus/commit/bc262a24ae654899e8941e7910953c6c561ea778)), closes [#1124](https://github.com/hyperledger/cactus/issues/1124) - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) -* **connector-fabric:** export IPluginLedgerConnectorFabricOptions ([ada532e](https://github.com/hyperledger/cactus/commit/ada532ef09603727379b6193b175e2834fa803d3)) - -### Features - -* **cmd-api-server:** add Socket.IO as transport [#297](https://github.com/hyperledger/cactus/issues/297) ([51c586a](https://github.com/hyperledger/cactus/commit/51c586aa01bff3e75f0e87be43f0764b30d8222c)) -* **connector-fabric:** containerize-fabric ([b53b3a4](https://github.com/hyperledger/cactus/commit/b53b3a4c1cb36e7a0f14d405cdecb3c8341f956d)) -* **connector-fabric:** contract deployment Fabric 2.x ([139a8ed](https://github.com/hyperledger/cactus/commit/139a8ed96d5d547a514839a461abcb7d0e937cb0)) -* **connector-fabric:** enrollAdmin() and createCaClient() ([da1cb1b](https://github.com/hyperledger/cactus/commit/da1cb1bc3c3751b5d10f98a457ae0ec62b6bdebf)) -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** hasTransactionFinality() on connector API [#354](https://github.com/hyperledger/cactus/issues/354) ([a2d0582](https://github.com/hyperledger/cactus/commit/a2d058218780e5e4c81e5f847cc875879a946e3f)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **core-api:** plugin async initializer method ([9678c2e](https://github.com/hyperledger/cactus/commit/9678c2e9288a73589e84f9fd254c26aed6a93297)) -* **fabric-connector:** add private data support ([3f503f9](https://github.com/hyperledger/cactus/commit/3f503f9a57bcdb14c3a3045fb516491b4f4879b4)) -* **fabric:** add sequence diagram of run transaction endpoint ([155cbab](https://github.com/hyperledger/cactus/commit/155cbab3c0358f6c259df8c0f92b788cbdfc6a71)), closes [#756](https://github.com/hyperledger/cactus/issues/756) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* **connector-fabric:** export IPluginLedgerConnectorFabricOptions ([ada532e](https://github.com/hyperledger/cactus/commit/ada532ef09603727379b6193b175e2834fa803d3)) - -### Features - -* **connector-fabric:** containerize-fabric ([b53b3a4](https://github.com/hyperledger/cactus/commit/b53b3a4c1cb36e7a0f14d405cdecb3c8341f956d)) -* **connector-fabric:** contract deployment Fabric 2.x ([139a8ed](https://github.com/hyperledger/cactus/commit/139a8ed96d5d547a514839a461abcb7d0e937cb0)) -* **connector-fabric:** enrollAdmin() and createCaClient() ([da1cb1b](https://github.com/hyperledger/cactus/commit/da1cb1bc3c3751b5d10f98a457ae0ec62b6bdebf)) -* **core-api:** decouple web service install & registration [#771](https://github.com/hyperledger/cactus/issues/771) ([b50e148](https://github.com/hyperledger/cactus/commit/b50e148f43c0b27138471c972aab391486e761e6)) -* **core-api:** hasTransactionFinality() on connector API [#354](https://github.com/hyperledger/cactus/issues/354) ([a2d0582](https://github.com/hyperledger/cactus/commit/a2d058218780e5e4c81e5f847cc875879a946e3f)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **fabric:** add sequence diagram of run transaction endpoint ([155cbab](https://github.com/hyperledger/cactus/commit/155cbab3c0358f6c259df8c0f92b788cbdfc6a71)), closes [#756](https://github.com/hyperledger/cactus/issues/756) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -### Bug Fixes - -* **connector-fabric:** cve-2020-7774 Prototype Pollution high sev. [#745](https://github.com/hyperledger/cactus/issues/745) ([6114cef](https://github.com/hyperledger/cactus/commit/6114ceff5c078674993af319653dc770a2011983)) - -### Features - -* **connector-fabric:** common interface ([c35cfe7](https://github.com/hyperledger/cactus/commit/c35cfe755c75ae860fdf28eb7fc89215557635c5)) - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **ci:** disallow parallel run for all Fabric AIO int. tests [#656](https://github.com/hyperledger/cactus/issues/656) ([af9f851](https://github.com/hyperledger/cactus/commit/af9f8510da036ba1abf9470d5ade2b542841d279)) -* **ci:** disk full issues on GitHub Action Workflow runner [#698](https://github.com/hyperledger/cactus/issues/698) ([61e3f76](https://github.com/hyperledger/cactus/commit/61e3f76ed910c9b04b36f995456213018cc0e7ba)) -* **ci:** github action runner disk full error [#641](https://github.com/hyperledger/cactus/issues/641) ([193fe52](https://github.com/hyperledger/cactus/commit/193fe52fe2a5bc317dac7d50163cb00eb57fd628)) -* **fabric:** issue with multiple objects of prometheus metrics ([6bb0cf9](https://github.com/hyperledger/cactus/commit/6bb0cf990154237e434e4de2e600517ab592a32b)), closes [#634](https://github.com/hyperledger/cactus/issues/634) -* **fabric:** prometheus exporter metrics naming ([a28edcf](https://github.com/hyperledger/cactus/commit/a28edcf2a02a8d8e8fcc876e3c4eb40931f0fd9a)) -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) -* **npm:** clean script was missing folders ([416b82e](https://github.com/hyperledger/cactus/commit/416b82e971607129fbdfa9e1270644d0c2f5c706)), closes [#469](https://github.com/hyperledger/cactus/issues/469) -* **performance:** parallel test execution [#416](https://github.com/hyperledger/cactus/issues/416) ([5abcd1e](https://github.com/hyperledger/cactus/commit/5abcd1e42b0a89382a7c17a2d6b11b32ad00cee3)) -* **tools:** prod build fail due to missing dependency ngo [#673](https://github.com/hyperledger/cactus/issues/673) ([c93cd30](https://github.com/hyperledger/cactus/commit/c93cd3021d3fafb6a28e7e6723fe65e2a800219d)) - -### Features - -* **connector-fabric:** signing credentials for fabric ([ebfff9f](https://github.com/hyperledger/cactus/commit/ebfff9f8f5aeb86751801e531a1d8064ce6c6e51)) -* **core-api:** plugin import types: LOCAL & REMOTE ([f4d51da](https://github.com/hyperledger/cactus/commit/f4d51dae5b28367e714a2b9aa35dd84a2cb4cb37)) -* **fabric:** add prometheus exporter ([b892655](https://github.com/hyperledger/cactus/commit/b892655c1cb8fb1ce20fcd8f061d6f4e998eea6b)), closes [#531](https://github.com/hyperledger/cactus/issues/531) -* **fabric-connector:** contract deployment endpoint [#616](https://github.com/hyperledger/cactus/issues/616) ([c77fc78](https://github.com/hyperledger/cactus/commit/c77fc783a0df4f31af53170073176042559ef432)) -* **refactor:** openapi endpoint paths ([261c17b](https://github.com/hyperledger/cactus/commit/261c17b08124070c7be0890d6bc3da380255893b)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -### Bug Fixes - -* open API generator config - protected keyword ([57e52f4](https://github.com/hyperledger/cactus/commit/57e52f42c3aaab653acb8838ba93518a5a097af8)), closes [#436](https://github.com/hyperledger/cactus/issues/436) - -### Features - -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) -* **core-api:** getConsensusAlgorithmFamily() on connector API ([477dc7e](https://github.com/hyperledger/cactus/commit/477dc7ed5dfba9ae56060772d478aae349919f10)), closes [#355](https://github.com/hyperledger/cactus/issues/355) -* **fabric:** add run transaction endpoint ([07ff4f8](https://github.com/hyperledger/cactus/commit/07ff4f862f6d02fec5de887d73186777951b745a)) -* **fabric:** user defined fabric samples version ([8a60717](https://github.com/hyperledger/cactus/commit/8a607172f72afbdf2e0519eff3a58679975cd1ee)), closes [#391](https://github.com/hyperledger/cactus/issues/391) -* **ledger-connector-fabric:** golang chaincode deployment ([38e9780](https://github.com/hyperledger/cactus/commit/38e97808c74124bb35f0aa37e4b3d0eb42161920)), closes [#252](https://github.com/hyperledger/cactus/issues/252) [#275](https://github.com/hyperledger/cactus/issues/275) [#276](https://github.com/hyperledger/cactus/issues/276) [#277](https://github.com/hyperledger/cactus/issues/277) - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -### Features - -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) -* **ledger-connector-fabric:** golang chaincode deployment ([38e9780](https://github.com/hyperledger/cactus/commit/38e97808c74124bb35f0aa37e4b3d0eb42161920)), closes [#252](https://github.com/hyperledger/cactus/issues/252) [#275](https://github.com/hyperledger/cactus/issues/275) [#276](https://github.com/hyperledger/cactus/issues/276) [#277](https://github.com/hyperledger/cactus/issues/277) diff --git a/packages/cactus-plugin-ledger-connector-fabric/README.md b/packages/cactus-plugin-ledger-connector-fabric/README.md deleted file mode 100644 index 8395cea592..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/README.md +++ /dev/null @@ -1,701 +0,0 @@ -# `@hyperledger/cactus-plugin-ledger-connector-fabric` - -## Table of Contents - -- [1. Usage](#1-usage) - - [1.1. Installation](#11-installation) - - [1.2. Using as a Library](#12-using-as-a-library) - - [1.3. Using Via The API Client](#13-using-via-the-api-client) - - [1.4. Signing Credentials with Hashicorp Vault](#14-signing-credentials-with-hashicorp-vault) - - [1.4.1. Identity Providers](#141-identity-providers) - - [1.4.2. Setting up a WS-X.509 provider](#142-setting-up-a-ws-x509-provider) - - [1.4.3. Building the ws-identity docker image](#143-building-the-ws-identity-docker-image) - - [1.5 Monitoring new blocks (WatchBlocks)](#15-monitoring-new-blocks-watchblocks) - - [1.5.1 Example](#151-example) - - [1.5.2 Listener Type](#152-listener-type) - - [Original](#original) - - [Cacti (custom)](#cacti-custom) - - [1.6 Delegated Signature](#16-delegated-signature) - - [1.6.1 Example](#161-example) -- [2. Architecture](#2-architecture) - - [2.1. run-transaction-endpoint](#21-run-transaction-endpoint) -- [3. Containerization](#3-containerization) - - [3.1. Running the container](#31-running-the-container) - - [3.3. Testing API calls with the container](#33-testing-api-calls-with-the-container) -- [4. Prometheus Exporter](#4-prometheus-exporter) - - [4.1. Usage Prometheus](#41-usage-prometheus) - - [4.2. Prometheus Integration](#42-prometheus-integration) - - [4.3. Helper code](#43-helper-code) - - [4.3.1. response.type.ts](#431-responsetypets) - - [4.3.2. data-fetcher.ts](#432-data-fetcherts) - - [4.3.3. metrics.ts](#433-metricsts) -- [5. Contributing](#5-contributing) -- [6. License](#6-license) -- [7. Acknowledgments](#7-acknowledgments) - - -## 1. Usage - -This plugin provides a way to interact with Fabric networks. -Using this one can perform: -* Deploy smart contracts (chaincode). -* Execute transactions on the ledger. -* Invoke chaincode functions. - -The above functionality can either be accessed by importing the plugin directly as a library (embedding) or by hosting it as a REST API through the [Cactus API server](https://www.npmjs.com/package/@hyperledger/cactus-cmd-api-server) - -We also publish the [Cactus API server as a container image](https://github.com/hyperledger/cactus/pkgs/container/cactus-cmd-api-server) to the GitHub Container Registry that you can run easily with a one liner. -The API server is also embeddable in your own NodeJS project if you choose to do so. - -### 1.1. Installation - -**npm** - -```sh -npm install @hyperledger/cactus-plugin-ledger-connector-fabric -``` - -**yarn** - -```sh -yarn add @hyperledger/cactus-plugin-ledger-connector-fabric -``` - -### 1.2. Using as a Library - -```typescript -import { - PluginLedgerConnectorFabric, - DefaultEventHandlerStrategy, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -const plugin = new PluginLedgerConnectorFabric({ - // See test cases for exact details on what parameters are needed -}); - -const req: RunTransactionRequest = { - // See tests for specific examples on request properties -}; - -try { - const res = await plugin.transact(req); -} catch (ex: Error) { - // Make sure to handle errors gracefully (which is dependent on your use-case) - console.error(ex); - throw ex; -} -``` - -### 1.3. Using Via The API Client - -**Prerequisites** -- A running Fabric ledger (network) -- You have a running Cactus API server on `$HOST:$PORT` with the Fabric connector plugin installed on it (and the latter configured to have access to the Fabric ledger from point 1) - -```typescript -import { - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - DefaultEventHandlerStrategy, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -// Step zero is to deploy your Fabric ledger and the Cactus API server -const apiUrl = `https://${HOST}:${PORT}`; - -const config = new Configuration({ basePath: apiUrl }); - -const apiClient = new FabricApi(config); - -const req: RunTransactionRequest = { - // See tests for specific examples on request properties -}; - -try { - const res = await apiClient.runTransactionV1(req); -} catch (ex: Error) { - // Make sure to handle errors gracefully (which is dependent on your use-case) - console.error(ex); - throw ex; -} -``` - -### 1.4. Signing Credentials with Hashicorp Vault - -To support signing of message with multiple identity types -```typescript -// vault server config for supporting vault identity provider -const vaultConfig:IVaultConfig = { - endpoint : "http://localhost:8200", - transitEngineMountPath: "/transit", -} -// web-socket server config for supporting vault identity provider -const webSocketConfig:IVaultConfig = { - server: socketServer as FabricSocketServer -} -// provide list of identity signing to be supported -const supportedIdentity:FabricSigningCredentialType[] = [FabricSigningCredentialType.VaultX509,FabricSigningCredentialType.WsX509,FabricSigningCredentialType.X509] -const pluginOptions:IPluginLedgerConnectorFabricOptions = { - // other options - vaultConfig : vaultConfig, - webSocketConfig : webSocketConfig, - supportedIdentity:supportedIdentity - // .. other options -} -const connector: PluginLedgerConnectorFabric = new PluginLedgerConnectorFabric(pluginOptions); -``` -To enroll an identity -```typescript -await connector.enroll( - { - keychainId: "keychain-identifier-for storing-certData", - keychainRef: "cert-data-identifier", - - // require in case of vault - type: FabricSigningCredentialType.VaultX509, // FabricSigningCredentialType.X509 - vaultTransitKey: { - token: "vault-token", - keyName: "vault-key-label", - }, - // required in case of web-socket server - type: FabricSigningCredentialType.WsX509, - webSocketKey: { - signature: signature, - sessionId: sessionId, - }, - }, - { - enrollmentID: "client2", - enrollmentSecret: "pw", - mspId: "Org1MSP", - caId: "ca.org1.example.com", - }, - ); -``` - -To Register an identity using register's key -```typescript -const secret = await connector.register( - { - keychainId: "keychain-id-that-store-certData-of-registrar", - keychainRef: "certData-label", - - // require in case of vault - type: FabricSigningCredentialType.VaultX509, // FabricSigningCredentialType.X509 - vaultTransitKey: { - token: testToken, - keyName: registrarKey, - }, - // required in case of web-socket server - type: FabricSigningCredentialType.WsX509, - webSocketKey: { - signature: signature, - sessionId: sessionId, - }, - }, - { - enrollmentID: "client-enrollmentID", - enrollmentSecret: "pw", - affiliation: "org1.department1", - }, - "ca.org1.example.com", // caID - ); -``` - -To transact with fabric -```typescript -const resp = await connector.transact{ - signingCredential: { - keychainId: keychainId, - keychainRef: "client-certData-id", - - // require in case of vault - type: FabricSigningCredentialType.VaultX509, // FabricSigningCredentialType.X509 - vaultTransitKey: { - token: testToken, - keyName: registrarKey, - }, - // required in case of web-socket server - type: FabricSigningCredentialType.WsX509, - webSocketKey: { - signature: signature, - sessionId: sessionId, - }, - }, - // .. other options -} -``` - -To Rotate the key -```typescript -await connector.rotateKey( - { - keychainId: keychainId, - keychainRef: "client-certData-id", - type: FabricSigningCredentialType.VaultX509, // FabricSigningCredentialType.X509 - - // require in case of vault - vaultTransitKey: { - token: testToken, - keyName: registrarKey, - }, - // key rotation currently not available using web-socket server - // web-socket connection not used to manages external keys - // user should re-enroll with new pub/priv key pair - }, - { - enrollmentID: string; - enrollmentSecret: string; - caId: string; - } -) -``` - -> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) - -#### 1.4.1. Identity Providers - -Identity providers allows client to manage their private more effectively and securely. Cactus Fabric Connector support multiple type of providers. Each provider differ based upon where the private are stored. On High level certificate credential are stored as - -```typescript -{ - type: FabricSigningCredentialType; - credentials: { - certificate: string; - // if identity type is IdentityProvidersType.X509 - privateKey?: string; - }; - mspId: string; -} -``` - -Currently Cactus Fabric Connector supports following Identity Providers - -- X509 : Simple and unsecured provider wherein `private` key is stored along with certificate in some `datastore`. Whenever connector require signature on fabric message, private key is brought from the `datastore` and message signed at the connector. -- Vault-X.509 : Secure provider wherein `private` key is stored with vault's transit transit engine and certificate in `certDatastore`. Rather then bringing the key to the connector, message digest are sent to the vault server which returns the `signature`. -- WS-X.509 : Secure provider wherein `private` key is stored with `client` and certificate in `certDatastore`. To get the fabric messages signed, message digest is sent to the client via `webSocket` connection opened by the client in the beginning (as described above) - -#### 1.4.2. Setting up a WS-X.509 provider -The following packages are used to access private keys (via web-socket) stored on a clients external device (e.g., browser, mobile app, or an IoT device...). - -[ws-identity](https://github.com/brioux/ws-identity): web-socket server that issues new ws-session tickets, authenticates incoming connections, and sends signature requests - -[ws-identity-client](https://github.com/brioux/ws-identity-client): backend connector to send requests from fabric application to ws-identity - -[ws-wallet](https://github.com/brioux/ws-wallet): external clients crypto key tool: create new key pair, request session ticket and open web-socket connection with ws-identity - -#### 1.4.3. Building the ws-identity docker image - -TBD - -### 1.5 Monitoring new blocks (WatchBlocks) -- Use `ApiClient` to receive new blocks from a fabric ledger. -- Type of the response can be configured. -- Credentials must be configured using `gatewayOptions` argument (you can either send them directly in request or use wallet stored in keychain). - -#### 1.5.1 Example -For more detailed example check [fabric-watch-blocks-v1-endpoint.test.ts](./src/test/typescript/integration/fabric-v2-2-x/fabric-watch-blocks-v1-endpoint.test.ts) - -``` typescript -// Setup -const signingCredential = { - keychainId: uuidv4(), - keychainRef: "user2", -}; - -// Create RxJS Observable. -// This will connect to the fabric connector and start the monitoring operation. -const watchObservable = apiClient.watchBlocksV1({ - channelName: "mychannel", // fabric channel name - gatewayOptions: { // use signing credential from keychain - identity: signingCredential.keychainRef, - wallet: { - keychain: signingCredential, - }, - }, - WatchBlocksListenerTypeV1.Full, // return full block data -}); - -// Subscribe to the observable to receive new blocks -const subscription = watchObservable.subscribe({ - next(event) { - // Handle new event - }, - error(err) { - // Handle error from connector - }, -}); -``` - -#### 1.5.2 Listener Type -There are two types of listener type - original and cactus ones. - -##### Original -Corresponds directly to `BlockType` from `fabric-common`: - - `WatchBlocksListenerTypeV1.Filtered`, - - `WatchBlocksListenerTypeV1.Full`, - - `WatchBlocksListenerTypeV1.Private`, - -##### Cacti (custom) -Parses the data and returns custom formatted block. -- `WatchBlocksListenerTypeV1.CactiTransactions`: Returns transactions summary. Compatible with legacy `fabric-socketio` monitoring operation. -- `WatchBlocksListenerTypeV1.CactiFullBlock`: Returns full block summary. - -### 1.6 Delegated Signature -- Custom signature callback can be used when increased security is needed or currently available options are not sufficient. -- Signature callback is used whenever fabric request must be signed. -- To use delegate signature instead of identity supplied directly / through keychain use `transactDelegatedSign` (for transact) or `watchBlocksDelegatedSignV1` for block monitoring. -- `uniqueTransactionData` can be passed to each delegate sign method on connector. This data is passed to signCallback to identify and verify the request. It can be used to pass signing tokens or any other data needed for performing the signing (e.g. user, scopes, etc...). -- `signProposal` method from this package can be used to sign the requests in offline location. -- For more complex examples see tests: `delegate-signing-methods.test` and `fabric-watch-blocks-delegated-sign-v1-endpoint.test`. - -#### 1.6.1 Example -```typescript -// Setup - supply callback when instantiating the connector plugin -fabricConnectorPlugin = new PluginLedgerConnectorFabric({ - instanceId: uuidv4(), - // ... - signCallback: async (payload, txData) => { - log.debug("signCallback called with txData (token):", txData); - return signProposal(adminIdentity.credentials.privateKey, payload); - }, -}); - -// Run transactions -await apiClient.runDelegatedSignTransactionV1({ - signerCertificate: adminIdentity.credentials.certificate, - signerMspID: adminIdentity.mspId, - channelName: ledgerChannelName, - contractName: assetTradeContractName, - invocationType: FabricContractInvocationType.Call, - methodName: "ReadAsset", - params: ["asset1"], - uniqueTransactionData: myJwtToken, -}); - -// Monitor for transactions: -apiClient.watchBlocksDelegatedSignV1({ - type: WatchBlocksListenerTypeV1.CactiTransactions, - signerCertificate: adminIdentity.credentials.certificate, - signerMspID: adminIdentity.mspId, - channelName: ledgerChannelName, -}) -``` - -## 2. Architecture -The sequence diagrams for various endpoints are mentioned below - -### 2.1. run-transaction-endpoint - -![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png) - -The above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. API server then executes transact() method which is explained in detailed in the subsequent diagram. - -![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png) - -The above diagram shows the sequence diagram of transact() method of the PluginLedgerConnectorFabric class. The caller to this function, which in reference to the above sequence diagram is API server, sends RunTransactionRequest object as an argument to the transact() method. Based on the invocationType (FabricContractInvocationType.CALL, FabricCOntractInvocationType.SEND), corresponding responses are send back to the caller. - -![run-transaction-endpoint-enroll](docs/architecture/images/run-transaction-endpoint-enroll.png) - -The above diagram shows the sequence diagram of enroll() method of the PluginLedgerConnectorFabric class. The caller to this function, which in reference to the above sequence diagram is API server, sends Signer object along with EnrollmentRequest as an argument to the enroll() method. Based on the singerType (FabricSigningCredentialType.X509, FabricSigningCredentialType.VaultX509, FabricSigningCredentialType.WsX509), corresponding identity is enrolled and stored inside keychain. - - - -## 3. Containerization - -### 3.1. Running the container - -Launch container with plugin configuration as an **environment variable**: -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - --env PLUGINS='[ - { - "packageName": "@hyperledger/cactus-plugin-ledger-connector-fabric", - "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", - "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", - "options": { - "instanceId": "some-unique-fabric-connector-instance-id", - "dockerBinary": "usr/local/bin/docker", - "peerBinary": "/fabric-samples/bin/peer", - "connectionProfile": { - "name": "TODO-FILL-OUT-YOUR-CONNECTION-PROFILE-DETAILS", - "version": "TODO-FILL-OUT-YOUR-CONNECTION-PROFILE-DETAILS", - "organizations": {}, - "peers": {} - }, - "cliContainerEnv": { - "CORE_PEER_LOCALMSPID": "Org1MSP", - "CORE_PEER_ADDRESS": "peer0.org1.example.com:7051", - "CORE_PEER_MSPCONFIGPATH": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp", - "CORE_PEER_TLS_ROOTCERT_FILE": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - "ORDERER_TLS_ROOTCERT_FILE": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" - }, - "discoveryOptions": { - "enabled": true, - "asLocalhost": true - } - } - } -]' \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 -``` - -Launch container with plugin configuration as a **CLI argument**: -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --plugins='[ - { - "packageName": "@hyperledger/cactus-plugin-ledger-connector-fabric", - "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", - "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", - "options": { - "instanceId": "some-unique-fabric-connector-instance-id", - "dockerBinary": "usr/local/bin/docker", - "peerBinary": "/fabric-samples/bin/peer", - "connectionProfile": { - "name": "TODO-FILL-OUT-YOUR-CONNECTION-PROFILE-DETAILS", - "version": "TODO-FILL-OUT-YOUR-CONNECTION-PROFILE-DETAILS", - "organizations": {}, - "peers": {} - }, - "cliContainerEnv": { - "CORE_PEER_LOCALMSPID": "Org1MSP", - "CORE_PEER_ADDRESS": "peer0.org1.example.com:7051", - "CORE_PEER_MSPCONFIGPATH": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp", - "CORE_PEER_TLS_ROOTCERT_FILE": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - "ORDERER_TLS_ROOTCERT_FILE": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" - }, - "discoveryOptions": { - "enabled": true, - "asLocalhost": true - } - } - } - ]' -``` - -Launch container with **configuration file** mounted from host machine: -```sh -echo '{"plugins": [ - { - "packageName": "@hyperledger/cactus-plugin-ledger-connector-fabric", - "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", - "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", - "options": { - "instanceId": "some-unique-fabric-connector-instance-id", - "dockerBinary": "usr/local/bin/docker", - "peerBinary": "/fabric-samples/bin/peer", - "connectionProfile": { - "name": "TODO-FILL-OUT-YOUR-CONNECTION-PROFILE-DETAILS", - "version": "TODO-FILL-OUT-YOUR-CONNECTION-PROFILE-DETAILS", - "organizations": {}, - "peers": {} - }, - "cliContainerEnv": { - "CORE_PEER_LOCALMSPID": "Org1MSP", - "CORE_PEER_ADDRESS": "peer0.org1.example.com:7051", - "CORE_PEER_MSPCONFIGPATH": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp", - "CORE_PEER_TLS_ROOTCERT_FILE": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - "ORDERER_TLS_ROOTCERT_FILE": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" - }, - "discoveryOptions": { - "enabled": true, - "asLocalhost": true - } - } - }] -}' > .cacti-config.json - -``` - -```sh -docker run \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - --mount type=bind,source="$(pwd)"/.cacti-config.json,target=/.cacti-config.json \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 \ - node index.js \ - --config-file=/.cacti-config.json -``` - -### 3.3. Testing API calls with the container - -Don't have a fabric network on hand to test with? Test or develop against our fabric All-In-One container! - -**Terminal Window 1 (Ledger)** -```sh -docker run \ - --privileged \ - --publish 0.0.0.0:8545:8545/tcp \ - --publish 0.0.0.0:8546:8546/tcp \ - --publish 0.0.0.0:8888:8888/tcp \ - --publish 0.0.0.0:9001:9001/tcp \ - --publish 0.0.0.0:9545:9545/tcp \ - ghcr.io/hyperledger/cactus-fabric2-all-in-one:2024-03-03--issue-2945-fabric-v2-5-6 -``` - -**Terminal Window 2 (Cacti API Server)** -```sh -docker run \ - --network=host \ - --rm \ - --publish 3000:3000 \ - --publish 4000:4000 \ - --env AUTHORIZATION_PROTOCOL='NONE' \ - --env AUTHORIZATION_CONFIG_JSON='{}' \ - --env GRPC_TLS_ENABLED=false \ - --env API_TLS_CERT_PEM=- \ - --env API_TLS_CLIENT_CA_PEM=- \ - --env API_TLS_KEY_PEM=- \ - --env API_TLS_ENABLED=false \ - --env API_MTLS_ENABLED=false \ - --env API_HOST=0.0.0.0 \ - --env LOG_LEVEL=INFO \ - --env PLUGINS='[ - { - "packageName": "@hyperledger/cactus-plugin-ledger-connector-fabric", - "type": "org.hyperledger.cactus.plugin_import_type.LOCAL", - "action": "org.hyperledger.cactus.plugin_import_action.INSTALL", - "options": { - "instanceId": "some-unique-fabric-connector-instance-id", - "dockerBinary": "usr/local/bin/docker", - "peerBinary": "/fabric-samples/bin/peer", - "connectionProfile": { - "name": "TODO-FILL-OUT-YOUR-CONNECTION-PROFILE-DETAILS", - "version": "TODO-FILL-OUT-YOUR-CONNECTION-PROFILE-DETAILS", - "organizations": {}, - "peers": {} - }, - "cliContainerEnv": { - "CORE_PEER_LOCALMSPID": "Org1MSP", - "CORE_PEER_ADDRESS": "peer0.org1.example.com:7051", - "CORE_PEER_MSPCONFIGPATH": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp", - "CORE_PEER_TLS_ROOTCERT_FILE": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - "ORDERER_TLS_ROOTCERT_FILE": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" - }, - "discoveryOptions": { - "enabled": true, - "asLocalhost": true - } - } - } -]' \ - ghcr.io/hyperledger/cactus-cmd-api-server:2024-07-03t18-38-45-dev-65adc3255 -``` - -FIXME: This does not work. We need to (at the very least) -1. add the a keychain plugin to the API server config -2. load the keychain up with credentials that can be used to access the Ledger -3. reference the keychain entry created in step 2 as the signing credential below. - -**Terminal Window 3 (cURL)** -```sh -curl --location --request POST 'http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "channelName": "mychannel", - "contractName": "basic", - "invocationType": "FabricContractInvocationType.SEND", - "params": ["some-unique-asset-id-1", "Green", "19", "Peter", "9999"], - "methodName": "CreateAsset", - "signingCredential": { - "keychainId": "FIXME", - "keychainRef": "FIXME" - } -}' -``` - -The above should produce a response that looks similar to this: - -```json -// FIXME -``` - - - -## 4. Prometheus Exporter - -This class creates a prometheus exporter, which scraps the transactions (total transaction count) for the use cases incorporating the use of Fabric connector plugin. - - -### 4.1. Usage Prometheus -The prometheus exporter object is initialized in the `PluginLedgerConnectorFabric` class constructor itself, so instantiating the object of the `PluginLedgerConnectorFabric` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IPluginLedgerConnectorFabricOptions` interface for `PluginLedgerConnectoFabric` constructor. - -`getPrometheusExporterMetricsEndpointV1` function returns the prometheus exporter metrics, currently displaying the total transaction count, which currently increments everytime the `transact()` method of the `PluginLedgerConnectorFabric` class is called. - -### 4.2. Prometheus Integration -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'fabric_ledger_connector_exporter' - metrics_path: api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. The test cases (For example, `packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts`) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_fabric_total_tx_count** and click **execute** - -### 4.3. Helper code - -#### 4.3.1. response.type.ts -This file contains the various responses of the metrics. - -#### 4.3.2. data-fetcher.ts -This file contains functions encasing the logic to process the data points - -#### 4.3.3. metrics.ts -This file lists all the prometheus metrics and what they are used for. - -## 5. Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## 6. License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## 7. Acknowledgments diff --git a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/images/run-transaction-endpoint-enroll.png b/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/images/run-transaction-endpoint-enroll.png deleted file mode 100644 index 76310b39e2..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/images/run-transaction-endpoint-enroll.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/images/run-transaction-endpoint-transact.png b/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/images/run-transaction-endpoint-transact.png deleted file mode 100644 index 91a13a4290..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/images/run-transaction-endpoint-transact.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/images/run-transaction-endpoint.png b/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/images/run-transaction-endpoint.png deleted file mode 100644 index 8e6a76a599..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/images/run-transaction-endpoint.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/run-transaction-endpoint-enroll.puml b/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/run-transaction-endpoint-enroll.puml deleted file mode 100644 index 934e73f7ed..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/run-transaction-endpoint-enroll.puml +++ /dev/null @@ -1,42 +0,0 @@ -@startuml -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\enroll() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 300 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "PluginLedgerConnectorFabric" as t << (C,#ADD1B2) class >> - -autoactivate on - -activate caller -caller -> t : enroll(signer: FabricSigningCredential,\nreq: FabricEnrollmentRequest) -t->t: {\n\tenrollmentID: string,\n\tenrollmentSecret: string,\n\tcaId: string,\n\tmspId: string\n} - -alt #LightBlue this.activatedSinger.includes(singer.type) === false - t-->caller: throw Error(`singer.type not activated`) -end - -t->t : ca = this.createCaClient(caId) -t->t : enrollmentRequest = {enrollmentID,enrollmentSecret} - -group #LightBlue if singer.type == FabricSigningCredentialType.DeafultX509 -else #LightYellow if singer.type == FabricSigningCredentialType.VaulttX509 - t->t : enrollmentRequest.csr = await (this.activatedSinger[VaulttX509] as VaultX509Provider)\n\t.getKey(singer.vaultTransitKey)\n\t.generateCSR(enrollmentID) -else #LightCoral default - t -> caller: throw Error('unknown SingerType') -end - -t->t: resp = await ca.enroll(enrollmentRequest) -t->t: certData = {singer.type,mspId,certificate} - -alt if resp.key !== undefined - t->t: resp.credentials.privateKey = resp.key.toBytes(); -end - -t->t : await certDatastore.put(singer.keychainref,certData) - -deactivate caller -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/run-transaction-endpoint-transact.puml b/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/run-transaction-endpoint-transact.puml deleted file mode 100644 index be85b8405d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/run-transaction-endpoint-transact.puml +++ /dev/null @@ -1,59 +0,0 @@ -@startuml -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\ntransact() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 300 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "PluginLedgerConnectorFabric" as t << (C,#ADD1B2) class >> - -autoactivate on - -activate caller -caller -> t: transact(req: RunTransactionRequest) - -t -> t: req -t --> t: {signingCredential, channelName, contractName, invocationType, fnName as methodName, params} - -t -> t: InMemoryWallet(new X509WalletMixin()) -t --> t: wallet - -t -> t: opts.pluginRegistry.findOneByKeychainID(signingCredential.keychainId) -t --> t: keychain - -t -> t: keychain.get(signingCredential.keychainRef) -t --> t: fabricX509IdentityJson - -t -> t: JSON.parse(fabricX509IdentityJson) -t --> t: identity - -t -> t: wait for wallter.import(signingCredential.keychainRef, identity) -deactivate t - -t -> t: wait for gateway.connect(connectionProfile, gatewayOptions) -deactivate t - -t -> t: wait gateway.getNetwork(channelName) -t --> t: network - -t -> t: network.getContract(contractName) -t --> t: contract - -group #LightBlue if invocationType == FabricContractInvocationType.Call - t -> t: wait for contract.evaluateTransaction(fnName, ...params) - t --> t: out, success: true -else #LightYellow if invocationType == FabricContractInvocationType.Send - t -> t: wait for contract.submitTransaction(fnName, ...params) - t --> t: out, success: true -else #LightCoral default - t --> caller: throw Error('unknown FabricContractInvocationType') -end - -t -> t: out.toString("utf-8") -t --> t: outUtf8 - -t --> caller: return { functionOutput, success } as res - -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/run-transaction-endpoint.puml b/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/run-transaction-endpoint.puml deleted file mode 100644 index 83e0858866..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/docs/architecture/run-transaction-endpoint.puml +++ /dev/null @@ -1,29 +0,0 @@ -@startuml Sequence Diagram - Transaction - -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -box "Users" #LightBlue -actor "User A" as a -end box - -box "Hyperledger Cactus" #LightGray -entity "API Client" as apic -entity "API Server" as apis -end box - -box "Ledger Connector" #LightGreen -database "Besu" as besucon -end box - -a --> apic : Tx Besu Ledger -apic --> apis: Request -apis --> besucon: transact() -besucon --> apis: Response -apis --> apic: Formatted Response - -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/openapitools.json b/packages/cactus-plugin-ledger-connector-fabric/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/package.json b/packages/cactus-plugin-ledger-connector-fabric/package.json deleted file mode 100644 index d991b50033..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/package.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-ledger-connector-fabric", - "version": "2.0.0", - "description": "Allows Cactus nodes to connect to a Fabric ledger.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-ledger-connector-fabric.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@fidm/x509": "1.2.1", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "bl": "6.0.16", - "bn.js": "4.12.0", - "elliptic": "6.5.7", - "express": "4.21.0", - "fabric-ca-client": "2.5.0-snapshot.23", - "fabric-common": "2.5.0-snapshot.23", - "fabric-network": "2.5.0-snapshot.23", - "fabric-protos": "2.5.0-snapshot.23", - "fast-safe-stringify": "2.1.1", - "form-data": "4.0.0", - "http-status-codes": "2.1.4", - "jsrsasign": "11.0.0", - "long": "5.2.3", - "multer": "1.4.5-lts.1", - "ngo": "2.7.0", - "node-ssh": "13.1.0", - "node-vault": "0.9.22", - "openapi-types": "12.1.3", - "prom-client": "15.1.3", - "run-time-error-cjs": "1.4.0", - "rxjs": "7.8.1", - "sanitize-filename": "1.6.3", - "sanitize-html": "2.12.1", - "secp256k1": "4.0.3", - "socket.io-client-fixed-types": "4.5.4", - "temp": "0.9.4", - "typescript-optional": "2.0.1", - "uuid": "10.0.0", - "ws-identity-client": "1.0.2" - }, - "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/bn.js": "5.1.0", - "@types/body-parser": "1.19.4", - "@types/elliptic": "6.4.16", - "@types/express": "5.0.0", - "@types/fs-extra": "11.0.4", - "@types/jsrsasign": "8.0.13", - "@types/multer": "1.4.7", - "@types/node-vault": "0.9.13", - "@types/sanitize-html": "2.9.5", - "@types/temp": "0.9.1", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "fs-extra": "11.2.0", - "internal-ip": "6.2.0", - "socket.io": "4.6.2", - "ws-wallet": "1.1.5" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-ledger-connector-fabric.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-ledger-connector-fabric.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 8712738f9e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,71 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_cacti_block_full_event_v1.go -model_cacti_block_full_response_v1.go -model_cacti_block_transaction_event_v1.go -model_cacti_block_transactions_response_v1.go -model_chain_code_language_runtime.go -model_chain_code_life_cycle_command_responses.go -model_chain_code_programming_language.go -model_connection_profile.go -model_connection_profile_client.go -model_default_event_handler_strategy.go -model_deploy_contract_go_source_v1_501_response.go -model_deploy_contract_go_source_v1_request.go -model_deploy_contract_go_source_v1_request_constructor_args.go -model_deploy_contract_go_source_v1_response.go -model_deploy_contract_v1_request.go -model_deploy_contract_v1_response.go -model_deployment_target_org_fabric2x.go -model_deployment_target_organization.go -model_error_exception_response_v1.go -model_fabric_certificate_identity_v1.go -model_fabric_contract_invocation_type.go -model_fabric_signing_credential.go -model_fabric_signing_credential_type.go -model_fabric_x509_certificate_v1.go -model_file_base64.go -model_full_block_transaction_action_v1.go -model_full_block_transaction_endorsement_v1.go -model_full_block_transaction_event_v1.go -model_gateway_discovery_options.go -model_gateway_event_handler_options.go -model_gateway_options.go -model_gateway_options_wallet.go -model_get_block_request_v1.go -model_get_block_request_v1_query.go -model_get_block_request_v1_query_block_hash.go -model_get_block_response_decoded_v1.go -model_get_block_response_encoded_v1.go -model_get_block_response_type_v1.go -model_get_block_response_v1.go -model_get_chain_info_request_v1.go -model_get_chain_info_response_v1.go -model_get_transaction_receipt_response.go -model_run_delegated_sign_transaction_request.go -model_run_transaction_request.go -model_run_transaction_response.go -model_run_transaction_response_type.go -model_ssh_exec_command_response.go -model_transact_receipt_block_meta_data.go -model_transact_receipt_transaction_creator.go -model_transact_receipt_transaction_endorsement.go -model_vault_transit_key.go -model_watch_blocks_cactus_error_response_v1.go -model_watch_blocks_delegated_sign_options_v1.go -model_watch_blocks_filtered_response_v1.go -model_watch_blocks_full_response_v1.go -model_watch_blocks_listener_type_v1.go -model_watch_blocks_options_v1.go -model_watch_blocks_private_response_v1.go -model_watch_blocks_response_v1.go -model_watch_blocks_v1.go -model_web_socket_key.go -response.go -utils.go diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index cb335cd9c6..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,179 +0,0 @@ -# Go API client for cactus-plugin-ledger-connector-fabric - -Can perform basic tasks on a fabric ledger - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-ledger-connector-fabric "github.com/hyperledger/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-fabric.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-fabric.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-fabric.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-ledger-connector-fabric.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeployContractGoSourceV1**](docs/DefaultApi.md#deploycontractgosourcev1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source | Deploys a chaincode contract in the form of a go sources. -*DefaultApi* | [**DeployContractV1**](docs/DefaultApi.md#deploycontractv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract | Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The 'v1' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version. -*DefaultApi* | [**GetBlockV1**](docs/DefaultApi.md#getblockv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block | Get block from the channel using one of selectors from the input. Works only on Fabric 2.x. -*DefaultApi* | [**GetChainInfoV1**](docs/DefaultApi.md#getchaininfov1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info | Get fabric ledger chain info. -*DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**GetTransactionReceiptByTxIDV1**](docs/DefaultApi.md#gettransactionreceiptbytxidv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid | get a transaction receipt by tx id on a Fabric ledger. -*DefaultApi* | [**RunDelegatedSignTransactionV1**](docs/DefaultApi.md#rundelegatedsigntransactionv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction | Runs a transaction on a Fabric ledger using user-provided signing callback. -*DefaultApi* | [**RunTransactionV1**](docs/DefaultApi.md#runtransactionv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction | Runs a transaction on a Fabric ledger. - - -## Documentation For Models - - - [CactiBlockFullEventV1](docs/CactiBlockFullEventV1.md) - - [CactiBlockFullResponseV1](docs/CactiBlockFullResponseV1.md) - - [CactiBlockTransactionEventV1](docs/CactiBlockTransactionEventV1.md) - - [CactiBlockTransactionsResponseV1](docs/CactiBlockTransactionsResponseV1.md) - - [ChainCodeLanguageRuntime](docs/ChainCodeLanguageRuntime.md) - - [ChainCodeLifeCycleCommandResponses](docs/ChainCodeLifeCycleCommandResponses.md) - - [ChainCodeProgrammingLanguage](docs/ChainCodeProgrammingLanguage.md) - - [ConnectionProfile](docs/ConnectionProfile.md) - - [ConnectionProfileClient](docs/ConnectionProfileClient.md) - - [DefaultEventHandlerStrategy](docs/DefaultEventHandlerStrategy.md) - - [DeployContractGoSourceV1501Response](docs/DeployContractGoSourceV1501Response.md) - - [DeployContractGoSourceV1Request](docs/DeployContractGoSourceV1Request.md) - - [DeployContractGoSourceV1RequestConstructorArgs](docs/DeployContractGoSourceV1RequestConstructorArgs.md) - - [DeployContractGoSourceV1Response](docs/DeployContractGoSourceV1Response.md) - - [DeployContractV1Request](docs/DeployContractV1Request.md) - - [DeployContractV1Response](docs/DeployContractV1Response.md) - - [DeploymentTargetOrgFabric2x](docs/DeploymentTargetOrgFabric2x.md) - - [DeploymentTargetOrganization](docs/DeploymentTargetOrganization.md) - - [ErrorExceptionResponseV1](docs/ErrorExceptionResponseV1.md) - - [FabricCertificateIdentityV1](docs/FabricCertificateIdentityV1.md) - - [FabricContractInvocationType](docs/FabricContractInvocationType.md) - - [FabricSigningCredential](docs/FabricSigningCredential.md) - - [FabricSigningCredentialType](docs/FabricSigningCredentialType.md) - - [FabricX509CertificateV1](docs/FabricX509CertificateV1.md) - - [FileBase64](docs/FileBase64.md) - - [FullBlockTransactionActionV1](docs/FullBlockTransactionActionV1.md) - - [FullBlockTransactionEndorsementV1](docs/FullBlockTransactionEndorsementV1.md) - - [FullBlockTransactionEventV1](docs/FullBlockTransactionEventV1.md) - - [GatewayDiscoveryOptions](docs/GatewayDiscoveryOptions.md) - - [GatewayEventHandlerOptions](docs/GatewayEventHandlerOptions.md) - - [GatewayOptions](docs/GatewayOptions.md) - - [GatewayOptionsWallet](docs/GatewayOptionsWallet.md) - - [GetBlockRequestV1](docs/GetBlockRequestV1.md) - - [GetBlockRequestV1Query](docs/GetBlockRequestV1Query.md) - - [GetBlockRequestV1QueryBlockHash](docs/GetBlockRequestV1QueryBlockHash.md) - - [GetBlockResponseDecodedV1](docs/GetBlockResponseDecodedV1.md) - - [GetBlockResponseEncodedV1](docs/GetBlockResponseEncodedV1.md) - - [GetBlockResponseTypeV1](docs/GetBlockResponseTypeV1.md) - - [GetBlockResponseV1](docs/GetBlockResponseV1.md) - - [GetChainInfoRequestV1](docs/GetChainInfoRequestV1.md) - - [GetChainInfoResponseV1](docs/GetChainInfoResponseV1.md) - - [GetTransactionReceiptResponse](docs/GetTransactionReceiptResponse.md) - - [RunDelegatedSignTransactionRequest](docs/RunDelegatedSignTransactionRequest.md) - - [RunTransactionRequest](docs/RunTransactionRequest.md) - - [RunTransactionResponse](docs/RunTransactionResponse.md) - - [RunTransactionResponseType](docs/RunTransactionResponseType.md) - - [SSHExecCommandResponse](docs/SSHExecCommandResponse.md) - - [TransactReceiptBlockMetaData](docs/TransactReceiptBlockMetaData.md) - - [TransactReceiptTransactionCreator](docs/TransactReceiptTransactionCreator.md) - - [TransactReceiptTransactionEndorsement](docs/TransactReceiptTransactionEndorsement.md) - - [VaultTransitKey](docs/VaultTransitKey.md) - - [WatchBlocksCactusErrorResponseV1](docs/WatchBlocksCactusErrorResponseV1.md) - - [WatchBlocksDelegatedSignOptionsV1](docs/WatchBlocksDelegatedSignOptionsV1.md) - - [WatchBlocksFilteredResponseV1](docs/WatchBlocksFilteredResponseV1.md) - - [WatchBlocksFullResponseV1](docs/WatchBlocksFullResponseV1.md) - - [WatchBlocksListenerTypeV1](docs/WatchBlocksListenerTypeV1.md) - - [WatchBlocksOptionsV1](docs/WatchBlocksOptionsV1.md) - - [WatchBlocksPrivateResponseV1](docs/WatchBlocksPrivateResponseV1.md) - - [WatchBlocksResponseV1](docs/WatchBlocksResponseV1.md) - - [WatchBlocksV1](docs/WatchBlocksV1.md) - - [WebSocketKey](docs/WebSocketKey.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 1f6abb3855..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,2090 +0,0 @@ -openapi: 3.0.3 -info: - description: Can perform basic tasks on a fabric ledger - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - Connector Fabric - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction: - post: - description: "" - operationId: runTransactionV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionRequest' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Runs a transaction on a Fabric ledger. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction: - post: - description: "" - operationId: runDelegatedSignTransactionV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunDelegatedSignTransactionRequest' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Runs a transaction on a Fabric ledger using user-provided signing callback. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid: - post: - description: "" - operationId: getTransactionReceiptByTxIDV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionRequest' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetTransactionReceiptResponse' - description: OK - "404": - description: "" - summary: get a transaction receipt by tx id on a Fabric ledger. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source: - post: - operationId: deployContractGoSourceV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractGoSourceV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractGoSourceV1Response' - description: OK - "501": - content: - text/plain: - schema: - $ref: '#/components/schemas/deployContractGoSourceV1_501_response' - description: Not implemented - summary: Deploys a chaincode contract in the form of a go sources. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract: - post: - operationId: deployContractV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractV1Response' - description: OK - "501": - content: - text/plain: - schema: - $ref: '#/components/schemas/deployContractGoSourceV1_501_response' - description: Not implemented - summary: "Deploys a chaincode contract from a set of source files. Note: This\ - \ endpoint only supports Fabric 2.x. The 'v1' suffix in the method name refers\ - \ to the Cactus API version, not the supported Fabric ledger version." - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block: - post: - operationId: getBlockV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetBlockRequestV1' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetBlockResponseV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Get block from the channel using one of selectors from the input. Works - only on Fabric 2.x. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info: - post: - operationId: getChainInfoV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GetChainInfoRequestV1' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetChainInfoResponseV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Get fabric ledger chain info. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics -components: - schemas: - TransactReceiptTransactionEndorsement: - example: - mspid: mspid - signature: signature - endorserID: endorserID - properties: - mspid: - type: string - endorserID: - type: string - signature: - type: string - type: object - TransactReceiptTransactionCreator: - example: - mspid: mspid - creatorID: creatorID - properties: - mspid: - type: string - creatorID: - type: string - type: object - TransactReceiptBlockMetaData: - example: - mspid: mspid - blockCreatorID: blockCreatorID - signature: signature - properties: - mspid: - type: string - blockCreatorID: - type: string - signature: - type: string - type: object - VaultTransitKey: - description: vault key details for signing fabric message with private key stored - with transit engine. - example: - keyName: keyName - token: token - nullable: false - properties: - keyName: - description: label of private key - maxLength: 100 - minLength: 1 - nullable: false - type: string - token: - description: token for accessing private key - maxLength: 100 - minLength: 1 - nullable: false - type: string - required: - - keyName - - token - type: object - WebSocketKey: - description: web-socket key details for signing fabric message with private - key stored with external client - example: - signature: signature - sessionId: sessionId - nullable: false - properties: - sessionId: - description: session Id to access client - maxLength: 100 - minLength: 1 - nullable: false - type: string - signature: - description: signature of the session ID - maxLength: 100 - minLength: 1 - nullable: false - type: string - required: - - sessionId - - signature - type: object - FabricSigningCredentialType: - description: different type of identity provider for singing fabric messages - supported by this package - enum: - - X.509 - - Vault-X.509 - - WS-X.509 - nullable: false - type: string - FabricSigningCredential: - example: - vaultTransitKey: - keyName: keyName - token: token - keychainId: keychainId - keychainRef: keychainRef - webSocketKey: - signature: signature - sessionId: sessionId - type: null - properties: - keychainId: - maxLength: 100 - minLength: 1 - nullable: false - type: string - keychainRef: - maxLength: 100 - minLength: 1 - nullable: false - type: string - type: - $ref: '#/components/schemas/FabricSigningCredentialType' - vaultTransitKey: - $ref: '#/components/schemas/VaultTransitKey' - webSocketKey: - $ref: '#/components/schemas/WebSocketKey' - required: - - keychainId - - keychainRef - type: object - ChainCodeLifeCycleCommandResponses: - example: - init: - code: 0 - stdout: stdout - stderr: stderr - signal: signal - commit: - code: 0 - stdout: stdout - stderr: stderr - signal: signal - installList: - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - queryCommitted: - code: 0 - stdout: stdout - stderr: stderr - signal: signal - packaging: - code: 0 - stdout: stdout - stderr: stderr - signal: signal - approveForMyOrgList: - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - queryInstalledList: - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - properties: - packaging: - $ref: '#/components/schemas/SSHExecCommandResponse' - installList: - items: - $ref: '#/components/schemas/SSHExecCommandResponse' - minItems: 1 - type: array - queryInstalledList: - items: - $ref: '#/components/schemas/SSHExecCommandResponse' - minItems: 1 - type: array - approveForMyOrgList: - items: - $ref: '#/components/schemas/SSHExecCommandResponse' - minItems: 1 - type: array - commit: - $ref: '#/components/schemas/SSHExecCommandResponse' - queryCommitted: - $ref: '#/components/schemas/SSHExecCommandResponse' - init: - $ref: '#/components/schemas/SSHExecCommandResponse' - required: - - approveForMyOrgList - - installList - - queryInstalledList - type: object - ChainCodeProgrammingLanguage: - description: Enumerates the supported source code programming languages of Hyperledger - Fabric - enum: - - golang - - javascript - - typescript - - java - type: string - ChainCodeLanguageRuntime: - description: Enumerates the supported programming language runtimes of Hyperledger - Fabric - enum: - - golang - - node - - java - type: string - ConnectionProfile: - additionalProperties: true - example: - channels: - key: "" - certificateAuthorities: - key: "" - name: basic-network - organizations: - key: "" - peers: - key: "" - x-type: hlfv1 - description: The basic network - client: - organization: Org1 - orderers: - key: "" - version: "1.0" - properties: - name: - example: basic-network - maxLength: 1024 - minLength: 1 - type: string - x-type: - example: hlfv1 - minLength: 1 - type: string - description: - example: The basic network - type: string - version: - example: "1.0" - type: string - client: - $ref: '#/components/schemas/ConnectionProfile_client' - channels: - additionalProperties: true - type: object - organizations: - additionalProperties: true - type: object - orderers: - additionalProperties: true - type: object - peers: - additionalProperties: true - type: object - certificateAuthorities: - additionalProperties: true - type: object - required: - - name - - organizations - - peers - - version - type: object - GatewayDiscoveryOptions: - additionalProperties: false - example: - asLocalhost: true - enabled: true - properties: - asLocalhost: - nullable: false - type: boolean - enabled: - nullable: false - type: boolean - type: object - GatewayOptions: - example: - wallet: - keychain: - vaultTransitKey: - keyName: keyName - token: token - keychainId: keychainId - keychainRef: keychainRef - webSocketKey: - signature: signature - sessionId: sessionId - type: null - json: json - connectionProfile: - channels: - key: "" - certificateAuthorities: - key: "" - name: basic-network - organizations: - key: "" - peers: - key: "" - x-type: hlfv1 - description: The basic network - client: - organization: Org1 - orderers: - key: "" - version: "1.0" - discovery: - asLocalhost: true - enabled: true - identity: identity - eventHandlerOptions: - commitTimeout: 0.8008281904610115 - strategy: null - endorseTimeout: 6.027456183070403 - properties: - connectionProfile: - $ref: '#/components/schemas/ConnectionProfile' - discovery: - $ref: '#/components/schemas/GatewayDiscoveryOptions' - eventHandlerOptions: - $ref: '#/components/schemas/GatewayEventHandlerOptions' - identity: - type: string - wallet: - $ref: '#/components/schemas/GatewayOptions_wallet' - required: - - identity - - wallet - type: object - DefaultEventHandlerStrategy: - enum: - - MSPID_SCOPE_ALLFORTX - - MSPID_SCOPE_ANYFORTX - - NETWORK_SCOPE_ALLFORTX - - NETWORK_SCOPE_ANYFORTX - type: string - GatewayEventHandlerOptions: - additionalProperties: false - example: - commitTimeout: 0.8008281904610115 - strategy: null - endorseTimeout: 6.027456183070403 - properties: - commitTimeout: - nullable: false - type: number - endorseTimeout: - nullable: false - type: number - strategy: - $ref: '#/components/schemas/DefaultEventHandlerStrategy' - required: - - strategy - type: object - FileBase64: - description: Represents a file-system file that has a name and a body which - holds the file contents as a Base64 encoded string - example: - filename: my-cool-file-full-of-wonders-and-fun-stuff.go - filepath: ./my/sub-folder/structure/ - body: body - properties: - body: - description: The file's contents encoded as a Base64 string. - maxLength: 104857600 - minLength: 1 - nullable: false - type: string - filename: - description: The name as referred to on a file system - example: my-cool-file-full-of-wonders-and-fun-stuff.go - maxLength: 255 - minLength: 1 - nullable: false - type: string - filepath: - description: "The relative path of the file, if it should be placed in a\ - \ sub-directory" - example: ./my/sub-folder/structure/ - maxLength: 512 - minLength: 1 - nullable: false - type: string - required: - - body - - filename - type: object - FabricContractInvocationType: - enum: - - FabricContractInvocationType.SEND - - FabricContractInvocationType.CALL - - FabricContractInvocationType.SENDPRIVATE - type: string - SSHExecCommandResponse: - example: - code: 0 - stdout: stdout - stderr: stderr - signal: signal - properties: - stdout: - nullable: false - type: string - stderr: - nullable: false - type: string - code: - nullable: true - type: integer - signal: - nullable: true - type: string - required: - - code - - signal - - stderr - - stdout - type: object - RunTransactionResponseType: - description: Response format from transaction / query execution - enum: - - org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.JSON - - org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.UTF8 - type: string - x-enum-varnames: - - JSON - - UTF8 - RunTransactionRequest: - additionalProperties: false - example: - gatewayOptions: - wallet: - keychain: - vaultTransitKey: - keyName: keyName - token: token - keychainId: keychainId - keychainRef: keychainRef - webSocketKey: - signature: signature - sessionId: sessionId - type: null - json: json - connectionProfile: - channels: - key: "" - certificateAuthorities: - key: "" - name: basic-network - organizations: - key: "" - peers: - key: "" - x-type: hlfv1 - description: The basic network - client: - organization: Org1 - orderers: - key: "" - version: "1.0" - discovery: - asLocalhost: true - enabled: true - identity: identity - eventHandlerOptions: - commitTimeout: 0.8008281904610115 - strategy: null - endorseTimeout: 6.027456183070403 - invocationType: null - responseType: null - transientData: "{}" - endorsingPeers: - - endorsingPeers - - endorsingPeers - endorsingOrgs: - - endorsingOrgs - - endorsingOrgs - methodName: methodName - channelName: channelName - contractName: contractName - params: - - params - - params - signingCredential: - vaultTransitKey: - keyName: keyName - token: token - keychainId: keychainId - keychainRef: keychainRef - webSocketKey: - signature: signature - sessionId: sessionId - type: null - properties: - endorsingPeers: - description: An array of endorsing peers (name or url) for the transaction. - items: - maxLength: 4096 - minLength: 1 - nullable: false - type: string - type: array - endorsingOrgs: - description: An array of endorsing organizations (by mspID or issuer org - name on certificate) for the transaction. - items: - maxLength: 4096 - minLength: 1 - nullable: false - type: string - type: array - transientData: - nullable: true - type: object - gatewayOptions: - $ref: '#/components/schemas/GatewayOptions' - signingCredential: - $ref: '#/components/schemas/FabricSigningCredential' - channelName: - maxLength: 100 - minLength: 1 - nullable: false - type: string - contractName: - maxLength: 100 - minLength: 1 - nullable: false - type: string - invocationType: - $ref: '#/components/schemas/FabricContractInvocationType' - methodName: - maxLength: 100 - minLength: 1 - nullable: false - type: string - params: - default: [] - items: - nullable: true - type: string - nullable: false - type: array - responseType: - $ref: '#/components/schemas/RunTransactionResponseType' - required: - - channelName - - contractName - - invocationType - - methodName - - params - - signingCredential - type: object - RunTransactionResponse: - example: - functionOutput: functionOutput - transactionId: transactionId - properties: - functionOutput: - nullable: false - type: string - transactionId: - nullable: false - type: string - required: - - functionOutput - - transactionId - type: object - RunDelegatedSignTransactionRequest: - additionalProperties: false - example: - signerCertificate: signerCertificate - invocationType: null - responseType: null - transientData: "{}" - endorsingPeers: - - endorsingPeers - - endorsingPeers - endorsingOrgs: - - endorsingOrgs - - endorsingOrgs - methodName: methodName - channelName: channelName - contractName: contractName - uniqueTransactionData: "" - params: - - params - - params - signerMspID: signerMspID - properties: - endorsingPeers: - description: An array of endorsing peers (name or url) for the transaction. - items: - maxLength: 4096 - minLength: 1 - nullable: false - type: string - type: array - endorsingOrgs: - description: An array of endorsing organizations (by mspID or issuer org - name on certificate) for the transaction. - items: - maxLength: 4096 - minLength: 1 - nullable: false - type: string - type: array - transientData: - nullable: true - type: object - signerCertificate: - nullable: false - type: string - signerMspID: - nullable: false - type: string - uniqueTransactionData: - description: Can be used to uniquely identify and authorize signing request - nullable: false - channelName: - maxLength: 100 - minLength: 1 - nullable: false - type: string - contractName: - maxLength: 100 - minLength: 1 - nullable: false - type: string - invocationType: - $ref: '#/components/schemas/FabricContractInvocationType' - methodName: - maxLength: 100 - minLength: 1 - nullable: false - type: string - params: - default: [] - items: - nullable: true - type: string - nullable: false - type: array - responseType: - $ref: '#/components/schemas/RunTransactionResponseType' - required: - - channelName - - contractName - - invocationType - - methodName - - params - - signerCertificate - - signerMspID - type: object - GetTransactionReceiptResponse: - example: - chainCodeVersion: chainCodeVersion - blockMetaData: - mspid: mspid - blockCreatorID: blockCreatorID - signature: signature - transactionCreator: - mspid: mspid - creatorID: creatorID - blockNumber: blockNumber - chainCodeName: chainCodeName - transactionEndorsement: - - mspid: mspid - signature: signature - endorserID: endorserID - - mspid: mspid - signature: signature - endorserID: endorserID - responseStatus: responseStatus - channelID: channelID - rwsetWriteData: rwsetWriteData - rwsetKey: rwsetKey - properties: - blockNumber: - type: string - channelID: - type: string - transactionCreator: - $ref: '#/components/schemas/TransactReceiptTransactionCreator' - transactionEndorsement: - items: - $ref: '#/components/schemas/TransactReceiptTransactionEndorsement' - type: array - blockMetaData: - $ref: '#/components/schemas/TransactReceiptBlockMetaData' - chainCodeName: - type: string - chainCodeVersion: - type: string - responseStatus: - type: string - rwsetKey: - type: string - rwsetWriteData: - type: string - type: object - DeploymentTargetOrganization: - example: - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - properties: - CORE_PEER_LOCALMSPID: - description: Mapped to environment variables of the Fabric CLI container. - example: Org1MSP - maxLength: 1024 - minLength: 1 - nullable: false - type: string - CORE_PEER_ADDRESS: - description: Mapped to environment variables of the Fabric CLI container. - example: peer0.org1.example.com:7051 - maxLength: 1024 - minLength: 1 - nullable: false - type: string - CORE_PEER_MSPCONFIGPATH: - description: Mapped to environment variables of the Fabric CLI container. - example: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - maxLength: 1024 - minLength: 1 - nullable: false - type: string - CORE_PEER_TLS_ROOTCERT_FILE: - description: Mapped to environment variables of the Fabric CLI container. - example: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - maxLength: 1024 - minLength: 1 - nullable: false - type: string - ORDERER_TLS_ROOTCERT_FILE: - description: Mapped to environment variables of the Fabric CLI container. - example: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - CORE_PEER_ADDRESS - - CORE_PEER_LOCALMSPID - - CORE_PEER_MSPCONFIGPATH - - CORE_PEER_TLS_ROOTCERT_FILE - - ORDERER_TLS_ROOTCERT_FILE - type: object - DeploymentTargetOrgFabric2x: - properties: - transient: - description: Transient map of arguments in JSON encoding - example: orderer.example.com:7050 - maxLength: 1073741824 - minLength: 1 - type: string - CORE_PEER_LOCALMSPID: - description: Mapped to environment variables of the Fabric CLI container. - example: Org1MSP - maxLength: 1024 - minLength: 1 - nullable: false - type: string - CORE_PEER_ADDRESS: - description: Mapped to environment variables of the Fabric CLI container. - example: peer0.org1.example.com:7051 - maxLength: 1024 - minLength: 1 - nullable: false - type: string - CORE_PEER_MSPCONFIGPATH: - description: Mapped to environment variables of the Fabric CLI container. - example: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - maxLength: 1024 - minLength: 1 - nullable: false - type: string - CORE_PEER_TLS_ROOTCERT_FILE: - description: Mapped to environment variables of the Fabric CLI container. - example: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - maxLength: 1024 - minLength: 1 - nullable: false - type: string - ORDERER_TLS_ROOTCERT_FILE: - description: Mapped to environment variables of the Fabric CLI container. - example: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - maxLength: 1024 - minLength: 1 - nullable: false - type: string - required: - - CORE_PEER_ADDRESS - - CORE_PEER_LOCALMSPID - - CORE_PEER_MSPCONFIGPATH - - CORE_PEER_TLS_ROOTCERT_FILE - - ORDERER_TLS_ROOTCERT_FILE - type: object - DeployContractGoSourceV1Request: - additionalProperties: false - example: - chainCodeVersion: 1.0.0 - pinnedDeps: - - github.com/hyperledger/fabric@v1.4.8 - - github.com/hyperledger/fabric@v1.4.8 - - github.com/hyperledger/fabric@v1.4.8 - - github.com/hyperledger/fabric@v1.4.8 - - github.com/hyperledger/fabric@v1.4.8 - goSource: - filename: my-cool-file-full-of-wonders-and-fun-stuff.go - filepath: ./my/sub-folder/structure/ - body: body - targetPeerAddresses: - - peer0.org1.example.com:7051 - goMod: - filename: my-cool-file-full-of-wonders-and-fun-stuff.go - filepath: ./my/sub-folder/structure/ - body: body - constructorArgs: "{} - An empty object literal can be sufficient if your contract\ - \ does not have parameters." - targetOrganizations: - - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - tlsRootCertFiles: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - moduleName: hello-world-contract - policyDslSource: "AND('Org1MSP.member','Org2MSP.member')" - channelId: mychannel - modTidyOnly: true - properties: - policyDslSource: - example: "AND('Org1MSP.member','Org2MSP.member')" - maxLength: 65535 - minLength: 1 - nullable: false - type: string - tlsRootCertFiles: - description: The TLS root cert files that will be passed to the chaincode - instantiation command. - example: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - maxLength: 65535 - minLength: 1 - nullable: false - type: string - channelId: - description: The name of the Fabric channel where the contract will get - instantiated. - example: mychannel - maxLength: 2048 - minLength: 1 - nullable: false - type: string - targetOrganizations: - items: - $ref: '#/components/schemas/DeploymentTargetOrganization' - maxItems: 1024 - minItems: 1 - nullable: false - type: array - targetPeerAddresses: - description: An array of peer addresses where the contract will be instantiated. - Note that at present only the first item from this array will be used - which is the behavior taken from the official Fabric samples repository - and therefore it is assumed to be correct usage. - example: - - peer0.org1.example.com:7051 - items: - maxLength: 4096 - minLength: 1 - type: string - maxItems: 2048 - minItems: 1 - type: array - constructorArgs: - $ref: '#/components/schemas/DeployContractGoSourceV1Request_constructorArgs' - chainCodeVersion: - example: 1.0.0 - maxLength: 128 - minLength: 1 - nullable: false - type: string - goSource: - $ref: '#/components/schemas/FileBase64' - goMod: - $ref: '#/components/schemas/FileBase64' - moduleName: - description: The go module name that will be used for the go compilation - process. - example: hello-world-contract - maxLength: 255 - minLength: 1 - nullable: false - type: string - pinnedDeps: - items: - example: github.com/hyperledger/fabric@v1.4.8 - nullable: false - type: string - maxItems: 1024 - minItems: 0 - type: array - modTidyOnly: - description: Indicates to the go chaincode compiler of Cactus if it should - do an actual go compilation with the contact source or if it should just - execute the go mod tidy command. - nullable: true - type: boolean - required: - - chainCodeVersion - - channelId - - goSource - - policyDslSource - - targetOrganizations - - targetPeerAddresses - - tlsRootCertFiles - type: object - DeployContractGoSourceV1Response: - example: - success: true - instantiationCommandResponse: - code: 0 - stdout: stdout - stderr: stderr - signal: signal - installationCommandResponses: - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - properties: - success: - type: boolean - installationCommandResponses: - items: - $ref: '#/components/schemas/SSHExecCommandResponse' - type: array - instantiationCommandResponse: - $ref: '#/components/schemas/SSHExecCommandResponse' - required: - - installationCommandResponses - - instantiationCommandResponse - - success - type: object - DeployContractV1Request: - additionalProperties: false - example: - ccVersion: 1.0.0 - ccLabel: hello-world-contract - constructorArgs: "{} - An empty object literal can be sufficient if your contract\ - \ does not have parameters." - ccLang: null - ccSequence: 1 - ccName: my-hello-world-contract - connTimeout: 0 - caFile: "${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" - signaturePolicy: "AND('Org1MSP.member','Org2MSP.member')" - sourceFiles: - - filename: my-cool-file-full-of-wonders-and-fun-stuff.go - filepath: ./my/sub-folder/structure/ - body: body - - filename: my-cool-file-full-of-wonders-and-fun-stuff.go - filepath: ./my/sub-folder/structure/ - body: body - - filename: my-cool-file-full-of-wonders-and-fun-stuff.go - filepath: ./my/sub-folder/structure/ - body: body - - filename: my-cool-file-full-of-wonders-and-fun-stuff.go - filepath: ./my/sub-folder/structure/ - body: body - - filename: my-cool-file-full-of-wonders-and-fun-stuff.go - filepath: ./my/sub-folder/structure/ - body: body - ordererTLSHostnameOverride: orderer.example.com:7050 - orderer: orderer.example.com:7050 - targetOrganizations: - - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - CORE_PEER_LOCALMSPID: Org1MSP - CORE_PEER_MSPCONFIGPATH: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - ORDERER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem - CORE_PEER_ADDRESS: peer0.org1.example.com:7051 - CORE_PEER_TLS_ROOTCERT_FILE: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - collectionsConfigFile: collectionsConfigFile - channelId: mychannel - properties: - ccLang: - $ref: '#/components/schemas/ChainCodeProgrammingLanguage' - caFile: - description: File-system path pointing at the CA file. - example: "${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" - maxLength: 4096 - minLength: 1 - type: string - orderer: - description: Ordering service endpoint specified as : - example: orderer.example.com:7050 - maxLength: 65535 - minLength: 1 - type: string - ordererTLSHostnameOverride: - description: The hostname override to use when validating the TLS connection - to the orderer - example: orderer.example.com:7050 - maxLength: 65535 - minLength: 1 - type: string - connTimeout: - description: Timeout for client to connect (default 3s) - nullable: false - type: integer - signaturePolicy: - description: "Passed in to the peer via the --signature-policy argument\ - \ on the command line. See also: https://hyperledger-fabric.readthedocs.io/en/release-2.2/endorsement-policies.html#setting-chaincode-level-endorsement-policies" - example: "AND('Org1MSP.member','Org2MSP.member')" - maxLength: 65535 - minLength: 1 - nullable: false - type: string - collectionsConfigFile: - description: Name of the collections config file as present in the sourceFiles - array of the request. - maxLength: 255 - minLength: 1 - nullable: false - type: string - channelId: - description: The name of the Fabric channel where the contract will get - instantiated. - example: mychannel - maxLength: 2048 - minLength: 1 - nullable: false - type: string - targetOrganizations: - items: - $ref: '#/components/schemas/DeploymentTargetOrganization' - maxItems: 1024 - minItems: 1 - nullable: false - type: array - constructorArgs: - $ref: '#/components/schemas/DeployContractGoSourceV1Request_constructorArgs' - ccSequence: - example: 1 - nullable: false - type: number - ccVersion: - example: 1.0.0 - maxLength: 128 - minLength: 1 - nullable: false - type: string - ccName: - example: my-hello-world-contract - maxLength: 128 - minLength: 1 - nullable: false - type: string - ccLabel: - description: Human readable label to uniquely identify the contract. Recommended - to include in this at least the contract name and the exact version in - order to make it easily distinguishable from other deployments of the - same contract. - example: hello-world-contract - maxLength: 255 - minLength: 1 - nullable: false - type: string - sourceFiles: - description: The your-smart-contract.go file where the functionality of - your contract is implemented. - items: - $ref: '#/components/schemas/FileBase64' - maxItems: 65535 - minItems: 1 - nullable: false - type: array - required: - - caFile - - ccLabel - - ccLang - - ccName - - ccSequence - - ccVersion - - channelId - - orderer - - ordererTLSHostnameOverride - - sourceFiles - - targetOrganizations - type: object - DeployContractV1Response: - example: - lifecycle: - init: - code: 0 - stdout: stdout - stderr: stderr - signal: signal - commit: - code: 0 - stdout: stdout - stderr: stderr - signal: signal - installList: - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - queryCommitted: - code: 0 - stdout: stdout - stderr: stderr - signal: signal - packaging: - code: 0 - stdout: stdout - stderr: stderr - signal: signal - approveForMyOrgList: - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - queryInstalledList: - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - - code: 0 - stdout: stdout - stderr: stderr - signal: signal - success: true - packageIds: - - f8c8e06bfc27771028c4bbc3564341887881e29b92a844c66c30bac0ff83966e - - f8c8e06bfc27771028c4bbc3564341887881e29b92a844c66c30bac0ff83966e - properties: - success: - type: boolean - packageIds: - items: - example: f8c8e06bfc27771028c4bbc3564341887881e29b92a844c66c30bac0ff83966e - maxLength: 4096 - minLength: 1 - nullable: false - type: string - type: array - lifecycle: - $ref: '#/components/schemas/ChainCodeLifeCycleCommandResponses' - required: - - lifecycle - - packageIds - - success - type: object - GetBlockRequestV1: - description: Request for GetBlock endpoint. - example: - gatewayOptions: - wallet: - keychain: - vaultTransitKey: - keyName: keyName - token: token - keychainId: keychainId - keychainRef: keychainRef - webSocketKey: - signature: signature - sessionId: sessionId - type: null - json: json - connectionProfile: - channels: - key: "" - certificateAuthorities: - key: "" - name: basic-network - organizations: - key: "" - peers: - key: "" - x-type: hlfv1 - description: The basic network - client: - organization: Org1 - orderers: - key: "" - version: "1.0" - discovery: - asLocalhost: true - enabled: true - identity: identity - eventHandlerOptions: - commitTimeout: 0.8008281904610115 - strategy: null - endorseTimeout: 6.027456183070403 - responseType: null - query: - blockHash: - buffer: buffer - encoding: encoding - blockNumber: blockNumber - transactionId: transactionId - channelName: channelName - connectionChannelName: connectionChannelName - properties: - channelName: - description: Fabric channel which we want to query. - maxLength: 100 - minLength: 1 - nullable: false - type: string - connectionChannelName: - description: "Fabric channel we want to connect to. If not provided, then\ - \ one from channelName parameter will be used" - maxLength: 100 - minLength: 1 - nullable: false - type: string - gatewayOptions: - $ref: '#/components/schemas/GatewayOptions' - query: - $ref: '#/components/schemas/GetBlockRequestV1_query' - responseType: - $ref: '#/components/schemas/GetBlockResponseTypeV1' - required: - - channelName - - gatewayOptions - - query - type: object - GetChainInfoRequestV1: - description: Request for GetChainInfo endpoint. - example: - gatewayOptions: - wallet: - keychain: - vaultTransitKey: - keyName: keyName - token: token - keychainId: keychainId - keychainRef: keychainRef - webSocketKey: - signature: signature - sessionId: sessionId - type: null - json: json - connectionProfile: - channels: - key: "" - certificateAuthorities: - key: "" - name: basic-network - organizations: - key: "" - peers: - key: "" - x-type: hlfv1 - description: The basic network - client: - organization: Org1 - orderers: - key: "" - version: "1.0" - discovery: - asLocalhost: true - enabled: true - identity: identity - eventHandlerOptions: - commitTimeout: 0.8008281904610115 - strategy: null - endorseTimeout: 6.027456183070403 - channelName: channelName - connectionChannelName: connectionChannelName - properties: - channelName: - description: Fabric channel which we want to query. - maxLength: 100 - minLength: 1 - nullable: false - type: string - connectionChannelName: - description: "Fabric channel we want to connect to. If not provided, then\ - \ one from channelName parameter will be used" - maxLength: 100 - minLength: 1 - nullable: false - type: string - gatewayOptions: - $ref: '#/components/schemas/GatewayOptions' - required: - - channelName - - gatewayOptions - type: object - FabricFullBlockDataV1: - description: Full hyperledger fabric block data. - GetBlockResponseDecodedV1: - description: When skipDecode is false (default) then decoded block object is - returned. - properties: - decodedBlock: - description: Full hyperledger fabric block data. - required: - - decodedBlock - type: object - GetBlockResponseEncodedV1: - description: When skipDecode is true then encoded block Buffer is returned. - properties: - encodedBlock: - type: string - required: - - encodedBlock - type: object - GetBlockResponseV1: - description: Response from GetBlock endpoint. - oneOf: - - $ref: '#/components/schemas/CactiBlockTransactionsResponseV1' - - $ref: '#/components/schemas/CactiBlockFullResponseV1' - - $ref: '#/components/schemas/GetBlockResponseDecodedV1' - - $ref: '#/components/schemas/GetBlockResponseEncodedV1' - GetChainInfoResponseV1: - description: Response from GetChainInfo endpoint. - example: - previousBlockHash: previousBlockHash - currentBlockHash: currentBlockHash - height: 0.8008281904610115 - properties: - height: - description: Current height of fabric ledger - nullable: false - type: number - currentBlockHash: - description: Current block hash of fabric ledger - nullable: false - type: string - previousBlockHash: - description: Previous block hash of fabric ledger - nullable: false - type: string - required: - - currentBlockHash - - height - - previousBlockHash - type: object - ErrorExceptionResponseV1: - properties: - message: - nullable: false - type: string - error: - nullable: false - type: string - required: - - error - - message - type: object - PrometheusExporterMetricsResponse: - nullable: false - type: string - WatchBlocksV1: - description: Websocket requests for monitoring new blocks. - enum: - - org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Subscribe - - org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.SubscribeDelegatedSign - - org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Next - - org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Unsubscribe - - org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Error - - org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Complete - type: string - x-enum-varnames: - - Subscribe - - SubscribeDelegatedSign - - Next - - Unsubscribe - - Error - - Complete - WatchBlocksListenerTypeV1: - description: "Response type from WatchBlocks. 'Cacti*' are custom views, others\ - \ correspond to fabric SDK call." - enum: - - filtered - - full - - private - - cacti:transactions - - cacti:full-block - type: string - x-enum-varnames: - - Filtered - - Full - - Private - - CactiTransactions - - CactiFullBlock - GetBlockResponseTypeV1: - default: full - description: Response type from GetBlock. - enum: - - full - - encoded - - cacti:transactions - - cacti:full-block - type: string - x-enum-varnames: - - Full - - Encoded - - CactiTransactions - - CactiFullBlock - WatchBlocksOptionsV1: - description: Options passed when subscribing to block monitoring. - properties: - channelName: - description: Hyperledger Fabric channel to connect to. - maxLength: 100 - minLength: 1 - nullable: false - type: string - gatewayOptions: - $ref: '#/components/schemas/GatewayOptions' - type: - $ref: '#/components/schemas/WatchBlocksListenerTypeV1' - startBlock: - description: From which block start monitoring. Defaults to latest. - maxLength: 100 - minLength: 1 - nullable: false - type: string - required: - - channelName - - gatewayOptions - - type - type: object - WatchBlocksDelegatedSignOptionsV1: - description: Options passed when subscribing to block monitoring with delegated - signing. - properties: - type: - $ref: '#/components/schemas/WatchBlocksListenerTypeV1' - startBlock: - description: From which block start monitoring. Defaults to latest. - maxLength: 100 - minLength: 1 - nullable: false - type: string - channelName: - maxLength: 100 - minLength: 1 - nullable: false - type: string - signerCertificate: - nullable: false - type: string - signerMspID: - nullable: false - type: string - uniqueTransactionData: - description: Can be used to uniquely identify and authorize signing request - nullable: false - required: - - channelName - - signerCertificate - - signerMspID - - type - type: object - CactiBlockTransactionEventV1: - description: Transaction summary from commited block. - properties: - chaincodeId: - description: ChainCode containing function that was executed. - nullable: false - type: string - transactionId: - description: Transaction identifier. - nullable: false - type: string - functionName: - description: Function name that was executed. - nullable: false - type: string - functionArgs: - description: List of function arguments. - items: - minLength: 0 - nullable: false - type: string - type: array - required: - - chaincodeId - - functionArgs - - functionName - - transactionId - type: object - CactiBlockTransactionsResponseV1: - description: Custom response containing block transactions summary. Compatible - with legacy fabric-socketio connector monitoring. - properties: - cactiTransactionsEvents: - description: List of transactions summary - items: - $ref: '#/components/schemas/CactiBlockTransactionEventV1' - type: array - required: - - cactiTransactionsEvents - type: object - CactiBlockFullResponseV1: - description: Custom response containing full block summary. - properties: - cactiFullEvents: - $ref: '#/components/schemas/CactiBlockFullEventV1' - required: - - cactiFullEvents - type: object - WatchBlocksFullResponseV1: - description: Response that corresponds to Fabric SDK 'full' EventType. - properties: - fullBlock: - description: Full commited block. - nullable: false - required: - - fullBlock - type: object - WatchBlocksFilteredResponseV1: - description: Response that corresponds to Fabric SDK 'filtered' EventType. - properties: - filteredBlock: - description: Filtered commited block. - nullable: false - required: - - filteredBlock - type: object - WatchBlocksPrivateResponseV1: - description: Response that corresponds to Fabric SDK 'private' EventType. - properties: - privateBlock: - description: Private commited block. - nullable: false - required: - - privateBlock - type: object - FabricX509CertificateV1: - description: Transaction endorser certificate object - properties: - issuer: - nullable: false - type: string - serialNumber: - nullable: false - type: string - subject: - nullable: false - type: string - subjectAltName: - nullable: false - type: string - validFrom: - nullable: false - type: string - validTo: - nullable: false - type: string - pem: - nullable: false - type: string - required: - - issuer - - pem - - serialNumber - - subject - - subjectAltName - - validFrom - - validTo - type: object - FabricCertificateIdentityV1: - description: Combination of certificate and it's MSP ID used to identify fabric - actors. - properties: - mspid: - nullable: false - type: string - cert: - $ref: '#/components/schemas/FabricX509CertificateV1' - required: - - cert - - mspid - type: object - FullBlockTransactionEndorsementV1: - description: Transaction endorsment object returned from fabric block. - properties: - signer: - $ref: '#/components/schemas/FabricCertificateIdentityV1' - signature: - nullable: false - type: string - required: - - signature - - signer - type: object - FullBlockTransactionActionV1: - description: Transaction action returned from fabric block. - properties: - functionName: - nullable: false - type: string - functionArgs: - items: - nullable: false - type: string - type: array - chaincodeId: - nullable: false - type: string - creator: - $ref: '#/components/schemas/FabricCertificateIdentityV1' - endorsements: - items: - $ref: '#/components/schemas/FullBlockTransactionEndorsementV1' - type: array - required: - - chaincodeId - - creator - - endorsements - - functionArgs - - functionName - type: object - FullBlockTransactionEventV1: - description: Transaction returned from fabric block. - properties: - hash: - nullable: false - type: string - channelId: - nullable: false - type: string - timestamp: - nullable: false - type: string - protocolVersion: - nullable: false - type: number - transactionType: - nullable: false - type: string - epoch: - nullable: false - type: number - actions: - items: - $ref: '#/components/schemas/FullBlockTransactionActionV1' - type: array - required: - - actions - - channelId - - epoch - - hash - - protocolVersion - - timestamp - - transactionType - type: object - CactiBlockFullEventV1: - description: Custom format full fabric block with transactions - properties: - blockNumber: - nullable: false - type: number - blockHash: - nullable: false - type: string - previousBlockHash: - nullable: false - type: string - transactionCount: - nullable: false - type: number - cactiTransactionsEvents: - items: - $ref: '#/components/schemas/FullBlockTransactionEventV1' - type: array - required: - - blockHash - - blockNumber - - cactiTransactionsEvents - - previousBlockHash - - transactionCount - type: object - WatchBlocksCactusErrorResponseV1: - description: Error response from WatchBlocks operation. - properties: - code: - description: Error code. - type: number - errorMessage: - description: Description of the error. - type: string - required: - - code - - errorMessage - type: object - WatchBlocksResponseV1: - description: Response block from WatchBlocks endpoint. Depends on 'type' passed - in subscription options. - oneOf: - - $ref: '#/components/schemas/CactiBlockTransactionsResponseV1' - - $ref: '#/components/schemas/CactiBlockFullResponseV1' - - $ref: '#/components/schemas/WatchBlocksFullResponseV1' - - $ref: '#/components/schemas/WatchBlocksFilteredResponseV1' - - $ref: '#/components/schemas/WatchBlocksPrivateResponseV1' - - $ref: '#/components/schemas/WatchBlocksCactusErrorResponseV1' - deployContractGoSourceV1_501_response: - properties: - message: - maxLength: 2048 - minLength: 1 - nullable: false - type: string - type: object - ConnectionProfile_client: - example: - organization: Org1 - properties: - organization: - example: Org1 - type: string - type: object - GatewayOptions_wallet: - example: - keychain: - vaultTransitKey: - keyName: keyName - token: token - keychainId: keychainId - keychainRef: keychainRef - webSocketKey: - signature: signature - sessionId: sessionId - type: null - json: json - maxProperties: 1 - minProperties: 1 - properties: - keychain: - $ref: '#/components/schemas/FabricSigningCredential' - json: - maxLength: 65535 - minLength: 1 - nullable: false - type: string - type: object - DeployContractGoSourceV1Request_constructorArgs: - example: "{} - An empty object literal can be sufficient if your contract does\ - \ not have parameters." - nullable: false - properties: - Args: - items: {} - maxLength: 2048 - minLength: 0 - type: array - type: object - GetBlockRequestV1_query_blockHash: - description: Select block by it's hash. - example: - buffer: buffer - encoding: encoding - nullable: false - properties: - encoding: - description: "NodeJS Buffer encoding (utf-8, hex, binary, base64, etc...).\ - \ Passed directly to `Buffer.from()` call on hashBuffer. If not provided\ - \ then JSON buffer format is assumed." - nullable: false - type: string - buffer: - description: Buffer of blockHash. It's encoding should be described in `encoding` - parameter. - nullable: false - type: string - required: - - buffer - type: object - GetBlockRequestV1_query: - description: "Query selector, caller must provide at least one of them. First\ - \ found will be used, rest will be ignored, so it's recommended to pass single\ - \ selector." - example: - blockHash: - buffer: buffer - encoding: encoding - blockNumber: blockNumber - transactionId: transactionId - properties: - blockNumber: - description: Select block by it's number. - nullable: false - type: string - blockHash: - $ref: '#/components/schemas/GetBlockRequestV1_query_blockHash' - transactionId: - description: Select block by id of transaction that it contains. - nullable: false - type: string - type: object diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 2b8bdb2e4b..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,930 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeployContractGoSourceV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deployContractGoSourceV1Request *DeployContractGoSourceV1Request -} - -func (r ApiDeployContractGoSourceV1Request) DeployContractGoSourceV1Request(deployContractGoSourceV1Request DeployContractGoSourceV1Request) ApiDeployContractGoSourceV1Request { - r.deployContractGoSourceV1Request = &deployContractGoSourceV1Request - return r -} - -func (r ApiDeployContractGoSourceV1Request) Execute() (*DeployContractGoSourceV1Response, *http.Response, error) { - return r.ApiService.DeployContractGoSourceV1Execute(r) -} - -/* -DeployContractGoSourceV1 Deploys a chaincode contract in the form of a go sources. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeployContractGoSourceV1Request -*/ -func (a *DefaultApiService) DeployContractGoSourceV1(ctx context.Context) ApiDeployContractGoSourceV1Request { - return ApiDeployContractGoSourceV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeployContractGoSourceV1Response -func (a *DefaultApiService) DeployContractGoSourceV1Execute(r ApiDeployContractGoSourceV1Request) (*DeployContractGoSourceV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeployContractGoSourceV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeployContractGoSourceV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deployContractGoSourceV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 501 { - var v DeployContractGoSourceV1501Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeployContractV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deployContractV1Request *DeployContractV1Request -} - -func (r ApiDeployContractV1Request) DeployContractV1Request(deployContractV1Request DeployContractV1Request) ApiDeployContractV1Request { - r.deployContractV1Request = &deployContractV1Request - return r -} - -func (r ApiDeployContractV1Request) Execute() (*DeployContractV1Response, *http.Response, error) { - return r.ApiService.DeployContractV1Execute(r) -} - -/* -DeployContractV1 Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The 'v1' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeployContractV1Request -*/ -func (a *DefaultApiService) DeployContractV1(ctx context.Context) ApiDeployContractV1Request { - return ApiDeployContractV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeployContractV1Response -func (a *DefaultApiService) DeployContractV1Execute(r ApiDeployContractV1Request) (*DeployContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeployContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeployContractV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deployContractV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 501 { - var v DeployContractGoSourceV1501Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetBlockV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getBlockRequestV1 *GetBlockRequestV1 -} - -func (r ApiGetBlockV1Request) GetBlockRequestV1(getBlockRequestV1 GetBlockRequestV1) ApiGetBlockV1Request { - r.getBlockRequestV1 = &getBlockRequestV1 - return r -} - -func (r ApiGetBlockV1Request) Execute() (*GetBlockResponseV1, *http.Response, error) { - return r.ApiService.GetBlockV1Execute(r) -} - -/* -GetBlockV1 Get block from the channel using one of selectors from the input. Works only on Fabric 2.x. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetBlockV1Request -*/ -func (a *DefaultApiService) GetBlockV1(ctx context.Context) ApiGetBlockV1Request { - return ApiGetBlockV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetBlockResponseV1 -func (a *DefaultApiService) GetBlockV1Execute(r ApiGetBlockV1Request) (*GetBlockResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetBlockResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetBlockV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getBlockRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetChainInfoV1Request struct { - ctx context.Context - ApiService *DefaultApiService - getChainInfoRequestV1 *GetChainInfoRequestV1 -} - -func (r ApiGetChainInfoV1Request) GetChainInfoRequestV1(getChainInfoRequestV1 GetChainInfoRequestV1) ApiGetChainInfoV1Request { - r.getChainInfoRequestV1 = &getChainInfoRequestV1 - return r -} - -func (r ApiGetChainInfoV1Request) Execute() (*GetChainInfoResponseV1, *http.Response, error) { - return r.ApiService.GetChainInfoV1Execute(r) -} - -/* -GetChainInfoV1 Get fabric ledger chain info. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetChainInfoV1Request -*/ -func (a *DefaultApiService) GetChainInfoV1(ctx context.Context) ApiGetChainInfoV1Request { - return ApiGetChainInfoV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetChainInfoResponseV1 -func (a *DefaultApiService) GetChainInfoV1Execute(r ApiGetChainInfoV1Request) (*GetChainInfoResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetChainInfoResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetChainInfoV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getChainInfoRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsV1Execute(r) -} - -/* -GetPrometheusMetricsV1 Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsV1Request -*/ -func (a *DefaultApiService) GetPrometheusMetricsV1(ctx context.Context) ApiGetPrometheusMetricsV1Request { - return ApiGetPrometheusMetricsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsV1Execute(r ApiGetPrometheusMetricsV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetricsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetTransactionReceiptByTxIDV1Request struct { - ctx context.Context - ApiService *DefaultApiService - runTransactionRequest *RunTransactionRequest -} - -func (r ApiGetTransactionReceiptByTxIDV1Request) RunTransactionRequest(runTransactionRequest RunTransactionRequest) ApiGetTransactionReceiptByTxIDV1Request { - r.runTransactionRequest = &runTransactionRequest - return r -} - -func (r ApiGetTransactionReceiptByTxIDV1Request) Execute() (*GetTransactionReceiptResponse, *http.Response, error) { - return r.ApiService.GetTransactionReceiptByTxIDV1Execute(r) -} - -/* -GetTransactionReceiptByTxIDV1 get a transaction receipt by tx id on a Fabric ledger. - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetTransactionReceiptByTxIDV1Request -*/ -func (a *DefaultApiService) GetTransactionReceiptByTxIDV1(ctx context.Context) ApiGetTransactionReceiptByTxIDV1Request { - return ApiGetTransactionReceiptByTxIDV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetTransactionReceiptResponse -func (a *DefaultApiService) GetTransactionReceiptByTxIDV1Execute(r ApiGetTransactionReceiptByTxIDV1Request) (*GetTransactionReceiptResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetTransactionReceiptResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetTransactionReceiptByTxIDV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.runTransactionRequest == nil { - return localVarReturnValue, nil, reportError("runTransactionRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.runTransactionRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRunDelegatedSignTransactionV1Request struct { - ctx context.Context - ApiService *DefaultApiService - runDelegatedSignTransactionRequest *RunDelegatedSignTransactionRequest -} - -func (r ApiRunDelegatedSignTransactionV1Request) RunDelegatedSignTransactionRequest(runDelegatedSignTransactionRequest RunDelegatedSignTransactionRequest) ApiRunDelegatedSignTransactionV1Request { - r.runDelegatedSignTransactionRequest = &runDelegatedSignTransactionRequest - return r -} - -func (r ApiRunDelegatedSignTransactionV1Request) Execute() (*RunTransactionResponse, *http.Response, error) { - return r.ApiService.RunDelegatedSignTransactionV1Execute(r) -} - -/* -RunDelegatedSignTransactionV1 Runs a transaction on a Fabric ledger using user-provided signing callback. - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRunDelegatedSignTransactionV1Request -*/ -func (a *DefaultApiService) RunDelegatedSignTransactionV1(ctx context.Context) ApiRunDelegatedSignTransactionV1Request { - return ApiRunDelegatedSignTransactionV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RunTransactionResponse -func (a *DefaultApiService) RunDelegatedSignTransactionV1Execute(r ApiRunDelegatedSignTransactionV1Request) (*RunTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RunDelegatedSignTransactionV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.runDelegatedSignTransactionRequest == nil { - return localVarReturnValue, nil, reportError("runDelegatedSignTransactionRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.runDelegatedSignTransactionRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRunTransactionV1Request struct { - ctx context.Context - ApiService *DefaultApiService - runTransactionRequest *RunTransactionRequest -} - -func (r ApiRunTransactionV1Request) RunTransactionRequest(runTransactionRequest RunTransactionRequest) ApiRunTransactionV1Request { - r.runTransactionRequest = &runTransactionRequest - return r -} - -func (r ApiRunTransactionV1Request) Execute() (*RunTransactionResponse, *http.Response, error) { - return r.ApiService.RunTransactionV1Execute(r) -} - -/* -RunTransactionV1 Runs a transaction on a Fabric ledger. - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRunTransactionV1Request -*/ -func (a *DefaultApiService) RunTransactionV1(ctx context.Context) ApiRunTransactionV1Request { - return ApiRunTransactionV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RunTransactionResponse -func (a *DefaultApiService) RunTransactionV1Execute(r ApiRunTransactionV1Request) (*RunTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RunTransactionV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.runTransactionRequest == nil { - return localVarReturnValue, nil, reportError("runTransactionRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.runTransactionRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index ad595f5be7..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Connector Fabric API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 77272bb122..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 825dd71595..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_full_event_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_full_event_v1.go deleted file mode 100644 index 27bb5e699b..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_full_event_v1.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the CactiBlockFullEventV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CactiBlockFullEventV1{} - -// CactiBlockFullEventV1 Custom format full fabric block with transactions -type CactiBlockFullEventV1 struct { - BlockNumber float32 `json:"blockNumber"` - BlockHash string `json:"blockHash"` - PreviousBlockHash string `json:"previousBlockHash"` - TransactionCount float32 `json:"transactionCount"` - CactiTransactionsEvents []FullBlockTransactionEventV1 `json:"cactiTransactionsEvents"` -} - -// NewCactiBlockFullEventV1 instantiates a new CactiBlockFullEventV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCactiBlockFullEventV1(blockNumber float32, blockHash string, previousBlockHash string, transactionCount float32, cactiTransactionsEvents []FullBlockTransactionEventV1) *CactiBlockFullEventV1 { - this := CactiBlockFullEventV1{} - this.BlockNumber = blockNumber - this.BlockHash = blockHash - this.PreviousBlockHash = previousBlockHash - this.TransactionCount = transactionCount - this.CactiTransactionsEvents = cactiTransactionsEvents - return &this -} - -// NewCactiBlockFullEventV1WithDefaults instantiates a new CactiBlockFullEventV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCactiBlockFullEventV1WithDefaults() *CactiBlockFullEventV1 { - this := CactiBlockFullEventV1{} - return &this -} - -// GetBlockNumber returns the BlockNumber field value -func (o *CactiBlockFullEventV1) GetBlockNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value -// and a boolean to check if the value has been set. -func (o *CactiBlockFullEventV1) GetBlockNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.BlockNumber, true -} - -// SetBlockNumber sets field value -func (o *CactiBlockFullEventV1) SetBlockNumber(v float32) { - o.BlockNumber = v -} - -// GetBlockHash returns the BlockHash field value -func (o *CactiBlockFullEventV1) GetBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value -// and a boolean to check if the value has been set. -func (o *CactiBlockFullEventV1) GetBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockHash, true -} - -// SetBlockHash sets field value -func (o *CactiBlockFullEventV1) SetBlockHash(v string) { - o.BlockHash = v -} - -// GetPreviousBlockHash returns the PreviousBlockHash field value -func (o *CactiBlockFullEventV1) GetPreviousBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.PreviousBlockHash -} - -// GetPreviousBlockHashOk returns a tuple with the PreviousBlockHash field value -// and a boolean to check if the value has been set. -func (o *CactiBlockFullEventV1) GetPreviousBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PreviousBlockHash, true -} - -// SetPreviousBlockHash sets field value -func (o *CactiBlockFullEventV1) SetPreviousBlockHash(v string) { - o.PreviousBlockHash = v -} - -// GetTransactionCount returns the TransactionCount field value -func (o *CactiBlockFullEventV1) GetTransactionCount() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.TransactionCount -} - -// GetTransactionCountOk returns a tuple with the TransactionCount field value -// and a boolean to check if the value has been set. -func (o *CactiBlockFullEventV1) GetTransactionCountOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.TransactionCount, true -} - -// SetTransactionCount sets field value -func (o *CactiBlockFullEventV1) SetTransactionCount(v float32) { - o.TransactionCount = v -} - -// GetCactiTransactionsEvents returns the CactiTransactionsEvents field value -func (o *CactiBlockFullEventV1) GetCactiTransactionsEvents() []FullBlockTransactionEventV1 { - if o == nil { - var ret []FullBlockTransactionEventV1 - return ret - } - - return o.CactiTransactionsEvents -} - -// GetCactiTransactionsEventsOk returns a tuple with the CactiTransactionsEvents field value -// and a boolean to check if the value has been set. -func (o *CactiBlockFullEventV1) GetCactiTransactionsEventsOk() ([]FullBlockTransactionEventV1, bool) { - if o == nil { - return nil, false - } - return o.CactiTransactionsEvents, true -} - -// SetCactiTransactionsEvents sets field value -func (o *CactiBlockFullEventV1) SetCactiTransactionsEvents(v []FullBlockTransactionEventV1) { - o.CactiTransactionsEvents = v -} - -func (o CactiBlockFullEventV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CactiBlockFullEventV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["blockNumber"] = o.BlockNumber - toSerialize["blockHash"] = o.BlockHash - toSerialize["previousBlockHash"] = o.PreviousBlockHash - toSerialize["transactionCount"] = o.TransactionCount - toSerialize["cactiTransactionsEvents"] = o.CactiTransactionsEvents - return toSerialize, nil -} - -type NullableCactiBlockFullEventV1 struct { - value *CactiBlockFullEventV1 - isSet bool -} - -func (v NullableCactiBlockFullEventV1) Get() *CactiBlockFullEventV1 { - return v.value -} - -func (v *NullableCactiBlockFullEventV1) Set(val *CactiBlockFullEventV1) { - v.value = val - v.isSet = true -} - -func (v NullableCactiBlockFullEventV1) IsSet() bool { - return v.isSet -} - -func (v *NullableCactiBlockFullEventV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCactiBlockFullEventV1(val *CactiBlockFullEventV1) *NullableCactiBlockFullEventV1 { - return &NullableCactiBlockFullEventV1{value: val, isSet: true} -} - -func (v NullableCactiBlockFullEventV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCactiBlockFullEventV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_full_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_full_response_v1.go deleted file mode 100644 index aed93ffd47..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_full_response_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the CactiBlockFullResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CactiBlockFullResponseV1{} - -// CactiBlockFullResponseV1 Custom response containing full block summary. -type CactiBlockFullResponseV1 struct { - CactiFullEvents CactiBlockFullEventV1 `json:"cactiFullEvents"` -} - -// NewCactiBlockFullResponseV1 instantiates a new CactiBlockFullResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCactiBlockFullResponseV1(cactiFullEvents CactiBlockFullEventV1) *CactiBlockFullResponseV1 { - this := CactiBlockFullResponseV1{} - this.CactiFullEvents = cactiFullEvents - return &this -} - -// NewCactiBlockFullResponseV1WithDefaults instantiates a new CactiBlockFullResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCactiBlockFullResponseV1WithDefaults() *CactiBlockFullResponseV1 { - this := CactiBlockFullResponseV1{} - return &this -} - -// GetCactiFullEvents returns the CactiFullEvents field value -func (o *CactiBlockFullResponseV1) GetCactiFullEvents() CactiBlockFullEventV1 { - if o == nil { - var ret CactiBlockFullEventV1 - return ret - } - - return o.CactiFullEvents -} - -// GetCactiFullEventsOk returns a tuple with the CactiFullEvents field value -// and a boolean to check if the value has been set. -func (o *CactiBlockFullResponseV1) GetCactiFullEventsOk() (*CactiBlockFullEventV1, bool) { - if o == nil { - return nil, false - } - return &o.CactiFullEvents, true -} - -// SetCactiFullEvents sets field value -func (o *CactiBlockFullResponseV1) SetCactiFullEvents(v CactiBlockFullEventV1) { - o.CactiFullEvents = v -} - -func (o CactiBlockFullResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CactiBlockFullResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cactiFullEvents"] = o.CactiFullEvents - return toSerialize, nil -} - -type NullableCactiBlockFullResponseV1 struct { - value *CactiBlockFullResponseV1 - isSet bool -} - -func (v NullableCactiBlockFullResponseV1) Get() *CactiBlockFullResponseV1 { - return v.value -} - -func (v *NullableCactiBlockFullResponseV1) Set(val *CactiBlockFullResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableCactiBlockFullResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableCactiBlockFullResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCactiBlockFullResponseV1(val *CactiBlockFullResponseV1) *NullableCactiBlockFullResponseV1 { - return &NullableCactiBlockFullResponseV1{value: val, isSet: true} -} - -func (v NullableCactiBlockFullResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCactiBlockFullResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_transaction_event_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_transaction_event_v1.go deleted file mode 100644 index 940233337e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_transaction_event_v1.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the CactiBlockTransactionEventV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CactiBlockTransactionEventV1{} - -// CactiBlockTransactionEventV1 Transaction summary from commited block. -type CactiBlockTransactionEventV1 struct { - // ChainCode containing function that was executed. - ChaincodeId string `json:"chaincodeId"` - // Transaction identifier. - TransactionId string `json:"transactionId"` - // Function name that was executed. - FunctionName string `json:"functionName"` - // List of function arguments. - FunctionArgs []string `json:"functionArgs"` -} - -// NewCactiBlockTransactionEventV1 instantiates a new CactiBlockTransactionEventV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCactiBlockTransactionEventV1(chaincodeId string, transactionId string, functionName string, functionArgs []string) *CactiBlockTransactionEventV1 { - this := CactiBlockTransactionEventV1{} - this.ChaincodeId = chaincodeId - this.TransactionId = transactionId - this.FunctionName = functionName - this.FunctionArgs = functionArgs - return &this -} - -// NewCactiBlockTransactionEventV1WithDefaults instantiates a new CactiBlockTransactionEventV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCactiBlockTransactionEventV1WithDefaults() *CactiBlockTransactionEventV1 { - this := CactiBlockTransactionEventV1{} - return &this -} - -// GetChaincodeId returns the ChaincodeId field value -func (o *CactiBlockTransactionEventV1) GetChaincodeId() string { - if o == nil { - var ret string - return ret - } - - return o.ChaincodeId -} - -// GetChaincodeIdOk returns a tuple with the ChaincodeId field value -// and a boolean to check if the value has been set. -func (o *CactiBlockTransactionEventV1) GetChaincodeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChaincodeId, true -} - -// SetChaincodeId sets field value -func (o *CactiBlockTransactionEventV1) SetChaincodeId(v string) { - o.ChaincodeId = v -} - -// GetTransactionId returns the TransactionId field value -func (o *CactiBlockTransactionEventV1) GetTransactionId() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionId -} - -// GetTransactionIdOk returns a tuple with the TransactionId field value -// and a boolean to check if the value has been set. -func (o *CactiBlockTransactionEventV1) GetTransactionIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionId, true -} - -// SetTransactionId sets field value -func (o *CactiBlockTransactionEventV1) SetTransactionId(v string) { - o.TransactionId = v -} - -// GetFunctionName returns the FunctionName field value -func (o *CactiBlockTransactionEventV1) GetFunctionName() string { - if o == nil { - var ret string - return ret - } - - return o.FunctionName -} - -// GetFunctionNameOk returns a tuple with the FunctionName field value -// and a boolean to check if the value has been set. -func (o *CactiBlockTransactionEventV1) GetFunctionNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FunctionName, true -} - -// SetFunctionName sets field value -func (o *CactiBlockTransactionEventV1) SetFunctionName(v string) { - o.FunctionName = v -} - -// GetFunctionArgs returns the FunctionArgs field value -func (o *CactiBlockTransactionEventV1) GetFunctionArgs() []string { - if o == nil { - var ret []string - return ret - } - - return o.FunctionArgs -} - -// GetFunctionArgsOk returns a tuple with the FunctionArgs field value -// and a boolean to check if the value has been set. -func (o *CactiBlockTransactionEventV1) GetFunctionArgsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.FunctionArgs, true -} - -// SetFunctionArgs sets field value -func (o *CactiBlockTransactionEventV1) SetFunctionArgs(v []string) { - o.FunctionArgs = v -} - -func (o CactiBlockTransactionEventV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CactiBlockTransactionEventV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["chaincodeId"] = o.ChaincodeId - toSerialize["transactionId"] = o.TransactionId - toSerialize["functionName"] = o.FunctionName - toSerialize["functionArgs"] = o.FunctionArgs - return toSerialize, nil -} - -type NullableCactiBlockTransactionEventV1 struct { - value *CactiBlockTransactionEventV1 - isSet bool -} - -func (v NullableCactiBlockTransactionEventV1) Get() *CactiBlockTransactionEventV1 { - return v.value -} - -func (v *NullableCactiBlockTransactionEventV1) Set(val *CactiBlockTransactionEventV1) { - v.value = val - v.isSet = true -} - -func (v NullableCactiBlockTransactionEventV1) IsSet() bool { - return v.isSet -} - -func (v *NullableCactiBlockTransactionEventV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCactiBlockTransactionEventV1(val *CactiBlockTransactionEventV1) *NullableCactiBlockTransactionEventV1 { - return &NullableCactiBlockTransactionEventV1{value: val, isSet: true} -} - -func (v NullableCactiBlockTransactionEventV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCactiBlockTransactionEventV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_transactions_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_transactions_response_v1.go deleted file mode 100644 index 731b6ede57..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_cacti_block_transactions_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the CactiBlockTransactionsResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CactiBlockTransactionsResponseV1{} - -// CactiBlockTransactionsResponseV1 Custom response containing block transactions summary. Compatible with legacy fabric-socketio connector monitoring. -type CactiBlockTransactionsResponseV1 struct { - // List of transactions summary - CactiTransactionsEvents []CactiBlockTransactionEventV1 `json:"cactiTransactionsEvents"` -} - -// NewCactiBlockTransactionsResponseV1 instantiates a new CactiBlockTransactionsResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCactiBlockTransactionsResponseV1(cactiTransactionsEvents []CactiBlockTransactionEventV1) *CactiBlockTransactionsResponseV1 { - this := CactiBlockTransactionsResponseV1{} - this.CactiTransactionsEvents = cactiTransactionsEvents - return &this -} - -// NewCactiBlockTransactionsResponseV1WithDefaults instantiates a new CactiBlockTransactionsResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCactiBlockTransactionsResponseV1WithDefaults() *CactiBlockTransactionsResponseV1 { - this := CactiBlockTransactionsResponseV1{} - return &this -} - -// GetCactiTransactionsEvents returns the CactiTransactionsEvents field value -func (o *CactiBlockTransactionsResponseV1) GetCactiTransactionsEvents() []CactiBlockTransactionEventV1 { - if o == nil { - var ret []CactiBlockTransactionEventV1 - return ret - } - - return o.CactiTransactionsEvents -} - -// GetCactiTransactionsEventsOk returns a tuple with the CactiTransactionsEvents field value -// and a boolean to check if the value has been set. -func (o *CactiBlockTransactionsResponseV1) GetCactiTransactionsEventsOk() ([]CactiBlockTransactionEventV1, bool) { - if o == nil { - return nil, false - } - return o.CactiTransactionsEvents, true -} - -// SetCactiTransactionsEvents sets field value -func (o *CactiBlockTransactionsResponseV1) SetCactiTransactionsEvents(v []CactiBlockTransactionEventV1) { - o.CactiTransactionsEvents = v -} - -func (o CactiBlockTransactionsResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CactiBlockTransactionsResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cactiTransactionsEvents"] = o.CactiTransactionsEvents - return toSerialize, nil -} - -type NullableCactiBlockTransactionsResponseV1 struct { - value *CactiBlockTransactionsResponseV1 - isSet bool -} - -func (v NullableCactiBlockTransactionsResponseV1) Get() *CactiBlockTransactionsResponseV1 { - return v.value -} - -func (v *NullableCactiBlockTransactionsResponseV1) Set(val *CactiBlockTransactionsResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableCactiBlockTransactionsResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableCactiBlockTransactionsResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCactiBlockTransactionsResponseV1(val *CactiBlockTransactionsResponseV1) *NullableCactiBlockTransactionsResponseV1 { - return &NullableCactiBlockTransactionsResponseV1{value: val, isSet: true} -} - -func (v NullableCactiBlockTransactionsResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCactiBlockTransactionsResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_chain_code_language_runtime.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_chain_code_language_runtime.go deleted file mode 100644 index a690306442..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_chain_code_language_runtime.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// ChainCodeLanguageRuntime Enumerates the supported programming language runtimes of Hyperledger Fabric -type ChainCodeLanguageRuntime string - -// List of ChainCodeLanguageRuntime -const ( - GOLANG ChainCodeLanguageRuntime = "golang" - NODE ChainCodeLanguageRuntime = "node" - JAVA ChainCodeLanguageRuntime = "java" -) - -// All allowed values of ChainCodeLanguageRuntime enum -var AllowedChainCodeLanguageRuntimeEnumValues = []ChainCodeLanguageRuntime{ - "golang", - "node", - "java", -} - -func (v *ChainCodeLanguageRuntime) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := ChainCodeLanguageRuntime(value) - for _, existing := range AllowedChainCodeLanguageRuntimeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid ChainCodeLanguageRuntime", value) -} - -// NewChainCodeLanguageRuntimeFromValue returns a pointer to a valid ChainCodeLanguageRuntime -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewChainCodeLanguageRuntimeFromValue(v string) (*ChainCodeLanguageRuntime, error) { - ev := ChainCodeLanguageRuntime(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ChainCodeLanguageRuntime: valid values are %v", v, AllowedChainCodeLanguageRuntimeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v ChainCodeLanguageRuntime) IsValid() bool { - for _, existing := range AllowedChainCodeLanguageRuntimeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to ChainCodeLanguageRuntime value -func (v ChainCodeLanguageRuntime) Ptr() *ChainCodeLanguageRuntime { - return &v -} - -type NullableChainCodeLanguageRuntime struct { - value *ChainCodeLanguageRuntime - isSet bool -} - -func (v NullableChainCodeLanguageRuntime) Get() *ChainCodeLanguageRuntime { - return v.value -} - -func (v *NullableChainCodeLanguageRuntime) Set(val *ChainCodeLanguageRuntime) { - v.value = val - v.isSet = true -} - -func (v NullableChainCodeLanguageRuntime) IsSet() bool { - return v.isSet -} - -func (v *NullableChainCodeLanguageRuntime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableChainCodeLanguageRuntime(val *ChainCodeLanguageRuntime) *NullableChainCodeLanguageRuntime { - return &NullableChainCodeLanguageRuntime{value: val, isSet: true} -} - -func (v NullableChainCodeLanguageRuntime) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableChainCodeLanguageRuntime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_chain_code_life_cycle_command_responses.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_chain_code_life_cycle_command_responses.go deleted file mode 100644 index eee183d77c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_chain_code_life_cycle_command_responses.go +++ /dev/null @@ -1,315 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the ChainCodeLifeCycleCommandResponses type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ChainCodeLifeCycleCommandResponses{} - -// ChainCodeLifeCycleCommandResponses struct for ChainCodeLifeCycleCommandResponses -type ChainCodeLifeCycleCommandResponses struct { - Packaging *SSHExecCommandResponse `json:"packaging,omitempty"` - InstallList []SSHExecCommandResponse `json:"installList"` - QueryInstalledList []SSHExecCommandResponse `json:"queryInstalledList"` - ApproveForMyOrgList []SSHExecCommandResponse `json:"approveForMyOrgList"` - Commit *SSHExecCommandResponse `json:"commit,omitempty"` - QueryCommitted *SSHExecCommandResponse `json:"queryCommitted,omitempty"` - Init *SSHExecCommandResponse `json:"init,omitempty"` -} - -// NewChainCodeLifeCycleCommandResponses instantiates a new ChainCodeLifeCycleCommandResponses object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewChainCodeLifeCycleCommandResponses(installList []SSHExecCommandResponse, queryInstalledList []SSHExecCommandResponse, approveForMyOrgList []SSHExecCommandResponse) *ChainCodeLifeCycleCommandResponses { - this := ChainCodeLifeCycleCommandResponses{} - this.InstallList = installList - this.QueryInstalledList = queryInstalledList - this.ApproveForMyOrgList = approveForMyOrgList - return &this -} - -// NewChainCodeLifeCycleCommandResponsesWithDefaults instantiates a new ChainCodeLifeCycleCommandResponses object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewChainCodeLifeCycleCommandResponsesWithDefaults() *ChainCodeLifeCycleCommandResponses { - this := ChainCodeLifeCycleCommandResponses{} - return &this -} - -// GetPackaging returns the Packaging field value if set, zero value otherwise. -func (o *ChainCodeLifeCycleCommandResponses) GetPackaging() SSHExecCommandResponse { - if o == nil || IsNil(o.Packaging) { - var ret SSHExecCommandResponse - return ret - } - return *o.Packaging -} - -// GetPackagingOk returns a tuple with the Packaging field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChainCodeLifeCycleCommandResponses) GetPackagingOk() (*SSHExecCommandResponse, bool) { - if o == nil || IsNil(o.Packaging) { - return nil, false - } - return o.Packaging, true -} - -// HasPackaging returns a boolean if a field has been set. -func (o *ChainCodeLifeCycleCommandResponses) HasPackaging() bool { - if o != nil && !IsNil(o.Packaging) { - return true - } - - return false -} - -// SetPackaging gets a reference to the given SSHExecCommandResponse and assigns it to the Packaging field. -func (o *ChainCodeLifeCycleCommandResponses) SetPackaging(v SSHExecCommandResponse) { - o.Packaging = &v -} - -// GetInstallList returns the InstallList field value -func (o *ChainCodeLifeCycleCommandResponses) GetInstallList() []SSHExecCommandResponse { - if o == nil { - var ret []SSHExecCommandResponse - return ret - } - - return o.InstallList -} - -// GetInstallListOk returns a tuple with the InstallList field value -// and a boolean to check if the value has been set. -func (o *ChainCodeLifeCycleCommandResponses) GetInstallListOk() ([]SSHExecCommandResponse, bool) { - if o == nil { - return nil, false - } - return o.InstallList, true -} - -// SetInstallList sets field value -func (o *ChainCodeLifeCycleCommandResponses) SetInstallList(v []SSHExecCommandResponse) { - o.InstallList = v -} - -// GetQueryInstalledList returns the QueryInstalledList field value -func (o *ChainCodeLifeCycleCommandResponses) GetQueryInstalledList() []SSHExecCommandResponse { - if o == nil { - var ret []SSHExecCommandResponse - return ret - } - - return o.QueryInstalledList -} - -// GetQueryInstalledListOk returns a tuple with the QueryInstalledList field value -// and a boolean to check if the value has been set. -func (o *ChainCodeLifeCycleCommandResponses) GetQueryInstalledListOk() ([]SSHExecCommandResponse, bool) { - if o == nil { - return nil, false - } - return o.QueryInstalledList, true -} - -// SetQueryInstalledList sets field value -func (o *ChainCodeLifeCycleCommandResponses) SetQueryInstalledList(v []SSHExecCommandResponse) { - o.QueryInstalledList = v -} - -// GetApproveForMyOrgList returns the ApproveForMyOrgList field value -func (o *ChainCodeLifeCycleCommandResponses) GetApproveForMyOrgList() []SSHExecCommandResponse { - if o == nil { - var ret []SSHExecCommandResponse - return ret - } - - return o.ApproveForMyOrgList -} - -// GetApproveForMyOrgListOk returns a tuple with the ApproveForMyOrgList field value -// and a boolean to check if the value has been set. -func (o *ChainCodeLifeCycleCommandResponses) GetApproveForMyOrgListOk() ([]SSHExecCommandResponse, bool) { - if o == nil { - return nil, false - } - return o.ApproveForMyOrgList, true -} - -// SetApproveForMyOrgList sets field value -func (o *ChainCodeLifeCycleCommandResponses) SetApproveForMyOrgList(v []SSHExecCommandResponse) { - o.ApproveForMyOrgList = v -} - -// GetCommit returns the Commit field value if set, zero value otherwise. -func (o *ChainCodeLifeCycleCommandResponses) GetCommit() SSHExecCommandResponse { - if o == nil || IsNil(o.Commit) { - var ret SSHExecCommandResponse - return ret - } - return *o.Commit -} - -// GetCommitOk returns a tuple with the Commit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChainCodeLifeCycleCommandResponses) GetCommitOk() (*SSHExecCommandResponse, bool) { - if o == nil || IsNil(o.Commit) { - return nil, false - } - return o.Commit, true -} - -// HasCommit returns a boolean if a field has been set. -func (o *ChainCodeLifeCycleCommandResponses) HasCommit() bool { - if o != nil && !IsNil(o.Commit) { - return true - } - - return false -} - -// SetCommit gets a reference to the given SSHExecCommandResponse and assigns it to the Commit field. -func (o *ChainCodeLifeCycleCommandResponses) SetCommit(v SSHExecCommandResponse) { - o.Commit = &v -} - -// GetQueryCommitted returns the QueryCommitted field value if set, zero value otherwise. -func (o *ChainCodeLifeCycleCommandResponses) GetQueryCommitted() SSHExecCommandResponse { - if o == nil || IsNil(o.QueryCommitted) { - var ret SSHExecCommandResponse - return ret - } - return *o.QueryCommitted -} - -// GetQueryCommittedOk returns a tuple with the QueryCommitted field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChainCodeLifeCycleCommandResponses) GetQueryCommittedOk() (*SSHExecCommandResponse, bool) { - if o == nil || IsNil(o.QueryCommitted) { - return nil, false - } - return o.QueryCommitted, true -} - -// HasQueryCommitted returns a boolean if a field has been set. -func (o *ChainCodeLifeCycleCommandResponses) HasQueryCommitted() bool { - if o != nil && !IsNil(o.QueryCommitted) { - return true - } - - return false -} - -// SetQueryCommitted gets a reference to the given SSHExecCommandResponse and assigns it to the QueryCommitted field. -func (o *ChainCodeLifeCycleCommandResponses) SetQueryCommitted(v SSHExecCommandResponse) { - o.QueryCommitted = &v -} - -// GetInit returns the Init field value if set, zero value otherwise. -func (o *ChainCodeLifeCycleCommandResponses) GetInit() SSHExecCommandResponse { - if o == nil || IsNil(o.Init) { - var ret SSHExecCommandResponse - return ret - } - return *o.Init -} - -// GetInitOk returns a tuple with the Init field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChainCodeLifeCycleCommandResponses) GetInitOk() (*SSHExecCommandResponse, bool) { - if o == nil || IsNil(o.Init) { - return nil, false - } - return o.Init, true -} - -// HasInit returns a boolean if a field has been set. -func (o *ChainCodeLifeCycleCommandResponses) HasInit() bool { - if o != nil && !IsNil(o.Init) { - return true - } - - return false -} - -// SetInit gets a reference to the given SSHExecCommandResponse and assigns it to the Init field. -func (o *ChainCodeLifeCycleCommandResponses) SetInit(v SSHExecCommandResponse) { - o.Init = &v -} - -func (o ChainCodeLifeCycleCommandResponses) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ChainCodeLifeCycleCommandResponses) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Packaging) { - toSerialize["packaging"] = o.Packaging - } - toSerialize["installList"] = o.InstallList - toSerialize["queryInstalledList"] = o.QueryInstalledList - toSerialize["approveForMyOrgList"] = o.ApproveForMyOrgList - if !IsNil(o.Commit) { - toSerialize["commit"] = o.Commit - } - if !IsNil(o.QueryCommitted) { - toSerialize["queryCommitted"] = o.QueryCommitted - } - if !IsNil(o.Init) { - toSerialize["init"] = o.Init - } - return toSerialize, nil -} - -type NullableChainCodeLifeCycleCommandResponses struct { - value *ChainCodeLifeCycleCommandResponses - isSet bool -} - -func (v NullableChainCodeLifeCycleCommandResponses) Get() *ChainCodeLifeCycleCommandResponses { - return v.value -} - -func (v *NullableChainCodeLifeCycleCommandResponses) Set(val *ChainCodeLifeCycleCommandResponses) { - v.value = val - v.isSet = true -} - -func (v NullableChainCodeLifeCycleCommandResponses) IsSet() bool { - return v.isSet -} - -func (v *NullableChainCodeLifeCycleCommandResponses) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableChainCodeLifeCycleCommandResponses(val *ChainCodeLifeCycleCommandResponses) *NullableChainCodeLifeCycleCommandResponses { - return &NullableChainCodeLifeCycleCommandResponses{value: val, isSet: true} -} - -func (v NullableChainCodeLifeCycleCommandResponses) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableChainCodeLifeCycleCommandResponses) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_chain_code_programming_language.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_chain_code_programming_language.go deleted file mode 100644 index 210aabd469..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_chain_code_programming_language.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// ChainCodeProgrammingLanguage Enumerates the supported source code programming languages of Hyperledger Fabric -type ChainCodeProgrammingLanguage string - -// List of ChainCodeProgrammingLanguage -const ( - GOLANG ChainCodeProgrammingLanguage = "golang" - JAVASCRIPT ChainCodeProgrammingLanguage = "javascript" - TYPESCRIPT ChainCodeProgrammingLanguage = "typescript" - JAVA ChainCodeProgrammingLanguage = "java" -) - -// All allowed values of ChainCodeProgrammingLanguage enum -var AllowedChainCodeProgrammingLanguageEnumValues = []ChainCodeProgrammingLanguage{ - "golang", - "javascript", - "typescript", - "java", -} - -func (v *ChainCodeProgrammingLanguage) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := ChainCodeProgrammingLanguage(value) - for _, existing := range AllowedChainCodeProgrammingLanguageEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid ChainCodeProgrammingLanguage", value) -} - -// NewChainCodeProgrammingLanguageFromValue returns a pointer to a valid ChainCodeProgrammingLanguage -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewChainCodeProgrammingLanguageFromValue(v string) (*ChainCodeProgrammingLanguage, error) { - ev := ChainCodeProgrammingLanguage(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ChainCodeProgrammingLanguage: valid values are %v", v, AllowedChainCodeProgrammingLanguageEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v ChainCodeProgrammingLanguage) IsValid() bool { - for _, existing := range AllowedChainCodeProgrammingLanguageEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to ChainCodeProgrammingLanguage value -func (v ChainCodeProgrammingLanguage) Ptr() *ChainCodeProgrammingLanguage { - return &v -} - -type NullableChainCodeProgrammingLanguage struct { - value *ChainCodeProgrammingLanguage - isSet bool -} - -func (v NullableChainCodeProgrammingLanguage) Get() *ChainCodeProgrammingLanguage { - return v.value -} - -func (v *NullableChainCodeProgrammingLanguage) Set(val *ChainCodeProgrammingLanguage) { - v.value = val - v.isSet = true -} - -func (v NullableChainCodeProgrammingLanguage) IsSet() bool { - return v.isSet -} - -func (v *NullableChainCodeProgrammingLanguage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableChainCodeProgrammingLanguage(val *ChainCodeProgrammingLanguage) *NullableChainCodeProgrammingLanguage { - return &NullableChainCodeProgrammingLanguage{value: val, isSet: true} -} - -func (v NullableChainCodeProgrammingLanguage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableChainCodeProgrammingLanguage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_connection_profile.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_connection_profile.go deleted file mode 100644 index aeea5b0376..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_connection_profile.go +++ /dev/null @@ -1,448 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the ConnectionProfile type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectionProfile{} - -// ConnectionProfile struct for ConnectionProfile -type ConnectionProfile struct { - Name string `json:"name"` - XType *string `json:"x-type,omitempty"` - Description *string `json:"description,omitempty"` - Version string `json:"version"` - Client *ConnectionProfileClient `json:"client,omitempty"` - Channels map[string]interface{} `json:"channels,omitempty"` - Organizations map[string]interface{} `json:"organizations"` - Orderers map[string]interface{} `json:"orderers,omitempty"` - Peers map[string]interface{} `json:"peers"` - CertificateAuthorities map[string]interface{} `json:"certificateAuthorities,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ConnectionProfile ConnectionProfile - -// NewConnectionProfile instantiates a new ConnectionProfile object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectionProfile(name string, version string, organizations map[string]interface{}, peers map[string]interface{}) *ConnectionProfile { - this := ConnectionProfile{} - this.Name = name - this.Version = version - this.Organizations = organizations - this.Peers = peers - return &this -} - -// NewConnectionProfileWithDefaults instantiates a new ConnectionProfile object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectionProfileWithDefaults() *ConnectionProfile { - this := ConnectionProfile{} - return &this -} - -// GetName returns the Name field value -func (o *ConnectionProfile) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectionProfile) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectionProfile) SetName(v string) { - o.Name = v -} - -// GetXType returns the XType field value if set, zero value otherwise. -func (o *ConnectionProfile) GetXType() string { - if o == nil || IsNil(o.XType) { - var ret string - return ret - } - return *o.XType -} - -// GetXTypeOk returns a tuple with the XType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectionProfile) GetXTypeOk() (*string, bool) { - if o == nil || IsNil(o.XType) { - return nil, false - } - return o.XType, true -} - -// HasXType returns a boolean if a field has been set. -func (o *ConnectionProfile) HasXType() bool { - if o != nil && !IsNil(o.XType) { - return true - } - - return false -} - -// SetXType gets a reference to the given string and assigns it to the XType field. -func (o *ConnectionProfile) SetXType(v string) { - o.XType = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *ConnectionProfile) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectionProfile) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *ConnectionProfile) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *ConnectionProfile) SetDescription(v string) { - o.Description = &v -} - -// GetVersion returns the Version field value -func (o *ConnectionProfile) GetVersion() string { - if o == nil { - var ret string - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *ConnectionProfile) GetVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *ConnectionProfile) SetVersion(v string) { - o.Version = v -} - -// GetClient returns the Client field value if set, zero value otherwise. -func (o *ConnectionProfile) GetClient() ConnectionProfileClient { - if o == nil || IsNil(o.Client) { - var ret ConnectionProfileClient - return ret - } - return *o.Client -} - -// GetClientOk returns a tuple with the Client field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectionProfile) GetClientOk() (*ConnectionProfileClient, bool) { - if o == nil || IsNil(o.Client) { - return nil, false - } - return o.Client, true -} - -// HasClient returns a boolean if a field has been set. -func (o *ConnectionProfile) HasClient() bool { - if o != nil && !IsNil(o.Client) { - return true - } - - return false -} - -// SetClient gets a reference to the given ConnectionProfileClient and assigns it to the Client field. -func (o *ConnectionProfile) SetClient(v ConnectionProfileClient) { - o.Client = &v -} - -// GetChannels returns the Channels field value if set, zero value otherwise. -func (o *ConnectionProfile) GetChannels() map[string]interface{} { - if o == nil || IsNil(o.Channels) { - var ret map[string]interface{} - return ret - } - return o.Channels -} - -// GetChannelsOk returns a tuple with the Channels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectionProfile) GetChannelsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Channels) { - return map[string]interface{}{}, false - } - return o.Channels, true -} - -// HasChannels returns a boolean if a field has been set. -func (o *ConnectionProfile) HasChannels() bool { - if o != nil && !IsNil(o.Channels) { - return true - } - - return false -} - -// SetChannels gets a reference to the given map[string]interface{} and assigns it to the Channels field. -func (o *ConnectionProfile) SetChannels(v map[string]interface{}) { - o.Channels = v -} - -// GetOrganizations returns the Organizations field value -func (o *ConnectionProfile) GetOrganizations() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Organizations -} - -// GetOrganizationsOk returns a tuple with the Organizations field value -// and a boolean to check if the value has been set. -func (o *ConnectionProfile) GetOrganizationsOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Organizations, true -} - -// SetOrganizations sets field value -func (o *ConnectionProfile) SetOrganizations(v map[string]interface{}) { - o.Organizations = v -} - -// GetOrderers returns the Orderers field value if set, zero value otherwise. -func (o *ConnectionProfile) GetOrderers() map[string]interface{} { - if o == nil || IsNil(o.Orderers) { - var ret map[string]interface{} - return ret - } - return o.Orderers -} - -// GetOrderersOk returns a tuple with the Orderers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectionProfile) GetOrderersOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Orderers) { - return map[string]interface{}{}, false - } - return o.Orderers, true -} - -// HasOrderers returns a boolean if a field has been set. -func (o *ConnectionProfile) HasOrderers() bool { - if o != nil && !IsNil(o.Orderers) { - return true - } - - return false -} - -// SetOrderers gets a reference to the given map[string]interface{} and assigns it to the Orderers field. -func (o *ConnectionProfile) SetOrderers(v map[string]interface{}) { - o.Orderers = v -} - -// GetPeers returns the Peers field value -func (o *ConnectionProfile) GetPeers() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Peers -} - -// GetPeersOk returns a tuple with the Peers field value -// and a boolean to check if the value has been set. -func (o *ConnectionProfile) GetPeersOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Peers, true -} - -// SetPeers sets field value -func (o *ConnectionProfile) SetPeers(v map[string]interface{}) { - o.Peers = v -} - -// GetCertificateAuthorities returns the CertificateAuthorities field value if set, zero value otherwise. -func (o *ConnectionProfile) GetCertificateAuthorities() map[string]interface{} { - if o == nil || IsNil(o.CertificateAuthorities) { - var ret map[string]interface{} - return ret - } - return o.CertificateAuthorities -} - -// GetCertificateAuthoritiesOk returns a tuple with the CertificateAuthorities field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectionProfile) GetCertificateAuthoritiesOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.CertificateAuthorities) { - return map[string]interface{}{}, false - } - return o.CertificateAuthorities, true -} - -// HasCertificateAuthorities returns a boolean if a field has been set. -func (o *ConnectionProfile) HasCertificateAuthorities() bool { - if o != nil && !IsNil(o.CertificateAuthorities) { - return true - } - - return false -} - -// SetCertificateAuthorities gets a reference to the given map[string]interface{} and assigns it to the CertificateAuthorities field. -func (o *ConnectionProfile) SetCertificateAuthorities(v map[string]interface{}) { - o.CertificateAuthorities = v -} - -func (o ConnectionProfile) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectionProfile) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - if !IsNil(o.XType) { - toSerialize["x-type"] = o.XType - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - toSerialize["version"] = o.Version - if !IsNil(o.Client) { - toSerialize["client"] = o.Client - } - if !IsNil(o.Channels) { - toSerialize["channels"] = o.Channels - } - toSerialize["organizations"] = o.Organizations - if !IsNil(o.Orderers) { - toSerialize["orderers"] = o.Orderers - } - toSerialize["peers"] = o.Peers - if !IsNil(o.CertificateAuthorities) { - toSerialize["certificateAuthorities"] = o.CertificateAuthorities - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ConnectionProfile) UnmarshalJSON(bytes []byte) (err error) { - varConnectionProfile := _ConnectionProfile{} - - if err = json.Unmarshal(bytes, &varConnectionProfile); err == nil { - *o = ConnectionProfile(varConnectionProfile) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "name") - delete(additionalProperties, "x-type") - delete(additionalProperties, "description") - delete(additionalProperties, "version") - delete(additionalProperties, "client") - delete(additionalProperties, "channels") - delete(additionalProperties, "organizations") - delete(additionalProperties, "orderers") - delete(additionalProperties, "peers") - delete(additionalProperties, "certificateAuthorities") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableConnectionProfile struct { - value *ConnectionProfile - isSet bool -} - -func (v NullableConnectionProfile) Get() *ConnectionProfile { - return v.value -} - -func (v *NullableConnectionProfile) Set(val *ConnectionProfile) { - v.value = val - v.isSet = true -} - -func (v NullableConnectionProfile) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectionProfile) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectionProfile(val *ConnectionProfile) *NullableConnectionProfile { - return &NullableConnectionProfile{value: val, isSet: true} -} - -func (v NullableConnectionProfile) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectionProfile) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_connection_profile_client.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_connection_profile_client.go deleted file mode 100644 index e83d27388e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_connection_profile_client.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the ConnectionProfileClient type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectionProfileClient{} - -// ConnectionProfileClient struct for ConnectionProfileClient -type ConnectionProfileClient struct { - Organization *string `json:"organization,omitempty"` -} - -// NewConnectionProfileClient instantiates a new ConnectionProfileClient object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectionProfileClient() *ConnectionProfileClient { - this := ConnectionProfileClient{} - return &this -} - -// NewConnectionProfileClientWithDefaults instantiates a new ConnectionProfileClient object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectionProfileClientWithDefaults() *ConnectionProfileClient { - this := ConnectionProfileClient{} - return &this -} - -// GetOrganization returns the Organization field value if set, zero value otherwise. -func (o *ConnectionProfileClient) GetOrganization() string { - if o == nil || IsNil(o.Organization) { - var ret string - return ret - } - return *o.Organization -} - -// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectionProfileClient) GetOrganizationOk() (*string, bool) { - if o == nil || IsNil(o.Organization) { - return nil, false - } - return o.Organization, true -} - -// HasOrganization returns a boolean if a field has been set. -func (o *ConnectionProfileClient) HasOrganization() bool { - if o != nil && !IsNil(o.Organization) { - return true - } - - return false -} - -// SetOrganization gets a reference to the given string and assigns it to the Organization field. -func (o *ConnectionProfileClient) SetOrganization(v string) { - o.Organization = &v -} - -func (o ConnectionProfileClient) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectionProfileClient) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Organization) { - toSerialize["organization"] = o.Organization - } - return toSerialize, nil -} - -type NullableConnectionProfileClient struct { - value *ConnectionProfileClient - isSet bool -} - -func (v NullableConnectionProfileClient) Get() *ConnectionProfileClient { - return v.value -} - -func (v *NullableConnectionProfileClient) Set(val *ConnectionProfileClient) { - v.value = val - v.isSet = true -} - -func (v NullableConnectionProfileClient) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectionProfileClient) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectionProfileClient(val *ConnectionProfileClient) *NullableConnectionProfileClient { - return &NullableConnectionProfileClient{value: val, isSet: true} -} - -func (v NullableConnectionProfileClient) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectionProfileClient) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_default_event_handler_strategy.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_default_event_handler_strategy.go deleted file mode 100644 index b92399345c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_default_event_handler_strategy.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// DefaultEventHandlerStrategy the model 'DefaultEventHandlerStrategy' -type DefaultEventHandlerStrategy string - -// List of DefaultEventHandlerStrategy -const ( - MSPID_SCOPE_ALLFORTX DefaultEventHandlerStrategy = "MSPID_SCOPE_ALLFORTX" - MSPID_SCOPE_ANYFORTX DefaultEventHandlerStrategy = "MSPID_SCOPE_ANYFORTX" - NETWORK_SCOPE_ALLFORTX DefaultEventHandlerStrategy = "NETWORK_SCOPE_ALLFORTX" - NETWORK_SCOPE_ANYFORTX DefaultEventHandlerStrategy = "NETWORK_SCOPE_ANYFORTX" -) - -// All allowed values of DefaultEventHandlerStrategy enum -var AllowedDefaultEventHandlerStrategyEnumValues = []DefaultEventHandlerStrategy{ - "MSPID_SCOPE_ALLFORTX", - "MSPID_SCOPE_ANYFORTX", - "NETWORK_SCOPE_ALLFORTX", - "NETWORK_SCOPE_ANYFORTX", -} - -func (v *DefaultEventHandlerStrategy) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := DefaultEventHandlerStrategy(value) - for _, existing := range AllowedDefaultEventHandlerStrategyEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid DefaultEventHandlerStrategy", value) -} - -// NewDefaultEventHandlerStrategyFromValue returns a pointer to a valid DefaultEventHandlerStrategy -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewDefaultEventHandlerStrategyFromValue(v string) (*DefaultEventHandlerStrategy, error) { - ev := DefaultEventHandlerStrategy(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for DefaultEventHandlerStrategy: valid values are %v", v, AllowedDefaultEventHandlerStrategyEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v DefaultEventHandlerStrategy) IsValid() bool { - for _, existing := range AllowedDefaultEventHandlerStrategyEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to DefaultEventHandlerStrategy value -func (v DefaultEventHandlerStrategy) Ptr() *DefaultEventHandlerStrategy { - return &v -} - -type NullableDefaultEventHandlerStrategy struct { - value *DefaultEventHandlerStrategy - isSet bool -} - -func (v NullableDefaultEventHandlerStrategy) Get() *DefaultEventHandlerStrategy { - return v.value -} - -func (v *NullableDefaultEventHandlerStrategy) Set(val *DefaultEventHandlerStrategy) { - v.value = val - v.isSet = true -} - -func (v NullableDefaultEventHandlerStrategy) IsSet() bool { - return v.isSet -} - -func (v *NullableDefaultEventHandlerStrategy) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDefaultEventHandlerStrategy(val *DefaultEventHandlerStrategy) *NullableDefaultEventHandlerStrategy { - return &NullableDefaultEventHandlerStrategy{value: val, isSet: true} -} - -func (v NullableDefaultEventHandlerStrategy) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDefaultEventHandlerStrategy) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_501_response.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_501_response.go deleted file mode 100644 index 07884fff01..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_501_response.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the DeployContractGoSourceV1501Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractGoSourceV1501Response{} - -// DeployContractGoSourceV1501Response struct for DeployContractGoSourceV1501Response -type DeployContractGoSourceV1501Response struct { - Message *string `json:"message,omitempty"` -} - -// NewDeployContractGoSourceV1501Response instantiates a new DeployContractGoSourceV1501Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractGoSourceV1501Response() *DeployContractGoSourceV1501Response { - this := DeployContractGoSourceV1501Response{} - return &this -} - -// NewDeployContractGoSourceV1501ResponseWithDefaults instantiates a new DeployContractGoSourceV1501Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractGoSourceV1501ResponseWithDefaults() *DeployContractGoSourceV1501Response { - this := DeployContractGoSourceV1501Response{} - return &this -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *DeployContractGoSourceV1501Response) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1501Response) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *DeployContractGoSourceV1501Response) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *DeployContractGoSourceV1501Response) SetMessage(v string) { - o.Message = &v -} - -func (o DeployContractGoSourceV1501Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractGoSourceV1501Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - return toSerialize, nil -} - -type NullableDeployContractGoSourceV1501Response struct { - value *DeployContractGoSourceV1501Response - isSet bool -} - -func (v NullableDeployContractGoSourceV1501Response) Get() *DeployContractGoSourceV1501Response { - return v.value -} - -func (v *NullableDeployContractGoSourceV1501Response) Set(val *DeployContractGoSourceV1501Response) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractGoSourceV1501Response) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractGoSourceV1501Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractGoSourceV1501Response(val *DeployContractGoSourceV1501Response) *NullableDeployContractGoSourceV1501Response { - return &NullableDeployContractGoSourceV1501Response{value: val, isSet: true} -} - -func (v NullableDeployContractGoSourceV1501Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractGoSourceV1501Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_request.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_request.go deleted file mode 100644 index dc212f9132..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_request.go +++ /dev/null @@ -1,474 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the DeployContractGoSourceV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractGoSourceV1Request{} - -// DeployContractGoSourceV1Request struct for DeployContractGoSourceV1Request -type DeployContractGoSourceV1Request struct { - PolicyDslSource string `json:"policyDslSource"` - // The TLS root cert files that will be passed to the chaincode instantiation command. - TlsRootCertFiles string `json:"tlsRootCertFiles"` - // The name of the Fabric channel where the contract will get instantiated. - ChannelId string `json:"channelId"` - TargetOrganizations []DeploymentTargetOrganization `json:"targetOrganizations"` - // An array of peer addresses where the contract will be instantiated. Note that at present only the first item from this array will be used which is the behavior taken from the official Fabric samples repository and therefore it is assumed to be correct usage. - TargetPeerAddresses []string `json:"targetPeerAddresses"` - ConstructorArgs *DeployContractGoSourceV1RequestConstructorArgs `json:"constructorArgs,omitempty"` - ChainCodeVersion string `json:"chainCodeVersion"` - GoSource FileBase64 `json:"goSource"` - GoMod *FileBase64 `json:"goMod,omitempty"` - // The go module name that will be used for the go compilation process. - ModuleName *string `json:"moduleName,omitempty"` - PinnedDeps []string `json:"pinnedDeps,omitempty"` - // Indicates to the go chaincode compiler of Cactus if it should do an actual go compilation with the contact source or if it should just execute the go mod tidy command. - ModTidyOnly NullableBool `json:"modTidyOnly,omitempty"` -} - -// NewDeployContractGoSourceV1Request instantiates a new DeployContractGoSourceV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractGoSourceV1Request(policyDslSource string, tlsRootCertFiles string, channelId string, targetOrganizations []DeploymentTargetOrganization, targetPeerAddresses []string, chainCodeVersion string, goSource FileBase64) *DeployContractGoSourceV1Request { - this := DeployContractGoSourceV1Request{} - this.PolicyDslSource = policyDslSource - this.TlsRootCertFiles = tlsRootCertFiles - this.ChannelId = channelId - this.TargetOrganizations = targetOrganizations - this.TargetPeerAddresses = targetPeerAddresses - this.ChainCodeVersion = chainCodeVersion - this.GoSource = goSource - return &this -} - -// NewDeployContractGoSourceV1RequestWithDefaults instantiates a new DeployContractGoSourceV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractGoSourceV1RequestWithDefaults() *DeployContractGoSourceV1Request { - this := DeployContractGoSourceV1Request{} - return &this -} - -// GetPolicyDslSource returns the PolicyDslSource field value -func (o *DeployContractGoSourceV1Request) GetPolicyDslSource() string { - if o == nil { - var ret string - return ret - } - - return o.PolicyDslSource -} - -// GetPolicyDslSourceOk returns a tuple with the PolicyDslSource field value -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetPolicyDslSourceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PolicyDslSource, true -} - -// SetPolicyDslSource sets field value -func (o *DeployContractGoSourceV1Request) SetPolicyDslSource(v string) { - o.PolicyDslSource = v -} - -// GetTlsRootCertFiles returns the TlsRootCertFiles field value -func (o *DeployContractGoSourceV1Request) GetTlsRootCertFiles() string { - if o == nil { - var ret string - return ret - } - - return o.TlsRootCertFiles -} - -// GetTlsRootCertFilesOk returns a tuple with the TlsRootCertFiles field value -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetTlsRootCertFilesOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TlsRootCertFiles, true -} - -// SetTlsRootCertFiles sets field value -func (o *DeployContractGoSourceV1Request) SetTlsRootCertFiles(v string) { - o.TlsRootCertFiles = v -} - -// GetChannelId returns the ChannelId field value -func (o *DeployContractGoSourceV1Request) GetChannelId() string { - if o == nil { - var ret string - return ret - } - - return o.ChannelId -} - -// GetChannelIdOk returns a tuple with the ChannelId field value -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetChannelIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChannelId, true -} - -// SetChannelId sets field value -func (o *DeployContractGoSourceV1Request) SetChannelId(v string) { - o.ChannelId = v -} - -// GetTargetOrganizations returns the TargetOrganizations field value -func (o *DeployContractGoSourceV1Request) GetTargetOrganizations() []DeploymentTargetOrganization { - if o == nil { - var ret []DeploymentTargetOrganization - return ret - } - - return o.TargetOrganizations -} - -// GetTargetOrganizationsOk returns a tuple with the TargetOrganizations field value -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetTargetOrganizationsOk() ([]DeploymentTargetOrganization, bool) { - if o == nil { - return nil, false - } - return o.TargetOrganizations, true -} - -// SetTargetOrganizations sets field value -func (o *DeployContractGoSourceV1Request) SetTargetOrganizations(v []DeploymentTargetOrganization) { - o.TargetOrganizations = v -} - -// GetTargetPeerAddresses returns the TargetPeerAddresses field value -func (o *DeployContractGoSourceV1Request) GetTargetPeerAddresses() []string { - if o == nil { - var ret []string - return ret - } - - return o.TargetPeerAddresses -} - -// GetTargetPeerAddressesOk returns a tuple with the TargetPeerAddresses field value -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetTargetPeerAddressesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.TargetPeerAddresses, true -} - -// SetTargetPeerAddresses sets field value -func (o *DeployContractGoSourceV1Request) SetTargetPeerAddresses(v []string) { - o.TargetPeerAddresses = v -} - -// GetConstructorArgs returns the ConstructorArgs field value if set, zero value otherwise. -func (o *DeployContractGoSourceV1Request) GetConstructorArgs() DeployContractGoSourceV1RequestConstructorArgs { - if o == nil || IsNil(o.ConstructorArgs) { - var ret DeployContractGoSourceV1RequestConstructorArgs - return ret - } - return *o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetConstructorArgsOk() (*DeployContractGoSourceV1RequestConstructorArgs, bool) { - if o == nil || IsNil(o.ConstructorArgs) { - return nil, false - } - return o.ConstructorArgs, true -} - -// HasConstructorArgs returns a boolean if a field has been set. -func (o *DeployContractGoSourceV1Request) HasConstructorArgs() bool { - if o != nil && !IsNil(o.ConstructorArgs) { - return true - } - - return false -} - -// SetConstructorArgs gets a reference to the given DeployContractGoSourceV1RequestConstructorArgs and assigns it to the ConstructorArgs field. -func (o *DeployContractGoSourceV1Request) SetConstructorArgs(v DeployContractGoSourceV1RequestConstructorArgs) { - o.ConstructorArgs = &v -} - -// GetChainCodeVersion returns the ChainCodeVersion field value -func (o *DeployContractGoSourceV1Request) GetChainCodeVersion() string { - if o == nil { - var ret string - return ret - } - - return o.ChainCodeVersion -} - -// GetChainCodeVersionOk returns a tuple with the ChainCodeVersion field value -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetChainCodeVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainCodeVersion, true -} - -// SetChainCodeVersion sets field value -func (o *DeployContractGoSourceV1Request) SetChainCodeVersion(v string) { - o.ChainCodeVersion = v -} - -// GetGoSource returns the GoSource field value -func (o *DeployContractGoSourceV1Request) GetGoSource() FileBase64 { - if o == nil { - var ret FileBase64 - return ret - } - - return o.GoSource -} - -// GetGoSourceOk returns a tuple with the GoSource field value -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetGoSourceOk() (*FileBase64, bool) { - if o == nil { - return nil, false - } - return &o.GoSource, true -} - -// SetGoSource sets field value -func (o *DeployContractGoSourceV1Request) SetGoSource(v FileBase64) { - o.GoSource = v -} - -// GetGoMod returns the GoMod field value if set, zero value otherwise. -func (o *DeployContractGoSourceV1Request) GetGoMod() FileBase64 { - if o == nil || IsNil(o.GoMod) { - var ret FileBase64 - return ret - } - return *o.GoMod -} - -// GetGoModOk returns a tuple with the GoMod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetGoModOk() (*FileBase64, bool) { - if o == nil || IsNil(o.GoMod) { - return nil, false - } - return o.GoMod, true -} - -// HasGoMod returns a boolean if a field has been set. -func (o *DeployContractGoSourceV1Request) HasGoMod() bool { - if o != nil && !IsNil(o.GoMod) { - return true - } - - return false -} - -// SetGoMod gets a reference to the given FileBase64 and assigns it to the GoMod field. -func (o *DeployContractGoSourceV1Request) SetGoMod(v FileBase64) { - o.GoMod = &v -} - -// GetModuleName returns the ModuleName field value if set, zero value otherwise. -func (o *DeployContractGoSourceV1Request) GetModuleName() string { - if o == nil || IsNil(o.ModuleName) { - var ret string - return ret - } - return *o.ModuleName -} - -// GetModuleNameOk returns a tuple with the ModuleName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetModuleNameOk() (*string, bool) { - if o == nil || IsNil(o.ModuleName) { - return nil, false - } - return o.ModuleName, true -} - -// HasModuleName returns a boolean if a field has been set. -func (o *DeployContractGoSourceV1Request) HasModuleName() bool { - if o != nil && !IsNil(o.ModuleName) { - return true - } - - return false -} - -// SetModuleName gets a reference to the given string and assigns it to the ModuleName field. -func (o *DeployContractGoSourceV1Request) SetModuleName(v string) { - o.ModuleName = &v -} - -// GetPinnedDeps returns the PinnedDeps field value if set, zero value otherwise. -func (o *DeployContractGoSourceV1Request) GetPinnedDeps() []string { - if o == nil || IsNil(o.PinnedDeps) { - var ret []string - return ret - } - return o.PinnedDeps -} - -// GetPinnedDepsOk returns a tuple with the PinnedDeps field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Request) GetPinnedDepsOk() ([]string, bool) { - if o == nil || IsNil(o.PinnedDeps) { - return nil, false - } - return o.PinnedDeps, true -} - -// HasPinnedDeps returns a boolean if a field has been set. -func (o *DeployContractGoSourceV1Request) HasPinnedDeps() bool { - if o != nil && !IsNil(o.PinnedDeps) { - return true - } - - return false -} - -// SetPinnedDeps gets a reference to the given []string and assigns it to the PinnedDeps field. -func (o *DeployContractGoSourceV1Request) SetPinnedDeps(v []string) { - o.PinnedDeps = v -} - -// GetModTidyOnly returns the ModTidyOnly field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DeployContractGoSourceV1Request) GetModTidyOnly() bool { - if o == nil || IsNil(o.ModTidyOnly.Get()) { - var ret bool - return ret - } - return *o.ModTidyOnly.Get() -} - -// GetModTidyOnlyOk returns a tuple with the ModTidyOnly field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DeployContractGoSourceV1Request) GetModTidyOnlyOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.ModTidyOnly.Get(), o.ModTidyOnly.IsSet() -} - -// HasModTidyOnly returns a boolean if a field has been set. -func (o *DeployContractGoSourceV1Request) HasModTidyOnly() bool { - if o != nil && o.ModTidyOnly.IsSet() { - return true - } - - return false -} - -// SetModTidyOnly gets a reference to the given NullableBool and assigns it to the ModTidyOnly field. -func (o *DeployContractGoSourceV1Request) SetModTidyOnly(v bool) { - o.ModTidyOnly.Set(&v) -} -// SetModTidyOnlyNil sets the value for ModTidyOnly to be an explicit nil -func (o *DeployContractGoSourceV1Request) SetModTidyOnlyNil() { - o.ModTidyOnly.Set(nil) -} - -// UnsetModTidyOnly ensures that no value is present for ModTidyOnly, not even an explicit nil -func (o *DeployContractGoSourceV1Request) UnsetModTidyOnly() { - o.ModTidyOnly.Unset() -} - -func (o DeployContractGoSourceV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractGoSourceV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["policyDslSource"] = o.PolicyDslSource - toSerialize["tlsRootCertFiles"] = o.TlsRootCertFiles - toSerialize["channelId"] = o.ChannelId - toSerialize["targetOrganizations"] = o.TargetOrganizations - toSerialize["targetPeerAddresses"] = o.TargetPeerAddresses - if !IsNil(o.ConstructorArgs) { - toSerialize["constructorArgs"] = o.ConstructorArgs - } - toSerialize["chainCodeVersion"] = o.ChainCodeVersion - toSerialize["goSource"] = o.GoSource - if !IsNil(o.GoMod) { - toSerialize["goMod"] = o.GoMod - } - if !IsNil(o.ModuleName) { - toSerialize["moduleName"] = o.ModuleName - } - if !IsNil(o.PinnedDeps) { - toSerialize["pinnedDeps"] = o.PinnedDeps - } - if o.ModTidyOnly.IsSet() { - toSerialize["modTidyOnly"] = o.ModTidyOnly.Get() - } - return toSerialize, nil -} - -type NullableDeployContractGoSourceV1Request struct { - value *DeployContractGoSourceV1Request - isSet bool -} - -func (v NullableDeployContractGoSourceV1Request) Get() *DeployContractGoSourceV1Request { - return v.value -} - -func (v *NullableDeployContractGoSourceV1Request) Set(val *DeployContractGoSourceV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractGoSourceV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractGoSourceV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractGoSourceV1Request(val *DeployContractGoSourceV1Request) *NullableDeployContractGoSourceV1Request { - return &NullableDeployContractGoSourceV1Request{value: val, isSet: true} -} - -func (v NullableDeployContractGoSourceV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractGoSourceV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_request_constructor_args.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_request_constructor_args.go deleted file mode 100644 index 71719ff9d8..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_request_constructor_args.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the DeployContractGoSourceV1RequestConstructorArgs type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractGoSourceV1RequestConstructorArgs{} - -// DeployContractGoSourceV1RequestConstructorArgs struct for DeployContractGoSourceV1RequestConstructorArgs -type DeployContractGoSourceV1RequestConstructorArgs struct { - Args []interface{} `json:"Args,omitempty"` -} - -// NewDeployContractGoSourceV1RequestConstructorArgs instantiates a new DeployContractGoSourceV1RequestConstructorArgs object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractGoSourceV1RequestConstructorArgs() *DeployContractGoSourceV1RequestConstructorArgs { - this := DeployContractGoSourceV1RequestConstructorArgs{} - return &this -} - -// NewDeployContractGoSourceV1RequestConstructorArgsWithDefaults instantiates a new DeployContractGoSourceV1RequestConstructorArgs object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractGoSourceV1RequestConstructorArgsWithDefaults() *DeployContractGoSourceV1RequestConstructorArgs { - this := DeployContractGoSourceV1RequestConstructorArgs{} - return &this -} - -// GetArgs returns the Args field value if set, zero value otherwise. -func (o *DeployContractGoSourceV1RequestConstructorArgs) GetArgs() []interface{} { - if o == nil || IsNil(o.Args) { - var ret []interface{} - return ret - } - return o.Args -} - -// GetArgsOk returns a tuple with the Args field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1RequestConstructorArgs) GetArgsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.Args) { - return nil, false - } - return o.Args, true -} - -// HasArgs returns a boolean if a field has been set. -func (o *DeployContractGoSourceV1RequestConstructorArgs) HasArgs() bool { - if o != nil && !IsNil(o.Args) { - return true - } - - return false -} - -// SetArgs gets a reference to the given []interface{} and assigns it to the Args field. -func (o *DeployContractGoSourceV1RequestConstructorArgs) SetArgs(v []interface{}) { - o.Args = v -} - -func (o DeployContractGoSourceV1RequestConstructorArgs) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractGoSourceV1RequestConstructorArgs) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Args) { - toSerialize["Args"] = o.Args - } - return toSerialize, nil -} - -type NullableDeployContractGoSourceV1RequestConstructorArgs struct { - value *DeployContractGoSourceV1RequestConstructorArgs - isSet bool -} - -func (v NullableDeployContractGoSourceV1RequestConstructorArgs) Get() *DeployContractGoSourceV1RequestConstructorArgs { - return v.value -} - -func (v *NullableDeployContractGoSourceV1RequestConstructorArgs) Set(val *DeployContractGoSourceV1RequestConstructorArgs) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractGoSourceV1RequestConstructorArgs) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractGoSourceV1RequestConstructorArgs) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractGoSourceV1RequestConstructorArgs(val *DeployContractGoSourceV1RequestConstructorArgs) *NullableDeployContractGoSourceV1RequestConstructorArgs { - return &NullableDeployContractGoSourceV1RequestConstructorArgs{value: val, isSet: true} -} - -func (v NullableDeployContractGoSourceV1RequestConstructorArgs) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractGoSourceV1RequestConstructorArgs) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_response.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_response.go deleted file mode 100644 index 9ace48270b..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_go_source_v1_response.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the DeployContractGoSourceV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractGoSourceV1Response{} - -// DeployContractGoSourceV1Response struct for DeployContractGoSourceV1Response -type DeployContractGoSourceV1Response struct { - Success bool `json:"success"` - InstallationCommandResponses []SSHExecCommandResponse `json:"installationCommandResponses"` - InstantiationCommandResponse SSHExecCommandResponse `json:"instantiationCommandResponse"` -} - -// NewDeployContractGoSourceV1Response instantiates a new DeployContractGoSourceV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractGoSourceV1Response(success bool, installationCommandResponses []SSHExecCommandResponse, instantiationCommandResponse SSHExecCommandResponse) *DeployContractGoSourceV1Response { - this := DeployContractGoSourceV1Response{} - this.Success = success - this.InstallationCommandResponses = installationCommandResponses - this.InstantiationCommandResponse = instantiationCommandResponse - return &this -} - -// NewDeployContractGoSourceV1ResponseWithDefaults instantiates a new DeployContractGoSourceV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractGoSourceV1ResponseWithDefaults() *DeployContractGoSourceV1Response { - this := DeployContractGoSourceV1Response{} - return &this -} - -// GetSuccess returns the Success field value -func (o *DeployContractGoSourceV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *DeployContractGoSourceV1Response) SetSuccess(v bool) { - o.Success = v -} - -// GetInstallationCommandResponses returns the InstallationCommandResponses field value -func (o *DeployContractGoSourceV1Response) GetInstallationCommandResponses() []SSHExecCommandResponse { - if o == nil { - var ret []SSHExecCommandResponse - return ret - } - - return o.InstallationCommandResponses -} - -// GetInstallationCommandResponsesOk returns a tuple with the InstallationCommandResponses field value -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Response) GetInstallationCommandResponsesOk() ([]SSHExecCommandResponse, bool) { - if o == nil { - return nil, false - } - return o.InstallationCommandResponses, true -} - -// SetInstallationCommandResponses sets field value -func (o *DeployContractGoSourceV1Response) SetInstallationCommandResponses(v []SSHExecCommandResponse) { - o.InstallationCommandResponses = v -} - -// GetInstantiationCommandResponse returns the InstantiationCommandResponse field value -func (o *DeployContractGoSourceV1Response) GetInstantiationCommandResponse() SSHExecCommandResponse { - if o == nil { - var ret SSHExecCommandResponse - return ret - } - - return o.InstantiationCommandResponse -} - -// GetInstantiationCommandResponseOk returns a tuple with the InstantiationCommandResponse field value -// and a boolean to check if the value has been set. -func (o *DeployContractGoSourceV1Response) GetInstantiationCommandResponseOk() (*SSHExecCommandResponse, bool) { - if o == nil { - return nil, false - } - return &o.InstantiationCommandResponse, true -} - -// SetInstantiationCommandResponse sets field value -func (o *DeployContractGoSourceV1Response) SetInstantiationCommandResponse(v SSHExecCommandResponse) { - o.InstantiationCommandResponse = v -} - -func (o DeployContractGoSourceV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractGoSourceV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["success"] = o.Success - toSerialize["installationCommandResponses"] = o.InstallationCommandResponses - toSerialize["instantiationCommandResponse"] = o.InstantiationCommandResponse - return toSerialize, nil -} - -type NullableDeployContractGoSourceV1Response struct { - value *DeployContractGoSourceV1Response - isSet bool -} - -func (v NullableDeployContractGoSourceV1Response) Get() *DeployContractGoSourceV1Response { - return v.value -} - -func (v *NullableDeployContractGoSourceV1Response) Set(val *DeployContractGoSourceV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractGoSourceV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractGoSourceV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractGoSourceV1Response(val *DeployContractGoSourceV1Response) *NullableDeployContractGoSourceV1Response { - return &NullableDeployContractGoSourceV1Response{value: val, isSet: true} -} - -func (v NullableDeployContractGoSourceV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractGoSourceV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request.go deleted file mode 100644 index 106c6ae254..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request.go +++ /dev/null @@ -1,540 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the DeployContractV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractV1Request{} - -// DeployContractV1Request struct for DeployContractV1Request -type DeployContractV1Request struct { - CcLang ChainCodeProgrammingLanguage `json:"ccLang"` - // File-system path pointing at the CA file. - CaFile string `json:"caFile"` - // Ordering service endpoint specified as : - Orderer string `json:"orderer"` - // The hostname override to use when validating the TLS connection to the orderer - OrdererTLSHostnameOverride string `json:"ordererTLSHostnameOverride"` - // Timeout for client to connect (default 3s) - ConnTimeout *int32 `json:"connTimeout,omitempty"` - // Passed in to the peer via the --signature-policy argument on the command line. See also: https://hyperledger-fabric.readthedocs.io/en/release-2.2/endorsement-policies.html#setting-chaincode-level-endorsement-policies - SignaturePolicy *string `json:"signaturePolicy,omitempty"` - // Name of the collections config file as present in the sourceFiles array of the request. - CollectionsConfigFile *string `json:"collectionsConfigFile,omitempty"` - // The name of the Fabric channel where the contract will get instantiated. - ChannelId string `json:"channelId"` - TargetOrganizations []DeploymentTargetOrganization `json:"targetOrganizations"` - ConstructorArgs *DeployContractGoSourceV1RequestConstructorArgs `json:"constructorArgs,omitempty"` - CcSequence float32 `json:"ccSequence"` - CcVersion string `json:"ccVersion"` - CcName string `json:"ccName"` - // Human readable label to uniquely identify the contract. Recommended to include in this at least the contract name and the exact version in order to make it easily distinguishable from other deployments of the same contract. - CcLabel string `json:"ccLabel"` - // The your-smart-contract.go file where the functionality of your contract is implemented. - SourceFiles []FileBase64 `json:"sourceFiles"` -} - -// NewDeployContractV1Request instantiates a new DeployContractV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractV1Request(ccLang ChainCodeProgrammingLanguage, caFile string, orderer string, ordererTLSHostnameOverride string, channelId string, targetOrganizations []DeploymentTargetOrganization, ccSequence float32, ccVersion string, ccName string, ccLabel string, sourceFiles []FileBase64) *DeployContractV1Request { - this := DeployContractV1Request{} - this.CcLang = ccLang - this.CaFile = caFile - this.Orderer = orderer - this.OrdererTLSHostnameOverride = ordererTLSHostnameOverride - this.ChannelId = channelId - this.TargetOrganizations = targetOrganizations - this.CcSequence = ccSequence - this.CcVersion = ccVersion - this.CcName = ccName - this.CcLabel = ccLabel - this.SourceFiles = sourceFiles - return &this -} - -// NewDeployContractV1RequestWithDefaults instantiates a new DeployContractV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractV1RequestWithDefaults() *DeployContractV1Request { - this := DeployContractV1Request{} - return &this -} - -// GetCcLang returns the CcLang field value -func (o *DeployContractV1Request) GetCcLang() ChainCodeProgrammingLanguage { - if o == nil { - var ret ChainCodeProgrammingLanguage - return ret - } - - return o.CcLang -} - -// GetCcLangOk returns a tuple with the CcLang field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetCcLangOk() (*ChainCodeProgrammingLanguage, bool) { - if o == nil { - return nil, false - } - return &o.CcLang, true -} - -// SetCcLang sets field value -func (o *DeployContractV1Request) SetCcLang(v ChainCodeProgrammingLanguage) { - o.CcLang = v -} - -// GetCaFile returns the CaFile field value -func (o *DeployContractV1Request) GetCaFile() string { - if o == nil { - var ret string - return ret - } - - return o.CaFile -} - -// GetCaFileOk returns a tuple with the CaFile field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetCaFileOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CaFile, true -} - -// SetCaFile sets field value -func (o *DeployContractV1Request) SetCaFile(v string) { - o.CaFile = v -} - -// GetOrderer returns the Orderer field value -func (o *DeployContractV1Request) GetOrderer() string { - if o == nil { - var ret string - return ret - } - - return o.Orderer -} - -// GetOrdererOk returns a tuple with the Orderer field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetOrdererOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Orderer, true -} - -// SetOrderer sets field value -func (o *DeployContractV1Request) SetOrderer(v string) { - o.Orderer = v -} - -// GetOrdererTLSHostnameOverride returns the OrdererTLSHostnameOverride field value -func (o *DeployContractV1Request) GetOrdererTLSHostnameOverride() string { - if o == nil { - var ret string - return ret - } - - return o.OrdererTLSHostnameOverride -} - -// GetOrdererTLSHostnameOverrideOk returns a tuple with the OrdererTLSHostnameOverride field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetOrdererTLSHostnameOverrideOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OrdererTLSHostnameOverride, true -} - -// SetOrdererTLSHostnameOverride sets field value -func (o *DeployContractV1Request) SetOrdererTLSHostnameOverride(v string) { - o.OrdererTLSHostnameOverride = v -} - -// GetConnTimeout returns the ConnTimeout field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetConnTimeout() int32 { - if o == nil || IsNil(o.ConnTimeout) { - var ret int32 - return ret - } - return *o.ConnTimeout -} - -// GetConnTimeoutOk returns a tuple with the ConnTimeout field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetConnTimeoutOk() (*int32, bool) { - if o == nil || IsNil(o.ConnTimeout) { - return nil, false - } - return o.ConnTimeout, true -} - -// HasConnTimeout returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasConnTimeout() bool { - if o != nil && !IsNil(o.ConnTimeout) { - return true - } - - return false -} - -// SetConnTimeout gets a reference to the given int32 and assigns it to the ConnTimeout field. -func (o *DeployContractV1Request) SetConnTimeout(v int32) { - o.ConnTimeout = &v -} - -// GetSignaturePolicy returns the SignaturePolicy field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetSignaturePolicy() string { - if o == nil || IsNil(o.SignaturePolicy) { - var ret string - return ret - } - return *o.SignaturePolicy -} - -// GetSignaturePolicyOk returns a tuple with the SignaturePolicy field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetSignaturePolicyOk() (*string, bool) { - if o == nil || IsNil(o.SignaturePolicy) { - return nil, false - } - return o.SignaturePolicy, true -} - -// HasSignaturePolicy returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasSignaturePolicy() bool { - if o != nil && !IsNil(o.SignaturePolicy) { - return true - } - - return false -} - -// SetSignaturePolicy gets a reference to the given string and assigns it to the SignaturePolicy field. -func (o *DeployContractV1Request) SetSignaturePolicy(v string) { - o.SignaturePolicy = &v -} - -// GetCollectionsConfigFile returns the CollectionsConfigFile field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetCollectionsConfigFile() string { - if o == nil || IsNil(o.CollectionsConfigFile) { - var ret string - return ret - } - return *o.CollectionsConfigFile -} - -// GetCollectionsConfigFileOk returns a tuple with the CollectionsConfigFile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetCollectionsConfigFileOk() (*string, bool) { - if o == nil || IsNil(o.CollectionsConfigFile) { - return nil, false - } - return o.CollectionsConfigFile, true -} - -// HasCollectionsConfigFile returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasCollectionsConfigFile() bool { - if o != nil && !IsNil(o.CollectionsConfigFile) { - return true - } - - return false -} - -// SetCollectionsConfigFile gets a reference to the given string and assigns it to the CollectionsConfigFile field. -func (o *DeployContractV1Request) SetCollectionsConfigFile(v string) { - o.CollectionsConfigFile = &v -} - -// GetChannelId returns the ChannelId field value -func (o *DeployContractV1Request) GetChannelId() string { - if o == nil { - var ret string - return ret - } - - return o.ChannelId -} - -// GetChannelIdOk returns a tuple with the ChannelId field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetChannelIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChannelId, true -} - -// SetChannelId sets field value -func (o *DeployContractV1Request) SetChannelId(v string) { - o.ChannelId = v -} - -// GetTargetOrganizations returns the TargetOrganizations field value -func (o *DeployContractV1Request) GetTargetOrganizations() []DeploymentTargetOrganization { - if o == nil { - var ret []DeploymentTargetOrganization - return ret - } - - return o.TargetOrganizations -} - -// GetTargetOrganizationsOk returns a tuple with the TargetOrganizations field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetTargetOrganizationsOk() ([]DeploymentTargetOrganization, bool) { - if o == nil { - return nil, false - } - return o.TargetOrganizations, true -} - -// SetTargetOrganizations sets field value -func (o *DeployContractV1Request) SetTargetOrganizations(v []DeploymentTargetOrganization) { - o.TargetOrganizations = v -} - -// GetConstructorArgs returns the ConstructorArgs field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetConstructorArgs() DeployContractGoSourceV1RequestConstructorArgs { - if o == nil || IsNil(o.ConstructorArgs) { - var ret DeployContractGoSourceV1RequestConstructorArgs - return ret - } - return *o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetConstructorArgsOk() (*DeployContractGoSourceV1RequestConstructorArgs, bool) { - if o == nil || IsNil(o.ConstructorArgs) { - return nil, false - } - return o.ConstructorArgs, true -} - -// HasConstructorArgs returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasConstructorArgs() bool { - if o != nil && !IsNil(o.ConstructorArgs) { - return true - } - - return false -} - -// SetConstructorArgs gets a reference to the given DeployContractGoSourceV1RequestConstructorArgs and assigns it to the ConstructorArgs field. -func (o *DeployContractV1Request) SetConstructorArgs(v DeployContractGoSourceV1RequestConstructorArgs) { - o.ConstructorArgs = &v -} - -// GetCcSequence returns the CcSequence field value -func (o *DeployContractV1Request) GetCcSequence() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.CcSequence -} - -// GetCcSequenceOk returns a tuple with the CcSequence field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetCcSequenceOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.CcSequence, true -} - -// SetCcSequence sets field value -func (o *DeployContractV1Request) SetCcSequence(v float32) { - o.CcSequence = v -} - -// GetCcVersion returns the CcVersion field value -func (o *DeployContractV1Request) GetCcVersion() string { - if o == nil { - var ret string - return ret - } - - return o.CcVersion -} - -// GetCcVersionOk returns a tuple with the CcVersion field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetCcVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CcVersion, true -} - -// SetCcVersion sets field value -func (o *DeployContractV1Request) SetCcVersion(v string) { - o.CcVersion = v -} - -// GetCcName returns the CcName field value -func (o *DeployContractV1Request) GetCcName() string { - if o == nil { - var ret string - return ret - } - - return o.CcName -} - -// GetCcNameOk returns a tuple with the CcName field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetCcNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CcName, true -} - -// SetCcName sets field value -func (o *DeployContractV1Request) SetCcName(v string) { - o.CcName = v -} - -// GetCcLabel returns the CcLabel field value -func (o *DeployContractV1Request) GetCcLabel() string { - if o == nil { - var ret string - return ret - } - - return o.CcLabel -} - -// GetCcLabelOk returns a tuple with the CcLabel field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetCcLabelOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CcLabel, true -} - -// SetCcLabel sets field value -func (o *DeployContractV1Request) SetCcLabel(v string) { - o.CcLabel = v -} - -// GetSourceFiles returns the SourceFiles field value -func (o *DeployContractV1Request) GetSourceFiles() []FileBase64 { - if o == nil { - var ret []FileBase64 - return ret - } - - return o.SourceFiles -} - -// GetSourceFilesOk returns a tuple with the SourceFiles field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetSourceFilesOk() ([]FileBase64, bool) { - if o == nil { - return nil, false - } - return o.SourceFiles, true -} - -// SetSourceFiles sets field value -func (o *DeployContractV1Request) SetSourceFiles(v []FileBase64) { - o.SourceFiles = v -} - -func (o DeployContractV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["ccLang"] = o.CcLang - toSerialize["caFile"] = o.CaFile - toSerialize["orderer"] = o.Orderer - toSerialize["ordererTLSHostnameOverride"] = o.OrdererTLSHostnameOverride - if !IsNil(o.ConnTimeout) { - toSerialize["connTimeout"] = o.ConnTimeout - } - if !IsNil(o.SignaturePolicy) { - toSerialize["signaturePolicy"] = o.SignaturePolicy - } - if !IsNil(o.CollectionsConfigFile) { - toSerialize["collectionsConfigFile"] = o.CollectionsConfigFile - } - toSerialize["channelId"] = o.ChannelId - toSerialize["targetOrganizations"] = o.TargetOrganizations - if !IsNil(o.ConstructorArgs) { - toSerialize["constructorArgs"] = o.ConstructorArgs - } - toSerialize["ccSequence"] = o.CcSequence - toSerialize["ccVersion"] = o.CcVersion - toSerialize["ccName"] = o.CcName - toSerialize["ccLabel"] = o.CcLabel - toSerialize["sourceFiles"] = o.SourceFiles - return toSerialize, nil -} - -type NullableDeployContractV1Request struct { - value *DeployContractV1Request - isSet bool -} - -func (v NullableDeployContractV1Request) Get() *DeployContractV1Request { - return v.value -} - -func (v *NullableDeployContractV1Request) Set(val *DeployContractV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractV1Request(val *DeployContractV1Request) *NullableDeployContractV1Request { - return &NullableDeployContractV1Request{value: val, isSet: true} -} - -func (v NullableDeployContractV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_response.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_response.go deleted file mode 100644 index da8396c88e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_response.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the DeployContractV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractV1Response{} - -// DeployContractV1Response struct for DeployContractV1Response -type DeployContractV1Response struct { - Success bool `json:"success"` - PackageIds []string `json:"packageIds"` - Lifecycle ChainCodeLifeCycleCommandResponses `json:"lifecycle"` -} - -// NewDeployContractV1Response instantiates a new DeployContractV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractV1Response(success bool, packageIds []string, lifecycle ChainCodeLifeCycleCommandResponses) *DeployContractV1Response { - this := DeployContractV1Response{} - this.Success = success - this.PackageIds = packageIds - this.Lifecycle = lifecycle - return &this -} - -// NewDeployContractV1ResponseWithDefaults instantiates a new DeployContractV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractV1ResponseWithDefaults() *DeployContractV1Response { - this := DeployContractV1Response{} - return &this -} - -// GetSuccess returns the Success field value -func (o *DeployContractV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *DeployContractV1Response) SetSuccess(v bool) { - o.Success = v -} - -// GetPackageIds returns the PackageIds field value -func (o *DeployContractV1Response) GetPackageIds() []string { - if o == nil { - var ret []string - return ret - } - - return o.PackageIds -} - -// GetPackageIdsOk returns a tuple with the PackageIds field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Response) GetPackageIdsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.PackageIds, true -} - -// SetPackageIds sets field value -func (o *DeployContractV1Response) SetPackageIds(v []string) { - o.PackageIds = v -} - -// GetLifecycle returns the Lifecycle field value -func (o *DeployContractV1Response) GetLifecycle() ChainCodeLifeCycleCommandResponses { - if o == nil { - var ret ChainCodeLifeCycleCommandResponses - return ret - } - - return o.Lifecycle -} - -// GetLifecycleOk returns a tuple with the Lifecycle field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Response) GetLifecycleOk() (*ChainCodeLifeCycleCommandResponses, bool) { - if o == nil { - return nil, false - } - return &o.Lifecycle, true -} - -// SetLifecycle sets field value -func (o *DeployContractV1Response) SetLifecycle(v ChainCodeLifeCycleCommandResponses) { - o.Lifecycle = v -} - -func (o DeployContractV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["success"] = o.Success - toSerialize["packageIds"] = o.PackageIds - toSerialize["lifecycle"] = o.Lifecycle - return toSerialize, nil -} - -type NullableDeployContractV1Response struct { - value *DeployContractV1Response - isSet bool -} - -func (v NullableDeployContractV1Response) Get() *DeployContractV1Response { - return v.value -} - -func (v *NullableDeployContractV1Response) Set(val *DeployContractV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractV1Response(val *DeployContractV1Response) *NullableDeployContractV1Response { - return &NullableDeployContractV1Response{value: val, isSet: true} -} - -func (v NullableDeployContractV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deployment_target_org_fabric2x.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deployment_target_org_fabric2x.go deleted file mode 100644 index 08606d8417..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deployment_target_org_fabric2x.go +++ /dev/null @@ -1,267 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the DeploymentTargetOrgFabric2x type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeploymentTargetOrgFabric2x{} - -// DeploymentTargetOrgFabric2x struct for DeploymentTargetOrgFabric2x -type DeploymentTargetOrgFabric2x struct { - // Transient map of arguments in JSON encoding - Transient *string `json:"transient,omitempty"` - // Mapped to environment variables of the Fabric CLI container. - CORE_PEER_LOCALMSPID string `json:"CORE_PEER_LOCALMSPID"` - // Mapped to environment variables of the Fabric CLI container. - CORE_PEER_ADDRESS string `json:"CORE_PEER_ADDRESS"` - // Mapped to environment variables of the Fabric CLI container. - CORE_PEER_MSPCONFIGPATH string `json:"CORE_PEER_MSPCONFIGPATH"` - // Mapped to environment variables of the Fabric CLI container. - CORE_PEER_TLS_ROOTCERT_FILE string `json:"CORE_PEER_TLS_ROOTCERT_FILE"` - // Mapped to environment variables of the Fabric CLI container. - ORDERER_TLS_ROOTCERT_FILE string `json:"ORDERER_TLS_ROOTCERT_FILE"` -} - -// NewDeploymentTargetOrgFabric2x instantiates a new DeploymentTargetOrgFabric2x object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeploymentTargetOrgFabric2x(cOREPEERLOCALMSPID string, cOREPEERADDRESS string, cOREPEERMSPCONFIGPATH string, cOREPEERTLSROOTCERTFILE string, oRDERERTLSROOTCERTFILE string) *DeploymentTargetOrgFabric2x { - this := DeploymentTargetOrgFabric2x{} - this.CORE_PEER_LOCALMSPID = cOREPEERLOCALMSPID - this.CORE_PEER_ADDRESS = cOREPEERADDRESS - this.CORE_PEER_MSPCONFIGPATH = cOREPEERMSPCONFIGPATH - this.CORE_PEER_TLS_ROOTCERT_FILE = cOREPEERTLSROOTCERTFILE - this.ORDERER_TLS_ROOTCERT_FILE = oRDERERTLSROOTCERTFILE - return &this -} - -// NewDeploymentTargetOrgFabric2xWithDefaults instantiates a new DeploymentTargetOrgFabric2x object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeploymentTargetOrgFabric2xWithDefaults() *DeploymentTargetOrgFabric2x { - this := DeploymentTargetOrgFabric2x{} - return &this -} - -// GetTransient returns the Transient field value if set, zero value otherwise. -func (o *DeploymentTargetOrgFabric2x) GetTransient() string { - if o == nil || IsNil(o.Transient) { - var ret string - return ret - } - return *o.Transient -} - -// GetTransientOk returns a tuple with the Transient field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrgFabric2x) GetTransientOk() (*string, bool) { - if o == nil || IsNil(o.Transient) { - return nil, false - } - return o.Transient, true -} - -// HasTransient returns a boolean if a field has been set. -func (o *DeploymentTargetOrgFabric2x) HasTransient() bool { - if o != nil && !IsNil(o.Transient) { - return true - } - - return false -} - -// SetTransient gets a reference to the given string and assigns it to the Transient field. -func (o *DeploymentTargetOrgFabric2x) SetTransient(v string) { - o.Transient = &v -} - -// GetCORE_PEER_LOCALMSPID returns the CORE_PEER_LOCALMSPID field value -func (o *DeploymentTargetOrgFabric2x) GetCORE_PEER_LOCALMSPID() string { - if o == nil { - var ret string - return ret - } - - return o.CORE_PEER_LOCALMSPID -} - -// GetCORE_PEER_LOCALMSPIDOk returns a tuple with the CORE_PEER_LOCALMSPID field value -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrgFabric2x) GetCORE_PEER_LOCALMSPIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CORE_PEER_LOCALMSPID, true -} - -// SetCORE_PEER_LOCALMSPID sets field value -func (o *DeploymentTargetOrgFabric2x) SetCORE_PEER_LOCALMSPID(v string) { - o.CORE_PEER_LOCALMSPID = v -} - -// GetCORE_PEER_ADDRESS returns the CORE_PEER_ADDRESS field value -func (o *DeploymentTargetOrgFabric2x) GetCORE_PEER_ADDRESS() string { - if o == nil { - var ret string - return ret - } - - return o.CORE_PEER_ADDRESS -} - -// GetCORE_PEER_ADDRESSOk returns a tuple with the CORE_PEER_ADDRESS field value -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrgFabric2x) GetCORE_PEER_ADDRESSOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CORE_PEER_ADDRESS, true -} - -// SetCORE_PEER_ADDRESS sets field value -func (o *DeploymentTargetOrgFabric2x) SetCORE_PEER_ADDRESS(v string) { - o.CORE_PEER_ADDRESS = v -} - -// GetCORE_PEER_MSPCONFIGPATH returns the CORE_PEER_MSPCONFIGPATH field value -func (o *DeploymentTargetOrgFabric2x) GetCORE_PEER_MSPCONFIGPATH() string { - if o == nil { - var ret string - return ret - } - - return o.CORE_PEER_MSPCONFIGPATH -} - -// GetCORE_PEER_MSPCONFIGPATHOk returns a tuple with the CORE_PEER_MSPCONFIGPATH field value -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrgFabric2x) GetCORE_PEER_MSPCONFIGPATHOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CORE_PEER_MSPCONFIGPATH, true -} - -// SetCORE_PEER_MSPCONFIGPATH sets field value -func (o *DeploymentTargetOrgFabric2x) SetCORE_PEER_MSPCONFIGPATH(v string) { - o.CORE_PEER_MSPCONFIGPATH = v -} - -// GetCORE_PEER_TLS_ROOTCERT_FILE returns the CORE_PEER_TLS_ROOTCERT_FILE field value -func (o *DeploymentTargetOrgFabric2x) GetCORE_PEER_TLS_ROOTCERT_FILE() string { - if o == nil { - var ret string - return ret - } - - return o.CORE_PEER_TLS_ROOTCERT_FILE -} - -// GetCORE_PEER_TLS_ROOTCERT_FILEOk returns a tuple with the CORE_PEER_TLS_ROOTCERT_FILE field value -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrgFabric2x) GetCORE_PEER_TLS_ROOTCERT_FILEOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CORE_PEER_TLS_ROOTCERT_FILE, true -} - -// SetCORE_PEER_TLS_ROOTCERT_FILE sets field value -func (o *DeploymentTargetOrgFabric2x) SetCORE_PEER_TLS_ROOTCERT_FILE(v string) { - o.CORE_PEER_TLS_ROOTCERT_FILE = v -} - -// GetORDERER_TLS_ROOTCERT_FILE returns the ORDERER_TLS_ROOTCERT_FILE field value -func (o *DeploymentTargetOrgFabric2x) GetORDERER_TLS_ROOTCERT_FILE() string { - if o == nil { - var ret string - return ret - } - - return o.ORDERER_TLS_ROOTCERT_FILE -} - -// GetORDERER_TLS_ROOTCERT_FILEOk returns a tuple with the ORDERER_TLS_ROOTCERT_FILE field value -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrgFabric2x) GetORDERER_TLS_ROOTCERT_FILEOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ORDERER_TLS_ROOTCERT_FILE, true -} - -// SetORDERER_TLS_ROOTCERT_FILE sets field value -func (o *DeploymentTargetOrgFabric2x) SetORDERER_TLS_ROOTCERT_FILE(v string) { - o.ORDERER_TLS_ROOTCERT_FILE = v -} - -func (o DeploymentTargetOrgFabric2x) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeploymentTargetOrgFabric2x) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Transient) { - toSerialize["transient"] = o.Transient - } - toSerialize["CORE_PEER_LOCALMSPID"] = o.CORE_PEER_LOCALMSPID - toSerialize["CORE_PEER_ADDRESS"] = o.CORE_PEER_ADDRESS - toSerialize["CORE_PEER_MSPCONFIGPATH"] = o.CORE_PEER_MSPCONFIGPATH - toSerialize["CORE_PEER_TLS_ROOTCERT_FILE"] = o.CORE_PEER_TLS_ROOTCERT_FILE - toSerialize["ORDERER_TLS_ROOTCERT_FILE"] = o.ORDERER_TLS_ROOTCERT_FILE - return toSerialize, nil -} - -type NullableDeploymentTargetOrgFabric2x struct { - value *DeploymentTargetOrgFabric2x - isSet bool -} - -func (v NullableDeploymentTargetOrgFabric2x) Get() *DeploymentTargetOrgFabric2x { - return v.value -} - -func (v *NullableDeploymentTargetOrgFabric2x) Set(val *DeploymentTargetOrgFabric2x) { - v.value = val - v.isSet = true -} - -func (v NullableDeploymentTargetOrgFabric2x) IsSet() bool { - return v.isSet -} - -func (v *NullableDeploymentTargetOrgFabric2x) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeploymentTargetOrgFabric2x(val *DeploymentTargetOrgFabric2x) *NullableDeploymentTargetOrgFabric2x { - return &NullableDeploymentTargetOrgFabric2x{value: val, isSet: true} -} - -func (v NullableDeploymentTargetOrgFabric2x) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeploymentTargetOrgFabric2x) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deployment_target_organization.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deployment_target_organization.go deleted file mode 100644 index e193d1cfa8..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_deployment_target_organization.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the DeploymentTargetOrganization type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeploymentTargetOrganization{} - -// DeploymentTargetOrganization struct for DeploymentTargetOrganization -type DeploymentTargetOrganization struct { - // Mapped to environment variables of the Fabric CLI container. - CORE_PEER_LOCALMSPID string `json:"CORE_PEER_LOCALMSPID"` - // Mapped to environment variables of the Fabric CLI container. - CORE_PEER_ADDRESS string `json:"CORE_PEER_ADDRESS"` - // Mapped to environment variables of the Fabric CLI container. - CORE_PEER_MSPCONFIGPATH string `json:"CORE_PEER_MSPCONFIGPATH"` - // Mapped to environment variables of the Fabric CLI container. - CORE_PEER_TLS_ROOTCERT_FILE string `json:"CORE_PEER_TLS_ROOTCERT_FILE"` - // Mapped to environment variables of the Fabric CLI container. - ORDERER_TLS_ROOTCERT_FILE string `json:"ORDERER_TLS_ROOTCERT_FILE"` -} - -// NewDeploymentTargetOrganization instantiates a new DeploymentTargetOrganization object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeploymentTargetOrganization(cOREPEERLOCALMSPID string, cOREPEERADDRESS string, cOREPEERMSPCONFIGPATH string, cOREPEERTLSROOTCERTFILE string, oRDERERTLSROOTCERTFILE string) *DeploymentTargetOrganization { - this := DeploymentTargetOrganization{} - this.CORE_PEER_LOCALMSPID = cOREPEERLOCALMSPID - this.CORE_PEER_ADDRESS = cOREPEERADDRESS - this.CORE_PEER_MSPCONFIGPATH = cOREPEERMSPCONFIGPATH - this.CORE_PEER_TLS_ROOTCERT_FILE = cOREPEERTLSROOTCERTFILE - this.ORDERER_TLS_ROOTCERT_FILE = oRDERERTLSROOTCERTFILE - return &this -} - -// NewDeploymentTargetOrganizationWithDefaults instantiates a new DeploymentTargetOrganization object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeploymentTargetOrganizationWithDefaults() *DeploymentTargetOrganization { - this := DeploymentTargetOrganization{} - return &this -} - -// GetCORE_PEER_LOCALMSPID returns the CORE_PEER_LOCALMSPID field value -func (o *DeploymentTargetOrganization) GetCORE_PEER_LOCALMSPID() string { - if o == nil { - var ret string - return ret - } - - return o.CORE_PEER_LOCALMSPID -} - -// GetCORE_PEER_LOCALMSPIDOk returns a tuple with the CORE_PEER_LOCALMSPID field value -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrganization) GetCORE_PEER_LOCALMSPIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CORE_PEER_LOCALMSPID, true -} - -// SetCORE_PEER_LOCALMSPID sets field value -func (o *DeploymentTargetOrganization) SetCORE_PEER_LOCALMSPID(v string) { - o.CORE_PEER_LOCALMSPID = v -} - -// GetCORE_PEER_ADDRESS returns the CORE_PEER_ADDRESS field value -func (o *DeploymentTargetOrganization) GetCORE_PEER_ADDRESS() string { - if o == nil { - var ret string - return ret - } - - return o.CORE_PEER_ADDRESS -} - -// GetCORE_PEER_ADDRESSOk returns a tuple with the CORE_PEER_ADDRESS field value -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrganization) GetCORE_PEER_ADDRESSOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CORE_PEER_ADDRESS, true -} - -// SetCORE_PEER_ADDRESS sets field value -func (o *DeploymentTargetOrganization) SetCORE_PEER_ADDRESS(v string) { - o.CORE_PEER_ADDRESS = v -} - -// GetCORE_PEER_MSPCONFIGPATH returns the CORE_PEER_MSPCONFIGPATH field value -func (o *DeploymentTargetOrganization) GetCORE_PEER_MSPCONFIGPATH() string { - if o == nil { - var ret string - return ret - } - - return o.CORE_PEER_MSPCONFIGPATH -} - -// GetCORE_PEER_MSPCONFIGPATHOk returns a tuple with the CORE_PEER_MSPCONFIGPATH field value -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrganization) GetCORE_PEER_MSPCONFIGPATHOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CORE_PEER_MSPCONFIGPATH, true -} - -// SetCORE_PEER_MSPCONFIGPATH sets field value -func (o *DeploymentTargetOrganization) SetCORE_PEER_MSPCONFIGPATH(v string) { - o.CORE_PEER_MSPCONFIGPATH = v -} - -// GetCORE_PEER_TLS_ROOTCERT_FILE returns the CORE_PEER_TLS_ROOTCERT_FILE field value -func (o *DeploymentTargetOrganization) GetCORE_PEER_TLS_ROOTCERT_FILE() string { - if o == nil { - var ret string - return ret - } - - return o.CORE_PEER_TLS_ROOTCERT_FILE -} - -// GetCORE_PEER_TLS_ROOTCERT_FILEOk returns a tuple with the CORE_PEER_TLS_ROOTCERT_FILE field value -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrganization) GetCORE_PEER_TLS_ROOTCERT_FILEOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CORE_PEER_TLS_ROOTCERT_FILE, true -} - -// SetCORE_PEER_TLS_ROOTCERT_FILE sets field value -func (o *DeploymentTargetOrganization) SetCORE_PEER_TLS_ROOTCERT_FILE(v string) { - o.CORE_PEER_TLS_ROOTCERT_FILE = v -} - -// GetORDERER_TLS_ROOTCERT_FILE returns the ORDERER_TLS_ROOTCERT_FILE field value -func (o *DeploymentTargetOrganization) GetORDERER_TLS_ROOTCERT_FILE() string { - if o == nil { - var ret string - return ret - } - - return o.ORDERER_TLS_ROOTCERT_FILE -} - -// GetORDERER_TLS_ROOTCERT_FILEOk returns a tuple with the ORDERER_TLS_ROOTCERT_FILE field value -// and a boolean to check if the value has been set. -func (o *DeploymentTargetOrganization) GetORDERER_TLS_ROOTCERT_FILEOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ORDERER_TLS_ROOTCERT_FILE, true -} - -// SetORDERER_TLS_ROOTCERT_FILE sets field value -func (o *DeploymentTargetOrganization) SetORDERER_TLS_ROOTCERT_FILE(v string) { - o.ORDERER_TLS_ROOTCERT_FILE = v -} - -func (o DeploymentTargetOrganization) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeploymentTargetOrganization) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["CORE_PEER_LOCALMSPID"] = o.CORE_PEER_LOCALMSPID - toSerialize["CORE_PEER_ADDRESS"] = o.CORE_PEER_ADDRESS - toSerialize["CORE_PEER_MSPCONFIGPATH"] = o.CORE_PEER_MSPCONFIGPATH - toSerialize["CORE_PEER_TLS_ROOTCERT_FILE"] = o.CORE_PEER_TLS_ROOTCERT_FILE - toSerialize["ORDERER_TLS_ROOTCERT_FILE"] = o.ORDERER_TLS_ROOTCERT_FILE - return toSerialize, nil -} - -type NullableDeploymentTargetOrganization struct { - value *DeploymentTargetOrganization - isSet bool -} - -func (v NullableDeploymentTargetOrganization) Get() *DeploymentTargetOrganization { - return v.value -} - -func (v *NullableDeploymentTargetOrganization) Set(val *DeploymentTargetOrganization) { - v.value = val - v.isSet = true -} - -func (v NullableDeploymentTargetOrganization) IsSet() bool { - return v.isSet -} - -func (v *NullableDeploymentTargetOrganization) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeploymentTargetOrganization(val *DeploymentTargetOrganization) *NullableDeploymentTargetOrganization { - return &NullableDeploymentTargetOrganization{value: val, isSet: true} -} - -func (v NullableDeploymentTargetOrganization) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeploymentTargetOrganization) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go deleted file mode 100644 index 613a346aa4..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the ErrorExceptionResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorExceptionResponseV1{} - -// ErrorExceptionResponseV1 struct for ErrorExceptionResponseV1 -type ErrorExceptionResponseV1 struct { - Message string `json:"message"` - Error string `json:"error"` -} - -// NewErrorExceptionResponseV1 instantiates a new ErrorExceptionResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorExceptionResponseV1(message string, error_ string) *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - this.Message = message - this.Error = error_ - return &this -} - -// NewErrorExceptionResponseV1WithDefaults instantiates a new ErrorExceptionResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorExceptionResponseV1WithDefaults() *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - return &this -} - -// GetMessage returns the Message field value -func (o *ErrorExceptionResponseV1) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ErrorExceptionResponseV1) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -func (o *ErrorExceptionResponseV1) GetError() string { - if o == nil { - var ret string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ErrorExceptionResponseV1) SetError(v string) { - o.Error = v -} - -func (o ErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorExceptionResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error - return toSerialize, nil -} - -type NullableErrorExceptionResponseV1 struct { - value *ErrorExceptionResponseV1 - isSet bool -} - -func (v NullableErrorExceptionResponseV1) Get() *ErrorExceptionResponseV1 { - return v.value -} - -func (v *NullableErrorExceptionResponseV1) Set(val *ErrorExceptionResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableErrorExceptionResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorExceptionResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorExceptionResponseV1(val *ErrorExceptionResponseV1) *NullableErrorExceptionResponseV1 { - return &NullableErrorExceptionResponseV1{value: val, isSet: true} -} - -func (v NullableErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorExceptionResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_certificate_identity_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_certificate_identity_v1.go deleted file mode 100644 index 93ba43f152..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_certificate_identity_v1.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the FabricCertificateIdentityV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FabricCertificateIdentityV1{} - -// FabricCertificateIdentityV1 Combination of certificate and it's MSP ID used to identify fabric actors. -type FabricCertificateIdentityV1 struct { - Mspid string `json:"mspid"` - Cert FabricX509CertificateV1 `json:"cert"` -} - -// NewFabricCertificateIdentityV1 instantiates a new FabricCertificateIdentityV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFabricCertificateIdentityV1(mspid string, cert FabricX509CertificateV1) *FabricCertificateIdentityV1 { - this := FabricCertificateIdentityV1{} - this.Mspid = mspid - this.Cert = cert - return &this -} - -// NewFabricCertificateIdentityV1WithDefaults instantiates a new FabricCertificateIdentityV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFabricCertificateIdentityV1WithDefaults() *FabricCertificateIdentityV1 { - this := FabricCertificateIdentityV1{} - return &this -} - -// GetMspid returns the Mspid field value -func (o *FabricCertificateIdentityV1) GetMspid() string { - if o == nil { - var ret string - return ret - } - - return o.Mspid -} - -// GetMspidOk returns a tuple with the Mspid field value -// and a boolean to check if the value has been set. -func (o *FabricCertificateIdentityV1) GetMspidOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Mspid, true -} - -// SetMspid sets field value -func (o *FabricCertificateIdentityV1) SetMspid(v string) { - o.Mspid = v -} - -// GetCert returns the Cert field value -func (o *FabricCertificateIdentityV1) GetCert() FabricX509CertificateV1 { - if o == nil { - var ret FabricX509CertificateV1 - return ret - } - - return o.Cert -} - -// GetCertOk returns a tuple with the Cert field value -// and a boolean to check if the value has been set. -func (o *FabricCertificateIdentityV1) GetCertOk() (*FabricX509CertificateV1, bool) { - if o == nil { - return nil, false - } - return &o.Cert, true -} - -// SetCert sets field value -func (o *FabricCertificateIdentityV1) SetCert(v FabricX509CertificateV1) { - o.Cert = v -} - -func (o FabricCertificateIdentityV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FabricCertificateIdentityV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["mspid"] = o.Mspid - toSerialize["cert"] = o.Cert - return toSerialize, nil -} - -type NullableFabricCertificateIdentityV1 struct { - value *FabricCertificateIdentityV1 - isSet bool -} - -func (v NullableFabricCertificateIdentityV1) Get() *FabricCertificateIdentityV1 { - return v.value -} - -func (v *NullableFabricCertificateIdentityV1) Set(val *FabricCertificateIdentityV1) { - v.value = val - v.isSet = true -} - -func (v NullableFabricCertificateIdentityV1) IsSet() bool { - return v.isSet -} - -func (v *NullableFabricCertificateIdentityV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFabricCertificateIdentityV1(val *FabricCertificateIdentityV1) *NullableFabricCertificateIdentityV1 { - return &NullableFabricCertificateIdentityV1{value: val, isSet: true} -} - -func (v NullableFabricCertificateIdentityV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFabricCertificateIdentityV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_contract_invocation_type.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_contract_invocation_type.go deleted file mode 100644 index ac8a13206c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_contract_invocation_type.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// FabricContractInvocationType the model 'FabricContractInvocationType' -type FabricContractInvocationType string - -// List of FabricContractInvocationType -const ( - SEND FabricContractInvocationType = "FabricContractInvocationType.SEND" - CALL FabricContractInvocationType = "FabricContractInvocationType.CALL" - SENDPRIVATE FabricContractInvocationType = "FabricContractInvocationType.SENDPRIVATE" -) - -// All allowed values of FabricContractInvocationType enum -var AllowedFabricContractInvocationTypeEnumValues = []FabricContractInvocationType{ - "FabricContractInvocationType.SEND", - "FabricContractInvocationType.CALL", - "FabricContractInvocationType.SENDPRIVATE", -} - -func (v *FabricContractInvocationType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := FabricContractInvocationType(value) - for _, existing := range AllowedFabricContractInvocationTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid FabricContractInvocationType", value) -} - -// NewFabricContractInvocationTypeFromValue returns a pointer to a valid FabricContractInvocationType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewFabricContractInvocationTypeFromValue(v string) (*FabricContractInvocationType, error) { - ev := FabricContractInvocationType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for FabricContractInvocationType: valid values are %v", v, AllowedFabricContractInvocationTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v FabricContractInvocationType) IsValid() bool { - for _, existing := range AllowedFabricContractInvocationTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to FabricContractInvocationType value -func (v FabricContractInvocationType) Ptr() *FabricContractInvocationType { - return &v -} - -type NullableFabricContractInvocationType struct { - value *FabricContractInvocationType - isSet bool -} - -func (v NullableFabricContractInvocationType) Get() *FabricContractInvocationType { - return v.value -} - -func (v *NullableFabricContractInvocationType) Set(val *FabricContractInvocationType) { - v.value = val - v.isSet = true -} - -func (v NullableFabricContractInvocationType) IsSet() bool { - return v.isSet -} - -func (v *NullableFabricContractInvocationType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFabricContractInvocationType(val *FabricContractInvocationType) *NullableFabricContractInvocationType { - return &NullableFabricContractInvocationType{value: val, isSet: true} -} - -func (v NullableFabricContractInvocationType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFabricContractInvocationType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_signing_credential.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_signing_credential.go deleted file mode 100644 index 4d39ed5aa6..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_signing_credential.go +++ /dev/null @@ -1,252 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the FabricSigningCredential type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FabricSigningCredential{} - -// FabricSigningCredential struct for FabricSigningCredential -type FabricSigningCredential struct { - KeychainId string `json:"keychainId"` - KeychainRef string `json:"keychainRef"` - Type *FabricSigningCredentialType `json:"type,omitempty"` - VaultTransitKey *VaultTransitKey `json:"vaultTransitKey,omitempty"` - WebSocketKey *WebSocketKey `json:"webSocketKey,omitempty"` -} - -// NewFabricSigningCredential instantiates a new FabricSigningCredential object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFabricSigningCredential(keychainId string, keychainRef string) *FabricSigningCredential { - this := FabricSigningCredential{} - this.KeychainId = keychainId - this.KeychainRef = keychainRef - return &this -} - -// NewFabricSigningCredentialWithDefaults instantiates a new FabricSigningCredential object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFabricSigningCredentialWithDefaults() *FabricSigningCredential { - this := FabricSigningCredential{} - return &this -} - -// GetKeychainId returns the KeychainId field value -func (o *FabricSigningCredential) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *FabricSigningCredential) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *FabricSigningCredential) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetKeychainRef returns the KeychainRef field value -func (o *FabricSigningCredential) GetKeychainRef() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainRef -} - -// GetKeychainRefOk returns a tuple with the KeychainRef field value -// and a boolean to check if the value has been set. -func (o *FabricSigningCredential) GetKeychainRefOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainRef, true -} - -// SetKeychainRef sets field value -func (o *FabricSigningCredential) SetKeychainRef(v string) { - o.KeychainRef = v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *FabricSigningCredential) GetType() FabricSigningCredentialType { - if o == nil || IsNil(o.Type) { - var ret FabricSigningCredentialType - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FabricSigningCredential) GetTypeOk() (*FabricSigningCredentialType, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *FabricSigningCredential) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given FabricSigningCredentialType and assigns it to the Type field. -func (o *FabricSigningCredential) SetType(v FabricSigningCredentialType) { - o.Type = &v -} - -// GetVaultTransitKey returns the VaultTransitKey field value if set, zero value otherwise. -func (o *FabricSigningCredential) GetVaultTransitKey() VaultTransitKey { - if o == nil || IsNil(o.VaultTransitKey) { - var ret VaultTransitKey - return ret - } - return *o.VaultTransitKey -} - -// GetVaultTransitKeyOk returns a tuple with the VaultTransitKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FabricSigningCredential) GetVaultTransitKeyOk() (*VaultTransitKey, bool) { - if o == nil || IsNil(o.VaultTransitKey) { - return nil, false - } - return o.VaultTransitKey, true -} - -// HasVaultTransitKey returns a boolean if a field has been set. -func (o *FabricSigningCredential) HasVaultTransitKey() bool { - if o != nil && !IsNil(o.VaultTransitKey) { - return true - } - - return false -} - -// SetVaultTransitKey gets a reference to the given VaultTransitKey and assigns it to the VaultTransitKey field. -func (o *FabricSigningCredential) SetVaultTransitKey(v VaultTransitKey) { - o.VaultTransitKey = &v -} - -// GetWebSocketKey returns the WebSocketKey field value if set, zero value otherwise. -func (o *FabricSigningCredential) GetWebSocketKey() WebSocketKey { - if o == nil || IsNil(o.WebSocketKey) { - var ret WebSocketKey - return ret - } - return *o.WebSocketKey -} - -// GetWebSocketKeyOk returns a tuple with the WebSocketKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FabricSigningCredential) GetWebSocketKeyOk() (*WebSocketKey, bool) { - if o == nil || IsNil(o.WebSocketKey) { - return nil, false - } - return o.WebSocketKey, true -} - -// HasWebSocketKey returns a boolean if a field has been set. -func (o *FabricSigningCredential) HasWebSocketKey() bool { - if o != nil && !IsNil(o.WebSocketKey) { - return true - } - - return false -} - -// SetWebSocketKey gets a reference to the given WebSocketKey and assigns it to the WebSocketKey field. -func (o *FabricSigningCredential) SetWebSocketKey(v WebSocketKey) { - o.WebSocketKey = &v -} - -func (o FabricSigningCredential) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FabricSigningCredential) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["keychainId"] = o.KeychainId - toSerialize["keychainRef"] = o.KeychainRef - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !IsNil(o.VaultTransitKey) { - toSerialize["vaultTransitKey"] = o.VaultTransitKey - } - if !IsNil(o.WebSocketKey) { - toSerialize["webSocketKey"] = o.WebSocketKey - } - return toSerialize, nil -} - -type NullableFabricSigningCredential struct { - value *FabricSigningCredential - isSet bool -} - -func (v NullableFabricSigningCredential) Get() *FabricSigningCredential { - return v.value -} - -func (v *NullableFabricSigningCredential) Set(val *FabricSigningCredential) { - v.value = val - v.isSet = true -} - -func (v NullableFabricSigningCredential) IsSet() bool { - return v.isSet -} - -func (v *NullableFabricSigningCredential) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFabricSigningCredential(val *FabricSigningCredential) *NullableFabricSigningCredential { - return &NullableFabricSigningCredential{value: val, isSet: true} -} - -func (v NullableFabricSigningCredential) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFabricSigningCredential) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_signing_credential_type.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_signing_credential_type.go deleted file mode 100644 index 95bdc1d348..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_signing_credential_type.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// FabricSigningCredentialType different type of identity provider for singing fabric messages supported by this package -type FabricSigningCredentialType string - -// List of FabricSigningCredentialType -const ( - X_509 FabricSigningCredentialType = "X.509" - VAULT_X_509 FabricSigningCredentialType = "Vault-X.509" - WS_X_509 FabricSigningCredentialType = "WS-X.509" -) - -// All allowed values of FabricSigningCredentialType enum -var AllowedFabricSigningCredentialTypeEnumValues = []FabricSigningCredentialType{ - "X.509", - "Vault-X.509", - "WS-X.509", -} - -func (v *FabricSigningCredentialType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := FabricSigningCredentialType(value) - for _, existing := range AllowedFabricSigningCredentialTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid FabricSigningCredentialType", value) -} - -// NewFabricSigningCredentialTypeFromValue returns a pointer to a valid FabricSigningCredentialType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewFabricSigningCredentialTypeFromValue(v string) (*FabricSigningCredentialType, error) { - ev := FabricSigningCredentialType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for FabricSigningCredentialType: valid values are %v", v, AllowedFabricSigningCredentialTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v FabricSigningCredentialType) IsValid() bool { - for _, existing := range AllowedFabricSigningCredentialTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to FabricSigningCredentialType value -func (v FabricSigningCredentialType) Ptr() *FabricSigningCredentialType { - return &v -} - -type NullableFabricSigningCredentialType struct { - value *FabricSigningCredentialType - isSet bool -} - -func (v NullableFabricSigningCredentialType) Get() *FabricSigningCredentialType { - return v.value -} - -func (v *NullableFabricSigningCredentialType) Set(val *FabricSigningCredentialType) { - v.value = val - v.isSet = true -} - -func (v NullableFabricSigningCredentialType) IsSet() bool { - return v.isSet -} - -func (v *NullableFabricSigningCredentialType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFabricSigningCredentialType(val *FabricSigningCredentialType) *NullableFabricSigningCredentialType { - return &NullableFabricSigningCredentialType{value: val, isSet: true} -} - -func (v NullableFabricSigningCredentialType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFabricSigningCredentialType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_x509_certificate_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_x509_certificate_v1.go deleted file mode 100644 index f23d35549e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_fabric_x509_certificate_v1.go +++ /dev/null @@ -1,279 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the FabricX509CertificateV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FabricX509CertificateV1{} - -// FabricX509CertificateV1 Transaction endorser certificate object -type FabricX509CertificateV1 struct { - Issuer string `json:"issuer"` - SerialNumber string `json:"serialNumber"` - Subject string `json:"subject"` - SubjectAltName string `json:"subjectAltName"` - ValidFrom string `json:"validFrom"` - ValidTo string `json:"validTo"` - Pem string `json:"pem"` -} - -// NewFabricX509CertificateV1 instantiates a new FabricX509CertificateV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFabricX509CertificateV1(issuer string, serialNumber string, subject string, subjectAltName string, validFrom string, validTo string, pem string) *FabricX509CertificateV1 { - this := FabricX509CertificateV1{} - this.Issuer = issuer - this.SerialNumber = serialNumber - this.Subject = subject - this.SubjectAltName = subjectAltName - this.ValidFrom = validFrom - this.ValidTo = validTo - this.Pem = pem - return &this -} - -// NewFabricX509CertificateV1WithDefaults instantiates a new FabricX509CertificateV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFabricX509CertificateV1WithDefaults() *FabricX509CertificateV1 { - this := FabricX509CertificateV1{} - return &this -} - -// GetIssuer returns the Issuer field value -func (o *FabricX509CertificateV1) GetIssuer() string { - if o == nil { - var ret string - return ret - } - - return o.Issuer -} - -// GetIssuerOk returns a tuple with the Issuer field value -// and a boolean to check if the value has been set. -func (o *FabricX509CertificateV1) GetIssuerOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Issuer, true -} - -// SetIssuer sets field value -func (o *FabricX509CertificateV1) SetIssuer(v string) { - o.Issuer = v -} - -// GetSerialNumber returns the SerialNumber field value -func (o *FabricX509CertificateV1) GetSerialNumber() string { - if o == nil { - var ret string - return ret - } - - return o.SerialNumber -} - -// GetSerialNumberOk returns a tuple with the SerialNumber field value -// and a boolean to check if the value has been set. -func (o *FabricX509CertificateV1) GetSerialNumberOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SerialNumber, true -} - -// SetSerialNumber sets field value -func (o *FabricX509CertificateV1) SetSerialNumber(v string) { - o.SerialNumber = v -} - -// GetSubject returns the Subject field value -func (o *FabricX509CertificateV1) GetSubject() string { - if o == nil { - var ret string - return ret - } - - return o.Subject -} - -// GetSubjectOk returns a tuple with the Subject field value -// and a boolean to check if the value has been set. -func (o *FabricX509CertificateV1) GetSubjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Subject, true -} - -// SetSubject sets field value -func (o *FabricX509CertificateV1) SetSubject(v string) { - o.Subject = v -} - -// GetSubjectAltName returns the SubjectAltName field value -func (o *FabricX509CertificateV1) GetSubjectAltName() string { - if o == nil { - var ret string - return ret - } - - return o.SubjectAltName -} - -// GetSubjectAltNameOk returns a tuple with the SubjectAltName field value -// and a boolean to check if the value has been set. -func (o *FabricX509CertificateV1) GetSubjectAltNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubjectAltName, true -} - -// SetSubjectAltName sets field value -func (o *FabricX509CertificateV1) SetSubjectAltName(v string) { - o.SubjectAltName = v -} - -// GetValidFrom returns the ValidFrom field value -func (o *FabricX509CertificateV1) GetValidFrom() string { - if o == nil { - var ret string - return ret - } - - return o.ValidFrom -} - -// GetValidFromOk returns a tuple with the ValidFrom field value -// and a boolean to check if the value has been set. -func (o *FabricX509CertificateV1) GetValidFromOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ValidFrom, true -} - -// SetValidFrom sets field value -func (o *FabricX509CertificateV1) SetValidFrom(v string) { - o.ValidFrom = v -} - -// GetValidTo returns the ValidTo field value -func (o *FabricX509CertificateV1) GetValidTo() string { - if o == nil { - var ret string - return ret - } - - return o.ValidTo -} - -// GetValidToOk returns a tuple with the ValidTo field value -// and a boolean to check if the value has been set. -func (o *FabricX509CertificateV1) GetValidToOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ValidTo, true -} - -// SetValidTo sets field value -func (o *FabricX509CertificateV1) SetValidTo(v string) { - o.ValidTo = v -} - -// GetPem returns the Pem field value -func (o *FabricX509CertificateV1) GetPem() string { - if o == nil { - var ret string - return ret - } - - return o.Pem -} - -// GetPemOk returns a tuple with the Pem field value -// and a boolean to check if the value has been set. -func (o *FabricX509CertificateV1) GetPemOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Pem, true -} - -// SetPem sets field value -func (o *FabricX509CertificateV1) SetPem(v string) { - o.Pem = v -} - -func (o FabricX509CertificateV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FabricX509CertificateV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["issuer"] = o.Issuer - toSerialize["serialNumber"] = o.SerialNumber - toSerialize["subject"] = o.Subject - toSerialize["subjectAltName"] = o.SubjectAltName - toSerialize["validFrom"] = o.ValidFrom - toSerialize["validTo"] = o.ValidTo - toSerialize["pem"] = o.Pem - return toSerialize, nil -} - -type NullableFabricX509CertificateV1 struct { - value *FabricX509CertificateV1 - isSet bool -} - -func (v NullableFabricX509CertificateV1) Get() *FabricX509CertificateV1 { - return v.value -} - -func (v *NullableFabricX509CertificateV1) Set(val *FabricX509CertificateV1) { - v.value = val - v.isSet = true -} - -func (v NullableFabricX509CertificateV1) IsSet() bool { - return v.isSet -} - -func (v *NullableFabricX509CertificateV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFabricX509CertificateV1(val *FabricX509CertificateV1) *NullableFabricX509CertificateV1 { - return &NullableFabricX509CertificateV1{value: val, isSet: true} -} - -func (v NullableFabricX509CertificateV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFabricX509CertificateV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_file_base64.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_file_base64.go deleted file mode 100644 index 2cb412df8d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_file_base64.go +++ /dev/null @@ -1,183 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the FileBase64 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FileBase64{} - -// FileBase64 Represents a file-system file that has a name and a body which holds the file contents as a Base64 encoded string -type FileBase64 struct { - // The file's contents encoded as a Base64 string. - Body string `json:"body"` - // The name as referred to on a file system - Filename string `json:"filename"` - // The relative path of the file, if it should be placed in a sub-directory - Filepath *string `json:"filepath,omitempty"` -} - -// NewFileBase64 instantiates a new FileBase64 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFileBase64(body string, filename string) *FileBase64 { - this := FileBase64{} - this.Body = body - this.Filename = filename - return &this -} - -// NewFileBase64WithDefaults instantiates a new FileBase64 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFileBase64WithDefaults() *FileBase64 { - this := FileBase64{} - return &this -} - -// GetBody returns the Body field value -func (o *FileBase64) GetBody() string { - if o == nil { - var ret string - return ret - } - - return o.Body -} - -// GetBodyOk returns a tuple with the Body field value -// and a boolean to check if the value has been set. -func (o *FileBase64) GetBodyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Body, true -} - -// SetBody sets field value -func (o *FileBase64) SetBody(v string) { - o.Body = v -} - -// GetFilename returns the Filename field value -func (o *FileBase64) GetFilename() string { - if o == nil { - var ret string - return ret - } - - return o.Filename -} - -// GetFilenameOk returns a tuple with the Filename field value -// and a boolean to check if the value has been set. -func (o *FileBase64) GetFilenameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Filename, true -} - -// SetFilename sets field value -func (o *FileBase64) SetFilename(v string) { - o.Filename = v -} - -// GetFilepath returns the Filepath field value if set, zero value otherwise. -func (o *FileBase64) GetFilepath() string { - if o == nil || IsNil(o.Filepath) { - var ret string - return ret - } - return *o.Filepath -} - -// GetFilepathOk returns a tuple with the Filepath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FileBase64) GetFilepathOk() (*string, bool) { - if o == nil || IsNil(o.Filepath) { - return nil, false - } - return o.Filepath, true -} - -// HasFilepath returns a boolean if a field has been set. -func (o *FileBase64) HasFilepath() bool { - if o != nil && !IsNil(o.Filepath) { - return true - } - - return false -} - -// SetFilepath gets a reference to the given string and assigns it to the Filepath field. -func (o *FileBase64) SetFilepath(v string) { - o.Filepath = &v -} - -func (o FileBase64) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FileBase64) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["body"] = o.Body - toSerialize["filename"] = o.Filename - if !IsNil(o.Filepath) { - toSerialize["filepath"] = o.Filepath - } - return toSerialize, nil -} - -type NullableFileBase64 struct { - value *FileBase64 - isSet bool -} - -func (v NullableFileBase64) Get() *FileBase64 { - return v.value -} - -func (v *NullableFileBase64) Set(val *FileBase64) { - v.value = val - v.isSet = true -} - -func (v NullableFileBase64) IsSet() bool { - return v.isSet -} - -func (v *NullableFileBase64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFileBase64(val *FileBase64) *NullableFileBase64 { - return &NullableFileBase64{value: val, isSet: true} -} - -func (v NullableFileBase64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFileBase64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_full_block_transaction_action_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_full_block_transaction_action_v1.go deleted file mode 100644 index 6119458028..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_full_block_transaction_action_v1.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the FullBlockTransactionActionV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FullBlockTransactionActionV1{} - -// FullBlockTransactionActionV1 Transaction action returned from fabric block. -type FullBlockTransactionActionV1 struct { - FunctionName string `json:"functionName"` - FunctionArgs []string `json:"functionArgs"` - ChaincodeId string `json:"chaincodeId"` - Creator FabricCertificateIdentityV1 `json:"creator"` - Endorsements []FullBlockTransactionEndorsementV1 `json:"endorsements"` -} - -// NewFullBlockTransactionActionV1 instantiates a new FullBlockTransactionActionV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFullBlockTransactionActionV1(functionName string, functionArgs []string, chaincodeId string, creator FabricCertificateIdentityV1, endorsements []FullBlockTransactionEndorsementV1) *FullBlockTransactionActionV1 { - this := FullBlockTransactionActionV1{} - this.FunctionName = functionName - this.FunctionArgs = functionArgs - this.ChaincodeId = chaincodeId - this.Creator = creator - this.Endorsements = endorsements - return &this -} - -// NewFullBlockTransactionActionV1WithDefaults instantiates a new FullBlockTransactionActionV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFullBlockTransactionActionV1WithDefaults() *FullBlockTransactionActionV1 { - this := FullBlockTransactionActionV1{} - return &this -} - -// GetFunctionName returns the FunctionName field value -func (o *FullBlockTransactionActionV1) GetFunctionName() string { - if o == nil { - var ret string - return ret - } - - return o.FunctionName -} - -// GetFunctionNameOk returns a tuple with the FunctionName field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionActionV1) GetFunctionNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FunctionName, true -} - -// SetFunctionName sets field value -func (o *FullBlockTransactionActionV1) SetFunctionName(v string) { - o.FunctionName = v -} - -// GetFunctionArgs returns the FunctionArgs field value -func (o *FullBlockTransactionActionV1) GetFunctionArgs() []string { - if o == nil { - var ret []string - return ret - } - - return o.FunctionArgs -} - -// GetFunctionArgsOk returns a tuple with the FunctionArgs field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionActionV1) GetFunctionArgsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.FunctionArgs, true -} - -// SetFunctionArgs sets field value -func (o *FullBlockTransactionActionV1) SetFunctionArgs(v []string) { - o.FunctionArgs = v -} - -// GetChaincodeId returns the ChaincodeId field value -func (o *FullBlockTransactionActionV1) GetChaincodeId() string { - if o == nil { - var ret string - return ret - } - - return o.ChaincodeId -} - -// GetChaincodeIdOk returns a tuple with the ChaincodeId field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionActionV1) GetChaincodeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChaincodeId, true -} - -// SetChaincodeId sets field value -func (o *FullBlockTransactionActionV1) SetChaincodeId(v string) { - o.ChaincodeId = v -} - -// GetCreator returns the Creator field value -func (o *FullBlockTransactionActionV1) GetCreator() FabricCertificateIdentityV1 { - if o == nil { - var ret FabricCertificateIdentityV1 - return ret - } - - return o.Creator -} - -// GetCreatorOk returns a tuple with the Creator field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionActionV1) GetCreatorOk() (*FabricCertificateIdentityV1, bool) { - if o == nil { - return nil, false - } - return &o.Creator, true -} - -// SetCreator sets field value -func (o *FullBlockTransactionActionV1) SetCreator(v FabricCertificateIdentityV1) { - o.Creator = v -} - -// GetEndorsements returns the Endorsements field value -func (o *FullBlockTransactionActionV1) GetEndorsements() []FullBlockTransactionEndorsementV1 { - if o == nil { - var ret []FullBlockTransactionEndorsementV1 - return ret - } - - return o.Endorsements -} - -// GetEndorsementsOk returns a tuple with the Endorsements field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionActionV1) GetEndorsementsOk() ([]FullBlockTransactionEndorsementV1, bool) { - if o == nil { - return nil, false - } - return o.Endorsements, true -} - -// SetEndorsements sets field value -func (o *FullBlockTransactionActionV1) SetEndorsements(v []FullBlockTransactionEndorsementV1) { - o.Endorsements = v -} - -func (o FullBlockTransactionActionV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FullBlockTransactionActionV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["functionName"] = o.FunctionName - toSerialize["functionArgs"] = o.FunctionArgs - toSerialize["chaincodeId"] = o.ChaincodeId - toSerialize["creator"] = o.Creator - toSerialize["endorsements"] = o.Endorsements - return toSerialize, nil -} - -type NullableFullBlockTransactionActionV1 struct { - value *FullBlockTransactionActionV1 - isSet bool -} - -func (v NullableFullBlockTransactionActionV1) Get() *FullBlockTransactionActionV1 { - return v.value -} - -func (v *NullableFullBlockTransactionActionV1) Set(val *FullBlockTransactionActionV1) { - v.value = val - v.isSet = true -} - -func (v NullableFullBlockTransactionActionV1) IsSet() bool { - return v.isSet -} - -func (v *NullableFullBlockTransactionActionV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFullBlockTransactionActionV1(val *FullBlockTransactionActionV1) *NullableFullBlockTransactionActionV1 { - return &NullableFullBlockTransactionActionV1{value: val, isSet: true} -} - -func (v NullableFullBlockTransactionActionV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFullBlockTransactionActionV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_full_block_transaction_endorsement_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_full_block_transaction_endorsement_v1.go deleted file mode 100644 index 394fe21984..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_full_block_transaction_endorsement_v1.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the FullBlockTransactionEndorsementV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FullBlockTransactionEndorsementV1{} - -// FullBlockTransactionEndorsementV1 Transaction endorsment object returned from fabric block. -type FullBlockTransactionEndorsementV1 struct { - Signer FabricCertificateIdentityV1 `json:"signer"` - Signature string `json:"signature"` -} - -// NewFullBlockTransactionEndorsementV1 instantiates a new FullBlockTransactionEndorsementV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFullBlockTransactionEndorsementV1(signer FabricCertificateIdentityV1, signature string) *FullBlockTransactionEndorsementV1 { - this := FullBlockTransactionEndorsementV1{} - this.Signer = signer - this.Signature = signature - return &this -} - -// NewFullBlockTransactionEndorsementV1WithDefaults instantiates a new FullBlockTransactionEndorsementV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFullBlockTransactionEndorsementV1WithDefaults() *FullBlockTransactionEndorsementV1 { - this := FullBlockTransactionEndorsementV1{} - return &this -} - -// GetSigner returns the Signer field value -func (o *FullBlockTransactionEndorsementV1) GetSigner() FabricCertificateIdentityV1 { - if o == nil { - var ret FabricCertificateIdentityV1 - return ret - } - - return o.Signer -} - -// GetSignerOk returns a tuple with the Signer field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionEndorsementV1) GetSignerOk() (*FabricCertificateIdentityV1, bool) { - if o == nil { - return nil, false - } - return &o.Signer, true -} - -// SetSigner sets field value -func (o *FullBlockTransactionEndorsementV1) SetSigner(v FabricCertificateIdentityV1) { - o.Signer = v -} - -// GetSignature returns the Signature field value -func (o *FullBlockTransactionEndorsementV1) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionEndorsementV1) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *FullBlockTransactionEndorsementV1) SetSignature(v string) { - o.Signature = v -} - -func (o FullBlockTransactionEndorsementV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FullBlockTransactionEndorsementV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["signer"] = o.Signer - toSerialize["signature"] = o.Signature - return toSerialize, nil -} - -type NullableFullBlockTransactionEndorsementV1 struct { - value *FullBlockTransactionEndorsementV1 - isSet bool -} - -func (v NullableFullBlockTransactionEndorsementV1) Get() *FullBlockTransactionEndorsementV1 { - return v.value -} - -func (v *NullableFullBlockTransactionEndorsementV1) Set(val *FullBlockTransactionEndorsementV1) { - v.value = val - v.isSet = true -} - -func (v NullableFullBlockTransactionEndorsementV1) IsSet() bool { - return v.isSet -} - -func (v *NullableFullBlockTransactionEndorsementV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFullBlockTransactionEndorsementV1(val *FullBlockTransactionEndorsementV1) *NullableFullBlockTransactionEndorsementV1 { - return &NullableFullBlockTransactionEndorsementV1{value: val, isSet: true} -} - -func (v NullableFullBlockTransactionEndorsementV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFullBlockTransactionEndorsementV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_full_block_transaction_event_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_full_block_transaction_event_v1.go deleted file mode 100644 index 0b0a0a6036..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_full_block_transaction_event_v1.go +++ /dev/null @@ -1,279 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the FullBlockTransactionEventV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FullBlockTransactionEventV1{} - -// FullBlockTransactionEventV1 Transaction returned from fabric block. -type FullBlockTransactionEventV1 struct { - Hash string `json:"hash"` - ChannelId string `json:"channelId"` - Timestamp string `json:"timestamp"` - ProtocolVersion float32 `json:"protocolVersion"` - TransactionType string `json:"transactionType"` - Epoch float32 `json:"epoch"` - Actions []FullBlockTransactionActionV1 `json:"actions"` -} - -// NewFullBlockTransactionEventV1 instantiates a new FullBlockTransactionEventV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFullBlockTransactionEventV1(hash string, channelId string, timestamp string, protocolVersion float32, transactionType string, epoch float32, actions []FullBlockTransactionActionV1) *FullBlockTransactionEventV1 { - this := FullBlockTransactionEventV1{} - this.Hash = hash - this.ChannelId = channelId - this.Timestamp = timestamp - this.ProtocolVersion = protocolVersion - this.TransactionType = transactionType - this.Epoch = epoch - this.Actions = actions - return &this -} - -// NewFullBlockTransactionEventV1WithDefaults instantiates a new FullBlockTransactionEventV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFullBlockTransactionEventV1WithDefaults() *FullBlockTransactionEventV1 { - this := FullBlockTransactionEventV1{} - return &this -} - -// GetHash returns the Hash field value -func (o *FullBlockTransactionEventV1) GetHash() string { - if o == nil { - var ret string - return ret - } - - return o.Hash -} - -// GetHashOk returns a tuple with the Hash field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionEventV1) GetHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Hash, true -} - -// SetHash sets field value -func (o *FullBlockTransactionEventV1) SetHash(v string) { - o.Hash = v -} - -// GetChannelId returns the ChannelId field value -func (o *FullBlockTransactionEventV1) GetChannelId() string { - if o == nil { - var ret string - return ret - } - - return o.ChannelId -} - -// GetChannelIdOk returns a tuple with the ChannelId field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionEventV1) GetChannelIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChannelId, true -} - -// SetChannelId sets field value -func (o *FullBlockTransactionEventV1) SetChannelId(v string) { - o.ChannelId = v -} - -// GetTimestamp returns the Timestamp field value -func (o *FullBlockTransactionEventV1) GetTimestamp() string { - if o == nil { - var ret string - return ret - } - - return o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionEventV1) GetTimestampOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Timestamp, true -} - -// SetTimestamp sets field value -func (o *FullBlockTransactionEventV1) SetTimestamp(v string) { - o.Timestamp = v -} - -// GetProtocolVersion returns the ProtocolVersion field value -func (o *FullBlockTransactionEventV1) GetProtocolVersion() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.ProtocolVersion -} - -// GetProtocolVersionOk returns a tuple with the ProtocolVersion field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionEventV1) GetProtocolVersionOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.ProtocolVersion, true -} - -// SetProtocolVersion sets field value -func (o *FullBlockTransactionEventV1) SetProtocolVersion(v float32) { - o.ProtocolVersion = v -} - -// GetTransactionType returns the TransactionType field value -func (o *FullBlockTransactionEventV1) GetTransactionType() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionType -} - -// GetTransactionTypeOk returns a tuple with the TransactionType field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionEventV1) GetTransactionTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionType, true -} - -// SetTransactionType sets field value -func (o *FullBlockTransactionEventV1) SetTransactionType(v string) { - o.TransactionType = v -} - -// GetEpoch returns the Epoch field value -func (o *FullBlockTransactionEventV1) GetEpoch() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Epoch -} - -// GetEpochOk returns a tuple with the Epoch field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionEventV1) GetEpochOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Epoch, true -} - -// SetEpoch sets field value -func (o *FullBlockTransactionEventV1) SetEpoch(v float32) { - o.Epoch = v -} - -// GetActions returns the Actions field value -func (o *FullBlockTransactionEventV1) GetActions() []FullBlockTransactionActionV1 { - if o == nil { - var ret []FullBlockTransactionActionV1 - return ret - } - - return o.Actions -} - -// GetActionsOk returns a tuple with the Actions field value -// and a boolean to check if the value has been set. -func (o *FullBlockTransactionEventV1) GetActionsOk() ([]FullBlockTransactionActionV1, bool) { - if o == nil { - return nil, false - } - return o.Actions, true -} - -// SetActions sets field value -func (o *FullBlockTransactionEventV1) SetActions(v []FullBlockTransactionActionV1) { - o.Actions = v -} - -func (o FullBlockTransactionEventV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FullBlockTransactionEventV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["hash"] = o.Hash - toSerialize["channelId"] = o.ChannelId - toSerialize["timestamp"] = o.Timestamp - toSerialize["protocolVersion"] = o.ProtocolVersion - toSerialize["transactionType"] = o.TransactionType - toSerialize["epoch"] = o.Epoch - toSerialize["actions"] = o.Actions - return toSerialize, nil -} - -type NullableFullBlockTransactionEventV1 struct { - value *FullBlockTransactionEventV1 - isSet bool -} - -func (v NullableFullBlockTransactionEventV1) Get() *FullBlockTransactionEventV1 { - return v.value -} - -func (v *NullableFullBlockTransactionEventV1) Set(val *FullBlockTransactionEventV1) { - v.value = val - v.isSet = true -} - -func (v NullableFullBlockTransactionEventV1) IsSet() bool { - return v.isSet -} - -func (v *NullableFullBlockTransactionEventV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFullBlockTransactionEventV1(val *FullBlockTransactionEventV1) *NullableFullBlockTransactionEventV1 { - return &NullableFullBlockTransactionEventV1{value: val, isSet: true} -} - -func (v NullableFullBlockTransactionEventV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFullBlockTransactionEventV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_discovery_options.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_discovery_options.go deleted file mode 100644 index 23e15029b8..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_discovery_options.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GatewayDiscoveryOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GatewayDiscoveryOptions{} - -// GatewayDiscoveryOptions struct for GatewayDiscoveryOptions -type GatewayDiscoveryOptions struct { - AsLocalhost *bool `json:"asLocalhost,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} - -// NewGatewayDiscoveryOptions instantiates a new GatewayDiscoveryOptions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGatewayDiscoveryOptions() *GatewayDiscoveryOptions { - this := GatewayDiscoveryOptions{} - return &this -} - -// NewGatewayDiscoveryOptionsWithDefaults instantiates a new GatewayDiscoveryOptions object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGatewayDiscoveryOptionsWithDefaults() *GatewayDiscoveryOptions { - this := GatewayDiscoveryOptions{} - return &this -} - -// GetAsLocalhost returns the AsLocalhost field value if set, zero value otherwise. -func (o *GatewayDiscoveryOptions) GetAsLocalhost() bool { - if o == nil || IsNil(o.AsLocalhost) { - var ret bool - return ret - } - return *o.AsLocalhost -} - -// GetAsLocalhostOk returns a tuple with the AsLocalhost field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayDiscoveryOptions) GetAsLocalhostOk() (*bool, bool) { - if o == nil || IsNil(o.AsLocalhost) { - return nil, false - } - return o.AsLocalhost, true -} - -// HasAsLocalhost returns a boolean if a field has been set. -func (o *GatewayDiscoveryOptions) HasAsLocalhost() bool { - if o != nil && !IsNil(o.AsLocalhost) { - return true - } - - return false -} - -// SetAsLocalhost gets a reference to the given bool and assigns it to the AsLocalhost field. -func (o *GatewayDiscoveryOptions) SetAsLocalhost(v bool) { - o.AsLocalhost = &v -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *GatewayDiscoveryOptions) GetEnabled() bool { - if o == nil || IsNil(o.Enabled) { - var ret bool - return ret - } - return *o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayDiscoveryOptions) GetEnabledOk() (*bool, bool) { - if o == nil || IsNil(o.Enabled) { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *GatewayDiscoveryOptions) HasEnabled() bool { - if o != nil && !IsNil(o.Enabled) { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *GatewayDiscoveryOptions) SetEnabled(v bool) { - o.Enabled = &v -} - -func (o GatewayDiscoveryOptions) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GatewayDiscoveryOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.AsLocalhost) { - toSerialize["asLocalhost"] = o.AsLocalhost - } - if !IsNil(o.Enabled) { - toSerialize["enabled"] = o.Enabled - } - return toSerialize, nil -} - -type NullableGatewayDiscoveryOptions struct { - value *GatewayDiscoveryOptions - isSet bool -} - -func (v NullableGatewayDiscoveryOptions) Get() *GatewayDiscoveryOptions { - return v.value -} - -func (v *NullableGatewayDiscoveryOptions) Set(val *GatewayDiscoveryOptions) { - v.value = val - v.isSet = true -} - -func (v NullableGatewayDiscoveryOptions) IsSet() bool { - return v.isSet -} - -func (v *NullableGatewayDiscoveryOptions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGatewayDiscoveryOptions(val *GatewayDiscoveryOptions) *NullableGatewayDiscoveryOptions { - return &NullableGatewayDiscoveryOptions{value: val, isSet: true} -} - -func (v NullableGatewayDiscoveryOptions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGatewayDiscoveryOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_event_handler_options.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_event_handler_options.go deleted file mode 100644 index 0020cd3db0..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_event_handler_options.go +++ /dev/null @@ -1,189 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GatewayEventHandlerOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GatewayEventHandlerOptions{} - -// GatewayEventHandlerOptions struct for GatewayEventHandlerOptions -type GatewayEventHandlerOptions struct { - CommitTimeout *float32 `json:"commitTimeout,omitempty"` - EndorseTimeout *float32 `json:"endorseTimeout,omitempty"` - Strategy DefaultEventHandlerStrategy `json:"strategy"` -} - -// NewGatewayEventHandlerOptions instantiates a new GatewayEventHandlerOptions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGatewayEventHandlerOptions(strategy DefaultEventHandlerStrategy) *GatewayEventHandlerOptions { - this := GatewayEventHandlerOptions{} - this.Strategy = strategy - return &this -} - -// NewGatewayEventHandlerOptionsWithDefaults instantiates a new GatewayEventHandlerOptions object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGatewayEventHandlerOptionsWithDefaults() *GatewayEventHandlerOptions { - this := GatewayEventHandlerOptions{} - return &this -} - -// GetCommitTimeout returns the CommitTimeout field value if set, zero value otherwise. -func (o *GatewayEventHandlerOptions) GetCommitTimeout() float32 { - if o == nil || IsNil(o.CommitTimeout) { - var ret float32 - return ret - } - return *o.CommitTimeout -} - -// GetCommitTimeoutOk returns a tuple with the CommitTimeout field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayEventHandlerOptions) GetCommitTimeoutOk() (*float32, bool) { - if o == nil || IsNil(o.CommitTimeout) { - return nil, false - } - return o.CommitTimeout, true -} - -// HasCommitTimeout returns a boolean if a field has been set. -func (o *GatewayEventHandlerOptions) HasCommitTimeout() bool { - if o != nil && !IsNil(o.CommitTimeout) { - return true - } - - return false -} - -// SetCommitTimeout gets a reference to the given float32 and assigns it to the CommitTimeout field. -func (o *GatewayEventHandlerOptions) SetCommitTimeout(v float32) { - o.CommitTimeout = &v -} - -// GetEndorseTimeout returns the EndorseTimeout field value if set, zero value otherwise. -func (o *GatewayEventHandlerOptions) GetEndorseTimeout() float32 { - if o == nil || IsNil(o.EndorseTimeout) { - var ret float32 - return ret - } - return *o.EndorseTimeout -} - -// GetEndorseTimeoutOk returns a tuple with the EndorseTimeout field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayEventHandlerOptions) GetEndorseTimeoutOk() (*float32, bool) { - if o == nil || IsNil(o.EndorseTimeout) { - return nil, false - } - return o.EndorseTimeout, true -} - -// HasEndorseTimeout returns a boolean if a field has been set. -func (o *GatewayEventHandlerOptions) HasEndorseTimeout() bool { - if o != nil && !IsNil(o.EndorseTimeout) { - return true - } - - return false -} - -// SetEndorseTimeout gets a reference to the given float32 and assigns it to the EndorseTimeout field. -func (o *GatewayEventHandlerOptions) SetEndorseTimeout(v float32) { - o.EndorseTimeout = &v -} - -// GetStrategy returns the Strategy field value -func (o *GatewayEventHandlerOptions) GetStrategy() DefaultEventHandlerStrategy { - if o == nil { - var ret DefaultEventHandlerStrategy - return ret - } - - return o.Strategy -} - -// GetStrategyOk returns a tuple with the Strategy field value -// and a boolean to check if the value has been set. -func (o *GatewayEventHandlerOptions) GetStrategyOk() (*DefaultEventHandlerStrategy, bool) { - if o == nil { - return nil, false - } - return &o.Strategy, true -} - -// SetStrategy sets field value -func (o *GatewayEventHandlerOptions) SetStrategy(v DefaultEventHandlerStrategy) { - o.Strategy = v -} - -func (o GatewayEventHandlerOptions) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GatewayEventHandlerOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CommitTimeout) { - toSerialize["commitTimeout"] = o.CommitTimeout - } - if !IsNil(o.EndorseTimeout) { - toSerialize["endorseTimeout"] = o.EndorseTimeout - } - toSerialize["strategy"] = o.Strategy - return toSerialize, nil -} - -type NullableGatewayEventHandlerOptions struct { - value *GatewayEventHandlerOptions - isSet bool -} - -func (v NullableGatewayEventHandlerOptions) Get() *GatewayEventHandlerOptions { - return v.value -} - -func (v *NullableGatewayEventHandlerOptions) Set(val *GatewayEventHandlerOptions) { - v.value = val - v.isSet = true -} - -func (v NullableGatewayEventHandlerOptions) IsSet() bool { - return v.isSet -} - -func (v *NullableGatewayEventHandlerOptions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGatewayEventHandlerOptions(val *GatewayEventHandlerOptions) *NullableGatewayEventHandlerOptions { - return &NullableGatewayEventHandlerOptions{value: val, isSet: true} -} - -func (v NullableGatewayEventHandlerOptions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGatewayEventHandlerOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_options.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_options.go deleted file mode 100644 index e069d10f7c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_options.go +++ /dev/null @@ -1,252 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GatewayOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GatewayOptions{} - -// GatewayOptions struct for GatewayOptions -type GatewayOptions struct { - ConnectionProfile *ConnectionProfile `json:"connectionProfile,omitempty"` - Discovery *GatewayDiscoveryOptions `json:"discovery,omitempty"` - EventHandlerOptions *GatewayEventHandlerOptions `json:"eventHandlerOptions,omitempty"` - Identity string `json:"identity"` - Wallet GatewayOptionsWallet `json:"wallet"` -} - -// NewGatewayOptions instantiates a new GatewayOptions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGatewayOptions(identity string, wallet GatewayOptionsWallet) *GatewayOptions { - this := GatewayOptions{} - this.Identity = identity - this.Wallet = wallet - return &this -} - -// NewGatewayOptionsWithDefaults instantiates a new GatewayOptions object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGatewayOptionsWithDefaults() *GatewayOptions { - this := GatewayOptions{} - return &this -} - -// GetConnectionProfile returns the ConnectionProfile field value if set, zero value otherwise. -func (o *GatewayOptions) GetConnectionProfile() ConnectionProfile { - if o == nil || IsNil(o.ConnectionProfile) { - var ret ConnectionProfile - return ret - } - return *o.ConnectionProfile -} - -// GetConnectionProfileOk returns a tuple with the ConnectionProfile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayOptions) GetConnectionProfileOk() (*ConnectionProfile, bool) { - if o == nil || IsNil(o.ConnectionProfile) { - return nil, false - } - return o.ConnectionProfile, true -} - -// HasConnectionProfile returns a boolean if a field has been set. -func (o *GatewayOptions) HasConnectionProfile() bool { - if o != nil && !IsNil(o.ConnectionProfile) { - return true - } - - return false -} - -// SetConnectionProfile gets a reference to the given ConnectionProfile and assigns it to the ConnectionProfile field. -func (o *GatewayOptions) SetConnectionProfile(v ConnectionProfile) { - o.ConnectionProfile = &v -} - -// GetDiscovery returns the Discovery field value if set, zero value otherwise. -func (o *GatewayOptions) GetDiscovery() GatewayDiscoveryOptions { - if o == nil || IsNil(o.Discovery) { - var ret GatewayDiscoveryOptions - return ret - } - return *o.Discovery -} - -// GetDiscoveryOk returns a tuple with the Discovery field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayOptions) GetDiscoveryOk() (*GatewayDiscoveryOptions, bool) { - if o == nil || IsNil(o.Discovery) { - return nil, false - } - return o.Discovery, true -} - -// HasDiscovery returns a boolean if a field has been set. -func (o *GatewayOptions) HasDiscovery() bool { - if o != nil && !IsNil(o.Discovery) { - return true - } - - return false -} - -// SetDiscovery gets a reference to the given GatewayDiscoveryOptions and assigns it to the Discovery field. -func (o *GatewayOptions) SetDiscovery(v GatewayDiscoveryOptions) { - o.Discovery = &v -} - -// GetEventHandlerOptions returns the EventHandlerOptions field value if set, zero value otherwise. -func (o *GatewayOptions) GetEventHandlerOptions() GatewayEventHandlerOptions { - if o == nil || IsNil(o.EventHandlerOptions) { - var ret GatewayEventHandlerOptions - return ret - } - return *o.EventHandlerOptions -} - -// GetEventHandlerOptionsOk returns a tuple with the EventHandlerOptions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayOptions) GetEventHandlerOptionsOk() (*GatewayEventHandlerOptions, bool) { - if o == nil || IsNil(o.EventHandlerOptions) { - return nil, false - } - return o.EventHandlerOptions, true -} - -// HasEventHandlerOptions returns a boolean if a field has been set. -func (o *GatewayOptions) HasEventHandlerOptions() bool { - if o != nil && !IsNil(o.EventHandlerOptions) { - return true - } - - return false -} - -// SetEventHandlerOptions gets a reference to the given GatewayEventHandlerOptions and assigns it to the EventHandlerOptions field. -func (o *GatewayOptions) SetEventHandlerOptions(v GatewayEventHandlerOptions) { - o.EventHandlerOptions = &v -} - -// GetIdentity returns the Identity field value -func (o *GatewayOptions) GetIdentity() string { - if o == nil { - var ret string - return ret - } - - return o.Identity -} - -// GetIdentityOk returns a tuple with the Identity field value -// and a boolean to check if the value has been set. -func (o *GatewayOptions) GetIdentityOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Identity, true -} - -// SetIdentity sets field value -func (o *GatewayOptions) SetIdentity(v string) { - o.Identity = v -} - -// GetWallet returns the Wallet field value -func (o *GatewayOptions) GetWallet() GatewayOptionsWallet { - if o == nil { - var ret GatewayOptionsWallet - return ret - } - - return o.Wallet -} - -// GetWalletOk returns a tuple with the Wallet field value -// and a boolean to check if the value has been set. -func (o *GatewayOptions) GetWalletOk() (*GatewayOptionsWallet, bool) { - if o == nil { - return nil, false - } - return &o.Wallet, true -} - -// SetWallet sets field value -func (o *GatewayOptions) SetWallet(v GatewayOptionsWallet) { - o.Wallet = v -} - -func (o GatewayOptions) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GatewayOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ConnectionProfile) { - toSerialize["connectionProfile"] = o.ConnectionProfile - } - if !IsNil(o.Discovery) { - toSerialize["discovery"] = o.Discovery - } - if !IsNil(o.EventHandlerOptions) { - toSerialize["eventHandlerOptions"] = o.EventHandlerOptions - } - toSerialize["identity"] = o.Identity - toSerialize["wallet"] = o.Wallet - return toSerialize, nil -} - -type NullableGatewayOptions struct { - value *GatewayOptions - isSet bool -} - -func (v NullableGatewayOptions) Get() *GatewayOptions { - return v.value -} - -func (v *NullableGatewayOptions) Set(val *GatewayOptions) { - v.value = val - v.isSet = true -} - -func (v NullableGatewayOptions) IsSet() bool { - return v.isSet -} - -func (v *NullableGatewayOptions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGatewayOptions(val *GatewayOptions) *NullableGatewayOptions { - return &NullableGatewayOptions{value: val, isSet: true} -} - -func (v NullableGatewayOptions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGatewayOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_options_wallet.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_options_wallet.go deleted file mode 100644 index 0f0c1cc370..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_gateway_options_wallet.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GatewayOptionsWallet type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GatewayOptionsWallet{} - -// GatewayOptionsWallet struct for GatewayOptionsWallet -type GatewayOptionsWallet struct { - Keychain *FabricSigningCredential `json:"keychain,omitempty"` - Json *string `json:"json,omitempty"` -} - -// NewGatewayOptionsWallet instantiates a new GatewayOptionsWallet object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGatewayOptionsWallet() *GatewayOptionsWallet { - this := GatewayOptionsWallet{} - return &this -} - -// NewGatewayOptionsWalletWithDefaults instantiates a new GatewayOptionsWallet object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGatewayOptionsWalletWithDefaults() *GatewayOptionsWallet { - this := GatewayOptionsWallet{} - return &this -} - -// GetKeychain returns the Keychain field value if set, zero value otherwise. -func (o *GatewayOptionsWallet) GetKeychain() FabricSigningCredential { - if o == nil || IsNil(o.Keychain) { - var ret FabricSigningCredential - return ret - } - return *o.Keychain -} - -// GetKeychainOk returns a tuple with the Keychain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayOptionsWallet) GetKeychainOk() (*FabricSigningCredential, bool) { - if o == nil || IsNil(o.Keychain) { - return nil, false - } - return o.Keychain, true -} - -// HasKeychain returns a boolean if a field has been set. -func (o *GatewayOptionsWallet) HasKeychain() bool { - if o != nil && !IsNil(o.Keychain) { - return true - } - - return false -} - -// SetKeychain gets a reference to the given FabricSigningCredential and assigns it to the Keychain field. -func (o *GatewayOptionsWallet) SetKeychain(v FabricSigningCredential) { - o.Keychain = &v -} - -// GetJson returns the Json field value if set, zero value otherwise. -func (o *GatewayOptionsWallet) GetJson() string { - if o == nil || IsNil(o.Json) { - var ret string - return ret - } - return *o.Json -} - -// GetJsonOk returns a tuple with the Json field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayOptionsWallet) GetJsonOk() (*string, bool) { - if o == nil || IsNil(o.Json) { - return nil, false - } - return o.Json, true -} - -// HasJson returns a boolean if a field has been set. -func (o *GatewayOptionsWallet) HasJson() bool { - if o != nil && !IsNil(o.Json) { - return true - } - - return false -} - -// SetJson gets a reference to the given string and assigns it to the Json field. -func (o *GatewayOptionsWallet) SetJson(v string) { - o.Json = &v -} - -func (o GatewayOptionsWallet) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GatewayOptionsWallet) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Keychain) { - toSerialize["keychain"] = o.Keychain - } - if !IsNil(o.Json) { - toSerialize["json"] = o.Json - } - return toSerialize, nil -} - -type NullableGatewayOptionsWallet struct { - value *GatewayOptionsWallet - isSet bool -} - -func (v NullableGatewayOptionsWallet) Get() *GatewayOptionsWallet { - return v.value -} - -func (v *NullableGatewayOptionsWallet) Set(val *GatewayOptionsWallet) { - v.value = val - v.isSet = true -} - -func (v NullableGatewayOptionsWallet) IsSet() bool { - return v.isSet -} - -func (v *NullableGatewayOptionsWallet) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGatewayOptionsWallet(val *GatewayOptionsWallet) *NullableGatewayOptionsWallet { - return &NullableGatewayOptionsWallet{value: val, isSet: true} -} - -func (v NullableGatewayOptionsWallet) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGatewayOptionsWallet) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_request_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_request_v1.go deleted file mode 100644 index 97e3c586dc..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_request_v1.go +++ /dev/null @@ -1,249 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GetBlockRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBlockRequestV1{} - -// GetBlockRequestV1 Request for GetBlock endpoint. -type GetBlockRequestV1 struct { - // Fabric channel which we want to query. - ChannelName string `json:"channelName"` - // Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used - ConnectionChannelName *string `json:"connectionChannelName,omitempty"` - GatewayOptions GatewayOptions `json:"gatewayOptions"` - Query GetBlockRequestV1Query `json:"query"` - ResponseType *GetBlockResponseTypeV1 `json:"responseType,omitempty"` -} - -// NewGetBlockRequestV1 instantiates a new GetBlockRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBlockRequestV1(channelName string, gatewayOptions GatewayOptions, query GetBlockRequestV1Query) *GetBlockRequestV1 { - this := GetBlockRequestV1{} - this.ChannelName = channelName - this.GatewayOptions = gatewayOptions - this.Query = query - var responseType GetBlockResponseTypeV1 = Full - this.ResponseType = &responseType - return &this -} - -// NewGetBlockRequestV1WithDefaults instantiates a new GetBlockRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBlockRequestV1WithDefaults() *GetBlockRequestV1 { - this := GetBlockRequestV1{} - var responseType GetBlockResponseTypeV1 = Full - this.ResponseType = &responseType - return &this -} - -// GetChannelName returns the ChannelName field value -func (o *GetBlockRequestV1) GetChannelName() string { - if o == nil { - var ret string - return ret - } - - return o.ChannelName -} - -// GetChannelNameOk returns a tuple with the ChannelName field value -// and a boolean to check if the value has been set. -func (o *GetBlockRequestV1) GetChannelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChannelName, true -} - -// SetChannelName sets field value -func (o *GetBlockRequestV1) SetChannelName(v string) { - o.ChannelName = v -} - -// GetConnectionChannelName returns the ConnectionChannelName field value if set, zero value otherwise. -func (o *GetBlockRequestV1) GetConnectionChannelName() string { - if o == nil || IsNil(o.ConnectionChannelName) { - var ret string - return ret - } - return *o.ConnectionChannelName -} - -// GetConnectionChannelNameOk returns a tuple with the ConnectionChannelName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBlockRequestV1) GetConnectionChannelNameOk() (*string, bool) { - if o == nil || IsNil(o.ConnectionChannelName) { - return nil, false - } - return o.ConnectionChannelName, true -} - -// HasConnectionChannelName returns a boolean if a field has been set. -func (o *GetBlockRequestV1) HasConnectionChannelName() bool { - if o != nil && !IsNil(o.ConnectionChannelName) { - return true - } - - return false -} - -// SetConnectionChannelName gets a reference to the given string and assigns it to the ConnectionChannelName field. -func (o *GetBlockRequestV1) SetConnectionChannelName(v string) { - o.ConnectionChannelName = &v -} - -// GetGatewayOptions returns the GatewayOptions field value -func (o *GetBlockRequestV1) GetGatewayOptions() GatewayOptions { - if o == nil { - var ret GatewayOptions - return ret - } - - return o.GatewayOptions -} - -// GetGatewayOptionsOk returns a tuple with the GatewayOptions field value -// and a boolean to check if the value has been set. -func (o *GetBlockRequestV1) GetGatewayOptionsOk() (*GatewayOptions, bool) { - if o == nil { - return nil, false - } - return &o.GatewayOptions, true -} - -// SetGatewayOptions sets field value -func (o *GetBlockRequestV1) SetGatewayOptions(v GatewayOptions) { - o.GatewayOptions = v -} - -// GetQuery returns the Query field value -func (o *GetBlockRequestV1) GetQuery() GetBlockRequestV1Query { - if o == nil { - var ret GetBlockRequestV1Query - return ret - } - - return o.Query -} - -// GetQueryOk returns a tuple with the Query field value -// and a boolean to check if the value has been set. -func (o *GetBlockRequestV1) GetQueryOk() (*GetBlockRequestV1Query, bool) { - if o == nil { - return nil, false - } - return &o.Query, true -} - -// SetQuery sets field value -func (o *GetBlockRequestV1) SetQuery(v GetBlockRequestV1Query) { - o.Query = v -} - -// GetResponseType returns the ResponseType field value if set, zero value otherwise. -func (o *GetBlockRequestV1) GetResponseType() GetBlockResponseTypeV1 { - if o == nil || IsNil(o.ResponseType) { - var ret GetBlockResponseTypeV1 - return ret - } - return *o.ResponseType -} - -// GetResponseTypeOk returns a tuple with the ResponseType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBlockRequestV1) GetResponseTypeOk() (*GetBlockResponseTypeV1, bool) { - if o == nil || IsNil(o.ResponseType) { - return nil, false - } - return o.ResponseType, true -} - -// HasResponseType returns a boolean if a field has been set. -func (o *GetBlockRequestV1) HasResponseType() bool { - if o != nil && !IsNil(o.ResponseType) { - return true - } - - return false -} - -// SetResponseType gets a reference to the given GetBlockResponseTypeV1 and assigns it to the ResponseType field. -func (o *GetBlockRequestV1) SetResponseType(v GetBlockResponseTypeV1) { - o.ResponseType = &v -} - -func (o GetBlockRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBlockRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["channelName"] = o.ChannelName - if !IsNil(o.ConnectionChannelName) { - toSerialize["connectionChannelName"] = o.ConnectionChannelName - } - toSerialize["gatewayOptions"] = o.GatewayOptions - toSerialize["query"] = o.Query - if !IsNil(o.ResponseType) { - toSerialize["responseType"] = o.ResponseType - } - return toSerialize, nil -} - -type NullableGetBlockRequestV1 struct { - value *GetBlockRequestV1 - isSet bool -} - -func (v NullableGetBlockRequestV1) Get() *GetBlockRequestV1 { - return v.value -} - -func (v *NullableGetBlockRequestV1) Set(val *GetBlockRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetBlockRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBlockRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBlockRequestV1(val *GetBlockRequestV1) *NullableGetBlockRequestV1 { - return &NullableGetBlockRequestV1{value: val, isSet: true} -} - -func (v NullableGetBlockRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBlockRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_request_v1_query.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_request_v1_query.go deleted file mode 100644 index 0ab0c3702d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_request_v1_query.go +++ /dev/null @@ -1,200 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GetBlockRequestV1Query type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBlockRequestV1Query{} - -// GetBlockRequestV1Query Query selector, caller must provide at least one of them. First found will be used, rest will be ignored, so it's recommended to pass single selector. -type GetBlockRequestV1Query struct { - // Select block by it's number. - BlockNumber *string `json:"blockNumber,omitempty"` - BlockHash *GetBlockRequestV1QueryBlockHash `json:"blockHash,omitempty"` - // Select block by id of transaction that it contains. - TransactionId *string `json:"transactionId,omitempty"` -} - -// NewGetBlockRequestV1Query instantiates a new GetBlockRequestV1Query object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBlockRequestV1Query() *GetBlockRequestV1Query { - this := GetBlockRequestV1Query{} - return &this -} - -// NewGetBlockRequestV1QueryWithDefaults instantiates a new GetBlockRequestV1Query object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBlockRequestV1QueryWithDefaults() *GetBlockRequestV1Query { - this := GetBlockRequestV1Query{} - return &this -} - -// GetBlockNumber returns the BlockNumber field value if set, zero value otherwise. -func (o *GetBlockRequestV1Query) GetBlockNumber() string { - if o == nil || IsNil(o.BlockNumber) { - var ret string - return ret - } - return *o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBlockRequestV1Query) GetBlockNumberOk() (*string, bool) { - if o == nil || IsNil(o.BlockNumber) { - return nil, false - } - return o.BlockNumber, true -} - -// HasBlockNumber returns a boolean if a field has been set. -func (o *GetBlockRequestV1Query) HasBlockNumber() bool { - if o != nil && !IsNil(o.BlockNumber) { - return true - } - - return false -} - -// SetBlockNumber gets a reference to the given string and assigns it to the BlockNumber field. -func (o *GetBlockRequestV1Query) SetBlockNumber(v string) { - o.BlockNumber = &v -} - -// GetBlockHash returns the BlockHash field value if set, zero value otherwise. -func (o *GetBlockRequestV1Query) GetBlockHash() GetBlockRequestV1QueryBlockHash { - if o == nil || IsNil(o.BlockHash) { - var ret GetBlockRequestV1QueryBlockHash - return ret - } - return *o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBlockRequestV1Query) GetBlockHashOk() (*GetBlockRequestV1QueryBlockHash, bool) { - if o == nil || IsNil(o.BlockHash) { - return nil, false - } - return o.BlockHash, true -} - -// HasBlockHash returns a boolean if a field has been set. -func (o *GetBlockRequestV1Query) HasBlockHash() bool { - if o != nil && !IsNil(o.BlockHash) { - return true - } - - return false -} - -// SetBlockHash gets a reference to the given GetBlockRequestV1QueryBlockHash and assigns it to the BlockHash field. -func (o *GetBlockRequestV1Query) SetBlockHash(v GetBlockRequestV1QueryBlockHash) { - o.BlockHash = &v -} - -// GetTransactionId returns the TransactionId field value if set, zero value otherwise. -func (o *GetBlockRequestV1Query) GetTransactionId() string { - if o == nil || IsNil(o.TransactionId) { - var ret string - return ret - } - return *o.TransactionId -} - -// GetTransactionIdOk returns a tuple with the TransactionId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBlockRequestV1Query) GetTransactionIdOk() (*string, bool) { - if o == nil || IsNil(o.TransactionId) { - return nil, false - } - return o.TransactionId, true -} - -// HasTransactionId returns a boolean if a field has been set. -func (o *GetBlockRequestV1Query) HasTransactionId() bool { - if o != nil && !IsNil(o.TransactionId) { - return true - } - - return false -} - -// SetTransactionId gets a reference to the given string and assigns it to the TransactionId field. -func (o *GetBlockRequestV1Query) SetTransactionId(v string) { - o.TransactionId = &v -} - -func (o GetBlockRequestV1Query) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBlockRequestV1Query) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.BlockNumber) { - toSerialize["blockNumber"] = o.BlockNumber - } - if !IsNil(o.BlockHash) { - toSerialize["blockHash"] = o.BlockHash - } - if !IsNil(o.TransactionId) { - toSerialize["transactionId"] = o.TransactionId - } - return toSerialize, nil -} - -type NullableGetBlockRequestV1Query struct { - value *GetBlockRequestV1Query - isSet bool -} - -func (v NullableGetBlockRequestV1Query) Get() *GetBlockRequestV1Query { - return v.value -} - -func (v *NullableGetBlockRequestV1Query) Set(val *GetBlockRequestV1Query) { - v.value = val - v.isSet = true -} - -func (v NullableGetBlockRequestV1Query) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBlockRequestV1Query) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBlockRequestV1Query(val *GetBlockRequestV1Query) *NullableGetBlockRequestV1Query { - return &NullableGetBlockRequestV1Query{value: val, isSet: true} -} - -func (v NullableGetBlockRequestV1Query) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBlockRequestV1Query) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_request_v1_query_block_hash.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_request_v1_query_block_hash.go deleted file mode 100644 index fb89fc4da9..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_request_v1_query_block_hash.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GetBlockRequestV1QueryBlockHash type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBlockRequestV1QueryBlockHash{} - -// GetBlockRequestV1QueryBlockHash Select block by it's hash. -type GetBlockRequestV1QueryBlockHash struct { - // NodeJS Buffer encoding (utf-8, hex, binary, base64, etc...). Passed directly to `Buffer.from()` call on hashBuffer. If not provided then JSON buffer format is assumed. - Encoding *string `json:"encoding,omitempty"` - // Buffer of blockHash. It's encoding should be described in `encoding` parameter. - Buffer string `json:"buffer"` -} - -// NewGetBlockRequestV1QueryBlockHash instantiates a new GetBlockRequestV1QueryBlockHash object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBlockRequestV1QueryBlockHash(buffer string) *GetBlockRequestV1QueryBlockHash { - this := GetBlockRequestV1QueryBlockHash{} - this.Buffer = buffer - return &this -} - -// NewGetBlockRequestV1QueryBlockHashWithDefaults instantiates a new GetBlockRequestV1QueryBlockHash object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBlockRequestV1QueryBlockHashWithDefaults() *GetBlockRequestV1QueryBlockHash { - this := GetBlockRequestV1QueryBlockHash{} - return &this -} - -// GetEncoding returns the Encoding field value if set, zero value otherwise. -func (o *GetBlockRequestV1QueryBlockHash) GetEncoding() string { - if o == nil || IsNil(o.Encoding) { - var ret string - return ret - } - return *o.Encoding -} - -// GetEncodingOk returns a tuple with the Encoding field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBlockRequestV1QueryBlockHash) GetEncodingOk() (*string, bool) { - if o == nil || IsNil(o.Encoding) { - return nil, false - } - return o.Encoding, true -} - -// HasEncoding returns a boolean if a field has been set. -func (o *GetBlockRequestV1QueryBlockHash) HasEncoding() bool { - if o != nil && !IsNil(o.Encoding) { - return true - } - - return false -} - -// SetEncoding gets a reference to the given string and assigns it to the Encoding field. -func (o *GetBlockRequestV1QueryBlockHash) SetEncoding(v string) { - o.Encoding = &v -} - -// GetBuffer returns the Buffer field value -func (o *GetBlockRequestV1QueryBlockHash) GetBuffer() string { - if o == nil { - var ret string - return ret - } - - return o.Buffer -} - -// GetBufferOk returns a tuple with the Buffer field value -// and a boolean to check if the value has been set. -func (o *GetBlockRequestV1QueryBlockHash) GetBufferOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Buffer, true -} - -// SetBuffer sets field value -func (o *GetBlockRequestV1QueryBlockHash) SetBuffer(v string) { - o.Buffer = v -} - -func (o GetBlockRequestV1QueryBlockHash) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBlockRequestV1QueryBlockHash) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Encoding) { - toSerialize["encoding"] = o.Encoding - } - toSerialize["buffer"] = o.Buffer - return toSerialize, nil -} - -type NullableGetBlockRequestV1QueryBlockHash struct { - value *GetBlockRequestV1QueryBlockHash - isSet bool -} - -func (v NullableGetBlockRequestV1QueryBlockHash) Get() *GetBlockRequestV1QueryBlockHash { - return v.value -} - -func (v *NullableGetBlockRequestV1QueryBlockHash) Set(val *GetBlockRequestV1QueryBlockHash) { - v.value = val - v.isSet = true -} - -func (v NullableGetBlockRequestV1QueryBlockHash) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBlockRequestV1QueryBlockHash) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBlockRequestV1QueryBlockHash(val *GetBlockRequestV1QueryBlockHash) *NullableGetBlockRequestV1QueryBlockHash { - return &NullableGetBlockRequestV1QueryBlockHash{value: val, isSet: true} -} - -func (v NullableGetBlockRequestV1QueryBlockHash) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBlockRequestV1QueryBlockHash) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_decoded_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_decoded_v1.go deleted file mode 100644 index 0f2b630f06..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_decoded_v1.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GetBlockResponseDecodedV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBlockResponseDecodedV1{} - -// GetBlockResponseDecodedV1 When skipDecode is false (default) then decoded block object is returned. -type GetBlockResponseDecodedV1 struct { - // Full hyperledger fabric block data. - DecodedBlock interface{} `json:"decodedBlock"` -} - -// NewGetBlockResponseDecodedV1 instantiates a new GetBlockResponseDecodedV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBlockResponseDecodedV1(decodedBlock interface{}) *GetBlockResponseDecodedV1 { - this := GetBlockResponseDecodedV1{} - this.DecodedBlock = decodedBlock - return &this -} - -// NewGetBlockResponseDecodedV1WithDefaults instantiates a new GetBlockResponseDecodedV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBlockResponseDecodedV1WithDefaults() *GetBlockResponseDecodedV1 { - this := GetBlockResponseDecodedV1{} - return &this -} - -// GetDecodedBlock returns the DecodedBlock field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *GetBlockResponseDecodedV1) GetDecodedBlock() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.DecodedBlock -} - -// GetDecodedBlockOk returns a tuple with the DecodedBlock field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetBlockResponseDecodedV1) GetDecodedBlockOk() (*interface{}, bool) { - if o == nil || IsNil(o.DecodedBlock) { - return nil, false - } - return &o.DecodedBlock, true -} - -// SetDecodedBlock sets field value -func (o *GetBlockResponseDecodedV1) SetDecodedBlock(v interface{}) { - o.DecodedBlock = v -} - -func (o GetBlockResponseDecodedV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBlockResponseDecodedV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.DecodedBlock != nil { - toSerialize["decodedBlock"] = o.DecodedBlock - } - return toSerialize, nil -} - -type NullableGetBlockResponseDecodedV1 struct { - value *GetBlockResponseDecodedV1 - isSet bool -} - -func (v NullableGetBlockResponseDecodedV1) Get() *GetBlockResponseDecodedV1 { - return v.value -} - -func (v *NullableGetBlockResponseDecodedV1) Set(val *GetBlockResponseDecodedV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetBlockResponseDecodedV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBlockResponseDecodedV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBlockResponseDecodedV1(val *GetBlockResponseDecodedV1) *NullableGetBlockResponseDecodedV1 { - return &NullableGetBlockResponseDecodedV1{value: val, isSet: true} -} - -func (v NullableGetBlockResponseDecodedV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBlockResponseDecodedV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_encoded_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_encoded_v1.go deleted file mode 100644 index 8165d71426..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_encoded_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GetBlockResponseEncodedV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBlockResponseEncodedV1{} - -// GetBlockResponseEncodedV1 When skipDecode is true then encoded block Buffer is returned. -type GetBlockResponseEncodedV1 struct { - EncodedBlock string `json:"encodedBlock"` -} - -// NewGetBlockResponseEncodedV1 instantiates a new GetBlockResponseEncodedV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetBlockResponseEncodedV1(encodedBlock string) *GetBlockResponseEncodedV1 { - this := GetBlockResponseEncodedV1{} - this.EncodedBlock = encodedBlock - return &this -} - -// NewGetBlockResponseEncodedV1WithDefaults instantiates a new GetBlockResponseEncodedV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetBlockResponseEncodedV1WithDefaults() *GetBlockResponseEncodedV1 { - this := GetBlockResponseEncodedV1{} - return &this -} - -// GetEncodedBlock returns the EncodedBlock field value -func (o *GetBlockResponseEncodedV1) GetEncodedBlock() string { - if o == nil { - var ret string - return ret - } - - return o.EncodedBlock -} - -// GetEncodedBlockOk returns a tuple with the EncodedBlock field value -// and a boolean to check if the value has been set. -func (o *GetBlockResponseEncodedV1) GetEncodedBlockOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EncodedBlock, true -} - -// SetEncodedBlock sets field value -func (o *GetBlockResponseEncodedV1) SetEncodedBlock(v string) { - o.EncodedBlock = v -} - -func (o GetBlockResponseEncodedV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetBlockResponseEncodedV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["encodedBlock"] = o.EncodedBlock - return toSerialize, nil -} - -type NullableGetBlockResponseEncodedV1 struct { - value *GetBlockResponseEncodedV1 - isSet bool -} - -func (v NullableGetBlockResponseEncodedV1) Get() *GetBlockResponseEncodedV1 { - return v.value -} - -func (v *NullableGetBlockResponseEncodedV1) Set(val *GetBlockResponseEncodedV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetBlockResponseEncodedV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBlockResponseEncodedV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBlockResponseEncodedV1(val *GetBlockResponseEncodedV1) *NullableGetBlockResponseEncodedV1 { - return &NullableGetBlockResponseEncodedV1{value: val, isSet: true} -} - -func (v NullableGetBlockResponseEncodedV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBlockResponseEncodedV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_type_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_type_v1.go deleted file mode 100644 index 75bbdd213b..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_type_v1.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// GetBlockResponseTypeV1 Response type from GetBlock. -type GetBlockResponseTypeV1 string - -// List of GetBlockResponseTypeV1 -const ( - Full GetBlockResponseTypeV1 = "full" - Encoded GetBlockResponseTypeV1 = "encoded" - CactiTransactions GetBlockResponseTypeV1 = "cacti:transactions" - CactiFullBlock GetBlockResponseTypeV1 = "cacti:full-block" -) - -// All allowed values of GetBlockResponseTypeV1 enum -var AllowedGetBlockResponseTypeV1EnumValues = []GetBlockResponseTypeV1{ - "full", - "encoded", - "cacti:transactions", - "cacti:full-block", -} - -func (v *GetBlockResponseTypeV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := GetBlockResponseTypeV1(value) - for _, existing := range AllowedGetBlockResponseTypeV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid GetBlockResponseTypeV1", value) -} - -// NewGetBlockResponseTypeV1FromValue returns a pointer to a valid GetBlockResponseTypeV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewGetBlockResponseTypeV1FromValue(v string) (*GetBlockResponseTypeV1, error) { - ev := GetBlockResponseTypeV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for GetBlockResponseTypeV1: valid values are %v", v, AllowedGetBlockResponseTypeV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v GetBlockResponseTypeV1) IsValid() bool { - for _, existing := range AllowedGetBlockResponseTypeV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to GetBlockResponseTypeV1 value -func (v GetBlockResponseTypeV1) Ptr() *GetBlockResponseTypeV1 { - return &v -} - -type NullableGetBlockResponseTypeV1 struct { - value *GetBlockResponseTypeV1 - isSet bool -} - -func (v NullableGetBlockResponseTypeV1) Get() *GetBlockResponseTypeV1 { - return v.value -} - -func (v *NullableGetBlockResponseTypeV1) Set(val *GetBlockResponseTypeV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetBlockResponseTypeV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBlockResponseTypeV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBlockResponseTypeV1(val *GetBlockResponseTypeV1) *NullableGetBlockResponseTypeV1 { - return &NullableGetBlockResponseTypeV1{value: val, isSet: true} -} - -func (v NullableGetBlockResponseTypeV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBlockResponseTypeV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_v1.go deleted file mode 100644 index 8b1650cd0e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_block_response_v1.go +++ /dev/null @@ -1,208 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// GetBlockResponseV1 - Response from GetBlock endpoint. -type GetBlockResponseV1 struct { - CactiBlockFullResponseV1 *CactiBlockFullResponseV1 - CactiBlockTransactionsResponseV1 *CactiBlockTransactionsResponseV1 - GetBlockResponseDecodedV1 *GetBlockResponseDecodedV1 - GetBlockResponseEncodedV1 *GetBlockResponseEncodedV1 -} - -// CactiBlockFullResponseV1AsGetBlockResponseV1 is a convenience function that returns CactiBlockFullResponseV1 wrapped in GetBlockResponseV1 -func CactiBlockFullResponseV1AsGetBlockResponseV1(v *CactiBlockFullResponseV1) GetBlockResponseV1 { - return GetBlockResponseV1{ - CactiBlockFullResponseV1: v, - } -} - -// CactiBlockTransactionsResponseV1AsGetBlockResponseV1 is a convenience function that returns CactiBlockTransactionsResponseV1 wrapped in GetBlockResponseV1 -func CactiBlockTransactionsResponseV1AsGetBlockResponseV1(v *CactiBlockTransactionsResponseV1) GetBlockResponseV1 { - return GetBlockResponseV1{ - CactiBlockTransactionsResponseV1: v, - } -} - -// GetBlockResponseDecodedV1AsGetBlockResponseV1 is a convenience function that returns GetBlockResponseDecodedV1 wrapped in GetBlockResponseV1 -func GetBlockResponseDecodedV1AsGetBlockResponseV1(v *GetBlockResponseDecodedV1) GetBlockResponseV1 { - return GetBlockResponseV1{ - GetBlockResponseDecodedV1: v, - } -} - -// GetBlockResponseEncodedV1AsGetBlockResponseV1 is a convenience function that returns GetBlockResponseEncodedV1 wrapped in GetBlockResponseV1 -func GetBlockResponseEncodedV1AsGetBlockResponseV1(v *GetBlockResponseEncodedV1) GetBlockResponseV1 { - return GetBlockResponseV1{ - GetBlockResponseEncodedV1: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *GetBlockResponseV1) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into CactiBlockFullResponseV1 - err = newStrictDecoder(data).Decode(&dst.CactiBlockFullResponseV1) - if err == nil { - jsonCactiBlockFullResponseV1, _ := json.Marshal(dst.CactiBlockFullResponseV1) - if string(jsonCactiBlockFullResponseV1) == "{}" { // empty struct - dst.CactiBlockFullResponseV1 = nil - } else { - match++ - } - } else { - dst.CactiBlockFullResponseV1 = nil - } - - // try to unmarshal data into CactiBlockTransactionsResponseV1 - err = newStrictDecoder(data).Decode(&dst.CactiBlockTransactionsResponseV1) - if err == nil { - jsonCactiBlockTransactionsResponseV1, _ := json.Marshal(dst.CactiBlockTransactionsResponseV1) - if string(jsonCactiBlockTransactionsResponseV1) == "{}" { // empty struct - dst.CactiBlockTransactionsResponseV1 = nil - } else { - match++ - } - } else { - dst.CactiBlockTransactionsResponseV1 = nil - } - - // try to unmarshal data into GetBlockResponseDecodedV1 - err = newStrictDecoder(data).Decode(&dst.GetBlockResponseDecodedV1) - if err == nil { - jsonGetBlockResponseDecodedV1, _ := json.Marshal(dst.GetBlockResponseDecodedV1) - if string(jsonGetBlockResponseDecodedV1) == "{}" { // empty struct - dst.GetBlockResponseDecodedV1 = nil - } else { - match++ - } - } else { - dst.GetBlockResponseDecodedV1 = nil - } - - // try to unmarshal data into GetBlockResponseEncodedV1 - err = newStrictDecoder(data).Decode(&dst.GetBlockResponseEncodedV1) - if err == nil { - jsonGetBlockResponseEncodedV1, _ := json.Marshal(dst.GetBlockResponseEncodedV1) - if string(jsonGetBlockResponseEncodedV1) == "{}" { // empty struct - dst.GetBlockResponseEncodedV1 = nil - } else { - match++ - } - } else { - dst.GetBlockResponseEncodedV1 = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.CactiBlockFullResponseV1 = nil - dst.CactiBlockTransactionsResponseV1 = nil - dst.GetBlockResponseDecodedV1 = nil - dst.GetBlockResponseEncodedV1 = nil - - return fmt.Errorf("data matches more than one schema in oneOf(GetBlockResponseV1)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(GetBlockResponseV1)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src GetBlockResponseV1) MarshalJSON() ([]byte, error) { - if src.CactiBlockFullResponseV1 != nil { - return json.Marshal(&src.CactiBlockFullResponseV1) - } - - if src.CactiBlockTransactionsResponseV1 != nil { - return json.Marshal(&src.CactiBlockTransactionsResponseV1) - } - - if src.GetBlockResponseDecodedV1 != nil { - return json.Marshal(&src.GetBlockResponseDecodedV1) - } - - if src.GetBlockResponseEncodedV1 != nil { - return json.Marshal(&src.GetBlockResponseEncodedV1) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *GetBlockResponseV1) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.CactiBlockFullResponseV1 != nil { - return obj.CactiBlockFullResponseV1 - } - - if obj.CactiBlockTransactionsResponseV1 != nil { - return obj.CactiBlockTransactionsResponseV1 - } - - if obj.GetBlockResponseDecodedV1 != nil { - return obj.GetBlockResponseDecodedV1 - } - - if obj.GetBlockResponseEncodedV1 != nil { - return obj.GetBlockResponseEncodedV1 - } - - // all schemas are nil - return nil -} - -type NullableGetBlockResponseV1 struct { - value *GetBlockResponseV1 - isSet bool -} - -func (v NullableGetBlockResponseV1) Get() *GetBlockResponseV1 { - return v.value -} - -func (v *NullableGetBlockResponseV1) Set(val *GetBlockResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetBlockResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBlockResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBlockResponseV1(val *GetBlockResponseV1) *NullableGetBlockResponseV1 { - return &NullableGetBlockResponseV1{value: val, isSet: true} -} - -func (v NullableGetBlockResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBlockResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_chain_info_request_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_chain_info_request_v1.go deleted file mode 100644 index a541db55aa..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_chain_info_request_v1.go +++ /dev/null @@ -1,182 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GetChainInfoRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetChainInfoRequestV1{} - -// GetChainInfoRequestV1 Request for GetChainInfo endpoint. -type GetChainInfoRequestV1 struct { - // Fabric channel which we want to query. - ChannelName string `json:"channelName"` - // Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used - ConnectionChannelName *string `json:"connectionChannelName,omitempty"` - GatewayOptions GatewayOptions `json:"gatewayOptions"` -} - -// NewGetChainInfoRequestV1 instantiates a new GetChainInfoRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetChainInfoRequestV1(channelName string, gatewayOptions GatewayOptions) *GetChainInfoRequestV1 { - this := GetChainInfoRequestV1{} - this.ChannelName = channelName - this.GatewayOptions = gatewayOptions - return &this -} - -// NewGetChainInfoRequestV1WithDefaults instantiates a new GetChainInfoRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetChainInfoRequestV1WithDefaults() *GetChainInfoRequestV1 { - this := GetChainInfoRequestV1{} - return &this -} - -// GetChannelName returns the ChannelName field value -func (o *GetChainInfoRequestV1) GetChannelName() string { - if o == nil { - var ret string - return ret - } - - return o.ChannelName -} - -// GetChannelNameOk returns a tuple with the ChannelName field value -// and a boolean to check if the value has been set. -func (o *GetChainInfoRequestV1) GetChannelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChannelName, true -} - -// SetChannelName sets field value -func (o *GetChainInfoRequestV1) SetChannelName(v string) { - o.ChannelName = v -} - -// GetConnectionChannelName returns the ConnectionChannelName field value if set, zero value otherwise. -func (o *GetChainInfoRequestV1) GetConnectionChannelName() string { - if o == nil || IsNil(o.ConnectionChannelName) { - var ret string - return ret - } - return *o.ConnectionChannelName -} - -// GetConnectionChannelNameOk returns a tuple with the ConnectionChannelName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetChainInfoRequestV1) GetConnectionChannelNameOk() (*string, bool) { - if o == nil || IsNil(o.ConnectionChannelName) { - return nil, false - } - return o.ConnectionChannelName, true -} - -// HasConnectionChannelName returns a boolean if a field has been set. -func (o *GetChainInfoRequestV1) HasConnectionChannelName() bool { - if o != nil && !IsNil(o.ConnectionChannelName) { - return true - } - - return false -} - -// SetConnectionChannelName gets a reference to the given string and assigns it to the ConnectionChannelName field. -func (o *GetChainInfoRequestV1) SetConnectionChannelName(v string) { - o.ConnectionChannelName = &v -} - -// GetGatewayOptions returns the GatewayOptions field value -func (o *GetChainInfoRequestV1) GetGatewayOptions() GatewayOptions { - if o == nil { - var ret GatewayOptions - return ret - } - - return o.GatewayOptions -} - -// GetGatewayOptionsOk returns a tuple with the GatewayOptions field value -// and a boolean to check if the value has been set. -func (o *GetChainInfoRequestV1) GetGatewayOptionsOk() (*GatewayOptions, bool) { - if o == nil { - return nil, false - } - return &o.GatewayOptions, true -} - -// SetGatewayOptions sets field value -func (o *GetChainInfoRequestV1) SetGatewayOptions(v GatewayOptions) { - o.GatewayOptions = v -} - -func (o GetChainInfoRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetChainInfoRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["channelName"] = o.ChannelName - if !IsNil(o.ConnectionChannelName) { - toSerialize["connectionChannelName"] = o.ConnectionChannelName - } - toSerialize["gatewayOptions"] = o.GatewayOptions - return toSerialize, nil -} - -type NullableGetChainInfoRequestV1 struct { - value *GetChainInfoRequestV1 - isSet bool -} - -func (v NullableGetChainInfoRequestV1) Get() *GetChainInfoRequestV1 { - return v.value -} - -func (v *NullableGetChainInfoRequestV1) Set(val *GetChainInfoRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetChainInfoRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetChainInfoRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetChainInfoRequestV1(val *GetChainInfoRequestV1) *NullableGetChainInfoRequestV1 { - return &NullableGetChainInfoRequestV1{value: val, isSet: true} -} - -func (v NullableGetChainInfoRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetChainInfoRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_chain_info_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_chain_info_response_v1.go deleted file mode 100644 index 753305dfb3..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_chain_info_response_v1.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GetChainInfoResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetChainInfoResponseV1{} - -// GetChainInfoResponseV1 Response from GetChainInfo endpoint. -type GetChainInfoResponseV1 struct { - // Current height of fabric ledger - Height float32 `json:"height"` - // Current block hash of fabric ledger - CurrentBlockHash string `json:"currentBlockHash"` - // Previous block hash of fabric ledger - PreviousBlockHash string `json:"previousBlockHash"` -} - -// NewGetChainInfoResponseV1 instantiates a new GetChainInfoResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetChainInfoResponseV1(height float32, currentBlockHash string, previousBlockHash string) *GetChainInfoResponseV1 { - this := GetChainInfoResponseV1{} - this.Height = height - this.CurrentBlockHash = currentBlockHash - this.PreviousBlockHash = previousBlockHash - return &this -} - -// NewGetChainInfoResponseV1WithDefaults instantiates a new GetChainInfoResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetChainInfoResponseV1WithDefaults() *GetChainInfoResponseV1 { - this := GetChainInfoResponseV1{} - return &this -} - -// GetHeight returns the Height field value -func (o *GetChainInfoResponseV1) GetHeight() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Height -} - -// GetHeightOk returns a tuple with the Height field value -// and a boolean to check if the value has been set. -func (o *GetChainInfoResponseV1) GetHeightOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Height, true -} - -// SetHeight sets field value -func (o *GetChainInfoResponseV1) SetHeight(v float32) { - o.Height = v -} - -// GetCurrentBlockHash returns the CurrentBlockHash field value -func (o *GetChainInfoResponseV1) GetCurrentBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.CurrentBlockHash -} - -// GetCurrentBlockHashOk returns a tuple with the CurrentBlockHash field value -// and a boolean to check if the value has been set. -func (o *GetChainInfoResponseV1) GetCurrentBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CurrentBlockHash, true -} - -// SetCurrentBlockHash sets field value -func (o *GetChainInfoResponseV1) SetCurrentBlockHash(v string) { - o.CurrentBlockHash = v -} - -// GetPreviousBlockHash returns the PreviousBlockHash field value -func (o *GetChainInfoResponseV1) GetPreviousBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.PreviousBlockHash -} - -// GetPreviousBlockHashOk returns a tuple with the PreviousBlockHash field value -// and a boolean to check if the value has been set. -func (o *GetChainInfoResponseV1) GetPreviousBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PreviousBlockHash, true -} - -// SetPreviousBlockHash sets field value -func (o *GetChainInfoResponseV1) SetPreviousBlockHash(v string) { - o.PreviousBlockHash = v -} - -func (o GetChainInfoResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetChainInfoResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["height"] = o.Height - toSerialize["currentBlockHash"] = o.CurrentBlockHash - toSerialize["previousBlockHash"] = o.PreviousBlockHash - return toSerialize, nil -} - -type NullableGetChainInfoResponseV1 struct { - value *GetChainInfoResponseV1 - isSet bool -} - -func (v NullableGetChainInfoResponseV1) Get() *GetChainInfoResponseV1 { - return v.value -} - -func (v *NullableGetChainInfoResponseV1) Set(val *GetChainInfoResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableGetChainInfoResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGetChainInfoResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetChainInfoResponseV1(val *GetChainInfoResponseV1) *NullableGetChainInfoResponseV1 { - return &NullableGetChainInfoResponseV1{value: val, isSet: true} -} - -func (v NullableGetChainInfoResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetChainInfoResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_transaction_receipt_response.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_transaction_receipt_response.go deleted file mode 100644 index 75ba91d72f..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_get_transaction_receipt_response.go +++ /dev/null @@ -1,450 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the GetTransactionReceiptResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetTransactionReceiptResponse{} - -// GetTransactionReceiptResponse struct for GetTransactionReceiptResponse -type GetTransactionReceiptResponse struct { - BlockNumber *string `json:"blockNumber,omitempty"` - ChannelID *string `json:"channelID,omitempty"` - TransactionCreator *TransactReceiptTransactionCreator `json:"transactionCreator,omitempty"` - TransactionEndorsement []TransactReceiptTransactionEndorsement `json:"transactionEndorsement,omitempty"` - BlockMetaData *TransactReceiptBlockMetaData `json:"blockMetaData,omitempty"` - ChainCodeName *string `json:"chainCodeName,omitempty"` - ChainCodeVersion *string `json:"chainCodeVersion,omitempty"` - ResponseStatus *string `json:"responseStatus,omitempty"` - RwsetKey *string `json:"rwsetKey,omitempty"` - RwsetWriteData *string `json:"rwsetWriteData,omitempty"` -} - -// NewGetTransactionReceiptResponse instantiates a new GetTransactionReceiptResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetTransactionReceiptResponse() *GetTransactionReceiptResponse { - this := GetTransactionReceiptResponse{} - return &this -} - -// NewGetTransactionReceiptResponseWithDefaults instantiates a new GetTransactionReceiptResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetTransactionReceiptResponseWithDefaults() *GetTransactionReceiptResponse { - this := GetTransactionReceiptResponse{} - return &this -} - -// GetBlockNumber returns the BlockNumber field value if set, zero value otherwise. -func (o *GetTransactionReceiptResponse) GetBlockNumber() string { - if o == nil || IsNil(o.BlockNumber) { - var ret string - return ret - } - return *o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTransactionReceiptResponse) GetBlockNumberOk() (*string, bool) { - if o == nil || IsNil(o.BlockNumber) { - return nil, false - } - return o.BlockNumber, true -} - -// HasBlockNumber returns a boolean if a field has been set. -func (o *GetTransactionReceiptResponse) HasBlockNumber() bool { - if o != nil && !IsNil(o.BlockNumber) { - return true - } - - return false -} - -// SetBlockNumber gets a reference to the given string and assigns it to the BlockNumber field. -func (o *GetTransactionReceiptResponse) SetBlockNumber(v string) { - o.BlockNumber = &v -} - -// GetChannelID returns the ChannelID field value if set, zero value otherwise. -func (o *GetTransactionReceiptResponse) GetChannelID() string { - if o == nil || IsNil(o.ChannelID) { - var ret string - return ret - } - return *o.ChannelID -} - -// GetChannelIDOk returns a tuple with the ChannelID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTransactionReceiptResponse) GetChannelIDOk() (*string, bool) { - if o == nil || IsNil(o.ChannelID) { - return nil, false - } - return o.ChannelID, true -} - -// HasChannelID returns a boolean if a field has been set. -func (o *GetTransactionReceiptResponse) HasChannelID() bool { - if o != nil && !IsNil(o.ChannelID) { - return true - } - - return false -} - -// SetChannelID gets a reference to the given string and assigns it to the ChannelID field. -func (o *GetTransactionReceiptResponse) SetChannelID(v string) { - o.ChannelID = &v -} - -// GetTransactionCreator returns the TransactionCreator field value if set, zero value otherwise. -func (o *GetTransactionReceiptResponse) GetTransactionCreator() TransactReceiptTransactionCreator { - if o == nil || IsNil(o.TransactionCreator) { - var ret TransactReceiptTransactionCreator - return ret - } - return *o.TransactionCreator -} - -// GetTransactionCreatorOk returns a tuple with the TransactionCreator field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTransactionReceiptResponse) GetTransactionCreatorOk() (*TransactReceiptTransactionCreator, bool) { - if o == nil || IsNil(o.TransactionCreator) { - return nil, false - } - return o.TransactionCreator, true -} - -// HasTransactionCreator returns a boolean if a field has been set. -func (o *GetTransactionReceiptResponse) HasTransactionCreator() bool { - if o != nil && !IsNil(o.TransactionCreator) { - return true - } - - return false -} - -// SetTransactionCreator gets a reference to the given TransactReceiptTransactionCreator and assigns it to the TransactionCreator field. -func (o *GetTransactionReceiptResponse) SetTransactionCreator(v TransactReceiptTransactionCreator) { - o.TransactionCreator = &v -} - -// GetTransactionEndorsement returns the TransactionEndorsement field value if set, zero value otherwise. -func (o *GetTransactionReceiptResponse) GetTransactionEndorsement() []TransactReceiptTransactionEndorsement { - if o == nil || IsNil(o.TransactionEndorsement) { - var ret []TransactReceiptTransactionEndorsement - return ret - } - return o.TransactionEndorsement -} - -// GetTransactionEndorsementOk returns a tuple with the TransactionEndorsement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTransactionReceiptResponse) GetTransactionEndorsementOk() ([]TransactReceiptTransactionEndorsement, bool) { - if o == nil || IsNil(o.TransactionEndorsement) { - return nil, false - } - return o.TransactionEndorsement, true -} - -// HasTransactionEndorsement returns a boolean if a field has been set. -func (o *GetTransactionReceiptResponse) HasTransactionEndorsement() bool { - if o != nil && !IsNil(o.TransactionEndorsement) { - return true - } - - return false -} - -// SetTransactionEndorsement gets a reference to the given []TransactReceiptTransactionEndorsement and assigns it to the TransactionEndorsement field. -func (o *GetTransactionReceiptResponse) SetTransactionEndorsement(v []TransactReceiptTransactionEndorsement) { - o.TransactionEndorsement = v -} - -// GetBlockMetaData returns the BlockMetaData field value if set, zero value otherwise. -func (o *GetTransactionReceiptResponse) GetBlockMetaData() TransactReceiptBlockMetaData { - if o == nil || IsNil(o.BlockMetaData) { - var ret TransactReceiptBlockMetaData - return ret - } - return *o.BlockMetaData -} - -// GetBlockMetaDataOk returns a tuple with the BlockMetaData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTransactionReceiptResponse) GetBlockMetaDataOk() (*TransactReceiptBlockMetaData, bool) { - if o == nil || IsNil(o.BlockMetaData) { - return nil, false - } - return o.BlockMetaData, true -} - -// HasBlockMetaData returns a boolean if a field has been set. -func (o *GetTransactionReceiptResponse) HasBlockMetaData() bool { - if o != nil && !IsNil(o.BlockMetaData) { - return true - } - - return false -} - -// SetBlockMetaData gets a reference to the given TransactReceiptBlockMetaData and assigns it to the BlockMetaData field. -func (o *GetTransactionReceiptResponse) SetBlockMetaData(v TransactReceiptBlockMetaData) { - o.BlockMetaData = &v -} - -// GetChainCodeName returns the ChainCodeName field value if set, zero value otherwise. -func (o *GetTransactionReceiptResponse) GetChainCodeName() string { - if o == nil || IsNil(o.ChainCodeName) { - var ret string - return ret - } - return *o.ChainCodeName -} - -// GetChainCodeNameOk returns a tuple with the ChainCodeName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTransactionReceiptResponse) GetChainCodeNameOk() (*string, bool) { - if o == nil || IsNil(o.ChainCodeName) { - return nil, false - } - return o.ChainCodeName, true -} - -// HasChainCodeName returns a boolean if a field has been set. -func (o *GetTransactionReceiptResponse) HasChainCodeName() bool { - if o != nil && !IsNil(o.ChainCodeName) { - return true - } - - return false -} - -// SetChainCodeName gets a reference to the given string and assigns it to the ChainCodeName field. -func (o *GetTransactionReceiptResponse) SetChainCodeName(v string) { - o.ChainCodeName = &v -} - -// GetChainCodeVersion returns the ChainCodeVersion field value if set, zero value otherwise. -func (o *GetTransactionReceiptResponse) GetChainCodeVersion() string { - if o == nil || IsNil(o.ChainCodeVersion) { - var ret string - return ret - } - return *o.ChainCodeVersion -} - -// GetChainCodeVersionOk returns a tuple with the ChainCodeVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTransactionReceiptResponse) GetChainCodeVersionOk() (*string, bool) { - if o == nil || IsNil(o.ChainCodeVersion) { - return nil, false - } - return o.ChainCodeVersion, true -} - -// HasChainCodeVersion returns a boolean if a field has been set. -func (o *GetTransactionReceiptResponse) HasChainCodeVersion() bool { - if o != nil && !IsNil(o.ChainCodeVersion) { - return true - } - - return false -} - -// SetChainCodeVersion gets a reference to the given string and assigns it to the ChainCodeVersion field. -func (o *GetTransactionReceiptResponse) SetChainCodeVersion(v string) { - o.ChainCodeVersion = &v -} - -// GetResponseStatus returns the ResponseStatus field value if set, zero value otherwise. -func (o *GetTransactionReceiptResponse) GetResponseStatus() string { - if o == nil || IsNil(o.ResponseStatus) { - var ret string - return ret - } - return *o.ResponseStatus -} - -// GetResponseStatusOk returns a tuple with the ResponseStatus field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTransactionReceiptResponse) GetResponseStatusOk() (*string, bool) { - if o == nil || IsNil(o.ResponseStatus) { - return nil, false - } - return o.ResponseStatus, true -} - -// HasResponseStatus returns a boolean if a field has been set. -func (o *GetTransactionReceiptResponse) HasResponseStatus() bool { - if o != nil && !IsNil(o.ResponseStatus) { - return true - } - - return false -} - -// SetResponseStatus gets a reference to the given string and assigns it to the ResponseStatus field. -func (o *GetTransactionReceiptResponse) SetResponseStatus(v string) { - o.ResponseStatus = &v -} - -// GetRwsetKey returns the RwsetKey field value if set, zero value otherwise. -func (o *GetTransactionReceiptResponse) GetRwsetKey() string { - if o == nil || IsNil(o.RwsetKey) { - var ret string - return ret - } - return *o.RwsetKey -} - -// GetRwsetKeyOk returns a tuple with the RwsetKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTransactionReceiptResponse) GetRwsetKeyOk() (*string, bool) { - if o == nil || IsNil(o.RwsetKey) { - return nil, false - } - return o.RwsetKey, true -} - -// HasRwsetKey returns a boolean if a field has been set. -func (o *GetTransactionReceiptResponse) HasRwsetKey() bool { - if o != nil && !IsNil(o.RwsetKey) { - return true - } - - return false -} - -// SetRwsetKey gets a reference to the given string and assigns it to the RwsetKey field. -func (o *GetTransactionReceiptResponse) SetRwsetKey(v string) { - o.RwsetKey = &v -} - -// GetRwsetWriteData returns the RwsetWriteData field value if set, zero value otherwise. -func (o *GetTransactionReceiptResponse) GetRwsetWriteData() string { - if o == nil || IsNil(o.RwsetWriteData) { - var ret string - return ret - } - return *o.RwsetWriteData -} - -// GetRwsetWriteDataOk returns a tuple with the RwsetWriteData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTransactionReceiptResponse) GetRwsetWriteDataOk() (*string, bool) { - if o == nil || IsNil(o.RwsetWriteData) { - return nil, false - } - return o.RwsetWriteData, true -} - -// HasRwsetWriteData returns a boolean if a field has been set. -func (o *GetTransactionReceiptResponse) HasRwsetWriteData() bool { - if o != nil && !IsNil(o.RwsetWriteData) { - return true - } - - return false -} - -// SetRwsetWriteData gets a reference to the given string and assigns it to the RwsetWriteData field. -func (o *GetTransactionReceiptResponse) SetRwsetWriteData(v string) { - o.RwsetWriteData = &v -} - -func (o GetTransactionReceiptResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetTransactionReceiptResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.BlockNumber) { - toSerialize["blockNumber"] = o.BlockNumber - } - if !IsNil(o.ChannelID) { - toSerialize["channelID"] = o.ChannelID - } - if !IsNil(o.TransactionCreator) { - toSerialize["transactionCreator"] = o.TransactionCreator - } - if !IsNil(o.TransactionEndorsement) { - toSerialize["transactionEndorsement"] = o.TransactionEndorsement - } - if !IsNil(o.BlockMetaData) { - toSerialize["blockMetaData"] = o.BlockMetaData - } - if !IsNil(o.ChainCodeName) { - toSerialize["chainCodeName"] = o.ChainCodeName - } - if !IsNil(o.ChainCodeVersion) { - toSerialize["chainCodeVersion"] = o.ChainCodeVersion - } - if !IsNil(o.ResponseStatus) { - toSerialize["responseStatus"] = o.ResponseStatus - } - if !IsNil(o.RwsetKey) { - toSerialize["rwsetKey"] = o.RwsetKey - } - if !IsNil(o.RwsetWriteData) { - toSerialize["rwsetWriteData"] = o.RwsetWriteData - } - return toSerialize, nil -} - -type NullableGetTransactionReceiptResponse struct { - value *GetTransactionReceiptResponse - isSet bool -} - -func (v NullableGetTransactionReceiptResponse) Get() *GetTransactionReceiptResponse { - return v.value -} - -func (v *NullableGetTransactionReceiptResponse) Set(val *GetTransactionReceiptResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGetTransactionReceiptResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGetTransactionReceiptResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetTransactionReceiptResponse(val *GetTransactionReceiptResponse) *NullableGetTransactionReceiptResponse { - return &NullableGetTransactionReceiptResponse{value: val, isSet: true} -} - -func (v NullableGetTransactionReceiptResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetTransactionReceiptResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_delegated_sign_transaction_request.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_delegated_sign_transaction_request.go deleted file mode 100644 index 95065d0e99..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_delegated_sign_transaction_request.go +++ /dev/null @@ -1,464 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the RunDelegatedSignTransactionRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunDelegatedSignTransactionRequest{} - -// RunDelegatedSignTransactionRequest struct for RunDelegatedSignTransactionRequest -type RunDelegatedSignTransactionRequest struct { - // An array of endorsing peers (name or url) for the transaction. - EndorsingPeers []string `json:"endorsingPeers,omitempty"` - // An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction. - EndorsingOrgs []string `json:"endorsingOrgs,omitempty"` - TransientData map[string]interface{} `json:"transientData,omitempty"` - SignerCertificate string `json:"signerCertificate"` - SignerMspID string `json:"signerMspID"` - // Can be used to uniquely identify and authorize signing request - UniqueTransactionData interface{} `json:"uniqueTransactionData,omitempty"` - ChannelName string `json:"channelName"` - ContractName string `json:"contractName"` - InvocationType FabricContractInvocationType `json:"invocationType"` - MethodName string `json:"methodName"` - Params []*string `json:"params"` - ResponseType *RunTransactionResponseType `json:"responseType,omitempty"` -} - -// NewRunDelegatedSignTransactionRequest instantiates a new RunDelegatedSignTransactionRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunDelegatedSignTransactionRequest(signerCertificate string, signerMspID string, channelName string, contractName string, invocationType FabricContractInvocationType, methodName string, params []*string) *RunDelegatedSignTransactionRequest { - this := RunDelegatedSignTransactionRequest{} - this.SignerCertificate = signerCertificate - this.SignerMspID = signerMspID - this.ChannelName = channelName - this.ContractName = contractName - this.InvocationType = invocationType - this.MethodName = methodName - this.Params = params - return &this -} - -// NewRunDelegatedSignTransactionRequestWithDefaults instantiates a new RunDelegatedSignTransactionRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunDelegatedSignTransactionRequestWithDefaults() *RunDelegatedSignTransactionRequest { - this := RunDelegatedSignTransactionRequest{} - return &this -} - -// GetEndorsingPeers returns the EndorsingPeers field value if set, zero value otherwise. -func (o *RunDelegatedSignTransactionRequest) GetEndorsingPeers() []string { - if o == nil || IsNil(o.EndorsingPeers) { - var ret []string - return ret - } - return o.EndorsingPeers -} - -// GetEndorsingPeersOk returns a tuple with the EndorsingPeers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunDelegatedSignTransactionRequest) GetEndorsingPeersOk() ([]string, bool) { - if o == nil || IsNil(o.EndorsingPeers) { - return nil, false - } - return o.EndorsingPeers, true -} - -// HasEndorsingPeers returns a boolean if a field has been set. -func (o *RunDelegatedSignTransactionRequest) HasEndorsingPeers() bool { - if o != nil && !IsNil(o.EndorsingPeers) { - return true - } - - return false -} - -// SetEndorsingPeers gets a reference to the given []string and assigns it to the EndorsingPeers field. -func (o *RunDelegatedSignTransactionRequest) SetEndorsingPeers(v []string) { - o.EndorsingPeers = v -} - -// GetEndorsingOrgs returns the EndorsingOrgs field value if set, zero value otherwise. -func (o *RunDelegatedSignTransactionRequest) GetEndorsingOrgs() []string { - if o == nil || IsNil(o.EndorsingOrgs) { - var ret []string - return ret - } - return o.EndorsingOrgs -} - -// GetEndorsingOrgsOk returns a tuple with the EndorsingOrgs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunDelegatedSignTransactionRequest) GetEndorsingOrgsOk() ([]string, bool) { - if o == nil || IsNil(o.EndorsingOrgs) { - return nil, false - } - return o.EndorsingOrgs, true -} - -// HasEndorsingOrgs returns a boolean if a field has been set. -func (o *RunDelegatedSignTransactionRequest) HasEndorsingOrgs() bool { - if o != nil && !IsNil(o.EndorsingOrgs) { - return true - } - - return false -} - -// SetEndorsingOrgs gets a reference to the given []string and assigns it to the EndorsingOrgs field. -func (o *RunDelegatedSignTransactionRequest) SetEndorsingOrgs(v []string) { - o.EndorsingOrgs = v -} - -// GetTransientData returns the TransientData field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *RunDelegatedSignTransactionRequest) GetTransientData() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - return o.TransientData -} - -// GetTransientDataOk returns a tuple with the TransientData field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RunDelegatedSignTransactionRequest) GetTransientDataOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.TransientData) { - return map[string]interface{}{}, false - } - return o.TransientData, true -} - -// HasTransientData returns a boolean if a field has been set. -func (o *RunDelegatedSignTransactionRequest) HasTransientData() bool { - if o != nil && IsNil(o.TransientData) { - return true - } - - return false -} - -// SetTransientData gets a reference to the given map[string]interface{} and assigns it to the TransientData field. -func (o *RunDelegatedSignTransactionRequest) SetTransientData(v map[string]interface{}) { - o.TransientData = v -} - -// GetSignerCertificate returns the SignerCertificate field value -func (o *RunDelegatedSignTransactionRequest) GetSignerCertificate() string { - if o == nil { - var ret string - return ret - } - - return o.SignerCertificate -} - -// GetSignerCertificateOk returns a tuple with the SignerCertificate field value -// and a boolean to check if the value has been set. -func (o *RunDelegatedSignTransactionRequest) GetSignerCertificateOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SignerCertificate, true -} - -// SetSignerCertificate sets field value -func (o *RunDelegatedSignTransactionRequest) SetSignerCertificate(v string) { - o.SignerCertificate = v -} - -// GetSignerMspID returns the SignerMspID field value -func (o *RunDelegatedSignTransactionRequest) GetSignerMspID() string { - if o == nil { - var ret string - return ret - } - - return o.SignerMspID -} - -// GetSignerMspIDOk returns a tuple with the SignerMspID field value -// and a boolean to check if the value has been set. -func (o *RunDelegatedSignTransactionRequest) GetSignerMspIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SignerMspID, true -} - -// SetSignerMspID sets field value -func (o *RunDelegatedSignTransactionRequest) SetSignerMspID(v string) { - o.SignerMspID = v -} - -// GetUniqueTransactionData returns the UniqueTransactionData field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *RunDelegatedSignTransactionRequest) GetUniqueTransactionData() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.UniqueTransactionData -} - -// GetUniqueTransactionDataOk returns a tuple with the UniqueTransactionData field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RunDelegatedSignTransactionRequest) GetUniqueTransactionDataOk() (*interface{}, bool) { - if o == nil || IsNil(o.UniqueTransactionData) { - return nil, false - } - return &o.UniqueTransactionData, true -} - -// HasUniqueTransactionData returns a boolean if a field has been set. -func (o *RunDelegatedSignTransactionRequest) HasUniqueTransactionData() bool { - if o != nil && IsNil(o.UniqueTransactionData) { - return true - } - - return false -} - -// SetUniqueTransactionData gets a reference to the given interface{} and assigns it to the UniqueTransactionData field. -func (o *RunDelegatedSignTransactionRequest) SetUniqueTransactionData(v interface{}) { - o.UniqueTransactionData = v -} - -// GetChannelName returns the ChannelName field value -func (o *RunDelegatedSignTransactionRequest) GetChannelName() string { - if o == nil { - var ret string - return ret - } - - return o.ChannelName -} - -// GetChannelNameOk returns a tuple with the ChannelName field value -// and a boolean to check if the value has been set. -func (o *RunDelegatedSignTransactionRequest) GetChannelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChannelName, true -} - -// SetChannelName sets field value -func (o *RunDelegatedSignTransactionRequest) SetChannelName(v string) { - o.ChannelName = v -} - -// GetContractName returns the ContractName field value -func (o *RunDelegatedSignTransactionRequest) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *RunDelegatedSignTransactionRequest) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *RunDelegatedSignTransactionRequest) SetContractName(v string) { - o.ContractName = v -} - -// GetInvocationType returns the InvocationType field value -func (o *RunDelegatedSignTransactionRequest) GetInvocationType() FabricContractInvocationType { - if o == nil { - var ret FabricContractInvocationType - return ret - } - - return o.InvocationType -} - -// GetInvocationTypeOk returns a tuple with the InvocationType field value -// and a boolean to check if the value has been set. -func (o *RunDelegatedSignTransactionRequest) GetInvocationTypeOk() (*FabricContractInvocationType, bool) { - if o == nil { - return nil, false - } - return &o.InvocationType, true -} - -// SetInvocationType sets field value -func (o *RunDelegatedSignTransactionRequest) SetInvocationType(v FabricContractInvocationType) { - o.InvocationType = v -} - -// GetMethodName returns the MethodName field value -func (o *RunDelegatedSignTransactionRequest) GetMethodName() string { - if o == nil { - var ret string - return ret - } - - return o.MethodName -} - -// GetMethodNameOk returns a tuple with the MethodName field value -// and a boolean to check if the value has been set. -func (o *RunDelegatedSignTransactionRequest) GetMethodNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MethodName, true -} - -// SetMethodName sets field value -func (o *RunDelegatedSignTransactionRequest) SetMethodName(v string) { - o.MethodName = v -} - -// GetParams returns the Params field value -func (o *RunDelegatedSignTransactionRequest) GetParams() []*string { - if o == nil { - var ret []*string - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *RunDelegatedSignTransactionRequest) GetParamsOk() ([]*string, bool) { - if o == nil { - return nil, false - } - return o.Params, true -} - -// SetParams sets field value -func (o *RunDelegatedSignTransactionRequest) SetParams(v []*string) { - o.Params = v -} - -// GetResponseType returns the ResponseType field value if set, zero value otherwise. -func (o *RunDelegatedSignTransactionRequest) GetResponseType() RunTransactionResponseType { - if o == nil || IsNil(o.ResponseType) { - var ret RunTransactionResponseType - return ret - } - return *o.ResponseType -} - -// GetResponseTypeOk returns a tuple with the ResponseType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunDelegatedSignTransactionRequest) GetResponseTypeOk() (*RunTransactionResponseType, bool) { - if o == nil || IsNil(o.ResponseType) { - return nil, false - } - return o.ResponseType, true -} - -// HasResponseType returns a boolean if a field has been set. -func (o *RunDelegatedSignTransactionRequest) HasResponseType() bool { - if o != nil && !IsNil(o.ResponseType) { - return true - } - - return false -} - -// SetResponseType gets a reference to the given RunTransactionResponseType and assigns it to the ResponseType field. -func (o *RunDelegatedSignTransactionRequest) SetResponseType(v RunTransactionResponseType) { - o.ResponseType = &v -} - -func (o RunDelegatedSignTransactionRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunDelegatedSignTransactionRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.EndorsingPeers) { - toSerialize["endorsingPeers"] = o.EndorsingPeers - } - if !IsNil(o.EndorsingOrgs) { - toSerialize["endorsingOrgs"] = o.EndorsingOrgs - } - if o.TransientData != nil { - toSerialize["transientData"] = o.TransientData - } - toSerialize["signerCertificate"] = o.SignerCertificate - toSerialize["signerMspID"] = o.SignerMspID - if o.UniqueTransactionData != nil { - toSerialize["uniqueTransactionData"] = o.UniqueTransactionData - } - toSerialize["channelName"] = o.ChannelName - toSerialize["contractName"] = o.ContractName - toSerialize["invocationType"] = o.InvocationType - toSerialize["methodName"] = o.MethodName - toSerialize["params"] = o.Params - if !IsNil(o.ResponseType) { - toSerialize["responseType"] = o.ResponseType - } - return toSerialize, nil -} - -type NullableRunDelegatedSignTransactionRequest struct { - value *RunDelegatedSignTransactionRequest - isSet bool -} - -func (v NullableRunDelegatedSignTransactionRequest) Get() *RunDelegatedSignTransactionRequest { - return v.value -} - -func (v *NullableRunDelegatedSignTransactionRequest) Set(val *RunDelegatedSignTransactionRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRunDelegatedSignTransactionRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRunDelegatedSignTransactionRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunDelegatedSignTransactionRequest(val *RunDelegatedSignTransactionRequest) *NullableRunDelegatedSignTransactionRequest { - return &NullableRunDelegatedSignTransactionRequest{value: val, isSet: true} -} - -func (v NullableRunDelegatedSignTransactionRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunDelegatedSignTransactionRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_transaction_request.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_transaction_request.go deleted file mode 100644 index 1d1ad1e674..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_transaction_request.go +++ /dev/null @@ -1,435 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the RunTransactionRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionRequest{} - -// RunTransactionRequest struct for RunTransactionRequest -type RunTransactionRequest struct { - // An array of endorsing peers (name or url) for the transaction. - EndorsingPeers []string `json:"endorsingPeers,omitempty"` - // An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction. - EndorsingOrgs []string `json:"endorsingOrgs,omitempty"` - TransientData map[string]interface{} `json:"transientData,omitempty"` - GatewayOptions *GatewayOptions `json:"gatewayOptions,omitempty"` - SigningCredential FabricSigningCredential `json:"signingCredential"` - ChannelName string `json:"channelName"` - ContractName string `json:"contractName"` - InvocationType FabricContractInvocationType `json:"invocationType"` - MethodName string `json:"methodName"` - Params []*string `json:"params"` - ResponseType *RunTransactionResponseType `json:"responseType,omitempty"` -} - -// NewRunTransactionRequest instantiates a new RunTransactionRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionRequest(signingCredential FabricSigningCredential, channelName string, contractName string, invocationType FabricContractInvocationType, methodName string, params []*string) *RunTransactionRequest { - this := RunTransactionRequest{} - this.SigningCredential = signingCredential - this.ChannelName = channelName - this.ContractName = contractName - this.InvocationType = invocationType - this.MethodName = methodName - this.Params = params - return &this -} - -// NewRunTransactionRequestWithDefaults instantiates a new RunTransactionRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionRequestWithDefaults() *RunTransactionRequest { - this := RunTransactionRequest{} - return &this -} - -// GetEndorsingPeers returns the EndorsingPeers field value if set, zero value otherwise. -func (o *RunTransactionRequest) GetEndorsingPeers() []string { - if o == nil || IsNil(o.EndorsingPeers) { - var ret []string - return ret - } - return o.EndorsingPeers -} - -// GetEndorsingPeersOk returns a tuple with the EndorsingPeers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetEndorsingPeersOk() ([]string, bool) { - if o == nil || IsNil(o.EndorsingPeers) { - return nil, false - } - return o.EndorsingPeers, true -} - -// HasEndorsingPeers returns a boolean if a field has been set. -func (o *RunTransactionRequest) HasEndorsingPeers() bool { - if o != nil && !IsNil(o.EndorsingPeers) { - return true - } - - return false -} - -// SetEndorsingPeers gets a reference to the given []string and assigns it to the EndorsingPeers field. -func (o *RunTransactionRequest) SetEndorsingPeers(v []string) { - o.EndorsingPeers = v -} - -// GetEndorsingOrgs returns the EndorsingOrgs field value if set, zero value otherwise. -func (o *RunTransactionRequest) GetEndorsingOrgs() []string { - if o == nil || IsNil(o.EndorsingOrgs) { - var ret []string - return ret - } - return o.EndorsingOrgs -} - -// GetEndorsingOrgsOk returns a tuple with the EndorsingOrgs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetEndorsingOrgsOk() ([]string, bool) { - if o == nil || IsNil(o.EndorsingOrgs) { - return nil, false - } - return o.EndorsingOrgs, true -} - -// HasEndorsingOrgs returns a boolean if a field has been set. -func (o *RunTransactionRequest) HasEndorsingOrgs() bool { - if o != nil && !IsNil(o.EndorsingOrgs) { - return true - } - - return false -} - -// SetEndorsingOrgs gets a reference to the given []string and assigns it to the EndorsingOrgs field. -func (o *RunTransactionRequest) SetEndorsingOrgs(v []string) { - o.EndorsingOrgs = v -} - -// GetTransientData returns the TransientData field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *RunTransactionRequest) GetTransientData() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - return o.TransientData -} - -// GetTransientDataOk returns a tuple with the TransientData field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RunTransactionRequest) GetTransientDataOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.TransientData) { - return map[string]interface{}{}, false - } - return o.TransientData, true -} - -// HasTransientData returns a boolean if a field has been set. -func (o *RunTransactionRequest) HasTransientData() bool { - if o != nil && IsNil(o.TransientData) { - return true - } - - return false -} - -// SetTransientData gets a reference to the given map[string]interface{} and assigns it to the TransientData field. -func (o *RunTransactionRequest) SetTransientData(v map[string]interface{}) { - o.TransientData = v -} - -// GetGatewayOptions returns the GatewayOptions field value if set, zero value otherwise. -func (o *RunTransactionRequest) GetGatewayOptions() GatewayOptions { - if o == nil || IsNil(o.GatewayOptions) { - var ret GatewayOptions - return ret - } - return *o.GatewayOptions -} - -// GetGatewayOptionsOk returns a tuple with the GatewayOptions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetGatewayOptionsOk() (*GatewayOptions, bool) { - if o == nil || IsNil(o.GatewayOptions) { - return nil, false - } - return o.GatewayOptions, true -} - -// HasGatewayOptions returns a boolean if a field has been set. -func (o *RunTransactionRequest) HasGatewayOptions() bool { - if o != nil && !IsNil(o.GatewayOptions) { - return true - } - - return false -} - -// SetGatewayOptions gets a reference to the given GatewayOptions and assigns it to the GatewayOptions field. -func (o *RunTransactionRequest) SetGatewayOptions(v GatewayOptions) { - o.GatewayOptions = &v -} - -// GetSigningCredential returns the SigningCredential field value -func (o *RunTransactionRequest) GetSigningCredential() FabricSigningCredential { - if o == nil { - var ret FabricSigningCredential - return ret - } - - return o.SigningCredential -} - -// GetSigningCredentialOk returns a tuple with the SigningCredential field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetSigningCredentialOk() (*FabricSigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.SigningCredential, true -} - -// SetSigningCredential sets field value -func (o *RunTransactionRequest) SetSigningCredential(v FabricSigningCredential) { - o.SigningCredential = v -} - -// GetChannelName returns the ChannelName field value -func (o *RunTransactionRequest) GetChannelName() string { - if o == nil { - var ret string - return ret - } - - return o.ChannelName -} - -// GetChannelNameOk returns a tuple with the ChannelName field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetChannelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChannelName, true -} - -// SetChannelName sets field value -func (o *RunTransactionRequest) SetChannelName(v string) { - o.ChannelName = v -} - -// GetContractName returns the ContractName field value -func (o *RunTransactionRequest) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *RunTransactionRequest) SetContractName(v string) { - o.ContractName = v -} - -// GetInvocationType returns the InvocationType field value -func (o *RunTransactionRequest) GetInvocationType() FabricContractInvocationType { - if o == nil { - var ret FabricContractInvocationType - return ret - } - - return o.InvocationType -} - -// GetInvocationTypeOk returns a tuple with the InvocationType field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetInvocationTypeOk() (*FabricContractInvocationType, bool) { - if o == nil { - return nil, false - } - return &o.InvocationType, true -} - -// SetInvocationType sets field value -func (o *RunTransactionRequest) SetInvocationType(v FabricContractInvocationType) { - o.InvocationType = v -} - -// GetMethodName returns the MethodName field value -func (o *RunTransactionRequest) GetMethodName() string { - if o == nil { - var ret string - return ret - } - - return o.MethodName -} - -// GetMethodNameOk returns a tuple with the MethodName field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetMethodNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MethodName, true -} - -// SetMethodName sets field value -func (o *RunTransactionRequest) SetMethodName(v string) { - o.MethodName = v -} - -// GetParams returns the Params field value -func (o *RunTransactionRequest) GetParams() []*string { - if o == nil { - var ret []*string - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetParamsOk() ([]*string, bool) { - if o == nil { - return nil, false - } - return o.Params, true -} - -// SetParams sets field value -func (o *RunTransactionRequest) SetParams(v []*string) { - o.Params = v -} - -// GetResponseType returns the ResponseType field value if set, zero value otherwise. -func (o *RunTransactionRequest) GetResponseType() RunTransactionResponseType { - if o == nil || IsNil(o.ResponseType) { - var ret RunTransactionResponseType - return ret - } - return *o.ResponseType -} - -// GetResponseTypeOk returns a tuple with the ResponseType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetResponseTypeOk() (*RunTransactionResponseType, bool) { - if o == nil || IsNil(o.ResponseType) { - return nil, false - } - return o.ResponseType, true -} - -// HasResponseType returns a boolean if a field has been set. -func (o *RunTransactionRequest) HasResponseType() bool { - if o != nil && !IsNil(o.ResponseType) { - return true - } - - return false -} - -// SetResponseType gets a reference to the given RunTransactionResponseType and assigns it to the ResponseType field. -func (o *RunTransactionRequest) SetResponseType(v RunTransactionResponseType) { - o.ResponseType = &v -} - -func (o RunTransactionRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.EndorsingPeers) { - toSerialize["endorsingPeers"] = o.EndorsingPeers - } - if !IsNil(o.EndorsingOrgs) { - toSerialize["endorsingOrgs"] = o.EndorsingOrgs - } - if o.TransientData != nil { - toSerialize["transientData"] = o.TransientData - } - if !IsNil(o.GatewayOptions) { - toSerialize["gatewayOptions"] = o.GatewayOptions - } - toSerialize["signingCredential"] = o.SigningCredential - toSerialize["channelName"] = o.ChannelName - toSerialize["contractName"] = o.ContractName - toSerialize["invocationType"] = o.InvocationType - toSerialize["methodName"] = o.MethodName - toSerialize["params"] = o.Params - if !IsNil(o.ResponseType) { - toSerialize["responseType"] = o.ResponseType - } - return toSerialize, nil -} - -type NullableRunTransactionRequest struct { - value *RunTransactionRequest - isSet bool -} - -func (v NullableRunTransactionRequest) Get() *RunTransactionRequest { - return v.value -} - -func (v *NullableRunTransactionRequest) Set(val *RunTransactionRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionRequest(val *RunTransactionRequest) *NullableRunTransactionRequest { - return &NullableRunTransactionRequest{value: val, isSet: true} -} - -func (v NullableRunTransactionRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_transaction_response.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_transaction_response.go deleted file mode 100644 index 0b48e91d61..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_transaction_response.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the RunTransactionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionResponse{} - -// RunTransactionResponse struct for RunTransactionResponse -type RunTransactionResponse struct { - FunctionOutput string `json:"functionOutput"` - TransactionId string `json:"transactionId"` -} - -// NewRunTransactionResponse instantiates a new RunTransactionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionResponse(functionOutput string, transactionId string) *RunTransactionResponse { - this := RunTransactionResponse{} - this.FunctionOutput = functionOutput - this.TransactionId = transactionId - return &this -} - -// NewRunTransactionResponseWithDefaults instantiates a new RunTransactionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionResponseWithDefaults() *RunTransactionResponse { - this := RunTransactionResponse{} - return &this -} - -// GetFunctionOutput returns the FunctionOutput field value -func (o *RunTransactionResponse) GetFunctionOutput() string { - if o == nil { - var ret string - return ret - } - - return o.FunctionOutput -} - -// GetFunctionOutputOk returns a tuple with the FunctionOutput field value -// and a boolean to check if the value has been set. -func (o *RunTransactionResponse) GetFunctionOutputOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FunctionOutput, true -} - -// SetFunctionOutput sets field value -func (o *RunTransactionResponse) SetFunctionOutput(v string) { - o.FunctionOutput = v -} - -// GetTransactionId returns the TransactionId field value -func (o *RunTransactionResponse) GetTransactionId() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionId -} - -// GetTransactionIdOk returns a tuple with the TransactionId field value -// and a boolean to check if the value has been set. -func (o *RunTransactionResponse) GetTransactionIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionId, true -} - -// SetTransactionId sets field value -func (o *RunTransactionResponse) SetTransactionId(v string) { - o.TransactionId = v -} - -func (o RunTransactionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["functionOutput"] = o.FunctionOutput - toSerialize["transactionId"] = o.TransactionId - return toSerialize, nil -} - -type NullableRunTransactionResponse struct { - value *RunTransactionResponse - isSet bool -} - -func (v NullableRunTransactionResponse) Get() *RunTransactionResponse { - return v.value -} - -func (v *NullableRunTransactionResponse) Set(val *RunTransactionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionResponse(val *RunTransactionResponse) *NullableRunTransactionResponse { - return &NullableRunTransactionResponse{value: val, isSet: true} -} - -func (v NullableRunTransactionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_transaction_response_type.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_transaction_response_type.go deleted file mode 100644 index 6b77a36ce6..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_run_transaction_response_type.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// RunTransactionResponseType Response format from transaction / query execution -type RunTransactionResponseType string - -// List of RunTransactionResponseType -const ( - JSON RunTransactionResponseType = "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.JSON" - UTF8 RunTransactionResponseType = "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.UTF8" -) - -// All allowed values of RunTransactionResponseType enum -var AllowedRunTransactionResponseTypeEnumValues = []RunTransactionResponseType{ - "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.JSON", - "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.UTF8", -} - -func (v *RunTransactionResponseType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := RunTransactionResponseType(value) - for _, existing := range AllowedRunTransactionResponseTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid RunTransactionResponseType", value) -} - -// NewRunTransactionResponseTypeFromValue returns a pointer to a valid RunTransactionResponseType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewRunTransactionResponseTypeFromValue(v string) (*RunTransactionResponseType, error) { - ev := RunTransactionResponseType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for RunTransactionResponseType: valid values are %v", v, AllowedRunTransactionResponseTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v RunTransactionResponseType) IsValid() bool { - for _, existing := range AllowedRunTransactionResponseTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to RunTransactionResponseType value -func (v RunTransactionResponseType) Ptr() *RunTransactionResponseType { - return &v -} - -type NullableRunTransactionResponseType struct { - value *RunTransactionResponseType - isSet bool -} - -func (v NullableRunTransactionResponseType) Get() *RunTransactionResponseType { - return v.value -} - -func (v *NullableRunTransactionResponseType) Set(val *RunTransactionResponseType) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionResponseType) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionResponseType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionResponseType(val *RunTransactionResponseType) *NullableRunTransactionResponseType { - return &NullableRunTransactionResponseType{value: val, isSet: true} -} - -func (v NullableRunTransactionResponseType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionResponseType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_ssh_exec_command_response.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_ssh_exec_command_response.go deleted file mode 100644 index db495b5e95..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_ssh_exec_command_response.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the SSHExecCommandResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SSHExecCommandResponse{} - -// SSHExecCommandResponse struct for SSHExecCommandResponse -type SSHExecCommandResponse struct { - Stdout string `json:"stdout"` - Stderr string `json:"stderr"` - Code NullableInt32 `json:"code"` - Signal NullableString `json:"signal"` -} - -// NewSSHExecCommandResponse instantiates a new SSHExecCommandResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSSHExecCommandResponse(stdout string, stderr string, code NullableInt32, signal NullableString) *SSHExecCommandResponse { - this := SSHExecCommandResponse{} - this.Stdout = stdout - this.Stderr = stderr - this.Code = code - this.Signal = signal - return &this -} - -// NewSSHExecCommandResponseWithDefaults instantiates a new SSHExecCommandResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSSHExecCommandResponseWithDefaults() *SSHExecCommandResponse { - this := SSHExecCommandResponse{} - return &this -} - -// GetStdout returns the Stdout field value -func (o *SSHExecCommandResponse) GetStdout() string { - if o == nil { - var ret string - return ret - } - - return o.Stdout -} - -// GetStdoutOk returns a tuple with the Stdout field value -// and a boolean to check if the value has been set. -func (o *SSHExecCommandResponse) GetStdoutOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Stdout, true -} - -// SetStdout sets field value -func (o *SSHExecCommandResponse) SetStdout(v string) { - o.Stdout = v -} - -// GetStderr returns the Stderr field value -func (o *SSHExecCommandResponse) GetStderr() string { - if o == nil { - var ret string - return ret - } - - return o.Stderr -} - -// GetStderrOk returns a tuple with the Stderr field value -// and a boolean to check if the value has been set. -func (o *SSHExecCommandResponse) GetStderrOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Stderr, true -} - -// SetStderr sets field value -func (o *SSHExecCommandResponse) SetStderr(v string) { - o.Stderr = v -} - -// GetCode returns the Code field value -// If the value is explicit nil, the zero value for int32 will be returned -func (o *SSHExecCommandResponse) GetCode() int32 { - if o == nil || o.Code.Get() == nil { - var ret int32 - return ret - } - - return *o.Code.Get() -} - -// GetCodeOk returns a tuple with the Code field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SSHExecCommandResponse) GetCodeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.Code.Get(), o.Code.IsSet() -} - -// SetCode sets field value -func (o *SSHExecCommandResponse) SetCode(v int32) { - o.Code.Set(&v) -} - -// GetSignal returns the Signal field value -// If the value is explicit nil, the zero value for string will be returned -func (o *SSHExecCommandResponse) GetSignal() string { - if o == nil || o.Signal.Get() == nil { - var ret string - return ret - } - - return *o.Signal.Get() -} - -// GetSignalOk returns a tuple with the Signal field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SSHExecCommandResponse) GetSignalOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Signal.Get(), o.Signal.IsSet() -} - -// SetSignal sets field value -func (o *SSHExecCommandResponse) SetSignal(v string) { - o.Signal.Set(&v) -} - -func (o SSHExecCommandResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SSHExecCommandResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["stdout"] = o.Stdout - toSerialize["stderr"] = o.Stderr - toSerialize["code"] = o.Code.Get() - toSerialize["signal"] = o.Signal.Get() - return toSerialize, nil -} - -type NullableSSHExecCommandResponse struct { - value *SSHExecCommandResponse - isSet bool -} - -func (v NullableSSHExecCommandResponse) Get() *SSHExecCommandResponse { - return v.value -} - -func (v *NullableSSHExecCommandResponse) Set(val *SSHExecCommandResponse) { - v.value = val - v.isSet = true -} - -func (v NullableSSHExecCommandResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableSSHExecCommandResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSSHExecCommandResponse(val *SSHExecCommandResponse) *NullableSSHExecCommandResponse { - return &NullableSSHExecCommandResponse{value: val, isSet: true} -} - -func (v NullableSSHExecCommandResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSSHExecCommandResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_transact_receipt_block_meta_data.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_transact_receipt_block_meta_data.go deleted file mode 100644 index 1fac5c8bbd..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_transact_receipt_block_meta_data.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the TransactReceiptBlockMetaData type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactReceiptBlockMetaData{} - -// TransactReceiptBlockMetaData struct for TransactReceiptBlockMetaData -type TransactReceiptBlockMetaData struct { - Mspid *string `json:"mspid,omitempty"` - BlockCreatorID *string `json:"blockCreatorID,omitempty"` - Signature *string `json:"signature,omitempty"` -} - -// NewTransactReceiptBlockMetaData instantiates a new TransactReceiptBlockMetaData object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactReceiptBlockMetaData() *TransactReceiptBlockMetaData { - this := TransactReceiptBlockMetaData{} - return &this -} - -// NewTransactReceiptBlockMetaDataWithDefaults instantiates a new TransactReceiptBlockMetaData object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactReceiptBlockMetaDataWithDefaults() *TransactReceiptBlockMetaData { - this := TransactReceiptBlockMetaData{} - return &this -} - -// GetMspid returns the Mspid field value if set, zero value otherwise. -func (o *TransactReceiptBlockMetaData) GetMspid() string { - if o == nil || IsNil(o.Mspid) { - var ret string - return ret - } - return *o.Mspid -} - -// GetMspidOk returns a tuple with the Mspid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactReceiptBlockMetaData) GetMspidOk() (*string, bool) { - if o == nil || IsNil(o.Mspid) { - return nil, false - } - return o.Mspid, true -} - -// HasMspid returns a boolean if a field has been set. -func (o *TransactReceiptBlockMetaData) HasMspid() bool { - if o != nil && !IsNil(o.Mspid) { - return true - } - - return false -} - -// SetMspid gets a reference to the given string and assigns it to the Mspid field. -func (o *TransactReceiptBlockMetaData) SetMspid(v string) { - o.Mspid = &v -} - -// GetBlockCreatorID returns the BlockCreatorID field value if set, zero value otherwise. -func (o *TransactReceiptBlockMetaData) GetBlockCreatorID() string { - if o == nil || IsNil(o.BlockCreatorID) { - var ret string - return ret - } - return *o.BlockCreatorID -} - -// GetBlockCreatorIDOk returns a tuple with the BlockCreatorID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactReceiptBlockMetaData) GetBlockCreatorIDOk() (*string, bool) { - if o == nil || IsNil(o.BlockCreatorID) { - return nil, false - } - return o.BlockCreatorID, true -} - -// HasBlockCreatorID returns a boolean if a field has been set. -func (o *TransactReceiptBlockMetaData) HasBlockCreatorID() bool { - if o != nil && !IsNil(o.BlockCreatorID) { - return true - } - - return false -} - -// SetBlockCreatorID gets a reference to the given string and assigns it to the BlockCreatorID field. -func (o *TransactReceiptBlockMetaData) SetBlockCreatorID(v string) { - o.BlockCreatorID = &v -} - -// GetSignature returns the Signature field value if set, zero value otherwise. -func (o *TransactReceiptBlockMetaData) GetSignature() string { - if o == nil || IsNil(o.Signature) { - var ret string - return ret - } - return *o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactReceiptBlockMetaData) GetSignatureOk() (*string, bool) { - if o == nil || IsNil(o.Signature) { - return nil, false - } - return o.Signature, true -} - -// HasSignature returns a boolean if a field has been set. -func (o *TransactReceiptBlockMetaData) HasSignature() bool { - if o != nil && !IsNil(o.Signature) { - return true - } - - return false -} - -// SetSignature gets a reference to the given string and assigns it to the Signature field. -func (o *TransactReceiptBlockMetaData) SetSignature(v string) { - o.Signature = &v -} - -func (o TransactReceiptBlockMetaData) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactReceiptBlockMetaData) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Mspid) { - toSerialize["mspid"] = o.Mspid - } - if !IsNil(o.BlockCreatorID) { - toSerialize["blockCreatorID"] = o.BlockCreatorID - } - if !IsNil(o.Signature) { - toSerialize["signature"] = o.Signature - } - return toSerialize, nil -} - -type NullableTransactReceiptBlockMetaData struct { - value *TransactReceiptBlockMetaData - isSet bool -} - -func (v NullableTransactReceiptBlockMetaData) Get() *TransactReceiptBlockMetaData { - return v.value -} - -func (v *NullableTransactReceiptBlockMetaData) Set(val *TransactReceiptBlockMetaData) { - v.value = val - v.isSet = true -} - -func (v NullableTransactReceiptBlockMetaData) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactReceiptBlockMetaData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactReceiptBlockMetaData(val *TransactReceiptBlockMetaData) *NullableTransactReceiptBlockMetaData { - return &NullableTransactReceiptBlockMetaData{value: val, isSet: true} -} - -func (v NullableTransactReceiptBlockMetaData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactReceiptBlockMetaData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_transact_receipt_transaction_creator.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_transact_receipt_transaction_creator.go deleted file mode 100644 index 3588d9cc44..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_transact_receipt_transaction_creator.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the TransactReceiptTransactionCreator type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactReceiptTransactionCreator{} - -// TransactReceiptTransactionCreator struct for TransactReceiptTransactionCreator -type TransactReceiptTransactionCreator struct { - Mspid *string `json:"mspid,omitempty"` - CreatorID *string `json:"creatorID,omitempty"` -} - -// NewTransactReceiptTransactionCreator instantiates a new TransactReceiptTransactionCreator object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactReceiptTransactionCreator() *TransactReceiptTransactionCreator { - this := TransactReceiptTransactionCreator{} - return &this -} - -// NewTransactReceiptTransactionCreatorWithDefaults instantiates a new TransactReceiptTransactionCreator object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactReceiptTransactionCreatorWithDefaults() *TransactReceiptTransactionCreator { - this := TransactReceiptTransactionCreator{} - return &this -} - -// GetMspid returns the Mspid field value if set, zero value otherwise. -func (o *TransactReceiptTransactionCreator) GetMspid() string { - if o == nil || IsNil(o.Mspid) { - var ret string - return ret - } - return *o.Mspid -} - -// GetMspidOk returns a tuple with the Mspid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactReceiptTransactionCreator) GetMspidOk() (*string, bool) { - if o == nil || IsNil(o.Mspid) { - return nil, false - } - return o.Mspid, true -} - -// HasMspid returns a boolean if a field has been set. -func (o *TransactReceiptTransactionCreator) HasMspid() bool { - if o != nil && !IsNil(o.Mspid) { - return true - } - - return false -} - -// SetMspid gets a reference to the given string and assigns it to the Mspid field. -func (o *TransactReceiptTransactionCreator) SetMspid(v string) { - o.Mspid = &v -} - -// GetCreatorID returns the CreatorID field value if set, zero value otherwise. -func (o *TransactReceiptTransactionCreator) GetCreatorID() string { - if o == nil || IsNil(o.CreatorID) { - var ret string - return ret - } - return *o.CreatorID -} - -// GetCreatorIDOk returns a tuple with the CreatorID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactReceiptTransactionCreator) GetCreatorIDOk() (*string, bool) { - if o == nil || IsNil(o.CreatorID) { - return nil, false - } - return o.CreatorID, true -} - -// HasCreatorID returns a boolean if a field has been set. -func (o *TransactReceiptTransactionCreator) HasCreatorID() bool { - if o != nil && !IsNil(o.CreatorID) { - return true - } - - return false -} - -// SetCreatorID gets a reference to the given string and assigns it to the CreatorID field. -func (o *TransactReceiptTransactionCreator) SetCreatorID(v string) { - o.CreatorID = &v -} - -func (o TransactReceiptTransactionCreator) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactReceiptTransactionCreator) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Mspid) { - toSerialize["mspid"] = o.Mspid - } - if !IsNil(o.CreatorID) { - toSerialize["creatorID"] = o.CreatorID - } - return toSerialize, nil -} - -type NullableTransactReceiptTransactionCreator struct { - value *TransactReceiptTransactionCreator - isSet bool -} - -func (v NullableTransactReceiptTransactionCreator) Get() *TransactReceiptTransactionCreator { - return v.value -} - -func (v *NullableTransactReceiptTransactionCreator) Set(val *TransactReceiptTransactionCreator) { - v.value = val - v.isSet = true -} - -func (v NullableTransactReceiptTransactionCreator) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactReceiptTransactionCreator) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactReceiptTransactionCreator(val *TransactReceiptTransactionCreator) *NullableTransactReceiptTransactionCreator { - return &NullableTransactReceiptTransactionCreator{value: val, isSet: true} -} - -func (v NullableTransactReceiptTransactionCreator) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactReceiptTransactionCreator) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_transact_receipt_transaction_endorsement.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_transact_receipt_transaction_endorsement.go deleted file mode 100644 index 3e5d15b349..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_transact_receipt_transaction_endorsement.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the TransactReceiptTransactionEndorsement type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactReceiptTransactionEndorsement{} - -// TransactReceiptTransactionEndorsement struct for TransactReceiptTransactionEndorsement -type TransactReceiptTransactionEndorsement struct { - Mspid *string `json:"mspid,omitempty"` - EndorserID *string `json:"endorserID,omitempty"` - Signature *string `json:"signature,omitempty"` -} - -// NewTransactReceiptTransactionEndorsement instantiates a new TransactReceiptTransactionEndorsement object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactReceiptTransactionEndorsement() *TransactReceiptTransactionEndorsement { - this := TransactReceiptTransactionEndorsement{} - return &this -} - -// NewTransactReceiptTransactionEndorsementWithDefaults instantiates a new TransactReceiptTransactionEndorsement object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactReceiptTransactionEndorsementWithDefaults() *TransactReceiptTransactionEndorsement { - this := TransactReceiptTransactionEndorsement{} - return &this -} - -// GetMspid returns the Mspid field value if set, zero value otherwise. -func (o *TransactReceiptTransactionEndorsement) GetMspid() string { - if o == nil || IsNil(o.Mspid) { - var ret string - return ret - } - return *o.Mspid -} - -// GetMspidOk returns a tuple with the Mspid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactReceiptTransactionEndorsement) GetMspidOk() (*string, bool) { - if o == nil || IsNil(o.Mspid) { - return nil, false - } - return o.Mspid, true -} - -// HasMspid returns a boolean if a field has been set. -func (o *TransactReceiptTransactionEndorsement) HasMspid() bool { - if o != nil && !IsNil(o.Mspid) { - return true - } - - return false -} - -// SetMspid gets a reference to the given string and assigns it to the Mspid field. -func (o *TransactReceiptTransactionEndorsement) SetMspid(v string) { - o.Mspid = &v -} - -// GetEndorserID returns the EndorserID field value if set, zero value otherwise. -func (o *TransactReceiptTransactionEndorsement) GetEndorserID() string { - if o == nil || IsNil(o.EndorserID) { - var ret string - return ret - } - return *o.EndorserID -} - -// GetEndorserIDOk returns a tuple with the EndorserID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactReceiptTransactionEndorsement) GetEndorserIDOk() (*string, bool) { - if o == nil || IsNil(o.EndorserID) { - return nil, false - } - return o.EndorserID, true -} - -// HasEndorserID returns a boolean if a field has been set. -func (o *TransactReceiptTransactionEndorsement) HasEndorserID() bool { - if o != nil && !IsNil(o.EndorserID) { - return true - } - - return false -} - -// SetEndorserID gets a reference to the given string and assigns it to the EndorserID field. -func (o *TransactReceiptTransactionEndorsement) SetEndorserID(v string) { - o.EndorserID = &v -} - -// GetSignature returns the Signature field value if set, zero value otherwise. -func (o *TransactReceiptTransactionEndorsement) GetSignature() string { - if o == nil || IsNil(o.Signature) { - var ret string - return ret - } - return *o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactReceiptTransactionEndorsement) GetSignatureOk() (*string, bool) { - if o == nil || IsNil(o.Signature) { - return nil, false - } - return o.Signature, true -} - -// HasSignature returns a boolean if a field has been set. -func (o *TransactReceiptTransactionEndorsement) HasSignature() bool { - if o != nil && !IsNil(o.Signature) { - return true - } - - return false -} - -// SetSignature gets a reference to the given string and assigns it to the Signature field. -func (o *TransactReceiptTransactionEndorsement) SetSignature(v string) { - o.Signature = &v -} - -func (o TransactReceiptTransactionEndorsement) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactReceiptTransactionEndorsement) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Mspid) { - toSerialize["mspid"] = o.Mspid - } - if !IsNil(o.EndorserID) { - toSerialize["endorserID"] = o.EndorserID - } - if !IsNil(o.Signature) { - toSerialize["signature"] = o.Signature - } - return toSerialize, nil -} - -type NullableTransactReceiptTransactionEndorsement struct { - value *TransactReceiptTransactionEndorsement - isSet bool -} - -func (v NullableTransactReceiptTransactionEndorsement) Get() *TransactReceiptTransactionEndorsement { - return v.value -} - -func (v *NullableTransactReceiptTransactionEndorsement) Set(val *TransactReceiptTransactionEndorsement) { - v.value = val - v.isSet = true -} - -func (v NullableTransactReceiptTransactionEndorsement) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactReceiptTransactionEndorsement) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactReceiptTransactionEndorsement(val *TransactReceiptTransactionEndorsement) *NullableTransactReceiptTransactionEndorsement { - return &NullableTransactReceiptTransactionEndorsement{value: val, isSet: true} -} - -func (v NullableTransactReceiptTransactionEndorsement) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactReceiptTransactionEndorsement) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_vault_transit_key.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_vault_transit_key.go deleted file mode 100644 index e5c3d410de..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_vault_transit_key.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the VaultTransitKey type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VaultTransitKey{} - -// VaultTransitKey vault key details for signing fabric message with private key stored with transit engine. -type VaultTransitKey struct { - // label of private key - KeyName string `json:"keyName"` - // token for accessing private key - Token string `json:"token"` -} - -// NewVaultTransitKey instantiates a new VaultTransitKey object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewVaultTransitKey(keyName string, token string) *VaultTransitKey { - this := VaultTransitKey{} - this.KeyName = keyName - this.Token = token - return &this -} - -// NewVaultTransitKeyWithDefaults instantiates a new VaultTransitKey object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewVaultTransitKeyWithDefaults() *VaultTransitKey { - this := VaultTransitKey{} - return &this -} - -// GetKeyName returns the KeyName field value -func (o *VaultTransitKey) GetKeyName() string { - if o == nil { - var ret string - return ret - } - - return o.KeyName -} - -// GetKeyNameOk returns a tuple with the KeyName field value -// and a boolean to check if the value has been set. -func (o *VaultTransitKey) GetKeyNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeyName, true -} - -// SetKeyName sets field value -func (o *VaultTransitKey) SetKeyName(v string) { - o.KeyName = v -} - -// GetToken returns the Token field value -func (o *VaultTransitKey) GetToken() string { - if o == nil { - var ret string - return ret - } - - return o.Token -} - -// GetTokenOk returns a tuple with the Token field value -// and a boolean to check if the value has been set. -func (o *VaultTransitKey) GetTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Token, true -} - -// SetToken sets field value -func (o *VaultTransitKey) SetToken(v string) { - o.Token = v -} - -func (o VaultTransitKey) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VaultTransitKey) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["keyName"] = o.KeyName - toSerialize["token"] = o.Token - return toSerialize, nil -} - -type NullableVaultTransitKey struct { - value *VaultTransitKey - isSet bool -} - -func (v NullableVaultTransitKey) Get() *VaultTransitKey { - return v.value -} - -func (v *NullableVaultTransitKey) Set(val *VaultTransitKey) { - v.value = val - v.isSet = true -} - -func (v NullableVaultTransitKey) IsSet() bool { - return v.isSet -} - -func (v *NullableVaultTransitKey) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVaultTransitKey(val *VaultTransitKey) *NullableVaultTransitKey { - return &NullableVaultTransitKey{value: val, isSet: true} -} - -func (v NullableVaultTransitKey) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVaultTransitKey) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_cactus_error_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_cactus_error_response_v1.go deleted file mode 100644 index 98f1c1f14d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_cactus_error_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the WatchBlocksCactusErrorResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksCactusErrorResponseV1{} - -// WatchBlocksCactusErrorResponseV1 Error response from WatchBlocks operation. -type WatchBlocksCactusErrorResponseV1 struct { - // Error code. - Code float32 `json:"code"` - // Description of the error. - ErrorMessage string `json:"errorMessage"` -} - -// NewWatchBlocksCactusErrorResponseV1 instantiates a new WatchBlocksCactusErrorResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksCactusErrorResponseV1(code float32, errorMessage string) *WatchBlocksCactusErrorResponseV1 { - this := WatchBlocksCactusErrorResponseV1{} - this.Code = code - this.ErrorMessage = errorMessage - return &this -} - -// NewWatchBlocksCactusErrorResponseV1WithDefaults instantiates a new WatchBlocksCactusErrorResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksCactusErrorResponseV1WithDefaults() *WatchBlocksCactusErrorResponseV1 { - this := WatchBlocksCactusErrorResponseV1{} - return &this -} - -// GetCode returns the Code field value -func (o *WatchBlocksCactusErrorResponseV1) GetCode() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Code -} - -// GetCodeOk returns a tuple with the Code field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksCactusErrorResponseV1) GetCodeOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Code, true -} - -// SetCode sets field value -func (o *WatchBlocksCactusErrorResponseV1) SetCode(v float32) { - o.Code = v -} - -// GetErrorMessage returns the ErrorMessage field value -func (o *WatchBlocksCactusErrorResponseV1) GetErrorMessage() string { - if o == nil { - var ret string - return ret - } - - return o.ErrorMessage -} - -// GetErrorMessageOk returns a tuple with the ErrorMessage field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksCactusErrorResponseV1) GetErrorMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ErrorMessage, true -} - -// SetErrorMessage sets field value -func (o *WatchBlocksCactusErrorResponseV1) SetErrorMessage(v string) { - o.ErrorMessage = v -} - -func (o WatchBlocksCactusErrorResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksCactusErrorResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["code"] = o.Code - toSerialize["errorMessage"] = o.ErrorMessage - return toSerialize, nil -} - -type NullableWatchBlocksCactusErrorResponseV1 struct { - value *WatchBlocksCactusErrorResponseV1 - isSet bool -} - -func (v NullableWatchBlocksCactusErrorResponseV1) Get() *WatchBlocksCactusErrorResponseV1 { - return v.value -} - -func (v *NullableWatchBlocksCactusErrorResponseV1) Set(val *WatchBlocksCactusErrorResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksCactusErrorResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksCactusErrorResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksCactusErrorResponseV1(val *WatchBlocksCactusErrorResponseV1) *NullableWatchBlocksCactusErrorResponseV1 { - return &NullableWatchBlocksCactusErrorResponseV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksCactusErrorResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksCactusErrorResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_cactus_transactions_event_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_cactus_transactions_event_v1.go deleted file mode 100644 index 53eff24efe..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_cactus_transactions_event_v1.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the WatchBlocksCactusTransactionsEventV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksCactusTransactionsEventV1{} - -// WatchBlocksCactusTransactionsEventV1 Transaction summary from commited block. -type WatchBlocksCactusTransactionsEventV1 struct { - // ChainCode containing function that was executed. - ChaincodeId string `json:"chaincodeId"` - // Transaction identifier. - TransactionId string `json:"transactionId"` - // Function name that was executed. - FunctionName string `json:"functionName"` - // List of function arguments. - FunctionArgs []string `json:"functionArgs"` -} - -// NewWatchBlocksCactusTransactionsEventV1 instantiates a new WatchBlocksCactusTransactionsEventV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksCactusTransactionsEventV1(chaincodeId string, transactionId string, functionName string, functionArgs []string) *WatchBlocksCactusTransactionsEventV1 { - this := WatchBlocksCactusTransactionsEventV1{} - this.ChaincodeId = chaincodeId - this.TransactionId = transactionId - this.FunctionName = functionName - this.FunctionArgs = functionArgs - return &this -} - -// NewWatchBlocksCactusTransactionsEventV1WithDefaults instantiates a new WatchBlocksCactusTransactionsEventV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksCactusTransactionsEventV1WithDefaults() *WatchBlocksCactusTransactionsEventV1 { - this := WatchBlocksCactusTransactionsEventV1{} - return &this -} - -// GetChaincodeId returns the ChaincodeId field value -func (o *WatchBlocksCactusTransactionsEventV1) GetChaincodeId() string { - if o == nil { - var ret string - return ret - } - - return o.ChaincodeId -} - -// GetChaincodeIdOk returns a tuple with the ChaincodeId field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksCactusTransactionsEventV1) GetChaincodeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChaincodeId, true -} - -// SetChaincodeId sets field value -func (o *WatchBlocksCactusTransactionsEventV1) SetChaincodeId(v string) { - o.ChaincodeId = v -} - -// GetTransactionId returns the TransactionId field value -func (o *WatchBlocksCactusTransactionsEventV1) GetTransactionId() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionId -} - -// GetTransactionIdOk returns a tuple with the TransactionId field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksCactusTransactionsEventV1) GetTransactionIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionId, true -} - -// SetTransactionId sets field value -func (o *WatchBlocksCactusTransactionsEventV1) SetTransactionId(v string) { - o.TransactionId = v -} - -// GetFunctionName returns the FunctionName field value -func (o *WatchBlocksCactusTransactionsEventV1) GetFunctionName() string { - if o == nil { - var ret string - return ret - } - - return o.FunctionName -} - -// GetFunctionNameOk returns a tuple with the FunctionName field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksCactusTransactionsEventV1) GetFunctionNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FunctionName, true -} - -// SetFunctionName sets field value -func (o *WatchBlocksCactusTransactionsEventV1) SetFunctionName(v string) { - o.FunctionName = v -} - -// GetFunctionArgs returns the FunctionArgs field value -func (o *WatchBlocksCactusTransactionsEventV1) GetFunctionArgs() []string { - if o == nil { - var ret []string - return ret - } - - return o.FunctionArgs -} - -// GetFunctionArgsOk returns a tuple with the FunctionArgs field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksCactusTransactionsEventV1) GetFunctionArgsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.FunctionArgs, true -} - -// SetFunctionArgs sets field value -func (o *WatchBlocksCactusTransactionsEventV1) SetFunctionArgs(v []string) { - o.FunctionArgs = v -} - -func (o WatchBlocksCactusTransactionsEventV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksCactusTransactionsEventV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["chaincodeId"] = o.ChaincodeId - toSerialize["transactionId"] = o.TransactionId - toSerialize["functionName"] = o.FunctionName - toSerialize["functionArgs"] = o.FunctionArgs - return toSerialize, nil -} - -type NullableWatchBlocksCactusTransactionsEventV1 struct { - value *WatchBlocksCactusTransactionsEventV1 - isSet bool -} - -func (v NullableWatchBlocksCactusTransactionsEventV1) Get() *WatchBlocksCactusTransactionsEventV1 { - return v.value -} - -func (v *NullableWatchBlocksCactusTransactionsEventV1) Set(val *WatchBlocksCactusTransactionsEventV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksCactusTransactionsEventV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksCactusTransactionsEventV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksCactusTransactionsEventV1(val *WatchBlocksCactusTransactionsEventV1) *NullableWatchBlocksCactusTransactionsEventV1 { - return &NullableWatchBlocksCactusTransactionsEventV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksCactusTransactionsEventV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksCactusTransactionsEventV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_cactus_transactions_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_cactus_transactions_response_v1.go deleted file mode 100644 index 2f02988591..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_cactus_transactions_response_v1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the WatchBlocksCactusTransactionsResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksCactusTransactionsResponseV1{} - -// WatchBlocksCactusTransactionsResponseV1 Custom response containing block transactions summary. Compatible with legacy fabric-socketio connector monitoring. -type WatchBlocksCactusTransactionsResponseV1 struct { - // List of transactions summary - CactusTransactionsEvents []WatchBlocksCactusTransactionsEventV1 `json:"cactusTransactionsEvents"` -} - -// NewWatchBlocksCactusTransactionsResponseV1 instantiates a new WatchBlocksCactusTransactionsResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksCactusTransactionsResponseV1(cactusTransactionsEvents []WatchBlocksCactusTransactionsEventV1) *WatchBlocksCactusTransactionsResponseV1 { - this := WatchBlocksCactusTransactionsResponseV1{} - this.CactusTransactionsEvents = cactusTransactionsEvents - return &this -} - -// NewWatchBlocksCactusTransactionsResponseV1WithDefaults instantiates a new WatchBlocksCactusTransactionsResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksCactusTransactionsResponseV1WithDefaults() *WatchBlocksCactusTransactionsResponseV1 { - this := WatchBlocksCactusTransactionsResponseV1{} - return &this -} - -// GetCactusTransactionsEvents returns the CactusTransactionsEvents field value -func (o *WatchBlocksCactusTransactionsResponseV1) GetCactusTransactionsEvents() []WatchBlocksCactusTransactionsEventV1 { - if o == nil { - var ret []WatchBlocksCactusTransactionsEventV1 - return ret - } - - return o.CactusTransactionsEvents -} - -// GetCactusTransactionsEventsOk returns a tuple with the CactusTransactionsEvents field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksCactusTransactionsResponseV1) GetCactusTransactionsEventsOk() ([]WatchBlocksCactusTransactionsEventV1, bool) { - if o == nil { - return nil, false - } - return o.CactusTransactionsEvents, true -} - -// SetCactusTransactionsEvents sets field value -func (o *WatchBlocksCactusTransactionsResponseV1) SetCactusTransactionsEvents(v []WatchBlocksCactusTransactionsEventV1) { - o.CactusTransactionsEvents = v -} - -func (o WatchBlocksCactusTransactionsResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksCactusTransactionsResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cactusTransactionsEvents"] = o.CactusTransactionsEvents - return toSerialize, nil -} - -type NullableWatchBlocksCactusTransactionsResponseV1 struct { - value *WatchBlocksCactusTransactionsResponseV1 - isSet bool -} - -func (v NullableWatchBlocksCactusTransactionsResponseV1) Get() *WatchBlocksCactusTransactionsResponseV1 { - return v.value -} - -func (v *NullableWatchBlocksCactusTransactionsResponseV1) Set(val *WatchBlocksCactusTransactionsResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksCactusTransactionsResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksCactusTransactionsResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksCactusTransactionsResponseV1(val *WatchBlocksCactusTransactionsResponseV1) *NullableWatchBlocksCactusTransactionsResponseV1 { - return &NullableWatchBlocksCactusTransactionsResponseV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksCactusTransactionsResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksCactusTransactionsResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_delegated_sign_options_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_delegated_sign_options_v1.go deleted file mode 100644 index bccc4557e3..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_delegated_sign_options_v1.go +++ /dev/null @@ -1,273 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the WatchBlocksDelegatedSignOptionsV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksDelegatedSignOptionsV1{} - -// WatchBlocksDelegatedSignOptionsV1 Options passed when subscribing to block monitoring with delegated signing. -type WatchBlocksDelegatedSignOptionsV1 struct { - Type WatchBlocksListenerTypeV1 `json:"type"` - // From which block start monitoring. Defaults to latest. - StartBlock *string `json:"startBlock,omitempty"` - ChannelName string `json:"channelName"` - SignerCertificate string `json:"signerCertificate"` - SignerMspID string `json:"signerMspID"` - // Can be used to uniquely identify and authorize signing request - UniqueTransactionData interface{} `json:"uniqueTransactionData,omitempty"` -} - -// NewWatchBlocksDelegatedSignOptionsV1 instantiates a new WatchBlocksDelegatedSignOptionsV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksDelegatedSignOptionsV1(type_ WatchBlocksListenerTypeV1, channelName string, signerCertificate string, signerMspID string) *WatchBlocksDelegatedSignOptionsV1 { - this := WatchBlocksDelegatedSignOptionsV1{} - this.Type = type_ - this.ChannelName = channelName - this.SignerCertificate = signerCertificate - this.SignerMspID = signerMspID - return &this -} - -// NewWatchBlocksDelegatedSignOptionsV1WithDefaults instantiates a new WatchBlocksDelegatedSignOptionsV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksDelegatedSignOptionsV1WithDefaults() *WatchBlocksDelegatedSignOptionsV1 { - this := WatchBlocksDelegatedSignOptionsV1{} - return &this -} - -// GetType returns the Type field value -func (o *WatchBlocksDelegatedSignOptionsV1) GetType() WatchBlocksListenerTypeV1 { - if o == nil { - var ret WatchBlocksListenerTypeV1 - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksDelegatedSignOptionsV1) GetTypeOk() (*WatchBlocksListenerTypeV1, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *WatchBlocksDelegatedSignOptionsV1) SetType(v WatchBlocksListenerTypeV1) { - o.Type = v -} - -// GetStartBlock returns the StartBlock field value if set, zero value otherwise. -func (o *WatchBlocksDelegatedSignOptionsV1) GetStartBlock() string { - if o == nil || IsNil(o.StartBlock) { - var ret string - return ret - } - return *o.StartBlock -} - -// GetStartBlockOk returns a tuple with the StartBlock field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksDelegatedSignOptionsV1) GetStartBlockOk() (*string, bool) { - if o == nil || IsNil(o.StartBlock) { - return nil, false - } - return o.StartBlock, true -} - -// HasStartBlock returns a boolean if a field has been set. -func (o *WatchBlocksDelegatedSignOptionsV1) HasStartBlock() bool { - if o != nil && !IsNil(o.StartBlock) { - return true - } - - return false -} - -// SetStartBlock gets a reference to the given string and assigns it to the StartBlock field. -func (o *WatchBlocksDelegatedSignOptionsV1) SetStartBlock(v string) { - o.StartBlock = &v -} - -// GetChannelName returns the ChannelName field value -func (o *WatchBlocksDelegatedSignOptionsV1) GetChannelName() string { - if o == nil { - var ret string - return ret - } - - return o.ChannelName -} - -// GetChannelNameOk returns a tuple with the ChannelName field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksDelegatedSignOptionsV1) GetChannelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChannelName, true -} - -// SetChannelName sets field value -func (o *WatchBlocksDelegatedSignOptionsV1) SetChannelName(v string) { - o.ChannelName = v -} - -// GetSignerCertificate returns the SignerCertificate field value -func (o *WatchBlocksDelegatedSignOptionsV1) GetSignerCertificate() string { - if o == nil { - var ret string - return ret - } - - return o.SignerCertificate -} - -// GetSignerCertificateOk returns a tuple with the SignerCertificate field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksDelegatedSignOptionsV1) GetSignerCertificateOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SignerCertificate, true -} - -// SetSignerCertificate sets field value -func (o *WatchBlocksDelegatedSignOptionsV1) SetSignerCertificate(v string) { - o.SignerCertificate = v -} - -// GetSignerMspID returns the SignerMspID field value -func (o *WatchBlocksDelegatedSignOptionsV1) GetSignerMspID() string { - if o == nil { - var ret string - return ret - } - - return o.SignerMspID -} - -// GetSignerMspIDOk returns a tuple with the SignerMspID field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksDelegatedSignOptionsV1) GetSignerMspIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SignerMspID, true -} - -// SetSignerMspID sets field value -func (o *WatchBlocksDelegatedSignOptionsV1) SetSignerMspID(v string) { - o.SignerMspID = v -} - -// GetUniqueTransactionData returns the UniqueTransactionData field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *WatchBlocksDelegatedSignOptionsV1) GetUniqueTransactionData() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.UniqueTransactionData -} - -// GetUniqueTransactionDataOk returns a tuple with the UniqueTransactionData field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *WatchBlocksDelegatedSignOptionsV1) GetUniqueTransactionDataOk() (*interface{}, bool) { - if o == nil || IsNil(o.UniqueTransactionData) { - return nil, false - } - return &o.UniqueTransactionData, true -} - -// HasUniqueTransactionData returns a boolean if a field has been set. -func (o *WatchBlocksDelegatedSignOptionsV1) HasUniqueTransactionData() bool { - if o != nil && IsNil(o.UniqueTransactionData) { - return true - } - - return false -} - -// SetUniqueTransactionData gets a reference to the given interface{} and assigns it to the UniqueTransactionData field. -func (o *WatchBlocksDelegatedSignOptionsV1) SetUniqueTransactionData(v interface{}) { - o.UniqueTransactionData = v -} - -func (o WatchBlocksDelegatedSignOptionsV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksDelegatedSignOptionsV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - if !IsNil(o.StartBlock) { - toSerialize["startBlock"] = o.StartBlock - } - toSerialize["channelName"] = o.ChannelName - toSerialize["signerCertificate"] = o.SignerCertificate - toSerialize["signerMspID"] = o.SignerMspID - if o.UniqueTransactionData != nil { - toSerialize["uniqueTransactionData"] = o.UniqueTransactionData - } - return toSerialize, nil -} - -type NullableWatchBlocksDelegatedSignOptionsV1 struct { - value *WatchBlocksDelegatedSignOptionsV1 - isSet bool -} - -func (v NullableWatchBlocksDelegatedSignOptionsV1) Get() *WatchBlocksDelegatedSignOptionsV1 { - return v.value -} - -func (v *NullableWatchBlocksDelegatedSignOptionsV1) Set(val *WatchBlocksDelegatedSignOptionsV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksDelegatedSignOptionsV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksDelegatedSignOptionsV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksDelegatedSignOptionsV1(val *WatchBlocksDelegatedSignOptionsV1) *NullableWatchBlocksDelegatedSignOptionsV1 { - return &NullableWatchBlocksDelegatedSignOptionsV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksDelegatedSignOptionsV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksDelegatedSignOptionsV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_filtered_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_filtered_response_v1.go deleted file mode 100644 index b165ba2251..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_filtered_response_v1.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the WatchBlocksFilteredResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksFilteredResponseV1{} - -// WatchBlocksFilteredResponseV1 Response that corresponds to Fabric SDK 'filtered' EventType. -type WatchBlocksFilteredResponseV1 struct { - // Filtered commited block. - FilteredBlock interface{} `json:"filteredBlock"` -} - -// NewWatchBlocksFilteredResponseV1 instantiates a new WatchBlocksFilteredResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksFilteredResponseV1(filteredBlock interface{}) *WatchBlocksFilteredResponseV1 { - this := WatchBlocksFilteredResponseV1{} - this.FilteredBlock = filteredBlock - return &this -} - -// NewWatchBlocksFilteredResponseV1WithDefaults instantiates a new WatchBlocksFilteredResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksFilteredResponseV1WithDefaults() *WatchBlocksFilteredResponseV1 { - this := WatchBlocksFilteredResponseV1{} - return &this -} - -// GetFilteredBlock returns the FilteredBlock field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *WatchBlocksFilteredResponseV1) GetFilteredBlock() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.FilteredBlock -} - -// GetFilteredBlockOk returns a tuple with the FilteredBlock field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *WatchBlocksFilteredResponseV1) GetFilteredBlockOk() (*interface{}, bool) { - if o == nil || IsNil(o.FilteredBlock) { - return nil, false - } - return &o.FilteredBlock, true -} - -// SetFilteredBlock sets field value -func (o *WatchBlocksFilteredResponseV1) SetFilteredBlock(v interface{}) { - o.FilteredBlock = v -} - -func (o WatchBlocksFilteredResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksFilteredResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.FilteredBlock != nil { - toSerialize["filteredBlock"] = o.FilteredBlock - } - return toSerialize, nil -} - -type NullableWatchBlocksFilteredResponseV1 struct { - value *WatchBlocksFilteredResponseV1 - isSet bool -} - -func (v NullableWatchBlocksFilteredResponseV1) Get() *WatchBlocksFilteredResponseV1 { - return v.value -} - -func (v *NullableWatchBlocksFilteredResponseV1) Set(val *WatchBlocksFilteredResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksFilteredResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksFilteredResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksFilteredResponseV1(val *WatchBlocksFilteredResponseV1) *NullableWatchBlocksFilteredResponseV1 { - return &NullableWatchBlocksFilteredResponseV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksFilteredResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksFilteredResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_full_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_full_response_v1.go deleted file mode 100644 index fcee751af7..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_full_response_v1.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the WatchBlocksFullResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksFullResponseV1{} - -// WatchBlocksFullResponseV1 Response that corresponds to Fabric SDK 'full' EventType. -type WatchBlocksFullResponseV1 struct { - // Full commited block. - FullBlock interface{} `json:"fullBlock"` -} - -// NewWatchBlocksFullResponseV1 instantiates a new WatchBlocksFullResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksFullResponseV1(fullBlock interface{}) *WatchBlocksFullResponseV1 { - this := WatchBlocksFullResponseV1{} - this.FullBlock = fullBlock - return &this -} - -// NewWatchBlocksFullResponseV1WithDefaults instantiates a new WatchBlocksFullResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksFullResponseV1WithDefaults() *WatchBlocksFullResponseV1 { - this := WatchBlocksFullResponseV1{} - return &this -} - -// GetFullBlock returns the FullBlock field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *WatchBlocksFullResponseV1) GetFullBlock() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.FullBlock -} - -// GetFullBlockOk returns a tuple with the FullBlock field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *WatchBlocksFullResponseV1) GetFullBlockOk() (*interface{}, bool) { - if o == nil || IsNil(o.FullBlock) { - return nil, false - } - return &o.FullBlock, true -} - -// SetFullBlock sets field value -func (o *WatchBlocksFullResponseV1) SetFullBlock(v interface{}) { - o.FullBlock = v -} - -func (o WatchBlocksFullResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksFullResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.FullBlock != nil { - toSerialize["fullBlock"] = o.FullBlock - } - return toSerialize, nil -} - -type NullableWatchBlocksFullResponseV1 struct { - value *WatchBlocksFullResponseV1 - isSet bool -} - -func (v NullableWatchBlocksFullResponseV1) Get() *WatchBlocksFullResponseV1 { - return v.value -} - -func (v *NullableWatchBlocksFullResponseV1) Set(val *WatchBlocksFullResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksFullResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksFullResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksFullResponseV1(val *WatchBlocksFullResponseV1) *NullableWatchBlocksFullResponseV1 { - return &NullableWatchBlocksFullResponseV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksFullResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksFullResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_listener_type_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_listener_type_v1.go deleted file mode 100644 index bf4fa4409d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_listener_type_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksListenerTypeV1 Response type from WatchBlocks. 'Cacti*' are custom views, others correspond to fabric SDK call. -type WatchBlocksListenerTypeV1 string - -// List of WatchBlocksListenerTypeV1 -const ( - Filtered WatchBlocksListenerTypeV1 = "filtered" - Full WatchBlocksListenerTypeV1 = "full" - Private WatchBlocksListenerTypeV1 = "private" - CactiTransactions WatchBlocksListenerTypeV1 = "cacti:transactions" - CactiFullBlock WatchBlocksListenerTypeV1 = "cacti:full-block" -) - -// All allowed values of WatchBlocksListenerTypeV1 enum -var AllowedWatchBlocksListenerTypeV1EnumValues = []WatchBlocksListenerTypeV1{ - "filtered", - "full", - "private", - "cacti:transactions", - "cacti:full-block", -} - -func (v *WatchBlocksListenerTypeV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := WatchBlocksListenerTypeV1(value) - for _, existing := range AllowedWatchBlocksListenerTypeV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WatchBlocksListenerTypeV1", value) -} - -// NewWatchBlocksListenerTypeV1FromValue returns a pointer to a valid WatchBlocksListenerTypeV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWatchBlocksListenerTypeV1FromValue(v string) (*WatchBlocksListenerTypeV1, error) { - ev := WatchBlocksListenerTypeV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WatchBlocksListenerTypeV1: valid values are %v", v, AllowedWatchBlocksListenerTypeV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v WatchBlocksListenerTypeV1) IsValid() bool { - for _, existing := range AllowedWatchBlocksListenerTypeV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WatchBlocksListenerTypeV1 value -func (v WatchBlocksListenerTypeV1) Ptr() *WatchBlocksListenerTypeV1 { - return &v -} - -type NullableWatchBlocksListenerTypeV1 struct { - value *WatchBlocksListenerTypeV1 - isSet bool -} - -func (v NullableWatchBlocksListenerTypeV1) Get() *WatchBlocksListenerTypeV1 { - return v.value -} - -func (v *NullableWatchBlocksListenerTypeV1) Set(val *WatchBlocksListenerTypeV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksListenerTypeV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksListenerTypeV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksListenerTypeV1(val *WatchBlocksListenerTypeV1) *NullableWatchBlocksListenerTypeV1 { - return &NullableWatchBlocksListenerTypeV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksListenerTypeV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksListenerTypeV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_options_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_options_v1.go deleted file mode 100644 index fcf9d33b19..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_options_v1.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the WatchBlocksOptionsV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksOptionsV1{} - -// WatchBlocksOptionsV1 Options passed when subscribing to block monitoring. -type WatchBlocksOptionsV1 struct { - // Hyperledger Fabric channel to connect to. - ChannelName string `json:"channelName"` - GatewayOptions GatewayOptions `json:"gatewayOptions"` - Type WatchBlocksListenerTypeV1 `json:"type"` - // From which block start monitoring. Defaults to latest. - StartBlock *string `json:"startBlock,omitempty"` -} - -// NewWatchBlocksOptionsV1 instantiates a new WatchBlocksOptionsV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksOptionsV1(channelName string, gatewayOptions GatewayOptions, type_ WatchBlocksListenerTypeV1) *WatchBlocksOptionsV1 { - this := WatchBlocksOptionsV1{} - this.ChannelName = channelName - this.GatewayOptions = gatewayOptions - this.Type = type_ - return &this -} - -// NewWatchBlocksOptionsV1WithDefaults instantiates a new WatchBlocksOptionsV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksOptionsV1WithDefaults() *WatchBlocksOptionsV1 { - this := WatchBlocksOptionsV1{} - return &this -} - -// GetChannelName returns the ChannelName field value -func (o *WatchBlocksOptionsV1) GetChannelName() string { - if o == nil { - var ret string - return ret - } - - return o.ChannelName -} - -// GetChannelNameOk returns a tuple with the ChannelName field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksOptionsV1) GetChannelNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChannelName, true -} - -// SetChannelName sets field value -func (o *WatchBlocksOptionsV1) SetChannelName(v string) { - o.ChannelName = v -} - -// GetGatewayOptions returns the GatewayOptions field value -func (o *WatchBlocksOptionsV1) GetGatewayOptions() GatewayOptions { - if o == nil { - var ret GatewayOptions - return ret - } - - return o.GatewayOptions -} - -// GetGatewayOptionsOk returns a tuple with the GatewayOptions field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksOptionsV1) GetGatewayOptionsOk() (*GatewayOptions, bool) { - if o == nil { - return nil, false - } - return &o.GatewayOptions, true -} - -// SetGatewayOptions sets field value -func (o *WatchBlocksOptionsV1) SetGatewayOptions(v GatewayOptions) { - o.GatewayOptions = v -} - -// GetType returns the Type field value -func (o *WatchBlocksOptionsV1) GetType() WatchBlocksListenerTypeV1 { - if o == nil { - var ret WatchBlocksListenerTypeV1 - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksOptionsV1) GetTypeOk() (*WatchBlocksListenerTypeV1, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *WatchBlocksOptionsV1) SetType(v WatchBlocksListenerTypeV1) { - o.Type = v -} - -// GetStartBlock returns the StartBlock field value if set, zero value otherwise. -func (o *WatchBlocksOptionsV1) GetStartBlock() string { - if o == nil || IsNil(o.StartBlock) { - var ret string - return ret - } - return *o.StartBlock -} - -// GetStartBlockOk returns a tuple with the StartBlock field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksOptionsV1) GetStartBlockOk() (*string, bool) { - if o == nil || IsNil(o.StartBlock) { - return nil, false - } - return o.StartBlock, true -} - -// HasStartBlock returns a boolean if a field has been set. -func (o *WatchBlocksOptionsV1) HasStartBlock() bool { - if o != nil && !IsNil(o.StartBlock) { - return true - } - - return false -} - -// SetStartBlock gets a reference to the given string and assigns it to the StartBlock field. -func (o *WatchBlocksOptionsV1) SetStartBlock(v string) { - o.StartBlock = &v -} - -func (o WatchBlocksOptionsV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksOptionsV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["channelName"] = o.ChannelName - toSerialize["gatewayOptions"] = o.GatewayOptions - toSerialize["type"] = o.Type - if !IsNil(o.StartBlock) { - toSerialize["startBlock"] = o.StartBlock - } - return toSerialize, nil -} - -type NullableWatchBlocksOptionsV1 struct { - value *WatchBlocksOptionsV1 - isSet bool -} - -func (v NullableWatchBlocksOptionsV1) Get() *WatchBlocksOptionsV1 { - return v.value -} - -func (v *NullableWatchBlocksOptionsV1) Set(val *WatchBlocksOptionsV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksOptionsV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksOptionsV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksOptionsV1(val *WatchBlocksOptionsV1) *NullableWatchBlocksOptionsV1 { - return &NullableWatchBlocksOptionsV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksOptionsV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksOptionsV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_private_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_private_response_v1.go deleted file mode 100644 index 8fd1306920..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_private_response_v1.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the WatchBlocksPrivateResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksPrivateResponseV1{} - -// WatchBlocksPrivateResponseV1 Response that corresponds to Fabric SDK 'private' EventType. -type WatchBlocksPrivateResponseV1 struct { - // Private commited block. - PrivateBlock interface{} `json:"privateBlock"` -} - -// NewWatchBlocksPrivateResponseV1 instantiates a new WatchBlocksPrivateResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksPrivateResponseV1(privateBlock interface{}) *WatchBlocksPrivateResponseV1 { - this := WatchBlocksPrivateResponseV1{} - this.PrivateBlock = privateBlock - return &this -} - -// NewWatchBlocksPrivateResponseV1WithDefaults instantiates a new WatchBlocksPrivateResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksPrivateResponseV1WithDefaults() *WatchBlocksPrivateResponseV1 { - this := WatchBlocksPrivateResponseV1{} - return &this -} - -// GetPrivateBlock returns the PrivateBlock field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *WatchBlocksPrivateResponseV1) GetPrivateBlock() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.PrivateBlock -} - -// GetPrivateBlockOk returns a tuple with the PrivateBlock field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *WatchBlocksPrivateResponseV1) GetPrivateBlockOk() (*interface{}, bool) { - if o == nil || IsNil(o.PrivateBlock) { - return nil, false - } - return &o.PrivateBlock, true -} - -// SetPrivateBlock sets field value -func (o *WatchBlocksPrivateResponseV1) SetPrivateBlock(v interface{}) { - o.PrivateBlock = v -} - -func (o WatchBlocksPrivateResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksPrivateResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.PrivateBlock != nil { - toSerialize["privateBlock"] = o.PrivateBlock - } - return toSerialize, nil -} - -type NullableWatchBlocksPrivateResponseV1 struct { - value *WatchBlocksPrivateResponseV1 - isSet bool -} - -func (v NullableWatchBlocksPrivateResponseV1) Get() *WatchBlocksPrivateResponseV1 { - return v.value -} - -func (v *NullableWatchBlocksPrivateResponseV1) Set(val *WatchBlocksPrivateResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksPrivateResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksPrivateResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksPrivateResponseV1(val *WatchBlocksPrivateResponseV1) *NullableWatchBlocksPrivateResponseV1 { - return &NullableWatchBlocksPrivateResponseV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksPrivateResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksPrivateResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_response_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_response_v1.go deleted file mode 100644 index f83b4a7359..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_response_v1.go +++ /dev/null @@ -1,268 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksResponseV1 - Response block from WatchBlocks endpoint. Depends on 'type' passed in subscription options. -type WatchBlocksResponseV1 struct { - CactiBlockFullResponseV1 *CactiBlockFullResponseV1 - CactiBlockTransactionsResponseV1 *CactiBlockTransactionsResponseV1 - WatchBlocksCactusErrorResponseV1 *WatchBlocksCactusErrorResponseV1 - WatchBlocksFilteredResponseV1 *WatchBlocksFilteredResponseV1 - WatchBlocksFullResponseV1 *WatchBlocksFullResponseV1 - WatchBlocksPrivateResponseV1 *WatchBlocksPrivateResponseV1 -} - -// CactiBlockFullResponseV1AsWatchBlocksResponseV1 is a convenience function that returns CactiBlockFullResponseV1 wrapped in WatchBlocksResponseV1 -func CactiBlockFullResponseV1AsWatchBlocksResponseV1(v *CactiBlockFullResponseV1) WatchBlocksResponseV1 { - return WatchBlocksResponseV1{ - CactiBlockFullResponseV1: v, - } -} - -// CactiBlockTransactionsResponseV1AsWatchBlocksResponseV1 is a convenience function that returns CactiBlockTransactionsResponseV1 wrapped in WatchBlocksResponseV1 -func CactiBlockTransactionsResponseV1AsWatchBlocksResponseV1(v *CactiBlockTransactionsResponseV1) WatchBlocksResponseV1 { - return WatchBlocksResponseV1{ - CactiBlockTransactionsResponseV1: v, - } -} - -// WatchBlocksCactusErrorResponseV1AsWatchBlocksResponseV1 is a convenience function that returns WatchBlocksCactusErrorResponseV1 wrapped in WatchBlocksResponseV1 -func WatchBlocksCactusErrorResponseV1AsWatchBlocksResponseV1(v *WatchBlocksCactusErrorResponseV1) WatchBlocksResponseV1 { - return WatchBlocksResponseV1{ - WatchBlocksCactusErrorResponseV1: v, - } -} - -// WatchBlocksFilteredResponseV1AsWatchBlocksResponseV1 is a convenience function that returns WatchBlocksFilteredResponseV1 wrapped in WatchBlocksResponseV1 -func WatchBlocksFilteredResponseV1AsWatchBlocksResponseV1(v *WatchBlocksFilteredResponseV1) WatchBlocksResponseV1 { - return WatchBlocksResponseV1{ - WatchBlocksFilteredResponseV1: v, - } -} - -// WatchBlocksFullResponseV1AsWatchBlocksResponseV1 is a convenience function that returns WatchBlocksFullResponseV1 wrapped in WatchBlocksResponseV1 -func WatchBlocksFullResponseV1AsWatchBlocksResponseV1(v *WatchBlocksFullResponseV1) WatchBlocksResponseV1 { - return WatchBlocksResponseV1{ - WatchBlocksFullResponseV1: v, - } -} - -// WatchBlocksPrivateResponseV1AsWatchBlocksResponseV1 is a convenience function that returns WatchBlocksPrivateResponseV1 wrapped in WatchBlocksResponseV1 -func WatchBlocksPrivateResponseV1AsWatchBlocksResponseV1(v *WatchBlocksPrivateResponseV1) WatchBlocksResponseV1 { - return WatchBlocksResponseV1{ - WatchBlocksPrivateResponseV1: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *WatchBlocksResponseV1) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into CactiBlockFullResponseV1 - err = newStrictDecoder(data).Decode(&dst.CactiBlockFullResponseV1) - if err == nil { - jsonCactiBlockFullResponseV1, _ := json.Marshal(dst.CactiBlockFullResponseV1) - if string(jsonCactiBlockFullResponseV1) == "{}" { // empty struct - dst.CactiBlockFullResponseV1 = nil - } else { - match++ - } - } else { - dst.CactiBlockFullResponseV1 = nil - } - - // try to unmarshal data into CactiBlockTransactionsResponseV1 - err = newStrictDecoder(data).Decode(&dst.CactiBlockTransactionsResponseV1) - if err == nil { - jsonCactiBlockTransactionsResponseV1, _ := json.Marshal(dst.CactiBlockTransactionsResponseV1) - if string(jsonCactiBlockTransactionsResponseV1) == "{}" { // empty struct - dst.CactiBlockTransactionsResponseV1 = nil - } else { - match++ - } - } else { - dst.CactiBlockTransactionsResponseV1 = nil - } - - // try to unmarshal data into WatchBlocksCactusErrorResponseV1 - err = newStrictDecoder(data).Decode(&dst.WatchBlocksCactusErrorResponseV1) - if err == nil { - jsonWatchBlocksCactusErrorResponseV1, _ := json.Marshal(dst.WatchBlocksCactusErrorResponseV1) - if string(jsonWatchBlocksCactusErrorResponseV1) == "{}" { // empty struct - dst.WatchBlocksCactusErrorResponseV1 = nil - } else { - match++ - } - } else { - dst.WatchBlocksCactusErrorResponseV1 = nil - } - - // try to unmarshal data into WatchBlocksFilteredResponseV1 - err = newStrictDecoder(data).Decode(&dst.WatchBlocksFilteredResponseV1) - if err == nil { - jsonWatchBlocksFilteredResponseV1, _ := json.Marshal(dst.WatchBlocksFilteredResponseV1) - if string(jsonWatchBlocksFilteredResponseV1) == "{}" { // empty struct - dst.WatchBlocksFilteredResponseV1 = nil - } else { - match++ - } - } else { - dst.WatchBlocksFilteredResponseV1 = nil - } - - // try to unmarshal data into WatchBlocksFullResponseV1 - err = newStrictDecoder(data).Decode(&dst.WatchBlocksFullResponseV1) - if err == nil { - jsonWatchBlocksFullResponseV1, _ := json.Marshal(dst.WatchBlocksFullResponseV1) - if string(jsonWatchBlocksFullResponseV1) == "{}" { // empty struct - dst.WatchBlocksFullResponseV1 = nil - } else { - match++ - } - } else { - dst.WatchBlocksFullResponseV1 = nil - } - - // try to unmarshal data into WatchBlocksPrivateResponseV1 - err = newStrictDecoder(data).Decode(&dst.WatchBlocksPrivateResponseV1) - if err == nil { - jsonWatchBlocksPrivateResponseV1, _ := json.Marshal(dst.WatchBlocksPrivateResponseV1) - if string(jsonWatchBlocksPrivateResponseV1) == "{}" { // empty struct - dst.WatchBlocksPrivateResponseV1 = nil - } else { - match++ - } - } else { - dst.WatchBlocksPrivateResponseV1 = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.CactiBlockFullResponseV1 = nil - dst.CactiBlockTransactionsResponseV1 = nil - dst.WatchBlocksCactusErrorResponseV1 = nil - dst.WatchBlocksFilteredResponseV1 = nil - dst.WatchBlocksFullResponseV1 = nil - dst.WatchBlocksPrivateResponseV1 = nil - - return fmt.Errorf("data matches more than one schema in oneOf(WatchBlocksResponseV1)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(WatchBlocksResponseV1)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src WatchBlocksResponseV1) MarshalJSON() ([]byte, error) { - if src.CactiBlockFullResponseV1 != nil { - return json.Marshal(&src.CactiBlockFullResponseV1) - } - - if src.CactiBlockTransactionsResponseV1 != nil { - return json.Marshal(&src.CactiBlockTransactionsResponseV1) - } - - if src.WatchBlocksCactusErrorResponseV1 != nil { - return json.Marshal(&src.WatchBlocksCactusErrorResponseV1) - } - - if src.WatchBlocksFilteredResponseV1 != nil { - return json.Marshal(&src.WatchBlocksFilteredResponseV1) - } - - if src.WatchBlocksFullResponseV1 != nil { - return json.Marshal(&src.WatchBlocksFullResponseV1) - } - - if src.WatchBlocksPrivateResponseV1 != nil { - return json.Marshal(&src.WatchBlocksPrivateResponseV1) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *WatchBlocksResponseV1) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.CactiBlockFullResponseV1 != nil { - return obj.CactiBlockFullResponseV1 - } - - if obj.CactiBlockTransactionsResponseV1 != nil { - return obj.CactiBlockTransactionsResponseV1 - } - - if obj.WatchBlocksCactusErrorResponseV1 != nil { - return obj.WatchBlocksCactusErrorResponseV1 - } - - if obj.WatchBlocksFilteredResponseV1 != nil { - return obj.WatchBlocksFilteredResponseV1 - } - - if obj.WatchBlocksFullResponseV1 != nil { - return obj.WatchBlocksFullResponseV1 - } - - if obj.WatchBlocksPrivateResponseV1 != nil { - return obj.WatchBlocksPrivateResponseV1 - } - - // all schemas are nil - return nil -} - -type NullableWatchBlocksResponseV1 struct { - value *WatchBlocksResponseV1 - isSet bool -} - -func (v NullableWatchBlocksResponseV1) Get() *WatchBlocksResponseV1 { - return v.value -} - -func (v *NullableWatchBlocksResponseV1) Set(val *WatchBlocksResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksResponseV1(val *WatchBlocksResponseV1) *NullableWatchBlocksResponseV1 { - return &NullableWatchBlocksResponseV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go deleted file mode 100644 index 75978d4a60..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go +++ /dev/null @@ -1,119 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksV1 Websocket requests for monitoring new blocks. -type WatchBlocksV1 string - -// List of WatchBlocksV1 -const ( - Subscribe WatchBlocksV1 = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Subscribe" - SubscribeDelegatedSign WatchBlocksV1 = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.SubscribeDelegatedSign" - Next WatchBlocksV1 = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Next" - Unsubscribe WatchBlocksV1 = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Unsubscribe" - Error WatchBlocksV1 = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Error" - Complete WatchBlocksV1 = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Complete" -) - -// All allowed values of WatchBlocksV1 enum -var AllowedWatchBlocksV1EnumValues = []WatchBlocksV1{ - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Subscribe", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.SubscribeDelegatedSign", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Next", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Error", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Complete", -} - -func (v *WatchBlocksV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := WatchBlocksV1(value) - for _, existing := range AllowedWatchBlocksV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WatchBlocksV1", value) -} - -// NewWatchBlocksV1FromValue returns a pointer to a valid WatchBlocksV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWatchBlocksV1FromValue(v string) (*WatchBlocksV1, error) { - ev := WatchBlocksV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WatchBlocksV1: valid values are %v", v, AllowedWatchBlocksV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v WatchBlocksV1) IsValid() bool { - for _, existing := range AllowedWatchBlocksV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WatchBlocksV1 value -func (v WatchBlocksV1) Ptr() *WatchBlocksV1 { - return &v -} - -type NullableWatchBlocksV1 struct { - value *WatchBlocksV1 - isSet bool -} - -func (v NullableWatchBlocksV1) Get() *WatchBlocksV1 { - return v.value -} - -func (v *NullableWatchBlocksV1) Set(val *WatchBlocksV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1(val *WatchBlocksV1) *NullableWatchBlocksV1 { - return &NullableWatchBlocksV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_web_socket_key.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_web_socket_key.go deleted file mode 100644 index 8128fa19e9..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/model_web_socket_key.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" -) - -// checks if the WebSocketKey type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WebSocketKey{} - -// WebSocketKey web-socket key details for signing fabric message with private key stored with external client -type WebSocketKey struct { - // session Id to access client - SessionId string `json:"sessionId"` - // signature of the session ID - Signature string `json:"signature"` -} - -// NewWebSocketKey instantiates a new WebSocketKey object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWebSocketKey(sessionId string, signature string) *WebSocketKey { - this := WebSocketKey{} - this.SessionId = sessionId - this.Signature = signature - return &this -} - -// NewWebSocketKeyWithDefaults instantiates a new WebSocketKey object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWebSocketKeyWithDefaults() *WebSocketKey { - this := WebSocketKey{} - return &this -} - -// GetSessionId returns the SessionId field value -func (o *WebSocketKey) GetSessionId() string { - if o == nil { - var ret string - return ret - } - - return o.SessionId -} - -// GetSessionIdOk returns a tuple with the SessionId field value -// and a boolean to check if the value has been set. -func (o *WebSocketKey) GetSessionIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionId, true -} - -// SetSessionId sets field value -func (o *WebSocketKey) SetSessionId(v string) { - o.SessionId = v -} - -// GetSignature returns the Signature field value -func (o *WebSocketKey) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *WebSocketKey) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *WebSocketKey) SetSignature(v string) { - o.Signature = v -} - -func (o WebSocketKey) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WebSocketKey) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionId"] = o.SessionId - toSerialize["signature"] = o.Signature - return toSerialize, nil -} - -type NullableWebSocketKey struct { - value *WebSocketKey - isSet bool -} - -func (v NullableWebSocketKey) Get() *WebSocketKey { - return v.value -} - -func (v *NullableWebSocketKey) Set(val *WebSocketKey) { - v.value = val - v.isSet = true -} - -func (v NullableWebSocketKey) IsSet() bool { - return v.isSet -} - -func (v *NullableWebSocketKey) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWebSocketKey(val *WebSocketKey) *NullableWebSocketKey { - return &NullableWebSocketKey{value: val, isSet: true} -} - -func (v NullableWebSocketKey) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWebSocketKey) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 51116b07d9..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 4468fd0fe7..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,109 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-ledger-connector-fabric - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-ledger-connector-fabric_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeployContractGoSourceV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeployContractGoSourceV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService DeployContractV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeployContractV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetBlockV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetBlockV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetricsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetricsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetTransactionReceiptByTxIDV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetTransactionReceiptByTxIDV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RunDelegatedSignTransactionV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.RunDelegatedSignTransactionV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RunTransactionV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.RunTransactionV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index cc6a626d58..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-fabric - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json deleted file mode 100644 index ca384261e4..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json +++ /dev/null @@ -1,1977 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Connector Fabric", - "description": "Can perform basic tasks on a fabric ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "TransactReceiptTransactionEndorsement": { - "type": "object", - "properties": { - "mspid": { - "type": "string" - }, - "endorserID": { - "type": "string" - }, - "signature": { - "type": "string" - } - } - }, - "TransactReceiptTransactionCreator": { - "type": "object", - "properties": { - "mspid": { - "type": "string" - }, - "creatorID": { - "type": "string" - } - } - }, - "TransactReceiptBlockMetaData": { - "type": "object", - "properties": { - "mspid": { - "type": "string" - }, - "blockCreatorID": { - "type": "string" - }, - "signature": { - "type": "string" - } - } - }, - "VaultTransitKey": { - "type": "object", - "nullable": false, - "required": ["keyName", "token"], - "properties": { - "keyName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false, - "description": "label of private key" - }, - "token": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false, - "description": "token for accessing private key" - } - }, - "description": "vault key details for signing fabric message with private key stored with transit engine." - }, - "WebSocketKey": { - "type": "object", - "nullable": false, - "required": ["sessionId", "signature"], - "properties": { - "sessionId": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false, - "description": "session Id to access client" - }, - "signature": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false, - "description": "signature of the session ID" - } - }, - "description": "web-socket key details for signing fabric message with private key stored with external client" - }, - "FabricSigningCredentialType": { - "type": "string", - "enum": ["X.509", "Vault-X.509", "WS-X.509"], - "nullable": false, - "description": "different type of identity provider for singing fabric messages supported by this package" - }, - "FabricSigningCredential": { - "type": "object", - "required": ["keychainId", "keychainRef"], - "properties": { - "keychainId": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "keychainRef": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "type": { - "$ref": "#/components/schemas/FabricSigningCredentialType", - "description": "singing identity type to be used for signing fabric message , by by default default is supported" - }, - "vaultTransitKey": { - "$ref": "#/components/schemas/VaultTransitKey", - "description": "vault key details , if Vault-X.509 identity provider to be used for singing fabric messages" - }, - "webSocketKey": { - "$ref": "#/components/schemas/WebSocketKey", - "description": "web-socket key details , if WS-X.509 identity provider to be used for singing fabric messages" - } - } - }, - "ChainCodeLifeCycleCommandResponses": { - "type": "object", - "required": [ - "queryInstalledList", - "approveForMyOrgList", - "installList" - ], - "properties": { - "packaging": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "installList": { - "items": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "minItems": 1 - }, - "queryInstalledList": { - "items": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "minItems": 1 - }, - "approveForMyOrgList": { - "items": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "minItems": 1 - }, - "commit": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "queryCommitted": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "init": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - } - } - }, - "ChainCodeProgrammingLanguage": { - "type": "string", - "description": "Enumerates the supported source code programming languages of Hyperledger Fabric", - "enum": ["golang", "javascript", "typescript", "java"] - }, - "ChainCodeLanguageRuntime": { - "type": "string", - "description": "Enumerates the supported programming language runtimes of Hyperledger Fabric", - "enum": ["golang", "node", "java"] - }, - "ConnectionProfile": { - "type": "object", - "required": ["name", "version", "organizations", "peers"], - "additionalProperties": true, - "properties": { - "name": { - "type": "string", - "example": "basic-network", - "minLength": 1, - "maxLength": 1024 - }, - "x-type": { - "type": "string", - "minLength": 1, - "example": "hlfv1" - }, - "description": { - "type": "string", - "example": "The basic network" - }, - "version": { - "type": "string", - "example": "1.0" - }, - "client": { - "type": "object", - "properties": { - "organization": { - "type": "string", - "example": "Org1" - } - } - }, - "channels": { - "type": "object", - "additionalProperties": true - }, - "organizations": { - "type": "object", - "additionalProperties": true - }, - "orderers": { - "type": "object", - "additionalProperties": true - }, - "peers": { - "type": "object", - "additionalProperties": true - }, - "certificateAuthorities": { - "type": "object", - "additionalProperties": true - } - } - }, - "GatewayDiscoveryOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "asLocalhost": { - "type": "boolean", - "nullable": false - }, - "enabled": { - "type": "boolean", - "nullable": false - } - } - }, - "GatewayOptions": { - "type": "object", - "required": ["identity", "wallet"], - "properties": { - "connectionProfile": { - "$ref": "#/components/schemas/ConnectionProfile" - }, - "discovery": { - "$ref": "#/components/schemas/GatewayDiscoveryOptions", - "nullable": false - }, - "eventHandlerOptions": { - "$ref": "#/components/schemas/GatewayEventHandlerOptions", - "nullable": false - }, - "identity": { - "type": "string" - }, - "wallet": { - "type": "object", - "minProperties": 1, - "maxProperties": 1, - "properties": { - "keychain": { - "$ref": "#/components/schemas/FabricSigningCredential" - }, - "json": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 65535 - } - } - } - } - }, - "DefaultEventHandlerStrategy": { - "type": "string", - "enum": [ - "MSPID_SCOPE_ALLFORTX", - "MSPID_SCOPE_ANYFORTX", - "NETWORK_SCOPE_ALLFORTX", - "NETWORK_SCOPE_ANYFORTX" - ] - }, - "GatewayEventHandlerOptions": { - "type": "object", - "required": ["strategy"], - "additionalProperties": false, - "properties": { - "commitTimeout": { - "type": "number", - "nullable": false - }, - "endorseTimeout": { - "type": "number", - "nullable": false - }, - "strategy": { - "description": "The name of the strategy to be used when looking up the TxEventHandlerFactory to pass in to the Fabric Gateway as the strategy property of the discovery options.", - "$ref": "#/components/schemas/DefaultEventHandlerStrategy" - } - } - }, - "FileBase64": { - "description": "Represents a file-system file that has a name and a body which holds the file contents as a Base64 encoded string", - "type": "object", - "required": ["body", "filename"], - "properties": { - "body": { - "description": "The file's contents encoded as a Base64 string.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 104857600 - }, - "filename": { - "description": "The name as referred to on a file system", - "example": "my-cool-file-full-of-wonders-and-fun-stuff.go", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 255 - }, - "filepath": { - "description": "The relative path of the file, if it should be placed in a sub-directory", - "example": "./my/sub-folder/structure/", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 512 - } - } - }, - "FabricContractInvocationType": { - "type": "string", - "enum": [ - "FabricContractInvocationType.SEND", - "FabricContractInvocationType.CALL", - "FabricContractInvocationType.SENDPRIVATE" - ] - }, - "SSHExecCommandResponse": { - "type": "object", - "required": ["stdout", "stderr", "code", "signal"], - "properties": { - "stdout": { - "type": "string", - "nullable": false - }, - "stderr": { - "type": "string", - "nullable": false - }, - "code": { - "type": "integer", - "nullable": true - }, - "signal": { - "type": "string", - "nullable": true - } - } - }, - "RunTransactionResponseType": { - "type": "string", - "description": "Response format from transaction / query execution", - "enum": [ - "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.JSON", - "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.UTF8" - ], - "x-enum-varnames": ["JSON", "UTF8"] - }, - "RunTransactionRequest": { - "type": "object", - "required": [ - "signingCredential", - "channelName", - "contractName", - "invocationType", - "methodName", - "params" - ], - "additionalProperties": false, - "properties": { - "endorsingPeers": { - "description": "An array of endorsing peers (name or url) for the transaction.", - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - }, - "endorsingOrgs": { - "description": "An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction.", - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - }, - "transientData": { - "type": "object", - "nullable": true - }, - "gatewayOptions": { - "$ref": "#/components/schemas/GatewayOptions", - "nullable": false - }, - "signingCredential": { - "$ref": "#/components/schemas/FabricSigningCredential", - "nullable": false - }, - "channelName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "contractName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/FabricContractInvocationType", - "nullable": false, - "description": "Indicates if it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "params": { - "type": "array", - "nullable": false, - "default": [], - "items": { - "type": "string", - "nullable": true - } - }, - "responseType": { - "$ref": "#/components/schemas/RunTransactionResponseType" - } - } - }, - "RunTransactionResponse": { - "type": "object", - "required": ["functionOutput", "transactionId"], - "properties": { - "functionOutput": { - "type": "string", - "nullable": false - }, - "transactionId": { - "type": "string", - "nullable": false - } - } - }, - "RunDelegatedSignTransactionRequest": { - "type": "object", - "required": [ - "signerCertificate", - "signerMspID", - "channelName", - "contractName", - "invocationType", - "methodName", - "params" - ], - "additionalProperties": false, - "properties": { - "endorsingPeers": { - "description": "An array of endorsing peers (name or url) for the transaction.", - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - }, - "endorsingOrgs": { - "description": "An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction.", - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - }, - "transientData": { - "type": "object", - "nullable": true - }, - "signerCertificate": { - "type": "string", - "nullable": false - }, - "signerMspID": { - "type": "string", - "nullable": false - }, - "uniqueTransactionData": { - "description": "Can be used to uniquely identify and authorize signing request", - "nullable": false - }, - "channelName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "contractName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/FabricContractInvocationType", - "nullable": false, - "description": "Indicates if it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "params": { - "type": "array", - "nullable": false, - "default": [], - "items": { - "type": "string", - "nullable": true - } - }, - "responseType": { - "$ref": "#/components/schemas/RunTransactionResponseType" - } - } - }, - "GetTransactionReceiptResponse": { - "type": "object", - "properties": { - "blockNumber": { - "type": "string" - }, - "channelID": { - "type": "string" - }, - "transactionCreator": { - "$ref": "#/components/schemas/TransactReceiptTransactionCreator" - }, - "transactionEndorsement": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransactReceiptTransactionEndorsement" - } - }, - "blockMetaData": { - "$ref": "#/components/schemas/TransactReceiptBlockMetaData" - }, - "chainCodeName": { - "type": "string" - }, - "chainCodeVersion": { - "type": "string" - }, - "responseStatus": { - "type": "string" - }, - "rwsetKey": { - "type": "string" - }, - "rwsetWriteData": { - "type": "string" - } - } - }, - "DeploymentTargetOrganization": { - "type": "object", - "required": [ - "CORE_PEER_LOCALMSPID", - "CORE_PEER_ADDRESS", - "CORE_PEER_MSPCONFIGPATH", - "CORE_PEER_TLS_ROOTCERT_FILE", - "ORDERER_TLS_ROOTCERT_FILE" - ], - "properties": { - "CORE_PEER_LOCALMSPID": { - "type": "string", - "example": "Org1MSP", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_ADDRESS": { - "type": "string", - "example": "peer0.org1.example.com:7051", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_MSPCONFIGPATH": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_TLS_ROOTCERT_FILE": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "ORDERER_TLS_ROOTCERT_FILE": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - } - } - }, - "DeploymentTargetOrgFabric2x": { - "type": "object", - "required": [ - "CORE_PEER_LOCALMSPID", - "CORE_PEER_ADDRESS", - "CORE_PEER_MSPCONFIGPATH", - "CORE_PEER_TLS_ROOTCERT_FILE", - "ORDERER_TLS_ROOTCERT_FILE" - ], - "properties": { - "transient": { - "type": "string", - "description": "Transient map of arguments in JSON encoding", - "example": "orderer.example.com:7050", - "minLength": 1, - "maxLength": 1073741824 - }, - "CORE_PEER_LOCALMSPID": { - "type": "string", - "example": "Org1MSP", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_ADDRESS": { - "type": "string", - "example": "peer0.org1.example.com:7051", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_MSPCONFIGPATH": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_TLS_ROOTCERT_FILE": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "ORDERER_TLS_ROOTCERT_FILE": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - } - } - }, - "DeployContractGoSourceV1Request": { - "type": "object", - "required": [ - "goSource", - "targetOrganizations", - "chainCodeVersion", - "channelId", - "policyDslSource", - "targetPeerAddresses", - "tlsRootCertFiles" - ], - "additionalProperties": false, - "properties": { - "policyDslSource": { - "type": "string", - "minLength": 1, - "maxLength": 65535, - "nullable": false, - "example": "AND('Org1MSP.member','Org2MSP.member')" - }, - "tlsRootCertFiles": { - "type": "string", - "description": "The TLS root cert files that will be passed to the chaincode instantiation command.", - "minLength": 1, - "maxLength": 65535, - "nullable": false, - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" - }, - "channelId": { - "type": "string", - "description": "The name of the Fabric channel where the contract will get instantiated.", - "example": "mychannel", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "targetOrganizations": { - "type": "array", - "minItems": 1, - "nullable": false, - "maxItems": 1024, - "items": { - "$ref": "#/components/schemas/DeploymentTargetOrganization" - } - }, - "targetPeerAddresses": { - "type": "array", - "description": "An array of peer addresses where the contract will be instantiated. Note that at present only the first item from this array will be used which is the behavior taken from the official Fabric samples repository and therefore it is assumed to be correct usage.", - "example": ["peer0.org1.example.com:7051"], - "minItems": 1, - "maxItems": 2048, - "items": { - "type": "string", - "minLength": 1, - "maxLength": 4096 - } - }, - "constructorArgs": { - "type": "object", - "example": "{} - An empty object literal can be sufficient if your contract does not have parameters.", - "nullable": false, - "properties": { - "Args": { - "type": "array", - "minLength": 0, - "maxLength": 2048, - "items": {} - } - } - }, - "chainCodeVersion": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "example": "1.0.0", - "nullable": false - }, - "goSource": { - "description": "The your-smart-contract.go file where the functionality of your contract is implemented.", - "$ref": "#/components/schemas/FileBase64", - "nullable": false - }, - "goMod": { - "description": "The go.mod file that declares the dependencies of the chaincode go contract that is being deployed as part of this request.", - "$ref": "#/components/schemas/FileBase64", - "nullable": false - }, - "moduleName": { - "description": "The go module name that will be used for the go compilation process.", - "example": "hello-world-contract", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 255 - }, - "pinnedDeps": { - "type": "array", - "minItems": 0, - "maxItems": 1024, - "items": { - "type": "string", - "nullable": false, - "example": "github.com/hyperledger/fabric@v1.4.8" - } - }, - "modTidyOnly": { - "description": "Indicates to the go chaincode compiler of Cactus if it should do an actual go compilation with the contact source or if it should just execute the go mod tidy command.", - "type": "boolean", - "nullable": true - } - } - }, - "DeployContractGoSourceV1Response": { - "type": "object", - "required": [ - "success", - "installationCommandResponses", - "instantiationCommandResponse" - ], - "properties": { - "success": { - "type": "boolean" - }, - "installationCommandResponses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - } - }, - "instantiationCommandResponse": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - } - } - }, - "DeployContractV1Request": { - "type": "object", - "required": [ - "caFile", - "sourceFiles", - "targetOrganizations", - "ccName", - "ccLabel", - "ccVersion", - "ccSequence", - "channelId", - "ccLang", - "orderer", - "ordererTLSHostnameOverride" - ], - "additionalProperties": false, - "properties": { - "ccLang": { - "$ref": "#/components/schemas/ChainCodeProgrammingLanguage" - }, - "caFile": { - "type": "string", - "description": "File-system path pointing at the CA file.", - "example": "${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem", - "minLength": 1, - "maxLength": 4096 - }, - "orderer": { - "type": "string", - "description": "Ordering service endpoint specified as :", - "example": "orderer.example.com:7050", - "minLength": 1, - "maxLength": 65535 - }, - "ordererTLSHostnameOverride": { - "type": "string", - "description": "The hostname override to use when validating the TLS connection to the orderer", - "example": "orderer.example.com:7050", - "minLength": 1, - "maxLength": 65535 - }, - "connTimeout": { - "type": "integer", - "description": "Timeout for client to connect (default 3s)", - "nullable": false - }, - "signaturePolicy": { - "type": "string", - "description": "Passed in to the peer via the --signature-policy argument on the command line. See also: https://hyperledger-fabric.readthedocs.io/en/release-2.2/endorsement-policies.html#setting-chaincode-level-endorsement-policies", - "minLength": 1, - "maxLength": 65535, - "nullable": false, - "example": "AND('Org1MSP.member','Org2MSP.member')" - }, - "collectionsConfigFile": { - "type": "string", - "description": "Name of the collections config file as present in the sourceFiles array of the request.", - "nullable": false, - "minLength": 1, - "maxLength": 255 - }, - "channelId": { - "type": "string", - "description": "The name of the Fabric channel where the contract will get instantiated.", - "example": "mychannel", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "targetOrganizations": { - "type": "array", - "minItems": 1, - "nullable": false, - "maxItems": 1024, - "items": { - "$ref": "#/components/schemas/DeploymentTargetOrganization" - } - }, - "constructorArgs": { - "type": "object", - "example": "{} - An empty object literal can be sufficient if your contract does not have parameters.", - "nullable": false, - "properties": { - "Args": { - "type": "array", - "minLength": 0, - "maxLength": 2048, - "items": {} - } - } - }, - "ccSequence": { - "type": "number", - "example": 1, - "nullable": false - }, - "ccVersion": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "example": "1.0.0", - "nullable": false - }, - "ccName": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "example": "my-hello-world-contract", - "nullable": false - }, - "ccLabel": { - "description": "Human readable label to uniquely identify the contract. Recommended to include in this at least the contract name and the exact version in order to make it easily distinguishable from other deployments of the same contract.", - "example": "hello-world-contract", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 255 - }, - "sourceFiles": { - "description": "The your-smart-contract.go file where the functionality of your contract is implemented.", - "items": { - "$ref": "#/components/schemas/FileBase64" - }, - "type": "array", - "minItems": 1, - "maxItems": 65535, - "nullable": false - } - } - }, - "DeployContractV1Response": { - "type": "object", - "required": ["success", "packageIds", "lifecycle"], - "properties": { - "success": { - "type": "boolean" - }, - "packageIds": { - "type": "array", - "items": { - "type": "string", - "example": "f8c8e06bfc27771028c4bbc3564341887881e29b92a844c66c30bac0ff83966e", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - }, - "lifecycle": { - "$ref": "#/components/schemas/ChainCodeLifeCycleCommandResponses" - } - } - }, - "GetBlockRequestV1": { - "description": "Request for GetBlock endpoint.", - "type": "object", - "required": ["channelName", "gatewayOptions", "query"], - "properties": { - "channelName": { - "type": "string", - "description": "Fabric channel which we want to query.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "connectionChannelName": { - "type": "string", - "description": "Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "gatewayOptions": { - "$ref": "#/components/schemas/GatewayOptions", - "description": "Fabric SDK gateway options.", - "nullable": false - }, - "query": { - "description": "Query selector, caller must provide at least one of them. First found will be used, rest will be ignored, so it's recommended to pass single selector.", - "type": "object", - "properties": { - "blockNumber": { - "type": "string", - "description": "Select block by it's number.", - "nullable": false - }, - "blockHash": { - "type": "object", - "description": "Select block by it's hash.", - "required": ["buffer"], - "properties": { - "encoding": { - "type": "string", - "description": "NodeJS Buffer encoding (utf-8, hex, binary, base64, etc...). Passed directly to `Buffer.from()` call on hashBuffer. If not provided then JSON buffer format is assumed.", - "nullable": false - }, - "buffer": { - "type": "string", - "description": "Buffer of blockHash. It's encoding should be described in `encoding` parameter.", - "nullable": false - } - }, - "nullable": false - }, - "transactionId": { - "type": "string", - "description": "Select block by id of transaction that it contains.", - "nullable": false - } - } - }, - "responseType": { - "$ref": "#/components/schemas/GetBlockResponseTypeV1", - "description": "Type of response block to return.", - "nullable": false - } - } - }, - "GetChainInfoRequestV1": { - "description": "Request for GetChainInfo endpoint.", - "type": "object", - "required": ["channelName", "gatewayOptions"], - "properties": { - "channelName": { - "type": "string", - "description": "Fabric channel which we want to query.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "connectionChannelName": { - "type": "string", - "description": "Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "gatewayOptions": { - "$ref": "#/components/schemas/GatewayOptions", - "description": "Fabric SDK gateway options.", - "nullable": false - } - } - }, - "FabricFullBlockDataV1": { - "description": "Full hyperledger fabric block data." - }, - "GetBlockResponseDecodedV1": { - "type": "object", - "description": "When skipDecode is false (default) then decoded block object is returned.", - "required": ["decodedBlock"], - "properties": { - "decodedBlock": { - "$ref": "#/components/schemas/FabricFullBlockDataV1", - "nullable": false - } - } - }, - "GetBlockResponseEncodedV1": { - "type": "object", - "description": "When skipDecode is true then encoded block Buffer is returned.", - "required": ["encodedBlock"], - "properties": { - "encodedBlock": { - "type": "string" - } - } - }, - "GetBlockResponseV1": { - "description": "Response from GetBlock endpoint.", - "oneOf": [ - { - "$ref": "#/components/schemas/CactiBlockTransactionsResponseV1" - }, - { - "$ref": "#/components/schemas/CactiBlockFullResponseV1" - }, - { - "$ref": "#/components/schemas/GetBlockResponseDecodedV1" - }, - { - "$ref": "#/components/schemas/GetBlockResponseEncodedV1" - } - ] - }, - "GetChainInfoResponseV1": { - "type": "object", - "description": "Response from GetChainInfo endpoint.", - "required": ["height", "currentBlockHash", "previousBlockHash"], - "properties": { - "height": { - "description": "Current height of fabric ledger", - "type": "number", - "nullable": false - }, - "currentBlockHash": { - "description": "Current block hash of fabric ledger", - "type": "string", - "nullable": false - }, - "previousBlockHash": { - "description": "Previous block hash of fabric ledger", - "type": "string", - "nullable": false - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": false - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "WatchBlocksV1": { - "type": "string", - "description": "Websocket requests for monitoring new blocks.", - "enum": [ - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Subscribe", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.SubscribeDelegatedSign", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Next", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Error", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "SubscribeDelegatedSign", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchBlocksListenerTypeV1": { - "type": "string", - "description": "Response type from WatchBlocks. 'Cacti*' are custom views, others correspond to fabric SDK call.", - "enum": [ - "filtered", - "full", - "private", - "cacti:transactions", - "cacti:full-block" - ], - "x-enum-varnames": [ - "Filtered", - "Full", - "Private", - "CactiTransactions", - "CactiFullBlock" - ] - }, - "GetBlockResponseTypeV1": { - "type": "string", - "default": "full", - "description": "Response type from GetBlock.", - "enum": ["full", "encoded", "cacti:transactions", "cacti:full-block"], - "x-enum-varnames": [ - "Full", - "Encoded", - "CactiTransactions", - "CactiFullBlock" - ] - }, - "WatchBlocksOptionsV1": { - "type": "object", - "description": "Options passed when subscribing to block monitoring.", - "required": ["channelName", "gatewayOptions", "type"], - "properties": { - "channelName": { - "type": "string", - "description": "Hyperledger Fabric channel to connect to.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "gatewayOptions": { - "$ref": "#/components/schemas/GatewayOptions", - "description": "Options to Hyperledger Fabric Node SDK Gateway", - "nullable": false - }, - "type": { - "$ref": "#/components/schemas/WatchBlocksListenerTypeV1", - "description": "Type of response block to return.", - "nullable": false - }, - "startBlock": { - "type": "string", - "description": "From which block start monitoring. Defaults to latest.", - "minLength": 1, - "maxLength": 100, - "nullable": false - } - } - }, - "WatchBlocksDelegatedSignOptionsV1": { - "type": "object", - "description": "Options passed when subscribing to block monitoring with delegated signing.", - "required": ["type", "channelName", "signerCertificate", "signerMspID"], - "properties": { - "type": { - "$ref": "#/components/schemas/WatchBlocksListenerTypeV1", - "description": "Type of response block to return.", - "nullable": false - }, - "startBlock": { - "type": "string", - "description": "From which block start monitoring. Defaults to latest.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "channelName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "signerCertificate": { - "type": "string", - "nullable": false - }, - "signerMspID": { - "type": "string", - "nullable": false - }, - "uniqueTransactionData": { - "description": "Can be used to uniquely identify and authorize signing request", - "nullable": false - } - } - }, - "CactiBlockTransactionEventV1": { - "type": "object", - "description": "Transaction summary from commited block.", - "required": [ - "chaincodeId", - "transactionId", - "functionName", - "functionArgs" - ], - "properties": { - "chaincodeId": { - "description": "ChainCode containing function that was executed.", - "nullable": false, - "type": "string" - }, - "transactionId": { - "description": "Transaction identifier.", - "nullable": false, - "type": "string" - }, - "functionName": { - "description": "Function name that was executed.", - "nullable": false, - "type": "string" - }, - "functionArgs": { - "description": "List of function arguments.", - "type": "array", - "items": { - "type": "string", - "minLength": 0, - "nullable": false - } - } - } - }, - "CactiBlockTransactionsResponseV1": { - "type": "object", - "description": "Custom response containing block transactions summary. Compatible with legacy fabric-socketio connector monitoring.", - "required": ["cactiTransactionsEvents"], - "properties": { - "cactiTransactionsEvents": { - "description": "List of transactions summary", - "type": "array", - "items": { - "$ref": "#/components/schemas/CactiBlockTransactionEventV1", - "nullable": false - } - } - } - }, - "CactiBlockFullResponseV1": { - "type": "object", - "description": "Custom response containing full block summary.", - "required": ["cactiFullEvents"], - "properties": { - "cactiFullEvents": { - "description": "Full parsed block with transactions.", - "$ref": "#/components/schemas/CactiBlockFullEventV1", - "nullable": false - } - } - }, - "WatchBlocksFullResponseV1": { - "type": "object", - "description": "Response that corresponds to Fabric SDK 'full' EventType.", - "required": ["fullBlock"], - "properties": { - "fullBlock": { - "description": "Full commited block.", - "nullable": false - } - } - }, - "WatchBlocksFilteredResponseV1": { - "type": "object", - "description": "Response that corresponds to Fabric SDK 'filtered' EventType.", - "required": ["filteredBlock"], - "properties": { - "filteredBlock": { - "description": "Filtered commited block.", - "nullable": false - } - } - }, - "WatchBlocksPrivateResponseV1": { - "type": "object", - "description": "Response that corresponds to Fabric SDK 'private' EventType.", - "required": ["privateBlock"], - "properties": { - "privateBlock": { - "description": "Private commited block.", - "nullable": false - } - } - }, - "FabricX509CertificateV1": { - "type": "object", - "description": "Transaction endorser certificate object", - "required": [ - "issuer", - "serialNumber", - "subject", - "subjectAltName", - "validFrom", - "validTo", - "pem" - ], - "properties": { - "issuer": { - "nullable": false, - "type": "string" - }, - "serialNumber": { - "nullable": false, - "type": "string" - }, - "subject": { - "nullable": false, - "type": "string" - }, - "subjectAltName": { - "nullable": false, - "type": "string" - }, - "validFrom": { - "nullable": false, - "type": "string" - }, - "validTo": { - "nullable": false, - "type": "string" - }, - "pem": { - "nullable": false, - "type": "string" - } - } - }, - "FabricCertificateIdentityV1": { - "type": "object", - "description": "Combination of certificate and it's MSP ID used to identify fabric actors.", - "required": ["mspid", "cert"], - "properties": { - "mspid": { - "nullable": false, - "type": "string" - }, - "cert": { - "$ref": "#/components/schemas/FabricX509CertificateV1", - "nullable": false - } - } - }, - "FullBlockTransactionEndorsementV1": { - "type": "object", - "description": "Transaction endorsment object returned from fabric block.", - "required": ["signer", "signature"], - "properties": { - "signer": { - "$ref": "#/components/schemas/FabricCertificateIdentityV1", - "nullable": false - }, - "signature": { - "nullable": false, - "type": "string" - } - } - }, - "FullBlockTransactionActionV1": { - "type": "object", - "description": "Transaction action returned from fabric block.", - "required": [ - "functionName", - "functionArgs", - "chaincodeId", - "creator", - "endorsements" - ], - "properties": { - "functionName": { - "nullable": false, - "type": "string" - }, - "functionArgs": { - "type": "array", - "items": { - "nullable": false, - "type": "string" - } - }, - "chaincodeId": { - "nullable": false, - "type": "string" - }, - "creator": { - "$ref": "#/components/schemas/FabricCertificateIdentityV1", - "nullable": false - }, - "endorsements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FullBlockTransactionEndorsementV1", - "nullable": false - } - } - } - }, - "FullBlockTransactionEventV1": { - "type": "object", - "description": "Transaction returned from fabric block.", - "required": [ - "hash", - "channelId", - "timestamp", - "protocolVersion", - "transactionType", - "epoch", - "actions" - ], - "properties": { - "hash": { - "nullable": false, - "type": "string" - }, - "channelId": { - "nullable": false, - "type": "string" - }, - "timestamp": { - "nullable": false, - "type": "string" - }, - "protocolVersion": { - "nullable": false, - "type": "number" - }, - "transactionType": { - "nullable": false, - "type": "string" - }, - "epoch": { - "nullable": false, - "type": "number" - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FullBlockTransactionActionV1", - "nullable": false - } - } - } - }, - "CactiBlockFullEventV1": { - "type": "object", - "description": "Custom format full fabric block with transactions", - "required": [ - "blockNumber", - "blockHash", - "previousBlockHash", - "transactionCount", - "cactiTransactionsEvents" - ], - "properties": { - "blockNumber": { - "nullable": false, - "type": "number" - }, - "blockHash": { - "nullable": false, - "type": "string" - }, - "previousBlockHash": { - "nullable": false, - "type": "string" - }, - "transactionCount": { - "nullable": false, - "type": "number" - }, - "cactiTransactionsEvents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FullBlockTransactionEventV1", - "nullable": false - } - } - } - }, - "WatchBlocksCactusErrorResponseV1": { - "type": "object", - "description": "Error response from WatchBlocks operation.", - "required": ["code", "errorMessage"], - "properties": { - "code": { - "description": "Error code.", - "type": "number" - }, - "errorMessage": { - "description": "Description of the error.", - "type": "string" - } - } - }, - "WatchBlocksResponseV1": { - "description": "Response block from WatchBlocks endpoint. Depends on 'type' passed in subscription options.", - "oneOf": [ - { - "$ref": "#/components/schemas/CactiBlockTransactionsResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/CactiBlockFullResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksFullResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksFilteredResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksPrivateResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksCactusErrorResponseV1", - "nullable": false - } - ] - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction" - } - }, - "operationId": "runTransactionV1", - "summary": "Runs a transaction on a Fabric ledger.", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction" - } - }, - "operationId": "runDelegatedSignTransactionV1", - "summary": "Runs a transaction on a Fabric ledger using user-provided signing callback.", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunDelegatedSignTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid" - } - }, - "operationId": "getTransactionReceiptByTxIDV1", - "summary": "get a transaction receipt by tx id on a Fabric ledger.", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTransactionReceiptResponse" - } - } - } - }, - "404": { - "description": "" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source": { - "post": { - "operationId": "deployContractGoSourceV1", - "summary": "Deploys a chaincode contract in the form of a go sources.", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source" - } - }, - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractGoSourceV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractGoSourceV1Response" - } - } - } - }, - "501": { - "description": "Not implemented", - "content": { - "text/plain": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - } - } - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract": { - "post": { - "operationId": "deployContractV1", - "summary": "Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The 'v1' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version.", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract" - } - }, - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Response" - } - } - } - }, - "501": { - "description": "Not implemented", - "content": { - "text/plain": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - } - } - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block": { - "post": { - "operationId": "getBlockV1", - "summary": "Get block from the channel using one of selectors from the input. Works only on Fabric 2.x.", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block" - } - }, - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBlockRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBlockResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info": { - "post": { - "operationId": "getChainInfoV1", - "summary": "Get fabric ledger chain info.", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info" - } - }, - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetChainInfoRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetChainInfoResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.tpl.json deleted file mode 100644 index ca384261e4..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,1977 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Connector Fabric", - "description": "Can perform basic tasks on a fabric ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "TransactReceiptTransactionEndorsement": { - "type": "object", - "properties": { - "mspid": { - "type": "string" - }, - "endorserID": { - "type": "string" - }, - "signature": { - "type": "string" - } - } - }, - "TransactReceiptTransactionCreator": { - "type": "object", - "properties": { - "mspid": { - "type": "string" - }, - "creatorID": { - "type": "string" - } - } - }, - "TransactReceiptBlockMetaData": { - "type": "object", - "properties": { - "mspid": { - "type": "string" - }, - "blockCreatorID": { - "type": "string" - }, - "signature": { - "type": "string" - } - } - }, - "VaultTransitKey": { - "type": "object", - "nullable": false, - "required": ["keyName", "token"], - "properties": { - "keyName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false, - "description": "label of private key" - }, - "token": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false, - "description": "token for accessing private key" - } - }, - "description": "vault key details for signing fabric message with private key stored with transit engine." - }, - "WebSocketKey": { - "type": "object", - "nullable": false, - "required": ["sessionId", "signature"], - "properties": { - "sessionId": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false, - "description": "session Id to access client" - }, - "signature": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false, - "description": "signature of the session ID" - } - }, - "description": "web-socket key details for signing fabric message with private key stored with external client" - }, - "FabricSigningCredentialType": { - "type": "string", - "enum": ["X.509", "Vault-X.509", "WS-X.509"], - "nullable": false, - "description": "different type of identity provider for singing fabric messages supported by this package" - }, - "FabricSigningCredential": { - "type": "object", - "required": ["keychainId", "keychainRef"], - "properties": { - "keychainId": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "keychainRef": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "type": { - "$ref": "#/components/schemas/FabricSigningCredentialType", - "description": "singing identity type to be used for signing fabric message , by by default default is supported" - }, - "vaultTransitKey": { - "$ref": "#/components/schemas/VaultTransitKey", - "description": "vault key details , if Vault-X.509 identity provider to be used for singing fabric messages" - }, - "webSocketKey": { - "$ref": "#/components/schemas/WebSocketKey", - "description": "web-socket key details , if WS-X.509 identity provider to be used for singing fabric messages" - } - } - }, - "ChainCodeLifeCycleCommandResponses": { - "type": "object", - "required": [ - "queryInstalledList", - "approveForMyOrgList", - "installList" - ], - "properties": { - "packaging": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "installList": { - "items": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "minItems": 1 - }, - "queryInstalledList": { - "items": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "minItems": 1 - }, - "approveForMyOrgList": { - "items": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "minItems": 1 - }, - "commit": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "queryCommitted": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - }, - "init": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - } - } - }, - "ChainCodeProgrammingLanguage": { - "type": "string", - "description": "Enumerates the supported source code programming languages of Hyperledger Fabric", - "enum": ["golang", "javascript", "typescript", "java"] - }, - "ChainCodeLanguageRuntime": { - "type": "string", - "description": "Enumerates the supported programming language runtimes of Hyperledger Fabric", - "enum": ["golang", "node", "java"] - }, - "ConnectionProfile": { - "type": "object", - "required": ["name", "version", "organizations", "peers"], - "additionalProperties": true, - "properties": { - "name": { - "type": "string", - "example": "basic-network", - "minLength": 1, - "maxLength": 1024 - }, - "x-type": { - "type": "string", - "minLength": 1, - "example": "hlfv1" - }, - "description": { - "type": "string", - "example": "The basic network" - }, - "version": { - "type": "string", - "example": "1.0" - }, - "client": { - "type": "object", - "properties": { - "organization": { - "type": "string", - "example": "Org1" - } - } - }, - "channels": { - "type": "object", - "additionalProperties": true - }, - "organizations": { - "type": "object", - "additionalProperties": true - }, - "orderers": { - "type": "object", - "additionalProperties": true - }, - "peers": { - "type": "object", - "additionalProperties": true - }, - "certificateAuthorities": { - "type": "object", - "additionalProperties": true - } - } - }, - "GatewayDiscoveryOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "asLocalhost": { - "type": "boolean", - "nullable": false - }, - "enabled": { - "type": "boolean", - "nullable": false - } - } - }, - "GatewayOptions": { - "type": "object", - "required": ["identity", "wallet"], - "properties": { - "connectionProfile": { - "$ref": "#/components/schemas/ConnectionProfile" - }, - "discovery": { - "$ref": "#/components/schemas/GatewayDiscoveryOptions", - "nullable": false - }, - "eventHandlerOptions": { - "$ref": "#/components/schemas/GatewayEventHandlerOptions", - "nullable": false - }, - "identity": { - "type": "string" - }, - "wallet": { - "type": "object", - "minProperties": 1, - "maxProperties": 1, - "properties": { - "keychain": { - "$ref": "#/components/schemas/FabricSigningCredential" - }, - "json": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 65535 - } - } - } - } - }, - "DefaultEventHandlerStrategy": { - "type": "string", - "enum": [ - "MSPID_SCOPE_ALLFORTX", - "MSPID_SCOPE_ANYFORTX", - "NETWORK_SCOPE_ALLFORTX", - "NETWORK_SCOPE_ANYFORTX" - ] - }, - "GatewayEventHandlerOptions": { - "type": "object", - "required": ["strategy"], - "additionalProperties": false, - "properties": { - "commitTimeout": { - "type": "number", - "nullable": false - }, - "endorseTimeout": { - "type": "number", - "nullable": false - }, - "strategy": { - "description": "The name of the strategy to be used when looking up the TxEventHandlerFactory to pass in to the Fabric Gateway as the strategy property of the discovery options.", - "$ref": "#/components/schemas/DefaultEventHandlerStrategy" - } - } - }, - "FileBase64": { - "description": "Represents a file-system file that has a name and a body which holds the file contents as a Base64 encoded string", - "type": "object", - "required": ["body", "filename"], - "properties": { - "body": { - "description": "The file's contents encoded as a Base64 string.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 104857600 - }, - "filename": { - "description": "The name as referred to on a file system", - "example": "my-cool-file-full-of-wonders-and-fun-stuff.go", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 255 - }, - "filepath": { - "description": "The relative path of the file, if it should be placed in a sub-directory", - "example": "./my/sub-folder/structure/", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 512 - } - } - }, - "FabricContractInvocationType": { - "type": "string", - "enum": [ - "FabricContractInvocationType.SEND", - "FabricContractInvocationType.CALL", - "FabricContractInvocationType.SENDPRIVATE" - ] - }, - "SSHExecCommandResponse": { - "type": "object", - "required": ["stdout", "stderr", "code", "signal"], - "properties": { - "stdout": { - "type": "string", - "nullable": false - }, - "stderr": { - "type": "string", - "nullable": false - }, - "code": { - "type": "integer", - "nullable": true - }, - "signal": { - "type": "string", - "nullable": true - } - } - }, - "RunTransactionResponseType": { - "type": "string", - "description": "Response format from transaction / query execution", - "enum": [ - "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.JSON", - "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.UTF8" - ], - "x-enum-varnames": ["JSON", "UTF8"] - }, - "RunTransactionRequest": { - "type": "object", - "required": [ - "signingCredential", - "channelName", - "contractName", - "invocationType", - "methodName", - "params" - ], - "additionalProperties": false, - "properties": { - "endorsingPeers": { - "description": "An array of endorsing peers (name or url) for the transaction.", - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - }, - "endorsingOrgs": { - "description": "An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction.", - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - }, - "transientData": { - "type": "object", - "nullable": true - }, - "gatewayOptions": { - "$ref": "#/components/schemas/GatewayOptions", - "nullable": false - }, - "signingCredential": { - "$ref": "#/components/schemas/FabricSigningCredential", - "nullable": false - }, - "channelName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "contractName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/FabricContractInvocationType", - "nullable": false, - "description": "Indicates if it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "params": { - "type": "array", - "nullable": false, - "default": [], - "items": { - "type": "string", - "nullable": true - } - }, - "responseType": { - "$ref": "#/components/schemas/RunTransactionResponseType" - } - } - }, - "RunTransactionResponse": { - "type": "object", - "required": ["functionOutput", "transactionId"], - "properties": { - "functionOutput": { - "type": "string", - "nullable": false - }, - "transactionId": { - "type": "string", - "nullable": false - } - } - }, - "RunDelegatedSignTransactionRequest": { - "type": "object", - "required": [ - "signerCertificate", - "signerMspID", - "channelName", - "contractName", - "invocationType", - "methodName", - "params" - ], - "additionalProperties": false, - "properties": { - "endorsingPeers": { - "description": "An array of endorsing peers (name or url) for the transaction.", - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - }, - "endorsingOrgs": { - "description": "An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction.", - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - }, - "transientData": { - "type": "object", - "nullable": true - }, - "signerCertificate": { - "type": "string", - "nullable": false - }, - "signerMspID": { - "type": "string", - "nullable": false - }, - "uniqueTransactionData": { - "description": "Can be used to uniquely identify and authorize signing request", - "nullable": false - }, - "channelName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "contractName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/FabricContractInvocationType", - "nullable": false, - "description": "Indicates if it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "params": { - "type": "array", - "nullable": false, - "default": [], - "items": { - "type": "string", - "nullable": true - } - }, - "responseType": { - "$ref": "#/components/schemas/RunTransactionResponseType" - } - } - }, - "GetTransactionReceiptResponse": { - "type": "object", - "properties": { - "blockNumber": { - "type": "string" - }, - "channelID": { - "type": "string" - }, - "transactionCreator": { - "$ref": "#/components/schemas/TransactReceiptTransactionCreator" - }, - "transactionEndorsement": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransactReceiptTransactionEndorsement" - } - }, - "blockMetaData": { - "$ref": "#/components/schemas/TransactReceiptBlockMetaData" - }, - "chainCodeName": { - "type": "string" - }, - "chainCodeVersion": { - "type": "string" - }, - "responseStatus": { - "type": "string" - }, - "rwsetKey": { - "type": "string" - }, - "rwsetWriteData": { - "type": "string" - } - } - }, - "DeploymentTargetOrganization": { - "type": "object", - "required": [ - "CORE_PEER_LOCALMSPID", - "CORE_PEER_ADDRESS", - "CORE_PEER_MSPCONFIGPATH", - "CORE_PEER_TLS_ROOTCERT_FILE", - "ORDERER_TLS_ROOTCERT_FILE" - ], - "properties": { - "CORE_PEER_LOCALMSPID": { - "type": "string", - "example": "Org1MSP", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_ADDRESS": { - "type": "string", - "example": "peer0.org1.example.com:7051", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_MSPCONFIGPATH": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_TLS_ROOTCERT_FILE": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "ORDERER_TLS_ROOTCERT_FILE": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - } - } - }, - "DeploymentTargetOrgFabric2x": { - "type": "object", - "required": [ - "CORE_PEER_LOCALMSPID", - "CORE_PEER_ADDRESS", - "CORE_PEER_MSPCONFIGPATH", - "CORE_PEER_TLS_ROOTCERT_FILE", - "ORDERER_TLS_ROOTCERT_FILE" - ], - "properties": { - "transient": { - "type": "string", - "description": "Transient map of arguments in JSON encoding", - "example": "orderer.example.com:7050", - "minLength": 1, - "maxLength": 1073741824 - }, - "CORE_PEER_LOCALMSPID": { - "type": "string", - "example": "Org1MSP", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_ADDRESS": { - "type": "string", - "example": "peer0.org1.example.com:7051", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_MSPCONFIGPATH": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "CORE_PEER_TLS_ROOTCERT_FILE": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - }, - "ORDERER_TLS_ROOTCERT_FILE": { - "type": "string", - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem", - "nullable": false, - "minLength": 1, - "maxLength": 1024, - "description": "Mapped to environment variables of the Fabric CLI container." - } - } - }, - "DeployContractGoSourceV1Request": { - "type": "object", - "required": [ - "goSource", - "targetOrganizations", - "chainCodeVersion", - "channelId", - "policyDslSource", - "targetPeerAddresses", - "tlsRootCertFiles" - ], - "additionalProperties": false, - "properties": { - "policyDslSource": { - "type": "string", - "minLength": 1, - "maxLength": 65535, - "nullable": false, - "example": "AND('Org1MSP.member','Org2MSP.member')" - }, - "tlsRootCertFiles": { - "type": "string", - "description": "The TLS root cert files that will be passed to the chaincode instantiation command.", - "minLength": 1, - "maxLength": 65535, - "nullable": false, - "example": "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" - }, - "channelId": { - "type": "string", - "description": "The name of the Fabric channel where the contract will get instantiated.", - "example": "mychannel", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "targetOrganizations": { - "type": "array", - "minItems": 1, - "nullable": false, - "maxItems": 1024, - "items": { - "$ref": "#/components/schemas/DeploymentTargetOrganization" - } - }, - "targetPeerAddresses": { - "type": "array", - "description": "An array of peer addresses where the contract will be instantiated. Note that at present only the first item from this array will be used which is the behavior taken from the official Fabric samples repository and therefore it is assumed to be correct usage.", - "example": ["peer0.org1.example.com:7051"], - "minItems": 1, - "maxItems": 2048, - "items": { - "type": "string", - "minLength": 1, - "maxLength": 4096 - } - }, - "constructorArgs": { - "type": "object", - "example": "{} - An empty object literal can be sufficient if your contract does not have parameters.", - "nullable": false, - "properties": { - "Args": { - "type": "array", - "minLength": 0, - "maxLength": 2048, - "items": {} - } - } - }, - "chainCodeVersion": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "example": "1.0.0", - "nullable": false - }, - "goSource": { - "description": "The your-smart-contract.go file where the functionality of your contract is implemented.", - "$ref": "#/components/schemas/FileBase64", - "nullable": false - }, - "goMod": { - "description": "The go.mod file that declares the dependencies of the chaincode go contract that is being deployed as part of this request.", - "$ref": "#/components/schemas/FileBase64", - "nullable": false - }, - "moduleName": { - "description": "The go module name that will be used for the go compilation process.", - "example": "hello-world-contract", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 255 - }, - "pinnedDeps": { - "type": "array", - "minItems": 0, - "maxItems": 1024, - "items": { - "type": "string", - "nullable": false, - "example": "github.com/hyperledger/fabric@v1.4.8" - } - }, - "modTidyOnly": { - "description": "Indicates to the go chaincode compiler of Cactus if it should do an actual go compilation with the contact source or if it should just execute the go mod tidy command.", - "type": "boolean", - "nullable": true - } - } - }, - "DeployContractGoSourceV1Response": { - "type": "object", - "required": [ - "success", - "installationCommandResponses", - "instantiationCommandResponse" - ], - "properties": { - "success": { - "type": "boolean" - }, - "installationCommandResponses": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - } - }, - "instantiationCommandResponse": { - "$ref": "#/components/schemas/SSHExecCommandResponse" - } - } - }, - "DeployContractV1Request": { - "type": "object", - "required": [ - "caFile", - "sourceFiles", - "targetOrganizations", - "ccName", - "ccLabel", - "ccVersion", - "ccSequence", - "channelId", - "ccLang", - "orderer", - "ordererTLSHostnameOverride" - ], - "additionalProperties": false, - "properties": { - "ccLang": { - "$ref": "#/components/schemas/ChainCodeProgrammingLanguage" - }, - "caFile": { - "type": "string", - "description": "File-system path pointing at the CA file.", - "example": "${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem", - "minLength": 1, - "maxLength": 4096 - }, - "orderer": { - "type": "string", - "description": "Ordering service endpoint specified as :", - "example": "orderer.example.com:7050", - "minLength": 1, - "maxLength": 65535 - }, - "ordererTLSHostnameOverride": { - "type": "string", - "description": "The hostname override to use when validating the TLS connection to the orderer", - "example": "orderer.example.com:7050", - "minLength": 1, - "maxLength": 65535 - }, - "connTimeout": { - "type": "integer", - "description": "Timeout for client to connect (default 3s)", - "nullable": false - }, - "signaturePolicy": { - "type": "string", - "description": "Passed in to the peer via the --signature-policy argument on the command line. See also: https://hyperledger-fabric.readthedocs.io/en/release-2.2/endorsement-policies.html#setting-chaincode-level-endorsement-policies", - "minLength": 1, - "maxLength": 65535, - "nullable": false, - "example": "AND('Org1MSP.member','Org2MSP.member')" - }, - "collectionsConfigFile": { - "type": "string", - "description": "Name of the collections config file as present in the sourceFiles array of the request.", - "nullable": false, - "minLength": 1, - "maxLength": 255 - }, - "channelId": { - "type": "string", - "description": "The name of the Fabric channel where the contract will get instantiated.", - "example": "mychannel", - "minLength": 1, - "maxLength": 2048, - "nullable": false - }, - "targetOrganizations": { - "type": "array", - "minItems": 1, - "nullable": false, - "maxItems": 1024, - "items": { - "$ref": "#/components/schemas/DeploymentTargetOrganization" - } - }, - "constructorArgs": { - "type": "object", - "example": "{} - An empty object literal can be sufficient if your contract does not have parameters.", - "nullable": false, - "properties": { - "Args": { - "type": "array", - "minLength": 0, - "maxLength": 2048, - "items": {} - } - } - }, - "ccSequence": { - "type": "number", - "example": 1, - "nullable": false - }, - "ccVersion": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "example": "1.0.0", - "nullable": false - }, - "ccName": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "example": "my-hello-world-contract", - "nullable": false - }, - "ccLabel": { - "description": "Human readable label to uniquely identify the contract. Recommended to include in this at least the contract name and the exact version in order to make it easily distinguishable from other deployments of the same contract.", - "example": "hello-world-contract", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 255 - }, - "sourceFiles": { - "description": "The your-smart-contract.go file where the functionality of your contract is implemented.", - "items": { - "$ref": "#/components/schemas/FileBase64" - }, - "type": "array", - "minItems": 1, - "maxItems": 65535, - "nullable": false - } - } - }, - "DeployContractV1Response": { - "type": "object", - "required": ["success", "packageIds", "lifecycle"], - "properties": { - "success": { - "type": "boolean" - }, - "packageIds": { - "type": "array", - "items": { - "type": "string", - "example": "f8c8e06bfc27771028c4bbc3564341887881e29b92a844c66c30bac0ff83966e", - "minLength": 1, - "maxLength": 4096, - "nullable": false - } - }, - "lifecycle": { - "$ref": "#/components/schemas/ChainCodeLifeCycleCommandResponses" - } - } - }, - "GetBlockRequestV1": { - "description": "Request for GetBlock endpoint.", - "type": "object", - "required": ["channelName", "gatewayOptions", "query"], - "properties": { - "channelName": { - "type": "string", - "description": "Fabric channel which we want to query.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "connectionChannelName": { - "type": "string", - "description": "Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "gatewayOptions": { - "$ref": "#/components/schemas/GatewayOptions", - "description": "Fabric SDK gateway options.", - "nullable": false - }, - "query": { - "description": "Query selector, caller must provide at least one of them. First found will be used, rest will be ignored, so it's recommended to pass single selector.", - "type": "object", - "properties": { - "blockNumber": { - "type": "string", - "description": "Select block by it's number.", - "nullable": false - }, - "blockHash": { - "type": "object", - "description": "Select block by it's hash.", - "required": ["buffer"], - "properties": { - "encoding": { - "type": "string", - "description": "NodeJS Buffer encoding (utf-8, hex, binary, base64, etc...). Passed directly to `Buffer.from()` call on hashBuffer. If not provided then JSON buffer format is assumed.", - "nullable": false - }, - "buffer": { - "type": "string", - "description": "Buffer of blockHash. It's encoding should be described in `encoding` parameter.", - "nullable": false - } - }, - "nullable": false - }, - "transactionId": { - "type": "string", - "description": "Select block by id of transaction that it contains.", - "nullable": false - } - } - }, - "responseType": { - "$ref": "#/components/schemas/GetBlockResponseTypeV1", - "description": "Type of response block to return.", - "nullable": false - } - } - }, - "GetChainInfoRequestV1": { - "description": "Request for GetChainInfo endpoint.", - "type": "object", - "required": ["channelName", "gatewayOptions"], - "properties": { - "channelName": { - "type": "string", - "description": "Fabric channel which we want to query.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "connectionChannelName": { - "type": "string", - "description": "Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "gatewayOptions": { - "$ref": "#/components/schemas/GatewayOptions", - "description": "Fabric SDK gateway options.", - "nullable": false - } - } - }, - "FabricFullBlockDataV1": { - "description": "Full hyperledger fabric block data." - }, - "GetBlockResponseDecodedV1": { - "type": "object", - "description": "When skipDecode is false (default) then decoded block object is returned.", - "required": ["decodedBlock"], - "properties": { - "decodedBlock": { - "$ref": "#/components/schemas/FabricFullBlockDataV1", - "nullable": false - } - } - }, - "GetBlockResponseEncodedV1": { - "type": "object", - "description": "When skipDecode is true then encoded block Buffer is returned.", - "required": ["encodedBlock"], - "properties": { - "encodedBlock": { - "type": "string" - } - } - }, - "GetBlockResponseV1": { - "description": "Response from GetBlock endpoint.", - "oneOf": [ - { - "$ref": "#/components/schemas/CactiBlockTransactionsResponseV1" - }, - { - "$ref": "#/components/schemas/CactiBlockFullResponseV1" - }, - { - "$ref": "#/components/schemas/GetBlockResponseDecodedV1" - }, - { - "$ref": "#/components/schemas/GetBlockResponseEncodedV1" - } - ] - }, - "GetChainInfoResponseV1": { - "type": "object", - "description": "Response from GetChainInfo endpoint.", - "required": ["height", "currentBlockHash", "previousBlockHash"], - "properties": { - "height": { - "description": "Current height of fabric ledger", - "type": "number", - "nullable": false - }, - "currentBlockHash": { - "description": "Current block hash of fabric ledger", - "type": "string", - "nullable": false - }, - "previousBlockHash": { - "description": "Previous block hash of fabric ledger", - "type": "string", - "nullable": false - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": false - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "WatchBlocksV1": { - "type": "string", - "description": "Websocket requests for monitoring new blocks.", - "enum": [ - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Subscribe", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.SubscribeDelegatedSign", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Next", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Error", - "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "SubscribeDelegatedSign", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchBlocksListenerTypeV1": { - "type": "string", - "description": "Response type from WatchBlocks. 'Cacti*' are custom views, others correspond to fabric SDK call.", - "enum": [ - "filtered", - "full", - "private", - "cacti:transactions", - "cacti:full-block" - ], - "x-enum-varnames": [ - "Filtered", - "Full", - "Private", - "CactiTransactions", - "CactiFullBlock" - ] - }, - "GetBlockResponseTypeV1": { - "type": "string", - "default": "full", - "description": "Response type from GetBlock.", - "enum": ["full", "encoded", "cacti:transactions", "cacti:full-block"], - "x-enum-varnames": [ - "Full", - "Encoded", - "CactiTransactions", - "CactiFullBlock" - ] - }, - "WatchBlocksOptionsV1": { - "type": "object", - "description": "Options passed when subscribing to block monitoring.", - "required": ["channelName", "gatewayOptions", "type"], - "properties": { - "channelName": { - "type": "string", - "description": "Hyperledger Fabric channel to connect to.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "gatewayOptions": { - "$ref": "#/components/schemas/GatewayOptions", - "description": "Options to Hyperledger Fabric Node SDK Gateway", - "nullable": false - }, - "type": { - "$ref": "#/components/schemas/WatchBlocksListenerTypeV1", - "description": "Type of response block to return.", - "nullable": false - }, - "startBlock": { - "type": "string", - "description": "From which block start monitoring. Defaults to latest.", - "minLength": 1, - "maxLength": 100, - "nullable": false - } - } - }, - "WatchBlocksDelegatedSignOptionsV1": { - "type": "object", - "description": "Options passed when subscribing to block monitoring with delegated signing.", - "required": ["type", "channelName", "signerCertificate", "signerMspID"], - "properties": { - "type": { - "$ref": "#/components/schemas/WatchBlocksListenerTypeV1", - "description": "Type of response block to return.", - "nullable": false - }, - "startBlock": { - "type": "string", - "description": "From which block start monitoring. Defaults to latest.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "channelName": { - "type": "string", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "signerCertificate": { - "type": "string", - "nullable": false - }, - "signerMspID": { - "type": "string", - "nullable": false - }, - "uniqueTransactionData": { - "description": "Can be used to uniquely identify and authorize signing request", - "nullable": false - } - } - }, - "CactiBlockTransactionEventV1": { - "type": "object", - "description": "Transaction summary from commited block.", - "required": [ - "chaincodeId", - "transactionId", - "functionName", - "functionArgs" - ], - "properties": { - "chaincodeId": { - "description": "ChainCode containing function that was executed.", - "nullable": false, - "type": "string" - }, - "transactionId": { - "description": "Transaction identifier.", - "nullable": false, - "type": "string" - }, - "functionName": { - "description": "Function name that was executed.", - "nullable": false, - "type": "string" - }, - "functionArgs": { - "description": "List of function arguments.", - "type": "array", - "items": { - "type": "string", - "minLength": 0, - "nullable": false - } - } - } - }, - "CactiBlockTransactionsResponseV1": { - "type": "object", - "description": "Custom response containing block transactions summary. Compatible with legacy fabric-socketio connector monitoring.", - "required": ["cactiTransactionsEvents"], - "properties": { - "cactiTransactionsEvents": { - "description": "List of transactions summary", - "type": "array", - "items": { - "$ref": "#/components/schemas/CactiBlockTransactionEventV1", - "nullable": false - } - } - } - }, - "CactiBlockFullResponseV1": { - "type": "object", - "description": "Custom response containing full block summary.", - "required": ["cactiFullEvents"], - "properties": { - "cactiFullEvents": { - "description": "Full parsed block with transactions.", - "$ref": "#/components/schemas/CactiBlockFullEventV1", - "nullable": false - } - } - }, - "WatchBlocksFullResponseV1": { - "type": "object", - "description": "Response that corresponds to Fabric SDK 'full' EventType.", - "required": ["fullBlock"], - "properties": { - "fullBlock": { - "description": "Full commited block.", - "nullable": false - } - } - }, - "WatchBlocksFilteredResponseV1": { - "type": "object", - "description": "Response that corresponds to Fabric SDK 'filtered' EventType.", - "required": ["filteredBlock"], - "properties": { - "filteredBlock": { - "description": "Filtered commited block.", - "nullable": false - } - } - }, - "WatchBlocksPrivateResponseV1": { - "type": "object", - "description": "Response that corresponds to Fabric SDK 'private' EventType.", - "required": ["privateBlock"], - "properties": { - "privateBlock": { - "description": "Private commited block.", - "nullable": false - } - } - }, - "FabricX509CertificateV1": { - "type": "object", - "description": "Transaction endorser certificate object", - "required": [ - "issuer", - "serialNumber", - "subject", - "subjectAltName", - "validFrom", - "validTo", - "pem" - ], - "properties": { - "issuer": { - "nullable": false, - "type": "string" - }, - "serialNumber": { - "nullable": false, - "type": "string" - }, - "subject": { - "nullable": false, - "type": "string" - }, - "subjectAltName": { - "nullable": false, - "type": "string" - }, - "validFrom": { - "nullable": false, - "type": "string" - }, - "validTo": { - "nullable": false, - "type": "string" - }, - "pem": { - "nullable": false, - "type": "string" - } - } - }, - "FabricCertificateIdentityV1": { - "type": "object", - "description": "Combination of certificate and it's MSP ID used to identify fabric actors.", - "required": ["mspid", "cert"], - "properties": { - "mspid": { - "nullable": false, - "type": "string" - }, - "cert": { - "$ref": "#/components/schemas/FabricX509CertificateV1", - "nullable": false - } - } - }, - "FullBlockTransactionEndorsementV1": { - "type": "object", - "description": "Transaction endorsment object returned from fabric block.", - "required": ["signer", "signature"], - "properties": { - "signer": { - "$ref": "#/components/schemas/FabricCertificateIdentityV1", - "nullable": false - }, - "signature": { - "nullable": false, - "type": "string" - } - } - }, - "FullBlockTransactionActionV1": { - "type": "object", - "description": "Transaction action returned from fabric block.", - "required": [ - "functionName", - "functionArgs", - "chaincodeId", - "creator", - "endorsements" - ], - "properties": { - "functionName": { - "nullable": false, - "type": "string" - }, - "functionArgs": { - "type": "array", - "items": { - "nullable": false, - "type": "string" - } - }, - "chaincodeId": { - "nullable": false, - "type": "string" - }, - "creator": { - "$ref": "#/components/schemas/FabricCertificateIdentityV1", - "nullable": false - }, - "endorsements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FullBlockTransactionEndorsementV1", - "nullable": false - } - } - } - }, - "FullBlockTransactionEventV1": { - "type": "object", - "description": "Transaction returned from fabric block.", - "required": [ - "hash", - "channelId", - "timestamp", - "protocolVersion", - "transactionType", - "epoch", - "actions" - ], - "properties": { - "hash": { - "nullable": false, - "type": "string" - }, - "channelId": { - "nullable": false, - "type": "string" - }, - "timestamp": { - "nullable": false, - "type": "string" - }, - "protocolVersion": { - "nullable": false, - "type": "number" - }, - "transactionType": { - "nullable": false, - "type": "string" - }, - "epoch": { - "nullable": false, - "type": "number" - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FullBlockTransactionActionV1", - "nullable": false - } - } - } - }, - "CactiBlockFullEventV1": { - "type": "object", - "description": "Custom format full fabric block with transactions", - "required": [ - "blockNumber", - "blockHash", - "previousBlockHash", - "transactionCount", - "cactiTransactionsEvents" - ], - "properties": { - "blockNumber": { - "nullable": false, - "type": "number" - }, - "blockHash": { - "nullable": false, - "type": "string" - }, - "previousBlockHash": { - "nullable": false, - "type": "string" - }, - "transactionCount": { - "nullable": false, - "type": "number" - }, - "cactiTransactionsEvents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FullBlockTransactionEventV1", - "nullable": false - } - } - } - }, - "WatchBlocksCactusErrorResponseV1": { - "type": "object", - "description": "Error response from WatchBlocks operation.", - "required": ["code", "errorMessage"], - "properties": { - "code": { - "description": "Error code.", - "type": "number" - }, - "errorMessage": { - "description": "Description of the error.", - "type": "string" - } - } - }, - "WatchBlocksResponseV1": { - "description": "Response block from WatchBlocks endpoint. Depends on 'type' passed in subscription options.", - "oneOf": [ - { - "$ref": "#/components/schemas/CactiBlockTransactionsResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/CactiBlockFullResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksFullResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksFilteredResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksPrivateResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksCactusErrorResponseV1", - "nullable": false - } - ] - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction" - } - }, - "operationId": "runTransactionV1", - "summary": "Runs a transaction on a Fabric ledger.", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction" - } - }, - "operationId": "runDelegatedSignTransactionV1", - "summary": "Runs a transaction on a Fabric ledger using user-provided signing callback.", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunDelegatedSignTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid" - } - }, - "operationId": "getTransactionReceiptByTxIDV1", - "summary": "get a transaction receipt by tx id on a Fabric ledger.", - "description": "", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTransactionReceiptResponse" - } - } - } - }, - "404": { - "description": "" - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source": { - "post": { - "operationId": "deployContractGoSourceV1", - "summary": "Deploys a chaincode contract in the form of a go sources.", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source" - } - }, - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractGoSourceV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractGoSourceV1Response" - } - } - } - }, - "501": { - "description": "Not implemented", - "content": { - "text/plain": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - } - } - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract": { - "post": { - "operationId": "deployContractV1", - "summary": "Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The 'v1' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version.", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract" - } - }, - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Response" - } - } - } - }, - "501": { - "description": "Not implemented", - "content": { - "text/plain": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - } - } - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block": { - "post": { - "operationId": "getBlockV1", - "summary": "Get block from the channel using one of selectors from the input. Works only on Fabric 2.x.", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block" - } - }, - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBlockRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBlockResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info": { - "post": { - "operationId": "getChainInfoV1", - "summary": "Get fabric ledger chain info.", - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info" - } - }, - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetChainInfoRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetChainInfoResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index b88f5e8810..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,84 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/CactiBlockFullEventV1.kt -src/main/kotlin/org/openapitools/client/models/CactiBlockFullResponseV1.kt -src/main/kotlin/org/openapitools/client/models/CactiBlockTransactionEventV1.kt -src/main/kotlin/org/openapitools/client/models/CactiBlockTransactionsResponseV1.kt -src/main/kotlin/org/openapitools/client/models/ChainCodeLanguageRuntime.kt -src/main/kotlin/org/openapitools/client/models/ChainCodeLifeCycleCommandResponses.kt -src/main/kotlin/org/openapitools/client/models/ChainCodeProgrammingLanguage.kt -src/main/kotlin/org/openapitools/client/models/ConnectionProfile.kt -src/main/kotlin/org/openapitools/client/models/ConnectionProfileClient.kt -src/main/kotlin/org/openapitools/client/models/DefaultEventHandlerStrategy.kt -src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1501Response.kt -src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1Request.kt -src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1RequestConstructorArgs.kt -src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1Response.kt -src/main/kotlin/org/openapitools/client/models/DeployContractV1Request.kt -src/main/kotlin/org/openapitools/client/models/DeployContractV1Response.kt -src/main/kotlin/org/openapitools/client/models/DeploymentTargetOrgFabric2x.kt -src/main/kotlin/org/openapitools/client/models/DeploymentTargetOrganization.kt -src/main/kotlin/org/openapitools/client/models/ErrorExceptionResponseV1.kt -src/main/kotlin/org/openapitools/client/models/FabricCertificateIdentityV1.kt -src/main/kotlin/org/openapitools/client/models/FabricContractInvocationType.kt -src/main/kotlin/org/openapitools/client/models/FabricSigningCredential.kt -src/main/kotlin/org/openapitools/client/models/FabricSigningCredentialType.kt -src/main/kotlin/org/openapitools/client/models/FabricX509CertificateV1.kt -src/main/kotlin/org/openapitools/client/models/FileBase64.kt -src/main/kotlin/org/openapitools/client/models/FullBlockTransactionActionV1.kt -src/main/kotlin/org/openapitools/client/models/FullBlockTransactionEndorsementV1.kt -src/main/kotlin/org/openapitools/client/models/FullBlockTransactionEventV1.kt -src/main/kotlin/org/openapitools/client/models/GatewayDiscoveryOptions.kt -src/main/kotlin/org/openapitools/client/models/GatewayEventHandlerOptions.kt -src/main/kotlin/org/openapitools/client/models/GatewayOptions.kt -src/main/kotlin/org/openapitools/client/models/GatewayOptionsWallet.kt -src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1.kt -src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1Query.kt -src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1QueryBlockHash.kt -src/main/kotlin/org/openapitools/client/models/GetBlockResponseDecodedV1.kt -src/main/kotlin/org/openapitools/client/models/GetBlockResponseEncodedV1.kt -src/main/kotlin/org/openapitools/client/models/GetBlockResponseTypeV1.kt -src/main/kotlin/org/openapitools/client/models/GetBlockResponseV1.kt -src/main/kotlin/org/openapitools/client/models/GetChainInfoRequestV1.kt -src/main/kotlin/org/openapitools/client/models/GetChainInfoResponseV1.kt -src/main/kotlin/org/openapitools/client/models/GetTransactionReceiptResponse.kt -src/main/kotlin/org/openapitools/client/models/RunDelegatedSignTransactionRequest.kt -src/main/kotlin/org/openapitools/client/models/RunTransactionRequest.kt -src/main/kotlin/org/openapitools/client/models/RunTransactionResponse.kt -src/main/kotlin/org/openapitools/client/models/RunTransactionResponseType.kt -src/main/kotlin/org/openapitools/client/models/SSHExecCommandResponse.kt -src/main/kotlin/org/openapitools/client/models/TransactReceiptBlockMetaData.kt -src/main/kotlin/org/openapitools/client/models/TransactReceiptTransactionCreator.kt -src/main/kotlin/org/openapitools/client/models/TransactReceiptTransactionEndorsement.kt -src/main/kotlin/org/openapitools/client/models/VaultTransitKey.kt -src/main/kotlin/org/openapitools/client/models/WatchBlocksCactusErrorResponseV1.kt -src/main/kotlin/org/openapitools/client/models/WatchBlocksDelegatedSignOptionsV1.kt -src/main/kotlin/org/openapitools/client/models/WatchBlocksFilteredResponseV1.kt -src/main/kotlin/org/openapitools/client/models/WatchBlocksFullResponseV1.kt -src/main/kotlin/org/openapitools/client/models/WatchBlocksListenerTypeV1.kt -src/main/kotlin/org/openapitools/client/models/WatchBlocksOptionsV1.kt -src/main/kotlin/org/openapitools/client/models/WatchBlocksPrivateResponseV1.kt -src/main/kotlin/org/openapitools/client/models/WatchBlocksResponseV1.kt -src/main/kotlin/org/openapitools/client/models/WatchBlocksV1.kt -src/main/kotlin/org/openapitools/client/models/WebSocketKey.kt diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index 35464629d2..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - Connector Fabric - -Can perform basic tasks on a fabric ledger - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**deployContractGoSourceV1**](docs/DefaultApi.md#deploycontractgosourcev1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source | Deploys a chaincode contract in the form of a go sources. -*DefaultApi* | [**deployContractV1**](docs/DefaultApi.md#deploycontractv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract | Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The 'v1' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version. -*DefaultApi* | [**getBlockV1**](docs/DefaultApi.md#getblockv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block | Get block from the channel using one of selectors from the input. Works only on Fabric 2.x. -*DefaultApi* | [**getChainInfoV1**](docs/DefaultApi.md#getchaininfov1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info | Get fabric ledger chain info. -*DefaultApi* | [**getPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**getTransactionReceiptByTxIDV1**](docs/DefaultApi.md#gettransactionreceiptbytxidv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid | get a transaction receipt by tx id on a Fabric ledger. -*DefaultApi* | [**runDelegatedSignTransactionV1**](docs/DefaultApi.md#rundelegatedsigntransactionv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction | Runs a transaction on a Fabric ledger using user-provided signing callback. -*DefaultApi* | [**runTransactionV1**](docs/DefaultApi.md#runtransactionv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction | Runs a transaction on a Fabric ledger. - - - -## Documentation for Models - - - [org.openapitools.client.models.CactiBlockFullEventV1](docs/CactiBlockFullEventV1.md) - - [org.openapitools.client.models.CactiBlockFullResponseV1](docs/CactiBlockFullResponseV1.md) - - [org.openapitools.client.models.CactiBlockTransactionEventV1](docs/CactiBlockTransactionEventV1.md) - - [org.openapitools.client.models.CactiBlockTransactionsResponseV1](docs/CactiBlockTransactionsResponseV1.md) - - [org.openapitools.client.models.ChainCodeLanguageRuntime](docs/ChainCodeLanguageRuntime.md) - - [org.openapitools.client.models.ChainCodeLifeCycleCommandResponses](docs/ChainCodeLifeCycleCommandResponses.md) - - [org.openapitools.client.models.ChainCodeProgrammingLanguage](docs/ChainCodeProgrammingLanguage.md) - - [org.openapitools.client.models.ConnectionProfile](docs/ConnectionProfile.md) - - [org.openapitools.client.models.ConnectionProfileClient](docs/ConnectionProfileClient.md) - - [org.openapitools.client.models.DefaultEventHandlerStrategy](docs/DefaultEventHandlerStrategy.md) - - [org.openapitools.client.models.DeployContractGoSourceV1501Response](docs/DeployContractGoSourceV1501Response.md) - - [org.openapitools.client.models.DeployContractGoSourceV1Request](docs/DeployContractGoSourceV1Request.md) - - [org.openapitools.client.models.DeployContractGoSourceV1RequestConstructorArgs](docs/DeployContractGoSourceV1RequestConstructorArgs.md) - - [org.openapitools.client.models.DeployContractGoSourceV1Response](docs/DeployContractGoSourceV1Response.md) - - [org.openapitools.client.models.DeployContractV1Request](docs/DeployContractV1Request.md) - - [org.openapitools.client.models.DeployContractV1Response](docs/DeployContractV1Response.md) - - [org.openapitools.client.models.DeploymentTargetOrgFabric2x](docs/DeploymentTargetOrgFabric2x.md) - - [org.openapitools.client.models.DeploymentTargetOrganization](docs/DeploymentTargetOrganization.md) - - [org.openapitools.client.models.ErrorExceptionResponseV1](docs/ErrorExceptionResponseV1.md) - - [org.openapitools.client.models.FabricCertificateIdentityV1](docs/FabricCertificateIdentityV1.md) - - [org.openapitools.client.models.FabricContractInvocationType](docs/FabricContractInvocationType.md) - - [org.openapitools.client.models.FabricSigningCredential](docs/FabricSigningCredential.md) - - [org.openapitools.client.models.FabricSigningCredentialType](docs/FabricSigningCredentialType.md) - - [org.openapitools.client.models.FabricX509CertificateV1](docs/FabricX509CertificateV1.md) - - [org.openapitools.client.models.FileBase64](docs/FileBase64.md) - - [org.openapitools.client.models.FullBlockTransactionActionV1](docs/FullBlockTransactionActionV1.md) - - [org.openapitools.client.models.FullBlockTransactionEndorsementV1](docs/FullBlockTransactionEndorsementV1.md) - - [org.openapitools.client.models.FullBlockTransactionEventV1](docs/FullBlockTransactionEventV1.md) - - [org.openapitools.client.models.GatewayDiscoveryOptions](docs/GatewayDiscoveryOptions.md) - - [org.openapitools.client.models.GatewayEventHandlerOptions](docs/GatewayEventHandlerOptions.md) - - [org.openapitools.client.models.GatewayOptions](docs/GatewayOptions.md) - - [org.openapitools.client.models.GatewayOptionsWallet](docs/GatewayOptionsWallet.md) - - [org.openapitools.client.models.GetBlockRequestV1](docs/GetBlockRequestV1.md) - - [org.openapitools.client.models.GetBlockRequestV1Query](docs/GetBlockRequestV1Query.md) - - [org.openapitools.client.models.GetBlockRequestV1QueryBlockHash](docs/GetBlockRequestV1QueryBlockHash.md) - - [org.openapitools.client.models.GetBlockResponseDecodedV1](docs/GetBlockResponseDecodedV1.md) - - [org.openapitools.client.models.GetBlockResponseEncodedV1](docs/GetBlockResponseEncodedV1.md) - - [org.openapitools.client.models.GetBlockResponseTypeV1](docs/GetBlockResponseTypeV1.md) - - [org.openapitools.client.models.GetBlockResponseV1](docs/GetBlockResponseV1.md) - - [org.openapitools.client.models.GetChainInfoRequestV1](docs/GetChainInfoRequestV1.md) - - [org.openapitools.client.models.GetChainInfoResponseV1](docs/GetChainInfoResponseV1.md) - - [org.openapitools.client.models.GetTransactionReceiptResponse](docs/GetTransactionReceiptResponse.md) - - [org.openapitools.client.models.RunDelegatedSignTransactionRequest](docs/RunDelegatedSignTransactionRequest.md) - - [org.openapitools.client.models.RunTransactionRequest](docs/RunTransactionRequest.md) - - [org.openapitools.client.models.RunTransactionResponse](docs/RunTransactionResponse.md) - - [org.openapitools.client.models.RunTransactionResponseType](docs/RunTransactionResponseType.md) - - [org.openapitools.client.models.SSHExecCommandResponse](docs/SSHExecCommandResponse.md) - - [org.openapitools.client.models.TransactReceiptBlockMetaData](docs/TransactReceiptBlockMetaData.md) - - [org.openapitools.client.models.TransactReceiptTransactionCreator](docs/TransactReceiptTransactionCreator.md) - - [org.openapitools.client.models.TransactReceiptTransactionEndorsement](docs/TransactReceiptTransactionEndorsement.md) - - [org.openapitools.client.models.VaultTransitKey](docs/VaultTransitKey.md) - - [org.openapitools.client.models.WatchBlocksCactusErrorResponseV1](docs/WatchBlocksCactusErrorResponseV1.md) - - [org.openapitools.client.models.WatchBlocksDelegatedSignOptionsV1](docs/WatchBlocksDelegatedSignOptionsV1.md) - - [org.openapitools.client.models.WatchBlocksFilteredResponseV1](docs/WatchBlocksFilteredResponseV1.md) - - [org.openapitools.client.models.WatchBlocksFullResponseV1](docs/WatchBlocksFullResponseV1.md) - - [org.openapitools.client.models.WatchBlocksListenerTypeV1](docs/WatchBlocksListenerTypeV1.md) - - [org.openapitools.client.models.WatchBlocksOptionsV1](docs/WatchBlocksOptionsV1.md) - - [org.openapitools.client.models.WatchBlocksPrivateResponseV1](docs/WatchBlocksPrivateResponseV1.md) - - [org.openapitools.client.models.WatchBlocksResponseV1](docs/WatchBlocksResponseV1.md) - - [org.openapitools.client.models.WatchBlocksV1](docs/WatchBlocksV1.md) - - [org.openapitools.client.models.WebSocketKey](docs/WebSocketKey.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index 121dac0591..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,635 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.DeployContractGoSourceV1501Response -import org.openapitools.client.models.DeployContractGoSourceV1Request -import org.openapitools.client.models.DeployContractGoSourceV1Response -import org.openapitools.client.models.DeployContractV1Request -import org.openapitools.client.models.DeployContractV1Response -import org.openapitools.client.models.ErrorExceptionResponseV1 -import org.openapitools.client.models.GetBlockRequestV1 -import org.openapitools.client.models.GetBlockResponseV1 -import org.openapitools.client.models.GetChainInfoRequestV1 -import org.openapitools.client.models.GetChainInfoResponseV1 -import org.openapitools.client.models.GetTransactionReceiptResponse -import org.openapitools.client.models.RunDelegatedSignTransactionRequest -import org.openapitools.client.models.RunTransactionRequest -import org.openapitools.client.models.RunTransactionResponse - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * Deploys a chaincode contract in the form of a go sources. - * - * @param deployContractGoSourceV1Request (optional) - * @return DeployContractGoSourceV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun deployContractGoSourceV1(deployContractGoSourceV1Request: DeployContractGoSourceV1Request? = null) : DeployContractGoSourceV1Response { - val localVarResponse = deployContractGoSourceV1WithHttpInfo(deployContractGoSourceV1Request = deployContractGoSourceV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DeployContractGoSourceV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Deploys a chaincode contract in the form of a go sources. - * - * @param deployContractGoSourceV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun deployContractGoSourceV1WithHttpInfo(deployContractGoSourceV1Request: DeployContractGoSourceV1Request?) : ApiResponse { - val localVariableConfig = deployContractGoSourceV1RequestConfig(deployContractGoSourceV1Request = deployContractGoSourceV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation deployContractGoSourceV1 - * - * @param deployContractGoSourceV1Request (optional) - * @return RequestConfig - */ - fun deployContractGoSourceV1RequestConfig(deployContractGoSourceV1Request: DeployContractGoSourceV1Request?) : RequestConfig { - val localVariableBody = deployContractGoSourceV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The 'v1' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version. - * - * @param deployContractV1Request (optional) - * @return DeployContractV1Response - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun deployContractV1(deployContractV1Request: DeployContractV1Request? = null) : DeployContractV1Response { - val localVarResponse = deployContractV1WithHttpInfo(deployContractV1Request = deployContractV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as DeployContractV1Response - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The 'v1' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version. - * - * @param deployContractV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun deployContractV1WithHttpInfo(deployContractV1Request: DeployContractV1Request?) : ApiResponse { - val localVariableConfig = deployContractV1RequestConfig(deployContractV1Request = deployContractV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation deployContractV1 - * - * @param deployContractV1Request (optional) - * @return RequestConfig - */ - fun deployContractV1RequestConfig(deployContractV1Request: DeployContractV1Request?) : RequestConfig { - val localVariableBody = deployContractV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get block from the channel using one of selectors from the input. Works only on Fabric 2.x. - * - * @param getBlockRequestV1 (optional) - * @return GetBlockResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getBlockV1(getBlockRequestV1: GetBlockRequestV1? = null) : GetBlockResponseV1 { - val localVarResponse = getBlockV1WithHttpInfo(getBlockRequestV1 = getBlockRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetBlockResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get block from the channel using one of selectors from the input. Works only on Fabric 2.x. - * - * @param getBlockRequestV1 (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getBlockV1WithHttpInfo(getBlockRequestV1: GetBlockRequestV1?) : ApiResponse { - val localVariableConfig = getBlockV1RequestConfig(getBlockRequestV1 = getBlockRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getBlockV1 - * - * @param getBlockRequestV1 (optional) - * @return RequestConfig - */ - fun getBlockV1RequestConfig(getBlockRequestV1: GetBlockRequestV1?) : RequestConfig { - val localVariableBody = getBlockRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get fabric ledger chain info. - * - * @param getChainInfoRequestV1 (optional) - * @return GetChainInfoResponseV1 - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getChainInfoV1(getChainInfoRequestV1: GetChainInfoRequestV1? = null) : GetChainInfoResponseV1 { - val localVarResponse = getChainInfoV1WithHttpInfo(getChainInfoRequestV1 = getChainInfoRequestV1) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetChainInfoResponseV1 - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get fabric ledger chain info. - * - * @param getChainInfoRequestV1 (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getChainInfoV1WithHttpInfo(getChainInfoRequestV1: GetChainInfoRequestV1?) : ApiResponse { - val localVariableConfig = getChainInfoV1RequestConfig(getChainInfoRequestV1 = getChainInfoRequestV1) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getChainInfoV1 - * - * @param getChainInfoRequestV1 (optional) - * @return RequestConfig - */ - fun getChainInfoV1RequestConfig(getChainInfoRequestV1: GetChainInfoRequestV1?) : RequestConfig { - val localVariableBody = getChainInfoRequestV1 - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Get the Prometheus Metrics - * - * @return kotlin.String - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getPrometheusMetricsV1() : kotlin.String { - val localVarResponse = getPrometheusMetricsV1WithHttpInfo() - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.String - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Get the Prometheus Metrics - * - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getPrometheusMetricsV1WithHttpInfo() : ApiResponse { - val localVariableConfig = getPrometheusMetricsV1RequestConfig() - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getPrometheusMetricsV1 - * - * @return RequestConfig - */ - fun getPrometheusMetricsV1RequestConfig() : RequestConfig { - val localVariableBody = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * get a transaction receipt by tx id on a Fabric ledger. - * - * @param runTransactionRequest - * @return GetTransactionReceiptResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun getTransactionReceiptByTxIDV1(runTransactionRequest: RunTransactionRequest) : GetTransactionReceiptResponse { - val localVarResponse = getTransactionReceiptByTxIDV1WithHttpInfo(runTransactionRequest = runTransactionRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as GetTransactionReceiptResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * get a transaction receipt by tx id on a Fabric ledger. - * - * @param runTransactionRequest - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun getTransactionReceiptByTxIDV1WithHttpInfo(runTransactionRequest: RunTransactionRequest) : ApiResponse { - val localVariableConfig = getTransactionReceiptByTxIDV1RequestConfig(runTransactionRequest = runTransactionRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation getTransactionReceiptByTxIDV1 - * - * @param runTransactionRequest - * @return RequestConfig - */ - fun getTransactionReceiptByTxIDV1RequestConfig(runTransactionRequest: RunTransactionRequest) : RequestConfig { - val localVariableBody = runTransactionRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Runs a transaction on a Fabric ledger using user-provided signing callback. - * - * @param runDelegatedSignTransactionRequest - * @return RunTransactionResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun runDelegatedSignTransactionV1(runDelegatedSignTransactionRequest: RunDelegatedSignTransactionRequest) : RunTransactionResponse { - val localVarResponse = runDelegatedSignTransactionV1WithHttpInfo(runDelegatedSignTransactionRequest = runDelegatedSignTransactionRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as RunTransactionResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Runs a transaction on a Fabric ledger using user-provided signing callback. - * - * @param runDelegatedSignTransactionRequest - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun runDelegatedSignTransactionV1WithHttpInfo(runDelegatedSignTransactionRequest: RunDelegatedSignTransactionRequest) : ApiResponse { - val localVariableConfig = runDelegatedSignTransactionV1RequestConfig(runDelegatedSignTransactionRequest = runDelegatedSignTransactionRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation runDelegatedSignTransactionV1 - * - * @param runDelegatedSignTransactionRequest - * @return RequestConfig - */ - fun runDelegatedSignTransactionV1RequestConfig(runDelegatedSignTransactionRequest: RunDelegatedSignTransactionRequest) : RequestConfig { - val localVariableBody = runDelegatedSignTransactionRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * Runs a transaction on a Fabric ledger. - * - * @param runTransactionRequest - * @return RunTransactionResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun runTransactionV1(runTransactionRequest: RunTransactionRequest) : RunTransactionResponse { - val localVarResponse = runTransactionV1WithHttpInfo(runTransactionRequest = runTransactionRequest) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as RunTransactionResponse - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * Runs a transaction on a Fabric ledger. - * - * @param runTransactionRequest - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun runTransactionV1WithHttpInfo(runTransactionRequest: RunTransactionRequest) : ApiResponse { - val localVariableConfig = runTransactionV1RequestConfig(runTransactionRequest = runTransactionRequest) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation runTransactionV1 - * - * @param runTransactionRequest - * @return RequestConfig - */ - fun runTransactionV1RequestConfig(runTransactionRequest: RunTransactionRequest) : RequestConfig { - val localVariableBody = runTransactionRequest - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockFullEventV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockFullEventV1.kt deleted file mode 100644 index 787a3429ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockFullEventV1.kt +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FullBlockTransactionEventV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Custom format full fabric block with transactions - * - * @param blockNumber - * @param blockHash - * @param previousBlockHash - * @param transactionCount - * @param cactiTransactionsEvents - */ - - -data class CactiBlockFullEventV1 ( - - @Json(name = "blockNumber") - val blockNumber: java.math.BigDecimal, - - @Json(name = "blockHash") - val blockHash: kotlin.String, - - @Json(name = "previousBlockHash") - val previousBlockHash: kotlin.String, - - @Json(name = "transactionCount") - val transactionCount: java.math.BigDecimal, - - @Json(name = "cactiTransactionsEvents") - val cactiTransactionsEvents: kotlin.collections.List - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockFullResponseV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockFullResponseV1.kt deleted file mode 100644 index f01837075d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockFullResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CactiBlockFullEventV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Custom response containing full block summary. - * - * @param cactiFullEvents - */ - - -data class CactiBlockFullResponseV1 ( - - @Json(name = "cactiFullEvents") - val cactiFullEvents: CactiBlockFullEventV1 - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockTransactionEventV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockTransactionEventV1.kt deleted file mode 100644 index b8769ce0af..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockTransactionEventV1.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Transaction summary from commited block. - * - * @param chaincodeId ChainCode containing function that was executed. - * @param transactionId Transaction identifier. - * @param functionName Function name that was executed. - * @param functionArgs List of function arguments. - */ - - -data class CactiBlockTransactionEventV1 ( - - /* ChainCode containing function that was executed. */ - @Json(name = "chaincodeId") - val chaincodeId: kotlin.String, - - /* Transaction identifier. */ - @Json(name = "transactionId") - val transactionId: kotlin.String, - - /* Function name that was executed. */ - @Json(name = "functionName") - val functionName: kotlin.String, - - /* List of function arguments. */ - @Json(name = "functionArgs") - val functionArgs: kotlin.collections.List - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockTransactionsResponseV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockTransactionsResponseV1.kt deleted file mode 100644 index cde44f8ed0..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CactiBlockTransactionsResponseV1.kt +++ /dev/null @@ -1,37 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CactiBlockTransactionEventV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Custom response containing block transactions summary. Compatible with legacy fabric-socketio connector monitoring. - * - * @param cactiTransactionsEvents List of transactions summary - */ - - -data class CactiBlockTransactionsResponseV1 ( - - /* List of transactions summary */ - @Json(name = "cactiTransactionsEvents") - val cactiTransactionsEvents: kotlin.collections.List - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ChainCodeLanguageRuntime.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ChainCodeLanguageRuntime.kt deleted file mode 100644 index d206091930..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ChainCodeLanguageRuntime.kt +++ /dev/null @@ -1,66 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Enumerates the supported programming language runtimes of Hyperledger Fabric - * - * Values: golang,node,java - */ - -@JsonClass(generateAdapter = false) -enum class ChainCodeLanguageRuntime(val value: kotlin.String) { - - @Json(name = "golang") - golang("golang"), - - @Json(name = "node") - node("node"), - - @Json(name = "java") - java("java"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is ChainCodeLanguageRuntime) "$data" else null - - /** - * Returns a valid [ChainCodeLanguageRuntime] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): ChainCodeLanguageRuntime? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ChainCodeLifeCycleCommandResponses.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ChainCodeLifeCycleCommandResponses.kt deleted file mode 100644 index 804c263d21..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ChainCodeLifeCycleCommandResponses.kt +++ /dev/null @@ -1,60 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.SSHExecCommandResponse - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param installList - * @param queryInstalledList - * @param approveForMyOrgList - * @param packaging - * @param commit - * @param queryCommitted - * @param `init` - */ - - -data class ChainCodeLifeCycleCommandResponses ( - - @Json(name = "installList") - val installList: kotlin.collections.List, - - @Json(name = "queryInstalledList") - val queryInstalledList: kotlin.collections.List, - - @Json(name = "approveForMyOrgList") - val approveForMyOrgList: kotlin.collections.List, - - @Json(name = "packaging") - val packaging: SSHExecCommandResponse? = null, - - @Json(name = "commit") - val commit: SSHExecCommandResponse? = null, - - @Json(name = "queryCommitted") - val queryCommitted: SSHExecCommandResponse? = null, - - @Json(name = "init") - val `init`: SSHExecCommandResponse? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ChainCodeProgrammingLanguage.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ChainCodeProgrammingLanguage.kt deleted file mode 100644 index ec49c9cb24..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ChainCodeProgrammingLanguage.kt +++ /dev/null @@ -1,69 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Enumerates the supported source code programming languages of Hyperledger Fabric - * - * Values: golang,javascript,typescript,java - */ - -@JsonClass(generateAdapter = false) -enum class ChainCodeProgrammingLanguage(val value: kotlin.String) { - - @Json(name = "golang") - golang("golang"), - - @Json(name = "javascript") - javascript("javascript"), - - @Json(name = "typescript") - typescript("typescript"), - - @Json(name = "java") - java("java"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is ChainCodeProgrammingLanguage) "$data" else null - - /** - * Returns a valid [ChainCodeProgrammingLanguage] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): ChainCodeProgrammingLanguage? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ConnectionProfile.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ConnectionProfile.kt deleted file mode 100644 index c308a0d8ab..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ConnectionProfile.kt +++ /dev/null @@ -1,72 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.ConnectionProfileClient - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param name - * @param version - * @param organizations - * @param peers - * @param xType - * @param description - * @param client - * @param channels - * @param orderers - * @param certificateAuthorities - */ - - -data class ConnectionProfile ( - - @Json(name = "name") - val name: kotlin.String, - - @Json(name = "version") - val version: kotlin.String, - - @Json(name = "organizations") - val organizations: kotlin.collections.Map, - - @Json(name = "peers") - val peers: kotlin.collections.Map, - - @Json(name = "x-type") - val xType: kotlin.String? = null, - - @Json(name = "description") - val description: kotlin.String? = null, - - @Json(name = "client") - val client: ConnectionProfileClient? = null, - - @Json(name = "channels") - val channels: kotlin.collections.Map? = null, - - @Json(name = "orderers") - val orderers: kotlin.collections.Map? = null, - - @Json(name = "certificateAuthorities") - val certificateAuthorities: kotlin.collections.Map? = null - -) : kotlin.collections.HashMap() - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ConnectionProfileClient.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ConnectionProfileClient.kt deleted file mode 100644 index b84781b513..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ConnectionProfileClient.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param organization - */ - - -data class ConnectionProfileClient ( - - @Json(name = "organization") - val organization: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DefaultEventHandlerStrategy.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DefaultEventHandlerStrategy.kt deleted file mode 100644 index 0b6a171fa7..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DefaultEventHandlerStrategy.kt +++ /dev/null @@ -1,69 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * Values: mSPIDSCOPEALLFORTX,mSPIDSCOPEANYFORTX,nETWORKSCOPEALLFORTX,nETWORKSCOPEANYFORTX - */ - -@JsonClass(generateAdapter = false) -enum class DefaultEventHandlerStrategy(val value: kotlin.String) { - - @Json(name = "MSPID_SCOPE_ALLFORTX") - mSPIDSCOPEALLFORTX("MSPID_SCOPE_ALLFORTX"), - - @Json(name = "MSPID_SCOPE_ANYFORTX") - mSPIDSCOPEANYFORTX("MSPID_SCOPE_ANYFORTX"), - - @Json(name = "NETWORK_SCOPE_ALLFORTX") - nETWORKSCOPEALLFORTX("NETWORK_SCOPE_ALLFORTX"), - - @Json(name = "NETWORK_SCOPE_ANYFORTX") - nETWORKSCOPEANYFORTX("NETWORK_SCOPE_ANYFORTX"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is DefaultEventHandlerStrategy) "$data" else null - - /** - * Returns a valid [DefaultEventHandlerStrategy] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): DefaultEventHandlerStrategy? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1501Response.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1501Response.kt deleted file mode 100644 index 559c65d576..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1501Response.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param message - */ - - -data class DeployContractGoSourceV1501Response ( - - @Json(name = "message") - val message: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1Request.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1Request.kt deleted file mode 100644 index 62bae207a7..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1Request.kt +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.DeployContractGoSourceV1RequestConstructorArgs -import org.openapitools.client.models.DeploymentTargetOrganization -import org.openapitools.client.models.FileBase64 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param policyDslSource - * @param tlsRootCertFiles The TLS root cert files that will be passed to the chaincode instantiation command. - * @param channelId The name of the Fabric channel where the contract will get instantiated. - * @param targetOrganizations - * @param targetPeerAddresses An array of peer addresses where the contract will be instantiated. Note that at present only the first item from this array will be used which is the behavior taken from the official Fabric samples repository and therefore it is assumed to be correct usage. - * @param chainCodeVersion - * @param goSource - * @param constructorArgs - * @param goMod - * @param moduleName The go module name that will be used for the go compilation process. - * @param pinnedDeps - * @param modTidyOnly Indicates to the go chaincode compiler of Cactus if it should do an actual go compilation with the contact source or if it should just execute the go mod tidy command. - */ - - -data class DeployContractGoSourceV1Request ( - - @Json(name = "policyDslSource") - val policyDslSource: kotlin.String, - - /* The TLS root cert files that will be passed to the chaincode instantiation command. */ - @Json(name = "tlsRootCertFiles") - val tlsRootCertFiles: kotlin.String, - - /* The name of the Fabric channel where the contract will get instantiated. */ - @Json(name = "channelId") - val channelId: kotlin.String, - - @Json(name = "targetOrganizations") - val targetOrganizations: kotlin.collections.List, - - /* An array of peer addresses where the contract will be instantiated. Note that at present only the first item from this array will be used which is the behavior taken from the official Fabric samples repository and therefore it is assumed to be correct usage. */ - @Json(name = "targetPeerAddresses") - val targetPeerAddresses: kotlin.collections.List, - - @Json(name = "chainCodeVersion") - val chainCodeVersion: kotlin.String, - - @Json(name = "goSource") - val goSource: FileBase64, - - @Json(name = "constructorArgs") - val constructorArgs: DeployContractGoSourceV1RequestConstructorArgs? = null, - - @Json(name = "goMod") - val goMod: FileBase64? = null, - - /* The go module name that will be used for the go compilation process. */ - @Json(name = "moduleName") - val moduleName: kotlin.String? = null, - - @Json(name = "pinnedDeps") - val pinnedDeps: kotlin.collections.List? = null, - - /* Indicates to the go chaincode compiler of Cactus if it should do an actual go compilation with the contact source or if it should just execute the go mod tidy command. */ - @Json(name = "modTidyOnly") - val modTidyOnly: kotlin.Boolean? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1RequestConstructorArgs.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1RequestConstructorArgs.kt deleted file mode 100644 index 97a54a3127..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1RequestConstructorArgs.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param args - */ - - -data class DeployContractGoSourceV1RequestConstructorArgs ( - - @Json(name = "Args") - val args: kotlin.collections.List? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1Response.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1Response.kt deleted file mode 100644 index 56460729f5..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractGoSourceV1Response.kt +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.SSHExecCommandResponse - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param success - * @param installationCommandResponses - * @param instantiationCommandResponse - */ - - -data class DeployContractGoSourceV1Response ( - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "installationCommandResponses") - val installationCommandResponses: kotlin.collections.List, - - @Json(name = "instantiationCommandResponse") - val instantiationCommandResponse: SSHExecCommandResponse - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractV1Request.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractV1Request.kt deleted file mode 100644 index 37fd68a0c3..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractV1Request.kt +++ /dev/null @@ -1,104 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.ChainCodeProgrammingLanguage -import org.openapitools.client.models.DeployContractGoSourceV1RequestConstructorArgs -import org.openapitools.client.models.DeploymentTargetOrganization -import org.openapitools.client.models.FileBase64 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param ccLang - * @param caFile File-system path pointing at the CA file. - * @param orderer Ordering service endpoint specified as : - * @param ordererTLSHostnameOverride The hostname override to use when validating the TLS connection to the orderer - * @param channelId The name of the Fabric channel where the contract will get instantiated. - * @param targetOrganizations - * @param ccSequence - * @param ccVersion - * @param ccName - * @param ccLabel Human readable label to uniquely identify the contract. Recommended to include in this at least the contract name and the exact version in order to make it easily distinguishable from other deployments of the same contract. - * @param sourceFiles The your-smart-contract.go file where the functionality of your contract is implemented. - * @param connTimeout Timeout for client to connect (default 3s) - * @param signaturePolicy Passed in to the peer via the --signature-policy argument on the command line. See also: https://hyperledger-fabric.readthedocs.io/en/release-2.2/endorsement-policies.html#setting-chaincode-level-endorsement-policies - * @param collectionsConfigFile Name of the collections config file as present in the sourceFiles array of the request. - * @param constructorArgs - */ - - -data class DeployContractV1Request ( - - @Json(name = "ccLang") - val ccLang: ChainCodeProgrammingLanguage, - - /* File-system path pointing at the CA file. */ - @Json(name = "caFile") - val caFile: kotlin.String, - - /* Ordering service endpoint specified as : */ - @Json(name = "orderer") - val orderer: kotlin.String, - - /* The hostname override to use when validating the TLS connection to the orderer */ - @Json(name = "ordererTLSHostnameOverride") - val ordererTLSHostnameOverride: kotlin.String, - - /* The name of the Fabric channel where the contract will get instantiated. */ - @Json(name = "channelId") - val channelId: kotlin.String, - - @Json(name = "targetOrganizations") - val targetOrganizations: kotlin.collections.List, - - @Json(name = "ccSequence") - val ccSequence: java.math.BigDecimal, - - @Json(name = "ccVersion") - val ccVersion: kotlin.String, - - @Json(name = "ccName") - val ccName: kotlin.String, - - /* Human readable label to uniquely identify the contract. Recommended to include in this at least the contract name and the exact version in order to make it easily distinguishable from other deployments of the same contract. */ - @Json(name = "ccLabel") - val ccLabel: kotlin.String, - - /* The your-smart-contract.go file where the functionality of your contract is implemented. */ - @Json(name = "sourceFiles") - val sourceFiles: kotlin.collections.List, - - /* Timeout for client to connect (default 3s) */ - @Json(name = "connTimeout") - val connTimeout: kotlin.Int? = null, - - /* Passed in to the peer via the --signature-policy argument on the command line. See also: https://hyperledger-fabric.readthedocs.io/en/release-2.2/endorsement-policies.html#setting-chaincode-level-endorsement-policies */ - @Json(name = "signaturePolicy") - val signaturePolicy: kotlin.String? = null, - - /* Name of the collections config file as present in the sourceFiles array of the request. */ - @Json(name = "collectionsConfigFile") - val collectionsConfigFile: kotlin.String? = null, - - @Json(name = "constructorArgs") - val constructorArgs: DeployContractGoSourceV1RequestConstructorArgs? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractV1Response.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractV1Response.kt deleted file mode 100644 index 6512b977d1..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeployContractV1Response.kt +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.ChainCodeLifeCycleCommandResponses - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param success - * @param packageIds - * @param lifecycle - */ - - -data class DeployContractV1Response ( - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "packageIds") - val packageIds: kotlin.collections.List, - - @Json(name = "lifecycle") - val lifecycle: ChainCodeLifeCycleCommandResponses - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeploymentTargetOrgFabric2x.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeploymentTargetOrgFabric2x.kt deleted file mode 100644 index bdaa0bcf0b..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeploymentTargetOrgFabric2x.kt +++ /dev/null @@ -1,61 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param CORE_PEER_LOCALMSPID Mapped to environment variables of the Fabric CLI container. - * @param CORE_PEER_ADDRESS Mapped to environment variables of the Fabric CLI container. - * @param CORE_PEER_MSPCONFIGPATH Mapped to environment variables of the Fabric CLI container. - * @param CORE_PEER_TLS_ROOTCERT_FILE Mapped to environment variables of the Fabric CLI container. - * @param ORDERER_TLS_ROOTCERT_FILE Mapped to environment variables of the Fabric CLI container. - * @param transient Transient map of arguments in JSON encoding - */ - - -data class DeploymentTargetOrgFabric2x ( - - /* Mapped to environment variables of the Fabric CLI container. */ - @Json(name = "CORE_PEER_LOCALMSPID") - val CORE_PEER_LOCALMSPID: kotlin.String, - - /* Mapped to environment variables of the Fabric CLI container. */ - @Json(name = "CORE_PEER_ADDRESS") - val CORE_PEER_ADDRESS: kotlin.String, - - /* Mapped to environment variables of the Fabric CLI container. */ - @Json(name = "CORE_PEER_MSPCONFIGPATH") - val CORE_PEER_MSPCONFIGPATH: kotlin.String, - - /* Mapped to environment variables of the Fabric CLI container. */ - @Json(name = "CORE_PEER_TLS_ROOTCERT_FILE") - val CORE_PEER_TLS_ROOTCERT_FILE: kotlin.String, - - /* Mapped to environment variables of the Fabric CLI container. */ - @Json(name = "ORDERER_TLS_ROOTCERT_FILE") - val ORDERER_TLS_ROOTCERT_FILE: kotlin.String, - - /* Transient map of arguments in JSON encoding */ - @Json(name = "transient") - val transient: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeploymentTargetOrganization.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeploymentTargetOrganization.kt deleted file mode 100644 index 5bab44452d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/DeploymentTargetOrganization.kt +++ /dev/null @@ -1,56 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param CORE_PEER_LOCALMSPID Mapped to environment variables of the Fabric CLI container. - * @param CORE_PEER_ADDRESS Mapped to environment variables of the Fabric CLI container. - * @param CORE_PEER_MSPCONFIGPATH Mapped to environment variables of the Fabric CLI container. - * @param CORE_PEER_TLS_ROOTCERT_FILE Mapped to environment variables of the Fabric CLI container. - * @param ORDERER_TLS_ROOTCERT_FILE Mapped to environment variables of the Fabric CLI container. - */ - - -data class DeploymentTargetOrganization ( - - /* Mapped to environment variables of the Fabric CLI container. */ - @Json(name = "CORE_PEER_LOCALMSPID") - val CORE_PEER_LOCALMSPID: kotlin.String, - - /* Mapped to environment variables of the Fabric CLI container. */ - @Json(name = "CORE_PEER_ADDRESS") - val CORE_PEER_ADDRESS: kotlin.String, - - /* Mapped to environment variables of the Fabric CLI container. */ - @Json(name = "CORE_PEER_MSPCONFIGPATH") - val CORE_PEER_MSPCONFIGPATH: kotlin.String, - - /* Mapped to environment variables of the Fabric CLI container. */ - @Json(name = "CORE_PEER_TLS_ROOTCERT_FILE") - val CORE_PEER_TLS_ROOTCERT_FILE: kotlin.String, - - /* Mapped to environment variables of the Fabric CLI container. */ - @Json(name = "ORDERER_TLS_ROOTCERT_FILE") - val ORDERER_TLS_ROOTCERT_FILE: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ErrorExceptionResponseV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ErrorExceptionResponseV1.kt deleted file mode 100644 index 31968575b8..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ErrorExceptionResponseV1.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param message - * @param error - */ - - -data class ErrorExceptionResponseV1 ( - - @Json(name = "message") - val message: kotlin.String, - - @Json(name = "error") - val error: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricCertificateIdentityV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricCertificateIdentityV1.kt deleted file mode 100644 index f08a5362aa..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricCertificateIdentityV1.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FabricX509CertificateV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Combination of certificate and it's MSP ID used to identify fabric actors. - * - * @param mspid - * @param cert - */ - - -data class FabricCertificateIdentityV1 ( - - @Json(name = "mspid") - val mspid: kotlin.String, - - @Json(name = "cert") - val cert: FabricX509CertificateV1 - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricContractInvocationType.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricContractInvocationType.kt deleted file mode 100644 index 1ab139edcc..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricContractInvocationType.kt +++ /dev/null @@ -1,66 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * Values: sEND,cALL,sENDPRIVATE - */ - -@JsonClass(generateAdapter = false) -enum class FabricContractInvocationType(val value: kotlin.String) { - - @Json(name = "FabricContractInvocationType.SEND") - sEND("FabricContractInvocationType.SEND"), - - @Json(name = "FabricContractInvocationType.CALL") - cALL("FabricContractInvocationType.CALL"), - - @Json(name = "FabricContractInvocationType.SENDPRIVATE") - sENDPRIVATE("FabricContractInvocationType.SENDPRIVATE"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is FabricContractInvocationType) "$data" else null - - /** - * Returns a valid [FabricContractInvocationType] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): FabricContractInvocationType? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricSigningCredential.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricSigningCredential.kt deleted file mode 100644 index bdf7c7bccb..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricSigningCredential.kt +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FabricSigningCredentialType -import org.openapitools.client.models.VaultTransitKey -import org.openapitools.client.models.WebSocketKey - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param keychainId - * @param keychainRef - * @param type - * @param vaultTransitKey - * @param webSocketKey - */ - - -data class FabricSigningCredential ( - - @Json(name = "keychainId") - val keychainId: kotlin.String, - - @Json(name = "keychainRef") - val keychainRef: kotlin.String, - - @Json(name = "type") - val type: FabricSigningCredentialType? = null, - - @Json(name = "vaultTransitKey") - val vaultTransitKey: VaultTransitKey? = null, - - @Json(name = "webSocketKey") - val webSocketKey: WebSocketKey? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricSigningCredentialType.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricSigningCredentialType.kt deleted file mode 100644 index a655902ee1..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricSigningCredentialType.kt +++ /dev/null @@ -1,66 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * different type of identity provider for singing fabric messages supported by this package - * - * Values: xPeriod509,vaultMinusXPeriod509,wSMinusXPeriod509 - */ - -@JsonClass(generateAdapter = false) -enum class FabricSigningCredentialType(val value: kotlin.String) { - - @Json(name = "X.509") - xPeriod509("X.509"), - - @Json(name = "Vault-X.509") - vaultMinusXPeriod509("Vault-X.509"), - - @Json(name = "WS-X.509") - wSMinusXPeriod509("WS-X.509"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is FabricSigningCredentialType) "$data" else null - - /** - * Returns a valid [FabricSigningCredentialType] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): FabricSigningCredentialType? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricX509CertificateV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricX509CertificateV1.kt deleted file mode 100644 index e995cc65f0..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FabricX509CertificateV1.kt +++ /dev/null @@ -1,59 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Transaction endorser certificate object - * - * @param issuer - * @param serialNumber - * @param subject - * @param subjectAltName - * @param validFrom - * @param validTo - * @param pem - */ - - -data class FabricX509CertificateV1 ( - - @Json(name = "issuer") - val issuer: kotlin.String, - - @Json(name = "serialNumber") - val serialNumber: kotlin.String, - - @Json(name = "subject") - val subject: kotlin.String, - - @Json(name = "subjectAltName") - val subjectAltName: kotlin.String, - - @Json(name = "validFrom") - val validFrom: kotlin.String, - - @Json(name = "validTo") - val validTo: kotlin.String, - - @Json(name = "pem") - val pem: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FileBase64.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FileBase64.kt deleted file mode 100644 index 98e74f5b36..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FileBase64.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Represents a file-system file that has a name and a body which holds the file contents as a Base64 encoded string - * - * @param body The file's contents encoded as a Base64 string. - * @param filename The name as referred to on a file system - * @param filepath The relative path of the file, if it should be placed in a sub-directory - */ - - -data class FileBase64 ( - - /* The file's contents encoded as a Base64 string. */ - @Json(name = "body") - val body: kotlin.String, - - /* The name as referred to on a file system */ - @Json(name = "filename") - val filename: kotlin.String, - - /* The relative path of the file, if it should be placed in a sub-directory */ - @Json(name = "filepath") - val filepath: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FullBlockTransactionActionV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FullBlockTransactionActionV1.kt deleted file mode 100644 index 1e0dd13b4e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FullBlockTransactionActionV1.kt +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FabricCertificateIdentityV1 -import org.openapitools.client.models.FullBlockTransactionEndorsementV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Transaction action returned from fabric block. - * - * @param functionName - * @param functionArgs - * @param chaincodeId - * @param creator - * @param endorsements - */ - - -data class FullBlockTransactionActionV1 ( - - @Json(name = "functionName") - val functionName: kotlin.String, - - @Json(name = "functionArgs") - val functionArgs: kotlin.collections.List, - - @Json(name = "chaincodeId") - val chaincodeId: kotlin.String, - - @Json(name = "creator") - val creator: FabricCertificateIdentityV1, - - @Json(name = "endorsements") - val endorsements: kotlin.collections.List - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FullBlockTransactionEndorsementV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FullBlockTransactionEndorsementV1.kt deleted file mode 100644 index e85c781fca..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FullBlockTransactionEndorsementV1.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FabricCertificateIdentityV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Transaction endorsment object returned from fabric block. - * - * @param signer - * @param signature - */ - - -data class FullBlockTransactionEndorsementV1 ( - - @Json(name = "signer") - val signer: FabricCertificateIdentityV1, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FullBlockTransactionEventV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FullBlockTransactionEventV1.kt deleted file mode 100644 index 9f5031b74e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FullBlockTransactionEventV1.kt +++ /dev/null @@ -1,60 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FullBlockTransactionActionV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Transaction returned from fabric block. - * - * @param hash - * @param channelId - * @param timestamp - * @param protocolVersion - * @param transactionType - * @param epoch - * @param actions - */ - - -data class FullBlockTransactionEventV1 ( - - @Json(name = "hash") - val hash: kotlin.String, - - @Json(name = "channelId") - val channelId: kotlin.String, - - @Json(name = "timestamp") - val timestamp: kotlin.String, - - @Json(name = "protocolVersion") - val protocolVersion: java.math.BigDecimal, - - @Json(name = "transactionType") - val transactionType: kotlin.String, - - @Json(name = "epoch") - val epoch: java.math.BigDecimal, - - @Json(name = "actions") - val actions: kotlin.collections.List - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayDiscoveryOptions.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayDiscoveryOptions.kt deleted file mode 100644 index 5f1771caae..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayDiscoveryOptions.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param asLocalhost - * @param enabled - */ - - -data class GatewayDiscoveryOptions ( - - @Json(name = "asLocalhost") - val asLocalhost: kotlin.Boolean? = null, - - @Json(name = "enabled") - val enabled: kotlin.Boolean? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayEventHandlerOptions.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayEventHandlerOptions.kt deleted file mode 100644 index 73f02841e3..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayEventHandlerOptions.kt +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.DefaultEventHandlerStrategy - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param strategy - * @param commitTimeout - * @param endorseTimeout - */ - - -data class GatewayEventHandlerOptions ( - - @Json(name = "strategy") - val strategy: DefaultEventHandlerStrategy, - - @Json(name = "commitTimeout") - val commitTimeout: java.math.BigDecimal? = null, - - @Json(name = "endorseTimeout") - val endorseTimeout: java.math.BigDecimal? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayOptions.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayOptions.kt deleted file mode 100644 index 3b8fc10842..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayOptions.kt +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.ConnectionProfile -import org.openapitools.client.models.GatewayDiscoveryOptions -import org.openapitools.client.models.GatewayEventHandlerOptions -import org.openapitools.client.models.GatewayOptionsWallet - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param identity - * @param wallet - * @param connectionProfile - * @param discovery - * @param eventHandlerOptions - */ - - -data class GatewayOptions ( - - @Json(name = "identity") - val identity: kotlin.String, - - @Json(name = "wallet") - val wallet: GatewayOptionsWallet, - - @Json(name = "connectionProfile") - val connectionProfile: ConnectionProfile? = null, - - @Json(name = "discovery") - val discovery: GatewayDiscoveryOptions? = null, - - @Json(name = "eventHandlerOptions") - val eventHandlerOptions: GatewayEventHandlerOptions? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayOptionsWallet.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayOptionsWallet.kt deleted file mode 100644 index fba08bf06d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GatewayOptionsWallet.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FabricSigningCredential - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param keychain - * @param json - */ - - -data class GatewayOptionsWallet ( - - @Json(name = "keychain") - val keychain: FabricSigningCredential? = null, - - @Json(name = "json") - val json: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1.kt deleted file mode 100644 index a2224e88cf..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1.kt +++ /dev/null @@ -1,56 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.GatewayOptions -import org.openapitools.client.models.GetBlockRequestV1Query -import org.openapitools.client.models.GetBlockResponseTypeV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Request for GetBlock endpoint. - * - * @param channelName Fabric channel which we want to query. - * @param gatewayOptions - * @param query - * @param connectionChannelName Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used - * @param responseType - */ - - -data class GetBlockRequestV1 ( - - /* Fabric channel which we want to query. */ - @Json(name = "channelName") - val channelName: kotlin.String, - - @Json(name = "gatewayOptions") - val gatewayOptions: GatewayOptions, - - @Json(name = "query") - val query: GetBlockRequestV1Query, - - /* Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used */ - @Json(name = "connectionChannelName") - val connectionChannelName: kotlin.String? = null, - - @Json(name = "responseType") - val responseType: GetBlockResponseTypeV1? = GetBlockResponseTypeV1.Full - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1Query.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1Query.kt deleted file mode 100644 index 72d98030a8..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1Query.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.GetBlockRequestV1QueryBlockHash - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Query selector, caller must provide at least one of them. First found will be used, rest will be ignored, so it's recommended to pass single selector. - * - * @param blockNumber Select block by it's number. - * @param blockHash - * @param transactionId Select block by id of transaction that it contains. - */ - - -data class GetBlockRequestV1Query ( - - /* Select block by it's number. */ - @Json(name = "blockNumber") - val blockNumber: kotlin.String? = null, - - @Json(name = "blockHash") - val blockHash: GetBlockRequestV1QueryBlockHash? = null, - - /* Select block by id of transaction that it contains. */ - @Json(name = "transactionId") - val transactionId: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1QueryBlockHash.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1QueryBlockHash.kt deleted file mode 100644 index 12513f3083..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockRequestV1QueryBlockHash.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Select block by it's hash. - * - * @param buffer Buffer of blockHash. It's encoding should be described in `encoding` parameter. - * @param encoding NodeJS Buffer encoding (utf-8, hex, binary, base64, etc...). Passed directly to `Buffer.from()` call on hashBuffer. If not provided then JSON buffer format is assumed. - */ - - -data class GetBlockRequestV1QueryBlockHash ( - - /* Buffer of blockHash. It's encoding should be described in `encoding` parameter. */ - @Json(name = "buffer") - val buffer: kotlin.String, - - /* NodeJS Buffer encoding (utf-8, hex, binary, base64, etc...). Passed directly to `Buffer.from()` call on hashBuffer. If not provided then JSON buffer format is assumed. */ - @Json(name = "encoding") - val encoding: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseDecodedV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseDecodedV1.kt deleted file mode 100644 index 1a637fdc73..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseDecodedV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * When skipDecode is false (default) then decoded block object is returned. - * - * @param decodedBlock Full hyperledger fabric block data. - */ - - -data class GetBlockResponseDecodedV1 ( - - /* Full hyperledger fabric block data. */ - @Json(name = "decodedBlock") - val decodedBlock: kotlin.Any? - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseEncodedV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseEncodedV1.kt deleted file mode 100644 index 8ce336c402..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseEncodedV1.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * When skipDecode is true then encoded block Buffer is returned. - * - * @param encodedBlock - */ - - -data class GetBlockResponseEncodedV1 ( - - @Json(name = "encodedBlock") - val encodedBlock: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseTypeV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseTypeV1.kt deleted file mode 100644 index 22f8ae1050..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseTypeV1.kt +++ /dev/null @@ -1,69 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Response type from GetBlock. - * - * Values: Full,Encoded,CactiTransactions,CactiFullBlock - */ - -@JsonClass(generateAdapter = false) -enum class GetBlockResponseTypeV1(val value: kotlin.String) { - - @Json(name = "full") - Full("full"), - - @Json(name = "encoded") - Encoded("encoded"), - - @Json(name = "cacti:transactions") - CactiTransactions("cacti:transactions"), - - @Json(name = "cacti:full-block") - CactiFullBlock("cacti:full-block"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is GetBlockResponseTypeV1) "$data" else null - - /** - * Returns a valid [GetBlockResponseTypeV1] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): GetBlockResponseTypeV1? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseV1.kt deleted file mode 100644 index c19a2c8cbe..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetBlockResponseV1.kt +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CactiBlockFullEventV1 -import org.openapitools.client.models.CactiBlockFullResponseV1 -import org.openapitools.client.models.CactiBlockTransactionEventV1 -import org.openapitools.client.models.CactiBlockTransactionsResponseV1 -import org.openapitools.client.models.GetBlockResponseDecodedV1 -import org.openapitools.client.models.GetBlockResponseEncodedV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Response from GetBlock endpoint. - * - * @param cactiTransactionsEvents List of transactions summary - * @param cactiFullEvents - * @param decodedBlock Full hyperledger fabric block data. - * @param encodedBlock - */ - - -data class GetBlockResponseV1 ( - - /* List of transactions summary */ - @Json(name = "cactiTransactionsEvents") - val cactiTransactionsEvents: kotlin.collections.List, - - @Json(name = "cactiFullEvents") - val cactiFullEvents: CactiBlockFullEventV1, - - /* Full hyperledger fabric block data. */ - @Json(name = "decodedBlock") - val decodedBlock: kotlin.Any?, - - @Json(name = "encodedBlock") - val encodedBlock: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetChainInfoRequestV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetChainInfoRequestV1.kt deleted file mode 100644 index 71b1d92cf3..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetChainInfoRequestV1.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.GatewayOptions - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Request for GetChainInfo endpoint. - * - * @param channelName Fabric channel which we want to query. - * @param gatewayOptions - * @param connectionChannelName Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used - */ - - -data class GetChainInfoRequestV1 ( - - /* Fabric channel which we want to query. */ - @Json(name = "channelName") - val channelName: kotlin.String, - - @Json(name = "gatewayOptions") - val gatewayOptions: GatewayOptions, - - /* Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used */ - @Json(name = "connectionChannelName") - val connectionChannelName: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetChainInfoResponseV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetChainInfoResponseV1.kt deleted file mode 100644 index 81201ab222..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetChainInfoResponseV1.kt +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Response from GetChainInfo endpoint. - * - * @param height Current height of fabric ledger - * @param currentBlockHash Current block hash of fabric ledger - * @param previousBlockHash Previous block hash of fabric ledger - */ - - -data class GetChainInfoResponseV1 ( - - /* Current height of fabric ledger */ - @Json(name = "height") - val height: java.math.BigDecimal, - - /* Current block hash of fabric ledger */ - @Json(name = "currentBlockHash") - val currentBlockHash: kotlin.String, - - /* Previous block hash of fabric ledger */ - @Json(name = "previousBlockHash") - val previousBlockHash: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetTransactionReceiptResponse.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetTransactionReceiptResponse.kt deleted file mode 100644 index 5c924b55ab..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetTransactionReceiptResponse.kt +++ /dev/null @@ -1,74 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.TransactReceiptBlockMetaData -import org.openapitools.client.models.TransactReceiptTransactionCreator -import org.openapitools.client.models.TransactReceiptTransactionEndorsement - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param blockNumber - * @param channelID - * @param transactionCreator - * @param transactionEndorsement - * @param blockMetaData - * @param chainCodeName - * @param chainCodeVersion - * @param responseStatus - * @param rwsetKey - * @param rwsetWriteData - */ - - -data class GetTransactionReceiptResponse ( - - @Json(name = "blockNumber") - val blockNumber: kotlin.String? = null, - - @Json(name = "channelID") - val channelID: kotlin.String? = null, - - @Json(name = "transactionCreator") - val transactionCreator: TransactReceiptTransactionCreator? = null, - - @Json(name = "transactionEndorsement") - val transactionEndorsement: kotlin.collections.List? = null, - - @Json(name = "blockMetaData") - val blockMetaData: TransactReceiptBlockMetaData? = null, - - @Json(name = "chainCodeName") - val chainCodeName: kotlin.String? = null, - - @Json(name = "chainCodeVersion") - val chainCodeVersion: kotlin.String? = null, - - @Json(name = "responseStatus") - val responseStatus: kotlin.String? = null, - - @Json(name = "rwsetKey") - val rwsetKey: kotlin.String? = null, - - @Json(name = "rwsetWriteData") - val rwsetWriteData: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunDelegatedSignTransactionRequest.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunDelegatedSignTransactionRequest.kt deleted file mode 100644 index a95ddc1118..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunDelegatedSignTransactionRequest.kt +++ /dev/null @@ -1,84 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FabricContractInvocationType -import org.openapitools.client.models.RunTransactionResponseType - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param signerCertificate - * @param signerMspID - * @param channelName - * @param contractName - * @param invocationType - * @param methodName - * @param params - * @param endorsingPeers An array of endorsing peers (name or url) for the transaction. - * @param endorsingOrgs An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction. - * @param transientData - * @param uniqueTransactionData Can be used to uniquely identify and authorize signing request - * @param responseType - */ - - -data class RunDelegatedSignTransactionRequest ( - - @Json(name = "signerCertificate") - val signerCertificate: kotlin.String, - - @Json(name = "signerMspID") - val signerMspID: kotlin.String, - - @Json(name = "channelName") - val channelName: kotlin.String, - - @Json(name = "contractName") - val contractName: kotlin.String, - - @Json(name = "invocationType") - val invocationType: FabricContractInvocationType, - - @Json(name = "methodName") - val methodName: kotlin.String, - - @Json(name = "params") - val params: kotlin.collections.List = arrayListOf(), - - /* An array of endorsing peers (name or url) for the transaction. */ - @Json(name = "endorsingPeers") - val endorsingPeers: kotlin.collections.List? = null, - - /* An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction. */ - @Json(name = "endorsingOrgs") - val endorsingOrgs: kotlin.collections.List? = null, - - @Json(name = "transientData") - val transientData: kotlin.Any? = null, - - /* Can be used to uniquely identify and authorize signing request */ - @Json(name = "uniqueTransactionData") - val uniqueTransactionData: kotlin.Any? = null, - - @Json(name = "responseType") - val responseType: RunTransactionResponseType? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionRequest.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionRequest.kt deleted file mode 100644 index ef4de914af..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionRequest.kt +++ /dev/null @@ -1,81 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.FabricContractInvocationType -import org.openapitools.client.models.FabricSigningCredential -import org.openapitools.client.models.GatewayOptions -import org.openapitools.client.models.RunTransactionResponseType - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param signingCredential - * @param channelName - * @param contractName - * @param invocationType - * @param methodName - * @param params - * @param endorsingPeers An array of endorsing peers (name or url) for the transaction. - * @param endorsingOrgs An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction. - * @param transientData - * @param gatewayOptions - * @param responseType - */ - - -data class RunTransactionRequest ( - - @Json(name = "signingCredential") - val signingCredential: FabricSigningCredential, - - @Json(name = "channelName") - val channelName: kotlin.String, - - @Json(name = "contractName") - val contractName: kotlin.String, - - @Json(name = "invocationType") - val invocationType: FabricContractInvocationType, - - @Json(name = "methodName") - val methodName: kotlin.String, - - @Json(name = "params") - val params: kotlin.collections.List = arrayListOf(), - - /* An array of endorsing peers (name or url) for the transaction. */ - @Json(name = "endorsingPeers") - val endorsingPeers: kotlin.collections.List? = null, - - /* An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction. */ - @Json(name = "endorsingOrgs") - val endorsingOrgs: kotlin.collections.List? = null, - - @Json(name = "transientData") - val transientData: kotlin.Any? = null, - - @Json(name = "gatewayOptions") - val gatewayOptions: GatewayOptions? = null, - - @Json(name = "responseType") - val responseType: RunTransactionResponseType? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionResponse.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionResponse.kt deleted file mode 100644 index 4119a5706f..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionResponse.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param functionOutput - * @param transactionId - */ - - -data class RunTransactionResponse ( - - @Json(name = "functionOutput") - val functionOutput: kotlin.String, - - @Json(name = "transactionId") - val transactionId: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionResponseType.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionResponseType.kt deleted file mode 100644 index 96a4be44ca..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RunTransactionResponseType.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Response format from transaction / query execution - * - * Values: JSON,UTF8 - */ - -@JsonClass(generateAdapter = false) -enum class RunTransactionResponseType(val value: kotlin.String) { - - @Json(name = "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.JSON") - JSON("org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.JSON"), - - @Json(name = "org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.UTF8") - UTF8("org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.UTF8"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is RunTransactionResponseType) "$data" else null - - /** - * Returns a valid [RunTransactionResponseType] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): RunTransactionResponseType? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SSHExecCommandResponse.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SSHExecCommandResponse.kt deleted file mode 100644 index 81c60b5aea..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SSHExecCommandResponse.kt +++ /dev/null @@ -1,47 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param stdout - * @param stderr - * @param code - * @param signal - */ - - -data class SSHExecCommandResponse ( - - @Json(name = "stdout") - val stdout: kotlin.String, - - @Json(name = "stderr") - val stderr: kotlin.String, - - @Json(name = "code") - val code: kotlin.Int?, - - @Json(name = "signal") - val signal: kotlin.String? - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransactReceiptBlockMetaData.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransactReceiptBlockMetaData.kt deleted file mode 100644 index 4cfcd0828a..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransactReceiptBlockMetaData.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param mspid - * @param blockCreatorID - * @param signature - */ - - -data class TransactReceiptBlockMetaData ( - - @Json(name = "mspid") - val mspid: kotlin.String? = null, - - @Json(name = "blockCreatorID") - val blockCreatorID: kotlin.String? = null, - - @Json(name = "signature") - val signature: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransactReceiptTransactionCreator.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransactReceiptTransactionCreator.kt deleted file mode 100644 index 657aa2b330..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransactReceiptTransactionCreator.kt +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param mspid - * @param creatorID - */ - - -data class TransactReceiptTransactionCreator ( - - @Json(name = "mspid") - val mspid: kotlin.String? = null, - - @Json(name = "creatorID") - val creatorID: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransactReceiptTransactionEndorsement.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransactReceiptTransactionEndorsement.kt deleted file mode 100644 index 73d0028e8d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransactReceiptTransactionEndorsement.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param mspid - * @param endorserID - * @param signature - */ - - -data class TransactReceiptTransactionEndorsement ( - - @Json(name = "mspid") - val mspid: kotlin.String? = null, - - @Json(name = "endorserID") - val endorserID: kotlin.String? = null, - - @Json(name = "signature") - val signature: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/VaultTransitKey.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/VaultTransitKey.kt deleted file mode 100644 index 0d914e98f2..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/VaultTransitKey.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * vault key details for signing fabric message with private key stored with transit engine. - * - * @param keyName label of private key - * @param token token for accessing private key - */ - - -data class VaultTransitKey ( - - /* label of private key */ - @Json(name = "keyName") - val keyName: kotlin.String, - - /* token for accessing private key */ - @Json(name = "token") - val token: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksCactusErrorResponseV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksCactusErrorResponseV1.kt deleted file mode 100644 index 84fa901542..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksCactusErrorResponseV1.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Error response from WatchBlocks operation. - * - * @param code Error code. - * @param errorMessage Description of the error. - */ - - -data class WatchBlocksCactusErrorResponseV1 ( - - /* Error code. */ - @Json(name = "code") - val code: java.math.BigDecimal, - - /* Description of the error. */ - @Json(name = "errorMessage") - val errorMessage: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksDelegatedSignOptionsV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksDelegatedSignOptionsV1.kt deleted file mode 100644 index 62a2bcacab..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksDelegatedSignOptionsV1.kt +++ /dev/null @@ -1,58 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.WatchBlocksListenerTypeV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Options passed when subscribing to block monitoring with delegated signing. - * - * @param type - * @param channelName - * @param signerCertificate - * @param signerMspID - * @param startBlock From which block start monitoring. Defaults to latest. - * @param uniqueTransactionData Can be used to uniquely identify and authorize signing request - */ - - -data class WatchBlocksDelegatedSignOptionsV1 ( - - @Json(name = "type") - val type: WatchBlocksListenerTypeV1, - - @Json(name = "channelName") - val channelName: kotlin.String, - - @Json(name = "signerCertificate") - val signerCertificate: kotlin.String, - - @Json(name = "signerMspID") - val signerMspID: kotlin.String, - - /* From which block start monitoring. Defaults to latest. */ - @Json(name = "startBlock") - val startBlock: kotlin.String? = null, - - /* Can be used to uniquely identify and authorize signing request */ - @Json(name = "uniqueTransactionData") - val uniqueTransactionData: kotlin.Any? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksFilteredResponseV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksFilteredResponseV1.kt deleted file mode 100644 index 28d15da38e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksFilteredResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Response that corresponds to Fabric SDK 'filtered' EventType. - * - * @param filteredBlock Filtered commited block. - */ - - -data class WatchBlocksFilteredResponseV1 ( - - /* Filtered commited block. */ - @Json(name = "filteredBlock") - val filteredBlock: kotlin.Any? - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksFullResponseV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksFullResponseV1.kt deleted file mode 100644 index 5e9d2682ef..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksFullResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Response that corresponds to Fabric SDK 'full' EventType. - * - * @param fullBlock Full commited block. - */ - - -data class WatchBlocksFullResponseV1 ( - - /* Full commited block. */ - @Json(name = "fullBlock") - val fullBlock: kotlin.Any? - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksListenerTypeV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksListenerTypeV1.kt deleted file mode 100644 index 5656a4b7ec..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksListenerTypeV1.kt +++ /dev/null @@ -1,72 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Response type from WatchBlocks. 'Cacti*' are custom views, others correspond to fabric SDK call. - * - * Values: Filtered,Full,Private,CactiTransactions,CactiFullBlock - */ - -@JsonClass(generateAdapter = false) -enum class WatchBlocksListenerTypeV1(val value: kotlin.String) { - - @Json(name = "filtered") - Filtered("filtered"), - - @Json(name = "full") - Full("full"), - - @Json(name = "private") - Private("private"), - - @Json(name = "cacti:transactions") - CactiTransactions("cacti:transactions"), - - @Json(name = "cacti:full-block") - CactiFullBlock("cacti:full-block"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is WatchBlocksListenerTypeV1) "$data" else null - - /** - * Returns a valid [WatchBlocksListenerTypeV1] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): WatchBlocksListenerTypeV1? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksOptionsV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksOptionsV1.kt deleted file mode 100644 index 7ade326bd7..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksOptionsV1.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.GatewayOptions -import org.openapitools.client.models.WatchBlocksListenerTypeV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Options passed when subscribing to block monitoring. - * - * @param channelName Hyperledger Fabric channel to connect to. - * @param gatewayOptions - * @param type - * @param startBlock From which block start monitoring. Defaults to latest. - */ - - -data class WatchBlocksOptionsV1 ( - - /* Hyperledger Fabric channel to connect to. */ - @Json(name = "channelName") - val channelName: kotlin.String, - - @Json(name = "gatewayOptions") - val gatewayOptions: GatewayOptions, - - @Json(name = "type") - val type: WatchBlocksListenerTypeV1, - - /* From which block start monitoring. Defaults to latest. */ - @Json(name = "startBlock") - val startBlock: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksPrivateResponseV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksPrivateResponseV1.kt deleted file mode 100644 index 0545b68527..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksPrivateResponseV1.kt +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Response that corresponds to Fabric SDK 'private' EventType. - * - * @param privateBlock Private commited block. - */ - - -data class WatchBlocksPrivateResponseV1 ( - - /* Private commited block. */ - @Json(name = "privateBlock") - val privateBlock: kotlin.Any? - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksResponseV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksResponseV1.kt deleted file mode 100644 index 0fff884ce6..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksResponseV1.kt +++ /dev/null @@ -1,73 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CactiBlockFullEventV1 -import org.openapitools.client.models.CactiBlockFullResponseV1 -import org.openapitools.client.models.CactiBlockTransactionEventV1 -import org.openapitools.client.models.CactiBlockTransactionsResponseV1 -import org.openapitools.client.models.WatchBlocksCactusErrorResponseV1 -import org.openapitools.client.models.WatchBlocksFilteredResponseV1 -import org.openapitools.client.models.WatchBlocksFullResponseV1 -import org.openapitools.client.models.WatchBlocksPrivateResponseV1 - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Response block from WatchBlocks endpoint. Depends on 'type' passed in subscription options. - * - * @param cactiTransactionsEvents List of transactions summary - * @param cactiFullEvents - * @param fullBlock Full commited block. - * @param filteredBlock Filtered commited block. - * @param privateBlock Private commited block. - * @param code Error code. - * @param errorMessage Description of the error. - */ - - -data class WatchBlocksResponseV1 ( - - /* List of transactions summary */ - @Json(name = "cactiTransactionsEvents") - val cactiTransactionsEvents: kotlin.collections.List, - - @Json(name = "cactiFullEvents") - val cactiFullEvents: CactiBlockFullEventV1, - - /* Full commited block. */ - @Json(name = "fullBlock") - val fullBlock: kotlin.Any?, - - /* Filtered commited block. */ - @Json(name = "filteredBlock") - val filteredBlock: kotlin.Any?, - - /* Private commited block. */ - @Json(name = "privateBlock") - val privateBlock: kotlin.Any?, - - /* Error code. */ - @Json(name = "code") - val code: java.math.BigDecimal, - - /* Description of the error. */ - @Json(name = "errorMessage") - val errorMessage: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksV1.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksV1.kt deleted file mode 100644 index 99f33851ca..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WatchBlocksV1.kt +++ /dev/null @@ -1,75 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * Websocket requests for monitoring new blocks. - * - * Values: Subscribe,SubscribeDelegatedSign,Next,Unsubscribe,Error,Complete - */ - -@JsonClass(generateAdapter = false) -enum class WatchBlocksV1(val value: kotlin.String) { - - @Json(name = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Subscribe") - Subscribe("org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Subscribe"), - - @Json(name = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.SubscribeDelegatedSign") - SubscribeDelegatedSign("org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.SubscribeDelegatedSign"), - - @Json(name = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Next") - Next("org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Next"), - - @Json(name = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Unsubscribe") - Unsubscribe("org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Unsubscribe"), - - @Json(name = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Error") - Error("org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Error"), - - @Json(name = "org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Complete") - Complete("org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Complete"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is WatchBlocksV1) "$data" else null - - /** - * Returns a valid [WatchBlocksV1] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): WatchBlocksV1? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WebSocketKey.kt b/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WebSocketKey.kt deleted file mode 100644 index 19a4b34aa0..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/WebSocketKey.kt +++ /dev/null @@ -1,41 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * web-socket key details for signing fabric message with private key stored with external client - * - * @param sessionId session Id to access client - * @param signature signature of the session ID - */ - - -data class WebSocketKey ( - - /* session Id to access client */ - @Json(name = "sessionId") - val sessionId: kotlin.String, - - /* signature of the session ID */ - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/api-client/fabric-api-client.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/api-client/fabric-api-client.ts deleted file mode 100644 index c43a047641..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/api-client/fabric-api-client.ts +++ /dev/null @@ -1,244 +0,0 @@ -/** - * Extension of ApiClient genereted from OpenAPI. - * Allows operations not handled by OpenAPI (i.e. socketIO or grpc endpoints). - */ - -import { Observable, ReplaySubject } from "rxjs"; -import { finalize } from "rxjs/operators"; -import { io } from "socket.io-client-fixed-types"; -import { Logger, Checks } from "@hyperledger/cactus-common"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { Constants, ISocketApiClient } from "@hyperledger/cactus-core-api"; -import { - DefaultApi, - WatchBlocksV1, - WatchBlocksOptionsV1, - WatchBlocksResponseV1, - WatchBlocksDelegatedSignOptionsV1, - CactiBlockTransactionsResponseV1, - CactiBlockTransactionEventV1, -} from "../generated/openapi/typescript-axios"; -import { Configuration } from "../generated/openapi/typescript-axios/configuration"; - -/** - * Configuration for FabricApiClient - */ -export class FabricApiClientOptions extends Configuration { - readonly logLevel?: LogLevelDesc; - readonly wsApiHost?: string; - readonly wsApiPath?: string; -} - -/** - * Extended ApiClient that can be used to communicate with Fabric connector. - */ -export class FabricApiClient - extends DefaultApi - implements ISocketApiClient -{ - public static readonly CLASS_NAME = "FabricApiClient"; - - private readonly log: Logger; - private readonly wsApiHost: string; - private readonly wsApiPath: string; - - /** - * Registry of started monitoring sessions. - */ - private monitorSubjects = new Map< - string, - ReplaySubject - >(); - - /** - * Get this class name. - */ - public get className(): string { - return FabricApiClient.CLASS_NAME; - } - - constructor(public readonly options: FabricApiClientOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.wsApiHost = options.wsApiHost || options.basePath || location.host; - this.wsApiPath = options.wsApiPath || Constants.SocketIoConnectionPathV1; - this.log.debug(`Created ${this.className} OK.`); - this.log.debug(`wsApiHost=${this.wsApiHost}`); - this.log.debug(`wsApiPath=${this.wsApiPath}`); - this.log.debug(`basePath=${this.options.basePath}`); - } - - /** - * Watch for new blocks on Fabric ledger. Type of response must be configured in monitorOptions. - * - * @param monitorOptions Monitoring configuration. - * - * @returns Observable that will receive new blocks once they appear. - */ - public watchBlocksV1( - monitorOptions: WatchBlocksOptionsV1, - ): Observable { - const socket = io(this.wsApiHost, { path: this.wsApiPath }); - const subject = new ReplaySubject(0); - - socket.on(WatchBlocksV1.Next, (data: WatchBlocksResponseV1) => { - this.log.debug("Received WatchBlocksV1.Next"); - subject.next(data); - }); - - socket.on(WatchBlocksV1.Error, (ex: string) => { - this.log.error("Received WatchBlocksV1.Error:", ex); - subject.error(ex); - }); - - socket.on(WatchBlocksV1.Complete, () => { - this.log.debug("Received WatchBlocksV1.Complete"); - subject.complete(); - }); - - socket.on("connect", () => { - this.log.info( - `Connected client '${socket.id}', sending WatchBlocksV1.Subscribe...`, - ); - this.monitorSubjects.set(socket.id, subject); - socket.emit(WatchBlocksV1.Subscribe, monitorOptions); - }); - - socket.connect(); - - return subject.pipe( - finalize(() => { - this.log.info( - `FINALIZE client ${socket.id} - unsubscribing from the stream...`, - ); - socket.emit(WatchBlocksV1.Unsubscribe); - socket.disconnect(); - this.monitorSubjects.delete(socket.id); - }), - ); - } - - /** - * Watch for new blocks on Fabric ledger. Type of response must be configured in monitorOptions. - * Works with delegated signing function (no need to supply identity - requests are signing in a connector callback) - * - * @param monitorOptions Monitoring configuration. - * - * @returns Observable that will receive new blocks once they appear. - */ - public watchBlocksDelegatedSignV1( - monitorOptions: WatchBlocksDelegatedSignOptionsV1, - ): Observable { - const socket = io(this.wsApiHost, { path: this.wsApiPath }); - const subject = new ReplaySubject(0); - - socket.on(WatchBlocksV1.Next, (data: WatchBlocksResponseV1) => { - this.log.debug("Received WatchBlocksV1.Next"); - subject.next(data); - }); - - socket.on(WatchBlocksV1.Error, (ex: string) => { - this.log.error("Received WatchBlocksV1.Error:", ex); - subject.error(ex); - }); - - socket.on(WatchBlocksV1.Complete, () => { - this.log.debug("Received WatchBlocksV1.Complete"); - subject.complete(); - }); - - socket.on("connect", () => { - this.log.info( - `Connected client '${socket.id}', sending WatchBlocksV1.Subscribe...`, - ); - this.monitorSubjects.set(socket.id, subject); - socket.emit(WatchBlocksV1.SubscribeDelegatedSign, monitorOptions); - }); - - socket.connect(); - - return subject.pipe( - finalize(() => { - this.log.info( - `FINALIZE client ${socket.id} - unsubscribing from the stream...`, - ); - socket.emit(WatchBlocksV1.Unsubscribe); - socket.disconnect(); - this.monitorSubjects.delete(socket.id); - }), - ); - } - - /** - * Wait for transaction with specified ID to be committed. - * Must be started before sending the transaction (uses realtime monitoring). - * @warning: Remember to use timeout mechanism on production - * - * @param txId transactionId to wait for. - * @param monitorObservable Block observable in CactiTransactions mode (important - other mode will not work!) - * @returns `CactiBlockTransactionEventV1` of specified transaction. - */ - public async waitForTransactionCommit( - txId: string, - monitorObservable: Observable, - ) { - this.log.info("waitForTransactionCommit()", txId); - - return new Promise((resolve, reject) => { - const subscription = monitorObservable.subscribe({ - next: (event) => { - try { - this.log.debug( - "waitForTransactionCommit() Received event:", - JSON.stringify(event), - ); - if (!("cactiTransactionsEvents" in event)) { - throw new Error("Invalid event type received!"); - } - - const foundTransaction = event.cactiTransactionsEvents.find( - (tx) => tx.transactionId === txId, - ); - if (foundTransaction) { - this.log.info( - "waitForTransactionCommit() Found transaction with txId", - txId, - ); - subscription.unsubscribe(); - resolve(foundTransaction); - } - } catch (err) { - this.log.error( - "waitForTransactionCommit() event check error:", - err, - ); - subscription.unsubscribe(); - reject(err); - } - }, - error: (err) => { - this.log.error("waitForTransactionCommit() error:", err); - subscription.unsubscribe(); - reject(err); - }, - }); - }); - } - - /** - * Stop all ongoing monitors, terminate connections. - * - * @note Might take few seconds to clean up all the connections. - */ - public close(): void { - this.log.debug("Close all running monitors."); - this.monitorSubjects.forEach((subject) => subject.complete()); - this.monitorSubjects.clear(); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/create-gateway.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/create-gateway.ts deleted file mode 100644 index c6e28c2236..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/create-gateway.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { DefaultEventHandlerOptions } from "fabric-network"; -import { DefaultEventHandlerStrategies } from "fabric-network"; -import { Gateway } from "fabric-network"; -import { ICryptoKey } from "fabric-common"; -import { GatewayOptions as FabricGatewayOptions } from "fabric-network"; -import { Checks, LoggerProvider } from "@hyperledger/cactus-common"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { ConnectionProfile } from "../generated/openapi/typescript-axios/index"; -import { GatewayDiscoveryOptions } from "../generated/openapi/typescript-axios/index"; -import { GatewayEventHandlerOptions } from "../generated/openapi/typescript-axios/index"; -import { - GatewayOptions, - FabricSigningCredentialType, -} from "../generated/openapi/typescript-axios/index"; -import { - CertDatastore, - IIdentityData, -} from "../identity/internal/cert-datastore"; -import { - IIdentity, - SecureIdentityProviders, -} from "../identity/identity-provider"; - -export interface ICreateGatewayContext { - readonly logLevel?: LogLevelDesc; - readonly pluginRegistry: PluginRegistry; - readonly defaultConnectionProfile: ConnectionProfile; - readonly defaultDiscoveryOptions: GatewayDiscoveryOptions; - readonly defaultEventHandlerOptions: GatewayEventHandlerOptions; - readonly gatewayOptions: GatewayOptions; - readonly certStore: CertDatastore; - readonly secureIdentity: SecureIdentityProviders; -} - -export const E_CREATE_GATEWAY_WALLET = - "Invalid opts.gatewayOptions.wallet. Need json or keychain, none provided."; - -export async function createGateway( - ctx: ICreateGatewayContext, -): Promise { - const log = LoggerProvider.getOrCreate({ - label: "create-gateway", - level: ctx?.logLevel || "INFO", - }); - log.debug("Creating Fabric Node SDK Gateway object..."); - - Checks.truthy(ctx, "createGateway#ctx"); - Checks.truthy(ctx.gatewayOptions, "createGateway#ctx.gatewayOptions"); - - const { defaultConnectionProfile } = ctx; - const cp = ctx.gatewayOptions.connectionProfile || defaultConnectionProfile; - - let certData: IIdentityData; - if (ctx.gatewayOptions.wallet.json) { - log.debug("Parsing wallet from JSON representation..."); - certData = JSON.parse(ctx.gatewayOptions.wallet.json); - certData.type = certData.type || FabricSigningCredentialType.X509; - } else if (ctx.gatewayOptions.wallet.keychain) { - log.debug("Fetching wallet from JSON keychain..."); - certData = await ctx.certStore.get( - ctx.gatewayOptions.wallet.keychain.keychainId, - ctx.gatewayOptions.wallet.keychain.keychainRef, - ); - ctx.gatewayOptions.wallet.keychain.type = - ctx.gatewayOptions.wallet.keychain.type || - FabricSigningCredentialType.X509; - if (certData.type !== ctx.gatewayOptions.wallet.keychain.type) { - throw new Error( - `identity type mismatch, sorted of type = ${certData.type} but provided = ${ctx.gatewayOptions.wallet.keychain.type}`, - ); - } - } else { - throw new Error(E_CREATE_GATEWAY_WALLET); - } - - let key: ICryptoKey; - switch (certData.type) { - case FabricSigningCredentialType.VaultX509: - if ( - !ctx.gatewayOptions.wallet.keychain || - !ctx.gatewayOptions.wallet.keychain.vaultTransitKey - ) { - throw new Error( - `require ctx.gatewayOptions.wallet.keychain.vaultTransitKey`, - ); - } - key = ctx.secureIdentity.getVaultKey({ - token: ctx.gatewayOptions.wallet.keychain.vaultTransitKey.token, - keyName: ctx.gatewayOptions.wallet.keychain.vaultTransitKey.keyName, - }); - break; - case FabricSigningCredentialType.WsX509: - if ( - !ctx.gatewayOptions.wallet.keychain || - !ctx.gatewayOptions.wallet.keychain.webSocketKey - ) { - throw new Error( - `require ctx.gatewayOptions.wallet.keychain.webSocketKey`, - ); - } - key = ctx.secureIdentity.getWebSocketKey({ - sessionId: ctx.gatewayOptions.wallet.keychain.webSocketKey.sessionId, - signature: ctx.gatewayOptions.wallet.keychain.webSocketKey.signature, - }); - break; - case FabricSigningCredentialType.X509: - key = ctx.secureIdentity.getDefaultKey({ - private: certData.credentials.privateKey as string, - }); - break; - default: - throw new Error(`UNRECOGNIZED_IDENTITY_TYPE type = ${certData.type}`); - } - const identity: IIdentity = { - type: certData.type, - mspId: certData.mspId, - credentials: { - certificate: certData.credentials.certificate, - key: key, - }, - }; - - const eventHandlerOptions: DefaultEventHandlerOptions = { - commitTimeout: ctx.gatewayOptions.eventHandlerOptions?.commitTimeout || 300, - endorseTimeout: - ctx.gatewayOptions.eventHandlerOptions?.endorseTimeout || 300, - }; - - const strategy = - ctx.gatewayOptions.eventHandlerOptions?.strategy || - ctx.defaultEventHandlerOptions.strategy; - - if (strategy) { - eventHandlerOptions.strategy = DefaultEventHandlerStrategies[strategy]; - } - - log.debug(`Gateway EventHandlerOptions: `, eventHandlerOptions); - - const gatewayOptions: FabricGatewayOptions = { - discovery: ctx.gatewayOptions.discovery || ctx.defaultDiscoveryOptions, - eventHandlerOptions, - identity: identity, - identityProvider: ctx.secureIdentity, - }; - - log.debug("Instantiating and connecting gateway..."); - - const gateway = new Gateway(); - await gateway.connect(cp, gatewayOptions); - - log.debug("Connection established by gateway OK"); - - return gateway; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/find-and-replace-fabric-logging-spec.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/find-and-replace-fabric-logging-spec.ts deleted file mode 100644 index 9e903aa4ea..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/find-and-replace-fabric-logging-spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Checks } from "@hyperledger/cactus-common"; - -const PATTERN_FABRIC_CORE_LOGGING_LEVEL = new RegExp( - `\\s+(-e|--env)\\s+CORE_LOGGING_LEVEL='?"?\\w+'?"?\\s+`, - "gmi", -); - -const PATTERN_FABRIC_LOGGING_SPEC = new RegExp( - `FABRIC_LOGGING_SPEC=('?"?\\w+'?"?)`, - "gmi", -); - -export function findAndReplaceFabricLoggingSpec( - input: string, - newLogLevel: string, -): string { - Checks.nonBlankString(input, `findAndReplaceFabricLoggingSpec() arg1`); - Checks.nonBlankString(newLogLevel, `findAndReplaceFabricLoggingSpec() arg2`); - return input - .replace(PATTERN_FABRIC_CORE_LOGGING_LEVEL, " ") - .replace( - PATTERN_FABRIC_LOGGING_SPEC, - " FABRIC_LOGGING_SPEC= ".concat(newLogLevel), - ); -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/get-transaction-receipt-by-tx-id.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/get-transaction-receipt-by-tx-id.ts deleted file mode 100644 index b874bc0e77..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/get-transaction-receipt-by-tx-id.ts +++ /dev/null @@ -1,217 +0,0 @@ -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; -import { Gateway } from "fabric-network"; -import { common } from "fabric-protos"; -// BlockDecoder is not exported in ts definition so we need to use legacy import. -const { BlockDecoder } = require("fabric-common"); - -import { - GetTransactionReceiptResponse, - TransactReceiptTransactionEndorsement, - TransactReceiptTransactionCreator, - TransactReceiptBlockMetaData, -} from "../generated/openapi/typescript-axios"; - -import { querySystemChainCode } from "./query-system-chain-code"; - -export interface IGetTransactionReceiptByTxIDOptions { - readonly logLevel?: LogLevelDesc; - readonly gateway: Gateway; - readonly channelName: string; - readonly params: string[]; -} - -export async function getTransactionReceiptByTxID( - req: IGetTransactionReceiptByTxIDOptions, -): Promise { - const fnTag = `getTransactionReceiptForLockContractByTxID`; - const log = LoggerProvider.getOrCreate({ - label: fnTag, - level: req.logLevel || "INFO", - }); - log.info(`${fnTag}, start getting fabric transact receipt`); - - if (req.params.length != 2) { - throw new Error(`${fnTag}, should have 2 params`); - } - - const { gateway } = req; - const paramChannelName = req.params[0]; - const reqTxID = req.params[1]; - - const queryConfig = { - gateway, - connectionChannelName: req.channelName, - }; - const blockBuffer = await querySystemChainCode( - queryConfig, - "GetBlockByTxID", - paramChannelName, - reqTxID, - ); - - // Since commit 8c030ae9e739a28ff0900f7af27ec0fbbb4b7ff9 we have to manually - // decode the protocol buffer block data because the querySystemChainCode() - // does not do it for us by default anymore. - const block: common.Block = BlockDecoder.decode(blockBuffer); - - const blockJson = JSON.parse(JSON.stringify(block)); - - const transactReceipt: GetTransactionReceiptResponse = {}; - transactReceipt.blockNumber = blockJson.header.number; - const txIDs = []; - if (!block.data) { - throw new Error(`${fnTag} block.data is null`); - } - const blockData = block.data; - if (!blockData.data) { - throw new Error(`${fnTag} block.data.data is null`); - } - const blockDataArr = blockData.data; - for (let i = 0; i < blockDataArr.length; i++) { - const blockData = JSON.parse(JSON.stringify(blockDataArr[i])); - if (!blockData.payload) { - throw new Error(`${fnTag}, blockData.payload undefine`); - } - if (!blockData.payload.header) continue; - if (!blockData.payload.header.channel_header) continue; - - const payloadChannelHeader = blockData.payload.header.channel_header; - if (payloadChannelHeader.tx_id) { - txIDs.push(payloadChannelHeader.tx_id); - if (payloadChannelHeader.tx_id != reqTxID) continue; - transactReceipt.channelID = payloadChannelHeader.channel_id; - if (!blockData.payload.data) continue; - if (!blockData.payload.data.actions) continue; - const payloadDataActions = blockData.payload.data.actions; - - if (!payloadDataActions[0].header || !payloadDataActions[0].payload) - continue; - const actionsHeader = payloadDataActions[0].header; - const actionsPayload = payloadDataActions[0].payload; - const creator = actionsHeader.creator; - const creatorMspId = creator.mspid; - const creatorId = String.fromCharCode.apply(null, creator.id_bytes.data); - const transactReceiptCreator: TransactReceiptTransactionCreator = { - mspid: creatorMspId, - creatorID: creatorId, - }; - transactReceipt.transactionCreator = transactReceiptCreator; - if (actionsPayload.chaincode_proposal_payload == undefined) continue; - const chainCodeProposal = actionsPayload.chaincode_proposal_payload; - if ( - !chainCodeProposal.input || - !chainCodeProposal.input.chaincode_spec || - !chainCodeProposal.input.chaincode_spec.chaincode_id - ) - continue; - if ( - !actionsPayload.action || - !actionsPayload.action.proposal_response_payload || - !actionsPayload.action.endorsements - ) - continue; - const proposalResponsePayload = - actionsPayload.action.proposal_response_payload; - const actionEndorsements = actionsPayload.action.endorsements; - const endorsements = []; - for (let i = 0; i < actionEndorsements.length; i++) { - const endorser = actionEndorsements[i].endorser; - const mspId = endorser.mspid; - const idBytes = endorser.id_bytes; - const idBytesData = idBytes.data; - const endorserId = String.fromCharCode.apply(null, idBytesData); - const signatureData = actionEndorsements[i].signature.data; - const signature = String.fromCharCode.apply(null, signatureData); - const endorsement: TransactReceiptTransactionEndorsement = { - mspid: mspId, - endorserID: endorserId, - signature: signature, - }; - endorsements.push(endorsement); - } - transactReceipt.transactionEndorsement = endorsements; - if (!proposalResponsePayload.extension) continue; - - const responseExtension = proposalResponsePayload.extension; - if (!responseExtension.chaincode_id) continue; - const extensionChainCodeID = responseExtension.chaincode_id; - transactReceipt.chainCodeName = extensionChainCodeID; - transactReceipt.chainCodeName = extensionChainCodeID.name; - transactReceipt.chainCodeVersion = extensionChainCodeID.version; - if ( - !responseExtension.response || - !responseExtension.response.payload || - !responseExtension.response.status - ) - continue; - const responseStatus = responseExtension.response.status; - transactReceipt.responseStatus = responseStatus; - if ( - !responseExtension.results || - !responseExtension.results.ns_rwset || - responseExtension.results.ns_rwset.length < 2 - ) { - continue; - } - const extensionNsRwset = responseExtension.results.ns_rwset[1]; - if (!extensionNsRwset.rwset) continue; - - const rwset = extensionNsRwset.rwset; - if (!rwset.writes) continue; - const rwsetWrite = rwset.writes; - if (!rwsetWrite[0].key) continue; - const rwsetKey = rwsetWrite[0].key; - transactReceipt.rwsetKey = rwsetKey; - if (!rwsetWrite[0].value || !rwsetWrite[0].value.data) continue; - const rwSetWriteData = rwsetWrite[0].value.data; - // eslint-disable-next-line prefer-spread - const rwSetWriteDataStr = String.fromCharCode.apply( - String, - rwSetWriteData, - ); - transactReceipt.rwsetWriteData = rwSetWriteDataStr; - break; - } - } - if (!block.metadata) { - throw new Error(`${fnTag}, block.metadata undefined`); - } - if (!block.metadata.metadata) { - throw new Error(`${fnTag}, block.metadata.metadata undefined`); - } - - const metadata = JSON.parse(JSON.stringify(block.metadata.metadata[0])); - if (!metadata.signatures) { - throw new Error(`${fnTag}, metadata signature undefined`); - } - if (!metadata.signatures[0].signature_header) { - throw new Error( - `${fnTag}, metadata.signatures.signature_header is undefined`, - ); - } - const metadataSignatureCreator = - metadata.signatures[0].signature_header.creator; - const metadataMspId = metadataSignatureCreator.mspid; - if (!metadataSignatureCreator.id_bytes) { - throw new Error(`${fnTag}, metadataSignatureCreator.id_bytes`); - } - const metadataCreatorId = String.fromCharCode.apply( - null, - metadataSignatureCreator.id_bytes.data, - ); - if (!metadata.signatures[0].signature) { - throw new Error(`${fnTag}, metadata.signatures[0].signature undefined`); - } - const metedataSignature = String.fromCharCode.apply( - null, - metadata.signatures[0].signature.data, - ); - const transactionReceiptBlockMetadata: TransactReceiptBlockMetaData = { - mspid: metadataMspId, - blockCreatorID: metadataCreatorId, - signature: metedataSignature, - }; - transactReceipt.blockMetaData = transactionReceiptBlockMetadata; - - return transactReceipt; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/is-ssh-exec-ok.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/is-ssh-exec-ok.ts deleted file mode 100644 index c48517ab8f..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/is-ssh-exec-ok.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { SSHExecCommandResponse } from "node-ssh"; -import { RuntimeError } from "run-time-error-cjs"; - -export function isSshExecOk(res: SSHExecCommandResponse): boolean { - const fnTag = "isSshExecOk()"; - if (!res) { - throw new RuntimeError(`${fnTag} expected arg res to be truthy.`); - } - return res.code === null || res.code === 0; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/query-system-chain-code.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/query-system-chain-code.ts deleted file mode 100644 index 0b26fca384..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/query-system-chain-code.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Gateway } from "fabric-network"; - -const QSCC_ContractName = "qscc"; - -/** - * Configuration parameter type for `querySystemChainCode` function. - */ -export interface QuerySystemChainCodeConfig { - gateway: Gateway; - connectionChannelName: string; // used to connect to the network -} - -/** - * Call method on fabric system contract `qscc` and return decoded or encoded response. - * - * @param config Configuration of `querySystemChainCode` method itself. - * @param functionName Method on `qscc` to call. - * @param args Args to method from `functionName` - * - * @returns Encoded `Buffer` response from the ledger. - */ -export async function querySystemChainCode( - config: QuerySystemChainCodeConfig, - functionName: string, - ...args: (string | Buffer)[] -): Promise { - const { gateway, connectionChannelName } = config; - const network = await gateway.getNetwork(connectionChannelName); - const contract = network.getContract(QSCC_ContractName); - - const resultBuffer = await contract.evaluateTransaction( - functionName, - ...(args as string[]), // contract expects byte[], node Buffer fits well here as well - ); - if (!resultBuffer) { - throw new Error(`Received empty response from qscc call ${functionName}`); - } - - return resultBuffer; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/sign-utils.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/sign-utils.ts deleted file mode 100644 index 82f7c66686..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/sign-utils.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2023 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * Util tools used for cryptography related to hyperledger fabric (e.g. signing proposals) - */ - -import crypto from "crypto"; -import jsrsa from "jsrsasign"; -import elliptic from "elliptic"; - -const ellipticCurves = elliptic.curves as any; - -/** - * This function comes from `CryptoSuite_ECDSA_AES.js` and will be part of the - * stand alone fabric-sig package in future. - */ -const ordersForCurve: Record = { - secp256r1: { - halfOrder: ellipticCurves.p256.n.shrn(1), - order: ellipticCurves.p256.n, - }, - secp384r1: { - halfOrder: ellipticCurves.p384.n.shrn(1), - order: ellipticCurves.p384.n, - }, -}; - -/** - * This function comes from `CryptoSuite_ECDSA_AES.js` and will be part of the - * stand alone fabric-sig package in future. - * - * @param sig EC signature - * @param curveParams EC key params. - * @returns Signature - */ -function preventMalleability(sig: any, curveParams: { name: string }) { - const halfOrder = ordersForCurve[curveParams.name].halfOrder; - if (!halfOrder) { - throw new Error( - 'Can not find the half order needed to calculate "s" value for immalleable signatures. Unsupported curve name: ' + - curveParams.name, - ); - } - - // in order to guarantee 's' falls in the lower range of the order, as explained in the above link, - // first see if 's' is larger than half of the order, if so, it needs to be specially treated - if (sig.s.cmp(halfOrder) === 1) { - // module 'bn.js', file lib/bn.js, method cmp() - // convert from BigInteger used by jsrsasign Key objects and bn.js used by elliptic Signature objects - const bigNum = ordersForCurve[curveParams.name].order; - sig.s = bigNum.sub(sig.s); - } - - return sig; -} - -/** - * Internal function to sign input buffer with private key. - * - * @param privateKeyPEM private key in PEM format. - * @param proposalBytes Buffer of the proposal to sign. - * @param algorithm hash algorithm (input for `crypto.createHash`) - * @param ecdsaCurveName private key curve name - * @returns - */ -export function signProposal( - privateKeyPEM: string, - proposalBytes: Buffer, - algorithm = "sha256", - ecdsaCurveName = "p256", -) { - const ecdsaCurve = ellipticCurves[ecdsaCurveName]; - const ecdsa = new elliptic.ec(ecdsaCurve); - const key = jsrsa.KEYUTIL.getKey(privateKeyPEM) as any; - - const signKey = ecdsa.keyFromPrivate(key.prvKeyHex, "hex"); - const digest = crypto - .createHash(algorithm) - .update(proposalBytes) - .digest("hex"); - - let sig = ecdsa.sign(Buffer.from(digest, "hex"), signKey); - sig = preventMalleability(sig, key.ecparams); - return Buffer.from(sig.toDER()); -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/ssh-exec.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/ssh-exec.ts deleted file mode 100644 index b61a4a20de..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/ssh-exec.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { - NodeSSH, - SSHExecCommandOptions, - SSHExecCommandResponse, -} from "node-ssh"; -import { RuntimeError } from "run-time-error-cjs"; - -import { Logger } from "@hyperledger/cactus-common"; - -import { isSshExecOk } from "./is-ssh-exec-ok"; - -export async function sshExec( - ctx: { readonly log: Logger }, - cmd: string, - label: string, - ssh: NodeSSH, - sshCmdOptions: SSHExecCommandOptions, -): Promise { - ctx.log.debug(`${label} CMD: ${cmd}`); - const cmdRes = await ssh.execCommand(cmd, sshCmdOptions); - ctx.log.debug(`${label} CMD Response .code: %o`, cmdRes.code); - ctx.log.debug(`${label} CMD Response .signal: %o`, cmdRes.signal); - ctx.log.debug(`${label} CMD Response .stderr: %s`, cmdRes.stderr); - ctx.log.debug(`${label} CMD Response .stdout: %s`, cmdRes.stdout); - - if (!isSshExecOk(cmdRes)) { - throw new RuntimeError(`Expected ${label} cmdRes.code as null or 0`); - } - return cmdRes; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/utils.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/utils.ts deleted file mode 100644 index b1679192f3..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/utils.ts +++ /dev/null @@ -1,55 +0,0 @@ -import Long from "long"; - -/** - * Check if provided variable is a function. Throws otherwise. - * To be used with unsafe `require()` imports from fabric SDK packages. - * - * @param functionVariable function imported from fabric SDK - * @param functionName name of the imported function (for logging purposes) - */ -export function assertFabricFunctionIsAvailable( - functionVariable: unknown, - functionName: string, -) { - if (typeof functionVariable !== "function") { - throw new Error(`${functionName} could not be imported from fabric SDK`); - } -} - -/** - * Convert input bytes into Buffer. Handle cases where input is undefined or null. - * - * @note method comes from Fabric Node SDK. - * - * @param bytes input byte array - * @returns `Buffer` object - */ -export function asBuffer(bytes: Uint8Array | null | undefined): Buffer { - if (!bytes) { - return Buffer.alloc(0); - } - - return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength); // Create a Buffer view to avoid copying -} - -export type FabricLong = { - low: number; - hight: number | undefined; - unsigned: boolean | undefined; -}; - -/** - * Convert Long value returned by some low-level fabric API to regular number. - * - * @param longNumberObject Long object (with low and hight fields) - * - * @returns number - */ -export function fabricLongToNumber(longNumberObject: FabricLong) { - const longValue = new Long( - longNumberObject.low, - longNumberObject.hight, - longNumberObject.unsigned, - ); - return longValue.toNumber(); -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/deploy-contract-go-source/deploy-contract-go-source-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/deploy-contract-go-source/deploy-contract-go-source-endpoint-v1.ts deleted file mode 100644 index 8d8a6cca28..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/deploy-contract-go-source/deploy-contract-go-source-endpoint-v1.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { Express, Request, Response } from "express"; -import HttpStatus from "http-status-codes"; -import sanitizeFilename from "sanitize-filename"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorFabric } from "../plugin-ledger-connector-fabric"; -import { DeployContractGoSourceV1Request } from "../generated/openapi/typescript-axios/index"; -import OAS from "../../json/openapi.json"; - -export interface IDeployContractGoSourceEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorFabric; -} - -export class DeployContractGoSourceEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeployContractGoSourceEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return DeployContractGoSourceEndpointV1.CLASS_NAME; - } - - constructor(public readonly opts: IDeployContractGoSourceEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.connector, `${fnTag} arg options.connector`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - /** - * Important: This function mutates the input object in an attempt to sanitize - * the user provided data in case it was malicious. - * - * - * @param reqBody The HTTP request body that will have it's filenames and - * filepaths mutated if they contain invalid/unsafe user input. The passed - * in object will have it's values updated once the function has returned. - */ - protected async sanitizeFilenamesInRequest( - reqBody: DeployContractGoSourceV1Request, - ): Promise { - reqBody.goSource.filename = sanitizeFilename(reqBody.goSource.filename); - if (reqBody.goSource.filepath) { - reqBody.goSource.filepath = sanitizeFilename(reqBody.goSource.filepath); - } - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - const reqTag = `${verbUpper} ${this.getPath()}`; - this.log.debug(reqTag); - try { - const { connector } = this.opts; - const reqBody = req.body as DeployContractGoSourceV1Request; - await this.sanitizeFilenamesInRequest(reqBody); - const resBody = await connector.deployContractGoSourceV1(reqBody); - res.status(HttpStatus.OK); - res.json(resBody); - } catch (ex) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - await handleRestEndpointException({ - errorMsg, - log: this.log, - error: ex, - res, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/deploy-contract-go-source/deploy-contract-go-source-impl-fabric-v2-5-6.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/deploy-contract-go-source/deploy-contract-go-source-impl-fabric-v2-5-6.ts deleted file mode 100644 index 1176f6eabf..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/deploy-contract-go-source/deploy-contract-go-source-impl-fabric-v2-5-6.ts +++ /dev/null @@ -1,357 +0,0 @@ -import path from "path"; -import temp from "temp"; -import fs from "fs/promises"; - -import { - NodeSSH, - SSHExecCommandOptions, - SSHExecCommandResponse, -} from "node-ssh"; - -import { Checks, Logger } from "@hyperledger/cactus-common"; - -import type { - DeployContractGoSourceV1Request, - DeployContractGoSourceV1Response, -} from "../generated/openapi/typescript-axios/api"; -import type { IPluginLedgerConnectorFabricOptions } from "../plugin-ledger-connector-fabric"; -import { sshExec } from "../common/ssh-exec"; -import { findAndReplaceFabricLoggingSpec } from "../common/find-and-replace-fabric-logging-spec"; -import type { IQueryInstalledResponse } from "../peer/i-query-installed-response"; -import { isSshExecOk } from "../common/is-ssh-exec-ok"; -import type { IQueryCommittedResponse } from "../peer/i-query-committed-response"; - -const FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_1 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"; - -/** - * Constant value holding the default $GOPATH in the Fabric CLI container as - * observed on fabric deployments that are produced by the official examples - * found in the https://github.com/hyperledger/fabric-samples repository. - */ -export const K_DEFAULT_CLI_CONTAINER_GO_PATH = "/opt/gopath/"; - -export interface IDeployContractGoSourceImplFabricV256Context { - readonly log: Logger; - readonly className: string; - readonly dockerBinary: string; - readonly opts: IPluginLedgerConnectorFabricOptions; -} - -/** - * @param req The object containing all the necessary metadata and parameters - * in order to have the contract deployed. - */ -export async function deployContractGoSourceImplFabricV256( - ctx: IDeployContractGoSourceImplFabricV256Context, - req: DeployContractGoSourceV1Request, -): Promise { - const { log, className, dockerBinary } = ctx; - const fnTag = `${className}#deployContractGoSourceImplFabricV256()`; - - const cliContainerGoPath = - ctx.opts.cliContainerGoPath || K_DEFAULT_CLI_CONTAINER_GO_PATH; - - const ssh = new NodeSSH(); - await ssh.connect(ctx.opts.sshConfig); - log.debug(`SSH connection OK`); - - try { - log.debug(`${fnTag} Deploying .go source: ${req.goSource.filename}`); - - Checks.truthy(req.goSource, `${fnTag}:req.goSource`); - - temp.track(); - const tmpDirPrefix = `hyperledger-cacti-${className}`; - const tmpDirPath = temp.mkdirSync(tmpDirPrefix); - - // The module name of the chain-code, for example this will extract - // ccName to be "hello-world" from a filename of "hello-world.go" - const inferredModuleName = path.basename(req.goSource.filename, ".go"); - log.debug(`Inferred module name: ${inferredModuleName}`); - const ccName = req.moduleName || inferredModuleName; - log.debug(`Determined ChainCode name: ${ccName}`); - - const remoteDirPath = path.join(cliContainerGoPath, "src/", ccName); - log.debug(`Remote dir path on CLI container: ${remoteDirPath}`); - - const localFilePath = path.join(tmpDirPath, req.goSource.filename); - await fs.writeFile(localFilePath, req.goSource.body, "base64"); - - const remoteFilePath = path.join(remoteDirPath, req.goSource.filename); - - log.debug(`SCP from/to %o => %o`, localFilePath, remoteFilePath); - await ssh.putFile(localFilePath, remoteFilePath); - log.debug(`SCP OK %o`, remoteFilePath); - - const sshOpts: SSHExecCommandOptions = { - execOptions: { - pty: true, - env: { - // just in case go modules would be otherwise disabled - GO111MODULE: "on", - FABRIC_LOGGING_SPEC: "DEBUG", - }, - }, - cwd: remoteDirPath, - }; - - const dockerCliExecEnv = Object.entries(ctx.opts.cliContainerEnv) - .map(([key, value]) => `--env ${key}=${value}`) - .join(" "); - - const dockerBuildCmd = - `${dockerBinary} exec ` + - dockerCliExecEnv + - ` --workdir=${remoteDirPath}` + - ` cli `; - - await sshExec( - ctx, - `${dockerBinary} exec cli mkdir -p ${remoteDirPath}/`, - "Create ChainCode project (go module) directory", - ssh, - sshOpts, - ); - - await sshExec( - ctx, - `${dockerBinary} exec cli go version`, - "Print go version", - ssh, - sshOpts, - ); - - const copyToCliCmd = `${dockerBinary} cp ${remoteFilePath} cli:${remoteFilePath}`; - log.debug(`Copy to CLI Container CMD: ${copyToCliCmd}`); - const copyToCliRes = await ssh.execCommand(copyToCliCmd, sshOpts); - log.debug(`Copy to CLI Container CMD Response: %o`, copyToCliRes); - Checks.truthy(copyToCliRes.code === 0, `copyToCliRes.code === 0`); - - { - const goModInitCmd = `${dockerBuildCmd} go mod init ${ccName}`; - log.debug(`go mod init CMD: ${goModInitCmd}`); - const goModInitRes = await ssh.execCommand(goModInitCmd, sshOpts); - log.debug(`go mod init CMD Response: %o`, goModInitRes); - Checks.truthy(goModInitRes.code === 0, `goModInitRes.code === 0`); - } - - const pinnedDeps = req.pinnedDeps || []; - for (const dep of pinnedDeps) { - const goGetCmd = `${dockerBuildCmd} go get ${dep}`; - log.debug(`go get CMD: ${goGetCmd}`); - const goGetRes = await ssh.execCommand(goGetCmd, sshOpts); - log.debug(`go get CMD Response: %o`, goGetRes); - Checks.truthy(goGetRes.code === 0, `goGetRes.code === 0`); - } - - { - const goModTidyCmd = `${dockerBuildCmd} go mod tidy`; - log.debug(`go mod tidy CMD: ${goModTidyCmd}`); - const goModTidyRes = await ssh.execCommand(goModTidyCmd, sshOpts); - log.debug(`go mod tidy CMD Response: %o`, goModTidyRes); - Checks.truthy(goModTidyRes.code === 0, `goModTidyRes.code === 0`); - } - - { - const goVendorCmd = `${dockerBuildCmd} go mod vendor`; - log.debug(`go mod vendor CMD: ${goVendorCmd}`); - const goVendorRes = await ssh.execCommand(goVendorCmd, sshOpts); - log.debug(`go mod vendor CMD Response: %o`, goVendorRes); - Checks.truthy(goVendorRes.code === 0, `goVendorRes.code === 0`); - } - - { - const goBuildCmd = `${dockerBuildCmd} go build`; - log.debug(`go build CMD: ${goBuildCmd}`); - const goBuildRes = await ssh.execCommand(goBuildCmd, sshOpts); - log.debug(`go build CMD Response: %o`, goBuildRes); - Checks.truthy(goBuildRes.code === 0, `goBuildRes.code === 0`); - } - - let success = true; - - const installationCommandResponses: SSHExecCommandResponse[] = []; - const ccSequence = 1; - const orderer = "orderer.example.com:7050"; - const ordererTLSHostnameOverride = "orderer.example.com"; - - const ccPkgCmd = - `${dockerBuildCmd} peer lifecycle chaincode package ${ccName}.tar.gz ` + - ` --path ${remoteDirPath} ` + - ` --label ${ccName} ` + - ` --lang golang`; - - const ccPkgLabel = `packaging chain code`; - const ccPkgRes = await sshExec(ctx, ccPkgCmd, ccPkgLabel, ssh, sshOpts); - Checks.truthy(ccPkgRes.code === 0, `ccPkgRes.code === 0`); - - for (const org of req.targetOrganizations) { - const dockerExecEnv = Object.entries(org) - .map(([key, val]) => `--env ${key}=${val}`) - .join(" "); - - const dockerExecCmd = - `${dockerBinary} exec ` + - dockerExecEnv + - ` --env GO111MODULE=on` + - ` --workdir=${remoteDirPath}` + - ` cli `; - - const ccInstallLbl = `Install ChainCode in ${org.CORE_PEER_LOCALMSPID}`; - const ccInstallCmd = `${dockerExecCmd} peer lifecycle chaincode install ${ccName}.tar.gz `; - - const anInstallCmdRes = await sshExec( - ctx, - ccInstallCmd, - ccInstallLbl, - ssh, - sshOpts, - ); - - installationCommandResponses.push(anInstallCmdRes); - - // const ctorArgsJson = JSON.stringify(req.constructorArgs || {}); - - // Need to make sure that the logging is turned off otherwise it - // mangles the JSON syntax and makes the output invalid... - const dockerExecCmdInfoLog = findAndReplaceFabricLoggingSpec( - dockerExecCmd, - "ERROR", - ); - - const instantiationCommandResponses = []; - const cmdQueryInstalled = `${dockerExecCmdInfoLog} peer lifecycle chaincode queryinstalled --output json`; - const lblQueryInstalled = `query installed contracts`; - const resQueryInstalled = await sshExec( - ctx, - cmdQueryInstalled, - lblQueryInstalled, - ssh, - sshOpts, - ); - - log.debug("Queries installed contracts OK."); - Checks.truthy(resQueryInstalled.stdout.includes(ccName)); - log.debug("Validated that contract is in fact installed OK."); - - const json = resQueryInstalled.stdout; - const qir = JSON.parse(json) as IQueryInstalledResponse; - const icc = qir.installed_chaincodes.find( - (chainCode) => chainCode.label === ccName, - ); - - ctx.log.debug(`Parsed list of installed contracts: %o`, qir); - - Checks.truthy(icc, "No installed chaincode with label: %o", ccName); - - if (!icc?.package_id) { - throw new Error(`${fnTag}: package ID falsy. Something's wrong.`); - } - const packageId = icc?.package_id; - ctx.log.debug(`Found package ID: ${packageId}`); - - const instantiateCmd = - ` ${dockerExecCmd} peer lifecycle chaincode approveformyorg ` + - `--orderer ${orderer} ` + - `--ordererTLSHostnameOverride ${ordererTLSHostnameOverride} ` + - `--tls ` + - `--cafile ${FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_1} ` + - `--channelID ${req.channelId} ` + - `--name ${ccName} ` + - `--version ${req.chainCodeVersion} ` + - `--package-id ${packageId} ` + - `--sequence ${ccSequence} ` + - ``; - - const cmdLabel = `approveformyorg ChainCode in ${org.CORE_PEER_LOCALMSPID}`; - log.debug(`ApproveForMyOrg CMD: %o`, instantiateCmd); - - const instantiationCmdRes = await sshExec( - ctx, - instantiateCmd, - cmdLabel, - ssh, - sshOpts, - ); - Checks.truthy(instantiationCmdRes.code === 0, `res.code === 0`); - instantiationCommandResponses.push(instantiationCmdRes); - - log.debug(`ApproveForMyOrg CMD Response:%o`, instantiationCmdRes); - success = success && isSshExecOk(instantiationCmdRes); - } - - const commitCmd = - `${dockerBuildCmd} peer lifecycle chaincode commit ` + - ` --name ${ccName} ` + - ` --version ${req.chainCodeVersion} ` + - ` --channelID ${req.channelId} ` + - ` --tls ` + - ` --orderer ${orderer} ` + - ` --ordererTLSHostnameOverride ${ordererTLSHostnameOverride} ` + - ` --cafile ${FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_1} ` + - ` --peerAddresses ${req.targetOrganizations[0].CORE_PEER_ADDRESS} ` + - ` --tlsRootCertFiles ${req.targetOrganizations[0].CORE_PEER_TLS_ROOTCERT_FILE}` + - ` --peerAddresses ${req.targetOrganizations[1].CORE_PEER_ADDRESS} ` + - ` --tlsRootCertFiles ${req.targetOrganizations[1].CORE_PEER_TLS_ROOTCERT_FILE}` + - ` --sequence=${ccSequence} `; - - const lblCcCommit = "peer lifecycle chaincode commit"; - - const resCommit = await sshExec(ctx, commitCmd, lblCcCommit, ssh, sshOpts); - - success = success && isSshExecOk(resCommit); - - // Need to make sure that the logging is turned off otherwise it - // mangles the JSON syntax and makes the output invalid... - const dockerBuildCmdInfoLog = findAndReplaceFabricLoggingSpec( - dockerBuildCmd, - "ERROR", - ); - - const cmdQueryCommitted2 = `${dockerBuildCmdInfoLog} peer lifecycle chaincode querycommitted --channelID=${req.channelId} --output json`; - const lblQueryCommitted2 = `peer lifecycle chaincode querycommitted --channelID=${req.channelId}`; - - log.debug(`${lblQueryCommitted2} CMD Response:%o`, cmdQueryCommitted2); - - const resQueryCommitted2 = await sshExec( - ctx, - cmdQueryCommitted2, - lblQueryCommitted2, - ssh, - sshOpts, - ); - - Checks.truthy( - resQueryCommitted2.stdout.includes(ccName), - "stdout has contract name", - ); - const committedCCsJson = resQueryCommitted2.stdout; - const qcr2 = JSON.parse(committedCCsJson) as IQueryCommittedResponse; - const ccd2 = qcr2.chaincode_definitions.find( - (ccd) => ccd.name === ccName && ccd.version === req.chainCodeVersion, - ); - - ctx.log.debug(`Parsed list of installed contracts: %o`, qcr2); - - Checks.truthy(ccd2, "No installed chaincode with label: %o", ccName); - - log.debug(`EXIT doDeploy()`); - const res: DeployContractGoSourceV1Response = { - success, - installationCommandResponses, - instantiationCommandResponse: installationCommandResponses[0], - }; - - return res; - } catch (ex) { - ctx.log.debug(`${fnTag} crashed. Re-throwing...`, ex); - throw ex; - } finally { - try { - ssh.dispose(); - } finally { - temp.cleanup(); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/deploy-contract/deploy-contract-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/deploy-contract/deploy-contract-endpoint-v1.ts deleted file mode 100644 index 837c3f8008..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/deploy-contract/deploy-contract-endpoint-v1.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { Express, Request, Response } from "express"; -import HttpStatus from "http-status-codes"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorFabric } from "../plugin-ledger-connector-fabric"; -import { DeployContractV1Request } from "../generated/openapi/typescript-axios/index"; -import OAS from "../../json/openapi.json"; - -export interface IDeployContractEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorFabric; -} - -export class DeployContractEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "DeployContractEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return DeployContractEndpointV1.CLASS_NAME; - } - - constructor(public readonly opts: IDeployContractEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.connector, `${fnTag} arg options.connector`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - const reqTag = `${verbUpper} ${this.getPath()}`; - this.log.debug(reqTag); - - try { - const { connector } = this.opts; - const reqBody = req.body as DeployContractV1Request; - const resBody = await connector.deployContract(reqBody); - res.status(HttpStatus.OK); - res.json(resBody); - } catch (ex) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - await handleRestEndpointException({ - errorMsg, - log: this.log, - error: ex, - res, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 4ba11dde84..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,2347 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Fabric - * Can perform basic tasks on a fabric ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * Custom format full fabric block with transactions - * @export - * @interface CactiBlockFullEventV1 - */ -export interface CactiBlockFullEventV1 { - /** - * - * @type {number} - * @memberof CactiBlockFullEventV1 - */ - 'blockNumber': number; - /** - * - * @type {string} - * @memberof CactiBlockFullEventV1 - */ - 'blockHash': string; - /** - * - * @type {string} - * @memberof CactiBlockFullEventV1 - */ - 'previousBlockHash': string; - /** - * - * @type {number} - * @memberof CactiBlockFullEventV1 - */ - 'transactionCount': number; - /** - * - * @type {Array} - * @memberof CactiBlockFullEventV1 - */ - 'cactiTransactionsEvents': Array; -} -/** - * Custom response containing full block summary. - * @export - * @interface CactiBlockFullResponseV1 - */ -export interface CactiBlockFullResponseV1 { - /** - * - * @type {CactiBlockFullEventV1} - * @memberof CactiBlockFullResponseV1 - */ - 'cactiFullEvents': CactiBlockFullEventV1; -} -/** - * Transaction summary from commited block. - * @export - * @interface CactiBlockTransactionEventV1 - */ -export interface CactiBlockTransactionEventV1 { - /** - * ChainCode containing function that was executed. - * @type {string} - * @memberof CactiBlockTransactionEventV1 - */ - 'chaincodeId': string; - /** - * Transaction identifier. - * @type {string} - * @memberof CactiBlockTransactionEventV1 - */ - 'transactionId': string; - /** - * Function name that was executed. - * @type {string} - * @memberof CactiBlockTransactionEventV1 - */ - 'functionName': string; - /** - * List of function arguments. - * @type {Array} - * @memberof CactiBlockTransactionEventV1 - */ - 'functionArgs': Array; -} -/** - * Custom response containing block transactions summary. Compatible with legacy fabric-socketio connector monitoring. - * @export - * @interface CactiBlockTransactionsResponseV1 - */ -export interface CactiBlockTransactionsResponseV1 { - /** - * List of transactions summary - * @type {Array} - * @memberof CactiBlockTransactionsResponseV1 - */ - 'cactiTransactionsEvents': Array; -} -/** - * Enumerates the supported programming language runtimes of Hyperledger Fabric - * @export - * @enum {string} - */ - -export const ChainCodeLanguageRuntime = { - Golang: 'golang', - Node: 'node', - Java: 'java' -} as const; - -export type ChainCodeLanguageRuntime = typeof ChainCodeLanguageRuntime[keyof typeof ChainCodeLanguageRuntime]; - - -/** - * - * @export - * @interface ChainCodeLifeCycleCommandResponses - */ -export interface ChainCodeLifeCycleCommandResponses { - /** - * - * @type {SSHExecCommandResponse} - * @memberof ChainCodeLifeCycleCommandResponses - */ - 'packaging'?: SSHExecCommandResponse; - /** - * - * @type {Array} - * @memberof ChainCodeLifeCycleCommandResponses - */ - 'installList': Array; - /** - * - * @type {Array} - * @memberof ChainCodeLifeCycleCommandResponses - */ - 'queryInstalledList': Array; - /** - * - * @type {Array} - * @memberof ChainCodeLifeCycleCommandResponses - */ - 'approveForMyOrgList': Array; - /** - * - * @type {SSHExecCommandResponse} - * @memberof ChainCodeLifeCycleCommandResponses - */ - 'commit'?: SSHExecCommandResponse; - /** - * - * @type {SSHExecCommandResponse} - * @memberof ChainCodeLifeCycleCommandResponses - */ - 'queryCommitted'?: SSHExecCommandResponse; - /** - * - * @type {SSHExecCommandResponse} - * @memberof ChainCodeLifeCycleCommandResponses - */ - 'init'?: SSHExecCommandResponse; -} -/** - * Enumerates the supported source code programming languages of Hyperledger Fabric - * @export - * @enum {string} - */ - -export const ChainCodeProgrammingLanguage = { - Golang: 'golang', - Javascript: 'javascript', - Typescript: 'typescript', - Java: 'java' -} as const; - -export type ChainCodeProgrammingLanguage = typeof ChainCodeProgrammingLanguage[keyof typeof ChainCodeProgrammingLanguage]; - - -/** - * - * @export - * @interface ConnectionProfile - */ -export interface ConnectionProfile { - [key: string]: any; - - /** - * - * @type {string} - * @memberof ConnectionProfile - */ - 'name': string; - /** - * - * @type {string} - * @memberof ConnectionProfile - */ - 'x-type'?: string; - /** - * - * @type {string} - * @memberof ConnectionProfile - */ - 'description'?: string; - /** - * - * @type {string} - * @memberof ConnectionProfile - */ - 'version': string; - /** - * - * @type {ConnectionProfileClient} - * @memberof ConnectionProfile - */ - 'client'?: ConnectionProfileClient; - /** - * - * @type {{ [key: string]: any; }} - * @memberof ConnectionProfile - */ - 'channels'?: { [key: string]: any; }; - /** - * - * @type {{ [key: string]: any; }} - * @memberof ConnectionProfile - */ - 'organizations': { [key: string]: any; }; - /** - * - * @type {{ [key: string]: any; }} - * @memberof ConnectionProfile - */ - 'orderers'?: { [key: string]: any; }; - /** - * - * @type {{ [key: string]: any; }} - * @memberof ConnectionProfile - */ - 'peers': { [key: string]: any; }; - /** - * - * @type {{ [key: string]: any; }} - * @memberof ConnectionProfile - */ - 'certificateAuthorities'?: { [key: string]: any; }; -} -/** - * - * @export - * @interface ConnectionProfileClient - */ -export interface ConnectionProfileClient { - /** - * - * @type {string} - * @memberof ConnectionProfileClient - */ - 'organization'?: string; -} -/** - * - * @export - * @enum {string} - */ - -export const DefaultEventHandlerStrategy = { - MspidScopeAllfortx: 'MSPID_SCOPE_ALLFORTX', - MspidScopeAnyfortx: 'MSPID_SCOPE_ANYFORTX', - NetworkScopeAllfortx: 'NETWORK_SCOPE_ALLFORTX', - NetworkScopeAnyfortx: 'NETWORK_SCOPE_ANYFORTX' -} as const; - -export type DefaultEventHandlerStrategy = typeof DefaultEventHandlerStrategy[keyof typeof DefaultEventHandlerStrategy]; - - -/** - * - * @export - * @interface DeployContractGoSourceV1501Response - */ -export interface DeployContractGoSourceV1501Response { - /** - * - * @type {string} - * @memberof DeployContractGoSourceV1501Response - */ - 'message'?: string; -} -/** - * - * @export - * @interface DeployContractGoSourceV1Request - */ -export interface DeployContractGoSourceV1Request { - /** - * - * @type {string} - * @memberof DeployContractGoSourceV1Request - */ - 'policyDslSource': string; - /** - * The TLS root cert files that will be passed to the chaincode instantiation command. - * @type {string} - * @memberof DeployContractGoSourceV1Request - */ - 'tlsRootCertFiles': string; - /** - * The name of the Fabric channel where the contract will get instantiated. - * @type {string} - * @memberof DeployContractGoSourceV1Request - */ - 'channelId': string; - /** - * - * @type {Array} - * @memberof DeployContractGoSourceV1Request - */ - 'targetOrganizations': Array; - /** - * An array of peer addresses where the contract will be instantiated. Note that at present only the first item from this array will be used which is the behavior taken from the official Fabric samples repository and therefore it is assumed to be correct usage. - * @type {Array} - * @memberof DeployContractGoSourceV1Request - */ - 'targetPeerAddresses': Array; - /** - * - * @type {DeployContractGoSourceV1RequestConstructorArgs} - * @memberof DeployContractGoSourceV1Request - */ - 'constructorArgs'?: DeployContractGoSourceV1RequestConstructorArgs; - /** - * - * @type {string} - * @memberof DeployContractGoSourceV1Request - */ - 'chainCodeVersion': string; - /** - * - * @type {FileBase64} - * @memberof DeployContractGoSourceV1Request - */ - 'goSource': FileBase64; - /** - * - * @type {FileBase64} - * @memberof DeployContractGoSourceV1Request - */ - 'goMod'?: FileBase64; - /** - * The go module name that will be used for the go compilation process. - * @type {string} - * @memberof DeployContractGoSourceV1Request - */ - 'moduleName'?: string; - /** - * - * @type {Array} - * @memberof DeployContractGoSourceV1Request - */ - 'pinnedDeps'?: Array; - /** - * Indicates to the go chaincode compiler of Cactus if it should do an actual go compilation with the contact source or if it should just execute the go mod tidy command. - * @type {boolean} - * @memberof DeployContractGoSourceV1Request - */ - 'modTidyOnly'?: boolean | null; -} -/** - * - * @export - * @interface DeployContractGoSourceV1RequestConstructorArgs - */ -export interface DeployContractGoSourceV1RequestConstructorArgs { - /** - * - * @type {Array} - * @memberof DeployContractGoSourceV1RequestConstructorArgs - */ - 'Args'?: Array; -} -/** - * - * @export - * @interface DeployContractGoSourceV1Response - */ -export interface DeployContractGoSourceV1Response { - /** - * - * @type {boolean} - * @memberof DeployContractGoSourceV1Response - */ - 'success': boolean; - /** - * - * @type {Array} - * @memberof DeployContractGoSourceV1Response - */ - 'installationCommandResponses': Array; - /** - * - * @type {SSHExecCommandResponse} - * @memberof DeployContractGoSourceV1Response - */ - 'instantiationCommandResponse': SSHExecCommandResponse; -} -/** - * - * @export - * @interface DeployContractV1Request - */ -export interface DeployContractV1Request { - /** - * - * @type {ChainCodeProgrammingLanguage} - * @memberof DeployContractV1Request - */ - 'ccLang': ChainCodeProgrammingLanguage; - /** - * File-system path pointing at the CA file. - * @type {string} - * @memberof DeployContractV1Request - */ - 'caFile': string; - /** - * Ordering service endpoint specified as : - * @type {string} - * @memberof DeployContractV1Request - */ - 'orderer': string; - /** - * The hostname override to use when validating the TLS connection to the orderer - * @type {string} - * @memberof DeployContractV1Request - */ - 'ordererTLSHostnameOverride': string; - /** - * Timeout for client to connect (default 3s) - * @type {number} - * @memberof DeployContractV1Request - */ - 'connTimeout'?: number; - /** - * Passed in to the peer via the --signature-policy argument on the command line. See also: https://hyperledger-fabric.readthedocs.io/en/release-2.2/endorsement-policies.html#setting-chaincode-level-endorsement-policies - * @type {string} - * @memberof DeployContractV1Request - */ - 'signaturePolicy'?: string; - /** - * Name of the collections config file as present in the sourceFiles array of the request. - * @type {string} - * @memberof DeployContractV1Request - */ - 'collectionsConfigFile'?: string; - /** - * The name of the Fabric channel where the contract will get instantiated. - * @type {string} - * @memberof DeployContractV1Request - */ - 'channelId': string; - /** - * - * @type {Array} - * @memberof DeployContractV1Request - */ - 'targetOrganizations': Array; - /** - * - * @type {DeployContractGoSourceV1RequestConstructorArgs} - * @memberof DeployContractV1Request - */ - 'constructorArgs'?: DeployContractGoSourceV1RequestConstructorArgs; - /** - * - * @type {number} - * @memberof DeployContractV1Request - */ - 'ccSequence': number; - /** - * - * @type {string} - * @memberof DeployContractV1Request - */ - 'ccVersion': string; - /** - * - * @type {string} - * @memberof DeployContractV1Request - */ - 'ccName': string; - /** - * Human readable label to uniquely identify the contract. Recommended to include in this at least the contract name and the exact version in order to make it easily distinguishable from other deployments of the same contract. - * @type {string} - * @memberof DeployContractV1Request - */ - 'ccLabel': string; - /** - * The your-smart-contract.go file where the functionality of your contract is implemented. - * @type {Array} - * @memberof DeployContractV1Request - */ - 'sourceFiles': Array; -} - - -/** - * - * @export - * @interface DeployContractV1Response - */ -export interface DeployContractV1Response { - /** - * - * @type {boolean} - * @memberof DeployContractV1Response - */ - 'success': boolean; - /** - * - * @type {Array} - * @memberof DeployContractV1Response - */ - 'packageIds': Array; - /** - * - * @type {ChainCodeLifeCycleCommandResponses} - * @memberof DeployContractV1Response - */ - 'lifecycle': ChainCodeLifeCycleCommandResponses; -} -/** - * - * @export - * @interface DeploymentTargetOrgFabric2x - */ -export interface DeploymentTargetOrgFabric2x { - /** - * Transient map of arguments in JSON encoding - * @type {string} - * @memberof DeploymentTargetOrgFabric2x - */ - 'transient'?: string; - /** - * Mapped to environment variables of the Fabric CLI container. - * @type {string} - * @memberof DeploymentTargetOrgFabric2x - */ - 'CORE_PEER_LOCALMSPID': string; - /** - * Mapped to environment variables of the Fabric CLI container. - * @type {string} - * @memberof DeploymentTargetOrgFabric2x - */ - 'CORE_PEER_ADDRESS': string; - /** - * Mapped to environment variables of the Fabric CLI container. - * @type {string} - * @memberof DeploymentTargetOrgFabric2x - */ - 'CORE_PEER_MSPCONFIGPATH': string; - /** - * Mapped to environment variables of the Fabric CLI container. - * @type {string} - * @memberof DeploymentTargetOrgFabric2x - */ - 'CORE_PEER_TLS_ROOTCERT_FILE': string; - /** - * Mapped to environment variables of the Fabric CLI container. - * @type {string} - * @memberof DeploymentTargetOrgFabric2x - */ - 'ORDERER_TLS_ROOTCERT_FILE': string; -} -/** - * - * @export - * @interface DeploymentTargetOrganization - */ -export interface DeploymentTargetOrganization { - /** - * Mapped to environment variables of the Fabric CLI container. - * @type {string} - * @memberof DeploymentTargetOrganization - */ - 'CORE_PEER_LOCALMSPID': string; - /** - * Mapped to environment variables of the Fabric CLI container. - * @type {string} - * @memberof DeploymentTargetOrganization - */ - 'CORE_PEER_ADDRESS': string; - /** - * Mapped to environment variables of the Fabric CLI container. - * @type {string} - * @memberof DeploymentTargetOrganization - */ - 'CORE_PEER_MSPCONFIGPATH': string; - /** - * Mapped to environment variables of the Fabric CLI container. - * @type {string} - * @memberof DeploymentTargetOrganization - */ - 'CORE_PEER_TLS_ROOTCERT_FILE': string; - /** - * Mapped to environment variables of the Fabric CLI container. - * @type {string} - * @memberof DeploymentTargetOrganization - */ - 'ORDERER_TLS_ROOTCERT_FILE': string; -} -/** - * - * @export - * @interface ErrorExceptionResponseV1 - */ -export interface ErrorExceptionResponseV1 { - /** - * - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'message': string; - /** - * - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'error': string; -} -/** - * Combination of certificate and it\'s MSP ID used to identify fabric actors. - * @export - * @interface FabricCertificateIdentityV1 - */ -export interface FabricCertificateIdentityV1 { - /** - * - * @type {string} - * @memberof FabricCertificateIdentityV1 - */ - 'mspid': string; - /** - * - * @type {FabricX509CertificateV1} - * @memberof FabricCertificateIdentityV1 - */ - 'cert': FabricX509CertificateV1; -} -/** - * - * @export - * @enum {string} - */ - -export const FabricContractInvocationType = { - Send: 'FabricContractInvocationType.SEND', - Call: 'FabricContractInvocationType.CALL', - Sendprivate: 'FabricContractInvocationType.SENDPRIVATE' -} as const; - -export type FabricContractInvocationType = typeof FabricContractInvocationType[keyof typeof FabricContractInvocationType]; - - -/** - * - * @export - * @interface FabricSigningCredential - */ -export interface FabricSigningCredential { - /** - * - * @type {string} - * @memberof FabricSigningCredential - */ - 'keychainId': string; - /** - * - * @type {string} - * @memberof FabricSigningCredential - */ - 'keychainRef': string; - /** - * - * @type {FabricSigningCredentialType} - * @memberof FabricSigningCredential - */ - 'type'?: FabricSigningCredentialType; - /** - * - * @type {VaultTransitKey} - * @memberof FabricSigningCredential - */ - 'vaultTransitKey'?: VaultTransitKey; - /** - * - * @type {WebSocketKey} - * @memberof FabricSigningCredential - */ - 'webSocketKey'?: WebSocketKey; -} - - -/** - * different type of identity provider for singing fabric messages supported by this package - * @export - * @enum {string} - */ - -export const FabricSigningCredentialType = { - X509: 'X.509', - VaultX509: 'Vault-X.509', - WsX509: 'WS-X.509' -} as const; - -export type FabricSigningCredentialType = typeof FabricSigningCredentialType[keyof typeof FabricSigningCredentialType]; - - -/** - * Transaction endorser certificate object - * @export - * @interface FabricX509CertificateV1 - */ -export interface FabricX509CertificateV1 { - /** - * - * @type {string} - * @memberof FabricX509CertificateV1 - */ - 'issuer': string; - /** - * - * @type {string} - * @memberof FabricX509CertificateV1 - */ - 'serialNumber': string; - /** - * - * @type {string} - * @memberof FabricX509CertificateV1 - */ - 'subject': string; - /** - * - * @type {string} - * @memberof FabricX509CertificateV1 - */ - 'subjectAltName': string; - /** - * - * @type {string} - * @memberof FabricX509CertificateV1 - */ - 'validFrom': string; - /** - * - * @type {string} - * @memberof FabricX509CertificateV1 - */ - 'validTo': string; - /** - * - * @type {string} - * @memberof FabricX509CertificateV1 - */ - 'pem': string; -} -/** - * Represents a file-system file that has a name and a body which holds the file contents as a Base64 encoded string - * @export - * @interface FileBase64 - */ -export interface FileBase64 { - /** - * The file\'s contents encoded as a Base64 string. - * @type {string} - * @memberof FileBase64 - */ - 'body': string; - /** - * The name as referred to on a file system - * @type {string} - * @memberof FileBase64 - */ - 'filename': string; - /** - * The relative path of the file, if it should be placed in a sub-directory - * @type {string} - * @memberof FileBase64 - */ - 'filepath'?: string; -} -/** - * Transaction action returned from fabric block. - * @export - * @interface FullBlockTransactionActionV1 - */ -export interface FullBlockTransactionActionV1 { - /** - * - * @type {string} - * @memberof FullBlockTransactionActionV1 - */ - 'functionName': string; - /** - * - * @type {Array} - * @memberof FullBlockTransactionActionV1 - */ - 'functionArgs': Array; - /** - * - * @type {string} - * @memberof FullBlockTransactionActionV1 - */ - 'chaincodeId': string; - /** - * - * @type {FabricCertificateIdentityV1} - * @memberof FullBlockTransactionActionV1 - */ - 'creator': FabricCertificateIdentityV1; - /** - * - * @type {Array} - * @memberof FullBlockTransactionActionV1 - */ - 'endorsements': Array; -} -/** - * Transaction endorsment object returned from fabric block. - * @export - * @interface FullBlockTransactionEndorsementV1 - */ -export interface FullBlockTransactionEndorsementV1 { - /** - * - * @type {FabricCertificateIdentityV1} - * @memberof FullBlockTransactionEndorsementV1 - */ - 'signer': FabricCertificateIdentityV1; - /** - * - * @type {string} - * @memberof FullBlockTransactionEndorsementV1 - */ - 'signature': string; -} -/** - * Transaction returned from fabric block. - * @export - * @interface FullBlockTransactionEventV1 - */ -export interface FullBlockTransactionEventV1 { - /** - * - * @type {string} - * @memberof FullBlockTransactionEventV1 - */ - 'hash': string; - /** - * - * @type {string} - * @memberof FullBlockTransactionEventV1 - */ - 'channelId': string; - /** - * - * @type {string} - * @memberof FullBlockTransactionEventV1 - */ - 'timestamp': string; - /** - * - * @type {number} - * @memberof FullBlockTransactionEventV1 - */ - 'protocolVersion': number; - /** - * - * @type {string} - * @memberof FullBlockTransactionEventV1 - */ - 'transactionType': string; - /** - * - * @type {number} - * @memberof FullBlockTransactionEventV1 - */ - 'epoch': number; - /** - * - * @type {Array} - * @memberof FullBlockTransactionEventV1 - */ - 'actions': Array; -} -/** - * - * @export - * @interface GatewayDiscoveryOptions - */ -export interface GatewayDiscoveryOptions { - /** - * - * @type {boolean} - * @memberof GatewayDiscoveryOptions - */ - 'asLocalhost'?: boolean; - /** - * - * @type {boolean} - * @memberof GatewayDiscoveryOptions - */ - 'enabled'?: boolean; -} -/** - * - * @export - * @interface GatewayEventHandlerOptions - */ -export interface GatewayEventHandlerOptions { - /** - * - * @type {number} - * @memberof GatewayEventHandlerOptions - */ - 'commitTimeout'?: number; - /** - * - * @type {number} - * @memberof GatewayEventHandlerOptions - */ - 'endorseTimeout'?: number; - /** - * - * @type {DefaultEventHandlerStrategy} - * @memberof GatewayEventHandlerOptions - */ - 'strategy': DefaultEventHandlerStrategy; -} - - -/** - * - * @export - * @interface GatewayOptions - */ -export interface GatewayOptions { - /** - * - * @type {ConnectionProfile} - * @memberof GatewayOptions - */ - 'connectionProfile'?: ConnectionProfile; - /** - * - * @type {GatewayDiscoveryOptions} - * @memberof GatewayOptions - */ - 'discovery'?: GatewayDiscoveryOptions; - /** - * - * @type {GatewayEventHandlerOptions} - * @memberof GatewayOptions - */ - 'eventHandlerOptions'?: GatewayEventHandlerOptions; - /** - * - * @type {string} - * @memberof GatewayOptions - */ - 'identity': string; - /** - * - * @type {GatewayOptionsWallet} - * @memberof GatewayOptions - */ - 'wallet': GatewayOptionsWallet; -} -/** - * - * @export - * @interface GatewayOptionsWallet - */ -export interface GatewayOptionsWallet { - /** - * - * @type {FabricSigningCredential} - * @memberof GatewayOptionsWallet - */ - 'keychain'?: FabricSigningCredential; - /** - * - * @type {string} - * @memberof GatewayOptionsWallet - */ - 'json'?: string; -} -/** - * Request for GetBlock endpoint. - * @export - * @interface GetBlockRequestV1 - */ -export interface GetBlockRequestV1 { - /** - * Fabric channel which we want to query. - * @type {string} - * @memberof GetBlockRequestV1 - */ - 'channelName': string; - /** - * Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used - * @type {string} - * @memberof GetBlockRequestV1 - */ - 'connectionChannelName'?: string; - /** - * - * @type {GatewayOptions} - * @memberof GetBlockRequestV1 - */ - 'gatewayOptions': GatewayOptions; - /** - * - * @type {GetBlockRequestV1Query} - * @memberof GetBlockRequestV1 - */ - 'query': GetBlockRequestV1Query; - /** - * - * @type {GetBlockResponseTypeV1} - * @memberof GetBlockRequestV1 - */ - 'responseType'?: GetBlockResponseTypeV1; -} - - -/** - * Query selector, caller must provide at least one of them. First found will be used, rest will be ignored, so it\'s recommended to pass single selector. - * @export - * @interface GetBlockRequestV1Query - */ -export interface GetBlockRequestV1Query { - /** - * Select block by it\'s number. - * @type {string} - * @memberof GetBlockRequestV1Query - */ - 'blockNumber'?: string; - /** - * - * @type {GetBlockRequestV1QueryBlockHash} - * @memberof GetBlockRequestV1Query - */ - 'blockHash'?: GetBlockRequestV1QueryBlockHash; - /** - * Select block by id of transaction that it contains. - * @type {string} - * @memberof GetBlockRequestV1Query - */ - 'transactionId'?: string; -} -/** - * Select block by it\'s hash. - * @export - * @interface GetBlockRequestV1QueryBlockHash - */ -export interface GetBlockRequestV1QueryBlockHash { - /** - * NodeJS Buffer encoding (utf-8, hex, binary, base64, etc...). Passed directly to `Buffer.from()` call on hashBuffer. If not provided then JSON buffer format is assumed. - * @type {string} - * @memberof GetBlockRequestV1QueryBlockHash - */ - 'encoding'?: string; - /** - * Buffer of blockHash. It\'s encoding should be described in `encoding` parameter. - * @type {string} - * @memberof GetBlockRequestV1QueryBlockHash - */ - 'buffer': string; -} -/** - * When skipDecode is false (default) then decoded block object is returned. - * @export - * @interface GetBlockResponseDecodedV1 - */ -export interface GetBlockResponseDecodedV1 { - /** - * Full hyperledger fabric block data. - * @type {any} - * @memberof GetBlockResponseDecodedV1 - */ - 'decodedBlock': any; -} -/** - * When skipDecode is true then encoded block Buffer is returned. - * @export - * @interface GetBlockResponseEncodedV1 - */ -export interface GetBlockResponseEncodedV1 { - /** - * - * @type {string} - * @memberof GetBlockResponseEncodedV1 - */ - 'encodedBlock': string; -} -/** - * Response type from GetBlock. - * @export - * @enum {string} - */ - -export const GetBlockResponseTypeV1 = { - Full: 'full', - Encoded: 'encoded', - CactiTransactions: 'cacti:transactions', - CactiFullBlock: 'cacti:full-block' -} as const; - -export type GetBlockResponseTypeV1 = typeof GetBlockResponseTypeV1[keyof typeof GetBlockResponseTypeV1]; - - -/** - * @type GetBlockResponseV1 - * Response from GetBlock endpoint. - * @export - */ -export type GetBlockResponseV1 = CactiBlockFullResponseV1 | CactiBlockTransactionsResponseV1 | GetBlockResponseDecodedV1 | GetBlockResponseEncodedV1; - -/** - * Request for GetChainInfo endpoint. - * @export - * @interface GetChainInfoRequestV1 - */ -export interface GetChainInfoRequestV1 { - /** - * Fabric channel which we want to query. - * @type {string} - * @memberof GetChainInfoRequestV1 - */ - 'channelName': string; - /** - * Fabric channel we want to connect to. If not provided, then one from channelName parameter will be used - * @type {string} - * @memberof GetChainInfoRequestV1 - */ - 'connectionChannelName'?: string; - /** - * - * @type {GatewayOptions} - * @memberof GetChainInfoRequestV1 - */ - 'gatewayOptions': GatewayOptions; -} -/** - * Response from GetChainInfo endpoint. - * @export - * @interface GetChainInfoResponseV1 - */ -export interface GetChainInfoResponseV1 { - /** - * Current height of fabric ledger - * @type {number} - * @memberof GetChainInfoResponseV1 - */ - 'height': number; - /** - * Current block hash of fabric ledger - * @type {string} - * @memberof GetChainInfoResponseV1 - */ - 'currentBlockHash': string; - /** - * Previous block hash of fabric ledger - * @type {string} - * @memberof GetChainInfoResponseV1 - */ - 'previousBlockHash': string; -} -/** - * - * @export - * @interface GetTransactionReceiptResponse - */ -export interface GetTransactionReceiptResponse { - /** - * - * @type {string} - * @memberof GetTransactionReceiptResponse - */ - 'blockNumber'?: string; - /** - * - * @type {string} - * @memberof GetTransactionReceiptResponse - */ - 'channelID'?: string; - /** - * - * @type {TransactReceiptTransactionCreator} - * @memberof GetTransactionReceiptResponse - */ - 'transactionCreator'?: TransactReceiptTransactionCreator; - /** - * - * @type {Array} - * @memberof GetTransactionReceiptResponse - */ - 'transactionEndorsement'?: Array; - /** - * - * @type {TransactReceiptBlockMetaData} - * @memberof GetTransactionReceiptResponse - */ - 'blockMetaData'?: TransactReceiptBlockMetaData; - /** - * - * @type {string} - * @memberof GetTransactionReceiptResponse - */ - 'chainCodeName'?: string; - /** - * - * @type {string} - * @memberof GetTransactionReceiptResponse - */ - 'chainCodeVersion'?: string; - /** - * - * @type {string} - * @memberof GetTransactionReceiptResponse - */ - 'responseStatus'?: string; - /** - * - * @type {string} - * @memberof GetTransactionReceiptResponse - */ - 'rwsetKey'?: string; - /** - * - * @type {string} - * @memberof GetTransactionReceiptResponse - */ - 'rwsetWriteData'?: string; -} -/** - * - * @export - * @interface RunDelegatedSignTransactionRequest - */ -export interface RunDelegatedSignTransactionRequest { - /** - * An array of endorsing peers (name or url) for the transaction. - * @type {Array} - * @memberof RunDelegatedSignTransactionRequest - */ - 'endorsingPeers'?: Array; - /** - * An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction. - * @type {Array} - * @memberof RunDelegatedSignTransactionRequest - */ - 'endorsingOrgs'?: Array; - /** - * - * @type {object} - * @memberof RunDelegatedSignTransactionRequest - */ - 'transientData'?: object | null; - /** - * - * @type {string} - * @memberof RunDelegatedSignTransactionRequest - */ - 'signerCertificate': string; - /** - * - * @type {string} - * @memberof RunDelegatedSignTransactionRequest - */ - 'signerMspID': string; - /** - * Can be used to uniquely identify and authorize signing request - * @type {any} - * @memberof RunDelegatedSignTransactionRequest - */ - 'uniqueTransactionData'?: any; - /** - * - * @type {string} - * @memberof RunDelegatedSignTransactionRequest - */ - 'channelName': string; - /** - * - * @type {string} - * @memberof RunDelegatedSignTransactionRequest - */ - 'contractName': string; - /** - * - * @type {FabricContractInvocationType} - * @memberof RunDelegatedSignTransactionRequest - */ - 'invocationType': FabricContractInvocationType; - /** - * - * @type {string} - * @memberof RunDelegatedSignTransactionRequest - */ - 'methodName': string; - /** - * - * @type {Array} - * @memberof RunDelegatedSignTransactionRequest - */ - 'params': Array; - /** - * - * @type {RunTransactionResponseType} - * @memberof RunDelegatedSignTransactionRequest - */ - 'responseType'?: RunTransactionResponseType; -} - - -/** - * - * @export - * @interface RunTransactionRequest - */ -export interface RunTransactionRequest { - /** - * An array of endorsing peers (name or url) for the transaction. - * @type {Array} - * @memberof RunTransactionRequest - */ - 'endorsingPeers'?: Array; - /** - * An array of endorsing organizations (by mspID or issuer org name on certificate) for the transaction. - * @type {Array} - * @memberof RunTransactionRequest - */ - 'endorsingOrgs'?: Array; - /** - * - * @type {object} - * @memberof RunTransactionRequest - */ - 'transientData'?: object | null; - /** - * - * @type {GatewayOptions} - * @memberof RunTransactionRequest - */ - 'gatewayOptions'?: GatewayOptions; - /** - * - * @type {FabricSigningCredential} - * @memberof RunTransactionRequest - */ - 'signingCredential': FabricSigningCredential; - /** - * - * @type {string} - * @memberof RunTransactionRequest - */ - 'channelName': string; - /** - * - * @type {string} - * @memberof RunTransactionRequest - */ - 'contractName': string; - /** - * - * @type {FabricContractInvocationType} - * @memberof RunTransactionRequest - */ - 'invocationType': FabricContractInvocationType; - /** - * - * @type {string} - * @memberof RunTransactionRequest - */ - 'methodName': string; - /** - * - * @type {Array} - * @memberof RunTransactionRequest - */ - 'params': Array; - /** - * - * @type {RunTransactionResponseType} - * @memberof RunTransactionRequest - */ - 'responseType'?: RunTransactionResponseType; -} - - -/** - * - * @export - * @interface RunTransactionResponse - */ -export interface RunTransactionResponse { - /** - * - * @type {string} - * @memberof RunTransactionResponse - */ - 'functionOutput': string; - /** - * - * @type {string} - * @memberof RunTransactionResponse - */ - 'transactionId': string; -} -/** - * Response format from transaction / query execution - * @export - * @enum {string} - */ - -export const RunTransactionResponseType = { - JSON: 'org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.JSON', - UTF8: 'org.hyperledger.cacti.api.hlfabric.RunTransactionResponseType.UTF8' -} as const; - -export type RunTransactionResponseType = typeof RunTransactionResponseType[keyof typeof RunTransactionResponseType]; - - -/** - * - * @export - * @interface SSHExecCommandResponse - */ -export interface SSHExecCommandResponse { - /** - * - * @type {string} - * @memberof SSHExecCommandResponse - */ - 'stdout': string; - /** - * - * @type {string} - * @memberof SSHExecCommandResponse - */ - 'stderr': string; - /** - * - * @type {number} - * @memberof SSHExecCommandResponse - */ - 'code': number | null; - /** - * - * @type {string} - * @memberof SSHExecCommandResponse - */ - 'signal': string | null; -} -/** - * - * @export - * @interface TransactReceiptBlockMetaData - */ -export interface TransactReceiptBlockMetaData { - /** - * - * @type {string} - * @memberof TransactReceiptBlockMetaData - */ - 'mspid'?: string; - /** - * - * @type {string} - * @memberof TransactReceiptBlockMetaData - */ - 'blockCreatorID'?: string; - /** - * - * @type {string} - * @memberof TransactReceiptBlockMetaData - */ - 'signature'?: string; -} -/** - * - * @export - * @interface TransactReceiptTransactionCreator - */ -export interface TransactReceiptTransactionCreator { - /** - * - * @type {string} - * @memberof TransactReceiptTransactionCreator - */ - 'mspid'?: string; - /** - * - * @type {string} - * @memberof TransactReceiptTransactionCreator - */ - 'creatorID'?: string; -} -/** - * - * @export - * @interface TransactReceiptTransactionEndorsement - */ -export interface TransactReceiptTransactionEndorsement { - /** - * - * @type {string} - * @memberof TransactReceiptTransactionEndorsement - */ - 'mspid'?: string; - /** - * - * @type {string} - * @memberof TransactReceiptTransactionEndorsement - */ - 'endorserID'?: string; - /** - * - * @type {string} - * @memberof TransactReceiptTransactionEndorsement - */ - 'signature'?: string; -} -/** - * vault key details for signing fabric message with private key stored with transit engine. - * @export - * @interface VaultTransitKey - */ -export interface VaultTransitKey { - /** - * label of private key - * @type {string} - * @memberof VaultTransitKey - */ - 'keyName': string; - /** - * token for accessing private key - * @type {string} - * @memberof VaultTransitKey - */ - 'token': string; -} -/** - * Error response from WatchBlocks operation. - * @export - * @interface WatchBlocksCactusErrorResponseV1 - */ -export interface WatchBlocksCactusErrorResponseV1 { - /** - * Error code. - * @type {number} - * @memberof WatchBlocksCactusErrorResponseV1 - */ - 'code': number; - /** - * Description of the error. - * @type {string} - * @memberof WatchBlocksCactusErrorResponseV1 - */ - 'errorMessage': string; -} -/** - * Options passed when subscribing to block monitoring with delegated signing. - * @export - * @interface WatchBlocksDelegatedSignOptionsV1 - */ -export interface WatchBlocksDelegatedSignOptionsV1 { - /** - * - * @type {WatchBlocksListenerTypeV1} - * @memberof WatchBlocksDelegatedSignOptionsV1 - */ - 'type': WatchBlocksListenerTypeV1; - /** - * From which block start monitoring. Defaults to latest. - * @type {string} - * @memberof WatchBlocksDelegatedSignOptionsV1 - */ - 'startBlock'?: string; - /** - * - * @type {string} - * @memberof WatchBlocksDelegatedSignOptionsV1 - */ - 'channelName': string; - /** - * - * @type {string} - * @memberof WatchBlocksDelegatedSignOptionsV1 - */ - 'signerCertificate': string; - /** - * - * @type {string} - * @memberof WatchBlocksDelegatedSignOptionsV1 - */ - 'signerMspID': string; - /** - * Can be used to uniquely identify and authorize signing request - * @type {any} - * @memberof WatchBlocksDelegatedSignOptionsV1 - */ - 'uniqueTransactionData'?: any; -} - - -/** - * Response that corresponds to Fabric SDK \'filtered\' EventType. - * @export - * @interface WatchBlocksFilteredResponseV1 - */ -export interface WatchBlocksFilteredResponseV1 { - /** - * Filtered commited block. - * @type {any} - * @memberof WatchBlocksFilteredResponseV1 - */ - 'filteredBlock': any; -} -/** - * Response that corresponds to Fabric SDK \'full\' EventType. - * @export - * @interface WatchBlocksFullResponseV1 - */ -export interface WatchBlocksFullResponseV1 { - /** - * Full commited block. - * @type {any} - * @memberof WatchBlocksFullResponseV1 - */ - 'fullBlock': any; -} -/** - * Response type from WatchBlocks. \'Cacti*\' are custom views, others correspond to fabric SDK call. - * @export - * @enum {string} - */ - -export const WatchBlocksListenerTypeV1 = { - Filtered: 'filtered', - Full: 'full', - Private: 'private', - CactiTransactions: 'cacti:transactions', - CactiFullBlock: 'cacti:full-block' -} as const; - -export type WatchBlocksListenerTypeV1 = typeof WatchBlocksListenerTypeV1[keyof typeof WatchBlocksListenerTypeV1]; - - -/** - * Options passed when subscribing to block monitoring. - * @export - * @interface WatchBlocksOptionsV1 - */ -export interface WatchBlocksOptionsV1 { - /** - * Hyperledger Fabric channel to connect to. - * @type {string} - * @memberof WatchBlocksOptionsV1 - */ - 'channelName': string; - /** - * - * @type {GatewayOptions} - * @memberof WatchBlocksOptionsV1 - */ - 'gatewayOptions': GatewayOptions; - /** - * - * @type {WatchBlocksListenerTypeV1} - * @memberof WatchBlocksOptionsV1 - */ - 'type': WatchBlocksListenerTypeV1; - /** - * From which block start monitoring. Defaults to latest. - * @type {string} - * @memberof WatchBlocksOptionsV1 - */ - 'startBlock'?: string; -} - - -/** - * Response that corresponds to Fabric SDK \'private\' EventType. - * @export - * @interface WatchBlocksPrivateResponseV1 - */ -export interface WatchBlocksPrivateResponseV1 { - /** - * Private commited block. - * @type {any} - * @memberof WatchBlocksPrivateResponseV1 - */ - 'privateBlock': any; -} -/** - * @type WatchBlocksResponseV1 - * Response block from WatchBlocks endpoint. Depends on \'type\' passed in subscription options. - * @export - */ -export type WatchBlocksResponseV1 = CactiBlockFullResponseV1 | CactiBlockTransactionsResponseV1 | WatchBlocksCactusErrorResponseV1 | WatchBlocksFilteredResponseV1 | WatchBlocksFullResponseV1 | WatchBlocksPrivateResponseV1; - -/** - * Websocket requests for monitoring new blocks. - * @export - * @enum {string} - */ - -export const WatchBlocksV1 = { - Subscribe: 'org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Subscribe', - SubscribeDelegatedSign: 'org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.SubscribeDelegatedSign', - Next: 'org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Next', - Unsubscribe: 'org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Unsubscribe', - Error: 'org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Error', - Complete: 'org.hyperledger.cactus.api.async.hlfabric.WatchBlocksV1.Complete' -} as const; - -export type WatchBlocksV1 = typeof WatchBlocksV1[keyof typeof WatchBlocksV1]; - - -/** - * web-socket key details for signing fabric message with private key stored with external client - * @export - * @interface WebSocketKey - */ -export interface WebSocketKey { - /** - * session Id to access client - * @type {string} - * @memberof WebSocketKey - */ - 'sessionId': string; - /** - * signature of the session ID - * @type {string} - * @memberof WebSocketKey - */ - 'signature': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deploys a chaincode contract in the form of a go sources. - * @param {DeployContractGoSourceV1Request} [deployContractGoSourceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractGoSourceV1: async (deployContractGoSourceV1Request?: DeployContractGoSourceV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract-go-source`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deployContractGoSourceV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The \'v1\' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractV1: async (deployContractV1Request?: DeployContractV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/deploy-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deployContractV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get block from the channel using one of selectors from the input. Works only on Fabric 2.x. - * @param {GetBlockRequestV1} [getBlockRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBlockV1: async (getBlockRequestV1?: GetBlockRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getBlockRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get fabric ledger chain info. - * @param {GetChainInfoRequestV1} [getChainInfoRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getChainInfoV1: async (getChainInfoRequestV1?: GetChainInfoRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(getChainInfoRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary get a transaction receipt by tx id on a Fabric ledger. - * @param {RunTransactionRequest} runTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTransactionReceiptByTxIDV1: async (runTransactionRequest: RunTransactionRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'runTransactionRequest' is not null or undefined - assertParamExists('getTransactionReceiptByTxIDV1', 'runTransactionRequest', runTransactionRequest) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(runTransactionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Runs a transaction on a Fabric ledger using user-provided signing callback. - * @param {RunDelegatedSignTransactionRequest} runDelegatedSignTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runDelegatedSignTransactionV1: async (runDelegatedSignTransactionRequest: RunDelegatedSignTransactionRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'runDelegatedSignTransactionRequest' is not null or undefined - assertParamExists('runDelegatedSignTransactionV1', 'runDelegatedSignTransactionRequest', runDelegatedSignTransactionRequest) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(runDelegatedSignTransactionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Runs a transaction on a Fabric ledger. - * @param {RunTransactionRequest} runTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runTransactionV1: async (runTransactionRequest: RunTransactionRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'runTransactionRequest' is not null or undefined - assertParamExists('runTransactionV1', 'runTransactionRequest', runTransactionRequest) - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(runTransactionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deploys a chaincode contract in the form of a go sources. - * @param {DeployContractGoSourceV1Request} [deployContractGoSourceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deployContractGoSourceV1(deployContractGoSourceV1Request?: DeployContractGoSourceV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deployContractGoSourceV1(deployContractGoSourceV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The \'v1\' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deployContractV1(deployContractV1Request?: DeployContractV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deployContractV1(deployContractV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get block from the channel using one of selectors from the input. Works only on Fabric 2.x. - * @param {GetBlockRequestV1} [getBlockRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getBlockV1(getBlockRequestV1?: GetBlockRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getBlockV1(getBlockRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get fabric ledger chain info. - * @param {GetChainInfoRequestV1} [getChainInfoRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getChainInfoV1(getChainInfoRequestV1?: GetChainInfoRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getChainInfoV1(getChainInfoRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary get a transaction receipt by tx id on a Fabric ledger. - * @param {RunTransactionRequest} runTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTransactionReceiptByTxIDV1(runTransactionRequest: RunTransactionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTransactionReceiptByTxIDV1(runTransactionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Runs a transaction on a Fabric ledger using user-provided signing callback. - * @param {RunDelegatedSignTransactionRequest} runDelegatedSignTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async runDelegatedSignTransactionV1(runDelegatedSignTransactionRequest: RunDelegatedSignTransactionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.runDelegatedSignTransactionV1(runDelegatedSignTransactionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Runs a transaction on a Fabric ledger. - * @param {RunTransactionRequest} runTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async runTransactionV1(runTransactionRequest: RunTransactionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.runTransactionV1(runTransactionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deploys a chaincode contract in the form of a go sources. - * @param {DeployContractGoSourceV1Request} [deployContractGoSourceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractGoSourceV1(deployContractGoSourceV1Request?: DeployContractGoSourceV1Request, options?: any): AxiosPromise { - return localVarFp.deployContractGoSourceV1(deployContractGoSourceV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The \'v1\' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractV1(deployContractV1Request?: DeployContractV1Request, options?: any): AxiosPromise { - return localVarFp.deployContractV1(deployContractV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get block from the channel using one of selectors from the input. Works only on Fabric 2.x. - * @param {GetBlockRequestV1} [getBlockRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getBlockV1(getBlockRequestV1?: GetBlockRequestV1, options?: any): AxiosPromise { - return localVarFp.getBlockV1(getBlockRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get fabric ledger chain info. - * @param {GetChainInfoRequestV1} [getChainInfoRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getChainInfoV1(getChainInfoRequestV1?: GetChainInfoRequestV1, options?: any): AxiosPromise { - return localVarFp.getChainInfoV1(getChainInfoRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary get a transaction receipt by tx id on a Fabric ledger. - * @param {RunTransactionRequest} runTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTransactionReceiptByTxIDV1(runTransactionRequest: RunTransactionRequest, options?: any): AxiosPromise { - return localVarFp.getTransactionReceiptByTxIDV1(runTransactionRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Runs a transaction on a Fabric ledger using user-provided signing callback. - * @param {RunDelegatedSignTransactionRequest} runDelegatedSignTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runDelegatedSignTransactionV1(runDelegatedSignTransactionRequest: RunDelegatedSignTransactionRequest, options?: any): AxiosPromise { - return localVarFp.runDelegatedSignTransactionV1(runDelegatedSignTransactionRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Runs a transaction on a Fabric ledger. - * @param {RunTransactionRequest} runTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runTransactionV1(runTransactionRequest: RunTransactionRequest, options?: any): AxiosPromise { - return localVarFp.runTransactionV1(runTransactionRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deploys a chaincode contract in the form of a go sources. - * @param {DeployContractGoSourceV1Request} [deployContractGoSourceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deployContractGoSourceV1(deployContractGoSourceV1Request?: DeployContractGoSourceV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deployContractGoSourceV1(deployContractGoSourceV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Deploys a chaincode contract from a set of source files. Note: This endpoint only supports Fabric 2.x. The \'v1\' suffix in the method name refers to the Cactus API version, not the supported Fabric ledger version. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deployContractV1(deployContractV1Request?: DeployContractV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deployContractV1(deployContractV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get block from the channel using one of selectors from the input. Works only on Fabric 2.x. - * @param {GetBlockRequestV1} [getBlockRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getBlockV1(getBlockRequestV1?: GetBlockRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getBlockV1(getBlockRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get fabric ledger chain info. - * @param {GetChainInfoRequestV1} [getChainInfoRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getChainInfoV1(getChainInfoRequestV1?: GetChainInfoRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getChainInfoV1(getChainInfoRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary get a transaction receipt by tx id on a Fabric ledger. - * @param {RunTransactionRequest} runTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getTransactionReceiptByTxIDV1(runTransactionRequest: RunTransactionRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getTransactionReceiptByTxIDV1(runTransactionRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Runs a transaction on a Fabric ledger using user-provided signing callback. - * @param {RunDelegatedSignTransactionRequest} runDelegatedSignTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public runDelegatedSignTransactionV1(runDelegatedSignTransactionRequest: RunDelegatedSignTransactionRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).runDelegatedSignTransactionV1(runDelegatedSignTransactionRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Runs a transaction on a Fabric ledger. - * @param {RunTransactionRequest} runTransactionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public runTransactionV1(runTransactionRequest: RunTransactionRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).runTransactionV1(runTransactionRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 2c86ce5b52..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Fabric - * Can perform basic tasks on a fabric ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 0aaa3ee091..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Fabric - * Can perform basic tasks on a fabric ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 257d2b2e09..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Fabric - * Can perform basic tasks on a fabric ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 957a193ca4..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Fabric - * Can perform basic tasks on a fabric ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-block/cacti-block-formatters.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-block/cacti-block-formatters.ts deleted file mode 100644 index 4b03fb6d2a..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-block/cacti-block-formatters.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { BinaryLike, X509Certificate } from "node:crypto"; -import fabricProtos from "fabric-protos"; - -import { - LoggerProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; - -import { - CactiBlockFullResponseV1, - CactiBlockTransactionEventV1, - CactiBlockTransactionsResponseV1, - FabricX509CertificateV1, - FullBlockTransactionActionV1, - FullBlockTransactionEndorsementV1, - FullBlockTransactionEventV1, -} from "../generated/openapi/typescript-axios"; -import { fabricLongToNumber } from "../common/utils"; - -const level = "INFO"; -const label = "cacti-block-formatters"; -const log = LoggerProvider.getOrCreate({ level, label }); - -/** - * Convert certificate binary received from fabric ledger to object representation. - * - * @param certBuffer fabric X.509 certificate buffer - * - * @returns `FabricX509CertificateV1` - */ -function parseX509CertToObject( - certBuffer: BinaryLike, -): FabricX509CertificateV1 { - const cert = new X509Certificate(certBuffer); - - return { - serialNumber: cert.serialNumber, - subject: cert.subject, - issuer: cert.issuer, - subjectAltName: cert.subjectAltName ?? "", - validFrom: cert.validFrom, - validTo: cert.validTo, - pem: cert.toString(), - }; -} - -/** - * Extract full block summary from a fabric. More data can be added here in the future - * if there's a need for it. - * - * @param blockEvent full block event - * - * @returns parsed block data including transactions, actions, endorsements, signatures. - */ -export function formatCactiFullBlockResponse( - blockEvent: fabricProtos.common.IBlock, -): CactiBlockFullResponseV1 { - const transactionData = (blockEvent.data?.data ?? []) as any[]; - - const header = blockEvent.header; - if (!header) { - log.warn( - "Received block event without a header:", - JSON.stringify(blockEvent), - ); - } - const blockNumber = header ? fabricLongToNumber(header.number) : -1; - const blockHash = - "0x" + Buffer.from(blockEvent.header?.data_hash ?? "").toString("hex"); - const previousBlockHash = - "0x" + Buffer.from(blockEvent.header?.previous_hash ?? "").toString("hex"); - const transactionCount = transactionData.length; - - const transactions: FullBlockTransactionEventV1[] = []; - for (const data of transactionData) { - try { - const payload = data.payload; - const channelHeader = payload.header.channel_header; - const transaction = payload.data; - - const transactionActions: FullBlockTransactionActionV1[] = []; - for (const action of transaction.actions ?? []) { - const actionPayload = action.payload; - const proposalPayload = actionPayload.chaincode_proposal_payload; - const invocationSpec = proposalPayload.input; - const actionCreatorCert = parseX509CertToObject( - action.header.creator.id_bytes, - ); - const actionCreatorMspId = action.header.creator.mspid; - - // Decode args and function name - const rawArgs = invocationSpec.chaincode_spec.input.args as Buffer[]; - const decodedArgs = rawArgs.map((arg: Buffer) => arg.toString("utf8")); - const functionName = decodedArgs.shift() ?? ""; - const chaincodeId = invocationSpec.chaincode_spec.chaincode_id.name; - - const endorsements = actionPayload.action.endorsements.map((e: any) => { - return { - signer: { - mspid: e.endorser.mspid, - cert: parseX509CertToObject(e.endorser.id_bytes), - }, - signature: "0x" + Buffer.from(e.signature).toString("hex"), - } as FullBlockTransactionEndorsementV1; - }); - - transactionActions.push({ - functionName, - functionArgs: decodedArgs, - chaincodeId, - creator: { - mspid: actionCreatorMspId, - cert: actionCreatorCert, - }, - endorsements, - }); - } - - transactions.push({ - hash: channelHeader.tx_id, - channelId: channelHeader.channel_id, - timestamp: channelHeader.timestamp, - protocolVersion: channelHeader.version, - transactionType: channelHeader.typeString, - epoch: fabricLongToNumber(channelHeader.epoch), - actions: transactionActions, - }); - } catch (error) { - log.warn( - "Could not retrieve transaction from received block. Error:", - safeStringifyException(error), - ); - } - } - - return { - cactiFullEvents: { - blockNumber, - blockHash, - previousBlockHash, - transactionCount, - cactiTransactionsEvents: transactions, - }, - }; -} - -/** - * Extract transaction summary from a fabric block. - * - * @param blockEvent full block event - * - * @returns actions summary, including function name, args, and chaincode. - */ -export function formatCactiTransactionsBlockResponse( - blockEvent: fabricProtos.common.IBlock, -): CactiBlockTransactionsResponseV1 { - const transactionData = blockEvent.data?.data as any[]; - if (!transactionData) { - log.debug("Block transaction data empty - ignore..."); - return { - cactiTransactionsEvents: [], - }; - } - - const transactions: CactiBlockTransactionEventV1[] = []; - for (const data of transactionData) { - try { - const payload = data.payload; - const transaction = payload.data; - for (const action of transaction.actions) { - const actionPayload = action.payload; - const proposalPayload = actionPayload.chaincode_proposal_payload; - const invocationSpec = proposalPayload.input; - - // Decode args and function name - const rawArgs = invocationSpec.chaincode_spec.input.args as Buffer[]; - const decodedArgs = rawArgs.map((arg: Buffer) => arg.toString("utf8")); - const functionName = decodedArgs.shift() ?? ""; - - const chaincodeId = invocationSpec.chaincode_spec.chaincode_id.name; - const channelHeader = payload.header.channel_header; - const transactionId = channelHeader.tx_id; - - transactions.push({ - chaincodeId, - transactionId, - functionName, - functionArgs: decodedArgs, - }); - } - } catch (error) { - log.warn( - "Could not retrieve transaction from received block. Error:", - safeStringifyException(error), - ); - } - } - - return { - cactiTransactionsEvents: transactions, - }; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-block/get-block-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-block/get-block-endpoint-v1.ts deleted file mode 100644 index 6bb9aa1cf0..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-block/get-block-endpoint-v1.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorFabric } from "../plugin-ledger-connector-fabric"; -import OAS from "../../json/openapi.json"; - -export interface IGetBlockEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorFabric; -} - -export class GetBlockEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "GetBlockEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return GetBlockEndpointV1.CLASS_NAME; - } - - constructor(public readonly opts: IGetBlockEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} options.connector`); - - this.log = LoggerProvider.getOrCreate({ - label: "get-block-endpoint-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-block" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - const reqTag = `${verbUpper} ${this.getPath()}`; - this.log.debug(reqTag); - - try { - res.status(200).send(await this.opts.connector.getBlock(req.body)); - } catch (ex) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - await handleRestEndpointException({ - errorMsg, - log: this.log, - error: ex, - res, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-chain-info/get-chain-info-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-chain-info/get-chain-info-endpoint-v1.ts deleted file mode 100644 index 122439dde9..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-chain-info/get-chain-info-endpoint-v1.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorFabric } from "../plugin-ledger-connector-fabric"; -import OAS from "../../json/openapi.json"; - -export interface IGetChainInfoEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorFabric; -} - -export class GetChainInfoEndpointV1 implements IWebServiceEndpoint { - private readonly log: Logger; - - constructor(public readonly opts: IGetChainInfoEndpointV1Options) { - const fnTag = "GetChainInfoEndpointV1#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} options.connector`); - - this.log = LoggerProvider.getOrCreate({ - label: "get-chain-info-endpoint-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-chain-info" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetChainInfoEndpointV1#handleRequest()"; - this.log.debug(`POST ${this.getPath()}`); - - try { - res.status(200).send(await this.opts.connector.getChainInfo(req.body)); - } catch (error) { - const errorMsg = `Crash while serving ${fnTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-prometheus-exporter-metrics/get-prometheus-exporter-metrics-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-prometheus-exporter-metrics/get-prometheus-exporter-metrics-endpoint-v1.ts deleted file mode 100644 index 2834afb1b4..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-prometheus-exporter-metrics/get-prometheus-exporter-metrics-endpoint-v1.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import OAS from "../../json/openapi.json"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorFabric } from "../plugin-ledger-connector-fabric"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorFabric; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "GetPrometheusExporterMetricsEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return GetPrometheusExporterMetricsEndpointV1.CLASS_NAME; - } - - constructor( - public readonly opts: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} options.connector`); - - this.log = LoggerProvider.getOrCreate({ - label: "get-prometheus-exporter-metrics-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-prometheus-exporter-metrics" - ]; - } - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - const reqTag = `${verbUpper} ${this.getPath()}`; - this.log.debug(reqTag); - - try { - const resBody = await this.opts.connector.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - await handleRestEndpointException({ - errorMsg, - log: this.log, - error: ex, - res, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-transaction-receipt/get-transaction-receipt-by-txid-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-transaction-receipt/get-transaction-receipt-by-txid-endpoint-v1.ts deleted file mode 100644 index a384eee825..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/get-transaction-receipt/get-transaction-receipt-by-txid-endpoint-v1.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorFabric } from "../plugin-ledger-connector-fabric"; -import { RunTransactionRequest } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; - -export interface IRunTransactionEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorFabric; -} - -export class GetTransactionReceiptByTxIDEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "GetTransactionReceiptByTxIDEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return GetTransactionReceiptByTxIDEndpointV1.CLASS_NAME; - } - - constructor(public readonly opts: IRunTransactionEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} options.connector`); - - this.log = LoggerProvider.getOrCreate({ - label: "get-transaction-receipt-by-TxID-endpoint-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getOasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/get-transaction-receipt-by-txid" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - const reqTag = `${verbUpper} ${this.getPath()}`; - this.log.debug(reqTag); - - try { - const reqBody = req.body as RunTransactionRequest; - const resBody = - await this.opts.connector.getTransactionReceiptByTxID(reqBody); - res.status(200); - res.json(resBody); - } catch (ex) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - await handleRestEndpointException({ - errorMsg, - log: this.log, - error: ex, - res, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/identity-provider.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/identity-provider.ts deleted file mode 100644 index 7e1266370d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/identity-provider.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { IdentityProvider, IdentityData, Identity } from "fabric-network"; -import { FabricSigningCredentialType } from "../generated/openapi/typescript-axios/api"; -import { ICryptoSuite, User, Utils, ICryptoKey } from "fabric-common"; -import { - Checks, - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { Key } from "./internal/key"; -import { InternalCryptoSuite } from "./internal/crypto-suite"; -import { VaultTransitClient } from "./vault-client"; -import { WebSocketClient } from "./web-socket-client"; - -export interface IVaultConfig { - endpoint: string; - transitEngineMountPath: string; -} - -export interface IWebSocketConfig { - endpoint: string; - pathPrefix: string; - strictSSL?: boolean; -} - -export interface ISecureIdentityProvidersOptions { - activatedProviders: FabricSigningCredentialType[]; - logLevel: LogLevelDesc; - // vault server config - vaultConfig?: IVaultConfig; - webSocketConfig?: IWebSocketConfig; -} - -export interface IIdentity extends Identity { - type: FabricSigningCredentialType; - credentials: { - certificate: string; - key: ICryptoKey; - }; -} - -export interface VaultKey { - keyName: string; - token: string; -} - -export interface WebSocketKey { - sessionId: string; - signature: string; -} -export interface DefaultKey { - // pem encoded private key - private: string; -} - -// SecureIdentityProviders : a entry point class to various secure identity provider -// some of the function are just to support the interface provided by the fabric-sdk-node -export class SecureIdentityProviders implements IdentityProvider { - private readonly log: Logger; - public readonly className = "SecureIdentityProviders"; - private readonly defaultSuite: ICryptoSuite; - constructor(private readonly opts: ISecureIdentityProvidersOptions) { - const fnTag = `${this.className}#constructor`; - this.log = LoggerProvider.getOrCreate({ - level: opts.logLevel || "INFO", - label: this.className, - }); - if ( - opts.activatedProviders.includes(FabricSigningCredentialType.VaultX509) - ) { - if (!opts.vaultConfig) { - throw new Error(`${fnTag} require options.vaultConfig`); - } - Checks.nonBlankString( - opts.vaultConfig.endpoint, - `${fnTag} options.vaultConfig.endpoint`, - ); - Checks.nonBlankString( - opts.vaultConfig.transitEngineMountPath, - `${fnTag} options.vaultConfig.transitEngineMountPath`, - ); - this.log.debug(`${fnTag} Vault-X.509 identity provider activated`); - } - if (opts.activatedProviders.includes(FabricSigningCredentialType.WsX509)) { - if (!opts.webSocketConfig) { - throw new Error(`${fnTag} require options.webSocketConfig`); - } - this.log.debug( - `${fnTag} WS-X.509 identity provider for host ${opts.webSocketConfig?.endpoint}${opts.webSocketConfig?.pathPrefix}`, //`, - ); - } - this.defaultSuite = Utils.newCryptoSuite(); - } - - async getUserContext(identity: IIdentity, name: string): Promise { - const fnTag = `${this.className}#getUserContext`; - Checks.truthy(identity, `${fnTag} identity`); - if (!this.opts.activatedProviders.includes(identity.type)) { - throw new Error( - `${fnTag} identity type = ${identity.type} not activated`, - ); - } - Checks.truthy(identity.credentials, `${fnTag} identity.credentials`); - Checks.nonBlankString( - identity.credentials.certificate, - `${fnTag} identity.credentials.certificate`, - ); - Checks.truthy( - identity.credentials.key, - `${fnTag} identity.credentials.key`, - ); - const user = new User(name); - if (identity.type === FabricSigningCredentialType.X509) { - user.setCryptoSuite(this.defaultSuite); - } else { - user.setCryptoSuite(new InternalCryptoSuite()); - } - await user.setEnrollment( - identity.credentials.key, - identity.credentials.certificate, - identity.mspId, - ); - return user; - } - - getVaultKey(key: VaultKey): Key { - return new Key( - key.keyName, - new VaultTransitClient({ - endpoint: this.opts.vaultConfig?.endpoint as string, - mountPath: this.opts.vaultConfig?.transitEngineMountPath as string, - token: key.token, - logLevel: this.opts.logLevel, - }), - ); - } - getWebSocketKey(key: WebSocketKey): Key { - const client = new WebSocketClient({ - endpoint: this.opts.webSocketConfig?.endpoint as string, - pathPrefix: this.opts.webSocketConfig?.pathPrefix as string, - signature: key.signature, - sessionId: key.sessionId, - strictSSL: this.opts.webSocketConfig?.strictSSL, - logLevel: this.opts.logLevel, - }); - return new Key(`sessionId: ${key.sessionId}`, client); - } - - getDefaultKey(key: DefaultKey): ICryptoKey { - return this.defaultSuite.createKeyFromRaw(key.private); - } - // not required things - readonly type = ""; - getCryptoSuite(): ICryptoSuite { - throw new Error("SecureIdentityProviders::getCryptoSuite not required!!"); - } - fromJson(): Identity { - throw new Error("SecureIdentityProviders::fromJson not required!!"); - } - toJson(): IdentityData { - throw new Error("SecureIdentityProviders::toJso : not required!!"); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/cert-datastore.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/cert-datastore.ts deleted file mode 100644 index b09d9cfb52..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/cert-datastore.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { FabricSigningCredentialType } from "../../generated/openapi/typescript-axios/api"; - -// IIdentityData : data that will be stored with cert datastore -// with key as client's commonName (from X509 certificate) and value as following field -export interface IIdentityData { - type: FabricSigningCredentialType; - credentials: { - certificate: string; - // if identity type is IdentityProvidersType.Default - privateKey?: string; - }; - mspId: string; -} - -// sweet wrapper for managing client's certificate -// stored within multiple keychain registered to -// plugin registry -export class CertDatastore { - constructor(private readonly pluginRegistry: PluginRegistry) {} - async get(keychainId: string, keychainRef: string): Promise { - const keychain = this.pluginRegistry.findOneByKeychainId(keychainId); - return JSON.parse(await keychain.get(keychainRef)); - } - - async put( - keychainId: string, - keychainRef: string, - iData: IIdentityData, - ): Promise { - const keychain = this.pluginRegistry.findOneByKeychainId(keychainId); - await keychain.set(keychainRef, JSON.stringify(iData)); - } - - // TODO has - // TODO delete -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/client.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/client.ts deleted file mode 100644 index 27bd3f7e1f..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/client.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { KJUR } from "jsrsasign"; -import { ECCurveType } from "./crypto-util"; - -export interface ISignatureResponse { - sig: Buffer; - crv: ECCurveType; -} - -// class that all the identity provider should implement -export abstract class InternalIdentityClient { - /** - * @description send message digest to the client for it to be signed by the private key stored with the client - * @param keyName , label of the key - * @param digest : messages digest which need to signed (NOTE : digest will already be hashed) - * @returns asn1 encoded signature - */ - abstract sign(keyName: string, digest: Buffer): Promise; - - /** - * @description get the the public key from the client - * @param keyName for which public key should be returned - * @returns ECDSA key only p256 and p384 curve are supported - */ - abstract getPub(keyName: string): Promise; - - /** - * @description will rotate a given key - * @param keyName label of key that need to be rotated - */ - abstract rotateKey(keyName: string): Promise; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/crypto-suite.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/crypto-suite.ts deleted file mode 100644 index 40f7e4159c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/crypto-suite.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ICryptoSuite, ICryptoKey } from "fabric-common"; -import { createHash } from "crypto"; -import { Key } from "./key"; -import { Utils } from "fabric-common"; - -// InternalCryptoSuite : a class which will be implemented by identity provider -// some of the function are just to support the interface provided by the fabric-sdk-node -export class InternalCryptoSuite implements ICryptoSuite { - createKeyFromRaw(pem: string): ICryptoKey { - return Utils.newCryptoSuite().createKeyFromRaw(pem); - } - decrypt(): Buffer { - throw new Error("InternalCryptoSuite::decrypt : not required!!"); - } - deriveKey(): ICryptoKey { - throw new Error("InternalCryptoSuite::deriveKey : not required!!"); - } - encrypt(): Buffer { - throw new Error("InternalCryptoSuite::encrypt : not required!!"); - } - getKey(): Promise { - throw new Error("InternalCryptoSuite::getKey : not required!!"); - } - getKeySize(): number { - throw new Error("InternalCryptoSuite::getKeySize : not required!!"); - } - generateKey(): Promise { - throw new Error("InternalCryptoSuite::generateKey : not required!!"); - } - hash(msg: string): string { - return createHash("sha256").update(msg).digest("hex"); - } - importKey(): ICryptoKey | Promise { - throw new Error("InternalCryptoSuite::importKey : not required!!"); - } - setCryptoKeyStore(): void { - throw new Error("InternalCryptoSuite::setCryptoKeyStore : not required!!"); - } - async sign(key: Key, digest: Buffer): Promise { - return await key.sign(digest); - } - verify(): boolean { - throw new Error("InternalCryptoSuite::verify : not required!!"); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/crypto-util.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/crypto-util.ts deleted file mode 100644 index 0942be1478..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/crypto-util.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { createHash } from "crypto"; -import { KJUR } from "jsrsasign"; -import BN from "bn.js"; - -const csrNamespace = KJUR.asn1.csr as any; - -// hex encoded prime order of NIST P-256 curve -// more information at https://safecurves.cr.yp.to/base.html -const ecdsa = new KJUR.crypto.ECDSA({ curve: "NIST P-256" }); -const p256N = new BN(((ecdsa as any).ecparams.n as BigInteger).toString(), 10); -// hex encoded prime order of NIST P-384 curve -ecdsa.setNamedCurve("NIST P-384"); -const p384N = new BN(((ecdsa as any).ecparams.n as BigInteger).toString(), 10); - -export enum ECCurveType { - P256 = "p256", - P384 = "p384", -} - -// class with all static function -// provide crypto util to identity providers -export class CryptoUtil { - public static readonly className = "CryptoUtil"; - // convert asn1 encoded signature to a fabric understandable signature format - // more info at https://github.com/hyperledger/fabric-sdk-node/blob/b562ae4d7b8c690cd008c98ff24dfd3fb78ade81/fabric-common/lib/impl/bccsp_pkcs11.js#L39 - static encodeASN1Sig(sig: Buffer, curve: ECCurveType): Buffer { - const fnTag = `${CryptoUtil.className}#encodeASN1Sig`; - const pSig = (KJUR.crypto.ECDSA as any).parseSigHexInHexRS( - sig.toString("hex"), - ) as { r: string; s: string }; - const r = new BN(pSig.r, "hex"); - let s = new BN(pSig.s, "hex"); - let crv: BN; - switch (curve) { - case ECCurveType.P256: - crv = p256N; - break; - case ECCurveType.P384: - crv = p384N; - break; - default: - throw new Error(`${fnTag} invalid ec curve type`); - } - const halfOrder = crv.shrn(1); - if (s.cmp(halfOrder) === 1) { - const bigNum = crv as BN; - s = bigNum.sub(s); - } - const encodedSig = KJUR.crypto.ECDSA.hexRSSigToASN1Sig( - r.toString("hex"), - s.toString("hex"), - ); - return Buffer.from(encodedSig, "hex"); - } - - // create a csr information using public key and commonName - // return s csr object - static createCSR( - pub: KJUR.crypto.ECDSA, - commonName: string, - ): KJUR.asn1.csr.CertificationRequest { - return new csrNamespace.CertificationRequest({ - subject: { str: "/CN=" + commonName }, - sbjpubkey: pub, - sigalg: "SHA256withECDSA", - }); - } - - // return csr digest to e signed by a private key - // signature should be a asn1 der encoded - static getCSRDigest(csr: KJUR.asn1.csr.CertificationRequest): Buffer { - const csrInfo = new csrNamespace.CertificationRequestInfo( - (csr as any).params, - ); - return createHash("sha256").update(csrInfo.getEncodedHex(), "hex").digest(); - } - - // generate a pem encoded csr - static getPemCSR( - _csr: KJUR.asn1.csr.CertificationRequest, - signature: Buffer, - ): string { - const csr = _csr as any; - csr.params.sighex = signature.toString("hex"); - return csr.getPEM(); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/key.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/key.ts deleted file mode 100644 index c581c022e7..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/internal/key.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { ICryptoKey } from "fabric-common"; -import { InternalIdentityClient } from "./client"; -import { CryptoUtil } from "./crypto-util"; - -// internal class used by cryptoSuite, this is just to support interface provided by -// fabric-sdk-node -export class Key implements ICryptoKey { - constructor( - private readonly keyName: string, - private readonly client: InternalIdentityClient, - ) {} - async sign(digest: Buffer): Promise { - const { sig, crv } = await this.client.sign(this.keyName, digest); - return CryptoUtil.encodeASN1Sig(sig, crv); - } - - /** - * @description generate a csr - * @param commonName - * @returns pem encoded csr string - */ - async generateCSR(commonName: string): Promise { - const pub = await this.client.getPub(this.keyName); - const csr = CryptoUtil.createCSR(pub, commonName); - const digest = CryptoUtil.getCSRDigest(csr); - const { sig } = await this.client.sign(this.keyName, digest); - return CryptoUtil.getPemCSR(csr, sig); - } - - /** - * @description will rotate the key - */ - async rotate(): Promise { - await this.client.rotateKey(this.keyName); - } - getSKI(): string { - throw new Error("Key::getSKI not-required"); - } - getHandle(): string { - throw new Error("Key::getHandle not-required"); - } - isSymmetric(): boolean { - throw new Error("Key::isSymmetric not-required"); - } - isPrivate(): boolean { - throw new Error("Key::isPrivate not-required"); - } - getPublicKey(): ICryptoKey { - throw new Error("Key::getPublicKey not-required"); - } - toBytes(): string { - throw new Error("Key::toBytes not-required"); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/vault-client.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/vault-client.ts deleted file mode 100644 index e6f8ad60b2..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/vault-client.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import Vault, { client } from "node-vault"; -import { KJUR, KEYUTIL } from "jsrsasign"; -import { InternalIdentityClient, ISignatureResponse } from "./internal/client"; -import { ECCurveType } from "./internal/crypto-util"; - -export interface IVaultTransitClientOptions { - // full url of vault server - // eg : http://127.0.0.1:8200 - endpoint: string; - - // mountPath of transit secret engine - // eg : /transit - mountPath: string; - - // token of the client - token: string; - - logLevel?: LogLevelDesc; -} - -export class VaultTransitClient implements InternalIdentityClient { - public readonly className = "VaultTransitClient"; - private readonly log: Logger; - private readonly backend: client; - constructor(opts: IVaultTransitClientOptions) { - this.log = LoggerProvider.getOrCreate({ - label: "VaultTransitClient", - level: opts.logLevel || "INFO", - }); - this.backend = Vault({ - endpoint: opts.endpoint, - apiVersion: "v1", - token: opts.token, - pathPrefix: opts.mountPath, - }); - } - - /** - * @description send message digest to be signed by private key stored on vault - * @param digest : messages digest which need to signed - * @param preHashed : is digest already hashed - * @returns asn1 encoded signature - */ - async sign(keyName: string, digest: Buffer): Promise { - const fnTag = `${this.className}#sign`; - this.log.debug( - `${fnTag} sign with key = ${keyName} , digestSize = ${digest.length}`, - ); - const pub = await this.getPub(keyName); - let crv = ECCurveType.P256; - if ((pub as any).curveName === "secp384r1") { - crv = ECCurveType.P384; - } - const resp = await this.backend.write("sign/" + keyName, { - input: digest.toString("base64"), - prehashed: true, - marshaling_algorithm: "asn1", - }); - this.log.debug(`${fnTag} got response from vault : %o`, resp.data); - if (resp?.data?.signature) { - const base64Sig = (resp.data.signature as string).split(":")[2]; - return { - sig: Buffer.from(base64Sig, "base64"), - crv: crv, - }; - } - throw new Error(`invalid response from vault ${JSON.stringify(resp)}`); - } - - /** - * @description return public key of latest version - * @param keyName for which public key should be returned - * @returns pem encoded public key - */ - async getPub(keyName: string): Promise { - const fnTag = `${this.className}#getPub`; - this.log.debug(`${fnTag} keyName = ${keyName}`); - try { - const resp = await this.backend.read("keys/" + keyName); - this.log.debug(`${fnTag} Response from Vault: %o`, JSON.stringify(resp)); - if (resp?.data?.latest_version && resp?.data?.keys) { - if (!["ecdsa-p256", "ecdsa-p384"].includes(resp.data.type)) { - throw new Error(`${fnTag} key = ${keyName} has invalid key type`); - } - // resp.data.keys has array of all the version of the key - // latest version is used for signing - return KEYUTIL.getKey( - resp.data.keys[resp.data.latest_version].public_key, - ) as KJUR.crypto.ECDSA; - } - throw new Error( - `${fnTag} invalid response from vault ${JSON.stringify(resp)}`, - ); - } catch (error) { - if ((error as any).response?.statusCode === 404) { - throw new Error(`${fnTag} keyName = ${keyName} not found`); - } - throw error; - } - } - - /** - * @description will rotate a given key - * @param keyName label of key that need to be rotated - */ - async rotateKey(keyName: string): Promise { - const fnTag = `${this.className}#rotateKey`; - this.log.debug(`${fnTag} rotate the kew ${keyName}`); - await this.backend.write("keys/" + keyName + "/rotate", {}); - this.log.debug(`${fnTag} key = ${keyName} successfully rotated`); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts deleted file mode 100644 index 958d68fd1c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { KJUR, KEYUTIL } from "jsrsasign"; -import { InternalIdentityClient, ISignatureResponse } from "./internal/client"; -import { ECCurveType } from "./internal/crypto-util"; -import { WsIdentityClient } from "ws-identity-client"; - -export interface WSClientOptions { - // full url of web-socket identity server - // eg : http://127.0.0.1:8700 - endpoint: string; - - // pathPrefix for incoming web-socket connections - // eg : /sessions - pathPrefix: string; - - // websocket sessionId assigned to the client - sessionId: string; - // signature of the sessionId by the client - signature: string; - - logLevel?: LogLevelDesc; - strictSSL?: boolean; -} - -export class WebSocketClient implements InternalIdentityClient { - public readonly className = "WebSocketClient"; - private readonly log: Logger; - private readonly backend: WsIdentityClient; - private pubKeyEcdsa?: KJUR.crypto.ECDSA; - private curve?: ECCurveType; - - constructor(opts: WSClientOptions) { - this.log = LoggerProvider.getOrCreate({ - label: "WebSocketClient", - level: opts.logLevel || "INFO", - }); - this.backend = new WsIdentityClient({ - signature: opts.signature, - sessionId: opts.sessionId, - endpoint: opts.endpoint, - pathPrefix: opts.pathPrefix, - apiVersion: "v1", - rpDefaults: { - strictSSL: opts.strictSSL !== false, - }, - }); - } - - /** - * @description : sign message and return in a format that fabric understand - * @param keyName : required by the sign method of abstract InternalIdentityClient - * serves no role in the web-socket communication - * the client only knows that a web-socket connection has been established - * for a unique sessionId assigned to a given public key - * @param digest to be singed - */ - async sign(keyName: string, digest: Buffer): Promise { - const fnTag = `${this.className}#sign`; - this.log.debug( - `${fnTag} send digest for pub-key ${keyName}: digest-size = ${digest.length}`, - ); - const resp = await this.backend.write( - "sign", - { digest: digest.toString("base64") }, - {}, - ); - this.log.debug(`${fnTag} response from web-socket server : %o`, resp); - if (!this.curve) { - await this.getPub(keyName); - } - if (resp) { - return { - sig: Buffer.from(resp, "base64"), - crv: this.curve as ECCurveType, - }; - } - throw new Error( - `invalid response from ws-identity-client ${JSON.stringify(resp)}`, - ); - } - - /** - * @description return the pre-built ECDSA public key object - */ - async getPub(keyName: string): Promise { - const fnTag = `${this.className}#get-pub`; - try { - this.log.debug( - `${fnTag} return the ECDSA public key object of the connected client. ` + - `keyName (${keyName}) is required but not used here (client cannot access other keys)`, - ); - if (!this.pubKeyEcdsa) { - this.log.debug(`${fnTag} set the pub-key-ecdsa object for ${keyName}`); - const resp = await this.backend.read("get-pub", {}); - this.pubKeyEcdsa = KEYUTIL.getKey(resp) as KJUR.crypto.ECDSA; - this.curve = ECCurveType.P256; - if ((this.pubKeyEcdsa as any).curveName === "secp384r1") { - this.curve = ECCurveType.P384; - } - } - return this.pubKeyEcdsa as KJUR.crypto.ECDSA; - } catch (error) { - throw new Error( - `failed to retrieve pub-key-ecdsa from ws-identity server`, - ); - } - } - /** - * @description Rotate public used by client with keyName - * this method is inactive when using a web-socket client - * not authorized to request or change external keys - */ - async rotateKey(keyName: string): Promise { - const fnTag = `${this.className}#rotate-key`; - this.log.debug( - `${fnTag} inactive method for ${this.className}, provide key-name ${keyName} as abstract interface requirement`, - ); - throw new Error( - "web-socket client can not rotate private keys. External client must enroll with a new csr", - ); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/index.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/index.web.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/peer/i-query-committed-response.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/peer/i-query-committed-response.ts deleted file mode 100644 index a3e8661693..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/peer/i-query-committed-response.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * The response format of the JSON document output by the command below: - * ```sh - * peer lifecycle chaincode querycommitted --channelID=mychannel --output json - * ``` - * - * An example of said JSON document in action: - * ```json - * { - * "chaincode_definitions": [ - * { - * "name": "basic", - * "sequence": 1, - * "version": "1.0", - * "endorsement_plugin": "escc", - * "validation_plugin": "vscc", - * "validation_parameter": "EiAvQ2hhbm5lbC9BcHBsaWNhdGlvbi9FbmRvcnNlbWVudA==", - * "collections": {} - * }, - * { - * "name": "basic-asset-transfer", - * "sequence": 1, - * "version": "1.0.0", - * "endorsement_plugin": "escc", - * "validation_plugin": "vscc", - * "validation_parameter": "EiAvQ2hhbm5lbC9BcHBsaWNhdGlvbi9FbmRvcnNlbWVudA==", - * "collections": {} - * } - * ] - * } - * ``` - */ -export interface IQueryCommittedResponse { - chaincode_definitions: IChainCodeDefinition[]; -} - -export interface ICollections { - [key: string]: unknown; -} - -export interface IChainCodeDefinition { - name: string; - sequence: number; - version: string; - endorsement_plugin: string; - validation_plugin: string; - validation_parameter: string; - collections: ICollections; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/peer/i-query-installed-response.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/peer/i-query-installed-response.ts deleted file mode 100644 index 790fc56c87..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/peer/i-query-installed-response.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * The response format of the JSON document output by the command below: - * ```sh - * peer lifecycle chaincode queryinstalled --output json - * ``` - * - * An example of said JSON document in action: - * ```json - * { - * "installed_chaincodes": [ - * { - * "package_id": "basic_1.0:4ec191e793b27e953ff2ede5a8bcc63152cecb1e4c3f301a26e22692c61967ad", - * "label": "basic_1.0", - * "references": { - * "mychannel": { - * "chaincodes": [ - * { - * "name": "basic", - * "version": "1.0" - * } - * ] - * } - * } - * } - * ] - * } - * ``` - */ -export interface IQueryInstalledResponse { - installed_chaincodes: IInstalledChainCode[]; -} - -export interface IInstalledChainCode { - package_id: string; - label: string; - references: IReferences; -} - -export interface IReferences { - [key: string]: IChannel; -} - -export interface IChannel { - chaincodes: IChainCode[]; -} - -export interface IChainCode { - name: string; - version: string; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/peer/source-lang-to-runtime-lang.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/peer/source-lang-to-runtime-lang.ts deleted file mode 100644 index 1fd55ba155..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/peer/source-lang-to-runtime-lang.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - ChainCodeLanguageRuntime, - ChainCodeProgrammingLanguage, -} from "../generated/openapi/typescript-axios"; - -export function sourceLangToRuntimeLang( - srcLanguage: ChainCodeProgrammingLanguage, -): ChainCodeLanguageRuntime { - switch (srcLanguage) { - case ChainCodeProgrammingLanguage.Javascript: - case ChainCodeProgrammingLanguage.Typescript: - return ChainCodeLanguageRuntime.Node; - case ChainCodeProgrammingLanguage.Golang: - return ChainCodeLanguageRuntime.Golang; - case ChainCodeProgrammingLanguage.Java: - return ChainCodeLanguageRuntime.Java; - default: { - throw new Error(`Cannot map: ${srcLanguage} to runtime language.`); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-factory-ledger-connector.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-factory-ledger-connector.ts deleted file mode 100644 index 898bb37037..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, -} from "./plugin-ledger-connector-fabric"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorFabric, - IPluginLedgerConnectorFabricOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorFabricOptions, - ): Promise { - return new PluginLedgerConnectorFabric(pluginOptions); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts deleted file mode 100644 index b0f2fe0c07..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts +++ /dev/null @@ -1,1885 +0,0 @@ -import fs from "fs"; -import path from "path"; -import { v4 as uuidv4 } from "uuid"; -import { Certificate } from "@fidm/x509"; -import { Express } from "express"; -import { RuntimeError } from "run-time-error-cjs"; -import "multer"; -import temp from "temp"; -import { - NodeSSH, - Config as SshConfig, - SSHExecCommandOptions, - SSHExecCommandResponse, -} from "node-ssh"; -import type { - Server as SocketIoServer, - Socket as SocketIoSocket, -} from "socket.io"; -import { - DefaultEventHandlerOptions, - DefaultEventHandlerStrategies, - Gateway, - GatewayOptions as FabricGatewayOptions, - Wallets, - X509Identity, - TransientMap, - Wallet, -} from "fabric-network"; -import { - BuildProposalRequest, - Channel, - Client, - IdentityContext, - User, - Endorser, - ICryptoKey, -} from "fabric-common"; -// BlockDecoder is not exported in ts definition so we need to use legacy import. -const { BlockDecoder } = require("fabric-common"); -import fabricProtos from "fabric-protos"; - -import { - ConsensusAlgorithmFamily, - IPluginLedgerConnector, - IPluginWebService, - IWebServiceEndpoint, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; - -import { - consensusHasTransactionFinality, - PluginRegistry, -} from "@hyperledger/cactus-core"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import OAS from "../json/openapi.json"; - -import { - IRunTransactionEndpointV1Options, - RunTransactionEndpointV1, -} from "./run-transaction/run-transaction-endpoint-v1"; - -import { - IRunDelegatedSignTransactionEndpointV1Options, - RunDelegatedSignTransactionEndpointV1, -} from "./run-transaction/run-delegated-sign-transaction-endpoint-v1"; - -import { - IGetPrometheusExporterMetricsEndpointV1Options, - GetPrometheusExporterMetricsEndpointV1, -} from "./get-prometheus-exporter-metrics/get-prometheus-exporter-metrics-endpoint-v1"; - -import { WatchBlocksV1Endpoint } from "./watch-blocks/watch-blocks-v1-endpoint"; - -import { - ConnectionProfile, - GatewayDiscoveryOptions, - GatewayEventHandlerOptions, - DeployContractGoSourceV1Request, - DeployContractGoSourceV1Response, - DeployContractV1Request, - DeployContractV1Response, - FabricContractInvocationType, - RunTransactionRequest, - RunTransactionResponse, - ChainCodeProgrammingLanguage, - ChainCodeLifeCycleCommandResponses, - FabricSigningCredential, - DefaultEventHandlerStrategy, - FabricSigningCredentialType, - GetTransactionReceiptResponse, - GatewayOptions, - GetBlockRequestV1, - WatchBlocksV1, - WatchBlocksOptionsV1, - RunDelegatedSignTransactionRequest, - RunTransactionResponseType, - WatchBlocksDelegatedSignOptionsV1, - GetBlockResponseTypeV1, - GetBlockResponseV1, - GetChainInfoRequestV1, - GetChainInfoResponseV1, -} from "./generated/openapi/typescript-axios/index"; - -import { - DeployContractGoSourceEndpointV1, - IDeployContractGoSourceEndpointV1Options, -} from "./deploy-contract-go-source/deploy-contract-go-source-endpoint-v1"; - -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; -import { IQueryInstalledResponse } from "./peer/i-query-installed-response"; -import { IQueryCommittedResponse } from "./peer/i-query-committed-response"; -import { - DeployContractEndpointV1, - IDeployContractEndpointV1Options, -} from "./deploy-contract/deploy-contract-endpoint-v1"; -import { sourceLangToRuntimeLang } from "./peer/source-lang-to-runtime-lang"; -import FabricCAServices, { - IEnrollmentRequest, - IRegisterRequest, -} from "fabric-ca-client"; -import { createGateway } from "./common/create-gateway"; - -import { - IVaultConfig, - IWebSocketConfig, - SecureIdentityProviders, - IIdentity, -} from "./identity/identity-provider"; -import { - CertDatastore, - IIdentityData, -} from "./identity/internal/cert-datastore"; -import { GetTransactionReceiptByTxIDEndpointV1 } from "./get-transaction-receipt/get-transaction-receipt-by-txid-endpoint-v1"; -import { - getTransactionReceiptByTxID, - IGetTransactionReceiptByTxIDOptions, -} from "./common/get-transaction-receipt-by-tx-id"; -import { - formatCactiFullBlockResponse, - formatCactiTransactionsBlockResponse, -} from "./get-block/cacti-block-formatters"; -import { GetBlockEndpointV1 } from "./get-block/get-block-endpoint-v1"; -import { GetChainInfoEndpointV1 } from "./get-chain-info/get-chain-info-endpoint-v1"; -import { querySystemChainCode } from "./common/query-system-chain-code"; -import { isSshExecOk } from "./common/is-ssh-exec-ok"; -import { - asBuffer, - assertFabricFunctionIsAvailable, - fabricLongToNumber, -} from "./common/utils"; -import { findAndReplaceFabricLoggingSpec } from "./common/find-and-replace-fabric-logging-spec"; -import { deployContractGoSourceImplFabricV256 } from "./deploy-contract-go-source/deploy-contract-go-source-impl-fabric-v2-5-6"; - -const { loadFromConfig } = require("fabric-network/lib/impl/ccp/networkconfig"); -assertFabricFunctionIsAvailable(loadFromConfig, "loadFromConfig"); - -/** - * Constant value holding the default $GOPATH in the Fabric CLI container as - * observed on fabric deployments that are produced by the official examples - * found in the https://github.com/hyperledger/fabric-samples repository. - */ -export const K_DEFAULT_CLI_CONTAINER_GO_PATH = "/opt/gopath/"; - -/** - * The command that will be used to issue docker commands while controlling - * the Fabric CLI container and the peers. - */ -export const K_DEFAULT_DOCKER_BINARY = "docker"; - -export type SignPayloadCallback = ( - payload: Buffer, - txData: unknown, -) => Promise; - -export interface IPluginLedgerConnectorFabricOptions - extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - dockerBinary?: string; - peerBinary: string; - goBinary?: string; - cliContainerGoPath?: string; - cliContainerEnv: NodeJS.ProcessEnv; - pluginRegistry: PluginRegistry; - sshConfig: SshConfig; - readonly sshDebugOn?: boolean; - connectionProfile: ConnectionProfile; - prometheusExporter?: PrometheusExporter; - discoveryOptions?: GatewayDiscoveryOptions; - eventHandlerOptions?: GatewayEventHandlerOptions; - supportedIdentity?: FabricSigningCredentialType[]; - vaultConfig?: IVaultConfig; - webSocketConfig?: IWebSocketConfig; - signCallback?: SignPayloadCallback; -} - -export class PluginLedgerConnectorFabric - implements - IPluginLedgerConnector< - DeployContractV1Request, - DeployContractV1Response, - RunTransactionRequest, - RunTransactionResponse - >, - ICactusPlugin, - IPluginWebService -{ - public static readonly CLASS_NAME = "PluginLedgerConnectorFabric"; - private readonly instanceId: string; - private readonly log: Logger; - private readonly dockerBinary: string; - private readonly peerBinary: string; - private readonly goBinary: string; - private readonly cliContainerGoPath: string; - public prometheusExporter: PrometheusExporter; - private endpoints: IWebServiceEndpoint[] | undefined; - private readonly secureIdentity: SecureIdentityProviders; - private readonly certStore: CertDatastore; - private readonly sshDebugOn: boolean; - private runningWatchBlocksMonitors = new Set(); - - public get className(): string { - return PluginLedgerConnectorFabric.CLASS_NAME; - } - - /** - * Callback used to sign fabric requests in methods that use delegated sign. - */ - public signCallback: SignPayloadCallback | undefined; - - constructor(public readonly opts: IPluginLedgerConnectorFabricOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); - Checks.truthy(opts.peerBinary, `${fnTag} options.peerBinary`); - Checks.truthy(opts.pluginRegistry, `${fnTag} options.pluginRegistry`); - Checks.truthy(opts.connectionProfile, `${fnTag} options.connectionProfile`); - this.prometheusExporter = - opts.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - this.dockerBinary = opts.dockerBinary || K_DEFAULT_DOCKER_BINARY; - Checks.truthy(this.dockerBinary != null, `${fnTag}:dockerBinary`); - - this.cliContainerGoPath = - opts.cliContainerGoPath || K_DEFAULT_CLI_CONTAINER_GO_PATH; - Checks.nonBlankString( - this.cliContainerGoPath, - `${fnTag}:cliContainerGoPath`, - ); - - this.goBinary = opts.goBinary || "go"; - this.peerBinary = opts.peerBinary; - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.instanceId = opts.instanceId; - this.prometheusExporter.startMetricsCollection(); - // default is supported if supportedIdentity is empty - this.secureIdentity = new SecureIdentityProviders({ - activatedProviders: opts.supportedIdentity || [ - FabricSigningCredentialType.X509, - ], - logLevel: opts.logLevel || "INFO", - vaultConfig: opts.vaultConfig, - webSocketConfig: opts.webSocketConfig, - }); - this.certStore = new CertDatastore(opts.pluginRegistry); - - this.sshDebugOn = opts.sshDebugOn === true; - if (this.sshDebugOn) { - this.opts.sshConfig = this.enableSshDebugLogs(this.opts.sshConfig); - } - - this.signCallback = opts.signCallback; - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public async shutdown(): Promise { - this.runningWatchBlocksMonitors.forEach((m) => m.close()); - this.runningWatchBlocksMonitors.clear(); - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-ledger-connector-fabric`; - } - - public async onPluginInit(): Promise { - return; - } - - public async getConsensusAlgorithmFamily(): Promise { - return ConsensusAlgorithmFamily.Authority; - } - public async hasTransactionFinality(): Promise { - const currentConsensusAlgorithmFamily = - await this.getConsensusAlgorithmFamily(); - - return consensusHasTransactionFinality(currentConsensusAlgorithmFamily); - } - - private enableSshDebugLogs(cfg: SshConfig): SshConfig { - const fnTag = `${this.className}#decorateSshConfigWithLogger()`; - Checks.truthy(cfg, `${fnTag} cfg must be truthy.`); - return { - ...cfg, - debug: (msg: unknown) => this.log.debug(`[NodeSSH] %o`, msg), - }; - } - - private async sshExec( - cmd: string, - label: string, - ssh: NodeSSH, - sshCmdOptions: SSHExecCommandOptions, - ): Promise { - this.log.debug(`${label} CMD: ${cmd}`); - const cmdRes = await ssh.execCommand(cmd, sshCmdOptions); - this.log.debug(`${label} CMD Response .code: %o`, cmdRes.code); - this.log.debug(`${label} CMD Response .signal: %o`, cmdRes.signal); - this.log.debug(`${label} CMD Response .stderr: %s`, cmdRes.stderr); - this.log.debug(`${label} CMD Response .stdout: %s`, cmdRes.stdout); - if (cmdRes.code !== null && cmdRes.code !== 0) { - throw new RuntimeError(`Expected ${label} cmdRes.code as null or 0`); - } - return cmdRes; - } - - /** - * @param req The object containing all the necessary metadata and parameters - * in order to have the contract deployed. - */ - public async deployContract( - req: DeployContractV1Request, - ): Promise { - const fnTag = `${this.className}#deployContract()`; - const { log, opts } = this; - - const ssh = new NodeSSH(); - this.log.debug(`${fnTag} Establishing SSH connection to peer...`); - await ssh.connect(opts.sshConfig); - this.log.debug(`${fnTag} Established SSH connection to peer OK.`); - - if (req.collectionsConfigFile) { - log.debug(`Has private data collection definition`); - } - try { - const { - sourceFiles, - ccName, - ccLabel, - ccVersion, - ccLang, - targetOrganizations, - caFile, - ccSequence, - channelId, - orderer, - ordererTLSHostnameOverride, - collectionsConfigFile, - connTimeout, - constructorArgs, - signaturePolicy, - } = req; - - Checks.truthy(sourceFiles, `${fnTag}:sourceFiles`); - Checks.truthy(Array.isArray(sourceFiles), `${fnTag}:sourceFiles array`); - - let signaturePolicyCliArg = " "; - if (signaturePolicy) { - signaturePolicyCliArg = ` --signature-policy=${signaturePolicy} `; - } - - let connTimeoutCliArg = " "; - if (connTimeout) { - connTimeoutCliArg = ` --connTimeout=${connTimeout}s `; - } - - let initRequiredCliArg = " "; - if (constructorArgs) { - initRequiredCliArg = ` --init-required `; - } - - temp.track(); - const tmpDirPrefix = `hyperledger-cacti-${this.className}`; - const tmpDirPath = temp.mkdirSync(tmpDirPrefix); - - const remoteDirPath = path.join(this.cliContainerGoPath, "src/", ccLabel); - log.debug(`Remote dir path on CLI container: ${remoteDirPath}`); - - let collectionsConfigFileCliArg = " "; - if (collectionsConfigFile) { - const remoteFilePath = path.join(remoteDirPath, collectionsConfigFile); - this.log.debug(`Collections config: ${remoteFilePath}`); - collectionsConfigFileCliArg = `--collections-config ${remoteFilePath} `; - } - - const sshCmdOptions: SSHExecCommandOptions = { - execOptions: { - pty: true, // FIXME do we need this? probably not... same for env - env: { - // just in case go modules would be otherwise disabled - GO111MODULE: "on", - FABRIC_LOGGING_SPEC: "DEBUG", - }, - }, - cwd: remoteDirPath, - }; - - const dockerExecEnv = Object.entries(this.opts.cliContainerEnv) - .map(([key, value]) => `--env ${key}=${value}`) - .join(" "); - - const { dockerBinary } = this; - const dockerBuildCmd = - `${dockerBinary} exec ` + - dockerExecEnv + - ` --env GO111MODULE=on` + - ` --workdir=${remoteDirPath}` + - ` cli `; - - // Need to make sure that the logging is turned off otherwise it - // mangles the JSON syntax and makes the output invalid... - const dockerBuildCmdInfoLog = findAndReplaceFabricLoggingSpec( - dockerBuildCmd, - "ERROR", - ); - - for (const sourceFile of sourceFiles) { - const { filename, filepath, body } = sourceFile; - const relativePath = filepath || "./"; - const subDirPath = path.join(tmpDirPath, relativePath); - fs.mkdirSync(subDirPath, { recursive: true }); - const localFilePath = path.join(subDirPath, filename); - fs.writeFileSync(localFilePath, body, "base64"); - } - - log.debug(`SCP from/to %o => %o`, tmpDirPath, remoteDirPath); - await ssh.putDirectory(tmpDirPath, remoteDirPath, { concurrency: 1 }); - log.debug(`SCP OK %o`, remoteDirPath); - - if (ccLang === ChainCodeProgrammingLanguage.Golang) { - { - const label = "docker copy go code to cli container"; - const cliRemoteDirPath = path.join(remoteDirPath, "../"); - const cmd = `${dockerBinary} cp ${remoteDirPath} cli:${cliRemoteDirPath}`; - await this.sshExec(cmd, label, ssh, sshCmdOptions); - } - - { - const label = "go mod vendor"; - const cmd = `${dockerBuildCmd} go mod vendor`; - await this.sshExec(cmd, label, ssh, sshCmdOptions); - } - } else if (ccLang === ChainCodeProgrammingLanguage.Typescript) { - { - const cmd = `npm install`; - const label = "ChainCode: Typescript install dependencies"; - await this.sshExec(cmd, label, ssh, sshCmdOptions); - } - { - const cmd = `npm run build`; - const label = "ChainCode: Typescript build"; - await this.sshExec(cmd, label, ssh, sshCmdOptions); - } - { - const label = "docker copy compiled TS code to cli container"; - const cliRemoteDirPath = path.join(remoteDirPath, "../"); - const cmd = `${dockerBinary} cp ${remoteDirPath} cli:${cliRemoteDirPath}`; - await this.sshExec(cmd, label, ssh, sshCmdOptions); - } - } else if (ccLang === ChainCodeProgrammingLanguage.Javascript) { - { - const label = "docker copy JS code to cli container"; - const cliRemoteDirPath = path.join(remoteDirPath, "../"); - const cmd = `${dockerBinary} cp ${remoteDirPath} cli:${cliRemoteDirPath}`; - await this.sshExec(cmd, label, ssh, sshCmdOptions); - } - } - - const lifecycle: ChainCodeLifeCycleCommandResponses = { - approveForMyOrgList: [], - installList: [], - queryInstalledList: [], - }; - const packageIds: string[] = []; - - // Commands executed here are based on the deployCC.sh script in the fabric-samples - // repository - // https://github.com/hyperledger/fabric-samples/blob/14dc7e13160ef1b7332bafb01f8ffa865116f9e7/test-network/scripts/deployCC.sh - { - const runtimeLang = sourceLangToRuntimeLang(ccLang); - const cmd = - `${dockerBuildCmd} peer lifecycle chaincode package ${ccName}.tar.gz ` + - ` --path ${remoteDirPath} ` + - ` --label ${ccLabel} ` + - ` --lang ${runtimeLang}`; - - const cmdLabel = `packaging chain code`; - const res = await this.sshExec(cmd, cmdLabel, ssh, sshCmdOptions); - lifecycle.packaging = res; - } - - // https://github.com/hyperledger/fabric-samples/blob/release-1.4/fabcar/startFabric.sh - for (const org of targetOrganizations) { - const dockerExecEnv = Object.entries(org) - .map(([key, val]) => `--env ${key}=${val}`) - .join(" "); - - const dockerBuildCmd = - `${dockerBinary} exec ` + - dockerExecEnv + - ` --env GO111MODULE=on` + - ` --workdir=${remoteDirPath}` + - ` cli `; - - const cmd = - `${dockerBuildCmd} peer lifecycle chaincode install ${ccName}.tar.gz ` + - ` ${connTimeoutCliArg} `; - const label = `Install ChainCode in ${org.CORE_PEER_LOCALMSPID}`; - const res = await this.sshExec(cmd, label, ssh, sshCmdOptions); - lifecycle.installList.push(res); - - let packageId: string; - { - const cmd = `${dockerBuildCmdInfoLog} peer lifecycle chaincode queryinstalled --output json`; - const label = `query installed contracts CMD`; - const res = await this.sshExec(cmd, label, ssh, sshCmdOptions); - lifecycle.queryInstalledList.push(res); - - Checks.truthy(res.stdout.includes(ccLabel)); - const json = res.stdout; - const qir = JSON.parse(json) as IQueryInstalledResponse; - const icc = qir.installed_chaincodes.find( - (chainCode) => chainCode.label === ccLabel, - ); - this.log.debug(`Parsed list of installed contracts: %o`, qir); - Checks.truthy(icc, "No installed chaincode with label: %o", ccLabel); - if (!icc?.package_id) { - throw new Error(`${fnTag}: package ID falsy. Something's wrong.`); - } - packageId = icc?.package_id; - this.log.debug(`Found package ID: ${packageId}`); - packageIds.push(packageId); - } - { - const cmd = - ` ${dockerBuildCmd} peer lifecycle chaincode approveformyorg ` + - `--orderer ${orderer} ` + - `--ordererTLSHostnameOverride ${ordererTLSHostnameOverride} ` + - `--tls ` + - `--cafile ${caFile} ` + - `--channelID ${channelId} ` + - `--name ${ccName} ` + - `--version ${ccVersion} ` + - `--package-id ${packageId} ` + - `--sequence ${ccSequence} ` + - ` ${signaturePolicyCliArg} ` + - ` ${collectionsConfigFileCliArg} ` + - ` ${initRequiredCliArg} ` + - ` ${connTimeoutCliArg} `; - - const cmdLabel = `Install ChainCode in ${org.CORE_PEER_LOCALMSPID}`; - - const res = await this.sshExec(cmd, cmdLabel, ssh, sshCmdOptions); - lifecycle.approveForMyOrgList.push(res); - } - } - - let success = true; - const commitCmd = - `${dockerBuildCmd} peer lifecycle chaincode commit ` + - // ` --ctor '${ctorArgsJson}' ` + - ` --name ${ccName} ` + - ` --version ${ccVersion} ` + - ` --channelID ${channelId} ` + - ` --orderer ${orderer} ` + - ` --ordererTLSHostnameOverride ${ordererTLSHostnameOverride} ` + - ` --tls ` + - ` --cafile ${caFile} ` + - ` --peerAddresses ${targetOrganizations[0].CORE_PEER_ADDRESS} ` + - ` --tlsRootCertFiles ${targetOrganizations[0].CORE_PEER_TLS_ROOTCERT_FILE}` + - ` --peerAddresses ${targetOrganizations[1].CORE_PEER_ADDRESS} ` + - ` --tlsRootCertFiles ${targetOrganizations[1].CORE_PEER_TLS_ROOTCERT_FILE}` + - ` --sequence=${ccSequence} ` + - ` ${initRequiredCliArg} ` + - ` ${connTimeoutCliArg} ` + - ` ${collectionsConfigFileCliArg} ` + - ` ${signaturePolicyCliArg} `; - - { - const res = await this.sshExec(commitCmd, "Commit", ssh, sshCmdOptions); - lifecycle.commit = res; - success = success && isSshExecOk(res); - } - - { - const cmd = `${dockerBuildCmdInfoLog} peer lifecycle chaincode querycommitted --channelID=${channelId} --output json`; - const label = `query committed contracts`; - const res = await this.sshExec(cmd, label, ssh, sshCmdOptions); - lifecycle.queryCommitted = res; - - Checks.truthy(res.stdout.includes(ccName), "stdout has contract name"); - const json = res.stdout; - const qcr = JSON.parse(json) as IQueryCommittedResponse; - const ccd = qcr.chaincode_definitions.find( - (ccd) => ccd.name === ccName && ccd.version === ccVersion, - ); - - this.log.debug(`Parsed list of installed contracts: %o`, qcr); - Checks.truthy(ccd, "No installed chaincode with label: %o", ccLabel); - } - - log.debug(`EXIT doDeploy()`); - const res: DeployContractV1Response = { - success, - packageIds, - lifecycle, - }; - return res; - } finally { - try { - ssh.dispose(); - } finally { - temp.cleanup(); - } - } - } - - /** - * @param req The object containing all the necessary metadata and parameters - * in order to have the contract deployed. - */ - public async deployContractGoSourceV1( - req: DeployContractGoSourceV1Request, - ): Promise { - const { log } = this; - const ctx = { - log, - opts: this.opts, - dockerBinary: this.dockerBinary, - className: this.className, - }; - return deployContractGoSourceImplFabricV256(ctx, req); - } - - /** - * Register WatchBlocksV1 endpoint, will be triggered in response to - * dedicated socketio request. - * - * Adds and removes monitors from `this.runningWatchBlocksMonitors`. - * - * @param socket connected client socket. - * @returns socket from argument. - */ - private registerWatchBlocksSocketIOEndpoint( - socket: SocketIoSocket, - ): SocketIoSocket { - this.log.debug("Register WatchBlocks.Subscribe handler."); - - socket.on( - WatchBlocksV1.Subscribe, - async (options: WatchBlocksOptionsV1) => { - // Start monitoring - const monitor = new WatchBlocksV1Endpoint({ - socket, - logLevel: this.opts.logLevel, - }); - this.runningWatchBlocksMonitors.add(monitor); - await monitor.subscribe( - options, - await this.createGatewayWithOptions(options.gatewayOptions), - ); - this.log.debug( - "Running monitors count:", - this.runningWatchBlocksMonitors.size, - ); - - socket.on("disconnect", () => { - this.runningWatchBlocksMonitors.delete(monitor); - this.log.debug( - "Running monitors count:", - this.runningWatchBlocksMonitors.size, - ); - }); - }, - ); - - socket.on( - WatchBlocksV1.SubscribeDelegatedSign, - async (options: WatchBlocksDelegatedSignOptionsV1) => { - if (!this.signCallback) { - socket.emit(WatchBlocksV1.Error, { - code: 500, - errorMessage: - "WatchBlocksDelegatedSignOptionsV1 called but signCallback is missing!", - }); - return; - } - - // Start monitoring - const monitor = new WatchBlocksV1Endpoint({ - socket, - logLevel: this.opts.logLevel, - }); - this.runningWatchBlocksMonitors.add(monitor); - - const { channel, userIdCtx } = await this.getFabricClientWithoutSigner( - options.channelName, - options.signerCertificate, - options.signerMspID, - options.uniqueTransactionData, - ); - - await monitor.SubscribeDelegatedSign( - options, - channel, - userIdCtx, - this.signCallback.bind(this), - ); - this.log.debug( - "Running monitors count:", - this.runningWatchBlocksMonitors.size, - ); - - socket.on("disconnect", () => { - this.runningWatchBlocksMonitors.delete(monitor); - this.log.debug( - "Running monitors count:", - this.runningWatchBlocksMonitors.size, - ); - }); - }, - ); - - return socket; - } - - /** - * Register HTTP and SocketIO service endpoints. - * - * @param app express server. - * @param wsApi socketio server. - * @returns list of http endpoints. - */ - async registerWebServices( - app: Express, - wsApi?: SocketIoServer, - ): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - - if (wsApi) { - wsApi.on("connection", (socket: SocketIoSocket) => { - this.log.debug(`New Socket connected. ID=${socket.id}`); - this.registerWatchBlocksSocketIOEndpoint(socket); - }); - } - - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const { log } = this; - - log.info(`Installing web services for plugin ${this.getPackageName()}...`); - - const endpoints: IWebServiceEndpoint[] = []; - - { - const opts: IDeployContractGoSourceEndpointV1Options = { - connector: this, - logLevel: this.opts.logLevel, - }; - const endpoint = new DeployContractGoSourceEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const opts: IDeployContractEndpointV1Options = { - connector: this, - logLevel: this.opts.logLevel, - }; - const endpoint = new DeployContractEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const opts: IRunTransactionEndpointV1Options = { - connector: this, - logLevel: this.opts.logLevel, - }; - const endpoint = new RunTransactionEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const opts: IRunDelegatedSignTransactionEndpointV1Options = { - connector: this, - logLevel: this.opts.logLevel, - }; - const endpoint = new RunDelegatedSignTransactionEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const opts: IRunTransactionEndpointV1Options = { - connector: this, - logLevel: this.opts.logLevel, - }; - const endpoint = new GetTransactionReceiptByTxIDEndpointV1(opts); - endpoints.push(endpoint); - } - - { - const endpoint = new GetBlockEndpointV1({ - connector: this, - logLevel: this.opts.logLevel, - }); - endpoints.push(endpoint); - } - - { - const endpoint = new GetChainInfoEndpointV1({ - connector: this, - logLevel: this.opts.logLevel, - }); - endpoints.push(endpoint); - } - - { - const opts: IGetPrometheusExporterMetricsEndpointV1Options = { - connector: this, - logLevel: this.opts.logLevel, - }; - const endpoint = new GetPrometheusExporterMetricsEndpointV1(opts); - endpoints.push(endpoint); - } - - const pkg = this.getPackageName(); - log.info(`Installed web services for plugin ${pkg} OK`, { endpoints }); - - return endpoints; - } - - /** - * Create gateway from request (will choose logic based on request) - * - * @node It seems that Gateway is not supposed to be created and destroyed rapidly, but - * rather kept around for longer. Possible issues: - * - Disconnect is async and takes a while until all internal services are closed. - * - Possible memory and connection pool leak (see https://github.com/hyperledger/fabric-sdk-node/issues/529). - * - Performance: there's a setup overhead that might be significant after scaling up. Hence... - * @todo Cache and reuse gateways (destroy only ones not used for a while). - * Or maybe add separate methods "start/stopSession" that would leave session management to the client? - * - * @param req must contain either gatewayOptions or signingCredential. - * @returns Fabric SDK Gateway - */ - protected async createGateway(req: RunTransactionRequest): Promise { - if (req.gatewayOptions) { - return this.createGatewayWithOptions(req.gatewayOptions); - } else if (req.signingCredential) { - return this.createGatewayLegacy(req.signingCredential); - } else { - throw new Error("Missing either gatewayOptions or signingCredential"); - } - } - - /** - * Create Gateway from dedicated gateway options. - * - * @param options gateway options - * @returns Fabric SDK Gateway - */ - protected async createGatewayWithOptions( - options: GatewayOptions, - ): Promise { - return createGateway({ - logLevel: this.opts.logLevel, - pluginRegistry: this.opts.pluginRegistry, - defaultConnectionProfile: this.opts.connectionProfile, - defaultDiscoveryOptions: this.opts.discoveryOptions || { - enabled: true, - asLocalhost: true, - }, - defaultEventHandlerOptions: this.opts.eventHandlerOptions || { - endorseTimeout: 300, - commitTimeout: 300, - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - }, - gatewayOptions: options, - secureIdentity: this.secureIdentity, - certStore: this.certStore, - }); - } - - /** - * Create Gateway from signing credential (legacy, can be done with gateway options) - * - * @param signingCredential sign data. - * @returns Fabric SDK Gateway - */ - protected async createGatewayLegacy( - signingCredential: FabricSigningCredential, - ): Promise { - const { connectionProfile, eventHandlerOptions: eho } = this.opts; - - const iType = signingCredential.type || FabricSigningCredentialType.X509; - - const certData = await this.certStore.get( - signingCredential.keychainId, - signingCredential.keychainRef, - ); - if (iType !== certData.type) { - throw new Error( - `identity type mismatch, sorted of type = ${certData.type} but provided = ${iType}`, - ); - } - let key: ICryptoKey; - switch (iType) { - case FabricSigningCredentialType.VaultX509: - if (!signingCredential.vaultTransitKey) { - throw new Error(`require signingCredential.vaultTransitKey`); - } - key = this.secureIdentity.getVaultKey({ - token: signingCredential.vaultTransitKey.token, - keyName: signingCredential.vaultTransitKey.keyName, - }); - break; - case FabricSigningCredentialType.WsX509: - if (!signingCredential.webSocketKey) { - throw new Error(`require signingCredential.webSocketKey`); - } - key = this.secureIdentity.getWebSocketKey({ - sessionId: signingCredential.webSocketKey.sessionId, - signature: signingCredential.webSocketKey.signature, - }); - break; - case FabricSigningCredentialType.X509: - key = this.secureIdentity.getDefaultKey({ - private: certData.credentials.privateKey as string, - }); - break; - default: - throw new Error(`UNRECOGNIZED_IDENTITY_TYPE type = ${iType}`); - } - const identity: IIdentity = { - type: iType, - mspId: certData.mspId, - credentials: { - certificate: certData.credentials.certificate, - key: key, - }, - }; - - const eventHandlerOptions: DefaultEventHandlerOptions = { - commitTimeout: this.opts.eventHandlerOptions?.commitTimeout || 300, - endorseTimeout: 300, - }; - if (eho?.strategy) { - eventHandlerOptions.strategy = - DefaultEventHandlerStrategies[eho.strategy]; - } - - const gatewayOptions: FabricGatewayOptions = { - discovery: this.opts.discoveryOptions, - eventHandlerOptions, - identity: identity, - identityProvider: this.secureIdentity, - }; - - this.log.debug(`discovery=%o`, gatewayOptions.discovery); - this.log.debug(`eventHandlerOptions=%o`, eventHandlerOptions); - - const gateway = new Gateway(); - - await gateway.connect( - connectionProfile as ConnectionProfile, - gatewayOptions, - ); - - this.log.debug("transact() gateway connection established OK"); - - return gateway; - } - - /** - * Common method for converting `Buffer` response from running transaction - * into type specified in input `RunTransactionResponseType` field. - * - * @param data transaction response - * @param responseType target type format - * @returns converted data (string) - */ - private convertToTransactionResponseType( - data: Buffer, - responseType?: RunTransactionResponseType, - ): string { - switch (responseType) { - case RunTransactionResponseType.JSON: - return JSON.stringify(data); - case RunTransactionResponseType.UTF8: - default: - return data.toString("utf-8"); - } - } - - /** - * Filter endorsers by peers - * - * @param endorsingPeers list of endorsers to use (name or url). - * @param allEndorsers list of all endorsing peers detected. - * @returns filtered list of endorser objects. - */ - private filterEndorsingPeers( - endorsingPeers: string[], - allEndorsers: Endorser[], - ) { - return allEndorsers.filter((e) => { - const looseEndpoint = e.endpoint as any; - return ( - endorsingPeers.includes(e.name) || - endorsingPeers.includes(looseEndpoint.url) || - endorsingPeers.includes(looseEndpoint.addr) - ); - }); - } - - /** - * Filter endorsers by organization. - * - * @param endorsingOrgs list of endorser organizations to use (mspid or org name on certificate). - * @param allEndorsers list of all endorsing peers detected. - * @returns filtered list of endorser objects. - */ - private filterEndorsingOrgs( - endorsingOrgs: string[], - allEndorsers: Endorser[], - ) { - const allEndorsersLoose = allEndorsers as unknown as Array< - Endorser & { options: { pem: string } } - >; - - return allEndorsersLoose - .map((endorser) => { - const certificate = Certificate.fromPEM( - endorser.options.pem as unknown as Buffer, - ); - return { certificate, endorser }; - }) - .filter( - ({ endorser, certificate }) => - endorsingOrgs.includes(endorser.mspid) || - endorsingOrgs.includes(certificate.issuer.organizationName), - ) - .map((it) => it.endorser); - } - - /** - * Filter endorsers by both peers and organizations - * @param allEndorsers list of all endorsing peers detected. - * @param endorsingPeers list of endorsers to use (name or url). - * @param endorsingOrgs list of endorser organizations to use (mspid or org name on certificate). - * @returns filtered list of endorser objects. - */ - private filterEndorsers( - allEndorsers: Endorser[], - endorsingPeers?: string[], - endorsingOrgs?: string[], - ) { - const toEndorserNames = (e: Endorser[]) => e.map((v) => v.name); - this.log.debug("Endorsing targets:", toEndorserNames(allEndorsers)); - - if (endorsingPeers) { - allEndorsers = this.filterEndorsingPeers(endorsingPeers, allEndorsers); - this.log.debug( - "Endorsing targets after peer filtering:", - toEndorserNames(allEndorsers), - ); - } - - if (endorsingOrgs) { - allEndorsers = this.filterEndorsingOrgs(endorsingOrgs, allEndorsers); - this.log.debug( - "Endorsing targets after org filtering:", - toEndorserNames(allEndorsers), - ); - } - - return allEndorsers; - } - - /** - * Convert transient data from input into transient map (used in private transactions) - * - * @param transientData transient data from request - * @returns correct TransientMap - */ - private toTransientMap(transientData?: unknown): TransientMap { - const transientMap = transientData as TransientMap; - - try { - //Obtains and parses each component of transient data - for (const key in transientMap) { - transientMap[key] = Buffer.from(JSON.stringify(transientMap[key])); - } - } catch (ex) { - this.log.error(`Building transient map crashed: `, ex); - throw new Error(`Unable to build the transient map: ${ex.message}`); - } - - return transientMap; - } - - public async transact( - req: RunTransactionRequest, - ): Promise { - const fnTag = `${this.className}#transact()`; - this.log.debug("%s ENTER", fnTag); - const { - channelName, - contractName, - invocationType, - methodName: fnName, - params, - transientData, - responseType: responseType, - } = req; - - try { - this.log.debug("%s Creating Fabric Gateway instance...", fnTag); - const gateway = await this.createGateway(req); - this.log.debug("%s Obtaining Fabric gateway network instance...", fnTag); - const network = await gateway.getNetwork(channelName); - this.log.debug("%s Obtaining Fabric contract instance...", fnTag); - const contract = network.getContract(contractName); - const channel = network.getChannel(); - const endorsingTargets = this.filterEndorsers( - channel.getEndorsers(), - req.endorsingPeers, - req.endorsingOrgs, - ); - - const endorsers = channel.getEndorsers(); - - const endorsersMetadata = endorsers.map((x) => ({ - mspid: x.mspid, - discovered: x.discovered, - endpoint: x.endpoint, - name: x.name, - hasChaincode: x.hasChaincode(contractName), - isTLS: x.isTLS(), - })); - this.log.debug("%s Endorsers metadata: %o", fnTag, endorsersMetadata); - - let out: Buffer; - let transactionId = ""; - switch (invocationType) { - case FabricContractInvocationType.Call: { - out = await contract - .createTransaction(fnName) - .setEndorsingPeers(endorsingTargets) - .evaluate(...params); - break; - } - case FabricContractInvocationType.Send: { - this.log.debug("%s Creating tx instance on %s", fnTag, contractName); - this.log.debug("%s Endorsing peers: %o", fnTag, req.endorsingPeers); - const tx = contract.createTransaction(fnName); - tx.setEndorsingPeers(endorsingTargets); - this.log.debug("%s Submitting TX... (%o)", fnTag, params); - out = await tx.submit(...params); - this.log.debug("%s Submitted TX OK (%o)", fnTag, params); - transactionId = tx.getTransactionId(); - this.log.debug("%s Obtained TX ID OK (%s)", fnTag, transactionId); - break; - } - case FabricContractInvocationType.Sendprivate: { - if (!transientData) { - const message = - "Set transaction to send Transient Data but it was not provided"; - throw new Error(`${fnTag} ${message}`); - } - - const transientMap = this.toTransientMap(req.transientData); - const transactionProposal = await contract.createTransaction(fnName); - transactionProposal.setEndorsingPeers(endorsingTargets); - out = await transactionProposal.setTransient(transientMap).submit(); - break; - } - default: { - const message = `FabricContractInvocationType: ${invocationType}`; - throw new Error(`${fnTag} unknown ${message}`); - } - } - - const res: RunTransactionResponse = { - functionOutput: this.convertToTransactionResponseType( - out, - responseType, - ), - transactionId: transactionId, - }; - gateway.disconnect(); - this.log.debug(`transact() response: %o`, res); - this.prometheusExporter.addCurrentTransaction(); - - return res; - } catch (ex) { - this.log.error(`transact() crashed: `, ex); - throw new Error(`${fnTag} Unable to run transaction: ${ex.message}`); - } - } - - public async getTransactionReceiptByTxID( - req: RunTransactionRequest, - ): Promise { - const gateway = await this.createGateway(req); - const options: IGetTransactionReceiptByTxIDOptions = { - channelName: req.channelName, - params: req.params, - gateway: gateway, - }; - return await getTransactionReceiptByTxID(options); - } - - /** - * @param caId The key of the CA in the Fabric connection profile's - * `certificateAuthorities` attribute. - * @returns The instantiated `FabricCAServices` object. - */ - public async createCaClient(caId: string): Promise { - const fnTag = `${this.className}#createCaClient()`; - try { - const ccp = this.opts.connectionProfile; - if (!ccp.certificateAuthorities) { - throw new Error(`${fnTag} conn. profile certificateAuthorities falsy.`); - } - const caInfo = ccp.certificateAuthorities[caId] as Record; - const { tlsCACerts, url: caUrl, caName } = caInfo; - const { pem: caTLSCACertPem } = tlsCACerts; - const tlsOptions = { trustedRoots: caTLSCACertPem, verify: false }; - this.log.debug(`createCaClient() caName=%o caUrl=%o`, caName, caUrl); - this.log.debug(`createCaClient() tlsOptions=%o`, tlsOptions); - return new FabricCAServices(caUrl, tlsOptions, caName); - } catch (ex) { - this.log.error(`createCaClient() Failure:`, ex); - throw new Error(`${fnTag} Inner Exception: ${ex?.message}`); - } - } - - public async enrollAdmin( - caId: string, - identityId: string, - mspId: string, - enrollmentID: string, - enrollmentSecret: string, - ): Promise<[X509Identity, Wallet]> { - const fnTag = `${this.className}#enrollAdmin()`; - try { - const ca = await this.createCaClient(caId); - const wallet = await Wallets.newInMemoryWallet(); - - // Enroll the admin user, and import the new identity into the wallet. - const request = { enrollmentID, enrollmentSecret }; - const enrollment = await ca.enroll(request); - - const { certificate, key } = enrollment; - const keyBytes = key.toBytes(); - - const x509Identity: X509Identity = { - credentials: { - certificate, - privateKey: keyBytes, - }, - mspId, - type: "X.509", - }; - await wallet.put(identityId, x509Identity); - - return [x509Identity, wallet]; - } catch (ex) { - this.log.error(`enrollAdmin() Failure:`, ex); - throw new Error(`${fnTag} Exception: ${ex?.message}`); - } - } - /** - * @description enroll a client and store the enrolled certificate inside keychain - * @param identity details about client's key - * @param request , enroll request for fabric-ca-server - */ - public async enroll( - identity: FabricSigningCredential, - request: { - enrollmentID: string; - enrollmentSecret: string; - caId: string; - mspId: string; - }, - ): Promise { - const fnTag = `${this.className}#enroll`; - const iType = identity.type || FabricSigningCredentialType.X509; - this.log.debug( - `${fnTag} enroll identity of type = ${iType} with ca = ${request.caId}`, - ); - Checks.nonBlankString(identity.keychainId, `${fnTag} identity.keychainId`); - Checks.nonBlankString( - identity.keychainRef, - `${fnTag} identity.keychainRef`, - ); - Checks.nonBlankString(request.mspId, `${fnTag} request.mspId`); - const ca = await this.createCaClient(request.caId); - const enrollmentRequest: IEnrollmentRequest = { - enrollmentID: request.enrollmentID, - enrollmentSecret: request.enrollmentSecret, - }; - let key; - switch (iType) { - case FabricSigningCredentialType.VaultX509: - if (!identity.vaultTransitKey) { - throw new Error(`${fnTag} require identity.vaultTransitKey`); - } - key = this.secureIdentity.getVaultKey({ - token: identity.vaultTransitKey.token, - keyName: identity.vaultTransitKey.keyName, - }); - enrollmentRequest.csr = await key.generateCSR(request.enrollmentID); - break; - case FabricSigningCredentialType.WsX509: - if (!identity.webSocketKey) { - throw new Error(`${fnTag} require identity.webSocketKey`); - } - key = this.secureIdentity.getWebSocketKey({ - sessionId: identity.webSocketKey.sessionId, - signature: identity.webSocketKey.signature, - }); - enrollmentRequest.csr = await key.generateCSR(request.enrollmentID); - break; - } - const resp = await ca.enroll(enrollmentRequest); - const certData: IIdentityData = { - type: iType, - mspId: request.mspId, - credentials: { - certificate: resp.certificate, - }, - }; - if (resp.key) { - certData.credentials.privateKey = resp.key.toBytes(); - } - await this.certStore.put( - identity.keychainId, - identity.keychainRef, - certData, - ); - } - - public async register( - registrar: FabricSigningCredential, - request: IRegisterRequest, - caId: string, - ): Promise { - const fnTag = `${this.className}#register`; - const iType = registrar.type || FabricSigningCredentialType.X509; - this.log.debug( - `${fnTag} register client using registrar identity of type = ${iType}`, - ); - Checks.nonBlankString( - registrar.keychainId, - `${fnTag} registrar.keychainId`, - ); - Checks.nonBlankString( - registrar.keychainRef, - `${fnTag} registrar.keychainRef`, - ); - const certData = await this.certStore.get( - registrar.keychainId, - registrar.keychainRef, - ); - if (certData.type != iType) { - throw new Error( - `${fnTag} identity type mismatch, stored ${certData.type} but provided ${iType}`, - ); - } - let key: ICryptoKey; - switch (iType) { - case FabricSigningCredentialType.X509: - key = this.secureIdentity.getDefaultKey({ - private: certData.credentials.privateKey as string, - }); - break; - case FabricSigningCredentialType.VaultX509: - if (!registrar.vaultTransitKey) { - throw new Error(`${fnTag} require registrar.vaultTransitKey`); - } - key = this.secureIdentity.getVaultKey({ - token: registrar.vaultTransitKey.token, - keyName: registrar.vaultTransitKey.keyName, - }); - break; - case FabricSigningCredentialType.WsX509: - if (!registrar.webSocketKey) { - throw new Error(`${fnTag} require registrar.webSocketKey`); - } - key = this.secureIdentity.getWebSocketKey({ - sessionId: registrar.webSocketKey.sessionId, - signature: registrar.webSocketKey.signature, - }); - break; - default: - throw new Error(`${fnTag} UNRECOGNIZED_IDENTITY_TYPE type = ${iType}`); - } - const user = await this.secureIdentity.getUserContext( - { - type: iType, - credentials: { - certificate: certData.credentials.certificate, - key: key, - }, - mspId: certData.mspId, - }, - "registrar", - ); - - const ca = await this.createCaClient(caId); - return await ca.register(request, user); - } - - /** - * @description re-enroll a client with new private key - * @param identity - */ - public async rotateKey( - identity: FabricSigningCredential, - request: { - enrollmentID: string; - enrollmentSecret: string; - caId: string; - }, - ): Promise { - const fnTag = `${this.className}#rotateKey`; - const iType = identity.type || FabricSigningCredentialType.X509; - this.log.debug( - `${fnTag} identity of type = ${iType} with ca = ${request.caId}`, - ); - this.log.debug( - `${fnTag} enroll identity of type = ${iType} with ca = ${request.caId}`, - ); - Checks.nonBlankString(identity.keychainId, `${fnTag} identity.keychainId`); - Checks.nonBlankString( - identity.keychainRef, - `${fnTag} identity.keychainRef`, - ); - const certData = await this.certStore.get( - identity.keychainId, - identity.keychainRef, - ); - switch (iType) { - case FabricSigningCredentialType.VaultX509: - if (!identity.vaultTransitKey) { - throw new Error(`${fnTag} require identity.vaultTransitKey)`); - } - const key = this.secureIdentity.getVaultKey({ - keyName: identity.vaultTransitKey.keyName, - token: identity.vaultTransitKey.token, - }); - await key.rotate(); - break; - case FabricSigningCredentialType.WsX509: - throw new Error( - `${fnTag} web socket is not setup to rotate keys. Client should enroll with a new key)`, - ); - break; - } - identity.type = iType; - await this.enroll(identity, { - enrollmentID: request.enrollmentID, - enrollmentSecret: request.enrollmentSecret, - caId: request.caId, - mspId: certData.mspId, - }); - } - - /** - * Get fabric block from a channel, using one of selectors. - * - * @param req input parameters - * @returns Entire block object or encoded buffer (if req.skipDecode is true) - */ - public async getBlock(req: GetBlockRequestV1): Promise { - const fnTag = `${this.className}:getBlock(req: GetBlockRequestV1)`; - this.log.debug( - "getBlock() called, channelName:", - req.channelName, - "query:", - JSON.stringify(req.query), - ); - - const gateway = await this.createGatewayWithOptions(req.gatewayOptions); - const { channelName, responseType } = req; - const connectionChannelName = req.connectionChannelName ?? channelName; - const queryConfig = { - gateway, - connectionChannelName, - }; - - let responseData: Buffer; - if (req.query.blockNumber) { - this.log.debug("getBlock by it's blockNumber:", req.query.blockNumber); - responseData = await querySystemChainCode( - queryConfig, - "GetBlockByNumber", - channelName, - req.query.blockNumber, - ); - } else if (req.query.blockHash) { - const { buffer, encoding } = req.query.blockHash; - this.log.debug("getBlock by it's hash:", buffer); - - if (encoding && !Buffer.isEncoding(encoding)) { - throw new Error(`Unknown buffer encoding provided: ${encoding}`); - } - - responseData = await querySystemChainCode( - queryConfig, - "GetBlockByHash", - channelName, - Buffer.from(buffer, encoding as BufferEncoding), - ); - } else if (req.query.transactionId) { - this.log.debug( - "getBlock by transactionId it contains:", - req.query.transactionId, - ); - responseData = await querySystemChainCode( - queryConfig, - "GetBlockByTxID", - channelName, - req.query.transactionId, - ); - } else { - throw new Error( - "Unsupported block query type - you must provide either number, hash or txId", - ); - } - - if (!responseData) { - const eMsg = `${fnTag} - expected string as GetBlockByTxID response from Fabric system chaincode but received a falsy value instead...`; - throw new RuntimeError(eMsg); - } - - if (responseType === GetBlockResponseTypeV1.Encoded) { - const encodedBlockB64 = responseData.toString("base64"); - return { - encodedBlock: encodedBlockB64, - }; - } - - const decodedBlock = BlockDecoder.decode(responseData); - switch (responseType) { - case GetBlockResponseTypeV1.CactiTransactions: - return formatCactiTransactionsBlockResponse(decodedBlock); - case GetBlockResponseTypeV1.CactiFullBlock: - return formatCactiFullBlockResponse(decodedBlock); - case GetBlockResponseTypeV1.Full: - default: - return { - decodedBlock, - }; - } - } - - /** - * Get fabric block from a channel, using one of selectors. - * - * @param req input parameters - * @returns Entire block object or encoded buffer (if req.skipDecode is true) - */ - public async getChainInfo( - req: GetChainInfoRequestV1, - ): Promise { - const { channelName } = req; - this.log.debug("getChainInfo() called, channelName:", channelName); - - const gateway = await this.createGatewayWithOptions(req.gatewayOptions); - const connectionChannelName = req.connectionChannelName ?? channelName; - const queryConfig = { - gateway, - connectionChannelName, - }; - - const responseData = await querySystemChainCode( - queryConfig, - "GetChainInfo", - channelName, - ); - - const decodedResponse = - fabricProtos.common.BlockchainInfo.decode(responseData); - if (!decodedResponse) { - throw new RuntimeError("Could not decode BlockchainInfo"); - } - - return { - height: fabricLongToNumber(decodedResponse.height), - currentBlockHash: - "0x" + Buffer.from(decodedResponse.currentBlockHash).toString("hex"), - previousBlockHash: - "0x" + Buffer.from(decodedResponse.previousBlockHash).toString("hex"), - }; - } - - /** - * Get plain Fabric Client, Channel and IdentityContext without a signer attached (like in gateway). - * These low-level entities can be used to manually sign and send requests. - * Node discovery will be done if configured in connector, so signCallback may be used in the process. - * - * @param channelName channel name to connect to - * @param signerCertificate signing user certificate - * @param signerMspID signing user mspid - * @param uniqueTransactionData unique transaction data to be passed to sign callback (on discovery). - * @returns `Client`, `Channel` and `IdentityContext` - */ - private async getFabricClientWithoutSigner( - channelName: string, - signerCertificate: string, - signerMspID: string, - uniqueTransactionData?: unknown, - ): Promise<{ - client: Client; - channel: Channel; - userIdCtx: IdentityContext; - }> { - this.log.debug(`getFabricChannelWithoutSigner() channel ${channelName}`); - // Setup a client without a signer - const clientId = `fcClient-${uuidv4()}`; - this.log.debug("Create Fabric Client without a signer with ID", clientId); - const client = new Client(clientId); - // Use fabric SDK methods for parsing connection profile into Client structure - await loadFromConfig(client, this.opts.connectionProfile); - - // Create user - const user = User.createUser("", "", signerMspID, signerCertificate); - const userIdCtx = client.newIdentityContext(user); - - const channel = client.getChannel(channelName); - - // Discover fabric nodes - if ((this.opts.discoveryOptions?.enabled ?? true) && this.signCallback) { - const discoverers = []; - for (const peer of client.getEndorsers()) { - const discoverer = channel.client.newDiscoverer(peer.name, peer.mspid); - discoverer.setEndpoint(peer.endpoint); - discoverers.push(discoverer); - } - - const discoveryService = channel.newDiscoveryService(channel.name); - const discoveryRequest = discoveryService.build(userIdCtx); - const signature = await this.signCallback( - discoveryRequest, - uniqueTransactionData, - ); - await discoveryService.sign(signature); - await discoveryService.send({ - asLocalhost: this.opts.discoveryOptions?.asLocalhost ?? true, - targets: discoverers, - }); - } - - this.log.info( - `Created channel for ${channelName} with ${ - channel.getMspids().length - } Mspids, ${channel.getCommitters().length} commiters, ${ - channel.getEndorsers().length - } endorsers`, - ); - - return { - client, - channel, - userIdCtx, - }; - } - - /** - * Send fabric query or transaction request using delegated sign with `signCallback`. - * Interface is mostly compatible with regular transact() method. - * - * @param req request specification - * @returns query / transaction response - */ - public async transactDelegatedSign( - req: RunDelegatedSignTransactionRequest, - ): Promise { - this.log.info( - `transactDelegatedSign() ${req.methodName}@${req.contractName} on channel ${req.channelName}`, - ); - if (!this.signCallback) { - throw new Error( - "No signing callback was set for this connector - abort!", - ); - } - - // Connect Client and Channel, discover nodes - const { channel, userIdCtx } = await this.getFabricClientWithoutSigner( - req.channelName, - req.signerCertificate, - req.signerMspID, - req.uniqueTransactionData, - ); - - const endorsingTargets = this.filterEndorsers( - channel.getEndorsers(), - req.endorsingPeers, - req.endorsingOrgs, - ); - - switch (req.invocationType) { - case FabricContractInvocationType.Call: { - const query = channel.newQuery(req.contractName); - const queryRequest = query.build(userIdCtx, { - fcn: req.methodName, - args: req.params, - }); - const signature = await this.signCallback( - queryRequest, - req.uniqueTransactionData, - ); - query.sign(signature); - const queryResponse = await query.send({ - targets: endorsingTargets, - }); - - // Parse query results - // Strategy: first endorsed response is returned - for (const res of queryResponse.responses) { - if (res.response.status === 200 && res.endorsement) { - return { - functionOutput: this.convertToTransactionResponseType( - asBuffer(res.response.payload), - ), - transactionId: "", - }; - } - } - - throw new Error( - `Query failed, errors: ${JSON.stringify( - queryResponse.errors, - )}, responses: ${JSON.stringify( - queryResponse.responses.map((r) => { - return { - status: r.response.status, - message: r.response.message, - }; - }), - )}`, - ); - } - case FabricContractInvocationType.Send: - case FabricContractInvocationType.Sendprivate: { - // Private transactions needs transient data set - if ( - req.invocationType === FabricContractInvocationType.Sendprivate && - !req.transientData - ) { - throw new Error( - "Missing transient data in a private transaction mode", - ); - } - - const endorsement = channel.newEndorsement(req.contractName); - - const buildOptions: BuildProposalRequest = { - fcn: req.methodName, - args: req.params, - }; - if (req.transientData) { - buildOptions.transientMap = this.toTransientMap(req.transientData); - } - - const endorsementRequest = endorsement.build(userIdCtx, buildOptions); - const endorsementSignature = await this.signCallback( - endorsementRequest, - req.uniqueTransactionData, - ); - await endorsement.sign(endorsementSignature); - const endorsementResponse = await endorsement.send({ - targets: endorsingTargets, - }); - - if ( - !endorsementResponse.responses || - endorsementResponse.responses.length === 0 - ) { - throw new Error("No endorsement responses from peers! Abort"); - } - - // We will try to commit if at least one endorsement passed - let endorsedMethodResponse: Buffer | undefined; - - for (const response of endorsementResponse.responses) { - const endorsementStatus = `${response.connection.name}: ${ - response.response.status - } message ${response.response.message}, endorsement: ${Boolean( - response.endorsement, - )}`; - - if (response.response.status !== 200 || !response.endorsement) { - this.log.warn(`Endorsement from peer ERROR: ${endorsementStatus}`); - } else { - this.log.debug(`Endorsement from peer OK: ${endorsementStatus}`); - endorsedMethodResponse = asBuffer(response.payload); - } - } - - if (!endorsedMethodResponse) { - throw new Error("No valid endorsements received!"); - } - - const commit = endorsement.newCommit(); - const commitRequest = commit.build(userIdCtx); - const commitSignature = await this.signCallback( - commitRequest, - req.uniqueTransactionData, - ); - await commit.sign(commitSignature); - const commitResponse = await commit.send({ - targets: channel.getCommitters(), - }); - this.log.debug("Commit response:", commitResponse); - - if (commitResponse.status !== "SUCCESS") { - throw new Error("Transaction commit request failed!"); - } - - this.prometheusExporter.addCurrentTransaction(); - - return { - functionOutput: this.convertToTransactionResponseType( - endorsedMethodResponse, - ), - transactionId: userIdCtx.transactionId, - }; - } - default: { - throw new Error( - `transactDelegatedSign() Unknown invocation type: ${req.invocationType}`, - ); - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index f96aacc259..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Transactions } from "./response.type"; - -import { totalTxCount, K_CACTUS_FABRIC_TOTAL_TX_COUNT } from "./metrics"; - -export async function collectMetrics( - transactions: Transactions, -): Promise { - totalTxCount.labels(K_CACTUS_FABRIC_TOTAL_TX_COUNT).set(transactions.counter); -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index 0e4050177a..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_FABRIC_TOTAL_TX_COUNT = "cactus_fabric_total_tx_count"; - -export const totalTxCount = new Gauge({ - name: K_CACTUS_FABRIC_TOTAL_TX_COUNT, - help: "Total transactions executed", - labelNames: ["type"], -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index 8939683942..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,40 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { Transactions } from "./response.type"; -import { totalTxCount, K_CACTUS_FABRIC_TOTAL_TX_COUNT } from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly transactions: Transactions = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public addCurrentTransaction(): void { - this.transactions.counter++; - totalTxCount - .labels(K_CACTUS_FABRIC_TOTAL_TX_COUNT) - .set(this.transactions.counter); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_FABRIC_TOTAL_TX_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalTxCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 3f1bc7f491..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type Transactions = { - counter: number; -}; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/public-api.ts deleted file mode 100755 index 50172d9cf8..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/public-api.ts +++ /dev/null @@ -1,26 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; - -export { - FabricApiClient, - FabricApiClientOptions, -} from "./api-client/fabric-api-client"; - -export { - PluginLedgerConnectorFabric, - IPluginLedgerConnectorFabricOptions, - SignPayloadCallback, -} from "./plugin-ledger-connector-fabric"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} - -export { IVaultConfig, IWebSocketConfig } from "./identity/identity-provider"; -export { IIdentityData } from "./identity/internal/cert-datastore"; - -export { signProposal } from "./common/sign-utils"; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/run-transaction/run-delegated-sign-transaction-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/run-transaction/run-delegated-sign-transaction-endpoint-v1.ts deleted file mode 100644 index 0302e42b3c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/run-transaction/run-delegated-sign-transaction-endpoint-v1.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorFabric } from "../plugin-ledger-connector-fabric"; -import OAS from "../../json/openapi.json"; - -export interface IRunDelegatedSignTransactionEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorFabric; -} - -export class RunDelegatedSignTransactionEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "RunDelegatedSignTransactionEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RunDelegatedSignTransactionEndpointV1.CLASS_NAME; - } - - constructor( - public readonly opts: IRunDelegatedSignTransactionEndpointV1Options, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} options.connector`); - - this.log = LoggerProvider.getOrCreate({ - label: "run-delegated-sign-transaction-endpoint-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-delegated-sign-transaction" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - const reqTag = `${verbUpper} ${this.getPath()}`; - this.log.debug(reqTag); - - try { - res - .status(200) - .json(await this.opts.connector.transactDelegatedSign(req.body)); - } catch (ex) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - await handleRestEndpointException({ - errorMsg, - log: this.log, - error: ex, - res, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/run-transaction/run-transaction-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/run-transaction/run-transaction-endpoint-v1.ts deleted file mode 100644 index adf9961a58..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/run-transaction/run-transaction-endpoint-v1.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorFabric } from "../plugin-ledger-connector-fabric"; -import OAS from "../../json/openapi.json"; - -export interface IRunTransactionEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorFabric; -} - -export class RunTransactionEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RunTransactionEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RunTransactionEndpointV1.CLASS_NAME; - } - - constructor(public readonly opts: IRunTransactionEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} options.connector`); - - this.log = LoggerProvider.getOrCreate({ - label: "run-transaction-endpoint-v1", - level: opts.logLevel || "INFO", - }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - const reqTag = `${verbUpper} ${this.getPath()}`; - this.log.debug(reqTag); - - try { - res.status(200).json(await this.opts.connector.transact(req.body)); - } catch (ex) { - const errorMsg = `${fnTag} request handler fn crashed for: ${reqTag}`; - await handleRestEndpointException({ - errorMsg, - log: this.log, - error: ex, - res, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/watch-blocks/watch-blocks-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/watch-blocks/watch-blocks-v1-endpoint.ts deleted file mode 100644 index 4e22246cc3..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/watch-blocks/watch-blocks-v1-endpoint.ts +++ /dev/null @@ -1,479 +0,0 @@ -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, - safeStringifyException, -} from "@hyperledger/cactus-common"; - -import type { - BlockType, - Channel, - EventCallback, - EventInfo, - IdentityContext, -} from "fabric-common"; -import { BlockEvent, BlockListener, EventType, Gateway } from "fabric-network"; -import type { Socket as SocketIoSocket } from "socket.io"; -import { v4 as uuidv4 } from "uuid"; -import { RuntimeError } from "run-time-error-cjs"; - -import { assertFabricFunctionIsAvailable } from "../common/utils"; -import { SignPayloadCallback } from "../plugin-ledger-connector-fabric"; -import { - WatchBlocksV1, - WatchBlocksResponseV1, - WatchBlocksListenerTypeV1, - WatchBlocksOptionsV1, - WatchBlocksDelegatedSignOptionsV1, -} from "../generated/openapi/typescript-axios"; -import { - formatCactiFullBlockResponse, - formatCactiTransactionsBlockResponse, -} from "../get-block/cacti-block-formatters"; - -const { - newFilteredBlockEvent, -} = require("fabric-network/lib/impl/event/filteredblockeventfactory"); -assertFabricFunctionIsAvailable(newFilteredBlockEvent, "newFilteredBlockEvent"); -const { - newFullBlockEvent, -} = require("fabric-network/lib/impl/event/fullblockeventfactory"); -assertFabricFunctionIsAvailable(newFullBlockEvent, "newFullBlockEvent"); -const { - newPrivateBlockEvent, -} = require("fabric-network/lib/impl/event/privateblockeventfactory"); -assertFabricFunctionIsAvailable(newPrivateBlockEvent, "newPrivateBlockEvent"); - -/** - * WatchBlocksV1Endpoint configuration. - */ -export interface IWatchBlocksV1EndpointConfiguration { - logLevel?: LogLevelDesc; - socket: SocketIoSocket; -} - -/** - * Endpoint to watch for new blocks on fabric ledger and report them - * to client using socketio. - */ -export class WatchBlocksV1Endpoint { - public static readonly CLASS_NAME = "WatchBlocksV1Endpoint"; - - private readonly log: Logger; - private readonly socket: SocketIoSocket< - Record void> - >; - - constructor(public readonly config: IWatchBlocksV1EndpointConfiguration) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(config, `${fnTag} arg options`); - Checks.truthy(config.socket, `${fnTag} arg options.socket`); - - this.socket = config.socket; - - const level = this.config.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - /** - * Get this class name. - */ - public get className(): string { - return WatchBlocksV1Endpoint.CLASS_NAME; - } - - /** - * Callback executed when receiving block with custom cacti type "cacti:full-block" - * Sends WatchBlocksV1.Next with new block to the client. - * - * @param blockEvent full block - * - * @returns Nothing. - */ - private monitorCactiFullBlockCallback(blockEvent: BlockEvent) { - const { socket, log } = this; - const clientId = socket.id; - log.debug( - `CactiFullBlock BlockEvent received: #${blockEvent.blockNumber.toString()}, client: ${clientId}`, - ); - - if (!("data" in blockEvent.blockData)) { - throw new Error("Wrong blockEvent type received - should not happen!"); - } - - socket.emit( - WatchBlocksV1.Next, - formatCactiFullBlockResponse(blockEvent.blockData), - ); - } - - /** - * Callback executed when receiving block with custom cacti type "cacti:transactions" - * Sends WatchBlocksV1.Next with new block to the client. - * - * @param blockEvent full block - * - * @returns Nothing. - */ - private monitorCactiTransactionsCallback(blockEvent: BlockEvent) { - const { socket, log } = this; - const clientId = socket.id; - log.debug( - `CactiTransactions BlockEvent received: #${blockEvent.blockNumber.toString()}, client: ${clientId}`, - ); - - if (!("data" in blockEvent.blockData)) { - throw new Error("Wrong blockEvent type received - should not happen!"); - } - - socket.emit( - WatchBlocksV1.Next, - formatCactiTransactionsBlockResponse(blockEvent.blockData), - ); - } - - /** - * Callback executed when receiving block with standard type "full" - * Sends WatchBlocksV1.Next with new block to the client. - * - * @param blockEvent full block - * - * @returns Nothing. - */ - private monitorFullCallback(blockEvent: BlockEvent) { - const { socket, log } = this; - const clientId = socket.id; - log.debug( - `Full BlockEvent received: #${blockEvent.blockNumber.toString()}, client: ${clientId}`, - ); - - if (!("data" in blockEvent.blockData)) { - log.error("Wrong blockEvent type received - should not happen!"); - return; - } - - socket.emit(WatchBlocksV1.Next, { - fullBlock: blockEvent, - }); - } - - /** - * Callback executed when receiving block with standard type "filtered" - * Sends WatchBlocksV1.Next with new block to the client. - * - * @param blockEvent filtered block - * - * @returns Nothing. - */ - private monitorFilteredCallback(blockEvent: BlockEvent) { - const { socket, log } = this; - const clientId = socket.id; - log.debug( - `Filtered BlockEvent received: #${blockEvent.blockNumber.toString()}, client: ${clientId}`, - ); - - if (!("filtered_transactions" in blockEvent.blockData)) { - log.error("Wrong blockEvent type received - should not happen!"); - return; - } - - socket.emit(WatchBlocksV1.Next, { - filteredBlock: blockEvent, - }); - } - - /** - * Callback executed when receiving block with standard type "private" - * Sends WatchBlocksV1.Next with new block to the client. - * - * @param blockEvent private block - * - * @returns Nothing. - */ - private monitorPrivateCallback(blockEvent: BlockEvent) { - const { socket, log } = this; - const clientId = socket.id; - log.debug( - `Private BlockEvent received: #${blockEvent.blockNumber.toString()}, client: ${clientId}`, - ); - - if (!("data" in blockEvent.blockData)) { - log.error("Wrong blockEvent type received - should not happen!"); - return; - } - - socket.emit(WatchBlocksV1.Next, { - privateBlock: blockEvent, - }); - } - - /** - * Get block listener callback and listener type it's expect. - * Returns separate function object each time it's called (this is required y fabric node SDK). - * - * @param type requested listener type (including custom Cacti ones). - * - * @returns listener: BlockListener; - * @returns listenerType: BlockType; - */ - private getBlockListener(type: WatchBlocksListenerTypeV1) { - let listener: BlockListener; - let listenerType: EventType; - - switch (type) { - case WatchBlocksListenerTypeV1.Full: - listener = async (blockEvent) => this.monitorFullCallback(blockEvent); - listenerType = "full"; - break; - case WatchBlocksListenerTypeV1.Filtered: - listener = async (blockEvent) => - this.monitorFilteredCallback(blockEvent); - listenerType = "filtered"; - break; - case WatchBlocksListenerTypeV1.Private: - listener = async (blockEvent) => - this.monitorPrivateCallback(blockEvent); - listenerType = "private"; - break; - case WatchBlocksListenerTypeV1.CactiTransactions: - listener = async (blockEvent) => - this.monitorCactiTransactionsCallback(blockEvent); - listenerType = "full"; - break; - case WatchBlocksListenerTypeV1.CactiFullBlock: - listener = async (blockEvent) => - this.monitorCactiFullBlockCallback(blockEvent); - listenerType = "full"; - break; - - default: - // Will not compile if any type was not handled by above switch. - const unknownType: never = type; - const validTypes = Object.keys(WatchBlocksListenerTypeV1).join(";"); - const errorMessage = `Unknown block listen type '${unknownType}'. Check name and connector version. Accepted listener types for WatchBlocksListenerTypeV1 are: [${validTypes}]`; - throw new RuntimeError(errorMessage); - } - - return { listener, listenerType }; - } - - /** - * Use Fabric SDK functions to convert raw `EventInfo` to `BlockEvent` of specified `BlockType`. - * - * @param blockType block type (e.g. full, filtered) - * @param event raw block event from EventService - * @returns parsed BlockEvent - */ - private toFabricBlockEvent( - blockType: BlockType, - event: EventInfo, - ): BlockEvent { - if (blockType === "filtered") { - return newFilteredBlockEvent(event); - } else if (blockType === "full") { - return newFullBlockEvent(event); - } else if (blockType === "private") { - return newPrivateBlockEvent(event); - } else { - // Exhaustive check - const unknownBlockType: never = blockType; - throw new Error(`Unsupported event type: ${unknownBlockType}`); - } - } - - /** - * Subscribe to new blocks on fabric ledger, push them to the client via socketio. - * - * @param options Block monitoring options. - */ - public async subscribe( - options: WatchBlocksOptionsV1, - gateway: Gateway, - ): Promise { - const { socket, log } = this; - const clientId = socket.id; - log.info(`${WatchBlocksV1.Subscribe} => clientId: ${clientId}`); - log.debug( - "WatchBlocksV1.Subscribe args: channelName:", - options.channelName, - ", startBlock:", - options.startBlock, - ", type: ", - options.type, - ); - - try { - Checks.truthy(options.channelName, "Missing channel name"); - const network = await gateway.getNetwork(options.channelName); - - const { listener, listenerType } = this.getBlockListener(options.type); - - log.debug("Subscribing to new blocks... listenerType:", listenerType); - // @todo Add support for checkpointer (long-term improvement) - // https://hyperledger.github.io/fabric-sdk-node/release-2.2/module-fabric-network.Checkpointer.html - await network.addBlockListener(listener, { - startBlock: options.startBlock, - type: listenerType, - }); - - socket.on("disconnect", async (reason: string) => { - log.info( - "WebSocket:disconnect => reason=%o clientId=%s", - reason, - clientId, - ); - network.removeBlockListener(listener); - gateway.disconnect(); - this.close(); - }); - - socket.on(WatchBlocksV1.Unsubscribe, () => { - log.info(`${WatchBlocksV1.Unsubscribe} => clientId: ${clientId}`); - this.close(); - }); - } catch (error) { - const errorMessage = safeStringifyException(error); - log.warn(errorMessage); - socket.emit(WatchBlocksV1.Error, { - code: 500, - errorMessage, - }); - } - } - - /** - * Subscribe to new blocks on fabric ledger, push them to the client via socketio. - * Uses delegate signing callback from the connector to support custom signing scenarios. - * - * @param options Block monitoring options. - * @param channel Target channel to monitor blocks. - * @param userIdCtx Signer identity context. - * @param signCallback Signing callback to use when sending requests to a network. - */ - public async SubscribeDelegatedSign( - options: WatchBlocksDelegatedSignOptionsV1, - channel: Channel, - userIdCtx: IdentityContext, - signCallback: SignPayloadCallback, - ): Promise { - const { socket, log } = this; - const clientId = socket.id; - log.info( - `${WatchBlocksV1.SubscribeDelegatedSign} => clientId: ${clientId}`, - ); - log.debug( - "WatchBlocksV1.SubscribeDelegatedSign args: channelName:", - options.channelName, - ", startBlock:", - options.startBlock, - ", type: ", - options.type, - ); - - try { - const { listener, listenerType } = this.getBlockListener(options.type); - log.debug("Subscribing to new blocks... listenerType:", listenerType); - - // Eventers - // (prefer peers from same org) - let peers = channel.getEndorsers(options.signerMspID); - peers = peers.length > 0 ? peers : channel.getEndorsers(); - const eventers = peers.map((peer) => { - const eventer = channel.client.newEventer(peer.name); - eventer.setEndpoint(peer.endpoint); - return eventer; - }); - if (eventers.length === 0) { - throw new Error("No peers (eventers) available for monitoring"); - } - - // Event Service - const eventService = channel.newEventService( - `SubscribeDelegatedSign_${uuidv4()}`, - ); - eventService.setTargets(eventers); - - // Event listener - const eventCallback: EventCallback = ( - error?: Error, - event?: EventInfo, - ) => { - try { - if (error) { - throw error; - } - - if (event) { - listener(this.toFabricBlockEvent(listenerType, event)); - } else { - this.log.warn( - "SubscribeDelegatedSign() missing event - without an error.", - ); - } - } catch (error) { - const errorMessage = safeStringifyException(error); - log.warn("SubscribeDelegatedSign callback exception:", errorMessage); - socket.emit(WatchBlocksV1.Error, { - code: 500, - errorMessage, - }); - } - }; - - const eventListener = eventService.registerBlockListener(eventCallback, { - startBlock: options.startBlock, - unregister: false, - }); - - // Start monitoring - const monitorRequest = eventService.build(userIdCtx, { - blockType: listenerType, - startBlock: options.startBlock, - }); - const signature = await signCallback( - monitorRequest, - options.uniqueTransactionData, - ); - eventService.sign(signature); - await eventService.send(); - - socket.on("disconnect", async (reason: string) => { - log.info( - "WebSocket:disconnect => reason=%o clientId=%s", - reason, - clientId, - ); - - eventListener.unregisterEventListener(); - eventService.close(); - channel.close(); - channel.client.close(); - this.close(); - }); - - socket.on(WatchBlocksV1.Unsubscribe, () => { - log.info(`${WatchBlocksV1.Unsubscribe} => clientId: ${clientId}`); - this.close(); - }); - } catch (error) { - const errorMessage = safeStringifyException(error); - log.error(errorMessage); - socket.emit(WatchBlocksV1.Error, { - code: 500, - errorMessage, - }); - } - } - - /** - * Disconnect the socket if connected. - * This will trigger cleanups for all started monitoring logics that use this socket. - */ - close(): void { - if (this.socket.connected) { - this.socket.disconnect(true); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/addOrgX.sh b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/addOrgX.sh deleted file mode 100755 index 51fdd040f7..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/addOrgX.sh +++ /dev/null @@ -1,233 +0,0 @@ -#!/bin/bash -# -# Copyright IBM Corp All Rights Reserved -# -# SPDX-License-Identifier: Apache-2.0 -# -# Adapted from fabric-samples, Hyperledger - -# This script extends the Hyperledger Fabric test network by adding -# adding an organization to the network -# - -set -ex - -# Create Organziation crypto material using cryptogen or CAs -function generateOrgX() { - # Create crypto material using cryptogen - if [ "$CA" == "false" ]; then - which cryptogen - if [ "$?" -ne 0 ]; then - fatalln "cryptogen tool not found. exiting" - fi - echo "Generating certificates using cryptogen tool" - - echo "Creating ${ORG_NAME} Identities" - - set -x - cryptogen generate --config=${ORG_NAME}-crypto.yaml --output="./organizations" - res=$? - { set +x; } 2>/dev/null - if [ $res -ne 0 ]; then - fatalln "Failed to generate certificates..." - fi - - fi - - # Create crypto material using Fabric CA - if [ "$CRYPTO" == "true" ]; then - - #TODO implement CA support feature - echo "CA not supported" - exit 1 - - fabric-ca-client version > /dev/null 2>&1 - if [[ $? -ne 0 ]]; then - echo "ERROR! fabric-ca-client binary not found.." - echo - echo "Follow the instructions in the Fabric docs to install the Fabric Binaries:" - echo "https://hyperledger-fabric.readthedocs.io/en/latest/install.html" - exit 1 - fi - - echo "Generating certificates using Fabric CA" - docker-compose -f $COMPOSE_FILE_CA up -d 2>&1 - - . fabric-ca/registerEnroll.sh - sleep 10 - - echo "Creating ${ORG_NAME} Identities" - createOrgX - - fi - - - echo "Generating CCP files for ${ORG_NAME}" - ./ccp-generate-orgX.sh - -} - -# Generate channel configuration transaction -function generateOrgXDefinition() { - which configtxgen - if [ "$?" -ne 0 ]; then - fatalln "configtxgen tool not found. exiting" - fi - echo "Generating ${ORG_NAME} organization definition" - export FABRIC_CFG_PATH=$PWD - set -x - #configtxgen -printOrg ${ORG_MSPID} -configPath ${CONFIG_TX_GEN_PATH} > ../fabric-samples/test-network/organizations/peerOrganizations/${ORG_NAME}.example.com/${ORG_NAME}.json - - configtxgen -printOrg ${ORG_MSPID} -configPath ${CONFIG_TX_GEN_PATH} > organizations/peerOrganizations/${ORG_NAME}.example.com/${ORG_NAME}.json - res=$? - { set +x; } 2>/dev/null - if [ $res -ne 0 ]; then - fatalln "Failed to generate ${ORG_NAME} organization definition..." - fi -} - -function OrgXUp () { - # start org3 nodes - if [ "${DATABASE}" == "couchdb" ]; then - echo "Starting $COMPOSE_FILE and $COMPOSE_FILE_COUCH" - #-p cactusfabrictestnetwork_test - docker-compose -p cactusfabrictestnetwork -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH up -d 2>&1 - else - #-p cactusfabrictestnetwork_test - echo "Starting $COMPOSE_FILE" - docker-compose -p cactusfabrictestnetwork -f $COMPOSE_FILE up -d 2>&1 - fi - if [ $? -ne 0 ]; then - fatalln "ERROR !!!! Unable to start ${ORG_NAME} network" - fi -} - -function preReqs () { - - echo "Setting /etc/hosts" - echo "localhost orderer.example.com" >> /etc/hosts - echo "127.0.0.1 orderer.example.com" >> /etc/hosts - echo 127.0.0.1 peer0.${ORG_NAME}.example.com >> /etc/hosts - echo 127.0.0.1 ${ORG_NAME}.example.com >> /etc/hosts - cat /etc/hosts -} - -# Generate the needed certificates, the genesis block and start the network. -function addOrgX () { - # RB: Assumption - there is a channel created and running - # RB: Always generates artifacts, even if they exist already - - echo "Generating ${ORG_NAME} crypto material" - generateOrgX - - echo "Copying existing crypto material to current folder" - cp -r /fabric-samples/test-network/organizations ./ - - - generateOrgXDefinition - - echo "Copying ${ORG_NAME} crypto material to current folder" - cp -r /fabric-samples/test-network/organizations ./ - echo "Bringing up ${ORG_NAME} peer" - - ##todo uncomment - OrgXUp - - echo "Generating and submitting config tx to add ${ORG_NAME}" - ./scripts/org3-scripts/updateChannelConfigOrgX.sh - if [ $? -ne 0 ]; then - fatalln "ERROR !!!! Unable to create config tx" - fi - - echo "Joining ${ORG_NAME} peers to network" - ./scripts/org3-scripts/joinChannelOrgX.sh $CHANNEL_NAME $CLI_DELAY $CLI_TIMEOUT $VERBOSE - if [ $? -ne 0 ]; then - fatalln "ERROR !!!! Unable to join ${ORG_NAME} peers to network" - fi - - echo "Completed adding ${ORG_NAME}" - exit 0 -} - - - -# Parse commandline args - -## Parse mode -if [[ $# -lt 1 ]] ; then - echo "Wrong command" - exit 0 -else - MODE=$1 - shift -fi - -# parse flags - -while [[ $# -ge 1 ]] ; do - key="$1" - case $key in - -h ) - printHelp - exit 0 - ;; - -c ) - CHANNEL_NAME="$2" - shift - ;; - -ca ) - CRYPTO="Certificate Authorities" - echo "Using CA" - ;; - -t ) - CLI_TIMEOUT="$2" - shift - ;; - -d ) - CLI_DELAY="$2" - shift - ;; - -s ) - DATABASE="$2" - shift - ;; - -verbose ) - VERBOSE=true - shift - ;; - * ) - errorln "Unknown flag: $key" - printHelp - exit 1 - ;; - esac - shift -done - - -# Determine whether starting, stopping, restarting or generating for announce -if [ "$MODE" == "up" ]; then - echo "PRINTING ENV VARS: ORG_NAME: ${ORG_NAME} | " - echo "Adding ${ORG_NAME}, from MSPID ${ORG_MSPID} to channel '${CHANNEL_NAME}' with '${CLI_TIMEOUT}' seconds and CLI delay of '${CLI_DELAY}' seconds and using database '${DATABASE}'" - -elif [ "$MODE" == "down" ]; then - EXPMODE="Stopping network" -elif [ "$MODE" == "generate" ]; then - EXPMODE="Generating certs and organization definition for Org3" -else - printHelp - exit 1 -fi - -#Create the network using docker compose -if [ "${MODE}" == "up" ]; then - preReqs - addOrgX -elif [ "${MODE}" == "generate" ]; then ## Generate Artifacts - generateOrg3 - generateOrg3Definition -else - echo "Invalid mode" - printHelp - exit 1 -fi diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-generate-orgX.sh b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-generate-orgX.sh deleted file mode 100755 index b038a8e4ca..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-generate-orgX.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -function one_line_pem { - echo "`awk 'NF {sub(/\\n/, ""); printf "%s\\\\\\\n",$0;}' $1`" -} - -function json_ccp { - local PP=$(one_line_pem $4) - local CP=$(one_line_pem $5) - sed -e "s/\${ORG}/$1/" \ - -e "s/\${P0PORT}/$2/" \ - -e "s/\${CAPORT}/$3/" \ - -e "s#\${PEERPEM}#$PP#" \ - -e "s#\${CAPEM}#$CP#" \ - ccp-template-orgX.json -} - -function yaml_ccp { - local PP=$(one_line_pem $4) - local CP=$(one_line_pem $5) - sed -e "s/\${ORG}/$1/" \ - -e "s/\${P0PORT}/$2/" \ - -e "s/\${CAPORT}/$3/" \ - -e "s#\${PEERPEM}#$PP#" \ - -e "s#\${CAPEM}#$CP#" \ - ccp-template-orgX.yaml | sed -e $'s/\\\\n/\\\n /g' -} - -ORG=${ORG_NAME} -P0PORT=${NEW_ORG_PORT} -CAPORT=${CA_PORT} -PEERPEM=organizations/peerOrganizations/${ORG}.example.com/tlsca/tlsca.${ORG}.example.com-cert.pem -CAPEM=organizations/peerOrganizations/${ORG}.example.com/ca/ca.${ORG}.example.com-cert.pem - -echo "$(json_ccp $ORG $P0PORT $CAPORT $PEERPEM $CAPEM)" > organizations/peerOrganizations/${ORG}.example.com/connection-${ORG}.json -echo "$(yaml_ccp $ORG $P0PORT $CAPORT $PEERPEM $CAPEM)" > organizations/peerOrganizations/${ORG}.example.com/connection-${ORG}.yaml diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template-orgX.json b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template-orgX.json deleted file mode 100644 index 4f1eefd00d..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template-orgX.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "test-network-${ORG}", - "version": "1.0.0", - "client": { - "organization": "${ORG}", - "connection": { - "timeout": { - "peer": { - "endorser": "300" - } - } - } - }, - "organizations": { - "${ORG}": { - "mspid": "${ORG}MSP", - "peers": [ - "peer0.${ORG}.example.com" - ], - "certificateAuthorities": [ - "ca.${ORG}.example.com" - ] - } - }, - "peers": { - "peer0.${ORG}.example.com": { - "url": "grpcs://localhost:${P0PORT}", - "tlsCACerts": { - "pem": "${PEERPEM}" - }, - "grpcOptions": { - "ssl-target-name-override": "peer0.${ORG}.example.com", - "hostnameOverride": "peer0.${ORG}.example.com" - } - } - }, - "certificateAuthorities": { - "ca.${ORG}.example.com": { - "url": "https://localhost:${CAPORT}", - "caName": "ca-${ORG}", - "tlsCACerts": { - "pem": "${CAPEM}" - }, - "httpOptions": { - "verify": false - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template-orgX.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template-orgX.yaml deleted file mode 100644 index ef1b15340e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template-orgX.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: test-network-${ORG} -version: 1.0.0 -client: - organization: ${ORG} - connection: - timeout: - peer: - endorser: '300' -organizations: - ${ORG}: - mspid: ${ORG}MSP - peers: - - peer0.${ORG}.example.com - certificateAuthorities: - - ca.${ORG}.example.com -peers: - peer0.${ORG}.example.com: - url: grpcs://localhost:${P0PORT} - tlsCACerts: - pem: | - ${PEERPEM} - grpcOptions: - ssl-target-name-override: peer0.${ORG}.example.com - hostnameOverride: peer0.${ORG}.example.com -certificateAuthorities: - ca.${ORG}.example.com: - url: https://localhost:${CAPORT} - caName: ca-${ORG} - tlsCACerts: - pem: | - ${CAPEM} - httpOptions: - verify: false diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template.json b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template.json deleted file mode 100644 index 2b19d1b9bf..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "test-network-org${ORG}", - "version": "1.0.0", - "client": { - "organization": "Org${ORG}", - "connection": { - "timeout": { - "peer": { - "endorser": "300" - } - } - } - }, - "organizations": { - "Org${ORG}": { - "mspid": "Org${ORG}MSP", - "peers": [ - "peer0.org${ORG}.example.com" - ], - "certificateAuthorities": [ - "ca.org${ORG}.example.com" - ] - } - }, - "peers": { - "peer0.org${ORG}.example.com": { - "url": "grpcs://localhost:${P0PORT}", - "tlsCACerts": { - "pem": "${PEERPEM}" - }, - "grpcOptions": { - "ssl-target-name-override": "peer0.org${ORG}.example.com", - "hostnameOverride": "peer0.org${ORG}.example.com" - } - } - }, - "certificateAuthorities": { - "ca.org${ORG}.example.com": { - "url": "https://localhost:${CAPORT}", - "caName": "ca-org${ORG}", - "tlsCACerts": { - "pem": "${CAPEM}" - }, - "httpOptions": { - "verify": false - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template.yaml deleted file mode 100644 index 7e65965f0c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/ccp-template.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: test-network-org${ORG} -version: 1.0.0 -client: - organization: Org${ORG} - connection: - timeout: - peer: - endorser: '300' -organizations: - Org${ORG}: - mspid: Org${ORG}MSP - peers: - - peer0.org${ORG}.example.com - certificateAuthorities: - - ca.org${ORG}.example.com -peers: - peer0.org${ORG}.example.com: - url: grpcs://localhost:${P0PORT} - tlsCACerts: - pem: | - ${PEERPEM} - grpcOptions: - ssl-target-name-override: peer0.org${ORG}.example.com - hostnameOverride: peer0.org${ORG}.example.com -certificateAuthorities: - ca.org${ORG}.example.com: - url: https://localhost:${CAPORT} - caName: ca-org${ORG} - tlsCACerts: - pem: | - ${CAPEM} - httpOptions: - verify: false diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/configtx-default.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/configtx-default.yaml deleted file mode 100644 index 93502f026a..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/configtx-default.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - ---- -################################################################################ -# -# Section: Organizations -# -# - This section defines the different organizational identities which will -# be referenced later in the configuration. -# -################################################################################ -Organizations: - - &Org3 - # DefaultOrg defines the organization which is used in the sampleconfig - # of the fabric.git development environment - Name: Org3MSP - - # ID to load the MSP definition as - ID: Org3MSP - - MSPDir: ../organizations/peerOrganizations/org3.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('Org3MSP.admin', 'Org3MSP.peer', 'Org3MSP.client')" - Writers: - Type: Signature - Rule: "OR('Org3MSP.admin', 'Org3MSP.client')" - Admins: - Type: Signature - Rule: "OR('Org3MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('Org3MSP.peer')" diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/configtx.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/configtx.yaml deleted file mode 100644 index 36fbc2e23b..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/configtx.yaml +++ /dev/null @@ -1,18 +0,0 @@ -Organizations: - - &org5 - Name: org5MSP - ID: org5MSP - MSPDir: organizations/peerOrganizations/org5.example.com/msp - Policies: - Readers: - Type: Signature - Rule: "OR('org5MSP.admin','org5MSP.peer','org5MSP.client')" - Writers: - Type: Signature - Rule: "OR('org5MSP.admin','org5MSP.client')" - Admins: - Type: Signature - Rule: "OR('org5MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('org5MSP.peer')" diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/core.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/core.yaml deleted file mode 100644 index 35cbd33702..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/core.yaml +++ /dev/null @@ -1,758 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - -############################################################################### -# -# Peer section -# -############################################################################### -peer: - - # The peer id provides a name for this peer instance and is used when - # naming docker resources. - id: jdoe - - # The networkId allows for logical separation of networks and is used when - # naming docker resources. - networkId: dev - - # The Address at local network interface this Peer will listen on. - # By default, it will listen on all network interfaces - listenAddress: 0.0.0.0:7051 - - # The endpoint this peer uses to listen for inbound chaincode connections. - # If this is commented-out, the listen address is selected to be - # the peer's address (see below) with port 7052 - # chaincodeListenAddress: 0.0.0.0:7052 - - # The endpoint the chaincode for this peer uses to connect to the peer. - # If this is not specified, the chaincodeListenAddress address is selected. - # And if chaincodeListenAddress is not specified, address is selected from - # peer address (see below). If specified peer address is invalid then it - # will fallback to the auto detected IP (local IP) regardless of the peer - # addressAutoDetect value. - # chaincodeAddress: 0.0.0.0:7052 - - # When used as peer config, this represents the endpoint to other peers - # in the same organization. For peers in other organization, see - # gossip.externalEndpoint for more info. - # When used as CLI config, this means the peer's endpoint to interact with - address: 0.0.0.0:7051 - - # Whether the Peer should programmatically determine its address - # This case is useful for docker containers. - # When set to true, will override peer address. - addressAutoDetect: false - - # Keepalive settings for peer server and clients - keepalive: - # Interval is the duration after which if the server does not see - # any activity from the client it pings the client to see if it's alive - interval: 7200s - # Timeout is the duration the server waits for a response - # from the client after sending a ping before closing the connection - timeout: 20s - # MinInterval is the minimum permitted time between client pings. - # If clients send pings more frequently, the peer server will - # disconnect them - minInterval: 60s - # Client keepalive settings for communicating with other peer nodes - client: - # Interval is the time between pings to peer nodes. This must - # greater than or equal to the minInterval specified by peer - # nodes - interval: 60s - # Timeout is the duration the client waits for a response from - # peer nodes before closing the connection - timeout: 20s - # DeliveryClient keepalive settings for communication with ordering - # nodes. - deliveryClient: - # Interval is the time between pings to ordering nodes. This must - # greater than or equal to the minInterval specified by ordering - # nodes. - interval: 60s - # Timeout is the duration the client waits for a response from - # ordering nodes before closing the connection - timeout: 20s - - - # Gossip related configuration - gossip: - # Bootstrap set to initialize gossip with. - # This is a list of other peers that this peer reaches out to at startup. - # Important: The endpoints here have to be endpoints of peers in the same - # organization, because the peer would refuse connecting to these endpoints - # unless they are in the same organization as the peer. - bootstrap: 127.0.0.1:7051 - - # NOTE: orgLeader and useLeaderElection parameters are mutual exclusive. - # Setting both to true would result in the termination of the peer - # since this is undefined state. If the peers are configured with - # useLeaderElection=false, make sure there is at least 1 peer in the - # organization that its orgLeader is set to true. - - # Defines whenever peer will initialize dynamic algorithm for - # "leader" selection, where leader is the peer to establish - # connection with ordering service and use delivery protocol - # to pull ledger blocks from ordering service. - useLeaderElection: false - # Statically defines peer to be an organization "leader", - # where this means that current peer will maintain connection - # with ordering service and disseminate block across peers in - # its own organization. Multiple peers or all peers in an organization - # may be configured as org leaders, so that they all pull - # blocks directly from ordering service. - orgLeader: true - - # Interval for membershipTracker polling - membershipTrackerInterval: 5s - - # Overrides the endpoint that the peer publishes to peers - # in its organization. For peers in foreign organizations - # see 'externalEndpoint' - endpoint: - # Maximum count of blocks stored in memory - maxBlockCountToStore: 10 - # Max time between consecutive message pushes(unit: millisecond) - maxPropagationBurstLatency: 10ms - # Max number of messages stored until a push is triggered to remote peers - maxPropagationBurstSize: 10 - # Number of times a message is pushed to remote peers - propagateIterations: 1 - # Number of peers selected to push messages to - propagatePeerNum: 3 - # Determines frequency of pull phases(unit: second) - # Must be greater than digestWaitTime + responseWaitTime - pullInterval: 4s - # Number of peers to pull from - pullPeerNum: 3 - # Determines frequency of pulling state info messages from peers(unit: second) - requestStateInfoInterval: 4s - # Determines frequency of pushing state info messages to peers(unit: second) - publishStateInfoInterval: 4s - # Maximum time a stateInfo message is kept until expired - stateInfoRetentionInterval: - # Time from startup certificates are included in Alive messages(unit: second) - publishCertPeriod: 10s - # Should we skip verifying block messages or not (currently not in use) - skipBlockVerification: false - # Dial timeout(unit: second) - dialTimeout: 3s - # Connection timeout(unit: second) - connTimeout: 2s - # Buffer size of received messages - recvBuffSize: 20 - # Buffer size of sending messages - sendBuffSize: 200 - # Time to wait before pull engine processes incoming digests (unit: second) - # Should be slightly smaller than requestWaitTime - digestWaitTime: 1s - # Time to wait before pull engine removes incoming nonce (unit: milliseconds) - # Should be slightly bigger than digestWaitTime - requestWaitTime: 1500ms - # Time to wait before pull engine ends pull (unit: second) - responseWaitTime: 2s - # Alive check interval(unit: second) - aliveTimeInterval: 5s - # Alive expiration timeout(unit: second) - aliveExpirationTimeout: 25s - # Reconnect interval(unit: second) - reconnectInterval: 25s - # Max number of attempts to connect to a peer - maxConnectionAttempts: 120 - # Message expiration factor for alive messages - msgExpirationFactor: 20 - # This is an endpoint that is published to peers outside of the organization. - # If this isn't set, the peer will not be known to other organizations. - externalEndpoint: - # Leader election service configuration - election: - # Longest time peer waits for stable membership during leader election startup (unit: second) - startupGracePeriod: 15s - # Interval gossip membership samples to check its stability (unit: second) - membershipSampleInterval: 1s - # Time passes since last declaration message before peer decides to perform leader election (unit: second) - leaderAliveThreshold: 10s - # Time between peer sends propose message and declares itself as a leader (sends declaration message) (unit: second) - leaderElectionDuration: 5s - - pvtData: - # pullRetryThreshold determines the maximum duration of time private data corresponding for a given block - # would be attempted to be pulled from peers until the block would be committed without the private data - pullRetryThreshold: 60s - # As private data enters the transient store, it is associated with the peer's ledger's height at that time. - # transientstoreMaxBlockRetention defines the maximum difference between the current ledger's height upon commit, - # and the private data residing inside the transient store that is guaranteed not to be purged. - # Private data is purged from the transient store when blocks with sequences that are multiples - # of transientstoreMaxBlockRetention are committed. - transientstoreMaxBlockRetention: 1000 - # pushAckTimeout is the maximum time to wait for an acknowledgement from each peer - # at private data push at endorsement time. - pushAckTimeout: 3s - # Block to live pulling margin, used as a buffer - # to prevent peer from trying to pull private data - # from peers that is soon to be purged in next N blocks. - # This helps a newly joined peer catch up to current - # blockchain height quicker. - btlPullMargin: 10 - # the process of reconciliation is done in an endless loop, while in each iteration reconciler tries to - # pull from the other peers the most recent missing blocks with a maximum batch size limitation. - # reconcileBatchSize determines the maximum batch size of missing private data that will be reconciled in a - # single iteration. - reconcileBatchSize: 10 - # reconcileSleepInterval determines the time reconciler sleeps from end of an iteration until the beginning - # of the next reconciliation iteration. - reconcileSleepInterval: 1m - # reconciliationEnabled is a flag that indicates whether private data reconciliation is enable or not. - reconciliationEnabled: true - # skipPullingInvalidTransactionsDuringCommit is a flag that indicates whether pulling of invalid - # transaction's private data from other peers need to be skipped during the commit time and pulled - # only through reconciler. - skipPullingInvalidTransactionsDuringCommit: false - # implicitCollectionDisseminationPolicy specifies the dissemination policy for the peer's own implicit collection. - # When a peer endorses a proposal that writes to its own implicit collection, below values override the default values - # for disseminating private data. - # Note that it is applicable to all channels the peer has joined. The implication is that requiredPeerCount has to - # be smaller than the number of peers in a channel that has the lowest numbers of peers from the organization. - implicitCollectionDisseminationPolicy: - # requiredPeerCount defines the minimum number of eligible peers to which the peer must successfully - # disseminate private data for its own implicit collection during endorsement. Default value is 0. - requiredPeerCount: 0 - # maxPeerCount defines the maximum number of eligible peers to which the peer will attempt to - # disseminate private data for its own implicit collection during endorsement. Default value is 1. - maxPeerCount: 1 - - # Gossip state transfer related configuration - state: - # indicates whenever state transfer is enabled or not - # default value is true, i.e. state transfer is active - # and takes care to sync up missing blocks allowing - # lagging peer to catch up to speed with rest network. - # Keep in mind that when peer.gossip.useLeaderElection is true - # and there are several peers in the organization, - # or peer.gossip.useLeaderElection is false alongside with - # peer.gossip.orgleader being false, the peer's ledger may lag behind - # the rest of the peers and will never catch up due to state transfer - # being disabled. - enabled: false - # checkInterval interval to check whether peer is lagging behind enough to - # request blocks via state transfer from another peer. - checkInterval: 10s - # responseTimeout amount of time to wait for state transfer response from - # other peers - responseTimeout: 3s - # batchSize the number of blocks to request via state transfer from another peer - batchSize: 10 - # blockBufferSize reflects the size of the re-ordering buffer - # which captures blocks and takes care to deliver them in order - # down to the ledger layer. The actual buffer size is bounded between - # 0 and 2*blockBufferSize, each channel maintains its own buffer - blockBufferSize: 20 - # maxRetries maximum number of re-tries to ask - # for single state transfer request - maxRetries: 3 - - # TLS Settings - tls: - # Require server-side TLS - enabled: false - # Require client certificates / mutual TLS for inbound connections. - # Note that clients that are not configured to use a certificate will - # fail to connect to the peer. - clientAuthRequired: false - # X.509 certificate used for TLS server - cert: - file: tls/server.crt - # Private key used for TLS server - key: - file: tls/server.key - # rootcert.file represents the trusted root certificate chain used for verifying certificates - # of other nodes during outbound connections. - # It is not required to be set, but can be used to augment the set of TLS CA certificates - # available from the MSPs of each channel’s configuration. - rootcert: - file: tls/ca.crt - # If mutual TLS is enabled, clientRootCAs.files contains a list of additional root certificates - # used for verifying certificates of client connections. - # It augments the set of TLS CA certificates available from the MSPs of each channel’s configuration. - # Minimally, set your organization's TLS CA root certificate so that the peer can receive join channel requests. - clientRootCAs: - files: - - tls/ca.crt - # Private key used for TLS when making client connections. - # If not set, peer.tls.key.file will be used instead - clientKey: - file: - # X.509 certificate used for TLS when making client connections. - # If not set, peer.tls.cert.file will be used instead - clientCert: - file: - - # Authentication contains configuration parameters related to authenticating - # client messages - authentication: - # the acceptable difference between the current server time and the - # client's time as specified in a client request message - timewindow: 15m - - # Path on the file system where peer will store data (eg ledger). This - # location must be access control protected to prevent unintended - # modification that might corrupt the peer operations. - fileSystemPath: /var/hyperledger/production - - # BCCSP (Blockchain crypto provider): Select which crypto implementation or - # library to use - BCCSP: - Default: SW - # Settings for the SW crypto provider (i.e. when DEFAULT: SW) - SW: - # TODO: The default Hash and Security level needs refactoring to be - # fully configurable. Changing these defaults requires coordination - # SHA2 is hardcoded in several places, not only BCCSP - Hash: SHA2 - Security: 256 - # Location of Key Store - FileKeyStore: - # If "", defaults to 'mspConfigPath'/keystore - KeyStore: - # Settings for the PKCS#11 crypto provider (i.e. when DEFAULT: PKCS11) - PKCS11: - # Location of the PKCS11 module library - Library: - # Token Label - Label: - # User PIN - Pin: - Hash: - Security: - - # Path on the file system where peer will find MSP local configurations - mspConfigPath: msp - - # Identifier of the local MSP - # ----!!!!IMPORTANT!!!-!!!IMPORTANT!!!-!!!IMPORTANT!!!!---- - # Deployers need to change the value of the localMspId string. - # In particular, the name of the local MSP ID of a peer needs - # to match the name of one of the MSPs in each of the channel - # that this peer is a member of. Otherwise this peer's messages - # will not be identified as valid by other nodes. - localMspId: SampleOrg - - # CLI common client config options - client: - # connection timeout - connTimeout: 3s - - # Delivery service related config - deliveryclient: - # It sets the total time the delivery service may spend in reconnection - # attempts until its retry logic gives up and returns an error - reconnectTotalTimeThreshold: 3600s - - # It sets the delivery service <-> ordering service node connection timeout - connTimeout: 3s - - # It sets the delivery service maximal delay between consecutive retries - reConnectBackoffThreshold: 3600s - - # A list of orderer endpoint addresses which should be overridden - # when found in channel configurations. - addressOverrides: - # - from: - # to: - # caCertsFile: - # - from: - # to: - # caCertsFile: - - # Type for the local MSP - by default it's of type bccsp - localMspType: bccsp - - # Used with Go profiling tools only in none production environment. In - # production, it should be disabled (eg enabled: false) - profile: - enabled: false - listenAddress: 0.0.0.0:6060 - - # Handlers defines custom handlers that can filter and mutate - # objects passing within the peer, such as: - # Auth filter - reject or forward proposals from clients - # Decorators - append or mutate the chaincode input passed to the chaincode - # Endorsers - Custom signing over proposal response payload and its mutation - # Valid handler definition contains: - # - A name which is a factory method name defined in - # core/handlers/library/library.go for statically compiled handlers - # - library path to shared object binary for pluggable filters - # Auth filters and decorators are chained and executed in the order that - # they are defined. For example: - # authFilters: - # - - # name: FilterOne - # library: /opt/lib/filter.so - # - - # name: FilterTwo - # decorators: - # - - # name: DecoratorOne - # - - # name: DecoratorTwo - # library: /opt/lib/decorator.so - # Endorsers are configured as a map that its keys are the endorsement system chaincodes that are being overridden. - # Below is an example that overrides the default ESCC and uses an endorsement plugin that has the same functionality - # as the default ESCC. - # If the 'library' property is missing, the name is used as the constructor method in the builtin library similar - # to auth filters and decorators. - # endorsers: - # escc: - # name: DefaultESCC - # library: /etc/hyperledger/fabric/plugin/escc.so - handlers: - authFilters: - - - name: DefaultAuth - - - name: ExpirationCheck # This filter checks identity x509 certificate expiration - decorators: - - - name: DefaultDecorator - endorsers: - escc: - name: DefaultEndorsement - library: - validators: - vscc: - name: DefaultValidation - library: - - # library: /etc/hyperledger/fabric/plugin/escc.so - # Number of goroutines that will execute transaction validation in parallel. - # By default, the peer chooses the number of CPUs on the machine. Set this - # variable to override that choice. - # NOTE: overriding this value might negatively influence the performance of - # the peer so please change this value only if you know what you're doing - validatorPoolSize: - - # The discovery service is used by clients to query information about peers, - # such as - which peers have joined a certain channel, what is the latest - # channel config, and most importantly - given a chaincode and a channel, - # what possible sets of peers satisfy the endorsement policy. - discovery: - enabled: true - # Whether the authentication cache is enabled or not. - authCacheEnabled: true - # The maximum size of the cache, after which a purge takes place - authCacheMaxSize: 1000 - # The proportion (0 to 1) of entries that remain in the cache after the cache is purged due to overpopulation - authCachePurgeRetentionRatio: 0.75 - # Whether to allow non-admins to perform non channel scoped queries. - # When this is false, it means that only peer admins can perform non channel scoped queries. - orgMembersAllowedAccess: false - - # Limits is used to configure some internal resource limits. - limits: - # Concurrency limits the number of concurrently running requests to a service on each peer. - # Currently this option is only applied to endorser service and deliver service. - # When the property is missing or the value is 0, the concurrency limit is disabled for the service. - concurrency: - # endorserService limits concurrent requests to endorser service that handles chaincode deployment, query and invocation, - # including both user chaincodes and system chaincodes. - endorserService: 2500 - # deliverService limits concurrent event listeners registered to deliver service for blocks and transaction events. - deliverService: 2500 - -############################################################################### -# -# VM section -# -############################################################################### -vm: - - # Endpoint of the vm management system. For docker can be one of the following in general - # unix:///var/run/docker.sock - # http://localhost:2375 - # https://localhost:2376 - endpoint: unix:///var/run/docker.sock - - # settings for docker vms - docker: - tls: - enabled: false - ca: - file: docker/ca.crt - cert: - file: docker/tls.crt - key: - file: docker/tls.key - - # Enables/disables the standard out/err from chaincode containers for - # debugging purposes - attachStdout: false - - # Parameters on creating docker container. - # Container may be efficiently created using ipam & dns-server for cluster - # NetworkMode - sets the networking mode for the container. Supported - # standard values are: `host`(default),`bridge`,`ipvlan`,`none`. - # Dns - a list of DNS servers for the container to use. - # Note: `Privileged` `Binds` `Links` and `PortBindings` properties of - # Docker Host Config are not supported and will not be used if set. - # LogConfig - sets the logging driver (Type) and related options - # (Config) for Docker. For more info, - # https://docs.docker.com/engine/admin/logging/overview/ - # Note: Set LogConfig using Environment Variables is not supported. - hostConfig: - NetworkMode: host - Dns: - # - 192.168.0.1 - LogConfig: - Type: json-file - Config: - max-size: "50m" - max-file: "5" - Memory: 2147483648 - -############################################################################### -# -# Chaincode section -# -############################################################################### -chaincode: - - # The id is used by the Chaincode stub to register the executing Chaincode - # ID with the Peer and is generally supplied through ENV variables - # the `path` form of ID is provided when installing the chaincode. - # The `name` is used for all other requests and can be any string. - id: - path: - name: - - # Generic builder environment, suitable for most chaincode types - builder: $(DOCKER_NS)/fabric-ccenv:$(TWO_DIGIT_VERSION) - - # Enables/disables force pulling of the base docker images (listed below) - # during user chaincode instantiation. - # Useful when using moving image tags (such as :latest) - pull: false - - golang: - # golang will never need more than baseos - runtime: $(DOCKER_NS)/fabric-baseos:$(TWO_DIGIT_VERSION) - - # whether or not golang chaincode should be linked dynamically - dynamicLink: false - - java: - # This is an image based on java:openjdk-8 with addition compiler - # tools added for java shim layer packaging. - # This image is packed with shim layer libraries that are necessary - # for Java chaincode runtime. - runtime: $(DOCKER_NS)/fabric-javaenv:$(TWO_DIGIT_VERSION) - - node: - # This is an image based on node:$(NODE_VER)-alpine - runtime: $(DOCKER_NS)/fabric-nodeenv:$(TWO_DIGIT_VERSION) - - # List of directories to treat as external builders and launchers for - # chaincode. The external builder detection processing will iterate over the - # builders in the order specified below. - externalBuilders: [] - # - path: /path/to/directory - # name: descriptive-builder-name - # propagateEnvironment: - # - ENVVAR_NAME_TO_PROPAGATE_FROM_PEER - # - GOPROXY - - # The maximum duration to wait for the chaincode build and install process - # to complete. - installTimeout: 300s - - # Timeout duration for starting up a container and waiting for Register - # to come through. - startuptimeout: 300s - - # Timeout duration for Invoke and Init calls to prevent runaway. - # This timeout is used by all chaincodes in all the channels, including - # system chaincodes. - # Note that during Invoke, if the image is not available (e.g. being - # cleaned up when in development environment), the peer will automatically - # build the image, which might take more time. In production environment, - # the chaincode image is unlikely to be deleted, so the timeout could be - # reduced accordingly. - executetimeout: 30s - - # There are 2 modes: "dev" and "net". - # In dev mode, user runs the chaincode after starting peer from - # command line on local machine. - # In net mode, peer will run chaincode in a docker container. - mode: net - - # keepalive in seconds. In situations where the communication goes through a - # proxy that does not support keep-alive, this parameter will maintain connection - # between peer and chaincode. - # A value <= 0 turns keepalive off - keepalive: 0 - - # enabled system chaincodes - system: - _lifecycle: enable - cscc: enable - lscc: enable - qscc: enable - - # Logging section for the chaincode container - logging: - # Default level for all loggers within the chaincode container - level: info - # Override default level for the 'shim' logger - shim: warning - # Format for the chaincode container logs - format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}' - -############################################################################### -# -# Ledger section - ledger configuration encompasses both the blockchain -# and the state -# -############################################################################### -ledger: - - blockchain: - - state: - # stateDatabase - options are "goleveldb", "CouchDB" - # goleveldb - default state database stored in goleveldb. - # CouchDB - store state database in CouchDB - stateDatabase: goleveldb - # Limit on the number of records to return per query - totalQueryLimit: 100000 - couchDBConfig: - # It is recommended to run CouchDB on the same server as the peer, and - # not map the CouchDB container port to a server port in docker-compose. - # Otherwise proper security must be provided on the connection between - # CouchDB client (on the peer) and server. - couchDBAddress: 127.0.0.1:5984 - # This username must have read and write authority on CouchDB - username: - # The password is recommended to pass as an environment variable - # during start up (eg CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD). - # If it is stored here, the file must be access control protected - # to prevent unintended users from discovering the password. - password: - # Number of retries for CouchDB errors - maxRetries: 3 - # Number of retries for CouchDB errors during peer startup. - # The delay between retries doubles for each attempt. - # Default of 10 retries results in 11 attempts over 2 minutes. - maxRetriesOnStartup: 10 - # CouchDB request timeout (unit: duration, e.g. 20s) - requestTimeout: 35s - # Limit on the number of records per each CouchDB query - # Note that chaincode queries are only bound by totalQueryLimit. - # Internally the chaincode may execute multiple CouchDB queries, - # each of size internalQueryLimit. - internalQueryLimit: 1000 - # Limit on the number of records per CouchDB bulk update batch - maxBatchUpdateSize: 1000 - # Warm indexes after every N blocks. - # This option warms any indexes that have been - # deployed to CouchDB after every N blocks. - # A value of 1 will warm indexes after every block commit, - # to ensure fast selector queries. - # Increasing the value may improve write efficiency of peer and CouchDB, - # but may degrade query response time. - warmIndexesAfterNBlocks: 1 - # Create the _global_changes system database - # This is optional. Creating the global changes database will require - # additional system resources to track changes and maintain the database - createGlobalChangesDB: false - # CacheSize denotes the maximum mega bytes (MB) to be allocated for the in-memory state - # cache. Note that CacheSize needs to be a multiple of 32 MB. If it is not a multiple - # of 32 MB, the peer would round the size to the next multiple of 32 MB. - # To disable the cache, 0 MB needs to be assigned to the cacheSize. - cacheSize: 64 - - history: - # enableHistoryDatabase - options are true or false - # Indicates if the history of key updates should be stored. - # All history 'index' will be stored in goleveldb, regardless if using - # CouchDB or alternate database for the state. - enableHistoryDatabase: true - - pvtdataStore: - # the maximum db batch size for converting - # the ineligible missing data entries to eligible missing data entries - collElgProcMaxDbBatchSize: 5000 - # the minimum duration (in milliseconds) between writing - # two consecutive db batches for converting the ineligible missing data entries to eligible missing data entries - collElgProcDbBatchesInterval: 1000 - # The missing data entries are classified into two categories: - # (1) prioritized - # (2) deprioritized - # Initially, all missing data are in the prioritized list. When the - # reconciler is unable to fetch the missing data from other peers, - # the unreconciled missing data would be moved to the deprioritized list. - # The reconciler would retry deprioritized missing data after every - # deprioritizedDataReconcilerInterval (unit: minutes). Note that the - # interval needs to be greater than the reconcileSleepInterval - deprioritizedDataReconcilerInterval: 60m - - snapshots: - # Path on the file system where peer will store ledger snapshots - rootDir: /var/hyperledger/production/snapshots - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # most operations service endpoints require client authentication when TLS - # is enabled. clientAuthRequired requires client certificate authentication - # at the TLS layer to access all resources. - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # metrics provider is one of statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/configtx.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/configtx.yaml deleted file mode 100644 index 3829a96f22..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/configtx.yaml +++ /dev/null @@ -1,18 +0,0 @@ -Organizations: - - &org5 - Name: org5MSP - ID: org5MSP - MSPDir: ../organizations/peerOrganizations/org5.example.com/msp - Policies: - Readers: - Type: Signature - Rule: "OR('org5MSP.admin','org5MSP.peer','org5MSP.client')" - Writers: - Type: Signature - Rule: "OR('org5MSP.admin','org5MSP.client')" - Admins: - Type: Signature - Rule: "OR('org5MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('org5MSP.peer')" diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/docker-compose-ca-org3.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/docker-compose-ca-org3.yaml deleted file mode 100644 index fda2d83c78..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/docker-compose-ca-org3.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - -version: '2' - -networks: - test: - name: fabric_test - -services: - ca_org3: - image: hyperledger/fabric-ca:latest - labels: - service: hyperledger-fabric - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca-org3 - - FABRIC_CA_SERVER_TLS_ENABLED=true - - FABRIC_CA_SERVER_PORT=11054 - ports: - - "11054:11054" - command: sh -c 'fabric-ca-server start -b admin:adminpw -d' - volumes: - - ../fabric-ca/org3:/etc/hyperledger/fabric-ca-server - container_name: ca_org3 diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/docker-compose-couch-org3.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/docker-compose-couch-org3.yaml deleted file mode 100644 index a2166f837c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/docker-compose-couch-org3.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - -version: '2' - -networks: - test: - name: fabric_test - -services: - couchdb4: - container_name: couchdb4 - image: couchdb:3.1.1 - labels: - service: hyperledger-fabric - # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password - # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. - environment: - - COUCHDB_USER=admin - - COUCHDB_PASSWORD=adminpw - # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, - # for example map it to utilize Fauxton User Interface in dev environments. - ports: - - "9984:5984" - networks: - - test - - peer0.org3.example.com: - environment: - - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb4:5984 - # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD - # provide the credentials for ledger to connect to CouchDB. The username and password must - # match the username and password set for the associated CouchDB. - - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin - - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=adminpw - depends_on: - - couchdb4 - networks: - - test diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/docker-compose-org3.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/docker-compose-org3.yaml deleted file mode 100644 index 46681b17c1..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/docker/docker-compose-org3.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - -version: '2' - -volumes: - peer0.org3.example.com: - -networks: - test: - name: fabric_test - -services: - - peer0.org3.example.com: - container_name: peer0.org3.example.com - image: hyperledger/fabric-peer:latest - labels: - service: hyperledger-fabric - environment: - #Generic peer variables - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fabric_test - - FABRIC_LOGGING_SPEC=DEBUG - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_PROFILE_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt - # Peer specific variabes - - CORE_PEER_ID=peer0.org3.example.com - - CORE_PEER_ADDRESS=peer0.org3.example.com:11051 - - CORE_PEER_LISTENADDRESS=0.0.0.0:11051 - - CORE_PEER_CHAINCODEADDRESS=peer0.org3.example.com:11052 - - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:11052 - - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org3.example.com:11051 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org3.example.com:11051 - - CORE_PEER_LOCALMSPID=Org3MSP - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../../organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/msp:/etc/hyperledger/fabric/msp - - ../../organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls:/etc/hyperledger/fabric/tls - - peer0.org3.example.com:/var/hyperledger/production - working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer - command: peer node start - ports: - - 11051:11051 - networks: - - test diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/org3-crypto.yaml b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/org3-crypto.yaml deleted file mode 100644 index 73ae733372..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/org3-crypto.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# --------------------------------------------------------------------------- -# "PeerOrgs" - Definition of organizations managing peer nodes -# --------------------------------------------------------------------------- -PeerOrgs: - # --------------------------------------------------------------------------- - # Org3 - # --------------------------------------------------------------------------- - - Name: Org3 - Domain: org3.example.com - EnableNodeOUs: true - Template: - Count: 1 - SANS: - - localhost - Users: - Count: 1 diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/populate-docker.js b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/populate-docker.js deleted file mode 100644 index 11888f1f0c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/populate-docker.js +++ /dev/null @@ -1,219 +0,0 @@ -"use strict"; - -/*eslint-disable no-console*/ - -var fs = require("fs"); -var path = require("path"); -var util = require("util"); -var yaml = require("js-yaml"); - -try { - var myArgs = process.argv.slice(2); - //console.log("myArgs: ", myArgs); - - let templateType = myArgs[0]; - let orgName = myArgs[1]; - let hostPort = myArgs[2]; - let containerPort = myArgs[3]; - let mspId = orgName + "MSP"; - - if (hostPort === undefined || containerPort === undefined) { - throw new Error("ports undefined"); - } - - let directory = path.join(__dirname, "docker"); - let filename; - switch (templateType) { - case "couch": - filename = path.join(directory, "docker-compose-couch-org3.yaml"); - break; - case "compose": - filename = path.join(directory, "docker-compose-org3.yaml"); - break; - case "ca": - filename = path.join(directory, "docker-compose-ca-org3.yaml"); - break; - default: - throw new Error("template type not found"); - } - - let contents = fs.readFileSync(filename, "utf8"); - let data = yaml.load(contents); - - console.log(util.inspect(data, true, 10, true)); - - switch (templateType) { - case "couch": - // l. 26: ports - data["services"]["couchdb4"]["ports"] = `${hostPort}:${containerPort}`; - - // l. 30: org name - data["services"][orgName] = data["services"]["peer0.org3.example.com"]; - delete data["services"]["peer0.org3.example.com"]; - - // l.33: container port - data["services"][orgName]["environment"][1] = - `CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb4:${containerPort}`; - - //console.log("After modification"); - //console.log(util.inspect(data, true, 10, true)); - - let dumpCouch = yaml.dump(data, { - flowLevel: 3, - styles: { - "!!int": "hexadecimal", - "!!null": "camelcase", - }, - }); - - //console.log(dumpCouch); - - fs.writeFile( - path.join(__dirname, "docker", `docker-compose-couch-${orgName}.yaml`), - dumpCouch, - function (err) { - if (err) return console.log(err); - }, - ); - - console.log(`docker/docker-compose-couch-${orgName}.yaml`); - return; - - case "compose": - // l.9: volume name; peer0.org3.example.com: - data["volumes"] = orgName; - - // l. 17: org name - data["services"][orgName] = data["services"]["peer0.org3.example.com"]; - delete data["services"]["peer0.org3.example.com"]; - - //l.18: container name - data["services"][orgName]["container_name"] = orgName; - - // CORE_PEER_ID=peer0.org3.example.com - data["services"][orgName]["environment"][8] = `CORE_PEER_ID=${orgName}`; - - // CORE_PEER_ADDRESS=peer0.org3.example.com:11051 - data["services"][orgName]["environment"][9] = - `CORE_PEER_ADDRESS=${orgName}:${hostPort}`; - - // CORE_PEER_LISTENADDRESS=0.0.0.0:11051 - data["services"][orgName]["environment"][10] = - `CORE_PEER_LISTENADDRESS=0.0.0.0:${hostPort}`; - - // - CORE_PEER_CHAINCODEADDRESS=peer0.org3.example.com:11052 - const chaincodePort = parseInt(hostPort) + 1; - data["services"][orgName]["environment"][11] = - `CORE_PEER_CHAINCODEADDRESS=${orgName}:${chaincodePort}`; - - // CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:11052 - data["services"][orgName]["environment"][12] = - `CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:${chaincodePort}`; - - // - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org3.example.com:11051 - data["services"][orgName]["environment"][13] = - `CORE_PEER_GOSSIP_BOOTSTRAP=${orgName}:${hostPort}`; - - // - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org3.example.com:11051 - - data["services"][orgName]["environment"][14] = - `CORE_PEER_GOSSIP_EXTERNALENDPOINT=${orgName}:${hostPort}`; - - // - CORE_PEER_LOCALMSPID=Org3MSP - - data["services"][orgName]["environment"][15] = - `CORE_PEER_LOCALMSPID=${mspId}`; - - /// Volumes - // - ../../organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/msp:/etc/hyperledger/fabric/msp - data["services"][orgName]["volumes"][1] = - `../../organizations/peerOrganizations/${orgName}/peers/${orgName}/msp:/etc/hyperledger/fabric/msp`; - - // - ../../organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls:/etc/hyperledger/fabric/tls - data["services"][orgName]["volumes"][2] = - `../../organizations/peerOrganizations/${orgName}/peers/${orgName}/tls:/etc/hyperledger/fabric/tls`; - - // - peer0.org3.example.com:/var/hyperledger/production - data["services"][orgName]["volumes"][3] = - `${orgName}:/var/hyperledger/production`; - - data["services"][orgName]["ports"] = `${hostPort}:${hostPort}`; - - let dumpCompose = yaml.dump(data, { - flowLevel: 3, - styles: { - "!!int": "hexadecimal", - "!!null": "camelcase", - }, - }); - - //console.log(dumpCompose); - - fs.writeFile( - path.join(__dirname, "docker", `docker-compose-${orgName}.yaml`), - dumpCompose, - function (err) { - if (err) return console.log(err); - }, - ); - - console.log(`docker/docker-compose-${orgName}.yaml`); - return; - - case "ca": - const caName = `ca_${orgName}`; - data["services"][caName] = data["services"]["ca_org3"]; - delete data["services"]["ca_org3"]; - - // - FABRIC_CA_SERVER_CA_NAME=ca-org3 - data["services"][caName]["environment"][1] = - `FABRIC_CA_SERVER_CA_NAME=${caName}`; - - // - FABRIC_CA_SERVER_PORT=11054 - data["services"][caName]["environment"][3] = - `FABRIC_CA_SERVER_PORT=${hostPort}`; - - // - "11054:11054" - data["services"][caName]["ports"] = `${hostPort}:${hostPort}`; - - data["services"][caName]["volumes"] = - `../fabric-ca/${orgName}:/etc/hyperledger/fabric-ca-server`; - - data["services"][caName]["container_name"] = caName; - - let dumpCa = yaml.dump(data, { - flowLevel: 3, - styles: { - "!!int": "hexadecimal", - "!!null": "camelcase", - }, - }); - - //console.log(dumpCa); - - fs.writeFile( - path.join(__dirname, "docker", `docker-compose-ca-${orgName}.yaml`), - dumpCa, - function (err) { - if (err) return console.log(err); - }, - ); - - console.log(`docker/docker-compose-ca-${orgName}.yaml`); - return; - default: - throw new Error("template type not found"); - } - - /* - console.log(yaml.dump(data, { - flowLevel: 3, - styles: { - '!!int' : 'hexadecimal', - '!!null' : 'camelcase' - } - })); -*/ -} catch (err) { - console.log(err.stack || String(err)); -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/configUpdateOrgX.sh b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/configUpdateOrgX.sh deleted file mode 100755 index 7d25ba1b5c..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/configUpdateOrgX.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - -echo "======= ENTERING configUpdateOrgX ========" - -# import utils -. scripts/envVarOrgX.sh - -# fetchChannelConfig -# Writes the current channel config for a given channel to a JSON file -# NOTE: this must be run in a CLI container since it requires configtxlator -fetchChannelConfig() { - ORG=$1 - CHANNEL=$2 - OUTPUT=$3 - - setGlobals $ORG - - - peer channel fetch config config_block_${ORG_NAME}.pb -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com -c $CHANNEL --tls --cafile "$ORDERER_CA" - { set +x; } 2>/dev/null - - echo "Decoding config block to JSON and isolating config to ${OUTPUT}" - set -x - configtxlator proto_decode --input config_block_${ORG_NAME}.pb --type common.Block | jq .data.data[0].payload.data.config >"${OUTPUT}" - { set +x; } 2>/dev/null -} - -# createConfigUpdate -# Takes an original and modified config, and produces the config update tx -# which transitions between the two -# NOTE: this must be run in a CLI container since it requires configtxlator -createConfigUpdate() { - CHANNEL=$1 - ORIGINAL=$2 - MODIFIED=$3 - OUTPUT=$4 - - set -x - configtxlator proto_encode --input "${ORIGINAL}" --type common.Config >original_config.pb - configtxlator proto_encode --input "${MODIFIED}" --type common.Config >modified_config.pb - configtxlator compute_update --channel_id "${CHANNEL}" --original original_config.pb --updated modified_config.pb >config_update.pb - configtxlator proto_decode --input config_update.pb --type common.ConfigUpdate >config_update.json - echo '{"payload":{"header":{"channel_header":{"channel_id":"'$CHANNEL'", "type":2}},"data":{"config_update":'$(cat config_update.json)'}}}' | jq . >config_update_in_envelope.json - configtxlator proto_encode --input config_update_in_envelope.json --type common.Envelope >"${OUTPUT}" - { set +x; } 2>/dev/null -} - -# signConfigtxAsPeerOrg -# Set the peerOrg admin of an org and sign the config update -signConfigtxAsPeerOrg() { - ORG=$1 - CONFIGTXFILE=$2 - setGlobals $ORG - set -x - peer channel signconfigtx -f "${CONFIGTXFILE}" - { set +x; } 2>/dev/null -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/envVarOrgX.sh b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/envVarOrgX.sh deleted file mode 100755 index 1283892676..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/envVarOrgX.sh +++ /dev/null @@ -1,127 +0,0 @@ -#!/bin/bash -# -# Copyright IBM Corp All Rights Reserved -# -# SPDX-License-Identifier: Apache-2.0 -# - -# This is a collection of bash functions used by different scripts - -# imports -#. scripts/utils.sh - -export CORE_PEER_TLS_ENABLED=true -export ORDERER_CA=${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -export PEER0_ORG1_CA=${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt -export PEER0_ORG2_CA=${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -export PEER0_ORG3_CA=${PWD}/organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt -export ORDERER_ADMIN_TLS_SIGN_CERT=${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt -export ORDERER_ADMIN_TLS_PRIVATE_KEY=${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key - -export CUSTOM_ORG_CA=${PWD}/organizations/peerOrganizations/${ORG_NAME}.example.com/peers/peer0.${ORG_NAME}.example.com/tls/ca.crt - -# Set environment variables for the peer org -setGlobals() { - local USING_ORG="" - if [ -z "$OVERRIDE_ORG" ]; then - USING_ORG=$1 - else - USING_ORG="${OVERRIDE_ORG}" - fi - echo $USING_ORG - - if [[ $USING_ORG =~ ^[+-]?[0-9]+$ ]]; then - echo "Input is an integer." - - if [ $USING_ORG -eq 1 ]; then - export CORE_PEER_LOCALMSPID="Org1MSP" - export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG1_CA - export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - export CORE_PEER_ADDRESS=localhost:7051 - elif [ $USING_ORG -eq 2 ]; then - export CORE_PEER_LOCALMSPID="Org2MSP" - export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG2_CA - export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp - export CORE_PEER_ADDRESS=localhost:9051 - else - export CORE_PEER_LOCALMSPID=${ORG_MSPID} - export CORE_PEER_TLS_ROOTCERT_FILE=${ORG_NAME}_CA - export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/${ORG_NAME}.example.com/users/Admin@${ORG_NAME}.example.com/msp - export CORE_PEER_ADDRESS=localhost:${NEW_ORG_PORT} - fi - else - echo "Input is a string" - echo "Setting globals with organization ${USING_ORG}" - export CORE_PEER_LOCALMSPID=${ORG_MSPID} - export CORE_PEER_TLS_ROOTCERT_FILE=$CUSTOM_ORG_CA - export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/${ORG_NAME}.example.com/users/Admin@${ORG_NAME}.example.com/msp - export CORE_PEER_ADDRESS=localhost:${NEW_ORG_PORT} -fi - - - - - if [ "$VERBOSE" == "true" ]; then - env | grep CORE - fi -} - -# Set environment variables for use in the CLI container -setGlobalsCLI() { - setGlobals $1 - - local USING_ORG="" - if [ -z "$OVERRIDE_ORG" ]; then - USING_ORG=$1 - else - USING_ORG="${OVERRIDE_ORG}" - fi - - if [[ $USING_ORG =~ ^[+-]?[0-9]+$ ]]; then - echo "Input is an integer." - - - - if [ $USING_ORG -eq 1 ]; then - export CORE_PEER_ADDRESS=peer0.org1.example.com:7051 - elif [ $USING_ORG -eq 2 ]; then - export CORE_PEER_ADDRESS=peer0.org2.example.com:9051 - - fi - else - echo "Setting global cli with organization ${USING_ORG}" - export CORE_PEER_ADDRESS=peer0.${ORG_NAME}.example.com:${NEW_ORG_PORT} - fi -} - -# parsePeerConnectionParameters $@ -# Helper function that sets the peer connection parameters for a chaincode -# operation -parsePeerConnectionParameters() { - PEER_CONN_PARMS=() - PEERS="" - while [ "$#" -gt 0 ]; do - setGlobals $1 - PEER="peer0.org$1" - ## Set peer addresses - if [ -z "$PEERS" ] - then - PEERS="$PEER" - else - PEERS="$PEERS $PEER" - fi - PEER_CONN_PARMS=("${PEER_CONN_PARMS[@]}" --peerAddresses $CORE_PEER_ADDRESS) - ## Set path to TLS certificate - CA=PEER0_ORG$1_CA - TLSINFO=(--tlsRootCertFiles "${!CA}") - PEER_CONN_PARMS=("${PEER_CONN_PARMS[@]}" "${TLSINFO[@]}") - # shift by one to get to the next organization - shift - done -} - -verifyResult() { - if [ $1 -ne 0 ]; then - echo "$2" - fi -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/org3-scripts/joinChannelOrgX.sh b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/org3-scripts/joinChannelOrgX.sh deleted file mode 100755 index 84b487b1fd..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/org3-scripts/joinChannelOrgX.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# This script is designed to be run in the cli container as the -# second step of the EYFN tutorial. It joins the org3 peers to the -# channel previously setup in the BYFN tutorial and install the -# chaincode as version 2.0 on peer0.org3. -# -echo "======= ENTERING joinChannel-orgX ========" - -CHANNEL_NAME="$1" -DELAY="$2" -TIMEOUT="$3" -VERBOSE="$4" -COUNTER=1 -MAX_RETRY=$MAX_RETRY - -# import environment variables -. scripts/envVarOrgX.sh - -# joinChannel ORG -joinChannel() { - ORG=$1 - local rc=1 - local COUNTER=1 - ## Sometimes Join takes time, hence retry - while [ $rc -ne 0 -a $COUNTER -lt $MAX_RETRY ] ; do - sleep $DELAY - set -x - peer channel join -b $BLOCKFILE --certfile $CORE_PEER_TLS_ROOTCERT_FILE >&log.txt - res=$? - { set +x; } 2>/dev/null - let rc=$res - COUNTER=$(expr $COUNTER + 1) - done - cat log.txt - verifyResult $res "After $MAX_RETRY attempts, ${ORG_NAME} has failed to join channel '$CHANNEL_NAME' " -} - -setAnchorPeer() { - ORG=$1 - scripts/setAnchorPeerOrgX.sh $ORG $CHANNEL_NAME -} - -setGlobalsCLI ${ORG_NAME} -BLOCKFILE="${CHANNEL_NAME}.block" - -echo "Fetching channel config block from orderer..." -set -x -peer channel fetch 0 $BLOCKFILE -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com -c $CHANNEL_NAME --tls --cafile "$ORDERER_CA" >&log.txt -res=$? -{ set +x; } 2>/dev/null -cat log.txt -verifyResult $res "Fetching co didn't provnfig block from orderer has failed" - -echo "Joining ${ORG_NAME} peer to the channel..." -joinChannel ${ORG_NAME} - -echo "Setting anchor peer for ${ORG_NAME}..." -setAnchorPeer ${ORG_NAME} - -echo "Channel '$CHANNEL_NAME' joined" -echo "${ORG_NAME} peer successfully added to network" \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/org3-scripts/updateChannelConfigOrgX.sh b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/org3-scripts/updateChannelConfigOrgX.sh deleted file mode 100755 index b4dc0d06fd..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/org3-scripts/updateChannelConfigOrgX.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/bash -# -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# This script is designed to be run in the cli container as the -# first step of the EYFN tutorial. It creates and submits a -# configuration transaction to add ${ORG_NAME} to the test network -# - - - -#### config functions - -# import utils -#. scripts/envVarOrgX.sh - -# fetchChannelConfig -# Writes the current channel config for a given channel to a JSON file -# NOTE: this must be run in a CLIUSING_ORG container since it requires configtxlator -fetchChannelConfig() { - ORG=$1 - CHANNEL=$2 - OUTPUT=$3 - - setGlobals $ORG - - - peer channel fetch config config_block_${ORG_NAME}.pb -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com -c $CHANNEL --tls --cafile "$ORDERER_CA" - { set +x; } 2>/dev/null - - echo "Decoding config block to JSON and isolating config to ${OUTPUT}" - set -x - configtxlator proto_decode --input config_block_${ORG_NAME}.pb --type common.Block | jq .data.data[0].payload.data.config >"${OUTPUT}" - { set +x; } 2>/dev/null -} - -# createConfigUpdate -# Takes an original and modified config, and produces the config update tx -# which transitions between the two -# NOTE: this must be run in a CLI container since it requires configtxlator -createConfigUpdate() { - CHANNEL=$1 - ORIGINAL=$2 - MODIFIED=$3 - OUTPUT=$4 - - set -x - configtxlator proto_encode --input "${ORIGINAL}" --type common.Config >original_config.pb - configtxlator proto_encode --input "${MODIFIED}" --type common.Config >modified_config.pb - configtxlator compute_update --channel_id "${CHANNEL}" --original original_config.pb --updated modified_config.pb >config_update.pb - configtxlator proto_decode --input config_update.pb --type common.ConfigUpdate >config_update.json - echo '{"payload":{"header":{"channel_header":{"channel_id":"'$CHANNEL'", "type":2}},"data":{"config_update":'$(cat config_update.json)'}}}' | jq . >config_update_in_envelope.json - configtxlator proto_encode --input config_update_in_envelope.json --type common.Envelope >"${OUTPUT}" - { set +x; } 2>/dev/null -} - -# signConfigtxAsPeerOrg -# Set the peerOrg admin of an org and sign the config update -signConfigtxAsPeerOrg() { - ORG=$1 - CONFIGTXFILE=$2 - setGlobals $ORG - set -x - peer channel signconfigtx -f "${CONFIGTXFILE}" - { set +x; } 2>/dev/null -} - - -echo "======= ENTERING updateChannelConfig-orgX ========" - -CHANNEL_NAME=${CHANNEL_NAME} -DELAY=${CLI_DELAY} -TIMEOUT=${CLI_TIMEOUT} -VERBOSE=${VERBOSE} -COUNTER=1 -MAX_RETRY=${MAX_RETRY} -THIS_ORG_PATH=./organizations/peerOrganizations/${ORG_NAME}.example.com - -# imports -. scripts/envVarOrgX.sh -#. scripts/configUpdateOrgX.sh - -echo "Creating config transaction to add ${ORG_NAME} to network" -# Fetch the config for the channel, writing it to config_ORG_NAME.json -fetchChannelConfig 1 ${CHANNEL_NAME} ${THIS_ORG_PATH}/config_${ORG_NAME}.json - - -echo "Modify the configuration to append the new org" -set -x - - -ORG_MSPID=$ORG_MSPID -#jq -s '.[0] * {"create config channel_group":{"groups":{"Application":{"groups": {"'"$ORG_NAME"'":.[1]}}}}}' $THIS_ORG_PATH/config_${ORG_NAME}.json $THIS_ORG_PATH/${ORG_NAME}.json > $THIS_ORG_PATH/modified_config_${ORG_NAME}.json -#was working / accepting; try default with org3 -#jq -s '.[0] * {"channel_group":{"groups":{"Application":{"groups": {"Org3MSP":.[1]}}}}}' $THIS_ORG_PATH/config_${ORG_NAME}.json $THIS_ORG_PATH/${ORG_NAME}.json > $THIS_ORG_PATH/modified_config_${ORG_NAME}.json - -jq -s '.[0] * {"channel_group":{"groups":{"Application":{"groups": {"'"$ORG_MSPID"'":.[1]}}}}}' $THIS_ORG_PATH/config_${ORG_NAME}.json $THIS_ORG_PATH/${ORG_NAME}.json > $THIS_ORG_PATH/modified_config_${ORG_NAME}.json - -{ set +x; } 2>/dev/null - - -echo "Create config update" -# Compute a config update, based on the differences between config.json and modified_config.json, write it as a transaction to ${ORG_NAME}_update_in_envelope.pb -createConfigUpdate ${CHANNEL_NAME} $THIS_ORG_PATH/config_${ORG_NAME}.json $THIS_ORG_PATH/modified_config_${ORG_NAME}.json $THIS_ORG_PATH/${ORG_NAME}_update_in_envelope.pb - - -echo "Signing config transaction" -signConfigtxAsPeerOrg 1 $THIS_ORG_PATH/${ORG_NAME}_update_in_envelope.pb -localhost -echo "Submitting transaction from a different peer (peer0.org2) which also signs it" -set -x -setGlobals 2 -peer channel update -f $THIS_ORG_PATH/${ORG_NAME}_update_in_envelope.pb -c ${CHANNEL_NAME} -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile "$ORDERER_CA" -{ set +x; } 2>/dev/null - -echo "Config transaction to add ${ORG_NAME} to network submitted" \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/setAnchorPeerOrgX.sh b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/setAnchorPeerOrgX.sh deleted file mode 100755 index b41c34b6e7..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/scripts/setAnchorPeerOrgX.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -# -# Copyright IBM Corp. All Rights Reserved. -# -# SPDX-License-Identifier: Apache-2.0 -# - -# import utils -. scripts/envVarOrgX.sh -. scripts/configUpdateOrgX.sh - - -# NOTE: this must be run in a CLI container since it requires jq and configtxlator -createAnchorPeerUpdate() { - echo "Fetching channel config for channel $CHANNEL_NAME" - fetchChannelConfig $ORG $CHANNEL_NAME ${CORE_PEER_LOCALMSPID}config.json - - echo "Generating anchor peer update transaction for ${ORG_NAME} on channel $CHANNEL_NAME" - if [[ $ORG =~ ^[+-]?[0-9]+$ ]]; then - echo "Input is an integer." - if [ $ORG -eq 1 ]; then - HOST="peer0.org1.example.com" - PORT=7051 - elif [ $ORG -eq 2 ]; then - HOST="peer0.org2.example.com" - PORT=9051 - else - echo "Using custom org" - HOST=${ORG_NAME}.example.com - PORT=${NEW_ORG_PORT} - fi - - else - echo "Using custom org" - HOST=${ORG_NAME}.example.com - PORT=${NEW_ORG_PORT} - fi - - set -x - # Modify the configuration to append the anchor peer - jq '.channel_group.groups.Application.groups.'${CORE_PEER_LOCALMSPID}'.values += {"AnchorPeers":{"mod_policy": "Admins","value":{"anchor_peers": [{"host": "'$HOST'","port": '$PORT'}]},"version": "0"}}' ${CORE_PEER_LOCALMSPID}config.json > ${CORE_PEER_LOCALMSPID}modified_config.json - { set +x; } 2>/dev/null - - # Compute a config update, based on the differences between - # {orgmsp}config.json and {orgmsp}modified_config.json, write - # it as a transaction to {orgmsp}anchors.tx - createConfigUpdate ${CHANNEL_NAME} ${CORE_PEER_LOCALMSPID}config.json ${CORE_PEER_LOCALMSPID}modified_config.json ${CORE_PEER_LOCALMSPID}anchors.tx -} - -updateAnchorPeer() { - peer channel update -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com -c $CHANNEL_NAME -f ${CORE_PEER_LOCALMSPID}anchors.tx --tls --cafile "$ORDERER_CA" >&log.txt - res=$? - cat log.txt - verifyResult $res "Anchor peer update failed" - echo "Anchor peer set for org '$CORE_PEER_LOCALMSPID' on channel '$CHANNEL_NAME'" -} - -ORG=$1 -CHANNEL_NAME=$2 -setGlobalsCLI $ORG - -createAnchorPeerUpdate - -updateAnchorPeer \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/test-script.sh b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/test-script.sh deleted file mode 100755 index c1b219f06e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/addOrgX/test-script.sh +++ /dev/null @@ -1,71 +0,0 @@ -echo PATH >> envs -echo $PATH >> envs -echo PATH -echo $PATH - -echo ORG_MSPID >> envs -echo $ORG_MSPID >> envs -echo ORG_MSPID -echo $ORG_MSPID - -echo ORG_NAME >> envs -echo $ORG_NAME >> envs -echo ORG_NAME -echo $ORG_NAME - -echo CHANNEL_NAME >> envs -echo $CHANNEL_NAME >> envs - -echo CHANNEL_NAME -echo $CHANNEL_NAME - -echo CLI_TIMEOUT >> envs -echo $CLI_TIMEOUT >> envs - -echo CLI_TIMEOUT -echo $CLI_TIMEOUT - -echo DATABASE >> envs -echo $DATABASE >> envs - -echo DATABASE -echo $DATABASE - -echo COMPOSE_FILE_COUCH >> envs -echo $COMPOSE_FILE_COUCH >> envs - -echo COMPOSE_FILE_COUCH -echo $COMPOSE_FILE_COUCH - -echo COMPOSE_FILE >> envs -echo $COMPOSE_FILE >> envs - - -echo COMPOSE_FILE -echo $COMPOSE_FILE - -echo COMPOSE_FILE_CA >> envs -echo $COMPOSE_FILE_CA >> envs - - -echo COMPOSE_FILE_CA -echo $COMPOSE_FILE_CA - -echo FABRIC_LOGGING_SPEC >> envs -echo $FABRIC_LOGGING_SPEC >> envs - - -echo FABRIC_LOGGING_SPEC -echo $FABRIC_LOGGING_SPEC - -echo GO111MODULE >> envs -echo $GO111MODULE >> envs - -echo GO111MODULE -echo $GO111MODULE - -echo FABRIC_CFG_PATH >> envs -echo $FABRIC_CFG_PATH >> envs - -echo FABRIC_CFG_PATH -echo $FABRIC_CFG_PATH \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/microfab.config b/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/microfab.config deleted file mode 100644 index cfe3da05fe..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/resources/fixtures/microfab.config +++ /dev/null @@ -1,37 +0,0 @@ -{ - "port": 8080, - "endorsing_organizations":[ - { - "name": "Org1" - }, - { - "name": "Org2" - }, - { - "name": "Org3" - }, - { - "name": "Org4" - }, - { - "name": "Org5" - } - ], - "channels":[ - { - "name": "channel1", - "endorsing_organizations":[ - "Org1", - "Org2" - ] - }, - { - "name": "channel2", - "endorsing_organizations":[ - "Org2", - "Org3" - ], - "capability_level": "V1_4_2" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/common/get-block.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/common/get-block.ts deleted file mode 100644 index 12afa0cf6f..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/common/get-block.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Logger } from "@hyperledger/cactus-common"; -import { - GatewayOptions, - GetBlockRequestV1Query, - GetBlockResponseTypeV1, - DefaultApi as FabricApi, -} from "../../../main/typescript/generated/openapi/typescript-axios/api"; - -/** - * Run get block endpoint using a query, do basic response checks. - * Can be reused throughout the tests. - * - * @param query how to find requested block - * @param responseType response type requested - * - * @returns block object / block buffer - */ -export async function getBlock(opts: { - readonly query: GetBlockRequestV1Query; - readonly responseType?: GetBlockResponseTypeV1; - readonly gatewayOptions: GatewayOptions; - readonly log: Logger; - readonly apiClient: FabricApi; - readonly ledgerChannelName: string; -}): Promise { - const { - responseType = GetBlockResponseTypeV1.Full, - ledgerChannelName, - gatewayOptions, - query, - log, - apiClient, - } = opts; - - const getBlockReq = { - channelName: ledgerChannelName, - gatewayOptions, - query, - responseType, - }; - - const getBlockResponse = await apiClient.getBlockV1(getBlockReq); - log.debug( - "getBlockResponse = ", - getBlockResponse.status, - getBlockResponse.data, - ); - - expect(getBlockResponse).toBeTruthy(); - expect(getBlockResponse.status).toEqual(200); - expect(getBlockResponse.data).toBeTruthy(); - - switch (responseType) { - case GetBlockResponseTypeV1.Full: - if (!("decodedBlock" in getBlockResponse.data)) { - throw new Error( - `Wrong response received - expected decoded, got: ${getBlockResponse.data}`, - ); - } - expect(getBlockResponse.data.decodedBlock).toBeTruthy(); - return getBlockResponse.data.decodedBlock; - case GetBlockResponseTypeV1.Encoded: - if (!("encodedBlock" in getBlockResponse.data)) { - throw new Error( - `Wrong response received - expected encoded, got: ${getBlockResponse.data}`, - ); - } - expect(getBlockResponse.data.encodedBlock).toBeTruthy(); - return getBlockResponse.data.encodedBlock; - case GetBlockResponseTypeV1.CactiTransactions: - if (!("cactiTransactionsEvents" in getBlockResponse.data)) { - throw new Error( - `Wrong response received - expected CactiTransactions, got: ${getBlockResponse.data}`, - ); - } - expect(getBlockResponse.data.cactiTransactionsEvents).toBeTruthy(); - return getBlockResponse.data.cactiTransactionsEvents; - case GetBlockResponseTypeV1.CactiFullBlock: - if (!("cactiFullEvents" in getBlockResponse.data)) { - throw new Error( - `Wrong response received - expected CactiFullBlock, got: ${getBlockResponse.data}`, - ); - } - expect(getBlockResponse.data.cactiFullEvents).toBeTruthy(); - return getBlockResponse.data.cactiFullEvents; - default: - // Will not compile if any type was not handled by above switch. - const unknownType: never = responseType; - const validTypes = Object.keys(GetBlockResponseTypeV1).join(";"); - const errorMessage = `Unknown get block response type '${unknownType}'. Accepted types for GetBlockResponseTypeV1 are: [${validTypes}]`; - throw new Error(errorMessage); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/common/send-transaction-on-fabric.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/common/send-transaction-on-fabric.ts deleted file mode 100644 index d05d7dc1a6..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/common/send-transaction-on-fabric.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Logger } from "@hyperledger/cactus-common"; - -import { FabricSigningCredential } from "../../../main/typescript/generated/openapi/typescript-axios/api"; -import { FabricContractInvocationType } from "../../../main/typescript/generated/openapi/typescript-axios/api"; -import { GatewayOptions } from "../../../main/typescript/generated/openapi/typescript-axios/api"; -import { DefaultApi as FabricApi } from "../../../main/typescript/generated/openapi/typescript-axios/api"; - -/** - * Create new asset on the ledger to trigger new transaction creation. - * - * @param assetName unique asset name to create - * @returns committed transaction id. - */ -export async function sendTransactionOnFabric(opts: { - readonly gatewayOptions: GatewayOptions; - readonly log: Logger; - readonly apiClient: FabricApi; - readonly assetName: string; - readonly ledgerChannelName: string; - readonly ledgerContractName: string; -}) { - const fn = "sendTransactionOnFabric()"; - - if (!opts) { - throw new TypeError(`${fn} arg opts cannot be falsy.`); - } - const { log, apiClient, gatewayOptions, assetName } = opts; - const { ledgerContractName, ledgerChannelName } = opts; - - if (!opts.gatewayOptions) { - throw new TypeError(`${fn} arg opts.gatewayOptions cannot be falsy.`); - } - if (!gatewayOptions.wallet) { - throw new TypeError(`${fn} arg opts.gatewayOptions.wallet cannot be falsy`); - } - - const createAssetResponse = await apiClient.runTransactionV1({ - signingCredential: gatewayOptions.wallet - .keychain as FabricSigningCredential, - channelName: ledgerChannelName, - invocationType: FabricContractInvocationType.Send, - contractName: ledgerContractName, - methodName: "CreateAsset", - params: [assetName, "green", "111", "someOwner", "299"], - }); - expect(createAssetResponse).toBeTruthy(); - expect(createAssetResponse.status).toEqual(200); - expect(createAssetResponse.data).toBeTruthy(); - const txId = createAssetResponse.data.transactionId; - expect(txId).toBeTruthy(); - - log.debug("Crated new transaction, txId:", txId); - return txId; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/META-INF/statedb/couchdb/collections/assetCollection/indexes/indexOwner.json b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/META-INF/statedb/couchdb/collections/assetCollection/indexes/indexOwner.json deleted file mode 100644 index e2d1d08704..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/META-INF/statedb/couchdb/collections/assetCollection/indexes/indexOwner.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "index": { - "fields": [ - "objectType", - "owner" - ] - }, - "ddoc": "indexOwnerDoc", - "name": "indexOwner", - "type": "json" -} - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/README.md b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/README.md deleted file mode 100644 index f87a95c6ec..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/README.md +++ /dev/null @@ -1 +0,0 @@ -[Using Private Data tutorial](https://hyperledger-fabric.readthedocs.io/en/latest/private_data_tutorial.html) diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/chaincode/asset_transfer.go b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/chaincode/asset_transfer.go deleted file mode 100644 index 5a61f627c0..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/chaincode/asset_transfer.go +++ /dev/null @@ -1,767 +0,0 @@ -/* -Copyright IBM Corp. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 -*/ - -package chaincode - -import ( - "bytes" - "encoding/base64" - "encoding/json" - "fmt" - "log" - - "github.com/hyperledger/fabric-chaincode-go/shim" - "github.com/hyperledger/fabric-contract-api-go/contractapi" -) - -const assetCollection = "assetCollection" -const transferAgreementObjectType = "transferAgreement" - -// SmartContract of this fabric sample -type SmartContract struct { - contractapi.Contract -} - -// Asset describes main asset details that are visible to all organizations -type Asset struct { - Type string `json:"objectType"` //Type is used to distinguish the various types of objects in state database - ID string `json:"assetID"` - Color string `json:"color"` - Size int `json:"size"` - Owner string `json:"owner"` -} - -// AssetPrivateDetails describes details that are private to owners -type AssetPrivateDetails struct { - ID string `json:"assetID"` - AppraisedValue int `json:"appraisedValue"` -} - -// TransferAgreement describes the buyer agreement returned by ReadTransferAgreement -type TransferAgreement struct { - ID string `json:"assetID"` - BuyerID string `json:"buyerID"` -} - -// CreateAsset creates a new asset by placing the main asset details in the assetCollection -// that can be read by both organizations. The appraisal value is stored in the owners org specific collection. -func (s *SmartContract) CreateAsset(ctx contractapi.TransactionContextInterface) error { - - // Get new asset from transient map - transientMap, err := ctx.GetStub().GetTransient() - if err != nil { - return fmt.Errorf("error getting transient: %v", err) - } - - // Asset properties are private, therefore they get passed in transient field, instead of func args - transientAssetJSON, ok := transientMap["asset_properties"] - if !ok { - //log error to stdout - return fmt.Errorf("asset not found in the transient map input") - } - - type assetTransientInput struct { - Type string `json:"objectType"` //Type is used to distinguish the various types of objects in state database - ID string `json:"assetID"` - Color string `json:"color"` - Size int `json:"size"` - AppraisedValue int `json:"appraisedValue"` - } - - var assetInput assetTransientInput - err = json.Unmarshal(transientAssetJSON, &assetInput) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON: %v", err) - } - - if len(assetInput.Type) == 0 { - return fmt.Errorf("objectType field must be a non-empty string") - } - if len(assetInput.ID) == 0 { - return fmt.Errorf("assetID field must be a non-empty string") - } - if len(assetInput.Color) == 0 { - return fmt.Errorf("color field must be a non-empty string") - } - if assetInput.Size <= 0 { - return fmt.Errorf("size field must be a positive integer") - } - if assetInput.AppraisedValue <= 0 { - return fmt.Errorf("appraisedValue field must be a positive integer") - } - - // Check if asset already exists - assetAsBytes, err := ctx.GetStub().GetPrivateData(assetCollection, assetInput.ID) - if err != nil { - return fmt.Errorf("failed to get asset: %v", err) - } else if assetAsBytes != nil { - fmt.Println("Asset already exists: " + assetInput.ID) - return fmt.Errorf("this asset already exists: " + assetInput.ID) - } - - // Get ID of submitting client identity - clientID, err := submittingClientIdentity(ctx) - if err != nil { - return err - } - - // Verify that the client is submitting request to peer in their organization - // This is to ensure that a client from another org doesn't attempt to read or - // write private data from this peer. - /* - err = verifyClientOrgMatchesPeerOrg(ctx) - if err != nil { - return fmt.Errorf("CreateAsset cannot be performed: Error %v", err) - } - */ - // Make submitting client the owner - asset := Asset{ - Type: assetInput.Type, - ID: assetInput.ID, - Color: assetInput.Color, - Size: assetInput.Size, - Owner: clientID, - } - assetJSONasBytes, err := json.Marshal(asset) - if err != nil { - return fmt.Errorf("failed to marshal asset into JSON: %v", err) - } - - // Save asset to private data collection - // Typical logger, logs to stdout/file in the fabric managed docker container, running this chaincode - // Look for container name like dev-peer0.org1.example.com-{chaincodename_version}-xyz - log.Printf("CreateAsset Put: collection %v, ID %v, owner %v", assetCollection, assetInput.ID, clientID) - - err = ctx.GetStub().PutPrivateData(assetCollection, assetInput.ID, assetJSONasBytes) - if err != nil { - return fmt.Errorf("failed to put asset into private data collecton: %v", err) - } - - // Save asset details to collection visible to owning organization - assetPrivateDetails := AssetPrivateDetails{ - ID: assetInput.ID, - AppraisedValue: assetInput.AppraisedValue, - } - - assetPrivateDetailsAsBytes, err := json.Marshal(assetPrivateDetails) // marshal asset details to JSON - if err != nil { - return fmt.Errorf("failed to marshal into JSON: %v", err) - } - - // Get collection name for this organization. - orgCollection, err := getCollectionName(ctx) - if err != nil { - return fmt.Errorf("failed to infer private collection name for the org: %v", err) - } - - // Put asset appraised value into owners org specific private data collection - log.Printf("Put: collection %v, ID %v", orgCollection, assetInput.ID) - err = ctx.GetStub().PutPrivateData(orgCollection, assetInput.ID, assetPrivateDetailsAsBytes) - if err != nil { - return fmt.Errorf("failed to put asset private details: %v", err) - } - return nil -} - -// AgreeToTransfer is used by the potential buyer of the asset to agree to the -// asset value. The agreed to appraisal value is stored in the buying orgs -// org specifc collection, while the the buyer client ID is stored in the asset collection -// using a composite key -func (s *SmartContract) AgreeToTransfer(ctx contractapi.TransactionContextInterface) error { - - // Get ID of submitting client identity - clientID, err := submittingClientIdentity(ctx) - if err != nil { - return err - } - - // Value is private, therefore it gets passed in transient field - transientMap, err := ctx.GetStub().GetTransient() - if err != nil { - return fmt.Errorf("error getting transient: %v", err) - } - - // Persist the JSON bytes as-is so that there is no risk of nondeterministic marshaling. - valueJSONasBytes, ok := transientMap["asset_value"] - if !ok { - return fmt.Errorf("asset_value key not found in the transient map") - } - - // Unmarshal the tranisent map to get the asset ID. - var valueJSON AssetPrivateDetails - err = json.Unmarshal(valueJSONasBytes, &valueJSON) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON: %v", err) - } - - // Do some error checking since we get the chance - if len(valueJSON.ID) == 0 { - return fmt.Errorf("assetID field must be a non-empty string") - } - if valueJSON.AppraisedValue <= 0 { - return fmt.Errorf("appraisedValue field must be a positive integer") - } - - // Read asset from the private data collection - asset, err := s.ReadAsset(ctx, valueJSON.ID) - if err != nil { - return fmt.Errorf("error reading asset: %v", err) - } - if asset == nil { - return fmt.Errorf("%v does not exist", valueJSON.ID) - } - // Verify that the client is submitting request to peer in their organization - err = verifyClientOrgMatchesPeerOrg(ctx) - if err != nil { - return fmt.Errorf("AgreeToTransfer cannot be performed: Error %v", err) - } - - // Get collection name for this organization. Needs to be read by a member of the organization. - orgCollection, err := getCollectionName(ctx) - if err != nil { - return fmt.Errorf("failed to infer private collection name for the org: %v", err) - } - - log.Printf("AgreeToTransfer Put: collection %v, ID %v", orgCollection, valueJSON.ID) - // Put agreed value in the org specifc private data collection - err = ctx.GetStub().PutPrivateData(orgCollection, valueJSON.ID, valueJSONasBytes) - if err != nil { - return fmt.Errorf("failed to put asset bid: %v", err) - } - - // Create agreeement that indicates which identity has agreed to purchase - // In a more realistic transfer scenario, a transfer agreement would be secured to ensure that it cannot - // be overwritten by another channel member - transferAgreeKey, err := ctx.GetStub().CreateCompositeKey(transferAgreementObjectType, []string{valueJSON.ID}) - if err != nil { - return fmt.Errorf("failed to create composite key: %v", err) - } - - log.Printf("AgreeToTransfer Put: collection %v, ID %v, Key %v", assetCollection, valueJSON.ID, transferAgreeKey) - err = ctx.GetStub().PutPrivateData(assetCollection, transferAgreeKey, []byte(clientID)) - if err != nil { - return fmt.Errorf("failed to put asset bid: %v", err) - } - - return nil -} - -// TransferAsset transfers the asset to the new owner by setting a new owner ID -func (s *SmartContract) TransferAsset(ctx contractapi.TransactionContextInterface) error { - - transientMap, err := ctx.GetStub().GetTransient() - if err != nil { - return fmt.Errorf("error getting transient %v", err) - } - - // Asset properties are private, therefore they get passed in transient field - transientTransferJSON, ok := transientMap["asset_owner"] - if !ok { - return fmt.Errorf("asset owner not found in the transient map") - } - - type assetTransferTransientInput struct { - ID string `json:"assetID"` - BuyerMSP string `json:"buyerMSP"` - } - - var assetTransferInput assetTransferTransientInput - err = json.Unmarshal(transientTransferJSON, &assetTransferInput) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON: %v", err) - } - - if len(assetTransferInput.ID) == 0 { - return fmt.Errorf("assetID field must be a non-empty string") - } - if len(assetTransferInput.BuyerMSP) == 0 { - return fmt.Errorf("buyerMSP field must be a non-empty string") - } - log.Printf("TransferAsset: verify asset exists ID %v", assetTransferInput.ID) - // Read asset from the private data collection - asset, err := s.ReadAsset(ctx, assetTransferInput.ID) - if err != nil { - return fmt.Errorf("error reading asset: %v", err) - } - if asset == nil { - return fmt.Errorf("%v does not exist", assetTransferInput.ID) - } - // Verify that the client is submitting request to peer in their organization - err = verifyClientOrgMatchesPeerOrg(ctx) - if err != nil { - return fmt.Errorf("TransferAsset cannot be performed: Error %v", err) - } - - // Verify transfer details and transfer owner - err = s.verifyAgreement(ctx, assetTransferInput.ID, asset.Owner, assetTransferInput.BuyerMSP) - if err != nil { - return fmt.Errorf("failed transfer verification: %v", err) - } - - transferAgreement, err := s.ReadTransferAgreement(ctx, assetTransferInput.ID) - if err != nil { - return fmt.Errorf("failed ReadTransferAgreement to find buyerID: %v", err) - } - if transferAgreement.BuyerID == "" { - return fmt.Errorf("BuyerID not found in TransferAgreement for %v", assetTransferInput.ID) - } - - // Transfer asset in private data collection to new owner - asset.Owner = transferAgreement.BuyerID - - assetJSONasBytes, err := json.Marshal(asset) - if err != nil { - return fmt.Errorf("failed marshalling asset %v: %v", assetTransferInput.ID, err) - } - - log.Printf("TransferAsset Put: collection %v, ID %v", assetCollection, assetTransferInput.ID) - err = ctx.GetStub().PutPrivateData(assetCollection, assetTransferInput.ID, assetJSONasBytes) //rewrite the asset - if err != nil { - return err - } - - // Get collection name for this organization - ownersCollection, err := getCollectionName(ctx) - if err != nil { - return fmt.Errorf("failed to infer private collection name for the org: %v", err) - } - - // Delete the asset appraised value from this organization's private data collection - err = ctx.GetStub().DelPrivateData(ownersCollection, assetTransferInput.ID) - if err != nil { - return err - } - - // Delete the transfer agreement from the asset collection - transferAgreeKey, err := ctx.GetStub().CreateCompositeKey(transferAgreementObjectType, []string{assetTransferInput.ID}) - if err != nil { - return fmt.Errorf("failed to create composite key: %v", err) - } - - err = ctx.GetStub().DelPrivateData(assetCollection, transferAgreeKey) - if err != nil { - return err - } - - return nil - -} - -// verifyAgreement is an internal helper function used by TransferAsset to verify -// that the transfer is being initiated by the owner and that the buyer has agreed -// to the same appraisal value as the owner -func (s *SmartContract) verifyAgreement(ctx contractapi.TransactionContextInterface, assetID string, owner string, buyerMSP string) error { - - // Check 1: verify that the transfer is being initiatied by the owner - - // Get ID of submitting client identity - clientID, err := submittingClientIdentity(ctx) - if err != nil { - return err - } - - if clientID != owner { - return fmt.Errorf("error: submitting client identity does not own asset") - } - - // Check 2: verify that the buyer has agreed to the appraised value - - // Get collection names - collectionOwner, err := getCollectionName(ctx) // get owner collection from caller identity - if err != nil { - return fmt.Errorf("failed to infer private collection name for the org: %v", err) - } - - collectionBuyer := buyerMSP + "PrivateCollection" // get buyers collection - - // Get hash of owners agreed to value - ownerAppraisedValueHash, err := ctx.GetStub().GetPrivateDataHash(collectionOwner, assetID) - if err != nil { - return fmt.Errorf("failed to get hash of appraised value from owners collection %v: %v", collectionOwner, err) - } - if ownerAppraisedValueHash == nil { - return fmt.Errorf("hash of appraised value for %v does not exist in collection %v", assetID, collectionOwner) - } - - // Get hash of buyers agreed to value - buyerAppraisedValueHash, err := ctx.GetStub().GetPrivateDataHash(collectionBuyer, assetID) - if err != nil { - return fmt.Errorf("failed to get hash of appraised value from buyer collection %v: %v", collectionBuyer, err) - } - if buyerAppraisedValueHash == nil { - return fmt.Errorf("hash of appraised value for %v does not exist in collection %v. AgreeToTransfer must be called by the buyer first", assetID, collectionBuyer) - } - - // Verify that the two hashes match - if !bytes.Equal(ownerAppraisedValueHash, buyerAppraisedValueHash) { - return fmt.Errorf("hash for appraised value for owner %x does not value for seller %x", ownerAppraisedValueHash, buyerAppraisedValueHash) - } - - return nil -} - -// DeleteAsset can be used by the owner of the asset to delete the asset -func (s *SmartContract) DeleteAsset(ctx contractapi.TransactionContextInterface) error { - - transientMap, err := ctx.GetStub().GetTransient() - if err != nil { - return fmt.Errorf("Error getting transient: %v", err) - } - - // Asset properties are private, therefore they get passed in transient field - transientDeleteJSON, ok := transientMap["asset_delete"] - if !ok { - return fmt.Errorf("asset to delete not found in the transient map") - } - - type assetDelete struct { - ID string `json:"assetID"` - } - - var assetDeleteInput assetDelete - err = json.Unmarshal(transientDeleteJSON, &assetDeleteInput) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON: %v", err) - } - - if len(assetDeleteInput.ID) == 0 { - return fmt.Errorf("assetID field must be a non-empty string") - } - - // Verify that the client is submitting request to peer in their organization - err = verifyClientOrgMatchesPeerOrg(ctx) - if err != nil { - return fmt.Errorf("DeleteAsset cannot be performed: Error %v", err) - } - - log.Printf("Deleting Asset: %v", assetDeleteInput.ID) - valAsbytes, err := ctx.GetStub().GetPrivateData(assetCollection, assetDeleteInput.ID) //get the asset from chaincode state - if err != nil { - return fmt.Errorf("failed to read asset: %v", err) - } - if valAsbytes == nil { - return fmt.Errorf("asset not found: %v", assetDeleteInput.ID) - } - - ownerCollection, err := getCollectionName(ctx) // Get owners collection - if err != nil { - return fmt.Errorf("failed to infer private collection name for the org: %v", err) - } - - //check the asset is in the caller org's private collection - valAsbytes, err = ctx.GetStub().GetPrivateData(ownerCollection, assetDeleteInput.ID) - if err != nil { - return fmt.Errorf("failed to read asset from owner's Collection: %v", err) - } - if valAsbytes == nil { - return fmt.Errorf("asset not found in owner's private Collection %v: %v", ownerCollection, assetDeleteInput.ID) - } - - // delete the asset from state - err = ctx.GetStub().DelPrivateData(assetCollection, assetDeleteInput.ID) - if err != nil { - return fmt.Errorf("failed to delete state: %v", err) - } - - // Finally, delete private details of asset - err = ctx.GetStub().DelPrivateData(ownerCollection, assetDeleteInput.ID) - if err != nil { - return err - } - - return nil - -} - -// DeleteTranferAgreement can be used by the buyer to withdraw a proposal from -// the asset collection and from his own collection. -func (s *SmartContract) DeleteTranferAgreement(ctx contractapi.TransactionContextInterface) error { - - transientMap, err := ctx.GetStub().GetTransient() - if err != nil { - return fmt.Errorf("error getting transient: %v", err) - } - - // Asset properties are private, therefore they get passed in transient field - transientDeleteJSON, ok := transientMap["agreement_delete"] - if !ok { - return fmt.Errorf("asset to delete not found in the transient map") - } - - type assetDelete struct { - ID string `json:"assetID"` - } - - var assetDeleteInput assetDelete - err = json.Unmarshal(transientDeleteJSON, &assetDeleteInput) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON: %v", err) - } - - if len(assetDeleteInput.ID) == 0 { - return fmt.Errorf("transient input ID field must be a non-empty string") - } - - // Verify that the client is submitting request to peer in their organization - err = verifyClientOrgMatchesPeerOrg(ctx) - if err != nil { - return fmt.Errorf("DeleteTranferAgreement cannot be performed: Error %v", err) - } - // Delete private details of agreement - orgCollection, err := getCollectionName(ctx) // Get proposers collection. - if err != nil { - return fmt.Errorf("failed to infer private collection name for the org: %v", err) - } - tranferAgreeKey, err := ctx.GetStub().CreateCompositeKey(transferAgreementObjectType, []string{assetDeleteInput. - ID}) // Create composite key - if err != nil { - return fmt.Errorf("failed to create composite key: %v", err) - } - - valAsbytes, err := ctx.GetStub().GetPrivateData(assetCollection, tranferAgreeKey) //get the transfer_agreement - if err != nil { - return fmt.Errorf("failed to read transfer_agreement: %v", err) - } - if valAsbytes == nil { - return fmt.Errorf("asset's transfer_agreement does not exist: %v", assetDeleteInput.ID) - } - - log.Printf("Deleting TranferAgreement: %v", assetDeleteInput.ID) - err = ctx.GetStub().DelPrivateData(orgCollection, assetDeleteInput.ID) // Delete the asset - if err != nil { - return err - } - - // Delete transfer agreement record - err = ctx.GetStub().DelPrivateData(assetCollection, tranferAgreeKey) // remove agreement from state - if err != nil { - return err - } - - return nil - -} - -// getCollectionName is an internal helper function to get collection of submitting client identity. -func getCollectionName(ctx contractapi.TransactionContextInterface) (string, error) { - - // Get the MSP ID of submitting client identity - clientMSPID, err := ctx.GetClientIdentity().GetMSPID() - if err != nil { - return "", fmt.Errorf("failed to get verified MSPID: %v", err) - } - - // Create the collection name - orgCollection := clientMSPID + "PrivateCollection" - - return orgCollection, nil -} - -// verifyClientOrgMatchesPeerOrg is an internal function used verify client org id and matches peer org id. -func verifyClientOrgMatchesPeerOrg(ctx contractapi.TransactionContextInterface) error { - clientMSPID, err := ctx.GetClientIdentity().GetMSPID() - if err != nil { - return fmt.Errorf("failed getting the client's MSPID: %v", err) - } - peerMSPID, err := shim.GetMSPID() - if err != nil { - return fmt.Errorf("failed getting the peer's MSPID: %v", err) - } - - if clientMSPID != peerMSPID { - return fmt.Errorf("client from org %v is not authorized to read or write private data from an org %v peer", clientMSPID, peerMSPID) - } - - return nil -} - -func submittingClientIdentity(ctx contractapi.TransactionContextInterface) (string, error) { - b64ID, err := ctx.GetClientIdentity().GetID() - if err != nil { - return "", fmt.Errorf("Failed to read clientID: %v", err) - } - decodeID, err := base64.StdEncoding.DecodeString(b64ID) - if err != nil { - return "", fmt.Errorf("failed to base64 decode clientID: %v", err) - } - return string(decodeID), nil -} - - -// ReadAsset reads the information from collection -func (s *SmartContract) ReadAsset(ctx contractapi.TransactionContextInterface, assetID string) (*Asset, error) { - - log.Printf("ReadAsset: collection %v, ID %v", assetCollection, assetID) - assetJSON, err := ctx.GetStub().GetPrivateData(assetCollection, assetID) //get the asset from chaincode state - if err != nil { - return nil, fmt.Errorf("failed to read asset: %v", err) - } - - //No Asset found, return empty response - if assetJSON == nil { - log.Printf("%v does not exist in collection %v", assetID, assetCollection) - return nil, nil - } - - var asset *Asset - err = json.Unmarshal(assetJSON, &asset) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal JSON: %v", err) - } - - return asset, nil - -} - -// ReadAssetPrivateDetails reads the asset private details in organization specific collection -func (s *SmartContract) ReadAssetPrivateDetails(ctx contractapi.TransactionContextInterface, collection string, assetID string) (*AssetPrivateDetails, error) { - log.Printf("ReadAssetPrivateDetails: collection %v, ID %v", collection, assetID) - assetDetailsJSON, err := ctx.GetStub().GetPrivateData(collection, assetID) // Get the asset from chaincode state - if err != nil { - return nil, fmt.Errorf("failed to read asset details: %v", err) - } - if assetDetailsJSON == nil { - log.Printf("AssetPrivateDetails for %v does not exist in collection %v", assetID, collection) - return nil, nil - } - - var assetDetails *AssetPrivateDetails - err = json.Unmarshal(assetDetailsJSON, &assetDetails) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal JSON: %v", err) - } - - return assetDetails, nil -} - -// ReadTransferAgreement gets the buyer's identity from the transfer agreement from collection -func (s *SmartContract) ReadTransferAgreement(ctx contractapi.TransactionContextInterface, assetID string) (*TransferAgreement, error) { - log.Printf("ReadTransferAgreement: collection %v, ID %v", assetCollection, assetID) - // composite key for TransferAgreement of this asset - transferAgreeKey, err := ctx.GetStub().CreateCompositeKey(transferAgreementObjectType, []string{assetID}) - if err != nil { - return nil, fmt.Errorf("failed to create composite key: %v", err) - } - - buyerIdentity, err := ctx.GetStub().GetPrivateData(assetCollection, transferAgreeKey) // Get the identity from collection - if err != nil { - return nil, fmt.Errorf("failed to read TransferAgreement: %v", err) - } - if buyerIdentity == nil { - log.Printf("TransferAgreement for %v does not exist", assetID) - return nil, nil - } - agreement := &TransferAgreement{ - ID: assetID, - BuyerID: string(buyerIdentity), - } - return agreement, nil -} - -// GetAssetByRange performs a range query based on the start and end keys provided. Range -// queries can be used to read data from private data collections, but can not be used in -// a transaction that also writes to private data. -func (s *SmartContract) GetAssetByRange(ctx contractapi.TransactionContextInterface, startKey string, endKey string) ([]*Asset, error) { - - resultsIterator, err := ctx.GetStub().GetPrivateDataByRange(assetCollection, startKey, endKey) - if err != nil { - return nil, err - } - defer resultsIterator.Close() - - results := []*Asset{} - - for resultsIterator.HasNext() { - response, err := resultsIterator.Next() - if err != nil { - return nil, err - } - - var asset *Asset - err = json.Unmarshal(response.Value, &asset) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal JSON: %v", err) - } - - results = append(results, asset) - } - - return results, nil - -} - -// =======Rich queries ========================================================================= -// Two examples of rich queries are provided below (parameterized query and ad hoc query). -// Rich queries pass a query string to the state database. -// Rich queries are only supported by state database implementations -// that support rich query (e.g. CouchDB). -// The query string is in the syntax of the underlying state database. -// With rich queries there is no guarantee that the result set hasn't changed between -// endorsement time and commit time, aka 'phantom reads'. -// Therefore, rich queries should not be used in update transactions, unless the -// application handles the possibility of result set changes between endorsement and commit time. -// Rich queries can be used for point-in-time queries against a peer. -// ============================================================================================ - -// ===== Example: Parameterized rich query ================================================= - -// QueryAssetByOwner queries for assets based on assetType, owner. -// This is an example of a parameterized query where the query logic is baked into the chaincode, -// and accepting a single query parameter (owner). -// Only available on state databases that support rich query (e.g. CouchDB) -// ========================================================================================= -func (s *SmartContract) QueryAssetByOwner(ctx contractapi.TransactionContextInterface, assetType string, owner string) ([]*Asset, error) { - - queryString := fmt.Sprintf("{\"selector\":{\"objectType\":\"%v\",\"owner\":\"%v\"}}", assetType, owner) - - queryResults, err := s.getQueryResultForQueryString(ctx, queryString) - if err != nil { - return nil, err - } - return queryResults, nil -} - -// QueryAssets uses a query string to perform a query for assets. -// Query string matching state database syntax is passed in and executed as is. -// Supports ad hoc queries that can be defined at runtime by the client. -// If this is not desired, follow the QueryAssetByOwner example for parameterized queries. -// Only available on state databases that support rich query (e.g. CouchDB) -func (s *SmartContract) QueryAssets(ctx contractapi.TransactionContextInterface, queryString string) ([]*Asset, error) { - - queryResults, err := s.getQueryResultForQueryString(ctx, queryString) - if err != nil { - return nil, err - } - return queryResults, nil -} - -// getQueryResultForQueryString executes the passed in query string. -func (s *SmartContract) getQueryResultForQueryString(ctx contractapi.TransactionContextInterface, queryString string) ([]*Asset, error) { - - resultsIterator, err := ctx.GetStub().GetPrivateDataQueryResult(assetCollection, queryString) - if err != nil { - return nil, err - } - defer resultsIterator.Close() - - results := []*Asset{} - - for resultsIterator.HasNext() { - response, err := resultsIterator.Next() - if err != nil { - return nil, err - } - var asset *Asset - - err = json.Unmarshal(response.Value, &asset) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal JSON: %v", err) - } - - results = append(results, asset) - } - return results, nil -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/collections_config.json b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/collections_config.json deleted file mode 100644 index cb3729aa69..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/collections_config.json +++ /dev/null @@ -1,35 +0,0 @@ -[ - { - "name": "assetCollection", - "policy": "OR('Org1MSP.member', 'Org2MSP.member')", - "requiredPeerCount": 1, - "maxPeerCount": 1, - "blockToLive":1000000, - "memberOnlyRead": true, - "memberOnlyWrite": true -}, - { - "name": "Org1MSPPrivateCollection", - "policy": "OR('Org1MSP.member')", - "requiredPeerCount": 0, - "maxPeerCount": 1, - "blockToLive":3, - "memberOnlyRead": true, - "memberOnlyWrite": false, - "endorsementPolicy": { - "signaturePolicy": "OR('Org1MSP.member')" - } - }, - { - "name": "Org2MSPPrivateCollection", - "policy": "OR('Org2MSP.member')", - "requiredPeerCount": 0, - "maxPeerCount": 1, - "blockToLive":3, - "memberOnlyRead": true, - "memberOnlyWrite": false, - "endorsementPolicy": { - "signaturePolicy": "OR('Org2MSP.member')" - } - } -] diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/go.mod b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/go.mod deleted file mode 100644 index 9b7b3d159f..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/go.mod +++ /dev/null @@ -1,35 +0,0 @@ -module github.com/hyperledger/fabric-samples/asset-transfer-private-data/chaincode-go - -go 1.18 - -require ( - github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a - github.com/hyperledger/fabric-contract-api-go v1.1.0 -) - -require ( - github.com/PuerkitoBio/purell v1.1.1 // indirect - github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect - github.com/go-openapi/jsonpointer v0.19.3 // indirect - github.com/go-openapi/jsonreference v0.19.4 // indirect - github.com/go-openapi/spec v0.19.8 // indirect - github.com/go-openapi/swag v0.19.9 // indirect - github.com/gobuffalo/envy v1.9.0 // indirect - github.com/gobuffalo/packd v1.0.0 // indirect - github.com/gobuffalo/packr v1.30.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/hyperledger/fabric-protos-go v0.0.0-20200707132912-fee30f3ccd23 // indirect - github.com/joho/godotenv v1.3.0 // indirect - github.com/mailru/easyjson v0.7.1 // indirect - github.com/rogpeppe/go-internal v1.6.0 // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.56.3 // indirect - google.golang.org/protobuf v1.33.0 // indirect - gopkg.in/yaml.v2 v2.3.0 // indirect -) diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/go.sum b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/go.sum deleted file mode 100644 index c5e3193932..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/go.sum +++ /dev/null @@ -1,172 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DATA-DOG/go-txdb v0.1.3/go.mod h1:DhAhxMXZpUJVGnT+p9IbzJoRKvlArO2pkHjnGX7o0n0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cucumber/godog v0.8.0/go.mod h1:Cp3tEV1LRAyH/RuCThcxHS/+9ORZ+FMzPva2AZ5Ki+A= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= -github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= -github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= -github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.9.0 h1:eZR0DuEgVLfeIb1zIKt3bT4YovIMf9O9LXQeCZLXpqE= -github.com/gobuffalo/envy v1.9.0/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= -github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= -github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= -github.com/gobuffalo/packd v1.0.0 h1:6ERZvJHfe24rfFmA9OaoKBdC7+c9sydrytMg8SdFGBM= -github.com/gobuffalo/packd v1.0.0/go.mod h1:6VTc4htmJRFB7u1m/4LeMTWjFoYrUiBkU9Fdec9hrhI= -github.com/gobuffalo/packr v1.30.1 h1:hu1fuVR3fXEZR7rXNW3h8rqSML8EVAf6KNm0NKO/wKg= -github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= -github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hyperledger/fabric-chaincode-go v0.0.0-20200424173110-d7076418f212/go.mod h1:N7H3sA7Tx4k/YzFq7U0EPdqJtqvM4Kild0JoCc7C0Dc= -github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a h1:KoFw2HnRfW+EItMP0zvUUl1FGzDb/7O0ov7uXZffQok= -github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a/go.mod h1:N7H3sA7Tx4k/YzFq7U0EPdqJtqvM4Kild0JoCc7C0Dc= -github.com/hyperledger/fabric-contract-api-go v1.1.0 h1:K9uucl/6eX3NF0/b+CGIiO1IPm1VYQxBkpnVGJur2S4= -github.com/hyperledger/fabric-contract-api-go v1.1.0/go.mod h1:nHWt0B45fK53owcFpLtAe8DH0Q5P068mnzkNXMPSL7E= -github.com/hyperledger/fabric-protos-go v0.0.0-20190919234611-2a87503ac7c9/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= -github.com/hyperledger/fabric-protos-go v0.0.0-20200424173316-dd554ba3746e/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= -github.com/hyperledger/fabric-protos-go v0.0.0-20200707132912-fee30f3ccd23 h1:SEbB3yH4ISTGRifDamYXAst36gO2kM855ndMJlsv+pc= -github.com/hyperledger/fabric-protos-go v0.0.0-20200707132912-fee30f3ccd23/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= -github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.6.0 h1:IZRgg4sfrDH7nsAD1Y/Nwj+GzIfEwpJSLjCaNC3SbsI= -github.com/rogpeppe/go-internal v1.6.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= -google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/main.go b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/main.go deleted file mode 100644 index 6e0d671d22..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/main.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -SPDX-License-Identifier: Apache-2.0 -*/ - -package main - -import ( - "log" - - "github.com/hyperledger/fabric-contract-api-go/contractapi" - "github.com/hyperledger/fabric-samples/asset-transfer-private-data/chaincode-go/chaincode" -) - -func main() { - assetChaincode, err := contractapi.NewChaincode(&chaincode.SmartContract{}) - if err != nil { - log.Panicf("Error creating asset-transfer-private-data chaincode: %v", err) - } - - if err := assetChaincode.Start(); err != nil { - log.Panicf("Error starting asset-transfer-private-data chaincode: %v", err) - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/assetTransfer.go b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/assetTransfer.go deleted file mode 100644 index 9c619d5631..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/assetTransfer.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -SPDX-License-Identifier: Apache-2.0 -*/ - -package main - -import ( - "log" - - "github.com/hyperledger/fabric-contract-api-go/contractapi" - "github.com/hyperledger/fabric-samples/asset-transfer-basic/chaincode-go/chaincode" -) - -func main() { - assetChaincode, err := contractapi.NewChaincode(&chaincode.SmartContract{}) - if err != nil { - log.Panicf("Error creating asset-transfer-basic chaincode: %v", err) - } - - if err := assetChaincode.Start(); err != nil { - log.Panicf("Error starting asset-transfer-basic chaincode: %v", err) - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/chaincode/smartcontract.go b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/chaincode/smartcontract.go deleted file mode 100644 index ff96f69eb3..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/chaincode/smartcontract.go +++ /dev/null @@ -1,185 +0,0 @@ -package chaincode - -import ( - "encoding/json" - "fmt" - - "github.com/hyperledger/fabric-contract-api-go/contractapi" -) - -// SmartContract provides functions for managing an Asset -type SmartContract struct { - contractapi.Contract -} - -// Asset describes basic details of what makes up a simple asset -type Asset struct { - ID string `json:"ID"` - Color string `json:"color"` - Size int `json:"size"` - Owner string `json:"owner"` - AppraisedValue int `json:"appraisedValue"` -} - -// InitLedger adds a base set of assets to the ledger -func (s *SmartContract) InitLedger(ctx contractapi.TransactionContextInterface) error { - assets := []Asset{ - {ID: "asset1", Color: "blue", Size: 5, Owner: "Tom", AppraisedValue: 300}, - {ID: "asset2", Color: "red", Size: 5, Owner: "Brad", AppraisedValue: 400}, - {ID: "asset3", Color: "green", Size: 10, Owner: "Jin Soo", AppraisedValue: 500}, - {ID: "asset4", Color: "yellow", Size: 10, Owner: "Max", AppraisedValue: 600}, - {ID: "asset5", Color: "black", Size: 15, Owner: "Adriana", AppraisedValue: 700}, - {ID: "asset6", Color: "white", Size: 15, Owner: "Michel", AppraisedValue: 800}, - } - - for _, asset := range assets { - assetJSON, err := json.Marshal(asset) - if err != nil { - return err - } - - err = ctx.GetStub().PutState(asset.ID, assetJSON) - if err != nil { - return fmt.Errorf("failed to put to world state. %v", err) - } - } - - return nil -} - -// CreateAsset issues a new asset to the world state with given details. -func (s *SmartContract) CreateAsset(ctx contractapi.TransactionContextInterface, id string, color string, size int, owner string, appraisedValue int) error { - exists, err := s.AssetExists(ctx, id) - if err != nil { - return err - } - if exists { - return fmt.Errorf("the asset %s already exists", id) - } - - asset := Asset{ - ID: id, - Color: color, - Size: size, - Owner: owner, - AppraisedValue: appraisedValue, - } - assetJSON, err := json.Marshal(asset) - if err != nil { - return err - } - - return ctx.GetStub().PutState(id, assetJSON) -} - -// ReadAsset returns the asset stored in the world state with given id. -func (s *SmartContract) ReadAsset(ctx contractapi.TransactionContextInterface, id string) (*Asset, error) { - assetJSON, err := ctx.GetStub().GetState(id) - if err != nil { - return nil, fmt.Errorf("failed to read from world state: %v", err) - } - if assetJSON == nil { - return nil, fmt.Errorf("the asset %s does not exist", id) - } - - var asset Asset - err = json.Unmarshal(assetJSON, &asset) - if err != nil { - return nil, err - } - - return &asset, nil -} - -// UpdateAsset updates an existing asset in the world state with provided parameters. -func (s *SmartContract) UpdateAsset(ctx contractapi.TransactionContextInterface, id string, color string, size int, owner string, appraisedValue int) error { - exists, err := s.AssetExists(ctx, id) - if err != nil { - return err - } - if !exists { - return fmt.Errorf("the asset %s does not exist", id) - } - - // overwriting original asset with new asset - asset := Asset{ - ID: id, - Color: color, - Size: size, - Owner: owner, - AppraisedValue: appraisedValue, - } - assetJSON, err := json.Marshal(asset) - if err != nil { - return err - } - - return ctx.GetStub().PutState(id, assetJSON) -} - -// DeleteAsset deletes an given asset from the world state. -func (s *SmartContract) DeleteAsset(ctx contractapi.TransactionContextInterface, id string) error { - exists, err := s.AssetExists(ctx, id) - if err != nil { - return err - } - if !exists { - return fmt.Errorf("the asset %s does not exist", id) - } - - return ctx.GetStub().DelState(id) -} - -// AssetExists returns true when asset with given ID exists in world state -func (s *SmartContract) AssetExists(ctx contractapi.TransactionContextInterface, id string) (bool, error) { - assetJSON, err := ctx.GetStub().GetState(id) - if err != nil { - return false, fmt.Errorf("failed to read from world state: %v", err) - } - - return assetJSON != nil, nil -} - -// TransferAsset updates the owner field of asset with given id in world state. -func (s *SmartContract) TransferAsset(ctx contractapi.TransactionContextInterface, id string, newOwner string) error { - asset, err := s.ReadAsset(ctx, id) - if err != nil { - return err - } - - asset.Owner = newOwner - assetJSON, err := json.Marshal(asset) - if err != nil { - return err - } - - return ctx.GetStub().PutState(id, assetJSON) -} - -// GetAllAssets returns all assets found in world state -func (s *SmartContract) GetAllAssets(ctx contractapi.TransactionContextInterface) ([]*Asset, error) { - // range query with empty string for startKey and endKey does an - // open-ended query of all assets in the chaincode namespace. - resultsIterator, err := ctx.GetStub().GetStateByRange("", "") - if err != nil { - return nil, err - } - defer resultsIterator.Close() - - var assets []*Asset - for resultsIterator.HasNext() { - queryResponse, err := resultsIterator.Next() - if err != nil { - return nil, err - } - - var asset Asset - err = json.Unmarshal(queryResponse.Value, &asset) - if err != nil { - return nil, err - } - assets = append(assets, &asset) - } - - return assets, nil -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/go.mod b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/go.mod deleted file mode 100644 index a39adb01c5..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module github.com/hyperledger/fabric-samples/asset-transfer-basic/chaincode-go - -go 1.14 - -require ( - github.com/golang/protobuf v1.3.2 - github.com/hyperledger/fabric-chaincode-go v0.0.0-20200424173110-d7076418f212 - github.com/hyperledger/fabric-contract-api-go v1.1.0 - github.com/hyperledger/fabric-protos-go v0.0.0-20200424173316-dd554ba3746e - github.com/stretchr/testify v1.5.1 -) diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/go.sum b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/go.sum deleted file mode 100644 index a159a45f0a..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-go/go.sum +++ /dev/null @@ -1,146 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DATA-DOG/go-txdb v0.1.3/go.mod h1:DhAhxMXZpUJVGnT+p9IbzJoRKvlArO2pkHjnGX7o0n0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cucumber/godog v0.8.0/go.mod h1:Cp3tEV1LRAyH/RuCThcxHS/+9ORZ+FMzPva2AZ5Ki+A= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/spec v0.19.4 h1:ixzUSnHTd6hCemgtAJgluaTSGYpLNpJY4mA2DIkdOAo= -github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/gobuffalo/envy v1.7.0 h1:GlXgaiBkmrYMHco6t4j7SacKO4XUjvh5pwXh0f4uxXU= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= -github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4= -github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= -github.com/gobuffalo/packr v1.30.1 h1:hu1fuVR3fXEZR7rXNW3h8rqSML8EVAf6KNm0NKO/wKg= -github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= -github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hyperledger/fabric-chaincode-go v0.0.0-20200424173110-d7076418f212 h1:1i4lnpV8BDgKOLi1hgElfBqdHXjXieSuj8629mwBZ8o= -github.com/hyperledger/fabric-chaincode-go v0.0.0-20200424173110-d7076418f212/go.mod h1:N7H3sA7Tx4k/YzFq7U0EPdqJtqvM4Kild0JoCc7C0Dc= -github.com/hyperledger/fabric-contract-api-go v1.1.0 h1:K9uucl/6eX3NF0/b+CGIiO1IPm1VYQxBkpnVGJur2S4= -github.com/hyperledger/fabric-contract-api-go v1.1.0/go.mod h1:nHWt0B45fK53owcFpLtAe8DH0Q5P068mnzkNXMPSL7E= -github.com/hyperledger/fabric-protos-go v0.0.0-20190919234611-2a87503ac7c9/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= -github.com/hyperledger/fabric-protos-go v0.0.0-20200424173316-dd554ba3746e h1:9PS5iezHk/j7XriSlNuSQILyCOfcZ9wZ3/PiucmSE8E= -github.com/hyperledger/fabric-protos-go v0.0.0-20200424173316-dd554ba3746e/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542 h1:6ZQFf1D2YYDDI7eSwW8adlkkavTB9sw5I24FVtEvNUQ= -golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b h1:lohp5blsw53GBXtLyLNaTXPXS9pJ1tiTw61ZHUoE9Qw= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/.gitignore b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/.gitignore deleted file mode 100644 index eeace29019..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# - -# Coverage directory used by tools like istanbul -coverage - -# Report cache used by istanbul -.nyc_output - -# Dependency directories -node_modules/ -jspm_packages/ - -package-lock.json diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/index.js b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/index.js deleted file mode 100644 index 917c8b2af6..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright IBM Corp. All Rights Reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict"; - -const assetTransfer = require("./lib/assetTransfer"); - -module.exports.AssetTransfer = assetTransfer; -module.exports.contracts = [assetTransfer]; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/lib/assetTransfer.js b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/lib/assetTransfer.js deleted file mode 100644 index c397c08126..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/lib/assetTransfer.js +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright IBM Corp. All Rights Reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict"; - -const { Contract } = require("fabric-contract-api"); - -class AssetTransfer extends Contract { - async InitLedger(ctx) { - const assets = [ - { - ID: "asset1", - Color: "blue", - Size: 5, - Owner: "Tom", - AppraisedValue: 300, - }, - { - ID: "asset2", - Color: "red", - Size: 5, - Owner: "Brad", - AppraisedValue: 400, - }, - { - ID: "asset3", - Color: "green", - Size: 10, - Owner: "Jin Soo", - AppraisedValue: 500, - }, - { - ID: "asset4", - Color: "yellow", - Size: 10, - Owner: "Max", - AppraisedValue: 600, - }, - { - ID: "asset5", - Color: "black", - Size: 15, - Owner: "Adriana", - AppraisedValue: 700, - }, - { - ID: "asset6", - Color: "white", - Size: 15, - Owner: "Michel", - AppraisedValue: 800, - }, - ]; - - for (const asset of assets) { - asset.docType = "asset"; - await ctx.stub.putState(asset.ID, Buffer.from(JSON.stringify(asset))); - console.info(`Asset ${asset.ID} initialized`); - } - } - - // CreateAsset issues a new asset to the world state with given details. - async CreateAsset(ctx, id, color, size, owner, appraisedValue) { - const asset = { - ID: id, - Color: color, - Size: size, - Owner: owner, - AppraisedValue: appraisedValue, - }; - ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return JSON.stringify(asset); - } - - // ReadAsset returns the asset stored in the world state with given id. - async ReadAsset(ctx, id) { - const assetJSON = await ctx.stub.getState(id); // get the asset from chaincode state - if (!assetJSON || assetJSON.length === 0) { - throw new Error(`The asset ${id} does not exist`); - } - return assetJSON.toString(); - } - - // UpdateAsset updates an existing asset in the world state with provided parameters. - async UpdateAsset(ctx, id, color, size, owner, appraisedValue) { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - // overwriting original asset with new asset - const updatedAsset = { - ID: id, - Color: color, - Size: size, - Owner: owner, - AppraisedValue: appraisedValue, - }; - return ctx.stub.putState(id, Buffer.from(JSON.stringify(updatedAsset))); - } - - // DeleteAsset deletes an given asset from the world state. - async DeleteAsset(ctx, id) { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - return ctx.stub.deleteState(id); - } - - // AssetExists returns true when asset with given ID exists in world state. - async AssetExists(ctx, id) { - const assetJSON = await ctx.stub.getState(id); - return assetJSON && assetJSON.length > 0; - } - - // TransferAsset updates the owner field of asset with given id in the world state. - async TransferAsset(ctx, id, newOwner) { - const assetString = await this.ReadAsset(ctx, id); - const asset = JSON.parse(assetString); - asset.Owner = newOwner; - return ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // GetAllAssets returns all assets found in the world state. - async GetAllAssets(ctx) { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - const strValue = Buffer.from(result.value.value.toString()).toString( - "utf8", - ); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push({ Key: result.value.key, Record: record }); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } -} - -module.exports = AssetTransfer; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/package.json b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/package.json deleted file mode 100644 index 6bc5f122b6..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "asset-transfer-basic", - "version": "1.0.0", - "description": "Asset-Transfer-Basic contract implemented in JavaScript", - "main": "index.js", - "engines": { - "node": ">=12", - "npm": ">=5" - }, - "scripts": { - "start": "fabric-chaincode-node start" - }, - "engineStrict": true, - "author": "Hyperledger", - "license": "Apache-2.0", - "dependencies": { - "fabric-contract-api": "2.2.2", - "fabric-shim": "2.2.2" - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/.gitignore b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/.gitignore deleted file mode 100644 index 79bfe1a3e0..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# - - -# Coverage directory used by tools like istanbul -coverage - -# Dependency directories -node_modules/ -jspm_packages/ -package-lock.json - -# Compiled TypeScript files -dist - diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/package.json b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/package.json deleted file mode 100644 index 0cead67723..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "asset-transfer-basic", - "version": "1.0.0", - "description": "Asset Transfer Basic contract implemented in TypeScript", - "main": "dist/index.js", - "typings": "dist/index.d.ts", - "engines": { - "node": ">=12", - "npm": ">=5" - }, - "scripts": { - "lint": "tslint -c tslint.json 'src/**/*.ts'", - "pretest": "npm run lint", - "test": "nyc mocha -r ts-node/register src/**/*.spec.ts", - "start": "fabric-chaincode-node start", - "build": "tsc", - "build:watch": "tsc -w", - "prepublishOnly": "npm run build" - }, - "engineStrict": true, - "author": "Hyperledger", - "license": "Apache-2.0", - "dependencies": { - "fabric-contract-api": "2.2.3", - "fabric-shim": "2.2.3" - }, - "devDependencies": { - "@types/chai": "4.3.0", - "@types/mocha": "5.2.7", - "@types/node": "18.11.9", - "@types/sinon": "5.0.7", - "@types/sinon-chai": "3.2.8", - "chai": "4.3.6", - "mocha": "5.2.0", - "nyc": "14.1.1", - "sinon": "7.5.0", - "sinon-chai": "3.7.0", - "ts-node": "7.0.1", - "tslint": "5.20.1", - "typescript": "5.5.2" - }, - "nyc": { - "extension": [ - ".ts", - ".tsx" - ], - "exclude": [ - "coverage/**", - "dist/**" - ], - "reporter": [ - "text-summary", - "html" - ], - "all": true, - "check-coverage": true, - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/src/asset.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/src/asset.ts deleted file mode 100644 index 0602971c83..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/src/asset.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { Object, Property } from "fabric-contract-api"; - -@Object() -export class Asset { - @Property() - public docType?: string; - - @Property() - public ID: string; - - @Property() - public Color: string; - - @Property() - public Size: number; - - @Property() - public Owner: string; - - @Property() - public AppraisedValue: number; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/src/assetTransfer.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/src/assetTransfer.ts deleted file mode 100644 index 0ceb70c916..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/src/assetTransfer.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { - Context, - Contract, - Info, - Returns, - Transaction, -} from "fabric-contract-api"; -import { Asset } from "./asset"; - -@Info({ - title: "AssetTransfer", - description: "Smart contract for trading assets", -}) -export class AssetTransferContract extends Contract { - @Transaction() - public async InitLedger(ctx: Context): Promise { - const assets: Asset[] = [ - { - ID: "asset1", - Color: "blue", - Size: 5, - Owner: "Tom", - AppraisedValue: 300, - }, - { - ID: "asset2", - Color: "red", - Size: 5, - Owner: "Brad", - AppraisedValue: 400, - }, - { - ID: "asset3", - Color: "green", - Size: 10, - Owner: "Jin Soo", - AppraisedValue: 500, - }, - { - ID: "asset4", - Color: "yellow", - Size: 10, - Owner: "Max", - AppraisedValue: 600, - }, - { - ID: "asset5", - Color: "black", - Size: 15, - Owner: "Adriana", - AppraisedValue: 700, - }, - { - ID: "asset6", - Color: "white", - Size: 15, - Owner: "Michel", - AppraisedValue: 800, - }, - ]; - - for (const asset of assets) { - asset.docType = "asset"; - await ctx.stub.putState(asset.ID, Buffer.from(JSON.stringify(asset))); - console.info(`Asset ${asset.ID} initialized`); - } - } - - // CreateAsset issues a new asset to the world state with given details. - @Transaction() - public async CreateAsset( - ctx: Context, - id: string, - color: string, - size: number, - owner: string, - appraisedValue: number, - ): Promise { - const asset = { - ID: id, - Color: color, - Size: size, - Owner: owner, - AppraisedValue: appraisedValue, - }; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // ReadAsset returns the asset stored in the world state with given id. - @Transaction(false) - public async ReadAsset(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); // get the asset from chaincode state - if (!assetJSON || assetJSON.length === 0) { - throw new Error(`The asset ${id} does not exist`); - } - return assetJSON.toString(); - } - - // UpdateAsset updates an existing asset in the world state with provided parameters. - @Transaction() - public async UpdateAsset( - ctx: Context, - id: string, - color: string, - size: number, - owner: string, - appraisedValue: number, - ): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - // overwriting original asset with new asset - const updatedAsset = { - ID: id, - Color: color, - Size: size, - Owner: owner, - AppraisedValue: appraisedValue, - }; - return ctx.stub.putState(id, Buffer.from(JSON.stringify(updatedAsset))); - } - - // DeleteAsset deletes an given asset from the world state. - @Transaction() - public async DeleteAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - return ctx.stub.deleteState(id); - } - - // AssetExists returns true when asset with given ID exists in world state. - @Transaction(false) - @Returns("boolean") - public async AssetExists(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - return assetJSON && assetJSON.length > 0; - } - - // TransferAsset updates the owner field of asset with given id in the world state. - @Transaction() - public async TransferAsset( - ctx: Context, - id: string, - newOwner: string, - ): Promise { - const assetString = await this.ReadAsset(ctx, id); - const asset = JSON.parse(assetString); - asset.Owner = newOwner; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // GetAllAssets returns all assets found in the world state. - @Transaction(false) - @Returns("string") - public async GetAllAssets(ctx: Context): Promise { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - const strValue = Buffer.from(result.value.value.toString()).toString( - "utf8", - ); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push({ Key: result.value.key, Record: record }); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/src/index.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/src/index.ts deleted file mode 100644 index 020a09f410..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { AssetTransferContract } from "./assetTransfer"; - -export { AssetTransferContract } from "./assetTransfer"; - -export const contracts: any[] = [AssetTransferContract]; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/tsconfig.json b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/tsconfig.json deleted file mode 100644 index 9e33b7028e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "outDir": "dist", - "target": "es2017", - "moduleResolution": "node", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "skipLibCheck": true - }, - "include": [ - "./src/**/*" - ], - "exclude": [ - "./src/**/*.spec.ts" - ] -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/tslint.json b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/tslint.json deleted file mode 100644 index a52c3ee2ed..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/tslint.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": [ - "tslint:recommended" - ], - "jsRules": {}, - "rules": { - "indent": [true, "spaces", 4], - "linebreak-style": [true, "LF"], - "quotemark": [true, "single"], - "semicolon": [true, "always"], - "no-console": false, - "curly": true, - "triple-equals": true, - "no-string-throw": true, - "no-var-keyword": true, - "no-trailing-whitespace": true, - "object-literal-key-quotes": [true, "as-needed"], - "object-literal-sort-keys": false, - "max-line-length": false - }, - "rulesDirectory": [] -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/package.json b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/package.json deleted file mode 100644 index d8f1c89341..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "asset-transfer-basic", - "version": "1.0.0", - "description": "Asset Transfer Basic contract implemented in TypeScript", - "main": "dist/index.js", - "typings": "dist/index.d.ts", - "engines": { - "node": ">=12", - "npm": ">=5" - }, - "scripts": { - "lint": "tslint -c tslint.json 'src/**/*.ts'", - "pretest": "npm run lint", - "test": "nyc mocha -r ts-node/register src/**/*.spec.ts", - "start": "fabric-chaincode-node start", - "build": "tsc", - "build:watch": "tsc -w", - "prepublishOnly": "npm run build" - }, - "engineStrict": true, - "author": "Hyperledger", - "license": "Apache-2.0", - "dependencies": { - "fabric-contract-api": "2.2.2", - "fabric-shim": "2.2.2" - }, - "devDependencies": { - "@types/chai": "4.3.0", - "@types/mocha": "5.2.7", - "@types/node": "18.11.9", - "@types/sinon": "5.0.7", - "@types/sinon-chai": "3.2.8", - "chai": "4.3.6", - "mocha": "5.2.0", - "nyc": "14.1.1", - "sinon": "7.5.0", - "sinon-chai": "3.7.0", - "ts-node": "7.0.1", - "tslint": "5.20.1", - "typescript": "5.5.2" - }, - "nyc": { - "extension": [ - ".ts", - ".tsx" - ], - "exclude": [ - "coverage/**", - "dist/**" - ], - "reporter": [ - "text-summary", - "html" - ], - "all": true, - "check-coverage": true, - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/asset.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/asset.ts deleted file mode 100644 index aec8d90c52..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/asset.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { Object, Property } from "fabric-contract-api"; - -@Object() -export class Asset { - @Property() - public docType?: string; - - @Property() - public ID: string; - - @Property() - public IsLock: boolean; - - @Property() - public Size: number; -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/assetTransfer.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/assetTransfer.ts deleted file mode 100644 index 28898c6553..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/assetTransfer.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { - Context, - Contract, - Info, - Returns, - Transaction, -} from "fabric-contract-api"; -import { Asset } from "./asset"; - -@Info({ - title: "AssetTransfer", - description: "Smart contract for trading assets", -}) -export class AssetTransferContract extends Contract { - @Transaction() - public async InitLedger(ctx: Context): Promise { - const assets: Asset[] = [ - { - ID: "asset1", - Size: 5, - IsLock: false, - }, - { - ID: "asset2", - Size: 5, - IsLock: false, - }, - ]; - - for (const asset of assets) { - asset.docType = "asset"; - await ctx.stub.putState(asset.ID, Buffer.from(JSON.stringify(asset))); - console.info(`Asset ${asset.ID} initialized`); - } - } - - // CreateAsset issues a new asset to the world state with given details. - @Transaction() - public async CreateAsset( - ctx: Context, - id: string, - size: number, - ): Promise { - const asset: Asset = { - ID: id, - Size: size, - IsLock: false, - }; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // ReadAsset returns the asset stored in the world state with given id. - @Transaction(false) - public async ReadAsset(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); // get the asset from chaincode state - if (!assetJSON || assetJSON.length === 0) { - throw new Error(`The asset ${id} does not exist`); - } - return assetJSON.toString(); - } - - // UpdateAsset updates an existing asset in the world state with provided parameters. - @Transaction() - public async UpdateAsset( - ctx: Context, - id: string, - size: number, - ): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - // overwriting original asset with new asset - const assetString = await this.ReadAsset(ctx, id); - const asset = JSON.parse(assetString); - asset.size = size; - return ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // DeleteAsset deletes an given asset from the world state. - @Transaction() - public async DeleteAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - return ctx.stub.deleteState(id); - } - - // AssetExists returns true when asset with given ID exists in world state. - @Transaction(false) - @Returns("boolean") - public async AssetExists(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - return assetJSON && assetJSON.length > 0; - } - @Transaction(false) - @Returns("boolean") - public async LockAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - const assetString = await this.ReadAsset(ctx, id); - const asset = JSON.parse(assetString); - asset.isLock = true; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return true; - } - @Transaction(false) - @Returns("boolean") - public async UnLockAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - const assetString = await this.ReadAsset(ctx, id); - const asset = JSON.parse(assetString); - asset.isLock = false; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return true; - } - - // GetAllAssets returns all assets found in the world state. - @Transaction(false) - @Returns("string") - public async GetAllAssets(ctx: Context): Promise { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - const strValue = Buffer.from(result.value.value.toString()).toString( - "utf8", - ); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push({ Key: result.value.key, Record: record }); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/index.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/index.ts deleted file mode 100644 index 020a09f410..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { AssetTransferContract } from "./assetTransfer"; - -export { AssetTransferContract } from "./assetTransfer"; - -export const contracts: any[] = [AssetTransferContract]; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/tsconfig.json b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/tsconfig.json deleted file mode 100644 index 9e33b7028e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "outDir": "dist", - "target": "es2017", - "moduleResolution": "node", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "skipLibCheck": true - }, - "include": [ - "./src/**/*" - ], - "exclude": [ - "./src/**/*.spec.ts" - ] -} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/add-orgs.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/add-orgs.test.ts deleted file mode 100644 index f6e7b2a128..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/add-orgs.test.ts +++ /dev/null @@ -1,87 +0,0 @@ -import "jest-extended"; -import { - DEFAULT_FABRIC_2_AIO_FABRIC_VERSION, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - DEFAULT_FABRIC_2_AIO_IMAGE_VERSION, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import path from "path"; -import { - STATE_DATABASE, - LedgerStartOptions, -} from "@hyperledger/cactus-test-tooling"; - -const testCase = "adds org4 to the network"; -const logLevel: LogLevelDesc = "TRACE"; -let ledger: FabricTestLedgerV1; -beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); -}); - -afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); - await ledger.stop(); - await ledger.destroy(); -}); -test.skip(testCase, async () => { - const addOrgXPath = path.join( - __dirname, - "../../../resources/fixtures/addOrgX", - ); - - const extraOrg = { - path: addOrgXPath, - orgName: "org4", - orgChannel: "mychannel", - certificateAuthority: false, - stateDatabase: STATE_DATABASE.COUCH_DB, - port: "11071", - }; - ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - logLevel, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: DEFAULT_FABRIC_2_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", DEFAULT_FABRIC_2_AIO_FABRIC_VERSION]]), - extraOrgs: [extraOrg], - }); - const startOps: LedgerStartOptions = { - omitPull: false, - setContainer: false, - }; - // Recover running ledger - /*const startOpsContainerRunning: LedgerStartOptions = { - omitPull: true, - setContainer: true, - containerID: - "723c265262d7f5ff71b67862d4b8b3b4c09b31da528ea7ba01cda03c13fdcd5d", - }; - - const results = await ledger.start(startOpsContainerRunning); - */ - await ledger.start(startOps); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); - - const connectionProfileOrg1 = await ledger.getConnectionProfileOrgX("org1"); - expect(connectionProfile).toEqual(connectionProfileOrg1); - - const connectionProfileOrg2 = await ledger.getConnectionProfileOrgX("org2"); - expect(connectionProfileOrg2).toBeTruthy(); - - const connectionProfileOrg4 = await ledger.getConnectionProfileOrgX("org4"); - expect(connectionProfileOrg4).toBeTruthy(); - - expect(connectionProfileOrg1).not.toEqual(connectionProfileOrg2); - - // Expect rejection as org101 does not exist - await expect(ledger.getConnectionProfileOrgX("org101")).rejects.toThrow( - /no such container - Could not find the file.*/, - ); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/connector-fabric-baseline.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/connector-fabric-baseline.test.ts deleted file mode 100644 index e7e2649e2f..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/connector-fabric-baseline.test.ts +++ /dev/null @@ -1,847 +0,0 @@ -import { AddressInfo } from "node:net"; -import http from "node:http"; -import path from "node:path"; - -import "jest-extended"; -import fs from "fs-extra"; -import { v4 as uuidv4 } from "uuid"; -import { DiscoveryOptions } from "fabric-network"; -import { StatusCodes } from "http-status-codes"; -import express from "express"; -import bodyParser from "body-parser"; - -// BlockDecoder is not exported in ts definition so we need to use legacy import. -// TODO(petermetz): Migrate over to the newer versions of the Fabric NodeJS SDK -// which will (hopefully) not have this problem with the exports. -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { BlockDecoder } = require("fabric-common"); - -import { - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - Checks, - IListenOptions, - Logger, - LoggerProvider, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - PluginLedgerConnectorFabric, -} from "../../../../main/typescript/public-api"; - -import { DefaultApi as FabricApi } from "../../../../main/typescript/public-api"; - -import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; -import { - CactiBlockFullEventV1, - GatewayOptions, - GetBlockResponseTypeV1, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; - -import { sendTransactionOnFabric } from "../../common/send-transaction-on-fabric"; -import { getBlock } from "../../common/get-block"; - -describe("PluginLedgerConnectorFabric", () => { - const logLevel: LogLevelDesc = "INFO"; - const log: Logger = LoggerProvider.getOrCreate({ - label: "fabric-lock-asset", - level: logLevel, - }); - - let ledger: FabricTestLedgerV1; - let apiClient: FabricApi; - let keychainId: string; - let keychainEntryKey: string; - let server: http.Server; - let gatewayOptions: GatewayOptions; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); - }); - - beforeAll(async () => { - ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - await ledger.start({ omitPull: false }); - - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); - - const enrollAdminOut = await ledger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await ledger.enrollUser(adminWallet); - const sshConfig = await ledger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - keychainId = uuidv4(); - keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - gatewayOptions = { - identity: keychainEntryKey, - wallet: { - keychain: { - keychainId, - keychainRef: keychainEntryKey, - }, - }, - }; - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - const plugin = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { port } = addressInfo; - apiClient = new FabricApi( - new Configuration({ basePath: `http://127.0.0.1:${port}` }), - ); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - }); - - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - await Servers.shutdown(server); - }); - - it("getBlockV1() -Get first block by it's number - decoded.", async () => { - const ledgerChannelName = "mychannel"; - // Check decoded - const decodedFirstBlock = await getBlock({ - apiClient, - gatewayOptions, - ledgerChannelName, - log, - query: { blockNumber: "0" }, - responseType: GetBlockResponseTypeV1.Full, - }); - log.debug("Received decodedFirstBlock:", decodedFirstBlock); - expect(decodedFirstBlock.header).toBeTruthy(); - expect(decodedFirstBlock.header.number.low).toBe(0); - expect(decodedFirstBlock.header.number.high).toBe(0); - expect(decodedFirstBlock.data).toBeTruthy(); - expect(decodedFirstBlock.metadata).toBeTruthy(); - }); - - it("getBlockV1() - Get first block by it's number - encoded.", async () => { - const ledgerChannelName = "mychannel"; - // Check decoded - const encodedFirstBlock = await getBlock({ - apiClient, - gatewayOptions, - ledgerChannelName, - log, - query: { blockNumber: "0" }, - responseType: GetBlockResponseTypeV1.Encoded, - }); - const decodedFirstBlockBuffer = Buffer.from(encodedFirstBlock, "base64"); - const decodedFirstBlock = BlockDecoder.decode(decodedFirstBlockBuffer); - log.debug("Received decodedFirstBlock:", decodedFirstBlock); - expect(decodedFirstBlock.header).toBeTruthy(); - expect(decodedFirstBlock.header.number.low).toBe(0); - expect(decodedFirstBlock.header.number.high).toBe(0); - expect(decodedFirstBlock.data).toBeTruthy(); - expect(decodedFirstBlock.metadata).toBeTruthy(); - }); - - /** - * GetBlock endpoint using transactionId - */ - it("getBlockV1() - Get a block by transactionId it contains", async () => { - const ledgerChannelName = "mychannel"; - const ledgerContractName = "basic"; - // Run some transaction - const assetName = `getBlockTx_${(Math.random() + 1).toString(36).substring(2)}`; - const txId = await sendTransactionOnFabric({ - apiClient, - assetName, - gatewayOptions, - ledgerChannelName, - ledgerContractName, - log, - }); - - // Get block using transactionId we've just sent - const blockByTx = await getBlock({ - apiClient, - gatewayOptions, - ledgerChannelName, - log, - query: { transactionId: txId }, - responseType: GetBlockResponseTypeV1.Full, - }); - expect(blockByTx).toBeTruthy(); - expect(blockByTx.header).toBeTruthy(); - expect(blockByTx.data).toBeTruthy(); - expect(blockByTx.metadata).toBeTruthy(); - }); - - it("getBlockV1() - Get a block by transactionId it contains - cacti transactions summary", async () => { - const ledgerChannelName = "mychannel"; - const ledgerContractName = "basic"; - // Run some transaction - const assetName = `cactiTx_${(Math.random() + 1).toString(36).substring(2)}`; - const txId = await sendTransactionOnFabric({ - apiClient, - assetName, - gatewayOptions, - ledgerChannelName, - ledgerContractName, - log, - }); - - // Get block using transactionId we've just sent - const cactiTxList = await getBlock({ - apiClient, - gatewayOptions, - ledgerChannelName, - log, - query: { transactionId: txId }, - responseType: GetBlockResponseTypeV1.CactiTransactions, - }); - expect(cactiTxList).toBeTruthy(); - expect(cactiTxList.length).toBeGreaterThanOrEqual(1); - const cactiTx = cactiTxList[0]; - expect(cactiTx).toBeTruthy(); - expect(cactiTx.chaincodeId).toBeTruthy(); - expect(cactiTx.transactionId).toBeTruthy(); - expect(cactiTx.functionName).toBeTruthy(); - expect(cactiTx.functionArgs).toBeTruthy(); - expect(cactiTx.functionArgs.length).toEqual(5); - }); - - it("getBlockV1() - Get a block by transactionId it contains - cacti full block summary", async () => { - const ledgerChannelName = "mychannel"; - const ledgerContractName = "basic"; - - // Run some transaction - const assetName = `cactiTx_${(Math.random() + 1).toString(36).substring(2)}`; - const txId = await sendTransactionOnFabric({ - apiClient, - assetName, - gatewayOptions, - ledgerChannelName, - ledgerContractName, - log, - }); - - // Get block using transactionId we've just sent - const cactiFullBlock = (await getBlock({ - apiClient, - gatewayOptions, - ledgerChannelName, - log, - query: { transactionId: txId }, - responseType: GetBlockResponseTypeV1.CactiFullBlock, - })) as CactiBlockFullEventV1; - - // Check block fields - expect(cactiFullBlock).toBeTruthy(); - expect(cactiFullBlock.blockNumber).toBeDefined(); - expect(cactiFullBlock.blockHash).toBeTruthy(); - expect(cactiFullBlock.previousBlockHash).toBeTruthy(); - expect(cactiFullBlock.transactionCount).toBeGreaterThanOrEqual(1); - - // Check transaction fields - for (const tx of cactiFullBlock.cactiTransactionsEvents) { - expect(tx.hash).toBeTruthy(); - expect(tx.channelId).toBeTruthy(); - expect(tx.timestamp).toBeTruthy(); - expect(tx.transactionType).toBeTruthy(); - expect(tx.protocolVersion).not.toBeUndefined(); - expect(tx.epoch).not.toBeUndefined(); - - // Check transaction actions fields - for (const action of tx.actions) { - expect(action.functionName).toBeTruthy(); - expect(action.functionArgs).toBeTruthy(); - expect(action.functionArgs.length).toEqual(5); - expect(action.chaincodeId).toBeTruthy(); - expect(action.creator.mspid).toBeTruthy(); - expect(action.creator.cert).toBeTruthy(); - - // Check transaction action endorsement fields - for (const endorsement of action.endorsements) { - expect(endorsement.signature).toBeTruthy(); - expect(endorsement.signer.mspid).toBeTruthy(); - expect(endorsement.signer.cert).toBeTruthy(); - } - } - } - }); - - /** - * GetBlock endpoint using block hash - */ - it("getBlockV1() - Get block by it's hash.", async () => { - const ledgerChannelName = "mychannel"; - const ledgerContractName = "basic"; - // Run transaction to ensure more than one block is present - const assetName = `txForNewBlock_${(Math.random() + 1).toString(36).substring(2)}`; - await sendTransactionOnFabric({ - assetName, - apiClient, - gatewayOptions, - ledgerChannelName, - ledgerContractName, - log, - }); - - // Get second block by it's number - const decodedSecondBlock = await getBlock({ - apiClient, - gatewayOptions, - ledgerChannelName, - log, - query: { blockNumber: "1" }, - responseType: GetBlockResponseTypeV1.Full, - }); - expect(decodedSecondBlock.header).toBeTruthy(); - const firstBlockHashJSON = decodedSecondBlock.header.previous_hash; - expect(firstBlockHashJSON).toBeTruthy(); - - // Get using default JSON hash representation - log.info("Get by JSON hash:", firstBlockHashJSON); - - const decodedFirstBlock = await getBlock({ - apiClient, - gatewayOptions, - ledgerChannelName, - log, - query: { - blockHash: { - buffer: firstBlockHashJSON, - }, - }, - responseType: GetBlockResponseTypeV1.Full, - }); - expect(decodedFirstBlock).toBeTruthy(); - expect(decodedFirstBlock.header).toBeTruthy(); - expect(decodedFirstBlock.header.number.low).toBe(0); - expect(decodedFirstBlock.header.number.high).toBe(0); - expect(decodedFirstBlock.data).toBeTruthy(); - expect(decodedFirstBlock.metadata).toBeTruthy(); - - // Get using HEX encoded hash representation - const firstBlockHashHex = Buffer.from(firstBlockHashJSON).toString("hex"); - log.info("Get by HEX hash:", firstBlockHashHex); - - const decodedBlockHex = await getBlock({ - apiClient, - gatewayOptions, - ledgerChannelName, - log, - query: { - blockHash: { - encoding: "hex", - buffer: firstBlockHashHex, - }, - }, - responseType: GetBlockResponseTypeV1.Full, - }); - expect(decodedBlockHex).toBeTruthy(); - expect(decodedBlockHex.header).toBeTruthy(); - expect(decodedBlockHex.header.number.low).toBe(0); - expect(decodedBlockHex.header.number.high).toBe(0); - expect(decodedBlockHex.data).toBeTruthy(); - expect(decodedBlockHex.metadata).toBeTruthy(); - }); - - /** - * Check error handling - */ - it("getBlockV1() - Reading block with invalid number returns an error.", async () => { - const ledgerChannelName = "mychannel"; - const getBlockReq = { - channelName: ledgerChannelName, - gatewayOptions, - query: { - blockNumber: "foo", // non existent block - }, - }; - - // FIXME(petermetz): This should fail with `StatusCodes.BAD_REQUEST` - expect( - apiClient.getBlockV1(getBlockReq).catch((ex: unknown) => { - log.debug("Dumping the exception thrown by getBlockV1()..."); - log.debug(ex); - throw ex; - }), - ).rejects.toMatchObject({ - message: - "Request failed with status code " + StatusCodes.INTERNAL_SERVER_ERROR, - name: "AxiosError", - code: "ERR_BAD_RESPONSE", - response: { - status: StatusCodes.INTERNAL_SERVER_ERROR, - statusText: "Internal Server Error", - }, - }); - }); - - it("GetChainInfoV1() - Get test ledger chain info.", async () => { - const ledgerChannelName = "mychannel"; - const chainInfoResponse = await apiClient.getChainInfoV1({ - channelName: ledgerChannelName, - gatewayOptions, - }); - - const chainInfo = chainInfoResponse.data; - expect(chainInfoResponse.status).toBe(200); - expect(chainInfo).toBeTruthy; - expect(chainInfo.height).toBeGreaterThanOrEqual(1); - expect(chainInfo.currentBlockHash).toBeTruthy; - expect(chainInfo.previousBlockHash).toBeTruthy; - }); - - it("deployContractV1() - deploys Fabric 2.x contract from go source", async () => { - const channelId = "mychannel"; - const channelName = channelId; - const contractName = "asset-transfer-private-data"; - - const contractRelPath = - "../../fixtures/go/asset-transfer-private-data/chaincode-go"; - const contractDir = path.join(__dirname, contractRelPath); - - const smartContractGoPath = path.join( - contractDir, - "./chaincode/", - "./asset_transfer.go", - ); - const smartContractGoBuf = await fs.readFile(smartContractGoPath); - const smartContractGo = { - body: smartContractGoBuf.toString("base64"), - filepath: "./chaincode/", - filename: `asset_transfer.go`, - }; - - const assetTransferGoPath = path.join(contractDir, "./main.go"); - const assetTransferGoBuf = await fs.readFile(assetTransferGoPath); - const assetTransferGo = { - body: assetTransferGoBuf.toString("base64"), - filename: `${contractName}.go`, - }; - - const goModPath = path.join(contractDir, "./go.mod"); - const goModBuf = await fs.readFile(goModPath); - const goMod = { - body: goModBuf.toString("base64"), - filename: "go.mod", - }; - - const goSumPath = path.join(contractDir, "./go.sum"); - const goSumBuf = await fs.readFile(goSumPath); - const goSum = { - body: goSumBuf.toString("base64"), - filename: "go.sum", - }; - - const privateDataCollectionName = "collections_config.json"; - const privateDataCollectionsPath = path.join( - contractDir, - "./" + privateDataCollectionName, - ); - const privateDataCollectionsBuf = await fs.readFile( - privateDataCollectionsPath, - ); - const privateDataCollections = { - body: privateDataCollectionsBuf.toString("base64"), - filename: privateDataCollectionName, - }; - - const res = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles: [ - assetTransferGo, - smartContractGo, - goMod, - goSum, - privateDataCollections, - ], - collectionsConfigFile: privateDataCollectionName, - ccName: contractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: contractName, - ccLang: ChainCodeProgrammingLanguage.Golang, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = res.data; - expect(res.status).toEqual(200); - expect(success).toBe(true); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - Checks.truthy(packageIds, `packageIds truthy OK`); - Checks.truthy( - Array.isArray(packageIds), - `Array.isArray(packageIds) truthy OK`, - ); - Checks.truthy(approveForMyOrgList, `approveForMyOrgList truthy OK`); - Checks.truthy( - Array.isArray(approveForMyOrgList), - `Array.isArray(approveForMyOrgList) truthy OK`, - ); - Checks.truthy(installList, `installList truthy OK`); - Checks.truthy( - Array.isArray(installList), - `Array.isArray(installList) truthy OK`, - ); - Checks.truthy(queryInstalledList, `queryInstalledList truthy OK`); - Checks.truthy( - Array.isArray(queryInstalledList), - `Array.isArray(queryInstalledList) truthy OK`, - ); - Checks.truthy(commit, `commit truthy OK`); - Checks.truthy(packaging, `packaging truthy OK`); - Checks.truthy(queryCommitted, `queryCommitted truthy OK`); - - const assetId = uuidv4(); - const assetType = "asset"; - - const assetData = { - objectType: assetType, - assetID: assetId, - color: "gray", - size: 3, - appraisedValue: 500, - }; - - //Chaincode-specific method requires attribute asset_properties - const rawTmpData = { - asset_properties: assetData, - }; - - // CreateAsset(id string, color string, size int, owner string, appraisedValue int) - const createRes = await apiClient.runTransactionV1({ - transientData: rawTmpData, - contractName, - channelName, - //objectType, assetID, color, size, appraisedvalue - params: [], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Sendprivate, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - expect(createRes).toBeTruthy(); - expect(createRes.status).toBeWithin(199, 300); - const getRes = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId], - methodName: "ReadAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - - expect(getRes).toBeTruthy(); - expect(getRes.data).toBeTruthy(); - expect(getRes.data.functionOutput).toBeTruthy(); - expect(getRes.status).toBeWithin(199, 300); - //TODO FIX: - //Error: failed to read asset details: GET_STATE failed: transaction ID: 0a41ae425e259ee6c1331d4d3c06bd9fc4727f9961abc0c1a2895c450fc8411a: tx creator does not have read access permission on privatedata in chaincodeName:asset-transfer-private-data collectionName: Org2MSPPrivateCollection - //This has probably to do with the state database supported by Fabric test ledger - /* - const collectionToParse = "Org1MSPPrivateCollection"; - const getResPrivate = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [collectionToParse, assetId], - methodName: "ReadAssetPrivateDetails", - invocationType: FabricContractInvocationType.SEND, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - - - */ - - const getResQuery = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId, assetId + "1"], - methodName: "GetAssetByRange", - invocationType: FabricContractInvocationType.Call, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - - expect(getResQuery).toBeTruthy(); - expect(getResQuery.data).toBeTruthy(); - expect(getResQuery.data.functionOutput).toBeTruthy(); - expect(getResQuery.status).toBeWithin(199, 300); - }); - - it("deployContractV1() - deploys contract and performs transactions", async () => { - const channelId = "mychannel"; - const channelName = channelId; - const contractName = "basic-asset-transfer-2"; - - const contractRelPath = "../../fixtures/go/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const res = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: contractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - expect(res.status).toBe(200); - expect(res.data.success).toBe(true); - - const { - packageIds, - lifecycle: { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - }, - } = res.data; - - expect(packageIds).toBeTruthy(); - expect(Array.isArray(packageIds)).toBe(true); - expect(approveForMyOrgList).toBeTruthy(); - expect(Array.isArray(approveForMyOrgList)).toBe(true); - expect(installList).toBeTruthy(); - expect(Array.isArray(installList)).toBe(true); - expect(queryInstalledList).toBeTruthy(); - expect(Array.isArray(queryInstalledList)).toBe(true); - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - const assetId = uuidv4(); - - const createRes = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - expect(createRes).toBeTruthy(); - expect(createRes.status).toBeGreaterThan(199); - expect(createRes.status).toBeLessThan(300); - - const getRes = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId], - methodName: "ReadAsset", - invocationType: FabricContractInvocationType.Call, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - expect(getRes).toBeTruthy(); - expect(getRes.data).toBeTruthy(); - expect(getRes.data.functionOutput).toBeTruthy(); - expect(getRes.status).toBeGreaterThan(199); - expect(getRes.status).toBeLessThan(300); - - const asset = JSON.parse(getRes.data.functionOutput); - - expect(asset).toBeTruthy(); - expect(asset.ID).toBeTruthy(); - expect(asset.ID).toBe(assetId); - - const lockRes = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId], - methodName: "LockAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - expect(lockRes).toBeTruthy(); - expect(lockRes.data).toBeTruthy(); - expect(lockRes.data.functionOutput).toBeTruthy(); - expect(lockRes.status).toBeGreaterThan(199); - expect(lockRes.status).toBeLessThan(300); - expect(lockRes.data.functionOutput).toBe("true"); - - log.warn(lockRes.data.functionOutput); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/delegate-signing-methods.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/delegate-signing-methods.test.ts deleted file mode 100644 index 3b995767f2..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/delegate-signing-methods.test.ts +++ /dev/null @@ -1,506 +0,0 @@ -/** - * Tests of fabric connector methods that use delegated signing instead of identity provided directly / through keychain. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Ledger settings -const fabricEnvCAVersion = "1.4.9"; -const ledgerChannelName = "mychannel"; -const assetTradeContractName = "copyAssetTrade"; -const privateAssetTradeContractName = "privateAssetTrade"; -const testTimeout = 1000 * 60 * 10; // 10 minutes per test - -// For development on local sawtooth network -// 1. leaveLedgerRunning = true, useRunningLedger = false to run ledger and leave it running after test finishes. -// 2. leaveLedgerRunning = true, useRunningLedger = true to use that ledger in future runs. -const useRunningLedger = false; -const leaveLedgerRunning = false; - -// Log settings -const testLogLevel: LogLevelDesc = "info"; // default: info -const sutLogLevel: LogLevelDesc = "info"; // default: info - -import "jest-extended"; -import http from "http"; -import express from "express"; -import bodyParser from "body-parser"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { X509Identity } from "fabric-network"; -import { Server as SocketIoServer } from "socket.io"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - Containers, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - PluginLedgerConnectorFabric, - GatewayOptions, - FabricContractInvocationType, - RunTransactionRequest, - FabricApiClient, - signProposal, - WatchBlocksListenerTypeV1, - FabricSigningCredential, - CactiBlockTransactionsResponseV1, -} from "../../../../main/typescript/public-api"; -import { Observable } from "rxjs"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "delegate-signing-methods.test", - level: testLogLevel, -}); - -/** - * Main test suite - */ -describe("Delegated signing tests", () => { - let ledger: FabricTestLedgerV1; - let gatewayOptions: GatewayOptions; - let fabricConnectorPlugin: PluginLedgerConnectorFabric; - let connectorServer: http.Server; - let apiClient: FabricApiClient; - let socketioServer: SocketIoServer; - let adminIdentity: X509Identity; - - const mockSignCallback = jest.fn(async (payload, txData) => { - log.debug("mockSignCallback called with txData (token):", txData); - return signProposal(adminIdentity.credentials.privateKey, payload); - }); - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - // Start Ledger - log.info("Start FabricTestLedgerV1..."); - log.debug( - "Fabric Version:", - FABRIC_25_LTS_AIO_FABRIC_VERSION, - "CA Version:", - fabricEnvCAVersion, - ); - ledger = new FabricTestLedgerV1({ - emitContainerLogs: false, - publishAllPorts: true, - logLevel: testLogLevel, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([ - ["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION], - ["CA_VERSION", fabricEnvCAVersion], - ["CACTUS_FABRIC_TEST_LOOSE_MEMBERSHIP", "1"], - ]), - useRunningLedger, - }); - log.debug("Fabric image:", ledger.getContainerImageName()); - await ledger.start(); - - // Get connection profile - log.info("Get fabric connection profile for Org1..."); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); - - // Enroll admin - const enrollAdminOut = await ledger.enrollAdmin(); - adminIdentity = enrollAdminOut[0]; - log.error("adminIdentity", adminIdentity); - - // Create Keychain Plugin - const keychainId = uuidv4(); - const keychainEntryKey = "admin"; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - logLevel: sutLogLevel, - backend: new Map([[keychainEntryKey, JSON.stringify(adminIdentity)]]), - }); - - gatewayOptions = { - identity: keychainEntryKey, - wallet: { - keychain: { - keychainId, - keychainRef: keychainEntryKey, - }, - }, - }; - - // Create Connector Plugin - fabricConnectorPlugin = new PluginLedgerConnectorFabric({ - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - sshConfig: await ledger.getSshConfig(), - cliContainerEnv: {}, - peerBinary: "/fabric-samples/bin/peer", - logLevel: sutLogLevel, - connectionProfile, - discoveryOptions: { - enabled: true, - asLocalhost: true, - }, - signCallback: mockSignCallback, - }); - - // Run http server - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - connectorServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: connectorServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const apiHost = `http://${addressInfo.address}:${addressInfo.port}`; - - // Run socketio server - socketioServer = new SocketIoServer(connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - // Register services - await fabricConnectorPlugin.getOrCreateWebServices(); - await fabricConnectorPlugin.registerWebServices(expressApp, socketioServer); - - // Create ApiClient - const apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new FabricApiClient(apiConfig); - - // Deploy contract asset-transfer-basic - if (!useRunningLedger) { - const cmd = [ - "./network.sh", - "deployCC", - "-ccn", - assetTradeContractName, - "-ccp", - "../asset-transfer-basic/chaincode-go", - "-ccl", - "go", - ]; - const out = await Containers.exec( - ledger.getContainer(), - cmd, - 180000, - sutLogLevel, - "/fabric-samples/test-network/", - ); - expect(out).toBeTruthy(); - - const initResponse = await apiClient.runTransactionV1({ - signingCredential: gatewayOptions.wallet - .keychain as FabricSigningCredential, - channelName: ledgerChannelName, - contractName: assetTradeContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "InitLedger", - params: [], - } as RunTransactionRequest); - expect(initResponse).toBeTruthy(); - expect(initResponse.data).toBeTruthy(); - expect(initResponse.status).toEqual(200); - log.info("Asset trade initialized"); - } - - // Deploy contract asset-transfer-private-data - if (!useRunningLedger) { - const cmd = [ - "./network.sh", - "deployCC", - "-ccn", - privateAssetTradeContractName, - "-ccp", - "../asset-transfer-private-data/chaincode-go/", - "-ccl", - "go", - "-ccep", - "OR('Org1MSP.peer','Org2MSP.peer')", - "-cccg", - "../asset-transfer-private-data/chaincode-go/collections_config.json", - ]; - const out = await Containers.exec( - ledger.getContainer(), - cmd, - 180000, - sutLogLevel, - "/fabric-samples/test-network/", - ); - expect(out).toBeTruthy(); - } - }); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (fabricConnectorPlugin) { - log.info("Close ApiClient connections..."); - fabricConnectorPlugin.shutdown(); - } - - if (socketioServer) { - log.info("Stop the SocketIO server connector..."); - await new Promise((resolve) => - socketioServer.close(() => resolve()), - ); - } - - if (connectorServer) { - log.info("Stop the HTTP server connector..."); - await new Promise((resolve) => - connectorServer.close(() => resolve()), - ); - } - - if (ledger && !leaveLedgerRunning) { - log.info("Stop the fabric ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }); - - afterEach(async () => { - mockSignCallback.mockClear(); - }); - - ////////////////////////////////// - // Helpers - ////////////////////////////////// - async function waitForTxCommit(txId: string) { - const committedTx = await apiClient.waitForTransactionCommit( - txId, - apiClient.watchBlocksDelegatedSignV1({ - type: WatchBlocksListenerTypeV1.CactiTransactions, - signerCertificate: adminIdentity.credentials.certificate, - signerMspID: adminIdentity.mspId, - channelName: ledgerChannelName, - }) as Observable, - ); - mockSignCallback.mockClear(); - return committedTx; - } - - /** - * Check call history on mock signing callback, clear it afterwards. - * @param txData secret token sent to callback - * @param count how many calls to callback we expect. For query use 2 (discovery, query). For transaction use 3 (discovery, endorse, commit) - */ - async function checkMockSigningCallbacksAndClear(txData: string, count = 2) { - expect(mockSignCallback.mock.calls).toHaveLength(count); - expect(mockSignCallback.mock.calls.every((c) => c[1] === txData)); - mockSignCallback.mockClear(); - } - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - test( - "Sanity check with runTransactionV1 endpoint", - async () => { - const newAssetOwner = `sanity-${uuidv4()}`; - - // Check current owner - const initQueryResponse = await apiClient.runTransactionV1({ - signingCredential: gatewayOptions.wallet - .keychain as FabricSigningCredential, - channelName: ledgerChannelName, - contractName: assetTradeContractName, - invocationType: FabricContractInvocationType.Call, - methodName: "ReadAsset", - params: ["asset1"], - }); - expect(initQueryResponse).toBeTruthy(); - expect(initQueryResponse.data).toBeTruthy(); - expect(initQueryResponse.status).toEqual(200); - const initQueryOutput = JSON.parse(initQueryResponse.data.functionOutput); - expect(initQueryOutput["ID"]).toEqual("asset1"); - expect(initQueryOutput["Owner"]).not.toEqual(newAssetOwner); - - // Transfer ownership - const sendResponse = await apiClient.runTransactionV1({ - signingCredential: gatewayOptions.wallet - .keychain as FabricSigningCredential, - channelName: ledgerChannelName, - contractName: assetTradeContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "TransferAsset", - params: ["asset1", newAssetOwner], - }); - expect(sendResponse).toBeTruthy(); - expect(sendResponse.data).toBeTruthy(); - expect(sendResponse.status).toEqual(200); - - // Confirm new owner - const queryResponse = await apiClient.runTransactionV1({ - signingCredential: gatewayOptions.wallet - .keychain as FabricSigningCredential, - channelName: ledgerChannelName, - contractName: assetTradeContractName, - invocationType: FabricContractInvocationType.Call, - methodName: "ReadAsset", - params: ["asset1"], - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.status).toEqual(200); - const queryOutput = JSON.parse(queryResponse.data.functionOutput); - expect(queryOutput["ID"]).toEqual("asset1"); - expect(queryOutput["Owner"]).toEqual(newAssetOwner); - }, - testTimeout, - ); - - test("Transact and query using delegated sign callback", async () => { - const newAssetOwner = `owner-${uuidv4()}`; - - // Check current owner - const initQueryId = `initQuery-${uuidv4()}`; - const initQueryResponse = await apiClient.runDelegatedSignTransactionV1({ - signerCertificate: adminIdentity.credentials.certificate, - signerMspID: adminIdentity.mspId, - channelName: ledgerChannelName, - contractName: assetTradeContractName, - invocationType: FabricContractInvocationType.Call, - methodName: "ReadAsset", - params: ["asset1"], - uniqueTransactionData: initQueryId, - }); - expect(initQueryResponse).toBeTruthy(); - expect(initQueryResponse.data).toBeTruthy(); - expect(initQueryResponse.status).toEqual(200); - const initQueryOutput = JSON.parse(initQueryResponse.data.functionOutput); - expect(initQueryOutput["ID"]).toEqual("asset1"); - expect(initQueryOutput["Owner"]).not.toEqual(newAssetOwner); - checkMockSigningCallbacksAndClear(initQueryId, 2); - - // Transfer ownership - const transferQueryId = `transfer-${uuidv4()}`; - const sendResponse = await apiClient.runDelegatedSignTransactionV1({ - signerCertificate: adminIdentity.credentials.certificate, - signerMspID: adminIdentity.mspId, - channelName: ledgerChannelName, - contractName: assetTradeContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "TransferAsset", - params: ["asset1", newAssetOwner], - uniqueTransactionData: transferQueryId, - }); - expect(sendResponse).toBeTruthy(); - expect(sendResponse.data).toBeTruthy(); - expect(sendResponse.status).toEqual(200); - checkMockSigningCallbacksAndClear(transferQueryId, 3); - const txId = sendResponse.data.transactionId; - expect(txId).toBeTruthy(); - const committedTx = await waitForTxCommit(txId); - log.debug("Committed transaction:", committedTx); - - // Confirm new owner - const finalQueryId = `finalQuery-${uuidv4()}`; - const queryResponse = await apiClient.runDelegatedSignTransactionV1({ - signerCertificate: adminIdentity.credentials.certificate, - signerMspID: adminIdentity.mspId, - channelName: ledgerChannelName, - contractName: assetTradeContractName, - invocationType: FabricContractInvocationType.Call, - methodName: "ReadAsset", - params: ["asset1"], - uniqueTransactionData: finalQueryId, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.status).toEqual(200); - const queryOutput = JSON.parse(queryResponse.data.functionOutput); - expect(queryOutput["ID"]).toEqual("asset1"); - expect(queryOutput["Owner"]).toEqual(newAssetOwner); - checkMockSigningCallbacksAndClear(finalQueryId, 2); - }); - - test( - "Private transaction and query using delegated sign callback", - async () => { - // Create private asset - const assetID = uuidv4(); - const assetColor = "gray"; - const transientAssetData = { - asset_properties: { - objectType: "asset", - assetID, - color: assetColor, - size: 3, - appraisedValue: 500, - }, - }; - - const transferQueryId = `transferPriv-${uuidv4()}`; - const sendResponse = await apiClient.runDelegatedSignTransactionV1({ - invocationType: FabricContractInvocationType.Sendprivate, - signerCertificate: adminIdentity.credentials.certificate, - signerMspID: adminIdentity.mspId, - channelName: ledgerChannelName, - contractName: privateAssetTradeContractName, - methodName: "CreateAsset", - params: [], - uniqueTransactionData: transferQueryId, - transientData: transientAssetData, - endorsingOrgs: [adminIdentity.mspId], - }); - expect(sendResponse).toBeTruthy(); - expect(sendResponse.data).toBeTruthy(); - expect(sendResponse.status).toEqual(200); - checkMockSigningCallbacksAndClear(transferQueryId, 3); - const txId = sendResponse.data.transactionId; - expect(txId).toBeTruthy(); - const committedTx = await waitForTxCommit(txId); - log.debug("Committed transaction:", committedTx); - - // Query the new asset - const finalQueryId = `finalQuery-${uuidv4()}`; - const queryResponse = await apiClient.runDelegatedSignTransactionV1({ - signerCertificate: adminIdentity.credentials.certificate, - signerMspID: adminIdentity.mspId, - channelName: ledgerChannelName, - contractName: privateAssetTradeContractName, - invocationType: FabricContractInvocationType.Call, - methodName: "ReadAsset", - params: [assetID], - endorsingOrgs: [adminIdentity.mspId], - uniqueTransactionData: finalQueryId, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.status).toEqual(200); - const queryOutput = JSON.parse(queryResponse.data.functionOutput); - expect(queryOutput["assetID"]).toEqual(assetID); - expect(queryOutput["color"]).toEqual(assetColor); - checkMockSigningCallbacksAndClear(finalQueryId, 2); - }, - testTimeout, - ); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts deleted file mode 100644 index 23738ad45b..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts +++ /dev/null @@ -1,261 +0,0 @@ -import "jest-extended"; -import { AddressInfo } from "net"; -import http, { Server } from "http"; -import fs from "fs-extra"; -import path from "path"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; - -import { - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - IListenOptions, - LogLevelDesc, - Servers, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - PluginLedgerConnectorFabric, -} from "../../../../main/typescript/public-api"; - -import { DefaultApi as FabricApi } from "../../../../main/typescript/public-api"; - -import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; - -import { DiscoveryOptions } from "fabric-network"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { DEFAULT_FABRIC_2_AIO_IMAGE_NAME } from "@hyperledger/cactus-test-tooling"; - -const testCase = "deploys Fabric 2.x contract from go source"; -const logLevel: LogLevelDesc = "INFO"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "deploy-cc-from-golang-source.test", - level: logLevel, -}); - -describe("Deploy CC from Golang Source Test", () => { - let ledger: FabricTestLedgerV1; - const channelId = "mychannel"; - const channelName = channelId; - let server: Server; - let apiClient: FabricApi; - const contractName = "basic-asset-transfer-2"; - const contractRelPath = "../../fixtures/go/basic-asset-transfer/chaincode-go"; - const contractDir = path.join(__dirname, contractRelPath); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); - ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - await ledger.start(); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); - const enrollAdminOut = await ledger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await ledger.enrollUser(adminWallet); - const sshConfig = await ledger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - const plugin = new PluginLedgerConnectorFabric(pluginOptions); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { port } = addressInfo; - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - const apiUrl = `http://127.0.0.1:${port}`; - const config = new Configuration({ basePath: apiUrl }); - apiClient = new FabricApi(config); - }); - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - await Servers.shutdown(server); - }); - test(`${testCase}`, async () => { - const smartContractGoPath = path.join( - contractDir, - "./chaincode/", - "./smartcontract.go", - ); - const smartContractGoBuf = await fs.readFile(smartContractGoPath); - const smartContractGo = { - body: smartContractGoBuf.toString("base64"), - filepath: "./chaincode/", - filename: `smartcontract.go`, - }; - const assetTransferGoPath = path.join(contractDir, "./assetTransfer.go"); - const assetTransferGoBuf = await fs.readFile(assetTransferGoPath); - const assetTransferGo = { - body: assetTransferGoBuf.toString("base64"), - filename: `${contractName}.go`, - }; - const goModPath = path.join(contractDir, "./go.mod"); - const goModBuf = await fs.readFile(goModPath); - const goMod = { - body: goModBuf.toString("base64"), - filename: "go.mod", - }; - - const goSumPath = path.join(contractDir, "./go.sum"); - const goSumBuf = await fs.readFile(goSumPath); - const goSum = { - body: goSumBuf.toString("base64"), - filename: "go.sum", - }; - const res = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - // constructorArgs: { Args: ["john", "99"] }, - sourceFiles: [assetTransferGo, smartContractGo, goMod, goSum], - ccName: contractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Golang, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - const { packageIds, lifecycle, success } = res.data; - expect(res.status).toBe(200); - expect(success).toBeTruthy(); - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - expect(packageIds).toBeTruthy(); - expect(Array.isArray(packageIds)).toBe(true); - expect(approveForMyOrgList).toBeTruthy(); - expect(Array.isArray(approveForMyOrgList)).toBe(true); - expect(installList).toBeTruthy(); - expect(Array.isArray(installList)).toBe(true); - expect(queryInstalledList).toBeTruthy(); - expect(Array.isArray(queryInstalledList)).toBe(true); - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - const assetId = uuidv4(); - const assetOwner = uuidv4(); - // CreateAsset(id string, color string, size int, owner string, appraisedValue int) - const createRes = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId, "Green", "19", assetOwner, "9999"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - expect(createRes).toBeTruthy(); - expect(createRes.status).toBeGreaterThan(199); - expect(createRes.status).toBeLessThan(300); - - log.info(`BassicAssetTransfer.Create(): ${JSON.stringify(createRes.data)}`); - - const getRes = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId], - methodName: "ReadAsset", - invocationType: FabricContractInvocationType.Call, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - - expect(getRes).toBeTruthy(); - expect(getRes.data).toBeTruthy(); - expect(getRes.data.functionOutput).toBeTruthy(); - expect(getRes.status).toBeGreaterThan(199); - expect(getRes.status).toBeLessThan(300); - - log.info(`HelloWorld.get() ResponseBody: ${JSON.stringify(getRes.data)}`); - - const asset = JSON.parse(getRes.data.functionOutput); - - expect(asset).toBeTruthy(); - expect(asset.ID).toBeTruthy(); - expect(asset.ID).toEqual(assetId); - expect(asset.owner).toBeTruthy(); - expect(asset.owner).toEqual(assetOwner); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts deleted file mode 100644 index d2b78a1b6b..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts +++ /dev/null @@ -1,279 +0,0 @@ -import "jest-extended"; -import { AddressInfo } from "net"; -import http, { Server } from "http"; -import fs from "fs-extra"; -import path from "path"; - -import { v4 as uuidv4 } from "uuid"; - -import express from "express"; -import bodyParser from "body-parser"; - -import { - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - IListenOptions, - LogLevelDesc, - Servers, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - PluginLedgerConnectorFabric, -} from "../../../../main/typescript/public-api"; - -import { DefaultApi as FabricApi } from "../../../../main/typescript/public-api"; - -import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; - -import { DiscoveryOptions } from "fabric-network"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -const testCase = "deploys Fabric 2.x contract from javascript source"; -const logLevel: LogLevelDesc = "TRACE"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "deploy-cc-from-javascript-source.test", - level: logLevel, -}); - -// Skipping due to test being flaky, see https://github.com/hyperledger/cactus/issues/1471 -describe("Deploy CC from Javascript Source Test", () => { - let ledger: FabricTestLedgerV1; - const contractName = "basic-asset-transfer-2"; - const contractRelPath = - "../../fixtures/go/basic-asset-transfer/chaincode-javascript/"; - let apiClient: FabricApi; - let server: Server; - const channelId = "mychannel"; - const channelName = channelId; - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); - ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - await ledger.start({ omitPull: false }); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); - const enrollAdminOut = await ledger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await ledger.enrollUser(adminWallet); - const sshConfig = await ledger.getSshConfig(); - const keychainInstanceId = uuidv4(); - const keychainEntryValue = JSON.stringify(userIdentity); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - const plugin = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { port } = addressInfo; - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - const apiUrl = `http://127.0.0.1:${port}`; - const config = new Configuration({ basePath: apiUrl }); - - apiClient = new FabricApi(config); - }); - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - await Servers.shutdown(server); - }); - test(`${testCase}`, async () => { - const contractDir = path.join(__dirname, contractRelPath); - // . - // ├── index.js - // ├── lib - // │ └── assetTransfer.js - // └── package.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.js"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.js"; - const relativePath = "./lib/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - const res = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - // constructorArgs: { Args: ["john", "99"] }, - sourceFiles, - ccName: contractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Javascript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - const { packageIds, lifecycle, success } = res.data; - expect(res.status).toBe(200); // Check if res.status is 200 - expect(success).toBeTruthy(); // Check if success is truthy - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - expect(packageIds).toBeTruthy(); - expect(Array.isArray(packageIds)).toBe(true); - - expect(approveForMyOrgList).toBeTruthy(); - expect(Array.isArray(approveForMyOrgList)).toBe(true); - - expect(installList).toBeTruthy(); - expect(Array.isArray(installList)).toBe(true); - - expect(queryInstalledList).toBeTruthy(); - expect(Array.isArray(queryInstalledList)).toBe(true); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - const assetId = uuidv4(); - const assetOwner = uuidv4(); - // CreateAsset(id string, color string, size int, owner string, appraisedValue int) - const createRes = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId, "Green", "19", assetOwner, "9999"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - expect(createRes).toBeTruthy(); - expect(createRes.status).toBeGreaterThan(199); - expect(createRes.status).toBeLessThan(300); - - log.info(`BassicAssetTransfer.Create(): ${JSON.stringify(createRes.data)}`); // Log the createRes data - - const getRes = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId], - methodName: "ReadAsset", - invocationType: FabricContractInvocationType.Call, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - expect(getRes).toBeTruthy(); - expect(getRes.data).toBeTruthy(); - expect(getRes.data.functionOutput).toBeTruthy(); - - expect(getRes.status).toBeGreaterThan(199); - expect(getRes.status).toBeLessThan(300); - - log.info(`HelloWorld.get() ResponseBody: ${JSON.stringify(getRes.data)}`); - const asset = JSON.parse(getRes.data.functionOutput); - expect(asset).toBeTruthy(); - expect(asset.ID).toBeTruthy(); - expect(asset.ID).toEqual(assetId); - - // Note: the capital spelling on "Owner" is not a bug. The fabric-samples - // repo has the spelling different from the golang chaincode as well. - expect(asset.Owner).toBeTruthy(); - expect(asset.Owner).toEqual(assetOwner); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts deleted file mode 100644 index 45c944ef92..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts +++ /dev/null @@ -1,312 +0,0 @@ -import "jest-extended"; -import { AddressInfo } from "net"; -import http, { Server } from "http"; -import fs from "fs-extra"; -import path from "path"; - -import { v4 as uuidv4 } from "uuid"; - -import express from "express"; -import bodyParser from "body-parser"; - -import { - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - IListenOptions, - LogLevelDesc, - Servers, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - PluginLedgerConnectorFabric, -} from "../../../../main/typescript/public-api"; - -import { DefaultApi as FabricApi } from "../../../../main/typescript/public-api"; - -import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; - -import { DiscoveryOptions } from "fabric-network"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -const testCase = "deploys Fabric 2.x contract from typescript source"; -const logLevel: LogLevelDesc = "INFO"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "deploy-cc-from-typescript-source.test", - level: logLevel, -}); - -describe("Deploy CC from typescript source test", () => { - const channelId = "mychannel"; - const channelName = channelId; - let ledger: FabricTestLedgerV1; - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - let apiClient: FabricApi; - const contractName = "basic-asset-transfer-2"; - const contractRelPath = - "../../fixtures/go/basic-asset-transfer/chaincode-typescript"; - let server: Server; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); - ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - await ledger.start({ omitPull: false }); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); // Check if connectionProfile is truthy - const enrollAdminOut = await ledger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await ledger.enrollUser(adminWallet); - const sshConfig = await ledger.getSshConfig(); - const keychainInstanceId = uuidv4(); - const keychainEntryValue = JSON.stringify(userIdentity); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - const plugin = new PluginLedgerConnectorFabric(pluginOptions); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { port } = addressInfo; - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - const apiUrl = `http://127.0.0.1:${port}`; - - const config = new Configuration({ basePath: apiUrl }); - - apiClient = new FabricApi(config); - }); - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - await Servers.shutdown(server); - }); - test(`${testCase}`, async () => { - const contractDir = path.join(__dirname, contractRelPath); - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - // └── tslint.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tslint.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - const res = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - // constructorArgs: { Args: ["john", "99"] }, - sourceFiles, - ccName: contractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = res.data; - expect(res.status).toBe(200); - expect(success).toBeTruthy(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - expect(packageIds).toBeTruthy(); - expect(Array.isArray(packageIds)).toBeTruthy(); - expect(approveForMyOrgList).toBeTruthy(); - expect(Array.isArray(approveForMyOrgList)).toBeTruthy(); - expect(installList).toBeTruthy(); - expect(Array.isArray(installList)).toBeTruthy(); - expect(queryInstalledList).toBeTruthy(); - expect(Array.isArray(queryInstalledList)).toBeTruthy(); - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - const assetId = uuidv4(); - const assetOwner = uuidv4(); - - // CreateAsset(id string, color string, size int, owner string, appraisedValue int) - const createRes = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId, "Green", "19", assetOwner, "9999"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - expect(createRes).toBeTruthy(); - expect(createRes.status).toBeGreaterThan(199); - expect(createRes.status).toBeLessThan(300); - log.info(`BassicAssetTransfer.Create(): ${JSON.stringify(createRes.data)}`); - - const getRes = await apiClient.runTransactionV1({ - contractName, - channelName, - params: [assetId], - methodName: "ReadAsset", - invocationType: FabricContractInvocationType.Call, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - expect(getRes).toBeTruthy(); - expect(getRes.data).toBeTruthy(); - expect(getRes.data.functionOutput).toBeTruthy(); - expect(getRes.status).toBeGreaterThan(199); - expect(getRes.status).toBeLessThan(300); - - log.info(`HelloWorld.get() ResponseBody: ${JSON.stringify(getRes.data)}`); - const asset = JSON.parse(getRes.data.functionOutput); - expect(asset).toBeTruthy(); - - expect(asset.ID).toBeTruthy(); - expect(asset.ID).toEqual(assetId); - - // Note: the capital spelling on "Owner" is not a bug. The fabric-samples - // repo has the spelling different from the golang chaincode as well. - expect(asset.Owner).toBeTruthy(); - expect(asset.Owner).toEqual(assetOwner); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/fabric-watch-blocks-delegated-sign-v1-endpoint.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/fabric-watch-blocks-delegated-sign-v1-endpoint.test.ts deleted file mode 100644 index bcbca461c2..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/fabric-watch-blocks-delegated-sign-v1-endpoint.test.ts +++ /dev/null @@ -1,493 +0,0 @@ -/** - * Functional test of watchBlocksDelegatedSignV1 on connector-fabric (packages/cactus-plugin-ledger-connector-fabric) - * Assumes sample CC was already deployed on the test ledger. - * - * @note - this test sometimes hangs infinitely when used with fabric-node-sdk 2.3.0, - * probably due to bug in the underlying dependency grpc-js. Problem does not occur on 2.5.0. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Ledger settings -const fabricEnvCAVersion = "1.4.9"; -const ledgerChannelName = "mychannel"; -const ledgerContractName = "basic"; - -// Log settings -const testLogLevel: LogLevelDesc = "info"; // default: info -const sutLogLevel: LogLevelDesc = "info"; // default: info - -import "jest-extended"; -import http from "http"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { Server as SocketIoServer } from "socket.io"; -import { DiscoveryOptions, X509Identity } from "fabric-network"; - -import { - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; - -import { Constants, Configuration } from "@hyperledger/cactus-core-api"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import { - PluginLedgerConnectorFabric, - FabricContractInvocationType, - DefaultEventHandlerStrategy, - FabricSigningCredential, - FabricApiClient, - WatchBlocksListenerTypeV1, - WatchBlocksResponseV1, - signProposal, -} from "../../../../main/typescript/public-api"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "fabric-watch-blocks-delegated-sign-v1-endpoint.test", - level: testLogLevel, -}); - -/** - * Main test suite - */ -describe("watchBlocksDelegatedSignV1 of fabric connector tests", () => { - let ledger: FabricTestLedgerV1; - let signingCredential: FabricSigningCredential; - let fabricConnectorPlugin: PluginLedgerConnectorFabric; - let connectorServer: http.Server; - let socketioServer: SocketIoServer; - let apiClient: FabricApiClient; - let adminIdentity: X509Identity; - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - // Start Ledger - log.info("Start FabricTestLedgerV1..."); - log.debug( - "Version:", - FABRIC_25_LTS_AIO_IMAGE_VERSION, - "CA Version:", - fabricEnvCAVersion, - ); - ledger = new FabricTestLedgerV1({ - emitContainerLogs: false, - publishAllPorts: true, - logLevel: testLogLevel, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([ - ["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION], - ["CA_VERSION", fabricEnvCAVersion], - ]), - }); - log.debug("Fabric image:", ledger.getContainerImageName()); - await ledger.start(); - - // Get connection profile - log.info("Get fabric connection profile for Org1..."); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); - - // Enroll admin and user - const enrollAdminOut = await ledger.enrollAdmin(); - adminIdentity = enrollAdminOut[0]; - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await ledger.enrollUser(adminWallet); - - // Create Keychain Plugin - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - logLevel: sutLogLevel, - backend: new Map([[keychainEntryKey, JSON.stringify(userIdentity)]]), - }); - signingCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - // Create Connector Plugin - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - fabricConnectorPlugin = new PluginLedgerConnectorFabric({ - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - sshConfig: await ledger.getSshConfig(), - cliContainerEnv: {}, - peerBinary: "/fabric-samples/bin/peer", - logLevel: sutLogLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAnyfortx, - commitTimeout: 300, - }, - signCallback: async (payload, txData) => { - log.debug("signCallback called with txData (token):", txData); - return signProposal(adminIdentity.credentials.privateKey, payload); - }, - }); - - // Run http server - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - connectorServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: connectorServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const apiHost = `http://${addressInfo.address}:${addressInfo.port}`; - - // Run socketio server - socketioServer = new SocketIoServer(connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - // Register services - await fabricConnectorPlugin.getOrCreateWebServices(); - await fabricConnectorPlugin.registerWebServices(expressApp, socketioServer); - - // Create ApiClient - const apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new FabricApiClient(apiConfig); - }); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (fabricConnectorPlugin) { - log.info("Close Fabric connector..."); - fabricConnectorPlugin.shutdown(); - } - - if (apiClient) { - log.info("Close ApiClient connections..."); - apiClient.close(); - } - - if (socketioServer) { - log.info("Stop the SocketIO server connector..."); - await new Promise((resolve) => - socketioServer.close(() => resolve()), - ); - } - - if (connectorServer) { - log.info("Stop the HTTP server connector..."); - await new Promise((resolve) => - connectorServer.close(() => resolve()), - ); - } - - // Wait for monitor to be terminated - await new Promise((resolve) => setTimeout(resolve, 8000)); - - if (ledger) { - log.info("Stop the fabric ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }); - - ////////////////////////////////// - // Helpers - ////////////////////////////////// - - /** - * Common logic for executing watchBlock monitoring tests. - * Will subscribe to new blocks and send new transaction, to trigger creation of the new block. - * - * @param monitorName Unique name, will be used for identification and in transaction argument. - * @param type Type of block to receive. - * @param checkEventCallback Callback called when received the event from the connector. - * - * @returns Monitoring promise - will resolve if `checkEventCallback` passes, reject if it throws. - */ - async function testWatchBlock( - monitorName: string, - type: WatchBlocksListenerTypeV1, - checkEventCallback: (event: WatchBlocksResponseV1) => void, - triggerTransactionCreation = true, - ) { - // Start monitoring - const monitorPromise = new Promise((resolve, reject) => { - const watchObservable = apiClient.watchBlocksDelegatedSignV1({ - channelName: ledgerChannelName, - signerCertificate: adminIdentity.credentials.certificate, - signerMspID: adminIdentity.mspId, - type, - }); - - const subscription = watchObservable.subscribe({ - next(event) { - log.debug("Received event:", JSON.stringify(event)); - try { - checkEventCallback(event); - subscription.unsubscribe(); - resolve(); - } catch (err) { - log.error("watchBlocksDelegatedSignV1() event check error:", err); - subscription.unsubscribe(); - reject(err); - } - }, - error(err) { - log.error("watchBlocksDelegatedSignV1() error:", err); - subscription.unsubscribe(); - reject(err); - }, - }); - }); - - // Create new asset to trigger new block creation - if (triggerTransactionCreation) { - const createAssetResponse = await apiClient.runTransactionV1({ - signingCredential, - channelName: ledgerChannelName, - invocationType: FabricContractInvocationType.Send, - contractName: ledgerContractName, - methodName: "CreateAsset", - params: [monitorName, "green", "111", "someOwner", "299"], - }); - expect(createAssetResponse).toBeTruthy(); - expect(createAssetResponse.status).toEqual(200); - expect(createAssetResponse.data).toBeTruthy(); - expect(createAssetResponse.data.transactionId).toBeTruthy(); - log.debug( - "runTransactionV1 response:", - JSON.stringify(createAssetResponse.data), - ); - } - - return monitorPromise; - } - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - /** - * Check full block monitoring - */ - test("Monitoring with type Full returns entire raw block", async () => { - const monitorPromise = testWatchBlock( - "FullBlockTest", - WatchBlocksListenerTypeV1.Full, - (event) => { - expect(event).toBeTruthy(); - - if (!("fullBlock" in event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify(event)}`, - ); - } - - const fullBlock = event.fullBlock; - expect(fullBlock.blockNumber).toBeTruthy(); - expect(fullBlock.blockData).toBeTruthy(); - expect(fullBlock.blockData.header).toBeTruthy(); - expect(fullBlock.blockData.data).toBeTruthy(); - expect(fullBlock.blockData.metadata).toBeTruthy(); - }, - ); - - await monitorPromise; - }); - - /** - * Check filtered block monitoring - */ - test("Monitoring with type Filtered returns filtered block", async () => { - const monitorPromise = testWatchBlock( - "FilteredBlockTest", - WatchBlocksListenerTypeV1.Filtered, - (event) => { - expect(event).toBeTruthy(); - - if (!("filteredBlock" in event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify(event)}`, - ); - } - - const filteredBlock = event.filteredBlock; - expect(filteredBlock.blockNumber).toBeTruthy(); - expect(filteredBlock.blockData).toBeTruthy(); - expect(filteredBlock.blockData.channel_id).toBeTruthy(); - expect(filteredBlock.blockData.number).toBeTruthy(); - expect(filteredBlock.blockData.filtered_transactions).toBeTruthy(); - }, - ); - - await monitorPromise; - }); - - /** - * Check private block monitoring - */ - test("Monitoring with type Private returns private block", async () => { - const monitorPromise = testWatchBlock( - "PrivateBlockTest", - WatchBlocksListenerTypeV1.Private, - (event) => { - expect(event).toBeTruthy(); - - if (!("privateBlock" in event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify(event)}`, - ); - } - - const fullBlock = event.privateBlock; - expect(fullBlock.blockNumber).toBeTruthy(); - expect(fullBlock.blockData).toBeTruthy(); - expect(fullBlock.blockData.header).toBeTruthy(); - expect(fullBlock.blockData.data).toBeTruthy(); - expect(fullBlock.blockData.metadata).toBeTruthy(); - }, - ); - - await monitorPromise; - }); - - /** - * Check Cacti custom transactions summary block monitoring. - */ - test("Monitoring with type CactiTransactions returns transactions summary", async () => { - const monitorPromise = testWatchBlock( - "CactiTransactionsTest", - WatchBlocksListenerTypeV1.CactiTransactions, - (event) => { - expect(event).toBeTruthy(); - - if (!("cactiTransactionsEvents" in event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify(event)}`, - ); - } - - const eventData = event.cactiTransactionsEvents; - expect(eventData.length).toBeGreaterThan(0); - expect(eventData[0].chaincodeId).toBeTruthy(); - expect(eventData[0].transactionId).toBeTruthy(); - expect(eventData[0].functionName).toBeTruthy(); - expect(eventData[0].functionArgs).toBeTruthy(); - }, - ); - - await monitorPromise; - }); - - /** - * Check Cacti custom full block summary block monitoring. - */ - test("Monitoring with type CactiFullBlock returns block summary", async () => { - const monitorPromise = testWatchBlock( - "CactiFullBlockTest", - WatchBlocksListenerTypeV1.CactiFullBlock, - (event) => { - expect(event).toBeTruthy(); - - if (!("cactiFullEvents" in event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify(event)}`, - ); - } - - const cactiFullBlock = event.cactiFullEvents; - - // Check block fields - expect(cactiFullBlock).toBeTruthy(); - expect(cactiFullBlock.blockNumber).toBeDefined(); - expect(cactiFullBlock.blockHash).toBeTruthy(); - expect(cactiFullBlock.previousBlockHash).toBeTruthy(); - expect(cactiFullBlock.transactionCount).toBeDefined(); - - // Check transaction fields - for (const tx of cactiFullBlock.cactiTransactionsEvents) { - expect(tx.hash).toBeTruthy(); - expect(tx.channelId).toBeTruthy(); - expect(tx.timestamp).toBeTruthy(); - expect(tx.transactionType).toBeTruthy(); - expect(tx.protocolVersion).not.toBeUndefined(); - expect(tx.epoch).not.toBeUndefined(); - - // Check transaction actions fields - for (const action of tx.actions) { - expect(action.functionName).toBeTruthy(); - expect(action.functionArgs).toBeTruthy(); - expect(action.functionArgs.length).toEqual(5); - expect(action.chaincodeId).toBeTruthy(); - expect(action.creator.mspid).toBeTruthy(); - expect(action.creator.cert).toBeTruthy(); - - // Check transaction action endorsement fields - for (const endorsement of action.endorsements) { - expect(endorsement.signature).toBeTruthy(); - expect(endorsement.signer.mspid).toBeTruthy(); - expect(endorsement.signer.cert).toBeTruthy(); - } - } - } - }, - ); - - await monitorPromise; - }); - - test("Invalid WatchBlocksListenerTypeV1 value gets knocked down", async () => { - const monitorPromise = testWatchBlock( - "InvalidTypeTest", - "Some_INVALID_WatchBlocksListenerTypeV1" as WatchBlocksListenerTypeV1, - () => undefined, // will never reach this because it is meant to error out - false, - ); - - try { - await monitorPromise; - } catch (ex: any) { - // Execution never reaches this point - I'm assuming because the - // testWatchBlock method somehow does not fulfil it's obligation of - // either succeeding or throwing (it seems to get stuck idling forever - // when I debug this in VSCode) - expect(ex).toBeTruthy(); - expect(ex.code).toEqual(500); - expect(ex.errorMessage).toBeTruthy(); - } - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/fabric-watch-blocks-v1-endpoint.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/fabric-watch-blocks-v1-endpoint.test.ts deleted file mode 100644 index f2f5a66799..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/fabric-watch-blocks-v1-endpoint.test.ts +++ /dev/null @@ -1,491 +0,0 @@ -import "jest-extended"; -import http from "http"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { Server as SocketIoServer } from "socket.io"; -import { DiscoveryOptions } from "fabric-network"; - -import { - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; - -import { Constants, Configuration } from "@hyperledger/cactus-core-api"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import { - PluginLedgerConnectorFabric, - FabricContractInvocationType, - DefaultEventHandlerStrategy, - FabricSigningCredential, - FabricApiClient, - WatchBlocksListenerTypeV1, - WatchBlocksResponseV1, -} from "../../../../main/typescript/public-api"; - -/** - * Functional test of WatchBlocksV1Endpoint on connector-fabric (packages/cactus-plugin-ledger-connector-fabric) - * Assumes sample CC was already deployed on the test ledger. - * - * @note - this test sometimes hangs infinitely when used with fabric-node-sdk 2.3.0, - * probably due to bug in the underlying dependency grpc-js. Problem does not occur on 2.5.0. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Ledger settings -const imageName = DEFAULT_FABRIC_2_AIO_IMAGE_NAME; -const imageVersion = FABRIC_25_LTS_AIO_IMAGE_VERSION; -const fabricEnvVersion = FABRIC_25_LTS_AIO_FABRIC_VERSION; -const fabricEnvCAVersion = "1.4.9"; -const ledgerChannelName = "mychannel"; -const ledgerContractName = "basic"; - -// Log settings -const testLogLevel: LogLevelDesc = "info"; // default: info -const sutLogLevel: LogLevelDesc = "info"; // default: info - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "fabric-watch-blocks-v1-endpoint.test", - level: testLogLevel, -}); - -/** - * Main test suite - */ -describe("watchBlocksV1 of fabric connector tests", () => { - let ledger: FabricTestLedgerV1; - let signingCredential: FabricSigningCredential; - let fabricConnectorPlugin: PluginLedgerConnectorFabric; - let connectorServer: http.Server; - let socketioServer: SocketIoServer; - let apiClient: FabricApiClient; - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - // Start Ledger - log.info("Start FabricTestLedgerV1..."); - log.debug("Version:", fabricEnvVersion, "CA Version:", fabricEnvCAVersion); - ledger = new FabricTestLedgerV1({ - emitContainerLogs: false, - publishAllPorts: true, - logLevel: testLogLevel, - imageName, - imageVersion, - envVars: new Map([ - ["FABRIC_VERSION", fabricEnvVersion], - ["CA_VERSION", fabricEnvCAVersion], - ]), - }); - log.debug("Fabric image:", ledger.getContainerImageName()); - await ledger.start({ omitPull: false }); - - // Get connection profile - log.info("Get fabric connection profile for Org1..."); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - log.debug("Fabric connection profile for Org1 OK: %o", connectionProfile); - expect(connectionProfile).toBeTruthy(); - - // Enroll admin and user - const enrollAdminOut = await ledger.enrollAdmin(); - log.debug("Enrolled admin OK."); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await ledger.enrollUser(adminWallet); - log.debug("Enrolled user OK."); - - // Create Keychain Plugin - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - logLevel: sutLogLevel, - backend: new Map([[keychainEntryKey, JSON.stringify(userIdentity)]]), - }); - signingCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - // Create Connector Plugin - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - fabricConnectorPlugin = new PluginLedgerConnectorFabric({ - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - sshConfig: await ledger.getSshConfig(), - cliContainerEnv: {}, - peerBinary: "/fabric-samples/bin/peer", - logLevel: sutLogLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAnyfortx, - commitTimeout: 300, - }, - }); - - // Run http server - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - connectorServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: connectorServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const apiHost = `http://${addressInfo.address}:${addressInfo.port}`; - - // Run socketio server - socketioServer = new SocketIoServer(connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - // Register services - await fabricConnectorPlugin.getOrCreateWebServices(); - await fabricConnectorPlugin.registerWebServices(expressApp, socketioServer); - - // Create ApiClient - const apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new FabricApiClient(apiConfig); - }); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (fabricConnectorPlugin) { - log.info("Close Fabric connector..."); - fabricConnectorPlugin.shutdown(); - } - - if (apiClient) { - log.info("Close ApiClient connections..."); - apiClient.close(); - } - - if (socketioServer) { - log.info("Stop the SocketIO server connector..."); - await new Promise((resolve) => - socketioServer.close(() => resolve()), - ); - } - - if (connectorServer) { - log.info("Stop the HTTP server connector..."); - await new Promise((resolve) => - connectorServer.close(() => resolve()), - ); - } - - // Wait for monitor to be terminated - await new Promise((resolve) => setTimeout(resolve, 8000)); - - if (ledger) { - log.info("Stop the fabric ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }); - - ////////////////////////////////// - // Helpers - ////////////////////////////////// - - /** - * Common logic for executing watchBlock monitoring tests. - * Will subscribe to new blocks and send new transaction, to trigger creation of the new block. - * - * @param monitorName Unique name, will be used for identification and in transaction argument. - * @param type Type of block to receive. - * @param checkEventCallback Callback called when received the event from the connector. - * - * @returns Monitoring promise - will resolve if `checkEventCallback` passes, reject if it throws. - */ - async function testWatchBlock( - monitorName: string, - type: WatchBlocksListenerTypeV1, - checkEventCallback: (event: WatchBlocksResponseV1) => void, - triggerTransactionCreation = true, - ) { - // Start monitoring - const monitorPromise = new Promise((resolve, reject) => { - const watchObservable = apiClient.watchBlocksV1({ - channelName: ledgerChannelName, - gatewayOptions: { - identity: signingCredential.keychainRef, - wallet: { - keychain: signingCredential, - }, - }, - type, - }); - - const subscription = watchObservable.subscribe({ - next(event) { - log.debug("Received event:", JSON.stringify(event)); - try { - checkEventCallback(event); - subscription.unsubscribe(); - resolve(); - } catch (err) { - log.error("watchBlocksV1() event check error:", err); - subscription.unsubscribe(); - reject(err); - } - }, - error(err) { - log.error("watchBlocksV1() error:", err); - subscription.unsubscribe(); - reject(err); - }, - }); - }); - - // Create new asset to trigger new block creation - if (triggerTransactionCreation) { - const createAssetResponse = await apiClient.runTransactionV1({ - signingCredential, - channelName: ledgerChannelName, - invocationType: FabricContractInvocationType.Send, - contractName: ledgerContractName, - methodName: "CreateAsset", - params: [monitorName, "green", "111", "someOwner", "299"], - }); - expect(createAssetResponse).toBeTruthy(); - expect(createAssetResponse.status).toEqual(200); - expect(createAssetResponse.data).toBeTruthy(); - expect(createAssetResponse.data.transactionId).toBeTruthy(); - log.debug( - "runTransactionV1 response:", - JSON.stringify(createAssetResponse.data), - ); - } - - return monitorPromise; - } - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - /** - * Check full block monitoring - */ - test("Monitoring with type Full returns entire raw block", async () => { - const monitorPromise = testWatchBlock( - "FullBlockTest", - WatchBlocksListenerTypeV1.Full, - (event) => { - expect(event).toBeTruthy(); - - if (!("fullBlock" in event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify(event)}`, - ); - } - - const fullBlock = event.fullBlock; - expect(fullBlock.blockNumber).toBeTruthy(); - expect(fullBlock.blockData).toBeTruthy(); - expect(fullBlock.blockData.header).toBeTruthy(); - expect(fullBlock.blockData.data).toBeTruthy(); - expect(fullBlock.blockData.metadata).toBeTruthy(); - }, - ); - - await monitorPromise; - }); - - /** - * Check filtered block monitoring - */ - test("Monitoring with type Filtered returns filtered block", async () => { - const monitorPromise = testWatchBlock( - "FilteredBlockTest", - WatchBlocksListenerTypeV1.Filtered, - (event) => { - expect(event).toBeTruthy(); - - if (!("filteredBlock" in event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify(event)}`, - ); - } - - const filteredBlock = event.filteredBlock; - expect(filteredBlock.blockNumber).toBeTruthy(); - expect(filteredBlock.blockData).toBeTruthy(); - expect(filteredBlock.blockData.channel_id).toBeTruthy(); - expect(filteredBlock.blockData.number).toBeTruthy(); - expect(filteredBlock.blockData.filtered_transactions).toBeTruthy(); - }, - ); - - await monitorPromise; - }); - - /** - * Check private block monitoring - */ - test("Monitoring with type Private returns private block", async () => { - const monitorPromise = testWatchBlock( - "PrivateBlockTest", - WatchBlocksListenerTypeV1.Private, - (event) => { - expect(event).toBeTruthy(); - - if (!("privateBlock" in event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify(event)}`, - ); - } - - const fullBlock = event.privateBlock; - expect(fullBlock.blockNumber).toBeTruthy(); - expect(fullBlock.blockData).toBeTruthy(); - expect(fullBlock.blockData.header).toBeTruthy(); - expect(fullBlock.blockData.data).toBeTruthy(); - expect(fullBlock.blockData.metadata).toBeTruthy(); - }, - ); - - await monitorPromise; - }); - - /** - * Check Cacti custom transactions summary block monitoring. - */ - test("Monitoring with type CactiTransactions returns transactions summary", async () => { - const monitorPromise = testWatchBlock( - "CactiTransactionsTest", - WatchBlocksListenerTypeV1.CactiTransactions, - (event) => { - expect(event).toBeTruthy(); - - if (!("cactiTransactionsEvents" in event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify(event)}`, - ); - } - - const eventData = event.cactiTransactionsEvents; - expect(eventData.length).toBeGreaterThan(0); - expect(eventData[0].chaincodeId).toBeTruthy(); - expect(eventData[0].transactionId).toBeTruthy(); - expect(eventData[0].functionName).toBeTruthy(); - expect(eventData[0].functionArgs).toBeTruthy(); - }, - ); - - await monitorPromise; - }); - - /** - * Check Cacti custom full block summary block monitoring. - */ - test("Monitoring with type CactiFullBlock returns block summary", async () => { - const monitorPromise = testWatchBlock( - "CactiFullBlockTest", - WatchBlocksListenerTypeV1.CactiFullBlock, - (event) => { - expect(event).toBeTruthy(); - - if (!("cactiFullEvents" in event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify(event)}`, - ); - } - - const cactiFullBlock = event.cactiFullEvents; - - // Check block fields - expect(cactiFullBlock).toBeTruthy(); - expect(cactiFullBlock.blockNumber).toBeDefined(); - expect(cactiFullBlock.blockHash).toBeTruthy(); - expect(cactiFullBlock.previousBlockHash).toBeTruthy(); - expect(cactiFullBlock.transactionCount).toBeDefined(); - - // Check transaction fields - for (const tx of cactiFullBlock.cactiTransactionsEvents) { - expect(tx.hash).toBeTruthy(); - expect(tx.channelId).toBeTruthy(); - expect(tx.timestamp).toBeTruthy(); - expect(tx.transactionType).toBeTruthy(); - expect(tx.protocolVersion).not.toBeUndefined(); - expect(tx.epoch).not.toBeUndefined(); - - // Check transaction actions fields - for (const action of tx.actions) { - expect(action.functionName).toBeTruthy(); - expect(action.functionArgs).toBeTruthy(); - expect(action.functionArgs.length).toEqual(5); - expect(action.chaincodeId).toBeTruthy(); - expect(action.creator.mspid).toBeTruthy(); - expect(action.creator.cert).toBeTruthy(); - - // Check transaction action endorsement fields - for (const endorsement of action.endorsements) { - expect(endorsement.signature).toBeTruthy(); - expect(endorsement.signer.mspid).toBeTruthy(); - expect(endorsement.signer.cert).toBeTruthy(); - } - } - } - }, - ); - - await monitorPromise; - }); - - test("Invalid WatchBlocksListenerTypeV1 value gets knocked down", async () => { - const monitorPromise = testWatchBlock( - "CactiInvalidTest", - "Some_INVALID_WatchBlocksListenerTypeV1" as WatchBlocksListenerTypeV1, - () => undefined, // will never reach this because it is meant to error out - false, - ); - - try { - await monitorPromise; - } catch (ex: any) { - // Execution never reaches this point - I'm assuming because the - // testWatchBlock method somehow does not fulfil it's obligation of - // either succeeding or throwing (it seems to get stuck idling forever - // when I debug this in VSCode) - expect(ex).toBeTruthy(); - expect(ex.code).toEqual(500); - expect(ex.errorMessage).toBeTruthy(); - } - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/obtain-profiles.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/obtain-profiles.test.ts deleted file mode 100644 index 4460003050..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/obtain-profiles.test.ts +++ /dev/null @@ -1,49 +0,0 @@ -import "jest-extended"; -import { - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -const testCase = "obtains configuration profiles from Fabric 2.x ledger"; -const logLevel: LogLevelDesc = "TRACE"; - -describe("Obtain configuration profiles test", () => { - let ledger: FabricTestLedgerV1; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); - ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - }); - await ledger.start({ omitPull: false }); - }); - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - }); - test(`${testCase}`, async () => { - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); - const connectionProfileOrg1 = await ledger.getConnectionProfileOrgX("org1"); - expect(connectionProfile).toEqual(connectionProfileOrg1); - - const connectionProfileOrg2 = await ledger.getConnectionProfileOrgX("org2"); - expect(connectionProfileOrg2).toBeTruthy(); - - expect(connectionProfileOrg1).not.toEqual(connectionProfileOrg2); - - //Should return error, as there is no Org3 in the default deployment of Fabric AIO image - const error = "getConnectionProfileOrgX() crashed."; - const promise = ledger.getConnectionProfileOrgX("org3"); - await expect(promise).rejects.toThrow(error); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts deleted file mode 100644 index a1933710c4..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts +++ /dev/null @@ -1,308 +0,0 @@ -import http from "http"; -import { AddressInfo } from "net"; -import "jest-extended"; - -import { v4 as uuidv4 } from "uuid"; - -import bodyParser from "body-parser"; -import express from "express"; - -import { - Containers, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - IListenOptions, - LogLevelDesc, - Servers, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import { - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - RunTransactionRequest, - FabricContractInvocationType, - DefaultEventHandlerStrategy, - FabricSigningCredential, -} from "../../../../main/typescript/public-api"; - -import { K_CACTUS_FABRIC_TOTAL_TX_COUNT } from "../../../../main/typescript/prometheus-exporter/metrics"; - -import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; -import { DiscoveryOptions } from "fabric-network"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -const testCase = "runs tx on a Fabric v2.5.6 ledger"; - -describe(testCase, () => { - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const logLevel: LogLevelDesc = "INFO"; - const label = "fabric run transaction test"; - const log = LoggerProvider.getOrCreate({ level: logLevel, label }); - const ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - logLevel, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([ - ["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION], - ["CA_VERSION", "1.4.9"], - ]), - }); - let addressInfo, - address: string, - port: number, - apiHost, - apiConfig, - apiClient: FabricApi; - expect(ledger).toBeTruthy(); - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - }); - afterAll(async () => await Servers.shutdown(server)); - - afterAll(async () => { - await Containers.logDiagnostics({ logLevel }); - }); - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - beforeAll(async () => { - await ledger.start({ omitPull: false }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - - apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new FabricApi(apiConfig); - }); - - test(testCase, async () => { - const enrollAdminOut = await ledger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await ledger.enrollUser(adminWallet); - - const connectionProfile = await ledger.getConnectionProfileOrg1(); - - const sshConfig = await ledger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - pluginRegistry, - sshConfig, - cliContainerEnv: {}, - peerBinary: "/fabric-samples/bin/peer", - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - const plugin = new PluginLedgerConnectorFabric(pluginOptions); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - - const assetId = "asset277"; - const assetOwner = uuidv4(); - - const channelName = "mychannel"; - const contractName = "basic"; - const signingCredential: FabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - { - const res = await apiClient.runTransactionV1({ - signingCredential, - channelName, - contractName, - invocationType: FabricContractInvocationType.Call, - methodName: "GetAllAssets", - params: [], - } as RunTransactionRequest); - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - expect(() => JSON.parse(res.data.functionOutput)).not.toThrow(); - } - { - const req: RunTransactionRequest = { - signingCredential, - channelName, - invocationType: FabricContractInvocationType.Send, - contractName, - methodName: "CreateAsset", - params: [assetId, "yellow", "11", assetOwner, "199"], - }; - - const res = await apiClient.runTransactionV1(req); - expect(res.data.transactionId).toBeTruthy(); - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - - const res2 = await apiClient.getTransactionReceiptByTxIDV1({ - signingCredential, - channelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [channelName, res.data.transactionId], - } as RunTransactionRequest); - - expect(res2).toBeTruthy(); - log.info(res2.data); - } - - { - const res = await apiClient.runTransactionV1({ - signingCredential, - channelName, - contractName, - invocationType: FabricContractInvocationType.Call, - methodName: "GetAllAssets", - params: [], - } as RunTransactionRequest); - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - const assets = JSON.parse(res.data.functionOutput); - const asset277 = assets.find((c: { ID: string }) => c.ID === assetId); - expect(asset277).toBeTruthy(); - expect(asset277.Owner).toBeTruthy(); - expect(asset277.Owner).toEqual(assetOwner); - } - - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_FABRIC_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTUS_FABRIC_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTUS_FABRIC_TOTAL_TX_COUNT + - '{type="' + - K_CACTUS_FABRIC_TOTAL_TX_COUNT + - '"} 3'; - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data.includes(promMetricsOutput)).toBeTrue(); - } - - { - const req: RunTransactionRequest = { - signingCredential, - gatewayOptions: { - identity: keychainEntryKey, - wallet: { - json: keychainEntryValue, - }, - }, - channelName, - invocationType: FabricContractInvocationType.Send, - contractName, - methodName: "CreateAsset", - params: ["asset388", "green", "111", assetOwner, "299"], - endorsingOrgs: ["org1.example.com", "Org2MSP"], - }; - - const res = await apiClient.runTransactionV1(req); - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - } - - { - const res = await apiClient.runTransactionV1({ - gatewayOptions: { - connectionProfile, - discovery: discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - endorseTimeout: 300, - }, - identity: keychainEntryKey, - wallet: { - json: keychainEntryValue, - }, - }, - signingCredential, - channelName, - contractName, - invocationType: FabricContractInvocationType.Call, - methodName: "GetAllAssets", - params: [], - } as RunTransactionRequest); - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - const assets = JSON.parse(res.data.functionOutput); - const asset277 = assets.find((c: { ID: string }) => c.ID === assetId); - expect(asset277).toBeTruthy(); - expect(asset277.Owner).toBeTruthy(); - expect(asset277.Owner).toEqual(assetOwner); - } - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-identities.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-identities.test.ts deleted file mode 100644 index c7ad4d9327..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-identities.test.ts +++ /dev/null @@ -1,376 +0,0 @@ -import "jest-extended"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; -import { v4 as uuidv4 } from "uuid"; -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - DefaultEventHandlerStrategy, - FabricSigningCredentialType, - IVaultConfig, - PluginLedgerConnectorFabric, - IIdentityData, - FabricContractInvocationType, -} from "../../../../main/typescript/public-api"; -import { DiscoveryOptions } from "fabric-network"; - -const logLevel: LogLevelDesc = "INFO"; -import { - Containers, - VaultTestServer, - K_DEFAULT_VAULT_HTTP_PORT, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_AIO_FABRIC_VERSION, -} from "@hyperledger/cactus-test-tooling"; -import { v4 as internalIpV4 } from "internal-ip"; -import axios from "axios"; - -// test scenario -// - enroll registrar (both using default identity and vault(p256) identity) -// - register 2 client (using registrar identity) -// - enroll 1st client using default identity -// - enroll 2nd client using vault identity(p384) -// - make invoke (InitLedger) using 1st client -// - make invoke (TransferAsset) using 2nd client (p384) client -// - make query ("ReadAsset") using registrar(p256) -// Logger setup - -const log: Logger = LoggerProvider.getOrCreate({ - label: "run-transaction-with-identities.test", - level: logLevel, -}); - -describe("Run transaction with identities", () => { - const registrarKey = "registrar"; - const client1Key = "client-default-"; - const client2Key = "client-vault"; - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - let plugin: PluginLedgerConnectorFabric; - let ledger: FabricTestLedgerV1; - let vaultTestContainer: VaultTestServer; - let keychainPlugin: PluginKeychainMemory; - const testToken = "myroot"; - beforeAll(async () => { - ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - await ledger.start({ omitPull: false }); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); - - vaultTestContainer = new VaultTestServer({}); - await vaultTestContainer.start(); - - const ci = await Containers.getById(vaultTestContainer.containerId); - const vaultIpAddr = await internalIpV4(); - const hostPort = await Containers.getPublicPort( - K_DEFAULT_VAULT_HTTP_PORT, - ci, - ); - const vaultHost = `http://${vaultIpAddr}:${hostPort}`; - - ///// - const vaultConfig: IVaultConfig = { - endpoint: vaultHost, - transitEngineMountPath: "/transit", - }; - - { - // mount engine and create some test keys - const vaultHTTPClient = axios.create({ - baseURL: vaultConfig.endpoint + "/v1", - headers: { - "X-Vault-Token": testToken, - }, - }); - await vaultHTTPClient.post( - "/sys/mounts" + vaultConfig.transitEngineMountPath, - { type: "transit" }, - ); - await vaultHTTPClient.post( - vaultConfig.transitEngineMountPath + "/keys/" + registrarKey, - { - type: "ecdsa-p256", - }, - ); - await vaultHTTPClient.post( - vaultConfig.transitEngineMountPath + "/keys/" + client2Key, - { - type: "ecdsa-p384", - }, - ); - } - /// - keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId: keychainId, - logLevel, - }); - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - const supportedIdentity: FabricSigningCredentialType[] = [ - FabricSigningCredentialType.VaultX509, - FabricSigningCredentialType.X509, - ]; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - pluginRegistry, - sshConfig: {}, - cliContainerEnv: {}, - peerBinary: "not-required", - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - supportedIdentity, - vaultConfig: vaultConfig, - }; - plugin = new PluginLedgerConnectorFabric(pluginOptions); - }); - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - await vaultTestContainer.stop(); - await vaultTestContainer.destroy(); - }); - test(`test with-vaultKey`, async () => { - { - // enroll registrar using default identity - await plugin.enroll( - { - keychainId: keychainId, - keychainRef: registrarKey + "-x.509", - type: FabricSigningCredentialType.X509, - }, - { - enrollmentID: "admin", - enrollmentSecret: "adminpw", - mspId: "Org1MSP", - caId: "ca.org1.example.com", - }, - ); - - const rawCert = await keychainPlugin.get(registrarKey + "-x.509"); - expect(rawCert).toBeTruthy(); - const certData = JSON.parse(rawCert) as IIdentityData; - expect(certData.type).toEqual(FabricSigningCredentialType.X509); - expect(certData.credentials.privateKey).toBeTruthy(); - } - { - // enroll registrar using vault identity - await plugin.enroll( - { - keychainId: keychainId, - keychainRef: registrarKey + "-vault", - type: FabricSigningCredentialType.VaultX509, - vaultTransitKey: { - token: testToken, - keyName: registrarKey, - }, - }, - { - enrollmentID: "admin", - enrollmentSecret: "adminpw", - mspId: "Org1MSP", - caId: "ca.org1.example.com", - }, - ); - - const rawCert = await keychainPlugin.get(registrarKey + "-vault"); - expect(rawCert).toBeTruthy(); - const certData = JSON.parse(rawCert) as IIdentityData; - expect(certData.type).toEqual(FabricSigningCredentialType.VaultX509); - expect(certData.credentials.privateKey).toBeFalsy(); - } - { - // register a client1 using registrar's default x509 identity - const secret = await plugin.register( - { - keychainId: keychainId, - keychainRef: registrarKey + "-x.509", - }, - { - enrollmentID: client1Key, - enrollmentSecret: "pw", - affiliation: "org1.department1", - }, - "ca.org1.example.com", - ); - expect(secret).toEqual("pw"); - } - { - // register a client using registrar's vault identity - const secret = await plugin.register( - { - keychainId: keychainId, - keychainRef: registrarKey + "-vault", - type: FabricSigningCredentialType.VaultX509, - vaultTransitKey: { - token: testToken, - keyName: registrarKey, - }, - }, - { - enrollmentID: client2Key, - enrollmentSecret: "pw", - affiliation: "org1.department1", - }, - "ca.org1.example.com", - ); - expect(secret).toEqual("pw"); - } - { - // enroll client client1 registered above - await plugin.enroll( - { - keychainId: keychainId, - keychainRef: client1Key, - }, - { - enrollmentID: client1Key, - enrollmentSecret: "pw", - mspId: "Org1MSP", - caId: "ca.org1.example.com", - }, - ); - - const rawCert = await keychainPlugin.get(client1Key); - expect(rawCert).toBeTruthy(); - const certData = JSON.parse(rawCert) as IIdentityData; - expect(certData.type).toEqual(FabricSigningCredentialType.X509); - expect(certData.credentials.privateKey).toBeTruthy(); - } - { - // enroll client2 using vault identity - await plugin.enroll( - { - keychainId: keychainId, - keychainRef: client2Key, - type: FabricSigningCredentialType.VaultX509, - vaultTransitKey: { - token: testToken, - keyName: client2Key, - }, - }, - { - enrollmentID: client2Key, - enrollmentSecret: "pw", - mspId: "Org1MSP", - caId: "ca.org1.example.com", - }, - ); - - const rawCert = await keychainPlugin.get(client2Key); - expect(rawCert).toBeTruthy(); - const { type, credentials } = JSON.parse(rawCert) as IIdentityData; - const { privateKey } = credentials; - expect(type).toEqual(FabricSigningCredentialType.VaultX509); - expect(privateKey).toBeFalsy(); - } - - // Temporary workaround here: Deploy a second contract because the default - // one is being hammered with "InitLedger" transactions by the container's - // own healthcheck (see healthcheck.sh in the fabric-all-in-one folder). - // The above makes it so that transactions are triggering multiversion - // concurrency control errors. - // Deploying a fresh new contract here as a quick workaround resolves that - // problem, the real fix is to make the health check use a tx that does not - // commit instead just reads something which should still prove that the - // AIO legder is up and running fine but it won't cause this issue anymore. - const contractName = "basic2"; - const cmd = [ - "./network.sh", - "deployCC", - "-ccn", - contractName, - "-ccp", - "../asset-transfer-basic/chaincode-go", - "-ccl", - "go", - ]; - - const container = ledger.getContainer(); - const timeout = 180000; // 3 minutes - const cwd = "/fabric-samples/test-network/"; - const out = await Containers.exec(container, cmd, timeout, logLevel, cwd); - expect(out).toBeTruthy(); - log.info("Output of Basic2 contract deployment below:"); - log.info(out); - - { - // make invoke InitLedger using a client1 client - await plugin.transact({ - signingCredential: { - keychainId: keychainId, - keychainRef: client1Key, - }, - channelName: "mychannel", - contractName, - invocationType: FabricContractInvocationType.Send, - methodName: "InitLedger", - params: [], - }); - } - { - // make invoke TransferAsset using a client2 client - await plugin.transact({ - signingCredential: { - keychainId: keychainId, - keychainRef: client2Key, - type: FabricSigningCredentialType.VaultX509, - vaultTransitKey: { - token: testToken, - keyName: client2Key, - }, - }, - channelName: "mychannel", - contractName, - invocationType: FabricContractInvocationType.Send, - methodName: "TransferAsset", - params: ["asset1", "client2"], - }); - } - { - // make query ReadAsset using a registrar client - const resp = await plugin.transact({ - signingCredential: { - keychainId: keychainId, - keychainRef: registrarKey + "-vault", - type: FabricSigningCredentialType.VaultX509, - vaultTransitKey: { - token: testToken, - keyName: registrarKey, - }, - }, - channelName: "mychannel", - contractName, - invocationType: FabricContractInvocationType.Call, - methodName: "ReadAsset", - params: ["asset1"], - }); - const asset = JSON.parse(resp.functionOutput); - expect(asset.Owner).toEqual("client2"); - } - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-ws-ids.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-ws-ids.test.ts deleted file mode 100644 index def3837058..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-ws-ids.test.ts +++ /dev/null @@ -1,324 +0,0 @@ -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; -import { v4 as uuidv4 } from "uuid"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - DefaultEventHandlerStrategy, - FabricSigningCredentialType, - IWebSocketConfig, - PluginLedgerConnectorFabric, - IIdentityData, - FabricContractInvocationType, -} from "../../../../main/typescript/public-api"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - WsTestServer, - WS_IDENTITY_HTTP_PORT, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_AIO_FABRIC_VERSION, -} from "@hyperledger/cactus-test-tooling"; -import { v4 as internalIpV4 } from "internal-ip"; -import { WsWallet } from "ws-wallet"; -import { WsIdentityClient } from "ws-identity-client"; - -const logLevel: LogLevelDesc = "INFO"; - -// test scenario -// - enroll registrar (both using default identity and webSocket(p256) identity) -// - register 2 client (using registrar identity) -// - enroll 1st client using default identity -// - enroll 2nd client using web socket identity(p384) -// - make invoke (InitLedger) using 1st client -// - make invoke (TransferAsset) using 2nd client (p384) client -// - make query ("ReadAsset") using registrar(p256) - -describe("PluginLedgerConnectorFabric", () => { - let ledger: FabricTestLedgerV1; - let wsTestContainer: WsTestServer; - let wsAdmin: WsWallet; - let wsUser: WsWallet; - let wsIdClient: WsIdentityClient; - let keychainId: string; - let keychainPlugin: PluginKeychainMemory; - let plugin: PluginLedgerConnectorFabric; - const registrarKey = "registrar"; - const client2Key = "client-ws"; - - beforeAll(async () => { - await Containers.logDiagnostics({ logLevel }); - - ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - wsTestContainer = new WsTestServer({}); - await wsTestContainer.start(); - - const ci = await Containers.getById(wsTestContainer.containerId); - const wsIpAddr = await internalIpV4(); - const hostPort = await Containers.getPublicPort(WS_IDENTITY_HTTP_PORT, ci); - - await ledger.start({ omitPull: false }); - - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); - - const keychainInstanceId = uuidv4(); - keychainId = uuidv4(); - - const wsUrl = `http://${wsIpAddr}:${hostPort}`; - - const wsConfig: IWebSocketConfig = { - endpoint: wsUrl, - pathPrefix: "/identity", - }; - - wsAdmin = new WsWallet({ - keyName: "admin", - logLevel, - strictSSL: false, - }); - - wsUser = new WsWallet({ - keyName: "user", - logLevel, - strictSSL: false, - }); - - keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId: keychainId, - logLevel, - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const supportedIdentity: FabricSigningCredentialType[] = [ - FabricSigningCredentialType.WsX509, - FabricSigningCredentialType.X509, - ]; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - pluginRegistry, - sshConfig: {}, - cliContainerEnv: {}, - peerBinary: "not-required", - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - supportedIdentity, - webSocketConfig: wsConfig, - }; - - plugin = new PluginLedgerConnectorFabric(pluginOptions); - - wsIdClient = new WsIdentityClient({ - apiVersion: "v1", - endpoint: wsUrl, - rpDefaults: { - strictSSL: false, - }, - }); - }); - - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - await wsTestContainer.stop(); - await wsTestContainer.destroy(); - await wsAdmin.close(); - await wsUser.close(); - }); - - test("run-transaction-with-webSocketKey", async () => { - let webSocketKeyAdmin, webSocketKeyUser; - { - const { sessionId, url } = JSON.parse( - await wsIdClient.write( - "session/new", - { - pubKeyHex: wsAdmin.getPubKeyHex(), - keyName: wsAdmin.keyName, - }, - {}, - ), - ); - webSocketKeyAdmin = await wsAdmin.open(sessionId, url); - } - - { - // enroll registrar using ws identity - await plugin.enroll( - { - keychainId: keychainId, - keychainRef: registrarKey + "-ws", - type: FabricSigningCredentialType.WsX509, - webSocketKey: webSocketKeyAdmin, - }, - { - enrollmentID: "admin", - enrollmentSecret: "adminpw", - mspId: "Org1MSP", - caId: "ca.org1.example.com", - }, - ); - const rawCert = await keychainPlugin.get(registrarKey + "-ws"); - expect(rawCert).toBeTruthy(); - const certData = JSON.parse(rawCert) as IIdentityData; - expect(certData.type).toBe(FabricSigningCredentialType.WsX509); - expect(certData.credentials.privateKey).toBeFalsy(); - } - { - // register a client using registrar's ws identity - const secret = await plugin.register( - { - keychainId: keychainId, - keychainRef: registrarKey + "-ws", - type: FabricSigningCredentialType.WsX509, - webSocketKey: webSocketKeyAdmin, - }, - { - enrollmentID: client2Key, - enrollmentSecret: "pw", - affiliation: "org1.department1", - }, - "ca.org1.example.com", - ); - expect(secret).toBe("pw"); - } - { - const { sessionId, url } = JSON.parse( - await wsIdClient.write( - "session/new", - { - pubKeyHex: wsUser.getPubKeyHex(), - keyName: wsUser.keyName, - }, - {}, - ), - ); - webSocketKeyUser = await wsUser.open(sessionId, url); - } - { - // enroll client2 using ws identity - await plugin.enroll( - { - keychainId: keychainId, - keychainRef: client2Key, - type: FabricSigningCredentialType.WsX509, - webSocketKey: webSocketKeyUser, - }, - { - enrollmentID: client2Key, - enrollmentSecret: "pw", - mspId: "Org1MSP", - caId: "ca.org1.example.com", - }, - ); - const rawCert = await keychainPlugin.get(client2Key); - expect(rawCert).toBeTruthy(); - const { type, credentials } = JSON.parse(rawCert) as IIdentityData; - const { privateKey } = credentials; - expect(type).toBe(FabricSigningCredentialType.WsX509); - expect(privateKey).toBeFalsy(); - } - - // Temporary workaround here: Deploy a second contract because the default - // one is being hammered with "InitLedger" transactions by the container's - // own healthcheck (see healthcheck.sh in the fabric-all-in-one folder). - // The above makes it so that transactions are triggering multiversion - // concurrency control errors. - // Deploying a fresh new contract here as a quick workaround resolves that - // problem, the real fix is to make the health check use a tx that does not - // commit instead just reads something which should still prove that the - // AIO legder is up and running fine but it won't cause this issue anymore. - const contractName = "basic2"; - const cmd = [ - "./network.sh", - "deployCC", - "-ccn", - contractName, - "-ccp", - "../asset-transfer-basic/chaincode-go", - "-ccl", - "go", - ]; - - const container = ledger.getContainer(); - const timeout = 180000; // 3 minutes - const cwd = "/fabric-samples/test-network/"; - const out = await Containers.exec(container, cmd, timeout, logLevel, cwd); - expect(out).toBeTruthy(); - - { - // make invoke InitLedger using a client1 client - await plugin.transact({ - signingCredential: { - keychainId: keychainId, - keychainRef: client2Key, - type: FabricSigningCredentialType.WsX509, - webSocketKey: webSocketKeyUser, - }, - channelName: "mychannel", - contractName, - invocationType: FabricContractInvocationType.Send, - methodName: "InitLedger", - params: [], - }); - } - { - // make invoke TransferAsset using a client2 client - await plugin.transact({ - signingCredential: { - keychainId: keychainId, - keychainRef: client2Key, - type: FabricSigningCredentialType.WsX509, - webSocketKey: webSocketKeyUser, - }, - channelName: "mychannel", - contractName, - invocationType: FabricContractInvocationType.Send, - methodName: "TransferAsset", - params: ["asset1", "client2"], - }); - } - { - const resp = await plugin.transact({ - signingCredential: { - keychainId: keychainId, - keychainRef: registrarKey + "-ws", - type: FabricSigningCredentialType.WsX509, - webSocketKey: webSocketKeyAdmin, - }, - channelName: "mychannel", - contractName, - invocationType: FabricContractInvocationType.Call, - methodName: "ReadAsset", - params: ["asset1"], - }); - const asset = JSON.parse(resp.functionOutput); - expect(asset.Owner).toBe("client2"); - } - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/identity-client.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/identity-client.test.ts deleted file mode 100644 index a48e1ed34e..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/identity-client.test.ts +++ /dev/null @@ -1,320 +0,0 @@ -import "jest-extended"; -import axios from "axios"; -import { v4 as internalIpV4 } from "internal-ip"; -import { - Containers, - VaultTestServer, - K_DEFAULT_VAULT_HTTP_PORT, - WsTestServer, - WS_IDENTITY_HTTP_PORT, -} from "@hyperledger/cactus-test-tooling"; -import { InternalIdentityClient } from "../../../main/typescript/identity/internal/client"; -import { VaultTransitClient } from "../../../main/typescript/identity/vault-client"; -import { WebSocketClient } from "../../../main/typescript/identity/web-socket-client"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { createHash } from "crypto"; -import { ECCurveType } from "../../../main/typescript/identity/internal/crypto-util"; -import { KJUR } from "jsrsasign"; -import { WsWallet, ECCurveType as ECCurveTypeW } from "ws-wallet"; -import { WsIdentityClient } from "ws-identity-client"; - -// a generic test suite for testing all the identity clients -// supported by this package -describe("identity clients test", () => { - const logLevel: LogLevelDesc = "ERROR"; - const testClients: Map = new Map(); - const testECP256 = "test-ec-p256"; - const testECP384 = "test-ec-p384"; - const testNotFoundKey = "keyNotFound"; - let wsTestContainer: WsTestServer; - let vaultTestContainer: VaultTestServer; - let IpAdd: string; - let wsWallet256: WsWallet; - let wsWallet384: WsWallet; - let vaultHost: string; - // let wsPathPrefix: any; - let wsUrl: string; - beforeAll(async () => { - IpAdd = (await internalIpV4()) as string; - - // setup web-socket client - wsTestContainer = new WsTestServer({ - logLevel, - imageVersion: "0.0.1", - }); - await wsTestContainer.start(); - let ci = await Containers.getById(wsTestContainer.containerId); - const wsHostPort = await Containers.getPublicPort( - WS_IDENTITY_HTTP_PORT, - ci, - ); - // setup vault client - vaultTestContainer = new VaultTestServer({}); - await vaultTestContainer.start(); - ci = await Containers.getById(vaultTestContainer.containerId); - const hostPort = await Containers.getPublicPort( - K_DEFAULT_VAULT_HTTP_PORT, - ci, - ); - vaultHost = `http://${IpAdd}:${hostPort}`; - wsUrl = `http://${IpAdd}:${wsHostPort}`; - - // External client with private key - wsWallet256 = new WsWallet({ - keyName: "256", - logLevel, - strictSSL: false, - }); - - // establish session Id to be used by external client with p384 key - wsWallet384 = new WsWallet({ - keyName: "384", - curve: "p384" as ECCurveTypeW, - logLevel, - strictSSL: false, - }); - - const mountPath = "/transit"; - const testToken = "myroot"; - // mount transit secret engine - - await axios.post( - vaultHost + "/v1/sys/mounts" + mountPath, - { - type: "transit", - }, - { - headers: { - "X-Vault-Token": testToken, - }, - }, - ); - await axios.post( - vaultHost + "/v1" + mountPath + "/keys/" + testECP256, - { - type: "ecdsa-p256", - }, - { - headers: { - "X-Vault-Token": testToken, - }, - }, - ); - await axios.post( - vaultHost + "/v1" + mountPath + "/keys/" + testECP384, - { - type: "ecdsa-p384", - }, - { - headers: { - "X-Vault-Token": testToken, - }, - }, - ); - testClients.set( - "vault-client", - new VaultTransitClient({ - endpoint: vaultHost, - mountPath: mountPath, - token: testToken, - logLevel: logLevel, - }), - ); - - const wsIdClient = new WsIdentityClient({ - apiVersion: "v1", - endpoint: wsUrl, - rpDefaults: { - strictSSL: false, - }, - }); - - const wsPathPrefix = "/identity"; - { - const newSidResp = JSON.parse( - await wsIdClient.write( - "session/new", - { - pubKeyHex: wsWallet256.getPubKeyHex(), - keyName: wsWallet256.keyName, - }, - {}, - ), - ); - const { signature, sessionId } = await wsWallet256.open( - newSidResp.sessionId, - newSidResp.url, - ); - - testClients.set( - "web-socket-client-256", - new WebSocketClient({ - endpoint: wsUrl, - pathPrefix: wsPathPrefix, - signature, - sessionId, - logLevel, - }), - ); - } - { - const newSidResp = JSON.parse( - await wsIdClient.write( - "session/new", - { - pubKeyHex: wsWallet384.getPubKeyHex(), - keyName: wsWallet384.keyName, - }, - {}, - ), - ); - const { signature, sessionId } = await wsWallet384.open( - newSidResp.sessionId, - newSidResp.url, - ); - testClients.set( - "web-socket-client-384", - new WebSocketClient({ - endpoint: wsUrl, - pathPrefix: wsPathPrefix, - signature, - sessionId, - logLevel, - }), - ); - } - }); - afterAll(async () => { - await wsTestContainer.stop(); - await wsTestContainer.destroy(); - await vaultTestContainer.stop(); - await vaultTestContainer.destroy(); - await wsWallet384.close(); - await wsWallet256.close(); - }); - - it("sign and verify for all clients", async () => { - const digest = Buffer.from("Hello Cactus"); - const hashDigest = createHash("sha256").update(digest).digest(); - - for (const [clientName, client] of testClients.entries()) { - if ( - clientName === "web-socket-client-256" || - clientName === "vault-client" - ) { - const { sig, crv } = await client.sign(testECP256, hashDigest); - expect(crv).toBe(ECCurveType.P256); - expect(sig).toBeTruthy(); - - // ASN.1 encoding check - const pSig = (KJUR.crypto.ECDSA as any).parseSigHexInHexRS( - sig.toString("hex"), - ); - const re = /[0-9A-Fa-f]{6}/g; - expect(re.test(pSig.r)).toBeTruthy(); - expect(re.test(pSig.s)).toBeTruthy(); - - // Signature verification - const pub = await client.getPub(testECP256); - const verify = new KJUR.crypto.Signature({ alg: "SHA256withECDSA" }); - verify.init(pub); - verify.updateHex(digest.toString("hex")); - expect(verify.verify(sig.toString("hex"))).toBeTruthy(); - } - - if ( - clientName === "web-socket-client-384" || - clientName === "vault-client" - ) { - const { sig, crv } = await client.sign(testECP384, hashDigest); - expect(crv).toBe(ECCurveType.P384); - expect(sig).toBeTruthy(); - - // ASN.1 encoding check - const pSig = (KJUR.crypto.ECDSA as any).parseSigHexInHexRS( - sig.toString("hex"), - ); - const re = /[0-9A-Fa-f]{6}/g; - expect(re.test(pSig.r)).toBeTruthy(); - expect(re.test(pSig.s)).toBeTruthy(); - - // Signature verification - const pub = await client.getPub(testECP384); - const verify = new KJUR.crypto.Signature({ alg: "SHA256withECDSA" }); - verify.init(pub); - verify.updateHex(digest.toString("hex")); - expect(verify.verify(sig.toString("hex"))).toBeTruthy(); - } - } - }); - - it("getPub for all clients", async () => { - for (const [clientName, client] of testClients.entries()) { - if ( - clientName === "web-socket-client-256" || - clientName === "vault-client" - ) { - const pub = await client.getPub(testECP256); - expect(pub).toBeTruthy(); - expect((pub as any).curveName).toBe("secp256r1"); - } - if (clientName === "vault-client") { - const pub = await client.getPub(testECP384); - expect(pub).toBeTruthy(); - expect((pub as any).curveName).toBe("secp384r1"); - - try { - await client.getPub(testNotFoundKey); - throw new Error("Should not get here"); - } catch (error) { - expect((error as Error).message).toContain( - `keyName = ${testNotFoundKey} not found`, - ); - } - } - } - }); - - it("rotateKey for all clients", async () => { - const digest = Buffer.from("Hello Cactus"); - const hashDigest = createHash("sha256").update(digest).digest(); - - for (const [clientName, client] of testClients.entries()) { - if (clientName === "vault-client") { - const pubOld256 = await client.getPub(testECP256); - await client.rotateKey(testECP256); - const pubNew256 = await client.getPub(testECP256); - - // Public key should be different - expect(pubNew256.getPublicKeyXYHex()).not.toBe( - pubOld256.getPublicKeyXYHex(), - ); - - // Signature should be made using the new key - const { sig } = await client.sign(testECP256, hashDigest); - const verify = new KJUR.crypto.Signature({ alg: "SHA256withECDSA" }); - verify.init(pubOld256); - verify.updateHex(digest.toString("hex")); - expect(verify.verify(sig.toString("hex"))).toBeFalsy(); - } - - if (clientName === "vault-client") { - const pubOld384 = await client.getPub(testECP384); - await client.rotateKey(testECP384); - const pubNew384 = await client.getPub(testECP384); - - // Public key should be different - expect(pubNew384.getPublicKeyXYHex()).not.toBe( - pubOld384.getPublicKeyXYHex(), - ); - - // Signature should be made using the new key - const { sig } = await client.sign(testECP384, hashDigest); - const verify = new KJUR.crypto.Signature({ alg: "SHA256withECDSA" }); - verify.init(pubOld384); - verify.updateHex(digest.toString("hex")); - expect(verify.verify(sig.toString("hex"))).toBeFalsy(); - } - } - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts deleted file mode 100644 index 97c4c2f51f..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts +++ /dev/null @@ -1,222 +0,0 @@ -import "jest-extended"; -import { AddressInfo } from "net"; -import http from "http"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { - IListenOptions, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - DefaultEventHandlerStrategy, - PluginLedgerConnectorFabric, - DeployContractGoSourceV1Request, -} from "../../../../main/typescript/public-api"; -import { DefaultApi as FabricApi } from "../../../../main/typescript/public-api"; -import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; -import { DiscoveryOptions } from "fabric-network"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; -import OAS from "../../../../main/json/openapi.json"; - -const testCase = "check openapi validation in fabric endpoints"; -const logLevel: LogLevelDesc = "TRACE"; - -describe(testCase, () => { - let apiUrl: string; - let server: http.Server; - let plugin: PluginLedgerConnectorFabric; - let apiClient: FabricApi; - const fDeployGo = "deployContractGoSourceV1"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_PEER_LOCALMSPID: "Org1MSP", - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - CORE_PEER_MSPCONFIGPATH: - "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp", - CORE_PEER_TLS_ROOTCERT_FILE: - "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - ORDERER_TLS_ROOTCERT_FILE: - "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem", - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_PEER_LOCALMSPID: "Org2MSP", - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: - "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp", - CORE_PEER_TLS_ROOTCERT_FILE: - "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt", - ORDERER_TLS_ROOTCERT_FILE: - "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem", - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - pluginRegistry: new PluginRegistry({ plugins: [] }), - peerBinary: "/fabric-samples/bin/peer", - cliContainerEnv: org1Env, - sshConfig: new Configuration(), - logLevel, - connectionProfile: { - name: "", - version: "", - organizations: {}, - peers: {}, - }, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - plugin = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - apiUrl = `http://127.0.0.1:${addressInfo.port}`; - const config = new Configuration({ basePath: apiUrl }); - apiClient = new FabricApi(config); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - }); - - afterAll(async () => { - await Servers.shutdown(server); - }); - - test(`${testCase} - ${fDeployGo} - ${cWithoutParams}`, async () => { - const parameters = { - tlsRootCertFiles: - "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - policyDslSource: "AND('Org1MSP.member','Org2MSP.member')", - channelId: "mychannel", - chainCodeVersion: "1.0.0", - constructorArgs: { Args: ["john", "99"] }, - goSource: { - body: Buffer.from("some go source code").toString("base64"), - filename: "hello-world.go", - }, - moduleName: "hello-world", - targetOrganizations: [org1Env, org2Env], - pinnedDeps: [ - "github.com/Knetic/govaluate@v3.0.0+incompatible", - "github.com/Shopify/sarama@v1.27.0", - "github.com/fsouza/go-dockerclient@v1.6.5", - "github.com/grpc-ecosystem/go-grpc-middleware@v1.2.1", - "github.com/hashicorp/go-version@v1.2.1", - "github.com/hyperledger/fabric@v1.4.8", - "github.com/hyperledger/fabric-amcl@v0.0.0-20200424173818-327c9e2cf77a", - "github.com/miekg/pkcs11@v1.0.3", - "github.com/mitchellh/mapstructure@v1.3.3", - "github.com/onsi/ginkgo@v1.14.1", - "github.com/onsi/gomega@v1.10.2", - "github.com/op/go-logging@v0.0.0-20160315200505-970db520ece7", - "github.com/pkg/errors@v0.9.1", - "github.com/spf13/viper@v1.7.1", - "github.com/stretchr/testify@v1.6.1", - "github.com/sykesm/zap-logfmt@v0.0.3", - "go.uber.org/zap@v1.16.0", - "golang.org/x/crypto@v0.0.0-20200820211705-5c72a883971a", - "golang.org/x/net@v0.0.0-20210503060351-7fd8e65b6420", - "google.golang.org/grpc@v1.31.1", - ], - }; - await expect( - apiClient.deployContractGoSourceV1( - parameters as DeployContractGoSourceV1Request, - ), - ).rejects.toMatchObject({ - response: expect.objectContaining({ - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("targetPeerAddresses"), - }), - ]), - }), - }); - }); - test(`${testCase} - ${fDeployGo} - ${cInvalidParams}`, async () => { - const parameters = { - targetPeerAddresses: ["peer0.org1.example.com:7051"], - tlsRootCertFiles: - "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", - policyDslSource: "AND('Org1MSP.member','Org2MSP.member')", - channelId: "mychannel", - chainCodeVersion: "1.0.0", - constructorArgs: { Args: ["john", "99"] }, - goSource: { - body: Buffer.from("some go source code").toString("base64"), - filename: "hello-world.go", - }, - moduleName: "hello-world", - targetOrganizations: [org1Env, org2Env], - pinnedDeps: [ - "github.com/Knetic/govaluate@v3.0.0+incompatible", - "github.com/Shopify/sarama@v1.27.0", - "github.com/fsouza/go-dockerclient@v1.6.5", - "github.com/grpc-ecosystem/go-grpc-middleware@v1.2.1", - "github.com/hashicorp/go-version@v1.2.1", - "github.com/hyperledger/fabric@v1.4.8", - "github.com/hyperledger/fabric-amcl@v0.0.0-20200424173818-327c9e2cf77a", - "github.com/miekg/pkcs11@v1.0.3", - "github.com/mitchellh/mapstructure@v1.3.3", - "github.com/onsi/ginkgo@v1.14.1", - "github.com/onsi/gomega@v1.10.2", - "github.com/op/go-logging@v0.0.0-20160315200505-970db520ece7", - "github.com/pkg/errors@v0.9.1", - "github.com/spf13/viper@v1.7.1", - "github.com/stretchr/testify@v1.6.1", - "github.com/sykesm/zap-logfmt@v0.0.3", - "go.uber.org/zap@v1.16.0", - "golang.org/x/crypto@v0.0.0-20200820211705-5c72a883971a", - "golang.org/x/net@v0.0.0-20210503060351-7fd8e65b6420", - "google.golang.org/grpc@v1.31.1", - ], - fake: 4, - }; - await expect( - apiClient.deployContractGoSourceV1(parameters), - ).rejects.toMatchObject({ - response: expect.objectContaining({ - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("fake"), - }), - ]), - }), - }); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts deleted file mode 100644 index bdaecd8c48..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ /dev/null @@ -1,398 +0,0 @@ -import { AddressInfo } from "net"; -import http, { Server } from "http"; -import fs from "fs-extra"; -import path from "path"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - IListenOptions, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - DeployContractV1Request, - FabricContractInvocationType, - FileBase64, - PluginLedgerConnectorFabric, - RunTransactionRequest, -} from "../../../../main/typescript/public-api"; -import { DefaultApi as FabricApi } from "../../../../main/typescript/public-api"; -import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; -import { DiscoveryOptions } from "fabric-network"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { Configuration } from "@hyperledger/cactus-core-api"; - -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; -import OAS from "../../../../main/json/openapi.json"; - -const testCase = "deploys Fabric V2.5.6 contract from typescript source"; -const logLevel: LogLevelDesc = "INFO"; - -describe("OpenApi Validation Test", () => { - let ledger: FabricTestLedgerV1; - let server: Server; - let apiClient: FabricApi; - const channelId = "mychannel"; - const channelName = channelId; - const fDeploy = "deployContractV1"; - const fRun = "runTransactionV1"; - const cOk = "without bad request error"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - const contractName = "basic-asset-transfer-2"; - const sourceFiles: FileBase64[] = []; - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.not.toThrow(); - ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - await ledger.start({ omitPull: false }); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - expect(connectionProfile).toBeTruthy(); - const enrollAdminOut = await ledger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await ledger.enrollUser(adminWallet); - const sshConfig = await ledger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - const plugin = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { port } = addressInfo; - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - const apiUrl = `http://127.0.0.1:${port}`; - - const config = new Configuration({ basePath: apiUrl }); - - apiClient = new FabricApi(config); - - const contractRelPath = - "../../fixtures/go/basic-asset-transfer/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - // └── tslint.json - // const sourceFiles: FileBase64[] = []; - { - const filename = "./tslint.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - }); - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - await Servers.shutdown(server); - }); - test(`${testCase} - ${fDeploy} - ${cOk}`, async () => { - const parameters = { - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: contractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }; - - const res = await apiClient.deployContractV1(parameters); - - expect(res.status).toBe(200); - expect(res.data.success).toBe(true); - }); - test(`${testCase} - ${fDeploy} - ${cWithoutParams}`, async () => { - const parameters = { - // channelId is intentionally left out - ccVersion: "1.0.0", - sourceFiles, - ccName: contractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }; - - await expect( - apiClient.deployContractV1( - parameters as unknown as DeployContractV1Request, - ), - ).rejects.toMatchObject({ - response: expect.objectContaining({ - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/channelId"), - }), - ]), - }), - }); - }); - test(`${testCase} - ${fDeploy} - ${cInvalidParams}`, async () => { - const parameters = { - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: contractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - fake: 4, // Invalid parameter - }; - await expect( - apiClient.deployContractV1(parameters as DeployContractV1Request), - ).rejects.toThrow( - expect.objectContaining({ - response: expect.objectContaining({ - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("fake"), - }), - ]), - }), - }), - ); - }); - test(`${testCase} - ${fRun} - ${cOk}`, async () => { - // Wait for 10 seconds - await new Promise((resolve) => setTimeout(resolve, 10000)); - - const assetId = uuidv4(); - const assetOwner = uuidv4(); - - const parameters = { - contractName, - channelName, - params: [assetId, "Green", "19", assetOwner, "9999"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }; - - const res = await apiClient.runTransactionV1(parameters); - - expect(res).toBeTruthy(); - expect(res.status).toBe(200); - }); - test(`${testCase} - ${fRun} - ${cWithoutParams}`, async () => { - const assetId = uuidv4(); - const assetOwner = uuidv4(); - - const parameters = { - channelName, - params: [assetId, "Green", "19", assetOwner, "9999"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }; - await expect( - apiClient.runTransactionV1(parameters as RunTransactionRequest), - ).rejects.toMatchObject({ - response: expect.objectContaining({ - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/contractName"), - }), - ]), - }), - }); - }); - test(`${testCase} - ${fRun} - ${cInvalidParams}`, async () => { - const assetId = uuidv4(); - const assetOwner = uuidv4(); - - const parameters = { - contractName, - channelName, - params: [assetId, "Green", "19", assetOwner, "9999"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - fake: 4, // Invalid parameter - }; - await expect( - apiClient.runTransactionV1(parameters as RunTransactionRequest), - ).rejects.toMatchObject({ - response: expect.objectContaining({ - status: 400, - data: expect.arrayContaining([ - expect.objectContaining({ - path: expect.stringContaining("/body/fake"), - }), - ]), - }), - }); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/tap-parallel-not-ok b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/tap-parallel-not-ok deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/unit/identity-internal-crypto-utils.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/unit/identity-internal-crypto-utils.test.ts deleted file mode 100644 index 474c8ca5e5..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/unit/identity-internal-crypto-utils.test.ts +++ /dev/null @@ -1,71 +0,0 @@ -import "jest-extended"; -import { KEYUTIL, KJUR } from "jsrsasign"; -import { - CryptoUtil, - ECCurveType, -} from "../../../main/typescript/identity/internal/crypto-util"; - -const KJ = KJUR as any; - -test("encodeASN1Sig for P256 curve", () => { - const asn1Sig = - "MEYCIQDb+euisbUGQCpisQh9xEKof8zVNorerfhMHv3kWmuCfQIhAI8A3f21hAHga0WK6lS6cD/ZUtWVy/xsYZGGaldM7Tl3"; - const derSig = CryptoUtil.encodeASN1Sig( - Buffer.from(asn1Sig, "base64"), - ECCurveType.P256, - ); - const want = - "3045022100dbf9eba2b1b506402a62b1087dc442a87fccd5368adeadf84c1efde45a6b827d022070ff22014a7bfe2094ba7515ab458fbfe3942517db1b32236233606baf75ebda"; - expect(derSig.toString("hex")).toBe(want); -}); - -test("encodeASN1Sig for P384 curve", () => { - const asn1Sig = - "MGYCMQDFEvlhmQlTj7YGTjnZwERmj+/0IA2rDdb7F5iE1QLGQUUlHn353mizpFeXAcjWGH4CMQDZ1td1ISnjAPkUlohwjiJAShtaFITLG1NEr0G29Hgglt0mfvgJ0k2DXXy+mOyn57o="; - const derSig = CryptoUtil.encodeASN1Sig( - Buffer.from(asn1Sig, "base64"), - ECCurveType.P384, - ); - const want = - "3065023100c512f9619909538fb6064e39d9c044668feff4200dab0dd6fb179884d502c64145251e7df9de68b3a4579701c8d6187e02302629288aded61cff06eb69778f71ddbfb5e4a5eb7b34e4ac82b40bcaffbf0d487af38eba3ede59f78f6f5ad1e01d41b9"; - expect(derSig.toString("hex")).toBe(want); -}); - -test("invalid curve type", () => { - const asn1Sig = - "MGYCMQDFEvlhmQlTj7YGTjnZwERmj+/0IA2rDdb7F5iE1QLGQUUlHn353mizpFeXAcjWGH4CMQDZ1td1ISnjAPkUlohwjiJAShtaFITLG1NEr0G29Hgglt0mfvgJ0k2DXXy+mOyn57o="; - - expect(() => { - CryptoUtil.encodeASN1Sig( - Buffer.from(asn1Sig, "base64"), - "invalidCrv" as ECCurveType, - ); - }).toThrow("CryptoUtil#encodeASN1Sig invalid ec curve type"); -}); - -test("CSR", () => { - const pem = `-----BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEziQUVVrao4nXmhe3jaMdsxAyszHY -GfNTZZQn1F9PQCxOequ4XS4XFmng3MD8jkP58Sak/6QaXYvqAEB6pBT/gA== ------END PUBLIC KEY-----`; - - const csr = CryptoUtil.createCSR( - KEYUTIL.getKey(pem) as KJUR.crypto.ECDSA, - "Cactus", - ); - - expect(csr).toBeTruthy(); - const csrDigest = CryptoUtil.getCSRDigest(csr); - expect(csrDigest.toString("base64")).toBe( - "S5E8XQhxbltjJLE2n3krEOC5cgmENCKtvUrj3AX4StY=", - ); - - const signature = Buffer.from( - "MEYCIQDzWXNQkzf4DO2Ds7MJ4RdIdQfIGbsRpK5iQAmRWyQvpAIhAKVHJL2yFIQba/S09XccNCEZhfZW3XvFqY54rz4ZIjpV", - "base64", - ); - - const csrPem = CryptoUtil.getPemCSR(csr, signature); - const csrParams = KJ.asn1.csr.CSRUtil.getParam(csrPem); - expect(csrParams.subject.str).toBe("/CN=Cactus"); -}); diff --git a/packages/cactus-plugin-ledger-connector-fabric/tsconfig.json b/packages/cactus-plugin-ledger-connector-fabric/tsconfig.json deleted file mode 100644 index 6555b276b6..0000000000 --- a/packages/cactus-plugin-ledger-connector-fabric/tsconfig.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ledger-connector-fabric.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "exclude": [ - "./src/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/**/*.ts", - "./src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/**/*.ts" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-iroha2/CHANGELOG.md b/packages/cactus-plugin-ledger-connector-iroha2/CHANGELOG.md deleted file mode 100644 index 6f16540a0a..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/CHANGELOG.md +++ /dev/null @@ -1,129 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-iroha2 - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-iroha2 - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-iroha2 - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-iroha2 - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** the CVE-2022-2421 - upgrade socket.io-parser to >=4.2.1 ([9172172](https://github.com/hyperledger/cacti/commit/917217227a3fa53a00429f047cd6318862e6ab8d)), closes [#2229](https://github.com/hyperledger/cacti/issues/2229) [#2228](https://github.com/hyperledger/cacti/issues/2228) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **connector-iroha2:** update to the new LTS image as of 28.07.2023 ([ccdaa12](https://github.com/hyperledger/cacti/commit/ccdaa1254cb4d46cc6a0af2c0472f3838603123f)) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-iroha2 - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Bug Fixes - -* **iroha2-connector:** fix flaky tests to solve [#2370](https://github.com/hyperledger/cactus/issues/2370) and [#2373](https://github.com/hyperledger/cactus/issues/2373) ([669b51f](https://github.com/hyperledger/cactus/commit/669b51f188536fd5de0c970fcb4fca8fe1337b08)) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -### Features - -* **connector-iroha2:** add support for Iroha V2 ([db78969](https://github.com/hyperledger/cactus/commit/db789690b64d68b3dda70578127338bdc02e92bd)), closes [#2138](https://github.com/hyperledger/cactus/issues/2138) [#2140](https://github.com/hyperledger/cactus/issues/2140) diff --git a/packages/cactus-plugin-ledger-connector-iroha2/README.md b/packages/cactus-plugin-ledger-connector-iroha2/README.md deleted file mode 100644 index b4ef857649..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/README.md +++ /dev/null @@ -1,345 +0,0 @@ -# `@hyperledger/cactus-plugin-ledger-connector-iroha2` - -This plugin provides `Cactus` a way to interact with **Iroha V2** networks. Using this we can run various Iroha leger instructions and queries. -If you want to connect to Iroha V1 ledger, please use `@hyperledger/cactus-plugin-ledger-connector-iroha` instead. - -## Summary - -- [Remarks](#remarks) -- [Getting Started](#getting-started) -- [Endpoints](#endpoints) -- [Running the tests](#running-the-tests) -- [Contributing](#contributing) -- [License](#license) -- [Acknowledgments](#acknowledgments) - -## Remarks - -- Docker support is not implemented yet. -- There is no official Iroha V2 release yet. API and connector behavior can change before stable release. -- Query pagination is not supported yet. Querying large datasets (the ones with `All`) can be catastrophic. Pagination is not implemented in upstream javascript iroha sdk yet. - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project, execute the command to install and build the dependencies. It will also build this connector: - -```sh -yarn run configure -``` - -### Usage - -Import `PluginFactoryLedgerConnector` from the connector package and use it to create a connector. - -```typescript -import { PluginFactoryLedgerConnector } from "@hyperledger/cactus-plugin-ledger-connector-iroha2"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { v4 as uuidv4 } from "uuid"; - -const defaultConfig = { - torii: { - apiURL: "http://127.0.0.1:8080", - }, - accountId: { - name: "alice", - domainId: "wonderland", - }, -}; - -const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, -}); - -const connector = await factory.create({ - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins }), - logLevel, - defaultConfig, -}); -``` - -Alternatively, you can instantiate a new `PluginLedgerConnectorIroha2` instance directly. - -```typescript -import { PluginLedgerConnectorIroha2 } from "@hyperledger/cactus-plugin-ledger-connector-iroha2"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { v4 as uuidv4 } from "uuid"; - -const defaultConfig = { - torii: { - apiURL: "http://127.0.0.1:8080", - }, - accountId: { - name: "alice", - domainId: "wonderland", - }, -}; - -const connector = new PluginLedgerConnectorIroha2({ - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins }), - logLevel, - defaultConfig, -}); -``` - -> `defaultConfig` in `PluginLedgerConnectorIroha2` options can be used to define a set of configurations common for -> all the requests. Specific, top-level keys of the config can be later overwritten by single requests. -> For example, each request can specify own credentials to be used, but they don't have to define peer address at all since it will -> be taken from the connector default config. - -> Connector plugin can export its web endpoints and be called remotely through an `ApiClient`. It is recommended -> to use `ApiServer` for remote connector setup, see `@hyperledger/cactus-cmd-api-server` for more details. The following steps assume -> using the connector directly which is suitable for testing. - -You can use the connector plugin to send transactions to or query the Iroha V2 ledger. -Here, for instance, we create and query a new domain: - -```typescript -import { IrohaInstruction } from "@hyperledger/cactus-plugin-ledger-connector-iroha2"; - -const transactionResponse = await connector.transact({ - // Note: `instruction` can be a list of instructions to be sent as single transaction. - instruction: { - name: IrohaInstruction.RegisterDomain, - params: ["newDomainName"], - }, - baseConfig: { - // Overwrite default connector config to use own credentials stored in a keychain plugin - signingCredential: { - keychainId, - keychainRef, - }, - }, -}); - -const queryResponse = await connector.query({ - queryName: IrohaQuery.FindDomainById, - params: ["newDomainName"], - baseConfig: { - signingCredential: { - keychainId, - keychainRef, - }, - }, -}); -``` - -> See [connector integration tests](./src/test/typescript/integration) for complete usage examples. - -> For the list of currently supported instructions and queries see [Endpoints](#endpoints) - -### Building/running the container image locally - -- This connector has no image yet. - -## Endpoints - -### TransactV1 (`/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact`) - -##### RegisterDomain - -- `domainName`: string - -##### RegisterAssetDefinition - -- `assetName`: string, -- `domainName`: string, -- `valueType`: "Fixed" | "Quantity" | "BigQuantity" | "Store", -- `mintable`: "Infinitely" | "Once" | "Not", - -##### RegisterAsset - -- `assetName`: string, -- `domainName`: string, -- `accountName`: string, -- `accountDomainName`: string, -- `value`: number | bigint | string, - -##### MintAsset - -- `assetName`: string, -- `domainName`: string, -- `accountName`: string, -- `accountDomainName`: string, -- `value`: number | bigint | string, - -##### BurnAsset - -- `assetName`: string, -- `domainName`: string, -- `accountName`: string, -- `accountDomainName`: string, -- `value`: number | bigint | string | Metadata, - -##### TransferAsset - -- `assetName`: string, -- `assetDomainName`: string, -- `sourceAccountName`: string, -- `sourceAccountDomain`: string, -- `targetAccountName`: string, -- `targetAccountDomain`: string, -- `valueToTransfer`: number | bigint | string | Metadata, - -##### RegisterAccount - -- `accountName`: string, -- `domainName`: string, -- `publicKeyPayload`: string, (hex encoded string) -- `publicKeyDigestFunction` = "ed25519", - -### QueryV1 (`/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query`) - -#### FindAllDomains - -- None - -#### FindDomainById - -- `domainName`: string - -#### FindAssetDefinitionById - -- `name`: string, -- `domainName`: string, - -#### FindAllAssetsDefinitions - -- None - -#### FindAssetById - -- `assetName`: string, -- `assetDomainName`: string, -- `accountName`: string, -- `accountDomainName`: string, - -#### FindAllAssets - -- None - -#### FindAllPeers - -- None - -#### FindAllBlocks - -- None - -#### FindAccountById - -- `name`: string, -- `domainName`: string, - -#### FindAllAccounts - -- None - -#### FindAllTransactions - -- None - -#### FindTransactionByHash - -- `hash`: string (hex encoded string) - -### WatchBlocksV1 (SocketIO) - -#### Subscribe (Input) - -- Starts watching for new blocks that will be reported back with `Next` messages. -- Options: - - `type?: BlockTypeV1`: Specify response block type wanted. Defaults to JSON serialized in string. - - `startBlock?: string;`: Number of block to start monitoring from. - - `baseConfig?: Iroha2BaseConfig`: Iroha connection details (merged with default connector config). - -#### Unsubscribe (Input) - -#### Next (Output) - -- Block data encoded as requested in `type` option during subscription. - -#### Error (Output) - -- Error details. - -#### Monitoring new blocks with ApiClient (example) - -```typescript -const watchObservable = apiClient.watchBlocksV1({ - type: BlockTypeV1.Raw, - baseConfig: defaultBaseConfig, -}); - -const subscription = watchObservable.subscribe({ - next(block) { - console.log("New block:", block); - }, - error(err) { - console.error("Monitor error:", err); - subscription.unsubscribe(); - }, -}); -``` - -## Running the tests - -To run all the tests for this connector to ensure it's working correctly execute the following from the root of the `cactus` project: - -```sh -npx jest cactus-plugin-ledger-connector-iroha2 -``` - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -### Quick connector project walkthrough - -#### `./src/main/json/openapi.json` - -- Contains OpenAPI definition. - -#### `./src/main/typescript/plugin-ledger-connector-iroha2.ts` - -- Contains main connector class logic, including `transact` and `query` functions. - -#### `./src/main/typescript/utils.ts` - -- Utility functions used throughout the connector. If the file grows too big consider dividing it into more subject-related files. -- Should be internal to the connector, not exported in a public interface. - -#### `./src/main/typescript/api-client/iroha2-api-client.ts` - -- Contains implementation of ApiClient extension over client generated from OpenAPI definition. -- Should be used to connect to remote connector. - -#### `./src/main/typescript/web-services` - -- Folder that contains web service endpoint definitions. - -#### `./src/main/typescript/cactus-iroha-sdk-wrapper/` - -- Internal (not exported) wrappers around upstream Iroha javascript SDK. -- Provides convenient functions without need to manually build up message payload. - - `client.ts` Can be used to add multiple instructions into single transaction and send it. This is base entry for wrapper usage. - - `query.ts` Contain functions to query the ledger, should be used through client (i.e. `client.query.getSomething()`). - - `data-factories.ts` Functions that simplify creation of some commonly used structures in the wrapper. - -#### `./src/test/typescript/integration/` - -- Integration test of various connector functionalities. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments diff --git a/packages/cactus-plugin-ledger-connector-iroha2/openapitools.json b/packages/cactus-plugin-ledger-connector-iroha2/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/package.json b/packages/cactus-plugin-ledger-connector-iroha2/package.json deleted file mode 100644 index 3e032ecdea..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-ledger-connector-iroha2", - "version": "2.0.0", - "description": "Allows Cactus nodes to connect to an Iroha V2 ledger.", - "keywords": [ - "Hyperledger", - "Cactus", - "Iroha", - "Iroha2", - "Iroha V2", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/types/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@iroha2/client": "4.0.0", - "@iroha2/crypto-core": "0.1.1", - "@iroha2/crypto-target-node": "0.4.0", - "@iroha2/data-model": "4.0.0", - "axios": "1.7.7", - "express": "4.21.0", - "fast-safe-stringify": "2.1.1", - "hada": "0.0.8", - "rxjs": "7.8.1", - "sanitize-html": "2.12.1", - "socket.io": "4.6.2", - "socket.io-client-fixed-types": "4.5.4", - "undici": "6.19.8" - }, - "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/express": "5.0.0", - "@types/sanitize-html": "2.9.5", - "body-parser": "1.20.3", - "express": "4.21.0", - "jest": "29.6.2", - "jest-extended": "4.0.1", - "socket.io": "4.6.2", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index a126a8d17a..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,39 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_block_type_v1.go -model_error_exception_response_v1.go -model_generate_transaction_request_v1.go -model_generate_transaction_request_v1_request.go -model_iroha2_account_id.go -model_iroha2_base_config.go -model_iroha2_base_config_signing_credential.go -model_iroha2_base_config_torii.go -model_iroha2_key_json.go -model_iroha2_key_pair.go -model_iroha_instruction.go -model_iroha_instruction_request_v1.go -model_iroha_query.go -model_iroha_query_definition_v1.go -model_iroha_signed_query_definition_v1.go -model_iroha_transaction_definition_v1.go -model_iroha_transaction_definition_v1_instruction.go -model_iroha_transaction_parameters_v1.go -model_keychain_reference.go -model_query_request_v1.go -model_query_response_v1.go -model_transact_request_v1.go -model_transact_response_v1.go -model_transaction_status_v1.go -model_watch_blocks_binary_response_v1.go -model_watch_blocks_options_v1.go -model_watch_blocks_raw_response_v1.go -model_watch_blocks_response_v1.go -model_watch_blocks_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index cd74baa21b..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Go API client for cactus-plugin-ledger-connector-iroha2 - -Can perform basic tasks on a Iroha V2 ledger - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-ledger-connector-iroha2 "github.com/hyperledger/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-iroha2.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-iroha2.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-iroha2.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-ledger-connector-iroha2.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**GenerateTransactionV1**](docs/DefaultApi.md#generatetransactionv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/generate-transaction | Generate transaction that can be signed locally. -*DefaultApi* | [**QueryV1**](docs/DefaultApi.md#queryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query | Executes a query on a Iroha V2 ledger and returns it's results. -*DefaultApi* | [**TransactV1**](docs/DefaultApi.md#transactv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact | Executes a transaction on a Iroha V2 ledger (by sending some instructions) - - -## Documentation For Models - - - [BlockTypeV1](docs/BlockTypeV1.md) - - [ErrorExceptionResponseV1](docs/ErrorExceptionResponseV1.md) - - [GenerateTransactionRequestV1](docs/GenerateTransactionRequestV1.md) - - [GenerateTransactionRequestV1Request](docs/GenerateTransactionRequestV1Request.md) - - [Iroha2AccountId](docs/Iroha2AccountId.md) - - [Iroha2BaseConfig](docs/Iroha2BaseConfig.md) - - [Iroha2BaseConfigSigningCredential](docs/Iroha2BaseConfigSigningCredential.md) - - [Iroha2BaseConfigTorii](docs/Iroha2BaseConfigTorii.md) - - [Iroha2KeyJson](docs/Iroha2KeyJson.md) - - [Iroha2KeyPair](docs/Iroha2KeyPair.md) - - [IrohaInstruction](docs/IrohaInstruction.md) - - [IrohaInstructionRequestV1](docs/IrohaInstructionRequestV1.md) - - [IrohaQuery](docs/IrohaQuery.md) - - [IrohaQueryDefinitionV1](docs/IrohaQueryDefinitionV1.md) - - [IrohaSignedQueryDefinitionV1](docs/IrohaSignedQueryDefinitionV1.md) - - [IrohaTransactionDefinitionV1](docs/IrohaTransactionDefinitionV1.md) - - [IrohaTransactionDefinitionV1Instruction](docs/IrohaTransactionDefinitionV1Instruction.md) - - [IrohaTransactionParametersV1](docs/IrohaTransactionParametersV1.md) - - [KeychainReference](docs/KeychainReference.md) - - [QueryRequestV1](docs/QueryRequestV1.md) - - [QueryResponseV1](docs/QueryResponseV1.md) - - [TransactRequestV1](docs/TransactRequestV1.md) - - [TransactResponseV1](docs/TransactResponseV1.md) - - [TransactionStatusV1](docs/TransactionStatusV1.md) - - [WatchBlocksBinaryResponseV1](docs/WatchBlocksBinaryResponseV1.md) - - [WatchBlocksOptionsV1](docs/WatchBlocksOptionsV1.md) - - [WatchBlocksRawResponseV1](docs/WatchBlocksRawResponseV1.md) - - [WatchBlocksResponseV1](docs/WatchBlocksResponseV1.md) - - [WatchBlocksV1](docs/WatchBlocksV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 0ed071e3aa..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,585 +0,0 @@ -openapi: 3.0.3 -info: - description: Can perform basic tasks on a Iroha V2 ledger - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - Connector Iroha V2 - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact: - post: - operationId: TransactV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransactRequestV1' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TransactResponseV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error. - summary: Executes a transaction on a Iroha V2 ledger (by sending some instructions) - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/generate-transaction: - post: - operationId: generateTransactionV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateTransactionRequestV1' - responses: - "200": - content: - text/plain: - schema: - type: string - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Generate transaction that can be signed locally. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/generate-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query: - post: - operationId: QueryV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QueryRequestV1' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/QueryResponseV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error. - summary: Executes a query on a Iroha V2 ledger and returns it's results. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query -components: - schemas: - IrohaInstruction: - description: Command names that correspond to Iroha Special Instructions (https://hyperledger.github.io/iroha-2-docs/guide/advanced/isi.html) - enum: - - registerDomain - - registerAssetDefinition - - registerAsset - - mintAsset - - burnAsset - - transferAsset - - registerAccount - type: string - x-enum-descriptions: - - Register new domain - - Register new asset definition - - Register new asset - - Mint asset value - - Burn asset value - - Transfer asset between accounts - - Register new account - x-enum-varnames: - - RegisterDomain - - RegisterAssetDefinition - - RegisterAsset - - MintAsset - - BurnAsset - - TransferAsset - - RegisterAccount - IrohaQuery: - description: Command names that correspond to Iroha queries (https://hyperledger.github.io/iroha-2-docs/guide/advanced/queries.html) - enum: - - findAllDomains - - findDomainById - - findAssetDefinitionById - - findAllAssetsDefinitions - - findAssetById - - findAllAssets - - findAllPeers - - findAllBlocks - - findAccountById - - findAllAccounts - - findAllTransactions - - findTransactionByHash - type: string - x-enum-descriptions: - - Get list of all registered domains - - Get domain with specified ID - - Get asset definition with specified ID - - Get list of all registered asset definition - - Get asset with specified ID - - Get list of all registered assets - - Get list of all ledger peers - - Get list of all ledger blocks - - Get account with specified ID - - Get list of all registered accounts - - Get list of all transactions - - Get transaction with specified hash - x-enum-varnames: - - FindAllDomains - - FindDomainById - - FindAssetDefinitionById - - FindAllAssetsDefinitions - - FindAssetById - - FindAllAssets - - FindAllPeers - - FindAllBlocks - - FindAccountById - - FindAllAccounts - - FindAllTransactions - - FindTransactionByHash - WatchBlocksV1: - description: Websocket requests for monitoring new blocks. - enum: - - org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Subscribe - - org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Next - - org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Unsubscribe - - org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Error - - org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Complete - type: string - x-enum-varnames: - - Subscribe - - Next - - Unsubscribe - - Error - - Complete - BlockTypeV1: - description: Iroha V2 block response type. - enum: - - raw - - binary - type: string - x-enum-descriptions: - - Default JSON-encoded string full block data. - - Encoded format that must be decoded with Iroha SDK on client side before use - x-enum-varnames: - - Raw - - Binary - TransactionStatusV1: - description: Status of Iroha V2 transaction. - enum: - - submitted - - committed - - rejected - type: string - x-enum-descriptions: - - Transaction was submitted to the ledger - use other tools to check if it was - accepted and committed. - - Transaction was committed to the ledger. - - Transaction was rejected. - x-enum-varnames: - - Submitted - - Committed - - Rejected - WatchBlocksOptionsV1: - description: Options passed when subscribing to block monitoring. - properties: - type: - $ref: '#/components/schemas/BlockTypeV1' - startBlock: - description: Number of block to start monitoring from. - minLength: 1 - nullable: false - type: string - baseConfig: - $ref: '#/components/schemas/Iroha2BaseConfig' - type: object - WatchBlocksRawResponseV1: - description: Default JSON-encoded string full block data. - properties: - blockData: - nullable: false - type: string - required: - - blockData - type: object - WatchBlocksBinaryResponseV1: - description: Binary encoded response of block data. - properties: - binaryBlock: - nullable: false - type: string - required: - - binaryBlock - type: object - WatchBlocksResponseV1: - oneOf: - - $ref: '#/components/schemas/WatchBlocksRawResponseV1' - - $ref: '#/components/schemas/WatchBlocksBinaryResponseV1' - - $ref: '#/components/schemas/ErrorExceptionResponseV1' - Iroha2AccountId: - additionalProperties: false - description: Iroha V2 account ID. - example: - name: name - domainId: domainId - nullable: false - properties: - name: - nullable: false - type: string - domainId: - nullable: false - type: string - required: - - domainId - - name - type: object - Iroha2KeyJson: - additionalProperties: false - description: Private/Public key JSON containing payload and digest function. - nullable: false - properties: - digestFunction: - nullable: false - type: string - payload: - nullable: false - type: string - required: - - digestFunction - - payload - type: object - KeychainReference: - description: Reference to entry stored in Cactus keychain plugin. - properties: - keychainId: - description: Keychain plugin ID. - maxLength: 100 - minLength: 1 - nullable: false - type: string - keychainRef: - description: Key reference name. - maxLength: 100 - minLength: 1 - nullable: false - type: string - required: - - keychainId - - keychainRef - type: object - Iroha2KeyPair: - description: Pair of Iroha account private and public keys. - properties: - privateKey: - $ref: '#/components/schemas/Iroha2KeyJson' - publicKey: - nullable: false - type: string - required: - - privateKey - - publicKey - type: object - Iroha2BaseConfigTorii: - additionalProperties: false - description: Iroha V2 peer connection information. - example: - apiURL: apiURL - telemetryURL: telemetryURL - nullable: false - properties: - apiURL: - nullable: false - type: string - telemetryURL: - nullable: false - type: string - type: object - Iroha2BaseConfig: - additionalProperties: false - description: Iroha V2 connection configuration. - example: - torii: - apiURL: apiURL - telemetryURL: telemetryURL - accountId: - name: name - domainId: domainId - signingCredential: null - properties: - torii: - $ref: '#/components/schemas/Iroha2BaseConfigTorii' - accountId: - $ref: '#/components/schemas/Iroha2AccountId' - signingCredential: - $ref: '#/components/schemas/Iroha2BaseConfig_signingCredential' - required: - - torii - type: object - IrohaInstructionRequestV1: - additionalProperties: false - description: Single Iroha V2 instruction to be executed request. - properties: - name: - description: Iroha V2 instruction name. - nullable: false - type: IrohaInstruction - params: - description: The list of arguments to pass with specified instruction. - items: {} - type: array - required: - - name - - params - type: object - IrohaTransactionParametersV1: - additionalProperties: true - description: Iroha V2 transaction payload parameters - example: - creationTime: creationTime - ttl: ttl - nonce: 0.8008281904610115 - properties: - ttl: - description: BigInt time to live. - nullable: false - type: string - creationTime: - description: BigInt creation time - nullable: false - type: string - nonce: - description: Transaction nonce - nullable: false - type: number - type: object - IrohaTransactionDefinitionV1: - additionalProperties: false - description: Iroha V2 transaction definition - example: - instruction: null - params: - creationTime: creationTime - ttl: ttl - nonce: 0.8008281904610115 - properties: - instruction: - $ref: '#/components/schemas/IrohaTransactionDefinitionV1_instruction' - params: - $ref: '#/components/schemas/IrohaTransactionParametersV1' - required: - - instruction - type: object - IrohaQueryDefinitionV1: - additionalProperties: false - description: Iroha V2 query definition. - example: - query: "" - params: - - "" - - "" - properties: - query: - description: Name of the query to be executed. - nullable: false - type: IrohaQuery - params: - description: The list of arguments to pass with the query. - items: {} - type: array - required: - - query - type: object - IrohaSignedQueryDefinitionV1: - additionalProperties: false - description: Iroha V2 signed query definition - example: - payload: payload - query: "" - properties: - query: - description: Name of the query to be executed. - nullable: false - type: IrohaQuery - payload: - description: Signed query transaction binary data received from generate-transaction - endpoint. - nullable: false - type: string - required: - - payload - - query - type: object - TransactRequestV1: - additionalProperties: false - description: Request to transact endpoint. - example: - waitForCommit: false - signedTransaction: signedTransaction - transaction: - instruction: null - params: - creationTime: creationTime - ttl: ttl - nonce: 0.8008281904610115 - baseConfig: - torii: - apiURL: apiURL - telemetryURL: telemetryURL - accountId: - name: name - domainId: domainId - signingCredential: null - properties: - signedTransaction: - description: Signed transaction binary data received from generate-transaction - endpoint. - nullable: false - type: string - transaction: - $ref: '#/components/schemas/IrohaTransactionDefinitionV1' - waitForCommit: - default: false - description: Wait unitl transaction is sent and return the final status - (committed / rejected) - nullable: false - type: boolean - baseConfig: - $ref: '#/components/schemas/Iroha2BaseConfig' - type: object - TransactResponseV1: - description: Response from transaction endpoint with operation status. - example: - rejectReason: rejectReason - hash: hash - status: null - properties: - hash: - description: Hexadecimal hash of the transaction sent to the ledger. - nullable: false - type: string - status: - $ref: '#/components/schemas/TransactionStatusV1' - rejectReason: - description: "When waitForCommit was suplied and the transaction was rejected,\ - \ contains the reason of the rejection." - nullable: false - type: string - required: - - hash - - status - type: object - QueryRequestV1: - additionalProperties: false - description: Request to query endpoint. - example: - query: - query: "" - params: - - "" - - "" - signedQuery: - payload: payload - query: "" - baseConfig: - torii: - apiURL: apiURL - telemetryURL: telemetryURL - accountId: - name: name - domainId: domainId - signingCredential: null - properties: - query: - $ref: '#/components/schemas/IrohaQueryDefinitionV1' - signedQuery: - $ref: '#/components/schemas/IrohaSignedQueryDefinitionV1' - baseConfig: - $ref: '#/components/schemas/Iroha2BaseConfig' - type: object - QueryResponseV1: - description: Response with the query results. - example: - response: "" - properties: - response: - description: Query response data that varies between different queries. - nullable: false - required: - - response - type: object - GenerateTransactionRequestV1: - additionalProperties: false - description: Request for generating transaction or query payload that can be - signed on the client side. - example: - request: null - baseConfig: - torii: - apiURL: apiURL - telemetryURL: telemetryURL - accountId: - name: name - domainId: domainId - signingCredential: null - properties: - request: - $ref: '#/components/schemas/GenerateTransactionRequestV1_request' - baseConfig: - $ref: '#/components/schemas/Iroha2BaseConfig' - required: - - request - type: object - ErrorExceptionResponseV1: - description: Error response from the connector. - properties: - message: - description: Short error description message. - nullable: false - type: string - error: - description: Detailed error information. - nullable: false - type: string - required: - - error - - message - type: object - Iroha2BaseConfig_signingCredential: - oneOf: - - $ref: '#/components/schemas/Iroha2KeyPair' - - $ref: '#/components/schemas/KeychainReference' - IrohaTransactionDefinitionV1_instruction: - oneOf: - - $ref: '#/components/schemas/IrohaInstructionRequestV1' - - items: - $ref: '#/components/schemas/IrohaInstructionRequestV1' - type: array - GenerateTransactionRequestV1_request: - oneOf: - - $ref: '#/components/schemas/IrohaTransactionDefinitionV1' - - $ref: '#/components/schemas/IrohaQueryDefinitionV1' diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 108500ef37..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,368 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiGenerateTransactionV1Request struct { - ctx context.Context - ApiService *DefaultApiService - generateTransactionRequestV1 *GenerateTransactionRequestV1 -} - -func (r ApiGenerateTransactionV1Request) GenerateTransactionRequestV1(generateTransactionRequestV1 GenerateTransactionRequestV1) ApiGenerateTransactionV1Request { - r.generateTransactionRequestV1 = &generateTransactionRequestV1 - return r -} - -func (r ApiGenerateTransactionV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GenerateTransactionV1Execute(r) -} - -/* -GenerateTransactionV1 Generate transaction that can be signed locally. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTransactionV1Request -*/ -func (a *DefaultApiService) GenerateTransactionV1(ctx context.Context) ApiGenerateTransactionV1Request { - return ApiGenerateTransactionV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GenerateTransactionV1Execute(r ApiGenerateTransactionV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GenerateTransactionV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/generate-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.generateTransactionRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiQueryV1Request struct { - ctx context.Context - ApiService *DefaultApiService - queryRequestV1 *QueryRequestV1 -} - -func (r ApiQueryV1Request) QueryRequestV1(queryRequestV1 QueryRequestV1) ApiQueryV1Request { - r.queryRequestV1 = &queryRequestV1 - return r -} - -func (r ApiQueryV1Request) Execute() (*QueryResponseV1, *http.Response, error) { - return r.ApiService.QueryV1Execute(r) -} - -/* -QueryV1 Executes a query on a Iroha V2 ledger and returns it's results. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiQueryV1Request -*/ -func (a *DefaultApiService) QueryV1(ctx context.Context) ApiQueryV1Request { - return ApiQueryV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return QueryResponseV1 -func (a *DefaultApiService) QueryV1Execute(r ApiQueryV1Request) (*QueryResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *QueryResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.QueryV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.queryRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiTransactV1Request struct { - ctx context.Context - ApiService *DefaultApiService - transactRequestV1 *TransactRequestV1 -} - -func (r ApiTransactV1Request) TransactRequestV1(transactRequestV1 TransactRequestV1) ApiTransactV1Request { - r.transactRequestV1 = &transactRequestV1 - return r -} - -func (r ApiTransactV1Request) Execute() (*TransactResponseV1, *http.Response, error) { - return r.ApiService.TransactV1Execute(r) -} - -/* -TransactV1 Executes a transaction on a Iroha V2 ledger (by sending some instructions) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTransactV1Request -*/ -func (a *DefaultApiService) TransactV1(ctx context.Context) ApiTransactV1Request { - return ApiTransactV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return TransactResponseV1 -func (a *DefaultApiService) TransactV1Execute(r ApiTransactV1Request) (*TransactResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *TransactResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.TransactV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.transactRequestV1 - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 334060fa51..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Connector Iroha V2 API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index f4900aea61..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 2a2fe99e0e..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_block_type_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_block_type_v1.go deleted file mode 100644 index 0af2ff9950..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_block_type_v1.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" - "fmt" -) - -// BlockTypeV1 Iroha V2 block response type. -type BlockTypeV1 string - -// List of BlockTypeV1 -const ( - Raw BlockTypeV1 = "raw" - Binary BlockTypeV1 = "binary" -) - -// All allowed values of BlockTypeV1 enum -var AllowedBlockTypeV1EnumValues = []BlockTypeV1{ - "raw", - "binary", -} - -func (v *BlockTypeV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := BlockTypeV1(value) - for _, existing := range AllowedBlockTypeV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid BlockTypeV1", value) -} - -// NewBlockTypeV1FromValue returns a pointer to a valid BlockTypeV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewBlockTypeV1FromValue(v string) (*BlockTypeV1, error) { - ev := BlockTypeV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for BlockTypeV1: valid values are %v", v, AllowedBlockTypeV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v BlockTypeV1) IsValid() bool { - for _, existing := range AllowedBlockTypeV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to BlockTypeV1 value -func (v BlockTypeV1) Ptr() *BlockTypeV1 { - return &v -} - -type NullableBlockTypeV1 struct { - value *BlockTypeV1 - isSet bool -} - -func (v NullableBlockTypeV1) Get() *BlockTypeV1 { - return v.value -} - -func (v *NullableBlockTypeV1) Set(val *BlockTypeV1) { - v.value = val - v.isSet = true -} - -func (v NullableBlockTypeV1) IsSet() bool { - return v.isSet -} - -func (v *NullableBlockTypeV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBlockTypeV1(val *BlockTypeV1) *NullableBlockTypeV1 { - return &NullableBlockTypeV1{value: val, isSet: true} -} - -func (v NullableBlockTypeV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBlockTypeV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go deleted file mode 100644 index 974e910f7b..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the ErrorExceptionResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorExceptionResponseV1{} - -// ErrorExceptionResponseV1 Error response from the connector. -type ErrorExceptionResponseV1 struct { - // Short error description message. - Message string `json:"message"` - // Detailed error information. - Error string `json:"error"` -} - -// NewErrorExceptionResponseV1 instantiates a new ErrorExceptionResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorExceptionResponseV1(message string, error_ string) *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - this.Message = message - this.Error = error_ - return &this -} - -// NewErrorExceptionResponseV1WithDefaults instantiates a new ErrorExceptionResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorExceptionResponseV1WithDefaults() *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - return &this -} - -// GetMessage returns the Message field value -func (o *ErrorExceptionResponseV1) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ErrorExceptionResponseV1) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -func (o *ErrorExceptionResponseV1) GetError() string { - if o == nil { - var ret string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ErrorExceptionResponseV1) SetError(v string) { - o.Error = v -} - -func (o ErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorExceptionResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error - return toSerialize, nil -} - -type NullableErrorExceptionResponseV1 struct { - value *ErrorExceptionResponseV1 - isSet bool -} - -func (v NullableErrorExceptionResponseV1) Get() *ErrorExceptionResponseV1 { - return v.value -} - -func (v *NullableErrorExceptionResponseV1) Set(val *ErrorExceptionResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableErrorExceptionResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorExceptionResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorExceptionResponseV1(val *ErrorExceptionResponseV1) *NullableErrorExceptionResponseV1 { - return &NullableErrorExceptionResponseV1{value: val, isSet: true} -} - -func (v NullableErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorExceptionResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_generate_transaction_request_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_generate_transaction_request_v1.go deleted file mode 100644 index 65d1c7f897..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_generate_transaction_request_v1.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the GenerateTransactionRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenerateTransactionRequestV1{} - -// GenerateTransactionRequestV1 Request for generating transaction or query payload that can be signed on the client side. -type GenerateTransactionRequestV1 struct { - Request GenerateTransactionRequestV1Request `json:"request"` - BaseConfig *Iroha2BaseConfig `json:"baseConfig,omitempty"` -} - -// NewGenerateTransactionRequestV1 instantiates a new GenerateTransactionRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGenerateTransactionRequestV1(request GenerateTransactionRequestV1Request) *GenerateTransactionRequestV1 { - this := GenerateTransactionRequestV1{} - this.Request = request - return &this -} - -// NewGenerateTransactionRequestV1WithDefaults instantiates a new GenerateTransactionRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGenerateTransactionRequestV1WithDefaults() *GenerateTransactionRequestV1 { - this := GenerateTransactionRequestV1{} - return &this -} - -// GetRequest returns the Request field value -func (o *GenerateTransactionRequestV1) GetRequest() GenerateTransactionRequestV1Request { - if o == nil { - var ret GenerateTransactionRequestV1Request - return ret - } - - return o.Request -} - -// GetRequestOk returns a tuple with the Request field value -// and a boolean to check if the value has been set. -func (o *GenerateTransactionRequestV1) GetRequestOk() (*GenerateTransactionRequestV1Request, bool) { - if o == nil { - return nil, false - } - return &o.Request, true -} - -// SetRequest sets field value -func (o *GenerateTransactionRequestV1) SetRequest(v GenerateTransactionRequestV1Request) { - o.Request = v -} - -// GetBaseConfig returns the BaseConfig field value if set, zero value otherwise. -func (o *GenerateTransactionRequestV1) GetBaseConfig() Iroha2BaseConfig { - if o == nil || IsNil(o.BaseConfig) { - var ret Iroha2BaseConfig - return ret - } - return *o.BaseConfig -} - -// GetBaseConfigOk returns a tuple with the BaseConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateTransactionRequestV1) GetBaseConfigOk() (*Iroha2BaseConfig, bool) { - if o == nil || IsNil(o.BaseConfig) { - return nil, false - } - return o.BaseConfig, true -} - -// HasBaseConfig returns a boolean if a field has been set. -func (o *GenerateTransactionRequestV1) HasBaseConfig() bool { - if o != nil && !IsNil(o.BaseConfig) { - return true - } - - return false -} - -// SetBaseConfig gets a reference to the given Iroha2BaseConfig and assigns it to the BaseConfig field. -func (o *GenerateTransactionRequestV1) SetBaseConfig(v Iroha2BaseConfig) { - o.BaseConfig = &v -} - -func (o GenerateTransactionRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GenerateTransactionRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["request"] = o.Request - if !IsNil(o.BaseConfig) { - toSerialize["baseConfig"] = o.BaseConfig - } - return toSerialize, nil -} - -type NullableGenerateTransactionRequestV1 struct { - value *GenerateTransactionRequestV1 - isSet bool -} - -func (v NullableGenerateTransactionRequestV1) Get() *GenerateTransactionRequestV1 { - return v.value -} - -func (v *NullableGenerateTransactionRequestV1) Set(val *GenerateTransactionRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateTransactionRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateTransactionRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateTransactionRequestV1(val *GenerateTransactionRequestV1) *NullableGenerateTransactionRequestV1 { - return &NullableGenerateTransactionRequestV1{value: val, isSet: true} -} - -func (v NullableGenerateTransactionRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateTransactionRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_generate_transaction_request_v1_request.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_generate_transaction_request_v1_request.go deleted file mode 100644 index 6c34d142fc..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_generate_transaction_request_v1_request.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" - "fmt" -) - -// GenerateTransactionRequestV1Request - struct for GenerateTransactionRequestV1Request -type GenerateTransactionRequestV1Request struct { - IrohaQueryDefinitionV1 *IrohaQueryDefinitionV1 - IrohaTransactionDefinitionV1 *IrohaTransactionDefinitionV1 -} - -// IrohaQueryDefinitionV1AsGenerateTransactionRequestV1Request is a convenience function that returns IrohaQueryDefinitionV1 wrapped in GenerateTransactionRequestV1Request -func IrohaQueryDefinitionV1AsGenerateTransactionRequestV1Request(v *IrohaQueryDefinitionV1) GenerateTransactionRequestV1Request { - return GenerateTransactionRequestV1Request{ - IrohaQueryDefinitionV1: v, - } -} - -// IrohaTransactionDefinitionV1AsGenerateTransactionRequestV1Request is a convenience function that returns IrohaTransactionDefinitionV1 wrapped in GenerateTransactionRequestV1Request -func IrohaTransactionDefinitionV1AsGenerateTransactionRequestV1Request(v *IrohaTransactionDefinitionV1) GenerateTransactionRequestV1Request { - return GenerateTransactionRequestV1Request{ - IrohaTransactionDefinitionV1: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *GenerateTransactionRequestV1Request) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into IrohaQueryDefinitionV1 - err = newStrictDecoder(data).Decode(&dst.IrohaQueryDefinitionV1) - if err == nil { - jsonIrohaQueryDefinitionV1, _ := json.Marshal(dst.IrohaQueryDefinitionV1) - if string(jsonIrohaQueryDefinitionV1) == "{}" { // empty struct - dst.IrohaQueryDefinitionV1 = nil - } else { - match++ - } - } else { - dst.IrohaQueryDefinitionV1 = nil - } - - // try to unmarshal data into IrohaTransactionDefinitionV1 - err = newStrictDecoder(data).Decode(&dst.IrohaTransactionDefinitionV1) - if err == nil { - jsonIrohaTransactionDefinitionV1, _ := json.Marshal(dst.IrohaTransactionDefinitionV1) - if string(jsonIrohaTransactionDefinitionV1) == "{}" { // empty struct - dst.IrohaTransactionDefinitionV1 = nil - } else { - match++ - } - } else { - dst.IrohaTransactionDefinitionV1 = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.IrohaQueryDefinitionV1 = nil - dst.IrohaTransactionDefinitionV1 = nil - - return fmt.Errorf("data matches more than one schema in oneOf(GenerateTransactionRequestV1Request)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(GenerateTransactionRequestV1Request)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src GenerateTransactionRequestV1Request) MarshalJSON() ([]byte, error) { - if src.IrohaQueryDefinitionV1 != nil { - return json.Marshal(&src.IrohaQueryDefinitionV1) - } - - if src.IrohaTransactionDefinitionV1 != nil { - return json.Marshal(&src.IrohaTransactionDefinitionV1) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *GenerateTransactionRequestV1Request) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.IrohaQueryDefinitionV1 != nil { - return obj.IrohaQueryDefinitionV1 - } - - if obj.IrohaTransactionDefinitionV1 != nil { - return obj.IrohaTransactionDefinitionV1 - } - - // all schemas are nil - return nil -} - -type NullableGenerateTransactionRequestV1Request struct { - value *GenerateTransactionRequestV1Request - isSet bool -} - -func (v NullableGenerateTransactionRequestV1Request) Get() *GenerateTransactionRequestV1Request { - return v.value -} - -func (v *NullableGenerateTransactionRequestV1Request) Set(val *GenerateTransactionRequestV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateTransactionRequestV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateTransactionRequestV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateTransactionRequestV1Request(val *GenerateTransactionRequestV1Request) *NullableGenerateTransactionRequestV1Request { - return &NullableGenerateTransactionRequestV1Request{value: val, isSet: true} -} - -func (v NullableGenerateTransactionRequestV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateTransactionRequestV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_account_id.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_account_id.go deleted file mode 100644 index b5c885479f..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_account_id.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the Iroha2AccountId type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Iroha2AccountId{} - -// Iroha2AccountId Iroha V2 account ID. -type Iroha2AccountId struct { - Name string `json:"name"` - DomainId string `json:"domainId"` -} - -// NewIroha2AccountId instantiates a new Iroha2AccountId object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIroha2AccountId(name string, domainId string) *Iroha2AccountId { - this := Iroha2AccountId{} - this.Name = name - this.DomainId = domainId - return &this -} - -// NewIroha2AccountIdWithDefaults instantiates a new Iroha2AccountId object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIroha2AccountIdWithDefaults() *Iroha2AccountId { - this := Iroha2AccountId{} - return &this -} - -// GetName returns the Name field value -func (o *Iroha2AccountId) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *Iroha2AccountId) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *Iroha2AccountId) SetName(v string) { - o.Name = v -} - -// GetDomainId returns the DomainId field value -func (o *Iroha2AccountId) GetDomainId() string { - if o == nil { - var ret string - return ret - } - - return o.DomainId -} - -// GetDomainIdOk returns a tuple with the DomainId field value -// and a boolean to check if the value has been set. -func (o *Iroha2AccountId) GetDomainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DomainId, true -} - -// SetDomainId sets field value -func (o *Iroha2AccountId) SetDomainId(v string) { - o.DomainId = v -} - -func (o Iroha2AccountId) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Iroha2AccountId) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["domainId"] = o.DomainId - return toSerialize, nil -} - -type NullableIroha2AccountId struct { - value *Iroha2AccountId - isSet bool -} - -func (v NullableIroha2AccountId) Get() *Iroha2AccountId { - return v.value -} - -func (v *NullableIroha2AccountId) Set(val *Iroha2AccountId) { - v.value = val - v.isSet = true -} - -func (v NullableIroha2AccountId) IsSet() bool { - return v.isSet -} - -func (v *NullableIroha2AccountId) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIroha2AccountId(val *Iroha2AccountId) *NullableIroha2AccountId { - return &NullableIroha2AccountId{value: val, isSet: true} -} - -func (v NullableIroha2AccountId) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIroha2AccountId) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_base_config.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_base_config.go deleted file mode 100644 index 4db75183da..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_base_config.go +++ /dev/null @@ -1,189 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the Iroha2BaseConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Iroha2BaseConfig{} - -// Iroha2BaseConfig Iroha V2 connection configuration. -type Iroha2BaseConfig struct { - Torii Iroha2BaseConfigTorii `json:"torii"` - AccountId *Iroha2AccountId `json:"accountId,omitempty"` - SigningCredential *Iroha2BaseConfigSigningCredential `json:"signingCredential,omitempty"` -} - -// NewIroha2BaseConfig instantiates a new Iroha2BaseConfig object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIroha2BaseConfig(torii Iroha2BaseConfigTorii) *Iroha2BaseConfig { - this := Iroha2BaseConfig{} - this.Torii = torii - return &this -} - -// NewIroha2BaseConfigWithDefaults instantiates a new Iroha2BaseConfig object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIroha2BaseConfigWithDefaults() *Iroha2BaseConfig { - this := Iroha2BaseConfig{} - return &this -} - -// GetTorii returns the Torii field value -func (o *Iroha2BaseConfig) GetTorii() Iroha2BaseConfigTorii { - if o == nil { - var ret Iroha2BaseConfigTorii - return ret - } - - return o.Torii -} - -// GetToriiOk returns a tuple with the Torii field value -// and a boolean to check if the value has been set. -func (o *Iroha2BaseConfig) GetToriiOk() (*Iroha2BaseConfigTorii, bool) { - if o == nil { - return nil, false - } - return &o.Torii, true -} - -// SetTorii sets field value -func (o *Iroha2BaseConfig) SetTorii(v Iroha2BaseConfigTorii) { - o.Torii = v -} - -// GetAccountId returns the AccountId field value if set, zero value otherwise. -func (o *Iroha2BaseConfig) GetAccountId() Iroha2AccountId { - if o == nil || IsNil(o.AccountId) { - var ret Iroha2AccountId - return ret - } - return *o.AccountId -} - -// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Iroha2BaseConfig) GetAccountIdOk() (*Iroha2AccountId, bool) { - if o == nil || IsNil(o.AccountId) { - return nil, false - } - return o.AccountId, true -} - -// HasAccountId returns a boolean if a field has been set. -func (o *Iroha2BaseConfig) HasAccountId() bool { - if o != nil && !IsNil(o.AccountId) { - return true - } - - return false -} - -// SetAccountId gets a reference to the given Iroha2AccountId and assigns it to the AccountId field. -func (o *Iroha2BaseConfig) SetAccountId(v Iroha2AccountId) { - o.AccountId = &v -} - -// GetSigningCredential returns the SigningCredential field value if set, zero value otherwise. -func (o *Iroha2BaseConfig) GetSigningCredential() Iroha2BaseConfigSigningCredential { - if o == nil || IsNil(o.SigningCredential) { - var ret Iroha2BaseConfigSigningCredential - return ret - } - return *o.SigningCredential -} - -// GetSigningCredentialOk returns a tuple with the SigningCredential field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Iroha2BaseConfig) GetSigningCredentialOk() (*Iroha2BaseConfigSigningCredential, bool) { - if o == nil || IsNil(o.SigningCredential) { - return nil, false - } - return o.SigningCredential, true -} - -// HasSigningCredential returns a boolean if a field has been set. -func (o *Iroha2BaseConfig) HasSigningCredential() bool { - if o != nil && !IsNil(o.SigningCredential) { - return true - } - - return false -} - -// SetSigningCredential gets a reference to the given Iroha2BaseConfigSigningCredential and assigns it to the SigningCredential field. -func (o *Iroha2BaseConfig) SetSigningCredential(v Iroha2BaseConfigSigningCredential) { - o.SigningCredential = &v -} - -func (o Iroha2BaseConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Iroha2BaseConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["torii"] = o.Torii - if !IsNil(o.AccountId) { - toSerialize["accountId"] = o.AccountId - } - if !IsNil(o.SigningCredential) { - toSerialize["signingCredential"] = o.SigningCredential - } - return toSerialize, nil -} - -type NullableIroha2BaseConfig struct { - value *Iroha2BaseConfig - isSet bool -} - -func (v NullableIroha2BaseConfig) Get() *Iroha2BaseConfig { - return v.value -} - -func (v *NullableIroha2BaseConfig) Set(val *Iroha2BaseConfig) { - v.value = val - v.isSet = true -} - -func (v NullableIroha2BaseConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableIroha2BaseConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIroha2BaseConfig(val *Iroha2BaseConfig) *NullableIroha2BaseConfig { - return &NullableIroha2BaseConfig{value: val, isSet: true} -} - -func (v NullableIroha2BaseConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIroha2BaseConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_base_config_signing_credential.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_base_config_signing_credential.go deleted file mode 100644 index 794b7ff345..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_base_config_signing_credential.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" - "fmt" -) - -// Iroha2BaseConfigSigningCredential - struct for Iroha2BaseConfigSigningCredential -type Iroha2BaseConfigSigningCredential struct { - Iroha2KeyPair *Iroha2KeyPair - KeychainReference *KeychainReference -} - -// Iroha2KeyPairAsIroha2BaseConfigSigningCredential is a convenience function that returns Iroha2KeyPair wrapped in Iroha2BaseConfigSigningCredential -func Iroha2KeyPairAsIroha2BaseConfigSigningCredential(v *Iroha2KeyPair) Iroha2BaseConfigSigningCredential { - return Iroha2BaseConfigSigningCredential{ - Iroha2KeyPair: v, - } -} - -// KeychainReferenceAsIroha2BaseConfigSigningCredential is a convenience function that returns KeychainReference wrapped in Iroha2BaseConfigSigningCredential -func KeychainReferenceAsIroha2BaseConfigSigningCredential(v *KeychainReference) Iroha2BaseConfigSigningCredential { - return Iroha2BaseConfigSigningCredential{ - KeychainReference: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *Iroha2BaseConfigSigningCredential) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Iroha2KeyPair - err = newStrictDecoder(data).Decode(&dst.Iroha2KeyPair) - if err == nil { - jsonIroha2KeyPair, _ := json.Marshal(dst.Iroha2KeyPair) - if string(jsonIroha2KeyPair) == "{}" { // empty struct - dst.Iroha2KeyPair = nil - } else { - match++ - } - } else { - dst.Iroha2KeyPair = nil - } - - // try to unmarshal data into KeychainReference - err = newStrictDecoder(data).Decode(&dst.KeychainReference) - if err == nil { - jsonKeychainReference, _ := json.Marshal(dst.KeychainReference) - if string(jsonKeychainReference) == "{}" { // empty struct - dst.KeychainReference = nil - } else { - match++ - } - } else { - dst.KeychainReference = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Iroha2KeyPair = nil - dst.KeychainReference = nil - - return fmt.Errorf("data matches more than one schema in oneOf(Iroha2BaseConfigSigningCredential)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(Iroha2BaseConfigSigningCredential)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src Iroha2BaseConfigSigningCredential) MarshalJSON() ([]byte, error) { - if src.Iroha2KeyPair != nil { - return json.Marshal(&src.Iroha2KeyPair) - } - - if src.KeychainReference != nil { - return json.Marshal(&src.KeychainReference) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *Iroha2BaseConfigSigningCredential) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Iroha2KeyPair != nil { - return obj.Iroha2KeyPair - } - - if obj.KeychainReference != nil { - return obj.KeychainReference - } - - // all schemas are nil - return nil -} - -type NullableIroha2BaseConfigSigningCredential struct { - value *Iroha2BaseConfigSigningCredential - isSet bool -} - -func (v NullableIroha2BaseConfigSigningCredential) Get() *Iroha2BaseConfigSigningCredential { - return v.value -} - -func (v *NullableIroha2BaseConfigSigningCredential) Set(val *Iroha2BaseConfigSigningCredential) { - v.value = val - v.isSet = true -} - -func (v NullableIroha2BaseConfigSigningCredential) IsSet() bool { - return v.isSet -} - -func (v *NullableIroha2BaseConfigSigningCredential) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIroha2BaseConfigSigningCredential(val *Iroha2BaseConfigSigningCredential) *NullableIroha2BaseConfigSigningCredential { - return &NullableIroha2BaseConfigSigningCredential{value: val, isSet: true} -} - -func (v NullableIroha2BaseConfigSigningCredential) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIroha2BaseConfigSigningCredential) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_base_config_torii.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_base_config_torii.go deleted file mode 100644 index ea84fd1472..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_base_config_torii.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the Iroha2BaseConfigTorii type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Iroha2BaseConfigTorii{} - -// Iroha2BaseConfigTorii Iroha V2 peer connection information. -type Iroha2BaseConfigTorii struct { - ApiURL *string `json:"apiURL,omitempty"` - TelemetryURL *string `json:"telemetryURL,omitempty"` -} - -// NewIroha2BaseConfigTorii instantiates a new Iroha2BaseConfigTorii object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIroha2BaseConfigTorii() *Iroha2BaseConfigTorii { - this := Iroha2BaseConfigTorii{} - return &this -} - -// NewIroha2BaseConfigToriiWithDefaults instantiates a new Iroha2BaseConfigTorii object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIroha2BaseConfigToriiWithDefaults() *Iroha2BaseConfigTorii { - this := Iroha2BaseConfigTorii{} - return &this -} - -// GetApiURL returns the ApiURL field value if set, zero value otherwise. -func (o *Iroha2BaseConfigTorii) GetApiURL() string { - if o == nil || IsNil(o.ApiURL) { - var ret string - return ret - } - return *o.ApiURL -} - -// GetApiURLOk returns a tuple with the ApiURL field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Iroha2BaseConfigTorii) GetApiURLOk() (*string, bool) { - if o == nil || IsNil(o.ApiURL) { - return nil, false - } - return o.ApiURL, true -} - -// HasApiURL returns a boolean if a field has been set. -func (o *Iroha2BaseConfigTorii) HasApiURL() bool { - if o != nil && !IsNil(o.ApiURL) { - return true - } - - return false -} - -// SetApiURL gets a reference to the given string and assigns it to the ApiURL field. -func (o *Iroha2BaseConfigTorii) SetApiURL(v string) { - o.ApiURL = &v -} - -// GetTelemetryURL returns the TelemetryURL field value if set, zero value otherwise. -func (o *Iroha2BaseConfigTorii) GetTelemetryURL() string { - if o == nil || IsNil(o.TelemetryURL) { - var ret string - return ret - } - return *o.TelemetryURL -} - -// GetTelemetryURLOk returns a tuple with the TelemetryURL field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Iroha2BaseConfigTorii) GetTelemetryURLOk() (*string, bool) { - if o == nil || IsNil(o.TelemetryURL) { - return nil, false - } - return o.TelemetryURL, true -} - -// HasTelemetryURL returns a boolean if a field has been set. -func (o *Iroha2BaseConfigTorii) HasTelemetryURL() bool { - if o != nil && !IsNil(o.TelemetryURL) { - return true - } - - return false -} - -// SetTelemetryURL gets a reference to the given string and assigns it to the TelemetryURL field. -func (o *Iroha2BaseConfigTorii) SetTelemetryURL(v string) { - o.TelemetryURL = &v -} - -func (o Iroha2BaseConfigTorii) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Iroha2BaseConfigTorii) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ApiURL) { - toSerialize["apiURL"] = o.ApiURL - } - if !IsNil(o.TelemetryURL) { - toSerialize["telemetryURL"] = o.TelemetryURL - } - return toSerialize, nil -} - -type NullableIroha2BaseConfigTorii struct { - value *Iroha2BaseConfigTorii - isSet bool -} - -func (v NullableIroha2BaseConfigTorii) Get() *Iroha2BaseConfigTorii { - return v.value -} - -func (v *NullableIroha2BaseConfigTorii) Set(val *Iroha2BaseConfigTorii) { - v.value = val - v.isSet = true -} - -func (v NullableIroha2BaseConfigTorii) IsSet() bool { - return v.isSet -} - -func (v *NullableIroha2BaseConfigTorii) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIroha2BaseConfigTorii(val *Iroha2BaseConfigTorii) *NullableIroha2BaseConfigTorii { - return &NullableIroha2BaseConfigTorii{value: val, isSet: true} -} - -func (v NullableIroha2BaseConfigTorii) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIroha2BaseConfigTorii) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_key_json.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_key_json.go deleted file mode 100644 index 6237a56d4c..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_key_json.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the Iroha2KeyJson type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Iroha2KeyJson{} - -// Iroha2KeyJson Private/Public key JSON containing payload and digest function. -type Iroha2KeyJson struct { - DigestFunction string `json:"digestFunction"` - Payload string `json:"payload"` -} - -// NewIroha2KeyJson instantiates a new Iroha2KeyJson object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIroha2KeyJson(digestFunction string, payload string) *Iroha2KeyJson { - this := Iroha2KeyJson{} - this.DigestFunction = digestFunction - this.Payload = payload - return &this -} - -// NewIroha2KeyJsonWithDefaults instantiates a new Iroha2KeyJson object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIroha2KeyJsonWithDefaults() *Iroha2KeyJson { - this := Iroha2KeyJson{} - return &this -} - -// GetDigestFunction returns the DigestFunction field value -func (o *Iroha2KeyJson) GetDigestFunction() string { - if o == nil { - var ret string - return ret - } - - return o.DigestFunction -} - -// GetDigestFunctionOk returns a tuple with the DigestFunction field value -// and a boolean to check if the value has been set. -func (o *Iroha2KeyJson) GetDigestFunctionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DigestFunction, true -} - -// SetDigestFunction sets field value -func (o *Iroha2KeyJson) SetDigestFunction(v string) { - o.DigestFunction = v -} - -// GetPayload returns the Payload field value -func (o *Iroha2KeyJson) GetPayload() string { - if o == nil { - var ret string - return ret - } - - return o.Payload -} - -// GetPayloadOk returns a tuple with the Payload field value -// and a boolean to check if the value has been set. -func (o *Iroha2KeyJson) GetPayloadOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Payload, true -} - -// SetPayload sets field value -func (o *Iroha2KeyJson) SetPayload(v string) { - o.Payload = v -} - -func (o Iroha2KeyJson) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Iroha2KeyJson) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["digestFunction"] = o.DigestFunction - toSerialize["payload"] = o.Payload - return toSerialize, nil -} - -type NullableIroha2KeyJson struct { - value *Iroha2KeyJson - isSet bool -} - -func (v NullableIroha2KeyJson) Get() *Iroha2KeyJson { - return v.value -} - -func (v *NullableIroha2KeyJson) Set(val *Iroha2KeyJson) { - v.value = val - v.isSet = true -} - -func (v NullableIroha2KeyJson) IsSet() bool { - return v.isSet -} - -func (v *NullableIroha2KeyJson) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIroha2KeyJson(val *Iroha2KeyJson) *NullableIroha2KeyJson { - return &NullableIroha2KeyJson{value: val, isSet: true} -} - -func (v NullableIroha2KeyJson) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIroha2KeyJson) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_key_pair.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_key_pair.go deleted file mode 100644 index 5eeb95aa63..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha2_key_pair.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the Iroha2KeyPair type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Iroha2KeyPair{} - -// Iroha2KeyPair Pair of Iroha account private and public keys. -type Iroha2KeyPair struct { - PrivateKey Iroha2KeyJson `json:"privateKey"` - PublicKey string `json:"publicKey"` -} - -// NewIroha2KeyPair instantiates a new Iroha2KeyPair object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIroha2KeyPair(privateKey Iroha2KeyJson, publicKey string) *Iroha2KeyPair { - this := Iroha2KeyPair{} - this.PrivateKey = privateKey - this.PublicKey = publicKey - return &this -} - -// NewIroha2KeyPairWithDefaults instantiates a new Iroha2KeyPair object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIroha2KeyPairWithDefaults() *Iroha2KeyPair { - this := Iroha2KeyPair{} - return &this -} - -// GetPrivateKey returns the PrivateKey field value -func (o *Iroha2KeyPair) GetPrivateKey() Iroha2KeyJson { - if o == nil { - var ret Iroha2KeyJson - return ret - } - - return o.PrivateKey -} - -// GetPrivateKeyOk returns a tuple with the PrivateKey field value -// and a boolean to check if the value has been set. -func (o *Iroha2KeyPair) GetPrivateKeyOk() (*Iroha2KeyJson, bool) { - if o == nil { - return nil, false - } - return &o.PrivateKey, true -} - -// SetPrivateKey sets field value -func (o *Iroha2KeyPair) SetPrivateKey(v Iroha2KeyJson) { - o.PrivateKey = v -} - -// GetPublicKey returns the PublicKey field value -func (o *Iroha2KeyPair) GetPublicKey() string { - if o == nil { - var ret string - return ret - } - - return o.PublicKey -} - -// GetPublicKeyOk returns a tuple with the PublicKey field value -// and a boolean to check if the value has been set. -func (o *Iroha2KeyPair) GetPublicKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PublicKey, true -} - -// SetPublicKey sets field value -func (o *Iroha2KeyPair) SetPublicKey(v string) { - o.PublicKey = v -} - -func (o Iroha2KeyPair) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Iroha2KeyPair) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["privateKey"] = o.PrivateKey - toSerialize["publicKey"] = o.PublicKey - return toSerialize, nil -} - -type NullableIroha2KeyPair struct { - value *Iroha2KeyPair - isSet bool -} - -func (v NullableIroha2KeyPair) Get() *Iroha2KeyPair { - return v.value -} - -func (v *NullableIroha2KeyPair) Set(val *Iroha2KeyPair) { - v.value = val - v.isSet = true -} - -func (v NullableIroha2KeyPair) IsSet() bool { - return v.isSet -} - -func (v *NullableIroha2KeyPair) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIroha2KeyPair(val *Iroha2KeyPair) *NullableIroha2KeyPair { - return &NullableIroha2KeyPair{value: val, isSet: true} -} - -func (v NullableIroha2KeyPair) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIroha2KeyPair) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_instruction.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_instruction.go deleted file mode 100644 index e8e3a6ebf7..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_instruction.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" - "fmt" -) - -// IrohaInstruction Command names that correspond to Iroha Special Instructions (https://hyperledger.github.io/iroha-2-docs/guide/advanced/isi.html) -type IrohaInstruction string - -// List of IrohaInstruction -const ( - RegisterDomain IrohaInstruction = "registerDomain" - RegisterAssetDefinition IrohaInstruction = "registerAssetDefinition" - RegisterAsset IrohaInstruction = "registerAsset" - MintAsset IrohaInstruction = "mintAsset" - BurnAsset IrohaInstruction = "burnAsset" - TransferAsset IrohaInstruction = "transferAsset" - RegisterAccount IrohaInstruction = "registerAccount" -) - -// All allowed values of IrohaInstruction enum -var AllowedIrohaInstructionEnumValues = []IrohaInstruction{ - "registerDomain", - "registerAssetDefinition", - "registerAsset", - "mintAsset", - "burnAsset", - "transferAsset", - "registerAccount", -} - -func (v *IrohaInstruction) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := IrohaInstruction(value) - for _, existing := range AllowedIrohaInstructionEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid IrohaInstruction", value) -} - -// NewIrohaInstructionFromValue returns a pointer to a valid IrohaInstruction -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewIrohaInstructionFromValue(v string) (*IrohaInstruction, error) { - ev := IrohaInstruction(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for IrohaInstruction: valid values are %v", v, AllowedIrohaInstructionEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v IrohaInstruction) IsValid() bool { - for _, existing := range AllowedIrohaInstructionEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to IrohaInstruction value -func (v IrohaInstruction) Ptr() *IrohaInstruction { - return &v -} - -type NullableIrohaInstruction struct { - value *IrohaInstruction - isSet bool -} - -func (v NullableIrohaInstruction) Get() *IrohaInstruction { - return v.value -} - -func (v *NullableIrohaInstruction) Set(val *IrohaInstruction) { - v.value = val - v.isSet = true -} - -func (v NullableIrohaInstruction) IsSet() bool { - return v.isSet -} - -func (v *NullableIrohaInstruction) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIrohaInstruction(val *IrohaInstruction) *NullableIrohaInstruction { - return &NullableIrohaInstruction{value: val, isSet: true} -} - -func (v NullableIrohaInstruction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIrohaInstruction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_instruction_request_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_instruction_request_v1.go deleted file mode 100644 index ec6f004db1..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_instruction_request_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the IrohaInstructionRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &IrohaInstructionRequestV1{} - -// IrohaInstructionRequestV1 Single Iroha V2 instruction to be executed request. -type IrohaInstructionRequestV1 struct { - // Iroha V2 instruction name. - Name IrohaInstruction `json:"name"` - // The list of arguments to pass with specified instruction. - Params []interface{} `json:"params"` -} - -// NewIrohaInstructionRequestV1 instantiates a new IrohaInstructionRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIrohaInstructionRequestV1(name IrohaInstruction, params []interface{}) *IrohaInstructionRequestV1 { - this := IrohaInstructionRequestV1{} - this.Name = name - this.Params = params - return &this -} - -// NewIrohaInstructionRequestV1WithDefaults instantiates a new IrohaInstructionRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIrohaInstructionRequestV1WithDefaults() *IrohaInstructionRequestV1 { - this := IrohaInstructionRequestV1{} - return &this -} - -// GetName returns the Name field value -func (o *IrohaInstructionRequestV1) GetName() IrohaInstruction { - if o == nil { - var ret IrohaInstruction - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *IrohaInstructionRequestV1) GetNameOk() (*IrohaInstruction, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *IrohaInstructionRequestV1) SetName(v IrohaInstruction) { - o.Name = v -} - -// GetParams returns the Params field value -func (o *IrohaInstructionRequestV1) GetParams() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *IrohaInstructionRequestV1) GetParamsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Params, true -} - -// SetParams sets field value -func (o *IrohaInstructionRequestV1) SetParams(v []interface{}) { - o.Params = v -} - -func (o IrohaInstructionRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o IrohaInstructionRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["params"] = o.Params - return toSerialize, nil -} - -type NullableIrohaInstructionRequestV1 struct { - value *IrohaInstructionRequestV1 - isSet bool -} - -func (v NullableIrohaInstructionRequestV1) Get() *IrohaInstructionRequestV1 { - return v.value -} - -func (v *NullableIrohaInstructionRequestV1) Set(val *IrohaInstructionRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableIrohaInstructionRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableIrohaInstructionRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIrohaInstructionRequestV1(val *IrohaInstructionRequestV1) *NullableIrohaInstructionRequestV1 { - return &NullableIrohaInstructionRequestV1{value: val, isSet: true} -} - -func (v NullableIrohaInstructionRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIrohaInstructionRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_query.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_query.go deleted file mode 100644 index 3834094a7e..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_query.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" - "fmt" -) - -// IrohaQuery Command names that correspond to Iroha queries (https://hyperledger.github.io/iroha-2-docs/guide/advanced/queries.html) -type IrohaQuery string - -// List of IrohaQuery -const ( - FindAllDomains IrohaQuery = "findAllDomains" - FindDomainById IrohaQuery = "findDomainById" - FindAssetDefinitionById IrohaQuery = "findAssetDefinitionById" - FindAllAssetsDefinitions IrohaQuery = "findAllAssetsDefinitions" - FindAssetById IrohaQuery = "findAssetById" - FindAllAssets IrohaQuery = "findAllAssets" - FindAllPeers IrohaQuery = "findAllPeers" - FindAllBlocks IrohaQuery = "findAllBlocks" - FindAccountById IrohaQuery = "findAccountById" - FindAllAccounts IrohaQuery = "findAllAccounts" - FindAllTransactions IrohaQuery = "findAllTransactions" - FindTransactionByHash IrohaQuery = "findTransactionByHash" -) - -// All allowed values of IrohaQuery enum -var AllowedIrohaQueryEnumValues = []IrohaQuery{ - "findAllDomains", - "findDomainById", - "findAssetDefinitionById", - "findAllAssetsDefinitions", - "findAssetById", - "findAllAssets", - "findAllPeers", - "findAllBlocks", - "findAccountById", - "findAllAccounts", - "findAllTransactions", - "findTransactionByHash", -} - -func (v *IrohaQuery) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := IrohaQuery(value) - for _, existing := range AllowedIrohaQueryEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid IrohaQuery", value) -} - -// NewIrohaQueryFromValue returns a pointer to a valid IrohaQuery -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewIrohaQueryFromValue(v string) (*IrohaQuery, error) { - ev := IrohaQuery(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for IrohaQuery: valid values are %v", v, AllowedIrohaQueryEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v IrohaQuery) IsValid() bool { - for _, existing := range AllowedIrohaQueryEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to IrohaQuery value -func (v IrohaQuery) Ptr() *IrohaQuery { - return &v -} - -type NullableIrohaQuery struct { - value *IrohaQuery - isSet bool -} - -func (v NullableIrohaQuery) Get() *IrohaQuery { - return v.value -} - -func (v *NullableIrohaQuery) Set(val *IrohaQuery) { - v.value = val - v.isSet = true -} - -func (v NullableIrohaQuery) IsSet() bool { - return v.isSet -} - -func (v *NullableIrohaQuery) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIrohaQuery(val *IrohaQuery) *NullableIrohaQuery { - return &NullableIrohaQuery{value: val, isSet: true} -} - -func (v NullableIrohaQuery) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIrohaQuery) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_query_definition_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_query_definition_v1.go deleted file mode 100644 index 4c11e016f3..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_query_definition_v1.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the IrohaQueryDefinitionV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &IrohaQueryDefinitionV1{} - -// IrohaQueryDefinitionV1 Iroha V2 query definition. -type IrohaQueryDefinitionV1 struct { - // Name of the query to be executed. - Query IrohaQuery `json:"query"` - // The list of arguments to pass with the query. - Params []interface{} `json:"params,omitempty"` -} - -// NewIrohaQueryDefinitionV1 instantiates a new IrohaQueryDefinitionV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIrohaQueryDefinitionV1(query IrohaQuery) *IrohaQueryDefinitionV1 { - this := IrohaQueryDefinitionV1{} - this.Query = query - return &this -} - -// NewIrohaQueryDefinitionV1WithDefaults instantiates a new IrohaQueryDefinitionV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIrohaQueryDefinitionV1WithDefaults() *IrohaQueryDefinitionV1 { - this := IrohaQueryDefinitionV1{} - return &this -} - -// GetQuery returns the Query field value -func (o *IrohaQueryDefinitionV1) GetQuery() IrohaQuery { - if o == nil { - var ret IrohaQuery - return ret - } - - return o.Query -} - -// GetQueryOk returns a tuple with the Query field value -// and a boolean to check if the value has been set. -func (o *IrohaQueryDefinitionV1) GetQueryOk() (*IrohaQuery, bool) { - if o == nil { - return nil, false - } - return &o.Query, true -} - -// SetQuery sets field value -func (o *IrohaQueryDefinitionV1) SetQuery(v IrohaQuery) { - o.Query = v -} - -// GetParams returns the Params field value if set, zero value otherwise. -func (o *IrohaQueryDefinitionV1) GetParams() []interface{} { - if o == nil || IsNil(o.Params) { - var ret []interface{} - return ret - } - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IrohaQueryDefinitionV1) GetParamsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.Params) { - return nil, false - } - return o.Params, true -} - -// HasParams returns a boolean if a field has been set. -func (o *IrohaQueryDefinitionV1) HasParams() bool { - if o != nil && !IsNil(o.Params) { - return true - } - - return false -} - -// SetParams gets a reference to the given []interface{} and assigns it to the Params field. -func (o *IrohaQueryDefinitionV1) SetParams(v []interface{}) { - o.Params = v -} - -func (o IrohaQueryDefinitionV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o IrohaQueryDefinitionV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["query"] = o.Query - if !IsNil(o.Params) { - toSerialize["params"] = o.Params - } - return toSerialize, nil -} - -type NullableIrohaQueryDefinitionV1 struct { - value *IrohaQueryDefinitionV1 - isSet bool -} - -func (v NullableIrohaQueryDefinitionV1) Get() *IrohaQueryDefinitionV1 { - return v.value -} - -func (v *NullableIrohaQueryDefinitionV1) Set(val *IrohaQueryDefinitionV1) { - v.value = val - v.isSet = true -} - -func (v NullableIrohaQueryDefinitionV1) IsSet() bool { - return v.isSet -} - -func (v *NullableIrohaQueryDefinitionV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIrohaQueryDefinitionV1(val *IrohaQueryDefinitionV1) *NullableIrohaQueryDefinitionV1 { - return &NullableIrohaQueryDefinitionV1{value: val, isSet: true} -} - -func (v NullableIrohaQueryDefinitionV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIrohaQueryDefinitionV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_signed_query_definition_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_signed_query_definition_v1.go deleted file mode 100644 index e21eced95d..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_signed_query_definition_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the IrohaSignedQueryDefinitionV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &IrohaSignedQueryDefinitionV1{} - -// IrohaSignedQueryDefinitionV1 Iroha V2 signed query definition -type IrohaSignedQueryDefinitionV1 struct { - // Name of the query to be executed. - Query IrohaQuery `json:"query"` - // Signed query transaction binary data received from generate-transaction endpoint. - Payload string `json:"payload"` -} - -// NewIrohaSignedQueryDefinitionV1 instantiates a new IrohaSignedQueryDefinitionV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIrohaSignedQueryDefinitionV1(query IrohaQuery, payload string) *IrohaSignedQueryDefinitionV1 { - this := IrohaSignedQueryDefinitionV1{} - this.Query = query - this.Payload = payload - return &this -} - -// NewIrohaSignedQueryDefinitionV1WithDefaults instantiates a new IrohaSignedQueryDefinitionV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIrohaSignedQueryDefinitionV1WithDefaults() *IrohaSignedQueryDefinitionV1 { - this := IrohaSignedQueryDefinitionV1{} - return &this -} - -// GetQuery returns the Query field value -func (o *IrohaSignedQueryDefinitionV1) GetQuery() IrohaQuery { - if o == nil { - var ret IrohaQuery - return ret - } - - return o.Query -} - -// GetQueryOk returns a tuple with the Query field value -// and a boolean to check if the value has been set. -func (o *IrohaSignedQueryDefinitionV1) GetQueryOk() (*IrohaQuery, bool) { - if o == nil { - return nil, false - } - return &o.Query, true -} - -// SetQuery sets field value -func (o *IrohaSignedQueryDefinitionV1) SetQuery(v IrohaQuery) { - o.Query = v -} - -// GetPayload returns the Payload field value -func (o *IrohaSignedQueryDefinitionV1) GetPayload() string { - if o == nil { - var ret string - return ret - } - - return o.Payload -} - -// GetPayloadOk returns a tuple with the Payload field value -// and a boolean to check if the value has been set. -func (o *IrohaSignedQueryDefinitionV1) GetPayloadOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Payload, true -} - -// SetPayload sets field value -func (o *IrohaSignedQueryDefinitionV1) SetPayload(v string) { - o.Payload = v -} - -func (o IrohaSignedQueryDefinitionV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o IrohaSignedQueryDefinitionV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["query"] = o.Query - toSerialize["payload"] = o.Payload - return toSerialize, nil -} - -type NullableIrohaSignedQueryDefinitionV1 struct { - value *IrohaSignedQueryDefinitionV1 - isSet bool -} - -func (v NullableIrohaSignedQueryDefinitionV1) Get() *IrohaSignedQueryDefinitionV1 { - return v.value -} - -func (v *NullableIrohaSignedQueryDefinitionV1) Set(val *IrohaSignedQueryDefinitionV1) { - v.value = val - v.isSet = true -} - -func (v NullableIrohaSignedQueryDefinitionV1) IsSet() bool { - return v.isSet -} - -func (v *NullableIrohaSignedQueryDefinitionV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIrohaSignedQueryDefinitionV1(val *IrohaSignedQueryDefinitionV1) *NullableIrohaSignedQueryDefinitionV1 { - return &NullableIrohaSignedQueryDefinitionV1{value: val, isSet: true} -} - -func (v NullableIrohaSignedQueryDefinitionV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIrohaSignedQueryDefinitionV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_transaction_definition_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_transaction_definition_v1.go deleted file mode 100644 index 6a781acdf7..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_transaction_definition_v1.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the IrohaTransactionDefinitionV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &IrohaTransactionDefinitionV1{} - -// IrohaTransactionDefinitionV1 Iroha V2 transaction definition -type IrohaTransactionDefinitionV1 struct { - Instruction IrohaTransactionDefinitionV1Instruction `json:"instruction"` - Params *IrohaTransactionParametersV1 `json:"params,omitempty"` -} - -// NewIrohaTransactionDefinitionV1 instantiates a new IrohaTransactionDefinitionV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIrohaTransactionDefinitionV1(instruction IrohaTransactionDefinitionV1Instruction) *IrohaTransactionDefinitionV1 { - this := IrohaTransactionDefinitionV1{} - this.Instruction = instruction - return &this -} - -// NewIrohaTransactionDefinitionV1WithDefaults instantiates a new IrohaTransactionDefinitionV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIrohaTransactionDefinitionV1WithDefaults() *IrohaTransactionDefinitionV1 { - this := IrohaTransactionDefinitionV1{} - return &this -} - -// GetInstruction returns the Instruction field value -func (o *IrohaTransactionDefinitionV1) GetInstruction() IrohaTransactionDefinitionV1Instruction { - if o == nil { - var ret IrohaTransactionDefinitionV1Instruction - return ret - } - - return o.Instruction -} - -// GetInstructionOk returns a tuple with the Instruction field value -// and a boolean to check if the value has been set. -func (o *IrohaTransactionDefinitionV1) GetInstructionOk() (*IrohaTransactionDefinitionV1Instruction, bool) { - if o == nil { - return nil, false - } - return &o.Instruction, true -} - -// SetInstruction sets field value -func (o *IrohaTransactionDefinitionV1) SetInstruction(v IrohaTransactionDefinitionV1Instruction) { - o.Instruction = v -} - -// GetParams returns the Params field value if set, zero value otherwise. -func (o *IrohaTransactionDefinitionV1) GetParams() IrohaTransactionParametersV1 { - if o == nil || IsNil(o.Params) { - var ret IrohaTransactionParametersV1 - return ret - } - return *o.Params -} - -// GetParamsOk returns a tuple with the Params field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IrohaTransactionDefinitionV1) GetParamsOk() (*IrohaTransactionParametersV1, bool) { - if o == nil || IsNil(o.Params) { - return nil, false - } - return o.Params, true -} - -// HasParams returns a boolean if a field has been set. -func (o *IrohaTransactionDefinitionV1) HasParams() bool { - if o != nil && !IsNil(o.Params) { - return true - } - - return false -} - -// SetParams gets a reference to the given IrohaTransactionParametersV1 and assigns it to the Params field. -func (o *IrohaTransactionDefinitionV1) SetParams(v IrohaTransactionParametersV1) { - o.Params = &v -} - -func (o IrohaTransactionDefinitionV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o IrohaTransactionDefinitionV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["instruction"] = o.Instruction - if !IsNil(o.Params) { - toSerialize["params"] = o.Params - } - return toSerialize, nil -} - -type NullableIrohaTransactionDefinitionV1 struct { - value *IrohaTransactionDefinitionV1 - isSet bool -} - -func (v NullableIrohaTransactionDefinitionV1) Get() *IrohaTransactionDefinitionV1 { - return v.value -} - -func (v *NullableIrohaTransactionDefinitionV1) Set(val *IrohaTransactionDefinitionV1) { - v.value = val - v.isSet = true -} - -func (v NullableIrohaTransactionDefinitionV1) IsSet() bool { - return v.isSet -} - -func (v *NullableIrohaTransactionDefinitionV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIrohaTransactionDefinitionV1(val *IrohaTransactionDefinitionV1) *NullableIrohaTransactionDefinitionV1 { - return &NullableIrohaTransactionDefinitionV1{value: val, isSet: true} -} - -func (v NullableIrohaTransactionDefinitionV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIrohaTransactionDefinitionV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_transaction_definition_v1_instruction.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_transaction_definition_v1_instruction.go deleted file mode 100644 index 6ef59b2692..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_transaction_definition_v1_instruction.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" - "fmt" -) - -// IrohaTransactionDefinitionV1Instruction - struct for IrohaTransactionDefinitionV1Instruction -type IrohaTransactionDefinitionV1Instruction struct { - IrohaInstructionRequestV1 *IrohaInstructionRequestV1 - ArrayOfIrohaInstructionRequestV1 *[]IrohaInstructionRequestV1 -} - -// IrohaInstructionRequestV1AsIrohaTransactionDefinitionV1Instruction is a convenience function that returns IrohaInstructionRequestV1 wrapped in IrohaTransactionDefinitionV1Instruction -func IrohaInstructionRequestV1AsIrohaTransactionDefinitionV1Instruction(v *IrohaInstructionRequestV1) IrohaTransactionDefinitionV1Instruction { - return IrohaTransactionDefinitionV1Instruction{ - IrohaInstructionRequestV1: v, - } -} - -// []IrohaInstructionRequestV1AsIrohaTransactionDefinitionV1Instruction is a convenience function that returns []IrohaInstructionRequestV1 wrapped in IrohaTransactionDefinitionV1Instruction -func ArrayOfIrohaInstructionRequestV1AsIrohaTransactionDefinitionV1Instruction(v *[]IrohaInstructionRequestV1) IrohaTransactionDefinitionV1Instruction { - return IrohaTransactionDefinitionV1Instruction{ - ArrayOfIrohaInstructionRequestV1: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *IrohaTransactionDefinitionV1Instruction) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into IrohaInstructionRequestV1 - err = newStrictDecoder(data).Decode(&dst.IrohaInstructionRequestV1) - if err == nil { - jsonIrohaInstructionRequestV1, _ := json.Marshal(dst.IrohaInstructionRequestV1) - if string(jsonIrohaInstructionRequestV1) == "{}" { // empty struct - dst.IrohaInstructionRequestV1 = nil - } else { - match++ - } - } else { - dst.IrohaInstructionRequestV1 = nil - } - - // try to unmarshal data into ArrayOfIrohaInstructionRequestV1 - err = newStrictDecoder(data).Decode(&dst.ArrayOfIrohaInstructionRequestV1) - if err == nil { - jsonArrayOfIrohaInstructionRequestV1, _ := json.Marshal(dst.ArrayOfIrohaInstructionRequestV1) - if string(jsonArrayOfIrohaInstructionRequestV1) == "{}" { // empty struct - dst.ArrayOfIrohaInstructionRequestV1 = nil - } else { - match++ - } - } else { - dst.ArrayOfIrohaInstructionRequestV1 = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.IrohaInstructionRequestV1 = nil - dst.ArrayOfIrohaInstructionRequestV1 = nil - - return fmt.Errorf("data matches more than one schema in oneOf(IrohaTransactionDefinitionV1Instruction)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(IrohaTransactionDefinitionV1Instruction)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src IrohaTransactionDefinitionV1Instruction) MarshalJSON() ([]byte, error) { - if src.IrohaInstructionRequestV1 != nil { - return json.Marshal(&src.IrohaInstructionRequestV1) - } - - if src.ArrayOfIrohaInstructionRequestV1 != nil { - return json.Marshal(&src.ArrayOfIrohaInstructionRequestV1) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *IrohaTransactionDefinitionV1Instruction) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.IrohaInstructionRequestV1 != nil { - return obj.IrohaInstructionRequestV1 - } - - if obj.ArrayOfIrohaInstructionRequestV1 != nil { - return obj.ArrayOfIrohaInstructionRequestV1 - } - - // all schemas are nil - return nil -} - -type NullableIrohaTransactionDefinitionV1Instruction struct { - value *IrohaTransactionDefinitionV1Instruction - isSet bool -} - -func (v NullableIrohaTransactionDefinitionV1Instruction) Get() *IrohaTransactionDefinitionV1Instruction { - return v.value -} - -func (v *NullableIrohaTransactionDefinitionV1Instruction) Set(val *IrohaTransactionDefinitionV1Instruction) { - v.value = val - v.isSet = true -} - -func (v NullableIrohaTransactionDefinitionV1Instruction) IsSet() bool { - return v.isSet -} - -func (v *NullableIrohaTransactionDefinitionV1Instruction) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIrohaTransactionDefinitionV1Instruction(val *IrohaTransactionDefinitionV1Instruction) *NullableIrohaTransactionDefinitionV1Instruction { - return &NullableIrohaTransactionDefinitionV1Instruction{value: val, isSet: true} -} - -func (v NullableIrohaTransactionDefinitionV1Instruction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIrohaTransactionDefinitionV1Instruction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_transaction_parameters_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_transaction_parameters_v1.go deleted file mode 100644 index 351389397a..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_iroha_transaction_parameters_v1.go +++ /dev/null @@ -1,228 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the IrohaTransactionParametersV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &IrohaTransactionParametersV1{} - -// IrohaTransactionParametersV1 Iroha V2 transaction payload parameters -type IrohaTransactionParametersV1 struct { - // BigInt time to live. - Ttl *string `json:"ttl,omitempty"` - // BigInt creation time - CreationTime *string `json:"creationTime,omitempty"` - // Transaction nonce - Nonce *float32 `json:"nonce,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _IrohaTransactionParametersV1 IrohaTransactionParametersV1 - -// NewIrohaTransactionParametersV1 instantiates a new IrohaTransactionParametersV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIrohaTransactionParametersV1() *IrohaTransactionParametersV1 { - this := IrohaTransactionParametersV1{} - return &this -} - -// NewIrohaTransactionParametersV1WithDefaults instantiates a new IrohaTransactionParametersV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIrohaTransactionParametersV1WithDefaults() *IrohaTransactionParametersV1 { - this := IrohaTransactionParametersV1{} - return &this -} - -// GetTtl returns the Ttl field value if set, zero value otherwise. -func (o *IrohaTransactionParametersV1) GetTtl() string { - if o == nil || IsNil(o.Ttl) { - var ret string - return ret - } - return *o.Ttl -} - -// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IrohaTransactionParametersV1) GetTtlOk() (*string, bool) { - if o == nil || IsNil(o.Ttl) { - return nil, false - } - return o.Ttl, true -} - -// HasTtl returns a boolean if a field has been set. -func (o *IrohaTransactionParametersV1) HasTtl() bool { - if o != nil && !IsNil(o.Ttl) { - return true - } - - return false -} - -// SetTtl gets a reference to the given string and assigns it to the Ttl field. -func (o *IrohaTransactionParametersV1) SetTtl(v string) { - o.Ttl = &v -} - -// GetCreationTime returns the CreationTime field value if set, zero value otherwise. -func (o *IrohaTransactionParametersV1) GetCreationTime() string { - if o == nil || IsNil(o.CreationTime) { - var ret string - return ret - } - return *o.CreationTime -} - -// GetCreationTimeOk returns a tuple with the CreationTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IrohaTransactionParametersV1) GetCreationTimeOk() (*string, bool) { - if o == nil || IsNil(o.CreationTime) { - return nil, false - } - return o.CreationTime, true -} - -// HasCreationTime returns a boolean if a field has been set. -func (o *IrohaTransactionParametersV1) HasCreationTime() bool { - if o != nil && !IsNil(o.CreationTime) { - return true - } - - return false -} - -// SetCreationTime gets a reference to the given string and assigns it to the CreationTime field. -func (o *IrohaTransactionParametersV1) SetCreationTime(v string) { - o.CreationTime = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *IrohaTransactionParametersV1) GetNonce() float32 { - if o == nil || IsNil(o.Nonce) { - var ret float32 - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IrohaTransactionParametersV1) GetNonceOk() (*float32, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *IrohaTransactionParametersV1) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given float32 and assigns it to the Nonce field. -func (o *IrohaTransactionParametersV1) SetNonce(v float32) { - o.Nonce = &v -} - -func (o IrohaTransactionParametersV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o IrohaTransactionParametersV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Ttl) { - toSerialize["ttl"] = o.Ttl - } - if !IsNil(o.CreationTime) { - toSerialize["creationTime"] = o.CreationTime - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *IrohaTransactionParametersV1) UnmarshalJSON(bytes []byte) (err error) { - varIrohaTransactionParametersV1 := _IrohaTransactionParametersV1{} - - if err = json.Unmarshal(bytes, &varIrohaTransactionParametersV1); err == nil { - *o = IrohaTransactionParametersV1(varIrohaTransactionParametersV1) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "ttl") - delete(additionalProperties, "creationTime") - delete(additionalProperties, "nonce") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableIrohaTransactionParametersV1 struct { - value *IrohaTransactionParametersV1 - isSet bool -} - -func (v NullableIrohaTransactionParametersV1) Get() *IrohaTransactionParametersV1 { - return v.value -} - -func (v *NullableIrohaTransactionParametersV1) Set(val *IrohaTransactionParametersV1) { - v.value = val - v.isSet = true -} - -func (v NullableIrohaTransactionParametersV1) IsSet() bool { - return v.isSet -} - -func (v *NullableIrohaTransactionParametersV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIrohaTransactionParametersV1(val *IrohaTransactionParametersV1) *NullableIrohaTransactionParametersV1 { - return &NullableIrohaTransactionParametersV1{value: val, isSet: true} -} - -func (v NullableIrohaTransactionParametersV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIrohaTransactionParametersV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_keychain_reference.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_keychain_reference.go deleted file mode 100644 index e27d5dec6f..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_keychain_reference.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the KeychainReference type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &KeychainReference{} - -// KeychainReference Reference to entry stored in Cactus keychain plugin. -type KeychainReference struct { - // Keychain plugin ID. - KeychainId string `json:"keychainId"` - // Key reference name. - KeychainRef string `json:"keychainRef"` -} - -// NewKeychainReference instantiates a new KeychainReference object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewKeychainReference(keychainId string, keychainRef string) *KeychainReference { - this := KeychainReference{} - this.KeychainId = keychainId - this.KeychainRef = keychainRef - return &this -} - -// NewKeychainReferenceWithDefaults instantiates a new KeychainReference object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewKeychainReferenceWithDefaults() *KeychainReference { - this := KeychainReference{} - return &this -} - -// GetKeychainId returns the KeychainId field value -func (o *KeychainReference) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *KeychainReference) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *KeychainReference) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetKeychainRef returns the KeychainRef field value -func (o *KeychainReference) GetKeychainRef() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainRef -} - -// GetKeychainRefOk returns a tuple with the KeychainRef field value -// and a boolean to check if the value has been set. -func (o *KeychainReference) GetKeychainRefOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainRef, true -} - -// SetKeychainRef sets field value -func (o *KeychainReference) SetKeychainRef(v string) { - o.KeychainRef = v -} - -func (o KeychainReference) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o KeychainReference) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["keychainId"] = o.KeychainId - toSerialize["keychainRef"] = o.KeychainRef - return toSerialize, nil -} - -type NullableKeychainReference struct { - value *KeychainReference - isSet bool -} - -func (v NullableKeychainReference) Get() *KeychainReference { - return v.value -} - -func (v *NullableKeychainReference) Set(val *KeychainReference) { - v.value = val - v.isSet = true -} - -func (v NullableKeychainReference) IsSet() bool { - return v.isSet -} - -func (v *NullableKeychainReference) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableKeychainReference(val *KeychainReference) *NullableKeychainReference { - return &NullableKeychainReference{value: val, isSet: true} -} - -func (v NullableKeychainReference) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableKeychainReference) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_query_request_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_query_request_v1.go deleted file mode 100644 index e4f0a45b33..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_query_request_v1.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the QueryRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QueryRequestV1{} - -// QueryRequestV1 Request to query endpoint. -type QueryRequestV1 struct { - Query *IrohaQueryDefinitionV1 `json:"query,omitempty"` - SignedQuery *IrohaSignedQueryDefinitionV1 `json:"signedQuery,omitempty"` - BaseConfig *Iroha2BaseConfig `json:"baseConfig,omitempty"` -} - -// NewQueryRequestV1 instantiates a new QueryRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewQueryRequestV1() *QueryRequestV1 { - this := QueryRequestV1{} - return &this -} - -// NewQueryRequestV1WithDefaults instantiates a new QueryRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewQueryRequestV1WithDefaults() *QueryRequestV1 { - this := QueryRequestV1{} - return &this -} - -// GetQuery returns the Query field value if set, zero value otherwise. -func (o *QueryRequestV1) GetQuery() IrohaQueryDefinitionV1 { - if o == nil || IsNil(o.Query) { - var ret IrohaQueryDefinitionV1 - return ret - } - return *o.Query -} - -// GetQueryOk returns a tuple with the Query field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *QueryRequestV1) GetQueryOk() (*IrohaQueryDefinitionV1, bool) { - if o == nil || IsNil(o.Query) { - return nil, false - } - return o.Query, true -} - -// HasQuery returns a boolean if a field has been set. -func (o *QueryRequestV1) HasQuery() bool { - if o != nil && !IsNil(o.Query) { - return true - } - - return false -} - -// SetQuery gets a reference to the given IrohaQueryDefinitionV1 and assigns it to the Query field. -func (o *QueryRequestV1) SetQuery(v IrohaQueryDefinitionV1) { - o.Query = &v -} - -// GetSignedQuery returns the SignedQuery field value if set, zero value otherwise. -func (o *QueryRequestV1) GetSignedQuery() IrohaSignedQueryDefinitionV1 { - if o == nil || IsNil(o.SignedQuery) { - var ret IrohaSignedQueryDefinitionV1 - return ret - } - return *o.SignedQuery -} - -// GetSignedQueryOk returns a tuple with the SignedQuery field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *QueryRequestV1) GetSignedQueryOk() (*IrohaSignedQueryDefinitionV1, bool) { - if o == nil || IsNil(o.SignedQuery) { - return nil, false - } - return o.SignedQuery, true -} - -// HasSignedQuery returns a boolean if a field has been set. -func (o *QueryRequestV1) HasSignedQuery() bool { - if o != nil && !IsNil(o.SignedQuery) { - return true - } - - return false -} - -// SetSignedQuery gets a reference to the given IrohaSignedQueryDefinitionV1 and assigns it to the SignedQuery field. -func (o *QueryRequestV1) SetSignedQuery(v IrohaSignedQueryDefinitionV1) { - o.SignedQuery = &v -} - -// GetBaseConfig returns the BaseConfig field value if set, zero value otherwise. -func (o *QueryRequestV1) GetBaseConfig() Iroha2BaseConfig { - if o == nil || IsNil(o.BaseConfig) { - var ret Iroha2BaseConfig - return ret - } - return *o.BaseConfig -} - -// GetBaseConfigOk returns a tuple with the BaseConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *QueryRequestV1) GetBaseConfigOk() (*Iroha2BaseConfig, bool) { - if o == nil || IsNil(o.BaseConfig) { - return nil, false - } - return o.BaseConfig, true -} - -// HasBaseConfig returns a boolean if a field has been set. -func (o *QueryRequestV1) HasBaseConfig() bool { - if o != nil && !IsNil(o.BaseConfig) { - return true - } - - return false -} - -// SetBaseConfig gets a reference to the given Iroha2BaseConfig and assigns it to the BaseConfig field. -func (o *QueryRequestV1) SetBaseConfig(v Iroha2BaseConfig) { - o.BaseConfig = &v -} - -func (o QueryRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o QueryRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Query) { - toSerialize["query"] = o.Query - } - if !IsNil(o.SignedQuery) { - toSerialize["signedQuery"] = o.SignedQuery - } - if !IsNil(o.BaseConfig) { - toSerialize["baseConfig"] = o.BaseConfig - } - return toSerialize, nil -} - -type NullableQueryRequestV1 struct { - value *QueryRequestV1 - isSet bool -} - -func (v NullableQueryRequestV1) Get() *QueryRequestV1 { - return v.value -} - -func (v *NullableQueryRequestV1) Set(val *QueryRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableQueryRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableQueryRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableQueryRequestV1(val *QueryRequestV1) *NullableQueryRequestV1 { - return &NullableQueryRequestV1{value: val, isSet: true} -} - -func (v NullableQueryRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableQueryRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_query_response_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_query_response_v1.go deleted file mode 100644 index 777eb86b30..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_query_response_v1.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the QueryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QueryResponseV1{} - -// QueryResponseV1 Response with the query results. -type QueryResponseV1 struct { - // Query response data that varies between different queries. - Response interface{} `json:"response"` -} - -// NewQueryResponseV1 instantiates a new QueryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewQueryResponseV1(response interface{}) *QueryResponseV1 { - this := QueryResponseV1{} - this.Response = response - return &this -} - -// NewQueryResponseV1WithDefaults instantiates a new QueryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewQueryResponseV1WithDefaults() *QueryResponseV1 { - this := QueryResponseV1{} - return &this -} - -// GetResponse returns the Response field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *QueryResponseV1) GetResponse() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.Response -} - -// GetResponseOk returns a tuple with the Response field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *QueryResponseV1) GetResponseOk() (*interface{}, bool) { - if o == nil || IsNil(o.Response) { - return nil, false - } - return &o.Response, true -} - -// SetResponse sets field value -func (o *QueryResponseV1) SetResponse(v interface{}) { - o.Response = v -} - -func (o QueryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o QueryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Response != nil { - toSerialize["response"] = o.Response - } - return toSerialize, nil -} - -type NullableQueryResponseV1 struct { - value *QueryResponseV1 - isSet bool -} - -func (v NullableQueryResponseV1) Get() *QueryResponseV1 { - return v.value -} - -func (v *NullableQueryResponseV1) Set(val *QueryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableQueryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableQueryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableQueryResponseV1(val *QueryResponseV1) *NullableQueryResponseV1 { - return &NullableQueryResponseV1{value: val, isSet: true} -} - -func (v NullableQueryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableQueryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_transact_request_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_transact_request_v1.go deleted file mode 100644 index c9c248765c..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_transact_request_v1.go +++ /dev/null @@ -1,240 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the TransactRequestV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactRequestV1{} - -// TransactRequestV1 Request to transact endpoint. -type TransactRequestV1 struct { - // Signed transaction binary data received from generate-transaction endpoint. - SignedTransaction *string `json:"signedTransaction,omitempty"` - Transaction *IrohaTransactionDefinitionV1 `json:"transaction,omitempty"` - // Wait unitl transaction is sent and return the final status (committed / rejected) - WaitForCommit *bool `json:"waitForCommit,omitempty"` - BaseConfig *Iroha2BaseConfig `json:"baseConfig,omitempty"` -} - -// NewTransactRequestV1 instantiates a new TransactRequestV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactRequestV1() *TransactRequestV1 { - this := TransactRequestV1{} - var waitForCommit bool = false - this.WaitForCommit = &waitForCommit - return &this -} - -// NewTransactRequestV1WithDefaults instantiates a new TransactRequestV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactRequestV1WithDefaults() *TransactRequestV1 { - this := TransactRequestV1{} - var waitForCommit bool = false - this.WaitForCommit = &waitForCommit - return &this -} - -// GetSignedTransaction returns the SignedTransaction field value if set, zero value otherwise. -func (o *TransactRequestV1) GetSignedTransaction() string { - if o == nil || IsNil(o.SignedTransaction) { - var ret string - return ret - } - return *o.SignedTransaction -} - -// GetSignedTransactionOk returns a tuple with the SignedTransaction field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestV1) GetSignedTransactionOk() (*string, bool) { - if o == nil || IsNil(o.SignedTransaction) { - return nil, false - } - return o.SignedTransaction, true -} - -// HasSignedTransaction returns a boolean if a field has been set. -func (o *TransactRequestV1) HasSignedTransaction() bool { - if o != nil && !IsNil(o.SignedTransaction) { - return true - } - - return false -} - -// SetSignedTransaction gets a reference to the given string and assigns it to the SignedTransaction field. -func (o *TransactRequestV1) SetSignedTransaction(v string) { - o.SignedTransaction = &v -} - -// GetTransaction returns the Transaction field value if set, zero value otherwise. -func (o *TransactRequestV1) GetTransaction() IrohaTransactionDefinitionV1 { - if o == nil || IsNil(o.Transaction) { - var ret IrohaTransactionDefinitionV1 - return ret - } - return *o.Transaction -} - -// GetTransactionOk returns a tuple with the Transaction field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestV1) GetTransactionOk() (*IrohaTransactionDefinitionV1, bool) { - if o == nil || IsNil(o.Transaction) { - return nil, false - } - return o.Transaction, true -} - -// HasTransaction returns a boolean if a field has been set. -func (o *TransactRequestV1) HasTransaction() bool { - if o != nil && !IsNil(o.Transaction) { - return true - } - - return false -} - -// SetTransaction gets a reference to the given IrohaTransactionDefinitionV1 and assigns it to the Transaction field. -func (o *TransactRequestV1) SetTransaction(v IrohaTransactionDefinitionV1) { - o.Transaction = &v -} - -// GetWaitForCommit returns the WaitForCommit field value if set, zero value otherwise. -func (o *TransactRequestV1) GetWaitForCommit() bool { - if o == nil || IsNil(o.WaitForCommit) { - var ret bool - return ret - } - return *o.WaitForCommit -} - -// GetWaitForCommitOk returns a tuple with the WaitForCommit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestV1) GetWaitForCommitOk() (*bool, bool) { - if o == nil || IsNil(o.WaitForCommit) { - return nil, false - } - return o.WaitForCommit, true -} - -// HasWaitForCommit returns a boolean if a field has been set. -func (o *TransactRequestV1) HasWaitForCommit() bool { - if o != nil && !IsNil(o.WaitForCommit) { - return true - } - - return false -} - -// SetWaitForCommit gets a reference to the given bool and assigns it to the WaitForCommit field. -func (o *TransactRequestV1) SetWaitForCommit(v bool) { - o.WaitForCommit = &v -} - -// GetBaseConfig returns the BaseConfig field value if set, zero value otherwise. -func (o *TransactRequestV1) GetBaseConfig() Iroha2BaseConfig { - if o == nil || IsNil(o.BaseConfig) { - var ret Iroha2BaseConfig - return ret - } - return *o.BaseConfig -} - -// GetBaseConfigOk returns a tuple with the BaseConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestV1) GetBaseConfigOk() (*Iroha2BaseConfig, bool) { - if o == nil || IsNil(o.BaseConfig) { - return nil, false - } - return o.BaseConfig, true -} - -// HasBaseConfig returns a boolean if a field has been set. -func (o *TransactRequestV1) HasBaseConfig() bool { - if o != nil && !IsNil(o.BaseConfig) { - return true - } - - return false -} - -// SetBaseConfig gets a reference to the given Iroha2BaseConfig and assigns it to the BaseConfig field. -func (o *TransactRequestV1) SetBaseConfig(v Iroha2BaseConfig) { - o.BaseConfig = &v -} - -func (o TransactRequestV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactRequestV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.SignedTransaction) { - toSerialize["signedTransaction"] = o.SignedTransaction - } - if !IsNil(o.Transaction) { - toSerialize["transaction"] = o.Transaction - } - if !IsNil(o.WaitForCommit) { - toSerialize["waitForCommit"] = o.WaitForCommit - } - if !IsNil(o.BaseConfig) { - toSerialize["baseConfig"] = o.BaseConfig - } - return toSerialize, nil -} - -type NullableTransactRequestV1 struct { - value *TransactRequestV1 - isSet bool -} - -func (v NullableTransactRequestV1) Get() *TransactRequestV1 { - return v.value -} - -func (v *NullableTransactRequestV1) Set(val *TransactRequestV1) { - v.value = val - v.isSet = true -} - -func (v NullableTransactRequestV1) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactRequestV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactRequestV1(val *TransactRequestV1) *NullableTransactRequestV1 { - return &NullableTransactRequestV1{value: val, isSet: true} -} - -func (v NullableTransactRequestV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactRequestV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_transact_response_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_transact_response_v1.go deleted file mode 100644 index 87a1a9d0af..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_transact_response_v1.go +++ /dev/null @@ -1,182 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the TransactResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactResponseV1{} - -// TransactResponseV1 Response from transaction endpoint with operation status. -type TransactResponseV1 struct { - // Hexadecimal hash of the transaction sent to the ledger. - Hash string `json:"hash"` - Status TransactionStatusV1 `json:"status"` - // When waitForCommit was suplied and the transaction was rejected, contains the reason of the rejection. - RejectReason *string `json:"rejectReason,omitempty"` -} - -// NewTransactResponseV1 instantiates a new TransactResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactResponseV1(hash string, status TransactionStatusV1) *TransactResponseV1 { - this := TransactResponseV1{} - this.Hash = hash - this.Status = status - return &this -} - -// NewTransactResponseV1WithDefaults instantiates a new TransactResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactResponseV1WithDefaults() *TransactResponseV1 { - this := TransactResponseV1{} - return &this -} - -// GetHash returns the Hash field value -func (o *TransactResponseV1) GetHash() string { - if o == nil { - var ret string - return ret - } - - return o.Hash -} - -// GetHashOk returns a tuple with the Hash field value -// and a boolean to check if the value has been set. -func (o *TransactResponseV1) GetHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Hash, true -} - -// SetHash sets field value -func (o *TransactResponseV1) SetHash(v string) { - o.Hash = v -} - -// GetStatus returns the Status field value -func (o *TransactResponseV1) GetStatus() TransactionStatusV1 { - if o == nil { - var ret TransactionStatusV1 - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *TransactResponseV1) GetStatusOk() (*TransactionStatusV1, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *TransactResponseV1) SetStatus(v TransactionStatusV1) { - o.Status = v -} - -// GetRejectReason returns the RejectReason field value if set, zero value otherwise. -func (o *TransactResponseV1) GetRejectReason() string { - if o == nil || IsNil(o.RejectReason) { - var ret string - return ret - } - return *o.RejectReason -} - -// GetRejectReasonOk returns a tuple with the RejectReason field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactResponseV1) GetRejectReasonOk() (*string, bool) { - if o == nil || IsNil(o.RejectReason) { - return nil, false - } - return o.RejectReason, true -} - -// HasRejectReason returns a boolean if a field has been set. -func (o *TransactResponseV1) HasRejectReason() bool { - if o != nil && !IsNil(o.RejectReason) { - return true - } - - return false -} - -// SetRejectReason gets a reference to the given string and assigns it to the RejectReason field. -func (o *TransactResponseV1) SetRejectReason(v string) { - o.RejectReason = &v -} - -func (o TransactResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["hash"] = o.Hash - toSerialize["status"] = o.Status - if !IsNil(o.RejectReason) { - toSerialize["rejectReason"] = o.RejectReason - } - return toSerialize, nil -} - -type NullableTransactResponseV1 struct { - value *TransactResponseV1 - isSet bool -} - -func (v NullableTransactResponseV1) Get() *TransactResponseV1 { - return v.value -} - -func (v *NullableTransactResponseV1) Set(val *TransactResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableTransactResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactResponseV1(val *TransactResponseV1) *NullableTransactResponseV1 { - return &NullableTransactResponseV1{value: val, isSet: true} -} - -func (v NullableTransactResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_transaction_status_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_transaction_status_v1.go deleted file mode 100644 index 880e04650b..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_transaction_status_v1.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" - "fmt" -) - -// TransactionStatusV1 Status of Iroha V2 transaction. -type TransactionStatusV1 string - -// List of TransactionStatusV1 -const ( - Submitted TransactionStatusV1 = "submitted" - Committed TransactionStatusV1 = "committed" - Rejected TransactionStatusV1 = "rejected" -) - -// All allowed values of TransactionStatusV1 enum -var AllowedTransactionStatusV1EnumValues = []TransactionStatusV1{ - "submitted", - "committed", - "rejected", -} - -func (v *TransactionStatusV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := TransactionStatusV1(value) - for _, existing := range AllowedTransactionStatusV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid TransactionStatusV1", value) -} - -// NewTransactionStatusV1FromValue returns a pointer to a valid TransactionStatusV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewTransactionStatusV1FromValue(v string) (*TransactionStatusV1, error) { - ev := TransactionStatusV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for TransactionStatusV1: valid values are %v", v, AllowedTransactionStatusV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v TransactionStatusV1) IsValid() bool { - for _, existing := range AllowedTransactionStatusV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TransactionStatusV1 value -func (v TransactionStatusV1) Ptr() *TransactionStatusV1 { - return &v -} - -type NullableTransactionStatusV1 struct { - value *TransactionStatusV1 - isSet bool -} - -func (v NullableTransactionStatusV1) Get() *TransactionStatusV1 { - return v.value -} - -func (v *NullableTransactionStatusV1) Set(val *TransactionStatusV1) { - v.value = val - v.isSet = true -} - -func (v NullableTransactionStatusV1) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactionStatusV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactionStatusV1(val *TransactionStatusV1) *NullableTransactionStatusV1 { - return &NullableTransactionStatusV1{value: val, isSet: true} -} - -func (v NullableTransactionStatusV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactionStatusV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_binary_response_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_binary_response_v1.go deleted file mode 100644 index 962e7aaabf..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_binary_response_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the WatchBlocksBinaryResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksBinaryResponseV1{} - -// WatchBlocksBinaryResponseV1 Binary encoded response of block data. -type WatchBlocksBinaryResponseV1 struct { - BinaryBlock string `json:"binaryBlock"` -} - -// NewWatchBlocksBinaryResponseV1 instantiates a new WatchBlocksBinaryResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksBinaryResponseV1(binaryBlock string) *WatchBlocksBinaryResponseV1 { - this := WatchBlocksBinaryResponseV1{} - this.BinaryBlock = binaryBlock - return &this -} - -// NewWatchBlocksBinaryResponseV1WithDefaults instantiates a new WatchBlocksBinaryResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksBinaryResponseV1WithDefaults() *WatchBlocksBinaryResponseV1 { - this := WatchBlocksBinaryResponseV1{} - return &this -} - -// GetBinaryBlock returns the BinaryBlock field value -func (o *WatchBlocksBinaryResponseV1) GetBinaryBlock() string { - if o == nil { - var ret string - return ret - } - - return o.BinaryBlock -} - -// GetBinaryBlockOk returns a tuple with the BinaryBlock field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksBinaryResponseV1) GetBinaryBlockOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BinaryBlock, true -} - -// SetBinaryBlock sets field value -func (o *WatchBlocksBinaryResponseV1) SetBinaryBlock(v string) { - o.BinaryBlock = v -} - -func (o WatchBlocksBinaryResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksBinaryResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["binaryBlock"] = o.BinaryBlock - return toSerialize, nil -} - -type NullableWatchBlocksBinaryResponseV1 struct { - value *WatchBlocksBinaryResponseV1 - isSet bool -} - -func (v NullableWatchBlocksBinaryResponseV1) Get() *WatchBlocksBinaryResponseV1 { - return v.value -} - -func (v *NullableWatchBlocksBinaryResponseV1) Set(val *WatchBlocksBinaryResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksBinaryResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksBinaryResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksBinaryResponseV1(val *WatchBlocksBinaryResponseV1) *NullableWatchBlocksBinaryResponseV1 { - return &NullableWatchBlocksBinaryResponseV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksBinaryResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksBinaryResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_options_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_options_v1.go deleted file mode 100644 index 2ba634ed76..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_options_v1.go +++ /dev/null @@ -1,199 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the WatchBlocksOptionsV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksOptionsV1{} - -// WatchBlocksOptionsV1 Options passed when subscribing to block monitoring. -type WatchBlocksOptionsV1 struct { - Type *BlockTypeV1 `json:"type,omitempty"` - // Number of block to start monitoring from. - StartBlock *string `json:"startBlock,omitempty"` - BaseConfig *Iroha2BaseConfig `json:"baseConfig,omitempty"` -} - -// NewWatchBlocksOptionsV1 instantiates a new WatchBlocksOptionsV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksOptionsV1() *WatchBlocksOptionsV1 { - this := WatchBlocksOptionsV1{} - return &this -} - -// NewWatchBlocksOptionsV1WithDefaults instantiates a new WatchBlocksOptionsV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksOptionsV1WithDefaults() *WatchBlocksOptionsV1 { - this := WatchBlocksOptionsV1{} - return &this -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *WatchBlocksOptionsV1) GetType() BlockTypeV1 { - if o == nil || IsNil(o.Type) { - var ret BlockTypeV1 - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksOptionsV1) GetTypeOk() (*BlockTypeV1, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *WatchBlocksOptionsV1) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given BlockTypeV1 and assigns it to the Type field. -func (o *WatchBlocksOptionsV1) SetType(v BlockTypeV1) { - o.Type = &v -} - -// GetStartBlock returns the StartBlock field value if set, zero value otherwise. -func (o *WatchBlocksOptionsV1) GetStartBlock() string { - if o == nil || IsNil(o.StartBlock) { - var ret string - return ret - } - return *o.StartBlock -} - -// GetStartBlockOk returns a tuple with the StartBlock field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksOptionsV1) GetStartBlockOk() (*string, bool) { - if o == nil || IsNil(o.StartBlock) { - return nil, false - } - return o.StartBlock, true -} - -// HasStartBlock returns a boolean if a field has been set. -func (o *WatchBlocksOptionsV1) HasStartBlock() bool { - if o != nil && !IsNil(o.StartBlock) { - return true - } - - return false -} - -// SetStartBlock gets a reference to the given string and assigns it to the StartBlock field. -func (o *WatchBlocksOptionsV1) SetStartBlock(v string) { - o.StartBlock = &v -} - -// GetBaseConfig returns the BaseConfig field value if set, zero value otherwise. -func (o *WatchBlocksOptionsV1) GetBaseConfig() Iroha2BaseConfig { - if o == nil || IsNil(o.BaseConfig) { - var ret Iroha2BaseConfig - return ret - } - return *o.BaseConfig -} - -// GetBaseConfigOk returns a tuple with the BaseConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksOptionsV1) GetBaseConfigOk() (*Iroha2BaseConfig, bool) { - if o == nil || IsNil(o.BaseConfig) { - return nil, false - } - return o.BaseConfig, true -} - -// HasBaseConfig returns a boolean if a field has been set. -func (o *WatchBlocksOptionsV1) HasBaseConfig() bool { - if o != nil && !IsNil(o.BaseConfig) { - return true - } - - return false -} - -// SetBaseConfig gets a reference to the given Iroha2BaseConfig and assigns it to the BaseConfig field. -func (o *WatchBlocksOptionsV1) SetBaseConfig(v Iroha2BaseConfig) { - o.BaseConfig = &v -} - -func (o WatchBlocksOptionsV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksOptionsV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !IsNil(o.StartBlock) { - toSerialize["startBlock"] = o.StartBlock - } - if !IsNil(o.BaseConfig) { - toSerialize["baseConfig"] = o.BaseConfig - } - return toSerialize, nil -} - -type NullableWatchBlocksOptionsV1 struct { - value *WatchBlocksOptionsV1 - isSet bool -} - -func (v NullableWatchBlocksOptionsV1) Get() *WatchBlocksOptionsV1 { - return v.value -} - -func (v *NullableWatchBlocksOptionsV1) Set(val *WatchBlocksOptionsV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksOptionsV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksOptionsV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksOptionsV1(val *WatchBlocksOptionsV1) *NullableWatchBlocksOptionsV1 { - return &NullableWatchBlocksOptionsV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksOptionsV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksOptionsV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_raw_response_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_raw_response_v1.go deleted file mode 100644 index f479bc283a..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_raw_response_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" -) - -// checks if the WatchBlocksRawResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksRawResponseV1{} - -// WatchBlocksRawResponseV1 Default JSON-encoded string full block data. -type WatchBlocksRawResponseV1 struct { - BlockData string `json:"blockData"` -} - -// NewWatchBlocksRawResponseV1 instantiates a new WatchBlocksRawResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksRawResponseV1(blockData string) *WatchBlocksRawResponseV1 { - this := WatchBlocksRawResponseV1{} - this.BlockData = blockData - return &this -} - -// NewWatchBlocksRawResponseV1WithDefaults instantiates a new WatchBlocksRawResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksRawResponseV1WithDefaults() *WatchBlocksRawResponseV1 { - this := WatchBlocksRawResponseV1{} - return &this -} - -// GetBlockData returns the BlockData field value -func (o *WatchBlocksRawResponseV1) GetBlockData() string { - if o == nil { - var ret string - return ret - } - - return o.BlockData -} - -// GetBlockDataOk returns a tuple with the BlockData field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksRawResponseV1) GetBlockDataOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockData, true -} - -// SetBlockData sets field value -func (o *WatchBlocksRawResponseV1) SetBlockData(v string) { - o.BlockData = v -} - -func (o WatchBlocksRawResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksRawResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["blockData"] = o.BlockData - return toSerialize, nil -} - -type NullableWatchBlocksRawResponseV1 struct { - value *WatchBlocksRawResponseV1 - isSet bool -} - -func (v NullableWatchBlocksRawResponseV1) Get() *WatchBlocksRawResponseV1 { - return v.value -} - -func (v *NullableWatchBlocksRawResponseV1) Set(val *WatchBlocksRawResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksRawResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksRawResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksRawResponseV1(val *WatchBlocksRawResponseV1) *NullableWatchBlocksRawResponseV1 { - return &NullableWatchBlocksRawResponseV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksRawResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksRawResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_response_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_response_v1.go deleted file mode 100644 index 3a02d2925e..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_response_v1.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksResponseV1 - struct for WatchBlocksResponseV1 -type WatchBlocksResponseV1 struct { - ErrorExceptionResponseV1 *ErrorExceptionResponseV1 - WatchBlocksBinaryResponseV1 *WatchBlocksBinaryResponseV1 - WatchBlocksRawResponseV1 *WatchBlocksRawResponseV1 -} - -// ErrorExceptionResponseV1AsWatchBlocksResponseV1 is a convenience function that returns ErrorExceptionResponseV1 wrapped in WatchBlocksResponseV1 -func ErrorExceptionResponseV1AsWatchBlocksResponseV1(v *ErrorExceptionResponseV1) WatchBlocksResponseV1 { - return WatchBlocksResponseV1{ - ErrorExceptionResponseV1: v, - } -} - -// WatchBlocksBinaryResponseV1AsWatchBlocksResponseV1 is a convenience function that returns WatchBlocksBinaryResponseV1 wrapped in WatchBlocksResponseV1 -func WatchBlocksBinaryResponseV1AsWatchBlocksResponseV1(v *WatchBlocksBinaryResponseV1) WatchBlocksResponseV1 { - return WatchBlocksResponseV1{ - WatchBlocksBinaryResponseV1: v, - } -} - -// WatchBlocksRawResponseV1AsWatchBlocksResponseV1 is a convenience function that returns WatchBlocksRawResponseV1 wrapped in WatchBlocksResponseV1 -func WatchBlocksRawResponseV1AsWatchBlocksResponseV1(v *WatchBlocksRawResponseV1) WatchBlocksResponseV1 { - return WatchBlocksResponseV1{ - WatchBlocksRawResponseV1: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *WatchBlocksResponseV1) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into ErrorExceptionResponseV1 - err = newStrictDecoder(data).Decode(&dst.ErrorExceptionResponseV1) - if err == nil { - jsonErrorExceptionResponseV1, _ := json.Marshal(dst.ErrorExceptionResponseV1) - if string(jsonErrorExceptionResponseV1) == "{}" { // empty struct - dst.ErrorExceptionResponseV1 = nil - } else { - match++ - } - } else { - dst.ErrorExceptionResponseV1 = nil - } - - // try to unmarshal data into WatchBlocksBinaryResponseV1 - err = newStrictDecoder(data).Decode(&dst.WatchBlocksBinaryResponseV1) - if err == nil { - jsonWatchBlocksBinaryResponseV1, _ := json.Marshal(dst.WatchBlocksBinaryResponseV1) - if string(jsonWatchBlocksBinaryResponseV1) == "{}" { // empty struct - dst.WatchBlocksBinaryResponseV1 = nil - } else { - match++ - } - } else { - dst.WatchBlocksBinaryResponseV1 = nil - } - - // try to unmarshal data into WatchBlocksRawResponseV1 - err = newStrictDecoder(data).Decode(&dst.WatchBlocksRawResponseV1) - if err == nil { - jsonWatchBlocksRawResponseV1, _ := json.Marshal(dst.WatchBlocksRawResponseV1) - if string(jsonWatchBlocksRawResponseV1) == "{}" { // empty struct - dst.WatchBlocksRawResponseV1 = nil - } else { - match++ - } - } else { - dst.WatchBlocksRawResponseV1 = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ErrorExceptionResponseV1 = nil - dst.WatchBlocksBinaryResponseV1 = nil - dst.WatchBlocksRawResponseV1 = nil - - return fmt.Errorf("data matches more than one schema in oneOf(WatchBlocksResponseV1)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(WatchBlocksResponseV1)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src WatchBlocksResponseV1) MarshalJSON() ([]byte, error) { - if src.ErrorExceptionResponseV1 != nil { - return json.Marshal(&src.ErrorExceptionResponseV1) - } - - if src.WatchBlocksBinaryResponseV1 != nil { - return json.Marshal(&src.WatchBlocksBinaryResponseV1) - } - - if src.WatchBlocksRawResponseV1 != nil { - return json.Marshal(&src.WatchBlocksRawResponseV1) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *WatchBlocksResponseV1) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.ErrorExceptionResponseV1 != nil { - return obj.ErrorExceptionResponseV1 - } - - if obj.WatchBlocksBinaryResponseV1 != nil { - return obj.WatchBlocksBinaryResponseV1 - } - - if obj.WatchBlocksRawResponseV1 != nil { - return obj.WatchBlocksRawResponseV1 - } - - // all schemas are nil - return nil -} - -type NullableWatchBlocksResponseV1 struct { - value *WatchBlocksResponseV1 - isSet bool -} - -func (v NullableWatchBlocksResponseV1) Get() *WatchBlocksResponseV1 { - return v.value -} - -func (v *NullableWatchBlocksResponseV1) Set(val *WatchBlocksResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksResponseV1(val *WatchBlocksResponseV1) *NullableWatchBlocksResponseV1 { - return &NullableWatchBlocksResponseV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go deleted file mode 100644 index f91f6d7144..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksV1 Websocket requests for monitoring new blocks. -type WatchBlocksV1 string - -// List of WatchBlocksV1 -const ( - Subscribe WatchBlocksV1 = "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Subscribe" - Next WatchBlocksV1 = "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Next" - Unsubscribe WatchBlocksV1 = "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Unsubscribe" - Error WatchBlocksV1 = "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Error" - Complete WatchBlocksV1 = "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Complete" -) - -// All allowed values of WatchBlocksV1 enum -var AllowedWatchBlocksV1EnumValues = []WatchBlocksV1{ - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Subscribe", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Next", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Error", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Complete", -} - -func (v *WatchBlocksV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := WatchBlocksV1(value) - for _, existing := range AllowedWatchBlocksV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WatchBlocksV1", value) -} - -// NewWatchBlocksV1FromValue returns a pointer to a valid WatchBlocksV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWatchBlocksV1FromValue(v string) (*WatchBlocksV1, error) { - ev := WatchBlocksV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WatchBlocksV1: valid values are %v", v, AllowedWatchBlocksV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v WatchBlocksV1) IsValid() bool { - for _, existing := range AllowedWatchBlocksV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WatchBlocksV1 value -func (v WatchBlocksV1) Ptr() *WatchBlocksV1 { - return &v -} - -type NullableWatchBlocksV1 struct { - value *WatchBlocksV1 - isSet bool -} - -func (v NullableWatchBlocksV1) Get() *WatchBlocksV1 { - return v.value -} - -func (v *NullableWatchBlocksV1) Set(val *WatchBlocksV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1(val *WatchBlocksV1) *NullableWatchBlocksV1 { - return &NullableWatchBlocksV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index a0e507de98..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index ef61ecb479..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-ledger-connector-iroha2_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService GenerateTransactionV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GenerateTransactionV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService QueryV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.QueryV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService TransactV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.TransactV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index eb77df8980..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Iroha V2 - -Can perform basic tasks on a Iroha V2 ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-iroha2 - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-iroha2/src/main/json/openapi.json deleted file mode 100644 index fa139c35fd..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/json/openapi.json +++ /dev/null @@ -1,671 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Connector Iroha V2", - "description": "Can perform basic tasks on a Iroha V2 ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "IrohaInstruction": { - "type": "string", - "description": "Command names that correspond to Iroha Special Instructions (https://hyperledger.github.io/iroha-2-docs/guide/advanced/isi.html)", - "enum": [ - "registerDomain", - "registerAssetDefinition", - "registerAsset", - "mintAsset", - "burnAsset", - "transferAsset", - "registerAccount" - ], - "x-enum-descriptions": [ - "Register new domain", - "Register new asset definition", - "Register new asset", - "Mint asset value", - "Burn asset value", - "Transfer asset between accounts", - "Register new account" - ], - "x-enum-varnames": [ - "RegisterDomain", - "RegisterAssetDefinition", - "RegisterAsset", - "MintAsset", - "BurnAsset", - "TransferAsset", - "RegisterAccount" - ] - }, - "IrohaQuery": { - "type": "string", - "description": "Command names that correspond to Iroha queries (https://hyperledger.github.io/iroha-2-docs/guide/advanced/queries.html)", - "enum": [ - "findAllDomains", - "findDomainById", - "findAssetDefinitionById", - "findAllAssetsDefinitions", - "findAssetById", - "findAllAssets", - "findAllPeers", - "findAllBlocks", - "findAccountById", - "findAllAccounts", - "findAllTransactions", - "findTransactionByHash" - ], - "x-enum-descriptions": [ - "Get list of all registered domains", - "Get domain with specified ID", - "Get asset definition with specified ID", - "Get list of all registered asset definition", - "Get asset with specified ID", - "Get list of all registered assets", - "Get list of all ledger peers", - "Get list of all ledger blocks", - "Get account with specified ID", - "Get list of all registered accounts", - "Get list of all transactions", - "Get transaction with specified hash" - ], - "x-enum-varnames": [ - "FindAllDomains", - "FindDomainById", - "FindAssetDefinitionById", - "FindAllAssetsDefinitions", - "FindAssetById", - "FindAllAssets", - "FindAllPeers", - "FindAllBlocks", - "FindAccountById", - "FindAllAccounts", - "FindAllTransactions", - "FindTransactionByHash" - ] - }, - "WatchBlocksV1": { - "type": "string", - "description": "Websocket requests for monitoring new blocks.", - "enum": [ - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Subscribe", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Next", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Error", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "BlockTypeV1": { - "type": "string", - "description": "Iroha V2 block response type.", - "enum": ["raw", "binary"], - "x-enum-descriptions": [ - "Default JSON-encoded string full block data.", - "Encoded format that must be decoded with Iroha SDK on client side before use" - ], - "x-enum-varnames": ["Raw", "Binary"] - }, - "TransactionStatusV1": { - "type": "string", - "description": "Status of Iroha V2 transaction.", - "enum": ["submitted", "committed", "rejected"], - "x-enum-descriptions": [ - "Transaction was submitted to the ledger - use other tools to check if it was accepted and committed.", - "Transaction was committed to the ledger.", - "Transaction was rejected." - ], - "x-enum-varnames": ["Submitted", "Committed", "Rejected"] - }, - "WatchBlocksOptionsV1": { - "type": "object", - "description": "Options passed when subscribing to block monitoring.", - "properties": { - "type": { - "$ref": "#/components/schemas/BlockTypeV1", - "description": "Type of response block to return.", - "default": "BlockTypeV1.Binary", - "nullable": false - }, - "startBlock": { - "type": "string", - "description": "Number of block to start monitoring from.", - "minLength": 1, - "nullable": false - }, - "baseConfig": { - "$ref": "#/components/schemas/Iroha2BaseConfig", - "description": "Iroha V2 connection configuration.", - "nullable": false - } - } - }, - "WatchBlocksRawResponseV1": { - "type": "object", - "description": "Default JSON-encoded string full block data.", - "required": ["blockData"], - "properties": { - "blockData": { - "type": "string", - "nullable": false - } - } - }, - "WatchBlocksBinaryResponseV1": { - "type": "object", - "description": "Binary encoded response of block data.", - "required": ["binaryBlock"], - "properties": { - "binaryBlock": { - "type": "string", - "nullable": false - } - } - }, - "WatchBlocksResponseV1": { - "oneOf": [ - { - "$ref": "#/components/schemas/WatchBlocksRawResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksBinaryResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/ErrorExceptionResponseV1", - "nullable": false - } - ] - }, - "Iroha2AccountId": { - "type": "object", - "description": "Iroha V2 account ID.", - "additionalProperties": false, - "nullable": false, - "required": ["name", "domainId"], - "properties": { - "name": { - "type": "string", - "nullable": false - }, - "domainId": { - "type": "string", - "nullable": false - } - } - }, - "Iroha2KeyJson": { - "type": "object", - "description": "Private/Public key JSON containing payload and digest function.", - "additionalProperties": false, - "nullable": false, - "required": ["digestFunction", "payload"], - "properties": { - "digestFunction": { - "type": "string", - "nullable": false - }, - "payload": { - "type": "string", - "nullable": false - } - } - }, - "KeychainReference": { - "type": "object", - "description": "Reference to entry stored in Cactus keychain plugin.", - "required": ["keychainId", "keychainRef"], - "properties": { - "keychainId": { - "type": "string", - "description": "Keychain plugin ID.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "keychainRef": { - "type": "string", - "description": "Key reference name.", - "minLength": 1, - "maxLength": 100, - "nullable": false - } - } - }, - "Iroha2KeyPair": { - "type": "object", - "description": "Pair of Iroha account private and public keys.", - "required": ["privateKey", "publicKey"], - "properties": { - "privateKey": { - "$ref": "#/components/schemas/Iroha2KeyJson", - "nullable": false - }, - "publicKey": { - "type": "string", - "nullable": false - } - } - }, - "Iroha2BaseConfigTorii": { - "type": "object", - "description": "Iroha V2 peer connection information.", - "additionalProperties": false, - "nullable": false, - "properties": { - "apiURL": { - "type": "string", - "nullable": false - }, - "telemetryURL": { - "type": "string", - "nullable": false - } - } - }, - "Iroha2BaseConfig": { - "type": "object", - "description": "Iroha V2 connection configuration.", - "additionalProperties": false, - "required": ["torii"], - "properties": { - "torii": { - "$ref": "#/components/schemas/Iroha2BaseConfigTorii", - "nullable": false - }, - "accountId": { - "$ref": "#/components/schemas/Iroha2AccountId", - "nullable": false - }, - "signingCredential": { - "oneOf": [ - { - "$ref": "#/components/schemas/Iroha2KeyPair", - "nullable": false - }, - { - "$ref": "#/components/schemas/KeychainReference", - "nullable": false - } - ] - } - } - }, - "IrohaInstructionRequestV1": { - "type": "object", - "description": "Single Iroha V2 instruction to be executed request.", - "required": ["name", "params"], - "additionalProperties": false, - "properties": { - "name": { - "type": "IrohaInstruction", - "description": "Iroha V2 instruction name.", - "nullable": false - }, - "params": { - "description": "The list of arguments to pass with specified instruction.", - "type": "array", - "items": {} - } - } - }, - "IrohaTransactionParametersV1": { - "type": "object", - "description": "Iroha V2 transaction payload parameters", - "additionalProperties": true, - "properties": { - "ttl": { - "type": "string", - "description": "BigInt time to live.", - "nullable": false - }, - "creationTime": { - "type": "string", - "description": "BigInt creation time", - "nullable": false - }, - "nonce": { - "type": "number", - "description": "Transaction nonce", - "nullable": false - } - } - }, - "IrohaTransactionDefinitionV1": { - "type": "object", - "description": "Iroha V2 transaction definition", - "required": ["instruction"], - "additionalProperties": false, - "properties": { - "instruction": { - "oneOf": [ - { - "$ref": "#/components/schemas/IrohaInstructionRequestV1", - "nullable": false - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IrohaInstructionRequestV1" - } - } - ] - }, - "params": { - "$ref": "#/components/schemas/IrohaTransactionParametersV1", - "description": "Transaction parameters", - "nullable": false - } - } - }, - "IrohaQueryDefinitionV1": { - "type": "object", - "description": "Iroha V2 query definition.", - "required": ["query"], - "additionalProperties": false, - "properties": { - "query": { - "type": "IrohaQuery", - "description": "Name of the query to be executed.", - "nullable": false - }, - "params": { - "description": "The list of arguments to pass with the query.", - "type": "array", - "items": {} - } - } - }, - "IrohaSignedQueryDefinitionV1": { - "type": "object", - "description": "Iroha V2 signed query definition", - "required": ["query", "payload"], - "additionalProperties": false, - "properties": { - "query": { - "type": "IrohaQuery", - "description": "Name of the query to be executed.", - "nullable": false - }, - "payload": { - "description": "Signed query transaction binary data received from generate-transaction endpoint.", - "type": "string", - "nullable": false - } - } - }, - "TransactRequestV1": { - "type": "object", - "description": "Request to transact endpoint.", - "additionalProperties": false, - "properties": { - "signedTransaction": { - "description": "Signed transaction binary data received from generate-transaction endpoint.", - "type": "string", - "nullable": false - }, - "transaction": { - "$ref": "#/components/schemas/IrohaTransactionDefinitionV1", - "description": "New transaction definition. Caller must provide signing credential in `baseConfig`.", - "nullable": false - }, - "waitForCommit": { - "description": "Wait unitl transaction is sent and return the final status (committed / rejected)", - "type": "boolean", - "default": false, - "nullable": false - }, - "baseConfig": { - "$ref": "#/components/schemas/Iroha2BaseConfig", - "description": "Iroha V2 connection configuration.", - "nullable": false - } - } - }, - "TransactResponseV1": { - "type": "object", - "description": "Response from transaction endpoint with operation status.", - "required": ["hash", "status"], - "properties": { - "hash": { - "type": "string", - "description": "Hexadecimal hash of the transaction sent to the ledger.", - "nullable": false - }, - "status": { - "$ref": "#/components/schemas/TransactionStatusV1", - "description": "Status of the sent transaction.", - "nullable": false - }, - "rejectReason": { - "description": "When waitForCommit was suplied and the transaction was rejected, contains the reason of the rejection.", - "type": "string", - "nullable": false - } - } - }, - "QueryRequestV1": { - "type": "object", - "description": "Request to query endpoint.", - "additionalProperties": false, - "properties": { - "query": { - "$ref": "#/components/schemas/IrohaQueryDefinitionV1", - "description": "Query definition. Caller must provide signing credential in `baseConfig`", - "nullable": false - }, - "signedQuery": { - "$ref": "#/components/schemas/IrohaSignedQueryDefinitionV1", - "description": "Query payload signed on the client side.", - "nullable": false - }, - "baseConfig": { - "$ref": "#/components/schemas/Iroha2BaseConfig", - "description": "Iroha V2 connection configuration.", - "nullable": false - } - } - }, - "QueryResponseV1": { - "type": "object", - "description": "Response with the query results.", - "required": ["response"], - "properties": { - "response": { - "description": "Query response data that varies between different queries.", - "nullable": false - } - } - }, - "GenerateTransactionRequestV1": { - "type": "object", - "description": "Request for generating transaction or query payload that can be signed on the client side.", - "additionalProperties": false, - "required": ["request"], - "properties": { - "request": { - "oneOf": [ - { - "$ref": "#/components/schemas/IrohaTransactionDefinitionV1", - "description": "New transaction definition. Caller must provide signing credential in `baseConfig`.", - "nullable": false - }, - { - "$ref": "#/components/schemas/IrohaQueryDefinitionV1", - "description": "Query definition. Caller must provide signing credential in `baseConfig`.", - "nullable": false - } - ] - }, - "baseConfig": { - "$ref": "#/components/schemas/Iroha2BaseConfig", - "description": "Iroha V2 connection configuration.", - "nullable": false - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "description": "Error response from the connector.", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "description": "Short error description message.", - "nullable": false - }, - "error": { - "type": "string", - "description": "Detailed error information.", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact" - } - }, - "operationId": "TransactV1", - "summary": "Executes a transaction on a Iroha V2 ledger (by sending some instructions)", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/generate-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/generate-transaction" - } - }, - "operationId": "generateTransactionV1", - "summary": "Generate transaction that can be signed locally.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GenerateTransactionRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query" - } - }, - "operationId": "QueryV1", - "summary": "Executes a query on a Iroha V2 ledger and returns it's results.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-iroha2/src/main/json/openapi.tpl.json deleted file mode 100644 index fa139c35fd..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,671 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Connector Iroha V2", - "description": "Can perform basic tasks on a Iroha V2 ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "IrohaInstruction": { - "type": "string", - "description": "Command names that correspond to Iroha Special Instructions (https://hyperledger.github.io/iroha-2-docs/guide/advanced/isi.html)", - "enum": [ - "registerDomain", - "registerAssetDefinition", - "registerAsset", - "mintAsset", - "burnAsset", - "transferAsset", - "registerAccount" - ], - "x-enum-descriptions": [ - "Register new domain", - "Register new asset definition", - "Register new asset", - "Mint asset value", - "Burn asset value", - "Transfer asset between accounts", - "Register new account" - ], - "x-enum-varnames": [ - "RegisterDomain", - "RegisterAssetDefinition", - "RegisterAsset", - "MintAsset", - "BurnAsset", - "TransferAsset", - "RegisterAccount" - ] - }, - "IrohaQuery": { - "type": "string", - "description": "Command names that correspond to Iroha queries (https://hyperledger.github.io/iroha-2-docs/guide/advanced/queries.html)", - "enum": [ - "findAllDomains", - "findDomainById", - "findAssetDefinitionById", - "findAllAssetsDefinitions", - "findAssetById", - "findAllAssets", - "findAllPeers", - "findAllBlocks", - "findAccountById", - "findAllAccounts", - "findAllTransactions", - "findTransactionByHash" - ], - "x-enum-descriptions": [ - "Get list of all registered domains", - "Get domain with specified ID", - "Get asset definition with specified ID", - "Get list of all registered asset definition", - "Get asset with specified ID", - "Get list of all registered assets", - "Get list of all ledger peers", - "Get list of all ledger blocks", - "Get account with specified ID", - "Get list of all registered accounts", - "Get list of all transactions", - "Get transaction with specified hash" - ], - "x-enum-varnames": [ - "FindAllDomains", - "FindDomainById", - "FindAssetDefinitionById", - "FindAllAssetsDefinitions", - "FindAssetById", - "FindAllAssets", - "FindAllPeers", - "FindAllBlocks", - "FindAccountById", - "FindAllAccounts", - "FindAllTransactions", - "FindTransactionByHash" - ] - }, - "WatchBlocksV1": { - "type": "string", - "description": "Websocket requests for monitoring new blocks.", - "enum": [ - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Subscribe", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Next", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Error", - "org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "BlockTypeV1": { - "type": "string", - "description": "Iroha V2 block response type.", - "enum": ["raw", "binary"], - "x-enum-descriptions": [ - "Default JSON-encoded string full block data.", - "Encoded format that must be decoded with Iroha SDK on client side before use" - ], - "x-enum-varnames": ["Raw", "Binary"] - }, - "TransactionStatusV1": { - "type": "string", - "description": "Status of Iroha V2 transaction.", - "enum": ["submitted", "committed", "rejected"], - "x-enum-descriptions": [ - "Transaction was submitted to the ledger - use other tools to check if it was accepted and committed.", - "Transaction was committed to the ledger.", - "Transaction was rejected." - ], - "x-enum-varnames": ["Submitted", "Committed", "Rejected"] - }, - "WatchBlocksOptionsV1": { - "type": "object", - "description": "Options passed when subscribing to block monitoring.", - "properties": { - "type": { - "$ref": "#/components/schemas/BlockTypeV1", - "description": "Type of response block to return.", - "default": "BlockTypeV1.Binary", - "nullable": false - }, - "startBlock": { - "type": "string", - "description": "Number of block to start monitoring from.", - "minLength": 1, - "nullable": false - }, - "baseConfig": { - "$ref": "#/components/schemas/Iroha2BaseConfig", - "description": "Iroha V2 connection configuration.", - "nullable": false - } - } - }, - "WatchBlocksRawResponseV1": { - "type": "object", - "description": "Default JSON-encoded string full block data.", - "required": ["blockData"], - "properties": { - "blockData": { - "type": "string", - "nullable": false - } - } - }, - "WatchBlocksBinaryResponseV1": { - "type": "object", - "description": "Binary encoded response of block data.", - "required": ["binaryBlock"], - "properties": { - "binaryBlock": { - "type": "string", - "nullable": false - } - } - }, - "WatchBlocksResponseV1": { - "oneOf": [ - { - "$ref": "#/components/schemas/WatchBlocksRawResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksBinaryResponseV1", - "nullable": false - }, - { - "$ref": "#/components/schemas/ErrorExceptionResponseV1", - "nullable": false - } - ] - }, - "Iroha2AccountId": { - "type": "object", - "description": "Iroha V2 account ID.", - "additionalProperties": false, - "nullable": false, - "required": ["name", "domainId"], - "properties": { - "name": { - "type": "string", - "nullable": false - }, - "domainId": { - "type": "string", - "nullable": false - } - } - }, - "Iroha2KeyJson": { - "type": "object", - "description": "Private/Public key JSON containing payload and digest function.", - "additionalProperties": false, - "nullable": false, - "required": ["digestFunction", "payload"], - "properties": { - "digestFunction": { - "type": "string", - "nullable": false - }, - "payload": { - "type": "string", - "nullable": false - } - } - }, - "KeychainReference": { - "type": "object", - "description": "Reference to entry stored in Cactus keychain plugin.", - "required": ["keychainId", "keychainRef"], - "properties": { - "keychainId": { - "type": "string", - "description": "Keychain plugin ID.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "keychainRef": { - "type": "string", - "description": "Key reference name.", - "minLength": 1, - "maxLength": 100, - "nullable": false - } - } - }, - "Iroha2KeyPair": { - "type": "object", - "description": "Pair of Iroha account private and public keys.", - "required": ["privateKey", "publicKey"], - "properties": { - "privateKey": { - "$ref": "#/components/schemas/Iroha2KeyJson", - "nullable": false - }, - "publicKey": { - "type": "string", - "nullable": false - } - } - }, - "Iroha2BaseConfigTorii": { - "type": "object", - "description": "Iroha V2 peer connection information.", - "additionalProperties": false, - "nullable": false, - "properties": { - "apiURL": { - "type": "string", - "nullable": false - }, - "telemetryURL": { - "type": "string", - "nullable": false - } - } - }, - "Iroha2BaseConfig": { - "type": "object", - "description": "Iroha V2 connection configuration.", - "additionalProperties": false, - "required": ["torii"], - "properties": { - "torii": { - "$ref": "#/components/schemas/Iroha2BaseConfigTorii", - "nullable": false - }, - "accountId": { - "$ref": "#/components/schemas/Iroha2AccountId", - "nullable": false - }, - "signingCredential": { - "oneOf": [ - { - "$ref": "#/components/schemas/Iroha2KeyPair", - "nullable": false - }, - { - "$ref": "#/components/schemas/KeychainReference", - "nullable": false - } - ] - } - } - }, - "IrohaInstructionRequestV1": { - "type": "object", - "description": "Single Iroha V2 instruction to be executed request.", - "required": ["name", "params"], - "additionalProperties": false, - "properties": { - "name": { - "type": "IrohaInstruction", - "description": "Iroha V2 instruction name.", - "nullable": false - }, - "params": { - "description": "The list of arguments to pass with specified instruction.", - "type": "array", - "items": {} - } - } - }, - "IrohaTransactionParametersV1": { - "type": "object", - "description": "Iroha V2 transaction payload parameters", - "additionalProperties": true, - "properties": { - "ttl": { - "type": "string", - "description": "BigInt time to live.", - "nullable": false - }, - "creationTime": { - "type": "string", - "description": "BigInt creation time", - "nullable": false - }, - "nonce": { - "type": "number", - "description": "Transaction nonce", - "nullable": false - } - } - }, - "IrohaTransactionDefinitionV1": { - "type": "object", - "description": "Iroha V2 transaction definition", - "required": ["instruction"], - "additionalProperties": false, - "properties": { - "instruction": { - "oneOf": [ - { - "$ref": "#/components/schemas/IrohaInstructionRequestV1", - "nullable": false - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IrohaInstructionRequestV1" - } - } - ] - }, - "params": { - "$ref": "#/components/schemas/IrohaTransactionParametersV1", - "description": "Transaction parameters", - "nullable": false - } - } - }, - "IrohaQueryDefinitionV1": { - "type": "object", - "description": "Iroha V2 query definition.", - "required": ["query"], - "additionalProperties": false, - "properties": { - "query": { - "type": "IrohaQuery", - "description": "Name of the query to be executed.", - "nullable": false - }, - "params": { - "description": "The list of arguments to pass with the query.", - "type": "array", - "items": {} - } - } - }, - "IrohaSignedQueryDefinitionV1": { - "type": "object", - "description": "Iroha V2 signed query definition", - "required": ["query", "payload"], - "additionalProperties": false, - "properties": { - "query": { - "type": "IrohaQuery", - "description": "Name of the query to be executed.", - "nullable": false - }, - "payload": { - "description": "Signed query transaction binary data received from generate-transaction endpoint.", - "type": "string", - "nullable": false - } - } - }, - "TransactRequestV1": { - "type": "object", - "description": "Request to transact endpoint.", - "additionalProperties": false, - "properties": { - "signedTransaction": { - "description": "Signed transaction binary data received from generate-transaction endpoint.", - "type": "string", - "nullable": false - }, - "transaction": { - "$ref": "#/components/schemas/IrohaTransactionDefinitionV1", - "description": "New transaction definition. Caller must provide signing credential in `baseConfig`.", - "nullable": false - }, - "waitForCommit": { - "description": "Wait unitl transaction is sent and return the final status (committed / rejected)", - "type": "boolean", - "default": false, - "nullable": false - }, - "baseConfig": { - "$ref": "#/components/schemas/Iroha2BaseConfig", - "description": "Iroha V2 connection configuration.", - "nullable": false - } - } - }, - "TransactResponseV1": { - "type": "object", - "description": "Response from transaction endpoint with operation status.", - "required": ["hash", "status"], - "properties": { - "hash": { - "type": "string", - "description": "Hexadecimal hash of the transaction sent to the ledger.", - "nullable": false - }, - "status": { - "$ref": "#/components/schemas/TransactionStatusV1", - "description": "Status of the sent transaction.", - "nullable": false - }, - "rejectReason": { - "description": "When waitForCommit was suplied and the transaction was rejected, contains the reason of the rejection.", - "type": "string", - "nullable": false - } - } - }, - "QueryRequestV1": { - "type": "object", - "description": "Request to query endpoint.", - "additionalProperties": false, - "properties": { - "query": { - "$ref": "#/components/schemas/IrohaQueryDefinitionV1", - "description": "Query definition. Caller must provide signing credential in `baseConfig`", - "nullable": false - }, - "signedQuery": { - "$ref": "#/components/schemas/IrohaSignedQueryDefinitionV1", - "description": "Query payload signed on the client side.", - "nullable": false - }, - "baseConfig": { - "$ref": "#/components/schemas/Iroha2BaseConfig", - "description": "Iroha V2 connection configuration.", - "nullable": false - } - } - }, - "QueryResponseV1": { - "type": "object", - "description": "Response with the query results.", - "required": ["response"], - "properties": { - "response": { - "description": "Query response data that varies between different queries.", - "nullable": false - } - } - }, - "GenerateTransactionRequestV1": { - "type": "object", - "description": "Request for generating transaction or query payload that can be signed on the client side.", - "additionalProperties": false, - "required": ["request"], - "properties": { - "request": { - "oneOf": [ - { - "$ref": "#/components/schemas/IrohaTransactionDefinitionV1", - "description": "New transaction definition. Caller must provide signing credential in `baseConfig`.", - "nullable": false - }, - { - "$ref": "#/components/schemas/IrohaQueryDefinitionV1", - "description": "Query definition. Caller must provide signing credential in `baseConfig`.", - "nullable": false - } - ] - }, - "baseConfig": { - "$ref": "#/components/schemas/Iroha2BaseConfig", - "description": "Iroha V2 connection configuration.", - "nullable": false - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "description": "Error response from the connector.", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "description": "Short error description message.", - "nullable": false - }, - "error": { - "type": "string", - "description": "Detailed error information.", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact" - } - }, - "operationId": "TransactV1", - "summary": "Executes a transaction on a Iroha V2 ledger (by sending some instructions)", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/generate-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/generate-transaction" - } - }, - "operationId": "generateTransactionV1", - "summary": "Generate transaction that can be signed locally.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GenerateTransactionRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query" - } - }, - "operationId": "QueryV1", - "summary": "Executes a query on a Iroha V2 ledger and returns it's results.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryRequestV1" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/api-client/iroha2-api-client.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/api-client/iroha2-api-client.ts deleted file mode 100644 index 4c37d6850b..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/api-client/iroha2-api-client.ts +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Extension of ApiClient genereted from OpenAPI. - * Allows operations not handled by OpenAPI (i.e. socketIO or grpc endpoints). - */ - -import { Observable, ReplaySubject } from "rxjs"; -import { finalize } from "rxjs/operators"; -// eslint-disable-next-line @typescript-eslint/no-var-requires -const io = require("socket.io-client-fixed-types"); -import { Logger, Checks } from "@hyperledger/cactus-common"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { Constants, ISocketApiClient } from "@hyperledger/cactus-core-api"; -import { - DefaultApi, - WatchBlocksV1, - WatchBlocksOptionsV1, - WatchBlocksResponseV1, -} from "../generated/openapi/typescript-axios"; -import { Configuration } from "../generated/openapi/typescript-axios/configuration"; - -/** - * Configuration for Iroha2ApiClient - */ -export class Iroha2ApiClientOptions extends Configuration { - readonly logLevel?: LogLevelDesc; - readonly wsApiHost?: string; - readonly wsApiPath?: string; -} - -/** - * Extended ApiClient that can be used to communicate with Iroha2 connector. - */ -export class Iroha2ApiClient - extends DefaultApi - implements ISocketApiClient -{ - public readonly className = "Iroha2ApiClient"; - - private readonly log: Logger; - private readonly wsApiHost: string; - private readonly wsApiPath: string; - - /** - * Registry of started monitoring sessions. - */ - private monitorSubjects = new Map< - string, - ReplaySubject - >(); - - constructor(public readonly options: Iroha2ApiClientOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.wsApiHost = options.wsApiHost || options.basePath || location.host; - this.wsApiPath = options.wsApiPath || Constants.SocketIoConnectionPathV1; - this.log.debug(`Created ${this.className} OK.`); - this.log.debug(`wsApiHost=${this.wsApiHost}`); - this.log.debug(`wsApiPath=${this.wsApiPath}`); - this.log.debug(`basePath=${this.options.basePath}`); - } - - /** - * Watch for new blocks on Iroha2 ledger. - * - * @param monitorOptions Monitoring configuration. - * - * @returns Observable that will receive new blocks once they appear. - */ - public watchBlocksV1( - monitorOptions: WatchBlocksOptionsV1, - ): Observable { - const socket = io(this.wsApiHost, { path: this.wsApiPath }); - const subject = new ReplaySubject(0); - - socket.on(WatchBlocksV1.Next, (data: WatchBlocksResponseV1) => { - this.log.debug("Received WatchBlocksV1.Next"); - subject.next(data); - }); - - socket.on(WatchBlocksV1.Error, (ex: string) => { - this.log.error("Received WatchBlocksV1.Error:", ex); - subject.error(ex); - }); - - socket.on(WatchBlocksV1.Complete, () => { - this.log.debug("Received WatchBlocksV1.Complete"); - subject.complete(); - }); - - socket.on("connect", () => { - this.log.info( - `Connected client '${socket.id}', sending WatchBlocksV1.Subscribe...`, - ); - this.monitorSubjects.set(socket.id, subject); - socket.emit(WatchBlocksV1.Subscribe, monitorOptions); - }); - - socket.connect(); - - return subject.pipe( - finalize(() => { - this.log.info( - `FINALIZE client ${socket.id} - unsubscribing from the stream...`, - ); - socket.emit(WatchBlocksV1.Unsubscribe); - socket.disconnect(); - this.monitorSubjects.delete(socket.id); - }), - ); - } - - /** - * Stop all ongoing monitors, terminate connections. - * - * @note Might take few seconds to clean up all the connections. - */ - public close(): void { - this.log.debug("Close all running monitors."); - this.monitorSubjects.forEach((subject) => subject.complete()); - this.monitorSubjects.clear(); - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/client.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/client.ts deleted file mode 100644 index ac2855441a..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/client.ts +++ /dev/null @@ -1,882 +0,0 @@ -/** - * Cactus wrapper around IrohaV2 Client and some related functions. - */ - -import { crypto } from "@iroha2/crypto-target-node"; -import { - Signer, - Torii, - setCrypto, - makeTransactionPayload, - executableIntoSignedTransaction, - computeTransactionHash, - makeVersionedSignedTransaction, -} from "@iroha2/client"; -import { - AssetDefinitionId, - AssetValueType, - DomainId, - EvaluatesToRegistrableBox, - Executable, - Expression, - IdentifiableBox, - Instruction, - MapNameValue, - Metadata, - Mintable, - Name as IrohaName, - Value as IrohaValue, - NewAssetDefinition, - NewDomain, - OptionIpfsPath, - RegisterBox, - VecInstruction, - Asset, - MintBox, - EvaluatesToValue, - EvaluatesToIdBox, - IdBox, - BurnBox, - PublicKey, - NewAccount, - VecPublicKey, - TransferBox, - TransactionPayload, - AccountId, - RejectionReason, - FilterBox, - PipelineEventFilter, - OptionPipelineEntityKind, - PipelineEntityKind, - OptionPipelineStatusKind, - OptionHash, - VersionedSignedTransaction, -} from "@iroha2/data-model"; -import { Key, KeyPair } from "@iroha2/crypto-core"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { bytesToHex, hexToBytes } from "hada"; - -import { CactusIrohaV2QueryClient } from "./query"; -import { - createAccountId, - createAssetId, - createAssetValue, - createIrohaValue, -} from "./data-factories"; -import { - TransactResponseV1, - TransactionStatusV1, - Iroha2BaseConfigTorii, -} from "../generated/openapi/typescript-axios"; -import { IrohaV2PrerequisitesProvider } from "./prerequisites-provider"; - -setCrypto(crypto); - -/** - * Generates key pair compatible with IrohaV2 SDK client. - * - * @warning Returned `KeyPair` must be freed by the caller! (use `.free()` method) - * @param publicKeyMultihash public key in multihash format. - * @param privateKeyJson private key payload and digest function. - * @returns IrohaV2 SDK `KeyPair` - */ -export function generateIrohaV2KeyPair( - publicKeyMultihash: string, - privateKeyJson: Key, -): KeyPair { - const freeableKeys: { free(): void }[] = []; - - try { - const multihashBytes = Uint8Array.from(hexToBytes(publicKeyMultihash)); - - const multihash = crypto.createMultihashFromBytes(multihashBytes); - freeableKeys.push(multihash); - const publicKey = crypto.createPublicKeyFromMultihash(multihash); - freeableKeys.push(publicKey); - const privateKey = crypto.createPrivateKeyFromJsKey(privateKeyJson); - freeableKeys.push(privateKey); - - const keyPair = crypto.createKeyPairFromKeys(publicKey, privateKey); - - return keyPair; - } finally { - freeableKeys.forEach((x) => x.free()); - } -} - -/** - * Single instruction internal representation. - */ -interface NamedIrohaV2Instruction { - name: string; - instruction: Instruction; -} - -/** - * Raw type of executableIntoSignedTransaction payloadParams parameter. - */ -type IrohaInPayloadParams = Parameters< - typeof executableIntoSignedTransaction ->[0]["payloadParams"]; - -/** - * Transaction parameters type to be send in payload. - * Comes from Iroha SDK. - */ -export type TransactionPayloadParameters = Exclude< - IrohaInPayloadParams, - undefined ->; - -/** - * Cactus wrapper around Iroha V2 SDK Client. Should not be used outside of this connector. - * - Provides convenient functions to transact / query the ledger. - * - Each transaction method adds the instruction to the transaction list that is executed together during `send()` call. - * - Use `query` member to access query interface (that doesn't affect client transaction list) - * - Each method returns `this` so invocations can be chained. - */ -export class CactusIrohaV2Client { - private readonly log: Logger; - private readonly transactions: Array = []; - private readonly prerequisitesProvider: IrohaV2PrerequisitesProvider; - - /** - * Iroha signer used to sign transaction with user private key and account. - */ - public readonly irohaSigner?: Signer; - - /** - * Separate interface for sending IrohaV2 queries. - */ - public readonly query: CactusIrohaV2QueryClient; - - constructor( - public readonly toriiOptions: Iroha2BaseConfigTorii, - public readonly accountId: AccountId, - private readonly keyPair?: KeyPair, - private readonly logLevel: LogLevelDesc = "info", - ) { - Checks.truthy(accountId, "signerOptions accountId"); - - const label = this.constructor.name; - this.log = LoggerProvider.getOrCreate({ level: this.logLevel, label }); - this.log.debug(`${label} created`); - - if (keyPair) { - this.log.debug("KeyPair present, add Signer and Query function."); - this.irohaSigner = new Signer(accountId, keyPair); - } - - this.prerequisitesProvider = new IrohaV2PrerequisitesProvider( - toriiOptions.apiURL, - ); - - this.query = new CactusIrohaV2QueryClient( - this.prerequisitesProvider, - this.irohaSigner ?? this.accountId, - this.log, - ); - } - - /** - * Add instruction to register a new domain. - * - * @param domainName - * @returns this - */ - public registerDomain(domainName: IrohaName): this { - Checks.truthy(domainName, "registerDomain arg domainName"); - - const registerBox = RegisterBox({ - object: EvaluatesToRegistrableBox({ - expression: Expression( - "Raw", - IrohaValue( - "Identifiable", - IdentifiableBox( - "NewDomain", - NewDomain({ - id: DomainId({ - name: domainName, - }), - metadata: Metadata({ map: MapNameValue(new Map()) }), - logo: OptionIpfsPath("None"), - }), - ), - ), - ), - }), - }); - - const description = `RegisterDomain '${domainName}'`; - this.transactions.push({ - name: description, - instruction: Instruction("Register", registerBox), - }); - this.log.debug(`Added ${description} to transactions`); - - return this; - } - - /** - * Add instruction to register a new asset definition. - * Each asset must be define before it's created or mined. - * - * @param assetName - * @param domainName - * @param valueType Type of stored asset value (e.g. `Quantity`, `Fixed`) - * @param mintable How asset can be minted (e.g. "Infinitely", "Not") - * @param metadata - * @returns this - */ - public registerAssetDefinition( - assetName: IrohaName, - domainName: IrohaName, - valueType: "Fixed" | "Quantity" | "BigQuantity" | "Store", - mintable: "Infinitely" | "Once" | "Not", - metadata: Map = new Map(), - ): this { - Checks.truthy(assetName, "registerAsset arg assetName"); - Checks.truthy(domainName, "registerAsset arg domainName"); - Checks.truthy(valueType, "registerAsset arg valueType"); - Checks.truthy(mintable, "registerAsset arg mintable"); - - const assetDefinition = NewAssetDefinition({ - id: AssetDefinitionId({ - name: assetName, - domain_id: DomainId({ name: domainName }), - }), - value_type: AssetValueType(valueType), - metadata: Metadata({ - map: MapNameValue(metadata), - }), - mintable: Mintable(mintable), - }); - - const registerBox = RegisterBox({ - object: EvaluatesToRegistrableBox({ - expression: Expression( - "Raw", - IrohaValue( - "Identifiable", - IdentifiableBox("NewAssetDefinition", assetDefinition), - ), - ), - }), - }); - - const description = `RegisterAssetDefinition '${assetName}#${domainName}', type: ${valueType}, mintable: ${mintable}`; - this.transactions.push({ - name: description, - instruction: Instruction("Register", registerBox), - }); - this.log.debug(`Added ${description} to transactions`); - - return this; - } - - /** - * Add instruction to register an asset that has been previously defined. - * - * @param assetName - * @param domainName - * @param accountName Asset owner name - * @param accountDomainName Asset owner domain name - * @param value Asset value must match `AssetValueType` from asset definition. - * @returns this - */ - public registerAsset( - assetName: IrohaName, - domainName: IrohaName, - accountName: IrohaName, - accountDomainName: IrohaName, - value: Parameters[0], - ): this { - Checks.truthy(assetName, "registerAsset arg assetName"); - Checks.truthy(domainName, "registerAsset arg domainName"); - Checks.truthy(accountName, "registerAsset arg accountName"); - Checks.truthy(accountDomainName, "registerAsset arg accountDomainName"); - - const assetDefinition = Asset({ - id: createAssetId(assetName, domainName, accountName, accountDomainName), - value: createAssetValue(value), - }); - - const registerBox = RegisterBox({ - object: EvaluatesToRegistrableBox({ - expression: Expression( - "Raw", - IrohaValue("Identifiable", IdentifiableBox("Asset", assetDefinition)), - ), - }), - }); - - const description = `RegisterAsset '${assetName}#${domainName}', value: ${value}`; - this.transactions.push({ - name: description, - instruction: Instruction("Register", registerBox), - }); - this.log.debug(`Added ${description} to transactions`); - - return this; - } - - /** - * Add instruction to mint specified amount of an asset. - * - * @param assetName - * @param domainName - * @param accountName Asset owner name - * @param accountDomainName Asset owner domain name - * @param value Asset value must match `AssetValueType` from asset definition. - * @returns this - */ - public mintAsset( - assetName: IrohaName, - domainName: IrohaName, - accountName: IrohaName, - accountDomainName: IrohaName, - value: Parameters[0], - ): this { - Checks.truthy(assetName, "mintAsset arg assetName"); - Checks.truthy(domainName, "mintAsset arg domainName"); - Checks.truthy(accountName, "mintAsset arg accountName"); - Checks.truthy(accountDomainName, "mintAsset arg accountDomainName"); - Checks.truthy(value, "mintAsset arg value"); - - const mintBox = MintBox({ - object: EvaluatesToValue({ - expression: Expression("Raw", createIrohaValue(value)), - }), - destination_id: EvaluatesToIdBox({ - expression: Expression( - "Raw", - IrohaValue( - "Id", - IdBox( - "AssetId", - createAssetId( - assetName, - domainName, - accountName, - accountDomainName, - ), - ), - ), - ), - }), - }); - - const description = `MintAsset '${assetName}#${domainName}', value: ${value}`; - this.transactions.push({ - name: description, - instruction: Instruction("Mint", mintBox), - }); - this.log.debug(`Added ${description} to transactions`); - - return this; - } - - /** - * Add instruction to burn specified amount of an asset. - * - * @param assetName - * @param domainName - * @param accountName Asset owner name - * @param accountDomainName Asset owner domain name - * @param value Asset value to burn must match `AssetValueType` from asset definition. - * @returns this - */ - public burnAsset( - assetName: IrohaName, - domainName: IrohaName, - accountName: IrohaName, - accountDomainName: IrohaName, - value: number | bigint | string | Metadata, - ): this { - Checks.truthy(assetName, "burnAsset arg assetName"); - Checks.truthy(domainName, "burnAsset arg domainName"); - Checks.truthy(accountName, "burnAsset arg accountName"); - Checks.truthy(accountDomainName, "burnAsset arg accountDomainName"); - Checks.truthy(value, "burnAsset arg value"); - - const burnBox = BurnBox({ - object: EvaluatesToValue({ - expression: Expression("Raw", createIrohaValue(value)), - }), - destination_id: EvaluatesToIdBox({ - expression: Expression( - "Raw", - IrohaValue( - "Id", - IdBox( - "AssetId", - createAssetId( - assetName, - domainName, - accountName, - accountDomainName, - ), - ), - ), - ), - }), - }); - - const description = `BurnAsset '${assetName}#${domainName}', value: ${value}`; - this.transactions.push({ - name: description, - instruction: Instruction("Burn", burnBox), - }); - this.log.debug(`Added ${description} to transactions`); - - return this; - } - - /** - * Add instruction to transfer asset between two accounts. - * - * @param assetName - * @param assetDomainName - * @param sourceAccountName Origin account name. - * @param sourceAccountDomain Origin account domain name. - * @param targetAccountName Target account name. - * @param targetAccountDomain Target account domain name. - * @param valueToTransfer Asset value to transfer must match `AssetValueType` from asset definition. - * @returns this - */ - public transferAsset( - assetName: IrohaName, - assetDomainName: IrohaName, - sourceAccountName: IrohaName, - sourceAccountDomain: IrohaName, - targetAccountName: IrohaName, - targetAccountDomain: IrohaName, - valueToTransfer: number | bigint | string | Metadata, - ): this { - Checks.truthy(assetName, "transferAsset arg assetName"); - Checks.truthy(assetDomainName, "transferAsset arg assetDomainName"); - Checks.truthy(sourceAccountName, "transferAsset arg sourceAccountName"); - Checks.truthy(sourceAccountDomain, "transferAsset arg sourceAccountDomain"); - Checks.truthy(targetAccountName, "transferAsset arg targetAccountName"); - Checks.truthy(targetAccountDomain, "transferAsset arg targetAccountDomain"); - Checks.truthy(valueToTransfer, "transferAsset arg valueToTransfer"); - - const transferBox = TransferBox({ - source_id: EvaluatesToIdBox({ - expression: Expression( - "Raw", - IrohaValue( - "Id", - IdBox( - "AssetId", - createAssetId( - assetName, - assetDomainName, - sourceAccountName, - sourceAccountDomain, - ), - ), - ), - ), - }), - object: EvaluatesToValue({ - expression: Expression("Raw", createIrohaValue(valueToTransfer)), - }), - destination_id: EvaluatesToIdBox({ - expression: Expression( - "Raw", - IrohaValue( - "Id", - IdBox( - "AssetId", - createAssetId( - assetName, - assetDomainName, - targetAccountName, - targetAccountDomain, - ), - ), - ), - ), - }), - }); - - const description = `TransferAsset '${assetName}#${assetDomainName}',\ - from: ${sourceAccountName}@${sourceAccountDomain}\ - to ${targetAccountName}@${targetAccountDomain}`; - - this.transactions.push({ - name: description, - instruction: Instruction("Transfer", transferBox), - }); - this.log.debug(`Added ${description} to transactions`); - - return this; - } - - /** - * Add instruction to register new account on the ledger. - * - * @param accountName - * @param domainName - * @param publicKeyPayload Public key, either HEX encoded string or raw `Uint8Array` bytes. - * @param publicKeyDigestFunction - * @param metadata - * @returns this - */ - public registerAccount( - accountName: IrohaName, - domainName: IrohaName, - publicKeyPayload: string | Uint8Array, - publicKeyDigestFunction = "ed25519", - metadata: Map = new Map(), - ): this { - Checks.truthy(accountName, "registerAccount arg accountName"); - Checks.truthy(domainName, "registerAccount arg domainName"); - Checks.truthy(publicKeyPayload, "registerAccount arg publicKeyPayload"); - Checks.truthy( - publicKeyDigestFunction, - "registerAccount arg publicKeyDigestFunction", - ); - - let publicKeyBytes: Uint8Array; - if (typeof publicKeyPayload === "string") { - publicKeyBytes = Uint8Array.from(hexToBytes(publicKeyPayload)); - } else { - publicKeyBytes = publicKeyPayload; - } - - const publicKey = PublicKey({ - payload: publicKeyBytes, - digest_function: publicKeyDigestFunction, - }); - - const registerBox = RegisterBox({ - object: EvaluatesToRegistrableBox({ - expression: Expression( - "Raw", - IrohaValue( - "Identifiable", - IdentifiableBox( - "NewAccount", - NewAccount({ - id: createAccountId(accountName, domainName), - signatories: VecPublicKey([publicKey]), - metadata: Metadata({ map: MapNameValue(metadata) }), - }), - ), - ), - ), - }), - }); - - const description = `RegisterAccount '${accountName}@${domainName}'`; - this.transactions.push({ - name: description, - instruction: Instruction("Register", registerBox), - }); - this.log.debug(`Added ${description} to transactions`); - - return this; - } - - /** - * Clear all the instructions stored in current transaction. - * - * @returns this - */ - public clear(): this { - this.transactions.length = 0; - return this; - } - - /** - * Get summary report of all instructions stored in a current transaction. - * - * @returns printable string report - */ - public getTransactionSummary(): string { - const header = `Transaction Summary (total: ${this.transactions.length}):\n`; - const instructions = this.transactions.map( - (instruction, index) => - ` - Instruction #${index}: ` + instruction.name + "\n", - ); - - return header.concat(...instructions); - } - - /** - * Create Iroha SDK compatible `Executable` from instructions saved in current client session. - * - * @returns Iroha `Executable` - */ - private createIrohaExecutable(): Executable { - const irohaInstructions = this.transactions.map( - (entry) => entry.instruction, - ); - this.log.info( - `Created executable with ${irohaInstructions.length} instructions.`, - ); - - return Executable("Instructions", VecInstruction(irohaInstructions)); - } - - /** - * Throw if there are no instructions in current client session. - */ - private assertTransactionsNotEmpty() { - if (this.transactions.length === 0) { - throw new Error( - "assertTransactionsNotEmpty() failed - no instructions defined!", - ); - } - } - - /** - * Get transaction payload buffer that can be signed and then sent to the ledger. - * - * @param txParams Transaction parameters. - * - * @returns Buffer of encoded `TransactionPayload` - */ - public getTransactionPayloadBuffer( - txParams?: TransactionPayloadParameters, - ): Uint8Array { - this.assertTransactionsNotEmpty(); - - const payload = makeTransactionPayload({ - accountId: this.accountId, - executable: this.createIrohaExecutable(), - ...txParams, - }); - - return TransactionPayload.toBuffer(payload); - } - - /** - * Parse IrohaV2 `RejectionReason` and return plain string rejection description. - * - * @param reason Transaction rejection from the Iroha V2 ledger. - * @returns rejection description. - */ - private getRejectionDescription(reason: RejectionReason): string { - Checks.truthy(reason, "getRejectionDescription arg reason"); - - return reason.as("Transaction").match({ - NotPermitted: (error) => { - return `NotPermitted: ${error.reason}`; - }, - UnsatisfiedSignatureCondition: (error) => { - return `UnsatisfiedSignatureCondition: ${error.reason}`; - }, - LimitCheck: (error) => { - return `LimitCheck: ${error}`; - }, - InstructionExecution: (error) => { - return `InstructionExecution: ${error.reason}`; - }, - WasmExecution: (error) => { - return `WasmExecution: ${error.reason}`; - }, - UnexpectedGenesisAccountSignature: () => { - return `UnexpectedGenesisAccountSignature`; - }, - }); - } - - /** - * Wait until transaction with given hash is validated on the ledger and return it's final status. - * - * @param txHash transaction hash in bytes format. - * @returns transaction status (`TransactResponseV1` format). - */ - private async waitForTransactionStatus( - txHash: Uint8Array, - ): Promise { - Checks.truthy(txHash, "waitForTransactionStatus arg txHash"); - const txHashHex = bytesToHex([...txHash]); - this.log.debug("waitForTransactionStatus() - hash:", txHashHex); - - const monitor = await Torii.listenForEvents( - this.prerequisitesProvider.getApiWebSocketProperties(), - { - filter: FilterBox( - "Pipeline", - PipelineEventFilter({ - entity_kind: OptionPipelineEntityKind( - "Some", - PipelineEntityKind("Transaction"), - ), - status_kind: OptionPipelineStatusKind("None"), - hash: OptionHash("Some", txHash), - }), - ), - }, - ); - this.log.debug("waitForTransactionStatus() - monitoring started."); - - const txStatusPromise = new Promise( - (resolve, reject) => { - monitor.ee.on("error", (error) => { - this.log.warn("waitForTransactionStatus() - Received error", error); - reject(error); - }); - - monitor.ee.on("event", (event) => { - try { - const { hash, status } = event.as("Pipeline"); - const hashHex = bytesToHex([...hash]); - - status.match({ - Validating: () => { - this.log.info( - `waitForTransactionStatus() - Transaction '${hashHex}' [Validating]`, - ); - }, - Committed: () => { - const txStatus = TransactionStatusV1.Committed; - this.log.info( - `waitForTransactionStatus() - Transaction '${hashHex}' [${txStatus}]`, - ); - resolve({ - hash: hashHex, - status: txStatus, - }); - }, - Rejected: (reason) => { - const txStatus = TransactionStatusV1.Rejected; - this.log.info( - `waitForTransactionStatus() - Transaction '${hashHex}' [${txStatus}]`, - ); - resolve({ - hash: hashHex, - status: txStatus, - rejectReason: this.getRejectionDescription(reason), - }); - }, - }); - } catch (error) { - this.log.warn( - "waitForTransactionStatus() - Event handling error:", - error, - ); - reject(error); - } - }); - }, - ); - - return txStatusPromise.finally(async () => { - this.log.debug( - `Transaction ${txHashHex} status received, stop the monitoring...`, - ); - monitor.ee.clearListeners(); - await monitor.stop(); - }); - } - - /** - * Send all the stored instructions as single Iroha transaction. - * - * @param txParams Transaction parameters. - * @param waitForCommit If `true` - block and return the final transaction status. Otherwise - return immediately. - * - * @returns `TransactResponseV1` - */ - public async send( - txParams?: TransactionPayloadParameters, - waitForCommit = false, - ): Promise { - this.assertTransactionsNotEmpty(); - if (!this.irohaSigner) { - throw new Error("send() failed - no Iroha Signer, keyPair was missing"); - } - this.log.debug(this.getTransactionSummary()); - - const txPayload = makeTransactionPayload({ - accountId: this.irohaSigner.accountId, - executable: this.createIrohaExecutable(), - ...txParams, - }); - const hash = computeTransactionHash(txPayload); - let statusPromise; - if (waitForCommit) { - statusPromise = this.waitForTransactionStatus(hash); - } - - const signedTx = makeVersionedSignedTransaction( - txPayload, - this.irohaSigner, - ); - await Torii.submit( - this.prerequisitesProvider.getApiHttpProperties(), - signedTx, - ); - this.clear(); - - if (statusPromise) { - return await statusPromise; - } else { - return { - hash: bytesToHex([...hash]), - status: TransactionStatusV1.Submitted, - }; - } - } - - /** - * Send signed transaction payload to the ledger. - * - * @param signedPayload Encoded or plain `VersionedSignedTransaction` - * @param waitForCommit If `true` - block and return the final transaction status. Otherwise - return immediately. - * - * @returns `TransactResponseV1` - */ - public async sendSignedPayload( - signedPayload: VersionedSignedTransaction | ArrayBufferView, - waitForCommit = false, - ): Promise { - Checks.truthy(signedPayload, "sendSigned arg signedPayload"); - - if (ArrayBuffer.isView(signedPayload)) { - signedPayload = VersionedSignedTransaction.fromBuffer(signedPayload); - } - - const hash = computeTransactionHash(signedPayload.as("V1").payload); - if (waitForCommit) { - const statusPromise = this.waitForTransactionStatus(hash); - await Torii.submit( - this.prerequisitesProvider.getApiHttpProperties(), - signedPayload, - ); - return await statusPromise; - } else { - await Torii.submit( - this.prerequisitesProvider.getApiHttpProperties(), - signedPayload, - ); - return { - hash: bytesToHex([...hash]), - status: TransactionStatusV1.Submitted, - }; - } - } - - /** - * Free all allocated resources. - * Should be called before the shutdown. - */ - public free(): void { - this.log.debug("Free CactusIrohaV2Client key pair"); - this.keyPair?.free(); - this.clear(); - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/data-factories.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/data-factories.ts deleted file mode 100644 index c2e29161ea..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/data-factories.ts +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Helper factory functions to simplify construction of complex input values used by the upstream Iroha V2 SDK. - */ - -import { - AssetDefinitionId, - DomainId, - Metadata, - Name as IrohaName, - Value as IrohaValue, - AssetId, - AccountId, - AssetValue, -} from "@iroha2/data-model"; - -/** - * JS types that can be converted to IrohaV2 `AssetValue` - */ -export type AssetValueInput = number | bigint | string | Metadata; - -/** - * JS types that can be converted to IrohaV2 `IrohaValue` - */ -export type IrohaValueInput = number | bigint | string | Metadata; - -/** - * Convert JS value into matching `AssetValue` - * - * @param value - * @returns AssetValue - */ -export function createAssetValue(value: AssetValueInput): AssetValue { - switch (typeof value) { - case "number": - return AssetValue("Quantity", value); - case "bigint": - return AssetValue("BigQuantity", value); - case "string": - return AssetValue("Fixed", value); - case "object": - return AssetValue("Store", value); - default: - throw new Error(`Unknown AssetValue: ${value}, type: ${typeof value}`); - } -} - -/** - * Convert JS value into matching `IrohaValue` - * - * @param value - * @returns IrohaValue - */ -export function createIrohaValue(value: IrohaValueInput): IrohaValue { - switch (typeof value) { - case "number": - return IrohaValue("U32", value); - case "bigint": - return IrohaValue("U128", value); - case "string": - return IrohaValue("Fixed", value); - case "object": - return IrohaValue("LimitedMetadata", value); - default: - throw new Error(`Unknown IrohaValue: ${value}, type: ${typeof value}`); - } -} - -/** - * Create `AccountId` from it's name and domain. - * - * @param accountName - * @param domainName - * @returns AccountId - */ -export function createAccountId( - accountName: IrohaName, - domainName: IrohaName, -): AccountId { - return AccountId({ - name: accountName, - domain_id: DomainId({ - name: domainName, - }), - }); -} - -/** - * Create `AssetDefinitionId` from it's name and domain. - * - * @param assetName - * @param domainName - * @returns AssetDefinitionId - */ -export function createAssetDefinitionId( - assetName: IrohaName, - domainName: IrohaName, -): AccountId { - return AssetDefinitionId({ - name: assetName, - domain_id: DomainId({ name: domainName }), - }); -} - -/** - * Create `AssetId` from it's name and domain and account information. - * - * @param assetName - * @param domainName - * @returns AssetDefinitionId - */ -export function createAssetId( - assetName: IrohaName, - domainName: IrohaName, - accountName: IrohaName, - accountDomainName = domainName, -): AssetId { - return AssetId({ - definition_id: createAssetDefinitionId(assetName, domainName), - account_id: createAccountId(accountName, accountDomainName), - }); -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/prerequisites-provider.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/prerequisites-provider.ts deleted file mode 100644 index 0c15855d42..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/prerequisites-provider.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Provider for IrohaV2 ToriiRequirements needed by Iroha2 SDK. - */ - -import { - IsomorphicWebSocketAdapter, - ToriiRequirementsForApiWebSocket, - ToriiRequirementsForApiHttp, -} from "@iroha2/client"; - -// This module can't be imported unless we use `nodenext` moduleResolution -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { adapter: irohaWSAdapter } = require("@iroha2/client/web-socket/node"); -import { fetch as undiciFetch } from "undici"; - -/** - * Helper class that returns ToriiRequirements for different Iroha2 commands. - * Can be created with missing parameters, if they are required for requested requirement - * an exception will be thrown. - */ -export class IrohaV2PrerequisitesProvider { - /** - * IrohaV2 isomorphic ws adapter - */ - public webSocketAdapter: IsomorphicWebSocketAdapter = irohaWSAdapter; - - /** - * IrohaV2 isomorphic fetch adapter - */ - public fetchAdapter = undiciFetch as any as typeof fetch; - - constructor( - public apiURL?: string, - public telemetryURL?: string, - ) {} - - /** - * Get requirements for executing API calls on web socket protocol. - * @returns `ToriiRequirementsForApiWebSocket` - */ - getApiWebSocketProperties(): ToriiRequirementsForApiWebSocket { - if (!this.apiURL || !this.webSocketAdapter) { - throw new Error( - "Missing required arguments: apiURL and iroha ws adapter", - ); - } - - return { - apiURL: this.apiURL, - ws: this.webSocketAdapter, - }; - } - - /** - * Get requirements for executing API calls on HTTP protocol. - * @returns `ToriiRequirementsForApiHttp` - */ - getApiHttpProperties(): ToriiRequirementsForApiHttp { - if (!this.apiURL || !this.fetchAdapter) { - throw new Error( - "Missing required arguments: apiURL and iroha fetch adapter", - ); - } - - return { - apiURL: this.apiURL, - fetch: this.fetchAdapter, - }; - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/query.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/query.ts deleted file mode 100644 index 374a10b028..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/cactus-iroha-sdk-wrapper/query.ts +++ /dev/null @@ -1,587 +0,0 @@ -/** - * Cactus wrapper around IrohaV2 Client query utilities. - * Intended to be used through `CactusIrohaV2Client` interface but can be instantiated separately if needed. - */ - -import { - Torii, - Signer, - ToriiQueryResult, - makeQueryPayload, - makeVersionedSignedQuery, -} from "@iroha2/client"; -import { - DomainId, - Expression, - QueryBox, - Value, - FindDomainById, - EvaluatesToDomainId, - IdBox, - Name as IrohaName, - FindAssetById, - EvaluatesToAssetId, - FindAssetDefinitionById, - EvaluatesToAssetDefinitionId, - FindAccountById, - EvaluatesToAccountId, - FindTransactionByHash, - EvaluatesToHash, - VecValue, - VersionedSignedQueryRequest, - QueryPayload, - AccountId, -} from "@iroha2/data-model"; - -import { Checks, Logger } from "@hyperledger/cactus-common"; - -import safeStringify from "fast-safe-stringify"; -import { hexToBytes } from "hada"; -import { - createAccountId, - createAssetDefinitionId, - createAssetId, -} from "./data-factories"; -import { IrohaV2PrerequisitesProvider } from "./prerequisites-provider"; - -/** - * Action context for specific query. - * Contains methods for sending request or generating payloads. - */ -interface QueryContext< - QueryBoxFactory extends (...args: any[]) => QueryBox, - QueryResponseType, -> { - /** - * Request query response from the ledger. - * You must provide a signer to the client (to sign the query transaction), or this method will fail. - */ - request: ( - ...params: Parameters - ) => Promise; - - /** - * Generate unsigned query request payload using provided parameters. - * Payload must be signed, and then sent to the ledger with `QueryContext` method `requestSigned`. - */ - payload: (...params: Parameters) => Promise; - - /** - * Send signed request payload to the ledger. - */ - requestSigned: ( - signedPayload: VersionedSignedQueryRequest | ArrayBufferView, - ) => Promise; -} - -/** - * Cactus wrapper around IrohaV2 Client query utilities. - * Intended to be used through `CactusIrohaV2Client` interface but can be instantiated separately if needed. - * - * @todo Implement pagination once it's supported by the upstream iroha-javascript SDK. - */ -export class CactusIrohaV2QueryClient { - constructor( - private readonly prerequisitesProvider: IrohaV2PrerequisitesProvider, - public readonly irohaSigner: Signer | AccountId, - private readonly log: Logger, - ) { - Checks.truthy( - prerequisitesProvider, - "CactusIrohaV2QueryClient prerequisitesProvider", - ); - Checks.truthy(irohaSigner, "CactusIrohaV2QueryClient irohaSigner"); - Checks.truthy(log, "CactusIrohaV2QueryClient log"); - - this.log.debug("CactusIrohaV2QueryClient created."); - } - - /** - * Helper function to match vector response from Iroha and handle possible errors. - * - * @param result Query result object - * @param queryName Query name for diagnostics. - * @returns Vector result - */ - private matchVectorResult( - result: ToriiQueryResult, - queryName: string, - ): VecValue { - return result.match({ - Ok: (res) => res.result.as("Vec"), - Err: (error) => { - throw new Error(`${queryName} query error: ${safeStringify(error)}`); - }, - }); - } - - /** - * Get signer account either from directly supplied `accountId` or `irohaSigner`. - */ - public get signerAccountId(): AccountId { - if ("accountId" in this.irohaSigner) { - return this.irohaSigner.accountId; - } else { - return this.irohaSigner; - } - } - - /** - * Factory method for query context. - * - * @param args.getQueryBox Method for creating QueryBox for specific query. - * @param args.parseQueryResponse Method for parsing `ToriiQueryResult` for specific query. - * - * @returns `QueryContext` - */ - private createQueryContext< - QueryBoxFactory extends (...args: any[]) => QueryBox, - QueryResponseType, - >(args: { - getQueryBox: QueryBoxFactory; - parseQueryResponse: (result: ToriiQueryResult) => QueryResponseType; - }): QueryContext { - // Request method - const request = async (...params: Parameters) => { - if (!("accountId" in this.irohaSigner)) { - throw new Error( - "query request() failed - no irohaSigner, provide signing credentials or use different method", - ); - } - - const queryPayload = makeQueryPayload({ - accountId: this.signerAccountId, - query: args.getQueryBox(...params), - }); - const signedQuery = makeVersionedSignedQuery( - queryPayload, - this.irohaSigner, - ); - - const result = await Torii.request( - this.prerequisitesProvider.getApiHttpProperties(), - signedQuery, - ); - - return args.parseQueryResponse(result); - }; - - // Payload method - const payload = async (...params: Parameters) => { - const queryBox = args.getQueryBox(...params); - const queryPayload = makeQueryPayload({ - accountId: this.signerAccountId, - query: queryBox, - }); - return QueryPayload.toBuffer(queryPayload); - }; - - // RequestSigned method - const requestSigned = async ( - signedPayload: VersionedSignedQueryRequest | ArrayBufferView, - ) => { - if (ArrayBuffer.isView(signedPayload)) { - signedPayload = VersionedSignedQueryRequest.fromBuffer(signedPayload); - } - - const result = await Torii.request( - this.prerequisitesProvider.getApiHttpProperties(), - signedPayload, - ); - return args.parseQueryResponse(result); - }; - - return { - request, - payload, - requestSigned, - }; - } - - // Domains - - /** - * Query all the domains details in the ledger. - * Can return a lot of data. - * - * @returns domain list - */ - public findAllDomains = this.createQueryContext({ - getQueryBox: () => { - return QueryBox("FindAllDomains", null); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const vectorResult = this.matchVectorResult(result, "findAllDomains"); - const domains = vectorResult.map((i) => - i.as("Identifiable").as("Domain"), - ); - - this.log.debug("findAllDomains:", domains); - return domains; - }, - }); - - /** - * Query single domain by it's name - * - * @param domainName - * @returns Domain data - */ - public findDomainById = this.createQueryContext({ - getQueryBox: (domainName: IrohaName) => { - Checks.truthy(domainName, "findDomainById arg domainName"); - return QueryBox( - "FindDomainById", - FindDomainById({ - id: EvaluatesToDomainId({ - expression: Expression( - "Raw", - Value( - "Id", - IdBox( - "DomainId", - DomainId({ - name: domainName, - }), - ), - ), - ), - }), - }), - ); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const domain = result.match({ - Ok: (res) => res.result.as("Identifiable").as("Domain"), - Err: (error) => { - throw new Error( - `findDomainById query error: ${safeStringify(error.toJSON())}`, - ); - }, - }); - - this.log.debug("findDomainById:", domain); - return domain; - }, - }); - - // Assets - - /** - * Query single asset definition using it's name and domain. - * - * @param name - * @param domainName - * @returns Asset definition - */ - public findAssetDefinitionById = this.createQueryContext({ - getQueryBox: (name: IrohaName, domainName: IrohaName) => { - Checks.truthy(name, "findAssetDefinitionById arg name"); - Checks.truthy(domainName, "findAssetDefinitionById arg domainName"); - - return QueryBox( - "FindAssetDefinitionById", - FindAssetDefinitionById({ - id: EvaluatesToAssetDefinitionId({ - expression: Expression( - "Raw", - Value( - "Id", - IdBox( - "AssetDefinitionId", - createAssetDefinitionId(name, domainName), - ), - ), - ), - }), - }), - ); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const assetDef = result.match({ - Ok: (res) => res.result.as("Identifiable").as("AssetDefinition"), - Err: (error) => { - throw new Error( - `findAssetDefinitionById query error: ${safeStringify(error)}`, - ); - }, - }); - - this.log.debug("findAssetDefinitionById:", assetDef); - return assetDef; - }, - }); - - /** - * Query all defined asset definitions. - * Can return a lot of data. - * - * @returns List of asset definitions. - */ - public findAllAssetsDefinitions = this.createQueryContext({ - getQueryBox: () => { - return QueryBox("FindAllAssetsDefinitions", null); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const vectorResult = this.matchVectorResult( - result, - "findAllAssetsDefinitions", - ); - const assetDefs = vectorResult.map((d) => - d.as("Identifiable").as("AssetDefinition"), - ); - - this.log.debug("findAllAssetsDefinitions:", assetDefs); - return assetDefs; - }, - }); - - /** - * Query single asset by it's name, domain and account definition. - * - * @param assetName - * @param assetDomainName - * @param accountName Owner account name - * @param accountDomainName Owner account domain name - * @returns Asset - */ - public findAssetById = this.createQueryContext({ - getQueryBox: ( - assetName: IrohaName, - assetDomainName: IrohaName, - accountName: IrohaName, - accountDomainName: IrohaName, - ) => { - Checks.truthy(assetName, "findAssetById arg assetName"); - Checks.truthy(assetDomainName, "findAssetById arg assetDomainName"); - Checks.truthy(accountName, "findAssetById arg accountName"); - Checks.truthy(accountDomainName, "findAssetById arg accountDomainName"); - - return QueryBox( - "FindAssetById", - FindAssetById({ - id: EvaluatesToAssetId({ - expression: Expression( - "Raw", - Value( - "Id", - IdBox( - "AssetId", - createAssetId( - assetName, - assetDomainName, - accountName, - accountDomainName, - ), - ), - ), - ), - }), - }), - ); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const asset = result.match({ - Ok: (res) => res.result.as("Identifiable").as("Asset"), - Err: (error) => { - throw new Error(`findAssetById query error: ${safeStringify(error)}`); - }, - }); - - this.log.debug("findAssetById:", asset); - return asset; - }, - }); - - /** - * Query all assets on the ledger. - * Can return a lot of data. - * - * @returns List of assets. - */ - public findAllAssets = this.createQueryContext({ - getQueryBox: () => { - return QueryBox("FindAllAssets", null); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const vectorResult = this.matchVectorResult(result, "findAllAssets"); - const assets = vectorResult.map((i) => i.as("Identifiable").as("Asset")); - - this.log.debug("findAllAssets:", assets); - return assets; - }, - }); - - // Account - - /** - * Query single account by it's name and domain. - * - * @param name - * @param domainName - * @returns Account - */ - public findAccountById = this.createQueryContext({ - getQueryBox: (name: IrohaName, domainName: IrohaName) => { - Checks.truthy(name, "findAccountById arg name"); - Checks.truthy(domainName, "findAccountById arg domainName"); - - return QueryBox( - "FindAccountById", - FindAccountById({ - id: EvaluatesToAccountId({ - expression: Expression( - "Raw", - Value( - "Id", - IdBox("AccountId", createAccountId(name, domainName)), - ), - ), - }), - }), - ); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const account = result.match({ - Ok: (res) => res.result.as("Identifiable").as("Account"), - Err: (error) => { - throw new Error( - `findAccountById query error: ${safeStringify(error)}`, - ); - }, - }); - - this.log.debug("findAccountById:", account); - return account; - }, - }); - - /** - * Query all accounts on the ledger. - * Can return a lot of data. - * - * @returns List of accounts. - */ - public findAllAccounts = this.createQueryContext({ - getQueryBox: () => { - return QueryBox("FindAllAccounts", null); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const vectorResult = this.matchVectorResult(result, "findAllAccounts"); - const accounts = vectorResult.map((i) => - i.as("Identifiable").as("Account"), - ); - - this.log.debug("findAllAccounts:", accounts); - return accounts; - }, - }); - - // Transactions - - /** - * Query all transactions on the ledger. - * Can return a lot of data. - * - * @returns List of transactions. - */ - public findAllTransactions = this.createQueryContext({ - getQueryBox: () => { - return QueryBox("FindAllTransactions", null); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const vectorResult = this.matchVectorResult( - result, - "findAllTransactions", - ); - const transactions = vectorResult.map( - (i) => i.as("TransactionQueryResult").tx_value, - ); - - this.log.debug("findAllTransactions:", transactions); - return transactions; - }, - }); - - /** - * Query single transaction using it's hash. - * - * @param hash Either HEX encoded string or raw `Uint8Array` bytes. - * @returns Transaction - */ - public findTransactionByHash = this.createQueryContext({ - getQueryBox: (hash: string | Uint8Array) => { - Checks.truthy(hash, "findTransactionByHash arg hash"); - - this.log.debug("findTransactionByHash - search for", hash); - let hashBytes: Uint8Array; - if (typeof hash === "string") { - hashBytes = Uint8Array.from(hexToBytes(hash)); - } else { - hashBytes = hash; - } - - return QueryBox( - "FindTransactionByHash", - FindTransactionByHash({ - hash: EvaluatesToHash({ - expression: Expression("Raw", Value("Hash", hashBytes)), - }), - }), - ); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const transaction = result.match({ - Ok: (res) => res.result.as("TransactionValue"), - Err: (error) => { - throw new Error( - `findTransactionByHash query error: ${safeStringify(error)}`, - ); - }, - }); - - this.log.debug("findTransactionByHash:", transaction); - return transaction; - }, - }); - - // Misc - - /** - * Query all peers on the ledger. - * Can return a lot of data. - * - * @returns List of peers. - */ - public findAllPeers = this.createQueryContext({ - getQueryBox: () => { - return QueryBox("FindAllPeers", null); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const vectorResult = this.matchVectorResult(result, "findAllPeers"); - const peers = vectorResult.map((i) => i.as("Identifiable").as("Peer")); - - this.log.debug("findAllPeers:", peers); - return peers; - }, - }); - - /** - * Query all blocks on the ledger. - * Can return a lot of data. - * - * @returns List of blocks. - */ - public findAllBlocks = this.createQueryContext({ - getQueryBox: () => { - return QueryBox("FindAllBlocks", null); - }, - parseQueryResponse: (result: ToriiQueryResult) => { - const vectorResult = this.matchVectorResult(result, "findAllBlocks"); - const blocks = vectorResult.map((i) => i.as("Block")); - - this.log.debug(`findAllBlocks: Total ${blocks.length}`); - return blocks; - }, - }); -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index b7d803f2c7..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,860 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Iroha V2 - * Can perform basic tasks on a Iroha V2 ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * Iroha V2 block response type. - * @export - * @enum {string} - */ - -export const BlockTypeV1 = { - /** - * Default JSON-encoded string full block data. - */ - Raw: 'raw', - /** - * Encoded format that must be decoded with Iroha SDK on client side before use - */ - Binary: 'binary' -} as const; - -export type BlockTypeV1 = typeof BlockTypeV1[keyof typeof BlockTypeV1]; - - -/** - * Error response from the connector. - * @export - * @interface ErrorExceptionResponseV1 - */ -export interface ErrorExceptionResponseV1 { - /** - * Short error description message. - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'message': string; - /** - * Detailed error information. - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'error': string; -} -/** - * Request for generating transaction or query payload that can be signed on the client side. - * @export - * @interface GenerateTransactionRequestV1 - */ -export interface GenerateTransactionRequestV1 { - /** - * - * @type {GenerateTransactionRequestV1Request} - * @memberof GenerateTransactionRequestV1 - */ - 'request': GenerateTransactionRequestV1Request; - /** - * - * @type {Iroha2BaseConfig} - * @memberof GenerateTransactionRequestV1 - */ - 'baseConfig'?: Iroha2BaseConfig; -} -/** - * @type GenerateTransactionRequestV1Request - * @export - */ -export type GenerateTransactionRequestV1Request = IrohaQueryDefinitionV1 | IrohaTransactionDefinitionV1; - -/** - * Iroha V2 account ID. - * @export - * @interface Iroha2AccountId - */ -export interface Iroha2AccountId { - /** - * - * @type {string} - * @memberof Iroha2AccountId - */ - 'name': string; - /** - * - * @type {string} - * @memberof Iroha2AccountId - */ - 'domainId': string; -} -/** - * Iroha V2 connection configuration. - * @export - * @interface Iroha2BaseConfig - */ -export interface Iroha2BaseConfig { - /** - * - * @type {Iroha2BaseConfigTorii} - * @memberof Iroha2BaseConfig - */ - 'torii': Iroha2BaseConfigTorii; - /** - * - * @type {Iroha2AccountId} - * @memberof Iroha2BaseConfig - */ - 'accountId'?: Iroha2AccountId; - /** - * - * @type {Iroha2BaseConfigSigningCredential} - * @memberof Iroha2BaseConfig - */ - 'signingCredential'?: Iroha2BaseConfigSigningCredential; -} -/** - * @type Iroha2BaseConfigSigningCredential - * @export - */ -export type Iroha2BaseConfigSigningCredential = Iroha2KeyPair | KeychainReference; - -/** - * Iroha V2 peer connection information. - * @export - * @interface Iroha2BaseConfigTorii - */ -export interface Iroha2BaseConfigTorii { - /** - * - * @type {string} - * @memberof Iroha2BaseConfigTorii - */ - 'apiURL'?: string; - /** - * - * @type {string} - * @memberof Iroha2BaseConfigTorii - */ - 'telemetryURL'?: string; -} -/** - * Private/Public key JSON containing payload and digest function. - * @export - * @interface Iroha2KeyJson - */ -export interface Iroha2KeyJson { - /** - * - * @type {string} - * @memberof Iroha2KeyJson - */ - 'digestFunction': string; - /** - * - * @type {string} - * @memberof Iroha2KeyJson - */ - 'payload': string; -} -/** - * Pair of Iroha account private and public keys. - * @export - * @interface Iroha2KeyPair - */ -export interface Iroha2KeyPair { - /** - * - * @type {Iroha2KeyJson} - * @memberof Iroha2KeyPair - */ - 'privateKey': Iroha2KeyJson; - /** - * - * @type {string} - * @memberof Iroha2KeyPair - */ - 'publicKey': string; -} -/** - * Command names that correspond to Iroha Special Instructions (https://hyperledger.github.io/iroha-2-docs/guide/advanced/isi.html) - * @export - * @enum {string} - */ - -export const IrohaInstruction = { - /** - * Register new domain - */ - RegisterDomain: 'registerDomain', - /** - * Register new asset definition - */ - RegisterAssetDefinition: 'registerAssetDefinition', - /** - * Register new asset - */ - RegisterAsset: 'registerAsset', - /** - * Mint asset value - */ - MintAsset: 'mintAsset', - /** - * Burn asset value - */ - BurnAsset: 'burnAsset', - /** - * Transfer asset between accounts - */ - TransferAsset: 'transferAsset', - /** - * Register new account - */ - RegisterAccount: 'registerAccount' -} as const; - -export type IrohaInstruction = typeof IrohaInstruction[keyof typeof IrohaInstruction]; - - -/** - * Single Iroha V2 instruction to be executed request. - * @export - * @interface IrohaInstructionRequestV1 - */ -export interface IrohaInstructionRequestV1 { - /** - * Iroha V2 instruction name. - * @type {IrohaInstruction} - * @memberof IrohaInstructionRequestV1 - */ - 'name': IrohaInstruction; - /** - * The list of arguments to pass with specified instruction. - * @type {Array} - * @memberof IrohaInstructionRequestV1 - */ - 'params': Array; -} -/** - * Command names that correspond to Iroha queries (https://hyperledger.github.io/iroha-2-docs/guide/advanced/queries.html) - * @export - * @enum {string} - */ - -export const IrohaQuery = { - /** - * Get list of all registered domains - */ - FindAllDomains: 'findAllDomains', - /** - * Get domain with specified ID - */ - FindDomainById: 'findDomainById', - /** - * Get asset definition with specified ID - */ - FindAssetDefinitionById: 'findAssetDefinitionById', - /** - * Get list of all registered asset definition - */ - FindAllAssetsDefinitions: 'findAllAssetsDefinitions', - /** - * Get asset with specified ID - */ - FindAssetById: 'findAssetById', - /** - * Get list of all registered assets - */ - FindAllAssets: 'findAllAssets', - /** - * Get list of all ledger peers - */ - FindAllPeers: 'findAllPeers', - /** - * Get list of all ledger blocks - */ - FindAllBlocks: 'findAllBlocks', - /** - * Get account with specified ID - */ - FindAccountById: 'findAccountById', - /** - * Get list of all registered accounts - */ - FindAllAccounts: 'findAllAccounts', - /** - * Get list of all transactions - */ - FindAllTransactions: 'findAllTransactions', - /** - * Get transaction with specified hash - */ - FindTransactionByHash: 'findTransactionByHash' -} as const; - -export type IrohaQuery = typeof IrohaQuery[keyof typeof IrohaQuery]; - - -/** - * Iroha V2 query definition. - * @export - * @interface IrohaQueryDefinitionV1 - */ -export interface IrohaQueryDefinitionV1 { - /** - * Name of the query to be executed. - * @type {IrohaQuery} - * @memberof IrohaQueryDefinitionV1 - */ - 'query': IrohaQuery; - /** - * The list of arguments to pass with the query. - * @type {Array} - * @memberof IrohaQueryDefinitionV1 - */ - 'params'?: Array; -} -/** - * Iroha V2 signed query definition - * @export - * @interface IrohaSignedQueryDefinitionV1 - */ -export interface IrohaSignedQueryDefinitionV1 { - /** - * Name of the query to be executed. - * @type {IrohaQuery} - * @memberof IrohaSignedQueryDefinitionV1 - */ - 'query': IrohaQuery; - /** - * Signed query transaction binary data received from generate-transaction endpoint. - * @type {string} - * @memberof IrohaSignedQueryDefinitionV1 - */ - 'payload': string; -} -/** - * Iroha V2 transaction definition - * @export - * @interface IrohaTransactionDefinitionV1 - */ -export interface IrohaTransactionDefinitionV1 { - /** - * - * @type {IrohaTransactionDefinitionV1Instruction} - * @memberof IrohaTransactionDefinitionV1 - */ - 'instruction': IrohaTransactionDefinitionV1Instruction; - /** - * - * @type {IrohaTransactionParametersV1} - * @memberof IrohaTransactionDefinitionV1 - */ - 'params'?: IrohaTransactionParametersV1; -} -/** - * @type IrohaTransactionDefinitionV1Instruction - * @export - */ -export type IrohaTransactionDefinitionV1Instruction = Array | IrohaInstructionRequestV1; - -/** - * Iroha V2 transaction payload parameters - * @export - * @interface IrohaTransactionParametersV1 - */ -export interface IrohaTransactionParametersV1 { - [key: string]: any; - - /** - * BigInt time to live. - * @type {string} - * @memberof IrohaTransactionParametersV1 - */ - 'ttl'?: string; - /** - * BigInt creation time - * @type {string} - * @memberof IrohaTransactionParametersV1 - */ - 'creationTime'?: string; - /** - * Transaction nonce - * @type {number} - * @memberof IrohaTransactionParametersV1 - */ - 'nonce'?: number; -} -/** - * Reference to entry stored in Cactus keychain plugin. - * @export - * @interface KeychainReference - */ -export interface KeychainReference { - /** - * Keychain plugin ID. - * @type {string} - * @memberof KeychainReference - */ - 'keychainId': string; - /** - * Key reference name. - * @type {string} - * @memberof KeychainReference - */ - 'keychainRef': string; -} -/** - * Request to query endpoint. - * @export - * @interface QueryRequestV1 - */ -export interface QueryRequestV1 { - /** - * - * @type {IrohaQueryDefinitionV1} - * @memberof QueryRequestV1 - */ - 'query'?: IrohaQueryDefinitionV1; - /** - * - * @type {IrohaSignedQueryDefinitionV1} - * @memberof QueryRequestV1 - */ - 'signedQuery'?: IrohaSignedQueryDefinitionV1; - /** - * - * @type {Iroha2BaseConfig} - * @memberof QueryRequestV1 - */ - 'baseConfig'?: Iroha2BaseConfig; -} -/** - * Response with the query results. - * @export - * @interface QueryResponseV1 - */ -export interface QueryResponseV1 { - /** - * Query response data that varies between different queries. - * @type {any} - * @memberof QueryResponseV1 - */ - 'response': any; -} -/** - * Request to transact endpoint. - * @export - * @interface TransactRequestV1 - */ -export interface TransactRequestV1 { - /** - * Signed transaction binary data received from generate-transaction endpoint. - * @type {string} - * @memberof TransactRequestV1 - */ - 'signedTransaction'?: string; - /** - * - * @type {IrohaTransactionDefinitionV1} - * @memberof TransactRequestV1 - */ - 'transaction'?: IrohaTransactionDefinitionV1; - /** - * Wait unitl transaction is sent and return the final status (committed / rejected) - * @type {boolean} - * @memberof TransactRequestV1 - */ - 'waitForCommit'?: boolean; - /** - * - * @type {Iroha2BaseConfig} - * @memberof TransactRequestV1 - */ - 'baseConfig'?: Iroha2BaseConfig; -} -/** - * Response from transaction endpoint with operation status. - * @export - * @interface TransactResponseV1 - */ -export interface TransactResponseV1 { - /** - * Hexadecimal hash of the transaction sent to the ledger. - * @type {string} - * @memberof TransactResponseV1 - */ - 'hash': string; - /** - * - * @type {TransactionStatusV1} - * @memberof TransactResponseV1 - */ - 'status': TransactionStatusV1; - /** - * When waitForCommit was suplied and the transaction was rejected, contains the reason of the rejection. - * @type {string} - * @memberof TransactResponseV1 - */ - 'rejectReason'?: string; -} - - -/** - * Status of Iroha V2 transaction. - * @export - * @enum {string} - */ - -export const TransactionStatusV1 = { - /** - * Transaction was submitted to the ledger - use other tools to check if it was accepted and committed. - */ - Submitted: 'submitted', - /** - * Transaction was committed to the ledger. - */ - Committed: 'committed', - /** - * Transaction was rejected. - */ - Rejected: 'rejected' -} as const; - -export type TransactionStatusV1 = typeof TransactionStatusV1[keyof typeof TransactionStatusV1]; - - -/** - * Binary encoded response of block data. - * @export - * @interface WatchBlocksBinaryResponseV1 - */ -export interface WatchBlocksBinaryResponseV1 { - /** - * - * @type {string} - * @memberof WatchBlocksBinaryResponseV1 - */ - 'binaryBlock': string; -} -/** - * Options passed when subscribing to block monitoring. - * @export - * @interface WatchBlocksOptionsV1 - */ -export interface WatchBlocksOptionsV1 { - /** - * - * @type {BlockTypeV1} - * @memberof WatchBlocksOptionsV1 - */ - 'type'?: BlockTypeV1; - /** - * Number of block to start monitoring from. - * @type {string} - * @memberof WatchBlocksOptionsV1 - */ - 'startBlock'?: string; - /** - * - * @type {Iroha2BaseConfig} - * @memberof WatchBlocksOptionsV1 - */ - 'baseConfig'?: Iroha2BaseConfig; -} - - -/** - * Default JSON-encoded string full block data. - * @export - * @interface WatchBlocksRawResponseV1 - */ -export interface WatchBlocksRawResponseV1 { - /** - * - * @type {string} - * @memberof WatchBlocksRawResponseV1 - */ - 'blockData': string; -} -/** - * @type WatchBlocksResponseV1 - * @export - */ -export type WatchBlocksResponseV1 = ErrorExceptionResponseV1 | WatchBlocksBinaryResponseV1 | WatchBlocksRawResponseV1; - -/** - * Websocket requests for monitoring new blocks. - * @export - * @enum {string} - */ - -export const WatchBlocksV1 = { - Subscribe: 'org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Subscribe', - Next: 'org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Next', - Unsubscribe: 'org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Unsubscribe', - Error: 'org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Error', - Complete: 'org.hyperledger.cactus.api.async.hliroha2.WatchBlocksV1.Complete' -} as const; - -export type WatchBlocksV1 = typeof WatchBlocksV1[keyof typeof WatchBlocksV1]; - - - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Generate transaction that can be signed locally. - * @param {GenerateTransactionRequestV1} [generateTransactionRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateTransactionV1: async (generateTransactionRequestV1?: GenerateTransactionRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/generate-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(generateTransactionRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Executes a query on a Iroha V2 ledger and returns it\'s results. - * @param {QueryRequestV1} [queryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - queryV1: async (queryRequestV1?: QueryRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(queryRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Executes a transaction on a Iroha V2 ledger (by sending some instructions) - * @param {TransactRequestV1} [transactRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - transactV1: async (transactRequestV1?: TransactRequestV1, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transactRequestV1, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Generate transaction that can be signed locally. - * @param {GenerateTransactionRequestV1} [generateTransactionRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async generateTransactionV1(generateTransactionRequestV1?: GenerateTransactionRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.generateTransactionV1(generateTransactionRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Executes a query on a Iroha V2 ledger and returns it\'s results. - * @param {QueryRequestV1} [queryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async queryV1(queryRequestV1?: QueryRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.queryV1(queryRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Executes a transaction on a Iroha V2 ledger (by sending some instructions) - * @param {TransactRequestV1} [transactRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async transactV1(transactRequestV1?: TransactRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.transactV1(transactRequestV1, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Generate transaction that can be signed locally. - * @param {GenerateTransactionRequestV1} [generateTransactionRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateTransactionV1(generateTransactionRequestV1?: GenerateTransactionRequestV1, options?: any): AxiosPromise { - return localVarFp.generateTransactionV1(generateTransactionRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Executes a query on a Iroha V2 ledger and returns it\'s results. - * @param {QueryRequestV1} [queryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - queryV1(queryRequestV1?: QueryRequestV1, options?: any): AxiosPromise { - return localVarFp.queryV1(queryRequestV1, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Executes a transaction on a Iroha V2 ledger (by sending some instructions) - * @param {TransactRequestV1} [transactRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - transactV1(transactRequestV1?: TransactRequestV1, options?: any): AxiosPromise { - return localVarFp.transactV1(transactRequestV1, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Generate transaction that can be signed locally. - * @param {GenerateTransactionRequestV1} [generateTransactionRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public generateTransactionV1(generateTransactionRequestV1?: GenerateTransactionRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).generateTransactionV1(generateTransactionRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Executes a query on a Iroha V2 ledger and returns it\'s results. - * @param {QueryRequestV1} [queryRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public queryV1(queryRequestV1?: QueryRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).queryV1(queryRequestV1, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Executes a transaction on a Iroha V2 ledger (by sending some instructions) - * @param {TransactRequestV1} [transactRequestV1] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public transactV1(transactRequestV1?: TransactRequestV1, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).transactV1(transactRequestV1, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index a1496aee98..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Iroha V2 - * Can perform basic tasks on a Iroha V2 ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 16816b22a9..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Iroha V2 - * Can perform basic tasks on a Iroha V2 ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 2230207df2..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Iroha V2 - * Can perform basic tasks on a Iroha V2 ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 135272844c..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Iroha V2 - * Can perform basic tasks on a Iroha V2 ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/index.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/index.web.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/index.web.ts deleted file mode 100755 index bdf54028d2..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/iroha-sign-utils.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/iroha-sign-utils.ts deleted file mode 100644 index 502d654141..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/iroha-sign-utils.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * Signing utility functions for HL Iroha V2 ledger. - * Remember to free key objects supplied to the signing methods. - */ - -import { - Signer, - makeVersionedSignedTransaction, - makeVersionedSignedQuery, -} from "@iroha2/client"; -import { - QueryPayload, - TransactionPayload, - VersionedSignedQueryRequest, - VersionedSignedTransaction, -} from "@iroha2/data-model"; - -import { generateIrohaV2KeyPair } from "./cactus-iroha-sdk-wrapper/client"; -import { createAccountId } from "./cactus-iroha-sdk-wrapper/data-factories"; -import { Iroha2KeyPair } from "./public-api"; - -/** - * Create IrohaV2 SDK Signer object. - * - * @param accountName signer account name. - * @param domainName signer account domain. - * @param keyPair public and private keys to sign with. - * - * @returns Signer for supplied credentials. - */ -function getSigner( - accountName: string, - domainName: string, - keyPair: Iroha2KeyPair, -): Signer { - const account = createAccountId(accountName, domainName); - const irohaKeyPair = generateIrohaV2KeyPair( - keyPair.publicKey, - keyPair.privateKey, - ); - - return new Signer(account, irohaKeyPair); -} - -/** - * Sign transaction binary received from `GenerateTransactionV1` endpoint. - * - * @param serializedTx serialized unsigned transaction from the connector (`Uint8Array`). - * @param accountName signer account name. - * @param domainName signer account domain. - * @param keyPair public and private keys to sign with. - * - * @returns serialied signed transaction ready to be sent (`Uint8Array`) - */ -export function signIrohaV2Transaction( - serializedTx: Uint8Array, - accountName: string, - domainName: string, - keyPair: Iroha2KeyPair, -): Uint8Array { - const unsignedTx = TransactionPayload.fromBuffer(serializedTx); - const signer = getSigner(accountName, domainName, keyPair); - const signedTx = makeVersionedSignedTransaction(unsignedTx, signer); - return VersionedSignedTransaction.toBuffer(signedTx); -} - -/** - * Sign query payload received from `GenerateTransactionV1` endpoint. - * - * @param serializedQuery serialized unsigned query from the connector (`Uint8Array`). - * @param accountName signer account name. - * @param domainName signer account domain. - * @param keyPair public and private keys to sign with. - * - * @returns serialied signed transaction ready to be sent (`Uint8Array`) - */ -export function signIrohaV2Query( - serializedQuery: Uint8Array, - accountName: string, - domainName: string, - keyPair: Iroha2KeyPair, -): Uint8Array { - const unsignedQueryReq = QueryPayload.fromBuffer(serializedQuery); - const signer = getSigner(accountName, domainName, keyPair); - const queryReq = makeVersionedSignedQuery(unsignedQueryReq, signer); - return VersionedSignedQueryRequest.toBuffer(queryReq); -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/plugin-factory-ledger-connector.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/plugin-factory-ledger-connector.ts deleted file mode 100644 index fba8cf8b02..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginLedgerConnectorIroha2Options, - PluginLedgerConnectorIroha2, -} from "./plugin-ledger-connector-iroha2"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorIroha2, - IPluginLedgerConnectorIroha2Options, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorIroha2Options, - ): Promise { - return new PluginLedgerConnectorIroha2(pluginOptions); - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/plugin-ledger-connector-iroha2.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/plugin-ledger-connector-iroha2.ts deleted file mode 100644 index 48ad6e142d..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/plugin-ledger-connector-iroha2.ts +++ /dev/null @@ -1,721 +0,0 @@ -/** - * Main IrohaV2 connector plugin class logic. - */ - -import type { Express } from "express"; -import type { - Server as SocketIoServer, - Socket as SocketIoSocket, -} from "socket.io"; - -import OAS from "../json/openapi.json"; - -import { - ConsensusAlgorithmFamily, - IPluginLedgerConnector, - IWebServiceEndpoint, - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; - -import { - consensusHasTransactionFinality, - PluginRegistry, -} from "@hyperledger/cactus-core"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { - IrohaInstruction, - IrohaQuery, - TransactRequestV1, - TransactResponseV1, - Iroha2BaseConfig, - Iroha2KeyJson, - Iroha2KeyPair, - KeychainReference, - QueryRequestV1, - QueryResponseV1, - IrohaInstructionRequestV1, - WatchBlocksV1, - WatchBlocksOptionsV1, - GenerateTransactionRequestV1, - IrohaTransactionParametersV1, -} from "./generated/openapi/typescript-axios"; - -import { Iroha2TransactEndpointV1 } from "./web-services/transact-v1-endpoint"; -import { Iroha2QueryEndpointV1 } from "./web-services/query-v1-endpoint"; -import { Iroha2WatchBlocksEndpointV1 } from "./web-services/watch-blocks-v1-endpoint"; -import { Iroha2GenerateTransactionEndpointV1 } from "./web-services/generate-transaction-v1-endpoint"; - -import { KeyPair } from "@iroha2/crypto-core"; -import { - CactusIrohaV2Client, - generateIrohaV2KeyPair, - TransactionPayloadParameters, -} from "./cactus-iroha-sdk-wrapper/client"; -import { CactusIrohaV2QueryClient } from "./cactus-iroha-sdk-wrapper/query"; -import { LengthOf, stringifyBigIntReplacer } from "./utils"; -import { createAccountId } from "./cactus-iroha-sdk-wrapper/data-factories"; - -/** - * Input options for PluginLedgerConnectorIroha2. - */ -export interface IPluginLedgerConnectorIroha2Options - extends ICactusPluginOptions { - pluginRegistry: PluginRegistry; - logLevel?: LogLevelDesc; - defaultConfig?: Iroha2BaseConfig; -} - -/** - * Iroha V2 connector plugin. - */ -export class PluginLedgerConnectorIroha2 - implements - IPluginLedgerConnector, - ICactusPlugin, - IPluginWebService -{ - private readonly instanceId: string; - private readonly log: Logger; - private readonly defaultConfig: Iroha2BaseConfig | undefined; - private endpoints: IWebServiceEndpoint[] | undefined; - private runningWatchBlocksMonitors = new Set(); - - public readonly className: string; - - constructor(public readonly options: IPluginLedgerConnectorIroha2Options) { - this.className = this.constructor.name; - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - - const level = this.options.logLevel || "info"; - this.log = LoggerProvider.getOrCreate({ level, label: this.className }); - - this.instanceId = options.instanceId; - - this.defaultConfig = options.defaultConfig; - // Remove proto in case we use merge method vulnerable to proto pollution - if (this.defaultConfig instanceof Object) { - Object.setPrototypeOf(this.defaultConfig, null); - } - } - - /** - * Iroha V2 ledger consensus family - */ - async getConsensusAlgorithmFamily(): Promise { - return ConsensusAlgorithmFamily.Authority; - } - - /** - * Iroha V2 ledger transaction finality - */ - public async hasTransactionFinality(): Promise { - const currentConsensusAlgorithmFamily = - await this.getConsensusAlgorithmFamily(); - return consensusHasTransactionFinality(currentConsensusAlgorithmFamily); - } - - /** - * - * @returns Open API JSON specification. - */ - public getOpenApiSpec(): unknown { - return OAS; - } - - /** - * @warning Method not implemented - do not use! - */ - public deployContract(): Promise { - throw new Error("Method not implemented."); - } - - public getInstanceId(): string { - return this.instanceId; - } - - /** - * Callback that should be called during plugin initialization. - * @returns Void - */ - public async onPluginInit(): Promise { - // Nothing to do... - return; - } - - /** - * Callback that must be called during shutdown. - * Will cleanup allocated resources, stop the connections. - */ - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - this.runningWatchBlocksMonitors.forEach((m) => m.close()); - this.runningWatchBlocksMonitors.clear(); - } - - /** - * Register all supported WebSocket endpoints on specific socket connected to the client. - * - * @param socket Connected socket - * @returns `socket` from input arg. - */ - private registerWatchBlocksSocketIOEndpoint( - socket: SocketIoSocket, - ): SocketIoSocket { - this.log.debug("Register WatchBlocks.Subscribe handler."); - - socket.on( - WatchBlocksV1.Subscribe, - async (options: WatchBlocksOptionsV1) => { - const apiURL = options.baseConfig?.torii.apiURL; - if (!apiURL) { - socket.emit(WatchBlocksV1.Error, { - message: "WatchBlocksV1.Subscribe error", - error: "WatchBlocksV1.Subscribe requires apiURL torii parameter", - }); - return socket; - } - - // Start monitoring - const monitor = new Iroha2WatchBlocksEndpointV1({ - socket, - logLevel: this.options.logLevel, - apiURL, - }); - this.runningWatchBlocksMonitors.add(monitor); - await monitor.subscribe(options); - this.log.debug( - "Running monitors count:", - this.runningWatchBlocksMonitors.size, - ); - - socket.on("disconnect", async () => { - this.runningWatchBlocksMonitors.delete(monitor); - this.log.debug( - "Running monitors count:", - this.runningWatchBlocksMonitors.size, - ); - }); - }, - ); - - return socket; - } - - /** - * Register Rest and WebSocket services on servers supplied in argument. - * Should be called by cactus cmd server. - * - * @param app ExpressJS app object. - * @param wsApi SocketIO server object. - * @returns registered endpoints list. - */ - async registerWebServices( - app: Express, - wsApi: SocketIoServer, - ): Promise { - // Add custom replacer to handle bigint responses correctly - app.set("json replacer", stringifyBigIntReplacer); - - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - - if (wsApi) { - wsApi.on("connection", (socket: SocketIoSocket) => { - this.log.debug(`New Socket connected. ID=${socket.id}`); - this.registerWatchBlocksSocketIOEndpoint(socket); - }); - } - - return webServices; - } - - /** - * Get list of rest endpoints supported by this connector plugin. - * The list is initialized once and reused on subsequent calls. - * - * @returns List of web service endpoints. - */ - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const endpoints: IWebServiceEndpoint[] = [ - new Iroha2TransactEndpointV1({ - connector: this, - logLevel: this.options.logLevel, - }), - new Iroha2QueryEndpointV1({ - connector: this, - logLevel: this.options.logLevel, - }), - new Iroha2GenerateTransactionEndpointV1({ - connector: this, - logLevel: this.options.logLevel, - }), - ]; - - this.endpoints = endpoints; - return endpoints; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-ledger-connector-iroha2`; - } - - /** - * Read entry with `keychainRef` from keychain with id `keychainId`. - * Assume it's stored in JSON-compatible format. - * - * @param keychainId keychain plugin ID. - * @param keychainRef entry key. - * @returns parsed entry value. - */ - private async getFromKeychain(keychainId: string, keychainRef: string) { - const keychain = - this.options.pluginRegistry.findOneByKeychainId(keychainId); - return JSON.parse(await keychain.get(keychainRef)); - } - - /** - * Return Iroha V2 SDK client compatible key pair object. - * - * @param signingCredentials Credentials received from the client in the request. - * @returns Iroha V2 SDK `KeyPair` object. - */ - private async getSigningKeyPair( - signingCredentials: Iroha2KeyPair | KeychainReference, - ): Promise { - Checks.truthy( - signingCredentials, - "getSigningKeyPair() signingCredentials arg", - ); - - let publicKeyString: string; - let privateKeyJson: Iroha2KeyJson; - if ("keychainId" in signingCredentials) { - this.log.debug("getSigningKeyPair() read from keychain plugin"); - const keychainStoredKey = await this.getFromKeychain( - signingCredentials.keychainId, - signingCredentials.keychainRef, - ); - publicKeyString = keychainStoredKey.publicKey; - privateKeyJson = keychainStoredKey.privateKey; - } else { - this.log.debug( - "getSigningKeyPair() read directly from signingCredentials", - ); - publicKeyString = signingCredentials.publicKey; - privateKeyJson = signingCredentials.privateKey; - } - - Checks.truthy(publicKeyString, "getSigningKeyPair raw public key"); - Checks.truthy(privateKeyJson, "getSigningKeyPair raw private key json"); - - return generateIrohaV2KeyPair(publicKeyString, privateKeyJson); - } - - /** - * Create Cactus IrohaV2 client using both defaultConfig (defined during class creation) - * and config specified in arg. - * - * @param baseConfig Iroha V2 base connection configuration. - * @returns `CactusIrohaV2Client` - */ - public async createClient( - baseConfig?: Iroha2BaseConfig, - ): Promise { - if (!baseConfig && !this.defaultConfig) { - throw new Error( - "createClient() called without valid Iroha config - fail", - ); - } - - // Merge default config with config passed to this function - const mergedConfig = { ...this.defaultConfig, ...baseConfig }; - - if (!mergedConfig.torii) { - throw new Error("torii is missing in combined configuration"); - } - - // Parse signing key pair - let keyPair: KeyPair | undefined; - if (mergedConfig.signingCredential) { - keyPair = await this.getSigningKeyPair(mergedConfig.signingCredential); - } - - // Parse account ID - if (!mergedConfig.accountId) { - throw new Error("accountId is missing in combined configuration"); - } - const accountId = createAccountId( - mergedConfig.accountId.name, - mergedConfig.accountId.domainId, - ); - - return new CactusIrohaV2Client( - { - apiURL: mergedConfig.torii.apiURL, - telemetryURL: mergedConfig.torii.telemetryURL, - }, - accountId, - keyPair, - this.options.logLevel, - ); - } - - /** - * Get context for specific query (e.g. it `request` or `payload` methods.). - * - * @param client `CactusIrohaV2QueryClient` instance. - * @param query Name of the query (`IrohaQuery`). - * - * @returns Query Context - */ - public getQueryContext( - client: CactusIrohaV2QueryClient, - query: IrohaQuery, - ): { - request: (...params: any[]) => Promise; - payload: (...params: any[]) => Promise; - requestSigned: (signedPayload: ArrayBufferView) => Promise; - } { - switch (query) { - case IrohaQuery.FindAllDomains: - return client.findAllDomains; - case IrohaQuery.FindDomainById: - return client.findDomainById; - case IrohaQuery.FindAssetDefinitionById: - return client.findAssetDefinitionById; - case IrohaQuery.FindAllAssetsDefinitions: - return client.findAllAssetsDefinitions; - case IrohaQuery.FindAssetById: - return client.findAssetById; - case IrohaQuery.FindAllAssets: - return client.findAllAssets; - case IrohaQuery.FindAllPeers: - return client.findAllPeers; - case IrohaQuery.FindAccountById: - return client.findAccountById; - case IrohaQuery.FindAllAccounts: - return client.findAllAccounts; - case IrohaQuery.FindAllTransactions: - return client.findAllTransactions; - case IrohaQuery.FindTransactionByHash: - return client.findTransactionByHash; - case IrohaQuery.FindAllBlocks: - return client.findAllBlocks; - default: - const unknownType: never = query; - throw new Error( - `Unknown IrohaV2 query - '${unknownType}'. Check name and connector version.`, - ); - } - } - - /** - * Helper function used to safely check that required number of parameters were supplied in the request. - * - * @param params Parameter list from the request. - * @param expectedCount Expected parameter count - * @param functionName Function that needs specified number of args (used for error logging only) - * - * @returns List of checked parameters (of `expectedCount` length). - */ - private checkArgsCount( - params: unknown[] | undefined, - expectedCount: number, - functionName: string, - ): unknown[] { - if (!params) { - throw new Error( - `Error [${functionName}] - Missing required parameters in request.`, - ); - } - - const requiredParams = params.slice(0, expectedCount); - - if (requiredParams.length < expectedCount) { - throw new Error( - `Error [${functionName}] - No enough parameters. Expected: ${expectedCount}, got: ${requiredParams.length}`, - ); - } - - return requiredParams; - } - - /** - * Validate required parameters and call transact method - * (will add instruction to the list of operations to be executed) - * - * @note `expectedCount` must be equal to number of args required by `transactFunction`, - * otherwise the code will not compile (this is intended safety-check) - * - * @param client `CactusIrohaV2Client` object. - * @param transactFunction Transact function to be executed - * @param params Parameter list from the request. - * @param expectedCount Expected parameter count - */ - private addTransactionWithCheckedParams< - T extends (...args: any[]) => unknown, - >( - client: CactusIrohaV2Client, - transactFunction: T, - params: unknown[] | undefined, - expectedCount: LengthOf>, - ): void { - const validatedArgs = this.checkArgsCount( - params, - expectedCount, - transactFunction.name, - ); - transactFunction.apply(client, validatedArgs); - } - - /** - * Loop through each instruction in `reqInstruction` and add them to current transaction session in `client`. - * - * @param client `CactusIrohaV2Client` instance. - * @param reqInstruction Single or list of Iroha instructions to be added. - */ - private processInstructionsRequests( - client: CactusIrohaV2Client, - reqInstruction: IrohaInstructionRequestV1 | IrohaInstructionRequestV1[], - ): void { - Checks.truthy(client, "processInstructionsRequests client"); - Checks.truthy( - reqInstruction, - "processInstructionsRequests instructions in request", - ); - - // Convert single instruction scenario to list with one element - // (both single and multiple instructions are supported) - let instructions: IrohaInstructionRequestV1[]; - if (Array.isArray(reqInstruction)) { - instructions = reqInstruction; - } else { - instructions = [reqInstruction]; - } - - // Each command adds an instruction to a list included in the final transaction. - instructions.forEach((cmd) => { - switch (cmd.name) { - case IrohaInstruction.RegisterDomain: - this.addTransactionWithCheckedParams( - client, - CactusIrohaV2Client.prototype.registerDomain, - cmd.params, - 1, - ); - break; - case IrohaInstruction.RegisterAssetDefinition: - this.addTransactionWithCheckedParams( - client, - CactusIrohaV2Client.prototype.registerAssetDefinition, - cmd.params, - 4, - ); - break; - case IrohaInstruction.RegisterAsset: - this.addTransactionWithCheckedParams( - client, - CactusIrohaV2Client.prototype.registerAsset, - cmd.params, - 5, - ); - break; - case IrohaInstruction.MintAsset: - this.addTransactionWithCheckedParams( - client, - CactusIrohaV2Client.prototype.mintAsset, - cmd.params, - 5, - ); - break; - case IrohaInstruction.BurnAsset: - this.addTransactionWithCheckedParams( - client, - CactusIrohaV2Client.prototype.burnAsset, - cmd.params, - 5, - ); - break; - case IrohaInstruction.TransferAsset: - this.addTransactionWithCheckedParams( - client, - CactusIrohaV2Client.prototype.transferAsset, - cmd.params, - 7, - ); - break; - case IrohaInstruction.RegisterAccount: - this.addTransactionWithCheckedParams( - client, - CactusIrohaV2Client.prototype.registerAccount, - cmd.params, - 4, - ); - break; - default: - const unknownType: never = cmd.name; - throw new Error( - `Unknown IrohaV2 instruction - '${unknownType}'. Check name and connector version.`, - ); - } - }); - } - - /** - * Try parsing transaction parameter from request to IrohaV2 SDK compatible format. - * If input is empty, undefined is returned. - * - * @param reqParams transaction parameters from connector request. - * @returns `TransactionPayloadParameters` or `undefined` - */ - private tryParseTransactionParams( - reqParams?: IrohaTransactionParametersV1, - ): TransactionPayloadParameters | undefined { - if (!reqParams) { - return undefined; - } - - return { - ttl: reqParams.ttl ? BigInt(reqParams.ttl) : undefined, - creationTime: reqParams.creationTime - ? BigInt(reqParams.creationTime) - : undefined, - nonce: reqParams.nonce, - }; - } - - /** - * Transact endpoint logic. - * To submit transaction you must provide either signed transaction payload or list of instructions with signingCredential. - * - * @param req Request object. - * - * @returns Status of the operation. - */ - public async transact(req: TransactRequestV1): Promise { - const fnTag = `${this.className}:transact()`; - const client = await this.createClient(req.baseConfig); - - try { - if (req.transaction) { - this.processInstructionsRequests(client, req.transaction.instruction); - return await client.send( - this.tryParseTransactionParams(req.transaction.params), - req.waitForCommit, - ); - } else if (req.signedTransaction) { - const signedTxB64 = Buffer.from(req.signedTransaction, "base64"); - const transactionBinary = Uint8Array.from(signedTxB64); - - return await client.sendSignedPayload( - transactionBinary, - req.waitForCommit, - ); - } else { - const eMsg = - `${fnTag} To submit transaction you must provide either signed transaction` + - ` payload (.signedTransaction) or list of instructions with signingCredential`; - throw new Error(eMsg); - } - } finally { - client.free(); - } - } - - /** - * Query endpoint logic. - * To send query request you must provide either signed query payload or query definition with signingCredential. - * - * @param req Request object. - * - * @returns Response from the query. - */ - public async query(req: QueryRequestV1): Promise { - const client = await this.createClient(req.baseConfig); - - try { - if (req.query) { - const queryContext = this.getQueryContext( - client.query, - req.query.query, - ); - - const params = req.query.params ?? []; - return { - response: await queryContext.request(...params), - }; - } else if (req.signedQuery) { - const queryContext = this.getQueryContext( - client.query, - req.signedQuery.query, - ); - - const payloadBuffer = Buffer.from(req.signedQuery.payload, "base64"); - const queryBinary = Uint8Array.from(payloadBuffer); - - return { - response: await queryContext.requestSigned(queryBinary), - }; - } else { - throw new Error( - "To submit transaction you must provide either signed transaction payload or query description with signingCredential", - ); - } - } finally { - client.free(); - } - } - - /** - * Query endpoint logic. - * - * @param req Request object. - * @returns Binary unsigned transaction. - */ - public async generateTransaction( - req: GenerateTransactionRequestV1, - ): Promise { - const client = await this.createClient(req.baseConfig); - - try { - if ("instruction" in req.request) { - this.processInstructionsRequests(client, req.request.instruction); - const txParams = this.tryParseTransactionParams(req.request.params); - const payloadTypedArray = client.getTransactionPayloadBuffer(txParams); - const payloadBuffer = Buffer.from(payloadTypedArray); - const payloadBase64 = payloadBuffer.toString("base64"); - return payloadBase64; - } else if ("query" in req.request) { - const queryContext = this.getQueryContext( - client.query, - req.request.query, - ); - - const params = req.request.params ?? []; - const payloadTypedArray = await queryContext.payload(...params); - const payloadBuffer = Buffer.from(payloadTypedArray); - const payloadBase64 = payloadBuffer.toString("base64"); - return payloadBase64; - } else { - throw new Error("Missing required transaction or query definition"); - } - } finally { - client.free(); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/public-api.ts deleted file mode 100755 index b80cc9725d..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/public-api.ts +++ /dev/null @@ -1,24 +0,0 @@ -export { - IPluginLedgerConnectorIroha2Options, - PluginLedgerConnectorIroha2, -} from "./plugin-ledger-connector-iroha2"; - -export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export * from "./generated/openapi/typescript-axios/api"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} - -export { - Iroha2ApiClient, - Iroha2ApiClientOptions, -} from "./api-client/iroha2-api-client"; - -export { signIrohaV2Transaction } from "./iroha-sign-utils"; diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/utils.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/utils.ts deleted file mode 100644 index 82df30b633..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/utils.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Small utility functions reused throughout the connector. - */ - -import sanitizeHtml from "sanitize-html"; -import safeStringify from "fast-safe-stringify"; - -/** - * Abstract type that corresponds to length of supplied iterable ('1', '2', etc...) - */ -export type LengthOf> = T["length"]; - -/** - * Return secure string representation of error from the input. - * Handles circular structures and removes HTML.` - * - * @param error Any object to return as an error, preferable `Error` - * @returns Safe string representation of an error. - * - * @todo use one from cactus-common after #2089 is merged. - */ -export function safeStringifyException(error: unknown): string { - if (error instanceof Error) { - return sanitizeHtml(error.stack || error.message); - } - - return sanitizeHtml(safeStringify(error)); -} - -/** - * `JSON.stringify` replacer function to handle BigInt. - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json - */ -export function stringifyBigIntReplacer(key: string, value: bigint): string { - if (typeof value === "bigint") { - return value.toString(); - } - return value; -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/generate-transaction-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/generate-transaction-v1-endpoint.ts deleted file mode 100644 index 0e374cdab0..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/generate-transaction-v1-endpoint.ts +++ /dev/null @@ -1,110 +0,0 @@ -/** - * ExpressJS `generateTransaction` endpoint - */ - -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorIroha2 } from "../plugin-ledger-connector-iroha2"; -import { safeStringifyException } from "../utils"; - -import OAS from "../../json/openapi.json"; - -export interface IGenerateTransactionOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorIroha2; -} - -export class Iroha2GenerateTransactionEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "GenerateTransaction"; - - private readonly log: Logger; - - public get className(): string { - return Iroha2GenerateTransactionEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IGenerateTransactionOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): any { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/generate-transaction" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - - try { - const txPayload = await this.options.connector.generateTransaction( - req.body, - ); - res.send(txPayload); - } catch (ex) { - this.log.warn(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/query-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/query-v1-endpoint.ts deleted file mode 100644 index 2a3a6789cf..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/query-v1-endpoint.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * ExpressJS `query` endpoint - */ - -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorIroha2 } from "../plugin-ledger-connector-iroha2"; -import { safeStringifyException } from "../utils"; - -import OAS from "../../json/openapi.json"; - -export interface IIroha2QueryEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorIroha2; -} - -export class Iroha2QueryEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "Iroha2QueryEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return Iroha2QueryEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IIroha2QueryEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): any { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/query" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.query(reqBody); - res.json(resBody); - } catch (ex) { - this.log.warn(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/transact-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/transact-v1-endpoint.ts deleted file mode 100644 index 6066495d46..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/transact-v1-endpoint.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * ExpressJS `transact` endpoint - */ - -import type { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorIroha2 } from "../plugin-ledger-connector-iroha2"; -import { safeStringifyException } from "../utils"; - -import OAS from "../../json/openapi.json"; - -export interface IIroha2TransactEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorIroha2; -} - -export class Iroha2TransactEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "Iroha2TransactEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return Iroha2TransactEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IIroha2TransactEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): any { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-iroha2/transact" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.transact(reqBody); - res.json(resBody); - } catch (ex) { - this.log.warn(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts deleted file mode 100644 index bcc7408f41..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * SocketIO `WatchBlocks` endpoint - */ - -import type { Socket as SocketIoSocket } from "socket.io"; - -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, -} from "@hyperledger/cactus-common"; - -import { - WatchBlocksV1, - WatchBlocksOptionsV1, - WatchBlocksResponseV1, - BlockTypeV1, -} from "../generated/openapi/typescript-axios"; - -import { safeStringifyException, stringifyBigIntReplacer } from "../utils"; - -import { Torii as ToriiClient } from "@iroha2/client"; - -import safeStringify from "fast-safe-stringify"; -import { VersionedCommittedBlock } from "@iroha2/data-model"; -import { IrohaV2PrerequisitesProvider } from "../cactus-iroha-sdk-wrapper/prerequisites-provider"; - -/** - * Iroha2WatchBlocksEndpointV1 configuration. - */ -export interface IIroha2WatchBlocksEndpointV1Configuration { - logLevel?: LogLevelDesc; - socket: SocketIoSocket; - apiURL: string; -} - -/** - * Endpoint to watch for new blocks on Iroha V2 ledger and report them - * to the client using socketio. - */ -export class Iroha2WatchBlocksEndpointV1 { - public readonly className = "Iroha2WatchBlocksEndpointV1"; - private readonly log: Logger; - private readonly socket: SocketIoSocket< - Record void> - >; - private readonly prerequisitesProvider: IrohaV2PrerequisitesProvider; - - constructor( - public readonly config: IIroha2WatchBlocksEndpointV1Configuration, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(config, `${fnTag} arg options`); - Checks.truthy(config.socket, `${fnTag} arg options.socket`); - Checks.truthy(config.apiURL, `${fnTag} arg options.apiURL`); - - this.socket = config.socket; - this.prerequisitesProvider = new IrohaV2PrerequisitesProvider( - config.apiURL, - ); - const level = this.config.logLevel || "info"; - this.log = LoggerProvider.getOrCreate({ level, label: this.className }); - } - - /** - * Subscribe to new blocks on Iroha V2 ledger, push them to the client via SocketIO. - * - * @param options Block monitoring options. - */ - public async subscribe(options: WatchBlocksOptionsV1): Promise { - const { socket, log } = this; - const clientId = socket.id; - log.info( - `${WatchBlocksV1.Subscribe} => clientId: ${clientId}, startBlock: ${options.startBlock}`, - ); - - try { - const height = options.startBlock ?? "0"; - const blockType = options.type ?? BlockTypeV1.Raw; - const blockMonitor = await ToriiClient.listenForBlocksStream( - this.prerequisitesProvider.getApiWebSocketProperties(), - { - height: BigInt(height), - }, - ); - - // Handle events - blockMonitor.ee.on("open", (openEvent) => { - log.debug("listenForBlocksStream open:", safeStringify(openEvent)); - }); - - blockMonitor.ee.on("close", (closeEvent) => { - log.debug("listenForBlocksStream close:", safeStringify(closeEvent)); - }); - - blockMonitor.ee.on("error", (error) => { - const errorMessage = safeStringify(error); - log.warn("listenForBlocksStream error:", errorMessage); - socket.emit(WatchBlocksV1.Error, { - message: "listenForBlocksStream error event", - error: errorMessage, - }); - }); - - blockMonitor.ee.on("block", (block) => { - try { - switch (blockType) { - case BlockTypeV1.Raw: - socket.emit(WatchBlocksV1.Next, { - blockData: JSON.stringify(block, stringifyBigIntReplacer), - }); - break; - case BlockTypeV1.Binary: { - const asU8Array = VersionedCommittedBlock.toBuffer(block); - const asB64Str = Buffer.from(asU8Array).toString("base64"); - socket.emit(WatchBlocksV1.Next, { - binaryBlock: asB64Str, - }); - break; - } - default: - const unknownType: never = blockType; - throw new Error( - `Unknown block listen type - '${unknownType}'. Check name and connector version.`, - ); - } - } catch (error) { - const errorMessage = safeStringifyException(error); - log.warn( - "listenForBlocksStream block serialization error:", - errorMessage, - ); - socket.emit(WatchBlocksV1.Error, { - message: "listenForBlocksStream onBlock event error", - error: errorMessage, - }); - } - }); - - socket.on("disconnect", async (reason: string) => { - log.info( - "WebSocket:disconnect => reason=%o clientId=%s", - reason, - clientId, - ); - blockMonitor.ee.clearListeners(); - await blockMonitor.stop(); - }); - - socket.on(WatchBlocksV1.Unsubscribe, () => { - log.info(`${WatchBlocksV1.Unsubscribe} => clientId: ${clientId}`); - this.close(); - }); - } catch (error) { - const errorMessage = safeStringifyException(error); - log.error(errorMessage); - socket.emit(WatchBlocksV1.Error, { - message: "WatchBlocksV1 Exception", - error: errorMessage, - }); - } - } - - close(): void { - if (this.socket.connected) { - this.socket.disconnect(true); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-generate-and-send-signed-transaction.test.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-generate-and-send-signed-transaction.test.ts deleted file mode 100644 index 07ac3e53ed..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-generate-and-send-signed-transaction.test.ts +++ /dev/null @@ -1,616 +0,0 @@ -/** - * Tests for sending transactions to Iroha V2 without sharing private key with the connector. - * Transactions are signed on the client side. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Log settings -const testLogLevel: LogLevelDesc = "debug"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; - -import { - IrohaInstruction, - IrohaQuery, - signIrohaV2Transaction, - TransactionStatusV1, -} from "../../../main/typescript/public-api"; -import { - generateTestIrohaCredentials, - IrohaV2TestEnv, -} from "../test-helpers/iroha2-env-setup"; -import { addRandomSuffix } from "../test-helpers/utils"; - -import "jest-extended"; -import { TransactionPayload } from "@iroha2/data-model"; -import { signIrohaV2Query } from "../../../main/typescript/iroha-sign-utils"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "generate-and-send-signed-transaction.test", - level: testLogLevel, -}); - -/** - * Main test suite - */ -describe("Generate and send signed transaction tests", () => { - let env: IrohaV2TestEnv; - - beforeAll(async () => { - env = new IrohaV2TestEnv(log); - await env.start(); - }); - - afterAll(async () => { - if (env) { - await env.stop(); - } - }); - - ////////////////////////////////// - // Test Helpers - ////////////////////////////////// - - /** - * Helper function to check if domain with specified `domainName` was correctly created. - * Asserts the response from the connector query. - * - * @param domainName Name of the domain existing on test ledger. - */ - async function assertDomainExistence(domainName: string): Promise { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindDomainById, - params: [domainName], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(queryResponse.data.response.id).toBeTruthy(); - expect(queryResponse.data.response.id.name).toEqual(domainName); - } - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - /** - * Create new domain with regular `transact` request to assert the ledger is working correctly. - */ - test("Sanity check if regular create domain transaction works", async () => { - const domainName = addRandomSuffix("sanityTestDomain"); - expect(domainName).toBeTruthy(); - - // Create new domain - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - - // Check if domain was created - await assertDomainExistence(domainName); - }); - - /** - * Create new domain with transaction signed on the client side. - */ - test("Sign transaction on the client (BLP) side", async () => { - const domainName = addRandomSuffix("genNewDomainTx"); - expect(domainName).toBeTruthy(); - - // 1. Generate transaction - const genTxResponse = await env.apiClient.generateTransactionV1({ - request: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(genTxResponse).toBeTruthy(); - expect(genTxResponse.data).toBeTruthy(); - expect(genTxResponse.status).toEqual(200); - - const genTxResponseDataB64 = Buffer.from(genTxResponse.data, "base64"); - const unsignedTransaction = Uint8Array.from(genTxResponseDataB64); - - expect(unsignedTransaction).toBeTruthy(); - log.info("Received unsigned transcation"); - log.debug("unsignedTransaction:", unsignedTransaction); - - // 2. Sign - const signerAccountId = env.defaultBaseConfig.accountId; - if (!signerAccountId) { - throw new Error("No signer account ID in test environment"); - } - - const signedTransaction = signIrohaV2Transaction( - unsignedTransaction, - signerAccountId.name, - signerAccountId.domainId, - env.keyPairCredential, - ); - expect(signedTransaction).toBeTruthy(); - log.info("Transaction signed with local private key"); - log.debug("signedTransaction:", signedTransaction); - - const signedTxBuffer = Buffer.from(signedTransaction); - const signedTxBase64 = signedTxBuffer.toString("base64"); - - // 3. Send - const transactionResponse = await env.apiClient.transactV1({ - signedTransaction: signedTxBase64, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - - // Check if domain was created - await assertDomainExistence(domainName); - }); - - /** - * Test passing transaction parameters. - */ - test("Transaction parameters sent in request are included in generated payload", async () => { - const domainName = addRandomSuffix("txParamsDomain"); - expect(domainName).toBeTruthy(); - const inputParams = { - ttl: "300000", - creationTime: Date.now().toString(), - nonce: 123, - }; - - // Generate transaction with tx params - const genTxResponse = await env.apiClient.generateTransactionV1({ - request: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - params: inputParams, - }, - baseConfig: env.defaultBaseConfig, - }); - - // Assert generateTransactionV1 response - expect(genTxResponse).toBeTruthy(); - expect(genTxResponse.data).toBeTruthy(); - expect(genTxResponse.status).toEqual(200); - - const dataBuffer = Buffer.from(genTxResponse.data, "base64"); - const unsignedTransaction = Uint8Array.from(dataBuffer); - - expect(unsignedTransaction).toBeTruthy(); - log.info("Received unsigned transcation"); - - // Assert generated transaction structure - const decodedTx = TransactionPayload.fromBuffer(unsignedTransaction); - expect(decodedTx).toBeTruthy(); - expect(BigInt(decodedTx.creation_time).toString()).toEqual( - inputParams.creationTime, - ); - expect(BigInt(decodedTx.time_to_live_ms).toString()).toEqual( - inputParams.ttl, - ); - expect(decodedTx.nonce.value).toEqual(inputParams.nonce); - }); - - /** - * Create new domain and query it with query request signed on the client side. - */ - test("Sign query on the client (BLP) side", async () => { - const domainName = addRandomSuffix("querySignDomain"); - expect(domainName).toBeTruthy(); - - // Create new domain - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - - // 1. Generate query request payload - const genQueryResponse = await env.apiClient.generateTransactionV1({ - request: { - query: IrohaQuery.FindDomainById, - params: [domainName], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(genQueryResponse).toBeTruthy(); - expect(genQueryResponse.data).toBeTruthy(); - expect(genQueryResponse.status).toEqual(200); - - const queryResponseDataBuf = Buffer.from(genQueryResponse.data, "base64"); - const unsignedQueryReq = Uint8Array.from(queryResponseDataBuf); - - expect(unsignedQueryReq).toBeTruthy(); - log.info("Received unsigned query request"); - log.debug("unsignedQueryReq:", unsignedQueryReq); - - // 2. Sign - const signerAccountId = env.defaultBaseConfig.accountId; - if (!signerAccountId) { - throw new Error("No signer account ID in test environment"); - } - - const signedQueryReq = signIrohaV2Query( - unsignedQueryReq, - signerAccountId.name, - signerAccountId.domainId, - env.keyPairCredential, - ); - expect(signedQueryReq).toBeTruthy(); - log.info("Query request signed with a local private key"); - log.debug("signedQueryReq:", signedQueryReq); - - const payloadBuffer = Buffer.from(signedQueryReq); - const payloadBase64 = payloadBuffer.toString("base64"); - - // 3. Send - const queryResponse = await env.apiClient.queryV1({ - signedQuery: { - query: IrohaQuery.FindDomainById, - payload: payloadBase64, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(queryResponse.data.response.id).toBeTruthy(); - expect(queryResponse.data.response.id.name).toEqual(domainName); - }); - - /** - * Test generateTransactionV1 transaction error handling - */ - test("generateTransactionV1 returns error for invalid transaction content", async () => { - const domainName = addRandomSuffix("errorCheckDomain"); - expect(domainName).toBeTruthy(); - - // Generate transaction with wrong instruction - try { - await env.apiClient.generateTransactionV1({ - request: { - instruction: { - name: "foo" as IrohaInstruction, - params: [domainName], - }, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(false).toBe(true); // should always throw by now - } catch (err: any) { - expect(err.response.status).toBe(500); - expect(err.response.data.message).toEqual("Internal Server Error"); - expect(err.response.data.error).toBeTruthy(); - } - }); - - /** - * Test generateTransactionV1 query error handling - */ - test("generateTransactionV1 returns error for invalid query parameter number", async () => { - // Query domain without it's ID - try { - await env.apiClient.generateTransactionV1({ - request: { - query: IrohaQuery.FindDomainById, - params: [], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(false).toBe(true); // should always throw by now - } catch (err: any) { - expect(err.response.status).toBe(500); - expect(err.response.data.message).toEqual("Internal Server Error"); - expect(err.response.data.error).toBeTruthy(); - } - }); - - /** - * Complex test for account creation, asset definition and finally an asset transfer. - */ - test("Complex asset transfer between accounts", async () => { - // 1. Register new account - bob - const bobDomain = "wonderland"; - const bobName = addRandomSuffix("bob"); - expect(bobName).toBeTruthy(); - - const bobCredentials = generateTestIrohaCredentials(); - const registerAccountResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterAccount, - params: [ - bobName, - bobDomain, - bobCredentials.publicKey, - bobCredentials.privateKey.digestFunction, - ], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(registerAccountResponse).toBeTruthy(); - expect(registerAccountResponse.status).toEqual(200); - expect(registerAccountResponse.data.rejectReason).toBeUndefined(); - expect(registerAccountResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - log.info(`User '${bobName}' registered.`); - - // 2. Confirm account bob was created - const accountQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAccountById, - params: [bobName, bobDomain], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(accountQueryResponse.data).toBeTruthy(); - const responseData = accountQueryResponse.data.response; - expect(responseData).toBeTruthy(); - expect(responseData.id.name).toEqual(bobName); - expect(responseData.id.domain_id.name).toEqual(bobDomain); - - // 3. Create new asset - const assetOwnerName = env.defaultBaseConfig.accountId?.name; - expect(assetOwnerName).toBeTruthy(); - const assetOwnerDomainName = env.defaultBaseConfig.accountId?.domainId; - expect(assetOwnerDomainName).toBeTruthy(); - const assetName = addRandomSuffix("aliceGold"); - expect(assetName).toBeTruthy(); - const assetDomain = assetOwnerDomainName; - expect(assetDomain).toBeTruthy(); - const valueType = "Quantity"; - const initAssetValue = 100; - const mintable = "Infinitely"; - - const registerAssetDefResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterAssetDefinition, - params: [assetName, assetDomain, valueType, mintable], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(registerAssetDefResponse).toBeTruthy(); - expect(registerAssetDefResponse.status).toEqual(200); - expect(registerAssetDefResponse.data.rejectReason).toBeUndefined(); - expect(registerAssetDefResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - - const registerAssetResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterAsset, - params: [ - assetName, - assetDomain, - assetOwnerName, - assetOwnerDomainName, - initAssetValue, - ], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(registerAssetResponse).toBeTruthy(); - expect(registerAssetResponse.status).toEqual(200); - expect(registerAssetResponse.data.rejectReason).toBeUndefined(); - expect(registerAssetResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - log.info( - `Asset '${assetName}#${assetDomain}' registered. Initial value: ${initAssetValue}`, - ); - - // 4. Initial transfer of asset from alice to bob - const transferValue = 10; - - const initTransferResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.TransferAsset, - params: [ - assetName, - assetDomain, - assetOwnerName, - assetOwnerDomainName, - bobName, - bobDomain, - transferValue, - ], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(initTransferResponse).toBeTruthy(); - expect(initTransferResponse.status).toEqual(200); - expect(initTransferResponse.data.rejectReason).toBeUndefined(); - expect(initTransferResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - log.info("Initial transfer of asset done."); - - // 5. Confirm asset balance on both accounts - const initAliceBalanceQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [assetName, assetDomain, assetOwnerName, assetOwnerDomainName], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(initAliceBalanceQueryResponse).toBeTruthy(); - expect(initAliceBalanceQueryResponse.data).toBeTruthy(); - const initAliceBalance = - initAliceBalanceQueryResponse.data.response.value.value; - log.info( - "Alice (source) balance after initial transfer:", - initAliceBalance, - ); - expect(initAliceBalance).toEqual(initAssetValue - transferValue); - - const initBobBalanceQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [assetName, assetDomain, bobName, bobDomain], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(initBobBalanceQueryResponse).toBeTruthy(); - expect(initBobBalanceQueryResponse.data).toBeTruthy(); - const initBobBalance = - initBobBalanceQueryResponse.data.response.value.value; - log.info("Bob (target) balance after initial transfer:", initBobBalance); - expect(initBobBalance).toEqual(transferValue); - - // 6. Generate and sign transaction to transfer half of bob assets back to alice - const transferBackValue = transferValue / 2; - log.info("Transfer back to alice asset amount:", transferBackValue); - - const bobConfig = { - ...env.defaultBaseConfig, - accountId: { - name: bobName, - domainId: bobDomain, - }, - }; - - const genTxResponse = await env.apiClient.generateTransactionV1({ - request: { - instruction: { - name: IrohaInstruction.TransferAsset, - params: [ - assetName, - assetDomain, - bobName, - bobDomain, - assetOwnerName, - assetOwnerDomainName, - transferBackValue, - ], - }, - }, - baseConfig: bobConfig, - }); - expect(genTxResponse).toBeTruthy(); - expect(genTxResponse.data).toBeTruthy(); - expect(genTxResponse.status).toEqual(200); - - const genTxResponseDataBuffer = Buffer.from(genTxResponse.data, "base64"); - const unsignedTransaction = Uint8Array.from(genTxResponseDataBuffer); - - expect(unsignedTransaction).toBeTruthy(); - log.info("Received unsigned transcation"); - log.debug("unsignedTransaction:", unsignedTransaction); - - const signedTransaction = signIrohaV2Transaction( - unsignedTransaction, - bobName, - bobDomain, - { - publicKey: bobCredentials.publicKeyMultihash, - privateKey: bobCredentials.privateKey, - }, - ); - expect(signedTransaction).toBeTruthy(); - log.info("Transaction signed with bob private key"); - log.debug("signedTransaction:", signedTransaction); - - const signedTxBuffer = Buffer.from(signedTransaction); - const signedTxBase64 = signedTxBuffer.toString("base64"); - - // 7. Send signed transfer transaction - const transactionResponse = await env.apiClient.transactV1({ - signedTransaction: signedTxBase64, - waitForCommit: true, - baseConfig: bobConfig, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - - // 8. Confirm final asset balance on both accounts - const finalAliceBalanceQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [assetName, assetDomain, assetOwnerName, assetOwnerDomainName], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(finalAliceBalanceQueryResponse).toBeTruthy(); - expect(finalAliceBalanceQueryResponse.data).toBeTruthy(); - const finalAliceBalance = - finalAliceBalanceQueryResponse.data.response.value.value; - log.info("Alice (target) balance after final transfer:", finalAliceBalance); - expect(finalAliceBalance).toEqual( - initAssetValue - transferValue + transferBackValue, - ); - - const finalBobBalanceQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [assetName, assetDomain, bobName, bobDomain], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(finalBobBalanceQueryResponse).toBeTruthy(); - expect(finalBobBalanceQueryResponse.data).toBeTruthy(); - const finalBobBalance = - finalBobBalanceQueryResponse.data.response.value.value; - log.info("Bob (source) balance after final transfer:", finalBobBalance); - expect(finalBobBalance).toEqual(transferValue - transferBackValue); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-instructions-and-queries.test.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-instructions-and-queries.test.ts deleted file mode 100644 index ba01600559..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-instructions-and-queries.test.ts +++ /dev/null @@ -1,713 +0,0 @@ -/** - * Tests for executing Iroha instructions and queries on Iroha V2 through the cactus connector. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; - -import { - IrohaInstruction, - IrohaQuery, - Iroha2KeyPair, - TransactionStatusV1, -} from "../../../main/typescript/public-api"; -import { - IrohaV2TestEnv, - generateTestIrohaCredentials, -} from "../test-helpers/iroha2-env-setup"; -import { addRandomSuffix } from "../test-helpers/utils"; - -import { bytesToHex } from "hada"; -import "jest-extended"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "iroha-instructions-and-queries.test", - level: testLogLevel, -}); - -/** - * Main test suite - */ -describe("Instructions and Queries test", () => { - let env: IrohaV2TestEnv; - - beforeAll(async () => { - env = new IrohaV2TestEnv(log); - await env.start(); - }); - - afterAll(async () => { - if (env) { - await env.stop(); - } - }); - - describe("Domain tests", () => { - let domainName: string; - - // Create domain common test - beforeAll(async () => { - // Generate random domain and assets name - domainName = addRandomSuffix("funcTestDomain"); - expect(domainName).toBeTruthy(); - - // Create new domain - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(transactionResponse.data.hash).toBeTruthy(); - }); - - test("Query single domain (FindDomainById)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindDomainById, - params: [domainName], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(queryResponse.data.response.id).toBeTruthy(); - expect(queryResponse.data.response.id.name).toEqual(domainName); - }); - - test("Query all domains (FindAllDomains)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAllDomains, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(JSON.stringify(queryResponse.data.response)).toContain(domainName); - }); - }); - - describe("Account tests", () => { - let newAccountName: string; - let newAccountDomainName: string; - let newAccountCredentials: Iroha2KeyPair; - - // Register new account (RegisterAccount) - beforeAll(async () => { - newAccountName = addRandomSuffix("fooAcc"); - expect(newAccountName).toBeTruthy(); - newAccountDomainName = addRandomSuffix("newAccDomain"); - expect(newAccountDomainName).toBeTruthy(); - - // Create new domain for our new account - const registerDomainResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [newAccountDomainName], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(registerDomainResponse).toBeTruthy(); - expect(registerDomainResponse.status).toEqual(200); - expect(registerDomainResponse.data.rejectReason).toBeUndefined(); - expect(registerDomainResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(registerDomainResponse.data.hash).toBeTruthy(); - - // Generate new account credentials - newAccountCredentials = generateTestIrohaCredentials(); - - // Register new account - const registerAccountResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterAccount, - params: [ - newAccountName, - newAccountDomainName, - newAccountCredentials.publicKey, - newAccountCredentials.privateKey.digestFunction, - ], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(registerAccountResponse).toBeTruthy(); - expect(registerAccountResponse.status).toEqual(200); - expect(registerAccountResponse.data.rejectReason).toBeUndefined(); - expect(registerAccountResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(registerAccountResponse.data.hash).toBeTruthy(); - }); - - test("Query single account (FindAccountById)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAccountById, - params: [newAccountName, newAccountDomainName], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - const responseData = queryResponse.data.response; - expect(responseData).toBeTruthy(); - expect(responseData.id.name).toEqual(newAccountName); - expect(responseData.id.domain_id.name).toEqual(newAccountDomainName); - expect(responseData.signatories.length).toBeGreaterThan(0); - const receivedPubKey = responseData.signatories.pop().payload; - expect(bytesToHex(Object.values(receivedPubKey))).toEqual( - newAccountCredentials.publicKey, - ); - }); - - test("Query all accounts (FindAllAccounts)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAllAccounts, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(JSON.stringify(queryResponse.data.response)).toContain( - newAccountName, - ); - }); - }); - - describe("Asset tests", () => { - let assetName: string; - let domainName: string; - const valueType = "Quantity"; - const value = 42; - const mintable = "Infinitely"; - - // Create asset definition and asset itself common test - beforeAll(async () => { - // Generate random domain and assets name - assetName = addRandomSuffix("testAsset"); - expect(assetName).toBeTruthy(); - domainName = addRandomSuffix("testAssetDomain"); - expect(domainName).toBeTruthy(); - - // Create new domain for our new asset - const registerDomainResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(registerDomainResponse).toBeTruthy(); - expect(registerDomainResponse.status).toEqual(200); - expect(registerDomainResponse.data.rejectReason).toBeUndefined(); - expect(registerDomainResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(registerDomainResponse.data.hash).toBeTruthy(); - - // Create new asset definition - const registerAssetDefResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterAssetDefinition, - params: [assetName, domainName, valueType, mintable], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(registerAssetDefResponse).toBeTruthy(); - expect(registerAssetDefResponse.status).toEqual(200); - expect(registerAssetDefResponse.data.rejectReason).toBeUndefined(); - expect(registerAssetDefResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(registerAssetDefResponse.data.hash).toBeTruthy(); - - // Create new asset - const registerAssetResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterAsset, - params: [ - assetName, - domainName, - env.defaultBaseConfig.accountId?.name, - env.defaultBaseConfig.accountId?.domainId, - value, - ], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(registerAssetResponse).toBeTruthy(); - expect(registerAssetResponse.status).toEqual(200); - expect(registerAssetResponse.data.rejectReason).toBeUndefined(); - expect(registerAssetResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(registerAssetResponse.data.hash).toBeTruthy(); - }); - - test("Query single asset definition (FindAssetDefinitionById)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetDefinitionById, - params: [assetName, domainName], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - const responseData = queryResponse.data.response; - expect(responseData).toBeTruthy(); - expect(responseData.id.name).toEqual(assetName); - expect(responseData.id.domain_id.name).toEqual(domainName); - expect(responseData.value_type.tag).toEqual(valueType); - expect(responseData.mintable.tag).toEqual(mintable); - }); - - test("Query all asset definitions (FindAllAssetsDefinitions)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAllAssetsDefinitions, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(JSON.stringify(queryResponse.data.response)).toContain(domainName); - }); - - test("Query single asset (FindAssetById)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [ - assetName, - domainName, - env.defaultBaseConfig.accountId?.name, - env.defaultBaseConfig.accountId?.domainId, - ], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - const responseData = queryResponse.data.response; - expect(responseData).toBeTruthy(); - expect(responseData.id.definition_id.name).toEqual(assetName); - expect(responseData.id.definition_id.domain_id.name).toEqual(domainName); - expect(responseData.id.account_id.name).toEqual( - env.defaultBaseConfig.accountId?.name, - ); - expect(responseData.id.account_id.domain_id.name).toEqual( - env.defaultBaseConfig.accountId?.domainId, - ); - expect(responseData.value.tag).toEqual(valueType); - }); - - test("Query all assets (FindAllAssets)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAllAssets, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(JSON.stringify(queryResponse.data.response)).toContain(assetName); - }); - - test("Mint asset integer value (MintAsset)", async () => { - const mintValue = 100; - - // Get initial asset value - const initQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [ - assetName, - domainName, - env.defaultBaseConfig.accountId?.name, - env.defaultBaseConfig.accountId?.domainId, - ], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(initQueryResponse).toBeTruthy(); - expect(initQueryResponse.data).toBeTruthy(); - const initValue = initQueryResponse.data.response.value.value; - log.info("Initial asset value (before mint):", initValue); - - // Mint additional asset value - const mintResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.MintAsset, - params: [ - assetName, - domainName, - env.defaultBaseConfig.accountId?.name, - env.defaultBaseConfig.accountId?.domainId, - mintValue, - ], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(mintResponse).toBeTruthy(); - expect(mintResponse.status).toEqual(200); - expect(mintResponse.data.rejectReason).toBeUndefined(); - expect(mintResponse.data.status).toEqual(TransactionStatusV1.Committed); - expect(mintResponse.data.hash).toBeTruthy(); - - // Get final asset value (after mint) - const finalQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [ - assetName, - domainName, - env.defaultBaseConfig.accountId?.name, - env.defaultBaseConfig.accountId?.domainId, - ], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(finalQueryResponse).toBeTruthy(); - expect(finalQueryResponse.data).toBeTruthy(); - const finalValue = finalQueryResponse.data.response.value.value; - log.info("Final asset value (after mint):", finalValue); - - expect(finalValue).toEqual(initValue + mintValue); - }); - - test("Burn asset integer value (BurnAsset)", async () => { - const burnValue = 5; - - // Get initial asset value - const initQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [ - assetName, - domainName, - env.defaultBaseConfig.accountId?.name, - env.defaultBaseConfig.accountId?.domainId, - ], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(initQueryResponse).toBeTruthy(); - expect(initQueryResponse.data).toBeTruthy(); - const initValue = initQueryResponse.data.response.value.value; - log.info("Initial asset value (before burn):", initValue); - expect(burnValue).toBeLessThan(initValue); - - // Burn asset value - const burnResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.BurnAsset, - params: [ - assetName, - domainName, - env.defaultBaseConfig.accountId?.name, - env.defaultBaseConfig.accountId?.domainId, - burnValue, - ], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(burnResponse).toBeTruthy(); - expect(burnResponse.status).toEqual(200); - expect(burnResponse.data.rejectReason).toBeUndefined(); - expect(burnResponse.data.status).toEqual(TransactionStatusV1.Committed); - expect(burnResponse.data.hash).toBeTruthy(); - - // Get final asset value (after burn) - const finalQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [ - assetName, - domainName, - env.defaultBaseConfig.accountId?.name, - env.defaultBaseConfig.accountId?.domainId, - ], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(finalQueryResponse).toBeTruthy(); - expect(finalQueryResponse.data).toBeTruthy(); - const finalValue = finalQueryResponse.data.response.value.value; - log.info("Final asset value (after burn):", finalValue); - - expect(finalValue).toEqual(initValue - burnValue); - }); - - test("Transfer asset between accounts (TransferAsset)", async () => { - const transferValue = 3; - const sourceAccountName = env.defaultBaseConfig.accountId?.name; - const sourceAccountDomain = env.defaultBaseConfig.accountId?.domainId; - const targetAccountName = addRandomSuffix("transferTargetAcc"); - const targetAccountDomain = sourceAccountDomain; - - // Get initial asset value - const initQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [ - assetName, - domainName, - sourceAccountName, - sourceAccountDomain, - ], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(initQueryResponse).toBeTruthy(); - expect(initQueryResponse.data).toBeTruthy(); - const initValue = initQueryResponse.data.response.value.value; - log.info("Initial asset value (before transfer):", initValue); - expect(transferValue).toBeLessThan(initValue); - - // Register new account to receive the assets - const accountCredentials = generateTestIrohaCredentials(); - const registerAccountResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterAccount, - params: [ - targetAccountName, - targetAccountDomain, - accountCredentials.publicKey, - accountCredentials.privateKey.digestFunction, - ], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(registerAccountResponse).toBeTruthy(); - expect(registerAccountResponse.status).toEqual(200); - expect(registerAccountResponse.data.rejectReason).toBeUndefined(); - expect(registerAccountResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(registerAccountResponse.data.hash).toBeTruthy(); - - // Transfer asset to the newly created account - const transferResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.TransferAsset, - params: [ - assetName, - domainName, - sourceAccountName, - sourceAccountDomain, - targetAccountName, - targetAccountDomain, - transferValue, - ], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(transferResponse).toBeTruthy(); - expect(transferResponse.status).toEqual(200); - expect(transferResponse.data.rejectReason).toBeUndefined(); - expect(transferResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(transferResponse.data.hash).toBeTruthy(); - - // Get final asset value on source account (after transfer) - const finalSourceQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [ - assetName, - domainName, - sourceAccountName, - sourceAccountDomain, - ], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(finalSourceQueryResponse).toBeTruthy(); - expect(finalSourceQueryResponse.data).toBeTruthy(); - const finalSrcValue = finalSourceQueryResponse.data.response.value.value; - log.info( - "Final asset value on source account (after transfer):", - finalSrcValue, - ); - expect(finalSrcValue).toEqual(initValue - transferValue); - - // Get final asset value on target account (after transfer) - const finalTargetQueryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAssetById, - params: [ - assetName, - domainName, - targetAccountName, - targetAccountDomain, - ], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(finalTargetQueryResponse).toBeTruthy(); - expect(finalTargetQueryResponse.data).toBeTruthy(); - const finalTargetValue = - finalTargetQueryResponse.data.response.value.value; - log.info( - "Final asset value on target account (after transfer):", - finalTargetValue, - ); - expect(finalTargetValue).toEqual(transferValue); - }); - }); - - describe("Transaction queries tests", () => { - test("Query all transactions (FindAllTransactions)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAllTransactions, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response.length).toBeGreaterThan(0); - const singleTx = queryResponse.data.response.pop().value.value; - expect(singleTx.signatures).toBeTruthy(); - expect(singleTx.payload).toBeTruthy(); - expect(singleTx.payload.account_id).toBeTruthy(); - expect(singleTx.payload.instructions).toBeTruthy(); - }); - - test("Query single transaction (FindAssetById)", async () => { - const domainName = addRandomSuffix("querySingleTx"); - expect(domainName).toBeTruthy(); - - // Create new domain to get a valid transaction hash - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - const txHash = transactionResponse.data.hash; - expect(txHash).toBeTruthy(); - - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindTransactionByHash, - params: [txHash], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - const responseData = queryResponse.data.response.value.value; - expect(responseData).toBeTruthy(); - expect(responseData.signatures).toBeTruthy(); - expect(responseData.payload).toBeTruthy(); - expect(responseData.payload.account_id).toBeTruthy(); - expect(responseData.payload.instructions).toBeTruthy(); - }); - }); - - describe("Miscellaneous tests", () => { - test("Query all peers (FindAllPeers)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAllPeers, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(queryResponse.data.response.length).toBeGreaterThan(0); - const singlePeer = queryResponse.data.response.pop(); - expect(singlePeer.id).toBeTruthy(); - expect(singlePeer.id.address).toBeTruthy(); - expect(singlePeer.id.public_key).toBeTruthy(); - }); - - test("Query all blocks (FindAllBlocks)", async () => { - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAllBlocks, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(queryResponse.data.response.length).toBeGreaterThan(0); - const singleBlock = queryResponse.data.response.pop(); - expect(singleBlock.header).toBeTruthy(); - expect(singleBlock.transactions).toBeDefined(); - expect(singleBlock.rejected_transactions).toBeDefined(); - expect(singleBlock.event_recommendations).toBeDefined(); - }); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-monitoring-endpoints.test.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-monitoring-endpoints.test.ts deleted file mode 100644 index aa25ae93aa..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-monitoring-endpoints.test.ts +++ /dev/null @@ -1,244 +0,0 @@ -/** - * Tests for monitoring endpoints in Iroha V2 connector. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, - Checks, -} from "@hyperledger/cactus-common"; - -import { - IrohaInstruction, - BlockTypeV1, - WatchBlocksOptionsV1, - WatchBlocksResponseV1, - TransactionStatusV1, -} from "../../../main/typescript/public-api"; -import { - IrohaV2TestEnv, - waitForCommit, -} from "../test-helpers/iroha2-env-setup"; -import { addRandomSuffix } from "../test-helpers/utils"; - -import { VersionedCommittedBlock } from "@iroha2/data-model"; -import "jest-extended"; -import { computeTransactionHash } from "@iroha2/client"; -import { bytesToHex } from "hada"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "monitoring-endpoints.test", - level: testLogLevel, -}); - -/** - * WatchBlocks test - */ -describe("Block monitoring tests", () => { - let env: IrohaV2TestEnv; - - beforeAll(async () => { - env = new IrohaV2TestEnv(log); - await env.start(); - }); - - afterAll(async () => { - if (env) { - await env.stop(); - } - }); - - /** - * Common test template for checking watchBlocksV1 endpoint. - * Sends watchBlocks request, creates new dummy domain to trigger block creation, calls onEvent - * when block is received. Caller should define all assertion in onEvent and throw new exception - * if test should fail. - * - * @param monitorOptions `apiClient.watchBlocksV1` argument. - * @param onEvent callback with received block data to be checked. - */ - async function testWatchBlocks( - monitorOptions: WatchBlocksOptionsV1, - onEvent: (event: WatchBlocksResponseV1) => void, - ) { - // Start monitoring - const monitorPromise = new Promise((resolve, reject) => { - const watchObservable = env.apiClient.watchBlocksV1(monitorOptions); - const subscription = watchObservable.subscribe({ - next(event) { - try { - onEvent(event); - resolve(); - } catch (err) { - log.error("watchBlocksV1() event check error:", err); - reject(err); - } finally { - subscription.unsubscribe(); - } - }, - error(err) { - log.error("watchBlocksV1() error:", err); - subscription.unsubscribe(); - reject(err); - }, - }); - }); - - // Wait for monitor setup just to be sure - await waitForCommit(); - - // Create new domain to trigger new block creation - const domainName = addRandomSuffix("watchBlocksTest"); - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - baseConfig: env.defaultBaseConfig, - }); - log.info("Watch block trigger tx sent to create domain", domainName); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Submitted, - ); - - await expect(monitorPromise).toResolve(); - } - - test("watchBlocksV1 reports new blocks in raw json (default) format", async () => { - const monitorOptions = { - type: BlockTypeV1.Raw, - baseConfig: env.defaultBaseConfig, - }; - - const testPromise = testWatchBlocks(monitorOptions, (event) => { - log.info("Received block event from the connector"); - if (!("blockData" in event)) { - throw new Error("Unknown response type, wanted raw JSON data"); - } - Checks.truthy(event.blockData); - log.debug("block:", event.blockData); - expect(event.blockData).toBeTruthy(); - const parsedBlock = JSON.parse(event.blockData).value; - expect(parsedBlock).toBeTruthy(); - expect(parsedBlock.header).toBeTruthy(); - expect(parsedBlock.transactions).toBeDefined(); - expect(parsedBlock.rejected_transactions).toBeDefined(); - expect(parsedBlock.event_recommendations).toBeDefined(); - }); - - await expect(testPromise).toResolve(); - }); - - test("watchBlocksV1 reports new blocks in binary format", async () => { - const monitorOptions = { - type: BlockTypeV1.Binary, - baseConfig: env.defaultBaseConfig, - }; - - const testPromise = testWatchBlocks(monitorOptions, (event) => { - log.info("Received block event from the connector"); - if (!("binaryBlock" in event)) { - throw new Error("Unknown response type, wanted binary data"); - } - Checks.truthy(event.binaryBlock); - const asBuffer = Buffer.from(event.binaryBlock, "base64"); - const decodedBlock = VersionedCommittedBlock.fromBuffer(asBuffer); - log.debug("decodedBlock:", decodedBlock); - expect(decodedBlock.as("V1").header).toBeTruthy(); - }); - - await expect(testPromise).toResolve(); - }); - - /** - * Test shows parsing of block data to retrieve committed transactions that can be used to monitor submitted transaction status. - */ - test("Watching for transaction hash in block content", async () => { - // Will be filled later when the TX is sent. - let searchedHash: string | undefined = undefined; - - // Start monitoring - const monitorOptions = { - type: BlockTypeV1.Binary, - baseConfig: env.defaultBaseConfig, - }; - - const monitorPromise = new Promise((resolve, reject) => { - const watchObservable = env.apiClient.watchBlocksV1(monitorOptions); - const subscription = watchObservable.subscribe({ - next(event) { - try { - // Process block data - log.info("Received block event from the connector"); - if (!("binaryBlock" in event)) { - throw new Error("Unknown response type, wanted binary data"); - } - Checks.truthy(event.binaryBlock); - const asBuffer = Buffer.from(event.binaryBlock, "base64"); - const decodedBlock = VersionedCommittedBlock.fromBuffer(asBuffer); - decodedBlock.as("V1").transactions.forEach((tx) => { - const txPayload = tx.as("V1").payload; - const hashByes = computeTransactionHash(txPayload); - const hashHex = bytesToHex([...hashByes]); - log.debug("Received transaction", hashHex); - if (hashHex === searchedHash) { - log.info("Matching transaction found in block - resolve"); - subscription.unsubscribe(); - resolve(); - } - }); - } catch (err) { - log.error("watchBlocksV1() event check error:", err); - subscription.unsubscribe(); - reject(err); - } - }, - error(err) { - log.error("watchBlocksV1() error:", err); - subscription.unsubscribe(); - reject(err); - }, - }); - }); - - // Wait for monitor setup just to be sure - await waitForCommit(); - - // Create new domain to trigger new block creation - const domainName = addRandomSuffix("watchBlockContent"); - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Submitted, - ); - searchedHash = transactionResponse.data.hash; - expect(searchedHash).toBeTruthy(); - log.info( - `Search for transaction '${searchedHash}' in incoming block content...`, - ); - - await expect(monitorPromise).toResolve(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-setup-and-basic-operations.test.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-setup-and-basic-operations.test.ts deleted file mode 100644 index f966817b01..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/integration/iroha2-setup-and-basic-operations.test.ts +++ /dev/null @@ -1,396 +0,0 @@ -/** - * Tests for Iroha V2 connector setup and basic operation tests for endpoints. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; - -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; - -import { - Iroha2BaseConfig, - IrohaInstruction, - IrohaQuery, - PluginLedgerConnectorIroha2, - TransactionStatusV1, -} from "../../../main/typescript/public-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { crypto } from "@iroha2/crypto-target-node"; -import { setCrypto } from "@iroha2/client"; - -import { - IrohaV2TestEnv, - generateTestIrohaCredentials, -} from "../test-helpers/iroha2-env-setup"; -import { addRandomSuffix } from "../test-helpers/utils"; - -setCrypto(crypto); - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "setup-and-basic-operations.test", - level: testLogLevel, -}); - -/** - * Test suite for helper functions used by the test suites - */ -describe("Helper functions test", () => { - test("Adding random suffix to test strings works (addRandomSuffix)", async () => { - const a = addRandomSuffix("foo"); - expect(a).toBeTruthy(); - const b = addRandomSuffix("foo"); - expect(b).toBeTruthy(); - expect(a).not.toEqual(b); - }); - - test("Test key generation works (generateTestIrohaCredentials)", async () => { - const credentials = generateTestIrohaCredentials(); - expect(credentials).toBeTruthy(); - expect(credentials.publicKey).toBeTruthy(); - expect(credentials.publicKeyMultihash).toBeTruthy(); - expect(credentials.privateKey.payload).toBeTruthy(); - expect(credentials.privateKey.digestFunction).toBeTruthy(); - }); -}); - -/** - * Main test suite - */ -describe("Setup and basic endpoint tests", () => { - let env: IrohaV2TestEnv; - - beforeAll(async () => { - env = new IrohaV2TestEnv(log); - await env.start(); - }); - - afterAll(async () => { - if (env) { - await env.stop(); - } - }); - - test("Connector and request config merge works", async () => { - const defaultConfig = { - ...env.defaultBaseConfig, - signingCredential: env.keyPairCredential, - }; - const defaultConfigConnector = new PluginLedgerConnectorIroha2({ - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [] }), - defaultConfig, - }); - - // Default config - const allDefault = (await defaultConfigConnector.createClient()) - .toriiOptions; - expect(allDefault).toEqual(defaultConfig.torii); - - // Overwrite by request - const requestConfig: Iroha2BaseConfig = { - torii: { - apiURL: "http://example.com", - telemetryURL: "http://telemetry.com", - }, - }; - const overwrittenConfig = ( - await defaultConfigConnector.createClient(requestConfig) - ).toriiOptions; - expect(overwrittenConfig).toEqual(requestConfig.torii); - }); - - test("Waiting for transaction commit returns it's status", async () => { - const domainName = addRandomSuffix("waitForTx"); - - // Create new domain - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data).toBeTruthy(); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(transactionResponse.data.hash).toBeTruthy(); - expect(transactionResponse.data.hash.length).toEqual(64); - - // Query it - // Transaction should be committed so no waiting is needed. - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindDomainById, - params: [domainName], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(queryResponse.data.response.id).toBeTruthy(); - expect(queryResponse.data.response.id.name).toEqual(domainName); - }); - - test("Rejected transaction returns a reason", async () => { - const domainName = addRandomSuffix("waitForRejectTx"); - - // Create new domain - first one is committed - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data).toBeTruthy(); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - - // Create existing domain again - should be rejected - const rejectResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(rejectResponse).toBeTruthy(); - expect(rejectResponse.status).toEqual(200); - expect(rejectResponse.data).toBeTruthy(); - expect(rejectResponse.data.status).toEqual(TransactionStatusV1.Rejected); - expect(rejectResponse.data.rejectReason).toBeTruthy(); - log.debug( - "OK - transaction rejected with reason:", - rejectResponse.data.rejectReason, - ); - }); - - test("Sending transaction with keychain signatory works", async () => { - const domainName = addRandomSuffix("keychainSignatoryDomain"); - - // Create new domain - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - waitForCommit: true, - baseConfig: { - ...env.defaultBaseConfig, - signingCredential: env.keychainCredentials, - }, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(transactionResponse.data.hash).toBeTruthy(); - - // Query it - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindDomainById, - params: [domainName], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(queryResponse.data.response.id).toBeTruthy(); - expect(queryResponse.data.response.id.name).toEqual(domainName); - }); - - test("Sending transaction with keypair signatory works", async () => { - const domainName = addRandomSuffix("keypairSignatoryDomain"); - - // Create new domain - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - waitForCommit: true, - baseConfig: { - ...env.defaultBaseConfig, - signingCredential: env.keyPairCredential, - }, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(transactionResponse.data.hash).toBeTruthy(); - - // Query it - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindDomainById, - params: [domainName], - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(queryResponse.data.response.id).toBeTruthy(); - expect(queryResponse.data.response.id.name).toEqual(domainName); - }); - - test("Multiple instructions in single transaction works", async () => { - // Create two new domains - const firstDomainName = addRandomSuffix("multiTxFirstDomain"); - const secondDomainName = addRandomSuffix("multiTxSecondDomain"); - const transactionResponse = await env.apiClient.transactV1({ - transaction: { - instruction: [ - { - name: IrohaInstruction.RegisterDomain, - params: [firstDomainName], - }, - { - name: IrohaInstruction.RegisterDomain, - params: [secondDomainName], - }, - ], - }, - waitForCommit: true, - baseConfig: env.defaultBaseConfig, - }); - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.status).toEqual(200); - expect(transactionResponse.data.rejectReason).toBeUndefined(); - expect(transactionResponse.data.status).toEqual( - TransactionStatusV1.Committed, - ); - expect(transactionResponse.data.hash).toBeTruthy(); - - // Query domains - const queryResponse = await env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindAllDomains, - }, - baseConfig: env.defaultBaseConfig, - }); - expect(queryResponse).toBeTruthy(); - expect(queryResponse.data).toBeTruthy(); - expect(queryResponse.data.response).toBeTruthy(); - expect(JSON.stringify(queryResponse.data.response)).toContain( - firstDomainName, - ); - expect(JSON.stringify(queryResponse.data.response)).toContain( - secondDomainName, - ); - }); - - test("Unknown transaction instruction name reports error", () => { - // Send invalid command - return expect( - env.apiClient.transactV1({ - transaction: { - instruction: { - name: "foo" as IrohaInstruction, - params: [], - }, - }, - baseConfig: env.defaultBaseConfig, - }), - ).toReject(); - }); - - test("Sending transaction with incomplete config reports error", async () => { - const domainName = "wrongConfigDomain"; - - // Use config without account and keypair (only torii) - await expect( - env.apiClient?.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - baseConfig: { - torii: env.defaultBaseConfig.torii, - }, - }), - ).toReject(); - - // Use config without keypair - await expect( - env.apiClient.transactV1({ - transaction: { - instruction: { - name: IrohaInstruction.RegisterDomain, - params: [domainName], - }, - }, - baseConfig: { - torii: env.defaultBaseConfig.torii, - accountId: env.defaultBaseConfig.accountId, - }, - }), - ).toReject(); - - // Assert it was not created - await expect( - env.apiClient.queryV1({ - query: { - query: IrohaQuery.FindDomainById, - params: [domainName], - }, - baseConfig: env.defaultBaseConfig, - }), - ).toReject(); - }); - - test("Unknown query name reports error", () => { - // Send invalid query - return expect( - env.apiClient.queryV1({ - query: { - query: "foo" as IrohaQuery, - }, - baseConfig: env.defaultBaseConfig, - }), - ).toReject(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/test-helpers/iroha2-env-setup.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/test-helpers/iroha2-env-setup.ts deleted file mode 100644 index dfa3c95ae5..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/test-helpers/iroha2-env-setup.ts +++ /dev/null @@ -1,285 +0,0 @@ -/** - * Test Iroha V2 environment setup functions. - */ - -// Ledger settings -const containerImageName = "ghcr.io/hyperledger/cactus-iroha2-all-in-one"; -const containerImageVersion = "2023-07-29-f2bc772ee"; -const useRunningLedger = false; - -// Log settings -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; - -import { - Iroha2ClientConfig, - Iroha2TestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - Logger, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import { - Iroha2BaseConfig, - KeychainReference, - PluginLedgerConnectorIroha2, - Iroha2KeyPair, - Iroha2ApiClient, -} from "../../../main/typescript/public-api"; -import { addRandomSuffix } from "./utils"; - -import { crypto } from "@iroha2/crypto-target-node"; -import { setCrypto } from "@iroha2/client"; - -import { v4 as uuidv4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { bytesToHex } from "hada"; -import http from "http"; -import express from "express"; -import bodyParser from "body-parser"; -import "jest-extended"; - -setCrypto(crypto); - -/** - * Wait for transaction commit on the ledger. - * Currently there's no better way than just wait for a while, so we sleep for 3 seconds. - */ -export async function waitForCommit(): Promise { - const timeout = 3 * 1000; // 3 seconds - await new Promise((resolve) => setTimeout(resolve, timeout)); -} - -/** - * Generates Iroha V2 ledger compatible key pair that can be used as account credentials. - * Pubic key is encoded in a multihash format. - * - * @returns Ed25519 keypair - */ -export function generateTestIrohaCredentials(): Iroha2KeyPair & { - publicKeyMultihash: string; -} { - const seedBytes = Buffer.from(addRandomSuffix("seed")); - const config = crypto - .createKeyGenConfiguration() - .useSeed(Uint8Array.from(seedBytes)) - .withAlgorithm(crypto.AlgorithmEd25519()); - - const freeableKeys: { free(): void }[] = []; - try { - const keyPair = crypto.generateKeyPairWithConfiguration(config); - freeableKeys.push(keyPair); - - const multiHashPubKey = crypto.createMultihashFromPublicKey( - keyPair.publicKey(), - ); - freeableKeys.push(multiHashPubKey); - - return { - publicKey: bytesToHex(Array.from(keyPair.publicKey().payload())), - publicKeyMultihash: bytesToHex(Array.from(multiHashPubKey.toBytes())), - privateKey: { - digestFunction: keyPair.privateKey().digestFunction(), - payload: bytesToHex(Array.from(keyPair.privateKey().payload())), - }, - }; - } finally { - freeableKeys.forEach((x) => x.free()); - } -} - -/** - * Test Iroha V2 environment. - * Starts dockerized ledger, cactus connector and apiClient. - */ -export class IrohaV2TestEnv { - constructor(private log: Logger) { - this.log.info("Creating IrohaV2TestEnv..."); - } - - // Private fields - private ledger?: Iroha2TestLedger; - private connectorServer?: http.Server; - private socketioServer?: SocketIoServer; - private iroha2ConnectorPlugin?: PluginLedgerConnectorIroha2; - private clientConfig?: Iroha2ClientConfig; - - /** - * If value is not falsy throw error informing that environment is not running yet. - * - * @param value any value. - * @returns the value or an error. - */ - private checkedGet(value?: T): T { - if (value) { - return value; - } - throw new Error("IrohaV2TestEnv not started yet."); - } - - // Public fields - private _keyPairCredential?: Iroha2KeyPair; - get keyPairCredential(): Iroha2KeyPair { - return this.checkedGet(this._keyPairCredential); - } - - private _keychainCredentials?: KeychainReference; - get keychainCredentials(): KeychainReference { - return this.checkedGet(this._keychainCredentials); - } - - private _defaultBaseConfig?: Iroha2BaseConfig; - get defaultBaseConfig(): Iroha2BaseConfig { - return this.checkedGet(this._defaultBaseConfig); - } - - private _apiClient?: Iroha2ApiClient; - get apiClient(): Iroha2ApiClient { - return this.checkedGet(this._apiClient); - } - - /** - * Start entire test Iroha V2 environment. - * Runs the ledger, cactus connector, apiClient, handles all intermediate steps. - * @note Remember to call `stop()` after test is done to cleanup allocated resources and stop the docker containers. - */ - async start(): Promise { - this.log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - this.log.info("Start Iroha2TestLedger..."); - this.ledger = new Iroha2TestLedger({ - containerImageName, - containerImageVersion, - useRunningLedger, - emitContainerLogs: true, - logLevel: testLogLevel, - // Uncomment to test against the latest LTS image (pinned, older version of LTS is used by default) - // envVars: ["IROHA_IMAGE_TAG=lts"], - }); - this.log.debug("IrohaV2 image:", this.ledger.fullContainerImageName); - expect(this.ledger).toBeTruthy(); - await this.ledger.start(); - - // Get client config - this.clientConfig = await this.ledger.getClientConfig(); - - // Get signingCredential - this._keyPairCredential = { - publicKey: this.clientConfig.PUBLIC_KEY, - privateKey: { - digestFunction: this.clientConfig.PRIVATE_KEY.digest_function, - payload: this.clientConfig.PRIVATE_KEY.payload, - }, - }; - - // Create Keychain Plugin - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "aliceKey"; - const keychainEntryValue = JSON.stringify(this.keyPairCredential); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel: sutLogLevel, - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - }); - - this._keychainCredentials = { - keychainId, - keychainRef: keychainEntryKey, - }; - - this.iroha2ConnectorPlugin = new PluginLedgerConnectorIroha2({ - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - logLevel: sutLogLevel, - }); - - const [accountName, accountDomain] = - this.clientConfig.ACCOUNT_ID.split("@"); - - this._defaultBaseConfig = { - torii: { - apiURL: this.clientConfig.TORII_API_URL, - telemetryURL: this.clientConfig.TORII_TELEMETRY_URL, - }, - accountId: { - name: accountName, - domainId: accountDomain, - }, - signingCredential: this.keychainCredentials, - }; - - // Run http server - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - this.connectorServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: this.connectorServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const apiHost = `http://${addressInfo.address}:${addressInfo.port}`; - this.log.debug("Iroha V2 connector URL:", apiHost); - - // Run socketio server - this.socketioServer = new SocketIoServer(this.connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - // Register services - await this.iroha2ConnectorPlugin.getOrCreateWebServices(); - await this.iroha2ConnectorPlugin.registerWebServices( - expressApp, - this.socketioServer, - ); - - // Create ApiClient - const apiConfig = new Configuration({ basePath: apiHost }); - this._apiClient = new Iroha2ApiClient(apiConfig); - } - - /** - * Stop the entire test environment (if it was started in the first place). - */ - async stop(): Promise { - this.log.info("FINISHING THE TESTS"); - - if (this.ledger) { - this.log.info("Stop the iroha2 ledger..."); - await this.ledger.stop(); - await this.ledger.destroy(); - } - - if (this.socketioServer) { - this.log.info("Stop the SocketIO server connector..."); - await new Promise((resolve) => - this.socketioServer?.close(() => resolve()), - ); - } - - if (this.connectorServer) { - this.log.info("Stop the iroha2 connector..."); - await new Promise((resolve) => - this.connectorServer?.close(() => resolve()), - ); - } - - this.log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - // Fix flaky tests when running on local (fast) machine - await new Promise((resolve) => setTimeout(resolve, 5000)); - } -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/test-helpers/utils.ts b/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/test-helpers/utils.ts deleted file mode 100644 index d9dc048b54..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/src/test/typescript/test-helpers/utils.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Utility functions used throughout the tests. - */ - -import crypto from "crypto"; - -/** - * Adds random suffix to given string. - * Can be used to generate unique names for testing. - * - * @param name - * @returns unique string - */ -export function addRandomSuffix(name: string): string { - const buf = Buffer.alloc(4); - crypto.randomFillSync(buf, 0, 4); - return name + buf.toString("hex"); -} diff --git a/packages/cactus-plugin-ledger-connector-iroha2/tsconfig.json b/packages/cactus-plugin-ledger-connector-iroha2/tsconfig.json deleted file mode 100644 index 86bb2b6df2..0000000000 --- a/packages/cactus-plugin-ledger-connector-iroha2/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/types", - "resolveJsonModule": true, - "module": "Node16", - "moduleResolution": "Node16", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ledger-connector-iroha2.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/CHANGELOG.md b/packages/cactus-plugin-ledger-connector-polkadot/CHANGELOG.md deleted file mode 100644 index 42821cf0c2..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/CHANGELOG.md +++ /dev/null @@ -1,108 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-polkadot - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-polkadot - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-polkadot - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Bug Fixes - -* address CVE-2022-24434, GHSA-wm7h-9275-46v2 caused by dicer ([6ff8111](https://github.com/hyperledger/cacti/commit/6ff8111c2534f71a5f623433eba59a610d84f4eb)) -* **connector-polkadot:** use dynamic import calls for ESM dependencies ([76adf12](https://github.com/hyperledger/cacti/commit/76adf12afa40829226b4698f2d4394bd6fbe3aba)), closes [#3077](https://github.com/hyperledger/cacti/issues/3077) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Features - -* **connector-polkadot:** add connector pkg, openapi specs, test suite ([6a476a0](https://github.com/hyperledger/cacti/commit/6a476a0f1143380d2fd6bf81c68b0842c13c6ae2)) diff --git a/packages/cactus-plugin-ledger-connector-polkadot/README.md b/packages/cactus-plugin-ledger-connector-polkadot/README.md deleted file mode 100644 index 85dd368056..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/README.md +++ /dev/null @@ -1,191 +0,0 @@ -# `@hyperledger/cactus-plugin-ledger-connector-polkadot` - -## Table of Contents - -- [1. Usage](#1-usage) - - [1.1. Installation](#11-installation) - - [1.2. Using as a Library](#12-using-as-a-library) - - [1.3. Using Via The API Client](#13-using-via-the-api-client) -- [2. Architecture](#2-architecture) - - [2.1. run-transaction-endpoint](#21-run-transaction-endpoint) -- [3. Containerization](#3-containerization) - - [3.1. Running the container](#31-running-the-container) -- [4. Prometheus Exporter](#4-prometheus-exporter) - - [4.1. Usage Prometheus](#41-usage-prometheus) - - [4.2. Prometheus Integration](#42-prometheus-integration) - - [4.3. Helper code](#43-helper-code) - - [4.3.1. response.type.ts](#431-responsetypets) - - [4.3.2. data-fetcher.ts](#432-data-fetcherts) - - [4.3.3. metrics.ts](#433-metricsts) -- [5. Contributing](#5-contributing) -- [6. License](#6-license) -- [7. Acknowledgments](#7-acknowledgments) - - -## 1. Usage - -This plugin provides a way to interact with Substrate networks. -Using this one can perform: -* Deploy smart contracts (ink! contract). -* Execute transactions on the ledger. -* Invoke ink! contract functions. - -The above functionality can either be accessed by importing the plugin directly as a library (embedding) or by hosting it as a REST API through the [Cactus API server](https://www.npmjs.com/package/@hyperledger/cactus-cmd-api-server) - -We also publish the [Cactus API server as a container image](https://github.com/hyperledger/cactus/pkgs/container/cactus-cmd-api-server) to the GitHub Container Registry that you can run easily with a one liner. -The API server is also embeddable in your own NodeJS project if you choose to do so. - -### 1.1. Installation - -**npm** - -```sh -npm install @hyperledger/cactus-plugin-ledger-connector-polkadot -``` - -**yarn** - -```sh -yarn add @hyperledger/cactus-plugin-ledger-connector-polkadot -``` - -### 1.2. Using as a Library - -```typescript -import { - PluginLedgerConnectorPolkadot, -} from "@hyperledger/cactus-plugin-ledger-connector-polkadot"; - -const plugin = new PluginLedgerConnectorPolkadot({ - // See test cases for exact details on what parameters are needed -}); - -const req: RunTransactionRequest = { - // See tests for specific examples on request properties -}; - -try { - const res = await plugin.transact(req); -} catch (ex: Error) { - // Make sure to handle errors gracefully (which is dependent on your use-case) - console.error(ex); - throw ex; -} -``` - -### 1.3. Using Via The API Client - -**Prerequisites** -- A running Substrate ledger (network) -- You have a running Cactus API server on `$HOST:$PORT` with the Polkadot connector plugin installed on it (and the latter configured to have access to the Substrate ledger from point 1) - -```typescript -import { - PluginLedgerConnectorPolkadot, - DefaultApi as PolkadotApi, -} from "@hyperledger/cactus-plugin-ledger-connector-polkadot"; - -// Step zero is to deploy your Substrate ledger and the Cactus API server - -const apiHost = `http://${address}:${port}`; - -const apiConfig = new Configuration({ basePath: apiHost }); - -const apiClient = new PolkadotApi(apiConfig); - -const req: RunTransactionRequest = { - // See tests for specific examples on request properties -}; - -try { - const res = await apiClient.runTransaction(req); -} catch (ex: Error) { - // Make sure to handle errors gracefully (which is dependent on your use-case) - console.error(ex); - throw ex; -} -``` -## 2. Architecture -The sequence diagrams for various endpoints are mentioned below - -### 2.1. run-transaction-endpoint - -![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png) -The above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. API server then executes transact() method which is explained in detailed in the subsequent diagrams. -![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png) -The above diagram shows the sequence diagram of transact() method of the PluginLedgerConnectorPolkadot class. The caller to this function, which in reference to the above sequence diagram is API server, sends RunTransactionRequest object as an argument to the transact() method. Based on the type of Web3SigningCredentialType, corresponding responses are sent back to the caller. -![run-transaction-endpoint transactCactusKeychainRef() method](docs/architecture/images/run-transaction-endpoint-transact-cactuskeychainref.png) -The above diagram shows transactCactusKeychainReference() method being called by the transact() method of the PluginLedgerConnector class when the Web3SigningCredentialType is CACTUSKEYCHAINREF. This method inturn calls transactMnemonicString() which calls the signAndSend() method of the Polkadot library. -![runtransaction-endpoint transactMnemonicString() method](docs/architecture/images/run-transaction-endpoint-transact-mnemonicstring.png) -The above diagram shows transactMnemonicString() method being called by the transact() method of the PluginLedgerConnector class when the Web3SigningCredentialType is MNEMONICSTRING. This method then calls the signAndSend() method of the Polkadot library. -![run-transaction-endpoint transactSigned() method](docs/architecture/images/run-transaction-endpoint-transact-signed.png) -The above diagram shows transactSigned() method being called by the transact() method of the PluginLedgerConnector class when the Web3SigningCredentialType is NONE. This method calls the api.rpc.author.submitAndWatchExtrinsic() of the Polkadot library. - - -## 3. Containerization - -### 3.1. Running the container - -Launch container with plugin configuration as an **environment variable**: - -> FIXME - -Launch container with plugin configuration as a **CLI argument**: - -> FIXME - -Launch container with **configuration file** mounted from host machine: - -> FIXME - -## 4. Prometheus Exporter - -This class creates a Prometheus exporter, which scraps the transactions (total transaction count) for the use cases incorporating the use of Fabric connector plugin. - - -### 4.1. Usage Prometheus -The Prometheus exporter object is initialized in the `PluginLedgerConnectorPolkadot` class constructor itself, so instantiating the object of the `PluginLedgerConnectorPolkadot` class, gives access to the exporter object. -You can also initialize the Prometheus exporter object separately and then pass it to the `IPluginLedgerConnectorPolkadotOptions` interface for `PluginLedgerConnectorPolkadot` constructor. - -`getPrometheusExporterMetricsEndpoint` function returns the Prometheus exporter metrics, currently displaying the total transaction count, which currently increments every time the `transact()` method of the `PluginLedgerConnectoPolkadot` class is called. - -### 4.2. Prometheus Integration -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'polkadot_ledger_connector_exporter' - metrics_path: api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the Prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/integration/run-transaction.test.ts) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics` - -Once edited, you can start the Prometheus service by referencing the above edited prometheus.yml file. -On the Prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_Polkadot_total_tx_count** and click **execute** - -### 4.3. Helper code - -#### 4.3.1. response.type.ts -This file contains the various responses of the metrics. - -#### 4.3.2. data-fetcher.ts -This file contains functions encasing the logic to process the data points - -#### 4.3.3. metrics.ts -This file lists all the Prometheus metrics and what they are used for. - -## 5. Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## 6. License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## 7. Acknowledgments \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact-cactuskeychainref.png b/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact-cactuskeychainref.png deleted file mode 100644 index 2e45ff4126..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact-cactuskeychainref.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact-mnemonicstring.png b/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact-mnemonicstring.png deleted file mode 100644 index 9544dbccf5..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact-mnemonicstring.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact-signed.png b/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact-signed.png deleted file mode 100644 index 2637d2a6e0..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact-signed.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact.png b/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact.png deleted file mode 100644 index e8c892acd9..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint-transact.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint.png b/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint.png deleted file mode 100644 index 36e972226c..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/images/run-transaction-endpoint.png and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact-cactuskeychainref.puml b/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact-cactuskeychainref.puml deleted file mode 100644 index 93fcaba08d..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact-cactuskeychainref.puml +++ /dev/null @@ -1,29 +0,0 @@ -@startuml -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\ntransactCactusKeychainRef() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "transactCactusKeychainRef()" as tckr -participant "transactMnemonicString()" as tms -participant ".signAndSend()" as sas - -caller-> tckr: req -activate caller -group #LightBlue if web3SigningCredential == CACTUSKEYCHAINREF - activate tckr - tckr -> tms: [transactionConfig, web3SigningCredential] - activate tms - tms -> sas: [transactionConfig, mnemonicString] - activate sas - sas --> tms: return [success, blockhash, transactionHash] - deactivate sas - tms --> tckr: return [success, blockhash, transactionHash] - tckr --> caller : return {success, blockhash, transactionHash} as resBody - deactivate tckr - deactivate tms -end -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact-mnemonicstring.puml b/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact-mnemonicstring.puml deleted file mode 100644 index 48a2379818..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact-mnemonicstring.puml +++ /dev/null @@ -1,23 +0,0 @@ -@startuml -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\ntransactMnemonicString() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "transactMnemonicString()" as tms -participant ".signAndSend()" as sas - -caller -> tms: req -activate caller -alt #LightGreen web3SigningCredential == MNEMONICSTRING - activate tms - tms -> sas: [transactionConfig, mnemonicString] - activate sas - sas --> tms: return [success, txHash, blockHash] - deactivate sas - tms --> caller: return [success, txHash, blockHash] as resBody -end -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact-signed.puml b/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact-signed.puml deleted file mode 100644 index 94ab78b369..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact-signed.puml +++ /dev/null @@ -1,24 +0,0 @@ -@startuml -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\ntransactSigned() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "transactSigned()" as ts -participant "api.rpc.author.submitAndWatchExtrinsic()" as aras - -caller -> ts: req -activate caller -group #e6e632 if web3SigningCredential == NONE - activate ts - ts -> aras: deserializedTransaction - activate aras - aras --> ts: success, txHash, blockHash - deactivate aras -ts --> caller: returns [success, txHash, blockHash] as resBody -end -deactivate caller -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact.puml b/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact.puml deleted file mode 100644 index 06aae5d4a6..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint-transact.puml +++ /dev/null @@ -1,36 +0,0 @@ -@startuml -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint\ntransact() method - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -actor "Caller" as caller -participant "PluginLedgerConnectorPolkadot" as t << (C,#ADD1B2) class >> - -autoactivate on - -activate caller -caller -> t: transact(RunTransactionRequest) - -alt #LightBlue web3SigningCredential == CACTUSKEYCHAINREF - t -> t: transactCactusKeychainRef(RunTransactionRequest) - return RunTransactionResponse - t --> caller: return RunTransactionResponse -else #LightGreen web3SigningCredential == MNEMONICSTRING - t -> t: transactMnemonicString(RunTransactionRequest) - return RunTransactionResponse - t --> caller: return RunTransactionResponse -else #e6e632 web3SigningCredential == NONE - group #LightGray if defined: req.transactionConfig.transferSubmittable - t -> t: transactSigned(RunTransactionRequest) - return RunTransactionResponse - t --> caller: return RunTransactionResponse - else #LightCoral - t --> caller: throw Error: Expected pre-signed raw transaction - end -else #LightCoral default - t --> caller: throw Error: Unrecognized Web3SigningCredentialType -end -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint.puml b/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint.puml deleted file mode 100644 index 1885b8d3f9..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/docs/architecture/run-transaction-endpoint.puml +++ /dev/null @@ -1,27 +0,0 @@ -@startuml -title Hyperledger Cactus\nSequence Diagram\nRun Transaction Endpoint - -skinparam sequenceArrowThickness 2 -skinparam roundcorner 20 -skinparam maxmessagesize 120 -skinparam sequenceParticipant underline - -box "Users" #LightBlue -actor "User A" as a -end box - -box "Hyperledger Cactus" #LightGray -entity "API Client" as apic -entity "API Server" as apis -end box - -box "Ledger Connector" #LightGreen -database "Polkadot" as polkadotcon -end box - -a --> apic : Tx Polkadot Ledger -apic --> apis: Request -apis --> polkadotcon: transact() -polkadotcon --> apis: Response -apis --> apic: Formatted Response -@enduml \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/openapitools.json b/packages/cactus-plugin-ledger-connector-polkadot/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/package.json b/packages/cactus-plugin-ledger-connector-polkadot/package.json deleted file mode 100644 index 1af45eac80..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-ledger-connector-polkadot", - "version": "2.0.0", - "description": "Allows Cactus nodes to connect to a Substrate ledger.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cactus" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Catarina Pedreira" - }, - { - "name": "Rafael Belchior" - }, - { - "name": "Anmol Bansal", - "email": "anmolbansal1807@gmail.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-ledger-connector-polkadot.web.umd.js", - "types": "dist/types/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "lint": "tslint tests/*.ts -t verbose", - "lint-fix": "tslint --fix tests/*.ts -t verbose", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev webpack:prod", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js", - "webpack:prod": "npm-run-all webpack:prod:node webpack:prod:web", - "webpack:prod:node": "webpack --env=prod --target=node --config ../../webpack.config.js", - "webpack:prod:web": "webpack --env=prod --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@polkadot/api": "10.9.1", - "@polkadot/api-contract": "10.9.1", - "@polkadot/rpc-provider": "10.9.1", - "@polkadot/types": "10.9.1", - "@polkadot/util": "12.6.2", - "axios": "1.7.7", - "bl": "6.0.16", - "express": "4.21.0", - "express-openapi-validator": "5.2.0", - "form-data": "4.0.0", - "fs-extra": "11.2.0", - "http-errors-enhanced-cjs": "2.0.1", - "http-status-codes": "2.1.4", - "joi": "17.13.3", - "multer": "1.4.5-lts.1", - "ngo": "2.6.2", - "openapi-types": "12.1.3", - "prom-client": "15.1.3", - "run-time-error": "1.4.0", - "temp": "0.9.1", - "tslint": "6.1.3", - "typescript-optional": "2.0.1", - "uuid": "10.0.0" - }, - "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/express": "5.0.0", - "@types/joi": "17.2.3", - "@types/multer": "1.4.7", - "@types/ssh2": "0.5.44", - "@types/supertest": "2.0.11", - "@types/temp": "0.9.1", - "@types/uuid": "10.0.0", - "supertest": "6.1.6" - }, - "engines": { - "node": ">=10", - "npm": ">=6" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-ledger-connector-polkadot.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-ledger-connector-polkadot.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 7a30c61351..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,40 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_deploy_contract_ink_request.go -model_deploy_contract_ink_request_balance.go -model_deploy_contract_ink_request_gas_limit.go -model_deploy_contract_ink_request_salt.go -model_deploy_contract_ink_request_storage_deposit_limit.go -model_deploy_contract_ink_response.go -model_error_exception_response.go -model_invoke_contract_request.go -model_invoke_contract_response.go -model_polkadot_contract_invocation_type.go -model_polkadot_transaction_config.go -model_polkadot_transaction_config_transfer_submittable.go -model_polkadot_transaction_config_value.go -model_raw_transaction_request.go -model_raw_transaction_response.go -model_raw_transaction_response_data.go -model_raw_transaction_response_response_container.go -model_run_transaction_request.go -model_run_transaction_response.go -model_sign_raw_transaction_request.go -model_sign_raw_transaction_response.go -model_transaction_info_request.go -model_transaction_info_response.go -model_transaction_info_response_data.go -model_transaction_info_response_response_container.go -model_web3_signing_credential.go -model_web3_signing_credential_cactus_keychain_ref.go -model_web3_signing_credential_mnemonic_string.go -model_web3_signing_credential_none.go -model_web3_signing_credential_type.go -response.go -utils.go diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 137d3b68e3..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# Go API client for cactus-plugin-ledger-connector-polkadot - -Can perform basic tasks on a Polkadot parachain - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-ledger-connector-polkadot "github.com/hyperledger/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-polkadot.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-polkadot.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-polkadot.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-ledger-connector-polkadot.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeployContractInk**](docs/DefaultApi.md#deploycontractink) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink | Deploys the ink! contract -*DefaultApi* | [**GetPrometheusMetrics**](docs/DefaultApi.md#getprometheusmetrics) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**GetRawTransaction**](docs/DefaultApi.md#getrawtransaction) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction | Get raw unsigned transaction -*DefaultApi* | [**GetTransactionInfo**](docs/DefaultApi.md#gettransactioninfo) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info | Get the necessary Transaction Info for a account -*DefaultApi* | [**InvokeContract**](docs/DefaultApi.md#invokecontract) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract | Invokes a contract on a polkadot ledger -*DefaultApi* | [**RunTransaction**](docs/DefaultApi.md#runtransaction) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction | Executes a transaction on a Polkadot ledger -*DefaultApi* | [**SignRawTransaction**](docs/DefaultApi.md#signrawtransaction) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction | sign the raw transaction - - -## Documentation For Models - - - [DeployContractInkRequest](docs/DeployContractInkRequest.md) - - [DeployContractInkRequestBalance](docs/DeployContractInkRequestBalance.md) - - [DeployContractInkRequestGasLimit](docs/DeployContractInkRequestGasLimit.md) - - [DeployContractInkRequestSalt](docs/DeployContractInkRequestSalt.md) - - [DeployContractInkRequestStorageDepositLimit](docs/DeployContractInkRequestStorageDepositLimit.md) - - [DeployContractInkResponse](docs/DeployContractInkResponse.md) - - [ErrorExceptionResponse](docs/ErrorExceptionResponse.md) - - [InvokeContractRequest](docs/InvokeContractRequest.md) - - [InvokeContractResponse](docs/InvokeContractResponse.md) - - [PolkadotContractInvocationType](docs/PolkadotContractInvocationType.md) - - [PolkadotTransactionConfig](docs/PolkadotTransactionConfig.md) - - [PolkadotTransactionConfigTransferSubmittable](docs/PolkadotTransactionConfigTransferSubmittable.md) - - [PolkadotTransactionConfigValue](docs/PolkadotTransactionConfigValue.md) - - [RawTransactionRequest](docs/RawTransactionRequest.md) - - [RawTransactionResponse](docs/RawTransactionResponse.md) - - [RawTransactionResponseData](docs/RawTransactionResponseData.md) - - [RawTransactionResponseResponseContainer](docs/RawTransactionResponseResponseContainer.md) - - [RunTransactionRequest](docs/RunTransactionRequest.md) - - [RunTransactionResponse](docs/RunTransactionResponse.md) - - [SignRawTransactionRequest](docs/SignRawTransactionRequest.md) - - [SignRawTransactionResponse](docs/SignRawTransactionResponse.md) - - [TransactionInfoRequest](docs/TransactionInfoRequest.md) - - [TransactionInfoResponse](docs/TransactionInfoResponse.md) - - [TransactionInfoResponseData](docs/TransactionInfoResponseData.md) - - [TransactionInfoResponseResponseContainer](docs/TransactionInfoResponseResponseContainer.md) - - [Web3SigningCredential](docs/Web3SigningCredential.md) - - [Web3SigningCredentialCactusKeychainRef](docs/Web3SigningCredentialCactusKeychainRef.md) - - [Web3SigningCredentialMnemonicString](docs/Web3SigningCredentialMnemonicString.md) - - [Web3SigningCredentialNone](docs/Web3SigningCredentialNone.md) - - [Web3SigningCredentialType](docs/Web3SigningCredentialType.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index b18122cfed..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,700 +0,0 @@ -openapi: 3.0.3 -info: - description: Can perform basic tasks on a Polkadot parachain - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - Connector Polkadot - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetrics - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponse' - description: Internal Server Error - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info: - post: - operationId: getTransactionInfo - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransactionInfoRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TransactionInfoResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponse' - description: Internal Server Error - summary: Get the necessary Transaction Info for a account - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction: - post: - operationId: getRawTransaction - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RawTransactionRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RawTransactionResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponse' - description: Internal Server Error - summary: Get raw unsigned transaction - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction: - post: - operationId: signRawTransaction - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SignRawTransactionRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SignRawTransactionResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponse' - description: Internal Server Error - summary: sign the raw transaction - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction: - post: - operationId: runTransaction - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponse' - description: Internal Server Error - summary: Executes a transaction on a Polkadot ledger - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink: - post: - operationId: deployContractInk - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractInkRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractInkResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponse' - description: Internal Server Error - summary: Deploys the ink! contract - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract: - post: - operationId: invokeContract - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractRequest' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractResponse' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponse' - description: Internal Server Error - summary: Invokes a contract on a polkadot ledger - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract -components: - schemas: - PrometheusExporterMetricsResponse: - nullable: false - type: string - TransactionInfoRequest: - additionalProperties: false - example: - transactionExpiration: 0.8008281904610115 - accountAddress: accountAddress - properties: - accountAddress: - nullable: false - type: string - transactionExpiration: - nullable: true - type: number - required: - - accountAddress - - transactionExpiration - type: object - TransactionInfoResponseData: - additionalProperties: false - example: - blockHash: "{}" - era: "{}" - nonce: "{}" - properties: - nonce: - nullable: false - type: object - blockHash: - nullable: false - type: object - era: - nullable: true - type: object - required: - - blockHash - - era - - nonce - type: object - TransactionInfoResponse: - additionalProperties: false - example: - responseContainer: - response_data: - blockHash: "{}" - era: "{}" - nonce: "{}" - message: message - error: error - succeeded: true - properties: - responseContainer: - $ref: '#/components/schemas/TransactionInfoResponse_responseContainer' - required: - - responseContainer - type: object - RawTransactionRequest: - additionalProperties: false - example: - to: to - value: 0.8008281904610115 - properties: - to: - nullable: false - type: string - value: - nullable: false - type: number - required: - - to - - value - type: object - RawTransactionResponseData: - additionalProperties: false - example: - rawTransaction: rawTransaction - properties: - rawTransaction: - nullable: false - type: string - required: - - rawTransaction - type: object - RawTransactionResponse: - additionalProperties: false - example: - responseContainer: - response_data: - rawTransaction: rawTransaction - message: message - error: error - succeeded: true - properties: - responseContainer: - $ref: '#/components/schemas/RawTransactionResponse_responseContainer' - required: - - responseContainer - type: object - SignRawTransactionRequest: - additionalProperties: false - example: - rawTransaction: rawTransaction - signingOptions: "{}" - mnemonic: mnemonic - properties: - rawTransaction: - nullable: false - type: string - mnemonic: - nullable: false - type: string - signingOptions: - nullable: false - type: object - required: - - mnemonic - - rawTransaction - type: object - SignRawTransactionResponse: - additionalProperties: false - example: - signedTransaction: signedTransaction - success: true - properties: - success: - nullable: false - type: boolean - signedTransaction: - nullable: false - type: string - required: - - signedTransaction - - success - type: object - web3SigningCredential: - discriminator: - propertyName: type - example: - type: null - oneOf: - - $ref: '#/components/schemas/Web3SigningCredentialCactusKeychainRef' - - $ref: '#/components/schemas/Web3SigningCredentialMnemonicString' - - $ref: '#/components/schemas/Web3SigningCredentialNone' - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredentialCactusKeychainRef: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - keychainEntryKey: - description: The key to use when looking up the the keychain entry holding - the secret pointed to by the keychainEntryKey parameter. - maxLength: 1024 - minLength: 0 - type: string - keychainId: - description: The keychain ID to use when looking up the the keychain plugin - instance that will be used to retrieve the secret pointed to by the keychainEntryKey - parameter. - maxLength: 1024 - minLength: 0 - type: string - required: - - ethAccount - - keychainEntryKey - - keychainId - - type - type: object - Web3SigningCredentialMnemonicString: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - mnemonic: - description: The Polkadot account's seed phrase for signing transaction - nullable: false - type: string - required: - - mnemonic - - type - type: object - Web3SigningCredentialNone: - description: Using this denotes that there is no signing required because the - transaction is pre-signed. - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredentialType: - enum: - - CACTUS_KEYCHAIN_REF - - MNEMONIC_STRING - - NONE - type: string - PolkadotTransactionConfig: - additionalProperties: true - example: - transferSubmittable: null - to: null - value: null - properties: - transferSubmittable: - $ref: '#/components/schemas/PolkadotTransactionConfig_transferSubmittable' - to: - $ref: '#/components/schemas/PolkadotTransactionConfig_transferSubmittable' - value: - $ref: '#/components/schemas/PolkadotTransactionConfig_value' - type: object - RunTransactionRequest: - additionalProperties: false - example: - transactionConfig: - transferSubmittable: null - to: null - value: null - web3SigningCredential: - type: null - properties: - web3SigningCredential: - $ref: '#/components/schemas/web3SigningCredential' - transactionConfig: - $ref: '#/components/schemas/PolkadotTransactionConfig' - required: - - transactionConfig - - web3SigningCredential - type: object - RunTransactionResponse: - additionalProperties: false - example: - blockHash: blockHash - success: true - txHash: txHash - properties: - success: - nullable: false - type: boolean - txHash: - nullable: false - type: string - blockHash: - nullable: false - type: string - required: - - success - type: object - DeployContractInkRequest: - additionalProperties: false - example: - gasLimit: - refTime: 0 - proofSize: 0 - metadata: null - wasm: wasm - salt: null - balance: null - web3SigningCredential: - type: null - storageDepositLimit: null - params: - - "" - - "" - constructorMethod: null - properties: - web3SigningCredential: - $ref: '#/components/schemas/web3SigningCredential' - wasm: - description: raw wasm for the compiled contract in base64 format - format: byte - nullable: false - type: string - constructorMethod: - $ref: '#/components/schemas/PolkadotTransactionConfig_transferSubmittable' - metadata: - $ref: '#/components/schemas/PolkadotTransactionConfig_transferSubmittable' - gasLimit: - $ref: '#/components/schemas/DeployContractInkRequest_gasLimit' - storageDepositLimit: - $ref: '#/components/schemas/DeployContractInkRequest_storageDepositLimit' - params: - default: [] - description: The list of arguments to pass in to the contract method being - deployed - items: {} - type: array - balance: - $ref: '#/components/schemas/DeployContractInkRequest_balance' - salt: - $ref: '#/components/schemas/DeployContractInkRequest_salt' - required: - - gasLimit - - metadata - - wasm - - web3SigningCredential - type: object - DeployContractInkResponse: - additionalProperties: false - example: - success: true - contractAddress: contractAddress - properties: - success: - nullable: false - type: boolean - contractAddress: - nullable: false - type: string - required: - - success - type: object - PolkadotContractInvocationType: - enum: - - SEND - - QUERY - type: string - InvokeContractRequest: - additionalProperties: false - example: - invocationType: null - gasLimit: - refTime: 0 - proofSize: 0 - metadata: null - balance: null - accountAddress: accountAddress - web3SigningCredential: - type: null - contractAddress: contractAddress - methodName: methodName - storageDepositLimit: null - params: - - "" - - "" - properties: - invocationType: - $ref: '#/components/schemas/PolkadotContractInvocationType' - accountAddress: - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/web3SigningCredential' - metadata: - $ref: '#/components/schemas/PolkadotTransactionConfig_transferSubmittable' - contractAddress: - nullable: false - type: string - methodName: - description: The name of the contract method to invoke. - maxLength: 2048 - minLength: 1 - nullable: false - type: string - gasLimit: - $ref: '#/components/schemas/DeployContractInkRequest_gasLimit' - storageDepositLimit: - $ref: '#/components/schemas/DeployContractInkRequest_storageDepositLimit' - balance: - $ref: '#/components/schemas/DeployContractInkRequest_balance' - params: - default: [] - description: The list of arguments to pass in to the contract method being - invoked - items: {} - type: array - required: - - accountAddress - - contractAddress - - gasLimit - - invocationType - - metadata - - methodName - - web3SigningCredential - type: object - InvokeContractResponse: - example: - blockHash: blockHash - callOutput: "" - success: true - txHash: txHash - properties: - callOutput: {} - success: - nullable: false - type: boolean - txHash: - nullable: false - type: string - blockHash: - nullable: false - type: string - required: - - success - type: object - ErrorExceptionResponse: - description: Error response from the connector. - properties: - message: - description: Short error description message. - nullable: false - type: string - error: - description: Detailed error information. - nullable: false - type: string - required: - - error - - message - type: object - TransactionInfoResponse_responseContainer: - additionalProperties: false - example: - response_data: - blockHash: "{}" - era: "{}" - nonce: "{}" - message: message - error: error - succeeded: true - properties: - response_data: - $ref: '#/components/schemas/TransactionInfoResponseData' - succeeded: - nullable: false - type: boolean - message: - nullable: false - type: string - error: - nullable: true - type: string - required: - - error - - message - - response_data - - succeeded - type: object - RawTransactionResponse_responseContainer: - additionalProperties: false - example: - response_data: - rawTransaction: rawTransaction - message: message - error: error - succeeded: true - properties: - response_data: - $ref: '#/components/schemas/RawTransactionResponseData' - succeeded: - nullable: false - type: boolean - message: - nullable: false - type: string - error: - nullable: true - type: string - required: - - error - - message - - response_data - - succeeded - type: object - PolkadotTransactionConfig_transferSubmittable: - oneOf: - - type: string - PolkadotTransactionConfig_value: - oneOf: - - type: number - DeployContractInkRequest_gasLimit: - example: - refTime: 0 - proofSize: 0 - properties: - refTime: - minimum: 0 - type: integer - proofSize: - minimum: 0 - type: integer - required: - - proofSize - - refTime - type: object - DeployContractInkRequest_storageDepositLimit: - nullable: true - oneOf: - - type: string - - minimum: 0 - type: integer - DeployContractInkRequest_balance: - oneOf: - - type: string - - minimum: 0 - type: integer - DeployContractInkRequest_salt: - nullable: true - oneOf: - - type: string diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 7655791e4d..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,820 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeployContractInkRequest struct { - ctx context.Context - ApiService *DefaultApiService - deployContractInkRequest *DeployContractInkRequest -} - -func (r ApiDeployContractInkRequest) DeployContractInkRequest(deployContractInkRequest DeployContractInkRequest) ApiDeployContractInkRequest { - r.deployContractInkRequest = &deployContractInkRequest - return r -} - -func (r ApiDeployContractInkRequest) Execute() (*DeployContractInkResponse, *http.Response, error) { - return r.ApiService.DeployContractInkExecute(r) -} - -/* -DeployContractInk Deploys the ink! contract - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeployContractInkRequest -*/ -func (a *DefaultApiService) DeployContractInk(ctx context.Context) ApiDeployContractInkRequest { - return ApiDeployContractInkRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeployContractInkResponse -func (a *DefaultApiService) DeployContractInkExecute(r ApiDeployContractInkRequest) (*DeployContractInkResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeployContractInkResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeployContractInk") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deployContractInkRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsRequest struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsRequest) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsExecute(r) -} - -/* -GetPrometheusMetrics Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsRequest -*/ -func (a *DefaultApiService) GetPrometheusMetrics(ctx context.Context) ApiGetPrometheusMetricsRequest { - return ApiGetPrometheusMetricsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsExecute(r ApiGetPrometheusMetricsRequest) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetrics") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRawTransactionRequest struct { - ctx context.Context - ApiService *DefaultApiService - rawTransactionRequest *RawTransactionRequest -} - -func (r ApiGetRawTransactionRequest) RawTransactionRequest(rawTransactionRequest RawTransactionRequest) ApiGetRawTransactionRequest { - r.rawTransactionRequest = &rawTransactionRequest - return r -} - -func (r ApiGetRawTransactionRequest) Execute() (*RawTransactionResponse, *http.Response, error) { - return r.ApiService.GetRawTransactionExecute(r) -} - -/* -GetRawTransaction Get raw unsigned transaction - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetRawTransactionRequest -*/ -func (a *DefaultApiService) GetRawTransaction(ctx context.Context) ApiGetRawTransactionRequest { - return ApiGetRawTransactionRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RawTransactionResponse -func (a *DefaultApiService) GetRawTransactionExecute(r ApiGetRawTransactionRequest) (*RawTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RawTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRawTransaction") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.rawTransactionRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetTransactionInfoRequest struct { - ctx context.Context - ApiService *DefaultApiService - transactionInfoRequest *TransactionInfoRequest -} - -func (r ApiGetTransactionInfoRequest) TransactionInfoRequest(transactionInfoRequest TransactionInfoRequest) ApiGetTransactionInfoRequest { - r.transactionInfoRequest = &transactionInfoRequest - return r -} - -func (r ApiGetTransactionInfoRequest) Execute() (*TransactionInfoResponse, *http.Response, error) { - return r.ApiService.GetTransactionInfoExecute(r) -} - -/* -GetTransactionInfo Get the necessary Transaction Info for a account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetTransactionInfoRequest -*/ -func (a *DefaultApiService) GetTransactionInfo(ctx context.Context) ApiGetTransactionInfoRequest { - return ApiGetTransactionInfoRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return TransactionInfoResponse -func (a *DefaultApiService) GetTransactionInfoExecute(r ApiGetTransactionInfoRequest) (*TransactionInfoResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *TransactionInfoResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetTransactionInfo") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.transactionInfoRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInvokeContractRequest struct { - ctx context.Context - ApiService *DefaultApiService - invokeContractRequest *InvokeContractRequest -} - -func (r ApiInvokeContractRequest) InvokeContractRequest(invokeContractRequest InvokeContractRequest) ApiInvokeContractRequest { - r.invokeContractRequest = &invokeContractRequest - return r -} - -func (r ApiInvokeContractRequest) Execute() (*InvokeContractResponse, *http.Response, error) { - return r.ApiService.InvokeContractExecute(r) -} - -/* -InvokeContract Invokes a contract on a polkadot ledger - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInvokeContractRequest -*/ -func (a *DefaultApiService) InvokeContract(ctx context.Context) ApiInvokeContractRequest { - return ApiInvokeContractRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractResponse -func (a *DefaultApiService) InvokeContractExecute(r ApiInvokeContractRequest) (*InvokeContractResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InvokeContract") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.invokeContractRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRunTransactionRequest struct { - ctx context.Context - ApiService *DefaultApiService - runTransactionRequest *RunTransactionRequest -} - -func (r ApiRunTransactionRequest) RunTransactionRequest(runTransactionRequest RunTransactionRequest) ApiRunTransactionRequest { - r.runTransactionRequest = &runTransactionRequest - return r -} - -func (r ApiRunTransactionRequest) Execute() (*RunTransactionResponse, *http.Response, error) { - return r.ApiService.RunTransactionExecute(r) -} - -/* -RunTransaction Executes a transaction on a Polkadot ledger - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRunTransactionRequest -*/ -func (a *DefaultApiService) RunTransaction(ctx context.Context) ApiRunTransactionRequest { - return ApiRunTransactionRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RunTransactionResponse -func (a *DefaultApiService) RunTransactionExecute(r ApiRunTransactionRequest) (*RunTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RunTransaction") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.runTransactionRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSignRawTransactionRequest struct { - ctx context.Context - ApiService *DefaultApiService - signRawTransactionRequest *SignRawTransactionRequest -} - -func (r ApiSignRawTransactionRequest) SignRawTransactionRequest(signRawTransactionRequest SignRawTransactionRequest) ApiSignRawTransactionRequest { - r.signRawTransactionRequest = &signRawTransactionRequest - return r -} - -func (r ApiSignRawTransactionRequest) Execute() (*SignRawTransactionResponse, *http.Response, error) { - return r.ApiService.SignRawTransactionExecute(r) -} - -/* -SignRawTransaction sign the raw transaction - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSignRawTransactionRequest -*/ -func (a *DefaultApiService) SignRawTransaction(ctx context.Context) ApiSignRawTransactionRequest { - return ApiSignRawTransactionRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SignRawTransactionResponse -func (a *DefaultApiService) SignRawTransactionExecute(r ApiSignRawTransactionRequest) (*SignRawTransactionResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SignRawTransactionResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SignRawTransaction") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.signRawTransactionRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index befeb3c2b7..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Connector Polkadot API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index e73762267a..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index b221d145d6..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request.go deleted file mode 100644 index 1f5178dae1..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request.go +++ /dev/null @@ -1,400 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the DeployContractInkRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractInkRequest{} - -// DeployContractInkRequest struct for DeployContractInkRequest -type DeployContractInkRequest struct { - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // raw wasm for the compiled contract in base64 format - Wasm string `json:"wasm"` - ConstructorMethod *PolkadotTransactionConfigTransferSubmittable `json:"constructorMethod,omitempty"` - Metadata PolkadotTransactionConfigTransferSubmittable `json:"metadata"` - GasLimit DeployContractInkRequestGasLimit `json:"gasLimit"` - StorageDepositLimit NullableDeployContractInkRequestStorageDepositLimit `json:"storageDepositLimit,omitempty"` - // The list of arguments to pass in to the contract method being deployed - Params []interface{} `json:"params,omitempty"` - Balance *DeployContractInkRequestBalance `json:"balance,omitempty"` - Salt NullableDeployContractInkRequestSalt `json:"salt,omitempty"` -} - -// NewDeployContractInkRequest instantiates a new DeployContractInkRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractInkRequest(web3SigningCredential Web3SigningCredential, wasm string, metadata PolkadotTransactionConfigTransferSubmittable, gasLimit DeployContractInkRequestGasLimit) *DeployContractInkRequest { - this := DeployContractInkRequest{} - this.Web3SigningCredential = web3SigningCredential - this.Wasm = wasm - this.Metadata = metadata - this.GasLimit = gasLimit - return &this -} - -// NewDeployContractInkRequestWithDefaults instantiates a new DeployContractInkRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractInkRequestWithDefaults() *DeployContractInkRequest { - this := DeployContractInkRequest{} - return &this -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *DeployContractInkRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *DeployContractInkRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *DeployContractInkRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetWasm returns the Wasm field value -func (o *DeployContractInkRequest) GetWasm() string { - if o == nil { - var ret string - return ret - } - - return o.Wasm -} - -// GetWasmOk returns a tuple with the Wasm field value -// and a boolean to check if the value has been set. -func (o *DeployContractInkRequest) GetWasmOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Wasm, true -} - -// SetWasm sets field value -func (o *DeployContractInkRequest) SetWasm(v string) { - o.Wasm = v -} - -// GetConstructorMethod returns the ConstructorMethod field value if set, zero value otherwise. -func (o *DeployContractInkRequest) GetConstructorMethod() PolkadotTransactionConfigTransferSubmittable { - if o == nil || IsNil(o.ConstructorMethod) { - var ret PolkadotTransactionConfigTransferSubmittable - return ret - } - return *o.ConstructorMethod -} - -// GetConstructorMethodOk returns a tuple with the ConstructorMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractInkRequest) GetConstructorMethodOk() (*PolkadotTransactionConfigTransferSubmittable, bool) { - if o == nil || IsNil(o.ConstructorMethod) { - return nil, false - } - return o.ConstructorMethod, true -} - -// HasConstructorMethod returns a boolean if a field has been set. -func (o *DeployContractInkRequest) HasConstructorMethod() bool { - if o != nil && !IsNil(o.ConstructorMethod) { - return true - } - - return false -} - -// SetConstructorMethod gets a reference to the given PolkadotTransactionConfigTransferSubmittable and assigns it to the ConstructorMethod field. -func (o *DeployContractInkRequest) SetConstructorMethod(v PolkadotTransactionConfigTransferSubmittable) { - o.ConstructorMethod = &v -} - -// GetMetadata returns the Metadata field value -func (o *DeployContractInkRequest) GetMetadata() PolkadotTransactionConfigTransferSubmittable { - if o == nil { - var ret PolkadotTransactionConfigTransferSubmittable - return ret - } - - return o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value -// and a boolean to check if the value has been set. -func (o *DeployContractInkRequest) GetMetadataOk() (*PolkadotTransactionConfigTransferSubmittable, bool) { - if o == nil { - return nil, false - } - return &o.Metadata, true -} - -// SetMetadata sets field value -func (o *DeployContractInkRequest) SetMetadata(v PolkadotTransactionConfigTransferSubmittable) { - o.Metadata = v -} - -// GetGasLimit returns the GasLimit field value -func (o *DeployContractInkRequest) GetGasLimit() DeployContractInkRequestGasLimit { - if o == nil { - var ret DeployContractInkRequestGasLimit - return ret - } - - return o.GasLimit -} - -// GetGasLimitOk returns a tuple with the GasLimit field value -// and a boolean to check if the value has been set. -func (o *DeployContractInkRequest) GetGasLimitOk() (*DeployContractInkRequestGasLimit, bool) { - if o == nil { - return nil, false - } - return &o.GasLimit, true -} - -// SetGasLimit sets field value -func (o *DeployContractInkRequest) SetGasLimit(v DeployContractInkRequestGasLimit) { - o.GasLimit = v -} - -// GetStorageDepositLimit returns the StorageDepositLimit field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DeployContractInkRequest) GetStorageDepositLimit() DeployContractInkRequestStorageDepositLimit { - if o == nil || IsNil(o.StorageDepositLimit.Get()) { - var ret DeployContractInkRequestStorageDepositLimit - return ret - } - return *o.StorageDepositLimit.Get() -} - -// GetStorageDepositLimitOk returns a tuple with the StorageDepositLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DeployContractInkRequest) GetStorageDepositLimitOk() (*DeployContractInkRequestStorageDepositLimit, bool) { - if o == nil { - return nil, false - } - return o.StorageDepositLimit.Get(), o.StorageDepositLimit.IsSet() -} - -// HasStorageDepositLimit returns a boolean if a field has been set. -func (o *DeployContractInkRequest) HasStorageDepositLimit() bool { - if o != nil && o.StorageDepositLimit.IsSet() { - return true - } - - return false -} - -// SetStorageDepositLimit gets a reference to the given NullableDeployContractInkRequestStorageDepositLimit and assigns it to the StorageDepositLimit field. -func (o *DeployContractInkRequest) SetStorageDepositLimit(v DeployContractInkRequestStorageDepositLimit) { - o.StorageDepositLimit.Set(&v) -} -// SetStorageDepositLimitNil sets the value for StorageDepositLimit to be an explicit nil -func (o *DeployContractInkRequest) SetStorageDepositLimitNil() { - o.StorageDepositLimit.Set(nil) -} - -// UnsetStorageDepositLimit ensures that no value is present for StorageDepositLimit, not even an explicit nil -func (o *DeployContractInkRequest) UnsetStorageDepositLimit() { - o.StorageDepositLimit.Unset() -} - -// GetParams returns the Params field value if set, zero value otherwise. -func (o *DeployContractInkRequest) GetParams() []interface{} { - if o == nil || IsNil(o.Params) { - var ret []interface{} - return ret - } - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractInkRequest) GetParamsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.Params) { - return nil, false - } - return o.Params, true -} - -// HasParams returns a boolean if a field has been set. -func (o *DeployContractInkRequest) HasParams() bool { - if o != nil && !IsNil(o.Params) { - return true - } - - return false -} - -// SetParams gets a reference to the given []interface{} and assigns it to the Params field. -func (o *DeployContractInkRequest) SetParams(v []interface{}) { - o.Params = v -} - -// GetBalance returns the Balance field value if set, zero value otherwise. -func (o *DeployContractInkRequest) GetBalance() DeployContractInkRequestBalance { - if o == nil || IsNil(o.Balance) { - var ret DeployContractInkRequestBalance - return ret - } - return *o.Balance -} - -// GetBalanceOk returns a tuple with the Balance field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractInkRequest) GetBalanceOk() (*DeployContractInkRequestBalance, bool) { - if o == nil || IsNil(o.Balance) { - return nil, false - } - return o.Balance, true -} - -// HasBalance returns a boolean if a field has been set. -func (o *DeployContractInkRequest) HasBalance() bool { - if o != nil && !IsNil(o.Balance) { - return true - } - - return false -} - -// SetBalance gets a reference to the given DeployContractInkRequestBalance and assigns it to the Balance field. -func (o *DeployContractInkRequest) SetBalance(v DeployContractInkRequestBalance) { - o.Balance = &v -} - -// GetSalt returns the Salt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DeployContractInkRequest) GetSalt() DeployContractInkRequestSalt { - if o == nil || IsNil(o.Salt.Get()) { - var ret DeployContractInkRequestSalt - return ret - } - return *o.Salt.Get() -} - -// GetSaltOk returns a tuple with the Salt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DeployContractInkRequest) GetSaltOk() (*DeployContractInkRequestSalt, bool) { - if o == nil { - return nil, false - } - return o.Salt.Get(), o.Salt.IsSet() -} - -// HasSalt returns a boolean if a field has been set. -func (o *DeployContractInkRequest) HasSalt() bool { - if o != nil && o.Salt.IsSet() { - return true - } - - return false -} - -// SetSalt gets a reference to the given NullableDeployContractInkRequestSalt and assigns it to the Salt field. -func (o *DeployContractInkRequest) SetSalt(v DeployContractInkRequestSalt) { - o.Salt.Set(&v) -} -// SetSaltNil sets the value for Salt to be an explicit nil -func (o *DeployContractInkRequest) SetSaltNil() { - o.Salt.Set(nil) -} - -// UnsetSalt ensures that no value is present for Salt, not even an explicit nil -func (o *DeployContractInkRequest) UnsetSalt() { - o.Salt.Unset() -} - -func (o DeployContractInkRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractInkRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["wasm"] = o.Wasm - if !IsNil(o.ConstructorMethod) { - toSerialize["constructorMethod"] = o.ConstructorMethod - } - toSerialize["metadata"] = o.Metadata - toSerialize["gasLimit"] = o.GasLimit - if o.StorageDepositLimit.IsSet() { - toSerialize["storageDepositLimit"] = o.StorageDepositLimit.Get() - } - if !IsNil(o.Params) { - toSerialize["params"] = o.Params - } - if !IsNil(o.Balance) { - toSerialize["balance"] = o.Balance - } - if o.Salt.IsSet() { - toSerialize["salt"] = o.Salt.Get() - } - return toSerialize, nil -} - -type NullableDeployContractInkRequest struct { - value *DeployContractInkRequest - isSet bool -} - -func (v NullableDeployContractInkRequest) Get() *DeployContractInkRequest { - return v.value -} - -func (v *NullableDeployContractInkRequest) Set(val *DeployContractInkRequest) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractInkRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractInkRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractInkRequest(val *DeployContractInkRequest) *NullableDeployContractInkRequest { - return &NullableDeployContractInkRequest{value: val, isSet: true} -} - -func (v NullableDeployContractInkRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractInkRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_balance.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_balance.go deleted file mode 100644 index 7f46a68c6c..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_balance.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" - "fmt" -) - -// DeployContractInkRequestBalance - struct for DeployContractInkRequestBalance -type DeployContractInkRequestBalance struct { - Int32 *int32 - String *string -} - -// int32AsDeployContractInkRequestBalance is a convenience function that returns int32 wrapped in DeployContractInkRequestBalance -func Int32AsDeployContractInkRequestBalance(v *int32) DeployContractInkRequestBalance { - return DeployContractInkRequestBalance{ - Int32: v, - } -} - -// stringAsDeployContractInkRequestBalance is a convenience function that returns string wrapped in DeployContractInkRequestBalance -func StringAsDeployContractInkRequestBalance(v *string) DeployContractInkRequestBalance { - return DeployContractInkRequestBalance{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *DeployContractInkRequestBalance) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Int32 - err = newStrictDecoder(data).Decode(&dst.Int32) - if err == nil { - jsonInt32, _ := json.Marshal(dst.Int32) - if string(jsonInt32) == "{}" { // empty struct - dst.Int32 = nil - } else { - match++ - } - } else { - dst.Int32 = nil - } - - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Int32 = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(DeployContractInkRequestBalance)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(DeployContractInkRequestBalance)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src DeployContractInkRequestBalance) MarshalJSON() ([]byte, error) { - if src.Int32 != nil { - return json.Marshal(&src.Int32) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *DeployContractInkRequestBalance) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Int32 != nil { - return obj.Int32 - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableDeployContractInkRequestBalance struct { - value *DeployContractInkRequestBalance - isSet bool -} - -func (v NullableDeployContractInkRequestBalance) Get() *DeployContractInkRequestBalance { - return v.value -} - -func (v *NullableDeployContractInkRequestBalance) Set(val *DeployContractInkRequestBalance) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractInkRequestBalance) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractInkRequestBalance) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractInkRequestBalance(val *DeployContractInkRequestBalance) *NullableDeployContractInkRequestBalance { - return &NullableDeployContractInkRequestBalance{value: val, isSet: true} -} - -func (v NullableDeployContractInkRequestBalance) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractInkRequestBalance) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_gas_limit.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_gas_limit.go deleted file mode 100644 index 189a9e6748..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_gas_limit.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the DeployContractInkRequestGasLimit type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractInkRequestGasLimit{} - -// DeployContractInkRequestGasLimit struct for DeployContractInkRequestGasLimit -type DeployContractInkRequestGasLimit struct { - RefTime int32 `json:"refTime"` - ProofSize int32 `json:"proofSize"` -} - -// NewDeployContractInkRequestGasLimit instantiates a new DeployContractInkRequestGasLimit object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractInkRequestGasLimit(refTime int32, proofSize int32) *DeployContractInkRequestGasLimit { - this := DeployContractInkRequestGasLimit{} - this.RefTime = refTime - this.ProofSize = proofSize - return &this -} - -// NewDeployContractInkRequestGasLimitWithDefaults instantiates a new DeployContractInkRequestGasLimit object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractInkRequestGasLimitWithDefaults() *DeployContractInkRequestGasLimit { - this := DeployContractInkRequestGasLimit{} - return &this -} - -// GetRefTime returns the RefTime field value -func (o *DeployContractInkRequestGasLimit) GetRefTime() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.RefTime -} - -// GetRefTimeOk returns a tuple with the RefTime field value -// and a boolean to check if the value has been set. -func (o *DeployContractInkRequestGasLimit) GetRefTimeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.RefTime, true -} - -// SetRefTime sets field value -func (o *DeployContractInkRequestGasLimit) SetRefTime(v int32) { - o.RefTime = v -} - -// GetProofSize returns the ProofSize field value -func (o *DeployContractInkRequestGasLimit) GetProofSize() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.ProofSize -} - -// GetProofSizeOk returns a tuple with the ProofSize field value -// and a boolean to check if the value has been set. -func (o *DeployContractInkRequestGasLimit) GetProofSizeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.ProofSize, true -} - -// SetProofSize sets field value -func (o *DeployContractInkRequestGasLimit) SetProofSize(v int32) { - o.ProofSize = v -} - -func (o DeployContractInkRequestGasLimit) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractInkRequestGasLimit) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["refTime"] = o.RefTime - toSerialize["proofSize"] = o.ProofSize - return toSerialize, nil -} - -type NullableDeployContractInkRequestGasLimit struct { - value *DeployContractInkRequestGasLimit - isSet bool -} - -func (v NullableDeployContractInkRequestGasLimit) Get() *DeployContractInkRequestGasLimit { - return v.value -} - -func (v *NullableDeployContractInkRequestGasLimit) Set(val *DeployContractInkRequestGasLimit) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractInkRequestGasLimit) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractInkRequestGasLimit) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractInkRequestGasLimit(val *DeployContractInkRequestGasLimit) *NullableDeployContractInkRequestGasLimit { - return &NullableDeployContractInkRequestGasLimit{value: val, isSet: true} -} - -func (v NullableDeployContractInkRequestGasLimit) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractInkRequestGasLimit) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_salt.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_salt.go deleted file mode 100644 index e31c6cb992..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_salt.go +++ /dev/null @@ -1,123 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" - "fmt" -) - -// DeployContractInkRequestSalt - struct for DeployContractInkRequestSalt -type DeployContractInkRequestSalt struct { - String *string -} - -// stringAsDeployContractInkRequestSalt is a convenience function that returns string wrapped in DeployContractInkRequestSalt -func StringAsDeployContractInkRequestSalt(v *string) DeployContractInkRequestSalt { - return DeployContractInkRequestSalt{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *DeployContractInkRequestSalt) UnmarshalJSON(data []byte) error { - var err error - // this object is nullable so check if the payload is null or empty string - if string(data) == "" || string(data) == "{}" { - return nil - } - - match := 0 - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(DeployContractInkRequestSalt)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(DeployContractInkRequestSalt)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src DeployContractInkRequestSalt) MarshalJSON() ([]byte, error) { - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *DeployContractInkRequestSalt) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableDeployContractInkRequestSalt struct { - value *DeployContractInkRequestSalt - isSet bool -} - -func (v NullableDeployContractInkRequestSalt) Get() *DeployContractInkRequestSalt { - return v.value -} - -func (v *NullableDeployContractInkRequestSalt) Set(val *DeployContractInkRequestSalt) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractInkRequestSalt) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractInkRequestSalt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractInkRequestSalt(val *DeployContractInkRequestSalt) *NullableDeployContractInkRequestSalt { - return &NullableDeployContractInkRequestSalt{value: val, isSet: true} -} - -func (v NullableDeployContractInkRequestSalt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractInkRequestSalt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_storage_deposit_limit.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_storage_deposit_limit.go deleted file mode 100644 index b62ecad786..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_request_storage_deposit_limit.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" - "fmt" -) - -// DeployContractInkRequestStorageDepositLimit - struct for DeployContractInkRequestStorageDepositLimit -type DeployContractInkRequestStorageDepositLimit struct { - Int32 *int32 - String *string -} - -// int32AsDeployContractInkRequestStorageDepositLimit is a convenience function that returns int32 wrapped in DeployContractInkRequestStorageDepositLimit -func Int32AsDeployContractInkRequestStorageDepositLimit(v *int32) DeployContractInkRequestStorageDepositLimit { - return DeployContractInkRequestStorageDepositLimit{ - Int32: v, - } -} - -// stringAsDeployContractInkRequestStorageDepositLimit is a convenience function that returns string wrapped in DeployContractInkRequestStorageDepositLimit -func StringAsDeployContractInkRequestStorageDepositLimit(v *string) DeployContractInkRequestStorageDepositLimit { - return DeployContractInkRequestStorageDepositLimit{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *DeployContractInkRequestStorageDepositLimit) UnmarshalJSON(data []byte) error { - var err error - // this object is nullable so check if the payload is null or empty string - if string(data) == "" || string(data) == "{}" { - return nil - } - - match := 0 - // try to unmarshal data into Int32 - err = newStrictDecoder(data).Decode(&dst.Int32) - if err == nil { - jsonInt32, _ := json.Marshal(dst.Int32) - if string(jsonInt32) == "{}" { // empty struct - dst.Int32 = nil - } else { - match++ - } - } else { - dst.Int32 = nil - } - - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Int32 = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(DeployContractInkRequestStorageDepositLimit)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(DeployContractInkRequestStorageDepositLimit)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src DeployContractInkRequestStorageDepositLimit) MarshalJSON() ([]byte, error) { - if src.Int32 != nil { - return json.Marshal(&src.Int32) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *DeployContractInkRequestStorageDepositLimit) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Int32 != nil { - return obj.Int32 - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableDeployContractInkRequestStorageDepositLimit struct { - value *DeployContractInkRequestStorageDepositLimit - isSet bool -} - -func (v NullableDeployContractInkRequestStorageDepositLimit) Get() *DeployContractInkRequestStorageDepositLimit { - return v.value -} - -func (v *NullableDeployContractInkRequestStorageDepositLimit) Set(val *DeployContractInkRequestStorageDepositLimit) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractInkRequestStorageDepositLimit) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractInkRequestStorageDepositLimit) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractInkRequestStorageDepositLimit(val *DeployContractInkRequestStorageDepositLimit) *NullableDeployContractInkRequestStorageDepositLimit { - return &NullableDeployContractInkRequestStorageDepositLimit{value: val, isSet: true} -} - -func (v NullableDeployContractInkRequestStorageDepositLimit) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractInkRequestStorageDepositLimit) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_response.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_response.go deleted file mode 100644 index dcda6401e3..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_deploy_contract_ink_response.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the DeployContractInkResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractInkResponse{} - -// DeployContractInkResponse struct for DeployContractInkResponse -type DeployContractInkResponse struct { - Success bool `json:"success"` - ContractAddress *string `json:"contractAddress,omitempty"` -} - -// NewDeployContractInkResponse instantiates a new DeployContractInkResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractInkResponse(success bool) *DeployContractInkResponse { - this := DeployContractInkResponse{} - this.Success = success - return &this -} - -// NewDeployContractInkResponseWithDefaults instantiates a new DeployContractInkResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractInkResponseWithDefaults() *DeployContractInkResponse { - this := DeployContractInkResponse{} - return &this -} - -// GetSuccess returns the Success field value -func (o *DeployContractInkResponse) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *DeployContractInkResponse) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *DeployContractInkResponse) SetSuccess(v bool) { - o.Success = v -} - -// GetContractAddress returns the ContractAddress field value if set, zero value otherwise. -func (o *DeployContractInkResponse) GetContractAddress() string { - if o == nil || IsNil(o.ContractAddress) { - var ret string - return ret - } - return *o.ContractAddress -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractInkResponse) GetContractAddressOk() (*string, bool) { - if o == nil || IsNil(o.ContractAddress) { - return nil, false - } - return o.ContractAddress, true -} - -// HasContractAddress returns a boolean if a field has been set. -func (o *DeployContractInkResponse) HasContractAddress() bool { - if o != nil && !IsNil(o.ContractAddress) { - return true - } - - return false -} - -// SetContractAddress gets a reference to the given string and assigns it to the ContractAddress field. -func (o *DeployContractInkResponse) SetContractAddress(v string) { - o.ContractAddress = &v -} - -func (o DeployContractInkResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractInkResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["success"] = o.Success - if !IsNil(o.ContractAddress) { - toSerialize["contractAddress"] = o.ContractAddress - } - return toSerialize, nil -} - -type NullableDeployContractInkResponse struct { - value *DeployContractInkResponse - isSet bool -} - -func (v NullableDeployContractInkResponse) Get() *DeployContractInkResponse { - return v.value -} - -func (v *NullableDeployContractInkResponse) Set(val *DeployContractInkResponse) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractInkResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractInkResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractInkResponse(val *DeployContractInkResponse) *NullableDeployContractInkResponse { - return &NullableDeployContractInkResponse{value: val, isSet: true} -} - -func (v NullableDeployContractInkResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractInkResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_error_exception_response.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_error_exception_response.go deleted file mode 100644 index 19faabf94c..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_error_exception_response.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the ErrorExceptionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorExceptionResponse{} - -// ErrorExceptionResponse Error response from the connector. -type ErrorExceptionResponse struct { - // Short error description message. - Message string `json:"message"` - // Detailed error information. - Error string `json:"error"` -} - -// NewErrorExceptionResponse instantiates a new ErrorExceptionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorExceptionResponse(message string, error_ string) *ErrorExceptionResponse { - this := ErrorExceptionResponse{} - this.Message = message - this.Error = error_ - return &this -} - -// NewErrorExceptionResponseWithDefaults instantiates a new ErrorExceptionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorExceptionResponseWithDefaults() *ErrorExceptionResponse { - this := ErrorExceptionResponse{} - return &this -} - -// GetMessage returns the Message field value -func (o *ErrorExceptionResponse) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponse) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ErrorExceptionResponse) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -func (o *ErrorExceptionResponse) GetError() string { - if o == nil { - var ret string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponse) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ErrorExceptionResponse) SetError(v string) { - o.Error = v -} - -func (o ErrorExceptionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorExceptionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error - return toSerialize, nil -} - -type NullableErrorExceptionResponse struct { - value *ErrorExceptionResponse - isSet bool -} - -func (v NullableErrorExceptionResponse) Get() *ErrorExceptionResponse { - return v.value -} - -func (v *NullableErrorExceptionResponse) Set(val *ErrorExceptionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableErrorExceptionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorExceptionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorExceptionResponse(val *ErrorExceptionResponse) *NullableErrorExceptionResponse { - return &NullableErrorExceptionResponse{value: val, isSet: true} -} - -func (v NullableErrorExceptionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorExceptionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_invoke_contract_request.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_invoke_contract_request.go deleted file mode 100644 index 25289eab14..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_invoke_contract_request.go +++ /dev/null @@ -1,399 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the InvokeContractRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractRequest{} - -// InvokeContractRequest struct for InvokeContractRequest -type InvokeContractRequest struct { - InvocationType PolkadotContractInvocationType `json:"invocationType"` - AccountAddress string `json:"accountAddress"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - Metadata PolkadotTransactionConfigTransferSubmittable `json:"metadata"` - ContractAddress string `json:"contractAddress"` - // The name of the contract method to invoke. - MethodName string `json:"methodName"` - GasLimit DeployContractInkRequestGasLimit `json:"gasLimit"` - StorageDepositLimit NullableDeployContractInkRequestStorageDepositLimit `json:"storageDepositLimit,omitempty"` - Balance *DeployContractInkRequestBalance `json:"balance,omitempty"` - // The list of arguments to pass in to the contract method being invoked - Params []interface{} `json:"params,omitempty"` -} - -// NewInvokeContractRequest instantiates a new InvokeContractRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractRequest(invocationType PolkadotContractInvocationType, accountAddress string, web3SigningCredential Web3SigningCredential, metadata PolkadotTransactionConfigTransferSubmittable, contractAddress string, methodName string, gasLimit DeployContractInkRequestGasLimit) *InvokeContractRequest { - this := InvokeContractRequest{} - this.InvocationType = invocationType - this.AccountAddress = accountAddress - this.Web3SigningCredential = web3SigningCredential - this.Metadata = metadata - this.ContractAddress = contractAddress - this.MethodName = methodName - this.GasLimit = gasLimit - return &this -} - -// NewInvokeContractRequestWithDefaults instantiates a new InvokeContractRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractRequestWithDefaults() *InvokeContractRequest { - this := InvokeContractRequest{} - return &this -} - -// GetInvocationType returns the InvocationType field value -func (o *InvokeContractRequest) GetInvocationType() PolkadotContractInvocationType { - if o == nil { - var ret PolkadotContractInvocationType - return ret - } - - return o.InvocationType -} - -// GetInvocationTypeOk returns a tuple with the InvocationType field value -// and a boolean to check if the value has been set. -func (o *InvokeContractRequest) GetInvocationTypeOk() (*PolkadotContractInvocationType, bool) { - if o == nil { - return nil, false - } - return &o.InvocationType, true -} - -// SetInvocationType sets field value -func (o *InvokeContractRequest) SetInvocationType(v PolkadotContractInvocationType) { - o.InvocationType = v -} - -// GetAccountAddress returns the AccountAddress field value -func (o *InvokeContractRequest) GetAccountAddress() string { - if o == nil { - var ret string - return ret - } - - return o.AccountAddress -} - -// GetAccountAddressOk returns a tuple with the AccountAddress field value -// and a boolean to check if the value has been set. -func (o *InvokeContractRequest) GetAccountAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccountAddress, true -} - -// SetAccountAddress sets field value -func (o *InvokeContractRequest) SetAccountAddress(v string) { - o.AccountAddress = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *InvokeContractRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *InvokeContractRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *InvokeContractRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetMetadata returns the Metadata field value -func (o *InvokeContractRequest) GetMetadata() PolkadotTransactionConfigTransferSubmittable { - if o == nil { - var ret PolkadotTransactionConfigTransferSubmittable - return ret - } - - return o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value -// and a boolean to check if the value has been set. -func (o *InvokeContractRequest) GetMetadataOk() (*PolkadotTransactionConfigTransferSubmittable, bool) { - if o == nil { - return nil, false - } - return &o.Metadata, true -} - -// SetMetadata sets field value -func (o *InvokeContractRequest) SetMetadata(v PolkadotTransactionConfigTransferSubmittable) { - o.Metadata = v -} - -// GetContractAddress returns the ContractAddress field value -func (o *InvokeContractRequest) GetContractAddress() string { - if o == nil { - var ret string - return ret - } - - return o.ContractAddress -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value -// and a boolean to check if the value has been set. -func (o *InvokeContractRequest) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractAddress, true -} - -// SetContractAddress sets field value -func (o *InvokeContractRequest) SetContractAddress(v string) { - o.ContractAddress = v -} - -// GetMethodName returns the MethodName field value -func (o *InvokeContractRequest) GetMethodName() string { - if o == nil { - var ret string - return ret - } - - return o.MethodName -} - -// GetMethodNameOk returns a tuple with the MethodName field value -// and a boolean to check if the value has been set. -func (o *InvokeContractRequest) GetMethodNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MethodName, true -} - -// SetMethodName sets field value -func (o *InvokeContractRequest) SetMethodName(v string) { - o.MethodName = v -} - -// GetGasLimit returns the GasLimit field value -func (o *InvokeContractRequest) GetGasLimit() DeployContractInkRequestGasLimit { - if o == nil { - var ret DeployContractInkRequestGasLimit - return ret - } - - return o.GasLimit -} - -// GetGasLimitOk returns a tuple with the GasLimit field value -// and a boolean to check if the value has been set. -func (o *InvokeContractRequest) GetGasLimitOk() (*DeployContractInkRequestGasLimit, bool) { - if o == nil { - return nil, false - } - return &o.GasLimit, true -} - -// SetGasLimit sets field value -func (o *InvokeContractRequest) SetGasLimit(v DeployContractInkRequestGasLimit) { - o.GasLimit = v -} - -// GetStorageDepositLimit returns the StorageDepositLimit field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvokeContractRequest) GetStorageDepositLimit() DeployContractInkRequestStorageDepositLimit { - if o == nil || IsNil(o.StorageDepositLimit.Get()) { - var ret DeployContractInkRequestStorageDepositLimit - return ret - } - return *o.StorageDepositLimit.Get() -} - -// GetStorageDepositLimitOk returns a tuple with the StorageDepositLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvokeContractRequest) GetStorageDepositLimitOk() (*DeployContractInkRequestStorageDepositLimit, bool) { - if o == nil { - return nil, false - } - return o.StorageDepositLimit.Get(), o.StorageDepositLimit.IsSet() -} - -// HasStorageDepositLimit returns a boolean if a field has been set. -func (o *InvokeContractRequest) HasStorageDepositLimit() bool { - if o != nil && o.StorageDepositLimit.IsSet() { - return true - } - - return false -} - -// SetStorageDepositLimit gets a reference to the given NullableDeployContractInkRequestStorageDepositLimit and assigns it to the StorageDepositLimit field. -func (o *InvokeContractRequest) SetStorageDepositLimit(v DeployContractInkRequestStorageDepositLimit) { - o.StorageDepositLimit.Set(&v) -} -// SetStorageDepositLimitNil sets the value for StorageDepositLimit to be an explicit nil -func (o *InvokeContractRequest) SetStorageDepositLimitNil() { - o.StorageDepositLimit.Set(nil) -} - -// UnsetStorageDepositLimit ensures that no value is present for StorageDepositLimit, not even an explicit nil -func (o *InvokeContractRequest) UnsetStorageDepositLimit() { - o.StorageDepositLimit.Unset() -} - -// GetBalance returns the Balance field value if set, zero value otherwise. -func (o *InvokeContractRequest) GetBalance() DeployContractInkRequestBalance { - if o == nil || IsNil(o.Balance) { - var ret DeployContractInkRequestBalance - return ret - } - return *o.Balance -} - -// GetBalanceOk returns a tuple with the Balance field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractRequest) GetBalanceOk() (*DeployContractInkRequestBalance, bool) { - if o == nil || IsNil(o.Balance) { - return nil, false - } - return o.Balance, true -} - -// HasBalance returns a boolean if a field has been set. -func (o *InvokeContractRequest) HasBalance() bool { - if o != nil && !IsNil(o.Balance) { - return true - } - - return false -} - -// SetBalance gets a reference to the given DeployContractInkRequestBalance and assigns it to the Balance field. -func (o *InvokeContractRequest) SetBalance(v DeployContractInkRequestBalance) { - o.Balance = &v -} - -// GetParams returns the Params field value if set, zero value otherwise. -func (o *InvokeContractRequest) GetParams() []interface{} { - if o == nil || IsNil(o.Params) { - var ret []interface{} - return ret - } - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractRequest) GetParamsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.Params) { - return nil, false - } - return o.Params, true -} - -// HasParams returns a boolean if a field has been set. -func (o *InvokeContractRequest) HasParams() bool { - if o != nil && !IsNil(o.Params) { - return true - } - - return false -} - -// SetParams gets a reference to the given []interface{} and assigns it to the Params field. -func (o *InvokeContractRequest) SetParams(v []interface{}) { - o.Params = v -} - -func (o InvokeContractRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["invocationType"] = o.InvocationType - toSerialize["accountAddress"] = o.AccountAddress - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["metadata"] = o.Metadata - toSerialize["contractAddress"] = o.ContractAddress - toSerialize["methodName"] = o.MethodName - toSerialize["gasLimit"] = o.GasLimit - if o.StorageDepositLimit.IsSet() { - toSerialize["storageDepositLimit"] = o.StorageDepositLimit.Get() - } - if !IsNil(o.Balance) { - toSerialize["balance"] = o.Balance - } - if !IsNil(o.Params) { - toSerialize["params"] = o.Params - } - return toSerialize, nil -} - -type NullableInvokeContractRequest struct { - value *InvokeContractRequest - isSet bool -} - -func (v NullableInvokeContractRequest) Get() *InvokeContractRequest { - return v.value -} - -func (v *NullableInvokeContractRequest) Set(val *InvokeContractRequest) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractRequest(val *InvokeContractRequest) *NullableInvokeContractRequest { - return &NullableInvokeContractRequest{value: val, isSet: true} -} - -func (v NullableInvokeContractRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_invoke_contract_response.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_invoke_contract_response.go deleted file mode 100644 index a9bb4cbb96..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_invoke_contract_response.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the InvokeContractResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractResponse{} - -// InvokeContractResponse struct for InvokeContractResponse -type InvokeContractResponse struct { - CallOutput interface{} `json:"callOutput,omitempty"` - Success bool `json:"success"` - TxHash *string `json:"txHash,omitempty"` - BlockHash *string `json:"blockHash,omitempty"` -} - -// NewInvokeContractResponse instantiates a new InvokeContractResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractResponse(success bool) *InvokeContractResponse { - this := InvokeContractResponse{} - this.Success = success - return &this -} - -// NewInvokeContractResponseWithDefaults instantiates a new InvokeContractResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractResponseWithDefaults() *InvokeContractResponse { - this := InvokeContractResponse{} - return &this -} - -// GetCallOutput returns the CallOutput field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvokeContractResponse) GetCallOutput() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CallOutput -} - -// GetCallOutputOk returns a tuple with the CallOutput field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvokeContractResponse) GetCallOutputOk() (*interface{}, bool) { - if o == nil || IsNil(o.CallOutput) { - return nil, false - } - return &o.CallOutput, true -} - -// HasCallOutput returns a boolean if a field has been set. -func (o *InvokeContractResponse) HasCallOutput() bool { - if o != nil && IsNil(o.CallOutput) { - return true - } - - return false -} - -// SetCallOutput gets a reference to the given interface{} and assigns it to the CallOutput field. -func (o *InvokeContractResponse) SetCallOutput(v interface{}) { - o.CallOutput = v -} - -// GetSuccess returns the Success field value -func (o *InvokeContractResponse) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *InvokeContractResponse) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *InvokeContractResponse) SetSuccess(v bool) { - o.Success = v -} - -// GetTxHash returns the TxHash field value if set, zero value otherwise. -func (o *InvokeContractResponse) GetTxHash() string { - if o == nil || IsNil(o.TxHash) { - var ret string - return ret - } - return *o.TxHash -} - -// GetTxHashOk returns a tuple with the TxHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractResponse) GetTxHashOk() (*string, bool) { - if o == nil || IsNil(o.TxHash) { - return nil, false - } - return o.TxHash, true -} - -// HasTxHash returns a boolean if a field has been set. -func (o *InvokeContractResponse) HasTxHash() bool { - if o != nil && !IsNil(o.TxHash) { - return true - } - - return false -} - -// SetTxHash gets a reference to the given string and assigns it to the TxHash field. -func (o *InvokeContractResponse) SetTxHash(v string) { - o.TxHash = &v -} - -// GetBlockHash returns the BlockHash field value if set, zero value otherwise. -func (o *InvokeContractResponse) GetBlockHash() string { - if o == nil || IsNil(o.BlockHash) { - var ret string - return ret - } - return *o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractResponse) GetBlockHashOk() (*string, bool) { - if o == nil || IsNil(o.BlockHash) { - return nil, false - } - return o.BlockHash, true -} - -// HasBlockHash returns a boolean if a field has been set. -func (o *InvokeContractResponse) HasBlockHash() bool { - if o != nil && !IsNil(o.BlockHash) { - return true - } - - return false -} - -// SetBlockHash gets a reference to the given string and assigns it to the BlockHash field. -func (o *InvokeContractResponse) SetBlockHash(v string) { - o.BlockHash = &v -} - -func (o InvokeContractResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.CallOutput != nil { - toSerialize["callOutput"] = o.CallOutput - } - toSerialize["success"] = o.Success - if !IsNil(o.TxHash) { - toSerialize["txHash"] = o.TxHash - } - if !IsNil(o.BlockHash) { - toSerialize["blockHash"] = o.BlockHash - } - return toSerialize, nil -} - -type NullableInvokeContractResponse struct { - value *InvokeContractResponse - isSet bool -} - -func (v NullableInvokeContractResponse) Get() *InvokeContractResponse { - return v.value -} - -func (v *NullableInvokeContractResponse) Set(val *InvokeContractResponse) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractResponse(val *InvokeContractResponse) *NullableInvokeContractResponse { - return &NullableInvokeContractResponse{value: val, isSet: true} -} - -func (v NullableInvokeContractResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_contract_invocation_type.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_contract_invocation_type.go deleted file mode 100644 index 7ab74672c8..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_contract_invocation_type.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" - "fmt" -) - -// PolkadotContractInvocationType the model 'PolkadotContractInvocationType' -type PolkadotContractInvocationType string - -// List of PolkadotContractInvocationType -const ( - SEND PolkadotContractInvocationType = "SEND" - QUERY PolkadotContractInvocationType = "QUERY" -) - -// All allowed values of PolkadotContractInvocationType enum -var AllowedPolkadotContractInvocationTypeEnumValues = []PolkadotContractInvocationType{ - "SEND", - "QUERY", -} - -func (v *PolkadotContractInvocationType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := PolkadotContractInvocationType(value) - for _, existing := range AllowedPolkadotContractInvocationTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid PolkadotContractInvocationType", value) -} - -// NewPolkadotContractInvocationTypeFromValue returns a pointer to a valid PolkadotContractInvocationType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewPolkadotContractInvocationTypeFromValue(v string) (*PolkadotContractInvocationType, error) { - ev := PolkadotContractInvocationType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for PolkadotContractInvocationType: valid values are %v", v, AllowedPolkadotContractInvocationTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v PolkadotContractInvocationType) IsValid() bool { - for _, existing := range AllowedPolkadotContractInvocationTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to PolkadotContractInvocationType value -func (v PolkadotContractInvocationType) Ptr() *PolkadotContractInvocationType { - return &v -} - -type NullablePolkadotContractInvocationType struct { - value *PolkadotContractInvocationType - isSet bool -} - -func (v NullablePolkadotContractInvocationType) Get() *PolkadotContractInvocationType { - return v.value -} - -func (v *NullablePolkadotContractInvocationType) Set(val *PolkadotContractInvocationType) { - v.value = val - v.isSet = true -} - -func (v NullablePolkadotContractInvocationType) IsSet() bool { - return v.isSet -} - -func (v *NullablePolkadotContractInvocationType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePolkadotContractInvocationType(val *PolkadotContractInvocationType) *NullablePolkadotContractInvocationType { - return &NullablePolkadotContractInvocationType{value: val, isSet: true} -} - -func (v NullablePolkadotContractInvocationType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePolkadotContractInvocationType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_transaction_config.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_transaction_config.go deleted file mode 100644 index ecaa3246ce..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_transaction_config.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the PolkadotTransactionConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PolkadotTransactionConfig{} - -// PolkadotTransactionConfig struct for PolkadotTransactionConfig -type PolkadotTransactionConfig struct { - TransferSubmittable *PolkadotTransactionConfigTransferSubmittable `json:"transferSubmittable,omitempty"` - To *PolkadotTransactionConfigTransferSubmittable `json:"to,omitempty"` - Value *PolkadotTransactionConfigValue `json:"value,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _PolkadotTransactionConfig PolkadotTransactionConfig - -// NewPolkadotTransactionConfig instantiates a new PolkadotTransactionConfig object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPolkadotTransactionConfig() *PolkadotTransactionConfig { - this := PolkadotTransactionConfig{} - return &this -} - -// NewPolkadotTransactionConfigWithDefaults instantiates a new PolkadotTransactionConfig object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPolkadotTransactionConfigWithDefaults() *PolkadotTransactionConfig { - this := PolkadotTransactionConfig{} - return &this -} - -// GetTransferSubmittable returns the TransferSubmittable field value if set, zero value otherwise. -func (o *PolkadotTransactionConfig) GetTransferSubmittable() PolkadotTransactionConfigTransferSubmittable { - if o == nil || IsNil(o.TransferSubmittable) { - var ret PolkadotTransactionConfigTransferSubmittable - return ret - } - return *o.TransferSubmittable -} - -// GetTransferSubmittableOk returns a tuple with the TransferSubmittable field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PolkadotTransactionConfig) GetTransferSubmittableOk() (*PolkadotTransactionConfigTransferSubmittable, bool) { - if o == nil || IsNil(o.TransferSubmittable) { - return nil, false - } - return o.TransferSubmittable, true -} - -// HasTransferSubmittable returns a boolean if a field has been set. -func (o *PolkadotTransactionConfig) HasTransferSubmittable() bool { - if o != nil && !IsNil(o.TransferSubmittable) { - return true - } - - return false -} - -// SetTransferSubmittable gets a reference to the given PolkadotTransactionConfigTransferSubmittable and assigns it to the TransferSubmittable field. -func (o *PolkadotTransactionConfig) SetTransferSubmittable(v PolkadotTransactionConfigTransferSubmittable) { - o.TransferSubmittable = &v -} - -// GetTo returns the To field value if set, zero value otherwise. -func (o *PolkadotTransactionConfig) GetTo() PolkadotTransactionConfigTransferSubmittable { - if o == nil || IsNil(o.To) { - var ret PolkadotTransactionConfigTransferSubmittable - return ret - } - return *o.To -} - -// GetToOk returns a tuple with the To field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PolkadotTransactionConfig) GetToOk() (*PolkadotTransactionConfigTransferSubmittable, bool) { - if o == nil || IsNil(o.To) { - return nil, false - } - return o.To, true -} - -// HasTo returns a boolean if a field has been set. -func (o *PolkadotTransactionConfig) HasTo() bool { - if o != nil && !IsNil(o.To) { - return true - } - - return false -} - -// SetTo gets a reference to the given PolkadotTransactionConfigTransferSubmittable and assigns it to the To field. -func (o *PolkadotTransactionConfig) SetTo(v PolkadotTransactionConfigTransferSubmittable) { - o.To = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *PolkadotTransactionConfig) GetValue() PolkadotTransactionConfigValue { - if o == nil || IsNil(o.Value) { - var ret PolkadotTransactionConfigValue - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PolkadotTransactionConfig) GetValueOk() (*PolkadotTransactionConfigValue, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *PolkadotTransactionConfig) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given PolkadotTransactionConfigValue and assigns it to the Value field. -func (o *PolkadotTransactionConfig) SetValue(v PolkadotTransactionConfigValue) { - o.Value = &v -} - -func (o PolkadotTransactionConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PolkadotTransactionConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.TransferSubmittable) { - toSerialize["transferSubmittable"] = o.TransferSubmittable - } - if !IsNil(o.To) { - toSerialize["to"] = o.To - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *PolkadotTransactionConfig) UnmarshalJSON(bytes []byte) (err error) { - varPolkadotTransactionConfig := _PolkadotTransactionConfig{} - - if err = json.Unmarshal(bytes, &varPolkadotTransactionConfig); err == nil { - *o = PolkadotTransactionConfig(varPolkadotTransactionConfig) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "transferSubmittable") - delete(additionalProperties, "to") - delete(additionalProperties, "value") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullablePolkadotTransactionConfig struct { - value *PolkadotTransactionConfig - isSet bool -} - -func (v NullablePolkadotTransactionConfig) Get() *PolkadotTransactionConfig { - return v.value -} - -func (v *NullablePolkadotTransactionConfig) Set(val *PolkadotTransactionConfig) { - v.value = val - v.isSet = true -} - -func (v NullablePolkadotTransactionConfig) IsSet() bool { - return v.isSet -} - -func (v *NullablePolkadotTransactionConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePolkadotTransactionConfig(val *PolkadotTransactionConfig) *NullablePolkadotTransactionConfig { - return &NullablePolkadotTransactionConfig{value: val, isSet: true} -} - -func (v NullablePolkadotTransactionConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePolkadotTransactionConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_transaction_config_transfer_submittable.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_transaction_config_transfer_submittable.go deleted file mode 100644 index 9f4bbc66f4..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_transaction_config_transfer_submittable.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" - "fmt" -) - -// PolkadotTransactionConfigTransferSubmittable - struct for PolkadotTransactionConfigTransferSubmittable -type PolkadotTransactionConfigTransferSubmittable struct { - String *string -} - -// stringAsPolkadotTransactionConfigTransferSubmittable is a convenience function that returns string wrapped in PolkadotTransactionConfigTransferSubmittable -func StringAsPolkadotTransactionConfigTransferSubmittable(v *string) PolkadotTransactionConfigTransferSubmittable { - return PolkadotTransactionConfigTransferSubmittable{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *PolkadotTransactionConfigTransferSubmittable) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(PolkadotTransactionConfigTransferSubmittable)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(PolkadotTransactionConfigTransferSubmittable)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src PolkadotTransactionConfigTransferSubmittable) MarshalJSON() ([]byte, error) { - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *PolkadotTransactionConfigTransferSubmittable) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullablePolkadotTransactionConfigTransferSubmittable struct { - value *PolkadotTransactionConfigTransferSubmittable - isSet bool -} - -func (v NullablePolkadotTransactionConfigTransferSubmittable) Get() *PolkadotTransactionConfigTransferSubmittable { - return v.value -} - -func (v *NullablePolkadotTransactionConfigTransferSubmittable) Set(val *PolkadotTransactionConfigTransferSubmittable) { - v.value = val - v.isSet = true -} - -func (v NullablePolkadotTransactionConfigTransferSubmittable) IsSet() bool { - return v.isSet -} - -func (v *NullablePolkadotTransactionConfigTransferSubmittable) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePolkadotTransactionConfigTransferSubmittable(val *PolkadotTransactionConfigTransferSubmittable) *NullablePolkadotTransactionConfigTransferSubmittable { - return &NullablePolkadotTransactionConfigTransferSubmittable{value: val, isSet: true} -} - -func (v NullablePolkadotTransactionConfigTransferSubmittable) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePolkadotTransactionConfigTransferSubmittable) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_transaction_config_value.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_transaction_config_value.go deleted file mode 100644 index 27832112a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_polkadot_transaction_config_value.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" - "fmt" -) - -// PolkadotTransactionConfigValue - struct for PolkadotTransactionConfigValue -type PolkadotTransactionConfigValue struct { - Float32 *float32 -} - -// float32AsPolkadotTransactionConfigValue is a convenience function that returns float32 wrapped in PolkadotTransactionConfigValue -func Float32AsPolkadotTransactionConfigValue(v *float32) PolkadotTransactionConfigValue { - return PolkadotTransactionConfigValue{ - Float32: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *PolkadotTransactionConfigValue) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Float32 - err = newStrictDecoder(data).Decode(&dst.Float32) - if err == nil { - jsonFloat32, _ := json.Marshal(dst.Float32) - if string(jsonFloat32) == "{}" { // empty struct - dst.Float32 = nil - } else { - match++ - } - } else { - dst.Float32 = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Float32 = nil - - return fmt.Errorf("data matches more than one schema in oneOf(PolkadotTransactionConfigValue)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(PolkadotTransactionConfigValue)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src PolkadotTransactionConfigValue) MarshalJSON() ([]byte, error) { - if src.Float32 != nil { - return json.Marshal(&src.Float32) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *PolkadotTransactionConfigValue) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Float32 != nil { - return obj.Float32 - } - - // all schemas are nil - return nil -} - -type NullablePolkadotTransactionConfigValue struct { - value *PolkadotTransactionConfigValue - isSet bool -} - -func (v NullablePolkadotTransactionConfigValue) Get() *PolkadotTransactionConfigValue { - return v.value -} - -func (v *NullablePolkadotTransactionConfigValue) Set(val *PolkadotTransactionConfigValue) { - v.value = val - v.isSet = true -} - -func (v NullablePolkadotTransactionConfigValue) IsSet() bool { - return v.isSet -} - -func (v *NullablePolkadotTransactionConfigValue) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePolkadotTransactionConfigValue(val *PolkadotTransactionConfigValue) *NullablePolkadotTransactionConfigValue { - return &NullablePolkadotTransactionConfigValue{value: val, isSet: true} -} - -func (v NullablePolkadotTransactionConfigValue) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePolkadotTransactionConfigValue) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_request.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_request.go deleted file mode 100644 index 2fdae1e1ef..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_request.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the RawTransactionRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RawTransactionRequest{} - -// RawTransactionRequest struct for RawTransactionRequest -type RawTransactionRequest struct { - To string `json:"to"` - Value float32 `json:"value"` -} - -// NewRawTransactionRequest instantiates a new RawTransactionRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRawTransactionRequest(to string, value float32) *RawTransactionRequest { - this := RawTransactionRequest{} - this.To = to - this.Value = value - return &this -} - -// NewRawTransactionRequestWithDefaults instantiates a new RawTransactionRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRawTransactionRequestWithDefaults() *RawTransactionRequest { - this := RawTransactionRequest{} - return &this -} - -// GetTo returns the To field value -func (o *RawTransactionRequest) GetTo() string { - if o == nil { - var ret string - return ret - } - - return o.To -} - -// GetToOk returns a tuple with the To field value -// and a boolean to check if the value has been set. -func (o *RawTransactionRequest) GetToOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.To, true -} - -// SetTo sets field value -func (o *RawTransactionRequest) SetTo(v string) { - o.To = v -} - -// GetValue returns the Value field value -func (o *RawTransactionRequest) GetValue() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *RawTransactionRequest) GetValueOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *RawTransactionRequest) SetValue(v float32) { - o.Value = v -} - -func (o RawTransactionRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RawTransactionRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["to"] = o.To - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableRawTransactionRequest struct { - value *RawTransactionRequest - isSet bool -} - -func (v NullableRawTransactionRequest) Get() *RawTransactionRequest { - return v.value -} - -func (v *NullableRawTransactionRequest) Set(val *RawTransactionRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRawTransactionRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRawTransactionRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRawTransactionRequest(val *RawTransactionRequest) *NullableRawTransactionRequest { - return &NullableRawTransactionRequest{value: val, isSet: true} -} - -func (v NullableRawTransactionRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRawTransactionRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_response.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_response.go deleted file mode 100644 index 8097ded529..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the RawTransactionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RawTransactionResponse{} - -// RawTransactionResponse struct for RawTransactionResponse -type RawTransactionResponse struct { - ResponseContainer RawTransactionResponseResponseContainer `json:"responseContainer"` -} - -// NewRawTransactionResponse instantiates a new RawTransactionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRawTransactionResponse(responseContainer RawTransactionResponseResponseContainer) *RawTransactionResponse { - this := RawTransactionResponse{} - this.ResponseContainer = responseContainer - return &this -} - -// NewRawTransactionResponseWithDefaults instantiates a new RawTransactionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRawTransactionResponseWithDefaults() *RawTransactionResponse { - this := RawTransactionResponse{} - return &this -} - -// GetResponseContainer returns the ResponseContainer field value -func (o *RawTransactionResponse) GetResponseContainer() RawTransactionResponseResponseContainer { - if o == nil { - var ret RawTransactionResponseResponseContainer - return ret - } - - return o.ResponseContainer -} - -// GetResponseContainerOk returns a tuple with the ResponseContainer field value -// and a boolean to check if the value has been set. -func (o *RawTransactionResponse) GetResponseContainerOk() (*RawTransactionResponseResponseContainer, bool) { - if o == nil { - return nil, false - } - return &o.ResponseContainer, true -} - -// SetResponseContainer sets field value -func (o *RawTransactionResponse) SetResponseContainer(v RawTransactionResponseResponseContainer) { - o.ResponseContainer = v -} - -func (o RawTransactionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RawTransactionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["responseContainer"] = o.ResponseContainer - return toSerialize, nil -} - -type NullableRawTransactionResponse struct { - value *RawTransactionResponse - isSet bool -} - -func (v NullableRawTransactionResponse) Get() *RawTransactionResponse { - return v.value -} - -func (v *NullableRawTransactionResponse) Set(val *RawTransactionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRawTransactionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRawTransactionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRawTransactionResponse(val *RawTransactionResponse) *NullableRawTransactionResponse { - return &NullableRawTransactionResponse{value: val, isSet: true} -} - -func (v NullableRawTransactionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRawTransactionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_response_data.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_response_data.go deleted file mode 100644 index ac316cf145..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_response_data.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the RawTransactionResponseData type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RawTransactionResponseData{} - -// RawTransactionResponseData struct for RawTransactionResponseData -type RawTransactionResponseData struct { - RawTransaction string `json:"rawTransaction"` -} - -// NewRawTransactionResponseData instantiates a new RawTransactionResponseData object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRawTransactionResponseData(rawTransaction string) *RawTransactionResponseData { - this := RawTransactionResponseData{} - this.RawTransaction = rawTransaction - return &this -} - -// NewRawTransactionResponseDataWithDefaults instantiates a new RawTransactionResponseData object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRawTransactionResponseDataWithDefaults() *RawTransactionResponseData { - this := RawTransactionResponseData{} - return &this -} - -// GetRawTransaction returns the RawTransaction field value -func (o *RawTransactionResponseData) GetRawTransaction() string { - if o == nil { - var ret string - return ret - } - - return o.RawTransaction -} - -// GetRawTransactionOk returns a tuple with the RawTransaction field value -// and a boolean to check if the value has been set. -func (o *RawTransactionResponseData) GetRawTransactionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RawTransaction, true -} - -// SetRawTransaction sets field value -func (o *RawTransactionResponseData) SetRawTransaction(v string) { - o.RawTransaction = v -} - -func (o RawTransactionResponseData) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RawTransactionResponseData) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["rawTransaction"] = o.RawTransaction - return toSerialize, nil -} - -type NullableRawTransactionResponseData struct { - value *RawTransactionResponseData - isSet bool -} - -func (v NullableRawTransactionResponseData) Get() *RawTransactionResponseData { - return v.value -} - -func (v *NullableRawTransactionResponseData) Set(val *RawTransactionResponseData) { - v.value = val - v.isSet = true -} - -func (v NullableRawTransactionResponseData) IsSet() bool { - return v.isSet -} - -func (v *NullableRawTransactionResponseData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRawTransactionResponseData(val *RawTransactionResponseData) *NullableRawTransactionResponseData { - return &NullableRawTransactionResponseData{value: val, isSet: true} -} - -func (v NullableRawTransactionResponseData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRawTransactionResponseData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_response_response_container.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_response_response_container.go deleted file mode 100644 index 8ae72f0537..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_raw_transaction_response_response_container.go +++ /dev/null @@ -1,200 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the RawTransactionResponseResponseContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RawTransactionResponseResponseContainer{} - -// RawTransactionResponseResponseContainer struct for RawTransactionResponseResponseContainer -type RawTransactionResponseResponseContainer struct { - ResponseData RawTransactionResponseData `json:"response_data"` - Succeeded bool `json:"succeeded"` - Message string `json:"message"` - Error NullableString `json:"error"` -} - -// NewRawTransactionResponseResponseContainer instantiates a new RawTransactionResponseResponseContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRawTransactionResponseResponseContainer(responseData RawTransactionResponseData, succeeded bool, message string, error_ NullableString) *RawTransactionResponseResponseContainer { - this := RawTransactionResponseResponseContainer{} - this.ResponseData = responseData - this.Succeeded = succeeded - this.Message = message - this.Error = error_ - return &this -} - -// NewRawTransactionResponseResponseContainerWithDefaults instantiates a new RawTransactionResponseResponseContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRawTransactionResponseResponseContainerWithDefaults() *RawTransactionResponseResponseContainer { - this := RawTransactionResponseResponseContainer{} - return &this -} - -// GetResponseData returns the ResponseData field value -func (o *RawTransactionResponseResponseContainer) GetResponseData() RawTransactionResponseData { - if o == nil { - var ret RawTransactionResponseData - return ret - } - - return o.ResponseData -} - -// GetResponseDataOk returns a tuple with the ResponseData field value -// and a boolean to check if the value has been set. -func (o *RawTransactionResponseResponseContainer) GetResponseDataOk() (*RawTransactionResponseData, bool) { - if o == nil { - return nil, false - } - return &o.ResponseData, true -} - -// SetResponseData sets field value -func (o *RawTransactionResponseResponseContainer) SetResponseData(v RawTransactionResponseData) { - o.ResponseData = v -} - -// GetSucceeded returns the Succeeded field value -func (o *RawTransactionResponseResponseContainer) GetSucceeded() bool { - if o == nil { - var ret bool - return ret - } - - return o.Succeeded -} - -// GetSucceededOk returns a tuple with the Succeeded field value -// and a boolean to check if the value has been set. -func (o *RawTransactionResponseResponseContainer) GetSucceededOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Succeeded, true -} - -// SetSucceeded sets field value -func (o *RawTransactionResponseResponseContainer) SetSucceeded(v bool) { - o.Succeeded = v -} - -// GetMessage returns the Message field value -func (o *RawTransactionResponseResponseContainer) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *RawTransactionResponseResponseContainer) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *RawTransactionResponseResponseContainer) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -// If the value is explicit nil, the zero value for string will be returned -func (o *RawTransactionResponseResponseContainer) GetError() string { - if o == nil || o.Error.Get() == nil { - var ret string - return ret - } - - return *o.Error.Get() -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *RawTransactionResponseResponseContainer) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Error.Get(), o.Error.IsSet() -} - -// SetError sets field value -func (o *RawTransactionResponseResponseContainer) SetError(v string) { - o.Error.Set(&v) -} - -func (o RawTransactionResponseResponseContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RawTransactionResponseResponseContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["response_data"] = o.ResponseData - toSerialize["succeeded"] = o.Succeeded - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error.Get() - return toSerialize, nil -} - -type NullableRawTransactionResponseResponseContainer struct { - value *RawTransactionResponseResponseContainer - isSet bool -} - -func (v NullableRawTransactionResponseResponseContainer) Get() *RawTransactionResponseResponseContainer { - return v.value -} - -func (v *NullableRawTransactionResponseResponseContainer) Set(val *RawTransactionResponseResponseContainer) { - v.value = val - v.isSet = true -} - -func (v NullableRawTransactionResponseResponseContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableRawTransactionResponseResponseContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRawTransactionResponseResponseContainer(val *RawTransactionResponseResponseContainer) *NullableRawTransactionResponseResponseContainer { - return &NullableRawTransactionResponseResponseContainer{value: val, isSet: true} -} - -func (v NullableRawTransactionResponseResponseContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRawTransactionResponseResponseContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_run_transaction_request.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_run_transaction_request.go deleted file mode 100644 index be417ca3cf..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_run_transaction_request.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the RunTransactionRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionRequest{} - -// RunTransactionRequest struct for RunTransactionRequest -type RunTransactionRequest struct { - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - TransactionConfig PolkadotTransactionConfig `json:"transactionConfig"` -} - -// NewRunTransactionRequest instantiates a new RunTransactionRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionRequest(web3SigningCredential Web3SigningCredential, transactionConfig PolkadotTransactionConfig) *RunTransactionRequest { - this := RunTransactionRequest{} - this.Web3SigningCredential = web3SigningCredential - this.TransactionConfig = transactionConfig - return &this -} - -// NewRunTransactionRequestWithDefaults instantiates a new RunTransactionRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionRequestWithDefaults() *RunTransactionRequest { - this := RunTransactionRequest{} - return &this -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *RunTransactionRequest) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *RunTransactionRequest) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetTransactionConfig returns the TransactionConfig field value -func (o *RunTransactionRequest) GetTransactionConfig() PolkadotTransactionConfig { - if o == nil { - var ret PolkadotTransactionConfig - return ret - } - - return o.TransactionConfig -} - -// GetTransactionConfigOk returns a tuple with the TransactionConfig field value -// and a boolean to check if the value has been set. -func (o *RunTransactionRequest) GetTransactionConfigOk() (*PolkadotTransactionConfig, bool) { - if o == nil { - return nil, false - } - return &o.TransactionConfig, true -} - -// SetTransactionConfig sets field value -func (o *RunTransactionRequest) SetTransactionConfig(v PolkadotTransactionConfig) { - o.TransactionConfig = v -} - -func (o RunTransactionRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["transactionConfig"] = o.TransactionConfig - return toSerialize, nil -} - -type NullableRunTransactionRequest struct { - value *RunTransactionRequest - isSet bool -} - -func (v NullableRunTransactionRequest) Get() *RunTransactionRequest { - return v.value -} - -func (v *NullableRunTransactionRequest) Set(val *RunTransactionRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionRequest(val *RunTransactionRequest) *NullableRunTransactionRequest { - return &NullableRunTransactionRequest{value: val, isSet: true} -} - -func (v NullableRunTransactionRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_run_transaction_response.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_run_transaction_response.go deleted file mode 100644 index 453f1558f7..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_run_transaction_response.go +++ /dev/null @@ -1,189 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the RunTransactionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionResponse{} - -// RunTransactionResponse struct for RunTransactionResponse -type RunTransactionResponse struct { - Success bool `json:"success"` - TxHash *string `json:"txHash,omitempty"` - BlockHash *string `json:"blockHash,omitempty"` -} - -// NewRunTransactionResponse instantiates a new RunTransactionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionResponse(success bool) *RunTransactionResponse { - this := RunTransactionResponse{} - this.Success = success - return &this -} - -// NewRunTransactionResponseWithDefaults instantiates a new RunTransactionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionResponseWithDefaults() *RunTransactionResponse { - this := RunTransactionResponse{} - return &this -} - -// GetSuccess returns the Success field value -func (o *RunTransactionResponse) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *RunTransactionResponse) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *RunTransactionResponse) SetSuccess(v bool) { - o.Success = v -} - -// GetTxHash returns the TxHash field value if set, zero value otherwise. -func (o *RunTransactionResponse) GetTxHash() string { - if o == nil || IsNil(o.TxHash) { - var ret string - return ret - } - return *o.TxHash -} - -// GetTxHashOk returns a tuple with the TxHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunTransactionResponse) GetTxHashOk() (*string, bool) { - if o == nil || IsNil(o.TxHash) { - return nil, false - } - return o.TxHash, true -} - -// HasTxHash returns a boolean if a field has been set. -func (o *RunTransactionResponse) HasTxHash() bool { - if o != nil && !IsNil(o.TxHash) { - return true - } - - return false -} - -// SetTxHash gets a reference to the given string and assigns it to the TxHash field. -func (o *RunTransactionResponse) SetTxHash(v string) { - o.TxHash = &v -} - -// GetBlockHash returns the BlockHash field value if set, zero value otherwise. -func (o *RunTransactionResponse) GetBlockHash() string { - if o == nil || IsNil(o.BlockHash) { - var ret string - return ret - } - return *o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunTransactionResponse) GetBlockHashOk() (*string, bool) { - if o == nil || IsNil(o.BlockHash) { - return nil, false - } - return o.BlockHash, true -} - -// HasBlockHash returns a boolean if a field has been set. -func (o *RunTransactionResponse) HasBlockHash() bool { - if o != nil && !IsNil(o.BlockHash) { - return true - } - - return false -} - -// SetBlockHash gets a reference to the given string and assigns it to the BlockHash field. -func (o *RunTransactionResponse) SetBlockHash(v string) { - o.BlockHash = &v -} - -func (o RunTransactionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["success"] = o.Success - if !IsNil(o.TxHash) { - toSerialize["txHash"] = o.TxHash - } - if !IsNil(o.BlockHash) { - toSerialize["blockHash"] = o.BlockHash - } - return toSerialize, nil -} - -type NullableRunTransactionResponse struct { - value *RunTransactionResponse - isSet bool -} - -func (v NullableRunTransactionResponse) Get() *RunTransactionResponse { - return v.value -} - -func (v *NullableRunTransactionResponse) Set(val *RunTransactionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionResponse(val *RunTransactionResponse) *NullableRunTransactionResponse { - return &NullableRunTransactionResponse{value: val, isSet: true} -} - -func (v NullableRunTransactionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_sign_raw_transaction_request.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_sign_raw_transaction_request.go deleted file mode 100644 index a8c33e0110..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_sign_raw_transaction_request.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the SignRawTransactionRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SignRawTransactionRequest{} - -// SignRawTransactionRequest struct for SignRawTransactionRequest -type SignRawTransactionRequest struct { - RawTransaction string `json:"rawTransaction"` - Mnemonic string `json:"mnemonic"` - SigningOptions map[string]interface{} `json:"signingOptions,omitempty"` -} - -// NewSignRawTransactionRequest instantiates a new SignRawTransactionRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSignRawTransactionRequest(rawTransaction string, mnemonic string) *SignRawTransactionRequest { - this := SignRawTransactionRequest{} - this.RawTransaction = rawTransaction - this.Mnemonic = mnemonic - return &this -} - -// NewSignRawTransactionRequestWithDefaults instantiates a new SignRawTransactionRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSignRawTransactionRequestWithDefaults() *SignRawTransactionRequest { - this := SignRawTransactionRequest{} - return &this -} - -// GetRawTransaction returns the RawTransaction field value -func (o *SignRawTransactionRequest) GetRawTransaction() string { - if o == nil { - var ret string - return ret - } - - return o.RawTransaction -} - -// GetRawTransactionOk returns a tuple with the RawTransaction field value -// and a boolean to check if the value has been set. -func (o *SignRawTransactionRequest) GetRawTransactionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RawTransaction, true -} - -// SetRawTransaction sets field value -func (o *SignRawTransactionRequest) SetRawTransaction(v string) { - o.RawTransaction = v -} - -// GetMnemonic returns the Mnemonic field value -func (o *SignRawTransactionRequest) GetMnemonic() string { - if o == nil { - var ret string - return ret - } - - return o.Mnemonic -} - -// GetMnemonicOk returns a tuple with the Mnemonic field value -// and a boolean to check if the value has been set. -func (o *SignRawTransactionRequest) GetMnemonicOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Mnemonic, true -} - -// SetMnemonic sets field value -func (o *SignRawTransactionRequest) SetMnemonic(v string) { - o.Mnemonic = v -} - -// GetSigningOptions returns the SigningOptions field value if set, zero value otherwise. -func (o *SignRawTransactionRequest) GetSigningOptions() map[string]interface{} { - if o == nil || IsNil(o.SigningOptions) { - var ret map[string]interface{} - return ret - } - return o.SigningOptions -} - -// GetSigningOptionsOk returns a tuple with the SigningOptions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SignRawTransactionRequest) GetSigningOptionsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.SigningOptions) { - return map[string]interface{}{}, false - } - return o.SigningOptions, true -} - -// HasSigningOptions returns a boolean if a field has been set. -func (o *SignRawTransactionRequest) HasSigningOptions() bool { - if o != nil && !IsNil(o.SigningOptions) { - return true - } - - return false -} - -// SetSigningOptions gets a reference to the given map[string]interface{} and assigns it to the SigningOptions field. -func (o *SignRawTransactionRequest) SetSigningOptions(v map[string]interface{}) { - o.SigningOptions = v -} - -func (o SignRawTransactionRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SignRawTransactionRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["rawTransaction"] = o.RawTransaction - toSerialize["mnemonic"] = o.Mnemonic - if !IsNil(o.SigningOptions) { - toSerialize["signingOptions"] = o.SigningOptions - } - return toSerialize, nil -} - -type NullableSignRawTransactionRequest struct { - value *SignRawTransactionRequest - isSet bool -} - -func (v NullableSignRawTransactionRequest) Get() *SignRawTransactionRequest { - return v.value -} - -func (v *NullableSignRawTransactionRequest) Set(val *SignRawTransactionRequest) { - v.value = val - v.isSet = true -} - -func (v NullableSignRawTransactionRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableSignRawTransactionRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSignRawTransactionRequest(val *SignRawTransactionRequest) *NullableSignRawTransactionRequest { - return &NullableSignRawTransactionRequest{value: val, isSet: true} -} - -func (v NullableSignRawTransactionRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSignRawTransactionRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_sign_raw_transaction_response.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_sign_raw_transaction_response.go deleted file mode 100644 index 406b770e6e..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_sign_raw_transaction_response.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the SignRawTransactionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SignRawTransactionResponse{} - -// SignRawTransactionResponse struct for SignRawTransactionResponse -type SignRawTransactionResponse struct { - Success bool `json:"success"` - SignedTransaction string `json:"signedTransaction"` -} - -// NewSignRawTransactionResponse instantiates a new SignRawTransactionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSignRawTransactionResponse(success bool, signedTransaction string) *SignRawTransactionResponse { - this := SignRawTransactionResponse{} - this.Success = success - this.SignedTransaction = signedTransaction - return &this -} - -// NewSignRawTransactionResponseWithDefaults instantiates a new SignRawTransactionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSignRawTransactionResponseWithDefaults() *SignRawTransactionResponse { - this := SignRawTransactionResponse{} - return &this -} - -// GetSuccess returns the Success field value -func (o *SignRawTransactionResponse) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *SignRawTransactionResponse) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *SignRawTransactionResponse) SetSuccess(v bool) { - o.Success = v -} - -// GetSignedTransaction returns the SignedTransaction field value -func (o *SignRawTransactionResponse) GetSignedTransaction() string { - if o == nil { - var ret string - return ret - } - - return o.SignedTransaction -} - -// GetSignedTransactionOk returns a tuple with the SignedTransaction field value -// and a boolean to check if the value has been set. -func (o *SignRawTransactionResponse) GetSignedTransactionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SignedTransaction, true -} - -// SetSignedTransaction sets field value -func (o *SignRawTransactionResponse) SetSignedTransaction(v string) { - o.SignedTransaction = v -} - -func (o SignRawTransactionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SignRawTransactionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["success"] = o.Success - toSerialize["signedTransaction"] = o.SignedTransaction - return toSerialize, nil -} - -type NullableSignRawTransactionResponse struct { - value *SignRawTransactionResponse - isSet bool -} - -func (v NullableSignRawTransactionResponse) Get() *SignRawTransactionResponse { - return v.value -} - -func (v *NullableSignRawTransactionResponse) Set(val *SignRawTransactionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableSignRawTransactionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableSignRawTransactionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSignRawTransactionResponse(val *SignRawTransactionResponse) *NullableSignRawTransactionResponse { - return &NullableSignRawTransactionResponse{value: val, isSet: true} -} - -func (v NullableSignRawTransactionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSignRawTransactionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_request.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_request.go deleted file mode 100644 index 2bed45a98b..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_request.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the TransactionInfoRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactionInfoRequest{} - -// TransactionInfoRequest struct for TransactionInfoRequest -type TransactionInfoRequest struct { - AccountAddress string `json:"accountAddress"` - TransactionExpiration NullableFloat32 `json:"transactionExpiration"` -} - -// NewTransactionInfoRequest instantiates a new TransactionInfoRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactionInfoRequest(accountAddress string, transactionExpiration NullableFloat32) *TransactionInfoRequest { - this := TransactionInfoRequest{} - this.AccountAddress = accountAddress - this.TransactionExpiration = transactionExpiration - return &this -} - -// NewTransactionInfoRequestWithDefaults instantiates a new TransactionInfoRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactionInfoRequestWithDefaults() *TransactionInfoRequest { - this := TransactionInfoRequest{} - return &this -} - -// GetAccountAddress returns the AccountAddress field value -func (o *TransactionInfoRequest) GetAccountAddress() string { - if o == nil { - var ret string - return ret - } - - return o.AccountAddress -} - -// GetAccountAddressOk returns a tuple with the AccountAddress field value -// and a boolean to check if the value has been set. -func (o *TransactionInfoRequest) GetAccountAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccountAddress, true -} - -// SetAccountAddress sets field value -func (o *TransactionInfoRequest) SetAccountAddress(v string) { - o.AccountAddress = v -} - -// GetTransactionExpiration returns the TransactionExpiration field value -// If the value is explicit nil, the zero value for float32 will be returned -func (o *TransactionInfoRequest) GetTransactionExpiration() float32 { - if o == nil || o.TransactionExpiration.Get() == nil { - var ret float32 - return ret - } - - return *o.TransactionExpiration.Get() -} - -// GetTransactionExpirationOk returns a tuple with the TransactionExpiration field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TransactionInfoRequest) GetTransactionExpirationOk() (*float32, bool) { - if o == nil { - return nil, false - } - return o.TransactionExpiration.Get(), o.TransactionExpiration.IsSet() -} - -// SetTransactionExpiration sets field value -func (o *TransactionInfoRequest) SetTransactionExpiration(v float32) { - o.TransactionExpiration.Set(&v) -} - -func (o TransactionInfoRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactionInfoRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["accountAddress"] = o.AccountAddress - toSerialize["transactionExpiration"] = o.TransactionExpiration.Get() - return toSerialize, nil -} - -type NullableTransactionInfoRequest struct { - value *TransactionInfoRequest - isSet bool -} - -func (v NullableTransactionInfoRequest) Get() *TransactionInfoRequest { - return v.value -} - -func (v *NullableTransactionInfoRequest) Set(val *TransactionInfoRequest) { - v.value = val - v.isSet = true -} - -func (v NullableTransactionInfoRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactionInfoRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactionInfoRequest(val *TransactionInfoRequest) *NullableTransactionInfoRequest { - return &NullableTransactionInfoRequest{value: val, isSet: true} -} - -func (v NullableTransactionInfoRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactionInfoRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_response.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_response.go deleted file mode 100644 index dc65331b21..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the TransactionInfoResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactionInfoResponse{} - -// TransactionInfoResponse struct for TransactionInfoResponse -type TransactionInfoResponse struct { - ResponseContainer TransactionInfoResponseResponseContainer `json:"responseContainer"` -} - -// NewTransactionInfoResponse instantiates a new TransactionInfoResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactionInfoResponse(responseContainer TransactionInfoResponseResponseContainer) *TransactionInfoResponse { - this := TransactionInfoResponse{} - this.ResponseContainer = responseContainer - return &this -} - -// NewTransactionInfoResponseWithDefaults instantiates a new TransactionInfoResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactionInfoResponseWithDefaults() *TransactionInfoResponse { - this := TransactionInfoResponse{} - return &this -} - -// GetResponseContainer returns the ResponseContainer field value -func (o *TransactionInfoResponse) GetResponseContainer() TransactionInfoResponseResponseContainer { - if o == nil { - var ret TransactionInfoResponseResponseContainer - return ret - } - - return o.ResponseContainer -} - -// GetResponseContainerOk returns a tuple with the ResponseContainer field value -// and a boolean to check if the value has been set. -func (o *TransactionInfoResponse) GetResponseContainerOk() (*TransactionInfoResponseResponseContainer, bool) { - if o == nil { - return nil, false - } - return &o.ResponseContainer, true -} - -// SetResponseContainer sets field value -func (o *TransactionInfoResponse) SetResponseContainer(v TransactionInfoResponseResponseContainer) { - o.ResponseContainer = v -} - -func (o TransactionInfoResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactionInfoResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["responseContainer"] = o.ResponseContainer - return toSerialize, nil -} - -type NullableTransactionInfoResponse struct { - value *TransactionInfoResponse - isSet bool -} - -func (v NullableTransactionInfoResponse) Get() *TransactionInfoResponse { - return v.value -} - -func (v *NullableTransactionInfoResponse) Set(val *TransactionInfoResponse) { - v.value = val - v.isSet = true -} - -func (v NullableTransactionInfoResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactionInfoResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactionInfoResponse(val *TransactionInfoResponse) *NullableTransactionInfoResponse { - return &NullableTransactionInfoResponse{value: val, isSet: true} -} - -func (v NullableTransactionInfoResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactionInfoResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_response_data.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_response_data.go deleted file mode 100644 index 23fb12524c..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_response_data.go +++ /dev/null @@ -1,175 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the TransactionInfoResponseData type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactionInfoResponseData{} - -// TransactionInfoResponseData struct for TransactionInfoResponseData -type TransactionInfoResponseData struct { - Nonce map[string]interface{} `json:"nonce"` - BlockHash map[string]interface{} `json:"blockHash"` - Era map[string]interface{} `json:"era"` -} - -// NewTransactionInfoResponseData instantiates a new TransactionInfoResponseData object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactionInfoResponseData(nonce map[string]interface{}, blockHash map[string]interface{}, era map[string]interface{}) *TransactionInfoResponseData { - this := TransactionInfoResponseData{} - this.Nonce = nonce - this.BlockHash = blockHash - this.Era = era - return &this -} - -// NewTransactionInfoResponseDataWithDefaults instantiates a new TransactionInfoResponseData object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactionInfoResponseDataWithDefaults() *TransactionInfoResponseData { - this := TransactionInfoResponseData{} - return &this -} - -// GetNonce returns the Nonce field value -func (o *TransactionInfoResponseData) GetNonce() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value -// and a boolean to check if the value has been set. -func (o *TransactionInfoResponseData) GetNonceOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Nonce, true -} - -// SetNonce sets field value -func (o *TransactionInfoResponseData) SetNonce(v map[string]interface{}) { - o.Nonce = v -} - -// GetBlockHash returns the BlockHash field value -func (o *TransactionInfoResponseData) GetBlockHash() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value -// and a boolean to check if the value has been set. -func (o *TransactionInfoResponseData) GetBlockHashOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.BlockHash, true -} - -// SetBlockHash sets field value -func (o *TransactionInfoResponseData) SetBlockHash(v map[string]interface{}) { - o.BlockHash = v -} - -// GetEra returns the Era field value -// If the value is explicit nil, the zero value for map[string]interface{} will be returned -func (o *TransactionInfoResponseData) GetEra() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Era -} - -// GetEraOk returns a tuple with the Era field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TransactionInfoResponseData) GetEraOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Era) { - return map[string]interface{}{}, false - } - return o.Era, true -} - -// SetEra sets field value -func (o *TransactionInfoResponseData) SetEra(v map[string]interface{}) { - o.Era = v -} - -func (o TransactionInfoResponseData) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactionInfoResponseData) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["nonce"] = o.Nonce - toSerialize["blockHash"] = o.BlockHash - if o.Era != nil { - toSerialize["era"] = o.Era - } - return toSerialize, nil -} - -type NullableTransactionInfoResponseData struct { - value *TransactionInfoResponseData - isSet bool -} - -func (v NullableTransactionInfoResponseData) Get() *TransactionInfoResponseData { - return v.value -} - -func (v *NullableTransactionInfoResponseData) Set(val *TransactionInfoResponseData) { - v.value = val - v.isSet = true -} - -func (v NullableTransactionInfoResponseData) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactionInfoResponseData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactionInfoResponseData(val *TransactionInfoResponseData) *NullableTransactionInfoResponseData { - return &NullableTransactionInfoResponseData{value: val, isSet: true} -} - -func (v NullableTransactionInfoResponseData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactionInfoResponseData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_response_response_container.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_response_response_container.go deleted file mode 100644 index 0e047e8d6e..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_transaction_info_response_response_container.go +++ /dev/null @@ -1,200 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the TransactionInfoResponseResponseContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactionInfoResponseResponseContainer{} - -// TransactionInfoResponseResponseContainer struct for TransactionInfoResponseResponseContainer -type TransactionInfoResponseResponseContainer struct { - ResponseData TransactionInfoResponseData `json:"response_data"` - Succeeded bool `json:"succeeded"` - Message string `json:"message"` - Error NullableString `json:"error"` -} - -// NewTransactionInfoResponseResponseContainer instantiates a new TransactionInfoResponseResponseContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactionInfoResponseResponseContainer(responseData TransactionInfoResponseData, succeeded bool, message string, error_ NullableString) *TransactionInfoResponseResponseContainer { - this := TransactionInfoResponseResponseContainer{} - this.ResponseData = responseData - this.Succeeded = succeeded - this.Message = message - this.Error = error_ - return &this -} - -// NewTransactionInfoResponseResponseContainerWithDefaults instantiates a new TransactionInfoResponseResponseContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactionInfoResponseResponseContainerWithDefaults() *TransactionInfoResponseResponseContainer { - this := TransactionInfoResponseResponseContainer{} - return &this -} - -// GetResponseData returns the ResponseData field value -func (o *TransactionInfoResponseResponseContainer) GetResponseData() TransactionInfoResponseData { - if o == nil { - var ret TransactionInfoResponseData - return ret - } - - return o.ResponseData -} - -// GetResponseDataOk returns a tuple with the ResponseData field value -// and a boolean to check if the value has been set. -func (o *TransactionInfoResponseResponseContainer) GetResponseDataOk() (*TransactionInfoResponseData, bool) { - if o == nil { - return nil, false - } - return &o.ResponseData, true -} - -// SetResponseData sets field value -func (o *TransactionInfoResponseResponseContainer) SetResponseData(v TransactionInfoResponseData) { - o.ResponseData = v -} - -// GetSucceeded returns the Succeeded field value -func (o *TransactionInfoResponseResponseContainer) GetSucceeded() bool { - if o == nil { - var ret bool - return ret - } - - return o.Succeeded -} - -// GetSucceededOk returns a tuple with the Succeeded field value -// and a boolean to check if the value has been set. -func (o *TransactionInfoResponseResponseContainer) GetSucceededOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Succeeded, true -} - -// SetSucceeded sets field value -func (o *TransactionInfoResponseResponseContainer) SetSucceeded(v bool) { - o.Succeeded = v -} - -// GetMessage returns the Message field value -func (o *TransactionInfoResponseResponseContainer) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *TransactionInfoResponseResponseContainer) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *TransactionInfoResponseResponseContainer) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -// If the value is explicit nil, the zero value for string will be returned -func (o *TransactionInfoResponseResponseContainer) GetError() string { - if o == nil || o.Error.Get() == nil { - var ret string - return ret - } - - return *o.Error.Get() -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TransactionInfoResponseResponseContainer) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Error.Get(), o.Error.IsSet() -} - -// SetError sets field value -func (o *TransactionInfoResponseResponseContainer) SetError(v string) { - o.Error.Set(&v) -} - -func (o TransactionInfoResponseResponseContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactionInfoResponseResponseContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["response_data"] = o.ResponseData - toSerialize["succeeded"] = o.Succeeded - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error.Get() - return toSerialize, nil -} - -type NullableTransactionInfoResponseResponseContainer struct { - value *TransactionInfoResponseResponseContainer - isSet bool -} - -func (v NullableTransactionInfoResponseResponseContainer) Get() *TransactionInfoResponseResponseContainer { - return v.value -} - -func (v *NullableTransactionInfoResponseResponseContainer) Set(val *TransactionInfoResponseResponseContainer) { - v.value = val - v.isSet = true -} - -func (v NullableTransactionInfoResponseResponseContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactionInfoResponseResponseContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactionInfoResponseResponseContainer(val *TransactionInfoResponseResponseContainer) *NullableTransactionInfoResponseResponseContainer { - return &NullableTransactionInfoResponseResponseContainer{value: val, isSet: true} -} - -func (v NullableTransactionInfoResponseResponseContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactionInfoResponseResponseContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go deleted file mode 100644 index 84193084f3..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredential - struct for Web3SigningCredential -type Web3SigningCredential struct { - Web3SigningCredentialCactusKeychainRef *Web3SigningCredentialCactusKeychainRef - Web3SigningCredentialMnemonicString *Web3SigningCredentialMnemonicString - Web3SigningCredentialNone *Web3SigningCredentialNone -} - -// Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialCactusKeychainRef wrapped in Web3SigningCredential -func Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential(v *Web3SigningCredentialCactusKeychainRef) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialCactusKeychainRef: v, - } -} - -// Web3SigningCredentialMnemonicStringAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialMnemonicString wrapped in Web3SigningCredential -func Web3SigningCredentialMnemonicStringAsWeb3SigningCredential(v *Web3SigningCredentialMnemonicString) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialMnemonicString: v, - } -} - -// Web3SigningCredentialNoneAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialNone wrapped in Web3SigningCredential -func Web3SigningCredentialNoneAsWeb3SigningCredential(v *Web3SigningCredentialNone) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialNone: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *Web3SigningCredential) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Web3SigningCredentialCactusKeychainRef - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialCactusKeychainRef) - if err == nil { - jsonWeb3SigningCredentialCactusKeychainRef, _ := json.Marshal(dst.Web3SigningCredentialCactusKeychainRef) - if string(jsonWeb3SigningCredentialCactusKeychainRef) == "{}" { // empty struct - dst.Web3SigningCredentialCactusKeychainRef = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialCactusKeychainRef = nil - } - - // try to unmarshal data into Web3SigningCredentialMnemonicString - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialMnemonicString) - if err == nil { - jsonWeb3SigningCredentialMnemonicString, _ := json.Marshal(dst.Web3SigningCredentialMnemonicString) - if string(jsonWeb3SigningCredentialMnemonicString) == "{}" { // empty struct - dst.Web3SigningCredentialMnemonicString = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialMnemonicString = nil - } - - // try to unmarshal data into Web3SigningCredentialNone - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialNone) - if err == nil { - jsonWeb3SigningCredentialNone, _ := json.Marshal(dst.Web3SigningCredentialNone) - if string(jsonWeb3SigningCredentialNone) == "{}" { // empty struct - dst.Web3SigningCredentialNone = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialNone = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Web3SigningCredentialCactusKeychainRef = nil - dst.Web3SigningCredentialMnemonicString = nil - dst.Web3SigningCredentialNone = nil - - return fmt.Errorf("data matches more than one schema in oneOf(Web3SigningCredential)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(Web3SigningCredential)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src Web3SigningCredential) MarshalJSON() ([]byte, error) { - if src.Web3SigningCredentialCactusKeychainRef != nil { - return json.Marshal(&src.Web3SigningCredentialCactusKeychainRef) - } - - if src.Web3SigningCredentialMnemonicString != nil { - return json.Marshal(&src.Web3SigningCredentialMnemonicString) - } - - if src.Web3SigningCredentialNone != nil { - return json.Marshal(&src.Web3SigningCredentialNone) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *Web3SigningCredential) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Web3SigningCredentialCactusKeychainRef != nil { - return obj.Web3SigningCredentialCactusKeychainRef - } - - if obj.Web3SigningCredentialMnemonicString != nil { - return obj.Web3SigningCredentialMnemonicString - } - - if obj.Web3SigningCredentialNone != nil { - return obj.Web3SigningCredentialNone - } - - // all schemas are nil - return nil -} - -type NullableWeb3SigningCredential struct { - value *Web3SigningCredential - isSet bool -} - -func (v NullableWeb3SigningCredential) Get() *Web3SigningCredential { - return v.value -} - -func (v *NullableWeb3SigningCredential) Set(val *Web3SigningCredential) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredential) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredential) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredential(val *Web3SigningCredential) *NullableWeb3SigningCredential { - return &NullableWeb3SigningCredential{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredential) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredential) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go deleted file mode 100644 index 7e6860968e..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialCactusKeychainRef type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialCactusKeychainRef{} - -// Web3SigningCredentialCactusKeychainRef struct for Web3SigningCredentialCactusKeychainRef -type Web3SigningCredentialCactusKeychainRef struct { - Type Web3SigningCredentialType `json:"type"` - // The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - KeychainEntryKey string `json:"keychainEntryKey"` - // The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - KeychainId string `json:"keychainId"` -} - -// NewWeb3SigningCredentialCactusKeychainRef instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialCactusKeychainRef(type_ Web3SigningCredentialType, keychainEntryKey string, keychainId string) *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - this.Type = type_ - this.KeychainEntryKey = keychainEntryKey - this.KeychainId = keychainId - return &this -} - -// NewWeb3SigningCredentialCactusKeychainRefWithDefaults instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialCactusKeychainRefWithDefaults() *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialCactusKeychainRef) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetKeychainEntryKey returns the KeychainEntryKey field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKey() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainEntryKey -} - -// GetKeychainEntryKeyOk returns a tuple with the KeychainEntryKey field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainEntryKey, true -} - -// SetKeychainEntryKey sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainEntryKey(v string) { - o.KeychainEntryKey = v -} - -// GetKeychainId returns the KeychainId field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o Web3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialCactusKeychainRef) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["keychainEntryKey"] = o.KeychainEntryKey - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableWeb3SigningCredentialCactusKeychainRef struct { - value *Web3SigningCredentialCactusKeychainRef - isSet bool -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) Get() *Web3SigningCredentialCactusKeychainRef { - return v.value -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Set(val *Web3SigningCredentialCactusKeychainRef) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialCactusKeychainRef(val *Web3SigningCredentialCactusKeychainRef) *NullableWeb3SigningCredentialCactusKeychainRef { - return &NullableWeb3SigningCredentialCactusKeychainRef{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_mnemonic_string.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_mnemonic_string.go deleted file mode 100644 index be58b326ef..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_mnemonic_string.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialMnemonicString type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialMnemonicString{} - -// Web3SigningCredentialMnemonicString struct for Web3SigningCredentialMnemonicString -type Web3SigningCredentialMnemonicString struct { - Type Web3SigningCredentialType `json:"type"` - // The Polkadot account's seed phrase for signing transaction - Mnemonic string `json:"mnemonic"` -} - -// NewWeb3SigningCredentialMnemonicString instantiates a new Web3SigningCredentialMnemonicString object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialMnemonicString(type_ Web3SigningCredentialType, mnemonic string) *Web3SigningCredentialMnemonicString { - this := Web3SigningCredentialMnemonicString{} - this.Type = type_ - this.Mnemonic = mnemonic - return &this -} - -// NewWeb3SigningCredentialMnemonicStringWithDefaults instantiates a new Web3SigningCredentialMnemonicString object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialMnemonicStringWithDefaults() *Web3SigningCredentialMnemonicString { - this := Web3SigningCredentialMnemonicString{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialMnemonicString) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialMnemonicString) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialMnemonicString) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetMnemonic returns the Mnemonic field value -func (o *Web3SigningCredentialMnemonicString) GetMnemonic() string { - if o == nil { - var ret string - return ret - } - - return o.Mnemonic -} - -// GetMnemonicOk returns a tuple with the Mnemonic field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialMnemonicString) GetMnemonicOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Mnemonic, true -} - -// SetMnemonic sets field value -func (o *Web3SigningCredentialMnemonicString) SetMnemonic(v string) { - o.Mnemonic = v -} - -func (o Web3SigningCredentialMnemonicString) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialMnemonicString) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["mnemonic"] = o.Mnemonic - return toSerialize, nil -} - -type NullableWeb3SigningCredentialMnemonicString struct { - value *Web3SigningCredentialMnemonicString - isSet bool -} - -func (v NullableWeb3SigningCredentialMnemonicString) Get() *Web3SigningCredentialMnemonicString { - return v.value -} - -func (v *NullableWeb3SigningCredentialMnemonicString) Set(val *Web3SigningCredentialMnemonicString) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialMnemonicString) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialMnemonicString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialMnemonicString(val *Web3SigningCredentialMnemonicString) *NullableWeb3SigningCredentialMnemonicString { - return &NullableWeb3SigningCredentialMnemonicString{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialMnemonicString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialMnemonicString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go deleted file mode 100644 index e56b8bdda0..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialNone type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialNone{} - -// Web3SigningCredentialNone Using this denotes that there is no signing required because the transaction is pre-signed. -type Web3SigningCredentialNone struct { - Type Web3SigningCredentialType `json:"type"` -} - -// NewWeb3SigningCredentialNone instantiates a new Web3SigningCredentialNone object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialNone(type_ Web3SigningCredentialType) *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - this.Type = type_ - return &this -} - -// NewWeb3SigningCredentialNoneWithDefaults instantiates a new Web3SigningCredentialNone object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialNoneWithDefaults() *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialNone) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialNone) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialNone) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -func (o Web3SigningCredentialNone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialNone) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableWeb3SigningCredentialNone struct { - value *Web3SigningCredentialNone - isSet bool -} - -func (v NullableWeb3SigningCredentialNone) Get() *Web3SigningCredentialNone { - return v.value -} - -func (v *NullableWeb3SigningCredentialNone) Set(val *Web3SigningCredentialNone) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialNone) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialNone) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialNone(val *Web3SigningCredentialNone) *NullableWeb3SigningCredentialNone { - return &NullableWeb3SigningCredentialNone{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialNone) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialNone) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go deleted file mode 100644 index 8e3ea5fac4..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredentialType the model 'Web3SigningCredentialType' -type Web3SigningCredentialType string - -// List of Web3SigningCredentialType -const ( - CACTUS_KEYCHAIN_REF Web3SigningCredentialType = "CACTUS_KEYCHAIN_REF" - MNEMONIC_STRING Web3SigningCredentialType = "MNEMONIC_STRING" - NONE Web3SigningCredentialType = "NONE" -) - -// All allowed values of Web3SigningCredentialType enum -var AllowedWeb3SigningCredentialTypeEnumValues = []Web3SigningCredentialType{ - "CACTUS_KEYCHAIN_REF", - "MNEMONIC_STRING", - "NONE", -} - -func (v *Web3SigningCredentialType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := Web3SigningCredentialType(value) - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Web3SigningCredentialType", value) -} - -// NewWeb3SigningCredentialTypeFromValue returns a pointer to a valid Web3SigningCredentialType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWeb3SigningCredentialTypeFromValue(v string) (*Web3SigningCredentialType, error) { - ev := Web3SigningCredentialType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Web3SigningCredentialType: valid values are %v", v, AllowedWeb3SigningCredentialTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v Web3SigningCredentialType) IsValid() bool { - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to Web3SigningCredentialType value -func (v Web3SigningCredentialType) Ptr() *Web3SigningCredentialType { - return &v -} - -type NullableWeb3SigningCredentialType struct { - value *Web3SigningCredentialType - isSet bool -} - -func (v NullableWeb3SigningCredentialType) Get() *Web3SigningCredentialType { - return v.value -} - -func (v *NullableWeb3SigningCredentialType) Set(val *Web3SigningCredentialType) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialType) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialType(val *Web3SigningCredentialType) *NullableWeb3SigningCredentialType { - return &NullableWeb3SigningCredentialType{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 5809aff25c..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index bce9476003..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,109 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-ledger-connector-polkadot - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-ledger-connector-polkadot_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeployContractInk", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeployContractInk(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetrics", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetrics(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetRawTransaction", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetRawTransaction(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetTransactionInfo", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetTransactionInfo(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService InvokeContract", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.InvokeContract(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RunTransaction", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.RunTransaction(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService SignRawTransaction", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.SignRawTransaction(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index fffe7d44a9..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Polkadot - -Can perform basic tasks on a Polkadot parachain - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-polkadot - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-polkadot/src/main/json/openapi.json deleted file mode 100644 index cc540c9bf9..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/json/openapi.json +++ /dev/null @@ -1,834 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Connector Polkadot", - "description": "Can perform basic tasks on a Polkadot parachain", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "TransactionInfoRequest": { - "type": "object", - "required": ["accountAddress", "transactionExpiration"], - "additionalProperties": false, - "properties": { - "accountAddress": { - "type": "string", - "nullable": false - }, - "transactionExpiration": { - "type": "number", - "nullable": true - } - } - }, - "TransactionInfoResponseData": { - "type": "object", - "required": ["nonce", "blockHash", "era"], - "additionalProperties": false, - "properties": { - "nonce": { - "type": "object", - "nullable": false - }, - "blockHash": { - "type": "object", - "nullable": false - }, - "era": { - "type": "object", - "nullable": true - } - } - }, - "TransactionInfoResponse": { - "type": "object", - "required": ["responseContainer"], - "additionalProperties": false, - "properties": { - "responseContainer": { - "type": "object", - "required": ["response_data", "succeeded", "message", "error"], - "additionalProperties": false, - "properties": { - "response_data": { - "$ref": "#/components/schemas/TransactionInfoResponseData", - "nullable": false - }, - "succeeded": { - "type": "boolean", - "nullable": false - }, - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": true - } - } - } - } - }, - "RawTransactionRequest": { - "type": "object", - "required": ["to", "value"], - "additionalProperties": false, - "properties": { - "to": { - "type": "string", - "nullable": false - }, - "value": { - "type": "number", - "nullable": false - } - } - }, - "RawTransactionResponseData": { - "type": "object", - "required": ["rawTransaction"], - "additionalProperties": false, - "properties": { - "rawTransaction": { - "type": "string", - "nullable": false - } - } - }, - "RawTransactionResponse": { - "type": "object", - "required": ["responseContainer"], - "additionalProperties": false, - "properties": { - "responseContainer": { - "type": "object", - "required": ["response_data", "succeeded", "message", "error"], - "additionalProperties": false, - "properties": { - "response_data": { - "$ref": "#/components/schemas/RawTransactionResponseData", - "nullable": false - }, - "succeeded": { - "type": "boolean", - "nullable": false - }, - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": true - } - } - } - } - }, - "SignRawTransactionRequest": { - "type": "object", - "required": ["rawTransaction", "mnemonic"], - "additionalProperties": false, - "properties": { - "rawTransaction": { - "type": "string", - "nullable": false - }, - "mnemonic": { - "type": "string", - "nullable": false - }, - "signingOptions": { - "type": "object", - "nullable": false - } - } - }, - "SignRawTransactionResponse": { - "type": "object", - "required": ["success", "signedTransaction"], - "additionalProperties": false, - "properties": { - "success": { - "type": "boolean", - "nullable": false - }, - "signedTransaction": { - "type": "string", - "nullable": false - } - } - }, - "web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialCactusKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialMnemonicString" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialCactusKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainId", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialMnemonicString": { - "type": "object", - "required": ["type", "mnemonic"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "mnemonic": { - "type": "string", - "description": "The Polkadot account's seed phrase for signing transaction", - "nullable": false - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": ["CACTUS_KEYCHAIN_REF", "MNEMONIC_STRING", "NONE"] - }, - "PolkadotTransactionConfig": { - "type": "object", - "additionalProperties": true, - "properties": { - "transferSubmittable": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "to": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "value": { - "oneOf": [ - { - "type": "number" - } - ] - } - } - }, - "RunTransactionRequest": { - "type": "object", - "required": ["web3SigningCredential", "transactionConfig"], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/web3SigningCredential", - "nullable": false - }, - "transactionConfig": { - "$ref": "#/components/schemas/PolkadotTransactionConfig", - "nullable": false - } - } - }, - "RunTransactionResponse": { - "type": "object", - "required": ["success"], - "additionalProperties": false, - "properties": { - "success": { - "type": "boolean", - "nullable": false - }, - "txHash": { - "type": "string", - "nullable": false - }, - "blockHash": { - "type": "string", - "nullable": false - } - } - }, - "DeployContractInkRequest": { - "type": "object", - "required": ["web3SigningCredential", "wasm", "metadata", "gasLimit"], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/web3SigningCredential", - "nullable": false - }, - "wasm": { - "description": "raw wasm for the compiled contract in base64 format", - "type": "string", - "format": "byte", - "nullable": false - }, - "constructorMethod": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "metadata": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "gasLimit": { - "type": "object", - "required": ["refTime", "proofSize"], - "properties": { - "refTime": { - "type": "integer", - "minimum": 0 - }, - "proofSize": { - "type": "integer", - "minimum": 0 - } - } - }, - "storageDepositLimit": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "minimum": 0 - } - ], - "nullable": true - }, - "params": { - "description": "The list of arguments to pass in to the contract method being deployed", - "type": "array", - "default": [], - "items": {} - }, - "balance": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "minimum": 0 - } - ] - }, - "salt": { - "oneOf": [ - { - "type": "string" - } - ], - "nullable": true - } - } - }, - "DeployContractInkResponse": { - "type": "object", - "required": ["success"], - "additionalProperties": false, - "properties": { - "success": { - "type": "boolean", - "nullable": false - }, - "contractAddress": { - "type": "string", - "nullable": false - } - } - }, - "PolkadotContractInvocationType": { - "type": "string", - "enum": ["SEND", "QUERY"] - }, - "InvokeContractRequest": { - "type": "object", - "required": [ - "invocationType", - "metadata", - "contractAddress", - "methodName", - "gasLimit", - "accountAddress", - "web3SigningCredential" - ], - "additionalProperties": false, - "properties": { - "invocationType": { - "$ref": "#/components/schemas/PolkadotContractInvocationType", - "nullable": false, - "description": "Indicates whether it is a QUERY or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "accountAddress": { - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/web3SigningCredential", - "nullable": false - }, - "metadata": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "contractAddress": { - "type": "string", - "nullable": false - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "gasLimit": { - "type": "object", - "required": ["refTime", "proofSize"], - "properties": { - "refTime": { - "type": "integer", - "minimum": 0 - }, - "proofSize": { - "type": "integer", - "minimum": 0 - } - } - }, - "storageDepositLimit": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "minimum": 0 - } - ], - "nullable": true - }, - "balance": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "minimum": 0 - } - ] - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked", - "type": "array", - "default": [], - "items": {} - } - } - }, - "InvokeContractResponse": { - "type": "object", - "required": ["success"], - "properties": { - "callOutput": {}, - "success": { - "type": "boolean", - "nullable": false - }, - "txHash": { - "type": "string", - "nullable": false - }, - "blockHash": { - "type": "string", - "nullable": false - } - } - }, - "ErrorExceptionResponse": { - "type": "object", - "description": "Error response from the connector.", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "description": "Short error description message.", - "nullable": false - }, - "error": { - "type": "string", - "description": "Detailed error information.", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetrics", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info" - } - }, - "operationId": "getTransactionInfo", - "summary": "Get the necessary Transaction Info for a account", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionInfoRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionInfoResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction" - } - }, - "operationId": "getRawTransaction", - "summary": "Get raw unsigned transaction", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RawTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RawTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction" - } - }, - "operationId": "signRawTransaction", - "summary": "sign the raw transaction", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignRawTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignRawTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction" - } - }, - "operationId": "runTransaction", - "summary": "Executes a transaction on a Polkadot ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink" - } - }, - "operationId": "deployContractInk", - "summary": "Deploys the ink! contract", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractInkRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractInkResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract" - } - }, - "operationId": "invokeContract", - "summary": "Invokes a contract on a polkadot ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-polkadot/src/main/json/openapi.tpl.json deleted file mode 100644 index cc540c9bf9..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,834 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Connector Polkadot", - "description": "Can perform basic tasks on a Polkadot parachain", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "TransactionInfoRequest": { - "type": "object", - "required": ["accountAddress", "transactionExpiration"], - "additionalProperties": false, - "properties": { - "accountAddress": { - "type": "string", - "nullable": false - }, - "transactionExpiration": { - "type": "number", - "nullable": true - } - } - }, - "TransactionInfoResponseData": { - "type": "object", - "required": ["nonce", "blockHash", "era"], - "additionalProperties": false, - "properties": { - "nonce": { - "type": "object", - "nullable": false - }, - "blockHash": { - "type": "object", - "nullable": false - }, - "era": { - "type": "object", - "nullable": true - } - } - }, - "TransactionInfoResponse": { - "type": "object", - "required": ["responseContainer"], - "additionalProperties": false, - "properties": { - "responseContainer": { - "type": "object", - "required": ["response_data", "succeeded", "message", "error"], - "additionalProperties": false, - "properties": { - "response_data": { - "$ref": "#/components/schemas/TransactionInfoResponseData", - "nullable": false - }, - "succeeded": { - "type": "boolean", - "nullable": false - }, - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": true - } - } - } - } - }, - "RawTransactionRequest": { - "type": "object", - "required": ["to", "value"], - "additionalProperties": false, - "properties": { - "to": { - "type": "string", - "nullable": false - }, - "value": { - "type": "number", - "nullable": false - } - } - }, - "RawTransactionResponseData": { - "type": "object", - "required": ["rawTransaction"], - "additionalProperties": false, - "properties": { - "rawTransaction": { - "type": "string", - "nullable": false - } - } - }, - "RawTransactionResponse": { - "type": "object", - "required": ["responseContainer"], - "additionalProperties": false, - "properties": { - "responseContainer": { - "type": "object", - "required": ["response_data", "succeeded", "message", "error"], - "additionalProperties": false, - "properties": { - "response_data": { - "$ref": "#/components/schemas/RawTransactionResponseData", - "nullable": false - }, - "succeeded": { - "type": "boolean", - "nullable": false - }, - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": true - } - } - } - } - }, - "SignRawTransactionRequest": { - "type": "object", - "required": ["rawTransaction", "mnemonic"], - "additionalProperties": false, - "properties": { - "rawTransaction": { - "type": "string", - "nullable": false - }, - "mnemonic": { - "type": "string", - "nullable": false - }, - "signingOptions": { - "type": "object", - "nullable": false - } - } - }, - "SignRawTransactionResponse": { - "type": "object", - "required": ["success", "signedTransaction"], - "additionalProperties": false, - "properties": { - "success": { - "type": "boolean", - "nullable": false - }, - "signedTransaction": { - "type": "string", - "nullable": false - } - } - }, - "web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialCactusKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialMnemonicString" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialCactusKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainId", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialMnemonicString": { - "type": "object", - "required": ["type", "mnemonic"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "mnemonic": { - "type": "string", - "description": "The Polkadot account's seed phrase for signing transaction", - "nullable": false - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": ["CACTUS_KEYCHAIN_REF", "MNEMONIC_STRING", "NONE"] - }, - "PolkadotTransactionConfig": { - "type": "object", - "additionalProperties": true, - "properties": { - "transferSubmittable": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "to": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "value": { - "oneOf": [ - { - "type": "number" - } - ] - } - } - }, - "RunTransactionRequest": { - "type": "object", - "required": ["web3SigningCredential", "transactionConfig"], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/web3SigningCredential", - "nullable": false - }, - "transactionConfig": { - "$ref": "#/components/schemas/PolkadotTransactionConfig", - "nullable": false - } - } - }, - "RunTransactionResponse": { - "type": "object", - "required": ["success"], - "additionalProperties": false, - "properties": { - "success": { - "type": "boolean", - "nullable": false - }, - "txHash": { - "type": "string", - "nullable": false - }, - "blockHash": { - "type": "string", - "nullable": false - } - } - }, - "DeployContractInkRequest": { - "type": "object", - "required": ["web3SigningCredential", "wasm", "metadata", "gasLimit"], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/web3SigningCredential", - "nullable": false - }, - "wasm": { - "description": "raw wasm for the compiled contract in base64 format", - "type": "string", - "format": "byte", - "nullable": false - }, - "constructorMethod": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "metadata": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "gasLimit": { - "type": "object", - "required": ["refTime", "proofSize"], - "properties": { - "refTime": { - "type": "integer", - "minimum": 0 - }, - "proofSize": { - "type": "integer", - "minimum": 0 - } - } - }, - "storageDepositLimit": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "minimum": 0 - } - ], - "nullable": true - }, - "params": { - "description": "The list of arguments to pass in to the contract method being deployed", - "type": "array", - "default": [], - "items": {} - }, - "balance": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "minimum": 0 - } - ] - }, - "salt": { - "oneOf": [ - { - "type": "string" - } - ], - "nullable": true - } - } - }, - "DeployContractInkResponse": { - "type": "object", - "required": ["success"], - "additionalProperties": false, - "properties": { - "success": { - "type": "boolean", - "nullable": false - }, - "contractAddress": { - "type": "string", - "nullable": false - } - } - }, - "PolkadotContractInvocationType": { - "type": "string", - "enum": ["SEND", "QUERY"] - }, - "InvokeContractRequest": { - "type": "object", - "required": [ - "invocationType", - "metadata", - "contractAddress", - "methodName", - "gasLimit", - "accountAddress", - "web3SigningCredential" - ], - "additionalProperties": false, - "properties": { - "invocationType": { - "$ref": "#/components/schemas/PolkadotContractInvocationType", - "nullable": false, - "description": "Indicates whether it is a QUERY or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "accountAddress": { - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/web3SigningCredential", - "nullable": false - }, - "metadata": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "contractAddress": { - "type": "string", - "nullable": false - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "gasLimit": { - "type": "object", - "required": ["refTime", "proofSize"], - "properties": { - "refTime": { - "type": "integer", - "minimum": 0 - }, - "proofSize": { - "type": "integer", - "minimum": 0 - } - } - }, - "storageDepositLimit": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "minimum": 0 - } - ], - "nullable": true - }, - "balance": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer", - "minimum": 0 - } - ] - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked", - "type": "array", - "default": [], - "items": {} - } - } - }, - "InvokeContractResponse": { - "type": "object", - "required": ["success"], - "properties": { - "callOutput": {}, - "success": { - "type": "boolean", - "nullable": false - }, - "txHash": { - "type": "string", - "nullable": false - }, - "blockHash": { - "type": "string", - "nullable": false - } - } - }, - "ErrorExceptionResponse": { - "type": "object", - "description": "Error response from the connector.", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "description": "Short error description message.", - "nullable": false - }, - "error": { - "type": "string", - "description": "Detailed error information.", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetrics", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info" - } - }, - "operationId": "getTransactionInfo", - "summary": "Get the necessary Transaction Info for a account", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionInfoRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionInfoResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction" - } - }, - "operationId": "getRawTransaction", - "summary": "Get raw unsigned transaction", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RawTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RawTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction" - } - }, - "operationId": "signRawTransaction", - "summary": "sign the raw transaction", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignRawTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignRawTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction" - } - }, - "operationId": "runTransaction", - "summary": "Executes a transaction on a Polkadot ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink" - } - }, - "operationId": "deployContractInk", - "summary": "Deploys the ink! contract", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractInkRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractInkResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract" - } - }, - "operationId": "invokeContract", - "summary": "Invokes a contract on a polkadot ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 45c43dd11d..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,1151 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Polkadot - * Can perform basic tasks on a Polkadot parachain - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface DeployContractInkRequest - */ -export interface DeployContractInkRequest { - /** - * - * @type {Web3SigningCredential} - * @memberof DeployContractInkRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * raw wasm for the compiled contract in base64 format - * @type {string} - * @memberof DeployContractInkRequest - */ - 'wasm': string; - /** - * - * @type {PolkadotTransactionConfigTransferSubmittable} - * @memberof DeployContractInkRequest - */ - 'constructorMethod'?: PolkadotTransactionConfigTransferSubmittable; - /** - * - * @type {PolkadotTransactionConfigTransferSubmittable} - * @memberof DeployContractInkRequest - */ - 'metadata': PolkadotTransactionConfigTransferSubmittable; - /** - * - * @type {DeployContractInkRequestGasLimit} - * @memberof DeployContractInkRequest - */ - 'gasLimit': DeployContractInkRequestGasLimit; - /** - * - * @type {DeployContractInkRequestStorageDepositLimit} - * @memberof DeployContractInkRequest - */ - 'storageDepositLimit'?: DeployContractInkRequestStorageDepositLimit | null; - /** - * The list of arguments to pass in to the contract method being deployed - * @type {Array} - * @memberof DeployContractInkRequest - */ - 'params'?: Array; - /** - * - * @type {DeployContractInkRequestBalance} - * @memberof DeployContractInkRequest - */ - 'balance'?: DeployContractInkRequestBalance; - /** - * - * @type {DeployContractInkRequestSalt} - * @memberof DeployContractInkRequest - */ - 'salt'?: DeployContractInkRequestSalt | null; -} -/** - * @type DeployContractInkRequestBalance - * @export - */ -export type DeployContractInkRequestBalance = number | string; - -/** - * - * @export - * @interface DeployContractInkRequestGasLimit - */ -export interface DeployContractInkRequestGasLimit { - /** - * - * @type {number} - * @memberof DeployContractInkRequestGasLimit - */ - 'refTime': number; - /** - * - * @type {number} - * @memberof DeployContractInkRequestGasLimit - */ - 'proofSize': number; -} -/** - * @type DeployContractInkRequestSalt - * @export - */ -export type DeployContractInkRequestSalt = string; - -/** - * @type DeployContractInkRequestStorageDepositLimit - * @export - */ -export type DeployContractInkRequestStorageDepositLimit = number | string; - -/** - * - * @export - * @interface DeployContractInkResponse - */ -export interface DeployContractInkResponse { - /** - * - * @type {boolean} - * @memberof DeployContractInkResponse - */ - 'success': boolean; - /** - * - * @type {string} - * @memberof DeployContractInkResponse - */ - 'contractAddress'?: string; -} -/** - * Error response from the connector. - * @export - * @interface ErrorExceptionResponse - */ -export interface ErrorExceptionResponse { - /** - * Short error description message. - * @type {string} - * @memberof ErrorExceptionResponse - */ - 'message': string; - /** - * Detailed error information. - * @type {string} - * @memberof ErrorExceptionResponse - */ - 'error': string; -} -/** - * - * @export - * @interface InvokeContractRequest - */ -export interface InvokeContractRequest { - /** - * - * @type {PolkadotContractInvocationType} - * @memberof InvokeContractRequest - */ - 'invocationType': PolkadotContractInvocationType; - /** - * - * @type {string} - * @memberof InvokeContractRequest - */ - 'accountAddress': string; - /** - * - * @type {Web3SigningCredential} - * @memberof InvokeContractRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {PolkadotTransactionConfigTransferSubmittable} - * @memberof InvokeContractRequest - */ - 'metadata': PolkadotTransactionConfigTransferSubmittable; - /** - * - * @type {string} - * @memberof InvokeContractRequest - */ - 'contractAddress': string; - /** - * The name of the contract method to invoke. - * @type {string} - * @memberof InvokeContractRequest - */ - 'methodName': string; - /** - * - * @type {DeployContractInkRequestGasLimit} - * @memberof InvokeContractRequest - */ - 'gasLimit': DeployContractInkRequestGasLimit; - /** - * - * @type {DeployContractInkRequestStorageDepositLimit} - * @memberof InvokeContractRequest - */ - 'storageDepositLimit'?: DeployContractInkRequestStorageDepositLimit | null; - /** - * - * @type {DeployContractInkRequestBalance} - * @memberof InvokeContractRequest - */ - 'balance'?: DeployContractInkRequestBalance; - /** - * The list of arguments to pass in to the contract method being invoked - * @type {Array} - * @memberof InvokeContractRequest - */ - 'params'?: Array; -} - - -/** - * - * @export - * @interface InvokeContractResponse - */ -export interface InvokeContractResponse { - /** - * - * @type {any} - * @memberof InvokeContractResponse - */ - 'callOutput'?: any; - /** - * - * @type {boolean} - * @memberof InvokeContractResponse - */ - 'success': boolean; - /** - * - * @type {string} - * @memberof InvokeContractResponse - */ - 'txHash'?: string; - /** - * - * @type {string} - * @memberof InvokeContractResponse - */ - 'blockHash'?: string; -} -/** - * - * @export - * @enum {string} - */ - -export const PolkadotContractInvocationType = { - Send: 'SEND', - Query: 'QUERY' -} as const; - -export type PolkadotContractInvocationType = typeof PolkadotContractInvocationType[keyof typeof PolkadotContractInvocationType]; - - -/** - * - * @export - * @interface PolkadotTransactionConfig - */ -export interface PolkadotTransactionConfig { - [key: string]: any; - - /** - * - * @type {PolkadotTransactionConfigTransferSubmittable} - * @memberof PolkadotTransactionConfig - */ - 'transferSubmittable'?: PolkadotTransactionConfigTransferSubmittable; - /** - * - * @type {PolkadotTransactionConfigTransferSubmittable} - * @memberof PolkadotTransactionConfig - */ - 'to'?: PolkadotTransactionConfigTransferSubmittable; - /** - * - * @type {PolkadotTransactionConfigValue} - * @memberof PolkadotTransactionConfig - */ - 'value'?: PolkadotTransactionConfigValue; -} -/** - * @type PolkadotTransactionConfigTransferSubmittable - * @export - */ -export type PolkadotTransactionConfigTransferSubmittable = string; - -/** - * @type PolkadotTransactionConfigValue - * @export - */ -export type PolkadotTransactionConfigValue = number; - -/** - * - * @export - * @interface RawTransactionRequest - */ -export interface RawTransactionRequest { - /** - * - * @type {string} - * @memberof RawTransactionRequest - */ - 'to': string; - /** - * - * @type {number} - * @memberof RawTransactionRequest - */ - 'value': number; -} -/** - * - * @export - * @interface RawTransactionResponse - */ -export interface RawTransactionResponse { - /** - * - * @type {RawTransactionResponseResponseContainer} - * @memberof RawTransactionResponse - */ - 'responseContainer': RawTransactionResponseResponseContainer; -} -/** - * - * @export - * @interface RawTransactionResponseData - */ -export interface RawTransactionResponseData { - /** - * - * @type {string} - * @memberof RawTransactionResponseData - */ - 'rawTransaction': string; -} -/** - * - * @export - * @interface RawTransactionResponseResponseContainer - */ -export interface RawTransactionResponseResponseContainer { - /** - * - * @type {RawTransactionResponseData} - * @memberof RawTransactionResponseResponseContainer - */ - 'response_data': RawTransactionResponseData; - /** - * - * @type {boolean} - * @memberof RawTransactionResponseResponseContainer - */ - 'succeeded': boolean; - /** - * - * @type {string} - * @memberof RawTransactionResponseResponseContainer - */ - 'message': string; - /** - * - * @type {string} - * @memberof RawTransactionResponseResponseContainer - */ - 'error': string | null; -} -/** - * - * @export - * @interface RunTransactionRequest - */ -export interface RunTransactionRequest { - /** - * - * @type {Web3SigningCredential} - * @memberof RunTransactionRequest - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {PolkadotTransactionConfig} - * @memberof RunTransactionRequest - */ - 'transactionConfig': PolkadotTransactionConfig; -} -/** - * - * @export - * @interface RunTransactionResponse - */ -export interface RunTransactionResponse { - /** - * - * @type {boolean} - * @memberof RunTransactionResponse - */ - 'success': boolean; - /** - * - * @type {string} - * @memberof RunTransactionResponse - */ - 'txHash'?: string; - /** - * - * @type {string} - * @memberof RunTransactionResponse - */ - 'blockHash'?: string; -} -/** - * - * @export - * @interface SignRawTransactionRequest - */ -export interface SignRawTransactionRequest { - /** - * - * @type {string} - * @memberof SignRawTransactionRequest - */ - 'rawTransaction': string; - /** - * - * @type {string} - * @memberof SignRawTransactionRequest - */ - 'mnemonic': string; - /** - * - * @type {object} - * @memberof SignRawTransactionRequest - */ - 'signingOptions'?: object; -} -/** - * - * @export - * @interface SignRawTransactionResponse - */ -export interface SignRawTransactionResponse { - /** - * - * @type {boolean} - * @memberof SignRawTransactionResponse - */ - 'success': boolean; - /** - * - * @type {string} - * @memberof SignRawTransactionResponse - */ - 'signedTransaction': string; -} -/** - * - * @export - * @interface TransactionInfoRequest - */ -export interface TransactionInfoRequest { - /** - * - * @type {string} - * @memberof TransactionInfoRequest - */ - 'accountAddress': string; - /** - * - * @type {number} - * @memberof TransactionInfoRequest - */ - 'transactionExpiration': number | null; -} -/** - * - * @export - * @interface TransactionInfoResponse - */ -export interface TransactionInfoResponse { - /** - * - * @type {TransactionInfoResponseResponseContainer} - * @memberof TransactionInfoResponse - */ - 'responseContainer': TransactionInfoResponseResponseContainer; -} -/** - * - * @export - * @interface TransactionInfoResponseData - */ -export interface TransactionInfoResponseData { - /** - * - * @type {object} - * @memberof TransactionInfoResponseData - */ - 'nonce': object; - /** - * - * @type {object} - * @memberof TransactionInfoResponseData - */ - 'blockHash': object; - /** - * - * @type {object} - * @memberof TransactionInfoResponseData - */ - 'era': object | null; -} -/** - * - * @export - * @interface TransactionInfoResponseResponseContainer - */ -export interface TransactionInfoResponseResponseContainer { - /** - * - * @type {TransactionInfoResponseData} - * @memberof TransactionInfoResponseResponseContainer - */ - 'response_data': TransactionInfoResponseData; - /** - * - * @type {boolean} - * @memberof TransactionInfoResponseResponseContainer - */ - 'succeeded': boolean; - /** - * - * @type {string} - * @memberof TransactionInfoResponseResponseContainer - */ - 'message': string; - /** - * - * @type {string} - * @memberof TransactionInfoResponseResponseContainer - */ - 'error': string | null; -} -/** - * @type Web3SigningCredential - * @export - */ -export type Web3SigningCredential = Web3SigningCredentialCactusKeychainRef | Web3SigningCredentialMnemonicString | Web3SigningCredentialNone; - -/** - * - * @export - * @interface Web3SigningCredentialCactusKeychainRef - */ -export interface Web3SigningCredentialCactusKeychainRef { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'type': Web3SigningCredentialType; - /** - * The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainEntryKey': string; - /** - * The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainId': string; -} - - -/** - * - * @export - * @interface Web3SigningCredentialMnemonicString - */ -export interface Web3SigningCredentialMnemonicString { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialMnemonicString - */ - 'type': Web3SigningCredentialType; - /** - * The Polkadot account\'s seed phrase for signing transaction - * @type {string} - * @memberof Web3SigningCredentialMnemonicString - */ - 'mnemonic': string; -} - - -/** - * Using this denotes that there is no signing required because the transaction is pre-signed. - * @export - * @interface Web3SigningCredentialNone - */ -export interface Web3SigningCredentialNone { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialNone - */ - 'type': Web3SigningCredentialType; -} - - -/** - * - * @export - * @enum {string} - */ - -export const Web3SigningCredentialType = { - CactusKeychainRef: 'CACTUS_KEYCHAIN_REF', - MnemonicString: 'MNEMONIC_STRING', - None: 'NONE' -} as const; - -export type Web3SigningCredentialType = typeof Web3SigningCredentialType[keyof typeof Web3SigningCredentialType]; - - - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deploys the ink! contract - * @param {DeployContractInkRequest} [deployContractInkRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractInk: async (deployContractInkRequest?: DeployContractInkRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deployContractInkRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetrics: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get raw unsigned transaction - * @param {RawTransactionRequest} [rawTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRawTransaction: async (rawTransactionRequest?: RawTransactionRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(rawTransactionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the necessary Transaction Info for a account - * @param {TransactionInfoRequest} [transactionInfoRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTransactionInfo: async (transactionInfoRequest?: TransactionInfoRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transactionInfoRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Invokes a contract on a polkadot ledger - * @param {InvokeContractRequest} [invokeContractRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContract: async (invokeContractRequest?: InvokeContractRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(invokeContractRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Executes a transaction on a Polkadot ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runTransaction: async (runTransactionRequest?: RunTransactionRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(runTransactionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary sign the raw transaction - * @param {SignRawTransactionRequest} [signRawTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - signRawTransaction: async (signRawTransactionRequest?: SignRawTransactionRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(signRawTransactionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deploys the ink! contract - * @param {DeployContractInkRequest} [deployContractInkRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deployContractInk(deployContractInkRequest?: DeployContractInkRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deployContractInk(deployContractInkRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetrics(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetrics(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get raw unsigned transaction - * @param {RawTransactionRequest} [rawTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRawTransaction(rawTransactionRequest?: RawTransactionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRawTransaction(rawTransactionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the necessary Transaction Info for a account - * @param {TransactionInfoRequest} [transactionInfoRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTransactionInfo(transactionInfoRequest?: TransactionInfoRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTransactionInfo(transactionInfoRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Invokes a contract on a polkadot ledger - * @param {InvokeContractRequest} [invokeContractRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async invokeContract(invokeContractRequest?: InvokeContractRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.invokeContract(invokeContractRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Executes a transaction on a Polkadot ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async runTransaction(runTransactionRequest?: RunTransactionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.runTransaction(runTransactionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary sign the raw transaction - * @param {SignRawTransactionRequest} [signRawTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async signRawTransaction(signRawTransactionRequest?: SignRawTransactionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.signRawTransaction(signRawTransactionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deploys the ink! contract - * @param {DeployContractInkRequest} [deployContractInkRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractInk(deployContractInkRequest?: DeployContractInkRequest, options?: any): AxiosPromise { - return localVarFp.deployContractInk(deployContractInkRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetrics(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetrics(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get raw unsigned transaction - * @param {RawTransactionRequest} [rawTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRawTransaction(rawTransactionRequest?: RawTransactionRequest, options?: any): AxiosPromise { - return localVarFp.getRawTransaction(rawTransactionRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the necessary Transaction Info for a account - * @param {TransactionInfoRequest} [transactionInfoRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTransactionInfo(transactionInfoRequest?: TransactionInfoRequest, options?: any): AxiosPromise { - return localVarFp.getTransactionInfo(transactionInfoRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Invokes a contract on a polkadot ledger - * @param {InvokeContractRequest} [invokeContractRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContract(invokeContractRequest?: InvokeContractRequest, options?: any): AxiosPromise { - return localVarFp.invokeContract(invokeContractRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Executes a transaction on a Polkadot ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runTransaction(runTransactionRequest?: RunTransactionRequest, options?: any): AxiosPromise { - return localVarFp.runTransaction(runTransactionRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary sign the raw transaction - * @param {SignRawTransactionRequest} [signRawTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - signRawTransaction(signRawTransactionRequest?: SignRawTransactionRequest, options?: any): AxiosPromise { - return localVarFp.signRawTransaction(signRawTransactionRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deploys the ink! contract - * @param {DeployContractInkRequest} [deployContractInkRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deployContractInk(deployContractInkRequest?: DeployContractInkRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deployContractInk(deployContractInkRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetrics(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetrics(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get raw unsigned transaction - * @param {RawTransactionRequest} [rawTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getRawTransaction(rawTransactionRequest?: RawTransactionRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getRawTransaction(rawTransactionRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the necessary Transaction Info for a account - * @param {TransactionInfoRequest} [transactionInfoRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getTransactionInfo(transactionInfoRequest?: TransactionInfoRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getTransactionInfo(transactionInfoRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Invokes a contract on a polkadot ledger - * @param {InvokeContractRequest} [invokeContractRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public invokeContract(invokeContractRequest?: InvokeContractRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).invokeContract(invokeContractRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Executes a transaction on a Polkadot ledger - * @param {RunTransactionRequest} [runTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public runTransaction(runTransactionRequest?: RunTransactionRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).runTransaction(runTransactionRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary sign the raw transaction - * @param {SignRawTransactionRequest} [signRawTransactionRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public signRawTransaction(signRawTransactionRequest?: SignRawTransactionRequest, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).signRawTransaction(signRawTransactionRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index dc0a06aeeb..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Polkadot - * Can perform basic tasks on a Polkadot parachain - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index f55f40d035..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Polkadot - * Can perform basic tasks on a Polkadot parachain - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 6d6c7c5b9f..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Polkadot - * Can perform basic tasks on a Polkadot parachain - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index c01d5b111e..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Polkadot - * Can perform basic tasks on a Polkadot parachain - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/index.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/index.web.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/index.web.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/model-type-guards.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/model-type-guards.ts deleted file mode 100644 index e5bfc5822f..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/model-type-guards.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - Web3SigningCredentialNone, - Web3SigningCredentialMnemonicString, - Web3SigningCredentialType, - Web3SigningCredentialCactusKeychainRef, -} from "./generated/openapi/typescript-axios/api"; - -export function isWeb3SigningCredentialMnemonicString(x?: { - type?: Web3SigningCredentialType; -}): x is Web3SigningCredentialMnemonicString { - return x?.type === Web3SigningCredentialType.MnemonicString; -} - -export function isWeb3SigningCredentialCactusRef(x?: { - type?: Web3SigningCredentialType; -}): x is Web3SigningCredentialCactusKeychainRef { - return x?.type === Web3SigningCredentialType.CactusKeychainRef; -} - -export function isWeb3SigningCredentialNone(x?: { - type?: Web3SigningCredentialType; -}): x is Web3SigningCredentialNone { - return x?.type === Web3SigningCredentialType.None; -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/plugin-factory-ledger-connector-polkadot.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/plugin-factory-ledger-connector-polkadot.ts deleted file mode 100644 index ea2db2248d..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/plugin-factory-ledger-connector-polkadot.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; - -import { - IPluginLedgerConnectorPolkadotOptions, - PluginLedgerConnectorPolkadot, -} from "./plugin-ledger-connector-polkadot"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorPolkadot, - IPluginLedgerConnectorPolkadotOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorPolkadotOptions, - ): Promise { - return new PluginLedgerConnectorPolkadot(pluginOptions); - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/plugin-ledger-connector-polkadot.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/plugin-ledger-connector-polkadot.ts deleted file mode 100644 index cf7f585a7f..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/plugin-ledger-connector-polkadot.ts +++ /dev/null @@ -1,972 +0,0 @@ -import { Server } from "http"; -import { Server as SecureServer } from "https"; -import { Express } from "express"; -import { - BadRequestError, - InternalServerError, - ServiceUnavailableError, -} from "http-errors-enhanced-cjs"; - -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; -import { - GetPrometheusMetricsEndpoint, - IGetPrometheusMetricsEndpointOptions, -} from "./web-services/get-prometheus-exporter-metrics-endpoint"; - -import "multer"; -import { Optional } from "typescript-optional"; - -import OAS from "../json/openapi.json"; - -import { - consensusHasTransactionFinality, - PluginRegistry, -} from "@hyperledger/cactus-core"; - -import { - IPluginLedgerConnector, - ConsensusAlgorithmFamily, - IPluginWebService, - IWebServiceEndpoint, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - newRex, -} from "@hyperledger/cactus-common"; -import { promisify } from "util"; -import { - DeployContractInkRequest, - DeployContractInkResponse, - InvokeContractRequest, - InvokeContractResponse, - PolkadotContractInvocationType, - RawTransactionRequest, - RawTransactionResponse, - RunTransactionRequest, - RunTransactionResponse, - SignRawTransactionRequest, - SignRawTransactionResponse, - TransactionInfoRequest, - TransactionInfoResponse, - Web3SigningCredential, - Web3SigningCredentialCactusKeychainRef, - Web3SigningCredentialMnemonicString, - Web3SigningCredentialType, -} from "./generated/openapi/typescript-axios/index"; -import { - GetTransactionInfoEndpoint, - IGetTransactionInfoEndpointOptions, -} from "./web-services/get-transaction-info-endpoint"; - -import { - RunTransactionEndpoint, - IRunTransactionEndpointOptions, -} from "./web-services/run-transaction-endpoint"; -import { - GetRawTransactionEndpoint, - IGetRawTransactionEndpointOptions, -} from "./web-services/get-raw-transaction-endpoint"; -import { - ISignRawTransactionEndpointOptions, - SignRawTransactionEndpoint, -} from "./web-services/sign-raw-transaction-endpoint"; -import { - DeployContractInkEndpoint, - IDeployContractInkEndpointOptions, -} from "./web-services/deploy-contract-ink-endpoint"; -import { - isWeb3SigningCredentialCactusRef, - isWeb3SigningCredentialMnemonicString, - isWeb3SigningCredentialNone, -} from "./model-type-guards"; -import { - IInvokeContractEndpointOptions, - InvokeContractEndpoint, -} from "./web-services/invoke-contract-endpoint"; - -export interface IPluginLedgerConnectorPolkadotOptions - extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - pluginRegistry?: PluginRegistry; - prometheusExporter?: PrometheusExporter; - wsProviderUrl: string; - instanceId: string; - autoConnect?: boolean; -} - -export class PluginLedgerConnectorPolkadot - implements - IPluginLedgerConnector< - DeployContractInkRequest, - DeployContractInkResponse, - RunTransactionRequest, - RunTransactionResponse - >, - ICactusPlugin, - IPluginWebService -{ - public static readonly CLASS_NAME = "PluginLedgerConnectorPolkadot"; - private readonly instanceId: string; - private readonly log: Logger; - private readonly pluginRegistry: PluginRegistry; - public wsProvider: unknown; - public api?: unknown; - public prometheusExporter: PrometheusExporter; - private endpoints: IWebServiceEndpoint[] | undefined; - private autoConnect: false | number | undefined; - - public getOpenApiSpec(): unknown { - return OAS; - } - - public get className(): string { - return PluginLedgerConnectorPolkadot.CLASS_NAME; - } - - constructor(public readonly opts: IPluginLedgerConnectorPolkadotOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - if (typeof opts.logLevel !== "undefined") { - Checks.truthy(opts.logLevel, `${fnTag} options.logLevelDesc`); - } - Checks.truthy(opts.wsProviderUrl, `${fnTag} options.wsProviderUrl`); - Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); - this.pluginRegistry = opts.pluginRegistry || new PluginRegistry({}); - this.prometheusExporter = - opts.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = opts.instanceId; - if (opts.autoConnect) { - this.autoConnect = 1; - } - this.prometheusExporter.startMetricsCollection(); - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const { log } = this; - log.info(`Installing web services for plugin ${this.getPackageName()}...`); - - const endpoints: IWebServiceEndpoint[] = []; - { - const opts: IGetPrometheusMetricsEndpointOptions = { - connector: this, - logLevel: this.opts.logLevel, - }; - - const endpoint = new GetPrometheusMetricsEndpoint(opts); - endpoints.push(endpoint); - } - { - const opts: IGetTransactionInfoEndpointOptions = { - connector: this, - logLevel: this.opts.logLevel, - }; - - const endpoint = new GetTransactionInfoEndpoint(opts); - endpoints.push(endpoint); - } - { - const opts: IRunTransactionEndpointOptions = { - connector: this, - logLevel: this.opts.logLevel, - }; - - const endpoint = new RunTransactionEndpoint(opts); - endpoints.push(endpoint); - } - { - const opts: IGetRawTransactionEndpointOptions = { - connector: this, - logLevel: this.opts.logLevel, - }; - - const endpoint = new GetRawTransactionEndpoint(opts); - endpoints.push(endpoint); - } - { - const opts: ISignRawTransactionEndpointOptions = { - connector: this, - logLevel: this.opts.logLevel, - }; - - const endpoint = new SignRawTransactionEndpoint(opts); - endpoints.push(endpoint); - } - { - const opts: IDeployContractInkEndpointOptions = { - connector: this, - logLevel: this.opts.logLevel, - }; - - const endpoint = new DeployContractInkEndpoint(opts); - endpoints.push(endpoint); - } - { - const opts: IInvokeContractEndpointOptions = { - connector: this, - logLevel: this.opts.logLevel, - }; - - const endpoint = new InvokeContractEndpoint(opts); - endpoints.push(endpoint); - } - - this.endpoints = endpoints; - - const pkg = this.getPackageName(); - log.info(`Installed web services for plugin ${pkg} OK`, { endpoints }); - return endpoints; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async shutdown(): Promise { - const serverMaybe = this.getHttpServer(); - if (serverMaybe.isPresent()) { - const server = serverMaybe.get(); - await promisify(server.close.bind(server))(); - } - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-ledger-connector-polkadot`; - } - - public getHttpServer(): Optional { - return Optional.empty(); - } - - public async onPluginInit(): Promise { - const { WsProvider } = await import("@polkadot/rpc-provider"); - const { ApiPromise } = await import("@polkadot/api"); - try { - this.wsProvider = new WsProvider( - this.opts.wsProviderUrl, - this.autoConnect, - ); - } catch (ex: unknown) { - const rex = newRex(`Could not create WsProvider. Inner exception:`, ex); - throw new InternalServerError(rex.toJSON()); - } - try { - if (!(this.wsProvider instanceof WsProvider)) { - throw new InternalServerError("this.wsProvider was not a WsProvider"); - } - this.api = await ApiPromise.create({ provider: this.wsProvider }); - } catch (ex: unknown) { - const rex = newRex(`Could not create API. Inner exception:`, ex); - throw new InternalServerError(rex.toJSON()); - } - } - - public async getConsensusAlgorithmFamily(): Promise { - return ConsensusAlgorithmFamily.Stake; - } - - public async hasTransactionFinality(): Promise { - const currentConsensusAlgorithmFamily = - await this.getConsensusAlgorithmFamily(); - - return consensusHasTransactionFinality(currentConsensusAlgorithmFamily); - } - - public async rawTransaction( - req: RawTransactionRequest, - ): Promise { - const fnTag = `${this.className}#rawTransaction()`; - Checks.truthy(req, `${fnTag} req`); - if (!this.api) { - throw new InternalServerError(`${fnTag} this.api is falsy.`); - } - const { ApiPromise } = await import("@polkadot/api"); - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError("this.api was not instanceof ApiPromise"); - } - try { - const accountAddress = req.to; - const transferValue = req.value; - - this.log.debug("%s transferAllowDeath %s, %d", fnTag, req.to, req.value); - - const rawTx = this.api.tx.balances.transferAllowDeath( - accountAddress, - transferValue, - ); - - this.log.debug("%s transferAllowDeath rawTx=%o", rawTx.toHuman()); - - const responseContainer = { - response_data: { - rawTransaction: rawTx.toHex(), - }, - succeeded: true, - message: "obtainRawTransaction", - error: null, - }; - - const response: RawTransactionResponse = { - responseContainer: responseContainer, - }; - this.log.debug("%s res %o", fnTag, response); - return response; - } catch (ex: unknown) { - const rex = newRex(`${fnTag} Obtaining raw transaction has failed:`, ex); - throw new InternalServerError(rex.toJSON()); - } - } - - public async signTransaction( - req: SignRawTransactionRequest, - ): Promise { - const fnTag = `${this.className}#signTx()`; - Checks.truthy(req, `${fnTag} req`); - if (!this.api) { - throw new ServiceUnavailableError("Substrate Node connection is down."); - } - try { - const { Keyring } = await import("@polkadot/api"); - const keyring = new Keyring({ type: "sr25519" }); - const accountPair = keyring.createFromUri(req.mnemonic); - const { ApiPromise } = await import("@polkadot/api"); - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError("this.api was not instanceof ApiPromise"); - } - const deserializedRawTransaction = this.api.tx(req.rawTransaction); - const signedTransaction = await deserializedRawTransaction.signAsync( - accountPair, - req.signingOptions, - ); - const serializedSignedTransaction = signedTransaction.toHex(); - const response: SignRawTransactionResponse = { - success: true, - signedTransaction: serializedSignedTransaction, - }; - return response; - } catch (ex: unknown) { - const errorMsg = `${fnTag} signing raw Polkadot transaction failed.`; - const rex = newRex(errorMsg, ex); - throw new InternalServerError(rex.toJSON()); - } - } - - // Perform a monetary transaction to Polkadot; - public async transact( - req: RunTransactionRequest, - ): Promise { - const fnTag = `${this.className}#transact()`; - switch (req.web3SigningCredential.type) { - case Web3SigningCredentialType.CactusKeychainRef: { - return this.transactCactusKeychainRef(req); - } - case Web3SigningCredentialType.MnemonicString: { - return this.transactMnemonicString(req); - } - case Web3SigningCredentialType.None: { - if (req.transactionConfig.transferSubmittable) { - return this.transactSigned(req); - } else { - const errorMessage = - `${fnTag} Expected pre-signed raw transaction ` + - ` since signing credential is specified as` + - `Web3SigningCredentialType.NONE`; - throw new BadRequestError(errorMessage); - } - } - default: { - const errorMessage = - `${fnTag} Unrecognized Web3SigningCredentialType: ` + - `Supported ones are: ` + - `${Object.values(Web3SigningCredentialType).join(";")}`; - throw new BadRequestError(errorMessage); - } - } - } - public async transactCactusKeychainRef( - req: RunTransactionRequest, - ): Promise { - const fnTag = `${this.className}#transactCactusKeychainRef()`; - const { transactionConfig, web3SigningCredential } = req; - const { keychainEntryKey, keychainId } = - web3SigningCredential as Web3SigningCredentialCactusKeychainRef; - - // locate the keychain plugin that has access to the keychain backend - // denoted by the keychainID from the request. - const keychainPlugin = this.pluginRegistry.findOneByKeychainId(keychainId); - - Checks.truthy(keychainPlugin, `${fnTag} keychain for ID:"${keychainId}"`); - - // Now use the found keychain plugin to actually perform the lookup of - // the private key that we need to run the transaction. - const mnemonic = await keychainPlugin?.get(keychainEntryKey); - return this.transactMnemonicString({ - web3SigningCredential: { - type: Web3SigningCredentialType.MnemonicString, - mnemonic, - }, - transactionConfig, - }); - } - public async transactMnemonicString( - req: RunTransactionRequest, - ): Promise { - const fnTag = `${this.className}#transactMnemonicString()`; - Checks.truthy(req, `${fnTag} req`); - if (!this.api) { - throw new BadRequestError(`Connection to Substrate Node is down.`); - } - const { ApiPromise } = await import("@polkadot/api"); - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError("this.api was not instanceof ApiPromise"); - } - const { transactionConfig, web3SigningCredential } = req; - const { mnemonic } = - web3SigningCredential as Web3SigningCredentialMnemonicString; - if (!mnemonic) { - throw new BadRequestError(`Need mnemonic string for transaction`); - } - let success = false; - const { Keyring } = await import("@polkadot/api"); - const keyring = new Keyring({ type: "sr25519" }); - const accountPair = keyring.createFromUri(mnemonic); - const accountAddress = transactionConfig.to; - const transferValue = transactionConfig.value; - const txResult = await new Promise<{ - success: boolean; - transactionHash: string; - blockhash: string; - }>(async (resolve, reject) => { - if (!this.api) { - reject( - new ServiceUnavailableError(`Connection to Substrate Node down.`), - ); - } - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError("this.api was not instanceof ApiPromise"); - } - this.api.tx.balances - .transferAllowDeath(accountAddress, transferValue) - .signAndSend(accountPair, async ({ status, txHash, dispatchError }) => { - if (status.isInBlock) { - if (dispatchError) { - reject( - new ServiceUnavailableError( - `Connection to Substrate Node down.`, - ), - ); - if (dispatchError.isModule) { - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError( - "this.api was not instanceof ApiPromise", - ); - } - const decoded = this.api.registry.findMetaError( - dispatchError.asModule, - ); - const { docs, name, section } = decoded; - throw new BadRequestError( - `${section}.${name}: ${docs.join(" ")}`, - ); - } else { - throw new BadRequestError(dispatchError.toString()); - } - } - this.prometheusExporter.addCurrentTransaction(); - resolve({ - success: true, - blockhash: status.asInBlock.toHex(), - transactionHash: txHash.toHex(), - }); - } - }); - }); - success = txResult.success; - const transactionHash = txResult.transactionHash; - const blockHash = txResult.blockhash; - return { - success, - txHash: transactionHash, - blockHash: blockHash, - }; - } - public async transactSigned( - req: RunTransactionRequest, - ): Promise { - const fnTag = `${this.className}#transactSigned()`; - Checks.truthy( - req.transactionConfig.transferSubmittable, - `${fnTag}:req.transactionConfig.transferSubmittable`, - ); - const { ApiPromise } = await import("@polkadot/api"); - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError("this.api was not instanceof ApiPromise"); - } - const signedTx = req.transactionConfig.transferSubmittable as string; - - this.log.debug( - "Starting api.rpc.author.submitAndWatchExtrinsic(transferSubmittable) ", - ); - let success = false; - Checks.truthy(req, `${fnTag} req`); - if (!this.api) { - throw new ServiceUnavailableError(`Connection to Substrate Node down.`); - } - const deserializedTransaction = this.api.tx(signedTx); - const signature = deserializedTransaction.signature.toHex(); - if (!signature) { - throw new BadRequestError(`${fnTag} Transaction is not signed.`); - } - - const { isHex } = await import("@polkadot/util"); - if (!isHex(signature)) { - throw new BadRequestError(`${fnTag} Transaction signature is not valid.`); - } - - const txResult = await new Promise<{ - success: boolean; - transactionHash: string; - blockhash: string; - }>(async (resolve, reject) => { - if (!this.api) { - reject( - new ServiceUnavailableError(`Connection to Substrate Node down.`), - ); - } - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError("this.api was not instanceof ApiPromise"); - } - this.api.rpc.author.submitAndWatchExtrinsic( - deserializedTransaction, - ({ isInBlock, hash, asInBlock, type }) => { - if (isInBlock) { - this.prometheusExporter.addCurrentTransaction(); - resolve({ - success: true, - blockhash: asInBlock.toHex(), - transactionHash: hash.toHex(), - }); - } else { - const errorMessage = `transaction not submitted with status: ${type}`; - reject(new BadRequestError(errorMessage)); - } - }, - ); - }); - - success = txResult.success; - const txHash = txResult.transactionHash; - const blockHash = txResult.blockhash; - return { success, txHash, blockHash }; - } - - private async getMnemonicStringFromWeb3SigningCredential( - fnTag: string, - type: "deploy" | "invoke", - web3SigningCredential: Web3SigningCredential, - ): Promise { - if (isWeb3SigningCredentialNone(web3SigningCredential)) { - throw new BadRequestError( - `${fnTag} Cannot ${type} contract with pre-signed TX`, - ); - } - let mnemonic: string; - if (isWeb3SigningCredentialMnemonicString(web3SigningCredential)) { - const Credential = - web3SigningCredential as Web3SigningCredentialMnemonicString; - mnemonic = Credential.mnemonic; - if (!mnemonic) { - const errorMessage = `${fnTag} Cannot ${type} contract without mnemonic string.`; - throw new BadRequestError(errorMessage); - } - return mnemonic; - } else if (isWeb3SigningCredentialCactusRef(web3SigningCredential)) { - const Credential = - web3SigningCredential as Web3SigningCredentialCactusKeychainRef; - const { keychainEntryKey, keychainId } = Credential; - if (!keychainId || !keychainEntryKey) { - const errorMessage = `${fnTag} Cannot ${type} contract without keychainId and the keychainEntryKey.`; - throw new BadRequestError(errorMessage); - } - // locate the keychain plugin that has access to the keychain backend - // denoted by the keychainID from the request. - const keychainPlugin = - this.pluginRegistry.findOneByKeychainId(keychainId); - if (!keychainPlugin) { - const errorMessage = - `${fnTag} The plugin registry does not contain` + - ` a keychain plugin for ID:"${keychainId}"`; - throw new BadRequestError(errorMessage); - } - // Now use the found keychain plugin to actually perform the lookup of - // the private key that we need to run the transaction. - mnemonic = await keychainPlugin.get(keychainEntryKey); - if (!mnemonic) { - const errorMessage = - `${fnTag} Cannot ${type} contract because` + - `the mnemonic string does not exist on the keychain`; - throw new BadRequestError(errorMessage); - } - return mnemonic; - } else { - const errorMessage = - `${fnTag} Unrecognized Web3SigningCredentialType: ` + - `Supported ones are: ` + - `${Object.values(Web3SigningCredentialType).join(";")}`; - throw new BadRequestError(errorMessage); - } - } - - // Deploy and instantiate a smart contract in Polkadot - public async deployContract( - req: DeployContractInkRequest, - ): Promise { - const fnTag = `${this.className}#deployContract()`; - Checks.truthy(req, `${fnTag} req`); - if (!this.api) { - throw new ServiceUnavailableError(`Connection to Substrate Node down.`); - } - const { ApiPromise } = await import("@polkadot/api"); - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError("this.api was not instanceof ApiPromise"); - } - const mnemonic = await this.getMnemonicStringFromWeb3SigningCredential( - fnTag, - "deploy", - req.web3SigningCredential, - ); - let success = false; - const { CodePromise, Abi } = await import("@polkadot/api-contract"); - const contractAbi = new Abi( - req.metadata, - this.api.registry.getChainProperties(), - ); - const contractCode = new CodePromise( - this.api, - contractAbi, - Buffer.from(req.wasm, "base64"), - ); - const gasLimit: unknown = this.api.registry.createType("WeightV2", { - refTime: req.gasLimit.refTime, - proofSize: req.gasLimit.proofSize, - }); - const { Keyring } = await import("@polkadot/api"); - const { stringCamelCase } = await import("@polkadot/util"); - - const keyring = new Keyring({ type: "sr25519" }); - const accountPair = keyring.createFromUri(mnemonic); - const params = req.params ?? []; - const constructorMethod = req.constructorMethod ?? "new"; - const tx = contractCode.tx[stringCamelCase(constructorMethod)]( - { - gasLimit: gasLimit as string, // FIXME - storageDepositLimit: req.storageDepositLimit, - salt: req.salt, - value: req.balance, - }, - ...params, - ); - const txResult = await new Promise<{ - success: boolean; - address: string | undefined; - }>((resolve, reject) => { - tx.signAndSend( - accountPair, - //https://github.com/polkadot-js/api/issues/5722 - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - ({ contract, status, dispatchError }) => { - if (status.isInBlock || status.isFinalized) { - if (dispatchError) { - reject(new BadRequestError("deployment not successful")); - if (dispatchError.isModule) { - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError( - "this.api was not instanceof ApiPromise", - ); - } - const decoded = this.api.registry.findMetaError( - dispatchError.asModule, - ); - const { docs, name, section } = decoded; - throw new BadRequestError( - `${section}.${name}: ${docs.join(" ")}`, - ); - } else { - throw new BadRequestError(dispatchError.toString()); - } - } - this.prometheusExporter.addCurrentTransaction(); - resolve({ - success: true, - address: contract.address.toString(), - }); - } - }, - ); - }); - success = txResult.success; - const contractAddress = txResult.address; - return { - success: success, - contractAddress: contractAddress, - }; - } - - public async isSafeToCallContractMethod( - abi: unknown, - name: string, - ): Promise { - Checks.truthy(abi, `${this.className}#isSafeToCallContractMethod():abi`); - const { Abi } = await import("@polkadot/api-contract"); - if (!(abi instanceof Abi)) { - throw new Error("Expected abi arg as instanceof Abi"); - } - Checks.truthy( - abi.messages, - `${this.className}#isSafeToCallContractMethod():abi.messages`, - ); - Checks.nonBlankString( - name, - `${this.className}#isSafeToCallContractMethod():name`, - ); - const methods = abi.messages.map((m) => m.method); - return methods.includes(name); - } - - // invoke the smart contract - public async invokeContract( - req: InvokeContractRequest, - ): Promise { - const fnTag = `${this.className}#invokeContract()`; - Checks.truthy(req, `${fnTag} req`); - if (!this.api) { - throw new ServiceUnavailableError(`Connection to Substrate Node down.`); - } - const { ApiPromise } = await import("@polkadot/api"); - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError("this.api was not instanceof ApiPromise"); - } - const { Abi, ContractPromise } = await import("@polkadot/api-contract"); - const contractAbi = new Abi( - req.metadata, - this.api.registry.getChainProperties(), - ); - const { stringCamelCase } = await import("@polkadot/util"); - const methodName = stringCamelCase(req.methodName); - const isSafeToCall = await this.isSafeToCallContractMethod( - contractAbi, - methodName, - ); - if (!isSafeToCall) { - throw new BadRequestError( - `Invalid method name provided in request. ${req.methodName} does not exist on the contract abi.messages object's "method" property.`, - ); - } - const contract = new ContractPromise( - this.api, - req.metadata, - req.contractAddress, - ); - const gasLimit: unknown = this.api.registry.createType("WeightV2", { - refTime: req.gasLimit.refTime, - proofSize: req.gasLimit.proofSize, - }); - if (req.invocationType === PolkadotContractInvocationType.Query) { - let success = false; - const params = req.params ?? []; - const query = contract.query[methodName]( - req.accountAddress, - { - gasLimit: gasLimit as string, // FIXME, - storageDepositLimit: req.storageDepositLimit, - value: req.balance, - }, - ...params, - ); - const callOutput = await query; - success = true; - return { success, callOutput }; - } else if (req.invocationType === PolkadotContractInvocationType.Send) { - const mnemonic = await this.getMnemonicStringFromWeb3SigningCredential( - fnTag, - "invoke", - req.web3SigningCredential, - ); - const { Keyring } = await import("@polkadot/api"); - const keyring = new Keyring({ type: "sr25519" }); - const accountPair = keyring.createFromUri(mnemonic); - let success = false; - const params = req.params ?? []; - const tx = contract.tx[methodName]( - { - gasLimit: gasLimit as string, // FIXME - storageDepositLimit: req.storageDepositLimit, - value: req.balance, - }, - ...params, - ); - const txResult = await new Promise<{ - success: boolean; - transactionHash: string; - blockHash: string; - }>((resolve, reject) => { - tx.signAndSend(accountPair, ({ status, txHash, dispatchError }) => { - if (!this.api) { - throw new ServiceUnavailableError(`Substrate node connection down`); - } - if (status.isInBlock || status.isFinalized) { - if (dispatchError) { - reject("TX not successful"); - if (dispatchError.isModule) { - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError( - "this.api was not instanceof ApiPromise", - ); - } - const decoded = this.api.registry.findMetaError( - dispatchError.asModule, - ); - const { docs, name, section } = decoded; - throw new BadRequestError( - `${section}.${name}: ${docs.join(" ")}`, - ); - } else { - throw new BadRequestError(dispatchError.toString()); - } - } - this.prometheusExporter.addCurrentTransaction(); - resolve({ - success: true, - transactionHash: txHash.toHex(), - blockHash: status.asInBlock.toHex(), - }); - } - }); - }); - success = txResult.success; - const txHash = txResult.transactionHash; - const blockHash = txResult.blockHash; - return { success, txHash, blockHash }; - } else { - throw new BadRequestError( - `${fnTag} Unsupported invocation type ${req.invocationType}`, - ); - } - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - const fn = `${this.className}#getPrometheusExporterMetrics()`; - try { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - return res; - } catch (ex: unknown) { - const rex = newRex(`${fn} Failed to get Prometheus exporter metrics`, ex); - throw new InternalServerError(rex.toJSON()); - } - } - - // Obtains information to sign a transaction - public async obtainTransactionInformation( - req: TransactionInfoRequest, - ): Promise { - const fnTag = `${this.className}#obtainTxInformation()`; - Checks.truthy(req, `${fnTag} req`); - this.log.info(`getTxFee`); - if (!this.api) { - throw new ServiceUnavailableError(`Substrate node connection down`); - } - const accountAddress = req.accountAddress; - const transactionExpiration = (req.transactionExpiration as number) || 50; - const { ApiPromise } = await import("@polkadot/api"); - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError("this.api was not instanceof ApiPromise"); - } - try { - const signedBlock = await this.api.rpc.chain.getBlock(); - const nonce = (await this.api.derive.balances.account(accountAddress)) - .accountNonce; - const blockHash = signedBlock.block.header.hash; - - const era = this.api.createType("ExtrinsicEra", { - current: signedBlock.block.header.number, - period: transactionExpiration, - }); - - const options = { - nonce: nonce, - blockHash: blockHash, - era: era, - }; - - const responseContainer = { - response_data: options, - succeeded: true, - message: "obtainTransactionInformation", - error: null, - }; - - const response: TransactionInfoResponse = { - responseContainer: responseContainer, - }; - - return response; - } catch (ex: unknown) { - const rex = newRex(`${fnTag} Obtaining info for transaction failed.`, ex); - throw new InternalServerError(rex.toJSON()); - } - } - - public async shutdownConnectionToSubstrate(): Promise { - try { - if (this.api) { - const { ApiPromise } = await import("@polkadot/api"); - if (!(this.api instanceof ApiPromise)) { - throw new InternalServerError( - "this.api was not instanceof ApiPromise", - ); - } - this.log.info("Shutting down connection to substrate..."); - this.api.disconnect(); - } else { - this.log.warn( - "Trying to shutdown connection to substrate, but no connection is available", - ); - } - } catch (ex: unknown) { - this.log.error("Could not disconnect from Substrate Ledger:", ex); - const rex = newRex("Could not disconnect from Substrate Ledger", ex); - throw new InternalServerError(rex.toJSON()); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index 140bb1a540..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Transactions } from "./response.type"; - -import { totalTxCount, K_CACTUS_POLKADOT_TOTAL_TX_COUNT } from "./metrics"; - -export async function collectMetrics( - transactions: Transactions, -): Promise { - transactions.counter++; - totalTxCount - .labels(K_CACTUS_POLKADOT_TOTAL_TX_COUNT) - .set(transactions.counter); -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index 4de9b34e6d..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_POLKADOT_TOTAL_TX_COUNT = - "cactus_polkadot_total_tx_count"; - -export const totalTxCount = new Gauge({ - name: "cactus_polkadot_total_tx_count", - help: "Total transactions executed", - labelNames: ["type"], -}); diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index 81454cae5b..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,39 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { Transactions } from "./response.type"; -import { collectMetrics } from "./data-fetcher"; -import { K_CACTUS_POLKADOT_TOTAL_TX_COUNT } from "./metrics"; -import { totalTxCount } from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly transactions: Transactions = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public addCurrentTransaction(): void { - collectMetrics(this.transactions); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_POLKADOT_TOTAL_TX_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalTxCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 3f1bc7f491..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type Transactions = { - counter: number; -}; diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/public-api.ts deleted file mode 100644 index a490e3bbe5..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/public-api.ts +++ /dev/null @@ -1,16 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; - -export { - PluginLedgerConnectorPolkadot, - IPluginLedgerConnectorPolkadotOptions, -} from "./plugin-ledger-connector-polkadot"; -export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector-polkadot"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector-polkadot"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/deploy-contract-ink-endpoint.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/deploy-contract-ink-endpoint.ts deleted file mode 100644 index 8f27f16f51..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/deploy-contract-ink-endpoint.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { Express, Request, Response } from "express"; -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorPolkadot } from "../plugin-ledger-connector-polkadot"; -import OAS from "../../json/openapi.json"; - -export interface IDeployContractInkEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorPolkadot; -} - -export class DeployContractInkEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - public static readonly CLASS_NAME = "DeployContractInkEndpoint"; - - constructor(public readonly opts: IDeployContractInkEndpointOptions) { - const fnTag = "DeployContractInkEndpoint#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} arg options.connector`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return DeployContractInkEndpoint.CLASS_NAME; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/deploy-contract-ink" - ]; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.opts.connector.deployContract(reqBody); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to deploy contract:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint.ts deleted file mode 100644 index c225761e8b..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { PluginLedgerConnectorPolkadot } from "../plugin-ledger-connector-polkadot"; - -export interface IGetPrometheusMetricsEndpointOptions { - connector: PluginLedgerConnectorPolkadot; - logLevel?: LogLevelDesc; -} - -export class GetPrometheusMetricsEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - public static readonly CLASS_NAME = "GetPrometheusExporterEndpoint"; - constructor(public readonly options: IGetPrometheusMetricsEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.connector, `${fnTag} options.connector`); - - const label = this.className; - const level = options.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ label, level }); - } - - public get className(): string { - return GetPrometheusMetricsEndpoint.CLASS_NAME; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - const resBody = - await this.options.connector.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to get Prometheus Exporter Metrics:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/get-raw-transaction-endpoint.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/get-raw-transaction-endpoint.ts deleted file mode 100644 index 03b2c9ac56..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/get-raw-transaction-endpoint.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { Express, Request, Response } from "express"; -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorPolkadot } from "../plugin-ledger-connector-polkadot"; -import OAS from "../../json/openapi.json"; - -export interface IGetRawTransactionEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorPolkadot; -} - -export class GetRawTransactionEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - public static readonly CLASS_NAME = "GetRawTransactionEndpoint"; - - constructor(public readonly opts: IGetRawTransactionEndpointOptions) { - const fnTag = "GetRawTransactionEndpoint#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} arg options.connector`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return GetRawTransactionEndpoint.CLASS_NAME; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-raw-transaction" - ]; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.opts.connector.rawTransaction(reqBody); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to get Raw Transaction:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/get-transaction-info-endpoint.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/get-transaction-info-endpoint.ts deleted file mode 100644 index 43a4833b8e..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/get-transaction-info-endpoint.ts +++ /dev/null @@ -1,101 +0,0 @@ -import type { Express, Request, Response } from "express"; -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorPolkadot } from "../plugin-ledger-connector-polkadot"; -import OAS from "../../json/openapi.json"; - -export interface IGetTransactionInfoEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorPolkadot; -} - -export class GetTransactionInfoEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - public static readonly CLASS_NAME = "GetTransactionInfoEndpoint"; - - constructor(public readonly opts: IGetTransactionInfoEndpointOptions) { - const fnTag = "GetTransactionInfoEndpoint#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} arg options.connector`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return GetTransactionInfoEndpoint.CLASS_NAME; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/get-transaction-info" - ]; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = - await this.opts.connector.obtainTransactionInformation(reqBody); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to obtain Transaction Information:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/invoke-contract-endpoint.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/invoke-contract-endpoint.ts deleted file mode 100644 index 1e818915b0..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/invoke-contract-endpoint.ts +++ /dev/null @@ -1,96 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorPolkadot } from "../plugin-ledger-connector-polkadot"; -import OAS from "../../json/openapi.json"; -export interface IInvokeContractEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorPolkadot; -} - -export class InvokeContractEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - public static readonly CLASS_NAME = "InvokeContractEndpoint"; - - constructor(public readonly opts: IInvokeContractEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.connector, `${fnTag} arg options.connector`); - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - public get className(): string { - return InvokeContractEndpoint.CLASS_NAME; - } - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/invoke-contract" - ]; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.opts.connector.invokeContract(reqBody); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to invoke contract:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/run-transaction-endpoint.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/run-transaction-endpoint.ts deleted file mode 100644 index a17e526f4b..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/run-transaction-endpoint.ts +++ /dev/null @@ -1,96 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorPolkadot } from "../plugin-ledger-connector-polkadot"; -import OAS from "../../json/openapi.json"; -export interface IRunTransactionEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorPolkadot; -} - -export class RunTransactionEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - public static readonly CLASS_NAME = "RunTransactionEndpoint"; - - constructor(public readonly opts: IRunTransactionEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - - Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.connector, `${fnTag} arg options.connector`); - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - public get className(): string { - return RunTransactionEndpoint.CLASS_NAME; - } - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/run-transaction" - ]; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.opts.connector.transact(reqBody); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to perform transaction:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/sign-raw-transaction-endpoint.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/sign-raw-transaction-endpoint.ts deleted file mode 100644 index ddb28360e5..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/main/typescript/web-services/sign-raw-transaction-endpoint.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { Express, Request, Response } from "express"; -import { - Logger, - LoggerProvider, - LogLevelDesc, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorPolkadot } from "../plugin-ledger-connector-polkadot"; -import OAS from "../../json/openapi.json"; - -export interface ISignRawTransactionEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorPolkadot; -} - -export class SignRawTransactionEndpoint implements IWebServiceEndpoint { - private readonly log: Logger; - public static readonly CLASS_NAME = "SignRawTransactionEndpoint"; - - constructor(public readonly opts: ISignRawTransactionEndpointOptions) { - const fnTag = "SignRawTransactionEndpoint#constructor()"; - - Checks.truthy(opts, `${fnTag} options`); - Checks.truthy(opts.connector, `${fnTag} arg options.connector`); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return SignRawTransactionEndpoint.CLASS_NAME; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-polkadot/sign-raw-transaction" - ]; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = `${this.className}#handleRequest()`; - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.opts.connector.signTransaction(reqBody); - res.json(resBody); - } catch (ex) { - const errorMsg = `${reqTag} ${fnTag} Failed to sign Transaction:`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/flipper.contract b/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/flipper.contract deleted file mode 100644 index d346e67f8f..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/flipper.contract +++ /dev/null @@ -1 +0,0 @@ -{"source":{"hash":"0x7b5ef2f314c9ada626e2ef1b54c3fad8f02fd09c8f349414b762dcfc8dee6353","language":"ink! 4.2.1","compiler":"rustc 1.69.0","wasm":"0x0061736d0100000001450c60027f7f017f60037f7f7f017f60027f7f0060037f7f7f0060017f0060047f7f7f7f017f60000060047f7f7f7f0060017f017f60017f017e60057f7f7f7f7f006000017f028a0107057365616c310b6765745f73746f726167650005057365616c301176616c75655f7472616e736665727265640002057365616c3005696e7075740002057365616c300d64656275675f6d6573736167650000057365616c320b7365745f73746f726167650005057365616c300b7365616c5f72657475726e000303656e76066d656d6f7279020102100336350102030b08030400020801020604030202060600010103000300070204060202000400040900000a0507050000030a01000000000704050170010f0f0608017f01418080040b0711020463616c6c0017066465706c6f7900180914010041010b0e0d31263928323738271b1d1f362a0a8744352b01017f037f2002200346047f200005200020036a200120036a2d00003a0000200341016a21030c010b0b0b2601017f230041106b22022400200220003a000f20012002410f6a41011008200241106a24000b5c01037f02402000280208220420026a220320044f04402003200028020422054b0d01200028020020046a200320046b2001200241c897041034200020033602080f0b41f09504411c41a89704101e000b2003200541b89704100b000b5502027f027e230041206b22002400200041106a22014200370300200042003703082000411036021c200041086a2000411c6a10012001290300210220002903082103200041206a2400410541042002200384501b0b1b002000418180014f044020004180800141dc8104100b000b20000b7501017f230041306b220324002003200136020420032000360200200341146a41023602002003411c6a41023602002003412c6a41033602002003418c8f0436021020034100360208200341033602242003200341206a3602182003200341046a36022820032003360220200341086a2002100e000b5201017f230041206b220124002001410c6a4101360200200141146a4101360200200141e49404360208200141003602002001410136021c200120003602182001200141186a360210200141c88204100e000b910101017f230041306b22022400200241146a41013602002002411c6a4101360200200241e494043602102002410036020820024102360224200220002d0000410274220041949a046a28020036022c2002200041a89a046a280200360228200141046a28020021002002200241206a3602182002200241286a36022020012802002000200241086a1035200241306a24000b3c01017f230041206b22022400200241013a00182002200136021420022000360210200241d08a0436020c200241e49504360208200241086a1029000b4001017f230041106b22012400200141003a000f20002001410f6a41011010047f4102054101410220012d000f22004101461b410020001b0b200141106a24000b6001047f230041106b22032400200028020422042002492205450440200341086a4100200220002802002206103a200120022003280208200328020c41849a0410342003200220042006103a200020032903003702000b200341106a240020050b3f01017f230041106b22022400200242808001370204200241c49a0436020020022001047f20024101101641010541000b101620002002280208100a1015000b3701017f230041106b22002400200042808001370204200041c49a0436020020004100101620004100101641002000280208100a1015000bae0102057f017e230041306b2201240020014100360218200142808001370224200141c49a043602202001410036021c200141206a22022001411c6a4104100820012001290320370310200141086a200141106a220320012802281014200128020c2104200128020820012903102106200141003602282001200637032020002002100720012001290320370310200120032001280228101420042001280200200128020410041a200141306a24000b4501017f2002200128020422034b0440418c9604412341e89704101e000b2001200320026b36020420012001280200220120026a36020020002002360204200020013602000b0d00200041c49a0420011005000ba10101027f20002802082202200028020422034904402000200241016a360208200028020020026a20013a00000f0b230041306b220024002000200336020420002002360200200041146a41023602002000411c6a41023602002000412c6a4103360200200041a48a0436021020004100360208200041033602242000200041206a360218200020003602282000200041046a360220200041086a41d89704100e000baf0501077f230041406a22002400024002400240024002400240100941ff0171410546044020004180800136022041c49a04200041206a100220002802202201418180014f0d0120002001360224200041c49a0436022020004100360210200041206a200041106a410410100d0520002802102201411876210220014110762104200141087621030240200141ff01712201412f470440200141e30047200341ff0171413a4772200441ff017141a50147720d0741012101200241d100460d010c070b200341ff017141860147200441ff017141db0047720d0641002101200241d901470d060b20004100360218200042808001370224200041c49a043602202000410036023c200041206a22032000413c6a4104100820002000290320370310200041086a200041106a20002802281014200028020c210520002802082000280210210220002000280214220436022020052002200310002103200420002802202205490d02024002400240410c20032003410c4f1b0e0402000001000b2000412c6a4101360200200041346a4100360200200041888204360228200041e4950436023020004100360220200041206a41908204100e000b2000412c6a4101360200200041346a4100360200200041a083043602280c070b2000200536022420002002360220200041206a100f41ff017122024102460d042001450d032002451013410041001011000b200041043a0020200041206a100c000b20014180800141e48004100b000b2005200441e48004100b000b230041106b22002400200042808001370204200041c49a0436020020004100101620024100472000100741002000280208100a1015000b2000412c6a4101360200200041346a41003602002000418083043602280c010b410141011011000b200041e4950436023020004100360220200041206a41c88204100e000b8f0201057f230041106b2200240002400240100941ff01712201410546044020004180800136020041c49a042000100220002802002201418180014f0d0120002001360204200041c49a043602002000410036020802402000200041086a410410100d002000280208220141187621022001411076210320014108762104200141ff01712201419b01470440200141ed0147200441ff017141cb004772200341ff0171419d01472002411b4772720d01410010131012000b200441ff017141ae0147200341ff0171419d014772200241de0047720d002000100f41ff017122004102470d030b410141011011000b200020013a00002000100c000b20014180800141e48004100b000b200010131012000b5501017f230041206b2202240020022000360204200241186a200141106a290200370300200241106a200141086a29020037030020022001290200370308200241046a41a88304200241086a101a200241206a24000bee0301057f230041406a22032400200341033a003820034280808080800437033020034100360228200341003602202003200136021c20032000360218027f0240024020022802002201450440200241146a28020022004103742105200041ffffffff017121072002280210210441002101034020012005460d02200228020820016a220041046a28020022060440200328021820002802002006200328021c28020c1101000d040b200141086a2101200428020020042802042106200441086a2104200341186a2006110000450d000b0c020b200228020422074105742100200741ffffff3f71210703402000450d01200228020820046a220541046a28020022060440200328021820052802002006200328021c28020c1101000d030b20032001411c6a2d00003a00382003200141146a290200370330200341106a200228021022052001410c6a103320032003290310370320200341086a2005200141046a103320032003290308370328200441086a2104200041206b210020012802002106200141206a2101200520064103746a2205280200200341186a2005280204110000450d000b0c010b2002410c6a28020020074b04402003280218200228020820074103746a22002802002000280204200328021c28020c1101000d010b41000c010b41010b200341406b24000b0f00200028020020012002101c41000b7701027f230041106b2204240020022000280200200028020822036b4b0440200441086a20002003200210202004280208200428020c1021200028020821030b200028020420036a2001200210061a2003200220036a22014b044041c08304411c41a08904101e000b20002001360208200441106a24000bdd0201037f230041106b220224000240024002400240200028020022002002410c6a027f0240024020014180014f04402002410036020c2001418010490d012001418080044f0d0220022001413f71418001723a000e20022001410c7641e001723a000c20022001410676413f71418001723a000d41030c030b200028020822032000280200460d030c040b20022001413f71418001723a000d2002200141067641c001723a000c41020c010b20022001413f71418001723a000f20022001410676413f71418001723a000e20022001410c76413f71418001723a000d2002200141127641077141f001723a000c41040b101c0c020b230041106b22042400200441086a20002003410110202004280208200428020c1021200441106a2400200028020821030b200028020420036a20013a0000200341016a2201450d01200020013602080b200241106a240041000f0b41c08304411c41908904101e000b5001017f230041206b220324002003410c6a4101360200200341146a4100360200200341e49504360210200341003602002003200136021c200320003602182003200341186a36020820032002100e000b4a01017f230041206b220224002000280200200241186a200141106a290200370300200241106a200141086a29020037030020022001290200370308200241086a1019200241206a24000bac0401067f230041206b2204240002402000027f4100200220036a22032002490d001a2001280200220220026a22062002490d0141082006200320032006491b2203200341084d1b2203417f73411f7621050240200204402004410136021820042002360214200420012802043602100c010b200441003602180b200441106a2107230041106b220624002004027f0240027f0240200504400240200341004e044020072802080d012006200310242006280204210220062802000c040b0c040b20072802042209450440200641086a20031024200628020c210220062802080c030b20032102410041bc9a04280200220520036a22082005490d021a2007280200210741c09a042802002008490440200341ffff036a220841107640002202417f46200241ffff0371200247720d022002411074220520084180807c716a22022005490d0241c09a042002360200200321024100200320056a22082005490d031a0b41bc9a04200836020041002005450d021a20052007200910060c020b200420033602040c020b2003210241000b2205044020042005360204200441086a200236020041000c020b20042003360204200441086a410136020041010c010b200441086a410036020041010b360200200641106a240020042802004504402004280204210220012003360200200120023602044181808080780c010b20042802042103200441086a2802000b36020420002003360200200441206a24000f0b41e08304412141848504101e000b1f00024020014181808080784704402001450d0120001022000b0f0b1023000b900101017f230041306b220124002001200036020c2001411c6a4102360200200141246a4101360200200141d08604360218200141003602102001410336022c2001200141286a36022020012001410c6a360228230041206b22002400200041003a0018200041e086043602142000200141106a360210200041d08a0436020c200041e49504360208200041086a1029000b4601017f230041206b22002400200041146a41013602002000411c6a4100360200200041a88504360210200041e4950436021820004100360208200041086a41b08504100e000ba10101027f027f410041bc9a04280200220220016a22032002490d001a024041c09a042802002003490440200141ffff036a22032001490d01200341107640002202417f46200241ffff0371200247720d012002411074220220034180807c716a22032002490d0141c09a0420033602004100200120026a22032002490d021a0b41bc9a04200336020020020c010b41000b210320002001360204200020033602000b5301027f230041106b2202240002402001450440410121030c010b200141004e0440200241086a20011024200228020822030d0120011022000b1023000b2000200336020420002001360200200241106a24000bd806020b7f027e230041406a2203240020002802002202ad210d0240024002400240024002400240024020024190ce004f044041272100200d210e0240034020004104490d01200341196a20006a220241046b200e200e4290ce0080220d4290ce007e7da7220441ffff037141e4006e220641017441818c046a2f00003b0000200241026b2004200641e4006c6b41ffff037141017441818c046a2f00003b0000200041046b2100200e42ffc1d72f56200d210e0d000b200da7220241e3004d0d0320004102490d090c020b0c080b41272100200241e3004b0d002002410a490d040c020b200041026b2200200341196a6a200da72202200241ffff037141e4006e220241e4006c6b41ffff037141017441818c046a2f00003b00000b2002410a490d01200041024f0d000c050b200041026b2200200341196a6a200241017441818c046a2f00003b00000c020b2000450d030b200041016b2200200341196a6a200241306a3a00000b200041274b0d01412820006b412720006b22062001280218220541017122071b2102410021042005410471044041e495042104200241e4950441e49504102b20026a22024b0d010b412b418080c40020071b2107200341196a20006a2108024020012802084504404101210020012802002202200141046a280200220120072004102e0d01200220082006200128020c11010021000c010b024020022001410c6a28020022094904402005410871450d01200128021c210b2001413036021c20012d0020210c41012100200141013a002020012802002205200141046a280200220a20072004102e0d02200341106a2001200920026b4101102f20032802142202418080c400460d022003280210200520082006200a28020c1101000d0220022005200a10300d022001200c3a00202001200b36021c410021000c020b4101210020012802002202200141046a280200220120072004102e0d01200220082006200128020c11010021000c010b41012100200341086a2001200920026b4101102f200328020c2205418080c400460d00200328020820012802002202200141046a280200220120072004102e0d00200220082006200128020c1101000d00200520022001103021000b200341406b240020000f0b41b08904411c41b88e04101e000b41d08904412141cc9404101e000b0300010b0e0020002802001a03400c000b000baa05020a7f017e230041406a220124002001200036020c2001412c6a4102360200200141346a4101360200200141b09604360228200141003602202001410436023c2001200141386a36023020012001410c6a360238200141106a210641002100230041306b22022400200141206a220441146a2802002107200428020821050240024002400240200241086a027f024002400240200241106a027f024002402004410c6a28020022080e020001040b20070d0241e49504210341000c010b20070d022005280200210320052802040b22001025200228021021042006200228021422053602042006200436020020052003200010061a200620003602080c040b200428021021090c010b200541046a21032008410374210a2004280210210903402000200020032802006a22004b0d04200341086a2103200a41086b220a0d000b20002007450d011a2000410f4b0d0041002005280204450d011a0b200020006a22034100200020034d1b0b10252002290308210b200641003602082006200b3702002002200736022c200220093602282002200836022420022005360220200220042902003703182006200241186a10190d020b200241306a24000c020b41c08304411c41bc9404101e000b230041406a220024002000413336020c200041f086043602082000418484043602142000200241186a360210200041246a41023602002000412c6a41023602002000413c6a4106360200200041848b0436022020004100360218200041023602342000200041306a3602282000200041106a3602382000200041086a360230200041186a41908804100e000b2001280214210020012802182101024041c49a052d000045044041c59a052d00004101710d010b410c20002001100322002000410c4f1b410947044041c49a0541013a00000b41c59a0541013a00000b000b0d0042e8a1eef1be9ca9fda07f0ba704010a7f230041106b2203240002400240200020016b22024110490d002002200141036a417c7120016b220049200041044b720d00200220006b22044104490d0020012000102c2206200020016a22082004417c716a2004410371102c6a220220064f0440200441027621050240024003402005450d0520032008200541c0012005200541c0014f1b418c9004102d200328020c21052003280208210820032003280200200328020422002000417c7141f49104102d200328020c210920032802082107024020032802042200450440410021010c010b2003280200220420004102746a210a4100210103402004220641106a2104410021000240034020012001200020066a280200220b417f73410776200b410676724181828408716a22014d0440200041046a22004110470d010c020b0b41b08904411c41849204101e000b2004200a470d000b0b20022002200141087641ff81fc0771200141ff81fc07716a418180046c4110766a22024b0d012009450d000b200941027421004100210103402001200120072802002204417f734107762004410676724181828408716a22014b0d02200741046a2107200041046b22000d000b20022002200141087641ff81fc0771200141ff81fc07716a418180046c4110766a22024d0d0441b08904411c41b49204101e000b41b08904411c41949204101e000b41b08904411c41a49204101e000b41b08904411c41e49104101e000b20012002102c21020b200341106a240020020b4601017f200145044041000f0b024003402002200220002c000041bf7f4a6a22024b0d01200041016a2100200141016b22010d000b20020f0b41b08904411c41bc9404101e000b3e00200220034f044020002003360204200020013602002000410c6a200220036b3602002000200120034102746a3602080f0b418c960441232004101e000b39000240027f2002418080c40047044041012000200220012802101100000d011a0b20030d0141000b0f0b200020034100200128020c1101000bae0101027f20022104024002400240200320012d0020220320034103461b41ff0171220341016b0e03010001020b200241016a2203044020034101762104200241017621030c020b41b08904411c41c88e04101e000b41002104200221030b200341016a2102200128021c2103200128020421052001280200210102400340200241016b2202450d01200120032005280210110000450d000b418080c40021030b20002003360204200020043602000b3201017f027f0340200020002004460d011a200441016a2104200220012003280210110000450d000b200441016b0b2000490bea04010b7f230041106b2209240020002802042104200028020021030240024002402001280208220b410147200128021022024101477145044020024101470d02200320046a210c200141146a28020041016a210a410021022003210003402000200c460d03027f024020002c0000220641004e0440200041016a2105200641ff017121070c010b20002d0001413f7121052006411f7121072006415f4d044020074106742005722107200041026a21050c010b20002d0002413f7120054106747221082006417049044020082007410c74722107200041036a21050c010b200041046a210520022106418080c4002007411274418080f0007120002d0003413f71200841067472722207418080c400460d011a0b2002200520006b6a22062002490d0320070b2108200a41016b220a044020052100200621022008418080c400470d010c040b0b2008418080c400460d02024002402002450d00200220044f04404100210020022004460d010c020b41002100200220036a2c00004140480d010b200321000b2002200420001b21042000200320001b21030c020b200128020020032004200128020428020c11010021000c020b41b08904411c41b49304101e000b200b450440200128020020032004200128020428020c11010021000c010b2001410c6a2802002200200320046a2003102b22024b0440200941086a2001200020026b4100102f41012100200928020c2202418080c400460d0120092802082001280200220520032004200141046a280200220128020c1101000d01200220052001103021000c010b200128020020032004200128020428020c11010021000b200941106a240020000b140020002802002001200028020428020c1100000b5501027f0240027f02400240200228020041016b0e020103000b200241046a0c010b200120022802044103746a22012802044105470d0120012802000b2802002104410121030b20002004360204200020033602000b8501002001200346044020002002200110061a0f0b230041306b220024002000200336020420002001360200200041146a41033602002000411c6a41023602002000412c6a4103360200200041dc900436021020004100360208200041033602242000200041206a360218200020003602282000200041046a360220200041086a2004100e000b4901017f230041206b22032400200341186a200241106a290200370300200341106a200241086a2902003703002003200229020037030820002001200341086a101a200341206a24000b1800200128020041dc94044105200128020428020c1101000b5801027f230041206b22022400200128020421032001280200200241186a2000280200220041106a290200370300200241106a200041086a290200370300200220002902003703082003200241086a101a200241206a24000b0b002000280200200110310b990301037f230041406a22022400200028020021034101210002402001280200220441e08a04410c200141046a280200220128020c1101000d0002402003280208220004402002200036020c200241346a4102360200410121002002413c6a4101360200200241f08a0436023020024100360228200241073602142002200241106a36023820022002410c6a36021020042001200241286a1035450d010c020b20032802002200200328020428020c11090042c8b5e0cfca86dbd3897f520d002002200036020c200241346a4102360200410121002002413c6a4101360200200241f08a0436023020024100360228200241083602142002200241106a36023820022002410c6a36021020042001200241286a10350d010b200328020c21002002411c6a4103360200200241246a41033602002002413c6a4103360200200241346a4103360200200241b88a043602182002410036021020022000410c6a3602382002200041086a3602302002410236022c200220003602282002200241286a36022020042001200241106a103521000b200241406b240020000b2c00200120024d04402000200220016b3602042000200120036a3602000f0b41809904412141ec9804101e000b0bc01a0200418080040be4152f686f6d652f616e6d6f6c2f2e636172676f2f72656769737472792f7372632f6769746875622e636f6d2d316563633632393964623965633832332f696e6b5f656e762d342e322e312f7372632f656e67696e652f6f6e5f636861696e2f6578742e72730000010064000000e4000000140000002f686f6d652f616e6d6f6c2f2e636172676f2f72656769737472792f7372632f6769746875622e636f6d2d316563633632393964623965633832332f696e6b5f656e762d342e322e312f7372632f656e67696e652f6f6e5f636861696e2f696d706c732e7273000074000100660000002401000023000000656e636f756e746572656420756e6578706563746564206572726f72ec0001001c0000007400010066000000ed000000170000002f686f6d652f616e6d6f6c2f646f636b65722d7475742f666c69707065722f6c69622e727300000020010100250000000600000005000000636f756c64206e6f742070726f7065726c79206465636f64652073746f7261676520656e74727900580101002700000073746f7261676520656e7472792077617320656d7074790088010100170000000900000004000000040000000a0000000b0000000c000000617474656d707420746f206164642077697468206f766572666c6f7700000000617474656d707420746f206d756c7469706c792077697468206f766572666c6f770000000900000000000000010000000d0000002f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f7261775f7665632e72730000140201006e0000008f0100001c0000006361706163697479206f766572666c6f770000009402010011000000140201006e0000000d020000050000002f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f616c6c6f632e72736d656d6f727920616c6c6f636174696f6e206f6620206279746573206661696c656400002c03010015000000410301000d000000c00201006c0000009f0100000d0000006120666f726d617474696e6720747261697420696d706c656d656e746174696f6e2072657475726e656420616e206572726f722f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f666d742e7273000000a30301006a00000064020000200000002f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f7665632f6d6f642e72730000200401006e000000350700000d000000200401006e000000a307000009000000617474656d707420746f206164642077697468206f766572666c6f7700000000617474656d707420746f2073756274726163742077697468206f766572666c6f7729696e646578206f7574206f6620626f756e64733a20746865206c656e20697320206275742074686520696e64657820697320f20401002000000012050100120000003a000000e40a010000000000340501000100000034050100010000000900000000000000010000000e00000070616e69636b65642061742027272c206c050100010000006d050100030000003a200000e40a01000000000080050100020000002f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f666d742f6e756d2e727330303031303230333034303530363037303830393130313131323133313431353136313731383139323032313232323332343235323632373238323933303331333233333334333533363337333833393430343134323433343434353436343734383439353035313532353335343535353635373538353936303631363236333634363536363637363836393730373137323733373437353736373737383739383038313832383338343835383638373838383939303931393239333934393539363937393839392f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f666d742f6d6f642e72730000c90601006d000000750500000d000000c90601006d0000000506000038000000206f7574206f662072616e676520666f7220736c696365206f66206c656e6774682072616e676520656e6420696e6465782000007a0701001000000058070100220000002f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f736c6963652f697465722e72739c07010070000000c005000025000000736f7572636520736c696365206c656e67746820282920646f6573206e6f74206d617463682064657374696e6174696f6e20736c696365206c656e67746820281c08010015000000310801002b000000f1040100010000002f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f7374722f636f756e742e727300740801006f0000004700000015000000740801006f0000004f00000032000000740801006f0000005400000011000000740801006f0000005a00000009000000740801006f0000006400000011000000740801006f000000660000000d0000002f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f7374722f697465722e72730000440901006e00000091000000110000002f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f697465722f7472616974732f616363756d2e727300c4090100770000009500000001000000940501006d000000cd010000050000004572726f72000000e40a0100000000007061696420616e20756e70617961626c65206d657373616765636f756c64206e6f74207265616420696e707574756e61626c6520746f206465636f646520696e707574656e636f756e746572656420756e6b6e6f776e2073656c6563746f72756e61626c6520746f206465636f64652073656c6563746f720041f095040bcb04617474656d707420746f206164642077697468206f766572666c6f77617373657274696f6e206661696c65643a206d6964203c3d2073656c662e6c656e28290ae40a0100000000002f0b0100010000002f686f6d652f616e6d6f6c2f2e636172676f2f72656769737472792f7372632f6769746875622e636f6d2d316563633632393964623965633832332f696e6b5f656e762d342e322e312f7372632f656e67696e652f6f6e5f636861696e2f6275666665722e727300400b0100670000005a0000001c000000400b0100670000005a00000009000000400b0100670000005a00000031000000400b0100670000006500000009000000400b0100670000008d000000210000002f686f6d652f616e6d6f6c2f2e7275737475702f746f6f6c636861696e732f312e36392d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f736c6963652f696e6465782e7273000000f80b010071000000820100004700000000000000617474656d707420746f2073756274726163742077697468206f766572666c6f772f686f6d652f616e6d6f6c2f2e636172676f2f72656769737472792f7372632f6769746875622e636f6d2d316563633632393964623965633832332f7061726974792d7363616c652d636f6465632d332e362e342f7372632f636f6465632e72730000a10c010061000000770000000e000000190000001c000000160000001400000019000000cb0a0100af0a0100990a0100850a01006c0a01","build_info":{"build_mode":"Debug","cargo_contract_version":"2.0.0-rc","rust_toolchain":"stable-x86_64-unknown-linux-gnu","wasm_opt_settings":{"keep_debug_symbols":false,"optimization_passes":"Z"}}},"contract":{"name":"flipper","version":"0.1.0","authors":["[your_name] <[your_email]>"]},"spec":{"constructors":[{"args":[{"label":"init_value","type":{"displayName":["bool"],"type":0}}],"default":false,"docs":["Constructor that initializes the `bool` value to the given `init_value`."],"label":"new","payable":false,"returnType":{"displayName":["ink_primitives","ConstructorResult"],"type":1},"selector":"0x9bae9d5e"},{"args":[],"default":false,"docs":["Constructor that initializes the `bool` value to `false`.","","Constructors can delegate to other constructors."],"label":"default","payable":false,"returnType":{"displayName":["ink_primitives","ConstructorResult"],"type":1},"selector":"0xed4b9d1b"}],"docs":[],"environment":{"accountId":{"displayName":["AccountId"],"type":5},"balance":{"displayName":["Balance"],"type":8},"blockNumber":{"displayName":["BlockNumber"],"type":11},"chainExtension":{"displayName":["ChainExtension"],"type":12},"hash":{"displayName":["Hash"],"type":9},"maxEventTopics":4,"timestamp":{"displayName":["Timestamp"],"type":10}},"events":[],"lang_error":{"displayName":["ink","LangError"],"type":3},"messages":[{"args":[],"default":false,"docs":[" A message that can be called on instantiated contracts."," This one flips the value of the stored `bool` from `true`"," to `false` and vice versa."],"label":"flip","mutates":true,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":1},"selector":"0x633aa551"},{"args":[],"default":false,"docs":[" Simply returns the current value of our `bool`."],"label":"get","mutates":false,"payable":false,"returnType":{"displayName":["ink","MessageResult"],"type":4},"selector":"0x2f865bd9"}]},"storage":{"root":{"layout":{"struct":{"fields":[{"layout":{"leaf":{"key":"0x00000000","ty":0}},"name":"value"}],"name":"Flipper"}},"root_key":"0x00000000"}},"types":[{"id":0,"type":{"def":{"primitive":"bool"}}},{"id":1,"type":{"def":{"variant":{"variants":[{"fields":[{"type":2}],"index":0,"name":"Ok"},{"fields":[{"type":3}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":2},{"name":"E","type":3}],"path":["Result"]}},{"id":2,"type":{"def":{"tuple":[]}}},{"id":3,"type":{"def":{"variant":{"variants":[{"index":1,"name":"CouldNotReadInput"}]}},"path":["ink_primitives","LangError"]}},{"id":4,"type":{"def":{"variant":{"variants":[{"fields":[{"type":0}],"index":0,"name":"Ok"},{"fields":[{"type":3}],"index":1,"name":"Err"}]}},"params":[{"name":"T","type":0},{"name":"E","type":3}],"path":["Result"]}},{"id":5,"type":{"def":{"composite":{"fields":[{"type":6,"typeName":"[u8; 32]"}]}},"path":["ink_primitives","types","AccountId"]}},{"id":6,"type":{"def":{"array":{"len":32,"type":7}}}},{"id":7,"type":{"def":{"primitive":"u8"}}},{"id":8,"type":{"def":{"primitive":"u128"}}},{"id":9,"type":{"def":{"composite":{"fields":[{"type":6,"typeName":"[u8; 32]"}]}},"path":["ink_primitives","types","Hash"]}},{"id":10,"type":{"def":{"primitive":"u64"}}},{"id":11,"type":{"def":{"primitive":"u32"}}},{"id":12,"type":{"def":{"variant":{}},"path":["ink_env","types","NoChainExtension"]}}],"version":"4"} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/flipper.wasm b/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/flipper.wasm deleted file mode 100644 index b399579659..0000000000 Binary files a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/flipper.wasm and /dev/null differ diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/metadata.json b/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/metadata.json deleted file mode 100644 index f7a99ee086..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/metadata.json +++ /dev/null @@ -1,400 +0,0 @@ -{ - "source": { - "hash": "0x7b5ef2f314c9ada626e2ef1b54c3fad8f02fd09c8f349414b762dcfc8dee6353", - "language": "ink! 4.2.1", - "compiler": "rustc 1.69.0", - "build_info": { - "build_mode": "Debug", - "cargo_contract_version": "2.0.0-rc", - "rust_toolchain": "stable-x86_64-unknown-linux-gnu", - "wasm_opt_settings": { - "keep_debug_symbols": false, - "optimization_passes": "Z" - } - } - }, - "contract": { - "name": "flipper", - "version": "0.1.0", - "authors": [ - "[your_name] <[your_email]>" - ] - }, - "spec": { - "constructors": [ - { - "args": [ - { - "label": "init_value", - "type": { - "displayName": [ - "bool" - ], - "type": 0 - } - } - ], - "default": false, - "docs": [ - "Constructor that initializes the `bool` value to the given `init_value`." - ], - "label": "new", - "payable": false, - "returnType": { - "displayName": [ - "ink_primitives", - "ConstructorResult" - ], - "type": 1 - }, - "selector": "0x9bae9d5e" - }, - { - "args": [], - "default": false, - "docs": [ - "Constructor that initializes the `bool` value to `false`.", - "", - "Constructors can delegate to other constructors." - ], - "label": "default", - "payable": false, - "returnType": { - "displayName": [ - "ink_primitives", - "ConstructorResult" - ], - "type": 1 - }, - "selector": "0xed4b9d1b" - } - ], - "docs": [], - "environment": { - "accountId": { - "displayName": [ - "AccountId" - ], - "type": 5 - }, - "balance": { - "displayName": [ - "Balance" - ], - "type": 8 - }, - "blockNumber": { - "displayName": [ - "BlockNumber" - ], - "type": 11 - }, - "chainExtension": { - "displayName": [ - "ChainExtension" - ], - "type": 12 - }, - "hash": { - "displayName": [ - "Hash" - ], - "type": 9 - }, - "maxEventTopics": 4, - "timestamp": { - "displayName": [ - "Timestamp" - ], - "type": 10 - } - }, - "events": [], - "lang_error": { - "displayName": [ - "ink", - "LangError" - ], - "type": 3 - }, - "messages": [ - { - "args": [], - "default": false, - "docs": [ - " A message that can be called on instantiated contracts.", - " This one flips the value of the stored `bool` from `true`", - " to `false` and vice versa." - ], - "label": "flip", - "mutates": true, - "payable": false, - "returnType": { - "displayName": [ - "ink", - "MessageResult" - ], - "type": 1 - }, - "selector": "0x633aa551" - }, - { - "args": [], - "default": false, - "docs": [ - " Simply returns the current value of our `bool`." - ], - "label": "get", - "mutates": false, - "payable": false, - "returnType": { - "displayName": [ - "ink", - "MessageResult" - ], - "type": 4 - }, - "selector": "0x2f865bd9" - } - ] - }, - "storage": { - "root": { - "layout": { - "struct": { - "fields": [ - { - "layout": { - "leaf": { - "key": "0x00000000", - "ty": 0 - } - }, - "name": "value" - } - ], - "name": "Flipper" - } - }, - "root_key": "0x00000000" - } - }, - "types": [ - { - "id": 0, - "type": { - "def": { - "primitive": "bool" - } - } - }, - { - "id": 1, - "type": { - "def": { - "variant": { - "variants": [ - { - "fields": [ - { - "type": 2 - } - ], - "index": 0, - "name": "Ok" - }, - { - "fields": [ - { - "type": 3 - } - ], - "index": 1, - "name": "Err" - } - ] - } - }, - "params": [ - { - "name": "T", - "type": 2 - }, - { - "name": "E", - "type": 3 - } - ], - "path": [ - "Result" - ] - } - }, - { - "id": 2, - "type": { - "def": { - "tuple": [] - } - } - }, - { - "id": 3, - "type": { - "def": { - "variant": { - "variants": [ - { - "index": 1, - "name": "CouldNotReadInput" - } - ] - } - }, - "path": [ - "ink_primitives", - "LangError" - ] - } - }, - { - "id": 4, - "type": { - "def": { - "variant": { - "variants": [ - { - "fields": [ - { - "type": 0 - } - ], - "index": 0, - "name": "Ok" - }, - { - "fields": [ - { - "type": 3 - } - ], - "index": 1, - "name": "Err" - } - ] - } - }, - "params": [ - { - "name": "T", - "type": 0 - }, - { - "name": "E", - "type": 3 - } - ], - "path": [ - "Result" - ] - } - }, - { - "id": 5, - "type": { - "def": { - "composite": { - "fields": [ - { - "type": 6, - "typeName": "[u8; 32]" - } - ] - } - }, - "path": [ - "ink_primitives", - "types", - "AccountId" - ] - } - }, - { - "id": 6, - "type": { - "def": { - "array": { - "len": 32, - "type": 7 - } - } - } - }, - { - "id": 7, - "type": { - "def": { - "primitive": "u8" - } - } - }, - { - "id": 8, - "type": { - "def": { - "primitive": "u128" - } - } - }, - { - "id": 9, - "type": { - "def": { - "composite": { - "fields": [ - { - "type": 6, - "typeName": "[u8; 32]" - } - ] - } - }, - "path": [ - "ink_primitives", - "types", - "Hash" - ] - } - }, - { - "id": 10, - "type": { - "def": { - "primitive": "u64" - } - } - }, - { - "id": 11, - "type": { - "def": { - "primitive": "u32" - } - } - }, - { - "id": 12, - "type": { - "def": { - "variant": {} - }, - "path": [ - "ink_env", - "types", - "NoChainExtension" - ] - } - } - ], - "version": "4" -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/README.md b/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/README.md deleted file mode 100644 index 33e552b43e..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/README.md +++ /dev/null @@ -1,10 +0,0 @@ -## Getting Started - -#### Preparation -To build the artifacts, run: -``cargo install cargo-contract --force`` - -#### Compile - -Run: -``cargo +nightly contract build`` diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/flipper/.gitignore b/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/flipper/.gitignore deleted file mode 100755 index 8de8f877e4..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/flipper/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -# Ignore build artifacts from the local tests sub-crate. -/target/ - -# Ignore backup files creates by cargo fmt. -**/*.rs.bk - -# Remove Cargo.lock when creating an executable, leave it for libraries -# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock -Cargo.lock diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/flipper/Cargo.toml b/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/flipper/Cargo.toml deleted file mode 100755 index f69e0b0ac5..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/flipper/Cargo.toml +++ /dev/null @@ -1,28 +0,0 @@ -[package] -name = "flipper" -version = "2.0.0" -authors = ["[your_name] <[your_email]>"] -edition = "2021" - -[dependencies] -ink = { version = "4.0.0-beta", default-features = false } - -scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -scale-info = { version = "2.3", default-features = false, features = ["derive"], optional = true } - -[lib] -name = "flipper" -path = "lib.rs" -crate-type = [ - # Used for normal contract Wasm blobs. - "cdylib", -] - -[features] -default = ["std"] -std = [ - "ink/std", - "scale/std", - "scale-info/std", -] -ink-as-dependency = [] diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/flipper/lib.rs b/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/flipper/lib.rs deleted file mode 100755 index ccbad9954b..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/ink/flipper/lib.rs +++ /dev/null @@ -1,69 +0,0 @@ -#![cfg_attr(not(feature = "std"), no_std)] - -#[ink::contract] -mod flipper { - - /// Defines the storage of your contract. - /// Add new fields to the below struct in order - /// to add new static storage fields to your contract. - #[ink(storage)] - pub struct Flipper { - /// Stores a single `bool` value on the storage. - value: bool, - } - - impl Flipper { - /// Constructor that initializes the `bool` value to the given `init_value`. - #[ink(constructor)] - pub fn new(init_value: bool) -> Self { - Self { value: init_value } - } - - /// Constructor that initializes the `bool` value to `false`. - /// - /// Constructors can delegate to other constructors. - #[ink(constructor)] - pub fn default() -> Self { - Self::new(Default::default()) - } - - /// A message that can be called on instantiated contracts. - /// This one flips the value of the stored `bool` from `true` - /// to `false` and vice versa. - #[ink(message)] - pub fn flip(&mut self) { - self.value = !self.value; - } - - /// Simply returns the current value of our `bool`. - #[ink(message)] - pub fn get(&self) -> bool { - self.value - } - } - - /// Unit tests in Rust are normally defined within such a `#[cfg(test)]` - /// module and test functions are marked with a `#[test]` attribute. - /// The below code is technically just normal Rust code. - #[cfg(test)] - mod tests { - /// Imports all the definitions from the outer scope so we can use them here. - use super::*; - - /// We test if the default constructor does its job. - #[ink::test] - fn default_works() { - let flipper = Flipper::default(); - assert_eq!(flipper.get(), false); - } - - /// We test a simple use case of our contract. - #[ink::test] - fn it_works() { - let mut flipper = Flipper::new(false); - assert_eq!(flipper.get(), false); - flipper.flip(); - assert_eq!(flipper.get(), true); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/integration/deploy-ink-contract.test.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/integration/deploy-ink-contract.test.ts deleted file mode 100644 index 6df0213e85..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/integration/deploy-ink-contract.test.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { SubstrateTestLedger } from "../../../../../cactus-test-tooling/src/main/typescript/substrate-test-ledger/substrate-test-ledger"; -import metadata from "../../rust/fixtures/ink/metadata.json"; -import fs from "fs-extra"; -import { v4 as uuidv4 } from "uuid"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import express from "express"; -import http from "http"; -import { - PluginLedgerConnectorPolkadot, - IPluginLedgerConnectorPolkadotOptions, - DefaultApi as PolkadotApi, - Web3SigningCredentialType, - PluginFactoryLedgerConnector, -} from "../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { AddressInfo } from "net"; -import { Configuration, PluginImportType } from "@hyperledger/cactus-core-api"; -import "jest-extended"; - -const testCase = "deploy contract through all available methods"; -describe(testCase, () => { - const logLevel: LogLevelDesc = "TRACE"; - - const DEFAULT_WSPROVIDER = "ws://127.0.0.1:9944"; - const instanceId = "test-polkadot-connector"; - const ledgerOptions = { - publishAllPorts: false, - logLevel: logLevel, - emitContainerLogs: true, - }; - const ledger = new SubstrateTestLedger(ledgerOptions); - const expressApp = express(); - expressApp.use(express.json()); - expressApp.use(express.urlencoded({ extended: false })); - const server = http.createServer(expressApp); - let addressInfo: AddressInfo, - address: string, - port: number, - apiHost: string, - plugin: PluginLedgerConnectorPolkadot, - keychainEntryKey: string, - keychainEntryValue: string, - keychainPlugin: PluginKeychainMemory, - apiClient: PolkadotApi, - apiConfig: Configuration, - rawWasm: Buffer; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - afterAll(async () => { - await ledger.stop(); - await plugin.shutdownConnectionToSubstrate(); - }); - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - afterAll(async () => await Servers.shutdown(server)); - beforeAll(async () => { - const ledgerContainer = await ledger.start(); - expect(ledgerContainer).toBeTruthy(); - keychainEntryKey = uuidv4(); - keychainEntryValue = "//Bob"; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - const connectorOptions: IPluginLedgerConnectorPolkadotOptions = { - logLevel: logLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - wsProviderUrl: DEFAULT_WSPROVIDER, - instanceId: instanceId, - }; - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - plugin = await factory.create(connectorOptions); - await plugin.onPluginInit(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = await Servers.listen(listenOptions); - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new PolkadotApi(apiConfig); - await plugin.registerWebServices(expressApp); - await plugin.getOrCreateWebServices(); - rawWasm = await fs.readFile( - "packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/flipper.wasm", - ); - }); - const proofSize = 131072; - const refTime = 6219235328; - const gasLimit = { - refTime, - proofSize, - }; - test("deploy contract with pre-signed TX", async () => { - const result = apiClient.deployContractInk({ - wasm: rawWasm.toString("base64"), - metadata: JSON.stringify(metadata), - gasLimit: gasLimit, - storageDepositLimit: null, - salt: new Uint8Array().toString(), - web3SigningCredential: { type: Web3SigningCredentialType.None }, - params: [false], - }); - await expect(result).rejects.toHaveProperty(["response", "status"], 400); - }); - test("deploy contract using passing mnemonic string", async () => { - const result = await apiClient.deployContractInk({ - wasm: rawWasm.toString("base64"), - metadata: JSON.stringify(metadata), - gasLimit: gasLimit, - storageDepositLimit: null, - salt: new Uint8Array().toString(), - web3SigningCredential: { - type: Web3SigningCredentialType.MnemonicString, - mnemonic: "//Alice", - }, - params: [false], - }); - expect(result).toBeTruthy(); - expect(result.data.success).toBeTrue; - expect(result.data.contractAddress).toBeTruthy(); - }); - test("deploy contract using passing cactus keychain ref", async () => { - const result = await apiClient.deployContractInk({ - wasm: rawWasm.toString("base64"), - metadata: JSON.stringify(metadata), - gasLimit: gasLimit, - storageDepositLimit: null, - salt: new Uint8Array().toString(), - web3SigningCredential: { - type: Web3SigningCredentialType.CactusKeychainRef, - keychainEntryKey: keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - }, - params: [false], - }); - expect(result).toBeTruthy(); - expect(result.data.success).toBeTrue; - expect(result.data.contractAddress).toBeTruthy(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/integration/invoke-ink-contract.test.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/integration/invoke-ink-contract.test.ts deleted file mode 100644 index 1a8f60cfb2..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/integration/invoke-ink-contract.test.ts +++ /dev/null @@ -1,190 +0,0 @@ -import { - IListenOptions, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { SubstrateTestLedger } from "../../../../../cactus-test-tooling/src/main/typescript/substrate-test-ledger/substrate-test-ledger"; -import metadata from "../../rust/fixtures/ink/metadata.json"; -import fs from "fs-extra"; -import { v4 as uuidv4 } from "uuid"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import express from "express"; -import http from "http"; -import { - PluginLedgerConnectorPolkadot, - IPluginLedgerConnectorPolkadotOptions, - DefaultApi as PolkadotApi, - Web3SigningCredentialType, - PolkadotContractInvocationType, - PluginFactoryLedgerConnector, -} from "../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { AddressInfo } from "net"; -import { Configuration, PluginImportType } from "@hyperledger/cactus-core-api"; -import "jest-extended"; - -const testCase = "invoke contract with all invocation types"; -describe(testCase, () => { - const logLevel: LogLevelDesc = "TRACE"; - - const DEFAULT_WSPROVIDER = "ws://127.0.0.1:9944"; - const instanceId = "test-polkadot-connector"; - const ledgerOptions = { - publishAllPorts: false, - logLevel: logLevel, - emitContainerLogs: true, - }; - const ledger = new SubstrateTestLedger(ledgerOptions); - const expressApp = express(); - expressApp.use(express.json()); - expressApp.use(express.urlencoded({ extended: false })); - const server = http.createServer(expressApp); - let addressInfo: AddressInfo, - address: string, - port: number, - apiHost: string, - plugin: PluginLedgerConnectorPolkadot, - keychainEntryKey: string, - keychainEntryValue: string, - keychainPlugin: PluginKeychainMemory, - apiClient: PolkadotApi, - apiConfig: Configuration, - contractAddress: string; - - const proofSize = 131072; - const refTime = 6219235328; - const gasLimit = { - refTime, - proofSize, - }; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - afterAll(async () => { - await ledger.stop(); - await plugin.shutdownConnectionToSubstrate(); - }); - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - afterAll(async () => await Servers.shutdown(server)); - beforeAll(async () => { - const ledgerContainer = await ledger.start(); - expect(ledgerContainer).toBeTruthy(); - keychainEntryKey = uuidv4(); - keychainEntryValue = "//Bob"; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - const connectorOptions: IPluginLedgerConnectorPolkadotOptions = { - logLevel: logLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - wsProviderUrl: DEFAULT_WSPROVIDER, - instanceId: instanceId, - }; - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - plugin = await factory.create(connectorOptions); - await plugin.onPluginInit(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = await Servers.listen(listenOptions); - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new PolkadotApi(apiConfig); - await plugin.registerWebServices(expressApp); - await plugin.getOrCreateWebServices(); - }); - beforeAll(async () => { - const rawWasm = await fs.readFile( - "packages/cactus-plugin-ledger-connector-polkadot/src/test/rust/fixtures/ink/flipper.wasm", - ); - const result = await apiClient.deployContractInk({ - wasm: rawWasm.toString("base64"), - metadata: JSON.stringify(metadata), - gasLimit: gasLimit, - storageDepositLimit: null, - salt: new Uint8Array().toString(), - web3SigningCredential: { - type: Web3SigningCredentialType.MnemonicString, - mnemonic: "//Alice", - }, - params: [false], - }); - expect(result).toBeTruthy(); - expect(result.data.success).toBeTrue; - expect(result.data.contractAddress).toBeTruthy(); - if (!result.data.contractAddress) { - throw new Error("contract address cannot be undefined"); - } - contractAddress = result.data.contractAddress; - }); - test("invalid methodName contract invocation", async () => { - const result = apiClient.invokeContract({ - invocationType: PolkadotContractInvocationType.Send, - contractAddress, - gasLimit, - metadata: JSON.stringify(metadata), - methodName: "invalid", - accountAddress: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", //Alice account address - web3SigningCredential: { - type: Web3SigningCredentialType.CactusKeychainRef, - keychainEntryKey: keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - }, - }); - await expect(result).rejects.toHaveProperty(["response", "status"], 400); - }); - test("query ink! contract", async () => { - const result = await apiClient.invokeContract({ - invocationType: PolkadotContractInvocationType.Query, - contractAddress, - gasLimit, - metadata: JSON.stringify(metadata), - methodName: "get", - accountAddress: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", //Alice account address - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - }); - expect(result).toBeTruthy(); - expect(result.data.success).toBeTrue; - expect(result.data.callOutput).toBeTruthy(); - }); - test("flip() invocation", async () => { - const result = await apiClient.invokeContract({ - invocationType: PolkadotContractInvocationType.Send, - contractAddress, - gasLimit, - metadata: JSON.stringify(metadata), - methodName: "flip", - accountAddress: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", //Alice account address - web3SigningCredential: { - type: Web3SigningCredentialType.CactusKeychainRef, - keychainEntryKey: keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - }, - }); - expect(result).toBeTruthy(); - expect(result.data.success).toBeTrue; - expect(result.data.blockHash).toBeTruthy(); - expect(result.data.txHash).toBeTruthy(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/integration/run-transaction.test.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/integration/run-transaction.test.ts deleted file mode 100644 index 767674df6a..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/integration/run-transaction.test.ts +++ /dev/null @@ -1,260 +0,0 @@ -import { AddressInfo } from "net"; -import http from "http"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; - -import { - IListenOptions, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { Configuration, PluginImportType } from "@hyperledger/cactus-core-api"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - PluginLedgerConnectorPolkadot, - IPluginLedgerConnectorPolkadotOptions, - DefaultApi as PolkadotApi, - Web3SigningCredentialType, - PluginFactoryLedgerConnector, -} from "../../../main/typescript/public-api"; -import { K_CACTUS_POLKADOT_TOTAL_TX_COUNT } from "../../../main/typescript/prometheus-exporter/metrics"; -import { SubstrateTestLedger } from "../../../../../cactus-test-tooling/src/main/typescript/substrate-test-ledger/substrate-test-ledger"; - -describe("PluginLedgerConnectorPolkadot", () => { - const logLevel: LogLevelDesc = "TRACE"; - - const DEFAULT_WSPROVIDER = "ws://127.0.0.1:9944"; - const instanceId = "test-polkadot-connector"; - const ledgerOptions = { - publishAllPorts: false, - logLevel: "INFO" as LogLevelDesc, - emitContainerLogs: true, - }; - const ledger = new SubstrateTestLedger(ledgerOptions); - const expressApp = express(); - expressApp.use(express.json()); - expressApp.use(express.urlencoded({ extended: false })); - const server = http.createServer(expressApp); - let addressInfo: AddressInfo, - address: string, - port: number, - apiHost: string, - plugin: PluginLedgerConnectorPolkadot, - keychainEntryKey: string, - keychainEntryValue: string, - keychainPlugin: PluginKeychainMemory, - apiClient: PolkadotApi, - apiConfig: Configuration; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - - afterAll(async () => { - await ledger.stop(); - await plugin.shutdownConnectionToSubstrate(); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => await Servers.shutdown(server)); - - beforeAll(async () => { - const ledgerContainer = await ledger.start(); - expect(ledgerContainer).toBeTruthy(); - keychainEntryKey = uuidv4(); - keychainEntryValue = "//Alice"; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - - const connectorOptions: IPluginLedgerConnectorPolkadotOptions = { - logLevel: logLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - wsProviderUrl: DEFAULT_WSPROVIDER, - instanceId: instanceId, - }; - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - plugin = await factory.create(connectorOptions); - await plugin.onPluginInit(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = await Servers.listen(listenOptions); - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new PolkadotApi(apiConfig); - await plugin.registerWebServices(expressApp); - await plugin.getOrCreateWebServices(); - }); - - test("transact using pre-signed transaction", async () => { - const { Keyring } = await import("@polkadot/api"); - - const keyring = new Keyring({ type: "sr25519" }); - const alicePair = keyring.createFromUri("//Alice"); - const bobPair = keyring.createFromUri("//Bob"); - - const infoForSigningTransaction = await apiClient.getTransactionInfo({ - accountAddress: alicePair.address, - transactionExpiration: 500, - }); - expect(infoForSigningTransaction.status).toEqual(200); - const response = infoForSigningTransaction.data; - expect(response).toBeTruthy(); - const nonce = response.responseContainer.response_data.nonce; - expect(nonce).toBeTruthy(); - const blockHash = response.responseContainer.response_data.blockHash; - expect(blockHash).toBeTruthy(); - const era = response.responseContainer.response_data.era; - expect(era).toBeTruthy(); - - const signingOptions = { - nonce: nonce, - blockHash: blockHash, - era: era, - }; - - const transaction = await apiClient.getRawTransaction({ - to: bobPair.address, - value: 20, - }); - expect(transaction).toBeTruthy(); - expect( - transaction.data.responseContainer.response_data.rawTransaction, - ).toBeTruthy(); - const rawTransaction = - transaction.data.responseContainer.response_data.rawTransaction; - - const signedTransactionResponse = await apiClient.signRawTransaction({ - rawTransaction: rawTransaction, - mnemonic: "//Alice", - signingOptions, - }); - expect(signedTransactionResponse.data.success).toBeTrue(); - expect(signedTransactionResponse.data.signedTransaction).toBeTruthy(); - const signedTransaction = signedTransactionResponse.data.signedTransaction; - const TransactionDetails = await apiClient.runTransaction({ - web3SigningCredential: { type: Web3SigningCredentialType.None }, - transactionConfig: { - transferSubmittable: signedTransaction, - }, - }); - expect(TransactionDetails.status).toEqual(200); - const transactionResponse = TransactionDetails.data; - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.success).toBeTrue(); - expect(transactionResponse.txHash).toBeTruthy(); - expect(transactionResponse.blockHash).toBeTruthy(); - }); - - test("transact by omiting mnemonic string", async () => { - const { Keyring } = await import("@polkadot/api"); - - const keyring = new Keyring({ type: "sr25519" }); - const bobPair = keyring.createFromUri("//Bob"); - const TransactionDetails = apiClient.runTransaction({ - web3SigningCredential: { - type: Web3SigningCredentialType.MnemonicString, - mnemonic: "", - }, - transactionConfig: { - to: bobPair.address, - value: 30, - }, - }); - - await expect(TransactionDetails).rejects.toHaveProperty( - ["response", "status"], - 400, - ); - }); - - test("transact using passing mnemonic string", async () => { - const { Keyring } = await import("@polkadot/api"); - - const keyring = new Keyring({ type: "sr25519" }); - const bobPair = keyring.createFromUri("//Bob"); - const TransactionDetails = await apiClient.runTransaction({ - web3SigningCredential: { - type: Web3SigningCredentialType.MnemonicString, - mnemonic: "//Alice", - }, - transactionConfig: { - to: bobPair.address, - value: 30, - }, - }); - expect(TransactionDetails.status).toEqual(200); - const transactionResponse = TransactionDetails.data; - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.success).toBeTrue(); - expect(transactionResponse.txHash).toBeTruthy(); - expect(transactionResponse.blockHash).toBeTruthy(); - }); - - test("transact using passing cactus keychain ref", async () => { - const { Keyring } = await import("@polkadot/api"); - - const keyring = new Keyring({ type: "sr25519" }); - const bobPair = keyring.createFromUri("//Bob"); - const TransactionDetails = await apiClient.runTransaction({ - web3SigningCredential: { - type: Web3SigningCredentialType.CactusKeychainRef, - keychainEntryKey: keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - }, - transactionConfig: { - to: bobPair.address, - value: 30, - }, - }); - expect(TransactionDetails.status).toEqual(200); - const transactionResponse = TransactionDetails.data; - expect(transactionResponse).toBeTruthy(); - expect(transactionResponse.success).toBeTrue(); - expect(transactionResponse.txHash).toBeTruthy(); - expect(transactionResponse.blockHash).toBeTruthy(); - }); - - test("get prometheus exporter metrics", async () => { - const res = await apiClient.getPrometheusMetrics(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_POLKADOT_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTUS_POLKADOT_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTUS_POLKADOT_TOTAL_TX_COUNT + - '{type="' + - K_CACTUS_POLKADOT_TOTAL_TX_COUNT + - '"} 3'; - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data).toContain(promMetricsOutput); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 84b652f4a7..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import "jest-extended"; - -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/unit/constructor-instantiation.test.ts b/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/unit/constructor-instantiation.test.ts deleted file mode 100644 index 9ce0eb5370..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/src/test/typescript/unit/constructor-instantiation.test.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { PrometheusExporter } from "../../../main/typescript/prometheus-exporter/prometheus-exporter"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { SubstrateTestLedger } from "../../../../../cactus-test-tooling/src/main/typescript/substrate-test-ledger/substrate-test-ledger"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { - PluginLedgerConnectorPolkadot, - IPluginLedgerConnectorPolkadotOptions, - PluginFactoryLedgerConnector, -} from "../../../main/typescript"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import "jest-extended"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -const testCase = "Instantiate plugin"; -const logLevel: LogLevelDesc = "TRACE"; -const DEFAULT_WSPROVIDER = "ws://127.0.0.1:9944"; -const instanceId = "test-polkadot-connector"; -const prometheus: PrometheusExporter = new PrometheusExporter({ - pollingIntervalInMin: 1, -}); - -describe(testCase, () => { - let plugin: PluginLedgerConnectorPolkadot; - const connectorOptions: IPluginLedgerConnectorPolkadotOptions = { - logLevel: logLevel, - prometheusExporter: prometheus, - pluginRegistry: new PluginRegistry({ plugins: [] }), - wsProviderUrl: DEFAULT_WSPROVIDER, - instanceId: instanceId, - }; - const ledgerOptions = { - publishAllPorts: false, - logLevel: logLevel, - emitContainerLogs: true, - }; - const ledger = new SubstrateTestLedger(ledgerOptions); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - afterAll(async () => { - await ledger.stop(); - await plugin.shutdownConnectionToSubstrate(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - test(testCase, async () => { - await ledger.start(); - expect(ledger).toBeTruthy(); - plugin = await factory.create(connectorOptions); - await plugin.onPluginInit(); - await plugin.getOrCreateWebServices(); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-polkadot/tsconfig.json b/packages/cactus-plugin-ledger-connector-polkadot/tsconfig.json deleted file mode 100644 index 8d5d434fb1..0000000000 --- a/packages/cactus-plugin-ledger-connector-polkadot/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ledger-connector-polkadot.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/CHANGELOG.md b/packages/cactus-plugin-ledger-connector-sawtooth/CHANGELOG.md deleted file mode 100644 index 4e204326ef..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/CHANGELOG.md +++ /dev/null @@ -1,102 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-sawtooth - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-sawtooth - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-sawtooth - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-sawtooth - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Features - -* **cactus-plugin-ledger-connector-aries:** add new connector plugin ([afef5ae](https://github.com/hyperledger/cacti/commit/afef5ae3e2f36bf7f25928ee75f82bc4800b3172)), closes [#2946](https://github.com/hyperledger/cacti/issues/2946) -* **cactus-plugin-ledger-connector-sawtooth:** add new connector plugin ([e379504](https://github.com/hyperledger/cacti/commit/e37950403636a3fbc378fc7462b886294e6c7923)) diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/README.md b/packages/cactus-plugin-ledger-connector-sawtooth/README.md deleted file mode 100644 index 3ddd4a03d0..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# `@hyperledger/cactus-plugin-ledger-connector-sawtooth` - -This plugin provides `Cacti` a way to interact with Sawtooth networks. Using this we can perform: - -- Check plugin and sawtooth node status. -- Monitor new blocks and transactions on the ledger. - -## Summary - -- [`@hyperledger/cactus-plugin-ledger-connector-sawtooth`](#hyperledgercactus-plugin-ledger-connector-sawtooth) - - [Summary](#summary) - - [Getting Started](#getting-started) - - [Prerequisites](#prerequisites) - - [Usage](#usage) - - [SawtoothApiClient](#sawtoothapiclient) - - [REST Functions](#rest-functions) - - [Asynchronous Functions (socket.io)](#asynchronous-functions-socketio) - - [Running the tests](#running-the-tests) - - [Running the container](#running-the-container) - - [Contributing](#contributing) - - [License](#license) - - [Acknowledgments](#acknowledgments) - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project to install the dependencies execute the command: - -```sh -npm run configure -``` - -## Usage - -Before running the connector please ensure that Sawtooth node is running and that connector will have direct access to it. Access through a proxy is not supported yet (see https://sawtooth.hyperledger.org/docs/1.2/sysadmin_guide/rest_auth_proxy.html). -To use this import public-api and create new **PluginLedgerConnectorSawtooth**. - -```typescript -const connector = new PluginLedgerConnectorSawtooth({ - instanceId: uuidV4(), - logLevel: testLogLevel, - sawtoothRestApiEndpoint: ledgerRestApi, - watchBlocksPollTime, -}); -``` - -You can make calls through the connector to the plugin API: - -```typescript -async getStatus(): Promise -``` - -Please note that `deployContract()` and `transact()`, although available to call, **are not implemented and will throw error on runtime!** - -## SawtoothApiClient - -All connector API endpoints are defined in [open-api specification](./src/main/json/openapi.json). You can use [SawtoothApiClient](./src/main/typescript/api-client) to call remote sawtooth connector functions. It also contain additional utility functions to ease integration. - -### REST Functions - -See [DefaultApi](./src/main/typescript/generated/openapi/typescript-axios/api.ts) for up-to-date listing of supported endpoints. - -- getStatusV1 - -### Asynchronous Functions (socket.io) - -- watchBlocksV1 - -## Running the tests - -To check that all has been installed correctly and that the plugin has no errors run jest test suites. - -- Run this command at the project's root: - -```sh -npx jest cactus-plugin-ledger-connector-sawtooth -``` - -#### Running the container - -Launch container with plugin configuration as an **environment variable**: - -```sh -# FIXME -``` - -Launch container with plugin configuration as a **CLI argument**: - -```sh -# FIXME -``` - -Launch container with **configuration file** mounted from host machine: - -```sh -# FIXME -``` - -```sh -# FIXME -``` - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments -- This plugin uses Sawtooth REST API OpenAPI specification from https://sawtooth.hyperledger.org/docs/1.2/rest_api/openapi/. We did some changes to the original spec in order to simplify request handling (e.g. change type, mark fields as requried, etc...) diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/openapitools.json b/packages/cactus-plugin-ledger-connector-sawtooth/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/package.json b/packages/cactus-plugin-ledger-connector-sawtooth/package.json deleted file mode 100644 index 6ab2944826..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-ledger-connector-sawtooth", - "version": "2.0.0", - "description": "Allows Cactus nodes to connect to a Sawtooth ledger.", - "keywords": [ - "Hyperledger", - "Cacti", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-ledger-connector-sawtooth.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:sawtooth-axios": "openapi-generator-cli generate -i ./src/main/json/sawtooth-openapi.json -g typescript-axios -o ./src/main/typescript/sawtooth-api/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "cbor": "9.0.1", - "rxjs": "7.8.1", - "socket.io-client-fixed-types": "4.5.4" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/express": "5.0.0", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "socket.io": "4.6.2", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-ledger-connector-sawtooth.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-ledger-connector-sawtooth.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 2359ad743b..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,27 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_cacti_transaction_v1.go -model_cacti_transaction_v1_all_of.go -model_error_exception_response_v1.go -model_sawtooth_batch_header_v1.go -model_sawtooth_batch_v1.go -model_sawtooth_block_header_v1.go -model_sawtooth_block_v1.go -model_sawtooth_transaction_header_v1.go -model_sawtooth_transaction_v1.go -model_status_response_v1.go -model_watch_blocks_v1.go -model_watch_blocks_v1_cacti_transactions_response.go -model_watch_blocks_v1_full_response.go -model_watch_blocks_v1_listener_type.go -model_watch_blocks_v1_options.go -model_watch_blocks_v1_progress.go -model_watch_blocks_v1_transaction_filter.go -response.go -utils.go diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 06b4fc5c0a..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# Go API client for cactus-plugin-ledger-connector-sawtooth - -Can perform basic tasks on a Sawtooth ledger - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-ledger-connector-sawtooth "github.com/hyperledger/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-sawtooth.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-sawtooth.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-sawtooth.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-ledger-connector-sawtooth.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**GetStatusV1**](docs/DefaultApi.md#getstatusv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-sawtooth/status | Get the status of the connector and the sawtooth validator - - -## Documentation For Models - - - [CactiTransactionV1](docs/CactiTransactionV1.md) - - [CactiTransactionV1AllOf](docs/CactiTransactionV1AllOf.md) - - [ErrorExceptionResponseV1](docs/ErrorExceptionResponseV1.md) - - [SawtoothBatchHeaderV1](docs/SawtoothBatchHeaderV1.md) - - [SawtoothBatchV1](docs/SawtoothBatchV1.md) - - [SawtoothBlockHeaderV1](docs/SawtoothBlockHeaderV1.md) - - [SawtoothBlockV1](docs/SawtoothBlockV1.md) - - [SawtoothTransactionHeaderV1](docs/SawtoothTransactionHeaderV1.md) - - [SawtoothTransactionV1](docs/SawtoothTransactionV1.md) - - [StatusResponseV1](docs/StatusResponseV1.md) - - [WatchBlocksV1](docs/WatchBlocksV1.md) - - [WatchBlocksV1CactiTransactionsResponse](docs/WatchBlocksV1CactiTransactionsResponse.md) - - [WatchBlocksV1FullResponse](docs/WatchBlocksV1FullResponse.md) - - [WatchBlocksV1ListenerType](docs/WatchBlocksV1ListenerType.md) - - [WatchBlocksV1Options](docs/WatchBlocksV1Options.md) - - [WatchBlocksV1Progress](docs/WatchBlocksV1Progress.md) - - [WatchBlocksV1TransactionFilter](docs/WatchBlocksV1TransactionFilter.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index bf905d28d8..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,279 +0,0 @@ -openapi: 3.0.3 -info: - description: Can perform basic tasks on a Sawtooth ledger - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cacti Plugin - Connector Sawtooth - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-sawtooth/status: - get: - operationId: getStatusV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/StatusResponseV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Get the status of the connector and the sawtooth validator - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-sawtooth/status -components: - schemas: - SawtoothTransactionHeaderV1: - properties: - batcher_public_key: - example: 02d260a46457a064733153e09840c322bee1dff34445d7d49e19e60abd18fd0758 - type: string - dependencies: - items: - example: 1baee350bdb60bcee60e3d325d43283cf830b4c23b2cb17d3bb43935bd7af3761c2bee79847c72a9e396a9ae58f48add4e43f94eb83f84442c6085c1dd5d4dbe - type: string - type: array - family_name: - example: intkey - type: string - family_version: - example: "1.0" - type: string - inputs: - items: - example: 1cf12650d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c - type: string - type: array - nonce: - example: QAApS4L - type: string - outputs: - items: - example: 1cf12650d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c - type: string - type: array - payload_sha512: - example: fb6135ef73f4fe77367f9384b3bbbb158f4b8603c9d612157108e5c271868fce2242ee4abd7a29397ba63780c3ccab13783dfd4d9f0167beda03cdb0e37b87f4 - type: string - signer_public_key: - example: 038bba5708acc262464c9fe30d3de9e905a9a5fa30cedd151dd9cd09ea26d46d00 - type: string - required: - - batcher_public_key - - dependencies - - family_name - - family_version - - inputs - - nonce - - outputs - - payload_sha512 - - signer_public_key - SawtoothTransactionV1: - properties: - header: - $ref: '#/components/schemas/SawtoothTransactionHeaderV1' - header_signature: - example: 540a6803971d1880ec73a96cb97815a95d374cbad5d865925e5aa0432fcf1931539afe10310c122c5eaae15df61236079abbf4f258889359c4d175516934484a - type: string - payload: - type: string - required: - - header - - header_signature - - payload - SawtoothBatchHeaderV1: - properties: - signer_public_key: - example: 038bba5708acc262464c9fe30d3de9e905a9a5fa30cedd151dd9cd09ea26d46d00 - type: string - transaction_ids: - items: - example: 540a6803971d1880ec73a96cb97815a95d374cbad5d865925e5aa0432fcf1931539afe10310c122c5eaae15df61236079abbf4f258889359c4d175516934484a - type: string - type: array - required: - - signer_public_key - - transaction_ids - SawtoothBatchV1: - properties: - header: - $ref: '#/components/schemas/SawtoothBatchHeaderV1' - header_signature: - example: 89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c - type: string - transactions: - items: - $ref: '#/components/schemas/SawtoothTransactionV1' - type: array - required: - - header - - header_signature - - transactions - SawtoothBlockHeaderV1: - properties: - block_num: - example: 12345 - type: integer - previous_block_id: - example: 65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd - type: string - signer_public_key: - example: 02d260a46457a064733153e09840c322bee1dff34445d7d49e19e60abd18fd0758 - type: string - batch_ids: - items: - example: 89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c - type: string - type: array - consensus: - type: string - state_root_hash: - example: 708ca7fbb701799bb387f2e50deaca402e8502abe229f705693d2d4f350e1ad6 - type: string - required: - - batch_ids - - block_num - - consensus - - previous_block_id - - signer_public_key - - state_root_hash - SawtoothBlockV1: - properties: - header: - $ref: '#/components/schemas/SawtoothBlockHeaderV1' - header_signature: - example: 65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd - type: string - batches: - items: - $ref: '#/components/schemas/SawtoothBatchV1' - type: array - required: - - batches - - header - - header_signature - CactiTransactionV1: - allOf: - - $ref: '#/components/schemas/SawtoothTransactionV1' - - $ref: '#/components/schemas/CactiTransactionV1_allOf' - description: Sawtooth transaction with additional fields filled by Cacti connector. - type: object - WatchBlocksV1: - enum: - - org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Subscribe - - org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Next - - org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Unsubscribe - - org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Error - - org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Complete - type: string - x-enum-varnames: - - Subscribe - - Next - - Unsubscribe - - Error - - Complete - WatchBlocksV1ListenerType: - description: "Response type from WatchBlocks. 'Cacti*' are custom views, others\ - \ correspond to plain sawtooth data." - enum: - - full - - cacti:transactions - type: string - x-enum-varnames: - - Full - - CactiTransactions - WatchBlocksV1TransactionFilter: - properties: - family_name: - type: string - type: object - WatchBlocksV1Options: - properties: - type: - $ref: '#/components/schemas/WatchBlocksV1ListenerType' - txFilterBy: - $ref: '#/components/schemas/WatchBlocksV1TransactionFilter' - type: object - WatchBlocksV1CactiTransactionsResponse: - description: Custom response containing block transactions summary. - properties: - cactiTransactionsEvents: - description: List of sawtooth transactions matching specifid (optional) - filter - items: - $ref: '#/components/schemas/CactiTransactionV1' - type: array - required: - - cactiTransactionsEvents - type: object - WatchBlocksV1FullResponse: - description: Response that returns entire sawtooth block. - properties: - fullBlock: - $ref: '#/components/schemas/SawtoothBlockV1' - required: - - fullBlock - type: object - WatchBlocksV1Progress: - description: Response block from WatchBlocks endpoint. Depends on 'type' passed - in subscription options. - oneOf: - - $ref: '#/components/schemas/WatchBlocksV1CactiTransactionsResponse' - - $ref: '#/components/schemas/WatchBlocksV1FullResponse' - StatusResponseV1: - description: Response with plugin and validator status report. - example: - openApiSpecVersion: openApiSpecVersion - sawtoothStatus: "" - instanceId: instanceId - initialized: true - properties: - instanceId: - description: Plugin instance id. - nullable: false - type: string - openApiSpecVersion: - description: Version of connectors Open API Spec. - nullable: false - type: string - initialized: - description: "True if endpoints were created, false otherwise" - nullable: false - type: boolean - sawtoothStatus: - description: Response from sawtooth Rest API status endpoint - nullable: false - required: - - instanceId - type: object - ErrorExceptionResponseV1: - properties: - message: - nullable: false - type: string - error: - nullable: false - type: string - required: - - error - - message - type: object - CactiTransactionV1_allOf: - properties: - payload_decoded: - description: Decoded payload of sawtooth transaction. - example: "[{'Verb':'inc','Name':'monitorTest3','Value':11}]}]" - required: - - payload_decoded - type: object - example: null diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 66b0e173c7..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,130 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiGetStatusV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetStatusV1Request) Execute() (*StatusResponseV1, *http.Response, error) { - return r.ApiService.GetStatusV1Execute(r) -} - -/* -GetStatusV1 Get the status of the connector and the sawtooth validator - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetStatusV1Request -*/ -func (a *DefaultApiService) GetStatusV1(ctx context.Context) ApiGetStatusV1Request { - return ApiGetStatusV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return StatusResponseV1 -func (a *DefaultApiService) GetStatusV1Execute(r ApiGetStatusV1Request) (*StatusResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *StatusResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetStatusV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-sawtooth/status" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 9ddcb54e76..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cacti Plugin - Connector Sawtooth API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 66c7ded92a..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 205d553563..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_cacti_transaction_v1.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_cacti_transaction_v1.go deleted file mode 100644 index c324476071..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_cacti_transaction_v1.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the CactiTransactionV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CactiTransactionV1{} - -// CactiTransactionV1 Sawtooth transaction with additional fields filled by Cacti connector. -type CactiTransactionV1 struct { - Header SawtoothTransactionHeaderV1 `json:"header"` - HeaderSignature string `json:"header_signature"` - Payload string `json:"payload"` - // Decoded payload of sawtooth transaction. - PayloadDecoded interface{} `json:"payload_decoded"` -} - -// NewCactiTransactionV1 instantiates a new CactiTransactionV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCactiTransactionV1(header SawtoothTransactionHeaderV1, headerSignature string, payload string, payloadDecoded interface{}) *CactiTransactionV1 { - this := CactiTransactionV1{} - this.Header = header - this.HeaderSignature = headerSignature - this.Payload = payload - this.PayloadDecoded = payloadDecoded - return &this -} - -// NewCactiTransactionV1WithDefaults instantiates a new CactiTransactionV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCactiTransactionV1WithDefaults() *CactiTransactionV1 { - this := CactiTransactionV1{} - return &this -} - -// GetHeader returns the Header field value -func (o *CactiTransactionV1) GetHeader() SawtoothTransactionHeaderV1 { - if o == nil { - var ret SawtoothTransactionHeaderV1 - return ret - } - - return o.Header -} - -// GetHeaderOk returns a tuple with the Header field value -// and a boolean to check if the value has been set. -func (o *CactiTransactionV1) GetHeaderOk() (*SawtoothTransactionHeaderV1, bool) { - if o == nil { - return nil, false - } - return &o.Header, true -} - -// SetHeader sets field value -func (o *CactiTransactionV1) SetHeader(v SawtoothTransactionHeaderV1) { - o.Header = v -} - -// GetHeaderSignature returns the HeaderSignature field value -func (o *CactiTransactionV1) GetHeaderSignature() string { - if o == nil { - var ret string - return ret - } - - return o.HeaderSignature -} - -// GetHeaderSignatureOk returns a tuple with the HeaderSignature field value -// and a boolean to check if the value has been set. -func (o *CactiTransactionV1) GetHeaderSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HeaderSignature, true -} - -// SetHeaderSignature sets field value -func (o *CactiTransactionV1) SetHeaderSignature(v string) { - o.HeaderSignature = v -} - -// GetPayload returns the Payload field value -func (o *CactiTransactionV1) GetPayload() string { - if o == nil { - var ret string - return ret - } - - return o.Payload -} - -// GetPayloadOk returns a tuple with the Payload field value -// and a boolean to check if the value has been set. -func (o *CactiTransactionV1) GetPayloadOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Payload, true -} - -// SetPayload sets field value -func (o *CactiTransactionV1) SetPayload(v string) { - o.Payload = v -} - -// GetPayloadDecoded returns the PayloadDecoded field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *CactiTransactionV1) GetPayloadDecoded() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.PayloadDecoded -} - -// GetPayloadDecodedOk returns a tuple with the PayloadDecoded field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CactiTransactionV1) GetPayloadDecodedOk() (*interface{}, bool) { - if o == nil || IsNil(o.PayloadDecoded) { - return nil, false - } - return &o.PayloadDecoded, true -} - -// SetPayloadDecoded sets field value -func (o *CactiTransactionV1) SetPayloadDecoded(v interface{}) { - o.PayloadDecoded = v -} - -func (o CactiTransactionV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CactiTransactionV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["header"] = o.Header - toSerialize["header_signature"] = o.HeaderSignature - toSerialize["payload"] = o.Payload - if o.PayloadDecoded != nil { - toSerialize["payload_decoded"] = o.PayloadDecoded - } - return toSerialize, nil -} - -type NullableCactiTransactionV1 struct { - value *CactiTransactionV1 - isSet bool -} - -func (v NullableCactiTransactionV1) Get() *CactiTransactionV1 { - return v.value -} - -func (v *NullableCactiTransactionV1) Set(val *CactiTransactionV1) { - v.value = val - v.isSet = true -} - -func (v NullableCactiTransactionV1) IsSet() bool { - return v.isSet -} - -func (v *NullableCactiTransactionV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCactiTransactionV1(val *CactiTransactionV1) *NullableCactiTransactionV1 { - return &NullableCactiTransactionV1{value: val, isSet: true} -} - -func (v NullableCactiTransactionV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCactiTransactionV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_cacti_transaction_v1_all_of.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_cacti_transaction_v1_all_of.go deleted file mode 100644 index fa3260e37b..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_cacti_transaction_v1_all_of.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the CactiTransactionV1AllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CactiTransactionV1AllOf{} - -// CactiTransactionV1AllOf struct for CactiTransactionV1AllOf -type CactiTransactionV1AllOf struct { - // Decoded payload of sawtooth transaction. - PayloadDecoded interface{} `json:"payload_decoded"` -} - -// NewCactiTransactionV1AllOf instantiates a new CactiTransactionV1AllOf object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCactiTransactionV1AllOf(payloadDecoded interface{}) *CactiTransactionV1AllOf { - this := CactiTransactionV1AllOf{} - this.PayloadDecoded = payloadDecoded - return &this -} - -// NewCactiTransactionV1AllOfWithDefaults instantiates a new CactiTransactionV1AllOf object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCactiTransactionV1AllOfWithDefaults() *CactiTransactionV1AllOf { - this := CactiTransactionV1AllOf{} - return &this -} - -// GetPayloadDecoded returns the PayloadDecoded field value -// If the value is explicit nil, the zero value for interface{} will be returned -func (o *CactiTransactionV1AllOf) GetPayloadDecoded() interface{} { - if o == nil { - var ret interface{} - return ret - } - - return o.PayloadDecoded -} - -// GetPayloadDecodedOk returns a tuple with the PayloadDecoded field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CactiTransactionV1AllOf) GetPayloadDecodedOk() (*interface{}, bool) { - if o == nil || IsNil(o.PayloadDecoded) { - return nil, false - } - return &o.PayloadDecoded, true -} - -// SetPayloadDecoded sets field value -func (o *CactiTransactionV1AllOf) SetPayloadDecoded(v interface{}) { - o.PayloadDecoded = v -} - -func (o CactiTransactionV1AllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CactiTransactionV1AllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.PayloadDecoded != nil { - toSerialize["payload_decoded"] = o.PayloadDecoded - } - return toSerialize, nil -} - -type NullableCactiTransactionV1AllOf struct { - value *CactiTransactionV1AllOf - isSet bool -} - -func (v NullableCactiTransactionV1AllOf) Get() *CactiTransactionV1AllOf { - return v.value -} - -func (v *NullableCactiTransactionV1AllOf) Set(val *CactiTransactionV1AllOf) { - v.value = val - v.isSet = true -} - -func (v NullableCactiTransactionV1AllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableCactiTransactionV1AllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCactiTransactionV1AllOf(val *CactiTransactionV1AllOf) *NullableCactiTransactionV1AllOf { - return &NullableCactiTransactionV1AllOf{value: val, isSet: true} -} - -func (v NullableCactiTransactionV1AllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCactiTransactionV1AllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go deleted file mode 100644 index 702ea339cf..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the ErrorExceptionResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorExceptionResponseV1{} - -// ErrorExceptionResponseV1 struct for ErrorExceptionResponseV1 -type ErrorExceptionResponseV1 struct { - Message string `json:"message"` - Error string `json:"error"` -} - -// NewErrorExceptionResponseV1 instantiates a new ErrorExceptionResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorExceptionResponseV1(message string, error_ string) *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - this.Message = message - this.Error = error_ - return &this -} - -// NewErrorExceptionResponseV1WithDefaults instantiates a new ErrorExceptionResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorExceptionResponseV1WithDefaults() *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - return &this -} - -// GetMessage returns the Message field value -func (o *ErrorExceptionResponseV1) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ErrorExceptionResponseV1) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -func (o *ErrorExceptionResponseV1) GetError() string { - if o == nil { - var ret string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ErrorExceptionResponseV1) SetError(v string) { - o.Error = v -} - -func (o ErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorExceptionResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error - return toSerialize, nil -} - -type NullableErrorExceptionResponseV1 struct { - value *ErrorExceptionResponseV1 - isSet bool -} - -func (v NullableErrorExceptionResponseV1) Get() *ErrorExceptionResponseV1 { - return v.value -} - -func (v *NullableErrorExceptionResponseV1) Set(val *ErrorExceptionResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableErrorExceptionResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorExceptionResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorExceptionResponseV1(val *ErrorExceptionResponseV1) *NullableErrorExceptionResponseV1 { - return &NullableErrorExceptionResponseV1{value: val, isSet: true} -} - -func (v NullableErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorExceptionResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_batch_header_v1.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_batch_header_v1.go deleted file mode 100644 index 954a9ba319..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_batch_header_v1.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the SawtoothBatchHeaderV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SawtoothBatchHeaderV1{} - -// SawtoothBatchHeaderV1 struct for SawtoothBatchHeaderV1 -type SawtoothBatchHeaderV1 struct { - SignerPublicKey string `json:"signer_public_key"` - TransactionIds []string `json:"transaction_ids"` -} - -// NewSawtoothBatchHeaderV1 instantiates a new SawtoothBatchHeaderV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSawtoothBatchHeaderV1(signerPublicKey string, transactionIds []string) *SawtoothBatchHeaderV1 { - this := SawtoothBatchHeaderV1{} - this.SignerPublicKey = signerPublicKey - this.TransactionIds = transactionIds - return &this -} - -// NewSawtoothBatchHeaderV1WithDefaults instantiates a new SawtoothBatchHeaderV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSawtoothBatchHeaderV1WithDefaults() *SawtoothBatchHeaderV1 { - this := SawtoothBatchHeaderV1{} - return &this -} - -// GetSignerPublicKey returns the SignerPublicKey field value -func (o *SawtoothBatchHeaderV1) GetSignerPublicKey() string { - if o == nil { - var ret string - return ret - } - - return o.SignerPublicKey -} - -// GetSignerPublicKeyOk returns a tuple with the SignerPublicKey field value -// and a boolean to check if the value has been set. -func (o *SawtoothBatchHeaderV1) GetSignerPublicKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SignerPublicKey, true -} - -// SetSignerPublicKey sets field value -func (o *SawtoothBatchHeaderV1) SetSignerPublicKey(v string) { - o.SignerPublicKey = v -} - -// GetTransactionIds returns the TransactionIds field value -func (o *SawtoothBatchHeaderV1) GetTransactionIds() []string { - if o == nil { - var ret []string - return ret - } - - return o.TransactionIds -} - -// GetTransactionIdsOk returns a tuple with the TransactionIds field value -// and a boolean to check if the value has been set. -func (o *SawtoothBatchHeaderV1) GetTransactionIdsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.TransactionIds, true -} - -// SetTransactionIds sets field value -func (o *SawtoothBatchHeaderV1) SetTransactionIds(v []string) { - o.TransactionIds = v -} - -func (o SawtoothBatchHeaderV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SawtoothBatchHeaderV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["signer_public_key"] = o.SignerPublicKey - toSerialize["transaction_ids"] = o.TransactionIds - return toSerialize, nil -} - -type NullableSawtoothBatchHeaderV1 struct { - value *SawtoothBatchHeaderV1 - isSet bool -} - -func (v NullableSawtoothBatchHeaderV1) Get() *SawtoothBatchHeaderV1 { - return v.value -} - -func (v *NullableSawtoothBatchHeaderV1) Set(val *SawtoothBatchHeaderV1) { - v.value = val - v.isSet = true -} - -func (v NullableSawtoothBatchHeaderV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSawtoothBatchHeaderV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSawtoothBatchHeaderV1(val *SawtoothBatchHeaderV1) *NullableSawtoothBatchHeaderV1 { - return &NullableSawtoothBatchHeaderV1{value: val, isSet: true} -} - -func (v NullableSawtoothBatchHeaderV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSawtoothBatchHeaderV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_batch_v1.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_batch_v1.go deleted file mode 100644 index 4034f3457b..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_batch_v1.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the SawtoothBatchV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SawtoothBatchV1{} - -// SawtoothBatchV1 struct for SawtoothBatchV1 -type SawtoothBatchV1 struct { - Header SawtoothBatchHeaderV1 `json:"header"` - HeaderSignature string `json:"header_signature"` - Transactions []SawtoothTransactionV1 `json:"transactions"` -} - -// NewSawtoothBatchV1 instantiates a new SawtoothBatchV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSawtoothBatchV1(header SawtoothBatchHeaderV1, headerSignature string, transactions []SawtoothTransactionV1) *SawtoothBatchV1 { - this := SawtoothBatchV1{} - this.Header = header - this.HeaderSignature = headerSignature - this.Transactions = transactions - return &this -} - -// NewSawtoothBatchV1WithDefaults instantiates a new SawtoothBatchV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSawtoothBatchV1WithDefaults() *SawtoothBatchV1 { - this := SawtoothBatchV1{} - return &this -} - -// GetHeader returns the Header field value -func (o *SawtoothBatchV1) GetHeader() SawtoothBatchHeaderV1 { - if o == nil { - var ret SawtoothBatchHeaderV1 - return ret - } - - return o.Header -} - -// GetHeaderOk returns a tuple with the Header field value -// and a boolean to check if the value has been set. -func (o *SawtoothBatchV1) GetHeaderOk() (*SawtoothBatchHeaderV1, bool) { - if o == nil { - return nil, false - } - return &o.Header, true -} - -// SetHeader sets field value -func (o *SawtoothBatchV1) SetHeader(v SawtoothBatchHeaderV1) { - o.Header = v -} - -// GetHeaderSignature returns the HeaderSignature field value -func (o *SawtoothBatchV1) GetHeaderSignature() string { - if o == nil { - var ret string - return ret - } - - return o.HeaderSignature -} - -// GetHeaderSignatureOk returns a tuple with the HeaderSignature field value -// and a boolean to check if the value has been set. -func (o *SawtoothBatchV1) GetHeaderSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HeaderSignature, true -} - -// SetHeaderSignature sets field value -func (o *SawtoothBatchV1) SetHeaderSignature(v string) { - o.HeaderSignature = v -} - -// GetTransactions returns the Transactions field value -func (o *SawtoothBatchV1) GetTransactions() []SawtoothTransactionV1 { - if o == nil { - var ret []SawtoothTransactionV1 - return ret - } - - return o.Transactions -} - -// GetTransactionsOk returns a tuple with the Transactions field value -// and a boolean to check if the value has been set. -func (o *SawtoothBatchV1) GetTransactionsOk() ([]SawtoothTransactionV1, bool) { - if o == nil { - return nil, false - } - return o.Transactions, true -} - -// SetTransactions sets field value -func (o *SawtoothBatchV1) SetTransactions(v []SawtoothTransactionV1) { - o.Transactions = v -} - -func (o SawtoothBatchV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SawtoothBatchV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["header"] = o.Header - toSerialize["header_signature"] = o.HeaderSignature - toSerialize["transactions"] = o.Transactions - return toSerialize, nil -} - -type NullableSawtoothBatchV1 struct { - value *SawtoothBatchV1 - isSet bool -} - -func (v NullableSawtoothBatchV1) Get() *SawtoothBatchV1 { - return v.value -} - -func (v *NullableSawtoothBatchV1) Set(val *SawtoothBatchV1) { - v.value = val - v.isSet = true -} - -func (v NullableSawtoothBatchV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSawtoothBatchV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSawtoothBatchV1(val *SawtoothBatchV1) *NullableSawtoothBatchV1 { - return &NullableSawtoothBatchV1{value: val, isSet: true} -} - -func (v NullableSawtoothBatchV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSawtoothBatchV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_block_header_v1.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_block_header_v1.go deleted file mode 100644 index 8efd1d54c8..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_block_header_v1.go +++ /dev/null @@ -1,252 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the SawtoothBlockHeaderV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SawtoothBlockHeaderV1{} - -// SawtoothBlockHeaderV1 struct for SawtoothBlockHeaderV1 -type SawtoothBlockHeaderV1 struct { - BlockNum int32 `json:"block_num"` - PreviousBlockId string `json:"previous_block_id"` - SignerPublicKey string `json:"signer_public_key"` - BatchIds []string `json:"batch_ids"` - Consensus string `json:"consensus"` - StateRootHash string `json:"state_root_hash"` -} - -// NewSawtoothBlockHeaderV1 instantiates a new SawtoothBlockHeaderV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSawtoothBlockHeaderV1(blockNum int32, previousBlockId string, signerPublicKey string, batchIds []string, consensus string, stateRootHash string) *SawtoothBlockHeaderV1 { - this := SawtoothBlockHeaderV1{} - this.BlockNum = blockNum - this.PreviousBlockId = previousBlockId - this.SignerPublicKey = signerPublicKey - this.BatchIds = batchIds - this.Consensus = consensus - this.StateRootHash = stateRootHash - return &this -} - -// NewSawtoothBlockHeaderV1WithDefaults instantiates a new SawtoothBlockHeaderV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSawtoothBlockHeaderV1WithDefaults() *SawtoothBlockHeaderV1 { - this := SawtoothBlockHeaderV1{} - return &this -} - -// GetBlockNum returns the BlockNum field value -func (o *SawtoothBlockHeaderV1) GetBlockNum() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.BlockNum -} - -// GetBlockNumOk returns a tuple with the BlockNum field value -// and a boolean to check if the value has been set. -func (o *SawtoothBlockHeaderV1) GetBlockNumOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.BlockNum, true -} - -// SetBlockNum sets field value -func (o *SawtoothBlockHeaderV1) SetBlockNum(v int32) { - o.BlockNum = v -} - -// GetPreviousBlockId returns the PreviousBlockId field value -func (o *SawtoothBlockHeaderV1) GetPreviousBlockId() string { - if o == nil { - var ret string - return ret - } - - return o.PreviousBlockId -} - -// GetPreviousBlockIdOk returns a tuple with the PreviousBlockId field value -// and a boolean to check if the value has been set. -func (o *SawtoothBlockHeaderV1) GetPreviousBlockIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PreviousBlockId, true -} - -// SetPreviousBlockId sets field value -func (o *SawtoothBlockHeaderV1) SetPreviousBlockId(v string) { - o.PreviousBlockId = v -} - -// GetSignerPublicKey returns the SignerPublicKey field value -func (o *SawtoothBlockHeaderV1) GetSignerPublicKey() string { - if o == nil { - var ret string - return ret - } - - return o.SignerPublicKey -} - -// GetSignerPublicKeyOk returns a tuple with the SignerPublicKey field value -// and a boolean to check if the value has been set. -func (o *SawtoothBlockHeaderV1) GetSignerPublicKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SignerPublicKey, true -} - -// SetSignerPublicKey sets field value -func (o *SawtoothBlockHeaderV1) SetSignerPublicKey(v string) { - o.SignerPublicKey = v -} - -// GetBatchIds returns the BatchIds field value -func (o *SawtoothBlockHeaderV1) GetBatchIds() []string { - if o == nil { - var ret []string - return ret - } - - return o.BatchIds -} - -// GetBatchIdsOk returns a tuple with the BatchIds field value -// and a boolean to check if the value has been set. -func (o *SawtoothBlockHeaderV1) GetBatchIdsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.BatchIds, true -} - -// SetBatchIds sets field value -func (o *SawtoothBlockHeaderV1) SetBatchIds(v []string) { - o.BatchIds = v -} - -// GetConsensus returns the Consensus field value -func (o *SawtoothBlockHeaderV1) GetConsensus() string { - if o == nil { - var ret string - return ret - } - - return o.Consensus -} - -// GetConsensusOk returns a tuple with the Consensus field value -// and a boolean to check if the value has been set. -func (o *SawtoothBlockHeaderV1) GetConsensusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Consensus, true -} - -// SetConsensus sets field value -func (o *SawtoothBlockHeaderV1) SetConsensus(v string) { - o.Consensus = v -} - -// GetStateRootHash returns the StateRootHash field value -func (o *SawtoothBlockHeaderV1) GetStateRootHash() string { - if o == nil { - var ret string - return ret - } - - return o.StateRootHash -} - -// GetStateRootHashOk returns a tuple with the StateRootHash field value -// and a boolean to check if the value has been set. -func (o *SawtoothBlockHeaderV1) GetStateRootHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StateRootHash, true -} - -// SetStateRootHash sets field value -func (o *SawtoothBlockHeaderV1) SetStateRootHash(v string) { - o.StateRootHash = v -} - -func (o SawtoothBlockHeaderV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SawtoothBlockHeaderV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["block_num"] = o.BlockNum - toSerialize["previous_block_id"] = o.PreviousBlockId - toSerialize["signer_public_key"] = o.SignerPublicKey - toSerialize["batch_ids"] = o.BatchIds - toSerialize["consensus"] = o.Consensus - toSerialize["state_root_hash"] = o.StateRootHash - return toSerialize, nil -} - -type NullableSawtoothBlockHeaderV1 struct { - value *SawtoothBlockHeaderV1 - isSet bool -} - -func (v NullableSawtoothBlockHeaderV1) Get() *SawtoothBlockHeaderV1 { - return v.value -} - -func (v *NullableSawtoothBlockHeaderV1) Set(val *SawtoothBlockHeaderV1) { - v.value = val - v.isSet = true -} - -func (v NullableSawtoothBlockHeaderV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSawtoothBlockHeaderV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSawtoothBlockHeaderV1(val *SawtoothBlockHeaderV1) *NullableSawtoothBlockHeaderV1 { - return &NullableSawtoothBlockHeaderV1{value: val, isSet: true} -} - -func (v NullableSawtoothBlockHeaderV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSawtoothBlockHeaderV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_block_v1.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_block_v1.go deleted file mode 100644 index 031c0fe563..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_block_v1.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the SawtoothBlockV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SawtoothBlockV1{} - -// SawtoothBlockV1 struct for SawtoothBlockV1 -type SawtoothBlockV1 struct { - Header SawtoothBlockHeaderV1 `json:"header"` - HeaderSignature string `json:"header_signature"` - Batches []SawtoothBatchV1 `json:"batches"` -} - -// NewSawtoothBlockV1 instantiates a new SawtoothBlockV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSawtoothBlockV1(header SawtoothBlockHeaderV1, headerSignature string, batches []SawtoothBatchV1) *SawtoothBlockV1 { - this := SawtoothBlockV1{} - this.Header = header - this.HeaderSignature = headerSignature - this.Batches = batches - return &this -} - -// NewSawtoothBlockV1WithDefaults instantiates a new SawtoothBlockV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSawtoothBlockV1WithDefaults() *SawtoothBlockV1 { - this := SawtoothBlockV1{} - return &this -} - -// GetHeader returns the Header field value -func (o *SawtoothBlockV1) GetHeader() SawtoothBlockHeaderV1 { - if o == nil { - var ret SawtoothBlockHeaderV1 - return ret - } - - return o.Header -} - -// GetHeaderOk returns a tuple with the Header field value -// and a boolean to check if the value has been set. -func (o *SawtoothBlockV1) GetHeaderOk() (*SawtoothBlockHeaderV1, bool) { - if o == nil { - return nil, false - } - return &o.Header, true -} - -// SetHeader sets field value -func (o *SawtoothBlockV1) SetHeader(v SawtoothBlockHeaderV1) { - o.Header = v -} - -// GetHeaderSignature returns the HeaderSignature field value -func (o *SawtoothBlockV1) GetHeaderSignature() string { - if o == nil { - var ret string - return ret - } - - return o.HeaderSignature -} - -// GetHeaderSignatureOk returns a tuple with the HeaderSignature field value -// and a boolean to check if the value has been set. -func (o *SawtoothBlockV1) GetHeaderSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HeaderSignature, true -} - -// SetHeaderSignature sets field value -func (o *SawtoothBlockV1) SetHeaderSignature(v string) { - o.HeaderSignature = v -} - -// GetBatches returns the Batches field value -func (o *SawtoothBlockV1) GetBatches() []SawtoothBatchV1 { - if o == nil { - var ret []SawtoothBatchV1 - return ret - } - - return o.Batches -} - -// GetBatchesOk returns a tuple with the Batches field value -// and a boolean to check if the value has been set. -func (o *SawtoothBlockV1) GetBatchesOk() ([]SawtoothBatchV1, bool) { - if o == nil { - return nil, false - } - return o.Batches, true -} - -// SetBatches sets field value -func (o *SawtoothBlockV1) SetBatches(v []SawtoothBatchV1) { - o.Batches = v -} - -func (o SawtoothBlockV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SawtoothBlockV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["header"] = o.Header - toSerialize["header_signature"] = o.HeaderSignature - toSerialize["batches"] = o.Batches - return toSerialize, nil -} - -type NullableSawtoothBlockV1 struct { - value *SawtoothBlockV1 - isSet bool -} - -func (v NullableSawtoothBlockV1) Get() *SawtoothBlockV1 { - return v.value -} - -func (v *NullableSawtoothBlockV1) Set(val *SawtoothBlockV1) { - v.value = val - v.isSet = true -} - -func (v NullableSawtoothBlockV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSawtoothBlockV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSawtoothBlockV1(val *SawtoothBlockV1) *NullableSawtoothBlockV1 { - return &NullableSawtoothBlockV1{value: val, isSet: true} -} - -func (v NullableSawtoothBlockV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSawtoothBlockV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_transaction_header_v1.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_transaction_header_v1.go deleted file mode 100644 index 86f4c5fd02..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_transaction_header_v1.go +++ /dev/null @@ -1,333 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the SawtoothTransactionHeaderV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SawtoothTransactionHeaderV1{} - -// SawtoothTransactionHeaderV1 struct for SawtoothTransactionHeaderV1 -type SawtoothTransactionHeaderV1 struct { - BatcherPublicKey string `json:"batcher_public_key"` - Dependencies []string `json:"dependencies"` - FamilyName string `json:"family_name"` - FamilyVersion string `json:"family_version"` - Inputs []string `json:"inputs"` - Nonce string `json:"nonce"` - Outputs []string `json:"outputs"` - PayloadSha512 string `json:"payload_sha512"` - SignerPublicKey string `json:"signer_public_key"` -} - -// NewSawtoothTransactionHeaderV1 instantiates a new SawtoothTransactionHeaderV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSawtoothTransactionHeaderV1(batcherPublicKey string, dependencies []string, familyName string, familyVersion string, inputs []string, nonce string, outputs []string, payloadSha512 string, signerPublicKey string) *SawtoothTransactionHeaderV1 { - this := SawtoothTransactionHeaderV1{} - this.BatcherPublicKey = batcherPublicKey - this.Dependencies = dependencies - this.FamilyName = familyName - this.FamilyVersion = familyVersion - this.Inputs = inputs - this.Nonce = nonce - this.Outputs = outputs - this.PayloadSha512 = payloadSha512 - this.SignerPublicKey = signerPublicKey - return &this -} - -// NewSawtoothTransactionHeaderV1WithDefaults instantiates a new SawtoothTransactionHeaderV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSawtoothTransactionHeaderV1WithDefaults() *SawtoothTransactionHeaderV1 { - this := SawtoothTransactionHeaderV1{} - return &this -} - -// GetBatcherPublicKey returns the BatcherPublicKey field value -func (o *SawtoothTransactionHeaderV1) GetBatcherPublicKey() string { - if o == nil { - var ret string - return ret - } - - return o.BatcherPublicKey -} - -// GetBatcherPublicKeyOk returns a tuple with the BatcherPublicKey field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionHeaderV1) GetBatcherPublicKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BatcherPublicKey, true -} - -// SetBatcherPublicKey sets field value -func (o *SawtoothTransactionHeaderV1) SetBatcherPublicKey(v string) { - o.BatcherPublicKey = v -} - -// GetDependencies returns the Dependencies field value -func (o *SawtoothTransactionHeaderV1) GetDependencies() []string { - if o == nil { - var ret []string - return ret - } - - return o.Dependencies -} - -// GetDependenciesOk returns a tuple with the Dependencies field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionHeaderV1) GetDependenciesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Dependencies, true -} - -// SetDependencies sets field value -func (o *SawtoothTransactionHeaderV1) SetDependencies(v []string) { - o.Dependencies = v -} - -// GetFamilyName returns the FamilyName field value -func (o *SawtoothTransactionHeaderV1) GetFamilyName() string { - if o == nil { - var ret string - return ret - } - - return o.FamilyName -} - -// GetFamilyNameOk returns a tuple with the FamilyName field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionHeaderV1) GetFamilyNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FamilyName, true -} - -// SetFamilyName sets field value -func (o *SawtoothTransactionHeaderV1) SetFamilyName(v string) { - o.FamilyName = v -} - -// GetFamilyVersion returns the FamilyVersion field value -func (o *SawtoothTransactionHeaderV1) GetFamilyVersion() string { - if o == nil { - var ret string - return ret - } - - return o.FamilyVersion -} - -// GetFamilyVersionOk returns a tuple with the FamilyVersion field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionHeaderV1) GetFamilyVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FamilyVersion, true -} - -// SetFamilyVersion sets field value -func (o *SawtoothTransactionHeaderV1) SetFamilyVersion(v string) { - o.FamilyVersion = v -} - -// GetInputs returns the Inputs field value -func (o *SawtoothTransactionHeaderV1) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionHeaderV1) GetInputsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Inputs, true -} - -// SetInputs sets field value -func (o *SawtoothTransactionHeaderV1) SetInputs(v []string) { - o.Inputs = v -} - -// GetNonce returns the Nonce field value -func (o *SawtoothTransactionHeaderV1) GetNonce() string { - if o == nil { - var ret string - return ret - } - - return o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionHeaderV1) GetNonceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Nonce, true -} - -// SetNonce sets field value -func (o *SawtoothTransactionHeaderV1) SetNonce(v string) { - o.Nonce = v -} - -// GetOutputs returns the Outputs field value -func (o *SawtoothTransactionHeaderV1) GetOutputs() []string { - if o == nil { - var ret []string - return ret - } - - return o.Outputs -} - -// GetOutputsOk returns a tuple with the Outputs field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionHeaderV1) GetOutputsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Outputs, true -} - -// SetOutputs sets field value -func (o *SawtoothTransactionHeaderV1) SetOutputs(v []string) { - o.Outputs = v -} - -// GetPayloadSha512 returns the PayloadSha512 field value -func (o *SawtoothTransactionHeaderV1) GetPayloadSha512() string { - if o == nil { - var ret string - return ret - } - - return o.PayloadSha512 -} - -// GetPayloadSha512Ok returns a tuple with the PayloadSha512 field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionHeaderV1) GetPayloadSha512Ok() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PayloadSha512, true -} - -// SetPayloadSha512 sets field value -func (o *SawtoothTransactionHeaderV1) SetPayloadSha512(v string) { - o.PayloadSha512 = v -} - -// GetSignerPublicKey returns the SignerPublicKey field value -func (o *SawtoothTransactionHeaderV1) GetSignerPublicKey() string { - if o == nil { - var ret string - return ret - } - - return o.SignerPublicKey -} - -// GetSignerPublicKeyOk returns a tuple with the SignerPublicKey field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionHeaderV1) GetSignerPublicKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SignerPublicKey, true -} - -// SetSignerPublicKey sets field value -func (o *SawtoothTransactionHeaderV1) SetSignerPublicKey(v string) { - o.SignerPublicKey = v -} - -func (o SawtoothTransactionHeaderV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SawtoothTransactionHeaderV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["batcher_public_key"] = o.BatcherPublicKey - toSerialize["dependencies"] = o.Dependencies - toSerialize["family_name"] = o.FamilyName - toSerialize["family_version"] = o.FamilyVersion - toSerialize["inputs"] = o.Inputs - toSerialize["nonce"] = o.Nonce - toSerialize["outputs"] = o.Outputs - toSerialize["payload_sha512"] = o.PayloadSha512 - toSerialize["signer_public_key"] = o.SignerPublicKey - return toSerialize, nil -} - -type NullableSawtoothTransactionHeaderV1 struct { - value *SawtoothTransactionHeaderV1 - isSet bool -} - -func (v NullableSawtoothTransactionHeaderV1) Get() *SawtoothTransactionHeaderV1 { - return v.value -} - -func (v *NullableSawtoothTransactionHeaderV1) Set(val *SawtoothTransactionHeaderV1) { - v.value = val - v.isSet = true -} - -func (v NullableSawtoothTransactionHeaderV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSawtoothTransactionHeaderV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSawtoothTransactionHeaderV1(val *SawtoothTransactionHeaderV1) *NullableSawtoothTransactionHeaderV1 { - return &NullableSawtoothTransactionHeaderV1{value: val, isSet: true} -} - -func (v NullableSawtoothTransactionHeaderV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSawtoothTransactionHeaderV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_transaction_v1.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_transaction_v1.go deleted file mode 100644 index f5de1ba438..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_sawtooth_transaction_v1.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the SawtoothTransactionV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SawtoothTransactionV1{} - -// SawtoothTransactionV1 struct for SawtoothTransactionV1 -type SawtoothTransactionV1 struct { - Header SawtoothTransactionHeaderV1 `json:"header"` - HeaderSignature string `json:"header_signature"` - Payload string `json:"payload"` -} - -// NewSawtoothTransactionV1 instantiates a new SawtoothTransactionV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSawtoothTransactionV1(header SawtoothTransactionHeaderV1, headerSignature string, payload string) *SawtoothTransactionV1 { - this := SawtoothTransactionV1{} - this.Header = header - this.HeaderSignature = headerSignature - this.Payload = payload - return &this -} - -// NewSawtoothTransactionV1WithDefaults instantiates a new SawtoothTransactionV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSawtoothTransactionV1WithDefaults() *SawtoothTransactionV1 { - this := SawtoothTransactionV1{} - return &this -} - -// GetHeader returns the Header field value -func (o *SawtoothTransactionV1) GetHeader() SawtoothTransactionHeaderV1 { - if o == nil { - var ret SawtoothTransactionHeaderV1 - return ret - } - - return o.Header -} - -// GetHeaderOk returns a tuple with the Header field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionV1) GetHeaderOk() (*SawtoothTransactionHeaderV1, bool) { - if o == nil { - return nil, false - } - return &o.Header, true -} - -// SetHeader sets field value -func (o *SawtoothTransactionV1) SetHeader(v SawtoothTransactionHeaderV1) { - o.Header = v -} - -// GetHeaderSignature returns the HeaderSignature field value -func (o *SawtoothTransactionV1) GetHeaderSignature() string { - if o == nil { - var ret string - return ret - } - - return o.HeaderSignature -} - -// GetHeaderSignatureOk returns a tuple with the HeaderSignature field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionV1) GetHeaderSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HeaderSignature, true -} - -// SetHeaderSignature sets field value -func (o *SawtoothTransactionV1) SetHeaderSignature(v string) { - o.HeaderSignature = v -} - -// GetPayload returns the Payload field value -func (o *SawtoothTransactionV1) GetPayload() string { - if o == nil { - var ret string - return ret - } - - return o.Payload -} - -// GetPayloadOk returns a tuple with the Payload field value -// and a boolean to check if the value has been set. -func (o *SawtoothTransactionV1) GetPayloadOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Payload, true -} - -// SetPayload sets field value -func (o *SawtoothTransactionV1) SetPayload(v string) { - o.Payload = v -} - -func (o SawtoothTransactionV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SawtoothTransactionV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["header"] = o.Header - toSerialize["header_signature"] = o.HeaderSignature - toSerialize["payload"] = o.Payload - return toSerialize, nil -} - -type NullableSawtoothTransactionV1 struct { - value *SawtoothTransactionV1 - isSet bool -} - -func (v NullableSawtoothTransactionV1) Get() *SawtoothTransactionV1 { - return v.value -} - -func (v *NullableSawtoothTransactionV1) Set(val *SawtoothTransactionV1) { - v.value = val - v.isSet = true -} - -func (v NullableSawtoothTransactionV1) IsSet() bool { - return v.isSet -} - -func (v *NullableSawtoothTransactionV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSawtoothTransactionV1(val *SawtoothTransactionV1) *NullableSawtoothTransactionV1 { - return &NullableSawtoothTransactionV1{value: val, isSet: true} -} - -func (v NullableSawtoothTransactionV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSawtoothTransactionV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_status_response_v1.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_status_response_v1.go deleted file mode 100644 index 00303209f8..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_status_response_v1.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the StatusResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StatusResponseV1{} - -// StatusResponseV1 Response with plugin and validator status report. -type StatusResponseV1 struct { - // Plugin instance id. - InstanceId string `json:"instanceId"` - // Version of connectors Open API Spec. - OpenApiSpecVersion *string `json:"openApiSpecVersion,omitempty"` - // True if endpoints were created, false otherwise - Initialized *bool `json:"initialized,omitempty"` - // Response from sawtooth Rest API status endpoint - SawtoothStatus interface{} `json:"sawtoothStatus,omitempty"` -} - -// NewStatusResponseV1 instantiates a new StatusResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStatusResponseV1(instanceId string) *StatusResponseV1 { - this := StatusResponseV1{} - this.InstanceId = instanceId - return &this -} - -// NewStatusResponseV1WithDefaults instantiates a new StatusResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStatusResponseV1WithDefaults() *StatusResponseV1 { - this := StatusResponseV1{} - return &this -} - -// GetInstanceId returns the InstanceId field value -func (o *StatusResponseV1) GetInstanceId() string { - if o == nil { - var ret string - return ret - } - - return o.InstanceId -} - -// GetInstanceIdOk returns a tuple with the InstanceId field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.InstanceId, true -} - -// SetInstanceId sets field value -func (o *StatusResponseV1) SetInstanceId(v string) { - o.InstanceId = v -} - -// GetOpenApiSpecVersion returns the OpenApiSpecVersion field value if set, zero value otherwise. -func (o *StatusResponseV1) GetOpenApiSpecVersion() string { - if o == nil || IsNil(o.OpenApiSpecVersion) { - var ret string - return ret - } - return *o.OpenApiSpecVersion -} - -// GetOpenApiSpecVersionOk returns a tuple with the OpenApiSpecVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetOpenApiSpecVersionOk() (*string, bool) { - if o == nil || IsNil(o.OpenApiSpecVersion) { - return nil, false - } - return o.OpenApiSpecVersion, true -} - -// HasOpenApiSpecVersion returns a boolean if a field has been set. -func (o *StatusResponseV1) HasOpenApiSpecVersion() bool { - if o != nil && !IsNil(o.OpenApiSpecVersion) { - return true - } - - return false -} - -// SetOpenApiSpecVersion gets a reference to the given string and assigns it to the OpenApiSpecVersion field. -func (o *StatusResponseV1) SetOpenApiSpecVersion(v string) { - o.OpenApiSpecVersion = &v -} - -// GetInitialized returns the Initialized field value if set, zero value otherwise. -func (o *StatusResponseV1) GetInitialized() bool { - if o == nil || IsNil(o.Initialized) { - var ret bool - return ret - } - return *o.Initialized -} - -// GetInitializedOk returns a tuple with the Initialized field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetInitializedOk() (*bool, bool) { - if o == nil || IsNil(o.Initialized) { - return nil, false - } - return o.Initialized, true -} - -// HasInitialized returns a boolean if a field has been set. -func (o *StatusResponseV1) HasInitialized() bool { - if o != nil && !IsNil(o.Initialized) { - return true - } - - return false -} - -// SetInitialized gets a reference to the given bool and assigns it to the Initialized field. -func (o *StatusResponseV1) SetInitialized(v bool) { - o.Initialized = &v -} - -// GetSawtoothStatus returns the SawtoothStatus field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *StatusResponseV1) GetSawtoothStatus() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.SawtoothStatus -} - -// GetSawtoothStatusOk returns a tuple with the SawtoothStatus field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *StatusResponseV1) GetSawtoothStatusOk() (*interface{}, bool) { - if o == nil || IsNil(o.SawtoothStatus) { - return nil, false - } - return &o.SawtoothStatus, true -} - -// HasSawtoothStatus returns a boolean if a field has been set. -func (o *StatusResponseV1) HasSawtoothStatus() bool { - if o != nil && IsNil(o.SawtoothStatus) { - return true - } - - return false -} - -// SetSawtoothStatus gets a reference to the given interface{} and assigns it to the SawtoothStatus field. -func (o *StatusResponseV1) SetSawtoothStatus(v interface{}) { - o.SawtoothStatus = v -} - -func (o StatusResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StatusResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["instanceId"] = o.InstanceId - if !IsNil(o.OpenApiSpecVersion) { - toSerialize["openApiSpecVersion"] = o.OpenApiSpecVersion - } - if !IsNil(o.Initialized) { - toSerialize["initialized"] = o.Initialized - } - if o.SawtoothStatus != nil { - toSerialize["sawtoothStatus"] = o.SawtoothStatus - } - return toSerialize, nil -} - -type NullableStatusResponseV1 struct { - value *StatusResponseV1 - isSet bool -} - -func (v NullableStatusResponseV1) Get() *StatusResponseV1 { - return v.value -} - -func (v *NullableStatusResponseV1) Set(val *StatusResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableStatusResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableStatusResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStatusResponseV1(val *StatusResponseV1) *NullableStatusResponseV1 { - return &NullableStatusResponseV1{value: val, isSet: true} -} - -func (v NullableStatusResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStatusResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go deleted file mode 100644 index ddee5ae093..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksV1 the model 'WatchBlocksV1' -type WatchBlocksV1 string - -// List of WatchBlocksV1 -const ( - Subscribe WatchBlocksV1 = "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Subscribe" - Next WatchBlocksV1 = "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Next" - Unsubscribe WatchBlocksV1 = "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Unsubscribe" - Error WatchBlocksV1 = "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Error" - Complete WatchBlocksV1 = "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Complete" -) - -// All allowed values of WatchBlocksV1 enum -var AllowedWatchBlocksV1EnumValues = []WatchBlocksV1{ - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Subscribe", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Next", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Error", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Complete", -} - -func (v *WatchBlocksV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := WatchBlocksV1(value) - for _, existing := range AllowedWatchBlocksV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WatchBlocksV1", value) -} - -// NewWatchBlocksV1FromValue returns a pointer to a valid WatchBlocksV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWatchBlocksV1FromValue(v string) (*WatchBlocksV1, error) { - ev := WatchBlocksV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WatchBlocksV1: valid values are %v", v, AllowedWatchBlocksV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v WatchBlocksV1) IsValid() bool { - for _, existing := range AllowedWatchBlocksV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WatchBlocksV1 value -func (v WatchBlocksV1) Ptr() *WatchBlocksV1 { - return &v -} - -type NullableWatchBlocksV1 struct { - value *WatchBlocksV1 - isSet bool -} - -func (v NullableWatchBlocksV1) Get() *WatchBlocksV1 { - return v.value -} - -func (v *NullableWatchBlocksV1) Set(val *WatchBlocksV1) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1(val *WatchBlocksV1) *NullableWatchBlocksV1 { - return &NullableWatchBlocksV1{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_cacti_transactions_response.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_cacti_transactions_response.go deleted file mode 100644 index 991d4df160..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_cacti_transactions_response.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the WatchBlocksV1CactiTransactionsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksV1CactiTransactionsResponse{} - -// WatchBlocksV1CactiTransactionsResponse Custom response containing block transactions summary. -type WatchBlocksV1CactiTransactionsResponse struct { - // List of sawtooth transactions matching specifid (optional) filter - CactiTransactionsEvents []CactiTransactionV1 `json:"cactiTransactionsEvents"` -} - -// NewWatchBlocksV1CactiTransactionsResponse instantiates a new WatchBlocksV1CactiTransactionsResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksV1CactiTransactionsResponse(cactiTransactionsEvents []CactiTransactionV1) *WatchBlocksV1CactiTransactionsResponse { - this := WatchBlocksV1CactiTransactionsResponse{} - this.CactiTransactionsEvents = cactiTransactionsEvents - return &this -} - -// NewWatchBlocksV1CactiTransactionsResponseWithDefaults instantiates a new WatchBlocksV1CactiTransactionsResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksV1CactiTransactionsResponseWithDefaults() *WatchBlocksV1CactiTransactionsResponse { - this := WatchBlocksV1CactiTransactionsResponse{} - return &this -} - -// GetCactiTransactionsEvents returns the CactiTransactionsEvents field value -func (o *WatchBlocksV1CactiTransactionsResponse) GetCactiTransactionsEvents() []CactiTransactionV1 { - if o == nil { - var ret []CactiTransactionV1 - return ret - } - - return o.CactiTransactionsEvents -} - -// GetCactiTransactionsEventsOk returns a tuple with the CactiTransactionsEvents field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1CactiTransactionsResponse) GetCactiTransactionsEventsOk() ([]CactiTransactionV1, bool) { - if o == nil { - return nil, false - } - return o.CactiTransactionsEvents, true -} - -// SetCactiTransactionsEvents sets field value -func (o *WatchBlocksV1CactiTransactionsResponse) SetCactiTransactionsEvents(v []CactiTransactionV1) { - o.CactiTransactionsEvents = v -} - -func (o WatchBlocksV1CactiTransactionsResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksV1CactiTransactionsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cactiTransactionsEvents"] = o.CactiTransactionsEvents - return toSerialize, nil -} - -type NullableWatchBlocksV1CactiTransactionsResponse struct { - value *WatchBlocksV1CactiTransactionsResponse - isSet bool -} - -func (v NullableWatchBlocksV1CactiTransactionsResponse) Get() *WatchBlocksV1CactiTransactionsResponse { - return v.value -} - -func (v *NullableWatchBlocksV1CactiTransactionsResponse) Set(val *WatchBlocksV1CactiTransactionsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1CactiTransactionsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1CactiTransactionsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1CactiTransactionsResponse(val *WatchBlocksV1CactiTransactionsResponse) *NullableWatchBlocksV1CactiTransactionsResponse { - return &NullableWatchBlocksV1CactiTransactionsResponse{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1CactiTransactionsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1CactiTransactionsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_full_response.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_full_response.go deleted file mode 100644 index 042a810fc8..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_full_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the WatchBlocksV1FullResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksV1FullResponse{} - -// WatchBlocksV1FullResponse Response that returns entire sawtooth block. -type WatchBlocksV1FullResponse struct { - FullBlock SawtoothBlockV1 `json:"fullBlock"` -} - -// NewWatchBlocksV1FullResponse instantiates a new WatchBlocksV1FullResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksV1FullResponse(fullBlock SawtoothBlockV1) *WatchBlocksV1FullResponse { - this := WatchBlocksV1FullResponse{} - this.FullBlock = fullBlock - return &this -} - -// NewWatchBlocksV1FullResponseWithDefaults instantiates a new WatchBlocksV1FullResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksV1FullResponseWithDefaults() *WatchBlocksV1FullResponse { - this := WatchBlocksV1FullResponse{} - return &this -} - -// GetFullBlock returns the FullBlock field value -func (o *WatchBlocksV1FullResponse) GetFullBlock() SawtoothBlockV1 { - if o == nil { - var ret SawtoothBlockV1 - return ret - } - - return o.FullBlock -} - -// GetFullBlockOk returns a tuple with the FullBlock field value -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1FullResponse) GetFullBlockOk() (*SawtoothBlockV1, bool) { - if o == nil { - return nil, false - } - return &o.FullBlock, true -} - -// SetFullBlock sets field value -func (o *WatchBlocksV1FullResponse) SetFullBlock(v SawtoothBlockV1) { - o.FullBlock = v -} - -func (o WatchBlocksV1FullResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksV1FullResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["fullBlock"] = o.FullBlock - return toSerialize, nil -} - -type NullableWatchBlocksV1FullResponse struct { - value *WatchBlocksV1FullResponse - isSet bool -} - -func (v NullableWatchBlocksV1FullResponse) Get() *WatchBlocksV1FullResponse { - return v.value -} - -func (v *NullableWatchBlocksV1FullResponse) Set(val *WatchBlocksV1FullResponse) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1FullResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1FullResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1FullResponse(val *WatchBlocksV1FullResponse) *NullableWatchBlocksV1FullResponse { - return &NullableWatchBlocksV1FullResponse{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1FullResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1FullResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_listener_type.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_listener_type.go deleted file mode 100644 index 63cfc18120..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_listener_type.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksV1ListenerType Response type from WatchBlocks. 'Cacti*' are custom views, others correspond to plain sawtooth data. -type WatchBlocksV1ListenerType string - -// List of WatchBlocksV1ListenerType -const ( - Full WatchBlocksV1ListenerType = "full" - CactiTransactions WatchBlocksV1ListenerType = "cacti:transactions" -) - -// All allowed values of WatchBlocksV1ListenerType enum -var AllowedWatchBlocksV1ListenerTypeEnumValues = []WatchBlocksV1ListenerType{ - "full", - "cacti:transactions", -} - -func (v *WatchBlocksV1ListenerType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := WatchBlocksV1ListenerType(value) - for _, existing := range AllowedWatchBlocksV1ListenerTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WatchBlocksV1ListenerType", value) -} - -// NewWatchBlocksV1ListenerTypeFromValue returns a pointer to a valid WatchBlocksV1ListenerType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWatchBlocksV1ListenerTypeFromValue(v string) (*WatchBlocksV1ListenerType, error) { - ev := WatchBlocksV1ListenerType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WatchBlocksV1ListenerType: valid values are %v", v, AllowedWatchBlocksV1ListenerTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v WatchBlocksV1ListenerType) IsValid() bool { - for _, existing := range AllowedWatchBlocksV1ListenerTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WatchBlocksV1ListenerType value -func (v WatchBlocksV1ListenerType) Ptr() *WatchBlocksV1ListenerType { - return &v -} - -type NullableWatchBlocksV1ListenerType struct { - value *WatchBlocksV1ListenerType - isSet bool -} - -func (v NullableWatchBlocksV1ListenerType) Get() *WatchBlocksV1ListenerType { - return v.value -} - -func (v *NullableWatchBlocksV1ListenerType) Set(val *WatchBlocksV1ListenerType) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1ListenerType) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1ListenerType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1ListenerType(val *WatchBlocksV1ListenerType) *NullableWatchBlocksV1ListenerType { - return &NullableWatchBlocksV1ListenerType{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1ListenerType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1ListenerType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_options.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_options.go deleted file mode 100644 index 462e8e9e06..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_options.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the WatchBlocksV1Options type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksV1Options{} - -// WatchBlocksV1Options struct for WatchBlocksV1Options -type WatchBlocksV1Options struct { - Type *WatchBlocksV1ListenerType `json:"type,omitempty"` - TxFilterBy *WatchBlocksV1TransactionFilter `json:"txFilterBy,omitempty"` -} - -// NewWatchBlocksV1Options instantiates a new WatchBlocksV1Options object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksV1Options() *WatchBlocksV1Options { - this := WatchBlocksV1Options{} - return &this -} - -// NewWatchBlocksV1OptionsWithDefaults instantiates a new WatchBlocksV1Options object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksV1OptionsWithDefaults() *WatchBlocksV1Options { - this := WatchBlocksV1Options{} - return &this -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *WatchBlocksV1Options) GetType() WatchBlocksV1ListenerType { - if o == nil || IsNil(o.Type) { - var ret WatchBlocksV1ListenerType - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1Options) GetTypeOk() (*WatchBlocksV1ListenerType, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *WatchBlocksV1Options) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given WatchBlocksV1ListenerType and assigns it to the Type field. -func (o *WatchBlocksV1Options) SetType(v WatchBlocksV1ListenerType) { - o.Type = &v -} - -// GetTxFilterBy returns the TxFilterBy field value if set, zero value otherwise. -func (o *WatchBlocksV1Options) GetTxFilterBy() WatchBlocksV1TransactionFilter { - if o == nil || IsNil(o.TxFilterBy) { - var ret WatchBlocksV1TransactionFilter - return ret - } - return *o.TxFilterBy -} - -// GetTxFilterByOk returns a tuple with the TxFilterBy field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1Options) GetTxFilterByOk() (*WatchBlocksV1TransactionFilter, bool) { - if o == nil || IsNil(o.TxFilterBy) { - return nil, false - } - return o.TxFilterBy, true -} - -// HasTxFilterBy returns a boolean if a field has been set. -func (o *WatchBlocksV1Options) HasTxFilterBy() bool { - if o != nil && !IsNil(o.TxFilterBy) { - return true - } - - return false -} - -// SetTxFilterBy gets a reference to the given WatchBlocksV1TransactionFilter and assigns it to the TxFilterBy field. -func (o *WatchBlocksV1Options) SetTxFilterBy(v WatchBlocksV1TransactionFilter) { - o.TxFilterBy = &v -} - -func (o WatchBlocksV1Options) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksV1Options) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !IsNil(o.TxFilterBy) { - toSerialize["txFilterBy"] = o.TxFilterBy - } - return toSerialize, nil -} - -type NullableWatchBlocksV1Options struct { - value *WatchBlocksV1Options - isSet bool -} - -func (v NullableWatchBlocksV1Options) Get() *WatchBlocksV1Options { - return v.value -} - -func (v *NullableWatchBlocksV1Options) Set(val *WatchBlocksV1Options) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1Options) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1Options) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1Options(val *WatchBlocksV1Options) *NullableWatchBlocksV1Options { - return &NullableWatchBlocksV1Options{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1Options) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1Options) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_progress.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_progress.go deleted file mode 100644 index b3625aecad..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_progress.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" - "fmt" -) - -// WatchBlocksV1Progress - Response block from WatchBlocks endpoint. Depends on 'type' passed in subscription options. -type WatchBlocksV1Progress struct { - WatchBlocksV1CactiTransactionsResponse *WatchBlocksV1CactiTransactionsResponse - WatchBlocksV1FullResponse *WatchBlocksV1FullResponse -} - -// WatchBlocksV1CactiTransactionsResponseAsWatchBlocksV1Progress is a convenience function that returns WatchBlocksV1CactiTransactionsResponse wrapped in WatchBlocksV1Progress -func WatchBlocksV1CactiTransactionsResponseAsWatchBlocksV1Progress(v *WatchBlocksV1CactiTransactionsResponse) WatchBlocksV1Progress { - return WatchBlocksV1Progress{ - WatchBlocksV1CactiTransactionsResponse: v, - } -} - -// WatchBlocksV1FullResponseAsWatchBlocksV1Progress is a convenience function that returns WatchBlocksV1FullResponse wrapped in WatchBlocksV1Progress -func WatchBlocksV1FullResponseAsWatchBlocksV1Progress(v *WatchBlocksV1FullResponse) WatchBlocksV1Progress { - return WatchBlocksV1Progress{ - WatchBlocksV1FullResponse: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *WatchBlocksV1Progress) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into WatchBlocksV1CactiTransactionsResponse - err = newStrictDecoder(data).Decode(&dst.WatchBlocksV1CactiTransactionsResponse) - if err == nil { - jsonWatchBlocksV1CactiTransactionsResponse, _ := json.Marshal(dst.WatchBlocksV1CactiTransactionsResponse) - if string(jsonWatchBlocksV1CactiTransactionsResponse) == "{}" { // empty struct - dst.WatchBlocksV1CactiTransactionsResponse = nil - } else { - match++ - } - } else { - dst.WatchBlocksV1CactiTransactionsResponse = nil - } - - // try to unmarshal data into WatchBlocksV1FullResponse - err = newStrictDecoder(data).Decode(&dst.WatchBlocksV1FullResponse) - if err == nil { - jsonWatchBlocksV1FullResponse, _ := json.Marshal(dst.WatchBlocksV1FullResponse) - if string(jsonWatchBlocksV1FullResponse) == "{}" { // empty struct - dst.WatchBlocksV1FullResponse = nil - } else { - match++ - } - } else { - dst.WatchBlocksV1FullResponse = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.WatchBlocksV1CactiTransactionsResponse = nil - dst.WatchBlocksV1FullResponse = nil - - return fmt.Errorf("data matches more than one schema in oneOf(WatchBlocksV1Progress)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(WatchBlocksV1Progress)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src WatchBlocksV1Progress) MarshalJSON() ([]byte, error) { - if src.WatchBlocksV1CactiTransactionsResponse != nil { - return json.Marshal(&src.WatchBlocksV1CactiTransactionsResponse) - } - - if src.WatchBlocksV1FullResponse != nil { - return json.Marshal(&src.WatchBlocksV1FullResponse) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *WatchBlocksV1Progress) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.WatchBlocksV1CactiTransactionsResponse != nil { - return obj.WatchBlocksV1CactiTransactionsResponse - } - - if obj.WatchBlocksV1FullResponse != nil { - return obj.WatchBlocksV1FullResponse - } - - // all schemas are nil - return nil -} - -type NullableWatchBlocksV1Progress struct { - value *WatchBlocksV1Progress - isSet bool -} - -func (v NullableWatchBlocksV1Progress) Get() *WatchBlocksV1Progress { - return v.value -} - -func (v *NullableWatchBlocksV1Progress) Set(val *WatchBlocksV1Progress) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1Progress) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1Progress) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1Progress(val *WatchBlocksV1Progress) *NullableWatchBlocksV1Progress { - return &NullableWatchBlocksV1Progress{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1Progress) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1Progress) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_transaction_filter.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_transaction_filter.go deleted file mode 100644 index daa1ee495c..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/model_watch_blocks_v1_transaction_filter.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" -) - -// checks if the WatchBlocksV1TransactionFilter type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WatchBlocksV1TransactionFilter{} - -// WatchBlocksV1TransactionFilter struct for WatchBlocksV1TransactionFilter -type WatchBlocksV1TransactionFilter struct { - FamilyName *string `json:"family_name,omitempty"` -} - -// NewWatchBlocksV1TransactionFilter instantiates a new WatchBlocksV1TransactionFilter object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWatchBlocksV1TransactionFilter() *WatchBlocksV1TransactionFilter { - this := WatchBlocksV1TransactionFilter{} - return &this -} - -// NewWatchBlocksV1TransactionFilterWithDefaults instantiates a new WatchBlocksV1TransactionFilter object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWatchBlocksV1TransactionFilterWithDefaults() *WatchBlocksV1TransactionFilter { - this := WatchBlocksV1TransactionFilter{} - return &this -} - -// GetFamilyName returns the FamilyName field value if set, zero value otherwise. -func (o *WatchBlocksV1TransactionFilter) GetFamilyName() string { - if o == nil || IsNil(o.FamilyName) { - var ret string - return ret - } - return *o.FamilyName -} - -// GetFamilyNameOk returns a tuple with the FamilyName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WatchBlocksV1TransactionFilter) GetFamilyNameOk() (*string, bool) { - if o == nil || IsNil(o.FamilyName) { - return nil, false - } - return o.FamilyName, true -} - -// HasFamilyName returns a boolean if a field has been set. -func (o *WatchBlocksV1TransactionFilter) HasFamilyName() bool { - if o != nil && !IsNil(o.FamilyName) { - return true - } - - return false -} - -// SetFamilyName gets a reference to the given string and assigns it to the FamilyName field. -func (o *WatchBlocksV1TransactionFilter) SetFamilyName(v string) { - o.FamilyName = &v -} - -func (o WatchBlocksV1TransactionFilter) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WatchBlocksV1TransactionFilter) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.FamilyName) { - toSerialize["family_name"] = o.FamilyName - } - return toSerialize, nil -} - -type NullableWatchBlocksV1TransactionFilter struct { - value *WatchBlocksV1TransactionFilter - isSet bool -} - -func (v NullableWatchBlocksV1TransactionFilter) Get() *WatchBlocksV1TransactionFilter { - return v.value -} - -func (v *NullableWatchBlocksV1TransactionFilter) Set(val *WatchBlocksV1TransactionFilter) { - v.value = val - v.isSet = true -} - -func (v NullableWatchBlocksV1TransactionFilter) IsSet() bool { - return v.isSet -} - -func (v *NullableWatchBlocksV1TransactionFilter) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWatchBlocksV1TransactionFilter(val *WatchBlocksV1TransactionFilter) *NullableWatchBlocksV1TransactionFilter { - return &NullableWatchBlocksV1TransactionFilter{value: val, isSet: true} -} - -func (v NullableWatchBlocksV1TransactionFilter) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWatchBlocksV1TransactionFilter) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 1dd4efd660..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 4fa452aa30..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-ledger-connector-sawtooth_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService GetStatusV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetStatusV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 3e0a55cf90..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cacti Plugin - Connector Sawtooth - -Can perform basic tasks on a Sawtooth ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-sawtooth - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/json/openapi.json deleted file mode 100644 index bb5e99fa46..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/json/openapi.json +++ /dev/null @@ -1,363 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector Sawtooth", - "description": "Can perform basic tasks on a Sawtooth ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "SawtoothTransactionHeaderV1": { - "required": [ - "batcher_public_key", - "dependencies", - "family_name", - "family_version", - "inputs", - "nonce", - "outputs", - "payload_sha512", - "signer_public_key" - ], - "properties": { - "batcher_public_key": { - "type": "string", - "example": "02d260a46457a064733153e09840c322bee1dff34445d7d49e19e60abd18fd0758" - }, - "dependencies": { - "type": "array", - "items": { - "type": "string", - "example": "1baee350bdb60bcee60e3d325d43283cf830b4c23b2cb17d3bb43935bd7af3761c2bee79847c72a9e396a9ae58f48add4e43f94eb83f84442c6085c1dd5d4dbe" - } - }, - "family_name": { - "type": "string", - "example": "intkey" - }, - "family_version": { - "type": "string", - "example": "1.0" - }, - "inputs": { - "type": "array", - "items": { - "type": "string", - "example": "1cf12650d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c" - } - }, - "nonce": { - "type": "string", - "example": "QAApS4L" - }, - "outputs": { - "type": "array", - "items": { - "type": "string", - "example": "1cf12650d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c" - } - }, - "payload_sha512": { - "type": "string", - "example": "fb6135ef73f4fe77367f9384b3bbbb158f4b8603c9d612157108e5c271868fce2242ee4abd7a29397ba63780c3ccab13783dfd4d9f0167beda03cdb0e37b87f4" - }, - "signer_public_key": { - "type": "string", - "example": "038bba5708acc262464c9fe30d3de9e905a9a5fa30cedd151dd9cd09ea26d46d00" - } - } - }, - "SawtoothTransactionV1": { - "required": ["header", "header_signature", "payload"], - "properties": { - "header": { - "$ref": "#/components/schemas/SawtoothTransactionHeaderV1" - }, - "header_signature": { - "type": "string", - "example": "540a6803971d1880ec73a96cb97815a95d374cbad5d865925e5aa0432fcf1931539afe10310c122c5eaae15df61236079abbf4f258889359c4d175516934484a" - }, - "payload": { - "type": "string" - } - } - }, - "SawtoothBatchHeaderV1": { - "required": ["signer_public_key", "transaction_ids"], - "properties": { - "signer_public_key": { - "type": "string", - "example": "038bba5708acc262464c9fe30d3de9e905a9a5fa30cedd151dd9cd09ea26d46d00" - }, - "transaction_ids": { - "type": "array", - "items": { - "type": "string", - "example": "540a6803971d1880ec73a96cb97815a95d374cbad5d865925e5aa0432fcf1931539afe10310c122c5eaae15df61236079abbf4f258889359c4d175516934484a" - } - } - } - }, - "SawtoothBatchV1": { - "required": ["header", "header_signature", "transactions"], - "properties": { - "header": { - "$ref": "#/components/schemas/SawtoothBatchHeaderV1" - }, - "header_signature": { - "type": "string", - "example": "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c" - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SawtoothTransactionV1" - } - } - } - }, - "SawtoothBlockHeaderV1": { - "required": [ - "batch_ids", - "block_num", - "consensus", - "previous_block_id", - "signer_public_key", - "state_root_hash" - ], - "properties": { - "block_num": { - "type": "integer", - "example": 12345 - }, - "previous_block_id": { - "type": "string", - "example": "65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd" - }, - "signer_public_key": { - "type": "string", - "example": "02d260a46457a064733153e09840c322bee1dff34445d7d49e19e60abd18fd0758" - }, - "batch_ids": { - "type": "array", - "items": { - "type": "string", - "example": "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c" - } - }, - "consensus": { - "type": "string" - }, - "state_root_hash": { - "type": "string", - "example": "708ca7fbb701799bb387f2e50deaca402e8502abe229f705693d2d4f350e1ad6" - } - } - }, - "SawtoothBlockV1": { - "required": ["header", "header_signature", "batches"], - "properties": { - "header": { - "$ref": "#/components/schemas/SawtoothBlockHeaderV1" - }, - "header_signature": { - "type": "string", - "example": "65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd" - }, - "batches": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SawtoothBatchV1" - } - } - } - }, - "CactiTransactionV1": { - "description": "Sawtooth transaction with additional fields filled by Cacti connector.", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/SawtoothTransactionV1" - }, - { - "type": "object", - "required": ["payload_decoded"], - "properties": { - "payload_decoded": { - "description": "Decoded payload of sawtooth transaction.", - "example": "[{'Verb':'inc','Name':'monitorTest3','Value':11}]}]" - } - } - } - ] - }, - "WatchBlocksV1": { - "type": "string", - "enum": [ - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Subscribe", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Next", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Error", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchBlocksV1ListenerType": { - "type": "string", - "description": "Response type from WatchBlocks. 'Cacti*' are custom views, others correspond to plain sawtooth data.", - "enum": ["full", "cacti:transactions"], - "x-enum-varnames": ["Full", "CactiTransactions"] - }, - "WatchBlocksV1TransactionFilter": { - "type": "object", - "properties": { - "family_name": { - "type": "string" - } - } - }, - "WatchBlocksV1Options": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/WatchBlocksV1ListenerType", - "description": "Type of response block to return.", - "nullable": false - }, - "txFilterBy": { - "$ref": "#/components/schemas/WatchBlocksV1TransactionFilter", - "description": "Filter specification for transactions (only used when selected CactiTransactions response type).", - "nullable": false - } - } - }, - "WatchBlocksV1CactiTransactionsResponse": { - "type": "object", - "description": "Custom response containing block transactions summary.", - "required": ["cactiTransactionsEvents"], - "properties": { - "cactiTransactionsEvents": { - "description": "List of sawtooth transactions matching specifid (optional) filter", - "type": "array", - "items": { - "$ref": "#/components/schemas/CactiTransactionV1", - "nullable": false - } - } - } - }, - "WatchBlocksV1FullResponse": { - "type": "object", - "description": "Response that returns entire sawtooth block.", - "required": ["fullBlock"], - "properties": { - "fullBlock": { - "description": "Full commited block.", - "$ref": "#/components/schemas/SawtoothBlockV1", - "nullable": false - } - } - }, - "WatchBlocksV1Progress": { - "description": "Response block from WatchBlocks endpoint. Depends on 'type' passed in subscription options.", - "oneOf": [ - { - "$ref": "#/components/schemas/WatchBlocksV1CactiTransactionsResponse", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksV1FullResponse", - "nullable": false - } - ] - }, - "StatusResponseV1": { - "description": "Response with plugin and validator status report.", - "type": "object", - "required": ["instanceId"], - "properties": { - "instanceId": { - "type": "string", - "nullable": false, - "description": "Plugin instance id." - }, - "openApiSpecVersion": { - "type": "string", - "nullable": false, - "description": "Version of connectors Open API Spec." - }, - "initialized": { - "type": "boolean", - "nullable": false, - "description": "True if endpoints were created, false otherwise" - }, - "sawtoothStatus": { - "nullable": false, - "description": "Response from sawtooth Rest API status endpoint" - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-sawtooth/status": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-sawtooth/status" - } - }, - "operationId": "getStatusV1", - "summary": "Get the status of the connector and the sawtooth validator", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/StatusResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/json/openapi.tpl.json deleted file mode 100644 index bb5e99fa46..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,363 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cacti Plugin - Connector Sawtooth", - "description": "Can perform basic tasks on a Sawtooth ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "SawtoothTransactionHeaderV1": { - "required": [ - "batcher_public_key", - "dependencies", - "family_name", - "family_version", - "inputs", - "nonce", - "outputs", - "payload_sha512", - "signer_public_key" - ], - "properties": { - "batcher_public_key": { - "type": "string", - "example": "02d260a46457a064733153e09840c322bee1dff34445d7d49e19e60abd18fd0758" - }, - "dependencies": { - "type": "array", - "items": { - "type": "string", - "example": "1baee350bdb60bcee60e3d325d43283cf830b4c23b2cb17d3bb43935bd7af3761c2bee79847c72a9e396a9ae58f48add4e43f94eb83f84442c6085c1dd5d4dbe" - } - }, - "family_name": { - "type": "string", - "example": "intkey" - }, - "family_version": { - "type": "string", - "example": "1.0" - }, - "inputs": { - "type": "array", - "items": { - "type": "string", - "example": "1cf12650d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c" - } - }, - "nonce": { - "type": "string", - "example": "QAApS4L" - }, - "outputs": { - "type": "array", - "items": { - "type": "string", - "example": "1cf12650d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c" - } - }, - "payload_sha512": { - "type": "string", - "example": "fb6135ef73f4fe77367f9384b3bbbb158f4b8603c9d612157108e5c271868fce2242ee4abd7a29397ba63780c3ccab13783dfd4d9f0167beda03cdb0e37b87f4" - }, - "signer_public_key": { - "type": "string", - "example": "038bba5708acc262464c9fe30d3de9e905a9a5fa30cedd151dd9cd09ea26d46d00" - } - } - }, - "SawtoothTransactionV1": { - "required": ["header", "header_signature", "payload"], - "properties": { - "header": { - "$ref": "#/components/schemas/SawtoothTransactionHeaderV1" - }, - "header_signature": { - "type": "string", - "example": "540a6803971d1880ec73a96cb97815a95d374cbad5d865925e5aa0432fcf1931539afe10310c122c5eaae15df61236079abbf4f258889359c4d175516934484a" - }, - "payload": { - "type": "string" - } - } - }, - "SawtoothBatchHeaderV1": { - "required": ["signer_public_key", "transaction_ids"], - "properties": { - "signer_public_key": { - "type": "string", - "example": "038bba5708acc262464c9fe30d3de9e905a9a5fa30cedd151dd9cd09ea26d46d00" - }, - "transaction_ids": { - "type": "array", - "items": { - "type": "string", - "example": "540a6803971d1880ec73a96cb97815a95d374cbad5d865925e5aa0432fcf1931539afe10310c122c5eaae15df61236079abbf4f258889359c4d175516934484a" - } - } - } - }, - "SawtoothBatchV1": { - "required": ["header", "header_signature", "transactions"], - "properties": { - "header": { - "$ref": "#/components/schemas/SawtoothBatchHeaderV1" - }, - "header_signature": { - "type": "string", - "example": "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c" - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SawtoothTransactionV1" - } - } - } - }, - "SawtoothBlockHeaderV1": { - "required": [ - "batch_ids", - "block_num", - "consensus", - "previous_block_id", - "signer_public_key", - "state_root_hash" - ], - "properties": { - "block_num": { - "type": "integer", - "example": 12345 - }, - "previous_block_id": { - "type": "string", - "example": "65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd" - }, - "signer_public_key": { - "type": "string", - "example": "02d260a46457a064733153e09840c322bee1dff34445d7d49e19e60abd18fd0758" - }, - "batch_ids": { - "type": "array", - "items": { - "type": "string", - "example": "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c" - } - }, - "consensus": { - "type": "string" - }, - "state_root_hash": { - "type": "string", - "example": "708ca7fbb701799bb387f2e50deaca402e8502abe229f705693d2d4f350e1ad6" - } - } - }, - "SawtoothBlockV1": { - "required": ["header", "header_signature", "batches"], - "properties": { - "header": { - "$ref": "#/components/schemas/SawtoothBlockHeaderV1" - }, - "header_signature": { - "type": "string", - "example": "65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd" - }, - "batches": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SawtoothBatchV1" - } - } - } - }, - "CactiTransactionV1": { - "description": "Sawtooth transaction with additional fields filled by Cacti connector.", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/SawtoothTransactionV1" - }, - { - "type": "object", - "required": ["payload_decoded"], - "properties": { - "payload_decoded": { - "description": "Decoded payload of sawtooth transaction.", - "example": "[{'Verb':'inc','Name':'monitorTest3','Value':11}]}]" - } - } - } - ] - }, - "WatchBlocksV1": { - "type": "string", - "enum": [ - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Subscribe", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Next", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Unsubscribe", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Error", - "org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Complete" - ], - "x-enum-varnames": [ - "Subscribe", - "Next", - "Unsubscribe", - "Error", - "Complete" - ] - }, - "WatchBlocksV1ListenerType": { - "type": "string", - "description": "Response type from WatchBlocks. 'Cacti*' are custom views, others correspond to plain sawtooth data.", - "enum": ["full", "cacti:transactions"], - "x-enum-varnames": ["Full", "CactiTransactions"] - }, - "WatchBlocksV1TransactionFilter": { - "type": "object", - "properties": { - "family_name": { - "type": "string" - } - } - }, - "WatchBlocksV1Options": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/WatchBlocksV1ListenerType", - "description": "Type of response block to return.", - "nullable": false - }, - "txFilterBy": { - "$ref": "#/components/schemas/WatchBlocksV1TransactionFilter", - "description": "Filter specification for transactions (only used when selected CactiTransactions response type).", - "nullable": false - } - } - }, - "WatchBlocksV1CactiTransactionsResponse": { - "type": "object", - "description": "Custom response containing block transactions summary.", - "required": ["cactiTransactionsEvents"], - "properties": { - "cactiTransactionsEvents": { - "description": "List of sawtooth transactions matching specifid (optional) filter", - "type": "array", - "items": { - "$ref": "#/components/schemas/CactiTransactionV1", - "nullable": false - } - } - } - }, - "WatchBlocksV1FullResponse": { - "type": "object", - "description": "Response that returns entire sawtooth block.", - "required": ["fullBlock"], - "properties": { - "fullBlock": { - "description": "Full commited block.", - "$ref": "#/components/schemas/SawtoothBlockV1", - "nullable": false - } - } - }, - "WatchBlocksV1Progress": { - "description": "Response block from WatchBlocks endpoint. Depends on 'type' passed in subscription options.", - "oneOf": [ - { - "$ref": "#/components/schemas/WatchBlocksV1CactiTransactionsResponse", - "nullable": false - }, - { - "$ref": "#/components/schemas/WatchBlocksV1FullResponse", - "nullable": false - } - ] - }, - "StatusResponseV1": { - "description": "Response with plugin and validator status report.", - "type": "object", - "required": ["instanceId"], - "properties": { - "instanceId": { - "type": "string", - "nullable": false, - "description": "Plugin instance id." - }, - "openApiSpecVersion": { - "type": "string", - "nullable": false, - "description": "Version of connectors Open API Spec." - }, - "initialized": { - "type": "boolean", - "nullable": false, - "description": "True if endpoints were created, false otherwise" - }, - "sawtoothStatus": { - "nullable": false, - "description": "Response from sawtooth Rest API status endpoint" - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-sawtooth/status": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-sawtooth/status" - } - }, - "operationId": "getStatusV1", - "summary": "Get the status of the connector and the sawtooth validator", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/StatusResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/json/sawtooth-openapi.json b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/json/sawtooth-openapi.json deleted file mode 100644 index a1a81a995a..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/json/sawtooth-openapi.json +++ /dev/null @@ -1,1225 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "version": "0.8.0", - "title": "Sawtooth REST API", - "description": "Official Sawtooth REST API specification with some modifications from Hyperledger Cacti project." - }, - "paths": { - "/batches": { - "post": { - "summary": "Sends a BatchList to the validator", - "description": "Accepts a protobuf formatted `BatchList` as an octet-stream binary\nfile and submits it to the validator to be committed.\n\nThe API will return immediately with a status of `202`. There will be\nno `data` object, only a `link` to a `/batch_statuses` endpoint to be\npolled to check the status of submitted batches.\n", - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "$ref": "#/components/schemas/BatchList" - } - } - }, - "description": "A binary encoded protobuf BatchList", - "required": true - }, - "responses": { - "202": { - "description": "Batches submitted for validation, but not yet committed", - "content": { - "*/*": { - "schema": { - "properties": { - "link": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "429": { - "$ref": "#/components/responses/429TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - }, - "get": { - "summary": "Fetches a list of batches", - "description": "Fetches a paginated list of batches from the validator.\n", - "parameters": [ - { - "$ref": "#/components/parameters/head" - }, - { - "$ref": "#/components/parameters/start" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/reverse" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved batches", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Batch" - } - }, - "head": { - "$ref": "#/components/schemas/Head" - }, - "link": { - "$ref": "#/components/schemas/Link" - }, - "paging": { - "$ref": "#/components/schemas/Paging" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/batches/{batch_id}": { - "parameters": [ - { - "$ref": "#/components/parameters/batch_id" - } - ], - "get": { - "summary": "Fetches a particular batch", - "responses": { - "200": { - "description": "Successfully retrieved batch", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "$ref": "#/components/schemas/Batch" - }, - "head": { - "$ref": "#/components/schemas/Head" - }, - "link": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "404": { - "$ref": "#/components/responses/404NotFound" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/batch_statuses": { - "get": { - "summary": "Fetches the committed statuses for a set of batches", - "description": "Fetches an array of objects with a status and id for each batch\nrequested. There are four possible statuses with string values\n`'COMMITTED'`, `'INVALID'`, `'PENDING'`, and `'UNKNOWN'`.\n\nThe batch(es) you want to check can be specified using the `id` filter\nparameter. If a `wait` time is specified in the URL, the API will wait\nto respond until all batches are committed, or the time in seconds has\nelapsed. If the value of `wait` is not set (i.e., `?wait&id=...`), or\nit is set to any non-integer value other than `false`, the wait time\nwill be just under the API's specified timeout (usually 300).\n\nNote that because this route does not return full resources, the\nresponse will not be paginated, and there will be no `head` or\n`paging` properties.\n", - "parameters": [ - { - "name": "id", - "in": "query", - "description": "A comma-separated list of batch ids", - "required": true, - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/wait" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved statuses", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "$ref": "#/components/schemas/BatchStatuses" - }, - "link": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - }, - "post": { - "summary": "Fetches the committed statuses for a set of batches", - "description": "Identical to `GET /batch_statuses`, but takes ids of batches as a JSON\nformatted POST body rather than a query parameter. This allows for many\nmore batches to be checked and should be used for more than 15 ids.\n\nNote that because query information is not encoded in the URL, no `link`\nwill be returned with this query.\n", - "parameters": [ - { - "$ref": "#/components/parameters/wait" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c" - } - } - } - }, - "description": "A JSON array of batch id strings", - "required": true - }, - "responses": { - "200": { - "description": "Successfully retrieved statuses", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "$ref": "#/components/schemas/BatchStatuses" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/state": { - "get": { - "summary": "Fetches the data for the current state", - "description": "Fetches a paginated list of entries for the current state, or relative to a particular head block. Using the `address` filter parameter will narrow the list to any entries that have an address beginning with the characters specified.\nNote that the partial address in `address` parameter should have even number of hexadecimal characters (i.e., complete bytes).\n", - "parameters": [ - { - "$ref": "#/components/parameters/head" - }, - { - "name": "address", - "in": "query", - "description": "A partial address to filter leaves by", - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/start" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/reverse" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved state data", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Entry" - } - }, - "head": { - "$ref": "#/components/schemas/Head" - }, - "link": { - "$ref": "#/components/schemas/Link" - }, - "paging": { - "$ref": "#/components/schemas/Paging" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/state/{address}": { - "parameters": [ - { - "$ref": "#/components/parameters/address" - } - ], - "get": { - "summary": "Fetches a particular leaf from the current state", - "description": "Takes full 70-character address and fetches a particular leaf. For partial address (i.e., group of leaves) use `/state` above. \n", - "parameters": [ - { - "$ref": "#/components/parameters/head" - } - ], - "responses": { - "200": { - "description": "Successfully fetched leaves", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "type": "string", - "format": "byte", - "example": "Zm9vOmJhcg==" - }, - "head": { - "$ref": "#/components/schemas/Head" - }, - "link": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "404": { - "$ref": "#/components/responses/404NotFound" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/blocks": { - "get": { - "summary": "Fetches a list of blocks", - "description": "Fetches a paginated list of blocks from the validator.\n", - "parameters": [ - { - "$ref": "#/components/parameters/head" - }, - { - "$ref": "#/components/parameters/start" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/reverse" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved blocks", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Block" - } - }, - "head": { - "$ref": "#/components/schemas/Head" - }, - "link": { - "$ref": "#/components/schemas/Link" - }, - "paging": { - "$ref": "#/components/schemas/Paging" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/blocks/{block_id}": { - "parameters": [ - { - "$ref": "#/components/parameters/block_id" - } - ], - "get": { - "summary": "Fetches a particular block", - "responses": { - "200": { - "description": "Successfully retrieved block", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "$ref": "#/components/schemas/Block" - }, - "head": { - "$ref": "#/components/schemas/Head" - }, - "link": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "404": { - "$ref": "#/components/responses/404NotFound" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/transactions": { - "get": { - "summary": "Fetches a list of transactions", - "description": "Fetches a paginated list of transactions from the validator.\n", - "parameters": [ - { - "$ref": "#/components/parameters/head" - }, - { - "$ref": "#/components/parameters/start" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "$ref": "#/components/parameters/reverse" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved transactions", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transaction" - } - }, - "head": { - "$ref": "#/components/schemas/Head" - }, - "link": { - "$ref": "#/components/schemas/Link" - }, - "paging": { - "$ref": "#/components/schemas/Paging" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/transactions/{transaction_id}": { - "parameters": [ - { - "$ref": "#/components/parameters/transaction_id" - } - ], - "get": { - "summary": "Fetches a particular transaction", - "responses": { - "200": { - "description": "Successfully retrieved transaction", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "$ref": "#/components/schemas/Block" - }, - "head": { - "$ref": "#/components/schemas/Head" - }, - "link": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "404": { - "$ref": "#/components/responses/404NotFound" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/receipts": { - "get": { - "summary": "Fetches the receipts for a set of transactions", - "description": "Fetches an array of objects for each receipt requested.\n\nThe receipt(s) you want to retrieve can be specified using the `id`\nfilter parameter, where `id` refers to the transaction id of the\ntransaction the receipt is associated with.\n", - "parameters": [ - { - "name": "id", - "in": "query", - "description": "A comma-separated list of transaction ids", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successfully retrieved transaction receipts", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "$ref": "#/components/schemas/TransactionReceipts" - }, - "link": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - }, - "post": { - "summary": "Fetches the receipts for a set of transactions", - "description": "Identical to `GET /receipts`, but takes ids of transactions as a JSON\nformatted POST body rather than a query parameter. This allows for many\nmore receipts to be fetched and should be used with more than 15 ids.\n\nNote that because query information is not encoded in the URL, no `link`\nwill be returned with this request.\n", - "parameters": [ - { - "$ref": "#/components/parameters/wait" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c" - } - } - } - }, - "description": "A JSON array of transaction id strings", - "required": true - }, - "responses": { - "200": { - "description": "Successfully retrieved transaction receipts", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "$ref": "#/components/schemas/TransactionReceipts" - }, - "link": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/peers": { - "get": { - "summary": "Fetches the endpoints of the authorized peers of the validator", - "responses": { - "200": { - "description": "Successfully retrieved peers", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "type": "string", - "example": "tcp://12.345.67.890:8800" - } - }, - "link": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - }, - "/status": { - "get": { - "summary": "Fetches information pertaining to the status of the validator", - "responses": { - "200": { - "description": "Successfully retrieved status", - "content": { - "*/*": { - "schema": { - "properties": { - "data": { - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "example": "tcp://12.345.67.890:8800" - }, - "peers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "example": "tcp://12.345.67.890:8800" - } - } - } - } - } - }, - "link": { - "$ref": "#/components/schemas/Link" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400BadRequest" - }, - "500": { - "$ref": "#/components/responses/500ServerError" - }, - "503": { - "$ref": "#/components/responses/503ServiceUnavailable" - } - } - } - } - }, - "components": { - "parameters": { - "address": { - "name": "address", - "in": "path", - "required": true, - "description": "Radix address of a leaf", - "schema": { - "type": "string" - } - }, - "block_id": { - "name": "block_id", - "in": "path", - "required": true, - "description": "Block id", - "schema": { - "type": "string" - } - }, - "batch_id": { - "name": "batch_id", - "in": "path", - "required": true, - "description": "Batch id", - "schema": { - "type": "string" - } - }, - "transaction_id": { - "name": "transaction_id", - "in": "path", - "required": true, - "description": "Transaction id", - "schema": { - "type": "string" - } - }, - "head": { - "name": "head", - "in": "query", - "description": "Index or id of head block", - "schema": { - "type": "string", - "default": "latest" - } - }, - "wait": { - "name": "wait", - "in": "query", - "description": "A time in seconds to wait for commit", - "schema": { - "type": "integer" - } - }, - "limit": { - "name": "limit", - "in": "query", - "description": "Number of items to return", - "schema": { - "type": "integer", - "default": 1000 - } - }, - "start": { - "name": "start", - "in": "query", - "description": "Id to start paging (inclusive)", - "schema": { - "type": "string" - } - }, - "reverse": { - "name": "reverse", - "in": "query", - "description": "If the list should be reversed", - "schema": { - "type": "string" - } - } - }, - "responses": { - "400BadRequest": { - "description": "Request was malformed", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404NotFound": { - "description": "Address or id did not match any resource", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "429TooManyRequests": { - "description": "Too many requests have been made to process batches", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500ServerError": { - "description": "Something went wrong within the validator", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "503ServiceUnavailable": { - "description": "API is unable to reach the validator", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "schemas": { - "Head": { - "type": "string", - "example": "65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd" - }, - "Link": { - "type": "string", - "example": "https://api.sawtooth.com/state?head=65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd" - }, - "Paging": { - "properties": { - "start": { - "type": "string", - "example": "65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd" - }, - "limit": { - "type": "integer", - "example": 54321 - }, - "next_position": { - "type": "string", - "example": "65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd" - }, - "next": { - "type": "string", - "example": "https://api.sawtooth.com/state?head=65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd&start=2000&limit=1000" - } - } - }, - "Error": { - "properties": { - "code": { - "type": "integer", - "example": 34 - }, - "title": { - "type": "string", - "example": "No Batches Submitted" - }, - "message": { - "type": "string", - "example": "The protobuf BatchList you submitted was empty and contained no Batches. You must submit at least one Batch.\n" - } - } - }, - "BatchStatuses": { - "type": "array", - "items": { - "properties": { - "id": { - "type": "string", - "example": "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c" - }, - "status": { - "type": "string", - "example": "INVALID", - "enum": ["COMMITTED", "INVALID", "PENDING", "UNKNOWN"] - }, - "invalid_transactions": { - "type": "array", - "items": { - "properties": { - "id": { - "type": "string", - "example": "540a6803971d1880ec73a96cb97815a95d374cbad5d865925e5aa0432fcf1931539afe10310c122c5eaae15df61236079abbf4f258889359c4d175516934484a" - }, - "message": { - "type": "string", - "example": "Verb is \\\"inc\\\" but name \\\"foo\\\" not in state" - }, - "extended_data": { - "type": "string", - "format": "byte", - "example": "ZXJyb3IgZGF0YQ==" - } - } - } - } - } - } - }, - "Entry": { - "properties": { - "address": { - "type": "string", - "example": "1cf12650d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c" - }, - "data": { - "type": "string", - "format": "byte", - "example": "Zm9vOmJhcg==" - } - } - }, - "TransactionHeader": { - "required": [ - "batcher_public_key", - "dependencies", - "family_name", - "family_version", - "inputs", - "nonce", - "outputs", - "payload_sha512", - "signer_public_key" - ], - "properties": { - "batcher_public_key": { - "type": "string", - "example": "02d260a46457a064733153e09840c322bee1dff34445d7d49e19e60abd18fd0758" - }, - "dependencies": { - "type": "array", - "items": { - "type": "string", - "example": "1baee350bdb60bcee60e3d325d43283cf830b4c23b2cb17d3bb43935bd7af3761c2bee79847c72a9e396a9ae58f48add4e43f94eb83f84442c6085c1dd5d4dbe" - } - }, - "family_name": { - "type": "string", - "example": "intkey" - }, - "family_version": { - "type": "string", - "example": "1.0" - }, - "inputs": { - "type": "array", - "items": { - "type": "string", - "example": "1cf12650d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c" - } - }, - "nonce": { - "type": "string", - "example": "QAApS4L" - }, - "outputs": { - "type": "array", - "items": { - "type": "string", - "example": "1cf12650d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c" - } - }, - "payload_sha512": { - "type": "string", - "example": "fb6135ef73f4fe77367f9384b3bbbb158f4b8603c9d612157108e5c271868fce2242ee4abd7a29397ba63780c3ccab13783dfd4d9f0167beda03cdb0e37b87f4" - }, - "signer_public_key": { - "type": "string", - "example": "038bba5708acc262464c9fe30d3de9e905a9a5fa30cedd151dd9cd09ea26d46d00" - } - } - }, - "Transaction": { - "required": ["header", "header_signature", "payload"], - "properties": { - "header": { - "$ref": "#/components/schemas/TransactionHeader" - }, - "header_signature": { - "type": "string", - "example": "540a6803971d1880ec73a96cb97815a95d374cbad5d865925e5aa0432fcf1931539afe10310c122c5eaae15df61236079abbf4f258889359c4d175516934484a" - }, - "payload": { - "type": "string" - } - } - }, - "TransactionReceipt": { - "properties": { - "transaction_id": { - "type": "string", - "example": "540a6803971d1880ec73a96cb97815a95d374cbad5d865925e5aa0432fcf1931539afe10310c122c5eaae15df61236079abbf4f258889359c4d175516934484a" - }, - "state_changes": { - "type": "array", - "items": { - "properties": { - "type": { - "type": "string", - "example": "SET" - }, - "address": { - "type": "string", - "example": "1cf12650d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c" - }, - "value": { - "type": "string" - } - } - } - }, - "events": { - "type": "array", - "items": { - "properties": { - "event_type": { - "type": "string", - "example": "sawtooth/block-commit" - }, - "attributes": { - "type": "array", - "items": { - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - } - }, - "data": { - "type": "string" - } - } - } - }, - "data": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "TransactionReceipts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransactionReceipt" - } - }, - "BatchHeader": { - "required": ["signer_public_key", "transaction_ids"], - "properties": { - "signer_public_key": { - "type": "string", - "example": "038bba5708acc262464c9fe30d3de9e905a9a5fa30cedd151dd9cd09ea26d46d00" - }, - "transaction_ids": { - "type": "array", - "items": { - "type": "string", - "example": "540a6803971d1880ec73a96cb97815a95d374cbad5d865925e5aa0432fcf1931539afe10310c122c5eaae15df61236079abbf4f258889359c4d175516934484a" - } - } - } - }, - "Batch": { - "required": ["header", "header_signature", "transactions"], - "properties": { - "header": { - "$ref": "#/components/schemas/BatchHeader" - }, - "header_signature": { - "type": "string", - "example": "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c" - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transaction" - } - } - } - }, - "BatchList": { - "required": ["batches"], - "properties": { - "batches": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Batch" - } - } - } - }, - "BlockHeader": { - "required": [ - "batch_ids", - "block_num", - "consensus", - "previous_block_id", - "signer_public_key", - "state_root_hash" - ], - "properties": { - "block_num": { - "type": "integer", - "example": 12345 - }, - "previous_block_id": { - "type": "string", - "example": "65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd" - }, - "signer_public_key": { - "type": "string", - "example": "02d260a46457a064733153e09840c322bee1dff34445d7d49e19e60abd18fd0758" - }, - "batch_ids": { - "type": "array", - "items": { - "type": "string", - "example": "89807bfc9089e37e00d87d97357de14cfbc455cd608438d426a625a30a0da9a31c406983803c4aa27e1f32a3ff61709e8ec4b56abbc553d7d330635b5d27029c" - } - }, - "consensus": { - "type": "string" - }, - "state_root_hash": { - "type": "string", - "example": "708ca7fbb701799bb387f2e50deaca402e8502abe229f705693d2d4f350e1ad6" - } - } - }, - "Block": { - "required": ["header", "header_signature", "batches"], - "properties": { - "header": { - "$ref": "#/components/schemas/BlockHeader" - }, - "header_signature": { - "type": "string", - "example": "65cd3a3ce088b265b626f704b7f3db97b6f12e848dccb35d7806f3d0324c71b709ed360d602b8b658b94695374717e3bdb4b76f77886953777d5d008558247dd" - }, - "batches": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Batch" - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/api-client/sawtooth-api-client.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/api-client/sawtooth-api-client.ts deleted file mode 100644 index f2e4f200c9..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/api-client/sawtooth-api-client.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Observable, ReplaySubject } from "rxjs"; -import { finalize } from "rxjs/operators"; -const { io } = require("socket.io-client-fixed-types"); -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { Constants, ISocketApiClient } from "@hyperledger/cactus-core-api"; -import { - DefaultApi, - WatchBlocksV1, - WatchBlocksV1Options, - WatchBlocksV1Progress, - Configuration, -} from "../generated/openapi/typescript-axios"; - -export class SawtoothApiClientOptions extends Configuration { - readonly logLevel?: LogLevelDesc; - readonly wsApiHost?: string; - readonly wsApiPath?: string; -} - -export class SawtoothApiClient - extends DefaultApi - implements ISocketApiClient -{ - private readonly log: Logger; - private readonly wsApiHost: string; - private readonly wsApiPath: string; - - /** - * Registry of started monitoring sessions. - */ - private monitorSubjects = new Map< - string, - ReplaySubject - >(); - - public get className(): string { - return "SawtoothApiClient"; - } - - constructor(public readonly options: SawtoothApiClientOptions) { - super(options); - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.wsApiHost = options.wsApiHost || options.basePath || location.host; - this.wsApiPath = options.wsApiPath || Constants.SocketIoConnectionPathV1; - this.log.debug(`Created ${this.className} OK.`); - this.log.debug(`wsApiHost=${this.wsApiHost}`); - this.log.debug(`wsApiPath=${this.wsApiPath}`); - this.log.debug(`basePath=${this.options.basePath}`); - } - - /** - * Monitor for new blocks or transactions (depends on provided options) - * - * @param options monitoring configuration - * @returns rxjs observable - */ - public watchBlocksV1( - options?: WatchBlocksV1Options, - ): Observable { - const socket = io(this.wsApiHost, { path: this.wsApiPath }); - const subject = new ReplaySubject(0); - - socket.on(WatchBlocksV1.Next, (data: WatchBlocksV1Progress) => { - this.log.debug("Received WatchBlocksV1.Next"); - subject.next(data); - }); - - socket.on(WatchBlocksV1.Error, (ex: string) => { - this.log.warn("Received WatchBlocksV1.Error:", ex); - subject.error(ex); - }); - - socket.on(WatchBlocksV1.Complete, () => { - this.log.debug("Received WatchBlocksV1.Complete"); - subject.complete(); - }); - - socket.on("connect", () => { - this.log.info("Connected OK, sending WatchBlocksV1.Subscribe request..."); - this.monitorSubjects.set(socket.id, subject); - socket.emit(WatchBlocksV1.Subscribe, options); - }); - - socket.connect(); - - return subject.pipe( - finalize(() => { - this.log.info("FINALIZE - unsubscribing from the stream..."); - this.monitorSubjects.delete(socket.id); - socket.emit(WatchBlocksV1.Unsubscribe); - socket.close(); - }), - ); - } - - /** - * Stop all ongoing monitors, terminate connections. - * - * @note Might take few seconds to clean up all the connections. - */ - public close(): void { - this.log.debug("Close all running monitors."); - this.monitorSubjects.forEach((subject) => subject.complete()); - this.monitorSubjects.clear(); - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 07172ad877..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,514 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Sawtooth - * Can perform basic tasks on a Sawtooth ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * Sawtooth transaction with additional fields filled by Cacti connector. - * @export - * @interface CactiTransactionV1 - */ -export interface CactiTransactionV1 { - /** - * - * @type {SawtoothTransactionHeaderV1} - * @memberof CactiTransactionV1 - */ - 'header': SawtoothTransactionHeaderV1; - /** - * - * @type {string} - * @memberof CactiTransactionV1 - */ - 'header_signature': string; - /** - * - * @type {string} - * @memberof CactiTransactionV1 - */ - 'payload': string; - /** - * Decoded payload of sawtooth transaction. - * @type {any} - * @memberof CactiTransactionV1 - */ - 'payload_decoded': any; -} -/** - * - * @export - * @interface CactiTransactionV1AllOf - */ -export interface CactiTransactionV1AllOf { - /** - * Decoded payload of sawtooth transaction. - * @type {any} - * @memberof CactiTransactionV1AllOf - */ - 'payload_decoded': any; -} -/** - * - * @export - * @interface ErrorExceptionResponseV1 - */ -export interface ErrorExceptionResponseV1 { - /** - * - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'message': string; - /** - * - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'error': string; -} -/** - * - * @export - * @interface SawtoothBatchHeaderV1 - */ -export interface SawtoothBatchHeaderV1 { - /** - * - * @type {string} - * @memberof SawtoothBatchHeaderV1 - */ - 'signer_public_key': string; - /** - * - * @type {Array} - * @memberof SawtoothBatchHeaderV1 - */ - 'transaction_ids': Array; -} -/** - * - * @export - * @interface SawtoothBatchV1 - */ -export interface SawtoothBatchV1 { - /** - * - * @type {SawtoothBatchHeaderV1} - * @memberof SawtoothBatchV1 - */ - 'header': SawtoothBatchHeaderV1; - /** - * - * @type {string} - * @memberof SawtoothBatchV1 - */ - 'header_signature': string; - /** - * - * @type {Array} - * @memberof SawtoothBatchV1 - */ - 'transactions': Array; -} -/** - * - * @export - * @interface SawtoothBlockHeaderV1 - */ -export interface SawtoothBlockHeaderV1 { - /** - * - * @type {number} - * @memberof SawtoothBlockHeaderV1 - */ - 'block_num': number; - /** - * - * @type {string} - * @memberof SawtoothBlockHeaderV1 - */ - 'previous_block_id': string; - /** - * - * @type {string} - * @memberof SawtoothBlockHeaderV1 - */ - 'signer_public_key': string; - /** - * - * @type {Array} - * @memberof SawtoothBlockHeaderV1 - */ - 'batch_ids': Array; - /** - * - * @type {string} - * @memberof SawtoothBlockHeaderV1 - */ - 'consensus': string; - /** - * - * @type {string} - * @memberof SawtoothBlockHeaderV1 - */ - 'state_root_hash': string; -} -/** - * - * @export - * @interface SawtoothBlockV1 - */ -export interface SawtoothBlockV1 { - /** - * - * @type {SawtoothBlockHeaderV1} - * @memberof SawtoothBlockV1 - */ - 'header': SawtoothBlockHeaderV1; - /** - * - * @type {string} - * @memberof SawtoothBlockV1 - */ - 'header_signature': string; - /** - * - * @type {Array} - * @memberof SawtoothBlockV1 - */ - 'batches': Array; -} -/** - * - * @export - * @interface SawtoothTransactionHeaderV1 - */ -export interface SawtoothTransactionHeaderV1 { - /** - * - * @type {string} - * @memberof SawtoothTransactionHeaderV1 - */ - 'batcher_public_key': string; - /** - * - * @type {Array} - * @memberof SawtoothTransactionHeaderV1 - */ - 'dependencies': Array; - /** - * - * @type {string} - * @memberof SawtoothTransactionHeaderV1 - */ - 'family_name': string; - /** - * - * @type {string} - * @memberof SawtoothTransactionHeaderV1 - */ - 'family_version': string; - /** - * - * @type {Array} - * @memberof SawtoothTransactionHeaderV1 - */ - 'inputs': Array; - /** - * - * @type {string} - * @memberof SawtoothTransactionHeaderV1 - */ - 'nonce': string; - /** - * - * @type {Array} - * @memberof SawtoothTransactionHeaderV1 - */ - 'outputs': Array; - /** - * - * @type {string} - * @memberof SawtoothTransactionHeaderV1 - */ - 'payload_sha512': string; - /** - * - * @type {string} - * @memberof SawtoothTransactionHeaderV1 - */ - 'signer_public_key': string; -} -/** - * - * @export - * @interface SawtoothTransactionV1 - */ -export interface SawtoothTransactionV1 { - /** - * - * @type {SawtoothTransactionHeaderV1} - * @memberof SawtoothTransactionV1 - */ - 'header': SawtoothTransactionHeaderV1; - /** - * - * @type {string} - * @memberof SawtoothTransactionV1 - */ - 'header_signature': string; - /** - * - * @type {string} - * @memberof SawtoothTransactionV1 - */ - 'payload': string; -} -/** - * Response with plugin and validator status report. - * @export - * @interface StatusResponseV1 - */ -export interface StatusResponseV1 { - /** - * Plugin instance id. - * @type {string} - * @memberof StatusResponseV1 - */ - 'instanceId': string; - /** - * Version of connectors Open API Spec. - * @type {string} - * @memberof StatusResponseV1 - */ - 'openApiSpecVersion'?: string; - /** - * True if endpoints were created, false otherwise - * @type {boolean} - * @memberof StatusResponseV1 - */ - 'initialized'?: boolean; - /** - * Response from sawtooth Rest API status endpoint - * @type {any} - * @memberof StatusResponseV1 - */ - 'sawtoothStatus'?: any; -} -/** - * - * @export - * @enum {string} - */ - -export const WatchBlocksV1 = { - Subscribe: 'org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Subscribe', - Next: 'org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Next', - Unsubscribe: 'org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Unsubscribe', - Error: 'org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Error', - Complete: 'org.hyperledger.cacti.api.async.sawtooth.WatchBlocksV1.Complete' -} as const; - -export type WatchBlocksV1 = typeof WatchBlocksV1[keyof typeof WatchBlocksV1]; - - -/** - * Custom response containing block transactions summary. - * @export - * @interface WatchBlocksV1CactiTransactionsResponse - */ -export interface WatchBlocksV1CactiTransactionsResponse { - /** - * List of sawtooth transactions matching specifid (optional) filter - * @type {Array} - * @memberof WatchBlocksV1CactiTransactionsResponse - */ - 'cactiTransactionsEvents': Array; -} -/** - * Response that returns entire sawtooth block. - * @export - * @interface WatchBlocksV1FullResponse - */ -export interface WatchBlocksV1FullResponse { - /** - * - * @type {SawtoothBlockV1} - * @memberof WatchBlocksV1FullResponse - */ - 'fullBlock': SawtoothBlockV1; -} -/** - * Response type from WatchBlocks. \'Cacti*\' are custom views, others correspond to plain sawtooth data. - * @export - * @enum {string} - */ - -export const WatchBlocksV1ListenerType = { - Full: 'full', - CactiTransactions: 'cacti:transactions' -} as const; - -export type WatchBlocksV1ListenerType = typeof WatchBlocksV1ListenerType[keyof typeof WatchBlocksV1ListenerType]; - - -/** - * - * @export - * @interface WatchBlocksV1Options - */ -export interface WatchBlocksV1Options { - /** - * - * @type {WatchBlocksV1ListenerType} - * @memberof WatchBlocksV1Options - */ - 'type'?: WatchBlocksV1ListenerType; - /** - * - * @type {WatchBlocksV1TransactionFilter} - * @memberof WatchBlocksV1Options - */ - 'txFilterBy'?: WatchBlocksV1TransactionFilter; -} - - -/** - * @type WatchBlocksV1Progress - * Response block from WatchBlocks endpoint. Depends on \'type\' passed in subscription options. - * @export - */ -export type WatchBlocksV1Progress = WatchBlocksV1CactiTransactionsResponse | WatchBlocksV1FullResponse; - -/** - * - * @export - * @interface WatchBlocksV1TransactionFilter - */ -export interface WatchBlocksV1TransactionFilter { - /** - * - * @type {string} - * @memberof WatchBlocksV1TransactionFilter - */ - 'family_name'?: string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Get the status of the connector and the sawtooth validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatusV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-sawtooth/status`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Get the status of the connector and the sawtooth validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatusV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatusV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Get the status of the connector and the sawtooth validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatusV1(options?: any): AxiosPromise { - return localVarFp.getStatusV1(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Get the status of the connector and the sawtooth validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getStatusV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getStatusV1(options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 43361ffdf6..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Sawtooth - * Can perform basic tasks on a Sawtooth ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index f05c0b66bf..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Sawtooth - * Can perform basic tasks on a Sawtooth ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index c7b196d992..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Sawtooth - * Can perform basic tasks on a Sawtooth ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 7cc5b0bcda..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cacti Plugin - Connector Sawtooth - * Can perform basic tasks on a Sawtooth ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/index.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/index.web.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/plugin-factory-ledger-connector.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/plugin-factory-ledger-connector.ts deleted file mode 100644 index 2ac7467d11..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginLedgerConnectorSawtoothOptions, - PluginLedgerConnectorSawtooth, -} from "./plugin-ledger-connector-sawtooth"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorSawtooth, - IPluginLedgerConnectorSawtoothOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorSawtoothOptions, - ): Promise { - return new PluginLedgerConnectorSawtooth(pluginOptions); - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/plugin-ledger-connector-sawtooth.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/plugin-ledger-connector-sawtooth.ts deleted file mode 100644 index 70a8a45783..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/plugin-ledger-connector-sawtooth.ts +++ /dev/null @@ -1,199 +0,0 @@ -import type { Express } from "express"; -import type { - Server as SocketIoServer, - Socket as SocketIoSocket, -} from "socket.io"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { consensusHasTransactionFinality } from "@hyperledger/cactus-core"; -import { - ConsensusAlgorithmFamily, - IPluginLedgerConnector, - IWebServiceEndpoint, - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; - -import { - StatusResponseV1, - WatchBlocksV1, - WatchBlocksV1Options, -} from "./generated/openapi/typescript-axios"; -import { WatchBlocksV1Endpoint } from "./web-services/watch-blocks-v1-endpoint"; -import { StatusEndpointV1 } from "./web-services/status-endpoint-v1"; -import OAS from "../json/openapi.json"; -import { Configuration, DefaultApi as SawtoothRestApi } from "./sawtooth-api"; - -export interface IPluginLedgerConnectorSawtoothOptions - extends ICactusPluginOptions { - logLevel?: LogLevelDesc; - sawtoothRestApiEndpoint: string; - watchBlocksPollTime?: number; -} - -export class PluginLedgerConnectorSawtooth - implements - IPluginLedgerConnector, - ICactusPlugin, - IPluginWebService -{ - private readonly instanceId: string; - private readonly log: Logger; - private endpoints: IWebServiceEndpoint[] | undefined; - private runningWatchBlocksMonitors = new Set(); - private sawtoothApiClient: SawtoothRestApi; - - public get className(): string { - return "PluginLedgerConnectorSawtooth"; - } - - constructor(public readonly options: IPluginLedgerConnectorSawtoothOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy( - options.sawtoothRestApiEndpoint, - `${fnTag} arg options.sawtoothRestApiEndpoint`, - ); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - this.instanceId = options.instanceId; - - this.sawtoothApiClient = new SawtoothRestApi( - new Configuration({ basePath: this.options.sawtoothRestApiEndpoint }), - ); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - this.runningWatchBlocksMonitors.forEach((m) => m.close()); - this.runningWatchBlocksMonitors.clear(); - } - - public async onPluginInit(): Promise { - return; - } - - async registerWebServices( - app: Express, - wsApi: SocketIoServer, - ): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - - // Register WatchBlocksV1Endpoint on SocketIO - wsApi.on("connection", (socket: SocketIoSocket) => { - this.log.debug(`New Socket connected. ID=${socket.id}`); - - socket.on( - WatchBlocksV1.Subscribe, - async (options?: WatchBlocksV1Options) => { - const watchBlocksEndpoint = new WatchBlocksV1Endpoint({ - socket, - sawtoothApiClient: this.sawtoothApiClient, - options, - pollTime: this.options.watchBlocksPollTime, - }); - this.runningWatchBlocksMonitors.add(watchBlocksEndpoint); - await watchBlocksEndpoint.subscribe(); - this.log.debug( - "Running WatchBlocksMonitors count:", - this.runningWatchBlocksMonitors.size, - ); - - socket.on("disconnect", () => { - this.runningWatchBlocksMonitors.delete(watchBlocksEndpoint); - this.log.debug( - "Running monitors count:", - this.runningWatchBlocksMonitors.size, - ); - }); - }, - ); - }); - - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - const endpoints: IWebServiceEndpoint[] = []; - - { - const endpoint = new StatusEndpointV1({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - - this.endpoints = endpoints; - return endpoints; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-ledger-connector-sawtooth`; - } - - public async getConsensusAlgorithmFamily(): Promise { - return ConsensusAlgorithmFamily.Authority; - } - - public async hasTransactionFinality(): Promise { - const currentConsensusAlgorithmFamily = - await this.getConsensusAlgorithmFamily(); - - return consensusHasTransactionFinality(currentConsensusAlgorithmFamily); - } - - /** - * @warn Not implemented! - */ - deployContract(): Promise { - throw new Error("Method not implemented."); - } - - /** - * @warn Not implemented! - */ - transact(): Promise { - throw new Error("Method not implemented."); - } - - /** - * Get this connector status and response of /status endpoint from Sawtooth REST API. - * - * @returns StatusResponseV1 - */ - async getStatus(): Promise { - const openApiSpecVersion = - (this.getOpenApiSpec() as Record)?.info?.version ?? - "unknown"; - - const status = await this.sawtoothApiClient.statusGet(); - - return { - instanceId: this.instanceId, - openApiSpecVersion, - initialized: Boolean(this.endpoints), - sawtoothStatus: status.data.data, - }; - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/public-api.ts deleted file mode 100755 index 421f697142..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/public-api.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; - -export { - PluginLedgerConnectorSawtooth, - IPluginLedgerConnectorSawtoothOptions, -} from "./plugin-ledger-connector-sawtooth"; - -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; -export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export * from "./types/model-type-guards"; -export * from "./generated/openapi/typescript-axios"; -export { - SawtoothApiClient, - SawtoothApiClientOptions, -} from "./api-client/sawtooth-api-client"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/.openapi-generator-ignore b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/.openapi-generator-ignore deleted file mode 100644 index 9548c6c685..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/.openapi-generator-ignore +++ /dev/null @@ -1,27 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md - -.gitignore -.npmignore -git_push.sh \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/api.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/api.ts deleted file mode 100644 index a6f1444c4f..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/api.ts +++ /dev/null @@ -1,1986 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sawtooth REST API - * Official Sawtooth REST API specification with some modifications from Hyperledger Cacti project. - * - * The version of the OpenAPI document: 0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface Batch - */ -export interface Batch { - /** - * - * @type {BatchHeader} - * @memberof Batch - */ - 'header': BatchHeader; - /** - * - * @type {string} - * @memberof Batch - */ - 'header_signature': string; - /** - * - * @type {Array} - * @memberof Batch - */ - 'transactions': Array; -} -/** - * - * @export - * @interface BatchHeader - */ -export interface BatchHeader { - /** - * - * @type {string} - * @memberof BatchHeader - */ - 'signer_public_key': string; - /** - * - * @type {Array} - * @memberof BatchHeader - */ - 'transaction_ids': Array; -} -/** - * - * @export - * @interface BatchList - */ -export interface BatchList { - /** - * - * @type {Array} - * @memberof BatchList - */ - 'batches': Array; -} -/** - * - * @export - * @interface BatchStatusesGet200Response - */ -export interface BatchStatusesGet200Response { - /** - * - * @type {Array} - * @memberof BatchStatusesGet200Response - */ - 'data'?: Array; - /** - * - * @type {string} - * @memberof BatchStatusesGet200Response - */ - 'link'?: string; -} -/** - * - * @export - * @interface BatchStatusesInner - */ -export interface BatchStatusesInner { - /** - * - * @type {string} - * @memberof BatchStatusesInner - */ - 'id'?: string; - /** - * - * @type {string} - * @memberof BatchStatusesInner - */ - 'status'?: BatchStatusesInnerStatusEnum; - /** - * - * @type {Array} - * @memberof BatchStatusesInner - */ - 'invalid_transactions'?: Array; -} - -export const BatchStatusesInnerStatusEnum = { - Committed: 'COMMITTED', - Invalid: 'INVALID', - Pending: 'PENDING', - Unknown: 'UNKNOWN' -} as const; - -export type BatchStatusesInnerStatusEnum = typeof BatchStatusesInnerStatusEnum[keyof typeof BatchStatusesInnerStatusEnum]; - -/** - * - * @export - * @interface BatchStatusesInnerInvalidTransactionsInner - */ -export interface BatchStatusesInnerInvalidTransactionsInner { - /** - * - * @type {string} - * @memberof BatchStatusesInnerInvalidTransactionsInner - */ - 'id'?: string; - /** - * - * @type {string} - * @memberof BatchStatusesInnerInvalidTransactionsInner - */ - 'message'?: string; - /** - * - * @type {string} - * @memberof BatchStatusesInnerInvalidTransactionsInner - */ - 'extended_data'?: string; -} -/** - * - * @export - * @interface BatchStatusesPost200Response - */ -export interface BatchStatusesPost200Response { - /** - * - * @type {Array} - * @memberof BatchStatusesPost200Response - */ - 'data'?: Array; -} -/** - * - * @export - * @interface BatchesBatchIdGet200Response - */ -export interface BatchesBatchIdGet200Response { - /** - * - * @type {Batch} - * @memberof BatchesBatchIdGet200Response - */ - 'data'?: Batch; - /** - * - * @type {string} - * @memberof BatchesBatchIdGet200Response - */ - 'head'?: string; - /** - * - * @type {string} - * @memberof BatchesBatchIdGet200Response - */ - 'link'?: string; -} -/** - * - * @export - * @interface BatchesGet200Response - */ -export interface BatchesGet200Response { - /** - * - * @type {Array} - * @memberof BatchesGet200Response - */ - 'data'?: Array; - /** - * - * @type {string} - * @memberof BatchesGet200Response - */ - 'head'?: string; - /** - * - * @type {string} - * @memberof BatchesGet200Response - */ - 'link'?: string; - /** - * - * @type {Paging} - * @memberof BatchesGet200Response - */ - 'paging'?: Paging; -} -/** - * - * @export - * @interface BatchesPost202Response - */ -export interface BatchesPost202Response { - /** - * - * @type {string} - * @memberof BatchesPost202Response - */ - 'link'?: string; -} -/** - * - * @export - * @interface Block - */ -export interface Block { - /** - * - * @type {BlockHeader} - * @memberof Block - */ - 'header': BlockHeader; - /** - * - * @type {string} - * @memberof Block - */ - 'header_signature': string; - /** - * - * @type {Array} - * @memberof Block - */ - 'batches': Array; -} -/** - * - * @export - * @interface BlockHeader - */ -export interface BlockHeader { - /** - * - * @type {number} - * @memberof BlockHeader - */ - 'block_num': number; - /** - * - * @type {string} - * @memberof BlockHeader - */ - 'previous_block_id': string; - /** - * - * @type {string} - * @memberof BlockHeader - */ - 'signer_public_key': string; - /** - * - * @type {Array} - * @memberof BlockHeader - */ - 'batch_ids': Array; - /** - * - * @type {string} - * @memberof BlockHeader - */ - 'consensus': string; - /** - * - * @type {string} - * @memberof BlockHeader - */ - 'state_root_hash': string; -} -/** - * - * @export - * @interface BlocksBlockIdGet200Response - */ -export interface BlocksBlockIdGet200Response { - /** - * - * @type {Block} - * @memberof BlocksBlockIdGet200Response - */ - 'data'?: Block; - /** - * - * @type {string} - * @memberof BlocksBlockIdGet200Response - */ - 'head'?: string; - /** - * - * @type {string} - * @memberof BlocksBlockIdGet200Response - */ - 'link'?: string; -} -/** - * - * @export - * @interface BlocksGet200Response - */ -export interface BlocksGet200Response { - /** - * - * @type {Array} - * @memberof BlocksGet200Response - */ - 'data'?: Array; - /** - * - * @type {string} - * @memberof BlocksGet200Response - */ - 'head'?: string; - /** - * - * @type {string} - * @memberof BlocksGet200Response - */ - 'link'?: string; - /** - * - * @type {Paging} - * @memberof BlocksGet200Response - */ - 'paging'?: Paging; -} -/** - * - * @export - * @interface Entry - */ -export interface Entry { - /** - * - * @type {string} - * @memberof Entry - */ - 'address'?: string; - /** - * - * @type {string} - * @memberof Entry - */ - 'data'?: string; -} -/** - * - * @export - * @interface ModelError - */ -export interface ModelError { - /** - * - * @type {number} - * @memberof ModelError - */ - 'code'?: number; - /** - * - * @type {string} - * @memberof ModelError - */ - 'title'?: string; - /** - * - * @type {string} - * @memberof ModelError - */ - 'message'?: string; -} -/** - * - * @export - * @interface Paging - */ -export interface Paging { - /** - * - * @type {string} - * @memberof Paging - */ - 'start'?: string; - /** - * - * @type {number} - * @memberof Paging - */ - 'limit'?: number; - /** - * - * @type {string} - * @memberof Paging - */ - 'next_position'?: string; - /** - * - * @type {string} - * @memberof Paging - */ - 'next'?: string; -} -/** - * - * @export - * @interface PeersGet200Response - */ -export interface PeersGet200Response { - /** - * - * @type {Array} - * @memberof PeersGet200Response - */ - 'data'?: Array; - /** - * - * @type {string} - * @memberof PeersGet200Response - */ - 'link'?: string; -} -/** - * - * @export - * @interface ReceiptsGet200Response - */ -export interface ReceiptsGet200Response { - /** - * - * @type {Array} - * @memberof ReceiptsGet200Response - */ - 'data'?: Array; - /** - * - * @type {string} - * @memberof ReceiptsGet200Response - */ - 'link'?: string; -} -/** - * - * @export - * @interface StateAddressGet200Response - */ -export interface StateAddressGet200Response { - /** - * - * @type {string} - * @memberof StateAddressGet200Response - */ - 'data'?: string; - /** - * - * @type {string} - * @memberof StateAddressGet200Response - */ - 'head'?: string; - /** - * - * @type {string} - * @memberof StateAddressGet200Response - */ - 'link'?: string; -} -/** - * - * @export - * @interface StateGet200Response - */ -export interface StateGet200Response { - /** - * - * @type {Array} - * @memberof StateGet200Response - */ - 'data'?: Array; - /** - * - * @type {string} - * @memberof StateGet200Response - */ - 'head'?: string; - /** - * - * @type {string} - * @memberof StateGet200Response - */ - 'link'?: string; - /** - * - * @type {Paging} - * @memberof StateGet200Response - */ - 'paging'?: Paging; -} -/** - * - * @export - * @interface StatusGet200Response - */ -export interface StatusGet200Response { - /** - * - * @type {StatusGet200ResponseData} - * @memberof StatusGet200Response - */ - 'data'?: StatusGet200ResponseData; - /** - * - * @type {string} - * @memberof StatusGet200Response - */ - 'link'?: string; -} -/** - * - * @export - * @interface StatusGet200ResponseData - */ -export interface StatusGet200ResponseData { - /** - * - * @type {string} - * @memberof StatusGet200ResponseData - */ - 'endpoint'?: string; - /** - * - * @type {Array} - * @memberof StatusGet200ResponseData - */ - 'peers'?: Array; -} -/** - * - * @export - * @interface StatusGet200ResponseDataPeersInner - */ -export interface StatusGet200ResponseDataPeersInner { - /** - * - * @type {string} - * @memberof StatusGet200ResponseDataPeersInner - */ - 'endpoint'?: string; -} -/** - * - * @export - * @interface Transaction - */ -export interface Transaction { - /** - * - * @type {TransactionHeader} - * @memberof Transaction - */ - 'header': TransactionHeader; - /** - * - * @type {string} - * @memberof Transaction - */ - 'header_signature': string; - /** - * - * @type {string} - * @memberof Transaction - */ - 'payload': string; -} -/** - * - * @export - * @interface TransactionHeader - */ -export interface TransactionHeader { - /** - * - * @type {string} - * @memberof TransactionHeader - */ - 'batcher_public_key': string; - /** - * - * @type {Array} - * @memberof TransactionHeader - */ - 'dependencies': Array; - /** - * - * @type {string} - * @memberof TransactionHeader - */ - 'family_name': string; - /** - * - * @type {string} - * @memberof TransactionHeader - */ - 'family_version': string; - /** - * - * @type {Array} - * @memberof TransactionHeader - */ - 'inputs': Array; - /** - * - * @type {string} - * @memberof TransactionHeader - */ - 'nonce': string; - /** - * - * @type {Array} - * @memberof TransactionHeader - */ - 'outputs': Array; - /** - * - * @type {string} - * @memberof TransactionHeader - */ - 'payload_sha512': string; - /** - * - * @type {string} - * @memberof TransactionHeader - */ - 'signer_public_key': string; -} -/** - * - * @export - * @interface TransactionReceipt - */ -export interface TransactionReceipt { - /** - * - * @type {string} - * @memberof TransactionReceipt - */ - 'transaction_id'?: string; - /** - * - * @type {Array} - * @memberof TransactionReceipt - */ - 'state_changes'?: Array; - /** - * - * @type {Array} - * @memberof TransactionReceipt - */ - 'events'?: Array; - /** - * - * @type {Array} - * @memberof TransactionReceipt - */ - 'data'?: Array; -} -/** - * - * @export - * @interface TransactionReceiptEventsInner - */ -export interface TransactionReceiptEventsInner { - /** - * - * @type {string} - * @memberof TransactionReceiptEventsInner - */ - 'event_type'?: string; - /** - * - * @type {Array} - * @memberof TransactionReceiptEventsInner - */ - 'attributes'?: Array; - /** - * - * @type {string} - * @memberof TransactionReceiptEventsInner - */ - 'data'?: string; -} -/** - * - * @export - * @interface TransactionReceiptEventsInnerAttributesInner - */ -export interface TransactionReceiptEventsInnerAttributesInner { - /** - * - * @type {string} - * @memberof TransactionReceiptEventsInnerAttributesInner - */ - 'key'?: string; - /** - * - * @type {string} - * @memberof TransactionReceiptEventsInnerAttributesInner - */ - 'value'?: string; -} -/** - * - * @export - * @interface TransactionReceiptStateChangesInner - */ -export interface TransactionReceiptStateChangesInner { - /** - * - * @type {string} - * @memberof TransactionReceiptStateChangesInner - */ - 'type'?: string; - /** - * - * @type {string} - * @memberof TransactionReceiptStateChangesInner - */ - 'address'?: string; - /** - * - * @type {string} - * @memberof TransactionReceiptStateChangesInner - */ - 'value'?: string; -} -/** - * - * @export - * @interface TransactionsGet200Response - */ -export interface TransactionsGet200Response { - /** - * - * @type {Array} - * @memberof TransactionsGet200Response - */ - 'data'?: Array; - /** - * - * @type {string} - * @memberof TransactionsGet200Response - */ - 'head'?: string; - /** - * - * @type {string} - * @memberof TransactionsGet200Response - */ - 'link'?: string; - /** - * - * @type {Paging} - * @memberof TransactionsGet200Response - */ - 'paging'?: Paging; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Fetches an array of objects with a status and id for each batch requested. There are four possible statuses with string values `\'COMMITTED\'`, `\'INVALID\'`, `\'PENDING\'`, and `\'UNKNOWN\'`. The batch(es) you want to check can be specified using the `id` filter parameter. If a `wait` time is specified in the URL, the API will wait to respond until all batches are committed, or the time in seconds has elapsed. If the value of `wait` is not set (i.e., `?wait&id=...`), or it is set to any non-integer value other than `false`, the wait time will be just under the API\'s specified timeout (usually 300). Note that because this route does not return full resources, the response will not be paginated, and there will be no `head` or `paging` properties. - * @summary Fetches the committed statuses for a set of batches - * @param {string} id A comma-separated list of batch ids - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - batchStatusesGet: async (id: string, wait?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('batchStatusesGet', 'id', id) - const localVarPath = `/batch_statuses`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - if (wait !== undefined) { - localVarQueryParameter['wait'] = wait; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Identical to `GET /batch_statuses`, but takes ids of batches as a JSON formatted POST body rather than a query parameter. This allows for many more batches to be checked and should be used for more than 15 ids. Note that because query information is not encoded in the URL, no `link` will be returned with this query. - * @summary Fetches the committed statuses for a set of batches - * @param {Array} requestBody A JSON array of batch id strings - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - batchStatusesPost: async (requestBody: Array, wait?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'requestBody' is not null or undefined - assertParamExists('batchStatusesPost', 'requestBody', requestBody) - const localVarPath = `/batch_statuses`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (wait !== undefined) { - localVarQueryParameter['wait'] = wait; - } - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Fetches a particular batch - * @param {string} batchId Batch id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - batchesBatchIdGet: async (batchId: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'batchId' is not null or undefined - assertParamExists('batchesBatchIdGet', 'batchId', batchId) - const localVarPath = `/batches/{batch_id}` - .replace(`{${"batch_id"}}`, encodeURIComponent(String(batchId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches a paginated list of batches from the validator. - * @summary Fetches a list of batches - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - batchesGet: async (head?: string, start?: string, limit?: number, reverse?: string, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/batches`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (head !== undefined) { - localVarQueryParameter['head'] = head; - } - - if (start !== undefined) { - localVarQueryParameter['start'] = start; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (reverse !== undefined) { - localVarQueryParameter['reverse'] = reverse; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Accepts a protobuf formatted `BatchList` as an octet-stream binary file and submits it to the validator to be committed. The API will return immediately with a status of `202`. There will be no `data` object, only a `link` to a `/batch_statuses` endpoint to be polled to check the status of submitted batches. - * @summary Sends a BatchList to the validator - * @param {BatchList} batchList A binary encoded protobuf BatchList - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - batchesPost: async (batchList: BatchList, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'batchList' is not null or undefined - assertParamExists('batchesPost', 'batchList', batchList) - const localVarPath = `/batches`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/octet-stream'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(batchList, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Fetches a particular block - * @param {string} blockId Block id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blocksBlockIdGet: async (blockId: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'blockId' is not null or undefined - assertParamExists('blocksBlockIdGet', 'blockId', blockId) - const localVarPath = `/blocks/{block_id}` - .replace(`{${"block_id"}}`, encodeURIComponent(String(blockId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches a paginated list of blocks from the validator. - * @summary Fetches a list of blocks - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blocksGet: async (head?: string, start?: string, limit?: number, reverse?: string, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/blocks`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (head !== undefined) { - localVarQueryParameter['head'] = head; - } - - if (start !== undefined) { - localVarQueryParameter['start'] = start; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (reverse !== undefined) { - localVarQueryParameter['reverse'] = reverse; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Fetches the endpoints of the authorized peers of the validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - peersGet: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/peers`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches an array of objects for each receipt requested. The receipt(s) you want to retrieve can be specified using the `id` filter parameter, where `id` refers to the transaction id of the transaction the receipt is associated with. - * @summary Fetches the receipts for a set of transactions - * @param {string} id A comma-separated list of transaction ids - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - receiptsGet: async (id: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('receiptsGet', 'id', id) - const localVarPath = `/receipts`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Identical to `GET /receipts`, but takes ids of transactions as a JSON formatted POST body rather than a query parameter. This allows for many more receipts to be fetched and should be used with more than 15 ids. Note that because query information is not encoded in the URL, no `link` will be returned with this request. - * @summary Fetches the receipts for a set of transactions - * @param {Array} requestBody A JSON array of transaction id strings - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - receiptsPost: async (requestBody: Array, wait?: number, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'requestBody' is not null or undefined - assertParamExists('receiptsPost', 'requestBody', requestBody) - const localVarPath = `/receipts`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (wait !== undefined) { - localVarQueryParameter['wait'] = wait; - } - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Takes full 70-character address and fetches a particular leaf. For partial address (i.e., group of leaves) use `/state` above. - * @summary Fetches a particular leaf from the current state - * @param {string} address Radix address of a leaf - * @param {string} [head] Index or id of head block - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - stateAddressGet: async (address: string, head?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'address' is not null or undefined - assertParamExists('stateAddressGet', 'address', address) - const localVarPath = `/state/{address}` - .replace(`{${"address"}}`, encodeURIComponent(String(address))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (head !== undefined) { - localVarQueryParameter['head'] = head; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches a paginated list of entries for the current state, or relative to a particular head block. Using the `address` filter parameter will narrow the list to any entries that have an address beginning with the characters specified. Note that the partial address in `address` parameter should have even number of hexadecimal characters (i.e., complete bytes). - * @summary Fetches the data for the current state - * @param {string} [head] Index or id of head block - * @param {string} [address] A partial address to filter leaves by - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - stateGet: async (head?: string, address?: string, start?: string, limit?: number, reverse?: string, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/state`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (head !== undefined) { - localVarQueryParameter['head'] = head; - } - - if (address !== undefined) { - localVarQueryParameter['address'] = address; - } - - if (start !== undefined) { - localVarQueryParameter['start'] = start; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (reverse !== undefined) { - localVarQueryParameter['reverse'] = reverse; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Fetches information pertaining to the status of the validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - statusGet: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/status`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches a paginated list of transactions from the validator. - * @summary Fetches a list of transactions - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - transactionsGet: async (head?: string, start?: string, limit?: number, reverse?: string, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/transactions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (head !== undefined) { - localVarQueryParameter['head'] = head; - } - - if (start !== undefined) { - localVarQueryParameter['start'] = start; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (reverse !== undefined) { - localVarQueryParameter['reverse'] = reverse; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Fetches a particular transaction - * @param {string} transactionId Transaction id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - transactionsTransactionIdGet: async (transactionId: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'transactionId' is not null or undefined - assertParamExists('transactionsTransactionIdGet', 'transactionId', transactionId) - const localVarPath = `/transactions/{transaction_id}` - .replace(`{${"transaction_id"}}`, encodeURIComponent(String(transactionId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * Fetches an array of objects with a status and id for each batch requested. There are four possible statuses with string values `\'COMMITTED\'`, `\'INVALID\'`, `\'PENDING\'`, and `\'UNKNOWN\'`. The batch(es) you want to check can be specified using the `id` filter parameter. If a `wait` time is specified in the URL, the API will wait to respond until all batches are committed, or the time in seconds has elapsed. If the value of `wait` is not set (i.e., `?wait&id=...`), or it is set to any non-integer value other than `false`, the wait time will be just under the API\'s specified timeout (usually 300). Note that because this route does not return full resources, the response will not be paginated, and there will be no `head` or `paging` properties. - * @summary Fetches the committed statuses for a set of batches - * @param {string} id A comma-separated list of batch ids - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async batchStatusesGet(id: string, wait?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.batchStatusesGet(id, wait, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Identical to `GET /batch_statuses`, but takes ids of batches as a JSON formatted POST body rather than a query parameter. This allows for many more batches to be checked and should be used for more than 15 ids. Note that because query information is not encoded in the URL, no `link` will be returned with this query. - * @summary Fetches the committed statuses for a set of batches - * @param {Array} requestBody A JSON array of batch id strings - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async batchStatusesPost(requestBody: Array, wait?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.batchStatusesPost(requestBody, wait, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Fetches a particular batch - * @param {string} batchId Batch id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async batchesBatchIdGet(batchId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.batchesBatchIdGet(batchId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Fetches a paginated list of batches from the validator. - * @summary Fetches a list of batches - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async batchesGet(head?: string, start?: string, limit?: number, reverse?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.batchesGet(head, start, limit, reverse, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Accepts a protobuf formatted `BatchList` as an octet-stream binary file and submits it to the validator to be committed. The API will return immediately with a status of `202`. There will be no `data` object, only a `link` to a `/batch_statuses` endpoint to be polled to check the status of submitted batches. - * @summary Sends a BatchList to the validator - * @param {BatchList} batchList A binary encoded protobuf BatchList - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async batchesPost(batchList: BatchList, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.batchesPost(batchList, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Fetches a particular block - * @param {string} blockId Block id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async blocksBlockIdGet(blockId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.blocksBlockIdGet(blockId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Fetches a paginated list of blocks from the validator. - * @summary Fetches a list of blocks - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async blocksGet(head?: string, start?: string, limit?: number, reverse?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.blocksGet(head, start, limit, reverse, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Fetches the endpoints of the authorized peers of the validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async peersGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.peersGet(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Fetches an array of objects for each receipt requested. The receipt(s) you want to retrieve can be specified using the `id` filter parameter, where `id` refers to the transaction id of the transaction the receipt is associated with. - * @summary Fetches the receipts for a set of transactions - * @param {string} id A comma-separated list of transaction ids - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async receiptsGet(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.receiptsGet(id, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Identical to `GET /receipts`, but takes ids of transactions as a JSON formatted POST body rather than a query parameter. This allows for many more receipts to be fetched and should be used with more than 15 ids. Note that because query information is not encoded in the URL, no `link` will be returned with this request. - * @summary Fetches the receipts for a set of transactions - * @param {Array} requestBody A JSON array of transaction id strings - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async receiptsPost(requestBody: Array, wait?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.receiptsPost(requestBody, wait, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Takes full 70-character address and fetches a particular leaf. For partial address (i.e., group of leaves) use `/state` above. - * @summary Fetches a particular leaf from the current state - * @param {string} address Radix address of a leaf - * @param {string} [head] Index or id of head block - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async stateAddressGet(address: string, head?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.stateAddressGet(address, head, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Fetches a paginated list of entries for the current state, or relative to a particular head block. Using the `address` filter parameter will narrow the list to any entries that have an address beginning with the characters specified. Note that the partial address in `address` parameter should have even number of hexadecimal characters (i.e., complete bytes). - * @summary Fetches the data for the current state - * @param {string} [head] Index or id of head block - * @param {string} [address] A partial address to filter leaves by - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async stateGet(head?: string, address?: string, start?: string, limit?: number, reverse?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.stateGet(head, address, start, limit, reverse, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Fetches information pertaining to the status of the validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async statusGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.statusGet(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Fetches a paginated list of transactions from the validator. - * @summary Fetches a list of transactions - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async transactionsGet(head?: string, start?: string, limit?: number, reverse?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.transactionsGet(head, start, limit, reverse, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Fetches a particular transaction - * @param {string} transactionId Transaction id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async transactionsTransactionIdGet(transactionId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.transactionsTransactionIdGet(transactionId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * Fetches an array of objects with a status and id for each batch requested. There are four possible statuses with string values `\'COMMITTED\'`, `\'INVALID\'`, `\'PENDING\'`, and `\'UNKNOWN\'`. The batch(es) you want to check can be specified using the `id` filter parameter. If a `wait` time is specified in the URL, the API will wait to respond until all batches are committed, or the time in seconds has elapsed. If the value of `wait` is not set (i.e., `?wait&id=...`), or it is set to any non-integer value other than `false`, the wait time will be just under the API\'s specified timeout (usually 300). Note that because this route does not return full resources, the response will not be paginated, and there will be no `head` or `paging` properties. - * @summary Fetches the committed statuses for a set of batches - * @param {string} id A comma-separated list of batch ids - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - batchStatusesGet(id: string, wait?: number, options?: any): AxiosPromise { - return localVarFp.batchStatusesGet(id, wait, options).then((request) => request(axios, basePath)); - }, - /** - * Identical to `GET /batch_statuses`, but takes ids of batches as a JSON formatted POST body rather than a query parameter. This allows for many more batches to be checked and should be used for more than 15 ids. Note that because query information is not encoded in the URL, no `link` will be returned with this query. - * @summary Fetches the committed statuses for a set of batches - * @param {Array} requestBody A JSON array of batch id strings - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - batchStatusesPost(requestBody: Array, wait?: number, options?: any): AxiosPromise { - return localVarFp.batchStatusesPost(requestBody, wait, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Fetches a particular batch - * @param {string} batchId Batch id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - batchesBatchIdGet(batchId: string, options?: any): AxiosPromise { - return localVarFp.batchesBatchIdGet(batchId, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches a paginated list of batches from the validator. - * @summary Fetches a list of batches - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - batchesGet(head?: string, start?: string, limit?: number, reverse?: string, options?: any): AxiosPromise { - return localVarFp.batchesGet(head, start, limit, reverse, options).then((request) => request(axios, basePath)); - }, - /** - * Accepts a protobuf formatted `BatchList` as an octet-stream binary file and submits it to the validator to be committed. The API will return immediately with a status of `202`. There will be no `data` object, only a `link` to a `/batch_statuses` endpoint to be polled to check the status of submitted batches. - * @summary Sends a BatchList to the validator - * @param {BatchList} batchList A binary encoded protobuf BatchList - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - batchesPost(batchList: BatchList, options?: any): AxiosPromise { - return localVarFp.batchesPost(batchList, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Fetches a particular block - * @param {string} blockId Block id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blocksBlockIdGet(blockId: string, options?: any): AxiosPromise { - return localVarFp.blocksBlockIdGet(blockId, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches a paginated list of blocks from the validator. - * @summary Fetches a list of blocks - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blocksGet(head?: string, start?: string, limit?: number, reverse?: string, options?: any): AxiosPromise { - return localVarFp.blocksGet(head, start, limit, reverse, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Fetches the endpoints of the authorized peers of the validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - peersGet(options?: any): AxiosPromise { - return localVarFp.peersGet(options).then((request) => request(axios, basePath)); - }, - /** - * Fetches an array of objects for each receipt requested. The receipt(s) you want to retrieve can be specified using the `id` filter parameter, where `id` refers to the transaction id of the transaction the receipt is associated with. - * @summary Fetches the receipts for a set of transactions - * @param {string} id A comma-separated list of transaction ids - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - receiptsGet(id: string, options?: any): AxiosPromise { - return localVarFp.receiptsGet(id, options).then((request) => request(axios, basePath)); - }, - /** - * Identical to `GET /receipts`, but takes ids of transactions as a JSON formatted POST body rather than a query parameter. This allows for many more receipts to be fetched and should be used with more than 15 ids. Note that because query information is not encoded in the URL, no `link` will be returned with this request. - * @summary Fetches the receipts for a set of transactions - * @param {Array} requestBody A JSON array of transaction id strings - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - receiptsPost(requestBody: Array, wait?: number, options?: any): AxiosPromise { - return localVarFp.receiptsPost(requestBody, wait, options).then((request) => request(axios, basePath)); - }, - /** - * Takes full 70-character address and fetches a particular leaf. For partial address (i.e., group of leaves) use `/state` above. - * @summary Fetches a particular leaf from the current state - * @param {string} address Radix address of a leaf - * @param {string} [head] Index or id of head block - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - stateAddressGet(address: string, head?: string, options?: any): AxiosPromise { - return localVarFp.stateAddressGet(address, head, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches a paginated list of entries for the current state, or relative to a particular head block. Using the `address` filter parameter will narrow the list to any entries that have an address beginning with the characters specified. Note that the partial address in `address` parameter should have even number of hexadecimal characters (i.e., complete bytes). - * @summary Fetches the data for the current state - * @param {string} [head] Index or id of head block - * @param {string} [address] A partial address to filter leaves by - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - stateGet(head?: string, address?: string, start?: string, limit?: number, reverse?: string, options?: any): AxiosPromise { - return localVarFp.stateGet(head, address, start, limit, reverse, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Fetches information pertaining to the status of the validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - statusGet(options?: any): AxiosPromise { - return localVarFp.statusGet(options).then((request) => request(axios, basePath)); - }, - /** - * Fetches a paginated list of transactions from the validator. - * @summary Fetches a list of transactions - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - transactionsGet(head?: string, start?: string, limit?: number, reverse?: string, options?: any): AxiosPromise { - return localVarFp.transactionsGet(head, start, limit, reverse, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Fetches a particular transaction - * @param {string} transactionId Transaction id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - transactionsTransactionIdGet(transactionId: string, options?: any): AxiosPromise { - return localVarFp.transactionsTransactionIdGet(transactionId, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * Fetches an array of objects with a status and id for each batch requested. There are four possible statuses with string values `\'COMMITTED\'`, `\'INVALID\'`, `\'PENDING\'`, and `\'UNKNOWN\'`. The batch(es) you want to check can be specified using the `id` filter parameter. If a `wait` time is specified in the URL, the API will wait to respond until all batches are committed, or the time in seconds has elapsed. If the value of `wait` is not set (i.e., `?wait&id=...`), or it is set to any non-integer value other than `false`, the wait time will be just under the API\'s specified timeout (usually 300). Note that because this route does not return full resources, the response will not be paginated, and there will be no `head` or `paging` properties. - * @summary Fetches the committed statuses for a set of batches - * @param {string} id A comma-separated list of batch ids - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public batchStatusesGet(id: string, wait?: number, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).batchStatusesGet(id, wait, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Identical to `GET /batch_statuses`, but takes ids of batches as a JSON formatted POST body rather than a query parameter. This allows for many more batches to be checked and should be used for more than 15 ids. Note that because query information is not encoded in the URL, no `link` will be returned with this query. - * @summary Fetches the committed statuses for a set of batches - * @param {Array} requestBody A JSON array of batch id strings - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public batchStatusesPost(requestBody: Array, wait?: number, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).batchStatusesPost(requestBody, wait, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Fetches a particular batch - * @param {string} batchId Batch id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public batchesBatchIdGet(batchId: string, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).batchesBatchIdGet(batchId, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches a paginated list of batches from the validator. - * @summary Fetches a list of batches - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public batchesGet(head?: string, start?: string, limit?: number, reverse?: string, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).batchesGet(head, start, limit, reverse, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Accepts a protobuf formatted `BatchList` as an octet-stream binary file and submits it to the validator to be committed. The API will return immediately with a status of `202`. There will be no `data` object, only a `link` to a `/batch_statuses` endpoint to be polled to check the status of submitted batches. - * @summary Sends a BatchList to the validator - * @param {BatchList} batchList A binary encoded protobuf BatchList - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public batchesPost(batchList: BatchList, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).batchesPost(batchList, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Fetches a particular block - * @param {string} blockId Block id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public blocksBlockIdGet(blockId: string, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).blocksBlockIdGet(blockId, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches a paginated list of blocks from the validator. - * @summary Fetches a list of blocks - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public blocksGet(head?: string, start?: string, limit?: number, reverse?: string, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).blocksGet(head, start, limit, reverse, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Fetches the endpoints of the authorized peers of the validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public peersGet(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).peersGet(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches an array of objects for each receipt requested. The receipt(s) you want to retrieve can be specified using the `id` filter parameter, where `id` refers to the transaction id of the transaction the receipt is associated with. - * @summary Fetches the receipts for a set of transactions - * @param {string} id A comma-separated list of transaction ids - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public receiptsGet(id: string, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).receiptsGet(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Identical to `GET /receipts`, but takes ids of transactions as a JSON formatted POST body rather than a query parameter. This allows for many more receipts to be fetched and should be used with more than 15 ids. Note that because query information is not encoded in the URL, no `link` will be returned with this request. - * @summary Fetches the receipts for a set of transactions - * @param {Array} requestBody A JSON array of transaction id strings - * @param {number} [wait] A time in seconds to wait for commit - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public receiptsPost(requestBody: Array, wait?: number, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).receiptsPost(requestBody, wait, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Takes full 70-character address and fetches a particular leaf. For partial address (i.e., group of leaves) use `/state` above. - * @summary Fetches a particular leaf from the current state - * @param {string} address Radix address of a leaf - * @param {string} [head] Index or id of head block - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public stateAddressGet(address: string, head?: string, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).stateAddressGet(address, head, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches a paginated list of entries for the current state, or relative to a particular head block. Using the `address` filter parameter will narrow the list to any entries that have an address beginning with the characters specified. Note that the partial address in `address` parameter should have even number of hexadecimal characters (i.e., complete bytes). - * @summary Fetches the data for the current state - * @param {string} [head] Index or id of head block - * @param {string} [address] A partial address to filter leaves by - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public stateGet(head?: string, address?: string, start?: string, limit?: number, reverse?: string, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).stateGet(head, address, start, limit, reverse, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Fetches information pertaining to the status of the validator - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public statusGet(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).statusGet(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetches a paginated list of transactions from the validator. - * @summary Fetches a list of transactions - * @param {string} [head] Index or id of head block - * @param {string} [start] Id to start paging (inclusive) - * @param {number} [limit] Number of items to return - * @param {string} [reverse] If the list should be reversed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public transactionsGet(head?: string, start?: string, limit?: number, reverse?: string, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).transactionsGet(head, start, limit, reverse, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Fetches a particular transaction - * @param {string} transactionId Transaction id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public transactionsTransactionIdGet(transactionId: string, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).transactionsTransactionIdGet(transactionId, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/base.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/base.ts deleted file mode 100644 index 4783e46717..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sawtooth REST API - * Official Sawtooth REST API specification with some modifications from Hyperledger Cacti project. - * - * The version of the OpenAPI document: 0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/common.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/common.ts deleted file mode 100644 index 881ab993b0..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sawtooth REST API - * Official Sawtooth REST API specification with some modifications from Hyperledger Cacti project. - * - * The version of the OpenAPI document: 0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/configuration.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/configuration.ts deleted file mode 100644 index 878723253d..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sawtooth REST API - * Official Sawtooth REST API specification with some modifications from Hyperledger Cacti project. - * - * The version of the OpenAPI document: 0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/index.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/index.ts deleted file mode 100644 index 94ed37341a..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/sawtooth-api/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Sawtooth REST API - * Official Sawtooth REST API specification with some modifications from Hyperledger Cacti project. - * - * The version of the OpenAPI document: 0.8.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/types/model-type-guards.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/types/model-type-guards.ts deleted file mode 100644 index 00f01198ec..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/types/model-type-guards.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - WatchBlocksV1CactiTransactionsResponse, - WatchBlocksV1FullResponse, -} from "../generated/openapi/typescript-axios/api"; - -export function isWatchBlocksV1CactiTransactionsResponse( - response: unknown, -): response is WatchBlocksV1CactiTransactionsResponse { - const typedResponse = response as WatchBlocksV1CactiTransactionsResponse; - return typeof typedResponse.cactiTransactionsEvents !== "undefined"; -} - -export function isWatchBlocksV1FullResponse( - response: unknown, -): response is WatchBlocksV1FullResponse { - const typedResponse = response as WatchBlocksV1FullResponse; - return typeof typedResponse.fullBlock !== "undefined"; -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/web-services/status-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/web-services/status-endpoint-v1.ts deleted file mode 100644 index 392ad28ae3..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/web-services/status-endpoint-v1.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * OpenAPI endpoint (GET) for reading status of the plugin and validator - */ - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import type { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; -import { PluginLedgerConnectorSawtooth } from "../plugin-ledger-connector-sawtooth"; - -import type { Express, Request, Response } from "express"; - -export interface IStatusEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorSawtooth; -} - -/** - * OpenAPI endpoint (GET) for reading status of the plugin and validator - */ -export class StatusEndpointV1 implements IWebServiceEndpoint { - private readonly log: Logger; - - public get className(): string { - return "StatusEndpointV1"; - } - - constructor(public readonly options: IStatusEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): any { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-sawtooth/status" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - res.status(200).json(await this.options.connector.getStatus()); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts deleted file mode 100644 index 5f1095cece..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts +++ /dev/null @@ -1,239 +0,0 @@ -import * as cbor from "cbor"; -import type { Socket as SocketIoSocket } from "socket.io"; - -import { - Logger, - LogLevelDesc, - LoggerProvider, - Checks, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import { - WatchBlocksV1Progress, - WatchBlocksV1, - WatchBlocksV1ListenerType, - WatchBlocksV1TransactionFilter, - WatchBlocksV1Options, -} from "../generated/openapi/typescript-axios"; -import { Block, DefaultApi as SawtoothRestApi } from "../sawtooth-api"; - -const DEFAULT_POLL_TIME = 1000 * 5; // Poll every 5 seconds by default - -export interface IWatchBlocksV1EndpointConfiguration { - logLevel?: LogLevelDesc; - socket: SocketIoSocket; - sawtoothApiClient: SawtoothRestApi; - options?: WatchBlocksV1Options; - pollTime?: number; -} - -export class WatchBlocksV1Endpoint { - private readonly log: Logger; - private readonly socket: SocketIoSocket< - Record void>, - Record void> - >; - private currentBlockHeight = 0; - private monitoringInterval?: NodeJS.Timer; - private isRoutineRunning = false; - - public get className(): string { - return "WatchBlocksV1Endpoint"; - } - - constructor(public readonly config: IWatchBlocksV1EndpointConfiguration) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(config, `${fnTag} arg options`); - Checks.truthy(config.socket, `${fnTag} arg options.socket`); - Checks.truthy( - config.sawtoothApiClient, - `${fnTag} arg options.sawtoothApiClient`, - ); - - this.socket = config.socket; - - const level = this.config.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - /** - * Convert block number (example: 1, 42, etc..) to Sawtooth block number (example: 0x000000000000002a) - * - * @param blockNumber decimal block number - * @returns hexadecimal padded block number - */ - private toSawtoothBlockNumber(blockNumber: number) { - return "0x" + blockNumber.toString(16).padStart(16, "0"); - } - - /** - * Send Sawtooth transaction with custom cacti fields to a client (through socket) - * - * @param block sawtooth block - * @param txFilterBy optional filtering configuration - */ - private async sendCactiTransactions( - block: Block, - txFilterBy?: WatchBlocksV1TransactionFilter, - ) { - const cactiTransactionsEvents = block.batches - .flatMap((block) => block.transactions) - .filter((tx) => { - if (txFilterBy && txFilterBy.family_name) { - return tx.header.family_name === txFilterBy.family_name; - } - }) - .map((tx) => { - return { - ...tx, - payload_decoded: cbor.decodeAllSync( - Buffer.from(tx.payload, "base64"), - ), - }; - }); - - if (cactiTransactionsEvents.length > 0) { - this.log.debug( - `Sending ${cactiTransactionsEvents.length} transactions to the client`, - ); - this.socket.emit(WatchBlocksV1.Next, { - cactiTransactionsEvents, - }); - } - } - - /** - * Routine called periodically to monitor for new blocks. - * Will fetch blocks not seen yet and push them to client (based on supplied type). - * - * @param type response type format (full block, transactions, etc...) - * @param txFilterBy transactions filter (only when returning transactions) - * @returns void - */ - private async monitoringRoutine( - type?: WatchBlocksV1ListenerType, - txFilterBy?: WatchBlocksV1TransactionFilter, - ) { - if (this.isRoutineRunning) { - this.log.info( - "Previous monitoring routine didn't finish, ignore this call...", - ); - return; - } - - this.isRoutineRunning = true; - - try { - // Fetch new blocks - const newBlocksResponse = await this.config.sawtoothApiClient.blocksGet( - undefined, - this.toSawtoothBlockNumber(this.currentBlockHeight), - undefined, - "", - ); - const newBlocks = newBlocksResponse.data.data ?? []; - this.log.debug( - `monitoringRoutine() - received ${newBlocks.length} blocks since block #${this.currentBlockHeight}`, - ); - - for (const block of newBlocks) { - const thisBlockNumber = block.header.block_num; - if (thisBlockNumber === this.currentBlockHeight) { - continue; - } - - // Prase block according to supplied type - switch (type) { - case WatchBlocksV1ListenerType.CactiTransactions: - await this.sendCactiTransactions(block, txFilterBy); - break; - // Return full block by default - case WatchBlocksV1ListenerType.Full: - default: - this.log.debug( - `Sending full block #${this.currentBlockHeight} to the client`, - ); - this.socket.emit(WatchBlocksV1.Next, { - fullBlock: block, - }); - break; - } - - if (this.currentBlockHeight < thisBlockNumber) { - this.currentBlockHeight = thisBlockNumber; - this.log.debug("New currentBlockHeight:", this.currentBlockHeight); - } - } - } catch (error) { - this.log.error("monitoringRoutine error:", safeStringifyException(error)); - } finally { - this.isRoutineRunning = false; - } - } - - /** - * Subscribe to new blocks from sawtooth - * - * @returns void - */ - public async subscribe(): Promise { - const { socket, log } = this; - log.debug(`${WatchBlocksV1.Subscribe} => ${socket.id}`); - - // Get latest block number - const latestBlockResponse = await this.config.sawtoothApiClient.blocksGet( - undefined, - undefined, - 1, - ); - const latestBlock = latestBlockResponse.data.data; - if (!latestBlock || latestBlock.length !== 1) { - throw new Error( - "Invalid response when fetching latest block from Sawtooth REST API", - ); - } - - this.currentBlockHeight = latestBlock[0].header?.block_num ?? 0; - if (this.currentBlockHeight > 0) { - this.currentBlockHeight--; - } - this.log.info( - this.className, - "currentBlockHeight:", - this.currentBlockHeight, - ); - - const pollTime = this.config.pollTime ?? DEFAULT_POLL_TIME; - this.log.info("Starting monitoring routine with poll time", pollTime); - this.monitoringInterval = setInterval(() => { - this.monitoringRoutine( - this.config.options?.type, - this.config.options?.txFilterBy, - ); - }, pollTime); - - socket.on("disconnect", async (reason: string) => { - log.debug("WebSocket:disconnect reason=%o", reason); - this.close(); - }); - - socket.on(WatchBlocksV1.Unsubscribe, async () => { - log.debug(`${WatchBlocksV1.Unsubscribe}: unsubscribing...`); - this.close(); - }); - } - - /** - * Disconnect the socket if connected and stop monitoring routine. - */ - close(): void { - if (this.monitoringInterval) { - clearInterval(this.monitoringInterval); - this.monitoringInterval = undefined; - } - if (this.socket.connected) { - this.socket.disconnect(true); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/test/typescript/integration/sawtooth-monitoring-endpoints.test.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/test/typescript/integration/sawtooth-monitoring-endpoints.test.ts deleted file mode 100644 index 19a117b277..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/test/typescript/integration/sawtooth-monitoring-endpoints.test.ts +++ /dev/null @@ -1,297 +0,0 @@ -/** - * Tests for Sawtooth connector monitoring endpoint and status endpoint (used for sanity check) - */ - -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { v4 as uuidV4 } from "uuid"; -import { AddressInfo } from "net"; -import { Server as SocketIoServer } from "socket.io"; -import type { Subscription } from "rxjs"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { - SawtoothTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - isWatchBlocksV1CactiTransactionsResponse, - isWatchBlocksV1FullResponse, - PluginLedgerConnectorSawtooth, - SawtoothApiClient, - WatchBlocksV1ListenerType, - WatchBlocksV1Progress, -} from "../../../main/typescript/public-api"; - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; -const testTimeout = 1000 * 60 * 5; // 5 minutes timeout for async tests -const setupTimeout = 1000 * 60 * 5; // 5 minutes timeout for setup -const watchBlocksPollTime = 1000 * 3; // 3 seconds - -// Ledger settings -const containerImageName = "ghcr.io/hyperledger/cactus-sawtooth-all-in-one"; -const containerImageVersion = "2022-11-21-9da24a0"; - -// 1. leaveLedgerRunning = true, useRunningLedger = false to run ledger and leave it running after test finishes. -// 2. leaveLedgerRunning = true, useRunningLedger = true to use that ledger in future runs. -const useRunningLedger = false; -const leaveLedgerRunning = false; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "sawtooth-monitoring-endpoints.test", - level: testLogLevel, -}); - -describe("Sawtooth monitoring endpoints tests", () => { - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - let ledger: SawtoothTestLedger; - let connector: PluginLedgerConnectorSawtooth; - let apiClient: SawtoothApiClient; - - ////////////////////////////////// - // Helpers - ////////////////////////////////// - - /** - * Common logic for executing watchBlock monitoring tests. - * Will subscribe to new blocks and send new transaction, to trigger creation of the new block. - * - * @param monitorName Unique name, will be used for identification and in transaction argument. - * @param type Type of block to receive. - * @param checkEventCallback Callback called when received the event from the connector. - * - * @returns void - just await for test to finish - */ - async function testWatchBlock( - monitorName: string, - type: WatchBlocksV1ListenerType, - checkEventCallback: (event: WatchBlocksV1Progress) => void, - ) { - let subscription: Subscription | undefined = undefined; - - // Start monitoring - const monitorPromise = new Promise((resolve, reject) => { - const watchObservable = apiClient.watchBlocksV1({ - type, - txFilterBy: { - family_name: "intkey", - }, - }); - - subscription = watchObservable.subscribe({ - next(event) { - log.debug("Received event:", JSON.stringify(event)); - try { - checkEventCallback(event); - subscription?.unsubscribe(); - resolve(true); - } catch (err) { - log.error("watchBlocksV1() event check error:", err); - subscription?.unsubscribe(); - reject(err); - } - }, - error(err) { - log.error("watchBlocksV1() error:", err); - subscription?.unsubscribe(); - reject(err); - }, - }); - }); - - // Wait for at least one monitor routine to finish before sending transactions - await new Promise((resolve) => - setTimeout(resolve, 2 * watchBlocksPollTime), - ); - - // Create new asset to trigger new block creation - let keyId = 1; - while (keyId++) { - const sleepPromise: Promise = new Promise((resolve) => - setTimeout(resolve, watchBlocksPollTime), - ); - - // infinite loop - // Set new key - const keyName = monitorName + keyId; - await ledger.runSawtoothShell(["intkey", "set", keyName, "42"]); - await ledger.runSawtoothShell(["intkey", "inc", keyName, "11"]); - - // Wait for 2 seconds or for new block to arrive - const resolvedValue = await Promise.race([monitorPromise, sleepPromise]); - log.debug("Monitor: resolvedValue", resolvedValue); - if (resolvedValue) { - log.info("Resolved watchBlock promise"); - await Promise.all([monitorPromise, sleepPromise]); - break; - } - } - } - - ////////////////////////////////// - // Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - log.info(`Start Ledger ${containerImageName}:${containerImageVersion}...`); - ledger = new SawtoothTestLedger({ - containerImageName, - containerImageVersion, - emitContainerLogs: false, - logLevel: sutLogLevel, - useRunningLedger, - }); - await ledger.start(); - const ledgerRestApi = await ledger.getRestApiHost(); - log.info(`Ledger started, API: ${ledgerRestApi}`); - - log.info("Setup ApiServer..."); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - apiClient = new SawtoothApiClient(new Configuration({ basePath: apiHost })); - - log.info("Setup Connector..."); - connector = new PluginLedgerConnectorSawtooth({ - instanceId: uuidV4(), - logLevel: testLogLevel, - sawtoothRestApiEndpoint: ledgerRestApi, - watchBlocksPollTime, - }); - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - }, setupTimeout); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (apiClient) { - log.info("Close ApiClient connections..."); - apiClient.close(); - } - - if (server) { - log.info("Stop the HTTP and SocketIO server connector..."); - await Servers.shutdown(server); - } - - if (connector) { - log.info("Shutdown Sawtooth connector..."); - connector.shutdown(); - } - - if (ledger && !leaveLedgerRunning) { - log.info("Stop the sawtooth ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }); - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - test("get status returns valid response", async () => { - const statusResponse = await apiClient.getStatusV1(); - expect(statusResponse).toBeTruthy(); - expect(statusResponse.status).toBe(200); - const status = statusResponse.data; - expect(status).toBeTruthy(); - expect(status.instanceId).toBeTruthy(); - expect(status.openApiSpecVersion).toBeTruthy(); - expect(status.initialized).toBeTrue(); - expect(status.sawtoothStatus).toBeTruthy(); - }); - - test( - "watchBlocksV1 returns cacti transactions", - async () => { - await testWatchBlock( - "cactiTx", - WatchBlocksV1ListenerType.CactiTransactions, - (event) => { - // Check response body - if (!isWatchBlocksV1CactiTransactionsResponse(event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify( - event, - )}`, - ); - } - - for (const tx of event.cactiTransactionsEvents) { - expect(tx).toBeTruthy(); - expect(tx.header).toBeTruthy(); - expect(tx.header_signature).toBeTruthy(); - expect(tx.payload).toBeTruthy(); - expect(tx.payload_decoded).toBeTruthy(); - } - - log.info("Received cactiTransactionsEvents passed validation - OK!"); - }, - ); - }, - testTimeout, - ); - - test( - "watchBlocksV1 returns full blocks", - async () => { - await testWatchBlock( - "cactiFullBlock", - WatchBlocksV1ListenerType.Full, - (event) => { - // Check response body - if (!isWatchBlocksV1FullResponse(event)) { - throw new Error( - `Unexpected response from the connector: ${JSON.stringify( - event, - )}`, - ); - } - - const block = event.fullBlock; - expect(block).toBeTruthy(); - expect(block.batches).toBeTruthy(); - expect(block.header).toBeTruthy(); - expect(block.header_signature).toBeTruthy(); - - log.info("Received cactiTransactionsEvents passed validation - OK!"); - }, - ); - }, - testTimeout, - ); -}); diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/tsconfig.json b/packages/cactus-plugin-ledger-connector-sawtooth/tsconfig.json deleted file mode 100644 index d1a49384e9..0000000000 --- a/packages/cactus-plugin-ledger-connector-sawtooth/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib", - "declarationDir": "./dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ledger-connector-sawtooth.tsbuildinfo" - }, - "include": ["./src", "src/**/*.json"], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/CHANGELOG.md b/packages/cactus-plugin-ledger-connector-xdai/CHANGELOG.md deleted file mode 100644 index b37212db32..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/CHANGELOG.md +++ /dev/null @@ -1,221 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-xdai - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-xdai - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-xdai - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cacti/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cacti/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-xdai - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-xdai - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-xdai - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-xdai - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-xdai - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-xdai - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Bug Fixes - -* **security:** close DDoS vulnerability in eth tx consistenty strategy ([64b61a7](https://github.com/hyperledger/cactus/commit/64b61a742a885f0027543bc620b5db08b5444669)), closes [#2001](https://github.com/hyperledger/cactus/issues/2001) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* **connector-besu/quorum/xdai:** unvalidated dynamic method call ([bdc1aba](https://github.com/hyperledger/cactus/commit/bdc1aba982cc2ec1a74b0458c98ceeacc7acb9e7)), closes [#1911](https://github.com/hyperledger/cactus/issues/1911) - -### Features - -* **connector-xdai:** remove hard dependency on keychain ([da793c5](https://github.com/hyperledger/cactus/commit/da793c568260fd70b80f855833bc60c116099a65)), closes [#1162](https://github.com/hyperledger/cactus/issues/1162) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* fixes 1445 and implementing correct interface types ([9022064](https://github.com/hyperledger/cactus/commit/9022064e245a92f71d2d303d77bfdaf64d1b1678)), closes [#1445](https://github.com/hyperledger/cactus/issues/1445) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-ledger-connector-xdai - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Bug Fixes - -* openapi validation test for xdai plugin ([ba8a784](https://github.com/hyperledger/cactus/commit/ba8a784bb01bde2c8daf27f4a09965ea2dbb9f04)), closes [#1288](https://github.com/hyperledger/cactus/issues/1288) [#847](https://github.com/hyperledger/cactus/issues/847) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **prometheus:** metrics.ts leaks to global registry [#1202](https://github.com/hyperledger/cactus/issues/1202) ([ce076d7](https://github.com/hyperledger/cactus/commit/ce076d709f8e0cba143f8fe9d71f1de1df8f71dc)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Bug Fixes - -* **connector-corda:** fix build broken by operationId rename ([291dd3b](https://github.com/hyperledger/cactus/commit/291dd3bc666939fffbc3780eaefd9059c756878a)) - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) -* **connector-xdai:** add missing hasTransactionFinality ([cc4f3e1](https://github.com/hyperledger/cactus/commit/cc4f3e141da9292b8db5b0261a3347b3ba9c0689)) -* **connector-xdai:** web3.eth.estimateGas, works considering called solidity method do not throw an exception. So, for method having modifier with access control on msg.sender calling estimateGas without from field throws error.to make it work ,transactionConfig.from = web3SigningCredential.ethAccount before calling estimateGas ([63f5ff6](https://github.com/hyperledger/cactus/commit/63f5ff62b20aaf4dfdb5dd48a24dabc3342a0868)) - -### Features - -* **connector-xdai:** add interval to pollForTxReceipt ([40be742](https://github.com/hyperledger/cactus/commit/40be74234f3bbd059fbc41f61890d25eec1d6ff8)) -* **connector-xdai:** add ledger connector plugin for xdai [#852](https://github.com/hyperledger/cactus/issues/852) ([99399a3](https://github.com/hyperledger/cactus/commit/99399a3bd5020c66d2899aca500a880777b6523d)) -* **core-api:** plugin async initializer method ([9678c2e](https://github.com/hyperledger/cactus/commit/9678c2e9288a73589e84f9fd254c26aed6a93297)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* **connector-xdai:** add missing hasTransactionFinality ([cc4f3e1](https://github.com/hyperledger/cactus/commit/cc4f3e141da9292b8db5b0261a3347b3ba9c0689)) - -### Features - -* **connector-xdai:** add ledger connector plugin for xdai [#852](https://github.com/hyperledger/cactus/issues/852) ([99399a3](https://github.com/hyperledger/cactus/commit/99399a3bd5020c66d2899aca500a880777b6523d)) diff --git a/packages/cactus-plugin-ledger-connector-xdai/README.md b/packages/cactus-plugin-ledger-connector-xdai/README.md deleted file mode 100644 index e6c110a9bd..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/README.md +++ /dev/null @@ -1,160 +0,0 @@ -# `@hyperledger/cactus-plugin-ledger-connector-xdai` - -This plugin provides `Cactus` a way to interact with Xdai networks. Using this we can perform: -* Deploy Smart-contracts through bytecode. -* Build and sign transactions using different keystores. -* Invoke smart-contract functions that we have deployed on the network. -## Summary - - - [Getting Started](#getting-started) - - [Architecture](#architecture) - - [Usage](#usage) - - [Prometheus Exporter](#prometheus-exporter) - - [Runing the tests](#running-the-tests) - - [Built With](#built-with) - - [Contributing](#contributing) - - [License](#license) - - [Acknowledgments](#acknowledgments) - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project to install the dependencies execute the command: -```sh -npm run configure -``` - -### Compiling - -In the project root folder, run this command to compile the plugin and create the dist directory: -```sh -npm run tsc -``` - -### Architecture -The sequence diagrams for various endpoints are mentioned below - -#### run-transaction-endpoint -![run-transaction-endpoint sequence diagram](docs/architecture/images/run-transaction-endpoint.png) -The above diagram shows the sequence diagram of run-transaction-endpoint. User A (One of the many Users) interacts with the API Client which in turn, calls the API server. API server then executes transact() method which is explained in detailed in the subsequent diagrams. -![run-transaction-endpoint transact() method](docs/architecture/images/run-transaction-endpoint-transact.png) -The above diagram shows the sequence diagram of transact() method of the PluginLedgerConnectorXdai class. The caller to this function, which in reference to the above sequence diagram is API server, sends RunTransactionV1Request object as an argument to the transact() method. Based on the type of Web3SigningCredentialType, corresponsing responses are sent back to the caller. -![run-transaction-endpoint transactCactusKeychainRef() method](docs/architecture/images/run-transaction-endpoint-transact-cactuskeychainref.png) -The above diagram shows transactCactusKeychainReference() method being called by the transact() method of the PluginLedgerConnector class when the Web3SigningCredentialType is CACTUSKEYCHAINREF. This method inturn calls transactPrivateKey() which calls the signTransaction() method of web3 library. -![runtransaction-endpoint transactPrivateKey() method](docs/architecture/images/run-transaction-endpoint-transact-privatekey.png) -The above diagram shows transactPrivateKey() method being called by the transact() method of the PluginLedgerConnector class when the Web3SigningCredentialType is PRIVATEKEYHEX. This method then calls the signTransaction() method of the web3 library. -![run-transaction-endpoint transactSigned() method](docs/architecture/images/run-transaction-endpoint-transact-signed.png) -The above diagram shows transactSigned() method being called by the transact() method of the PluginLedgerConnector class when the Web3SigningCredentialType is NONE. This method calls the sendSignedTransaction() of the web3 library and then calls pollForTxReceipt() method. -![run-transaction-endpoint pollForTxReceipt() method](docs/architecture/images/run-transaction-endpoint-transact-pollfortxreceipt.png) -The above diagram shows pollForTxReceipt() method which is called by the transactSigned() method as described in the previous sequence diagram. This method waits for the block confirmation in a loop and then sends the corresponding response back to the caller. - -### Usage - -To use this import public-api and create new **PluginFactoryLedgerConnector**. Then use it to create a connector. -```typescript -const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.LOCAL, - }); - const connector: PluginLedgerConnectorXdai = await factory.create({ - rpcApiHttpHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry(), - }); -``` -You can make calls through the connector to the plugin API: - -```typescript -async invokeContract(req: InvokeContractV1Request):Promise; -async transactSigned(rawTransaction: string): Promise; -async transactPrivateKey(req: RunTransactionV1Request): Promise; -async transactCactusKeychainRef(req: RunTransactionV1Request):Promise; -async deployContract(req: DeployContractV1Request):Promise; -async signTransaction(req: SignTransactionRequest):Promise>; -``` - -Call example to deploy a contract: -```typescript -const deployOut = await connector.deployContract({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: xdaiKeyPair.privateKey, - type: Web3SigningCredentialType.PRIVATEKEYHEX, - }, - bytecode: SmartContractJson.bytecode, - gas: 1000000, -}); -``` -The field "type" can have the following values: -```typescript -enum Web3SigningCredentialType { - CACTUSKEYCHAINREF = 'CACTUS_KEYCHAIN_REF', - GETHKEYCHAINPASSWORD = 'GETH_KEYCHAIN_PASSWORD', - PRIVATEKEYHEX = 'PRIVATE_KEY_HEX', - NONE = 'NONE' -} -``` -> Extensive documentation and examples in the [readthedocs](https://readthedocs.org/projects/hyperledger-cactus/) (WIP) - -## Prometheus Exporter - -This class creates a prometheus exporter, which scrapes the transactions (total transaction count) for the use cases incorporating the use of Xdai connector plugin. - -### Prometheus Exporter Usage -The prometheus exporter object is initialized in the `PluginLedgerConnectorXdai` class constructor itself, so instantiating the object of the `PluginLedgerConnectorXdai` class, gives access to the exporter object. -You can also initialize the prometheus exporter object seperately and then pass it to the `IPluginLedgerConnectorXdaiOptions` interface for `PluginLedgerConnectoXdai` constructor. - -`getPrometheusMetricsV1` function returns the prometheus exporter metrics, currently displaying the total transaction count, which currently increments everytime the `transact()` method of the `PluginLedgerConnectorXdai` class is called. - -### Prometheus Integration -To use Prometheus with this exporter make sure to install [Prometheus main component](https://prometheus.io/download/). -Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml - -```(yaml) -- job_name: 'xdai_ledger_connector_exporter' - metrics_path: api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics - scrape_interval: 5s - static_configs: - - targets: ['{host}:{port}'] -``` - -Here the `host:port` is where the prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/plugin-ledger-connector-xdai/deploy-contract/deploy-contract-from-json.test.ts) exposes it over `0.0.0.0` and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) -`Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics` - -Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. -On the prometheus graphical interface (defaulted to http://localhost:9090), choose **Graph** from the menu bar, then select the **Console** tab. From the **Insert metric at cursor** drop down, select **cactus_xdai_total_tx_count** and click **execute** - -### Helper code - -###### response.type.ts -This file contains the various responses of the metrics. - -###### data-fetcher.ts -This file contains functions encasing the logic to process the data points - -###### metrics.ts -This file lists all the prometheus metrics and what they are used for. - -## Running the tests - -To check that all has been installed correctly and that the pugin has no errors run the tests: - -* Run this command at the project's root: -```sh -npm run test:plugin-ledger-connector-xdai -``` - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments diff --git a/packages/cactus-plugin-ledger-connector-xdai/openapitools.json b/packages/cactus-plugin-ledger-connector-xdai/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/package.json b/packages/cactus-plugin-ledger-connector-xdai/package.json deleted file mode 100644 index 54dd614639..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-ledger-connector-xdai", - "version": "2.0.0", - "description": "Allows Cactus nodes to connect to a Xdai ledger.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-ledger-connector-xdai.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "axios": "1.7.7", - "express": "4.21.0", - "joi": "17.13.3", - "openapi-types": "12.1.3", - "prom-client": "15.1.3", - "run-time-error-cjs": "1.4.0", - "typescript-optional": "2.0.1", - "uuid": "10.0.0", - "web3": "1.6.1", - "web3-eth-contract": "1.6.1", - "web3-utils": "1.6.1" - }, - "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "body-parser": "1.20.3", - "uuid": "10.0.0", - "web3-core": "1.6.1", - "web3-eth": "1.6.1" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-plugin-ledger-connector-xdai.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-ledger-connector-xdai.node.umd.min.js", - "watch": { - "codegen:openapi": { - "patterns": [ - "./src/main/json/openapi.json" - ] - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 749646c9b9..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,37 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_consistency_strategy.go -model_contract_json.go -model_deploy_contract_json_object_v1_request.go -model_deploy_contract_v1_request.go -model_deploy_contract_v1_response.go -model_deploy_request_base_v1.go -model_eth_contract_invocation_type.go -model_invoke_contract_json_object_v1_request.go -model_invoke_contract_v1_request.go -model_invoke_contract_v1_response.go -model_invoke_request_base_v1.go -model_receipt_type.go -model_run_transaction_v1_request.go -model_run_transaction_v1_response.go -model_solidity_contract_json_artifact.go -model_solidity_contract_json_artifact_compiler.go -model_solidity_contract_json_artifact_gas_estimates.go -model_solidity_contract_json_artifact_gas_estimates_creation.go -model_web3_signing_credential.go -model_web3_signing_credential_cactus_keychain_ref.go -model_web3_signing_credential_none.go -model_web3_signing_credential_private_key_hex.go -model_web3_signing_credential_type.go -model_web3_transaction_receipt.go -model_xdai_transaction_config.go -model_xdai_transaction_config_from.go -model_xdai_transaction_config_to.go -response.go -utils.go diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 99a70473c6..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# Go API client for cactus-plugin-ledger-connector-xdai - -Can perform basic tasks on a Xdai ledger - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-ledger-connector-xdai "github.com/hyperledger/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-xdai.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-xdai.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-ledger-connector-xdai.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-ledger-connector-xdai.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**DeployContractJsonObjectV1**](docs/DefaultApi.md#deploycontractjsonobjectv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object | Deploys the bytecode of a Solidity contract. -*DefaultApi* | [**DeployContractV1**](docs/DefaultApi.md#deploycontractv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode | Deploys the bytecode of a Solidity contract. -*DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics | Get the Prometheus Metrics -*DefaultApi* | [**InvokeContractJsonObject**](docs/DefaultApi.md#invokecontractjsonobject) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object | Invokes a contract on a besu ledger -*DefaultApi* | [**InvokeContractV1**](docs/DefaultApi.md#invokecontractv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract | Invokes a contract on a xdai ledger -*DefaultApi* | [**RunTransactionV1**](docs/DefaultApi.md#runtransactionv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction | Executes a transaction on a xdai ledger - - -## Documentation For Models - - - [ConsistencyStrategy](docs/ConsistencyStrategy.md) - - [ContractJSON](docs/ContractJSON.md) - - [DeployContractJsonObjectV1Request](docs/DeployContractJsonObjectV1Request.md) - - [DeployContractV1Request](docs/DeployContractV1Request.md) - - [DeployContractV1Response](docs/DeployContractV1Response.md) - - [DeployRequestBaseV1](docs/DeployRequestBaseV1.md) - - [EthContractInvocationType](docs/EthContractInvocationType.md) - - [InvokeContractJsonObjectV1Request](docs/InvokeContractJsonObjectV1Request.md) - - [InvokeContractV1Request](docs/InvokeContractV1Request.md) - - [InvokeContractV1Response](docs/InvokeContractV1Response.md) - - [InvokeRequestBaseV1](docs/InvokeRequestBaseV1.md) - - [ReceiptType](docs/ReceiptType.md) - - [RunTransactionV1Request](docs/RunTransactionV1Request.md) - - [RunTransactionV1Response](docs/RunTransactionV1Response.md) - - [SolidityContractJsonArtifact](docs/SolidityContractJsonArtifact.md) - - [SolidityContractJsonArtifactCompiler](docs/SolidityContractJsonArtifactCompiler.md) - - [SolidityContractJsonArtifactGasEstimates](docs/SolidityContractJsonArtifactGasEstimates.md) - - [SolidityContractJsonArtifactGasEstimatesCreation](docs/SolidityContractJsonArtifactGasEstimatesCreation.md) - - [Web3SigningCredential](docs/Web3SigningCredential.md) - - [Web3SigningCredentialCactusKeychainRef](docs/Web3SigningCredentialCactusKeychainRef.md) - - [Web3SigningCredentialNone](docs/Web3SigningCredentialNone.md) - - [Web3SigningCredentialPrivateKeyHex](docs/Web3SigningCredentialPrivateKeyHex.md) - - [Web3SigningCredentialType](docs/Web3SigningCredentialType.md) - - [Web3TransactionReceipt](docs/Web3TransactionReceipt.md) - - [XdaiTransactionConfig](docs/XdaiTransactionConfig.md) - - [XdaiTransactionConfigFrom](docs/XdaiTransactionConfigFrom.md) - - [XdaiTransactionConfigTo](docs/XdaiTransactionConfigTo.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 4a5d657d81..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,896 +0,0 @@ -openapi: 3.0.3 -info: - description: Can perform basic tasks on a Xdai ledger - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - Connector Xdai - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode: - post: - operationId: deployContractV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractV1Response' - description: OK - summary: Deploys the bytecode of a Solidity contract. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object: - post: - operationId: deployContractJsonObjectV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractJsonObjectV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeployContractV1Response' - description: OK - summary: Deploys the bytecode of a Solidity contract. - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction: - post: - operationId: runTransactionV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RunTransactionV1Response' - description: OK - summary: Executes a transaction on a xdai ledger - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract: - post: - operationId: invokeContractV1 - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - summary: Invokes a contract on a xdai ledger - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object: - post: - operationId: invokeContractJsonObject - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractJsonObjectV1Request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvokeContractV1Response' - description: OK - summary: Invokes a contract on a besu ledger - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object - /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics: - get: - operationId: getPrometheusMetricsV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PrometheusExporterMetricsResponse' - description: OK - summary: Get the Prometheus Metrics - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics -components: - schemas: - ReceiptType: - description: Enumerates the possible types of receipts that can be waited for - by someone or something that has requested the execution of a transaction - on a ledger. - enum: - - NODE_TX_POOL_ACK - - LEDGER_BLOCK_ACK - type: string - ConsistencyStrategy: - example: - blockConfirmations: 2931 - receiptType: null - timeoutMs: 0 - pollIntervalMs: 0 - properties: - receiptType: - $ref: '#/components/schemas/ReceiptType' - timeoutMs: - description: "The amount of milliseconds to wait for the receipt to arrive\ - \ to the connector. Defaults to 0 which means to wait for an unlimited\ - \ amount of time. Note that this wait may be interrupted still by other\ - \ parts of the infrastructure such as load balancers cutting of HTTP requests\ - \ after some time even if they are the type that is supposed to be kept\ - \ alive. The question of re-entrance is a broader topic not in scope to\ - \ discuss here, but it is important to mention it." - minimum: 0 - type: integer - blockConfirmations: - description: "The number of blocks to wait to be confirmed in addition to\ - \ the block containing the transaction in question. Note that if the receipt\ - \ type is set to only wait for node transaction pool ACK and this parameter\ - \ is set to anything, but zero then the API will not accept the request\ - \ due to conflicting parameters." - maximum: 20000 - minimum: 0 - type: integer - pollIntervalMs: - description: The amount of time (in milliseconds) connector will wait before - making another confiramtion request to the network in case of previous - confiramtion request fails - minimum: 0 - type: integer - required: - - blockConfirmations - - receiptType - type: object - Web3SigningCredential: - discriminator: - propertyName: type - example: - type: null - oneOf: - - $ref: '#/components/schemas/Web3SigningCredentialCactusKeychainRef' - - $ref: '#/components/schemas/Web3SigningCredentialPrivateKeyHex' - - $ref: '#/components/schemas/Web3SigningCredentialNone' - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredentialCactusKeychainRef: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 64 - minLength: 64 - nullable: false - type: string - keychainEntryKey: - description: The key to use when looking up the the keychain entry holding - the secret pointed to by the keychainEntryKey parameter. - maxLength: 1024 - minLength: 0 - type: string - keychainId: - description: The keychain ID to use when looking up the the keychain plugin - instance that will be used to retrieve the secret pointed to by the keychainEntryKey - parameter. - maxLength: 1024 - minLength: 0 - type: string - required: - - ethAccount - - keychainEntryKey - - keychainId - - type - type: object - Web3SigningCredentialPrivateKeyHex: - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - ethAccount: - description: The ethereum account (public key) that the credential belongs - to. Basically the username in the traditional terminology of authentication. - maxLength: 64 - minLength: 64 - nullable: false - type: string - secret: - description: The HEX encoded private key of an eth account. - maxLength: 65535 - minLength: 0 - type: string - required: - - ethAccount - - secret - - type - type: object - Web3SigningCredentialNone: - description: Using this denotes that there is no signing required because the - transaction is pre-signed. - properties: - type: - $ref: '#/components/schemas/Web3SigningCredentialType' - required: - - type - type: object - Web3SigningCredentialType: - enum: - - CACTUS_KEYCHAIN_REF - - GETH_KEYCHAIN_PASSWORD - - PRIVATE_KEY_HEX - - NONE - type: string - EthContractInvocationType: - enum: - - SEND - - CALL - type: string - SolidityContractJsonArtifact: - properties: - contractName: - nullable: false - type: string - metadata: - nullable: false - type: string - bytecode: - nullable: false - type: string - deployedBytecode: - nullable: false - type: string - sourceMap: - nullable: false - type: string - deployedSourceMap: - nullable: false - type: string - sourcePath: - type: string - compiler: - $ref: '#/components/schemas/SolidityContractJsonArtifact_compiler' - functionHashes: - additionalProperties: true - type: object - gasEstimates: - $ref: '#/components/schemas/SolidityContractJsonArtifact_gasEstimates' - required: - - contractName - type: object - XdaiTransactionConfig: - additionalProperties: true - example: - rawTransaction: rawTransaction - data: null - gas: null - from: null - to: null - value: null - nonce: 0.8008281904610115 - gasPrice: null - properties: - rawTransaction: - nullable: false - type: string - from: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - to: - $ref: '#/components/schemas/XdaiTransactionConfig_to' - value: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - gas: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - gasPrice: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - nonce: - type: number - data: - $ref: '#/components/schemas/XdaiTransactionConfig_to' - type: object - Web3TransactionReceipt: - additionalProperties: true - example: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - properties: - status: - nullable: false - type: boolean - transactionHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - transactionIndex: - nullable: false - type: number - blockHash: - maxLength: 66 - minLength: 66 - pattern: "^0x([A-Fa-f0-9]{64})$" - type: string - blockNumber: - nullable: false - type: number - gasUsed: - nullable: false - type: number - contractAddress: - nullable: true - type: string - from: - nullable: false - type: string - to: - nullable: false - type: string - required: - - blockHash - - blockNumber - - from - - gasUsed - - status - - to - - transactionHash - - transactionIndex - type: object - ContractJSON: - additionalProperties: true - example: - bytecode: bytecode - metadata: metadata - ast: "{}" - deployedBytecode: deployedBytecode - sourceMap: sourceMap - deployedSourceMap: deployedSourceMap - abi: - - "" - - "" - networks: "{}" - functionHashes: "{}" - gasEstimates: "{}" - contractName: contractName - compiler: "{}" - sourcePath: sourcePath - properties: - contractName: - nullable: false - type: string - bytecode: - description: See https://ethereum.stackexchange.com/a/47556 regarding the - maximum length of the bytecode - maxLength: 24576 - minLength: 1 - nullable: false - type: string - abi: - description: "The application binary interface of the solidity contract,\ - \ optional parameter" - items: {} - nullable: false - type: array - metadata: - type: string - deployedBytecode: - type: string - sourceMap: - type: string - deployedSourceMap: - type: string - sourcePath: - type: string - compiler: - type: object - networks: - type: object - ast: - type: object - functionHashes: - type: object - gasEstimates: - type: object - required: - - abi - - bytecode - - contractName - type: object - RunTransactionV1Request: - additionalProperties: false - example: - transactionConfig: - rawTransaction: rawTransaction - data: null - gas: null - from: null - to: null - value: null - nonce: 0.8008281904610115 - gasPrice: null - consistencyStrategy: - blockConfirmations: 2931 - receiptType: null - timeoutMs: 0 - pollIntervalMs: 0 - web3SigningCredential: - type: null - properties: - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - transactionConfig: - $ref: '#/components/schemas/XdaiTransactionConfig' - consistencyStrategy: - $ref: '#/components/schemas/ConsistencyStrategy' - required: - - consistencyStrategy - - transactionConfig - - web3SigningCredential - type: object - RunTransactionV1Response: - example: - transactionReceipt: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - required: - - transactionReceipt - type: object - DeployContractV1Request: - additionalProperties: false - example: - keychainId: keychainId - constructorArgs: - - "" - - "" - timeoutMs: 0.6027456183070403 - gas: 0.8008281904610115 - web3SigningCredential: - type: null - contractName: contractName - gasPrice: gasPrice - properties: - contractName: - description: The contract name for retrieve the contracts json on the keychain. - maxLength: 100 - minLength: 1 - nullable: false - type: string - constructorArgs: - default: [] - items: {} - type: array - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - keychainId: - description: The keychainId for retrieve the contracts json. - maxLength: 100 - minLength: 1 - nullable: false - type: string - gas: - nullable: false - type: number - gasPrice: - nullable: false - type: string - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - with theaddress of the contract(which indicates successful deployment) - beforegiving up and crashing. - minimum: 0 - nullable: false - type: number - required: - - contractName - - keychainId - - web3SigningCredential - type: object - DeployContractJsonObjectV1Request: - additionalProperties: false - example: - timeoutMs: 0.6027456183070403 - constructorArgs: - - "" - - "" - gas: 0.8008281904610115 - web3SigningCredential: - type: null - gasPrice: gasPrice - contractJSON: - bytecode: bytecode - metadata: metadata - ast: "{}" - deployedBytecode: deployedBytecode - sourceMap: sourceMap - deployedSourceMap: deployedSourceMap - abi: - - "" - - "" - networks: "{}" - functionHashes: "{}" - gasEstimates: "{}" - contractName: contractName - compiler: "{}" - sourcePath: sourcePath - properties: - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - gas: - nullable: false - type: number - gasPrice: - nullable: false - type: string - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - with theaddress of the contract(which indicates successful deployment) - beforegiving up and crashing. - minimum: 0 - nullable: false - type: number - contractJSON: - $ref: '#/components/schemas/ContractJSON' - constructorArgs: - default: [] - description: The list of arguments to pass in to the constructor of the - contract being deployed. - items: {} - type: array - required: - - contractJSON - - web3SigningCredential - type: object - DeployContractV1Response: - example: - transactionReceipt: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - required: - - transactionReceipt - type: object - InvokeContractV1Request: - additionalProperties: false - example: - invocationType: null - keychainId: keychainId - timeoutMs: 0.6027456183070403 - gas: null - web3SigningCredential: - type: null - methodName: methodName - contractName: contractName - params: - - "" - - "" - value: null - nonce: 0.8008281904610115 - gasPrice: null - properties: - contractName: - description: The contract name to find it in the keychain plugin - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - invocationType: - $ref: '#/components/schemas/EthContractInvocationType' - methodName: - description: The name of the contract method to invoke. - maxLength: 2048 - minLength: 1 - nullable: false - type: string - params: - default: [] - description: The list of arguments to pass in to the contract method being - invoked. - items: {} - type: array - value: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - gas: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - gasPrice: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - nonce: - type: number - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - beforegiving up and crashing. Only has any effect if the invocation type - is SEND - minimum: 0 - nullable: false - type: number - keychainId: - description: The keychainId for retrieve the contracts json. - maxLength: 100 - minLength: 1 - type: string - required: - - contractName - - invocationType - - keychainId - - methodName - - params - - web3SigningCredential - type: object - InvokeContractJsonObjectV1Request: - additionalProperties: false - example: - invocationType: null - timeoutMs: 0.6027456183070403 - gas: null - web3SigningCredential: - type: null - methodName: methodName - contractAddress: contractAddress - params: - - "" - - "" - value: null - nonce: 0.8008281904610115 - gasPrice: null - contractJSON: - bytecode: bytecode - metadata: metadata - ast: "{}" - deployedBytecode: deployedBytecode - sourceMap: sourceMap - deployedSourceMap: deployedSourceMap - abi: - - "" - - "" - networks: "{}" - functionHashes: "{}" - gasEstimates: "{}" - contractName: contractName - compiler: "{}" - sourcePath: sourcePath - properties: - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - invocationType: - $ref: '#/components/schemas/EthContractInvocationType' - methodName: - description: The name of the contract method to invoke. - maxLength: 2048 - minLength: 1 - nullable: false - type: string - params: - default: [] - description: The list of arguments to pass in to the contract method being - invoked. - items: {} - type: array - contractAddress: - description: Address of the solidity contract - nullable: false - type: string - value: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - gas: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - gasPrice: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - nonce: - type: number - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - beforegiving up and crashing. Only has any effect if the invocation type - is SEND - minimum: 0 - nullable: false - type: number - contractJSON: - $ref: '#/components/schemas/ContractJSON' - required: - - contractAddress - - contractJSON - - invocationType - - methodName - - params - - web3SigningCredential - type: object - InvokeContractV1Response: - example: - transactionReceipt: - blockHash: blockHash - gasUsed: 1.4658129805029452 - blockNumber: 6.027456183070403 - contractAddress: contractAddress - transactionIndex: 0.8008281904610115 - from: from - to: to - transactionHash: transactionHash - status: true - callOutput: "" - success: true - properties: - transactionReceipt: - $ref: '#/components/schemas/Web3TransactionReceipt' - callOutput: {} - success: - nullable: false - type: boolean - required: - - success - type: object - PrometheusExporterMetricsResponse: - nullable: false - type: string - DeployRequestBaseV1: - properties: - contractJSON: - $ref: '#/components/schemas/ContractJSON' - constructorArgs: - default: [] - items: {} - type: array - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - gas: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - gasPrice: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - with theaddress of the contract(which indicates successful deployment) - beforegiving up and crashing. - minimum: 0 - nullable: false - type: number - required: - - contractJSON - - web3SigningCredential - type: object - InvokeRequestBaseV1: - additionalProperties: false - properties: - contractAddress: - description: Address of the solidity contract - nullable: false - type: string - web3SigningCredential: - $ref: '#/components/schemas/Web3SigningCredential' - invocationType: - $ref: '#/components/schemas/EthContractInvocationType' - methodName: - description: The name of the contract method to invoke. - maxLength: 2048 - minLength: 1 - nullable: false - type: string - params: - default: [] - description: The list of arguments to pass in to the contract method being - invoked. - items: {} - type: array - value: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - gas: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - gasPrice: - $ref: '#/components/schemas/XdaiTransactionConfig_from' - nonce: - type: number - timeoutMs: - default: 60000 - description: The amount of milliseconds to wait for a transaction receipt - beforegiving up and crashing. Only has any effect if the invocation type - is SEND - minimum: 0 - nullable: false - type: number - contractJSON: - $ref: '#/components/schemas/ContractJSON' - required: - - contractAddress - - contractJSON - - invocationType - - methodName - - params - - web3SigningCredential - type: object - SolidityContractJsonArtifact_compiler: - additionalProperties: true - properties: - name: - type: string - version: - type: string - type: object - SolidityContractJsonArtifact_gasEstimates_creation: - properties: - codeDepositCost: - type: string - executionCost: - type: string - totalCost: - type: string - type: object - SolidityContractJsonArtifact_gasEstimates: - properties: - creation: - $ref: '#/components/schemas/SolidityContractJsonArtifact_gasEstimates_creation' - external: - additionalProperties: true - type: object - XdaiTransactionConfig_from: - oneOf: - - type: string - - type: number - XdaiTransactionConfig_to: - oneOf: - - type: string diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index d5b72b2476..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,645 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiDeployContractJsonObjectV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deployContractJsonObjectV1Request *DeployContractJsonObjectV1Request -} - -func (r ApiDeployContractJsonObjectV1Request) DeployContractJsonObjectV1Request(deployContractJsonObjectV1Request DeployContractJsonObjectV1Request) ApiDeployContractJsonObjectV1Request { - r.deployContractJsonObjectV1Request = &deployContractJsonObjectV1Request - return r -} - -func (r ApiDeployContractJsonObjectV1Request) Execute() (*DeployContractV1Response, *http.Response, error) { - return r.ApiService.DeployContractJsonObjectV1Execute(r) -} - -/* -DeployContractJsonObjectV1 Deploys the bytecode of a Solidity contract. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeployContractJsonObjectV1Request -*/ -func (a *DefaultApiService) DeployContractJsonObjectV1(ctx context.Context) ApiDeployContractJsonObjectV1Request { - return ApiDeployContractJsonObjectV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeployContractV1Response -func (a *DefaultApiService) DeployContractJsonObjectV1Execute(r ApiDeployContractJsonObjectV1Request) (*DeployContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeployContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeployContractJsonObjectV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deployContractJsonObjectV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeployContractV1Request struct { - ctx context.Context - ApiService *DefaultApiService - deployContractV1Request *DeployContractV1Request -} - -func (r ApiDeployContractV1Request) DeployContractV1Request(deployContractV1Request DeployContractV1Request) ApiDeployContractV1Request { - r.deployContractV1Request = &deployContractV1Request - return r -} - -func (r ApiDeployContractV1Request) Execute() (*DeployContractV1Response, *http.Response, error) { - return r.ApiService.DeployContractV1Execute(r) -} - -/* -DeployContractV1 Deploys the bytecode of a Solidity contract. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeployContractV1Request -*/ -func (a *DefaultApiService) DeployContractV1(ctx context.Context) ApiDeployContractV1Request { - return ApiDeployContractV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DeployContractV1Response -func (a *DefaultApiService) DeployContractV1Execute(r ApiDeployContractV1Request) (*DeployContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeployContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeployContractV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.deployContractV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrometheusMetricsV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetPrometheusMetricsV1Request) Execute() (string, *http.Response, error) { - return r.ApiService.GetPrometheusMetricsV1Execute(r) -} - -/* -GetPrometheusMetricsV1 Get the Prometheus Metrics - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPrometheusMetricsV1Request -*/ -func (a *DefaultApiService) GetPrometheusMetricsV1(ctx context.Context) ApiGetPrometheusMetricsV1Request { - return ApiGetPrometheusMetricsV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultApiService) GetPrometheusMetricsV1Execute(r ApiGetPrometheusMetricsV1Request) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetPrometheusMetricsV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInvokeContractJsonObjectRequest struct { - ctx context.Context - ApiService *DefaultApiService - invokeContractJsonObjectV1Request *InvokeContractJsonObjectV1Request -} - -func (r ApiInvokeContractJsonObjectRequest) InvokeContractJsonObjectV1Request(invokeContractJsonObjectV1Request InvokeContractJsonObjectV1Request) ApiInvokeContractJsonObjectRequest { - r.invokeContractJsonObjectV1Request = &invokeContractJsonObjectV1Request - return r -} - -func (r ApiInvokeContractJsonObjectRequest) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.InvokeContractJsonObjectExecute(r) -} - -/* -InvokeContractJsonObject Invokes a contract on a besu ledger - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInvokeContractJsonObjectRequest -*/ -func (a *DefaultApiService) InvokeContractJsonObject(ctx context.Context) ApiInvokeContractJsonObjectRequest { - return ApiInvokeContractJsonObjectRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) InvokeContractJsonObjectExecute(r ApiInvokeContractJsonObjectRequest) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InvokeContractJsonObject") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.invokeContractJsonObjectV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInvokeContractV1Request struct { - ctx context.Context - ApiService *DefaultApiService - invokeContractV1Request *InvokeContractV1Request -} - -func (r ApiInvokeContractV1Request) InvokeContractV1Request(invokeContractV1Request InvokeContractV1Request) ApiInvokeContractV1Request { - r.invokeContractV1Request = &invokeContractV1Request - return r -} - -func (r ApiInvokeContractV1Request) Execute() (*InvokeContractV1Response, *http.Response, error) { - return r.ApiService.InvokeContractV1Execute(r) -} - -/* -InvokeContractV1 Invokes a contract on a xdai ledger - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInvokeContractV1Request -*/ -func (a *DefaultApiService) InvokeContractV1(ctx context.Context) ApiInvokeContractV1Request { - return ApiInvokeContractV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvokeContractV1Response -func (a *DefaultApiService) InvokeContractV1Execute(r ApiInvokeContractV1Request) (*InvokeContractV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvokeContractV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InvokeContractV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.invokeContractV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRunTransactionV1Request struct { - ctx context.Context - ApiService *DefaultApiService - runTransactionV1Request *RunTransactionV1Request -} - -func (r ApiRunTransactionV1Request) RunTransactionV1Request(runTransactionV1Request RunTransactionV1Request) ApiRunTransactionV1Request { - r.runTransactionV1Request = &runTransactionV1Request - return r -} - -func (r ApiRunTransactionV1Request) Execute() (*RunTransactionV1Response, *http.Response, error) { - return r.ApiService.RunTransactionV1Execute(r) -} - -/* -RunTransactionV1 Executes a transaction on a xdai ledger - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRunTransactionV1Request -*/ -func (a *DefaultApiService) RunTransactionV1(ctx context.Context) ApiRunTransactionV1Request { - return ApiRunTransactionV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RunTransactionV1Response -func (a *DefaultApiService) RunTransactionV1Execute(r ApiRunTransactionV1Request) (*RunTransactionV1Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunTransactionV1Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RunTransactionV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.runTransactionV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 19e07729ba..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Connector Xdai API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index e4a842bc30..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 9110fb7b31..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_consistency_strategy.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_consistency_strategy.go deleted file mode 100644 index c564ef4291..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_consistency_strategy.go +++ /dev/null @@ -1,219 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the ConsistencyStrategy type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConsistencyStrategy{} - -// ConsistencyStrategy struct for ConsistencyStrategy -type ConsistencyStrategy struct { - ReceiptType ReceiptType `json:"receiptType"` - // The amount of milliseconds to wait for the receipt to arrive to the connector. Defaults to 0 which means to wait for an unlimited amount of time. Note that this wait may be interrupted still by other parts of the infrastructure such as load balancers cutting of HTTP requests after some time even if they are the type that is supposed to be kept alive. The question of re-entrance is a broader topic not in scope to discuss here, but it is important to mention it. - TimeoutMs *int32 `json:"timeoutMs,omitempty"` - // The number of blocks to wait to be confirmed in addition to the block containing the transaction in question. Note that if the receipt type is set to only wait for node transaction pool ACK and this parameter is set to anything, but zero then the API will not accept the request due to conflicting parameters. - BlockConfirmations int32 `json:"blockConfirmations"` - // The amount of time (in milliseconds) connector will wait before making another confiramtion request to the network in case of previous confiramtion request fails - PollIntervalMs *int32 `json:"pollIntervalMs,omitempty"` -} - -// NewConsistencyStrategy instantiates a new ConsistencyStrategy object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConsistencyStrategy(receiptType ReceiptType, blockConfirmations int32) *ConsistencyStrategy { - this := ConsistencyStrategy{} - this.ReceiptType = receiptType - this.BlockConfirmations = blockConfirmations - return &this -} - -// NewConsistencyStrategyWithDefaults instantiates a new ConsistencyStrategy object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConsistencyStrategyWithDefaults() *ConsistencyStrategy { - this := ConsistencyStrategy{} - return &this -} - -// GetReceiptType returns the ReceiptType field value -func (o *ConsistencyStrategy) GetReceiptType() ReceiptType { - if o == nil { - var ret ReceiptType - return ret - } - - return o.ReceiptType -} - -// GetReceiptTypeOk returns a tuple with the ReceiptType field value -// and a boolean to check if the value has been set. -func (o *ConsistencyStrategy) GetReceiptTypeOk() (*ReceiptType, bool) { - if o == nil { - return nil, false - } - return &o.ReceiptType, true -} - -// SetReceiptType sets field value -func (o *ConsistencyStrategy) SetReceiptType(v ReceiptType) { - o.ReceiptType = v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *ConsistencyStrategy) GetTimeoutMs() int32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret int32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsistencyStrategy) GetTimeoutMsOk() (*int32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *ConsistencyStrategy) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given int32 and assigns it to the TimeoutMs field. -func (o *ConsistencyStrategy) SetTimeoutMs(v int32) { - o.TimeoutMs = &v -} - -// GetBlockConfirmations returns the BlockConfirmations field value -func (o *ConsistencyStrategy) GetBlockConfirmations() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.BlockConfirmations -} - -// GetBlockConfirmationsOk returns a tuple with the BlockConfirmations field value -// and a boolean to check if the value has been set. -func (o *ConsistencyStrategy) GetBlockConfirmationsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.BlockConfirmations, true -} - -// SetBlockConfirmations sets field value -func (o *ConsistencyStrategy) SetBlockConfirmations(v int32) { - o.BlockConfirmations = v -} - -// GetPollIntervalMs returns the PollIntervalMs field value if set, zero value otherwise. -func (o *ConsistencyStrategy) GetPollIntervalMs() int32 { - if o == nil || IsNil(o.PollIntervalMs) { - var ret int32 - return ret - } - return *o.PollIntervalMs -} - -// GetPollIntervalMsOk returns a tuple with the PollIntervalMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsistencyStrategy) GetPollIntervalMsOk() (*int32, bool) { - if o == nil || IsNil(o.PollIntervalMs) { - return nil, false - } - return o.PollIntervalMs, true -} - -// HasPollIntervalMs returns a boolean if a field has been set. -func (o *ConsistencyStrategy) HasPollIntervalMs() bool { - if o != nil && !IsNil(o.PollIntervalMs) { - return true - } - - return false -} - -// SetPollIntervalMs gets a reference to the given int32 and assigns it to the PollIntervalMs field. -func (o *ConsistencyStrategy) SetPollIntervalMs(v int32) { - o.PollIntervalMs = &v -} - -func (o ConsistencyStrategy) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConsistencyStrategy) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["receiptType"] = o.ReceiptType - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - toSerialize["blockConfirmations"] = o.BlockConfirmations - if !IsNil(o.PollIntervalMs) { - toSerialize["pollIntervalMs"] = o.PollIntervalMs - } - return toSerialize, nil -} - -type NullableConsistencyStrategy struct { - value *ConsistencyStrategy - isSet bool -} - -func (v NullableConsistencyStrategy) Get() *ConsistencyStrategy { - return v.value -} - -func (v *NullableConsistencyStrategy) Set(val *ConsistencyStrategy) { - v.value = val - v.isSet = true -} - -func (v NullableConsistencyStrategy) IsSet() bool { - return v.isSet -} - -func (v *NullableConsistencyStrategy) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConsistencyStrategy(val *ConsistencyStrategy) *NullableConsistencyStrategy { - return &NullableConsistencyStrategy{value: val, isSet: true} -} - -func (v NullableConsistencyStrategy) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConsistencyStrategy) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_contract_json.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_contract_json.go deleted file mode 100644 index 5b8652d295..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_contract_json.go +++ /dev/null @@ -1,570 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the ContractJSON type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ContractJSON{} - -// ContractJSON struct for ContractJSON -type ContractJSON struct { - ContractName string `json:"contractName"` - // See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode - Bytecode string `json:"bytecode"` - // The application binary interface of the solidity contract, optional parameter - Abi []interface{} `json:"abi"` - Metadata *string `json:"metadata,omitempty"` - DeployedBytecode *string `json:"deployedBytecode,omitempty"` - SourceMap *string `json:"sourceMap,omitempty"` - DeployedSourceMap *string `json:"deployedSourceMap,omitempty"` - SourcePath *string `json:"sourcePath,omitempty"` - Compiler map[string]interface{} `json:"compiler,omitempty"` - Networks map[string]interface{} `json:"networks,omitempty"` - Ast map[string]interface{} `json:"ast,omitempty"` - FunctionHashes map[string]interface{} `json:"functionHashes,omitempty"` - GasEstimates map[string]interface{} `json:"gasEstimates,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ContractJSON ContractJSON - -// NewContractJSON instantiates a new ContractJSON object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewContractJSON(contractName string, bytecode string, abi []interface{}) *ContractJSON { - this := ContractJSON{} - this.ContractName = contractName - this.Bytecode = bytecode - this.Abi = abi - return &this -} - -// NewContractJSONWithDefaults instantiates a new ContractJSON object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewContractJSONWithDefaults() *ContractJSON { - this := ContractJSON{} - return &this -} - -// GetContractName returns the ContractName field value -func (o *ContractJSON) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *ContractJSON) SetContractName(v string) { - o.ContractName = v -} - -// GetBytecode returns the Bytecode field value -func (o *ContractJSON) GetBytecode() string { - if o == nil { - var ret string - return ret - } - - return o.Bytecode -} - -// GetBytecodeOk returns a tuple with the Bytecode field value -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetBytecodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Bytecode, true -} - -// SetBytecode sets field value -func (o *ContractJSON) SetBytecode(v string) { - o.Bytecode = v -} - -// GetAbi returns the Abi field value -func (o *ContractJSON) GetAbi() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.Abi -} - -// GetAbiOk returns a tuple with the Abi field value -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetAbiOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Abi, true -} - -// SetAbi sets field value -func (o *ContractJSON) SetAbi(v []interface{}) { - o.Abi = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *ContractJSON) GetMetadata() string { - if o == nil || IsNil(o.Metadata) { - var ret string - return ret - } - return *o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetMetadataOk() (*string, bool) { - if o == nil || IsNil(o.Metadata) { - return nil, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *ContractJSON) HasMetadata() bool { - if o != nil && !IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given string and assigns it to the Metadata field. -func (o *ContractJSON) SetMetadata(v string) { - o.Metadata = &v -} - -// GetDeployedBytecode returns the DeployedBytecode field value if set, zero value otherwise. -func (o *ContractJSON) GetDeployedBytecode() string { - if o == nil || IsNil(o.DeployedBytecode) { - var ret string - return ret - } - return *o.DeployedBytecode -} - -// GetDeployedBytecodeOk returns a tuple with the DeployedBytecode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetDeployedBytecodeOk() (*string, bool) { - if o == nil || IsNil(o.DeployedBytecode) { - return nil, false - } - return o.DeployedBytecode, true -} - -// HasDeployedBytecode returns a boolean if a field has been set. -func (o *ContractJSON) HasDeployedBytecode() bool { - if o != nil && !IsNil(o.DeployedBytecode) { - return true - } - - return false -} - -// SetDeployedBytecode gets a reference to the given string and assigns it to the DeployedBytecode field. -func (o *ContractJSON) SetDeployedBytecode(v string) { - o.DeployedBytecode = &v -} - -// GetSourceMap returns the SourceMap field value if set, zero value otherwise. -func (o *ContractJSON) GetSourceMap() string { - if o == nil || IsNil(o.SourceMap) { - var ret string - return ret - } - return *o.SourceMap -} - -// GetSourceMapOk returns a tuple with the SourceMap field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetSourceMapOk() (*string, bool) { - if o == nil || IsNil(o.SourceMap) { - return nil, false - } - return o.SourceMap, true -} - -// HasSourceMap returns a boolean if a field has been set. -func (o *ContractJSON) HasSourceMap() bool { - if o != nil && !IsNil(o.SourceMap) { - return true - } - - return false -} - -// SetSourceMap gets a reference to the given string and assigns it to the SourceMap field. -func (o *ContractJSON) SetSourceMap(v string) { - o.SourceMap = &v -} - -// GetDeployedSourceMap returns the DeployedSourceMap field value if set, zero value otherwise. -func (o *ContractJSON) GetDeployedSourceMap() string { - if o == nil || IsNil(o.DeployedSourceMap) { - var ret string - return ret - } - return *o.DeployedSourceMap -} - -// GetDeployedSourceMapOk returns a tuple with the DeployedSourceMap field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetDeployedSourceMapOk() (*string, bool) { - if o == nil || IsNil(o.DeployedSourceMap) { - return nil, false - } - return o.DeployedSourceMap, true -} - -// HasDeployedSourceMap returns a boolean if a field has been set. -func (o *ContractJSON) HasDeployedSourceMap() bool { - if o != nil && !IsNil(o.DeployedSourceMap) { - return true - } - - return false -} - -// SetDeployedSourceMap gets a reference to the given string and assigns it to the DeployedSourceMap field. -func (o *ContractJSON) SetDeployedSourceMap(v string) { - o.DeployedSourceMap = &v -} - -// GetSourcePath returns the SourcePath field value if set, zero value otherwise. -func (o *ContractJSON) GetSourcePath() string { - if o == nil || IsNil(o.SourcePath) { - var ret string - return ret - } - return *o.SourcePath -} - -// GetSourcePathOk returns a tuple with the SourcePath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetSourcePathOk() (*string, bool) { - if o == nil || IsNil(o.SourcePath) { - return nil, false - } - return o.SourcePath, true -} - -// HasSourcePath returns a boolean if a field has been set. -func (o *ContractJSON) HasSourcePath() bool { - if o != nil && !IsNil(o.SourcePath) { - return true - } - - return false -} - -// SetSourcePath gets a reference to the given string and assigns it to the SourcePath field. -func (o *ContractJSON) SetSourcePath(v string) { - o.SourcePath = &v -} - -// GetCompiler returns the Compiler field value if set, zero value otherwise. -func (o *ContractJSON) GetCompiler() map[string]interface{} { - if o == nil || IsNil(o.Compiler) { - var ret map[string]interface{} - return ret - } - return o.Compiler -} - -// GetCompilerOk returns a tuple with the Compiler field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetCompilerOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Compiler) { - return map[string]interface{}{}, false - } - return o.Compiler, true -} - -// HasCompiler returns a boolean if a field has been set. -func (o *ContractJSON) HasCompiler() bool { - if o != nil && !IsNil(o.Compiler) { - return true - } - - return false -} - -// SetCompiler gets a reference to the given map[string]interface{} and assigns it to the Compiler field. -func (o *ContractJSON) SetCompiler(v map[string]interface{}) { - o.Compiler = v -} - -// GetNetworks returns the Networks field value if set, zero value otherwise. -func (o *ContractJSON) GetNetworks() map[string]interface{} { - if o == nil || IsNil(o.Networks) { - var ret map[string]interface{} - return ret - } - return o.Networks -} - -// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetNetworksOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Networks) { - return map[string]interface{}{}, false - } - return o.Networks, true -} - -// HasNetworks returns a boolean if a field has been set. -func (o *ContractJSON) HasNetworks() bool { - if o != nil && !IsNil(o.Networks) { - return true - } - - return false -} - -// SetNetworks gets a reference to the given map[string]interface{} and assigns it to the Networks field. -func (o *ContractJSON) SetNetworks(v map[string]interface{}) { - o.Networks = v -} - -// GetAst returns the Ast field value if set, zero value otherwise. -func (o *ContractJSON) GetAst() map[string]interface{} { - if o == nil || IsNil(o.Ast) { - var ret map[string]interface{} - return ret - } - return o.Ast -} - -// GetAstOk returns a tuple with the Ast field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetAstOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Ast) { - return map[string]interface{}{}, false - } - return o.Ast, true -} - -// HasAst returns a boolean if a field has been set. -func (o *ContractJSON) HasAst() bool { - if o != nil && !IsNil(o.Ast) { - return true - } - - return false -} - -// SetAst gets a reference to the given map[string]interface{} and assigns it to the Ast field. -func (o *ContractJSON) SetAst(v map[string]interface{}) { - o.Ast = v -} - -// GetFunctionHashes returns the FunctionHashes field value if set, zero value otherwise. -func (o *ContractJSON) GetFunctionHashes() map[string]interface{} { - if o == nil || IsNil(o.FunctionHashes) { - var ret map[string]interface{} - return ret - } - return o.FunctionHashes -} - -// GetFunctionHashesOk returns a tuple with the FunctionHashes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetFunctionHashesOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.FunctionHashes) { - return map[string]interface{}{}, false - } - return o.FunctionHashes, true -} - -// HasFunctionHashes returns a boolean if a field has been set. -func (o *ContractJSON) HasFunctionHashes() bool { - if o != nil && !IsNil(o.FunctionHashes) { - return true - } - - return false -} - -// SetFunctionHashes gets a reference to the given map[string]interface{} and assigns it to the FunctionHashes field. -func (o *ContractJSON) SetFunctionHashes(v map[string]interface{}) { - o.FunctionHashes = v -} - -// GetGasEstimates returns the GasEstimates field value if set, zero value otherwise. -func (o *ContractJSON) GetGasEstimates() map[string]interface{} { - if o == nil || IsNil(o.GasEstimates) { - var ret map[string]interface{} - return ret - } - return o.GasEstimates -} - -// GetGasEstimatesOk returns a tuple with the GasEstimates field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContractJSON) GetGasEstimatesOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.GasEstimates) { - return map[string]interface{}{}, false - } - return o.GasEstimates, true -} - -// HasGasEstimates returns a boolean if a field has been set. -func (o *ContractJSON) HasGasEstimates() bool { - if o != nil && !IsNil(o.GasEstimates) { - return true - } - - return false -} - -// SetGasEstimates gets a reference to the given map[string]interface{} and assigns it to the GasEstimates field. -func (o *ContractJSON) SetGasEstimates(v map[string]interface{}) { - o.GasEstimates = v -} - -func (o ContractJSON) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ContractJSON) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractName"] = o.ContractName - toSerialize["bytecode"] = o.Bytecode - toSerialize["abi"] = o.Abi - if !IsNil(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !IsNil(o.DeployedBytecode) { - toSerialize["deployedBytecode"] = o.DeployedBytecode - } - if !IsNil(o.SourceMap) { - toSerialize["sourceMap"] = o.SourceMap - } - if !IsNil(o.DeployedSourceMap) { - toSerialize["deployedSourceMap"] = o.DeployedSourceMap - } - if !IsNil(o.SourcePath) { - toSerialize["sourcePath"] = o.SourcePath - } - if !IsNil(o.Compiler) { - toSerialize["compiler"] = o.Compiler - } - if !IsNil(o.Networks) { - toSerialize["networks"] = o.Networks - } - if !IsNil(o.Ast) { - toSerialize["ast"] = o.Ast - } - if !IsNil(o.FunctionHashes) { - toSerialize["functionHashes"] = o.FunctionHashes - } - if !IsNil(o.GasEstimates) { - toSerialize["gasEstimates"] = o.GasEstimates - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ContractJSON) UnmarshalJSON(bytes []byte) (err error) { - varContractJSON := _ContractJSON{} - - if err = json.Unmarshal(bytes, &varContractJSON); err == nil { - *o = ContractJSON(varContractJSON) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "contractName") - delete(additionalProperties, "bytecode") - delete(additionalProperties, "abi") - delete(additionalProperties, "metadata") - delete(additionalProperties, "deployedBytecode") - delete(additionalProperties, "sourceMap") - delete(additionalProperties, "deployedSourceMap") - delete(additionalProperties, "sourcePath") - delete(additionalProperties, "compiler") - delete(additionalProperties, "networks") - delete(additionalProperties, "ast") - delete(additionalProperties, "functionHashes") - delete(additionalProperties, "gasEstimates") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableContractJSON struct { - value *ContractJSON - isSet bool -} - -func (v NullableContractJSON) Get() *ContractJSON { - return v.value -} - -func (v *NullableContractJSON) Set(val *ContractJSON) { - v.value = val - v.isSet = true -} - -func (v NullableContractJSON) IsSet() bool { - return v.isSet -} - -func (v *NullableContractJSON) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContractJSON(val *ContractJSON) *NullableContractJSON { - return &NullableContractJSON{value: val, isSet: true} -} - -func (v NullableContractJSON) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContractJSON) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_contract_json_object_v1_request.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_contract_json_object_v1_request.go deleted file mode 100644 index 386fcca71c..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_contract_json_object_v1_request.go +++ /dev/null @@ -1,294 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the DeployContractJsonObjectV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractJsonObjectV1Request{} - -// DeployContractJsonObjectV1Request struct for DeployContractJsonObjectV1Request -type DeployContractJsonObjectV1Request struct { - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - Gas *float32 `json:"gas,omitempty"` - GasPrice *string `json:"gasPrice,omitempty"` - // The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - TimeoutMs *float32 `json:"timeoutMs,omitempty"` - ContractJSON ContractJSON `json:"contractJSON"` - // The list of arguments to pass in to the constructor of the contract being deployed. - ConstructorArgs []interface{} `json:"constructorArgs,omitempty"` -} - -// NewDeployContractJsonObjectV1Request instantiates a new DeployContractJsonObjectV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractJsonObjectV1Request(web3SigningCredential Web3SigningCredential, contractJSON ContractJSON) *DeployContractJsonObjectV1Request { - this := DeployContractJsonObjectV1Request{} - this.Web3SigningCredential = web3SigningCredential - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - this.ContractJSON = contractJSON - return &this -} - -// NewDeployContractJsonObjectV1RequestWithDefaults instantiates a new DeployContractJsonObjectV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractJsonObjectV1RequestWithDefaults() *DeployContractJsonObjectV1Request { - this := DeployContractJsonObjectV1Request{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *DeployContractJsonObjectV1Request) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *DeployContractJsonObjectV1Request) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *DeployContractJsonObjectV1Request) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *DeployContractJsonObjectV1Request) GetGas() float32 { - if o == nil || IsNil(o.Gas) { - var ret float32 - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractJsonObjectV1Request) GetGasOk() (*float32, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *DeployContractJsonObjectV1Request) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given float32 and assigns it to the Gas field. -func (o *DeployContractJsonObjectV1Request) SetGas(v float32) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *DeployContractJsonObjectV1Request) GetGasPrice() string { - if o == nil || IsNil(o.GasPrice) { - var ret string - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractJsonObjectV1Request) GetGasPriceOk() (*string, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *DeployContractJsonObjectV1Request) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given string and assigns it to the GasPrice field. -func (o *DeployContractJsonObjectV1Request) SetGasPrice(v string) { - o.GasPrice = &v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *DeployContractJsonObjectV1Request) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractJsonObjectV1Request) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *DeployContractJsonObjectV1Request) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *DeployContractJsonObjectV1Request) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -// GetContractJSON returns the ContractJSON field value -func (o *DeployContractJsonObjectV1Request) GetContractJSON() ContractJSON { - if o == nil { - var ret ContractJSON - return ret - } - - return o.ContractJSON -} - -// GetContractJSONOk returns a tuple with the ContractJSON field value -// and a boolean to check if the value has been set. -func (o *DeployContractJsonObjectV1Request) GetContractJSONOk() (*ContractJSON, bool) { - if o == nil { - return nil, false - } - return &o.ContractJSON, true -} - -// SetContractJSON sets field value -func (o *DeployContractJsonObjectV1Request) SetContractJSON(v ContractJSON) { - o.ContractJSON = v -} - -// GetConstructorArgs returns the ConstructorArgs field value if set, zero value otherwise. -func (o *DeployContractJsonObjectV1Request) GetConstructorArgs() []interface{} { - if o == nil || IsNil(o.ConstructorArgs) { - var ret []interface{} - return ret - } - return o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractJsonObjectV1Request) GetConstructorArgsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.ConstructorArgs) { - return nil, false - } - return o.ConstructorArgs, true -} - -// HasConstructorArgs returns a boolean if a field has been set. -func (o *DeployContractJsonObjectV1Request) HasConstructorArgs() bool { - if o != nil && !IsNil(o.ConstructorArgs) { - return true - } - - return false -} - -// SetConstructorArgs gets a reference to the given []interface{} and assigns it to the ConstructorArgs field. -func (o *DeployContractJsonObjectV1Request) SetConstructorArgs(v []interface{}) { - o.ConstructorArgs = v -} - -func (o DeployContractJsonObjectV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractJsonObjectV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - toSerialize["contractJSON"] = o.ContractJSON - if !IsNil(o.ConstructorArgs) { - toSerialize["constructorArgs"] = o.ConstructorArgs - } - return toSerialize, nil -} - -type NullableDeployContractJsonObjectV1Request struct { - value *DeployContractJsonObjectV1Request - isSet bool -} - -func (v NullableDeployContractJsonObjectV1Request) Get() *DeployContractJsonObjectV1Request { - return v.value -} - -func (v *NullableDeployContractJsonObjectV1Request) Set(val *DeployContractJsonObjectV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractJsonObjectV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractJsonObjectV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractJsonObjectV1Request(val *DeployContractJsonObjectV1Request) *NullableDeployContractJsonObjectV1Request { - return &NullableDeployContractJsonObjectV1Request{value: val, isSet: true} -} - -func (v NullableDeployContractJsonObjectV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractJsonObjectV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request.go deleted file mode 100644 index 04707d93d2..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_request.go +++ /dev/null @@ -1,322 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the DeployContractV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractV1Request{} - -// DeployContractV1Request struct for DeployContractV1Request -type DeployContractV1Request struct { - // The contract name for retrieve the contracts json on the keychain. - ContractName string `json:"contractName"` - ConstructorArgs []interface{} `json:"constructorArgs,omitempty"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - // The keychainId for retrieve the contracts json. - KeychainId string `json:"keychainId"` - Gas *float32 `json:"gas,omitempty"` - GasPrice *string `json:"gasPrice,omitempty"` - // The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - TimeoutMs *float32 `json:"timeoutMs,omitempty"` -} - -// NewDeployContractV1Request instantiates a new DeployContractV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractV1Request(contractName string, web3SigningCredential Web3SigningCredential, keychainId string) *DeployContractV1Request { - this := DeployContractV1Request{} - this.ContractName = contractName - this.Web3SigningCredential = web3SigningCredential - this.KeychainId = keychainId - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// NewDeployContractV1RequestWithDefaults instantiates a new DeployContractV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractV1RequestWithDefaults() *DeployContractV1Request { - this := DeployContractV1Request{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetContractName returns the ContractName field value -func (o *DeployContractV1Request) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *DeployContractV1Request) SetContractName(v string) { - o.ContractName = v -} - -// GetConstructorArgs returns the ConstructorArgs field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetConstructorArgs() []interface{} { - if o == nil || IsNil(o.ConstructorArgs) { - var ret []interface{} - return ret - } - return o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetConstructorArgsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.ConstructorArgs) { - return nil, false - } - return o.ConstructorArgs, true -} - -// HasConstructorArgs returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasConstructorArgs() bool { - if o != nil && !IsNil(o.ConstructorArgs) { - return true - } - - return false -} - -// SetConstructorArgs gets a reference to the given []interface{} and assigns it to the ConstructorArgs field. -func (o *DeployContractV1Request) SetConstructorArgs(v []interface{}) { - o.ConstructorArgs = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *DeployContractV1Request) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *DeployContractV1Request) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetKeychainId returns the KeychainId field value -func (o *DeployContractV1Request) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *DeployContractV1Request) SetKeychainId(v string) { - o.KeychainId = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetGas() float32 { - if o == nil || IsNil(o.Gas) { - var ret float32 - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetGasOk() (*float32, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given float32 and assigns it to the Gas field. -func (o *DeployContractV1Request) SetGas(v float32) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetGasPrice() string { - if o == nil || IsNil(o.GasPrice) { - var ret string - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetGasPriceOk() (*string, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given string and assigns it to the GasPrice field. -func (o *DeployContractV1Request) SetGasPrice(v string) { - o.GasPrice = &v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *DeployContractV1Request) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployContractV1Request) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *DeployContractV1Request) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *DeployContractV1Request) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -func (o DeployContractV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractName"] = o.ContractName - if !IsNil(o.ConstructorArgs) { - toSerialize["constructorArgs"] = o.ConstructorArgs - } - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["keychainId"] = o.KeychainId - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - return toSerialize, nil -} - -type NullableDeployContractV1Request struct { - value *DeployContractV1Request - isSet bool -} - -func (v NullableDeployContractV1Request) Get() *DeployContractV1Request { - return v.value -} - -func (v *NullableDeployContractV1Request) Set(val *DeployContractV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractV1Request(val *DeployContractV1Request) *NullableDeployContractV1Request { - return &NullableDeployContractV1Request{value: val, isSet: true} -} - -func (v NullableDeployContractV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_response.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_response.go deleted file mode 100644 index cbf0888de0..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_contract_v1_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the DeployContractV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployContractV1Response{} - -// DeployContractV1Response struct for DeployContractV1Response -type DeployContractV1Response struct { - TransactionReceipt Web3TransactionReceipt `json:"transactionReceipt"` -} - -// NewDeployContractV1Response instantiates a new DeployContractV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployContractV1Response(transactionReceipt Web3TransactionReceipt) *DeployContractV1Response { - this := DeployContractV1Response{} - this.TransactionReceipt = transactionReceipt - return &this -} - -// NewDeployContractV1ResponseWithDefaults instantiates a new DeployContractV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployContractV1ResponseWithDefaults() *DeployContractV1Response { - this := DeployContractV1Response{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value -func (o *DeployContractV1Response) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil { - var ret Web3TransactionReceipt - return ret - } - - return o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value -// and a boolean to check if the value has been set. -func (o *DeployContractV1Response) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil { - return nil, false - } - return &o.TransactionReceipt, true -} - -// SetTransactionReceipt sets field value -func (o *DeployContractV1Response) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = v -} - -func (o DeployContractV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployContractV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["transactionReceipt"] = o.TransactionReceipt - return toSerialize, nil -} - -type NullableDeployContractV1Response struct { - value *DeployContractV1Response - isSet bool -} - -func (v NullableDeployContractV1Response) Get() *DeployContractV1Response { - return v.value -} - -func (v *NullableDeployContractV1Response) Set(val *DeployContractV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableDeployContractV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployContractV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployContractV1Response(val *DeployContractV1Response) *NullableDeployContractV1Response { - return &NullableDeployContractV1Response{value: val, isSet: true} -} - -func (v NullableDeployContractV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployContractV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_request_base_v1.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_request_base_v1.go deleted file mode 100644 index 4f1152f06d..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_deploy_request_base_v1.go +++ /dev/null @@ -1,293 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the DeployRequestBaseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeployRequestBaseV1{} - -// DeployRequestBaseV1 struct for DeployRequestBaseV1 -type DeployRequestBaseV1 struct { - ContractJSON ContractJSON `json:"contractJSON"` - ConstructorArgs []interface{} `json:"constructorArgs,omitempty"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - Gas *XdaiTransactionConfigFrom `json:"gas,omitempty"` - GasPrice *XdaiTransactionConfigFrom `json:"gasPrice,omitempty"` - // The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - TimeoutMs *float32 `json:"timeoutMs,omitempty"` -} - -// NewDeployRequestBaseV1 instantiates a new DeployRequestBaseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDeployRequestBaseV1(contractJSON ContractJSON, web3SigningCredential Web3SigningCredential) *DeployRequestBaseV1 { - this := DeployRequestBaseV1{} - this.ContractJSON = contractJSON - this.Web3SigningCredential = web3SigningCredential - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// NewDeployRequestBaseV1WithDefaults instantiates a new DeployRequestBaseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDeployRequestBaseV1WithDefaults() *DeployRequestBaseV1 { - this := DeployRequestBaseV1{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetContractJSON returns the ContractJSON field value -func (o *DeployRequestBaseV1) GetContractJSON() ContractJSON { - if o == nil { - var ret ContractJSON - return ret - } - - return o.ContractJSON -} - -// GetContractJSONOk returns a tuple with the ContractJSON field value -// and a boolean to check if the value has been set. -func (o *DeployRequestBaseV1) GetContractJSONOk() (*ContractJSON, bool) { - if o == nil { - return nil, false - } - return &o.ContractJSON, true -} - -// SetContractJSON sets field value -func (o *DeployRequestBaseV1) SetContractJSON(v ContractJSON) { - o.ContractJSON = v -} - -// GetConstructorArgs returns the ConstructorArgs field value if set, zero value otherwise. -func (o *DeployRequestBaseV1) GetConstructorArgs() []interface{} { - if o == nil || IsNil(o.ConstructorArgs) { - var ret []interface{} - return ret - } - return o.ConstructorArgs -} - -// GetConstructorArgsOk returns a tuple with the ConstructorArgs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployRequestBaseV1) GetConstructorArgsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.ConstructorArgs) { - return nil, false - } - return o.ConstructorArgs, true -} - -// HasConstructorArgs returns a boolean if a field has been set. -func (o *DeployRequestBaseV1) HasConstructorArgs() bool { - if o != nil && !IsNil(o.ConstructorArgs) { - return true - } - - return false -} - -// SetConstructorArgs gets a reference to the given []interface{} and assigns it to the ConstructorArgs field. -func (o *DeployRequestBaseV1) SetConstructorArgs(v []interface{}) { - o.ConstructorArgs = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *DeployRequestBaseV1) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *DeployRequestBaseV1) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *DeployRequestBaseV1) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *DeployRequestBaseV1) GetGas() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.Gas) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployRequestBaseV1) GetGasOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *DeployRequestBaseV1) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given XdaiTransactionConfigFrom and assigns it to the Gas field. -func (o *DeployRequestBaseV1) SetGas(v XdaiTransactionConfigFrom) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *DeployRequestBaseV1) GetGasPrice() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.GasPrice) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployRequestBaseV1) GetGasPriceOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *DeployRequestBaseV1) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given XdaiTransactionConfigFrom and assigns it to the GasPrice field. -func (o *DeployRequestBaseV1) SetGasPrice(v XdaiTransactionConfigFrom) { - o.GasPrice = &v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *DeployRequestBaseV1) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DeployRequestBaseV1) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *DeployRequestBaseV1) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *DeployRequestBaseV1) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -func (o DeployRequestBaseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DeployRequestBaseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractJSON"] = o.ContractJSON - if !IsNil(o.ConstructorArgs) { - toSerialize["constructorArgs"] = o.ConstructorArgs - } - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - return toSerialize, nil -} - -type NullableDeployRequestBaseV1 struct { - value *DeployRequestBaseV1 - isSet bool -} - -func (v NullableDeployRequestBaseV1) Get() *DeployRequestBaseV1 { - return v.value -} - -func (v *NullableDeployRequestBaseV1) Set(val *DeployRequestBaseV1) { - v.value = val - v.isSet = true -} - -func (v NullableDeployRequestBaseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableDeployRequestBaseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeployRequestBaseV1(val *DeployRequestBaseV1) *NullableDeployRequestBaseV1 { - return &NullableDeployRequestBaseV1{value: val, isSet: true} -} - -func (v NullableDeployRequestBaseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeployRequestBaseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_type.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_type.go deleted file mode 100644 index e5dd9c3216..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_eth_contract_invocation_type.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" - "fmt" -) - -// EthContractInvocationType the model 'EthContractInvocationType' -type EthContractInvocationType string - -// List of EthContractInvocationType -const ( - SEND EthContractInvocationType = "SEND" - CALL EthContractInvocationType = "CALL" -) - -// All allowed values of EthContractInvocationType enum -var AllowedEthContractInvocationTypeEnumValues = []EthContractInvocationType{ - "SEND", - "CALL", -} - -func (v *EthContractInvocationType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := EthContractInvocationType(value) - for _, existing := range AllowedEthContractInvocationTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid EthContractInvocationType", value) -} - -// NewEthContractInvocationTypeFromValue returns a pointer to a valid EthContractInvocationType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewEthContractInvocationTypeFromValue(v string) (*EthContractInvocationType, error) { - ev := EthContractInvocationType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for EthContractInvocationType: valid values are %v", v, AllowedEthContractInvocationTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v EthContractInvocationType) IsValid() bool { - for _, existing := range AllowedEthContractInvocationTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to EthContractInvocationType value -func (v EthContractInvocationType) Ptr() *EthContractInvocationType { - return &v -} - -type NullableEthContractInvocationType struct { - value *EthContractInvocationType - isSet bool -} - -func (v NullableEthContractInvocationType) Get() *EthContractInvocationType { - return v.value -} - -func (v *NullableEthContractInvocationType) Set(val *EthContractInvocationType) { - v.value = val - v.isSet = true -} - -func (v NullableEthContractInvocationType) IsSet() bool { - return v.isSet -} - -func (v *NullableEthContractInvocationType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEthContractInvocationType(val *EthContractInvocationType) *NullableEthContractInvocationType { - return &NullableEthContractInvocationType{value: val, isSet: true} -} - -func (v NullableEthContractInvocationType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEthContractInvocationType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_contract_json_object_v1_request.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_contract_json_object_v1_request.go deleted file mode 100644 index e48b435737..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_contract_json_object_v1_request.go +++ /dev/null @@ -1,440 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the InvokeContractJsonObjectV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractJsonObjectV1Request{} - -// InvokeContractJsonObjectV1Request struct for InvokeContractJsonObjectV1Request -type InvokeContractJsonObjectV1Request struct { - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - InvocationType EthContractInvocationType `json:"invocationType"` - // The name of the contract method to invoke. - MethodName string `json:"methodName"` - // The list of arguments to pass in to the contract method being invoked. - Params []interface{} `json:"params"` - // Address of the solidity contract - ContractAddress string `json:"contractAddress"` - Value *XdaiTransactionConfigFrom `json:"value,omitempty"` - Gas *XdaiTransactionConfigFrom `json:"gas,omitempty"` - GasPrice *XdaiTransactionConfigFrom `json:"gasPrice,omitempty"` - Nonce *float32 `json:"nonce,omitempty"` - // The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND - TimeoutMs *float32 `json:"timeoutMs,omitempty"` - ContractJSON ContractJSON `json:"contractJSON"` -} - -// NewInvokeContractJsonObjectV1Request instantiates a new InvokeContractJsonObjectV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractJsonObjectV1Request(web3SigningCredential Web3SigningCredential, invocationType EthContractInvocationType, methodName string, params []interface{}, contractAddress string, contractJSON ContractJSON) *InvokeContractJsonObjectV1Request { - this := InvokeContractJsonObjectV1Request{} - this.Web3SigningCredential = web3SigningCredential - this.InvocationType = invocationType - this.MethodName = methodName - this.Params = params - this.ContractAddress = contractAddress - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - this.ContractJSON = contractJSON - return &this -} - -// NewInvokeContractJsonObjectV1RequestWithDefaults instantiates a new InvokeContractJsonObjectV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractJsonObjectV1RequestWithDefaults() *InvokeContractJsonObjectV1Request { - this := InvokeContractJsonObjectV1Request{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *InvokeContractJsonObjectV1Request) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *InvokeContractJsonObjectV1Request) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetInvocationType returns the InvocationType field value -func (o *InvokeContractJsonObjectV1Request) GetInvocationType() EthContractInvocationType { - if o == nil { - var ret EthContractInvocationType - return ret - } - - return o.InvocationType -} - -// GetInvocationTypeOk returns a tuple with the InvocationType field value -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetInvocationTypeOk() (*EthContractInvocationType, bool) { - if o == nil { - return nil, false - } - return &o.InvocationType, true -} - -// SetInvocationType sets field value -func (o *InvokeContractJsonObjectV1Request) SetInvocationType(v EthContractInvocationType) { - o.InvocationType = v -} - -// GetMethodName returns the MethodName field value -func (o *InvokeContractJsonObjectV1Request) GetMethodName() string { - if o == nil { - var ret string - return ret - } - - return o.MethodName -} - -// GetMethodNameOk returns a tuple with the MethodName field value -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetMethodNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MethodName, true -} - -// SetMethodName sets field value -func (o *InvokeContractJsonObjectV1Request) SetMethodName(v string) { - o.MethodName = v -} - -// GetParams returns the Params field value -func (o *InvokeContractJsonObjectV1Request) GetParams() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetParamsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Params, true -} - -// SetParams sets field value -func (o *InvokeContractJsonObjectV1Request) SetParams(v []interface{}) { - o.Params = v -} - -// GetContractAddress returns the ContractAddress field value -func (o *InvokeContractJsonObjectV1Request) GetContractAddress() string { - if o == nil { - var ret string - return ret - } - - return o.ContractAddress -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractAddress, true -} - -// SetContractAddress sets field value -func (o *InvokeContractJsonObjectV1Request) SetContractAddress(v string) { - o.ContractAddress = v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *InvokeContractJsonObjectV1Request) GetValue() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.Value) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetValueOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *InvokeContractJsonObjectV1Request) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given XdaiTransactionConfigFrom and assigns it to the Value field. -func (o *InvokeContractJsonObjectV1Request) SetValue(v XdaiTransactionConfigFrom) { - o.Value = &v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *InvokeContractJsonObjectV1Request) GetGas() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.Gas) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetGasOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *InvokeContractJsonObjectV1Request) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given XdaiTransactionConfigFrom and assigns it to the Gas field. -func (o *InvokeContractJsonObjectV1Request) SetGas(v XdaiTransactionConfigFrom) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *InvokeContractJsonObjectV1Request) GetGasPrice() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.GasPrice) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetGasPriceOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *InvokeContractJsonObjectV1Request) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given XdaiTransactionConfigFrom and assigns it to the GasPrice field. -func (o *InvokeContractJsonObjectV1Request) SetGasPrice(v XdaiTransactionConfigFrom) { - o.GasPrice = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *InvokeContractJsonObjectV1Request) GetNonce() float32 { - if o == nil || IsNil(o.Nonce) { - var ret float32 - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetNonceOk() (*float32, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *InvokeContractJsonObjectV1Request) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given float32 and assigns it to the Nonce field. -func (o *InvokeContractJsonObjectV1Request) SetNonce(v float32) { - o.Nonce = &v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *InvokeContractJsonObjectV1Request) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *InvokeContractJsonObjectV1Request) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *InvokeContractJsonObjectV1Request) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -// GetContractJSON returns the ContractJSON field value -func (o *InvokeContractJsonObjectV1Request) GetContractJSON() ContractJSON { - if o == nil { - var ret ContractJSON - return ret - } - - return o.ContractJSON -} - -// GetContractJSONOk returns a tuple with the ContractJSON field value -// and a boolean to check if the value has been set. -func (o *InvokeContractJsonObjectV1Request) GetContractJSONOk() (*ContractJSON, bool) { - if o == nil { - return nil, false - } - return &o.ContractJSON, true -} - -// SetContractJSON sets field value -func (o *InvokeContractJsonObjectV1Request) SetContractJSON(v ContractJSON) { - o.ContractJSON = v -} - -func (o InvokeContractJsonObjectV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractJsonObjectV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["invocationType"] = o.InvocationType - toSerialize["methodName"] = o.MethodName - toSerialize["params"] = o.Params - toSerialize["contractAddress"] = o.ContractAddress - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - toSerialize["contractJSON"] = o.ContractJSON - return toSerialize, nil -} - -type NullableInvokeContractJsonObjectV1Request struct { - value *InvokeContractJsonObjectV1Request - isSet bool -} - -func (v NullableInvokeContractJsonObjectV1Request) Get() *InvokeContractJsonObjectV1Request { - return v.value -} - -func (v *NullableInvokeContractJsonObjectV1Request) Set(val *InvokeContractJsonObjectV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractJsonObjectV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractJsonObjectV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractJsonObjectV1Request(val *InvokeContractJsonObjectV1Request) *NullableInvokeContractJsonObjectV1Request { - return &NullableInvokeContractJsonObjectV1Request{value: val, isSet: true} -} - -func (v NullableInvokeContractJsonObjectV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractJsonObjectV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go deleted file mode 100644 index de11a44ee0..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_request.go +++ /dev/null @@ -1,441 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the InvokeContractV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractV1Request{} - -// InvokeContractV1Request struct for InvokeContractV1Request -type InvokeContractV1Request struct { - // The contract name to find it in the keychain plugin - ContractName string `json:"contractName"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - InvocationType EthContractInvocationType `json:"invocationType"` - // The name of the contract method to invoke. - MethodName string `json:"methodName"` - // The list of arguments to pass in to the contract method being invoked. - Params []interface{} `json:"params"` - Value *XdaiTransactionConfigFrom `json:"value,omitempty"` - Gas *XdaiTransactionConfigFrom `json:"gas,omitempty"` - GasPrice *XdaiTransactionConfigFrom `json:"gasPrice,omitempty"` - Nonce *float32 `json:"nonce,omitempty"` - // The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND - TimeoutMs *float32 `json:"timeoutMs,omitempty"` - // The keychainId for retrieve the contracts json. - KeychainId string `json:"keychainId"` -} - -// NewInvokeContractV1Request instantiates a new InvokeContractV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractV1Request(contractName string, web3SigningCredential Web3SigningCredential, invocationType EthContractInvocationType, methodName string, params []interface{}, keychainId string) *InvokeContractV1Request { - this := InvokeContractV1Request{} - this.ContractName = contractName - this.Web3SigningCredential = web3SigningCredential - this.InvocationType = invocationType - this.MethodName = methodName - this.Params = params - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - this.KeychainId = keychainId - return &this -} - -// NewInvokeContractV1RequestWithDefaults instantiates a new InvokeContractV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractV1RequestWithDefaults() *InvokeContractV1Request { - this := InvokeContractV1Request{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetContractName returns the ContractName field value -func (o *InvokeContractV1Request) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *InvokeContractV1Request) SetContractName(v string) { - o.ContractName = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *InvokeContractV1Request) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *InvokeContractV1Request) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetInvocationType returns the InvocationType field value -func (o *InvokeContractV1Request) GetInvocationType() EthContractInvocationType { - if o == nil { - var ret EthContractInvocationType - return ret - } - - return o.InvocationType -} - -// GetInvocationTypeOk returns a tuple with the InvocationType field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetInvocationTypeOk() (*EthContractInvocationType, bool) { - if o == nil { - return nil, false - } - return &o.InvocationType, true -} - -// SetInvocationType sets field value -func (o *InvokeContractV1Request) SetInvocationType(v EthContractInvocationType) { - o.InvocationType = v -} - -// GetMethodName returns the MethodName field value -func (o *InvokeContractV1Request) GetMethodName() string { - if o == nil { - var ret string - return ret - } - - return o.MethodName -} - -// GetMethodNameOk returns a tuple with the MethodName field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetMethodNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MethodName, true -} - -// SetMethodName sets field value -func (o *InvokeContractV1Request) SetMethodName(v string) { - o.MethodName = v -} - -// GetParams returns the Params field value -func (o *InvokeContractV1Request) GetParams() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetParamsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Params, true -} - -// SetParams sets field value -func (o *InvokeContractV1Request) SetParams(v []interface{}) { - o.Params = v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetValue() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.Value) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetValueOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given XdaiTransactionConfigFrom and assigns it to the Value field. -func (o *InvokeContractV1Request) SetValue(v XdaiTransactionConfigFrom) { - o.Value = &v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetGas() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.Gas) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetGasOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given XdaiTransactionConfigFrom and assigns it to the Gas field. -func (o *InvokeContractV1Request) SetGas(v XdaiTransactionConfigFrom) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetGasPrice() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.GasPrice) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetGasPriceOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given XdaiTransactionConfigFrom and assigns it to the GasPrice field. -func (o *InvokeContractV1Request) SetGasPrice(v XdaiTransactionConfigFrom) { - o.GasPrice = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetNonce() float32 { - if o == nil || IsNil(o.Nonce) { - var ret float32 - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetNonceOk() (*float32, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given float32 and assigns it to the Nonce field. -func (o *InvokeContractV1Request) SetNonce(v float32) { - o.Nonce = &v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *InvokeContractV1Request) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *InvokeContractV1Request) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *InvokeContractV1Request) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -// GetKeychainId returns the KeychainId field value -func (o *InvokeContractV1Request) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Request) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *InvokeContractV1Request) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o InvokeContractV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractName"] = o.ContractName - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["invocationType"] = o.InvocationType - toSerialize["methodName"] = o.MethodName - toSerialize["params"] = o.Params - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableInvokeContractV1Request struct { - value *InvokeContractV1Request - isSet bool -} - -func (v NullableInvokeContractV1Request) Get() *InvokeContractV1Request { - return v.value -} - -func (v *NullableInvokeContractV1Request) Set(val *InvokeContractV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1Request(val *InvokeContractV1Request) *NullableInvokeContractV1Request { - return &NullableInvokeContractV1Request{value: val, isSet: true} -} - -func (v NullableInvokeContractV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go deleted file mode 100644 index 164dbbc3ce..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_contract_v1_response.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the InvokeContractV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeContractV1Response{} - -// InvokeContractV1Response struct for InvokeContractV1Response -type InvokeContractV1Response struct { - TransactionReceipt *Web3TransactionReceipt `json:"transactionReceipt,omitempty"` - CallOutput interface{} `json:"callOutput,omitempty"` - Success bool `json:"success"` -} - -// NewInvokeContractV1Response instantiates a new InvokeContractV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeContractV1Response(success bool) *InvokeContractV1Response { - this := InvokeContractV1Response{} - this.Success = success - return &this -} - -// NewInvokeContractV1ResponseWithDefaults instantiates a new InvokeContractV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeContractV1ResponseWithDefaults() *InvokeContractV1Response { - this := InvokeContractV1Response{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value if set, zero value otherwise. -func (o *InvokeContractV1Response) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil || IsNil(o.TransactionReceipt) { - var ret Web3TransactionReceipt - return ret - } - return *o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil || IsNil(o.TransactionReceipt) { - return nil, false - } - return o.TransactionReceipt, true -} - -// HasTransactionReceipt returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasTransactionReceipt() bool { - if o != nil && !IsNil(o.TransactionReceipt) { - return true - } - - return false -} - -// SetTransactionReceipt gets a reference to the given Web3TransactionReceipt and assigns it to the TransactionReceipt field. -func (o *InvokeContractV1Response) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = &v -} - -// GetCallOutput returns the CallOutput field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvokeContractV1Response) GetCallOutput() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CallOutput -} - -// GetCallOutputOk returns a tuple with the CallOutput field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvokeContractV1Response) GetCallOutputOk() (*interface{}, bool) { - if o == nil || IsNil(o.CallOutput) { - return nil, false - } - return &o.CallOutput, true -} - -// HasCallOutput returns a boolean if a field has been set. -func (o *InvokeContractV1Response) HasCallOutput() bool { - if o != nil && IsNil(o.CallOutput) { - return true - } - - return false -} - -// SetCallOutput gets a reference to the given interface{} and assigns it to the CallOutput field. -func (o *InvokeContractV1Response) SetCallOutput(v interface{}) { - o.CallOutput = v -} - -// GetSuccess returns the Success field value -func (o *InvokeContractV1Response) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *InvokeContractV1Response) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *InvokeContractV1Response) SetSuccess(v bool) { - o.Success = v -} - -func (o InvokeContractV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeContractV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.TransactionReceipt) { - toSerialize["transactionReceipt"] = o.TransactionReceipt - } - if o.CallOutput != nil { - toSerialize["callOutput"] = o.CallOutput - } - toSerialize["success"] = o.Success - return toSerialize, nil -} - -type NullableInvokeContractV1Response struct { - value *InvokeContractV1Response - isSet bool -} - -func (v NullableInvokeContractV1Response) Get() *InvokeContractV1Response { - return v.value -} - -func (v *NullableInvokeContractV1Response) Set(val *InvokeContractV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeContractV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeContractV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeContractV1Response(val *InvokeContractV1Response) *NullableInvokeContractV1Response { - return &NullableInvokeContractV1Response{value: val, isSet: true} -} - -func (v NullableInvokeContractV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeContractV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_request_base_v1.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_request_base_v1.go deleted file mode 100644 index dfaee9a5a1..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_invoke_request_base_v1.go +++ /dev/null @@ -1,440 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the InvokeRequestBaseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvokeRequestBaseV1{} - -// InvokeRequestBaseV1 struct for InvokeRequestBaseV1 -type InvokeRequestBaseV1 struct { - // Address of the solidity contract - ContractAddress string `json:"contractAddress"` - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - InvocationType EthContractInvocationType `json:"invocationType"` - // The name of the contract method to invoke. - MethodName string `json:"methodName"` - // The list of arguments to pass in to the contract method being invoked. - Params []interface{} `json:"params"` - Value *XdaiTransactionConfigFrom `json:"value,omitempty"` - Gas *XdaiTransactionConfigFrom `json:"gas,omitempty"` - GasPrice *XdaiTransactionConfigFrom `json:"gasPrice,omitempty"` - Nonce *float32 `json:"nonce,omitempty"` - // The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND - TimeoutMs *float32 `json:"timeoutMs,omitempty"` - ContractJSON ContractJSON `json:"contractJSON"` -} - -// NewInvokeRequestBaseV1 instantiates a new InvokeRequestBaseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvokeRequestBaseV1(contractAddress string, web3SigningCredential Web3SigningCredential, invocationType EthContractInvocationType, methodName string, params []interface{}, contractJSON ContractJSON) *InvokeRequestBaseV1 { - this := InvokeRequestBaseV1{} - this.ContractAddress = contractAddress - this.Web3SigningCredential = web3SigningCredential - this.InvocationType = invocationType - this.MethodName = methodName - this.Params = params - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - this.ContractJSON = contractJSON - return &this -} - -// NewInvokeRequestBaseV1WithDefaults instantiates a new InvokeRequestBaseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvokeRequestBaseV1WithDefaults() *InvokeRequestBaseV1 { - this := InvokeRequestBaseV1{} - var timeoutMs float32 = 60000 - this.TimeoutMs = &timeoutMs - return &this -} - -// GetContractAddress returns the ContractAddress field value -func (o *InvokeRequestBaseV1) GetContractAddress() string { - if o == nil { - var ret string - return ret - } - - return o.ContractAddress -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractAddress, true -} - -// SetContractAddress sets field value -func (o *InvokeRequestBaseV1) SetContractAddress(v string) { - o.ContractAddress = v -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *InvokeRequestBaseV1) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *InvokeRequestBaseV1) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetInvocationType returns the InvocationType field value -func (o *InvokeRequestBaseV1) GetInvocationType() EthContractInvocationType { - if o == nil { - var ret EthContractInvocationType - return ret - } - - return o.InvocationType -} - -// GetInvocationTypeOk returns a tuple with the InvocationType field value -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetInvocationTypeOk() (*EthContractInvocationType, bool) { - if o == nil { - return nil, false - } - return &o.InvocationType, true -} - -// SetInvocationType sets field value -func (o *InvokeRequestBaseV1) SetInvocationType(v EthContractInvocationType) { - o.InvocationType = v -} - -// GetMethodName returns the MethodName field value -func (o *InvokeRequestBaseV1) GetMethodName() string { - if o == nil { - var ret string - return ret - } - - return o.MethodName -} - -// GetMethodNameOk returns a tuple with the MethodName field value -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetMethodNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MethodName, true -} - -// SetMethodName sets field value -func (o *InvokeRequestBaseV1) SetMethodName(v string) { - o.MethodName = v -} - -// GetParams returns the Params field value -func (o *InvokeRequestBaseV1) GetParams() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetParamsOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Params, true -} - -// SetParams sets field value -func (o *InvokeRequestBaseV1) SetParams(v []interface{}) { - o.Params = v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *InvokeRequestBaseV1) GetValue() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.Value) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetValueOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *InvokeRequestBaseV1) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given XdaiTransactionConfigFrom and assigns it to the Value field. -func (o *InvokeRequestBaseV1) SetValue(v XdaiTransactionConfigFrom) { - o.Value = &v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *InvokeRequestBaseV1) GetGas() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.Gas) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetGasOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *InvokeRequestBaseV1) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given XdaiTransactionConfigFrom and assigns it to the Gas field. -func (o *InvokeRequestBaseV1) SetGas(v XdaiTransactionConfigFrom) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *InvokeRequestBaseV1) GetGasPrice() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.GasPrice) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetGasPriceOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *InvokeRequestBaseV1) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given XdaiTransactionConfigFrom and assigns it to the GasPrice field. -func (o *InvokeRequestBaseV1) SetGasPrice(v XdaiTransactionConfigFrom) { - o.GasPrice = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *InvokeRequestBaseV1) GetNonce() float32 { - if o == nil || IsNil(o.Nonce) { - var ret float32 - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetNonceOk() (*float32, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *InvokeRequestBaseV1) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given float32 and assigns it to the Nonce field. -func (o *InvokeRequestBaseV1) SetNonce(v float32) { - o.Nonce = &v -} - -// GetTimeoutMs returns the TimeoutMs field value if set, zero value otherwise. -func (o *InvokeRequestBaseV1) GetTimeoutMs() float32 { - if o == nil || IsNil(o.TimeoutMs) { - var ret float32 - return ret - } - return *o.TimeoutMs -} - -// GetTimeoutMsOk returns a tuple with the TimeoutMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetTimeoutMsOk() (*float32, bool) { - if o == nil || IsNil(o.TimeoutMs) { - return nil, false - } - return o.TimeoutMs, true -} - -// HasTimeoutMs returns a boolean if a field has been set. -func (o *InvokeRequestBaseV1) HasTimeoutMs() bool { - if o != nil && !IsNil(o.TimeoutMs) { - return true - } - - return false -} - -// SetTimeoutMs gets a reference to the given float32 and assigns it to the TimeoutMs field. -func (o *InvokeRequestBaseV1) SetTimeoutMs(v float32) { - o.TimeoutMs = &v -} - -// GetContractJSON returns the ContractJSON field value -func (o *InvokeRequestBaseV1) GetContractJSON() ContractJSON { - if o == nil { - var ret ContractJSON - return ret - } - - return o.ContractJSON -} - -// GetContractJSONOk returns a tuple with the ContractJSON field value -// and a boolean to check if the value has been set. -func (o *InvokeRequestBaseV1) GetContractJSONOk() (*ContractJSON, bool) { - if o == nil { - return nil, false - } - return &o.ContractJSON, true -} - -// SetContractJSON sets field value -func (o *InvokeRequestBaseV1) SetContractJSON(v ContractJSON) { - o.ContractJSON = v -} - -func (o InvokeRequestBaseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvokeRequestBaseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractAddress"] = o.ContractAddress - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["invocationType"] = o.InvocationType - toSerialize["methodName"] = o.MethodName - toSerialize["params"] = o.Params - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - if !IsNil(o.TimeoutMs) { - toSerialize["timeoutMs"] = o.TimeoutMs - } - toSerialize["contractJSON"] = o.ContractJSON - return toSerialize, nil -} - -type NullableInvokeRequestBaseV1 struct { - value *InvokeRequestBaseV1 - isSet bool -} - -func (v NullableInvokeRequestBaseV1) Get() *InvokeRequestBaseV1 { - return v.value -} - -func (v *NullableInvokeRequestBaseV1) Set(val *InvokeRequestBaseV1) { - v.value = val - v.isSet = true -} - -func (v NullableInvokeRequestBaseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableInvokeRequestBaseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvokeRequestBaseV1(val *InvokeRequestBaseV1) *NullableInvokeRequestBaseV1 { - return &NullableInvokeRequestBaseV1{value: val, isSet: true} -} - -func (v NullableInvokeRequestBaseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvokeRequestBaseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_receipt_type.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_receipt_type.go deleted file mode 100644 index db019be391..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_receipt_type.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" - "fmt" -) - -// ReceiptType Enumerates the possible types of receipts that can be waited for by someone or something that has requested the execution of a transaction on a ledger. -type ReceiptType string - -// List of ReceiptType -const ( - NODE_TX_POOL_ACK ReceiptType = "NODE_TX_POOL_ACK" - LEDGER_BLOCK_ACK ReceiptType = "LEDGER_BLOCK_ACK" -) - -// All allowed values of ReceiptType enum -var AllowedReceiptTypeEnumValues = []ReceiptType{ - "NODE_TX_POOL_ACK", - "LEDGER_BLOCK_ACK", -} - -func (v *ReceiptType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := ReceiptType(value) - for _, existing := range AllowedReceiptTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid ReceiptType", value) -} - -// NewReceiptTypeFromValue returns a pointer to a valid ReceiptType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewReceiptTypeFromValue(v string) (*ReceiptType, error) { - ev := ReceiptType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ReceiptType: valid values are %v", v, AllowedReceiptTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v ReceiptType) IsValid() bool { - for _, existing := range AllowedReceiptTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to ReceiptType value -func (v ReceiptType) Ptr() *ReceiptType { - return &v -} - -type NullableReceiptType struct { - value *ReceiptType - isSet bool -} - -func (v NullableReceiptType) Get() *ReceiptType { - return v.value -} - -func (v *NullableReceiptType) Set(val *ReceiptType) { - v.value = val - v.isSet = true -} - -func (v NullableReceiptType) IsSet() bool { - return v.isSet -} - -func (v *NullableReceiptType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableReceiptType(val *ReceiptType) *NullableReceiptType { - return &NullableReceiptType{value: val, isSet: true} -} - -func (v NullableReceiptType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableReceiptType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_run_transaction_v1_request.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_run_transaction_v1_request.go deleted file mode 100644 index 05188e5e60..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_run_transaction_v1_request.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the RunTransactionV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionV1Request{} - -// RunTransactionV1Request struct for RunTransactionV1Request -type RunTransactionV1Request struct { - Web3SigningCredential Web3SigningCredential `json:"web3SigningCredential"` - TransactionConfig XdaiTransactionConfig `json:"transactionConfig"` - ConsistencyStrategy ConsistencyStrategy `json:"consistencyStrategy"` -} - -// NewRunTransactionV1Request instantiates a new RunTransactionV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionV1Request(web3SigningCredential Web3SigningCredential, transactionConfig XdaiTransactionConfig, consistencyStrategy ConsistencyStrategy) *RunTransactionV1Request { - this := RunTransactionV1Request{} - this.Web3SigningCredential = web3SigningCredential - this.TransactionConfig = transactionConfig - this.ConsistencyStrategy = consistencyStrategy - return &this -} - -// NewRunTransactionV1RequestWithDefaults instantiates a new RunTransactionV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionV1RequestWithDefaults() *RunTransactionV1Request { - this := RunTransactionV1Request{} - return &this -} - -// GetWeb3SigningCredential returns the Web3SigningCredential field value -func (o *RunTransactionV1Request) GetWeb3SigningCredential() Web3SigningCredential { - if o == nil { - var ret Web3SigningCredential - return ret - } - - return o.Web3SigningCredential -} - -// GetWeb3SigningCredentialOk returns a tuple with the Web3SigningCredential field value -// and a boolean to check if the value has been set. -func (o *RunTransactionV1Request) GetWeb3SigningCredentialOk() (*Web3SigningCredential, bool) { - if o == nil { - return nil, false - } - return &o.Web3SigningCredential, true -} - -// SetWeb3SigningCredential sets field value -func (o *RunTransactionV1Request) SetWeb3SigningCredential(v Web3SigningCredential) { - o.Web3SigningCredential = v -} - -// GetTransactionConfig returns the TransactionConfig field value -func (o *RunTransactionV1Request) GetTransactionConfig() XdaiTransactionConfig { - if o == nil { - var ret XdaiTransactionConfig - return ret - } - - return o.TransactionConfig -} - -// GetTransactionConfigOk returns a tuple with the TransactionConfig field value -// and a boolean to check if the value has been set. -func (o *RunTransactionV1Request) GetTransactionConfigOk() (*XdaiTransactionConfig, bool) { - if o == nil { - return nil, false - } - return &o.TransactionConfig, true -} - -// SetTransactionConfig sets field value -func (o *RunTransactionV1Request) SetTransactionConfig(v XdaiTransactionConfig) { - o.TransactionConfig = v -} - -// GetConsistencyStrategy returns the ConsistencyStrategy field value -func (o *RunTransactionV1Request) GetConsistencyStrategy() ConsistencyStrategy { - if o == nil { - var ret ConsistencyStrategy - return ret - } - - return o.ConsistencyStrategy -} - -// GetConsistencyStrategyOk returns a tuple with the ConsistencyStrategy field value -// and a boolean to check if the value has been set. -func (o *RunTransactionV1Request) GetConsistencyStrategyOk() (*ConsistencyStrategy, bool) { - if o == nil { - return nil, false - } - return &o.ConsistencyStrategy, true -} - -// SetConsistencyStrategy sets field value -func (o *RunTransactionV1Request) SetConsistencyStrategy(v ConsistencyStrategy) { - o.ConsistencyStrategy = v -} - -func (o RunTransactionV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["web3SigningCredential"] = o.Web3SigningCredential - toSerialize["transactionConfig"] = o.TransactionConfig - toSerialize["consistencyStrategy"] = o.ConsistencyStrategy - return toSerialize, nil -} - -type NullableRunTransactionV1Request struct { - value *RunTransactionV1Request - isSet bool -} - -func (v NullableRunTransactionV1Request) Get() *RunTransactionV1Request { - return v.value -} - -func (v *NullableRunTransactionV1Request) Set(val *RunTransactionV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionV1Request(val *RunTransactionV1Request) *NullableRunTransactionV1Request { - return &NullableRunTransactionV1Request{value: val, isSet: true} -} - -func (v NullableRunTransactionV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_run_transaction_v1_response.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_run_transaction_v1_response.go deleted file mode 100644 index 1a12833e47..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_run_transaction_v1_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the RunTransactionV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunTransactionV1Response{} - -// RunTransactionV1Response struct for RunTransactionV1Response -type RunTransactionV1Response struct { - TransactionReceipt Web3TransactionReceipt `json:"transactionReceipt"` -} - -// NewRunTransactionV1Response instantiates a new RunTransactionV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunTransactionV1Response(transactionReceipt Web3TransactionReceipt) *RunTransactionV1Response { - this := RunTransactionV1Response{} - this.TransactionReceipt = transactionReceipt - return &this -} - -// NewRunTransactionV1ResponseWithDefaults instantiates a new RunTransactionV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunTransactionV1ResponseWithDefaults() *RunTransactionV1Response { - this := RunTransactionV1Response{} - return &this -} - -// GetTransactionReceipt returns the TransactionReceipt field value -func (o *RunTransactionV1Response) GetTransactionReceipt() Web3TransactionReceipt { - if o == nil { - var ret Web3TransactionReceipt - return ret - } - - return o.TransactionReceipt -} - -// GetTransactionReceiptOk returns a tuple with the TransactionReceipt field value -// and a boolean to check if the value has been set. -func (o *RunTransactionV1Response) GetTransactionReceiptOk() (*Web3TransactionReceipt, bool) { - if o == nil { - return nil, false - } - return &o.TransactionReceipt, true -} - -// SetTransactionReceipt sets field value -func (o *RunTransactionV1Response) SetTransactionReceipt(v Web3TransactionReceipt) { - o.TransactionReceipt = v -} - -func (o RunTransactionV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunTransactionV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["transactionReceipt"] = o.TransactionReceipt - return toSerialize, nil -} - -type NullableRunTransactionV1Response struct { - value *RunTransactionV1Response - isSet bool -} - -func (v NullableRunTransactionV1Response) Get() *RunTransactionV1Response { - return v.value -} - -func (v *NullableRunTransactionV1Response) Set(val *RunTransactionV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableRunTransactionV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableRunTransactionV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunTransactionV1Response(val *RunTransactionV1Response) *NullableRunTransactionV1Response { - return &NullableRunTransactionV1Response{value: val, isSet: true} -} - -func (v NullableRunTransactionV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunTransactionV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact.go deleted file mode 100644 index a67e5d0001..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact.go +++ /dev/null @@ -1,441 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the SolidityContractJsonArtifact type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SolidityContractJsonArtifact{} - -// SolidityContractJsonArtifact struct for SolidityContractJsonArtifact -type SolidityContractJsonArtifact struct { - ContractName string `json:"contractName"` - Metadata *string `json:"metadata,omitempty"` - Bytecode *string `json:"bytecode,omitempty"` - DeployedBytecode *string `json:"deployedBytecode,omitempty"` - SourceMap *string `json:"sourceMap,omitempty"` - DeployedSourceMap *string `json:"deployedSourceMap,omitempty"` - SourcePath *string `json:"sourcePath,omitempty"` - Compiler *SolidityContractJsonArtifactCompiler `json:"compiler,omitempty"` - FunctionHashes map[string]interface{} `json:"functionHashes,omitempty"` - GasEstimates *SolidityContractJsonArtifactGasEstimates `json:"gasEstimates,omitempty"` -} - -// NewSolidityContractJsonArtifact instantiates a new SolidityContractJsonArtifact object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSolidityContractJsonArtifact(contractName string) *SolidityContractJsonArtifact { - this := SolidityContractJsonArtifact{} - this.ContractName = contractName - return &this -} - -// NewSolidityContractJsonArtifactWithDefaults instantiates a new SolidityContractJsonArtifact object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSolidityContractJsonArtifactWithDefaults() *SolidityContractJsonArtifact { - this := SolidityContractJsonArtifact{} - return &this -} - -// GetContractName returns the ContractName field value -func (o *SolidityContractJsonArtifact) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *SolidityContractJsonArtifact) SetContractName(v string) { - o.ContractName = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetMetadata() string { - if o == nil || IsNil(o.Metadata) { - var ret string - return ret - } - return *o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetMetadataOk() (*string, bool) { - if o == nil || IsNil(o.Metadata) { - return nil, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasMetadata() bool { - if o != nil && !IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given string and assigns it to the Metadata field. -func (o *SolidityContractJsonArtifact) SetMetadata(v string) { - o.Metadata = &v -} - -// GetBytecode returns the Bytecode field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetBytecode() string { - if o == nil || IsNil(o.Bytecode) { - var ret string - return ret - } - return *o.Bytecode -} - -// GetBytecodeOk returns a tuple with the Bytecode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetBytecodeOk() (*string, bool) { - if o == nil || IsNil(o.Bytecode) { - return nil, false - } - return o.Bytecode, true -} - -// HasBytecode returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasBytecode() bool { - if o != nil && !IsNil(o.Bytecode) { - return true - } - - return false -} - -// SetBytecode gets a reference to the given string and assigns it to the Bytecode field. -func (o *SolidityContractJsonArtifact) SetBytecode(v string) { - o.Bytecode = &v -} - -// GetDeployedBytecode returns the DeployedBytecode field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetDeployedBytecode() string { - if o == nil || IsNil(o.DeployedBytecode) { - var ret string - return ret - } - return *o.DeployedBytecode -} - -// GetDeployedBytecodeOk returns a tuple with the DeployedBytecode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetDeployedBytecodeOk() (*string, bool) { - if o == nil || IsNil(o.DeployedBytecode) { - return nil, false - } - return o.DeployedBytecode, true -} - -// HasDeployedBytecode returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasDeployedBytecode() bool { - if o != nil && !IsNil(o.DeployedBytecode) { - return true - } - - return false -} - -// SetDeployedBytecode gets a reference to the given string and assigns it to the DeployedBytecode field. -func (o *SolidityContractJsonArtifact) SetDeployedBytecode(v string) { - o.DeployedBytecode = &v -} - -// GetSourceMap returns the SourceMap field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetSourceMap() string { - if o == nil || IsNil(o.SourceMap) { - var ret string - return ret - } - return *o.SourceMap -} - -// GetSourceMapOk returns a tuple with the SourceMap field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetSourceMapOk() (*string, bool) { - if o == nil || IsNil(o.SourceMap) { - return nil, false - } - return o.SourceMap, true -} - -// HasSourceMap returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasSourceMap() bool { - if o != nil && !IsNil(o.SourceMap) { - return true - } - - return false -} - -// SetSourceMap gets a reference to the given string and assigns it to the SourceMap field. -func (o *SolidityContractJsonArtifact) SetSourceMap(v string) { - o.SourceMap = &v -} - -// GetDeployedSourceMap returns the DeployedSourceMap field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetDeployedSourceMap() string { - if o == nil || IsNil(o.DeployedSourceMap) { - var ret string - return ret - } - return *o.DeployedSourceMap -} - -// GetDeployedSourceMapOk returns a tuple with the DeployedSourceMap field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetDeployedSourceMapOk() (*string, bool) { - if o == nil || IsNil(o.DeployedSourceMap) { - return nil, false - } - return o.DeployedSourceMap, true -} - -// HasDeployedSourceMap returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasDeployedSourceMap() bool { - if o != nil && !IsNil(o.DeployedSourceMap) { - return true - } - - return false -} - -// SetDeployedSourceMap gets a reference to the given string and assigns it to the DeployedSourceMap field. -func (o *SolidityContractJsonArtifact) SetDeployedSourceMap(v string) { - o.DeployedSourceMap = &v -} - -// GetSourcePath returns the SourcePath field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetSourcePath() string { - if o == nil || IsNil(o.SourcePath) { - var ret string - return ret - } - return *o.SourcePath -} - -// GetSourcePathOk returns a tuple with the SourcePath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetSourcePathOk() (*string, bool) { - if o == nil || IsNil(o.SourcePath) { - return nil, false - } - return o.SourcePath, true -} - -// HasSourcePath returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasSourcePath() bool { - if o != nil && !IsNil(o.SourcePath) { - return true - } - - return false -} - -// SetSourcePath gets a reference to the given string and assigns it to the SourcePath field. -func (o *SolidityContractJsonArtifact) SetSourcePath(v string) { - o.SourcePath = &v -} - -// GetCompiler returns the Compiler field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetCompiler() SolidityContractJsonArtifactCompiler { - if o == nil || IsNil(o.Compiler) { - var ret SolidityContractJsonArtifactCompiler - return ret - } - return *o.Compiler -} - -// GetCompilerOk returns a tuple with the Compiler field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetCompilerOk() (*SolidityContractJsonArtifactCompiler, bool) { - if o == nil || IsNil(o.Compiler) { - return nil, false - } - return o.Compiler, true -} - -// HasCompiler returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasCompiler() bool { - if o != nil && !IsNil(o.Compiler) { - return true - } - - return false -} - -// SetCompiler gets a reference to the given SolidityContractJsonArtifactCompiler and assigns it to the Compiler field. -func (o *SolidityContractJsonArtifact) SetCompiler(v SolidityContractJsonArtifactCompiler) { - o.Compiler = &v -} - -// GetFunctionHashes returns the FunctionHashes field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetFunctionHashes() map[string]interface{} { - if o == nil || IsNil(o.FunctionHashes) { - var ret map[string]interface{} - return ret - } - return o.FunctionHashes -} - -// GetFunctionHashesOk returns a tuple with the FunctionHashes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetFunctionHashesOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.FunctionHashes) { - return map[string]interface{}{}, false - } - return o.FunctionHashes, true -} - -// HasFunctionHashes returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasFunctionHashes() bool { - if o != nil && !IsNil(o.FunctionHashes) { - return true - } - - return false -} - -// SetFunctionHashes gets a reference to the given map[string]interface{} and assigns it to the FunctionHashes field. -func (o *SolidityContractJsonArtifact) SetFunctionHashes(v map[string]interface{}) { - o.FunctionHashes = v -} - -// GetGasEstimates returns the GasEstimates field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifact) GetGasEstimates() SolidityContractJsonArtifactGasEstimates { - if o == nil || IsNil(o.GasEstimates) { - var ret SolidityContractJsonArtifactGasEstimates - return ret - } - return *o.GasEstimates -} - -// GetGasEstimatesOk returns a tuple with the GasEstimates field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifact) GetGasEstimatesOk() (*SolidityContractJsonArtifactGasEstimates, bool) { - if o == nil || IsNil(o.GasEstimates) { - return nil, false - } - return o.GasEstimates, true -} - -// HasGasEstimates returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifact) HasGasEstimates() bool { - if o != nil && !IsNil(o.GasEstimates) { - return true - } - - return false -} - -// SetGasEstimates gets a reference to the given SolidityContractJsonArtifactGasEstimates and assigns it to the GasEstimates field. -func (o *SolidityContractJsonArtifact) SetGasEstimates(v SolidityContractJsonArtifactGasEstimates) { - o.GasEstimates = &v -} - -func (o SolidityContractJsonArtifact) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SolidityContractJsonArtifact) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contractName"] = o.ContractName - if !IsNil(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !IsNil(o.Bytecode) { - toSerialize["bytecode"] = o.Bytecode - } - if !IsNil(o.DeployedBytecode) { - toSerialize["deployedBytecode"] = o.DeployedBytecode - } - if !IsNil(o.SourceMap) { - toSerialize["sourceMap"] = o.SourceMap - } - if !IsNil(o.DeployedSourceMap) { - toSerialize["deployedSourceMap"] = o.DeployedSourceMap - } - if !IsNil(o.SourcePath) { - toSerialize["sourcePath"] = o.SourcePath - } - if !IsNil(o.Compiler) { - toSerialize["compiler"] = o.Compiler - } - if !IsNil(o.FunctionHashes) { - toSerialize["functionHashes"] = o.FunctionHashes - } - if !IsNil(o.GasEstimates) { - toSerialize["gasEstimates"] = o.GasEstimates - } - return toSerialize, nil -} - -type NullableSolidityContractJsonArtifact struct { - value *SolidityContractJsonArtifact - isSet bool -} - -func (v NullableSolidityContractJsonArtifact) Get() *SolidityContractJsonArtifact { - return v.value -} - -func (v *NullableSolidityContractJsonArtifact) Set(val *SolidityContractJsonArtifact) { - v.value = val - v.isSet = true -} - -func (v NullableSolidityContractJsonArtifact) IsSet() bool { - return v.isSet -} - -func (v *NullableSolidityContractJsonArtifact) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSolidityContractJsonArtifact(val *SolidityContractJsonArtifact) *NullableSolidityContractJsonArtifact { - return &NullableSolidityContractJsonArtifact{value: val, isSet: true} -} - -func (v NullableSolidityContractJsonArtifact) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSolidityContractJsonArtifact) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_compiler.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_compiler.go deleted file mode 100644 index 438f9fc848..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_compiler.go +++ /dev/null @@ -1,188 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the SolidityContractJsonArtifactCompiler type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SolidityContractJsonArtifactCompiler{} - -// SolidityContractJsonArtifactCompiler struct for SolidityContractJsonArtifactCompiler -type SolidityContractJsonArtifactCompiler struct { - Name *string `json:"name,omitempty"` - Version *string `json:"version,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _SolidityContractJsonArtifactCompiler SolidityContractJsonArtifactCompiler - -// NewSolidityContractJsonArtifactCompiler instantiates a new SolidityContractJsonArtifactCompiler object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSolidityContractJsonArtifactCompiler() *SolidityContractJsonArtifactCompiler { - this := SolidityContractJsonArtifactCompiler{} - return &this -} - -// NewSolidityContractJsonArtifactCompilerWithDefaults instantiates a new SolidityContractJsonArtifactCompiler object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSolidityContractJsonArtifactCompilerWithDefaults() *SolidityContractJsonArtifactCompiler { - this := SolidityContractJsonArtifactCompiler{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactCompiler) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactCompiler) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactCompiler) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *SolidityContractJsonArtifactCompiler) SetName(v string) { - o.Name = &v -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactCompiler) GetVersion() string { - if o == nil || IsNil(o.Version) { - var ret string - return ret - } - return *o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactCompiler) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactCompiler) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *SolidityContractJsonArtifactCompiler) SetVersion(v string) { - o.Version = &v -} - -func (o SolidityContractJsonArtifactCompiler) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SolidityContractJsonArtifactCompiler) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *SolidityContractJsonArtifactCompiler) UnmarshalJSON(bytes []byte) (err error) { - varSolidityContractJsonArtifactCompiler := _SolidityContractJsonArtifactCompiler{} - - if err = json.Unmarshal(bytes, &varSolidityContractJsonArtifactCompiler); err == nil { - *o = SolidityContractJsonArtifactCompiler(varSolidityContractJsonArtifactCompiler) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "name") - delete(additionalProperties, "version") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableSolidityContractJsonArtifactCompiler struct { - value *SolidityContractJsonArtifactCompiler - isSet bool -} - -func (v NullableSolidityContractJsonArtifactCompiler) Get() *SolidityContractJsonArtifactCompiler { - return v.value -} - -func (v *NullableSolidityContractJsonArtifactCompiler) Set(val *SolidityContractJsonArtifactCompiler) { - v.value = val - v.isSet = true -} - -func (v NullableSolidityContractJsonArtifactCompiler) IsSet() bool { - return v.isSet -} - -func (v *NullableSolidityContractJsonArtifactCompiler) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSolidityContractJsonArtifactCompiler(val *SolidityContractJsonArtifactCompiler) *NullableSolidityContractJsonArtifactCompiler { - return &NullableSolidityContractJsonArtifactCompiler{value: val, isSet: true} -} - -func (v NullableSolidityContractJsonArtifactCompiler) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSolidityContractJsonArtifactCompiler) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates.go deleted file mode 100644 index f5568ecfe5..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the SolidityContractJsonArtifactGasEstimates type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SolidityContractJsonArtifactGasEstimates{} - -// SolidityContractJsonArtifactGasEstimates struct for SolidityContractJsonArtifactGasEstimates -type SolidityContractJsonArtifactGasEstimates struct { - Creation *SolidityContractJsonArtifactGasEstimatesCreation `json:"creation,omitempty"` - External map[string]interface{} `json:"external,omitempty"` -} - -// NewSolidityContractJsonArtifactGasEstimates instantiates a new SolidityContractJsonArtifactGasEstimates object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSolidityContractJsonArtifactGasEstimates() *SolidityContractJsonArtifactGasEstimates { - this := SolidityContractJsonArtifactGasEstimates{} - return &this -} - -// NewSolidityContractJsonArtifactGasEstimatesWithDefaults instantiates a new SolidityContractJsonArtifactGasEstimates object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSolidityContractJsonArtifactGasEstimatesWithDefaults() *SolidityContractJsonArtifactGasEstimates { - this := SolidityContractJsonArtifactGasEstimates{} - return &this -} - -// GetCreation returns the Creation field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactGasEstimates) GetCreation() SolidityContractJsonArtifactGasEstimatesCreation { - if o == nil || IsNil(o.Creation) { - var ret SolidityContractJsonArtifactGasEstimatesCreation - return ret - } - return *o.Creation -} - -// GetCreationOk returns a tuple with the Creation field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactGasEstimates) GetCreationOk() (*SolidityContractJsonArtifactGasEstimatesCreation, bool) { - if o == nil || IsNil(o.Creation) { - return nil, false - } - return o.Creation, true -} - -// HasCreation returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactGasEstimates) HasCreation() bool { - if o != nil && !IsNil(o.Creation) { - return true - } - - return false -} - -// SetCreation gets a reference to the given SolidityContractJsonArtifactGasEstimatesCreation and assigns it to the Creation field. -func (o *SolidityContractJsonArtifactGasEstimates) SetCreation(v SolidityContractJsonArtifactGasEstimatesCreation) { - o.Creation = &v -} - -// GetExternal returns the External field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactGasEstimates) GetExternal() map[string]interface{} { - if o == nil || IsNil(o.External) { - var ret map[string]interface{} - return ret - } - return o.External -} - -// GetExternalOk returns a tuple with the External field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactGasEstimates) GetExternalOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.External) { - return map[string]interface{}{}, false - } - return o.External, true -} - -// HasExternal returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactGasEstimates) HasExternal() bool { - if o != nil && !IsNil(o.External) { - return true - } - - return false -} - -// SetExternal gets a reference to the given map[string]interface{} and assigns it to the External field. -func (o *SolidityContractJsonArtifactGasEstimates) SetExternal(v map[string]interface{}) { - o.External = v -} - -func (o SolidityContractJsonArtifactGasEstimates) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SolidityContractJsonArtifactGasEstimates) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Creation) { - toSerialize["creation"] = o.Creation - } - if !IsNil(o.External) { - toSerialize["external"] = o.External - } - return toSerialize, nil -} - -type NullableSolidityContractJsonArtifactGasEstimates struct { - value *SolidityContractJsonArtifactGasEstimates - isSet bool -} - -func (v NullableSolidityContractJsonArtifactGasEstimates) Get() *SolidityContractJsonArtifactGasEstimates { - return v.value -} - -func (v *NullableSolidityContractJsonArtifactGasEstimates) Set(val *SolidityContractJsonArtifactGasEstimates) { - v.value = val - v.isSet = true -} - -func (v NullableSolidityContractJsonArtifactGasEstimates) IsSet() bool { - return v.isSet -} - -func (v *NullableSolidityContractJsonArtifactGasEstimates) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSolidityContractJsonArtifactGasEstimates(val *SolidityContractJsonArtifactGasEstimates) *NullableSolidityContractJsonArtifactGasEstimates { - return &NullableSolidityContractJsonArtifactGasEstimates{value: val, isSet: true} -} - -func (v NullableSolidityContractJsonArtifactGasEstimates) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSolidityContractJsonArtifactGasEstimates) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates_creation.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates_creation.go deleted file mode 100644 index f49df7ead9..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_solidity_contract_json_artifact_gas_estimates_creation.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the SolidityContractJsonArtifactGasEstimatesCreation type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SolidityContractJsonArtifactGasEstimatesCreation{} - -// SolidityContractJsonArtifactGasEstimatesCreation struct for SolidityContractJsonArtifactGasEstimatesCreation -type SolidityContractJsonArtifactGasEstimatesCreation struct { - CodeDepositCost *string `json:"codeDepositCost,omitempty"` - ExecutionCost *string `json:"executionCost,omitempty"` - TotalCost *string `json:"totalCost,omitempty"` -} - -// NewSolidityContractJsonArtifactGasEstimatesCreation instantiates a new SolidityContractJsonArtifactGasEstimatesCreation object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSolidityContractJsonArtifactGasEstimatesCreation() *SolidityContractJsonArtifactGasEstimatesCreation { - this := SolidityContractJsonArtifactGasEstimatesCreation{} - return &this -} - -// NewSolidityContractJsonArtifactGasEstimatesCreationWithDefaults instantiates a new SolidityContractJsonArtifactGasEstimatesCreation object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSolidityContractJsonArtifactGasEstimatesCreationWithDefaults() *SolidityContractJsonArtifactGasEstimatesCreation { - this := SolidityContractJsonArtifactGasEstimatesCreation{} - return &this -} - -// GetCodeDepositCost returns the CodeDepositCost field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetCodeDepositCost() string { - if o == nil || IsNil(o.CodeDepositCost) { - var ret string - return ret - } - return *o.CodeDepositCost -} - -// GetCodeDepositCostOk returns a tuple with the CodeDepositCost field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetCodeDepositCostOk() (*string, bool) { - if o == nil || IsNil(o.CodeDepositCost) { - return nil, false - } - return o.CodeDepositCost, true -} - -// HasCodeDepositCost returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) HasCodeDepositCost() bool { - if o != nil && !IsNil(o.CodeDepositCost) { - return true - } - - return false -} - -// SetCodeDepositCost gets a reference to the given string and assigns it to the CodeDepositCost field. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) SetCodeDepositCost(v string) { - o.CodeDepositCost = &v -} - -// GetExecutionCost returns the ExecutionCost field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetExecutionCost() string { - if o == nil || IsNil(o.ExecutionCost) { - var ret string - return ret - } - return *o.ExecutionCost -} - -// GetExecutionCostOk returns a tuple with the ExecutionCost field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetExecutionCostOk() (*string, bool) { - if o == nil || IsNil(o.ExecutionCost) { - return nil, false - } - return o.ExecutionCost, true -} - -// HasExecutionCost returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) HasExecutionCost() bool { - if o != nil && !IsNil(o.ExecutionCost) { - return true - } - - return false -} - -// SetExecutionCost gets a reference to the given string and assigns it to the ExecutionCost field. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) SetExecutionCost(v string) { - o.ExecutionCost = &v -} - -// GetTotalCost returns the TotalCost field value if set, zero value otherwise. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetTotalCost() string { - if o == nil || IsNil(o.TotalCost) { - var ret string - return ret - } - return *o.TotalCost -} - -// GetTotalCostOk returns a tuple with the TotalCost field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) GetTotalCostOk() (*string, bool) { - if o == nil || IsNil(o.TotalCost) { - return nil, false - } - return o.TotalCost, true -} - -// HasTotalCost returns a boolean if a field has been set. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) HasTotalCost() bool { - if o != nil && !IsNil(o.TotalCost) { - return true - } - - return false -} - -// SetTotalCost gets a reference to the given string and assigns it to the TotalCost field. -func (o *SolidityContractJsonArtifactGasEstimatesCreation) SetTotalCost(v string) { - o.TotalCost = &v -} - -func (o SolidityContractJsonArtifactGasEstimatesCreation) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SolidityContractJsonArtifactGasEstimatesCreation) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CodeDepositCost) { - toSerialize["codeDepositCost"] = o.CodeDepositCost - } - if !IsNil(o.ExecutionCost) { - toSerialize["executionCost"] = o.ExecutionCost - } - if !IsNil(o.TotalCost) { - toSerialize["totalCost"] = o.TotalCost - } - return toSerialize, nil -} - -type NullableSolidityContractJsonArtifactGasEstimatesCreation struct { - value *SolidityContractJsonArtifactGasEstimatesCreation - isSet bool -} - -func (v NullableSolidityContractJsonArtifactGasEstimatesCreation) Get() *SolidityContractJsonArtifactGasEstimatesCreation { - return v.value -} - -func (v *NullableSolidityContractJsonArtifactGasEstimatesCreation) Set(val *SolidityContractJsonArtifactGasEstimatesCreation) { - v.value = val - v.isSet = true -} - -func (v NullableSolidityContractJsonArtifactGasEstimatesCreation) IsSet() bool { - return v.isSet -} - -func (v *NullableSolidityContractJsonArtifactGasEstimatesCreation) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSolidityContractJsonArtifactGasEstimatesCreation(val *SolidityContractJsonArtifactGasEstimatesCreation) *NullableSolidityContractJsonArtifactGasEstimatesCreation { - return &NullableSolidityContractJsonArtifactGasEstimatesCreation{value: val, isSet: true} -} - -func (v NullableSolidityContractJsonArtifactGasEstimatesCreation) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSolidityContractJsonArtifactGasEstimatesCreation) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go deleted file mode 100644 index 347aabe392..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredential - struct for Web3SigningCredential -type Web3SigningCredential struct { - Web3SigningCredentialCactusKeychainRef *Web3SigningCredentialCactusKeychainRef - Web3SigningCredentialNone *Web3SigningCredentialNone - Web3SigningCredentialPrivateKeyHex *Web3SigningCredentialPrivateKeyHex -} - -// Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialCactusKeychainRef wrapped in Web3SigningCredential -func Web3SigningCredentialCactusKeychainRefAsWeb3SigningCredential(v *Web3SigningCredentialCactusKeychainRef) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialCactusKeychainRef: v, - } -} - -// Web3SigningCredentialNoneAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialNone wrapped in Web3SigningCredential -func Web3SigningCredentialNoneAsWeb3SigningCredential(v *Web3SigningCredentialNone) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialNone: v, - } -} - -// Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential is a convenience function that returns Web3SigningCredentialPrivateKeyHex wrapped in Web3SigningCredential -func Web3SigningCredentialPrivateKeyHexAsWeb3SigningCredential(v *Web3SigningCredentialPrivateKeyHex) Web3SigningCredential { - return Web3SigningCredential{ - Web3SigningCredentialPrivateKeyHex: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *Web3SigningCredential) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Web3SigningCredentialCactusKeychainRef - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialCactusKeychainRef) - if err == nil { - jsonWeb3SigningCredentialCactusKeychainRef, _ := json.Marshal(dst.Web3SigningCredentialCactusKeychainRef) - if string(jsonWeb3SigningCredentialCactusKeychainRef) == "{}" { // empty struct - dst.Web3SigningCredentialCactusKeychainRef = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialCactusKeychainRef = nil - } - - // try to unmarshal data into Web3SigningCredentialNone - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialNone) - if err == nil { - jsonWeb3SigningCredentialNone, _ := json.Marshal(dst.Web3SigningCredentialNone) - if string(jsonWeb3SigningCredentialNone) == "{}" { // empty struct - dst.Web3SigningCredentialNone = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialNone = nil - } - - // try to unmarshal data into Web3SigningCredentialPrivateKeyHex - err = newStrictDecoder(data).Decode(&dst.Web3SigningCredentialPrivateKeyHex) - if err == nil { - jsonWeb3SigningCredentialPrivateKeyHex, _ := json.Marshal(dst.Web3SigningCredentialPrivateKeyHex) - if string(jsonWeb3SigningCredentialPrivateKeyHex) == "{}" { // empty struct - dst.Web3SigningCredentialPrivateKeyHex = nil - } else { - match++ - } - } else { - dst.Web3SigningCredentialPrivateKeyHex = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Web3SigningCredentialCactusKeychainRef = nil - dst.Web3SigningCredentialNone = nil - dst.Web3SigningCredentialPrivateKeyHex = nil - - return fmt.Errorf("data matches more than one schema in oneOf(Web3SigningCredential)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(Web3SigningCredential)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src Web3SigningCredential) MarshalJSON() ([]byte, error) { - if src.Web3SigningCredentialCactusKeychainRef != nil { - return json.Marshal(&src.Web3SigningCredentialCactusKeychainRef) - } - - if src.Web3SigningCredentialNone != nil { - return json.Marshal(&src.Web3SigningCredentialNone) - } - - if src.Web3SigningCredentialPrivateKeyHex != nil { - return json.Marshal(&src.Web3SigningCredentialPrivateKeyHex) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *Web3SigningCredential) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Web3SigningCredentialCactusKeychainRef != nil { - return obj.Web3SigningCredentialCactusKeychainRef - } - - if obj.Web3SigningCredentialNone != nil { - return obj.Web3SigningCredentialNone - } - - if obj.Web3SigningCredentialPrivateKeyHex != nil { - return obj.Web3SigningCredentialPrivateKeyHex - } - - // all schemas are nil - return nil -} - -type NullableWeb3SigningCredential struct { - value *Web3SigningCredential - isSet bool -} - -func (v NullableWeb3SigningCredential) Get() *Web3SigningCredential { - return v.value -} - -func (v *NullableWeb3SigningCredential) Set(val *Web3SigningCredential) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredential) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredential) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredential(val *Web3SigningCredential) *NullableWeb3SigningCredential { - return &NullableWeb3SigningCredential{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredential) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredential) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go deleted file mode 100644 index 91c7acfa8b..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_cactus_keychain_ref.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialCactusKeychainRef type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialCactusKeychainRef{} - -// Web3SigningCredentialCactusKeychainRef struct for Web3SigningCredentialCactusKeychainRef -type Web3SigningCredentialCactusKeychainRef struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - KeychainEntryKey string `json:"keychainEntryKey"` - // The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - KeychainId string `json:"keychainId"` -} - -// NewWeb3SigningCredentialCactusKeychainRef instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialCactusKeychainRef(type_ Web3SigningCredentialType, ethAccount string, keychainEntryKey string, keychainId string) *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - this.Type = type_ - this.EthAccount = ethAccount - this.KeychainEntryKey = keychainEntryKey - this.KeychainId = keychainId - return &this -} - -// NewWeb3SigningCredentialCactusKeychainRefWithDefaults instantiates a new Web3SigningCredentialCactusKeychainRef object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialCactusKeychainRefWithDefaults() *Web3SigningCredentialCactusKeychainRef { - this := Web3SigningCredentialCactusKeychainRef{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialCactusKeychainRef) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialCactusKeychainRef) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetKeychainEntryKey returns the KeychainEntryKey field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKey() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainEntryKey -} - -// GetKeychainEntryKeyOk returns a tuple with the KeychainEntryKey field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainEntryKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainEntryKey, true -} - -// SetKeychainEntryKey sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainEntryKey(v string) { - o.KeychainEntryKey = v -} - -// GetKeychainId returns the KeychainId field value -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainId() string { - if o == nil { - var ret string - return ret - } - - return o.KeychainId -} - -// GetKeychainIdOk returns a tuple with the KeychainId field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialCactusKeychainRef) GetKeychainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.KeychainId, true -} - -// SetKeychainId sets field value -func (o *Web3SigningCredentialCactusKeychainRef) SetKeychainId(v string) { - o.KeychainId = v -} - -func (o Web3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialCactusKeychainRef) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["keychainEntryKey"] = o.KeychainEntryKey - toSerialize["keychainId"] = o.KeychainId - return toSerialize, nil -} - -type NullableWeb3SigningCredentialCactusKeychainRef struct { - value *Web3SigningCredentialCactusKeychainRef - isSet bool -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) Get() *Web3SigningCredentialCactusKeychainRef { - return v.value -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Set(val *Web3SigningCredentialCactusKeychainRef) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialCactusKeychainRef(val *Web3SigningCredentialCactusKeychainRef) *NullableWeb3SigningCredentialCactusKeychainRef { - return &NullableWeb3SigningCredentialCactusKeychainRef{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialCactusKeychainRef) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialCactusKeychainRef) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go deleted file mode 100644 index 384d222879..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_none.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialNone type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialNone{} - -// Web3SigningCredentialNone Using this denotes that there is no signing required because the transaction is pre-signed. -type Web3SigningCredentialNone struct { - Type Web3SigningCredentialType `json:"type"` -} - -// NewWeb3SigningCredentialNone instantiates a new Web3SigningCredentialNone object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialNone(type_ Web3SigningCredentialType) *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - this.Type = type_ - return &this -} - -// NewWeb3SigningCredentialNoneWithDefaults instantiates a new Web3SigningCredentialNone object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialNoneWithDefaults() *Web3SigningCredentialNone { - this := Web3SigningCredentialNone{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialNone) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialNone) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialNone) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -func (o Web3SigningCredentialNone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialNone) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableWeb3SigningCredentialNone struct { - value *Web3SigningCredentialNone - isSet bool -} - -func (v NullableWeb3SigningCredentialNone) Get() *Web3SigningCredentialNone { - return v.value -} - -func (v *NullableWeb3SigningCredentialNone) Set(val *Web3SigningCredentialNone) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialNone) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialNone) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialNone(val *Web3SigningCredentialNone) *NullableWeb3SigningCredentialNone { - return &NullableWeb3SigningCredentialNone{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialNone) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialNone) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go deleted file mode 100644 index 0f65a7af22..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_private_key_hex.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the Web3SigningCredentialPrivateKeyHex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3SigningCredentialPrivateKeyHex{} - -// Web3SigningCredentialPrivateKeyHex struct for Web3SigningCredentialPrivateKeyHex -type Web3SigningCredentialPrivateKeyHex struct { - Type Web3SigningCredentialType `json:"type"` - // The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - EthAccount string `json:"ethAccount"` - // The HEX encoded private key of an eth account. - Secret string `json:"secret"` -} - -// NewWeb3SigningCredentialPrivateKeyHex instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3SigningCredentialPrivateKeyHex(type_ Web3SigningCredentialType, ethAccount string, secret string) *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - this.Type = type_ - this.EthAccount = ethAccount - this.Secret = secret - return &this -} - -// NewWeb3SigningCredentialPrivateKeyHexWithDefaults instantiates a new Web3SigningCredentialPrivateKeyHex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3SigningCredentialPrivateKeyHexWithDefaults() *Web3SigningCredentialPrivateKeyHex { - this := Web3SigningCredentialPrivateKeyHex{} - return &this -} - -// GetType returns the Type field value -func (o *Web3SigningCredentialPrivateKeyHex) GetType() Web3SigningCredentialType { - if o == nil { - var ret Web3SigningCredentialType - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetTypeOk() (*Web3SigningCredentialType, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetType(v Web3SigningCredentialType) { - o.Type = v -} - -// GetEthAccount returns the EthAccount field value -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccount() string { - if o == nil { - var ret string - return ret - } - - return o.EthAccount -} - -// GetEthAccountOk returns a tuple with the EthAccount field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetEthAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EthAccount, true -} - -// SetEthAccount sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetEthAccount(v string) { - o.EthAccount = v -} - -// GetSecret returns the Secret field value -func (o *Web3SigningCredentialPrivateKeyHex) GetSecret() string { - if o == nil { - var ret string - return ret - } - - return o.Secret -} - -// GetSecretOk returns a tuple with the Secret field value -// and a boolean to check if the value has been set. -func (o *Web3SigningCredentialPrivateKeyHex) GetSecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Secret, true -} - -// SetSecret sets field value -func (o *Web3SigningCredentialPrivateKeyHex) SetSecret(v string) { - o.Secret = v -} - -func (o Web3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3SigningCredentialPrivateKeyHex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["ethAccount"] = o.EthAccount - toSerialize["secret"] = o.Secret - return toSerialize, nil -} - -type NullableWeb3SigningCredentialPrivateKeyHex struct { - value *Web3SigningCredentialPrivateKeyHex - isSet bool -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) Get() *Web3SigningCredentialPrivateKeyHex { - return v.value -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Set(val *Web3SigningCredentialPrivateKeyHex) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialPrivateKeyHex(val *Web3SigningCredentialPrivateKeyHex) *NullableWeb3SigningCredentialPrivateKeyHex { - return &NullableWeb3SigningCredentialPrivateKeyHex{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialPrivateKeyHex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialPrivateKeyHex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go deleted file mode 100644 index d82774876d..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_signing_credential_type.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" - "fmt" -) - -// Web3SigningCredentialType the model 'Web3SigningCredentialType' -type Web3SigningCredentialType string - -// List of Web3SigningCredentialType -const ( - CACTUS_KEYCHAIN_REF Web3SigningCredentialType = "CACTUS_KEYCHAIN_REF" - GETH_KEYCHAIN_PASSWORD Web3SigningCredentialType = "GETH_KEYCHAIN_PASSWORD" - PRIVATE_KEY_HEX Web3SigningCredentialType = "PRIVATE_KEY_HEX" - NONE Web3SigningCredentialType = "NONE" -) - -// All allowed values of Web3SigningCredentialType enum -var AllowedWeb3SigningCredentialTypeEnumValues = []Web3SigningCredentialType{ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE", -} - -func (v *Web3SigningCredentialType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := Web3SigningCredentialType(value) - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Web3SigningCredentialType", value) -} - -// NewWeb3SigningCredentialTypeFromValue returns a pointer to a valid Web3SigningCredentialType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewWeb3SigningCredentialTypeFromValue(v string) (*Web3SigningCredentialType, error) { - ev := Web3SigningCredentialType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Web3SigningCredentialType: valid values are %v", v, AllowedWeb3SigningCredentialTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v Web3SigningCredentialType) IsValid() bool { - for _, existing := range AllowedWeb3SigningCredentialTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to Web3SigningCredentialType value -func (v Web3SigningCredentialType) Ptr() *Web3SigningCredentialType { - return &v -} - -type NullableWeb3SigningCredentialType struct { - value *Web3SigningCredentialType - isSet bool -} - -func (v NullableWeb3SigningCredentialType) Get() *Web3SigningCredentialType { - return v.value -} - -func (v *NullableWeb3SigningCredentialType) Set(val *Web3SigningCredentialType) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3SigningCredentialType) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3SigningCredentialType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3SigningCredentialType(val *Web3SigningCredentialType) *NullableWeb3SigningCredentialType { - return &NullableWeb3SigningCredentialType{value: val, isSet: true} -} - -func (v NullableWeb3SigningCredentialType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3SigningCredentialType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go deleted file mode 100644 index 6ddc31f02d..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_web3_transaction_receipt.go +++ /dev/null @@ -1,385 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the Web3TransactionReceipt type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Web3TransactionReceipt{} - -// Web3TransactionReceipt struct for Web3TransactionReceipt -type Web3TransactionReceipt struct { - Status bool `json:"status"` - TransactionHash string `json:"transactionHash"` - TransactionIndex float32 `json:"transactionIndex"` - BlockHash string `json:"blockHash"` - BlockNumber float32 `json:"blockNumber"` - GasUsed float32 `json:"gasUsed"` - ContractAddress NullableString `json:"contractAddress,omitempty"` - From string `json:"from"` - To string `json:"to"` - AdditionalProperties map[string]interface{} -} - -type _Web3TransactionReceipt Web3TransactionReceipt - -// NewWeb3TransactionReceipt instantiates a new Web3TransactionReceipt object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWeb3TransactionReceipt(status bool, transactionHash string, transactionIndex float32, blockHash string, blockNumber float32, gasUsed float32, from string, to string) *Web3TransactionReceipt { - this := Web3TransactionReceipt{} - this.Status = status - this.TransactionHash = transactionHash - this.TransactionIndex = transactionIndex - this.BlockHash = blockHash - this.BlockNumber = blockNumber - this.GasUsed = gasUsed - this.From = from - this.To = to - return &this -} - -// NewWeb3TransactionReceiptWithDefaults instantiates a new Web3TransactionReceipt object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWeb3TransactionReceiptWithDefaults() *Web3TransactionReceipt { - this := Web3TransactionReceipt{} - return &this -} - -// GetStatus returns the Status field value -func (o *Web3TransactionReceipt) GetStatus() bool { - if o == nil { - var ret bool - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetStatusOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *Web3TransactionReceipt) SetStatus(v bool) { - o.Status = v -} - -// GetTransactionHash returns the TransactionHash field value -func (o *Web3TransactionReceipt) GetTransactionHash() string { - if o == nil { - var ret string - return ret - } - - return o.TransactionHash -} - -// GetTransactionHashOk returns a tuple with the TransactionHash field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTransactionHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TransactionHash, true -} - -// SetTransactionHash sets field value -func (o *Web3TransactionReceipt) SetTransactionHash(v string) { - o.TransactionHash = v -} - -// GetTransactionIndex returns the TransactionIndex field value -func (o *Web3TransactionReceipt) GetTransactionIndex() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.TransactionIndex -} - -// GetTransactionIndexOk returns a tuple with the TransactionIndex field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetTransactionIndexOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.TransactionIndex, true -} - -// SetTransactionIndex sets field value -func (o *Web3TransactionReceipt) SetTransactionIndex(v float32) { - o.TransactionIndex = v -} - -// GetBlockHash returns the BlockHash field value -func (o *Web3TransactionReceipt) GetBlockHash() string { - if o == nil { - var ret string - return ret - } - - return o.BlockHash -} - -// GetBlockHashOk returns a tuple with the BlockHash field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetBlockHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BlockHash, true -} - -// SetBlockHash sets field value -func (o *Web3TransactionReceipt) SetBlockHash(v string) { - o.BlockHash = v -} - -// GetBlockNumber returns the BlockNumber field value -func (o *Web3TransactionReceipt) GetBlockNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.BlockNumber -} - -// GetBlockNumberOk returns a tuple with the BlockNumber field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetBlockNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.BlockNumber, true -} - -// SetBlockNumber sets field value -func (o *Web3TransactionReceipt) SetBlockNumber(v float32) { - o.BlockNumber = v -} - -// GetGasUsed returns the GasUsed field value -func (o *Web3TransactionReceipt) GetGasUsed() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.GasUsed -} - -// GetGasUsedOk returns a tuple with the GasUsed field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetGasUsedOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.GasUsed, true -} - -// SetGasUsed sets field value -func (o *Web3TransactionReceipt) SetGasUsed(v float32) { - o.GasUsed = v -} - -// GetContractAddress returns the ContractAddress field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Web3TransactionReceipt) GetContractAddress() string { - if o == nil || IsNil(o.ContractAddress.Get()) { - var ret string - return ret - } - return *o.ContractAddress.Get() -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Web3TransactionReceipt) GetContractAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ContractAddress.Get(), o.ContractAddress.IsSet() -} - -// HasContractAddress returns a boolean if a field has been set. -func (o *Web3TransactionReceipt) HasContractAddress() bool { - if o != nil && o.ContractAddress.IsSet() { - return true - } - - return false -} - -// SetContractAddress gets a reference to the given NullableString and assigns it to the ContractAddress field. -func (o *Web3TransactionReceipt) SetContractAddress(v string) { - o.ContractAddress.Set(&v) -} -// SetContractAddressNil sets the value for ContractAddress to be an explicit nil -func (o *Web3TransactionReceipt) SetContractAddressNil() { - o.ContractAddress.Set(nil) -} - -// UnsetContractAddress ensures that no value is present for ContractAddress, not even an explicit nil -func (o *Web3TransactionReceipt) UnsetContractAddress() { - o.ContractAddress.Unset() -} - -// GetFrom returns the From field value -func (o *Web3TransactionReceipt) GetFrom() string { - if o == nil { - var ret string - return ret - } - - return o.From -} - -// GetFromOk returns a tuple with the From field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetFromOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.From, true -} - -// SetFrom sets field value -func (o *Web3TransactionReceipt) SetFrom(v string) { - o.From = v -} - -// GetTo returns the To field value -func (o *Web3TransactionReceipt) GetTo() string { - if o == nil { - var ret string - return ret - } - - return o.To -} - -// GetToOk returns a tuple with the To field value -// and a boolean to check if the value has been set. -func (o *Web3TransactionReceipt) GetToOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.To, true -} - -// SetTo sets field value -func (o *Web3TransactionReceipt) SetTo(v string) { - o.To = v -} - -func (o Web3TransactionReceipt) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Web3TransactionReceipt) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["status"] = o.Status - toSerialize["transactionHash"] = o.TransactionHash - toSerialize["transactionIndex"] = o.TransactionIndex - toSerialize["blockHash"] = o.BlockHash - toSerialize["blockNumber"] = o.BlockNumber - toSerialize["gasUsed"] = o.GasUsed - if o.ContractAddress.IsSet() { - toSerialize["contractAddress"] = o.ContractAddress.Get() - } - toSerialize["from"] = o.From - toSerialize["to"] = o.To - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *Web3TransactionReceipt) UnmarshalJSON(bytes []byte) (err error) { - varWeb3TransactionReceipt := _Web3TransactionReceipt{} - - if err = json.Unmarshal(bytes, &varWeb3TransactionReceipt); err == nil { - *o = Web3TransactionReceipt(varWeb3TransactionReceipt) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "status") - delete(additionalProperties, "transactionHash") - delete(additionalProperties, "transactionIndex") - delete(additionalProperties, "blockHash") - delete(additionalProperties, "blockNumber") - delete(additionalProperties, "gasUsed") - delete(additionalProperties, "contractAddress") - delete(additionalProperties, "from") - delete(additionalProperties, "to") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableWeb3TransactionReceipt struct { - value *Web3TransactionReceipt - isSet bool -} - -func (v NullableWeb3TransactionReceipt) Get() *Web3TransactionReceipt { - return v.value -} - -func (v *NullableWeb3TransactionReceipt) Set(val *Web3TransactionReceipt) { - v.value = val - v.isSet = true -} - -func (v NullableWeb3TransactionReceipt) IsSet() bool { - return v.isSet -} - -func (v *NullableWeb3TransactionReceipt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWeb3TransactionReceipt(val *Web3TransactionReceipt) *NullableWeb3TransactionReceipt { - return &NullableWeb3TransactionReceipt{value: val, isSet: true} -} - -func (v NullableWeb3TransactionReceipt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWeb3TransactionReceipt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_xdai_transaction_config.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_xdai_transaction_config.go deleted file mode 100644 index 9c84d6a934..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_xdai_transaction_config.go +++ /dev/null @@ -1,410 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" -) - -// checks if the XdaiTransactionConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &XdaiTransactionConfig{} - -// XdaiTransactionConfig struct for XdaiTransactionConfig -type XdaiTransactionConfig struct { - RawTransaction *string `json:"rawTransaction,omitempty"` - From *XdaiTransactionConfigFrom `json:"from,omitempty"` - To *XdaiTransactionConfigTo `json:"to,omitempty"` - Value *XdaiTransactionConfigFrom `json:"value,omitempty"` - Gas *XdaiTransactionConfigFrom `json:"gas,omitempty"` - GasPrice *XdaiTransactionConfigFrom `json:"gasPrice,omitempty"` - Nonce *float32 `json:"nonce,omitempty"` - Data *XdaiTransactionConfigTo `json:"data,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _XdaiTransactionConfig XdaiTransactionConfig - -// NewXdaiTransactionConfig instantiates a new XdaiTransactionConfig object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewXdaiTransactionConfig() *XdaiTransactionConfig { - this := XdaiTransactionConfig{} - return &this -} - -// NewXdaiTransactionConfigWithDefaults instantiates a new XdaiTransactionConfig object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewXdaiTransactionConfigWithDefaults() *XdaiTransactionConfig { - this := XdaiTransactionConfig{} - return &this -} - -// GetRawTransaction returns the RawTransaction field value if set, zero value otherwise. -func (o *XdaiTransactionConfig) GetRawTransaction() string { - if o == nil || IsNil(o.RawTransaction) { - var ret string - return ret - } - return *o.RawTransaction -} - -// GetRawTransactionOk returns a tuple with the RawTransaction field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *XdaiTransactionConfig) GetRawTransactionOk() (*string, bool) { - if o == nil || IsNil(o.RawTransaction) { - return nil, false - } - return o.RawTransaction, true -} - -// HasRawTransaction returns a boolean if a field has been set. -func (o *XdaiTransactionConfig) HasRawTransaction() bool { - if o != nil && !IsNil(o.RawTransaction) { - return true - } - - return false -} - -// SetRawTransaction gets a reference to the given string and assigns it to the RawTransaction field. -func (o *XdaiTransactionConfig) SetRawTransaction(v string) { - o.RawTransaction = &v -} - -// GetFrom returns the From field value if set, zero value otherwise. -func (o *XdaiTransactionConfig) GetFrom() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.From) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.From -} - -// GetFromOk returns a tuple with the From field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *XdaiTransactionConfig) GetFromOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.From) { - return nil, false - } - return o.From, true -} - -// HasFrom returns a boolean if a field has been set. -func (o *XdaiTransactionConfig) HasFrom() bool { - if o != nil && !IsNil(o.From) { - return true - } - - return false -} - -// SetFrom gets a reference to the given XdaiTransactionConfigFrom and assigns it to the From field. -func (o *XdaiTransactionConfig) SetFrom(v XdaiTransactionConfigFrom) { - o.From = &v -} - -// GetTo returns the To field value if set, zero value otherwise. -func (o *XdaiTransactionConfig) GetTo() XdaiTransactionConfigTo { - if o == nil || IsNil(o.To) { - var ret XdaiTransactionConfigTo - return ret - } - return *o.To -} - -// GetToOk returns a tuple with the To field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *XdaiTransactionConfig) GetToOk() (*XdaiTransactionConfigTo, bool) { - if o == nil || IsNil(o.To) { - return nil, false - } - return o.To, true -} - -// HasTo returns a boolean if a field has been set. -func (o *XdaiTransactionConfig) HasTo() bool { - if o != nil && !IsNil(o.To) { - return true - } - - return false -} - -// SetTo gets a reference to the given XdaiTransactionConfigTo and assigns it to the To field. -func (o *XdaiTransactionConfig) SetTo(v XdaiTransactionConfigTo) { - o.To = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *XdaiTransactionConfig) GetValue() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.Value) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *XdaiTransactionConfig) GetValueOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *XdaiTransactionConfig) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given XdaiTransactionConfigFrom and assigns it to the Value field. -func (o *XdaiTransactionConfig) SetValue(v XdaiTransactionConfigFrom) { - o.Value = &v -} - -// GetGas returns the Gas field value if set, zero value otherwise. -func (o *XdaiTransactionConfig) GetGas() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.Gas) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.Gas -} - -// GetGasOk returns a tuple with the Gas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *XdaiTransactionConfig) GetGasOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.Gas) { - return nil, false - } - return o.Gas, true -} - -// HasGas returns a boolean if a field has been set. -func (o *XdaiTransactionConfig) HasGas() bool { - if o != nil && !IsNil(o.Gas) { - return true - } - - return false -} - -// SetGas gets a reference to the given XdaiTransactionConfigFrom and assigns it to the Gas field. -func (o *XdaiTransactionConfig) SetGas(v XdaiTransactionConfigFrom) { - o.Gas = &v -} - -// GetGasPrice returns the GasPrice field value if set, zero value otherwise. -func (o *XdaiTransactionConfig) GetGasPrice() XdaiTransactionConfigFrom { - if o == nil || IsNil(o.GasPrice) { - var ret XdaiTransactionConfigFrom - return ret - } - return *o.GasPrice -} - -// GetGasPriceOk returns a tuple with the GasPrice field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *XdaiTransactionConfig) GetGasPriceOk() (*XdaiTransactionConfigFrom, bool) { - if o == nil || IsNil(o.GasPrice) { - return nil, false - } - return o.GasPrice, true -} - -// HasGasPrice returns a boolean if a field has been set. -func (o *XdaiTransactionConfig) HasGasPrice() bool { - if o != nil && !IsNil(o.GasPrice) { - return true - } - - return false -} - -// SetGasPrice gets a reference to the given XdaiTransactionConfigFrom and assigns it to the GasPrice field. -func (o *XdaiTransactionConfig) SetGasPrice(v XdaiTransactionConfigFrom) { - o.GasPrice = &v -} - -// GetNonce returns the Nonce field value if set, zero value otherwise. -func (o *XdaiTransactionConfig) GetNonce() float32 { - if o == nil || IsNil(o.Nonce) { - var ret float32 - return ret - } - return *o.Nonce -} - -// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *XdaiTransactionConfig) GetNonceOk() (*float32, bool) { - if o == nil || IsNil(o.Nonce) { - return nil, false - } - return o.Nonce, true -} - -// HasNonce returns a boolean if a field has been set. -func (o *XdaiTransactionConfig) HasNonce() bool { - if o != nil && !IsNil(o.Nonce) { - return true - } - - return false -} - -// SetNonce gets a reference to the given float32 and assigns it to the Nonce field. -func (o *XdaiTransactionConfig) SetNonce(v float32) { - o.Nonce = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *XdaiTransactionConfig) GetData() XdaiTransactionConfigTo { - if o == nil || IsNil(o.Data) { - var ret XdaiTransactionConfigTo - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *XdaiTransactionConfig) GetDataOk() (*XdaiTransactionConfigTo, bool) { - if o == nil || IsNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *XdaiTransactionConfig) HasData() bool { - if o != nil && !IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given XdaiTransactionConfigTo and assigns it to the Data field. -func (o *XdaiTransactionConfig) SetData(v XdaiTransactionConfigTo) { - o.Data = &v -} - -func (o XdaiTransactionConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o XdaiTransactionConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.RawTransaction) { - toSerialize["rawTransaction"] = o.RawTransaction - } - if !IsNil(o.From) { - toSerialize["from"] = o.From - } - if !IsNil(o.To) { - toSerialize["to"] = o.To - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.Gas) { - toSerialize["gas"] = o.Gas - } - if !IsNil(o.GasPrice) { - toSerialize["gasPrice"] = o.GasPrice - } - if !IsNil(o.Nonce) { - toSerialize["nonce"] = o.Nonce - } - if !IsNil(o.Data) { - toSerialize["data"] = o.Data - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *XdaiTransactionConfig) UnmarshalJSON(bytes []byte) (err error) { - varXdaiTransactionConfig := _XdaiTransactionConfig{} - - if err = json.Unmarshal(bytes, &varXdaiTransactionConfig); err == nil { - *o = XdaiTransactionConfig(varXdaiTransactionConfig) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "rawTransaction") - delete(additionalProperties, "from") - delete(additionalProperties, "to") - delete(additionalProperties, "value") - delete(additionalProperties, "gas") - delete(additionalProperties, "gasPrice") - delete(additionalProperties, "nonce") - delete(additionalProperties, "data") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableXdaiTransactionConfig struct { - value *XdaiTransactionConfig - isSet bool -} - -func (v NullableXdaiTransactionConfig) Get() *XdaiTransactionConfig { - return v.value -} - -func (v *NullableXdaiTransactionConfig) Set(val *XdaiTransactionConfig) { - v.value = val - v.isSet = true -} - -func (v NullableXdaiTransactionConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableXdaiTransactionConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableXdaiTransactionConfig(val *XdaiTransactionConfig) *NullableXdaiTransactionConfig { - return &NullableXdaiTransactionConfig{value: val, isSet: true} -} - -func (v NullableXdaiTransactionConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableXdaiTransactionConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_xdai_transaction_config_from.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_xdai_transaction_config_from.go deleted file mode 100644 index 8015b73dde..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_xdai_transaction_config_from.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" - "fmt" -) - -// XdaiTransactionConfigFrom - struct for XdaiTransactionConfigFrom -type XdaiTransactionConfigFrom struct { - Float32 *float32 - String *string -} - -// float32AsXdaiTransactionConfigFrom is a convenience function that returns float32 wrapped in XdaiTransactionConfigFrom -func Float32AsXdaiTransactionConfigFrom(v *float32) XdaiTransactionConfigFrom { - return XdaiTransactionConfigFrom{ - Float32: v, - } -} - -// stringAsXdaiTransactionConfigFrom is a convenience function that returns string wrapped in XdaiTransactionConfigFrom -func StringAsXdaiTransactionConfigFrom(v *string) XdaiTransactionConfigFrom { - return XdaiTransactionConfigFrom{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *XdaiTransactionConfigFrom) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into Float32 - err = newStrictDecoder(data).Decode(&dst.Float32) - if err == nil { - jsonFloat32, _ := json.Marshal(dst.Float32) - if string(jsonFloat32) == "{}" { // empty struct - dst.Float32 = nil - } else { - match++ - } - } else { - dst.Float32 = nil - } - - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.Float32 = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(XdaiTransactionConfigFrom)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(XdaiTransactionConfigFrom)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src XdaiTransactionConfigFrom) MarshalJSON() ([]byte, error) { - if src.Float32 != nil { - return json.Marshal(&src.Float32) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *XdaiTransactionConfigFrom) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.Float32 != nil { - return obj.Float32 - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableXdaiTransactionConfigFrom struct { - value *XdaiTransactionConfigFrom - isSet bool -} - -func (v NullableXdaiTransactionConfigFrom) Get() *XdaiTransactionConfigFrom { - return v.value -} - -func (v *NullableXdaiTransactionConfigFrom) Set(val *XdaiTransactionConfigFrom) { - v.value = val - v.isSet = true -} - -func (v NullableXdaiTransactionConfigFrom) IsSet() bool { - return v.isSet -} - -func (v *NullableXdaiTransactionConfigFrom) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableXdaiTransactionConfigFrom(val *XdaiTransactionConfigFrom) *NullableXdaiTransactionConfigFrom { - return &NullableXdaiTransactionConfigFrom{value: val, isSet: true} -} - -func (v NullableXdaiTransactionConfigFrom) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableXdaiTransactionConfigFrom) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_xdai_transaction_config_to.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_xdai_transaction_config_to.go deleted file mode 100644 index e861a31151..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/model_xdai_transaction_config_to.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" - "fmt" -) - -// XdaiTransactionConfigTo - struct for XdaiTransactionConfigTo -type XdaiTransactionConfigTo struct { - String *string -} - -// stringAsXdaiTransactionConfigTo is a convenience function that returns string wrapped in XdaiTransactionConfigTo -func StringAsXdaiTransactionConfigTo(v *string) XdaiTransactionConfigTo { - return XdaiTransactionConfigTo{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *XdaiTransactionConfigTo) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) - if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(XdaiTransactionConfigTo)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(XdaiTransactionConfigTo)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src XdaiTransactionConfigTo) MarshalJSON() ([]byte, error) { - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *XdaiTransactionConfigTo) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableXdaiTransactionConfigTo struct { - value *XdaiTransactionConfigTo - isSet bool -} - -func (v NullableXdaiTransactionConfigTo) Get() *XdaiTransactionConfigTo { - return v.value -} - -func (v *NullableXdaiTransactionConfigTo) Set(val *XdaiTransactionConfigTo) { - v.value = val - v.isSet = true -} - -func (v NullableXdaiTransactionConfigTo) IsSet() bool { - return v.isSet -} - -func (v *NullableXdaiTransactionConfigTo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableXdaiTransactionConfigTo(val *XdaiTransactionConfigTo) *NullableXdaiTransactionConfigTo { - return &NullableXdaiTransactionConfigTo{value: val, isSet: true} -} - -func (v NullableXdaiTransactionConfigTo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableXdaiTransactionConfigTo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 95aeeb80f1..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 866443a7e4..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-ledger-connector-xdai - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-ledger-connector-xdai_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService DeployContractJsonObjectV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeployContractJsonObjectV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService DeployContractV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.DeployContractV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService GetPrometheusMetricsV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetPrometheusMetricsV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService InvokeContractJsonObject", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.InvokeContractJsonObject(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService InvokeContractV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.InvokeContractV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RunTransactionV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.RunTransactionV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index f186094695..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Connector Xdai - -Can perform basic tasks on a Xdai ledger - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-ledger-connector-xdai - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-xdai/src/main/json/openapi.json deleted file mode 100644 index a582896548..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/json/openapi.json +++ /dev/null @@ -1,1033 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Connector Xdai", - "description": "Can perform basic tasks on a Xdai ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "ReceiptType": { - "description": "Enumerates the possible types of receipts that can be waited for by someone or something that has requested the execution of a transaction on a ledger.", - "type": "string", - "enum": ["NODE_TX_POOL_ACK", "LEDGER_BLOCK_ACK"] - }, - "ConsistencyStrategy": { - "type": "object", - "required": ["receiptType", "blockConfirmations"], - "properties": { - "receiptType": { - "$ref": "#/components/schemas/ReceiptType" - }, - "timeoutMs": { - "type": "integer", - "description": "The amount of milliseconds to wait for the receipt to arrive to the connector. Defaults to 0 which means to wait for an unlimited amount of time. Note that this wait may be interrupted still by other parts of the infrastructure such as load balancers cutting of HTTP requests after some time even if they are the type that is supposed to be kept alive. The question of re-entrance is a broader topic not in scope to discuss here, but it is important to mention it.", - "minimum": 0 - }, - "blockConfirmations": { - "type": "integer", - "minimum": 0, - "maximum": 20000, - "description": "The number of blocks to wait to be confirmed in addition to the block containing the transaction in question. Note that if the receipt type is set to only wait for node transaction pool ACK and this parameter is set to anything, but zero then the API will not accept the request due to conflicting parameters." - }, - "pollIntervalMs": { - "type": "integer", - "minimum": 0, - "description": "The amount of time (in milliseconds) connector will wait before making another confiramtion request to the network in case of previous confiramtion request fails" - } - } - }, - "Web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialCactusKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialPrivateKeyHex" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialCactusKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainId", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialPrivateKeyHex": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "secret": { - "type": "string", - "description": "The HEX encoded private key of an eth account.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": [ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE" - ] - }, - "EthContractInvocationType": { - "type": "string", - "enum": ["SEND", "CALL"] - }, - "SolidityContractJsonArtifact": { - "type": "object", - "required": ["contractName"], - "properties": { - "contractName": { - "type": "string", - "nullable": false - }, - "metadata": { - "type": "string", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false - }, - "deployedBytecode": { - "type": "string", - "nullable": false - }, - "sourceMap": { - "type": "string", - "nullable": false - }, - "deployedSourceMap": { - "type": "string", - "nullable": false - }, - "sourcePath": { - "type": "string" - }, - "compiler": { - "type": "object", - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "functionHashes": { - "type": "object", - "additionalProperties": true - }, - "gasEstimates": { - "properties": { - "creation": { - "type": "object", - "properties": { - "codeDepositCost": { - "type": "string" - }, - "executionCost": { - "type": "string" - }, - "totalCost": { - "type": "string" - } - } - }, - "external": { - "type": "object", - "additionalProperties": true - } - } - } - } - }, - "XdaiTransactionConfig": { - "type": "object", - "additionalProperties": true, - "properties": { - "rawTransaction": { - "type": "string", - "nullable": false - }, - "from": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "to": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "data": { - "oneOf": [ - { - "type": "string" - } - ] - } - } - }, - "Web3TransactionReceipt": { - "type": "object", - "required": [ - "blockHash", - "blockNumber", - "transactionHash", - "transactionIndex", - "status", - "from", - "to", - "gasUsed" - ], - "additionalProperties": true, - "properties": { - "status": { - "type": "boolean", - "nullable": false - }, - "transactionHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "transactionIndex": { - "type": "number", - "nullable": false - }, - "blockHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "blockNumber": { - "type": "number", - "nullable": false - }, - "gasUsed": { - "type": "number", - "nullable": false - }, - "contractAddress": { - "type": "string", - "nullable": true - }, - "from": { - "type": "string", - "nullable": false - }, - "to": { - "type": "string", - "nullable": false - } - } - }, - "ContractJSON": { - "type": "object", - "required": ["contractName", "bytecode", "abi"], - "additionalProperties": true, - "properties": { - "contractName": { - "type": "string", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 24576, - "description": "See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode" - }, - "abi": { - "description": "The application binary interface of the solidity contract, optional parameter", - "type": "array", - "items": {}, - "nullable": false - }, - "metadata": { - "type": "string" - }, - "deployedBytecode": { - "type": "string" - }, - "sourceMap": { - "type": "string" - }, - "deployedSourceMap": { - "type": "string" - }, - "sourcePath": { - "type": "string" - }, - "compiler": { - "type": "object" - }, - "networks": { - "type": "object" - }, - "ast": { - "type": "object" - }, - "functionHashes": { - "type": "object" - }, - "gasEstimates": { - "type": "object" - } - } - }, - "RunTransactionV1Request": { - "type": "object", - "required": [ - "web3SigningCredential", - "transactionConfig", - "consistencyStrategy" - ], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "transactionConfig": { - "$ref": "#/components/schemas/XdaiTransactionConfig", - "nullable": false - }, - "consistencyStrategy": { - "$ref": "#/components/schemas/ConsistencyStrategy" - } - } - }, - "RunTransactionV1Response": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "DeployContractV1Request": { - "type": "object", - "required": ["contractName", "web3SigningCredential", "keychainId"], - "additionalProperties": false, - "properties": { - "contractName": { - "type": "string", - "description": "The contract name for retrieve the contracts json on the keychain.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "keychainId": { - "type": "string", - "description": "The keychainId for retrieve the contracts json.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "gas": { - "type": "number", - "nullable": false - }, - "gasPrice": { - "type": "string", - "nullable": false - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - } - } - }, - "DeployContractJsonObjectV1Request": { - "type": "object", - "required": ["web3SigningCredential", "contractJSON"], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "gas": { - "type": "number", - "nullable": false - }, - "gasPrice": { - "type": "string", - "nullable": false - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON", - "description": "For use when not using keychain, pass the contract in as this variable", - "nullable": false - }, - "constructorArgs": { - "description": "The list of arguments to pass in to the constructor of the contract being deployed.", - "type": "array", - "default": [], - "items": {} - } - } - }, - "DeployContractV1Response": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "InvokeContractV1Request": { - "type": "object", - "required": [ - "contractName", - "web3SigningCredential", - "invocationType", - "methodName", - "params", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "contractName": { - "description": "The contract name to find it in the keychain plugin", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationType", - "nullable": false, - "description": "Indicates wether it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": {} - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "keychainId": { - "type": "string", - "description": "The keychainId for retrieve the contracts json.", - "minLength": 1, - "maxLength": 100 - } - } - }, - "InvokeContractJsonObjectV1Request": { - "type": "object", - "required": [ - "web3SigningCredential", - "invocationType", - "methodName", - "params", - "contractJSON", - "contractAddress" - ], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationType", - "nullable": false, - "description": "Indicates wether it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": {} - }, - "contractAddress": { - "description": "Address of the solidity contract", - "type": "string", - "nullable": false - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON", - "description": "For use when not using keychain, pass the contract in as this variable", - "nullable": false - } - } - }, - "InvokeContractV1Response": { - "type": "object", - "required": ["success"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - }, - "callOutput": {}, - "success": { - "type": "boolean", - "nullable": false - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "DeployRequestBaseV1": { - "type": "object", - "required": ["contractJSON", "web3SigningCredential"], - "properties": { - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON", - "description": "For use when not using keychain, pass the contract in as this variable", - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - } - } - }, - "InvokeRequestBaseV1": { - "type": "object", - "required": [ - "contractAddress", - "web3SigningCredential", - "invocationType", - "methodName", - "params", - "contractJSON" - ], - "additionalProperties": false, - "properties": { - "contractAddress": { - "description": "Address of the solidity contract", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationType", - "nullable": false, - "description": "Indicates wether it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": {} - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON", - "description": "For use when not using keychain, pass the contract in as this variable", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode" - } - }, - "operationId": "deployContractV1", - "summary": "Deploys the bytecode of a Solidity contract.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object" - } - }, - "operationId": "deployContractJsonObjectV1", - "summary": "Deploys the bytecode of a Solidity contract.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractJsonObjectV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction" - } - }, - "operationId": "runTransactionV1", - "summary": "Executes a transaction on a xdai ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract" - } - }, - "operationId": "invokeContractV1", - "summary": "Invokes a contract on a xdai ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object" - } - }, - "operationId": "invokeContractJsonObject", - "summary": "Invokes a contract on a besu ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractJsonObjectV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-xdai/src/main/json/openapi.tpl.json deleted file mode 100644 index a582896548..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,1033 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Connector Xdai", - "description": "Can perform basic tasks on a Xdai ledger", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "ReceiptType": { - "description": "Enumerates the possible types of receipts that can be waited for by someone or something that has requested the execution of a transaction on a ledger.", - "type": "string", - "enum": ["NODE_TX_POOL_ACK", "LEDGER_BLOCK_ACK"] - }, - "ConsistencyStrategy": { - "type": "object", - "required": ["receiptType", "blockConfirmations"], - "properties": { - "receiptType": { - "$ref": "#/components/schemas/ReceiptType" - }, - "timeoutMs": { - "type": "integer", - "description": "The amount of milliseconds to wait for the receipt to arrive to the connector. Defaults to 0 which means to wait for an unlimited amount of time. Note that this wait may be interrupted still by other parts of the infrastructure such as load balancers cutting of HTTP requests after some time even if they are the type that is supposed to be kept alive. The question of re-entrance is a broader topic not in scope to discuss here, but it is important to mention it.", - "minimum": 0 - }, - "blockConfirmations": { - "type": "integer", - "minimum": 0, - "maximum": 20000, - "description": "The number of blocks to wait to be confirmed in addition to the block containing the transaction in question. Note that if the receipt type is set to only wait for node transaction pool ACK and this parameter is set to anything, but zero then the API will not accept the request due to conflicting parameters." - }, - "pollIntervalMs": { - "type": "integer", - "minimum": 0, - "description": "The amount of time (in milliseconds) connector will wait before making another confiramtion request to the network in case of previous confiramtion request fails" - } - } - }, - "Web3SigningCredential": { - "type": "object", - "required": ["type"], - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "#/components/schemas/Web3SigningCredentialCactusKeychainRef" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialPrivateKeyHex" - }, - { - "$ref": "#/components/schemas/Web3SigningCredentialNone" - } - ], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialCactusKeychainRef": { - "type": "object", - "required": ["type", "ethAccount", "keychainId", "keychainEntryKey"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "keychainEntryKey": { - "type": "string", - "description": "The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - }, - "keychainId": { - "type": "string", - "description": "The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter.", - "minLength": 0, - "maxLength": 1024 - } - } - }, - "Web3SigningCredentialPrivateKeyHex": { - "type": "object", - "required": ["type", "ethAccount", "secret"], - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - }, - "ethAccount": { - "type": "string", - "description": "The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication.", - "minLength": 64, - "maxLength": 64, - "nullable": false - }, - "secret": { - "type": "string", - "description": "The HEX encoded private key of an eth account.", - "minLength": 0, - "maxLength": 65535 - } - } - }, - "Web3SigningCredentialNone": { - "type": "object", - "required": ["type"], - "description": "Using this denotes that there is no signing required because the transaction is pre-signed.", - "properties": { - "type": { - "$ref": "#/components/schemas/Web3SigningCredentialType" - } - } - }, - "Web3SigningCredentialType": { - "type": "string", - "enum": [ - "CACTUS_KEYCHAIN_REF", - "GETH_KEYCHAIN_PASSWORD", - "PRIVATE_KEY_HEX", - "NONE" - ] - }, - "EthContractInvocationType": { - "type": "string", - "enum": ["SEND", "CALL"] - }, - "SolidityContractJsonArtifact": { - "type": "object", - "required": ["contractName"], - "properties": { - "contractName": { - "type": "string", - "nullable": false - }, - "metadata": { - "type": "string", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false - }, - "deployedBytecode": { - "type": "string", - "nullable": false - }, - "sourceMap": { - "type": "string", - "nullable": false - }, - "deployedSourceMap": { - "type": "string", - "nullable": false - }, - "sourcePath": { - "type": "string" - }, - "compiler": { - "type": "object", - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "functionHashes": { - "type": "object", - "additionalProperties": true - }, - "gasEstimates": { - "properties": { - "creation": { - "type": "object", - "properties": { - "codeDepositCost": { - "type": "string" - }, - "executionCost": { - "type": "string" - }, - "totalCost": { - "type": "string" - } - } - }, - "external": { - "type": "object", - "additionalProperties": true - } - } - } - } - }, - "XdaiTransactionConfig": { - "type": "object", - "additionalProperties": true, - "properties": { - "rawTransaction": { - "type": "string", - "nullable": false - }, - "from": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "to": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "data": { - "oneOf": [ - { - "type": "string" - } - ] - } - } - }, - "Web3TransactionReceipt": { - "type": "object", - "required": [ - "blockHash", - "blockNumber", - "transactionHash", - "transactionIndex", - "status", - "from", - "to", - "gasUsed" - ], - "additionalProperties": true, - "properties": { - "status": { - "type": "boolean", - "nullable": false - }, - "transactionHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "transactionIndex": { - "type": "number", - "nullable": false - }, - "blockHash": { - "type": "string", - "minLength": 66, - "maxLength": 66, - "pattern": "^0x([A-Fa-f0-9]{64})$" - }, - "blockNumber": { - "type": "number", - "nullable": false - }, - "gasUsed": { - "type": "number", - "nullable": false - }, - "contractAddress": { - "type": "string", - "nullable": true - }, - "from": { - "type": "string", - "nullable": false - }, - "to": { - "type": "string", - "nullable": false - } - } - }, - "ContractJSON": { - "type": "object", - "required": ["contractName", "bytecode", "abi"], - "additionalProperties": true, - "properties": { - "contractName": { - "type": "string", - "nullable": false - }, - "bytecode": { - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 24576, - "description": "See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode" - }, - "abi": { - "description": "The application binary interface of the solidity contract, optional parameter", - "type": "array", - "items": {}, - "nullable": false - }, - "metadata": { - "type": "string" - }, - "deployedBytecode": { - "type": "string" - }, - "sourceMap": { - "type": "string" - }, - "deployedSourceMap": { - "type": "string" - }, - "sourcePath": { - "type": "string" - }, - "compiler": { - "type": "object" - }, - "networks": { - "type": "object" - }, - "ast": { - "type": "object" - }, - "functionHashes": { - "type": "object" - }, - "gasEstimates": { - "type": "object" - } - } - }, - "RunTransactionV1Request": { - "type": "object", - "required": [ - "web3SigningCredential", - "transactionConfig", - "consistencyStrategy" - ], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "transactionConfig": { - "$ref": "#/components/schemas/XdaiTransactionConfig", - "nullable": false - }, - "consistencyStrategy": { - "$ref": "#/components/schemas/ConsistencyStrategy" - } - } - }, - "RunTransactionV1Response": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "DeployContractV1Request": { - "type": "object", - "required": ["contractName", "web3SigningCredential", "keychainId"], - "additionalProperties": false, - "properties": { - "contractName": { - "type": "string", - "description": "The contract name for retrieve the contracts json on the keychain.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "keychainId": { - "type": "string", - "description": "The keychainId for retrieve the contracts json.", - "minLength": 1, - "maxLength": 100, - "nullable": false - }, - "gas": { - "type": "number", - "nullable": false - }, - "gasPrice": { - "type": "string", - "nullable": false - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - } - } - }, - "DeployContractJsonObjectV1Request": { - "type": "object", - "required": ["web3SigningCredential", "contractJSON"], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "gas": { - "type": "number", - "nullable": false - }, - "gasPrice": { - "type": "string", - "nullable": false - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON", - "description": "For use when not using keychain, pass the contract in as this variable", - "nullable": false - }, - "constructorArgs": { - "description": "The list of arguments to pass in to the constructor of the contract being deployed.", - "type": "array", - "default": [], - "items": {} - } - } - }, - "DeployContractV1Response": { - "type": "object", - "required": ["transactionReceipt"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - } - } - }, - "InvokeContractV1Request": { - "type": "object", - "required": [ - "contractName", - "web3SigningCredential", - "invocationType", - "methodName", - "params", - "keychainId" - ], - "additionalProperties": false, - "properties": { - "contractName": { - "description": "The contract name to find it in the keychain plugin", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationType", - "nullable": false, - "description": "Indicates wether it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": {} - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "keychainId": { - "type": "string", - "description": "The keychainId for retrieve the contracts json.", - "minLength": 1, - "maxLength": 100 - } - } - }, - "InvokeContractJsonObjectV1Request": { - "type": "object", - "required": [ - "web3SigningCredential", - "invocationType", - "methodName", - "params", - "contractJSON", - "contractAddress" - ], - "additionalProperties": false, - "properties": { - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationType", - "nullable": false, - "description": "Indicates wether it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": {} - }, - "contractAddress": { - "description": "Address of the solidity contract", - "type": "string", - "nullable": false - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON", - "description": "For use when not using keychain, pass the contract in as this variable", - "nullable": false - } - } - }, - "InvokeContractV1Response": { - "type": "object", - "required": ["success"], - "properties": { - "transactionReceipt": { - "$ref": "#/components/schemas/Web3TransactionReceipt" - }, - "callOutput": {}, - "success": { - "type": "boolean", - "nullable": false - } - } - }, - "PrometheusExporterMetricsResponse": { - "type": "string", - "nullable": false - }, - "DeployRequestBaseV1": { - "type": "object", - "required": ["contractJSON", "web3SigningCredential"], - "properties": { - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON", - "description": "For use when not using keychain, pass the contract in as this variable", - "nullable": false - }, - "constructorArgs": { - "type": "array", - "items": {}, - "default": [] - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing.", - "minimum": 0, - "default": 60000, - "nullable": false - } - } - }, - "InvokeRequestBaseV1": { - "type": "object", - "required": [ - "contractAddress", - "web3SigningCredential", - "invocationType", - "methodName", - "params", - "contractJSON" - ], - "additionalProperties": false, - "properties": { - "contractAddress": { - "description": "Address of the solidity contract", - "type": "string", - "nullable": false - }, - "web3SigningCredential": { - "$ref": "#/components/schemas/Web3SigningCredential", - "nullable": false - }, - "invocationType": { - "$ref": "#/components/schemas/EthContractInvocationType", - "nullable": false, - "description": "Indicates wether it is a CALL or a SEND type of invocation where only SEND ends up creating an actual transaction on the ledger." - }, - "methodName": { - "description": "The name of the contract method to invoke.", - "type": "string", - "nullable": false, - "minLength": 1, - "maxLength": 2048 - }, - "params": { - "description": "The list of arguments to pass in to the contract method being invoked.", - "type": "array", - "default": [], - "items": {} - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gas": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "gasPrice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "nonce": { - "type": "number" - }, - "timeoutMs": { - "type": "number", - "description": "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND", - "minimum": 0, - "default": 60000, - "nullable": false - }, - "contractJSON": { - "$ref": "#/components/schemas/ContractJSON", - "description": "For use when not using keychain, pass the contract in as this variable", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode" - } - }, - "operationId": "deployContractV1", - "summary": "Deploys the bytecode of a Solidity contract.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object" - } - }, - "operationId": "deployContractJsonObjectV1", - "summary": "Deploys the bytecode of a Solidity contract.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractJsonObjectV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction" - } - }, - "operationId": "runTransactionV1", - "summary": "Executes a transaction on a xdai ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RunTransactionV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract" - } - }, - "operationId": "invokeContractV1", - "summary": "Invokes a contract on a xdai ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object" - } - }, - "operationId": "invokeContractJsonObject", - "summary": "Invokes a contract on a besu ledger", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractJsonObjectV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeContractV1Response" - } - } - } - } - } - } - }, - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics" - } - }, - "operationId": "getPrometheusMetricsV1", - "summary": "Get the Prometheus Metrics", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/PrometheusExporterMetricsResponse" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 9f262fc58f..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,1404 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Xdai - * Can perform basic tasks on a Xdai ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface ConsistencyStrategy - */ -export interface ConsistencyStrategy { - /** - * - * @type {ReceiptType} - * @memberof ConsistencyStrategy - */ - 'receiptType': ReceiptType; - /** - * The amount of milliseconds to wait for the receipt to arrive to the connector. Defaults to 0 which means to wait for an unlimited amount of time. Note that this wait may be interrupted still by other parts of the infrastructure such as load balancers cutting of HTTP requests after some time even if they are the type that is supposed to be kept alive. The question of re-entrance is a broader topic not in scope to discuss here, but it is important to mention it. - * @type {number} - * @memberof ConsistencyStrategy - */ - 'timeoutMs'?: number; - /** - * The number of blocks to wait to be confirmed in addition to the block containing the transaction in question. Note that if the receipt type is set to only wait for node transaction pool ACK and this parameter is set to anything, but zero then the API will not accept the request due to conflicting parameters. - * @type {number} - * @memberof ConsistencyStrategy - */ - 'blockConfirmations': number; - /** - * The amount of time (in milliseconds) connector will wait before making another confiramtion request to the network in case of previous confiramtion request fails - * @type {number} - * @memberof ConsistencyStrategy - */ - 'pollIntervalMs'?: number; -} - - -/** - * - * @export - * @interface ContractJSON - */ -export interface ContractJSON { - [key: string]: any; - - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'contractName': string; - /** - * See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode - * @type {string} - * @memberof ContractJSON - */ - 'bytecode': string; - /** - * The application binary interface of the solidity contract, optional parameter - * @type {Array} - * @memberof ContractJSON - */ - 'abi': Array; - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'metadata'?: string; - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'deployedBytecode'?: string; - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'sourceMap'?: string; - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'deployedSourceMap'?: string; - /** - * - * @type {string} - * @memberof ContractJSON - */ - 'sourcePath'?: string; - /** - * - * @type {object} - * @memberof ContractJSON - */ - 'compiler'?: object; - /** - * - * @type {object} - * @memberof ContractJSON - */ - 'networks'?: object; - /** - * - * @type {object} - * @memberof ContractJSON - */ - 'ast'?: object; - /** - * - * @type {object} - * @memberof ContractJSON - */ - 'functionHashes'?: object; - /** - * - * @type {object} - * @memberof ContractJSON - */ - 'gasEstimates'?: object; -} -/** - * - * @export - * @interface DeployContractJsonObjectV1Request - */ -export interface DeployContractJsonObjectV1Request { - /** - * - * @type {Web3SigningCredential} - * @memberof DeployContractJsonObjectV1Request - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {number} - * @memberof DeployContractJsonObjectV1Request - */ - 'gas'?: number; - /** - * - * @type {string} - * @memberof DeployContractJsonObjectV1Request - */ - 'gasPrice'?: string; - /** - * The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - * @type {number} - * @memberof DeployContractJsonObjectV1Request - */ - 'timeoutMs'?: number; - /** - * - * @type {ContractJSON} - * @memberof DeployContractJsonObjectV1Request - */ - 'contractJSON': ContractJSON; - /** - * The list of arguments to pass in to the constructor of the contract being deployed. - * @type {Array} - * @memberof DeployContractJsonObjectV1Request - */ - 'constructorArgs'?: Array; -} -/** - * - * @export - * @interface DeployContractV1Request - */ -export interface DeployContractV1Request { - /** - * The contract name for retrieve the contracts json on the keychain. - * @type {string} - * @memberof DeployContractV1Request - */ - 'contractName': string; - /** - * - * @type {Array} - * @memberof DeployContractV1Request - */ - 'constructorArgs'?: Array; - /** - * - * @type {Web3SigningCredential} - * @memberof DeployContractV1Request - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * The keychainId for retrieve the contracts json. - * @type {string} - * @memberof DeployContractV1Request - */ - 'keychainId': string; - /** - * - * @type {number} - * @memberof DeployContractV1Request - */ - 'gas'?: number; - /** - * - * @type {string} - * @memberof DeployContractV1Request - */ - 'gasPrice'?: string; - /** - * The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - * @type {number} - * @memberof DeployContractV1Request - */ - 'timeoutMs'?: number; -} -/** - * - * @export - * @interface DeployContractV1Response - */ -export interface DeployContractV1Response { - /** - * - * @type {Web3TransactionReceipt} - * @memberof DeployContractV1Response - */ - 'transactionReceipt': Web3TransactionReceipt; -} -/** - * - * @export - * @interface DeployRequestBaseV1 - */ -export interface DeployRequestBaseV1 { - /** - * - * @type {ContractJSON} - * @memberof DeployRequestBaseV1 - */ - 'contractJSON': ContractJSON; - /** - * - * @type {Array} - * @memberof DeployRequestBaseV1 - */ - 'constructorArgs'?: Array; - /** - * - * @type {Web3SigningCredential} - * @memberof DeployRequestBaseV1 - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof DeployRequestBaseV1 - */ - 'gas'?: XdaiTransactionConfigFrom; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof DeployRequestBaseV1 - */ - 'gasPrice'?: XdaiTransactionConfigFrom; - /** - * The amount of milliseconds to wait for a transaction receipt with theaddress of the contract(which indicates successful deployment) beforegiving up and crashing. - * @type {number} - * @memberof DeployRequestBaseV1 - */ - 'timeoutMs'?: number; -} -/** - * - * @export - * @enum {string} - */ - -export const EthContractInvocationType = { - Send: 'SEND', - Call: 'CALL' -} as const; - -export type EthContractInvocationType = typeof EthContractInvocationType[keyof typeof EthContractInvocationType]; - - -/** - * - * @export - * @interface InvokeContractJsonObjectV1Request - */ -export interface InvokeContractJsonObjectV1Request { - /** - * - * @type {Web3SigningCredential} - * @memberof InvokeContractJsonObjectV1Request - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {EthContractInvocationType} - * @memberof InvokeContractJsonObjectV1Request - */ - 'invocationType': EthContractInvocationType; - /** - * The name of the contract method to invoke. - * @type {string} - * @memberof InvokeContractJsonObjectV1Request - */ - 'methodName': string; - /** - * The list of arguments to pass in to the contract method being invoked. - * @type {Array} - * @memberof InvokeContractJsonObjectV1Request - */ - 'params': Array; - /** - * Address of the solidity contract - * @type {string} - * @memberof InvokeContractJsonObjectV1Request - */ - 'contractAddress': string; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof InvokeContractJsonObjectV1Request - */ - 'value'?: XdaiTransactionConfigFrom; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof InvokeContractJsonObjectV1Request - */ - 'gas'?: XdaiTransactionConfigFrom; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof InvokeContractJsonObjectV1Request - */ - 'gasPrice'?: XdaiTransactionConfigFrom; - /** - * - * @type {number} - * @memberof InvokeContractJsonObjectV1Request - */ - 'nonce'?: number; - /** - * The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND - * @type {number} - * @memberof InvokeContractJsonObjectV1Request - */ - 'timeoutMs'?: number; - /** - * - * @type {ContractJSON} - * @memberof InvokeContractJsonObjectV1Request - */ - 'contractJSON': ContractJSON; -} - - -/** - * - * @export - * @interface InvokeContractV1Request - */ -export interface InvokeContractV1Request { - /** - * The contract name to find it in the keychain plugin - * @type {string} - * @memberof InvokeContractV1Request - */ - 'contractName': string; - /** - * - * @type {Web3SigningCredential} - * @memberof InvokeContractV1Request - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {EthContractInvocationType} - * @memberof InvokeContractV1Request - */ - 'invocationType': EthContractInvocationType; - /** - * The name of the contract method to invoke. - * @type {string} - * @memberof InvokeContractV1Request - */ - 'methodName': string; - /** - * The list of arguments to pass in to the contract method being invoked. - * @type {Array} - * @memberof InvokeContractV1Request - */ - 'params': Array; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof InvokeContractV1Request - */ - 'value'?: XdaiTransactionConfigFrom; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof InvokeContractV1Request - */ - 'gas'?: XdaiTransactionConfigFrom; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof InvokeContractV1Request - */ - 'gasPrice'?: XdaiTransactionConfigFrom; - /** - * - * @type {number} - * @memberof InvokeContractV1Request - */ - 'nonce'?: number; - /** - * The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND - * @type {number} - * @memberof InvokeContractV1Request - */ - 'timeoutMs'?: number; - /** - * The keychainId for retrieve the contracts json. - * @type {string} - * @memberof InvokeContractV1Request - */ - 'keychainId': string; -} - - -/** - * - * @export - * @interface InvokeContractV1Response - */ -export interface InvokeContractV1Response { - /** - * - * @type {Web3TransactionReceipt} - * @memberof InvokeContractV1Response - */ - 'transactionReceipt'?: Web3TransactionReceipt; - /** - * - * @type {any} - * @memberof InvokeContractV1Response - */ - 'callOutput'?: any; - /** - * - * @type {boolean} - * @memberof InvokeContractV1Response - */ - 'success': boolean; -} -/** - * - * @export - * @interface InvokeRequestBaseV1 - */ -export interface InvokeRequestBaseV1 { - /** - * Address of the solidity contract - * @type {string} - * @memberof InvokeRequestBaseV1 - */ - 'contractAddress': string; - /** - * - * @type {Web3SigningCredential} - * @memberof InvokeRequestBaseV1 - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {EthContractInvocationType} - * @memberof InvokeRequestBaseV1 - */ - 'invocationType': EthContractInvocationType; - /** - * The name of the contract method to invoke. - * @type {string} - * @memberof InvokeRequestBaseV1 - */ - 'methodName': string; - /** - * The list of arguments to pass in to the contract method being invoked. - * @type {Array} - * @memberof InvokeRequestBaseV1 - */ - 'params': Array; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof InvokeRequestBaseV1 - */ - 'value'?: XdaiTransactionConfigFrom; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof InvokeRequestBaseV1 - */ - 'gas'?: XdaiTransactionConfigFrom; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof InvokeRequestBaseV1 - */ - 'gasPrice'?: XdaiTransactionConfigFrom; - /** - * - * @type {number} - * @memberof InvokeRequestBaseV1 - */ - 'nonce'?: number; - /** - * The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing. Only has any effect if the invocation type is SEND - * @type {number} - * @memberof InvokeRequestBaseV1 - */ - 'timeoutMs'?: number; - /** - * - * @type {ContractJSON} - * @memberof InvokeRequestBaseV1 - */ - 'contractJSON': ContractJSON; -} - - -/** - * Enumerates the possible types of receipts that can be waited for by someone or something that has requested the execution of a transaction on a ledger. - * @export - * @enum {string} - */ - -export const ReceiptType = { - NodeTxPoolAck: 'NODE_TX_POOL_ACK', - LedgerBlockAck: 'LEDGER_BLOCK_ACK' -} as const; - -export type ReceiptType = typeof ReceiptType[keyof typeof ReceiptType]; - - -/** - * - * @export - * @interface RunTransactionV1Request - */ -export interface RunTransactionV1Request { - /** - * - * @type {Web3SigningCredential} - * @memberof RunTransactionV1Request - */ - 'web3SigningCredential': Web3SigningCredential; - /** - * - * @type {XdaiTransactionConfig} - * @memberof RunTransactionV1Request - */ - 'transactionConfig': XdaiTransactionConfig; - /** - * - * @type {ConsistencyStrategy} - * @memberof RunTransactionV1Request - */ - 'consistencyStrategy': ConsistencyStrategy; -} -/** - * - * @export - * @interface RunTransactionV1Response - */ -export interface RunTransactionV1Response { - /** - * - * @type {Web3TransactionReceipt} - * @memberof RunTransactionV1Response - */ - 'transactionReceipt': Web3TransactionReceipt; -} -/** - * - * @export - * @interface SolidityContractJsonArtifact - */ -export interface SolidityContractJsonArtifact { - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'contractName': string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'metadata'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'bytecode'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'deployedBytecode'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'sourceMap'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'deployedSourceMap'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifact - */ - 'sourcePath'?: string; - /** - * - * @type {SolidityContractJsonArtifactCompiler} - * @memberof SolidityContractJsonArtifact - */ - 'compiler'?: SolidityContractJsonArtifactCompiler; - /** - * - * @type {{ [key: string]: any; }} - * @memberof SolidityContractJsonArtifact - */ - 'functionHashes'?: { [key: string]: any; }; - /** - * - * @type {SolidityContractJsonArtifactGasEstimates} - * @memberof SolidityContractJsonArtifact - */ - 'gasEstimates'?: SolidityContractJsonArtifactGasEstimates; -} -/** - * - * @export - * @interface SolidityContractJsonArtifactCompiler - */ -export interface SolidityContractJsonArtifactCompiler { - [key: string]: any; - - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifactCompiler - */ - 'name'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifactCompiler - */ - 'version'?: string; -} -/** - * - * @export - * @interface SolidityContractJsonArtifactGasEstimates - */ -export interface SolidityContractJsonArtifactGasEstimates { - /** - * - * @type {SolidityContractJsonArtifactGasEstimatesCreation} - * @memberof SolidityContractJsonArtifactGasEstimates - */ - 'creation'?: SolidityContractJsonArtifactGasEstimatesCreation; - /** - * - * @type {{ [key: string]: any; }} - * @memberof SolidityContractJsonArtifactGasEstimates - */ - 'external'?: { [key: string]: any; }; -} -/** - * - * @export - * @interface SolidityContractJsonArtifactGasEstimatesCreation - */ -export interface SolidityContractJsonArtifactGasEstimatesCreation { - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifactGasEstimatesCreation - */ - 'codeDepositCost'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifactGasEstimatesCreation - */ - 'executionCost'?: string; - /** - * - * @type {string} - * @memberof SolidityContractJsonArtifactGasEstimatesCreation - */ - 'totalCost'?: string; -} -/** - * @type Web3SigningCredential - * @export - */ -export type Web3SigningCredential = Web3SigningCredentialCactusKeychainRef | Web3SigningCredentialNone | Web3SigningCredentialPrivateKeyHex; - -/** - * - * @export - * @interface Web3SigningCredentialCactusKeychainRef - */ -export interface Web3SigningCredentialCactusKeychainRef { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'ethAccount': string; - /** - * The key to use when looking up the the keychain entry holding the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainEntryKey': string; - /** - * The keychain ID to use when looking up the the keychain plugin instance that will be used to retrieve the secret pointed to by the keychainEntryKey parameter. - * @type {string} - * @memberof Web3SigningCredentialCactusKeychainRef - */ - 'keychainId': string; -} - - -/** - * Using this denotes that there is no signing required because the transaction is pre-signed. - * @export - * @interface Web3SigningCredentialNone - */ -export interface Web3SigningCredentialNone { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialNone - */ - 'type': Web3SigningCredentialType; -} - - -/** - * - * @export - * @interface Web3SigningCredentialPrivateKeyHex - */ -export interface Web3SigningCredentialPrivateKeyHex { - /** - * - * @type {Web3SigningCredentialType} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'type': Web3SigningCredentialType; - /** - * The ethereum account (public key) that the credential belongs to. Basically the username in the traditional terminology of authentication. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'ethAccount': string; - /** - * The HEX encoded private key of an eth account. - * @type {string} - * @memberof Web3SigningCredentialPrivateKeyHex - */ - 'secret': string; -} - - -/** - * - * @export - * @enum {string} - */ - -export const Web3SigningCredentialType = { - CactusKeychainRef: 'CACTUS_KEYCHAIN_REF', - GethKeychainPassword: 'GETH_KEYCHAIN_PASSWORD', - PrivateKeyHex: 'PRIVATE_KEY_HEX', - None: 'NONE' -} as const; - -export type Web3SigningCredentialType = typeof Web3SigningCredentialType[keyof typeof Web3SigningCredentialType]; - - -/** - * - * @export - * @interface Web3TransactionReceipt - */ -export interface Web3TransactionReceipt { - [key: string]: any; - - /** - * - * @type {boolean} - * @memberof Web3TransactionReceipt - */ - 'status': boolean; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'transactionHash': string; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'transactionIndex': number; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'blockHash': string; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'blockNumber': number; - /** - * - * @type {number} - * @memberof Web3TransactionReceipt - */ - 'gasUsed': number; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'contractAddress'?: string | null; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'from': string; - /** - * - * @type {string} - * @memberof Web3TransactionReceipt - */ - 'to': string; -} -/** - * - * @export - * @interface XdaiTransactionConfig - */ -export interface XdaiTransactionConfig { - [key: string]: any; - - /** - * - * @type {string} - * @memberof XdaiTransactionConfig - */ - 'rawTransaction'?: string; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof XdaiTransactionConfig - */ - 'from'?: XdaiTransactionConfigFrom; - /** - * - * @type {XdaiTransactionConfigTo} - * @memberof XdaiTransactionConfig - */ - 'to'?: XdaiTransactionConfigTo; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof XdaiTransactionConfig - */ - 'value'?: XdaiTransactionConfigFrom; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof XdaiTransactionConfig - */ - 'gas'?: XdaiTransactionConfigFrom; - /** - * - * @type {XdaiTransactionConfigFrom} - * @memberof XdaiTransactionConfig - */ - 'gasPrice'?: XdaiTransactionConfigFrom; - /** - * - * @type {number} - * @memberof XdaiTransactionConfig - */ - 'nonce'?: number; - /** - * - * @type {XdaiTransactionConfigTo} - * @memberof XdaiTransactionConfig - */ - 'data'?: XdaiTransactionConfigTo; -} -/** - * @type XdaiTransactionConfigFrom - * @export - */ -export type XdaiTransactionConfigFrom = number | string; - -/** - * @type XdaiTransactionConfigTo - * @export - */ -export type XdaiTransactionConfigTo = string; - - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractJsonObjectV1Request} [deployContractJsonObjectV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractJsonObjectV1: async (deployContractJsonObjectV1Request?: DeployContractJsonObjectV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deployContractJsonObjectV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractV1: async (deployContractV1Request?: DeployContractV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deployContractV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Invokes a contract on a besu ledger - * @param {InvokeContractJsonObjectV1Request} [invokeContractJsonObjectV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContractJsonObject: async (invokeContractJsonObjectV1Request?: InvokeContractJsonObjectV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(invokeContractJsonObjectV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Invokes a contract on a xdai ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContractV1: async (invokeContractV1Request?: InvokeContractV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(invokeContractV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Executes a transaction on a xdai ledger - * @param {RunTransactionV1Request} [runTransactionV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runTransactionV1: async (runTransactionV1Request?: RunTransactionV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(runTransactionV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractJsonObjectV1Request} [deployContractJsonObjectV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deployContractJsonObjectV1(deployContractJsonObjectV1Request?: DeployContractJsonObjectV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deployContractJsonObjectV1(deployContractJsonObjectV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deployContractV1(deployContractV1Request?: DeployContractV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deployContractV1(deployContractV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrometheusMetricsV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Invokes a contract on a besu ledger - * @param {InvokeContractJsonObjectV1Request} [invokeContractJsonObjectV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async invokeContractJsonObject(invokeContractJsonObjectV1Request?: InvokeContractJsonObjectV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.invokeContractJsonObject(invokeContractJsonObjectV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Invokes a contract on a xdai ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async invokeContractV1(invokeContractV1Request?: InvokeContractV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.invokeContractV1(invokeContractV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @summary Executes a transaction on a xdai ledger - * @param {RunTransactionV1Request} [runTransactionV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async runTransactionV1(runTransactionV1Request?: RunTransactionV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.runTransactionV1(runTransactionV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractJsonObjectV1Request} [deployContractJsonObjectV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractJsonObjectV1(deployContractJsonObjectV1Request?: DeployContractJsonObjectV1Request, options?: any): AxiosPromise { - return localVarFp.deployContractJsonObjectV1(deployContractJsonObjectV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deployContractV1(deployContractV1Request?: DeployContractV1Request, options?: any): AxiosPromise { - return localVarFp.deployContractV1(deployContractV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrometheusMetricsV1(options?: any): AxiosPromise { - return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Invokes a contract on a besu ledger - * @param {InvokeContractJsonObjectV1Request} [invokeContractJsonObjectV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContractJsonObject(invokeContractJsonObjectV1Request?: InvokeContractJsonObjectV1Request, options?: any): AxiosPromise { - return localVarFp.invokeContractJsonObject(invokeContractJsonObjectV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Invokes a contract on a xdai ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - invokeContractV1(invokeContractV1Request?: InvokeContractV1Request, options?: any): AxiosPromise { - return localVarFp.invokeContractV1(invokeContractV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Executes a transaction on a xdai ledger - * @param {RunTransactionV1Request} [runTransactionV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - runTransactionV1(runTransactionV1Request?: RunTransactionV1Request, options?: any): AxiosPromise { - return localVarFp.runTransactionV1(runTransactionV1Request, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractJsonObjectV1Request} [deployContractJsonObjectV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deployContractJsonObjectV1(deployContractJsonObjectV1Request?: DeployContractJsonObjectV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deployContractJsonObjectV1(deployContractJsonObjectV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Deploys the bytecode of a Solidity contract. - * @param {DeployContractV1Request} [deployContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public deployContractV1(deployContractV1Request?: DeployContractV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).deployContractV1(deployContractV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get the Prometheus Metrics - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getPrometheusMetricsV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Invokes a contract on a besu ledger - * @param {InvokeContractJsonObjectV1Request} [invokeContractJsonObjectV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public invokeContractJsonObject(invokeContractJsonObjectV1Request?: InvokeContractJsonObjectV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).invokeContractJsonObject(invokeContractJsonObjectV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Invokes a contract on a xdai ledger - * @param {InvokeContractV1Request} [invokeContractV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public invokeContractV1(invokeContractV1Request?: InvokeContractV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).invokeContractV1(invokeContractV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Executes a transaction on a xdai ledger - * @param {RunTransactionV1Request} [runTransactionV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public runTransactionV1(runTransactionV1Request?: RunTransactionV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).runTransactionV1(runTransactionV1Request, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 342fe57a37..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Xdai - * Can perform basic tasks on a Xdai ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index ccd2b5c4cb..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Xdai - * Can perform basic tasks on a Xdai ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 092f2f8517..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Xdai - * Can perform basic tasks on a Xdai ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 6c7c640093..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Connector Xdai - * Can perform basic tasks on a Xdai ledger - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/index.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/index.web.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/model-type-guards.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/model-type-guards.ts deleted file mode 100644 index 156acefe2a..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/model-type-guards.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - Web3SigningCredentialNone, - Web3SigningCredentialPrivateKeyHex, - Web3SigningCredentialType, -} from "./generated/openapi/typescript-axios/api"; - -export function isWeb3SigningCredentialPrivateKeyHex( - x: unknown, -): x is Web3SigningCredentialPrivateKeyHex { - return ( - (x as Web3SigningCredentialPrivateKeyHex)?.type === - Web3SigningCredentialType.PrivateKeyHex - ); -} - -export function isWeb3SigningCredentialNone( - x: unknown, -): x is Web3SigningCredentialNone { - return ( - (x as Web3SigningCredentialNone)?.type === Web3SigningCredentialType.None - ); -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/plugin-factory-ledger-connector.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/plugin-factory-ledger-connector.ts deleted file mode 100644 index 0061331aaa..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/plugin-factory-ledger-connector.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginLedgerConnectorXdaiOptions, - PluginLedgerConnectorXdai, -} from "./plugin-ledger-connector-xdai"; - -export class PluginFactoryLedgerConnector extends PluginFactory< - PluginLedgerConnectorXdai, - IPluginLedgerConnectorXdaiOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginLedgerConnectorXdaiOptions, - ): Promise { - return new PluginLedgerConnectorXdai(pluginOptions); - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/plugin-ledger-connector-xdai.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/plugin-ledger-connector-xdai.ts deleted file mode 100644 index c62874e9c2..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/plugin-ledger-connector-xdai.ts +++ /dev/null @@ -1,733 +0,0 @@ -import { Server } from "http"; -import { Server as SecureServer } from "https"; - -import type { Express } from "express"; -import Web3 from "web3"; - -import type { Contract } from "web3-eth-contract"; -import type { TransactionReceipt } from "web3-eth"; - -import OAS from "../json/openapi.json"; - -import { - ConsensusAlgorithmFamily, - IPluginLedgerConnector, - IWebServiceEndpoint, - IPluginWebService, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; - -import { consensusHasTransactionFinality } from "@hyperledger/cactus-core"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { DeployContractSolidityBytecodeEndpoint } from "./web-services/deploy-contract-solidity-bytecode-endpoint"; - -import { - ConsistencyStrategy, - DeployContractJsonObjectV1Request, - DeployContractV1Request, - DeployContractV1Response, - DeployRequestBaseV1, - EthContractInvocationType, - InvokeContractJsonObjectV1Request, - InvokeContractV1Request, - InvokeContractV1Response, - InvokeRequestBaseV1, - ReceiptType, - RunTransactionV1Request, - RunTransactionV1Response, - Web3SigningCredentialCactusKeychainRef, - Web3SigningCredentialPrivateKeyHex, - Web3SigningCredentialType, -} from "./generated/openapi/typescript-axios"; - -import { RunTransactionEndpoint } from "./web-services/run-transaction-endpoint"; -import { InvokeContractEndpoint } from "./web-services/invoke-contract-endpoint"; -import { isWeb3SigningCredentialNone } from "./model-type-guards"; -import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; -import { - GetPrometheusExporterMetricsEndpointV1, - IGetPrometheusExporterMetricsEndpointV1Options, -} from "./web-services/get-prometheus-exporter-metrics-endpoint-v1"; -import { DeployContractSolidityBytecodeJsonObjectEndpoint } from "./web-services/deploy-contract-solidity-bytecode-json-object-endpoint"; -import { InvokeContractJsonObjectEndpoint } from "./web-services/invoke-contract-json-object-endpoint"; -import { RuntimeError } from "run-time-error-cjs"; - -export const E_KEYCHAIN_NOT_FOUND = "cactus.connector.xdai.keychain_not_found"; - -export interface IPluginLedgerConnectorXdaiOptions - extends ICactusPluginOptions { - rpcApiHttpHost: string; - pluginRegistry: PluginRegistry; - prometheusExporter?: PrometheusExporter; - logLevel?: LogLevelDesc; -} - -export class PluginLedgerConnectorXdai - implements - IPluginLedgerConnector< - DeployContractV1Request, - DeployContractV1Response, - RunTransactionV1Request, - RunTransactionV1Response - >, - ICactusPlugin, - IPluginWebService -{ - private readonly instanceId: string; - public prometheusExporter: PrometheusExporter; - private readonly log: Logger; - private readonly web3: Web3; - private readonly pluginRegistry: PluginRegistry; - private contracts: { - [name: string]: Contract; - } = {}; - - private endpoints: IWebServiceEndpoint[] | undefined; - private httpServer: Server | SecureServer | null = null; - - public static readonly CLASS_NAME = "PluginLedgerConnectorXdai"; - - public get className(): string { - return PluginLedgerConnectorXdai.CLASS_NAME; - } - - constructor(public readonly options: IPluginLedgerConnectorXdaiOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.rpcApiHttpHost, `${fnTag} options.rpcApiHttpHost`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy(options.pluginRegistry, `${fnTag} options.pluginRegistry`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - const web3Provider = new Web3.providers.HttpProvider( - this.options.rpcApiHttpHost, - ); - this.web3 = new Web3(web3Provider); - this.instanceId = options.instanceId; - this.pluginRegistry = options.pluginRegistry; - this.prometheusExporter = - options.prometheusExporter || - new PrometheusExporter({ pollingIntervalInMin: 1 }); - Checks.truthy( - this.prometheusExporter, - `${fnTag} options.prometheusExporter`, - ); - - this.prometheusExporter.startMetricsCollection(); - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - public async hasTransactionFinality(): Promise { - const consensusAlgorithmFamily = await this.getConsensusAlgorithmFamily(); - return consensusHasTransactionFinality(consensusAlgorithmFamily); - } - - public getPrometheusExporter(): PrometheusExporter { - return this.prometheusExporter; - } - - public async getPrometheusExporterMetrics(): Promise { - const res: string = await this.prometheusExporter.getPrometheusMetrics(); - this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); - - return res; - } - - public getInstanceId(): string { - return this.instanceId; - } - - public async onPluginInit(): Promise { - return; - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new DeployContractSolidityBytecodeEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new DeployContractSolidityBytecodeJsonObjectEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new RunTransactionEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new InvokeContractEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const endpoint = new InvokeContractJsonObjectEndpoint({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - { - const opts: IGetPrometheusExporterMetricsEndpointV1Options = { - connector: this, - logLevel: this.options.logLevel, - }; - const endpoint = new GetPrometheusExporterMetricsEndpointV1(opts); - endpoints.push(endpoint); - } - this.endpoints = endpoints; - return endpoints; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-ledger-connector-xdai`; - } - - public async getConsensusAlgorithmFamily(): Promise { - return ConsensusAlgorithmFamily.Authority; - } - - /** - * Verifies that it is safe to call a specific method of a Web3 Contract. - * - * @param contract The Web3 Contract instance to check whether it has a method with a specific name or not. - * @param name The name of the method that will be checked if it's usable on `contract` or not. - * @returns Boolean `true` when it IS safe to call the method named `name` on the contract. - * @throws If the contract instance is falsy or it's methods object is falsy. Also throws if the method name is a blank string. - */ - public async isSafeToCallContractMethod( - contract: InstanceType, - name: string, - ): Promise { - Checks.truthy( - contract, - `${this.className}#isSafeToCallContractMethod():contract`, - ); - - Checks.truthy( - contract.methods, - `${this.className}#isSafeToCallContractMethod():contract.methods`, - ); - - Checks.nonBlankString( - name, - `${this.className}#isSafeToCallContractMethod():name`, - ); - - const { methods } = contract; - - return Object.prototype.hasOwnProperty.call(methods, name); - } - - async runInvoke(req: InvokeRequestBaseV1): Promise { - const fnTag = `${this.className}#runInvoke()`; - - const { contractAddress, contractJSON } = req; - - let abi; - if (contractJSON.abi) { - if (typeof contractJSON.abi === "string") { - abi = JSON.parse(contractJSON.abi); - } else { - abi = contractJSON.abi; - } - } else { - throw new Error(`${fnTag} Contract ABI is necessary`); - } - - const contractInstance: InstanceType = - new this.web3.eth.Contract(abi, contractAddress); - - const isSafeToCall = await this.isSafeToCallContractMethod( - contractInstance, - req.methodName, - ); - if (!isSafeToCall) { - throw new RuntimeError( - `Invalid method name provided in request. ${req.methodName} does not exist on the Web3 contract object's "methods" property.`, - ); - } - - const methodRef = contractInstance.methods[req.methodName]; - Checks.truthy(methodRef, `${fnTag} YourContract.${req.methodName}`); - - const method = methodRef(...req.params); - if (req.invocationType === EthContractInvocationType.Call) { - contractInstance.methods[req.methodName]; - const callOutput = await method.call(); - const success = true; - return { success, callOutput }; - } else if (req.invocationType === EthContractInvocationType.Send) { - if (isWeb3SigningCredentialNone(req.web3SigningCredential)) { - throw new Error(`${fnTag} Cannot deploy contract with pre-signed TX`); - } - const web3SigningCredential = req.web3SigningCredential as - | Web3SigningCredentialPrivateKeyHex - | Web3SigningCredentialCactusKeychainRef; - const payload = method.send.request(); - const { params } = payload; - const [transactionConfig] = params; - if (!req.gas) { - req.gas = await this.web3.eth.estimateGas(transactionConfig); - } - transactionConfig.from = web3SigningCredential.ethAccount; - transactionConfig.gas = req.gas; - transactionConfig.gasPrice = req.gasPrice; - transactionConfig.value = req.value; - transactionConfig.nonce = req.nonce; - - const txReq: RunTransactionV1Request = { - transactionConfig, - web3SigningCredential, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: req.timeoutMs || 60000, - }, - }; - - const out = await this.transact(txReq); - const success = out.transactionReceipt.status; - const data = { success, out }; - return data; - } else { - throw new Error( - `${fnTag} Unsupported invocation type ${req.invocationType}`, - ); - } - } - - public async invokeContract( - req: InvokeContractV1Request, - ): Promise { - const fnTag = `${this.className}#invokeContract()`; - const { contractName, keychainId } = req; - if (!contractName) { - throw new Error( - `${fnTag} Cannot recover the keychain plugin because the contractName is empty`, - ); - } - if (!keychainId) { - throw new Error(`${fnTag} Cannot invoke contract without keychainId`); - } - const keychainPlugin = this.pluginRegistry.findOneByKeychainId(keychainId); - if (!keychainPlugin.has(contractName)) { - throw new Error( - `${fnTag} Cannot invoke the contract because contractName is not in the keychainPlugin`, - ); - } - const contractStr = await keychainPlugin.get(contractName); - const contractJSON = JSON.parse(contractStr); - - // if not exists a contract deployed, we deploy it - const networkId = await this.web3.eth.net.getId(); - if ( - !contractJSON.networks || - !contractJSON.networks[networkId] || - !contractJSON.networks[networkId].address - ) { - if (isWeb3SigningCredentialNone(req.web3SigningCredential)) { - throw new Error(`${fnTag} Cannot deploy contract with pre-signed TX`); - } - - const deployBaseReq: DeployRequestBaseV1 = { - contractJSON, - web3SigningCredential: req.web3SigningCredential, - gas: req.gas, - gasPrice: req.gasPrice, - timeoutMs: req.timeoutMs, - }; - const receipt = await this.runDeploy(deployBaseReq); - - const address = { - address: receipt.transactionReceipt.contractAddress, - }; - const network = { [networkId]: address }; - contractJSON.networks = network; - keychainPlugin.set(req.contractName, JSON.stringify(contractJSON)); - } - - const invokeBaseReq: InvokeRequestBaseV1 = { - contractAddress: contractJSON.networks[networkId].address, - contractJSON, - web3SigningCredential: req.web3SigningCredential, - invocationType: req.invocationType, - methodName: req.methodName, - params: req.params, - value: req.value, - gas: req.gas, - gasPrice: req.gasPrice, - nonce: req.nonce, - timeoutMs: req.timeoutMs, - }; - return this.runInvoke(invokeBaseReq); - } - - public async invokeContractJsonObject( - req: InvokeContractJsonObjectV1Request, - ): Promise { - const fnTag = `${this.className}#invokeContractJsonObject()`; - const { contractJSON, contractAddress } = req; - if (!contractJSON) { - throw new Error(`${fnTag} The contractJson param is needed`); - } - if (!contractAddress) { - throw new Error(`${fnTag} The contractAddress param is needed`); - } - const invokeBaseReq: InvokeRequestBaseV1 = { - contractAddress: contractAddress, - contractJSON, - web3SigningCredential: req.web3SigningCredential, - invocationType: req.invocationType, - methodName: req.methodName, - params: req.params, - value: req.value, - gas: req.gas, - gasPrice: req.gasPrice, - nonce: req.nonce, - timeoutMs: req.timeoutMs, - }; - return this.runInvoke(invokeBaseReq); - } - - public async transact( - req: RunTransactionV1Request, - ): Promise { - const fnTag = `${this.className}#transact()`; - - switch (req.web3SigningCredential.type) { - // Web3SigningCredentialType.GETHKEYCHAINPASSWORD is removed as Hyperledger Xdai doesn't support the PERSONAL api - // for --rpc-http-api as per the discussion mentioned here - // https://chat.hyperledger.org/channel/xdai-contributors?msg=GqQXfW3k79ygRtx5Q - case Web3SigningCredentialType.CactusKeychainRef: { - return this.transactCactusKeychainRef(req); - } - case Web3SigningCredentialType.PrivateKeyHex: { - return this.transactPrivateKey(req); - } - case Web3SigningCredentialType.None: { - if (req.transactionConfig.rawTransaction) { - return this.transactSigned(req); - } else { - throw new Error( - `${fnTag} Expected pre-signed raw transaction ` + - ` since signing credential is specified as` + - `Web3SigningCredentialType.NONE`, - ); - } - } - default: { - throw new Error( - `${fnTag} Unrecognized Web3SigningCredentialType: ` + - `${req.web3SigningCredential.type} Supported ones are: ` + - `${Object.values(Web3SigningCredentialType).join(";")}`, - ); - } - } - } - - async transactSigned( - req: RunTransactionV1Request, - ): Promise { - const fnTag = `${this.className}#transactSigned()`; - - Checks.truthy(req.consistencyStrategy, `${fnTag}:req.consistencyStrategy`); - Checks.truthy( - req.transactionConfig.rawTransaction, - `${fnTag}:req.transactionConfig.rawTransaction`, - ); - const rawTx = req.transactionConfig.rawTransaction as string; - this.log.debug("Starting web3.eth.sendSignedTransaction(rawTransaction) "); - const txPoolReceipt = await this.web3.eth.sendSignedTransaction(rawTx); - this.log.debug("Received preliminary receipt from Xdai node."); - - if (txPoolReceipt instanceof Error) { - this.log.debug(`${fnTag} sendSignedTransaction failed`, txPoolReceipt); - throw txPoolReceipt; - } - this.prometheusExporter.addCurrentTransaction(); - - if ( - req.consistencyStrategy.receiptType === ReceiptType.NodeTxPoolAck && - req.consistencyStrategy.blockConfirmations > 0 - ) { - throw new Error( - `${fnTag} Conflicting parameters for consistency` + - ` strategy: Cannot wait for >0 block confirmations AND only wait ` + - ` for the tx pool ACK at the same time.`, - ); - } - - switch (req.consistencyStrategy.receiptType) { - case ReceiptType.NodeTxPoolAck: - return { transactionReceipt: txPoolReceipt }; - case ReceiptType.LedgerBlockAck: - this.log.debug("Starting poll for ledger TX receipt ..."); - const txHash = txPoolReceipt.transactionHash; - const { consistencyStrategy } = req; - const ledgerReceipt = await this.pollForTxReceipt( - txHash, - consistencyStrategy, - ); - this.log.debug( - "Finished poll for ledger TX receipt: %o", - ledgerReceipt, - ); - return { transactionReceipt: ledgerReceipt }; - default: - throw new Error( - `${fnTag} Unrecognized ReceiptType: ${req.consistencyStrategy.receiptType}`, - ); - } - } - - async transactPrivateKey( - req: RunTransactionV1Request, - ): Promise { - const fnTag = `${this.className}#transactPrivateKey()`; - const { transactionConfig, web3SigningCredential } = req; - const { secret } = - web3SigningCredential as Web3SigningCredentialPrivateKeyHex; - - const signedTx = await this.web3.eth.accounts.signTransaction( - transactionConfig, - secret, - ); - - if (signedTx.rawTransaction) { - req.transactionConfig.rawTransaction = signedTx.rawTransaction; - return this.transactSigned(req); - } else { - throw new Error( - `${fnTag} Failed to sign eth transaction. ` + - `signedTransaction.rawTransaction is blank after .signTransaction().`, - ); - } - } - - async transactCactusKeychainRef( - req: RunTransactionV1Request, - ): Promise { - const fnTag = `${this.className}#transactCactusKeychainRef()`; - const { transactionConfig, web3SigningCredential } = req; - const { ethAccount, keychainEntryKey, keychainId } = - web3SigningCredential as Web3SigningCredentialCactusKeychainRef; - - // locate the keychain plugin that has access to the keychain backend - // denoted by the keychainID from the request. - const keychainPlugin = this.pluginRegistry.findOneByKeychainId(keychainId); - - Checks.truthy(keychainPlugin, `${fnTag} keychain for ID:"${keychainId}"`); - - // Now use the found keychain plugin to actually perform the lookup of - // the private key that we need to run the transaction. - const privateKeyHex = await keychainPlugin.get(keychainEntryKey); - - return this.transactPrivateKey({ - transactionConfig, - web3SigningCredential: { - ethAccount, - type: Web3SigningCredentialType.PrivateKeyHex, - secret: privateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - } - - async pollForTxReceipt( - txHash: string, - consistencyStrategy: ConsistencyStrategy, - ): Promise { - const fnTag = `${this.className}#pollForTxReceipt()`; - if (consistencyStrategy.receiptType === ReceiptType.NodeTxPoolAck) { - consistencyStrategy.blockConfirmations = 0; - } - let txReceipt; - let timedOut = false; - let tries = 0; - let confirmationCount = 0; - const timeoutMs = consistencyStrategy.timeoutMs || Number.MAX_SAFE_INTEGER; - const startedAt = new Date(); - - do { - tries++; - timedOut = Date.now() >= startedAt.getTime() + timeoutMs; - if (timedOut) { - break; - } - - await new Promise((resolve) => - setTimeout(resolve, consistencyStrategy.pollIntervalMs), - ); - - txReceipt = await this.web3.eth.getTransactionReceipt(txHash); - if (!txReceipt) { - continue; - } - - const latestBlockNo = await this.web3.eth.getBlockNumber(); - confirmationCount = latestBlockNo - txReceipt.blockNumber; - } while (confirmationCount < consistencyStrategy.blockConfirmations); - - if (!txReceipt) { - throw new Error(`${fnTag} Timed out ${timeoutMs}ms, polls=${tries}`); - } - return txReceipt; - } - - private async generateBytecode(req: DeployRequestBaseV1): Promise { - const tmpContract = new this.web3.eth.Contract(req.contractJSON.abi); - const deployment = tmpContract.deploy({ - data: req.contractJSON.bytecode, - arguments: req.constructorArgs, - }); - const abi = deployment.encodeABI(); - return abi.startsWith("0x") ? abi : `0x${abi}`; - } - - async runDeploy(req: DeployRequestBaseV1): Promise { - const web3SigningCredential = req.web3SigningCredential as - | Web3SigningCredentialPrivateKeyHex - | Web3SigningCredentialCactusKeychainRef; - const receipt = await this.transact({ - transactionConfig: { - data: await this.generateBytecode(req), - from: web3SigningCredential.ethAccount, - gas: req.gas, - gasPrice: req.gasPrice, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: req.timeoutMs || 60000, - }, - web3SigningCredential, - }); - return receipt; - } - - public async deployContract( - req: DeployContractV1Request, - ): Promise { - const fnTag = `${this.className}#deployContractKeychain()`; - Checks.truthy(req, `${fnTag} req`); - - if (isWeb3SigningCredentialNone(req.web3SigningCredential)) { - throw new Error(`${fnTag} Cannot deploy contract with pre-signed TX`); - } - - const { contractName, keychainId } = req; - if (!keychainId || !contractName) { - throw new Error( - `${fnTag} Cannot deploy contract without keychainId and the contractName`, - ); - } - - const keychainPlugin = this.pluginRegistry.findOneByKeychainId(keychainId); - Checks.truthy(keychainPlugin, `${fnTag} keychain for ID:"${keychainId}"`); - if (!keychainPlugin.has(contractName)) { - throw new Error( - `${fnTag} Cannot create an instance of the contract because the contractName sent and the contractName of the JSON doesn't match`, - ); - } - - // obtain the contractJSON from keychainPlugin - const contractStr = await keychainPlugin.get(req.contractName); - const contractJSON = JSON.parse(contractStr); - - // deploy the contract - const deployBaseReq: DeployRequestBaseV1 = { - contractJSON, - web3SigningCredential: req.web3SigningCredential, - gas: req.gas, - gasPrice: req.gasPrice, - timeoutMs: req.timeoutMs, - constructorArgs: req.constructorArgs, - }; - const receipt = await this.runDeploy(deployBaseReq); - - // save the contract address in the keychainPlugin - if ( - receipt.transactionReceipt.status && - receipt.transactionReceipt.contractAddress && - receipt.transactionReceipt.contractAddress != null - ) { - const networkId = await this.web3.eth.net.getId(); - const address = { address: receipt.transactionReceipt.contractAddress }; - const network = { [networkId]: address }; - contractJSON.networks = network; - keychainPlugin.set(req.contractName, JSON.stringify(contractJSON)); - } - - return receipt; - } - - public async deployContractJsonObject( - req: DeployContractJsonObjectV1Request, - ): Promise { - const fnTag = `${this.className}#deployContractJsonObject()`; - if ( - !req.contractJSON || - !req.contractJSON.bytecode || - !req.web3SigningCredential - ) { - throw new Error( - `${fnTag} Cannot deploy contract without contractJSON, bytecode or web3SigningCredential`, - ); - } - - const deployBaseReq: DeployRequestBaseV1 = { - contractJSON: req.contractJSON, - web3SigningCredential: req.web3SigningCredential, - gas: req.gas, - gasPrice: req.gasPrice, - timeoutMs: req.timeoutMs, - constructorArgs: req.constructorArgs, - }; - return this.runDeploy(deployBaseReq); - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/data-fetcher.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/data-fetcher.ts deleted file mode 100644 index eb9439e6cd..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/data-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Transactions } from "./response.type"; - -import { totalTxCount, K_CACTUS_XDAI_TOTAL_TX_COUNT } from "./metrics"; - -export async function collectMetrics( - transactions: Transactions, -): Promise { - transactions.counter++; - totalTxCount.labels(K_CACTUS_XDAI_TOTAL_TX_COUNT).set(transactions.counter); -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/metrics.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/metrics.ts deleted file mode 100644 index 4fe5181e4a..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/metrics.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Gauge } from "prom-client"; - -export const K_CACTUS_XDAI_TOTAL_TX_COUNT = "cactus_xdai_total_tx_count"; - -export const totalTxCount = new Gauge({ - registers: [], - name: "cactus_xdai_total_tx_count", - help: "Total transactions executed", - labelNames: ["type"], -}); diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/prometheus-exporter.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/prometheus-exporter.ts deleted file mode 100644 index b0b741c795..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/prometheus-exporter.ts +++ /dev/null @@ -1,39 +0,0 @@ -import promClient, { Registry } from "prom-client"; -import { Transactions } from "./response.type"; -import { collectMetrics } from "./data-fetcher"; -import { K_CACTUS_XDAI_TOTAL_TX_COUNT } from "./metrics"; -import { totalTxCount } from "./metrics"; - -export interface IPrometheusExporterOptions { - pollingIntervalInMin?: number; -} - -export class PrometheusExporter { - public readonly metricsPollingIntervalInMin: number; - public readonly transactions: Transactions = { counter: 0 }; - public readonly registry: Registry; - - constructor( - public readonly prometheusExporterOptions: IPrometheusExporterOptions, - ) { - this.metricsPollingIntervalInMin = - prometheusExporterOptions.pollingIntervalInMin || 1; - this.registry = new Registry(); - } - - public addCurrentTransaction(): void { - collectMetrics(this.transactions); - } - - public async getPrometheusMetrics(): Promise { - const result = await this.registry.getSingleMetricAsString( - K_CACTUS_XDAI_TOTAL_TX_COUNT, - ); - return result; - } - - public startMetricsCollection(): void { - this.registry.registerMetric(totalTxCount); - promClient.collectDefaultMetrics({ register: this.registry }); - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/response.type.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/response.type.ts deleted file mode 100644 index 3f1bc7f491..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/prometheus-exporter/response.type.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type Transactions = { - counter: number; -}; diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/public-api.ts deleted file mode 100755 index fc480bfa66..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/public-api.ts +++ /dev/null @@ -1,17 +0,0 @@ -export { - E_KEYCHAIN_NOT_FOUND, - IPluginLedgerConnectorXdaiOptions, - PluginLedgerConnectorXdai, -} from "./plugin-ledger-connector-xdai"; -export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; - -export * from "./generated/openapi/typescript-axios/index"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerConnector(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/deploy-contract-solidity-bytecode-endpoint.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/deploy-contract-solidity-bytecode-endpoint.ts deleted file mode 100644 index 5cd0956c5c..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/deploy-contract-solidity-bytecode-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorXdai } from "../plugin-ledger-connector-xdai"; -import { DeployContractV1Request } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; - -export interface IDeployContractSolidityBytecodeOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorXdai; -} - -export class DeployContractSolidityBytecodeEndpoint - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "DeployContractSolidityBytecodeEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeployContractSolidityBytecodeEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IDeployContractSolidityBytecodeOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody: DeployContractV1Request = req.body; - try { - const resBody = await this.options.connector.deployContract(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/deploy-contract-solidity-bytecode-json-object-endpoint.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/deploy-contract-solidity-bytecode-json-object-endpoint.ts deleted file mode 100644 index b24a370958..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/deploy-contract-solidity-bytecode-json-object-endpoint.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorXdai } from "../plugin-ledger-connector-xdai"; -import { DeployContractJsonObjectV1Request } from "../generated/openapi/typescript-axios"; -import OAS from "../../json/openapi.json"; - -export interface IDeployContractSolidityBytecodeJsonObjectOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorXdai; -} - -export class DeployContractSolidityBytecodeJsonObjectEndpoint - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = - "DeployContractSolidityBytecodeJsonObjectEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return DeployContractSolidityBytecodeJsonObjectEndpoint.CLASS_NAME; - } - - constructor( - public readonly options: IDeployContractSolidityBytecodeJsonObjectOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/deploy-contract-solidity-bytecode-json-object" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody: DeployContractJsonObjectV1Request = req.body; - try { - const resBody = - await this.options.connector.deployContractJsonObject(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts deleted file mode 100644 index a94728bfb4..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/get-prometheus-exporter-metrics-endpoint-v1.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import OAS from "../../json/openapi.json"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Checks, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { PluginLedgerConnectorXdai } from "../plugin-ledger-connector-xdai"; - -export interface IGetPrometheusExporterMetricsEndpointV1Options { - connector: PluginLedgerConnectorXdai; - logLevel?: LogLevelDesc; -} - -export class GetPrometheusExporterMetricsEndpointV1 - implements IWebServiceEndpoint -{ - private readonly log: Logger; - - constructor( - public readonly options: IGetPrometheusExporterMetricsEndpointV1Options, - ) { - const fnTag = "GetPrometheusExporterMetricsEndpointV1#constructor()"; - - Checks.truthy(options, `${fnTag} options`); - Checks.truthy(options.connector, `${fnTag} options.connector`); - - const label = "get-prometheus-exporter-metrics-endpoint"; - const level = options.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ label, level }); - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/get-prometheus-exporter-metrics" - ]; - } - - public getPath(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.get.operationId; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - async handleRequest(req: Request, res: Response): Promise { - const fnTag = "GetPrometheusExporterMetrics#handleRequest()"; - const verbUpper = this.getVerbLowerCase().toUpperCase(); - this.log.debug(`${verbUpper} ${this.getPath()}`); - - try { - const resBody = - await this.options.connector.getPrometheusExporterMetrics(); - res.status(200); - res.send(resBody); - } catch (ex) { - this.log.error(`${fnTag} failed to serve request`, ex); - res.status(500); - res.statusMessage = ex.message; - res.json({ error: ex.stack }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/invoke-contract-endpoint.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/invoke-contract-endpoint.ts deleted file mode 100644 index f55db0d59c..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/invoke-contract-endpoint.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorXdai } from "../plugin-ledger-connector-xdai"; - -import OAS from "../../json/openapi.json"; - -export interface IInvokeContractEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorXdai; -} - -export class InvokeContractEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InvokeContractEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return InvokeContractEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IInvokeContractEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.invokeContract(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/invoke-contract-json-object-endpoint.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/invoke-contract-json-object-endpoint.ts deleted file mode 100644 index 746941353d..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/invoke-contract-json-object-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorXdai } from "../plugin-ledger-connector-xdai"; - -import OAS from "../../json/openapi.json"; -import { InvokeContractJsonObjectV1Request } from "../generated/openapi/typescript-axios"; - -export interface IInvokeContractJsonObjectEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorXdai; -} - -export class InvokeContractJsonObjectEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "InvokeContractJsonObjectEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return InvokeContractJsonObjectEndpoint.CLASS_NAME; - } - - constructor( - public readonly options: IInvokeContractJsonObjectEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/invoke-contract-json-object" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody: InvokeContractJsonObjectV1Request = req.body; - try { - const resBody = - await this.options.connector.invokeContractJsonObject(reqBody); - res.json(resBody); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/run-transaction-endpoint.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/run-transaction-endpoint.ts deleted file mode 100644 index a0b200d3a0..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/web-services/run-transaction-endpoint.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Express, Request, Response } from "express"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginLedgerConnectorXdai } from "../plugin-ledger-connector-xdai"; - -import OAS from "../../json/openapi.json"; - -export interface IRunTransactionEndpointOptions { - logLevel?: LogLevelDesc; - connector: PluginLedgerConnectorXdai; -} - -export class RunTransactionEndpoint implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RunTransactionEndpoint"; - - private readonly log: Logger; - - public get className(): string { - return RunTransactionEndpoint.CLASS_NAME; - } - - constructor(public readonly options: IRunTransactionEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction"] { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-xdai/run-transaction" - ]; - } - - public getPath(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.oasPath.post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - const reqBody = req.body; - try { - const resBody = await this.options.connector.transact(reqBody); - res.json({ success: true, data: resBody }); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/solidity/hello-world-contract/HelloWorld.json b/packages/cactus-plugin-ledger-connector-xdai/src/test/solidity/hello-world-contract/HelloWorld.json deleted file mode 100644 index 286294b996..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/solidity/hello-world-contract/HelloWorld.json +++ /dev/null @@ -1,5619 +0,0 @@ -{ - "contractName": "HelloWorld", - "abi": [ - { - "inputs": [], - "name": "sayHello", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getName", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getNameByIndex", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "setName", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getNameByIndex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sayHello\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol\":\"HelloWorld\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol\":{\"keccak256\":\"0x1e97027d32e8c3433b793d7b2b45e30ea2d341c96a3943508ba068dea106efab\",\"urls\":[\"bzz-raw://96e37a0bb119b1fe14a4e71627c077b180f4deb9acc4284aa987a3ca1a6f45b1\",\"dweb:/ipfs/QmTAiGsxb38hMgDgbrtLLdYxc76CposiN9moBuJXAg2Mgk\"]}},\"version\":1}", - "bytecode": "60806040526040518060400160405280600d81526020017f4361707461696e436163747573000000000000000000000000000000000000008152506000908051906020019061004f929190610062565b5034801561005c57600080fd5b50610166565b82805461006e90610105565b90600052602060002090601f01602090048101928261009057600085556100d7565b82601f106100a957805160ff19168380011785556100d7565b828001600101855582156100d7579182015b828111156100d65782518255916020019190600101906100bb565b5b5090506100e491906100e8565b5090565b5b808211156101015760008160009055506001016100e9565b5090565b6000600282049050600182168061011d57607f821691505b6020821081141561013157610130610137565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b61082c806101756000396000f3fe60806040526004361061004a5760003560e01c806317d7de7c1461004f57806359c293f11461007a578063c47f0027146100b7578063d0e30db0146100e0578063ef5fb05b146100ea575b600080fd5b34801561005b57600080fd5b50610064610115565b60405161007191906105ae565b60405180910390f35b34801561008657600080fd5b506100a1600480360381019061009c919061050c565b6101a7565b6040516100ae91906105ae565b60405180910390f35b3480156100c357600080fd5b506100de60048036038101906100d991906104cb565b61027d565b005b6100e86102d3565b005b3480156100f657600080fd5b506100ff61036e565b60405161010c91906105ae565b60405180910390f35b6060600080546101249061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546101509061070f565b801561019d5780601f106101725761010080835404028352916020019161019d565b820191906000526020600020905b81548152906001019060200180831161018057829003601f168201915b5050505050905090565b6060600282815481106101e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180546101f89061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546102249061070f565b80156102715780601f1061024657610100808354040283529160200191610271565b820191906000526020600020905b81548152906001019060200180831161025457829003601f168201915b50505050509050919050565b80600090805190602001906102939291906103ab565b506002819080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906102cf9291906103ab565b5050565b60003411610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d906105d0565b60405180910390fd5b34600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610365919061066d565b92505081905550565b60606040518060400160405280600c81526020017f48656c6c6f20576f726c64210000000000000000000000000000000000000000815250905090565b8280546103b79061070f565b90600052602060002090601f0160209004810192826103d95760008555610420565b82601f106103f257805160ff1916838001178555610420565b82800160010185558215610420579182015b8281111561041f578251825591602001919060010190610404565b5b50905061042d9190610431565b5090565b5b8082111561044a576000816000905550600101610432565b5090565b600061046161045c84610621565b6105f0565b90508281526020810184848401111561047957600080fd5b6104848482856106cd565b509392505050565b600082601f83011261049d57600080fd5b81356104ad84826020860161044e565b91505092915050565b6000813590506104c5816107df565b92915050565b6000602082840312156104dd57600080fd5b600082013567ffffffffffffffff8111156104f757600080fd5b6105038482850161048c565b91505092915050565b60006020828403121561051e57600080fd5b600061052c848285016104b6565b91505092915050565b600061054082610651565b61054a818561065c565b935061055a8185602086016106dc565b610563816107ce565b840191505092915050565b600061057b601b8361065c565b91507f56616c7565206d757374206265206469666572656e74206f66203000000000006000830152602082019050919050565b600060208201905081810360008301526105c88184610535565b905092915050565b600060208201905081810360008301526105e98161056e565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156106175761061661079f565b5b8060405250919050565b600067ffffffffffffffff82111561063c5761063b61079f565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610678826106c3565b9150610683836106c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106b8576106b7610741565b5b828201905092915050565b6000819050919050565b82818337600083830152505050565b60005b838110156106fa5780820151818401526020810190506106df565b83811115610709576000848401525b50505050565b6000600282049050600182168061072757607f821691505b6020821081141561073b5761073a610770565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6107e8816106c3565b81146107f357600080fd5b5056fea2646970667358221220450aa5d16069485df7d037ffe43b6593e232f4ac514d9169ba271384cc5d841964736f6c63430008000033", - "deployedBytecode": "60806040526004361061004a5760003560e01c806317d7de7c1461004f57806359c293f11461007a578063c47f0027146100b7578063d0e30db0146100e0578063ef5fb05b146100ea575b600080fd5b34801561005b57600080fd5b50610064610115565b60405161007191906105ae565b60405180910390f35b34801561008657600080fd5b506100a1600480360381019061009c919061050c565b6101a7565b6040516100ae91906105ae565b60405180910390f35b3480156100c357600080fd5b506100de60048036038101906100d991906104cb565b61027d565b005b6100e86102d3565b005b3480156100f657600080fd5b506100ff61036e565b60405161010c91906105ae565b60405180910390f35b6060600080546101249061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546101509061070f565b801561019d5780601f106101725761010080835404028352916020019161019d565b820191906000526020600020905b81548152906001019060200180831161018057829003601f168201915b5050505050905090565b6060600282815481106101e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180546101f89061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546102249061070f565b80156102715780601f1061024657610100808354040283529160200191610271565b820191906000526020600020905b81548152906001019060200180831161025457829003601f168201915b50505050509050919050565b80600090805190602001906102939291906103ab565b506002819080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906102cf9291906103ab565b5050565b60003411610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d906105d0565b60405180910390fd5b34600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610365919061066d565b92505081905550565b60606040518060400160405280600c81526020017f48656c6c6f20576f726c64210000000000000000000000000000000000000000815250905090565b8280546103b79061070f565b90600052602060002090601f0160209004810192826103d95760008555610420565b82601f106103f257805160ff1916838001178555610420565b82800160010185558215610420579182015b8281111561041f578251825591602001919060010190610404565b5b50905061042d9190610431565b5090565b5b8082111561044a576000816000905550600101610432565b5090565b600061046161045c84610621565b6105f0565b90508281526020810184848401111561047957600080fd5b6104848482856106cd565b509392505050565b600082601f83011261049d57600080fd5b81356104ad84826020860161044e565b91505092915050565b6000813590506104c5816107df565b92915050565b6000602082840312156104dd57600080fd5b600082013567ffffffffffffffff8111156104f757600080fd5b6105038482850161048c565b91505092915050565b60006020828403121561051e57600080fd5b600061052c848285016104b6565b91505092915050565b600061054082610651565b61054a818561065c565b935061055a8185602086016106dc565b610563816107ce565b840191505092915050565b600061057b601b8361065c565b91507f56616c7565206d757374206265206469666572656e74206f66203000000000006000830152602082019050919050565b600060208201905081810360008301526105c88184610535565b905092915050565b600060208201905081810360008301526105e98161056e565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156106175761061661079f565b5b8060405250919050565b600067ffffffffffffffff82111561063c5761063b61079f565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610678826106c3565b9150610683836106c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106b8576106b7610741565b5b828201905092915050565b6000819050919050565b82818337600083830152505050565b60005b838110156106fa5780820151818401526020810190506106df565b83811115610709576000848401525b50505050565b6000600282049050600182168061072757607f821691505b6020821081141561073b5761073a610770565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6107e8816106c3565b81146107f357600080fd5b5056fea2646970667358221220450aa5d16069485df7d037ffe43b6593e232f4ac514d9169ba271384cc5d841964736f6c63430008000033", - "immutableReferences": {}, - "generatedSources": [ - { - "ast": { - "nodeType": "YulBlock", - "src": "0:516:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "58:269:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "68:22:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "82:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "88:1:2", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "78:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "78:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "68:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "99:38:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "129:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "135:1:2", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "125:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "125:12:2" - }, - "variables": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulTypedName", - "src": "103:18:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "176:51:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "190:27:2", - "value": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "204:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "212:4:2", - "type": "", - "value": "0x7f" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "200:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "200:17:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "190:6:2" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "156:18:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "149:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "149:26:2" - }, - "nodeType": "YulIf", - "src": "146:2:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "279:42:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x22", - "nodeType": "YulIdentifier", - "src": "293:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "293:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "293:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "243:18:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "266:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "274:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "263:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "263:14:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "240:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "240:38:2" - }, - "nodeType": "YulIf", - "src": "237:2:2" - } - ] - }, - "name": "extract_byte_array_length", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "data", - "nodeType": "YulTypedName", - "src": "42:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "51:6:2", - "type": "" - } - ], - "src": "7:320:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "361:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "378:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "381:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "371:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "371:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "371:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "475:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "478:4:2", - "type": "", - "value": "0x22" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "468:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "468:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "468:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "499:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "502:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "492:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "492:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "492:15:2" - } - ] - }, - "name": "panic_error_0x22", - "nodeType": "YulFunctionDefinition", - "src": "333:180:2" - } - ] - }, - "contents": "{\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n}\n", - "id": 2, - "language": "Yul", - "name": "#utility.yul" - } - ], - "deployedGeneratedSources": [ - { - "ast": { - "nodeType": "YulBlock", - "src": "0:5780:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "91:260:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "101:74:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "167:6:2" - } - ], - "functionName": { - "name": "array_allocation_size_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "125:41:2" - }, - "nodeType": "YulFunctionCall", - "src": "125:49:2" - } - ], - "functionName": { - "name": "allocateMemory", - "nodeType": "YulIdentifier", - "src": "110:14:2" - }, - "nodeType": "YulFunctionCall", - "src": "110:65:2" - }, - "variableNames": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "101:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "191:5:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "198:6:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "184:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "184:21:2" - }, - "nodeType": "YulExpressionStatement", - "src": "184:21:2" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "214:27:2", - "value": { - "arguments": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "229:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "236:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "225:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "225:16:2" - }, - "variables": [ - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "218:3:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "279:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "288:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "291:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "281:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "281:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "281:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "260:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "265:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "256:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "256:16:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "274:3:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "253:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "253:25:2" - }, - "nodeType": "YulIf", - "src": "250:2:2" - }, - { - "expression": { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "328:3:2" - }, - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "333:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "338:6:2" - } - ], - "functionName": { - "name": "copy_calldata_to_memory", - "nodeType": "YulIdentifier", - "src": "304:23:2" - }, - "nodeType": "YulFunctionCall", - "src": "304:41:2" - }, - "nodeType": "YulExpressionStatement", - "src": "304:41:2" - } - ] - }, - "name": "abi_decode_available_length_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "64:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "69:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "77:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "array", - "nodeType": "YulTypedName", - "src": "85:5:2", - "type": "" - } - ], - "src": "7:344:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "433:211:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "482:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "491:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "494:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "484:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "484:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "484:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "461:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "469:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "457:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "457:17:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "476:3:2" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "453:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "453:27:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "446:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "446:35:2" - }, - "nodeType": "YulIf", - "src": "443:2:2" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "507:34:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "534:6:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "521:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "521:20:2" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "511:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "550:88:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "611:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "619:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "607:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "607:17:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "626:6:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "634:3:2" - } - ], - "functionName": { - "name": "abi_decode_available_length_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "559:47:2" - }, - "nodeType": "YulFunctionCall", - "src": "559:79:2" - }, - "variableNames": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "550:5:2" - } - ] - } - ] - }, - "name": "abi_decode_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "411:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "419:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "array", - "nodeType": "YulTypedName", - "src": "427:5:2", - "type": "" - } - ], - "src": "371:273:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "702:87:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "712:29:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "734:6:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "721:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "721:20:2" - }, - "variableNames": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "712:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "777:5:2" - } - ], - "functionName": { - "name": "validator_revert_t_uint256", - "nodeType": "YulIdentifier", - "src": "750:26:2" - }, - "nodeType": "YulFunctionCall", - "src": "750:33:2" - }, - "nodeType": "YulExpressionStatement", - "src": "750:33:2" - } - ] - }, - "name": "abi_decode_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "680:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "688:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "696:5:2", - "type": "" - } - ], - "src": "650:139:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "871:299:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "917:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "926:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "929:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "919:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "919:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "919:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "892:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "901:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "888:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "888:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "913:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "884:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "884:32:2" - }, - "nodeType": "YulIf", - "src": "881:2:2" - }, - { - "nodeType": "YulBlock", - "src": "943:220:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "958:45:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "989:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1000:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "985:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "985:17:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "972:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "972:31:2" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "962:6:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1050:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1059:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1062:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1052:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1052:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1052:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1022:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1030:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "1019:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "1019:30:2" - }, - "nodeType": "YulIf", - "src": "1016:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "1080:73:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1125:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1136:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1121:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1121:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1145:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "1090:30:2" - }, - "nodeType": "YulFunctionCall", - "src": "1090:63:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1080:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "841:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "852:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "864:6:2", - "type": "" - } - ], - "src": "795:375:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1242:196:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "1288:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1297:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1300:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1290:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1290:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1290:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1263:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1272:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "1259:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1259:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1284:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "1255:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1255:32:2" - }, - "nodeType": "YulIf", - "src": "1252:2:2" - }, - { - "nodeType": "YulBlock", - "src": "1314:117:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1329:15:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1343:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1333:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1358:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1393:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1404:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1389:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1389:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1413:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_uint256", - "nodeType": "YulIdentifier", - "src": "1368:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "1368:53:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1358:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "1212:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "1223:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "1235:6:2", - "type": "" - } - ], - "src": "1176:262:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1536:272:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1546:53:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "1593:5:2" - } - ], - "functionName": { - "name": "array_length_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "1560:32:2" - }, - "nodeType": "YulFunctionCall", - "src": "1560:39:2" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "1550:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1608:78:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1674:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1679:6:2" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "1615:58:2" - }, - "nodeType": "YulFunctionCall", - "src": "1615:71:2" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1608:3:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "1721:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1728:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1717:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1717:16:2" - }, - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1735:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1740:6:2" - } - ], - "functionName": { - "name": "copy_memory_to_memory", - "nodeType": "YulIdentifier", - "src": "1695:21:2" - }, - "nodeType": "YulFunctionCall", - "src": "1695:52:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1695:52:2" - }, - { - "nodeType": "YulAssignment", - "src": "1756:46:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1767:3:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1794:6:2" - } - ], - "functionName": { - "name": "round_up_to_mul_of_32", - "nodeType": "YulIdentifier", - "src": "1772:21:2" - }, - "nodeType": "YulFunctionCall", - "src": "1772:29:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1763:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1763:39:2" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "1756:3:2" - } - ] - } - ] - }, - "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "1517:5:2", - "type": "" - }, - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "1524:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "1532:3:2", - "type": "" - } - ], - "src": "1444:364:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1960:179:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1970:74:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2036:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2041:2:2", - "type": "", - "value": "27" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "1977:58:2" - }, - "nodeType": "YulFunctionCall", - "src": "1977:67:2" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1970:3:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2065:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2070:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2061:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2061:11:2" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "2074:29:2", - "type": "", - "value": "Value must be diferent of 0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2054:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2054:50:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2054:50:2" - }, - { - "nodeType": "YulAssignment", - "src": "2114:19:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2125:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2130:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2121:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2121:12:2" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "2114:3:2" - } - ] - } - ] - }, - "name": "abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "1948:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "1956:3:2", - "type": "" - } - ], - "src": "1814:325:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2263:195:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2273:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2285:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2296:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2281:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2281:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2273:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2320:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2331:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2316:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2316:17:2" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2339:4:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2345:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "2335:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2335:20:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2309:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2309:47:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2309:47:2" - }, - { - "nodeType": "YulAssignment", - "src": "2365:86:2", - "value": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "2437:6:2" - }, - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2446:4:2" - } - ], - "functionName": { - "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2373:63:2" - }, - "nodeType": "YulFunctionCall", - "src": "2373:78:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2365:4:2" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "2235:9:2", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "2247:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "2258:4:2", - "type": "" - } - ], - "src": "2145:313:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2635:248:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2645:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2657:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2668:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2653:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2653:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2645:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2692:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2703:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2688:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2688:17:2" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2711:4:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2717:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "2707:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2707:20:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2681:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2681:47:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2681:47:2" - }, - { - "nodeType": "YulAssignment", - "src": "2737:139:2", - "value": { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2871:4:2" - } - ], - "functionName": { - "name": "abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2745:124:2" - }, - "nodeType": "YulFunctionCall", - "src": "2745:131:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2737:4:2" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "2615:9:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "2630:4:2", - "type": "" - } - ], - "src": "2464:419:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2929:243:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2939:19:2", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2955:2:2", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "2949:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "2949:9:2" - }, - "variableNames": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "2939:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "2967:35:2", - "value": { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "2989:6:2" - }, - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "2997:4:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2985:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2985:17:2" - }, - "variables": [ - { - "name": "newFreePtr", - "nodeType": "YulTypedName", - "src": "2971:10:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3113:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x41", - "nodeType": "YulIdentifier", - "src": "3115:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "3115:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3115:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "3056:10:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3068:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "3053:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3053:34:2" - }, - { - "arguments": [ - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "3092:10:2" - }, - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "3104:6:2" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "3089:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3089:22:2" - } - ], - "functionName": { - "name": "or", - "nodeType": "YulIdentifier", - "src": "3050:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3050:62:2" - }, - "nodeType": "YulIf", - "src": "3047:2:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3151:2:2", - "type": "", - "value": "64" - }, - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "3155:10:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3144:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3144:22:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3144:22:2" - } - ] - }, - "name": "allocateMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "size", - "nodeType": "YulTypedName", - "src": "2913:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "memPtr", - "nodeType": "YulTypedName", - "src": "2922:6:2", - "type": "" - } - ], - "src": "2889:283:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3245:265:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "3350:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x41", - "nodeType": "YulIdentifier", - "src": "3352:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "3352:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3352:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3322:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3330:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "3319:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3319:30:2" - }, - "nodeType": "YulIf", - "src": "3316:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "3402:41:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3418:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3426:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3414:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3414:17:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3437:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "3433:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3433:9:2" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "3410:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3410:33:2" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "3402:4:2" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "3480:23:2", - "value": { - "arguments": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "3492:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3498:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3488:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3488:15:2" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "3480:4:2" - } - ] - } - ] - }, - "name": "array_allocation_size_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3229:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "size", - "nodeType": "YulTypedName", - "src": "3240:4:2", - "type": "" - } - ], - "src": "3178:332:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3575:40:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3586:22:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3602:5:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "3596:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "3596:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3586:6:2" - } - ] - } - ] - }, - "name": "array_length_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "3558:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3568:6:2", - "type": "" - } - ], - "src": "3516:99:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3717:73:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3734:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3739:6:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3727:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3727:19:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3727:19:2" - }, - { - "nodeType": "YulAssignment", - "src": "3755:29:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3774:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3779:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3770:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3770:14:2" - }, - "variableNames": [ - { - "name": "updated_pos", - "nodeType": "YulIdentifier", - "src": "3755:11:2" - } - ] - } - ] - }, - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "3689:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3694:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "updated_pos", - "nodeType": "YulTypedName", - "src": "3705:11:2", - "type": "" - } - ], - "src": "3621:169:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3840:261:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3850:25:2", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "3873:1:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "3855:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "3855:20:2" - }, - "variableNames": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "3850:1:2" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "3884:25:2", - "value": { - "arguments": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "3907:1:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "3889:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "3889:20:2" - }, - "variableNames": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "3884:1:2" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4047:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x11", - "nodeType": "YulIdentifier", - "src": "4049:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "4049:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4049:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "3968:1:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3975:66:2", - "type": "", - "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "4043:1:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "3971:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3971:74:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "3965:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3965:81:2" - }, - "nodeType": "YulIf", - "src": "3962:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "4079:16:2", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "4090:1:2" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "4093:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4086:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4086:9:2" - }, - "variableNames": [ - { - "name": "sum", - "nodeType": "YulIdentifier", - "src": "4079:3:2" - } - ] - } - ] - }, - "name": "checked_add_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "x", - "nodeType": "YulTypedName", - "src": "3827:1:2", - "type": "" - }, - { - "name": "y", - "nodeType": "YulTypedName", - "src": "3830:1:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "sum", - "nodeType": "YulTypedName", - "src": "3836:3:2", - "type": "" - } - ], - "src": "3796:305:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4152:32:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4162:16:2", - "value": { - "name": "value", - "nodeType": "YulIdentifier", - "src": "4173:5:2" - }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "4162:7:2" - } - ] - } - ] - }, - "name": "cleanup_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "4134:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "4144:7:2", - "type": "" - } - ], - "src": "4107:77:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4241:103:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4264:3:2" - }, - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "4269:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4274:6:2" - } - ], - "functionName": { - "name": "calldatacopy", - "nodeType": "YulIdentifier", - "src": "4251:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "4251:30:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4251:30:2" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4322:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4327:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4318:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4318:16:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4336:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4311:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4311:27:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4311:27:2" - } - ] - }, - "name": "copy_calldata_to_memory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "4223:3:2", - "type": "" - }, - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "4228:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "4233:6:2", - "type": "" - } - ], - "src": "4190:154:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4399:258:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "4409:10:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4418:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "i", - "nodeType": "YulTypedName", - "src": "4413:1:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4478:63:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4503:3:2" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4508:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4499:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4499:11:2" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "4522:3:2" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4527:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4518:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4518:11:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "4512:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "4512:18:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4492:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4492:39:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4492:39:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4439:1:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4442:6:2" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "4436:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4436:13:2" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "4450:19:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4452:15:2", - "value": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4461:1:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4464:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4457:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4457:10:2" - }, - "variableNames": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4452:1:2" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "4432:3:2", - "statements": [] - }, - "src": "4428:113:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4575:76:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4625:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4630:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4621:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4621:16:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4639:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4614:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4614:27:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4614:27:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4556:1:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4559:6:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "4553:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4553:13:2" - }, - "nodeType": "YulIf", - "src": "4550:2:2" - } - ] - }, - "name": "copy_memory_to_memory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "4381:3:2", - "type": "" - }, - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "4386:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "4391:6:2", - "type": "" - } - ], - "src": "4350:307:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4714:269:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4724:22:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "4738:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4744:1:2", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "4734:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4734:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4724:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "4755:38:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "4785:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4791:1:2", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "4781:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4781:12:2" - }, - "variables": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulTypedName", - "src": "4759:18:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4832:51:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4846:27:2", - "value": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4860:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4868:4:2", - "type": "", - "value": "0x7f" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "4856:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4856:17:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4846:6:2" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "4812:18:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "4805:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4805:26:2" - }, - "nodeType": "YulIf", - "src": "4802:2:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4935:42:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x22", - "nodeType": "YulIdentifier", - "src": "4949:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "4949:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4949:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "4899:18:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4922:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4930:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "4919:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4919:14:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "4896:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4896:38:2" - }, - "nodeType": "YulIf", - "src": "4893:2:2" - } - ] - }, - "name": "extract_byte_array_length", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "data", - "nodeType": "YulTypedName", - "src": "4698:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "4707:6:2", - "type": "" - } - ], - "src": "4663:320:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5017:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5034:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5037:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5027:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5027:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5027:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5131:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5134:4:2", - "type": "", - "value": "0x11" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5124:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5124:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5124:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5155:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5158:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5148:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5148:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5148:15:2" - } - ] - }, - "name": "panic_error_0x11", - "nodeType": "YulFunctionDefinition", - "src": "4989:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5203:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5220:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5223:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5213:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5213:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5213:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5317:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5320:4:2", - "type": "", - "value": "0x22" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5310:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5310:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5310:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5341:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5344:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5334:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5334:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5334:15:2" - } - ] - }, - "name": "panic_error_0x22", - "nodeType": "YulFunctionDefinition", - "src": "5175:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5389:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5406:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5409:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5399:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5399:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5399:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5503:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5506:4:2", - "type": "", - "value": "0x41" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5496:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5496:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5496:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5527:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5530:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5520:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5520:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5520:15:2" - } - ] - }, - "name": "panic_error_0x41", - "nodeType": "YulFunctionDefinition", - "src": "5361:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5595:54:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5605:38:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "5623:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5630:2:2", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5619:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5619:14:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5639:2:2", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "5635:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5635:7:2" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "5615:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5615:28:2" - }, - "variableNames": [ - { - "name": "result", - "nodeType": "YulIdentifier", - "src": "5605:6:2" - } - ] - } - ] - }, - "name": "round_up_to_mul_of_32", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "5578:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "result", - "nodeType": "YulTypedName", - "src": "5588:6:2", - "type": "" - } - ], - "src": "5547:102:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5698:79:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "5755:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5764:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5767:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5757:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5757:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5757:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "5721:5:2" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "5746:5:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "5728:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "5728:24:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "5718:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "5718:35:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "5711:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5711:43:2" - }, - "nodeType": "YulIf", - "src": "5708:2:2" - } - ] - }, - "name": "validator_revert_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "5691:5:2", - "type": "" - } - ], - "src": "5655:122:2" - } - ] - }, - "contents": "{\n\n function abi_decode_available_length_t_string_memory_ptr(src, length, end) -> array {\n array := allocateMemory(array_allocation_size_t_string_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert(0, 0) }\n copy_calldata_to_memory(src, dst, length)\n }\n\n // string\n function abi_decode_t_string_memory_ptr(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n let length := calldataload(offset)\n array := abi_decode_available_length_t_string_memory_ptr(add(offset, 0x20), length, end)\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_string_memory_ptr(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := calldataload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n\n value0 := abi_decode_t_string_memory_ptr(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 27)\n\n mstore(add(pos, 0), \"Value must be diferent of 0\")\n\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function allocateMemory(size) -> memPtr {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, size)\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function array_allocation_size_t_string_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n // round up\n size := and(add(length, 0x1f), not(0x1f))\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function copy_calldata_to_memory(src, dst, length) {\n calldatacopy(dst, src, length)\n // clear end\n mstore(add(dst, length), 0)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n", - "id": 2, - "language": "Yul", - "name": "#utility.yul" - } - ], - "sourceMap": "439:671:0:-:0;;;463:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;439:671;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:320:2:-;;88:1;82:4;78:12;68:22;;135:1;129:4;125:12;156:18;146:2;;212:4;204:6;200:17;190:27;;146:2;274;266:6;263:14;243:18;240:38;237:2;;;293:18;;:::i;:::-;237:2;58:269;;;;:::o;333:180::-;381:77;378:1;371:88;478:4;475:1;468:15;502:4;499:1;492:15;439:671:0;;;;;;;", - "deployedSourceMap": "439:671:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;666:81;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;751:109;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;864:103;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;971:137;;;:::i;:::-;;573:89;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;666:81;706:13;738:4;731:11;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;666:81;:::o;751:109::-;811:13;843:5;849;843:12;;;;;;;;;;;;;;;;;;;;;;;836:19;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;751:109;;;:::o;864:103::-;928:7;921:4;:14;;;;;;;;;;;;:::i;:::-;;943:5;954:7;943:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;864:103;:::o;971:137::-;1031:1;1019:9;:13;1011:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;1094:9;1070:8;:20;1079:10;1070:20;;;;;;;;;;;;;;;;:33;;;;;;;:::i;:::-;;;;;;;;971:137::o;573:89::-;615:13;636:21;;;;;;;;;;;;;;;;;;;573:89;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:344:2:-;;110:65;125:49;167:6;125:49;:::i;:::-;110:65;:::i;:::-;101:74;;198:6;191:5;184:21;236:4;229:5;225:16;274:3;265:6;260:3;256:16;253:25;250:2;;;291:1;288;281:12;250:2;304:41;338:6;333:3;328;304:41;:::i;:::-;91:260;;;;;;:::o;371:273::-;;476:3;469:4;461:6;457:17;453:27;443:2;;494:1;491;484:12;443:2;534:6;521:20;559:79;634:3;626:6;619:4;611:6;607:17;559:79;:::i;:::-;550:88;;433:211;;;;;:::o;650:139::-;;734:6;721:20;712:29;;750:33;777:5;750:33;:::i;:::-;702:87;;;;:::o;795:375::-;;913:2;901:9;892:7;888:23;884:32;881:2;;;929:1;926;919:12;881:2;1000:1;989:9;985:17;972:31;1030:18;1022:6;1019:30;1016:2;;;1062:1;1059;1052:12;1016:2;1090:63;1145:7;1136:6;1125:9;1121:22;1090:63;:::i;:::-;1080:73;;943:220;871:299;;;;:::o;1176:262::-;;1284:2;1272:9;1263:7;1259:23;1255:32;1252:2;;;1300:1;1297;1290:12;1252:2;1343:1;1368:53;1413:7;1404:6;1393:9;1389:22;1368:53;:::i;:::-;1358:63;;1314:117;1242:196;;;;:::o;1444:364::-;;1560:39;1593:5;1560:39;:::i;:::-;1615:71;1679:6;1674:3;1615:71;:::i;:::-;1608:78;;1695:52;1740:6;1735:3;1728:4;1721:5;1717:16;1695:52;:::i;:::-;1772:29;1794:6;1772:29;:::i;:::-;1767:3;1763:39;1756:46;;1536:272;;;;;:::o;1814:325::-;;1977:67;2041:2;2036:3;1977:67;:::i;:::-;1970:74;;2074:29;2070:1;2065:3;2061:11;2054:50;2130:2;2125:3;2121:12;2114:19;;1960:179;;;:::o;2145:313::-;;2296:2;2285:9;2281:18;2273:26;;2345:9;2339:4;2335:20;2331:1;2320:9;2316:17;2309:47;2373:78;2446:4;2437:6;2373:78;:::i;:::-;2365:86;;2263:195;;;;:::o;2464:419::-;;2668:2;2657:9;2653:18;2645:26;;2717:9;2711:4;2707:20;2703:1;2692:9;2688:17;2681:47;2745:131;2871:4;2745:131;:::i;:::-;2737:139;;2635:248;;;:::o;2889:283::-;;2955:2;2949:9;2939:19;;2997:4;2989:6;2985:17;3104:6;3092:10;3089:22;3068:18;3056:10;3053:34;3050:62;3047:2;;;3115:18;;:::i;:::-;3047:2;3155:10;3151:2;3144:22;2929:243;;;;:::o;3178:332::-;;3330:18;3322:6;3319:30;3316:2;;;3352:18;;:::i;:::-;3316:2;3437:4;3433:9;3426:4;3418:6;3414:17;3410:33;3402:41;;3498:4;3492;3488:15;3480:23;;3245:265;;;:::o;3516:99::-;;3602:5;3596:12;3586:22;;3575:40;;;:::o;3621:169::-;;3739:6;3734:3;3727:19;3779:4;3774:3;3770:14;3755:29;;3717:73;;;;:::o;3796:305::-;;3855:20;3873:1;3855:20;:::i;:::-;3850:25;;3889:20;3907:1;3889:20;:::i;:::-;3884:25;;4043:1;3975:66;3971:74;3968:1;3965:81;3962:2;;;4049:18;;:::i;:::-;3962:2;4093:1;4090;4086:9;4079:16;;3840:261;;;;:::o;4107:77::-;;4173:5;4162:16;;4152:32;;;:::o;4190:154::-;4274:6;4269:3;4264;4251:30;4336:1;4327:6;4322:3;4318:16;4311:27;4241:103;;;:::o;4350:307::-;4418:1;4428:113;4442:6;4439:1;4436:13;4428:113;;;4527:1;4522:3;4518:11;4512:18;4508:1;4503:3;4499:11;4492:39;4464:2;4461:1;4457:10;4452:15;;4428:113;;;4559:6;4556:1;4553:13;4550:2;;;4639:1;4630:6;4625:3;4621:16;4614:27;4550:2;4399:258;;;;:::o;4663:320::-;;4744:1;4738:4;4734:12;4724:22;;4791:1;4785:4;4781:12;4812:18;4802:2;;4868:4;4860:6;4856:17;4846:27;;4802:2;4930;4922:6;4919:14;4899:18;4896:38;4893:2;;;4949:18;;:::i;:::-;4893:2;4714:269;;;;:::o;4989:180::-;5037:77;5034:1;5027:88;5134:4;5131:1;5124:15;5158:4;5155:1;5148:15;5175:180;5223:77;5220:1;5213:88;5320:4;5317:1;5310:15;5344:4;5341:1;5334:15;5361:180;5409:77;5406:1;5399:88;5506:4;5503:1;5496:15;5530:4;5527:1;5520:15;5547:102;;5639:2;5635:7;5630:2;5623:5;5619:14;5615:28;5605:38;;5595:54;;;:::o;5655:122::-;5728:24;5746:5;5728:24;:::i;:::-;5721:5;5718:35;5708:2;;5767:1;5764;5757:12;5708:2;5698:79;:::o", - "source": "// *****************************************************************************\n// IMPORTANT: If you update this code then make sure to recompile\n// it and update the .json file as well so that they\n// remain in sync for consistent test executions.\n// With that said, there shouldn't be any reason to recompile this, like ever...\n// *****************************************************************************\n\npragma solidity >=0.7.0;\n\ncontract HelloWorld {\n string private name = \"CaptainCactus\";\n mapping (address => uint256) deposits;\n string[] private names; \n\n function sayHello () public pure returns (string memory) {\n return 'Hello World!';\n }\n\n function getName() public view returns (string memory)\n {\n return name;\n }\n\n function getNameByIndex(uint256 index) public view returns (string memory)\n {\n return names[index];\n }\n\n function setName(string memory newName) public\n {\n name = newName;\n names.push(newName);\n }\n\n function deposit() public payable {\n require(msg.value > 0, \"Value must be diferent of 0\");\n deposits[msg.sender] += msg.value;\n }\n}\n", - "sourcePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", - "ast": { - "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", - "exportedSymbols": { - "HelloWorld": [ - 76 - ] - }, - "id": 77, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 76, - "linearizedBaseContracts": [ - 76 - ], - "name": "HelloWorld", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "463:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "463:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "hexValue": "4361707461696e436163747573", - "id": 3, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:15:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", - "typeString": "literal_string \"CaptainCactus\"" - }, - "value": "CaptainCactus" - }, - "visibility": "private" - }, - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "deposits", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "504:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7, - "keyType": { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "513:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "504:28:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "524:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "names", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "545:22:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "545:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 10, - "nodeType": "ArrayTypeName", - "src": "545:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "visibility": "private" - }, - { - "body": { - "id": 18, - "nodeType": "Block", - "src": "630:32:0", - "statements": [ - { - "expression": { - "hexValue": "48656c6c6f20576f726c6421", - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "643:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", - "typeString": "literal_string \"Hello World!\"" - }, - "value": "Hello World!" - }, - "functionReturnParameters": 15, - "id": 17, - "nodeType": "Return", - "src": "636:21:0" - } - ] - }, - "functionSelector": "ef5fb05b", - "id": 19, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sayHello", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12, - "nodeType": "ParameterList", - "parameters": [], - "src": "591:2:0" - }, - "returnParameters": { - "id": 15, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19, - "src": "615:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "615:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "614:15:0" - }, - "scope": 76, - "src": "573:89:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 26, - "nodeType": "Block", - "src": "723:24:0", - "statements": [ - { - "expression": { - "id": 24, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "738:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 23, - "id": 25, - "nodeType": "Return", - "src": "731:11:0" - } - ] - }, - "functionSelector": "17d7de7c", - "id": 27, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 20, - "nodeType": "ParameterList", - "parameters": [], - "src": "682:2:0" - }, - "returnParameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "706:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "706:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "705:15:0" - }, - "scope": 76, - "src": "666:81:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 38, - "nodeType": "Block", - "src": "828:32:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 34, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "843:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 36, - "indexExpression": { - "id": 35, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "849:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "843:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 33, - "id": 37, - "nodeType": "Return", - "src": "836:19:0" - } - ] - }, - "functionSelector": "59c293f1", - "id": 39, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNameByIndex", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 30, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "775:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "775:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "774:15:0" - }, - "returnParameters": { - "id": 33, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "811:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "811:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "810:15:0" - }, - "scope": 76, - "src": "751:109:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "913:54:0", - "statements": [ - { - "expression": { - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 44, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "921:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 45, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "928:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "921:14:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 47, - "nodeType": "ExpressionStatement", - "src": "921:14:0" - }, - { - "expression": { - "arguments": [ - { - "id": 51, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "954:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "id": 48, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "943:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "src": "943:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", - "typeString": "function (string storage ref)" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "943:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 53, - "nodeType": "ExpressionStatement", - "src": "943:19:0" - } - ] - }, - "functionSelector": "c47f0027", - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 42, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 41, - "mutability": "mutable", - "name": "newName", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "881:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 40, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "881:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "880:23:0" - }, - "returnParameters": { - "id": 43, - "nodeType": "ParameterList", - "parameters": [], - "src": "913:0:0" - }, - "scope": 76, - "src": "864:103:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 74, - "nodeType": "Block", - "src": "1005:103:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 59, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1019:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1019:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 61, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1031:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1019:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "56616c7565206d757374206265206469666572656e74206f662030", - "id": 63, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1034:29:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - }, - "value": "Value must be diferent of 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - } - ], - "id": 58, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1011:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1011:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "1011:53:0" - }, - { - "expression": { - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 66, - "name": "deposits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "1070:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 69, - "indexExpression": { - "expression": { - "id": 67, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1079:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1079:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1070:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "expression": { - "id": 70, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1094:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1094:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1070:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 73, - "nodeType": "ExpressionStatement", - "src": "1070:33:0" - } - ] - }, - "functionSelector": "d0e30db0", - "id": 75, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [], - "src": "987:2:0" - }, - "returnParameters": { - "id": 57, - "nodeType": "ParameterList", - "parameters": [], - "src": "1005:0:0" - }, - "scope": 76, - "src": "971:137:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 77, - "src": "439:671:0" - } - ], - "src": "413:698:0" - }, - "legacyAST": { - "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", - "exportedSymbols": { - "HelloWorld": [ - 76 - ] - }, - "id": 77, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 76, - "linearizedBaseContracts": [ - 76 - ], - "name": "HelloWorld", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "463:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "463:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "hexValue": "4361707461696e436163747573", - "id": 3, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:15:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", - "typeString": "literal_string \"CaptainCactus\"" - }, - "value": "CaptainCactus" - }, - "visibility": "private" - }, - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "deposits", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "504:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7, - "keyType": { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "513:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "504:28:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "524:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "names", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "545:22:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "545:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 10, - "nodeType": "ArrayTypeName", - "src": "545:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "visibility": "private" - }, - { - "body": { - "id": 18, - "nodeType": "Block", - "src": "630:32:0", - "statements": [ - { - "expression": { - "hexValue": "48656c6c6f20576f726c6421", - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "643:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", - "typeString": "literal_string \"Hello World!\"" - }, - "value": "Hello World!" - }, - "functionReturnParameters": 15, - "id": 17, - "nodeType": "Return", - "src": "636:21:0" - } - ] - }, - "functionSelector": "ef5fb05b", - "id": 19, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sayHello", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12, - "nodeType": "ParameterList", - "parameters": [], - "src": "591:2:0" - }, - "returnParameters": { - "id": 15, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19, - "src": "615:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "615:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "614:15:0" - }, - "scope": 76, - "src": "573:89:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 26, - "nodeType": "Block", - "src": "723:24:0", - "statements": [ - { - "expression": { - "id": 24, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "738:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 23, - "id": 25, - "nodeType": "Return", - "src": "731:11:0" - } - ] - }, - "functionSelector": "17d7de7c", - "id": 27, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 20, - "nodeType": "ParameterList", - "parameters": [], - "src": "682:2:0" - }, - "returnParameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "706:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "706:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "705:15:0" - }, - "scope": 76, - "src": "666:81:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 38, - "nodeType": "Block", - "src": "828:32:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 34, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "843:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 36, - "indexExpression": { - "id": 35, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "849:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "843:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 33, - "id": 37, - "nodeType": "Return", - "src": "836:19:0" - } - ] - }, - "functionSelector": "59c293f1", - "id": 39, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNameByIndex", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 30, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "775:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "775:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "774:15:0" - }, - "returnParameters": { - "id": 33, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "811:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "811:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "810:15:0" - }, - "scope": 76, - "src": "751:109:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "913:54:0", - "statements": [ - { - "expression": { - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 44, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "921:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 45, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "928:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "921:14:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 47, - "nodeType": "ExpressionStatement", - "src": "921:14:0" - }, - { - "expression": { - "arguments": [ - { - "id": 51, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "954:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "id": 48, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "943:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "src": "943:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", - "typeString": "function (string storage ref)" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "943:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 53, - "nodeType": "ExpressionStatement", - "src": "943:19:0" - } - ] - }, - "functionSelector": "c47f0027", - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 42, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 41, - "mutability": "mutable", - "name": "newName", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "881:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 40, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "881:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "880:23:0" - }, - "returnParameters": { - "id": 43, - "nodeType": "ParameterList", - "parameters": [], - "src": "913:0:0" - }, - "scope": 76, - "src": "864:103:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 74, - "nodeType": "Block", - "src": "1005:103:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 59, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1019:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1019:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 61, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1031:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1019:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "56616c7565206d757374206265206469666572656e74206f662030", - "id": 63, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1034:29:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - }, - "value": "Value must be diferent of 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - } - ], - "id": 58, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1011:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1011:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "1011:53:0" - }, - { - "expression": { - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 66, - "name": "deposits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "1070:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 69, - "indexExpression": { - "expression": { - "id": 67, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1079:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1079:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1070:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "expression": { - "id": 70, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1094:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1094:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1070:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 73, - "nodeType": "ExpressionStatement", - "src": "1070:33:0" - } - ] - }, - "functionSelector": "d0e30db0", - "id": 75, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [], - "src": "987:2:0" - }, - "returnParameters": { - "id": 57, - "nodeType": "ParameterList", - "parameters": [], - "src": "1005:0:0" - }, - "scope": 76, - "src": "971:137:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 77, - "src": "439:671:0" - } - ], - "src": "413:698:0" - }, - "compiler": { - "name": "solc", - "version": "0.8.0+commit.c7dfd78e.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.3", - "updatedAt": "2021-02-12T11:15:58.676Z", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/solidity/hello-world-contract/HelloWorld.sol b/packages/cactus-plugin-ledger-connector-xdai/src/test/solidity/hello-world-contract/HelloWorld.sol deleted file mode 100644 index 30bc8f7134..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/solidity/hello-world-contract/HelloWorld.sol +++ /dev/null @@ -1,40 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; - -contract HelloWorld { - string private name = "CaptainCactus"; - mapping (address => uint256) deposits; - string[] private names; - - function sayHello () public pure returns (string memory) { - return 'Hello World!'; - } - - function getName() public view returns (string memory) - { - return name; - } - - function getNameByIndex(uint256 index) public view returns (string memory) - { - return names[index]; - } - - function setName(string memory newName) public - { - name = newName; - names.push(newName); - } - - function deposit() public payable { - require(msg.value > 0, "Value must be diferent of 0"); - deposits[msg.sender] += msg.value; - } - -} diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts deleted file mode 100644 index 34647cf767..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts +++ /dev/null @@ -1,334 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorXdai, - PluginFactoryLedgerConnector, - ReceiptType, - DefaultApi as XdaiApi, -} from "../../../main/typescript/public-api"; -import { - Containers, - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { Configuration, PluginImportType } from "@hyperledger/cactus-core-api"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; -import { K_CACTUS_XDAI_TOTAL_TX_COUNT } from "../../../main/typescript/prometheus-exporter/metrics"; - -const testCase = "deploys contract via .json file"; -const logLevel: LogLevelDesc = "TRACE"; -// const contractName = "HelloWorld"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - test.onFailure(async () => { - await Containers.logDiagnostics({ logLevel }); - }); - - const ledger = new BesuTestLedger({ logLevel }); - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - test.onFinish(async () => { - await ledger.stop(); - await ledger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - await ledger.start(); - - const rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - const connector: PluginLedgerConnectorXdai = await factory.create({ - rpcApiHttpHost, - logLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry(), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - const config = new Configuration({ basePath: apiHost }); - const apiClient = new XdaiApi(config); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp); - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - t.ok(balance, "Retrieved balance of test account OK"); - t.equals(parseInt(balance, 10), 10e9, "Balance of test account is OK"); - - let contractAddress: string; - - test("deploys contract via .json file", async (t2: Test) => { - const deployOut = await connector.deployContractJsonObject({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - contractJSON: HelloWorldContractJson, - }); - t2.ok(deployOut, "deployContract() output is truthy OK"); - t2.ok( - deployOut.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t2.ok( - deployOut.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - t2.ok( - typeof contractAddress === "string", - "contractAddress typeof string OK", - ); - - const { callOutput: helloMsg } = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - contractJSON: HelloWorldContractJson, - }); - t2.ok(helloMsg, "sayHello() output is truthy"); - t2.true( - typeof helloMsg === "string", - "sayHello() output is type of string", - ); - }); - - test("invoke Web3SigningCredentialType.None", async (t2: Test) => { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - transactionConfig: { - rawTransaction, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - - const balance2 = await web3.eth.getBalance(testEthAccount2.address); - t2.ok(balance2, "Retrieved balance of test account 2 OK"); - t2.equals(parseInt(balance2, 10), 10e6, "Balance of test account2 is OK"); - t2.end(); - }); - - test("invoke Web3SigningCredentialType.PrivateKeyHex", async (t2: Test) => { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - contractJSON: HelloWorldContractJson, - }); - t2.ok(setNameOut, "setName() invocation #1 output is truthy OK"); - - try { - const setNameOutInvalid = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - contractJSON: HelloWorldContractJson, - }); - t2.ifError(setNameOutInvalid); - } catch (error) { - t2.notStrictEqual( - error, - "Nonce too low", - "setName() invocation with invalid nonce", - ); - } - const { callOutput: getNameOut } = await connector.invokeContractJsonObject( - { - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - contractJSON: HelloWorldContractJson, - }, - ); - t2.equal(getNameOut, newName, `getName() output reflects the update OK`); - - const getNameOut2 = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - contractJSON: HelloWorldContractJson, - }); - t2.ok(getNameOut2, "getName() invocation #2 output is truthy OK"); - - const response = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - contractJSON: HelloWorldContractJson, - }); - t2.ok(response, "deposit() payable invocation output is truthy OK"); - - const { callOutput } = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - contractJSON: HelloWorldContractJson, - }); - t2.equal( - callOutput, - newName, - `getNameByIndex() output reflects the update OK`, - ); - - t2.end(); - }); - - test("get prometheus exporter metrics", async (t2: Test) => { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_XDAI_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTUS_XDAI_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTUS_XDAI_TOTAL_TX_COUNT + - '{type="' + - K_CACTUS_XDAI_TOTAL_TX_COUNT + - '"} 6'; - t2.ok(res); - t2.ok(res.data); - t2.equal(res.status, 200); - t2.true( - res.data.includes(promMetricsOutput), - "Total Transaction Count of 9 recorded as expected. RESULT OK.", - ); - t2.end(); - }); - - t.end(); -}); diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts deleted file mode 100644 index b2ef06081c..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts +++ /dev/null @@ -1,424 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import { Account } from "web3-core"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import "jest-extended"; - -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorXdai, - PluginFactoryLedgerConnector, - Web3SigningCredentialCactusKeychainRef, - ReceiptType, - DefaultApi as XdaiApi, -} from "../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { Configuration, PluginImportType } from "@hyperledger/cactus-core-api"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; -import { K_CACTUS_XDAI_TOTAL_TX_COUNT } from "../../../main/typescript/prometheus-exporter/metrics"; - -const testCase = "deploys contract via .json file"; -describe(testCase, () => { - const logLevel: LogLevelDesc = "TRACE"; - const ledger = new BesuTestLedger({ logLevel }); - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - const contractName = "HelloWorld"; - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - let addressInfo, - contractAddress: string, - rpcApiHttpHost: string, - connector: PluginLedgerConnectorXdai, - address: string, - port: number, - apiHost: string, - web3: Web3, - factory: PluginFactoryLedgerConnector, - firstHighNetWorthAccount: string, - testEthAccount: Account, - keychainEntryKey: string, - keychainEntryValue: string, - keychainPlugin: PluginKeychainMemory, - config, - apiClient: XdaiApi; - - beforeAll(async () => { - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - }); - - afterAll(async () => await Servers.shutdown(server)); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - beforeAll(async () => { - await ledger.start(); - factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(uuidv4()); - - keychainEntryKey = uuidv4(); - keychainEntryValue = testEthAccount.privateKey; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - connector = (await factory.create({ - rpcApiHttpHost, - logLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - })) as PluginLedgerConnectorXdai; - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - config = new Configuration({ basePath: apiHost }); - apiClient = new XdaiApi(config); - }); - test(testCase, async () => { - // TO-DO: Find a way to log container diagnostics - // and test failure within Jest. - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp); - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toEqual(10e9); - }); - - test("deploys contract via .json file", async () => { - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: HelloWorldContractJson.contractName, - // contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt); - expect(deployOut.transactionReceipt.contractAddress); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - expect(typeof contractAddress === "string").toBeTruthy(); - - const { callOutput: helloMsg } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(helloMsg).toBeTruthy(); - expect(typeof helloMsg === "string").toBeTruthy(); - }); - - test("invoke Web3SigningCredentialType.None", async () => { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - transactionConfig: { - rawTransaction, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }); - - const balance2 = await web3.eth.getBalance(testEthAccount2.address); - expect(balance2).toBeTruthy(); - expect(parseInt(balance2, 10)).toEqual(10e6); - }); - - test("invoke Web3SigningCredentialType.PrivateKeyHex", async () => { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - expect(setNameOut).toBeTruthy(); - - try { - await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - fail("It should not reach here"); - } catch (error) { - expect(error).not.toBe("Nonce too low"); - } - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(callOutput).toEqual(newName); - }); - - test("invoke Web3SigningCredentialType.CACTUSKEYCHAINREF", async () => { - const newName = `DrCactus${uuidv4()}`; - - const web3SigningCredential: Web3SigningCredentialCactusKeychainRef = { - ethAccount: testEthAccount.address, - keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - type: Web3SigningCredentialType.CactusKeychainRef, - }; - - const setNameOut = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - web3SigningCredential, - nonce: 4, - }); - expect(setNameOut).toBeTruthy(); - - try { - await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - web3SigningCredential, - nonce: 4, - }); - fail("It should not reach here"); - } catch (error) { - expect(error).not.toBe("Nonce too low"); - } - - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - web3SigningCredential, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [1], - gas: 1000000, - web3SigningCredential, - }); - expect(callOutput).toEqual(newName); - }); - - test("get prometheus exporter metrics", async () => { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_XDAI_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTUS_XDAI_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTUS_XDAI_TOTAL_TX_COUNT + - '{type="' + - K_CACTUS_XDAI_TOTAL_TX_COUNT + - '"} 9'; - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data).toContain(promMetricsOutput); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/invoke-contract-xdai-json-object.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/invoke-contract-xdai-json-object.test.ts deleted file mode 100644 index e9395ad486..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/invoke-contract-xdai-json-object.test.ts +++ /dev/null @@ -1,279 +0,0 @@ -import test, { Test } from "tape"; -import { v4 as uuidv4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorXdai, - PluginFactoryLedgerConnector, - ReceiptType, -} from "../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -test("deploys contract via .json file", async (t: Test) => { - const logLevel: LogLevelDesc = "TRACE"; - const xdaiTestLedger = new BesuTestLedger({}); - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - await xdaiTestLedger.start(); - - test.onFinish(async () => { - await xdaiTestLedger.stop(); - await xdaiTestLedger.destroy(); - }); - - const rpcApiHttpHost = await xdaiTestLedger.getRpcApiHttpHost(); - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - const connector: PluginLedgerConnectorXdai = await factory.create({ - rpcApiHttpHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - t.ok(balance, "Retrieved balance of test account OK"); - t.equals(parseInt(balance, 10), 10e9, "Balance of test account is OK"); - - let contractAddress: string; - - test("deploys contract via .json file", async (t2: Test) => { - const deployOut = await connector.deployContractJsonObject({ - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - contractJSON: HelloWorldContractJson, - }); - t2.ok(deployOut, "deployContract() output is truthy OK"); - t2.ok( - deployOut.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t2.ok( - deployOut.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - t2.ok( - typeof contractAddress === "string", - "contractAddress typeof string OK", - ); - - const { callOutput: helloMsg } = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - contractJSON: HelloWorldContractJson, - }); - t2.ok(helloMsg, "sayHello() output is truthy"); - t2.true( - typeof helloMsg === "string", - "sayHello() output is type of string", - ); - }); - - test("invoke Web3SigningCredentialType.NONE", async (t2: Test) => { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - rawTransaction, - }, - }); - - const balance2 = await web3.eth.getBalance(testEthAccount2.address); - t2.ok(balance2, "Retrieved balance of test account 2 OK"); - t2.equals(parseInt(balance2, 10), 10e6, "Balance of test account2 is OK"); - t2.end(); - }); - - test("invoke Web3SigningCredentialType.PrivateKeyHex", async (t2: Test) => { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - contractJSON: HelloWorldContractJson, - }); - t2.ok(setNameOut, "setName() invocation #1 output is truthy OK"); - - try { - const setNameOutInvalid = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - contractJSON: HelloWorldContractJson, - }); - t2.ifError(setNameOutInvalid.transactionReceipt); - } catch (error) { - t2.notStrictEqual( - error, - "Nonce too low", - "setName() invocation with invalid nonce", - ); - } - const { callOutput: getNameOut } = await connector.invokeContractJsonObject( - { - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - contractJSON: HelloWorldContractJson, - }, - ); - t2.equal(getNameOut, newName, `getName() output reflects the update OK`); - - const getNameOut2 = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - contractJSON: HelloWorldContractJson, - }); - t2.ok(getNameOut2, "getName() invocation #2 output is truthy OK"); - - const response = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - contractJSON: HelloWorldContractJson, - }); - t2.ok(response, "deposit() payable invocation output is truthy OK"); - - const { callOutput } = await connector.invokeContractJsonObject({ - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - contractJSON: HelloWorldContractJson, - }); - t2.equal( - callOutput, - newName, - `getNameByIndex() output reflects the update OK`, - ); - - t2.end(); - }); - - t.end(); -}); diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/invoke-contract-xdai.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/invoke-contract-xdai.test.ts deleted file mode 100644 index c4446d3d3b..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/invoke-contract-xdai.test.ts +++ /dev/null @@ -1,357 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { Account } from "web3-core"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorXdai, - PluginFactoryLedgerConnector, - Web3SigningCredentialCactusKeychainRef, - ReceiptType, -} from "../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import HelloWorldContractJson from "../../solidity/hello-world-contract/HelloWorld.json"; -import Web3 from "web3"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -const logLevel: LogLevelDesc = "TRACE"; -let xdaiTestLedger: BesuTestLedger; -const testCase = "Xdai Ledger Connector Plugin"; -describe(testCase, () => { - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - let firstHighNetWorthAccount: string; - let contractAddress: string; - const contractName = "HelloWorld"; - let keychainPlugin: PluginKeychainMemory; - let connector: PluginLedgerConnectorXdai; - let web3: Web3; - let testEthAccount: Account; - let keychainEntryKey: string; - let keychainEntryValue: string, rpcApiHttpHost: string; - - beforeAll(async () => { - xdaiTestLedger = new BesuTestLedger({}); - }); - - afterAll(async () => { - await xdaiTestLedger.stop(); - await xdaiTestLedger.destroy(); - }); - beforeAll(async () => { - await xdaiTestLedger.start(); - firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - rpcApiHttpHost = await xdaiTestLedger.getRpcApiHttpHost(); - expect(rpcApiHttpHost).toBeString(); - - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(uuidv4()); - - keychainEntryKey = uuidv4(); - keychainEntryValue = testEthAccount.privateKey; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - }); - - it("setup", async () => { - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - connector = await factory.create({ - logLevel, - rpcApiHttpHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toEqual(10e9); - }); - - it("deploys contract via .json file", async () => { - const deployOut = await connector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: HelloWorldContractJson.contractName, - // contractAbi: HelloWorldContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - // bytecode: HelloWorldContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - - contractAddress = deployOut.transactionReceipt.contractAddress as string; - expect(contractAddress).toBeString(); - - const { callOutput: helloMsg } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(helloMsg).toBeTruthy(); - expect(helloMsg).toBeString(); - }); - - it("invoke Web3SigningCredentialType.NONE", async () => { - const testEthAccount2 = web3.eth.accounts.create(uuidv4()); - - const { rawTransaction } = await web3.eth.accounts.signTransaction( - { - from: testEthAccount.address, - to: testEthAccount2.address, - value: 10e6, - gas: 1000000, - }, - testEthAccount.privateKey, - ); - - await connector.transact({ - web3SigningCredential: { - type: Web3SigningCredentialType.None, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - rawTransaction, - }, - }); - - const balance2 = await web3.eth.getBalance(testEthAccount2.address); - expect(balance2).toBeTruthy(); - expect(parseInt(balance2, 10)).toEqual(10e6); - }); - - it("invoke Web3SigningCredentialType.PrivateKeyHex", async () => { - const newName = `DrCactus${uuidv4()}`; - const setNameOut = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - expect(setNameOut).toBeTruthy(); - - try { - await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - nonce: 1, - }); - fail("invalid nonce should have thrown"); - } catch (error: any) { - expect(error.message).toContain("Nonce too low"); - } - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [0], - gas: 1000000, - web3SigningCredential: { - ethAccount: testEthAccount.address, - secret: testEthAccount.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(callOutput).toEqual(newName); - }); - - it("invoke Web3SigningCredentialType.CACTUSKEYCHAINREF", async () => { - const newName = `DrCactus${uuidv4()}`; - const web3SigningCredential: Web3SigningCredentialCactusKeychainRef = { - ethAccount: testEthAccount.address, - keychainEntryKey, - keychainId: keychainPlugin.getKeychainId(), - type: Web3SigningCredentialType.CactusKeychainRef, - }; - - const setNameOut = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - web3SigningCredential, - nonce: 4, - }); - expect(setNameOut).toBeTruthy(); - - try { - await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "setName", - params: [newName], - gas: 1000000, - web3SigningCredential, - nonce: 4, - }); - fail("invalid nonce should have thrown"); - } catch (error: any) { - expect(error.message).toContain("Nonce too low"); - } - const { callOutput: getNameOut } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential, - }); - expect(getNameOut).toEqual(newName); - - const getNameOut2 = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "getName", - params: [], - gas: 1000000, - web3SigningCredential, - }); - expect(getNameOut2).toBeTruthy(); - - const response = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "deposit", - params: [], - gas: 1000000, - web3SigningCredential, - value: 10, - }); - expect(response).toBeTruthy(); - - const { callOutput: callOut } = await connector.invokeContract({ - contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "getNameByIndex", - params: [1], - gas: 1000000, - web3SigningCredential, - }); - expect(callOut).toEqual(newName); - }); -}); diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts deleted file mode 100644 index 44e59e2c14..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts +++ /dev/null @@ -1,301 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorXdai, - DefaultApi as XdaiApi, - DeployContractJsonObjectV1Request, - InvokeContractJsonObjectV1Request, -} from "../../../../main/typescript/public-api"; -import { - Containers, - K_DEV_WHALE_ACCOUNT_PRIVATE_KEY, - K_DEV_WHALE_ACCOUNT_PUBLIC_KEY, - OpenEthereumTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import HelloWorldContractJson from "../../../solidity/hello-world-contract/HelloWorld.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; - -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; -import OAS from "../../../../main/json/openapi.json"; - -const testCase = "xDai API"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - test.onFailure(async () => { - await Containers.logDiagnostics({ logLevel }); - }); - - // create a test ledger - const xdaiTestLedger = new OpenEthereumTestLedger({ logLevel }); - test.onFinish(async () => { - await xdaiTestLedger.stop(); - await xdaiTestLedger.destroy(); - }); - await xdaiTestLedger.start(); - - // get host to which connector will attack - const rpcApiHttpHost = await xdaiTestLedger.getRpcApiHttpHost(); - - // obtain public and private keys from an account - const whalePubKey = K_DEV_WHALE_ACCOUNT_PUBLIC_KEY; - const whalePrivKey = K_DEV_WHALE_ACCOUNT_PRIVATE_KEY; - - // create the connector - const connector: PluginLedgerConnectorXdai = new PluginLedgerConnectorXdai({ - instanceId: uuidv4(), - rpcApiHttpHost, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - const config = new Configuration({ basePath: apiHost }); - const apiClient = new XdaiApi(config); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp); - - const fDeploy = "deployContractJsonObjectV1"; - const fInvoke = "invokeContractV1"; - const cOk = "without bad request error"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - - let contractAddress: string; - - test(`${testCase} - ${fDeploy} - ${cOk}`, async (t2: Test) => { - const parameters = { - constructorArgs: [], - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - contractJSON: HelloWorldContractJson, - }; - const res = await apiClient.deployContractJsonObjectV1( - parameters as DeployContractJsonObjectV1Request, - ); - t2.ok(res, "Contract deployed successfully"); - t2.ok(res.data); - t2.equal( - res.status, - 200, - `Endpoint ${fDeploy}: response.status === 200 OK`, - ); - - contractAddress = res.data.transactionReceipt.contractAddress as string; - - t2.end(); - }); - - test(`${testCase} - ${fDeploy} - ${cWithoutParams}`, async (t2: Test) => { - try { - const parameters = { - constructorArgs: [], - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }; - await apiClient.deployContractJsonObjectV1( - parameters as any as DeployContractJsonObjectV1Request, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fDeploy} without required contractJSON: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("contractJSON"), - "Rejected because contractJSON is required", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fDeploy} - ${cInvalidParams}`, async (t2: Test) => { - try { - const parameters = { - constructorArgs: [], - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - contractJSON: HelloWorldContractJson, - fake: 4, - }; - await apiClient.deployContractJsonObjectV1( - parameters as any as DeployContractJsonObjectV1Request, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fDeploy} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fInvoke} - ${cOk}`, async (t2: Test) => { - const parameters = { - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - contractJSON: HelloWorldContractJson, - }; - const res = await apiClient.invokeContractJsonObject(parameters); - t2.ok(res, "Contract invoked successfully"); - t2.ok(res.data); - t2.equal( - res.status, - 200, - `Endpoint ${fInvoke}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fInvoke} - ${cWithoutParams}`, async (t2: Test) => { - try { - const parameters = { - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }; - await apiClient.invokeContractJsonObject( - parameters as any as InvokeContractJsonObjectV1Request, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fInvoke} without required contractJSON: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("contractJSON"), - "Rejected because contractJSON is required", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fInvoke} - ${cInvalidParams}`, async (t2: Test) => { - try { - const parameters = { - contractAddress, - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - contractJSON: HelloWorldContractJson, - fake: 4, - }; - await apiClient.invokeContractJsonObject( - parameters as any as InvokeContractJsonObjectV1Request, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fInvoke} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - t.end(); -}); - -test("AFTER " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts deleted file mode 100644 index 712ba58135..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ /dev/null @@ -1,429 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; -import { - EthContractInvocationType, - Web3SigningCredentialType, - PluginLedgerConnectorXdai, - DefaultApi as XdaiApi, - ReceiptType, - DeployContractV1Request, - InvokeContractV1Request, - RunTransactionV1Request, -} from "../../../../main/typescript/public-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - Containers, - K_DEV_WHALE_ACCOUNT_PRIVATE_KEY, - K_DEV_WHALE_ACCOUNT_PUBLIC_KEY, - OpenEthereumTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import HelloWorldContractJson from "../../../solidity/hello-world-contract/HelloWorld.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import { AddressInfo } from "net"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; - -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; -import OAS from "../../../../main/json/openapi.json"; - -const testCase = "xDai API"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - test.onFailure(async () => { - await Containers.logDiagnostics({ logLevel }); - }); - - // create a test ledger - const xdaiTestLedger = new OpenEthereumTestLedger({ logLevel }); - test.onFinish(async () => { - await xdaiTestLedger.stop(); - await xdaiTestLedger.destroy(); - }); - await xdaiTestLedger.start(); - - // get host to which connector will attack - const rpcApiHttpHost = await xdaiTestLedger.getRpcApiHttpHost(); - - // obtain public and private keys from an account - const whalePubKey = K_DEV_WHALE_ACCOUNT_PUBLIC_KEY; - const whalePrivKey = K_DEV_WHALE_ACCOUNT_PRIVATE_KEY; - - // create an ethereum account - const testEthAccount = await xdaiTestLedger.createEthTestAccount(); - - // create a keychain for this account - const keychainId = uuidv4(); - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - - // add keychain plugin to plugin registry - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - // create the connector - const connector: PluginLedgerConnectorXdai = new PluginLedgerConnectorXdai({ - instanceId: uuidv4(), - rpcApiHttpHost, - logLevel, - pluginRegistry, - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - const config = new Configuration({ basePath: apiHost }); - const apiClient = new XdaiApi(config); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp); - - const fDeploy = "deployContractV1"; - const fInvoke = "invokeContractV1"; - const fRun = "runTransactionV1"; - const cOk = "without bad request error"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - - test(`${testCase} - ${fDeploy} - ${cOk}`, async (t2: Test) => { - const parameters = { - keychainId: keychainPlugin.getKeychainId(), - contractName: HelloWorldContractJson.contractName, - constructorArgs: [], - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }; - const res = await apiClient.deployContractV1(parameters); - t2.ok(res, "Contract deployed successfully"); - t2.ok(res.data); - t2.equal( - res.status, - 200, - `Endpoint ${fDeploy}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fDeploy} - ${cWithoutParams}`, async (t2: Test) => { - try { - const parameters = { - contractName: HelloWorldContractJson.contractName, - constructorArgs: [], - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }; - await apiClient.deployContractV1( - parameters as unknown as DeployContractV1Request, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fDeploy} without required keychainId: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("keychainId"), - "Rejected because keychainId is required", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fDeploy} - ${cInvalidParams}`, async (t2: Test) => { - try { - const parameters = { - keychainId: keychainPlugin.getKeychainId(), - contractName: HelloWorldContractJson.contractName, - constructorArgs: [], - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - fake: 4, - }; - await apiClient.deployContractV1(parameters); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fDeploy} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fInvoke} - ${cOk}`, async (t2: Test) => { - const parameters = { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }; - const res = await apiClient.invokeContractV1(parameters); - t2.ok(res, "Contract invoked successfully"); - t2.ok(res.data); - t2.equal( - res.status, - 200, - `Endpoint ${fInvoke}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fInvoke} - ${cWithoutParams}`, async (t2: Test) => { - try { - const parameters = { - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - gas: 1000000, - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }; - await apiClient.invokeContractV1( - parameters as unknown as InvokeContractV1Request, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fInvoke} without required contractName: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("contractName"), - "Rejected because contractName is required", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fInvoke} - ${cInvalidParams}`, async (t2: Test) => { - try { - const parameters = { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - invocationType: EthContractInvocationType.Call, - methodName: "sayHello", - params: [], - gas: 1000000, - signingCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - fake: 4, - }; - await apiClient.invokeContractV1( - parameters as any as InvokeContractV1Request, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fInvoke} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fRun} - ${cOk}`, async (t2: Test) => { - const parameters = { - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: whalePubKey, - to: testEthAccount.address, - value: 10e7, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - }; - const res = await apiClient.runTransactionV1(parameters); - t2.ok(res, "Transaction ran successfully"); - t2.ok(res.data); - t2.equal(res.status, 200, `Endpoint ${fRun}: response.status === 200 OK`); - - t2.end(); - }); - - test(`${testCase} - ${fRun} - ${cWithoutParams}`, async (t2: Test) => { - try { - const parameters = { - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: whalePubKey, - to: testEthAccount.address, - value: 10e7, - gas: 22000, - }, - }; - await apiClient.runTransactionV1( - parameters as any as RunTransactionV1Request, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fRun} without required consistencyStrategy: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("consistencyStrategy"), - "Rejected because consistencyStrategy is required", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fRun} - ${cInvalidParams}`, async (t2: Test) => { - try { - const parameters = { - web3SigningCredential: { - ethAccount: whalePubKey, - secret: whalePrivKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: whalePubKey, - to: testEthAccount.address, - value: 10e7, - gas: 22000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 60000, - }, - fake: 4, - }; - await apiClient.runTransactionV1( - parameters as any as RunTransactionV1Request, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fRun} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - t.end(); -}); - -test("AFTER " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-plugin-ledger-connector-xdai/tsconfig.json b/packages/cactus-plugin-ledger-connector-xdai/tsconfig.json deleted file mode 100644 index ee2d003668..0000000000 --- a/packages/cactus-plugin-ledger-connector-xdai/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ledger-connector-xdai.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-persistence-ethereum/CHANGELOG.md b/packages/cactus-plugin-persistence-ethereum/CHANGELOG.md deleted file mode 100644 index bad177eec0..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/CHANGELOG.md +++ /dev/null @@ -1,136 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-persistence-ethereum - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-persistence-ethereum - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-persistence-ethereum - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -### Features - -* **go-ethereum-socketio:** remove deprecated connector ([56dd9f8](https://github.com/hyperledger/cacti/commit/56dd9f8aa72883aeb5bfcf0303b0af6e84daad7a)), closes [#3155](https://github.com/hyperledger/cacti/issues/3155) -* **persistence-ethereum:** add sample setup scripts, improve documentation ([ed915cf](https://github.com/hyperledger/cacti/commit/ed915cf6f8f1388cbfdc16c954102da1e381920b)) -* **persistence-ethereum:** migrate to separate db schema ([b160c52](https://github.com/hyperledger/cacti/commit/b160c52f1a99f8019beb8af9d4f8c0b46cf1953c)), closes [#3340](https://github.com/hyperledger/cacti/issues/3340) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **plugin-persistence-ethereum:** make created_at TIMESTAMPTZ in schema ([08925ff](https://github.com/hyperledger/cacti/commit/08925ffc8815d9613a69204a74c85d168f8a8305)), closes [#3373](https://github.com/hyperledger/cacti/issues/3373) - -### Features - -* **ledger-browser:** refactor eth tokens page into accounts page ([0b0c22c](https://github.com/hyperledger/cacti/commit/0b0c22cd39fb67e809595ceb23fb8b3c2a0f1da0)), closes [#3237](https://github.com/hyperledger/cacti/issues/3237) - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **indy-vdr-nodejs:** update dependency version ([f81b46b](https://github.com/hyperledger/cacti/commit/f81b46bce5ca0880e6bf6b51be2233e2616759a5)) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **cactus-plugin-persistence-ethereum:** use openapi ethereum connector ([b8f9b79](https://github.com/hyperledger/cacti/commit/b8f9b79daa7a97cbd75325eba00c7458bfed5ce5)), closes [#2631](https://github.com/hyperledger/cacti/issues/2631) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-persistence-ethereum - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Features - -* **cactus-plugin-persistence-ethereum:** add new persistence plugin ([617c4d3](https://github.com/hyperledger/cactus/commit/617c4d38981b450de3777dfe7d26fbc32219aca5)), closes [#2254](https://github.com/hyperledger/cactus/issues/2254) [#2256](https://github.com/hyperledger/cactus/issues/2256) diff --git a/packages/cactus-plugin-persistence-ethereum/Dockerfile b/packages/cactus-plugin-persistence-ethereum/Dockerfile deleted file mode 100644 index b21f3089fa..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM node:16 - -ENV PACKAGE_PATH=/opt/cactus-plugin-persistence-ethereum - -WORKDIR ${PACKAGE_PATH} - -# CMake is required by one of npm dependencies (install other packages in this step as well in the future) -RUN apt-get update && apt-get install -y cmake && rm -rf /var/lib/apt/lists/* - -COPY ./dist/yarn.lock ./package.json ./ -RUN yarn install --production --ignore-engines --non-interactive --cache-folder ./.yarnCache && \ - rm -rf ./.yarnCache - -COPY ./dist ./dist diff --git a/packages/cactus-plugin-persistence-ethereum/README.md b/packages/cactus-plugin-persistence-ethereum/README.md deleted file mode 100644 index 72b412c74b..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/README.md +++ /dev/null @@ -1,266 +0,0 @@ -# `@hyperledger/cactus-plugin-persistence-ethereum` - -This plugin allows `Cactus` to persist Ethereum data into some storage (currently to a `PostgreSQL` database, but this concept can be extended further). -Data in the database can later be analyzed and viewed in a GUI tool. - -## Summary - -- [Remarks](#remarks) -- [Getting Started](#getting-started) -- [Endpoints](#endpoints) -- [Running the tests](#running-the-tests) -- [Contributing](#contributing) -- [License](#license) -- [Acknowledgments](#acknowledgments) - -## Remarks - -- This plugin was only tested with small, permissioned Ethereum ledgers. Running it to archive and monitor large ledgers (like main net) is not recommended yet. -- For now, the database schema is not considered public and can change over time (i.e., writing own application that reads data directly from the database is discouraged). -- Only `status` endpoint is available, all the methods must be called directly on the plugin instance for now. -- Monitored ERC20 tokens should be added before synchronizing the database (previous transfers will not be parsed correctly if you later add the token). - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on your local machine for development and testing purposes. - -### Prerequisites - -#### Build - -In the root of the project, execute the command to install and build the dependencies. It will also build this persistence plugin: - -```sh -yarn run configure -``` - -#### Ethereum Ledger and Connector - -This plugin requires a running Ethereum ledger that you want to persist to a database. For testing purposes, you can use our [test geth-all-in-one Docker image](../../tools/docker/geth-all-in-one/README.md). Make sure you have the JSON-RPC WS address ready. - -Once you have an Ethereum ledger ready, you need to start the [Ethereum Cacti Connector](../cactus-plugin-ledger-connector-ethereum/README.md). We recommend running the connector on the same ApiServer instance as the persistence plugin for better performance and reduced network overhead. See the connector package README for more instructions, or check out the [setup sample scripts](./src/test/typescript/manual). - -#### Supabase Instance - -You need a running Supabase instance to serve as a database backend for this plugin. - -### Setup Tutorials - -We've created some sample scripts to help you get started quickly. All the steps have detailed comments on it so you can quickly understand the code. - -#### Sample Setup - -Location: [./src/test/typescript/manual/sample-setup.ts](./src/test/typescript/manual/sample-setup.ts) - -This sample script can be used to set up `ApiServer` with the Ethereum connector and persistence plugins to monitor and store ledger data in a database. You need to have a ledger running before executing this script. You can add custom code (e.g., to specify tokens to be monitored) after the comment `CUSTOM CODE GOES HERE !!!!` in the script file. - -By default, the script will try to use a localhost Ethereum ledger (`ws://127.0.0.1:8546`) and our `supabase-all-in-one` instance running on localhost. - -```shell -npm run sample-setup -``` - -Custom ledger and supabase can be set with environment variables `ETHEREUM_RPC_WS_HOST` and `SUPABASE_CONNECTION_STRING`: - -```shell -ETHEREUM_RPC_WS_HOST=ws://127.0.0.1:8546 SUPABASE_CONNECTION_STRING=postgresql://postgres:your-super-secret-and-long-postgres-password@127.0.0.1:5432/postgres npm run sample-setup -``` - -#### Complete Sample Scenario - -Location: [./src/test/typescript/manual/common-setup-methods](./src/test/typescript/manual/common-setup-methods) - -This script starts the test Ethereum ledger for you, deploys a sample ERC721 contract, and mints some tokens. Then it synchronizes everything to a database and monitors for all new blocks. This script can also be used for manual, end-to-end tests of a plugin. - -By default, the script will try to use our `supabase-all-in-one` instance running on localhost. - -```shell -npm run complete-sample-scenario -``` - -Custom supabase can be set with environment variable `SUPABASE_CONNECTION_STRING`: - -```shell -SUPABASE_CONNECTION_STRING=postgresql://postgres:your-super-secret-and-long-postgres-password@127.0.0.1:5432/postgres npm run complete-sample-scenario -``` - -### Usage - -Instantiate a new `PluginPersistenceEthereum` instance: - -```typescript -import { PluginPersistenceEthereum } from "@hyperledger/cactus-plugin-persistence-ethereum"; -import { v4 as uuidv4 } from "uuid"; - -const persistencePlugin = new PluginPersistenceEthereum({ - instanceId: uuidv4(), - apiClient: new EthereumApiClient(apiConfigOptions), - logLevel: "info", - connectionString: - "postgresql://postgres:your-super-secret-and-long-postgres-password@localhost:5432/postgres", -}); - -// Initialize the connection to the DB -await persistencePlugin.onPluginInit(); -``` - -You can use the persistent plugin to start monitoring token balance changes and synchronize ledger state with the database. -Here is a sample script that adds two tokens to monitor, synchronizes all currently issued ERC721 tokens and starts monitoring for new blocks: - -```typescript -// Add ERC20 token under address erc20ContractAddress, monitor all transfers. -await persistencePlugin.addTokenERC20(erc20ContractAddress); - -// Add ERC721 token as well to monitor transfers -await persistencePlugin.addTokenERC721(erc721ContractAddress); - -// Synchronize all issued ERC721 token balances that we currently monitor -await persistencePlugin.syncERC721Tokens(); - -// Start monitoring new blocks. -// Transactions in each block are parsed, token transfers update current token balances. -// Entire ledger is synchronized first with the DB (`syncAll` is called) so this operation can take a while on large ledgers! -persistencePlugin.startMonitor((err) => { - reject(err); -}); - -// Show current status of the plugin -persistencePlugin.getStatus(); -``` - -> See [plugin integration tests](./src/test/typescript/integration) for complete usage examples. - -### Building/running the container image locally - -In the Cactus project root say: - -```sh -DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-persistence-ethereum/ -f ./packages/cactus-plugin-persistence-ethereum/Dockerfile -t cactus-plugin-persistence-ethereum -``` - -## Endpoints - -### StatusV1 (`/api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status`) - -- Returns status of the plugin (latest block read, failed blocks, is monitor running, etc...) - -### Plugin Methods - -- Most of the plugin functionalities are currently not available through OpenAPI interface, please use direct method calls instead. - -#### `onPluginInit` - -- Should be called before using the plugin. - -#### `shutdown` - -- Close the connection to the DB, cleanup any allocated resources. - -#### `getStatus` - -- Get status report of this instance of persistence plugin. - -#### `refreshMonitoredTokens` - -- Fetch the metadata of all tokens to be monitored by this persistence plugin. - -#### `syncERC721Tokens` - -- Synchronize issued tokens for all ERC721 token contract monitored by this persistence plugin. - -#### `startMonitor` - -- Start the block monitoring process. New blocks from the ledger will be parsed and pushed to the database. - -#### `stopMonitor` - -- Stop the block monitoring process. - -#### `addTokenERC20` - -- Add new ERC20 token to be monitored by this plugin. - -#### `addTokenERC721` - -- Add new ERC721 token to be monitored by this plugin. - -#### `syncFailedBlocks` - -- Walk through all the blocks that could not be synchronized with the DB for some reasons and try pushing them again. - -#### `syncAll` - -- Synchronize entire ledger state with the database. - -## Running the tests - -To run all the tests for this persistence plugin to ensure it's working correctly execute the following from the root of the `cactus` project: - -```sh -npx jest cactus-plugin-persistence-ethereum -``` - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -### Quick plugin project walkthrough - -#### ./src/main/json/contract_abi - -- Contains reference token ABIs used to call and identify token transfers. - -#### `./src/main/json/openapi.json` - -- Contains OpenAPI definition. - -#### `./src/main/sql/schema.sql` - -- Database schema for Ethereum data. - -#### `./src/main/typescript/token-client` - -- Client used to execute methods on token contracts. - -#### `./src/main/typescript/web-services` - -- Folder that contains web service endpoint definitions. - -#### `./plugin-persistence-ethereum` - -- Main persistent plugin logic file - -#### `./src/test/typescript/integration/` - -- Integration test of various plugin functionalities. - -### Generating types from the database schema - -- Current setup assume use of Supabase that has utility for generating types from the database schema. -- We use this tool to generate type definitions and store them in `./src/main/typescript/db-client/database.types.ts` -- Upstream instructions: https://supabase.com/docs/guides/api/generating-types -- Step by step manual on updating the types (must be done after changing the database schema): - - Install `supabase` package - - Init and start development supabase server: - - `npx supabase init` - - `npx supabase start` - - Fill in current schema: - - `psql -h localhost -p 54322 -U postgres -d postgres -a -f src/main/sql/schema.sql` (password: `postgres`) - - Generate the file with type definitions: - - `npx supabase gen types typescript --schema public --local > src/main/typescript/db-client/database.types.ts` - - Cleanup: - - `npx supabase stop` - - `rm -rf ./supabase` - -#### Insert sample data - -- Can be used to test GUI applications without running entire ledger / persistence setup. -- `psql -h localhost -p 54322 -U postgres -d postgres -a -f src/test/sql/insert-test-data.sql` (password: `postgres`) - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments diff --git a/packages/cactus-plugin-persistence-ethereum/openapitools.json b/packages/cactus-plugin-persistence-ethereum/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/package.json b/packages/cactus-plugin-persistence-ethereum/package.json deleted file mode 100644 index 638aefd49b..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-persistence-ethereum", - "version": "2.0.0", - "description": "Persistence plugin for Ethereum ledgers to store data into a database.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - }, - { - "name": "Tomasz Awramski", - "email": "tomasz.awramski@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "build": "npm run build-ts && npm run build:dev:backend:postbuild", - "build-ts": "tsc", - "build:dev:backend:postbuild": "npm run copy-sql && npm run copy-yarn-lock", - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "copy-sql": "mkdir -p ./dist/lib/main/ && cp -Rfp ./src/main/sql ./dist/lib/main/", - "copy-yarn-lock": "mkdir -p ./dist/lib/ && cp -rfp ../../yarn.lock ./dist/yarn.lock", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "complete-sample-scenario": "npm run build && node ./dist/lib/test/typescript/manual/complete-sample-scenario.js", - "sample-setup": "npm run build && node ./dist/lib/test/typescript/manual/sample-setup.js" - }, - "dependencies": { - "@ethersproject/abi": "5.7.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0", - "async-mutex": "0.4.0", - "axios": "1.7.7", - "pg": "8.8.0", - "run-time-error-cjs": "1.4.0", - "uuid": "10.0.0", - "web3-utils": "4.3.0", - "web3-validator": "2.0.2" - }, - "devDependencies": { - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-geth-ledger": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@openapitools/openapi-generator-cli": "2.7.0", - "@types/express": "5.0.0", - "@types/pg": "8.6.5", - "body-parser": "1.20.3", - "express": "4.21.0", - "jest-extended": "4.0.1", - "npm-run-all": "4.1.5", - "rxjs": "7.8.1", - "socket.io": "4.6.2", - "web3": "4.0.3", - "web3-eth-accounts": "4.0.3" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "watch": {} -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 69890fbb6c..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,15 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_error_exception_response_v1.go -model_monitored_token.go -model_status_response_v1.go -model_token_type_v1.go -model_tracked_operation_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 864b8f2954..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,116 +0,0 @@ -# Go API client for cactus-plugin-persistence-ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-persistence-ethereum "github.com/hyperledger/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-persistence-ethereum.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-persistence-ethereum.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-persistence-ethereum.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-persistence-ethereum.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**GetStatusV1**](docs/DefaultApi.md#getstatusv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status | Get the status of persistence plugin for ethereum - - -## Documentation For Models - - - [ErrorExceptionResponseV1](docs/ErrorExceptionResponseV1.md) - - [MonitoredToken](docs/MonitoredToken.md) - - [StatusResponseV1](docs/StatusResponseV1.md) - - [TokenTypeV1](docs/TokenTypeV1.md) - - [TrackedOperationV1](docs/TrackedOperationV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index 48dcafc376..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,148 +0,0 @@ -openapi: 3.0.3 -info: - description: Synchronizes state of an ethereum ledger into a DB that can later be - viewed in GUI - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - Persistence Ethereum - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status: - get: - operationId: getStatusV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/StatusResponseV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Get the status of persistence plugin for ethereum - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status -components: - schemas: - TokenTypeV1: - enum: - - erc20 - - erc721 - type: string - x-enum-descriptions: - - "EIP-20: Token Standard" - - "EIP-721: Non-Fungible Token Standard" - x-enum-varnames: - - ERC20 - - ERC721 - MonitoredToken: - description: Ethereum tokens that are being monitored by the persistence plugin. - properties: - type: - $ref: '#/components/schemas/TokenTypeV1' - name: - description: Token name - nullable: false - type: string - symbol: - description: Token symbol - nullable: false - type: string - required: - - name - - symbol - - type - type: object - TrackedOperationV1: - description: Persistence plugin operation that is tracked and returned in status - report. - example: - operation: operation - startAt: startAt - properties: - startAt: - description: Start time of the operation. - nullable: false - type: string - operation: - description: Operation name. - nullable: false - type: string - required: - - operation - - startAt - type: object - StatusResponseV1: - description: Response with plugin status report. - example: - connected: true - monitoredTokensCount: 0.8008281904610115 - instanceId: instanceId - lastSeenBlock: 6.027456183070403 - monitorRunning: true - webServicesRegistered: true - operationsRunning: - - operation: operation - startAt: startAt - - operation: operation - startAt: startAt - properties: - instanceId: - description: Plugin instance id. - nullable: false - type: string - connected: - description: "True if successfully connected to the database, false otherwise." - nullable: false - type: boolean - webServicesRegistered: - description: True if web services were correctly exported. - nullable: false - type: boolean - monitoredTokensCount: - description: Total number of tokens being monitored by the plugin. - nullable: false - type: number - operationsRunning: - items: - $ref: '#/components/schemas/TrackedOperationV1' - type: array - monitorRunning: - description: "True if block monitoring is running, false otherwise." - nullable: false - type: boolean - lastSeenBlock: - description: Number of the last block seen by the block monitor. - nullable: false - type: number - required: - - connected - - instanceId - - lastSeenBlock - - monitorRunning - - monitoredTokensCount - - operationsRunning - - webServicesRegistered - type: object - ErrorExceptionResponseV1: - properties: - message: - nullable: false - type: string - error: - nullable: false - type: string - required: - - error - - message - type: object diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 52c6c3c318..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,130 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-ethereum - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiGetStatusV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetStatusV1Request) Execute() (*StatusResponseV1, *http.Response, error) { - return r.ApiService.GetStatusV1Execute(r) -} - -/* -GetStatusV1 Get the status of persistence plugin for ethereum - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetStatusV1Request -*/ -func (a *DefaultApiService) GetStatusV1(ctx context.Context) ApiGetStatusV1Request { - return ApiGetStatusV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return StatusResponseV1 -func (a *DefaultApiService) GetStatusV1Execute(r ApiGetStatusV1Request) (*StatusResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *StatusResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetStatusV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index 74f6f6649c..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-ethereum - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Persistence Ethereum API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index b74af4bcee..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-ethereum - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index 7b679f4baa..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go deleted file mode 100644 index a9dd34a24d..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-ethereum - -import ( - "encoding/json" -) - -// checks if the ErrorExceptionResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorExceptionResponseV1{} - -// ErrorExceptionResponseV1 struct for ErrorExceptionResponseV1 -type ErrorExceptionResponseV1 struct { - Message string `json:"message"` - Error string `json:"error"` -} - -// NewErrorExceptionResponseV1 instantiates a new ErrorExceptionResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorExceptionResponseV1(message string, error_ string) *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - this.Message = message - this.Error = error_ - return &this -} - -// NewErrorExceptionResponseV1WithDefaults instantiates a new ErrorExceptionResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorExceptionResponseV1WithDefaults() *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - return &this -} - -// GetMessage returns the Message field value -func (o *ErrorExceptionResponseV1) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ErrorExceptionResponseV1) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -func (o *ErrorExceptionResponseV1) GetError() string { - if o == nil { - var ret string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ErrorExceptionResponseV1) SetError(v string) { - o.Error = v -} - -func (o ErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorExceptionResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error - return toSerialize, nil -} - -type NullableErrorExceptionResponseV1 struct { - value *ErrorExceptionResponseV1 - isSet bool -} - -func (v NullableErrorExceptionResponseV1) Get() *ErrorExceptionResponseV1 { - return v.value -} - -func (v *NullableErrorExceptionResponseV1) Set(val *ErrorExceptionResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableErrorExceptionResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorExceptionResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorExceptionResponseV1(val *ErrorExceptionResponseV1) *NullableErrorExceptionResponseV1 { - return &NullableErrorExceptionResponseV1{value: val, isSet: true} -} - -func (v NullableErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorExceptionResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_monitored_token.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_monitored_token.go deleted file mode 100644 index 057e2e1c2a..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_monitored_token.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-ethereum - -import ( - "encoding/json" -) - -// checks if the MonitoredToken type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MonitoredToken{} - -// MonitoredToken Ethereum tokens that are being monitored by the persistence plugin. -type MonitoredToken struct { - Type TokenTypeV1 `json:"type"` - // Token name - Name string `json:"name"` - // Token symbol - Symbol string `json:"symbol"` -} - -// NewMonitoredToken instantiates a new MonitoredToken object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewMonitoredToken(type_ TokenTypeV1, name string, symbol string) *MonitoredToken { - this := MonitoredToken{} - this.Type = type_ - this.Name = name - this.Symbol = symbol - return &this -} - -// NewMonitoredTokenWithDefaults instantiates a new MonitoredToken object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewMonitoredTokenWithDefaults() *MonitoredToken { - this := MonitoredToken{} - return &this -} - -// GetType returns the Type field value -func (o *MonitoredToken) GetType() TokenTypeV1 { - if o == nil { - var ret TokenTypeV1 - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *MonitoredToken) GetTypeOk() (*TokenTypeV1, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *MonitoredToken) SetType(v TokenTypeV1) { - o.Type = v -} - -// GetName returns the Name field value -func (o *MonitoredToken) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *MonitoredToken) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *MonitoredToken) SetName(v string) { - o.Name = v -} - -// GetSymbol returns the Symbol field value -func (o *MonitoredToken) GetSymbol() string { - if o == nil { - var ret string - return ret - } - - return o.Symbol -} - -// GetSymbolOk returns a tuple with the Symbol field value -// and a boolean to check if the value has been set. -func (o *MonitoredToken) GetSymbolOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Symbol, true -} - -// SetSymbol sets field value -func (o *MonitoredToken) SetSymbol(v string) { - o.Symbol = v -} - -func (o MonitoredToken) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o MonitoredToken) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["name"] = o.Name - toSerialize["symbol"] = o.Symbol - return toSerialize, nil -} - -type NullableMonitoredToken struct { - value *MonitoredToken - isSet bool -} - -func (v NullableMonitoredToken) Get() *MonitoredToken { - return v.value -} - -func (v *NullableMonitoredToken) Set(val *MonitoredToken) { - v.value = val - v.isSet = true -} - -func (v NullableMonitoredToken) IsSet() bool { - return v.isSet -} - -func (v *NullableMonitoredToken) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMonitoredToken(val *MonitoredToken) *NullableMonitoredToken { - return &NullableMonitoredToken{value: val, isSet: true} -} - -func (v NullableMonitoredToken) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMonitoredToken) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_status_response_v1.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_status_response_v1.go deleted file mode 100644 index beeea27206..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_status_response_v1.go +++ /dev/null @@ -1,285 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-ethereum - -import ( - "encoding/json" -) - -// checks if the StatusResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StatusResponseV1{} - -// StatusResponseV1 Response with plugin status report. -type StatusResponseV1 struct { - // Plugin instance id. - InstanceId string `json:"instanceId"` - // True if successfully connected to the database, false otherwise. - Connected bool `json:"connected"` - // True if web services were correctly exported. - WebServicesRegistered bool `json:"webServicesRegistered"` - // Total number of tokens being monitored by the plugin. - MonitoredTokensCount float32 `json:"monitoredTokensCount"` - OperationsRunning []TrackedOperationV1 `json:"operationsRunning"` - // True if block monitoring is running, false otherwise. - MonitorRunning bool `json:"monitorRunning"` - // Number of the last block seen by the block monitor. - LastSeenBlock float32 `json:"lastSeenBlock"` -} - -// NewStatusResponseV1 instantiates a new StatusResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStatusResponseV1(instanceId string, connected bool, webServicesRegistered bool, monitoredTokensCount float32, operationsRunning []TrackedOperationV1, monitorRunning bool, lastSeenBlock float32) *StatusResponseV1 { - this := StatusResponseV1{} - this.InstanceId = instanceId - this.Connected = connected - this.WebServicesRegistered = webServicesRegistered - this.MonitoredTokensCount = monitoredTokensCount - this.OperationsRunning = operationsRunning - this.MonitorRunning = monitorRunning - this.LastSeenBlock = lastSeenBlock - return &this -} - -// NewStatusResponseV1WithDefaults instantiates a new StatusResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStatusResponseV1WithDefaults() *StatusResponseV1 { - this := StatusResponseV1{} - return &this -} - -// GetInstanceId returns the InstanceId field value -func (o *StatusResponseV1) GetInstanceId() string { - if o == nil { - var ret string - return ret - } - - return o.InstanceId -} - -// GetInstanceIdOk returns a tuple with the InstanceId field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.InstanceId, true -} - -// SetInstanceId sets field value -func (o *StatusResponseV1) SetInstanceId(v string) { - o.InstanceId = v -} - -// GetConnected returns the Connected field value -func (o *StatusResponseV1) GetConnected() bool { - if o == nil { - var ret bool - return ret - } - - return o.Connected -} - -// GetConnectedOk returns a tuple with the Connected field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetConnectedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Connected, true -} - -// SetConnected sets field value -func (o *StatusResponseV1) SetConnected(v bool) { - o.Connected = v -} - -// GetWebServicesRegistered returns the WebServicesRegistered field value -func (o *StatusResponseV1) GetWebServicesRegistered() bool { - if o == nil { - var ret bool - return ret - } - - return o.WebServicesRegistered -} - -// GetWebServicesRegisteredOk returns a tuple with the WebServicesRegistered field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetWebServicesRegisteredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.WebServicesRegistered, true -} - -// SetWebServicesRegistered sets field value -func (o *StatusResponseV1) SetWebServicesRegistered(v bool) { - o.WebServicesRegistered = v -} - -// GetMonitoredTokensCount returns the MonitoredTokensCount field value -func (o *StatusResponseV1) GetMonitoredTokensCount() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.MonitoredTokensCount -} - -// GetMonitoredTokensCountOk returns a tuple with the MonitoredTokensCount field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetMonitoredTokensCountOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.MonitoredTokensCount, true -} - -// SetMonitoredTokensCount sets field value -func (o *StatusResponseV1) SetMonitoredTokensCount(v float32) { - o.MonitoredTokensCount = v -} - -// GetOperationsRunning returns the OperationsRunning field value -func (o *StatusResponseV1) GetOperationsRunning() []TrackedOperationV1 { - if o == nil { - var ret []TrackedOperationV1 - return ret - } - - return o.OperationsRunning -} - -// GetOperationsRunningOk returns a tuple with the OperationsRunning field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetOperationsRunningOk() ([]TrackedOperationV1, bool) { - if o == nil { - return nil, false - } - return o.OperationsRunning, true -} - -// SetOperationsRunning sets field value -func (o *StatusResponseV1) SetOperationsRunning(v []TrackedOperationV1) { - o.OperationsRunning = v -} - -// GetMonitorRunning returns the MonitorRunning field value -func (o *StatusResponseV1) GetMonitorRunning() bool { - if o == nil { - var ret bool - return ret - } - - return o.MonitorRunning -} - -// GetMonitorRunningOk returns a tuple with the MonitorRunning field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetMonitorRunningOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.MonitorRunning, true -} - -// SetMonitorRunning sets field value -func (o *StatusResponseV1) SetMonitorRunning(v bool) { - o.MonitorRunning = v -} - -// GetLastSeenBlock returns the LastSeenBlock field value -func (o *StatusResponseV1) GetLastSeenBlock() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.LastSeenBlock -} - -// GetLastSeenBlockOk returns a tuple with the LastSeenBlock field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetLastSeenBlockOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.LastSeenBlock, true -} - -// SetLastSeenBlock sets field value -func (o *StatusResponseV1) SetLastSeenBlock(v float32) { - o.LastSeenBlock = v -} - -func (o StatusResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StatusResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["instanceId"] = o.InstanceId - toSerialize["connected"] = o.Connected - toSerialize["webServicesRegistered"] = o.WebServicesRegistered - toSerialize["monitoredTokensCount"] = o.MonitoredTokensCount - toSerialize["operationsRunning"] = o.OperationsRunning - toSerialize["monitorRunning"] = o.MonitorRunning - toSerialize["lastSeenBlock"] = o.LastSeenBlock - return toSerialize, nil -} - -type NullableStatusResponseV1 struct { - value *StatusResponseV1 - isSet bool -} - -func (v NullableStatusResponseV1) Get() *StatusResponseV1 { - return v.value -} - -func (v *NullableStatusResponseV1) Set(val *StatusResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableStatusResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableStatusResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStatusResponseV1(val *StatusResponseV1) *NullableStatusResponseV1 { - return &NullableStatusResponseV1{value: val, isSet: true} -} - -func (v NullableStatusResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStatusResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_token_type_v1.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_token_type_v1.go deleted file mode 100644 index 4a55785a30..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_token_type_v1.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-ethereum - -import ( - "encoding/json" - "fmt" -) - -// TokenTypeV1 the model 'TokenTypeV1' -type TokenTypeV1 string - -// List of TokenTypeV1 -const ( - ERC20 TokenTypeV1 = "erc20" - ERC721 TokenTypeV1 = "erc721" -) - -// All allowed values of TokenTypeV1 enum -var AllowedTokenTypeV1EnumValues = []TokenTypeV1{ - "erc20", - "erc721", -} - -func (v *TokenTypeV1) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := TokenTypeV1(value) - for _, existing := range AllowedTokenTypeV1EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid TokenTypeV1", value) -} - -// NewTokenTypeV1FromValue returns a pointer to a valid TokenTypeV1 -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewTokenTypeV1FromValue(v string) (*TokenTypeV1, error) { - ev := TokenTypeV1(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for TokenTypeV1: valid values are %v", v, AllowedTokenTypeV1EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v TokenTypeV1) IsValid() bool { - for _, existing := range AllowedTokenTypeV1EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TokenTypeV1 value -func (v TokenTypeV1) Ptr() *TokenTypeV1 { - return &v -} - -type NullableTokenTypeV1 struct { - value *TokenTypeV1 - isSet bool -} - -func (v NullableTokenTypeV1) Get() *TokenTypeV1 { - return v.value -} - -func (v *NullableTokenTypeV1) Set(val *TokenTypeV1) { - v.value = val - v.isSet = true -} - -func (v NullableTokenTypeV1) IsSet() bool { - return v.isSet -} - -func (v *NullableTokenTypeV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTokenTypeV1(val *TokenTypeV1) *NullableTokenTypeV1 { - return &NullableTokenTypeV1{value: val, isSet: true} -} - -func (v NullableTokenTypeV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTokenTypeV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_tracked_operation_v1.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_tracked_operation_v1.go deleted file mode 100644 index 2969d32a8d..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/model_tracked_operation_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-ethereum - -import ( - "encoding/json" -) - -// checks if the TrackedOperationV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TrackedOperationV1{} - -// TrackedOperationV1 Persistence plugin operation that is tracked and returned in status report. -type TrackedOperationV1 struct { - // Start time of the operation. - StartAt string `json:"startAt"` - // Operation name. - Operation string `json:"operation"` -} - -// NewTrackedOperationV1 instantiates a new TrackedOperationV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTrackedOperationV1(startAt string, operation string) *TrackedOperationV1 { - this := TrackedOperationV1{} - this.StartAt = startAt - this.Operation = operation - return &this -} - -// NewTrackedOperationV1WithDefaults instantiates a new TrackedOperationV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTrackedOperationV1WithDefaults() *TrackedOperationV1 { - this := TrackedOperationV1{} - return &this -} - -// GetStartAt returns the StartAt field value -func (o *TrackedOperationV1) GetStartAt() string { - if o == nil { - var ret string - return ret - } - - return o.StartAt -} - -// GetStartAtOk returns a tuple with the StartAt field value -// and a boolean to check if the value has been set. -func (o *TrackedOperationV1) GetStartAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StartAt, true -} - -// SetStartAt sets field value -func (o *TrackedOperationV1) SetStartAt(v string) { - o.StartAt = v -} - -// GetOperation returns the Operation field value -func (o *TrackedOperationV1) GetOperation() string { - if o == nil { - var ret string - return ret - } - - return o.Operation -} - -// GetOperationOk returns a tuple with the Operation field value -// and a boolean to check if the value has been set. -func (o *TrackedOperationV1) GetOperationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Operation, true -} - -// SetOperation sets field value -func (o *TrackedOperationV1) SetOperation(v string) { - o.Operation = v -} - -func (o TrackedOperationV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TrackedOperationV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["startAt"] = o.StartAt - toSerialize["operation"] = o.Operation - return toSerialize, nil -} - -type NullableTrackedOperationV1 struct { - value *TrackedOperationV1 - isSet bool -} - -func (v NullableTrackedOperationV1) Get() *TrackedOperationV1 { - return v.value -} - -func (v *NullableTrackedOperationV1) Set(val *TrackedOperationV1) { - v.value = val - v.isSet = true -} - -func (v NullableTrackedOperationV1) IsSet() bool { - return v.isSet -} - -func (v *NullableTrackedOperationV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTrackedOperationV1(val *TrackedOperationV1) *NullableTrackedOperationV1 { - return &NullableTrackedOperationV1{value: val, isSet: true} -} - -func (v NullableTrackedOperationV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTrackedOperationV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index 67e58a71fa..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-ethereum - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index a44c39da81..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-persistence-ethereum - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-persistence-ethereum_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService GetStatusV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetStatusV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index 9cf5a966fd..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Ethereum - -Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-ethereum - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/json/contract-abi/ERC20.json b/packages/cactus-plugin-persistence-ethereum/src/main/json/contract-abi/ERC20.json deleted file mode 100644 index b74b1b223b..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/json/contract-abi/ERC20.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20", - "sourceName": "contracts/token/ERC20/ERC20.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "allowance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "name": "ERC20InsufficientAllowance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "name": "ERC20InsufficientBalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "approver", - "type": "address" - } - ], - "name": "ERC20InvalidApprover", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "ERC20InvalidReceiver", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "ERC20InvalidSender", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "ERC20InvalidSpender", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/json/contract-abi/ERC721.json b/packages/cactus-plugin-persistence-ethereum/src/main/json/contract-abi/ERC721.json deleted file mode 100644 index c546e80625..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/json/contract-abi/ERC721.json +++ /dev/null @@ -1,444 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC721", - "sourceName": "contracts/token/ERC721/ERC721.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "ERC721IncorrectOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ERC721InsufficientApproval", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "approver", - "type": "address" - } - ], - "name": "ERC721InvalidApprover", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "ERC721InvalidOperator", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "ERC721InvalidOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "ERC721InvalidReceiver", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "ERC721InvalidSender", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ERC721NonexistentToken", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/json/openapi.json b/packages/cactus-plugin-persistence-ethereum/src/main/json/openapi.json deleted file mode 100644 index 4b1bc3d68c..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/json/openapi.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Persistence Ethereum", - "description": "Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "TokenTypeV1": { - "type": "string", - "enum": ["erc20", "erc721"], - "x-enum-descriptions": [ - "EIP-20: Token Standard", - "EIP-721: Non-Fungible Token Standard" - ], - "x-enum-varnames": ["ERC20", "ERC721"] - }, - "MonitoredToken": { - "description": "Ethereum tokens that are being monitored by the persistence plugin.", - "type": "object", - "required": ["type", "name", "symbol"], - "properties": { - "type": { - "$ref": "#/components/schemas/TokenTypeV1" - }, - "name": { - "type": "string", - "nullable": false, - "description": "Token name" - }, - "symbol": { - "type": "string", - "nullable": false, - "description": "Token symbol" - } - } - }, - "TrackedOperationV1": { - "description": "Persistence plugin operation that is tracked and returned in status report.", - "type": "object", - "required": ["startAt", "operation"], - "properties": { - "startAt": { - "type": "string", - "nullable": false, - "description": "Start time of the operation." - }, - "operation": { - "type": "string", - "nullable": false, - "description": "Operation name." - } - } - }, - "StatusResponseV1": { - "description": "Response with plugin status report.", - "type": "object", - "required": [ - "instanceId", - "connected", - "webServicesRegistered", - "monitoredTokensCount", - "operationsRunning", - "monitorRunning", - "lastSeenBlock" - ], - "properties": { - "instanceId": { - "type": "string", - "nullable": false, - "description": "Plugin instance id." - }, - "connected": { - "type": "boolean", - "nullable": false, - "description": "True if successfully connected to the database, false otherwise." - }, - "webServicesRegistered": { - "type": "boolean", - "nullable": false, - "description": "True if web services were correctly exported." - }, - "monitoredTokensCount": { - "type": "number", - "nullable": false, - "description": "Total number of tokens being monitored by the plugin." - }, - "operationsRunning": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TrackedOperationV1" - } - }, - "monitorRunning": { - "type": "boolean", - "nullable": false, - "description": "True if block monitoring is running, false otherwise." - }, - "lastSeenBlock": { - "type": "number", - "nullable": false, - "description": "Number of the last block seen by the block monitor." - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status" - } - }, - "operationId": "getStatusV1", - "summary": "Get the status of persistence plugin for ethereum", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/StatusResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/json/openapi.tpl.json b/packages/cactus-plugin-persistence-ethereum/src/main/json/openapi.tpl.json deleted file mode 100644 index 4b1bc3d68c..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Persistence Ethereum", - "description": "Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "TokenTypeV1": { - "type": "string", - "enum": ["erc20", "erc721"], - "x-enum-descriptions": [ - "EIP-20: Token Standard", - "EIP-721: Non-Fungible Token Standard" - ], - "x-enum-varnames": ["ERC20", "ERC721"] - }, - "MonitoredToken": { - "description": "Ethereum tokens that are being monitored by the persistence plugin.", - "type": "object", - "required": ["type", "name", "symbol"], - "properties": { - "type": { - "$ref": "#/components/schemas/TokenTypeV1" - }, - "name": { - "type": "string", - "nullable": false, - "description": "Token name" - }, - "symbol": { - "type": "string", - "nullable": false, - "description": "Token symbol" - } - } - }, - "TrackedOperationV1": { - "description": "Persistence plugin operation that is tracked and returned in status report.", - "type": "object", - "required": ["startAt", "operation"], - "properties": { - "startAt": { - "type": "string", - "nullable": false, - "description": "Start time of the operation." - }, - "operation": { - "type": "string", - "nullable": false, - "description": "Operation name." - } - } - }, - "StatusResponseV1": { - "description": "Response with plugin status report.", - "type": "object", - "required": [ - "instanceId", - "connected", - "webServicesRegistered", - "monitoredTokensCount", - "operationsRunning", - "monitorRunning", - "lastSeenBlock" - ], - "properties": { - "instanceId": { - "type": "string", - "nullable": false, - "description": "Plugin instance id." - }, - "connected": { - "type": "boolean", - "nullable": false, - "description": "True if successfully connected to the database, false otherwise." - }, - "webServicesRegistered": { - "type": "boolean", - "nullable": false, - "description": "True if web services were correctly exported." - }, - "monitoredTokensCount": { - "type": "number", - "nullable": false, - "description": "Total number of tokens being monitored by the plugin." - }, - "operationsRunning": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TrackedOperationV1" - } - }, - "monitorRunning": { - "type": "boolean", - "nullable": false, - "description": "True if block monitoring is running, false otherwise." - }, - "lastSeenBlock": { - "type": "number", - "nullable": false, - "description": "Number of the last block seen by the block monitor." - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status" - } - }, - "operationId": "getStatusV1", - "summary": "Get the status of persistence plugin for ethereum", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/StatusResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/sql/schema.sql b/packages/cactus-plugin-persistence-ethereum/src/main/sql/schema.sql deleted file mode 100644 index 85fea39df9..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/sql/schema.sql +++ /dev/null @@ -1,369 +0,0 @@ ---- Clean start: ---- DROP SCHEMA ethereum CASCADE; - -CREATE SCHEMA IF NOT EXISTS ethereum; - -ALTER SCHEMA ethereum OWNER TO postgres; - --- Table: public.plugin_status - --- DROP TABLE IF EXISTS public.plugin_status; - -CREATE TABLE IF NOT EXISTS public.plugin_status -( - name text COLLATE pg_catalog."default" NOT NULL, - last_instance_id text COLLATE pg_catalog."default" NOT NULL, - is_schema_initialized boolean NOT NULL, - created_at timestamp with time zone NOT NULL DEFAULT now(), - last_connected_at timestamp with time zone NOT NULL DEFAULT now(), - CONSTRAINT plugin_status_pkey PRIMARY KEY (name), - CONSTRAINT plugin_status_name_key UNIQUE (name) -) - -TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.plugin_status - OWNER to postgres; - -GRANT ALL ON TABLE public.plugin_status TO anon; -GRANT ALL ON TABLE public.plugin_status TO authenticated; -GRANT ALL ON TABLE public.plugin_status TO postgres; -GRANT ALL ON TABLE public.plugin_status TO service_role; - --- Table: ethereum.block - --- DROP TABLE IF EXISTS ethereum.block; - -CREATE TABLE IF NOT EXISTS ethereum.block -( - "number" numeric NOT NULL, - created_at timestamptz NOT NULL, - hash text COLLATE pg_catalog."default" NOT NULL, - number_of_tx numeric NOT NULL, - sync_at timestamptz NOT NULL DEFAULT now(), - CONSTRAINT block_pkey PRIMARY KEY ("number"), - CONSTRAINT block_hash_key UNIQUE (hash), - CONSTRAINT block_number_key UNIQUE ("number") -); - -ALTER TABLE IF EXISTS ethereum.block - OWNER to postgres; - --- Table: ethereum.token_metadata_erc20 - --- DROP TABLE IF EXISTS ethereum."token_metadata_erc20"; - -CREATE TABLE IF NOT EXISTS ethereum."token_metadata_erc20" -( - address text COLLATE pg_catalog."default" NOT NULL, - created_at timestamp with time zone NOT NULL DEFAULT now(), - name text COLLATE pg_catalog."default" NOT NULL, - symbol text COLLATE pg_catalog."default" NOT NULL, - total_supply numeric NOT NULL, - CONSTRAINT "token_erc20_pkey" PRIMARY KEY (address), - CONSTRAINT token_erc20_address_key UNIQUE (address) -); - -ALTER TABLE IF EXISTS ethereum."token_metadata_erc20" - OWNER to postgres; - --- Table: ethereum.token_metadata_erc721 - --- DROP TABLE IF EXISTS ethereum."token_metadata_erc721"; - -CREATE TABLE IF NOT EXISTS ethereum."token_metadata_erc721" -( - address text COLLATE pg_catalog."default" NOT NULL, - created_at timestamp with time zone NOT NULL DEFAULT now(), - name text COLLATE pg_catalog."default" NOT NULL, - symbol text COLLATE pg_catalog."default" NOT NULL, - CONSTRAINT "token_erc721_pkey" PRIMARY KEY (address), - CONSTRAINT token_erc721_address_key UNIQUE (address) -); - -ALTER TABLE IF EXISTS ethereum."token_metadata_erc721" - OWNER to postgres; - --- Table: ethereum.token_erc721 - --- DROP TABLE IF EXISTS ethereum.token_erc721; - -CREATE TABLE IF NOT EXISTS ethereum.token_erc721 -( - id uuid NOT NULL DEFAULT uuid_generate_v4(), - account_address text COLLATE pg_catalog."default" NOT NULL, - token_address text COLLATE pg_catalog."default" NOT NULL, - uri text COLLATE pg_catalog."default" NOT NULL, - token_id numeric NOT NULL, - last_owner_change timestamp without time zone NOT NULL DEFAULT now(), - CONSTRAINT token_erc721_pkey1 PRIMARY KEY (id), - CONSTRAINT token_erc721_contract_tokens_unique UNIQUE (token_address, token_id), - CONSTRAINT token_erc721_token_address_fkey FOREIGN KEY (token_address) - REFERENCES ethereum.token_metadata_erc721 (address) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - - -ALTER TABLE IF EXISTS ethereum.token_erc721 - OWNER to postgres; - --- Table: ethereum.transaction - --- DROP TABLE IF EXISTS ethereum.transaction; - -CREATE TABLE IF NOT EXISTS ethereum.transaction -( - id uuid NOT NULL DEFAULT uuid_generate_v4(), - index numeric NOT NULL, - hash text COLLATE pg_catalog."default" NOT NULL, - block_number numeric NOT NULL, - "from" text COLLATE pg_catalog."default" NOT NULL, - "to" text COLLATE pg_catalog."default" NOT NULL, - eth_value numeric NOT NULL, - method_signature text COLLATE pg_catalog."default" NOT NULL, - method_name text COLLATE pg_catalog."default" NOT NULL, - CONSTRAINT transaction_pkey PRIMARY KEY (id), - CONSTRAINT transaction_hash_key UNIQUE (hash), - CONSTRAINT transaction_block_number_fkey FOREIGN KEY (block_number) - REFERENCES ethereum.block ("number") MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - -ALTER TABLE IF EXISTS ethereum.transaction - OWNER to postgres; - --- Table: ethereum.token_transfer - --- DROP TABLE IF EXISTS ethereum.token_transfer; - -CREATE TABLE IF NOT EXISTS ethereum.token_transfer -( - id uuid NOT NULL DEFAULT uuid_generate_v4(), - transaction_id uuid NOT NULL, - sender text COLLATE pg_catalog."default" NOT NULL, - recipient text COLLATE pg_catalog."default" NOT NULL, - value numeric NOT NULL, - CONSTRAINT token_transfer_pkey PRIMARY KEY (id), - CONSTRAINT token_transfer_transaction_id_fkey FOREIGN KEY (transaction_id) - REFERENCES ethereum.transaction (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - -ALTER TABLE IF EXISTS ethereum.token_transfer - OWNER to postgres; - -COMMENT ON COLUMN ethereum.token_transfer.value - IS 'ERC20 - token quantity, ERC721 - token ID'; - ----------------------------------------------------------------------------------------------------- --- VIEWS ----------------------------------------------------------------------------------------------------- - --- View: ethereum.erc20_token_history_view - --- DROP VIEW ethereum.erc20_token_history_view; - -CREATE OR REPLACE VIEW ethereum.erc20_token_history_view - AS - SELECT - tx.hash AS transaction_hash, - tx."to" AS token_address, - b.created_at, - tt.sender, - tt.recipient, - tt.value - FROM ethereum.transaction tx - JOIN ethereum.block b ON tx.block_number = b.number - JOIN ethereum.token_transfer tt ON tx.id = tt.transaction_id - JOIN ethereum.token_metadata_erc20 tkn ON tx.to = tkn.address - ORDER BY b.created_at, tt.recipient; - -ALTER TABLE ethereum.erc20_token_history_view - OWNER TO postgres; - --- View: ethereum.erc721_token_history_view - --- DROP VIEW ethereum.erc721_token_history_view; - -CREATE OR REPLACE VIEW ethereum.erc721_token_history_view - AS - SELECT tx.hash AS transaction_hash, - tx."to" AS token_address, - b.created_at, - tt.sender, - tt.recipient, - tt.value AS token_id - FROM ethereum.transaction tx - JOIN ethereum.block b ON tx.block_number = b.number - JOIN ethereum.token_transfer tt ON tx.id = tt.transaction_id - JOIN ethereum.token_metadata_erc721 tkn ON tx."to" = tkn.address - ORDER BY b.created_at, tt.recipient; - -ALTER TABLE ethereum.erc721_token_history_view - OWNER TO postgres; - --- View: ethereum.token_erc20 - --- DROP MATERIALIZED VIEW IF EXISTS ethereum.token_erc20; - -CREATE MATERIALIZED VIEW IF NOT EXISTS ethereum.token_erc20 -TABLESPACE pg_default -AS -SELECT - balances.account_address, - balances.balance, - balances.token_address, - metadata.name, - metadata.symbol, - metadata.total_supply -FROM - (SELECT balances.account_address, - balances.token_address, - sum(balances.balance) AS balance - FROM ( SELECT erc20_token_history_view.recipient AS account_address, - erc20_token_history_view.token_address, - sum(erc20_token_history_view.value) AS balance - FROM ethereum.erc20_token_history_view - GROUP BY erc20_token_history_view.token_address, erc20_token_history_view.recipient - UNION - SELECT erc20_token_history_view.sender AS account_address, - erc20_token_history_view.token_address, - - sum(erc20_token_history_view.value) AS balance - FROM ethereum.erc20_token_history_view - GROUP BY erc20_token_history_view.token_address, erc20_token_history_view.sender) balances - GROUP BY balances.token_address, balances.account_address - HAVING sum(balances.balance) >= 0::numeric) AS balances - JOIN ethereum.token_metadata_erc20 AS metadata ON balances.token_address = metadata.address -WITH DATA; - -ALTER TABLE IF EXISTS ethereum.token_erc20 - OWNER TO postgres; - -CREATE INDEX token_erc20_account_address_idx ON ethereum.token_erc20(account_address); - -CREATE UNIQUE INDEX token_erc20_uniq_idx - ON ethereum.token_erc20 USING btree - (account_address COLLATE pg_catalog."default", token_address COLLATE pg_catalog."default") - TABLESPACE pg_default; - ----------------------------------------------------------------------------------------------------- --- FUNCTIONS AND PROCEDURES ----------------------------------------------------------------------------------------------------- - --- Refresh ethereum.token_erc20 on new token transfers -CREATE OR REPLACE FUNCTION refresh_token_erc20() -RETURNS TRIGGER AS $$ -BEGIN - REFRESH MATERIALIZED VIEW ethereum.token_erc20; - RETURN NULL; -END; -$$ LANGUAGE plpgsql; - -CREATE TRIGGER refresh_token_erc20_on_token_transfers_trigger -AFTER INSERT OR UPDATE OR DELETE ON ethereum.token_transfer -FOR EACH STATEMENT -EXECUTE FUNCTION refresh_token_erc20(); - --- PROCEDURE: ethereum.update_issued_erc721_tokens(numeric) - --- DROP PROCEDURE IF EXISTS ethereum.update_issued_erc721_tokens(numeric); - -CREATE OR REPLACE PROCEDURE ethereum.update_issued_erc721_tokens(IN from_block_number numeric) -LANGUAGE 'plpgsql' -AS $BODY$ -DECLARE - current_token_entry ethereum.token_erc721%ROWTYPE; - token_transfer record; - block_created_at timestamp; -BEGIN - SELECT created_at - FROM ethereum.block - WHERE number = from_block_number - INTO block_created_at; - - IF NOT found THEN - raise exception 'invalid block provided: %', from_block_number - USING hint = 'ensure that given block was synchronized correctly'; - END IF; - - FOR token_transfer IN SELECT - DISTINCT ON (token_address, token_id) * - FROM ethereum.erc721_token_history_view - WHERE created_at >= block_created_at - ORDER BY token_address, token_id, created_at DESC - LOOP - SELECT * FROM ethereum.token_erc721 - WHERE token_id = token_transfer.token_id AND token_address = token_transfer.token_address - INTO current_token_entry; - - IF NOT found THEN - raise notice 'create entry for new token ID % on contract %', token_transfer.token_id, token_transfer.token_address; - INSERT INTO - ethereum.token_erc721 - VALUES - ( - uuid_generate_v4(), - token_transfer.recipient, - token_transfer.token_address, - '', - token_transfer.token_id, - token_transfer.created_at - ); - ELSE - IF current_token_entry.last_owner_change < token_transfer.created_at THEN - raise notice 'update owner on token ID % on contract %', token_transfer.token_id, token_transfer.token_address; - - UPDATE ethereum.token_erc721 - SET account_address = token_transfer.recipient, - last_owner_change = token_transfer.created_at - WHERE id = current_token_entry.id; - ELSE - raise notice 'current entry is more recent - ignore token ID % on contract %', token_transfer.token_id, token_transfer.token_address; - END IF; - END IF; - END LOOP; -END -$BODY$; - -ALTER PROCEDURE ethereum.update_issued_erc721_tokens(numeric) - OWNER TO postgres; - -GRANT EXECUTE ON PROCEDURE ethereum.update_issued_erc721_tokens(numeric) TO public; - --- FUNCTION: ethereum.get_missing_blocks_in_range(integer, integer) - --- DROP FUNCTION IF EXISTS ethereum.get_missing_blocks_in_range(integer, integer); - -CREATE OR REPLACE FUNCTION ethereum.get_missing_blocks_in_range( - start_number integer, - end_number integer) -RETURNS TABLE(block_number integer) -LANGUAGE 'plpgsql' -COST 100 -VOLATILE PARALLEL UNSAFE -ROWS 1000 -AS $BODY$ -BEGIN - RETURN query - SELECT series AS block_number - FROM generate_series(start_number, end_number, 1) series - LEFT JOIN ethereum.block ON series = block.number - WHERE block.number IS NULL; -END; -$BODY$; - -ALTER FUNCTION ethereum.get_missing_blocks_in_range(integer, integer) - OWNER TO postgres; - -GRANT EXECUTE ON PROCEDURE ethereum.update_issued_erc721_tokens(numeric) TO public; - -GRANT USAGE ON SCHEMA ethereum TO anon, authenticated, service_role; -GRANT ALL ON ALL TABLES IN SCHEMA ethereum TO anon, authenticated, service_role; -GRANT ALL ON ALL ROUTINES IN SCHEMA ethereum TO anon, authenticated, service_role; -GRANT ALL ON ALL SEQUENCES IN SCHEMA ethereum TO anon, authenticated, service_role; -ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA ethereum GRANT ALL ON TABLES TO anon, authenticated, service_role; -ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA ethereum GRANT ALL ON ROUTINES TO anon, authenticated, service_role; -ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA ethereum GRANT ALL ON SEQUENCES TO anon, authenticated, service_role; diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/db-client/database.types.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/db-client/database.types.ts deleted file mode 100644 index 61f626d6e5..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/db-client/database.types.ts +++ /dev/null @@ -1,218 +0,0 @@ -export type Json = - | string - | number - | boolean - | null - | { [key: string]: Json } - | Json[]; - -export interface Database { - ethereum: { - Tables: { - block: { - Row: { - number: number; - created_at: string; - hash: string; - number_of_tx: number; - sync_at: string; - }; - Insert: { - number: number; - created_at: string; - hash: string; - number_of_tx: number; - sync_at?: string; - }; - Update: { - number?: number; - created_at?: string; - hash?: string; - number_of_tx?: number; - sync_at?: string; - }; - }; - plugin_status: { - Row: { - name: string; - last_instance_id: string; - is_schema_initialized: boolean; - created_at: string; - last_connected_at: string; - }; - Insert: { - name: string; - last_instance_id: string; - is_schema_initialized: boolean; - created_at?: string; - last_connected_at?: string; - }; - Update: { - name?: string; - last_instance_id?: string; - is_schema_initialized?: boolean; - created_at?: string; - last_connected_at?: string; - }; - }; - token_erc721: { - Row: { - account_address: string; - token_address: string; - uri: string; - token_id: number; - id: string; - last_owner_change: string; - }; - Insert: { - account_address: string; - token_address: string; - uri: string; - token_id: number; - id?: string; - last_owner_change?: string; - }; - Update: { - account_address?: string; - token_address?: string; - uri?: string; - token_id?: number; - id?: string; - last_owner_change?: string; - }; - }; - token_metadata_erc20: { - Row: { - address: string; - name: string; - symbol: string; - total_supply: number; - created_at: string; - }; - Insert: { - address: string; - name: string; - symbol: string; - total_supply: number; - created_at?: string; - }; - Update: { - address?: string; - name?: string; - symbol?: string; - total_supply?: number; - created_at?: string; - }; - }; - token_metadata_erc721: { - Row: { - address: string; - name: string; - symbol: string; - created_at: string; - }; - Insert: { - address: string; - name: string; - symbol: string; - created_at?: string; - }; - Update: { - address?: string; - name?: string; - symbol?: string; - created_at?: string; - }; - }; - token_transfer: { - Row: { - transaction_id: string; - sender: string; - recipient: string; - value: number; - id: string; - }; - Insert: { - transaction_id: string; - sender: string; - recipient: string; - value: number; - id?: string; - }; - Update: { - transaction_id?: string; - sender?: string; - recipient?: string; - value?: number; - id?: string; - }; - }; - transaction: { - Row: { - index: number; - hash: string; - block_number: number; - from: string; - to: string; - eth_value: number; - method_signature: string; - method_name: string; - id: string; - }; - Insert: { - index: number; - hash: string; - block_number: number; - from: string; - to: string; - eth_value: number; - method_signature: string; - method_name: string; - id?: string; - }; - Update: { - index?: number; - hash?: string; - block_number?: number; - from?: string; - to?: string; - eth_value?: number; - method_signature?: string; - method_name?: string; - id?: string; - }; - }; - }; - Views: { - erc20_token_history_view: { - Row: { - transaction_hash: string | null; - token_address: string | null; - created_at: string | null; - sender: string | null; - recipient: string | null; - value: number | null; - }; - }; - erc721_token_history_view: { - Row: { - transaction_hash: string | null; - token_address: string | null; - created_at: string | null; - sender: string | null; - recipient: string | null; - token_id: number | null; - }; - }; - }; - Functions: { - get_missing_blocks_in_range: { - Args: { start_number: number; end_number: number }; - Returns: { block_number: number }[]; - }; - }; - Enums: { - [_ in never]: never; - }; - }; -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/db-client/db-client.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/db-client/db-client.ts deleted file mode 100644 index c7be13df7b..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/db-client/db-client.ts +++ /dev/null @@ -1,502 +0,0 @@ -/** - * Client class to communicate with PostgreSQL database. - */ - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { Database as DatabaseSchemaType } from "./database.types"; -import { getRuntimeErrorCause } from "../utils"; - -import fs from "fs"; -import path from "path"; -import { Client as PostgresClient } from "pg"; -import { RuntimeError } from "run-time-error-cjs"; - -////////////////////////////////// -// Helper Types -////////////////////////////////// - -type SchemaTables = DatabaseSchemaType["ethereum"]["Tables"]; -type PluginStatusRowType = SchemaTables["plugin_status"]["Row"]; -type BlockRowType = SchemaTables["block"]["Row"]; -type BlockInsertType = SchemaTables["block"]["Insert"]; -type TransactionInsertType = SchemaTables["transaction"]["Insert"]; -type TokenTransferInsertType = SchemaTables["token_transfer"]["Insert"]; -type TokenERC72RowType = SchemaTables["token_erc721"]["Row"]; -type TokenERC72InsertType = SchemaTables["token_erc721"]["Insert"]; -type TokenMetadataERC20RowType = SchemaTables["token_metadata_erc20"]["Row"]; -type TokenMetadataERC20InsertType = - SchemaTables["token_metadata_erc20"]["Insert"]; -type TokenMetadataERC721RowType = SchemaTables["token_metadata_erc721"]["Row"]; -type TokenMetadataERC721InsertType = - SchemaTables["token_metadata_erc721"]["Insert"]; - -type SchemaFunctions = DatabaseSchemaType["ethereum"]["Functions"]; -type GetMissingBlocksInRangeReturnType = - SchemaFunctions["get_missing_blocks_in_range"]["Returns"]; - -// Supabase doesn't generate materialized view types -type TokenERC20RowType = { - account_address: string; - token_address: string; - balance: number; -}; - -export type BlockDataTransferInput = Omit< - TokenTransferInsertType, - "transaction_id" ->; - -export type BlockDataTransactionInput = Omit< - TransactionInsertType, - "block_number" -> & { - token_transfers: BlockDataTransferInput[]; -}; - -type InsertBlockDataInput = { - block: BlockInsertType; - transactions: BlockDataTransactionInput[]; -}; - -export interface PostgresDatabaseClientOptions { - connectionString: string; - logLevel: LogLevelDesc; -} - -////////////////////////////////// -// PostgresDatabaseClient -////////////////////////////////// - -/** - * Client class to communicate with PostgreSQL database. - * Remember to call `connect()` before using ano of the methods. - * - * @todo Use pg connection pool - */ -export default class PostgresDatabaseClient { - private log: Logger; - public static readonly CLASS_NAME = "PostgresDatabaseClient"; - public client: PostgresClient; - public isConnected = false; - - constructor(public options: PostgresDatabaseClientOptions) { - const fnTag = `${PostgresDatabaseClient.CLASS_NAME}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy( - options.connectionString, - `${fnTag} arg options.connectionString`, - ); - - const level = this.options.logLevel || "INFO"; - const label = PostgresDatabaseClient.CLASS_NAME; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.client = new PostgresClient({ - connectionString: options.connectionString, - }); - } - - /** - * Internal method that throws if postgres client is not connected yet. - */ - private assertConnected(): void { - if (!this.isConnected) { - throw new Error( - `${PostgresDatabaseClient.CLASS_NAME} method called before connecting to the DB!`, - ); - } - } - - /** - * Connect to a PostgreSQL database using connection string from the constructor. - */ - public async connect(): Promise { - this.log.info("Connect to PostgreSQL database..."); - await this.client.connect(); - this.isConnected = true; - } - - /** - * Close the connection to to a PostgreSQL database. - */ - public async shutdown(): Promise { - this.log.info("Close connection with PostgreSQL database."); - await this.client.end(); - this.isConnected = false; - } - - /** - * Read status of persistence plugin with specified name. - * @param pluginName name of the persistence plugin - * @returns status row - */ - public async getPluginStatus( - pluginName: string, - ): Promise { - this.assertConnected(); - - const queryResponse = await this.client.query( - "SELECT * FROM public.plugin_status WHERE name = $1", - [pluginName], - ); - - if (queryResponse.rows.length !== 1) { - throw new Error( - `Could not read status of plugin #${pluginName} from the DB`, - ); - } - - return queryResponse.rows[0]; - } - - /** - * Initialize / update entry for specific persistence plugin in the database. - * Create database schema for ethereum data if it was not created yet. - * @param pluginName name of the persistence plugin - * @param instanceId instance id of the persistence plugin - */ - public async initializePlugin( - pluginName: string, - instanceId: string, - ): Promise { - this.assertConnected(); - - let isSchemaInitialized = false; - - try { - const pluginStatus = await this.getPluginStatus(pluginName); - - if (pluginStatus.last_instance_id != instanceId) { - this.log.warn( - `Instance ID in DB different from this plugin id (${pluginStatus.last_instance_id} != ${instanceId})! Make sure only one persistence plugin is running at a time!`, - ); - } - - isSchemaInitialized = pluginStatus.is_schema_initialized; - } catch (error) { - this.log.info("No status in the DB for plugin", pluginName); - } - - if (!isSchemaInitialized) { - const schemaPath = path.join(__dirname, "../../sql/schema.sql"); - this.log.info( - "Path to SQL script to create a database schema:", - schemaPath, - ); - - const schemaSql = fs.readFileSync(schemaPath, "utf8"); - this.log.debug("Schema file length:", schemaSql.length); - - await this.client.query(schemaSql); - isSchemaInitialized = true; - - this.log.info("Schema DB initialized."); - } - - this.log.info( - `Update status for plugin ${pluginName} with instanceId ${instanceId}`, - ); - const updatePluginInfo = await this.client.query( - `INSERT INTO public.plugin_status("name", "last_instance_id", "is_schema_initialized") - VALUES ($1, $2, $3) - ON CONFLICT ON CONSTRAINT plugin_status_pkey - DO - UPDATE SET - last_instance_id = EXCLUDED.last_instance_id, - is_schema_initialized = EXCLUDED.is_schema_initialized, - last_connected_at=now(); - `, - [pluginName, instanceId, isSchemaInitialized], - ); - this.log.debug( - `Plugin status updated for ${updatePluginInfo.rowCount} rows.`, - ); - } - - /** - * Read all ERC20 token metadata. - * @returns ERC20 token metadata - */ - public async getTokenMetadataERC20(): Promise { - this.assertConnected(); - - const queryResponse = await this.client.query( - "SELECT * FROM ethereum.token_metadata_erc20", - ); - this.log.debug( - `Received ${queryResponse.rowCount} rows from table token_metadata_erc20`, - ); - return queryResponse.rows; - } - - /** - * Insert new ERC20 token metadata into the database. - * @param token ERC20 token metadata - */ - public async insertTokenMetadataERC20( - token: TokenMetadataERC20InsertType, - ): Promise { - this.assertConnected(); - - this.log.debug("Insert ERC20 token metadata:", token); - const insertResponse = await this.client.query( - `INSERT INTO ethereum.token_metadata_erc20("address", "name", "symbol", "total_supply") VALUES ($1, $2, $3, $4)`, - [token.address, token.name, token.symbol, token.total_supply], - ); - this.log.info( - `Inserted ${insertResponse.rowCount} rows into table token_metadata_erc20`, - ); - } - - /** - * Read all ERC721 token metadata. - * @returns ERC721 token metadata - */ - public async getTokenMetadataERC721(): Promise { - this.assertConnected(); - - const queryResponse = await this.client.query( - "SELECT * FROM ethereum.token_metadata_erc721", - ); - this.log.debug( - `Received ${queryResponse.rowCount} rows from table token_metadata_erc721`, - ); - return queryResponse.rows; - } - - /** - * Insert new ERC721 token metadata into the database. - * @param token ERC721 token metadata - */ - public async insertTokenMetadataERC721( - token: TokenMetadataERC721InsertType, - ): Promise { - this.assertConnected(); - - this.log.debug("Insert ERC721 token metadata:", token); - const insertResponse = await this.client.query( - `INSERT INTO ethereum.token_metadata_erc721("address", "name", "symbol") VALUES ($1, $2, $3)`, - [token.address, token.name, token.symbol], - ); - this.log.info( - `Inserted ${insertResponse.rowCount} rows into table token_metadata_erc721`, - ); - } - - /** - * Insert or update data of issued ERC721 token. - * @param token ERC721 token data. - */ - public async upsertTokenERC721(token: TokenERC72InsertType): Promise { - this.assertConnected(); - - this.log.debug("Insert ERC721 token if not present yet:", token); - const insertResponse = await this.client.query( - `INSERT INTO ethereum.token_erc721("account_address", "token_address", "uri", "token_id") - VALUES ($1, $2, $3, $4) - ON CONFLICT ON CONSTRAINT token_erc721_contract_tokens_unique - DO - UPDATE SET account_address = EXCLUDED.account_address; - `, - [token.account_address, token.token_address, token.uri, token.token_id], - ); - this.log.debug( - `Inserted ${insertResponse.rowCount} rows into table token_erc721`, - ); - } - - /** - * Read all ERC20 token balances - * @returns ERC20 token balances - */ - public async getTokenERC20(): Promise { - this.assertConnected(); - - const queryResponse = await this.client.query( - "SELECT * FROM ethereum.token_erc20", - ); - this.log.debug( - `Received ${queryResponse.rowCount} rows from table token_erc20`, - ); - return queryResponse.rows; - } - - /** - * Read all issued ERC721 tokens. - * @returns ERC721 tokens - */ - public async getTokenERC721(): Promise { - this.assertConnected(); - - const queryResponse = await this.client.query( - "SELECT * FROM ethereum.token_erc721", - ); - this.log.debug( - `Received ${queryResponse.rowCount} rows from table token_erc721`, - ); - return queryResponse.rows; - } - - /** - * Synchronize current ERC20 token balances in the DB. - */ - public async syncTokenBalanceERC20(): Promise { - this.assertConnected(); - - await this.client.query( - "REFRESH MATERIALIZED VIEW CONCURRENTLY ethereum.token_erc20", - ); - this.log.debug("Refreshing view ethereum.token_erc20 done"); - } - - /** - * Synchronize current ERC721 token balances in the DB. - * @param fromBlockNumber block number from which token transfer should be checked (for performance reasons) - */ - public async syncTokenBalanceERC721(fromBlockNumber: number): Promise { - this.assertConnected(); - this.log.debug( - "Call update_issued_erc721_tokens from block", - fromBlockNumber, - ); - - await this.client.query("CALL ethereum.update_issued_erc721_tokens($1);", [ - fromBlockNumber, - ]); - this.log.debug("Calling update_issued_erc721_tokens procedure done."); - } - - /** - * Read block data. Throws if block was not found. - * - * @param blockNumber ethereum block number - * @returns Block data. - */ - public async getBlock(blockNumber: number): Promise { - this.assertConnected(); - - const queryResponse = await this.client.query( - "SELECT * FROM ethereum.block WHERE number = $1", - [blockNumber], - ); - - if (queryResponse.rows.length !== 1) { - throw new Error(`Could not read block #${blockNumber} from the DB`); - } - - return queryResponse.rows[0]; - } - - /** - * Insert entire block data into the database (the block itself, transactions and token transfers if there were any). - * Everything is committed in single atomic transaction (rollback on error). - * @param blockData new block data. - */ - public async insertBlockData(blockData: InsertBlockDataInput): Promise { - this.assertConnected(); - - this.log.debug( - "Insert block data including transactions and token transfers.", - ); - - const { block, transactions } = blockData; - - try { - await this.client.query("BEGIN"); - - this.log.debug("Insert new block", block); - const blockInsertResponse = await this.client.query( - `INSERT INTO ethereum.block("number", "created_at", "hash", "number_of_tx") - VALUES ($1, $2, $3, $4)`, - [block.number, block.created_at, block.hash, block.number_of_tx], - ); - if (blockInsertResponse.rowCount !== 1) { - throw new Error(`Block ${block.number} was not inserted into the DB`); - } - - for (const tx of transactions) { - this.log.debug("Insert new transaction", tx); - const txInsertResponse = await this.client.query( - `INSERT INTO - ethereum.transaction("index", "hash", "block_number", "from", "to", "eth_value", "method_signature", "method_name") - VALUES ($1, $2, $3, $4, $5, $6, $7, $8) - RETURNING id;`, - [ - tx.index, - tx.hash, - block.number, - tx.from, - tx.to, - tx.eth_value, - tx.method_signature, - tx.method_name, - ], - ); - if (txInsertResponse.rowCount !== 1) { - throw new Error( - `Transaction ${tx.hash} was not inserted into the DB`, - ); - } - const txId = txInsertResponse.rows[0].id; - this.log.debug("New transaction inserted with id", txId); - - for (const transfer of tx.token_transfers) { - this.log.debug("Insert new token transfer", transfer); - const transInsertResponse = await this.client.query( - `INSERT INTO - ethereum.token_transfer("transaction_id", "sender", "recipient", "value") - VALUES ($1, $2, $3, $4)`, - [txId, transfer.sender, transfer.recipient, transfer.value], - ); - if (transInsertResponse.rowCount !== 1) { - throw new Error( - `Transfer from ${transfer.sender} to ${transfer.recipient} was not inserted into the DB`, - ); - } - } - } - - await this.client.query("COMMIT"); - } catch (err: unknown) { - await this.client.query("ROLLBACK"); - this.log.warn("insertBlockData() exception:", err); - throw new RuntimeError( - "Could not insert block data into the database - transaction reverted", - getRuntimeErrorCause(err), - ); - } - } - - /** - * Compare committed block numbers with requested range, return list of blocks that are missing. - * @param startBlockNumber block to check from (including) - * @param endBlockNumber block to check to (including) - * @returns list of missing block numbers - */ - public async getMissingBlocksInRange( - startBlockNumber: number, - endBlockNumber: number, - ): Promise { - Checks.truthy( - endBlockNumber >= startBlockNumber, - `getMissingBlocksInRange startBlockNumber larger than endBlockNumber`, - ); - this.assertConnected(); - - const queryResponse = await this.client.query( - "SELECT * FROM ethereum.get_missing_blocks_in_range($1, $2) as block_number", - [startBlockNumber, endBlockNumber], - ); - this.log.debug( - `Found ${queryResponse.rowCount} missing blocks between ${startBlockNumber} and ${endBlockNumber}`, - ); - - return queryResponse.rows; - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index f9d1fce802..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,258 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Persistence Ethereum - * Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface ErrorExceptionResponseV1 - */ -export interface ErrorExceptionResponseV1 { - /** - * - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'message': string; - /** - * - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'error': string; -} -/** - * Ethereum tokens that are being monitored by the persistence plugin. - * @export - * @interface MonitoredToken - */ -export interface MonitoredToken { - /** - * - * @type {TokenTypeV1} - * @memberof MonitoredToken - */ - 'type': TokenTypeV1; - /** - * Token name - * @type {string} - * @memberof MonitoredToken - */ - 'name': string; - /** - * Token symbol - * @type {string} - * @memberof MonitoredToken - */ - 'symbol': string; -} - - -/** - * Response with plugin status report. - * @export - * @interface StatusResponseV1 - */ -export interface StatusResponseV1 { - /** - * Plugin instance id. - * @type {string} - * @memberof StatusResponseV1 - */ - 'instanceId': string; - /** - * True if successfully connected to the database, false otherwise. - * @type {boolean} - * @memberof StatusResponseV1 - */ - 'connected': boolean; - /** - * True if web services were correctly exported. - * @type {boolean} - * @memberof StatusResponseV1 - */ - 'webServicesRegistered': boolean; - /** - * Total number of tokens being monitored by the plugin. - * @type {number} - * @memberof StatusResponseV1 - */ - 'monitoredTokensCount': number; - /** - * - * @type {Array} - * @memberof StatusResponseV1 - */ - 'operationsRunning': Array; - /** - * True if block monitoring is running, false otherwise. - * @type {boolean} - * @memberof StatusResponseV1 - */ - 'monitorRunning': boolean; - /** - * Number of the last block seen by the block monitor. - * @type {number} - * @memberof StatusResponseV1 - */ - 'lastSeenBlock': number; -} -/** - * - * @export - * @enum {string} - */ - -export const TokenTypeV1 = { - /** - * EIP-20: Token Standard - */ - ERC20: 'erc20', - /** - * EIP-721: Non-Fungible Token Standard - */ - ERC721: 'erc721' -} as const; - -export type TokenTypeV1 = typeof TokenTypeV1[keyof typeof TokenTypeV1]; - - -/** - * Persistence plugin operation that is tracked and returned in status report. - * @export - * @interface TrackedOperationV1 - */ -export interface TrackedOperationV1 { - /** - * Start time of the operation. - * @type {string} - * @memberof TrackedOperationV1 - */ - 'startAt': string; - /** - * Operation name. - * @type {string} - * @memberof TrackedOperationV1 - */ - 'operation': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Get the status of persistence plugin for ethereum - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatusV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Get the status of persistence plugin for ethereum - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatusV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatusV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Get the status of persistence plugin for ethereum - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatusV1(options?: any): AxiosPromise { - return localVarFp.getStatusV1(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Get the status of persistence plugin for ethereum - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getStatusV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getStatusV1(options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 75e763ac59..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Persistence Ethereum - * Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 61e52720d0..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Persistence Ethereum - * Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 44f78a1af4..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Persistence Ethereum - * Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index b9f0c8b2b2..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Persistence Ethereum - * Synchronizes state of an ethereum ledger into a DB that can later be viewed in GUI - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/index.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/plugin-factory-persistence-ethereum.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/plugin-factory-persistence-ethereum.ts deleted file mode 100644 index 1b4dea3aef..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/plugin-factory-persistence-ethereum.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginPersistenceEthereumOptions, - PluginPersistenceEthereum, -} from "./plugin-persistence-ethereum"; - -export class PluginFactoryLedgerPersistence extends PluginFactory< - PluginPersistenceEthereum, - IPluginPersistenceEthereumOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginPersistenceEthereumOptions, - ): Promise { - return new PluginPersistenceEthereum(pluginOptions); - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/plugin-persistence-ethereum.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/plugin-persistence-ethereum.ts deleted file mode 100644 index ec70cde3fc..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/plugin-persistence-ethereum.ts +++ /dev/null @@ -1,970 +0,0 @@ -/** - * Main logic of persistence plugin for ethereum data. - */ - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import type { - IPluginWebService, - IWebServiceEndpoint, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; -import { - EthereumApiClient, - WatchBlocksV1BlockData, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; - -import ERC20 from "../json/contract-abi/ERC20.json"; -import TokenClientERC20 from "./token-client/token-client-erc20"; -import ERC721 from "../json/contract-abi/ERC721.json"; -import TokenClientERC721 from "./token-client/token-client-erc721"; -import OAS from "../json/openapi.json"; -import { getRuntimeErrorCause, normalizeAddress } from "./utils"; -import { StatusEndpointV1 } from "./web-services/status-endpoint-v1"; -import PostgresDatabaseClient, { - BlockDataTransferInput, - BlockDataTransactionInput, -} from "./db-client/db-client"; -import { - MonitoredToken, - StatusResponseV1, - TokenTypeV1, - TrackedOperationV1, -} from "./generated/openapi/typescript-axios"; -import { RuntimeError } from "run-time-error-cjs"; -import { Interface as EthersInterface } from "@ethersproject/abi"; -import { Mutex } from "async-mutex"; -import { v4 as uuidv4 } from "uuid"; -import type { TransactionInfo, TransactionReceipt } from "web3"; -import type { Express } from "express"; -import type { Subscription } from "rxjs"; - -/** - * Constructor parameter for Ethereum persistence plugin. - */ -export interface IPluginPersistenceEthereumOptions - extends ICactusPluginOptions { - apiClient: EthereumApiClient; - connectionString: string; - logLevel: LogLevelDesc; -} - -/** - * Cactus persistence plugin for ethereum ledgers. - * Remember to call `onPluginInit()` before using any of the plugin method, and `shutdown()` when closing the app. - */ -export class PluginPersistenceEthereum - implements ICactusPlugin, IPluginWebService -{ - public static readonly CLASS_NAME = "PluginPersistenceEthereum"; - public monitoredTokens = new Map(); - - private readonly instanceId: string; - private apiClient: EthereumApiClient; - private watchBlocksSubscription: Subscription | undefined; - private dbClient: PostgresDatabaseClient; - private log: Logger; - private isConnected = false; - private isWebServicesRegistered = false; - private endpoints: IWebServiceEndpoint[] | undefined; - private ethersInterfaceERC721 = new EthersInterface(ERC721.abi); - private ethersInterfaceERC20 = new EthersInterface(ERC20.abi); - private pushBlockMutex = new Mutex(); - private syncBlocksMutex = new Mutex(); - private syncTokenBalancesMutex = new Mutex(); - private failedBlocks = new Set(); - private lastSeenBlock = 0; - private trackedOperations = new Map(); - - constructor(public readonly options: IPluginPersistenceEthereumOptions) { - const fnTag = `${PluginPersistenceEthereum.CLASS_NAME}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.apiClient, `${fnTag} options.apiClient`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy( - options.connectionString, - `${fnTag} options.connectionString`, - ); - - const level = this.options.logLevel || "INFO"; - const label = PluginPersistenceEthereum.CLASS_NAME; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = options.instanceId; - this.apiClient = options.apiClient; - - this.dbClient = new PostgresDatabaseClient({ - connectionString: options.connectionString, - logLevel: level, - }); - } - - /** - * True if all blocks were synchronized successfully, false otherwise. - */ - private get isLedgerInSync(): boolean { - return this.failedBlocks.size === 0; - } - - /** - * Add new plugin operation that will show up in status report. - * Remember to remove this operation with `removeTrackedOperation` after it's finished. - * - * @param id unique id of the operation (use `uuid`) - * @param operation operation name to show up in the status report - */ - private addTrackedOperation(id: string, operation: string): void { - if (this.trackedOperations.has(id)) { - this.log.error(`Operation with ID ${id} is already tracked!`); - return; - } - - this.trackedOperations.set(id, { - startAt: Date.now().toString(), - operation: operation, - }); - } - - /** - * Remove operation added with `addTrackedOperation`. - * If called with non-existent operation - nothing happens. - * - * @param id unique id of the operation (use `uuid`) - */ - private removeTrackedOperation(id: string): void { - this.trackedOperations.delete(id); - } - - /** - * Get `Ethers` instance of `Interface` class for specified token type. - * - * @param tokenType type of the token (ERC20, ERC721, etc...) - * @returns ethers.js `Interface` object - */ - private getEthersTokenInterface(tokenType: TokenTypeV1): EthersInterface { - switch (tokenType) { - case TokenTypeV1.ERC20: - return this.ethersInterfaceERC20; - case TokenTypeV1.ERC721: - return this.ethersInterfaceERC721; - default: - const unknownTokenType: never = tokenType; - throw new Error( - `getEthersTokenInterface(): Unknown token type: ${unknownTokenType}`, - ); - } - } - - /** - * Get transaction receipt from the ledger using the cactus connector. - * - * @param txId hash of the transaction to get. - * @returns `web3.js` transaction receipt object. - */ - private async getTransactionReceipt( - txId: string, - ): Promise { - const response = await this.apiClient.invokeWeb3EthMethodV1({ - methodName: "getTransactionReceipt", - params: [txId], - }); - - if (response && response.status === 200) { - return response.data.data; - } else { - throw new Error( - `Could not get transaction receipt for transaction ID ${txId}`, - ); - } - } - - /** - * Get block data from the ledger using the cactus connector. - * - * @todo Add json-rpc proxy to connector and use it instead of invokeWeb3EthMethodV1 - * - * @param blockNumber number, hash or keyword description of a block to read. - * @param returnTransactionObjects boolean flag to return full transaction object or just the hashes. - * @returns block data (with transactions if `returnTransactionObjects` was true) - */ - private async getBlockFromLedger( - blockNumber: number | string, - returnTransactionObjects = false, - ): Promise { - const response = await this.apiClient.invokeWeb3EthMethodV1({ - methodName: "getBlock", - params: [ - blockNumber, - returnTransactionObjects, - { - number: "NUMBER_STR", - bytes: "BYTES_HEX", - }, - ], - }); - - if (response && response.status === 200) { - return response.data.data; - } else { - throw new Error( - `Could not get block with number ${blockNumber} from the ledger`, - ); - } - } - - /** - * Check if token with specified ID exist on contract connected to `tokenClient`. - * If so, insert/update it's entry in the database. - * - * @param tokenId numeric ID of the issued token. - * @param tokenClient client with token contract details. - * @returns `true` if token ID was valid, `false` otherwise. - */ - private async syncSingleERC721Token( - tokenId: number, - tokenClient: TokenClientERC721, - ): Promise { - let ownerAddress; - try { - ownerAddress = await tokenClient.ownerOf(tokenId); - } catch (error: unknown) { - this.log.debug( - "Calling ownerOf() failed, assuming all tokens are synchronized - stop.", - ); - return false; - } - - if (parseInt(ownerAddress, 16) === 0) { - this.log.debug(`Found token ID ${tokenId} without the owner - stop.`); - return false; - } - - try { - // Add token if not present yet - const checkedOwnerAddress = normalizeAddress(ownerAddress); - const tokenUri = await tokenClient.tokenURI(tokenId); - - await this.dbClient.upsertTokenERC721({ - account_address: checkedOwnerAddress, - token_address: normalizeAddress(tokenClient.address), - uri: tokenUri, - token_id: tokenId, - }); - } catch (err) { - this.log.error(`Could not store issued ERC721 token: ID ${tokenId}`, err); - // We return true since failure here means that there might be more tokens to synchronize - } - - return true; - } - - /** - * Synchronize all the issued tokens for specified ERC721 contract. - * Method assumes the token ID are incrementing (starting from 1). - * - * @param contractAddress ERC721 token contract address. - * @returns number of token synchronized. - */ - private async syncERC721TokensForContract( - contractAddress: string, - ): Promise { - const tokenClient = new TokenClientERC721(this.apiClient, contractAddress); - - let tokenId = 1; - while (await this.syncSingleERC721Token(tokenId, tokenClient)) { - tokenId++; - } - - return tokenId - 1; - } - - /** - * Parse a new block received from the connector, parse it and push to the database. - * Gap between last seen block and current one is checked and missing blocks are filled when necessary. - * Token balances are updated in the end (if the database is in sync). - * - * @param block `web3.js` block data object. - */ - private async pushNewBlock(block: WatchBlocksV1BlockData): Promise { - // Push one block at a time, in case previous block is still being processed - // (example: filling the gap takes longer than expected) - await this.pushBlockMutex.runExclusive(async () => { - const previousBlockNumber = this.lastSeenBlock; - const blockNumber = parseInt(block.number, 10); - try { - this.lastSeenBlock = blockNumber; - await this.parseAndStoreBlockData(block); - } catch (error: unknown) { - this.log.warn( - `Could not add new block #${block.number}, error:`, - error, - ); - this.addFailedBlock(blockNumber); - } - - const isGap = blockNumber - previousBlockNumber > 1; - if (isGap) { - const gapFrom = previousBlockNumber + 1; - const gapTo = blockNumber - 1; - try { - await this.syncBlocks(gapFrom, gapTo); - } catch (error: unknown) { - this.log.warn( - `Could not sync blocks in a gap between #${gapFrom} and #${gapTo}, error:`, - error, - ); - for (let i = gapFrom; i < gapTo; i++) { - this.addFailedBlock(i); - } - } - } - - try { - await this.syncTokenBalances(previousBlockNumber); - } catch (error: unknown) { - this.log.warn( - `Could not sync token balances after adding block #${block.number}, error:`, - error, - ); - return; - } - }); - } - - /** - * Try to decode method name using known token contract definition. - * If the name could not be decoded, empty string is returned (`""`) - * - * @param tx `web.js` transaction object. - * @param tokenType type of the token we expect (ERC20, ERC721, etc...) - * @returns name of the method or an empty string - */ - private decodeTokenMethodName( - tx: TransactionInfo, - tokenType: TokenTypeV1, - ): string { - try { - const tokenInterface = this.getEthersTokenInterface(tokenType); - const decodedTx = tokenInterface.parseTransaction({ - data: tx.input as string, - value: tx.value, - }); - return decodedTx.name; - } catch { - this.log.debug("Could not decode transaction with token contract"); - } - - return ""; - } - - /** - * Decode any token transfers that occurred in specified transaction. - * - * @param txReceipt `web3.js` receipt of the transaction object. - * @param tokenType type of the token we expect (ERC20, ERC721, etc...) - * @returns list of detected token transfers - */ - private decodeTokenTransfers( - txReceipt: TransactionReceipt, - tokenType: TokenTypeV1, - ): BlockDataTransferInput[] { - const tokenInterface = this.getEthersTokenInterface(tokenType); - - const transferLogs = txReceipt.logs - .map((l) => - tokenInterface.parseLog({ - data: l.data as string, - topics: l.topics as string[], - }), - ) - .filter((ld) => ld.name === "Transfer"); - - return transferLogs.map((t) => { - switch (tokenType) { - case TokenTypeV1.ERC20: - return { - sender: normalizeAddress(t.args["from"]), - recipient: normalizeAddress(t.args["to"]), - value: t.args["value"].toString(), - }; - case TokenTypeV1.ERC721: - return { - sender: normalizeAddress(t.args["from"]), - recipient: normalizeAddress(t.args["to"]), - value: t.args["tokenId"].toString(), - }; - default: - const unknownTokenType: never = tokenType; - throw new Error( - `decodeTokenTransfers(): Unknown token type: ${unknownTokenType}`, - ); - } - }); - } - - /** - * Parse single transaction and possible token transfers from a block. - * - * @param tx `web3.js` transaction object. - * @returns parsed transaction data - */ - private async parseBlockTransaction( - tx: TransactionInfo, - ): Promise { - this.log.debug("parseBlockTransaction(): Parsing ", tx.hash); - - const txReceipt = await this.getTransactionReceipt(tx.hash as string); - let methodName = ""; - let tokenTransfers: BlockDataTransferInput[] = []; - - const targetTokenMetadata = this.monitoredTokens.get( - normalizeAddress(txReceipt.to), - ); - if (targetTokenMetadata) { - methodName = this.decodeTokenMethodName(tx, targetTokenMetadata.type); - tokenTransfers = this.decodeTokenTransfers( - txReceipt, - targetTokenMetadata.type, - ); - } - - return { - hash: tx.hash as string, - index: parseInt(txReceipt.transactionIndex as string, 10), - from: normalizeAddress(tx.from), - to: normalizeAddress(tx.to ?? undefined), - eth_value: parseInt(tx.value as string, 10), - method_signature: (tx.input as string).slice(0, 10), - method_name: methodName, - token_transfers: tokenTransfers, - }; - } - - /** - * Update the token balance tables (starting from specified block for performance). - * Operation will not run if ledger is out of sync (i.e. some blocks failed to be synchronized). - * Running this method will try to push the failed blocks again first. - * - * @param fromBlockNumber block from which to start the token balance update. - */ - private async syncTokenBalances(fromBlockNumber: number): Promise { - await this.syncTokenBalancesMutex.runExclusive(async () => { - const blocksRestored = await this.syncFailedBlocks(); - const oldestBlockRestored = Math.min(...blocksRestored, fromBlockNumber); - - if (this.isLedgerInSync) { - this.log.debug("Update token balances from block", oldestBlockRestored); - await this.dbClient.syncTokenBalanceERC20(); - await this.dbClient.syncTokenBalanceERC721(oldestBlockRestored); - } else { - this.log.warn( - "Ledger not in sync (some blocks are missing), token balance not updated!", - ); - } - }); - } - - /** - * Add a block to failed blocks list. - * This method first ensures that the block is not present in the database. - * If it's not, new block is added to failed blocks and the plugin is out of sync. - * Failed blocks can be retried again with `syncFailedBlocks()` method. - * - * @param blockNumber block number to be added to failed blocks list. - */ - private async addFailedBlock(blockNumber: number) { - try { - const block = await this.dbClient.getBlock(blockNumber); - - if ((block.number as unknown as string) !== blockNumber.toString()) { - throw new Error("Invalid response from the DB"); - } - - this.log.debug( - `Block #${blockNumber} already present in DB - remove from the failed pool.`, - ); - this.failedBlocks.delete(blockNumber); - } catch (error: unknown) { - this.log.info( - `Block #${blockNumber} not found in the DB - add to the failed blocks pool. Message:`, - error, - ); - this.failedBlocks.add(blockNumber); - } - } - - /** - * Synchronize blocks in specified range. - * Only the blocks not already present in the database from specified range will be pushed. - * - * @warn This operation can take a long time to finish if you specify a wide range! - * - * @param startBlockNumber starting block number (including) - * @param endBlockNumber ending block number (including) - */ - private async syncBlocks( - startBlockNumber: number, - endBlockNumber: number, - ): Promise { - // Only one block synchronization can run at a time to prevent data race. - await this.syncBlocksMutex.runExclusive(async () => { - this.log.info( - "Synchronize blocks from", - startBlockNumber, - "to", - endBlockNumber, - ); - - const missingBlockNumbers = await this.dbClient.getMissingBlocksInRange( - startBlockNumber, - endBlockNumber, - ); - - for (const n of missingBlockNumbers.map((r) => r.block_number)) { - try { - const block = await this.getBlockFromLedger(n, true); - await this.parseAndStoreBlockData(block); - } catch (error: unknown) { - this.log.warn(`Could not synchronize block #${n}, error:`, error); - this.addFailedBlock(n); - } - } - }); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-persistence-ethereum`; - } - - /** - * Get OpenAPI definition for this plugin. - * @returns OpenAPI spec object - */ - public getOpenApiSpec(): unknown { - return OAS; - } - - /** - * Should be called before using the plugin. - * Connects to the database and initializes the plugin schema and status entry. - * Fetches tokens to be monitored and stores them in local memory. - */ - public async onPluginInit(): Promise { - await this.dbClient.connect(); - await this.dbClient.initializePlugin( - PluginPersistenceEthereum.CLASS_NAME, - this.instanceId, - ); - await this.refreshMonitoredTokens(); - this.isConnected = true; - } - - /** - * Close the connection to the DB, cleanup any allocated resources. - */ - public async shutdown(): Promise { - await this.stopMonitor(); - await this.dbClient.shutdown(); - this.isConnected = false; - } - - /** - * Register all the plugin endpoints on supplied `Express` server. - * - * @param app `Express.js` server. - * @returns list of registered plugin endpoints. - */ - public async registerWebServices( - app: Express, - ): Promise { - const webServices = await this.getOrCreateWebServices(); - webServices.forEach((ws) => ws.registerExpress(app)); - this.isWebServicesRegistered = true; - return webServices; - } - - /** - * Create plugin endpoints and return them. - * If method was already called, the set of endpoints created on the first run is used. - * @returns list of plugin endpoints. - */ - public async getOrCreateWebServices(): Promise { - const { log } = this; - const pkgName = this.getPackageName(); - - if (this.endpoints) { - return this.endpoints; - } - log.info(`Creating web services for plugin ${pkgName}...`); - - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new StatusEndpointV1({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - this.endpoints = endpoints; - - log.info(`Instantiated web services for plugin ${pkgName} OK`, { - endpoints, - }); - return endpoints; - } - - /** - * Get status report of this instance of persistence plugin. - * @returns Status report object - */ - public getStatus(): StatusResponseV1 { - return { - instanceId: this.instanceId, - connected: this.isConnected, - webServicesRegistered: this.isWebServicesRegistered, - monitoredTokensCount: this.monitoredTokens.size, - operationsRunning: Array.from(this.trackedOperations.values()), - monitorRunning: this.watchBlocksSubscription !== undefined, - lastSeenBlock: this.lastSeenBlock, - }; - } - - /** - * Fetch the metadata of all tokens to be monitored by this persistence plugin. - * List is saved internally (in the plugin). - * - * @returns List of monitored tokens. - */ - public async refreshMonitoredTokens(): Promise> { - this.log.info("refreshMonitoredTokens() started..."); - const newTokensMap = new Map(); - - // Fetch ERC20 tokens - const allERC20Tokens = await this.dbClient.getTokenMetadataERC20(); - this.log.debug("Received ERC20 tokens:", allERC20Tokens); - allERC20Tokens.forEach((token) => { - newTokensMap.set(normalizeAddress(token.address), { - type: TokenTypeV1.ERC20, - name: token.name, - symbol: token.symbol, - }); - }); - - // Fetch ERC721 tokens - const allERC721Tokens = await this.dbClient.getTokenMetadataERC721(); - this.log.debug("Received ERC721 tokens:", allERC721Tokens); - allERC721Tokens.map((token) => { - newTokensMap.set(normalizeAddress(token.address), { - type: TokenTypeV1.ERC721, - name: token.name, - symbol: token.symbol, - }); - }); - - // Update tokens - this.monitoredTokens = newTokensMap; - this.log.info( - "refreshMonitoredTokens() finished. New monitored tokens count:", - this.monitoredTokens.size, - ); - this.log.debug("monitoredTokens:", this.monitoredTokens); - return this.monitoredTokens; - } - - /** - * Synchronize issued tokens for all ERC721 token contract monitored by this persistence plugin. - * - * @warn We assume the token ID increases starting from 1. - * @todo Support more ways to sync the tokens: - * - Parse all `Transfer` events emitted by the contract. - * - Support ERC721 Enumerable - * - The type of a sync method could be defined in the token definition. - * @todo Use `Multicall.js` or something similar in the connector to improve performance. - */ - public async syncERC721Tokens(): Promise { - const operationId = uuidv4(); - this.addTrackedOperation(operationId, "syncERC721Tokens"); - - try { - const tokenAddresses = []; - for (const [address, token] of this.monitoredTokens) { - if (token.type === TokenTypeV1.ERC721) { - tokenAddresses.push(normalizeAddress(address)); - } - } - this.log.info( - `Sync issued tokens for ${tokenAddresses.length} contracts.`, - ); - - for (const contractAddress of tokenAddresses) { - try { - this.log.debug( - "Synchronize issued ERC721 tokens of contract", - contractAddress, - ); - const syncTokenCount = - await this.syncERC721TokensForContract(contractAddress); - this.log.info( - `Synchronized ${syncTokenCount} tokens for contract ${contractAddress}`, - ); - } catch (error: unknown) { - this.log.error( - `Token sync FAILED for contract address: ${contractAddress}, error:`, - error, - ); - } - } - } catch (error: unknown) { - this.log.error(`syncERC721Tokens failed with exception:`, error); - } finally { - this.removeTrackedOperation(operationId); - } - } - - /** - * Start the block monitoring process. New blocks from the ledger will be parsed and pushed to the database. - * Use `stopMonitor()` to cancel this operation. - * - * @warn - * Before the monitor starts, the database will be synchronized with current ledger state. - * This operation can take a while, but will ensure that the ledger archive is complete. - * - * @param onError callback method that will be called on error. - */ - public async startMonitor(onError?: (err: unknown) => void): Promise { - // Synchronize the current DB state - this.lastSeenBlock = await this.syncAll(); - - const blocksObservable = this.apiClient.watchBlocksV1({ - getBlockData: true, - }); - - if (!blocksObservable) { - throw new Error( - "Could not get a valid blocks observable in startMonitor", - ); - } - - this.watchBlocksSubscription = blocksObservable.subscribe({ - next: async (event) => { - try { - this.log.debug("Received new block."); - - if (!event || !event.blockData) { - this.log.warn("Received invalid block ledger event:", event); - return; - } - - await this.pushNewBlock(event.blockData); - } catch (error: unknown) { - this.log.error("Unexpected error when pushing new block:", error); - } - }, - error: (err) => { - this.log.error("Error when watching for new blocks, err:", err); - - if (onError) { - try { - onError(err); - } catch (error: unknown) { - this.log.error( - "Unexpected error in onError monitor handler:", - error, - ); - } - } - }, - complete: () => { - this.log.info("Watch completed"); - if (this.watchBlocksSubscription) { - this.watchBlocksSubscription.unsubscribe(); - } - this.watchBlocksSubscription = undefined; - }, - }); - } - - /** - * Stop the block monitoring process. - * If the monitoring wasn't running - nothing happens. - */ - public stopMonitor(): void { - if (this.watchBlocksSubscription) { - this.watchBlocksSubscription.unsubscribe(); - this.watchBlocksSubscription = undefined; - this.log.info("stopMonitor(): Done."); - } - } - - /** - * Add new ERC20 token to be monitored by this plugin. - * @param address ERC20 contract address. - */ - public async addTokenERC20(address: string): Promise { - const checkedAddress = normalizeAddress(address); - this.log.info( - "Add ERC20 token to monitor changes on it. Address:", - checkedAddress, - ); - - const tokenClient = new TokenClientERC20(this.apiClient, checkedAddress); - - try { - await this.dbClient.insertTokenMetadataERC20({ - address: checkedAddress, - name: await tokenClient.name(), - symbol: await tokenClient.symbol(), - total_supply: parseInt(await tokenClient.totalSupply(), 10), - }); - } catch (err: unknown) { - throw new RuntimeError( - `Could not store ERC20 token metadata information`, - getRuntimeErrorCause(err), - ); - } - - await this.refreshMonitoredTokens(); - } - - /** - * Add new ERC721 token to be monitored by this plugin. - * @param address ERC721 contract address. - */ - public async addTokenERC721(address: string): Promise { - const checkedAddress = normalizeAddress(address); - this.log.info( - "Add ERC721 token to monitor changes on it. Address:", - checkedAddress, - ); - - const tokenClient = new TokenClientERC721(this.apiClient, checkedAddress); - - try { - await this.dbClient.insertTokenMetadataERC721({ - address: checkedAddress, - name: await tokenClient.name(), - symbol: await tokenClient.symbol(), - }); - } catch (err: unknown) { - throw new RuntimeError( - `Could not store ERC721 token metadata information`, - getRuntimeErrorCause(err), - ); - } - - await this.refreshMonitoredTokens(); - } - - /** - * Parse entire block data, detect possible token transfer operations and store the new block data to the database. - * Note: token balances are not updated. - * - * @param block `web3.js` block object. - */ - public async parseAndStoreBlockData( - block: WatchBlocksV1BlockData, - ): Promise { - try { - // Note: Use batching / synchronous loop if there are performance issues for large blocks. - const transactions = await Promise.all( - (block.transactions ?? []).map((tx) => this.parseBlockTransaction(tx)), - ); - - if (typeof block.timestamp === "string") { - block.timestamp = parseInt(block.timestamp, 10); - } - const blockTimestamp = new Date(block.timestamp * 1000); - const blockCreatedAt = blockTimestamp.toUTCString(); - this.log.debug("Block created at:", blockCreatedAt); - - await this.dbClient.insertBlockData({ - block: { - number: parseInt(block.number, 10), - created_at: blockCreatedAt, - hash: block.hash ?? "", - number_of_tx: transactions.length, - }, - transactions, - }); - } catch (error: unknown) { - const message = `Parsing block #${block.number} failed: ${error}`; - this.log.error(message); - throw new RuntimeError(message, getRuntimeErrorCause(error)); - } - } - - /** - * Walk through all the blocks that could not be synchronized with the DB for some reasons and try pushing them again. - * Blocks will remain on "failed blocks" list until it's successfully pushed to the database. - * We can't calculate token balances until all failed blocks are pushed to the server (plugin will remain out of sync until then). - * - * @todo Add automatic tests for this method. - * - * @returns list of restored blocks - */ - public async syncFailedBlocks(): Promise { - const blocksRestored: number[] = []; - const operationId = uuidv4(); - this.addTrackedOperation(operationId, "syncFailedBlocks"); - - try { - for (const n of this.failedBlocks) { - try { - const block = await this.getBlockFromLedger(n, true); - await this.parseAndStoreBlockData(block); - this.failedBlocks.delete(n); - blocksRestored.push(n); - } catch (error: unknown) { - this.log.warn(`Could not sync failed block #${n}, error:`, error); - } - } - - if (blocksRestored) { - this.log.info("Restored following failed blocks:", blocksRestored); - } - } finally { - this.removeTrackedOperation(operationId); - } - - return blocksRestored; - } - - /** - * Synchronize entire ledger state with the database. - * - Synchronize all blocks that failed to synchronize until now. - * - Detect any other missing blocks between the database and the ledger, push them to the DB. - * - Update the token balances if the database is in sync. - * - * @warn This operation can take a long time to finish! - * @returns latest synchronized block number. - */ - public async syncAll(): Promise { - const operationId = uuidv4(); - this.addTrackedOperation(operationId, "syncAll"); - - try { - this.log.info("syncAll() started..."); - - await this.syncFailedBlocks(); - - const block = await this.getBlockFromLedger("latest"); - const blockNumber = parseInt(block.number, 10); - await this.syncBlocks(1, blockNumber); - - await this.syncTokenBalances(1); - - return blockNumber; - } finally { - this.removeTrackedOperation(operationId); - } - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/public-api.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/public-api.ts deleted file mode 100755 index 12237d804f..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/public-api.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerPersistence } from "./plugin-factory-persistence-ethereum"; - -export { PluginFactoryLedgerPersistence } from "./plugin-factory-persistence-ethereum"; -export { - PluginPersistenceEthereum, - IPluginPersistenceEthereumOptions, -} from "./plugin-persistence-ethereum"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerPersistence(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/token-client/base-token-client.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/token-client/base-token-client.ts deleted file mode 100644 index 071667770a..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/token-client/base-token-client.ts +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Base class for calling ethereum token contract methods. - */ - -import { - ContractJSON, - DeployedContractJsonDefinition, - EthContractInvocationType, - EthereumApiClient, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { RuntimeError } from "run-time-error-cjs"; -import { getRuntimeErrorCause } from "../utils"; - -/** - * Base class for calling ethereum token contract methods. - * Can be extended by other, token specific classes. - */ -export default class TokenClient { - protected contract: DeployedContractJsonDefinition; - protected log: Logger; - public static readonly CLASS_NAME: string = "TokenClient"; - - /** - * Get this class name - * @returns class name string - */ - getClassName(): string { - return TokenClient.CLASS_NAME; - } - - constructor( - private apiClient: EthereumApiClient, - abi: ContractJSON, - address: string, - logLevel: LogLevelDesc = "info", - ) { - const fnTag = `${TokenClient.CLASS_NAME}#constructor()`; - Checks.truthy(apiClient, `${fnTag} arg verifierEthereum`); - Checks.truthy(abi, `${fnTag} arg abi`); - Checks.truthy(address, `${fnTag} arg address`); - - this.apiClient = apiClient; - - this.contract = { - contractJSON: abi as ContractJSON, - contractAddress: address, - }; - - this.log = LoggerProvider.getOrCreate({ - level: logLevel, - label: this.getClassName(), - }); - } - - /** - * Call specific contract method with some args. - * Throws on error. - * - * @param type method execution type (only `call` supported for now) - * @param method contract method name - * @param ...args contract method arguments (any number) - * @returns response from the method execution. - */ - protected async contractMethod( - type: EthContractInvocationType, - method: string, - ...args: unknown[] - ): Promise { - this.log.debug(`Execute contract method ${method} using '${type}'`); - - if (type !== EthContractInvocationType.Call) { - throw new Error("Only Call execution method is supported for now!"); - } - - try { - const response = await this.apiClient.invokeContractV1({ - contract: this.contract, - invocationType: type, - methodName: method, - params: args, - web3SigningCredential: { - // Credentials not needed when using "Call" execution method - type: Web3SigningCredentialType.None, - }, - }); - this.log.debug( - "Executing contract method status:", - response.statusText, - "success:", - response.data.success, - ); - - if (response.status != 200 || !response.data.success) { - throw new Error(response.data.callOutput); - } - - return response.data.callOutput; - } catch (err: unknown) { - throw new RuntimeError( - `Calling contract method ${method} with args '${args}' failed`, - getRuntimeErrorCause(err), - ); - } - } - - /** - * Execute method on a contract using `call` - * - * @param method contract method name - * @param ...args contract method arguments (any number) - * @returns response from the method execution. - */ - protected async callContractMethod( - method: string, - ...args: unknown[] - ): Promise { - return await this.contractMethod( - EthContractInvocationType.Call, - method, - ...args, - ); - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/token-client/token-client-erc20.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/token-client/token-client-erc20.ts deleted file mode 100644 index dfde9b4e85..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/token-client/token-client-erc20.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Client for calling methods on ERC20 token contract. - */ - -import { EthereumApiClient } from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import type { LogLevelDesc } from "@hyperledger/cactus-common"; -import TokenClient from "./base-token-client"; -import ERC20 from "../../json/contract-abi/ERC20.json"; -import { RuntimeError } from "run-time-error-cjs"; - -/** - * Client for calling methods on ERC20 token contract. - */ -export default class TokenClientERC20 extends TokenClient { - public static readonly CLASS_NAME: string = "TokenClientERC20"; - - /** - * Get this class name - * @returns class name string - */ - getClassName(): string { - return TokenClientERC20.CLASS_NAME; - } - - constructor( - apiClient: EthereumApiClient, - address: string, - logLevel: LogLevelDesc = "info", - ) { - super(apiClient, ERC20, address, logLevel); - this.log.debug("TokenClientERC20 created"); - } - - /** - * Internal method for writing consistent log message describing operation executed. - * - * @param methodName Name of the method called. - */ - private logOperation(methodName: string): void { - this.log.info( - `Call '${methodName}' on ERC20 contract at ${this.contract.contractAddress}`, - ); - } - - /** - * Get name of the token. - * @returns token name - */ - public async name(): Promise { - this.logOperation("name"); - - const response = await this.callContractMethod("name"); - if (typeof response !== "string") { - throw new RuntimeError( - `Unexpected response type received for method 'name': ${response}`, - ); - } - - return response; - } - - /** - * Get symbol of the token. - * @returns token symbol - */ - public async symbol(): Promise { - this.logOperation("symbol"); - - const response = await this.callContractMethod("symbol"); - if (typeof response !== "string") { - throw new RuntimeError( - `Unexpected response type received for method 'symbol': ${response}`, - ); - } - - return response; - } - - /** - * Get total supply of the token. - * @returns token total supply - */ - public async totalSupply(): Promise { - this.logOperation("totalSupply"); - - const response = await this.callContractMethod("totalSupply"); - if (typeof response !== "string") { - throw new RuntimeError( - `Unexpected response type received for method 'totalSupply': ${response}`, - ); - } - - return response; - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/token-client/token-client-erc721.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/token-client/token-client-erc721.ts deleted file mode 100644 index 29b28dd582..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/token-client/token-client-erc721.ts +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Client for calling methods on ERC721 token contract. - */ - -import { EthereumApiClient } from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import type { LogLevelDesc } from "@hyperledger/cactus-common"; -import TokenClient from "./base-token-client"; -import ERC721 from "../../json/contract-abi/ERC721.json"; -import { RuntimeError } from "run-time-error-cjs"; - -/** - * Client for calling methods on ERC721 token contract. - */ -export default class TokenClientERC721 extends TokenClient { - public static readonly CLASS_NAME: string = "TokenClientERC721"; - - /** - * Get this class name - * @returns class name string - */ - getClassName(): string { - return TokenClientERC721.CLASS_NAME; - } - - constructor( - apiClient: EthereumApiClient, - public address: string, - logLevel: LogLevelDesc = "info", - ) { - super(apiClient, ERC721, address, logLevel); - this.log.debug("TokenClientERC721 created"); - } - - /** - * Internal method for writing consistent log message describing operation executed. - * - * @param methodName Name of the method called. - */ - private logOperation(methodName: string): void { - this.log.info( - `Call '${methodName}' on ERC721 contract at ${this.contract.contractAddress}`, - ); - } - - /** - * Get name of the token. - * @returns token name - */ - async name(): Promise { - this.logOperation("name"); - - const response = await this.callContractMethod("name"); - if (typeof response !== "string") { - throw new RuntimeError( - `Unexpected response type received for method 'name': ${response}`, - ); - } - - return response; - } - - /** - * Get symbol of the token. - * @returns token symbol - */ - async symbol(): Promise { - this.logOperation("symbol"); - - const response = await this.callContractMethod("symbol"); - if (typeof response !== "string") { - throw new RuntimeError( - `Unexpected response type received for method 'symbol': ${response}`, - ); - } - - return response; - } - - /** - * Get owner of an issued token. - * @param tokenId token id to check - * @returns address of owner of the token - */ - async ownerOf(tokenId: number): Promise { - this.logOperation("ownerOf"); - - const response = await this.callContractMethod("ownerOf", tokenId); - if (typeof response !== "string") { - throw new RuntimeError( - `Unexpected response type received for method 'ownerOf': ${response}`, - ); - } - - return response; - } - - /** - * Get URI of an issued token. - * @param tokenId token id to check - * @returns URI of the token - */ - async tokenURI(tokenId: number): Promise { - this.logOperation("tokenURI"); - - const response = await this.callContractMethod("tokenURI", tokenId); - if (typeof response !== "string") { - throw new RuntimeError( - `Unexpected response type received for method 'tokenURI': ${response}`, - ); - } - - return response; - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/utils.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/utils.ts deleted file mode 100644 index fff04a552c..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/utils.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Helper methods - */ - -import { toChecksumAddress } from "web3-utils"; -import { isAddress } from "web3-validator"; -import { RuntimeError } from "run-time-error-cjs"; - -/** - * Get error cause for RuntimeError (instance of `Error`, string or undefined) - * @param err unknown error type. - * @returns valid `RuntimeError` cause - */ -export function getRuntimeErrorCause(err: unknown): Error | string | undefined { - if (err instanceof Error || typeof err === "string") { - return err; - } - - return undefined; -} - -/** - * Convert supplied address to checksum form, ensure it's a valid ethereum address afterwards. - * In case of error an exception is thrown. - * - * @param address ethereum hex address to normalize - * @returns valid checksum address - */ -export function normalizeAddress(address?: string): string { - if (!address) { - return ""; - } - - const checksumAddress = toChecksumAddress(address); - if (!isAddress(checksumAddress)) { - throw new RuntimeError( - `Provided address ${address} is not a valid ethereum address!`, - ); - } - - return checksumAddress; -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/web-services/status-endpoint-v1.ts b/packages/cactus-plugin-persistence-ethereum/src/main/typescript/web-services/status-endpoint-v1.ts deleted file mode 100644 index 66a1d78358..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/main/typescript/web-services/status-endpoint-v1.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * OpenAPI endpoint (GET) for reading status of the persistence plugin. - */ - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import type { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginPersistenceEthereum } from "../plugin-persistence-ethereum"; -import OAS from "../../json/openapi.json"; - -import type { Express, Request, Response } from "express"; - -export interface IStatusEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginPersistenceEthereum; -} - -/** - * OpenAPI endpoint (GET) for reading status of the persistence plugin. - */ -export class StatusEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "StatusEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return StatusEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IStatusEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): any { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-ethereum/status" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - - try { - const resBody = this.options.connector.getStatus(); - res.status(200).json(resBody); - } catch (ex) { - this.log.warn(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: safeStringifyException(ex), - }); - } - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC20.json b/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC20.json deleted file mode 100644 index a2c68148e8..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC20.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "data": { - "bytecode": { - "object": "60806040523480156200001157600080fd5b5060405162000d0e38038062000d0e8339810160408190526200003491620002ce565b6040518060400160405280600981526020017f54657374455243323000000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f54323000000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000b892919062000228565b508051620000ce90600490602084019062000228565b505050620000ec3382620000f3640100000000026401000000009004565b506200037e565b600160a060020a03821662000168576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b6200017f6000838364010000000062000223810204565b8060026000828254620001939190620002e8565b9091555050600160a060020a03821660009081526020819052604081208054839290620001c2908490620002e8565b9091555050604051818152600160a060020a038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36200021f6000838364010000000062000223810204565b5050565b505050565b828054620002369062000328565b90600052602060002090601f0160209004810192826200025a5760008555620002a5565b82601f106200027557805160ff1916838001178555620002a5565b82800160010185558215620002a5579182015b82811115620002a557825182559160200191906001019062000288565b50620002b3929150620002b7565b5090565b5b80821115620002b35760008155600101620002b8565b600060208284031215620002e157600080fd5b5051919050565b6000821982111562000323577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b6002810460018216806200033d57607f821691505b6020821081141562000378577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b610980806200038e6000396000f3fe608060405234801561001057600080fd5b50600436106100c6576000357c010000000000000000000000000000000000000000000000000000000090048063395093511161008e578063395093511461014057806370a082311461015357806395d89b411461017c578063a457c2d714610184578063a9059cbb14610197578063dd62ed3e146101aa57600080fd5b806306fdde03146100cb578063095ea7b3146100e957806318160ddd1461010c57806323b872dd1461011e578063313ce56714610131575b600080fd5b6100d36101bd565b6040516100e09190610862565b60405180910390f35b6100fc6100f7366004610838565b61024f565b60405190151581526020016100e0565b6002545b6040519081526020016100e0565b6100fc61012c3660046107fc565b610267565b604051601281526020016100e0565b6100fc61014e366004610838565b61028b565b6101106101613660046107a7565b600160a060020a031660009081526020819052604090205490565b6100d36102ad565b6100fc610192366004610838565b6102bc565b6100fc6101a5366004610838565b610357565b6101106101b83660046107c9565b610365565b6060600380546101cc906108f6565b80601f01602080910402602001604051908101604052809291908181526020018280546101f8906108f6565b80156102455780601f1061021a57610100808354040283529160200191610245565b820191906000526020600020905b81548152906001019060200180831161022857829003601f168201915b5050505050905090565b60003361025d818585610390565b5060019392505050565b6000336102758582856104ee565b61028085858561056b565b506001949350505050565b60003361025d81858561029e8383610365565b6102a891906108b7565b610390565b6060600480546101cc906108f6565b600033816102ca8286610365565b90508381101561034a5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102808286868403610390565b60003361025d81858561056b565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600160a060020a03831661040e5760405160e560020a62461bcd028152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610341565b600160a060020a03821661048d5760405160e560020a62461bcd02815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610341565b600160a060020a0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104fa8484610365565b9050600019811461056557818110156105585760405160e560020a62461bcd02815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610341565b6105658484848403610390565b50505050565b600160a060020a0383166105ea5760405160e560020a62461bcd02815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610341565b600160a060020a0382166106695760405160e560020a62461bcd02815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610341565b600160a060020a038316600090815260208190526040902054818110156106fb5760405160e560020a62461bcd02815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610341565b600160a060020a038085166000908152602081905260408082208585039055918516815290812080548492906107329084906108b7565b9250508190555082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161077e91815260200190565b60405180910390a3610565565b8035600160a060020a03811681146107a257600080fd5b919050565b6000602082840312156107b957600080fd5b6107c28261078b565b9392505050565b600080604083850312156107dc57600080fd5b6107e58361078b565b91506107f36020840161078b565b90509250929050565b60008060006060848603121561081157600080fd5b61081a8461078b565b92506108286020850161078b565b9150604084013590509250925092565b6000806040838503121561084b57600080fd5b6108548361078b565b946020939093013593505050565b600060208083528351808285015260005b8181101561088f57858101830151858201604001528201610873565b818111156108a1576000604083870101525b50601f01601f1916929092016040019392505050565b600082198211156108f1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b60028104600182168061090a57607f821691505b60208210811415610944577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea264697066735822122072fe34de87afcac38ed24187228460c1c1541afba6fc93753e2af5db4b45c9a264736f6c63430008070033" - } - }, - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "initialSupply", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC20.sol b/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC20.sol deleted file mode 100644 index 89e0fc1ab8..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC20.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity ^0.8.0; - -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -contract TestErc20Token is ERC20 { - constructor(uint256 initialSupply) ERC20("TestERC20", "T20") { - _mint(msg.sender, initialSupply); - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC721.json b/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC721.json deleted file mode 100644 index 83c807aa74..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC721.json +++ /dev/null @@ -1,414 +0,0 @@ -{ - "data": { - "bytecode": { - "object": "60806040523480156200001157600080fd5b506040518060400160405280600f81526020017f54657374457263373231546f6b656e00000000000000000000000000000000008152506040518060400160405280600481526020017f543732310000000000000000000000000000000000000000000000000000000081525081600090816200008f919062000200565b5060016200009e828262000200565b505050620000cd620000be620000d3640100000000026401000000009004565b640100000000620000d7810204565b620002d3565b3390565b60068054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6002810460018216806200016d57607f821691505b602082108103620001a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115620001fb576000818152602081206020601f86010481016020861015620001d65750805b6020601f860104820191505b81811015620001f757828155600101620001e2565b5050505b505050565b815167ffffffffffffffff8111156200021d576200021d62000129565b62000235816200022e845462000158565b84620001ad565b602080601f831160018114620002715760008415620002545750858301515b60028086026008870290910a6000190419821617865550620001f7565b600085815260208120601f198616915b82811015620002a25788860151825594840194600190910190840162000281565b5085821015620002c357878501516008601f88160260020a60001904191681555b5050505050600202600101905550565b61177c80620002e36000396000f3fe608060405234801561001057600080fd5b5060043610610128576000357c010000000000000000000000000000000000000000000000000000000090048063715018a6116100bf578063a22cb4651161008e578063a22cb46514610238578063b88d4fde1461024b578063c87b56dd1461025e578063e985e9c514610271578063f2fde38b1461028457600080fd5b8063715018a6146102045780638da5cb5b1461020c57806395d89b411461021d578063a14481941461022557600080fd5b806323b872dd116100fb57806323b872dd146101aa57806342842e0e146101bd5780636352211e146101d057806370a08231146101e357600080fd5b806301ffc9a71461012d57806306fdde0314610155578063081812fc1461016a578063095ea7b314610195575b600080fd5b61014061013b36600461124f565b610297565b60405190151581526020015b60405180910390f35b61015d610334565b60405161014c91906112bc565b61017d6101783660046112cf565b6103c6565b604051600160a060020a03909116815260200161014c565b6101a86101a3366004611304565b6103ed565b005b6101a86101b836600461132e565b610529565b6101a86101cb36600461132e565b61055d565b61017d6101de3660046112cf565b610578565b6101f66101f136600461136a565b6105e0565b60405190815260200161014c565b6101a861067d565b600654600160a060020a031661017d565b61015d610691565b6101a8610233366004611304565b6106a0565b6101a8610246366004611385565b6106b6565b6101a86102593660046113f0565b6106c1565b61015d61026c3660046112cf565b6106fc565b61014061027f3660046114cc565b610795565b6101a861029236600461136a565b6107c3565b6000600160e060020a031982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806102fa5750600160e060020a031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061032e57507f01ffc9a700000000000000000000000000000000000000000000000000000000600160e060020a03198316145b92915050565b606060008054610343906114ff565b80601f016020809104026020016040519081016040528092919081815260200182805461036f906114ff565b80156103bc5780601f10610391576101008083540402835291602001916103bc565b820191906000526020600020905b81548152906001019060200180831161039f57829003601f168201915b5050505050905090565b60006103d182610856565b50600090815260046020526040902054600160a060020a031690565b60006103f882610578565b905080600160a060020a031683600160a060020a0316036104895760405160e560020a62461bcd02815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b33600160a060020a03821614806104a557506104a58133610795565b61051a5760405160e560020a62461bcd02815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610480565b61052483836108bd565b505050565b6105333382610938565b6105525760405160e560020a62461bcd02815260040161048090611552565b610524838383610997565b610524838383604051806020016040528060008152506106c1565b600081815260026020526040812054600160a060020a03168061032e5760405160e560020a62461bcd02815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610480565b6000600160a060020a0382166106615760405160e560020a62461bcd02815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610480565b50600160a060020a031660009081526003602052604090205490565b610685610b37565b61068f6000610b94565b565b606060018054610343906114ff565b6106a8610b37565b6106b28282610bf3565b5050565b6106b2338383610c0d565b6106cb3383610938565b6106ea5760405160e560020a62461bcd02815260040161048090611552565b6106f684848484610cde565b50505050565b606061070782610856565b600061074360408051808201909152601481527f68747470733a2f2f6578616d706c652e636f6d2f000000000000000000000000602082015290565b90506000815111610763576040518060200160405280600081525061078e565b8061076d84610d14565b60405160200161077e9291906115af565b6040516020818303038152906040525b9392505050565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6107cb610b37565b600160a060020a03811661084a5760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610480565b61085381610b94565b50565b600081815260026020526040902054600160a060020a03166108535760405160e560020a62461bcd02815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610480565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03841690811790915581906108ff82610578565b600160a060020a03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061094483610578565b905080600160a060020a031684600160a060020a0316148061096b575061096b8185610795565b8061098f575083600160a060020a0316610984846103c6565b600160a060020a0316145b949350505050565b82600160a060020a03166109aa82610578565b600160a060020a0316146109d35760405160e560020a62461bcd028152600401610480906115de565b600160a060020a038216610a515760405160e560020a62461bcd028152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610480565b610a5e8383836001610db4565b82600160a060020a0316610a7182610578565b600160a060020a031614610a9a5760405160e560020a62461bcd028152600401610480906115de565b6000818152600460209081526040808320805473ffffffffffffffffffffffffffffffffffffffff19908116909155600160a060020a0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600654600160a060020a0316331461068f5760405160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610480565b60068054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6106b2828260405180602001604052806000815250610e3c565b81600160a060020a031683600160a060020a031603610c715760405160e560020a62461bcd02815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610480565b600160a060020a03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610ce9848484610997565b610cf584848484610e72565b6106f65760405160e560020a62461bcd0281526004016104809061163b565b60606000610d2183610fa8565b600101905060008167ffffffffffffffff811115610d4157610d416113c1565b6040519080825280601f01601f191660200182016040528015610d6b576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084610d7557509392505050565b60018111156106f657600160a060020a03841615610dfa57600160a060020a03841660009081526003602052604081208054839290610df49084906116c7565b90915550505b600160a060020a038316156106f657600160a060020a03831660009081526003602052604081208054839290610e319084906116da565b909155505050505050565b610e46838361108a565b610e536000848484610e72565b6105245760405160e560020a62461bcd0281526004016104809061163b565b6000600160a060020a0384163b15610f9d576040517f150b7a02000000000000000000000000000000000000000000000000000000008152600160a060020a0385169063150b7a0290610ecf9033908990889088906004016116ed565b6020604051808303816000875af1925050508015610f0a575060408051601f3d908101601f19168201909252610f0791810190611729565b60015b610f6a573d808015610f38576040519150601f19603f3d011682016040523d82523d6000602084013e610f3d565b606091505b508051600003610f625760405160e560020a62461bcd0281526004016104809061163b565b805181602001fd5b600160e060020a0319167f150b7a020000000000000000000000000000000000000000000000000000000014905061098f565b506001949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610ff1577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061101d576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061103b57662386f26fc10000830492506010015b6305f5e1008310611053576305f5e100830492506008015b612710831061106757612710830492506004015b60648310611079576064830492506002015b600a831061032e5760010192915050565b600160a060020a0382166110e35760405160e560020a62461bcd02815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610480565b600081815260026020526040902054600160a060020a03161561114b5760405160e560020a62461bcd02815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610480565b611159600083836001610db4565b600081815260026020526040902054600160a060020a0316156111c15760405160e560020a62461bcd02815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610480565b600160a060020a0382166000818152600360209081526040808320805460010190558483526002909152808220805473ffffffffffffffffffffffffffffffffffffffff19168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600160e060020a03198116811461085357600080fd5b60006020828403121561126157600080fd5b813561078e81611239565b60005b8381101561128757818101518382015260200161126f565b50506000910152565b600081518084526112a881602086016020860161126c565b601f01601f19169290920160200192915050565b60208152600061078e6020830184611290565b6000602082840312156112e157600080fd5b5035919050565b8035600160a060020a03811681146112ff57600080fd5b919050565b6000806040838503121561131757600080fd5b611320836112e8565b946020939093013593505050565b60008060006060848603121561134357600080fd5b61134c846112e8565b925061135a602085016112e8565b9150604084013590509250925092565b60006020828403121561137c57600080fd5b61078e826112e8565b6000806040838503121561139857600080fd5b6113a1836112e8565b9150602083013580151581146113b657600080fd5b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806080858703121561140657600080fd5b61140f856112e8565b935061141d602086016112e8565b925060408501359150606085013567ffffffffffffffff8082111561144157600080fd5b818701915087601f83011261145557600080fd5b813581811115611467576114676113c1565b604051601f8201601f19908116603f0116810190838211818310171561148f5761148f6113c1565b816040528281528a60208487010111156114a857600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156114df57600080fd5b6114e8836112e8565b91506114f6602084016112e8565b90509250929050565b60028104600182168061151357607f821691505b60208210810361154c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201527f72206f7220617070726f76656400000000000000000000000000000000000000606082015260800190565b600083516115c181846020880161126c565b8351908301906115d581836020880161126c565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201527f6f776e6572000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561032e5761032e611698565b8082018082111561032e5761032e611698565b6000600160a060020a0380871683528086166020840152508360408301526080606083015261171f6080830184611290565b9695505050505050565b60006020828403121561173b57600080fd5b815161078e8161123956fea264697066735822122025aa7c3accb8a761120a8ec826eb8694d1223d3972520e7935c1ea59e90e719664736f6c63430008110033" - } - }, - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeMint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC721.sol b/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC721.sol deleted file mode 100644 index 46ca9597c4..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/test/solidity/TestERC721.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity ^0.8.0; - -import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; -import "@openzeppelin/contracts/access/Ownable.sol"; - -contract TestErc721Token is ERC721, Ownable { - constructor() ERC721("TestErc721Token", "T721") {} - - function _baseURI() internal pure override returns (string memory) { - return "https://example.com/"; - } - - function safeMint(address to, uint256 tokenId) public onlyOwner { - _safeMint(to, tokenId); - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/sql/insert-test-data.sql b/packages/cactus-plugin-persistence-ethereum/src/test/sql/insert-test-data.sql deleted file mode 100644 index c71c407c4f..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/test/sql/insert-test-data.sql +++ /dev/null @@ -1,476 +0,0 @@ --- --- Data for Name: block; Type: TABLE DATA; Schema: ethereum; Owner: postgres --- - -INSERT INTO ethereum.block VALUES (1, '2023-01-02 17:00:57', '0x5323194ab60df62c6de2ea6d496463924accaf39e3da336313aa34c4ffd7386d', 0, '2023-01-02 18:00:32.139115+00'); -INSERT INTO ethereum.block VALUES (2, '2023-01-02 17:23:11', '0x9801754c8ac30566b7e24e65ed63298ffb4ba4ed8669240dc56ee23fa6bd787f', 0, '2023-01-02 18:00:32.297235+00'); -INSERT INTO ethereum.block VALUES (3, '2023-01-02 17:23:13', '0x0564872490325ff3359556d0c6d513b1177f67d3406c95eaf2b72fd4845a1121', 0, '2023-01-02 18:00:32.347004+00'); -INSERT INTO ethereum.block VALUES (4, '2023-01-02 17:23:14', '0xa4e83af4a08589bf272b6a9e237597c0268be319d7b48a581ca1a40943ecc925', 0, '2023-01-02 18:00:32.436578+00'); -INSERT INTO ethereum.block VALUES (5, '2023-01-02 17:23:18', '0xebcbaa796dd85d93c4cbe325f7a9941209b22d239f159e05b1a097ce6b889ee0', 0, '2023-01-02 18:00:32.547509+00'); -INSERT INTO ethereum.block VALUES (6, '2023-01-02 17:23:23', '0xcdac6d7dfb745dac841bc1d8474f6fa16d16cc58574c9f40cadc476630993227', 0, '2023-01-02 18:00:32.639068+00'); -INSERT INTO ethereum.block VALUES (7, '2023-01-02 17:23:34', '0xf0ad8d8e74e2867610f43fabb76933d16eea8853260ddd747624980016a1affb', 0, '2023-01-02 18:00:32.755696+00'); -INSERT INTO ethereum.block VALUES (8, '2023-01-02 17:23:35', '0x37490e1cd493409b29a6d395da0156669c2e4dad70cfdbdcbca5a687c1b9e860', 0, '2023-01-02 18:00:32.854354+00'); -INSERT INTO ethereum.block VALUES (9, '2023-01-02 17:23:37', '0x5882d3fc20eb699d2dca4cf5c36605c71778dd285c696433d8834db206b9f7f6', 0, '2023-01-02 18:00:32.990385+00'); -INSERT INTO ethereum.block VALUES (10, '2023-01-02 17:23:40', '0x841758903ea827c2df59f9d18e3d22dd1a4f449bbb61d70b2b9095d0ae4555bf', 0, '2023-01-02 18:00:33.101808+00'); -INSERT INTO ethereum.block VALUES (11, '2023-01-02 17:23:42', '0x358bf9bd4bf5cfbaa744da670141aad529f0eca40f2c77a35e1b95657e0503f7', 0, '2023-01-02 18:00:33.210793+00'); -INSERT INTO ethereum.block VALUES (12, '2023-01-02 17:23:44', '0x8de4fcaa0c67052927b43da7036a77223b12229ed0543ff1967ec8539fe410b4', 0, '2023-01-02 18:00:33.317169+00'); -INSERT INTO ethereum.block VALUES (13, '2023-01-02 17:23:56', '0x89cf04d03f83b06b51eb1b67fd71270b7f8c30a43451aa14c3147f1e5af81455', 0, '2023-01-02 18:00:33.389728+00'); -INSERT INTO ethereum.block VALUES (14, '2023-01-02 17:23:58', '0x24ecc972423f975eb164821f4c2562d465f329427ba3ec7b722aadbd1b40cf5f', 0, '2023-01-02 18:00:33.469336+00'); -INSERT INTO ethereum.block VALUES (15, '2023-01-02 17:23:59', '0x9fbebb652ecef621d7d8656868feef6bcacf44e943959f9e775f5cc89735b17f', 0, '2023-01-02 18:00:33.620887+00'); -INSERT INTO ethereum.block VALUES (16, '2023-01-02 17:24:00', '0x1686b36e4be7dd557e1805cecebe4b73d4595f35916ed25d95f6d4bcbb3b2f2b', 0, '2023-01-02 18:00:33.690413+00'); -INSERT INTO ethereum.block VALUES (17, '2023-01-02 17:24:01', '0x9c667b351d6f3407a58258c58398843befcf7119a91fb22502de27a3263b3c20', 0, '2023-01-02 18:00:33.781898+00'); -INSERT INTO ethereum.block VALUES (18, '2023-01-02 17:24:02', '0x98519c4eac859423f6622a0ea5a0f9aa8aff4977aeb0bc936c8623f46ba847d7', 0, '2023-01-02 18:00:33.917048+00'); -INSERT INTO ethereum.block VALUES (19, '2023-01-02 17:24:08', '0xe7a3ae3967ea5fcca34e6a6b4297d4fd189a40c138c1d40d80df0216fcf6a10e', 0, '2023-01-02 18:00:34.074177+00'); -INSERT INTO ethereum.block VALUES (20, '2023-01-02 17:24:09', '0xda57d3220227f7c9cc9af1cc6222b2c229c80ac83d3c60a21e77d198aef85be6', 0, '2023-01-02 18:00:34.464986+00'); -INSERT INTO ethereum.block VALUES (21, '2023-01-02 17:24:17', '0x9426753d26c53d0cae7e22e97d8dcb30712985de513505cde6f59c2b7ea0ef49', 0, '2023-01-02 18:00:35.459851+00'); -INSERT INTO ethereum.block VALUES (22, '2023-01-02 17:24:22', '0x376a3d308e60b3a72bb38238dc3676bf3bb5c9a7646be198661e72504217df14', 0, '2023-01-02 18:00:35.583877+00'); -INSERT INTO ethereum.block VALUES (23, '2023-01-02 17:24:23', '0xe3f23d001bfcc4f3eb5106d1dc6f5be110dd061724157983e0a32a60c5bc4db0', 0, '2023-01-02 18:00:35.773663+00'); -INSERT INTO ethereum.block VALUES (24, '2023-01-02 17:24:33', '0xec9874c4c083c61a7c36b46ff3920059f6f2fe2e991d6585b51041eb8d345f71', 0, '2023-01-02 18:00:35.909641+00'); -INSERT INTO ethereum.block VALUES (25, '2023-01-02 17:24:36', '0x7ddfcd8de3bd740d3b29c76388c12c5fad7c16bacdce5f1b9e03195dcb442dbc', 0, '2023-01-02 18:00:36.060426+00'); -INSERT INTO ethereum.block VALUES (26, '2023-01-02 17:24:39', '0x9d2a4799a6fe90ac426dc203e137ccaec8921ba8e861f30d663a675ef919aea5', 0, '2023-01-02 18:00:36.150777+00'); -INSERT INTO ethereum.block VALUES (27, '2023-01-02 17:24:40', '0x36939335713391a104896fbb881b1791f55c23c05bbe4d3b146942051ca6795d', 0, '2023-01-02 18:00:36.259787+00'); -INSERT INTO ethereum.block VALUES (28, '2023-01-02 17:24:43', '0xd7eaca2f0b03114a39097df3417fbf1ca9a67ee97a48753bf01277470149cc15', 0, '2023-01-02 18:00:36.334233+00'); -INSERT INTO ethereum.block VALUES (29, '2023-01-02 17:24:47', '0xc6aab7ae0b5c8e2e09a31dd23f15c3b032aa97686aa7369d172276564e39c78c', 0, '2023-01-02 18:00:36.38528+00'); -INSERT INTO ethereum.block VALUES (30, '2023-01-02 17:24:48', '0xfc0e1fb9021d93f58ec9b07a4db3183a0502b877e37cf69b60954f837db967fe', 0, '2023-01-02 18:00:36.522982+00'); -INSERT INTO ethereum.block VALUES (31, '2023-01-02 17:24:49', '0x3033d6d99d4d3d94489218a56e1bd8d589e697c3acec2c3dc5159d65dba79641', 0, '2023-01-02 18:00:36.594163+00'); -INSERT INTO ethereum.block VALUES (32, '2023-01-02 17:24:50', '0xbc0d4479603875a72f6998eaa3885fe7210d308b4bf0eb2e63871752c5440e89', 0, '2023-01-02 18:00:36.66836+00'); -INSERT INTO ethereum.block VALUES (33, '2023-01-02 17:24:51', '0x925659cf777c012aa8d3971c293faca1bde2d73079a7f8225886f8f1faf81d9d', 0, '2023-01-02 18:00:36.743784+00'); -INSERT INTO ethereum.block VALUES (34, '2023-01-02 17:24:53', '0xa2b6bb5cbe9a6ca8f2c5b015d016a481eb981b397156265bb94c398600725f6e', 0, '2023-01-02 18:00:36.851248+00'); -INSERT INTO ethereum.block VALUES (35, '2023-01-02 17:24:55', '0xe83831376959157a7bb4822fa8a7bff434320f7524c493b5e48c40641ef3832b', 0, '2023-01-02 18:00:36.979469+00'); -INSERT INTO ethereum.block VALUES (36, '2023-01-02 17:25:00', '0xafb004e79706670dde99524f5a919a2edabc7157ccf73d597b56383265fafaad', 0, '2023-01-02 18:00:37.14747+00'); -INSERT INTO ethereum.block VALUES (37, '2023-01-02 17:25:08', '0x12dd7cce9861187f487ee6569285b9a952ea5ccf818eaa6d1253c82ec027163a', 0, '2023-01-02 18:00:37.281766+00'); -INSERT INTO ethereum.block VALUES (38, '2023-01-02 17:25:12', '0x6fd9a44de032641ce9a7729d3d79977a4caf7d7cbacde112da7629377d8a21a5', 0, '2023-01-02 18:00:37.365233+00'); -INSERT INTO ethereum.block VALUES (39, '2023-01-02 17:25:16', '0x5411f8b9a3b70b8d0a4e1fd972a887ae69999544b3045da100a0a2d2e1b76bb3', 0, '2023-01-02 18:00:37.416246+00'); -INSERT INTO ethereum.block VALUES (40, '2023-01-02 17:25:38', '0x7ffd6fcba3f68ee56de3e0c4ec6706c3faa4e05da31e3d53a0d8f14703a0e8f2', 0, '2023-01-02 18:00:37.48539+00'); -INSERT INTO ethereum.block VALUES (41, '2023-01-02 17:25:39', '0x8d24de91281b35c0df16daffb16add14d88cd33f7e7a0d66d62786c5a0e2bfaa', 0, '2023-01-02 18:00:37.567629+00'); -INSERT INTO ethereum.block VALUES (42, '2023-01-02 17:25:56', '0xe0e414cb66a70c9dd1bb0ad6e39a70b5f434f450f3b5eae9ea990f452180e31b', 0, '2023-01-02 18:00:37.616221+00'); -INSERT INTO ethereum.block VALUES (43, '2023-01-02 17:26:10', '0x0859b5ae7292457fc86da6ddf2cca79a40a978d7f629ab66627b490079dee016', 0, '2023-01-02 18:00:37.675836+00'); -INSERT INTO ethereum.block VALUES (44, '2023-01-02 17:26:12', '0x8416c350f2b87be6ef1f3c9e691f0ff2ef29d46b42e530da1ec608e6d92d268c', 0, '2023-01-02 18:00:37.773911+00'); -INSERT INTO ethereum.block VALUES (45, '2023-01-02 17:26:16', '0x47d65eed9bbfa9d7ee4b058ee4122dd517bb96185204a51397cc22fd89b4b600', 0, '2023-01-02 18:00:37.900818+00'); -INSERT INTO ethereum.block VALUES (46, '2023-01-02 17:26:20', '0x01ebdc6245356b632b482a8eb3c6cf9354d11c20b6f8581013f92bdf75f8c1d4', 0, '2023-01-02 18:00:37.958138+00'); -INSERT INTO ethereum.block VALUES (47, '2023-01-02 17:26:31', '0x87dc6d9b308cb27f246cd400a42025100ca8664697a365b8cce2d028d3a6af2c', 0, '2023-01-02 18:00:37.999352+00'); -INSERT INTO ethereum.block VALUES (48, '2023-01-02 17:26:32', '0x4509e7fdbac7038aa677a9ca5276397e1db295e7e6ed326719949d230f4f54b4', 0, '2023-01-02 18:00:38.130753+00'); -INSERT INTO ethereum.block VALUES (49, '2023-01-02 17:26:39', '0x6c8458e2ef8af308b75fc27c3022ae5b20c451b6c04cd1de5b523af5a3a81e79', 0, '2023-01-02 18:00:38.219231+00'); -INSERT INTO ethereum.block VALUES (50, '2023-01-02 17:26:53', '0xc454848e8e05ea0e4b9485985bd117fdb14d7987c0c4ceff561b1380a84c4059', 0, '2023-01-02 18:00:38.268831+00'); -INSERT INTO ethereum.block VALUES (51, '2023-01-02 17:26:57', '0x3b73ed152ca7339805059f1798019c235d244b2666d9fce007a4c6adbecc379c', 0, '2023-01-02 18:00:38.32083+00'); -INSERT INTO ethereum.block VALUES (52, '2023-01-02 17:27:05', '0xbb1b9dadddf119b4be38cf910ee530f1712d5bd812ed7426d18c8ac0388caec2', 0, '2023-01-02 18:00:38.381226+00'); -INSERT INTO ethereum.block VALUES (53, '2023-01-02 17:27:08', '0x3541639c8b133924c0fa8f9ec1d80c8a76a64c83563827c15e7b3f26f95dd84d', 0, '2023-01-02 18:00:38.603688+00'); -INSERT INTO ethereum.block VALUES (54, '2023-01-02 17:27:11', '0x7376c19c0ba99c0385218c874c1b807717140c07352bb51c43e7ea055d31b989', 0, '2023-01-02 18:00:38.665982+00'); -INSERT INTO ethereum.block VALUES (55, '2023-01-02 17:27:15', '0x4452457b7f410c859e3e140439963bc9af8aa55b2a2f206de5de50e1d2505cdb', 0, '2023-01-02 18:00:38.737735+00'); -INSERT INTO ethereum.block VALUES (56, '2023-01-02 17:27:18', '0xc79031007b9f8376e2755973874583738b58ca39a13f9844c7045e694f6c2be4', 0, '2023-01-02 18:00:38.90321+00'); -INSERT INTO ethereum.block VALUES (57, '2023-01-02 17:27:32', '0xef3765a61ded17cf6738724cb795e8319bd53e3352875863681790481f7128ab', 0, '2023-01-02 18:00:38.953993+00'); -INSERT INTO ethereum.block VALUES (58, '2023-01-02 17:27:35', '0x23daea0667e9f0a321f48bf18250dcc8f58a68c872b059594beccd4c2ed5001e', 0, '2023-01-02 18:00:39.008884+00'); -INSERT INTO ethereum.block VALUES (59, '2023-01-02 17:27:38', '0xb977262d52e88cb238cb2f6be5561a865fd803aee304cf45ba706d811aa04fab', 0, '2023-01-02 18:00:39.117037+00'); -INSERT INTO ethereum.block VALUES (60, '2023-01-02 17:27:43', '0x5eb4a66f8a22db2fd5b0fee99c98342af562ad64295252380b06c5d7fd9125a5', 0, '2023-01-02 18:00:39.218232+00'); -INSERT INTO ethereum.block VALUES (61, '2023-01-02 17:27:44', '0x37e8d5caab84658bb025ce14e07157cd613bb9e04edcbcaef0f1621bf9048425', 0, '2023-01-02 18:00:39.302708+00'); -INSERT INTO ethereum.block VALUES (62, '2023-01-02 17:27:47', '0x1f41d9b9b0724c262b0d304f32810ea83304a69b0d5c185283eaf428c2a69e74', 0, '2023-01-02 18:00:39.398807+00'); -INSERT INTO ethereum.block VALUES (63, '2023-01-02 17:27:48', '0xaf1ab6c5bd95185dade343dd62cecd8cc40c248965d4b8ec5451fe7fe42255da', 0, '2023-01-02 18:00:39.518866+00'); -INSERT INTO ethereum.block VALUES (64, '2023-01-02 17:28:13', '0x4e07b373c81219cda4174b2b2ae4a548051292d554a51ff9b36dc6078d75ea47', 0, '2023-01-02 18:00:39.570179+00'); -INSERT INTO ethereum.block VALUES (65, '2023-01-02 17:28:24', '0x0f0f8a3df34ea2455bd14fde92aa19118f856cb1ff993b7aa7eabf801dc0269e', 0, '2023-01-02 18:00:39.620023+00'); -INSERT INTO ethereum.block VALUES (66, '2023-01-02 17:28:29', '0x3522eb8f2760b93f8fa62e8c167960ac59a42ef9711f1471065f3ac4caefaae5', 0, '2023-01-02 18:00:39.670382+00'); -INSERT INTO ethereum.block VALUES (67, '2023-01-02 17:28:33', '0x6595853a54f337aad283567d9bb4ab794c63ef6d5a4e86b29a2db9ba450b33ab', 0, '2023-01-02 18:00:39.831346+00'); -INSERT INTO ethereum.block VALUES (68, '2023-01-02 17:28:34', '0xe0e6244c5cdd25e1d265cd5c161afe0a01eb114590e87f1c2a9a2815f4318b3d', 0, '2023-01-02 18:00:39.882762+00'); -INSERT INTO ethereum.block VALUES (69, '2023-01-02 17:28:49', '0x6abd73d5e60813057d4d4dc5ab55443e52540374ed1ebf82b30e91ff1024ba45', 0, '2023-01-02 18:00:39.97495+00'); -INSERT INTO ethereum.block VALUES (70, '2023-01-02 17:28:50', '0x758c7d8cf0b2560f29a1cd6ff4828ab5e239625a25fbfd4b6d539cdd72a9cd95', 0, '2023-01-02 18:00:40.099142+00'); -INSERT INTO ethereum.block VALUES (71, '2023-01-02 17:28:52', '0x9871d81c6ef0c0e74632104070677e3061cd0c6b6bde00d4af742f70d9c1a13a', 0, '2023-01-02 18:00:40.292417+00'); -INSERT INTO ethereum.block VALUES (72, '2023-01-02 17:29:08', '0xae33c483e2d34b32ddeeae0ac317a941d8ea4d2b2fd2d9870e168d50e4b2c3b4', 0, '2023-01-02 18:00:40.388508+00'); -INSERT INTO ethereum.block VALUES (73, '2023-01-02 17:29:09', '0x9ea60d9ec38ed25d149017031675e98e5b5fac269cbb728a5fcf57122ec2c809', 0, '2023-01-02 18:00:40.448083+00'); -INSERT INTO ethereum.block VALUES (74, '2023-01-02 17:29:16', '0x85f1e7bec8b05a0721b910b92ea791a97354e4ff5e82adbd27dfad23a2e1947b', 0, '2023-01-02 18:00:40.50961+00'); -INSERT INTO ethereum.block VALUES (75, '2023-01-02 17:29:19', '0x9a69913cc4698a3bec2a63725071a17b0dce0d6bcb83342e1349204b933280bf', 0, '2023-01-02 18:00:40.606344+00'); -INSERT INTO ethereum.block VALUES (76, '2023-01-02 17:29:34', '0x9b74506a4bbae7602666301105a06592130cc95b83ca104598fcd74d423f96a3', 0, '2023-01-02 18:00:40.676795+00'); -INSERT INTO ethereum.block VALUES (77, '2023-01-02 17:29:36', '0x0ba42eaec7cdab9edc225bf699d65d242f5c963fc3188cfbc881e0226d657350', 0, '2023-01-02 18:00:40.740097+00'); -INSERT INTO ethereum.block VALUES (78, '2023-01-02 17:30:05', '0x0593ffe9530e2cd72584faf8772db5333492485787380fde24044d778cab9af3', 0, '2023-01-02 18:00:40.790384+00'); -INSERT INTO ethereum.block VALUES (79, '2023-01-02 17:30:07', '0xaa5404aca97d85cfbc2e2ce0068a1ee47355401f6cdba17894c134806a9561e9', 0, '2023-01-02 18:00:40.946382+00'); -INSERT INTO ethereum.block VALUES (80, '2023-01-02 17:30:08', '0xef2adea07381430985cccc621cba68b36cfd2b2a7146a55ba626a533afd79461', 0, '2023-01-02 18:00:41.009606+00'); -INSERT INTO ethereum.block VALUES (81, '2023-01-02 17:30:16', '0x3148e773cee209b0cace908e4e061702c2b3172d7b96785b3a84e3d5464c8cdf', 0, '2023-01-02 18:00:41.087313+00'); -INSERT INTO ethereum.block VALUES (82, '2023-01-02 17:30:24', '0xff307fe945e3669581c609493efd6acb6cf3e49ed19b4acc7937c2f4aa308cdf', 0, '2023-01-02 18:00:41.174339+00'); -INSERT INTO ethereum.block VALUES (83, '2023-01-02 17:30:25', '0x62342c3bf8a643a7bb4628e93b4d9a89a5c724d351805fce022a855295045ead', 0, '2023-01-02 18:00:41.24681+00'); -INSERT INTO ethereum.block VALUES (84, '2023-01-02 17:30:26', '0x80961ebf86c5b50736295b4732d4eaad2b0675b690989a88fa92570a5d0bef29', 0, '2023-01-02 18:00:41.329976+00'); -INSERT INTO ethereum.block VALUES (85, '2023-01-02 17:30:36', '0x68e574b6d780234ee35541f20a4b68e01d21c3f27b9c0a46ea25f4f6da30b0ad', 0, '2023-01-02 18:00:41.500567+00'); -INSERT INTO ethereum.block VALUES (86, '2023-01-02 17:30:42', '0x152886491e5662b0285bf95b78a1a2dba560c0d5f4df3c759e97ef60f87ee628', 0, '2023-01-02 18:00:41.628264+00'); -INSERT INTO ethereum.block VALUES (87, '2023-01-02 17:30:51', '0x457bd11b0701900a9d4f50279746e52c0681639bac661c85b3dcb5ffe43b044a', 0, '2023-01-02 18:00:41.744466+00'); -INSERT INTO ethereum.block VALUES (88, '2023-01-02 17:31:00', '0x87fe7d30a8b23b2541247ea33e0ac4ee589d9a6e110f3b5076352a25199faa8a', 0, '2023-01-02 18:00:41.860781+00'); -INSERT INTO ethereum.block VALUES (89, '2023-01-02 17:31:09', '0x71f7f0d3ddde810a249e49dc6572e67a5c48d986f8412c1ebcb5013cc7c7076f', 0, '2023-01-02 18:00:41.954397+00'); -INSERT INTO ethereum.block VALUES (90, '2023-01-02 17:31:23', '0x487bc428f20d6609292f2ebe24478626acb75f7196a9615f1b5db5efa7b30ffa', 0, '2023-01-02 18:00:42.015825+00'); -INSERT INTO ethereum.block VALUES (91, '2023-01-02 17:31:25', '0xab5602294e8165f609b9f9e3f2545c257ec16061e37aaf2be95be0a09ff98fe6', 0, '2023-01-02 18:00:42.151758+00'); -INSERT INTO ethereum.block VALUES (92, '2023-01-02 17:31:28', '0xec8e02479b2547c9d3b58168778954c420ddfcb1acbeb8492f921675b515d195', 0, '2023-01-02 18:00:42.258932+00'); -INSERT INTO ethereum.block VALUES (93, '2023-01-02 17:31:30', '0x67b89c837536aa20e01505e6ad1691ae98bd7648932cc4a59529bffef87b19fa', 0, '2023-01-02 18:00:42.34544+00'); -INSERT INTO ethereum.block VALUES (94, '2023-01-02 17:31:34', '0xa2ad73a239cbe21626df8429d89ddfb41ff0b0193145ccb0be96bdd2d41ebef3', 0, '2023-01-02 18:00:42.417855+00'); -INSERT INTO ethereum.block VALUES (95, '2023-01-02 17:31:39', '0x010e497841c6e979ca0d1f4ed26a2ba9d795e7f69fef800812bbccab1cbb6e6f', 0, '2023-01-02 18:00:42.516996+00'); -INSERT INTO ethereum.block VALUES (96, '2023-01-02 17:31:41', '0x9b1acf813092844a1cb72682133b97ffcbe7f42151fdba7bc74698d31ce77f08', 0, '2023-01-02 18:00:42.600947+00'); -INSERT INTO ethereum.block VALUES (97, '2023-01-02 17:32:09', '0x6c2c218251150ec5dc119e9f476920f195706e4c7b8781f9512253734aedb5bf', 0, '2023-01-02 18:00:42.647942+00'); -INSERT INTO ethereum.block VALUES (98, '2023-01-02 17:32:22', '0x6db1d830db09dc3f91264b4c7dad9c1db17733248978966a9413e11e8cf78fff', 0, '2023-01-02 18:00:42.716058+00'); -INSERT INTO ethereum.block VALUES (99, '2023-01-02 17:32:23', '0x525eca55e54b5ed75821c6c39249a68f8d2436cdee94a5ec4789ea988d5c5fc2', 0, '2023-01-02 18:00:42.815433+00'); -INSERT INTO ethereum.block VALUES (100, '2023-01-02 17:32:24', '0xb2a0666dac2acebea0a03640ca56b934ed38a6f2d96e8f30ab45fd04872a4258', 0, '2023-01-02 18:00:42.911604+00'); -INSERT INTO ethereum.block VALUES (101, '2023-01-02 17:32:28', '0x8f36e00696e18525b6037c63ee0d7dfb61a3efc75c0d61143ef73195bdc2cda5', 0, '2023-01-02 18:00:43.251737+00'); -INSERT INTO ethereum.block VALUES (102, '2023-01-02 17:32:30', '0xdf64c76c05678734d32c8067f7d5b3fe104287a0f2427bc58a4f817ead5320e7', 0, '2023-01-02 18:00:44.182148+00'); -INSERT INTO ethereum.block VALUES (103, '2023-01-02 17:32:41', '0x8219d072706b65658fdbfc696729327efed1831a221de6bded079ba8e2cb5099', 0, '2023-01-02 18:00:44.310215+00'); -INSERT INTO ethereum.block VALUES (104, '2023-01-02 17:32:44', '0x711eeb7400d49880f49246f42be6224cf202fbe3d9cbcb2e3f77c82142751394', 0, '2023-01-02 18:00:44.408616+00'); -INSERT INTO ethereum.block VALUES (105, '2023-01-02 17:32:46', '0xd4ce89fbadbcdf405e190a0d0a0bef69728ef2e8c3f7b6afaef2152662d105f0', 0, '2023-01-02 18:00:44.508403+00'); -INSERT INTO ethereum.block VALUES (106, '2023-01-02 17:32:48', '0xca145a6aa7cf720e16ea399deeb39a3c0c3994b3875b2d03cbf2b9d41048bdcc', 0, '2023-01-02 18:00:44.605357+00'); -INSERT INTO ethereum.block VALUES (107, '2023-01-02 17:32:49', '0xafa9205b16a00cecae4f7c3462894700d2005ff4742ebac7d1c1597ef4cd9f62', 0, '2023-01-02 18:00:44.687121+00'); -INSERT INTO ethereum.block VALUES (108, '2023-01-02 17:32:56', '0x741e1469622cfd77263b771a1329a3239df4e7018c60513234381ba578c337ff', 0, '2023-01-02 18:00:44.749164+00'); -INSERT INTO ethereum.block VALUES (109, '2023-01-02 17:33:10', '0x2ee8694b30e3a983ce44e4436e057eb2e6c61576193ed91298dbb09353005113', 0, '2023-01-02 18:00:44.896853+00'); -INSERT INTO ethereum.block VALUES (110, '2023-01-02 17:33:11', '0x5f921ddb9fb8b645f42141b54d9ccc028ae74ccaeec20f2022aa62284a6e37f0', 0, '2023-01-02 18:00:44.976747+00'); -INSERT INTO ethereum.block VALUES (111, '2023-01-02 17:33:13', '0x623692f636be1eb61dfbbf62559a1a22221f742556e5fe20a9e9c5fe8ba25a15', 0, '2023-01-02 18:00:45.100308+00'); -INSERT INTO ethereum.block VALUES (112, '2023-01-02 17:33:14', '0xdc8b896c74e58cd70d483f1758d65ffd75bed2281eaed721853b3f7dbc3c553e', 0, '2023-01-02 18:00:45.218025+00'); -INSERT INTO ethereum.block VALUES (113, '2023-01-02 17:33:15', '0x0bf06b581d4e7df044e8e6459704f04316645f81d48e080497cffee2c9e39aee', 0, '2023-01-02 18:00:45.348705+00'); -INSERT INTO ethereum.block VALUES (114, '2023-01-02 17:33:16', '0x6d4e60c2287920bf18999f15457e49169957ae0ea6df28d9ea659a1cd0104bb2', 0, '2023-01-02 18:00:45.499733+00'); -INSERT INTO ethereum.block VALUES (115, '2023-01-02 17:33:29', '0xe596afc6be4e49d7ff00906eec7e4a304fbe34408f56c7dc99e569e7da290f75', 0, '2023-01-02 18:00:45.60157+00'); -INSERT INTO ethereum.block VALUES (116, '2023-01-02 17:33:50', '0xf27eaeeefcf0909ed5c923c26ff6ff60991b24b3dba6c2d68b9c6a074eb74082', 0, '2023-01-02 18:00:45.652528+00'); -INSERT INTO ethereum.block VALUES (117, '2023-01-02 17:33:58', '0x2c1e3aab4ad895328c700cf54f715ca6cf5d912ceb2a48927969f29fd844d990', 0, '2023-01-02 18:00:45.73291+00'); -INSERT INTO ethereum.block VALUES (118, '2023-01-02 17:34:12', '0xd85b31a9c1a678c947ec70eac655ea76164d118afea22304d8613f3425ce4281', 0, '2023-01-02 18:00:45.844959+00'); -INSERT INTO ethereum.block VALUES (119, '2023-01-02 17:34:13', '0xce3e00f3cfa56211e0fea3e5f91be8299dd53cb6796ec90f310d7a821294c77f', 0, '2023-01-02 18:00:45.895719+00'); -INSERT INTO ethereum.block VALUES (120, '2023-01-02 17:34:22', '0x3f2fdd60ea1af153abd73a626fdcae8af2a5e63f5802f5f95165f9429887ee73', 0, '2023-01-02 18:00:45.95742+00'); -INSERT INTO ethereum.block VALUES (121, '2023-01-02 17:34:26', '0x320b3e9c78a97ba43648aa452a4b5c8efe5531c81685b6a486afb8b0e86cb2c2', 0, '2023-01-02 18:00:46.058555+00'); -INSERT INTO ethereum.block VALUES (122, '2023-01-02 17:34:31', '0x97d3ac648fe06f9710cd0305c57a90718adf91eb47539ca6b552a58eced91c3f', 0, '2023-01-02 18:00:46.191777+00'); -INSERT INTO ethereum.block VALUES (123, '2023-01-02 17:34:35', '0xa80d0712a316e3f80f9ee995179d77ad4c542be37f91dd2d993a417d6052ac79', 0, '2023-01-02 18:00:46.286392+00'); -INSERT INTO ethereum.block VALUES (124, '2023-01-02 17:35:26', '0x2543da93c3480cd5ab183ac1eaee68dcf843d02d840eefff619589eaafd9e04c', 0, '2023-01-02 18:00:46.358585+00'); -INSERT INTO ethereum.block VALUES (125, '2023-01-02 17:35:31', '0x0edbb9e66552c758add3cc8f77ec9e0a55a1de87970454779a23e520c2768f0f', 0, '2023-01-02 18:00:46.464204+00'); -INSERT INTO ethereum.block VALUES (126, '2023-01-02 17:35:38', '0x3721941ab26b9ee9a144545042245027f1018ab52898acd800dd2f4fd87661da', 0, '2023-01-02 18:00:46.647768+00'); -INSERT INTO ethereum.block VALUES (127, '2023-01-02 17:35:41', '0xc99943f39ba005ef164b56cfdde91c80b3ab6b289fd8a2639cb653de4b5bd5fb', 0, '2023-01-02 18:00:46.700972+00'); -INSERT INTO ethereum.block VALUES (128, '2023-01-02 17:35:48', '0xe4e7509673b4141b001b779d19e77c91fd7709a1313931b0fb57d7c70eea1784', 0, '2023-01-02 18:00:46.789776+00'); -INSERT INTO ethereum.block VALUES (129, '2023-01-02 17:35:52', '0x207034cf6a0f8451ed6ac71e27e91f5c4a743d843ae0bcc4d3dba239f7082fd8', 0, '2023-01-02 18:00:46.900778+00'); -INSERT INTO ethereum.block VALUES (130, '2023-01-02 17:35:55', '0x346bc0266c76fc90064e4016223fe1f5f6fcca55cea09850eb9c2da097790916', 0, '2023-01-02 18:00:46.963181+00'); -INSERT INTO ethereum.block VALUES (131, '2023-01-02 17:35:57', '0x557f90dda5d8410fd729f3a6e038f30f22e85e40dbd1a40a93544522f8d7011c', 0, '2023-01-02 18:00:47.002452+00'); -INSERT INTO ethereum.block VALUES (132, '2023-01-02 17:35:58', '0xcc16a52491f2226b83a1478b723ce8f15f3759bad669510a6cc7c3a75049cf66', 0, '2023-01-02 18:00:47.131728+00'); -INSERT INTO ethereum.block VALUES (133, '2023-01-02 17:35:59', '0xf6227fbd87d5ca41a01a36c67d2ac4d18f023268e03e0a25221ad4aa8a986387', 0, '2023-01-02 18:00:47.273992+00'); -INSERT INTO ethereum.block VALUES (134, '2023-01-02 17:36:00', '0x73e00ea7e17379f5d8dd8050c22639bccee658f4647b493d3167b55156454f4f', 0, '2023-01-02 18:00:47.329359+00'); -INSERT INTO ethereum.block VALUES (135, '2023-01-02 17:36:01', '0x301da75e9e93e89f1762cce5a4581dcb13c292070d7ba274e33012470fc07367', 0, '2023-01-02 18:00:47.460797+00'); -INSERT INTO ethereum.block VALUES (136, '2023-01-02 17:36:18', '0x523cd31013590d400760c7f4c3c3b88492bcfb2bf96a9cf57ce04c118ca87479', 0, '2023-01-02 18:00:47.613551+00'); -INSERT INTO ethereum.block VALUES (137, '2023-01-02 17:36:22', '0xca13e3eabfb64affc7de5b964451fdd51b21f9138ea54755cf004126ab9a4086', 0, '2023-01-02 18:00:47.693647+00'); -INSERT INTO ethereum.block VALUES (138, '2023-01-02 17:36:37', '0xaa8d503647c4fcf0303fcd1ce7edcbfbf2a4ecdca1cb06380daa2b30614908d2', 0, '2023-01-02 18:00:47.762972+00'); -INSERT INTO ethereum.block VALUES (139, '2023-01-02 17:36:45', '0x8c87377723bd26974e9fb0881072d68a6394b94e9dac04f72c0fdfc3c23970d7', 0, '2023-01-02 18:00:47.830209+00'); -INSERT INTO ethereum.block VALUES (140, '2023-01-02 17:36:47', '0x78146f7fc697b927df9dd33dd93132bfb1fed2292768d9ea3b3e1f06e03550bc', 0, '2023-01-02 18:00:47.950638+00'); -INSERT INTO ethereum.block VALUES (141, '2023-01-02 17:36:59', '0x6455250e73cfb4e6171e6c00dfd19a3549ad65e0592d567211c4f13cfebf371a', 0, '2023-01-02 18:00:48.062443+00'); -INSERT INTO ethereum.block VALUES (142, '2023-01-02 17:37:25', '0x99d3793ad7a49dda70826f8f520ee2e4544b6e418cbbfe091db187f73b676bf7', 0, '2023-01-02 18:00:48.167295+00'); -INSERT INTO ethereum.block VALUES (143, '2023-01-02 17:37:41', '0x63f6382a0f5a1906ef9846ceac0e4bc37e1ae6978b7edefc415f257efabcc1c9', 0, '2023-01-02 18:00:48.269015+00'); -INSERT INTO ethereum.block VALUES (144, '2023-01-02 17:37:42', '0x9937a271ba7ebe7dcfa7f11876fe95dda211d739d1eb341da77dad51d9494e59', 0, '2023-01-02 18:00:48.396986+00'); -INSERT INTO ethereum.block VALUES (145, '2023-01-02 17:37:46', '0x6b86494f31f1c291cf7c0e118634979154ddb3a7091451a6d66e3849e31d82c2', 0, '2023-01-02 18:00:48.517952+00'); -INSERT INTO ethereum.block VALUES (146, '2023-01-02 17:37:57', '0xaf11447716b23428136ea4fe6b4f08d45921c385341293275cb507c6d47b8c3b', 0, '2023-01-02 18:00:48.631473+00'); -INSERT INTO ethereum.block VALUES (147, '2023-01-02 17:37:59', '0xe7202e6a9a8d448f681cfd9a19f46d13a8c4ee2f2676d10a8f5cde4f27cd5104', 0, '2023-01-02 18:00:48.732829+00'); -INSERT INTO ethereum.block VALUES (148, '2023-01-02 17:38:05', '0x5cc79f8bf0e677e150c8b20df7d6e12a56da8ebf472ba8058fb50011ab84de65', 0, '2023-01-02 18:00:48.845153+00'); -INSERT INTO ethereum.block VALUES (149, '2023-01-02 17:38:08', '0xb3e3c2d0fd31a2253c2d08d6117bb4bfc5311df122e369e4a488f43c16d7ff79', 0, '2023-01-02 18:00:48.962048+00'); -INSERT INTO ethereum.block VALUES (150, '2023-01-02 17:38:10', '0xa64abb73a6f624d3e3e321b350b474f7bc36fe35e108d99f13563bb1440284ac', 0, '2023-01-02 18:00:49.022586+00'); -INSERT INTO ethereum.block VALUES (151, '2023-01-02 17:38:16', '0x09b96d9e0e908fa7b6618b3d75fa41e8c5ba4469b9e532c30104fab5d42789c1', 0, '2023-01-02 18:00:49.088822+00'); -INSERT INTO ethereum.block VALUES (152, '2023-01-02 17:38:17', '0x247ab7ad0b9cbb8c0634d1053ed56879c53a7b37a0d6dc96c62c8e5822697938', 0, '2023-01-02 18:00:49.247876+00'); -INSERT INTO ethereum.block VALUES (153, '2023-01-02 17:38:21', '0x0d3876ea92bed36f757f0acc3edef3d0d5732893264c74a55cc1003b4354cfe6', 0, '2023-01-02 18:00:49.313938+00'); -INSERT INTO ethereum.block VALUES (154, '2023-01-02 17:38:40', '0x8261f363f14ba1e8ab8a6a605ddceb5a7a1c0bdb9de9c78dfe2a8a2dfaed0766', 0, '2023-01-02 18:00:49.374683+00'); -INSERT INTO ethereum.block VALUES (155, '2023-01-02 17:38:44', '0x5f18cb550175dd23aff0b02745bee09dbd95ef5b764087a4347d24bdc26f1741', 0, '2023-01-02 18:00:49.49081+00'); -INSERT INTO ethereum.block VALUES (156, '2023-01-02 17:39:01', '0xdcb2bc5234152d18cc1fcd938162722b1e86343acc3f7d6ebe0ecf9051f92969', 0, '2023-01-02 18:00:49.61293+00'); -INSERT INTO ethereum.block VALUES (157, '2023-01-02 17:39:05', '0xd6e1a40420036b65249c917411f3a954474b40684985aad03a4204aa1104e662', 0, '2023-01-02 18:00:49.664511+00'); -INSERT INTO ethereum.block VALUES (158, '2023-01-02 17:39:13', '0x979bbeb0c897409e0522bc398393636985127938637bd6ff2a1f2ef9445902e8', 0, '2023-01-02 18:00:49.737272+00'); -INSERT INTO ethereum.block VALUES (159, '2023-01-02 17:39:14', '0x571cd4638cfff288809abb8113f264eca02648b99a5a10b6201ee4c004c239ce', 0, '2023-01-02 18:00:49.817967+00'); -INSERT INTO ethereum.block VALUES (160, '2023-01-02 17:39:21', '0xf4ba2a5660414e0a959b932865c03a7a742e3a5aaf814a34248c7cdd162f51cc', 0, '2023-01-02 18:00:49.932124+00'); -INSERT INTO ethereum.block VALUES (161, '2023-01-02 17:39:24', '0x9ae6ac85ef6f018f3da4d7d574eb141ab1d2689a0e0d49774bc5e5e3fd61bd02', 0, '2023-01-02 18:00:50.014261+00'); -INSERT INTO ethereum.block VALUES (162, '2023-01-02 17:39:25', '0x9a4107d2bd827a08769f79a998624795788011f12f261c130a6ae9d3b9027d8b', 0, '2023-01-02 18:00:50.089461+00'); -INSERT INTO ethereum.block VALUES (163, '2023-01-02 17:39:26', '0x5f99047616887839e0af82586636b0c71b70942be56373b16c86517dc447d78b', 0, '2023-01-02 18:00:50.182078+00'); -INSERT INTO ethereum.block VALUES (164, '2023-01-02 17:39:38', '0x09349266bb6458c349f3ddce179b1100151722877c3e852776b6592ae29a9932', 0, '2023-01-02 18:00:50.257366+00'); -INSERT INTO ethereum.block VALUES (165, '2023-01-02 17:39:41', '0x917d68b13f4fecb3ad4b8c70ddcb0978e71802a8a59eafe62573fd1b55fa82a8', 0, '2023-01-02 18:00:50.321522+00'); -INSERT INTO ethereum.block VALUES (166, '2023-01-02 17:39:46', '0x946594d686c70449fbc2de225fbd1fc225ebac3cdf943e8be722a6b910c70614', 0, '2023-01-02 18:00:50.405646+00'); -INSERT INTO ethereum.block VALUES (167, '2023-01-02 17:39:54', '0x136d14e79a9318bbcf9afcaee99e3c746b3174cd69405eafd7d8a70789353700', 0, '2023-01-02 18:00:50.682025+00'); -INSERT INTO ethereum.block VALUES (168, '2023-01-02 17:39:58', '0x6dab18e63e26777ad27581efd14c2ce429d0a58df1ea330ecdc0b94e067b5139', 0, '2023-01-02 18:00:50.821047+00'); -INSERT INTO ethereum.block VALUES (169, '2023-01-02 17:39:59', '0xc5e8b18f305fb416178f24033da0d30e27ed90996bc31df8f33968a63f5833fe', 0, '2023-01-02 18:00:51.419215+00'); -INSERT INTO ethereum.block VALUES (170, '2023-01-02 17:40:00', '0xa0c62ee3796c17b5404e9ea637b7807c313e3ec21e9f272e850fc67a3a978f6c', 0, '2023-01-02 18:00:52.105055+00'); -INSERT INTO ethereum.block VALUES (171, '2023-01-02 17:40:12', '0x7d5545a75ca8e15b0e217bfc27a2b5d1badf15b6467b9535f08a3a0f8cb75d1d', 0, '2023-01-02 18:00:52.256567+00'); -INSERT INTO ethereum.block VALUES (172, '2023-01-02 17:40:13', '0xfe67d5303be7eeee25b00759661b408efb80d5d72a53ef4d0dc5cc1faac8073e', 0, '2023-01-02 18:00:52.369029+00'); -INSERT INTO ethereum.block VALUES (173, '2023-01-02 17:40:16', '0xb1f7aaee22848d71e4f3052f7b9de651dc87c16a00a6817c97033b8526da26f9', 0, '2023-01-02 18:00:52.431499+00'); -INSERT INTO ethereum.block VALUES (174, '2023-01-02 17:40:32', '0xbf849b6c6d6289aa92dc5f18ef62fdd61ae759dc8782815e17bdbdf5e37e7ad9', 0, '2023-01-02 18:00:52.505813+00'); -INSERT INTO ethereum.block VALUES (175, '2023-01-02 17:40:40', '0xd61f62709c6512dbc470b3e2aacbb5b128a9da2367e7ace6d6ee3608c5fa3bc5', 0, '2023-01-02 18:00:52.586362+00'); -INSERT INTO ethereum.block VALUES (176, '2023-01-02 17:40:46', '0x8ee88242c3cc3191c26a67f91c6f9385aef0661b367f9f9e3a2c677577af7fcd', 0, '2023-01-02 18:00:52.681913+00'); -INSERT INTO ethereum.block VALUES (177, '2023-01-02 17:40:53', '0xa0b4aecfdc424f5e0f4b2acc3de38150fb60a244a3a2f75cecf977da2370b091', 0, '2023-01-02 18:00:52.757606+00'); -INSERT INTO ethereum.block VALUES (178, '2023-01-02 17:40:54', '0x26275b9827c4596b29c199ce2aef5f82d4de84eeaa8e523784afd71c23b44dc4', 0, '2023-01-02 18:00:52.899674+00'); -INSERT INTO ethereum.block VALUES (179, '2023-01-02 17:41:01', '0x91ab17fa2fa8eaf240f92de3b9ee70699408cd4290b3b10db344fb5f7fa2cf17', 0, '2023-01-02 18:00:53.070427+00'); -INSERT INTO ethereum.block VALUES (180, '2023-01-02 17:41:06', '0x103a3312c43cf6f197a72e8b4b32e6dc8fb2d3957b5a9c3500192532f7d44369', 0, '2023-01-02 18:00:53.213413+00'); -INSERT INTO ethereum.block VALUES (181, '2023-01-02 17:41:07', '0x86ea753bdf000d13ff7fd5fe0942cf3841d37b1eb189225e3478a33a79ecf4b3', 0, '2023-01-02 18:00:53.327786+00'); -INSERT INTO ethereum.block VALUES (182, '2023-01-02 17:41:11', '0xa744767e71d2f1ddf0d56361a40d41a41866cf4113210137f39f4b087a091aaa', 0, '2023-01-02 18:00:53.411341+00'); -INSERT INTO ethereum.block VALUES (183, '2023-01-02 17:41:43', '0xfb1afef518ac7fdc0bd27ab2b7edd5a9666f836df72a5066a69555015a415ea8', 0, '2023-01-02 18:00:53.519416+00'); -INSERT INTO ethereum.block VALUES (184, '2023-01-02 17:42:03', '0x3ea8c8498d9837ef0bcdba29d7bccefd6c77621a1694634a2d2c78476a9737ee', 0, '2023-01-02 18:00:53.566284+00'); -INSERT INTO ethereum.block VALUES (185, '2023-01-02 17:42:09', '0x160ddfa9b46391cd9ec5ba00f11ada81ba050641a04b7961f6a16e088c924bee', 0, '2023-01-02 18:00:53.630733+00'); -INSERT INTO ethereum.block VALUES (186, '2023-01-02 17:42:24', '0x36da5045cd285e434e98ef9e73c1f6d6faf54e42346449800a0f390025809949', 0, '2023-01-02 18:00:53.722077+00'); -INSERT INTO ethereum.block VALUES (187, '2023-01-02 17:42:32', '0x8710ba91571d4513e44c2dd0d2de7ce4bc02c102675c85c1866488d6bbcd3ef3', 0, '2023-01-02 18:00:53.82462+00'); -INSERT INTO ethereum.block VALUES (188, '2023-01-02 17:42:36', '0x15d1fbd1b63a62731a79ca54d7826baa56dc8f394327bb08c2ff8b25bd97864a', 0, '2023-01-02 18:00:53.896128+00'); -INSERT INTO ethereum.block VALUES (189, '2023-01-02 17:42:41', '0x1fa6084365e6d0998604b63dedba901dc6364887bb85f47206676539726855e6', 0, '2023-01-02 18:00:54.082408+00'); -INSERT INTO ethereum.block VALUES (190, '2023-01-02 17:42:45', '0x56c68bf1716aaadba2226658aa92a893cd5219d28e6d62e5f54d02b6139b6a37', 0, '2023-01-02 18:00:54.171028+00'); -INSERT INTO ethereum.block VALUES (191, '2023-01-02 17:42:52', '0xfc71d24d389bfc2db1d7548f5b43aee50a06112746b576dd4eccfe9d866937a3', 0, '2023-01-02 18:00:54.269942+00'); -INSERT INTO ethereum.block VALUES (192, '2023-01-02 17:43:10', '0x53bedb49b62303fb0e86617ea97ca61883d8d879bd4b8f8cf0a0126a5042fccd', 0, '2023-01-02 18:00:54.322634+00'); -INSERT INTO ethereum.block VALUES (193, '2023-01-02 17:43:18', '0x6d7e132a54716db1c92f62f8419478dbfb3d9f81a898e5f629e0f7896e096a15', 0, '2023-01-02 18:00:54.373507+00'); -INSERT INTO ethereum.block VALUES (194, '2023-01-02 17:43:27', '0x4f45806a38cb19a162b1d79c7787cb89374c4229911fd08fcd72a92b6439399c', 0, '2023-01-02 18:00:54.444534+00'); -INSERT INTO ethereum.block VALUES (195, '2023-01-02 17:43:30', '0xf05b61302e83acd1e14174e32dc09e9ac8102c6d5d7c51f3087e10b7b645b065', 0, '2023-01-02 18:00:54.575119+00'); -INSERT INTO ethereum.block VALUES (196, '2023-01-02 17:43:38', '0x6735ca7d7b3eb5114817855b94de3dc28451efb1e8b5dd9e00830c22622764e3', 0, '2023-01-02 18:00:54.624656+00'); -INSERT INTO ethereum.block VALUES (197, '2023-01-02 17:43:41', '0xa8a09335516cdfd4a67dc0ecd89c86395e1643bebf95daf097433350f2559481', 0, '2023-01-02 18:00:54.706888+00'); -INSERT INTO ethereum.block VALUES (198, '2023-01-02 17:43:45', '0x70110b49870778ffca04447040212da6bc1fb8d0c2ff4e2881eaecf8eaf29c8e', 0, '2023-01-02 18:00:54.782219+00'); -INSERT INTO ethereum.block VALUES (199, '2023-01-02 17:43:48', '0xc3243b1926cf1fe790df8402fabc0a840ca26e6930f2738250fca0882291edef', 0, '2023-01-02 18:00:54.863082+00'); -INSERT INTO ethereum.block VALUES (200, '2023-01-02 17:43:54', '0xdd04c9c737e1eb8e9269ba4984799f2a59987245b40023aa08a80dcb042e118c', 0, '2023-01-02 18:00:54.917127+00'); -INSERT INTO ethereum.block VALUES (201, '2023-01-02 17:44:02', '0xac1b294e0b70d8a8b5fa3b68d1549f2b4727bec956f2eca65c8b80ae9690d8fb', 0, '2023-01-02 18:00:54.993801+00'); -INSERT INTO ethereum.block VALUES (202, '2023-01-02 17:44:13', '0x39a74c1f049b19c5a324a7a47877fd6dc6139528f16daaa5fa5cb616af507f5a', 0, '2023-01-02 18:00:55.070711+00'); -INSERT INTO ethereum.block VALUES (203, '2023-01-02 17:44:16', '0x6e42e4a5102516927f21987172fa0c772653b22a1254cdde6cbb05e7a29cef21', 0, '2023-01-02 18:00:55.165143+00'); -INSERT INTO ethereum.block VALUES (204, '2023-01-02 17:44:27', '0xe1ec2ab68032891767c19ba74097ab5515934c154a4ac4a6eb3b601682a0e78f', 0, '2023-01-02 18:00:55.259388+00'); -INSERT INTO ethereum.block VALUES (205, '2023-01-02 17:44:57', '0x3e8e3b714455bd9faadad192e72b6c276e2540fa9c6a7c5b887503417f24895c', 0, '2023-01-02 18:00:55.327668+00'); -INSERT INTO ethereum.block VALUES (206, '2023-01-02 17:45:00', '0xf7c611f1d23654f2d0a2068ef721162056eebdd98d3adbb29232808e8efc54aa', 0, '2023-01-02 18:00:55.535664+00'); -INSERT INTO ethereum.block VALUES (207, '2023-01-02 17:45:07', '0xa460a5360a91b7c2c254ffd6a38ca74527363d912fb63f03a2589b764e504bbf', 0, '2023-01-02 18:00:55.610873+00'); -INSERT INTO ethereum.block VALUES (208, '2023-01-02 17:45:09', '0x9fb7c52d5f4fa2f627387bdfd593a964ff4c9bdecd636cd83647eadc56af408b', 0, '2023-01-02 18:00:55.725924+00'); -INSERT INTO ethereum.block VALUES (209, '2023-01-02 17:45:10', '0xa5b476c2878e46760f961db23263ce221c07391dfc897a113e4c0eb0bb06a0a8', 0, '2023-01-02 18:00:55.921357+00'); -INSERT INTO ethereum.block VALUES (210, '2023-01-02 17:45:13', '0x48667a094174840ae626744f037bb7831dab2ce36a7dfea77981733bedce4495', 0, '2023-01-02 18:00:56.081177+00'); -INSERT INTO ethereum.block VALUES (211, '2023-01-02 17:45:19', '0xe09db033d2618e6af69a97813d0722010c8b506c9d1425dfd2ae3a3aa8384eaf', 0, '2023-01-02 18:00:56.213993+00'); -INSERT INTO ethereum.block VALUES (212, '2023-01-02 17:45:25', '0x4fbf8d976b8a7b640e81b3d8a326bab0e3b4a7de3f3ae215dd9393da8025c5f8', 0, '2023-01-02 18:00:56.333755+00'); -INSERT INTO ethereum.block VALUES (213, '2023-01-02 17:45:32', '0x41be34bdab39c36555c920c6e4f5a7fa680e1fee6b245f91d2c810ecfc3f08cc', 0, '2023-01-02 18:00:56.432353+00'); -INSERT INTO ethereum.block VALUES (214, '2023-01-02 17:45:33', '0x4245f2bc7acca87a9af03d84ff024efbbdc4e81e33a685db9c9afb85c44e1470', 0, '2023-01-02 18:00:56.742415+00'); -INSERT INTO ethereum.block VALUES (215, '2023-01-02 17:45:35', '0xd67ffef1343652956ed5b6ee7f94668bbcb1fce697ff7007b3189ed00171b02a', 0, '2023-01-02 18:00:56.802677+00'); -INSERT INTO ethereum.block VALUES (216, '2023-01-02 17:45:38', '0x0a4957e874454a81e38e57b85d68a57729fe6a87a7ff30c74234709691d2a793', 0, '2023-01-02 18:00:56.907922+00'); -INSERT INTO ethereum.block VALUES (217, '2023-01-02 17:45:50', '0xb8681c68c5bbf4d9ae2c76f5b57ca376cd1eb92e60a2056277f60c87ad90160a', 0, '2023-01-02 18:00:56.97938+00'); -INSERT INTO ethereum.block VALUES (218, '2023-01-02 17:45:52', '0xefd1fa7f401c604143acdb7993a2664ec6194f48c191b8dd03f3b6f2059ab170', 0, '2023-01-02 18:00:57.053366+00'); -INSERT INTO ethereum.block VALUES (219, '2023-01-02 17:46:03', '0x7fe49313b74f19b919fb0ce9c7bb8bcdac29bf6d4b28f01b44234f2c9f72952f', 0, '2023-01-02 18:00:57.127085+00'); -INSERT INTO ethereum.block VALUES (220, '2023-01-02 17:46:09', '0x02c8886de5721d4cc11bc63a9cb3fa4078cafa01add86c03c37d82c355358d00', 0, '2023-01-02 18:00:57.296852+00'); -INSERT INTO ethereum.block VALUES (221, '2023-01-02 17:46:17', '0x5e21d0dadaea58346a1c558123c3790a767ef5ee20e1025e424f6dd3c483a62e', 0, '2023-01-02 18:00:57.41663+00'); -INSERT INTO ethereum.block VALUES (222, '2023-01-02 17:46:18', '0x8d834e2cca05a13e97883332234614b8710bcc33d947ba820e3d869ae19f8e88', 0, '2023-01-02 18:00:57.508865+00'); -INSERT INTO ethereum.block VALUES (223, '2023-01-02 17:46:19', '0xe7da84fa0aa35db693bfe69a38ed5b602eec831654d477fb84e9f593c755cb01', 0, '2023-01-02 18:00:57.62491+00'); -INSERT INTO ethereum.block VALUES (224, '2023-01-02 17:46:20', '0xab683d0fca0f6ffc9cd50e0517c68f4fcd6ccf36f4f7319a2704f2f90a91b023', 0, '2023-01-02 18:00:57.700369+00'); -INSERT INTO ethereum.block VALUES (225, '2023-01-02 17:46:23', '0xe0d77eae5df5cf3ca9f80110907119403820c18a26b44a2a0b94d8ddcc6e8826', 0, '2023-01-02 18:00:57.881158+00'); -INSERT INTO ethereum.block VALUES (226, '2023-01-02 17:46:30', '0x27d0f0707c2f8c895cc8cc98ffbf145a2a5eb40508dab1a253bc24785e7bd26b', 0, '2023-01-02 18:00:57.99735+00'); -INSERT INTO ethereum.block VALUES (227, '2023-01-02 17:46:39', '0x0c95930ea900d5f663e62f04db4726e22941c6a6f047db52639719a0ed98f0d9', 0, '2023-01-02 18:00:58.162066+00'); -INSERT INTO ethereum.block VALUES (228, '2023-01-02 17:46:42', '0x0ec264c5a5387950ca3ae206c43705504223314c249ba8d2ba9e3de90b8bd5fc', 0, '2023-01-02 18:00:58.270097+00'); -INSERT INTO ethereum.block VALUES (229, '2023-01-02 17:46:45', '0x146aabb85822e3b1d52c082f6f6bd0bae212ca1979f936d8b7d9d6d18dbcc4ac', 0, '2023-01-02 18:00:58.397648+00'); -INSERT INTO ethereum.block VALUES (230, '2023-01-02 17:46:48', '0xf5e42788862f15245513135fcf464e16195eb7f36119be8605d0edbe095e5a3b', 0, '2023-01-02 18:00:58.521468+00'); -INSERT INTO ethereum.block VALUES (231, '2023-01-02 17:47:00', '0xcafe368bbb72f2177f4022282c6d429cd61f1ee7f8e3d3bf751f347475a57a68', 0, '2023-01-02 18:00:58.702718+00'); -INSERT INTO ethereum.block VALUES (232, '2023-01-02 17:47:03', '0x810c9efb5d74b4a633567d35001f12c5892bef68b453042fd986547e46f59fad', 0, '2023-01-02 18:00:58.795768+00'); -INSERT INTO ethereum.block VALUES (233, '2023-01-02 17:47:04', '0x42b65f0d95e3a9afc1af654373d5654137e0f3f7d66353a62eb5f7598a0dc9a4', 0, '2023-01-02 18:00:58.945452+00'); -INSERT INTO ethereum.block VALUES (234, '2023-01-02 17:47:05', '0x98b34a6b9a0dae38d6e18085b6cd3e125ac3c0d4cb902cec60a34c788b10ad44', 0, '2023-01-02 18:00:59.084444+00'); -INSERT INTO ethereum.block VALUES (235, '2023-01-02 17:47:17', '0xce2fd9d1a667b82f1a3da7846f29a9d45a3ed130ba05df92c2c13760bcdec70f', 0, '2023-01-02 18:00:59.206806+00'); -INSERT INTO ethereum.block VALUES (236, '2023-01-02 17:47:20', '0x59879c9905868e5650d7c148007bf0c980fc573a8a52b1e94fe2e6c162325101', 0, '2023-01-02 18:00:59.312223+00'); -INSERT INTO ethereum.block VALUES (237, '2023-01-02 17:47:39', '0xb2469ee785a7bfd86ec60add892e6cf4b63c3dc443d4a8202e618b472e213bf4', 0, '2023-01-02 18:00:59.454303+00'); -INSERT INTO ethereum.block VALUES (238, '2023-01-02 17:47:54', '0x75f6c83ecb2beeae7d77706a67409c1971803e7855ed5b9ae440ddde8fce4e8b', 0, '2023-01-02 18:00:59.557319+00'); -INSERT INTO ethereum.block VALUES (239, '2023-01-02 17:48:17', '0xa00ed96208ed1613c348048cb38737c3c7ddb8632962d4b7f23c73dd1e809445', 0, '2023-01-02 18:00:59.67498+00'); -INSERT INTO ethereum.block VALUES (240, '2023-01-02 17:48:20', '0xa587930e897a6f3f29691001c8517cb051bafedc463e6557b765276a3fc4136b', 0, '2023-01-02 18:00:59.795529+00'); -INSERT INTO ethereum.block VALUES (241, '2023-01-02 17:48:21', '0x021b20d30a20e3a3c9765603beb5029ee75530f94d8fa2812e9a93fb09cf316c', 0, '2023-01-02 18:00:59.916603+00'); -INSERT INTO ethereum.block VALUES (242, '2023-01-02 17:48:27', '0x2763cb7109e570e6e85d586f950bfda54e020e93dfdd08a9b17ee1b174fdcc3e', 0, '2023-01-02 18:01:00.018328+00'); -INSERT INTO ethereum.block VALUES (243, '2023-01-02 17:48:28', '0xb7b96c3dc24dafee05fd9329aad70c4cb9928049aac088082ff6f7a8b60fde03', 0, '2023-01-02 18:01:00.185159+00'); -INSERT INTO ethereum.block VALUES (244, '2023-01-02 17:48:29', '0xc88d44051ad618438ae323695d335a38d7107637c1d0bc1379f5a788a33c3a7d', 0, '2023-01-02 18:01:00.559526+00'); -INSERT INTO ethereum.block VALUES (245, '2023-01-02 17:48:31', '0x64b79645c92178bab4166eae8ee16c515d6f7ec12f1fc86f4c122679c8ecaedf', 0, '2023-01-02 18:01:00.891698+00'); -INSERT INTO ethereum.block VALUES (246, '2023-01-02 17:48:38', '0x76117b4dc8e78653459bf7a99c29d08b29aed07c2399253e69178b87c3ea2ea0', 0, '2023-01-02 18:01:01.109715+00'); -INSERT INTO ethereum.block VALUES (247, '2023-01-02 17:48:51', '0x1fbe01d5ef4036843255db9f3304b5a1f0e9af7a1c826d7331d1edcbd250f661', 0, '2023-01-02 18:01:01.759968+00'); -INSERT INTO ethereum.block VALUES (248, '2023-01-02 17:48:55', '0xc46f0034fee06a86be0bdfbf3b48ca82f58d0d85114a97bf7053705d35713689', 0, '2023-01-02 18:01:01.842093+00'); -INSERT INTO ethereum.block VALUES (249, '2023-01-02 17:49:00', '0x2ae0b4833879de0a211fca90ce0b6f7a70516f2bdf175a4a670fb2032fff156e', 0, '2023-01-02 18:01:01.904667+00'); -INSERT INTO ethereum.block VALUES (250, '2023-01-02 17:49:01', '0x9b62b56b13c515ac7a3cc0364e04218b2090042161ae1d6d43ddf6176153be32', 0, '2023-01-02 18:01:01.975829+00'); -INSERT INTO ethereum.block VALUES (251, '2023-01-02 17:49:09', '0x1046c760176e787a91869ddfe6009c4e059ecdd08ce92f521c8c601b80196fe7', 0, '2023-01-02 18:01:02.072438+00'); -INSERT INTO ethereum.block VALUES (252, '2023-01-02 17:49:20', '0x32cc250327dff657b58c215bd9682b69aa81790f754d3ccff9d5e21d4cb7ee7d', 0, '2023-01-02 18:01:02.13242+00'); -INSERT INTO ethereum.block VALUES (253, '2023-01-02 17:49:34', '0xd0a4d1421a3df46b6bb4e05e41664b23db392101f973dc5258e2480f6f3e8422', 0, '2023-01-02 18:01:02.193739+00'); -INSERT INTO ethereum.block VALUES (254, '2023-01-02 17:49:44', '0xe697ad5c3bfbf3fa643d56a2c227b44ed3e6027f72346374fbe9ab08e45034a8', 0, '2023-01-02 18:01:02.278727+00'); -INSERT INTO ethereum.block VALUES (255, '2023-01-02 17:49:49', '0xf821082b25461fe39e110ebeb0ad53034fc4d99d1671a08ef64641e53ddb2a18', 0, '2023-01-02 18:01:02.371522+00'); -INSERT INTO ethereum.block VALUES (256, '2023-01-02 17:49:54', '0x79dc895102bb446f174dd3d107846aa68bc06cfe45b6abadea15ec17a5f98084', 0, '2023-01-02 18:01:02.431253+00'); -INSERT INTO ethereum.block VALUES (257, '2023-01-02 17:49:55', '0x2ef8532c4e21a35ecd0e1a58881642c1af06736ea8d64c68960dae4369f82aa3', 0, '2023-01-02 18:01:02.486229+00'); -INSERT INTO ethereum.block VALUES (258, '2023-01-02 17:49:58', '0xa4edab637dd34785f4b22bf129b789d155bbfea7ba5131cbf5e9bfde5c1f94d6', 0, '2023-01-02 18:01:02.567463+00'); -INSERT INTO ethereum.block VALUES (259, '2023-01-02 17:50:12', '0x76bb5d855c8f17f5e7d175ff375eea1241335512ff2337c044005d1cee769fe5', 0, '2023-01-02 18:01:02.663536+00'); -INSERT INTO ethereum.block VALUES (260, '2023-01-02 17:50:35', '0xf2c0469a100149f248b90d18b115ed6446d2897d115b4fe64a6e0af89a6446c8', 0, '2023-01-02 18:01:02.713304+00'); -INSERT INTO ethereum.block VALUES (261, '2023-01-02 17:50:43', '0xd7d9843bfa576a24c726e3c8a9ceed5d0b1f20d43f2942ce158c18fda90aa78f', 0, '2023-01-02 18:01:02.774331+00'); -INSERT INTO ethereum.block VALUES (262, '2023-01-02 17:50:44', '0x22b26b835b692e51aa297a914c9ab5f3cd6d1744f10eca951f913f4286731513', 0, '2023-01-02 18:01:03.020037+00'); -INSERT INTO ethereum.block VALUES (263, '2023-01-02 17:50:46', '0xf84e901cfca0c412bc22bdff97f07cf50287e93e3ed2b74c1fcc0ed6fca954b0', 0, '2023-01-02 18:01:03.070467+00'); -INSERT INTO ethereum.block VALUES (264, '2023-01-02 17:50:48', '0xd4b7784e9edff78f368ccce3c5980152f4e0b6ffacfb6eba374b7570f765f021', 0, '2023-01-02 18:01:03.121904+00'); -INSERT INTO ethereum.block VALUES (265, '2023-01-02 17:50:54', '0xb6b61335428e979347a18dd62734869023e6398f1668d424347e320ed8cf349c', 0, '2023-01-02 18:01:03.162269+00'); -INSERT INTO ethereum.block VALUES (266, '2023-01-02 17:50:56', '0xc2601e2570e376e0a4c1837a23d082ea5942bce3db7c21abb7b6b6edabf8289b', 0, '2023-01-02 18:01:03.24577+00'); -INSERT INTO ethereum.block VALUES (267, '2023-01-02 17:51:22', '0xf5a7f7b0be3c3e79dabf3c5aee96d0b6757365eec71f903e41e0fe0a5663faf3', 0, '2023-01-02 18:01:03.359646+00'); -INSERT INTO ethereum.block VALUES (268, '2023-01-02 17:51:23', '0x75f73e805c8d818521167b86d5963a2598df474c554d146d5534d868efc2cd8b', 0, '2023-01-02 18:01:03.433701+00'); -INSERT INTO ethereum.block VALUES (269, '2023-01-02 17:51:27', '0xbda98c5f6a0b7d3b65ce765eaed1a62d1f0d2cd03f3ab87414faf60e460129bb', 0, '2023-01-02 18:01:03.529049+00'); -INSERT INTO ethereum.block VALUES (270, '2023-01-02 17:51:30', '0x579a151c74f8ad5e1e711cc92a87feaf5f0a4e92fc2bca5d26727b9659f37a85', 0, '2023-01-02 18:01:03.641061+00'); -INSERT INTO ethereum.block VALUES (271, '2023-01-02 17:51:34', '0x70be2d6803e105dd65230168636e6cbd17d645ac005133f6be0821a4d9b99f47', 0, '2023-01-02 18:01:03.734954+00'); -INSERT INTO ethereum.block VALUES (272, '2023-01-02 17:51:39', '0x451f8735d379ea63a69fb4455554cbd4450c6d386a5b3a0937423c69470b0fbf', 0, '2023-01-02 18:01:03.831926+00'); -INSERT INTO ethereum.block VALUES (273, '2023-01-02 17:51:42', '0x54581c497aea4aa59475eba18cdc05f501a0bef4b01d56da793ccb905a79c1d9', 0, '2023-01-02 18:01:03.933568+00'); -INSERT INTO ethereum.block VALUES (274, '2023-01-02 17:52:18', '0x8edc06989afc0b9d84e4cbab98a13ef2afc368a4cb8a412c20f831ddc237f60f', 0, '2023-01-02 18:01:04.021928+00'); -INSERT INTO ethereum.block VALUES (275, '2023-01-02 17:52:30', '0x249e479e0c9fc6e553cc32bae4c8bb5116616de3697048a6cefade9dc027d337', 0, '2023-01-02 18:01:04.122747+00'); -INSERT INTO ethereum.block VALUES (276, '2023-01-02 17:52:49', '0xe34bc2d98d4cbf2f5098ac2ce00c1663ec16fcb621c1ef686f531f99d0edf12f', 0, '2023-01-02 18:01:04.31909+00'); -INSERT INTO ethereum.block VALUES (277, '2023-01-02 17:52:51', '0xd31ab1f2e0632ac74728d5b9d06c8f8b132a7b0e901168ebe200feb368265048', 0, '2023-01-02 18:01:04.471569+00'); -INSERT INTO ethereum.block VALUES (278, '2023-01-02 17:53:15', '0x70c255f3f0e3ddc51bb3cf2b54e012da92b5f32932628c5aa8060845e1a13315', 0, '2023-01-02 18:01:04.646839+00'); -INSERT INTO ethereum.block VALUES (279, '2023-01-02 17:53:23', '0xd780b2151ac70052d8537825715ce1bbd8f1b12608895b4d68e86ad4b3fcd81d', 0, '2023-01-02 18:01:04.736804+00'); -INSERT INTO ethereum.block VALUES (280, '2023-01-02 17:53:24', '0xe0de3a39afb19acd52b914559affff9e43f7b9a11803a103b06a1c3ec577bae3', 0, '2023-01-02 18:01:04.892597+00'); -INSERT INTO ethereum.block VALUES (281, '2023-01-02 17:53:38', '0x8db51a168c4a9c7dc9daaea1f6df113bd5992e79673b0f59ca757ee2b22b6aec', 0, '2023-01-02 18:01:05.001541+00'); -INSERT INTO ethereum.block VALUES (282, '2023-01-02 17:53:44', '0xbabe71766e006cf0802e4fc6f041d845bb034f9ced15e0b63b6b849c0af5338d', 0, '2023-01-02 18:01:05.122385+00'); -INSERT INTO ethereum.block VALUES (283, '2023-01-02 17:53:54', '0x54129589d044340edbcbcdc408d7ba180b7a10d50cd142c5d79a06bcaf326d58', 0, '2023-01-02 18:01:05.182718+00'); -INSERT INTO ethereum.block VALUES (284, '2023-01-02 17:54:01', '0xfb6ede0ba24e0adc24f5db857df60f4a850def71131843915ba95c5ed7b77a5b', 0, '2023-01-02 18:01:05.273807+00'); -INSERT INTO ethereum.block VALUES (285, '2023-01-02 17:54:03', '0x2c73bd3bf1258a494617d59d98cb7a7bdaaaced062aea943e3f644995d4bc761', 0, '2023-01-02 18:01:05.37378+00'); -INSERT INTO ethereum.block VALUES (286, '2023-01-02 17:54:06', '0x6ec1b7d71ce11e8ccef66c6a0639b38e959abd67e61a6aa3fc83e40976d7607a', 0, '2023-01-02 18:01:05.469133+00'); -INSERT INTO ethereum.block VALUES (287, '2023-01-02 17:54:07', '0x99176ff824e5e264732eb2ddeeea5745b2a76aeab2961eea100da712ee64d3c5', 0, '2023-01-02 18:01:05.598301+00'); -INSERT INTO ethereum.block VALUES (288, '2023-01-02 17:54:22', '0xaaafa82c9e4eb17ef7ca64295ab4200017f54c59e37f76058276179c56d19a25', 0, '2023-01-02 18:01:05.700389+00'); -INSERT INTO ethereum.block VALUES (289, '2023-01-02 17:54:23', '0xf25cbee4d5194a9e2d9b8fd9dff5230836642a4a5fb31164ef40dc003e47c14f', 0, '2023-01-02 18:01:05.80074+00'); -INSERT INTO ethereum.block VALUES (290, '2023-01-02 17:54:25', '0x3dcc2cec679782343a087da37385f63b1477ca31dff2ea5618160ef0ce4e71b3', 0, '2023-01-02 18:01:05.876716+00'); -INSERT INTO ethereum.block VALUES (291, '2023-01-02 17:54:36', '0xb95d0661f783ef29bf7787f8d98a214d28d9534c63dd773509f668fe9ab3bbcb', 0, '2023-01-02 18:01:05.963411+00'); -INSERT INTO ethereum.block VALUES (292, '2023-01-02 17:54:58', '0x42beaf89da38258367ba092bd7a9f50bc13a6a44af2000cb6b1c6b689595c853', 0, '2023-01-02 18:01:06.052879+00'); -INSERT INTO ethereum.block VALUES (293, '2023-01-02 17:54:59', '0x7d6b0db7ffe78b37f09d77733acf91eedc336c971dd6b2022b93756031149fbd', 0, '2023-01-02 18:01:06.141756+00'); -INSERT INTO ethereum.block VALUES (294, '2023-01-02 17:55:00', '0x6a464042c2c044ed04fcfd6735bb28c2ac656b40945a9ed160a56e9be5c6b8fa', 1, '2023-01-02 18:01:06.534827+00'); -INSERT INTO ethereum.block VALUES (295, '2023-01-02 17:55:26', '0xa9aa7049dca4410a76fd0a0e4e815db09f82c1246d89861ba60d892bbf9475a1', 1, '2023-01-02 18:01:08.056139+00'); -INSERT INTO ethereum.block VALUES (296, '2023-01-02 17:55:32', '0xe71b8a2dd2bb33a03d93af15fbf4b67dcaba8698b5edc062011dbe10db3bc953', 0, '2023-01-02 18:01:08.21502+00'); -INSERT INTO ethereum.block VALUES (297, '2023-01-02 17:55:34', '0x7cb1b51f524f18c5a3a3f548743fb1a5ab13a1dcc09ef43fe136b499d4ef5d9e', 1, '2023-01-02 18:01:08.371825+00'); -INSERT INTO ethereum.block VALUES (298, '2023-01-02 17:55:40', '0x5eb0b6ff28f0dda9528d5dc4f6e1ae996c7181f52eb1b458b6d30b68c10d6d5e', 0, '2023-01-02 18:01:08.516974+00'); -INSERT INTO ethereum.block VALUES (299, '2023-01-02 17:55:41', '0xd6939682b9c36ed3196cf1c75abd720647e4f653fe5506d480c4af463030fcb8', 1, '2023-01-02 18:01:08.647344+00'); -INSERT INTO ethereum.block VALUES (300, '2023-01-02 17:55:49', '0xc2b6542a4ce29330e07e4d557123c22a4fa3aecd04094693da3ec7526a40c826', 0, '2023-01-02 18:01:08.758557+00'); -INSERT INTO ethereum.block VALUES (301, '2023-01-02 17:56:08', '0x644b3110c235790042ee1cd1df1ae14f49e3e5cfb91851409811ec1eea0ae521', 0, '2023-01-02 18:01:08.817262+00'); -INSERT INTO ethereum.block VALUES (302, '2023-01-02 17:56:37', '0x914b15b46444e9273e2a84e661e5664dc4a336dfd84818b01549659ec2bb2f34', 0, '2023-01-02 18:01:08.869022+00'); -INSERT INTO ethereum.block VALUES (303, '2023-01-02 17:56:44', '0xf0de1c42759b53d1d8068f0cac0d43602a15a11269629f44b5607cab89976a80', 0, '2023-01-02 18:01:08.957006+00'); -INSERT INTO ethereum.block VALUES (304, '2023-01-02 17:57:00', '0x9da4490279bddb0adc20389b83a766c5f43ad33ef6b3dfa420b812feb77ffb73', 0, '2023-01-02 18:01:09.245152+00'); -INSERT INTO ethereum.block VALUES (305, '2023-01-02 17:57:02', '0x2561f7fe66b0e8cd14fc20f0b5e659993153b7998819cc1fe51f351dbe2823c0', 0, '2023-01-02 18:01:10.04271+00'); -INSERT INTO ethereum.block VALUES (306, '2023-01-02 17:57:11', '0x0e59f816635781deda9e5219d97f6760688da4a1adb93a1849410d278098b3c1', 0, '2023-01-02 18:01:10.203846+00'); -INSERT INTO ethereum.block VALUES (307, '2023-01-02 17:57:17', '0xa84979e793a65049def1c86769ed271b193fc946b8769e19c3aa7756c3333b21', 0, '2023-01-02 18:01:10.327623+00'); -INSERT INTO ethereum.block VALUES (308, '2023-01-02 17:57:20', '0x5637490f9e873d023fb611fa6298e6f8171cdf0140d6c5d394f35efbb2fe2487', 0, '2023-01-02 18:01:10.437895+00'); -INSERT INTO ethereum.block VALUES (309, '2023-01-02 17:57:22', '0x7a21e4084a2a2655d35f600d8bf2fc948834469809c0d6180a6725542f7d3b79', 0, '2023-01-02 18:01:10.567921+00'); -INSERT INTO ethereum.block VALUES (310, '2023-01-02 17:57:28', '0x05a62428dd297ede0861d1f2daa420c52cfdb00cb499622e2a30ab5239741e72', 1, '2023-01-02 18:01:10.706538+00'); -INSERT INTO ethereum.block VALUES (311, '2023-01-02 17:57:44', '0x8c66185f0e17cb04dfac77b5d57f5deb1422877981a29a9efb2b4a775c00464f', 1, '2023-01-02 18:01:10.845166+00'); -INSERT INTO ethereum.block VALUES (312, '2023-01-02 17:57:52', '0xf9bff06221cb20e4289a9581c78853813684847c586e470dbac475fa6a3d46a1', 1, '2023-01-02 18:01:10.990766+00'); -INSERT INTO ethereum.block VALUES (313, '2023-01-02 17:57:56', '0x1e72db2c2d347b32b243cd64454e520766433590332ec01ec6df0292800e9cb6', 1, '2023-01-02 18:01:11.070583+00'); -INSERT INTO ethereum.block VALUES (314, '2023-01-02 17:58:04', '0x7e67a09a1a730c2797024892dfbefa61878681073f1f1890aeffa099d15264f0', 0, '2023-01-02 18:01:11.18525+00'); -INSERT INTO ethereum.block VALUES (315, '2023-01-02 17:58:09', '0x3293a94315859f03c1d666240a29cf1bc0324675bb38fb3800cc6c416268047e', 0, '2023-01-02 18:01:11.46889+00'); -INSERT INTO ethereum.block VALUES (316, '2023-01-02 17:58:17', '0x37390c4fef0eb06348243aaaf27bff43ab0bb68a748035d7ee588d79ae4c1039', 0, '2023-01-02 18:01:11.592739+00'); -INSERT INTO ethereum.block VALUES (317, '2023-01-02 17:58:19', '0x4cd3ad281485360d1a65e3a2f594cf4653b28cbfa1b407fc9c2831fc1b0d2bcb', 0, '2023-01-02 18:01:11.81188+00'); -INSERT INTO ethereum.block VALUES (318, '2023-01-02 17:58:31', '0x8f9b3cb79b6a6944b38f3a437da789d46074a017102be5e08d2aec144f3ab094', 0, '2023-01-02 18:01:11.980374+00'); -INSERT INTO ethereum.block VALUES (319, '2023-01-02 17:58:39', '0x0cd68d88830ce54387196bdf919bdf0b2d51889c4465eb550f703df86ba1a49a', 0, '2023-01-02 18:01:12.137372+00'); -INSERT INTO ethereum.block VALUES (320, '2023-01-02 17:58:41', '0xa6cd677f8e8fec8834255b0aafd6f560b1727a7f94eeaacba1b850ced38cf79f', 0, '2023-01-02 18:01:12.293556+00'); -INSERT INTO ethereum.block VALUES (321, '2023-01-02 17:58:43', '0x6aa97e642bf433822fc24c081003f983ad96ec8bcc4c07e75a1c08e1389957a8', 0, '2023-01-02 18:01:12.439552+00'); -INSERT INTO ethereum.block VALUES (322, '2023-01-02 17:58:47', '0x535461ea3d295866842be912ddf9ab024533bcced0933d38194f6852fd486f13', 0, '2023-01-02 18:01:12.55756+00'); -INSERT INTO ethereum.block VALUES (323, '2023-01-02 17:59:18', '0x116c2b7e5cfb16ea8e6d8dca03c4d28abdc5c4165dc9383f07c60a9dec602772', 0, '2023-01-02 18:01:12.660479+00'); -INSERT INTO ethereum.block VALUES (324, '2023-01-02 17:59:33', '0x41cb3b585638fc266d5f633676143fe29fb073576654d6f03e2709a6a3c6a2d7', 0, '2023-01-02 18:01:12.703293+00'); -INSERT INTO ethereum.block VALUES (325, '2023-01-02 17:59:34', '0x39e3d57d416540cf2bfdbe8c754c58e504f4f14245108143938759faa4bdf3d2', 0, '2023-01-02 18:01:12.751686+00'); -INSERT INTO ethereum.block VALUES (326, '2023-01-02 17:59:45', '0x66445834fb2f8c53590a1cc96ba91d8d24560a48dbbdd5af90e896eda6fd0f66', 0, '2023-01-02 18:01:12.811245+00'); -INSERT INTO ethereum.block VALUES (327, '2023-01-02 17:59:59', '0x647e3332a50207858734ceae3ae7a36ac291e10c55372ea445a8aa44c868c0de', 0, '2023-01-02 18:01:12.882518+00'); -INSERT INTO ethereum.block VALUES (328, '2023-01-02 18:00:04', '0x77a6b2dd9890f15727562965e0dee05d557fa91e3c004e9b0ece50523593430d', 0, '2023-01-02 18:01:12.969616+00'); -INSERT INTO ethereum.block VALUES (329, '2023-01-02 18:00:12', '0x543a87ab0178a263e542458c0e06dd1b766c8d2aafcae96b8dfce453e4cabb8b', 0, '2023-01-02 18:01:13.038236+00'); -INSERT INTO ethereum.block VALUES (330, '2023-01-02 18:00:18', '0xbb9f0b7f5a9a6415e5ce9d9c8fdfed7344990b9195ea0211b55b1319a39b1724', 0, '2023-01-02 18:01:13.123405+00'); -INSERT INTO ethereum.block VALUES (331, '2023-01-02 18:00:19', '0x09a66776c8293059cf1dd849fe0a963f837621a9a6f3891df25e52f5904a06fc', 1, '2023-01-02 18:10:01.553829+00'); -INSERT INTO ethereum.block VALUES (332, '2023-01-02 18:10:01', '0x89c9925c61a14d57e9b1c6f896da4a2c27440ce406e350fdf8729cf55b375db9', 0, '2023-01-02 18:10:13.21347+00'); -INSERT INTO ethereum.block VALUES (333, '2023-01-02 18:10:13', '0x00263efdfde97d248027a5b67e6b5987850a6ccb9138709ab923c2d8616019f3', 0, '2023-01-02 18:10:30.52388+00'); -INSERT INTO ethereum.block VALUES (334, '2023-01-02 18:10:30', '0x610204ddb0f2ac5ca4d9d9e44a3384b91f841c8034d46fd8d0c2bbaa4607635a', 0, '2023-01-02 18:10:37.331881+00'); -INSERT INTO ethereum.block VALUES (335, '2023-01-02 18:10:37', '0x4471600e63c221c01a7dfee9b9da18fbad75dab9ab977380dff100d7f690820a', 1, '2023-01-02 18:11:22.981431+00'); -INSERT INTO ethereum.block VALUES (336, '2023-01-02 18:11:22', '0xf56cfe018ab8c1c1c7d7fea3fbab7000e48e21ad57b87b47e7397ec286a54999', 0, '2023-01-02 18:11:44.217552+00'); -INSERT INTO ethereum.block VALUES (337, '2023-01-02 18:11:40', '0x958d6d8d8300ad50f7e1d3694c5a57d5beca700f46ada4a4064bb7b541ef7d11', 1, '2023-01-02 18:12:05.343275+00'); -INSERT INTO ethereum.block VALUES (338, '2023-01-02 18:11:53', '0x961879be289a8878f579abc8968e6c9b4632066a86c9d16a0062a723f76befaf', 1, '2023-01-02 18:12:12.186872+00'); -INSERT INTO ethereum.block VALUES (339, '2023-01-02 18:12:12', '0x72d3e8810886d998ce87f9908125b91e26b65c750b83ef646e4ad4f7814f4bd1', 0, '2023-01-02 18:12:14.343067+00'); -INSERT INTO ethereum.block VALUES (340, '2023-01-02 18:12:14', '0xa7e19b096ad1eca3da69345b304d58586ba9d76ce7f7342da23d43ba9e5ce159', 0, '2023-01-02 18:12:15.139055+00'); -INSERT INTO ethereum.block VALUES (341, '2023-01-02 18:12:15', '0x1f331a0ca68acd17576435a5a781699075c126172d58f1fe3f65a4c95b748e6e', 0, '2023-01-02 18:12:30.195891+00'); -INSERT INTO ethereum.block VALUES (342, '2023-01-02 18:12:19', '0x13b29547d13e993264af67589d83ede7bab55d781189f985fe731ee953a01044', 0, '2023-01-02 18:12:31.150463+00'); -INSERT INTO ethereum.block VALUES (343, '2023-01-02 18:12:31', '0xd655a778cb5566f05c98a5eef6a8f8b10ae0ab530f6d055e6b120df9ca5ac64d', 1, '2023-01-02 18:13:30.004582+00'); -INSERT INTO ethereum.block VALUES (344, '2023-01-02 18:12:37', '0xc6eb964de942309aef5c494f77f5bac25ea233f504302ca025cda96eadab30cb', 0, '2023-01-02 18:13:30.599765+00'); -INSERT INTO ethereum.block VALUES (345, '2023-01-02 18:12:38', '0xaeec9eebf4f797512b8d329f9b13e0f9f4ea19975e01d1e566879fe4188fcc0b', 0, '2023-01-02 18:13:30.684824+00'); -INSERT INTO ethereum.block VALUES (346, '2023-01-02 18:12:41', '0x0501716c9985e98fdc5da16af0fed1a97a4ff4ba6e259aeb19fc93ed6a6f6b26', 0, '2023-01-02 18:13:30.764478+00'); -INSERT INTO ethereum.block VALUES (347, '2023-01-02 18:12:42', '0xa1c261cc4dabaeb594e91ff23de1cc8f967b8ecfa91fc574321bccf1e30a0441', 0, '2023-01-02 18:13:30.843885+00'); -INSERT INTO ethereum.block VALUES (348, '2023-01-02 18:12:43', '0x3b01eb91a06bbc855ddcb3f011e5b034201856ef151cfc8692b9ee4df84b97ec', 0, '2023-01-02 18:13:30.91858+00'); -INSERT INTO ethereum.block VALUES (349, '2023-01-02 18:13:01', '0x76c955fafdcbe3ab511e2a869a14934a53e3e2e95188367ae09c97d467a6a7e1', 0, '2023-01-02 18:13:30.973788+00'); -INSERT INTO ethereum.block VALUES (350, '2023-01-02 18:13:02', '0xfbc1f540d0edaa6296bab98883cb7d972a166d9107f7504deb12cc73ae2b5197', 0, '2023-01-02 18:13:31.074337+00'); -INSERT INTO ethereum.block VALUES (351, '2023-01-02 18:13:03', '0x8038f994e17813904ff97fcd6c411981a4fb4f3d988790bc28c070bd6d2a7461', 0, '2023-01-02 18:13:31.176327+00'); -INSERT INTO ethereum.block VALUES (352, '2023-01-02 18:13:10', '0xffd0276b1aa893f030c0efd8af8a7d1ea07f2da28099223674ae80902c1fdcc6', 0, '2023-01-02 18:13:31.240133+00'); -INSERT INTO ethereum.block VALUES (353, '2023-01-02 18:13:12', '0xba295ccacf4061f9bc14c6af3c1e00184388faaf8cb86394eacdd7694fd28c9b', 0, '2023-01-02 18:13:31.333894+00'); -INSERT INTO ethereum.block VALUES (355, '2023-01-02 18:13:30', '0x9313d0306b41bc76fb53d0ce06fe1203c7c1d27560b1cd6f650d2f4998c5dcaa', 0, '2023-01-02 18:13:32.973835+00'); -INSERT INTO ethereum.block VALUES (354, '2023-01-02 18:13:28', '0x89bb66c1b374658b80413ffeec7852573911f9cfb8af8ad1614630064fbd40bc', 0, '2023-01-02 18:13:33.026699+00'); -INSERT INTO ethereum.block VALUES (356, '2023-01-02 18:13:32', '0xcd3a63ca4015a4c7b418182f8dcb126894401ccfd4a037cd23e0bc7361acfff1', 0, '2023-01-02 18:13:45.939364+00'); -INSERT INTO ethereum.block VALUES (357, '2023-01-02 18:13:45', '0x894b317a013f2875eedda6d7a4b60c6decc9102638628fd55248f1a5234f1dc8', 0, '2023-01-02 18:13:47.467106+00'); -INSERT INTO ethereum.block VALUES (358, '2023-01-02 18:13:47', '0x3799ec41b7856c1faf09062da65828e84b8f21a5b03e4eda63ef081afe84498f', 0, '2023-01-02 18:13:55.478799+00'); -INSERT INTO ethereum.block VALUES (359, '2023-01-02 18:13:55', '0xbd7c5134442580eb36455124fa3e64010189075c607f342877b9865c8c11c8f1', 0, '2023-01-02 18:14:05.916993+00'); -INSERT INTO ethereum.block VALUES (360, '2023-01-02 18:14:05', '0x2453441a6db5b495d968c03b533960bd755ed7a414246fe260e2b410ccc795dd', 0, '2023-01-02 18:14:16.456461+00'); -INSERT INTO ethereum.block VALUES (361, '2023-01-02 18:14:16', '0x338ac4cb50e41ccf70445f663cf7d19341b68b624fb9a355d1473938bbd580c4', 0, '2023-01-02 18:14:18.570209+00'); -INSERT INTO ethereum.block VALUES (362, '2023-01-02 18:14:18', '0x5c619174ee3bf781ca951572ce5c11cb2a1f35c8609b858d3e05d5bb0ce16084', 0, '2023-01-02 18:14:22.356436+00'); -INSERT INTO ethereum.block VALUES (363, '2023-01-02 18:14:22', '0x89609d30975fa8bb6dc95a00aa8007ba812221882da4441d9f77774ffd715316', 0, '2023-01-02 18:14:23.679417+00'); -INSERT INTO ethereum.block VALUES (364, '2023-01-02 18:14:23', '0xa92ab696febd1bc3c92b9d2e6ec2f0cfbc0c9997ebdacefe7cbabd2509012d01', 0, '2023-01-02 18:14:25.574915+00'); -INSERT INTO ethereum.block VALUES (365, '2023-01-02 18:14:25', '0xd4d8a36e823aa3755ad411a6e3800100422a3b7bd81b0dd237b32aa6a1d4205b', 0, '2023-01-02 18:14:28.132484+00'); -INSERT INTO ethereum.block VALUES (366, '2023-01-02 18:14:28', '0x16781f80abf836d08a7638f24e09f28c8c63a6fd080fef795a4729a06f8f6a67', 0, '2023-01-02 18:14:31.297971+00'); -INSERT INTO ethereum.block VALUES (367, '2023-01-02 18:14:31', '0xa02315794cc4a147daec3f917f043db46194b3a551ecc8d9ea36397cf9c87820', 0, '2023-01-02 18:14:32.863116+00'); -INSERT INTO ethereum.block VALUES (368, '2023-01-02 18:14:32', '0xd150da97b132f26e9ddbe2b05e264c0cf593961d62b46f853487df1202188500', 0, '2023-01-02 18:14:35.286471+00'); -INSERT INTO ethereum.block VALUES (369, '2023-01-02 18:14:35', '0x748f1a6cc4b5d226e3af55666dd40bc9e655d08313a307684087b674c3e80412', 0, '2023-01-02 18:14:50.987961+00'); -INSERT INTO ethereum.block VALUES (370, '2023-01-02 18:14:50', '0x191ba950966a3ad3c1e4c679be9d2825bff3f95c6f36cce9be6c229bdaa774a6', 0, '2023-01-02 18:14:56.517582+00'); -INSERT INTO ethereum.block VALUES (371, '2023-01-02 18:14:56', '0x05da13864ba1a1d892c88d78ee59c80d5a7964a4789e70448da016c0792a3e8e', 0, '2023-01-02 18:14:58.019596+00'); -INSERT INTO ethereum.block VALUES (372, '2023-01-02 18:14:57', '0x3c0ef308bf4230f86696d3e9066c2c5bde63a7ac75339962df01632b608e4d89', 0, '2023-01-02 18:15:25.932364+00'); -INSERT INTO ethereum.block VALUES (373, '2023-01-02 18:15:25', '0x66aee4fb84565737ec055d6d5b8a0a780e6660cdee363c1cc71130a642b8a19e', 0, '2023-01-02 18:15:48.75572+00'); -INSERT INTO ethereum.block VALUES (374, '2023-01-02 18:15:48', '0xa162d3711311a98446b6e9522699fb01c9d1a9e737c5be4d6aa63f4f41629e80', 0, '2023-01-02 18:15:53.251163+00'); -INSERT INTO ethereum.block VALUES (375, '2023-01-02 18:15:53', '0xf991d69398e99b900ee9aaf72c0de46913d195000215569754fc49fd98cf6cd1', 0, '2023-01-02 18:15:59.137341+00'); -INSERT INTO ethereum.block VALUES (376, '2023-01-02 18:15:59', '0xa0baad2219d65d56b803914e291210edf5d3fb9de6312d4a88f2a62c31e5a34e', 1, '2023-01-02 18:16:22.260843+00'); -INSERT INTO ethereum.block VALUES (377, '2023-01-02 18:16:22', '0xad4be50bca353be371406917ea1c843a474b5efa137b8c287e739bd16454ab59', 0, '2023-01-02 18:16:27.818618+00'); -INSERT INTO ethereum.block VALUES (378, '2023-01-02 18:16:27', '0x9d428b0c90c60e73b85f713a3e3f6e6a20b3a65f4fc49534c2627186632d3624', 1, '2023-01-02 18:20:02.218296+00'); -INSERT INTO ethereum.block VALUES (379, '2023-01-02 18:20:02', '0x5b8a481997483f24723c6797b48d9d559da550856dbcac1084916f02eaaf96d0', 0, '2023-01-02 18:20:13.151134+00'); -INSERT INTO ethereum.block VALUES (380, '2023-01-02 18:20:13', '0xa06d36d6142e0e27c9dcf0314b5685c4e5f78cbe2449b9d462e9dcaaa86ff82f', 0, '2023-01-02 18:20:17.460367+00'); -INSERT INTO ethereum.block VALUES (381, '2023-01-02 18:20:17', '0xd1a438342f6375d016bcb614c9a62a33211742655db5a06265022f090d0c9481', 0, '2023-01-02 18:20:19.292739+00'); -INSERT INTO ethereum.block VALUES (382, '2023-01-02 18:20:19', '0xc8b6c23d0156071212c37b3c1c8d50b82abe5bbe2c9a8ec74f9e43f60e0fdf8b', 0, '2023-01-02 18:20:20.614648+00'); -INSERT INTO ethereum.block VALUES (383, '2023-01-02 18:20:20', '0x67f4729879f7ac92775959e0e78a6593b5736596c8ba8a953e69a97b7661d35e', 0, '2023-01-02 18:20:35.876539+00'); -INSERT INTO ethereum.block VALUES (384, '2023-01-02 18:20:28', '0x16b709401805bf02a8f3e9dd90a98d3a5dbabf5eb6c2aa7d3889a2d67f3801a2', 0, '2023-01-02 18:20:36.790761+00'); -INSERT INTO ethereum.block VALUES (385, '2023-01-02 18:20:36', '0xf74daa1a303ec4d616841522cf38a07492993f479df6967947c30735ba77f537', 1, '2023-01-02 18:20:39.691259+00'); -INSERT INTO ethereum.block VALUES (386, '2023-01-02 18:20:39', '0xd3dc5babbccc3733f64f7c6c5d70b762609322aeb108975b01fa1f6026113998', 0, '2023-01-02 18:20:40.733907+00'); -INSERT INTO ethereum.block VALUES (387, '2023-01-02 18:20:40', '0x87b496030ad56d0ef04bfd98265c7da880c786b133f2a83017619b8815a99ed8', 0, '2023-01-02 18:20:42.110411+00'); -INSERT INTO ethereum.block VALUES (388, '2023-01-02 18:20:42', '0x565100f17dd8ae2f5d9dc2cf4ef8157af204d9efedb78dbfe4c5cb4aabefe21b', 0, '2023-01-02 18:21:04.7392+00'); -INSERT INTO ethereum.block VALUES (389, '2023-01-02 18:21:03', '0x4dbb5dda8ddd6a1fb82a3b0e49fd6aaa9c15725e54c05d0fa599bf03b800ad23', 0, '2023-01-02 18:21:05.167459+00'); -INSERT INTO ethereum.block VALUES (390, '2023-01-02 18:21:05', '0x0cf84a51cc3b2343d4dd3252b1442a1aac3828253255a38e1335c04f95d14205', 2, '2023-01-02 18:21:28.218936+00'); -INSERT INTO ethereum.block VALUES (391, '2023-01-02 18:21:28', '0xcb0eb52c0b9753f2191668fd8e286faf0ef2beb8d2bfa5bd8cf20352e8658b10', 0, '2023-01-02 18:21:41.804129+00'); -INSERT INTO ethereum.block VALUES (392, '2023-01-02 18:21:30', '0xa7db5eee189cd2b1685f3eba86b82f877585fd9154ef89f25eeda16309119d72', 0, '2023-01-02 18:21:42.01254+00'); -INSERT INTO ethereum.block VALUES (393, '2023-01-02 18:21:31', '0xc321a28f5280623d5f5abbf65f72786ab267794fb454be86b4d856c405432b9b', 0, '2023-01-02 18:21:42.178007+00'); -INSERT INTO ethereum.block VALUES (394, '2023-01-02 18:21:35', '0x35017e805a53b8870f045b8bcfee582c35c9fae0697974999ed206ff4a276e14', 1, '2023-01-02 18:22:10.99338+00'); -INSERT INTO ethereum.block VALUES (395, '2023-01-02 18:21:53', '0x6db108103e85df0f605ea7f81d2d51d4890d778496007c9842c2302a4df52467', 0, '2023-01-02 18:22:11.287681+00'); -INSERT INTO ethereum.block VALUES (396, '2023-01-02 18:22:02', '0x014253deaa2d42254db0905cefcd4c08ea96554db1eace0bddfaec3bf16646e0', 1, '2023-01-02 18:22:13.369558+00'); -INSERT INTO ethereum.block VALUES (397, '2023-01-02 18:22:13', '0x9984be9e421d72d9b55520e38f758b77adc31667fefcc2cb004ce3b0970b0467', 0, '2023-01-02 18:22:22.080346+00'); -INSERT INTO ethereum.block VALUES (398, '2023-01-02 18:22:22', '0x2f7d98fb26a8f3762ecb8de321b8965348a83f0e8504b75fe8b0d619137e69e2', 0, '2023-01-02 18:22:35.027549+00'); -INSERT INTO ethereum.block VALUES (399, '2023-01-02 18:22:34', '0x069b09ded8015517531ba591312cf5b58018931bdfcf3ecb151341976f946e1d', 0, '2023-01-02 18:22:44.060206+00'); -INSERT INTO ethereum.block VALUES (400, '2023-01-02 18:22:43', '0x9306ab91f47bac7f248cc01902726aeca0722b5f4624aa9b8205f399d6d8d7ab', 0, '2023-01-02 18:22:47.697522+00'); - - --- --- Data for Name: token_metadata_erc721; Type: TABLE DATA; Schema: ethereum; Owner: postgres --- - -INSERT INTO ethereum.token_metadata_erc721 VALUES ('0x290A8449050FAc54BBe1f23510B46b541C54A369', '2023-01-02 17:59:21.235818+00', 'Test NFT', 'TNFT'); - - --- --- Data for Name: token_erc721; Type: TABLE DATA; Schema: ethereum; Owner: postgres --- - -INSERT INTO ethereum.token_erc721 VALUES ('9d81efda-14b1-4d94-85d5-dcd1cb3958f8', '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x290A8449050FAc54BBe1f23510B46b541C54A369', '', 2, '2023-01-02 18:16:27'); -INSERT INTO ethereum.token_erc721 VALUES ('1fad6be5-b376-45b1-a9ec-2f023168dbd5', '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x290A8449050FAc54BBe1f23510B46b541C54A369', '', 4, '2023-01-02 18:20:36'); -INSERT INTO ethereum.token_erc721 VALUES ('def1d2a4-ace1-4cb0-ac23-9d8de58d24ed', '0x06fC56347D91C6aD2dAE0c3ba38Eb12AB0D72E97', '0x290A8449050FAc54BBe1f23510B46b541C54A369', '', 1, '2023-01-02 18:22:02'); - - --- --- Data for Name: token_metadata_erc20; Type: TABLE DATA; Schema: ethereum; Owner: postgres --- - -INSERT INTO ethereum.token_metadata_erc20 VALUES ('0x585Aca7D7B733B441238D2f36230e39FE643795D', '2023-01-02 17:59:21.046437+00', 'Test Token', 'TT', 10000000000000000000000); - - --- --- Data for Name: transaction; Type: TABLE DATA; Schema: ethereum; Owner: postgres --- - -INSERT INTO ethereum.transaction VALUES ('d9fca773-a706-4d60-a2c3-7f2275bb514d', 0, '0xd7cbabfdb30930a30146e38f57a9b7bdb86c6f1a3149db25dc323cee5bdd6f0e', 294, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '', 0, '0x60806040', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('e93a519a-013d-48df-ab5e-3d01f782314a', 0, '0x8a7b155eabb870d8614a83bfb4ad5c5e0034d140b5c0c2ced0bc5112c98b9ddf', 295, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x9ebd146c533043628ab4Df558938EE22524952C5', 0, '0xfdacd576', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('acf339e3-bf41-4077-baca-1229f37ea5d3', 0, '0xd76d113326843ff326a9d4d5ed411d090f95c4be03ff42f2344d67b4bb56f6f4', 297, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '', 0, '0x60806040', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('6463548a-672b-4817-bff2-681b3af191ac', 0, '0x9ebe3c70b0d3334a8e3a6ca483555d37b05d5ebc08df3ba089036baf79785861', 299, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x9ebd146c533043628ab4Df558938EE22524952C5', 0, '0xfdacd576', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('17375186-5380-49a3-b02a-e24777fcf059', 0, '0xc651f5e517016dad30cc71ed3b21e66839f0163d1c5659c813f65434edc1809f', 310, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '', 0, '0x60806040', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('69c17a2a-2cb1-4847-8e66-3c90c6c7e0da', 0, '0xf9903089546f292692b1cff9037b92ef8dfc8c7e3a9d975123692c99d5569b9a', 311, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x32E14237A9146224772215C639AFc15890fB2bF3', 0, '0xfdacd576', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('1da16038-56bf-4ab9-ba1b-cd49dc819e99', 0, '0xd2bc8eb60dbdd964672a89275e2d6a6936fab8429b384dd07a257e88c46278eb', 312, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '', 0, '0x60806040', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('05beaadf-f07c-405a-a6ee-288ee11e3702', 0, '0xa281bd2ad5b5a5d91b4f9ab46793d2a6fdcdb06cc7137fa0a36281b4f601dc5e', 313, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x32E14237A9146224772215C639AFc15890fB2bF3', 0, '0xfdacd576', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('fae6b540-702a-4821-a9e1-4dbcbd444a00', 0, '0x616573e4633b8a0c8ecfeeaba9de75cde12fa97d6d661f7af48288918909d584', 331, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x585Aca7D7B733B441238D2f36230e39FE643795D', 0, '0xa9059cbb', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('875e6ff1-5239-490e-90f8-562bb54e55f9', 0, '0x99ae4aaab101c210f72da85870c3e13f4ea5f5a38d6ed66f0a4da5b13cb82268', 335, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x290A8449050FAc54BBe1f23510B46b541C54A369', 0, '0x829acf68', 'issueBond'); -INSERT INTO ethereum.transaction VALUES ('e542d5d4-2ea7-4e30-9484-0a5750bcce38', 0, '0x455028c4b048717f73bb2a36bff0ecb0d594b18669f76485c3f11118a11a304f', 337, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x290A8449050FAc54BBe1f23510B46b541C54A369', 0, '0x42842e0e', 'safeTransferFrom'); -INSERT INTO ethereum.transaction VALUES ('54f6d2a1-0a6b-4dda-bfc3-924e96647092', 0, '0x31e23a98f08cd4a900779d059e765ffecd0bc347f57f981c4d41a57202654ac0', 338, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x585Aca7D7B733B441238D2f36230e39FE643795D', 0, '0xa9059cbb', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('25dabeec-9dae-44c0-8b15-72fe0fc26eed', 0, '0xc6d7ff6ff4b99cea3f3970bf7106a9c88b445c8d31bbaf24cf3fa676b966748e', 343, '0x06fC56347D91C6aD2dAE0c3ba38Eb12AB0D72E97', '0x585Aca7D7B733B441238D2f36230e39FE643795D', 0, '0xa9059cbb', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('ccefbd9a-6a47-4781-911d-7312f7af1b46', 0, '0x660f706cf14618a7c4a3420c7e5650a9c9014837e04fc53c4e88350a3649ff0f', 376, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x585Aca7D7B733B441238D2f36230e39FE643795D', 0, '0xa9059cbb', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('13c6e6bc-9d85-4bfc-acde-ab430552b5f2', 0, '0xba2ee9c39a37959e8d95e321e6f5992b1c087d57f7a20a107b026ef4babb1b89', 378, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x290A8449050FAc54BBe1f23510B46b541C54A369', 0, '0x829acf68', 'issueBond'); -INSERT INTO ethereum.transaction VALUES ('e1135881-1f0d-493a-8543-0a62b70c5779', 0, '0xe31a12f3d7b9710d192f1bf9bafabbecb531997a8a943b613945409a4688e991', 385, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x290A8449050FAc54BBe1f23510B46b541C54A369', 0, '0x829acf68', 'issueBond'); -INSERT INTO ethereum.transaction VALUES ('42605284-c4a9-469a-85eb-061ae18d1730', 0, '0x7e290c04b8fa28315a95053b594766a05df859451b5d4ce728de608e718a56d8', 390, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x290A8449050FAc54BBe1f23510B46b541C54A369', 0, '0x42842e0e', 'safeTransferFrom'); -INSERT INTO ethereum.transaction VALUES ('4059a62d-e253-4004-af0f-99838eb7ccc5', 1, '0x1720578e8e53ea9caa6f54e006d1043f2ae164f26afa50a0d32064dcabcc690e', 390, '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x585Aca7D7B733B441238D2f36230e39FE643795D', 0, '0xa9059cbb', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('69905af0-6115-4d3b-9d30-58879bc093f3', 0, '0xc9b3e27f6f04284c975f363a2932ad9361cdc445f4ff8f257ebb6c03a5ee895b', 394, '0x06fC56347D91C6aD2dAE0c3ba38Eb12AB0D72E97', '0x585Aca7D7B733B441238D2f36230e39FE643795D', 0, '0xa9059cbb', 'transfer'); -INSERT INTO ethereum.transaction VALUES ('c1934b6b-7ccc-4650-a0a1-9309caa8ea9e', 0, '0x5acbb54a02a2580d6d4ef46db56457fcd290d38f434aa2f6c5f86be2e8607bc3', 396, '0x2666A32bF7594ab5395D766DCFBF03d557dAB538', '0x290A8449050FAc54BBe1f23510B46b541C54A369', 0, '0x42842e0e', 'safeTransferFrom'); - - --- --- Data for Name: token_transfer; Type: TABLE DATA; Schema: ethereum; Owner: postgres --- - -INSERT INTO ethereum.token_transfer VALUES ('23b20483-6c34-4177-8ed8-a6d9be072dc3', 'fae6b540-702a-4821-a9e1-4dbcbd444a00', '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x06fC56347D91C6aD2dAE0c3ba38Eb12AB0D72E97', 10); -INSERT INTO ethereum.token_transfer VALUES ('cab14ac9-bb02-4054-9b1c-b8fc2f2f8c34', '875e6ff1-5239-490e-90f8-562bb54e55f9', '0x0000000000000000000000000000000000000000', '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', 1); -INSERT INTO ethereum.token_transfer VALUES ('439336ca-f8c4-46b1-a68a-24b17cabdac4', 'e542d5d4-2ea7-4e30-9484-0a5750bcce38', '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x2666A32bF7594ab5395D766DCFBF03d557dAB538', 1); -INSERT INTO ethereum.token_transfer VALUES ('7fd908a8-1734-4893-a265-9d5549ab9ba5', '54f6d2a1-0a6b-4dda-bfc3-924e96647092', '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x06fC56347D91C6aD2dAE0c3ba38Eb12AB0D72E97', 100); -INSERT INTO ethereum.token_transfer VALUES ('5eb79122-d48d-444d-8165-1074927e88e2', '25dabeec-9dae-44c0-8b15-72fe0fc26eed', '0x06fC56347D91C6aD2dAE0c3ba38Eb12AB0D72E97', '0x2666A32bF7594ab5395D766DCFBF03d557dAB538', 10); -INSERT INTO ethereum.token_transfer VALUES ('841e9c25-fa99-41ab-b451-49b1ef9f43cd', 'ccefbd9a-6a47-4781-911d-7312f7af1b46', '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x06fC56347D91C6aD2dAE0c3ba38Eb12AB0D72E97', 10); -INSERT INTO ethereum.token_transfer VALUES ('7d06caae-01b8-4043-8c93-dedab721b18c', '13c6e6bc-9d85-4bfc-acde-ab430552b5f2', '0x0000000000000000000000000000000000000000', '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', 2); -INSERT INTO ethereum.token_transfer VALUES ('9aa4da54-73e0-4f05-a866-528a50ab609f', 'e1135881-1f0d-493a-8543-0a62b70c5779', '0x0000000000000000000000000000000000000000', '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', 4); -INSERT INTO ethereum.token_transfer VALUES ('d77a06b2-cb18-4821-8e4f-4f0864f38092', '4059a62d-e253-4004-af0f-99838eb7ccc5', '0xEC709e1774f0cE4ABA47b52A499F9aBaaa159f71', '0x06fC56347D91C6aD2dAE0c3ba38Eb12AB0D72E97', 100); -INSERT INTO ethereum.token_transfer VALUES ('31f3d9a4-8551-40e4-9d58-3898954bef98', '69905af0-6115-4d3b-9d30-58879bc093f3', '0x06fC56347D91C6aD2dAE0c3ba38Eb12AB0D72E97', '0x2666A32bF7594ab5395D766DCFBF03d557dAB538', 10); -INSERT INTO ethereum.token_transfer VALUES ('24028305-4419-4986-abd7-8f83677dde79', 'c1934b6b-7ccc-4650-a0a1-9309caa8ea9e', '0x2666A32bF7594ab5395D766DCFBF03d557dAB538', '0x06fC56347D91C6aD2dAE0c3ba38Eb12AB0D72E97', 1); - --- --- Data for Name: plugin_status; Type: TABLE DATA; Schema: public; Owner: postgres --- - -INSERT INTO public.plugin_status VALUES ('PluginPersistenceEthereum', 'functional-test', true, '2023-01-02 17:59:20.020092+00', '2023-01-02 18:18:10.219048+00'); diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-functional.test.ts b/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-functional.test.ts deleted file mode 100644 index 1be694048c..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-functional.test.ts +++ /dev/null @@ -1,808 +0,0 @@ -/** - * Functional test of basic operations on ethereum persistence plugin (packages/cactus-plugin-persistence-ethereum). - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; -const setupTimeout = 1000 * 60 * 3; // 3 minutes timeout for setup -const testTimeout = 1000 * 60 * 5; // 5 minutes timeout for some async tests - -// Token details (read from contract) -const erc20TokenName = "TestERC20"; -const erc20TokenSymbol = "T20"; -const erc20TokenSupply = 1000; -const erc721TokenName = "TestErc721Token"; -const erc721TokenSymbol = "T721"; - -// Geth environment -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { - GethTestLedger, - WHALE_ACCOUNT_PRIVATE_KEY, -} from "@hyperledger/cactus-test-geth-ledger"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - EthereumApiClient, - PluginLedgerConnectorEthereum, - WatchBlocksV1BlockData, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; - -import "jest-extended"; -import http from "http"; -import { AddressInfo } from "net"; -import express from "express"; -import bodyParser from "body-parser"; -import { Server as SocketIoServer } from "socket.io"; -import { v4 as uuidV4 } from "uuid"; -import Web3, { - ContractAbi, - FMT_BYTES, - FMT_NUMBER, - TransactionReceipt, - Web3BaseWalletAccount, -} from "web3"; -import { Web3Account } from "web3-eth-accounts"; -import { checkAddressCheckSum } from "web3-validator"; - -import DatabaseClient from "../../../main/typescript/db-client/db-client"; -jest.mock("../../../main/typescript/db-client/db-client"); -const DatabaseClientMock = DatabaseClient as unknown as jest.Mock; -import { PluginPersistenceEthereum } from "../../../main/typescript"; -import TestERC20ContractJson from "../../solidity/TestERC20.json"; -import TestERC721ContractJson from "../../solidity/TestERC721.json"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "persistence-ethereum-functional.test", - level: testLogLevel, -}); - -describe("Ethereum persistence plugin tests", () => { - let ledger: GethTestLedger; - let web3: Web3; - let constTestAcc: Web3Account; - const constTestAccBalance = 2 * 10e18; - let instanceId: string; - let persistence: PluginPersistenceEthereum; - let dbClientInstance: any; - let defaultAccountAddress: string; - let erc20ContractCreationReceipt: Required; - let erc721ContractCreationReceipt: Required; - - /** - * Replace bigint to print web3js outputs in test. - */ - function stringifyBigIntReplacer( - _key: string, - value: bigint | unknown, - ): string | unknown { - if (typeof value === "bigint") { - return value.toString(); - } - return value; - } - - const expressAppConnector = express(); - expressAppConnector.use(bodyParser.json({ limit: "250mb" })); - expressAppConnector.set("json replacer", stringifyBigIntReplacer); - const connectorServer = http.createServer(expressAppConnector); - const connectorWsApi = new SocketIoServer(connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - let connector: PluginLedgerConnectorEthereum; - - ////////////////////////////////// - // Helper Functions - ////////////////////////////////// - - async function deploySmartContract( - abi: ContractAbi, - bytecode: string, - args?: unknown[], - ): Promise> { - try { - const txReceipt = await ledger.deployContract(abi, "0x" + bytecode, args); - log.debug("deploySmartContract txReceipt:", txReceipt); - expect(txReceipt.contractAddress).toBeTruthy(); - expect(Number(txReceipt.status)).toEqual(1); - expect(txReceipt.blockHash).toBeTruthy(); - log.debug( - "Deployed test smart contract, TX on block number", - txReceipt.blockNumber, - ); - // Force response without optional fields - return txReceipt as Required; - } catch (error) { - log.error("deploySmartContract ERROR", error); - throw error; - } - } - - async function mintErc721Token( - targetAddress: string, - tokenId: number, - ): Promise { - try { - log.info( - `Mint ERC721 token ID ${tokenId} for address ${targetAddress} by ${defaultAccountAddress}`, - ); - - const tokenContract = new web3.eth.Contract( - TestERC721ContractJson.abi, - erc721ContractCreationReceipt.contractAddress, - ); - - const mintResponse = await (tokenContract.methods as any) - .safeMint(targetAddress, tokenId) - .send({ - from: defaultAccountAddress, - gas: 8000000, - }); - log.debug("mintErc721Token mintResponse:", mintResponse); - expect(mintResponse).toBeTruthy(); - expect(Number(mintResponse.status)).toEqual(1); - - return mintResponse; - } catch (error) { - log.error("mintErc721Token ERROR", error); - throw error; - } - } - - /** - * For some reasons Contract doesn't detect additional (non whale) identities even if they are in web3js wallet. - * Because of that we sign and send transaction manually. - */ - async function transferErc721Token( - sourceAddress: string, - targetAddress: string, - tokenId: number, - ): Promise { - try { - log.info( - `Transfer ERC721 with ID ${tokenId} from ${sourceAddress} to ${targetAddress}`, - ); - - const tokenContract = new web3.eth.Contract( - TestERC721ContractJson.abi, - erc721ContractCreationReceipt.contractAddress, - ); - const methodAbi = await (tokenContract.methods as any) - .transferFrom(sourceAddress, targetAddress, tokenId) - .encodeABI(); - - const srcAccount = web3.eth.accounts.wallet.get( - sourceAddress, - ) as Web3BaseWalletAccount; - const signedTx = await srcAccount.signTransaction({ - from: sourceAddress, - to: erc721ContractCreationReceipt.contractAddress, - data: methodAbi, - gasPrice: await web3.eth.getGasPrice(), - gasLimit: 8000000, - }); - - if (!signedTx.rawTransaction) { - throw new Error(`Signing transaction failed, reason unknown.`); - } - - const transferResponse = await web3.eth.sendSignedTransaction( - signedTx.rawTransaction, - ); - log.debug("transferErc721Token transferResponse:", transferResponse); - expect(transferResponse).toBeTruthy(); - expect(Number(transferResponse.status)).toEqual(1); - return transferResponse; - } catch (error) { - log.error("transferErc721Token ERROR", error); - throw error; - } - } - - /** - * Setup mocked response from the database to retrieve token metadata. - * Should be called in each test that rely on this data. - */ - function mockTokenMetadataResponse() { - (dbClientInstance.getTokenMetadataERC20 as jest.Mock).mockReturnValue([ - { - address: erc20ContractCreationReceipt.contractAddress, - name: erc20TokenName, - symbol: erc20TokenSymbol, - total_supply: erc20TokenSupply, - created_at: "2022-1-1T12:00:01Z", - }, - ]); - (dbClientInstance.getTokenMetadataERC721 as jest.Mock).mockReturnValue([ - { - address: erc721ContractCreationReceipt.contractAddress, - name: erc721TokenName, - symbol: erc721TokenSymbol, - created_at: "2022-1-1T12:00:01Z", - }, - ]); - } - - /** - * Remove all mocks setup on the test DB Client instance. - */ - function clearMockTokenMetadata() { - for (const mockMethodName in dbClientInstance) { - const mockMethod = dbClientInstance[mockMethodName]; - if ("mockClear" in mockMethod) { - mockMethod.mockClear(); - } - } - } - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - // Create test ledger - log.info(`Start Ledger ${containerImageName}:${containerImageVersion}...`); - ledger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ledger.start(); - const rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - const rpcApiWsHost = await ledger.getRpcApiWebSocketHost(); - log.info(`Ledger started, RPC: ${rpcApiHttpHost} WS: ${rpcApiWsHost}`); - - // Create Test Account - constTestAcc = await ledger.createEthTestAccount(constTestAccBalance); - - // Create Web3 provider for testing - web3 = new Web3(rpcApiHttpHost); - const account = web3.eth.accounts.privateKeyToAccount( - "0x" + WHALE_ACCOUNT_PRIVATE_KEY, - ); - web3.eth.accounts.wallet.add(constTestAcc); - web3.eth.accounts.wallet.add(account); - defaultAccountAddress = account.address; - - const addressInfo = (await Servers.listen({ - hostname: "127.0.0.1", - port: 0, - server: connectorServer, - })) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidV4(), - keychainId: uuidV4(), - backend: new Map([]), - logLevel: testLogLevel, - }); - connector = new PluginLedgerConnectorEthereum({ - instanceId: uuidV4(), - rpcApiHttpHost, - rpcApiWsHost, - logLevel: sutLogLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressAppConnector, connectorWsApi); - - const apiConfig = new Configuration({ basePath: apiHost }); - const apiClient = new EthereumApiClient(apiConfig); - - // Create Ethereum persistence plugin - instanceId = "functional-test"; - DatabaseClientMock.mockClear(); - persistence = new PluginPersistenceEthereum({ - apiClient, - logLevel: sutLogLevel, - instanceId, - connectionString: "db-is-mocked", - }); - expect(DatabaseClientMock).toHaveBeenCalledTimes(1); - dbClientInstance = DatabaseClientMock.mock.instances[0]; - expect(dbClientInstance).toBeTruthy(); - }, setupTimeout); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (persistence) { - log.info("Stop persistence plugin..."); - await persistence.shutdown(); - } - - if (connectorServer) { - log.info("Stop connector http servers..."); - await Servers.shutdown(connectorServer); - } - - if (connector) { - log.info("Stop the connector..."); - await connector.shutdown(); - } - - if (ledger) { - log.info("Stop ethereum ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }, setupTimeout); - - beforeEach(() => { - clearMockTokenMetadata(); - }, setupTimeout); - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - /** - * Simple test to see if test ethereum ledger is running correctly. - * Doesn't use apiClient or validator. - */ - test("Sanity check ledger connection", async () => { - const balance = await web3.eth.getBalance(constTestAcc.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toEqual(constTestAccBalance.toString()); - }); - - test("Basic methods test", async () => { - // getInstanceId() - expect(persistence.getInstanceId()).toEqual(instanceId); - - // getPackageName() - expect(persistence.getPackageName()).toEqual( - "@hyperledger/cactus-plugin-persistence-ethereum", - ); - - // getOpenApiSpec() - expect(persistence.getOpenApiSpec()).toBeTruthy(); - }); - - ////////////////////////////////// - // Basic Method Tests - ////////////////////////////////// - - describe("Basic plugin method tests", () => { - beforeAll(async () => { - // Deploy smart contracts - const erc20Bytecode = TestERC20ContractJson.data.bytecode.object; - erc20ContractCreationReceipt = await deploySmartContract( - TestERC20ContractJson.abi, - erc20Bytecode, - [erc20TokenSupply], - ); - log.info( - "ERC20 deployed contract address:", - erc20ContractCreationReceipt.contractAddress, - ); - - const erc721Bytecode = TestERC721ContractJson.data.bytecode.object; - erc721ContractCreationReceipt = await deploySmartContract( - TestERC721ContractJson.abi, - erc721Bytecode, - ); - log.info( - "ERC721 deployed contract address:", - erc721ContractCreationReceipt.contractAddress, - ); - }); - - test("onPluginInit creates DB schema and fetches the monitored tokens", async () => { - mockTokenMetadataResponse(); - await persistence.onPluginInit(); - - // DB Schema initialized - const initDBCalls = dbClientInstance.initializePlugin.mock.calls; - expect(initDBCalls.length).toBe(1); - - // Tokens refreshed - expect(persistence.monitoredTokens).toBeTruthy(); - expect(persistence.monitoredTokens.size).toEqual(2); - }); - - test("Initial plugin status is correct", async () => { - mockTokenMetadataResponse(); - await persistence.onPluginInit(); - - const status = persistence.getStatus(); - expect(status).toBeTruthy(); - expect(status.instanceId).toEqual(instanceId); - expect(status.connected).toBeTrue(); - expect(status.webServicesRegistered).toBeFalse(); - expect(status.monitoredTokensCount).toEqual(2); - expect(status.lastSeenBlock).toEqual(0); - }); - - test("Adding ERC20 tokens to the GUI test", async () => { - await persistence.addTokenERC20( - erc20ContractCreationReceipt.contractAddress, - ); - - // Check if DBClient was called - const insertCalls = dbClientInstance.insertTokenMetadataERC20.mock.calls; - expect(insertCalls.length).toBe(1); - const insertCallArgs = insertCalls[0]; - - // Check inserted token data - const token = insertCallArgs[0]; - expect(token).toBeTruthy(); - expect(token.address.toLowerCase()).toEqual( - erc20ContractCreationReceipt.contractAddress.toLowerCase(), - ); - expect(checkAddressCheckSum(token.address)).toBeTrue(); - expect(token.name).toEqual(erc20TokenName); - expect(token.symbol).toEqual(erc20TokenSymbol); - expect(token.total_supply).toEqual(erc20TokenSupply); - }); - - test("Adding token with invalid data throws RuntimeError", async () => { - // Empty address - await expect(persistence.addTokenERC20("")).toReject(); - - // Invalid address - await expect(persistence.addTokenERC20("abc")).toReject(); - - // Wrong checksum address - await expect( - persistence.addTokenERC20("0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe0"), - ).toReject(); - - // Non existing address - await expect( - persistence.addTokenERC20("0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5"), - ).toReject(); - }); - - test("Adding ERC721 tokens to the GUI test", async () => { - await persistence.addTokenERC721( - erc721ContractCreationReceipt.contractAddress, - ); - - // Check if DBClient was called - const insertCalls = dbClientInstance.insertTokenMetadataERC721.mock.calls; - expect(insertCalls.length).toBe(1); - const insertCallArgs = insertCalls[0]; - - // Check inserted token data - const token = insertCallArgs[0]; - expect(token).toBeTruthy(); - expect(token.address.toLowerCase()).toEqual( - erc721ContractCreationReceipt.contractAddress.toLowerCase(), - ); - expect(checkAddressCheckSum(token.address)).toBeTrue(); - expect(token.name).toEqual(erc721TokenName); - expect(token.symbol).toEqual(erc721TokenSymbol); - }); - - test("Refresh tokens updates internal state", async () => { - const tokens = await persistence.refreshMonitoredTokens(); - - expect(tokens).toBeTruthy(); - expect(tokens.size).toEqual(2); - const tokenAddresses = Array.from(tokens.keys()); - expect(tokenAddresses).toContain( - web3.utils.toChecksumAddress( - erc20ContractCreationReceipt.contractAddress, - ), - ); - expect(tokenAddresses).toContain( - web3.utils.toChecksumAddress( - erc721ContractCreationReceipt.contractAddress, - ), - ); - expect(tokens).toEqual(persistence.monitoredTokens); - }); - }); - - ////////////////////////////////// - // Data Synchronization Tests - ////////////////////////////////// - - describe("Data synchronization tests", () => { - beforeEach(async () => { - // Deploy smart contracts - const erc20Bytecode = TestERC20ContractJson.data.bytecode.object; - erc20ContractCreationReceipt = await deploySmartContract( - TestERC20ContractJson.abi, - erc20Bytecode, - [erc20TokenSupply], - ); - log.info( - "ERC20 deployed contract address:", - erc20ContractCreationReceipt.contractAddress, - ); - - const erc721Bytecode = TestERC721ContractJson.data.bytecode.object; - erc721ContractCreationReceipt = await deploySmartContract( - TestERC721ContractJson.abi, - erc721Bytecode, - ); - log.info( - "ERC721 deployed contract address:", - erc721ContractCreationReceipt.contractAddress, - ); - - mockTokenMetadataResponse(); - }); - - test("Synchronization of ERC721 finds all issued tokens", async () => { - expect(erc721ContractCreationReceipt.contractAddress).toBeTruthy(); - - await persistence.refreshMonitoredTokens(); - // Issue three test tokens - await mintErc721Token(constTestAcc.address, 1); - await mintErc721Token(constTestAcc.address, 2); - await mintErc721Token(constTestAcc.address, 3); - log.debug("Minting test ERC721 tokens done."); - - await persistence.syncERC721Tokens(); - - const upsertCalls = dbClientInstance.upsertTokenERC721.mock.calls; - expect(upsertCalls.length).toBe(3); - upsertCalls.forEach((callArgs: any[]) => { - const token = callArgs[0]; - expect([1, 2, 3]).toInclude(token.token_id); - expect(token.account_address).toBeTruthy(); - expect(token.uri).toBeTruthy(); - }); - }); - }); - - ////////////////////////////////// - // Block Parsing Tests - ////////////////////////////////// - - describe("Block parsing and monitoring tests", () => { - beforeEach(async () => { - // Deploy smart contracts - const erc20Bytecode = TestERC20ContractJson.data.bytecode.object; - erc20ContractCreationReceipt = await deploySmartContract( - TestERC20ContractJson.abi, - erc20Bytecode, - [erc20TokenSupply], - ); - log.info( - "ERC20 deployed contract address:", - erc20ContractCreationReceipt.contractAddress, - ); - - const erc721Bytecode = TestERC721ContractJson.data.bytecode.object; - erc721ContractCreationReceipt = await deploySmartContract( - TestERC721ContractJson.abi, - erc721Bytecode, - ); - log.info( - "ERC721 deployed contract address:", - erc721ContractCreationReceipt.contractAddress, - ); - - mockTokenMetadataResponse(); - }); - - test("Parse block with transaction of minting new token", async () => { - await persistence.refreshMonitoredTokens(); - - // Mint token to create a new block - const targetTokenAddress = constTestAcc.address; - const tokenId = 1; - const mintResponse: any = await mintErc721Token( - targetTokenAddress, - tokenId, - ); - expect(mintResponse.blockNumber).toBeTruthy(); - const mintTxBlock = await web3.eth.getBlock( - mintResponse.blockNumber, - true, - { - number: FMT_NUMBER.STR, - bytes: FMT_BYTES.HEX, - }, - ); - - // Parse block data - await persistence.parseAndStoreBlockData( - mintTxBlock as WatchBlocksV1BlockData, - ); - - // Check if DBClient was called - const insertCalls = dbClientInstance.insertBlockData.mock.calls; - expect(insertCalls.length).toBe(1); - const insertCallArgs = insertCalls[0]; - - // Check inserted block data - const insertBlockData = insertCallArgs[0]; - const blockData = insertBlockData.block; - expect(blockData).toBeTruthy(); - expect(blockData.number).toBeGreaterThan(0); - expect(blockData.created_at).toBeTruthy(); - expect(blockData.hash).toBeTruthy(); - expect(blockData.number_of_tx).toBeGreaterThan(0); - const blockTransactions = insertBlockData.transactions; - expect(blockTransactions).toBeTruthy(); - - // Find mint transaction by it's method signature - const mintTransaction = blockTransactions.find( - (tx: any) => tx.method_signature === "0xa1448194", - ); - expect(mintTransaction).toBeTruthy(); - expect(mintTransaction.from).toBeTruthy(); - expect(mintTransaction.to).toBeTruthy(); - expect(mintTransaction.token_transfers.length).toEqual(1); - const mintTransactionTransfer = mintTransaction.token_transfers[0]; - expect(mintTransactionTransfer).toBeTruthy(); - - // Check token transfer - expect(mintTransactionTransfer.sender.toLowerCase()).toEqual( - "0x0000000000000000000000000000000000000000", - ); - expect(mintTransactionTransfer.recipient.toLowerCase()).toEqual( - targetTokenAddress.toLowerCase(), - ); - expect(mintTransactionTransfer.value).toEqual(tokenId.toString()); - }); - - test("Parse block with transaction of token transfer", async () => { - await persistence.refreshMonitoredTokens(); - - // Mint and transfer token to create a new block - await mintErc721Token(constTestAcc.address, 1); - const sourceAccount = constTestAcc.address; - const targetAccount = defaultAccountAddress; - const tokenId = 1; - const tranferResponse: any = await transferErc721Token( - sourceAccount, - targetAccount, - tokenId, - ); - expect(tranferResponse.blockNumber).toBeTruthy(); - const transferTxBlock = await web3.eth.getBlock( - tranferResponse.blockNumber, - true, - { - number: FMT_NUMBER.STR, - bytes: FMT_BYTES.HEX, - }, - ); - - // Parse block data - await persistence.parseAndStoreBlockData( - transferTxBlock as WatchBlocksV1BlockData, - ); - - // Check if DBClient was called - const insertCalls = dbClientInstance.insertBlockData.mock.calls; - expect(insertCalls.length).toBe(1); - const insertCallArgs = insertCalls[0]; - - // Check inserted block data - const insertBlockData = insertCallArgs[0]; - - // Find transfer transaction by it's method signature - const transferTransaction = insertBlockData.transactions.find( - (tx: any) => tx.method_signature === "0x23b872dd", - ); - expect(transferTransaction).toBeTruthy(); - expect(transferTransaction.method_name).toEqual("transferFrom"); - expect(transferTransaction.token_transfers.length).toEqual(1); - const txTransfer = transferTransaction.token_transfers[0]; - - // Check token transfer - expect(txTransfer.sender.toLowerCase()).toEqual( - sourceAccount.toLowerCase(), - ); - expect(txTransfer.recipient.toLowerCase()).toEqual( - targetAccount.toLowerCase(), - ); - expect(txTransfer.value).toEqual(tokenId.toString()); - }); - - test( - "Calling syncAll adds new tracked operation that is reported in plugin status", - async () => { - // Freeze on getMissingBlocksInRange method until status is checked - let isStatusChecked = false; - ( - dbClientInstance.getMissingBlocksInRange as jest.Mock - ).mockImplementation(async () => { - while (!isStatusChecked) { - await new Promise((resolve) => setTimeout(resolve, 1000)); - } - - return []; - }); - - const syncAllPromise = persistence.syncAll(); - - try { - // Wait for method to be called - await new Promise((resolve) => setTimeout(resolve, 3000)); - - // Check if syncAll operation is present - const status = persistence.getStatus(); - expect(status).toBeTruthy(); - expect(status.operationsRunning.length).toEqual(1); - const trackedOperation = status.operationsRunning[0]; - expect(trackedOperation.startAt).toBeTruthy(); - expect(trackedOperation.operation).toEqual("syncAll"); - } finally { - // Always finish the syncAll call - isStatusChecked = true; - await syncAllPromise; - } - - const statusAfterFinish = persistence.getStatus(); - expect(statusAfterFinish).toBeTruthy(); - expect(statusAfterFinish.operationsRunning.length).toEqual(0); - }, - testTimeout, - ); - - test( - "Block monitoring detects new changes correctly.", - async () => { - await persistence.refreshMonitoredTokens(); - - const insertBlockPromise = new Promise((resolve, reject) => { - ( - dbClientInstance.getMissingBlocksInRange as jest.Mock - ).mockReturnValue([]); - - (dbClientInstance.insertBlockData as jest.Mock).mockImplementation( - (blockData) => resolve(blockData), - ); - - persistence.startMonitor((err) => { - reject(err); - }); - log.debug("Persistence plugin block monitoring started."); - }); - - // Wait for monitor to get started - await new Promise((resolve) => setTimeout(resolve, 3000)); - - // Trigger new block - await mintErc721Token(constTestAcc.address, 1); - log.debug("New token has been minted to trigger tx"); - - const blockData = await insertBlockPromise; - log.debug("blockData was inserted:", blockData); - expect(blockData.block).toBeTruthy(); - - // Check if status reports that monitor is running - const status = persistence.getStatus(); - expect(status).toBeTruthy(); - expect(status.monitorRunning).toBeTrue(); - - // Check if status reports monitor is not running after stopMonitor is called - persistence.stopMonitor(); - const statusAfterStop = persistence.getStatus(); - expect(statusAfterStop).toBeTruthy(); - expect(statusAfterStop.monitorRunning).toBeFalse(); - }, - testTimeout, - ); - }); -}); diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts b/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts deleted file mode 100644 index b011f8a3b9..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts +++ /dev/null @@ -1,742 +0,0 @@ -/** - * Test for accessing data in PostgreSQL through persistence plugin PostgresDatabaseClient (packages/cactus-plugin-persistence-ethereum). - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -const postgresImageName = "postgres"; -const postgresImageVersion = "14.6-alpine"; -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; -const setupTimeout = 1000 * 60; // 1 minute timeout for setup - -import { - pruneDockerAllIfGithubAction, - PostgresTestContainer, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; - -import PostgresDatabaseClient from "../../../main/typescript/db-client/db-client"; - -import "jest-extended"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "persistence-ethereum-postgresql-db-client.test", - level: testLogLevel, -}); - -describe("Ethereum persistence PostgreSQL PostgresDatabaseClient tests", () => { - const testPluginName = "TestPlugin"; - const testPluginInstanceId = "testInstance"; - let postgresContainer: PostgresTestContainer; - let dbClient: PostgresDatabaseClient; - - ////////////////////////////////// - // Helper Functions - ////////////////////////////////// - - /** - * Delete all data from all tables - */ - async function clearDbSchema() { - await dbClient.client.query("DELETE FROM ethereum.token_transfer"); - await dbClient.client.query("DELETE FROM ethereum.transaction"); - await dbClient.client.query("DELETE FROM ethereum.block"); - await dbClient.client.query("DELETE FROM ethereum.token_erc721"); - await dbClient.client.query("DELETE FROM ethereum.token_metadata_erc20"); - await dbClient.client.query("DELETE FROM ethereum.token_metadata_erc721"); - } - - async function getDbBlocks() { - const response = await dbClient.client.query( - "SELECT * FROM ethereum.block", - ); - return response.rows; - } - - async function getDbTransactions() { - const response = await dbClient.client.query( - "SELECT * FROM ethereum.transaction", - ); - return response.rows; - } - - async function getDbTokenTransfers() { - const response = await dbClient.client.query( - "SELECT * FROM ethereum.token_transfer", - ); - return response.rows; - } - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - log.info("Run PostgresTestContainer..."); - postgresContainer = new PostgresTestContainer({ - imageName: postgresImageName, - imageVersion: postgresImageVersion, - logLevel: testLogLevel, - envVars: ["POSTGRES_USER=postgres", "POSTGRES_PASSWORD=postgres"], - }); - await postgresContainer.start(); - const postgresPort = await postgresContainer.getPostgresPort(); - expect(postgresPort).toBeTruthy(); - log.info(`Postgres running at 127.0.0.1:${postgresPort}`); - - log.info("Create PostgresDatabaseClient"); - dbClient = new PostgresDatabaseClient({ - connectionString: `postgresql://postgres:postgres@127.0.0.1:${postgresPort}/postgres`, - logLevel: sutLogLevel, - }); - - log.info("Connect the PostgreSQL PostgresDatabaseClient"); - await dbClient.connect(); - - log.info("Mock Supabase schema"); - // We use plain postgres for better performance, but the actual GUI will use Supabase which does it's own adjustment to the DB. - await dbClient.client.query( - `CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; - CREATE ROLE anon NOLOGIN; - CREATE ROLE authenticated NOLOGIN; - CREATE ROLE service_role NOLOGIN; - CREATE ROLE supabase_admin NOLOGIN;`, - ); - - log.info("Initialize the test DB Schema"); - await dbClient.initializePlugin(testPluginName, testPluginInstanceId); - - // Assert all tables are created - const response = await dbClient.client.query( - "SELECT table_name FROM information_schema.tables WHERE table_schema = 'ethereum'", - ); - const tableNames = response.rows.map((row) => row.table_name); - expect(tableNames.sort()).toEqual( - [ - "block", - "token_metadata_erc20", - "token_metadata_erc721", - "token_erc721", - "token_transfer", - "transaction", - "erc20_token_history_view", - "erc721_token_history_view", - ].sort(), - ); - - // Assert plugin status was inserted - const pluginStatus = await dbClient.getPluginStatus(testPluginName); - expect(pluginStatus).toBeTruthy(); - expect(pluginStatus.name).toEqual(testPluginName); - expect(pluginStatus.last_instance_id).toEqual(testPluginInstanceId); - expect(pluginStatus.is_schema_initialized).toBeTrue(); - expect(pluginStatus.created_at).toEqual(pluginStatus.last_connected_at); - - log.info("Ensure DB Schema is empty (in case test is re-run on same DB"); - await clearDbSchema(); - }, setupTimeout); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (dbClient) { - log.info("Disconnect the PostgresDatabaseClient"); - await dbClient.shutdown(); - } - - if (postgresContainer) { - log.info("Stop PostgreSQL..."); - await postgresContainer.stop(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }, setupTimeout); - - afterEach(async () => { - await clearDbSchema(); - }, setupTimeout); - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - test("Insert single and get all ERC20 token metadata.", async () => { - // Metadata table should be empty at first - const initTokens = await dbClient.getTokenMetadataERC20(); - expect(initTokens.length).toBe(0); - - // Insert single token - const token = { - address: "0x42EA16C9B9e529dA492909F34f416fEd2bE7c280", - name: "TestToken", - symbol: "TT", - total_supply: 1000, - }; - await dbClient.insertTokenMetadataERC20(token); - - // Metadata table should contain token we've just added - const tokensAfterInsert = await dbClient.getTokenMetadataERC20(); - expect(tokensAfterInsert.length).toBe(1); - expect(tokensAfterInsert[0]).toMatchObject({ - ...token, - total_supply: token.total_supply.toString(), - }); - - // Insert another token - await dbClient.insertTokenMetadataERC20({ - address: "0x58E719254f1564eD29A86dB7554c47FaB778F3fE", - name: "AnotherToken", - symbol: "AT", - total_supply: 999, - }); - - // Ensure new token is returned as well - const tokensFinal = await dbClient.getTokenMetadataERC20(); - expect(tokensFinal.length).toBe(2); - }); - - test("Initialize plugin can be called repeatedly and it only updates the last_connected_at", async () => { - const initPluginStatus = await dbClient.getPluginStatus(testPluginName); - expect(initPluginStatus).toBeTruthy(); - - await dbClient.initializePlugin(testPluginName, testPluginInstanceId); - - // Assert plugin status was inserted - const pluginStatus = await dbClient.getPluginStatus(testPluginName); - expect(pluginStatus).toBeTruthy(); - const lastConnectedAt = pluginStatus.last_connected_at; - delete (pluginStatus as any).last_connected_at; - expect(initPluginStatus).toMatchObject(pluginStatus); - expect(lastConnectedAt).not.toEqual(initPluginStatus.last_connected_at); - }); - - // Note: it should also print a warning but we don't assert that - test("Initialize plugin updates instance ID when it changes", async () => { - const newInstanceId = "AnotherInstance"; - const initPluginStatus = await dbClient.getPluginStatus(testPluginName); - expect(initPluginStatus).toBeTruthy(); - - await dbClient.initializePlugin(testPluginName, newInstanceId); - - // Assert plugin status was inserted - const pluginStatus = await dbClient.getPluginStatus(testPluginName); - expect(pluginStatus).toBeTruthy(); - const { last_connected_at, last_instance_id } = pluginStatus; - delete (pluginStatus as any).last_connected_at; - delete (pluginStatus as any).last_instance_id; - expect(initPluginStatus).toMatchObject(pluginStatus); - expect(last_connected_at).not.toEqual(initPluginStatus.last_connected_at); - expect(last_instance_id).toEqual(newInstanceId); - }); - - test("Insert single and get all ERC721 token metadata.", async () => { - // Metadata table should be empty at first - const initTokens = await dbClient.getTokenMetadataERC721(); - expect(initTokens.length).toBe(0); - - // Insert single token - const token = { - address: "0x42EA16C9B9e529dA492909F34f416fEd2bE7c280", - name: "TestToken", - symbol: "TT", - }; - await dbClient.insertTokenMetadataERC721(token); - - // Metadata table should contain token we've just added - const tokensAfterInsert = await dbClient.getTokenMetadataERC721(); - expect(tokensAfterInsert.length).toBe(1); - expect(tokensAfterInsert[0]).toMatchObject(token); - - // Insert another token - await dbClient.insertTokenMetadataERC721({ - address: "0x58E719254f1564eD29A86dB7554c47FaB778F3fE", - name: "AnotherToken", - symbol: "AT", - }); - - // Ensure new token is returned as well - const tokensFinal = await dbClient.getTokenMetadataERC721(); - expect(tokensFinal.length).toBe(2); - }); - - test("Upsert already issued ERC721 token into table (without duplication)", async () => { - // Insert token metadata - const contractAddress = "0x42EA16C9B9e529dA492909F34f416fEd2bE7c280"; - const token = { - address: contractAddress, - name: "TestToken", - symbol: "TT", - }; - await dbClient.insertTokenMetadataERC721(token); - - // Initially table should be empty - const initialTokens = await dbClient.getTokenERC721(); - expect(initialTokens.length).toBe(0); - - // Upsert issued token that is not present in the DB - const issuedToken = { - account_address: "0x6dfc34609a05bC22319fA4Cce1d1E2929548c0D7", - token_address: contractAddress, - uri: "test.uri", - token_id: 1, - }; - await dbClient.upsertTokenERC721(issuedToken); - - // Check if new token was added - const tokensAfterUpsert = await dbClient.getTokenERC721(); - expect(tokensAfterUpsert.length).toBe(1); - expect(tokensAfterUpsert[0]).toMatchObject({ - ...issuedToken, - token_id: issuedToken.token_id.toString(), - }); - - // Upsert the same token but with different owner - const updatedToken = { - ...issuedToken, - account_address: "0x8888", - }; - await dbClient.upsertTokenERC721(updatedToken); - - // Number of tokens should not change, only address should be updated - const tokensFinal = await dbClient.getTokenERC721(); - expect(tokensFinal.length).toBe(1); - expect(tokensFinal[0]).toMatchObject({ - ...updatedToken, - token_id: updatedToken.token_id.toString(), - }); - }); - - test("New block data is added to the DB", async () => { - const blockTimestamp = new Date(1671702925 * 1000); - const block = { - number: 18, - created_at: blockTimestamp.toUTCString(), - hash: "0x2bdfd1957e88297b012a1dc15a51f3691371980749378d10a6186b221d6687e5", - number_of_tx: 1, - }; - - const token_transfer = { - sender: "0x0000000000000000000000000000000000000000", - recipient: "0x12b60219Ca56110E53F9E79178713C363e8aF999", - value: 1, - }; - - const transaction = { - index: 0, - hash: "0x29a3ad97041d01ed610cfab19a091239135ee6bef6d2d7513e94dbb26f8bb1f4", - from: "0x00a329c0648769A73afAc7F9381E08FB43dBEA72", - to: "0x53F6337d308FfB2c52eDa319Be216cC7321D3725", - eth_value: 0, - method_signature: "0xa1448194", - method_name: "", - }; - - await dbClient.insertBlockData({ - block, - transactions: [ - { - ...transaction, - token_transfers: [token_transfer], - }, - ], - }); - - // Assert block - const blocksResponse = await getDbBlocks(); - expect(blocksResponse.length).toBe(1); - const dbBlock = blocksResponse[0]; - expect(dbBlock.number).toEqual(block.number.toString()); - expect(dbBlock.hash).toEqual(block.hash); - expect(dbBlock.number_of_tx).toEqual(block.number_of_tx.toString()); - - // Assert transaction - const txResponse = await getDbTransactions(); - expect(txResponse.length).toBe(1); - const dbTx = txResponse[0]; - expect(dbTx).toMatchObject({ - ...transaction, - index: transaction.index.toString(), - block_number: block.number.toString(), - eth_value: transaction.eth_value.toString(), - }); - - // Assert token transfer - const transferResponse = await getDbTokenTransfers(); - expect(transferResponse.length).toBe(1); - const dbTransfer = transferResponse[0]; - expect(dbTransfer).toMatchObject({ - ...token_transfer, - value: token_transfer.value.toString(), - }); - }); - - test("insertBlockData atomic transaction is reverted on error ", async () => { - const blockTimestamp = new Date(1671702925 * 1000); - const block = { - number: 18, - created_at: blockTimestamp.toUTCString(), - hash: "0x2bdfd1957e88297b012a1dc15a51f3691371980749378d10a6186b221d6687e5", - number_of_tx: 1, - }; - - const token_transfer = { - sender: "0x0000000000000000000000000000000000000000", - recipient: "0x12b60219Ca56110E53F9E79178713C363e8aF999", - value: "asd" as any, // Invalid value type, should fail after already adding block and tx - }; - - const transaction = { - index: 0, - hash: "0x29a3ad97041d01ed610cfab19a091239135ee6bef6d2d7513e94dbb26f8bb1f4", - from: "0x00a329c0648769A73afAc7F9381E08FB43dBEA72", - to: "0x53F6337d308FfB2c52eDa319Be216cC7321D3725", - eth_value: 0, - method_signature: "0xa1448194", - method_name: "", - }; - - try { - await dbClient.insertBlockData({ - block, - transactions: [ - { - ...transaction, - token_transfers: [token_transfer], - }, - ], - }); - expect(true).toBe(false); // Block insertion should fail - } catch (error: unknown) { - log.info("insertBlockData was rejected as expected"); - } - - // Assert no data was added - const blocksResponse = await getDbBlocks(); - expect(blocksResponse.length).toBe(0); - const txResponse = await getDbTransactions(); - expect(txResponse.length).toBe(0); - const transferResponse = await getDbTokenTransfers(); - expect(transferResponse.length).toBe(0); - }); - - test("ERC20 token balance is updated on new block", async () => { - // Current balance table should be empty - const currentBalance = await dbClient.getTokenERC20(); - expect(currentBalance.length).toBe(0); - - // Insert test token metadata - const contractAddr = "0x42EA16C9B9e529dA492909F34f416fEd2bE7c280"; - await dbClient.insertTokenMetadataERC20({ - address: contractAddr, - name: "TestToken", - symbol: "TT", - total_supply: 1000, - }); - - // Insert block with several transfers of our tokens - const blockTimestamp = new Date(1671702925 * 1000); - const firstAccount = "0x12b60219Ca56110E53F9E79178713C363e8aF999"; - const secondAccount = "0x4675C7e5BaAFBFFbca748158bEcBA61ef3b0a263"; - await dbClient.insertBlockData({ - block: { - number: 18, - created_at: blockTimestamp.toUTCString(), - hash: "0x2bdfd1957e88297b012a1dc15a51f3691371980749378d10a6186b221d6687e5", - number_of_tx: 1, - }, - transactions: [ - { - index: 0, - hash: "0x29a3ad97041d01ed610cfab19a091239135ee6bef6d2d7513e94dbb26f8bb1f4", - from: "0x00a329c0648769A73afAc7F9381E08FB43dBEA72", - to: contractAddr, - eth_value: 0, - method_signature: "0xa1448194", - method_name: "", - token_transfers: [ - { - sender: "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5", - recipient: firstAccount, - value: 100, - }, - { - sender: firstAccount, - recipient: secondAccount, - value: 25, - }, - ], - }, - ], - }); - await dbClient.syncTokenBalanceERC20(); - - const balanceAfterInsert = await dbClient.getTokenERC20(); - log.debug("balanceAfterInsert", balanceAfterInsert); - expect(balanceAfterInsert.length).toBe(2); - - // Assert first account balance - const firstAccountBalance = balanceAfterInsert.find( - (b) => b.account_address === firstAccount, - ); - expect(firstAccountBalance).toBeTruthy(); - expect(firstAccountBalance?.balance).toEqual("75"); - - // Assert second account balance - const secondAccountBalance = balanceAfterInsert.find( - (b) => b.account_address === secondAccount, - ); - expect(secondAccountBalance).toBeTruthy(); - expect(secondAccountBalance?.balance).toEqual("25"); - }); - - test("ERC721 token balance is updated on new block", async () => { - // Current balance table should be empty - const currentBalance = await dbClient.getTokenERC721(); - expect(currentBalance.length).toBe(0); - - // Insert test token metadata - const contractAddr = "0x42EA16C9B9e529dA492909F34f416fEd2bE7c280"; - await dbClient.insertTokenMetadataERC721({ - address: contractAddr, - name: "TestToken", - symbol: "TT", - }); - - // Insert block with initial transfers - const firstAccount = "0x12b60219Ca56110E53F9E79178713C363e8aF999"; - const secondAccount = "0x4675C7e5BaAFBFFbca748158bEcBA61ef3b0a263"; - await dbClient.insertBlockData({ - block: { - number: 18, - created_at: new Date(1671702925 * 1000).toUTCString(), - hash: "0x2bdfd1957e88297b012a1dc15a51f3691371980749378d10a6186b221d6687e5", - number_of_tx: 1, - }, - transactions: [ - { - index: 0, - hash: "0x29a3ad97041d01ed610cfab19a091239135ee6bef6d2d7513e94dbb26f8bb1f4", - from: "0x00a329c0648769A73afAc7F9381E08FB43dBEA72", - to: contractAddr, - eth_value: 0, - method_signature: "0xa1448194", - method_name: "", - token_transfers: [ - { - sender: "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5", - recipient: firstAccount, - value: 1, - }, - { - sender: "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5", - recipient: firstAccount, - value: 2, - }, - ], - }, - ], - }); - await dbClient.syncTokenBalanceERC721(18); - - // Insert block with transfer to second account - await dbClient.insertBlockData({ - block: { - number: 19, - created_at: new Date(1671702999 * 1000).toUTCString(), - hash: "0x2bdfd1957e88297b012a1dc15a51f3691371980749378d10a6186b221d6687ff", - number_of_tx: 1, - }, - transactions: [ - { - index: 0, - hash: "0x29a3ad97041d01ed610cfab19a091239135ee6bef6d2d7513e94dbb26f8bb1aa", - from: "0x00a329c0648769A73afAc7F9381E08FB43dBEA72", - to: contractAddr, - eth_value: 0, - method_signature: "0xa1448194", - method_name: "", - token_transfers: [ - { - sender: firstAccount, - recipient: secondAccount, - value: 2, - }, - ], - }, - ], - }); - await dbClient.syncTokenBalanceERC721(19); - - const balanceAfterInsert = await dbClient.getTokenERC721(); - log.debug("balanceAfterInsert", balanceAfterInsert); - expect(balanceAfterInsert.length).toBe(2); - - // Assert first token owner - const firstToken = balanceAfterInsert.find( - (b) => (b.token_id as unknown as string) === "1", - ); - expect(firstToken).toBeTruthy(); - expect(firstToken?.account_address).toEqual(firstAccount); - - // Assert second token owner - const secondToken = balanceAfterInsert.find( - (b) => (b.token_id as unknown as string) === "2", - ); - expect(secondToken).toBeTruthy(); - expect(secondToken?.account_address).toEqual(secondAccount); - }); - - test("Only ERC721 token owner and last_owner_change is updated on already issued token", async () => { - // Insert token metadata - const contractAddress = "0x42EA16C9B9e529dA492909F34f416fEd2bE7c280"; - const token = { - address: contractAddress, - name: "TestToken", - symbol: "TT", - }; - await dbClient.insertTokenMetadataERC721(token); - - // Initially there should be no issued tokens - const initialTokens = await dbClient.getTokenERC721(); - expect(initialTokens.length).toBe(0); - - // Insert already issued token - const issuedTokenUri = "my-test-token.uri"; - const firstAccount = "0x12b60219Ca56110E53F9E79178713C363e8aF999"; - await dbClient.upsertTokenERC721({ - account_address: firstAccount, - token_address: contractAddress, - uri: issuedTokenUri, - token_id: 1, - }); - - // Transfer our token - const blockTimestamp = Date.now() + 1000 * 60 * 60 * 24 * 365; // Year from now - const secondAccount = "0x4675C7e5BaAFBFFbca748158bEcBA61ef3b0a263"; - await dbClient.insertBlockData({ - block: { - number: 18, - created_at: new Date(blockTimestamp).toUTCString(), - hash: "0x2bdfd1957e88297b012a1dc15a51f3691371980749378d10a6186b221d6687e5", - number_of_tx: 1, - }, - transactions: [ - { - index: 0, - hash: "0x29a3ad97041d01ed610cfab19a091239135ee6bef6d2d7513e94dbb26f8bb1f4", - from: "0x00a329c0648769A73afAc7F9381E08FB43dBEA72", - to: contractAddress, - eth_value: 0, - method_signature: "0xa1448194", - method_name: "", - token_transfers: [ - { - sender: firstAccount, - recipient: secondAccount, - value: 1, - }, - ], - }, - ], - }); - await dbClient.syncTokenBalanceERC721(18); - - const balanceAfterInsert = await dbClient.getTokenERC721(); - log.debug("balanceAfterInsert", balanceAfterInsert); - expect(balanceAfterInsert.length).toBe(1); - - // Assert only token owner and last_owner_change were updated - const updatedToken = balanceAfterInsert[0]; - expect(updatedToken).toMatchObject({ - account_address: secondAccount, // owner changed - token_address: contractAddress, - uri: issuedTokenUri, - token_id: "1", - }); - // timestamp updated - expect(new Date(updatedToken.last_owner_change).toDateString()).toEqual( - new Date(blockTimestamp).toDateString(), - ); - }); - - test("ERC721 token is not updated if if was updated after the transaction was committed (manual token sync)", async () => { - // Insert token metadata - const contractAddress = "0x42EA16C9B9e529dA492909F34f416fEd2bE7c280"; - const token = { - address: contractAddress, - name: "TestToken", - symbol: "TT", - }; - await dbClient.insertTokenMetadataERC721(token); - - // Initially there should be no issued tokens - const initialTokens = await dbClient.getTokenERC721(); - expect(initialTokens.length).toBe(0); - - // Insert already issued token - const issuedTokenUri = "my-test-token.uri"; - const firstAccount = "0x12b60219Ca56110E53F9E79178713C363e8aF999"; - await dbClient.upsertTokenERC721({ - account_address: firstAccount, - token_address: contractAddress, - uri: issuedTokenUri, - token_id: 1, - }); - - // Transfer our token - const blockTimestamp = Date.now() - 1000 * 60 * 60 * 24 * 365; // Year before now (e.g. we process old blocks) - const secondAccount = "0x4675C7e5BaAFBFFbca748158bEcBA61ef3b0a263"; - await dbClient.insertBlockData({ - block: { - number: 18, - created_at: new Date(blockTimestamp).toUTCString(), - hash: "0x2bdfd1957e88297b012a1dc15a51f3691371980749378d10a6186b221d6687e5", - number_of_tx: 1, - }, - transactions: [ - { - index: 0, - hash: "0x29a3ad97041d01ed610cfab19a091239135ee6bef6d2d7513e94dbb26f8bb1f4", - from: "0x00a329c0648769A73afAc7F9381E08FB43dBEA72", - to: contractAddress, - eth_value: 0, - method_signature: "0xa1448194", - method_name: "", - token_transfers: [ - { - sender: firstAccount, - recipient: secondAccount, - value: 1, - }, - ], - }, - ], - }); - await dbClient.syncTokenBalanceERC721(18); - - const balanceAfterInsert = await dbClient.getTokenERC721(); - log.debug("balanceAfterInsert", balanceAfterInsert); - expect(balanceAfterInsert.length).toBe(1); - - // Assert only token owner and last_owner_change were updated - const updatedToken = balanceAfterInsert[0]; - expect(updatedToken).toMatchObject({ - account_address: firstAccount, // owner not changed - token_address: contractAddress, - uri: issuedTokenUri, - token_id: "1", - }); - }); -}); diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/manual/common-setup-methods.ts b/packages/cactus-plugin-persistence-ethereum/src/test/typescript/manual/common-setup-methods.ts deleted file mode 100644 index 1eb2307f4d..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/manual/common-setup-methods.ts +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Common setup code for the persistence plugin with detailed comments on each step. - * Requires environment variable `SUPABASE_CONNECTION_STRING` to be set before running the script that includes this! - */ - -import process from "process"; -import { v4 as uuidV4 } from "uuid"; -import { - LoggerProvider, - Logger, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - EthereumApiClient, - PluginLedgerConnectorEthereum, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; - -import { PluginPersistenceEthereum } from "../../../main/typescript/plugin-persistence-ethereum"; - -////////////////////////////////// -// Constants -////////////////////////////////// - -const SUPABASE_CONNECTION_STRING = - process.env.SUPABASE_CONNECTION_STRING ?? - "postgresql://postgres:your-super-secret-and-long-postgres-password@127.0.0.1:5432/postgres"; - -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "common-setup-methods", - level: testLogLevel, -}); - -/** - * Common ApiServer instance, can be empty if setup was not called yet! - */ -let apiServer: ApiServer; - -////////////////////////////////// -// Methods -////////////////////////////////// - -/** - * Setup Cacti ApiServer instance containing Ethereum Connector plugin (for accessing the ethereum ledger) - * and Ethereum Persistence plugin (for storing data read from ledger to the database). - * - * @param port Port under which an ApiServer will be started. Can't be 0. - * @param rpcApiWsHost Ledger RPC WS URL - */ -export async function setupApiServer(port: number, rpcApiWsHost: string) { - // PluginLedgerConnectorEthereum requires a keychain plugin to operate correctly, ensuring secure data storage. - // For testing and debugging purposes, we use PluginKeychainMemory, which stores all secrets in memory (remember: this is not secure!). - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidV4(), - keychainId: uuidV4(), - backend: new Map([]), - logLevel: testLogLevel, - }); - - // We create ethereum connector instance. It will connect to the ledger through RPC endpoints rpcApiHttpHost and rpcApiWsHost. - const connector = new PluginLedgerConnectorEthereum({ - instanceId: uuidV4(), - rpcApiWsHost, - logLevel: sutLogLevel, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - await connector.onPluginInit(); - - // We need an `EthereumApiClient` to access `PluginLedgerConnectorEthereum` methods from our `PluginPersistenceEthereum`. - const apiConfig = new Configuration({ basePath: `http://127.0.0.1:${port}` }); - const apiClient = new EthereumApiClient(apiConfig); - - // We create persistence plugin, it will read data from ethereum ledger through `apiClient` we've just created, - // and push it to PostgreSQL database accessed by it's SUPABASE_CONNECTION_STRING (read from the environment variable) - const persistence = new PluginPersistenceEthereum({ - apiClient, - logLevel: sutLogLevel, - instanceId: uuidV4(), - connectionString: SUPABASE_CONNECTION_STRING, - }); - // Plugin initialization will check connection to the database and setup schema if needed. - await persistence.onPluginInit(); - - // The API Server is a common "container" service that manages our plugins (connector and persistence). - // We use a sample configuration with most security measures disabled for simplicity. - log.info("Create ApiServer..."); - const configService = new ConfigService(); - const cactusApiServerOptions = await configService.newExampleConfig(); - cactusApiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - cactusApiServerOptions.configFile = ""; - cactusApiServerOptions.apiCorsDomainCsv = "*"; - cactusApiServerOptions.apiTlsEnabled = false; - cactusApiServerOptions.apiPort = port; - cactusApiServerOptions.grpcPort = port + 1; - cactusApiServerOptions.crpcPort = port + 2; - const config = await configService.newExampleConfigConvict( - cactusApiServerOptions, - ); - - apiServer = new ApiServer({ - config: config.getProperties(), - pluginRegistry: new PluginRegistry({ plugins: [connector, persistence] }), - }); - - const apiServerStartOut = await apiServer.start(); - log.debug(`apiServerStartOut:`, apiServerStartOut); - // Our setup is operational now! - - return persistence; -} - -/** - * Cleanup all the resources allocated by our Api Server. - * Remember to call it before exiting! - */ -export async function cleanupApiServer() { - log.info("cleanupApiServer called."); - - if (apiServer) { - await apiServer.shutdown(); - } -} diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/manual/complete-sample-scenario.ts b/packages/cactus-plugin-persistence-ethereum/src/test/typescript/manual/complete-sample-scenario.ts deleted file mode 100644 index 5393d65e12..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/manual/complete-sample-scenario.ts +++ /dev/null @@ -1,241 +0,0 @@ -/** - * Complete example of setting up and using the persistence plugin. This script will: - * - Start the test Ethereum ledger. - * - Deploy an ERC721 contract and mint some tokens. - * - Begin monitoring ledger changes. The persistence plugin will detect the ERC721 tokens, - * as well as all blocks and transactions on the ledger. - * - * Each step is commented in detail to serve as a tutorial. - */ - -import { - LoggerProvider, - Logger, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - GethTestLedger, - WHALE_ACCOUNT_PRIVATE_KEY, -} from "@hyperledger/cactus-test-geth-ledger"; -import Web3, { ContractAbi, TransactionReceipt } from "web3"; -import { Web3Account } from "web3-eth-accounts"; -import TestERC721ContractJson from "../../solidity/TestERC721.json"; -import { cleanupApiServer, setupApiServer } from "./common-setup-methods"; - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel: LogLevelDesc = "info"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "complete-sample-scenario", - level: testLogLevel, -}); - -let ledger: GethTestLedger; -let web3: Web3; -let constTestAcc: Web3Account; -let defaultAccountAddress: string; -const constTestAccBalance = 2 * 10e18; - -// Geth environment -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -////////////////////////////////// -// Environment Setup -////////////////////////////////// - -/** - * Create and start the test ledger to be used by sample scenario. - * - * @returns `[rpcApiHttpHost, rpcApiWsHost]` - */ -async function setupTestLedger(): Promise { - log.info(`Start Ledger ${containerImageName}:${containerImageVersion}...`); - ledger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ledger.start(); - const rpcApiWsHost = await ledger.getRpcApiWebSocketHost(); - log.info(`Ledger started, WS RPC: ${rpcApiWsHost}`); - return rpcApiWsHost; -} - -/** - * Stop the test ledger containers (if created). - * Remember to run it before exiting! - */ -export async function cleanupTestLedger() { - if (ledger) { - log.info("Stop the ethereum ledger..."); - await ledger.stop(); - await ledger.destroy(); - } -} - -/** - * Called when exiting this script - */ -async function cleanupEnvironment() { - await cleanupApiServer(); - await cleanupTestLedger(); -} - -////////////////////////////////// -// Helper Methods -////////////////////////////////// - -/** - * Deploy ERC721 contract to the test leger. - */ -async function deploySmartContract( - abi: ContractAbi, - bytecode: string, - args?: unknown[], -): Promise> { - try { - const txReceipt = await ledger.deployContract(abi, "0x" + bytecode, args); - log.debug("deploySmartContract txReceipt:", txReceipt); - log.debug( - "Deployed test smart contract, TX on block number", - txReceipt.blockNumber, - ); - // Force response without optional fields - return txReceipt as Required; - } catch (error) { - log.error("deploySmartContract ERROR", error); - throw error; - } -} - -/** - * Mint ERC721 token given account. - * - * @param contractAddress ERC721 contract address - * @param targetAddress token recipient address - * @param tokenId token ID to mint - * - * @returns Response from mint operation. - */ -async function mintErc721Token( - contractAddress: string, - targetAddress: string, - tokenId: number, -): Promise { - try { - log.info( - `Mint ERC721 token ID ${tokenId} for address ${targetAddress} by ${defaultAccountAddress}`, - ); - - const tokenContract = new web3.eth.Contract( - TestERC721ContractJson.abi, - contractAddress, - ); - - const mintResponse = await (tokenContract.methods as any) - .safeMint(targetAddress, tokenId) - .send({ - from: defaultAccountAddress, - gas: 8000000, - }); - log.debug("mintErc721Token mintResponse:", mintResponse); - - return mintResponse; - } catch (error) { - log.error("mintErc721Token ERROR", error); - throw error; - } -} - -/** - * Deploy ERC721 contract and mint 3 tokens on it (all to constTestAcc) - * @returns Contract deployment transaction receipt. - */ -async function deployAndMintTokens() { - const erc721Bytecode = TestERC721ContractJson.data.bytecode.object; - const erc721ContractCreationReceipt = await deploySmartContract( - TestERC721ContractJson.abi, - erc721Bytecode, - ); - log.info( - "ERC721 deployed contract address:", - erc721ContractCreationReceipt.contractAddress, - ); - - await mintErc721Token( - erc721ContractCreationReceipt.contractAddress, - constTestAcc.address, - 1, - ); - await mintErc721Token( - erc721ContractCreationReceipt.contractAddress, - constTestAcc.address, - 2, - ); - await mintErc721Token( - erc721ContractCreationReceipt.contractAddress, - constTestAcc.address, - 3, - ); - - return erc721ContractCreationReceipt; -} - -////////////////////////////////// -// Main Logic -////////////////////////////////// - -async function main() { - // Start the test ethereum ledger which we'll monitor and run some sample operations. - const rpcApiWsHost = await setupTestLedger(); - - // Create test account - constTestAcc = await ledger.createEthTestAccount(constTestAccBalance); - - // Create Web3 provider that will be used by other methods. - web3 = new Web3(rpcApiWsHost); - const account = web3.eth.accounts.privateKeyToAccount( - "0x" + WHALE_ACCOUNT_PRIVATE_KEY, - ); - web3.eth.accounts.wallet.add(constTestAcc); - web3.eth.accounts.wallet.add(account); - defaultAccountAddress = account.address; - - // Set up the ApiServer with Ethereum Connector and Ethereum Persistence plugins. - // It returns the persistence plugin, which we can use to run monitoring operations. - const persistence = await setupApiServer(9530, rpcApiWsHost); - console.log("Environment is running..."); - - // Deploy an ERC721 contract to our test ledger and mint some tokens, - // so they can be later scraped by our persistence plugin. - const erc721ContractCreationReceipt = await deployAndMintTokens(); - - // Inform our persistence plugin about the deployed contract. - // From now on, the persistence plugin will monitor any token operations on this contract. - await persistence.addTokenERC721( - erc721ContractCreationReceipt.contractAddress, - ); - - // Start monitoring for ledger state changes. - // Any updates will be pushed to the database, and all errors will be printed to the console. - // Press Ctrl + C to stop. - persistence.startMonitor((err) => { - console.error("Persistence monitor error:", err); - }); -} - -process.once("uncaughtException", async () => { - await cleanupEnvironment(); - process.exit(); -}); - -process.once("SIGINT", () => { - console.log("SIGINT received..."); - throw new Error(); -}); - -main(); diff --git a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/manual/sample-setup.ts b/packages/cactus-plugin-persistence-ethereum/src/test/typescript/manual/sample-setup.ts deleted file mode 100644 index 8f3c2e588d..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/manual/sample-setup.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { cleanupApiServer, setupApiServer } from "./common-setup-methods"; - -const ETHEREUM_RPC_WS_HOST = - process.env.ETHEREUM_RPC_WS_HOST ?? "ws://127.0.0.1:8546"; - -async function main() { - // Set up the ApiServer with Ethereum Connector and Ethereum Persistence plugins. - // It returns the persistence plugin, which we can use to run monitoring operations. - const persistence = await setupApiServer(9781, ETHEREUM_RPC_WS_HOST); - console.log("Environment is running..."); - - // CUSTOM CODE GOES HERE !!!! - // Inform our persistence plugin about the deployed contract. - // From now on, the persistence plugin will monitor any token operations on this contract. - // await persistence.addTokenERC721("0x123"); - - // Start monitoring for ledger state changes. - // Any updates will be pushed to the database, and all errors will be printed to the console. - // Press Ctrl + C to stop. - persistence.startMonitor((err) => { - console.error("Persistence monitor error:", err); - }); -} - -process.once("uncaughtException", async () => { - await cleanupApiServer(); - process.exit(); -}); - -process.once("SIGINT", () => { - console.log("SIGINT received..."); - throw new Error(); -}); - -main(); diff --git a/packages/cactus-plugin-persistence-ethereum/tsconfig.json b/packages/cactus-plugin-persistence-ethereum/tsconfig.json deleted file mode 100644 index 788c8d9e99..0000000000 --- a/packages/cactus-plugin-persistence-ethereum/tsconfig.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib", - "declarationDir": "./dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-persistence-ethereum.tsbuildinfo" - }, - "include": ["./src", "./src/**/*.json", "./src/**/*.sql"], - "references": [ - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-ethereum/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-test-geth-ledger/tsconfig.json" - } - ] -} diff --git a/packages/cactus-plugin-persistence-fabric/CHANGELOG.md b/packages/cactus-plugin-persistence-fabric/CHANGELOG.md deleted file mode 100644 index 9086cab28d..0000000000 --- a/packages/cactus-plugin-persistence-fabric/CHANGELOG.md +++ /dev/null @@ -1,106 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-persistence-fabric - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-persistence-fabric - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-persistence-fabric - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -### Features - -* **persistence-fabric:** add sample setup scripts, improve documentation ([9fef336](https://github.com/hyperledger/cacti/commit/9fef336494911fa3673530f6945e97d3dd3ce934)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### Features - -* **fabric-connector:** add getChainInfo, improve getBlock output ([8c030ae](https://github.com/hyperledger/cacti/commit/8c030ae9e739a28ff0900f7af27ec0fbbb4b7ff9)) -* **persistence-fabric:** rewrite the plugin ([c867a9f](https://github.com/hyperledger/cacti/commit/c867a9f5ef084e4e6d7c6f5a641d1dd13f9ce233)), closes [#3298](https://github.com/hyperledger/cacti/issues/3298) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari -* **fabric-connector:** It accepts `type` instead of `skipDecode` flag. -- Move common block formatting logic to `cacti-block-formatters.ts`. -- Add tests for new features. Move test common to quering `qscc` to single file - to increase CI speed. - -Signed-off-by: Michal Bajer diff --git a/packages/cactus-plugin-persistence-fabric/Dockerfile b/packages/cactus-plugin-persistence-fabric/Dockerfile deleted file mode 100644 index 424a796e79..0000000000 --- a/packages/cactus-plugin-persistence-fabric/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM node:16 - -ENV PACKAGE_PATH=/opt/cactus-plugin-persistence-fabric - -WORKDIR ${PACKAGE_PATH} - -# CMake is required by one of npm dependencies (install other packages in this step as well in the future) -RUN apt-get update && apt-get install -y cmake && rm -rf /var/lib/apt/lists/* - -COPY ./dist/yarn.lock ./package.json ./ -RUN yarn install --production --ignore-engines --non-interactive --cache-folder ./.yarnCache && \ - rm -rf ./.yarnCache - -COPY ./dist ./dist diff --git a/packages/cactus-plugin-persistence-fabric/README.md b/packages/cactus-plugin-persistence-fabric/README.md deleted file mode 100644 index 98d65bfce9..0000000000 --- a/packages/cactus-plugin-persistence-fabric/README.md +++ /dev/null @@ -1,254 +0,0 @@ -# `@hyperledger/cactus-plugin-persistence-fabric` - -This plugin allows `Cacti` to persist Hyperledger Fabric data into some storage (currently to a `PostgreSQL` database, but this concept can be extended further). -Data in the database can later be analyzed and viewed in a GUI tool. - -## Summary - -- [Remarks](#remarks) -- [Getting Started](#getting-started) -- [Endpoints](#endpoints) -- [Running the tests](#running-the-tests) -- [Contributing](#contributing) -- [License](#license) -- [Acknowledgments](#acknowledgments) - -## Remarks - -- This plugin was only tested with small Fabric ledgers. Running it to archive and monitor large ledgers is not recommended yet. -- For now, the database schema is not considered public and can change over time (i.e., writing own application that reads data directly from the database is discouraged). -- Only `status` endpoint is available, all the methods must be called directly on the plugin instance for now. - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on your local machine for development and testing purposes. - -### Prerequisites - -#### Build - -In the root of the project, execute the command to install and build the dependencies. It will also build this persistence plugin: - -```sh -yarn run configure -``` - -#### Hyperledger Fabric Ledger and Connector - -This plugin requires a running Hyperledger Fabric ledger that you want to persist to a database. For testing purposes, you can use our [test fabric-all-in-one Docker image](../../tools/docker/fabric-all-in-one/README.md). To access the ledger you'll need your organization connection profile JSON and a wallet containing registered identity. If you are using our `fabric-all-in-one` image, you can run our [asset-transfer-basic-utils scripts](../../tools/docker/fabric-all-in-one/asset-transfer-basic-utils/README.md) to fetch Org1 connection profile from a docker and register new user to a localhost wallet. - -```shell -# Start the test ledger -docker compose -f tools/docker/fabric-all-in-one/docker-compose-v2.x.yml up -# Wait for it to start (status should become `healthy`) - -# Run asset-transfer-basic-utils scripts -cd tools/docker/fabric-all-in-one/asset-transfer-basic-utils -# Cleanup artifacts from previous runs -rm -fr wallet/ connection.json -# Fetch connection profile to `tools/docker/fabric-all-in-one/asset-transfer-basic-utils/connection.json` -# Enroll user using wallet under `tools/docker/fabric-all-in-one/asset-transfer-basic-utils/wallet` -npm install -CACTUS_FABRIC_ALL_IN_ONE_CONTAINER_NAME=fabric_all_in_one_testnet_2x ./setup.sh -``` - -Once you have an Fabric ledger ready, you need to start the [Ethereum Cacti Connector](../cactus-plugin-ledger-connector-fabric/README.md). We recommend running the connector on the same ApiServer instance as the persistence plugin for better performance and reduced network overhead. See the connector package README for more instructions, or check out the [setup sample scripts](./src/test/typescript/manual). - -#### Supabase Instance - -You need a running Supabase instance to serve as a database backend for this plugin. - -### Setup Tutorials - -We've created some sample scripts to help you get started quickly. All the steps have detailed comments on it so you can quickly understand the code. - -#### Sample Setup - -Location: [./src/test/typescript/manual/sample-setup.ts](./src/test/typescript/manual/sample-setup.ts) - -This sample script can be used to set up `ApiServer` with the Fabric connector and persistence plugins to monitor and store ledger data in a database. You need to have a ledger running before executing this script. - -To run the script you need to set the following environment variables: - -- `FABRIC_CONNECTION_PROFILE_PATH`: Full path to fabric ledger connection profile JSON file. -- `FABRIC_CHANNEL_NAME`: Name of the channel we want to connect to (to store it's data). -- `FABRIC_WALLET_PATH` : Full path to wallet containing our identity (that can connect and observe specified channel). -- `FABRIC_WALLET_LABEL`: Name (label) of our identity in a wallet provided in FABRIC_WALLET_PATH - -By default, the script will try to use our `supabase-all-in-one` instance running on localhost. This can be adjusted by setting PostgreSQL connection string in `SUPABASE_CONNECTION_STRING` environment variable (optional). - -```shell -# Example assumes fabric-all-in-one was used. Adjust the variables accordingly. -FABRIC_CONNECTION_PROFILE_PATH=/home/cactus/tools/docker/fabric-all-in-one/asset-transfer-basic-utils/connection.json FABRIC_CHANNEL_NAME=mychannel FABRIC_WALLET_PATH=/home/cactus/tools/docker/fabric-all-in-one/asset-transfer-basic-utils/wallet FABRIC_WALLET_LABEL=appUser -node ./dist/lib/test/typescript/manual/sample-setup.js -``` - -#### Complete Sample Scenario - -Location: [./src/test/typescript/manual/common-setup-methods](./src/test/typescript/manual/common-setup-methods) - -This script starts the test Hyperledger Fabric ledger for you and executes few transactions on a `basic` chaincode. Then, it synchronizes everything to a database and monitors for all new blocks. This script can also be used for manual, end-to-end tests of a plugin. - -By default, the script will try to use our `supabase-all-in-one` instance running on localhost. - -```shell -npm run complete-sample-scenario -``` - -Custom supabase can be set with environment variable `SUPABASE_CONNECTION_STRING`: - -```shell -SUPABASE_CONNECTION_STRING=postgresql://postgres:your-super-secret-and-long-postgres-password@127.0.0.1:5432/postgres npm run complete-sample-scenario -``` - -### Usage - -Instantiate a new `PluginPersistenceFabric` instance: - -```typescript -import { PluginPersistenceFabric } from "@hyperledger/cactus-plugin-persistence-fabric"; -import { v4 as uuidv4 } from "uuid"; - -const persistencePlugin = new PluginPersistenceFabric({ - apiClient: new FabricApiClient(apiConfigOptions), - logLevel: "info", - instanceId: "my-instance", - connectionString: "postgresql://postgres:your-super-secret-and-long-postgres-password@localhost:5432/postgres",, - channelName: "mychannel", - gatewayOptions: { - identity: signingCredential.keychainRef, - wallet: { - keychain: signingCredential, - }, - }, -}); - -// Initialize the connection to the DB -await persistencePlugin.onPluginInit(); -``` - -You can use the persistent plugin to synchronize ledger state with the database. Here is a sample script that starts monitoring for new blocks: - -```typescript -// Start monitoring new blocks. -// Entire ledger is synchronized first with the DB (`syncAll` is called) so this operation can take a while on large ledgers! -persistencePlugin.startMonitor((err) => { - reject(err); -}); - -// Show current status of the plugin -persistencePlugin.getStatus(); -``` - -> See [plugin integration tests](./src/test/typescript/integration) for complete usage examples. - -### Building/running the container image locally - -In the Cacti project root say: - -```sh -DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-persistence-fabric/ -f ./packages/cactus-plugin-persistence-fabric/Dockerfile -t cactus-plugin-persistence-fabric -``` - -## Endpoints - -### StatusV1 (`/api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status`) - -- Returns status of the plugin (latest block read, failed blocks, is monitor running, etc...) - -### Plugin Methods - -- Most of the plugin functionalities are currently not available through OpenAPI interface, please use direct method calls instead. - -#### `onPluginInit` - -- Should be called before using the plugin. - -#### `shutdown` - -- Close the connection to the DB, cleanup any allocated resources. - -#### `getStatus` - -- Get status report of this instance of persistence plugin. - -#### `startMonitor` - -- Start the block monitoring process. New blocks from the ledger will be parsed and pushed to the database. - -#### `stopMonitor` - -- Stop the block monitoring process. - -#### `syncFailedBlocks` - -- Walk through all the blocks that could not be synchronized with the DB for some reasons and try pushing them again. - -#### `syncAll` - -- Synchronize entire ledger state with the database. - -## Running the tests - -To run all the tests for this persistence plugin to ensure it's working correctly execute the following from the root of the `cactus` project: - -```sh -npx jest cactus-plugin-persistence-fabric -``` - -## Contributing - -We welcome contributions to Hyperledger Cacti in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -### Quick plugin project walkthrough - -#### `./src/main/json/openapi.json` - -- Contains OpenAPI definition. - -#### `./src/main/sql/schema.sql` - -- Database schema for Fabric data. - -#### `./src/main/typescript/web-services` - -- Folder that contains web service endpoint definitions. - -#### `./plugin-persistence-fabric` - -- Main persistent plugin logic file - -#### `./src/test/typescript/integration/` - -- Integration test of various plugin functionalities. - -### Generating types from the database schema - -- Current setup assume use of Supabase that has utility for generating types from the database schema. -- We use this tool to generate type definitions and store them in `./src/main/typescript/db-client/database.types.ts` -- Upstream instructions: https://supabase.com/docs/guides/api/generating-types -- Step by step manual on updating the types (must be done after changing the database schema): - - Install `supabase` package - - Init and start development supabase server: - - `npx supabase init` - - `npx supabase start` - - Fill in current schema: - - `psql -h localhost -p 54322 -U postgres -d postgres -a -f src/main/sql/schema.sql` (password: `postgres`) - - Generate the file with type definitions: - - `npx supabase gen types typescript --schema public --local > src/main/typescript/db-client/database.types.ts` - - Cleanup: - - `npx supabase stop` - - `rm -rf ./supabase` - -#### Insert sample data - -- Can be used to test GUI applications without running entire ledger / persistence setup. -- `psql -h localhost -p 54322 -U postgres -d postgres -a -f src/test/sql/insert-test-data.sql` (password: `postgres`) - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments diff --git a/packages/cactus-plugin-persistence-fabric/openapitools.json b/packages/cactus-plugin-persistence-fabric/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-persistence-fabric/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-persistence-fabric/package.json b/packages/cactus-plugin-persistence-fabric/package.json deleted file mode 100644 index 4482a0e6ce..0000000000 --- a/packages/cactus-plugin-persistence-fabric/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-persistence-fabric", - "version": "2.0.0", - "description": "Persistence plugin for Fabric ledgers to store data into a database.", - "keywords": [ - "Hyperledger", - "Cacti", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - }, - { - "name": "Tomasz Awramski", - "email": "tomasz.awramski@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "build": "npm run build-ts && npm run build:dev:backend:postbuild", - "build-ts": "tsc", - "build:dev:backend:postbuild": "npm run copy-sql && npm run copy-yarn-lock", - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "complete-sample-scenario": "npm run build && node ./dist/lib/test/typescript/manual/complete-sample-scenario.js", - "copy-sql": "mkdir -p ./dist/lib/main/ && cp -Rfp ./src/main/sql ./dist/lib/main/", - "copy-yarn-lock": "mkdir -p ./dist/lib/ && cp -rfp ../../yarn.lock ./dist/yarn.lock", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typecript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "sample-setup": "npm run build && node ./dist/lib/test/typescript/manual/sample-setup.js", - "watch": "npm-watch" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "async-mutex": "0.4.0", - "axios": "1.7.7", - "pg": "8.8.0", - "run-time-error-cjs": "1.4.0", - "uuid": "10.0.0" - }, - "devDependencies": { - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@openapitools/openapi-generator-cli": "2.7.0", - "@types/express": "5.0.0", - "@types/pg": "8.6.5", - "body-parser": "1.20.3", - "express": "4.21.0", - "fabric-network": "2.5.0-snapshot.23", - "jest-extended": "4.0.1", - "rxjs": "7.8.1", - "socket.io": "4.6.2" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "watch": {} -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 9bb625d942..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,13 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_error_exception_response_v1.go -model_status_response_v1.go -model_tracked_operation_v1.go -response.go -utils.go diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 2948d62b2d..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,114 +0,0 @@ -# Go API client for cactus-plugin-persistence-fabric - -Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-persistence-fabric "github.com/hyperledger/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-persistence-fabric.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-persistence-fabric.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-persistence-fabric.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-persistence-fabric.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**GetStatusV1**](docs/DefaultApi.md#getstatusv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status | Get the status of persistence plugin for fabric - - -## Documentation For Models - - - [ErrorExceptionResponseV1](docs/ErrorExceptionResponseV1.md) - - [StatusResponseV1](docs/StatusResponseV1.md) - - [TrackedOperationV1](docs/TrackedOperationV1.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index d189229fb3..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,113 +0,0 @@ -openapi: 3.0.3 -info: - description: Synchronizes state of an fabric ledger into a DB that can later be - viewed in GUI - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - Persistence Fabric - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status: - get: - operationId: getStatusV1 - parameters: [] - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/StatusResponseV1' - description: OK - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorExceptionResponseV1' - description: Internal Server Error - summary: Get the status of persistence plugin for fabric - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status -components: - schemas: - TrackedOperationV1: - description: Persistence plugin operation that is tracked and returned in status - report. - example: - operation: operation - startAt: startAt - properties: - startAt: - description: Start time of the operation. - nullable: false - type: string - operation: - description: Operation name. - nullable: false - type: string - required: - - operation - - startAt - type: object - StatusResponseV1: - description: Response with plugin status report. - example: - connected: true - instanceId: instanceId - lastSeenBlock: 0.8008281904610115 - monitorRunning: true - webServicesRegistered: true - operationsRunning: - - operation: operation - startAt: startAt - - operation: operation - startAt: startAt - properties: - instanceId: - description: Plugin instance id. - nullable: false - type: string - connected: - description: "True if successfully connected to the database, false otherwise." - nullable: false - type: boolean - webServicesRegistered: - description: True if web services were correctly exported. - nullable: false - type: boolean - operationsRunning: - items: - $ref: '#/components/schemas/TrackedOperationV1' - type: array - monitorRunning: - description: "True if block monitoring is running, false otherwise." - nullable: false - type: boolean - lastSeenBlock: - description: Number of the last block seen by the block monitor. - nullable: false - type: number - required: - - connected - - instanceId - - lastSeenBlock - - monitorRunning - - operationsRunning - - webServicesRegistered - type: object - ErrorExceptionResponseV1: - properties: - message: - nullable: false - type: string - error: - nullable: false - type: string - required: - - error - - message - type: object diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 669cc86e74..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,130 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Fabric - -Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-fabric - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiGetStatusV1Request struct { - ctx context.Context - ApiService *DefaultApiService -} - -func (r ApiGetStatusV1Request) Execute() (*StatusResponseV1, *http.Response, error) { - return r.ApiService.GetStatusV1Execute(r) -} - -/* -GetStatusV1 Get the status of persistence plugin for fabric - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetStatusV1Request -*/ -func (a *DefaultApiService) GetStatusV1(ctx context.Context) ApiGetStatusV1Request { - return ApiGetStatusV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return StatusResponseV1 -func (a *DefaultApiService) GetStatusV1Execute(r ApiGetStatusV1Request) (*StatusResponseV1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *StatusResponseV1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetStatusV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"text/plain", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v ErrorExceptionResponseV1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index c3485ebd6f..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Fabric - -Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-fabric - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Persistence Fabric API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index 035095c4b7..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Fabric - -Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-fabric - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index f02f97435b..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go deleted file mode 100644 index d3a0e47d39..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/model_error_exception_response_v1.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Fabric - -Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-fabric - -import ( - "encoding/json" -) - -// checks if the ErrorExceptionResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorExceptionResponseV1{} - -// ErrorExceptionResponseV1 struct for ErrorExceptionResponseV1 -type ErrorExceptionResponseV1 struct { - Message string `json:"message"` - Error string `json:"error"` -} - -// NewErrorExceptionResponseV1 instantiates a new ErrorExceptionResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorExceptionResponseV1(message string, error_ string) *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - this.Message = message - this.Error = error_ - return &this -} - -// NewErrorExceptionResponseV1WithDefaults instantiates a new ErrorExceptionResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorExceptionResponseV1WithDefaults() *ErrorExceptionResponseV1 { - this := ErrorExceptionResponseV1{} - return &this -} - -// GetMessage returns the Message field value -func (o *ErrorExceptionResponseV1) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ErrorExceptionResponseV1) SetMessage(v string) { - o.Message = v -} - -// GetError returns the Error field value -func (o *ErrorExceptionResponseV1) GetError() string { - if o == nil { - var ret string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorExceptionResponseV1) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ErrorExceptionResponseV1) SetError(v string) { - o.Error = v -} - -func (o ErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorExceptionResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - toSerialize["error"] = o.Error - return toSerialize, nil -} - -type NullableErrorExceptionResponseV1 struct { - value *ErrorExceptionResponseV1 - isSet bool -} - -func (v NullableErrorExceptionResponseV1) Get() *ErrorExceptionResponseV1 { - return v.value -} - -func (v *NullableErrorExceptionResponseV1) Set(val *ErrorExceptionResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableErrorExceptionResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorExceptionResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorExceptionResponseV1(val *ErrorExceptionResponseV1) *NullableErrorExceptionResponseV1 { - return &NullableErrorExceptionResponseV1{value: val, isSet: true} -} - -func (v NullableErrorExceptionResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorExceptionResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/model_status_response_v1.go b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/model_status_response_v1.go deleted file mode 100644 index 41b1569200..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/model_status_response_v1.go +++ /dev/null @@ -1,257 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Fabric - -Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-fabric - -import ( - "encoding/json" -) - -// checks if the StatusResponseV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StatusResponseV1{} - -// StatusResponseV1 Response with plugin status report. -type StatusResponseV1 struct { - // Plugin instance id. - InstanceId string `json:"instanceId"` - // True if successfully connected to the database, false otherwise. - Connected bool `json:"connected"` - // True if web services were correctly exported. - WebServicesRegistered bool `json:"webServicesRegistered"` - OperationsRunning []TrackedOperationV1 `json:"operationsRunning"` - // True if block monitoring is running, false otherwise. - MonitorRunning bool `json:"monitorRunning"` - // Number of the last block seen by the block monitor. - LastSeenBlock float32 `json:"lastSeenBlock"` -} - -// NewStatusResponseV1 instantiates a new StatusResponseV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStatusResponseV1(instanceId string, connected bool, webServicesRegistered bool, operationsRunning []TrackedOperationV1, monitorRunning bool, lastSeenBlock float32) *StatusResponseV1 { - this := StatusResponseV1{} - this.InstanceId = instanceId - this.Connected = connected - this.WebServicesRegistered = webServicesRegistered - this.OperationsRunning = operationsRunning - this.MonitorRunning = monitorRunning - this.LastSeenBlock = lastSeenBlock - return &this -} - -// NewStatusResponseV1WithDefaults instantiates a new StatusResponseV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStatusResponseV1WithDefaults() *StatusResponseV1 { - this := StatusResponseV1{} - return &this -} - -// GetInstanceId returns the InstanceId field value -func (o *StatusResponseV1) GetInstanceId() string { - if o == nil { - var ret string - return ret - } - - return o.InstanceId -} - -// GetInstanceIdOk returns a tuple with the InstanceId field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.InstanceId, true -} - -// SetInstanceId sets field value -func (o *StatusResponseV1) SetInstanceId(v string) { - o.InstanceId = v -} - -// GetConnected returns the Connected field value -func (o *StatusResponseV1) GetConnected() bool { - if o == nil { - var ret bool - return ret - } - - return o.Connected -} - -// GetConnectedOk returns a tuple with the Connected field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetConnectedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Connected, true -} - -// SetConnected sets field value -func (o *StatusResponseV1) SetConnected(v bool) { - o.Connected = v -} - -// GetWebServicesRegistered returns the WebServicesRegistered field value -func (o *StatusResponseV1) GetWebServicesRegistered() bool { - if o == nil { - var ret bool - return ret - } - - return o.WebServicesRegistered -} - -// GetWebServicesRegisteredOk returns a tuple with the WebServicesRegistered field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetWebServicesRegisteredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.WebServicesRegistered, true -} - -// SetWebServicesRegistered sets field value -func (o *StatusResponseV1) SetWebServicesRegistered(v bool) { - o.WebServicesRegistered = v -} - -// GetOperationsRunning returns the OperationsRunning field value -func (o *StatusResponseV1) GetOperationsRunning() []TrackedOperationV1 { - if o == nil { - var ret []TrackedOperationV1 - return ret - } - - return o.OperationsRunning -} - -// GetOperationsRunningOk returns a tuple with the OperationsRunning field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetOperationsRunningOk() ([]TrackedOperationV1, bool) { - if o == nil { - return nil, false - } - return o.OperationsRunning, true -} - -// SetOperationsRunning sets field value -func (o *StatusResponseV1) SetOperationsRunning(v []TrackedOperationV1) { - o.OperationsRunning = v -} - -// GetMonitorRunning returns the MonitorRunning field value -func (o *StatusResponseV1) GetMonitorRunning() bool { - if o == nil { - var ret bool - return ret - } - - return o.MonitorRunning -} - -// GetMonitorRunningOk returns a tuple with the MonitorRunning field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetMonitorRunningOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.MonitorRunning, true -} - -// SetMonitorRunning sets field value -func (o *StatusResponseV1) SetMonitorRunning(v bool) { - o.MonitorRunning = v -} - -// GetLastSeenBlock returns the LastSeenBlock field value -func (o *StatusResponseV1) GetLastSeenBlock() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.LastSeenBlock -} - -// GetLastSeenBlockOk returns a tuple with the LastSeenBlock field value -// and a boolean to check if the value has been set. -func (o *StatusResponseV1) GetLastSeenBlockOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.LastSeenBlock, true -} - -// SetLastSeenBlock sets field value -func (o *StatusResponseV1) SetLastSeenBlock(v float32) { - o.LastSeenBlock = v -} - -func (o StatusResponseV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StatusResponseV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["instanceId"] = o.InstanceId - toSerialize["connected"] = o.Connected - toSerialize["webServicesRegistered"] = o.WebServicesRegistered - toSerialize["operationsRunning"] = o.OperationsRunning - toSerialize["monitorRunning"] = o.MonitorRunning - toSerialize["lastSeenBlock"] = o.LastSeenBlock - return toSerialize, nil -} - -type NullableStatusResponseV1 struct { - value *StatusResponseV1 - isSet bool -} - -func (v NullableStatusResponseV1) Get() *StatusResponseV1 { - return v.value -} - -func (v *NullableStatusResponseV1) Set(val *StatusResponseV1) { - v.value = val - v.isSet = true -} - -func (v NullableStatusResponseV1) IsSet() bool { - return v.isSet -} - -func (v *NullableStatusResponseV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStatusResponseV1(val *StatusResponseV1) *NullableStatusResponseV1 { - return &NullableStatusResponseV1{value: val, isSet: true} -} - -func (v NullableStatusResponseV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStatusResponseV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/model_tracked_operation_v1.go b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/model_tracked_operation_v1.go deleted file mode 100644 index dbec934be8..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/model_tracked_operation_v1.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Fabric - -Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-fabric - -import ( - "encoding/json" -) - -// checks if the TrackedOperationV1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TrackedOperationV1{} - -// TrackedOperationV1 Persistence plugin operation that is tracked and returned in status report. -type TrackedOperationV1 struct { - // Start time of the operation. - StartAt string `json:"startAt"` - // Operation name. - Operation string `json:"operation"` -} - -// NewTrackedOperationV1 instantiates a new TrackedOperationV1 object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTrackedOperationV1(startAt string, operation string) *TrackedOperationV1 { - this := TrackedOperationV1{} - this.StartAt = startAt - this.Operation = operation - return &this -} - -// NewTrackedOperationV1WithDefaults instantiates a new TrackedOperationV1 object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTrackedOperationV1WithDefaults() *TrackedOperationV1 { - this := TrackedOperationV1{} - return &this -} - -// GetStartAt returns the StartAt field value -func (o *TrackedOperationV1) GetStartAt() string { - if o == nil { - var ret string - return ret - } - - return o.StartAt -} - -// GetStartAtOk returns a tuple with the StartAt field value -// and a boolean to check if the value has been set. -func (o *TrackedOperationV1) GetStartAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StartAt, true -} - -// SetStartAt sets field value -func (o *TrackedOperationV1) SetStartAt(v string) { - o.StartAt = v -} - -// GetOperation returns the Operation field value -func (o *TrackedOperationV1) GetOperation() string { - if o == nil { - var ret string - return ret - } - - return o.Operation -} - -// GetOperationOk returns a tuple with the Operation field value -// and a boolean to check if the value has been set. -func (o *TrackedOperationV1) GetOperationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Operation, true -} - -// SetOperation sets field value -func (o *TrackedOperationV1) SetOperation(v string) { - o.Operation = v -} - -func (o TrackedOperationV1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TrackedOperationV1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["startAt"] = o.StartAt - toSerialize["operation"] = o.Operation - return toSerialize, nil -} - -type NullableTrackedOperationV1 struct { - value *TrackedOperationV1 - isSet bool -} - -func (v NullableTrackedOperationV1) Get() *TrackedOperationV1 { - return v.value -} - -func (v *NullableTrackedOperationV1) Set(val *TrackedOperationV1) { - v.value = val - v.isSet = true -} - -func (v NullableTrackedOperationV1) IsSet() bool { - return v.isSet -} - -func (v *NullableTrackedOperationV1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTrackedOperationV1(val *TrackedOperationV1) *NullableTrackedOperationV1 { - return &NullableTrackedOperationV1{value: val, isSet: true} -} - -func (v NullableTrackedOperationV1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTrackedOperationV1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index b29ebed98c..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Fabric - -Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-fabric - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index ce268821bf..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Fabric - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-persistence-fabric - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-persistence-fabric_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService GetStatusV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.GetStatusV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index cd4ed96520..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Persistence Fabric - -Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-persistence-fabric - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/json/openapi.json b/packages/cactus-plugin-persistence-fabric/src/main/json/openapi.json deleted file mode 100644 index 5b996f0b3a..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/json/openapi.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Persistence Fabric", - "description": "Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "TrackedOperationV1": { - "description": "Persistence plugin operation that is tracked and returned in status report.", - "type": "object", - "required": ["startAt", "operation"], - "properties": { - "startAt": { - "type": "string", - "nullable": false, - "description": "Start time of the operation." - }, - "operation": { - "type": "string", - "nullable": false, - "description": "Operation name." - } - } - }, - "StatusResponseV1": { - "description": "Response with plugin status report.", - "type": "object", - "required": [ - "instanceId", - "connected", - "webServicesRegistered", - "operationsRunning", - "monitorRunning", - "lastSeenBlock" - ], - "properties": { - "instanceId": { - "type": "string", - "nullable": false, - "description": "Plugin instance id." - }, - "connected": { - "type": "boolean", - "nullable": false, - "description": "True if successfully connected to the database, false otherwise." - }, - "webServicesRegistered": { - "type": "boolean", - "nullable": false, - "description": "True if web services were correctly exported." - }, - "operationsRunning": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TrackedOperationV1" - } - }, - "monitorRunning": { - "type": "boolean", - "nullable": false, - "description": "True if block monitoring is running, false otherwise." - }, - "lastSeenBlock": { - "type": "number", - "nullable": false, - "description": "Number of the last block seen by the block monitor." - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status" - } - }, - "operationId": "getStatusV1", - "summary": "Get the status of persistence plugin for fabric", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/StatusResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/json/openapi.tpl.json b/packages/cactus-plugin-persistence-fabric/src/main/json/openapi.tpl.json deleted file mode 100644 index 5b996f0b3a..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Persistence Fabric", - "description": "Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "TrackedOperationV1": { - "description": "Persistence plugin operation that is tracked and returned in status report.", - "type": "object", - "required": ["startAt", "operation"], - "properties": { - "startAt": { - "type": "string", - "nullable": false, - "description": "Start time of the operation." - }, - "operation": { - "type": "string", - "nullable": false, - "description": "Operation name." - } - } - }, - "StatusResponseV1": { - "description": "Response with plugin status report.", - "type": "object", - "required": [ - "instanceId", - "connected", - "webServicesRegistered", - "operationsRunning", - "monitorRunning", - "lastSeenBlock" - ], - "properties": { - "instanceId": { - "type": "string", - "nullable": false, - "description": "Plugin instance id." - }, - "connected": { - "type": "boolean", - "nullable": false, - "description": "True if successfully connected to the database, false otherwise." - }, - "webServicesRegistered": { - "type": "boolean", - "nullable": false, - "description": "True if web services were correctly exported." - }, - "operationsRunning": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TrackedOperationV1" - } - }, - "monitorRunning": { - "type": "boolean", - "nullable": false, - "description": "True if block monitoring is running, false otherwise." - }, - "lastSeenBlock": { - "type": "number", - "nullable": false, - "description": "Number of the last block seen by the block monitor." - } - } - }, - "ErrorExceptionResponseV1": { - "type": "object", - "required": ["message", "error"], - "properties": { - "message": { - "type": "string", - "nullable": false - }, - "error": { - "type": "string", - "nullable": false - } - } - } - } - }, - "paths": { - "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status" - } - }, - "operationId": "getStatusV1", - "summary": "Get the status of persistence plugin for fabric", - "parameters": [], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/StatusResponseV1" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorExceptionResponseV1" - } - } - } - } - } - } - } - } -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/sql/schema.sql b/packages/cactus-plugin-persistence-fabric/src/main/sql/schema.sql deleted file mode 100644 index 56930d05aa..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/sql/schema.sql +++ /dev/null @@ -1,233 +0,0 @@ ---- Clean start: ---- DROP SCHEMA fabric CASCADE; - -CREATE SCHEMA fabric; - -ALTER SCHEMA fabric OWNER TO postgres; - --- Table: public.plugin_status - --- DROP TABLE IF EXISTS public.plugin_status; - -CREATE TABLE IF NOT EXISTS public.plugin_status -( - name text COLLATE pg_catalog."default" NOT NULL, - last_instance_id text COLLATE pg_catalog."default" NOT NULL, - is_schema_initialized boolean NOT NULL, - created_at timestamp with time zone NOT NULL DEFAULT now(), - last_connected_at timestamp with time zone NOT NULL DEFAULT now(), - CONSTRAINT plugin_status_pkey PRIMARY KEY (name), - CONSTRAINT plugin_status_name_key UNIQUE (name) -) - -TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.plugin_status - OWNER to postgres; - -GRANT ALL ON TABLE public.plugin_status TO anon; -GRANT ALL ON TABLE public.plugin_status TO authenticated; -GRANT ALL ON TABLE public.plugin_status TO postgres; -GRANT ALL ON TABLE public.plugin_status TO service_role; - --- --- Name: block; Type: TABLE; Schema: fabric; Owner: postgres --- - -CREATE TABLE fabric.block ( - id uuid DEFAULT gen_random_uuid() NOT NULL, - number numeric NOT NULL, - hash text NOT NULL, - transaction_count numeric DEFAULT '0'::numeric NOT NULL -); - - -ALTER TABLE fabric.block OWNER TO postgres; - -ALTER TABLE ONLY fabric.block - ADD CONSTRAINT block_pkey PRIMARY KEY (id); -ALTER TABLE ONLY fabric.block - ADD CONSTRAINT block_hash_key UNIQUE (hash); -ALTER TABLE ONLY fabric.block - ADD CONSTRAINT block_number_key UNIQUE (number); - -CREATE UNIQUE INDEX block_hash_unique_idx ON fabric.block USING btree (hash); -CREATE UNIQUE INDEX block_number_unique_idx ON fabric.block USING btree (number); - --- --- Name: certificate; Type: TABLE; Schema: fabric; Owner: postgres --- - -CREATE TABLE fabric.certificate ( - id uuid DEFAULT extensions.uuid_generate_v4() NOT NULL, - serial_number text NOT NULL, - subject_common_name text DEFAULT ''::text, - subject_org_unit text DEFAULT ''::text, - subject_org text DEFAULT ''::text, - subject_locality text DEFAULT ''::text, - subject_state text DEFAULT ''::text, - subject_country text DEFAULT ''::text, - issuer_common_name text DEFAULT ''::text, - issuer_org_unit text DEFAULT ''::text, - issuer_org text DEFAULT ''::text, - issuer_locality text DEFAULT ''::text, - issuer_state text DEFAULT ''::text, - issuer_country text DEFAULT ''::text, - subject_alt_name text NOT NULL, - valid_from timestamp with time zone NOT NULL, - valid_to timestamp with time zone NOT NULL, - pem text NOT NULL -); - - -ALTER TABLE fabric.certificate OWNER TO postgres; - -ALTER TABLE ONLY fabric.certificate - ADD CONSTRAINT certifiate_pk PRIMARY KEY (id); -ALTER TABLE ONLY fabric.certificate - ADD CONSTRAINT certifiate_pem_unique UNIQUE (pem); -ALTER TABLE ONLY fabric.certificate - ADD CONSTRAINT certifiate_serial_number_unique UNIQUE (serial_number); - -CREATE UNIQUE INDEX certifiate_serial_number_unique_idx ON fabric.certificate USING btree (serial_number); - --- --- Name: transaction; Type: TABLE; Schema: fabric; Owner: postgres --- - -CREATE TABLE fabric.transaction ( - id uuid DEFAULT gen_random_uuid() NOT NULL, - hash text NOT NULL, - channel_id text NOT NULL, - "timestamp" timestamp with time zone NOT NULL, - protocol_version smallint DEFAULT '0'::smallint NOT NULL, - type text NOT NULL, - epoch bigint NOT NULL, - block_id uuid, - block_number numeric -); - - -ALTER TABLE fabric.transaction OWNER TO postgres; - -ALTER TABLE ONLY fabric.transaction - ADD CONSTRAINT transaction_pkey PRIMARY KEY (id); - -CREATE INDEX transaction_hash_idx ON fabric.transaction (hash); --- --- Name: transaction_action; Type: TABLE; Schema: fabric; Owner: postgres --- - -CREATE TABLE fabric.transaction_action ( - id uuid DEFAULT gen_random_uuid() NOT NULL, - function_name text DEFAULT ''::text, - function_args text DEFAULT ''::text, - chaincode_id text NOT NULL, - creator_msp_id text NOT NULL, - creator_certificate_id uuid, - transaction_id uuid -); - - -ALTER TABLE fabric.transaction_action OWNER TO postgres; - -ALTER TABLE ONLY fabric.transaction_action - ADD CONSTRAINT transaction_action_pkey PRIMARY KEY (id); - --- --- Name: transaction_action_endorsement; Type: TABLE; Schema: fabric; Owner: postgres --- - -CREATE TABLE fabric.transaction_action_endorsement ( - id uuid DEFAULT gen_random_uuid() NOT NULL, - mspid text NOT NULL, - signature text NOT NULL, - certificate_id uuid NOT NULL, - transaction_action_id uuid -); - - -ALTER TABLE fabric.transaction_action_endorsement OWNER TO postgres; - -ALTER TABLE ONLY fabric.transaction_action_endorsement - ADD CONSTRAINT transaction_action_endorsements_pkey PRIMARY KEY (id); - --- FUNCTION: fabric.get_missing_blocks_in_range(integer, integer) - --- DROP FUNCTION IF EXISTS fabric.get_missing_blocks_in_range(integer, integer); - -CREATE OR REPLACE FUNCTION fabric.get_missing_blocks_in_range( - start_number integer, - end_number integer) -RETURNS TABLE(block_number integer) -LANGUAGE 'plpgsql' -COST 100 -VOLATILE PARALLEL UNSAFE -ROWS 1000 -AS $BODY$ -BEGIN - RETURN query - SELECT series AS block_number - FROM generate_series(start_number, end_number, 1) series - LEFT JOIN fabric.block ON series = block.number - WHERE block.number IS NULL; -END; -$BODY$; - -ALTER FUNCTION fabric.get_missing_blocks_in_range(integer, integer) - OWNER TO postgres; - --- --- Name: transaction_action transaction_action_creator_certificate_id_fkey; Type: FK CONSTRAINT; Schema: fabric; Owner: postgres --- - -ALTER TABLE ONLY fabric.transaction_action - ADD CONSTRAINT transaction_action_creator_certificate_id_fkey FOREIGN KEY (creator_certificate_id) REFERENCES fabric.certificate(id); - - --- --- Name: transaction_action_endorsement transaction_action_endorsement_transaction_action_id_fkey; Type: FK CONSTRAINT; Schema: fabric; Owner: postgres --- - -ALTER TABLE ONLY fabric.transaction_action_endorsement - ADD CONSTRAINT transaction_action_endorsement_transaction_action_id_fkey FOREIGN KEY (transaction_action_id) REFERENCES fabric.transaction_action(id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: transaction_action_endorsement transaction_action_endorsements_certificate_id_fkey; Type: FK CONSTRAINT; Schema: fabric; Owner: postgres --- - -ALTER TABLE ONLY fabric.transaction_action_endorsement - ADD CONSTRAINT transaction_action_endorsements_certificate_id_fkey FOREIGN KEY (certificate_id) REFERENCES fabric.certificate(id); - - --- --- Name: transaction_action transaction_action_transaction_id_fkey; Type: FK CONSTRAINT; Schema: fabric; Owner: postgres --- - -ALTER TABLE ONLY fabric.transaction_action - ADD CONSTRAINT transaction_action_transaction_id_fkey FOREIGN KEY (transaction_id) REFERENCES fabric.transaction(id); - - --- --- Name: transaction transaction_block_id_fkey; Type: FK CONSTRAINT; Schema: fabric; Owner: postgres --- - -ALTER TABLE ONLY fabric.transaction - ADD CONSTRAINT transaction_block_id_fkey FOREIGN KEY (block_id) REFERENCES fabric.block(id); - - --- --- Name: transaction transaction_block_number_fkey; Type: FK CONSTRAINT; Schema: fabric; Owner: postgres --- - -ALTER TABLE ONLY fabric.transaction - ADD CONSTRAINT transaction_block_number_fkey FOREIGN KEY (block_number) REFERENCES fabric.block(number); - -GRANT USAGE ON SCHEMA fabric TO anon, authenticated, service_role; -GRANT ALL ON ALL TABLES IN SCHEMA fabric TO anon, authenticated, service_role; -GRANT ALL ON ALL ROUTINES IN SCHEMA fabric TO anon, authenticated, service_role; -GRANT ALL ON ALL SEQUENCES IN SCHEMA fabric TO anon, authenticated, service_role; -ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA fabric GRANT ALL ON TABLES TO anon, authenticated, service_role; -ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA fabric GRANT ALL ON ROUTINES TO anon, authenticated, service_role; -ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA fabric GRANT ALL ON SEQUENCES TO anon, authenticated, service_role; diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/db-client/database.types.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/db-client/database.types.ts deleted file mode 100644 index 4e2e152f7d..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/db-client/database.types.ts +++ /dev/null @@ -1,324 +0,0 @@ -export type Json = - | string - | number - | boolean - | null - | { [key: string]: Json | undefined } - | Json[]; - -export type Database = { - public: { - Tables: { - plugin_status: { - Row: { - name: string; - last_instance_id: string; - is_schema_initialized: boolean; - created_at: string; - last_connected_at: string; - }; - Insert: { - name: string; - last_instance_id: string; - is_schema_initialized: boolean; - created_at?: string; - last_connected_at?: string; - }; - Update: { - name?: string; - last_instance_id?: string; - is_schema_initialized?: boolean; - created_at?: string; - last_connected_at?: string; - }; - }; - }; - }; - fabric: { - Tables: { - block: { - Row: { - hash: string; - id: string; - number: string; - transaction_count: number; - }; - Insert: { - hash: string; - id?: string; - number: number; - transaction_count?: number; - }; - Update: { - hash?: string; - id?: string; - number?: number; - transaction_count?: number; - }; - Relationships: []; - }; - certificate: { - Row: { - id: string; - issuer_common_name: string | null; - issuer_country: string | null; - issuer_locality: string | null; - issuer_org: string | null; - issuer_org_unit: string | null; - issuer_state: string | null; - pem: string; - serial_number: string; - subject_alt_name: string; - subject_common_name: string | null; - subject_country: string | null; - subject_locality: string | null; - subject_org: string | null; - subject_org_unit: string | null; - subject_state: string | null; - valid_from: string; - valid_to: string; - }; - Insert: { - id?: string; - issuer_common_name?: string | null; - issuer_country?: string | null; - issuer_locality?: string | null; - issuer_org?: string | null; - issuer_org_unit?: string | null; - issuer_state?: string | null; - pem: string; - serial_number: string; - subject_alt_name: string; - subject_common_name?: string | null; - subject_country?: string | null; - subject_locality?: string | null; - subject_org?: string | null; - subject_org_unit?: string | null; - subject_state?: string | null; - valid_from: string; - valid_to: string; - }; - Update: { - id?: string; - issuer_common_name?: string | null; - issuer_country?: string | null; - issuer_locality?: string | null; - issuer_org?: string | null; - issuer_org_unit?: string | null; - issuer_state?: string | null; - pem?: string; - serial_number?: string; - subject_alt_name?: string; - subject_common_name?: string | null; - subject_country?: string | null; - subject_locality?: string | null; - subject_org?: string | null; - subject_org_unit?: string | null; - subject_state?: string | null; - valid_from?: string; - valid_to?: string; - }; - Relationships: []; - }; - transaction: { - Row: { - block_id: string | null; - block_number: number | null; - channel_id: string; - epoch: number; - hash: string; - id: string; - protocol_version: number; - timestamp: string; - type: string; - }; - Insert: { - block_id?: string | null; - block_number?: number | null; - channel_id: string; - epoch: number; - hash: string; - id?: string; - protocol_version?: number; - timestamp: string; - type: string; - }; - Update: { - block_id?: string | null; - block_number?: number | null; - channel_id?: string; - epoch?: number; - hash?: string; - id?: string; - protocol_version?: number; - timestamp?: string; - type?: string; - }; - Relationships: [ - { - foreignKeyName: "transaction_block_id_fkey"; - columns: ["block_id"]; - isOneToOne: false; - referencedRelation: "block"; - referencedColumns: ["id"]; - }, - { - foreignKeyName: "transaction_block_number_fkey"; - columns: ["block_number"]; - isOneToOne: false; - referencedRelation: "block"; - referencedColumns: ["number"]; - }, - ]; - }; - transaction_action: { - Row: { - chaincode_id: string; - creator_certificate_id: string | null; - creator_msp_id: string; - function_args: string | null; - function_name: string | null; - id: string; - transaction_id: string | null; - }; - Insert: { - chaincode_id: string; - creator_certificate_id?: string | null; - creator_msp_id: string; - function_args?: string | null; - function_name?: string | null; - id?: string; - transaction_id?: string | null; - }; - Update: { - chaincode_id?: string; - creator_certificate_id?: string | null; - creator_msp_id?: string; - function_args?: string | null; - function_name?: string | null; - id?: string; - transaction_id?: string | null; - }; - Relationships: [ - { - foreignKeyName: "transaction_action_creator_certificate_id_fkey"; - columns: ["creator_certificate_id"]; - isOneToOne: false; - referencedRelation: "certificate"; - referencedColumns: ["id"]; - }, - { - foreignKeyName: "transaction_action_transaction_id_fkey"; - columns: ["transaction_id"]; - isOneToOne: false; - referencedRelation: "transaction"; - referencedColumns: ["id"]; - }, - ]; - }; - transaction_action_endorsement: { - Row: { - certificate_id: string; - id: string; - mspid: string; - signature: string; - transaction_action_id: string | null; - }; - Insert: { - certificate_id: string; - id?: string; - mspid: string; - signature: string; - transaction_action_id?: string | null; - }; - Update: { - certificate_id?: string; - id?: string; - mspid?: string; - signature?: string; - transaction_action_id?: string | null; - }; - Relationships: [ - { - foreignKeyName: "transaction_action_endorsement_transaction_action_id_fkey"; - columns: ["transaction_action_id"]; - isOneToOne: false; - referencedRelation: "transaction_action"; - referencedColumns: ["id"]; - }, - { - foreignKeyName: "transaction_action_endorsements_certificate_id_fkey"; - columns: ["certificate_id"]; - isOneToOne: false; - referencedRelation: "certificate"; - referencedColumns: ["id"]; - }, - ]; - }; - }; - Views: { - [_ in never]: never; - }; - Functions: { - get_missing_blocks_in_range: { - Args: { - start_number: number; - end_number: number; - }; - Returns: { - block_number: number; - }[]; - }; - }; - Enums: { - [_ in never]: never; - }; - CompositeTypes: { - [_ in never]: never; - }; - }; -}; - -type PublicSchema = Database[Extract]; - -export type TablesInsert< - PublicTableNameOrOptions extends - | keyof PublicSchema["Tables"] - | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } - ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] - : never = never, -> = PublicTableNameOrOptions extends { schema: keyof Database } - ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends { - Insert: infer I; - } - ? I - : never - : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] - ? PublicSchema["Tables"][PublicTableNameOrOptions] extends { - Insert: infer I; - } - ? I - : never - : never; - -export type TablesUpdate< - PublicTableNameOrOptions extends - | keyof PublicSchema["Tables"] - | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } - ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] - : never = never, -> = PublicTableNameOrOptions extends { schema: keyof Database } - ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends { - Update: infer U; - } - ? U - : never - : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] - ? PublicSchema["Tables"][PublicTableNameOrOptions] extends { - Update: infer U; - } - ? U - : never - : never; diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/db-client/db-client.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/db-client/db-client.ts deleted file mode 100644 index 11c5ffb7c8..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/db-client/db-client.ts +++ /dev/null @@ -1,503 +0,0 @@ -/** - * Client class to communicate with PostgreSQL database. - */ - -import fs from "fs"; -import path from "path"; -import { Client as PostgresClient } from "pg"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - CactiBlockFullEventV1, - FabricX509CertificateV1, - FullBlockTransactionActionV1, - FullBlockTransactionEndorsementV1, - FullBlockTransactionEventV1, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api"; -import { Database as DatabaseSchemaType } from "./database.types"; - -////////////////////////////////// -// Helper Types -////////////////////////////////// - -type PublicSchemaTables = DatabaseSchemaType["public"]["Tables"]; -type PluginStatusRowType = PublicSchemaTables["plugin_status"]["Row"]; - -type SchemaTables = DatabaseSchemaType["fabric"]["Tables"]; -type SchemaFunctions = DatabaseSchemaType["fabric"]["Functions"]; -type BlockRowType = SchemaTables["block"]["Row"]; -type CertificateRowType = SchemaTables["certificate"]["Row"]; -type GetMissingRowsInRangeReturnType = - SchemaFunctions["get_missing_blocks_in_range"]["Returns"]; - -////////////////////////////////// -// PostgresDatabaseClient -////////////////////////////////// - -export interface PostgresDatabaseClientOptions { - connectionString: string; - logLevel: LogLevelDesc; -} - -/** - * Client class to communicate with PostgreSQL database. - * Remember to call `connect()` before using ano of the methods. - * - * @todo Use pg connection pool - */ -export default class PostgresDatabaseClient { - private log: Logger; - public static readonly CLASS_NAME = "PostgresDatabaseClient"; - public client: PostgresClient; - public isConnected = false; - - constructor(public options: PostgresDatabaseClientOptions) { - const fnTag = `${PostgresDatabaseClient.CLASS_NAME}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy( - options.connectionString, - `${fnTag} arg options.connectionString`, - ); - - const level = this.options.logLevel || "INFO"; - const label = PostgresDatabaseClient.CLASS_NAME; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.client = new PostgresClient({ - connectionString: options.connectionString, - }); - } - - /** - * Connect to a PostgreSQL database using connection string from the constructor. - */ - public async connect(): Promise { - this.log.info("Connect to PostgreSQL database..."); - await this.client.connect(); - this.isConnected = true; - } - - /** - * Close the connection to to a PostgreSQL database. - */ - public async shutdown(): Promise { - this.log.info("Close connection with PostgreSQL database."); - await this.client.end(); - this.isConnected = false; - } - - /** - * Read status of persistence plugin with specified name. - * - * @param pluginName name of the persistence plugin - * @returns status row - */ - public async getPluginStatus( - pluginName: string, - ): Promise { - this.assertConnected(); - - const queryResponse = await this.client.query( - "SELECT * FROM public.plugin_status WHERE name = $1", - [pluginName], - ); - - if (queryResponse.rows.length !== 1) { - throw new Error( - `Could not read status of plugin #${pluginName} from the DB`, - ); - } - - return queryResponse.rows[0]; - } - - /** - * Initialize / update entry for specific persistence plugin in the database. - * Create database schema for fabric data if it was not created yet. - * - * @param pluginName name of the persistence plugin - * @param instanceId instance id of the persistence plugin - */ - public async initializePlugin( - pluginName: string, - instanceId: string, - ): Promise { - this.assertConnected(); - - let isSchemaInitialized = false; - - try { - const pluginStatus = await this.getPluginStatus(pluginName); - - if (pluginStatus.last_instance_id != instanceId) { - this.log.warn( - `Instance ID in DB different from this plugin id (${pluginStatus.last_instance_id} != ${instanceId})! Make sure only one persistence plugin is running at a time!`, - ); - } - - isSchemaInitialized = pluginStatus.is_schema_initialized; - } catch (error) { - this.log.info("No status in the DB for plugin", pluginName); - } - - if (!isSchemaInitialized) { - const schemaPath = path.join(__dirname, "../../sql/schema.sql"); - this.log.info( - "Path to SQL script to create a database schema:", - schemaPath, - ); - - const schemaSql = fs.readFileSync(schemaPath, "utf8"); - this.log.debug("Schema file length:", schemaSql.length); - - await this.client.query(schemaSql); - isSchemaInitialized = true; - - this.log.info("Schema DB initialized."); - } - - this.log.info( - `Update status for plugin ${pluginName} with instanceId ${instanceId}`, - ); - const updatePluginInfo = await this.client.query( - `INSERT INTO public.plugin_status("name", "last_instance_id", "is_schema_initialized") - VALUES ($1, $2, $3) - ON CONFLICT ON CONSTRAINT plugin_status_pkey - DO - UPDATE SET - last_instance_id = EXCLUDED.last_instance_id, - is_schema_initialized = EXCLUDED.is_schema_initialized, - last_connected_at=now(); - `, - [pluginName, instanceId, isSchemaInitialized], - ); - this.log.debug( - `Plugin status updated for ${updatePluginInfo.rowCount} rows.`, - ); - } - - /** - * Internal method that throws if postgres client is not connected yet. - */ - private assertConnected(): void { - if (!this.isConnected) { - throw new Error( - `${PostgresDatabaseClient.CLASS_NAME} method called before connecting to the DB!`, - ); - } - } - - /** - * Convert certificate subject attributes to map, throw if string is invalid. - * - * @param attrString cert subject - * - * @returns Map of cert attributes - */ - private certificateAttrsStringToMap(attrString: string): Map { - const separatorSplitRegex = new RegExp(`[/,+;\n]`); - - return new Map( - attrString.split(separatorSplitRegex).map((a) => { - const splitAttrs = a.split("="); - if (splitAttrs.length !== 2) { - throw new Error( - `Invalid certificate attribute string: ${attrString}`, - ); - } - const [key, value] = splitAttrs; - return [key.trim(), value.trim()]; - }), - ); - } - - /** - * Search for certificate object in database using it's serial number. - * If it's not found, insert. - * - * @param fabricCert fabric x.509 certificate - * - * @returns certificate ID in the DB. - */ - private async insertCertificateIfNotExists( - fabricCert: FabricX509CertificateV1, - ): Promise { - // Try fetching cert ID from the DB - const queryResponse = await this.client.query( - "SELECT id FROM fabric.certificate WHERE serial_number = $1", - [fabricCert.serialNumber], - ); - - if (queryResponse.rows.length === 1) { - return queryResponse.rows[0].id; - } - - // Insert certificate not existing in the database - const subjectAttrs = this.certificateAttrsStringToMap(fabricCert.subject); - const issuerAttrs = this.certificateAttrsStringToMap(fabricCert.issuer); - - this.log.debug( - `Insert to fabric.certificate with serial number ${fabricCert.serialNumber})`, - ); - const certInsertResponse = await this.client.query( - `INSERT INTO - fabric.certificate("serial_number", "subject_common_name", "subject_org_unit", "subject_org", "subject_locality", - "subject_state", "subject_country", "issuer_common_name", "issuer_org_unit", "issuer_org", "issuer_locality", - "issuer_state", "issuer_country", "subject_alt_name", "valid_from", "valid_to", "pem") - VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) - RETURNING id;`, - [ - fabricCert.serialNumber, - subjectAttrs.get("CN") ?? "", - subjectAttrs.get("OU") ?? "", - subjectAttrs.get("O") ?? "", - subjectAttrs.get("L") ?? "", - subjectAttrs.get("ST") ?? "", - subjectAttrs.get("C") ?? "", - issuerAttrs.get("CN") ?? "", - issuerAttrs.get("OU") ?? "", - issuerAttrs.get("O") ?? "", - issuerAttrs.get("L") ?? "", - issuerAttrs.get("ST") ?? "", - issuerAttrs.get("C") ?? "", - fabricCert.subjectAltName, - fabricCert.validFrom, - fabricCert.validTo, - fabricCert.pem, - ], - ); - - if (certInsertResponse.rowCount !== 1) { - throw new Error( - `Certificate with serial number ${fabricCert.serialNumber} was not inserted into the DB`, - ); - } - - return certInsertResponse.rows[0].id; - } - - /** - * Insert data to block table. - */ - private async insertToBlockTable( - block: CactiBlockFullEventV1, - ): Promise { - this.log.debug( - `Insert to fabric.block #${block.blockNumber} (${block.blockHash})`, - ); - const blockInsertResponse = await this.client.query( - `INSERT INTO fabric.block("number", "hash", "transaction_count") - VALUES ($1, $2, $3) - RETURNING id;`, - [block.blockNumber, block.blockHash, block.transactionCount], - ); - if (blockInsertResponse.rowCount !== 1) { - throw new Error( - `Block ${block.blockNumber} was not inserted into the DB`, - ); - } - - return blockInsertResponse.rows[0].id; - } - - /** - * Insert data to transaction table. - */ - private async insertToTransactionTable( - tx: FullBlockTransactionEventV1, - blockId: string, - blockNumber: number, - ): Promise { - this.log.debug(`Insert to fabric.transaction with hash ${tx.hash})`); - - const txInsertResponse = await this.client.query( - `INSERT INTO - fabric.transaction("hash", "timestamp", "type", "epoch", "channel_id", "protocol_version", "block_id", "block_number") - VALUES ($1, $2, $3, $4, $5, $6, $7, $8) - RETURNING id;`, - [ - tx.hash, - tx.timestamp, - tx.transactionType, - tx.epoch, - tx.channelId, - tx.protocolVersion, - blockId, - blockNumber, - ], - ); - if (txInsertResponse.rowCount !== 1) { - throw new Error(`Transaction ${tx.hash} was not inserted into the DB`); - } - - return txInsertResponse.rows[0].id; - } - - /** - * Insert data to transaction_action table. - */ - private async insertToTransactionActionTable( - action: FullBlockTransactionActionV1, - txId: string, - ): Promise { - const creatorCertId = await this.insertCertificateIfNotExists( - action.creator.cert, - ); - - this.log.debug("Insert to fabric.transaction_action"); - const txActionInsertResponse = await this.client.query( - `INSERT INTO - fabric.transaction_action("function_name", "function_args", "chaincode_id", "creator_msp_id", "creator_certificate_id", "transaction_id") - VALUES ($1, $2, $3, $4, $5, $6) - RETURNING id;`, - [ - action.functionName, - action.functionArgs - .map((a) => "0x" + Buffer.from(a).toString("hex")) - .join(","), - action.chaincodeId, - action.creator.mspid, - creatorCertId, - txId, - ], - ); - if (txActionInsertResponse.rowCount !== 1) { - throw new Error("Transaction action was not inserted into the DB"); - } - - return txActionInsertResponse.rows[0].id; - } - - /** - * Insert data to transaction_action_endorsement table. - */ - private async insertToTransactionActionEndorsementTable( - endorsement: FullBlockTransactionEndorsementV1, - txActionId: string, - ): Promise { - const signerCertId = await this.insertCertificateIfNotExists( - endorsement.signer.cert, - ); - - this.log.debug("Insert to fabric.transaction_action_endorsement"); - const txActionEndorsementInsertResponse = await this.client.query( - `INSERT INTO - fabric.transaction_action_endorsement("mspid", "signature", "certificate_id", "transaction_action_id") - VALUES ($1, $2, $3, $4);`, - [ - endorsement.signer.mspid, - endorsement.signature, - signerCertId, - txActionId, - ], - ); - if (txActionEndorsementInsertResponse.rowCount !== 1) { - throw new Error( - "Transaction action endorsement was not inserted into the DB", - ); - } - } - - /** - * Read block data. Throws if block was not found. - * - * @param blockNumber fabric block number - * @returns Block data. - */ - public async getBlock(blockNumber: number): Promise { - this.assertConnected(); - - const queryResponse = await this.client.query( - "SELECT * FROM fabric.block WHERE number = $1", - [blockNumber], - ); - - if (queryResponse.rows.length !== 1) { - throw new Error(`Could not read block #${blockNumber} from the DB`); - } - - return queryResponse.rows[0]; - } - - /** - * Insert entire block data into the database (the block itself and transactions). - * Everything is committed in single atomic transaction (rollback on error). - * @param blockData new block data. - */ - public async insertBlockData(block: CactiBlockFullEventV1): Promise { - this.assertConnected(); - - this.log.debug("Insert block data, including transactions"); - - try { - await this.client.query("BEGIN"); - - const blockId = await this.insertToBlockTable(block); - - for (const tx of block.cactiTransactionsEvents) { - // Insert transaction - const txId = await this.insertToTransactionTable( - tx, - blockId, - block.blockNumber, - ); - - for (const action of tx.actions) { - // Insert transaction actions - const txActionId = await this.insertToTransactionActionTable( - action, - txId, - ); - - for (const endorsement of action.endorsements) { - // Insert transaction action endorsements - await this.insertToTransactionActionEndorsementTable( - endorsement, - txActionId, - ); - } - } - } - - await this.client.query("COMMIT"); - } catch (err: unknown) { - await this.client.query("ROLLBACK"); - this.log.warn("insertBlockData() exception:", err); - throw new Error( - "Could not insert block data into the database - transaction reverted", - ); - } - } - - /** - * Compare committed block numbers with requested range, return list of blocks that are missing. - * @param startBlockNumber block to check from (including) - * @param endBlockNumber block to check to (including) - * @returns list of missing block numbers - */ - public async getMissingBlocksInRange( - startBlockNumber: number, - endBlockNumber: number, - ): Promise { - Checks.truthy( - endBlockNumber >= startBlockNumber, - `getMissingBlocksInRange startBlockNumber larger than endBlockNumber`, - ); - this.assertConnected(); - - const queryResponse = await this.client.query( - "SELECT * FROM fabric.get_missing_blocks_in_range($1, $2) as block_number", - [startBlockNumber, endBlockNumber], - ); - this.log.debug( - `Found ${queryResponse.rowCount} missing blocks between ${startBlockNumber} and ${endBlockNumber}`, - ); - - return queryResponse.rows; - } -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index 801baa74fc..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,205 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Persistence Fabric - * Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface ErrorExceptionResponseV1 - */ -export interface ErrorExceptionResponseV1 { - /** - * - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'message': string; - /** - * - * @type {string} - * @memberof ErrorExceptionResponseV1 - */ - 'error': string; -} -/** - * Response with plugin status report. - * @export - * @interface StatusResponseV1 - */ -export interface StatusResponseV1 { - /** - * Plugin instance id. - * @type {string} - * @memberof StatusResponseV1 - */ - 'instanceId': string; - /** - * True if successfully connected to the database, false otherwise. - * @type {boolean} - * @memberof StatusResponseV1 - */ - 'connected': boolean; - /** - * True if web services were correctly exported. - * @type {boolean} - * @memberof StatusResponseV1 - */ - 'webServicesRegistered': boolean; - /** - * - * @type {Array} - * @memberof StatusResponseV1 - */ - 'operationsRunning': Array; - /** - * True if block monitoring is running, false otherwise. - * @type {boolean} - * @memberof StatusResponseV1 - */ - 'monitorRunning': boolean; - /** - * Number of the last block seen by the block monitor. - * @type {number} - * @memberof StatusResponseV1 - */ - 'lastSeenBlock': number; -} -/** - * Persistence plugin operation that is tracked and returned in status report. - * @export - * @interface TrackedOperationV1 - */ -export interface TrackedOperationV1 { - /** - * Start time of the operation. - * @type {string} - * @memberof TrackedOperationV1 - */ - 'startAt': string; - /** - * Operation name. - * @type {string} - * @memberof TrackedOperationV1 - */ - 'operation': string; -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Get the status of persistence plugin for fabric - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatusV1: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Get the status of persistence plugin for fabric - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatusV1(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatusV1(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @summary Get the status of persistence plugin for fabric - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatusV1(options?: any): AxiosPromise { - return localVarFp.getStatusV1(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @summary Get the status of persistence plugin for fabric - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public getStatusV1(options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).getStatusV1(options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 96fed85330..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Persistence Fabric - * Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 58a04f2ed7..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Persistence Fabric - * Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 27ea164448..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Persistence Fabric - * Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index 04463a122d..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Persistence Fabric - * Synchronizes state of an fabric ledger into a DB that can later be viewed in GUI - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/index.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/plugin-factory-persistence-fabric.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/plugin-factory-persistence-fabric.ts deleted file mode 100644 index 34a046bbc5..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/plugin-factory-persistence-fabric.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginPersistenceFabricOptions, - PluginPersistenceFabric, -} from "./plugin-persistence-fabric"; - -export class PluginFactoryLedgerPersistence extends PluginFactory< - PluginPersistenceFabric, - IPluginPersistenceFabricOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginPersistenceFabricOptions, - ): Promise { - return new PluginPersistenceFabric(pluginOptions); - } -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/plugin-persistence-fabric.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/plugin-persistence-fabric.ts deleted file mode 100644 index 9857561734..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/plugin-persistence-fabric.ts +++ /dev/null @@ -1,534 +0,0 @@ -/** - * Main logic of persistence plugin for fabric data. - */ - -import type { Express } from "express"; -import { v4 as uuidv4 } from "uuid"; -import type { Subscription } from "rxjs"; -import { Mutex } from "async-mutex"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import type { - IPluginWebService, - IWebServiceEndpoint, - ICactusPlugin, - ICactusPluginOptions, -} from "@hyperledger/cactus-core-api"; -import { - CactiBlockFullEventV1, - FabricApiClient, - GatewayOptions, - GetBlockResponseTypeV1, - GetChainInfoResponseV1, - WatchBlocksListenerTypeV1, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -import OAS from "../json/openapi.json"; -import { StatusEndpointV1 } from "./web-services/status-endpoint-v1"; -import PostgresDatabaseClient from "./db-client/db-client"; -import { - StatusResponseV1, - TrackedOperationV1, -} from "./generated/openapi/typescript-axios"; - -/** - * Constructor parameter for Fabric persistence plugin. - */ -export interface IPluginPersistenceFabricOptions extends ICactusPluginOptions { - apiClient: FabricApiClient; - connectionString: string; - logLevel: LogLevelDesc; - channelName: string; - gatewayOptions: GatewayOptions; -} - -/** - * Cacti persistence plugin for fabric ledgers. - * Remember to call `onPluginInit()` before using any of the plugin method, and `shutdown()` when closing the app. - */ -export class PluginPersistenceFabric - implements ICactusPlugin, IPluginWebService -{ - public static readonly CLASS_NAME = "PluginPersistenceFabric"; - - private readonly instanceId: string; - private log: Logger; - private apiClient: FabricApiClient; - private channelName: string; - private gatewayOptions: GatewayOptions; - private watchBlocksSubscription: Subscription | undefined; - private dbClient: PostgresDatabaseClient; - private isConnected = false; - private pushBlockMutex = new Mutex(); - private syncBlocksMutex = new Mutex(); - private isWebServicesRegistered = false; - private lastSeenBlock = 0; - private endpoints: IWebServiceEndpoint[] | undefined; - private trackedOperations = new Map(); - private failedBlocks = new Set(); - - constructor(public readonly options: IPluginPersistenceFabricOptions) { - const fnTag = `${PluginPersistenceFabric.CLASS_NAME}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.apiClient, `${fnTag} options.apiClient`); - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - Checks.truthy( - options.connectionString, - `${fnTag} options.connectionString`, - ); - Checks.truthy(options.channelName, `${fnTag} options.channelName`); - Checks.truthy(options.gatewayOptions, `${fnTag} options.gatewayOptions`); - - const level = this.options.logLevel || "INFO"; - const label = PluginPersistenceFabric.CLASS_NAME; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = options.instanceId; - this.apiClient = options.apiClient; - this.channelName = options.channelName; - this.gatewayOptions = options.gatewayOptions; - - this.dbClient = new PostgresDatabaseClient({ - connectionString: options.connectionString, - logLevel: level, - }); - } - - /** - * Add new plugin operation that will show up in status report. - * Remember to remove this operation with `removeTrackedOperation` after it's finished. - * - * @param id unique id of the operation (use `uuid`) - * @param operation operation name to show up in the status report - */ - private addTrackedOperation(id: string, operation: string): void { - if (this.trackedOperations.has(id)) { - this.log.error(`Operation with ID ${id} is already tracked!`); - return; - } - - this.trackedOperations.set(id, { - startAt: Date.now().toString(), - operation: operation, - }); - } - - /** - * Remove operation added with `addTrackedOperation`. - * If called with non-existent operation - nothing happens. - * - * @param id unique id of the operation (use `uuid`) - */ - private removeTrackedOperation(id: string): void { - this.trackedOperations.delete(id); - } - - /** - * Get block data from the ledger using the cacti connector. - * - * @returns Full block data including transactions (`CactiBlockFullEventV1`) - */ - private async getBlockFromLedger( - blockNumber: number, - ): Promise { - const response = await this.apiClient.getBlockV1({ - channelName: this.channelName, - gatewayOptions: this.gatewayOptions, - query: { - blockNumber: blockNumber.toString(), - }, - responseType: GetBlockResponseTypeV1.CactiFullBlock, - }); - - if ( - response && - response.status === 200 && - "cactiFullEvents" in response.data - ) { - return response.data.cactiFullEvents; - } else { - throw new Error( - `Could not get block with number ${blockNumber} from the ledger`, - ); - } - } - - /** - * Get chain info from the ledger using the cacti connector. - * - * @returns chain information (including current height and block hash) - */ - private async getChainInfoFromLedger(): Promise { - const response = await this.apiClient.getChainInfoV1({ - channelName: this.channelName, - gatewayOptions: this.gatewayOptions, - }); - - if (response && response.status === 200) { - return response.data; - } else { - throw new Error("Could not get chain information from the ledger"); - } - } - - /** - * Parse and push a new block received from the connector. - * Gap between last seen block and current one is checked and missing blocks are filled when necessary. - * - * @param block Full fabric block summary (`CactiBlockFullEventV1`) - */ - private async pushNewBlock(block: CactiBlockFullEventV1): Promise { - if (block.blockNumber <= this.lastSeenBlock) { - this.log.debug( - `Block ${block.blockNumber} already added (last seen: ${this.lastSeenBlock})`, - ); - return; - } - - // Push one block at a time, in case previous block is still being processed - // (example: filling the gap takes longer than expected) - await this.pushBlockMutex.runExclusive(async () => { - const previousBlockNumber = this.lastSeenBlock; - - try { - this.lastSeenBlock = block.blockNumber; - await this.dbClient.insertBlockData(block); - } catch (error: unknown) { - this.log.warn( - `Could not add new block #${block.blockNumber}, error:`, - error, - ); - this.addFailedBlock(block.blockNumber); - } - - const isGap = block.blockNumber - previousBlockNumber > 1; - if (isGap) { - const gapFrom = previousBlockNumber + 1; - const gapTo = block.blockNumber - 1; - try { - await this.syncBlocks(gapFrom, gapTo); - } catch (error: unknown) { - this.log.warn( - `Could not sync blocks in a gap between #${gapFrom} and #${gapTo}, error:`, - error, - ); - for (let i = gapFrom; i < gapTo; i++) { - this.addFailedBlock(i); - } - } - } - }); - } - - /** - * Add a block to failed blocks list. - * This method first ensures that the block is not present in the database. - * If it's not, new block is added to failed blocks and the plugin is out of sync. - * Failed blocks can be retried again with `syncFailedBlocks()` method. - * - * @param blockNumber block number to be added to failed blocks list. - */ - private async addFailedBlock(blockNumber: number) { - try { - const block = await this.dbClient.getBlock(blockNumber); - if (block.number !== blockNumber.toString()) { - throw new Error("Invalid response from the DB"); - } - this.log.debug( - `Block #${blockNumber} already present in DB - remove from the failed pool.`, - ); - this.failedBlocks.delete(blockNumber); - } catch (error: unknown) { - this.log.info( - `Block #${blockNumber} not found in the DB - add to the failed blocks pool.`, - ); - this.log.debug("getBlock() error message:", error); - this.failedBlocks.add(blockNumber); - } - } - - /** - * Synchronize blocks in specified range. - * Only the blocks not already present in the database from specified range will be pushed. - * - * @warn This operation can take a long time to finish if you specify a wide range! - * - * @param startBlockNumber starting block number (including) - * @param endBlockNumber ending block number (including) - */ - private async syncBlocks( - startBlockNumber: number, - endBlockNumber: number, - ): Promise { - // Only one block synchronization can run at a time to prevent data race. - await this.syncBlocksMutex.runExclusive(async () => { - this.log.info( - "Synchronize blocks from", - startBlockNumber, - "to", - endBlockNumber, - ); - - const missingBlockNumbers = await this.dbClient.getMissingBlocksInRange( - startBlockNumber, - endBlockNumber, - ); - - for (const n of missingBlockNumbers.map((r) => r.block_number)) { - try { - const block = await this.getBlockFromLedger(n); - await this.dbClient.insertBlockData(block); - } catch (error: unknown) { - this.log.warn(`Could not synchronize block #${n}, error:`, error); - this.addFailedBlock(n); - } - } - }); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-persistence-fabric`; - } - - /** - * Get OpenAPI definition for this plugin. - * @returns OpenAPI spec object - */ - public getOpenApiSpec(): unknown { - return OAS; - } - - /** - * Should be called before using the plugin. - * Connects to the database and initializes the plugin schema and status entry. - * Fetches tokens to be monitored and stores them in local memory. - */ - public async onPluginInit(): Promise { - await this.dbClient.connect(); - - await this.dbClient.initializePlugin( - PluginPersistenceFabric.CLASS_NAME, - this.instanceId, - ); - - this.isConnected = true; - } - - /** - * Close the connection to the DB, cleanup any allocated resources. - */ - public async shutdown(): Promise { - this.stopMonitor(); - await this.dbClient.shutdown(); - this.isConnected = false; - } - - /** - * Register all the plugin endpoints on supplied `Express` server. - * - * @param app `Express.js` server. - * @returns list of registered plugin endpoints. - */ - public async registerWebServices( - app: Express, - ): Promise { - const webServices = await this.getOrCreateWebServices(); - webServices.forEach((ws) => ws.registerExpress(app)); - this.isWebServicesRegistered = true; - return webServices; - } - - /** - * Create plugin endpoints and return them. - * If method was already called, the set of endpoints created on the first run is used. - * @returns list of plugin endpoints. - */ - public async getOrCreateWebServices(): Promise { - const { log } = this; - const pkgName = this.getPackageName(); - - if (this.endpoints) { - return this.endpoints; - } - log.info(`Creating web services for plugin ${pkgName}...`); - - const endpoints: IWebServiceEndpoint[] = []; - { - const endpoint = new StatusEndpointV1({ - connector: this, - logLevel: this.options.logLevel, - }); - endpoints.push(endpoint); - } - this.endpoints = endpoints; - - log.info(`Instantiated web services for plugin ${pkgName} OK`, { - endpoints, - }); - return endpoints; - } - - /** - * Get status report of this instance of persistence plugin. - * - * @returns Status report object - */ - public getStatus(): StatusResponseV1 { - return { - instanceId: this.instanceId, - connected: this.isConnected, - webServicesRegistered: this.isWebServicesRegistered, - operationsRunning: Array.from(this.trackedOperations.values()), - monitorRunning: this.watchBlocksSubscription !== undefined, - lastSeenBlock: this.lastSeenBlock, - }; - } - - /** - * Start the block monitoring process. New blocks from the ledger will be parsed and pushed to the database. - * Use `stopMonitor()` to cancel this operation. - * - * @warn - * Before the monitor starts, the database will be synchronized with current ledger state. - * This operation can take a while, but will ensure that the ledger archive is complete. - * - * @param onError callback method that will be called on error. - */ - public async startMonitor(onError?: (err: unknown) => void): Promise { - // Synchronize the current DB state - this.lastSeenBlock = await this.syncAll(); - - const blocksObservable = this.apiClient.watchBlocksV1({ - channelName: this.channelName, - gatewayOptions: this.gatewayOptions, - type: WatchBlocksListenerTypeV1.CactiFullBlock, - }); - - if (!blocksObservable) { - throw new Error( - "Could not get a valid blocks observable in startMonitor", - ); - } - - this.watchBlocksSubscription = blocksObservable.subscribe({ - next: async (event) => { - try { - this.log.debug("Received new block."); - - if (!event || !("cactiFullEvents" in event)) { - this.log.warn("Received invalid block ledger event:", event); - return; - } - - await this.pushNewBlock(event.cactiFullEvents); - } catch (error: unknown) { - this.log.error("Unexpected error when pushing new block:", error); - } - }, - error: (err) => { - this.log.error("Error when watching for new blocks, err:", err); - - if (onError) { - try { - onError(err); - } catch (error: unknown) { - this.log.error( - "Unexpected error in onError monitor handler:", - error, - ); - } - } - }, - complete: () => { - this.log.info("Watch completed"); - if (this.watchBlocksSubscription) { - this.watchBlocksSubscription.unsubscribe(); - } - this.watchBlocksSubscription = undefined; - }, - }); - } - - /** - * Stop the block monitoring process. - * If the monitoring wasn't running - nothing happens. - */ - public stopMonitor(): void { - if (this.watchBlocksSubscription) { - this.watchBlocksSubscription.unsubscribe(); - this.watchBlocksSubscription = undefined; - this.log.info("stopMonitor(): Done."); - } - } - - /** - * Walk through all the blocks that could not be synchronized with the DB for some reasons and try pushing them again. - * Blocks will remain on "failed blocks" list until it's successfully pushed to the database. - * - * @returns list of restored blocks - */ - public async syncFailedBlocks(): Promise { - const blocksRestored: number[] = []; - const operationId = uuidv4(); - this.addTrackedOperation(operationId, "syncFailedBlocks"); - - try { - for (const n of this.failedBlocks) { - try { - const block = await this.getBlockFromLedger(n); - await this.dbClient.insertBlockData(block); - this.failedBlocks.delete(n); - blocksRestored.push(n); - } catch (error: unknown) { - this.log.warn(`Could not sync failed block #${n}, error:`, error); - } - } - - if (blocksRestored) { - this.log.info("Restored following failed blocks:", blocksRestored); - } - } finally { - this.removeTrackedOperation(operationId); - } - - return blocksRestored; - } - - /** - * Synchronize entire ledger state with the database. - * - Synchronize all blocks that failed to synchronize until now. - * - Detect any other missing blocks between the database and the ledger, push them to the DB. - * - * @warn This operation can take a long time to finish! - * - * @returns latest synchronized block number. - */ - public async syncAll(): Promise { - const operationId = uuidv4(); - this.addTrackedOperation(operationId, "syncAll"); - - try { - this.log.info("syncAll() started..."); - - await this.syncFailedBlocks(); - - const { height } = await this.getChainInfoFromLedger(); - const latestBlock = height - 1; // Height points to next block, not the latest - - await this.syncBlocks(1, latestBlock); - - return latestBlock; - } finally { - this.removeTrackedOperation(operationId); - } - } -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/public-api.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/public-api.ts deleted file mode 100755 index dfd43cb263..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/public-api.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryLedgerPersistence } from "./plugin-factory-persistence-fabric"; - -export { PluginFactoryLedgerPersistence } from "./plugin-factory-persistence-fabric"; -export { - PluginPersistenceFabric, - IPluginPersistenceFabricOptions, -} from "./plugin-persistence-fabric"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryLedgerPersistence(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-persistence-fabric/src/main/typescript/web-services/status-endpoint-v1.ts b/packages/cactus-plugin-persistence-fabric/src/main/typescript/web-services/status-endpoint-v1.ts deleted file mode 100644 index e618b6dd28..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/main/typescript/web-services/status-endpoint-v1.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * OpenAPI endpoint (GET) for reading status of the persistence plugin. - */ - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; -import type { - IEndpointAuthzOptions, - IExpressRequestHandler, - IWebServiceEndpoint, -} from "@hyperledger/cactus-core-api"; -import { - handleRestEndpointException, - registerWebServiceEndpoint, -} from "@hyperledger/cactus-core"; - -import { PluginPersistenceFabric } from "../plugin-persistence-fabric"; -import OAS from "../../json/openapi.json"; - -import type { Express, Request, Response } from "express"; - -export interface IStatusEndpointV1Options { - logLevel?: LogLevelDesc; - connector: PluginPersistenceFabric; -} - -/** - * OpenAPI endpoint (GET) for reading status of the persistence plugin. - */ -export class StatusEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "StatusEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return StatusEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IStatusEndpointV1Options) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.connector, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getOasPath(): any { - return OAS.paths[ - "/api/v1/plugins/@hyperledger/cactus-plugin-persistence-fabric/status" - ]; - } - - public getPath(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = this.getOasPath(); - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return this.getOasPath().get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(_req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - - try { - const resBody = this.options.connector.getStatus(); - res.status(200).json(resBody); - } catch (ex) { - const errorMsg = `Crash while serving ${reqTag}`; - handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); - } - } -} diff --git a/packages/cactus-plugin-persistence-fabric/src/test/sql/insert-test-data.sql b/packages/cactus-plugin-persistence-fabric/src/test/sql/insert-test-data.sql deleted file mode 100644 index f61fc68623..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/test/sql/insert-test-data.sql +++ /dev/null @@ -1,1802 +0,0 @@ --- Sample test input for fabric GUI. Can be used to check the views manually without running the persistence plugin first. --- Clear: --- TRUNCATE fabric.block, fabric.certificate, fabric.transaction, fabric.transaction_action, fabric.transaction_action_endorsement, public.plugin_status --- --- Data for Name: block; Type: TABLE DATA; Schema: fabric; Owner: postgres --- -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - 'dac7bd3b-e232-4d75-9050-e84404afd618', - 1, - '0x3d4cd7578038163492bc87f1a2a55529ab557f0bf882805084097d98fa04ea29', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '7e6cb22c-8dc4-4a69-be68-32fc69ed0e35', - 2, - '0x78702e216f5a4772ef56087636a52aef66f23ce49e93f8a89c1eb06fe5448b2c', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '20d9af60-50c3-4c92-8847-270e69ce57c0', - 3, - '0xe6656aa10d9f73fde8db5b0ce6bba9a2bc3118c72ef9d69b53b9f7c512139d60', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '95485cea-b99b-490d-bfe4-663d8b7c6d13', - 4, - '0x33c2bd426ac7175b4c36968d0021c11f1bc261c403bc4f3531c47882cfc6a322', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - 'ecafe65a-09c7-49de-9250-cb4e71aa1fd3', - 5, - '0xe8cfcf5f567db8df353a21c7aff71ef6d67ef2367091e3ee7167268559546e60', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - 'fb9c6a3d-3b9c-4d36-b140-525559a6956f', - 6, - '0x21f672d5ba88376ba50c6238477bc4ccab5b6af96502ba24cc7ecbe7aad81e4a', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '612c96de-1ba5-43f8-a50c-c685c1085b14', - 7, - '0xf612c7d8b5574d321a2c9b1a43676cd9a11a2f07eac07cad0babe4aa7eebd463', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '9418c830-35ec-4538-884c-ba72b5a21f0f', - 8, - '0xb80bbbc8cf85912f2da83a6d4e6c9f59d6117c9c2cfff4ce3e87dbb20071f343', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - 'ca782d76-f248-4971-be25-1f8c7ca5b780', - 9, - '0xc7ad52f1578d4a112cb2f590dac2822090970e56efb64718082426ff1ebeebb2', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '420f3616-8844-48de-a903-ab75eb87b888', - 10, - '0x6cd450d353ff819c7acb580380d40271471f3f9b7ace44cb1f3f7a7030d73f01', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - 'b6c8f046-8f58-4637-b41e-a8abe4d519cd', - 11, - '0x5aba71c9e5386fcd7bf2b77c992d1a7bb9fea16f7d6317dfea944212c32d6766', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '398b74de-aec6-478f-9d9e-304418628a27', - 12, - '0xbd6979bbdb237e4c6a274e1d1ba798ff4d7623df8f8e1c6d1c1f7146b1af3ecd', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '34489777-8abf-4fff-be2d-cb13d191d057', - 13, - '0x371792cf3b2b75037c5fe62d469e5161df2f88100d0985d47e79d4e7ebf3f9ee', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '56b1f4dd-1090-4168-8d61-c732e664bccf', - 14, - '0xdd7bf1536073d0e460b3575bcd4f4a94612a6adac4b4544e6e8052f5bb2ec98a', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '3741a620-1953-4b25-ade2-7fdafe4a56f8', - 15, - '0x974561eb868fd3612fce6c6d2e90cb728929c83cb2404b56ed87e74486eea90e', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '1d70b16b-3a1a-4546-8450-7db5a857f424', - 16, - '0xf8c4881f13721e3d662e940dffc84ad61f995dd44bb8078ec2fd05ee5c95dee0', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - 'fd151abb-c943-4a60-83ae-43d55b48b6d6', - 17, - '0xe5de599c2072390ac02c8cc2d45e4384972387aa1ef50b97cd5c7fd8279cf2ee', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - '966bb844-f81a-4778-9232-b5c71e1d3903', - 18, - '0x5fbdbed33d85a3481fd77991f5cc11f90d3908554ae433611124a470f08f2e79', - 1 - ); - -INSERT INTO - fabric.block (id, number, hash, transaction_count) -VALUES - ( - 'ef66a97d-10a8-4195-a169-1cd3e6722ac8', - 19, - '0x79002d52127b411c0589eb1c3253f1f488945dca51f1d8cd628b3390185cf307', - 1 - ); - --- --- Data for Name: certificate; Type: TABLE DATA; Schema: fabric; Owner: postgres --- -INSERT INTO - fabric.certificate ( - id, - serial_number, - subject_common_name, - subject_org_unit, - subject_org, - subject_locality, - subject_state, - subject_country, - issuer_common_name, - issuer_org_unit, - issuer_org, - issuer_locality, - issuer_state, - issuer_country, - subject_alt_name, - valid_from, - valid_to, - pem - ) -VALUES - ( - '53c39873-46ce-44a5-876f-bda47c24ed0c', - '16C8C9A05A2B7EFA6ED794F28A2FBCE6DED1C86C', - 'org1admin', - 'admin', - 'Hyperledger', - '', - 'North Carolina', - 'US', - 'ca.org1.example.com', - '', - 'org1.example.com', - 'Durham', - 'North Carolina', - 'US', - 'DNS:9071369d9d11', - '2024-06-10 10:50:00+00', - '2025-06-10 10:55:00+00', - '-----BEGIN CERTIFICATE----- -MIICqTCCAlCgAwIBAgIUFsjJoForfvpu15Tyii+85t7RyGwwCgYIKoZIzj0EAwIw -cDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH -EwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh -Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjQwNjEwMTA1MDAwWhcNMjUwNjEwMTA1NTAw -WjBgMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExFDASBgNV -BAoTC0h5cGVybGVkZ2VyMQ4wDAYDVQQLEwVhZG1pbjESMBAGA1UEAxMJb3JnMWFk -bWluMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEaCjVDW8X3Fpa7lXTrjNACJG -mslK1ppx9uzh9Fqk2lLN7GxcJSi2hcIyTK9+udwbRynDHl1HgMG/fLBfqrkCNKOB -1zCB1DAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUTw/b -Ss21vEgoQbb2wnwXF4DkCTEwHwYDVR0jBBgwFoAUgN29gMPVb3dfnq0ngxTg67qy -iQkwFwYDVR0RBBAwDoIMOTA3MTM2OWQ5ZDExMFsGCCoDBAUGBwgBBE97ImF0dHJz -Ijp7ImhmLkFmZmlsaWF0aW9uIjoiIiwiaGYuRW5yb2xsbWVudElEIjoib3JnMWFk -bWluIiwiaGYuVHlwZSI6ImFkbWluIn19MAoGCCqGSM49BAMCA0cAMEQCIGzNQ3Ut -iHpsKZzzIadYTY7TlC7FliD+XI89FyzM2RqoAiALJ2yU42wNnfrRuByQQN9cHz1j -ArKZknDfP6HYxUS0RQ== ------END CERTIFICATE----- -' - ); - -INSERT INTO - fabric.certificate ( - id, - serial_number, - subject_common_name, - subject_org_unit, - subject_org, - subject_locality, - subject_state, - subject_country, - issuer_common_name, - issuer_org_unit, - issuer_org, - issuer_locality, - issuer_state, - issuer_country, - subject_alt_name, - valid_from, - valid_to, - pem - ) -VALUES - ( - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '3D697828B3244EDC75A95CCC30FC5013B904F6E5', - 'peer0', - 'peer', - 'Hyperledger', - '', - 'North Carolina', - 'US', - 'ca.org1.example.com', - '', - 'org1.example.com', - 'Durham', - 'North Carolina', - 'US', - 'DNS:9071369d9d11', - '2024-06-10 10:50:00+00', - '2025-06-10 10:55:00+00', - '-----BEGIN CERTIFICATE----- -MIICnzCCAkagAwIBAgIUPWl4KLMkTtx1qVzMMPxQE7kE9uUwCgYIKoZIzj0EAwIw -cDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH -EwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh -Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjQwNjEwMTA1MDAwWhcNMjUwNjEwMTA1NTAw -WjBbMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExFDASBgNV -BAoTC0h5cGVybGVkZ2VyMQ0wCwYDVQQLEwRwZWVyMQ4wDAYDVQQDEwVwZWVyMDBZ -MBMGByqGSM49AgEGCCqGSM49AwEHA0IABOBN1m+Sd4tJgk7cj/2tjncS0DDaZrpB -XScgGyyvFu7WvUNAX5huTiUcP6RPnfQ2op1fgaPvHwVWQ4sLwU3wYqSjgdIwgc8w -DgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFOWzZpC41lih -5kCb9Dhd/w626Ve7MB8GA1UdIwQYMBaAFIDdvYDD1W93X56tJ4MU4Ou6sokJMBcG -A1UdEQQQMA6CDDkwNzEzNjlkOWQxMTBWBggqAwQFBgcIAQRKeyJhdHRycyI6eyJo -Zi5BZmZpbGlhdGlvbiI6IiIsImhmLkVucm9sbG1lbnRJRCI6InBlZXIwIiwiaGYu -VHlwZSI6InBlZXIifX0wCgYIKoZIzj0EAwIDRwAwRAIgCNafIs0XRatMvyu1Mj62 -4LVXfIgyolfaFaOZaFtjJdYCIA4bciJH/vMOdbxoAbNr7B83P1GEfHLdmd2yy7D1 -Vi3u ------END CERTIFICATE----- -' - ); - -INSERT INTO - fabric.certificate ( - id, - serial_number, - subject_common_name, - subject_org_unit, - subject_org, - subject_locality, - subject_state, - subject_country, - issuer_common_name, - issuer_org_unit, - issuer_org, - issuer_locality, - issuer_state, - issuer_country, - subject_alt_name, - valid_from, - valid_to, - pem - ) -VALUES - ( - '03fe59e9-9540-4c19-851d-11de61c6ee84', - '138E42BC35217601BC9B8D631232E26880A2EFCD', - 'org2admin', - 'admin', - 'Hyperledger', - '', - 'North Carolina', - 'US', - 'ca.org2.example.com', - '', - 'org2.example.com', - 'Hursley', - 'Hampshire', - 'UK', - 'DNS:9071369d9d11', - '2024-06-10 10:50:00+00', - '2025-06-10 10:55:00+00', - '-----BEGIN CERTIFICATE----- -MIICpTCCAkygAwIBAgIUE45CvDUhdgG8m41jEjLiaICi780wCgYIKoZIzj0EAwIw -bDELMAkGA1UEBhMCVUsxEjAQBgNVBAgTCUhhbXBzaGlyZTEQMA4GA1UEBxMHSHVy -c2xleTEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3Jn -Mi5leGFtcGxlLmNvbTAeFw0yNDA2MTAxMDUwMDBaFw0yNTA2MTAxMDU1MDBaMGAx -CzAJBgNVBAYTAlVTMRcwFQYDVQQIEw5Ob3J0aCBDYXJvbGluYTEUMBIGA1UEChML -SHlwZXJsZWRnZXIxDjAMBgNVBAsTBWFkbWluMRIwEAYDVQQDEwlvcmcyYWRtaW4w -WTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARegEoielYCE4rD9zGSp7hfSnvqDNZr -NCTZ2RNQtjt/skOaf9QPNNpPqGEC1b9MH/RiX0AaTkOzQqLv/86BpKXMo4HXMIHU -MA4GA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQNSRYsRxQ7 -C3FzkG9hQTii+NllmzAfBgNVHSMEGDAWgBTqU3ENOraRPq6JewJvIU9wNWIkgDAX -BgNVHREEEDAOggw5MDcxMzY5ZDlkMTEwWwYIKgMEBQYHCAEET3siYXR0cnMiOnsi -aGYuQWZmaWxpYXRpb24iOiIiLCJoZi5FbnJvbGxtZW50SUQiOiJvcmcyYWRtaW4i -LCJoZi5UeXBlIjoiYWRtaW4ifX0wCgYIKoZIzj0EAwIDRwAwRAIgAVyUc87cUDWo -qCSJ+kIZ+ZJ4R0qCcV4J43FGLZKOZ1YCIHoOiJsa01L4iEZqNHvWsStaMdBU7Knc -yg47qdnDt+4X ------END CERTIFICATE----- -' - ); - -INSERT INTO - fabric.certificate ( - id, - serial_number, - subject_common_name, - subject_org_unit, - subject_org, - subject_locality, - subject_state, - subject_country, - issuer_common_name, - issuer_org_unit, - issuer_org, - issuer_locality, - issuer_state, - issuer_country, - subject_alt_name, - valid_from, - valid_to, - pem - ) -VALUES - ( - '68241f33-108d-4cf6-abdd-94b6fe825191', - '71649A396B1760F3384A854456EE7C8E3EC7DFB6', - 'peer0', - 'peer', - 'Hyperledger', - '', - 'North Carolina', - 'US', - 'ca.org2.example.com', - '', - 'org2.example.com', - 'Hursley', - 'Hampshire', - 'UK', - 'DNS:9071369d9d11', - '2024-06-10 10:50:00+00', - '2025-06-10 10:55:00+00', - '-----BEGIN CERTIFICATE----- -MIICnDCCAkKgAwIBAgIUcWSaOWsXYPM4SoVEVu58jj7H37YwCgYIKoZIzj0EAwIw -bDELMAkGA1UEBhMCVUsxEjAQBgNVBAgTCUhhbXBzaGlyZTEQMA4GA1UEBxMHSHVy -c2xleTEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3Jn -Mi5leGFtcGxlLmNvbTAeFw0yNDA2MTAxMDUwMDBaFw0yNTA2MTAxMDU1MDBaMFsx -CzAJBgNVBAYTAlVTMRcwFQYDVQQIEw5Ob3J0aCBDYXJvbGluYTEUMBIGA1UEChML -SHlwZXJsZWRnZXIxDTALBgNVBAsTBHBlZXIxDjAMBgNVBAMTBXBlZXIwMFkwEwYH -KoZIzj0CAQYIKoZIzj0DAQcDQgAEvEZTQytr0uskquy873bYYtV6bBI4EnCFkIKb -Oan5DnAFbrlQFWyZ0R79lPbUlCdiV4LQUD1jqLR7ozSI0YxPp6OB0jCBzzAOBgNV -HQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUfsphGAik86sP58SQ -QSAyezUQjfMwHwYDVR0jBBgwFoAU6lNxDTq2kT6uiXsCbyFPcDViJIAwFwYDVR0R -BBAwDoIMOTA3MTM2OWQ5ZDExMFYGCCoDBAUGBwgBBEp7ImF0dHJzIjp7ImhmLkFm -ZmlsaWF0aW9uIjoiIiwiaGYuRW5yb2xsbWVudElEIjoicGVlcjAiLCJoZi5UeXBl -IjoicGVlciJ9fTAKBggqhkjOPQQDAgNIADBFAiEA3n+PBUzGvAQaKzOMqyPCn55v -ksOKGCeIYBZjdj7YO/YCIFn/p5z0p//NsxdDP1k+7C0x6Lpn6S0qhWVLMkvobhLR ------END CERTIFICATE----- -' - ); - -INSERT INTO - fabric.certificate ( - id, - serial_number, - subject_common_name, - subject_org_unit, - subject_org, - subject_locality, - subject_state, - subject_country, - issuer_common_name, - issuer_org_unit, - issuer_org, - issuer_locality, - issuer_state, - issuer_country, - subject_alt_name, - valid_from, - valid_to, - pem - ) -VALUES - ( - 'f1673034-a3cf-47eb-a246-0457da9ee369', - '67347B298F2E73DDE069B6FCCDCB26CFE1688A08', - 'admin', - 'client', - '', - '', - '', - '', - 'ca.org1.example.com', - '', - 'org1.example.com', - 'Durham', - 'North Carolina', - 'US', - '', - '2024-06-10 10:50:00+00', - '2025-06-10 12:01:00+00', - '-----BEGIN CERTIFICATE----- -MIIB8zCCAZmgAwIBAgIUZzR7KY8uc93gabb8zcsmz+FoiggwCgYIKoZIzj0EAwIw -cDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH -EwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh -Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjQwNjEwMTA1MDAwWhcNMjUwNjEwMTIwMTAw -WjAhMQ8wDQYDVQQLEwZjbGllbnQxDjAMBgNVBAMTBWFkbWluMFkwEwYHKoZIzj0C -AQYIKoZIzj0DAQcDQgAEpQDXkuOEKWY3D9bGTh0v7cjqXLGVPXq5aKUTsw6M7ipN -C3VxQGvY8KIQ0tbAz4GQh2tQKyPhglItfYKD49o3HKNgMF4wDgYDVR0PAQH/BAQD -AgeAMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFKikYBlAJcEX7WRtfbjzAC6ODzI1 -MB8GA1UdIwQYMBaAFIDdvYDD1W93X56tJ4MU4Ou6sokJMAoGCCqGSM49BAMCA0gA -MEUCIQDKt/qrpa+i5iXym9UT4ajhuMjMx/FSQkcSQIokx3RTbAIgYmEvAdKHaaMv -Gs3YfnTJA8S1rzQNEz9n0J7TnsuLDZs= ------END CERTIFICATE----- -' - ); - -INSERT INTO - fabric.certificate ( - id, - serial_number, - subject_common_name, - subject_org_unit, - subject_org, - subject_locality, - subject_state, - subject_country, - issuer_common_name, - issuer_org_unit, - issuer_org, - issuer_locality, - issuer_state, - issuer_country, - subject_alt_name, - valid_from, - valid_to, - pem - ) -VALUES - ( - 'a2e26ed7-ee35-4cdb-be8e-013406ca3534', - '25B509C0754E3D7AD5C4959BBBCAED7575C9DCCA', - 'admin', - 'client', - '', - '', - '', - '', - 'ca.org1.example.com', - '', - 'org1.example.com', - 'Durham', - 'North Carolina', - 'US', - '', - '2024-06-10 10:50:00+00', - '2025-06-10 12:04:00+00', - '-----BEGIN CERTIFICATE----- -MIIB8zCCAZmgAwIBAgIUJbUJwHVOPXrVxJWbu8rtdXXJ3MowCgYIKoZIzj0EAwIw -cDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH -EwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh -Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjQwNjEwMTA1MDAwWhcNMjUwNjEwMTIwNDAw -WjAhMQ8wDQYDVQQLEwZjbGllbnQxDjAMBgNVBAMTBWFkbWluMFkwEwYHKoZIzj0C -AQYIKoZIzj0DAQcDQgAEMJYaVNRAB+mlgL43LcFiRu4OnNKKvRww1tuVgDcEw+61 -ov1cF0Gp5+ZUsWBNRNOVtbqJWeuwImnpZyOKg3VuYqNgMF4wDgYDVR0PAQH/BAQD -AgeAMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFISb10JMkBPiJElqdwHscdlXlwed -MB8GA1UdIwQYMBaAFIDdvYDD1W93X56tJ4MU4Ou6sokJMAoGCCqGSM49BAMCA0gA -MEUCIQDJHp/QkukCdnUe10ma6aAip8hGabFXLqgqooq2iOasCwIgCnOjACStpDLc -j8Fxno3p3EAmocwmZyu4wxnVmqfKdhs= ------END CERTIFICATE----- -' - ); - --- --- Data for Name: transaction; Type: TABLE DATA; Schema: fabric; Owner: postgres --- -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - '8f85a1ed-047f-470a-a8f6-5468cb568c74', - '4affb3661c2a8075e52e8e6826e1768616bb1f8c588b1baa54368a3996a54de8', - 'mychannel', - '2024-06-10 10:55:26.036+00', - 0, - 'ENDORSER_TRANSACTION', - 0, - '20d9af60-50c3-4c92-8847-270e69ce57c0', - 3 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - '763aa5f5-3d5c-4d87-b785-554ce9baa27f', - '3a8bb1d1fc19c6efaba9f59d20f551840470ee3aa2924669593064996a224306', - 'mychannel', - '2024-06-10 10:55:34.219+00', - 0, - 'ENDORSER_TRANSACTION', - 0, - '95485cea-b99b-490d-bfe4-663d8b7c6d13', - 4 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - '3da28b37-5817-4e13-b25d-fec29247d105', - '6364aaf8837b4d8a6b538a2863ec32cc00e1368424d7da5731f308518172c2cd', - 'mychannel', - '2024-06-10 10:55:42.378+00', - 0, - 'ENDORSER_TRANSACTION', - 0, - 'ecafe65a-09c7-49de-9250-cb4e71aa1fd3', - 5 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - 'efa0703d-72c6-48fc-bd88-2a19de2f5009', - '72d7370e137e14ae580117021fbfef9a1f235d9f4c401bb271ee73756e6b85e2', - 'mychannel', - '2024-06-10 10:56:00.665+00', - 0, - 'ENDORSER_TRANSACTION', - 0, - 'fb9c6a3d-3b9c-4d36-b140-525559a6956f', - 6 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - 'c267a857-ab8a-4032-aa0d-4827bd3c1309', - '6eea68b063283f01041225919098a0928430a2319996ca03a98324b14bccb97c', - 'mychannel', - '2024-06-10 12:02:00.127+00', - 0, - 'ENDORSER_TRANSACTION', - 0, - '612c96de-1ba5-43f8-a50c-c685c1085b14', - 7 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - 'ce9da32f-ae2f-401d-8283-9e447ddaf190', - '5f544cb92cffb0e9ed1db8a8f51b11c580c8b9961eafcdf6ca78628392d5a47d', - 'mychannel', - '2024-06-10 12:02:08.28+00', - 0, - 'ENDORSER_TRANSACTION', - 0, - '9418c830-35ec-4538-884c-ba72b5a21f0f', - 8 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - '350c09f7-3d30-432c-b152-bb8bf9496f26', - 'a379dac7b3d43fc295298a0ddde25039a4a31e6b9478c211a2ee440ae5816d49', - 'mychannel', - '2024-06-10 12:02:16.461+00', - 0, - 'ENDORSER_TRANSACTION', - 0, - 'ca782d76-f248-4971-be25-1f8c7ca5b780', - 9 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - '93453b98-f6ef-404f-b919-c0e4f4269a48', - '46b1b9ca469b3e446edd7b36e0ea2d9c07ba8f0d07e69b9e505c7ab6ac54d16e', - 'mychannel', - '2024-06-10 12:02:25.673+00', - 1, - 'ENDORSER_TRANSACTION', - 0, - '420f3616-8844-48de-a903-ab75eb87b888', - 10 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - 'e75ed8b2-4784-4de4-8b9c-ee633161b0b9', - '7262d91cde3512c541f00bd1df2a1f39fc4a1b9d8e0dc39648c40d8e7a3c3d93', - 'mychannel', - '2024-06-10 12:02:58.26+00', - 0, - 'ENDORSER_TRANSACTION', - 0, - 'b6c8f046-8f58-4637-b41e-a8abe4d519cd', - 11 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - 'a37ddb15-a366-43e3-8bc9-3d3b71b1d54e', - '1f5482b9ff1ed7c14263f9cfe45fba937c4af8d0ec26019313338c927e46ee95', - 'mychannel', - '2024-06-10 12:03:06.467+00', - 0, - 'ENDORSER_TRANSACTION', - 0, - '398b74de-aec6-478f-9d9e-304418628a27', - 12 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - 'ac2ce381-3ce9-410b-a4f1-ede6aaa0dab1', - 'da57d660e6e5d2226d400ccda9c8f0db715e1052e432a1470cca63780251e32a', - 'mychannel', - '2024-06-10 12:03:14.642+00', - 0, - 'ENDORSER_TRANSACTION', - 0, - '34489777-8abf-4fff-be2d-cb13d191d057', - 13 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - '7f076209-512c-449c-86fd-8054714750a8', - '2ecbca537099fd71cda7cdce3550e4bfdd9cea0fcf3079faa85d832b6964a580', - 'mychannel', - '2024-06-10 12:03:24.714+00', - 1, - 'ENDORSER_TRANSACTION', - 0, - '56b1f4dd-1090-4168-8d61-c732e664bccf', - 14 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - '54fec888-dd87-49cb-aac3-933f0dcea308', - '5d0058b145ffaa0a718bd6c2ed9565f77e812d153e7895b1185de7088b007a80', - 'mychannel', - '2024-06-10 12:03:28.422+00', - 1, - 'ENDORSER_TRANSACTION', - 0, - '3741a620-1953-4b25-ade2-7fdafe4a56f8', - 15 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - '1c060a70-9ccd-4c3b-9ec9-bc9afe8138d9', - 'e4b02e92986a02a16d793ba4bf59334c3171c7080814cfdd3472547b5cfb78ea', - 'mychannel', - '2024-06-10 12:03:31.073+00', - 1, - 'ENDORSER_TRANSACTION', - 0, - '1d70b16b-3a1a-4546-8450-7db5a857f424', - 16 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - 'ebc2b58b-3244-4576-9d5a-acd25ec041d9', - '4246b59dd61f591e35d8bd0359b7a7d157b65826eb43a6a45ed6f1031478cf7b', - 'mychannel', - '2024-06-10 12:04:31.605+00', - 1, - 'ENDORSER_TRANSACTION', - 0, - 'fd151abb-c943-4a60-83ae-43d55b48b6d6', - 17 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - '80c35806-4d2b-4b20-90e0-46c3cbb38ded', - '4b0e2134da73bf9f4c8809b274fd84af85ff5f1a8f2497da40597bb520010b49', - 'mychannel', - '2024-06-10 12:04:35.65+00', - 1, - 'ENDORSER_TRANSACTION', - 0, - '966bb844-f81a-4778-9232-b5c71e1d3903', - 18 - ); - -INSERT INTO - fabric.transaction ( - id, - hash, - channel_id, - "timestamp", - protocol_version, - type, - epoch, - block_id, - block_number - ) -VALUES - ( - '08371e04-4054-48ba-808b-e0c5706aa64c', - 'd2760e8e510d9b3f22fb5abcce88a85048936a95d6e4787d60598264220d5a71', - 'mychannel', - '2024-06-10 12:04:38.37+00', - 1, - 'ENDORSER_TRANSACTION', - 0, - 'ef66a97d-10a8-4195-a169-1cd3e6722ac8', - 19 - ); - --- --- Data for Name: transaction_action; Type: TABLE DATA; Schema: fabric; Owner: postgres --- -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '141be4d2-8460-43b1-8048-b622331bdb0b', - 'ApproveChaincodeDefinitionForMyOrg', - '0x0801120562617369631a05312e302e314a50124e0a4c62617369635f312e302e313a36353062376234663561383534356437313036353164633031656465653863663833353138656634623336613637613038626530363162613134646136353361', - '_lifecycle', - 'Org1MSP', - '53c39873-46ce-44a5-876f-bda47c24ed0c', - '8f85a1ed-047f-470a-a8f6-5468cb568c74' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '6b3420a0-310d-4218-8499-7766411c862e', - 'ApproveChaincodeDefinitionForMyOrg', - '0x0801120562617369631a05312e302e314a50124e0a4c62617369635f312e302e313a36353062376234663561383534356437313036353164633031656465653863663833353138656634623336613637613038626530363162613134646136353361', - '_lifecycle', - 'Org2MSP', - '03fe59e9-9540-4c19-851d-11de61c6ee84', - '763aa5f5-3d5c-4d87-b785-554ce9baa27f' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - 'b5336c96-d69f-4c06-8fef-ec7d0ecc9a06', - 'CommitChaincodeDefinition', - '0x0801120562617369631a05312e302e31', - '_lifecycle', - 'Org2MSP', - '03fe59e9-9540-4c19-851d-11de61c6ee84', - '3da28b37-5817-4e13-b25d-fec29247d105' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - 'e718b8ff-7924-4425-8882-080862a39de0', - 'InitLedger', - '', - 'basic', - 'Org1MSP', - '53c39873-46ce-44a5-876f-bda47c24ed0c', - 'efa0703d-72c6-48fc-bd88-2a19de2f5009' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - 'fa53978f-87b3-4474-89cf-283ee053ee88', - 'ApproveChaincodeDefinitionForMyOrg', - '0x0801120e636f7079417373657454726164651a05312e302e314a5912570a55636f7079417373657454726164655f312e302e313a61326231383362313332363538313065653533666431666131363934613830366465653433363134303461663130373365623362323361333362636361613039', - '_lifecycle', - 'Org1MSP', - '53c39873-46ce-44a5-876f-bda47c24ed0c', - 'c267a857-ab8a-4032-aa0d-4827bd3c1309' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - 'b0f8b304-cadc-4c19-9488-8be5d61df037', - 'ApproveChaincodeDefinitionForMyOrg', - '0x0801120e636f7079417373657454726164651a05312e302e314a5912570a55636f7079417373657454726164655f312e302e313a61326231383362313332363538313065653533666431666131363934613830366465653433363134303461663130373365623362323361333362636361613039', - '_lifecycle', - 'Org2MSP', - '03fe59e9-9540-4c19-851d-11de61c6ee84', - 'ce9da32f-ae2f-401d-8283-9e447ddaf190' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '798a7d3d-8374-49ed-87a2-3986e7675204', - 'CommitChaincodeDefinition', - '0x0801120e636f7079417373657454726164651a05312e302e31', - '_lifecycle', - 'Org2MSP', - '03fe59e9-9540-4c19-851d-11de61c6ee84', - '350c09f7-3d30-432c-b152-bb8bf9496f26' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '12100ece-02d9-4216-ac6a-5abfc9c2acf1', - 'InitLedger', - '', - 'copyAssetTrade', - 'Org1MSP', - 'f1673034-a3cf-47eb-a246-0457da9ee369', - '93453b98-f6ef-404f-b919-c0e4f4269a48' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '2353d5b0-7a69-47ec-8417-27caa677c4b9', - 'ApproveChaincodeDefinitionForMyOrg', - '0x0801121170726976617465417373657454726164651a05312e302e31322e0a2c120c120a080112020800120208011a0d120b0a074f7267314d535010031a0d120b0a074f7267324d535010033aefbfbd020a770a750a0f6173736574436f6c6c656374696f6e122a0a28120c120a080112020800120208011a0b12090a074f7267314d53501a0b12090a074f7267324d53501801200128efbfbdefbfbd3d30013801422a0a28120c120a080112020800120208011a0b12090a074f7267314d53501a0b12090a074f7267324d53500a580a560a184f7267314d535050726976617465436f6c6c656374696f6e12190a17120812060801120208001a0b12090a074f7267314d535020012803300142190a17120812060801120208001a0b12090a074f7267314d53500a580a560a184f7267324d535050726976617465436f6c6c656374696f6e12190a17120812060801120208001a0b12090a074f7267324d535020012803300142190a17120812060801120208001a0b12090a074f7267324d53504a5c125a0a5870726976617465417373657454726164655f312e302e313a39633334323164373963633638613337313031663235363964643635616664333066356664666634313737663166363532313130633861633036633636356462', - '_lifecycle', - 'Org1MSP', - '53c39873-46ce-44a5-876f-bda47c24ed0c', - 'e75ed8b2-4784-4de4-8b9c-ee633161b0b9' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '0e093307-90c1-45ce-835f-20fd4096e442', - 'ApproveChaincodeDefinitionForMyOrg', - '0x0801121170726976617465417373657454726164651a05312e302e31322e0a2c120c120a080112020800120208011a0d120b0a074f7267314d535010031a0d120b0a074f7267324d535010033aefbfbd020a770a750a0f6173736574436f6c6c656374696f6e122a0a28120c120a080112020800120208011a0b12090a074f7267314d53501a0b12090a074f7267324d53501801200128efbfbdefbfbd3d30013801422a0a28120c120a080112020800120208011a0b12090a074f7267314d53501a0b12090a074f7267324d53500a580a560a184f7267314d535050726976617465436f6c6c656374696f6e12190a17120812060801120208001a0b12090a074f7267314d535020012803300142190a17120812060801120208001a0b12090a074f7267314d53500a580a560a184f7267324d535050726976617465436f6c6c656374696f6e12190a17120812060801120208001a0b12090a074f7267324d535020012803300142190a17120812060801120208001a0b12090a074f7267324d53504a5c125a0a5870726976617465417373657454726164655f312e302e313a39633334323164373963633638613337313031663235363964643635616664333066356664666634313737663166363532313130633861633036633636356462', - '_lifecycle', - 'Org2MSP', - '03fe59e9-9540-4c19-851d-11de61c6ee84', - 'a37ddb15-a366-43e3-8bc9-3d3b71b1d54e' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '54554be3-4c3f-4da5-9fc3-8ec8aab321d7', - 'CommitChaincodeDefinition', - '0x0801121170726976617465417373657454726164651a05312e302e31322e0a2c120c120a080112020800120208011a0d120b0a074f7267314d535010031a0d120b0a074f7267324d535010033aefbfbd020a770a750a0f6173736574436f6c6c656374696f6e122a0a28120c120a080112020800120208011a0b12090a074f7267314d53501a0b12090a074f7267324d53501801200128efbfbdefbfbd3d30013801422a0a28120c120a080112020800120208011a0b12090a074f7267314d53501a0b12090a074f7267324d53500a580a560a184f7267314d535050726976617465436f6c6c656374696f6e12190a17120812060801120208001a0b12090a074f7267314d535020012803300142190a17120812060801120208001a0b12090a074f7267314d53500a580a560a184f7267324d535050726976617465436f6c6c656374696f6e12190a17120812060801120208001a0b12090a074f7267324d535020012803300142190a17120812060801120208001a0b12090a074f7267324d5350', - '_lifecycle', - 'Org2MSP', - '03fe59e9-9540-4c19-851d-11de61c6ee84', - 'ac2ce381-3ce9-410b-a4f1-ede6aaa0dab1' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '4a07f3f4-84d9-4bcf-ae56-46d6e9ba213b', - 'TransferAsset', - '0x617373657431,0x73616e6974792d34663133363663362d613463352d343061332d383662362d326662383539373065313762', - 'copyAssetTrade', - 'Org1MSP', - 'f1673034-a3cf-47eb-a246-0457da9ee369', - '7f076209-512c-449c-86fd-8054714750a8' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '6457cd77-90bc-4f43-bc0f-ca031dc050db', - 'TransferAsset', - '0x617373657431,0x6f776e65722d31636232323761652d613732312d346334612d616361322d643866353132373636303434', - 'copyAssetTrade', - 'Org1MSP', - 'f1673034-a3cf-47eb-a246-0457da9ee369', - '54fec888-dd87-49cb-aac3-933f0dcea308' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '241b3d1b-7bc3-4153-a01d-e58100740c40', - 'CreateAsset', - '', - 'privateAssetTrade', - 'Org1MSP', - 'f1673034-a3cf-47eb-a246-0457da9ee369', - '1c060a70-9ccd-4c3b-9ec9-bc9afe8138d9' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '2a7cac22-32c0-47ce-9ffe-f47846369822', - 'TransferAsset', - '0x617373657431,0x73616e6974792d37616265353338352d663336322d343238642d626365362d343166346164346435393336', - 'copyAssetTrade', - 'Org1MSP', - 'a2e26ed7-ee35-4cdb-be8e-013406ca3534', - 'ebc2b58b-3244-4576-9d5a-acd25ec041d9' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - 'b10fdef0-b4ac-4688-8f14-393e75cb9e3f', - 'TransferAsset', - '0x617373657431,0x6f776e65722d61663430383035632d393037312d343164382d623634312d373866393633313664656637', - 'copyAssetTrade', - 'Org1MSP', - 'a2e26ed7-ee35-4cdb-be8e-013406ca3534', - '80c35806-4d2b-4b20-90e0-46c3cbb38ded' - ); - -INSERT INTO - fabric.transaction_action ( - id, - function_name, - function_args, - chaincode_id, - creator_msp_id, - creator_certificate_id, - transaction_id - ) -VALUES - ( - '2f294f12-e991-460e-b873-878631f6e3ba', - 'CreateAsset', - '', - 'privateAssetTrade', - 'Org1MSP', - 'a2e26ed7-ee35-4cdb-be8e-013406ca3534', - '08371e04-4054-48ba-808b-e0c5706aa64c' - ); - --- --- Data for Name: transaction_action_endorsement; Type: TABLE DATA; Schema: fabric; Owner: postgres --- -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '32b57fdf-eb8e-4e84-95eb-6350ab49e4f0', - 'Org1MSP', - '0x304402205f576c57e2c29806c7636e6ed4d9b02e842ccbbd01dd333c8716efa927e74bac022079be4c059a36fba7ef9a767275e7d8e0f020a6898d930a9d9f2ab93a5e0d8a9b', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '141be4d2-8460-43b1-8048-b622331bdb0b' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '931ec147-c3c6-4b98-a9bf-6dbefac27fec', - 'Org2MSP', - '0x3045022100f8999f4a27bdd7f63f81bdf5e7b21bfb2a33d2d2016ba0349db3b3f155e977910220275eb3379f77975c6a1ff330387e7285d0b363e5be5d389b5c856de18a567683', - '68241f33-108d-4cf6-abdd-94b6fe825191', - '6b3420a0-310d-4218-8499-7766411c862e' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '41a0e19c-1486-4416-9276-81f6e92119de', - 'Org1MSP', - '0x3045022100b0a631cd090e32efe65d2b97ec5c778dd22df5c98099017c48e8ce64df10c6dc022019ad2f74ae72be2875ab7cc08d0972f1d8c5ec7349faf1f39d7f00ecfe12fad7', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - 'b5336c96-d69f-4c06-8fef-ec7d0ecc9a06' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '41c16940-e2db-44c7-b388-762883a280cd', - 'Org2MSP', - '0x3044022025a01951ffec26e7927afdd12cf8bd900f41e6c91e07fbbec4521550c5142d8a02206fbb80f8d5f04d249decf1b292f436e54a96e4d5effae70697cdeddc16e933f2', - '68241f33-108d-4cf6-abdd-94b6fe825191', - 'b5336c96-d69f-4c06-8fef-ec7d0ecc9a06' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '2733e680-fec5-4fb1-b32d-47ece4cb7ab7', - 'Org2MSP', - '0x3045022100a21ce9346f584555b96aecba62d9ef36e0d0f86f60b70a15db5113395f4bfbc302207d88c27cf789826467d7af093f5e2c57c0346018d0e6e1078c59960c5e0fba2c', - '68241f33-108d-4cf6-abdd-94b6fe825191', - 'e718b8ff-7924-4425-8882-080862a39de0' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '82a88ab6-5ead-48d3-b35c-0cbf5d8dfc1a', - 'Org1MSP', - '0x3045022100a266ff30b146b4679c564ca70c3f1a030d2e9f802f0ad68a589815487da2737f02203f3f74e200d354ae1684f091112418e72ae0fbb9180ddf79c9f6fb09f4e16181', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - 'e718b8ff-7924-4425-8882-080862a39de0' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '8ef51411-7463-4b6f-bf69-6ba7a4d53c78', - 'Org1MSP', - '0x3045022100d2b3baf9b5d405591b23509b3d626f3ce34f4e180f751fb976e23afd331d172802206d722d28db45a8a1ba078f1ce5fb67afadf7223db54e7aeb8d36efaf0cc6193f', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - 'fa53978f-87b3-4474-89cf-283ee053ee88' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '9be78ffb-4acd-42ac-bd1d-ba1a499e4479', - 'Org2MSP', - '0x3045022100a41e911b1063acc5cab7bd0183162631f6cdd436779df32abf340fc1f886a431022032696fcd6474331a14788dd18b74cfddc0ff7acffc0a77dba46883ccfc24d6d4', - '68241f33-108d-4cf6-abdd-94b6fe825191', - 'b0f8b304-cadc-4c19-9488-8be5d61df037' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - 'f151d7de-77bb-4460-9c43-7ba7c7a227db', - 'Org1MSP', - '0x304402203f7a886d62a76d1b959d1d15f8dc49e007b71259953bf1c018ef736734d142b3022034436509dd9bbd36dc0a3f256eff505213802b0069899514dd2c6177337625b0', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '798a7d3d-8374-49ed-87a2-3986e7675204' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - 'b42fcef0-061c-45af-8d2d-43678ccd4122', - 'Org2MSP', - '0x3044022059ce716e8f141a98027dfa4bca90349d7908d8a11f84ce96045aa019688863fd0220723744bb24b05b377f3197d53e8e9086ddb648ed0e7c0608a89b6f9d367fa4ba', - '68241f33-108d-4cf6-abdd-94b6fe825191', - '798a7d3d-8374-49ed-87a2-3986e7675204' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - 'a98e619b-df6f-4e29-b146-d3a48b9961a5', - 'Org1MSP', - '0x30440220573ac84d386b35816a428894ef91d577134ac935910888fe8d8db3119154c13b02202a5a33a65047f3041e42a6202380c4575b25163a499184ae00aa254caa9b7026', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '12100ece-02d9-4216-ac6a-5abfc9c2acf1' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '2e0b5d24-1a78-44c4-a40d-2a9650be6191', - 'Org2MSP', - '0x304402202b2dbfb13258bb8d43cd96322a296dd2f746b31c9952dbfd3d457fe44c1b51a4022035f9590cdcd6b956c07a7d6c3b52aad0f543ff6960ca9230ecfb1d9f45d3b123', - '68241f33-108d-4cf6-abdd-94b6fe825191', - '12100ece-02d9-4216-ac6a-5abfc9c2acf1' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '2897b046-c535-4bee-ae5b-30ddbe5d0709', - 'Org1MSP', - '0x3045022100d9328f0393e2ea40106fe1b4c9192ec01c68898289806ad88d4be3e36ab537d3022002c148d4cbc2a9d54c18eb6facfdd5cfea778d5d4db06d8329b80a6a5b4c46ea', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '2353d5b0-7a69-47ec-8417-27caa677c4b9' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '4a6436fa-ca75-4cf5-b3e5-91b0fb25541d', - 'Org2MSP', - '0x30440220703d56012c82285f767f8ec549204a70c679ca2a283388de9c259a6194235ce902204300723f79021e45b433511d05ebb5040da15ac783ffee204bbe1033d745624c', - '68241f33-108d-4cf6-abdd-94b6fe825191', - '0e093307-90c1-45ce-835f-20fd4096e442' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - 'bc45a08e-500e-4962-b147-7dd7af6e9e0e', - 'Org1MSP', - '0x304402202939b4fe7ff3490076d241b29445418e4fd65e82281d28f382d97cb3ca29544102202e6fc42fffb6c79e488fa64a682dfcadf37a08c6e46acb6337c69f0668c422de', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '54554be3-4c3f-4da5-9fc3-8ec8aab321d7' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - 'bd48f3e4-d8ab-4066-8f28-dd9eef73cea7', - 'Org2MSP', - '0x304502210099af25b8ca50a978780d0a8411f18b692b5fff010dfdeed06f92f90d0eedac980220486c997493599f6ccc96fc57297272b9a505b28e82f29f6c9663ddcbde8821d6', - '68241f33-108d-4cf6-abdd-94b6fe825191', - '54554be3-4c3f-4da5-9fc3-8ec8aab321d7' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - 'e6fc4db2-3b02-451a-aae8-812657180011', - 'Org1MSP', - '0x3044022031f69fb0f8886471ace47de7a29d122b2c45bc1ac946f2e0fabde1d47002414502205aedd7ce514b4112fb4f2889a742d9c1baf28ea4cde8ac0c1d7bfd5df9506d45', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '4a07f3f4-84d9-4bcf-ae56-46d6e9ba213b' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '5b1546ae-7f6a-4e53-91c7-53f5c44d37a3', - 'Org2MSP', - '0x3044022013213ccb69482b39383d7ebc39d232441dff0aaa4e04d3e61a05458f9235f04c0220639a6be7e4bdbf23fa3aabb1091a2e97a7955c2572bf25724b0cfadbcdd7e647', - '68241f33-108d-4cf6-abdd-94b6fe825191', - '4a07f3f4-84d9-4bcf-ae56-46d6e9ba213b' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - 'a5788226-4c32-4e0d-9531-92f963a27a94', - 'Org1MSP', - '0x3044022072aa04dd848ce9c88ab25e97ad321ea7c4fd42d8d5698c8169da7c62218ff5a70220742cbfb2d65efc7734e8f058c43d575d49f3b8ae30f9735600c72153fdc34b92', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '6457cd77-90bc-4f43-bc0f-ca031dc050db' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '28713ba5-3e13-4e7c-868f-5b1958328caa', - 'Org2MSP', - '0x304402206678b707f6ea97754c3402efb2bdc48da26447c431652f8e056ab26dd3ae1bd002202f72fa7b310da879081a75b8c811eb4fc035affcb23cb1a6a1db7b192f612874', - '68241f33-108d-4cf6-abdd-94b6fe825191', - '6457cd77-90bc-4f43-bc0f-ca031dc050db' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - 'd34ffff0-c222-4706-82f4-ad8a1f748dc6', - 'Org1MSP', - '0x3045022100e2d87165940bdc4ffdf8c911fff3d61105bf7fa91daaf7cc87609d113e374786022077cf2f89a572449ac606144ba47dbc2af1b23350a58e4038b46fd43bae222b2c', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '241b3d1b-7bc3-4153-a01d-e58100740c40' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '10e9d190-6439-4a5f-8c16-4592c2cc099f', - 'Org1MSP', - '0x3045022100d668c8e0a325dc1f86c78b9732d5c488d245b38e32e4eb0707a5c35da94058ed02202da6c47ea1b4a8925269a9b6b66daef4b65f8cc579ae0ea0706ae2bfba104c63', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '2a7cac22-32c0-47ce-9ffe-f47846369822' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '27f2c324-ab41-4232-840b-d87c8a1533d8', - 'Org2MSP', - '0x3045022100ea7ec9afc68fc351bffdb0a1122eb92746c8cbd9eb10710e244eeb4b6ebbb64d022074a9d782f95a84b3b018a84360e9c5dd7927a7a04c6bde5ebdaa4f6d1755eb54', - '68241f33-108d-4cf6-abdd-94b6fe825191', - '2a7cac22-32c0-47ce-9ffe-f47846369822' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - 'b15d9aa7-1bb6-452d-8703-694b6a61512e', - 'Org1MSP', - '0x304402207bc491ac9b595f4a52fe7345cecc1227f5a90cfe2956de47b1c9c63e51b6e8db022067c65a8a6ee36a8cfcf0246bf84fe55ee83bf8af15c92c70c9c3f25ed79c995b', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - 'b10fdef0-b4ac-4688-8f14-393e75cb9e3f' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - 'ce7f0b38-6abb-4995-812d-0defe47b0452', - 'Org2MSP', - '0x30440220226666fe809aac06003fa102f0b4475abaf5ef1dda14142dcea6a87acc05d7ea02200bfaae7a248323236e7468882d80669c4f8e992493ea0a90397bbee6e2bfafa9', - '68241f33-108d-4cf6-abdd-94b6fe825191', - 'b10fdef0-b4ac-4688-8f14-393e75cb9e3f' - ); - -INSERT INTO - fabric.transaction_action_endorsement ( - id, - mspid, - signature, - certificate_id, - transaction_action_id - ) -VALUES - ( - '6ccb765e-74f6-40e1-8d4f-2d8e16632b9e', - 'Org1MSP', - '0x3045022100c4394729927c583d80ed969f8f7234e3c408ee21f45e9b59ff13fe30a1af099002205f5063955dda064fbe1b53b487185f5c6d16aacc29085560b8e7f2a71af68781', - '85b5e29c-26bf-43fd-b0b2-ba49502e0829', - '2f294f12-e991-460e-b873-878631f6e3ba' - ); - --- --- Data for Name: plugin_status; Type: TABLE DATA; Schema: public; Owner: postgres --- -INSERT INTO - public.plugin_status ( - name, - last_instance_id, - is_schema_initialized, - created_at, - last_connected_at - ) -VALUES - ( - 'PluginPersistenceFabric', - 'functional-test', - true, - '2024-06-07 13:26:34.197062+00', - '2024-06-10 12:00:39.545859+00' - ); \ No newline at end of file diff --git a/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabrc-postgresql-db-client.test.ts b/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabrc-postgresql-db-client.test.ts deleted file mode 100644 index 0885997c4e..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabrc-postgresql-db-client.test.ts +++ /dev/null @@ -1,380 +0,0 @@ -/** - * Test for accessing data in PostgreSQL through persistence plugin PostgresDatabaseClient (packages/cactus-plugin-persistence-fabric). - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -const postgresImageName = "postgres"; -const postgresImageVersion = "14.6-alpine"; -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; -const setupTimeout = 1000 * 60 * 3; // 3 minutes timeout for setup - -import { - pruneDockerAllIfGithubAction, - PostgresTestContainer, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; - -import PostgresDatabaseClient from "../../../main/typescript/db-client/db-client"; - -import "jest-extended"; -import { invalidSampleBlock, sampleBlock } from "./sample-block"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "persistence-fabric-postgresql-db-client.test", - level: testLogLevel, -}); - -describe("Fabric persistence PostgreSQL PostgresDatabaseClient tests", () => { - const testPluginName = "TestPlugin"; - const testPluginInstanceId = "testInstance"; - let postgresContainer: PostgresTestContainer; - let dbClient: PostgresDatabaseClient; - - ////////////////////////////////// - // Helper Functions - ////////////////////////////////// - - /** - * Delete all data from all tables - */ - async function clearDbSchema() { - await dbClient.client.query( - "DELETE FROM fabric.transaction_action_endorsement", - ); - await dbClient.client.query("DELETE FROM fabric.transaction_action"); - await dbClient.client.query("DELETE FROM fabric.transaction"); - await dbClient.client.query("DELETE FROM fabric.certificate"); - await dbClient.client.query("DELETE FROM fabric.block"); - } - - function checkDbCertificateObject(dbCert: any, sampleCert: any) { - expect(dbCert.id).toBeTruthy(); - expect(dbCert.serial_number).toEqual(sampleCert.serialNumber); - expect(dbCert.subject_alt_name).toEqual(sampleCert.subjectAltName); - expect(dbCert.valid_from).toEqual(new Date(sampleCert.validFrom)); - expect(dbCert.valid_to).toEqual(new Date(sampleCert.validTo)); - expect(dbCert.pem).toEqual(sampleCert.pem); - } - - async function getDbBlocks() { - const response = await dbClient.client.query("SELECT * FROM fabric.block"); - return response.rows; - } - - async function getDbTransactions() { - const response = await dbClient.client.query( - "SELECT * FROM fabric.transaction", - ); - return response.rows; - } - - async function getDbTransactionActions() { - const response = await dbClient.client.query( - "SELECT * FROM fabric.transaction_action", - ); - return response.rows; - } - - async function getDbTransactionActionEndorsements() { - const response = await dbClient.client.query( - "SELECT * FROM fabric.transaction_action_endorsement", - ); - return response.rows; - } - - async function getDbCertificates() { - const response = await dbClient.client.query( - "SELECT * FROM fabric.certificate", - ); - return response.rows; - } - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - log.info("Run PostgresTestContainer..."); - postgresContainer = new PostgresTestContainer({ - imageName: postgresImageName, - imageVersion: postgresImageVersion, - logLevel: testLogLevel, - envVars: ["POSTGRES_USER=postgres", "POSTGRES_PASSWORD=postgres"], - }); - await postgresContainer.start(); - const postgresPort = await postgresContainer.getPostgresPort(); - expect(postgresPort).toBeTruthy(); - log.info(`Postgres running at 127.0.0.1:${postgresPort}`); - - log.info("Create PostgresDatabaseClient"); - dbClient = new PostgresDatabaseClient({ - connectionString: `postgresql://postgres:postgres@127.0.0.1:${postgresPort}/postgres`, - logLevel: sutLogLevel, - }); - - log.info("Connect the PostgreSQL PostgresDatabaseClient"); - await dbClient.connect(); - - log.info("Mock Supabase schema"); - // We use plain postgres for better performance, but the actual GUI will use Supabase which does it's own adjustment to the DB. - await dbClient.client.query( - `CREATE SCHEMA extensions; - CREATE EXTENSION IF NOT EXISTS "uuid-ossp" SCHEMA extensions; - CREATE ROLE anon NOLOGIN; - CREATE ROLE authenticated NOLOGIN; - CREATE ROLE service_role NOLOGIN; - CREATE ROLE supabase_admin NOLOGIN;`, - ); - - log.info("Initialize the test DB Schema"); - await dbClient.initializePlugin(testPluginName, testPluginInstanceId); - - // Assert all tables are created - const response = await dbClient.client.query( - "SELECT table_name FROM information_schema.tables WHERE table_schema = 'fabric'", - ); - const tableNames = response.rows.map((row) => row.table_name); - expect(tableNames.sort()).toEqual( - [ - "block", - "certificate", - "transaction", - "transaction_action", - "transaction_action_endorsement", - ].sort(), - ); - - // Assert plugin status was inserted - const pluginStatus = await dbClient.getPluginStatus(testPluginName); - expect(pluginStatus).toBeTruthy(); - expect(pluginStatus.name).toEqual(testPluginName); - expect(pluginStatus.last_instance_id).toEqual(testPluginInstanceId); - expect(pluginStatus.is_schema_initialized).toBeTrue(); - expect(pluginStatus.created_at).toEqual(pluginStatus.last_connected_at); - - log.info("Ensure DB Schema is empty (in case test is re-run on same DB"); - await clearDbSchema(); - }, setupTimeout); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (dbClient) { - log.info("Disconnect the PostgresDatabaseClient"); - await dbClient.shutdown(); - } - - if (postgresContainer) { - log.info("Stop PostgreSQL..."); - await postgresContainer.stop(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }, setupTimeout); - - afterEach(async () => { - await clearDbSchema(); - }, setupTimeout); - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - test("Initialize plugin can be called repeatedly and it only updates the last_connected_at", async () => { - const initPluginStatus = await dbClient.getPluginStatus(testPluginName); - expect(initPluginStatus).toBeTruthy(); - - await dbClient.initializePlugin(testPluginName, testPluginInstanceId); - - // Assert plugin status was inserted - const pluginStatus = await dbClient.getPluginStatus(testPluginName); - expect(pluginStatus).toBeTruthy(); - const lastConnectedAt = pluginStatus.last_connected_at; - delete (pluginStatus as any).last_connected_at; - expect(initPluginStatus).toMatchObject(pluginStatus); - expect(lastConnectedAt).not.toEqual(initPluginStatus.last_connected_at); - }); - - // Note: it should also print a warning but we don't assert that - test("Initialize plugin updates instance ID when it changes", async () => { - const newInstanceId = "AnotherInstance"; - const initPluginStatus = await dbClient.getPluginStatus(testPluginName); - expect(initPluginStatus).toBeTruthy(); - - await dbClient.initializePlugin(testPluginName, newInstanceId); - - // Assert plugin status was inserted - const pluginStatus = await dbClient.getPluginStatus(testPluginName); - expect(pluginStatus).toBeTruthy(); - const { last_connected_at, last_instance_id } = pluginStatus; - delete (pluginStatus as any).last_connected_at; - delete (pluginStatus as any).last_instance_id; - expect(initPluginStatus).toMatchObject(pluginStatus); - expect(last_connected_at).not.toEqual(initPluginStatus.last_connected_at); - expect(last_instance_id).toEqual(newInstanceId); - }); - - test("New block data is added to the DB", async () => { - await dbClient.insertBlockData(sampleBlock); - - // Assert block - const blocksResponse = await getDbBlocks(); - expect(blocksResponse.length).toBe(1); - const dbBlock = blocksResponse[0]; - - expect(dbBlock.id).toBeTruthy(); - expect(dbBlock.number).toEqual(sampleBlock.blockNumber.toString()); - expect(dbBlock.hash).toEqual(sampleBlock.blockHash); - expect(dbBlock.transaction_count).toEqual( - sampleBlock.transactionCount.toString(), - ); - - // Assert transactions - const transactionsResponse = await getDbTransactions(); - expect(sampleBlock.cactiTransactionsEvents.length).toBe(1); - expect(transactionsResponse.length).toBe(1); - const dbTx = transactionsResponse[0]; - const sampleTx = sampleBlock.cactiTransactionsEvents[0]; - - expect(dbTx.id).toBeTruthy(); - expect(dbTx.hash).toEqual(sampleTx.hash); - expect(dbTx.channel_id).toEqual(sampleTx.channelId); - expect(dbTx.timestamp).toEqual(new Date(sampleTx.timestamp)); - expect(dbTx.protocol_version).toEqual(sampleTx.protocolVersion); - expect(dbTx.type).toEqual(sampleTx.transactionType); - expect(dbTx.epoch).toEqual(sampleTx.epoch.toString()); - expect(dbTx.block_id).toBeTruthy(); - expect(dbTx.block_number).toEqual(sampleBlock.blockNumber.toString()); - - // Assert transaction actions - const transactionActionsResponse = await getDbTransactionActions(); - expect(sampleTx.actions.length).toBe(1); - expect(transactionActionsResponse.length).toBe(1); - const dbTxAction = transactionActionsResponse[0]; - const sampleTxAction = sampleTx.actions[0]; - - expect(dbTxAction.id).toBeTruthy(); - expect(dbTxAction.function_name).toEqual(sampleTxAction.functionName); - const dbActionArgs = dbTxAction.function_args.split(","); - for (let i = 0; i < dbActionArgs.length; i++) { - expect( - Buffer.from(dbActionArgs[i].substring(2), "hex").toString("utf-8"), - ).toEqual(sampleTxAction.functionArgs[i]); - } - expect(dbTxAction.chaincode_id).toEqual(sampleTxAction.chaincodeId); - expect(dbTxAction.creator_msp_id).toEqual(sampleTxAction.creator.mspid); - expect(dbTxAction.creator_certificate_id).toBeTruthy(); - expect(dbTxAction.transaction_id).toBeTruthy(); - - // Assert transaction action endorsement - const transactionActionEndorsementResponse = - await getDbTransactionActionEndorsements(); - expect(sampleTxAction.endorsements.length).toBe(1); - expect(transactionActionEndorsementResponse.length).toBe(1); - const dbTxActionEndorsement = transactionActionEndorsementResponse[0]; - const sampleTxActionEndorsement = sampleTxAction.endorsements[0]; - - expect(dbTxActionEndorsement.id).toBeTruthy(); - expect(dbTxActionEndorsement.mspid).toEqual( - sampleTxActionEndorsement.signer.mspid, - ); - expect(dbTxActionEndorsement.signature).toEqual( - sampleTxActionEndorsement.signature, - ); - expect(dbTxActionEndorsement.certificate_id).toBeTruthy(); - expect(dbTxActionEndorsement.transaction_action_id).toBeTruthy(); - - // Assert certificates - const certificatesResponse = await getDbCertificates(); - expect(certificatesResponse.length).toBe(2); - - const actionCreatorCert = certificatesResponse.find( - (c) => c.serial_number === sampleTxAction.creator.cert.serialNumber, - ); - checkDbCertificateObject(actionCreatorCert, sampleTxAction.creator.cert); - - const endorserCert = certificatesResponse.find( - (c) => - c.serial_number === sampleTxActionEndorsement.signer.cert.serialNumber, - ); - checkDbCertificateObject( - endorserCert, - sampleTxActionEndorsement.signer.cert, - ); - }); - - test("insertBlockData does not duplicate certificates in the database", async () => { - await dbClient.insertBlockData(sampleBlock); - - // should add two certificates from sample block - expect((await getDbCertificates()).length).toBe(2); - - // clear all other data - await dbClient.client.query( - "DELETE FROM fabric.transaction_action_endorsement", - ); - await dbClient.client.query("DELETE FROM fabric.transaction_action"); - await dbClient.client.query("DELETE FROM fabric.transaction"); - await dbClient.client.query("DELETE FROM fabric.block"); - - // add the block again - await dbClient.insertBlockData(sampleBlock); - - // should not duplicate certificates - expect((await getDbCertificates()).length).toBe(2); - }); - - test("insertBlockData atomic transaction is reverted on error", async () => { - try { - await dbClient.insertBlockData(invalidSampleBlock as any); - expect(true).toBe(false); // Block insertion should fail - } catch (error: unknown) { - log.info("insertBlockData was rejected as expected"); - } - - // Assert no data was added - expect((await getDbBlocks()).length).toBe(0); - expect((await getDbCertificates()).length).toBe(0); - expect((await getDbTransactions()).length).toBe(0); - expect((await getDbTransactionActions()).length).toBe(0); - expect((await getDbTransactionActionEndorsements()).length).toBe(0); - }); - - test("getBlock returns a block from the database", async () => { - await dbClient.insertBlockData(sampleBlock); - - const block = await dbClient.getBlock(sampleBlock.blockNumber); - - expect(block.id).toBeTruthy(); - expect(block.number).toEqual(sampleBlock.blockNumber.toString()); - expect(block.hash).toEqual(sampleBlock.blockHash); - expect(block.transaction_count).toEqual( - sampleBlock.transactionCount.toString(), - ); - }); - - test("getMissingBlocksInRange returns all missing block list", async () => { - await dbClient.insertBlockData(sampleBlock); - expect(sampleBlock.blockNumber).toEqual(3); // sanity check sample data did not change - - const missingBlocks = await dbClient.getMissingBlocksInRange(1, 5); - - const missingBlocksNumbers = missingBlocks - .map((b) => b.block_number) - .sort(); - expect(missingBlocksNumbers).toEqual([1, 2, 4, 5]); - }); -}); diff --git a/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-functional.test.ts b/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-functional.test.ts deleted file mode 100644 index 94f77b6531..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-functional.test.ts +++ /dev/null @@ -1,423 +0,0 @@ -/** - * Functional test of basic operations on fabric persistence plugin (packages/cactus-plugin-persistence-fabric). - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; -const ledgerChannelName = "mychannel"; -const assetTradeContractName = "copyAssetTrade"; -const setupTimeout = 1000 * 60 * 6; // 6 minutes timeout for setup -const testTimeout = 1000 * 60 * 6; // 6 minutes timeout for some async tests - -// For development on local sawtooth network -// 1. leaveLedgerRunning = true, useRunningLedger = false to run ledger and leave it running after test finishes. -// 2. leaveLedgerRunning = true, useRunningLedger = true to use that ledger in future runs. -const useRunningLedger = false; -const leaveLedgerRunning = false; - -import "jest-extended"; -import http from "http"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { Server as SocketIoServer } from "socket.io"; - -import { - Containers, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - LoggerProvider, - Logger, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { Constants, Configuration } from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - DefaultEventHandlerStrategy, - FabricApiClient, - FabricContractInvocationType, - FabricSigningCredential, - PluginLedgerConnectorFabric, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -import DatabaseClient from "../../../main/typescript/db-client/db-client"; -jest.mock("../../../main/typescript/db-client/db-client"); -const DatabaseClientMock = DatabaseClient as unknown as jest.Mock; -import { PluginPersistenceFabric } from "../../../main/typescript"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "persistence-fabric-functional.test", - level: testLogLevel, -}); - -describe("Fabric persistence plugin tests", () => { - let ledger: FabricTestLedgerV1; - let signingCredential: FabricSigningCredential; - let fabricConnectorPlugin: PluginLedgerConnectorFabric; - let connectorServer: http.Server; - let dbClientInstance: any; - let socketioServer: SocketIoServer; - let apiClient: FabricApiClient; - let instanceId: string; - let persistence: PluginPersistenceFabric; - - ////////////////////////////////// - // Helper Functions - ////////////////////////////////// - - /** - * Remove all mocks setup on the test DB Client instance. - */ - function clearMockMetadata() { - for (const mockMethodName in dbClientInstance) { - const mockMethod = dbClientInstance[mockMethodName]; - if ("mockClear" in mockMethod) { - mockMethod.mockClear(); - } - } - } - - async function createNewAsset() { - const newAssetId = `asset_${(Math.random() + 1).toString(36).substring(2)}`; - const sendResponse = await apiClient.runTransactionV1({ - signingCredential, - channelName: ledgerChannelName, - contractName: assetTradeContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "CreateAsset", - params: [newAssetId, "yellow", "11", "foo", "199"], - }); - expect(sendResponse).toBeTruthy(); - expect(sendResponse.data).toBeTruthy(); - expect(sendResponse.status).toEqual(200); - } - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - // Start Ledger - log.info("Start FabricTestLedgerV1..."); - log.debug("Fabric Version:", FABRIC_25_LTS_AIO_FABRIC_VERSION); - ledger = new FabricTestLedgerV1({ - emitContainerLogs: false, - publishAllPorts: true, - logLevel: testLogLevel, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - useRunningLedger, - }); - log.debug("Fabric image:", ledger.getContainerImageName()); - await ledger.start(); - - // Get connection profile - log.info(`Get fabric connection profile for Org1...`); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - log.debug("Fabric connection profile for Org1 OK: %o", connectionProfile); - expect(connectionProfile).toBeTruthy(); - - // Enroll admin and user - const userOrg = "org1"; - const enrollAdminOut = await ledger.enrollAdminV2({ - organization: userOrg, - }); - log.debug("Enrolled admin OK."); - const adminWallet = enrollAdminOut[1]; - const userId = `testUser_${(Math.random() + 1).toString(36).substring(2)}`; - const [userIdentity] = await ledger.enrollUserV2({ - enrollmentID: userId, - organization: userOrg, - wallet: adminWallet, - }); - log.debug(`Enrolled user '${userId}' OK.`); - - // Create Keychain Plugin - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - logLevel: sutLogLevel, - backend: new Map([[keychainEntryKey, JSON.stringify(userIdentity)]]), - }); - signingCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - // Create Connector Plugin - fabricConnectorPlugin = new PluginLedgerConnectorFabric({ - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - sshConfig: await ledger.getSshConfig(), - cliContainerEnv: {}, - peerBinary: "/fabric-samples/bin/peer", - logLevel: sutLogLevel, - connectionProfile, - discoveryOptions: { - enabled: true, - asLocalhost: true, - }, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAnyfortx, - commitTimeout: 300, - }, - }); - - // Run http server - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - connectorServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: connectorServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const apiHost = `http://${addressInfo.address}:${addressInfo.port}`; - - // Run socketio server - socketioServer = new SocketIoServer(connectorServer, { - path: Constants.SocketIoConnectionPathV1, - }); - - // Register services - await fabricConnectorPlugin.getOrCreateWebServices(); - await fabricConnectorPlugin.registerWebServices(expressApp, socketioServer); - - // Create ApiClient - const apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new FabricApiClient(apiConfig); - - // Deploy contract asset-transfer-basic - if (!useRunningLedger) { - const cmd = [ - "./network.sh", - "deployCC", - "-ccn", - assetTradeContractName, - "-ccp", - "../asset-transfer-basic/chaincode-go", - "-ccl", - "go", - ]; - const out = await Containers.exec( - ledger.getContainer(), - cmd, - 180000, - sutLogLevel, - "/fabric-samples/test-network/", - ); - expect(out).toBeTruthy(); - - const initResponse = await apiClient.runTransactionV1({ - signingCredential, - channelName: ledgerChannelName, - contractName: assetTradeContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "InitLedger", - params: [], - }); - expect(initResponse).toBeTruthy(); - expect(initResponse.data).toBeTruthy(); - expect(initResponse.status).toEqual(200); - log.info("Asset trade initialized"); - } - - // Create persistence plugin - instanceId = "functional-test"; - DatabaseClientMock.mockClear(); - persistence = new PluginPersistenceFabric({ - apiClient, - logLevel: sutLogLevel, - instanceId, - connectionString: "db-is-mocked", - channelName: ledgerChannelName, - gatewayOptions: { - identity: signingCredential.keychainRef, - wallet: { - keychain: signingCredential, - }, - }, - }); - expect(DatabaseClientMock).toHaveBeenCalledTimes(1); - dbClientInstance = DatabaseClientMock.mock.instances[0]; - expect(dbClientInstance).toBeTruthy(); - }, setupTimeout); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (persistence) { - log.info("Stop persistence plugin..."); - await persistence.shutdown(); - } - - if (connectorServer) { - log.info("Stop connector http servers..."); - await Servers.shutdown(connectorServer); - } - - if (fabricConnectorPlugin) { - log.info("Stop the connector..."); - await fabricConnectorPlugin.shutdown(); - } - - if (ledger && !leaveLedgerRunning) { - log.info("Stop the fabric ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }, setupTimeout); - - beforeEach(() => { - clearMockMetadata(); - }, setupTimeout); - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - test("Basic methods test", async () => { - // getInstanceId() - expect(persistence.getInstanceId()).toEqual(instanceId); - - // getPackageName() - expect(persistence.getPackageName()).toEqual( - "@hyperledger/cactus-plugin-persistence-fabric", - ); - - // getOpenApiSpec() - expect(persistence.getOpenApiSpec()).toBeTruthy(); - }); - - test("onPluginInit creates a DB schema", async () => { - await persistence.onPluginInit(); - - // DB Schema initialized - const initDBCalls = dbClientInstance.initializePlugin.mock.calls; - expect(initDBCalls.length).toBe(1); - }); - - test("Initial plugin status is correct", async () => { - await persistence.onPluginInit(); - - const status = persistence.getStatus(); - expect(status).toBeTruthy(); - expect(status.instanceId).toEqual(instanceId); - expect(status.connected).toBeTrue(); - expect(status.webServicesRegistered).toBeFalse(); // We don't init the services in this test - expect(status.operationsRunning).toBeEmpty(); - expect(status.monitorRunning).toBeFalse(); - expect(status.lastSeenBlock).toEqual(0); - }); - - test( - "Calling syncAll adds new tracked operation that is reported in plugin status", - async () => { - // Freeze on getMissingBlocksInRange method until status is checked - let isStatusChecked = false; - ( - dbClientInstance.getMissingBlocksInRange as jest.Mock - ).mockImplementation(async () => { - while (!isStatusChecked) { - await new Promise((resolve) => setTimeout(resolve, 1000)); - } - - return []; - }); - - const syncAllPromise = persistence.syncAll(); - - try { - // Wait for method to be called - await new Promise((resolve) => setTimeout(resolve, 3000)); - - // Check if syncAll operation is present - const status = persistence.getStatus(); - expect(status).toBeTruthy(); - expect(status.operationsRunning.length).toEqual(1); - const trackedOperation = status.operationsRunning[0]; - expect(trackedOperation.startAt).toBeTruthy(); - expect(trackedOperation.operation).toEqual("syncAll"); - } finally { - // Always finish the syncAll call - isStatusChecked = true; - await syncAllPromise; - } - - const statusAfterFinish = persistence.getStatus(); - expect(statusAfterFinish).toBeTruthy(); - expect(statusAfterFinish.operationsRunning.length).toEqual(0); - }, - testTimeout, - ); - - test( - "Block monitoring detects new changes correctly.", - async () => { - const insertBlockPromise = new Promise((resolve, reject) => { - (dbClientInstance.getMissingBlocksInRange as jest.Mock).mockReturnValue( - [], - ); - - (dbClientInstance.insertBlockData as jest.Mock).mockImplementation( - (blockData) => resolve(blockData), - ); - - persistence.startMonitor((err) => { - reject(err); - }); - log.debug("Persistence plugin block monitoring started."); - }); - - // Wait for monitor to get started - await new Promise((resolve) => setTimeout(resolve, 3000)); - - // Trigger new block - await createNewAsset(); - log.debug("New asset has been created to trigger new tx"); - - const blockData = await insertBlockPromise; - log.error("blockData was inserted:", blockData); - expect(blockData.blockNumber).toBeTruthy(); - expect(blockData.blockHash).toBeTruthy(); - expect(blockData.previousBlockHash).toBeTruthy(); - expect(blockData.cactiTransactionsEvents).toBeDefined(); - - // Check if status reports that monitor is running - const status = persistence.getStatus(); - expect(status).toBeTruthy(); - expect(status.monitorRunning).toBeTrue(); - - // Check if status reports monitor is not running after stopMonitor is called - persistence.stopMonitor(); - const statusAfterStop = persistence.getStatus(); - expect(statusAfterStop).toBeTruthy(); - expect(statusAfterStop.monitorRunning).toBeFalse(); - }, - testTimeout, - ); -}); diff --git a/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/sample-block.ts b/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/sample-block.ts deleted file mode 100644 index b474e0d55e..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/sample-block.ts +++ /dev/null @@ -1,106 +0,0 @@ -export const sampleBlock = { - blockNumber: 3, - blockHash: - "0xe6656aa10d9f73fde8db5b0ce6bba9a2bc3118c72ef9d69b53b9f7c512139d60", - previousBlockHash: - "0xf8c0f8c4d4ae2f3c2140a1e63d940734d27549fa8829e1c5c994bcc3182f0caa", - transactionCount: 1, - cactiTransactionsEvents: [ - { - hash: "4affb3661c2a8075e52e8e6826e1768616bb1f8c588b1baa54368a3996a54de8", - channelId: "mychannel", - timestamp: "2024-06-10T10:55:26.036Z", - protocolVersion: 0, - transactionType: "ENDORSER_TRANSACTION", - epoch: 0, - actions: [ - { - functionName: "MyFunctionName", - functionArgs: ["foo", "bar"], - chaincodeId: "myChaincode", - creator: { - mspid: "Org1MSP", - cert: { - serialNumber: "16C8C9A05A2B7EFA6ED794F28A2FBCE6DED1C86C", - subject: - "C=US\nST=North Carolina\nO=Hyperledger\nOU=admin\nCN=org1admin", - issuer: - "C=US\nST=North Carolina\nL=Durham\nO=org1.example.com\nCN=ca.org1.example.com", - subjectAltName: "DNS:9071369d9d11", - validFrom: "Jun 10 10:50:00 2024 GMT", - validTo: "Jun 10 10:55:00 2025 GMT", - pem: "-----BEGIN CERTIFICATE-----\nMIICqTCCAlCgAwIBAgIUFsjJoForfvpu15Tyii+85t7RyGwwCgYIKoZIzj0EAwIw\ncDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH\nEwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMjQwNjEwMTA1MDAwWhcNMjUwNjEwMTA1NTAw\nWjBgMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExFDASBgNV\nBAoTC0h5cGVybGVkZ2VyMQ4wDAYDVQQLEwVhZG1pbjESMBAGA1UEAxMJb3JnMWFk\nbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEaCjVDW8X3Fpa7lXTrjNACJG\nmslK1ppx9uzh9Fqk2lLN7GxcJSi2hcIyTK9+udwbRynDHl1HgMG/fLBfqrkCNKOB\n1zCB1DAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUTw/b\nSs21vEgoQbb2wnwXF4DkCTEwHwYDVR0jBBgwFoAUgN29gMPVb3dfnq0ngxTg67qy\niQkwFwYDVR0RBBAwDoIMOTA3MTM2OWQ5ZDExMFsGCCoDBAUGBwgBBE97ImF0dHJz\nIjp7ImhmLkFmZmlsaWF0aW9uIjoiIiwiaGYuRW5yb2xsbWVudElEIjoib3JnMWFk\nbWluIiwiaGYuVHlwZSI6ImFkbWluIn19MAoGCCqGSM49BAMCA0cAMEQCIGzNQ3Ut\niHpsKZzzIadYTY7TlC7FliD+XI89FyzM2RqoAiALJ2yU42wNnfrRuByQQN9cHz1j\nArKZknDfP6HYxUS0RQ==\n-----END CERTIFICATE-----\n", - }, - }, - endorsements: [ - { - signer: { - mspid: "Org1MSP", - cert: { - serialNumber: "3D697828B3244EDC75A95CCC30FC5013B904F6E5", - subject: - "C=US\nST=North Carolina\nO=Hyperledger\nOU=peer\nCN=peer0", - issuer: - "C=US\nST=North Carolina\nL=Durham\nO=org1.example.com\nCN=ca.org1.example.com", - subjectAltName: "DNS:9071369d9d11", - validFrom: "Jun 10 10:50:00 2024 GMT", - validTo: "Jun 10 10:55:00 2025 GMT", - pem: "-----BEGIN CERTIFICATE-----\nMIICnzCCAkagAwIBAgIUPWl4KLMkTtx1qVzMMPxQE7kE9uUwCgYIKoZIzj0EAwIw\ncDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH\nEwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMjQwNjEwMTA1MDAwWhcNMjUwNjEwMTA1NTAw\nWjBbMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExFDASBgNV\nBAoTC0h5cGVybGVkZ2VyMQ0wCwYDVQQLEwRwZWVyMQ4wDAYDVQQDEwVwZWVyMDBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABOBN1m+Sd4tJgk7cj/2tjncS0DDaZrpB\nXScgGyyvFu7WvUNAX5huTiUcP6RPnfQ2op1fgaPvHwVWQ4sLwU3wYqSjgdIwgc8w\nDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFOWzZpC41lih\n5kCb9Dhd/w626Ve7MB8GA1UdIwQYMBaAFIDdvYDD1W93X56tJ4MU4Ou6sokJMBcG\nA1UdEQQQMA6CDDkwNzEzNjlkOWQxMTBWBggqAwQFBgcIAQRKeyJhdHRycyI6eyJo\nZi5BZmZpbGlhdGlvbiI6IiIsImhmLkVucm9sbG1lbnRJRCI6InBlZXIwIiwiaGYu\nVHlwZSI6InBlZXIifX0wCgYIKoZIzj0EAwIDRwAwRAIgCNafIs0XRatMvyu1Mj62\n4LVXfIgyolfaFaOZaFtjJdYCIA4bciJH/vMOdbxoAbNr7B83P1GEfHLdmd2yy7D1\nVi3u\n-----END CERTIFICATE-----\n", - }, - }, - signature: - "0x304402205f576c57e2c29806c7636e6ed4d9b02e842ccbbd01dd333c8716efa927e74bac022079be4c059a36fba7ef9a767275e7d8e0f020a6898d930a9d9f2ab93a5e0d8a9b", - }, - ], - }, - ], - }, - ], -}; - -export const invalidSampleBlock = { - blockNumber: 3, - blockHash: - "0xe6656aa10d9f73fde8db5b0ce6bba9a2bc3118c72ef9d69b53b9f7c512139d60", - previousBlockHash: - "0xf8c0f8c4d4ae2f3c2140a1e63d940734d27549fa8829e1c5c994bcc3182f0caa", - transactionCount: 1, - cactiTransactionsEvents: [ - { - hash: "4affb3661c2a8075e52e8e6826e1768616bb1f8c588b1baa54368a3996a54de8", - channelId: "mychannel", - timestamp: "2024-06-10T10:55:26.036Z", - protocolVersion: 0, - type: "ENDORSER_TRANSACTION", - epoch: 0, - actions: [ - { - functionName: "MyFunctionName", - functionArgs: ["foo", "bar"], - chaincodeId: "myChaincode", - creator: { - mspid: "Org1MSP", - cert: { - serialNumber: "16C8C9A05A2B7EFA6ED794F28A2FBCE6DED1C86C", - subject: - "C=US\nST=North Carolina\nO=Hyperledger\nOU=admin\nCN=org1admin", - issuer: - "C=US\nST=North Carolina\nL=Durham\nO=org1.example.com\nCN=ca.org1.example.com", - subjectAltName: "DNS:9071369d9d11", - validFrom: "Jun 10 10:50:00 2024 GMT", - validTo: "Jun 10 10:55:00 2025 GMT", - pem: "-----BEGIN CERTIFICATE-----\nMIICqTCCAlCgAwIBAgIUFsjJoForfvpu15Tyii+85t7RyGwwCgYIKoZIzj0EAwIw\ncDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH\nEwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMjQwNjEwMTA1MDAwWhcNMjUwNjEwMTA1NTAw\nWjBgMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExFDASBgNV\nBAoTC0h5cGVybGVkZ2VyMQ4wDAYDVQQLEwVhZG1pbjESMBAGA1UEAxMJb3JnMWFk\nbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEaCjVDW8X3Fpa7lXTrjNACJG\nmslK1ppx9uzh9Fqk2lLN7GxcJSi2hcIyTK9+udwbRynDHl1HgMG/fLBfqrkCNKOB\n1zCB1DAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUTw/b\nSs21vEgoQbb2wnwXF4DkCTEwHwYDVR0jBBgwFoAUgN29gMPVb3dfnq0ngxTg67qy\niQkwFwYDVR0RBBAwDoIMOTA3MTM2OWQ5ZDExMFsGCCoDBAUGBwgBBE97ImF0dHJz\nIjp7ImhmLkFmZmlsaWF0aW9uIjoiIiwiaGYuRW5yb2xsbWVudElEIjoib3JnMWFk\nbWluIiwiaGYuVHlwZSI6ImFkbWluIn19MAoGCCqGSM49BAMCA0cAMEQCIGzNQ3Ut\niHpsKZzzIadYTY7TlC7FliD+XI89FyzM2RqoAiALJ2yU42wNnfrRuByQQN9cHz1j\nArKZknDfP6HYxUS0RQ==\n-----END CERTIFICATE-----\n", - }, - }, - endorsements: [ - { - signer: { - foo: "Org1MSP", - }, - }, - ], - }, - ], - }, - ], -}; diff --git a/packages/cactus-plugin-persistence-fabric/src/test/typescript/manual/common-setup-methods.ts b/packages/cactus-plugin-persistence-fabric/src/test/typescript/manual/common-setup-methods.ts deleted file mode 100644 index 2432e12bcc..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/test/typescript/manual/common-setup-methods.ts +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Common setup code for the persistence plugin with detailed comments on each step. - * Requires environment variable `SUPABASE_CONNECTION_STRING` to be set before running the script that includes this! - * If not provided, a localhost instance of supabase will be assumed. - */ - -import process from "process"; -import { v4 as uuidV4 } from "uuid"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { DiscoveryOptions, X509Identity } from "fabric-network"; -import { - DefaultEventHandlerStrategy, - FabricApiClient, - PluginLedgerConnectorFabric, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -import { PluginPersistenceFabric } from "../../../main/typescript"; - -////////////////////////////////// -// Constants -////////////////////////////////// - -const SUPABASE_CONNECTION_STRING = - process.env.SUPABASE_CONNECTION_STRING ?? - "postgresql://postgres:your-super-secret-and-long-postgres-password@127.0.0.1:5432/postgres"; - -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "common-setup-methods", - level: testLogLevel, -}); - -/** - * Common ApiServer instance, can be empty if setup was not called yet! - */ -let apiServer: ApiServer; - -////////////////////////////////// -// Methods -////////////////////////////////// - -/** - * Setup Cacti ApiServer instance containing Fabric Connector plugin (for accessing the fabric ledger) - * and Fabric Persistence plugin (for storing data read from ledger to the database). - * - * @param port Port under which an ApiServer will be started. Can't be 0. - * @param channelName Channel that we want to connect to. - * @param connectionProfile Fabric connection profile (JSON object, not a string!) - * @param userIdentity Signing identity to use to connect to the channel (object, not a string!) - * - * @returns `{ persistence, apiClient, signingCredential }` - */ -export async function setupApiServer( - port: number, - channelName: string, - connectionProfile: any, - userIdentity: X509Identity, -) { - // PluginLedgerConnectorFabric requires a keychain plugin to operate correctly, ensuring secure data storage. - // We will store our userIdentity in it. - // For testing and debugging purposes, we use PluginKeychainMemory, which stores all secrets in memory (remember: this is not secure!). - const keychainId = uuidV4(); - const keychainEntryKey = "monitorUser"; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidV4(), - keychainId, - backend: new Map([[keychainEntryKey, JSON.stringify(userIdentity)]]), - logLevel: testLogLevel, - }); - const signingCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - // We create fabric connector instance with some default settings assumed. - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - const connector = new PluginLedgerConnectorFabric({ - instanceId: uuidV4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - sshConfig: {}, - cliContainerEnv: {}, - peerBinary: "/fabric-samples/bin/peer", - logLevel: sutLogLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAnyfortx, - commitTimeout: 300, - }, - }); - - // Remember to initialize a plugin - await connector.onPluginInit(); - - // We need an `FabricApiClient` to access `PluginLedgerConnectorFabric` methods from our `PluginPersistenceFabric`. - const apiConfig = new Configuration({ basePath: `http://127.0.0.1:${port}` }); - const apiClient = new FabricApiClient(apiConfig); - - // We create persistence plugin, it will read data from fabric ledger through `apiClient` we've just created, - // and push it to PostgreSQL database accessed by it's SUPABASE_CONNECTION_STRING (read from the environment variable). - const persistence = new PluginPersistenceFabric({ - channelName, - gatewayOptions: { - identity: signingCredential.keychainRef, - wallet: { - keychain: signingCredential, - }, - }, - apiClient, - logLevel: sutLogLevel, - instanceId: uuidV4(), - connectionString: SUPABASE_CONNECTION_STRING, - }); - // Plugin initialization will check connection to the database and setup schema if needed. - await persistence.onPluginInit(); - - // The API Server is a common "container" service that manages our plugins (connector and persistence). - // We use a sample configuration with most security measures disabled for simplicity. - log.info("Create ApiServer..."); - const configService = new ConfigService(); - const cactusApiServerOptions = await configService.newExampleConfig(); - cactusApiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - cactusApiServerOptions.configFile = ""; - cactusApiServerOptions.apiCorsDomainCsv = "*"; - cactusApiServerOptions.apiTlsEnabled = false; - cactusApiServerOptions.apiPort = port; - cactusApiServerOptions.grpcPort = port + 1; - cactusApiServerOptions.crpcPort = port + 2; - const config = await configService.newExampleConfigConvict( - cactusApiServerOptions, - ); - - apiServer = new ApiServer({ - config: config.getProperties(), - pluginRegistry: new PluginRegistry({ plugins: [connector, persistence] }), - }); - - const apiServerStartOut = await apiServer.start(); - log.debug(`apiServerStartOut:`, apiServerStartOut); - // Our setup is operational now! - - return { persistence, apiClient, signingCredential }; -} - -/** - * Cleanup all the resources allocated by our Api Server. - * Remember to call it before exiting! - */ -export async function cleanupApiServer() { - log.info("cleanupApiServer called."); - - if (apiServer) { - await apiServer.shutdown(); - } -} diff --git a/packages/cactus-plugin-persistence-fabric/src/test/typescript/manual/complete-sample-scenario.ts b/packages/cactus-plugin-persistence-fabric/src/test/typescript/manual/complete-sample-scenario.ts deleted file mode 100644 index 56cb9c84a9..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/test/typescript/manual/complete-sample-scenario.ts +++ /dev/null @@ -1,184 +0,0 @@ -/** - * Complete example of setting up and using the persistence plugin. This script will: - * - Start the test Fabric ledger with basic asset contract already deployed on it. - * - Begin monitoring ledger changes. - * - Run `CreateAsset` method few times to trigger more transactions. - * - * Each step is commented in detail to serve as a tutorial. - */ - -import { - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FabricTestLedgerV1, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; -import { cleanupApiServer, setupApiServer } from "./common-setup-methods"; -import { - FabricApiClient, - FabricContractInvocationType, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel: LogLevelDesc = "debug"; - -// Ledger settings -const imageName = DEFAULT_FABRIC_2_AIO_IMAGE_NAME; -const imageVersion = FABRIC_25_LTS_AIO_IMAGE_VERSION; -const fabricEnvVersion = FABRIC_25_LTS_AIO_FABRIC_VERSION; -const ledgerChannelName = "mychannel"; -const ledgerContractName = "basic"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "complete-sample-scenario", - level: testLogLevel, -}); - -let ledger: FabricTestLedgerV1; - -////////////////////////////////// -// Environment Setup -////////////////////////////////// - -/** - * Create and start the test ledger to be used by sample scenario. - * - * @returns Fabric `connectionProfile` - */ -async function setupTestLedger(): Promise { - log.info("Start FabricTestLedgerV1..."); - log.debug("Version:", fabricEnvVersion); - ledger = new FabricTestLedgerV1({ - emitContainerLogs: false, - publishAllPorts: true, - logLevel: testLogLevel, - imageName, - imageVersion, - envVars: new Map([["FABRIC_VERSION", fabricEnvVersion]]), - }); - log.debug("Fabric image:", ledger.getContainerImageName()); - await ledger.start({ omitPull: false }); - - // Get connection profile - log.info("Get fabric connection profile for Org1..."); - const connectionProfile = await ledger.getConnectionProfileOrg1(); - log.debug("Fabric connection profile for Org1 OK: %o", connectionProfile); - - return connectionProfile; -} - -/** - * Stop the test ledger containers (if created). - * Remember to run it before exiting! - */ -export async function cleanupTestLedger() { - if (ledger) { - log.info("Stop the fabric ledger..."); - await ledger.stop(); - await ledger.destroy(); - } -} - -/** - * Called when exiting this script - */ -async function cleanupEnvironment() { - await cleanupApiServer(); - await cleanupTestLedger(); -} - -////////////////////////////////// -// Helper Methods -////////////////////////////////// - -/** - * Run `CreateAsset` method of a `basic` contract deployed on a test fabric ledger. - * - * @param newAssetId new asset ID (must be unique). - * @param apiClient Fabric API client to already running connector instance. - * @param signingCredential Identity to use when sending new transaction to a ledger. - */ -async function runCreateAssetTransaction( - newAssetId: string, - apiClient: FabricApiClient, - signingCredential: FabricSigningCredential, -) { - const createAssetResponse = await apiClient.runTransactionV1({ - signingCredential, - channelName: ledgerChannelName, - invocationType: FabricContractInvocationType.Send, - contractName: ledgerContractName, - methodName: "CreateAsset", - params: [newAssetId, "green", "111", "someOwner", "299"], - }); - log.info( - `Transaction with ID ${createAssetResponse.data.transactionId} sent.`, - ); - - return createAssetResponse.data; -} - -////////////////////////////////// -// Main Logic -////////////////////////////////// - -async function main() { - // Start the test ethereum ledger which we'll monitor and run some sample operations. - const connectionProfile = await setupTestLedger(); - - // Enroll admin and user - const enrollAdminOut = await ledger.enrollAdmin(); - log.debug("Enrolled admin OK."); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await ledger.enrollUser(adminWallet); - log.debug("Enrolled user OK."); - - // Set up the ApiServer with Fabric Connector and Fabric Persistence plugins. - // It returns the persistence plugin, which we can use to run monitoring operations. - const { persistence, apiClient, signingCredential } = await setupApiServer( - 9950, // run at that port - ledgerChannelName, - connectionProfile, - userIdentity, - ); - console.log("Environment is running..."); - - // Start monitoring for ledger state changes. - // Any updates will be pushed to the database, and all errors will be printed to the console. - // Press Ctrl + C to stop. - persistence.startMonitor((err) => { - console.error("Persistence monitor error:", err); - }); - - // Run few `basic` contract methods to trigger more transactions. - await runCreateAssetTransaction("1234a", apiClient, signingCredential); - await runCreateAssetTransaction("1234b", apiClient, signingCredential); - await runCreateAssetTransaction("1234c", apiClient, signingCredential); - - // Feel free to include any custom code here for more complete test! - // Remember to press Ctrl + C to exit. -} - -// The following code is used to exit (and cleanup all the acquired resources) in case CTRL + C was pressed. -process.once("uncaughtException", async () => { - await cleanupEnvironment(); - process.exit(); -}); - -process.once("SIGINT", () => { - console.log("SIGINT received..."); - throw new Error(); -}); - -// Run the main application loop -main(); diff --git a/packages/cactus-plugin-persistence-fabric/src/test/typescript/manual/sample-setup.ts b/packages/cactus-plugin-persistence-fabric/src/test/typescript/manual/sample-setup.ts deleted file mode 100644 index 143a74b81f..0000000000 --- a/packages/cactus-plugin-persistence-fabric/src/test/typescript/manual/sample-setup.ts +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This script demonstrates how to connect the Cacti fabric connector and persistence plugins - * to an existing Fabric ledger and Supabase database backend. - * Detailed steps are provided to ensure the reader can follow along and customize the code as needed. - * - * ## Usage - * - * Must be run with the following environment variables set: - * - `FABRIC_CONNECTION_PROFILE_PATH` => Full path to fabric ledger connection profile JSON file. - * - `FABRIC_CHANNEL_NAME` => Name of the channel we want to connect to (to store it's data). - * - `FABRIC_WALLET_PATH` => Full path to wallet containing our identity (that can connect and observe specified channel). - * - `FABRIC_WALLET_LABEL` => Name (label) of our identity in a wallet provided in FABRIC_WALLET_PATH - * - `SUPABASE_CONNECTION_STRING` (optional) => PostgreSQL connection string to supabase instance where we'll store the ledger data. If not provided, - * it will try to use a localhost instance (user should run `supabase-all-in-one` container before running a script). - */ - -import { exit } from "node:process"; -import { readFileSync } from "node:fs"; -import { Wallets } from "fabric-network"; -import { cleanupApiServer, setupApiServer } from "./common-setup-methods"; - -/** - * Simple helper method for reading environment variable and exiting if that variable was not found. - */ -function getRequiredEnvVariable(envVariableName: string) { - const value = process.env[envVariableName] ?? ""; - if (!value) { - console.error(`Missing environment variable ${envVariableName}!`); - exit(1); - } - return value; -} - -// Read the required environment variables -const FABRIC_CONNECTION_PROFILE_PATH = getRequiredEnvVariable( - "FABRIC_CONNECTION_PROFILE_PATH", -); -const FABRIC_CHANNEL_NAME = getRequiredEnvVariable("FABRIC_CHANNEL_NAME"); -const FABRIC_WALLET_PATH = getRequiredEnvVariable("FABRIC_WALLET_PATH"); -const FABRIC_WALLET_LABEL = getRequiredEnvVariable("FABRIC_WALLET_LABEL"); - -/** - * Main application function. - * Will read all the required configuration data, create an ApiServer and run the block monitoring. - */ -async function main() { - // First, we read and parse the connection profile JSON file. - const connectionProfileString = readFileSync( - FABRIC_CONNECTION_PROFILE_PATH, - "utf-8", - ); - console.log(`Connection profile path: ${FABRIC_CONNECTION_PROFILE_PATH}`); - if (!connectionProfileString) { - throw new Error("Could not read fabric connection profile (empty file)"); - } - const connectionProfile = JSON.parse(connectionProfileString); - - // Now we open the filesystem wallet and extract the signing identity (it will be needed to access the ledger - // in order to read it's data). - const wallet = await Wallets.newFileSystemWallet(FABRIC_WALLET_PATH); - console.log(`Wallet path: ${FABRIC_WALLET_PATH}`); - const userIdentity = await wallet.get(FABRIC_WALLET_LABEL); - if (!userIdentity) { - throw new Error( - `Missing identity of user ${FABRIC_WALLET_LABEL} in specified wallet!`, - ); - } - - // Set up the ApiServer with Fabric Connector and Fabric Persistence plugins. - // It returns the persistence plugin, which we can use to run monitoring operations. - const { persistence } = await setupApiServer( - 9930, // run at that port - FABRIC_CHANNEL_NAME, - connectionProfile, - userIdentity as any, - ); - console.log("Environment is running..."); - - // Start monitoring for ledger state changes. - // Any updates will be pushed to the database, and all errors will be printed to the console. - // Press Ctrl + C to stop. - persistence.startMonitor((err) => { - console.error("Persistence monitor error:", err); - }); -} - -// The following code is used to exit (and cleanup all the acquired resources) in case CTRL + C was pressed. -process.once("uncaughtException", async () => { - await cleanupApiServer(); - process.exit(); -}); - -process.once("SIGINT", () => { - console.log("SIGINT received..."); - throw new Error(); -}); - -// Run the main application loop -main(); diff --git a/packages/cactus-plugin-persistence-fabric/tsconfig.json b/packages/cactus-plugin-persistence-fabric/tsconfig.json deleted file mode 100644 index c9c56cc435..0000000000 --- a/packages/cactus-plugin-persistence-fabric/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib", - "declarationDir": "./dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-persistence-fabric.tsbuildinfo" - }, - "include": ["./src", "./src/**/*.json", "./src/**/*.sql"], - "references": [ - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-cmd-api-server/tsconfig.json" - } - ] -} diff --git a/packages/cactus-plugin-satp-hermes/CHANGELOG.md b/packages/cactus-plugin-satp-hermes/CHANGELOG.md deleted file mode 100644 index deeb2d09b6..0000000000 --- a/packages/cactus-plugin-satp-hermes/CHANGELOG.md +++ /dev/null @@ -1,170 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-satp-hermes - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-satp-hermes - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-satp-hermes - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cacti/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-satp-hermes - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Features - -* **plugin-satp-hermes:** replace IPFS dependency in SATP package ([3bb7157](https://github.com/hyperledger/cacti/commit/3bb7157b8c910c31aa3fe125ecfb3437c2bef5bb)), closes [#2984](https://github.com/hyperledger/cacti/issues/2984) [#3006](https://github.com/hyperledger/cacti/issues/3006) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **plugin-odap-hermes:** fix duplicate enum values of OdapMessageType ([292d287](https://github.com/hyperledger/cacti/commit/292d2876abdc8eedfe9b51ed70ed0bc32db63e48)), closes [#2553](https://github.com/hyperledger/cacti/issues/2553) -* **security:** the CVE-2022-2421 - upgrade socket.io-parser to >=4.2.1 ([9172172](https://github.com/hyperledger/cacti/commit/917217227a3fa53a00429f047cd6318862e6ab8d)), closes [#2229](https://github.com/hyperledger/cacti/issues/2229) [#2228](https://github.com/hyperledger/cacti/issues/2228) -* **security:** upgrade fabric 2.x deps to 2.2.18 ([36988a5](https://github.com/hyperledger/cacti/commit/36988a5edbf9856a1bcc960a3b9afe443536733e)), closes [#2610](https://github.com/hyperledger/cacti/issues/2610) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **cbdc-bridging-app:** implementation of CBDC bridging example ([ca1b3be](https://github.com/hyperledger/cacti/commit/ca1b3be87bcc3242790647a71be8eb5db3dcd931)), closes [#2205](https://github.com/hyperledger/cacti/issues/2205) -* **openapi:** upgrade to 6.3.0 phase1 ([a094614](https://github.com/hyperledger/cacti/commit/a094614877d6043a6e3e8c0b3e95203eed7d6203)), closes [#2298](https://github.com/hyperledger/cacti/issues/2298) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-odap-hermes - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-odap-hermes - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-odap-hermes - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -### Bug Fixes - -* **odap-plugin:** fixes [#2198](https://github.com/hyperledger/cactus/issues/2198) - two gateways are using the same database ([9da24a0](https://github.com/hyperledger/cactus/commit/9da24a0ecd5e8682cbd6e6edbc349149b5d69d00)) - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-plugin-odap-hermes - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -### Features - -* **cbdc-bridging-app:** refactor ODAP plugin implementation ([6975fef](https://github.com/hyperledger/cactus/commit/6975fefd4994cc9c6dd7d649dc2d6400646a59ae)) - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Features - -* **odap-plugin:** addition of client endpoints ([cfa8db6](https://github.com/hyperledger/cactus/commit/cfa8db6c96e314bcefd6958b9823c4e0a5cf9620)) -* **odap-plugin:** backup gateway implementation ([61da528](https://github.com/hyperledger/cactus/commit/61da5289cefe55527bf6ef3cd6204b6ae7002ce1)) -* **odap-plugin:** odap crash recovery first implementation ([2e94ef8](https://github.com/hyperledger/cactus/commit/2e94ef8d3b34449c7b4d48e37d81245851477a3e)) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* **cmd-api-server:** upgrade socket.io - CVE-2022-21676 ([8e1c69e](https://github.com/hyperledger/cactus/commit/8e1c69e7b8ab5e4ccc31a0ec183a9777ccc22cdc)), closes [#1914](https://github.com/hyperledger/cactus/issues/1914) -* **plugin-odap-hermes:** remove extraneous dependencies ([87af023](https://github.com/hyperledger/cactus/commit/87af02305be25cdb8afb7e1b7a2464bf36791b6e)), closes [#1641](https://github.com/hyperledger/cactus/issues/1641) -* **security:** upgrade web3 to upgrade elliptic > 6.5.4 ([5513848](https://github.com/hyperledger/cactus/commit/55138483e43dd840a6c3822d1ff8f2f7ce8c35e8)), closes [#1639](https://github.com/hyperledger/cactus/issues/1639) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* **deps:** sibling package dependencies keychain-memory 0.6.0 [#1532](https://github.com/hyperledger/cactus/issues/1532) ([d01d72d](https://github.com/hyperledger/cactus/commit/d01d72d36200d47acac89f7ab90f6ddc96afba6f)) -* **security:** remedy CVE-2021-3749 ([b33aa90](https://github.com/hyperledger/cactus/commit/b33aa904cfa3794357c77b24f464d41a325f1d80)), closes [#1569](https://github.com/hyperledger/cactus/issues/1569) - -### Features - -* **odap:** first implemenation for odap plugin and endpoints ([51bf753](https://github.com/hyperledger/cactus/commit/51bf753d421cdd255c178036fe901eb9c1c04130)) diff --git a/packages/cactus-plugin-satp-hermes/README.md b/packages/cactus-plugin-satp-hermes/README.md deleted file mode 100644 index ebfb4b7ca9..0000000000 --- a/packages/cactus-plugin-satp-hermes/README.md +++ /dev/null @@ -1,158 +0,0 @@ -# @hyperledger/cactus-plugin-satp-hermes -The package provides `Cactus` a way to standardize cross-chain transactions between two ledgers (Fabric and Besu in this implementation). Using this we can perform: -- A unidirectional atomic asset transfer between 2 parties in different ledgers. -- Lock of the asset in the source ledger and proof is sent to the counterparty. -- Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain. - -At the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions) -## Summary - - - [Assumptions](#assumptions) - - [Getting Started](#getting-started) - - [Architecture](#architecture) - - [Use Case](#use-case) - - [Running the tests](#running-the-tests) - - [Usage](#usage) - - -## Assumptions -Regarding the crash recovery procedure in place, at the moment we only support crashes of gateways under certain assumptions detailed as follows: - - Gateways crash only after receiving a message (and before sending the next one) - - Gateways crash only after logging to the Log Storage the previously received message - - Gateways never loose their long term keys - - Gateways do not have byzantine behavior - - Gateways are assumed to always recover from a crash - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project to install the dependencies execute the command: -```sh -npm run configure -``` - -Know how to use the following plugins of the project: - - - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric) - - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu) - - [cactus-plugin-object-store-ipfs](https://github.com/hyperledger/cactus/tree/main/extensions/cactus-plugin-object-store-ipfs) - -## Architecture - -### Entities -Firstly let us identify the different entities involved in the protocol and what is their function: -- Two gateways in each side of the protocol: they implement endpoints to exchange the messages defined in the protocol. -- Ledgers connectors in each side (each connected to a different gateway): they expose the API so that gateways can interact the respective ledgers (e.g., locking, deleting and creating assets). -- SQLite3 database: persistent log and proofs storage in each gateway. -- IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed. - -The sequence diagram of ODAP is pictured below. - -![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png) - -### API Endpoints -This plugin uses OpenAPI to generate the API paths. -There are Client and Server Endpoints for each type of message detailed in the ODAP protocol: - - - TransferInitializationV1Request - - TransferInitializationV1Response - - TransferCommenceV1Request - - TransferCommenceV1Response - - LockEvidenceV1Request - - LockEvidenceV1Response - - CommitPreparationV1Request - - CommitPreparationV1Response - - CommitFinalV1Request - - CommitFinalV1Response - - TransferCompleteV1Request - - ClientV1Request - -There are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage): - - RecoverV1Message - - RecoverUpdateV1Message - - RecoverUpdateAckV1Message - - RecoverSuccessV1Message - - RollbackV1Message - -## Use case -Alice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B. - -## Running the tests - -[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts) - -[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts) - -[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts) - -[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts) - -[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts) - -[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts) - -[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts) - -[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts) - -[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts) - -[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts) - -For developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure). - -## Usage - -Let us consider two gateways. The client gateway connected to Hyperledger Fabric and the server gateway connected to Hyperledger Besu. Let us also consider: - - - A Hyperledger Fabric API client on URL: http://localhost:8045 - - A Hyperledger Besu API client on URL: http://localhost:8046 - - An IPFS API client on URL: http://localhost:8047 - - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts) - -Then the ODAP gateways should be created as follows: - -```typescript -const clientGatewayOptions: IFabricSatpGatewayConstructorOptions = { - name: "cactus-plugin#clientOdapGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - ipfsPath: "http://localhost:8047", - fabricPath: "http://localhost:8045", - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), -}; - -const serverGatewayOptions: IBesuSatpGatewayConstructorOptions = { - name: "cactus-plugin#serverOdapGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - ipfsPath: "http://localhost:8047", - besuPath: "http://localhost:8046", - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), -}; - - const clientGateway = new FabricSatpGateway(clientGatewayOptions); - const serverGateway = new BesuSatpGateway(serverGatewayOptions); -``` - -Note that these gateways are extensions of the [default ODAP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations. - -## Contributing -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md "CONTRIBUTING.md") to get started. - -## License -This distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE "LICENSE ")file. diff --git a/packages/cactus-plugin-satp-hermes/knex/knexfile-remote.ts b/packages/cactus-plugin-satp-hermes/knex/knexfile-remote.ts deleted file mode 100644 index 7966df074d..0000000000 --- a/packages/cactus-plugin-satp-hermes/knex/knexfile-remote.ts +++ /dev/null @@ -1,15 +0,0 @@ -import path from "path"; - -// default configuration for knex -module.exports = { - development: { - client: "sqlite3", - connection: { - filename: path.resolve(__dirname, ".dev-remote.sqlite3"), - }, - migrations: { - directory: path.resolve(__dirname, "migrations"), - }, - useNullAsDefault: true, - }, -}; diff --git a/packages/cactus-plugin-satp-hermes/knex/knexfile.ts b/packages/cactus-plugin-satp-hermes/knex/knexfile.ts deleted file mode 100644 index 47c34e0875..0000000000 --- a/packages/cactus-plugin-satp-hermes/knex/knexfile.ts +++ /dev/null @@ -1,16 +0,0 @@ -import path from "path"; -import { v4 as uuidv4 } from "uuid"; - -// default configuration for knex -module.exports = { - development: { - client: "sqlite3", - connection: { - filename: path.resolve(__dirname, ".dev-" + uuidv4() + ".sqlite3"), - }, - migrations: { - directory: path.resolve(__dirname, "migrations"), - }, - useNullAsDefault: true, - }, -}; diff --git a/packages/cactus-plugin-satp-hermes/knex/migrations/20220331132128_create_logs_table.js b/packages/cactus-plugin-satp-hermes/knex/migrations/20220331132128_create_logs_table.js deleted file mode 100644 index 94c6d8712f..0000000000 --- a/packages/cactus-plugin-satp-hermes/knex/migrations/20220331132128_create_logs_table.js +++ /dev/null @@ -1,15 +0,0 @@ -exports.up = async (knex) => { - return await knex.schema.createTable("logs", function (table) { - table.string("sessionID").notNullable(); - table.string("type").notNullable(); - table.string("key").notNullable(); - table.string("operation").notNullable(); - table.string("timestamp").notNullable(); - table.string("data").notNullable(); - table.primary("key"); - }); -}; - -exports.down = async (knex) => { - return await knex.schema.dropTable("logs"); -}; diff --git a/packages/cactus-plugin-satp-hermes/knex/migrations/20240130234303_create_remote_logs_table.js b/packages/cactus-plugin-satp-hermes/knex/migrations/20240130234303_create_remote_logs_table.js deleted file mode 100644 index 50625d7833..0000000000 --- a/packages/cactus-plugin-satp-hermes/knex/migrations/20240130234303_create_remote_logs_table.js +++ /dev/null @@ -1,13 +0,0 @@ -exports.up = async (knex) => { - return await knex.schema.createTable("remote-logs", function (table) { - table.string("key").notNullable(); - table.string("hash").notNullable(); - table.string("signature").notNullable(); - table.string("signerPubKey").notNullable(); - table.primary("key"); - }); -}; - -exports.down = async (knex) => { - return await knex.schema.dropTable("remote-logs"); -}; diff --git a/packages/cactus-plugin-satp-hermes/openapitools.json b/packages/cactus-plugin-satp-hermes/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-plugin-satp-hermes/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json deleted file mode 100644 index 1f6333ffe6..0000000000 --- a/packages/cactus-plugin-satp-hermes/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "name": "@hyperledger/cactus-plugin-satp-hermes", - "version": "2.0.0", - "description": "Proof of concept of ODAP", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology", - "Open Digital Asset Protocol" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "André Augusto", - "email": "andre.augusto@tecnico.ulisboa.pt", - "url": "https://github.com/AndreAugusto11" - }, - { - "name": "Tzu-Shen, Wang", - "url": "https://github.com/jscode017" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "build:dev:backend:postbuild": "mkdir -p ./dist/lib/main/knex && cp -r ./knex/* ./dist/lib/main/knex", - "codegen": "yarn run --top-level run-s 'codegen:*'", - "codegen:openapi": "npm run generate-sdk", - "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "pretsc": "npm run generate-sdk", - "tsc": "tsc --project ./tsconfig.json", - "watch": "npm-watch" - }, - "dependencies": { - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "axios": "1.7.7", - "crypto-js": "4.2.0", - "fs-extra": "11.2.0", - "knex": "2.4.0", - "secp256k1": "4.0.3", - "socket.io": "4.6.2", - "sqlite3": "5.1.5", - "typescript-optional": "2.0.1", - "uuid": "10.0.0", - "web3": "1.6.1", - "web3-utils": "1.6.1" - }, - "devDependencies": { - "@types/body-parser": "1.19.4", - "@types/crypto-js": "4.0.1", - "@types/express": "5.0.0", - "@types/fs-extra": "11.0.4", - "@types/tape": "4.13.4", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "fabric-network": "2.2.20", - "kubo-rpc-client": "3.0.1", - "typescript": "5.5.2" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "watch": { - "tsc": { - "patterns": [ - "src/", - "src/*/json/**/openapi*" - ], - "ignore": [ - "src/**/generated/*" - ], - "extensions": [ - "ts", - "json" - ], - "quiet": true, - "verbose": false, - "runOnChangeOnly": true - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 87c8b5f704..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,37 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_asset_profile.go -model_client_v1_request.go -model_client_v1_request_client_gateway_configuration.go -model_commit_final_v1_request.go -model_commit_final_v1_response.go -model_commit_preparation_v1_request.go -model_commit_preparation_v1_response.go -model_credential_profile.go -model_history.go -model_local_log.go -model_lock_evidence_v1_request.go -model_lock_evidence_v1_response.go -model_payload_profile.go -model_recover_success_v1_message.go -model_recover_update_ack_v1_message.go -model_recover_update_v1_message.go -model_recover_v1_message.go -model_rollback_ack_v1_message.go -model_rollback_v1_message.go -model_satp_message.go -model_satp_message_action_response.go -model_session_data.go -model_transfer_commence_v1_request.go -model_transfer_commence_v1_response.go -model_transfer_complete_v1_request.go -model_transfer_initialization_v1_request.go -model_transfer_initialization_v1_response.go -response.go -utils.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/README.md deleted file mode 100644 index 01a3ac2b43..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/README.md +++ /dev/null @@ -1,155 +0,0 @@ -# Go API client for cactus-plugin-satp-hermes - -Implementation for Odap and Hermes - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import cactus-plugin-satp-hermes "github.com/hyperledger/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-satp-hermes.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-satp-hermes.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), cactus-plugin-satp-hermes.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), cactus-plugin-satp-hermes.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**ClientRequestV1**](docs/DefaultApi.md#clientrequestv1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest | -*DefaultApi* | [**Phase1TransferInitiationRequestV1**](docs/DefaultApi.md#phase1transferinitiationrequestv1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest | -*DefaultApi* | [**Phase1TransferInitiationResponseV1**](docs/DefaultApi.md#phase1transferinitiationresponsev1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse | -*DefaultApi* | [**Phase2LockEvidenceRequestV1**](docs/DefaultApi.md#phase2lockevidencerequestv1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest | -*DefaultApi* | [**Phase2LockEvidenceResponseV1**](docs/DefaultApi.md#phase2lockevidenceresponsev1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse | -*DefaultApi* | [**Phase2TransferCommenceRequestV1**](docs/DefaultApi.md#phase2transfercommencerequestv1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest | -*DefaultApi* | [**Phase2TransferCommenceResponseV1**](docs/DefaultApi.md#phase2transfercommenceresponsev1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse | -*DefaultApi* | [**Phase3CommitFinalRequestV1**](docs/DefaultApi.md#phase3commitfinalrequestv1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest | -*DefaultApi* | [**Phase3CommitFinalResponseV1**](docs/DefaultApi.md#phase3commitfinalresponsev1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse | -*DefaultApi* | [**Phase3CommitPreparationRequestV1**](docs/DefaultApi.md#phase3commitpreparationrequestv1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest | -*DefaultApi* | [**Phase3CommitPreparationResponseV1**](docs/DefaultApi.md#phase3commitpreparationresponsev1) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse | -*DefaultApi* | [**Phase3TransferCompleteRequestV1**](docs/DefaultApi.md#phase3transfercompleterequestv1) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest | -*DefaultApi* | [**RecoverUpdateAckV1Message**](docs/DefaultApi.md#recoverupdateackv1message) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage | -*DefaultApi* | [**RecoverUpdateV1Message**](docs/DefaultApi.md#recoverupdatev1message) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage | -*DefaultApi* | [**RecoverV1Message**](docs/DefaultApi.md#recoverv1message) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage | -*DefaultApi* | [**RecoverV1Success**](docs/DefaultApi.md#recoverv1success) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage | -*DefaultApi* | [**RollbackAckV1Message**](docs/DefaultApi.md#rollbackackv1message) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage | -*DefaultApi* | [**RollbackV1Message**](docs/DefaultApi.md#rollbackv1message) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage | - - -## Documentation For Models - - - [AssetProfile](docs/AssetProfile.md) - - [ClientV1Request](docs/ClientV1Request.md) - - [ClientV1RequestClientGatewayConfiguration](docs/ClientV1RequestClientGatewayConfiguration.md) - - [CommitFinalV1Request](docs/CommitFinalV1Request.md) - - [CommitFinalV1Response](docs/CommitFinalV1Response.md) - - [CommitPreparationV1Request](docs/CommitPreparationV1Request.md) - - [CommitPreparationV1Response](docs/CommitPreparationV1Response.md) - - [CredentialProfile](docs/CredentialProfile.md) - - [History](docs/History.md) - - [LocalLog](docs/LocalLog.md) - - [LockEvidenceV1Request](docs/LockEvidenceV1Request.md) - - [LockEvidenceV1Response](docs/LockEvidenceV1Response.md) - - [PayloadProfile](docs/PayloadProfile.md) - - [RecoverSuccessV1Message](docs/RecoverSuccessV1Message.md) - - [RecoverUpdateAckV1Message](docs/RecoverUpdateAckV1Message.md) - - [RecoverUpdateV1Message](docs/RecoverUpdateV1Message.md) - - [RecoverV1Message](docs/RecoverV1Message.md) - - [RollbackAckV1Message](docs/RollbackAckV1Message.md) - - [RollbackV1Message](docs/RollbackV1Message.md) - - [SatpMessage](docs/SatpMessage.md) - - [SatpMessageActionResponse](docs/SatpMessageActionResponse.md) - - [SessionData](docs/SessionData.md) - - [TransferCommenceV1Request](docs/TransferCommenceV1Request.md) - - [TransferCommenceV1Response](docs/TransferCommenceV1Response.md) - - [TransferCompleteV1Request](docs/TransferCompleteV1Request.md) - - [TransferInitializationV1Request](docs/TransferInitializationV1Request.md) - - [TransferInitializationV1Response](docs/TransferInitializationV1Response.md) - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/api/openapi.yaml deleted file mode 100644 index a16486900a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ /dev/null @@ -1,1600 +0,0 @@ -openapi: 3.0.3 -info: - description: Implementation for Odap and Hermes - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: Hyperledger Cactus Plugin - Odap Hermes - version: 2.0.0 -servers: -- url: / -paths: - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest: - post: - description: "" - operationId: phase1TransferInitiationRequestV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferInitializationV1Request' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest: - post: - description: "" - operationId: phase2TransferCommenceRequestV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferCommenceV1Request' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest: - post: - description: "" - operationId: phase2LockEvidenceRequestV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LockEvidenceV1Request' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest: - post: - description: "" - operationId: phase3CommitPreparationRequestV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CommitPreparationV1Request' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest: - post: - description: "" - operationId: phase3CommitFinalRequestV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CommitFinalV1Request' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest: - get: - description: "" - operationId: phase3TransferCompleteRequestV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferCompleteV1Request' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest - /api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest: - post: - description: "" - operationId: clientRequestV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ClientV1Request' - responses: - "200": - content: - application/json: - schema: {} - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse: - post: - description: "" - operationId: phase1TransferInitiationResponseV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferInitializationV1Response' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse: - post: - description: "" - operationId: phase2TransferCommenceResponseV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferCommenceV1Response' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse: - post: - description: "" - operationId: phase2LockEvidenceResponseV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LockEvidenceV1Response' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse: - post: - description: "" - operationId: phase3CommitPreparationResponseV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CommitPreparationV1Response' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse: - post: - description: "" - operationId: phase3CommitFinalResponseV1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CommitFinalV1Response' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse - /api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage: - post: - description: "" - operationId: RecoverV1Message - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RecoverV1Message' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage - /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage: - post: - description: "" - operationId: RecoverUpdateV1Message - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RecoverUpdateV1Message' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage - /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage: - post: - description: "" - operationId: RecoverUpdateAckV1Message - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RecoverUpdateAckV1Message' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage - /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage: - post: - description: "" - operationId: RecoverV1Success - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RecoverSuccessV1Message' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage - /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage: - post: - description: "" - operationId: RollbackV1Message - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RollbackV1Message' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage - /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage: - post: - description: "" - operationId: RollbackAckV1Message - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RollbackAckV1Message' - responses: - "200": - description: OK - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage -components: - schemas: - CredentialProfile: - enum: - - SAML - - OAUTH - - X509 - type: string - PayloadProfile: - example: - assetProfile: - ledgerRequirements: - - "" - - "" - keyInformationLink: - - "" - - "" - assetCode: assetCode - issuanceDate: issuanceDate - digitalSignature: digitalSignature - verificationEndPoint: verificationEndPoint - prospectusLink: prospectusLink - issuer: issuer - assetCodeType: assetCodeType - transferRestriction: - - "" - - "" - expirationDate: expirationDate - keyWord: - - "" - - "" - capabilities: capabilities - properties: - assetProfile: - $ref: '#/components/schemas/AssetProfile' - capabilities: - type: string - required: - - assetProfile - type: object - ApplicationProfile: - type: object - Payload: - type: object - AssetProfile: - example: - ledgerRequirements: - - "" - - "" - keyInformationLink: - - "" - - "" - assetCode: assetCode - issuanceDate: issuanceDate - digitalSignature: digitalSignature - verificationEndPoint: verificationEndPoint - prospectusLink: prospectusLink - issuer: issuer - assetCodeType: assetCodeType - transferRestriction: - - "" - - "" - expirationDate: expirationDate - keyWord: - - "" - - "" - properties: - issuer: - type: string - assetCode: - type: string - assetCodeType: - type: string - issuanceDate: - type: string - expirationDate: - type: string - verificationEndPoint: - type: string - digitalSignature: - type: string - prospectusLink: - type: string - keyInformationLink: - items: {} - type: array - keyWord: - items: {} - type: array - transferRestriction: - items: {} - type: array - ledgerRequirements: - items: {} - type: array - required: - - expirationDate - type: object - LoggingProfile: - items: - type: string - type: array - AccessControlProfile: - items: - type: string - type: array - Permissions: - type: object - Transaction: - type: object - ActionCategory: - type: object - History: - example: - Origin: Origin - Transactions: - - null - - null - Destination: Destination - Actions: - - null - - null - CurrentStatus: "{}" - ApplicationSpecificParameters: "{}" - Balance: Balance - properties: - Transactions: - items: - $ref: '#/components/schemas/Transaction' - type: array - Actions: - items: - $ref: '#/components/schemas/ActionCategory' - type: array - Origin: - type: string - Destination: - type: string - Balance: - type: string - CurrentStatus: - type: object - ApplicationSpecificParameters: - type: object - type: object - SenderDltSystem: - type: object - RecipientDltSystem: - type: object - LockEvidenceClaim: - type: object - LockClaimFormat: - type: object - CommitFinalClaim: - type: object - CommitFinalClaimFormat: - type: object - CommitAcknowledgementClaim: - type: object - CommitAcknowledgementClaimFormat: - type: object - SessionData: - properties: - id: - type: string - step: - type: number - version: - type: string - lastSequenceNumber: - type: number - loggingProfile: - type: string - accessControlProfile: - type: string - applicationProfile: - type: string - payloadProfile: - $ref: '#/components/schemas/PayloadProfile' - assetProfile: - $ref: '#/components/schemas/AssetProfile' - allowedSourceBackupGateways: - items: - type: string - type: array - allowedRecipientBackupGateways: - items: - type: string - type: array - sourceBasePath: - type: string - recipientBasePath: - type: string - originatorPubkey: - type: string - beneficiaryPubkey: - type: string - sourceGatewayPubkey: - type: string - sourceGatewayDltSystem: - type: string - recipientGatewayPubkey: - type: string - recipientGatewayDltSystem: - type: string - initializationRequestMessageHash: - type: string - initializationResponseMessageHash: - type: string - initializationRequestMessageRcvTimeStamp: - type: string - initializationRequestMessageProcessedTimeStamp: - type: string - clientSignatureInitializationRequestMessage: - type: string - serverSignatureInitializationResponseMessage: - type: string - transferCommenceMessageRequestHash: - type: string - transferCommenceMessageResponseHash: - type: string - clientSignatureTransferCommenceRequestMessage: - type: string - serverSignatureTransferCommenceResponseMessage: - type: string - lockEvidenceRequestMessageHash: - type: string - lockEvidenceResponseMessageHash: - type: string - clientSignatureLockEvidenceRequestMessage: - type: string - serverSignatureLockEvidenceResponseMessage: - type: string - lockEvidenceClaim: - type: string - commitPrepareRequestMessageHash: - type: string - commitPrepareResponseMessageHash: - type: string - clientSignatureCommitPreparationRequestMessage: - type: string - serverSignatureCommitPreparationResponseMessage: - type: string - commitFinalRequestMessageHash: - type: string - commitFinalResponseMessageHash: - type: string - commitFinalClaim: - type: string - commitFinalClaimFormat: - type: string - commitAcknowledgementClaim: - type: string - commitAcknowledgementClaimFormat: - type: string - clientSignatureCommitFinalRequestMessage: - type: string - serverSignatureCommitFinalResponseMessage: - type: string - transferCompleteMessageHash: - type: string - clientSignatureTransferCompleteMessage: - type: string - maxRetries: - type: number - recipientLedgerAssetID: - type: string - sourceLedgerAssetID: - type: string - maxTimeout: - type: number - lastLogEntryTimestamp: - type: string - unlockAssetClaim: - type: string - recreateAssetClaim: - type: string - deleteAssetClaim: - type: string - lastMessageReceivedTimestamp: - type: string - rollback: - type: boolean - rollbackMessageHash: - type: string - rollbackProofs: - items: - type: string - type: array - rollbackActionsPerformed: - items: - enum: - - CREATE - - DELETE - - LOCK - - UNLOCK - type: string - type: array - type: object - TransferInitializationV1Request: - example: - recipientLedgerAssetID: recipientLedgerAssetID - subsequentCalls: "{}" - backupGatewaysAllowed: - - backupGatewaysAllowed - - backupGatewaysAllowed - signature: signature - credentialProfile: null - origin: origin - destination: destination - recipientGatewayPubkey: recipientGatewayPubkey - sessionID: sessionID - sourceBasePath: sourceBasePath - loggingProfile: loggingProfile - sourceLedgerAssetID: sourceLedgerAssetID - messageType: messageType - permissions: "{}" - multipleClaimsAllowed: true - payloadProfile: - assetProfile: - ledgerRequirements: - - "" - - "" - keyInformationLink: - - "" - - "" - assetCode: assetCode - issuanceDate: issuanceDate - digitalSignature: digitalSignature - verificationEndPoint: verificationEndPoint - prospectusLink: prospectusLink - issuer: issuer - assetCodeType: assetCodeType - transferRestriction: - - "" - - "" - expirationDate: expirationDate - keyWord: - - "" - - "" - capabilities: capabilities - applicationProfile: applicationProfile - sourceGatewayPubkey: sourceGatewayPubkey - recipientGatewayDltSystem: recipientGatewayDltSystem - sequenceNumber: 0 - accessControlProfile: accessControlProfile - developerURN: developerURN - histories: - - Origin: Origin - Transactions: - - null - - null - Destination: Destination - Actions: - - null - - null - CurrentStatus: "{}" - ApplicationSpecificParameters: "{}" - Balance: Balance - - Origin: Origin - Transactions: - - null - - null - Destination: Destination - Actions: - - null - - null - CurrentStatus: "{}" - ApplicationSpecificParameters: "{}" - Balance: Balance - version: version - multipleCancelsAllowed: true - escrowType: FAUCET - maxRetries: 6.027456183070403 - sourceGatewayDltSystem: sourceGatewayDltSystem - recipientBasePath: recipientBasePath - maxTimeout: 1.4658129805029452 - expiryTime: expiryTime - properties: - messageType: - type: string - sessionID: - type: string - version: - type: string - developerURN: - type: string - credentialProfile: - $ref: '#/components/schemas/CredentialProfile' - payloadProfile: - $ref: '#/components/schemas/PayloadProfile' - applicationProfile: - type: string - loggingProfile: - type: string - accessControlProfile: - type: string - signature: - type: string - sourceGatewayPubkey: - type: string - sourceGatewayDltSystem: - type: string - recipientGatewayPubkey: - type: string - recipientGatewayDltSystem: - type: string - escrowType: - enum: - - FAUCET - - TIMELOCK - - HASHLOCK - - HASHTIMELOCK - - MULTICLAIMPC - - DESTROY - - BURN - type: string - expiryTime: - type: string - multipleClaimsAllowed: - type: boolean - multipleCancelsAllowed: - type: boolean - permissions: - type: object - origin: - type: string - destination: - type: string - subsequentCalls: - type: object - histories: - items: - $ref: '#/components/schemas/History' - type: array - sequenceNumber: - type: integer - sourceBasePath: - type: string - recipientBasePath: - type: string - maxRetries: - type: number - maxTimeout: - type: number - backupGatewaysAllowed: - items: - type: string - type: array - recipientLedgerAssetID: - type: string - sourceLedgerAssetID: - type: string - required: - - accessControlProfile - - applicationProfile - - backupGatewaysAllowed - - loggingProfile - - maxRetries - - maxTimeout - - messageType - - payloadProfile - - recipientBasePath - - recipientGatewayDltSystem - - recipientGatewayPubkey - - recipientLedgerAssetID - - sequenceNumber - - sessionID - - signature - - sourceBasePath - - sourceGatewayDltSystem - - sourceGatewayPubkey - - sourceLedgerAssetID - type: object - TransferInitializationV1Response: - example: - timeStamp: timeStamp - sequenceNumber: 0.8008281904610115 - odapPhase: TransferInitialization - initialRequestMessageHash: initialRequestMessageHash - messageType: messageType - backupGatewaysAllowed: - - backupGatewaysAllowed - - backupGatewaysAllowed - processedTimeStamp: processedTimeStamp - signature: signature - destination: destination - sessionID: sessionID - serverIdentityPubkey: serverIdentityPubkey - properties: - messageType: - type: string - sessionID: - type: string - sequenceNumber: - type: number - odapPhase: - enum: - - TransferInitialization - - LockEvidenceVerification - - CommitmentEstablishment - type: string - initialRequestMessageHash: - type: string - destination: - type: string - timeStamp: - type: string - processedTimeStamp: - type: string - serverIdentityPubkey: - type: string - signature: - type: string - backupGatewaysAllowed: - items: - type: string - type: array - required: - - backupGatewaysAllowed - - initialRequestMessageHash - - messageType - - processedTimeStamp - - sequenceNumber - - serverIdentityPubkey - - sessionID - - signature - - timeStamp - type: object - TransferCommenceV1Request: - example: - beneficiaryPubkey: beneficiaryPubkey - sequenceNumber: 1 - hashAssetProfile: hashAssetProfile - clientIdentityPubkey: clientIdentityPubkey - clientTransferNumber: 6 - signature: signature - recipientDltSystem: recipientDltSystem - sessionID: sessionID - hashPrevMessage: hashPrevMessage - serverIdentityPubkey: serverIdentityPubkey - assetUnit: 0 - messageType: messageType - senderDltSystem: senderDltSystem - originatorPubkey: originatorPubkey - properties: - sessionID: - type: string - messageType: - type: string - originatorPubkey: - type: string - beneficiaryPubkey: - type: string - senderDltSystem: - type: string - recipientDltSystem: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashAssetProfile: - type: string - assetUnit: - type: integer - hashPrevMessage: - type: string - clientTransferNumber: - nullable: true - type: integer - signature: - type: string - sequenceNumber: - type: integer - required: - - beneficiaryPubkey - - clientIdentityPubkey - - hashAssetProfile - - hashPrevMessage - - messageType - - originatorPubkey - - recipientDltSystem - - senderDltSystem - - sequenceNumber - - serverIdentityPubkey - - sessionID - - signature - type: object - TransferCommenceV1Response: - example: - sequenceNumber: 6.027456183070403 - clientIdentityPubkey: clientIdentityPubkey - messageType: messageType - signature: signature - serverTransferNumber: 0 - messageHash: messageHash - sessionID: sessionID - hashCommenceRequest: hashCommenceRequest - serverIdentityPubkey: serverIdentityPubkey - properties: - sessionID: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashCommenceRequest: - type: string - serverTransferNumber: - nullable: true - type: integer - signature: - type: string - messageType: - type: string - messageHash: - type: string - sequenceNumber: - type: number - required: - - clientIdentityPubkey - - hashCommenceRequest - - messageType - - sequenceNumber - - serverIdentityPubkey - - sessionID - - signature - type: object - LockEvidenceV1Request: - example: - sequenceNumber: 6.027456183070403 - lockEvidenceExpiration: lockEvidenceExpiration - clientIdentityPubkey: clientIdentityPubkey - clientTransferNumber: 0 - messageType: messageType - signature: signature - lockEvidenceClaim: lockEvidenceClaim - lockEvidenceFormat: "{}" - hashCommenceAckRequest: hashCommenceAckRequest - messageHash: messageHash - sessionID: sessionID - serverIdentityPubkey: serverIdentityPubkey - properties: - sessionID: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - lockEvidenceClaim: - type: string - lockEvidenceFormat: - type: object - lockEvidenceExpiration: - type: string - hashCommenceAckRequest: - type: string - clientTransferNumber: - nullable: true - type: integer - signature: - type: string - messageType: - type: string - messageHash: - type: string - sequenceNumber: - type: number - required: - - clientIdentityPubkey - - hashCommenceAckRequest - - lockEvidenceClaim - - lockEvidenceExpiration - - messageType - - sequenceNumber - - serverIdentityPubkey - - sessionID - - signature - type: object - LockEvidenceV1Response: - example: - sequenceNumber: 6.027456183070403 - clientIdentityPubkey: clientIdentityPubkey - messageType: messageType - signature: signature - serverTransferNumber: 0 - hashLockEvidenceRequest: hashLockEvidenceRequest - sessionID: sessionID - serverIdentityPubkey: serverIdentityPubkey - properties: - sessionID: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashLockEvidenceRequest: - type: string - serverTransferNumber: - nullable: true - type: integer - signature: - type: string - messageType: - type: string - sequenceNumber: - type: number - required: - - clientIdentityPubkey - - hashLockEvidenceRequest - - messageType - - sequenceNumber - - serverIdentityPubkey - - sessionID - - signature - type: object - CommitPreparationV1Request: - example: - sequenceNumber: 6.027456183070403 - clientIdentityPubkey: clientIdentityPubkey - hashLockEvidenceAck: hashLockEvidenceAck - messageType: messageType - clientTransferNumber: 0 - signature: signature - sessionID: sessionID - serverIdentityPubkey: serverIdentityPubkey - properties: - sessionID: - type: string - messageType: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashLockEvidenceAck: - type: string - clientTransferNumber: - type: integer - signature: - type: string - sequenceNumber: - type: number - required: - - clientIdentityPubkey - - hashLockEvidenceAck - - messageType - - sequenceNumber - - serverIdentityPubkey - - sessionID - - signature - type: object - CommitPreparationV1Response: - example: - sequenceNumber: 0.8008281904610115 - clientIdentityPubkey: clientIdentityPubkey - messageType: messageType - hashCommitPrep: hashCommitPrep - signature: signature - serverTransferNumber: serverTransferNumber - sessionID: sessionID - serverIdentityPubkey: serverIdentityPubkey - properties: - sessionID: - type: string - messageType: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashCommitPrep: - type: string - serverTransferNumber: - type: string - signature: - type: string - sequenceNumber: - type: number - required: - - clientIdentityPubkey - - hashCommitPrep - - messageType - - sequenceNumber - - serverIdentityPubkey - - sessionID - - signature - type: object - CommitFinalV1Request: - example: - sequenceNumber: 6.027456183070403 - clientIdentityPubkey: clientIdentityPubkey - messageType: messageType - clientTransferNumber: 0 - signature: signature - commitFinalClaim: commitFinalClaim - commitFinalClaimFormat: "{}" - sessionID: sessionID - serverIdentityPubkey: serverIdentityPubkey - hashCommitPrepareAck: hashCommitPrepareAck - properties: - sessionID: - type: string - messageType: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - commitFinalClaim: - type: string - commitFinalClaimFormat: - type: object - hashCommitPrepareAck: - type: string - clientTransferNumber: - nullable: true - type: integer - signature: - type: string - sequenceNumber: - type: number - required: - - clientIdentityPubkey - - commitFinalClaim - - hashCommitPrepareAck - - messageType - - sequenceNumber - - serverIdentityPubkey - - sessionID - - signature - type: object - CommitFinalV1Response: - example: - sequenceNumber: 6.027456183070403 - clientIdentityPubkey: clientIdentityPubkey - messageType: messageType - commitAcknowledgementClaimFormat: "{}" - signature: signature - serverTransferNumber: 0 - commitAcknowledgementClaim: commitAcknowledgementClaim - hashCommitFinal: hashCommitFinal - sessionID: sessionID - serverIdentityPubkey: serverIdentityPubkey - properties: - sessionID: - type: string - messageType: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - commitAcknowledgementClaim: - type: string - commitAcknowledgementClaimFormat: - type: object - hashCommitFinal: - type: string - serverTransferNumber: - type: integer - signature: - type: string - sequenceNumber: - type: number - required: - - clientIdentityPubkey - - commitAcknowledgementClaim - - hashCommitFinal - - messageType - - sequenceNumber - - serverIdentityPubkey - - sessionID - - signature - type: object - TransferCompleteV1Request: - example: - sequenceNumber: 6.027456183070403 - hashCommitFinalAck: hashCommitFinalAck - clientIdentityPubkey: clientIdentityPubkey - hashTransferCommence: hashTransferCommence - messageType: messageType - clientTransferNumber: 0 - signature: signature - sessionID: sessionID - serverIdentityPubkey: serverIdentityPubkey - properties: - sessionID: - type: string - messageType: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashCommitFinalAck: - type: string - clientTransferNumber: - nullable: true - type: integer - signature: - type: string - hashTransferCommence: - type: string - sequenceNumber: - type: number - required: - - clientIdentityPubkey - - hashCommitFinalAck - - hashTransferCommence - - messageType - - sequenceNumber - - serverIdentityPubkey - - sessionID - - signature - type: object - ClientV1Request: - example: - assetProfile: - ledgerRequirements: - - "" - - "" - keyInformationLink: - - "" - - "" - assetCode: assetCode - issuanceDate: issuanceDate - digitalSignature: digitalSignature - verificationEndPoint: verificationEndPoint - prospectusLink: prospectusLink - issuer: issuer - assetCodeType: assetCodeType - transferRestriction: - - "" - - "" - expirationDate: expirationDate - keyWord: - - "" - - "" - beneficiaryPubkey: beneficiaryPubkey - recipientLedgerAssetID: recipientLedgerAssetID - clientIdentityPubkey: clientIdentityPubkey - serverDltSystem: serverDltSystem - accessControlProfile: accessControlProfile - recipientGatewayPubkey: recipientGatewayPubkey - assetControlProfile: assetControlProfile - version: version - serverIdentityPubkey: serverIdentityPubkey - loggingProfile: loggingProfile - serverGatewayConfiguration: - apiHost: apiHost - sourceLedgerAssetID: sourceLedgerAssetID - clientGatewayConfiguration: - apiHost: apiHost - maxRetries: 0.8008281904610115 - sourceGatewayDltSystem: sourceGatewayDltSystem - maxTimeout: 6.027456183070403 - applicationProfile: applicationProfile - payloadProfile: - assetProfile: - ledgerRequirements: - - "" - - "" - keyInformationLink: - - "" - - "" - assetCode: assetCode - issuanceDate: issuanceDate - digitalSignature: digitalSignature - verificationEndPoint: verificationEndPoint - prospectusLink: prospectusLink - issuer: issuer - assetCodeType: assetCodeType - transferRestriction: - - "" - - "" - expirationDate: expirationDate - keyWord: - - "" - - "" - capabilities: capabilities - originatorPubkey: originatorPubkey - clientDltSystem: clientDltSystem - recipientGatewayDltSystem: recipientGatewayDltSystem - properties: - version: - type: string - loggingProfile: - type: string - accessControlProfile: - type: string - assetControlProfile: - type: string - applicationProfile: - type: string - assetProfile: - $ref: '#/components/schemas/AssetProfile' - payloadProfile: - $ref: '#/components/schemas/PayloadProfile' - sourceGatewayDltSystem: - type: string - recipientGatewayDltSystem: - type: string - recipientGatewayPubkey: - type: string - originatorPubkey: - type: string - beneficiaryPubkey: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - clientDltSystem: - type: string - serverDltSystem: - type: string - clientGatewayConfiguration: - $ref: '#/components/schemas/ClientV1Request_clientGatewayConfiguration' - serverGatewayConfiguration: - $ref: '#/components/schemas/ClientV1Request_clientGatewayConfiguration' - maxRetries: - type: number - maxTimeout: - type: number - sourceLedgerAssetID: - type: string - recipientLedgerAssetID: - type: string - required: - - accessControlProfile - - applicationProfile - - assetControlProfile - - assetProfile - - beneficiaryPubkey - - clientDltSystem - - clientGatewayConfiguration - - clientIdentityPubkey - - loggingProfile - - maxRetries - - maxTimeout - - originatorPubkey - - payloadProfile - - recipientGatewayDltSystem - - recipientGatewayPubkey - - recipientLedgerAssetID - - serverDltSystem - - serverGatewayConfiguration - - serverIdentityPubkey - - sourceGatewayDltSystem - - sourceLedgerAssetID - - version - type: object - RecoverV1Message: - example: - sequenceNumber: 0.8008281904610115 - isBackup: true - odapPhase: odapPhase - signature: signature - sessionID: sessionID - newGatewayPubKey: newGatewayPubKey - newBasePath: newBasePath - lastLogEntryTimestamp: lastLogEntryTimestamp - properties: - sessionID: - type: string - odapPhase: - type: string - sequenceNumber: - type: number - lastLogEntryTimestamp: - type: string - isBackup: - type: boolean - newBasePath: - type: string - newGatewayPubKey: - type: string - signature: - type: string - required: - - isBackup - - lastLogEntryTimestamp - - newBasePath - - odapPhase - - sequenceNumber - - sessionID - - signature - type: object - RecoverUpdateV1Message: - example: - signature: signature - sessionID: sessionID - recoveredLogs: - - data: data - sessionID: sessionID - type: type - operation: operation - key: key - timestamp: timestamp - - data: data - sessionID: sessionID - type: type - operation: operation - key: key - timestamp: timestamp - properties: - sessionID: - type: string - recoveredLogs: - items: - $ref: '#/components/schemas/LocalLog' - type: array - signature: - type: string - required: - - recoveredLogs - - sessionID - - signature - type: object - RecoverUpdateAckV1Message: - example: - signature: signature - success: true - sessionID: sessionID - changedEntriesHash: - - changedEntriesHash - - changedEntriesHash - properties: - sessionID: - type: string - success: - type: boolean - changedEntriesHash: - items: - type: string - type: array - signature: - type: string - required: - - changedEntriesHash - - sessionID - - signature - - success - type: object - RecoverSuccessV1Message: - example: - signature: signature - success: true - sessionID: sessionID - properties: - sessionID: - type: string - success: - type: boolean - signature: - type: string - required: - - sessionID - - signature - - success - type: object - RollbackV1Message: - example: - actionPerformed: - - actionPerformed - - actionPerformed - signature: signature - success: true - proofs: - - proofs - - proofs - sessionID: sessionID - properties: - sessionID: - type: string - success: - type: boolean - actionPerformed: - items: - type: string - type: array - proofs: - items: - type: string - type: array - signature: - type: string - required: - - actionPerformed - - proofs - - sessionID - - signature - - success - type: object - RollbackAckV1Message: - example: - signature: signature - success: true - sessionID: sessionID - properties: - sessionID: - type: string - success: - type: boolean - signature: - type: string - required: - - sessionID - - signature - - success - type: object - LocalLog: - example: - data: data - sessionID: sessionID - type: type - operation: operation - key: key - timestamp: timestamp - properties: - key: - type: string - sessionID: - type: string - data: - type: string - type: - type: string - operation: - type: string - timestamp: - type: string - required: - - operation - - sessionID - - type - type: object - SatpMessage: - properties: - SequenceNumber: - type: number - Phase: - enum: - - TransferInitialization - - LockEvidenceVerification - - CommitmentEstablishment - type: string - ResourceURL: - type: string - DeveloperURN: - type: string - ActionResponse: - $ref: '#/components/schemas/SatpMessage_ActionResponse' - CredentialProfile: - enum: - - SAML - - OAuth - - X509 - type: string - CredentialBlock: - items: {} - type: array - CredentialsProfile: - $ref: '#/components/schemas/PayloadProfile' - ApplicationProfile: - type: object - Payload: - type: object - PayloadHash: - type: string - MessageSignature: - type: string - type: object - ClientV1Request_clientGatewayConfiguration: - example: - apiHost: apiHost - properties: - apiHost: - type: string - required: - - apiHost - type: object - SatpMessage_ActionResponse: - properties: - ResponseCode: - enum: - - "200" - - "404" - type: string - x-enum-varnames: - - OK - - RESOURCE_NOT_FOUND - Arguments: - items: {} - type: array - type: object diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/api_default.go deleted file mode 100644 index 1805964564..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/api_default.go +++ /dev/null @@ -1,1762 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiClientRequestV1Request struct { - ctx context.Context - ApiService *DefaultApiService - clientV1Request *ClientV1Request -} - -func (r ApiClientRequestV1Request) ClientV1Request(clientV1Request ClientV1Request) ApiClientRequestV1Request { - r.clientV1Request = &clientV1Request - return r -} - -func (r ApiClientRequestV1Request) Execute() (interface{}, *http.Response, error) { - return r.ApiService.ClientRequestV1Execute(r) -} - -/* -ClientRequestV1 Method for ClientRequestV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiClientRequestV1Request -*/ -func (a *DefaultApiService) ClientRequestV1(ctx context.Context) ApiClientRequestV1Request { - return ApiClientRequestV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return interface{} -func (a *DefaultApiService) ClientRequestV1Execute(r ApiClientRequestV1Request) (interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ClientRequestV1") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.clientV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPhase1TransferInitiationRequestV1Request struct { - ctx context.Context - ApiService *DefaultApiService - transferInitializationV1Request *TransferInitializationV1Request -} - -func (r ApiPhase1TransferInitiationRequestV1Request) TransferInitializationV1Request(transferInitializationV1Request TransferInitializationV1Request) ApiPhase1TransferInitiationRequestV1Request { - r.transferInitializationV1Request = &transferInitializationV1Request - return r -} - -func (r ApiPhase1TransferInitiationRequestV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase1TransferInitiationRequestV1Execute(r) -} - -/* -Phase1TransferInitiationRequestV1 Method for Phase1TransferInitiationRequestV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase1TransferInitiationRequestV1Request -*/ -func (a *DefaultApiService) Phase1TransferInitiationRequestV1(ctx context.Context) ApiPhase1TransferInitiationRequestV1Request { - return ApiPhase1TransferInitiationRequestV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase1TransferInitiationRequestV1Execute(r ApiPhase1TransferInitiationRequestV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase1TransferInitiationRequestV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.transferInitializationV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPhase1TransferInitiationResponseV1Request struct { - ctx context.Context - ApiService *DefaultApiService - transferInitializationV1Response *TransferInitializationV1Response -} - -func (r ApiPhase1TransferInitiationResponseV1Request) TransferInitializationV1Response(transferInitializationV1Response TransferInitializationV1Response) ApiPhase1TransferInitiationResponseV1Request { - r.transferInitializationV1Response = &transferInitializationV1Response - return r -} - -func (r ApiPhase1TransferInitiationResponseV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase1TransferInitiationResponseV1Execute(r) -} - -/* -Phase1TransferInitiationResponseV1 Method for Phase1TransferInitiationResponseV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase1TransferInitiationResponseV1Request -*/ -func (a *DefaultApiService) Phase1TransferInitiationResponseV1(ctx context.Context) ApiPhase1TransferInitiationResponseV1Request { - return ApiPhase1TransferInitiationResponseV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase1TransferInitiationResponseV1Execute(r ApiPhase1TransferInitiationResponseV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase1TransferInitiationResponseV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.transferInitializationV1Response - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPhase2LockEvidenceRequestV1Request struct { - ctx context.Context - ApiService *DefaultApiService - lockEvidenceV1Request *LockEvidenceV1Request -} - -func (r ApiPhase2LockEvidenceRequestV1Request) LockEvidenceV1Request(lockEvidenceV1Request LockEvidenceV1Request) ApiPhase2LockEvidenceRequestV1Request { - r.lockEvidenceV1Request = &lockEvidenceV1Request - return r -} - -func (r ApiPhase2LockEvidenceRequestV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase2LockEvidenceRequestV1Execute(r) -} - -/* -Phase2LockEvidenceRequestV1 Method for Phase2LockEvidenceRequestV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase2LockEvidenceRequestV1Request -*/ -func (a *DefaultApiService) Phase2LockEvidenceRequestV1(ctx context.Context) ApiPhase2LockEvidenceRequestV1Request { - return ApiPhase2LockEvidenceRequestV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase2LockEvidenceRequestV1Execute(r ApiPhase2LockEvidenceRequestV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase2LockEvidenceRequestV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.lockEvidenceV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPhase2LockEvidenceResponseV1Request struct { - ctx context.Context - ApiService *DefaultApiService - lockEvidenceV1Response *LockEvidenceV1Response -} - -func (r ApiPhase2LockEvidenceResponseV1Request) LockEvidenceV1Response(lockEvidenceV1Response LockEvidenceV1Response) ApiPhase2LockEvidenceResponseV1Request { - r.lockEvidenceV1Response = &lockEvidenceV1Response - return r -} - -func (r ApiPhase2LockEvidenceResponseV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase2LockEvidenceResponseV1Execute(r) -} - -/* -Phase2LockEvidenceResponseV1 Method for Phase2LockEvidenceResponseV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase2LockEvidenceResponseV1Request -*/ -func (a *DefaultApiService) Phase2LockEvidenceResponseV1(ctx context.Context) ApiPhase2LockEvidenceResponseV1Request { - return ApiPhase2LockEvidenceResponseV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase2LockEvidenceResponseV1Execute(r ApiPhase2LockEvidenceResponseV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase2LockEvidenceResponseV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.lockEvidenceV1Response - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPhase2TransferCommenceRequestV1Request struct { - ctx context.Context - ApiService *DefaultApiService - transferCommenceV1Request *TransferCommenceV1Request -} - -func (r ApiPhase2TransferCommenceRequestV1Request) TransferCommenceV1Request(transferCommenceV1Request TransferCommenceV1Request) ApiPhase2TransferCommenceRequestV1Request { - r.transferCommenceV1Request = &transferCommenceV1Request - return r -} - -func (r ApiPhase2TransferCommenceRequestV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase2TransferCommenceRequestV1Execute(r) -} - -/* -Phase2TransferCommenceRequestV1 Method for Phase2TransferCommenceRequestV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase2TransferCommenceRequestV1Request -*/ -func (a *DefaultApiService) Phase2TransferCommenceRequestV1(ctx context.Context) ApiPhase2TransferCommenceRequestV1Request { - return ApiPhase2TransferCommenceRequestV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase2TransferCommenceRequestV1Execute(r ApiPhase2TransferCommenceRequestV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase2TransferCommenceRequestV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.transferCommenceV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPhase2TransferCommenceResponseV1Request struct { - ctx context.Context - ApiService *DefaultApiService - transferCommenceV1Response *TransferCommenceV1Response -} - -func (r ApiPhase2TransferCommenceResponseV1Request) TransferCommenceV1Response(transferCommenceV1Response TransferCommenceV1Response) ApiPhase2TransferCommenceResponseV1Request { - r.transferCommenceV1Response = &transferCommenceV1Response - return r -} - -func (r ApiPhase2TransferCommenceResponseV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase2TransferCommenceResponseV1Execute(r) -} - -/* -Phase2TransferCommenceResponseV1 Method for Phase2TransferCommenceResponseV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase2TransferCommenceResponseV1Request -*/ -func (a *DefaultApiService) Phase2TransferCommenceResponseV1(ctx context.Context) ApiPhase2TransferCommenceResponseV1Request { - return ApiPhase2TransferCommenceResponseV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase2TransferCommenceResponseV1Execute(r ApiPhase2TransferCommenceResponseV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase2TransferCommenceResponseV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.transferCommenceV1Response - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPhase3CommitFinalRequestV1Request struct { - ctx context.Context - ApiService *DefaultApiService - commitFinalV1Request *CommitFinalV1Request -} - -func (r ApiPhase3CommitFinalRequestV1Request) CommitFinalV1Request(commitFinalV1Request CommitFinalV1Request) ApiPhase3CommitFinalRequestV1Request { - r.commitFinalV1Request = &commitFinalV1Request - return r -} - -func (r ApiPhase3CommitFinalRequestV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase3CommitFinalRequestV1Execute(r) -} - -/* -Phase3CommitFinalRequestV1 Method for Phase3CommitFinalRequestV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase3CommitFinalRequestV1Request -*/ -func (a *DefaultApiService) Phase3CommitFinalRequestV1(ctx context.Context) ApiPhase3CommitFinalRequestV1Request { - return ApiPhase3CommitFinalRequestV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase3CommitFinalRequestV1Execute(r ApiPhase3CommitFinalRequestV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase3CommitFinalRequestV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.commitFinalV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPhase3CommitFinalResponseV1Request struct { - ctx context.Context - ApiService *DefaultApiService - commitFinalV1Response *CommitFinalV1Response -} - -func (r ApiPhase3CommitFinalResponseV1Request) CommitFinalV1Response(commitFinalV1Response CommitFinalV1Response) ApiPhase3CommitFinalResponseV1Request { - r.commitFinalV1Response = &commitFinalV1Response - return r -} - -func (r ApiPhase3CommitFinalResponseV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase3CommitFinalResponseV1Execute(r) -} - -/* -Phase3CommitFinalResponseV1 Method for Phase3CommitFinalResponseV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase3CommitFinalResponseV1Request -*/ -func (a *DefaultApiService) Phase3CommitFinalResponseV1(ctx context.Context) ApiPhase3CommitFinalResponseV1Request { - return ApiPhase3CommitFinalResponseV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase3CommitFinalResponseV1Execute(r ApiPhase3CommitFinalResponseV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase3CommitFinalResponseV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.commitFinalV1Response - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPhase3CommitPreparationRequestV1Request struct { - ctx context.Context - ApiService *DefaultApiService - commitPreparationV1Request *CommitPreparationV1Request -} - -func (r ApiPhase3CommitPreparationRequestV1Request) CommitPreparationV1Request(commitPreparationV1Request CommitPreparationV1Request) ApiPhase3CommitPreparationRequestV1Request { - r.commitPreparationV1Request = &commitPreparationV1Request - return r -} - -func (r ApiPhase3CommitPreparationRequestV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase3CommitPreparationRequestV1Execute(r) -} - -/* -Phase3CommitPreparationRequestV1 Method for Phase3CommitPreparationRequestV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase3CommitPreparationRequestV1Request -*/ -func (a *DefaultApiService) Phase3CommitPreparationRequestV1(ctx context.Context) ApiPhase3CommitPreparationRequestV1Request { - return ApiPhase3CommitPreparationRequestV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase3CommitPreparationRequestV1Execute(r ApiPhase3CommitPreparationRequestV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase3CommitPreparationRequestV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.commitPreparationV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPhase3CommitPreparationResponseV1Request struct { - ctx context.Context - ApiService *DefaultApiService - commitPreparationV1Response *CommitPreparationV1Response -} - -func (r ApiPhase3CommitPreparationResponseV1Request) CommitPreparationV1Response(commitPreparationV1Response CommitPreparationV1Response) ApiPhase3CommitPreparationResponseV1Request { - r.commitPreparationV1Response = &commitPreparationV1Response - return r -} - -func (r ApiPhase3CommitPreparationResponseV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase3CommitPreparationResponseV1Execute(r) -} - -/* -Phase3CommitPreparationResponseV1 Method for Phase3CommitPreparationResponseV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase3CommitPreparationResponseV1Request -*/ -func (a *DefaultApiService) Phase3CommitPreparationResponseV1(ctx context.Context) ApiPhase3CommitPreparationResponseV1Request { - return ApiPhase3CommitPreparationResponseV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase3CommitPreparationResponseV1Execute(r ApiPhase3CommitPreparationResponseV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase3CommitPreparationResponseV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.commitPreparationV1Response - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPhase3TransferCompleteRequestV1Request struct { - ctx context.Context - ApiService *DefaultApiService - transferCompleteV1Request *TransferCompleteV1Request -} - -func (r ApiPhase3TransferCompleteRequestV1Request) TransferCompleteV1Request(transferCompleteV1Request TransferCompleteV1Request) ApiPhase3TransferCompleteRequestV1Request { - r.transferCompleteV1Request = &transferCompleteV1Request - return r -} - -func (r ApiPhase3TransferCompleteRequestV1Request) Execute() (*http.Response, error) { - return r.ApiService.Phase3TransferCompleteRequestV1Execute(r) -} - -/* -Phase3TransferCompleteRequestV1 Method for Phase3TransferCompleteRequestV1 - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPhase3TransferCompleteRequestV1Request -*/ -func (a *DefaultApiService) Phase3TransferCompleteRequestV1(ctx context.Context) ApiPhase3TransferCompleteRequestV1Request { - return ApiPhase3TransferCompleteRequestV1Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) Phase3TransferCompleteRequestV1Execute(r ApiPhase3TransferCompleteRequestV1Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Phase3TransferCompleteRequestV1") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.transferCompleteV1Request - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiRecoverUpdateAckV1MessageRequest struct { - ctx context.Context - ApiService *DefaultApiService - recoverUpdateAckV1Message *RecoverUpdateAckV1Message -} - -func (r ApiRecoverUpdateAckV1MessageRequest) RecoverUpdateAckV1Message(recoverUpdateAckV1Message RecoverUpdateAckV1Message) ApiRecoverUpdateAckV1MessageRequest { - r.recoverUpdateAckV1Message = &recoverUpdateAckV1Message - return r -} - -func (r ApiRecoverUpdateAckV1MessageRequest) Execute() (*http.Response, error) { - return r.ApiService.RecoverUpdateAckV1MessageExecute(r) -} - -/* -RecoverUpdateAckV1Message Method for RecoverUpdateAckV1Message - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecoverUpdateAckV1MessageRequest -*/ -func (a *DefaultApiService) RecoverUpdateAckV1Message(ctx context.Context) ApiRecoverUpdateAckV1MessageRequest { - return ApiRecoverUpdateAckV1MessageRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) RecoverUpdateAckV1MessageExecute(r ApiRecoverUpdateAckV1MessageRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RecoverUpdateAckV1Message") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.recoverUpdateAckV1Message - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiRecoverUpdateV1MessageRequest struct { - ctx context.Context - ApiService *DefaultApiService - recoverUpdateV1Message *RecoverUpdateV1Message -} - -func (r ApiRecoverUpdateV1MessageRequest) RecoverUpdateV1Message(recoverUpdateV1Message RecoverUpdateV1Message) ApiRecoverUpdateV1MessageRequest { - r.recoverUpdateV1Message = &recoverUpdateV1Message - return r -} - -func (r ApiRecoverUpdateV1MessageRequest) Execute() (*http.Response, error) { - return r.ApiService.RecoverUpdateV1MessageExecute(r) -} - -/* -RecoverUpdateV1Message Method for RecoverUpdateV1Message - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecoverUpdateV1MessageRequest -*/ -func (a *DefaultApiService) RecoverUpdateV1Message(ctx context.Context) ApiRecoverUpdateV1MessageRequest { - return ApiRecoverUpdateV1MessageRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) RecoverUpdateV1MessageExecute(r ApiRecoverUpdateV1MessageRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RecoverUpdateV1Message") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.recoverUpdateV1Message - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiRecoverV1MessageRequest struct { - ctx context.Context - ApiService *DefaultApiService - recoverV1Message *RecoverV1Message -} - -func (r ApiRecoverV1MessageRequest) RecoverV1Message(recoverV1Message RecoverV1Message) ApiRecoverV1MessageRequest { - r.recoverV1Message = &recoverV1Message - return r -} - -func (r ApiRecoverV1MessageRequest) Execute() (*http.Response, error) { - return r.ApiService.RecoverV1MessageExecute(r) -} - -/* -RecoverV1Message Method for RecoverV1Message - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecoverV1MessageRequest -*/ -func (a *DefaultApiService) RecoverV1Message(ctx context.Context) ApiRecoverV1MessageRequest { - return ApiRecoverV1MessageRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) RecoverV1MessageExecute(r ApiRecoverV1MessageRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RecoverV1Message") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.recoverV1Message - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiRecoverV1SuccessRequest struct { - ctx context.Context - ApiService *DefaultApiService - recoverSuccessV1Message *RecoverSuccessV1Message -} - -func (r ApiRecoverV1SuccessRequest) RecoverSuccessV1Message(recoverSuccessV1Message RecoverSuccessV1Message) ApiRecoverV1SuccessRequest { - r.recoverSuccessV1Message = &recoverSuccessV1Message - return r -} - -func (r ApiRecoverV1SuccessRequest) Execute() (*http.Response, error) { - return r.ApiService.RecoverV1SuccessExecute(r) -} - -/* -RecoverV1Success Method for RecoverV1Success - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecoverV1SuccessRequest -*/ -func (a *DefaultApiService) RecoverV1Success(ctx context.Context) ApiRecoverV1SuccessRequest { - return ApiRecoverV1SuccessRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) RecoverV1SuccessExecute(r ApiRecoverV1SuccessRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RecoverV1Success") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.recoverSuccessV1Message - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiRollbackAckV1MessageRequest struct { - ctx context.Context - ApiService *DefaultApiService - rollbackAckV1Message *RollbackAckV1Message -} - -func (r ApiRollbackAckV1MessageRequest) RollbackAckV1Message(rollbackAckV1Message RollbackAckV1Message) ApiRollbackAckV1MessageRequest { - r.rollbackAckV1Message = &rollbackAckV1Message - return r -} - -func (r ApiRollbackAckV1MessageRequest) Execute() (*http.Response, error) { - return r.ApiService.RollbackAckV1MessageExecute(r) -} - -/* -RollbackAckV1Message Method for RollbackAckV1Message - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRollbackAckV1MessageRequest -*/ -func (a *DefaultApiService) RollbackAckV1Message(ctx context.Context) ApiRollbackAckV1MessageRequest { - return ApiRollbackAckV1MessageRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) RollbackAckV1MessageExecute(r ApiRollbackAckV1MessageRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RollbackAckV1Message") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.rollbackAckV1Message - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiRollbackV1MessageRequest struct { - ctx context.Context - ApiService *DefaultApiService - rollbackV1Message *RollbackV1Message -} - -func (r ApiRollbackV1MessageRequest) RollbackV1Message(rollbackV1Message RollbackV1Message) ApiRollbackV1MessageRequest { - r.rollbackV1Message = &rollbackV1Message - return r -} - -func (r ApiRollbackV1MessageRequest) Execute() (*http.Response, error) { - return r.ApiService.RollbackV1MessageExecute(r) -} - -/* -RollbackV1Message Method for RollbackV1Message - - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRollbackV1MessageRequest -*/ -func (a *DefaultApiService) RollbackV1Message(ctx context.Context) ApiRollbackV1MessageRequest { - return ApiRollbackV1MessageRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) RollbackV1MessageExecute(r ApiRollbackV1MessageRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RollbackV1Message") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.rollbackV1Message - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/client.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/client.go deleted file mode 100644 index e2adcc5c7f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/client.go +++ /dev/null @@ -1,656 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Hyperledger Cactus Plugin - Odap Hermes API v2.0.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultApi *DefaultApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/configuration.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/configuration.go deleted file mode 100644 index d5b165fd8e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/configuration.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index eb0c2317be..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_asset_profile.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_asset_profile.go deleted file mode 100644 index 4501cb7c8f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_asset_profile.go +++ /dev/null @@ -1,513 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the AssetProfile type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AssetProfile{} - -// AssetProfile struct for AssetProfile -type AssetProfile struct { - Issuer *string `json:"issuer,omitempty"` - AssetCode *string `json:"assetCode,omitempty"` - AssetCodeType *string `json:"assetCodeType,omitempty"` - IssuanceDate *string `json:"issuanceDate,omitempty"` - ExpirationDate string `json:"expirationDate"` - VerificationEndPoint *string `json:"verificationEndPoint,omitempty"` - DigitalSignature *string `json:"digitalSignature,omitempty"` - ProspectusLink *string `json:"prospectusLink,omitempty"` - KeyInformationLink []interface{} `json:"keyInformationLink,omitempty"` - KeyWord []interface{} `json:"keyWord,omitempty"` - TransferRestriction []interface{} `json:"transferRestriction,omitempty"` - LedgerRequirements []interface{} `json:"ledgerRequirements,omitempty"` -} - -// NewAssetProfile instantiates a new AssetProfile object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAssetProfile(expirationDate string) *AssetProfile { - this := AssetProfile{} - this.ExpirationDate = expirationDate - return &this -} - -// NewAssetProfileWithDefaults instantiates a new AssetProfile object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAssetProfileWithDefaults() *AssetProfile { - this := AssetProfile{} - return &this -} - -// GetIssuer returns the Issuer field value if set, zero value otherwise. -func (o *AssetProfile) GetIssuer() string { - if o == nil || IsNil(o.Issuer) { - var ret string - return ret - } - return *o.Issuer -} - -// GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetIssuerOk() (*string, bool) { - if o == nil || IsNil(o.Issuer) { - return nil, false - } - return o.Issuer, true -} - -// HasIssuer returns a boolean if a field has been set. -func (o *AssetProfile) HasIssuer() bool { - if o != nil && !IsNil(o.Issuer) { - return true - } - - return false -} - -// SetIssuer gets a reference to the given string and assigns it to the Issuer field. -func (o *AssetProfile) SetIssuer(v string) { - o.Issuer = &v -} - -// GetAssetCode returns the AssetCode field value if set, zero value otherwise. -func (o *AssetProfile) GetAssetCode() string { - if o == nil || IsNil(o.AssetCode) { - var ret string - return ret - } - return *o.AssetCode -} - -// GetAssetCodeOk returns a tuple with the AssetCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetAssetCodeOk() (*string, bool) { - if o == nil || IsNil(o.AssetCode) { - return nil, false - } - return o.AssetCode, true -} - -// HasAssetCode returns a boolean if a field has been set. -func (o *AssetProfile) HasAssetCode() bool { - if o != nil && !IsNil(o.AssetCode) { - return true - } - - return false -} - -// SetAssetCode gets a reference to the given string and assigns it to the AssetCode field. -func (o *AssetProfile) SetAssetCode(v string) { - o.AssetCode = &v -} - -// GetAssetCodeType returns the AssetCodeType field value if set, zero value otherwise. -func (o *AssetProfile) GetAssetCodeType() string { - if o == nil || IsNil(o.AssetCodeType) { - var ret string - return ret - } - return *o.AssetCodeType -} - -// GetAssetCodeTypeOk returns a tuple with the AssetCodeType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetAssetCodeTypeOk() (*string, bool) { - if o == nil || IsNil(o.AssetCodeType) { - return nil, false - } - return o.AssetCodeType, true -} - -// HasAssetCodeType returns a boolean if a field has been set. -func (o *AssetProfile) HasAssetCodeType() bool { - if o != nil && !IsNil(o.AssetCodeType) { - return true - } - - return false -} - -// SetAssetCodeType gets a reference to the given string and assigns it to the AssetCodeType field. -func (o *AssetProfile) SetAssetCodeType(v string) { - o.AssetCodeType = &v -} - -// GetIssuanceDate returns the IssuanceDate field value if set, zero value otherwise. -func (o *AssetProfile) GetIssuanceDate() string { - if o == nil || IsNil(o.IssuanceDate) { - var ret string - return ret - } - return *o.IssuanceDate -} - -// GetIssuanceDateOk returns a tuple with the IssuanceDate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetIssuanceDateOk() (*string, bool) { - if o == nil || IsNil(o.IssuanceDate) { - return nil, false - } - return o.IssuanceDate, true -} - -// HasIssuanceDate returns a boolean if a field has been set. -func (o *AssetProfile) HasIssuanceDate() bool { - if o != nil && !IsNil(o.IssuanceDate) { - return true - } - - return false -} - -// SetIssuanceDate gets a reference to the given string and assigns it to the IssuanceDate field. -func (o *AssetProfile) SetIssuanceDate(v string) { - o.IssuanceDate = &v -} - -// GetExpirationDate returns the ExpirationDate field value -func (o *AssetProfile) GetExpirationDate() string { - if o == nil { - var ret string - return ret - } - - return o.ExpirationDate -} - -// GetExpirationDateOk returns a tuple with the ExpirationDate field value -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetExpirationDateOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ExpirationDate, true -} - -// SetExpirationDate sets field value -func (o *AssetProfile) SetExpirationDate(v string) { - o.ExpirationDate = v -} - -// GetVerificationEndPoint returns the VerificationEndPoint field value if set, zero value otherwise. -func (o *AssetProfile) GetVerificationEndPoint() string { - if o == nil || IsNil(o.VerificationEndPoint) { - var ret string - return ret - } - return *o.VerificationEndPoint -} - -// GetVerificationEndPointOk returns a tuple with the VerificationEndPoint field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetVerificationEndPointOk() (*string, bool) { - if o == nil || IsNil(o.VerificationEndPoint) { - return nil, false - } - return o.VerificationEndPoint, true -} - -// HasVerificationEndPoint returns a boolean if a field has been set. -func (o *AssetProfile) HasVerificationEndPoint() bool { - if o != nil && !IsNil(o.VerificationEndPoint) { - return true - } - - return false -} - -// SetVerificationEndPoint gets a reference to the given string and assigns it to the VerificationEndPoint field. -func (o *AssetProfile) SetVerificationEndPoint(v string) { - o.VerificationEndPoint = &v -} - -// GetDigitalSignature returns the DigitalSignature field value if set, zero value otherwise. -func (o *AssetProfile) GetDigitalSignature() string { - if o == nil || IsNil(o.DigitalSignature) { - var ret string - return ret - } - return *o.DigitalSignature -} - -// GetDigitalSignatureOk returns a tuple with the DigitalSignature field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetDigitalSignatureOk() (*string, bool) { - if o == nil || IsNil(o.DigitalSignature) { - return nil, false - } - return o.DigitalSignature, true -} - -// HasDigitalSignature returns a boolean if a field has been set. -func (o *AssetProfile) HasDigitalSignature() bool { - if o != nil && !IsNil(o.DigitalSignature) { - return true - } - - return false -} - -// SetDigitalSignature gets a reference to the given string and assigns it to the DigitalSignature field. -func (o *AssetProfile) SetDigitalSignature(v string) { - o.DigitalSignature = &v -} - -// GetProspectusLink returns the ProspectusLink field value if set, zero value otherwise. -func (o *AssetProfile) GetProspectusLink() string { - if o == nil || IsNil(o.ProspectusLink) { - var ret string - return ret - } - return *o.ProspectusLink -} - -// GetProspectusLinkOk returns a tuple with the ProspectusLink field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetProspectusLinkOk() (*string, bool) { - if o == nil || IsNil(o.ProspectusLink) { - return nil, false - } - return o.ProspectusLink, true -} - -// HasProspectusLink returns a boolean if a field has been set. -func (o *AssetProfile) HasProspectusLink() bool { - if o != nil && !IsNil(o.ProspectusLink) { - return true - } - - return false -} - -// SetProspectusLink gets a reference to the given string and assigns it to the ProspectusLink field. -func (o *AssetProfile) SetProspectusLink(v string) { - o.ProspectusLink = &v -} - -// GetKeyInformationLink returns the KeyInformationLink field value if set, zero value otherwise. -func (o *AssetProfile) GetKeyInformationLink() []interface{} { - if o == nil || IsNil(o.KeyInformationLink) { - var ret []interface{} - return ret - } - return o.KeyInformationLink -} - -// GetKeyInformationLinkOk returns a tuple with the KeyInformationLink field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetKeyInformationLinkOk() ([]interface{}, bool) { - if o == nil || IsNil(o.KeyInformationLink) { - return nil, false - } - return o.KeyInformationLink, true -} - -// HasKeyInformationLink returns a boolean if a field has been set. -func (o *AssetProfile) HasKeyInformationLink() bool { - if o != nil && !IsNil(o.KeyInformationLink) { - return true - } - - return false -} - -// SetKeyInformationLink gets a reference to the given []interface{} and assigns it to the KeyInformationLink field. -func (o *AssetProfile) SetKeyInformationLink(v []interface{}) { - o.KeyInformationLink = v -} - -// GetKeyWord returns the KeyWord field value if set, zero value otherwise. -func (o *AssetProfile) GetKeyWord() []interface{} { - if o == nil || IsNil(o.KeyWord) { - var ret []interface{} - return ret - } - return o.KeyWord -} - -// GetKeyWordOk returns a tuple with the KeyWord field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetKeyWordOk() ([]interface{}, bool) { - if o == nil || IsNil(o.KeyWord) { - return nil, false - } - return o.KeyWord, true -} - -// HasKeyWord returns a boolean if a field has been set. -func (o *AssetProfile) HasKeyWord() bool { - if o != nil && !IsNil(o.KeyWord) { - return true - } - - return false -} - -// SetKeyWord gets a reference to the given []interface{} and assigns it to the KeyWord field. -func (o *AssetProfile) SetKeyWord(v []interface{}) { - o.KeyWord = v -} - -// GetTransferRestriction returns the TransferRestriction field value if set, zero value otherwise. -func (o *AssetProfile) GetTransferRestriction() []interface{} { - if o == nil || IsNil(o.TransferRestriction) { - var ret []interface{} - return ret - } - return o.TransferRestriction -} - -// GetTransferRestrictionOk returns a tuple with the TransferRestriction field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetTransferRestrictionOk() ([]interface{}, bool) { - if o == nil || IsNil(o.TransferRestriction) { - return nil, false - } - return o.TransferRestriction, true -} - -// HasTransferRestriction returns a boolean if a field has been set. -func (o *AssetProfile) HasTransferRestriction() bool { - if o != nil && !IsNil(o.TransferRestriction) { - return true - } - - return false -} - -// SetTransferRestriction gets a reference to the given []interface{} and assigns it to the TransferRestriction field. -func (o *AssetProfile) SetTransferRestriction(v []interface{}) { - o.TransferRestriction = v -} - -// GetLedgerRequirements returns the LedgerRequirements field value if set, zero value otherwise. -func (o *AssetProfile) GetLedgerRequirements() []interface{} { - if o == nil || IsNil(o.LedgerRequirements) { - var ret []interface{} - return ret - } - return o.LedgerRequirements -} - -// GetLedgerRequirementsOk returns a tuple with the LedgerRequirements field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetProfile) GetLedgerRequirementsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.LedgerRequirements) { - return nil, false - } - return o.LedgerRequirements, true -} - -// HasLedgerRequirements returns a boolean if a field has been set. -func (o *AssetProfile) HasLedgerRequirements() bool { - if o != nil && !IsNil(o.LedgerRequirements) { - return true - } - - return false -} - -// SetLedgerRequirements gets a reference to the given []interface{} and assigns it to the LedgerRequirements field. -func (o *AssetProfile) SetLedgerRequirements(v []interface{}) { - o.LedgerRequirements = v -} - -func (o AssetProfile) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AssetProfile) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Issuer) { - toSerialize["issuer"] = o.Issuer - } - if !IsNil(o.AssetCode) { - toSerialize["assetCode"] = o.AssetCode - } - if !IsNil(o.AssetCodeType) { - toSerialize["assetCodeType"] = o.AssetCodeType - } - if !IsNil(o.IssuanceDate) { - toSerialize["issuanceDate"] = o.IssuanceDate - } - toSerialize["expirationDate"] = o.ExpirationDate - if !IsNil(o.VerificationEndPoint) { - toSerialize["verificationEndPoint"] = o.VerificationEndPoint - } - if !IsNil(o.DigitalSignature) { - toSerialize["digitalSignature"] = o.DigitalSignature - } - if !IsNil(o.ProspectusLink) { - toSerialize["prospectusLink"] = o.ProspectusLink - } - if !IsNil(o.KeyInformationLink) { - toSerialize["keyInformationLink"] = o.KeyInformationLink - } - if !IsNil(o.KeyWord) { - toSerialize["keyWord"] = o.KeyWord - } - if !IsNil(o.TransferRestriction) { - toSerialize["transferRestriction"] = o.TransferRestriction - } - if !IsNil(o.LedgerRequirements) { - toSerialize["ledgerRequirements"] = o.LedgerRequirements - } - return toSerialize, nil -} - -type NullableAssetProfile struct { - value *AssetProfile - isSet bool -} - -func (v NullableAssetProfile) Get() *AssetProfile { - return v.value -} - -func (v *NullableAssetProfile) Set(val *AssetProfile) { - v.value = val - v.isSet = true -} - -func (v NullableAssetProfile) IsSet() bool { - return v.isSet -} - -func (v *NullableAssetProfile) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAssetProfile(val *AssetProfile) *NullableAssetProfile { - return &NullableAssetProfile{value: val, isSet: true} -} - -func (v NullableAssetProfile) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAssetProfile) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_client_v1_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_client_v1_request.go deleted file mode 100644 index feb8bd7eba..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_client_v1_request.go +++ /dev/null @@ -1,684 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the ClientV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ClientV1Request{} - -// ClientV1Request struct for ClientV1Request -type ClientV1Request struct { - Version string `json:"version"` - LoggingProfile string `json:"loggingProfile"` - AccessControlProfile string `json:"accessControlProfile"` - AssetControlProfile string `json:"assetControlProfile"` - ApplicationProfile string `json:"applicationProfile"` - AssetProfile AssetProfile `json:"assetProfile"` - PayloadProfile PayloadProfile `json:"payloadProfile"` - SourceGatewayDltSystem string `json:"sourceGatewayDltSystem"` - RecipientGatewayDltSystem string `json:"recipientGatewayDltSystem"` - RecipientGatewayPubkey string `json:"recipientGatewayPubkey"` - OriginatorPubkey string `json:"originatorPubkey"` - BeneficiaryPubkey string `json:"beneficiaryPubkey"` - ClientIdentityPubkey string `json:"clientIdentityPubkey"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - ClientDltSystem string `json:"clientDltSystem"` - ServerDltSystem string `json:"serverDltSystem"` - ClientGatewayConfiguration ClientV1RequestClientGatewayConfiguration `json:"clientGatewayConfiguration"` - ServerGatewayConfiguration ClientV1RequestClientGatewayConfiguration `json:"serverGatewayConfiguration"` - MaxRetries float32 `json:"maxRetries"` - MaxTimeout float32 `json:"maxTimeout"` - SourceLedgerAssetID string `json:"sourceLedgerAssetID"` - RecipientLedgerAssetID string `json:"recipientLedgerAssetID"` -} - -// NewClientV1Request instantiates a new ClientV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewClientV1Request(version string, loggingProfile string, accessControlProfile string, assetControlProfile string, applicationProfile string, assetProfile AssetProfile, payloadProfile PayloadProfile, sourceGatewayDltSystem string, recipientGatewayDltSystem string, recipientGatewayPubkey string, originatorPubkey string, beneficiaryPubkey string, clientIdentityPubkey string, serverIdentityPubkey string, clientDltSystem string, serverDltSystem string, clientGatewayConfiguration ClientV1RequestClientGatewayConfiguration, serverGatewayConfiguration ClientV1RequestClientGatewayConfiguration, maxRetries float32, maxTimeout float32, sourceLedgerAssetID string, recipientLedgerAssetID string) *ClientV1Request { - this := ClientV1Request{} - this.Version = version - this.LoggingProfile = loggingProfile - this.AccessControlProfile = accessControlProfile - this.AssetControlProfile = assetControlProfile - this.ApplicationProfile = applicationProfile - this.AssetProfile = assetProfile - this.PayloadProfile = payloadProfile - this.SourceGatewayDltSystem = sourceGatewayDltSystem - this.RecipientGatewayDltSystem = recipientGatewayDltSystem - this.RecipientGatewayPubkey = recipientGatewayPubkey - this.OriginatorPubkey = originatorPubkey - this.BeneficiaryPubkey = beneficiaryPubkey - this.ClientIdentityPubkey = clientIdentityPubkey - this.ServerIdentityPubkey = serverIdentityPubkey - this.ClientDltSystem = clientDltSystem - this.ServerDltSystem = serverDltSystem - this.ClientGatewayConfiguration = clientGatewayConfiguration - this.ServerGatewayConfiguration = serverGatewayConfiguration - this.MaxRetries = maxRetries - this.MaxTimeout = maxTimeout - this.SourceLedgerAssetID = sourceLedgerAssetID - this.RecipientLedgerAssetID = recipientLedgerAssetID - return &this -} - -// NewClientV1RequestWithDefaults instantiates a new ClientV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewClientV1RequestWithDefaults() *ClientV1Request { - this := ClientV1Request{} - return &this -} - -// GetVersion returns the Version field value -func (o *ClientV1Request) GetVersion() string { - if o == nil { - var ret string - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *ClientV1Request) SetVersion(v string) { - o.Version = v -} - -// GetLoggingProfile returns the LoggingProfile field value -func (o *ClientV1Request) GetLoggingProfile() string { - if o == nil { - var ret string - return ret - } - - return o.LoggingProfile -} - -// GetLoggingProfileOk returns a tuple with the LoggingProfile field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetLoggingProfileOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LoggingProfile, true -} - -// SetLoggingProfile sets field value -func (o *ClientV1Request) SetLoggingProfile(v string) { - o.LoggingProfile = v -} - -// GetAccessControlProfile returns the AccessControlProfile field value -func (o *ClientV1Request) GetAccessControlProfile() string { - if o == nil { - var ret string - return ret - } - - return o.AccessControlProfile -} - -// GetAccessControlProfileOk returns a tuple with the AccessControlProfile field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetAccessControlProfileOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccessControlProfile, true -} - -// SetAccessControlProfile sets field value -func (o *ClientV1Request) SetAccessControlProfile(v string) { - o.AccessControlProfile = v -} - -// GetAssetControlProfile returns the AssetControlProfile field value -func (o *ClientV1Request) GetAssetControlProfile() string { - if o == nil { - var ret string - return ret - } - - return o.AssetControlProfile -} - -// GetAssetControlProfileOk returns a tuple with the AssetControlProfile field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetAssetControlProfileOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AssetControlProfile, true -} - -// SetAssetControlProfile sets field value -func (o *ClientV1Request) SetAssetControlProfile(v string) { - o.AssetControlProfile = v -} - -// GetApplicationProfile returns the ApplicationProfile field value -func (o *ClientV1Request) GetApplicationProfile() string { - if o == nil { - var ret string - return ret - } - - return o.ApplicationProfile -} - -// GetApplicationProfileOk returns a tuple with the ApplicationProfile field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetApplicationProfileOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApplicationProfile, true -} - -// SetApplicationProfile sets field value -func (o *ClientV1Request) SetApplicationProfile(v string) { - o.ApplicationProfile = v -} - -// GetAssetProfile returns the AssetProfile field value -func (o *ClientV1Request) GetAssetProfile() AssetProfile { - if o == nil { - var ret AssetProfile - return ret - } - - return o.AssetProfile -} - -// GetAssetProfileOk returns a tuple with the AssetProfile field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetAssetProfileOk() (*AssetProfile, bool) { - if o == nil { - return nil, false - } - return &o.AssetProfile, true -} - -// SetAssetProfile sets field value -func (o *ClientV1Request) SetAssetProfile(v AssetProfile) { - o.AssetProfile = v -} - -// GetPayloadProfile returns the PayloadProfile field value -func (o *ClientV1Request) GetPayloadProfile() PayloadProfile { - if o == nil { - var ret PayloadProfile - return ret - } - - return o.PayloadProfile -} - -// GetPayloadProfileOk returns a tuple with the PayloadProfile field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetPayloadProfileOk() (*PayloadProfile, bool) { - if o == nil { - return nil, false - } - return &o.PayloadProfile, true -} - -// SetPayloadProfile sets field value -func (o *ClientV1Request) SetPayloadProfile(v PayloadProfile) { - o.PayloadProfile = v -} - -// GetSourceGatewayDltSystem returns the SourceGatewayDltSystem field value -func (o *ClientV1Request) GetSourceGatewayDltSystem() string { - if o == nil { - var ret string - return ret - } - - return o.SourceGatewayDltSystem -} - -// GetSourceGatewayDltSystemOk returns a tuple with the SourceGatewayDltSystem field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetSourceGatewayDltSystemOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SourceGatewayDltSystem, true -} - -// SetSourceGatewayDltSystem sets field value -func (o *ClientV1Request) SetSourceGatewayDltSystem(v string) { - o.SourceGatewayDltSystem = v -} - -// GetRecipientGatewayDltSystem returns the RecipientGatewayDltSystem field value -func (o *ClientV1Request) GetRecipientGatewayDltSystem() string { - if o == nil { - var ret string - return ret - } - - return o.RecipientGatewayDltSystem -} - -// GetRecipientGatewayDltSystemOk returns a tuple with the RecipientGatewayDltSystem field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetRecipientGatewayDltSystemOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RecipientGatewayDltSystem, true -} - -// SetRecipientGatewayDltSystem sets field value -func (o *ClientV1Request) SetRecipientGatewayDltSystem(v string) { - o.RecipientGatewayDltSystem = v -} - -// GetRecipientGatewayPubkey returns the RecipientGatewayPubkey field value -func (o *ClientV1Request) GetRecipientGatewayPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.RecipientGatewayPubkey -} - -// GetRecipientGatewayPubkeyOk returns a tuple with the RecipientGatewayPubkey field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetRecipientGatewayPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RecipientGatewayPubkey, true -} - -// SetRecipientGatewayPubkey sets field value -func (o *ClientV1Request) SetRecipientGatewayPubkey(v string) { - o.RecipientGatewayPubkey = v -} - -// GetOriginatorPubkey returns the OriginatorPubkey field value -func (o *ClientV1Request) GetOriginatorPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.OriginatorPubkey -} - -// GetOriginatorPubkeyOk returns a tuple with the OriginatorPubkey field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetOriginatorPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OriginatorPubkey, true -} - -// SetOriginatorPubkey sets field value -func (o *ClientV1Request) SetOriginatorPubkey(v string) { - o.OriginatorPubkey = v -} - -// GetBeneficiaryPubkey returns the BeneficiaryPubkey field value -func (o *ClientV1Request) GetBeneficiaryPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.BeneficiaryPubkey -} - -// GetBeneficiaryPubkeyOk returns a tuple with the BeneficiaryPubkey field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetBeneficiaryPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BeneficiaryPubkey, true -} - -// SetBeneficiaryPubkey sets field value -func (o *ClientV1Request) SetBeneficiaryPubkey(v string) { - o.BeneficiaryPubkey = v -} - -// GetClientIdentityPubkey returns the ClientIdentityPubkey field value -func (o *ClientV1Request) GetClientIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ClientIdentityPubkey -} - -// GetClientIdentityPubkeyOk returns a tuple with the ClientIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetClientIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdentityPubkey, true -} - -// SetClientIdentityPubkey sets field value -func (o *ClientV1Request) SetClientIdentityPubkey(v string) { - o.ClientIdentityPubkey = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *ClientV1Request) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *ClientV1Request) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetClientDltSystem returns the ClientDltSystem field value -func (o *ClientV1Request) GetClientDltSystem() string { - if o == nil { - var ret string - return ret - } - - return o.ClientDltSystem -} - -// GetClientDltSystemOk returns a tuple with the ClientDltSystem field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetClientDltSystemOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientDltSystem, true -} - -// SetClientDltSystem sets field value -func (o *ClientV1Request) SetClientDltSystem(v string) { - o.ClientDltSystem = v -} - -// GetServerDltSystem returns the ServerDltSystem field value -func (o *ClientV1Request) GetServerDltSystem() string { - if o == nil { - var ret string - return ret - } - - return o.ServerDltSystem -} - -// GetServerDltSystemOk returns a tuple with the ServerDltSystem field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetServerDltSystemOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerDltSystem, true -} - -// SetServerDltSystem sets field value -func (o *ClientV1Request) SetServerDltSystem(v string) { - o.ServerDltSystem = v -} - -// GetClientGatewayConfiguration returns the ClientGatewayConfiguration field value -func (o *ClientV1Request) GetClientGatewayConfiguration() ClientV1RequestClientGatewayConfiguration { - if o == nil { - var ret ClientV1RequestClientGatewayConfiguration - return ret - } - - return o.ClientGatewayConfiguration -} - -// GetClientGatewayConfigurationOk returns a tuple with the ClientGatewayConfiguration field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetClientGatewayConfigurationOk() (*ClientV1RequestClientGatewayConfiguration, bool) { - if o == nil { - return nil, false - } - return &o.ClientGatewayConfiguration, true -} - -// SetClientGatewayConfiguration sets field value -func (o *ClientV1Request) SetClientGatewayConfiguration(v ClientV1RequestClientGatewayConfiguration) { - o.ClientGatewayConfiguration = v -} - -// GetServerGatewayConfiguration returns the ServerGatewayConfiguration field value -func (o *ClientV1Request) GetServerGatewayConfiguration() ClientV1RequestClientGatewayConfiguration { - if o == nil { - var ret ClientV1RequestClientGatewayConfiguration - return ret - } - - return o.ServerGatewayConfiguration -} - -// GetServerGatewayConfigurationOk returns a tuple with the ServerGatewayConfiguration field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetServerGatewayConfigurationOk() (*ClientV1RequestClientGatewayConfiguration, bool) { - if o == nil { - return nil, false - } - return &o.ServerGatewayConfiguration, true -} - -// SetServerGatewayConfiguration sets field value -func (o *ClientV1Request) SetServerGatewayConfiguration(v ClientV1RequestClientGatewayConfiguration) { - o.ServerGatewayConfiguration = v -} - -// GetMaxRetries returns the MaxRetries field value -func (o *ClientV1Request) GetMaxRetries() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.MaxRetries -} - -// GetMaxRetriesOk returns a tuple with the MaxRetries field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetMaxRetriesOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.MaxRetries, true -} - -// SetMaxRetries sets field value -func (o *ClientV1Request) SetMaxRetries(v float32) { - o.MaxRetries = v -} - -// GetMaxTimeout returns the MaxTimeout field value -func (o *ClientV1Request) GetMaxTimeout() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.MaxTimeout -} - -// GetMaxTimeoutOk returns a tuple with the MaxTimeout field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetMaxTimeoutOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.MaxTimeout, true -} - -// SetMaxTimeout sets field value -func (o *ClientV1Request) SetMaxTimeout(v float32) { - o.MaxTimeout = v -} - -// GetSourceLedgerAssetID returns the SourceLedgerAssetID field value -func (o *ClientV1Request) GetSourceLedgerAssetID() string { - if o == nil { - var ret string - return ret - } - - return o.SourceLedgerAssetID -} - -// GetSourceLedgerAssetIDOk returns a tuple with the SourceLedgerAssetID field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetSourceLedgerAssetIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SourceLedgerAssetID, true -} - -// SetSourceLedgerAssetID sets field value -func (o *ClientV1Request) SetSourceLedgerAssetID(v string) { - o.SourceLedgerAssetID = v -} - -// GetRecipientLedgerAssetID returns the RecipientLedgerAssetID field value -func (o *ClientV1Request) GetRecipientLedgerAssetID() string { - if o == nil { - var ret string - return ret - } - - return o.RecipientLedgerAssetID -} - -// GetRecipientLedgerAssetIDOk returns a tuple with the RecipientLedgerAssetID field value -// and a boolean to check if the value has been set. -func (o *ClientV1Request) GetRecipientLedgerAssetIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RecipientLedgerAssetID, true -} - -// SetRecipientLedgerAssetID sets field value -func (o *ClientV1Request) SetRecipientLedgerAssetID(v string) { - o.RecipientLedgerAssetID = v -} - -func (o ClientV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ClientV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["version"] = o.Version - toSerialize["loggingProfile"] = o.LoggingProfile - toSerialize["accessControlProfile"] = o.AccessControlProfile - toSerialize["assetControlProfile"] = o.AssetControlProfile - toSerialize["applicationProfile"] = o.ApplicationProfile - toSerialize["assetProfile"] = o.AssetProfile - toSerialize["payloadProfile"] = o.PayloadProfile - toSerialize["sourceGatewayDltSystem"] = o.SourceGatewayDltSystem - toSerialize["recipientGatewayDltSystem"] = o.RecipientGatewayDltSystem - toSerialize["recipientGatewayPubkey"] = o.RecipientGatewayPubkey - toSerialize["originatorPubkey"] = o.OriginatorPubkey - toSerialize["beneficiaryPubkey"] = o.BeneficiaryPubkey - toSerialize["clientIdentityPubkey"] = o.ClientIdentityPubkey - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["clientDltSystem"] = o.ClientDltSystem - toSerialize["serverDltSystem"] = o.ServerDltSystem - toSerialize["clientGatewayConfiguration"] = o.ClientGatewayConfiguration - toSerialize["serverGatewayConfiguration"] = o.ServerGatewayConfiguration - toSerialize["maxRetries"] = o.MaxRetries - toSerialize["maxTimeout"] = o.MaxTimeout - toSerialize["sourceLedgerAssetID"] = o.SourceLedgerAssetID - toSerialize["recipientLedgerAssetID"] = o.RecipientLedgerAssetID - return toSerialize, nil -} - -type NullableClientV1Request struct { - value *ClientV1Request - isSet bool -} - -func (v NullableClientV1Request) Get() *ClientV1Request { - return v.value -} - -func (v *NullableClientV1Request) Set(val *ClientV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableClientV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableClientV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClientV1Request(val *ClientV1Request) *NullableClientV1Request { - return &NullableClientV1Request{value: val, isSet: true} -} - -func (v NullableClientV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClientV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_client_v1_request_client_gateway_configuration.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_client_v1_request_client_gateway_configuration.go deleted file mode 100644 index 070d49e9bc..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_client_v1_request_client_gateway_configuration.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the ClientV1RequestClientGatewayConfiguration type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ClientV1RequestClientGatewayConfiguration{} - -// ClientV1RequestClientGatewayConfiguration struct for ClientV1RequestClientGatewayConfiguration -type ClientV1RequestClientGatewayConfiguration struct { - ApiHost string `json:"apiHost"` -} - -// NewClientV1RequestClientGatewayConfiguration instantiates a new ClientV1RequestClientGatewayConfiguration object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewClientV1RequestClientGatewayConfiguration(apiHost string) *ClientV1RequestClientGatewayConfiguration { - this := ClientV1RequestClientGatewayConfiguration{} - this.ApiHost = apiHost - return &this -} - -// NewClientV1RequestClientGatewayConfigurationWithDefaults instantiates a new ClientV1RequestClientGatewayConfiguration object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewClientV1RequestClientGatewayConfigurationWithDefaults() *ClientV1RequestClientGatewayConfiguration { - this := ClientV1RequestClientGatewayConfiguration{} - return &this -} - -// GetApiHost returns the ApiHost field value -func (o *ClientV1RequestClientGatewayConfiguration) GetApiHost() string { - if o == nil { - var ret string - return ret - } - - return o.ApiHost -} - -// GetApiHostOk returns a tuple with the ApiHost field value -// and a boolean to check if the value has been set. -func (o *ClientV1RequestClientGatewayConfiguration) GetApiHostOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiHost, true -} - -// SetApiHost sets field value -func (o *ClientV1RequestClientGatewayConfiguration) SetApiHost(v string) { - o.ApiHost = v -} - -func (o ClientV1RequestClientGatewayConfiguration) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ClientV1RequestClientGatewayConfiguration) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiHost"] = o.ApiHost - return toSerialize, nil -} - -type NullableClientV1RequestClientGatewayConfiguration struct { - value *ClientV1RequestClientGatewayConfiguration - isSet bool -} - -func (v NullableClientV1RequestClientGatewayConfiguration) Get() *ClientV1RequestClientGatewayConfiguration { - return v.value -} - -func (v *NullableClientV1RequestClientGatewayConfiguration) Set(val *ClientV1RequestClientGatewayConfiguration) { - v.value = val - v.isSet = true -} - -func (v NullableClientV1RequestClientGatewayConfiguration) IsSet() bool { - return v.isSet -} - -func (v *NullableClientV1RequestClientGatewayConfiguration) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClientV1RequestClientGatewayConfiguration(val *ClientV1RequestClientGatewayConfiguration) *NullableClientV1RequestClientGatewayConfiguration { - return &NullableClientV1RequestClientGatewayConfiguration{value: val, isSet: true} -} - -func (v NullableClientV1RequestClientGatewayConfiguration) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClientV1RequestClientGatewayConfiguration) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_final_v1_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_final_v1_request.go deleted file mode 100644 index 960770ecbe..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_final_v1_request.go +++ /dev/null @@ -1,388 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the CommitFinalV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CommitFinalV1Request{} - -// CommitFinalV1Request struct for CommitFinalV1Request -type CommitFinalV1Request struct { - SessionID string `json:"sessionID"` - MessageType string `json:"messageType"` - ClientIdentityPubkey string `json:"clientIdentityPubkey"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - CommitFinalClaim string `json:"commitFinalClaim"` - CommitFinalClaimFormat map[string]interface{} `json:"commitFinalClaimFormat,omitempty"` - HashCommitPrepareAck string `json:"hashCommitPrepareAck"` - ClientTransferNumber NullableInt32 `json:"clientTransferNumber,omitempty"` - Signature string `json:"signature"` - SequenceNumber float32 `json:"sequenceNumber"` -} - -// NewCommitFinalV1Request instantiates a new CommitFinalV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCommitFinalV1Request(sessionID string, messageType string, clientIdentityPubkey string, serverIdentityPubkey string, commitFinalClaim string, hashCommitPrepareAck string, signature string, sequenceNumber float32) *CommitFinalV1Request { - this := CommitFinalV1Request{} - this.SessionID = sessionID - this.MessageType = messageType - this.ClientIdentityPubkey = clientIdentityPubkey - this.ServerIdentityPubkey = serverIdentityPubkey - this.CommitFinalClaim = commitFinalClaim - this.HashCommitPrepareAck = hashCommitPrepareAck - this.Signature = signature - this.SequenceNumber = sequenceNumber - return &this -} - -// NewCommitFinalV1RequestWithDefaults instantiates a new CommitFinalV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCommitFinalV1RequestWithDefaults() *CommitFinalV1Request { - this := CommitFinalV1Request{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *CommitFinalV1Request) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Request) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *CommitFinalV1Request) SetSessionID(v string) { - o.SessionID = v -} - -// GetMessageType returns the MessageType field value -func (o *CommitFinalV1Request) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Request) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *CommitFinalV1Request) SetMessageType(v string) { - o.MessageType = v -} - -// GetClientIdentityPubkey returns the ClientIdentityPubkey field value -func (o *CommitFinalV1Request) GetClientIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ClientIdentityPubkey -} - -// GetClientIdentityPubkeyOk returns a tuple with the ClientIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Request) GetClientIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdentityPubkey, true -} - -// SetClientIdentityPubkey sets field value -func (o *CommitFinalV1Request) SetClientIdentityPubkey(v string) { - o.ClientIdentityPubkey = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *CommitFinalV1Request) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Request) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *CommitFinalV1Request) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetCommitFinalClaim returns the CommitFinalClaim field value -func (o *CommitFinalV1Request) GetCommitFinalClaim() string { - if o == nil { - var ret string - return ret - } - - return o.CommitFinalClaim -} - -// GetCommitFinalClaimOk returns a tuple with the CommitFinalClaim field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Request) GetCommitFinalClaimOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CommitFinalClaim, true -} - -// SetCommitFinalClaim sets field value -func (o *CommitFinalV1Request) SetCommitFinalClaim(v string) { - o.CommitFinalClaim = v -} - -// GetCommitFinalClaimFormat returns the CommitFinalClaimFormat field value if set, zero value otherwise. -func (o *CommitFinalV1Request) GetCommitFinalClaimFormat() map[string]interface{} { - if o == nil || IsNil(o.CommitFinalClaimFormat) { - var ret map[string]interface{} - return ret - } - return o.CommitFinalClaimFormat -} - -// GetCommitFinalClaimFormatOk returns a tuple with the CommitFinalClaimFormat field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Request) GetCommitFinalClaimFormatOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.CommitFinalClaimFormat) { - return map[string]interface{}{}, false - } - return o.CommitFinalClaimFormat, true -} - -// HasCommitFinalClaimFormat returns a boolean if a field has been set. -func (o *CommitFinalV1Request) HasCommitFinalClaimFormat() bool { - if o != nil && !IsNil(o.CommitFinalClaimFormat) { - return true - } - - return false -} - -// SetCommitFinalClaimFormat gets a reference to the given map[string]interface{} and assigns it to the CommitFinalClaimFormat field. -func (o *CommitFinalV1Request) SetCommitFinalClaimFormat(v map[string]interface{}) { - o.CommitFinalClaimFormat = v -} - -// GetHashCommitPrepareAck returns the HashCommitPrepareAck field value -func (o *CommitFinalV1Request) GetHashCommitPrepareAck() string { - if o == nil { - var ret string - return ret - } - - return o.HashCommitPrepareAck -} - -// GetHashCommitPrepareAckOk returns a tuple with the HashCommitPrepareAck field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Request) GetHashCommitPrepareAckOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashCommitPrepareAck, true -} - -// SetHashCommitPrepareAck sets field value -func (o *CommitFinalV1Request) SetHashCommitPrepareAck(v string) { - o.HashCommitPrepareAck = v -} - -// GetClientTransferNumber returns the ClientTransferNumber field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CommitFinalV1Request) GetClientTransferNumber() int32 { - if o == nil || IsNil(o.ClientTransferNumber.Get()) { - var ret int32 - return ret - } - return *o.ClientTransferNumber.Get() -} - -// GetClientTransferNumberOk returns a tuple with the ClientTransferNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CommitFinalV1Request) GetClientTransferNumberOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.ClientTransferNumber.Get(), o.ClientTransferNumber.IsSet() -} - -// HasClientTransferNumber returns a boolean if a field has been set. -func (o *CommitFinalV1Request) HasClientTransferNumber() bool { - if o != nil && o.ClientTransferNumber.IsSet() { - return true - } - - return false -} - -// SetClientTransferNumber gets a reference to the given NullableInt32 and assigns it to the ClientTransferNumber field. -func (o *CommitFinalV1Request) SetClientTransferNumber(v int32) { - o.ClientTransferNumber.Set(&v) -} -// SetClientTransferNumberNil sets the value for ClientTransferNumber to be an explicit nil -func (o *CommitFinalV1Request) SetClientTransferNumberNil() { - o.ClientTransferNumber.Set(nil) -} - -// UnsetClientTransferNumber ensures that no value is present for ClientTransferNumber, not even an explicit nil -func (o *CommitFinalV1Request) UnsetClientTransferNumber() { - o.ClientTransferNumber.Unset() -} - -// GetSignature returns the Signature field value -func (o *CommitFinalV1Request) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Request) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *CommitFinalV1Request) SetSignature(v string) { - o.Signature = v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *CommitFinalV1Request) GetSequenceNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Request) GetSequenceNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *CommitFinalV1Request) SetSequenceNumber(v float32) { - o.SequenceNumber = v -} - -func (o CommitFinalV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CommitFinalV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["messageType"] = o.MessageType - toSerialize["clientIdentityPubkey"] = o.ClientIdentityPubkey - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["commitFinalClaim"] = o.CommitFinalClaim - if !IsNil(o.CommitFinalClaimFormat) { - toSerialize["commitFinalClaimFormat"] = o.CommitFinalClaimFormat - } - toSerialize["hashCommitPrepareAck"] = o.HashCommitPrepareAck - if o.ClientTransferNumber.IsSet() { - toSerialize["clientTransferNumber"] = o.ClientTransferNumber.Get() - } - toSerialize["signature"] = o.Signature - toSerialize["sequenceNumber"] = o.SequenceNumber - return toSerialize, nil -} - -type NullableCommitFinalV1Request struct { - value *CommitFinalV1Request - isSet bool -} - -func (v NullableCommitFinalV1Request) Get() *CommitFinalV1Request { - return v.value -} - -func (v *NullableCommitFinalV1Request) Set(val *CommitFinalV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableCommitFinalV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableCommitFinalV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCommitFinalV1Request(val *CommitFinalV1Request) *NullableCommitFinalV1Request { - return &NullableCommitFinalV1Request{value: val, isSet: true} -} - -func (v NullableCommitFinalV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCommitFinalV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_final_v1_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_final_v1_response.go deleted file mode 100644 index b9d1583a95..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_final_v1_response.go +++ /dev/null @@ -1,378 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the CommitFinalV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CommitFinalV1Response{} - -// CommitFinalV1Response struct for CommitFinalV1Response -type CommitFinalV1Response struct { - SessionID string `json:"sessionID"` - MessageType string `json:"messageType"` - ClientIdentityPubkey string `json:"clientIdentityPubkey"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - CommitAcknowledgementClaim string `json:"commitAcknowledgementClaim"` - CommitAcknowledgementClaimFormat map[string]interface{} `json:"commitAcknowledgementClaimFormat,omitempty"` - HashCommitFinal string `json:"hashCommitFinal"` - ServerTransferNumber *int32 `json:"serverTransferNumber,omitempty"` - Signature string `json:"signature"` - SequenceNumber float32 `json:"sequenceNumber"` -} - -// NewCommitFinalV1Response instantiates a new CommitFinalV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCommitFinalV1Response(sessionID string, messageType string, clientIdentityPubkey string, serverIdentityPubkey string, commitAcknowledgementClaim string, hashCommitFinal string, signature string, sequenceNumber float32) *CommitFinalV1Response { - this := CommitFinalV1Response{} - this.SessionID = sessionID - this.MessageType = messageType - this.ClientIdentityPubkey = clientIdentityPubkey - this.ServerIdentityPubkey = serverIdentityPubkey - this.CommitAcknowledgementClaim = commitAcknowledgementClaim - this.HashCommitFinal = hashCommitFinal - this.Signature = signature - this.SequenceNumber = sequenceNumber - return &this -} - -// NewCommitFinalV1ResponseWithDefaults instantiates a new CommitFinalV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCommitFinalV1ResponseWithDefaults() *CommitFinalV1Response { - this := CommitFinalV1Response{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *CommitFinalV1Response) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Response) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *CommitFinalV1Response) SetSessionID(v string) { - o.SessionID = v -} - -// GetMessageType returns the MessageType field value -func (o *CommitFinalV1Response) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Response) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *CommitFinalV1Response) SetMessageType(v string) { - o.MessageType = v -} - -// GetClientIdentityPubkey returns the ClientIdentityPubkey field value -func (o *CommitFinalV1Response) GetClientIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ClientIdentityPubkey -} - -// GetClientIdentityPubkeyOk returns a tuple with the ClientIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Response) GetClientIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdentityPubkey, true -} - -// SetClientIdentityPubkey sets field value -func (o *CommitFinalV1Response) SetClientIdentityPubkey(v string) { - o.ClientIdentityPubkey = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *CommitFinalV1Response) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Response) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *CommitFinalV1Response) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetCommitAcknowledgementClaim returns the CommitAcknowledgementClaim field value -func (o *CommitFinalV1Response) GetCommitAcknowledgementClaim() string { - if o == nil { - var ret string - return ret - } - - return o.CommitAcknowledgementClaim -} - -// GetCommitAcknowledgementClaimOk returns a tuple with the CommitAcknowledgementClaim field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Response) GetCommitAcknowledgementClaimOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CommitAcknowledgementClaim, true -} - -// SetCommitAcknowledgementClaim sets field value -func (o *CommitFinalV1Response) SetCommitAcknowledgementClaim(v string) { - o.CommitAcknowledgementClaim = v -} - -// GetCommitAcknowledgementClaimFormat returns the CommitAcknowledgementClaimFormat field value if set, zero value otherwise. -func (o *CommitFinalV1Response) GetCommitAcknowledgementClaimFormat() map[string]interface{} { - if o == nil || IsNil(o.CommitAcknowledgementClaimFormat) { - var ret map[string]interface{} - return ret - } - return o.CommitAcknowledgementClaimFormat -} - -// GetCommitAcknowledgementClaimFormatOk returns a tuple with the CommitAcknowledgementClaimFormat field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Response) GetCommitAcknowledgementClaimFormatOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.CommitAcknowledgementClaimFormat) { - return map[string]interface{}{}, false - } - return o.CommitAcknowledgementClaimFormat, true -} - -// HasCommitAcknowledgementClaimFormat returns a boolean if a field has been set. -func (o *CommitFinalV1Response) HasCommitAcknowledgementClaimFormat() bool { - if o != nil && !IsNil(o.CommitAcknowledgementClaimFormat) { - return true - } - - return false -} - -// SetCommitAcknowledgementClaimFormat gets a reference to the given map[string]interface{} and assigns it to the CommitAcknowledgementClaimFormat field. -func (o *CommitFinalV1Response) SetCommitAcknowledgementClaimFormat(v map[string]interface{}) { - o.CommitAcknowledgementClaimFormat = v -} - -// GetHashCommitFinal returns the HashCommitFinal field value -func (o *CommitFinalV1Response) GetHashCommitFinal() string { - if o == nil { - var ret string - return ret - } - - return o.HashCommitFinal -} - -// GetHashCommitFinalOk returns a tuple with the HashCommitFinal field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Response) GetHashCommitFinalOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashCommitFinal, true -} - -// SetHashCommitFinal sets field value -func (o *CommitFinalV1Response) SetHashCommitFinal(v string) { - o.HashCommitFinal = v -} - -// GetServerTransferNumber returns the ServerTransferNumber field value if set, zero value otherwise. -func (o *CommitFinalV1Response) GetServerTransferNumber() int32 { - if o == nil || IsNil(o.ServerTransferNumber) { - var ret int32 - return ret - } - return *o.ServerTransferNumber -} - -// GetServerTransferNumberOk returns a tuple with the ServerTransferNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Response) GetServerTransferNumberOk() (*int32, bool) { - if o == nil || IsNil(o.ServerTransferNumber) { - return nil, false - } - return o.ServerTransferNumber, true -} - -// HasServerTransferNumber returns a boolean if a field has been set. -func (o *CommitFinalV1Response) HasServerTransferNumber() bool { - if o != nil && !IsNil(o.ServerTransferNumber) { - return true - } - - return false -} - -// SetServerTransferNumber gets a reference to the given int32 and assigns it to the ServerTransferNumber field. -func (o *CommitFinalV1Response) SetServerTransferNumber(v int32) { - o.ServerTransferNumber = &v -} - -// GetSignature returns the Signature field value -func (o *CommitFinalV1Response) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Response) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *CommitFinalV1Response) SetSignature(v string) { - o.Signature = v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *CommitFinalV1Response) GetSequenceNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *CommitFinalV1Response) GetSequenceNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *CommitFinalV1Response) SetSequenceNumber(v float32) { - o.SequenceNumber = v -} - -func (o CommitFinalV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CommitFinalV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["messageType"] = o.MessageType - toSerialize["clientIdentityPubkey"] = o.ClientIdentityPubkey - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["commitAcknowledgementClaim"] = o.CommitAcknowledgementClaim - if !IsNil(o.CommitAcknowledgementClaimFormat) { - toSerialize["commitAcknowledgementClaimFormat"] = o.CommitAcknowledgementClaimFormat - } - toSerialize["hashCommitFinal"] = o.HashCommitFinal - if !IsNil(o.ServerTransferNumber) { - toSerialize["serverTransferNumber"] = o.ServerTransferNumber - } - toSerialize["signature"] = o.Signature - toSerialize["sequenceNumber"] = o.SequenceNumber - return toSerialize, nil -} - -type NullableCommitFinalV1Response struct { - value *CommitFinalV1Response - isSet bool -} - -func (v NullableCommitFinalV1Response) Get() *CommitFinalV1Response { - return v.value -} - -func (v *NullableCommitFinalV1Response) Set(val *CommitFinalV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableCommitFinalV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableCommitFinalV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCommitFinalV1Response(val *CommitFinalV1Response) *NullableCommitFinalV1Response { - return &NullableCommitFinalV1Response{value: val, isSet: true} -} - -func (v NullableCommitFinalV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCommitFinalV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_preparation_v1_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_preparation_v1_request.go deleted file mode 100644 index 04ca5d6e14..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_preparation_v1_request.go +++ /dev/null @@ -1,315 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the CommitPreparationV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CommitPreparationV1Request{} - -// CommitPreparationV1Request struct for CommitPreparationV1Request -type CommitPreparationV1Request struct { - SessionID string `json:"sessionID"` - MessageType string `json:"messageType"` - ClientIdentityPubkey string `json:"clientIdentityPubkey"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - HashLockEvidenceAck string `json:"hashLockEvidenceAck"` - ClientTransferNumber *int32 `json:"clientTransferNumber,omitempty"` - Signature string `json:"signature"` - SequenceNumber float32 `json:"sequenceNumber"` -} - -// NewCommitPreparationV1Request instantiates a new CommitPreparationV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCommitPreparationV1Request(sessionID string, messageType string, clientIdentityPubkey string, serverIdentityPubkey string, hashLockEvidenceAck string, signature string, sequenceNumber float32) *CommitPreparationV1Request { - this := CommitPreparationV1Request{} - this.SessionID = sessionID - this.MessageType = messageType - this.ClientIdentityPubkey = clientIdentityPubkey - this.ServerIdentityPubkey = serverIdentityPubkey - this.HashLockEvidenceAck = hashLockEvidenceAck - this.Signature = signature - this.SequenceNumber = sequenceNumber - return &this -} - -// NewCommitPreparationV1RequestWithDefaults instantiates a new CommitPreparationV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCommitPreparationV1RequestWithDefaults() *CommitPreparationV1Request { - this := CommitPreparationV1Request{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *CommitPreparationV1Request) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Request) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *CommitPreparationV1Request) SetSessionID(v string) { - o.SessionID = v -} - -// GetMessageType returns the MessageType field value -func (o *CommitPreparationV1Request) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Request) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *CommitPreparationV1Request) SetMessageType(v string) { - o.MessageType = v -} - -// GetClientIdentityPubkey returns the ClientIdentityPubkey field value -func (o *CommitPreparationV1Request) GetClientIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ClientIdentityPubkey -} - -// GetClientIdentityPubkeyOk returns a tuple with the ClientIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Request) GetClientIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdentityPubkey, true -} - -// SetClientIdentityPubkey sets field value -func (o *CommitPreparationV1Request) SetClientIdentityPubkey(v string) { - o.ClientIdentityPubkey = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *CommitPreparationV1Request) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Request) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *CommitPreparationV1Request) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetHashLockEvidenceAck returns the HashLockEvidenceAck field value -func (o *CommitPreparationV1Request) GetHashLockEvidenceAck() string { - if o == nil { - var ret string - return ret - } - - return o.HashLockEvidenceAck -} - -// GetHashLockEvidenceAckOk returns a tuple with the HashLockEvidenceAck field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Request) GetHashLockEvidenceAckOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashLockEvidenceAck, true -} - -// SetHashLockEvidenceAck sets field value -func (o *CommitPreparationV1Request) SetHashLockEvidenceAck(v string) { - o.HashLockEvidenceAck = v -} - -// GetClientTransferNumber returns the ClientTransferNumber field value if set, zero value otherwise. -func (o *CommitPreparationV1Request) GetClientTransferNumber() int32 { - if o == nil || IsNil(o.ClientTransferNumber) { - var ret int32 - return ret - } - return *o.ClientTransferNumber -} - -// GetClientTransferNumberOk returns a tuple with the ClientTransferNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Request) GetClientTransferNumberOk() (*int32, bool) { - if o == nil || IsNil(o.ClientTransferNumber) { - return nil, false - } - return o.ClientTransferNumber, true -} - -// HasClientTransferNumber returns a boolean if a field has been set. -func (o *CommitPreparationV1Request) HasClientTransferNumber() bool { - if o != nil && !IsNil(o.ClientTransferNumber) { - return true - } - - return false -} - -// SetClientTransferNumber gets a reference to the given int32 and assigns it to the ClientTransferNumber field. -func (o *CommitPreparationV1Request) SetClientTransferNumber(v int32) { - o.ClientTransferNumber = &v -} - -// GetSignature returns the Signature field value -func (o *CommitPreparationV1Request) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Request) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *CommitPreparationV1Request) SetSignature(v string) { - o.Signature = v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *CommitPreparationV1Request) GetSequenceNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Request) GetSequenceNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *CommitPreparationV1Request) SetSequenceNumber(v float32) { - o.SequenceNumber = v -} - -func (o CommitPreparationV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CommitPreparationV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["messageType"] = o.MessageType - toSerialize["clientIdentityPubkey"] = o.ClientIdentityPubkey - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["hashLockEvidenceAck"] = o.HashLockEvidenceAck - if !IsNil(o.ClientTransferNumber) { - toSerialize["clientTransferNumber"] = o.ClientTransferNumber - } - toSerialize["signature"] = o.Signature - toSerialize["sequenceNumber"] = o.SequenceNumber - return toSerialize, nil -} - -type NullableCommitPreparationV1Request struct { - value *CommitPreparationV1Request - isSet bool -} - -func (v NullableCommitPreparationV1Request) Get() *CommitPreparationV1Request { - return v.value -} - -func (v *NullableCommitPreparationV1Request) Set(val *CommitPreparationV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableCommitPreparationV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableCommitPreparationV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCommitPreparationV1Request(val *CommitPreparationV1Request) *NullableCommitPreparationV1Request { - return &NullableCommitPreparationV1Request{value: val, isSet: true} -} - -func (v NullableCommitPreparationV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCommitPreparationV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_preparation_v1_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_preparation_v1_response.go deleted file mode 100644 index 0cc74e0df7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_commit_preparation_v1_response.go +++ /dev/null @@ -1,315 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the CommitPreparationV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CommitPreparationV1Response{} - -// CommitPreparationV1Response struct for CommitPreparationV1Response -type CommitPreparationV1Response struct { - SessionID string `json:"sessionID"` - MessageType string `json:"messageType"` - ClientIdentityPubkey string `json:"clientIdentityPubkey"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - HashCommitPrep string `json:"hashCommitPrep"` - ServerTransferNumber *string `json:"serverTransferNumber,omitempty"` - Signature string `json:"signature"` - SequenceNumber float32 `json:"sequenceNumber"` -} - -// NewCommitPreparationV1Response instantiates a new CommitPreparationV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCommitPreparationV1Response(sessionID string, messageType string, clientIdentityPubkey string, serverIdentityPubkey string, hashCommitPrep string, signature string, sequenceNumber float32) *CommitPreparationV1Response { - this := CommitPreparationV1Response{} - this.SessionID = sessionID - this.MessageType = messageType - this.ClientIdentityPubkey = clientIdentityPubkey - this.ServerIdentityPubkey = serverIdentityPubkey - this.HashCommitPrep = hashCommitPrep - this.Signature = signature - this.SequenceNumber = sequenceNumber - return &this -} - -// NewCommitPreparationV1ResponseWithDefaults instantiates a new CommitPreparationV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCommitPreparationV1ResponseWithDefaults() *CommitPreparationV1Response { - this := CommitPreparationV1Response{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *CommitPreparationV1Response) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Response) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *CommitPreparationV1Response) SetSessionID(v string) { - o.SessionID = v -} - -// GetMessageType returns the MessageType field value -func (o *CommitPreparationV1Response) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Response) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *CommitPreparationV1Response) SetMessageType(v string) { - o.MessageType = v -} - -// GetClientIdentityPubkey returns the ClientIdentityPubkey field value -func (o *CommitPreparationV1Response) GetClientIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ClientIdentityPubkey -} - -// GetClientIdentityPubkeyOk returns a tuple with the ClientIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Response) GetClientIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdentityPubkey, true -} - -// SetClientIdentityPubkey sets field value -func (o *CommitPreparationV1Response) SetClientIdentityPubkey(v string) { - o.ClientIdentityPubkey = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *CommitPreparationV1Response) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Response) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *CommitPreparationV1Response) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetHashCommitPrep returns the HashCommitPrep field value -func (o *CommitPreparationV1Response) GetHashCommitPrep() string { - if o == nil { - var ret string - return ret - } - - return o.HashCommitPrep -} - -// GetHashCommitPrepOk returns a tuple with the HashCommitPrep field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Response) GetHashCommitPrepOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashCommitPrep, true -} - -// SetHashCommitPrep sets field value -func (o *CommitPreparationV1Response) SetHashCommitPrep(v string) { - o.HashCommitPrep = v -} - -// GetServerTransferNumber returns the ServerTransferNumber field value if set, zero value otherwise. -func (o *CommitPreparationV1Response) GetServerTransferNumber() string { - if o == nil || IsNil(o.ServerTransferNumber) { - var ret string - return ret - } - return *o.ServerTransferNumber -} - -// GetServerTransferNumberOk returns a tuple with the ServerTransferNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Response) GetServerTransferNumberOk() (*string, bool) { - if o == nil || IsNil(o.ServerTransferNumber) { - return nil, false - } - return o.ServerTransferNumber, true -} - -// HasServerTransferNumber returns a boolean if a field has been set. -func (o *CommitPreparationV1Response) HasServerTransferNumber() bool { - if o != nil && !IsNil(o.ServerTransferNumber) { - return true - } - - return false -} - -// SetServerTransferNumber gets a reference to the given string and assigns it to the ServerTransferNumber field. -func (o *CommitPreparationV1Response) SetServerTransferNumber(v string) { - o.ServerTransferNumber = &v -} - -// GetSignature returns the Signature field value -func (o *CommitPreparationV1Response) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Response) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *CommitPreparationV1Response) SetSignature(v string) { - o.Signature = v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *CommitPreparationV1Response) GetSequenceNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *CommitPreparationV1Response) GetSequenceNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *CommitPreparationV1Response) SetSequenceNumber(v float32) { - o.SequenceNumber = v -} - -func (o CommitPreparationV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CommitPreparationV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["messageType"] = o.MessageType - toSerialize["clientIdentityPubkey"] = o.ClientIdentityPubkey - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["hashCommitPrep"] = o.HashCommitPrep - if !IsNil(o.ServerTransferNumber) { - toSerialize["serverTransferNumber"] = o.ServerTransferNumber - } - toSerialize["signature"] = o.Signature - toSerialize["sequenceNumber"] = o.SequenceNumber - return toSerialize, nil -} - -type NullableCommitPreparationV1Response struct { - value *CommitPreparationV1Response - isSet bool -} - -func (v NullableCommitPreparationV1Response) Get() *CommitPreparationV1Response { - return v.value -} - -func (v *NullableCommitPreparationV1Response) Set(val *CommitPreparationV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableCommitPreparationV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableCommitPreparationV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCommitPreparationV1Response(val *CommitPreparationV1Response) *NullableCommitPreparationV1Response { - return &NullableCommitPreparationV1Response{value: val, isSet: true} -} - -func (v NullableCommitPreparationV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCommitPreparationV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_credential_profile.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_credential_profile.go deleted file mode 100644 index a28279990c..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_credential_profile.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" - "fmt" -) - -// CredentialProfile the model 'CredentialProfile' -type CredentialProfile string - -// List of CredentialProfile -const ( - SAML CredentialProfile = "SAML" - OAUTH CredentialProfile = "OAUTH" - X509 CredentialProfile = "X509" -) - -// All allowed values of CredentialProfile enum -var AllowedCredentialProfileEnumValues = []CredentialProfile{ - "SAML", - "OAUTH", - "X509", -} - -func (v *CredentialProfile) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := CredentialProfile(value) - for _, existing := range AllowedCredentialProfileEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid CredentialProfile", value) -} - -// NewCredentialProfileFromValue returns a pointer to a valid CredentialProfile -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewCredentialProfileFromValue(v string) (*CredentialProfile, error) { - ev := CredentialProfile(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for CredentialProfile: valid values are %v", v, AllowedCredentialProfileEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v CredentialProfile) IsValid() bool { - for _, existing := range AllowedCredentialProfileEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to CredentialProfile value -func (v CredentialProfile) Ptr() *CredentialProfile { - return &v -} - -type NullableCredentialProfile struct { - value *CredentialProfile - isSet bool -} - -func (v NullableCredentialProfile) Get() *CredentialProfile { - return v.value -} - -func (v *NullableCredentialProfile) Set(val *CredentialProfile) { - v.value = val - v.isSet = true -} - -func (v NullableCredentialProfile) IsSet() bool { - return v.isSet -} - -func (v *NullableCredentialProfile) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCredentialProfile(val *CredentialProfile) *NullableCredentialProfile { - return &NullableCredentialProfile{value: val, isSet: true} -} - -func (v NullableCredentialProfile) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCredentialProfile) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_history.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_history.go deleted file mode 100644 index a119e0a93a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_history.go +++ /dev/null @@ -1,342 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the History type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &History{} - -// History struct for History -type History struct { - Transactions []map[string]interface{} `json:"Transactions,omitempty"` - Actions []map[string]interface{} `json:"Actions,omitempty"` - Origin *string `json:"Origin,omitempty"` - Destination *string `json:"Destination,omitempty"` - Balance *string `json:"Balance,omitempty"` - CurrentStatus map[string]interface{} `json:"CurrentStatus,omitempty"` - ApplicationSpecificParameters map[string]interface{} `json:"ApplicationSpecificParameters,omitempty"` -} - -// NewHistory instantiates a new History object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHistory() *History { - this := History{} - return &this -} - -// NewHistoryWithDefaults instantiates a new History object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHistoryWithDefaults() *History { - this := History{} - return &this -} - -// GetTransactions returns the Transactions field value if set, zero value otherwise. -func (o *History) GetTransactions() []map[string]interface{} { - if o == nil || IsNil(o.Transactions) { - var ret []map[string]interface{} - return ret - } - return o.Transactions -} - -// GetTransactionsOk returns a tuple with the Transactions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *History) GetTransactionsOk() ([]map[string]interface{}, bool) { - if o == nil || IsNil(o.Transactions) { - return nil, false - } - return o.Transactions, true -} - -// HasTransactions returns a boolean if a field has been set. -func (o *History) HasTransactions() bool { - if o != nil && !IsNil(o.Transactions) { - return true - } - - return false -} - -// SetTransactions gets a reference to the given []map[string]interface{} and assigns it to the Transactions field. -func (o *History) SetTransactions(v []map[string]interface{}) { - o.Transactions = v -} - -// GetActions returns the Actions field value if set, zero value otherwise. -func (o *History) GetActions() []map[string]interface{} { - if o == nil || IsNil(o.Actions) { - var ret []map[string]interface{} - return ret - } - return o.Actions -} - -// GetActionsOk returns a tuple with the Actions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *History) GetActionsOk() ([]map[string]interface{}, bool) { - if o == nil || IsNil(o.Actions) { - return nil, false - } - return o.Actions, true -} - -// HasActions returns a boolean if a field has been set. -func (o *History) HasActions() bool { - if o != nil && !IsNil(o.Actions) { - return true - } - - return false -} - -// SetActions gets a reference to the given []map[string]interface{} and assigns it to the Actions field. -func (o *History) SetActions(v []map[string]interface{}) { - o.Actions = v -} - -// GetOrigin returns the Origin field value if set, zero value otherwise. -func (o *History) GetOrigin() string { - if o == nil || IsNil(o.Origin) { - var ret string - return ret - } - return *o.Origin -} - -// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *History) GetOriginOk() (*string, bool) { - if o == nil || IsNil(o.Origin) { - return nil, false - } - return o.Origin, true -} - -// HasOrigin returns a boolean if a field has been set. -func (o *History) HasOrigin() bool { - if o != nil && !IsNil(o.Origin) { - return true - } - - return false -} - -// SetOrigin gets a reference to the given string and assigns it to the Origin field. -func (o *History) SetOrigin(v string) { - o.Origin = &v -} - -// GetDestination returns the Destination field value if set, zero value otherwise. -func (o *History) GetDestination() string { - if o == nil || IsNil(o.Destination) { - var ret string - return ret - } - return *o.Destination -} - -// GetDestinationOk returns a tuple with the Destination field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *History) GetDestinationOk() (*string, bool) { - if o == nil || IsNil(o.Destination) { - return nil, false - } - return o.Destination, true -} - -// HasDestination returns a boolean if a field has been set. -func (o *History) HasDestination() bool { - if o != nil && !IsNil(o.Destination) { - return true - } - - return false -} - -// SetDestination gets a reference to the given string and assigns it to the Destination field. -func (o *History) SetDestination(v string) { - o.Destination = &v -} - -// GetBalance returns the Balance field value if set, zero value otherwise. -func (o *History) GetBalance() string { - if o == nil || IsNil(o.Balance) { - var ret string - return ret - } - return *o.Balance -} - -// GetBalanceOk returns a tuple with the Balance field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *History) GetBalanceOk() (*string, bool) { - if o == nil || IsNil(o.Balance) { - return nil, false - } - return o.Balance, true -} - -// HasBalance returns a boolean if a field has been set. -func (o *History) HasBalance() bool { - if o != nil && !IsNil(o.Balance) { - return true - } - - return false -} - -// SetBalance gets a reference to the given string and assigns it to the Balance field. -func (o *History) SetBalance(v string) { - o.Balance = &v -} - -// GetCurrentStatus returns the CurrentStatus field value if set, zero value otherwise. -func (o *History) GetCurrentStatus() map[string]interface{} { - if o == nil || IsNil(o.CurrentStatus) { - var ret map[string]interface{} - return ret - } - return o.CurrentStatus -} - -// GetCurrentStatusOk returns a tuple with the CurrentStatus field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *History) GetCurrentStatusOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.CurrentStatus) { - return map[string]interface{}{}, false - } - return o.CurrentStatus, true -} - -// HasCurrentStatus returns a boolean if a field has been set. -func (o *History) HasCurrentStatus() bool { - if o != nil && !IsNil(o.CurrentStatus) { - return true - } - - return false -} - -// SetCurrentStatus gets a reference to the given map[string]interface{} and assigns it to the CurrentStatus field. -func (o *History) SetCurrentStatus(v map[string]interface{}) { - o.CurrentStatus = v -} - -// GetApplicationSpecificParameters returns the ApplicationSpecificParameters field value if set, zero value otherwise. -func (o *History) GetApplicationSpecificParameters() map[string]interface{} { - if o == nil || IsNil(o.ApplicationSpecificParameters) { - var ret map[string]interface{} - return ret - } - return o.ApplicationSpecificParameters -} - -// GetApplicationSpecificParametersOk returns a tuple with the ApplicationSpecificParameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *History) GetApplicationSpecificParametersOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.ApplicationSpecificParameters) { - return map[string]interface{}{}, false - } - return o.ApplicationSpecificParameters, true -} - -// HasApplicationSpecificParameters returns a boolean if a field has been set. -func (o *History) HasApplicationSpecificParameters() bool { - if o != nil && !IsNil(o.ApplicationSpecificParameters) { - return true - } - - return false -} - -// SetApplicationSpecificParameters gets a reference to the given map[string]interface{} and assigns it to the ApplicationSpecificParameters field. -func (o *History) SetApplicationSpecificParameters(v map[string]interface{}) { - o.ApplicationSpecificParameters = v -} - -func (o History) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o History) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Transactions) { - toSerialize["Transactions"] = o.Transactions - } - if !IsNil(o.Actions) { - toSerialize["Actions"] = o.Actions - } - if !IsNil(o.Origin) { - toSerialize["Origin"] = o.Origin - } - if !IsNil(o.Destination) { - toSerialize["Destination"] = o.Destination - } - if !IsNil(o.Balance) { - toSerialize["Balance"] = o.Balance - } - if !IsNil(o.CurrentStatus) { - toSerialize["CurrentStatus"] = o.CurrentStatus - } - if !IsNil(o.ApplicationSpecificParameters) { - toSerialize["ApplicationSpecificParameters"] = o.ApplicationSpecificParameters - } - return toSerialize, nil -} - -type NullableHistory struct { - value *History - isSet bool -} - -func (v NullableHistory) Get() *History { - return v.value -} - -func (v *NullableHistory) Set(val *History) { - v.value = val - v.isSet = true -} - -func (v NullableHistory) IsSet() bool { - return v.isSet -} - -func (v *NullableHistory) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHistory(val *History) *NullableHistory { - return &NullableHistory{value: val, isSet: true} -} - -func (v NullableHistory) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHistory) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_local_log.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_local_log.go deleted file mode 100644 index 6b6c8d5f41..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_local_log.go +++ /dev/null @@ -1,279 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the LocalLog type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LocalLog{} - -// LocalLog struct for LocalLog -type LocalLog struct { - Key *string `json:"key,omitempty"` - SessionID string `json:"sessionID"` - Data *string `json:"data,omitempty"` - Type string `json:"type"` - Operation string `json:"operation"` - Timestamp *string `json:"timestamp,omitempty"` -} - -// NewLocalLog instantiates a new LocalLog object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLocalLog(sessionID string, type_ string, operation string) *LocalLog { - this := LocalLog{} - this.SessionID = sessionID - this.Type = type_ - this.Operation = operation - return &this -} - -// NewLocalLogWithDefaults instantiates a new LocalLog object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLocalLogWithDefaults() *LocalLog { - this := LocalLog{} - return &this -} - -// GetKey returns the Key field value if set, zero value otherwise. -func (o *LocalLog) GetKey() string { - if o == nil || IsNil(o.Key) { - var ret string - return ret - } - return *o.Key -} - -// GetKeyOk returns a tuple with the Key field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LocalLog) GetKeyOk() (*string, bool) { - if o == nil || IsNil(o.Key) { - return nil, false - } - return o.Key, true -} - -// HasKey returns a boolean if a field has been set. -func (o *LocalLog) HasKey() bool { - if o != nil && !IsNil(o.Key) { - return true - } - - return false -} - -// SetKey gets a reference to the given string and assigns it to the Key field. -func (o *LocalLog) SetKey(v string) { - o.Key = &v -} - -// GetSessionID returns the SessionID field value -func (o *LocalLog) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *LocalLog) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *LocalLog) SetSessionID(v string) { - o.SessionID = v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *LocalLog) GetData() string { - if o == nil || IsNil(o.Data) { - var ret string - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LocalLog) GetDataOk() (*string, bool) { - if o == nil || IsNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *LocalLog) HasData() bool { - if o != nil && !IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given string and assigns it to the Data field. -func (o *LocalLog) SetData(v string) { - o.Data = &v -} - -// GetType returns the Type field value -func (o *LocalLog) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *LocalLog) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *LocalLog) SetType(v string) { - o.Type = v -} - -// GetOperation returns the Operation field value -func (o *LocalLog) GetOperation() string { - if o == nil { - var ret string - return ret - } - - return o.Operation -} - -// GetOperationOk returns a tuple with the Operation field value -// and a boolean to check if the value has been set. -func (o *LocalLog) GetOperationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Operation, true -} - -// SetOperation sets field value -func (o *LocalLog) SetOperation(v string) { - o.Operation = v -} - -// GetTimestamp returns the Timestamp field value if set, zero value otherwise. -func (o *LocalLog) GetTimestamp() string { - if o == nil || IsNil(o.Timestamp) { - var ret string - return ret - } - return *o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LocalLog) GetTimestampOk() (*string, bool) { - if o == nil || IsNil(o.Timestamp) { - return nil, false - } - return o.Timestamp, true -} - -// HasTimestamp returns a boolean if a field has been set. -func (o *LocalLog) HasTimestamp() bool { - if o != nil && !IsNil(o.Timestamp) { - return true - } - - return false -} - -// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. -func (o *LocalLog) SetTimestamp(v string) { - o.Timestamp = &v -} - -func (o LocalLog) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LocalLog) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Key) { - toSerialize["key"] = o.Key - } - toSerialize["sessionID"] = o.SessionID - if !IsNil(o.Data) { - toSerialize["data"] = o.Data - } - toSerialize["type"] = o.Type - toSerialize["operation"] = o.Operation - if !IsNil(o.Timestamp) { - toSerialize["timestamp"] = o.Timestamp - } - return toSerialize, nil -} - -type NullableLocalLog struct { - value *LocalLog - isSet bool -} - -func (v NullableLocalLog) Get() *LocalLog { - return v.value -} - -func (v *NullableLocalLog) Set(val *LocalLog) { - v.value = val - v.isSet = true -} - -func (v NullableLocalLog) IsSet() bool { - return v.isSet -} - -func (v *NullableLocalLog) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLocalLog(val *LocalLog) *NullableLocalLog { - return &NullableLocalLog{value: val, isSet: true} -} - -func (v NullableLocalLog) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLocalLog) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_lock_evidence_v1_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_lock_evidence_v1_request.go deleted file mode 100644 index 642a21891d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_lock_evidence_v1_request.go +++ /dev/null @@ -1,451 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the LockEvidenceV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LockEvidenceV1Request{} - -// LockEvidenceV1Request struct for LockEvidenceV1Request -type LockEvidenceV1Request struct { - SessionID string `json:"sessionID"` - ClientIdentityPubkey string `json:"clientIdentityPubkey"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - LockEvidenceClaim string `json:"lockEvidenceClaim"` - LockEvidenceFormat map[string]interface{} `json:"lockEvidenceFormat,omitempty"` - LockEvidenceExpiration string `json:"lockEvidenceExpiration"` - HashCommenceAckRequest string `json:"hashCommenceAckRequest"` - ClientTransferNumber NullableInt32 `json:"clientTransferNumber,omitempty"` - Signature string `json:"signature"` - MessageType string `json:"messageType"` - MessageHash *string `json:"messageHash,omitempty"` - SequenceNumber float32 `json:"sequenceNumber"` -} - -// NewLockEvidenceV1Request instantiates a new LockEvidenceV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLockEvidenceV1Request(sessionID string, clientIdentityPubkey string, serverIdentityPubkey string, lockEvidenceClaim string, lockEvidenceExpiration string, hashCommenceAckRequest string, signature string, messageType string, sequenceNumber float32) *LockEvidenceV1Request { - this := LockEvidenceV1Request{} - this.SessionID = sessionID - this.ClientIdentityPubkey = clientIdentityPubkey - this.ServerIdentityPubkey = serverIdentityPubkey - this.LockEvidenceClaim = lockEvidenceClaim - this.LockEvidenceExpiration = lockEvidenceExpiration - this.HashCommenceAckRequest = hashCommenceAckRequest - this.Signature = signature - this.MessageType = messageType - this.SequenceNumber = sequenceNumber - return &this -} - -// NewLockEvidenceV1RequestWithDefaults instantiates a new LockEvidenceV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLockEvidenceV1RequestWithDefaults() *LockEvidenceV1Request { - this := LockEvidenceV1Request{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *LockEvidenceV1Request) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *LockEvidenceV1Request) SetSessionID(v string) { - o.SessionID = v -} - -// GetClientIdentityPubkey returns the ClientIdentityPubkey field value -func (o *LockEvidenceV1Request) GetClientIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ClientIdentityPubkey -} - -// GetClientIdentityPubkeyOk returns a tuple with the ClientIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetClientIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdentityPubkey, true -} - -// SetClientIdentityPubkey sets field value -func (o *LockEvidenceV1Request) SetClientIdentityPubkey(v string) { - o.ClientIdentityPubkey = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *LockEvidenceV1Request) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *LockEvidenceV1Request) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetLockEvidenceClaim returns the LockEvidenceClaim field value -func (o *LockEvidenceV1Request) GetLockEvidenceClaim() string { - if o == nil { - var ret string - return ret - } - - return o.LockEvidenceClaim -} - -// GetLockEvidenceClaimOk returns a tuple with the LockEvidenceClaim field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetLockEvidenceClaimOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LockEvidenceClaim, true -} - -// SetLockEvidenceClaim sets field value -func (o *LockEvidenceV1Request) SetLockEvidenceClaim(v string) { - o.LockEvidenceClaim = v -} - -// GetLockEvidenceFormat returns the LockEvidenceFormat field value if set, zero value otherwise. -func (o *LockEvidenceV1Request) GetLockEvidenceFormat() map[string]interface{} { - if o == nil || IsNil(o.LockEvidenceFormat) { - var ret map[string]interface{} - return ret - } - return o.LockEvidenceFormat -} - -// GetLockEvidenceFormatOk returns a tuple with the LockEvidenceFormat field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetLockEvidenceFormatOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.LockEvidenceFormat) { - return map[string]interface{}{}, false - } - return o.LockEvidenceFormat, true -} - -// HasLockEvidenceFormat returns a boolean if a field has been set. -func (o *LockEvidenceV1Request) HasLockEvidenceFormat() bool { - if o != nil && !IsNil(o.LockEvidenceFormat) { - return true - } - - return false -} - -// SetLockEvidenceFormat gets a reference to the given map[string]interface{} and assigns it to the LockEvidenceFormat field. -func (o *LockEvidenceV1Request) SetLockEvidenceFormat(v map[string]interface{}) { - o.LockEvidenceFormat = v -} - -// GetLockEvidenceExpiration returns the LockEvidenceExpiration field value -func (o *LockEvidenceV1Request) GetLockEvidenceExpiration() string { - if o == nil { - var ret string - return ret - } - - return o.LockEvidenceExpiration -} - -// GetLockEvidenceExpirationOk returns a tuple with the LockEvidenceExpiration field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetLockEvidenceExpirationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LockEvidenceExpiration, true -} - -// SetLockEvidenceExpiration sets field value -func (o *LockEvidenceV1Request) SetLockEvidenceExpiration(v string) { - o.LockEvidenceExpiration = v -} - -// GetHashCommenceAckRequest returns the HashCommenceAckRequest field value -func (o *LockEvidenceV1Request) GetHashCommenceAckRequest() string { - if o == nil { - var ret string - return ret - } - - return o.HashCommenceAckRequest -} - -// GetHashCommenceAckRequestOk returns a tuple with the HashCommenceAckRequest field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetHashCommenceAckRequestOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashCommenceAckRequest, true -} - -// SetHashCommenceAckRequest sets field value -func (o *LockEvidenceV1Request) SetHashCommenceAckRequest(v string) { - o.HashCommenceAckRequest = v -} - -// GetClientTransferNumber returns the ClientTransferNumber field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *LockEvidenceV1Request) GetClientTransferNumber() int32 { - if o == nil || IsNil(o.ClientTransferNumber.Get()) { - var ret int32 - return ret - } - return *o.ClientTransferNumber.Get() -} - -// GetClientTransferNumberOk returns a tuple with the ClientTransferNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LockEvidenceV1Request) GetClientTransferNumberOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.ClientTransferNumber.Get(), o.ClientTransferNumber.IsSet() -} - -// HasClientTransferNumber returns a boolean if a field has been set. -func (o *LockEvidenceV1Request) HasClientTransferNumber() bool { - if o != nil && o.ClientTransferNumber.IsSet() { - return true - } - - return false -} - -// SetClientTransferNumber gets a reference to the given NullableInt32 and assigns it to the ClientTransferNumber field. -func (o *LockEvidenceV1Request) SetClientTransferNumber(v int32) { - o.ClientTransferNumber.Set(&v) -} -// SetClientTransferNumberNil sets the value for ClientTransferNumber to be an explicit nil -func (o *LockEvidenceV1Request) SetClientTransferNumberNil() { - o.ClientTransferNumber.Set(nil) -} - -// UnsetClientTransferNumber ensures that no value is present for ClientTransferNumber, not even an explicit nil -func (o *LockEvidenceV1Request) UnsetClientTransferNumber() { - o.ClientTransferNumber.Unset() -} - -// GetSignature returns the Signature field value -func (o *LockEvidenceV1Request) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *LockEvidenceV1Request) SetSignature(v string) { - o.Signature = v -} - -// GetMessageType returns the MessageType field value -func (o *LockEvidenceV1Request) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *LockEvidenceV1Request) SetMessageType(v string) { - o.MessageType = v -} - -// GetMessageHash returns the MessageHash field value if set, zero value otherwise. -func (o *LockEvidenceV1Request) GetMessageHash() string { - if o == nil || IsNil(o.MessageHash) { - var ret string - return ret - } - return *o.MessageHash -} - -// GetMessageHashOk returns a tuple with the MessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.MessageHash) { - return nil, false - } - return o.MessageHash, true -} - -// HasMessageHash returns a boolean if a field has been set. -func (o *LockEvidenceV1Request) HasMessageHash() bool { - if o != nil && !IsNil(o.MessageHash) { - return true - } - - return false -} - -// SetMessageHash gets a reference to the given string and assigns it to the MessageHash field. -func (o *LockEvidenceV1Request) SetMessageHash(v string) { - o.MessageHash = &v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *LockEvidenceV1Request) GetSequenceNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Request) GetSequenceNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *LockEvidenceV1Request) SetSequenceNumber(v float32) { - o.SequenceNumber = v -} - -func (o LockEvidenceV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LockEvidenceV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["clientIdentityPubkey"] = o.ClientIdentityPubkey - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["lockEvidenceClaim"] = o.LockEvidenceClaim - if !IsNil(o.LockEvidenceFormat) { - toSerialize["lockEvidenceFormat"] = o.LockEvidenceFormat - } - toSerialize["lockEvidenceExpiration"] = o.LockEvidenceExpiration - toSerialize["hashCommenceAckRequest"] = o.HashCommenceAckRequest - if o.ClientTransferNumber.IsSet() { - toSerialize["clientTransferNumber"] = o.ClientTransferNumber.Get() - } - toSerialize["signature"] = o.Signature - toSerialize["messageType"] = o.MessageType - if !IsNil(o.MessageHash) { - toSerialize["messageHash"] = o.MessageHash - } - toSerialize["sequenceNumber"] = o.SequenceNumber - return toSerialize, nil -} - -type NullableLockEvidenceV1Request struct { - value *LockEvidenceV1Request - isSet bool -} - -func (v NullableLockEvidenceV1Request) Get() *LockEvidenceV1Request { - return v.value -} - -func (v *NullableLockEvidenceV1Request) Set(val *LockEvidenceV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableLockEvidenceV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableLockEvidenceV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLockEvidenceV1Request(val *LockEvidenceV1Request) *NullableLockEvidenceV1Request { - return &NullableLockEvidenceV1Request{value: val, isSet: true} -} - -func (v NullableLockEvidenceV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLockEvidenceV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_lock_evidence_v1_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_lock_evidence_v1_response.go deleted file mode 100644 index f0af1b4fda..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_lock_evidence_v1_response.go +++ /dev/null @@ -1,325 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the LockEvidenceV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LockEvidenceV1Response{} - -// LockEvidenceV1Response struct for LockEvidenceV1Response -type LockEvidenceV1Response struct { - SessionID string `json:"sessionID"` - ClientIdentityPubkey string `json:"clientIdentityPubkey"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - HashLockEvidenceRequest string `json:"hashLockEvidenceRequest"` - ServerTransferNumber NullableInt32 `json:"serverTransferNumber,omitempty"` - Signature string `json:"signature"` - MessageType string `json:"messageType"` - SequenceNumber float32 `json:"sequenceNumber"` -} - -// NewLockEvidenceV1Response instantiates a new LockEvidenceV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLockEvidenceV1Response(sessionID string, clientIdentityPubkey string, serverIdentityPubkey string, hashLockEvidenceRequest string, signature string, messageType string, sequenceNumber float32) *LockEvidenceV1Response { - this := LockEvidenceV1Response{} - this.SessionID = sessionID - this.ClientIdentityPubkey = clientIdentityPubkey - this.ServerIdentityPubkey = serverIdentityPubkey - this.HashLockEvidenceRequest = hashLockEvidenceRequest - this.Signature = signature - this.MessageType = messageType - this.SequenceNumber = sequenceNumber - return &this -} - -// NewLockEvidenceV1ResponseWithDefaults instantiates a new LockEvidenceV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLockEvidenceV1ResponseWithDefaults() *LockEvidenceV1Response { - this := LockEvidenceV1Response{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *LockEvidenceV1Response) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Response) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *LockEvidenceV1Response) SetSessionID(v string) { - o.SessionID = v -} - -// GetClientIdentityPubkey returns the ClientIdentityPubkey field value -func (o *LockEvidenceV1Response) GetClientIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ClientIdentityPubkey -} - -// GetClientIdentityPubkeyOk returns a tuple with the ClientIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Response) GetClientIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdentityPubkey, true -} - -// SetClientIdentityPubkey sets field value -func (o *LockEvidenceV1Response) SetClientIdentityPubkey(v string) { - o.ClientIdentityPubkey = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *LockEvidenceV1Response) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Response) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *LockEvidenceV1Response) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetHashLockEvidenceRequest returns the HashLockEvidenceRequest field value -func (o *LockEvidenceV1Response) GetHashLockEvidenceRequest() string { - if o == nil { - var ret string - return ret - } - - return o.HashLockEvidenceRequest -} - -// GetHashLockEvidenceRequestOk returns a tuple with the HashLockEvidenceRequest field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Response) GetHashLockEvidenceRequestOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashLockEvidenceRequest, true -} - -// SetHashLockEvidenceRequest sets field value -func (o *LockEvidenceV1Response) SetHashLockEvidenceRequest(v string) { - o.HashLockEvidenceRequest = v -} - -// GetServerTransferNumber returns the ServerTransferNumber field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *LockEvidenceV1Response) GetServerTransferNumber() int32 { - if o == nil || IsNil(o.ServerTransferNumber.Get()) { - var ret int32 - return ret - } - return *o.ServerTransferNumber.Get() -} - -// GetServerTransferNumberOk returns a tuple with the ServerTransferNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *LockEvidenceV1Response) GetServerTransferNumberOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.ServerTransferNumber.Get(), o.ServerTransferNumber.IsSet() -} - -// HasServerTransferNumber returns a boolean if a field has been set. -func (o *LockEvidenceV1Response) HasServerTransferNumber() bool { - if o != nil && o.ServerTransferNumber.IsSet() { - return true - } - - return false -} - -// SetServerTransferNumber gets a reference to the given NullableInt32 and assigns it to the ServerTransferNumber field. -func (o *LockEvidenceV1Response) SetServerTransferNumber(v int32) { - o.ServerTransferNumber.Set(&v) -} -// SetServerTransferNumberNil sets the value for ServerTransferNumber to be an explicit nil -func (o *LockEvidenceV1Response) SetServerTransferNumberNil() { - o.ServerTransferNumber.Set(nil) -} - -// UnsetServerTransferNumber ensures that no value is present for ServerTransferNumber, not even an explicit nil -func (o *LockEvidenceV1Response) UnsetServerTransferNumber() { - o.ServerTransferNumber.Unset() -} - -// GetSignature returns the Signature field value -func (o *LockEvidenceV1Response) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Response) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *LockEvidenceV1Response) SetSignature(v string) { - o.Signature = v -} - -// GetMessageType returns the MessageType field value -func (o *LockEvidenceV1Response) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Response) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *LockEvidenceV1Response) SetMessageType(v string) { - o.MessageType = v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *LockEvidenceV1Response) GetSequenceNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *LockEvidenceV1Response) GetSequenceNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *LockEvidenceV1Response) SetSequenceNumber(v float32) { - o.SequenceNumber = v -} - -func (o LockEvidenceV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LockEvidenceV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["clientIdentityPubkey"] = o.ClientIdentityPubkey - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["hashLockEvidenceRequest"] = o.HashLockEvidenceRequest - if o.ServerTransferNumber.IsSet() { - toSerialize["serverTransferNumber"] = o.ServerTransferNumber.Get() - } - toSerialize["signature"] = o.Signature - toSerialize["messageType"] = o.MessageType - toSerialize["sequenceNumber"] = o.SequenceNumber - return toSerialize, nil -} - -type NullableLockEvidenceV1Response struct { - value *LockEvidenceV1Response - isSet bool -} - -func (v NullableLockEvidenceV1Response) Get() *LockEvidenceV1Response { - return v.value -} - -func (v *NullableLockEvidenceV1Response) Set(val *LockEvidenceV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableLockEvidenceV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableLockEvidenceV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLockEvidenceV1Response(val *LockEvidenceV1Response) *NullableLockEvidenceV1Response { - return &NullableLockEvidenceV1Response{value: val, isSet: true} -} - -func (v NullableLockEvidenceV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLockEvidenceV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_payload_profile.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_payload_profile.go deleted file mode 100644 index 3deff32bd2..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_payload_profile.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the PayloadProfile type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PayloadProfile{} - -// PayloadProfile struct for PayloadProfile -type PayloadProfile struct { - AssetProfile AssetProfile `json:"assetProfile"` - Capabilities *string `json:"capabilities,omitempty"` -} - -// NewPayloadProfile instantiates a new PayloadProfile object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPayloadProfile(assetProfile AssetProfile) *PayloadProfile { - this := PayloadProfile{} - this.AssetProfile = assetProfile - return &this -} - -// NewPayloadProfileWithDefaults instantiates a new PayloadProfile object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPayloadProfileWithDefaults() *PayloadProfile { - this := PayloadProfile{} - return &this -} - -// GetAssetProfile returns the AssetProfile field value -func (o *PayloadProfile) GetAssetProfile() AssetProfile { - if o == nil { - var ret AssetProfile - return ret - } - - return o.AssetProfile -} - -// GetAssetProfileOk returns a tuple with the AssetProfile field value -// and a boolean to check if the value has been set. -func (o *PayloadProfile) GetAssetProfileOk() (*AssetProfile, bool) { - if o == nil { - return nil, false - } - return &o.AssetProfile, true -} - -// SetAssetProfile sets field value -func (o *PayloadProfile) SetAssetProfile(v AssetProfile) { - o.AssetProfile = v -} - -// GetCapabilities returns the Capabilities field value if set, zero value otherwise. -func (o *PayloadProfile) GetCapabilities() string { - if o == nil || IsNil(o.Capabilities) { - var ret string - return ret - } - return *o.Capabilities -} - -// GetCapabilitiesOk returns a tuple with the Capabilities field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PayloadProfile) GetCapabilitiesOk() (*string, bool) { - if o == nil || IsNil(o.Capabilities) { - return nil, false - } - return o.Capabilities, true -} - -// HasCapabilities returns a boolean if a field has been set. -func (o *PayloadProfile) HasCapabilities() bool { - if o != nil && !IsNil(o.Capabilities) { - return true - } - - return false -} - -// SetCapabilities gets a reference to the given string and assigns it to the Capabilities field. -func (o *PayloadProfile) SetCapabilities(v string) { - o.Capabilities = &v -} - -func (o PayloadProfile) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PayloadProfile) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["assetProfile"] = o.AssetProfile - if !IsNil(o.Capabilities) { - toSerialize["capabilities"] = o.Capabilities - } - return toSerialize, nil -} - -type NullablePayloadProfile struct { - value *PayloadProfile - isSet bool -} - -func (v NullablePayloadProfile) Get() *PayloadProfile { - return v.value -} - -func (v *NullablePayloadProfile) Set(val *PayloadProfile) { - v.value = val - v.isSet = true -} - -func (v NullablePayloadProfile) IsSet() bool { - return v.isSet -} - -func (v *NullablePayloadProfile) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePayloadProfile(val *PayloadProfile) *NullablePayloadProfile { - return &NullablePayloadProfile{value: val, isSet: true} -} - -func (v NullablePayloadProfile) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePayloadProfile) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_success_v1_message.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_success_v1_message.go deleted file mode 100644 index bd42614a80..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_success_v1_message.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the RecoverSuccessV1Message type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RecoverSuccessV1Message{} - -// RecoverSuccessV1Message struct for RecoverSuccessV1Message -type RecoverSuccessV1Message struct { - SessionID string `json:"sessionID"` - Success bool `json:"success"` - Signature string `json:"signature"` -} - -// NewRecoverSuccessV1Message instantiates a new RecoverSuccessV1Message object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRecoverSuccessV1Message(sessionID string, success bool, signature string) *RecoverSuccessV1Message { - this := RecoverSuccessV1Message{} - this.SessionID = sessionID - this.Success = success - this.Signature = signature - return &this -} - -// NewRecoverSuccessV1MessageWithDefaults instantiates a new RecoverSuccessV1Message object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRecoverSuccessV1MessageWithDefaults() *RecoverSuccessV1Message { - this := RecoverSuccessV1Message{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *RecoverSuccessV1Message) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *RecoverSuccessV1Message) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *RecoverSuccessV1Message) SetSessionID(v string) { - o.SessionID = v -} - -// GetSuccess returns the Success field value -func (o *RecoverSuccessV1Message) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *RecoverSuccessV1Message) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *RecoverSuccessV1Message) SetSuccess(v bool) { - o.Success = v -} - -// GetSignature returns the Signature field value -func (o *RecoverSuccessV1Message) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *RecoverSuccessV1Message) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *RecoverSuccessV1Message) SetSignature(v string) { - o.Signature = v -} - -func (o RecoverSuccessV1Message) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RecoverSuccessV1Message) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["success"] = o.Success - toSerialize["signature"] = o.Signature - return toSerialize, nil -} - -type NullableRecoverSuccessV1Message struct { - value *RecoverSuccessV1Message - isSet bool -} - -func (v NullableRecoverSuccessV1Message) Get() *RecoverSuccessV1Message { - return v.value -} - -func (v *NullableRecoverSuccessV1Message) Set(val *RecoverSuccessV1Message) { - v.value = val - v.isSet = true -} - -func (v NullableRecoverSuccessV1Message) IsSet() bool { - return v.isSet -} - -func (v *NullableRecoverSuccessV1Message) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRecoverSuccessV1Message(val *RecoverSuccessV1Message) *NullableRecoverSuccessV1Message { - return &NullableRecoverSuccessV1Message{value: val, isSet: true} -} - -func (v NullableRecoverSuccessV1Message) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRecoverSuccessV1Message) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_update_ack_v1_message.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_update_ack_v1_message.go deleted file mode 100644 index dc7fda9c3a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_update_ack_v1_message.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the RecoverUpdateAckV1Message type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RecoverUpdateAckV1Message{} - -// RecoverUpdateAckV1Message struct for RecoverUpdateAckV1Message -type RecoverUpdateAckV1Message struct { - SessionID string `json:"sessionID"` - Success bool `json:"success"` - ChangedEntriesHash []string `json:"changedEntriesHash"` - Signature string `json:"signature"` -} - -// NewRecoverUpdateAckV1Message instantiates a new RecoverUpdateAckV1Message object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRecoverUpdateAckV1Message(sessionID string, success bool, changedEntriesHash []string, signature string) *RecoverUpdateAckV1Message { - this := RecoverUpdateAckV1Message{} - this.SessionID = sessionID - this.Success = success - this.ChangedEntriesHash = changedEntriesHash - this.Signature = signature - return &this -} - -// NewRecoverUpdateAckV1MessageWithDefaults instantiates a new RecoverUpdateAckV1Message object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRecoverUpdateAckV1MessageWithDefaults() *RecoverUpdateAckV1Message { - this := RecoverUpdateAckV1Message{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *RecoverUpdateAckV1Message) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *RecoverUpdateAckV1Message) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *RecoverUpdateAckV1Message) SetSessionID(v string) { - o.SessionID = v -} - -// GetSuccess returns the Success field value -func (o *RecoverUpdateAckV1Message) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *RecoverUpdateAckV1Message) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *RecoverUpdateAckV1Message) SetSuccess(v bool) { - o.Success = v -} - -// GetChangedEntriesHash returns the ChangedEntriesHash field value -func (o *RecoverUpdateAckV1Message) GetChangedEntriesHash() []string { - if o == nil { - var ret []string - return ret - } - - return o.ChangedEntriesHash -} - -// GetChangedEntriesHashOk returns a tuple with the ChangedEntriesHash field value -// and a boolean to check if the value has been set. -func (o *RecoverUpdateAckV1Message) GetChangedEntriesHashOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ChangedEntriesHash, true -} - -// SetChangedEntriesHash sets field value -func (o *RecoverUpdateAckV1Message) SetChangedEntriesHash(v []string) { - o.ChangedEntriesHash = v -} - -// GetSignature returns the Signature field value -func (o *RecoverUpdateAckV1Message) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *RecoverUpdateAckV1Message) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *RecoverUpdateAckV1Message) SetSignature(v string) { - o.Signature = v -} - -func (o RecoverUpdateAckV1Message) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RecoverUpdateAckV1Message) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["success"] = o.Success - toSerialize["changedEntriesHash"] = o.ChangedEntriesHash - toSerialize["signature"] = o.Signature - return toSerialize, nil -} - -type NullableRecoverUpdateAckV1Message struct { - value *RecoverUpdateAckV1Message - isSet bool -} - -func (v NullableRecoverUpdateAckV1Message) Get() *RecoverUpdateAckV1Message { - return v.value -} - -func (v *NullableRecoverUpdateAckV1Message) Set(val *RecoverUpdateAckV1Message) { - v.value = val - v.isSet = true -} - -func (v NullableRecoverUpdateAckV1Message) IsSet() bool { - return v.isSet -} - -func (v *NullableRecoverUpdateAckV1Message) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRecoverUpdateAckV1Message(val *RecoverUpdateAckV1Message) *NullableRecoverUpdateAckV1Message { - return &NullableRecoverUpdateAckV1Message{value: val, isSet: true} -} - -func (v NullableRecoverUpdateAckV1Message) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRecoverUpdateAckV1Message) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_update_v1_message.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_update_v1_message.go deleted file mode 100644 index 587da6482e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_update_v1_message.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the RecoverUpdateV1Message type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RecoverUpdateV1Message{} - -// RecoverUpdateV1Message struct for RecoverUpdateV1Message -type RecoverUpdateV1Message struct { - SessionID string `json:"sessionID"` - RecoveredLogs []LocalLog `json:"recoveredLogs"` - Signature string `json:"signature"` -} - -// NewRecoverUpdateV1Message instantiates a new RecoverUpdateV1Message object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRecoverUpdateV1Message(sessionID string, recoveredLogs []LocalLog, signature string) *RecoverUpdateV1Message { - this := RecoverUpdateV1Message{} - this.SessionID = sessionID - this.RecoveredLogs = recoveredLogs - this.Signature = signature - return &this -} - -// NewRecoverUpdateV1MessageWithDefaults instantiates a new RecoverUpdateV1Message object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRecoverUpdateV1MessageWithDefaults() *RecoverUpdateV1Message { - this := RecoverUpdateV1Message{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *RecoverUpdateV1Message) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *RecoverUpdateV1Message) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *RecoverUpdateV1Message) SetSessionID(v string) { - o.SessionID = v -} - -// GetRecoveredLogs returns the RecoveredLogs field value -func (o *RecoverUpdateV1Message) GetRecoveredLogs() []LocalLog { - if o == nil { - var ret []LocalLog - return ret - } - - return o.RecoveredLogs -} - -// GetRecoveredLogsOk returns a tuple with the RecoveredLogs field value -// and a boolean to check if the value has been set. -func (o *RecoverUpdateV1Message) GetRecoveredLogsOk() ([]LocalLog, bool) { - if o == nil { - return nil, false - } - return o.RecoveredLogs, true -} - -// SetRecoveredLogs sets field value -func (o *RecoverUpdateV1Message) SetRecoveredLogs(v []LocalLog) { - o.RecoveredLogs = v -} - -// GetSignature returns the Signature field value -func (o *RecoverUpdateV1Message) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *RecoverUpdateV1Message) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *RecoverUpdateV1Message) SetSignature(v string) { - o.Signature = v -} - -func (o RecoverUpdateV1Message) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RecoverUpdateV1Message) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["recoveredLogs"] = o.RecoveredLogs - toSerialize["signature"] = o.Signature - return toSerialize, nil -} - -type NullableRecoverUpdateV1Message struct { - value *RecoverUpdateV1Message - isSet bool -} - -func (v NullableRecoverUpdateV1Message) Get() *RecoverUpdateV1Message { - return v.value -} - -func (v *NullableRecoverUpdateV1Message) Set(val *RecoverUpdateV1Message) { - v.value = val - v.isSet = true -} - -func (v NullableRecoverUpdateV1Message) IsSet() bool { - return v.isSet -} - -func (v *NullableRecoverUpdateV1Message) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRecoverUpdateV1Message(val *RecoverUpdateV1Message) *NullableRecoverUpdateV1Message { - return &NullableRecoverUpdateV1Message{value: val, isSet: true} -} - -func (v NullableRecoverUpdateV1Message) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRecoverUpdateV1Message) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_v1_message.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_v1_message.go deleted file mode 100644 index e1e06a7c03..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_recover_v1_message.go +++ /dev/null @@ -1,315 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the RecoverV1Message type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RecoverV1Message{} - -// RecoverV1Message struct for RecoverV1Message -type RecoverV1Message struct { - SessionID string `json:"sessionID"` - OdapPhase string `json:"odapPhase"` - SequenceNumber float32 `json:"sequenceNumber"` - LastLogEntryTimestamp string `json:"lastLogEntryTimestamp"` - IsBackup bool `json:"isBackup"` - NewBasePath string `json:"newBasePath"` - NewGatewayPubKey *string `json:"newGatewayPubKey,omitempty"` - Signature string `json:"signature"` -} - -// NewRecoverV1Message instantiates a new RecoverV1Message object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRecoverV1Message(sessionID string, odapPhase string, sequenceNumber float32, lastLogEntryTimestamp string, isBackup bool, newBasePath string, signature string) *RecoverV1Message { - this := RecoverV1Message{} - this.SessionID = sessionID - this.OdapPhase = odapPhase - this.SequenceNumber = sequenceNumber - this.LastLogEntryTimestamp = lastLogEntryTimestamp - this.IsBackup = isBackup - this.NewBasePath = newBasePath - this.Signature = signature - return &this -} - -// NewRecoverV1MessageWithDefaults instantiates a new RecoverV1Message object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRecoverV1MessageWithDefaults() *RecoverV1Message { - this := RecoverV1Message{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *RecoverV1Message) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *RecoverV1Message) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *RecoverV1Message) SetSessionID(v string) { - o.SessionID = v -} - -// GetOdapPhase returns the OdapPhase field value -func (o *RecoverV1Message) GetOdapPhase() string { - if o == nil { - var ret string - return ret - } - - return o.OdapPhase -} - -// GetOdapPhaseOk returns a tuple with the OdapPhase field value -// and a boolean to check if the value has been set. -func (o *RecoverV1Message) GetOdapPhaseOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OdapPhase, true -} - -// SetOdapPhase sets field value -func (o *RecoverV1Message) SetOdapPhase(v string) { - o.OdapPhase = v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *RecoverV1Message) GetSequenceNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *RecoverV1Message) GetSequenceNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *RecoverV1Message) SetSequenceNumber(v float32) { - o.SequenceNumber = v -} - -// GetLastLogEntryTimestamp returns the LastLogEntryTimestamp field value -func (o *RecoverV1Message) GetLastLogEntryTimestamp() string { - if o == nil { - var ret string - return ret - } - - return o.LastLogEntryTimestamp -} - -// GetLastLogEntryTimestampOk returns a tuple with the LastLogEntryTimestamp field value -// and a boolean to check if the value has been set. -func (o *RecoverV1Message) GetLastLogEntryTimestampOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LastLogEntryTimestamp, true -} - -// SetLastLogEntryTimestamp sets field value -func (o *RecoverV1Message) SetLastLogEntryTimestamp(v string) { - o.LastLogEntryTimestamp = v -} - -// GetIsBackup returns the IsBackup field value -func (o *RecoverV1Message) GetIsBackup() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsBackup -} - -// GetIsBackupOk returns a tuple with the IsBackup field value -// and a boolean to check if the value has been set. -func (o *RecoverV1Message) GetIsBackupOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsBackup, true -} - -// SetIsBackup sets field value -func (o *RecoverV1Message) SetIsBackup(v bool) { - o.IsBackup = v -} - -// GetNewBasePath returns the NewBasePath field value -func (o *RecoverV1Message) GetNewBasePath() string { - if o == nil { - var ret string - return ret - } - - return o.NewBasePath -} - -// GetNewBasePathOk returns a tuple with the NewBasePath field value -// and a boolean to check if the value has been set. -func (o *RecoverV1Message) GetNewBasePathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.NewBasePath, true -} - -// SetNewBasePath sets field value -func (o *RecoverV1Message) SetNewBasePath(v string) { - o.NewBasePath = v -} - -// GetNewGatewayPubKey returns the NewGatewayPubKey field value if set, zero value otherwise. -func (o *RecoverV1Message) GetNewGatewayPubKey() string { - if o == nil || IsNil(o.NewGatewayPubKey) { - var ret string - return ret - } - return *o.NewGatewayPubKey -} - -// GetNewGatewayPubKeyOk returns a tuple with the NewGatewayPubKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecoverV1Message) GetNewGatewayPubKeyOk() (*string, bool) { - if o == nil || IsNil(o.NewGatewayPubKey) { - return nil, false - } - return o.NewGatewayPubKey, true -} - -// HasNewGatewayPubKey returns a boolean if a field has been set. -func (o *RecoverV1Message) HasNewGatewayPubKey() bool { - if o != nil && !IsNil(o.NewGatewayPubKey) { - return true - } - - return false -} - -// SetNewGatewayPubKey gets a reference to the given string and assigns it to the NewGatewayPubKey field. -func (o *RecoverV1Message) SetNewGatewayPubKey(v string) { - o.NewGatewayPubKey = &v -} - -// GetSignature returns the Signature field value -func (o *RecoverV1Message) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *RecoverV1Message) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *RecoverV1Message) SetSignature(v string) { - o.Signature = v -} - -func (o RecoverV1Message) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RecoverV1Message) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["odapPhase"] = o.OdapPhase - toSerialize["sequenceNumber"] = o.SequenceNumber - toSerialize["lastLogEntryTimestamp"] = o.LastLogEntryTimestamp - toSerialize["isBackup"] = o.IsBackup - toSerialize["newBasePath"] = o.NewBasePath - if !IsNil(o.NewGatewayPubKey) { - toSerialize["newGatewayPubKey"] = o.NewGatewayPubKey - } - toSerialize["signature"] = o.Signature - return toSerialize, nil -} - -type NullableRecoverV1Message struct { - value *RecoverV1Message - isSet bool -} - -func (v NullableRecoverV1Message) Get() *RecoverV1Message { - return v.value -} - -func (v *NullableRecoverV1Message) Set(val *RecoverV1Message) { - v.value = val - v.isSet = true -} - -func (v NullableRecoverV1Message) IsSet() bool { - return v.isSet -} - -func (v *NullableRecoverV1Message) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRecoverV1Message(val *RecoverV1Message) *NullableRecoverV1Message { - return &NullableRecoverV1Message{value: val, isSet: true} -} - -func (v NullableRecoverV1Message) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRecoverV1Message) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_rollback_ack_v1_message.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_rollback_ack_v1_message.go deleted file mode 100644 index 2d7782bb6a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_rollback_ack_v1_message.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the RollbackAckV1Message type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RollbackAckV1Message{} - -// RollbackAckV1Message struct for RollbackAckV1Message -type RollbackAckV1Message struct { - SessionID string `json:"sessionID"` - Success bool `json:"success"` - Signature string `json:"signature"` -} - -// NewRollbackAckV1Message instantiates a new RollbackAckV1Message object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRollbackAckV1Message(sessionID string, success bool, signature string) *RollbackAckV1Message { - this := RollbackAckV1Message{} - this.SessionID = sessionID - this.Success = success - this.Signature = signature - return &this -} - -// NewRollbackAckV1MessageWithDefaults instantiates a new RollbackAckV1Message object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRollbackAckV1MessageWithDefaults() *RollbackAckV1Message { - this := RollbackAckV1Message{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *RollbackAckV1Message) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *RollbackAckV1Message) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *RollbackAckV1Message) SetSessionID(v string) { - o.SessionID = v -} - -// GetSuccess returns the Success field value -func (o *RollbackAckV1Message) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *RollbackAckV1Message) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *RollbackAckV1Message) SetSuccess(v bool) { - o.Success = v -} - -// GetSignature returns the Signature field value -func (o *RollbackAckV1Message) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *RollbackAckV1Message) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *RollbackAckV1Message) SetSignature(v string) { - o.Signature = v -} - -func (o RollbackAckV1Message) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RollbackAckV1Message) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["success"] = o.Success - toSerialize["signature"] = o.Signature - return toSerialize, nil -} - -type NullableRollbackAckV1Message struct { - value *RollbackAckV1Message - isSet bool -} - -func (v NullableRollbackAckV1Message) Get() *RollbackAckV1Message { - return v.value -} - -func (v *NullableRollbackAckV1Message) Set(val *RollbackAckV1Message) { - v.value = val - v.isSet = true -} - -func (v NullableRollbackAckV1Message) IsSet() bool { - return v.isSet -} - -func (v *NullableRollbackAckV1Message) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRollbackAckV1Message(val *RollbackAckV1Message) *NullableRollbackAckV1Message { - return &NullableRollbackAckV1Message{value: val, isSet: true} -} - -func (v NullableRollbackAckV1Message) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRollbackAckV1Message) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_rollback_v1_message.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_rollback_v1_message.go deleted file mode 100644 index f18f272542..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_rollback_v1_message.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the RollbackV1Message type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RollbackV1Message{} - -// RollbackV1Message struct for RollbackV1Message -type RollbackV1Message struct { - SessionID string `json:"sessionID"` - Success bool `json:"success"` - ActionPerformed []string `json:"actionPerformed"` - Proofs []string `json:"proofs"` - Signature string `json:"signature"` -} - -// NewRollbackV1Message instantiates a new RollbackV1Message object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRollbackV1Message(sessionID string, success bool, actionPerformed []string, proofs []string, signature string) *RollbackV1Message { - this := RollbackV1Message{} - this.SessionID = sessionID - this.Success = success - this.ActionPerformed = actionPerformed - this.Proofs = proofs - this.Signature = signature - return &this -} - -// NewRollbackV1MessageWithDefaults instantiates a new RollbackV1Message object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRollbackV1MessageWithDefaults() *RollbackV1Message { - this := RollbackV1Message{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *RollbackV1Message) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *RollbackV1Message) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *RollbackV1Message) SetSessionID(v string) { - o.SessionID = v -} - -// GetSuccess returns the Success field value -func (o *RollbackV1Message) GetSuccess() bool { - if o == nil { - var ret bool - return ret - } - - return o.Success -} - -// GetSuccessOk returns a tuple with the Success field value -// and a boolean to check if the value has been set. -func (o *RollbackV1Message) GetSuccessOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Success, true -} - -// SetSuccess sets field value -func (o *RollbackV1Message) SetSuccess(v bool) { - o.Success = v -} - -// GetActionPerformed returns the ActionPerformed field value -func (o *RollbackV1Message) GetActionPerformed() []string { - if o == nil { - var ret []string - return ret - } - - return o.ActionPerformed -} - -// GetActionPerformedOk returns a tuple with the ActionPerformed field value -// and a boolean to check if the value has been set. -func (o *RollbackV1Message) GetActionPerformedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ActionPerformed, true -} - -// SetActionPerformed sets field value -func (o *RollbackV1Message) SetActionPerformed(v []string) { - o.ActionPerformed = v -} - -// GetProofs returns the Proofs field value -func (o *RollbackV1Message) GetProofs() []string { - if o == nil { - var ret []string - return ret - } - - return o.Proofs -} - -// GetProofsOk returns a tuple with the Proofs field value -// and a boolean to check if the value has been set. -func (o *RollbackV1Message) GetProofsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Proofs, true -} - -// SetProofs sets field value -func (o *RollbackV1Message) SetProofs(v []string) { - o.Proofs = v -} - -// GetSignature returns the Signature field value -func (o *RollbackV1Message) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *RollbackV1Message) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *RollbackV1Message) SetSignature(v string) { - o.Signature = v -} - -func (o RollbackV1Message) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RollbackV1Message) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["success"] = o.Success - toSerialize["actionPerformed"] = o.ActionPerformed - toSerialize["proofs"] = o.Proofs - toSerialize["signature"] = o.Signature - return toSerialize, nil -} - -type NullableRollbackV1Message struct { - value *RollbackV1Message - isSet bool -} - -func (v NullableRollbackV1Message) Get() *RollbackV1Message { - return v.value -} - -func (v *NullableRollbackV1Message) Set(val *RollbackV1Message) { - v.value = val - v.isSet = true -} - -func (v NullableRollbackV1Message) IsSet() bool { - return v.isSet -} - -func (v *NullableRollbackV1Message) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRollbackV1Message(val *RollbackV1Message) *NullableRollbackV1Message { - return &NullableRollbackV1Message{value: val, isSet: true} -} - -func (v NullableRollbackV1Message) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRollbackV1Message) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_satp_message.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_satp_message.go deleted file mode 100644 index 8274e45c98..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_satp_message.go +++ /dev/null @@ -1,522 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the SatpMessage type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SatpMessage{} - -// SatpMessage struct for SatpMessage -type SatpMessage struct { - SequenceNumber *float32 `json:"SequenceNumber,omitempty"` - Phase *string `json:"Phase,omitempty"` - ResourceURL *string `json:"ResourceURL,omitempty"` - DeveloperURN *string `json:"DeveloperURN,omitempty"` - ActionResponse *SatpMessageActionResponse `json:"ActionResponse,omitempty"` - CredentialProfile *string `json:"CredentialProfile,omitempty"` - CredentialBlock []interface{} `json:"CredentialBlock,omitempty"` - CredentialsProfile *PayloadProfile `json:"CredentialsProfile,omitempty"` - ApplicationProfile map[string]interface{} `json:"ApplicationProfile,omitempty"` - Payload map[string]interface{} `json:"Payload,omitempty"` - PayloadHash *string `json:"PayloadHash,omitempty"` - MessageSignature *string `json:"MessageSignature,omitempty"` -} - -// NewSatpMessage instantiates a new SatpMessage object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSatpMessage() *SatpMessage { - this := SatpMessage{} - return &this -} - -// NewSatpMessageWithDefaults instantiates a new SatpMessage object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSatpMessageWithDefaults() *SatpMessage { - this := SatpMessage{} - return &this -} - -// GetSequenceNumber returns the SequenceNumber field value if set, zero value otherwise. -func (o *SatpMessage) GetSequenceNumber() float32 { - if o == nil || IsNil(o.SequenceNumber) { - var ret float32 - return ret - } - return *o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetSequenceNumberOk() (*float32, bool) { - if o == nil || IsNil(o.SequenceNumber) { - return nil, false - } - return o.SequenceNumber, true -} - -// HasSequenceNumber returns a boolean if a field has been set. -func (o *SatpMessage) HasSequenceNumber() bool { - if o != nil && !IsNil(o.SequenceNumber) { - return true - } - - return false -} - -// SetSequenceNumber gets a reference to the given float32 and assigns it to the SequenceNumber field. -func (o *SatpMessage) SetSequenceNumber(v float32) { - o.SequenceNumber = &v -} - -// GetPhase returns the Phase field value if set, zero value otherwise. -func (o *SatpMessage) GetPhase() string { - if o == nil || IsNil(o.Phase) { - var ret string - return ret - } - return *o.Phase -} - -// GetPhaseOk returns a tuple with the Phase field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetPhaseOk() (*string, bool) { - if o == nil || IsNil(o.Phase) { - return nil, false - } - return o.Phase, true -} - -// HasPhase returns a boolean if a field has been set. -func (o *SatpMessage) HasPhase() bool { - if o != nil && !IsNil(o.Phase) { - return true - } - - return false -} - -// SetPhase gets a reference to the given string and assigns it to the Phase field. -func (o *SatpMessage) SetPhase(v string) { - o.Phase = &v -} - -// GetResourceURL returns the ResourceURL field value if set, zero value otherwise. -func (o *SatpMessage) GetResourceURL() string { - if o == nil || IsNil(o.ResourceURL) { - var ret string - return ret - } - return *o.ResourceURL -} - -// GetResourceURLOk returns a tuple with the ResourceURL field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetResourceURLOk() (*string, bool) { - if o == nil || IsNil(o.ResourceURL) { - return nil, false - } - return o.ResourceURL, true -} - -// HasResourceURL returns a boolean if a field has been set. -func (o *SatpMessage) HasResourceURL() bool { - if o != nil && !IsNil(o.ResourceURL) { - return true - } - - return false -} - -// SetResourceURL gets a reference to the given string and assigns it to the ResourceURL field. -func (o *SatpMessage) SetResourceURL(v string) { - o.ResourceURL = &v -} - -// GetDeveloperURN returns the DeveloperURN field value if set, zero value otherwise. -func (o *SatpMessage) GetDeveloperURN() string { - if o == nil || IsNil(o.DeveloperURN) { - var ret string - return ret - } - return *o.DeveloperURN -} - -// GetDeveloperURNOk returns a tuple with the DeveloperURN field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetDeveloperURNOk() (*string, bool) { - if o == nil || IsNil(o.DeveloperURN) { - return nil, false - } - return o.DeveloperURN, true -} - -// HasDeveloperURN returns a boolean if a field has been set. -func (o *SatpMessage) HasDeveloperURN() bool { - if o != nil && !IsNil(o.DeveloperURN) { - return true - } - - return false -} - -// SetDeveloperURN gets a reference to the given string and assigns it to the DeveloperURN field. -func (o *SatpMessage) SetDeveloperURN(v string) { - o.DeveloperURN = &v -} - -// GetActionResponse returns the ActionResponse field value if set, zero value otherwise. -func (o *SatpMessage) GetActionResponse() SatpMessageActionResponse { - if o == nil || IsNil(o.ActionResponse) { - var ret SatpMessageActionResponse - return ret - } - return *o.ActionResponse -} - -// GetActionResponseOk returns a tuple with the ActionResponse field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetActionResponseOk() (*SatpMessageActionResponse, bool) { - if o == nil || IsNil(o.ActionResponse) { - return nil, false - } - return o.ActionResponse, true -} - -// HasActionResponse returns a boolean if a field has been set. -func (o *SatpMessage) HasActionResponse() bool { - if o != nil && !IsNil(o.ActionResponse) { - return true - } - - return false -} - -// SetActionResponse gets a reference to the given SatpMessageActionResponse and assigns it to the ActionResponse field. -func (o *SatpMessage) SetActionResponse(v SatpMessageActionResponse) { - o.ActionResponse = &v -} - -// GetCredentialProfile returns the CredentialProfile field value if set, zero value otherwise. -func (o *SatpMessage) GetCredentialProfile() string { - if o == nil || IsNil(o.CredentialProfile) { - var ret string - return ret - } - return *o.CredentialProfile -} - -// GetCredentialProfileOk returns a tuple with the CredentialProfile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetCredentialProfileOk() (*string, bool) { - if o == nil || IsNil(o.CredentialProfile) { - return nil, false - } - return o.CredentialProfile, true -} - -// HasCredentialProfile returns a boolean if a field has been set. -func (o *SatpMessage) HasCredentialProfile() bool { - if o != nil && !IsNil(o.CredentialProfile) { - return true - } - - return false -} - -// SetCredentialProfile gets a reference to the given string and assigns it to the CredentialProfile field. -func (o *SatpMessage) SetCredentialProfile(v string) { - o.CredentialProfile = &v -} - -// GetCredentialBlock returns the CredentialBlock field value if set, zero value otherwise. -func (o *SatpMessage) GetCredentialBlock() []interface{} { - if o == nil || IsNil(o.CredentialBlock) { - var ret []interface{} - return ret - } - return o.CredentialBlock -} - -// GetCredentialBlockOk returns a tuple with the CredentialBlock field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetCredentialBlockOk() ([]interface{}, bool) { - if o == nil || IsNil(o.CredentialBlock) { - return nil, false - } - return o.CredentialBlock, true -} - -// HasCredentialBlock returns a boolean if a field has been set. -func (o *SatpMessage) HasCredentialBlock() bool { - if o != nil && !IsNil(o.CredentialBlock) { - return true - } - - return false -} - -// SetCredentialBlock gets a reference to the given []interface{} and assigns it to the CredentialBlock field. -func (o *SatpMessage) SetCredentialBlock(v []interface{}) { - o.CredentialBlock = v -} - -// GetCredentialsProfile returns the CredentialsProfile field value if set, zero value otherwise. -func (o *SatpMessage) GetCredentialsProfile() PayloadProfile { - if o == nil || IsNil(o.CredentialsProfile) { - var ret PayloadProfile - return ret - } - return *o.CredentialsProfile -} - -// GetCredentialsProfileOk returns a tuple with the CredentialsProfile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetCredentialsProfileOk() (*PayloadProfile, bool) { - if o == nil || IsNil(o.CredentialsProfile) { - return nil, false - } - return o.CredentialsProfile, true -} - -// HasCredentialsProfile returns a boolean if a field has been set. -func (o *SatpMessage) HasCredentialsProfile() bool { - if o != nil && !IsNil(o.CredentialsProfile) { - return true - } - - return false -} - -// SetCredentialsProfile gets a reference to the given PayloadProfile and assigns it to the CredentialsProfile field. -func (o *SatpMessage) SetCredentialsProfile(v PayloadProfile) { - o.CredentialsProfile = &v -} - -// GetApplicationProfile returns the ApplicationProfile field value if set, zero value otherwise. -func (o *SatpMessage) GetApplicationProfile() map[string]interface{} { - if o == nil || IsNil(o.ApplicationProfile) { - var ret map[string]interface{} - return ret - } - return o.ApplicationProfile -} - -// GetApplicationProfileOk returns a tuple with the ApplicationProfile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetApplicationProfileOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.ApplicationProfile) { - return map[string]interface{}{}, false - } - return o.ApplicationProfile, true -} - -// HasApplicationProfile returns a boolean if a field has been set. -func (o *SatpMessage) HasApplicationProfile() bool { - if o != nil && !IsNil(o.ApplicationProfile) { - return true - } - - return false -} - -// SetApplicationProfile gets a reference to the given map[string]interface{} and assigns it to the ApplicationProfile field. -func (o *SatpMessage) SetApplicationProfile(v map[string]interface{}) { - o.ApplicationProfile = v -} - -// GetPayload returns the Payload field value if set, zero value otherwise. -func (o *SatpMessage) GetPayload() map[string]interface{} { - if o == nil || IsNil(o.Payload) { - var ret map[string]interface{} - return ret - } - return o.Payload -} - -// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetPayloadOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Payload) { - return map[string]interface{}{}, false - } - return o.Payload, true -} - -// HasPayload returns a boolean if a field has been set. -func (o *SatpMessage) HasPayload() bool { - if o != nil && !IsNil(o.Payload) { - return true - } - - return false -} - -// SetPayload gets a reference to the given map[string]interface{} and assigns it to the Payload field. -func (o *SatpMessage) SetPayload(v map[string]interface{}) { - o.Payload = v -} - -// GetPayloadHash returns the PayloadHash field value if set, zero value otherwise. -func (o *SatpMessage) GetPayloadHash() string { - if o == nil || IsNil(o.PayloadHash) { - var ret string - return ret - } - return *o.PayloadHash -} - -// GetPayloadHashOk returns a tuple with the PayloadHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetPayloadHashOk() (*string, bool) { - if o == nil || IsNil(o.PayloadHash) { - return nil, false - } - return o.PayloadHash, true -} - -// HasPayloadHash returns a boolean if a field has been set. -func (o *SatpMessage) HasPayloadHash() bool { - if o != nil && !IsNil(o.PayloadHash) { - return true - } - - return false -} - -// SetPayloadHash gets a reference to the given string and assigns it to the PayloadHash field. -func (o *SatpMessage) SetPayloadHash(v string) { - o.PayloadHash = &v -} - -// GetMessageSignature returns the MessageSignature field value if set, zero value otherwise. -func (o *SatpMessage) GetMessageSignature() string { - if o == nil || IsNil(o.MessageSignature) { - var ret string - return ret - } - return *o.MessageSignature -} - -// GetMessageSignatureOk returns a tuple with the MessageSignature field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessage) GetMessageSignatureOk() (*string, bool) { - if o == nil || IsNil(o.MessageSignature) { - return nil, false - } - return o.MessageSignature, true -} - -// HasMessageSignature returns a boolean if a field has been set. -func (o *SatpMessage) HasMessageSignature() bool { - if o != nil && !IsNil(o.MessageSignature) { - return true - } - - return false -} - -// SetMessageSignature gets a reference to the given string and assigns it to the MessageSignature field. -func (o *SatpMessage) SetMessageSignature(v string) { - o.MessageSignature = &v -} - -func (o SatpMessage) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SatpMessage) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.SequenceNumber) { - toSerialize["SequenceNumber"] = o.SequenceNumber - } - if !IsNil(o.Phase) { - toSerialize["Phase"] = o.Phase - } - if !IsNil(o.ResourceURL) { - toSerialize["ResourceURL"] = o.ResourceURL - } - if !IsNil(o.DeveloperURN) { - toSerialize["DeveloperURN"] = o.DeveloperURN - } - if !IsNil(o.ActionResponse) { - toSerialize["ActionResponse"] = o.ActionResponse - } - if !IsNil(o.CredentialProfile) { - toSerialize["CredentialProfile"] = o.CredentialProfile - } - if !IsNil(o.CredentialBlock) { - toSerialize["CredentialBlock"] = o.CredentialBlock - } - if !IsNil(o.CredentialsProfile) { - toSerialize["CredentialsProfile"] = o.CredentialsProfile - } - if !IsNil(o.ApplicationProfile) { - toSerialize["ApplicationProfile"] = o.ApplicationProfile - } - if !IsNil(o.Payload) { - toSerialize["Payload"] = o.Payload - } - if !IsNil(o.PayloadHash) { - toSerialize["PayloadHash"] = o.PayloadHash - } - if !IsNil(o.MessageSignature) { - toSerialize["MessageSignature"] = o.MessageSignature - } - return toSerialize, nil -} - -type NullableSatpMessage struct { - value *SatpMessage - isSet bool -} - -func (v NullableSatpMessage) Get() *SatpMessage { - return v.value -} - -func (v *NullableSatpMessage) Set(val *SatpMessage) { - v.value = val - v.isSet = true -} - -func (v NullableSatpMessage) IsSet() bool { - return v.isSet -} - -func (v *NullableSatpMessage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSatpMessage(val *SatpMessage) *NullableSatpMessage { - return &NullableSatpMessage{value: val, isSet: true} -} - -func (v NullableSatpMessage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSatpMessage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_satp_message_action_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_satp_message_action_response.go deleted file mode 100644 index dd7f0fc611..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_satp_message_action_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the SatpMessageActionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SatpMessageActionResponse{} - -// SatpMessageActionResponse struct for SatpMessageActionResponse -type SatpMessageActionResponse struct { - ResponseCode *string `json:"ResponseCode,omitempty"` - Arguments []interface{} `json:"Arguments,omitempty"` -} - -// NewSatpMessageActionResponse instantiates a new SatpMessageActionResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSatpMessageActionResponse() *SatpMessageActionResponse { - this := SatpMessageActionResponse{} - return &this -} - -// NewSatpMessageActionResponseWithDefaults instantiates a new SatpMessageActionResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSatpMessageActionResponseWithDefaults() *SatpMessageActionResponse { - this := SatpMessageActionResponse{} - return &this -} - -// GetResponseCode returns the ResponseCode field value if set, zero value otherwise. -func (o *SatpMessageActionResponse) GetResponseCode() string { - if o == nil || IsNil(o.ResponseCode) { - var ret string - return ret - } - return *o.ResponseCode -} - -// GetResponseCodeOk returns a tuple with the ResponseCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessageActionResponse) GetResponseCodeOk() (*string, bool) { - if o == nil || IsNil(o.ResponseCode) { - return nil, false - } - return o.ResponseCode, true -} - -// HasResponseCode returns a boolean if a field has been set. -func (o *SatpMessageActionResponse) HasResponseCode() bool { - if o != nil && !IsNil(o.ResponseCode) { - return true - } - - return false -} - -// SetResponseCode gets a reference to the given string and assigns it to the ResponseCode field. -func (o *SatpMessageActionResponse) SetResponseCode(v string) { - o.ResponseCode = &v -} - -// GetArguments returns the Arguments field value if set, zero value otherwise. -func (o *SatpMessageActionResponse) GetArguments() []interface{} { - if o == nil || IsNil(o.Arguments) { - var ret []interface{} - return ret - } - return o.Arguments -} - -// GetArgumentsOk returns a tuple with the Arguments field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SatpMessageActionResponse) GetArgumentsOk() ([]interface{}, bool) { - if o == nil || IsNil(o.Arguments) { - return nil, false - } - return o.Arguments, true -} - -// HasArguments returns a boolean if a field has been set. -func (o *SatpMessageActionResponse) HasArguments() bool { - if o != nil && !IsNil(o.Arguments) { - return true - } - - return false -} - -// SetArguments gets a reference to the given []interface{} and assigns it to the Arguments field. -func (o *SatpMessageActionResponse) SetArguments(v []interface{}) { - o.Arguments = v -} - -func (o SatpMessageActionResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SatpMessageActionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ResponseCode) { - toSerialize["ResponseCode"] = o.ResponseCode - } - if !IsNil(o.Arguments) { - toSerialize["Arguments"] = o.Arguments - } - return toSerialize, nil -} - -type NullableSatpMessageActionResponse struct { - value *SatpMessageActionResponse - isSet bool -} - -func (v NullableSatpMessageActionResponse) Get() *SatpMessageActionResponse { - return v.value -} - -func (v *NullableSatpMessageActionResponse) Set(val *SatpMessageActionResponse) { - v.value = val - v.isSet = true -} - -func (v NullableSatpMessageActionResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableSatpMessageActionResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSatpMessageActionResponse(val *SatpMessageActionResponse) *NullableSatpMessageActionResponse { - return &NullableSatpMessageActionResponse{value: val, isSet: true} -} - -func (v NullableSatpMessageActionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSatpMessageActionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_session_data.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_session_data.go deleted file mode 100644 index d82664b431..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_session_data.go +++ /dev/null @@ -1,2286 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the SessionData type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SessionData{} - -// SessionData struct for SessionData -type SessionData struct { - Id *string `json:"id,omitempty"` - Step *float32 `json:"step,omitempty"` - Version *string `json:"version,omitempty"` - LastSequenceNumber *float32 `json:"lastSequenceNumber,omitempty"` - LoggingProfile *string `json:"loggingProfile,omitempty"` - AccessControlProfile *string `json:"accessControlProfile,omitempty"` - ApplicationProfile *string `json:"applicationProfile,omitempty"` - PayloadProfile *PayloadProfile `json:"payloadProfile,omitempty"` - AssetProfile *AssetProfile `json:"assetProfile,omitempty"` - AllowedSourceBackupGateways []string `json:"allowedSourceBackupGateways,omitempty"` - AllowedRecipientBackupGateways []string `json:"allowedRecipientBackupGateways,omitempty"` - SourceBasePath *string `json:"sourceBasePath,omitempty"` - RecipientBasePath *string `json:"recipientBasePath,omitempty"` - OriginatorPubkey *string `json:"originatorPubkey,omitempty"` - BeneficiaryPubkey *string `json:"beneficiaryPubkey,omitempty"` - SourceGatewayPubkey *string `json:"sourceGatewayPubkey,omitempty"` - SourceGatewayDltSystem *string `json:"sourceGatewayDltSystem,omitempty"` - RecipientGatewayPubkey *string `json:"recipientGatewayPubkey,omitempty"` - RecipientGatewayDltSystem *string `json:"recipientGatewayDltSystem,omitempty"` - InitializationRequestMessageHash *string `json:"initializationRequestMessageHash,omitempty"` - InitializationResponseMessageHash *string `json:"initializationResponseMessageHash,omitempty"` - InitializationRequestMessageRcvTimeStamp *string `json:"initializationRequestMessageRcvTimeStamp,omitempty"` - InitializationRequestMessageProcessedTimeStamp *string `json:"initializationRequestMessageProcessedTimeStamp,omitempty"` - ClientSignatureInitializationRequestMessage *string `json:"clientSignatureInitializationRequestMessage,omitempty"` - ServerSignatureInitializationResponseMessage *string `json:"serverSignatureInitializationResponseMessage,omitempty"` - TransferCommenceMessageRequestHash *string `json:"transferCommenceMessageRequestHash,omitempty"` - TransferCommenceMessageResponseHash *string `json:"transferCommenceMessageResponseHash,omitempty"` - ClientSignatureTransferCommenceRequestMessage *string `json:"clientSignatureTransferCommenceRequestMessage,omitempty"` - ServerSignatureTransferCommenceResponseMessage *string `json:"serverSignatureTransferCommenceResponseMessage,omitempty"` - LockEvidenceRequestMessageHash *string `json:"lockEvidenceRequestMessageHash,omitempty"` - LockEvidenceResponseMessageHash *string `json:"lockEvidenceResponseMessageHash,omitempty"` - ClientSignatureLockEvidenceRequestMessage *string `json:"clientSignatureLockEvidenceRequestMessage,omitempty"` - ServerSignatureLockEvidenceResponseMessage *string `json:"serverSignatureLockEvidenceResponseMessage,omitempty"` - LockEvidenceClaim *string `json:"lockEvidenceClaim,omitempty"` - CommitPrepareRequestMessageHash *string `json:"commitPrepareRequestMessageHash,omitempty"` - CommitPrepareResponseMessageHash *string `json:"commitPrepareResponseMessageHash,omitempty"` - ClientSignatureCommitPreparationRequestMessage *string `json:"clientSignatureCommitPreparationRequestMessage,omitempty"` - ServerSignatureCommitPreparationResponseMessage *string `json:"serverSignatureCommitPreparationResponseMessage,omitempty"` - CommitFinalRequestMessageHash *string `json:"commitFinalRequestMessageHash,omitempty"` - CommitFinalResponseMessageHash *string `json:"commitFinalResponseMessageHash,omitempty"` - CommitFinalClaim *string `json:"commitFinalClaim,omitempty"` - CommitFinalClaimFormat *string `json:"commitFinalClaimFormat,omitempty"` - CommitAcknowledgementClaim *string `json:"commitAcknowledgementClaim,omitempty"` - CommitAcknowledgementClaimFormat *string `json:"commitAcknowledgementClaimFormat,omitempty"` - ClientSignatureCommitFinalRequestMessage *string `json:"clientSignatureCommitFinalRequestMessage,omitempty"` - ServerSignatureCommitFinalResponseMessage *string `json:"serverSignatureCommitFinalResponseMessage,omitempty"` - TransferCompleteMessageHash *string `json:"transferCompleteMessageHash,omitempty"` - ClientSignatureTransferCompleteMessage *string `json:"clientSignatureTransferCompleteMessage,omitempty"` - MaxRetries *float32 `json:"maxRetries,omitempty"` - RecipientLedgerAssetID *string `json:"recipientLedgerAssetID,omitempty"` - SourceLedgerAssetID *string `json:"sourceLedgerAssetID,omitempty"` - MaxTimeout *float32 `json:"maxTimeout,omitempty"` - LastLogEntryTimestamp *string `json:"lastLogEntryTimestamp,omitempty"` - UnlockAssetClaim *string `json:"unlockAssetClaim,omitempty"` - RecreateAssetClaim *string `json:"recreateAssetClaim,omitempty"` - DeleteAssetClaim *string `json:"deleteAssetClaim,omitempty"` - LastMessageReceivedTimestamp *string `json:"lastMessageReceivedTimestamp,omitempty"` - Rollback *bool `json:"rollback,omitempty"` - RollbackMessageHash *string `json:"rollbackMessageHash,omitempty"` - RollbackProofs []string `json:"rollbackProofs,omitempty"` - RollbackActionsPerformed []string `json:"rollbackActionsPerformed,omitempty"` -} - -// NewSessionData instantiates a new SessionData object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSessionData() *SessionData { - this := SessionData{} - return &this -} - -// NewSessionDataWithDefaults instantiates a new SessionData object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSessionDataWithDefaults() *SessionData { - this := SessionData{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *SessionData) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *SessionData) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *SessionData) SetId(v string) { - o.Id = &v -} - -// GetStep returns the Step field value if set, zero value otherwise. -func (o *SessionData) GetStep() float32 { - if o == nil || IsNil(o.Step) { - var ret float32 - return ret - } - return *o.Step -} - -// GetStepOk returns a tuple with the Step field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetStepOk() (*float32, bool) { - if o == nil || IsNil(o.Step) { - return nil, false - } - return o.Step, true -} - -// HasStep returns a boolean if a field has been set. -func (o *SessionData) HasStep() bool { - if o != nil && !IsNil(o.Step) { - return true - } - - return false -} - -// SetStep gets a reference to the given float32 and assigns it to the Step field. -func (o *SessionData) SetStep(v float32) { - o.Step = &v -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *SessionData) GetVersion() string { - if o == nil || IsNil(o.Version) { - var ret string - return ret - } - return *o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *SessionData) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *SessionData) SetVersion(v string) { - o.Version = &v -} - -// GetLastSequenceNumber returns the LastSequenceNumber field value if set, zero value otherwise. -func (o *SessionData) GetLastSequenceNumber() float32 { - if o == nil || IsNil(o.LastSequenceNumber) { - var ret float32 - return ret - } - return *o.LastSequenceNumber -} - -// GetLastSequenceNumberOk returns a tuple with the LastSequenceNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetLastSequenceNumberOk() (*float32, bool) { - if o == nil || IsNil(o.LastSequenceNumber) { - return nil, false - } - return o.LastSequenceNumber, true -} - -// HasLastSequenceNumber returns a boolean if a field has been set. -func (o *SessionData) HasLastSequenceNumber() bool { - if o != nil && !IsNil(o.LastSequenceNumber) { - return true - } - - return false -} - -// SetLastSequenceNumber gets a reference to the given float32 and assigns it to the LastSequenceNumber field. -func (o *SessionData) SetLastSequenceNumber(v float32) { - o.LastSequenceNumber = &v -} - -// GetLoggingProfile returns the LoggingProfile field value if set, zero value otherwise. -func (o *SessionData) GetLoggingProfile() string { - if o == nil || IsNil(o.LoggingProfile) { - var ret string - return ret - } - return *o.LoggingProfile -} - -// GetLoggingProfileOk returns a tuple with the LoggingProfile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetLoggingProfileOk() (*string, bool) { - if o == nil || IsNil(o.LoggingProfile) { - return nil, false - } - return o.LoggingProfile, true -} - -// HasLoggingProfile returns a boolean if a field has been set. -func (o *SessionData) HasLoggingProfile() bool { - if o != nil && !IsNil(o.LoggingProfile) { - return true - } - - return false -} - -// SetLoggingProfile gets a reference to the given string and assigns it to the LoggingProfile field. -func (o *SessionData) SetLoggingProfile(v string) { - o.LoggingProfile = &v -} - -// GetAccessControlProfile returns the AccessControlProfile field value if set, zero value otherwise. -func (o *SessionData) GetAccessControlProfile() string { - if o == nil || IsNil(o.AccessControlProfile) { - var ret string - return ret - } - return *o.AccessControlProfile -} - -// GetAccessControlProfileOk returns a tuple with the AccessControlProfile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetAccessControlProfileOk() (*string, bool) { - if o == nil || IsNil(o.AccessControlProfile) { - return nil, false - } - return o.AccessControlProfile, true -} - -// HasAccessControlProfile returns a boolean if a field has been set. -func (o *SessionData) HasAccessControlProfile() bool { - if o != nil && !IsNil(o.AccessControlProfile) { - return true - } - - return false -} - -// SetAccessControlProfile gets a reference to the given string and assigns it to the AccessControlProfile field. -func (o *SessionData) SetAccessControlProfile(v string) { - o.AccessControlProfile = &v -} - -// GetApplicationProfile returns the ApplicationProfile field value if set, zero value otherwise. -func (o *SessionData) GetApplicationProfile() string { - if o == nil || IsNil(o.ApplicationProfile) { - var ret string - return ret - } - return *o.ApplicationProfile -} - -// GetApplicationProfileOk returns a tuple with the ApplicationProfile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetApplicationProfileOk() (*string, bool) { - if o == nil || IsNil(o.ApplicationProfile) { - return nil, false - } - return o.ApplicationProfile, true -} - -// HasApplicationProfile returns a boolean if a field has been set. -func (o *SessionData) HasApplicationProfile() bool { - if o != nil && !IsNil(o.ApplicationProfile) { - return true - } - - return false -} - -// SetApplicationProfile gets a reference to the given string and assigns it to the ApplicationProfile field. -func (o *SessionData) SetApplicationProfile(v string) { - o.ApplicationProfile = &v -} - -// GetPayloadProfile returns the PayloadProfile field value if set, zero value otherwise. -func (o *SessionData) GetPayloadProfile() PayloadProfile { - if o == nil || IsNil(o.PayloadProfile) { - var ret PayloadProfile - return ret - } - return *o.PayloadProfile -} - -// GetPayloadProfileOk returns a tuple with the PayloadProfile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetPayloadProfileOk() (*PayloadProfile, bool) { - if o == nil || IsNil(o.PayloadProfile) { - return nil, false - } - return o.PayloadProfile, true -} - -// HasPayloadProfile returns a boolean if a field has been set. -func (o *SessionData) HasPayloadProfile() bool { - if o != nil && !IsNil(o.PayloadProfile) { - return true - } - - return false -} - -// SetPayloadProfile gets a reference to the given PayloadProfile and assigns it to the PayloadProfile field. -func (o *SessionData) SetPayloadProfile(v PayloadProfile) { - o.PayloadProfile = &v -} - -// GetAssetProfile returns the AssetProfile field value if set, zero value otherwise. -func (o *SessionData) GetAssetProfile() AssetProfile { - if o == nil || IsNil(o.AssetProfile) { - var ret AssetProfile - return ret - } - return *o.AssetProfile -} - -// GetAssetProfileOk returns a tuple with the AssetProfile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetAssetProfileOk() (*AssetProfile, bool) { - if o == nil || IsNil(o.AssetProfile) { - return nil, false - } - return o.AssetProfile, true -} - -// HasAssetProfile returns a boolean if a field has been set. -func (o *SessionData) HasAssetProfile() bool { - if o != nil && !IsNil(o.AssetProfile) { - return true - } - - return false -} - -// SetAssetProfile gets a reference to the given AssetProfile and assigns it to the AssetProfile field. -func (o *SessionData) SetAssetProfile(v AssetProfile) { - o.AssetProfile = &v -} - -// GetAllowedSourceBackupGateways returns the AllowedSourceBackupGateways field value if set, zero value otherwise. -func (o *SessionData) GetAllowedSourceBackupGateways() []string { - if o == nil || IsNil(o.AllowedSourceBackupGateways) { - var ret []string - return ret - } - return o.AllowedSourceBackupGateways -} - -// GetAllowedSourceBackupGatewaysOk returns a tuple with the AllowedSourceBackupGateways field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetAllowedSourceBackupGatewaysOk() ([]string, bool) { - if o == nil || IsNil(o.AllowedSourceBackupGateways) { - return nil, false - } - return o.AllowedSourceBackupGateways, true -} - -// HasAllowedSourceBackupGateways returns a boolean if a field has been set. -func (o *SessionData) HasAllowedSourceBackupGateways() bool { - if o != nil && !IsNil(o.AllowedSourceBackupGateways) { - return true - } - - return false -} - -// SetAllowedSourceBackupGateways gets a reference to the given []string and assigns it to the AllowedSourceBackupGateways field. -func (o *SessionData) SetAllowedSourceBackupGateways(v []string) { - o.AllowedSourceBackupGateways = v -} - -// GetAllowedRecipientBackupGateways returns the AllowedRecipientBackupGateways field value if set, zero value otherwise. -func (o *SessionData) GetAllowedRecipientBackupGateways() []string { - if o == nil || IsNil(o.AllowedRecipientBackupGateways) { - var ret []string - return ret - } - return o.AllowedRecipientBackupGateways -} - -// GetAllowedRecipientBackupGatewaysOk returns a tuple with the AllowedRecipientBackupGateways field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetAllowedRecipientBackupGatewaysOk() ([]string, bool) { - if o == nil || IsNil(o.AllowedRecipientBackupGateways) { - return nil, false - } - return o.AllowedRecipientBackupGateways, true -} - -// HasAllowedRecipientBackupGateways returns a boolean if a field has been set. -func (o *SessionData) HasAllowedRecipientBackupGateways() bool { - if o != nil && !IsNil(o.AllowedRecipientBackupGateways) { - return true - } - - return false -} - -// SetAllowedRecipientBackupGateways gets a reference to the given []string and assigns it to the AllowedRecipientBackupGateways field. -func (o *SessionData) SetAllowedRecipientBackupGateways(v []string) { - o.AllowedRecipientBackupGateways = v -} - -// GetSourceBasePath returns the SourceBasePath field value if set, zero value otherwise. -func (o *SessionData) GetSourceBasePath() string { - if o == nil || IsNil(o.SourceBasePath) { - var ret string - return ret - } - return *o.SourceBasePath -} - -// GetSourceBasePathOk returns a tuple with the SourceBasePath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetSourceBasePathOk() (*string, bool) { - if o == nil || IsNil(o.SourceBasePath) { - return nil, false - } - return o.SourceBasePath, true -} - -// HasSourceBasePath returns a boolean if a field has been set. -func (o *SessionData) HasSourceBasePath() bool { - if o != nil && !IsNil(o.SourceBasePath) { - return true - } - - return false -} - -// SetSourceBasePath gets a reference to the given string and assigns it to the SourceBasePath field. -func (o *SessionData) SetSourceBasePath(v string) { - o.SourceBasePath = &v -} - -// GetRecipientBasePath returns the RecipientBasePath field value if set, zero value otherwise. -func (o *SessionData) GetRecipientBasePath() string { - if o == nil || IsNil(o.RecipientBasePath) { - var ret string - return ret - } - return *o.RecipientBasePath -} - -// GetRecipientBasePathOk returns a tuple with the RecipientBasePath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetRecipientBasePathOk() (*string, bool) { - if o == nil || IsNil(o.RecipientBasePath) { - return nil, false - } - return o.RecipientBasePath, true -} - -// HasRecipientBasePath returns a boolean if a field has been set. -func (o *SessionData) HasRecipientBasePath() bool { - if o != nil && !IsNil(o.RecipientBasePath) { - return true - } - - return false -} - -// SetRecipientBasePath gets a reference to the given string and assigns it to the RecipientBasePath field. -func (o *SessionData) SetRecipientBasePath(v string) { - o.RecipientBasePath = &v -} - -// GetOriginatorPubkey returns the OriginatorPubkey field value if set, zero value otherwise. -func (o *SessionData) GetOriginatorPubkey() string { - if o == nil || IsNil(o.OriginatorPubkey) { - var ret string - return ret - } - return *o.OriginatorPubkey -} - -// GetOriginatorPubkeyOk returns a tuple with the OriginatorPubkey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetOriginatorPubkeyOk() (*string, bool) { - if o == nil || IsNil(o.OriginatorPubkey) { - return nil, false - } - return o.OriginatorPubkey, true -} - -// HasOriginatorPubkey returns a boolean if a field has been set. -func (o *SessionData) HasOriginatorPubkey() bool { - if o != nil && !IsNil(o.OriginatorPubkey) { - return true - } - - return false -} - -// SetOriginatorPubkey gets a reference to the given string and assigns it to the OriginatorPubkey field. -func (o *SessionData) SetOriginatorPubkey(v string) { - o.OriginatorPubkey = &v -} - -// GetBeneficiaryPubkey returns the BeneficiaryPubkey field value if set, zero value otherwise. -func (o *SessionData) GetBeneficiaryPubkey() string { - if o == nil || IsNil(o.BeneficiaryPubkey) { - var ret string - return ret - } - return *o.BeneficiaryPubkey -} - -// GetBeneficiaryPubkeyOk returns a tuple with the BeneficiaryPubkey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetBeneficiaryPubkeyOk() (*string, bool) { - if o == nil || IsNil(o.BeneficiaryPubkey) { - return nil, false - } - return o.BeneficiaryPubkey, true -} - -// HasBeneficiaryPubkey returns a boolean if a field has been set. -func (o *SessionData) HasBeneficiaryPubkey() bool { - if o != nil && !IsNil(o.BeneficiaryPubkey) { - return true - } - - return false -} - -// SetBeneficiaryPubkey gets a reference to the given string and assigns it to the BeneficiaryPubkey field. -func (o *SessionData) SetBeneficiaryPubkey(v string) { - o.BeneficiaryPubkey = &v -} - -// GetSourceGatewayPubkey returns the SourceGatewayPubkey field value if set, zero value otherwise. -func (o *SessionData) GetSourceGatewayPubkey() string { - if o == nil || IsNil(o.SourceGatewayPubkey) { - var ret string - return ret - } - return *o.SourceGatewayPubkey -} - -// GetSourceGatewayPubkeyOk returns a tuple with the SourceGatewayPubkey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetSourceGatewayPubkeyOk() (*string, bool) { - if o == nil || IsNil(o.SourceGatewayPubkey) { - return nil, false - } - return o.SourceGatewayPubkey, true -} - -// HasSourceGatewayPubkey returns a boolean if a field has been set. -func (o *SessionData) HasSourceGatewayPubkey() bool { - if o != nil && !IsNil(o.SourceGatewayPubkey) { - return true - } - - return false -} - -// SetSourceGatewayPubkey gets a reference to the given string and assigns it to the SourceGatewayPubkey field. -func (o *SessionData) SetSourceGatewayPubkey(v string) { - o.SourceGatewayPubkey = &v -} - -// GetSourceGatewayDltSystem returns the SourceGatewayDltSystem field value if set, zero value otherwise. -func (o *SessionData) GetSourceGatewayDltSystem() string { - if o == nil || IsNil(o.SourceGatewayDltSystem) { - var ret string - return ret - } - return *o.SourceGatewayDltSystem -} - -// GetSourceGatewayDltSystemOk returns a tuple with the SourceGatewayDltSystem field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetSourceGatewayDltSystemOk() (*string, bool) { - if o == nil || IsNil(o.SourceGatewayDltSystem) { - return nil, false - } - return o.SourceGatewayDltSystem, true -} - -// HasSourceGatewayDltSystem returns a boolean if a field has been set. -func (o *SessionData) HasSourceGatewayDltSystem() bool { - if o != nil && !IsNil(o.SourceGatewayDltSystem) { - return true - } - - return false -} - -// SetSourceGatewayDltSystem gets a reference to the given string and assigns it to the SourceGatewayDltSystem field. -func (o *SessionData) SetSourceGatewayDltSystem(v string) { - o.SourceGatewayDltSystem = &v -} - -// GetRecipientGatewayPubkey returns the RecipientGatewayPubkey field value if set, zero value otherwise. -func (o *SessionData) GetRecipientGatewayPubkey() string { - if o == nil || IsNil(o.RecipientGatewayPubkey) { - var ret string - return ret - } - return *o.RecipientGatewayPubkey -} - -// GetRecipientGatewayPubkeyOk returns a tuple with the RecipientGatewayPubkey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetRecipientGatewayPubkeyOk() (*string, bool) { - if o == nil || IsNil(o.RecipientGatewayPubkey) { - return nil, false - } - return o.RecipientGatewayPubkey, true -} - -// HasRecipientGatewayPubkey returns a boolean if a field has been set. -func (o *SessionData) HasRecipientGatewayPubkey() bool { - if o != nil && !IsNil(o.RecipientGatewayPubkey) { - return true - } - - return false -} - -// SetRecipientGatewayPubkey gets a reference to the given string and assigns it to the RecipientGatewayPubkey field. -func (o *SessionData) SetRecipientGatewayPubkey(v string) { - o.RecipientGatewayPubkey = &v -} - -// GetRecipientGatewayDltSystem returns the RecipientGatewayDltSystem field value if set, zero value otherwise. -func (o *SessionData) GetRecipientGatewayDltSystem() string { - if o == nil || IsNil(o.RecipientGatewayDltSystem) { - var ret string - return ret - } - return *o.RecipientGatewayDltSystem -} - -// GetRecipientGatewayDltSystemOk returns a tuple with the RecipientGatewayDltSystem field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetRecipientGatewayDltSystemOk() (*string, bool) { - if o == nil || IsNil(o.RecipientGatewayDltSystem) { - return nil, false - } - return o.RecipientGatewayDltSystem, true -} - -// HasRecipientGatewayDltSystem returns a boolean if a field has been set. -func (o *SessionData) HasRecipientGatewayDltSystem() bool { - if o != nil && !IsNil(o.RecipientGatewayDltSystem) { - return true - } - - return false -} - -// SetRecipientGatewayDltSystem gets a reference to the given string and assigns it to the RecipientGatewayDltSystem field. -func (o *SessionData) SetRecipientGatewayDltSystem(v string) { - o.RecipientGatewayDltSystem = &v -} - -// GetInitializationRequestMessageHash returns the InitializationRequestMessageHash field value if set, zero value otherwise. -func (o *SessionData) GetInitializationRequestMessageHash() string { - if o == nil || IsNil(o.InitializationRequestMessageHash) { - var ret string - return ret - } - return *o.InitializationRequestMessageHash -} - -// GetInitializationRequestMessageHashOk returns a tuple with the InitializationRequestMessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetInitializationRequestMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.InitializationRequestMessageHash) { - return nil, false - } - return o.InitializationRequestMessageHash, true -} - -// HasInitializationRequestMessageHash returns a boolean if a field has been set. -func (o *SessionData) HasInitializationRequestMessageHash() bool { - if o != nil && !IsNil(o.InitializationRequestMessageHash) { - return true - } - - return false -} - -// SetInitializationRequestMessageHash gets a reference to the given string and assigns it to the InitializationRequestMessageHash field. -func (o *SessionData) SetInitializationRequestMessageHash(v string) { - o.InitializationRequestMessageHash = &v -} - -// GetInitializationResponseMessageHash returns the InitializationResponseMessageHash field value if set, zero value otherwise. -func (o *SessionData) GetInitializationResponseMessageHash() string { - if o == nil || IsNil(o.InitializationResponseMessageHash) { - var ret string - return ret - } - return *o.InitializationResponseMessageHash -} - -// GetInitializationResponseMessageHashOk returns a tuple with the InitializationResponseMessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetInitializationResponseMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.InitializationResponseMessageHash) { - return nil, false - } - return o.InitializationResponseMessageHash, true -} - -// HasInitializationResponseMessageHash returns a boolean if a field has been set. -func (o *SessionData) HasInitializationResponseMessageHash() bool { - if o != nil && !IsNil(o.InitializationResponseMessageHash) { - return true - } - - return false -} - -// SetInitializationResponseMessageHash gets a reference to the given string and assigns it to the InitializationResponseMessageHash field. -func (o *SessionData) SetInitializationResponseMessageHash(v string) { - o.InitializationResponseMessageHash = &v -} - -// GetInitializationRequestMessageRcvTimeStamp returns the InitializationRequestMessageRcvTimeStamp field value if set, zero value otherwise. -func (o *SessionData) GetInitializationRequestMessageRcvTimeStamp() string { - if o == nil || IsNil(o.InitializationRequestMessageRcvTimeStamp) { - var ret string - return ret - } - return *o.InitializationRequestMessageRcvTimeStamp -} - -// GetInitializationRequestMessageRcvTimeStampOk returns a tuple with the InitializationRequestMessageRcvTimeStamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetInitializationRequestMessageRcvTimeStampOk() (*string, bool) { - if o == nil || IsNil(o.InitializationRequestMessageRcvTimeStamp) { - return nil, false - } - return o.InitializationRequestMessageRcvTimeStamp, true -} - -// HasInitializationRequestMessageRcvTimeStamp returns a boolean if a field has been set. -func (o *SessionData) HasInitializationRequestMessageRcvTimeStamp() bool { - if o != nil && !IsNil(o.InitializationRequestMessageRcvTimeStamp) { - return true - } - - return false -} - -// SetInitializationRequestMessageRcvTimeStamp gets a reference to the given string and assigns it to the InitializationRequestMessageRcvTimeStamp field. -func (o *SessionData) SetInitializationRequestMessageRcvTimeStamp(v string) { - o.InitializationRequestMessageRcvTimeStamp = &v -} - -// GetInitializationRequestMessageProcessedTimeStamp returns the InitializationRequestMessageProcessedTimeStamp field value if set, zero value otherwise. -func (o *SessionData) GetInitializationRequestMessageProcessedTimeStamp() string { - if o == nil || IsNil(o.InitializationRequestMessageProcessedTimeStamp) { - var ret string - return ret - } - return *o.InitializationRequestMessageProcessedTimeStamp -} - -// GetInitializationRequestMessageProcessedTimeStampOk returns a tuple with the InitializationRequestMessageProcessedTimeStamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetInitializationRequestMessageProcessedTimeStampOk() (*string, bool) { - if o == nil || IsNil(o.InitializationRequestMessageProcessedTimeStamp) { - return nil, false - } - return o.InitializationRequestMessageProcessedTimeStamp, true -} - -// HasInitializationRequestMessageProcessedTimeStamp returns a boolean if a field has been set. -func (o *SessionData) HasInitializationRequestMessageProcessedTimeStamp() bool { - if o != nil && !IsNil(o.InitializationRequestMessageProcessedTimeStamp) { - return true - } - - return false -} - -// SetInitializationRequestMessageProcessedTimeStamp gets a reference to the given string and assigns it to the InitializationRequestMessageProcessedTimeStamp field. -func (o *SessionData) SetInitializationRequestMessageProcessedTimeStamp(v string) { - o.InitializationRequestMessageProcessedTimeStamp = &v -} - -// GetClientSignatureInitializationRequestMessage returns the ClientSignatureInitializationRequestMessage field value if set, zero value otherwise. -func (o *SessionData) GetClientSignatureInitializationRequestMessage() string { - if o == nil || IsNil(o.ClientSignatureInitializationRequestMessage) { - var ret string - return ret - } - return *o.ClientSignatureInitializationRequestMessage -} - -// GetClientSignatureInitializationRequestMessageOk returns a tuple with the ClientSignatureInitializationRequestMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetClientSignatureInitializationRequestMessageOk() (*string, bool) { - if o == nil || IsNil(o.ClientSignatureInitializationRequestMessage) { - return nil, false - } - return o.ClientSignatureInitializationRequestMessage, true -} - -// HasClientSignatureInitializationRequestMessage returns a boolean if a field has been set. -func (o *SessionData) HasClientSignatureInitializationRequestMessage() bool { - if o != nil && !IsNil(o.ClientSignatureInitializationRequestMessage) { - return true - } - - return false -} - -// SetClientSignatureInitializationRequestMessage gets a reference to the given string and assigns it to the ClientSignatureInitializationRequestMessage field. -func (o *SessionData) SetClientSignatureInitializationRequestMessage(v string) { - o.ClientSignatureInitializationRequestMessage = &v -} - -// GetServerSignatureInitializationResponseMessage returns the ServerSignatureInitializationResponseMessage field value if set, zero value otherwise. -func (o *SessionData) GetServerSignatureInitializationResponseMessage() string { - if o == nil || IsNil(o.ServerSignatureInitializationResponseMessage) { - var ret string - return ret - } - return *o.ServerSignatureInitializationResponseMessage -} - -// GetServerSignatureInitializationResponseMessageOk returns a tuple with the ServerSignatureInitializationResponseMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetServerSignatureInitializationResponseMessageOk() (*string, bool) { - if o == nil || IsNil(o.ServerSignatureInitializationResponseMessage) { - return nil, false - } - return o.ServerSignatureInitializationResponseMessage, true -} - -// HasServerSignatureInitializationResponseMessage returns a boolean if a field has been set. -func (o *SessionData) HasServerSignatureInitializationResponseMessage() bool { - if o != nil && !IsNil(o.ServerSignatureInitializationResponseMessage) { - return true - } - - return false -} - -// SetServerSignatureInitializationResponseMessage gets a reference to the given string and assigns it to the ServerSignatureInitializationResponseMessage field. -func (o *SessionData) SetServerSignatureInitializationResponseMessage(v string) { - o.ServerSignatureInitializationResponseMessage = &v -} - -// GetTransferCommenceMessageRequestHash returns the TransferCommenceMessageRequestHash field value if set, zero value otherwise. -func (o *SessionData) GetTransferCommenceMessageRequestHash() string { - if o == nil || IsNil(o.TransferCommenceMessageRequestHash) { - var ret string - return ret - } - return *o.TransferCommenceMessageRequestHash -} - -// GetTransferCommenceMessageRequestHashOk returns a tuple with the TransferCommenceMessageRequestHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetTransferCommenceMessageRequestHashOk() (*string, bool) { - if o == nil || IsNil(o.TransferCommenceMessageRequestHash) { - return nil, false - } - return o.TransferCommenceMessageRequestHash, true -} - -// HasTransferCommenceMessageRequestHash returns a boolean if a field has been set. -func (o *SessionData) HasTransferCommenceMessageRequestHash() bool { - if o != nil && !IsNil(o.TransferCommenceMessageRequestHash) { - return true - } - - return false -} - -// SetTransferCommenceMessageRequestHash gets a reference to the given string and assigns it to the TransferCommenceMessageRequestHash field. -func (o *SessionData) SetTransferCommenceMessageRequestHash(v string) { - o.TransferCommenceMessageRequestHash = &v -} - -// GetTransferCommenceMessageResponseHash returns the TransferCommenceMessageResponseHash field value if set, zero value otherwise. -func (o *SessionData) GetTransferCommenceMessageResponseHash() string { - if o == nil || IsNil(o.TransferCommenceMessageResponseHash) { - var ret string - return ret - } - return *o.TransferCommenceMessageResponseHash -} - -// GetTransferCommenceMessageResponseHashOk returns a tuple with the TransferCommenceMessageResponseHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetTransferCommenceMessageResponseHashOk() (*string, bool) { - if o == nil || IsNil(o.TransferCommenceMessageResponseHash) { - return nil, false - } - return o.TransferCommenceMessageResponseHash, true -} - -// HasTransferCommenceMessageResponseHash returns a boolean if a field has been set. -func (o *SessionData) HasTransferCommenceMessageResponseHash() bool { - if o != nil && !IsNil(o.TransferCommenceMessageResponseHash) { - return true - } - - return false -} - -// SetTransferCommenceMessageResponseHash gets a reference to the given string and assigns it to the TransferCommenceMessageResponseHash field. -func (o *SessionData) SetTransferCommenceMessageResponseHash(v string) { - o.TransferCommenceMessageResponseHash = &v -} - -// GetClientSignatureTransferCommenceRequestMessage returns the ClientSignatureTransferCommenceRequestMessage field value if set, zero value otherwise. -func (o *SessionData) GetClientSignatureTransferCommenceRequestMessage() string { - if o == nil || IsNil(o.ClientSignatureTransferCommenceRequestMessage) { - var ret string - return ret - } - return *o.ClientSignatureTransferCommenceRequestMessage -} - -// GetClientSignatureTransferCommenceRequestMessageOk returns a tuple with the ClientSignatureTransferCommenceRequestMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetClientSignatureTransferCommenceRequestMessageOk() (*string, bool) { - if o == nil || IsNil(o.ClientSignatureTransferCommenceRequestMessage) { - return nil, false - } - return o.ClientSignatureTransferCommenceRequestMessage, true -} - -// HasClientSignatureTransferCommenceRequestMessage returns a boolean if a field has been set. -func (o *SessionData) HasClientSignatureTransferCommenceRequestMessage() bool { - if o != nil && !IsNil(o.ClientSignatureTransferCommenceRequestMessage) { - return true - } - - return false -} - -// SetClientSignatureTransferCommenceRequestMessage gets a reference to the given string and assigns it to the ClientSignatureTransferCommenceRequestMessage field. -func (o *SessionData) SetClientSignatureTransferCommenceRequestMessage(v string) { - o.ClientSignatureTransferCommenceRequestMessage = &v -} - -// GetServerSignatureTransferCommenceResponseMessage returns the ServerSignatureTransferCommenceResponseMessage field value if set, zero value otherwise. -func (o *SessionData) GetServerSignatureTransferCommenceResponseMessage() string { - if o == nil || IsNil(o.ServerSignatureTransferCommenceResponseMessage) { - var ret string - return ret - } - return *o.ServerSignatureTransferCommenceResponseMessage -} - -// GetServerSignatureTransferCommenceResponseMessageOk returns a tuple with the ServerSignatureTransferCommenceResponseMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetServerSignatureTransferCommenceResponseMessageOk() (*string, bool) { - if o == nil || IsNil(o.ServerSignatureTransferCommenceResponseMessage) { - return nil, false - } - return o.ServerSignatureTransferCommenceResponseMessage, true -} - -// HasServerSignatureTransferCommenceResponseMessage returns a boolean if a field has been set. -func (o *SessionData) HasServerSignatureTransferCommenceResponseMessage() bool { - if o != nil && !IsNil(o.ServerSignatureTransferCommenceResponseMessage) { - return true - } - - return false -} - -// SetServerSignatureTransferCommenceResponseMessage gets a reference to the given string and assigns it to the ServerSignatureTransferCommenceResponseMessage field. -func (o *SessionData) SetServerSignatureTransferCommenceResponseMessage(v string) { - o.ServerSignatureTransferCommenceResponseMessage = &v -} - -// GetLockEvidenceRequestMessageHash returns the LockEvidenceRequestMessageHash field value if set, zero value otherwise. -func (o *SessionData) GetLockEvidenceRequestMessageHash() string { - if o == nil || IsNil(o.LockEvidenceRequestMessageHash) { - var ret string - return ret - } - return *o.LockEvidenceRequestMessageHash -} - -// GetLockEvidenceRequestMessageHashOk returns a tuple with the LockEvidenceRequestMessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetLockEvidenceRequestMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.LockEvidenceRequestMessageHash) { - return nil, false - } - return o.LockEvidenceRequestMessageHash, true -} - -// HasLockEvidenceRequestMessageHash returns a boolean if a field has been set. -func (o *SessionData) HasLockEvidenceRequestMessageHash() bool { - if o != nil && !IsNil(o.LockEvidenceRequestMessageHash) { - return true - } - - return false -} - -// SetLockEvidenceRequestMessageHash gets a reference to the given string and assigns it to the LockEvidenceRequestMessageHash field. -func (o *SessionData) SetLockEvidenceRequestMessageHash(v string) { - o.LockEvidenceRequestMessageHash = &v -} - -// GetLockEvidenceResponseMessageHash returns the LockEvidenceResponseMessageHash field value if set, zero value otherwise. -func (o *SessionData) GetLockEvidenceResponseMessageHash() string { - if o == nil || IsNil(o.LockEvidenceResponseMessageHash) { - var ret string - return ret - } - return *o.LockEvidenceResponseMessageHash -} - -// GetLockEvidenceResponseMessageHashOk returns a tuple with the LockEvidenceResponseMessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetLockEvidenceResponseMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.LockEvidenceResponseMessageHash) { - return nil, false - } - return o.LockEvidenceResponseMessageHash, true -} - -// HasLockEvidenceResponseMessageHash returns a boolean if a field has been set. -func (o *SessionData) HasLockEvidenceResponseMessageHash() bool { - if o != nil && !IsNil(o.LockEvidenceResponseMessageHash) { - return true - } - - return false -} - -// SetLockEvidenceResponseMessageHash gets a reference to the given string and assigns it to the LockEvidenceResponseMessageHash field. -func (o *SessionData) SetLockEvidenceResponseMessageHash(v string) { - o.LockEvidenceResponseMessageHash = &v -} - -// GetClientSignatureLockEvidenceRequestMessage returns the ClientSignatureLockEvidenceRequestMessage field value if set, zero value otherwise. -func (o *SessionData) GetClientSignatureLockEvidenceRequestMessage() string { - if o == nil || IsNil(o.ClientSignatureLockEvidenceRequestMessage) { - var ret string - return ret - } - return *o.ClientSignatureLockEvidenceRequestMessage -} - -// GetClientSignatureLockEvidenceRequestMessageOk returns a tuple with the ClientSignatureLockEvidenceRequestMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetClientSignatureLockEvidenceRequestMessageOk() (*string, bool) { - if o == nil || IsNil(o.ClientSignatureLockEvidenceRequestMessage) { - return nil, false - } - return o.ClientSignatureLockEvidenceRequestMessage, true -} - -// HasClientSignatureLockEvidenceRequestMessage returns a boolean if a field has been set. -func (o *SessionData) HasClientSignatureLockEvidenceRequestMessage() bool { - if o != nil && !IsNil(o.ClientSignatureLockEvidenceRequestMessage) { - return true - } - - return false -} - -// SetClientSignatureLockEvidenceRequestMessage gets a reference to the given string and assigns it to the ClientSignatureLockEvidenceRequestMessage field. -func (o *SessionData) SetClientSignatureLockEvidenceRequestMessage(v string) { - o.ClientSignatureLockEvidenceRequestMessage = &v -} - -// GetServerSignatureLockEvidenceResponseMessage returns the ServerSignatureLockEvidenceResponseMessage field value if set, zero value otherwise. -func (o *SessionData) GetServerSignatureLockEvidenceResponseMessage() string { - if o == nil || IsNil(o.ServerSignatureLockEvidenceResponseMessage) { - var ret string - return ret - } - return *o.ServerSignatureLockEvidenceResponseMessage -} - -// GetServerSignatureLockEvidenceResponseMessageOk returns a tuple with the ServerSignatureLockEvidenceResponseMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetServerSignatureLockEvidenceResponseMessageOk() (*string, bool) { - if o == nil || IsNil(o.ServerSignatureLockEvidenceResponseMessage) { - return nil, false - } - return o.ServerSignatureLockEvidenceResponseMessage, true -} - -// HasServerSignatureLockEvidenceResponseMessage returns a boolean if a field has been set. -func (o *SessionData) HasServerSignatureLockEvidenceResponseMessage() bool { - if o != nil && !IsNil(o.ServerSignatureLockEvidenceResponseMessage) { - return true - } - - return false -} - -// SetServerSignatureLockEvidenceResponseMessage gets a reference to the given string and assigns it to the ServerSignatureLockEvidenceResponseMessage field. -func (o *SessionData) SetServerSignatureLockEvidenceResponseMessage(v string) { - o.ServerSignatureLockEvidenceResponseMessage = &v -} - -// GetLockEvidenceClaim returns the LockEvidenceClaim field value if set, zero value otherwise. -func (o *SessionData) GetLockEvidenceClaim() string { - if o == nil || IsNil(o.LockEvidenceClaim) { - var ret string - return ret - } - return *o.LockEvidenceClaim -} - -// GetLockEvidenceClaimOk returns a tuple with the LockEvidenceClaim field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetLockEvidenceClaimOk() (*string, bool) { - if o == nil || IsNil(o.LockEvidenceClaim) { - return nil, false - } - return o.LockEvidenceClaim, true -} - -// HasLockEvidenceClaim returns a boolean if a field has been set. -func (o *SessionData) HasLockEvidenceClaim() bool { - if o != nil && !IsNil(o.LockEvidenceClaim) { - return true - } - - return false -} - -// SetLockEvidenceClaim gets a reference to the given string and assigns it to the LockEvidenceClaim field. -func (o *SessionData) SetLockEvidenceClaim(v string) { - o.LockEvidenceClaim = &v -} - -// GetCommitPrepareRequestMessageHash returns the CommitPrepareRequestMessageHash field value if set, zero value otherwise. -func (o *SessionData) GetCommitPrepareRequestMessageHash() string { - if o == nil || IsNil(o.CommitPrepareRequestMessageHash) { - var ret string - return ret - } - return *o.CommitPrepareRequestMessageHash -} - -// GetCommitPrepareRequestMessageHashOk returns a tuple with the CommitPrepareRequestMessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetCommitPrepareRequestMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.CommitPrepareRequestMessageHash) { - return nil, false - } - return o.CommitPrepareRequestMessageHash, true -} - -// HasCommitPrepareRequestMessageHash returns a boolean if a field has been set. -func (o *SessionData) HasCommitPrepareRequestMessageHash() bool { - if o != nil && !IsNil(o.CommitPrepareRequestMessageHash) { - return true - } - - return false -} - -// SetCommitPrepareRequestMessageHash gets a reference to the given string and assigns it to the CommitPrepareRequestMessageHash field. -func (o *SessionData) SetCommitPrepareRequestMessageHash(v string) { - o.CommitPrepareRequestMessageHash = &v -} - -// GetCommitPrepareResponseMessageHash returns the CommitPrepareResponseMessageHash field value if set, zero value otherwise. -func (o *SessionData) GetCommitPrepareResponseMessageHash() string { - if o == nil || IsNil(o.CommitPrepareResponseMessageHash) { - var ret string - return ret - } - return *o.CommitPrepareResponseMessageHash -} - -// GetCommitPrepareResponseMessageHashOk returns a tuple with the CommitPrepareResponseMessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetCommitPrepareResponseMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.CommitPrepareResponseMessageHash) { - return nil, false - } - return o.CommitPrepareResponseMessageHash, true -} - -// HasCommitPrepareResponseMessageHash returns a boolean if a field has been set. -func (o *SessionData) HasCommitPrepareResponseMessageHash() bool { - if o != nil && !IsNil(o.CommitPrepareResponseMessageHash) { - return true - } - - return false -} - -// SetCommitPrepareResponseMessageHash gets a reference to the given string and assigns it to the CommitPrepareResponseMessageHash field. -func (o *SessionData) SetCommitPrepareResponseMessageHash(v string) { - o.CommitPrepareResponseMessageHash = &v -} - -// GetClientSignatureCommitPreparationRequestMessage returns the ClientSignatureCommitPreparationRequestMessage field value if set, zero value otherwise. -func (o *SessionData) GetClientSignatureCommitPreparationRequestMessage() string { - if o == nil || IsNil(o.ClientSignatureCommitPreparationRequestMessage) { - var ret string - return ret - } - return *o.ClientSignatureCommitPreparationRequestMessage -} - -// GetClientSignatureCommitPreparationRequestMessageOk returns a tuple with the ClientSignatureCommitPreparationRequestMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetClientSignatureCommitPreparationRequestMessageOk() (*string, bool) { - if o == nil || IsNil(o.ClientSignatureCommitPreparationRequestMessage) { - return nil, false - } - return o.ClientSignatureCommitPreparationRequestMessage, true -} - -// HasClientSignatureCommitPreparationRequestMessage returns a boolean if a field has been set. -func (o *SessionData) HasClientSignatureCommitPreparationRequestMessage() bool { - if o != nil && !IsNil(o.ClientSignatureCommitPreparationRequestMessage) { - return true - } - - return false -} - -// SetClientSignatureCommitPreparationRequestMessage gets a reference to the given string and assigns it to the ClientSignatureCommitPreparationRequestMessage field. -func (o *SessionData) SetClientSignatureCommitPreparationRequestMessage(v string) { - o.ClientSignatureCommitPreparationRequestMessage = &v -} - -// GetServerSignatureCommitPreparationResponseMessage returns the ServerSignatureCommitPreparationResponseMessage field value if set, zero value otherwise. -func (o *SessionData) GetServerSignatureCommitPreparationResponseMessage() string { - if o == nil || IsNil(o.ServerSignatureCommitPreparationResponseMessage) { - var ret string - return ret - } - return *o.ServerSignatureCommitPreparationResponseMessage -} - -// GetServerSignatureCommitPreparationResponseMessageOk returns a tuple with the ServerSignatureCommitPreparationResponseMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetServerSignatureCommitPreparationResponseMessageOk() (*string, bool) { - if o == nil || IsNil(o.ServerSignatureCommitPreparationResponseMessage) { - return nil, false - } - return o.ServerSignatureCommitPreparationResponseMessage, true -} - -// HasServerSignatureCommitPreparationResponseMessage returns a boolean if a field has been set. -func (o *SessionData) HasServerSignatureCommitPreparationResponseMessage() bool { - if o != nil && !IsNil(o.ServerSignatureCommitPreparationResponseMessage) { - return true - } - - return false -} - -// SetServerSignatureCommitPreparationResponseMessage gets a reference to the given string and assigns it to the ServerSignatureCommitPreparationResponseMessage field. -func (o *SessionData) SetServerSignatureCommitPreparationResponseMessage(v string) { - o.ServerSignatureCommitPreparationResponseMessage = &v -} - -// GetCommitFinalRequestMessageHash returns the CommitFinalRequestMessageHash field value if set, zero value otherwise. -func (o *SessionData) GetCommitFinalRequestMessageHash() string { - if o == nil || IsNil(o.CommitFinalRequestMessageHash) { - var ret string - return ret - } - return *o.CommitFinalRequestMessageHash -} - -// GetCommitFinalRequestMessageHashOk returns a tuple with the CommitFinalRequestMessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetCommitFinalRequestMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.CommitFinalRequestMessageHash) { - return nil, false - } - return o.CommitFinalRequestMessageHash, true -} - -// HasCommitFinalRequestMessageHash returns a boolean if a field has been set. -func (o *SessionData) HasCommitFinalRequestMessageHash() bool { - if o != nil && !IsNil(o.CommitFinalRequestMessageHash) { - return true - } - - return false -} - -// SetCommitFinalRequestMessageHash gets a reference to the given string and assigns it to the CommitFinalRequestMessageHash field. -func (o *SessionData) SetCommitFinalRequestMessageHash(v string) { - o.CommitFinalRequestMessageHash = &v -} - -// GetCommitFinalResponseMessageHash returns the CommitFinalResponseMessageHash field value if set, zero value otherwise. -func (o *SessionData) GetCommitFinalResponseMessageHash() string { - if o == nil || IsNil(o.CommitFinalResponseMessageHash) { - var ret string - return ret - } - return *o.CommitFinalResponseMessageHash -} - -// GetCommitFinalResponseMessageHashOk returns a tuple with the CommitFinalResponseMessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetCommitFinalResponseMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.CommitFinalResponseMessageHash) { - return nil, false - } - return o.CommitFinalResponseMessageHash, true -} - -// HasCommitFinalResponseMessageHash returns a boolean if a field has been set. -func (o *SessionData) HasCommitFinalResponseMessageHash() bool { - if o != nil && !IsNil(o.CommitFinalResponseMessageHash) { - return true - } - - return false -} - -// SetCommitFinalResponseMessageHash gets a reference to the given string and assigns it to the CommitFinalResponseMessageHash field. -func (o *SessionData) SetCommitFinalResponseMessageHash(v string) { - o.CommitFinalResponseMessageHash = &v -} - -// GetCommitFinalClaim returns the CommitFinalClaim field value if set, zero value otherwise. -func (o *SessionData) GetCommitFinalClaim() string { - if o == nil || IsNil(o.CommitFinalClaim) { - var ret string - return ret - } - return *o.CommitFinalClaim -} - -// GetCommitFinalClaimOk returns a tuple with the CommitFinalClaim field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetCommitFinalClaimOk() (*string, bool) { - if o == nil || IsNil(o.CommitFinalClaim) { - return nil, false - } - return o.CommitFinalClaim, true -} - -// HasCommitFinalClaim returns a boolean if a field has been set. -func (o *SessionData) HasCommitFinalClaim() bool { - if o != nil && !IsNil(o.CommitFinalClaim) { - return true - } - - return false -} - -// SetCommitFinalClaim gets a reference to the given string and assigns it to the CommitFinalClaim field. -func (o *SessionData) SetCommitFinalClaim(v string) { - o.CommitFinalClaim = &v -} - -// GetCommitFinalClaimFormat returns the CommitFinalClaimFormat field value if set, zero value otherwise. -func (o *SessionData) GetCommitFinalClaimFormat() string { - if o == nil || IsNil(o.CommitFinalClaimFormat) { - var ret string - return ret - } - return *o.CommitFinalClaimFormat -} - -// GetCommitFinalClaimFormatOk returns a tuple with the CommitFinalClaimFormat field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetCommitFinalClaimFormatOk() (*string, bool) { - if o == nil || IsNil(o.CommitFinalClaimFormat) { - return nil, false - } - return o.CommitFinalClaimFormat, true -} - -// HasCommitFinalClaimFormat returns a boolean if a field has been set. -func (o *SessionData) HasCommitFinalClaimFormat() bool { - if o != nil && !IsNil(o.CommitFinalClaimFormat) { - return true - } - - return false -} - -// SetCommitFinalClaimFormat gets a reference to the given string and assigns it to the CommitFinalClaimFormat field. -func (o *SessionData) SetCommitFinalClaimFormat(v string) { - o.CommitFinalClaimFormat = &v -} - -// GetCommitAcknowledgementClaim returns the CommitAcknowledgementClaim field value if set, zero value otherwise. -func (o *SessionData) GetCommitAcknowledgementClaim() string { - if o == nil || IsNil(o.CommitAcknowledgementClaim) { - var ret string - return ret - } - return *o.CommitAcknowledgementClaim -} - -// GetCommitAcknowledgementClaimOk returns a tuple with the CommitAcknowledgementClaim field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetCommitAcknowledgementClaimOk() (*string, bool) { - if o == nil || IsNil(o.CommitAcknowledgementClaim) { - return nil, false - } - return o.CommitAcknowledgementClaim, true -} - -// HasCommitAcknowledgementClaim returns a boolean if a field has been set. -func (o *SessionData) HasCommitAcknowledgementClaim() bool { - if o != nil && !IsNil(o.CommitAcknowledgementClaim) { - return true - } - - return false -} - -// SetCommitAcknowledgementClaim gets a reference to the given string and assigns it to the CommitAcknowledgementClaim field. -func (o *SessionData) SetCommitAcknowledgementClaim(v string) { - o.CommitAcknowledgementClaim = &v -} - -// GetCommitAcknowledgementClaimFormat returns the CommitAcknowledgementClaimFormat field value if set, zero value otherwise. -func (o *SessionData) GetCommitAcknowledgementClaimFormat() string { - if o == nil || IsNil(o.CommitAcknowledgementClaimFormat) { - var ret string - return ret - } - return *o.CommitAcknowledgementClaimFormat -} - -// GetCommitAcknowledgementClaimFormatOk returns a tuple with the CommitAcknowledgementClaimFormat field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetCommitAcknowledgementClaimFormatOk() (*string, bool) { - if o == nil || IsNil(o.CommitAcknowledgementClaimFormat) { - return nil, false - } - return o.CommitAcknowledgementClaimFormat, true -} - -// HasCommitAcknowledgementClaimFormat returns a boolean if a field has been set. -func (o *SessionData) HasCommitAcknowledgementClaimFormat() bool { - if o != nil && !IsNil(o.CommitAcknowledgementClaimFormat) { - return true - } - - return false -} - -// SetCommitAcknowledgementClaimFormat gets a reference to the given string and assigns it to the CommitAcknowledgementClaimFormat field. -func (o *SessionData) SetCommitAcknowledgementClaimFormat(v string) { - o.CommitAcknowledgementClaimFormat = &v -} - -// GetClientSignatureCommitFinalRequestMessage returns the ClientSignatureCommitFinalRequestMessage field value if set, zero value otherwise. -func (o *SessionData) GetClientSignatureCommitFinalRequestMessage() string { - if o == nil || IsNil(o.ClientSignatureCommitFinalRequestMessage) { - var ret string - return ret - } - return *o.ClientSignatureCommitFinalRequestMessage -} - -// GetClientSignatureCommitFinalRequestMessageOk returns a tuple with the ClientSignatureCommitFinalRequestMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetClientSignatureCommitFinalRequestMessageOk() (*string, bool) { - if o == nil || IsNil(o.ClientSignatureCommitFinalRequestMessage) { - return nil, false - } - return o.ClientSignatureCommitFinalRequestMessage, true -} - -// HasClientSignatureCommitFinalRequestMessage returns a boolean if a field has been set. -func (o *SessionData) HasClientSignatureCommitFinalRequestMessage() bool { - if o != nil && !IsNil(o.ClientSignatureCommitFinalRequestMessage) { - return true - } - - return false -} - -// SetClientSignatureCommitFinalRequestMessage gets a reference to the given string and assigns it to the ClientSignatureCommitFinalRequestMessage field. -func (o *SessionData) SetClientSignatureCommitFinalRequestMessage(v string) { - o.ClientSignatureCommitFinalRequestMessage = &v -} - -// GetServerSignatureCommitFinalResponseMessage returns the ServerSignatureCommitFinalResponseMessage field value if set, zero value otherwise. -func (o *SessionData) GetServerSignatureCommitFinalResponseMessage() string { - if o == nil || IsNil(o.ServerSignatureCommitFinalResponseMessage) { - var ret string - return ret - } - return *o.ServerSignatureCommitFinalResponseMessage -} - -// GetServerSignatureCommitFinalResponseMessageOk returns a tuple with the ServerSignatureCommitFinalResponseMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetServerSignatureCommitFinalResponseMessageOk() (*string, bool) { - if o == nil || IsNil(o.ServerSignatureCommitFinalResponseMessage) { - return nil, false - } - return o.ServerSignatureCommitFinalResponseMessage, true -} - -// HasServerSignatureCommitFinalResponseMessage returns a boolean if a field has been set. -func (o *SessionData) HasServerSignatureCommitFinalResponseMessage() bool { - if o != nil && !IsNil(o.ServerSignatureCommitFinalResponseMessage) { - return true - } - - return false -} - -// SetServerSignatureCommitFinalResponseMessage gets a reference to the given string and assigns it to the ServerSignatureCommitFinalResponseMessage field. -func (o *SessionData) SetServerSignatureCommitFinalResponseMessage(v string) { - o.ServerSignatureCommitFinalResponseMessage = &v -} - -// GetTransferCompleteMessageHash returns the TransferCompleteMessageHash field value if set, zero value otherwise. -func (o *SessionData) GetTransferCompleteMessageHash() string { - if o == nil || IsNil(o.TransferCompleteMessageHash) { - var ret string - return ret - } - return *o.TransferCompleteMessageHash -} - -// GetTransferCompleteMessageHashOk returns a tuple with the TransferCompleteMessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetTransferCompleteMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.TransferCompleteMessageHash) { - return nil, false - } - return o.TransferCompleteMessageHash, true -} - -// HasTransferCompleteMessageHash returns a boolean if a field has been set. -func (o *SessionData) HasTransferCompleteMessageHash() bool { - if o != nil && !IsNil(o.TransferCompleteMessageHash) { - return true - } - - return false -} - -// SetTransferCompleteMessageHash gets a reference to the given string and assigns it to the TransferCompleteMessageHash field. -func (o *SessionData) SetTransferCompleteMessageHash(v string) { - o.TransferCompleteMessageHash = &v -} - -// GetClientSignatureTransferCompleteMessage returns the ClientSignatureTransferCompleteMessage field value if set, zero value otherwise. -func (o *SessionData) GetClientSignatureTransferCompleteMessage() string { - if o == nil || IsNil(o.ClientSignatureTransferCompleteMessage) { - var ret string - return ret - } - return *o.ClientSignatureTransferCompleteMessage -} - -// GetClientSignatureTransferCompleteMessageOk returns a tuple with the ClientSignatureTransferCompleteMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetClientSignatureTransferCompleteMessageOk() (*string, bool) { - if o == nil || IsNil(o.ClientSignatureTransferCompleteMessage) { - return nil, false - } - return o.ClientSignatureTransferCompleteMessage, true -} - -// HasClientSignatureTransferCompleteMessage returns a boolean if a field has been set. -func (o *SessionData) HasClientSignatureTransferCompleteMessage() bool { - if o != nil && !IsNil(o.ClientSignatureTransferCompleteMessage) { - return true - } - - return false -} - -// SetClientSignatureTransferCompleteMessage gets a reference to the given string and assigns it to the ClientSignatureTransferCompleteMessage field. -func (o *SessionData) SetClientSignatureTransferCompleteMessage(v string) { - o.ClientSignatureTransferCompleteMessage = &v -} - -// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise. -func (o *SessionData) GetMaxRetries() float32 { - if o == nil || IsNil(o.MaxRetries) { - var ret float32 - return ret - } - return *o.MaxRetries -} - -// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetMaxRetriesOk() (*float32, bool) { - if o == nil || IsNil(o.MaxRetries) { - return nil, false - } - return o.MaxRetries, true -} - -// HasMaxRetries returns a boolean if a field has been set. -func (o *SessionData) HasMaxRetries() bool { - if o != nil && !IsNil(o.MaxRetries) { - return true - } - - return false -} - -// SetMaxRetries gets a reference to the given float32 and assigns it to the MaxRetries field. -func (o *SessionData) SetMaxRetries(v float32) { - o.MaxRetries = &v -} - -// GetRecipientLedgerAssetID returns the RecipientLedgerAssetID field value if set, zero value otherwise. -func (o *SessionData) GetRecipientLedgerAssetID() string { - if o == nil || IsNil(o.RecipientLedgerAssetID) { - var ret string - return ret - } - return *o.RecipientLedgerAssetID -} - -// GetRecipientLedgerAssetIDOk returns a tuple with the RecipientLedgerAssetID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetRecipientLedgerAssetIDOk() (*string, bool) { - if o == nil || IsNil(o.RecipientLedgerAssetID) { - return nil, false - } - return o.RecipientLedgerAssetID, true -} - -// HasRecipientLedgerAssetID returns a boolean if a field has been set. -func (o *SessionData) HasRecipientLedgerAssetID() bool { - if o != nil && !IsNil(o.RecipientLedgerAssetID) { - return true - } - - return false -} - -// SetRecipientLedgerAssetID gets a reference to the given string and assigns it to the RecipientLedgerAssetID field. -func (o *SessionData) SetRecipientLedgerAssetID(v string) { - o.RecipientLedgerAssetID = &v -} - -// GetSourceLedgerAssetID returns the SourceLedgerAssetID field value if set, zero value otherwise. -func (o *SessionData) GetSourceLedgerAssetID() string { - if o == nil || IsNil(o.SourceLedgerAssetID) { - var ret string - return ret - } - return *o.SourceLedgerAssetID -} - -// GetSourceLedgerAssetIDOk returns a tuple with the SourceLedgerAssetID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetSourceLedgerAssetIDOk() (*string, bool) { - if o == nil || IsNil(o.SourceLedgerAssetID) { - return nil, false - } - return o.SourceLedgerAssetID, true -} - -// HasSourceLedgerAssetID returns a boolean if a field has been set. -func (o *SessionData) HasSourceLedgerAssetID() bool { - if o != nil && !IsNil(o.SourceLedgerAssetID) { - return true - } - - return false -} - -// SetSourceLedgerAssetID gets a reference to the given string and assigns it to the SourceLedgerAssetID field. -func (o *SessionData) SetSourceLedgerAssetID(v string) { - o.SourceLedgerAssetID = &v -} - -// GetMaxTimeout returns the MaxTimeout field value if set, zero value otherwise. -func (o *SessionData) GetMaxTimeout() float32 { - if o == nil || IsNil(o.MaxTimeout) { - var ret float32 - return ret - } - return *o.MaxTimeout -} - -// GetMaxTimeoutOk returns a tuple with the MaxTimeout field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetMaxTimeoutOk() (*float32, bool) { - if o == nil || IsNil(o.MaxTimeout) { - return nil, false - } - return o.MaxTimeout, true -} - -// HasMaxTimeout returns a boolean if a field has been set. -func (o *SessionData) HasMaxTimeout() bool { - if o != nil && !IsNil(o.MaxTimeout) { - return true - } - - return false -} - -// SetMaxTimeout gets a reference to the given float32 and assigns it to the MaxTimeout field. -func (o *SessionData) SetMaxTimeout(v float32) { - o.MaxTimeout = &v -} - -// GetLastLogEntryTimestamp returns the LastLogEntryTimestamp field value if set, zero value otherwise. -func (o *SessionData) GetLastLogEntryTimestamp() string { - if o == nil || IsNil(o.LastLogEntryTimestamp) { - var ret string - return ret - } - return *o.LastLogEntryTimestamp -} - -// GetLastLogEntryTimestampOk returns a tuple with the LastLogEntryTimestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetLastLogEntryTimestampOk() (*string, bool) { - if o == nil || IsNil(o.LastLogEntryTimestamp) { - return nil, false - } - return o.LastLogEntryTimestamp, true -} - -// HasLastLogEntryTimestamp returns a boolean if a field has been set. -func (o *SessionData) HasLastLogEntryTimestamp() bool { - if o != nil && !IsNil(o.LastLogEntryTimestamp) { - return true - } - - return false -} - -// SetLastLogEntryTimestamp gets a reference to the given string and assigns it to the LastLogEntryTimestamp field. -func (o *SessionData) SetLastLogEntryTimestamp(v string) { - o.LastLogEntryTimestamp = &v -} - -// GetUnlockAssetClaim returns the UnlockAssetClaim field value if set, zero value otherwise. -func (o *SessionData) GetUnlockAssetClaim() string { - if o == nil || IsNil(o.UnlockAssetClaim) { - var ret string - return ret - } - return *o.UnlockAssetClaim -} - -// GetUnlockAssetClaimOk returns a tuple with the UnlockAssetClaim field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetUnlockAssetClaimOk() (*string, bool) { - if o == nil || IsNil(o.UnlockAssetClaim) { - return nil, false - } - return o.UnlockAssetClaim, true -} - -// HasUnlockAssetClaim returns a boolean if a field has been set. -func (o *SessionData) HasUnlockAssetClaim() bool { - if o != nil && !IsNil(o.UnlockAssetClaim) { - return true - } - - return false -} - -// SetUnlockAssetClaim gets a reference to the given string and assigns it to the UnlockAssetClaim field. -func (o *SessionData) SetUnlockAssetClaim(v string) { - o.UnlockAssetClaim = &v -} - -// GetRecreateAssetClaim returns the RecreateAssetClaim field value if set, zero value otherwise. -func (o *SessionData) GetRecreateAssetClaim() string { - if o == nil || IsNil(o.RecreateAssetClaim) { - var ret string - return ret - } - return *o.RecreateAssetClaim -} - -// GetRecreateAssetClaimOk returns a tuple with the RecreateAssetClaim field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetRecreateAssetClaimOk() (*string, bool) { - if o == nil || IsNil(o.RecreateAssetClaim) { - return nil, false - } - return o.RecreateAssetClaim, true -} - -// HasRecreateAssetClaim returns a boolean if a field has been set. -func (o *SessionData) HasRecreateAssetClaim() bool { - if o != nil && !IsNil(o.RecreateAssetClaim) { - return true - } - - return false -} - -// SetRecreateAssetClaim gets a reference to the given string and assigns it to the RecreateAssetClaim field. -func (o *SessionData) SetRecreateAssetClaim(v string) { - o.RecreateAssetClaim = &v -} - -// GetDeleteAssetClaim returns the DeleteAssetClaim field value if set, zero value otherwise. -func (o *SessionData) GetDeleteAssetClaim() string { - if o == nil || IsNil(o.DeleteAssetClaim) { - var ret string - return ret - } - return *o.DeleteAssetClaim -} - -// GetDeleteAssetClaimOk returns a tuple with the DeleteAssetClaim field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetDeleteAssetClaimOk() (*string, bool) { - if o == nil || IsNil(o.DeleteAssetClaim) { - return nil, false - } - return o.DeleteAssetClaim, true -} - -// HasDeleteAssetClaim returns a boolean if a field has been set. -func (o *SessionData) HasDeleteAssetClaim() bool { - if o != nil && !IsNil(o.DeleteAssetClaim) { - return true - } - - return false -} - -// SetDeleteAssetClaim gets a reference to the given string and assigns it to the DeleteAssetClaim field. -func (o *SessionData) SetDeleteAssetClaim(v string) { - o.DeleteAssetClaim = &v -} - -// GetLastMessageReceivedTimestamp returns the LastMessageReceivedTimestamp field value if set, zero value otherwise. -func (o *SessionData) GetLastMessageReceivedTimestamp() string { - if o == nil || IsNil(o.LastMessageReceivedTimestamp) { - var ret string - return ret - } - return *o.LastMessageReceivedTimestamp -} - -// GetLastMessageReceivedTimestampOk returns a tuple with the LastMessageReceivedTimestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetLastMessageReceivedTimestampOk() (*string, bool) { - if o == nil || IsNil(o.LastMessageReceivedTimestamp) { - return nil, false - } - return o.LastMessageReceivedTimestamp, true -} - -// HasLastMessageReceivedTimestamp returns a boolean if a field has been set. -func (o *SessionData) HasLastMessageReceivedTimestamp() bool { - if o != nil && !IsNil(o.LastMessageReceivedTimestamp) { - return true - } - - return false -} - -// SetLastMessageReceivedTimestamp gets a reference to the given string and assigns it to the LastMessageReceivedTimestamp field. -func (o *SessionData) SetLastMessageReceivedTimestamp(v string) { - o.LastMessageReceivedTimestamp = &v -} - -// GetRollback returns the Rollback field value if set, zero value otherwise. -func (o *SessionData) GetRollback() bool { - if o == nil || IsNil(o.Rollback) { - var ret bool - return ret - } - return *o.Rollback -} - -// GetRollbackOk returns a tuple with the Rollback field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetRollbackOk() (*bool, bool) { - if o == nil || IsNil(o.Rollback) { - return nil, false - } - return o.Rollback, true -} - -// HasRollback returns a boolean if a field has been set. -func (o *SessionData) HasRollback() bool { - if o != nil && !IsNil(o.Rollback) { - return true - } - - return false -} - -// SetRollback gets a reference to the given bool and assigns it to the Rollback field. -func (o *SessionData) SetRollback(v bool) { - o.Rollback = &v -} - -// GetRollbackMessageHash returns the RollbackMessageHash field value if set, zero value otherwise. -func (o *SessionData) GetRollbackMessageHash() string { - if o == nil || IsNil(o.RollbackMessageHash) { - var ret string - return ret - } - return *o.RollbackMessageHash -} - -// GetRollbackMessageHashOk returns a tuple with the RollbackMessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetRollbackMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.RollbackMessageHash) { - return nil, false - } - return o.RollbackMessageHash, true -} - -// HasRollbackMessageHash returns a boolean if a field has been set. -func (o *SessionData) HasRollbackMessageHash() bool { - if o != nil && !IsNil(o.RollbackMessageHash) { - return true - } - - return false -} - -// SetRollbackMessageHash gets a reference to the given string and assigns it to the RollbackMessageHash field. -func (o *SessionData) SetRollbackMessageHash(v string) { - o.RollbackMessageHash = &v -} - -// GetRollbackProofs returns the RollbackProofs field value if set, zero value otherwise. -func (o *SessionData) GetRollbackProofs() []string { - if o == nil || IsNil(o.RollbackProofs) { - var ret []string - return ret - } - return o.RollbackProofs -} - -// GetRollbackProofsOk returns a tuple with the RollbackProofs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetRollbackProofsOk() ([]string, bool) { - if o == nil || IsNil(o.RollbackProofs) { - return nil, false - } - return o.RollbackProofs, true -} - -// HasRollbackProofs returns a boolean if a field has been set. -func (o *SessionData) HasRollbackProofs() bool { - if o != nil && !IsNil(o.RollbackProofs) { - return true - } - - return false -} - -// SetRollbackProofs gets a reference to the given []string and assigns it to the RollbackProofs field. -func (o *SessionData) SetRollbackProofs(v []string) { - o.RollbackProofs = v -} - -// GetRollbackActionsPerformed returns the RollbackActionsPerformed field value if set, zero value otherwise. -func (o *SessionData) GetRollbackActionsPerformed() []string { - if o == nil || IsNil(o.RollbackActionsPerformed) { - var ret []string - return ret - } - return o.RollbackActionsPerformed -} - -// GetRollbackActionsPerformedOk returns a tuple with the RollbackActionsPerformed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SessionData) GetRollbackActionsPerformedOk() ([]string, bool) { - if o == nil || IsNil(o.RollbackActionsPerformed) { - return nil, false - } - return o.RollbackActionsPerformed, true -} - -// HasRollbackActionsPerformed returns a boolean if a field has been set. -func (o *SessionData) HasRollbackActionsPerformed() bool { - if o != nil && !IsNil(o.RollbackActionsPerformed) { - return true - } - - return false -} - -// SetRollbackActionsPerformed gets a reference to the given []string and assigns it to the RollbackActionsPerformed field. -func (o *SessionData) SetRollbackActionsPerformed(v []string) { - o.RollbackActionsPerformed = v -} - -func (o SessionData) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SessionData) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Step) { - toSerialize["step"] = o.Step - } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version - } - if !IsNil(o.LastSequenceNumber) { - toSerialize["lastSequenceNumber"] = o.LastSequenceNumber - } - if !IsNil(o.LoggingProfile) { - toSerialize["loggingProfile"] = o.LoggingProfile - } - if !IsNil(o.AccessControlProfile) { - toSerialize["accessControlProfile"] = o.AccessControlProfile - } - if !IsNil(o.ApplicationProfile) { - toSerialize["applicationProfile"] = o.ApplicationProfile - } - if !IsNil(o.PayloadProfile) { - toSerialize["payloadProfile"] = o.PayloadProfile - } - if !IsNil(o.AssetProfile) { - toSerialize["assetProfile"] = o.AssetProfile - } - if !IsNil(o.AllowedSourceBackupGateways) { - toSerialize["allowedSourceBackupGateways"] = o.AllowedSourceBackupGateways - } - if !IsNil(o.AllowedRecipientBackupGateways) { - toSerialize["allowedRecipientBackupGateways"] = o.AllowedRecipientBackupGateways - } - if !IsNil(o.SourceBasePath) { - toSerialize["sourceBasePath"] = o.SourceBasePath - } - if !IsNil(o.RecipientBasePath) { - toSerialize["recipientBasePath"] = o.RecipientBasePath - } - if !IsNil(o.OriginatorPubkey) { - toSerialize["originatorPubkey"] = o.OriginatorPubkey - } - if !IsNil(o.BeneficiaryPubkey) { - toSerialize["beneficiaryPubkey"] = o.BeneficiaryPubkey - } - if !IsNil(o.SourceGatewayPubkey) { - toSerialize["sourceGatewayPubkey"] = o.SourceGatewayPubkey - } - if !IsNil(o.SourceGatewayDltSystem) { - toSerialize["sourceGatewayDltSystem"] = o.SourceGatewayDltSystem - } - if !IsNil(o.RecipientGatewayPubkey) { - toSerialize["recipientGatewayPubkey"] = o.RecipientGatewayPubkey - } - if !IsNil(o.RecipientGatewayDltSystem) { - toSerialize["recipientGatewayDltSystem"] = o.RecipientGatewayDltSystem - } - if !IsNil(o.InitializationRequestMessageHash) { - toSerialize["initializationRequestMessageHash"] = o.InitializationRequestMessageHash - } - if !IsNil(o.InitializationResponseMessageHash) { - toSerialize["initializationResponseMessageHash"] = o.InitializationResponseMessageHash - } - if !IsNil(o.InitializationRequestMessageRcvTimeStamp) { - toSerialize["initializationRequestMessageRcvTimeStamp"] = o.InitializationRequestMessageRcvTimeStamp - } - if !IsNil(o.InitializationRequestMessageProcessedTimeStamp) { - toSerialize["initializationRequestMessageProcessedTimeStamp"] = o.InitializationRequestMessageProcessedTimeStamp - } - if !IsNil(o.ClientSignatureInitializationRequestMessage) { - toSerialize["clientSignatureInitializationRequestMessage"] = o.ClientSignatureInitializationRequestMessage - } - if !IsNil(o.ServerSignatureInitializationResponseMessage) { - toSerialize["serverSignatureInitializationResponseMessage"] = o.ServerSignatureInitializationResponseMessage - } - if !IsNil(o.TransferCommenceMessageRequestHash) { - toSerialize["transferCommenceMessageRequestHash"] = o.TransferCommenceMessageRequestHash - } - if !IsNil(o.TransferCommenceMessageResponseHash) { - toSerialize["transferCommenceMessageResponseHash"] = o.TransferCommenceMessageResponseHash - } - if !IsNil(o.ClientSignatureTransferCommenceRequestMessage) { - toSerialize["clientSignatureTransferCommenceRequestMessage"] = o.ClientSignatureTransferCommenceRequestMessage - } - if !IsNil(o.ServerSignatureTransferCommenceResponseMessage) { - toSerialize["serverSignatureTransferCommenceResponseMessage"] = o.ServerSignatureTransferCommenceResponseMessage - } - if !IsNil(o.LockEvidenceRequestMessageHash) { - toSerialize["lockEvidenceRequestMessageHash"] = o.LockEvidenceRequestMessageHash - } - if !IsNil(o.LockEvidenceResponseMessageHash) { - toSerialize["lockEvidenceResponseMessageHash"] = o.LockEvidenceResponseMessageHash - } - if !IsNil(o.ClientSignatureLockEvidenceRequestMessage) { - toSerialize["clientSignatureLockEvidenceRequestMessage"] = o.ClientSignatureLockEvidenceRequestMessage - } - if !IsNil(o.ServerSignatureLockEvidenceResponseMessage) { - toSerialize["serverSignatureLockEvidenceResponseMessage"] = o.ServerSignatureLockEvidenceResponseMessage - } - if !IsNil(o.LockEvidenceClaim) { - toSerialize["lockEvidenceClaim"] = o.LockEvidenceClaim - } - if !IsNil(o.CommitPrepareRequestMessageHash) { - toSerialize["commitPrepareRequestMessageHash"] = o.CommitPrepareRequestMessageHash - } - if !IsNil(o.CommitPrepareResponseMessageHash) { - toSerialize["commitPrepareResponseMessageHash"] = o.CommitPrepareResponseMessageHash - } - if !IsNil(o.ClientSignatureCommitPreparationRequestMessage) { - toSerialize["clientSignatureCommitPreparationRequestMessage"] = o.ClientSignatureCommitPreparationRequestMessage - } - if !IsNil(o.ServerSignatureCommitPreparationResponseMessage) { - toSerialize["serverSignatureCommitPreparationResponseMessage"] = o.ServerSignatureCommitPreparationResponseMessage - } - if !IsNil(o.CommitFinalRequestMessageHash) { - toSerialize["commitFinalRequestMessageHash"] = o.CommitFinalRequestMessageHash - } - if !IsNil(o.CommitFinalResponseMessageHash) { - toSerialize["commitFinalResponseMessageHash"] = o.CommitFinalResponseMessageHash - } - if !IsNil(o.CommitFinalClaim) { - toSerialize["commitFinalClaim"] = o.CommitFinalClaim - } - if !IsNil(o.CommitFinalClaimFormat) { - toSerialize["commitFinalClaimFormat"] = o.CommitFinalClaimFormat - } - if !IsNil(o.CommitAcknowledgementClaim) { - toSerialize["commitAcknowledgementClaim"] = o.CommitAcknowledgementClaim - } - if !IsNil(o.CommitAcknowledgementClaimFormat) { - toSerialize["commitAcknowledgementClaimFormat"] = o.CommitAcknowledgementClaimFormat - } - if !IsNil(o.ClientSignatureCommitFinalRequestMessage) { - toSerialize["clientSignatureCommitFinalRequestMessage"] = o.ClientSignatureCommitFinalRequestMessage - } - if !IsNil(o.ServerSignatureCommitFinalResponseMessage) { - toSerialize["serverSignatureCommitFinalResponseMessage"] = o.ServerSignatureCommitFinalResponseMessage - } - if !IsNil(o.TransferCompleteMessageHash) { - toSerialize["transferCompleteMessageHash"] = o.TransferCompleteMessageHash - } - if !IsNil(o.ClientSignatureTransferCompleteMessage) { - toSerialize["clientSignatureTransferCompleteMessage"] = o.ClientSignatureTransferCompleteMessage - } - if !IsNil(o.MaxRetries) { - toSerialize["maxRetries"] = o.MaxRetries - } - if !IsNil(o.RecipientLedgerAssetID) { - toSerialize["recipientLedgerAssetID"] = o.RecipientLedgerAssetID - } - if !IsNil(o.SourceLedgerAssetID) { - toSerialize["sourceLedgerAssetID"] = o.SourceLedgerAssetID - } - if !IsNil(o.MaxTimeout) { - toSerialize["maxTimeout"] = o.MaxTimeout - } - if !IsNil(o.LastLogEntryTimestamp) { - toSerialize["lastLogEntryTimestamp"] = o.LastLogEntryTimestamp - } - if !IsNil(o.UnlockAssetClaim) { - toSerialize["unlockAssetClaim"] = o.UnlockAssetClaim - } - if !IsNil(o.RecreateAssetClaim) { - toSerialize["recreateAssetClaim"] = o.RecreateAssetClaim - } - if !IsNil(o.DeleteAssetClaim) { - toSerialize["deleteAssetClaim"] = o.DeleteAssetClaim - } - if !IsNil(o.LastMessageReceivedTimestamp) { - toSerialize["lastMessageReceivedTimestamp"] = o.LastMessageReceivedTimestamp - } - if !IsNil(o.Rollback) { - toSerialize["rollback"] = o.Rollback - } - if !IsNil(o.RollbackMessageHash) { - toSerialize["rollbackMessageHash"] = o.RollbackMessageHash - } - if !IsNil(o.RollbackProofs) { - toSerialize["rollbackProofs"] = o.RollbackProofs - } - if !IsNil(o.RollbackActionsPerformed) { - toSerialize["rollbackActionsPerformed"] = o.RollbackActionsPerformed - } - return toSerialize, nil -} - -type NullableSessionData struct { - value *SessionData - isSet bool -} - -func (v NullableSessionData) Get() *SessionData { - return v.value -} - -func (v *NullableSessionData) Set(val *SessionData) { - v.value = val - v.isSet = true -} - -func (v NullableSessionData) IsSet() bool { - return v.isSet -} - -func (v *NullableSessionData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSessionData(val *SessionData) *NullableSessionData { - return &NullableSessionData{value: val, isSet: true} -} - -func (v NullableSessionData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSessionData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_commence_v1_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_commence_v1_request.go deleted file mode 100644 index 5ddf2dab22..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_commence_v1_request.go +++ /dev/null @@ -1,496 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the TransferCommenceV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransferCommenceV1Request{} - -// TransferCommenceV1Request struct for TransferCommenceV1Request -type TransferCommenceV1Request struct { - SessionID string `json:"sessionID"` - MessageType string `json:"messageType"` - OriginatorPubkey string `json:"originatorPubkey"` - BeneficiaryPubkey string `json:"beneficiaryPubkey"` - SenderDltSystem string `json:"senderDltSystem"` - RecipientDltSystem string `json:"recipientDltSystem"` - ClientIdentityPubkey string `json:"clientIdentityPubkey"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - HashAssetProfile string `json:"hashAssetProfile"` - AssetUnit *int32 `json:"assetUnit,omitempty"` - HashPrevMessage string `json:"hashPrevMessage"` - ClientTransferNumber NullableInt32 `json:"clientTransferNumber,omitempty"` - Signature string `json:"signature"` - SequenceNumber int32 `json:"sequenceNumber"` -} - -// NewTransferCommenceV1Request instantiates a new TransferCommenceV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransferCommenceV1Request(sessionID string, messageType string, originatorPubkey string, beneficiaryPubkey string, senderDltSystem string, recipientDltSystem string, clientIdentityPubkey string, serverIdentityPubkey string, hashAssetProfile string, hashPrevMessage string, signature string, sequenceNumber int32) *TransferCommenceV1Request { - this := TransferCommenceV1Request{} - this.SessionID = sessionID - this.MessageType = messageType - this.OriginatorPubkey = originatorPubkey - this.BeneficiaryPubkey = beneficiaryPubkey - this.SenderDltSystem = senderDltSystem - this.RecipientDltSystem = recipientDltSystem - this.ClientIdentityPubkey = clientIdentityPubkey - this.ServerIdentityPubkey = serverIdentityPubkey - this.HashAssetProfile = hashAssetProfile - this.HashPrevMessage = hashPrevMessage - this.Signature = signature - this.SequenceNumber = sequenceNumber - return &this -} - -// NewTransferCommenceV1RequestWithDefaults instantiates a new TransferCommenceV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransferCommenceV1RequestWithDefaults() *TransferCommenceV1Request { - this := TransferCommenceV1Request{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *TransferCommenceV1Request) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *TransferCommenceV1Request) SetSessionID(v string) { - o.SessionID = v -} - -// GetMessageType returns the MessageType field value -func (o *TransferCommenceV1Request) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *TransferCommenceV1Request) SetMessageType(v string) { - o.MessageType = v -} - -// GetOriginatorPubkey returns the OriginatorPubkey field value -func (o *TransferCommenceV1Request) GetOriginatorPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.OriginatorPubkey -} - -// GetOriginatorPubkeyOk returns a tuple with the OriginatorPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetOriginatorPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OriginatorPubkey, true -} - -// SetOriginatorPubkey sets field value -func (o *TransferCommenceV1Request) SetOriginatorPubkey(v string) { - o.OriginatorPubkey = v -} - -// GetBeneficiaryPubkey returns the BeneficiaryPubkey field value -func (o *TransferCommenceV1Request) GetBeneficiaryPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.BeneficiaryPubkey -} - -// GetBeneficiaryPubkeyOk returns a tuple with the BeneficiaryPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetBeneficiaryPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BeneficiaryPubkey, true -} - -// SetBeneficiaryPubkey sets field value -func (o *TransferCommenceV1Request) SetBeneficiaryPubkey(v string) { - o.BeneficiaryPubkey = v -} - -// GetSenderDltSystem returns the SenderDltSystem field value -func (o *TransferCommenceV1Request) GetSenderDltSystem() string { - if o == nil { - var ret string - return ret - } - - return o.SenderDltSystem -} - -// GetSenderDltSystemOk returns a tuple with the SenderDltSystem field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetSenderDltSystemOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SenderDltSystem, true -} - -// SetSenderDltSystem sets field value -func (o *TransferCommenceV1Request) SetSenderDltSystem(v string) { - o.SenderDltSystem = v -} - -// GetRecipientDltSystem returns the RecipientDltSystem field value -func (o *TransferCommenceV1Request) GetRecipientDltSystem() string { - if o == nil { - var ret string - return ret - } - - return o.RecipientDltSystem -} - -// GetRecipientDltSystemOk returns a tuple with the RecipientDltSystem field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetRecipientDltSystemOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RecipientDltSystem, true -} - -// SetRecipientDltSystem sets field value -func (o *TransferCommenceV1Request) SetRecipientDltSystem(v string) { - o.RecipientDltSystem = v -} - -// GetClientIdentityPubkey returns the ClientIdentityPubkey field value -func (o *TransferCommenceV1Request) GetClientIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ClientIdentityPubkey -} - -// GetClientIdentityPubkeyOk returns a tuple with the ClientIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetClientIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdentityPubkey, true -} - -// SetClientIdentityPubkey sets field value -func (o *TransferCommenceV1Request) SetClientIdentityPubkey(v string) { - o.ClientIdentityPubkey = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *TransferCommenceV1Request) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *TransferCommenceV1Request) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetHashAssetProfile returns the HashAssetProfile field value -func (o *TransferCommenceV1Request) GetHashAssetProfile() string { - if o == nil { - var ret string - return ret - } - - return o.HashAssetProfile -} - -// GetHashAssetProfileOk returns a tuple with the HashAssetProfile field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetHashAssetProfileOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashAssetProfile, true -} - -// SetHashAssetProfile sets field value -func (o *TransferCommenceV1Request) SetHashAssetProfile(v string) { - o.HashAssetProfile = v -} - -// GetAssetUnit returns the AssetUnit field value if set, zero value otherwise. -func (o *TransferCommenceV1Request) GetAssetUnit() int32 { - if o == nil || IsNil(o.AssetUnit) { - var ret int32 - return ret - } - return *o.AssetUnit -} - -// GetAssetUnitOk returns a tuple with the AssetUnit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetAssetUnitOk() (*int32, bool) { - if o == nil || IsNil(o.AssetUnit) { - return nil, false - } - return o.AssetUnit, true -} - -// HasAssetUnit returns a boolean if a field has been set. -func (o *TransferCommenceV1Request) HasAssetUnit() bool { - if o != nil && !IsNil(o.AssetUnit) { - return true - } - - return false -} - -// SetAssetUnit gets a reference to the given int32 and assigns it to the AssetUnit field. -func (o *TransferCommenceV1Request) SetAssetUnit(v int32) { - o.AssetUnit = &v -} - -// GetHashPrevMessage returns the HashPrevMessage field value -func (o *TransferCommenceV1Request) GetHashPrevMessage() string { - if o == nil { - var ret string - return ret - } - - return o.HashPrevMessage -} - -// GetHashPrevMessageOk returns a tuple with the HashPrevMessage field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetHashPrevMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashPrevMessage, true -} - -// SetHashPrevMessage sets field value -func (o *TransferCommenceV1Request) SetHashPrevMessage(v string) { - o.HashPrevMessage = v -} - -// GetClientTransferNumber returns the ClientTransferNumber field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TransferCommenceV1Request) GetClientTransferNumber() int32 { - if o == nil || IsNil(o.ClientTransferNumber.Get()) { - var ret int32 - return ret - } - return *o.ClientTransferNumber.Get() -} - -// GetClientTransferNumberOk returns a tuple with the ClientTransferNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TransferCommenceV1Request) GetClientTransferNumberOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.ClientTransferNumber.Get(), o.ClientTransferNumber.IsSet() -} - -// HasClientTransferNumber returns a boolean if a field has been set. -func (o *TransferCommenceV1Request) HasClientTransferNumber() bool { - if o != nil && o.ClientTransferNumber.IsSet() { - return true - } - - return false -} - -// SetClientTransferNumber gets a reference to the given NullableInt32 and assigns it to the ClientTransferNumber field. -func (o *TransferCommenceV1Request) SetClientTransferNumber(v int32) { - o.ClientTransferNumber.Set(&v) -} -// SetClientTransferNumberNil sets the value for ClientTransferNumber to be an explicit nil -func (o *TransferCommenceV1Request) SetClientTransferNumberNil() { - o.ClientTransferNumber.Set(nil) -} - -// UnsetClientTransferNumber ensures that no value is present for ClientTransferNumber, not even an explicit nil -func (o *TransferCommenceV1Request) UnsetClientTransferNumber() { - o.ClientTransferNumber.Unset() -} - -// GetSignature returns the Signature field value -func (o *TransferCommenceV1Request) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *TransferCommenceV1Request) SetSignature(v string) { - o.Signature = v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *TransferCommenceV1Request) GetSequenceNumber() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Request) GetSequenceNumberOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *TransferCommenceV1Request) SetSequenceNumber(v int32) { - o.SequenceNumber = v -} - -func (o TransferCommenceV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransferCommenceV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["messageType"] = o.MessageType - toSerialize["originatorPubkey"] = o.OriginatorPubkey - toSerialize["beneficiaryPubkey"] = o.BeneficiaryPubkey - toSerialize["senderDltSystem"] = o.SenderDltSystem - toSerialize["recipientDltSystem"] = o.RecipientDltSystem - toSerialize["clientIdentityPubkey"] = o.ClientIdentityPubkey - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["hashAssetProfile"] = o.HashAssetProfile - if !IsNil(o.AssetUnit) { - toSerialize["assetUnit"] = o.AssetUnit - } - toSerialize["hashPrevMessage"] = o.HashPrevMessage - if o.ClientTransferNumber.IsSet() { - toSerialize["clientTransferNumber"] = o.ClientTransferNumber.Get() - } - toSerialize["signature"] = o.Signature - toSerialize["sequenceNumber"] = o.SequenceNumber - return toSerialize, nil -} - -type NullableTransferCommenceV1Request struct { - value *TransferCommenceV1Request - isSet bool -} - -func (v NullableTransferCommenceV1Request) Get() *TransferCommenceV1Request { - return v.value -} - -func (v *NullableTransferCommenceV1Request) Set(val *TransferCommenceV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableTransferCommenceV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableTransferCommenceV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransferCommenceV1Request(val *TransferCommenceV1Request) *NullableTransferCommenceV1Request { - return &NullableTransferCommenceV1Request{value: val, isSet: true} -} - -func (v NullableTransferCommenceV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransferCommenceV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_commence_v1_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_commence_v1_response.go deleted file mode 100644 index 13ecb2ee0d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_commence_v1_response.go +++ /dev/null @@ -1,361 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the TransferCommenceV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransferCommenceV1Response{} - -// TransferCommenceV1Response struct for TransferCommenceV1Response -type TransferCommenceV1Response struct { - SessionID string `json:"sessionID"` - ClientIdentityPubkey string `json:"clientIdentityPubkey"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - HashCommenceRequest string `json:"hashCommenceRequest"` - ServerTransferNumber NullableInt32 `json:"serverTransferNumber,omitempty"` - Signature string `json:"signature"` - MessageType string `json:"messageType"` - MessageHash *string `json:"messageHash,omitempty"` - SequenceNumber float32 `json:"sequenceNumber"` -} - -// NewTransferCommenceV1Response instantiates a new TransferCommenceV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransferCommenceV1Response(sessionID string, clientIdentityPubkey string, serverIdentityPubkey string, hashCommenceRequest string, signature string, messageType string, sequenceNumber float32) *TransferCommenceV1Response { - this := TransferCommenceV1Response{} - this.SessionID = sessionID - this.ClientIdentityPubkey = clientIdentityPubkey - this.ServerIdentityPubkey = serverIdentityPubkey - this.HashCommenceRequest = hashCommenceRequest - this.Signature = signature - this.MessageType = messageType - this.SequenceNumber = sequenceNumber - return &this -} - -// NewTransferCommenceV1ResponseWithDefaults instantiates a new TransferCommenceV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransferCommenceV1ResponseWithDefaults() *TransferCommenceV1Response { - this := TransferCommenceV1Response{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *TransferCommenceV1Response) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Response) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *TransferCommenceV1Response) SetSessionID(v string) { - o.SessionID = v -} - -// GetClientIdentityPubkey returns the ClientIdentityPubkey field value -func (o *TransferCommenceV1Response) GetClientIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ClientIdentityPubkey -} - -// GetClientIdentityPubkeyOk returns a tuple with the ClientIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Response) GetClientIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdentityPubkey, true -} - -// SetClientIdentityPubkey sets field value -func (o *TransferCommenceV1Response) SetClientIdentityPubkey(v string) { - o.ClientIdentityPubkey = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *TransferCommenceV1Response) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Response) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *TransferCommenceV1Response) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetHashCommenceRequest returns the HashCommenceRequest field value -func (o *TransferCommenceV1Response) GetHashCommenceRequest() string { - if o == nil { - var ret string - return ret - } - - return o.HashCommenceRequest -} - -// GetHashCommenceRequestOk returns a tuple with the HashCommenceRequest field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Response) GetHashCommenceRequestOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashCommenceRequest, true -} - -// SetHashCommenceRequest sets field value -func (o *TransferCommenceV1Response) SetHashCommenceRequest(v string) { - o.HashCommenceRequest = v -} - -// GetServerTransferNumber returns the ServerTransferNumber field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TransferCommenceV1Response) GetServerTransferNumber() int32 { - if o == nil || IsNil(o.ServerTransferNumber.Get()) { - var ret int32 - return ret - } - return *o.ServerTransferNumber.Get() -} - -// GetServerTransferNumberOk returns a tuple with the ServerTransferNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TransferCommenceV1Response) GetServerTransferNumberOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.ServerTransferNumber.Get(), o.ServerTransferNumber.IsSet() -} - -// HasServerTransferNumber returns a boolean if a field has been set. -func (o *TransferCommenceV1Response) HasServerTransferNumber() bool { - if o != nil && o.ServerTransferNumber.IsSet() { - return true - } - - return false -} - -// SetServerTransferNumber gets a reference to the given NullableInt32 and assigns it to the ServerTransferNumber field. -func (o *TransferCommenceV1Response) SetServerTransferNumber(v int32) { - o.ServerTransferNumber.Set(&v) -} -// SetServerTransferNumberNil sets the value for ServerTransferNumber to be an explicit nil -func (o *TransferCommenceV1Response) SetServerTransferNumberNil() { - o.ServerTransferNumber.Set(nil) -} - -// UnsetServerTransferNumber ensures that no value is present for ServerTransferNumber, not even an explicit nil -func (o *TransferCommenceV1Response) UnsetServerTransferNumber() { - o.ServerTransferNumber.Unset() -} - -// GetSignature returns the Signature field value -func (o *TransferCommenceV1Response) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Response) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *TransferCommenceV1Response) SetSignature(v string) { - o.Signature = v -} - -// GetMessageType returns the MessageType field value -func (o *TransferCommenceV1Response) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Response) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *TransferCommenceV1Response) SetMessageType(v string) { - o.MessageType = v -} - -// GetMessageHash returns the MessageHash field value if set, zero value otherwise. -func (o *TransferCommenceV1Response) GetMessageHash() string { - if o == nil || IsNil(o.MessageHash) { - var ret string - return ret - } - return *o.MessageHash -} - -// GetMessageHashOk returns a tuple with the MessageHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Response) GetMessageHashOk() (*string, bool) { - if o == nil || IsNil(o.MessageHash) { - return nil, false - } - return o.MessageHash, true -} - -// HasMessageHash returns a boolean if a field has been set. -func (o *TransferCommenceV1Response) HasMessageHash() bool { - if o != nil && !IsNil(o.MessageHash) { - return true - } - - return false -} - -// SetMessageHash gets a reference to the given string and assigns it to the MessageHash field. -func (o *TransferCommenceV1Response) SetMessageHash(v string) { - o.MessageHash = &v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *TransferCommenceV1Response) GetSequenceNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *TransferCommenceV1Response) GetSequenceNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *TransferCommenceV1Response) SetSequenceNumber(v float32) { - o.SequenceNumber = v -} - -func (o TransferCommenceV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransferCommenceV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["clientIdentityPubkey"] = o.ClientIdentityPubkey - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["hashCommenceRequest"] = o.HashCommenceRequest - if o.ServerTransferNumber.IsSet() { - toSerialize["serverTransferNumber"] = o.ServerTransferNumber.Get() - } - toSerialize["signature"] = o.Signature - toSerialize["messageType"] = o.MessageType - if !IsNil(o.MessageHash) { - toSerialize["messageHash"] = o.MessageHash - } - toSerialize["sequenceNumber"] = o.SequenceNumber - return toSerialize, nil -} - -type NullableTransferCommenceV1Response struct { - value *TransferCommenceV1Response - isSet bool -} - -func (v NullableTransferCommenceV1Response) Get() *TransferCommenceV1Response { - return v.value -} - -func (v *NullableTransferCommenceV1Response) Set(val *TransferCommenceV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableTransferCommenceV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableTransferCommenceV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransferCommenceV1Response(val *TransferCommenceV1Response) *NullableTransferCommenceV1Response { - return &NullableTransferCommenceV1Response{value: val, isSet: true} -} - -func (v NullableTransferCommenceV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransferCommenceV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_complete_v1_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_complete_v1_request.go deleted file mode 100644 index a183fe3479..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_complete_v1_request.go +++ /dev/null @@ -1,352 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the TransferCompleteV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransferCompleteV1Request{} - -// TransferCompleteV1Request struct for TransferCompleteV1Request -type TransferCompleteV1Request struct { - SessionID string `json:"sessionID"` - MessageType string `json:"messageType"` - ClientIdentityPubkey string `json:"clientIdentityPubkey"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - HashCommitFinalAck string `json:"hashCommitFinalAck"` - ClientTransferNumber NullableInt32 `json:"clientTransferNumber,omitempty"` - Signature string `json:"signature"` - HashTransferCommence string `json:"hashTransferCommence"` - SequenceNumber float32 `json:"sequenceNumber"` -} - -// NewTransferCompleteV1Request instantiates a new TransferCompleteV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransferCompleteV1Request(sessionID string, messageType string, clientIdentityPubkey string, serverIdentityPubkey string, hashCommitFinalAck string, signature string, hashTransferCommence string, sequenceNumber float32) *TransferCompleteV1Request { - this := TransferCompleteV1Request{} - this.SessionID = sessionID - this.MessageType = messageType - this.ClientIdentityPubkey = clientIdentityPubkey - this.ServerIdentityPubkey = serverIdentityPubkey - this.HashCommitFinalAck = hashCommitFinalAck - this.Signature = signature - this.HashTransferCommence = hashTransferCommence - this.SequenceNumber = sequenceNumber - return &this -} - -// NewTransferCompleteV1RequestWithDefaults instantiates a new TransferCompleteV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransferCompleteV1RequestWithDefaults() *TransferCompleteV1Request { - this := TransferCompleteV1Request{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *TransferCompleteV1Request) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *TransferCompleteV1Request) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *TransferCompleteV1Request) SetSessionID(v string) { - o.SessionID = v -} - -// GetMessageType returns the MessageType field value -func (o *TransferCompleteV1Request) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *TransferCompleteV1Request) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *TransferCompleteV1Request) SetMessageType(v string) { - o.MessageType = v -} - -// GetClientIdentityPubkey returns the ClientIdentityPubkey field value -func (o *TransferCompleteV1Request) GetClientIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ClientIdentityPubkey -} - -// GetClientIdentityPubkeyOk returns a tuple with the ClientIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferCompleteV1Request) GetClientIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdentityPubkey, true -} - -// SetClientIdentityPubkey sets field value -func (o *TransferCompleteV1Request) SetClientIdentityPubkey(v string) { - o.ClientIdentityPubkey = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *TransferCompleteV1Request) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferCompleteV1Request) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *TransferCompleteV1Request) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetHashCommitFinalAck returns the HashCommitFinalAck field value -func (o *TransferCompleteV1Request) GetHashCommitFinalAck() string { - if o == nil { - var ret string - return ret - } - - return o.HashCommitFinalAck -} - -// GetHashCommitFinalAckOk returns a tuple with the HashCommitFinalAck field value -// and a boolean to check if the value has been set. -func (o *TransferCompleteV1Request) GetHashCommitFinalAckOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashCommitFinalAck, true -} - -// SetHashCommitFinalAck sets field value -func (o *TransferCompleteV1Request) SetHashCommitFinalAck(v string) { - o.HashCommitFinalAck = v -} - -// GetClientTransferNumber returns the ClientTransferNumber field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TransferCompleteV1Request) GetClientTransferNumber() int32 { - if o == nil || IsNil(o.ClientTransferNumber.Get()) { - var ret int32 - return ret - } - return *o.ClientTransferNumber.Get() -} - -// GetClientTransferNumberOk returns a tuple with the ClientTransferNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TransferCompleteV1Request) GetClientTransferNumberOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.ClientTransferNumber.Get(), o.ClientTransferNumber.IsSet() -} - -// HasClientTransferNumber returns a boolean if a field has been set. -func (o *TransferCompleteV1Request) HasClientTransferNumber() bool { - if o != nil && o.ClientTransferNumber.IsSet() { - return true - } - - return false -} - -// SetClientTransferNumber gets a reference to the given NullableInt32 and assigns it to the ClientTransferNumber field. -func (o *TransferCompleteV1Request) SetClientTransferNumber(v int32) { - o.ClientTransferNumber.Set(&v) -} -// SetClientTransferNumberNil sets the value for ClientTransferNumber to be an explicit nil -func (o *TransferCompleteV1Request) SetClientTransferNumberNil() { - o.ClientTransferNumber.Set(nil) -} - -// UnsetClientTransferNumber ensures that no value is present for ClientTransferNumber, not even an explicit nil -func (o *TransferCompleteV1Request) UnsetClientTransferNumber() { - o.ClientTransferNumber.Unset() -} - -// GetSignature returns the Signature field value -func (o *TransferCompleteV1Request) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *TransferCompleteV1Request) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *TransferCompleteV1Request) SetSignature(v string) { - o.Signature = v -} - -// GetHashTransferCommence returns the HashTransferCommence field value -func (o *TransferCompleteV1Request) GetHashTransferCommence() string { - if o == nil { - var ret string - return ret - } - - return o.HashTransferCommence -} - -// GetHashTransferCommenceOk returns a tuple with the HashTransferCommence field value -// and a boolean to check if the value has been set. -func (o *TransferCompleteV1Request) GetHashTransferCommenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.HashTransferCommence, true -} - -// SetHashTransferCommence sets field value -func (o *TransferCompleteV1Request) SetHashTransferCommence(v string) { - o.HashTransferCommence = v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *TransferCompleteV1Request) GetSequenceNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *TransferCompleteV1Request) GetSequenceNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *TransferCompleteV1Request) SetSequenceNumber(v float32) { - o.SequenceNumber = v -} - -func (o TransferCompleteV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransferCompleteV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["messageType"] = o.MessageType - toSerialize["clientIdentityPubkey"] = o.ClientIdentityPubkey - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["hashCommitFinalAck"] = o.HashCommitFinalAck - if o.ClientTransferNumber.IsSet() { - toSerialize["clientTransferNumber"] = o.ClientTransferNumber.Get() - } - toSerialize["signature"] = o.Signature - toSerialize["hashTransferCommence"] = o.HashTransferCommence - toSerialize["sequenceNumber"] = o.SequenceNumber - return toSerialize, nil -} - -type NullableTransferCompleteV1Request struct { - value *TransferCompleteV1Request - isSet bool -} - -func (v NullableTransferCompleteV1Request) Get() *TransferCompleteV1Request { - return v.value -} - -func (v *NullableTransferCompleteV1Request) Set(val *TransferCompleteV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableTransferCompleteV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableTransferCompleteV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransferCompleteV1Request(val *TransferCompleteV1Request) *NullableTransferCompleteV1Request { - return &NullableTransferCompleteV1Request{value: val, isSet: true} -} - -func (v NullableTransferCompleteV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransferCompleteV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_initialization_v1_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_initialization_v1_request.go deleted file mode 100644 index 3690c31ed2..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_initialization_v1_request.go +++ /dev/null @@ -1,1035 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the TransferInitializationV1Request type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransferInitializationV1Request{} - -// TransferInitializationV1Request struct for TransferInitializationV1Request -type TransferInitializationV1Request struct { - MessageType string `json:"messageType"` - SessionID string `json:"sessionID"` - Version *string `json:"version,omitempty"` - DeveloperURN *string `json:"developerURN,omitempty"` - CredentialProfile *CredentialProfile `json:"credentialProfile,omitempty"` - PayloadProfile PayloadProfile `json:"payloadProfile"` - ApplicationProfile string `json:"applicationProfile"` - LoggingProfile string `json:"loggingProfile"` - AccessControlProfile string `json:"accessControlProfile"` - Signature string `json:"signature"` - SourceGatewayPubkey string `json:"sourceGatewayPubkey"` - SourceGatewayDltSystem string `json:"sourceGatewayDltSystem"` - RecipientGatewayPubkey string `json:"recipientGatewayPubkey"` - RecipientGatewayDltSystem string `json:"recipientGatewayDltSystem"` - EscrowType *string `json:"escrowType,omitempty"` - ExpiryTime *string `json:"expiryTime,omitempty"` - MultipleClaimsAllowed *bool `json:"multipleClaimsAllowed,omitempty"` - MultipleCancelsAllowed *bool `json:"multipleCancelsAllowed,omitempty"` - Permissions map[string]interface{} `json:"permissions,omitempty"` - Origin *string `json:"origin,omitempty"` - Destination *string `json:"destination,omitempty"` - SubsequentCalls map[string]interface{} `json:"subsequentCalls,omitempty"` - Histories []History `json:"histories,omitempty"` - SequenceNumber int32 `json:"sequenceNumber"` - SourceBasePath string `json:"sourceBasePath"` - RecipientBasePath string `json:"recipientBasePath"` - MaxRetries float32 `json:"maxRetries"` - MaxTimeout float32 `json:"maxTimeout"` - BackupGatewaysAllowed []string `json:"backupGatewaysAllowed"` - RecipientLedgerAssetID string `json:"recipientLedgerAssetID"` - SourceLedgerAssetID string `json:"sourceLedgerAssetID"` -} - -// NewTransferInitializationV1Request instantiates a new TransferInitializationV1Request object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransferInitializationV1Request(messageType string, sessionID string, payloadProfile PayloadProfile, applicationProfile string, loggingProfile string, accessControlProfile string, signature string, sourceGatewayPubkey string, sourceGatewayDltSystem string, recipientGatewayPubkey string, recipientGatewayDltSystem string, sequenceNumber int32, sourceBasePath string, recipientBasePath string, maxRetries float32, maxTimeout float32, backupGatewaysAllowed []string, recipientLedgerAssetID string, sourceLedgerAssetID string) *TransferInitializationV1Request { - this := TransferInitializationV1Request{} - this.MessageType = messageType - this.SessionID = sessionID - this.PayloadProfile = payloadProfile - this.ApplicationProfile = applicationProfile - this.LoggingProfile = loggingProfile - this.AccessControlProfile = accessControlProfile - this.Signature = signature - this.SourceGatewayPubkey = sourceGatewayPubkey - this.SourceGatewayDltSystem = sourceGatewayDltSystem - this.RecipientGatewayPubkey = recipientGatewayPubkey - this.RecipientGatewayDltSystem = recipientGatewayDltSystem - this.SequenceNumber = sequenceNumber - this.SourceBasePath = sourceBasePath - this.RecipientBasePath = recipientBasePath - this.MaxRetries = maxRetries - this.MaxTimeout = maxTimeout - this.BackupGatewaysAllowed = backupGatewaysAllowed - this.RecipientLedgerAssetID = recipientLedgerAssetID - this.SourceLedgerAssetID = sourceLedgerAssetID - return &this -} - -// NewTransferInitializationV1RequestWithDefaults instantiates a new TransferInitializationV1Request object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransferInitializationV1RequestWithDefaults() *TransferInitializationV1Request { - this := TransferInitializationV1Request{} - return &this -} - -// GetMessageType returns the MessageType field value -func (o *TransferInitializationV1Request) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *TransferInitializationV1Request) SetMessageType(v string) { - o.MessageType = v -} - -// GetSessionID returns the SessionID field value -func (o *TransferInitializationV1Request) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *TransferInitializationV1Request) SetSessionID(v string) { - o.SessionID = v -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetVersion() string { - if o == nil || IsNil(o.Version) { - var ret string - return ret - } - return *o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *TransferInitializationV1Request) SetVersion(v string) { - o.Version = &v -} - -// GetDeveloperURN returns the DeveloperURN field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetDeveloperURN() string { - if o == nil || IsNil(o.DeveloperURN) { - var ret string - return ret - } - return *o.DeveloperURN -} - -// GetDeveloperURNOk returns a tuple with the DeveloperURN field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetDeveloperURNOk() (*string, bool) { - if o == nil || IsNil(o.DeveloperURN) { - return nil, false - } - return o.DeveloperURN, true -} - -// HasDeveloperURN returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasDeveloperURN() bool { - if o != nil && !IsNil(o.DeveloperURN) { - return true - } - - return false -} - -// SetDeveloperURN gets a reference to the given string and assigns it to the DeveloperURN field. -func (o *TransferInitializationV1Request) SetDeveloperURN(v string) { - o.DeveloperURN = &v -} - -// GetCredentialProfile returns the CredentialProfile field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetCredentialProfile() CredentialProfile { - if o == nil || IsNil(o.CredentialProfile) { - var ret CredentialProfile - return ret - } - return *o.CredentialProfile -} - -// GetCredentialProfileOk returns a tuple with the CredentialProfile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetCredentialProfileOk() (*CredentialProfile, bool) { - if o == nil || IsNil(o.CredentialProfile) { - return nil, false - } - return o.CredentialProfile, true -} - -// HasCredentialProfile returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasCredentialProfile() bool { - if o != nil && !IsNil(o.CredentialProfile) { - return true - } - - return false -} - -// SetCredentialProfile gets a reference to the given CredentialProfile and assigns it to the CredentialProfile field. -func (o *TransferInitializationV1Request) SetCredentialProfile(v CredentialProfile) { - o.CredentialProfile = &v -} - -// GetPayloadProfile returns the PayloadProfile field value -func (o *TransferInitializationV1Request) GetPayloadProfile() PayloadProfile { - if o == nil { - var ret PayloadProfile - return ret - } - - return o.PayloadProfile -} - -// GetPayloadProfileOk returns a tuple with the PayloadProfile field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetPayloadProfileOk() (*PayloadProfile, bool) { - if o == nil { - return nil, false - } - return &o.PayloadProfile, true -} - -// SetPayloadProfile sets field value -func (o *TransferInitializationV1Request) SetPayloadProfile(v PayloadProfile) { - o.PayloadProfile = v -} - -// GetApplicationProfile returns the ApplicationProfile field value -func (o *TransferInitializationV1Request) GetApplicationProfile() string { - if o == nil { - var ret string - return ret - } - - return o.ApplicationProfile -} - -// GetApplicationProfileOk returns a tuple with the ApplicationProfile field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetApplicationProfileOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApplicationProfile, true -} - -// SetApplicationProfile sets field value -func (o *TransferInitializationV1Request) SetApplicationProfile(v string) { - o.ApplicationProfile = v -} - -// GetLoggingProfile returns the LoggingProfile field value -func (o *TransferInitializationV1Request) GetLoggingProfile() string { - if o == nil { - var ret string - return ret - } - - return o.LoggingProfile -} - -// GetLoggingProfileOk returns a tuple with the LoggingProfile field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetLoggingProfileOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LoggingProfile, true -} - -// SetLoggingProfile sets field value -func (o *TransferInitializationV1Request) SetLoggingProfile(v string) { - o.LoggingProfile = v -} - -// GetAccessControlProfile returns the AccessControlProfile field value -func (o *TransferInitializationV1Request) GetAccessControlProfile() string { - if o == nil { - var ret string - return ret - } - - return o.AccessControlProfile -} - -// GetAccessControlProfileOk returns a tuple with the AccessControlProfile field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetAccessControlProfileOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccessControlProfile, true -} - -// SetAccessControlProfile sets field value -func (o *TransferInitializationV1Request) SetAccessControlProfile(v string) { - o.AccessControlProfile = v -} - -// GetSignature returns the Signature field value -func (o *TransferInitializationV1Request) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *TransferInitializationV1Request) SetSignature(v string) { - o.Signature = v -} - -// GetSourceGatewayPubkey returns the SourceGatewayPubkey field value -func (o *TransferInitializationV1Request) GetSourceGatewayPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.SourceGatewayPubkey -} - -// GetSourceGatewayPubkeyOk returns a tuple with the SourceGatewayPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetSourceGatewayPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SourceGatewayPubkey, true -} - -// SetSourceGatewayPubkey sets field value -func (o *TransferInitializationV1Request) SetSourceGatewayPubkey(v string) { - o.SourceGatewayPubkey = v -} - -// GetSourceGatewayDltSystem returns the SourceGatewayDltSystem field value -func (o *TransferInitializationV1Request) GetSourceGatewayDltSystem() string { - if o == nil { - var ret string - return ret - } - - return o.SourceGatewayDltSystem -} - -// GetSourceGatewayDltSystemOk returns a tuple with the SourceGatewayDltSystem field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetSourceGatewayDltSystemOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SourceGatewayDltSystem, true -} - -// SetSourceGatewayDltSystem sets field value -func (o *TransferInitializationV1Request) SetSourceGatewayDltSystem(v string) { - o.SourceGatewayDltSystem = v -} - -// GetRecipientGatewayPubkey returns the RecipientGatewayPubkey field value -func (o *TransferInitializationV1Request) GetRecipientGatewayPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.RecipientGatewayPubkey -} - -// GetRecipientGatewayPubkeyOk returns a tuple with the RecipientGatewayPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetRecipientGatewayPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RecipientGatewayPubkey, true -} - -// SetRecipientGatewayPubkey sets field value -func (o *TransferInitializationV1Request) SetRecipientGatewayPubkey(v string) { - o.RecipientGatewayPubkey = v -} - -// GetRecipientGatewayDltSystem returns the RecipientGatewayDltSystem field value -func (o *TransferInitializationV1Request) GetRecipientGatewayDltSystem() string { - if o == nil { - var ret string - return ret - } - - return o.RecipientGatewayDltSystem -} - -// GetRecipientGatewayDltSystemOk returns a tuple with the RecipientGatewayDltSystem field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetRecipientGatewayDltSystemOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RecipientGatewayDltSystem, true -} - -// SetRecipientGatewayDltSystem sets field value -func (o *TransferInitializationV1Request) SetRecipientGatewayDltSystem(v string) { - o.RecipientGatewayDltSystem = v -} - -// GetEscrowType returns the EscrowType field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetEscrowType() string { - if o == nil || IsNil(o.EscrowType) { - var ret string - return ret - } - return *o.EscrowType -} - -// GetEscrowTypeOk returns a tuple with the EscrowType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetEscrowTypeOk() (*string, bool) { - if o == nil || IsNil(o.EscrowType) { - return nil, false - } - return o.EscrowType, true -} - -// HasEscrowType returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasEscrowType() bool { - if o != nil && !IsNil(o.EscrowType) { - return true - } - - return false -} - -// SetEscrowType gets a reference to the given string and assigns it to the EscrowType field. -func (o *TransferInitializationV1Request) SetEscrowType(v string) { - o.EscrowType = &v -} - -// GetExpiryTime returns the ExpiryTime field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetExpiryTime() string { - if o == nil || IsNil(o.ExpiryTime) { - var ret string - return ret - } - return *o.ExpiryTime -} - -// GetExpiryTimeOk returns a tuple with the ExpiryTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetExpiryTimeOk() (*string, bool) { - if o == nil || IsNil(o.ExpiryTime) { - return nil, false - } - return o.ExpiryTime, true -} - -// HasExpiryTime returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasExpiryTime() bool { - if o != nil && !IsNil(o.ExpiryTime) { - return true - } - - return false -} - -// SetExpiryTime gets a reference to the given string and assigns it to the ExpiryTime field. -func (o *TransferInitializationV1Request) SetExpiryTime(v string) { - o.ExpiryTime = &v -} - -// GetMultipleClaimsAllowed returns the MultipleClaimsAllowed field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetMultipleClaimsAllowed() bool { - if o == nil || IsNil(o.MultipleClaimsAllowed) { - var ret bool - return ret - } - return *o.MultipleClaimsAllowed -} - -// GetMultipleClaimsAllowedOk returns a tuple with the MultipleClaimsAllowed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetMultipleClaimsAllowedOk() (*bool, bool) { - if o == nil || IsNil(o.MultipleClaimsAllowed) { - return nil, false - } - return o.MultipleClaimsAllowed, true -} - -// HasMultipleClaimsAllowed returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasMultipleClaimsAllowed() bool { - if o != nil && !IsNil(o.MultipleClaimsAllowed) { - return true - } - - return false -} - -// SetMultipleClaimsAllowed gets a reference to the given bool and assigns it to the MultipleClaimsAllowed field. -func (o *TransferInitializationV1Request) SetMultipleClaimsAllowed(v bool) { - o.MultipleClaimsAllowed = &v -} - -// GetMultipleCancelsAllowed returns the MultipleCancelsAllowed field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetMultipleCancelsAllowed() bool { - if o == nil || IsNil(o.MultipleCancelsAllowed) { - var ret bool - return ret - } - return *o.MultipleCancelsAllowed -} - -// GetMultipleCancelsAllowedOk returns a tuple with the MultipleCancelsAllowed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetMultipleCancelsAllowedOk() (*bool, bool) { - if o == nil || IsNil(o.MultipleCancelsAllowed) { - return nil, false - } - return o.MultipleCancelsAllowed, true -} - -// HasMultipleCancelsAllowed returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasMultipleCancelsAllowed() bool { - if o != nil && !IsNil(o.MultipleCancelsAllowed) { - return true - } - - return false -} - -// SetMultipleCancelsAllowed gets a reference to the given bool and assigns it to the MultipleCancelsAllowed field. -func (o *TransferInitializationV1Request) SetMultipleCancelsAllowed(v bool) { - o.MultipleCancelsAllowed = &v -} - -// GetPermissions returns the Permissions field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetPermissions() map[string]interface{} { - if o == nil || IsNil(o.Permissions) { - var ret map[string]interface{} - return ret - } - return o.Permissions -} - -// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetPermissionsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Permissions) { - return map[string]interface{}{}, false - } - return o.Permissions, true -} - -// HasPermissions returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasPermissions() bool { - if o != nil && !IsNil(o.Permissions) { - return true - } - - return false -} - -// SetPermissions gets a reference to the given map[string]interface{} and assigns it to the Permissions field. -func (o *TransferInitializationV1Request) SetPermissions(v map[string]interface{}) { - o.Permissions = v -} - -// GetOrigin returns the Origin field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetOrigin() string { - if o == nil || IsNil(o.Origin) { - var ret string - return ret - } - return *o.Origin -} - -// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetOriginOk() (*string, bool) { - if o == nil || IsNil(o.Origin) { - return nil, false - } - return o.Origin, true -} - -// HasOrigin returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasOrigin() bool { - if o != nil && !IsNil(o.Origin) { - return true - } - - return false -} - -// SetOrigin gets a reference to the given string and assigns it to the Origin field. -func (o *TransferInitializationV1Request) SetOrigin(v string) { - o.Origin = &v -} - -// GetDestination returns the Destination field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetDestination() string { - if o == nil || IsNil(o.Destination) { - var ret string - return ret - } - return *o.Destination -} - -// GetDestinationOk returns a tuple with the Destination field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetDestinationOk() (*string, bool) { - if o == nil || IsNil(o.Destination) { - return nil, false - } - return o.Destination, true -} - -// HasDestination returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasDestination() bool { - if o != nil && !IsNil(o.Destination) { - return true - } - - return false -} - -// SetDestination gets a reference to the given string and assigns it to the Destination field. -func (o *TransferInitializationV1Request) SetDestination(v string) { - o.Destination = &v -} - -// GetSubsequentCalls returns the SubsequentCalls field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetSubsequentCalls() map[string]interface{} { - if o == nil || IsNil(o.SubsequentCalls) { - var ret map[string]interface{} - return ret - } - return o.SubsequentCalls -} - -// GetSubsequentCallsOk returns a tuple with the SubsequentCalls field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetSubsequentCallsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.SubsequentCalls) { - return map[string]interface{}{}, false - } - return o.SubsequentCalls, true -} - -// HasSubsequentCalls returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasSubsequentCalls() bool { - if o != nil && !IsNil(o.SubsequentCalls) { - return true - } - - return false -} - -// SetSubsequentCalls gets a reference to the given map[string]interface{} and assigns it to the SubsequentCalls field. -func (o *TransferInitializationV1Request) SetSubsequentCalls(v map[string]interface{}) { - o.SubsequentCalls = v -} - -// GetHistories returns the Histories field value if set, zero value otherwise. -func (o *TransferInitializationV1Request) GetHistories() []History { - if o == nil || IsNil(o.Histories) { - var ret []History - return ret - } - return o.Histories -} - -// GetHistoriesOk returns a tuple with the Histories field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetHistoriesOk() ([]History, bool) { - if o == nil || IsNil(o.Histories) { - return nil, false - } - return o.Histories, true -} - -// HasHistories returns a boolean if a field has been set. -func (o *TransferInitializationV1Request) HasHistories() bool { - if o != nil && !IsNil(o.Histories) { - return true - } - - return false -} - -// SetHistories gets a reference to the given []History and assigns it to the Histories field. -func (o *TransferInitializationV1Request) SetHistories(v []History) { - o.Histories = v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *TransferInitializationV1Request) GetSequenceNumber() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetSequenceNumberOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *TransferInitializationV1Request) SetSequenceNumber(v int32) { - o.SequenceNumber = v -} - -// GetSourceBasePath returns the SourceBasePath field value -func (o *TransferInitializationV1Request) GetSourceBasePath() string { - if o == nil { - var ret string - return ret - } - - return o.SourceBasePath -} - -// GetSourceBasePathOk returns a tuple with the SourceBasePath field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetSourceBasePathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SourceBasePath, true -} - -// SetSourceBasePath sets field value -func (o *TransferInitializationV1Request) SetSourceBasePath(v string) { - o.SourceBasePath = v -} - -// GetRecipientBasePath returns the RecipientBasePath field value -func (o *TransferInitializationV1Request) GetRecipientBasePath() string { - if o == nil { - var ret string - return ret - } - - return o.RecipientBasePath -} - -// GetRecipientBasePathOk returns a tuple with the RecipientBasePath field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetRecipientBasePathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RecipientBasePath, true -} - -// SetRecipientBasePath sets field value -func (o *TransferInitializationV1Request) SetRecipientBasePath(v string) { - o.RecipientBasePath = v -} - -// GetMaxRetries returns the MaxRetries field value -func (o *TransferInitializationV1Request) GetMaxRetries() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.MaxRetries -} - -// GetMaxRetriesOk returns a tuple with the MaxRetries field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetMaxRetriesOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.MaxRetries, true -} - -// SetMaxRetries sets field value -func (o *TransferInitializationV1Request) SetMaxRetries(v float32) { - o.MaxRetries = v -} - -// GetMaxTimeout returns the MaxTimeout field value -func (o *TransferInitializationV1Request) GetMaxTimeout() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.MaxTimeout -} - -// GetMaxTimeoutOk returns a tuple with the MaxTimeout field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetMaxTimeoutOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.MaxTimeout, true -} - -// SetMaxTimeout sets field value -func (o *TransferInitializationV1Request) SetMaxTimeout(v float32) { - o.MaxTimeout = v -} - -// GetBackupGatewaysAllowed returns the BackupGatewaysAllowed field value -func (o *TransferInitializationV1Request) GetBackupGatewaysAllowed() []string { - if o == nil { - var ret []string - return ret - } - - return o.BackupGatewaysAllowed -} - -// GetBackupGatewaysAllowedOk returns a tuple with the BackupGatewaysAllowed field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetBackupGatewaysAllowedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.BackupGatewaysAllowed, true -} - -// SetBackupGatewaysAllowed sets field value -func (o *TransferInitializationV1Request) SetBackupGatewaysAllowed(v []string) { - o.BackupGatewaysAllowed = v -} - -// GetRecipientLedgerAssetID returns the RecipientLedgerAssetID field value -func (o *TransferInitializationV1Request) GetRecipientLedgerAssetID() string { - if o == nil { - var ret string - return ret - } - - return o.RecipientLedgerAssetID -} - -// GetRecipientLedgerAssetIDOk returns a tuple with the RecipientLedgerAssetID field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetRecipientLedgerAssetIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RecipientLedgerAssetID, true -} - -// SetRecipientLedgerAssetID sets field value -func (o *TransferInitializationV1Request) SetRecipientLedgerAssetID(v string) { - o.RecipientLedgerAssetID = v -} - -// GetSourceLedgerAssetID returns the SourceLedgerAssetID field value -func (o *TransferInitializationV1Request) GetSourceLedgerAssetID() string { - if o == nil { - var ret string - return ret - } - - return o.SourceLedgerAssetID -} - -// GetSourceLedgerAssetIDOk returns a tuple with the SourceLedgerAssetID field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Request) GetSourceLedgerAssetIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SourceLedgerAssetID, true -} - -// SetSourceLedgerAssetID sets field value -func (o *TransferInitializationV1Request) SetSourceLedgerAssetID(v string) { - o.SourceLedgerAssetID = v -} - -func (o TransferInitializationV1Request) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransferInitializationV1Request) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["messageType"] = o.MessageType - toSerialize["sessionID"] = o.SessionID - if !IsNil(o.Version) { - toSerialize["version"] = o.Version - } - if !IsNil(o.DeveloperURN) { - toSerialize["developerURN"] = o.DeveloperURN - } - if !IsNil(o.CredentialProfile) { - toSerialize["credentialProfile"] = o.CredentialProfile - } - toSerialize["payloadProfile"] = o.PayloadProfile - toSerialize["applicationProfile"] = o.ApplicationProfile - toSerialize["loggingProfile"] = o.LoggingProfile - toSerialize["accessControlProfile"] = o.AccessControlProfile - toSerialize["signature"] = o.Signature - toSerialize["sourceGatewayPubkey"] = o.SourceGatewayPubkey - toSerialize["sourceGatewayDltSystem"] = o.SourceGatewayDltSystem - toSerialize["recipientGatewayPubkey"] = o.RecipientGatewayPubkey - toSerialize["recipientGatewayDltSystem"] = o.RecipientGatewayDltSystem - if !IsNil(o.EscrowType) { - toSerialize["escrowType"] = o.EscrowType - } - if !IsNil(o.ExpiryTime) { - toSerialize["expiryTime"] = o.ExpiryTime - } - if !IsNil(o.MultipleClaimsAllowed) { - toSerialize["multipleClaimsAllowed"] = o.MultipleClaimsAllowed - } - if !IsNil(o.MultipleCancelsAllowed) { - toSerialize["multipleCancelsAllowed"] = o.MultipleCancelsAllowed - } - if !IsNil(o.Permissions) { - toSerialize["permissions"] = o.Permissions - } - if !IsNil(o.Origin) { - toSerialize["origin"] = o.Origin - } - if !IsNil(o.Destination) { - toSerialize["destination"] = o.Destination - } - if !IsNil(o.SubsequentCalls) { - toSerialize["subsequentCalls"] = o.SubsequentCalls - } - if !IsNil(o.Histories) { - toSerialize["histories"] = o.Histories - } - toSerialize["sequenceNumber"] = o.SequenceNumber - toSerialize["sourceBasePath"] = o.SourceBasePath - toSerialize["recipientBasePath"] = o.RecipientBasePath - toSerialize["maxRetries"] = o.MaxRetries - toSerialize["maxTimeout"] = o.MaxTimeout - toSerialize["backupGatewaysAllowed"] = o.BackupGatewaysAllowed - toSerialize["recipientLedgerAssetID"] = o.RecipientLedgerAssetID - toSerialize["sourceLedgerAssetID"] = o.SourceLedgerAssetID - return toSerialize, nil -} - -type NullableTransferInitializationV1Request struct { - value *TransferInitializationV1Request - isSet bool -} - -func (v NullableTransferInitializationV1Request) Get() *TransferInitializationV1Request { - return v.value -} - -func (v *NullableTransferInitializationV1Request) Set(val *TransferInitializationV1Request) { - v.value = val - v.isSet = true -} - -func (v NullableTransferInitializationV1Request) IsSet() bool { - return v.isSet -} - -func (v *NullableTransferInitializationV1Request) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransferInitializationV1Request(val *TransferInitializationV1Request) *NullableTransferInitializationV1Request { - return &NullableTransferInitializationV1Request{value: val, isSet: true} -} - -func (v NullableTransferInitializationV1Request) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransferInitializationV1Request) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_initialization_v1_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_initialization_v1_response.go deleted file mode 100644 index 0fc1dd8548..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/model_transfer_initialization_v1_response.go +++ /dev/null @@ -1,405 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" -) - -// checks if the TransferInitializationV1Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransferInitializationV1Response{} - -// TransferInitializationV1Response struct for TransferInitializationV1Response -type TransferInitializationV1Response struct { - MessageType string `json:"messageType"` - SessionID string `json:"sessionID"` - SequenceNumber float32 `json:"sequenceNumber"` - OdapPhase *string `json:"odapPhase,omitempty"` - InitialRequestMessageHash string `json:"initialRequestMessageHash"` - Destination *string `json:"destination,omitempty"` - TimeStamp string `json:"timeStamp"` - ProcessedTimeStamp string `json:"processedTimeStamp"` - ServerIdentityPubkey string `json:"serverIdentityPubkey"` - Signature string `json:"signature"` - BackupGatewaysAllowed []string `json:"backupGatewaysAllowed"` -} - -// NewTransferInitializationV1Response instantiates a new TransferInitializationV1Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransferInitializationV1Response(messageType string, sessionID string, sequenceNumber float32, initialRequestMessageHash string, timeStamp string, processedTimeStamp string, serverIdentityPubkey string, signature string, backupGatewaysAllowed []string) *TransferInitializationV1Response { - this := TransferInitializationV1Response{} - this.MessageType = messageType - this.SessionID = sessionID - this.SequenceNumber = sequenceNumber - this.InitialRequestMessageHash = initialRequestMessageHash - this.TimeStamp = timeStamp - this.ProcessedTimeStamp = processedTimeStamp - this.ServerIdentityPubkey = serverIdentityPubkey - this.Signature = signature - this.BackupGatewaysAllowed = backupGatewaysAllowed - return &this -} - -// NewTransferInitializationV1ResponseWithDefaults instantiates a new TransferInitializationV1Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransferInitializationV1ResponseWithDefaults() *TransferInitializationV1Response { - this := TransferInitializationV1Response{} - return &this -} - -// GetMessageType returns the MessageType field value -func (o *TransferInitializationV1Response) GetMessageType() string { - if o == nil { - var ret string - return ret - } - - return o.MessageType -} - -// GetMessageTypeOk returns a tuple with the MessageType field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetMessageTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MessageType, true -} - -// SetMessageType sets field value -func (o *TransferInitializationV1Response) SetMessageType(v string) { - o.MessageType = v -} - -// GetSessionID returns the SessionID field value -func (o *TransferInitializationV1Response) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *TransferInitializationV1Response) SetSessionID(v string) { - o.SessionID = v -} - -// GetSequenceNumber returns the SequenceNumber field value -func (o *TransferInitializationV1Response) GetSequenceNumber() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.SequenceNumber -} - -// GetSequenceNumberOk returns a tuple with the SequenceNumber field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetSequenceNumberOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.SequenceNumber, true -} - -// SetSequenceNumber sets field value -func (o *TransferInitializationV1Response) SetSequenceNumber(v float32) { - o.SequenceNumber = v -} - -// GetOdapPhase returns the OdapPhase field value if set, zero value otherwise. -func (o *TransferInitializationV1Response) GetOdapPhase() string { - if o == nil || IsNil(o.OdapPhase) { - var ret string - return ret - } - return *o.OdapPhase -} - -// GetOdapPhaseOk returns a tuple with the OdapPhase field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetOdapPhaseOk() (*string, bool) { - if o == nil || IsNil(o.OdapPhase) { - return nil, false - } - return o.OdapPhase, true -} - -// HasOdapPhase returns a boolean if a field has been set. -func (o *TransferInitializationV1Response) HasOdapPhase() bool { - if o != nil && !IsNil(o.OdapPhase) { - return true - } - - return false -} - -// SetOdapPhase gets a reference to the given string and assigns it to the OdapPhase field. -func (o *TransferInitializationV1Response) SetOdapPhase(v string) { - o.OdapPhase = &v -} - -// GetInitialRequestMessageHash returns the InitialRequestMessageHash field value -func (o *TransferInitializationV1Response) GetInitialRequestMessageHash() string { - if o == nil { - var ret string - return ret - } - - return o.InitialRequestMessageHash -} - -// GetInitialRequestMessageHashOk returns a tuple with the InitialRequestMessageHash field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetInitialRequestMessageHashOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.InitialRequestMessageHash, true -} - -// SetInitialRequestMessageHash sets field value -func (o *TransferInitializationV1Response) SetInitialRequestMessageHash(v string) { - o.InitialRequestMessageHash = v -} - -// GetDestination returns the Destination field value if set, zero value otherwise. -func (o *TransferInitializationV1Response) GetDestination() string { - if o == nil || IsNil(o.Destination) { - var ret string - return ret - } - return *o.Destination -} - -// GetDestinationOk returns a tuple with the Destination field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetDestinationOk() (*string, bool) { - if o == nil || IsNil(o.Destination) { - return nil, false - } - return o.Destination, true -} - -// HasDestination returns a boolean if a field has been set. -func (o *TransferInitializationV1Response) HasDestination() bool { - if o != nil && !IsNil(o.Destination) { - return true - } - - return false -} - -// SetDestination gets a reference to the given string and assigns it to the Destination field. -func (o *TransferInitializationV1Response) SetDestination(v string) { - o.Destination = &v -} - -// GetTimeStamp returns the TimeStamp field value -func (o *TransferInitializationV1Response) GetTimeStamp() string { - if o == nil { - var ret string - return ret - } - - return o.TimeStamp -} - -// GetTimeStampOk returns a tuple with the TimeStamp field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetTimeStampOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TimeStamp, true -} - -// SetTimeStamp sets field value -func (o *TransferInitializationV1Response) SetTimeStamp(v string) { - o.TimeStamp = v -} - -// GetProcessedTimeStamp returns the ProcessedTimeStamp field value -func (o *TransferInitializationV1Response) GetProcessedTimeStamp() string { - if o == nil { - var ret string - return ret - } - - return o.ProcessedTimeStamp -} - -// GetProcessedTimeStampOk returns a tuple with the ProcessedTimeStamp field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetProcessedTimeStampOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ProcessedTimeStamp, true -} - -// SetProcessedTimeStamp sets field value -func (o *TransferInitializationV1Response) SetProcessedTimeStamp(v string) { - o.ProcessedTimeStamp = v -} - -// GetServerIdentityPubkey returns the ServerIdentityPubkey field value -func (o *TransferInitializationV1Response) GetServerIdentityPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.ServerIdentityPubkey -} - -// GetServerIdentityPubkeyOk returns a tuple with the ServerIdentityPubkey field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetServerIdentityPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ServerIdentityPubkey, true -} - -// SetServerIdentityPubkey sets field value -func (o *TransferInitializationV1Response) SetServerIdentityPubkey(v string) { - o.ServerIdentityPubkey = v -} - -// GetSignature returns the Signature field value -func (o *TransferInitializationV1Response) GetSignature() string { - if o == nil { - var ret string - return ret - } - - return o.Signature -} - -// GetSignatureOk returns a tuple with the Signature field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetSignatureOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Signature, true -} - -// SetSignature sets field value -func (o *TransferInitializationV1Response) SetSignature(v string) { - o.Signature = v -} - -// GetBackupGatewaysAllowed returns the BackupGatewaysAllowed field value -func (o *TransferInitializationV1Response) GetBackupGatewaysAllowed() []string { - if o == nil { - var ret []string - return ret - } - - return o.BackupGatewaysAllowed -} - -// GetBackupGatewaysAllowedOk returns a tuple with the BackupGatewaysAllowed field value -// and a boolean to check if the value has been set. -func (o *TransferInitializationV1Response) GetBackupGatewaysAllowedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.BackupGatewaysAllowed, true -} - -// SetBackupGatewaysAllowed sets field value -func (o *TransferInitializationV1Response) SetBackupGatewaysAllowed(v []string) { - o.BackupGatewaysAllowed = v -} - -func (o TransferInitializationV1Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransferInitializationV1Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["messageType"] = o.MessageType - toSerialize["sessionID"] = o.SessionID - toSerialize["sequenceNumber"] = o.SequenceNumber - if !IsNil(o.OdapPhase) { - toSerialize["odapPhase"] = o.OdapPhase - } - toSerialize["initialRequestMessageHash"] = o.InitialRequestMessageHash - if !IsNil(o.Destination) { - toSerialize["destination"] = o.Destination - } - toSerialize["timeStamp"] = o.TimeStamp - toSerialize["processedTimeStamp"] = o.ProcessedTimeStamp - toSerialize["serverIdentityPubkey"] = o.ServerIdentityPubkey - toSerialize["signature"] = o.Signature - toSerialize["backupGatewaysAllowed"] = o.BackupGatewaysAllowed - return toSerialize, nil -} - -type NullableTransferInitializationV1Response struct { - value *TransferInitializationV1Response - isSet bool -} - -func (v NullableTransferInitializationV1Response) Get() *TransferInitializationV1Response { - return v.value -} - -func (v *NullableTransferInitializationV1Response) Set(val *TransferInitializationV1Response) { - v.value = val - v.isSet = true -} - -func (v NullableTransferInitializationV1Response) IsSet() bool { - return v.isSet -} - -func (v *NullableTransferInitializationV1Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransferInitializationV1Response(val *TransferInitializationV1Response) *NullableTransferInitializationV1Response { - return &NullableTransferInitializationV1Response{value: val, isSet: true} -} - -func (v NullableTransferInitializationV1Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransferInitializationV1Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/response.go deleted file mode 100644 index ca470973bd..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 72e567c5bc..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,224 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-satp-hermes - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-satp-hermes_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService ClientRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.ClientRequestV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase1TransferInitiationRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase1TransferInitiationRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase1TransferInitiationResponseV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase1TransferInitiationResponseV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase2LockEvidenceRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase2LockEvidenceRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase2LockEvidenceResponseV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase2LockEvidenceResponseV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase2TransferCommenceRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase2TransferCommenceRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase2TransferCommenceResponseV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase2TransferCommenceResponseV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase3CommitFinalRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase3CommitFinalRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase3CommitFinalResponseV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase3CommitFinalResponseV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase3CommitPreparationRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase3CommitPreparationRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase3CommitPreparationResponseV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase3CommitPreparationResponseV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase3TransferCompleteRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase3TransferCompleteRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RecoverUpdateAckV1Message", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RecoverUpdateAckV1Message(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RecoverUpdateV1Message", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RecoverUpdateV1Message(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RecoverV1Message", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RecoverV1Message(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RecoverV1Success", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RecoverV1Success(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RollbackAckV1Message", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RollbackAckV1Message(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RollbackV1Message", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RollbackV1Message(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/utils.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/utils.go deleted file mode 100644 index b83a09e0e6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cactus-plugin-satp-hermes - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/json/openapi.json b/packages/cactus-plugin-satp-hermes/src/main/json/openapi.json deleted file mode 100644 index ed0fdbe78b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/json/openapi.json +++ /dev/null @@ -1,1765 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Odap Hermes", - "description": "Implementation for Odap and Hermes", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "CredentialProfile": { - "type": "string", - "enum": ["SAML", "OAUTH", "X509"] - }, - "PayloadProfile": { - "type": "object", - "properties": { - "assetProfile": { - "$ref": "#/components/schemas/AssetProfile" - }, - "capabilities": { - "type": "string" - } - }, - "required": ["assetProfile"] - }, - "ApplicationProfile": { - "type": "object" - }, - "Payload": { - "type": "object" - }, - "AssetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": ["expirationDate"] - }, - "LoggingProfile": { - "type": "array", - "items": { - "type": "string" - } - }, - "AccessControlProfile": { - "type": "array", - "items": { - "type": "string" - } - }, - "Permissions": { - "type": "object" - }, - "Transaction": { - "type": "object" - }, - "ActionCategory": { - "type": "object" - }, - "History": { - "type": "object", - "properties": { - "Transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transaction" - } - }, - "Actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActionCategory" - } - }, - "Origin": { - "type": "string" - }, - "Destination": { - "type": "string" - }, - "Balance": { - "type": "string" - }, - "CurrentStatus": { - "type": "object" - }, - "ApplicationSpecificParameters": { - "type": "object" - } - } - }, - "SenderDltSystem": { - "type": "object" - }, - "RecipientDltSystem": { - "type": "object" - }, - "LockEvidenceClaim": { - "type": "object" - }, - "LockClaimFormat": { - "type": "object" - }, - "CommitFinalClaim": { - "type": "object" - }, - "CommitFinalClaimFormat": { - "type": "object" - }, - "CommitAcknowledgementClaim": { - "type": "object" - }, - "CommitAcknowledgementClaimFormat": { - "type": "object" - }, - "SessionData": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "step": { - "type": "number" - }, - "version": { - "type": "string" - }, - "lastSequenceNumber": { - "type": "number" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "applicationProfile": { - "type": "string" - }, - "payloadProfile": { - "$ref": "#/components/schemas/PayloadProfile" - }, - "assetProfile": { - "$ref": "#/components/schemas/AssetProfile" - }, - "allowedSourceBackupGateways": { - "type": "array", - "items": { - "type": "string" - } - }, - "allowedRecipientBackupGateways": { - "type": "array", - "items": { - "type": "string" - } - }, - "sourceBasePath": { - "type": "string" - }, - "recipientBasePath": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "sourceGatewayPubkey": { - "type": "string" - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "initializationRequestMessageHash": { - "type": "string" - }, - "initializationResponseMessageHash": { - "type": "string" - }, - "initializationRequestMessageRcvTimeStamp": { - "type": "string" - }, - "initializationRequestMessageProcessedTimeStamp": { - "type": "string" - }, - "clientSignatureInitializationRequestMessage": { - "type": "string" - }, - "serverSignatureInitializationResponseMessage": { - "type": "string" - }, - "transferCommenceMessageRequestHash": { - "type": "string" - }, - "transferCommenceMessageResponseHash": { - "type": "string" - }, - "clientSignatureTransferCommenceRequestMessage": { - "type": "string" - }, - "serverSignatureTransferCommenceResponseMessage": { - "type": "string" - }, - "lockEvidenceRequestMessageHash": { - "type": "string" - }, - "lockEvidenceResponseMessageHash": { - "type": "string" - }, - "clientSignatureLockEvidenceRequestMessage": { - "type": "string" - }, - "serverSignatureLockEvidenceResponseMessage": { - "type": "string" - }, - "lockEvidenceClaim": { - "type": "string" - }, - "commitPrepareRequestMessageHash": { - "type": "string" - }, - "commitPrepareResponseMessageHash": { - "type": "string" - }, - "clientSignatureCommitPreparationRequestMessage": { - "type": "string" - }, - "serverSignatureCommitPreparationResponseMessage": { - "type": "string" - }, - "commitFinalRequestMessageHash": { - "type": "string" - }, - "commitFinalResponseMessageHash": { - "type": "string" - }, - "commitFinalClaim": { - "type": "string" - }, - "commitFinalClaimFormat": { - "type": "string" - }, - "commitAcknowledgementClaim": { - "type": "string" - }, - "commitAcknowledgementClaimFormat": { - "type": "string" - }, - "clientSignatureCommitFinalRequestMessage": { - "type": "string" - }, - "serverSignatureCommitFinalResponseMessage": { - "type": "string" - }, - "transferCompleteMessageHash": { - "type": "string" - }, - "clientSignatureTransferCompleteMessage": { - "type": "string" - }, - "maxRetries": { - "type": "number" - }, - "recipientLedgerAssetID": { - "type": "string" - }, - "sourceLedgerAssetID": { - "type": "string" - }, - "maxTimeout": { - "type": "number" - }, - "lastLogEntryTimestamp": { - "type": "string" - }, - "unlockAssetClaim": { - "type": "string" - }, - "recreateAssetClaim": { - "type": "string" - }, - "deleteAssetClaim": { - "type": "string" - }, - "lastMessageReceivedTimestamp": { - "type": "string" - }, - "rollback": { - "type": "boolean" - }, - "rollbackMessageHash": { - "type": "string" - }, - "rollbackProofs": { - "type": "array", - "items": { - "type": "string" - } - }, - "rollbackActionsPerformed": { - "type": "array", - "items": { - "type": "string", - "enum": ["CREATE", "DELETE", "LOCK", "UNLOCK"] - } - } - } - }, - "TransferInitializationV1Request": { - "type": "object", - "properties": { - "messageType": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "version": { - "type": "string" - }, - "developerURN": { - "type": "string" - }, - "credentialProfile": { - "$ref": "#/components/schemas/CredentialProfile" - }, - "payloadProfile": { - "$ref": "#/components/schemas/PayloadProfile" - }, - "applicationProfile": { - "type": "string" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "sourceGatewayPubkey": { - "type": "string" - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "escrowType": { - "type": "string", - "enum": [ - "FAUCET", - "TIMELOCK", - "HASHLOCK", - "HASHTIMELOCK", - "MULTICLAIMPC", - "DESTROY", - "BURN" - ] - }, - "expiryTime": { - "type": "string" - }, - "multipleClaimsAllowed": { - "type": "boolean" - }, - "multipleCancelsAllowed": { - "type": "boolean" - }, - "permissions": { - "$ref": "#/components/schemas/Permissions" - }, - "origin": { - "type": "string" - }, - "destination": { - "type": "string" - }, - "subsequentCalls": { - "type": "object" - }, - "histories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/History" - } - }, - "sequenceNumber": { - "type": "integer" - }, - "sourceBasePath": { - "type": "string" - }, - "recipientBasePath": { - "type": "string" - }, - "maxRetries": { - "type": "number" - }, - "maxTimeout": { - "type": "number" - }, - "backupGatewaysAllowed": { - "type": "array", - "items": { - "type": "string" - } - }, - "recipientLedgerAssetID": { - "type": "string" - }, - "sourceLedgerAssetID": { - "type": "string" - } - }, - "required": [ - "messageType", - "sessionID", - "loggingProfile", - "accessControlProfile", - "payloadProfile", - "applicationProfile", - "signature", - "sourceGatewayPubkey", - "sourceGatewayDltSystem", - "recipientGatewayPubkey", - "recipientGatewayDltSystem", - "sequenceNumber", - "sourceBasePath", - "recipientBasePath", - "maxRetries", - "maxTimeout", - "backupGatewaysAllowed", - "recipientLedgerAssetID", - "sourceLedgerAssetID" - ] - }, - "TransferInitializationV1Response": { - "type": "object", - "properties": { - "messageType": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - }, - "odapPhase": { - "type": "string", - "enum": [ - "TransferInitialization", - "LockEvidenceVerification", - "CommitmentEstablishment" - ] - }, - "initialRequestMessageHash": { - "type": "string" - }, - "destination": { - "type": "string" - }, - "timeStamp": { - "type": "string" - }, - "processedTimeStamp": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "backupGatewaysAllowed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "messageType", - "initialRequestMessageHash", - "timeStamp", - "processedTimeStamp", - "sessionID", - "serverIdentityPubkey", - "sequenceNumber", - "signature", - "backupGatewaysAllowed" - ] - }, - "TransferCommenceV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "senderDltSystem": { - "type": "string" - }, - "recipientDltSystem": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashAssetProfile": { - "type": "string" - }, - "assetUnit": { - "type": "integer" - }, - "hashPrevMessage": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "integer" - } - }, - "required": [ - "sessionID", - "messageType", - "originatorPubkey", - "beneficiaryPubkey", - "senderDltSystem", - "recipientDltSystem", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashAssetProfile", - "hashPrevMessage", - "signature", - "sequenceNumber" - ] - }, - "TransferCommenceV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommenceRequest": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "messageHash": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "serverIdentityPubkey", - "clientIdentityPubkey", - "hashCommenceRequest", - "signature", - "sequenceNumber" - ] - }, - "LockEvidenceV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "lockEvidenceClaim": { - "type": "string" - }, - "lockEvidenceFormat": { - "$ref": "#/components/schemas/LockClaimFormat", - "nullable": true - }, - "lockEvidenceExpiration": { - "type": "string" - }, - "hashCommenceAckRequest": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "messageHash": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "lockEvidenceClaim", - "lockEvidenceExpiration", - "hashCommenceAckRequest", - "signature", - "sequenceNumber" - ] - }, - "LockEvidenceV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashLockEvidenceRequest": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashLockEvidenceRequest", - "signature", - "sequenceNumber" - ] - }, - "CommitPreparationV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashLockEvidenceAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashLockEvidenceAck", - "signature", - "sequenceNumber" - ] - }, - "CommitPreparationV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommitPrep": { - "type": "string" - }, - "serverTransferNumber": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashCommitPrep", - "signature", - "sequenceNumber" - ] - }, - "CommitFinalV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "commitFinalClaim": { - "type": "string" - }, - "commitFinalClaimFormat": { - "$ref": "#/components/schemas/CommitFinalClaimFormat" - }, - "hashCommitPrepareAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "commitFinalClaim", - "hashCommitPrepareAck", - "signature", - "sequenceNumber" - ] - }, - "CommitFinalV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "commitAcknowledgementClaim": { - "type": "string" - }, - "commitAcknowledgementClaimFormat": { - "$ref": "#/components/schemas/CommitAcknowledgementClaimFormat" - }, - "hashCommitFinal": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "commitAcknowledgementClaim", - "hashCommitFinal", - "signature", - "sequenceNumber" - ] - }, - "TransferCompleteV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommitFinalAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "hashTransferCommence": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashCommitFinalAck", - "signature", - "hashTransferCommence", - "sequenceNumber" - ] - }, - "ClientV1Request": { - "type": "object", - "properties": { - "version": { - "type": "string" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "assetControlProfile": { - "type": "string" - }, - "applicationProfile": { - "type": "string" - }, - "assetProfile": { - "$ref": "#/components/schemas/AssetProfile" - }, - "payloadProfile": { - "$ref": "#/components/schemas/PayloadProfile" - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "clientDltSystem": { - "type": "string" - }, - "serverDltSystem": { - "type": "string" - }, - "clientGatewayConfiguration": { - "type": "object", - "properties": { - "apiHost": { - "type": "string" - } - }, - "required": ["apiHost"] - }, - "serverGatewayConfiguration": { - "type": "object", - "properties": { - "apiHost": { - "type": "string" - } - }, - "required": ["apiHost"] - }, - "maxRetries": { - "type": "number" - }, - "maxTimeout": { - "type": "number" - }, - "sourceLedgerAssetID": { - "type": "string" - }, - "recipientLedgerAssetID": { - "type": "string" - } - }, - "required": [ - "version", - "loggingProfile", - "accessControlProfile", - "assetControlProfile", - "applicationProfile", - "assetProfile", - "payloadProfile", - "sourceGatewayDltSystem", - "recipientGatewayDltSystem", - "recipientGatewayPubkey", - "originatorPubkey", - "beneficiaryPubkey", - "clientIdentityPubkey", - "serverIdentityPubkey", - "clientDltSystem", - "serverDltSystem", - "clientGatewayConfiguration", - "serverGatewayConfiguration", - "maxRetries", - "maxTimeout", - "sourceLedgerAssetID", - "recipientLedgerAssetID" - ] - }, - "RecoverV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "odapPhase": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - }, - "lastLogEntryTimestamp": { - "type": "string" - }, - "isBackup": { - "type": "boolean" - }, - "newBasePath": { - "type": "string" - }, - "newGatewayPubKey": { - "type": "string" - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "odapPhase", - "sequenceNumber", - "lastLogEntryTimestamp", - "isBackup", - "newBasePath", - "signature" - ] - }, - "RecoverUpdateV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "recoveredLogs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalLog" - } - }, - "signature": { - "type": "string" - } - }, - "required": ["sessionID", "recoveredLogs", "signature"] - }, - "RecoverUpdateAckV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "changedEntriesHash": { - "type": "array", - "items": { - "type": "string" - } - }, - "signature": { - "type": "string" - } - }, - "required": ["sessionID", "success", "changedEntriesHash", "signature"] - }, - "RecoverSuccessV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "signature": { - "type": "string" - } - }, - "required": ["sessionID", "success", "signature"] - }, - "RollbackV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "actionPerformed": { - "type": "array", - "items": { - "type": "string" - } - }, - "proofs": { - "type": "array", - "items": { - "type": "string" - } - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "success", - "actionPerformed", - "proofs", - "signature" - ] - }, - "RollbackAckV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "signature": { - "type": "string" - } - }, - "required": ["sessionID", "success", "signature"] - }, - "LocalLog": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "data": { - "type": "string" - }, - "type": { - "type": "string" - }, - "operation": { - "type": "string" - }, - "timestamp": { - "type": "string" - } - }, - "required": ["sessionID", "type", "operation"] - }, - "SatpMessage": { - "type": "object", - "properties": { - "SequenceNumber": { - "type": "number" - }, - "Phase": { - "type": "string", - "enum": [ - "TransferInitialization", - "LockEvidenceVerification", - "CommitmentEstablishment" - ] - }, - "ResourceURL": { - "type": "string" - }, - "DeveloperURN": { - "type": "string" - }, - "ActionResponse": { - "type": "object", - "properties": { - "ResponseCode": { - "type": "string", - "enum": ["200", "404"], - "x-enum-varnames": ["OK", "RESOURCE_NOT_FOUND"] - }, - "Arguments": { - "type": "array", - "items": {} - } - } - }, - "CredentialProfile": { - "type": "string", - "enum": ["SAML", "OAuth", "X509"] - }, - "CredentialBlock": { - "type": "array", - "items": {} - }, - "CredentialsProfile": { - "$ref": "#/components/schemas/PayloadProfile" - }, - "ApplicationProfile": { - "$ref": "#/components/schemas/ApplicationProfile" - }, - "Payload": { - "$ref": "#/components/schemas/Payload" - }, - "PayloadHash": { - "type": "string" - }, - "MessageSignature": { - "type": "string" - } - } - } - } - }, - "paths": { - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" - } - }, - "operationId": "phase1TransferInitiationRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferInitializationV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" - } - }, - "operationId": "phase2TransferCommenceRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferCommenceV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" - } - }, - "operationId": "phase2LockEvidenceRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LockEvidenceV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" - } - }, - "operationId": "phase3CommitPreparationRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitPreparationV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" - } - }, - "operationId": "phase3CommitFinalRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitFinalV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" - } - }, - "operationId": "phase3TransferCompleteRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferCompleteV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest" - } - }, - "operationId": "clientRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" - } - }, - "operationId": "phase1TransferInitiationResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferInitializationV1Response" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" - } - }, - "operationId": "phase2TransferCommenceResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferCommenceV1Response" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" - } - }, - "operationId": "phase2LockEvidenceResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LockEvidenceV1Response" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" - } - }, - "operationId": "phase3CommitPreparationResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitPreparationV1Response" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" - } - }, - "operationId": "phase3CommitFinalResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitFinalV1Response" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" - } - }, - "operationId": "RecoverV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecoverV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" - } - }, - "operationId": "RecoverUpdateV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecoverUpdateV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" - } - }, - "operationId": "RecoverUpdateAckV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecoverUpdateAckV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" - } - }, - "operationId": "RecoverV1Success", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecoverSuccessV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" - } - }, - "operationId": "RollbackV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RollbackV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" - } - }, - "operationId": "RollbackAckV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RollbackAckV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/json/openapi.tpl.json b/packages/cactus-plugin-satp-hermes/src/main/json/openapi.tpl.json deleted file mode 100644 index ed0fdbe78b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/json/openapi.tpl.json +++ /dev/null @@ -1,1765 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Odap Hermes", - "description": "Implementation for Odap and Hermes", - "version": "2.0.0", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "CredentialProfile": { - "type": "string", - "enum": ["SAML", "OAUTH", "X509"] - }, - "PayloadProfile": { - "type": "object", - "properties": { - "assetProfile": { - "$ref": "#/components/schemas/AssetProfile" - }, - "capabilities": { - "type": "string" - } - }, - "required": ["assetProfile"] - }, - "ApplicationProfile": { - "type": "object" - }, - "Payload": { - "type": "object" - }, - "AssetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": ["expirationDate"] - }, - "LoggingProfile": { - "type": "array", - "items": { - "type": "string" - } - }, - "AccessControlProfile": { - "type": "array", - "items": { - "type": "string" - } - }, - "Permissions": { - "type": "object" - }, - "Transaction": { - "type": "object" - }, - "ActionCategory": { - "type": "object" - }, - "History": { - "type": "object", - "properties": { - "Transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transaction" - } - }, - "Actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActionCategory" - } - }, - "Origin": { - "type": "string" - }, - "Destination": { - "type": "string" - }, - "Balance": { - "type": "string" - }, - "CurrentStatus": { - "type": "object" - }, - "ApplicationSpecificParameters": { - "type": "object" - } - } - }, - "SenderDltSystem": { - "type": "object" - }, - "RecipientDltSystem": { - "type": "object" - }, - "LockEvidenceClaim": { - "type": "object" - }, - "LockClaimFormat": { - "type": "object" - }, - "CommitFinalClaim": { - "type": "object" - }, - "CommitFinalClaimFormat": { - "type": "object" - }, - "CommitAcknowledgementClaim": { - "type": "object" - }, - "CommitAcknowledgementClaimFormat": { - "type": "object" - }, - "SessionData": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "step": { - "type": "number" - }, - "version": { - "type": "string" - }, - "lastSequenceNumber": { - "type": "number" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "applicationProfile": { - "type": "string" - }, - "payloadProfile": { - "$ref": "#/components/schemas/PayloadProfile" - }, - "assetProfile": { - "$ref": "#/components/schemas/AssetProfile" - }, - "allowedSourceBackupGateways": { - "type": "array", - "items": { - "type": "string" - } - }, - "allowedRecipientBackupGateways": { - "type": "array", - "items": { - "type": "string" - } - }, - "sourceBasePath": { - "type": "string" - }, - "recipientBasePath": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "sourceGatewayPubkey": { - "type": "string" - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "initializationRequestMessageHash": { - "type": "string" - }, - "initializationResponseMessageHash": { - "type": "string" - }, - "initializationRequestMessageRcvTimeStamp": { - "type": "string" - }, - "initializationRequestMessageProcessedTimeStamp": { - "type": "string" - }, - "clientSignatureInitializationRequestMessage": { - "type": "string" - }, - "serverSignatureInitializationResponseMessage": { - "type": "string" - }, - "transferCommenceMessageRequestHash": { - "type": "string" - }, - "transferCommenceMessageResponseHash": { - "type": "string" - }, - "clientSignatureTransferCommenceRequestMessage": { - "type": "string" - }, - "serverSignatureTransferCommenceResponseMessage": { - "type": "string" - }, - "lockEvidenceRequestMessageHash": { - "type": "string" - }, - "lockEvidenceResponseMessageHash": { - "type": "string" - }, - "clientSignatureLockEvidenceRequestMessage": { - "type": "string" - }, - "serverSignatureLockEvidenceResponseMessage": { - "type": "string" - }, - "lockEvidenceClaim": { - "type": "string" - }, - "commitPrepareRequestMessageHash": { - "type": "string" - }, - "commitPrepareResponseMessageHash": { - "type": "string" - }, - "clientSignatureCommitPreparationRequestMessage": { - "type": "string" - }, - "serverSignatureCommitPreparationResponseMessage": { - "type": "string" - }, - "commitFinalRequestMessageHash": { - "type": "string" - }, - "commitFinalResponseMessageHash": { - "type": "string" - }, - "commitFinalClaim": { - "type": "string" - }, - "commitFinalClaimFormat": { - "type": "string" - }, - "commitAcknowledgementClaim": { - "type": "string" - }, - "commitAcknowledgementClaimFormat": { - "type": "string" - }, - "clientSignatureCommitFinalRequestMessage": { - "type": "string" - }, - "serverSignatureCommitFinalResponseMessage": { - "type": "string" - }, - "transferCompleteMessageHash": { - "type": "string" - }, - "clientSignatureTransferCompleteMessage": { - "type": "string" - }, - "maxRetries": { - "type": "number" - }, - "recipientLedgerAssetID": { - "type": "string" - }, - "sourceLedgerAssetID": { - "type": "string" - }, - "maxTimeout": { - "type": "number" - }, - "lastLogEntryTimestamp": { - "type": "string" - }, - "unlockAssetClaim": { - "type": "string" - }, - "recreateAssetClaim": { - "type": "string" - }, - "deleteAssetClaim": { - "type": "string" - }, - "lastMessageReceivedTimestamp": { - "type": "string" - }, - "rollback": { - "type": "boolean" - }, - "rollbackMessageHash": { - "type": "string" - }, - "rollbackProofs": { - "type": "array", - "items": { - "type": "string" - } - }, - "rollbackActionsPerformed": { - "type": "array", - "items": { - "type": "string", - "enum": ["CREATE", "DELETE", "LOCK", "UNLOCK"] - } - } - } - }, - "TransferInitializationV1Request": { - "type": "object", - "properties": { - "messageType": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "version": { - "type": "string" - }, - "developerURN": { - "type": "string" - }, - "credentialProfile": { - "$ref": "#/components/schemas/CredentialProfile" - }, - "payloadProfile": { - "$ref": "#/components/schemas/PayloadProfile" - }, - "applicationProfile": { - "type": "string" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "sourceGatewayPubkey": { - "type": "string" - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "escrowType": { - "type": "string", - "enum": [ - "FAUCET", - "TIMELOCK", - "HASHLOCK", - "HASHTIMELOCK", - "MULTICLAIMPC", - "DESTROY", - "BURN" - ] - }, - "expiryTime": { - "type": "string" - }, - "multipleClaimsAllowed": { - "type": "boolean" - }, - "multipleCancelsAllowed": { - "type": "boolean" - }, - "permissions": { - "$ref": "#/components/schemas/Permissions" - }, - "origin": { - "type": "string" - }, - "destination": { - "type": "string" - }, - "subsequentCalls": { - "type": "object" - }, - "histories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/History" - } - }, - "sequenceNumber": { - "type": "integer" - }, - "sourceBasePath": { - "type": "string" - }, - "recipientBasePath": { - "type": "string" - }, - "maxRetries": { - "type": "number" - }, - "maxTimeout": { - "type": "number" - }, - "backupGatewaysAllowed": { - "type": "array", - "items": { - "type": "string" - } - }, - "recipientLedgerAssetID": { - "type": "string" - }, - "sourceLedgerAssetID": { - "type": "string" - } - }, - "required": [ - "messageType", - "sessionID", - "loggingProfile", - "accessControlProfile", - "payloadProfile", - "applicationProfile", - "signature", - "sourceGatewayPubkey", - "sourceGatewayDltSystem", - "recipientGatewayPubkey", - "recipientGatewayDltSystem", - "sequenceNumber", - "sourceBasePath", - "recipientBasePath", - "maxRetries", - "maxTimeout", - "backupGatewaysAllowed", - "recipientLedgerAssetID", - "sourceLedgerAssetID" - ] - }, - "TransferInitializationV1Response": { - "type": "object", - "properties": { - "messageType": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - }, - "odapPhase": { - "type": "string", - "enum": [ - "TransferInitialization", - "LockEvidenceVerification", - "CommitmentEstablishment" - ] - }, - "initialRequestMessageHash": { - "type": "string" - }, - "destination": { - "type": "string" - }, - "timeStamp": { - "type": "string" - }, - "processedTimeStamp": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "backupGatewaysAllowed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "messageType", - "initialRequestMessageHash", - "timeStamp", - "processedTimeStamp", - "sessionID", - "serverIdentityPubkey", - "sequenceNumber", - "signature", - "backupGatewaysAllowed" - ] - }, - "TransferCommenceV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "senderDltSystem": { - "type": "string" - }, - "recipientDltSystem": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashAssetProfile": { - "type": "string" - }, - "assetUnit": { - "type": "integer" - }, - "hashPrevMessage": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "integer" - } - }, - "required": [ - "sessionID", - "messageType", - "originatorPubkey", - "beneficiaryPubkey", - "senderDltSystem", - "recipientDltSystem", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashAssetProfile", - "hashPrevMessage", - "signature", - "sequenceNumber" - ] - }, - "TransferCommenceV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommenceRequest": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "messageHash": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "serverIdentityPubkey", - "clientIdentityPubkey", - "hashCommenceRequest", - "signature", - "sequenceNumber" - ] - }, - "LockEvidenceV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "lockEvidenceClaim": { - "type": "string" - }, - "lockEvidenceFormat": { - "$ref": "#/components/schemas/LockClaimFormat", - "nullable": true - }, - "lockEvidenceExpiration": { - "type": "string" - }, - "hashCommenceAckRequest": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "messageHash": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "lockEvidenceClaim", - "lockEvidenceExpiration", - "hashCommenceAckRequest", - "signature", - "sequenceNumber" - ] - }, - "LockEvidenceV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashLockEvidenceRequest": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashLockEvidenceRequest", - "signature", - "sequenceNumber" - ] - }, - "CommitPreparationV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashLockEvidenceAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashLockEvidenceAck", - "signature", - "sequenceNumber" - ] - }, - "CommitPreparationV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommitPrep": { - "type": "string" - }, - "serverTransferNumber": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashCommitPrep", - "signature", - "sequenceNumber" - ] - }, - "CommitFinalV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "commitFinalClaim": { - "type": "string" - }, - "commitFinalClaimFormat": { - "$ref": "#/components/schemas/CommitFinalClaimFormat" - }, - "hashCommitPrepareAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "commitFinalClaim", - "hashCommitPrepareAck", - "signature", - "sequenceNumber" - ] - }, - "CommitFinalV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "commitAcknowledgementClaim": { - "type": "string" - }, - "commitAcknowledgementClaimFormat": { - "$ref": "#/components/schemas/CommitAcknowledgementClaimFormat" - }, - "hashCommitFinal": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "commitAcknowledgementClaim", - "hashCommitFinal", - "signature", - "sequenceNumber" - ] - }, - "TransferCompleteV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommitFinalAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "hashTransferCommence": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashCommitFinalAck", - "signature", - "hashTransferCommence", - "sequenceNumber" - ] - }, - "ClientV1Request": { - "type": "object", - "properties": { - "version": { - "type": "string" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "assetControlProfile": { - "type": "string" - }, - "applicationProfile": { - "type": "string" - }, - "assetProfile": { - "$ref": "#/components/schemas/AssetProfile" - }, - "payloadProfile": { - "$ref": "#/components/schemas/PayloadProfile" - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "clientDltSystem": { - "type": "string" - }, - "serverDltSystem": { - "type": "string" - }, - "clientGatewayConfiguration": { - "type": "object", - "properties": { - "apiHost": { - "type": "string" - } - }, - "required": ["apiHost"] - }, - "serverGatewayConfiguration": { - "type": "object", - "properties": { - "apiHost": { - "type": "string" - } - }, - "required": ["apiHost"] - }, - "maxRetries": { - "type": "number" - }, - "maxTimeout": { - "type": "number" - }, - "sourceLedgerAssetID": { - "type": "string" - }, - "recipientLedgerAssetID": { - "type": "string" - } - }, - "required": [ - "version", - "loggingProfile", - "accessControlProfile", - "assetControlProfile", - "applicationProfile", - "assetProfile", - "payloadProfile", - "sourceGatewayDltSystem", - "recipientGatewayDltSystem", - "recipientGatewayPubkey", - "originatorPubkey", - "beneficiaryPubkey", - "clientIdentityPubkey", - "serverIdentityPubkey", - "clientDltSystem", - "serverDltSystem", - "clientGatewayConfiguration", - "serverGatewayConfiguration", - "maxRetries", - "maxTimeout", - "sourceLedgerAssetID", - "recipientLedgerAssetID" - ] - }, - "RecoverV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "odapPhase": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - }, - "lastLogEntryTimestamp": { - "type": "string" - }, - "isBackup": { - "type": "boolean" - }, - "newBasePath": { - "type": "string" - }, - "newGatewayPubKey": { - "type": "string" - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "odapPhase", - "sequenceNumber", - "lastLogEntryTimestamp", - "isBackup", - "newBasePath", - "signature" - ] - }, - "RecoverUpdateV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "recoveredLogs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalLog" - } - }, - "signature": { - "type": "string" - } - }, - "required": ["sessionID", "recoveredLogs", "signature"] - }, - "RecoverUpdateAckV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "changedEntriesHash": { - "type": "array", - "items": { - "type": "string" - } - }, - "signature": { - "type": "string" - } - }, - "required": ["sessionID", "success", "changedEntriesHash", "signature"] - }, - "RecoverSuccessV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "signature": { - "type": "string" - } - }, - "required": ["sessionID", "success", "signature"] - }, - "RollbackV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "actionPerformed": { - "type": "array", - "items": { - "type": "string" - } - }, - "proofs": { - "type": "array", - "items": { - "type": "string" - } - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "success", - "actionPerformed", - "proofs", - "signature" - ] - }, - "RollbackAckV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "signature": { - "type": "string" - } - }, - "required": ["sessionID", "success", "signature"] - }, - "LocalLog": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "data": { - "type": "string" - }, - "type": { - "type": "string" - }, - "operation": { - "type": "string" - }, - "timestamp": { - "type": "string" - } - }, - "required": ["sessionID", "type", "operation"] - }, - "SatpMessage": { - "type": "object", - "properties": { - "SequenceNumber": { - "type": "number" - }, - "Phase": { - "type": "string", - "enum": [ - "TransferInitialization", - "LockEvidenceVerification", - "CommitmentEstablishment" - ] - }, - "ResourceURL": { - "type": "string" - }, - "DeveloperURN": { - "type": "string" - }, - "ActionResponse": { - "type": "object", - "properties": { - "ResponseCode": { - "type": "string", - "enum": ["200", "404"], - "x-enum-varnames": ["OK", "RESOURCE_NOT_FOUND"] - }, - "Arguments": { - "type": "array", - "items": {} - } - } - }, - "CredentialProfile": { - "type": "string", - "enum": ["SAML", "OAuth", "X509"] - }, - "CredentialBlock": { - "type": "array", - "items": {} - }, - "CredentialsProfile": { - "$ref": "#/components/schemas/PayloadProfile" - }, - "ApplicationProfile": { - "$ref": "#/components/schemas/ApplicationProfile" - }, - "Payload": { - "$ref": "#/components/schemas/Payload" - }, - "PayloadHash": { - "type": "string" - }, - "MessageSignature": { - "type": "string" - } - } - } - } - }, - "paths": { - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" - } - }, - "operationId": "phase1TransferInitiationRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferInitializationV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" - } - }, - "operationId": "phase2TransferCommenceRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferCommenceV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" - } - }, - "operationId": "phase2LockEvidenceRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LockEvidenceV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" - } - }, - "operationId": "phase3CommitPreparationRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitPreparationV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" - } - }, - "operationId": "phase3CommitFinalRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitFinalV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" - } - }, - "operationId": "phase3TransferCompleteRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferCompleteV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest" - } - }, - "operationId": "clientRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientV1Request" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" - } - }, - "operationId": "phase1TransferInitiationResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferInitializationV1Response" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" - } - }, - "operationId": "phase2TransferCommenceResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransferCommenceV1Response" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" - } - }, - "operationId": "phase2LockEvidenceResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LockEvidenceV1Response" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" - } - }, - "operationId": "phase3CommitPreparationResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitPreparationV1Response" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" - } - }, - "operationId": "phase3CommitFinalResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitFinalV1Response" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" - } - }, - "operationId": "RecoverV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecoverV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" - } - }, - "operationId": "RecoverUpdateV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecoverUpdateV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" - } - }, - "operationId": "RecoverUpdateAckV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecoverUpdateAckV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" - } - }, - "operationId": "RecoverV1Success", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RecoverSuccessV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" - } - }, - "operationId": "RollbackV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RollbackV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" - } - }, - "operationId": "RollbackAckV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RollbackAckV1Message" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 4f5a990219..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,50 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/AssetProfile.kt -src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt -src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt -src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt -src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt -src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt -src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt -src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt -src/main/kotlin/org/openapitools/client/models/History.kt -src/main/kotlin/org/openapitools/client/models/LocalLog.kt -src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt -src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt -src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt -src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt -src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt -src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt -src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt -src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt -src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt -src/main/kotlin/org/openapitools/client/models/SatpMessage.kt -src/main/kotlin/org/openapitools/client/models/SatpMessageActionResponse.kt -src/main/kotlin/org/openapitools/client/models/SessionData.kt -src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt -src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt -src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt -src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt -src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index b2679aa1bb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**clientRequestV1**](docs/DefaultApi.md#clientrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest | -*DefaultApi* | [**phase1TransferInitiationRequestV1**](docs/DefaultApi.md#phase1transferinitiationrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest | -*DefaultApi* | [**phase1TransferInitiationResponseV1**](docs/DefaultApi.md#phase1transferinitiationresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse | -*DefaultApi* | [**phase2LockEvidenceRequestV1**](docs/DefaultApi.md#phase2lockevidencerequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest | -*DefaultApi* | [**phase2LockEvidenceResponseV1**](docs/DefaultApi.md#phase2lockevidenceresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse | -*DefaultApi* | [**phase2TransferCommenceRequestV1**](docs/DefaultApi.md#phase2transfercommencerequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest | -*DefaultApi* | [**phase2TransferCommenceResponseV1**](docs/DefaultApi.md#phase2transfercommenceresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse | -*DefaultApi* | [**phase3CommitFinalRequestV1**](docs/DefaultApi.md#phase3commitfinalrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest | -*DefaultApi* | [**phase3CommitFinalResponseV1**](docs/DefaultApi.md#phase3commitfinalresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse | -*DefaultApi* | [**phase3CommitPreparationRequestV1**](docs/DefaultApi.md#phase3commitpreparationrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest | -*DefaultApi* | [**phase3CommitPreparationResponseV1**](docs/DefaultApi.md#phase3commitpreparationresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse | -*DefaultApi* | [**phase3TransferCompleteRequestV1**](docs/DefaultApi.md#phase3transfercompleterequestv1) | **GET** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest | -*DefaultApi* | [**recoverUpdateAckV1Message**](docs/DefaultApi.md#recoverupdateackv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage | -*DefaultApi* | [**recoverUpdateV1Message**](docs/DefaultApi.md#recoverupdatev1message) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage | -*DefaultApi* | [**recoverV1Message**](docs/DefaultApi.md#recoverv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage | -*DefaultApi* | [**recoverV1Success**](docs/DefaultApi.md#recoverv1success) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage | -*DefaultApi* | [**rollbackAckV1Message**](docs/DefaultApi.md#rollbackackv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage | -*DefaultApi* | [**rollbackV1Message**](docs/DefaultApi.md#rollbackv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage | - - - -## Documentation for Models - - - [org.openapitools.client.models.AssetProfile](docs/AssetProfile.md) - - [org.openapitools.client.models.ClientV1Request](docs/ClientV1Request.md) - - [org.openapitools.client.models.ClientV1RequestClientGatewayConfiguration](docs/ClientV1RequestClientGatewayConfiguration.md) - - [org.openapitools.client.models.CommitFinalV1Request](docs/CommitFinalV1Request.md) - - [org.openapitools.client.models.CommitFinalV1Response](docs/CommitFinalV1Response.md) - - [org.openapitools.client.models.CommitPreparationV1Request](docs/CommitPreparationV1Request.md) - - [org.openapitools.client.models.CommitPreparationV1Response](docs/CommitPreparationV1Response.md) - - [org.openapitools.client.models.CredentialProfile](docs/CredentialProfile.md) - - [org.openapitools.client.models.History](docs/History.md) - - [org.openapitools.client.models.LocalLog](docs/LocalLog.md) - - [org.openapitools.client.models.LockEvidenceV1Request](docs/LockEvidenceV1Request.md) - - [org.openapitools.client.models.LockEvidenceV1Response](docs/LockEvidenceV1Response.md) - - [org.openapitools.client.models.PayloadProfile](docs/PayloadProfile.md) - - [org.openapitools.client.models.RecoverSuccessV1Message](docs/RecoverSuccessV1Message.md) - - [org.openapitools.client.models.RecoverUpdateAckV1Message](docs/RecoverUpdateAckV1Message.md) - - [org.openapitools.client.models.RecoverUpdateV1Message](docs/RecoverUpdateV1Message.md) - - [org.openapitools.client.models.RecoverV1Message](docs/RecoverV1Message.md) - - [org.openapitools.client.models.RollbackAckV1Message](docs/RollbackAckV1Message.md) - - [org.openapitools.client.models.RollbackV1Message](docs/RollbackV1Message.md) - - [org.openapitools.client.models.SatpMessage](docs/SatpMessage.md) - - [org.openapitools.client.models.SatpMessageActionResponse](docs/SatpMessageActionResponse.md) - - [org.openapitools.client.models.SessionData](docs/SessionData.md) - - [org.openapitools.client.models.TransferCommenceV1Request](docs/TransferCommenceV1Request.md) - - [org.openapitools.client.models.TransferCommenceV1Response](docs/TransferCommenceV1Response.md) - - [org.openapitools.client.models.TransferCompleteV1Request](docs/TransferCompleteV1Request.md) - - [org.openapitools.client.models.TransferInitializationV1Request](docs/TransferInitializationV1Request.md) - - [org.openapitools.client.models.TransferInitializationV1Response](docs/TransferInitializationV1Response.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index 35526c0a9a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,1313 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.ClientV1Request -import org.openapitools.client.models.CommitFinalV1Request -import org.openapitools.client.models.CommitFinalV1Response -import org.openapitools.client.models.CommitPreparationV1Request -import org.openapitools.client.models.CommitPreparationV1Response -import org.openapitools.client.models.LockEvidenceV1Request -import org.openapitools.client.models.LockEvidenceV1Response -import org.openapitools.client.models.RecoverSuccessV1Message -import org.openapitools.client.models.RecoverUpdateAckV1Message -import org.openapitools.client.models.RecoverUpdateV1Message -import org.openapitools.client.models.RecoverV1Message -import org.openapitools.client.models.RollbackAckV1Message -import org.openapitools.client.models.RollbackV1Message -import org.openapitools.client.models.TransferCommenceV1Request -import org.openapitools.client.models.TransferCommenceV1Response -import org.openapitools.client.models.TransferCompleteV1Request -import org.openapitools.client.models.TransferInitializationV1Request -import org.openapitools.client.models.TransferInitializationV1Response - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * - * - * @param clientV1Request (optional) - * @return kotlin.Any - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun clientRequestV1(clientV1Request: ClientV1Request? = null) : kotlin.Any { - val localVarResponse = clientRequestV1WithHttpInfo(clientV1Request = clientV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Any - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param clientV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun clientRequestV1WithHttpInfo(clientV1Request: ClientV1Request?) : ApiResponse { - val localVariableConfig = clientRequestV1RequestConfig(clientV1Request = clientV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation clientRequestV1 - * - * @param clientV1Request (optional) - * @return RequestConfig - */ - fun clientRequestV1RequestConfig(clientV1Request: ClientV1Request?) : RequestConfig { - val localVariableBody = clientV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param transferInitializationV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase1TransferInitiationRequestV1(transferInitializationV1Request: TransferInitializationV1Request? = null) : Unit { - val localVarResponse = phase1TransferInitiationRequestV1WithHttpInfo(transferInitializationV1Request = transferInitializationV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param transferInitializationV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase1TransferInitiationRequestV1WithHttpInfo(transferInitializationV1Request: TransferInitializationV1Request?) : ApiResponse { - val localVariableConfig = phase1TransferInitiationRequestV1RequestConfig(transferInitializationV1Request = transferInitializationV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase1TransferInitiationRequestV1 - * - * @param transferInitializationV1Request (optional) - * @return RequestConfig - */ - fun phase1TransferInitiationRequestV1RequestConfig(transferInitializationV1Request: TransferInitializationV1Request?) : RequestConfig { - val localVariableBody = transferInitializationV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param transferInitializationV1Response (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase1TransferInitiationResponseV1(transferInitializationV1Response: TransferInitializationV1Response? = null) : Unit { - val localVarResponse = phase1TransferInitiationResponseV1WithHttpInfo(transferInitializationV1Response = transferInitializationV1Response) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param transferInitializationV1Response (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase1TransferInitiationResponseV1WithHttpInfo(transferInitializationV1Response: TransferInitializationV1Response?) : ApiResponse { - val localVariableConfig = phase1TransferInitiationResponseV1RequestConfig(transferInitializationV1Response = transferInitializationV1Response) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase1TransferInitiationResponseV1 - * - * @param transferInitializationV1Response (optional) - * @return RequestConfig - */ - fun phase1TransferInitiationResponseV1RequestConfig(transferInitializationV1Response: TransferInitializationV1Response?) : RequestConfig { - val localVariableBody = transferInitializationV1Response - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param lockEvidenceV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase2LockEvidenceRequestV1(lockEvidenceV1Request: LockEvidenceV1Request? = null) : Unit { - val localVarResponse = phase2LockEvidenceRequestV1WithHttpInfo(lockEvidenceV1Request = lockEvidenceV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param lockEvidenceV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase2LockEvidenceRequestV1WithHttpInfo(lockEvidenceV1Request: LockEvidenceV1Request?) : ApiResponse { - val localVariableConfig = phase2LockEvidenceRequestV1RequestConfig(lockEvidenceV1Request = lockEvidenceV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase2LockEvidenceRequestV1 - * - * @param lockEvidenceV1Request (optional) - * @return RequestConfig - */ - fun phase2LockEvidenceRequestV1RequestConfig(lockEvidenceV1Request: LockEvidenceV1Request?) : RequestConfig { - val localVariableBody = lockEvidenceV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param lockEvidenceV1Response (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase2LockEvidenceResponseV1(lockEvidenceV1Response: LockEvidenceV1Response? = null) : Unit { - val localVarResponse = phase2LockEvidenceResponseV1WithHttpInfo(lockEvidenceV1Response = lockEvidenceV1Response) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param lockEvidenceV1Response (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase2LockEvidenceResponseV1WithHttpInfo(lockEvidenceV1Response: LockEvidenceV1Response?) : ApiResponse { - val localVariableConfig = phase2LockEvidenceResponseV1RequestConfig(lockEvidenceV1Response = lockEvidenceV1Response) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase2LockEvidenceResponseV1 - * - * @param lockEvidenceV1Response (optional) - * @return RequestConfig - */ - fun phase2LockEvidenceResponseV1RequestConfig(lockEvidenceV1Response: LockEvidenceV1Response?) : RequestConfig { - val localVariableBody = lockEvidenceV1Response - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param transferCommenceV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase2TransferCommenceRequestV1(transferCommenceV1Request: TransferCommenceV1Request? = null) : Unit { - val localVarResponse = phase2TransferCommenceRequestV1WithHttpInfo(transferCommenceV1Request = transferCommenceV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param transferCommenceV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase2TransferCommenceRequestV1WithHttpInfo(transferCommenceV1Request: TransferCommenceV1Request?) : ApiResponse { - val localVariableConfig = phase2TransferCommenceRequestV1RequestConfig(transferCommenceV1Request = transferCommenceV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase2TransferCommenceRequestV1 - * - * @param transferCommenceV1Request (optional) - * @return RequestConfig - */ - fun phase2TransferCommenceRequestV1RequestConfig(transferCommenceV1Request: TransferCommenceV1Request?) : RequestConfig { - val localVariableBody = transferCommenceV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param transferCommenceV1Response (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase2TransferCommenceResponseV1(transferCommenceV1Response: TransferCommenceV1Response? = null) : Unit { - val localVarResponse = phase2TransferCommenceResponseV1WithHttpInfo(transferCommenceV1Response = transferCommenceV1Response) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param transferCommenceV1Response (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase2TransferCommenceResponseV1WithHttpInfo(transferCommenceV1Response: TransferCommenceV1Response?) : ApiResponse { - val localVariableConfig = phase2TransferCommenceResponseV1RequestConfig(transferCommenceV1Response = transferCommenceV1Response) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase2TransferCommenceResponseV1 - * - * @param transferCommenceV1Response (optional) - * @return RequestConfig - */ - fun phase2TransferCommenceResponseV1RequestConfig(transferCommenceV1Response: TransferCommenceV1Response?) : RequestConfig { - val localVariableBody = transferCommenceV1Response - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param commitFinalV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase3CommitFinalRequestV1(commitFinalV1Request: CommitFinalV1Request? = null) : Unit { - val localVarResponse = phase3CommitFinalRequestV1WithHttpInfo(commitFinalV1Request = commitFinalV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param commitFinalV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase3CommitFinalRequestV1WithHttpInfo(commitFinalV1Request: CommitFinalV1Request?) : ApiResponse { - val localVariableConfig = phase3CommitFinalRequestV1RequestConfig(commitFinalV1Request = commitFinalV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase3CommitFinalRequestV1 - * - * @param commitFinalV1Request (optional) - * @return RequestConfig - */ - fun phase3CommitFinalRequestV1RequestConfig(commitFinalV1Request: CommitFinalV1Request?) : RequestConfig { - val localVariableBody = commitFinalV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param commitFinalV1Response (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase3CommitFinalResponseV1(commitFinalV1Response: CommitFinalV1Response? = null) : Unit { - val localVarResponse = phase3CommitFinalResponseV1WithHttpInfo(commitFinalV1Response = commitFinalV1Response) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param commitFinalV1Response (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase3CommitFinalResponseV1WithHttpInfo(commitFinalV1Response: CommitFinalV1Response?) : ApiResponse { - val localVariableConfig = phase3CommitFinalResponseV1RequestConfig(commitFinalV1Response = commitFinalV1Response) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase3CommitFinalResponseV1 - * - * @param commitFinalV1Response (optional) - * @return RequestConfig - */ - fun phase3CommitFinalResponseV1RequestConfig(commitFinalV1Response: CommitFinalV1Response?) : RequestConfig { - val localVariableBody = commitFinalV1Response - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param commitPreparationV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase3CommitPreparationRequestV1(commitPreparationV1Request: CommitPreparationV1Request? = null) : Unit { - val localVarResponse = phase3CommitPreparationRequestV1WithHttpInfo(commitPreparationV1Request = commitPreparationV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param commitPreparationV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase3CommitPreparationRequestV1WithHttpInfo(commitPreparationV1Request: CommitPreparationV1Request?) : ApiResponse { - val localVariableConfig = phase3CommitPreparationRequestV1RequestConfig(commitPreparationV1Request = commitPreparationV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase3CommitPreparationRequestV1 - * - * @param commitPreparationV1Request (optional) - * @return RequestConfig - */ - fun phase3CommitPreparationRequestV1RequestConfig(commitPreparationV1Request: CommitPreparationV1Request?) : RequestConfig { - val localVariableBody = commitPreparationV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param commitPreparationV1Response (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase3CommitPreparationResponseV1(commitPreparationV1Response: CommitPreparationV1Response? = null) : Unit { - val localVarResponse = phase3CommitPreparationResponseV1WithHttpInfo(commitPreparationV1Response = commitPreparationV1Response) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param commitPreparationV1Response (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase3CommitPreparationResponseV1WithHttpInfo(commitPreparationV1Response: CommitPreparationV1Response?) : ApiResponse { - val localVariableConfig = phase3CommitPreparationResponseV1RequestConfig(commitPreparationV1Response = commitPreparationV1Response) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase3CommitPreparationResponseV1 - * - * @param commitPreparationV1Response (optional) - * @return RequestConfig - */ - fun phase3CommitPreparationResponseV1RequestConfig(commitPreparationV1Response: CommitPreparationV1Response?) : RequestConfig { - val localVariableBody = commitPreparationV1Response - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param transferCompleteV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase3TransferCompleteRequestV1(transferCompleteV1Request: TransferCompleteV1Request? = null) : Unit { - val localVarResponse = phase3TransferCompleteRequestV1WithHttpInfo(transferCompleteV1Request = transferCompleteV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param transferCompleteV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase3TransferCompleteRequestV1WithHttpInfo(transferCompleteV1Request: TransferCompleteV1Request?) : ApiResponse { - val localVariableConfig = phase3TransferCompleteRequestV1RequestConfig(transferCompleteV1Request = transferCompleteV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase3TransferCompleteRequestV1 - * - * @param transferCompleteV1Request (optional) - * @return RequestConfig - */ - fun phase3TransferCompleteRequestV1RequestConfig(transferCompleteV1Request: TransferCompleteV1Request?) : RequestConfig { - val localVariableBody = transferCompleteV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param recoverUpdateAckV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun recoverUpdateAckV1Message(recoverUpdateAckV1Message: RecoverUpdateAckV1Message? = null) : Unit { - val localVarResponse = recoverUpdateAckV1MessageWithHttpInfo(recoverUpdateAckV1Message = recoverUpdateAckV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param recoverUpdateAckV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun recoverUpdateAckV1MessageWithHttpInfo(recoverUpdateAckV1Message: RecoverUpdateAckV1Message?) : ApiResponse { - val localVariableConfig = recoverUpdateAckV1MessageRequestConfig(recoverUpdateAckV1Message = recoverUpdateAckV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation recoverUpdateAckV1Message - * - * @param recoverUpdateAckV1Message (optional) - * @return RequestConfig - */ - fun recoverUpdateAckV1MessageRequestConfig(recoverUpdateAckV1Message: RecoverUpdateAckV1Message?) : RequestConfig { - val localVariableBody = recoverUpdateAckV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param recoverUpdateV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun recoverUpdateV1Message(recoverUpdateV1Message: RecoverUpdateV1Message? = null) : Unit { - val localVarResponse = recoverUpdateV1MessageWithHttpInfo(recoverUpdateV1Message = recoverUpdateV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param recoverUpdateV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun recoverUpdateV1MessageWithHttpInfo(recoverUpdateV1Message: RecoverUpdateV1Message?) : ApiResponse { - val localVariableConfig = recoverUpdateV1MessageRequestConfig(recoverUpdateV1Message = recoverUpdateV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation recoverUpdateV1Message - * - * @param recoverUpdateV1Message (optional) - * @return RequestConfig - */ - fun recoverUpdateV1MessageRequestConfig(recoverUpdateV1Message: RecoverUpdateV1Message?) : RequestConfig { - val localVariableBody = recoverUpdateV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param recoverV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun recoverV1Message(recoverV1Message: RecoverV1Message? = null) : Unit { - val localVarResponse = recoverV1MessageWithHttpInfo(recoverV1Message = recoverV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param recoverV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun recoverV1MessageWithHttpInfo(recoverV1Message: RecoverV1Message?) : ApiResponse { - val localVariableConfig = recoverV1MessageRequestConfig(recoverV1Message = recoverV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation recoverV1Message - * - * @param recoverV1Message (optional) - * @return RequestConfig - */ - fun recoverV1MessageRequestConfig(recoverV1Message: RecoverV1Message?) : RequestConfig { - val localVariableBody = recoverV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param recoverSuccessV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun recoverV1Success(recoverSuccessV1Message: RecoverSuccessV1Message? = null) : Unit { - val localVarResponse = recoverV1SuccessWithHttpInfo(recoverSuccessV1Message = recoverSuccessV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param recoverSuccessV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun recoverV1SuccessWithHttpInfo(recoverSuccessV1Message: RecoverSuccessV1Message?) : ApiResponse { - val localVariableConfig = recoverV1SuccessRequestConfig(recoverSuccessV1Message = recoverSuccessV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation recoverV1Success - * - * @param recoverSuccessV1Message (optional) - * @return RequestConfig - */ - fun recoverV1SuccessRequestConfig(recoverSuccessV1Message: RecoverSuccessV1Message?) : RequestConfig { - val localVariableBody = recoverSuccessV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param rollbackAckV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun rollbackAckV1Message(rollbackAckV1Message: RollbackAckV1Message? = null) : Unit { - val localVarResponse = rollbackAckV1MessageWithHttpInfo(rollbackAckV1Message = rollbackAckV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param rollbackAckV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun rollbackAckV1MessageWithHttpInfo(rollbackAckV1Message: RollbackAckV1Message?) : ApiResponse { - val localVariableConfig = rollbackAckV1MessageRequestConfig(rollbackAckV1Message = rollbackAckV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation rollbackAckV1Message - * - * @param rollbackAckV1Message (optional) - * @return RequestConfig - */ - fun rollbackAckV1MessageRequestConfig(rollbackAckV1Message: RollbackAckV1Message?) : RequestConfig { - val localVariableBody = rollbackAckV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param rollbackV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun rollbackV1Message(rollbackV1Message: RollbackV1Message? = null) : Unit { - val localVarResponse = rollbackV1MessageWithHttpInfo(rollbackV1Message = rollbackV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param rollbackV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun rollbackV1MessageWithHttpInfo(rollbackV1Message: RollbackV1Message?) : ApiResponse { - val localVariableConfig = rollbackV1MessageRequestConfig(rollbackV1Message = rollbackV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation rollbackV1Message - * - * @param rollbackV1Message (optional) - * @return RequestConfig - */ - fun rollbackV1MessageRequestConfig(rollbackV1Message: RollbackV1Message?) : RequestConfig { - val localVariableBody = rollbackV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AssetProfile.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AssetProfile.kt deleted file mode 100644 index d3c7e00fa7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AssetProfile.kt +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param expirationDate - * @param issuer - * @param assetCode - * @param assetCodeType - * @param issuanceDate - * @param verificationEndPoint - * @param digitalSignature - * @param prospectusLink - * @param keyInformationLink - * @param keyWord - * @param transferRestriction - * @param ledgerRequirements - */ - - -data class AssetProfile ( - - @Json(name = "expirationDate") - val expirationDate: kotlin.String, - - @Json(name = "issuer") - val issuer: kotlin.String? = null, - - @Json(name = "assetCode") - val assetCode: kotlin.String? = null, - - @Json(name = "assetCodeType") - val assetCodeType: kotlin.String? = null, - - @Json(name = "issuanceDate") - val issuanceDate: kotlin.String? = null, - - @Json(name = "verificationEndPoint") - val verificationEndPoint: kotlin.String? = null, - - @Json(name = "digitalSignature") - val digitalSignature: kotlin.String? = null, - - @Json(name = "prospectusLink") - val prospectusLink: kotlin.String? = null, - - @Json(name = "keyInformationLink") - val keyInformationLink: kotlin.collections.List? = null, - - @Json(name = "keyWord") - val keyWord: kotlin.collections.List? = null, - - @Json(name = "transferRestriction") - val transferRestriction: kotlin.collections.List? = null, - - @Json(name = "ledgerRequirements") - val ledgerRequirements: kotlin.collections.List? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt deleted file mode 100644 index bbf1fbb1a0..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt +++ /dev/null @@ -1,122 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.AssetProfile -import org.openapitools.client.models.ClientV1RequestClientGatewayConfiguration -import org.openapitools.client.models.PayloadProfile - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param version - * @param loggingProfile - * @param accessControlProfile - * @param assetControlProfile - * @param applicationProfile - * @param assetProfile - * @param payloadProfile - * @param sourceGatewayDltSystem - * @param recipientGatewayDltSystem - * @param recipientGatewayPubkey - * @param originatorPubkey - * @param beneficiaryPubkey - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param clientDltSystem - * @param serverDltSystem - * @param clientGatewayConfiguration - * @param serverGatewayConfiguration - * @param maxRetries - * @param maxTimeout - * @param sourceLedgerAssetID - * @param recipientLedgerAssetID - */ - - -data class ClientV1Request ( - - @Json(name = "version") - val version: kotlin.String, - - @Json(name = "loggingProfile") - val loggingProfile: kotlin.String, - - @Json(name = "accessControlProfile") - val accessControlProfile: kotlin.String, - - @Json(name = "assetControlProfile") - val assetControlProfile: kotlin.String, - - @Json(name = "applicationProfile") - val applicationProfile: kotlin.String, - - @Json(name = "assetProfile") - val assetProfile: AssetProfile, - - @Json(name = "payloadProfile") - val payloadProfile: PayloadProfile, - - @Json(name = "sourceGatewayDltSystem") - val sourceGatewayDltSystem: kotlin.String, - - @Json(name = "recipientGatewayDltSystem") - val recipientGatewayDltSystem: kotlin.String, - - @Json(name = "recipientGatewayPubkey") - val recipientGatewayPubkey: kotlin.String, - - @Json(name = "originatorPubkey") - val originatorPubkey: kotlin.String, - - @Json(name = "beneficiaryPubkey") - val beneficiaryPubkey: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "clientDltSystem") - val clientDltSystem: kotlin.String, - - @Json(name = "serverDltSystem") - val serverDltSystem: kotlin.String, - - @Json(name = "clientGatewayConfiguration") - val clientGatewayConfiguration: ClientV1RequestClientGatewayConfiguration, - - @Json(name = "serverGatewayConfiguration") - val serverGatewayConfiguration: ClientV1RequestClientGatewayConfiguration, - - @Json(name = "maxRetries") - val maxRetries: java.math.BigDecimal, - - @Json(name = "maxTimeout") - val maxTimeout: java.math.BigDecimal, - - @Json(name = "sourceLedgerAssetID") - val sourceLedgerAssetID: kotlin.String, - - @Json(name = "recipientLedgerAssetID") - val recipientLedgerAssetID: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt deleted file mode 100644 index ef6b9f8314..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param apiHost - */ - - -data class ClientV1RequestClientGatewayConfiguration ( - - @Json(name = "apiHost") - val apiHost: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt deleted file mode 100644 index 502356b737..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt +++ /dev/null @@ -1,71 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param commitFinalClaim - * @param hashCommitPrepareAck - * @param signature - * @param sequenceNumber - * @param commitFinalClaimFormat - * @param clientTransferNumber - */ - - -data class CommitFinalV1Request ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "commitFinalClaim") - val commitFinalClaim: kotlin.String, - - @Json(name = "hashCommitPrepareAck") - val hashCommitPrepareAck: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "commitFinalClaimFormat") - val commitFinalClaimFormat: kotlin.Any? = null, - - @Json(name = "clientTransferNumber") - val clientTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt deleted file mode 100644 index 727afa6a98..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt +++ /dev/null @@ -1,71 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param commitAcknowledgementClaim - * @param hashCommitFinal - * @param signature - * @param sequenceNumber - * @param commitAcknowledgementClaimFormat - * @param serverTransferNumber - */ - - -data class CommitFinalV1Response ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "commitAcknowledgementClaim") - val commitAcknowledgementClaim: kotlin.String, - - @Json(name = "hashCommitFinal") - val hashCommitFinal: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "commitAcknowledgementClaimFormat") - val commitAcknowledgementClaimFormat: kotlin.Any? = null, - - @Json(name = "serverTransferNumber") - val serverTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt deleted file mode 100644 index 8373145314..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashLockEvidenceAck - * @param signature - * @param sequenceNumber - * @param clientTransferNumber - */ - - -data class CommitPreparationV1Request ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashLockEvidenceAck") - val hashLockEvidenceAck: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "clientTransferNumber") - val clientTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt deleted file mode 100644 index fb5c974147..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashCommitPrep - * @param signature - * @param sequenceNumber - * @param serverTransferNumber - */ - - -data class CommitPreparationV1Response ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashCommitPrep") - val hashCommitPrep: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "serverTransferNumber") - val serverTransferNumber: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt deleted file mode 100644 index 3d99d1cf90..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt +++ /dev/null @@ -1,66 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * Values: sAML,oAUTH,x509 - */ - -@JsonClass(generateAdapter = false) -enum class CredentialProfile(val value: kotlin.String) { - - @Json(name = "SAML") - sAML("SAML"), - - @Json(name = "OAUTH") - oAUTH("OAUTH"), - - @Json(name = "X509") - x509("X509"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is CredentialProfile) "$data" else null - - /** - * Returns a valid [CredentialProfile] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): CredentialProfile? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/History.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/History.kt deleted file mode 100644 index 51eb5a02ad..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/History.kt +++ /dev/null @@ -1,59 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param transactions - * @param actions - * @param origin - * @param destination - * @param balance - * @param currentStatus - * @param applicationSpecificParameters - */ - - -data class History ( - - @Json(name = "Transactions") - val transactions: kotlin.collections.List? = null, - - @Json(name = "Actions") - val actions: kotlin.collections.List? = null, - - @Json(name = "Origin") - val origin: kotlin.String? = null, - - @Json(name = "Destination") - val destination: kotlin.String? = null, - - @Json(name = "Balance") - val balance: kotlin.String? = null, - - @Json(name = "CurrentStatus") - val currentStatus: kotlin.Any? = null, - - @Json(name = "ApplicationSpecificParameters") - val applicationSpecificParameters: kotlin.Any? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt deleted file mode 100644 index 2e97f18138..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param type - * @param operation - * @param key - * @param `data` - * @param timestamp - */ - - -data class LocalLog ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "type") - val type: kotlin.String, - - @Json(name = "operation") - val operation: kotlin.String, - - @Json(name = "key") - val key: kotlin.String? = null, - - @Json(name = "data") - val `data`: kotlin.String? = null, - - @Json(name = "timestamp") - val timestamp: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt deleted file mode 100644 index f16479bb7d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param lockEvidenceClaim - * @param lockEvidenceExpiration - * @param hashCommenceAckRequest - * @param signature - * @param messageType - * @param sequenceNumber - * @param lockEvidenceFormat - * @param clientTransferNumber - * @param messageHash - */ - - -data class LockEvidenceV1Request ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "lockEvidenceClaim") - val lockEvidenceClaim: kotlin.String, - - @Json(name = "lockEvidenceExpiration") - val lockEvidenceExpiration: kotlin.String, - - @Json(name = "hashCommenceAckRequest") - val hashCommenceAckRequest: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "lockEvidenceFormat") - val lockEvidenceFormat: kotlin.Any? = null, - - @Json(name = "clientTransferNumber") - val clientTransferNumber: kotlin.Int? = null, - - @Json(name = "messageHash") - val messageHash: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt deleted file mode 100644 index d9eb294a3c..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashLockEvidenceRequest - * @param signature - * @param messageType - * @param sequenceNumber - * @param serverTransferNumber - */ - - -data class LockEvidenceV1Response ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashLockEvidenceRequest") - val hashLockEvidenceRequest: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "serverTransferNumber") - val serverTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt deleted file mode 100644 index fdf0abc5ff..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.AssetProfile - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param assetProfile - * @param capabilities - */ - - -data class PayloadProfile ( - - @Json(name = "assetProfile") - val assetProfile: AssetProfile, - - @Json(name = "capabilities") - val capabilities: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt deleted file mode 100644 index 276b2c241d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param success - * @param signature - */ - - -data class RecoverSuccessV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt deleted file mode 100644 index 067d8d4584..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt +++ /dev/null @@ -1,47 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param success - * @param changedEntriesHash - * @param signature - */ - - -data class RecoverUpdateAckV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "changedEntriesHash") - val changedEntriesHash: kotlin.collections.List, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt deleted file mode 100644 index 67ed45d0ce..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.LocalLog - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param recoveredLogs - * @param signature - */ - - -data class RecoverUpdateV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "recoveredLogs") - val recoveredLogs: kotlin.collections.List, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt deleted file mode 100644 index cc371150fb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param odapPhase - * @param sequenceNumber - * @param lastLogEntryTimestamp - * @param isBackup - * @param newBasePath - * @param signature - * @param newGatewayPubKey - */ - - -data class RecoverV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "odapPhase") - val odapPhase: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "lastLogEntryTimestamp") - val lastLogEntryTimestamp: kotlin.String, - - @Json(name = "isBackup") - val isBackup: kotlin.Boolean, - - @Json(name = "newBasePath") - val newBasePath: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "newGatewayPubKey") - val newGatewayPubKey: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt deleted file mode 100644 index e797025122..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param success - * @param signature - */ - - -data class RollbackAckV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt deleted file mode 100644 index ddfee9c37b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param success - * @param actionPerformed - * @param proofs - * @param signature - */ - - -data class RollbackV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "actionPerformed") - val actionPerformed: kotlin.collections.List, - - @Json(name = "proofs") - val proofs: kotlin.collections.List, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessage.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessage.kt deleted file mode 100644 index ac22e1499d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessage.kt +++ /dev/null @@ -1,105 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.PayloadProfile -import org.openapitools.client.models.SatpMessageActionResponse - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sequenceNumber - * @param phase - * @param resourceURL - * @param developerURN - * @param actionResponse - * @param credentialProfile - * @param credentialBlock - * @param credentialsProfile - * @param applicationProfile - * @param payload - * @param payloadHash - * @param messageSignature - */ - - -data class SatpMessage ( - - @Json(name = "SequenceNumber") - val sequenceNumber: java.math.BigDecimal? = null, - - @Json(name = "Phase") - val phase: SatpMessage.Phase? = null, - - @Json(name = "ResourceURL") - val resourceURL: kotlin.String? = null, - - @Json(name = "DeveloperURN") - val developerURN: kotlin.String? = null, - - @Json(name = "ActionResponse") - val actionResponse: SatpMessageActionResponse? = null, - - @Json(name = "CredentialProfile") - val credentialProfile: SatpMessage.CredentialProfile? = null, - - @Json(name = "CredentialBlock") - val credentialBlock: kotlin.collections.List? = null, - - @Json(name = "CredentialsProfile") - val credentialsProfile: PayloadProfile? = null, - - @Json(name = "ApplicationProfile") - val applicationProfile: kotlin.Any? = null, - - @Json(name = "Payload") - val payload: kotlin.Any? = null, - - @Json(name = "PayloadHash") - val payloadHash: kotlin.String? = null, - - @Json(name = "MessageSignature") - val messageSignature: kotlin.String? = null - -) { - - /** - * - * - * Values: transferInitialization,lockEvidenceVerification,commitmentEstablishment - */ - @JsonClass(generateAdapter = false) - enum class Phase(val value: kotlin.String) { - @Json(name = "TransferInitialization") transferInitialization("TransferInitialization"), - @Json(name = "LockEvidenceVerification") lockEvidenceVerification("LockEvidenceVerification"), - @Json(name = "CommitmentEstablishment") commitmentEstablishment("CommitmentEstablishment"); - } - /** - * - * - * Values: sAML,oAuth,x509 - */ - @JsonClass(generateAdapter = false) - enum class CredentialProfile(val value: kotlin.String) { - @Json(name = "SAML") sAML("SAML"), - @Json(name = "OAuth") oAuth("OAuth"), - @Json(name = "X509") x509("X509"); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessageActionResponse.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessageActionResponse.kt deleted file mode 100644 index a636e823f0..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessageActionResponse.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param responseCode - * @param arguments - */ - - -data class SatpMessageActionResponse ( - - @Json(name = "ResponseCode") - val responseCode: SatpMessageActionResponse.ResponseCode? = null, - - @Json(name = "Arguments") - val arguments: kotlin.collections.List? = null - -) { - - /** - * - * - * Values: OK,RESOURCE_NOT_FOUND - */ - @JsonClass(generateAdapter = false) - enum class ResponseCode(val value: kotlin.String) { - @Json(name = "200") OK("200"), - @Json(name = "404") RESOURCE_NOT_FOUND("404"); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SessionData.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SessionData.kt deleted file mode 100644 index a8602e662f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SessionData.kt +++ /dev/null @@ -1,291 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.AssetProfile -import org.openapitools.client.models.PayloadProfile - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id - * @param step - * @param version - * @param lastSequenceNumber - * @param loggingProfile - * @param accessControlProfile - * @param applicationProfile - * @param payloadProfile - * @param assetProfile - * @param allowedSourceBackupGateways - * @param allowedRecipientBackupGateways - * @param sourceBasePath - * @param recipientBasePath - * @param originatorPubkey - * @param beneficiaryPubkey - * @param sourceGatewayPubkey - * @param sourceGatewayDltSystem - * @param recipientGatewayPubkey - * @param recipientGatewayDltSystem - * @param initializationRequestMessageHash - * @param initializationResponseMessageHash - * @param initializationRequestMessageRcvTimeStamp - * @param initializationRequestMessageProcessedTimeStamp - * @param clientSignatureInitializationRequestMessage - * @param serverSignatureInitializationResponseMessage - * @param transferCommenceMessageRequestHash - * @param transferCommenceMessageResponseHash - * @param clientSignatureTransferCommenceRequestMessage - * @param serverSignatureTransferCommenceResponseMessage - * @param lockEvidenceRequestMessageHash - * @param lockEvidenceResponseMessageHash - * @param clientSignatureLockEvidenceRequestMessage - * @param serverSignatureLockEvidenceResponseMessage - * @param lockEvidenceClaim - * @param commitPrepareRequestMessageHash - * @param commitPrepareResponseMessageHash - * @param clientSignatureCommitPreparationRequestMessage - * @param serverSignatureCommitPreparationResponseMessage - * @param commitFinalRequestMessageHash - * @param commitFinalResponseMessageHash - * @param commitFinalClaim - * @param commitFinalClaimFormat - * @param commitAcknowledgementClaim - * @param commitAcknowledgementClaimFormat - * @param clientSignatureCommitFinalRequestMessage - * @param serverSignatureCommitFinalResponseMessage - * @param transferCompleteMessageHash - * @param clientSignatureTransferCompleteMessage - * @param maxRetries - * @param recipientLedgerAssetID - * @param sourceLedgerAssetID - * @param maxTimeout - * @param lastLogEntryTimestamp - * @param unlockAssetClaim - * @param recreateAssetClaim - * @param deleteAssetClaim - * @param lastMessageReceivedTimestamp - * @param rollback - * @param rollbackMessageHash - * @param rollbackProofs - * @param rollbackActionsPerformed - */ - - -data class SessionData ( - - @Json(name = "id") - val id: kotlin.String? = null, - - @Json(name = "step") - val step: java.math.BigDecimal? = null, - - @Json(name = "version") - val version: kotlin.String? = null, - - @Json(name = "lastSequenceNumber") - val lastSequenceNumber: java.math.BigDecimal? = null, - - @Json(name = "loggingProfile") - val loggingProfile: kotlin.String? = null, - - @Json(name = "accessControlProfile") - val accessControlProfile: kotlin.String? = null, - - @Json(name = "applicationProfile") - val applicationProfile: kotlin.String? = null, - - @Json(name = "payloadProfile") - val payloadProfile: PayloadProfile? = null, - - @Json(name = "assetProfile") - val assetProfile: AssetProfile? = null, - - @Json(name = "allowedSourceBackupGateways") - val allowedSourceBackupGateways: kotlin.collections.List? = null, - - @Json(name = "allowedRecipientBackupGateways") - val allowedRecipientBackupGateways: kotlin.collections.List? = null, - - @Json(name = "sourceBasePath") - val sourceBasePath: kotlin.String? = null, - - @Json(name = "recipientBasePath") - val recipientBasePath: kotlin.String? = null, - - @Json(name = "originatorPubkey") - val originatorPubkey: kotlin.String? = null, - - @Json(name = "beneficiaryPubkey") - val beneficiaryPubkey: kotlin.String? = null, - - @Json(name = "sourceGatewayPubkey") - val sourceGatewayPubkey: kotlin.String? = null, - - @Json(name = "sourceGatewayDltSystem") - val sourceGatewayDltSystem: kotlin.String? = null, - - @Json(name = "recipientGatewayPubkey") - val recipientGatewayPubkey: kotlin.String? = null, - - @Json(name = "recipientGatewayDltSystem") - val recipientGatewayDltSystem: kotlin.String? = null, - - @Json(name = "initializationRequestMessageHash") - val initializationRequestMessageHash: kotlin.String? = null, - - @Json(name = "initializationResponseMessageHash") - val initializationResponseMessageHash: kotlin.String? = null, - - @Json(name = "initializationRequestMessageRcvTimeStamp") - val initializationRequestMessageRcvTimeStamp: kotlin.String? = null, - - @Json(name = "initializationRequestMessageProcessedTimeStamp") - val initializationRequestMessageProcessedTimeStamp: kotlin.String? = null, - - @Json(name = "clientSignatureInitializationRequestMessage") - val clientSignatureInitializationRequestMessage: kotlin.String? = null, - - @Json(name = "serverSignatureInitializationResponseMessage") - val serverSignatureInitializationResponseMessage: kotlin.String? = null, - - @Json(name = "transferCommenceMessageRequestHash") - val transferCommenceMessageRequestHash: kotlin.String? = null, - - @Json(name = "transferCommenceMessageResponseHash") - val transferCommenceMessageResponseHash: kotlin.String? = null, - - @Json(name = "clientSignatureTransferCommenceRequestMessage") - val clientSignatureTransferCommenceRequestMessage: kotlin.String? = null, - - @Json(name = "serverSignatureTransferCommenceResponseMessage") - val serverSignatureTransferCommenceResponseMessage: kotlin.String? = null, - - @Json(name = "lockEvidenceRequestMessageHash") - val lockEvidenceRequestMessageHash: kotlin.String? = null, - - @Json(name = "lockEvidenceResponseMessageHash") - val lockEvidenceResponseMessageHash: kotlin.String? = null, - - @Json(name = "clientSignatureLockEvidenceRequestMessage") - val clientSignatureLockEvidenceRequestMessage: kotlin.String? = null, - - @Json(name = "serverSignatureLockEvidenceResponseMessage") - val serverSignatureLockEvidenceResponseMessage: kotlin.String? = null, - - @Json(name = "lockEvidenceClaim") - val lockEvidenceClaim: kotlin.String? = null, - - @Json(name = "commitPrepareRequestMessageHash") - val commitPrepareRequestMessageHash: kotlin.String? = null, - - @Json(name = "commitPrepareResponseMessageHash") - val commitPrepareResponseMessageHash: kotlin.String? = null, - - @Json(name = "clientSignatureCommitPreparationRequestMessage") - val clientSignatureCommitPreparationRequestMessage: kotlin.String? = null, - - @Json(name = "serverSignatureCommitPreparationResponseMessage") - val serverSignatureCommitPreparationResponseMessage: kotlin.String? = null, - - @Json(name = "commitFinalRequestMessageHash") - val commitFinalRequestMessageHash: kotlin.String? = null, - - @Json(name = "commitFinalResponseMessageHash") - val commitFinalResponseMessageHash: kotlin.String? = null, - - @Json(name = "commitFinalClaim") - val commitFinalClaim: kotlin.String? = null, - - @Json(name = "commitFinalClaimFormat") - val commitFinalClaimFormat: kotlin.String? = null, - - @Json(name = "commitAcknowledgementClaim") - val commitAcknowledgementClaim: kotlin.String? = null, - - @Json(name = "commitAcknowledgementClaimFormat") - val commitAcknowledgementClaimFormat: kotlin.String? = null, - - @Json(name = "clientSignatureCommitFinalRequestMessage") - val clientSignatureCommitFinalRequestMessage: kotlin.String? = null, - - @Json(name = "serverSignatureCommitFinalResponseMessage") - val serverSignatureCommitFinalResponseMessage: kotlin.String? = null, - - @Json(name = "transferCompleteMessageHash") - val transferCompleteMessageHash: kotlin.String? = null, - - @Json(name = "clientSignatureTransferCompleteMessage") - val clientSignatureTransferCompleteMessage: kotlin.String? = null, - - @Json(name = "maxRetries") - val maxRetries: java.math.BigDecimal? = null, - - @Json(name = "recipientLedgerAssetID") - val recipientLedgerAssetID: kotlin.String? = null, - - @Json(name = "sourceLedgerAssetID") - val sourceLedgerAssetID: kotlin.String? = null, - - @Json(name = "maxTimeout") - val maxTimeout: java.math.BigDecimal? = null, - - @Json(name = "lastLogEntryTimestamp") - val lastLogEntryTimestamp: kotlin.String? = null, - - @Json(name = "unlockAssetClaim") - val unlockAssetClaim: kotlin.String? = null, - - @Json(name = "recreateAssetClaim") - val recreateAssetClaim: kotlin.String? = null, - - @Json(name = "deleteAssetClaim") - val deleteAssetClaim: kotlin.String? = null, - - @Json(name = "lastMessageReceivedTimestamp") - val lastMessageReceivedTimestamp: kotlin.String? = null, - - @Json(name = "rollback") - val rollback: kotlin.Boolean? = null, - - @Json(name = "rollbackMessageHash") - val rollbackMessageHash: kotlin.String? = null, - - @Json(name = "rollbackProofs") - val rollbackProofs: kotlin.collections.List? = null, - - @Json(name = "rollbackActionsPerformed") - val rollbackActionsPerformed: kotlin.collections.List? = null - -) { - - /** - * - * - * Values: cREATE,dELETE,lOCK,uNLOCK - */ - @JsonClass(generateAdapter = false) - enum class RollbackActionsPerformed(val value: kotlin.String) { - @Json(name = "CREATE") cREATE("CREATE"), - @Json(name = "DELETE") dELETE("DELETE"), - @Json(name = "LOCK") lOCK("LOCK"), - @Json(name = "UNLOCK") uNLOCK("UNLOCK"); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt deleted file mode 100644 index a2884109eb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param originatorPubkey - * @param beneficiaryPubkey - * @param senderDltSystem - * @param recipientDltSystem - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashAssetProfile - * @param hashPrevMessage - * @param signature - * @param sequenceNumber - * @param assetUnit - * @param clientTransferNumber - */ - - -data class TransferCommenceV1Request ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "originatorPubkey") - val originatorPubkey: kotlin.String, - - @Json(name = "beneficiaryPubkey") - val beneficiaryPubkey: kotlin.String, - - @Json(name = "senderDltSystem") - val senderDltSystem: kotlin.String, - - @Json(name = "recipientDltSystem") - val recipientDltSystem: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashAssetProfile") - val hashAssetProfile: kotlin.String, - - @Json(name = "hashPrevMessage") - val hashPrevMessage: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: kotlin.Int, - - @Json(name = "assetUnit") - val assetUnit: kotlin.Int? = null, - - @Json(name = "clientTransferNumber") - val clientTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt deleted file mode 100644 index 20487e8c4a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashCommenceRequest - * @param signature - * @param messageType - * @param sequenceNumber - * @param serverTransferNumber - * @param messageHash - */ - - -data class TransferCommenceV1Response ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashCommenceRequest") - val hashCommenceRequest: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "serverTransferNumber") - val serverTransferNumber: kotlin.Int? = null, - - @Json(name = "messageHash") - val messageHash: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt deleted file mode 100644 index 29e7088a28..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashCommitFinalAck - * @param signature - * @param hashTransferCommence - * @param sequenceNumber - * @param clientTransferNumber - */ - - -data class TransferCompleteV1Request ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashCommitFinalAck") - val hashCommitFinalAck: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "hashTransferCommence") - val hashTransferCommence: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "clientTransferNumber") - val clientTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt deleted file mode 100644 index bb9cc888d7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt +++ /dev/null @@ -1,175 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CredentialProfile -import org.openapitools.client.models.History -import org.openapitools.client.models.PayloadProfile - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param messageType - * @param sessionID - * @param payloadProfile - * @param applicationProfile - * @param loggingProfile - * @param accessControlProfile - * @param signature - * @param sourceGatewayPubkey - * @param sourceGatewayDltSystem - * @param recipientGatewayPubkey - * @param recipientGatewayDltSystem - * @param sequenceNumber - * @param sourceBasePath - * @param recipientBasePath - * @param maxRetries - * @param maxTimeout - * @param backupGatewaysAllowed - * @param recipientLedgerAssetID - * @param sourceLedgerAssetID - * @param version - * @param developerURN - * @param credentialProfile - * @param escrowType - * @param expiryTime - * @param multipleClaimsAllowed - * @param multipleCancelsAllowed - * @param permissions - * @param origin - * @param destination - * @param subsequentCalls - * @param histories - */ - - -data class TransferInitializationV1Request ( - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "payloadProfile") - val payloadProfile: PayloadProfile, - - @Json(name = "applicationProfile") - val applicationProfile: kotlin.String, - - @Json(name = "loggingProfile") - val loggingProfile: kotlin.String, - - @Json(name = "accessControlProfile") - val accessControlProfile: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sourceGatewayPubkey") - val sourceGatewayPubkey: kotlin.String, - - @Json(name = "sourceGatewayDltSystem") - val sourceGatewayDltSystem: kotlin.String, - - @Json(name = "recipientGatewayPubkey") - val recipientGatewayPubkey: kotlin.String, - - @Json(name = "recipientGatewayDltSystem") - val recipientGatewayDltSystem: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: kotlin.Int, - - @Json(name = "sourceBasePath") - val sourceBasePath: kotlin.String, - - @Json(name = "recipientBasePath") - val recipientBasePath: kotlin.String, - - @Json(name = "maxRetries") - val maxRetries: java.math.BigDecimal, - - @Json(name = "maxTimeout") - val maxTimeout: java.math.BigDecimal, - - @Json(name = "backupGatewaysAllowed") - val backupGatewaysAllowed: kotlin.collections.List, - - @Json(name = "recipientLedgerAssetID") - val recipientLedgerAssetID: kotlin.String, - - @Json(name = "sourceLedgerAssetID") - val sourceLedgerAssetID: kotlin.String, - - @Json(name = "version") - val version: kotlin.String? = null, - - @Json(name = "developerURN") - val developerURN: kotlin.String? = null, - - @Json(name = "credentialProfile") - val credentialProfile: CredentialProfile? = null, - - @Json(name = "escrowType") - val escrowType: TransferInitializationV1Request.EscrowType? = null, - - @Json(name = "expiryTime") - val expiryTime: kotlin.String? = null, - - @Json(name = "multipleClaimsAllowed") - val multipleClaimsAllowed: kotlin.Boolean? = null, - - @Json(name = "multipleCancelsAllowed") - val multipleCancelsAllowed: kotlin.Boolean? = null, - - @Json(name = "permissions") - val permissions: kotlin.Any? = null, - - @Json(name = "origin") - val origin: kotlin.String? = null, - - @Json(name = "destination") - val destination: kotlin.String? = null, - - @Json(name = "subsequentCalls") - val subsequentCalls: kotlin.Any? = null, - - @Json(name = "histories") - val histories: kotlin.collections.List? = null - -) { - - /** - * - * - * Values: fAUCET,tIMELOCK,hASHLOCK,hASHTIMELOCK,mULTICLAIMPC,dESTROY,bURN - */ - @JsonClass(generateAdapter = false) - enum class EscrowType(val value: kotlin.String) { - @Json(name = "FAUCET") fAUCET("FAUCET"), - @Json(name = "TIMELOCK") tIMELOCK("TIMELOCK"), - @Json(name = "HASHLOCK") hASHLOCK("HASHLOCK"), - @Json(name = "HASHTIMELOCK") hASHTIMELOCK("HASHTIMELOCK"), - @Json(name = "MULTICLAIMPC") mULTICLAIMPC("MULTICLAIMPC"), - @Json(name = "DESTROY") dESTROY("DESTROY"), - @Json(name = "BURN") bURN("BURN"); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt deleted file mode 100644 index 1e1d3c114b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param messageType - * @param sessionID - * @param sequenceNumber - * @param initialRequestMessageHash - * @param timeStamp - * @param processedTimeStamp - * @param serverIdentityPubkey - * @param signature - * @param backupGatewaysAllowed - * @param odapPhase - * @param destination - */ - - -data class TransferInitializationV1Response ( - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "initialRequestMessageHash") - val initialRequestMessageHash: kotlin.String, - - @Json(name = "timeStamp") - val timeStamp: kotlin.String, - - @Json(name = "processedTimeStamp") - val processedTimeStamp: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "backupGatewaysAllowed") - val backupGatewaysAllowed: kotlin.collections.List, - - @Json(name = "odapPhase") - val odapPhase: TransferInitializationV1Response.OdapPhase? = null, - - @Json(name = "destination") - val destination: kotlin.String? = null - -) { - - /** - * - * - * Values: transferInitialization,lockEvidenceVerification,commitmentEstablishment - */ - @JsonClass(generateAdapter = false) - enum class OdapPhase(val value: kotlin.String) { - @Json(name = "TransferInitialization") transferInitialization("TransferInitialization"), - @Json(name = "LockEvidenceVerification") lockEvidenceVerification("LockEvidenceVerification"), - @Json(name = "CommitmentEstablishment") commitmentEstablishment("CommitmentEstablishment"); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/besu-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/besu-satp-gateway.ts deleted file mode 100644 index 248b1b494a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/besu-satp-gateway.ts +++ /dev/null @@ -1,519 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { Configuration } from "@hyperledger/cactus-core-api"; -import { SessionDataRollbackActionsPerformedEnum } from "../generated/openapi/typescript-axios"; -import { - DefaultApi as BesuApi, - Web3SigningCredential, - EthContractInvocationType, - InvokeContractV1Request as BesuInvokeContractV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, -} from "./plugin-satp-gateway"; - -export interface IBesuSatpGatewayConstructorOptions - extends IPluginSatpGatewayConstructorOptions { - besuPath?: string; - besuContractName?: string; - besuWeb3SigningCredential?: Web3SigningCredential; - besuKeychainId?: string; - besuAssetID?: string; -} - -export class BesuSatpGateway extends PluginSatpGateway { - public besuApi?: BesuApi; - public besuContractName?: string; - public besuWeb3SigningCredential?: Web3SigningCredential; - public besuKeychainId?: string; - - public constructor(options: IBesuSatpGatewayConstructorOptions) { - super({ - name: options.name, - dltIDs: options.dltIDs, - instanceId: options.instanceId, - keyPair: options.keyPair, - backupGatewaysAllowed: options.backupGatewaysAllowed, - ipfsPath: options.ipfsPath, - clientHelper: options.clientHelper, - serverHelper: options.serverHelper, - knexLocalConfig: options.knexLocalConfig, - knexRemoteConfig: options.knexRemoteConfig, - }); - - if (options.besuPath != undefined) this.defineBesuConnection(options); - } - - private defineBesuConnection( - options: IBesuSatpGatewayConstructorOptions, - ): void { - const fnTag = `${this.className}#defineBesuConnection()`; - - const config = new Configuration({ basePath: options.besuPath }); - const apiClient = new BesuApi(config); - this.besuApi = apiClient; - const notEnoughBesuParams: boolean = - options.besuContractName == undefined || - options.besuWeb3SigningCredential == undefined || - options.besuKeychainId == undefined; - if (notEnoughBesuParams) { - throw new Error( - `${fnTag}, besu params missing. Should have: signing credentials, contract name, key chain ID, asset ID`, - ); - } - this.besuContractName = options.besuContractName; - this.besuWeb3SigningCredential = options.besuWeb3SigningCredential; - this.besuKeychainId = options.besuKeychainId; - } - - async createAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#createAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if (assetId == undefined) { - assetId = sessionData.recipientLedgerAssetID; - } - - let besuCreateAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const besuCreateRes = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - gas: 1000000, - params: [assetId, 100], //the second is size, may need to pass this from client? - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (besuCreateRes.status != 200) { - //await this.Revert(sessionID); - throw new Error(`${fnTag}, besu create asset error`); - } - - const besuCreateResDataJson = JSON.parse( - JSON.stringify(besuCreateRes.data), - ); - - if (besuCreateResDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (besuCreateResDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - besuCreateResDataJson.out.transactionReceipt; - besuCreateAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.commitAcknowledgementClaim = besuCreateAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset creation: ${besuCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "create", - data: besuCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return besuCreateAssetProof; - } - - async lockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#lockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let besuLockAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const assetLockResponse = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - gas: 1000000, - params: [assetId], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetLockResponse.status != 200) { - throw new Error(`${fnTag}, besu lock asset error`); - } - - const assetLockResponseDataJson = JSON.parse( - JSON.stringify(assetLockResponse.data), - ); - - if (assetLockResponseDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (assetLockResponseDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - assetLockResponseDataJson.out.transactionReceipt; - besuLockAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Lock, - ); - sessionData.rollbackProofs.push(besuLockAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, proof of the asset lock: ${besuLockAssetProof}`); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "lock", - data: besuLockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - return besuLockAssetProof; - } - - async unlockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#unlockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let besuUnlockAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const assetUnlockResponse = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - gas: 1000000, - params: [assetId], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetUnlockResponse.status != 200) { - throw new Error(`${fnTag}, besu unlock asset error`); - } - - const assetUnlockResponseDataJson = JSON.parse( - JSON.stringify(assetUnlockResponse.data), - ); - - if (assetUnlockResponseDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (assetUnlockResponseDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - assetUnlockResponseDataJson.out.transactionReceipt; - besuUnlockAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Lock, - ); - sessionData.rollbackProofs.push(besuUnlockAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset unlock: ${besuUnlockAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "unlock", - data: besuUnlockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - return besuUnlockAssetProof; - } - - async deleteAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - const fnTag = `${this.className}#deleteAssetToRollback()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let besuDeleteAssetProof = ""; - - if (assetID == undefined) { - assetID = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - // we need to lock the asset first - await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - gas: 1000000, - params: [assetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - const assetCreationResponse = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "deleteAsset", - gas: 1000000, - params: [assetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetCreationResponse.status != 200) { - throw new Error(`${fnTag}, besu delete asset error`); - } - - const assetCreationResponseDataJson = JSON.parse( - JSON.stringify(assetCreationResponse.data), - ); - - if (assetCreationResponseDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (assetCreationResponseDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - assetCreationResponseDataJson.out.transactionReceipt; - besuDeleteAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Delete, - ); - sessionData.rollbackProofs.push(besuDeleteAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset deletion: ${besuDeleteAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "delete", - data: besuDeleteAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - return besuDeleteAssetProof; - } - - // Not implementing these methods because this class is an example - // of a client gateway. They are only used for server gateways. - deleteAsset( - sessionID: string, - assetID?: string | undefined, - ): Promise { - return new Promise(() => `${sessionID}, ${assetID}`); - } - - async createAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - return new Promise(() => `${sessionID}, ${assetID}`); - } - - async rollback(sessionID: string) { - const fnTag = `${this.className}#rollback()`; - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - sessionData.rollback = true; - - this.log.info(`${fnTag}, rolling back session ${sessionID}`); - - if ( - this.besuApi == undefined || - this.besuContractName == undefined || - this.besuKeychainId == undefined || - this.besuWeb3SigningCredential == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.recipientLedgerAssetID == undefined - ) { - return; - } - - if (this.isClientGateway(sessionID)) { - if (await this.besuAssetExists(sessionData.sourceLedgerAssetID)) { - if (await this.isBesuAssetLocked(sessionData.sourceLedgerAssetID)) { - // Rollback locking of the asset - await this.unlockAsset(sessionID, sessionData.sourceLedgerAssetID); - } - } else { - // Rollback extinguishment of the asset - await this.createAsset(sessionID, sessionData.sourceLedgerAssetID); - } - } else { - if (await this.besuAssetExists(sessionData.recipientLedgerAssetID)) { - // Rollback creation of the asset - await this.deleteAssetToRollback( - sessionID, - sessionData.recipientLedgerAssetID, - ); - } - } - } - - /* Helper functions */ - async besuAssetExists(besuAssetID: string): Promise { - const fnTag = `${this.className}#besuAssetExists()`; - - const assetExists = await this.besuApi?.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Call, - methodName: "isPresent", - gas: 1000000, - params: [besuAssetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetExists == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetExists?.data.callOutput == true; - } - - async isBesuAssetLocked(besuAssetID: string): Promise { - const fnTag = `${this.className}#isBesuAssetLocked()`; - - const assetIsLocked = await this.besuApi?.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Call, - methodName: "isAssetLocked", - gas: 1000000, - params: [besuAssetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetIsLocked == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetIsLocked?.data.callOutput == true; - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/client/client-helper.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/client/client-helper.ts deleted file mode 100644 index cd97907313..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/client/client-helper.ts +++ /dev/null @@ -1,873 +0,0 @@ -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SHA256 } from "crypto-js"; -import { - TransferInitializationV1Request, - TransferInitializationV1Response, - TransferCommenceV1Request, - TransferCommenceV1Response, - LockEvidenceV1Request, - LockEvidenceV1Response, - CommitPreparationV1Request, - CommitPreparationV1Response, - CommitFinalV1Request, - CommitFinalV1Response, - TransferCompleteV1Request, -} from "../../public-api"; -import { SatpMessageType, PluginSatpGateway } from "../plugin-satp-gateway"; - -export class ClientGatewayHelper { - public static readonly CLASS_NAME = "ClientGatewayHelper"; - private _log: Logger; - - constructor() { - const level = "INFO"; - const label = ClientGatewayHelper.CLASS_NAME; - this._log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return ClientGatewayHelper.CLASS_NAME; - } - - public get log(): Logger { - return this._log; - } - - async sendTransferInitializationRequest( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${this.className}#sendTransferInitializationRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.id == undefined || - sessionData.step == undefined || - sessionData.version == undefined || - sessionData.maxRetries == undefined || - sessionData.maxTimeout == undefined || - sessionData.payloadProfile == undefined || - sessionData.loggingProfile == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.accessControlProfile == undefined || - sessionData.applicationProfile == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.sourceGatewayDltSystem == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.recipientLedgerAssetID == undefined || - sessionData.recipientGatewayDltSystem == undefined || - sessionData.allowedSourceBackupGateways == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if ( - !gateway.supportedDltIDs.includes(sessionData.recipientGatewayDltSystem) - ) { - throw new Error( - `${fnTag}, recipient gateway dlt system is not supported by this gateway`, - ); - } - - const initializationRequestMessage: TransferInitializationV1Request = { - messageType: SatpMessageType.InitializationRequest, - sessionID: sessionData.id, - version: sessionData.version, - // developer urn - // credential profile - payloadProfile: sessionData.payloadProfile, - applicationProfile: sessionData.applicationProfile, - loggingProfile: sessionData.loggingProfile, - accessControlProfile: sessionData.accessControlProfile, - signature: "", - sourceGatewayPubkey: gateway.pubKey, - sourceGatewayDltSystem: sessionData.sourceGatewayDltSystem, - recipientGatewayPubkey: sessionData.recipientGatewayPubkey, - recipientGatewayDltSystem: sessionData.recipientGatewayDltSystem, - sequenceNumber: sessionData.lastSequenceNumber, - sourceBasePath: sessionData.sourceBasePath, - recipientBasePath: sessionData.recipientBasePath, - // escrow type - // expiry time (related to the escrow) - // multiple claims allowed - // multiple cancels allowed - // permissions - maxRetries: sessionData.maxRetries, - maxTimeout: sessionData.maxTimeout, - backupGatewaysAllowed: sessionData.allowedSourceBackupGateways, - recipientLedgerAssetID: sessionData.recipientLedgerAssetID, - sourceLedgerAssetID: sessionData.sourceLedgerAssetID, - }; - - const messageSignature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(initializationRequestMessage)), - ); - - initializationRequestMessage.signature = messageSignature; - - sessionData.initializationRequestMessageHash = SHA256( - JSON.stringify(initializationRequestMessage), - ).toString(); - - sessionData.clientSignatureInitializationRequestMessage = messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending TransferInitializationRequest...`); - - if (!remote) { - return initializationRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase1TransferInitiationRequestV1(initializationRequestMessage), - "TransferInitializationRequest", - ); - } - - async checkValidInitializationResponse( - response: TransferInitializationV1Response, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${this.className}#checkValidInitializationResponse`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - if (response.messageType != SatpMessageType.InitializationResponse) { - throw new Error( - `${fnTag}, wrong message type for TransferInitializationResponse`, - ); - } - - if (response.sequenceNumber != sessionData.lastSequenceNumber) { - throw new Error( - `${fnTag}, TransferInitializationResponse sequence number incorrect`, - ); - } - - if ( - response.initialRequestMessageHash != - sessionData.initializationRequestMessageHash - ) { - throw new Error( - `${fnTag}, TransferInitializationResponse previous message hash does not match the one that was sent`, - ); - } - - if (response.serverIdentityPubkey != sessionData.recipientGatewayPubkey) { - throw new Error( - `${fnTag}, TransferInitializationResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if ( - !gateway.verifySignature(response, sessionData.recipientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, TransferInitializationResponse message signature verification failed`, - ); - } - - sessionData.id = response.sessionID; - - sessionData.recipientGatewayPubkey = response.serverIdentityPubkey; - - sessionData.initializationResponseMessageHash = SHA256( - JSON.stringify(response), - ).toString(); - - sessionData.serverSignatureInitializationResponseMessage = - response.signature; - - sessionData.allowedRecipientBackupGateways = response.backupGatewaysAllowed; - - sessionData.step = 3; - - gateway.sessions.set(sessionData.id, sessionData); - this.log.info(`TransferInitializationResponse passed all checks.`); - } - - async sendTransferCommenceRequest( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendTransferCommenceRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.assetProfile == undefined || - sessionData.recipientBasePath == undefined || - // sessionData.originatorPubkey == undefined || - // sessionData.beneficiaryPubkey == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.sourceGatewayDltSystem == undefined || - sessionData.recipientGatewayDltSystem == undefined || - sessionData.initializationResponseMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const hashAssetProfile = SHA256( - JSON.stringify(sessionData.assetProfile), - ).toString(); - - const transferCommenceRequestMessage: TransferCommenceV1Request = { - messageType: SatpMessageType.TransferCommenceRequest, - // originatorPubkey: sessionData.originatorPubkey, - // beneficiaryPubkey: sessionData.beneficiaryPubkey, - originatorPubkey: "sessionData.originatorPubkey", - beneficiaryPubkey: "sessionData.beneficiaryPubkey", - senderDltSystem: sessionData.sourceGatewayDltSystem, - recipientDltSystem: sessionData.recipientGatewayDltSystem, - sessionID: sessionID, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashAssetProfile: hashAssetProfile, - hashPrevMessage: sessionData.initializationResponseMessageHash, - // clientTransferNumber - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - const messageSignature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(transferCommenceRequestMessage)), - ); - - transferCommenceRequestMessage.signature = messageSignature; - - sessionData.transferCommenceMessageRequestHash = SHA256( - JSON.stringify(transferCommenceRequestMessage), - ).toString(); - - sessionData.clientSignatureTransferCommenceRequestMessage = - messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "commence", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending TransferCommenceRequest...`); - - if (!remote) { - return transferCommenceRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase2TransferCommenceRequestV1(transferCommenceRequestMessage), - "TransferCommenceRequest", - ); - } - - async checkValidTransferCommenceResponse( - response: TransferCommenceV1Response, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidTransferCommenceResponse`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - if (response.messageType != SatpMessageType.TransferCommenceResponse) { - throw new Error( - `${fnTag}, wrong message type for TransferCommenceResponse`, - ); - } - - if (response.sequenceNumber != sessionData.lastSequenceNumber) { - throw new Error( - `${fnTag}, TransferCommenceResponse sequence number incorrect`, - ); - } - - if ( - sessionData.transferCommenceMessageRequestHash != - response.hashCommenceRequest - ) { - throw new Error( - `${fnTag}, TransferCommenceResponse previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != response.serverIdentityPubkey) { - throw new Error( - `${fnTag}, TransferCommenceResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != response.clientIdentityPubkey) { - throw new Error( - `${fnTag}, TransferCommenceResponse clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !gateway.verifySignature(response, sessionData.recipientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, TransferCommenceResponse message signature verification failed`, - ); - } - - sessionData.transferCommenceMessageResponseHash = SHA256( - JSON.stringify(response), - ).toString(); - - sessionData.serverSignatureTransferCommenceResponseMessage = - response.signature; - - sessionData.step = 5; - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`TransferCommenceResponse passed all checks.`); - } - - async sendLockEvidenceRequest( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendLockEvidenceRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.lockEvidenceClaim == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.transferCommenceMessageResponseHash == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceRequest, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - lockEvidenceClaim: sessionData.lockEvidenceClaim, - // lock claim format - lockEvidenceExpiration: new Date() - .setDate(new Date().getDate() + 1) - .toString(), // a day from now - hashCommenceAckRequest: sessionData.transferCommenceMessageResponseHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - const messageSignature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - lockEvidenceRequestMessage.signature = messageSignature; - - sessionData.lockEvidenceRequestMessageHash = SHA256( - JSON.stringify(lockEvidenceRequestMessage), - ).toString(); - - sessionData.clientSignatureLockEvidenceRequestMessage = messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "lock", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending LockEvidenceRequest...`); - - if (!remote) { - return lockEvidenceRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase2LockEvidenceRequestV1(lockEvidenceRequestMessage), - "LockEvidenceRequest", - ); - } - - async checkValidLockEvidenceResponse( - response: LockEvidenceV1Response, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidLockEvidenceResponse`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error( - `${fnTag}, reverting transfer because session data is undefined`, - ); - } - - if (response.messageType != SatpMessageType.LockEvidenceResponse) { - throw new Error(`${fnTag}, wrong message type for LockEvidenceResponse`); - } - - if (response.sequenceNumber != sessionData.lastSequenceNumber) { - throw new Error( - `${fnTag}, LockEvidenceResponse sequence number incorrect`, - ); - } - - if ( - sessionData.lockEvidenceRequestMessageHash != - response.hashLockEvidenceRequest - ) { - throw new Error( - `${fnTag}, LockEvidenceResponse previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != response.serverIdentityPubkey) { - throw new Error( - `${fnTag}, LockEvidenceResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != response.clientIdentityPubkey) { - throw new Error( - `${fnTag}, LockEvidenceResponse clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !gateway.verifySignature(response, sessionData.recipientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, LockEvidenceResponse message signature verification failed`, - ); - } - - sessionData.lockEvidenceResponseMessageHash = SHA256( - JSON.stringify(response), - ).toString(); - - sessionData.serverSignatureLockEvidenceResponseMessage = response.signature; - - sessionData.step = 7; - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`LockEvidenceResponse passed all checks.`); - } - - async sendCommitPreparationRequest( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendCommitPreparationRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.lockEvidenceResponseMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const commitPrepareRequestMessage: CommitPreparationV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitPreparationRequest, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashLockEvidenceAck: sessionData.lockEvidenceResponseMessageHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - const messageSignature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(commitPrepareRequestMessage)), - ); - - commitPrepareRequestMessage.signature = messageSignature; - - sessionData.commitPrepareRequestMessageHash = SHA256( - JSON.stringify(commitPrepareRequestMessage), - ).toString(); - - sessionData.clientSignatureCommitPreparationRequestMessage = - messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "prepare", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending CommitPreparationRequest...`); - - if (!remote) { - return commitPrepareRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase3CommitPreparationRequestV1(commitPrepareRequestMessage), - "CommitPreparationRequest", - ); - } - - async checkValidCommitPreparationResponse( - response: CommitPreparationV1Response, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidCommitPreparationResponse`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error( - `${fnTag}, reverting transfer because session data is undefined`, - ); - } - - if (response.messageType != SatpMessageType.CommitPreparationResponse) { - throw new Error( - `${fnTag}, wrong message type for CommitPreparationResponse`, - ); - } - - if (response.sequenceNumber != sessionData.lastSequenceNumber) { - throw new Error( - `${fnTag}, CommitPreparationResponse sequence number incorrect`, - ); - } - - if ( - sessionData.commitPrepareRequestMessageHash != response.hashCommitPrep - ) { - throw new Error( - `${fnTag}, CommitPreparationResponse previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != response.serverIdentityPubkey) { - throw new Error( - `${fnTag}, CommitPreparationResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != response.clientIdentityPubkey) { - throw new Error( - `${fnTag}, CommitPreparationResponse clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !gateway.verifySignature(response, sessionData.recipientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, CommitPreparationResponse message signature verification failed`, - ); - } - - sessionData.commitPrepareResponseMessageHash = SHA256( - JSON.stringify(response), - ).toString(); - - sessionData.serverSignatureCommitPreparationResponseMessage = - response.signature; - - sessionData.step = 9; - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`CommitPreparationResponse passed all checks.`); - } - - async sendCommitFinalRequest( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendCommitFinalRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.commitFinalClaim == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.commitPrepareResponseMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const commitFinalRequestMessage: CommitFinalV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalRequest, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - commitFinalClaim: sessionData.commitFinalClaim, - // commit final claim format - hashCommitPrepareAck: sessionData.commitPrepareResponseMessageHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - const messageSignature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(commitFinalRequestMessage)), - ); - - commitFinalRequestMessage.signature = messageSignature; - - sessionData.commitFinalRequestMessageHash = SHA256( - JSON.stringify(commitFinalRequestMessage), - ).toString(); - - sessionData.clientSignatureCommitFinalRequestMessage = messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "final", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending CommitFinalRequest...`); - - if (!remote) { - return commitFinalRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase3CommitFinalRequestV1(commitFinalRequestMessage), - "CommitFinalRequest", - ); - } - - async checkValidCommitFinalResponse( - response: CommitFinalV1Response, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidCommitFinalResponse`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error( - `${fnTag}, reverting transfer because session data is undefined`, - ); - } - - if (response.messageType != SatpMessageType.CommitFinalResponse) { - throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - } - - if (response.sequenceNumber != sessionData.lastSequenceNumber) { - throw new Error( - `${fnTag}, CommitFinalResponse sequence number incorrect`, - ); - } - - if (response.commitAcknowledgementClaim == undefined) { - throw new Error(`${fnTag}, the claim provided is not valid`); - } - - if (sessionData.commitFinalRequestMessageHash != response.hashCommitFinal) { - throw new Error( - `${fnTag}, CommitFinalResponse previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != response.serverIdentityPubkey) { - throw new Error( - `${fnTag}, CommitFinalResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != response.clientIdentityPubkey) { - throw new Error( - `${fnTag}, CommitFinalResponse clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !gateway.verifySignature(response, sessionData.recipientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, CommitFinalResponse message signature verification failed`, - ); - } - - const claimHash = SHA256(response.commitAcknowledgementClaim).toString(); - const retrievedClaim = await gateway.getLogFromRemote( - PluginSatpGateway.getSatpLogKey(sessionID, "proof", "create"), - ); - - if (claimHash != retrievedClaim.hash) { - throw new Error( - `${fnTag}, Commit Acknowledgement Claim hash does not match the one stored in IPFS`, - ); - } - - if ( - !gateway.verifySignature(retrievedClaim, response.serverIdentityPubkey) - ) { - throw new Error( - `${fnTag}, Commit Acknowledgement Claim signature verification failed`, - ); - } - - sessionData.commitAcknowledgementClaim = - response.commitAcknowledgementClaim; - - sessionData.commitFinalResponseMessageHash = SHA256( - JSON.stringify(response), - ).toString(); - - sessionData.serverSignatureCommitFinalResponseMessage = response.signature; - - sessionData.step = 11; - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`CommitFinalResponse passed all checks.`); - } - - async sendTransferCompleteRequest( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendTransferCompleteRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.commitFinalResponseMessageHash == undefined || - sessionData.transferCommenceMessageRequestHash == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const transferCompleteRequestMessage: TransferCompleteV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCompleteRequest, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashCommitFinalAck: sessionData.commitFinalResponseMessageHash, - hashTransferCommence: sessionData.transferCommenceMessageRequestHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - const messageSignature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(transferCompleteRequestMessage)), - ); - - transferCompleteRequestMessage.signature = messageSignature; - - sessionData.transferCompleteMessageHash = SHA256( - JSON.stringify(transferCompleteRequestMessage), - ).toString(); - - sessionData.clientSignatureTransferCompleteMessage = messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "complete", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending TransferCompleteRequest...`); - - if (!remote) { - return transferCompleteRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase3TransferCompleteRequestV1(transferCompleteRequestMessage), - "TransferCompleteRequest", - ); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/fabric-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/fabric-satp-gateway.ts deleted file mode 100644 index 05a4233ee1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/fabric-satp-gateway.ts +++ /dev/null @@ -1,482 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - DefaultApi as FabricApi, - FabricContractInvocationType, - FabricSigningCredential, - RunTransactionRequest as FabricRunTransactionRequest, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { - IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, -} from "./plugin-satp-gateway"; -import { SessionDataRollbackActionsPerformedEnum } from "../generated/openapi/typescript-axios"; - -export interface IFabricSatpGatewayConstructorOptions - extends IPluginSatpGatewayConstructorOptions { - fabricPath?: string; - fabricSigningCredential?: FabricSigningCredential; - fabricChannelName?: string; - fabricContractName?: string; -} - -export class FabricSatpGateway extends PluginSatpGateway { - public fabricApi?: FabricApi; - public fabricSigningCredential?: FabricSigningCredential; - public fabricChannelName?: string; - public fabricContractName?: string; - - public constructor(options: IFabricSatpGatewayConstructorOptions) { - super({ - name: options.name, - dltIDs: options.dltIDs, - instanceId: options.instanceId, - keyPair: options.keyPair, - backupGatewaysAllowed: options.backupGatewaysAllowed, - ipfsPath: options.ipfsPath, - clientHelper: options.clientHelper, - serverHelper: options.serverHelper, - knexLocalConfig: options.knexLocalConfig, - knexRemoteConfig: options.knexRemoteConfig, - }); - - if (options.fabricPath != undefined) this.defineFabricConnection(options); - } - - private defineFabricConnection( - options: IFabricSatpGatewayConstructorOptions, - ): void { - const fnTag = `${this.className}#defineFabricConnection()`; - - const config = new Configuration({ basePath: options.fabricPath }); - const apiClient = new FabricApi(config); - this.fabricApi = apiClient; - const notEnoughFabricParams: boolean = - options.fabricSigningCredential == undefined || - options.fabricChannelName == undefined || - options.fabricContractName == undefined; - if (notEnoughFabricParams) { - throw new Error( - `${fnTag}, fabric params missing should have: signing credentials, contract name, channel name, asset ID`, - ); - } - this.fabricSigningCredential = options.fabricSigningCredential; - this.fabricChannelName = options.fabricChannelName; - this.fabricContractName = options.fabricContractName; - } - - async lockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#lockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricLockAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const response = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "LockAsset", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptLockRes = await this.fabricApi.getTransactionReceiptByTxIDV1( - { - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest, - ); - - this.log.warn(receiptLockRes.data); - fabricLockAssetProof = JSON.stringify(receiptLockRes.data); - } - - sessionData.lockEvidenceClaim = fabricLockAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, proof of the asset lock: ${fabricLockAssetProof}`); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "lock", - data: fabricLockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - return fabricLockAssetProof; - } - - async unlockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#unlockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricUnlockAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const response = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "UnlockAsset", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptUnlock = await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptUnlock.data); - fabricUnlockAssetProof = JSON.stringify(receiptUnlock.data); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Unlock, - ); - sessionData.rollbackProofs.push(fabricUnlockAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset unlock: ${fabricUnlockAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "unlock", - data: fabricUnlockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - return fabricUnlockAssetProof; - } - - async deleteAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#deleteAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricDeleteAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const deleteRes = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "DeleteAsset", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptDeleteRes = - await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, deleteRes.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptDeleteRes.data); - fabricDeleteAssetProof = JSON.stringify(receiptDeleteRes.data); - } - - sessionData.commitFinalClaim = fabricDeleteAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset deletion: ${fabricDeleteAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "delete", - data: fabricDeleteAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - return fabricDeleteAssetProof; - } - - async createAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - const fnTag = `${this.className}#createAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - this.fabricChannelName == undefined || - this.fabricContractName == undefined || - this.fabricSigningCredential == undefined || - sessionData.rollbackProofs == undefined || - sessionData.rollbackActionsPerformed == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricCreateAssetProof = ""; - - if (assetID == undefined) { - assetID = sessionData.recipientLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const response = await this.fabricApi.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [assetID!, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - }); - - const receiptCreate = await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptCreate.data); - fabricCreateAssetProof = JSON.stringify(receiptCreate.data); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Create, - ); - - sessionData.rollbackProofs.push(fabricCreateAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset creation: ${fabricCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "create", - data: fabricCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return fabricCreateAssetProof; - } - - // Not implementing these methods because this class is an example - // of a client gateway. They are only used for server gateways. - async createAsset(sessionID: string, assetID?: string): Promise { - return new Promise(() => `${sessionID}, ${assetID}`); - } - - async deleteAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - return new Promise(() => `${sessionID}, ${assetID}`); - } - - async rollback(sessionID: string): Promise { - const fnTag = `${this.className}#rollback()`; - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - sessionData.rollback = true; - - this.log.info(`${fnTag}, rolling back session ${sessionID}`); - - if ( - this.fabricApi == undefined || - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.recipientLedgerAssetID == undefined - ) { - return; - } - - if (this.isClientGateway(sessionID)) { - if (await this.fabricAssetExists(sessionData.sourceLedgerAssetID)) { - if (await this.isFabricAssetLocked(sessionData.sourceLedgerAssetID)) { - // Rollback locking of the asset - await this.unlockAsset(sessionID, sessionData.sourceLedgerAssetID); - } - } else { - // Rollback extinguishment of the asset - await this.createAssetToRollback( - sessionID, - sessionData.sourceLedgerAssetID, - ); - } - } else { - if (await this.fabricAssetExists(sessionData.sourceLedgerAssetID)) { - await this.deleteAsset(sessionID, sessionData.recipientLedgerAssetID); - } - } - } - - /* Helper functions */ - async fabricAssetExists(fabricAssetID: string): Promise { - const fnTag = `${this.className}#fabricAssetExists()`; - - if ( - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined - ) { - throw new Error(`${fnTag} fabric config is not defined`); - } - - const assetExists = await this.fabricApi?.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [fabricAssetID], - methodName: "AssetExists", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - }); - - if (assetExists == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetExists?.data.functionOutput == "true"; - } - - async isFabricAssetLocked( - fabricAssetID: string, - ): Promise { - const fnTag = `${this.className}#fabricAssetExists()`; - - if ( - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined - ) { - throw new Error(`${fnTag} fabric config is not defined`); - } - - const assetIsLocked = await this.fabricApi?.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [fabricAssetID], - methodName: "IsAssetLocked", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - }); - - if (assetIsLocked == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetIsLocked?.data.functionOutput == "true"; - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-besu-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-besu-satp-gateway.ts deleted file mode 100644 index 2ba9be6d17..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-besu-satp-gateway.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IBesuSatpGatewayConstructorOptions, - BesuSatpGateway, -} from "./besu-satp-gateway"; - -export class PluginFactoryBesuSatpGateway extends PluginFactory< - BesuSatpGateway, - IBesuSatpGatewayConstructorOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IBesuSatpGatewayConstructorOptions, - ): Promise { - return new BesuSatpGateway(pluginOptions); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-fabric-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-fabric-satp-gateway.ts deleted file mode 100644 index 30010f6ee6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-fabric-satp-gateway.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IFabricSatpGatewayConstructorOptions, - FabricSatpGateway, -} from "./fabric-satp-gateway"; - -export class PluginFactoryFabricSatpGateway extends PluginFactory< - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IFabricSatpGatewayConstructorOptions, - ): Promise { - return new FabricSatpGateway(pluginOptions); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts deleted file mode 100644 index aa68b799a6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts +++ /dev/null @@ -1,1222 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import type { Server } from "http"; -import type { Server as SecureServer } from "https"; -import { Optional } from "typescript-optional"; -import type { Express } from "express"; -import { v4 as uuidV4 } from "uuid"; -import { Knex } from "knex"; -import OAS from "../../json/openapi.json"; -import { - Secp256k1Keys, - Logger, - Checks, - LoggerProvider, - JsObjectSigner, - IJsObjectSignerOptions, -} from "@hyperledger/cactus-common"; -import { - ICactusPlugin, - IPluginWebService, - IWebServiceEndpoint, - Configuration, -} from "@hyperledger/cactus-core-api"; -import { - TransferInitializationV1Response, - DefaultApi as SatpApi, - SessionData, - ClientV1Request, - TransferCommenceV1Request, - TransferCommenceV1Response, - LockEvidenceV1Request, - LockEvidenceV1Response, - CommitPreparationV1Request, - CommitFinalV1Request, - CommitPreparationV1Response, - CommitFinalV1Response, - TransferCompleteV1Request, - TransferInitializationV1Request, - LocalLog, - RecoverV1Message, - RecoverUpdateV1Message, - RecoverUpdateAckV1Message, - RollbackV1Message, - RollbackAckV1Message, -} from "../generated/openapi/typescript-axios"; -import { CommitFinalRequestEndpointV1 } from "../web-services/server-side/commit-final-request-endpoint"; -import { CommitFinalResponseEndpointV1 } from "../web-services/client-side/commit-final-response-endpoint"; -import { CommitPreparationResponseEndpointV1 } from "../web-services/client-side/commit-prepare-response-endpoint"; -import { LockEvidenceResponseEndpointV1 } from "../web-services/client-side/lock-evidence-response-endpoint"; -import { TransferCommenceResponseEndpointV1 } from "../web-services/client-side/transfer-commence-response-endpoint"; -import { TransferInitiationResponseEndpointV1 } from "../web-services/client-side/transfer-initiation-response-endpoint"; -import { LockEvidenceRequestEndpointV1 } from "../web-services/server-side/lock-evidence-request-endpoint"; -import { TransferCommenceRequestEndpointV1 } from "../web-services/server-side/transfer-commence-request-endpoint"; -import { TransferCompleteRequestEndpointV1 } from "../web-services/server-side/transfer-complete-request-endpoint"; -import { TransferInitiationRequestEndpointV1 } from "../web-services/server-side/transfer-initiation-request-endpoint"; -import { CommitPreparationRequestEndpointV1 } from "../web-services/server-side/commite-prepare-request-endpoint"; -import { randomInt } from "crypto"; -import { ClientGatewayHelper } from "./client/client-helper"; -import { ServerGatewayHelper } from "./server/server-helper"; -import { - checkValidRecoverMessage, - sendRecoverMessage, -} from "./recovery/recover"; -import { - checkValidRecoverUpdateMessage, - sendRecoverUpdateMessage, -} from "./recovery/recover-update"; -import { - checkValidRecoverUpdateAckMessage, - sendRecoverUpdateAckMessage, -} from "./recovery/recover-update-ack"; -import { - checkValidRecoverSuccessMessage, - sendRecoverSuccessMessage, -} from "./recovery/recover-success"; -import { SHA256 } from "crypto-js"; -import { RecoverMessageEndpointV1 } from "../web-services/recovery/recover-message-endpoint"; -import { RecoverUpdateMessageEndpointV1 } from "../web-services/recovery/recover-update-message-endpoint"; -import { RecoverUpdateAckMessageEndpointV1 } from "../web-services/recovery/recover-update-ack-message-endpoint"; -import { RecoverSuccessMessageEndpointV1 } from "../web-services/recovery/recover-success-message-endpoint"; -import { RollbackMessageEndpointV1 } from "../web-services/recovery/rollback-message-endpoint"; -import { - checkValidRollbackMessage, - sendRollbackMessage, -} from "./recovery/rollback"; -import { AxiosResponse } from "axios"; -import { - checkValidRollbackAckMessage, - sendRollbackAckMessage, -} from "./recovery/rollback-ack"; -import { ClientRequestEndpointV1 } from "../web-services/client-side/client-request-endpoint"; -import { RollbackAckMessageEndpointV1 } from "../web-services/recovery/rollback-ack-message-endpoint"; -import { KnexLocalLogRepository as LocalLogRepository } from "./repository/knex-local-log-repository"; -import { IPFSRemoteLogRepository } from "./repository/ipfs-remote-log-repository"; -import { KnexRemoteLogRepository } from "./repository/knex-remote-log-repository"; -import { - ILocalLogRepository, - IRemoteLogRepository, -} from "./repository/interfaces/repository"; - -export enum SatpMessageType { - InitializationRequest = "urn:ietf:satp:msgtype:init-transfer-msg", - InitializationResponse = "urn:ietf:satp:msgtype:init-transfer-ack-msg", - TransferCommenceRequest = "urn:ietf:satp:msgtype:transfer-commence-msg", - TransferCommenceResponse = "urn:ietf:satp:msgtype:transfer-commence-ack-msg", - LockEvidenceRequest = "urn:ietf:satp:msgtype:lock-evidence-req-msg", - LockEvidenceResponse = "urn:ietf:satp:msgtype:lock-evidence-ack-msg", - CommitPreparationRequest = "urn:ietf:satp:msgtype:commit-prepare-msg", - CommitPreparationResponse = "urn:ietf:satp:msgtype:commit-ack-msg", - CommitFinalRequest = "urn:ietf:satp:msgtype:commit-final-msg", - CommitFinalResponse = "urn:ietf:satp:msgtype:commit-final-ack-msg", - TransferCompleteRequest = "urn:ietf:satp:msgtype:commit-transfer-complete-msg", -} - -export interface IPluginSatpGatewayConstructorOptions { - name: string; - dltIDs: string[]; - instanceId: string; - keyPair?: IKeyPair; - backupGatewaysAllowed?: string[]; - clientHelper: ClientGatewayHelper; - serverHelper: ServerGatewayHelper; - knexLocalConfig?: Knex.Config; - - // below are the two options to store remote logs. Either using a DB simulating a remote DB or using - // IPFS which ensures a different notion of accountability. If both are set, the IPFS will be used - knexRemoteConfig?: Knex.Config; - ipfsPath?: string; -} -export interface IKeyPair { - publicKey: Uint8Array; - privateKey: Uint8Array; -} - -export interface IRemoteLog { - key: string; - hash: string; - signature: string; - signerPubKey: string; -} - -export interface ILocalLog { - key?: string; - sessionID: string; - data?: string; - type: string; - operation: string; - timestamp?: string; -} - -export abstract class PluginSatpGateway - implements ICactusPlugin, IPluginWebService -{ - public static readonly CLASS_NAME = "SatpGateway"; - private readonly instanceId: string; - private readonly _log: Logger; - - private _sessions: Map; - private _pubKey: string; - private _privKey: string; - - public localRepository?: ILocalLogRepository; - public remoteRepository?: IRemoteLogRepository; - - private endpoints: IWebServiceEndpoint[] | undefined; - - private _supportedDltIDs: string[]; - private _backupGatewaysAllowed: string[]; - - private objectSigner: JsObjectSigner; - - private _clientHelper: ClientGatewayHelper; - private _serverHelper: ServerGatewayHelper; - - public constructor(options: IPluginSatpGatewayConstructorOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} arg options.instanceId`); - Checks.nonBlankString(options.instanceId, `${fnTag} options.instanceId`); - - const level = "INFO"; - const label = this.className; - this._log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = options.instanceId; - - this._supportedDltIDs = options.dltIDs; - this._sessions = new Map(); - - this._backupGatewaysAllowed = options.backupGatewaysAllowed || []; - const keyPairs = options.keyPair - ? options.keyPair - : Secp256k1Keys.generateKeyPairsBuffer(); - this._pubKey = PluginSatpGateway.bufArray2HexStr(keyPairs.publicKey); - this._privKey = PluginSatpGateway.bufArray2HexStr(keyPairs.privateKey); - - const objectSignerOptions: IJsObjectSignerOptions = { - privateKey: this._privKey, - logLevel: "debug", - }; - this.objectSigner = new JsObjectSigner(objectSignerOptions); - - this._clientHelper = options.clientHelper; - this._serverHelper = options.serverHelper; - - this.remoteRepository = new KnexRemoteLogRepository( - options.knexRemoteConfig, - ); - if (options.ipfsPath != undefined) - this.remoteRepository = new IPFSRemoteLogRepository(options.ipfsPath); - - this.localRepository = new LocalLogRepository(options.knexLocalConfig); - } - - public get className(): string { - return PluginSatpGateway.CLASS_NAME; - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - /*public getAspect(): PluginAspect { - return PluginAspect.WEB_SERVICE; - }*/ - - public async onPluginInit(): Promise { - return; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - // Server endpoints - const transferInitiationRequestEndpoint = - new TransferInitiationRequestEndpointV1({ - gateway: this, - }); - const transferCommenceRequestEndpoint = - new TransferCommenceRequestEndpointV1({ - gateway: this, - }); - const lockEvidenceRequestEndpoint = new LockEvidenceRequestEndpointV1({ - gateway: this, - }); - const commitPreparationRequestEndpoint = - new CommitPreparationRequestEndpointV1({ - gateway: this, - }); - const commitFinalRequestEndpoint = new CommitFinalRequestEndpointV1({ - gateway: this, - }); - const transferCompleteRequestEndpoint = - new TransferCompleteRequestEndpointV1({ - gateway: this, - }); - - // Client endpoints - const clientRequestEndpoint = new ClientRequestEndpointV1({ - gateway: this, - }); - const transferInitiationResponseEndpoint = - new TransferInitiationResponseEndpointV1({ - gateway: this, - }); - const transferCommenceResponseEndpoint = - new TransferCommenceResponseEndpointV1({ - gateway: this, - }); - const lockEvidenceResponseEndpoint = new LockEvidenceResponseEndpointV1({ - gateway: this, - }); - const commitPreparationResponseEndpoint = - new CommitPreparationResponseEndpointV1({ - gateway: this, - }); - const commitFinalResponseEndpoint = new CommitFinalResponseEndpointV1({ - gateway: this, - }); - - // Recovery endpoints - const recoverEndpoint = new RecoverMessageEndpointV1({ - gateway: this, - }); - - const recoverUpdateEndpoint = new RecoverUpdateMessageEndpointV1({ - gateway: this, - }); - - const recoverUpdateAckEndpoint = new RecoverUpdateAckMessageEndpointV1({ - gateway: this, - }); - - const recoverSuccessEndpoint = new RecoverSuccessMessageEndpointV1({ - gateway: this, - }); - - const rollbackEndpoint = new RollbackMessageEndpointV1({ - gateway: this, - }); - - const rollbackAckEndpoint = new RollbackAckMessageEndpointV1({ - gateway: this, - }); - - this.endpoints = [ - transferInitiationRequestEndpoint, - transferCommenceRequestEndpoint, - lockEvidenceRequestEndpoint, - commitPreparationRequestEndpoint, - commitFinalRequestEndpoint, - transferCompleteRequestEndpoint, - clientRequestEndpoint, - transferInitiationResponseEndpoint, - transferCommenceResponseEndpoint, - lockEvidenceResponseEndpoint, - commitPreparationResponseEndpoint, - commitFinalResponseEndpoint, - recoverEndpoint, - recoverUpdateEndpoint, - recoverUpdateAckEndpoint, - recoverSuccessEndpoint, - rollbackEndpoint, - rollbackAckEndpoint, - ]; - return this.endpoints; - } - - public getHttpServer(): Optional { - return Optional.empty(); - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return "@hyperledger/cactus-odap-gateway-business-logic-plugin"; - } - - public get sessions(): Map { - return this._sessions; - } - - public get privKey(): string { - return this._privKey; - } - - public get pubKey(): string { - return this._pubKey; - } - - public get supportedDltIDs(): string[] { - return this._supportedDltIDs; - } - - public get backupGatewaysAllowed(): string[] { - return this._backupGatewaysAllowed; - } - - public get clientHelper(): ClientGatewayHelper { - return this._clientHelper; - } - - public get serverHelper(): ServerGatewayHelper { - return this._serverHelper; - } - - public get log(): Logger { - return this._log; - } - - isClientGateway(sessionID: string): boolean { - const fnTag = `${this.className}#isClientGateway()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - return sessionData.sourceGatewayPubkey == this.pubKey; - } - - sign(msg: string): Uint8Array { - return this.objectSigner.sign(msg); - } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - verifySignature(obj: any, pubKey: string): boolean { - const sourceSignature = new Uint8Array(Buffer.from(obj.signature, "hex")); - const sourcePubkey = new Uint8Array(Buffer.from(pubKey, "hex")); - - const signature = obj.signature; - obj.signature = ""; - if ( - !this.objectSigner.verify( - JSON.stringify(obj), - sourceSignature, - sourcePubkey, - ) - ) { - return false; - } - - obj.signature = signature; - return true; - } - - static bufArray2HexStr(array: Uint8Array): string { - return Buffer.from(array).toString("hex"); - } - - static getSatpLogKey( - sessionID: string, - type: string, - operation: string, - ): string { - return `${sessionID}-${type}-${operation}`; - } - - async recoverOpenSessions(remote: boolean) { - const fnTag = `${this.className}#recoverOpenSessions()`; - - this.log.info(`${fnTag}, recovering open sessions...`); - - if (this.localRepository?.database == undefined) { - throw new Error(`${fnTag}, database is undefined`); - } - - const logs: LocalLog[] = await this.localRepository.readLogsNotProofs(); - - for (const log of logs) { - const sessionID = log.sessionID; - this.log.info(`${fnTag}, recovering session ${sessionID}...`); - - if (log == undefined || log.data == undefined) { - throw new Error(`${fnTag}, invalid log}`); - } - - const sessionData: SessionData = JSON.parse(log.data); - - sessionData.lastLogEntryTimestamp = log.timestamp; - - let amIBackup = false; - if ( - this.pubKey != sessionData.sourceGatewayPubkey && - this.pubKey != sessionData.recipientGatewayPubkey - ) { - // this is a backup gateway -> for now we assume backup gateways only on the client side - sessionData.sourceGatewayPubkey = this.pubKey; - amIBackup = true; - } - - this.sessions.set(sessionID, sessionData); - if (remote) await sendRecoverMessage(sessionID, this, amIBackup, true); - } - } - - async storeInDatabase(LocalLog: ILocalLog) { - const fnTag = `${this.className}#storeInDatabase()`; - this.log.info(`${fnTag}, Storing locally log: ${JSON.stringify(LocalLog)}`); - - await this.localRepository?.create(LocalLog); - } - - async storeRemoteLog(key: string, hash: string) { - const fnTag = `${this.className}#storeRemoteLog()`; - - const remoteLog: IRemoteLog = { - key: key, - hash: hash, - signature: "", - signerPubKey: this.pubKey, - }; - - remoteLog.signature = PluginSatpGateway.bufArray2HexStr( - this.sign(JSON.stringify(remoteLog)), - ); - - this.log.info(`${fnTag}, Storing remote log: ${JSON.stringify(remoteLog)}`); - - const response = await this.remoteRepository?.create(remoteLog); - - if (response.status < 200 && response.status > 299) { - throw new Error( - `${fnTag}, got response ${response.status} when logging to remote`, - ); - } - } - - async storeLog(localLog: LocalLog): Promise { - localLog.key = PluginSatpGateway.getSatpLogKey( - localLog.sessionID, - localLog.type, - localLog.operation, - ); - localLog.timestamp = Date.now().toString(); - - await this.storeInDatabase(localLog); - - // Keep the order consistent with the order of the fields in the table - // so that the hash matches when retrieving from the database - const hash = SHA256( - JSON.stringify(localLog, [ - "sessionID", - "type", - "key", - "operation", - "timestamp", - "data", - ]), - ).toString(); - - await this.storeRemoteLog(localLog.key, hash); - } - - async storeProof(localLog: ILocalLog): Promise { - if (localLog.data == undefined) return; - - localLog.key = PluginSatpGateway.getSatpLogKey( - localLog.sessionID, - localLog.type, - localLog.operation, - ); - localLog.timestamp = Date.now().toString(); - - await this.storeInDatabase(localLog); - - const hash = SHA256(localLog.data).toString(); - - await this.storeRemoteLog(localLog.key, hash); - } - - async getLogFromDatabase(logKey: string): Promise { - const fnTag = `${this.className}#getLogFromDatabase()`; - this.log.info(`${fnTag}, retrieving log with key ${logKey}`); - - return await this.localRepository?.readById(logKey).then((row) => { - this.log.info(`${fnTag}, retrieved log ${JSON.stringify(row)}`); - return row; - }); - } - - async getLastLogFromDatabase( - sessionID: string, - ): Promise { - const fnTag = `${this.className}#getLastLog()`; - this.log.info(`${fnTag}, retrieving last log from sessionID ${sessionID}`); - - return await this.localRepository?.readLastestLog(sessionID).then((row) => { - this.log.info(`${fnTag}, retrieved log ${JSON.stringify(row)}`); - return row; - }); - } - - async getLogsMoreRecentThanTimestamp( - timestamp: string, - ): Promise { - const fnTag = `${this.className}#getLogsMoreRecentThanTimestamp()`; - this.log.info(`${fnTag}, retrieving logs more recent than ${timestamp}`); - - const logs: ILocalLog[] | undefined = - await this.localRepository?.readLogsMoreRecentThanTimestamp(timestamp); - - if (logs == undefined) { - throw new Error(`${fnTag}, error when retrieving log from database`); - } - - this.log.info(`${fnTag}, there are ${logs.length} more recent logs`); - - return logs; - } - - async getLogFromRemote(logKey: string): Promise { - const fnTag = `${this.className}#getSatpLogFromIPFS()`; - this.log.info(`Retrieving log with key: <${logKey}>`); - - try { - const log = await this.remoteRepository?.readById(logKey); - - if (log == undefined || log?.signature == undefined) { - throw new Error(`${fnTag}, the log or its signature is not defined`); - } - - if (!this.verifySignature(log, log.signerPubKey)) { - throw new Error(`${fnTag}, received log with invalid signature`); - } - - return log; - } catch { - throw new Error(`${fnTag}, error reading from remote log`); - } - } - - static getSatpAPI(basePath: string): SatpApi { - const satpServerApiConfig = new Configuration({ - basePath: basePath, - }); - - return new SatpApi(satpServerApiConfig); - } - - async deleteDatabaseEntries(sessionID: string) { - this.log.info( - `deleting logs from database associated with sessionID: ${sessionID}`, - ); - - await this.localRepository?.deleteBySessionId(sessionID); - } - - async resumeSatpSession(sessionID: string, remote: boolean) { - const fnTag = `${this.className}#continueSatpSession()`; - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if the other gateway made the rollback, we will do it as well - if (sessionData.rollback) { - await this.rollback(sessionID); - await sendRollbackAckMessage(sessionID, this, true); - return; - } - - this.log.info( - `${fnTag}, recovering session ${sessionID} that was in step ${sessionData.step}`, - ); - - // If step is even then the last log was inserted by the server - // so we need to increase the step - if (this.isClientGateway(sessionID) && sessionData.step % 2 == 0) { - sessionData.step++; - } - - this.sessions.set(sessionID, sessionData); - - switch (sessionData.step) { - case 1: - return await this.clientHelper.sendTransferInitializationRequest( - sessionID, - this, - remote, - ); - - case 2: - return await this.serverHelper.sendTransferInitializationResponse( - sessionID, - this, - remote, - ); - - case 3: - return await this.clientHelper.sendTransferCommenceRequest( - sessionID, - this, - remote, - ); - - case 4: - return await this.serverHelper.sendTransferCommenceResponse( - sessionID, - this, - remote, - ); - - case 5: - return await this.clientHelper.sendLockEvidenceRequest( - sessionID, - this, - remote, - ); - - case 6: - return await this.serverHelper.sendLockEvidenceResponse( - sessionID, - this, - remote, - ); - - case 7: - return await this.clientHelper.sendCommitPreparationRequest( - sessionID, - this, - remote, - ); - - case 8: - return await this.serverHelper.sendCommitPreparationResponse( - sessionID, - this, - remote, - ); - - case 9: - return await this.clientHelper.sendCommitFinalRequest( - sessionID, - this, - remote, - ); - - case 10: - return await this.serverHelper.sendCommitFinalResponse( - sessionID, - this, - remote, - ); - - case 11: - return await this.clientHelper.sendTransferCompleteRequest( - sessionID, - this, - remote, - ); - - default: - this.sessions.delete(sessionID); - throw new Error( - `${fnTag}, invalid session data step. A new session should be initiated by the client gateway.`, - ); - } - } - - private updateLastMessageReceivedTimestamp(sessionID: string) { - const fnTag = `${this.className}#updateLastMessageReceivedTimestamp()`; - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - sessionData.lastMessageReceivedTimestamp = new Date().toString(); - this.sessions.set(sessionID, sessionData); - } - - /********************************/ - /* Server-side */ - /********************************/ - - async onTransferInitiationRequestReceived( - request: TransferInitializationV1Request, - ): Promise { - const fnTag = `${this.className}#onTransferInitiationRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received TransferInitializationRequest: ${JSON.stringify( - request, - )}`, - ); - - await this.serverHelper.checkValidInitializationRequest(request, this); - await this.serverHelper.sendTransferInitializationResponse( - request.sessionID, - this, - true, - ); - } - - async onTransferCommenceRequestReceived( - request: TransferCommenceV1Request, - ): Promise { - const fnTag = `${this.className}#onTransferCommenceRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received TransferCommenceRequest: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.serverHelper.checkValidtransferCommenceRequest(request, this); - await this.serverHelper.sendTransferCommenceResponse( - request.sessionID, - this, - true, - ); - } - - async onLockEvidenceRequestReceived( - request: LockEvidenceV1Request, - ): Promise { - const fnTag = `${this.className}#onLockEvidenceRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received LockEvidenceRequest: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.serverHelper.checkValidLockEvidenceRequest(request, this); - await this.serverHelper.sendLockEvidenceResponse( - request.sessionID, - this, - true, - ); - } - - async onCommitPrepareRequestReceived( - request: CommitPreparationV1Request, - ): Promise { - const fnTag = `${this.className}#onCommitPrepareRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received CommitPrepareRequest: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.serverHelper.checkValidCommitPreparationRequest(request, this); - await this.serverHelper.sendCommitPreparationResponse( - request.sessionID, - this, - true, - ); - } - - async onCommitFinalRequestReceived( - request: CommitFinalV1Request, - ): Promise { - const fnTag = `${this.className}#onCommitFinalRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received CommitFinalRequest: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.serverHelper.checkValidCommitFinalRequest(request, this); - await this.createAsset(request.sessionID); - await this.serverHelper.sendCommitFinalResponse( - request.sessionID, - this, - true, - ); - } - - async onTransferCompleteRequestReceived( - request: TransferCompleteV1Request, - ): Promise { - const fnTag = `${this.className}#onTransferCompleteRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received TransferCompleteRequest: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.serverHelper.checkValidTransferCompleteRequest(request, this); - //this.deleteDatabaseEntries(request.sessionID); - } - - /********************************/ - /* Client-side */ - /********************************/ - - async onTransferInitiationResponseReceived( - request: TransferInitializationV1Response, - ): Promise { - const fnTag = `${this.className}#onTransferInitiationResponseReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `client gateway received TransferInitiationResponse: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.clientHelper.checkValidInitializationResponse(request, this); - await this.clientHelper.sendTransferCommenceRequest( - request.sessionID, - this, - true, - ); - } - - async onTransferCommenceResponseReceived( - request: TransferCommenceV1Response, - ): Promise { - const fnTag = `${this.className}#onTransferCommenceResponseReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `client gateway received TransferCommenceResponse: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.clientHelper.checkValidTransferCommenceResponse(request, this); - await this.lockAsset(request.sessionID); - await this.clientHelper.sendLockEvidenceRequest( - request.sessionID, - this, - true, - ); - } - - async onLockEvidenceResponseReceived( - request: LockEvidenceV1Response, - ): Promise { - const fnTag = `${this.className}#onLockEvidenceResponseReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `client gateway received LockEvidenceResponse: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.clientHelper.checkValidLockEvidenceResponse(request, this); - await this.clientHelper.sendCommitPreparationRequest( - request.sessionID, - this, - true, - ); - } - - async onCommitPrepareResponseReceived( - request: CommitPreparationV1Response, - ): Promise { - const fnTag = `${this.className}#onCommitPrepareResponseReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.clientHelper.checkValidCommitPreparationResponse(request, this); - await this.deleteAsset(request.sessionID); - await this.clientHelper.sendCommitFinalRequest( - request.sessionID, - this, - true, - ); - } - - async onCommitFinalResponseReceived( - request: CommitFinalV1Response, - ): Promise { - const fnTag = `${this.className}#onCommitFinalResponseReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `client gateway received CommitFinalResponse: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.clientHelper.checkValidCommitFinalResponse(request, this); - await this.clientHelper.sendTransferCompleteRequest( - request.sessionID, - this, - true, - ); - } - - /********************************/ - /* Recovery */ - /********************************/ - - async onRecoverMessageReceived(request: RecoverV1Message): Promise { - const fnTag = `${this.className}#onRecoverMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received Recover message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRecoverMessage(request, this); - await sendRecoverUpdateMessage(request.sessionID, this, true); - } - - async onRecoverUpdateMessageReceived( - request: RecoverUpdateV1Message, - ): Promise { - const fnTag = `${this.className}#onRecoverUpdateMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received RecoverUpdate message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRecoverUpdateMessage(request, this); - await sendRecoverUpdateAckMessage(request.sessionID, this, true); - } - - async onRecoverUpdateAckMessageReceived( - request: RecoverUpdateAckV1Message, - ): Promise { - const fnTag = `${this.className}#onRecoverUpdateAckMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received RecoverUpdateAck message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRecoverUpdateAckMessage(request, this); - await sendRecoverSuccessMessage(request.sessionID, this, true); - } - - async onRecoverSuccessMessageReceived( - request: RecoverUpdateAckV1Message, - ): Promise { - const fnTag = `${this.className}#onRecoverSuccessMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received RecoverSuccess message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRecoverSuccessMessage(request, this); - await this.resumeSatpSession(request.sessionID, true); - } - - async onRollbackMessageReceived(request: RollbackV1Message): Promise { - const fnTag = `${this.className}#onRollbackMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received Rollback message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRollbackMessage(request, this); - await this.rollback(request.sessionID); - await sendRollbackAckMessage(request.sessionID, this, true); - } - - async onRollbackAckMessageReceived( - request: RollbackAckV1Message, - ): Promise { - const fnTag = `${this.className}#onRollbackAckMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received Rollback Ack message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRollbackAckMessage(request, this); - //this.deleteDatabaseEntries(request.sessionID); - } - - async runSatp(request: ClientV1Request): Promise { - const fnTag = `${this.className}#runSatp()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `client gateway received ClientRequest: ${JSON.stringify(request)}`, - ); - - const sessionID = this.configureOdapSession(request); - - if (sessionID == undefined) { - throw new Error( - `${fnTag}, session id undefined after session configuration`, - ); - } - - await this.clientHelper.sendTransferInitializationRequest( - sessionID, - this, - true, - ); - } - - configureOdapSession(request: ClientV1Request) { - const sessionData: SessionData = {}; - - const sessionID = uuidV4(); - - sessionData.id = sessionID; - sessionData.step = 1; - sessionData.version = request.version; - sessionData.lastSequenceNumber = randomInt(4294967295); - - sessionData.sourceBasePath = request.clientGatewayConfiguration.apiHost; - sessionData.recipientBasePath = request.serverGatewayConfiguration.apiHost; - - sessionData.allowedSourceBackupGateways = this.backupGatewaysAllowed; - sessionData.allowedRecipientBackupGateways = []; - - sessionData.payloadProfile = request.payloadProfile; - sessionData.loggingProfile = request.loggingProfile; - sessionData.accessControlProfile = request.accessControlProfile; - sessionData.applicationProfile = request.applicationProfile; - sessionData.assetProfile = request.payloadProfile.assetProfile; - sessionData.originatorPubkey = request.originatorPubkey; - sessionData.beneficiaryPubkey = request.beneficiaryPubkey; - sessionData.sourceGatewayPubkey = this.pubKey; - sessionData.sourceGatewayDltSystem = request.sourceGatewayDltSystem; - sessionData.recipientGatewayPubkey = request.recipientGatewayPubkey; - sessionData.recipientGatewayDltSystem = request.recipientGatewayDltSystem; - sessionData.rollbackActionsPerformed = []; - sessionData.rollbackProofs = []; - sessionData.lastMessageReceivedTimestamp = Date.now().toString(); - - sessionData.sourceLedgerAssetID = request.sourceLedgerAssetID; - sessionData.recipientLedgerAssetID = request.recipientLedgerAssetID; - - sessionData.maxRetries = request.maxRetries; - sessionData.maxTimeout = request.maxTimeout; - - this.sessions.set(sessionID, sessionData); - - return sessionID; - } - - // we don't need a `lockAssetToRollback` method because we would never call - // that function in a rollback - abstract lockAsset(sessionID: string, assetID?: string): Promise; - - // we don't need a `unlockAssetToRollback` method because we only call this - // function to rollback, thus the implementation would be the same - abstract unlockAsset(sessionID: string, assetID?: string): Promise; - - abstract createAsset(sessionID: string, assetID?: string): Promise; - abstract createAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise; - abstract deleteAsset(sessionID: string, assetID?: string): Promise; - abstract deleteAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise; - - async Revert(sessionID: string): Promise { - await this.rollback(sessionID); - await sendRollbackMessage(sessionID, this, true); - } - - abstract rollback(sessionID: string): Promise; - - async makeRequest( - sessionID: string, - request: Promise, - message: string, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ): Promise { - const fnTag = `${this.className}#makeRequest()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let numberOfTries = 0; - let response = undefined; - - while (numberOfTries < sessionData.maxRetries) { - response = await request.catch(async (err) => { - if (err.response == undefined || err.response.status == 500) { - if (!message.match("Rollback")) { - await this.Revert(sessionID); - throw new Error(`${fnTag}, ${message} message failed. ${err}`); - } - } - this.log.info(`${fnTag}, ${message} message failed. Trying again...`); - numberOfTries++; - }); - - if (response != void 0) break; - } - - if (response != void 0 && response.status == 200) { - return; - } - - // When rolling back there is no problem of not receiving an answer - if (!message.match("Rollback")) { - this.log.info( - `${fnTag}, ${message} message was not sent. Initiating time...`, - ); - await new Promise((resolve) => - setTimeout(resolve, sessionData.maxTimeout), - ).then(async () => { - // we check if a message was received, otherwise we have a timeout and rollback - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.lastMessageReceivedTimestamp == undefined || - sessionData.maxTimeout == undefined - ) { - throw new Error( - `${fnTag}, session data is not correctly initialized`, - ); - } - - const now = new Date().getTime(); - const last = parseInt(sessionData.lastMessageReceivedTimestamp); - const differenceOfTime = now - last; - - if (differenceOfTime > sessionData.maxTimeout) { - this.log.info(`${fnTag}, no response received, rolling back`); - await this.Revert(sessionID); - throw new Error( - `${fnTag}, ${message} message failed. Timeout exceeded. Check connection with server gateway.`, - ); - } - - this.log.info(`${fnTag}, a response was received`); - return; - }); - } - - return response; - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-success.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-success.ts deleted file mode 100644 index ce7fde8f88..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-success.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { RecoverSuccessV1Message } from "../../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "recover-success-helper", -}); - -export async function sendRecoverSuccessMessage( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRecoverSuccessMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const recoverSuccessMessage: RecoverSuccessV1Message = { - sessionID: sessionID, - success: true, - signature: "", - }; - - const signature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(recoverSuccessMessage)), - ); - - recoverSuccessMessage.signature = signature; - - log.info(`${fnTag}, sending RecoverSuccess message...`); - - if (!remote) { - return recoverSuccessMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).recoverV1Success(recoverSuccessMessage), - "RecoverSuccess", - ); -} - -export async function checkValidRecoverSuccessMessage( - response: RecoverSuccessV1Message, - gateway: PluginSatpGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRecoverSuccessMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const pubKey = gateway.isClientGateway(response.sessionID) - ? sessionData.recipientGatewayPubkey - : sessionData.sourceGatewayPubkey; - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - if (!response.success) { - throw new Error(`${fnTag}, RecoverSuccess message is invalid`); - } - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RecoverUpdateAckMessage message signature verification failed`, - ); - } - - // storeSessionData(response, satp); - - log.info(`RecoverSuccessMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update-ack.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update-ack.ts deleted file mode 100644 index b6233120fb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update-ack.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { RecoverUpdateAckV1Message } from "../../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; -// import { SHA256 } from "crypto-js"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "recover-update-ack-helper", -}); - -export async function sendRecoverUpdateAckMessage( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRecoverUpdateAckMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const recoverUpdateMessage: RecoverUpdateAckV1Message = { - sessionID: sessionID, - success: true, - changedEntriesHash: [], - signature: "", - }; - - const signature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(recoverUpdateMessage)), - ); - - recoverUpdateMessage.signature = signature; - - log.info(`${fnTag}, sending RecoverUpdateAck message...`); - - if (!remote) { - return recoverUpdateMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).recoverUpdateAckV1Message(recoverUpdateMessage), - "RecoverUpdateAck", - ); -} - -export async function checkValidRecoverUpdateAckMessage( - response: RecoverUpdateAckV1Message, - gateway: PluginSatpGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRecoverUpdateAckMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const pubKey = gateway.isClientGateway(response.sessionID) - ? sessionData.recipientGatewayPubkey - : sessionData.sourceGatewayPubkey; - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - // check if this is a valid recover update ack message - // check valid recovered logs - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RecoverUpdateAckMessage message signature verification failed`, - ); - } - - // storeSessionData(response, satp); - - log.info(`RecoverUpdateAckMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update.ts deleted file mode 100644 index 82c1d5e7ed..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { - LocalLog, - RecoverUpdateV1Message, -} from "../../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; -import { SHA256 } from "crypto-js"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "recover-update-helper", -}); - -export async function sendRecoverUpdateMessage( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRecoverUpdateMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.lastLogEntryTimestamp == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const recoveredLogs: LocalLog[] = - await gateway.getLogsMoreRecentThanTimestamp( - sessionData.lastLogEntryTimestamp, - ); - - const recoverUpdateMessage: RecoverUpdateV1Message = { - sessionID: sessionID, - recoveredLogs: recoveredLogs, - signature: "", - }; - - const signature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(recoverUpdateMessage)), - ); - - recoverUpdateMessage.signature = signature; - - log.info(`${fnTag}, sending RecoverUpdate message...`); - - if (!remote) { - return recoverUpdateMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).recoverUpdateV1Message(recoverUpdateMessage), - "RecoverUpdate", - ); -} - -export async function checkValidRecoverUpdateMessage( - response: RecoverUpdateV1Message, - gateway: PluginSatpGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRecoverUpdateMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const pubKey = gateway.isClientGateway(response.sessionID) - ? sessionData.recipientGatewayPubkey - : sessionData.sourceGatewayPubkey; - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - // check if this is a valid recover update message - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RecoverUpdateMessage message signature verification failed`, - ); - } - - // check logs from counter party gateway - const recoveredLogs = response.recoveredLogs; - let maxTimestamp = "0"; - - for (const recLog of recoveredLogs) { - if (recLog.key == undefined) { - throw new Error(`${fnTag}, the received log is not correctly defined`); - } - - log.info(`${fnTag}, received log: ${JSON.stringify(recLog)}`); - - const ipfsLog = await gateway.getLogFromRemote(recLog.key); - - const hash = SHA256(JSON.stringify(recLog)).toString(); - - if (ipfsLog.hash != hash) { - throw new Error( - `${fnTag}, RecoverUpdateMessage message has invalid recovered logs`, - ); - } - - if (recLog.data == undefined || recLog.timestamp == undefined) { - throw new Error( - `${fnTag}, RecoverUpdateMessage message is not correctly defined`, - ); - } - - if (parseInt(recLog.timestamp) > parseInt(maxTimestamp)) { - maxTimestamp = recLog.timestamp; - - const data = JSON.parse(recLog.data); - - // don't override new gateway public keys in case of being a backup gateway - if (gateway.isClientGateway(sessionID)) { - data.sourceGatewayPubkey = gateway.pubKey; - } else { - data.recipientGatewayPubkey = gateway.pubKey; - } - - gateway.sessions.set(sessionID, data); - } - } - - log.info(`RecoverUpdateMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover.ts deleted file mode 100644 index 1a0d0d4194..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { RecoverV1Message } from "../../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "recover-helper", -}); - -export async function sendRecoverMessage( - sessionID: string, - gateway: PluginSatpGateway, - backup: boolean, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRecoverMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.lastLogEntryTimestamp == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const recoverMessage: RecoverV1Message = { - sessionID: sessionID, - odapPhase: "sessionData.odapPhase", - sequenceNumber: sessionData.lastSequenceNumber, - lastLogEntryTimestamp: sessionData.lastLogEntryTimestamp, - isBackup: backup, - newBasePath: "", - newGatewayPubKey: sessionData.sourceGatewayPubkey, - signature: "", - }; - - const signature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(recoverMessage)), - ); - - recoverMessage.signature = signature; - - log.info(`${fnTag}, sending Recover message...`); - - if (!remote) { - return recoverMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).recoverV1Message(recoverMessage), - "Recover", - ); -} - -export async function checkValidRecoverMessage( - response: RecoverV1Message, - gateway: PluginSatpGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRecoverMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - let pubKey = undefined; - - if (gateway.isClientGateway(response.sessionID)) { - if ( - response.isBackup && - sessionData.recipientGatewayPubkey != response.newGatewayPubKey - ) { - // this is a backup gateway - sessionData.recipientGatewayPubkey = response.newGatewayPubKey; - - if ( - !sessionData.recipientGatewayPubkey || - !sessionData.allowedSourceBackupGateways?.includes( - sessionData.recipientGatewayPubkey, - ) - ) { - throw new Error(`${fnTag}, backup gateway not allowed`); - } - } - pubKey = sessionData.recipientGatewayPubkey; - } else { - if ( - response.isBackup && - sessionData.sourceGatewayPubkey != response.newGatewayPubKey - ) { - // this is a backup gateway - sessionData.sourceGatewayPubkey = response.newGatewayPubKey; - - if ( - !sessionData.sourceGatewayPubkey || - !sessionData.allowedSourceBackupGateways?.includes( - sessionData.sourceGatewayPubkey, - ) - ) { - throw new Error(`${fnTag}, backup gateway not allowed`); - } - } - pubKey = sessionData.sourceGatewayPubkey; - } - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - if (response.lastLogEntryTimestamp == undefined) { - throw new Error(`${fnTag}, last log entry timestamp is not valid`); - } - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RecoverMessage message signature verification failed`, - ); - } - - sessionData.lastLogEntryTimestamp = response.lastLogEntryTimestamp; - - gateway.sessions.set(sessionID, sessionData); - - log.info(`RecoverMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts deleted file mode 100644 index b1126388fd..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { RollbackAckV1Message } from "../../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; -// import { SHA256 } from "crypto-js"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "rollback-ack-helper", -}); - -export async function sendRollbackAckMessage( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRollbackAckMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.rollbackProofs == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.rollbackActionsPerformed == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const rollbackAckMessage: RollbackAckV1Message = { - sessionID: sessionID, - success: true, - signature: "", - }; - - const signature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(rollbackAckMessage)), - ); - - rollbackAckMessage.signature = signature; - - log.info(`${fnTag}, sending Rollback Ack message...`); - - if (!remote) { - return rollbackAckMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).rollbackAckV1Message(rollbackAckMessage), - "RollbackAck", - ); -} - -export async function checkValidRollbackAckMessage( - response: RollbackAckV1Message, - gateway: PluginSatpGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRollbackAckMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const pubKey = gateway.isClientGateway(response.sessionID) - ? sessionData.recipientGatewayPubkey - : sessionData.sourceGatewayPubkey; - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RollbackAckMessage message signature verification failed`, - ); - } - - log.info(`RollbackAckMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback.ts deleted file mode 100644 index 75f9782a09..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { RollbackV1Message } from "../../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; -// import { SHA256 } from "crypto-js"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "rollback-helper", -}); - -export async function sendRollbackMessage( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRollbackMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.rollbackProofs == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.rollbackActionsPerformed == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const rollbackMessage: RollbackV1Message = { - sessionID: sessionID, - success: true, - actionPerformed: sessionData.rollbackActionsPerformed, - proofs: sessionData.rollbackProofs, - signature: "", - }; - - const signature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(rollbackMessage)), - ); - - rollbackMessage.signature = signature; - - log.info(`${fnTag}, sending Rollback message...`); - - if (!remote) { - return rollbackMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).rollbackV1Message(rollbackMessage), - "Rollback", - ); -} - -export async function checkValidRollbackMessage( - response: RollbackV1Message, - gateway: PluginSatpGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRollbackMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const pubKey = gateway.isClientGateway(response.sessionID) - ? sessionData.recipientGatewayPubkey - : sessionData.sourceGatewayPubkey; - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RollbackMessage message signature verification failed`, - ); - } - - log.info(`RollbackMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/interfaces/repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/interfaces/repository.ts deleted file mode 100644 index 9526328bf5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/interfaces/repository.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { IRemoteLog, ILocalLog } from "../../plugin-satp-gateway"; - -export interface IRepository { - readById(id: K): Promise; - create(entity: T): any; - destroy(): any; - reset(): any; -} - -export interface ILocalLogRepository extends IRepository { - database: any; - readById(id: string): Promise; - readLogsNotProofs(): Promise; - readLogsMoreRecentThanTimestamp(timestamp: string): Promise; - readLastestLog(sessionID: string): Promise; - create(log: ILocalLog): Promise; - deleteBySessionId(log: string): any; - destroy(): any; - reset(): any; -} - -export interface IRemoteLogRepository extends IRepository { - database: any; - readById(id: string): Promise; - create(log: IRemoteLog): any; - destroy(): any; - reset(): any; -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/ipfs-remote-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/ipfs-remote-log-repository.ts deleted file mode 100644 index aafc69ef34..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/ipfs-remote-log-repository.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { DefaultApi as ObjectStoreIpfsApi } from "@hyperledger/cactus-plugin-object-store-ipfs"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import { IRemoteLogRepository } from "./interfaces/repository"; -import { IRemoteLog } from "../plugin-satp-gateway"; - -export class IPFSRemoteLogRepository implements IRemoteLogRepository { - public static readonly CLASS_NAME = "IPFSRemoteLogRepository"; - readonly database: ObjectStoreIpfsApi; - - public constructor(ipfsPath: string) { - const config = new Configuration({ basePath: ipfsPath }); - const apiClient = new ObjectStoreIpfsApi(config); - this.database = apiClient; - } - - public get className(): string { - return IPFSRemoteLogRepository.CLASS_NAME; - } - - readById(logKey: string): Promise { - const fnTag = `${this.className}#readById()`; - - return this.database - .getObjectV1({ key: logKey }) - .then((response: any) => { - return JSON.parse( - Buffer.from(response.data.value, "base64").toString(), - ); - }) - .catch(() => { - throw new Error(`${fnTag}, error when logging to ipfs`); - }); - } - - create(log: IRemoteLog): any { - const fnTag = `${this.className}#create()`; - const logBase64 = Buffer.from(JSON.stringify(log)).toString("base64"); - - return this.database - .setObjectV1({ - key: log.key, - value: logBase64, - }) - .catch(() => { - throw new Error(`${fnTag}, error when logging to ipfs`); - }); - } - - async reset() {} - - async destroy() {} -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-local-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-local-log-repository.ts deleted file mode 100644 index 65c07b10de..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-local-log-repository.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { ILocalLog } from "../plugin-satp-gateway"; -import { ILocalLogRepository } from "./interfaces/repository"; -import knex, { Knex } from "knex"; - -export class KnexLocalLogRepository implements ILocalLogRepository { - readonly database: Knex; - - public constructor(config: Knex.Config | undefined) { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const configFile = require("../../../knex/knexfile.ts")[ - process.env.ENVIRONMENT || "development" - ]; - - this.database = knex(config || configFile); - } - - getLogsTable(): Knex.QueryBuilder { - return this.database("logs"); - } - - readById(logKey: string): Promise { - return this.getLogsTable().where({ key: logKey }).first(); - } - - readLastestLog(sessionID: string): Promise { - return this.getLogsTable() - .orderBy("timestamp", "desc") - .where({ sessionID: sessionID }) - .first(); - } - - readLogsMoreRecentThanTimestamp(timestamp: string): Promise { - return this.getLogsTable() - .where("timestamp", ">", timestamp) - .whereNot("type", "like", "%proof%"); - } - - create(log: ILocalLog): any { - return this.getLogsTable().insert(log); - } - - deleteBySessionId(sessionID: string): any { - return this.database().where({ sessionID: sessionID }).del(); - } - - readLogsNotProofs(): Promise { - return this.getLogsTable() - .select( - this.database.raw( - "sessionID, key, data, type, operation, MAX(timestamp) as timestamp", - ), - ) - .whereNot({ type: "proof" }) - .groupBy("sessionID"); - } - - async reset() { - await this.database.migrate.rollback(); - await this.database.migrate.latest(); - } - - async destroy() { - await this.database.destroy(); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-remote-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-remote-log-repository.ts deleted file mode 100644 index 8d064da275..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-remote-log-repository.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { IRemoteLogRepository } from "./interfaces/repository"; -import { IRemoteLog } from "../plugin-satp-gateway"; -import knex, { Knex } from "knex"; - -export class KnexRemoteLogRepository implements IRemoteLogRepository { - readonly database: Knex; - - // for now we will ignore the config because it needs to be static - // so that both gateways can have access to the same database - // simulating a remote log storage - public constructor(config: Knex.Config | undefined) { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const configFile = require("../../../knex/knexfile-remote.ts")[ - process.env.ENVIRONMENT || "development" - ]; - - this.database = knex(config || configFile); - } - - getLogsTable(): Knex.QueryBuilder { - return this.database("remote-logs"); - } - - readById(logKey: string): Promise { - return this.getLogsTable().where({ key: logKey }).first(); - } - - create(log: IRemoteLog): any { - return this.getLogsTable().insert(log); - } - - async reset() { - await this.database.migrate.rollback(); - await this.database.migrate.latest(); - } - - async destroy() { - await this.database.destroy(); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/server/server-helper.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/server/server-helper.ts deleted file mode 100644 index 4a9a547cb3..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/server/server-helper.ts +++ /dev/null @@ -1,934 +0,0 @@ -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SHA256 } from "crypto-js"; -import { - TransferInitializationV1Response, - TransferInitializationV1Request, - SessionData, - TransferCommenceV1Response, - TransferCommenceV1Request, - LockEvidenceV1Response, - LockEvidenceV1Request, - CommitPreparationV1Response, - CommitPreparationV1Request, - CommitFinalV1Response, - CommitFinalV1Request, - TransferCompleteV1Request, -} from "../../public-api"; -import { SatpMessageType, PluginSatpGateway } from "../plugin-satp-gateway"; - -export class ServerGatewayHelper { - public static readonly CLASS_NAME: string = "ServerGatewayHelper"; - private _log: Logger; - - constructor() { - const level = "INFO"; - const label = ServerGatewayHelper.CLASS_NAME; - this._log = LoggerProvider.getOrCreate({ level, label }); - } - - public static get className(): string { - return ServerGatewayHelper.CLASS_NAME; - } - - public get log(): Logger { - return this._log; - } - - async sendTransferInitializationResponse( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendTransferInitiationResponse()`; - - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.initializationRequestMessageHash == undefined || - sessionData.initializationRequestMessageRcvTimeStamp == undefined || - sessionData.initializationRequestMessageProcessedTimeStamp == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const transferInitializationResponse: TransferInitializationV1Response = { - messageType: SatpMessageType.InitializationResponse, - sessionID: sessionID, - initialRequestMessageHash: sessionData.initializationRequestMessageHash, - timeStamp: sessionData.initializationRequestMessageRcvTimeStamp, - processedTimeStamp: - sessionData.initializationRequestMessageProcessedTimeStamp, - serverIdentityPubkey: gateway.pubKey, - sequenceNumber: sessionData.lastSequenceNumber, - signature: "", - backupGatewaysAllowed: gateway.backupGatewaysAllowed, - }; - - transferInitializationResponse.signature = - PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(transferInitializationResponse)), - ); - - sessionData.initializationResponseMessageHash = SHA256( - JSON.stringify(transferInitializationResponse), - ).toString(); - - sessionData.serverSignatureInitializationResponseMessage = - transferInitializationResponse.signature; - - await gateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, sending TransferInitializationResponse...`); - - if (!remote) { - return transferInitializationResponse; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.sourceBasePath, - ).phase1TransferInitiationResponseV1(transferInitializationResponse), - "TransferInitializationResponse", - ); - } - - async checkValidInitializationRequest( - request: TransferInitializationV1Request, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidInitializationRequest()`; - - const sessionData: SessionData = {}; - const recvTimestamp: string = Date.now().toString(); - const sessionID = request.sessionID; - - sessionData.id = sessionID; - sessionData.step = 2; - sessionData.initializationRequestMessageRcvTimeStamp = recvTimestamp; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.InitializationRequest) { - throw new Error( - `${fnTag}, wrong message type for TransferInitializationRequest`, - ); - } - - if (!gateway.verifySignature(request, request.sourceGatewayPubkey)) { - throw new Error( - `${fnTag}, TransferInitializationRequest message signature verification failed`, - ); - } - - if (!gateway.supportedDltIDs.includes(request.sourceGatewayDltSystem)) { - throw new Error( - `${fnTag}, source gateway dlt system is not supported by this gateway`, - ); - } - - const expiryDate: string = - request.payloadProfile.assetProfile.expirationDate; - const isDataExpired: boolean = new Date() >= new Date(expiryDate); - if (isDataExpired) { - throw new Error(`${fnTag}, asset has expired`); - } - - sessionData.version = request.version; - sessionData.maxRetries = request.maxRetries; - sessionData.maxTimeout = request.maxTimeout; - - sessionData.allowedSourceBackupGateways = request.backupGatewaysAllowed; - sessionData.allowedRecipientBackupGateways = gateway.backupGatewaysAllowed; - - sessionData.sourceBasePath = request.sourceBasePath; - sessionData.recipientBasePath = request.recipientBasePath; - sessionData.lastSequenceNumber = request.sequenceNumber; - sessionData.loggingProfile = request.loggingProfile; - sessionData.accessControlProfile = request.accessControlProfile; - sessionData.payloadProfile = request.payloadProfile; - sessionData.applicationProfile = request.applicationProfile; - sessionData.assetProfile = request.payloadProfile.assetProfile; - sessionData.sourceGatewayPubkey = request.sourceGatewayPubkey; - sessionData.sourceGatewayDltSystem = request.sourceGatewayDltSystem; - sessionData.recipientGatewayPubkey = request.recipientGatewayPubkey; - sessionData.recipientGatewayDltSystem = request.recipientGatewayDltSystem; - sessionData.rollbackActionsPerformed = []; - sessionData.rollbackProofs = []; - sessionData.lastMessageReceivedTimestamp = new Date().toString(); - sessionData.recipientLedgerAssetID = request.recipientLedgerAssetID; - sessionData.sourceLedgerAssetID = request.sourceLedgerAssetID; - - sessionData.initializationRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureInitializationRequestMessage = request.signature; - - sessionData.initializationRequestMessageProcessedTimeStamp = - Date.now().toString(); - - gateway.sessions.set(request.sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - this.log.info(`TransferInitializationRequest passed all checks.`); - } - - async sendTransferCommenceResponse( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendTransferCommenceResponse()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.transferCommenceMessageRequestHash == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const transferCommenceResponse: TransferCommenceV1Response = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceResponse, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashCommenceRequest: sessionData.transferCommenceMessageRequestHash, - // serverTransferNumber?? - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(transferCommenceResponse)), - ); - - sessionData.transferCommenceMessageResponseHash = SHA256( - JSON.stringify(transferCommenceResponse), - ).toString(); - - sessionData.serverSignatureTransferCommenceResponseMessage = - transferCommenceResponse.signature; - - await gateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "commence", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending TransferCommenceResponse...`); - - if (!remote) { - return transferCommenceResponse; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.sourceBasePath, - ).phase2TransferCommenceResponseV1(transferCommenceResponse), - "TransferCommenceResponse", - ); - } - - async checkValidtransferCommenceRequest( - request: TransferCommenceV1Request, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidtransferCommenceRequest()`; - - const sessionID = request.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error( - `${fnTag}, session Id does not correspond to any open session`, - ); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "commence", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.TransferCommenceRequest) { - throw new Error( - `${fnTag}, wrong message type for TransferCommenceRequest`, - ); - } - - if (request.sequenceNumber != sessionData.lastSequenceNumber + 1) { - throw new Error( - `${fnTag}, TransferCommenceRequest sequence number incorrect`, - ); - } - - if ( - sessionData.initializationResponseMessageHash != request.hashPrevMessage - ) { - throw new Error( - `${fnTag}, TransferCommenceRequest previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != request.serverIdentityPubkey) { - throw new Error( - `${fnTag}, TransferCommenceRequest serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != request.clientIdentityPubkey) { - throw new Error( - `${fnTag}, TransferCommenceRequest clientIdentity public key does not match the one that was sent`, - ); - } - - const assetProfileHash = SHA256( - JSON.stringify(sessionData.assetProfile), - ).toString(); - if (assetProfileHash !== request.hashAssetProfile) { - throw new Error(`${fnTag}, assetProfile hash not match`); - } - - if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { - throw new Error( - `${fnTag}, TransferCommenceRequest message signature verification failed`, - ); - } - - sessionData.transferCommenceMessageRequestHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureTransferCommenceRequestMessage = - request.signature; - - sessionData.originatorPubkey = request.originatorPubkey; - sessionData.beneficiaryPubkey = request.beneficiaryPubkey; - - gateway.sessions.set(request.sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "commence", - data: JSON.stringify(sessionData), - }); - - sessionData.step = 4; - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`TransferCommenceRequest passed all checks.`); - } - - async sendLockEvidenceResponse( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendLockEvidenceResponse()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.lockEvidenceRequestMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const lockEvidenceResponseMessage: LockEvidenceV1Response = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceResponse, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashLockEvidenceRequest: sessionData.lockEvidenceRequestMessageHash, - // server transfer number - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - lockEvidenceResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( - await gateway.sign(JSON.stringify(lockEvidenceResponseMessage)), - ); - - sessionData.lockEvidenceResponseMessageHash = SHA256( - JSON.stringify(lockEvidenceResponseMessage), - ).toString(); - - sessionData.serverSignatureLockEvidenceResponseMessage = - lockEvidenceResponseMessage.signature; - - await gateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "lock", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending LockEvidenceResponse...`); - - if (!remote) { - return lockEvidenceResponseMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.sourceBasePath, - ).phase2LockEvidenceResponseV1(lockEvidenceResponseMessage), - "LockEvidenceResponse", - ); - } - - async checkValidLockEvidenceRequest( - request: LockEvidenceV1Request, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidLockEvidenceRequest()`; - - const sessionID = request.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error( - `${fnTag}, session Id does not correspond to any open session`, - ); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "lock", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.LockEvidenceRequest) { - throw new Error(`${fnTag}, wrong message type for LockEvidenceRequest`); - } - - if (request.sequenceNumber != sessionData.lastSequenceNumber + 1) { - throw new Error( - `${fnTag}, LockEvidenceRequestMessage sequence number incorrect`, - ); - } - - if ( - sessionData.transferCommenceMessageResponseHash != - request.hashCommenceAckRequest - ) { - throw new Error( - `${fnTag}, previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != request.serverIdentityPubkey) { - throw new Error( - `${fnTag}, LockEvidenceRequest serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != request.clientIdentityPubkey) { - throw new Error( - `${fnTag}, LockEvidenceRequest clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - request.lockEvidenceClaim == undefined || - new Date() > new Date(request.lockEvidenceExpiration) - ) { - throw new Error(`${fnTag}, invalid or expired lock evidence claim`); - } - - if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { - throw new Error( - `${fnTag}, LockEvidenceRequest message signature verification failed`, - ); - } - - const claimHash = SHA256(request.lockEvidenceClaim).toString(); - const retrievedClaim = await gateway.getLogFromRemote( - PluginSatpGateway.getSatpLogKey(sessionID, "proof", "lock"), - ); - - if (claimHash != retrievedClaim.hash) { - throw new Error( - `${fnTag}, LockEvidence Claim hash does not match the one stored in IPFS`, - ); - } - - if ( - !gateway.verifySignature(retrievedClaim, request.clientIdentityPubkey) - ) { - throw new Error( - `${fnTag}, LockEvidence Claim message signature verification failed`, - ); - } - - sessionData.lockEvidenceRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureLockEvidenceRequestMessage = request.signature; - - sessionData.lockEvidenceClaim = request.lockEvidenceClaim; - - gateway.sessions.set(request.sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "lock", - data: JSON.stringify(sessionData), - }); - - sessionData.step = 6; - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`LockEvidenceRequest passed all checks.`); - } - - async sendCommitPreparationResponse( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendCommitPrepareResponse()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.commitPrepareRequestMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const commitPreparationResponseMessage: CommitPreparationV1Response = { - sessionID: sessionID, - messageType: SatpMessageType.CommitPreparationResponse, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashCommitPrep: sessionData.commitPrepareRequestMessageHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - commitPreparationResponseMessage.signature = - PluginSatpGateway.bufArray2HexStr( - await gateway.sign(JSON.stringify(commitPreparationResponseMessage)), - ); - - sessionData.commitPrepareResponseMessageHash = SHA256( - JSON.stringify(commitPreparationResponseMessage), - ).toString(); - - sessionData.serverSignatureCommitPreparationResponseMessage = - commitPreparationResponseMessage.signature; - - await gateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "prepare", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending CommitPreparationResponse...`); - - if (!remote) { - return commitPreparationResponseMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.sourceBasePath, - ).phase3CommitPreparationResponseV1(commitPreparationResponseMessage), - "CommitPreparationResponse", - ); - } - - async checkValidCommitPreparationRequest( - request: CommitPreparationV1Request, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidCommitPrepareRequest()`; - - const sessionID = request.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error( - `${fnTag}, session Id does not correspond to any open session`, - ); - } - - // We need to check somewhere if this phase is completed within the asset-lock duration. - - if (request.messageType != SatpMessageType.CommitPreparationRequest) { - throw new Error( - `${fnTag}, wrong message type for CommitPreparationRequest`, - ); - } - - if (request.sequenceNumber != sessionData.lastSequenceNumber + 1) { - throw new Error( - `${fnTag}, CommitPreparationRequest sequence number incorrect`, - ); - } - - if ( - sessionData.lockEvidenceResponseMessageHash != request.hashLockEvidenceAck - ) { - throw new Error(`${fnTag}, previous message hash does not match`); - } - - if (sessionData.recipientGatewayPubkey != request.serverIdentityPubkey) { - throw new Error( - `${fnTag}, CommitPreparationRequest serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != request.clientIdentityPubkey) { - throw new Error( - `${fnTag}, CommitPreparationRequest clientIdentity public key does not match the one that was sent`, - ); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "prepare", - data: JSON.stringify(sessionData), - }); - - if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { - throw new Error( - `${fnTag}, CommitPreparationRequest message signature verification failed`, - ); - } - - sessionData.commitPrepareRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureCommitPreparationRequestMessage = - request.signature; - - gateway.sessions.set(request.sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "prepare", - data: JSON.stringify(sessionData), - }); - - sessionData.step = 8; - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`CommitPreparationRequest passed all checks.`); - } - - async sendCommitFinalResponse( - sessionID: string, - gateway: PluginSatpGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendCommitFinalResponse()`; - - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.commitAcknowledgementClaim == undefined || - sessionData.commitFinalRequestMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const commitFinalResponseMessage: CommitFinalV1Response = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalResponse, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - commitAcknowledgementClaim: sessionData.commitAcknowledgementClaim, - hashCommitFinal: sessionData.commitFinalRequestMessageHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - commitFinalResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( - await gateway.sign(JSON.stringify(commitFinalResponseMessage)), - ); - - sessionData.commitFinalResponseMessageHash = SHA256( - JSON.stringify(commitFinalResponseMessage), - ).toString(); - - sessionData.serverSignatureCommitFinalResponseMessage = - commitFinalResponseMessage.signature; - - await gateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "final", - data: JSON.stringify(sessionData), - }); - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, sending CommitFinalResponse...`); - - if (!remote) { - return commitFinalResponseMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSatpGateway.getSatpAPI( - sessionData.sourceBasePath, - ).phase3CommitFinalResponseV1(commitFinalResponseMessage), - "CommitFinalResponse", - ); - } - - async checkValidCommitFinalRequest( - request: CommitFinalV1Request, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidCommitFinalRequest()`; - - const sessionID = request.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.id == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error( - `${fnTag}, session Id does not correspond to any open session`, - ); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "final", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.CommitFinalRequest) { - throw new Error(`${fnTag}, wrong message type for CommitFinalRequest`); - } - - if (request.sequenceNumber != sessionData.lastSequenceNumber + 1) { - throw new Error(`${fnTag}, CommitFinalRequest sequence number incorrect`); - } - - if (request.commitFinalClaim == undefined) { - throw new Error(`${fnTag}, claim presented by client is invalid`); - } - - if (sessionData.recipientGatewayPubkey != request.serverIdentityPubkey) { - throw new Error( - `${fnTag}, CommitFinalRequest serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != request.clientIdentityPubkey) { - throw new Error( - `${fnTag}, CommitFinalRequest clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - sessionData.commitPrepareResponseMessageHash != - request.hashCommitPrepareAck - ) { - throw new Error(`${fnTag}, previous message hash does not match`); - } - - if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { - throw new Error( - `${fnTag}, CommitFinalRequest message signature verification failed`, - ); - } - - // We need to check somewhere if this phase is completed within the asset-lock duration. - const claimHash = SHA256(request.commitFinalClaim).toString(); - - const retrievedClaim = await gateway.getLogFromRemote( - PluginSatpGateway.getSatpLogKey(sessionID, "proof", "delete"), - ); - - if (claimHash != retrievedClaim.hash) { - throw new Error( - `${fnTag}, Commit Final Claim hash does not match the one stored in IPFS`, - ); - } - - if ( - !gateway.verifySignature(retrievedClaim, request.clientIdentityPubkey) - ) { - throw new Error( - `${fnTag}, Commit Final Claim signature verification failed`, - ); - } - - sessionData.commitFinalClaim = request.commitFinalClaim; - - sessionData.commitFinalRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureCommitFinalRequestMessage = request.signature; - - gateway.sessions.set(request.sessionID, sessionData); - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "final", - data: JSON.stringify(sessionData), - }); - - sessionData.step = 10; - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`CommitFinalRequest passed all checks.`); - } - - async checkValidTransferCompleteRequest( - request: TransferCompleteV1Request, - gateway: PluginSatpGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidTransferCompleteRequest()`; - - const sessionID = request.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error( - `${fnTag}, session Id does not correspond to any open session`, - ); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "complete", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.TransferCompleteRequest) { - throw new Error( - `${fnTag}, wrong message type for TransferCompleteRequest`, - ); - } - - if (request.sequenceNumber != sessionData.lastSequenceNumber + 1) { - throw new Error( - `${fnTag}, TransferCompleteRequest sequence number incorrect`, - ); - } - - if ( - request.hashCommitFinalAck != sessionData.commitFinalResponseMessageHash - ) { - throw new Error(`${fnTag}, previous message hash not match`); - } - - if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { - throw new Error( - `${fnTag}, TransferCompleteRequest message signature verification failed`, - ); - } - - sessionData.transferCompleteMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureTransferCompleteMessage = request.signature; - - gateway.sessions.set(request.sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "complete", - data: JSON.stringify(sessionData), - }); - - this.log.info(`TransferCompleteRequest passed all checks.`); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts deleted file mode 100644 index d83286b979..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ /dev/null @@ -1,3137 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Odap Hermes - * Implementation for Odap and Hermes - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * - * @export - * @interface AssetProfile - */ -export interface AssetProfile { - /** - * - * @type {string} - * @memberof AssetProfile - */ - 'issuer'?: string; - /** - * - * @type {string} - * @memberof AssetProfile - */ - 'assetCode'?: string; - /** - * - * @type {string} - * @memberof AssetProfile - */ - 'assetCodeType'?: string; - /** - * - * @type {string} - * @memberof AssetProfile - */ - 'issuanceDate'?: string; - /** - * - * @type {string} - * @memberof AssetProfile - */ - 'expirationDate': string; - /** - * - * @type {string} - * @memberof AssetProfile - */ - 'verificationEndPoint'?: string; - /** - * - * @type {string} - * @memberof AssetProfile - */ - 'digitalSignature'?: string; - /** - * - * @type {string} - * @memberof AssetProfile - */ - 'prospectusLink'?: string; - /** - * - * @type {Array} - * @memberof AssetProfile - */ - 'keyInformationLink'?: Array; - /** - * - * @type {Array} - * @memberof AssetProfile - */ - 'keyWord'?: Array; - /** - * - * @type {Array} - * @memberof AssetProfile - */ - 'transferRestriction'?: Array; - /** - * - * @type {Array} - * @memberof AssetProfile - */ - 'ledgerRequirements'?: Array; -} -/** - * - * @export - * @interface ClientV1Request - */ -export interface ClientV1Request { - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'version': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'loggingProfile': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'accessControlProfile': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'assetControlProfile': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'applicationProfile': string; - /** - * - * @type {AssetProfile} - * @memberof ClientV1Request - */ - 'assetProfile': AssetProfile; - /** - * - * @type {PayloadProfile} - * @memberof ClientV1Request - */ - 'payloadProfile': PayloadProfile; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'sourceGatewayDltSystem': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'recipientGatewayDltSystem': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'recipientGatewayPubkey': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'originatorPubkey': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'beneficiaryPubkey': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'clientIdentityPubkey': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'clientDltSystem': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'serverDltSystem': string; - /** - * - * @type {ClientV1RequestClientGatewayConfiguration} - * @memberof ClientV1Request - */ - 'clientGatewayConfiguration': ClientV1RequestClientGatewayConfiguration; - /** - * - * @type {ClientV1RequestClientGatewayConfiguration} - * @memberof ClientV1Request - */ - 'serverGatewayConfiguration': ClientV1RequestClientGatewayConfiguration; - /** - * - * @type {number} - * @memberof ClientV1Request - */ - 'maxRetries': number; - /** - * - * @type {number} - * @memberof ClientV1Request - */ - 'maxTimeout': number; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'sourceLedgerAssetID': string; - /** - * - * @type {string} - * @memberof ClientV1Request - */ - 'recipientLedgerAssetID': string; -} -/** - * - * @export - * @interface ClientV1RequestClientGatewayConfiguration - */ -export interface ClientV1RequestClientGatewayConfiguration { - /** - * - * @type {string} - * @memberof ClientV1RequestClientGatewayConfiguration - */ - 'apiHost': string; -} -/** - * - * @export - * @interface CommitFinalV1Request - */ -export interface CommitFinalV1Request { - /** - * - * @type {string} - * @memberof CommitFinalV1Request - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof CommitFinalV1Request - */ - 'messageType': string; - /** - * - * @type {string} - * @memberof CommitFinalV1Request - */ - 'clientIdentityPubkey': string; - /** - * - * @type {string} - * @memberof CommitFinalV1Request - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof CommitFinalV1Request - */ - 'commitFinalClaim': string; - /** - * - * @type {object} - * @memberof CommitFinalV1Request - */ - 'commitFinalClaimFormat'?: object; - /** - * - * @type {string} - * @memberof CommitFinalV1Request - */ - 'hashCommitPrepareAck': string; - /** - * - * @type {number} - * @memberof CommitFinalV1Request - */ - 'clientTransferNumber'?: number | null; - /** - * - * @type {string} - * @memberof CommitFinalV1Request - */ - 'signature': string; - /** - * - * @type {number} - * @memberof CommitFinalV1Request - */ - 'sequenceNumber': number; -} -/** - * - * @export - * @interface CommitFinalV1Response - */ -export interface CommitFinalV1Response { - /** - * - * @type {string} - * @memberof CommitFinalV1Response - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof CommitFinalV1Response - */ - 'messageType': string; - /** - * - * @type {string} - * @memberof CommitFinalV1Response - */ - 'clientIdentityPubkey': string; - /** - * - * @type {string} - * @memberof CommitFinalV1Response - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof CommitFinalV1Response - */ - 'commitAcknowledgementClaim': string; - /** - * - * @type {object} - * @memberof CommitFinalV1Response - */ - 'commitAcknowledgementClaimFormat'?: object; - /** - * - * @type {string} - * @memberof CommitFinalV1Response - */ - 'hashCommitFinal': string; - /** - * - * @type {number} - * @memberof CommitFinalV1Response - */ - 'serverTransferNumber'?: number; - /** - * - * @type {string} - * @memberof CommitFinalV1Response - */ - 'signature': string; - /** - * - * @type {number} - * @memberof CommitFinalV1Response - */ - 'sequenceNumber': number; -} -/** - * - * @export - * @interface CommitPreparationV1Request - */ -export interface CommitPreparationV1Request { - /** - * - * @type {string} - * @memberof CommitPreparationV1Request - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof CommitPreparationV1Request - */ - 'messageType': string; - /** - * - * @type {string} - * @memberof CommitPreparationV1Request - */ - 'clientIdentityPubkey': string; - /** - * - * @type {string} - * @memberof CommitPreparationV1Request - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof CommitPreparationV1Request - */ - 'hashLockEvidenceAck': string; - /** - * - * @type {number} - * @memberof CommitPreparationV1Request - */ - 'clientTransferNumber'?: number; - /** - * - * @type {string} - * @memberof CommitPreparationV1Request - */ - 'signature': string; - /** - * - * @type {number} - * @memberof CommitPreparationV1Request - */ - 'sequenceNumber': number; -} -/** - * - * @export - * @interface CommitPreparationV1Response - */ -export interface CommitPreparationV1Response { - /** - * - * @type {string} - * @memberof CommitPreparationV1Response - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof CommitPreparationV1Response - */ - 'messageType': string; - /** - * - * @type {string} - * @memberof CommitPreparationV1Response - */ - 'clientIdentityPubkey': string; - /** - * - * @type {string} - * @memberof CommitPreparationV1Response - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof CommitPreparationV1Response - */ - 'hashCommitPrep': string; - /** - * - * @type {string} - * @memberof CommitPreparationV1Response - */ - 'serverTransferNumber'?: string; - /** - * - * @type {string} - * @memberof CommitPreparationV1Response - */ - 'signature': string; - /** - * - * @type {number} - * @memberof CommitPreparationV1Response - */ - 'sequenceNumber': number; -} -/** - * - * @export - * @enum {string} - */ - -export const CredentialProfile = { - Saml: 'SAML', - Oauth: 'OAUTH', - X509: 'X509' -} as const; - -export type CredentialProfile = typeof CredentialProfile[keyof typeof CredentialProfile]; - - -/** - * - * @export - * @interface History - */ -export interface History { - /** - * - * @type {Array} - * @memberof History - */ - 'Transactions'?: Array; - /** - * - * @type {Array} - * @memberof History - */ - 'Actions'?: Array; - /** - * - * @type {string} - * @memberof History - */ - 'Origin'?: string; - /** - * - * @type {string} - * @memberof History - */ - 'Destination'?: string; - /** - * - * @type {string} - * @memberof History - */ - 'Balance'?: string; - /** - * - * @type {object} - * @memberof History - */ - 'CurrentStatus'?: object; - /** - * - * @type {object} - * @memberof History - */ - 'ApplicationSpecificParameters'?: object; -} -/** - * - * @export - * @interface LocalLog - */ -export interface LocalLog { - /** - * - * @type {string} - * @memberof LocalLog - */ - 'key'?: string; - /** - * - * @type {string} - * @memberof LocalLog - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof LocalLog - */ - 'data'?: string; - /** - * - * @type {string} - * @memberof LocalLog - */ - 'type': string; - /** - * - * @type {string} - * @memberof LocalLog - */ - 'operation': string; - /** - * - * @type {string} - * @memberof LocalLog - */ - 'timestamp'?: string; -} -/** - * - * @export - * @interface LockEvidenceV1Request - */ -export interface LockEvidenceV1Request { - /** - * - * @type {string} - * @memberof LockEvidenceV1Request - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof LockEvidenceV1Request - */ - 'clientIdentityPubkey': string; - /** - * - * @type {string} - * @memberof LockEvidenceV1Request - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof LockEvidenceV1Request - */ - 'lockEvidenceClaim': string; - /** - * - * @type {object} - * @memberof LockEvidenceV1Request - */ - 'lockEvidenceFormat'?: object; - /** - * - * @type {string} - * @memberof LockEvidenceV1Request - */ - 'lockEvidenceExpiration': string; - /** - * - * @type {string} - * @memberof LockEvidenceV1Request - */ - 'hashCommenceAckRequest': string; - /** - * - * @type {number} - * @memberof LockEvidenceV1Request - */ - 'clientTransferNumber'?: number | null; - /** - * - * @type {string} - * @memberof LockEvidenceV1Request - */ - 'signature': string; - /** - * - * @type {string} - * @memberof LockEvidenceV1Request - */ - 'messageType': string; - /** - * - * @type {string} - * @memberof LockEvidenceV1Request - */ - 'messageHash'?: string; - /** - * - * @type {number} - * @memberof LockEvidenceV1Request - */ - 'sequenceNumber': number; -} -/** - * - * @export - * @interface LockEvidenceV1Response - */ -export interface LockEvidenceV1Response { - /** - * - * @type {string} - * @memberof LockEvidenceV1Response - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof LockEvidenceV1Response - */ - 'clientIdentityPubkey': string; - /** - * - * @type {string} - * @memberof LockEvidenceV1Response - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof LockEvidenceV1Response - */ - 'hashLockEvidenceRequest': string; - /** - * - * @type {number} - * @memberof LockEvidenceV1Response - */ - 'serverTransferNumber'?: number | null; - /** - * - * @type {string} - * @memberof LockEvidenceV1Response - */ - 'signature': string; - /** - * - * @type {string} - * @memberof LockEvidenceV1Response - */ - 'messageType': string; - /** - * - * @type {number} - * @memberof LockEvidenceV1Response - */ - 'sequenceNumber': number; -} -/** - * - * @export - * @interface PayloadProfile - */ -export interface PayloadProfile { - /** - * - * @type {AssetProfile} - * @memberof PayloadProfile - */ - 'assetProfile': AssetProfile; - /** - * - * @type {string} - * @memberof PayloadProfile - */ - 'capabilities'?: string; -} -/** - * - * @export - * @interface RecoverSuccessV1Message - */ -export interface RecoverSuccessV1Message { - /** - * - * @type {string} - * @memberof RecoverSuccessV1Message - */ - 'sessionID': string; - /** - * - * @type {boolean} - * @memberof RecoverSuccessV1Message - */ - 'success': boolean; - /** - * - * @type {string} - * @memberof RecoverSuccessV1Message - */ - 'signature': string; -} -/** - * - * @export - * @interface RecoverUpdateAckV1Message - */ -export interface RecoverUpdateAckV1Message { - /** - * - * @type {string} - * @memberof RecoverUpdateAckV1Message - */ - 'sessionID': string; - /** - * - * @type {boolean} - * @memberof RecoverUpdateAckV1Message - */ - 'success': boolean; - /** - * - * @type {Array} - * @memberof RecoverUpdateAckV1Message - */ - 'changedEntriesHash': Array; - /** - * - * @type {string} - * @memberof RecoverUpdateAckV1Message - */ - 'signature': string; -} -/** - * - * @export - * @interface RecoverUpdateV1Message - */ -export interface RecoverUpdateV1Message { - /** - * - * @type {string} - * @memberof RecoverUpdateV1Message - */ - 'sessionID': string; - /** - * - * @type {Array} - * @memberof RecoverUpdateV1Message - */ - 'recoveredLogs': Array; - /** - * - * @type {string} - * @memberof RecoverUpdateV1Message - */ - 'signature': string; -} -/** - * - * @export - * @interface RecoverV1Message - */ -export interface RecoverV1Message { - /** - * - * @type {string} - * @memberof RecoverV1Message - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof RecoverV1Message - */ - 'odapPhase': string; - /** - * - * @type {number} - * @memberof RecoverV1Message - */ - 'sequenceNumber': number; - /** - * - * @type {string} - * @memberof RecoverV1Message - */ - 'lastLogEntryTimestamp': string; - /** - * - * @type {boolean} - * @memberof RecoverV1Message - */ - 'isBackup': boolean; - /** - * - * @type {string} - * @memberof RecoverV1Message - */ - 'newBasePath': string; - /** - * - * @type {string} - * @memberof RecoverV1Message - */ - 'newGatewayPubKey'?: string; - /** - * - * @type {string} - * @memberof RecoverV1Message - */ - 'signature': string; -} -/** - * - * @export - * @interface RollbackAckV1Message - */ -export interface RollbackAckV1Message { - /** - * - * @type {string} - * @memberof RollbackAckV1Message - */ - 'sessionID': string; - /** - * - * @type {boolean} - * @memberof RollbackAckV1Message - */ - 'success': boolean; - /** - * - * @type {string} - * @memberof RollbackAckV1Message - */ - 'signature': string; -} -/** - * - * @export - * @interface RollbackV1Message - */ -export interface RollbackV1Message { - /** - * - * @type {string} - * @memberof RollbackV1Message - */ - 'sessionID': string; - /** - * - * @type {boolean} - * @memberof RollbackV1Message - */ - 'success': boolean; - /** - * - * @type {Array} - * @memberof RollbackV1Message - */ - 'actionPerformed': Array; - /** - * - * @type {Array} - * @memberof RollbackV1Message - */ - 'proofs': Array; - /** - * - * @type {string} - * @memberof RollbackV1Message - */ - 'signature': string; -} -/** - * - * @export - * @interface SatpMessage - */ -export interface SatpMessage { - /** - * - * @type {number} - * @memberof SatpMessage - */ - 'SequenceNumber'?: number; - /** - * - * @type {string} - * @memberof SatpMessage - */ - 'Phase'?: SatpMessagePhaseEnum; - /** - * - * @type {string} - * @memberof SatpMessage - */ - 'ResourceURL'?: string; - /** - * - * @type {string} - * @memberof SatpMessage - */ - 'DeveloperURN'?: string; - /** - * - * @type {SatpMessageActionResponse} - * @memberof SatpMessage - */ - 'ActionResponse'?: SatpMessageActionResponse; - /** - * - * @type {string} - * @memberof SatpMessage - */ - 'CredentialProfile'?: SatpMessageCredentialProfileEnum; - /** - * - * @type {Array} - * @memberof SatpMessage - */ - 'CredentialBlock'?: Array; - /** - * - * @type {PayloadProfile} - * @memberof SatpMessage - */ - 'CredentialsProfile'?: PayloadProfile; - /** - * - * @type {object} - * @memberof SatpMessage - */ - 'ApplicationProfile'?: object; - /** - * - * @type {object} - * @memberof SatpMessage - */ - 'Payload'?: object; - /** - * - * @type {string} - * @memberof SatpMessage - */ - 'PayloadHash'?: string; - /** - * - * @type {string} - * @memberof SatpMessage - */ - 'MessageSignature'?: string; -} - -export const SatpMessagePhaseEnum = { - TransferInitialization: 'TransferInitialization', - LockEvidenceVerification: 'LockEvidenceVerification', - CommitmentEstablishment: 'CommitmentEstablishment' -} as const; - -export type SatpMessagePhaseEnum = typeof SatpMessagePhaseEnum[keyof typeof SatpMessagePhaseEnum]; -export const SatpMessageCredentialProfileEnum = { - Saml: 'SAML', - OAuth: 'OAuth', - X509: 'X509' -} as const; - -export type SatpMessageCredentialProfileEnum = typeof SatpMessageCredentialProfileEnum[keyof typeof SatpMessageCredentialProfileEnum]; - -/** - * - * @export - * @interface SatpMessageActionResponse - */ -export interface SatpMessageActionResponse { - /** - * - * @type {string} - * @memberof SatpMessageActionResponse - */ - 'ResponseCode'?: SatpMessageActionResponseResponseCodeEnum; - /** - * - * @type {Array} - * @memberof SatpMessageActionResponse - */ - 'Arguments'?: Array; -} - -export const SatpMessageActionResponseResponseCodeEnum = { - OK: '200', - RESOURCE_NOT_FOUND: '404' -} as const; - -export type SatpMessageActionResponseResponseCodeEnum = typeof SatpMessageActionResponseResponseCodeEnum[keyof typeof SatpMessageActionResponseResponseCodeEnum]; - -/** - * - * @export - * @interface SessionData - */ -export interface SessionData { - /** - * - * @type {string} - * @memberof SessionData - */ - 'id'?: string; - /** - * - * @type {number} - * @memberof SessionData - */ - 'step'?: number; - /** - * - * @type {string} - * @memberof SessionData - */ - 'version'?: string; - /** - * - * @type {number} - * @memberof SessionData - */ - 'lastSequenceNumber'?: number; - /** - * - * @type {string} - * @memberof SessionData - */ - 'loggingProfile'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'accessControlProfile'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'applicationProfile'?: string; - /** - * - * @type {PayloadProfile} - * @memberof SessionData - */ - 'payloadProfile'?: PayloadProfile; - /** - * - * @type {AssetProfile} - * @memberof SessionData - */ - 'assetProfile'?: AssetProfile; - /** - * - * @type {Array} - * @memberof SessionData - */ - 'allowedSourceBackupGateways'?: Array; - /** - * - * @type {Array} - * @memberof SessionData - */ - 'allowedRecipientBackupGateways'?: Array; - /** - * - * @type {string} - * @memberof SessionData - */ - 'sourceBasePath'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'recipientBasePath'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'originatorPubkey'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'beneficiaryPubkey'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'sourceGatewayPubkey'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'sourceGatewayDltSystem'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'recipientGatewayPubkey'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'recipientGatewayDltSystem'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'initializationRequestMessageHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'initializationResponseMessageHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'initializationRequestMessageRcvTimeStamp'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'initializationRequestMessageProcessedTimeStamp'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'clientSignatureInitializationRequestMessage'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'serverSignatureInitializationResponseMessage'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'transferCommenceMessageRequestHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'transferCommenceMessageResponseHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'clientSignatureTransferCommenceRequestMessage'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'serverSignatureTransferCommenceResponseMessage'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'lockEvidenceRequestMessageHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'lockEvidenceResponseMessageHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'clientSignatureLockEvidenceRequestMessage'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'serverSignatureLockEvidenceResponseMessage'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'lockEvidenceClaim'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'commitPrepareRequestMessageHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'commitPrepareResponseMessageHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'clientSignatureCommitPreparationRequestMessage'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'serverSignatureCommitPreparationResponseMessage'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'commitFinalRequestMessageHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'commitFinalResponseMessageHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'commitFinalClaim'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'commitFinalClaimFormat'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'commitAcknowledgementClaim'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'commitAcknowledgementClaimFormat'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'clientSignatureCommitFinalRequestMessage'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'serverSignatureCommitFinalResponseMessage'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'transferCompleteMessageHash'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'clientSignatureTransferCompleteMessage'?: string; - /** - * - * @type {number} - * @memberof SessionData - */ - 'maxRetries'?: number; - /** - * - * @type {string} - * @memberof SessionData - */ - 'recipientLedgerAssetID'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'sourceLedgerAssetID'?: string; - /** - * - * @type {number} - * @memberof SessionData - */ - 'maxTimeout'?: number; - /** - * - * @type {string} - * @memberof SessionData - */ - 'lastLogEntryTimestamp'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'unlockAssetClaim'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'recreateAssetClaim'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'deleteAssetClaim'?: string; - /** - * - * @type {string} - * @memberof SessionData - */ - 'lastMessageReceivedTimestamp'?: string; - /** - * - * @type {boolean} - * @memberof SessionData - */ - 'rollback'?: boolean; - /** - * - * @type {string} - * @memberof SessionData - */ - 'rollbackMessageHash'?: string; - /** - * - * @type {Array} - * @memberof SessionData - */ - 'rollbackProofs'?: Array; - /** - * - * @type {Array} - * @memberof SessionData - */ - 'rollbackActionsPerformed'?: Array; -} - -export const SessionDataRollbackActionsPerformedEnum = { - Create: 'CREATE', - Delete: 'DELETE', - Lock: 'LOCK', - Unlock: 'UNLOCK' -} as const; - -export type SessionDataRollbackActionsPerformedEnum = typeof SessionDataRollbackActionsPerformedEnum[keyof typeof SessionDataRollbackActionsPerformedEnum]; - -/** - * - * @export - * @interface TransferCommenceV1Request - */ -export interface TransferCommenceV1Request { - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'messageType': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'originatorPubkey': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'beneficiaryPubkey': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'senderDltSystem': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'recipientDltSystem': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'clientIdentityPubkey': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'hashAssetProfile': string; - /** - * - * @type {number} - * @memberof TransferCommenceV1Request - */ - 'assetUnit'?: number; - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'hashPrevMessage': string; - /** - * - * @type {number} - * @memberof TransferCommenceV1Request - */ - 'clientTransferNumber'?: number | null; - /** - * - * @type {string} - * @memberof TransferCommenceV1Request - */ - 'signature': string; - /** - * - * @type {number} - * @memberof TransferCommenceV1Request - */ - 'sequenceNumber': number; -} -/** - * - * @export - * @interface TransferCommenceV1Response - */ -export interface TransferCommenceV1Response { - /** - * - * @type {string} - * @memberof TransferCommenceV1Response - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Response - */ - 'clientIdentityPubkey': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Response - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Response - */ - 'hashCommenceRequest': string; - /** - * - * @type {number} - * @memberof TransferCommenceV1Response - */ - 'serverTransferNumber'?: number | null; - /** - * - * @type {string} - * @memberof TransferCommenceV1Response - */ - 'signature': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Response - */ - 'messageType': string; - /** - * - * @type {string} - * @memberof TransferCommenceV1Response - */ - 'messageHash'?: string; - /** - * - * @type {number} - * @memberof TransferCommenceV1Response - */ - 'sequenceNumber': number; -} -/** - * - * @export - * @interface TransferCompleteV1Request - */ -export interface TransferCompleteV1Request { - /** - * - * @type {string} - * @memberof TransferCompleteV1Request - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof TransferCompleteV1Request - */ - 'messageType': string; - /** - * - * @type {string} - * @memberof TransferCompleteV1Request - */ - 'clientIdentityPubkey': string; - /** - * - * @type {string} - * @memberof TransferCompleteV1Request - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof TransferCompleteV1Request - */ - 'hashCommitFinalAck': string; - /** - * - * @type {number} - * @memberof TransferCompleteV1Request - */ - 'clientTransferNumber'?: number | null; - /** - * - * @type {string} - * @memberof TransferCompleteV1Request - */ - 'signature': string; - /** - * - * @type {string} - * @memberof TransferCompleteV1Request - */ - 'hashTransferCommence': string; - /** - * - * @type {number} - * @memberof TransferCompleteV1Request - */ - 'sequenceNumber': number; -} -/** - * - * @export - * @interface TransferInitializationV1Request - */ -export interface TransferInitializationV1Request { - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'messageType': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'version'?: string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'developerURN'?: string; - /** - * - * @type {CredentialProfile} - * @memberof TransferInitializationV1Request - */ - 'credentialProfile'?: CredentialProfile; - /** - * - * @type {PayloadProfile} - * @memberof TransferInitializationV1Request - */ - 'payloadProfile': PayloadProfile; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'applicationProfile': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'loggingProfile': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'accessControlProfile': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'signature': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'sourceGatewayPubkey': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'sourceGatewayDltSystem': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'recipientGatewayPubkey': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'recipientGatewayDltSystem': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'escrowType'?: TransferInitializationV1RequestEscrowTypeEnum; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'expiryTime'?: string; - /** - * - * @type {boolean} - * @memberof TransferInitializationV1Request - */ - 'multipleClaimsAllowed'?: boolean; - /** - * - * @type {boolean} - * @memberof TransferInitializationV1Request - */ - 'multipleCancelsAllowed'?: boolean; - /** - * - * @type {object} - * @memberof TransferInitializationV1Request - */ - 'permissions'?: object; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'origin'?: string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'destination'?: string; - /** - * - * @type {object} - * @memberof TransferInitializationV1Request - */ - 'subsequentCalls'?: object; - /** - * - * @type {Array} - * @memberof TransferInitializationV1Request - */ - 'histories'?: Array; - /** - * - * @type {number} - * @memberof TransferInitializationV1Request - */ - 'sequenceNumber': number; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'sourceBasePath': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'recipientBasePath': string; - /** - * - * @type {number} - * @memberof TransferInitializationV1Request - */ - 'maxRetries': number; - /** - * - * @type {number} - * @memberof TransferInitializationV1Request - */ - 'maxTimeout': number; - /** - * - * @type {Array} - * @memberof TransferInitializationV1Request - */ - 'backupGatewaysAllowed': Array; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'recipientLedgerAssetID': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Request - */ - 'sourceLedgerAssetID': string; -} - -export const TransferInitializationV1RequestEscrowTypeEnum = { - Faucet: 'FAUCET', - Timelock: 'TIMELOCK', - Hashlock: 'HASHLOCK', - Hashtimelock: 'HASHTIMELOCK', - Multiclaimpc: 'MULTICLAIMPC', - Destroy: 'DESTROY', - Burn: 'BURN' -} as const; - -export type TransferInitializationV1RequestEscrowTypeEnum = typeof TransferInitializationV1RequestEscrowTypeEnum[keyof typeof TransferInitializationV1RequestEscrowTypeEnum]; - -/** - * - * @export - * @interface TransferInitializationV1Response - */ -export interface TransferInitializationV1Response { - /** - * - * @type {string} - * @memberof TransferInitializationV1Response - */ - 'messageType': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Response - */ - 'sessionID': string; - /** - * - * @type {number} - * @memberof TransferInitializationV1Response - */ - 'sequenceNumber': number; - /** - * - * @type {string} - * @memberof TransferInitializationV1Response - */ - 'odapPhase'?: TransferInitializationV1ResponseOdapPhaseEnum; - /** - * - * @type {string} - * @memberof TransferInitializationV1Response - */ - 'initialRequestMessageHash': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Response - */ - 'destination'?: string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Response - */ - 'timeStamp': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Response - */ - 'processedTimeStamp': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Response - */ - 'serverIdentityPubkey': string; - /** - * - * @type {string} - * @memberof TransferInitializationV1Response - */ - 'signature': string; - /** - * - * @type {Array} - * @memberof TransferInitializationV1Response - */ - 'backupGatewaysAllowed': Array; -} - -export const TransferInitializationV1ResponseOdapPhaseEnum = { - TransferInitialization: 'TransferInitialization', - LockEvidenceVerification: 'LockEvidenceVerification', - CommitmentEstablishment: 'CommitmentEstablishment' -} as const; - -export type TransferInitializationV1ResponseOdapPhaseEnum = typeof TransferInitializationV1ResponseOdapPhaseEnum[keyof typeof TransferInitializationV1ResponseOdapPhaseEnum]; - - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {ClientV1Request} [clientV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - clientRequestV1: async (clientV1Request?: ClientV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(clientV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {TransferInitializationV1Request} [transferInitializationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase1TransferInitiationRequestV1: async (transferInitializationV1Request?: TransferInitializationV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transferInitializationV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {TransferInitializationV1Response} [transferInitializationV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase1TransferInitiationResponseV1: async (transferInitializationV1Response?: TransferInitializationV1Response, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transferInitializationV1Response, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {LockEvidenceV1Request} [lockEvidenceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase2LockEvidenceRequestV1: async (lockEvidenceV1Request?: LockEvidenceV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(lockEvidenceV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {LockEvidenceV1Response} [lockEvidenceV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase2LockEvidenceResponseV1: async (lockEvidenceV1Response?: LockEvidenceV1Response, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(lockEvidenceV1Response, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {TransferCommenceV1Request} [transferCommenceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase2TransferCommenceRequestV1: async (transferCommenceV1Request?: TransferCommenceV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transferCommenceV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {TransferCommenceV1Response} [transferCommenceV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase2TransferCommenceResponseV1: async (transferCommenceV1Response?: TransferCommenceV1Response, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transferCommenceV1Response, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {CommitFinalV1Request} [commitFinalV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase3CommitFinalRequestV1: async (commitFinalV1Request?: CommitFinalV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(commitFinalV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {CommitFinalV1Response} [commitFinalV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase3CommitFinalResponseV1: async (commitFinalV1Response?: CommitFinalV1Response, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(commitFinalV1Response, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {CommitPreparationV1Request} [commitPreparationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase3CommitPreparationRequestV1: async (commitPreparationV1Request?: CommitPreparationV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(commitPreparationV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {CommitPreparationV1Response} [commitPreparationV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase3CommitPreparationResponseV1: async (commitPreparationV1Response?: CommitPreparationV1Response, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(commitPreparationV1Response, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {TransferCompleteV1Request} [transferCompleteV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase3TransferCompleteRequestV1: async (transferCompleteV1Request?: TransferCompleteV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transferCompleteV1Request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {RecoverUpdateAckV1Message} [recoverUpdateAckV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recoverUpdateAckV1Message: async (recoverUpdateAckV1Message?: RecoverUpdateAckV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(recoverUpdateAckV1Message, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {RecoverUpdateV1Message} [recoverUpdateV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recoverUpdateV1Message: async (recoverUpdateV1Message?: RecoverUpdateV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(recoverUpdateV1Message, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {RecoverV1Message} [recoverV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recoverV1Message: async (recoverV1Message?: RecoverV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(recoverV1Message, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {RecoverSuccessV1Message} [recoverSuccessV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recoverV1Success: async (recoverSuccessV1Message?: RecoverSuccessV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(recoverSuccessV1Message, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {RollbackAckV1Message} [rollbackAckV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - rollbackAckV1Message: async (rollbackAckV1Message?: RollbackAckV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(rollbackAckV1Message, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {RollbackV1Message} [rollbackV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - rollbackV1Message: async (rollbackV1Message?: RollbackV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(rollbackV1Message, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { - /** - * - * @param {ClientV1Request} [clientV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async clientRequestV1(clientV1Request?: ClientV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.clientRequestV1(clientV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {TransferInitializationV1Request} [transferInitializationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase1TransferInitiationRequestV1(transferInitializationV1Request?: TransferInitializationV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase1TransferInitiationRequestV1(transferInitializationV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {TransferInitializationV1Response} [transferInitializationV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase1TransferInitiationResponseV1(transferInitializationV1Response?: TransferInitializationV1Response, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase1TransferInitiationResponseV1(transferInitializationV1Response, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {LockEvidenceV1Request} [lockEvidenceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase2LockEvidenceRequestV1(lockEvidenceV1Request?: LockEvidenceV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase2LockEvidenceRequestV1(lockEvidenceV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {LockEvidenceV1Response} [lockEvidenceV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase2LockEvidenceResponseV1(lockEvidenceV1Response?: LockEvidenceV1Response, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase2LockEvidenceResponseV1(lockEvidenceV1Response, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {TransferCommenceV1Request} [transferCommenceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase2TransferCommenceRequestV1(transferCommenceV1Request?: TransferCommenceV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase2TransferCommenceRequestV1(transferCommenceV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {TransferCommenceV1Response} [transferCommenceV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase2TransferCommenceResponseV1(transferCommenceV1Response?: TransferCommenceV1Response, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase2TransferCommenceResponseV1(transferCommenceV1Response, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {CommitFinalV1Request} [commitFinalV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase3CommitFinalRequestV1(commitFinalV1Request?: CommitFinalV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitFinalRequestV1(commitFinalV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {CommitFinalV1Response} [commitFinalV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase3CommitFinalResponseV1(commitFinalV1Response?: CommitFinalV1Response, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitFinalResponseV1(commitFinalV1Response, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {CommitPreparationV1Request} [commitPreparationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase3CommitPreparationRequestV1(commitPreparationV1Request?: CommitPreparationV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitPreparationRequestV1(commitPreparationV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {CommitPreparationV1Response} [commitPreparationV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase3CommitPreparationResponseV1(commitPreparationV1Response?: CommitPreparationV1Response, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitPreparationResponseV1(commitPreparationV1Response, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {TransferCompleteV1Request} [transferCompleteV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async phase3TransferCompleteRequestV1(transferCompleteV1Request?: TransferCompleteV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase3TransferCompleteRequestV1(transferCompleteV1Request, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {RecoverUpdateAckV1Message} [recoverUpdateAckV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async recoverUpdateAckV1Message(recoverUpdateAckV1Message?: RecoverUpdateAckV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.recoverUpdateAckV1Message(recoverUpdateAckV1Message, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {RecoverUpdateV1Message} [recoverUpdateV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async recoverUpdateV1Message(recoverUpdateV1Message?: RecoverUpdateV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.recoverUpdateV1Message(recoverUpdateV1Message, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {RecoverV1Message} [recoverV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async recoverV1Message(recoverV1Message?: RecoverV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.recoverV1Message(recoverV1Message, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {RecoverSuccessV1Message} [recoverSuccessV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async recoverV1Success(recoverSuccessV1Message?: RecoverSuccessV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.recoverV1Success(recoverSuccessV1Message, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {RollbackAckV1Message} [rollbackAckV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async rollbackAckV1Message(rollbackAckV1Message?: RollbackAckV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.rollbackAckV1Message(rollbackAckV1Message, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {RollbackV1Message} [rollbackV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async rollbackV1Message(rollbackV1Message?: RollbackV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.rollbackV1Message(rollbackV1Message, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DefaultApiFp(configuration) - return { - /** - * - * @param {ClientV1Request} [clientV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - clientRequestV1(clientV1Request?: ClientV1Request, options?: any): AxiosPromise { - return localVarFp.clientRequestV1(clientV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {TransferInitializationV1Request} [transferInitializationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase1TransferInitiationRequestV1(transferInitializationV1Request?: TransferInitializationV1Request, options?: any): AxiosPromise { - return localVarFp.phase1TransferInitiationRequestV1(transferInitializationV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {TransferInitializationV1Response} [transferInitializationV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase1TransferInitiationResponseV1(transferInitializationV1Response?: TransferInitializationV1Response, options?: any): AxiosPromise { - return localVarFp.phase1TransferInitiationResponseV1(transferInitializationV1Response, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LockEvidenceV1Request} [lockEvidenceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase2LockEvidenceRequestV1(lockEvidenceV1Request?: LockEvidenceV1Request, options?: any): AxiosPromise { - return localVarFp.phase2LockEvidenceRequestV1(lockEvidenceV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LockEvidenceV1Response} [lockEvidenceV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase2LockEvidenceResponseV1(lockEvidenceV1Response?: LockEvidenceV1Response, options?: any): AxiosPromise { - return localVarFp.phase2LockEvidenceResponseV1(lockEvidenceV1Response, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {TransferCommenceV1Request} [transferCommenceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase2TransferCommenceRequestV1(transferCommenceV1Request?: TransferCommenceV1Request, options?: any): AxiosPromise { - return localVarFp.phase2TransferCommenceRequestV1(transferCommenceV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {TransferCommenceV1Response} [transferCommenceV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase2TransferCommenceResponseV1(transferCommenceV1Response?: TransferCommenceV1Response, options?: any): AxiosPromise { - return localVarFp.phase2TransferCommenceResponseV1(transferCommenceV1Response, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {CommitFinalV1Request} [commitFinalV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase3CommitFinalRequestV1(commitFinalV1Request?: CommitFinalV1Request, options?: any): AxiosPromise { - return localVarFp.phase3CommitFinalRequestV1(commitFinalV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {CommitFinalV1Response} [commitFinalV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase3CommitFinalResponseV1(commitFinalV1Response?: CommitFinalV1Response, options?: any): AxiosPromise { - return localVarFp.phase3CommitFinalResponseV1(commitFinalV1Response, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {CommitPreparationV1Request} [commitPreparationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase3CommitPreparationRequestV1(commitPreparationV1Request?: CommitPreparationV1Request, options?: any): AxiosPromise { - return localVarFp.phase3CommitPreparationRequestV1(commitPreparationV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {CommitPreparationV1Response} [commitPreparationV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase3CommitPreparationResponseV1(commitPreparationV1Response?: CommitPreparationV1Response, options?: any): AxiosPromise { - return localVarFp.phase3CommitPreparationResponseV1(commitPreparationV1Response, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {TransferCompleteV1Request} [transferCompleteV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - phase3TransferCompleteRequestV1(transferCompleteV1Request?: TransferCompleteV1Request, options?: any): AxiosPromise { - return localVarFp.phase3TransferCompleteRequestV1(transferCompleteV1Request, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {RecoverUpdateAckV1Message} [recoverUpdateAckV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recoverUpdateAckV1Message(recoverUpdateAckV1Message?: RecoverUpdateAckV1Message, options?: any): AxiosPromise { - return localVarFp.recoverUpdateAckV1Message(recoverUpdateAckV1Message, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {RecoverUpdateV1Message} [recoverUpdateV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recoverUpdateV1Message(recoverUpdateV1Message?: RecoverUpdateV1Message, options?: any): AxiosPromise { - return localVarFp.recoverUpdateV1Message(recoverUpdateV1Message, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {RecoverV1Message} [recoverV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recoverV1Message(recoverV1Message?: RecoverV1Message, options?: any): AxiosPromise { - return localVarFp.recoverV1Message(recoverV1Message, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {RecoverSuccessV1Message} [recoverSuccessV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - recoverV1Success(recoverSuccessV1Message?: RecoverSuccessV1Message, options?: any): AxiosPromise { - return localVarFp.recoverV1Success(recoverSuccessV1Message, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {RollbackAckV1Message} [rollbackAckV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - rollbackAckV1Message(rollbackAckV1Message?: RollbackAckV1Message, options?: any): AxiosPromise { - return localVarFp.rollbackAckV1Message(rollbackAckV1Message, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {RollbackV1Message} [rollbackV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - rollbackV1Message(rollbackV1Message?: RollbackV1Message, options?: any): AxiosPromise { - return localVarFp.rollbackV1Message(rollbackV1Message, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * - * @param {ClientV1Request} [clientV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public clientRequestV1(clientV1Request?: ClientV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).clientRequestV1(clientV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {TransferInitializationV1Request} [transferInitializationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase1TransferInitiationRequestV1(transferInitializationV1Request?: TransferInitializationV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase1TransferInitiationRequestV1(transferInitializationV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {TransferInitializationV1Response} [transferInitializationV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase1TransferInitiationResponseV1(transferInitializationV1Response?: TransferInitializationV1Response, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase1TransferInitiationResponseV1(transferInitializationV1Response, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {LockEvidenceV1Request} [lockEvidenceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase2LockEvidenceRequestV1(lockEvidenceV1Request?: LockEvidenceV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase2LockEvidenceRequestV1(lockEvidenceV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {LockEvidenceV1Response} [lockEvidenceV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase2LockEvidenceResponseV1(lockEvidenceV1Response?: LockEvidenceV1Response, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase2LockEvidenceResponseV1(lockEvidenceV1Response, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {TransferCommenceV1Request} [transferCommenceV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase2TransferCommenceRequestV1(transferCommenceV1Request?: TransferCommenceV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase2TransferCommenceRequestV1(transferCommenceV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {TransferCommenceV1Response} [transferCommenceV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase2TransferCommenceResponseV1(transferCommenceV1Response?: TransferCommenceV1Response, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase2TransferCommenceResponseV1(transferCommenceV1Response, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {CommitFinalV1Request} [commitFinalV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase3CommitFinalRequestV1(commitFinalV1Request?: CommitFinalV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase3CommitFinalRequestV1(commitFinalV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {CommitFinalV1Response} [commitFinalV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase3CommitFinalResponseV1(commitFinalV1Response?: CommitFinalV1Response, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase3CommitFinalResponseV1(commitFinalV1Response, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {CommitPreparationV1Request} [commitPreparationV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase3CommitPreparationRequestV1(commitPreparationV1Request?: CommitPreparationV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase3CommitPreparationRequestV1(commitPreparationV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {CommitPreparationV1Response} [commitPreparationV1Response] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase3CommitPreparationResponseV1(commitPreparationV1Response?: CommitPreparationV1Response, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase3CommitPreparationResponseV1(commitPreparationV1Response, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {TransferCompleteV1Request} [transferCompleteV1Request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public phase3TransferCompleteRequestV1(transferCompleteV1Request?: TransferCompleteV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase3TransferCompleteRequestV1(transferCompleteV1Request, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {RecoverUpdateAckV1Message} [recoverUpdateAckV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public recoverUpdateAckV1Message(recoverUpdateAckV1Message?: RecoverUpdateAckV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).recoverUpdateAckV1Message(recoverUpdateAckV1Message, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {RecoverUpdateV1Message} [recoverUpdateV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public recoverUpdateV1Message(recoverUpdateV1Message?: RecoverUpdateV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).recoverUpdateV1Message(recoverUpdateV1Message, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {RecoverV1Message} [recoverV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public recoverV1Message(recoverV1Message?: RecoverV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).recoverV1Message(recoverV1Message, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {RecoverSuccessV1Message} [recoverSuccessV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public recoverV1Success(recoverSuccessV1Message?: RecoverSuccessV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).recoverV1Success(recoverSuccessV1Message, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {RollbackAckV1Message} [rollbackAckV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public rollbackAckV1Message(rollbackAckV1Message?: RollbackAckV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).rollbackAckV1Message(rollbackAckV1Message, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {RollbackV1Message} [rollbackV1Message] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public rollbackV1Message(rollbackV1Message?: RollbackV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).rollbackV1Message(rollbackV1Message, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/base.ts deleted file mode 100644 index 0e72a3c2f0..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Odap Hermes - * Implementation for Odap and Hermes - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/common.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/common.ts deleted file mode 100644 index 165771e4c1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Odap Hermes - * Implementation for Odap and Hermes - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/configuration.ts deleted file mode 100644 index 17eef2df4b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Odap Hermes - * Implementation for Odap and Hermes - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/index.ts deleted file mode 100644 index c3bcfed9ec..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Hyperledger Cactus Plugin - Odap Hermes - * Implementation for Odap and Hermes - * - * The version of the OpenAPI document: 2.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/index.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/index.web.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts deleted file mode 100644 index 530de4eccc..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts +++ /dev/null @@ -1,27 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; - -export { - IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, - SatpMessageType, - IKeyPair, -} from "./gateway/plugin-satp-gateway"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryFabricSatpGateway } from "./gateway/plugin-factory-fabric-satp-gateway"; -import { PluginFactoryBesuSatpGateway } from "./gateway/plugin-factory-besu-satp-gateway"; - -export async function createFabricPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryFabricSatpGateway(pluginFactoryOptions); -} - -export async function createBesuPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryBesuSatpGateway(pluginFactoryOptions); -} - -export { ServerGatewayHelper } from "./gateway/server/server-helper"; -export { ClientGatewayHelper } from "./gateway/client/client-helper"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts deleted file mode 100644 index 9ef597bf16..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts +++ /dev/null @@ -1,99 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; - -import OAS from "../../../json/openapi.json"; - -export interface IClientRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class ClientRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ClientRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return ClientRequestEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IClientRequestEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths["/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest"]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths["/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest"]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.runSatp(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts deleted file mode 100644 index c68f4864bd..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; - -import OAS from "../../../json/openapi.json"; - -export interface ICommitFinalResponseEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class CommitFinalResponseEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "CommitFinalResponseEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return CommitFinalResponseEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ICommitFinalResponseEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onCommitFinalResponseReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts deleted file mode 100644 index f7d9f0fa24..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts +++ /dev/null @@ -1,107 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; - -import OAS from "../../../json/openapi.json"; - -export interface ICommitPreparationResponseEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class CommitPreparationResponseEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "CommitPrepareResponseEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return CommitPreparationResponseEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ICommitPreparationResponseEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onCommitPrepareResponseReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts deleted file mode 100644 index b59a2db14b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts +++ /dev/null @@ -1,106 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; - -export interface ILockEvidenceResponseEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class LockEvidenceResponseEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "LockEvidenceResponseEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return LockEvidenceResponseEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ILockEvidenceResponseEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - /*public getOasPath() { - return OAS.paths["/api/v2/phase3/commitfinal"]; - }*/ - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onLockEvidenceResponseReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts deleted file mode 100644 index 4e0ab33676..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; - -export interface ITransferCommenceResponseEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class TransferCommenceResponseEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "TransferCommenceResponseEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return TransferCommenceResponseEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ITransferCommenceResponseEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onTransferCommenceResponseReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts deleted file mode 100644 index b5155591de..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts +++ /dev/null @@ -1,107 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; - -export interface ITransferInitiationResponseEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class TransferInitiationResponseEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "TransferInitiationResponseEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return TransferInitiationResponseEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ITransferInitiationResponseEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - console.log("getting authorized provider"); - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onTransferInitiationResponseReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts deleted file mode 100644 index 39b167e403..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; - -import OAS from "../../../json/openapi.json"; - -export interface IRecoverMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class RecoverMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RecoverMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RecoverMessageEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IRecoverMessageEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRecoverMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts deleted file mode 100644 index 9ce43e466a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; - -import OAS from "../../../json/openapi.json"; - -export interface IRecoverSuccessMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class RecoverSuccessMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RecoverSuccessMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RecoverSuccessMessageEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IRecoverSuccessMessageEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRecoverSuccessMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts deleted file mode 100644 index a9808d4922..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts +++ /dev/null @@ -1,105 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; - -import OAS from "../../../json/openapi.json"; - -export interface IRecoverUpdateAckMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class RecoverUpdateAckMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RecoverUpdateAckMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RecoverUpdateAckMessageEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: IRecoverUpdateAckMessageEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRecoverUpdateAckMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts deleted file mode 100644 index f10cff1b9f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; - -import OAS from "../../../json/openapi.json"; - -export interface IRecoverUpdateMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class RecoverUpdateMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RecoverUpdateMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RecoverUpdateMessageEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IRecoverUpdateMessageEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRecoverUpdateMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts deleted file mode 100644 index 2857f12b5b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; - -import OAS from "../../../json/openapi.json"; - -export interface IRollbackAckMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class RollbackAckMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RollbackAckMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RollbackAckMessageEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IRollbackAckMessageEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRollbackAckMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts deleted file mode 100644 index 3e09838d58..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; - -import OAS from "../../../json/openapi.json"; - -export interface IRollbackMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class RollbackMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RollbackMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RollbackMessageEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IRollbackMessageEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRollbackMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts deleted file mode 100644 index cdf2004e8d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; - -export interface ICommitFinalRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class CommitFinalRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "CommitFinalRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return CommitFinalRequestEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ICommitFinalRequestEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onCommitFinalRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts deleted file mode 100644 index 4c87695844..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; - -export interface ICommitPreparationRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class CommitPreparationRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "CommitPreparationRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return CommitPreparationRequestEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ICommitPreparationRequestEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onCommitPrepareRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts deleted file mode 100644 index 8265526059..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts +++ /dev/null @@ -1,106 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; - -export interface ILockEvidenceRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class LockEvidenceRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "LockEvidenceRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return LockEvidenceRequestEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ILockEvidenceRequestEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - /*public getOasPath() { - return OAS.paths["/api/v2/phase3/commitfinal"]; - }*/ - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onLockEvidenceRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts deleted file mode 100644 index 8853a65632..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; - -export interface ITransferCommenceRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class TransferCommenceRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "TransferCommenceRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return TransferCommenceRequestEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ITransferCommenceRequestEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onTransferCommenceRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts deleted file mode 100644 index f2d57b398a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; - -export interface ITransferCompleteRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class TransferCompleteRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "TransferCompleteRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return TransferCompleteRequestEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ITransferCompleteRequestEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" - ]; - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" - ]; - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" - ].get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onTransferCompleteRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts deleted file mode 100644 index 68c9e29d37..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts +++ /dev/null @@ -1,107 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; - -export interface ITransferInitiationRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; -} - -export class TransferInitiationRequestEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "TransferInitiationRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return TransferInitiationRequestEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ITransferInitiationRequestEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - console.log("getting authorized provider"); - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onTransferInitiationRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json deleted file mode 100644 index fda660818a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json +++ /dev/null @@ -1,2504 +0,0 @@ -{ - "contractName": "LockAsset", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "name": "createAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "deleteAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "getAsset", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "creator", - "type": "address" - }, - { - "internalType": "bool", - "name": "isLock", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "internalType": "struct Asset", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isAssetLocked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isPresent", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "lockAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "unLockAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"createAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAsset\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isLock\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"internalType\":\"struct Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isAssetLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isPresent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol\":\"LockAsset\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol\":{\"keccak256\":\"0xde0438e010cd77bfc1516697230fbcec20e85bd7fdbc8df9225abb5c9dd6c7ed\",\"urls\":[\"bzz-raw://865f301eada0615be375c9313d3abce9458dcbb5311dedf805cad921accda557\",\"dweb:/ipfs/QmY1r6Z7PM8ypYy59rWqozy3Mkcv9nMd4xRcfpCbwN4LQK\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b506105f9806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063cd5286d01161005b578063cd5286d0146100d2578063db9cc41014610112578063def60e0d14610125578063e24aa37c1461013857600080fd5b80631ae4eb68146100825780635e82d0a6146100aa578063bc548275146100bf575b600080fd5b610095610090366004610525565b61014b565b60405190151581526020015b60405180910390f35b6100bd6100b8366004610525565b6101b5565b005b6100956100cd366004610525565b61022a565b6100e56100e0366004610525565b610259565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016100a1565b6100bd610120366004610567565b6102d1565b6100bd610133366004610525565b6103bc565b6100bd610146366004610525565b610402565b600080600184846040516101609291906105b3565b9081526040519081900360200190205460ff1690508061017f57600080fd5b600084846040516101919291906105b3565b9081526040519081900360200190205460ff600160a01b9091041691505092915050565b6000600183836040516101c99291906105b3565b9081526040519081900360200190205460ff169050806101e857600080fd5b6001600084846040516101fc9291906105b3565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60006001838360405161023e9291906105b3565b9081526040519081900360200190205460ff16905092915050565b6040805160608101825260008082526020820181905291810191909152600083836040516102889291906105b3565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116102de57600080fd5b80600084846040516102f19291906105b3565b90815260200160405180910390206001018190555033600084846040516103199291906105b3565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b031990931692909217909155600090819061035b90869086906105b3565b9081526040519081900360200181208054921515600160a01b0260ff60a01b1990931692909217909155600190819061039790869086906105b3565b908152604051908190036020019020805491151560ff19909216919091179055505050565b6000600183836040516103d09291906105b3565b9081526040519081900360200190205460ff169050806103ef57600080fd5b60008084846040516101fc9291906105b3565b6000600183836040516104169291906105b3565b9081526040519081900360200190205460ff1690508061043557600080fd5b60008084846040516104489291906105b3565b9081526040519081900360200190205460ff600160a01b9091041690508061046f57600080fd5b600084846040516104819291906105b3565b90815260405190819003602001812080546001600160a81b031916815560006001918201819055916104b690879087906105b3565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b60008083601f8401126104ee57600080fd5b50813567ffffffffffffffff81111561050657600080fd5b60208301915083602082850101111561051e57600080fd5b9250929050565b6000806020838503121561053857600080fd5b823567ffffffffffffffff81111561054f57600080fd5b61055b858286016104dc565b90969095509350505050565b60008060006040848603121561057c57600080fd5b833567ffffffffffffffff81111561059357600080fd5b61059f868287016104dc565b909790965060209590950135949350505050565b818382376000910190815291905056fea2646970667358221220256d00c6b6e97111d048c9a6a3069f078880240932a634dae7aec643dc6ade7664736f6c634300080f0033", - "deployedBytecode": "608060405234801561001057600080fd5b506004361061007d5760003560e01c8063cd5286d01161005b578063cd5286d0146100d2578063db9cc41014610112578063def60e0d14610125578063e24aa37c1461013857600080fd5b80631ae4eb68146100825780635e82d0a6146100aa578063bc548275146100bf575b600080fd5b610095610090366004610525565b61014b565b60405190151581526020015b60405180910390f35b6100bd6100b8366004610525565b6101b5565b005b6100956100cd366004610525565b61022a565b6100e56100e0366004610525565b610259565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016100a1565b6100bd610120366004610567565b6102d1565b6100bd610133366004610525565b6103bc565b6100bd610146366004610525565b610402565b600080600184846040516101609291906105b3565b9081526040519081900360200190205460ff1690508061017f57600080fd5b600084846040516101919291906105b3565b9081526040519081900360200190205460ff600160a01b9091041691505092915050565b6000600183836040516101c99291906105b3565b9081526040519081900360200190205460ff169050806101e857600080fd5b6001600084846040516101fc9291906105b3565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60006001838360405161023e9291906105b3565b9081526040519081900360200190205460ff16905092915050565b6040805160608101825260008082526020820181905291810191909152600083836040516102889291906105b3565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116102de57600080fd5b80600084846040516102f19291906105b3565b90815260200160405180910390206001018190555033600084846040516103199291906105b3565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b031990931692909217909155600090819061035b90869086906105b3565b9081526040519081900360200181208054921515600160a01b0260ff60a01b1990931692909217909155600190819061039790869086906105b3565b908152604051908190036020019020805491151560ff19909216919091179055505050565b6000600183836040516103d09291906105b3565b9081526040519081900360200190205460ff169050806103ef57600080fd5b60008084846040516101fc9291906105b3565b6000600183836040516104169291906105b3565b9081526040519081900360200190205460ff1690508061043557600080fd5b60008084846040516104489291906105b3565b9081526040519081900360200190205460ff600160a01b9091041690508061046f57600080fd5b600084846040516104819291906105b3565b90815260405190819003602001812080546001600160a81b031916815560006001918201819055916104b690879087906105b3565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b60008083601f8401126104ee57600080fd5b50813567ffffffffffffffff81111561050657600080fd5b60208301915083602082850101111561051e57600080fd5b9250929050565b6000806020838503121561053857600080fd5b823567ffffffffffffffff81111561054f57600080fd5b61055b858286016104dc565b90969095509350505050565b60008060006040848603121561057c57600080fd5b833567ffffffffffffffff81111561059357600080fd5b61059f868287016104dc565b909790965060209590950135949350505050565b818382376000910190815291905056fea2646970667358221220256d00c6b6e97111d048c9a6a3069f078880240932a634dae7aec643dc6ade7664736f6c634300080f0033", - "sourceMap": "543:1460:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "543:1460:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1770:231;;;;;;:::i;:::-;;:::i;:::-;;;948:14:1;;941:22;923:41;;911:2;896:18;1770:231:0;;;;;;;;1011:144;;;;;;:::i;:::-;;:::i;:::-;;1665:101;;;;;;:::i;:::-;;:::i;865:103::-;;;;;;:::i;:::-;;:::i;:::-;;;;1183:13:1;;-1:-1:-1;;;;;1179:39:1;1161:58;;1289:4;1277:17;;;1271:24;1264:32;1257:40;1235:20;;;1228:70;1342:17;;;1336:24;1314:20;;;1307:54;1149:2;1134:18;865:103:0;975:392:1;643:218:0;;;;;;:::i;:::-;;:::i;1200:147::-;;;;;;:::i;:::-;;:::i;1351:310::-;;;;;;:::i;:::-;;:::i;1770:231::-;1834:4;1848:11;1862;1874:2;;1862:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1862:15:0;1885;;;;;;1979:6;1986:2;;1979:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1979:17:0;;;;;-1:-1:-1;;1770:231:0;;;;:::o;1011:144::-;1065:11;1079;1091:2;;1079:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1079:15:0;1102;;;;;;1146:4;1126:6;1133:2;;1126:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:24;;;;;-1:-1:-1;;;1126:24:0;-1:-1:-1;;;;1126:24:0;;;;;;;;;-1:-1:-1;;;1011:144:0:o;1665:101::-;1725:4;1746:11;1758:2;;1746:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1665:101:0;;;;:::o;865:103::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;953:6:0;960:2;;953:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;946:17;;;;;;;-1:-1:-1;;;;;946:17:0;;;;-1:-1:-1;;;946:17:0;;;;;;;;;;;;;;;;;;;;;;953:10;865:103;-1:-1:-1;;;865:103:0:o;643:218::-;723:1;718:4;:6;710:15;;;;;;750:4;733:6;740:2;;733:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;:21;;;;783:10;762:6;769:2;;762:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;;-1:-1:-1;;;;;762:31:0;;;;-1:-1:-1;;;;;;762:31:0;;;;;;;;;;:18;;;;801:10;;808:2;;;;801:10;:::i;:::-;;;;;;;;;;;;;;:25;;;;;-1:-1:-1;;;801:25:0;-1:-1:-1;;;;801:25:0;;;;;;;;;;-1:-1:-1;;;;834:15:0;;846:2;;;;834:15;:::i;:::-;;;;;;;;;;;;;;:22;;;;;-1:-1:-1;;834:22:0;;;;;;;;;-1:-1:-1;;;643:218:0:o;1200:147::-;1256:11;1270;1282:2;;1270:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1270:15:0;1293;;;;;;1337:5;1317:6;1324:2;;1317:10;;;;;;;:::i;1351:310::-;1407:11;1421;1433:2;;1421:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1421:15:0;1444;;;;;;1531:18;1552:6;1559:2;;1552:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1552:17:0;;;;;-1:-1:-1;1552:17:0;1577:22;;;;;;1615:6;1622:2;;1615:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;1608:17;;-1:-1:-1;;;;;;1608:17:0;;;1615:10;1608:17;;;;;;;1615:10;1633:15;;1645:2;;;;1633:15;:::i;:::-;;;;;;;;;;;;;;:23;;;;;-1:-1:-1;;1633:23:0;;;;;;;;;-1:-1:-1;;;;1351:310:0:o;14:348:1:-;66:8;76:6;130:3;123:4;115:6;111:17;107:27;97:55;;148:1;145;138:12;97:55;-1:-1:-1;171:20:1;;214:18;203:30;;200:50;;;246:1;243;236:12;200:50;283:4;275:6;271:17;259:29;;335:3;328:4;319:6;311;307:19;303:30;300:39;297:59;;;352:1;349;342:12;297:59;14:348;;;;;:::o;367:411::-;438:6;446;499:2;487:9;478:7;474:23;470:32;467:52;;;515:1;512;505:12;467:52;555:9;542:23;588:18;580:6;577:30;574:50;;;620:1;617;610:12;574:50;659:59;710:7;701:6;690:9;686:22;659:59;:::i;:::-;737:8;;633:85;;-1:-1:-1;367:411:1;-1:-1:-1;;;;367:411:1:o;1372:479::-;1452:6;1460;1468;1521:2;1509:9;1500:7;1496:23;1492:32;1489:52;;;1537:1;1534;1527:12;1489:52;1577:9;1564:23;1610:18;1602:6;1599:30;1596:50;;;1642:1;1639;1632:12;1596:50;1681:59;1732:7;1723:6;1712:9;1708:22;1681:59;:::i;:::-;1759:8;;1655:85;;-1:-1:-1;1841:2:1;1826:18;;;;1813:32;;1372:479;-1:-1:-1;;;;1372:479:1:o;1856:273::-;2041:6;2033;2028:3;2015:33;1997:3;2067:16;;2092:13;;;2067:16;1856:273;-1:-1:-1;1856:273:1:o", - "sourcePath": "/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol", - "compiler": { - "name": "solc", - "version": "0.8.15+commit.e14f2714" - }, - "ast": { - "absolutePath": "/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol", - "exportedSymbols": { - "Asset": [ - 8 - ], - "LockAsset": [ - 192 - ] - }, - "id": 193, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "canonicalName": "Asset", - "id": 8, - "members": [ - { - "constant": false, - "id": 3, - "mutability": "mutable", - "name": "creator", - "nameLocation": "464:7:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "456:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "456:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 5, - "mutability": "mutable", - "name": "isLock", - "nameLocation": "482:6:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "477:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "477:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "size", - "nameLocation": "499:4:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "494:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "494:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "name": "Asset", - "nameLocation": "445:5:0", - "nodeType": "StructDefinition", - "scope": 193, - "src": "438:68:0", - "visibility": "public" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "LockAsset", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 192, - "linearizedBaseContracts": [ - 192 - ], - "name": "LockAsset", - "nameLocation": "552:9:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13, - "mutability": "mutable", - "name": "assets", - "nameLocation": "592:6:0", - "nodeType": "VariableDeclaration", - "scope": 192, - "src": "566:32:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string => struct Asset)" - }, - "typeName": { - "id": 12, - "keyType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "575:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "566:25:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string => struct Asset)" - }, - "valueType": { - "id": 11, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 10, - "name": "Asset", - "nodeType": "IdentifierPath", - "referencedDeclaration": 8, - "src": "585:5:0" - }, - "referencedDeclaration": 8, - "src": "585:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", - "typeString": "struct Asset" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 17, - "mutability": "mutable", - "name": "assetExists", - "nameLocation": "627:11:0", - "nodeType": "VariableDeclaration", - "scope": 192, - "src": "602:36:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "typeName": { - "id": 16, - "keyType": { - "id": 14, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "611:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "602:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "valueType": { - "id": 15, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "621:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 58, - "nodeType": "Block", - "src": "702:159:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 25, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "718:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 26, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "723:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "718:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 24, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "710:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "710:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 29, - "nodeType": "ExpressionStatement", - "src": "710:15:0" - }, - { - "expression": { - "id": 35, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 30, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "733:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 32, - "indexExpression": { - "id": 31, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "740:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "733:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 33, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "733:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 34, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "750:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "733:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 36, - "nodeType": "ExpressionStatement", - "src": "733:21:0" - }, - { - "expression": { - "id": 43, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 37, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "762:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 39, - "indexExpression": { - "id": 38, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "769:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "762:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 40, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "creator", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "762:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "expression": { - "id": 41, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "783:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 42, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "783:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "762:31:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 44, - "nodeType": "ExpressionStatement", - "src": "762:31:0" - }, - { - "expression": { - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 45, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "801:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 47, - "indexExpression": { - "id": 46, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "808:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "801:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 48, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "801:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 49, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "821:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "801:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 51, - "nodeType": "ExpressionStatement", - "src": "801:25:0" - }, - { - "expression": { - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 52, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "834:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 54, - "indexExpression": { - "id": 53, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "846:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "834:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "852:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "834:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 57, - "nodeType": "ExpressionStatement", - "src": "834:22:0" - } - ] - }, - "functionSelector": "db9cc410", - "id": 59, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "createAsset", - "nameLocation": "652:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 22, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19, - "mutability": "mutable", - "name": "id", - "nameLocation": "681:2:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "665:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 18, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "665:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 21, - "mutability": "mutable", - "name": "size", - "nameLocation": "690:4:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "685:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 20, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "685:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "663:32:0" - }, - "returnParameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [], - "src": "702:0:0" - }, - "scope": 192, - "src": "643:218:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 71, - "nodeType": "Block", - "src": "938:30:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 67, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "953:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 69, - "indexExpression": { - "id": 68, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "960:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "953:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "946:17:0" - } - ] - }, - "functionSelector": "cd5286d0", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAsset", - "nameLocation": "874:8:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 62, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 61, - "mutability": "mutable", - "name": "id", - "nameLocation": "899:2:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "883:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 60, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "883:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "882:20:0" - }, - "returnParameters": { - "id": 66, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "924:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_memory_ptr", - "typeString": "struct Asset" - }, - "typeName": { - "id": 64, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 63, - "name": "Asset", - "nodeType": "IdentifierPath", - "referencedDeclaration": 8, - "src": "924:5:0" - }, - "referencedDeclaration": 8, - "src": "924:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", - "typeString": "struct Asset" - } - }, - "visibility": "internal" - } - ], - "src": "923:14:0" - }, - "scope": 192, - "src": "865:103:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 94, - "nodeType": "Block", - "src": "1057:98:0", - "statements": [ - { - "assignments": [ - 78 - ], - "declarations": [ - { - "constant": false, - "id": 78, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1070:6:0", - "nodeType": "VariableDeclaration", - "scope": 94, - "src": "1065:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 77, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1065:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 82, - "initialValue": { - "baseExpression": { - "id": 79, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1079:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 81, - "indexExpression": { - "id": 80, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "1091:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1079:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1065:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 84, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "1110:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 83, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1102:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 85, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1102:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 86, - "nodeType": "ExpressionStatement", - "src": "1102:15:0" - }, - { - "expression": { - "id": 92, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 87, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1126:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 89, - "indexExpression": { - "id": 88, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "1133:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1126:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 90, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1126:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 91, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1146:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1126:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 93, - "nodeType": "ExpressionStatement", - "src": "1126:24:0" - } - ] - }, - "functionSelector": "5e82d0a6", - "id": 95, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lockAsset", - "nameLocation": "1020:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 75, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "id", - "nameLocation": "1046:2:0", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "1030:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 73, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1030:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1029:20:0" - }, - "returnParameters": { - "id": 76, - "nodeType": "ParameterList", - "parameters": [], - "src": "1057:0:0" - }, - "scope": 192, - "src": "1011:144:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 117, - "nodeType": "Block", - "src": "1248:99:0", - "statements": [ - { - "assignments": [ - 101 - ], - "declarations": [ - { - "constant": false, - "id": 101, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1261:6:0", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "1256:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 100, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1256:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 105, - "initialValue": { - "baseExpression": { - "id": 102, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1270:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 104, - "indexExpression": { - "id": 103, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 97, - "src": "1282:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1270:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1256:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 107, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 101, - "src": "1301:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 106, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1293:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1293:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 109, - "nodeType": "ExpressionStatement", - "src": "1293:15:0" - }, - { - "expression": { - "id": 115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 110, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1317:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 112, - "indexExpression": { - "id": 111, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 97, - "src": "1324:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1317:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 113, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1317:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1337:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1317:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 116, - "nodeType": "ExpressionStatement", - "src": "1317:25:0" - } - ] - }, - "functionSelector": "def60e0d", - "id": 118, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "unLockAsset", - "nameLocation": "1209:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 98, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 97, - "mutability": "mutable", - "name": "id", - "nameLocation": "1237:2:0", - "nodeType": "VariableDeclaration", - "scope": 118, - "src": "1221:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 96, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1221:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1220:20:0" - }, - "returnParameters": { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "1248:0:0" - }, - "scope": 192, - "src": "1200:147:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 155, - "nodeType": "Block", - "src": "1399:262:0", - "statements": [ - { - "assignments": [ - 124 - ], - "declarations": [ - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1412:6:0", - "nodeType": "VariableDeclaration", - "scope": 155, - "src": "1407:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 123, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1407:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 128, - "initialValue": { - "baseExpression": { - "id": 125, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1421:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 127, - "indexExpression": { - "id": 126, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1433:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1421:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1407:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 130, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "1452:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 129, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1444:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1444:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 132, - "nodeType": "ExpressionStatement", - "src": "1444:15:0" - }, - { - "assignments": [ - 134 - ], - "declarations": [ - { - "constant": false, - "id": 134, - "mutability": "mutable", - "name": "assetIsLocked", - "nameLocation": "1536:13:0", - "nodeType": "VariableDeclaration", - "scope": 155, - "src": "1531:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 133, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1531:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 139, - "initialValue": { - "expression": { - "baseExpression": { - "id": 135, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1552:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 137, - "indexExpression": { - "id": 136, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1559:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1552:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 138, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1552:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1531:38:0" - }, - { - "expression": { - "arguments": [ - { - "id": 141, - "name": "assetIsLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 134, - "src": "1585:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 140, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1577:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1577:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 143, - "nodeType": "ExpressionStatement", - "src": "1577:22:0" - }, - { - "expression": { - "id": 147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "1608:17:0", - "subExpression": { - "baseExpression": { - "id": 144, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1615:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 146, - "indexExpression": { - "id": 145, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1622:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1615:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 148, - "nodeType": "ExpressionStatement", - "src": "1608:17:0" - }, - { - "expression": { - "id": 153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 149, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1633:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 151, - "indexExpression": { - "id": 150, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1645:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1633:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 152, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1651:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1633:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 154, - "nodeType": "ExpressionStatement", - "src": "1633:23:0" - } - ] - }, - "functionSelector": "e24aa37c", - "id": 156, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deleteAsset", - "nameLocation": "1360:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 121, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 120, - "mutability": "mutable", - "name": "id", - "nameLocation": "1388:2:0", - "nodeType": "VariableDeclaration", - "scope": 156, - "src": "1372:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 119, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1372:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1371:20:0" - }, - "returnParameters": { - "id": 122, - "nodeType": "ParameterList", - "parameters": [], - "src": "1399:0:0" - }, - "scope": 192, - "src": "1351:310:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 167, - "nodeType": "Block", - "src": "1731:35:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 163, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1746:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 165, - "indexExpression": { - "id": 164, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 158, - "src": "1758:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1746:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 162, - "id": 166, - "nodeType": "Return", - "src": "1739:22:0" - } - ] - }, - "functionSelector": "bc548275", - "id": 168, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isPresent", - "nameLocation": "1674:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 159, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 158, - "mutability": "mutable", - "name": "id", - "nameLocation": "1700:2:0", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "1684:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 157, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1684:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1683:20:0" - }, - "returnParameters": { - "id": 162, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 161, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "1725:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 160, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1725:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "1724:6:0" - }, - "scope": 192, - "src": "1665:101:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 190, - "nodeType": "Block", - "src": "1840:161:0", - "statements": [ - { - "assignments": [ - 176 - ], - "declarations": [ - { - "constant": false, - "id": 176, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1853:6:0", - "nodeType": "VariableDeclaration", - "scope": 190, - "src": "1848:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 175, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1848:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 180, - "initialValue": { - "baseExpression": { - "id": 177, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1862:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 179, - "indexExpression": { - "id": 178, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 170, - "src": "1874:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1862:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1848:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 182, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "1893:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 181, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1885:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1885:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 184, - "nodeType": "ExpressionStatement", - "src": "1885:15:0" - }, - { - "expression": { - "expression": { - "baseExpression": { - "id": 185, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1979:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 187, - "indexExpression": { - "id": 186, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 170, - "src": "1986:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1979:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 188, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1979:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 174, - "id": 189, - "nodeType": "Return", - "src": "1972:24:0" - } - ] - }, - "functionSelector": "1ae4eb68", - "id": 191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isAssetLocked", - "nameLocation": "1779:13:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 170, - "mutability": "mutable", - "name": "id", - "nameLocation": "1809:2:0", - "nodeType": "VariableDeclaration", - "scope": 191, - "src": "1793:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 169, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1793:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1792:20:0" - }, - "returnParameters": { - "id": 174, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 173, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 191, - "src": "1834:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 172, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1834:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "1833:6:0" - }, - "scope": 192, - "src": "1770:231:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 193, - "src": "543:1460:0", - "usedErrors": [] - } - ], - "src": "413:1591:0" - }, - "functionHashes": { - "createAsset(string,uint256)": "db9cc410", - "deleteAsset(string)": "e24aa37c", - "getAsset(string)": "cd5286d0", - "isAssetLocked(string)": "1ae4eb68", - "isPresent(string)": "bc548275", - "lockAsset(string)": "5e82d0a6", - "unLockAsset(string)": "def60e0d" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "305800", - "executionCost": "343", - "totalCost": "306143" - }, - "external": { - "createAsset(string,uint256)": "infinite", - "deleteAsset(string)": "infinite", - "getAsset(string)": "infinite", - "isAssetLocked(string)": "infinite", - "isPresent(string)": "infinite", - "lockAsset(string)": "infinite", - "unLockAsset(string)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol deleted file mode 100644 index 35378109d7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol +++ /dev/null @@ -1,70 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; -struct Asset{ - address creator; - bool isLock; - uint size; -} -//TODO: DETEMINE CALLDATA VS MEMORY -contract LockAsset { - mapping (string => Asset) assets; - mapping (string => bool) assetExists; - - function createAsset( string calldata id, uint size) public{ - require(size>0); - assets[id].size= size; - assets[id].creator = msg.sender; - assets[id].isLock = false; - assetExists[id] = true; - } - - function getAsset(string calldata id) public view returns (Asset memory) { - return assets[id]; - } - - //Don't care if it is already locked - function lockAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - assets[id].isLock = true; - } - - //Don't care if it is already unlocked - function unLockAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - assets[id].isLock = false; - } - - function deleteAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - //an asset could only be deleted if it is already locked - bool assetIsLocked = assets[id].isLock; - require(assetIsLocked); - - delete assets[id]; - assetExists[id] = false; - } - - function isPresent(string calldata id) public view returns (bool) { - return assetExists[id]; - } - - function isAssetLocked(string calldata id) public view returns (bool) { - bool exists = assetExists[id]; - require(exists); - - //an asset could only be deleted if it is already locked - return assets[id].isLock; - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore deleted file mode 100644 index 79bfe1a3e0..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# - - -# Coverage directory used by tools like istanbul -coverage - -# Dependency directories -node_modules/ -jspm_packages/ -package-lock.json - -# Compiled TypeScript files -dist - diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json deleted file mode 100644 index d8f1c89341..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "asset-transfer-basic", - "version": "1.0.0", - "description": "Asset Transfer Basic contract implemented in TypeScript", - "main": "dist/index.js", - "typings": "dist/index.d.ts", - "engines": { - "node": ">=12", - "npm": ">=5" - }, - "scripts": { - "lint": "tslint -c tslint.json 'src/**/*.ts'", - "pretest": "npm run lint", - "test": "nyc mocha -r ts-node/register src/**/*.spec.ts", - "start": "fabric-chaincode-node start", - "build": "tsc", - "build:watch": "tsc -w", - "prepublishOnly": "npm run build" - }, - "engineStrict": true, - "author": "Hyperledger", - "license": "Apache-2.0", - "dependencies": { - "fabric-contract-api": "2.2.2", - "fabric-shim": "2.2.2" - }, - "devDependencies": { - "@types/chai": "4.3.0", - "@types/mocha": "5.2.7", - "@types/node": "18.11.9", - "@types/sinon": "5.0.7", - "@types/sinon-chai": "3.2.8", - "chai": "4.3.6", - "mocha": "5.2.0", - "nyc": "14.1.1", - "sinon": "7.5.0", - "sinon-chai": "3.7.0", - "ts-node": "7.0.1", - "tslint": "5.20.1", - "typescript": "5.5.2" - }, - "nyc": { - "extension": [ - ".ts", - ".tsx" - ], - "exclude": [ - "coverage/**", - "dist/**" - ], - "reporter": [ - "text-summary", - "html" - ], - "all": true, - "check-coverage": true, - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts deleted file mode 100644 index f93f19710e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { Object, Property } from "fabric-contract-api"; - -@Object() -export class Asset { - @Property() - public docType?: string; - - @Property() - public ID: string; - - @Property() - public isLocked: boolean; - - @Property() - public size: number; -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts deleted file mode 100644 index a98006bfa5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts +++ /dev/null @@ -1,182 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { - Context, - Contract, - Info, - Returns, - Transaction, -} from "fabric-contract-api"; -import { Asset } from "./asset"; - -@Info({ - title: "AssetTransfer", - description: "Smart contract for trading assets", -}) -export class AssetTransferContract extends Contract { - @Transaction() - public async InitLedger(ctx: Context): Promise { - const assets: Asset[] = [ - { - ID: "asset1", - size: 5, - isLocked: false, - }, - { - ID: "asset2", - size: 5, - isLocked: false, - }, - ]; - - for (const asset of assets) { - asset.docType = "asset"; - await ctx.stub.putState(asset.ID, Buffer.from(JSON.stringify(asset))); - console.info(`Asset ${asset.ID} initialized`); - } - } - - // CreateAsset issues a new asset to the world state with given details. - @Transaction() - public async CreateAsset( - ctx: Context, - id: string, - size: number, - ): Promise { - const asset: Asset = { - ID: id, - size: size, - isLocked: false, - }; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // ReadAsset returns the asset stored in the world state with given id. - @Transaction(false) - public async ReadAsset(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); // get the asset from chaincode state - if (!assetJSON || assetJSON.length === 0) { - throw new Error(`The asset ${id} does not exist`); - } - return assetJSON.toString(); - } - - // UpdateAsset updates an existing asset in the world state with provided parameters. - @Transaction() - public async UpdateAsset( - ctx: Context, - id: string, - size: number, - ): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - if (this.IsAssetLocked(ctx, id)) { - throw new Error(`The asset ${id} is locked`); - } - - // overwriting original asset with new asset - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.size = size; - return ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // DeleteAsset deletes an given asset from the world state. - @Transaction() - public async DeleteAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - return ctx.stub.deleteState(id); - } - - // AssetExists returns true when asset with given ID exists in world state. - @Transaction(false) - @Returns("boolean") - public async AssetExists(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - return assetJSON && assetJSON.length > 0; - } - - // IsAssetLocked returns true when asset with given ID is locked in world state. - @Transaction(false) - @Returns("boolean") - public async IsAssetLocked(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - - if (assetJSON && assetJSON.length > 0) { - const asset = JSON.parse(assetJSON.toString()); - return asset.isLocked; - } else { - throw new Error(`The asset ${id} does not exist`); - } - } - - @Transaction(false) - @Returns("boolean") - public async LockAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - // if (this.IsAssetLocked(ctx, id)) { - // throw new Error(`The asset ${id} is already locked`); - // } - - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.isLocked = true; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return true; - } - - @Transaction(false) - @Returns("boolean") - public async UnlockAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.isLocked = false; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return true; - } - - // GetAllAssets returns all assets found in the world state. - @Transaction(false) - @Returns("string") - public async GetAllAssets(ctx: Context): Promise { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - const strValue = Buffer.from(result.value.value.toString()).toString( - "utf8", - ); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push({ Key: result.value.key, Record: record }); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts deleted file mode 100644 index 020a09f410..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { AssetTransferContract } from "./assetTransfer"; - -export { AssetTransferContract } from "./assetTransfer"; - -export const contracts: any[] = [AssetTransferContract]; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json deleted file mode 100644 index 80d8e12d8c..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "outDir": "dist", - "target": "es2017", - "moduleResolution": "node", - "module": "commonjs", - "declaration": true, - "sourceMap": true - }, - "include": [ - "./src/**/*" - ], - "exclude": [ - "./src/**/*.spec.ts" - ] -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts deleted file mode 100644 index 56b53352a8..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts +++ /dev/null @@ -1,816 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ClientV1Request } from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { PluginSatpGateway } from "../../../main/typescript/gateway/plugin-satp-gateway"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; - -import { makeSessionDataChecks } from "../make-checks"; -import { - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { - BesuSatpGateway, - IBesuSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../knex.config"; - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; - -let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -const backupGatewayKeys = Secp256k1Keys.generateKeyPairsBuffer(); - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "satpTestWithBackupGateway", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: org1Env, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 10000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).not.toBeUndefined(); - expect(parseInt(balance, 10)).toBe(10e9); - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } - { - // Gateways configuration - const allowedGateways = []; - allowedGateways.push( - PluginSatpGateway.bufArray2HexStr(backupGatewayKeys.publicKey), - ); - - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - backupGatewaysAllowed: allowedGateways, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("client gateway crashes after lock fabric asset", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - const lockEvidenceRequest = - await pluginSourceGateway.clientHelper.sendLockEvidenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (lockEvidenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequest, - pluginRecipientGateway, - ); - - const lockEvidenceResponse = - await pluginRecipientGateway.serverHelper.sendLockEvidenceResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (lockEvidenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - // now we simulate the crash of the client gateway - pluginSourceGateway.localRepository?.destroy(); - await Servers.shutdown(sourceGatewayServer); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - await Servers.listen(listenOptions); - - // Backup gateway configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: backupGatewayKeys, - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - - // backup client gateway back online - await pluginSourceGateway.recoverOpenSessions(true); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); - - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(false); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(true); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts deleted file mode 100644 index fa5743855f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts +++ /dev/null @@ -1,832 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ClientV1Request } from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; - -import { makeSessionDataChecks } from "../make-checks"; -import { - IFabricSatpGatewayConstructorOptions, - FabricSatpGateway, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { - IBesuSatpGatewayConstructorOptions, - BesuSatpGateway, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../knex.config"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; - -let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "satpTestWithLedgerConnectors", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: org1Env, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 10000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).not.toBeUndefined(); - expect(parseInt(balance, 10)).toBe(10e9); - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } - { - // Gateways configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("client gateway crashes after deleting fabric asset", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - const lockEvidenceRequest = - await pluginSourceGateway.clientHelper.sendLockEvidenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (lockEvidenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequest, - pluginRecipientGateway, - ); - - const lockEvidenceResponse = - await pluginRecipientGateway.serverHelper.sendLockEvidenceResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (lockEvidenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - const commitPreparationRequest = - await pluginSourceGateway.clientHelper.sendCommitPreparationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitPreparationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitPreparationRequest( - commitPreparationRequest, - pluginRecipientGateway, - ); - - const commitPreparationResponse = - await pluginRecipientGateway.serverHelper.sendCommitPreparationResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (commitPreparationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.deleteAsset(sessionID); - - // now we simulate the crash of the client gateway - pluginSourceGateway.localRepository?.destroy(); - await Servers.shutdown(sourceGatewayServer); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - await Servers.listen(listenOptions); - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - await pluginSourceGateway.registerWebServices(expressApp); - - // client gateway self-healed and is back online - await pluginSourceGateway.recoverOpenSessions(true); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); - - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(false); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(true); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts deleted file mode 100644 index 8ce74cc602..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts +++ /dev/null @@ -1,769 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ClientV1Request } from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; - -import { makeSessionDataChecks } from "../make-checks"; -import { - BesuSatpGateway, - IBesuSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../knex.config"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; - -let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "satpTestWithLedgerConnectors", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: org1Env, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 10000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).not.toBeUndefined(); - expect(parseInt(balance, 10)).toBe(10e9); - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } - { - // Gateways configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("client gateway crashes after lock fabric asset", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - // check if asset was successfully locked - expect(await pluginSourceGateway.isFabricAssetLocked(FABRIC_ASSET_ID)).toBe( - true, - ); - - // now we simulate the crash of the client gateway - pluginSourceGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - await Servers.shutdown(sourceGatewayServer); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - await Servers.listen(listenOptions); - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - await pluginSourceGateway.registerWebServices(expressApp); - - // client gateway self-healed and is back online - await pluginSourceGateway.recoverOpenSessions(true); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); - - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(false); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(true); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts deleted file mode 100644 index 7222bbffd7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts +++ /dev/null @@ -1,248 +0,0 @@ -import http, { Server } from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import bodyParser from "body-parser"; -import express, { Express } from "express"; -import { - IListenOptions, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { - IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, -} from "../../../main/typescript/gateway/plugin-satp-gateway"; -import { - AssetProfile, - ClientV1Request, -} from "../../../main/typescript/public-api"; -import { makeSessionDataChecks } from "../make-checks"; - -import { BesuSatpGateway } from "../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -let serverGatewayPluginOptions: IPluginSatpGatewayConstructorOptions; -let clientGatewayPluginOptions: IPluginSatpGatewayConstructorOptions; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; - -let sourceGatewayServer: Server; -let recipientGatewayserver: Server; - -let serverGatewayApiHost: string; -let clientGatewayApiHost: string; - -let clientRequest: ClientV1Request; - -let serverExpressApp: Express; -let serverListenOptions: IListenOptions; - -let clientExpressApp: Express; -let clientListenOptions: IListenOptions; - -beforeAll(async () => { - { - // Server Gateway configuration - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - serverExpressApp = express(); - serverExpressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayserver = http.createServer(serverExpressApp); - serverListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: recipientGatewayserver, - }; - - const addressInfo = (await Servers.listen( - serverListenOptions, - )) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - await pluginRecipientGateway.localRepository?.reset(); - - await pluginRecipientGateway.registerWebServices(serverExpressApp); - } - { - // Client Gateway configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - clientExpressApp = express(); - clientExpressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(clientExpressApp); - clientListenOptions = { - hostname: "127.0.0.1", - port: 2000, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen( - clientListenOptions, - )) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - - if (pluginSourceGateway.localRepository?.database == undefined) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - - await pluginSourceGateway.registerWebServices(clientExpressApp); - - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - clientRequest = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - } -}); - -test("successful run ODAP after client gateway crashed after after receiving transfer initiation response", async () => { - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - // now we simulate the crash of the client gateway - pluginSourceGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - await Servers.shutdown(sourceGatewayServer); - - clientExpressApp = express(); - clientExpressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(clientExpressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 2000, - server: sourceGatewayServer, - }; - - await Servers.listen(listenOptions); - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - await pluginSourceGateway.registerWebServices(clientExpressApp); - - // client gateway self-healed and is back online - await pluginSourceGateway.recoverOpenSessions(true); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); -}); - -afterAll(async () => { - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayserver); - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts deleted file mode 100644 index 3a006161b4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts +++ /dev/null @@ -1,644 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - ClientV1Request, - DefaultApi as SatpApi, -} from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { makeSessionDataChecks } from "../make-checks"; -import { - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { - BesuSatpGateway, - IBesuSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; -import { knexRemoteConnection } from "../knex.config"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "satpTestWithLedgerConnectors", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: org1Env, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 15000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [ - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ], - ]), - logLevel, - }); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } - - { - // Gateways configuration - const clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - const serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("runs ODAP between two gateways via openApi", async () => { - const satpApiConfig = new Configuration({ - basePath: clientGatewayApiHost, - }); - const apiClient = new SatpApi(satpApiConfig); - - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const res = await apiClient.clientRequestV1(clientRequest); - expect(res.status).toBe(200); - - expect(pluginSourceGateway.sessions.size).toBe(1); - expect(pluginRecipientGateway.sessions.size).toBe(1); - - const [sessionID] = pluginSourceGateway.sessions.keys(); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(false); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(true); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts deleted file mode 100644 index 7872b5517f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts +++ /dev/null @@ -1,171 +0,0 @@ -import http, { Server } from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import bodyParser from "body-parser"; -import express from "express"; -import { DefaultApi as SatpApi } from "../../../main/typescript/public-api"; - -import { IListenOptions, Servers } from "@hyperledger/cactus-common"; - -import { Configuration } from "@hyperledger/cactus-core-api"; - -import { - PluginSatpGateway, - IPluginSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/plugin-satp-gateway"; -import { - AssetProfile, - ClientV1Request, -} from "../../../main/typescript/public-api"; -import { makeSessionDataChecks } from "../make-checks"; - -import { BesuSatpGateway } from "../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; -import { knexRemoteConnection } from "../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -let sourceGatewayServer: Server; -let recipientGatewayserver: Server; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; - -test("runs ODAP between two gateways via openApi", async () => { - const clientGatewayPluginOptions: IPluginSatpGatewayConstructorOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - const serverGatewayPluginOptions: IPluginSatpGatewayConstructorOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - let serverGatewayApiHost: string; - - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayserver = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: recipientGatewayserver, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 2000, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - const clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - - const satpApiConfig = new Configuration({ - basePath: clientGatewayApiHost, - }); - const apiClient = new SatpApi(satpApiConfig); - - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - const res = await apiClient.clientRequestV1(clientRequest); - expect(res.status).toBe(200); - } - - expect(pluginSourceGateway.sessions.size).toBe(1); - expect(pluginRecipientGateway.sessions.size).toBe(1); - - const [sessionID] = pluginSourceGateway.sessions.keys(); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); -}); - -afterAll(async () => { - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayserver); - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts deleted file mode 100644 index b932b4378b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts +++ /dev/null @@ -1,858 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - DEFAULT_FABRIC_2_AIO_IMAGE_VERSION, - DEFAULT_FABRIC_2_AIO_FABRIC_VERSION, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ClientV1Request } from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; - -import { - IFabricSatpGatewayConstructorOptions, - FabricSatpGateway, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { - IBesuSatpGatewayConstructorOptions, - BesuSatpGateway, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; -import { knexRemoteConnection } from "../knex.config"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "odap-rollback-after-crash-test", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: DEFAULT_FABRIC_2_AIO_IMAGE_VERSION, - envVars: new Map([ - ["FABRIC_VERSION", DEFAULT_FABRIC_2_AIO_FABRIC_VERSION], - ]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: org1Env, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 10000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).not.toBeUndefined(); - expect(parseInt(balance, 10)).toBe(10e9); - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } - { - // Gateways configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("client sends rollback message at the end of the protocol", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - const lockEvidenceRequest = - await pluginSourceGateway.clientHelper.sendLockEvidenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (lockEvidenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequest, - pluginRecipientGateway, - ); - - const lockEvidenceResponse = - await pluginRecipientGateway.serverHelper.sendLockEvidenceResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (lockEvidenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - const commitPreparationRequest = - await pluginSourceGateway.clientHelper.sendCommitPreparationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitPreparationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitPreparationRequest( - commitPreparationRequest, - pluginRecipientGateway, - ); - - const commitPreparationResponse = - await pluginRecipientGateway.serverHelper.sendCommitPreparationResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (commitPreparationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.deleteAsset(sessionID); - - const commitFinalRequest = - await pluginSourceGateway.clientHelper.sendCommitFinalRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitFinalRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitFinalRequest( - commitFinalRequest, - pluginRecipientGateway, - ); - - await pluginRecipientGateway.createAsset(sessionID); - - const r1 = await pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID); - const r2 = await pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID); - console.log(r1); - console.log(r2); - // now we simulate the crash of the client gateway - pluginSourceGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - await Servers.shutdown(sourceGatewayServer); - - await new Promise((resolve) => setTimeout(resolve, 5000)); - - // the server gateway sends the message and the - // rollback will be triggered after the timeout - await pluginRecipientGateway.serverHelper - .sendCommitFinalResponse(sessionID, pluginRecipientGateway, true) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); - - // the client is back online and rollback after seeing the counterparty rollback - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - await Servers.listen(listenOptions); - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - await pluginSourceGateway.registerWebServices(expressApp); - - await pluginSourceGateway.recoverOpenSessions(true); - - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(true); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(false); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts deleted file mode 100644 index 1ff28ee2f1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts +++ /dev/null @@ -1,295 +0,0 @@ -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSatpGateway } from "../../../main/typescript/gateway/plugin-satp-gateway"; - -import { - AssetProfile, - ClientV1Request, -} from "../../../main/typescript/public-api"; -import { makeSessionDataChecks } from "../make-checks"; - -import { BesuSatpGateway } from "../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; -import { knexRemoteConnection } from "../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; - -test("successful run ODAP instance", async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - const dummyPath = { apiHost: "dummyPath" }; - - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: dummyPath, - serverGatewayConfiguration: dummyPath, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: uuidV4(), - recipientLedgerAssetID: uuidV4(), - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - const lockEvidenceRequest = - await pluginSourceGateway.clientHelper.sendLockEvidenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (lockEvidenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequest, - pluginRecipientGateway, - ); - - const lockEvidenceResponse = - await pluginRecipientGateway.serverHelper.sendLockEvidenceResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (lockEvidenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - const commitPreparationRequest = - await pluginSourceGateway.clientHelper.sendCommitPreparationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitPreparationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitPreparationRequest( - commitPreparationRequest, - pluginRecipientGateway, - ); - - const commitPreparationResponse = - await pluginRecipientGateway.serverHelper.sendCommitPreparationResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (commitPreparationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.deleteAsset(sessionID); - - const commitFinalRequest = - await pluginSourceGateway.clientHelper.sendCommitFinalRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitFinalRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitFinalRequest( - commitFinalRequest, - pluginRecipientGateway, - ); - - await pluginRecipientGateway.createAsset(sessionID); - - const commitFinalResponse = - await pluginRecipientGateway.serverHelper.sendCommitFinalResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (commitFinalResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidCommitFinalResponse( - commitFinalResponse, - pluginSourceGateway, - ); - - const transferCompleteRequest = - await pluginSourceGateway.clientHelper.sendTransferCompleteRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCompleteRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidTransferCompleteRequest( - transferCompleteRequest, - pluginRecipientGateway, - ); - - expect(pluginSourceGateway.sessions.size).toBe(1); - expect(pluginRecipientGateway.sessions.size).toBe(1); - - const [sessionId] = pluginSourceGateway.sessions.keys(); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionId, - ); -}); - -afterAll(async () => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts deleted file mode 100644 index beeda4d4b0..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts +++ /dev/null @@ -1,855 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ClientV1Request } from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import Web3 from "web3"; - -import { makeSessionDataChecks } from "../make-checks"; -import { - BesuSatpGateway, - IBesuSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../knex.config"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; - -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "satpTestWithLedgerConnectors", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: org1Env, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 15000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).not.toBeUndefined(); - expect(parseInt(balance, 10)).toBe(10e9); - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } -}); - -beforeEach(async () => { - { - // Gateways configuration - const clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("server gateway crashes after creating besu asset", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - const lockEvidenceRequest = - await pluginSourceGateway.clientHelper.sendLockEvidenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (lockEvidenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequest, - pluginRecipientGateway, - ); - - const lockEvidenceResponse = - await pluginRecipientGateway.serverHelper.sendLockEvidenceResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (lockEvidenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - const commitPreparationRequest = - await pluginSourceGateway.clientHelper.sendCommitPreparationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitPreparationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitPreparationRequest( - commitPreparationRequest, - pluginRecipientGateway, - ); - - const commitPreparationResponse = - await pluginRecipientGateway.serverHelper.sendCommitPreparationResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (commitPreparationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.deleteAsset(sessionID); - - const commitFinalRequest = - await pluginSourceGateway.clientHelper.sendCommitFinalRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitFinalRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitFinalRequest( - commitFinalRequest, - pluginRecipientGateway, - ); - - await pluginRecipientGateway.createAsset(sessionID); - - // now we simulate the crash of the server gateway - pluginRecipientGateway.localRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - await Servers.shutdown(recipientGatewayServer); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - await Servers.listen(listenOptions); - - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - await pluginRecipientGateway.registerWebServices(expressApp); - - // client gateway self-healed and is back online - await pluginRecipientGateway.recoverOpenSessions(true); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); - - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(false); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(true); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - await pluginSourceGateway.localRepository?.destroy(); - await pluginRecipientGateway.localRepository?.destroy(); - await pluginSourceGateway.remoteRepository?.destroy(); - await pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts deleted file mode 100644 index 7e22aa5441..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts +++ /dev/null @@ -1,228 +0,0 @@ -import http, { Server } from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import bodyParser from "body-parser"; -import express, { Express } from "express"; -import { - IListenOptions, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; - -import { - AssetProfile, - ClientV1Request, -} from "../../../main/typescript/public-api"; -import { makeSessionDataChecks } from "../make-checks"; -import { - IFabricSatpGatewayConstructorOptions, - FabricSatpGateway, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { - IBesuSatpGatewayConstructorOptions, - BesuSatpGateway, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; - -import { knexClientConnection, knexRemoteConnection } from "../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; - -let sourceGatewayServer: Server; -let recipientGatewayserver: Server; - -let serverGatewayApiHost: string; -let clientGatewayApiHost: string; - -let clientRequest: ClientV1Request; - -let serverExpressApp: Express; -let serverListenOptions: IListenOptions; - -let clientExpressApp: Express; -let clientListenOptions: IListenOptions; - -beforeAll(async () => { - { - // Server Gateway configuration - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - serverExpressApp = express(); - serverExpressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayserver = http.createServer(serverExpressApp); - serverListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: recipientGatewayserver, - }; - - const addressInfo = (await Servers.listen( - serverListenOptions, - )) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - await pluginRecipientGateway.localRepository?.reset(); - - await pluginRecipientGateway.registerWebServices(serverExpressApp); - } - { - // Client Gateway configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - knexLocalConfig: knexClientConnection, - }; - - clientExpressApp = express(); - clientExpressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(clientExpressApp); - clientListenOptions = { - hostname: "127.0.0.1", - port: 2000, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen( - clientListenOptions, - )) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - - if (pluginSourceGateway.localRepository?.database == undefined) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - - await pluginSourceGateway.registerWebServices(clientExpressApp); - - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - clientRequest = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - } -}); - -test("server gateway crashes after transfer initiation flow", async () => { - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - // now we simulate the crash of the server gateway - pluginRecipientGateway.localRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - await Servers.shutdown(recipientGatewayserver); - - serverExpressApp = express(); - serverExpressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayserver = http.createServer(serverExpressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: recipientGatewayserver, - }; - - await Servers.listen(listenOptions); - - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); - await pluginRecipientGateway.registerWebServices(serverExpressApp); - - // server gateway self-healed and is back online - await pluginRecipientGateway.recoverOpenSessions(true); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); -}); - -afterAll(async () => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayserver); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts deleted file mode 100644 index 3376a92c91..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts +++ /dev/null @@ -1,32 +0,0 @@ -export const knexClientConnection = { - client: "sqlite3", - connection: { - filename: "./packages/cactus-plugin-satp-hermes/knex/.dev.client.sqlite3", - }, - migrations: { - directory: "./packages/cactus-plugin-satp-hermes/knex/migrations", - }, - useNullAsDefault: true, -}; - -export const knexServerConnection = { - client: "sqlite3", - connection: { - filename: "./packages/cactus-plugin-satp-hermes/knex/.dev.server.sqlite3", - }, - migrations: { - directory: "./packages/cactus-plugin-satp-hermes/knex/migrations", - }, - useNullAsDefault: true, -}; - -export const knexRemoteConnection = { - client: "sqlite3", - connection: { - filename: "./packages/cactus-plugin-satp-hermes/knex/.dev.remote.sqlite3", - }, - migrations: { - directory: "./packages/cactus-plugin-satp-hermes/knex/migrations", - }, - useNullAsDefault: true, -}; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts deleted file mode 100644 index d82d6f39a1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts +++ /dev/null @@ -1,281 +0,0 @@ -import { PluginSatpGateway } from "../../main/typescript/gateway/plugin-satp-gateway"; - -export async function makeSessionDataChecks( - pluginSourceGateway: PluginSatpGateway, - pluginRecipientGateway: PluginSatpGateway, - sessionId: string, -): Promise { - const clientSessionData = pluginSourceGateway.sessions.get(sessionId); - const serverSessionData = pluginRecipientGateway.sessions.get(sessionId); - - expect(clientSessionData).not.toBeUndefined(); - expect(serverSessionData).not.toBeUndefined(); - - expect(clientSessionData?.id).toBe(serverSessionData?.id); - expect(clientSessionData?.id).toBe(sessionId); - - expect(clientSessionData?.loggingProfile).toBe( - serverSessionData?.loggingProfile, - ); - - expect(clientSessionData?.accessControlProfile).toBe( - serverSessionData?.accessControlProfile, - ); - - expect(clientSessionData?.applicationProfile).toBe( - serverSessionData?.applicationProfile, - ); - - expect(JSON.stringify(clientSessionData?.assetProfile)).toBe( - JSON.stringify(serverSessionData?.assetProfile), - ); - - expect(clientSessionData?.sourceGatewayPubkey).toBe( - serverSessionData?.sourceGatewayPubkey, - ); - - expect(clientSessionData?.sourceGatewayDltSystem).toBe( - serverSessionData?.sourceGatewayDltSystem, - ); - - expect(clientSessionData?.recipientGatewayPubkey).toBe( - serverSessionData?.recipientGatewayPubkey, - ); - - expect(clientSessionData?.recipientGatewayDltSystem).toBe( - serverSessionData?.recipientGatewayDltSystem, - ); - - expect(clientSessionData?.initializationRequestMessageHash).toBe( - serverSessionData?.initializationRequestMessageHash, - ); - - expect(clientSessionData?.initializationResponseMessageHash).toBe( - serverSessionData?.initializationResponseMessageHash, - ); - - expect(clientSessionData?.clientSignatureInitializationRequestMessage).toBe( - serverSessionData?.clientSignatureInitializationRequestMessage, - ); - - expect(clientSessionData?.serverSignatureInitializationResponseMessage).toBe( - serverSessionData?.serverSignatureInitializationResponseMessage, - ); - - expect(clientSessionData?.transferCommenceMessageRequestHash).toBe( - serverSessionData?.transferCommenceMessageRequestHash, - ); - - expect(clientSessionData?.transferCommenceMessageResponseHash).toBe( - serverSessionData?.transferCommenceMessageResponseHash, - ); - - expect(clientSessionData?.clientSignatureTransferCommenceRequestMessage).toBe( - serverSessionData?.clientSignatureTransferCommenceRequestMessage, - ); - - expect( - clientSessionData?.serverSignatureTransferCommenceResponseMessage, - ).toBe(serverSessionData?.serverSignatureTransferCommenceResponseMessage); - - expect(clientSessionData?.lockEvidenceRequestMessageHash).toBe( - serverSessionData?.lockEvidenceRequestMessageHash, - ); - - expect(clientSessionData?.lockEvidenceResponseMessageHash).toBe( - serverSessionData?.lockEvidenceResponseMessageHash, - ); - - expect(clientSessionData?.clientSignatureLockEvidenceRequestMessage).toBe( - serverSessionData?.clientSignatureLockEvidenceRequestMessage, - ); - - expect(clientSessionData?.serverSignatureLockEvidenceResponseMessage).toBe( - serverSessionData?.serverSignatureLockEvidenceResponseMessage, - ); - - expect(clientSessionData?.lockEvidenceClaim).toBe( - serverSessionData?.lockEvidenceClaim, - ); - - expect(clientSessionData?.commitPrepareRequestMessageHash).toBe( - serverSessionData?.commitPrepareRequestMessageHash, - ); - - expect(clientSessionData?.commitPrepareResponseMessageHash).toBe( - serverSessionData?.commitPrepareResponseMessageHash, - ); - - expect( - clientSessionData?.clientSignatureCommitPreparationRequestMessage, - ).toBe(serverSessionData?.clientSignatureCommitPreparationRequestMessage); - - expect( - clientSessionData?.serverSignatureCommitPreparationResponseMessage, - ).toBe(serverSessionData?.serverSignatureCommitPreparationResponseMessage); - - expect(clientSessionData?.commitFinalRequestMessageHash).toBe( - serverSessionData?.commitFinalRequestMessageHash, - ); - - expect(clientSessionData?.commitPrepareRequestMessageHash).toBe( - serverSessionData?.commitPrepareRequestMessageHash, - ); - - expect(clientSessionData?.commitFinalResponseMessageHash).toBe( - serverSessionData?.commitFinalResponseMessageHash, - ); - - expect(clientSessionData?.commitFinalClaim).toBe( - serverSessionData?.commitFinalClaim, - ); - - expect(clientSessionData?.commitFinalClaimFormat).toBe( - serverSessionData?.commitFinalClaimFormat, - ); - - expect(clientSessionData?.commitAcknowledgementClaim).toBe( - serverSessionData?.commitAcknowledgementClaim, - ); - - expect(clientSessionData?.commitAcknowledgementClaimFormat).toBe( - serverSessionData?.commitAcknowledgementClaimFormat, - ); - - expect(clientSessionData?.clientSignatureCommitFinalRequestMessage).toBe( - serverSessionData?.clientSignatureCommitFinalRequestMessage, - ); - - expect(clientSessionData?.serverSignatureCommitFinalResponseMessage).toBe( - serverSessionData?.serverSignatureCommitFinalResponseMessage, - ); - - expect(clientSessionData?.transferCompleteMessageHash).toBe( - serverSessionData?.transferCompleteMessageHash, - ); - - expect(clientSessionData?.clientSignatureTransferCompleteMessage).toBe( - serverSessionData?.clientSignatureTransferCompleteMessage, - ); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "validate"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "validate"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "validate"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "ack", "validate"), - ), - ).resolves.not.toBeUndefined(); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "commence"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "commence"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "commence"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "ack", "commence"), - ), - ).resolves.not.toBeUndefined(); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "lock"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "lock"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "lock"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "ack", "lock"), - ), - ).resolves.not.toBeUndefined(); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "prepare"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "prepare"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "prepare"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "ack", "prepare"), - ), - ).resolves.not.toBeUndefined(); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "final"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "final"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "final"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "ack", "final"), - ), - ).resolves.not.toBeUndefined(); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "complete"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "complete"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "complete"), - ), - ).resolves.not.toBeUndefined(); -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts deleted file mode 100644 index 5af9109a5d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts +++ /dev/null @@ -1,234 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidv4 } from "uuid"; -import { - SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; -import { - CommitFinalV1Response, - SessionData, -} from "../../../../main/typescript/public-api"; - -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { knexRemoteConnection } from "../../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const COMMIT_FINAL_REQUEST_MESSAGE_HASH = "dummyCommitFinalRequestMessageHash"; -const COMMIT_ACK_CLAIM = "dummyCommitAckClaim"; - -let sourceGatewayConstructor; -let recipientGatewayConstructor; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let sequenceNumber: number; -let sessionID: string; -let step: number; - -beforeEach(async () => { - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - sequenceNumber = randomInt(100); - sessionID = uuidv4(); - step = 1; - - const sessionData: SessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitFinalRequestMessageHash: COMMIT_FINAL_REQUEST_MESSAGE_HASH, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "create", - data: COMMIT_ACK_CLAIM, - }); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); -}); - -afterEach(async () => { - await pluginSourceGateway.localRepository?.destroy(); - await pluginRecipientGateway.localRepository?.destroy(); -}); - -test("valid commit final response", async () => { - const commitFinalResponse: CommitFinalV1Response = { - messageType: SatpMessageType.CommitFinalResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - commitAcknowledgementClaim: COMMIT_ACK_CLAIM, - hashCommitFinal: COMMIT_FINAL_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitFinalResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(commitFinalResponse)), - ); - - const messageHash = SHA256(JSON.stringify(commitFinalResponse)).toString(); - - await pluginSourceGateway.clientHelper.checkValidCommitFinalResponse( - commitFinalResponse, - pluginSourceGateway, - ); - - const retrievedSessionData = pluginSourceGateway.sessions.get(sessionID); - - if (retrievedSessionData == undefined) throw new Error("Test Failed."); - - expect(retrievedSessionData.id).toBe(sessionID); - expect(retrievedSessionData.commitAcknowledgementClaim).toBe( - COMMIT_ACK_CLAIM, - ); - expect(retrievedSessionData.commitFinalRequestMessageHash).toBe( - COMMIT_FINAL_REQUEST_MESSAGE_HASH, - ); - expect(retrievedSessionData.commitFinalResponseMessageHash).toBe(messageHash); -}); - -test("commit final response invalid because of wrong previous message hash", async () => { - const commitFinalResponse: CommitFinalV1Response = { - messageType: SatpMessageType.CommitFinalResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - commitAcknowledgementClaim: COMMIT_ACK_CLAIM, - hashCommitFinal: "wrongMessageHash", - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitFinalResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(commitFinalResponse)), - ); - - await pluginSourceGateway.clientHelper - .checkValidCommitFinalResponse(commitFinalResponse, pluginSourceGateway) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("commit final response invalid because of wrong signature", async () => { - const commitFinalResponse: CommitFinalV1Response = { - messageType: SatpMessageType.CommitFinalResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - commitAcknowledgementClaim: COMMIT_ACK_CLAIM, - hashCommitFinal: COMMIT_FINAL_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitFinalResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign("somethingWrong"), - ); - - await pluginSourceGateway.clientHelper - .checkValidCommitFinalResponse(commitFinalResponse, pluginSourceGateway) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("message signature verification failed"), - ); -}); - -test("timeout in commit final request because no server gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "", - recipientBasePath: "http://wrongpath", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitFinalClaim: "dummyCommitFinalClaim", - commitPrepareResponseMessageHash: "dummyCommitPrepareResponseMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.clientHelper - .sendCommitFinalRequest(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts deleted file mode 100644 index 283c6d75d4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts +++ /dev/null @@ -1,216 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidV4 } from "uuid"; -import { - IPluginSatpGatewayConstructorOptions, - SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; -import { - CommitPreparationV1Response, - SessionData, -} from "../../../../main/typescript/public-api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const COMMIT_PREPARATION_REQUEST_MESSAGE_HASH = - "dummyCommitPreparationRequestMessageHash"; - -let sourceGatewayConstructor: IPluginSatpGatewayConstructorOptions; -let recipientGatewayConstructor: IPluginSatpGatewayConstructorOptions; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let sequenceNumber: number; -let sessionID: string; -let step: number; - -beforeEach(async () => { - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - sequenceNumber = randomInt(100); - sessionID = uuidV4(); - step = 1; - - const sessionData: SessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitPrepareRequestMessageHash: COMMIT_PREPARATION_REQUEST_MESSAGE_HASH, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); -}); - -test("valid commit preparation response", async () => { - const commitPreparationResponse: CommitPreparationV1Response = { - messageType: SatpMessageType.CommitPreparationResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommitPrep: COMMIT_PREPARATION_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitPreparationResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign( - JSON.stringify(commitPreparationResponse), - ), - ); - - const messageHash = SHA256( - JSON.stringify(commitPreparationResponse), - ).toString(); - - await pluginSourceGateway.clientHelper.checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ); - - const retrievedSessionData = pluginSourceGateway.sessions.get(sessionID); - - if (retrievedSessionData == undefined) throw new Error("Test Failed."); - - expect(retrievedSessionData.id).toBe(sessionID); - expect(retrievedSessionData.commitPrepareResponseMessageHash).toBe( - messageHash, - ); - expect( - retrievedSessionData.serverSignatureCommitPreparationResponseMessage, - ).toBe(commitPreparationResponse.signature); -}); - -test("commit preparation response invalid because of wrong previous message hash", async () => { - const commitPreparationResponse: CommitPreparationV1Response = { - messageType: SatpMessageType.CommitPreparationResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommitPrep: "wrongMessageHash", - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitPreparationResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign( - JSON.stringify(commitPreparationResponse), - ), - ); - - await pluginSourceGateway.clientHelper - .checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("commit preparation response invalid because of wrong signature", async () => { - const commitPreparationResponse: CommitPreparationV1Response = { - messageType: SatpMessageType.CommitPreparationResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommitPrep: COMMIT_PREPARATION_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitPreparationResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign("somethingWrong"), - ); - - await pluginSourceGateway.clientHelper - .checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("message signature verification failed"), - ); -}); - -test("timeout in commit preparation request because no server gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "", - recipientBasePath: "http://wrongpath", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - lockEvidenceResponseMessageHash: "dummyLockEvidenceResponseMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.clientHelper - .sendCommitPreparationRequest(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts deleted file mode 100644 index 03d28603a5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts +++ /dev/null @@ -1,206 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidV4 } from "uuid"; -import { - SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; -import { - LockEvidenceV1Response, - SessionData, -} from "../../../../main/typescript/public-api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const LOCK_EVIDENCE_REQUEST_MESSAGE_HASH = - "dummyLockEvidenceRequestMessageHash"; - -let sourceGatewayConstructor; -let recipientGatewayConstructor; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let sequenceNumber: number; -let sessionID: string; -let step: number; - -beforeEach(async () => { - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - sequenceNumber = randomInt(100); - sessionID = uuidV4(); - step = 1; - - const sessionData: SessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - lockEvidenceRequestMessageHash: LOCK_EVIDENCE_REQUEST_MESSAGE_HASH, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); -}); - -test("valid lock evidence response", async () => { - const lockEvidenceResponse: LockEvidenceV1Response = { - messageType: SatpMessageType.LockEvidenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashLockEvidenceRequest: LOCK_EVIDENCE_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - lockEvidenceResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(lockEvidenceResponse)), - ); - - const messageHash = SHA256(JSON.stringify(lockEvidenceResponse)).toString(); - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - const retrievedSessionData = pluginSourceGateway.sessions.get(sessionID); - - if (retrievedSessionData == undefined) throw new Error("Test Failed."); - - expect(retrievedSessionData.id).toBe(sessionID); - expect(retrievedSessionData.lockEvidenceResponseMessageHash).toBe( - messageHash, - ); - expect(retrievedSessionData.serverSignatureLockEvidenceResponseMessage).toBe( - lockEvidenceResponse.signature, - ); -}); - -test("lock evidence response invalid because of wrong previous message hash", async () => { - const lockEvidenceResponse: LockEvidenceV1Response = { - messageType: SatpMessageType.LockEvidenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashLockEvidenceRequest: "wrongMessageHash", - signature: "", - sequenceNumber: sequenceNumber, - }; - - lockEvidenceResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(lockEvidenceResponse)), - ); - - await pluginSourceGateway.clientHelper - .checkValidLockEvidenceResponse(lockEvidenceResponse, pluginSourceGateway) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("lock evidence response invalid because of wrong signature", async () => { - const lockEvidenceResponse: LockEvidenceV1Response = { - messageType: SatpMessageType.LockEvidenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashLockEvidenceRequest: LOCK_EVIDENCE_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - lockEvidenceResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign("somethingWrong"), - ); - - await pluginSourceGateway.clientHelper - .checkValidLockEvidenceResponse(lockEvidenceResponse, pluginSourceGateway) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("message signature verification failed"), - ); -}); - -test("timeout in lock evidence request because no server gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "", - recipientBasePath: "http://wrongpath", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - transferCommenceMessageResponseHash: - "dummyTransferCommenceMessageResponseHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.lockAsset(sessionID); - - await pluginSourceGateway.clientHelper - .sendLockEvidenceRequest(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts deleted file mode 100644 index f695f62883..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts +++ /dev/null @@ -1,227 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidV4 } from "uuid"; -import { - SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; -import { - AssetProfile, - SessionData, - TransferCommenceV1Response, -} from "../../../../main/typescript/public-api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const COMMENCE_REQUEST_MESSAGE_HASH = "dummyCommenceRequestMessageHash"; - -let sourceGatewayConstructor; -let recipientGatewayConstructor; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let sequenceNumber: number; -let sessionID: string; -let step: number; - -beforeEach(async () => { - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - sequenceNumber = randomInt(100); - sessionID = uuidV4(); - step = 1; - - const sessionData: SessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - transferCommenceMessageRequestHash: COMMENCE_REQUEST_MESSAGE_HASH, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); -}); - -test("valid transfer commence response", async () => { - const transferCommenceResponse: TransferCommenceV1Response = { - messageType: SatpMessageType.TransferCommenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommenceRequest: COMMENCE_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(transferCommenceResponse)), - ); - - const messageHash = SHA256( - JSON.stringify(transferCommenceResponse), - ).toString(); - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - const retrievedSessionData = pluginSourceGateway.sessions.get(sessionID); - - if (retrievedSessionData == undefined) throw new Error("Test Failed."); - - expect(retrievedSessionData.id).toBe(sessionID); - expect(retrievedSessionData.transferCommenceMessageResponseHash).toBe( - messageHash, - ); - expect( - retrievedSessionData.serverSignatureTransferCommenceResponseMessage, - ).toBe(transferCommenceResponse.signature); -}); - -test("transfer commence response invalid because of wrong previous message hash", async () => { - const transferCommenceResponse: TransferCommenceV1Response = { - messageType: SatpMessageType.TransferCommenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommenceRequest: "wrongMessageHash", - signature: "", - sequenceNumber: sequenceNumber, - }; - - transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(transferCommenceResponse)), - ); - - await pluginSourceGateway.clientHelper - .checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("transfer commence response invalid because of wrong signature", async () => { - const transferCommenceResponse: TransferCommenceV1Response = { - messageType: SatpMessageType.TransferCommenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommenceRequest: COMMENCE_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign("somethingWrong"), - ); - - await pluginSourceGateway.clientHelper - .checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("message signature verification failed"), - ); -}); - -test("timeout in transfer commence request because no server gateway is connected", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const sessionData: SessionData = { - id: sessionID, - step: 1, - version: "0.0.0", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - loggingProfile: "dummyLoggingProfile", - sourceBasePath: "", - recipientBasePath: "http://wrongpath", - originatorPubkey: "http://wrongpath", - beneficiaryPubkey: "http://wrongpath", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - lastSequenceNumber: 77, - sourceGatewayDltSystem: "DLT1", - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - recipientGatewayDltSystem: "DLT2", - initializationResponseMessageHash: "dummyInitializationResponseMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.clientHelper - .sendTransferCommenceRequest(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts deleted file mode 100644 index d1f14ffc56..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts +++ /dev/null @@ -1,244 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidV4 } from "uuid"; -import { - SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; -import { - TransferInitializationV1Response, - SessionData, - AssetProfile, -} from "../../../../main/typescript/public-api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const INITIALIZATION_REQUEST_MESSAGE_HASH = - "dummyInitializationRequestMessageHash"; - -let sourceGatewayConstructor; -let recipientGatewayConstructor; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let sequenceNumber: number; -let sessionID: string; -let step: number; - -beforeEach(async () => { - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - sequenceNumber = randomInt(100); - sessionID = uuidV4(); - step = 1; - - const sessionData: SessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - initializationRequestMessageHash: INITIALIZATION_REQUEST_MESSAGE_HASH, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); -}); - -test("valid transfer initiation response", async () => { - const initializationResponseMessage: TransferInitializationV1Response = { - messageType: SatpMessageType.InitializationResponse, - sessionID: sessionID, - initialRequestMessageHash: INITIALIZATION_REQUEST_MESSAGE_HASH, - timeStamp: Date.now().toString(), - processedTimeStamp: Date.now().toString(), - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - sequenceNumber: sequenceNumber, - backupGatewaysAllowed: [], - }; - - initializationResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( - await pluginRecipientGateway.sign( - JSON.stringify(initializationResponseMessage), - ), - ); - - const messageHash = SHA256( - JSON.stringify(initializationResponseMessage), - ).toString(); - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - initializationResponseMessage, - pluginSourceGateway, - ); - - const retrievedSessionData = pluginSourceGateway.sessions.get(sessionID); - - if (retrievedSessionData == undefined) throw new Error("Test Failed."); - - expect(retrievedSessionData.id).toBe(sessionID); - expect(retrievedSessionData.recipientGatewayPubkey).toBe( - pluginRecipientGateway.pubKey, - ); - expect(retrievedSessionData.initializationRequestMessageHash).toBe( - INITIALIZATION_REQUEST_MESSAGE_HASH, - ); - expect(retrievedSessionData.initializationResponseMessageHash).toBe( - messageHash, - ); - expect( - retrievedSessionData.serverSignatureInitializationResponseMessage, - ).not.toBe(""); -}); - -test("transfer initiation response invalid because of wrong previous message hash", async () => { - const initializationResponseMessage: TransferInitializationV1Response = { - messageType: SatpMessageType.InitializationResponse, - sessionID: sessionID, - initialRequestMessageHash: "wrongMessageHash", - timeStamp: Date.now().toString(), - processedTimeStamp: Date.now().toString(), - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - sequenceNumber: sequenceNumber, - backupGatewaysAllowed: [], - }; - - initializationResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( - await pluginSourceGateway.sign( - JSON.stringify(initializationResponseMessage), - ), - ); - - await pluginSourceGateway.clientHelper - .checkValidInitializationResponse( - initializationResponseMessage, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("transfer initiation response invalid because it does not match transfer initialization request sessionID", async () => { - const initializationResponseMessage: TransferInitializationV1Response = { - messageType: SatpMessageType.InitializationResponse, - sessionID: uuidV4(), - initialRequestMessageHash: "wrongMessageHash", - timeStamp: Date.now().toString(), - processedTimeStamp: Date.now().toString(), - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - sequenceNumber: sequenceNumber, - backupGatewaysAllowed: [], - }; - - initializationResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( - await pluginSourceGateway.sign( - JSON.stringify(initializationResponseMessage), - ), - ); - - await pluginSourceGateway.clientHelper - .checkValidInitializationResponse( - initializationResponseMessage, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("session data is undefined"), - ); -}); - -test("timeout in transfer initiation request because no server gateway is connected", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const sessionData: SessionData = { - id: sessionID, - step: 1, - version: "0.0.0", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - loggingProfile: "dummyLoggingProfile", - sourceBasePath: "", - recipientBasePath: "http://wrongpath", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - lastSequenceNumber: 77, - sourceGatewayDltSystem: "DLT1", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - recipientGatewayDltSystem: "DLT2", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - allowedSourceBackupGateways: [], - recipientLedgerAssetID: "", - sourceLedgerAssetID: "", - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.clientHelper - .sendTransferInitializationRequest(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts deleted file mode 100644 index 9bea4dc804..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ /dev/null @@ -1,390 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { Secp256k1Keys } from "@hyperledger/cactus-common"; -import { v4 as uuidV4 } from "uuid"; -import { - ILocalLog, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; - -import { SessionData } from "../../../../main/typescript/public-api"; -import { SHA256 } from "crypto-js"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, -} from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../../knex.config"; - -let sourceGatewayConstructor: IFabricSatpGatewayConstructorOptions; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let sessionID: string; -let step: number; -let type: string; -let type2: string; -let type3: string; -let type4: string; -let operation: string; -let satpLog: ILocalLog; -let satpLog2: ILocalLog; -let satpLog3: ILocalLog; -let satpLog4: ILocalLog; -let sessionData: SessionData; - -beforeEach(async () => { - sessionID = uuidv4(); - step = 3; - type = "type1"; - operation = "operation1"; - - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - sessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - satpLog = { - sessionID: sessionID, - type: type, - operation: operation, - data: JSON.stringify(sessionData), - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); -}); - -test("successful translation of log keys", async () => { - expect(PluginSatpGateway.getSatpLogKey(sessionID, type, operation)).toBe( - `${sessionID}-${type}-${operation}`, - ); -}); - -test("successful logging of proof to ipfs and sqlite", async () => { - const claim = "claim"; - const satpLogKey = PluginSatpGateway.getSatpLogKey( - sessionID, - "proof", - "lock", - ); - - await pluginSourceGateway.storeProof({ - sessionID, - type: "proof", - operation: "lock", - data: claim, - }); - - const retrievedLogRemote = - await pluginSourceGateway.getLogFromRemote(satpLogKey); - const retrievedLogDB = - await pluginSourceGateway.getLogFromDatabase(satpLogKey); - - if (retrievedLogDB == undefined || retrievedLogRemote == undefined) { - throw new Error("Test Failed"); - } - - expect(retrievedLogRemote.key).toBe(satpLogKey); - expect(retrievedLogDB.key).toBe(satpLogKey); - expect(retrievedLogRemote.hash).toBe(SHA256(claim).toString()); - expect( - pluginRecipientGateway.verifySignature( - retrievedLogRemote, - pluginSourceGateway.pubKey, - ), - ).toBe(true); - - expect(1).toBe(1); -}); - -test("successful logging to ipfs and sqlite", async () => { - const satpLogKey = PluginSatpGateway.getSatpLogKey( - sessionID, - type, - operation, - ); - - await pluginSourceGateway.storeLog(satpLog); - - const retrievedLogRemote = - await pluginSourceGateway.getLogFromRemote(satpLogKey); - const retrievedLogDB = - await pluginSourceGateway.getLogFromDatabase(satpLogKey); - - if ( - retrievedLogRemote == undefined || - retrievedLogDB == undefined || - retrievedLogDB.data == undefined || - satpLog.data == undefined - ) { - throw new Error("Test failed"); - } - - expect(retrievedLogRemote.signerPubKey).toBe(pluginSourceGateway.pubKey); - expect(retrievedLogRemote.hash).toBe( - SHA256( - JSON.stringify(satpLog, [ - "sessionID", - "type", - "key", - "operation", - "timestamp", - "data", - ]), - ).toString(), - ); - expect(retrievedLogRemote.key).toBe(satpLogKey); - - expect(retrievedLogDB.type).toBe(satpLog.type); - expect(retrievedLogDB.operation).toBe(satpLog.operation); - expect(retrievedLogDB.data).toBe(satpLog.data); - - expect(retrievedLogDB.timestamp).toBe(satpLog.timestamp); - expect(retrievedLogDB.type).toBe(satpLog.type); - expect(retrievedLogDB.operation).toBe(satpLog.operation); - expect(retrievedLogDB.sessionID).toBe(satpLog.sessionID); - expect(retrievedLogDB.key).toBe(satpLogKey); -}); - -test("successful retrieval of last log", async () => { - type2 = type + "2"; - type3 = type + "3"; - - satpLog2 = { - sessionID: sessionID, - type: type2, - operation: operation, - data: JSON.stringify(sessionData), - }; - - satpLog3 = { - sessionID: sessionID, - type: type3, - operation: operation, - data: JSON.stringify(sessionData), - }; - - await pluginSourceGateway.storeLog(satpLog2); - await pluginSourceGateway.storeLog(satpLog3); - - const lastLog = await pluginSourceGateway.getLastLogFromDatabase(sessionID); - - if ( - lastLog == undefined || - satpLog3 == undefined || - lastLog.data == undefined || - satpLog3.data == undefined - ) { - throw new Error("Test failed"); - } - - expect(lastLog.type).toBe(satpLog3.type); - expect(lastLog.operation).toBe(satpLog3.operation); - expect(lastLog.data).toBe(satpLog3.data); - - expect(lastLog.timestamp).toBe(satpLog3.timestamp); - expect(lastLog.type).toBe(satpLog3.type); - expect(lastLog.operation).toBe(satpLog3.operation); - expect(lastLog.sessionID).toBe(satpLog3.sessionID); - expect(lastLog.key).toBe( - PluginSatpGateway.getSatpLogKey(sessionID, type3, operation), - ); -}); - -test("successful retrieval of logs more recent than another log", async () => { - type2 = type + "2"; - type3 = type + "3"; - - satpLog2 = { - sessionID: sessionID, - type: type2, - operation: operation, - data: JSON.stringify(sessionData), - }; - - satpLog3 = { - sessionID: sessionID, - type: type3, - operation: operation, - data: JSON.stringify(sessionData), - }; - - await pluginSourceGateway.storeLog(satpLog2); - - const referenceTimestamp = Date.now().toString(); - await new Promise((resolve) => setTimeout(resolve, 1000)); - - await pluginSourceGateway.storeLog(satpLog); - await pluginSourceGateway.storeLog(satpLog3); - - const moreRecentLogs = - await pluginSourceGateway.getLogsMoreRecentThanTimestamp( - referenceTimestamp, - ); - - if ( - moreRecentLogs == undefined || - moreRecentLogs.length != 2 || - moreRecentLogs[0].data == undefined || - moreRecentLogs[1].data == undefined || - satpLog.data == undefined || - satpLog3.data == undefined - ) { - throw new Error("Test failed"); - } - - expect(moreRecentLogs[0].type).toBe(satpLog.type); - expect(moreRecentLogs[0].operation).toBe(satpLog.operation); - expect(moreRecentLogs[0].data).toBe(satpLog.data); - - expect(moreRecentLogs[0].timestamp).toBe(satpLog.timestamp); - expect(moreRecentLogs[0].type).toBe(satpLog.type); - expect(moreRecentLogs[0].operation).toBe(satpLog.operation); - expect(moreRecentLogs[0].sessionID).toBe(satpLog.sessionID); - expect(moreRecentLogs[0].key).toBe( - PluginSatpGateway.getSatpLogKey(sessionID, type, operation), - ); - - expect(moreRecentLogs[1].type).toBe(satpLog3.type); - expect(moreRecentLogs[1].operation).toBe(satpLog3.operation); - expect(moreRecentLogs[1].data).toBe(satpLog3.data); - - expect(moreRecentLogs[1].timestamp).toBe(satpLog3.timestamp); - expect(moreRecentLogs[1].type).toBe(satpLog3.type); - expect(moreRecentLogs[1].operation).toBe(satpLog3.operation); - expect(moreRecentLogs[1].sessionID).toBe(satpLog3.sessionID); - expect(moreRecentLogs[1].key).toBe( - PluginSatpGateway.getSatpLogKey(sessionID, type3, operation), - ); -}); - -test("successful retrieval of logs when there are no more recent logs", async () => { - const moreRecentLogs = - await pluginSourceGateway.getLogsMoreRecentThanTimestamp( - Date.now().toString(), - ); - - expect(moreRecentLogs).not.toBeUndefined(); - expect(moreRecentLogs?.length).toBe(0); -}); - -test("successful recover of sessions after crash", async () => { - const newSessionID = uuidv4(); - const newStep = 4; - - type2 = type + "2"; - type3 = type + "3"; - type4 = type + "4"; - - const data = { - id: newSessionID, - step: newStep, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - satpLog2 = { - sessionID: sessionID, - type: type2, - operation: operation, - data: JSON.stringify(sessionData), - }; - - satpLog3 = { - sessionID: sessionID, - type: type3, - operation: operation, - data: JSON.stringify(sessionData), - }; - - satpLog4 = { - sessionID: newSessionID, - type: type4, - operation: operation, - data: JSON.stringify(data), - }; - - pluginSourceGateway.sessions.set(newSessionID, data); - - await pluginSourceGateway.storeLog(satpLog); - await pluginSourceGateway.storeLog(satpLog3); - await pluginSourceGateway.storeLog(satpLog2); - await pluginSourceGateway.storeLog(satpLog4); - - // simulate the crash of one gateway - pluginSourceGateway.localRepository?.destroy(); - const newPluginSourceGateway = new FabricSatpGateway( - sourceGatewayConstructor, - ); - - await newPluginSourceGateway.recoverOpenSessions(false); - - const sessions = newPluginSourceGateway.sessions.values(); - - expect(newPluginSourceGateway.sessions.size).toBe(2); - - for (const session of sessions) { - if (session.id == sessionID) { - expect(session.step).toBe(step); - } else if (session.id == newSessionID) { - expect(session.step).toBe(newStep); - } else { - throw new Error("Test failed."); - } - - expect(data.sourceGatewayPubkey).toBe(newPluginSourceGateway.pubKey); - expect(data.recipientGatewayPubkey).toBe(pluginRecipientGateway.pubKey); - } - - newPluginSourceGateway.localRepository?.destroy(); -}); - -afterEach(async () => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts deleted file mode 100644 index 9ba8213ba8..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; - -import { - RecoverSuccessV1Message, - SessionData, -} from "../../../../main/typescript/public-api"; -import { randomInt } from "crypto"; -import { checkValidRecoverSuccessMessage } from "../../../../main/typescript/gateway/recovery/recover-success"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../../knex.config"; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let sessionID: string; -let sessionData: SessionData; - -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - sessionID = uuidv4(); - sequenceNumber = randomInt(100); - - sessionData = { - lastSequenceNumber: sequenceNumber, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("valid recover success message from client", async () => { - const recoverSuccessMessage: RecoverSuccessV1Message = { - sessionID: sessionID, - signature: "", - success: true, - }; - - recoverSuccessMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(recoverSuccessMessage)), - ); - - await checkValidRecoverSuccessMessage( - recoverSuccessMessage, - pluginRecipientGateway, - ); -}); - -test("valid recover success message from server", async () => { - const recoverSuccessMessage: RecoverSuccessV1Message = { - sessionID: sessionID, - signature: "", - success: true, - }; - - recoverSuccessMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginRecipientGateway.sign(JSON.stringify(recoverSuccessMessage)), - ); - - await checkValidRecoverSuccessMessage( - recoverSuccessMessage, - pluginSourceGateway, - ).catch(() => { - throw new Error("Test failed"); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts deleted file mode 100644 index 7aee41c579..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; - -import { - RecoverUpdateAckV1Message, - SessionData, -} from "../../../../main/typescript/public-api"; -import { randomInt } from "crypto"; -import { checkValidRecoverUpdateAckMessage } from "../../../../main/typescript/gateway/recovery/recover-update-ack"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../../knex.config"; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let sessionID: string; -let sessionData: SessionData; - -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - sessionID = uuidv4(); - sequenceNumber = randomInt(100); - - sessionData = { - lastSequenceNumber: sequenceNumber, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("valid recover update ack message from client", async () => { - const recoverUpdateAckMessage: RecoverUpdateAckV1Message = { - sessionID: sessionID, - signature: "", - success: true, - changedEntriesHash: [], - }; - - recoverUpdateAckMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(recoverUpdateAckMessage)), - ); - - await checkValidRecoverUpdateAckMessage( - recoverUpdateAckMessage, - pluginRecipientGateway, - ); -}); - -test("valid recover update ack message from server", async () => { - const recoverUpdateAckMessage: RecoverUpdateAckV1Message = { - sessionID: sessionID, - signature: "", - success: true, - changedEntriesHash: [], - }; - - recoverUpdateAckMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginRecipientGateway.sign(JSON.stringify(recoverUpdateAckMessage)), - ); - - await checkValidRecoverUpdateAckMessage( - recoverUpdateAckMessage, - pluginSourceGateway, - ).catch(() => { - throw new Error("Test failed"); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts deleted file mode 100644 index 070154ea22..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { Secp256k1Keys } from "@hyperledger/cactus-common"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; - -import { - RecoverUpdateV1Message, - RecoverV1Message, - SessionData, -} from "../../../../main/typescript/public-api"; -import { randomInt } from "crypto"; -import { - checkValidRecoverUpdateMessage, - sendRecoverUpdateMessage, -} from "../../../../main/typescript/gateway/recovery/recover-update"; - -import { checkValidRecoverMessage } from "../../../../main/typescript/gateway/recovery/recover"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let sessionID: string; -let sessionData: SessionData; - -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - sessionID = uuidv4(); - sequenceNumber = randomInt(100); - - sessionData = { - lastSequenceNumber: sequenceNumber, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("valid recover update message from server", async () => { - const recoverUpdateMessage: RecoverUpdateV1Message = { - sessionID: sessionID, - recoveredLogs: [], - signature: "", - }; - - recoverUpdateMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginRecipientGateway.sign(JSON.stringify(recoverUpdateMessage)), - ); - - await checkValidRecoverUpdateMessage( - recoverUpdateMessage, - pluginSourceGateway, - ).catch(() => { - throw new Error("Test failed"); - }); -}); - -test("check valid build of recover update message", async () => { - const sessionData1: SessionData = { - id: sessionID, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "", - recipientBasePath: "", - lastSequenceNumber: 1, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData1); - - const sessionData2 = { - id: sessionID, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "", - recipientBasePath: "", - lastSequenceNumber: 2, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - pluginRecipientGateway.sessions.set(sessionID, sessionData2); - - const firstTimestamp = Date.now().toString(); - await new Promise((resolve) => setTimeout(resolve, 5000)); - - await pluginSourceGateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - await pluginRecipientGateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - await pluginRecipientGateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - await pluginRecipientGateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - const recoverMessage: RecoverV1Message = { - sessionID: sessionID, - odapPhase: "1", - sequenceNumber: sequenceNumber, - lastLogEntryTimestamp: firstTimestamp, - signature: "", - isBackup: false, - newBasePath: "", - }; - - recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(recoverMessage)), - ); - - await checkValidRecoverMessage(recoverMessage, pluginRecipientGateway); - - const recoverUpdateMessage: RecoverUpdateV1Message | void = - await sendRecoverUpdateMessage(sessionID, pluginRecipientGateway, false); - - if (recoverUpdateMessage == void 0) { - throw new Error("Test Failed"); - } - - console.log(recoverUpdateMessage.recoveredLogs); - expect(recoverUpdateMessage.recoveredLogs.length).toBe(3); - - await checkValidRecoverUpdateMessage( - recoverUpdateMessage, - pluginSourceGateway, - ); - - expect(pluginSourceGateway.sessions.size).toBe(1); - - const [sessionId] = pluginSourceGateway.sessions.keys(); - - expect(pluginRecipientGateway.sessions.get(sessionId)).toBe(sessionData2); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts deleted file mode 100644 index ea25ec8b7c..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts +++ /dev/null @@ -1,151 +0,0 @@ -import "jest-extended"; -import { Secp256k1Keys } from "@hyperledger/cactus-common"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; - -import { RecoverV1Message } from "../../../../main/typescript/public-api"; -import { randomInt } from "crypto"; -import { checkValidRecoverMessage } from "../../../../main/typescript/gateway/recovery/recover"; - -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../../knex.config"; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let sessionID: string; - -let sequenceNumber: number; - -beforeEach(async () => { - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - const sessionData = { - lastSequenceNumber: sequenceNumber, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - step: 0, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); -}); - -test("valid recover message request from client", async () => { - const recoverMessage: RecoverV1Message = { - sessionID: sessionID, - odapPhase: "1", - sequenceNumber: sequenceNumber, - lastLogEntryTimestamp: "sometimestamp", - signature: "", - isBackup: false, - newBasePath: "", - }; - - recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(recoverMessage)), - ); - - await checkValidRecoverMessage(recoverMessage, pluginRecipientGateway); -}); - -test("valid recover message request from server", async () => { - const recoverMessage: RecoverV1Message = { - sessionID: sessionID, - odapPhase: "1", - sequenceNumber: sequenceNumber, - lastLogEntryTimestamp: "sometimestamp", - signature: "", - isBackup: false, - newBasePath: "", - }; - - recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginRecipientGateway.sign(JSON.stringify(recoverMessage)), - ); - - await checkValidRecoverMessage(recoverMessage, pluginSourceGateway).catch( - () => { - throw new Error("Test failed"); - }, - ); -}); - -test("recover message request from client with wrong signature", async () => { - const recoverMessage: RecoverV1Message = { - sessionID: sessionID, - odapPhase: "1", - sequenceNumber: sequenceNumber, - lastLogEntryTimestamp: "sometimestamp", - signature: "", - isBackup: false, - newBasePath: "", - }; - - recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginRecipientGateway.sign(JSON.stringify("wrongRecoverMessage")), - ); - - await checkValidRecoverMessage(recoverMessage, pluginSourceGateway) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("message signature verification failed"), - ); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts deleted file mode 100644 index d2eeaf8f7d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts +++ /dev/null @@ -1,272 +0,0 @@ -import { randomInt } from "crypto"; -import { v4 as uuidv4 } from "uuid"; -import { SHA256 } from "crypto-js"; -import { - SatpMessageType, - PluginSatpGateway, - ILocalLog, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; - -import { - CommitFinalV1Request, - SessionData, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; - -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { knexRemoteConnection } from "../../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const COMMIT_FINAL_CLAIM = "dummyCommitFinalClaim"; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let dummyCommitPreparationResponseMessageHash: string; -let sessionData: SessionData; -let sessionID: string; -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - dummyCommitPreparationResponseMessageHash = SHA256( - "commitPreparationResponseMessageData", - ).toString(); - - sessionID = uuidv4(); - sequenceNumber = randomInt(100); - - sessionData = { - id: sessionID, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitPrepareResponseMessageHash: dummyCommitPreparationResponseMessageHash, - step: 2, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "delete", - data: COMMIT_FINAL_CLAIM, - } as ILocalLog); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); -}); - -test("valid commit final request", async () => { - const commitFinalRequestMessage: CommitFinalV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommitPrepareAck: dummyCommitPreparationResponseMessageHash, - commitFinalClaim: COMMIT_FINAL_CLAIM, - sequenceNumber: sequenceNumber + 1, - }; - - commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), - ); - - const requestHash = SHA256( - JSON.stringify(commitFinalRequestMessage), - ).toString(); - - await pluginRecipientGateway.serverHelper.checkValidCommitFinalRequest( - commitFinalRequestMessage, - pluginRecipientGateway, - ); - - const sessionInfo = pluginRecipientGateway.sessions.get(sessionID); - - if (sessionInfo == null) throw new Error("Test Failed"); - - expect(sessionInfo.commitFinalClaim).toBe(COMMIT_FINAL_CLAIM); - - expect(sessionInfo.commitFinalRequestMessageHash).toBe(requestHash); - - expect(sessionInfo.clientSignatureCommitFinalRequestMessage).toBe( - commitFinalRequestMessage.signature, - ); -}); - -test("commit final request with wrong sessionId", async () => { - const wrongSessionId = uuidv4(); - - const commitFinalRequestMessage: CommitFinalV1Request = { - sessionID: wrongSessionId, - messageType: SatpMessageType.CommitFinalRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommitPrepareAck: dummyCommitPreparationResponseMessageHash, - commitFinalClaim: "", - sequenceNumber: sequenceNumber + 1, - }; - - commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitFinalRequest( - commitFinalRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "session Id does not correspond to any open session", - ), - ); -}); - -test("commit final request with wrong message type", async () => { - const commitFinalRequestMessage: CommitFinalV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalResponse, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommitPrepareAck: dummyCommitPreparationResponseMessageHash, - commitFinalClaim: "", - sequenceNumber: sequenceNumber + 1, - }; - - commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitFinalRequest( - commitFinalRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("wrong message type for CommitFinalRequest"), - ); -}); - -test("commit final request with wrong previous message hash", async () => { - const commitFinalRequestMessage: CommitFinalV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommitPrepareAck: "dummyCommitPreparationResponseMessageHash", - commitFinalClaim: COMMIT_FINAL_CLAIM, - sequenceNumber: sequenceNumber + 1, - }; - - commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitFinalRequest( - commitFinalRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("previous message hash does not match"), - ); -}); - -test("timeout in commit final response because no client gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "http://wrongpath", - recipientBasePath: "", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitAcknowledgementClaim: "dummyCommitAcknowledgementClaim", - commitFinalRequestMessageHash: "dummyCommitFinalRequestMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.serverHelper - .sendCommitFinalResponse(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts deleted file mode 100644 index 7a5fe43217..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts +++ /dev/null @@ -1,241 +0,0 @@ -import { randomInt } from "crypto"; -import { - SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; -import { - CommitPreparationV1Request, - SessionData, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { v4 as uuidV4 } from "uuid"; -import { SHA256 } from "crypto-js"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let dummyLockEvidenceResponseMessageHash: string; -let sessionData: SessionData; -let sessionID: string; -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - dummyLockEvidenceResponseMessageHash = SHA256( - "lockEvidenceResponseMessageData", - ).toString(); - - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - sessionData = { - id: sessionID, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - lockEvidenceResponseMessageHash: dummyLockEvidenceResponseMessageHash, - step: 2, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("valid commit prepare request", async () => { - const commitPrepareRequestMessage: CommitPreparationV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitPreparationRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashLockEvidenceAck: dummyLockEvidenceResponseMessageHash, - sequenceNumber: sequenceNumber + 1, - }; - - commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), - ); - - const requestHash = SHA256( - JSON.stringify(commitPrepareRequestMessage), - ).toString(); - - await pluginRecipientGateway.serverHelper.checkValidCommitPreparationRequest( - commitPrepareRequestMessage, - pluginRecipientGateway, - ); - - const sessionInfo = pluginRecipientGateway.sessions.get(sessionID); - - if (sessionInfo == null) throw new Error("Test Failed"); - - expect(sessionInfo.commitPrepareRequestMessageHash).toBe(requestHash); - - expect(sessionInfo.clientSignatureCommitPreparationRequestMessage).toBe( - commitPrepareRequestMessage.signature, - ); -}); - -test("commit prepare request with wrong sessionId", async () => { - const wrongSessionId = uuidV4(); - - const commitPrepareRequestMessage: CommitPreparationV1Request = { - sessionID: wrongSessionId, - messageType: SatpMessageType.CommitPreparationRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashLockEvidenceAck: dummyLockEvidenceResponseMessageHash, - sequenceNumber: sequenceNumber + 1, - }; - - commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitPreparationRequest( - commitPrepareRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "session Id does not correspond to any open session", - ), - ); -}); - -test("commit prepare request with wrong message type", async () => { - const commitPrepareRequestMessage: CommitPreparationV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalResponse, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashLockEvidenceAck: dummyLockEvidenceResponseMessageHash, - sequenceNumber: sequenceNumber + 1, - }; - - commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitPreparationRequest( - commitPrepareRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "wrong message type for CommitPreparationRequest", - ), - ); -}); - -test("commit prepare request with wrong previous message hash", async () => { - const commitPrepareRequestMessage: CommitPreparationV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitPreparationRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashLockEvidenceAck: "wrongLockEvidenceResponseMessageHash", - sequenceNumber: sequenceNumber + 1, - }; - - commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitPreparationRequest( - commitPrepareRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("previous message hash does not match"), - ); -}); - -test("timeout in commit preparation response because no client gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "http://wrongpath", - recipientBasePath: "", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitPrepareRequestMessageHash: "dummyCommitPrepareRequestMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.serverHelper - .sendCommitPreparationResponse(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts deleted file mode 100644 index fc23aeef54..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts +++ /dev/null @@ -1,311 +0,0 @@ -import { randomInt } from "crypto"; -import { - SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; -import { - LockEvidenceV1Request, - SessionData, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { v4 as uuidV4 } from "uuid"; -import { SHA256 } from "crypto-js"; - -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; -import { knexRemoteConnection } from "../../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const LOCK_EVIDENCE_CLAIM = "dummyLockEvidenceClaim"; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let dummyTransferCommenceResponseMessageHash: string; -let sessionData: SessionData; -let lockExpiryDate: string; -let sessionID: string; -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - dummyTransferCommenceResponseMessageHash = SHA256( - "transferCommenceResponseMessageData", - ).toString(); - - lockExpiryDate = new Date().setDate(new Date().getDate() + 1).toString(); - - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - sessionData = { - id: sessionID, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - transferCommenceMessageResponseHash: - dummyTransferCommenceResponseMessageHash, - step: 2, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "lock", - data: LOCK_EVIDENCE_CLAIM, - }); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); -}); - -test("valid lock evidence request", async () => { - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommenceAckRequest: dummyTransferCommenceResponseMessageHash, - lockEvidenceClaim: LOCK_EVIDENCE_CLAIM, - lockEvidenceExpiration: new Date(2060, 11, 24).toString(), - sequenceNumber: sequenceNumber + 1, - }; - - lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - const requestHash = SHA256( - JSON.stringify(lockEvidenceRequestMessage), - ).toString(); - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequestMessage, - pluginRecipientGateway, - ); - - const sessionInfo = pluginRecipientGateway.sessions.get(sessionID); - - if (sessionInfo == null) throw new Error("Test Failed"); - - expect(sessionInfo.lockEvidenceRequestMessageHash).toBe(requestHash); - expect(sessionInfo.lockEvidenceResponseMessageHash).not.toBe(""); - - expect(sessionInfo.clientSignatureLockEvidenceRequestMessage).toBe( - lockEvidenceRequestMessage.signature, - ); -}); - -test("lock evidence request with wrong sessionId", async () => { - const wrongSessionId = uuidV4(); - - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: wrongSessionId, - messageType: SatpMessageType.LockEvidenceRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommenceAckRequest: dummyTransferCommenceResponseMessageHash, - lockEvidenceClaim: lockExpiryDate.toString(), - lockEvidenceExpiration: new Date(2060, 11, 24).toString(), - sequenceNumber: sequenceNumber + 1, - }; - - lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidLockEvidenceRequest( - lockEvidenceRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "session Id does not correspond to any open session", - ), - ); -}); - -test("lock evidence request with wrong message type", async () => { - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceResponse, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommenceAckRequest: dummyTransferCommenceResponseMessageHash, - lockEvidenceClaim: lockExpiryDate.toString(), - lockEvidenceExpiration: new Date(2060, 11, 24).toString(), - sequenceNumber: sequenceNumber + 1, - }; - - lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidLockEvidenceRequest( - lockEvidenceRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("wrong message type for LockEvidenceRequest"), - ); -}); - -test("lock evidence request with wrong previous message hash", async () => { - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommenceAckRequest: "wrongPrevMessageHash", - lockEvidenceClaim: lockExpiryDate.toString(), - lockEvidenceExpiration: new Date(2060, 11, 24).toString(), - sequenceNumber: sequenceNumber + 1, - }; - - lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidLockEvidenceRequest( - lockEvidenceRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("previous message hash does not match"), - ); -}); - -test("transfer commence flow with invalid claim", async () => { - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommenceAckRequest: dummyTransferCommenceResponseMessageHash, - lockEvidenceClaim: "", - lockEvidenceExpiration: new Date(2020, 11, 24).toString(), - sequenceNumber: sequenceNumber + 1, - }; - - lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidLockEvidenceRequest( - lockEvidenceRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("invalid or expired lock evidence claim"), - ); -}); - -test("timeout in lock evidence response because no client gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "http://wrongpath", - recipientBasePath: "", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - lockEvidenceClaim: "dummyLockEvidenceClaim", - lockEvidenceRequestMessageHash: "dummyLockEvidenceRequestMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginRecipientGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.serverHelper - .sendLockEvidenceResponse(sessionID, pluginRecipientGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts deleted file mode 100644 index d1b4484278..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts +++ /dev/null @@ -1,349 +0,0 @@ -import { randomInt } from "crypto"; -import { - SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; -import { - TransferCommenceV1Request, - AssetProfile, - SessionData, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { v4 as uuidV4 } from "uuid"; -import { SHA256 } from "crypto-js"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let dummyInitializationResponseMessageHash: string; -let expiryDate: string; -let assetProfile: AssetProfile; -let assetProfileHash: string; -let sessionData: SessionData; -let sessionID: string; -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - dummyInitializationResponseMessageHash = SHA256( - "initializationResponseMessageData", - ).toString(); - - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - expiryDate = new Date(2060, 11, 24).toString(); - assetProfile = { expirationDate: expiryDate }; - assetProfileHash = SHA256(JSON.stringify(assetProfile)).toString(); - - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - sessionData = { - id: sessionID, - initializationResponseMessageHash: dummyInitializationResponseMessageHash, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - sourceGatewayDltSystem: "DLT2", - recipientGatewayDltSystem: "DLT1", - assetProfile: assetProfile, - step: 1, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("valid transfer commence request", async () => { - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceRequest, - originatorPubkey: "originatorDummyPubKey", - beneficiaryPubkey: "beneficiaryDummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: dummyInitializationResponseMessageHash, - hashAssetProfile: assetProfileHash, - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), - ); - - const requestHash = SHA256( - JSON.stringify(transferCommenceRequest), - ).toString(); - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const sessionInfo = pluginRecipientGateway.sessions.get(sessionID); - - if (sessionInfo == null) throw new Error("Test Failed"); - - expect(sessionInfo.transferCommenceMessageRequestHash).toBe(requestHash); - expect(sessionInfo.clientSignatureTransferCommenceRequestMessage).toBe( - transferCommenceRequest.signature, - ); - expect(sessionInfo.serverSignatureTransferCommenceResponseMessage).not.toBe( - "", - ); - expect(sessionInfo.originatorPubkey).toBe("originatorDummyPubKey"); - expect(sessionInfo.beneficiaryPubkey).toBe("beneficiaryDummyPubKey"); -}); - -test("transfer commence request with wrong sessionId", async () => { - const wrongSessionId = uuidV4(); - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: wrongSessionId, - messageType: SatpMessageType.TransferCommenceRequest, - originatorPubkey: "dummyPubKey", - beneficiaryPubkey: "dummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: dummyInitializationResponseMessageHash, - hashAssetProfile: assetProfileHash, - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "session Id does not correspond to any open session", - ), - ); -}); - -test("transfer commence request with wrong message type", async () => { - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceResponse, - originatorPubkey: "dummyPubKey", - beneficiaryPubkey: "dummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: dummyInitializationResponseMessageHash, - hashAssetProfile: assetProfileHash, - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "wrong message type for TransferCommenceRequest", - ), - ); -}); - -test("transfer commence request with wrong signature", async () => { - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceRequest, - originatorPubkey: "dummyPubKey", - beneficiaryPubkey: "dummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: dummyInitializationResponseMessageHash, - hashAssetProfile: assetProfileHash, - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify("wrongData")), - ); - - await pluginRecipientGateway.serverHelper - .checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "TransferCommenceRequest message signature verification failed", - ), - ); -}); - -test("transfer commence request with wrong previous message hash", async () => { - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceRequest, - originatorPubkey: "dummyPubKey", - beneficiaryPubkey: "dummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: "wrongPrevMessageHash", - hashAssetProfile: assetProfileHash, - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("transfer commence request with wrong asset profile hash", async () => { - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceRequest, - originatorPubkey: "dummyPubKey", - beneficiaryPubkey: "dummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: dummyInitializationResponseMessageHash, - hashAssetProfile: "wrongAssetProfileHash", - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("assetProfile hash not match"), - ); -}); - -test("timeout in transfer commence response because no client gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "http://wrongpath", - recipientBasePath: "", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - transferCommenceMessageRequestHash: - "dummyTransferCommenceMessageRequestHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.serverHelper - .sendTransferCommenceResponse(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts deleted file mode 100644 index aab405e348..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { - SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; -import { - SessionData, - TransferCompleteV1Request, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { v4 as uuidV4 } from "uuid"; -import { SHA256 } from "crypto-js"; -import { randomInt } from "crypto"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; -import { knexRemoteConnection } from "../../knex.config"; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let dummyCommitFinalResponseMessageHash: string; -let dummyTransferCommenceResponseMessageHash: string; -let sessionData: SessionData; -let sessionID: string; -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - dummyCommitFinalResponseMessageHash = SHA256( - "commitFinalResponseMessageData", - ).toString(); - - dummyTransferCommenceResponseMessageHash = SHA256( - "transferCommenceResponseMessageData", - ).toString(); - - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - sessionData = { - id: sessionID, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitFinalResponseMessageHash: dummyCommitFinalResponseMessageHash, - transferCommenceMessageRequestHash: - dummyTransferCommenceResponseMessageHash, - step: 2, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("dummy test for transfer complete flow", async () => { - const transferCompleteRequestMessage: TransferCompleteV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCompleteRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashTransferCommence: dummyTransferCommenceResponseMessageHash, - hashCommitFinalAck: dummyCommitFinalResponseMessageHash, - sequenceNumber: sequenceNumber + 1, - }; - - transferCompleteRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCompleteRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper.checkValidTransferCompleteRequest( - transferCompleteRequestMessage, - pluginRecipientGateway, - ); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts deleted file mode 100644 index 9615f80401..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts +++ /dev/null @@ -1,262 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidV4 } from "uuid"; -import { - SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; -import { - TransferInitializationV1Request, - AssetProfile, - SessionData, -} from "../../../../main/typescript/public-api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; -let expiryDate: string; -let assetProfile: AssetProfile; -let sequenceNumber: number; -let sessionID: string; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - expiryDate = new Date(2060, 11, 24).toString(); - assetProfile = { expirationDate: expiryDate }; - - sequenceNumber = randomInt(100); - sessionID = uuidV4(); -}); - -test("valid transfer initiation request", async () => { - const initializationRequestMessage: TransferInitializationV1Request = { - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - messageType: SatpMessageType.InitializationRequest, - sessionID: sessionID, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - signature: "", - sourceGatewayPubkey: pluginSourceGateway.pubKey, - sourceGatewayDltSystem: "DLT1", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - recipientGatewayDltSystem: "DLT2", - sequenceNumber: sequenceNumber, - recipientBasePath: "", - sourceBasePath: "", - backupGatewaysAllowed: [], - recipientLedgerAssetID: "", - sourceLedgerAssetID: "", - }; - - initializationRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - await pluginSourceGateway.sign( - JSON.stringify(initializationRequestMessage), - ), - ); - - const messageHash = SHA256( - JSON.stringify(initializationRequestMessage), - ).toString(); - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - initializationRequestMessage, - pluginRecipientGateway, - ); - - const sessionData = pluginRecipientGateway.sessions.get(sessionID); - - if (sessionData == undefined) throw new Error("Test failed"); - - expect(sessionData.step).not.toBe(0); - expect(sessionData.lastSequenceNumber).toBe(sequenceNumber); - expect(sessionData.loggingProfile).toBe("dummyLoggingProfile"); - expect(sessionData.accessControlProfile).toBe("dummyAccessControlProfile"); - expect(sessionData.applicationProfile).toBe("dummyApplicationProfile"); - expect(JSON.stringify(sessionData.assetProfile)).toBe( - JSON.stringify(assetProfile), - ); - expect(sessionData.sourceGatewayPubkey).toBe(pluginSourceGateway.pubKey); - expect(sessionData.recipientGatewayPubkey).toBe( - pluginRecipientGateway.pubKey, - ); - expect(sessionData.sourceGatewayDltSystem).toBe("DLT1"); - expect(sessionData.recipientGatewayDltSystem).toBe("DLT2"); - - expect(sessionData.initializationRequestMessageHash).toBe(messageHash); - - expect(sessionData.clientSignatureInitializationRequestMessage).toBe( - initializationRequestMessage.signature, - ); -}); - -test("transfer initiation request invalid because of incompatible DLTs", async () => { - const initializationRequestMessage: TransferInitializationV1Request = { - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - messageType: SatpMessageType.InitializationRequest, - sessionID: sessionID, - version: "0.0.0", - loggingProfile: "dummy", - accessControlProfile: "dummy", - applicationProfile: "dummy", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - signature: "", - sourceGatewayPubkey: pluginSourceGateway.pubKey, - sourceGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - recipientGatewayDltSystem: "DLT1", - sequenceNumber: sequenceNumber, - recipientBasePath: "", - sourceBasePath: "", - backupGatewaysAllowed: [], - recipientLedgerAssetID: "", - sourceLedgerAssetID: "", - }; - - initializationRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - await pluginSourceGateway.sign( - JSON.stringify(initializationRequestMessage), - ), - ); - - await pluginRecipientGateway.serverHelper - .checkValidInitializationRequest( - initializationRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "source gateway dlt system is not supported by this gateway", - ), - ); -}); - -test("transfer initiation request invalid because of asset expired", async () => { - expiryDate = new Date(2020, 11, 24).toString(); - assetProfile = { expirationDate: expiryDate }; - - const initializationRequestMessage: TransferInitializationV1Request = { - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - messageType: SatpMessageType.InitializationRequest, - sessionID: sessionID, - version: "0.0.0", - loggingProfile: "dummy", - accessControlProfile: "dummy", - applicationProfile: "dummy", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - signature: "", - sourceGatewayPubkey: pluginSourceGateway.pubKey, - sourceGatewayDltSystem: "DLT1", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - recipientGatewayDltSystem: "DLT2", - sequenceNumber: sequenceNumber, - recipientBasePath: "", - sourceBasePath: "", - backupGatewaysAllowed: [], - recipientLedgerAssetID: "", - sourceLedgerAssetID: "", - }; - - initializationRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(initializationRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidInitializationRequest( - initializationRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => expect(ex.message).toMatch("asset has expired")); -}); - -test("timeout in commit final response because no client gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "http://wrongpath", - recipientBasePath: "", - lastSequenceNumber: 77, - initializationRequestMessageHash: - "dummyInitializationRequestMessageProcessedTimeStamp", - initializationRequestMessageRcvTimeStamp: - "dummyInitializationRequestMessageProcessedTimeStamp", - initializationRequestMessageProcessedTimeStamp: - "dummyInitializationRequestMessageProcessedTimeStamp", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.serverHelper - .sendTransferInitializationResponse(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/tsconfig.json b/packages/cactus-plugin-satp-hermes/tsconfig.json deleted file mode 100644 index 9246809a97..0000000000 --- a/packages/cactus-plugin-satp-hermes/tsconfig.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", /* Redirect output structure to the directory. */ - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "allowJs": false, - "skipLibCheck": true, - "rootDir": "./src/", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-satp-hermes.tsbuildinfo", - "moduleResolution": "Node16" - }, - "ts-node": { - "files": true - }, - "include": [ - "./src", - "src/**/*.json" - ], - "exclude":[ - "./src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/**/*.ts" - ], - "references": [ - { - "path": "../cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../../extensions/cactus-plugin-object-store-ipfs/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-test-api-client/CHANGELOG.md b/packages/cactus-test-api-client/CHANGELOG.md deleted file mode 100644 index 49c026ac0a..0000000000 --- a/packages/cactus-test-api-client/CHANGELOG.md +++ /dev/null @@ -1,196 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **cmd-api-server:** add GetOpenApiSpecV1Endpoint (HTTP GET) ([aeebbd4](https://github.com/hyperledger/cacti/commit/aeebbd4d86cb62f8d1d53fded65ae40eb5e27910)) -* **quorum:** private transaction support ([3c944d6](https://github.com/hyperledger/cacti/commit/3c944d601d5824eaf3cc6a9a8af1f8a6e5fe6db3)) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Features - -* **quorum-connector:** implement validator interface on go-quorum-connector ([8d36bea](https://github.com/hyperledger/cactus/commit/8d36bea5146a544a2cb4615ec7291a1b425e568f)), closes [#1604](https://github.com/hyperledger/cactus/issues/1604) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Bug Fixes - -* add optional auth token to api-client and consortium-manual ([c2feebf](https://github.com/hyperledger/cactus/commit/c2feebfec56f13d68c2ea1ec3a34ce67394d0720)), closes [#1579](https://github.com/hyperledger/cactus/issues/1579) - -### Features - -* **cactus-api-client:** add support for plain socketio validators in api-server and api-client ([634b10e](https://github.com/hyperledger/cactus/commit/634b10e5eaf82df08b04c11c3af5b109ede5b942)), closes [#1602](https://github.com/hyperledger/cactus/issues/1602) [#1602](https://github.com/hyperledger/cactus/issues/1602) -* **cactus-api-client:** common verifier-factory ([2f70a64](https://github.com/hyperledger/cactus/commit/2f70a6473f30446859427335f2d3602bddca636d)), closes [#1878](https://github.com/hyperledger/cactus/issues/1878) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) -* **cmd-api-server:** support grpc web services [#1189](https://github.com/hyperledger/cactus/issues/1189) ([4cace1d](https://github.com/hyperledger/cactus/commit/4cace1dca3377e09d2ed37fdadeec6b125d47896)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **plugin-consortium-manual:** drop repo constructor arg [#1199](https://github.com/hyperledger/cactus/issues/1199) ([7b424d4](https://github.com/hyperledger/cactus/commit/7b424d465dd7c11900e0afea5c32514a9b585084)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) - -### Features - -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) - -### Features - -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -**Note:** Version bump only for package @hyperledger/cactus-test-api-client - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **ci:** disk full issues on GitHub Action Workflow runner [#698](https://github.com/hyperledger/cactus/issues/698) ([61e3f76](https://github.com/hyperledger/cactus/commit/61e3f76ed910c9b04b36f995456213018cc0e7ba)) -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -### Features - -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) -* **quorum:** 🎸 support Cactus Keychain APIs ([0d4769f](https://github.com/hyperledger/cactus/commit/0d4769fa52d1f79c22bdb6f60c2c2b7200b8cf99)) -* **sdk:** routing to nodes by ledger ID ([10e3d1c](https://github.com/hyperledger/cactus/commit/10e3d1c46731bf6d84a28d837e2f6601b4c6a78f)) - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -### Features - -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) -* **quorum:** 🎸 support Cactus Keychain APIs ([0d4769f](https://github.com/hyperledger/cactus/commit/0d4769fa52d1f79c22bdb6f60c2c2b7200b8cf99)) -* **sdk:** routing to nodes by ledger ID ([10e3d1c](https://github.com/hyperledger/cactus/commit/10e3d1c46731bf6d84a28d837e2f6601b4c6a78f)) diff --git a/packages/cactus-test-api-client/README.md b/packages/cactus-test-api-client/README.md deleted file mode 100644 index 2e795db827..0000000000 --- a/packages/cactus-test-api-client/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# `@hyperledger/cactus-test-api-client` - -This is the test package for the package that's called `cactus-api-client` - -## Usage - -``` -// TODO: DEMONSTRATE API -``` - -## FAQ - -### **What is a dedicated test package for?** - -This is a dedicated test package meaning that it verifies the integration between two packages that are somehow dependent on each other and therefore these tests cannot be added properly in the child package due to circular dependency issues and it would not be fitting to add it in the parent because the child package's tests should not be held by the parent as a matter of principle. diff --git a/packages/cactus-test-api-client/package.json b/packages/cactus-test-api-client/package.json deleted file mode 100644 index 2d0836d4ea..0000000000 --- a/packages/cactus-test-api-client/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-api-client", - "version": "2.0.0", - "description": "Integration tests for the Cactus API Client package (formerly known as the Cactus SDK package that has been renamed for to purpose of being less ambiguous)", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-test-api-client.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-consortium-manual": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "jose": "4.15.5", - "uuid": "10.0.0", - "web3": "1.6.1" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-test-api-client.web.umd.min.js", - "mainMinified": "dist/cactus-test-api-client.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-test-api-client/src/main/typescript/index.ts b/packages/cactus-test-api-client/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-test-api-client/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-api-client/src/main/typescript/index.web.ts b/packages/cactus-test-api-client/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-api-client/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-api-client/src/main/typescript/public-api.ts b/packages/cactus-test-api-client/src/main/typescript/public-api.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-api-client/src/main/typescript/public-api.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-api-client/src/test/typescript/integration/api-client-routing-node-to-node.test.ts b/packages/cactus-test-api-client/src/test/typescript/integration/api-client-routing-node-to-node.test.ts deleted file mode 100644 index edea28a80a..0000000000 --- a/packages/cactus-test-api-client/src/test/typescript/integration/api-client-routing-node-to-node.test.ts +++ /dev/null @@ -1,325 +0,0 @@ -import { AddressInfo } from "net"; - -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { generateKeyPair, exportSPKI, exportPKCS8 } from "jose"; -import Web3 from "web3"; - -import { ApiClient } from "@hyperledger/cactus-api-client"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - CactusNode, - Configuration, - Consortium, - ConsortiumDatabase, - ConsortiumMember, - Ledger, - LedgerType, -} from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - DefaultApi as BesuApi, - PluginLedgerConnectorBesu, - ReceiptType, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - pruneDockerAllIfGithubAction, - BesuTestLedger, -} from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc, Servers } from "@hyperledger/cactus-common"; - -import { - IPluginConsortiumManualOptions, - PluginConsortiumManual, -} from "@hyperledger/cactus-plugin-consortium-manual"; -import { Account } from "web3-core"; - -const logLevel: LogLevelDesc = "TRACE"; -const testCase = "Routes to correct node based on ledger ID"; -const testCase1 = "Set Up Test ledgers, Consortium, Cactus Nodes"; -const testCase2 = "ApiClient #1 Routes based on Ledger ID #1"; -const testCase3 = "ApiClient #1 Routes based on Ledger ID #2"; - -describe(testCase, () => { - const besuTestLedger1 = new BesuTestLedger(); - const besuTestLedger2 = new BesuTestLedger(); - let consortiumDatabase: ConsortiumDatabase; - let mainApiClient: ApiClient; - - let initialFundsAccount1: string; - let initialFundsAccount2: string; - let keyPair1: any; - let keyPair2: any; - let addressInfo1: AddressInfo; - let addressInfo2: AddressInfo; - let httpServer1: any; - let httpServer2: any; - - let apiServer1: ApiServer; - let apiServer2: ApiServer; - let testEthAccount1: Account; - - const ledger1: Ledger = { - id: "my_cool_ledger_that_i_want_to_transact_on", - ledgerType: LedgerType.Besu2X, - }; - const ledger2: Ledger = { - id: "other_ledger_that_is_just_taking_up_space", - ledgerType: LedgerType.Besu2X, - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy; - }); - - beforeAll(async () => { - await besuTestLedger1.start(); - await besuTestLedger2.start(); - - testEthAccount1 = await besuTestLedger1.createEthTestAccount(); - - httpServer1 = await Servers.startOnPreferredPort(4050); - addressInfo1 = httpServer1.address() as AddressInfo; - const node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - - httpServer2 = await Servers.startOnPreferredPort(4100); - addressInfo2 = httpServer2.address() as AddressInfo; - const node2Host = `http://${addressInfo2.address}:${addressInfo2.port}`; - - keyPair1 = await generateKeyPair("ES256K"); - const pubKeyPem1 = await exportSPKI(keyPair1.publicKey); - - keyPair2 = await generateKeyPair("ES256K"); - const pubKeyPem2 = await exportSPKI(keyPair2.publicKey); - - const consortiumId = uuidV4(); - const consortiumName = "Example Corp. & Friends Crypto Consortium"; - const memberId1 = uuidV4(); - const memberId2 = uuidV4(); - - const node1: CactusNode = { - nodeApiHost: node1Host, - publicKeyPem: pubKeyPem1, - consortiumId, - id: uuidV4(), - ledgerIds: [ledger1.id], - memberId: memberId1, - pluginInstanceIds: [], - }; - - const member1: ConsortiumMember = { - id: memberId1, - name: "Example Corp 1", - nodeIds: [node1.id], - }; - - const node2: CactusNode = { - nodeApiHost: node2Host, - publicKeyPem: pubKeyPem2, - consortiumId, - id: uuidV4(), - ledgerIds: [ledger2.id], - memberId: memberId2, - pluginInstanceIds: [], - }; - - const member2: ConsortiumMember = { - id: memberId2, - name: "Example Corp 2", - nodeIds: [node2.id], - }; - - const consortium: Consortium = { - id: consortiumId, - mainApiHost: node1Host, - name: consortiumName, - memberIds: [member1.id, member2.id], - }; - - consortiumDatabase = { - cactusNode: [node1, node2], - consortium: [consortium], - consortiumMember: [member1, member2], - ledger: [ledger1, ledger2], - pluginInstance: [], - }; - - const config = new Configuration({ basePath: consortium.mainApiHost }); - mainApiClient = new ApiClient(config); - }); - - afterAll(async () => { - await besuTestLedger1.stop(); - await besuTestLedger1.destroy(); - await besuTestLedger2.stop(); - await besuTestLedger2.destroy(); - await apiServer1.shutdown(); - await apiServer2.shutdown(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - test(testCase1, async () => { - const rpcApiHttpHost1 = await besuTestLedger1.getRpcApiHttpHost(); - const rpcApiWsHost1 = await besuTestLedger1.getRpcApiWsHost(); - - initialFundsAccount1 = besuTestLedger1.getGenesisAccountPubKey(); - - const rpcApiHttpHost2 = await besuTestLedger2.getRpcApiHttpHost(); - const rpcApiWsHost2 = await besuTestLedger2.getRpcApiWsHost(); - - initialFundsAccount2 = besuTestLedger2.getGenesisAccountPubKey(); - - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const pluginBesuConnector = new PluginLedgerConnectorBesu({ - instanceId: uuidV4(), - rpcApiHttpHost: rpcApiHttpHost1, - rpcApiWsHost: rpcApiWsHost1, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const keyPairPem = await exportPKCS8(keyPair1.privateKey); - const options: IPluginConsortiumManualOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - consortiumDatabase, - logLevel, - }; - const pluginConsortiumManual = new PluginConsortiumManual(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumManual); - pluginRegistry.add(pluginBesuConnector); - - apiServer1 = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer1.start(); - } - - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const pluginBesuConnector = new PluginLedgerConnectorBesu({ - instanceId: uuidV4(), - rpcApiHttpHost: rpcApiHttpHost2, - rpcApiWsHost: rpcApiWsHost2, - logLevel, - pluginRegistry: new PluginRegistry(), - }); - - const keyPairPem = await exportPKCS8(keyPair2.privateKey); - const options: IPluginConsortiumManualOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - consortiumDatabase, - logLevel, - }; - const pluginConsortiumManual = new PluginConsortiumManual(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo2.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = []; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumManual); - pluginRegistry.add(pluginBesuConnector); - - apiServer2 = new ApiServer({ - httpServerApi: httpServer2, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer2.start(); - // test.onFinish(() => apiServer.shutdown()); - // afterAll(async () => await apiServer.shutdown()); - } - }); - test(testCase2, async () => { - const apiClient1 = await mainApiClient.ofLedger(ledger1.id, BesuApi, {}); - const testAccount1 = new Web3().eth.accounts.create(uuidV4()); - const res = await apiClient1.runTransactionV1({ - transactionConfig: { - from: initialFundsAccount1, - to: testAccount1.address, - value: 10e6, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - web3SigningCredential: { - ethAccount: testEthAccount1.address, - secret: testEthAccount1.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - - expect(res).toBeTruthy(); - expect(res.status).toBeGreaterThan(199); - expect(res.status).toBeLessThan(300); - }); - - test(testCase3, async () => { - const apiClient2 = await mainApiClient.ofLedger(ledger2.id, BesuApi, {}); - const testAccount2 = new Web3().eth.accounts.create(uuidV4()); - const res = await apiClient2.runTransactionV1({ - transactionConfig: { - from: initialFundsAccount2, - to: testAccount2.address, - value: 10e6, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - web3SigningCredential: { - ethAccount: initialFundsAccount2, - secret: besuTestLedger2.getGenesisAccountPrivKey(), - type: Web3SigningCredentialType.PrivateKeyHex, - }, - }); - expect(res).toBeTruthy(); - expect(res.status).toBeGreaterThan(199); - expect(res.status).toBeLessThan(300); - }); -}); diff --git a/packages/cactus-test-api-client/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-test-api-client/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-api-client/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-api-client/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-test-api-client/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-api-client/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-api-client/tsconfig.json b/packages/cactus-test-api-client/tsconfig.json deleted file mode 100644 index 1a43c61115..0000000000 --- a/packages/cactus-test-api-client/tsconfig.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-api-client.tsbuildinfo" - }, - "include": [ - "./src" - ], - "references": [ - { - "path": "../cactus-api-client/tsconfig.json" - }, - { - "path": "../cactus-verifier-client/tsconfig.json" - }, - { - "path": "../cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-consortium-manual/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-test-cmd-api-server/CHANGELOG.md b/packages/cactus-test-cmd-api-server/CHANGELOG.md deleted file mode 100644 index aa8784b7eb..0000000000 --- a/packages/cactus-test-cmd-api-server/CHANGELOG.md +++ /dev/null @@ -1,180 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **cmd-api-server:** enable version selection in plugins ([b982777](https://github.com/hyperledger/cactus/commit/b9827772fa6694381716686759f85f96b915662e)), closes [#839](https://github.com/hyperledger/cactus/issues/839) [#840](https://github.com/hyperledger/cactus/issues/840) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* **cmd-api-server:** support grpc web services [#1189](https://github.com/hyperledger/cactus/issues/1189) ([4cace1d](https://github.com/hyperledger/cactus/commit/4cace1dca3377e09d2ed37fdadeec6b125d47896)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **cmd-api-server:** plugins interfere with API server deps [#1192](https://github.com/hyperledger/cactus/issues/1192) ([a96ce68](https://github.com/hyperledger/cactus/commit/a96ce689dae74345b41d5bd94dd46dd3e9bc3e71)), closes [#1203](https://github.com/hyperledger/cactus/issues/1203) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-corda:** container image kotlin compilation fails in model ([a8a4531](https://github.com/hyperledger/cactus/commit/a8a4531d379fe16d4c991802525ec573a7e3ede1)) - -### Features - -* **api-server:** ability to install plugins at runtime [#764](https://github.com/hyperledger/cactus/issues/764) ([8dda0f6](https://github.com/hyperledger/cactus/commit/8dda0f61937c6e1a85afee0345af44b1bfa09c0a)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) -* **keychain-vault:** add the missing endpoint classes [#676](https://github.com/hyperledger/cactus/issues/676) ([341cffc](https://github.com/hyperledger/cactus/commit/341cffcef72286169a4ceced69414618d5059d0e)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Features - -* **api-server:** ability to install plugins at runtime [#764](https://github.com/hyperledger/cactus/issues/764) ([8dda0f6](https://github.com/hyperledger/cactus/commit/8dda0f61937c6e1a85afee0345af44b1bfa09c0a)) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -**Note:** Version bump only for package @hyperledger/cactus-test-cmd-api-server - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) - -### Features - -* **core-api:** plugin import types: LOCAL & REMOTE ([f4d51da](https://github.com/hyperledger/cactus/commit/f4d51dae5b28367e714a2b9aa35dd84a2cb4cb37)) -* **keychain:** add rust keychain plugin vault implementation ([6dcdb8a](https://github.com/hyperledger/cactus/commit/6dcdb8a02db30e4dfe3d912bd56d5979b0cb3bc3)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -### Bug Fixes - -* **api-server:** runtime plugin imports ([dcdfcf5](https://github.com/hyperledger/cactus/commit/dcdfcf59e8e5220e24093e3dbeb41f49f1e5ab1b)), closes [#346](https://github.com/hyperledger/cactus/issues/346) - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -### Bug Fixes - -* **api-server:** runtime plugin imports ([dcdfcf5](https://github.com/hyperledger/cactus/commit/dcdfcf59e8e5220e24093e3dbeb41f49f1e5ab1b)), closes [#346](https://github.com/hyperledger/cactus/issues/346) diff --git a/packages/cactus-test-cmd-api-server/README.md b/packages/cactus-test-cmd-api-server/README.md deleted file mode 100644 index f3c376e10c..0000000000 --- a/packages/cactus-test-cmd-api-server/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# `@hyperledger/cactus-test-cmd-api-server` - -This is the test package for the package that's called `cactus-cmd-api-server` - -## Usage - -``` -// TODO: DEMONSTRATE API -``` - -## FAQ - -### **What is a dedicated test package for?** - -This is a dedicated test package meaning that it verifies the integration between two packages that are somehow dependent on each other and therefore these tests cannot be added properly in the child package due to circular dependency issues and it would not be fitting to add it in the parent because the child package's tests should not be held by the parent as a matter of principle. diff --git a/packages/cactus-test-cmd-api-server/package.json b/packages/cactus-test-cmd-api-server/package.json deleted file mode 100644 index 77073cd7e1..0000000000 --- a/packages/cactus-test-cmd-api-server/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-cmd-api-server", - "version": "2.0.0", - "description": "Integration tests for the Cactus API Client package (formerly known as the Cactus SDK package that has been renamed for to purpose of being less ambiguous)", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-test-cmd-api-server.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-vault": "2.0.0", - "express-jwt-authz": "2.4.1", - "jose": "4.15.5", - "uuid": "10.0.0" - }, - "devDependencies": { - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-test-cmd-api-server.web.umd.min.js", - "mainMinified": "dist/cactus-test-cmd-api-server.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-test-cmd-api-server/src/main/typescript/index.ts b/packages/cactus-test-cmd-api-server/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-test-cmd-api-server/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-cmd-api-server/src/main/typescript/index.web.ts b/packages/cactus-test-cmd-api-server/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-cmd-api-server/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-cmd-api-server/src/main/typescript/public-api.ts b/packages/cactus-test-cmd-api-server/src/main/typescript/public-api.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-cmd-api-server/src/main/typescript/public-api.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-test-cmd-api-server/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/plugin-import-with-npm-install-version-selection.test.ts b/packages/cactus-test-cmd-api-server/src/test/typescript/integration/plugin-import-with-npm-install-version-selection.test.ts deleted file mode 100644 index 67ea222c61..0000000000 --- a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/plugin-import-with-npm-install-version-selection.test.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { randomUUID as uuidv4 } from "node:crypto"; -import path from "node:path"; -import { readFile } from "node:fs/promises"; - -import "jest-extended"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { - PluginImport, - PluginImportAction, - PluginImportType, -} from "@hyperledger/cactus-core-api"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; - -const logLevel: LogLevelDesc = "INFO"; - -describe("ApiServer", () => { - const pluginsPath = path.join( - __dirname, - "../../../../../../", // walk back up to the project root - ".tmp/test/test-cmd-api-server/plugin-import-with-npm-install_test/", // the dir path from the root - uuidv4(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - - const aPluginImport: PluginImport = { - packageName: "@hyperledger/cactus-plugin-keychain-memory", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel, - version: "0.9.0", - }, - }; - - const packageFilePath = path.join( - pluginsPath, - aPluginImport.options.instanceId, - "node_modules", - `${aPluginImport.packageName}`, - "package.json", - ); - - const configService = new ConfigService(); - - let apiServer: ApiServer; - - beforeAll(async () => { - const apiSrvOpts = await configService.newExampleConfig(); - apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.logLevel = logLevel; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = 0; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.plugins = [aPluginImport]; - const config = await configService.newExampleConfigConvict(apiSrvOpts); - - apiServer = new ApiServer({ - config: config.getProperties(), - }); - }); - - afterAll(async () => { - await apiServer.shutdown(); - }); - - test("can install plugins at runtime with specified version based on imports", async () => { - const startResponse = apiServer.start(); - await expect(startResponse).toResolve(); - - const pkgJsonStr = await readFile(packageFilePath, "utf-8"); - const { version } = JSON.parse(pkgJsonStr); - - expect(version).toEqual(aPluginImport.options.version); - }); -}); diff --git a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/plugin-import-with-npm-install.test.ts b/packages/cactus-test-cmd-api-server/src/test/typescript/integration/plugin-import-with-npm-install.test.ts deleted file mode 100644 index d5c25cbfee..0000000000 --- a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/plugin-import-with-npm-install.test.ts +++ /dev/null @@ -1,92 +0,0 @@ -import path from "path"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { generateKeyPair, exportPKCS8 } from "jose"; - -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -import { - PluginImportType, - ConsortiumDatabase, - PluginImportAction, -} from "@hyperledger/cactus-core-api"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; - -const logLevel: LogLevelDesc = "TRACE"; -const testcase = "can instal plugins at runtime based on imports"; - -describe(testcase, () => { - let apiServer: ApiServer; - - beforeAll(async () => { - // Adding a new plugin to update the prometheus metric K_CACTUS_API_SERVER_TOTAL_PLUGIN_IMPORTS - const keyPair = await generateKeyPair("ES256K"); - const keyPairPem = await exportPKCS8(keyPair.privateKey); - const db: ConsortiumDatabase = { - cactusNode: [], - consortium: [], - consortiumMember: [], - ledger: [], - pluginInstance: [], - }; - const pluginsPath = path.join( - __dirname, - "../../../../../../", // walk back up to the project root - ".tmp/test/test-cmd-api-server/plugin-import-with-npm-install_test/", // the dir path from the root - uuidv4(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - - const configService = new ConfigService(); - - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = 0; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = [ - { - packageName: "@hyperledger/cactus-plugin-keychain-memory", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel, - }, - }, - { - packageName: "@hyperledger/cactus-plugin-consortium-manual", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: uuidv4(), - keyPairPem: keyPairPem, - consortiumDatabase: db, - }, - }, - ]; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - apiServer = new ApiServer({ - config: config.getProperties(), - }); - }); - afterAll(() => apiServer.shutdown()); - - test(testcase, async () => { - const startResponse = apiServer.start(); - await expect(startResponse).resolves.toBeTruthy(); - }); -}); diff --git a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts b/packages/cactus-test-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts deleted file mode 100644 index 068b0eed3e..0000000000 --- a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { - CactusKeychainVaultServer, - Containers, - K_DEFAULT_VAULT_DEV_ROOT_TOKEN, - K_DEFAULT_VAULT_HTTP_PORT, - VaultTestServer, -} from "@hyperledger/cactus-test-tooling"; - -import { - DefaultApi, - PluginFactoryKeychain, -} from "@hyperledger/cactus-plugin-keychain-vault"; -import { - Configuration, - IPluginKeychain, - PluginImportType, -} from "@hyperledger/cactus-core-api"; - -const testCase = "NodeJS API server + Rust plugin work together"; - -describe(testCase, () => { - let vaultTestContainer: VaultTestServer; - let apiServer: ApiServer; - let pluginContainer: any; - - afterAll(async () => { - await vaultTestContainer.stop(); - await vaultTestContainer.destroy(); - await apiServer.shutdown(); - await pluginContainer.stop(); - await pluginContainer.destroy(); - }); - - test(testCase, async () => { - vaultTestContainer = new VaultTestServer({}); - await vaultTestContainer.start(); - - const ci = await Containers.getById(vaultTestContainer.containerId); - const vaultIpAddr = await Containers.getContainerInternalIp(ci); - console.log(`Container VaultTestServer has IPv4: ${vaultIpAddr}`); - - const hostPortVault = await vaultTestContainer.getHostPortHttp(); - console.log(`Container VaultTestServer (Port=${hostPortVault}) started OK`); - - const vaultHost = `http://${vaultIpAddr}:${K_DEFAULT_VAULT_HTTP_PORT}`; - - pluginContainer = new CactusKeychainVaultServer({ - envVars: [ - `VAULT_HOST=${vaultHost}`, - `VAULT_TOKEN=${K_DEFAULT_VAULT_DEV_ROOT_TOKEN}`, - "HOST=0.0.0.0:8080", - ], - }); - await pluginContainer.start(); - - const hostPort = await pluginContainer.getHostPortHttp(); - console.log(`CactusKeychainVaultServer (Port=${hostPort}) started OK`); - - const configuration = new Configuration({ - basePath: `http://127.0.0.1:${hostPort}`, - }); - const apiClient = new DefaultApi(configuration); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = 0; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = []; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - const factory = new PluginFactoryKeychain({ - pluginImportType: PluginImportType.Remote, - }); - - const plugin: IPluginKeychain = await factory.create({ - keychainId: "_keychainId_", - instanceId: "_instanceId_", - remoteConfig: configuration, - }); - - const pluginRegistry = new PluginRegistry({ plugins: [plugin] }); - - apiServer = new ApiServer({ - config: config.getProperties(), - pluginRegistry, - }); - - const startResponse = apiServer.start(); - expect(startResponse).toBeTruthy(); - await expect(startResponse).not.toReject(); - - const key = uuidv4(); - const expected = uuidv4(); - - await apiClient.setKeychainEntryV1({ key, value: expected }); - const { - data: { value: actual }, - } = await apiClient.getKeychainEntryV1({ key }); - - expect(actual).toBe(expected); - }); -}); diff --git a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/runtime-plugin-imports.test.ts b/packages/cactus-test-cmd-api-server/src/test/typescript/integration/runtime-plugin-imports.test.ts deleted file mode 100644 index 7a9e56fc91..0000000000 --- a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/runtime-plugin-imports.test.ts +++ /dev/null @@ -1,78 +0,0 @@ -import path from "path"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - PluginImportAction, - PluginImportType, -} from "@hyperledger/cactus-core-api"; - -const logLevel: LogLevelDesc = "TRACE"; -const testCase = "can import plugins at runtime (CLI)"; -describe(testCase, () => { - let apiServer: ApiServer; - - afterEach(() => { - jest.useRealTimers(); - }); - - test(testCase, async () => { - const pluginsPath = path.join( - __dirname, // start at the current file's path - "../../../../../../", // walk back up to the project root - ".tmp/test/cmd-api-server/runtime-plugin-imports_test", // the dir path from the root - uuidv4(), // then a random directory to ensure proper isolation - ); - const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.pluginManagerOptionsJson = pluginManagerOptionsJson; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = 0; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = [ - { - packageName: "@hyperledger/cactus-plugin-keychain-memory", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel, - }, - }, - ]; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - apiServer = new ApiServer({ - config: config.getProperties(), - }); - apiServerOptions.plugins = [ - { - packageName: "@hyperledger/cactus-plugin-keychain-memory", - type: PluginImportType.Local, - action: PluginImportAction.Install, - options: { - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel, - }, - }, - ]; - await expect(apiServer.start()).not.toReject(); - }); - afterAll(async () => { - await apiServer.shutdown(); - }); -}); diff --git a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/tap-parallel-not-ok b/packages/cactus-test-cmd-api-server/src/test/typescript/integration/tap-parallel-not-ok deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/cactus-test-cmd-api-server/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-test-cmd-api-server/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-cmd-api-server/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-cmd-api-server/tsconfig.json b/packages/cactus-test-cmd-api-server/tsconfig.json deleted file mode 100644 index c0e19151a4..0000000000 --- a/packages/cactus-test-cmd-api-server/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-cmd-api-server.tsbuildinfo" - }, - "include": [ - "./src" - ], - "references": [ - { - "path": "../cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-vault/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-test-geth-ledger/CHANGELOG.md b/packages/cactus-test-geth-ledger/CHANGELOG.md deleted file mode 100644 index 5a02c95b70..0000000000 --- a/packages/cactus-test-geth-ledger/CHANGELOG.md +++ /dev/null @@ -1,81 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-test-geth-ledger - -# [2.0.0-rc.6](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-geth-ledger - -# [2.0.0-rc.5](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-geth-ledger - -# [2.0.0-rc.4](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-geth-ledger - -# [2.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Code Refactoring - -* retire connector plugin specific container images, fix docs ([24b5888](https://github.com/hyperledger/cactus/commit/24b5888247d134ea417fc0e83dccc9826b4075f3)) - -### BREAKING CHANGES - -* Container images are being deleted here and will also -get deleted from GHCR. Though the public APIs of the Typescript code -do not change, still, some parts of the documentation will become invalid -until we update it to match the changes here. -I invested a large amount of effort into doing this documentation update -as part of this change but it is very likely that I've missed a few spots -and therefore it is best to mark this as a breaking change in my opinion -to call attention to the fact that we still have ways to go with updating -the documentation around these container images. - -1. Deleted all the container images that were just wrappers around the -cmd-api-server container image installing their own npm package from -the registry. -The reason for this is that they ended up just being maintenance burden -since we can achieve the exact same things just by re-using the API server's -container image directly. -2. This way we don't have to deal with CVEs in 10x container images when -it's really just the one container image that we use as the base that needs -to deal with them anyway. -3. I also spent quite a bit of effort in this change to update the README.md -files of the packages where previously we had plugin specific container images -defined so that the README.md files have the tutorials that are more up to -date compared to how they were (most of them had the tutorials completely -broken for a long while which was causing a lot of difficulties to the -newcomers who were trying to work with the packages). -4. The reason why they got so out of date traces back to the undue maintenance -burden of keeping separate images for each connector plugin. We hope that -with this simplification we can keep the documentation continuously up to -date since it will require less time do so. -5. Also deleted the ci.yaml container building jobs which were relevant to -the scope of this change so that we also save on CI resources, another -long-running project that's been in need of some attention from the maintainers. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-geth-ledger - -# [2.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Features - -* **cactus-plugin-ledger-connector-ethereum:** add stress test ([55fa26e](https://github.com/hyperledger/cactus/commit/55fa26ef41d405b26da02b099418da5fa281c78f)), closes [#2631](https://github.com/hyperledger/cactus/issues/2631) -* **cactus-plugin-ledger-connector-ethereum:** update web3js to 4.X ([55f82c9](https://github.com/hyperledger/cactus/commit/55f82c9568b3e875de4f3ceb89a828f8b23d65be)), closes [#2580](https://github.com/hyperledger/cactus/issues/2580) [#2535](https://github.com/hyperledger/cactus/issues/2535) [#2578](https://github.com/hyperledger/cactus/issues/2578) -* **cactus-plugin-persistence-ethereum:** use openapi ethereum connector ([b8f9b79](https://github.com/hyperledger/cactus/commit/b8f9b79daa7a97cbd75325eba00c7458bfed5ce5)), closes [#2631](https://github.com/hyperledger/cactus/issues/2631) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cactus/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Features - -* **geth-all-in-one:** add ethereum test image and helper class ([fb4231f](https://github.com/hyperledger/cactus/commit/fb4231f3e8ddc2b7c4aadddf62dac759b7a62d44)), closes [#2577](https://github.com/hyperledger/cactus/issues/2577) diff --git a/packages/cactus-test-geth-ledger/README.md b/packages/cactus-test-geth-ledger/README.md deleted file mode 100644 index a6d737a451..0000000000 --- a/packages/cactus-test-geth-ledger/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# `@hyperledger/cactus-test-geth-ledger` - -Helpers for running test `go-ethereum` ledger in test scripts. - -## Summary - -- [Getting Started](#getting-started) -- [Usage](#usage) -- [Runing the tests](#running-the-tests) -- [Contributing](#contributing) -- [License](#license) -- [Acknowledgments](#acknowledgments) - -## Getting Started - -Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on -your local machine for development and testing purposes. - -### Prerequisites - -In the root of the project to install the dependencies execute the command: - -```sh -npm run configure -``` - -## Usage - -- In order to start the new test ledger, you must import `GethTestLedger` and `start()` it. -- Options can be modified by supplying constructor argument object. -- See tests for more complete usage examples. - -```typescript -import { GethTestLedger } from "@hyperledger/cactus-test-geth-ledger"; - -// You can supply empty object, suitable default values will be used. -const options = { - containerImageName: "cactus_geth_all_in_one", // geth AIO container name - containerImageVersion: "local-build", // geth AIO container tag - logLevel: "info" as LogLevelDesc, // log verbosity of test class, not ethereum node! - emitContainerLogs: false, // will print ethereum node logs here if `true` - envVars: [], // environment variables to provide when starting the ledger - useRunningLedger: false, // test flag to search for already running ledger instead of starting new one (only for development) -}; - -const ledger = new GethTestLedger(options); -await ledger.start(); -// await ledger.start(true); // don't pull image, use one from local storage - -// Use -const rpcApiHttpHost = await ledger.getRpcApiHttpHost(); -``` - -## Running the tests - -To check that all has been installed correctly and that the test class has no errors: - -- Run this command at the project's root: - -```sh -npx jest cactus-test-geth-ledger -``` - -## Contributing - -We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! - -Please review [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. - -## License - -This distribution is published under the Apache License Version 2.0 found in the [LICENSE](../../LICENSE) file. - -## Acknowledgments diff --git a/packages/cactus-test-geth-ledger/package.json b/packages/cactus-test-geth-ledger/package.json deleted file mode 100644 index 4875a4d655..0000000000 --- a/packages/cactus-test-geth-ledger/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-geth-ledger", - "version": "2.0.0", - "description": "Helpers for running test go-ethereum ledger in test scripts.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cactus#readme", - "bugs": { - "url": "https://github.com/hyperledger/cactus/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cactus.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cactus" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-test-geth-ledger.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "dockerode": "3.3.0", - "internal-ip": "6.2.0", - "run-time-error-cjs": "1.4.0", - "web3": "4.0.3", - "web3-eth-accounts": "4.0.3" - }, - "devDependencies": { - "@types/dockerode": "3.2.7" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-test-geth-ledger.web.umd.min.js", - "mainMinified": "dist/cactus-test-geth-ledger.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-test-geth-ledger/src/main/typescript/geth-test-ledger.ts b/packages/cactus-test-geth-ledger/src/main/typescript/geth-test-ledger.ts deleted file mode 100644 index 7e5d5f7f3b..0000000000 --- a/packages/cactus-test-geth-ledger/src/main/typescript/geth-test-ledger.ts +++ /dev/null @@ -1,413 +0,0 @@ -import { EventEmitter } from "events"; -import Docker, { Container } from "dockerode"; -import { v4 as internalIpV4 } from "internal-ip"; -import Web3, { ContractAbi, TransactionReceipt } from "web3"; -import type { Web3Account } from "web3-eth-accounts"; -import { RuntimeError } from "run-time-error-cjs"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { Containers } from "@hyperledger/cactus-test-tooling"; - -export interface IGethTestLedgerOptions { - readonly containerImageName?: string; - readonly containerImageVersion?: string; - readonly logLevel?: LogLevelDesc; - readonly emitContainerLogs?: boolean; - readonly envVars?: string[]; - // For test development, attach to ledger that is already running, don't spin up new one - readonly useRunningLedger?: boolean; -} - -/** - * Default values used by GethTestLedger constructor. - */ -export const GETH_TEST_LEDGER_DEFAULT_OPTIONS = Object.freeze({ - containerImageName: "ghcr.io/hyperledger/cacti-geth-all-in-one", - containerImageVersion: "2023-07-27-2a8c48ed6", - logLevel: "info" as LogLevelDesc, - emitContainerLogs: false, - envVars: [], - useRunningLedger: false, -}); - -export const WHALE_ACCOUNT_PRIVATE_KEY = - "86bbf98cf5e5b1c43d2c8701764897357e0fa24982c0137efabf6dc3a6e7b69e"; -export const WHALE_ACCOUNT_ADDRESS = - "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0"; - -export class GethTestLedger { - public static readonly CLASS_NAME = "GethTestLedger"; - private readonly log: Logger; - private readonly logLevel: LogLevelDesc; - private readonly containerImageName: string; - private readonly containerImageVersion: string; - private readonly envVars: string[]; - private readonly emitContainerLogs: boolean; - public readonly useRunningLedger: boolean; - private _container: Container | undefined; - private _containerId: string | undefined; - private _web3: Web3 | undefined; - - public get fullContainerImageName(): string { - return [this.containerImageName, this.containerImageVersion].join(":"); - } - - public get className(): string { - return GethTestLedger.CLASS_NAME; - } - - public get container(): Container { - if (this._container) { - return this._container; - } else { - throw new Error(`Invalid state: _container is not set. Called start()?`); - } - } - - private get web3(): Web3 { - if (this._web3) { - return this._web3; - } else { - throw new Error( - "Invalid state: web3 client is missing, start the ledger container first.", - ); - } - } - - constructor(public readonly options: IGethTestLedgerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - this.logLevel = - this.options.logLevel || GETH_TEST_LEDGER_DEFAULT_OPTIONS.logLevel; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level: this.logLevel, label }); - - this.emitContainerLogs = - options?.emitContainerLogs ?? - GETH_TEST_LEDGER_DEFAULT_OPTIONS.emitContainerLogs; - this.useRunningLedger = - options?.useRunningLedger ?? - GETH_TEST_LEDGER_DEFAULT_OPTIONS.useRunningLedger; - this.containerImageName = - this.options.containerImageName || - GETH_TEST_LEDGER_DEFAULT_OPTIONS.containerImageName; - this.containerImageVersion = - this.options.containerImageVersion || - GETH_TEST_LEDGER_DEFAULT_OPTIONS.containerImageVersion; - this.envVars = - this.options.envVars || GETH_TEST_LEDGER_DEFAULT_OPTIONS.envVars; - - this.log.info( - `Created ${this.className} OK. Image FQN: ${this.fullContainerImageName}`, - ); - } - - /** - * Get container status. - * - * @returns status string - */ - public async getContainerStatus(): Promise { - if (!this.container) { - throw new Error( - "GethTestLedger#getContainerStatus(): Container not started yet!", - ); - } - - const { Status } = await Containers.getById(this.container.id); - return Status; - } - - /** - * Start a test Geth ledger. - * - * @param omitPull Don't pull docker image from upstream if true. - * @returns Promise - */ - public async start(omitPull = false, cmd: string[] = []): Promise { - if (this.useRunningLedger) { - this.log.info( - "Search for already running Geth Test Ledger because 'useRunningLedger' flag is enabled.", - ); - this.log.info( - "Search criteria - image name: ", - this.fullContainerImageName, - ", state: running", - ); - const containerInfo = await Containers.getByPredicate( - (ci) => - ci.Image === this.fullContainerImageName && ci.State === "healthy", - ); - const docker = new Docker(); - this._container = docker.getContainer(containerInfo.Id); - return this._container; - } - - if (this._container) { - this.log.warn("Container was already running - restarting it..."); - await this.container.stop(); - await this.container.remove(); - this._container = undefined; - } - - if (!omitPull) { - await Containers.pullImage( - this.fullContainerImageName, - {}, - this.logLevel, - ); - } - - return new Promise((resolve, reject) => { - const docker = new Docker(); - const eventEmitter: EventEmitter = docker.run( - this.fullContainerImageName, - cmd, - [], - { - ExposedPorts: { - ["8545/tcp"]: {}, - ["8546/tcp"]: {}, - }, - Env: this.envVars, - HostConfig: { - PublishAllPorts: true, - }, - }, - {}, - (err?: Error) => { - if (err) { - this.log.error( - `Failed to start ${this.fullContainerImageName} container; `, - err, - ); - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this._container = container; - this._containerId = container.id; - - if (this.emitContainerLogs) { - const fnTag = `[${this.fullContainerImageName}]`; - await Containers.streamLogs({ - container: this.container, - tag: fnTag, - log: this.log, - }); - } - - try { - await Containers.waitForHealthCheck(this._containerId); - this._web3 = new Web3(await this.getRpcApiHttpHost()); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - /** - * Stop a test Geth ledger. - * - * @returns Stop operation results. - */ - public async stop(): Promise { - if (this.useRunningLedger) { - this.log.info("Ignore stop request because useRunningLedger is enabled."); - return; - } else if (this.container) { - this._web3 = undefined; - return Containers.stop(this.container); - } else { - throw new Error( - `GethTestLedger#stop() Container was never created, nothing to stop.`, - ); - } - } - - /** - * Destroy a test Geth ledger. - * - * @returns Destroy operation results. - */ - public async destroy(): Promise { - if (this.useRunningLedger) { - this.log.info( - "Ignore destroy request because useRunningLedger is enabled.", - ); - return; - } else if (this.container) { - this._web3 = undefined; - return this.container.remove(); - } else { - throw new Error( - `GethTestLedger#destroy() Container was never created, nothing to destroy.`, - ); - } - } - - /** - * Creates a new ETH account from scratch on the ledger and then sends it a - * little seed money to get things started. - * - * Uses `web3.eth.accounts.create` - * - * @param [seedMoney=10e18 (1ETH)] The amount of money to seed the new test account with. - */ - public async createEthTestAccount(seedMoney = 10e18): Promise { - const ethTestAccount = this.web3.eth.accounts.create(); - - const receipt = await this.transferAssetFromCoinbase( - ethTestAccount.address, - seedMoney, - ); - - if (receipt instanceof Error) { - throw new RuntimeError("Error in createEthTestAccount", receipt); - } else { - return ethTestAccount; - } - } - - /** - * Creates a new personal ethereum account with specified initial money and password. - * - * Uses `web3.eth.personal.newAccount` - * - * @param seedMoney Initial money to transfer to this account - * @param password Personal account password - * @returns New account address - */ - public async newEthPersonalAccount( - seedMoney = 10e18, - password = "test", - ): Promise { - const account = await this.web3.eth.personal.newAccount(password); - - const receipt = await this.transferAssetFromCoinbase(account, seedMoney); - - if (receipt instanceof Error) { - throw new RuntimeError("Error in newEthPersonalAccount", receipt); - } else { - return account; - } - } - - /** - * Seed `targetAccount` with money from coin base account. - * - * @param targetAccount Ethereum account to send money to. - * @param value Amount of money. - * @returns Transfer `TransactionReceipt` - */ - public async transferAssetFromCoinbase( - targetAccount: string, - value: number, - ): Promise { - const fnTag = `${this.className}#transferAssetFromCoinbase()`; - - const tx = await this.web3.eth.accounts.signTransaction( - { - from: WHALE_ACCOUNT_ADDRESS, - to: targetAccount, - value: value, - gasPrice: await this.web3.eth.getGasPrice(), - gas: 1000000, - }, - WHALE_ACCOUNT_PRIVATE_KEY, - ); - - if (!tx.rawTransaction) { - throw new Error(`${fnTag} Signing transaction failed, reason unknown.`); - } - - return await this.web3.eth.sendSignedTransaction(tx.rawTransaction); - } - - /** - * Deploy contract from coin base account to the ledger. - * - * @param abi - JSON interface of the contract. - * @param bytecode - Compiled code of the contract. - * @param args - Contract arguments. - * @returns Contract deployment `TransactionReceipt` - */ - public async deployContract( - abi: ContractAbi, - bytecode: string, - args?: any[], - ): Promise { - // Encode ABI - const contractProxy = new this.web3.eth.Contract(abi); - const contractTx = contractProxy.deploy({ - data: bytecode, - arguments: args as any, - }); - - // Send TX - const signedTx = await this.web3.eth.accounts.signTransaction( - { - from: WHALE_ACCOUNT_ADDRESS, - data: contractTx.encodeABI(), - gasPrice: await this.web3.eth.getGasPrice(), - gasLimit: 8000000, - nonce: await this.web3.eth.getTransactionCount(WHALE_ACCOUNT_ADDRESS), - }, - WHALE_ACCOUNT_PRIVATE_KEY, - ); - - if (!signedTx.rawTransaction) { - throw new Error(`Signing transaction failed, reason unknown.`); - } - - return await this.web3.eth.sendSignedTransaction(signedTx.rawTransaction); - } - - public async getRpcApiHttpHost( - host?: string, - port?: number, - ): Promise { - const thePort = port || (await this.getHostPortHttp()); - const lanIpV4OrUndefined = await internalIpV4(); - const lanAddress = host || lanIpV4OrUndefined || "127.0.0.1"; // best effort... - return `http://${lanAddress}:${thePort}`; - } - - public async getRpcApiWebSocketHost( - host?: string, - port?: number, - ): Promise { - const thePort = port || (await this.getHostPortWs()); - const lanIpV4OrUndefined = await internalIpV4(); - const lanAddress = host || lanIpV4OrUndefined || "127.0.0.1"; // best effort... - return `ws://${lanAddress}:${thePort}`; - } - - private async getHostPort(port: number): Promise { - const fnTag = `${this.className}#getHostPort()`; - if (this._containerId) { - const cInfo = await Containers.getById(this._containerId); - return Containers.getPublicPort(port, cInfo); - } else { - throw new Error(`${fnTag} Container ID not set. Did you call start()?`); - } - } - - public async getHostPortHttp(): Promise { - return this.getHostPort(8545); - } - - public async getHostPortWs(): Promise { - return this.getHostPort(8546); - } -} diff --git a/packages/cactus-test-geth-ledger/src/main/typescript/index.ts b/packages/cactus-test-geth-ledger/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-test-geth-ledger/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-geth-ledger/src/main/typescript/index.web.ts b/packages/cactus-test-geth-ledger/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-geth-ledger/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-geth-ledger/src/main/typescript/public-api.ts b/packages/cactus-test-geth-ledger/src/main/typescript/public-api.ts deleted file mode 100755 index 262913be47..0000000000 --- a/packages/cactus-test-geth-ledger/src/main/typescript/public-api.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { - IGethTestLedgerOptions, - GETH_TEST_LEDGER_DEFAULT_OPTIONS, - WHALE_ACCOUNT_PRIVATE_KEY, - WHALE_ACCOUNT_ADDRESS, - GethTestLedger, -} from "./geth-test-ledger"; diff --git a/packages/cactus-test-geth-ledger/src/test/solidity/hello-world-contract/HelloWorld.json b/packages/cactus-test-geth-ledger/src/test/solidity/hello-world-contract/HelloWorld.json deleted file mode 100644 index 4cd84064e1..0000000000 --- a/packages/cactus-test-geth-ledger/src/test/solidity/hello-world-contract/HelloWorld.json +++ /dev/null @@ -1,409 +0,0 @@ -{ - "contractName": "HelloWorld", - "abi": [ - { - "inputs": [], - "name": "getName", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sayHello", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "setName", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.7.2+commit.51b20bc0\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sayHello\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol\":\"HelloWorld\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol\":{\"keccak256\":\"0x0b78fa11f33f7936a80da194c49f04198e38947e3f98f3a7b765b4adb4c455c1\",\"urls\":[\"bzz-raw://12697aa12341c70ed7a411a27a17398dcb2d4336a14dac51845e2123acf174c7\",\"dweb:/ipfs/QmPhH1UbHtUeeen9W2qMDwEVVWAtVJSMN29Nch5q8Gax1D\"]}},\"version\":1}", - "bytecode": "60c0604052600d60808190526c4361707461696e43616374757360981b60a090815261002e9160009190610041565b5034801561003b57600080fd5b506100d4565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061008257805160ff19168380011785556100af565b828001600101855582156100af579182015b828111156100af578251825591602001919060010190610094565b506100bb9291506100bf565b5090565b5b808211156100bb57600081556001016100c0565b61030f806100e36000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806317d7de7c14610046578063c47f0027146100c3578063ef5fb05b1461016b575b600080fd5b61004e610173565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610169600480360360208110156100d957600080fd5b8101906020810181356401000000008111156100f457600080fd5b82018360208201111561010657600080fd5b8035906020019184600183028401116401000000008311171561012857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610209945050505050565b005b61004e610220565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156101ff5780601f106101d4576101008083540402835291602001916101ff565b820191906000526020600020905b8154815290600101906020018083116101e257829003601f168201915b5050505050905090565b805161021c906000906020840190610246565b5050565b60408051808201909152600c81526b48656c6c6f20576f726c642160a01b602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061028757805160ff19168380011785556102b4565b828001600101855582156102b4579182015b828111156102b4578251825591602001919060010190610299565b506102c09291506102c4565b5090565b5b808211156102c057600081556001016102c556fea2646970667358221220965216915797db694e698c024753d560e1989f2aebb14463f9225b2297003b2c64736f6c63430007020033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100415760003560e01c806317d7de7c14610046578063c47f0027146100c3578063ef5fb05b1461016b575b600080fd5b61004e610173565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610169600480360360208110156100d957600080fd5b8101906020810181356401000000008111156100f457600080fd5b82018360208201111561010657600080fd5b8035906020019184600183028401116401000000008311171561012857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610209945050505050565b005b61004e610220565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156101ff5780601f106101d4576101008083540402835291602001916101ff565b820191906000526020600020905b8154815290600101906020018083116101e257829003601f168201915b5050505050905090565b805161021c906000906020840190610246565b5050565b60408051808201909152600c81526b48656c6c6f20576f726c642160a01b602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061028757805160ff19168380011785556102b4565b828001600101855582156102b4579182015b828111156102b4578251825591602001919060010190610299565b506102c09291506102c4565b5090565b5b808211156102c057600081556001016102c556fea2646970667358221220965216915797db694e698c024753d560e1989f2aebb14463f9225b2297003b2c64736f6c63430007020033", - "sourceMap": "463:37:0:-:0;439:322;463:37;;439:322;463:37;;;-1:-1:-1;;;463:37:0;;;;;;-1:-1:-1;;463:37:0;;:::i;:::-;;439:322;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;439:322:0;;;-1:-1:-1;439:322:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "439:322:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;598:81;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;683:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;683:76:0;;-1:-1:-1;683:76:0;;-1:-1:-1;;;;;683:76:0:i;:::-;;505:89;;;:::i;598:81::-;670:4;663:11;;;;;;;;-1:-1:-1;;663:11:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;638:13;;663:11;;670:4;;663:11;;670:4;663:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;598:81;:::o;683:76::-;740:14;;;;:4;;:14;;;;;:::i;:::-;;683:76;:::o;505:89::-;568:21;;;;;;;;;;;;-1:-1:-1;;;568:21:0;;;;505:89;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;", - "sourcePath": "/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol", - "compiler": { - "name": "solc", - "version": "0.7.2+commit.51b20bc0" - }, - "networks": {}, - "ast": { - "absolutePath": "/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol", - "exportedSymbols": { - "HelloWorld": [31] - }, - "id": 32, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": ["solidity", ">=", "0.7", ".0"], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 31, - "linearizedBaseContracts": [31], - "name": "HelloWorld", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "463:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "463:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "hexValue": "4361707461696e436163747573", - "id": 3, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:15:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", - "typeString": "literal_string \"CaptainCactus\"" - }, - "value": "CaptainCactus" - }, - "visibility": "private" - }, - { - "body": { - "id": 11, - "nodeType": "Block", - "src": "562:32:0", - "statements": [ - { - "expression": { - "hexValue": "48656c6c6f20576f726c6421", - "id": 9, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "575:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", - "typeString": "literal_string \"Hello World!\"" - }, - "value": "Hello World!" - }, - "functionReturnParameters": 8, - "id": 10, - "nodeType": "Return", - "src": "568:21:0" - } - ] - }, - "functionSelector": "ef5fb05b", - "id": 12, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sayHello", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5, - "nodeType": "ParameterList", - "parameters": [], - "src": "523:2:0" - }, - "returnParameters": { - "id": 8, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12, - "src": "547:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 6, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "547:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "546:15:0" - }, - "scope": 31, - "src": "505:89:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 19, - "nodeType": "Block", - "src": "655:24:0", - "statements": [ - { - "expression": { - "id": 17, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "670:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 16, - "id": 18, - "nodeType": "Return", - "src": "663:11:0" - } - ] - }, - "functionSelector": "17d7de7c", - "id": 20, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13, - "nodeType": "ParameterList", - "parameters": [], - "src": "614:2:0" - }, - "returnParameters": { - "id": 16, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 20, - "src": "638:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "638:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "637:15:0" - }, - "scope": 31, - "src": "598:81:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 29, - "nodeType": "Block", - "src": "732:27:0", - "statements": [ - { - "expression": { - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 25, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "740:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 26, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "747:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "740:14:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 28, - "nodeType": "ExpressionStatement", - "src": "740:14:0" - } - ] - }, - "functionSelector": "c47f0027", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "newName", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "700:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "700:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "699:23:0" - }, - "returnParameters": { - "id": 24, - "nodeType": "ParameterList", - "parameters": [], - "src": "732:0:0" - }, - "scope": 31, - "src": "683:76:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 32, - "src": "439:322:0" - } - ], - "src": "413:349:0" - }, - "functionHashes": { - "getName()": "17d7de7c", - "sayHello()": "ef5fb05b", - "setName(string)": "c47f0027" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "156600", - "executionCost": "infinite", - "totalCost": "infinite" - }, - "external": { - "getName()": "infinite", - "sayHello()": "infinite", - "setName(string)": "infinite" - } - } -} diff --git a/packages/cactus-test-geth-ledger/src/test/solidity/hello-world-contract/HelloWorld.sol b/packages/cactus-test-geth-ledger/src/test/solidity/hello-world-contract/HelloWorld.sol deleted file mode 100644 index 201fddd6fc..0000000000 --- a/packages/cactus-test-geth-ledger/src/test/solidity/hello-world-contract/HelloWorld.sol +++ /dev/null @@ -1,24 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; - -contract HelloWorld { - string private name = "CaptainCactus"; - - function sayHello() public pure returns (string memory) { - return "Hello World!"; - } - - function getName() public view returns (string memory) { - return name; - } - - function setName(string memory newName) public { - name = newName; - } -} diff --git a/packages/cactus-test-geth-ledger/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-test-geth-ledger/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-test-geth-ledger/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-geth-ledger/src/test/typescript/integration/geth-test-ledger.test.ts b/packages/cactus-test-geth-ledger/src/test/typescript/integration/geth-test-ledger.test.ts deleted file mode 100644 index 3289183a93..0000000000 --- a/packages/cactus-test-geth-ledger/src/test/typescript/integration/geth-test-ledger.test.ts +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Tests of Geth helper typescript setup class. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import { GethTestLedger } from "../../../main/typescript/index"; -import contractData from "../../solidity/hello-world-contract/HelloWorld.json"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; - -import "jest-extended"; -import { Web3 } from "web3"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "geth-test-ledger.test", - level: testLogLevel, -}); - -/** - * Main test suite - */ -describe("Geth Test Ledger checks", () => { - let ledger: GethTestLedger; - let web3Instance: Web3; - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - log.info("Start GethTestLedger..."); - ledger = new GethTestLedger({ - emitContainerLogs: true, - logLevel: testLogLevel, - }); - expect(ledger).toBeTruthy(); - log.debug("Geth image:", ledger.fullContainerImageName); - - await ledger.start(); - web3Instance = new Web3(await ledger.getRpcApiHttpHost()); - expect(web3Instance).toBeTruthy; - }); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (ledger) { - log.info("Stop the fabric ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }); - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - /** - * Check if started container is still healthy. - */ - test("Started container is healthy", async () => { - const status = await ledger.getContainerStatus(); - expect(status).toEndWith("(healthy)"); - }); - - test("web3 can be attached through HTTP endpoint", async () => { - const httpRpcHost = await ledger.getRpcApiHttpHost(); - const httpWeb3 = new Web3(httpRpcHost); - const blockNumber = await httpWeb3.eth.getBlockNumber(); - expect(blockNumber.toString()).toBeTruthy(); - }); - - test("web3 can be attached through WS endpoint", async () => { - const wsRpcHost = await ledger.getRpcApiWebSocketHost(); - const wsWeb3 = new Web3(wsRpcHost); - try { - const blockNumber = await wsWeb3.eth.getBlockNumber(); - expect(blockNumber.toString()).toBeTruthy(); - } finally { - wsWeb3.provider?.disconnect(); - } - }); - - test("Class name is correct", async () => { - const className = ledger.className; - expect(className).toEqual("GethTestLedger"); - }); - - test("Method createEthTestAccount works", async () => { - const testEthAcc = await ledger.createEthTestAccount(); - - expect(testEthAcc).toBeTruthy(); - expect(testEthAcc.address).toHaveLength(42); - expect(testEthAcc.address).toStartWith("0x"); - }); - - test("Method newEthPersonalAccount works", async () => { - const testEthAccount = await ledger.newEthPersonalAccount(); - - expect(testEthAccount).toBeTruthy(); - expect(testEthAccount).toHaveLength(42); - expect(testEthAccount).toStartWith("0x"); - }); - - test("Method transferAssetFromCoinbase works", async () => { - const testEthAcc = await ledger.createEthTestAccount(); - - const txReceipt = await ledger.transferAssetFromCoinbase( - testEthAcc.address, - 1000, - ); - - expect(txReceipt).toBeTruthy(); - expect(web3Instance.utils.toChecksumAddress(txReceipt.to)).toEqual( - testEthAcc.address, - ); - expect(await web3Instance.eth.getBalance(testEthAcc.address)).toEqual( - BigInt("10000000000000001000"), - ); - }); - - test("Method deployContract works and returns contract address", async () => { - const deployedData = await ledger.deployContract( - contractData.abi, - contractData.bytecode, - [], - ); - expect(deployedData).toBeTruthy(); - expect(deployedData.contractAddress).toStartWith("0x"); - expect(deployedData.contractAddress).toHaveLength(42); - - const contract = new web3Instance.eth.Contract( - contractData.abi, - deployedData.contractAddress, - ); - expect(contract).toBeTruthy(); - - const contractCallResult = await contract.methods.sayHello().call(); - expect(contractCallResult).toEqual("Hello World!"); - }); - - test("Method getRpcApiHttpHost returns valid URL", async () => { - const httpHostAddress = await ledger.getRpcApiHttpHost(); - const httpPort = await ledger.getHostPortHttp(); - expect(httpHostAddress).toBeTruthy(); - expect(httpHostAddress).toStartWith("http://"); - expect(httpHostAddress).toContain(`${httpPort}`); - }); - - test("Method getRpcApiWebSocketHost returns valid URL", async () => { - const wsHostAddress = await ledger.getRpcApiWebSocketHost(); - const wsPort = await ledger.getHostPortWs(); - expect(wsHostAddress).toBeTruthy(); - expect(wsHostAddress).toStartWith("ws://"); - expect(wsHostAddress).toContain(`${wsPort}`); - }); -}); diff --git a/packages/cactus-test-geth-ledger/tsconfig.json b/packages/cactus-test-geth-ledger/tsconfig.json deleted file mode 100644 index ea14a1f425..0000000000 --- a/packages/cactus-test-geth-ledger/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "./dist/lib/", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-geth-ledger.tsbuildinfo" - }, - "include": ["./src", "src/**/*.json"], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} diff --git a/packages/cactus-test-plugin-consortium-manual/CHANGELOG.md b/packages/cactus-test-plugin-consortium-manual/CHANGELOG.md deleted file mode 100644 index 563a40d0b6..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/CHANGELOG.md +++ /dev/null @@ -1,183 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **cmd-api-server:** add GetOpenApiSpecV1Endpoint (HTTP GET) ([aeebbd4](https://github.com/hyperledger/cacti/commit/aeebbd4d86cb62f8d1d53fded65ae40eb5e27910)) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Bug Fixes - -* openapi validation test for consortium-manual plugin ([c568ad3](https://github.com/hyperledger/cactus/commit/c568ad3627f2f55a83ad9586b72824c44719e08a)), closes [#1297](https://github.com/hyperledger/cactus/issues/1297) [#847](https://github.com/hyperledger/cactus/issues/847) - -### Features - -* **core-api:** discontinue dedicated HTTP listeners for web service plugins ([3fbd2fc](https://github.com/hyperledger/cactus/commit/3fbd2fcb60d49090bf4e986bea74d4e988348659)), closes [#358](https://github.com/hyperledger/cactus/issues/358) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* **cmd-api-server:** support grpc web services [#1189](https://github.com/hyperledger/cactus/issues/1189) ([4cace1d](https://github.com/hyperledger/cactus/commit/4cace1dca3377e09d2ed37fdadeec6b125d47896)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -### Bug Fixes - -* **plugin-consortium-manual:** drop repo constructor arg [#1199](https://github.com/hyperledger/cactus/issues/1199) ([7b424d4](https://github.com/hyperledger/cactus/commit/7b424d465dd7c11900e0afea5c32514a9b585084)) - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Features - -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Features - -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-consortium-manual - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -### Features - -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) -* **plugin-consortium-manual:** JSON Web Signatures for Nodes, Consortium ([caf60b3](https://github.com/hyperledger/cactus/commit/caf60b3f69c81617787afe73ca12165baa2dce50)) - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -### Features - -* **core-api:** add instanceId getter to ICactusPlugin ([e50d9ce](https://github.com/hyperledger/cactus/commit/e50d9cef081708d7d6b92701f7f941c36ef6f920)) -* **plugin-consortium-manual:** JSON Web Signatures for Nodes, Consortium ([caf60b3](https://github.com/hyperledger/cactus/commit/caf60b3f69c81617787afe73ca12165baa2dce50)) diff --git a/packages/cactus-test-plugin-consortium-manual/README.md b/packages/cactus-test-plugin-consortium-manual/README.md deleted file mode 100644 index e8dc5d3de8..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# `@hyperledger/cactus-test-plugin-consortium-manual` - - -## Usage - -``` -// TODO: DEMONSTRATE API -``` - -## FAQ - -### **What is a dedicated test package for?** - -This is a dedicated test package meaning that it verifies the integration between two packages that are somehow dependent on each other and therefore these tests cannot be added properly in the child package due to circular dependency issues and it would not be fitting to add it in the parent because the child package's tests should not be held by the parent as a matter of principle. diff --git a/packages/cactus-test-plugin-consortium-manual/package.json b/packages/cactus-test-plugin-consortium-manual/package.json deleted file mode 100644 index 7f02bb8280..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-plugin-consortium-manual", - "version": "2.0.0", - "description": "Integration tests for the manual consortium plugin using the Besu ledger and the API server.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-test-plugin-consortium-manual.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-consortium-manual": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "axios": "1.7.7", - "jose": "4.15.5" - }, - "devDependencies": { - "@types/uuid": "10.0.0", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-test-plugin-consortium-manual.web.umd.min.js", - "mainMinified": "dist/cactus-test-plugin-consortium-manual.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-test-plugin-consortium-manual/src/main/typescript/index.ts b/packages/cactus-test-plugin-consortium-manual/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-plugin-consortium-manual/src/main/typescript/index.web.ts b/packages/cactus-test-plugin-consortium-manual/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-consortium-manual/src/main/typescript/public-api.ts b/packages/cactus-test-plugin-consortium-manual/src/main/typescript/public-api.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/src/main/typescript/public-api.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts b/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts deleted file mode 100644 index e85591c5bd..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts +++ /dev/null @@ -1,405 +0,0 @@ -import { createServer } from "http"; -import { AddressInfo } from "net"; -import { - generateKeyPair, - exportSPKI, - exportPKCS8, - generalVerify, - GenerateKeyPairResult, -} from "jose"; -import { v4 as uuidV4 } from "uuid"; -import "jest-extended"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - IPluginConsortiumManualOptions, - PluginConsortiumManual, - DefaultApi, - Configuration, -} from "@hyperledger/cactus-plugin-consortium-manual"; -import { - CactusNode, - Consortium, - ConsortiumDatabase, - ConsortiumMember, -} from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -const testCase = "Get Consortium JWS Endpoint"; - -describe(testCase, () => { - const consortiumId = uuidV4(); - const consortiumName = "Example Corp. & Friends Crypto Consortium"; - let keyPair1: GenerateKeyPairResult; - let keyPair2: GenerateKeyPairResult; - let keyPair3: GenerateKeyPairResult; - let pubKeyPem1: string; - let member1: ConsortiumMember; - let node1: CactusNode; - - let pubKeyPem3: string; - - const memberId1 = uuidV4(); - const memberId2 = uuidV4(); - const memberId3 = uuidV4(); - - const httpServer1 = createServer(); - - let apiServer1: ApiServer; - let apiServer2: ApiServer; - let apiServer3: ApiServer; - let addressInfo1: AddressInfo; - let addressInfo2: AddressInfo; - let addressInfo3: AddressInfo; - let node1Host: string; - let node2Host: string; - let node3Host: string; - - afterAll(async () => { - await apiServer1.shutdown(); - }); - afterAll(async () => { - await apiServer2.shutdown(); - }); - afterAll(async () => { - await apiServer3.shutdown(); - }); - - beforeAll(async () => { - keyPair1 = await generateKeyPair("ES256K"); - keyPair2 = await generateKeyPair("ES256K"); - keyPair3 = await generateKeyPair("ES256K"); - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - addressInfo1 = httpServer1.address() as AddressInfo; - node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - }); - - afterAll(() => httpServer1.close()); - - beforeAll(async () => { - pubKeyPem1 = await exportSPKI(keyPair1.publicKey); - node1 = { - consortiumId, - memberId: memberId1, - id: "Example_Cactus_Node_1", - nodeApiHost: node1Host, - publicKeyPem: pubKeyPem1, - ledgerIds: [], - pluginInstanceIds: [], - }; - - member1 = { - id: memberId1, - name: "Example Corp 1", - nodeIds: [node1.id], - }; - }); - - const httpServer2 = createServer(); - beforeAll(async () => { - await new Promise((resolve, reject) => { - httpServer2.once("error", reject); - httpServer2.once("listening", resolve); - httpServer2.listen(0, "127.0.0.1"); - }); - addressInfo2 = httpServer2.address() as AddressInfo; - node2Host = `http://${addressInfo2.address}:${addressInfo2.port}`; - }); - - let pubKeyPem2: string; - beforeAll(async () => { - pubKeyPem2 = await exportSPKI(keyPair2.publicKey); - }); - - const httpServer3 = createServer(); - beforeAll(async () => { - await new Promise((resolve, reject) => { - httpServer3.once("error", reject); - httpServer3.once("listening", resolve); - httpServer3.listen(0, "127.0.0.1"); - }); - addressInfo3 = httpServer3.address() as AddressInfo; - node3Host = `http://${addressInfo3.address}:${addressInfo3.port}`; - }); - - beforeAll(async () => { - pubKeyPem3 = await exportSPKI(keyPair3.publicKey); - }); - - let node2: CactusNode; - let member2: ConsortiumMember; - beforeAll(() => { - node2 = { - consortiumId, - memberId: memberId2, - id: "Example_Cactus_Node_2", - nodeApiHost: node2Host, - publicKeyPem: pubKeyPem2, - ledgerIds: [], - pluginInstanceIds: [], - }; - - member2 = { - id: memberId2, - name: "Example Corp 2", - nodeIds: [node2.id], - }; - }); - - let node3: CactusNode; - let member3: ConsortiumMember; - - beforeAll(() => { - node3 = { - consortiumId, - memberId: memberId3, - id: "Example_Cactus_Node_3", - nodeApiHost: node3Host, - publicKeyPem: pubKeyPem3, - ledgerIds: [], - pluginInstanceIds: [], - }; - - member3 = { - id: memberId3, - name: "Example Corp 3", - nodeIds: [node3.id], - }; - }); - - let consortium: Consortium; - let consortiumDatabase: ConsortiumDatabase; - beforeAll(() => { - consortium = { - id: consortiumId, - mainApiHost: node1Host, - name: consortiumName, - memberIds: [memberId1, memberId2, memberId3], - }; - - consortiumDatabase = { - cactusNode: [node1, node2, node3], - consortium: [consortium], - consortiumMember: [member1, member2, member3], - ledger: [], - pluginInstance: [], - }; - }); - - test("member node public keys and hosts are pre-shared", async () => { - { - //Instantiate plugin registry which will provide the web service plugin with the key value storage plugin - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - // Instantiate the web service consortium plugin - const keyPairPem = await exportPKCS8(keyPair1.privateKey); - const options: IPluginConsortiumManualOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - consortiumDatabase, - logLevel: "trace", - }; - const pluginConsortiumManual = new PluginConsortiumManual(options); - - //Create the API Server object that we embed in this test - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumManual); - - apiServer1 = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - //Start the API server which is now listening on port A and it's healthcheck works through the main SDK - await apiServer1.start(); - - const configuration = new Configuration({ basePath: node1Host }); - const api = new DefaultApi(configuration); - const res = await api.getNodeJwsV1(); - expect(res).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data).toBeTruthy(); - expect(res.data.jws).toBeTruthy(); - const payload = await generalVerify(res.data.jws, keyPair1.publicKey); - expect(payload).toBeTruthy(); - } - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const keyPairPem = await exportPKCS8(keyPair2.privateKey); - const options: IPluginConsortiumManualOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - consortiumDatabase, - logLevel: "TRACE", - }; - const pluginConsortiumManual = new PluginConsortiumManual(options); - - // Create the API Server object that we embed in this test - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo2.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = []; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumManual); - - apiServer2 = new ApiServer({ - httpServerApi: httpServer2, - config: config.getProperties(), - pluginRegistry, - }); - - // Start the API server which is now listening on port A and it's healthcheck works through the main SDK - await apiServer2.start(); - - const configuration = new Configuration({ basePath: node2Host }); - const api = new DefaultApi(configuration); - const res = await api.getNodeJwsV1(); - expect(res).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data).toBeTruthy(); - expect(res.data.jws).toBeTruthy(); - const payload = await generalVerify(res.data.jws, keyPair2.publicKey); - expect(payload).toBeTruthy(); - } - - { - // Instantiate plugin registry which will provide the web service plugin with the key value storage plugin - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - // Instantiate the web service consortium plugin - const keyPairPem = await exportPKCS8(keyPair3.privateKey); - const options: IPluginConsortiumManualOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: keyPairPem, - consortiumDatabase, - logLevel: "TRACE", - }; - const pluginConsortiumManual = new PluginConsortiumManual(options); - - // Create the API Server object that we embed in this test - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo3.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.plugins = []; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - pluginRegistry.add(pluginConsortiumManual); - - apiServer3 = new ApiServer({ - httpServerApi: httpServer3, - config: config.getProperties(), - pluginRegistry, - }); - - // Start the API server which is now listening on port A and it's healthcheck works through the main SDK - await apiServer3.start(); - - // Instantiate the main SDK dynamically with whatever port the API server ended up bound to (port 0) - - const configuration = new Configuration({ basePath: node3Host }); - const api = new DefaultApi(configuration); - const res = await api.getNodeJwsV1(); - expect(res).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data).toBeTruthy(); - expect(res.data.jws).toBeTruthy(); - const payload = await generalVerify(res.data.jws, keyPair3.publicKey); - expect(payload).toBeTruthy(); - } - - { - const configuration = new Configuration({ basePath: node3Host }); - const api = new DefaultApi(configuration); - const res = await api.getConsortiumJwsV1(); - expect(res.status).toEqual(200); - const getConsortiumJwsResponse = res.data; - const consortiumJws = getConsortiumJwsResponse.jws; - const payload1 = await generalVerify(consortiumJws, keyPair1.publicKey); - const payload2 = await generalVerify(consortiumJws, keyPair2.publicKey); - const payload3 = await generalVerify(consortiumJws, keyPair3.publicKey); - expect(payload1).toBeTruthy(); - expect(payload2).toBeTruthy(); - expect(payload3).toBeTruthy(); - - const wrongKey = await generateKeyPair("ES256K"); - await expect(generalVerify(consortiumJws, wrongKey.publicKey)).toReject(); - } - - { - const configuration = new Configuration({ basePath: node2Host }); - const api = new DefaultApi(configuration); - const res = await api.getConsortiumJwsV1(); - expect(res.status).toEqual(200); - const getConsortiumJwsResponse = res.data; - const consortiumJws = getConsortiumJwsResponse.jws; - const payload1 = await generalVerify(consortiumJws, keyPair1.publicKey); - const payload2 = await generalVerify(consortiumJws, keyPair2.publicKey); - const payload3 = await generalVerify(consortiumJws, keyPair3.publicKey); - expect(payload1).toBeTruthy(); - expect(payload2).toBeTruthy(); - expect(payload3).toBeTruthy(); - - const wrongKey = await generateKeyPair("ES256K"); - await expect(generalVerify(consortiumJws, wrongKey.publicKey)).toReject(); - } - - { - const configuration = new Configuration({ basePath: node1Host }); - const api = new DefaultApi(configuration); - const res = await api.getConsortiumJwsV1(); - expect(res.status).toEqual(200); - const getConsortiumJwsResponse = res.data; - const consortiumJws = getConsortiumJwsResponse.jws; - const payload1 = await generalVerify(consortiumJws, keyPair1.publicKey); - const payload2 = await generalVerify(consortiumJws, keyPair2.publicKey); - const payload3 = await generalVerify(consortiumJws, keyPair3.publicKey); - expect(payload1).toBeTruthy(); - expect(payload2).toBeTruthy(); - expect(payload3).toBeTruthy(); - - const wrongKey = await generateKeyPair("ES256K"); - await expect(generalVerify(consortiumJws, wrongKey.publicKey)).toReject(); - } - }); -}); diff --git a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/openapi/openapi-validation.test.ts b/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/openapi/openapi-validation.test.ts deleted file mode 100644 index a622f4e008..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/openapi/openapi-validation.test.ts +++ /dev/null @@ -1,338 +0,0 @@ -import { createServer } from "http"; -import { AddressInfo } from "net"; - -import test, { Test } from "tape"; -import { generateKeyPair, exportSPKI, exportPKCS8 } from "jose"; -import { v4 as uuidV4 } from "uuid"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - IPluginConsortiumManualOptions, - PluginConsortiumManual, - DefaultApi, - Configuration, -} from "@hyperledger/cactus-plugin-consortium-manual"; -import { - CactusNode, - Consortium, - ConsortiumDatabase, - ConsortiumMember, -} from "@hyperledger/cactus-core-api"; -import { PluginRegistry } from "@hyperledger/cactus-core"; - -const testCase = "cactus-plugin-consortium-manual API"; - -test(testCase, async (t: Test) => { - const fGetNodeJwt = "getNodeJws"; - const fGetConsortiumJws = "getConsortiumJws"; - const cOk = "without bad request error"; - const cInvalidParams = "sending invalid parameters"; - - let node1Host: string, node2Host: string, node3Host: string; - - test(`${testCase} - Create environment`, async (t2: Test) => { - const consortiumId = uuidV4(); - const consortiumName = "Example Corp. & Friends Crypto Consortium"; - - const memberId1 = uuidV4(); - const memberId2 = uuidV4(); - const memberId3 = uuidV4(); - - const httpServer1 = createServer(); - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - const addressInfo1 = httpServer1.address() as AddressInfo; - node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - - const keyPair1 = await generateKeyPair("ES256K"); - const pubKeyPem1 = await exportSPKI(keyPair1.publicKey); - - const httpServer2 = createServer(); - await new Promise((resolve, reject) => { - httpServer2.once("error", reject); - httpServer2.once("listening", resolve); - httpServer2.listen(0, "127.0.0.1"); - }); - const addressInfo2 = httpServer2.address() as AddressInfo; - node2Host = `http://${addressInfo2.address}:${addressInfo2.port}`; - - const keyPair2 = await generateKeyPair("ES256K"); - const pubKeyPem2 = await exportSPKI(keyPair2.publicKey); - - const httpServer3 = createServer(); - await new Promise((resolve, reject) => { - httpServer3.once("error", reject); - httpServer3.once("listening", resolve); - httpServer3.listen(0, "127.0.0.1"); - }); - const addressInfo3 = httpServer3.address() as AddressInfo; - node3Host = `http://${addressInfo3.address}:${addressInfo3.port}`; - - const keyPair3 = await generateKeyPair("ES256K"); - const pubKeyPem3 = await exportSPKI(keyPair3.publicKey); - - const node1: CactusNode = { - consortiumId, - memberId: memberId1, - id: "Example_Cactus_Node_1", - nodeApiHost: node1Host, - publicKeyPem: pubKeyPem1, - ledgerIds: [], - pluginInstanceIds: [], - }; - - const member1: ConsortiumMember = { - id: memberId1, - name: "Example Corp 1", - nodeIds: [node1.id], - }; - - const node2: CactusNode = { - consortiumId, - memberId: memberId2, - id: "Example_Cactus_Node_2", - nodeApiHost: node2Host, - publicKeyPem: pubKeyPem2, - ledgerIds: [], - pluginInstanceIds: [], - }; - - const member2: ConsortiumMember = { - id: memberId2, - name: "Example Corp 2", - nodeIds: [node2.id], - }; - - const node3: CactusNode = { - consortiumId, - memberId: memberId3, - id: "Example_Cactus_Node_3", - nodeApiHost: node3Host, - publicKeyPem: pubKeyPem3, - ledgerIds: [], - pluginInstanceIds: [], - }; - - const member3: ConsortiumMember = { - id: memberId3, - name: "Example Corp 3", - nodeIds: [node3.id], - }; - - const consortium: Consortium = { - id: consortiumId, - mainApiHost: node1Host, - name: consortiumName, - memberIds: [memberId1, memberId2, memberId3], - }; - - const consortiumDatabase: ConsortiumDatabase = { - cactusNode: [node1, node2, node3], - consortium: [consortium], - consortiumMember: [member1, member2, member3], - ledger: [], - pluginInstance: [], - }; - - t2.comment(`Setting up first node...`); - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - const privateKeyPem1 = await exportPKCS8(keyPair1.privateKey); - const options: IPluginConsortiumManualOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: privateKeyPem1, - consortiumDatabase, - logLevel: "trace", - }; - const pluginConsortiumManual = new PluginConsortiumManual(options); - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.cockpitPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumManual); - - const apiServer = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - test.onFinish(() => apiServer.shutdown()); - await apiServer.start(); - } - t2.comment(`Set up first node OK`); - - t2.comment(`Setting up second node...`); - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const privateKeyPem2 = await exportPKCS8(keyPair2.privateKey); - const options: IPluginConsortiumManualOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: privateKeyPem2, - consortiumDatabase, - logLevel: "trace", - }; - const pluginConsortiumManual = new PluginConsortiumManual(options); - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo2.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumManual); - - const apiServer = new ApiServer({ - httpServerApi: httpServer2, - config: config.getProperties(), - pluginRegistry, - }); - test.onFinish(() => apiServer.shutdown()); - await apiServer.start(); - } - t2.comment(`Set up second node OK`); - - t2.comment(`Setting up third node...`); - { - const pluginRegistry = new PluginRegistry({ plugins: [] }); - const privateKeyPem3 = await exportPKCS8(keyPair3.privateKey); - const options: IPluginConsortiumManualOptions = { - instanceId: uuidV4(), - pluginRegistry, - keyPairPem: privateKeyPem3, - consortiumDatabase, - logLevel: "trace", - }; - const pluginConsortiumManual = new PluginConsortiumManual(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo3.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - apiServerOptions.crpcPort = 0; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginConsortiumManual); - - const apiServer = new ApiServer({ - httpServerApi: httpServer3, - config: config.getProperties(), - pluginRegistry, - }); - test.onFinish(() => apiServer.shutdown()); - await apiServer.start(); - } - t2.comment(`Set up third node OK`); - - t2.end(); - }); - - test(`${testCase} - ${fGetNodeJwt} - ${cOk}`, async (t2: Test) => { - const configuration = new Configuration({ basePath: node1Host }); - const api = new DefaultApi(configuration); - const res = await api.getNodeJwsV1(); - t2.equal( - res.status, - 200, - `Endpoint ${fGetNodeJwt}: response.status === 200 OK`, - ); - t2.ok(res.data, "Node JWS data OK"); - - t2.end(); - }); - - test(`${testCase} - ${fGetConsortiumJws} - ${cOk}`, async (t2: Test) => { - const configuration = new Configuration({ basePath: node1Host }); - const api = new DefaultApi(configuration); - const res = await api.getConsortiumJwsV1(); - t2.equal( - res.status, - 200, - `Endpoint ${fGetConsortiumJws}: response.status === 200 OK`, - ); - t2.ok(res.data, "Consortium JWS data OK"); - - t2.end(); - }); - - test(`${testCase} - ${fGetNodeJwt} - ${cInvalidParams}`, async (t2: Test) => { - const configuration = new Configuration({ basePath: node1Host }); - const api = new DefaultApi(configuration); - try { - await api.getNodeJwsV1({ fake: 4 }); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fGetNodeJwt} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fGetConsortiumJws} - ${cInvalidParams}`, async (t2: Test) => { - const configuration = new Configuration({ basePath: node1Host }); - const api = new DefaultApi(configuration); - try { - await api.getConsortiumJwsV1({ fake: 4 }); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fGetConsortiumJws} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - t.end(); -}); diff --git a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-test-plugin-consortium-manual/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-plugin-consortium-manual/tsconfig.json b/packages/cactus-test-plugin-consortium-manual/tsconfig.json deleted file mode 100644 index 044d771f65..0000000000 --- a/packages/cactus-test-plugin-consortium-manual/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-plugin-consortium-manual.tsbuildinfo" - }, - "include": [ - "./src" - ], - "references": [ - { - "path": "../cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-consortium-manual/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/CHANGELOG.md b/packages/cactus-test-plugin-htlc-eth-besu-erc20/CHANGELOG.md deleted file mode 100644 index c5d087f6cf..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/CHANGELOG.md +++ /dev/null @@ -1,147 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* openapi tests for besu, htlc-eth-besu and htlc-eth-besu-erc20 ([b9170e9](https://github.com/hyperledger/cactus/commit/b9170e929492f3305a420c75c7d12d06b288e0ab)), closes [#1291](https://github.com/hyperledger/cactus/issues/1291) [#847](https://github.com/hyperledger/cactus/issues/847) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20 - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-besu:** remove magic strings ([6d9ae53](https://github.com/hyperledger/cactus/commit/6d9ae53c64bd4e6c3eb33164bfa5d5507582220b)), closes [#1104](https://github.com/hyperledger/cactus/issues/1104) - -### Features - -* **atomic-swap-erc20:** implemented plugin and test ([0c9423a](https://github.com/hyperledger/cactus/commit/0c9423a2a2cd4675c3c6dec4288190f148cad938)) diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/README.md b/packages/cactus-test-plugin-htlc-eth-besu-erc20/README.md deleted file mode 100644 index 51d0b82bc8..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# `@hyperledger/cactus-test-plugin-htlc-eth-erc20` - -> TODO: description - -## Usage - -``` -// TODO: DEMONSTRATE API -``` diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/package.json b/packages/cactus-test-plugin-htlc-eth-besu-erc20/package.json deleted file mode 100644 index e79d295531..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20", - "version": "2.0.0", - "description": "Integration tests for HTLC with ERC-20 tokens plugin.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-test-plugin-htlc-eth-besu-erc20.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-htlc-eth-besu-erc20": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "axios": "1.7.7", - "express": "4.21.0", - "web3-eth-abi": "4.0.3", - "web3-utils": "4.2.1" - }, - "devDependencies": { - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-test-plugin-htlc-eth-besu-erc20.web.umd.min.js", - "mainMinified": "dist/cactus-test-plugin-htlc-eth-besu-erc20.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/main/typescript/index.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/main/typescript/index.web.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/main/typescript/index.web.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/main/typescript/public-api.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/main/typescript/public-api.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/main/typescript/public-api.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.json b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.json deleted file mode 100644 index 4e6984549b..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.json +++ /dev/null @@ -1,868 +0,0 @@ -{ - "contractName": "DemoHelpers", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "_key", - "type": "string" - } - ], - "name": "getHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "result", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getTxId", - "outputs": [ - { - "internalType": "bytes32", - "name": "result", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_key\",\"type\":\"string\"}],\"name\":\"getHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"result\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getTxId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"result\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/cacti-2/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.sol\":\"DemoHelpers\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/cacti-2/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.sol\":{\"keccak256\":\"0xd76915c48ef773b98e625635e46b2a5506b9d1c643ec1fc2e03db8a434896efc\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://b37e4dbaa96fb417676e1ffa477c8be7d22206b05da3e8f2b698b39468a842ca\",\"dweb:/ipfs/QmSaErkiknyRSDZUuesKcxtu9PPa7ew2jC3e2ZX8qUgAGm\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b506102ce806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063188ec356146100465780635b6beeb91461005a578063a9a352091461006d575b600080fd5b425b60405190815260200160405180910390f35b61004861006836600461011e565b6100d8565b61004861007b3660046101eb565b604080516001600160a01b03978816602080830191909152968816818301526060810195909552608085019390935260a084019190915290931660c0808301919091528351808303909101815260e0909101909252815191012090565b6000816040516020016100eb919061024a565b604051602081830303815290604052805190602001209050919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561013057600080fd5b813567ffffffffffffffff8082111561014857600080fd5b818401915084601f83011261015c57600080fd5b81358181111561016e5761016e610108565b604051601f8201601f19908116603f0116810190838211818310171561019657610196610108565b816040528281528760208487010111156101af57600080fd5b826020860160208301376000928101602001929092525095945050505050565b80356001600160a01b03811681146101e657600080fd5b919050565b60008060008060008060c0878903121561020457600080fd5b61020d876101cf565b955061021b602088016101cf565b945060408701359350606087013592506080870135915061023e60a088016101cf565b90509295509295509295565b600060208083528351808285015260005b818110156102775785810183015185820160400152820161025b565b506000604082860101526040601f19601f830116850101925050509291505056fea2646970667358221220a3091693ddb2ca9ebb38baa348797a852c936d5e2b19c209eba45b1f73ba8ba664736f6c63430008130033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100415760003560e01c8063188ec356146100465780635b6beeb91461005a578063a9a352091461006d575b600080fd5b425b60405190815260200160405180910390f35b61004861006836600461011e565b6100d8565b61004861007b3660046101eb565b604080516001600160a01b03978816602080830191909152968816818301526060810195909552608085019390935260a084019190915290931660c0808301919091528351808303909101815260e0909101909252815191012090565b6000816040516020016100eb919061024a565b604051602081830303815290604052805190602001209050919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561013057600080fd5b813567ffffffffffffffff8082111561014857600080fd5b818401915084601f83011261015c57600080fd5b81358181111561016e5761016e610108565b604051601f8201601f19908116603f0116810190838211818310171561019657610196610108565b816040528281528760208487010111156101af57600080fd5b826020860160208301376000928101602001929092525095945050505050565b80356001600160a01b03811681146101e657600080fd5b919050565b60008060008060008060c0878903121561020457600080fd5b61020d876101cf565b955061021b602088016101cf565b945060408701359350606087013592506080870135915061023e60a088016101cf565b90509295509295509295565b600060208083528351808285015260005b818110156102775785810183015185820160400152820161025b565b506000604082860101526040601f19601f830116850101925050509291505056fea2646970667358221220a3091693ddb2ca9ebb38baa348797a852c936d5e2b19c209eba45b1f73ba8ba664736f6c63430008130033", - "sourceMap": "99:573:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "99:573:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;261:100;339:15;261:100;;;160:25:1;;;148:2;133:18;261:100:0;;;;;;;131:124;;;;;;:::i;:::-;;:::i;367:303::-;;;;;;:::i;:::-;576:77;;;-1:-1:-1;;;;;3057:15:1;;;576:77:0;;;;3039:34:1;;;;3109:15;;;3089:18;;;3082:43;3141:18;;;3134:34;;;;3184:18;;;3177:34;;;;3227:19;;;3220:35;;;;3292:15;;;3271:19;;;;3264:44;;;;576:77:0;;;;;;;;;;2973:19:1;;;;576:77:0;;;553:110;;;;;;367:303;131:124;189:14;242:4;231:16;;;;;;;;:::i;:::-;;;;;;;;;;;;;221:27;;;;;;214:34;;131:124;;;:::o;196:127:1:-;257:10;252:3;248:20;245:1;238:31;288:4;285:1;278:15;312:4;309:1;302:15;328:922;397:6;450:2;438:9;429:7;425:23;421:32;418:52;;;466:1;463;456:12;418:52;506:9;493:23;535:18;576:2;568:6;565:14;562:34;;;592:1;589;582:12;562:34;630:6;619:9;615:22;605:32;;675:7;668:4;664:2;660:13;656:27;646:55;;697:1;694;687:12;646:55;733:2;720:16;755:2;751;748:10;745:36;;;761:18;;:::i;:::-;836:2;830:9;804:2;890:13;;-1:-1:-1;;886:22:1;;;910:2;882:31;878:40;866:53;;;934:18;;;954:22;;;931:46;928:72;;;980:18;;:::i;:::-;1020:10;1016:2;1009:22;1055:2;1047:6;1040:18;1095:7;1090:2;1085;1081;1077:11;1073:20;1070:33;1067:53;;;1116:1;1113;1106:12;1067:53;1172:2;1167;1163;1159:11;1154:2;1146:6;1142:15;1129:46;1217:1;1195:15;;;1212:2;1191:24;1184:35;;;;-1:-1:-1;1199:6:1;328:922;-1:-1:-1;;;;;328:922:1:o;1437:173::-;1505:20;;-1:-1:-1;;;;;1554:31:1;;1544:42;;1534:70;;1600:1;1597;1590:12;1534:70;1437:173;;;:::o;1615:541::-;1719:6;1727;1735;1743;1751;1759;1812:3;1800:9;1791:7;1787:23;1783:33;1780:53;;;1829:1;1826;1819:12;1780:53;1852:29;1871:9;1852:29;:::i;:::-;1842:39;;1900:38;1934:2;1923:9;1919:18;1900:38;:::i;:::-;1890:48;;1985:2;1974:9;1970:18;1957:32;1947:42;;2036:2;2025:9;2021:18;2008:32;1998:42;;2087:3;2076:9;2072:19;2059:33;2049:43;;2111:39;2145:3;2134:9;2130:19;2111:39;:::i;:::-;2101:49;;1615:541;;;;;;;;:::o;2161:548::-;2273:4;2302:2;2331;2320:9;2313:21;2363:6;2357:13;2406:6;2401:2;2390:9;2386:18;2379:34;2431:1;2441:140;2455:6;2452:1;2449:13;2441:140;;;2550:14;;;2546:23;;2540:30;2516:17;;;2535:2;2512:26;2505:66;2470:10;;2441:140;;;2445:3;2630:1;2625:2;2616:6;2605:9;2601:22;2597:31;2590:42;2700:2;2693;2689:7;2684:2;2676:6;2672:15;2668:29;2657:9;2653:45;2649:54;2641:62;;;;2161:548;;;;:::o", - "sourcePath": "/home/peter/a/cacti-2/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.sol", - "compiler": { - "name": "solc", - "version": "0.8.19+commit.7dd6d404" - }, - "ast": { - "absolutePath": "/home/peter/a/cacti-2/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.sol", - "exportedSymbols": { - "DemoHelpers": [ - 57 - ] - }, - "id": 58, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "0.8", - ".19" - ], - "nodeType": "PragmaDirective", - "src": "40:23:0" - }, - { - "id": 2, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "64:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "DemoHelpers", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 57, - "linearizedBaseContracts": [ - 57 - ], - "name": "DemoHelpers", - "nameLocation": "108:11:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 16, - "nodeType": "Block", - "src": "205:50:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 12, - "name": "_key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "242:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "id": 10, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "231:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "235:6:0", - "memberName": "encode", - "nodeType": "MemberAccess", - "src": "231:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "231:16:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "221:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "221:27:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 8, - "id": 15, - "nodeType": "Return", - "src": "214:34:0" - } - ] - }, - "functionSelector": "5b6beeb9", - "id": 17, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getHash", - "nameLocation": "140:7:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "_key", - "nameLocation": "162:4:0", - "nodeType": "VariableDeclaration", - "scope": 17, - "src": "148:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "148:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "147:20:0" - }, - "returnParameters": { - "id": 8, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "result", - "nameLocation": "197:6:0", - "nodeType": "VariableDeclaration", - "scope": 17, - "src": "189:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 6, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "188:16:0" - }, - "scope": 57, - "src": "131:124:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 25, - "nodeType": "Block", - "src": "322:39:0", - "statements": [ - { - "expression": { - "expression": { - "id": 22, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "339:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "345:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "339:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 21, - "id": 24, - "nodeType": "Return", - "src": "332:22:0" - } - ] - }, - "functionSelector": "188ec356", - "id": 26, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTimestamp", - "nameLocation": "270:12:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18, - "nodeType": "ParameterList", - "parameters": [], - "src": "282:2:0" - }, - "returnParameters": { - "id": 21, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "result", - "nameLocation": "314:6:0", - "nodeType": "VariableDeclaration", - "scope": 26, - "src": "306:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "306:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "305:16:0" - }, - "scope": 57, - "src": "261:100:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 55, - "nodeType": "Block", - "src": "536:134:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 46, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "587:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 47, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "595:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 48, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "605:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 49, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "618:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 50, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 36, - "src": "628:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 51, - "name": "tokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "640:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 44, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "576:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 45, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "580:6:0", - "memberName": "encode", - "nodeType": "MemberAccess", - "src": "576:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "576:77:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 43, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "553:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 53, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "553:110:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 42, - "id": 54, - "nodeType": "Return", - "src": "546:117:0" - } - ] - }, - "functionSelector": "a9a35209", - "id": 56, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTxId", - "nameLocation": "376:7:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 39, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 28, - "mutability": "mutable", - "name": "sender", - "nameLocation": "392:6:0", - "nodeType": "VariableDeclaration", - "scope": 56, - "src": "384:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 27, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "384:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 30, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "408:8:0", - "nodeType": "VariableDeclaration", - "scope": 56, - "src": "400:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 29, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "400:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "426:11:0", - "nodeType": "VariableDeclaration", - "scope": 56, - "src": "418:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "418:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "447:8:0", - "nodeType": "VariableDeclaration", - "scope": 56, - "src": "439:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 33, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "439:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 36, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "465:10:0", - "nodeType": "VariableDeclaration", - "scope": 56, - "src": "457:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 35, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "457:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 38, - "mutability": "mutable", - "name": "tokenAddress", - "nameLocation": "485:12:0", - "nodeType": "VariableDeclaration", - "scope": 56, - "src": "477:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 37, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "477:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "383:115:0" - }, - "returnParameters": { - "id": 42, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 41, - "mutability": "mutable", - "name": "result", - "nameLocation": "528:6:0", - "nodeType": "VariableDeclaration", - "scope": 56, - "src": "520:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 40, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "520:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "519:16:0" - }, - "scope": 57, - "src": "367:303:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 58, - "src": "99:573:0", - "usedErrors": [] - } - ], - "src": "40:632:0" - }, - "functionHashes": { - "getHash(string)": "5b6beeb9", - "getTimestamp()": "188ec356", - "getTxId(address,address,uint256,bytes32,uint256,address)": "a9a35209" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "143600", - "executionCost": "190", - "totalCost": "143790" - }, - "external": { - "getHash(string)": "infinite", - "getTimestamp()": "146", - "getTxId(address,address,uint256,bytes32,uint256,address)": "infinite" - } - } -} diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.sol b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.sol deleted file mode 100644 index 6b03951c3b..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/DemoHelpers.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -pragma solidity 0.8.19; -pragma experimental ABIEncoderV2; - -contract DemoHelpers { - - - function getHash(string memory _key) public pure returns (bytes32 result) { - return keccak256(abi.encode(_key)); - } - - function getTimestamp() public view returns (uint256 result) { - return block.timestamp; - } - - function getTxId(address sender, address receiver, uint256 inputAmount, bytes32 hashLock, uint256 expiration, address tokenAddress) public pure returns (bytes32 result) { - return keccak256( - abi.encode(sender, receiver, inputAmount, hashLock, expiration, tokenAddress) - ); - } -} \ No newline at end of file diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/Test_Token.json b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/Test_Token.json deleted file mode 100644 index 6f3bf69834..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/Test_Token.json +++ /dev/null @@ -1,30239 +0,0 @@ -{ - "contractName": "Test_Token", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_initialAmount", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_tokenName", - "type": "string" - }, - { - "internalType": "uint8", - "name": "_decimalUnits", - "type": "uint8" - }, - { - "internalType": "string", - "name": "_tokenSymbol", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "allowed", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balances", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "internalType": "address", - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "remaining", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"params\":{\"_owner\":\"The address of the account owning tokens\",\"_spender\":\"The address of the account able to transfer the tokens\"},\"returns\":{\"remaining\":\"Amount of remaining tokens allowed to spent\"}},\"approve(address,uint256)\":{\"params\":{\"_spender\":\"The address of the account able to transfer the tokens\",\"_value\":\"The amount of wei to be approved for transfer\"},\"returns\":{\"success\":\"Whether the approval was successful or not\"}},\"balanceOf(address)\":{\"params\":{\"_owner\":\"The address from which the balance will be retrieved\"},\"returns\":{\"balance\":\"the balance\"}},\"transfer(address,uint256)\":{\"params\":{\"_to\":\"The address of the recipient\",\"_value\":\"The amount of token to be transferred\"},\"returns\":{\"success\":\"Whether the transfer was successful or not\"}},\"transferFrom(address,address,uint256)\":{\"params\":{\"_from\":\"The address of the sender\",\"_to\":\"The address of the recipient\",\"_value\":\"The amount of token to be transferred\"},\"returns\":{\"success\":\"Whether the transfer was successful or not\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"approve(address,uint256)\":{\"notice\":\"`msg.sender` approves `_addr` to spend `_value` tokens\"},\"transfer(address,uint256)\":{\"notice\":\"send `_value` token to `_to` from `msg.sender`\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jordigironamezcua/pruebas/contracts/Token.sol\":\"Test_Token\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jordigironamezcua/pruebas/contracts/Token.sol\":{\"keccak256\":\"0x1e85b30d11439d47026a71e631e68f183ed11452cb9736209c8e89302304fb07\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://865c5dcda1e1d509c30f824d43abc5fae1ec7a149d73e8bf4372ff26c4848c49\",\"dweb:/ipfs/QmNY8wAdmFLNBRfKbXNA2rHUU3X5CkwMV4fE98VyRYT6LP\"]}},\"version\":1}", - "bytecode": "60806040523480156200001157600080fd5b50604051620013af380380620013af833981810160405281019062000037919062000228565b836000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555083600281905550826003908051906020019062000099929190620000d8565b5081600460006101000a81548160ff021916908360ff1602179055508060059080519060200190620000cd929190620000d8565b505050505062000442565b828054620000e6906200037a565b90600052602060002090601f0160209004810192826200010a576000855562000156565b82601f106200012557805160ff191683800117855562000156565b8280016001018555821562000156579182015b828111156200015557825182559160200191906001019062000138565b5b50905062000165919062000169565b5090565b5b80821115620001845760008160009055506001016200016a565b5090565b60006200019f6200019984620002fa565b620002c6565b905082815260208101848484011115620001b857600080fd5b620001c584828562000344565b509392505050565b600082601f830112620001df57600080fd5b8151620001f184826020860162000188565b91505092915050565b6000815190506200020b816200040e565b92915050565b600081519050620002228162000428565b92915050565b600080600080608085870312156200023f57600080fd5b60006200024f87828801620001fa565b945050602085015167ffffffffffffffff8111156200026d57600080fd5b6200027b87828801620001cd565b93505060406200028e8782880162000211565b925050606085015167ffffffffffffffff811115620002ac57600080fd5b620002ba87828801620001cd565b91505092959194509250565b6000604051905081810181811067ffffffffffffffff82111715620002f057620002ef620003df565b5b8060405250919050565b600067ffffffffffffffff821115620003185762000317620003df565b5b601f19601f8301169050602081019050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156200036457808201518184015260208101905062000347565b8381111562000374576000848401525b50505050565b600060028204905060018216806200039357607f821691505b60208210811415620003aa57620003a9620003b0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000419816200032d565b81146200042557600080fd5b50565b620004338162000337565b81146200043f57600080fd5b50565b610f5d80620004526000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063313ce56711610071578063313ce5671461017a5780635c6581651461019857806370a08231146101c857806395d89b41146101f8578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a57806327e235e31461014a575b600080fd5b6100b6610276565b6040516100c39190610c92565b60405180910390f35b6100e660048036038101906100e19190610b09565b610304565b6040516100f39190610c77565b60405180910390f35b6101046103f6565b6040516101119190610cf4565b60405180910390f35b610134600480360381019061012f9190610aba565b6103fc565b6040516101419190610c77565b60405180910390f35b610164600480360381019061015f9190610a55565b6106e2565b6040516101719190610cf4565b60405180910390f35b6101826106fa565b60405161018f9190610d0f565b60405180910390f35b6101b260048036038101906101ad9190610a7e565b61070d565b6040516101bf9190610cf4565b60405180910390f35b6101e260048036038101906101dd9190610a55565b610732565b6040516101ef9190610cf4565b60405180910390f35b61020061077a565b60405161020d9190610c92565b60405180910390f35b610230600480360381019061022b9190610b09565b610808565b60405161023d9190610c77565b60405180910390f35b610260600480360381019061025b9190610a7e565b6109a4565b60405161026d9190610cf4565b60405180910390f35b6003805461028390610e58565b80601f01602080910402602001604051908101604052809291908181526020018280546102af90610e58565b80156102fc5780601f106102d1576101008083540402835291602001916102fc565b820191906000526020600020905b8154815290600101906020018083116102df57829003601f168201915b505050505081565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516103e49190610cf4565b60405180910390a36001905092915050565b60025481565b600080600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156104cc5750828110155b61050b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050290610cd4565b60405180910390fd5b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546105599190610d46565b92505081905550826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546105ae9190610d9c565b925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106715782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546106699190610d9c565b925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106ce9190610cf4565b60405180910390a360019150509392505050565b60006020528060005260406000206000915090505481565b600460009054906101000a900460ff1681565b6001602052816000526040600020602052806000526040600020600091509150505481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6005805461078790610e58565b80601f01602080910402602001604051908101604052809291908181526020018280546107b390610e58565b80156108005780601f106107d557610100808354040283529160200191610800565b820191906000526020600020905b8154815290600101906020018083116107e357829003601f168201915b505050505081565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561088b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088290610cb4565b60405180910390fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546108d99190610d9c565b92505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461092e9190610d46565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109929190610cf4565b60405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600081359050610a3a81610ef9565b92915050565b600081359050610a4f81610f10565b92915050565b600060208284031215610a6757600080fd5b6000610a7584828501610a2b565b91505092915050565b60008060408385031215610a9157600080fd5b6000610a9f85828601610a2b565b9250506020610ab085828601610a2b565b9150509250929050565b600080600060608486031215610acf57600080fd5b6000610add86828701610a2b565b9350506020610aee86828701610a2b565b9250506040610aff86828701610a40565b9150509250925092565b60008060408385031215610b1c57600080fd5b6000610b2a85828601610a2b565b9250506020610b3b85828601610a40565b9150509250929050565b610b4e81610de2565b82525050565b6000610b5f82610d2a565b610b698185610d35565b9350610b79818560208601610e25565b610b8281610ee8565b840191505092915050565b6000610b9a602f83610d35565b91507f746f6b656e2062616c616e6365206973206c6f776572207468616e207468652060008301527f76616c75652072657175657374656400000000000000000000000000000000006020830152604082019050919050565b6000610c00603983610d35565b91507f746f6b656e2062616c616e6365206f7220616c6c6f77616e6365206973206c6f60008301527f776572207468616e20616d6f756e7420726571756573746564000000000000006020830152604082019050919050565b610c6281610e0e565b82525050565b610c7181610e18565b82525050565b6000602082019050610c8c6000830184610b45565b92915050565b60006020820190508181036000830152610cac8184610b54565b905092915050565b60006020820190508181036000830152610ccd81610b8d565b9050919050565b60006020820190508181036000830152610ced81610bf3565b9050919050565b6000602082019050610d096000830184610c59565b92915050565b6000602082019050610d246000830184610c68565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610d5182610e0e565b9150610d5c83610e0e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610d9157610d90610e8a565b5b828201905092915050565b6000610da782610e0e565b9150610db283610e0e565b925082821015610dc557610dc4610e8a565b5b828203905092915050565b6000610ddb82610dee565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610e43578082015181840152602081019050610e28565b83811115610e52576000848401525b50505050565b60006002820490506001821680610e7057607f821691505b60208210811415610e8457610e83610eb9565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b610f0281610dd0565b8114610f0d57600080fd5b50565b610f1981610e0e565b8114610f2457600080fd5b5056fea2646970667358221220caed3ccf9f3e5a02e5c13bf96bde7dec9a4cd5dae702da65612423e101e9a55864736f6c63430008000033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100a95760003560e01c8063313ce56711610071578063313ce5671461017a5780635c6581651461019857806370a08231146101c857806395d89b41146101f8578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a57806327e235e31461014a575b600080fd5b6100b6610276565b6040516100c39190610c92565b60405180910390f35b6100e660048036038101906100e19190610b09565b610304565b6040516100f39190610c77565b60405180910390f35b6101046103f6565b6040516101119190610cf4565b60405180910390f35b610134600480360381019061012f9190610aba565b6103fc565b6040516101419190610c77565b60405180910390f35b610164600480360381019061015f9190610a55565b6106e2565b6040516101719190610cf4565b60405180910390f35b6101826106fa565b60405161018f9190610d0f565b60405180910390f35b6101b260048036038101906101ad9190610a7e565b61070d565b6040516101bf9190610cf4565b60405180910390f35b6101e260048036038101906101dd9190610a55565b610732565b6040516101ef9190610cf4565b60405180910390f35b61020061077a565b60405161020d9190610c92565b60405180910390f35b610230600480360381019061022b9190610b09565b610808565b60405161023d9190610c77565b60405180910390f35b610260600480360381019061025b9190610a7e565b6109a4565b60405161026d9190610cf4565b60405180910390f35b6003805461028390610e58565b80601f01602080910402602001604051908101604052809291908181526020018280546102af90610e58565b80156102fc5780601f106102d1576101008083540402835291602001916102fc565b820191906000526020600020905b8154815290600101906020018083116102df57829003601f168201915b505050505081565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516103e49190610cf4565b60405180910390a36001905092915050565b60025481565b600080600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156104cc5750828110155b61050b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050290610cd4565b60405180910390fd5b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546105599190610d46565b92505081905550826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546105ae9190610d9c565b925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106715782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546106699190610d9c565b925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106ce9190610cf4565b60405180910390a360019150509392505050565b60006020528060005260406000206000915090505481565b600460009054906101000a900460ff1681565b6001602052816000526040600020602052806000526040600020600091509150505481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6005805461078790610e58565b80601f01602080910402602001604051908101604052809291908181526020018280546107b390610e58565b80156108005780601f106107d557610100808354040283529160200191610800565b820191906000526020600020905b8154815290600101906020018083116107e357829003601f168201915b505050505081565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561088b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088290610cb4565b60405180910390fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546108d99190610d9c565b92505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461092e9190610d46565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109929190610cf4565b60405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600081359050610a3a81610ef9565b92915050565b600081359050610a4f81610f10565b92915050565b600060208284031215610a6757600080fd5b6000610a7584828501610a2b565b91505092915050565b60008060408385031215610a9157600080fd5b6000610a9f85828601610a2b565b9250506020610ab085828601610a2b565b9150509250929050565b600080600060608486031215610acf57600080fd5b6000610add86828701610a2b565b9350506020610aee86828701610a2b565b9250506040610aff86828701610a40565b9150509250925092565b60008060408385031215610b1c57600080fd5b6000610b2a85828601610a2b565b9250506020610b3b85828601610a40565b9150509250929050565b610b4e81610de2565b82525050565b6000610b5f82610d2a565b610b698185610d35565b9350610b79818560208601610e25565b610b8281610ee8565b840191505092915050565b6000610b9a602f83610d35565b91507f746f6b656e2062616c616e6365206973206c6f776572207468616e207468652060008301527f76616c75652072657175657374656400000000000000000000000000000000006020830152604082019050919050565b6000610c00603983610d35565b91507f746f6b656e2062616c616e6365206f7220616c6c6f77616e6365206973206c6f60008301527f776572207468616e20616d6f756e7420726571756573746564000000000000006020830152604082019050919050565b610c6281610e0e565b82525050565b610c7181610e18565b82525050565b6000602082019050610c8c6000830184610b45565b92915050565b60006020820190508181036000830152610cac8184610b54565b905092915050565b60006020820190508181036000830152610ccd81610b8d565b9050919050565b60006020820190508181036000830152610ced81610bf3565b9050919050565b6000602082019050610d096000830184610c59565b92915050565b6000602082019050610d246000830184610c68565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610d5182610e0e565b9150610d5c83610e0e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610d9157610d90610e8a565b5b828201905092915050565b6000610da782610e0e565b9150610db283610e0e565b925082821015610dc557610dc4610e8a565b5b828203905092915050565b6000610ddb82610dee565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015610e43578082015181840152602081019050610e28565b83811115610e52576000848401525b50505050565b60006002820490506001821680610e7057607f821691505b60208210811415610e8457610e83610eb9565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b610f0281610dd0565b8114610f0d57600080fd5b50565b610f1981610e0e565b8114610f2457600080fd5b5056fea2646970667358221220caed3ccf9f3e5a02e5c13bf96bde7dec9a4cd5dae702da65612423e101e9a55864736f6c63430008000033", - "immutableReferences": {}, - "generatedSources": [ - { - "ast": { - "nodeType": "YulBlock", - "src": "0:3997:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "102:258:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "112:74:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "178:6:2" - } - ], - "functionName": { - "name": "array_allocation_size_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "136:41:2" - }, - "nodeType": "YulFunctionCall", - "src": "136:49:2" - } - ], - "functionName": { - "name": "allocateMemory", - "nodeType": "YulIdentifier", - "src": "121:14:2" - }, - "nodeType": "YulFunctionCall", - "src": "121:65:2" - }, - "variableNames": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "112:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "202:5:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "209:6:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "195:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "195:21:2" - }, - "nodeType": "YulExpressionStatement", - "src": "195:21:2" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "225:27:2", - "value": { - "arguments": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "240:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "247:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "236:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "236:16:2" - }, - "variables": [ - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "229:3:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "290:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "299:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "302:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "292:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "292:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "292:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "271:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "276:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "267:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "267:16:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "285:3:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "264:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "264:25:2" - }, - "nodeType": "YulIf", - "src": "261:2:2" - }, - { - "expression": { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "337:3:2" - }, - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "342:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "347:6:2" - } - ], - "functionName": { - "name": "copy_memory_to_memory", - "nodeType": "YulIdentifier", - "src": "315:21:2" - }, - "nodeType": "YulFunctionCall", - "src": "315:39:2" - }, - "nodeType": "YulExpressionStatement", - "src": "315:39:2" - } - ] - }, - "name": "abi_decode_available_length_t_string_memory_ptr_fromMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "75:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "80:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "88:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "array", - "nodeType": "YulTypedName", - "src": "96:5:2", - "type": "" - } - ], - "src": "7:353:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "453:215:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "502:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "511:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "514:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "504:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "504:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "504:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "481:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "489:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "477:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "477:17:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "496:3:2" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "473:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "473:27:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "466:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "466:35:2" - }, - "nodeType": "YulIf", - "src": "463:2:2" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "527:27:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "547:6:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "541:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "541:13:2" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "531:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "563:99:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "635:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "643:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "631:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "631:17:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "650:6:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "658:3:2" - } - ], - "functionName": { - "name": "abi_decode_available_length_t_string_memory_ptr_fromMemory", - "nodeType": "YulIdentifier", - "src": "572:58:2" - }, - "nodeType": "YulFunctionCall", - "src": "572:90:2" - }, - "variableNames": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "563:5:2" - } - ] - } - ] - }, - "name": "abi_decode_t_string_memory_ptr_fromMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "431:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "439:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "array", - "nodeType": "YulTypedName", - "src": "447:5:2", - "type": "" - } - ], - "src": "380:288:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "737:80:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "747:22:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "762:6:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "756:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "756:13:2" - }, - "variableNames": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "747:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "805:5:2" - } - ], - "functionName": { - "name": "validator_revert_t_uint256", - "nodeType": "YulIdentifier", - "src": "778:26:2" - }, - "nodeType": "YulFunctionCall", - "src": "778:33:2" - }, - "nodeType": "YulExpressionStatement", - "src": "778:33:2" - } - ] - }, - "name": "abi_decode_t_uint256_fromMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "715:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "723:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "731:5:2", - "type": "" - } - ], - "src": "674:143:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "884:78:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "894:22:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "909:6:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "903:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "903:13:2" - }, - "variableNames": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "894:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "950:5:2" - } - ], - "functionName": { - "name": "validator_revert_t_uint8", - "nodeType": "YulIdentifier", - "src": "925:24:2" - }, - "nodeType": "YulFunctionCall", - "src": "925:31:2" - }, - "nodeType": "YulExpressionStatement", - "src": "925:31:2" - } - ] - }, - "name": "abi_decode_t_uint8_fromMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "862:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "870:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "878:5:2", - "type": "" - } - ], - "src": "823:139:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1114:815:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "1161:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1170:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1173:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1163:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1163:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1163:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1135:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1144:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "1131:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1131:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1156:3:2", - "type": "", - "value": "128" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "1127:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1127:33:2" - }, - "nodeType": "YulIf", - "src": "1124:2:2" - }, - { - "nodeType": "YulBlock", - "src": "1187:128:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1202:15:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1216:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1206:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1231:74:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1277:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1288:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1273:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1273:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1297:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_uint256_fromMemory", - "nodeType": "YulIdentifier", - "src": "1241:31:2" - }, - "nodeType": "YulFunctionCall", - "src": "1241:64:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1231:6:2" - } - ] - } - ] - }, - { - "nodeType": "YulBlock", - "src": "1325:225:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1340:39:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1364:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1375:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1360:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1360:18:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "1354:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "1354:25:2" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1344:6:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1426:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1435:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1438:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1428:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1428:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1428:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1398:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1406:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "1395:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "1395:30:2" - }, - "nodeType": "YulIf", - "src": "1392:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "1456:84:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1512:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1523:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1508:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1508:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1532:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_string_memory_ptr_fromMemory", - "nodeType": "YulIdentifier", - "src": "1466:41:2" - }, - "nodeType": "YulFunctionCall", - "src": "1466:74:2" - }, - "variableNames": [ - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "1456:6:2" - } - ] - } - ] - }, - { - "nodeType": "YulBlock", - "src": "1560:127:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1575:16:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1589:2:2", - "type": "", - "value": "64" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1579:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1605:72:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1649:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1660:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1645:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1645:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1669:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_uint8_fromMemory", - "nodeType": "YulIdentifier", - "src": "1615:29:2" - }, - "nodeType": "YulFunctionCall", - "src": "1615:62:2" - }, - "variableNames": [ - { - "name": "value2", - "nodeType": "YulIdentifier", - "src": "1605:6:2" - } - ] - } - ] - }, - { - "nodeType": "YulBlock", - "src": "1697:225:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1712:39:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1736:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1747:2:2", - "type": "", - "value": "96" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1732:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1732:18:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "1726:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "1726:25:2" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1716:6:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1798:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1807:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1810:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1800:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1800:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1800:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1770:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1778:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "1767:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "1767:30:2" - }, - "nodeType": "YulIf", - "src": "1764:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "1828:84:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1884:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1895:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1880:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1880:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1904:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_string_memory_ptr_fromMemory", - "nodeType": "YulIdentifier", - "src": "1838:41:2" - }, - "nodeType": "YulFunctionCall", - "src": "1838:74:2" - }, - "variableNames": [ - { - "name": "value3", - "nodeType": "YulIdentifier", - "src": "1828:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_uint256t_string_memory_ptrt_uint8t_string_memory_ptr_fromMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "1060:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "1071:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "1083:6:2", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "1091:6:2", - "type": "" - }, - { - "name": "value2", - "nodeType": "YulTypedName", - "src": "1099:6:2", - "type": "" - }, - { - "name": "value3", - "nodeType": "YulTypedName", - "src": "1107:6:2", - "type": "" - } - ], - "src": "968:961:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1975:243:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1985:19:2", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2001:2:2", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "1995:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "1995:9:2" - }, - "variableNames": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "1985:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "2013:35:2", - "value": { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "2035:6:2" - }, - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "2043:4:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2031:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2031:17:2" - }, - "variables": [ - { - "name": "newFreePtr", - "nodeType": "YulTypedName", - "src": "2017:10:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2159:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x41", - "nodeType": "YulIdentifier", - "src": "2161:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "2161:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2161:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "2102:10:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2114:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "2099:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "2099:34:2" - }, - { - "arguments": [ - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "2138:10:2" - }, - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "2150:6:2" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "2135:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "2135:22:2" - } - ], - "functionName": { - "name": "or", - "nodeType": "YulIdentifier", - "src": "2096:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "2096:62:2" - }, - "nodeType": "YulIf", - "src": "2093:2:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2197:2:2", - "type": "", - "value": "64" - }, - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "2201:10:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2190:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2190:22:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2190:22:2" - } - ] - }, - "name": "allocateMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "size", - "nodeType": "YulTypedName", - "src": "1959:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "memPtr", - "nodeType": "YulTypedName", - "src": "1968:6:2", - "type": "" - } - ], - "src": "1935:283:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2291:265:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "2396:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x41", - "nodeType": "YulIdentifier", - "src": "2398:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "2398:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2398:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2368:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2376:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "2365:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "2365:30:2" - }, - "nodeType": "YulIf", - "src": "2362:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "2448:41:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2464:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2472:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2460:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2460:17:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2483:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "2479:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2479:9:2" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "2456:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2456:33:2" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "2448:4:2" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "2526:23:2", - "value": { - "arguments": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "2538:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2544:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2534:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2534:15:2" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "2526:4:2" - } - ] - } - ] - }, - "name": "array_allocation_size_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "2275:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "size", - "nodeType": "YulTypedName", - "src": "2286:4:2", - "type": "" - } - ], - "src": "2224:332:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2607:32:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2617:16:2", - "value": { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2628:5:2" - }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "2617:7:2" - } - ] - } - ] - }, - "name": "cleanup_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "2589:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "2599:7:2", - "type": "" - } - ], - "src": "2562:77:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2688:43:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2698:27:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2713:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2720:4:2", - "type": "", - "value": "0xff" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "2709:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2709:16:2" - }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "2698:7:2" - } - ] - } - ] - }, - "name": "cleanup_t_uint8", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "2670:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "2680:7:2", - "type": "" - } - ], - "src": "2645:86:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2786:258:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "2796:10:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2805:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "i", - "nodeType": "YulTypedName", - "src": "2800:1:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2865:63:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "2890:3:2" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "2895:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2886:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2886:11:2" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "2909:3:2" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "2914:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2905:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2905:11:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "2899:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "2899:18:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2879:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2879:39:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2879:39:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "2826:1:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2829:6:2" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "2823:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "2823:13:2" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "2837:19:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2839:15:2", - "value": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "2848:1:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2851:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2844:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2844:10:2" - }, - "variableNames": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "2839:1:2" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "2819:3:2", - "statements": [] - }, - "src": "2815:113:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2962:76:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "3012:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3017:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3008:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3008:16:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3026:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3001:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3001:27:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3001:27:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "2943:1:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2946:6:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "2940:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "2940:13:2" - }, - "nodeType": "YulIf", - "src": "2937:2:2" - } - ] - }, - "name": "copy_memory_to_memory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "2768:3:2", - "type": "" - }, - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "2773:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "2778:6:2", - "type": "" - } - ], - "src": "2737:307:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3101:269:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3111:22:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "3125:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3131:1:2", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "3121:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3121:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3111:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "3142:38:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "3172:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3178:1:2", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "3168:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3168:12:2" - }, - "variables": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulTypedName", - "src": "3146:18:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3219:51:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3233:27:2", - "value": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3247:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3255:4:2", - "type": "", - "value": "0x7f" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "3243:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3243:17:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3233:6:2" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "3199:18:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "3192:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3192:26:2" - }, - "nodeType": "YulIf", - "src": "3189:2:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3322:42:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x22", - "nodeType": "YulIdentifier", - "src": "3336:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "3336:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3336:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "3286:18:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3309:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3317:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "3306:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3306:14:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "3283:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3283:38:2" - }, - "nodeType": "YulIf", - "src": "3280:2:2" - } - ] - }, - "name": "extract_byte_array_length", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "data", - "nodeType": "YulTypedName", - "src": "3085:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3094:6:2", - "type": "" - } - ], - "src": "3050:320:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3404:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3421:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3424:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3414:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3414:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3414:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3518:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3521:4:2", - "type": "", - "value": "0x22" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3511:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3511:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3511:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3542:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3545:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "3535:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3535:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3535:15:2" - } - ] - }, - "name": "panic_error_0x22", - "nodeType": "YulFunctionDefinition", - "src": "3376:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3590:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3607:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3610:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3600:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3600:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3600:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3704:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3707:4:2", - "type": "", - "value": "0x41" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3697:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3697:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3697:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3728:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3731:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "3721:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3721:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3721:15:2" - } - ] - }, - "name": "panic_error_0x41", - "nodeType": "YulFunctionDefinition", - "src": "3562:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3791:79:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "3848:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3857:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3860:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "3850:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3850:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3850:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3814:5:2" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3839:5:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "3821:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "3821:24:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "3811:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3811:35:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "3804:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3804:43:2" - }, - "nodeType": "YulIf", - "src": "3801:2:2" - } - ] - }, - "name": "validator_revert_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "3784:5:2", - "type": "" - } - ], - "src": "3748:122:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3917:77:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "3972:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3981:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3984:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "3974:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3974:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3974:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3940:5:2" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3963:5:2" - } - ], - "functionName": { - "name": "cleanup_t_uint8", - "nodeType": "YulIdentifier", - "src": "3947:15:2" - }, - "nodeType": "YulFunctionCall", - "src": "3947:22:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "3937:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3937:33:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "3930:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3930:41:2" - }, - "nodeType": "YulIf", - "src": "3927:2:2" - } - ] - }, - "name": "validator_revert_t_uint8", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "3910:5:2", - "type": "" - } - ], - "src": "3876:118:2" - } - ] - }, - "contents": "{\n\n function abi_decode_available_length_t_string_memory_ptr_fromMemory(src, length, end) -> array {\n array := allocateMemory(array_allocation_size_t_string_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert(0, 0) }\n copy_memory_to_memory(src, dst, length)\n }\n\n // string\n function abi_decode_t_string_memory_ptr_fromMemory(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n let length := mload(offset)\n array := abi_decode_available_length_t_string_memory_ptr_fromMemory(add(offset, 0x20), length, end)\n }\n\n function abi_decode_t_uint256_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_t_uint8_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint8(value)\n }\n\n function abi_decode_tuple_t_uint256t_string_memory_ptrt_uint8t_string_memory_ptr_fromMemory(headStart, dataEnd) -> value0, value1, value2, value3 {\n if slt(sub(dataEnd, headStart), 128) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := mload(add(headStart, 32))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n\n value1 := abi_decode_t_string_memory_ptr_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 64\n\n value2 := abi_decode_t_uint8_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := mload(add(headStart, 96))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n\n value3 := abi_decode_t_string_memory_ptr_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function allocateMemory(size) -> memPtr {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, size)\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function array_allocation_size_t_string_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n // round up\n size := and(add(length, 0x1f), not(0x1f))\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function cleanup_t_uint8(value) -> cleaned {\n cleaned := and(value, 0xff)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function validator_revert_t_uint8(value) {\n if iszero(eq(value, cleanup_t_uint8(value))) { revert(0, 0) }\n }\n\n}\n", - "id": 2, - "language": "Yul", - "name": "#utility.yul" - } - ], - "deployedGeneratedSources": [ - { - "ast": { - "nodeType": "YulBlock", - "src": "0:7954:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "59:87:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "69:29:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "91:6:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "78:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "78:20:2" - }, - "variableNames": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "69:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "134:5:2" - } - ], - "functionName": { - "name": "validator_revert_t_address", - "nodeType": "YulIdentifier", - "src": "107:26:2" - }, - "nodeType": "YulFunctionCall", - "src": "107:33:2" - }, - "nodeType": "YulExpressionStatement", - "src": "107:33:2" - } - ] - }, - "name": "abi_decode_t_address", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "37:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "45:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "53:5:2", - "type": "" - } - ], - "src": "7:139:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "204:87:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "214:29:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "236:6:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "223:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "223:20:2" - }, - "variableNames": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "214:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "279:5:2" - } - ], - "functionName": { - "name": "validator_revert_t_uint256", - "nodeType": "YulIdentifier", - "src": "252:26:2" - }, - "nodeType": "YulFunctionCall", - "src": "252:33:2" - }, - "nodeType": "YulExpressionStatement", - "src": "252:33:2" - } - ] - }, - "name": "abi_decode_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "182:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "190:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "198:5:2", - "type": "" - } - ], - "src": "152:139:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "363:196:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "409:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "418:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "421:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "411:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "411:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "411:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "384:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "393:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "380:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "380:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "405:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "376:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "376:32:2" - }, - "nodeType": "YulIf", - "src": "373:2:2" - }, - { - "nodeType": "YulBlock", - "src": "435:117:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "450:15:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "464:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "454:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "479:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "514:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "525:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "510:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "510:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "534:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "489:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "489:53:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "479:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_address", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "333:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "344:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "356:6:2", - "type": "" - } - ], - "src": "297:262:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "648:324:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "694:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "703:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "706:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "696:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "696:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "696:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "669:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "678:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "665:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "665:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "690:2:2", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "661:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "661:32:2" - }, - "nodeType": "YulIf", - "src": "658:2:2" - }, - { - "nodeType": "YulBlock", - "src": "720:117:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "735:15:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "749:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "739:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "764:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "799:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "810:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "795:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "795:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "819:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "774:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "774:53:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "764:6:2" - } - ] - } - ] - }, - { - "nodeType": "YulBlock", - "src": "847:118:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "862:16:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "876:2:2", - "type": "", - "value": "32" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "866:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "892:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "927:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "938:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "923:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "923:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "947:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "902:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "902:53:2" - }, - "variableNames": [ - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "892:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_addresst_address", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "610:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "621:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "633:6:2", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "641:6:2", - "type": "" - } - ], - "src": "565:407:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1078:452:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "1124:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1133:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1136:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1126:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1126:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1126:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1099:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1108:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "1095:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1095:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1120:2:2", - "type": "", - "value": "96" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "1091:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1091:32:2" - }, - "nodeType": "YulIf", - "src": "1088:2:2" - }, - { - "nodeType": "YulBlock", - "src": "1150:117:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1165:15:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1179:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1169:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1194:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1229:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1240:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1225:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1225:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1249:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "1204:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "1204:53:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1194:6:2" - } - ] - } - ] - }, - { - "nodeType": "YulBlock", - "src": "1277:118:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1292:16:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1306:2:2", - "type": "", - "value": "32" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1296:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1322:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1357:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1368:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1353:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1353:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1377:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "1332:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "1332:53:2" - }, - "variableNames": [ - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "1322:6:2" - } - ] - } - ] - }, - { - "nodeType": "YulBlock", - "src": "1405:118:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1420:16:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1434:2:2", - "type": "", - "value": "64" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1424:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1450:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1485:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1496:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1481:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1481:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1505:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_uint256", - "nodeType": "YulIdentifier", - "src": "1460:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "1460:53:2" - }, - "variableNames": [ - { - "name": "value2", - "nodeType": "YulIdentifier", - "src": "1450:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_addresst_addresst_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "1032:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "1043:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "1055:6:2", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "1063:6:2", - "type": "" - }, - { - "name": "value2", - "nodeType": "YulTypedName", - "src": "1071:6:2", - "type": "" - } - ], - "src": "978:552:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1619:324:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "1665:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1674:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1677:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1667:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1667:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1667:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1640:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1649:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "1636:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1636:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1661:2:2", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "1632:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1632:32:2" - }, - "nodeType": "YulIf", - "src": "1629:2:2" - }, - { - "nodeType": "YulBlock", - "src": "1691:117:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1706:15:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1720:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1710:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1735:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1770:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1781:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1766:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1766:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1790:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "1745:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "1745:53:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1735:6:2" - } - ] - } - ] - }, - { - "nodeType": "YulBlock", - "src": "1818:118:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1833:16:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1847:2:2", - "type": "", - "value": "32" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1837:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1863:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1898:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1909:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1894:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1894:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1918:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_uint256", - "nodeType": "YulIdentifier", - "src": "1873:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "1873:53:2" - }, - "variableNames": [ - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "1863:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_addresst_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "1581:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "1592:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "1604:6:2", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "1612:6:2", - "type": "" - } - ], - "src": "1536:407:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2008:50:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2025:3:2" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2045:5:2" - } - ], - "functionName": { - "name": "cleanup_t_bool", - "nodeType": "YulIdentifier", - "src": "2030:14:2" - }, - "nodeType": "YulFunctionCall", - "src": "2030:21:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2018:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2018:34:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2018:34:2" - } - ] - }, - "name": "abi_encode_t_bool_to_t_bool_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "1996:5:2", - "type": "" - }, - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "2003:3:2", - "type": "" - } - ], - "src": "1949:109:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2156:272:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "2166:53:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2213:5:2" - } - ], - "functionName": { - "name": "array_length_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "2180:32:2" - }, - "nodeType": "YulFunctionCall", - "src": "2180:39:2" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "2170:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "2228:78:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2294:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2299:6:2" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2235:58:2" - }, - "nodeType": "YulFunctionCall", - "src": "2235:71:2" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2228:3:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2341:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2348:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2337:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2337:16:2" - }, - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2355:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2360:6:2" - } - ], - "functionName": { - "name": "copy_memory_to_memory", - "nodeType": "YulIdentifier", - "src": "2315:21:2" - }, - "nodeType": "YulFunctionCall", - "src": "2315:52:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2315:52:2" - }, - { - "nodeType": "YulAssignment", - "src": "2376:46:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2387:3:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2414:6:2" - } - ], - "functionName": { - "name": "round_up_to_mul_of_32", - "nodeType": "YulIdentifier", - "src": "2392:21:2" - }, - "nodeType": "YulFunctionCall", - "src": "2392:29:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2383:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2383:39:2" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "2376:3:2" - } - ] - } - ] - }, - "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "2137:5:2", - "type": "" - }, - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "2144:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "2152:3:2", - "type": "" - } - ], - "src": "2064:364:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2580:233:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2590:74:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2656:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2661:2:2", - "type": "", - "value": "47" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2597:58:2" - }, - "nodeType": "YulFunctionCall", - "src": "2597:67:2" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2590:3:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2685:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2690:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2681:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2681:11:2" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "2694:34:2", - "type": "", - "value": "token balance is lower than the " - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2674:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2674:55:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2674:55:2" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2750:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2755:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2746:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2746:12:2" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "2760:17:2", - "type": "", - "value": "value requested" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2739:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2739:39:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2739:39:2" - }, - { - "nodeType": "YulAssignment", - "src": "2788:19:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2799:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2804:2:2", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2795:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2795:12:2" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "2788:3:2" - } - ] - } - ] - }, - "name": "abi_encode_t_stringliteral_1585781bcea687a18f97b1a94f6f8e11a9041130e156fda9ccf03b1c68f06452_to_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "2568:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "2576:3:2", - "type": "" - } - ], - "src": "2434:379:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2965:243:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2975:74:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3041:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3046:2:2", - "type": "", - "value": "57" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2982:58:2" - }, - "nodeType": "YulFunctionCall", - "src": "2982:67:2" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2975:3:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3070:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3075:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3066:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3066:11:2" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "3079:34:2", - "type": "", - "value": "token balance or allowance is lo" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3059:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3059:55:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3059:55:2" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3135:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3140:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3131:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3131:12:2" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "3145:27:2", - "type": "", - "value": "wer than amount requested" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3124:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3124:49:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3124:49:2" - }, - { - "nodeType": "YulAssignment", - "src": "3183:19:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3194:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3199:2:2", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3190:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3190:12:2" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "3183:3:2" - } - ] - } - ] - }, - "name": "abi_encode_t_stringliteral_d8d39484df698fe59d78d2031639e610e556bf68a0e1f7af4e968ff763a96c6a_to_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "2953:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "2961:3:2", - "type": "" - } - ], - "src": "2819:389:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3279:53:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3296:3:2" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3319:5:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "3301:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "3301:24:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3289:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3289:37:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3289:37:2" - } - ] - }, - "name": "abi_encode_t_uint256_to_t_uint256_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "3267:5:2", - "type": "" - }, - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "3274:3:2", - "type": "" - } - ], - "src": "3214:118:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3399:51:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3416:3:2" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3437:5:2" - } - ], - "functionName": { - "name": "cleanup_t_uint8", - "nodeType": "YulIdentifier", - "src": "3421:15:2" - }, - "nodeType": "YulFunctionCall", - "src": "3421:22:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3409:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3409:35:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3409:35:2" - } - ] - }, - "name": "abi_encode_t_uint8_to_t_uint8_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "3387:5:2", - "type": "" - }, - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "3394:3:2", - "type": "" - } - ], - "src": "3338:112:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3548:118:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3558:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "3570:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3581:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3566:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3566:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "3558:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "3632:6:2" - }, - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "3645:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3656:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3641:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3641:17:2" - } - ], - "functionName": { - "name": "abi_encode_t_bool_to_t_bool_fromStack", - "nodeType": "YulIdentifier", - "src": "3594:37:2" - }, - "nodeType": "YulFunctionCall", - "src": "3594:65:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3594:65:2" - } - ] - }, - "name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "3520:9:2", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "3532:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "3543:4:2", - "type": "" - } - ], - "src": "3456:210:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3790:195:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3800:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "3812:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3823:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3808:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3808:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "3800:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "3847:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3858:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3843:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3843:17:2" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "3866:4:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "3872:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "3862:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3862:20:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3836:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3836:47:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3836:47:2" - }, - { - "nodeType": "YulAssignment", - "src": "3892:86:2", - "value": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "3964:6:2" - }, - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "3973:4:2" - } - ], - "functionName": { - "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "3900:63:2" - }, - "nodeType": "YulFunctionCall", - "src": "3900:78:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "3892:4:2" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "3762:9:2", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "3774:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "3785:4:2", - "type": "" - } - ], - "src": "3672:313:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4162:248:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4172:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "4184:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4195:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4180:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4180:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "4172:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "4219:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4230:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4215:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4215:17:2" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "4238:4:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "4244:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "4234:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4234:20:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4208:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4208:47:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4208:47:2" - }, - { - "nodeType": "YulAssignment", - "src": "4264:139:2", - "value": { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "4398:4:2" - } - ], - "functionName": { - "name": "abi_encode_t_stringliteral_1585781bcea687a18f97b1a94f6f8e11a9041130e156fda9ccf03b1c68f06452_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "4272:124:2" - }, - "nodeType": "YulFunctionCall", - "src": "4272:131:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "4264:4:2" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_stringliteral_1585781bcea687a18f97b1a94f6f8e11a9041130e156fda9ccf03b1c68f06452__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "4142:9:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "4157:4:2", - "type": "" - } - ], - "src": "3991:419:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4587:248:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4597:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "4609:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4620:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4605:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4605:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "4597:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "4644:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4655:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4640:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4640:17:2" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "4663:4:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "4669:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "4659:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4659:20:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4633:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4633:47:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4633:47:2" - }, - { - "nodeType": "YulAssignment", - "src": "4689:139:2", - "value": { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "4823:4:2" - } - ], - "functionName": { - "name": "abi_encode_t_stringliteral_d8d39484df698fe59d78d2031639e610e556bf68a0e1f7af4e968ff763a96c6a_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "4697:124:2" - }, - "nodeType": "YulFunctionCall", - "src": "4697:131:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "4689:4:2" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_stringliteral_d8d39484df698fe59d78d2031639e610e556bf68a0e1f7af4e968ff763a96c6a__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "4567:9:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "4582:4:2", - "type": "" - } - ], - "src": "4416:419:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4939:124:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4949:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "4961:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4972:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4957:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4957:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "4949:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "5029:6:2" - }, - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5042:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5053:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5038:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5038:17:2" - } - ], - "functionName": { - "name": "abi_encode_t_uint256_to_t_uint256_fromStack", - "nodeType": "YulIdentifier", - "src": "4985:43:2" - }, - "nodeType": "YulFunctionCall", - "src": "4985:71:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4985:71:2" - } - ] - }, - "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "4911:9:2", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "4923:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "4934:4:2", - "type": "" - } - ], - "src": "4841:222:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5163:120:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5173:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5185:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5196:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5181:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5181:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "5173:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "5249:6:2" - }, - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "5262:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5273:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5258:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5258:17:2" - } - ], - "functionName": { - "name": "abi_encode_t_uint8_to_t_uint8_fromStack", - "nodeType": "YulIdentifier", - "src": "5209:39:2" - }, - "nodeType": "YulFunctionCall", - "src": "5209:67:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5209:67:2" - } - ] - }, - "name": "abi_encode_tuple_t_uint8__to_t_uint8__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "5135:9:2", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "5147:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "5158:4:2", - "type": "" - } - ], - "src": "5069:214:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5348:40:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5359:22:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "5375:5:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "5369:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "5369:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "5359:6:2" - } - ] - } - ] - }, - "name": "array_length_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "5331:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "5341:6:2", - "type": "" - } - ], - "src": "5289:99:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5490:73:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "5507:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "5512:6:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5500:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5500:19:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5500:19:2" - }, - { - "nodeType": "YulAssignment", - "src": "5528:29:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "5547:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5552:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5543:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5543:14:2" - }, - "variableNames": [ - { - "name": "updated_pos", - "nodeType": "YulIdentifier", - "src": "5528:11:2" - } - ] - } - ] - }, - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "5462:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "5467:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "updated_pos", - "nodeType": "YulTypedName", - "src": "5478:11:2", - "type": "" - } - ], - "src": "5394:169:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5613:261:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5623:25:2", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "5646:1:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "5628:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "5628:20:2" - }, - "variableNames": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "5623:1:2" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "5657:25:2", - "value": { - "arguments": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "5680:1:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "5662:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "5662:20:2" - }, - "variableNames": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "5657:1:2" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5820:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x11", - "nodeType": "YulIdentifier", - "src": "5822:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "5822:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5822:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "5741:1:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5748:66:2", - "type": "", - "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "5816:1:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "5744:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5744:74:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "5738:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "5738:81:2" - }, - "nodeType": "YulIf", - "src": "5735:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "5852:16:2", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "5863:1:2" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "5866:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5859:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5859:9:2" - }, - "variableNames": [ - { - "name": "sum", - "nodeType": "YulIdentifier", - "src": "5852:3:2" - } - ] - } - ] - }, - "name": "checked_add_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "x", - "nodeType": "YulTypedName", - "src": "5600:1:2", - "type": "" - }, - { - "name": "y", - "nodeType": "YulTypedName", - "src": "5603:1:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "sum", - "nodeType": "YulTypedName", - "src": "5609:3:2", - "type": "" - } - ], - "src": "5569:305:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5925:146:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5935:25:2", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "5958:1:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "5940:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "5940:20:2" - }, - "variableNames": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "5935:1:2" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "5969:25:2", - "value": { - "arguments": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "5992:1:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "5974:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "5974:20:2" - }, - "variableNames": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "5969:1:2" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6016:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x11", - "nodeType": "YulIdentifier", - "src": "6018:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "6018:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "6018:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "6010:1:2" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "6013:1:2" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "6007:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "6007:8:2" - }, - "nodeType": "YulIf", - "src": "6004:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "6048:17:2", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "6060:1:2" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "6063:1:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "6056:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "6056:9:2" - }, - "variableNames": [ - { - "name": "diff", - "nodeType": "YulIdentifier", - "src": "6048:4:2" - } - ] - } - ] - }, - "name": "checked_sub_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "x", - "nodeType": "YulTypedName", - "src": "5911:1:2", - "type": "" - }, - { - "name": "y", - "nodeType": "YulTypedName", - "src": "5914:1:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "diff", - "nodeType": "YulTypedName", - "src": "5920:4:2", - "type": "" - } - ], - "src": "5880:191:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6122:51:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "6132:35:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "6161:5:2" - } - ], - "functionName": { - "name": "cleanup_t_uint160", - "nodeType": "YulIdentifier", - "src": "6143:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "6143:24:2" - }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "6132:7:2" - } - ] - } - ] - }, - "name": "cleanup_t_address", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "6104:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "6114:7:2", - "type": "" - } - ], - "src": "6077:96:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6221:48:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "6231:32:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "6256:5:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "6249:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "6249:13:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "6242:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "6242:21:2" - }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "6231:7:2" - } - ] - } - ] - }, - "name": "cleanup_t_bool", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "6203:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "6213:7:2", - "type": "" - } - ], - "src": "6179:90:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6320:81:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "6330:65:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "6345:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6352:42:2", - "type": "", - "value": "0xffffffffffffffffffffffffffffffffffffffff" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "6341:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "6341:54:2" - }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "6330:7:2" - } - ] - } - ] - }, - "name": "cleanup_t_uint160", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "6302:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "6312:7:2", - "type": "" - } - ], - "src": "6275:126:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6452:32:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "6462:16:2", - "value": { - "name": "value", - "nodeType": "YulIdentifier", - "src": "6473:5:2" - }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "6462:7:2" - } - ] - } - ] - }, - "name": "cleanup_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "6434:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "6444:7:2", - "type": "" - } - ], - "src": "6407:77:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6533:43:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "6543:27:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "6558:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6565:4:2", - "type": "", - "value": "0xff" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "6554:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "6554:16:2" - }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "6543:7:2" - } - ] - } - ] - }, - "name": "cleanup_t_uint8", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "6515:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "6525:7:2", - "type": "" - } - ], - "src": "6490:86:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6631:258:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "6641:10:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6650:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "i", - "nodeType": "YulTypedName", - "src": "6645:1:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6710:63:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "6735:3:2" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "6740:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6731:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "6731:11:2" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "6754:3:2" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "6759:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6750:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "6750:11:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "6744:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "6744:18:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6724:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "6724:39:2" - }, - "nodeType": "YulExpressionStatement", - "src": "6724:39:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "6671:1:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "6674:6:2" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "6668:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "6668:13:2" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "6682:19:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "6684:15:2", - "value": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "6693:1:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6696:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6689:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "6689:10:2" - }, - "variableNames": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "6684:1:2" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "6664:3:2", - "statements": [] - }, - "src": "6660:113:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6807:76:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "6857:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "6862:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "6853:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "6853:16:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6871:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "6846:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "6846:27:2" - }, - "nodeType": "YulExpressionStatement", - "src": "6846:27:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "6788:1:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "6791:6:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "6785:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "6785:13:2" - }, - "nodeType": "YulIf", - "src": "6782:2:2" - } - ] - }, - "name": "copy_memory_to_memory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "6613:3:2", - "type": "" - }, - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "6618:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "6623:6:2", - "type": "" - } - ], - "src": "6582:307:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "6946:269:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "6956:22:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "6970:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "6976:1:2", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "6966:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "6966:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "6956:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "6987:38:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "7017:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7023:1:2", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "7013:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "7013:12:2" - }, - "variables": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulTypedName", - "src": "6991:18:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7064:51:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "7078:27:2", - "value": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "7092:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7100:4:2", - "type": "", - "value": "0x7f" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "7088:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "7088:17:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "7078:6:2" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "7044:18:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "7037:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7037:26:2" - }, - "nodeType": "YulIf", - "src": "7034:2:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7167:42:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x22", - "nodeType": "YulIdentifier", - "src": "7181:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "7181:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "7181:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "7131:18:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "7154:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7162:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "7151:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "7151:14:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "7128:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "7128:38:2" - }, - "nodeType": "YulIf", - "src": "7125:2:2" - } - ] - }, - "name": "extract_byte_array_length", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "data", - "nodeType": "YulTypedName", - "src": "6930:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "6939:6:2", - "type": "" - } - ], - "src": "6895:320:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7249:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7266:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7269:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7259:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7259:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "7259:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7363:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7366:4:2", - "type": "", - "value": "0x11" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7356:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7356:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "7356:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7387:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7390:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "7380:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7380:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "7380:15:2" - } - ] - }, - "name": "panic_error_0x11", - "nodeType": "YulFunctionDefinition", - "src": "7221:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7435:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7452:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7455:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7445:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7445:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "7445:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7549:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7552:4:2", - "type": "", - "value": "0x22" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "7542:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7542:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "7542:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7573:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7576:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "7566:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7566:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "7566:15:2" - } - ] - }, - "name": "panic_error_0x22", - "nodeType": "YulFunctionDefinition", - "src": "7407:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7641:54:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "7651:38:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "7669:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7676:2:2", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7665:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "7665:14:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7685:2:2", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "7681:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "7681:7:2" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "7661:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "7661:28:2" - }, - "variableNames": [ - { - "name": "result", - "nodeType": "YulIdentifier", - "src": "7651:6:2" - } - ] - } - ] - }, - "name": "round_up_to_mul_of_32", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "7624:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "result", - "nodeType": "YulTypedName", - "src": "7634:6:2", - "type": "" - } - ], - "src": "7593:102:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7744:79:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "7801:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7810:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7813:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "7803:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7803:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "7803:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "7767:5:2" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "7792:5:2" - } - ], - "functionName": { - "name": "cleanup_t_address", - "nodeType": "YulIdentifier", - "src": "7774:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "7774:24:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "7764:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "7764:35:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "7757:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7757:43:2" - }, - "nodeType": "YulIf", - "src": "7754:2:2" - } - ] - }, - "name": "validator_revert_t_address", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "7737:5:2", - "type": "" - } - ], - "src": "7701:122:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "7872:79:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "7929:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7938:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7941:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "7931:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7931:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "7931:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "7895:5:2" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "7920:5:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "7902:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "7902:24:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "7892:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "7892:35:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "7885:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "7885:43:2" - }, - "nodeType": "YulIf", - "src": "7882:2:2" - } - ] - }, - "name": "validator_revert_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "7865:5:2", - "type": "" - } - ], - "src": "7829:122:2" - } - ] - }, - "contents": "{\n\n function abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_address(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_addresst_uint256(headStart, dataEnd) -> value0, value1, value2 {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 64\n\n value2 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_uint256(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_bool_to_t_bool_fromStack(value, pos) {\n mstore(pos, cleanup_t_bool(value))\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_t_stringliteral_1585781bcea687a18f97b1a94f6f8e11a9041130e156fda9ccf03b1c68f06452_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 47)\n\n mstore(add(pos, 0), \"token balance is lower than the \")\n\n mstore(add(pos, 32), \"value requested\")\n\n end := add(pos, 64)\n }\n\n function abi_encode_t_stringliteral_d8d39484df698fe59d78d2031639e610e556bf68a0e1f7af4e968ff763a96c6a_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 57)\n\n mstore(add(pos, 0), \"token balance or allowance is lo\")\n\n mstore(add(pos, 32), \"wer than amount requested\")\n\n end := add(pos, 64)\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_t_uint8_to_t_uint8_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint8(value))\n }\n\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_bool_to_t_bool_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_1585781bcea687a18f97b1a94f6f8e11a9041130e156fda9ccf03b1c68f06452__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_1585781bcea687a18f97b1a94f6f8e11a9041130e156fda9ccf03b1c68f06452_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_d8d39484df698fe59d78d2031639e610e556bf68a0e1f7af4e968ff763a96c6a__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_d8d39484df698fe59d78d2031639e610e556bf68a0e1f7af4e968ff763a96c6a_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_encode_tuple_t_uint8__to_t_uint8__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint8_to_t_uint8_fromStack(value0, add(headStart, 0))\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function checked_sub_t_uint256(x, y) -> diff {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n if lt(x, y) { panic_error_0x11() }\n\n diff := sub(x, y)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_bool(value) -> cleaned {\n cleaned := iszero(iszero(value))\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function cleanup_t_uint8(value) -> cleaned {\n cleaned := and(value, 0xff)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n", - "id": 2, - "language": "Yul", - "name": "#utility.yul" - } - ], - "sourceMap": "15938:2901:1:-:0;;;16710:605;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;16855:14;16832:8;:20;16841:10;16832:20;;;;;;;;;;;;;;;:37;;;;16946:14;16932:11;:28;;;;17023:10;17016:4;:17;;;;;;;;;;;;:::i;:::-;;17125:13;17114:8;;:24;;;;;;;;;;;;;;;;;;17227:12;17218:6;:21;;;;;;;;;;;;:::i;:::-;;16710:605;;;;15938:2901;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:353:2:-;;121:65;136:49;178:6;136:49;:::i;:::-;121:65;:::i;:::-;112:74;;209:6;202:5;195:21;247:4;240:5;236:16;285:3;276:6;271:3;267:16;264:25;261:2;;;302:1;299;292:12;261:2;315:39;347:6;342:3;337;315:39;:::i;:::-;102:258;;;;;;:::o;380:288::-;;496:3;489:4;481:6;477:17;473:27;463:2;;514:1;511;504:12;463:2;547:6;541:13;572:90;658:3;650:6;643:4;635:6;631:17;572:90;:::i;:::-;563:99;;453:215;;;;;:::o;674:143::-;;762:6;756:13;747:22;;778:33;805:5;778:33;:::i;:::-;737:80;;;;:::o;823:139::-;;909:6;903:13;894:22;;925:31;950:5;925:31;:::i;:::-;884:78;;;;:::o;968:961::-;;;;;1156:3;1144:9;1135:7;1131:23;1127:33;1124:2;;;1173:1;1170;1163:12;1124:2;1216:1;1241:64;1297:7;1288:6;1277:9;1273:22;1241:64;:::i;:::-;1231:74;;1187:128;1375:2;1364:9;1360:18;1354:25;1406:18;1398:6;1395:30;1392:2;;;1438:1;1435;1428:12;1392:2;1466:74;1532:7;1523:6;1512:9;1508:22;1466:74;:::i;:::-;1456:84;;1325:225;1589:2;1615:62;1669:7;1660:6;1649:9;1645:22;1615:62;:::i;:::-;1605:72;;1560:127;1747:2;1736:9;1732:18;1726:25;1778:18;1770:6;1767:30;1764:2;;;1810:1;1807;1800:12;1764:2;1838:74;1904:7;1895:6;1884:9;1880:22;1838:74;:::i;:::-;1828:84;;1697:225;1114:815;;;;;;;:::o;1935:283::-;;2001:2;1995:9;1985:19;;2043:4;2035:6;2031:17;2150:6;2138:10;2135:22;2114:18;2102:10;2099:34;2096:62;2093:2;;;2161:18;;:::i;:::-;2093:2;2201:10;2197:2;2190:22;1975:243;;;;:::o;2224:332::-;;2376:18;2368:6;2365:30;2362:2;;;2398:18;;:::i;:::-;2362:2;2483:4;2479:9;2472:4;2464:6;2460:17;2456:33;2448:41;;2544:4;2538;2534:15;2526:23;;2291:265;;;:::o;2562:77::-;;2628:5;2617:16;;2607:32;;;:::o;2645:86::-;;2720:4;2713:5;2709:16;2698:27;;2688:43;;;:::o;2737:307::-;2805:1;2815:113;2829:6;2826:1;2823:13;2815:113;;;2914:1;2909:3;2905:11;2899:18;2895:1;2890:3;2886:11;2879:39;2851:2;2848:1;2844:10;2839:15;;2815:113;;;2946:6;2943:1;2940:13;2937:2;;;3026:1;3017:6;3012:3;3008:16;3001:27;2937:2;2786:258;;;;:::o;3050:320::-;;3131:1;3125:4;3121:12;3111:22;;3178:1;3172:4;3168:12;3199:18;3189:2;;3255:4;3247:6;3243:17;3233:27;;3189:2;3317;3309:6;3306:14;3286:18;3283:38;3280:2;;;3336:18;;:::i;:::-;3280:2;3101:269;;;;:::o;3376:180::-;3424:77;3421:1;3414:88;3521:4;3518:1;3511:15;3545:4;3542:1;3535:15;3562:180;3610:77;3607:1;3600:88;3707:4;3704:1;3697:15;3731:4;3728:1;3721:15;3748:122;3821:24;3839:5;3821:24;:::i;:::-;3814:5;3811:35;3801:2;;3860:1;3857;3850:12;3801:2;3791:79;:::o;3876:118::-;3947:22;3963:5;3947:22;:::i;:::-;3940:5;3937:33;3927:2;;3984:1;3981;3974:12;3927:2;3917:77;:::o;15938:2901:1:-;;;;;;;", - "deployedSourceMap": "15938:2901:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16501:18;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;18415:265;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16182:26;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;17708:573;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16062:44;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16572:21;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16112:64;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;18287:122;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16643:20;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;17321:381;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;18686:151;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16501:18;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;18415:265::-;18491:12;18547:6;18515:7;:19;18523:10;18515:19;;;;;;;;;;;;;;;:29;18535:8;18515:29;;;;;;;;;;;;;;;:38;;;;18589:8;18568:38;;18577:10;18568:38;;;18599:6;18568:38;;;;;;:::i;:::-;;;;;;;;18669:4;18662:11;;18415:265;;;;:::o;16182:26::-;;;;:::o;17708:573::-;17799:12;17823:17;17843:7;:14;17851:5;17843:14;;;;;;;;;;;;;;;:26;17858:10;17843:26;;;;;;;;;;;;;;;;17823:46;;17906:6;17887:8;:15;17896:5;17887:15;;;;;;;;;;;;;;;;:25;;:48;;;;;17929:6;17916:9;:19;;17887:48;17879:118;;;;;;;;;;;;:::i;:::-;;;;;;;;;18024:6;18007:8;:13;18016:3;18007:13;;;;;;;;;;;;;;;;:23;;;;;;;:::i;:::-;;;;;;;;18059:6;18040:8;:15;18049:5;18040:15;;;;;;;;;;;;;;;;:25;;;;;;;:::i;:::-;;;;;;;;16046:10;18079:9;:23;18075:90;;;18148:6;18118:7;:14;18126:5;18118:14;;;;;;;;;;;;;;;:26;18133:10;18118:26;;;;;;;;;;;;;;;;:36;;;;;;;:::i;:::-;;;;;;;;18075:90;18195:3;18179:28;;18188:5;18179:28;;;18200:6;18179:28;;;;;;:::i;:::-;;;;;;;;18270:4;18263:11;;;17708:573;;;;;:::o;16062:44::-;;;;;;;;;;;;;;;;;:::o;16572:21::-;;;;;;;;;;;;;:::o;16112:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;18287:122::-;18352:15;18386:8;:16;18395:6;18386:16;;;;;;;;;;;;;;;;18379:23;;18287:122;;;:::o;16643:20::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;17321:381::-;17393:12;17449:6;17425:8;:20;17434:10;17425:20;;;;;;;;;;;;;;;;:30;;17417:90;;;;;;;;;;;;:::i;:::-;;;;;;;;;17541:6;17517:8;:20;17526:10;17517:20;;;;;;;;;;;;;;;;:30;;;;;;;:::i;:::-;;;;;;;;17574:6;17557:8;:13;17566:3;17557:13;;;;;;;;;;;;;;;;:23;;;;;;;:::i;:::-;;;;;;;;17616:3;17595:33;;17604:10;17595:33;;;17621:6;17595:33;;;;;;:::i;:::-;;;;;;;;17691:4;17684:11;;17321:381;;;;:::o;18686:151::-;18769:17;18805:7;:15;18813:6;18805:15;;;;;;;;;;;;;;;:25;18821:8;18805:25;;;;;;;;;;;;;;;;18798:32;;18686:151;;;;:::o;7:139:2:-;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:139::-;;236:6;223:20;214:29;;252:33;279:5;252:33;:::i;:::-;204:87;;;;:::o;297:262::-;;405:2;393:9;384:7;380:23;376:32;373:2;;;421:1;418;411:12;373:2;464:1;489:53;534:7;525:6;514:9;510:22;489:53;:::i;:::-;479:63;;435:117;363:196;;;;:::o;565:407::-;;;690:2;678:9;669:7;665:23;661:32;658:2;;;706:1;703;696:12;658:2;749:1;774:53;819:7;810:6;799:9;795:22;774:53;:::i;:::-;764:63;;720:117;876:2;902:53;947:7;938:6;927:9;923:22;902:53;:::i;:::-;892:63;;847:118;648:324;;;;;:::o;978:552::-;;;;1120:2;1108:9;1099:7;1095:23;1091:32;1088:2;;;1136:1;1133;1126:12;1088:2;1179:1;1204:53;1249:7;1240:6;1229:9;1225:22;1204:53;:::i;:::-;1194:63;;1150:117;1306:2;1332:53;1377:7;1368:6;1357:9;1353:22;1332:53;:::i;:::-;1322:63;;1277:118;1434:2;1460:53;1505:7;1496:6;1485:9;1481:22;1460:53;:::i;:::-;1450:63;;1405:118;1078:452;;;;;:::o;1536:407::-;;;1661:2;1649:9;1640:7;1636:23;1632:32;1629:2;;;1677:1;1674;1667:12;1629:2;1720:1;1745:53;1790:7;1781:6;1770:9;1766:22;1745:53;:::i;:::-;1735:63;;1691:117;1847:2;1873:53;1918:7;1909:6;1898:9;1894:22;1873:53;:::i;:::-;1863:63;;1818:118;1619:324;;;;;:::o;1949:109::-;2030:21;2045:5;2030:21;:::i;:::-;2025:3;2018:34;2008:50;;:::o;2064:364::-;;2180:39;2213:5;2180:39;:::i;:::-;2235:71;2299:6;2294:3;2235:71;:::i;:::-;2228:78;;2315:52;2360:6;2355:3;2348:4;2341:5;2337:16;2315:52;:::i;:::-;2392:29;2414:6;2392:29;:::i;:::-;2387:3;2383:39;2376:46;;2156:272;;;;;:::o;2434:379::-;;2597:67;2661:2;2656:3;2597:67;:::i;:::-;2590:74;;2694:34;2690:1;2685:3;2681:11;2674:55;2760:17;2755:2;2750:3;2746:12;2739:39;2804:2;2799:3;2795:12;2788:19;;2580:233;;;:::o;2819:389::-;;2982:67;3046:2;3041:3;2982:67;:::i;:::-;2975:74;;3079:34;3075:1;3070:3;3066:11;3059:55;3145:27;3140:2;3135:3;3131:12;3124:49;3199:2;3194:3;3190:12;3183:19;;2965:243;;;:::o;3214:118::-;3301:24;3319:5;3301:24;:::i;:::-;3296:3;3289:37;3279:53;;:::o;3338:112::-;3421:22;3437:5;3421:22;:::i;:::-;3416:3;3409:35;3399:51;;:::o;3456:210::-;;3581:2;3570:9;3566:18;3558:26;;3594:65;3656:1;3645:9;3641:17;3632:6;3594:65;:::i;:::-;3548:118;;;;:::o;3672:313::-;;3823:2;3812:9;3808:18;3800:26;;3872:9;3866:4;3862:20;3858:1;3847:9;3843:17;3836:47;3900:78;3973:4;3964:6;3900:78;:::i;:::-;3892:86;;3790:195;;;;:::o;3991:419::-;;4195:2;4184:9;4180:18;4172:26;;4244:9;4238:4;4234:20;4230:1;4219:9;4215:17;4208:47;4272:131;4398:4;4272:131;:::i;:::-;4264:139;;4162:248;;;:::o;4416:419::-;;4620:2;4609:9;4605:18;4597:26;;4669:9;4663:4;4659:20;4655:1;4644:9;4640:17;4633:47;4697:131;4823:4;4697:131;:::i;:::-;4689:139;;4587:248;;;:::o;4841:222::-;;4972:2;4961:9;4957:18;4949:26;;4985:71;5053:1;5042:9;5038:17;5029:6;4985:71;:::i;:::-;4939:124;;;;:::o;5069:214::-;;5196:2;5185:9;5181:18;5173:26;;5209:67;5273:1;5262:9;5258:17;5249:6;5209:67;:::i;:::-;5163:120;;;;:::o;5289:99::-;;5375:5;5369:12;5359:22;;5348:40;;;:::o;5394:169::-;;5512:6;5507:3;5500:19;5552:4;5547:3;5543:14;5528:29;;5490:73;;;;:::o;5569:305::-;;5628:20;5646:1;5628:20;:::i;:::-;5623:25;;5662:20;5680:1;5662:20;:::i;:::-;5657:25;;5816:1;5748:66;5744:74;5741:1;5738:81;5735:2;;;5822:18;;:::i;:::-;5735:2;5866:1;5863;5859:9;5852:16;;5613:261;;;;:::o;5880:191::-;;5940:20;5958:1;5940:20;:::i;:::-;5935:25;;5974:20;5992:1;5974:20;:::i;:::-;5969:25;;6013:1;6010;6007:8;6004:2;;;6018:18;;:::i;:::-;6004:2;6063:1;6060;6056:9;6048:17;;5925:146;;;;:::o;6077:96::-;;6143:24;6161:5;6143:24;:::i;:::-;6132:35;;6122:51;;;:::o;6179:90::-;;6256:5;6249:13;6242:21;6231:32;;6221:48;;;:::o;6275:126::-;;6352:42;6345:5;6341:54;6330:65;;6320:81;;;:::o;6407:77::-;;6473:5;6462:16;;6452:32;;;:::o;6490:86::-;;6565:4;6558:5;6554:16;6543:27;;6533:43;;;:::o;6582:307::-;6650:1;6660:113;6674:6;6671:1;6668:13;6660:113;;;6759:1;6754:3;6750:11;6744:18;6740:1;6735:3;6731:11;6724:39;6696:2;6693:1;6689:10;6684:15;;6660:113;;;6791:6;6788:1;6785:13;6782:2;;;6871:1;6862:6;6857:3;6853:16;6846:27;6782:2;6631:258;;;;:::o;6895:320::-;;6976:1;6970:4;6966:12;6956:22;;7023:1;7017:4;7013:12;7044:18;7034:2;;7100:4;7092:6;7088:17;7078:27;;7034:2;7162;7154:6;7151:14;7131:18;7128:38;7125:2;;;7181:18;;:::i;:::-;7125:2;6946:269;;;;:::o;7221:180::-;7269:77;7266:1;7259:88;7366:4;7363:1;7356:15;7390:4;7387:1;7380:15;7407:180;7455:77;7452:1;7445:88;7552:4;7549:1;7542:15;7576:4;7573:1;7566:15;7593:102;;7685:2;7681:7;7676:2;7669:5;7665:14;7661:28;7651:38;;7641:54;;;:::o;7701:122::-;7774:24;7792:5;7774:24;:::i;:::-;7767:5;7764:35;7754:2;;7813:1;7810;7803:12;7754:2;7744:79;:::o;7829:122::-;7902:24;7920:5;7902:24;:::i;:::-;7895:5;7892:35;7882:2;;7941:1;7938;7931:12;7882:2;7872:79;:::o", - "source": "// https://eips.ethereum.org/EIPS/eip-20\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\ninterface iToken {\n\n /// @param _owner The address from which the balance will be retrieved\n /// @return balance the balance\n function balanceOf(address _owner) external view returns (uint256 balance);\n\n /// @notice send `_value` token to `_to` from `msg.sender`\n /// @param _to The address of the recipient\n /// @param _value The amount of token to be transferred\n /// @return success Whether the transfer was successful or not\n function transfer(address _to, uint256 _value) external returns (bool success);\n\n /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\n /// @param _from The address of the sender\n /// @param _to The address of the recipient\n /// @param _value The amount of token to be transferred\n /// @return success Whether the transfer was successful or not\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\n\n /// @notice `msg.sender` approves `_addr` to spend `_value` tokens\n /// @param _spender The address of the account able to transfer the tokens\n /// @param _value The amount of wei to be approved for transfer\n /// @return success Whether the approval was successful or not\n function approve(address _spender , uint256 _value) external returns (bool success);\n\n /// @param _owner The address of the account owning tokens\n /// @param _spender The address of the account able to transfer the tokens\n /// @return remaining Amount of remaining tokens allowed to spent\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n}\n\ncontract Test_Token is iToken {\n using SafeERC20 for iToken;\n\n uint256 constant private MAX_UINT256 = 2**256 - 1;\n mapping (address => uint256) public balances;\n mapping (address => mapping (address => uint256)) public allowed;\n uint256 public totalSupply;\n /*\n NOTE:\n The following variables are OPTIONAL vanities. One does not have to include them.\n They allow one to customise the token contract & in no way influences the core functionality.\n Some wallets/interfaces might not even bother to look at this information.\n */\n string public name; //fancy name: eg Simon Bucks\n uint8 public decimals; //How many decimals to show.\n string public symbol; //An identifier: eg SBX\n\n constructor(uint256 _initialAmount, string memory _tokenName, uint8 _decimalUnits, string memory _tokenSymbol) {\n balances[msg.sender] = _initialAmount; // Give the creator all initial tokens\n totalSupply = _initialAmount; // Update total supply\n name = _tokenName; // Set the name for display purposes\n decimals = _decimalUnits; // Amount of decimals for display purposes\n symbol = _tokenSymbol; // Set the symbol for display purposes\n }\n\n function transfer(address _to, uint256 _value) public override returns (bool success) {\n require(balances[msg.sender] >= _value, \"token balance is lower than the value requested\");\n balances[msg.sender] -= _value;\n balances[_to] += _value;\n emit Transfer(msg.sender, _to, _value); //solhint-disable-line indent, no-unused-vars\n return true;\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public override returns (bool success) {\n uint256 allowance = allowed[_from][msg.sender];\n require(balances[_from] >= _value && allowance >= _value, \"token balance or allowance is lower than amount requested\");\n balances[_to] += _value;\n balances[_from] -= _value;\n if (allowance < MAX_UINT256) {\n allowed[_from][msg.sender] -= _value;\n }\n emit Transfer(_from, _to, _value); //solhint-disable-line indent, no-unused-vars\n return true;\n }\n\n function balanceOf(address _owner) public override view returns (uint256 balance) {\n return balances[_owner];\n }\n\n function approve(address _spender, uint256 _value) public override returns (bool success) {\n allowed[msg.sender][_spender] = _value;\n emit Approval(msg.sender, _spender, _value); //solhint-disable-line indent, no-unused-vars\n return true;\n }\n\n function allowance(address _owner, address _spender) public override view returns (uint256 remaining) {\n return allowed[_owner][_spender];\n }\n}", - "sourcePath": "/Users/jordigironamezcua/pruebas/contracts/Token.sol", - "ast": { - "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/Token.sol", - "exportedSymbols": { - "Address": [ - 328 - ], - "IERC20": [ - 404 - ], - "SafeERC20": [ - 623 - ], - "Test_Token": [ - 928 - ], - "iToken": [ - 690 - ] - }, - "id": 929, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 34, - "literals": [ - "solidity", - "^", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "73:23:1" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 35, - "nodeType": "StructuredDocumentation", - "src": "98:67:1", - "text": " @dev Collection of functions related to the address type" - }, - "fullyImplemented": true, - "id": 328, - "linearizedBaseContracts": [ - 328 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 51, - "nodeType": "Block", - "src": "824:347:1", - "statements": [ - { - "assignments": [ - 44 - ], - "declarations": [ - { - "constant": false, - "id": 44, - "mutability": "mutable", - "name": "size", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "1021:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 43, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1021:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 45, - "nodeType": "VariableDeclarationStatement", - "src": "1021:12:1" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "1108:32:1", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1110:28:1", - "value": { - "arguments": [ - { - "name": "account", - "nodeType": "YulIdentifier", - "src": "1130:7:1" - } - ], - "functionName": { - "name": "extcodesize", - "nodeType": "YulIdentifier", - "src": "1118:11:1" - }, - "nodeType": "YulFunctionCall", - "src": "1118:20:1" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "1110:4:1" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 38, - "isOffset": false, - "isSlot": false, - "src": "1130:7:1", - "valueSize": 1 - }, - { - "declaration": 44, - "isOffset": false, - "isSlot": false, - "src": "1110:4:1", - "valueSize": 1 - } - ], - "id": 46, - "nodeType": "InlineAssembly", - "src": "1099:41:1" - }, - { - "expression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 49, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 47, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "1156:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1163:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1156:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 42, - "id": 50, - "nodeType": "Return", - "src": "1149:15:1" - } - ] - }, - "documentation": { - "id": 36, - "nodeType": "StructuredDocumentation", - "src": "188:565:1", - "text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n ====" - }, - "id": 52, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 39, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 38, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 52, - "src": "778:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 37, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "778:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "777:17:1" - }, - "returnParameters": { - "id": 42, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 41, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 52, - "src": "818:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 40, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "818:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "817:6:1" - }, - "scope": 328, - "src": "758:413:1", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 85, - "nodeType": "Block", - "src": "2159:320:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 67, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "arguments": [ - { - "id": 63, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "2185:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$328", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$328", - "typeString": "library Address" - } - ], - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2177:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 61, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2177:7:1", - "typeDescriptions": {} - } - }, - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2177:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 65, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "src": "2177:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 66, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "2202:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2177:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2210:31:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 60, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2169:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2169:73:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 70, - "nodeType": "ExpressionStatement", - "src": "2169:73:1" - }, - { - "assignments": [ - 72, - null - ], - "declarations": [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 85, - "src": "2331:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 71, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2331:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - null - ], - "id": 79, - "initialValue": { - "arguments": [ - { - "hexValue": "", - "id": 77, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2381:2:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "id": 73, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "2349:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 74, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "src": "2349:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 76, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "id": 75, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "2372:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "2349:31:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 78, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:35:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2330:54:1" - }, - { - "expression": { - "arguments": [ - { - "id": 81, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "2402:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 82, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2411:60:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 80, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2394:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2394:78:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 84, - "nodeType": "ExpressionStatement", - "src": "2394:78:1" - } - ] - }, - "documentation": { - "id": 53, - "nodeType": "StructuredDocumentation", - "src": "1177:906:1", - "text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]." - }, - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 58, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 55, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "2107:25:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 54, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2107:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 57, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "2134:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 56, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2134:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "2106:43:1" - }, - "returnParameters": { - "id": 59, - "nodeType": "ParameterList", - "parameters": [], - "src": "2159:0:1" - }, - "scope": 328, - "src": "2088:391:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 102, - "nodeType": "Block", - "src": "3309:82:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 97, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "3337:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 98, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 91, - "src": "3345:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3351:32:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - }, - "value": "Address: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - } - ], - "id": 96, - "name": "functionCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 103, - 123 - ], - "referencedDeclaration": 123, - "src": "3324:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3324:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 95, - "id": 101, - "nodeType": "Return", - "src": "3317:67:1" - } - ] - }, - "documentation": { - "id": 87, - "nodeType": "StructuredDocumentation", - "src": "2485:730:1", - "text": " @dev Performs a Solidity function call using a low level `call`. A\n plain`call` is an unsafe replacement for a function call: use this\n function instead.\n If `target` reverts with a revert reason, it is bubbled up by this\n function (like regular Solidity function calls).\n Returns the raw returned data. To convert to the expected return value,\n use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n Requirements:\n - `target` must be a contract.\n - calling `target` with `data` must not revert.\n _Available since v3.1._" - }, - "id": 103, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 92, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 89, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 103, - "src": "3242:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 88, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3242:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 91, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 103, - "src": "3258:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 90, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3258:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "3241:35:1" - }, - "returnParameters": { - "id": 95, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 94, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 103, - "src": "3295:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 93, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3295:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "3294:14:1" - }, - "scope": 328, - "src": "3220:171:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 122, - "nodeType": "Block", - "src": "3730:76:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 116, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "3769:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 117, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "3777:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "30", - "id": 118, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3783:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "id": 119, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 110, - "src": "3786:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 115, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 143, - 193 - ], - "referencedDeclaration": 193, - "src": "3747:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3747:52:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 114, - "id": 121, - "nodeType": "Return", - "src": "3740:59:1" - } - ] - }, - "documentation": { - "id": 104, - "nodeType": "StructuredDocumentation", - "src": "3397:211:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 123, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 106, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 123, - "src": "3635:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 105, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3635:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 108, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 123, - "src": "3651:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 107, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3651:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 110, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 123, - "src": "3670:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 109, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3670:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "3634:63:1" - }, - "returnParameters": { - "id": 114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 113, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 123, - "src": "3716:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 112, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3716:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "3715:14:1" - }, - "scope": 328, - "src": "3613:193:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 142, - "nodeType": "Block", - "src": "4281:111:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 136, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "4320:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 137, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 128, - "src": "4328:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 138, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "4334:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564", - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4341:43:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - }, - "value": "Address: low-level call with value failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - } - ], - "id": 135, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 143, - 193 - ], - "referencedDeclaration": 193, - "src": "4298:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4298:87:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 134, - "id": 141, - "nodeType": "Return", - "src": "4291:94:1" - } - ] - }, - "documentation": { - "id": 124, - "nodeType": "StructuredDocumentation", - "src": "3812:351:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but also transferring `value` wei to `target`.\n Requirements:\n - the calling contract must have an ETH balance of at least `value`.\n - the called Solidity function must be `payable`.\n _Available since v3.1._" - }, - "id": 143, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 126, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 143, - "src": "4199:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 125, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4199:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 128, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 143, - "src": "4215:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 127, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4215:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 143, - "src": "4234:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 129, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4234:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "4198:50:1" - }, - "returnParameters": { - "id": 134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 133, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 143, - "src": "4267:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 132, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4267:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "4266:14:1" - }, - "scope": 328, - "src": "4168:224:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 192, - "nodeType": "Block", - "src": "4781:382:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "arguments": [ - { - "id": 160, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "4807:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$328", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$328", - "typeString": "library Address" - } - ], - "id": 159, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4799:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 158, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4799:7:1", - "typeDescriptions": {} - } - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4799:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "src": "4799:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 163, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "4824:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4799:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c", - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4831:40:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - }, - "value": "Address: insufficient balance for call" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - } - ], - "id": 157, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "4791:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4791:81:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 167, - "nodeType": "ExpressionStatement", - "src": "4791:81:1" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 170, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 146, - "src": "4901:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 169, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "4890:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4890:18:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4910:31:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - }, - "value": "Address: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - } - ], - "id": 168, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "4882:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4882:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 174, - "nodeType": "ExpressionStatement", - "src": "4882:60:1" - }, - { - "assignments": [ - 176, - 178 - ], - "declarations": [ - { - "constant": false, - "id": 176, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 192, - "src": "5013:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 175, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5013:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 178, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 192, - "src": "5027:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 177, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5027:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 185, - "initialValue": { - "arguments": [ - { - "id": 183, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 148, - "src": "5082:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 179, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 146, - "src": "5054:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "src": "5054:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "id": 181, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "5074:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "5054:27:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5054:33:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5012:75:1" - }, - { - "expression": { - "arguments": [ - { - "id": 187, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "5122:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "id": 188, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 178, - "src": "5131:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 189, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 152, - "src": "5143:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 186, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 327, - "src": "5104:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5104:52:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 156, - "id": 191, - "nodeType": "Return", - "src": "5097:59:1" - } - ] - }, - "documentation": { - "id": 144, - "nodeType": "StructuredDocumentation", - "src": "4398:237:1", - "text": " @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n with `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 146, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "4671:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 145, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4671:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 148, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "4687:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 147, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4687:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 150, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "4706:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 149, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4706:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 152, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "4721:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 151, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4721:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "4670:78:1" - }, - "returnParameters": { - "id": 156, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 155, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "4767:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 154, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4767:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "4766:14:1" - }, - "scope": 328, - "src": "4640:523:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 209, - "nodeType": "Block", - "src": "5440:97:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 204, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "5476:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 205, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 198, - "src": "5484:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564", - "id": 206, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5490:39:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - }, - "value": "Address: low-level static call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - } - ], - "id": 203, - "name": "functionStaticCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 210, - 245 - ], - "referencedDeclaration": 245, - "src": "5457:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) view returns (bytes memory)" - } - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5457:73:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 202, - "id": 208, - "nodeType": "Return", - "src": "5450:80:1" - } - ] - }, - "documentation": { - "id": 194, - "nodeType": "StructuredDocumentation", - "src": "5169:166:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 210, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionStaticCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 196, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "5368:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 195, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5368:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 198, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "5384:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 197, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5384:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "5367:35:1" - }, - "returnParameters": { - "id": 202, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 201, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "5426:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 200, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5426:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "5425:14:1" - }, - "scope": 328, - "src": "5340:197:1", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 244, - "nodeType": "Block", - "src": "5849:288:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 224, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 213, - "src": "5878:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 223, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "5867:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5867:18:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5887:38:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - }, - "value": "Address: static call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - } - ], - "id": 222, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "5859:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5859:67:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 228, - "nodeType": "ExpressionStatement", - "src": "5859:67:1" - }, - { - "assignments": [ - 230, - 232 - ], - "declarations": [ - { - "constant": false, - "id": 230, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 244, - "src": "5997:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 229, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5997:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 232, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 244, - "src": "6011:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 231, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6011:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 237, - "initialValue": { - "arguments": [ - { - "id": 235, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 215, - "src": "6056:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 233, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 213, - "src": "6038:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "staticcall", - "nodeType": "MemberAccess", - "src": "6038:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) view returns (bool,bytes memory)" - } - }, - "id": 236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6038:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5996:65:1" - }, - { - "expression": { - "arguments": [ - { - "id": 239, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 230, - "src": "6096:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "id": 240, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 232, - "src": "6105:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 241, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 217, - "src": "6117:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 238, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 327, - "src": "6078:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6078:52:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 221, - "id": 243, - "nodeType": "Return", - "src": "6071:59:1" - } - ] - }, - "documentation": { - "id": 211, - "nodeType": "StructuredDocumentation", - "src": "5543:173:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 245, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionStaticCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 218, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 213, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 245, - "src": "5749:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 212, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5749:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 215, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 245, - "src": "5765:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 214, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5765:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 217, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 245, - "src": "5784:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 216, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5784:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "5748:63:1" - }, - "returnParameters": { - "id": 221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 220, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 245, - "src": "5835:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 219, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5835:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "5834:14:1" - }, - "scope": 328, - "src": "5721:416:1", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 261, - "nodeType": "Block", - "src": "6413:101:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 256, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 248, - "src": "6451:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 257, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 250, - "src": "6459:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "id": 258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6465:41:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398", - "typeString": "literal_string \"Address: low-level delegate call failed\"" - }, - "value": "Address: low-level delegate call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398", - "typeString": "literal_string \"Address: low-level delegate call failed\"" - } - ], - "id": 255, - "name": "functionDelegateCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 262, - 297 - ], - "referencedDeclaration": 297, - "src": "6430:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6430:77:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 254, - "id": 260, - "nodeType": "Return", - "src": "6423:84:1" - } - ] - }, - "documentation": { - "id": 246, - "nodeType": "StructuredDocumentation", - "src": "6143:168:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._" - }, - "id": 262, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionDelegateCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 248, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 262, - "src": "6346:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6346:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 250, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 262, - "src": "6362:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 249, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6362:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "6345:35:1" - }, - "returnParameters": { - "id": 254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 253, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 262, - "src": "6399:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 252, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6399:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "6398:14:1" - }, - "scope": 328, - "src": "6316:198:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 296, - "nodeType": "Block", - "src": "6825:292:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 276, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "6854:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 275, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "6843:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6843:18:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6863:40:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520", - "typeString": "literal_string \"Address: delegate call to non-contract\"" - }, - "value": "Address: delegate call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520", - "typeString": "literal_string \"Address: delegate call to non-contract\"" - } - ], - "id": 274, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "6835:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6835:69:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 280, - "nodeType": "ExpressionStatement", - "src": "6835:69:1" - }, - { - "assignments": [ - 282, - 284 - ], - "declarations": [ - { - "constant": false, - "id": 282, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 296, - "src": "6975:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 281, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6975:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 284, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 296, - "src": "6989:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 283, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6989:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 289, - "initialValue": { - "arguments": [ - { - "id": 287, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "7036:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 285, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "7016:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "src": "7016:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7016:25:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6974:67:1" - }, - { - "expression": { - "arguments": [ - { - "id": 291, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 282, - "src": "7076:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "id": 292, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 284, - "src": "7085:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 293, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 269, - "src": "7097:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 290, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 327, - "src": "7058:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7058:52:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 273, - "id": 295, - "nodeType": "Return", - "src": "7051:59:1" - } - ] - }, - "documentation": { - "id": 263, - "nodeType": "StructuredDocumentation", - "src": "6520:175:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._" - }, - "id": 297, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionDelegateCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 270, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 265, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 297, - "src": "6730:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 264, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6730:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 267, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 297, - "src": "6746:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 266, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6746:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 269, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 297, - "src": "6765:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 268, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6765:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "6729:63:1" - }, - "returnParameters": { - "id": 273, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 272, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 297, - "src": "6811:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 271, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6811:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "6810:14:1" - }, - "scope": 328, - "src": "6700:417:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 326, - "nodeType": "Block", - "src": "7252:596:1", - "statements": [ - { - "condition": { - "id": 308, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 299, - "src": "7266:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 324, - "nodeType": "Block", - "src": "7323:519:1", - "statements": [ - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 312, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "7407:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "src": "7407:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 314, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7427:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7407:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 322, - "nodeType": "Block", - "src": "7779:53:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 319, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 303, - "src": "7804:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 318, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967277, - 4294967277 - ], - "referencedDeclaration": 4294967277, - "src": "7797:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7797:20:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 321, - "nodeType": "ExpressionStatement", - "src": "7797:20:1" - } - ] - }, - "id": 323, - "nodeType": "IfStatement", - "src": "7403:429:1", - "trueBody": { - "id": 317, - "nodeType": "Block", - "src": "7430:343:1", - "statements": [ - { - "AST": { - "nodeType": "YulBlock", - "src": "7614:145:1", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "7636:40:1", - "value": { - "arguments": [ - { - "name": "returndata", - "nodeType": "YulIdentifier", - "src": "7665:10:1" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "7659:5:1" - }, - "nodeType": "YulFunctionCall", - "src": "7659:17:1" - }, - "variables": [ - { - "name": "returndata_size", - "nodeType": "YulTypedName", - "src": "7640:15:1", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7708:2:1", - "type": "", - "value": "32" - }, - { - "name": "returndata", - "nodeType": "YulIdentifier", - "src": "7712:10:1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7704:3:1" - }, - "nodeType": "YulFunctionCall", - "src": "7704:19:1" - }, - { - "name": "returndata_size", - "nodeType": "YulIdentifier", - "src": "7725:15:1" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "7697:6:1" - }, - "nodeType": "YulFunctionCall", - "src": "7697:44:1" - }, - "nodeType": "YulExpressionStatement", - "src": "7697:44:1" - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 301, - "isOffset": false, - "isSlot": false, - "src": "7665:10:1", - "valueSize": 1 - }, - { - "declaration": 301, - "isOffset": false, - "isSlot": false, - "src": "7712:10:1", - "valueSize": 1 - } - ], - "id": 316, - "nodeType": "InlineAssembly", - "src": "7605:154:1" - } - ] - } - } - ] - }, - "id": 325, - "nodeType": "IfStatement", - "src": "7262:580:1", - "trueBody": { - "id": 311, - "nodeType": "Block", - "src": "7275:42:1", - "statements": [ - { - "expression": { - "id": 309, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "7296:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 307, - "id": 310, - "nodeType": "Return", - "src": "7289:17:1" - } - ] - } - } - ] - }, - "id": 327, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_verifyCallResult", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 304, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 299, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 327, - "src": "7150:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 298, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7150:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 301, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 327, - "src": "7164:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 300, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7164:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 303, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 327, - "src": "7189:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 302, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7189:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "7149:67:1" - }, - "returnParameters": { - "id": 307, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 306, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 327, - "src": "7238:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 305, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7238:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "7237:14:1" - }, - "scope": 328, - "src": "7123:725:1", - "stateMutability": "pure", - "virtual": false, - "visibility": "private" - } - ], - "scope": 929, - "src": "166:7684:1" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": { - "id": 329, - "nodeType": "StructuredDocumentation", - "src": "7852:70:1", - "text": " @dev Interface of the ERC20 standard as defined in the EIP." - }, - "fullyImplemented": false, - "id": 404, - "linearizedBaseContracts": [ - 404 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "documentation": { - "id": 330, - "nodeType": "StructuredDocumentation", - "src": "7946:66:1", - "text": " @dev Returns the amount of tokens in existence." - }, - "functionSelector": "18160ddd", - "id": 335, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 331, - "nodeType": "ParameterList", - "parameters": [], - "src": "8037:2:1" - }, - "returnParameters": { - "id": 334, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 333, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 335, - "src": "8063:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 332, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8063:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8062:9:1" - }, - "scope": 404, - "src": "8017:55:1", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 336, - "nodeType": "StructuredDocumentation", - "src": "8078:72:1", - "text": " @dev Returns the amount of tokens owned by `account`." - }, - "functionSelector": "70a08231", - "id": 343, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 338, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 343, - "src": "8174:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 337, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8174:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "8173:17:1" - }, - "returnParameters": { - "id": 342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 341, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 343, - "src": "8214:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8214:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8213:9:1" - }, - "scope": 404, - "src": "8155:68:1", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 344, - "nodeType": "StructuredDocumentation", - "src": "8229:209:1", - "text": " @dev Moves `amount` tokens from the caller's account to `recipient`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." - }, - "functionSelector": "a9059cbb", - "id": 353, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 349, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 346, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 353, - "src": "8461:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 345, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8461:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 348, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 353, - "src": "8480:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 347, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8480:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8460:35:1" - }, - "returnParameters": { - "id": 352, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 351, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 353, - "src": "8514:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 350, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8514:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "8513:6:1" - }, - "scope": 404, - "src": "8443:77:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 354, - "nodeType": "StructuredDocumentation", - "src": "8526:264:1", - "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called." - }, - "functionSelector": "dd62ed3e", - "id": 363, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 356, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 363, - "src": "8814:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 355, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8814:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 358, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 363, - "src": "8829:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 357, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8829:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "8813:32:1" - }, - "returnParameters": { - "id": 362, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 361, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 363, - "src": "8869:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 360, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8869:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8868:9:1" - }, - "scope": 404, - "src": "8795:83:1", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 364, - "nodeType": "StructuredDocumentation", - "src": "8884:642:1", - "text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event." - }, - "functionSelector": "095ea7b3", - "id": 373, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 369, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 366, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 373, - "src": "9548:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 365, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9548:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 368, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 373, - "src": "9565:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 367, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9565:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "9547:33:1" - }, - "returnParameters": { - "id": 372, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 371, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 373, - "src": "9599:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 370, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9599:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "9598:6:1" - }, - "scope": 404, - "src": "9531:74:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 374, - "nodeType": "StructuredDocumentation", - "src": "9611:296:1", - "text": " @dev Moves `amount` tokens from `sender` to `recipient` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." - }, - "functionSelector": "23b872dd", - "id": 385, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 381, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 376, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 385, - "src": "9934:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 375, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9934:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 378, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 385, - "src": "9950:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 377, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9950:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 380, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 385, - "src": "9969:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 379, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9969:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "9933:51:1" - }, - "returnParameters": { - "id": 384, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 383, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 385, - "src": "10003:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 382, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10003:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "10002:6:1" - }, - "scope": 404, - "src": "9912:97:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": { - "id": 386, - "nodeType": "StructuredDocumentation", - "src": "10015:158:1", - "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero." - }, - "id": 394, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 393, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 388, - "indexed": true, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 394, - "src": "10193:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 387, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10193:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 390, - "indexed": true, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 394, - "src": "10215:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 389, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10215:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 392, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 394, - "src": "10235:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 391, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10235:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "10192:57:1" - }, - "src": "10178:72:1" - }, - { - "anonymous": false, - "documentation": { - "id": 395, - "nodeType": "StructuredDocumentation", - "src": "10256:148:1", - "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance." - }, - "id": 403, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 397, - "indexed": true, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 403, - "src": "10424:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 396, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10424:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 399, - "indexed": true, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 403, - "src": "10447:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 398, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10447:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 401, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 403, - "src": "10472:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 400, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10472:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "10423:63:1" - }, - "src": "10409:78:1" - } - ], - "scope": 929, - "src": "7923:2566:1" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 405, - "nodeType": "StructuredDocumentation", - "src": "10491:457:1", - "text": " @title SafeERC20\n @dev Wrappers around ERC20 operations that throw on failure (when the token\n contract returns false). Tokens that return no value (and instead revert or\n throw on failure) are also supported, non-reverting calls are assumed to be\n successful.\n To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n which allows you to call the safe operations as `token.safeTransfer(...)`, etc." - }, - "fullyImplemented": true, - "id": 623, - "linearizedBaseContracts": [ - 623 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 408, - "libraryName": { - "id": 406, - "name": "Address", - "nodeType": "IdentifierPath", - "referencedDeclaration": 328, - "src": "10979:7:1" - }, - "nodeType": "UsingForDirective", - "src": "10973:26:1", - "typeName": { - "id": 407, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10991:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 430, - "nodeType": "Block", - "src": "11077:103:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 419, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 411, - "src": "11107:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 422, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 411, - "src": "11137:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 353, - "src": "11137:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "11137:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 425, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 413, - "src": "11162:2:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 426, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "11166:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 420, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "11114:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "11114:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11114:58:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 418, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 622, - "src": "11087:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$404_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11087:86:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 429, - "nodeType": "ExpressionStatement", - "src": "11087:86:1" - } - ] - }, - "id": 431, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 416, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 411, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 431, - "src": "11027:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 410, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 409, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "11027:6:1" - }, - "referencedDeclaration": 404, - "src": "11027:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 413, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 431, - "src": "11041:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 412, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11041:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 415, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 431, - "src": "11053:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 414, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11053:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "11026:41:1" - }, - "returnParameters": { - "id": 417, - "nodeType": "ParameterList", - "parameters": [], - "src": "11077:0:1" - }, - "scope": 623, - "src": "11005:175:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 456, - "nodeType": "Block", - "src": "11276:113:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 444, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 434, - "src": "11306:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 447, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 434, - "src": "11336:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 385, - "src": "11336:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "11336:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 450, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 436, - "src": "11365:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 451, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 438, - "src": "11371:2:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 452, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 440, - "src": "11375:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 445, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "11313:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 446, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "11313:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11313:68:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 443, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 622, - "src": "11286:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$404_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11286:96:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 455, - "nodeType": "ExpressionStatement", - "src": "11286:96:1" - } - ] - }, - "id": 457, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 434, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 457, - "src": "11212:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 433, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 432, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "11212:6:1" - }, - "referencedDeclaration": 404, - "src": "11212:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 436, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 457, - "src": "11226:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 435, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11226:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 438, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 457, - "src": "11240:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 437, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11240:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 440, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 457, - "src": "11252:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 439, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11252:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "11211:55:1" - }, - "returnParameters": { - "id": 442, - "nodeType": "ParameterList", - "parameters": [], - "src": "11276:0:1" - }, - "scope": 623, - "src": "11186:203:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 500, - "nodeType": "Block", - "src": "11725:537:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 469, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 465, - "src": "12014:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "hexValue": "30", - "id": 470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12023:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12014:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 472, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12013:12:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 477, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "12054:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - ], - "id": 476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12046:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 475, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12046:7:1", - "typeDescriptions": {} - } - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12046:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 479, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 463, - "src": "12061:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 473, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 461, - "src": "12030:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 363, - "src": "12030:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12030:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "hexValue": "30", - "id": 481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12073:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12030:44:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 483, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12029:46:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12013:62:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 485, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12089:56:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 468, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "12005:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12005:150:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 487, - "nodeType": "ExpressionStatement", - "src": "12005:150:1" - }, - { - "expression": { - "arguments": [ - { - "id": 489, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 461, - "src": "12185:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 492, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 461, - "src": "12215:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 373, - "src": "12215:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "12215:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 495, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 463, - "src": "12239:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 496, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 465, - "src": "12248:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 490, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "12192:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "12192:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12192:62:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 488, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 622, - "src": "12165:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$404_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12165:90:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 499, - "nodeType": "ExpressionStatement", - "src": "12165:90:1" - } - ] - }, - "documentation": { - "id": 458, - "nodeType": "StructuredDocumentation", - "src": "11395:249:1", - "text": " @dev Deprecated. This function has issues similar to the ones found in\n {IERC20-approve}, and its usage is discouraged.\n Whenever possible, use {safeIncreaseAllowance} and\n {safeDecreaseAllowance} instead." - }, - "id": 501, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 466, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 461, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 501, - "src": "11670:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 460, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 459, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "11670:6:1" - }, - "referencedDeclaration": 404, - "src": "11670:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 463, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 501, - "src": "11684:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 462, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11684:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 465, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 501, - "src": "11701:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 464, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11701:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "11669:46:1" - }, - "returnParameters": { - "id": 467, - "nodeType": "ParameterList", - "parameters": [], - "src": "11725:0:1" - }, - "scope": 623, - "src": "11649:613:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 536, - "nodeType": "Block", - "src": "12354:194:1", - "statements": [ - { - "assignments": [ - 512 - ], - "declarations": [ - { - "constant": false, - "id": 512, - "mutability": "mutable", - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 536, - "src": "12364:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 511, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12364:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 523, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 517, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "12411:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - ], - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12403:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 515, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12403:7:1", - "typeDescriptions": {} - } - }, - "id": 518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12403:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 519, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "12418:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 513, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 504, - "src": "12387:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 363, - "src": "12387:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12387:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "id": 521, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 508, - "src": "12429:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12387:47:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12364:70:1" - }, - { - "expression": { - "arguments": [ - { - "id": 525, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 504, - "src": "12464:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 528, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 504, - "src": "12494:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 373, - "src": "12494:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "12494:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 531, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "12518:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 532, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 512, - "src": "12527:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 526, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "12471:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 527, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "12471:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12471:69:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 524, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 622, - "src": "12444:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$404_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12444:97:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 535, - "nodeType": "ExpressionStatement", - "src": "12444:97:1" - } - ] - }, - "id": 537, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 504, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 537, - "src": "12299:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 503, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 502, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "12299:6:1" - }, - "referencedDeclaration": 404, - "src": "12299:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 506, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 537, - "src": "12313:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 505, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12313:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 508, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 537, - "src": "12330:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12330:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "12298:46:1" - }, - "returnParameters": { - "id": 510, - "nodeType": "ParameterList", - "parameters": [], - "src": "12354:0:1" - }, - "scope": 623, - "src": "12268:280:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 583, - "nodeType": "Block", - "src": "12640:340:1", - "statements": [ - { - "assignments": [ - 548 - ], - "declarations": [ - { - "constant": false, - "id": 548, - "mutability": "mutable", - "name": "oldAllowance", - "nodeType": "VariableDeclaration", - "scope": 583, - "src": "12654:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 547, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12654:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 557, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "id": 553, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "12701:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - ], - "id": 552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12693:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 551, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12693:7:1", - "typeDescriptions": {} - } - }, - "id": 554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12693:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 555, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 542, - "src": "12708:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 549, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 540, - "src": "12677:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 363, - "src": "12677:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12677:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12654:62:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 559, - "name": "oldAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 548, - "src": "12738:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 560, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 544, - "src": "12754:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12738:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12761:43:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "id": 558, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "12730:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12730:75:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 564, - "nodeType": "ExpressionStatement", - "src": "12730:75:1" - }, - { - "assignments": [ - 566 - ], - "declarations": [ - { - "constant": false, - "id": 566, - "mutability": "mutable", - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 583, - "src": "12819:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 565, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12819:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 570, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 567, - "name": "oldAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 548, - "src": "12842:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "id": 568, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 544, - "src": "12857:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12842:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12819:43:1" - }, - { - "expression": { - "arguments": [ - { - "id": 572, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 540, - "src": "12896:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 575, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 540, - "src": "12926:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 373, - "src": "12926:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "12926:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 578, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 542, - "src": "12950:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 579, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 566, - "src": "12959:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 573, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "12903:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 574, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "12903:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12903:69:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 571, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 622, - "src": "12876:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$404_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12876:97:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 582, - "nodeType": "ExpressionStatement", - "src": "12876:97:1" - } - ] - }, - "id": 584, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 545, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 540, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 584, - "src": "12585:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 539, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 538, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "12585:6:1" - }, - "referencedDeclaration": 404, - "src": "12585:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 542, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 584, - "src": "12599:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 541, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12599:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 544, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 584, - "src": "12616:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 543, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12616:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "12584:46:1" - }, - "returnParameters": { - "id": 546, - "nodeType": "ParameterList", - "parameters": [], - "src": "12640:0:1" - }, - "scope": 623, - "src": "12554:426:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 621, - "nodeType": "Block", - "src": "13433:681:1", - "statements": [ - { - "assignments": [ - 594 - ], - "declarations": [ - { - "constant": false, - "id": 594, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "13782:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 593, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13782:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 603, - "initialValue": { - "arguments": [ - { - "id": 600, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "13836:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13842:34:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "expression": { - "arguments": [ - { - "id": 597, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 588, - "src": "13816:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - ], - "id": 596, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13808:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 595, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13808:7:1", - "typeDescriptions": {} - } - }, - "id": 598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13808:14:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "functionCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 123, - "src": "13808:27:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_address_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13808:69:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13782:95:1" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 604, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 594, - "src": "13891:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "src": "13891:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13911:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "13891:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 620, - "nodeType": "IfStatement", - "src": "13887:221:1", - "trueBody": { - "id": 619, - "nodeType": "Block", - "src": "13914:194:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 611, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 594, - "src": "14031:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "components": [ - { - "id": 613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14044:4:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": { - "id": 612, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14044:4:1", - "typeDescriptions": {} - } - } - ], - "id": 614, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14043:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "id": 609, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "14020:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 610, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "src": "14020:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14020:30:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14052:44:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 608, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "14012:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14012:85:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 618, - "nodeType": "ExpressionStatement", - "src": "14012:85:1" - } - ] - } - } - ] - }, - "documentation": { - "id": 585, - "nodeType": "StructuredDocumentation", - "src": "12986:372:1", - "text": " @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n on the return value: the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param data The call data (encoded using abi.encode or one of its variants)." - }, - "id": 622, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 591, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 588, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 622, - "src": "13392:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 587, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 586, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "13392:6:1" - }, - "referencedDeclaration": 404, - "src": "13392:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 590, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 622, - "src": "13406:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 589, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13406:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "13391:33:1" - }, - "returnParameters": { - "id": 592, - "nodeType": "ParameterList", - "parameters": [], - "src": "13433:0:1" - }, - "scope": 623, - "src": "13363:751:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - } - ], - "scope": 929, - "src": "10949:3167:1" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "fullyImplemented": false, - "id": 690, - "linearizedBaseContracts": [ - 690 - ], - "name": "iToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "documentation": { - "id": 624, - "nodeType": "StructuredDocumentation", - "src": "14141:106:1", - "text": "@param _owner The address from which the balance will be retrieved\n @return balance the balance" - }, - "functionSelector": "70a08231", - "id": 631, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 627, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 626, - "mutability": "mutable", - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 631, - "src": "14271:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 625, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14271:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "14270:16:1" - }, - "returnParameters": { - "id": 630, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 629, - "mutability": "mutable", - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 631, - "src": "14310:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 628, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14310:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "14309:17:1" - }, - "scope": 690, - "src": "14252:75:1", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 632, - "nodeType": "StructuredDocumentation", - "src": "14333:233:1", - "text": "@notice send `_value` token to `_to` from `msg.sender`\n @param _to The address of the recipient\n @param _value The amount of token to be transferred\n @return success Whether the transfer was successful or not" - }, - "functionSelector": "a9059cbb", - "id": 641, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 637, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 634, - "mutability": "mutable", - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 641, - "src": "14589:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 633, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14589:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 636, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 641, - "src": "14602:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 635, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14602:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "14588:29:1" - }, - "returnParameters": { - "id": 640, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 639, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 641, - "src": "14637:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 638, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14637:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "14636:14:1" - }, - "scope": 690, - "src": "14571:80:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 642, - "nodeType": "StructuredDocumentation", - "src": "14657:318:1", - "text": "@notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\n @param _from The address of the sender\n @param _to The address of the recipient\n @param _value The amount of token to be transferred\n @return success Whether the transfer was successful or not" - }, - "functionSelector": "23b872dd", - "id": 653, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 649, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 644, - "mutability": "mutable", - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "15002:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 643, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15002:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 646, - "mutability": "mutable", - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "15017:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 645, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15017:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 648, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "15030:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 647, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15030:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "15001:44:1" - }, - "returnParameters": { - "id": 652, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 651, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "15064:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 650, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15064:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "15063:14:1" - }, - "scope": 690, - "src": "14980:98:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 654, - "nodeType": "StructuredDocumentation", - "src": "15084:280:1", - "text": "@notice `msg.sender` approves `_addr` to spend `_value` tokens\n @param _spender The address of the account able to transfer the tokens\n @param _value The amount of wei to be approved for transfer\n @return success Whether the approval was successful or not" - }, - "functionSelector": "095ea7b3", - "id": 663, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 659, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 656, - "mutability": "mutable", - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 663, - "src": "15386:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 655, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15386:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 658, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 663, - "src": "15406:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 657, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15406:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "15385:36:1" - }, - "returnParameters": { - "id": 662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 661, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 663, - "src": "15440:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15440:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "15439:14:1" - }, - "scope": 690, - "src": "15369:85:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 664, - "nodeType": "StructuredDocumentation", - "src": "15460:207:1", - "text": "@param _owner The address of the account owning tokens\n @param _spender The address of the account able to transfer the tokens\n @return remaining Amount of remaining tokens allowed to spent" - }, - "functionSelector": "dd62ed3e", - "id": 673, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 669, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 666, - "mutability": "mutable", - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 673, - "src": "15691:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 665, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15691:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 668, - "mutability": "mutable", - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 673, - "src": "15707:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 667, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15707:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "15690:34:1" - }, - "returnParameters": { - "id": 672, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 671, - "mutability": "mutable", - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 673, - "src": "15748:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 670, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15748:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "15747:19:1" - }, - "scope": 690, - "src": "15672:95:1", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "anonymous": false, - "id": 681, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 680, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 675, - "indexed": true, - "mutability": "mutable", - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 681, - "src": "15788:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 674, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15788:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 677, - "indexed": true, - "mutability": "mutable", - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 681, - "src": "15811:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 676, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15811:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 679, - "indexed": false, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 681, - "src": "15832:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 678, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15832:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "15787:60:1" - }, - "src": "15773:75:1" - }, - { - "anonymous": false, - "id": 689, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 683, - "indexed": true, - "mutability": "mutable", - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 689, - "src": "15868:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 682, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15868:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 685, - "indexed": true, - "mutability": "mutable", - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 689, - "src": "15892:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 684, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15892:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 687, - "indexed": false, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 689, - "src": "15918:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 686, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15918:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "15867:66:1" - }, - "src": "15853:81:1" - } - ], - "scope": 929, - "src": "14117:1819:1" - }, - { - "abstract": false, - "baseContracts": [ - { - "baseName": { - "id": 691, - "name": "iToken", - "nodeType": "IdentifierPath", - "referencedDeclaration": 690, - "src": "15961:6:1" - }, - "id": 692, - "nodeType": "InheritanceSpecifier", - "src": "15961:6:1" - } - ], - "contractDependencies": [ - 690 - ], - "contractKind": "contract", - "fullyImplemented": true, - "id": 928, - "linearizedBaseContracts": [ - 928, - 690 - ], - "name": "Test_Token", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 696, - "libraryName": { - "id": 693, - "name": "SafeERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 623, - "src": "15980:9:1" - }, - "nodeType": "UsingForDirective", - "src": "15974:27:1", - "typeName": { - "id": 695, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 694, - "name": "iToken", - "nodeType": "IdentifierPath", - "referencedDeclaration": 690, - "src": "15994:6:1" - }, - "referencedDeclaration": 690, - "src": "15994:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_iToken_$690", - "typeString": "contract iToken" - } - } - }, - { - "constant": true, - "id": 703, - "mutability": "constant", - "name": "MAX_UINT256", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16007:49:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 697, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16007:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "commonType": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9935" - }, - "id": 702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "commonType": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9936" - }, - "id": 700, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "hexValue": "32", - "id": 698, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16046:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "hexValue": "323536", - "id": 699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16049:3:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_256_by_1", - "typeString": "int_const 256" - }, - "value": "256" - }, - "src": "16046:6:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9936" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "hexValue": "31", - "id": 701, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16055:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "16046:10:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9935" - } - }, - "visibility": "private" - }, - { - "constant": false, - "functionSelector": "27e235e3", - "id": 707, - "mutability": "mutable", - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16062:44:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 706, - "keyType": { - "id": 704, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16071:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "16062:28:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16082:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "5c658165", - "id": 713, - "mutability": "mutable", - "name": "allowed", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16112:64:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 712, - "keyType": { - "id": 708, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16121:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "16112:49:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 711, - "keyType": { - "id": 709, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16141:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "16132:28:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 710, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16152:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "18160ddd", - "id": 715, - "mutability": "mutable", - "name": "totalSupply", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16182:26:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 714, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16182:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "06fdde03", - "id": 717, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16501:18:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 716, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16501:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "313ce567", - "id": 719, - "mutability": "mutable", - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16572:21:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 718, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "16572:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "95d89b41", - "id": 721, - "mutability": "mutable", - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16643:20:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 720, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16643:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "public" - }, - { - "body": { - "id": 755, - "nodeType": "Block", - "src": "16822:493:1", - "statements": [ - { - "expression": { - "id": 737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 732, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "16832:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 735, - "indexExpression": { - "expression": { - "id": 733, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "16841:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "16841:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16832:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 736, - "name": "_initialAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 723, - "src": "16855:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16832:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 738, - "nodeType": "ExpressionStatement", - "src": "16832:37:1" - }, - { - "expression": { - "id": 741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 739, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "16932:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 740, - "name": "_initialAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 723, - "src": "16946:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16932:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 742, - "nodeType": "ExpressionStatement", - "src": "16932:28:1" - }, - { - "expression": { - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 743, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 717, - "src": "17016:4:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 744, - "name": "_tokenName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 725, - "src": "17023:10:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "17016:17:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 746, - "nodeType": "ExpressionStatement", - "src": "17016:17:1" - }, - { - "expression": { - "id": 749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 747, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 719, - "src": "17114:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 748, - "name": "_decimalUnits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "17125:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "17114:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 750, - "nodeType": "ExpressionStatement", - "src": "17114:24:1" - }, - { - "expression": { - "id": 753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 751, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 721, - "src": "17218:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 752, - "name": "_tokenSymbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 729, - "src": "17227:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "17218:21:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 754, - "nodeType": "ExpressionStatement", - "src": "17218:21:1" - } - ] - }, - "id": 756, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 723, - "mutability": "mutable", - "name": "_initialAmount", - "nodeType": "VariableDeclaration", - "scope": 756, - "src": "16722:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 722, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16722:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 725, - "mutability": "mutable", - "name": "_tokenName", - "nodeType": "VariableDeclaration", - "scope": 756, - "src": "16746:24:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 724, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16746:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 727, - "mutability": "mutable", - "name": "_decimalUnits", - "nodeType": "VariableDeclaration", - "scope": 756, - "src": "16772:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 726, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "16772:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 729, - "mutability": "mutable", - "name": "_tokenSymbol", - "nodeType": "VariableDeclaration", - "scope": 756, - "src": "16793:27:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 728, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16793:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "16721:100:1" - }, - "returnParameters": { - "id": 731, - "nodeType": "ParameterList", - "parameters": [], - "src": "16822:0:1" - }, - "scope": 928, - "src": "16710:605:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 641 - ], - "body": { - "id": 798, - "nodeType": "Block", - "src": "17407:295:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 772, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "baseExpression": { - "id": 767, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "17425:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 770, - "indexExpression": { - "expression": { - "id": 768, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "17434:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "17434:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17425:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 771, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 760, - "src": "17449:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17425:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "746f6b656e2062616c616e6365206973206c6f776572207468616e207468652076616c756520726571756573746564", - "id": 773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17457:49:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1585781bcea687a18f97b1a94f6f8e11a9041130e156fda9ccf03b1c68f06452", - "typeString": "literal_string \"token balance is lower than the value requested\"" - }, - "value": "token balance is lower than the value requested" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1585781bcea687a18f97b1a94f6f8e11a9041130e156fda9ccf03b1c68f06452", - "typeString": "literal_string \"token balance is lower than the value requested\"" - } - ], - "id": 766, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "17417:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17417:90:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 775, - "nodeType": "ExpressionStatement", - "src": "17417:90:1" - }, - { - "expression": { - "id": 781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 776, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "17517:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 779, - "indexExpression": { - "expression": { - "id": 777, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "17526:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 778, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "17526:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "17517:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "id": 780, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 760, - "src": "17541:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17517:30:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 782, - "nodeType": "ExpressionStatement", - "src": "17517:30:1" - }, - { - "expression": { - "id": 787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 783, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "17557:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 785, - "indexExpression": { - "id": 784, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 758, - "src": "17566:3:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "17557:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "id": 786, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 760, - "src": "17574:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17557:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 788, - "nodeType": "ExpressionStatement", - "src": "17557:23:1" - }, - { - "eventCall": { - "arguments": [ - { - "expression": { - "id": 790, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "17604:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "17604:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 792, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 758, - "src": "17616:3:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 793, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 760, - "src": "17621:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 789, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 681, - "src": "17595:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17595:33:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 795, - "nodeType": "EmitStatement", - "src": "17590:38:1" - }, - { - "expression": { - "hexValue": "74727565", - "id": 796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17691:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 765, - "id": 797, - "nodeType": "Return", - "src": "17684:11:1" - } - ] - }, - "functionSelector": "a9059cbb", - "id": 799, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 762, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "17375:8:1" - }, - "parameters": { - "id": 761, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 758, - "mutability": "mutable", - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 799, - "src": "17339:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17339:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 760, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 799, - "src": "17352:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 759, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17352:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "17338:29:1" - }, - "returnParameters": { - "id": 765, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 764, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 799, - "src": "17393:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 763, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17393:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "17392:14:1" - }, - "scope": 928, - "src": "17321:381:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 653 - ], - "body": { - "id": 867, - "nodeType": "Block", - "src": "17813:468:1", - "statements": [ - { - "assignments": [ - 812 - ], - "declarations": [ - { - "constant": false, - "id": 812, - "mutability": "mutable", - "name": "allowance", - "nodeType": "VariableDeclaration", - "scope": 867, - "src": "17823:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 811, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17823:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 819, - "initialValue": { - "baseExpression": { - "baseExpression": { - "id": 813, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "17843:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 815, - "indexExpression": { - "id": 814, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "17851:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17843:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 818, - "indexExpression": { - "expression": { - "id": 816, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "17858:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 817, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "17858:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17843:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17823:46:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "baseExpression": { - "id": 821, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "17887:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 823, - "indexExpression": { - "id": 822, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "17896:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17887:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 824, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "17906:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17887:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 826, - "name": "allowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 812, - "src": "17916:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 827, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "17929:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17916:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "17887:48:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "746f6b656e2062616c616e6365206f7220616c6c6f77616e6365206973206c6f776572207468616e20616d6f756e7420726571756573746564", - "id": 830, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17937:59:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d8d39484df698fe59d78d2031639e610e556bf68a0e1f7af4e968ff763a96c6a", - "typeString": "literal_string \"token balance or allowance is lower than amount requested\"" - }, - "value": "token balance or allowance is lower than amount requested" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d8d39484df698fe59d78d2031639e610e556bf68a0e1f7af4e968ff763a96c6a", - "typeString": "literal_string \"token balance or allowance is lower than amount requested\"" - } - ], - "id": 820, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "17879:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17879:118:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 832, - "nodeType": "ExpressionStatement", - "src": "17879:118:1" - }, - { - "expression": { - "id": 837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 833, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "18007:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 835, - "indexExpression": { - "id": 834, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 803, - "src": "18016:3:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18007:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "id": 836, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "18024:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18007:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 838, - "nodeType": "ExpressionStatement", - "src": "18007:23:1" - }, - { - "expression": { - "id": 843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 839, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "18040:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 841, - "indexExpression": { - "id": 840, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "18049:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18040:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "id": 842, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "18059:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18040:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 844, - "nodeType": "ExpressionStatement", - "src": "18040:25:1" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 845, - "name": "allowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 812, - "src": "18079:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "id": 846, - "name": "MAX_UINT256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "18091:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18079:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 858, - "nodeType": "IfStatement", - "src": "18075:90:1", - "trueBody": { - "id": 857, - "nodeType": "Block", - "src": "18104:61:1", - "statements": [ - { - "expression": { - "id": 855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "baseExpression": { - "id": 848, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "18118:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 852, - "indexExpression": { - "id": 849, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "18126:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18118:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 853, - "indexExpression": { - "expression": { - "id": 850, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "18133:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "18133:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18118:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "id": 854, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "18148:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18118:36:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 856, - "nodeType": "ExpressionStatement", - "src": "18118:36:1" - } - ] - } - }, - { - "eventCall": { - "arguments": [ - { - "id": 860, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "18188:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 861, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 803, - "src": "18195:3:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 862, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "18200:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 859, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 681, - "src": "18179:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18179:28:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 864, - "nodeType": "EmitStatement", - "src": "18174:33:1" - }, - { - "expression": { - "hexValue": "74727565", - "id": 865, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18270:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 810, - "id": 866, - "nodeType": "Return", - "src": "18263:11:1" - } - ] - }, - "functionSelector": "23b872dd", - "id": 868, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 807, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "17781:8:1" - }, - "parameters": { - "id": 806, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 801, - "mutability": "mutable", - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 868, - "src": "17730:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 800, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17730:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 803, - "mutability": "mutable", - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 868, - "src": "17745:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17745:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 805, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 868, - "src": "17758:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 804, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17758:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "17729:44:1" - }, - "returnParameters": { - "id": 810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 809, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 868, - "src": "17799:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 808, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17799:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "17798:14:1" - }, - "scope": 928, - "src": "17708:573:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 631 - ], - "body": { - "id": 880, - "nodeType": "Block", - "src": "18369:40:1", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 876, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "18386:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 878, - "indexExpression": { - "id": 877, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "18395:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18386:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 875, - "id": 879, - "nodeType": "Return", - "src": "18379:23:1" - } - ] - }, - "functionSelector": "70a08231", - "id": 881, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 872, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "18329:8:1" - }, - "parameters": { - "id": 871, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 870, - "mutability": "mutable", - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 881, - "src": "18306:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 869, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18306:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "18305:16:1" - }, - "returnParameters": { - "id": 875, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 874, - "mutability": "mutable", - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 881, - "src": "18352:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 873, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18352:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "18351:17:1" - }, - "scope": 928, - "src": "18287:122:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 663 - ], - "body": { - "id": 909, - "nodeType": "Block", - "src": "18505:175:1", - "statements": [ - { - "expression": { - "id": 898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "baseExpression": { - "id": 891, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "18515:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 895, - "indexExpression": { - "expression": { - "id": 892, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "18523:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "18523:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18515:19:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 896, - "indexExpression": { - "id": 894, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 883, - "src": "18535:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18515:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 897, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 885, - "src": "18547:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18515:38:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 899, - "nodeType": "ExpressionStatement", - "src": "18515:38:1" - }, - { - "eventCall": { - "arguments": [ - { - "expression": { - "id": 901, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "18577:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "18577:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 903, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 883, - "src": "18589:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 904, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 885, - "src": "18599:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 900, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 689, - "src": "18568:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18568:38:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 906, - "nodeType": "EmitStatement", - "src": "18563:43:1" - }, - { - "expression": { - "hexValue": "74727565", - "id": 907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18669:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 890, - "id": 908, - "nodeType": "Return", - "src": "18662:11:1" - } - ] - }, - "functionSelector": "095ea7b3", - "id": 910, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 887, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "18473:8:1" - }, - "parameters": { - "id": 886, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 883, - "mutability": "mutable", - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 910, - "src": "18432:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 882, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18432:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 885, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 910, - "src": "18450:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 884, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18450:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "18431:34:1" - }, - "returnParameters": { - "id": 890, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 889, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 910, - "src": "18491:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 888, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "18491:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "18490:14:1" - }, - "scope": 928, - "src": "18415:265:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 673 - ], - "body": { - "id": 926, - "nodeType": "Block", - "src": "18788:49:1", - "statements": [ - { - "expression": { - "baseExpression": { - "baseExpression": { - "id": 920, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "18805:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 922, - "indexExpression": { - "id": 921, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 912, - "src": "18813:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18805:15:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 924, - "indexExpression": { - "id": 923, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 914, - "src": "18821:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18805:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 919, - "id": 925, - "nodeType": "Return", - "src": "18798:32:1" - } - ] - }, - "functionSelector": "dd62ed3e", - "id": 927, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 916, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "18746:8:1" - }, - "parameters": { - "id": 915, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 912, - "mutability": "mutable", - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 927, - "src": "18705:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 911, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18705:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 914, - "mutability": "mutable", - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 927, - "src": "18721:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 913, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18721:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "18704:34:1" - }, - "returnParameters": { - "id": 919, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 918, - "mutability": "mutable", - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 927, - "src": "18769:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18769:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "18768:19:1" - }, - "scope": 928, - "src": "18686:151:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 929, - "src": "15938:2901:1" - } - ], - "src": "73:18766:1" - }, - "legacyAST": { - "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/Token.sol", - "exportedSymbols": { - "Address": [ - 328 - ], - "IERC20": [ - 404 - ], - "SafeERC20": [ - 623 - ], - "Test_Token": [ - 928 - ], - "iToken": [ - 690 - ] - }, - "id": 929, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 34, - "literals": [ - "solidity", - "^", - "0.8", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "73:23:1" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 35, - "nodeType": "StructuredDocumentation", - "src": "98:67:1", - "text": " @dev Collection of functions related to the address type" - }, - "fullyImplemented": true, - "id": 328, - "linearizedBaseContracts": [ - 328 - ], - "name": "Address", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 51, - "nodeType": "Block", - "src": "824:347:1", - "statements": [ - { - "assignments": [ - 44 - ], - "declarations": [ - { - "constant": false, - "id": 44, - "mutability": "mutable", - "name": "size", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "1021:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 43, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1021:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 45, - "nodeType": "VariableDeclarationStatement", - "src": "1021:12:1" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "1108:32:1", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1110:28:1", - "value": { - "arguments": [ - { - "name": "account", - "nodeType": "YulIdentifier", - "src": "1130:7:1" - } - ], - "functionName": { - "name": "extcodesize", - "nodeType": "YulIdentifier", - "src": "1118:11:1" - }, - "nodeType": "YulFunctionCall", - "src": "1118:20:1" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "1110:4:1" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 38, - "isOffset": false, - "isSlot": false, - "src": "1130:7:1", - "valueSize": 1 - }, - { - "declaration": 44, - "isOffset": false, - "isSlot": false, - "src": "1110:4:1", - "valueSize": 1 - } - ], - "id": 46, - "nodeType": "InlineAssembly", - "src": "1099:41:1" - }, - { - "expression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 49, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 47, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "1156:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1163:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1156:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 42, - "id": 50, - "nodeType": "Return", - "src": "1149:15:1" - } - ] - }, - "documentation": { - "id": 36, - "nodeType": "StructuredDocumentation", - "src": "188:565:1", - "text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n ====" - }, - "id": 52, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 39, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 38, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 52, - "src": "778:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 37, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "778:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "777:17:1" - }, - "returnParameters": { - "id": 42, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 41, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 52, - "src": "818:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 40, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "818:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "817:6:1" - }, - "scope": 328, - "src": "758:413:1", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 85, - "nodeType": "Block", - "src": "2159:320:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 67, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "arguments": [ - { - "id": 63, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "2185:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$328", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$328", - "typeString": "library Address" - } - ], - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2177:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 61, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2177:7:1", - "typeDescriptions": {} - } - }, - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2177:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 65, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "src": "2177:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 66, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "2202:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2177:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2210:31:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - }, - "value": "Address: insufficient balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", - "typeString": "literal_string \"Address: insufficient balance\"" - } - ], - "id": 60, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2169:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2169:73:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 70, - "nodeType": "ExpressionStatement", - "src": "2169:73:1" - }, - { - "assignments": [ - 72, - null - ], - "declarations": [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 85, - "src": "2331:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 71, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2331:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - null - ], - "id": 79, - "initialValue": { - "arguments": [ - { - "hexValue": "", - "id": 77, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2381:2:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "id": 73, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "2349:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 74, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "src": "2349:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 76, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "id": 75, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "2372:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "2349:31:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 78, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2349:35:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2330:54:1" - }, - { - "expression": { - "arguments": [ - { - "id": 81, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "2402:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", - "id": 82, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2411:60:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - }, - "value": "Address: unable to send value, recipient may have reverted" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", - "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" - } - ], - "id": 80, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2394:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2394:78:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 84, - "nodeType": "ExpressionStatement", - "src": "2394:78:1" - } - ] - }, - "documentation": { - "id": 53, - "nodeType": "StructuredDocumentation", - "src": "1177:906:1", - "text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]." - }, - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sendValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 58, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 55, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "2107:25:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 54, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2107:15:1", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 57, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "2134:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 56, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2134:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "2106:43:1" - }, - "returnParameters": { - "id": 59, - "nodeType": "ParameterList", - "parameters": [], - "src": "2159:0:1" - }, - "scope": 328, - "src": "2088:391:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 102, - "nodeType": "Block", - "src": "3309:82:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 97, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 89, - "src": "3337:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 98, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 91, - "src": "3345:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3351:32:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - }, - "value": "Address: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", - "typeString": "literal_string \"Address: low-level call failed\"" - } - ], - "id": 96, - "name": "functionCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 103, - 123 - ], - "referencedDeclaration": 123, - "src": "3324:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3324:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 95, - "id": 101, - "nodeType": "Return", - "src": "3317:67:1" - } - ] - }, - "documentation": { - "id": 87, - "nodeType": "StructuredDocumentation", - "src": "2485:730:1", - "text": " @dev Performs a Solidity function call using a low level `call`. A\n plain`call` is an unsafe replacement for a function call: use this\n function instead.\n If `target` reverts with a revert reason, it is bubbled up by this\n function (like regular Solidity function calls).\n Returns the raw returned data. To convert to the expected return value,\n use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n Requirements:\n - `target` must be a contract.\n - calling `target` with `data` must not revert.\n _Available since v3.1._" - }, - "id": 103, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 92, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 89, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 103, - "src": "3242:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 88, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3242:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 91, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 103, - "src": "3258:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 90, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3258:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "3241:35:1" - }, - "returnParameters": { - "id": 95, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 94, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 103, - "src": "3295:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 93, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3295:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "3294:14:1" - }, - "scope": 328, - "src": "3220:171:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 122, - "nodeType": "Block", - "src": "3730:76:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 116, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 106, - "src": "3769:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 117, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "3777:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "30", - "id": 118, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3783:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "id": 119, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 110, - "src": "3786:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 115, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 143, - 193 - ], - "referencedDeclaration": 193, - "src": "3747:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3747:52:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 114, - "id": 121, - "nodeType": "Return", - "src": "3740:59:1" - } - ] - }, - "documentation": { - "id": 104, - "nodeType": "StructuredDocumentation", - "src": "3397:211:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 123, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 106, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 123, - "src": "3635:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 105, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3635:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 108, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 123, - "src": "3651:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 107, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3651:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 110, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 123, - "src": "3670:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 109, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "3670:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "3634:63:1" - }, - "returnParameters": { - "id": 114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 113, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 123, - "src": "3716:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 112, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3716:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "3715:14:1" - }, - "scope": 328, - "src": "3613:193:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 142, - "nodeType": "Block", - "src": "4281:111:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 136, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "4320:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 137, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 128, - "src": "4328:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 138, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "4334:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564", - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4341:43:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - }, - "value": "Address: low-level call with value failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", - "typeString": "literal_string \"Address: low-level call with value failed\"" - } - ], - "id": 135, - "name": "functionCallWithValue", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 143, - 193 - ], - "referencedDeclaration": 193, - "src": "4298:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" - } - }, - "id": 140, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4298:87:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 134, - "id": 141, - "nodeType": "Return", - "src": "4291:94:1" - } - ] - }, - "documentation": { - "id": 124, - "nodeType": "StructuredDocumentation", - "src": "3812:351:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but also transferring `value` wei to `target`.\n Requirements:\n - the calling contract must have an ETH balance of at least `value`.\n - the called Solidity function must be `payable`.\n _Available since v3.1._" - }, - "id": 143, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 126, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 143, - "src": "4199:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 125, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4199:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 128, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 143, - "src": "4215:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 127, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4215:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 143, - "src": "4234:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 129, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4234:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "4198:50:1" - }, - "returnParameters": { - "id": 134, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 133, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 143, - "src": "4267:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 132, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4267:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "4266:14:1" - }, - "scope": 328, - "src": "4168:224:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 192, - "nodeType": "Block", - "src": "4781:382:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "arguments": [ - { - "id": 160, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "4807:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$328", - "typeString": "library Address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Address_$328", - "typeString": "library Address" - } - ], - "id": 159, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4799:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 158, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4799:7:1", - "typeDescriptions": {} - } - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4799:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "src": "4799:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 163, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "4824:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4799:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c", - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4831:40:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - }, - "value": "Address: insufficient balance for call" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", - "typeString": "literal_string \"Address: insufficient balance for call\"" - } - ], - "id": 157, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "4791:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4791:81:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 167, - "nodeType": "ExpressionStatement", - "src": "4791:81:1" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 170, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 146, - "src": "4901:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 169, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "4890:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 171, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4890:18:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4910:31:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - }, - "value": "Address: call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", - "typeString": "literal_string \"Address: call to non-contract\"" - } - ], - "id": 168, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "4882:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4882:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 174, - "nodeType": "ExpressionStatement", - "src": "4882:60:1" - }, - { - "assignments": [ - 176, - 178 - ], - "declarations": [ - { - "constant": false, - "id": 176, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 192, - "src": "5013:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 175, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5013:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 178, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 192, - "src": "5027:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 177, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5027:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 185, - "initialValue": { - "arguments": [ - { - "id": 183, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 148, - "src": "5082:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 179, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 146, - "src": "5054:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "call", - "nodeType": "MemberAccess", - "src": "5054:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "id": 181, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "5074:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "5054:27:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5054:33:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5012:75:1" - }, - { - "expression": { - "arguments": [ - { - "id": 187, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "5122:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "id": 188, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 178, - "src": "5131:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 189, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 152, - "src": "5143:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 186, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 327, - "src": "5104:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5104:52:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 156, - "id": 191, - "nodeType": "Return", - "src": "5097:59:1" - } - ] - }, - "documentation": { - "id": 144, - "nodeType": "StructuredDocumentation", - "src": "4398:237:1", - "text": " @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n with `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" - }, - "id": 193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionCallWithValue", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 146, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "4671:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 145, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4671:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 148, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "4687:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 147, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4687:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 150, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "4706:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 149, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4706:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 152, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "4721:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 151, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "4721:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "4670:78:1" - }, - "returnParameters": { - "id": 156, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 155, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "4767:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 154, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4767:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "4766:14:1" - }, - "scope": 328, - "src": "4640:523:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 209, - "nodeType": "Block", - "src": "5440:97:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 204, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "5476:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 205, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 198, - "src": "5484:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564", - "id": 206, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5490:39:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - }, - "value": "Address: low-level static call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0", - "typeString": "literal_string \"Address: low-level static call failed\"" - } - ], - "id": 203, - "name": "functionStaticCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 210, - 245 - ], - "referencedDeclaration": 245, - "src": "5457:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) view returns (bytes memory)" - } - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5457:73:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 202, - "id": 208, - "nodeType": "Return", - "src": "5450:80:1" - } - ] - }, - "documentation": { - "id": 194, - "nodeType": "StructuredDocumentation", - "src": "5169:166:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 210, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionStaticCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 196, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "5368:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 195, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5368:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 198, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "5384:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 197, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5384:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "5367:35:1" - }, - "returnParameters": { - "id": 202, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 201, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "5426:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 200, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5426:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "5425:14:1" - }, - "scope": 328, - "src": "5340:197:1", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 244, - "nodeType": "Block", - "src": "5849:288:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 224, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 213, - "src": "5878:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 223, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "5867:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5867:18:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5887:38:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - }, - "value": "Address: static call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9", - "typeString": "literal_string \"Address: static call to non-contract\"" - } - ], - "id": 222, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "5859:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5859:67:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 228, - "nodeType": "ExpressionStatement", - "src": "5859:67:1" - }, - { - "assignments": [ - 230, - 232 - ], - "declarations": [ - { - "constant": false, - "id": 230, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 244, - "src": "5997:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 229, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5997:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 232, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 244, - "src": "6011:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 231, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6011:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 237, - "initialValue": { - "arguments": [ - { - "id": 235, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 215, - "src": "6056:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 233, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 213, - "src": "6038:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "staticcall", - "nodeType": "MemberAccess", - "src": "6038:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) view returns (bool,bytes memory)" - } - }, - "id": 236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6038:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5996:65:1" - }, - { - "expression": { - "arguments": [ - { - "id": 239, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 230, - "src": "6096:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "id": 240, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 232, - "src": "6105:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 241, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 217, - "src": "6117:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 238, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 327, - "src": "6078:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6078:52:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 221, - "id": 243, - "nodeType": "Return", - "src": "6071:59:1" - } - ] - }, - "documentation": { - "id": 211, - "nodeType": "StructuredDocumentation", - "src": "5543:173:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._" - }, - "id": 245, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionStaticCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 218, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 213, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 245, - "src": "5749:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 212, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5749:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 215, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 245, - "src": "5765:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 214, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5765:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 217, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 245, - "src": "5784:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 216, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5784:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "5748:63:1" - }, - "returnParameters": { - "id": 221, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 220, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 245, - "src": "5835:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 219, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5835:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "5834:14:1" - }, - "scope": 328, - "src": "5721:416:1", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 261, - "nodeType": "Block", - "src": "6413:101:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 256, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 248, - "src": "6451:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 257, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 250, - "src": "6459:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "id": 258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6465:41:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398", - "typeString": "literal_string \"Address: low-level delegate call failed\"" - }, - "value": "Address: low-level delegate call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398", - "typeString": "literal_string \"Address: low-level delegate call failed\"" - } - ], - "id": 255, - "name": "functionDelegateCall", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 262, - 297 - ], - "referencedDeclaration": 297, - "src": "6430:20:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6430:77:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 254, - "id": 260, - "nodeType": "Return", - "src": "6423:84:1" - } - ] - }, - "documentation": { - "id": 246, - "nodeType": "StructuredDocumentation", - "src": "6143:168:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._" - }, - "id": 262, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionDelegateCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 248, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 262, - "src": "6346:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6346:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 250, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 262, - "src": "6362:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 249, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6362:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "6345:35:1" - }, - "returnParameters": { - "id": 254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 253, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 262, - "src": "6399:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 252, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6399:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "6398:14:1" - }, - "scope": 328, - "src": "6316:198:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 296, - "nodeType": "Block", - "src": "6825:292:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 276, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "6854:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 275, - "name": "isContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52, - "src": "6843:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6843:18:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374", - "id": 278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6863:40:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520", - "typeString": "literal_string \"Address: delegate call to non-contract\"" - }, - "value": "Address: delegate call to non-contract" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520", - "typeString": "literal_string \"Address: delegate call to non-contract\"" - } - ], - "id": 274, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "6835:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6835:69:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 280, - "nodeType": "ExpressionStatement", - "src": "6835:69:1" - }, - { - "assignments": [ - 282, - 284 - ], - "declarations": [ - { - "constant": false, - "id": 282, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 296, - "src": "6975:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 281, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6975:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 284, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 296, - "src": "6989:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 283, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6989:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 289, - "initialValue": { - "arguments": [ - { - "id": 287, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "7036:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 285, - "name": "target", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 265, - "src": "7016:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "src": "7016:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 288, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7016:25:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6974:67:1" - }, - { - "expression": { - "arguments": [ - { - "id": 291, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 282, - "src": "7076:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "id": 292, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 284, - "src": "7085:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "id": 293, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 269, - "src": "7097:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 290, - "name": "_verifyCallResult", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 327, - "src": "7058:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)" - } - }, - "id": 294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7058:52:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 273, - "id": 295, - "nodeType": "Return", - "src": "7051:59:1" - } - ] - }, - "documentation": { - "id": 263, - "nodeType": "StructuredDocumentation", - "src": "6520:175:1", - "text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._" - }, - "id": 297, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "functionDelegateCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 270, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 265, - "mutability": "mutable", - "name": "target", - "nodeType": "VariableDeclaration", - "scope": 297, - "src": "6730:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 264, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6730:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 267, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 297, - "src": "6746:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 266, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6746:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 269, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 297, - "src": "6765:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 268, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "6765:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "6729:63:1" - }, - "returnParameters": { - "id": 273, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 272, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 297, - "src": "6811:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 271, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6811:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "6810:14:1" - }, - "scope": 328, - "src": "6700:417:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 326, - "nodeType": "Block", - "src": "7252:596:1", - "statements": [ - { - "condition": { - "id": 308, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 299, - "src": "7266:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 324, - "nodeType": "Block", - "src": "7323:519:1", - "statements": [ - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 312, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "7407:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "src": "7407:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 314, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7427:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7407:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 322, - "nodeType": "Block", - "src": "7779:53:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 319, - "name": "errorMessage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 303, - "src": "7804:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 318, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967277, - 4294967277 - ], - "referencedDeclaration": 4294967277, - "src": "7797:6:1", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7797:20:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 321, - "nodeType": "ExpressionStatement", - "src": "7797:20:1" - } - ] - }, - "id": 323, - "nodeType": "IfStatement", - "src": "7403:429:1", - "trueBody": { - "id": 317, - "nodeType": "Block", - "src": "7430:343:1", - "statements": [ - { - "AST": { - "nodeType": "YulBlock", - "src": "7614:145:1", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "7636:40:1", - "value": { - "arguments": [ - { - "name": "returndata", - "nodeType": "YulIdentifier", - "src": "7665:10:1" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "7659:5:1" - }, - "nodeType": "YulFunctionCall", - "src": "7659:17:1" - }, - "variables": [ - { - "name": "returndata_size", - "nodeType": "YulTypedName", - "src": "7640:15:1", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "7708:2:1", - "type": "", - "value": "32" - }, - { - "name": "returndata", - "nodeType": "YulIdentifier", - "src": "7712:10:1" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "7704:3:1" - }, - "nodeType": "YulFunctionCall", - "src": "7704:19:1" - }, - { - "name": "returndata_size", - "nodeType": "YulIdentifier", - "src": "7725:15:1" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "7697:6:1" - }, - "nodeType": "YulFunctionCall", - "src": "7697:44:1" - }, - "nodeType": "YulExpressionStatement", - "src": "7697:44:1" - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 301, - "isOffset": false, - "isSlot": false, - "src": "7665:10:1", - "valueSize": 1 - }, - { - "declaration": 301, - "isOffset": false, - "isSlot": false, - "src": "7712:10:1", - "valueSize": 1 - } - ], - "id": 316, - "nodeType": "InlineAssembly", - "src": "7605:154:1" - } - ] - } - } - ] - }, - "id": 325, - "nodeType": "IfStatement", - "src": "7262:580:1", - "trueBody": { - "id": 311, - "nodeType": "Block", - "src": "7275:42:1", - "statements": [ - { - "expression": { - "id": 309, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "7296:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 307, - "id": 310, - "nodeType": "Return", - "src": "7289:17:1" - } - ] - } - } - ] - }, - "id": 327, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_verifyCallResult", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 304, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 299, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 327, - "src": "7150:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 298, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7150:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 301, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 327, - "src": "7164:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 300, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7164:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 303, - "mutability": "mutable", - "name": "errorMessage", - "nodeType": "VariableDeclaration", - "scope": 327, - "src": "7189:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 302, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "7189:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "7149:67:1" - }, - "returnParameters": { - "id": 307, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 306, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 327, - "src": "7238:12:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 305, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7238:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "7237:14:1" - }, - "scope": 328, - "src": "7123:725:1", - "stateMutability": "pure", - "virtual": false, - "visibility": "private" - } - ], - "scope": 929, - "src": "166:7684:1" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": { - "id": 329, - "nodeType": "StructuredDocumentation", - "src": "7852:70:1", - "text": " @dev Interface of the ERC20 standard as defined in the EIP." - }, - "fullyImplemented": false, - "id": 404, - "linearizedBaseContracts": [ - 404 - ], - "name": "IERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "documentation": { - "id": 330, - "nodeType": "StructuredDocumentation", - "src": "7946:66:1", - "text": " @dev Returns the amount of tokens in existence." - }, - "functionSelector": "18160ddd", - "id": 335, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 331, - "nodeType": "ParameterList", - "parameters": [], - "src": "8037:2:1" - }, - "returnParameters": { - "id": 334, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 333, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 335, - "src": "8063:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 332, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8063:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8062:9:1" - }, - "scope": 404, - "src": "8017:55:1", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 336, - "nodeType": "StructuredDocumentation", - "src": "8078:72:1", - "text": " @dev Returns the amount of tokens owned by `account`." - }, - "functionSelector": "70a08231", - "id": 343, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 338, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "scope": 343, - "src": "8174:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 337, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8174:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "8173:17:1" - }, - "returnParameters": { - "id": 342, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 341, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 343, - "src": "8214:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 340, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8214:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8213:9:1" - }, - "scope": 404, - "src": "8155:68:1", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 344, - "nodeType": "StructuredDocumentation", - "src": "8229:209:1", - "text": " @dev Moves `amount` tokens from the caller's account to `recipient`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." - }, - "functionSelector": "a9059cbb", - "id": 353, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 349, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 346, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 353, - "src": "8461:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 345, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8461:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 348, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 353, - "src": "8480:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 347, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8480:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8460:35:1" - }, - "returnParameters": { - "id": 352, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 351, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 353, - "src": "8514:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 350, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8514:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "8513:6:1" - }, - "scope": 404, - "src": "8443:77:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 354, - "nodeType": "StructuredDocumentation", - "src": "8526:264:1", - "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called." - }, - "functionSelector": "dd62ed3e", - "id": 363, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 359, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 356, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 363, - "src": "8814:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 355, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8814:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 358, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 363, - "src": "8829:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 357, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8829:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "8813:32:1" - }, - "returnParameters": { - "id": 362, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 361, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 363, - "src": "8869:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 360, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8869:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "8868:9:1" - }, - "scope": 404, - "src": "8795:83:1", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 364, - "nodeType": "StructuredDocumentation", - "src": "8884:642:1", - "text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event." - }, - "functionSelector": "095ea7b3", - "id": 373, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 369, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 366, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 373, - "src": "9548:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 365, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9548:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 368, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 373, - "src": "9565:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 367, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9565:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "9547:33:1" - }, - "returnParameters": { - "id": 372, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 371, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 373, - "src": "9599:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 370, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9599:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "9598:6:1" - }, - "scope": 404, - "src": "9531:74:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 374, - "nodeType": "StructuredDocumentation", - "src": "9611:296:1", - "text": " @dev Moves `amount` tokens from `sender` to `recipient` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." - }, - "functionSelector": "23b872dd", - "id": 385, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 381, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 376, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 385, - "src": "9934:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 375, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9934:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 378, - "mutability": "mutable", - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 385, - "src": "9950:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 377, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9950:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 380, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 385, - "src": "9969:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 379, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9969:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "9933:51:1" - }, - "returnParameters": { - "id": 384, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 383, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 385, - "src": "10003:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 382, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10003:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "10002:6:1" - }, - "scope": 404, - "src": "9912:97:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "anonymous": false, - "documentation": { - "id": 386, - "nodeType": "StructuredDocumentation", - "src": "10015:158:1", - "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero." - }, - "id": 394, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 393, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 388, - "indexed": true, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 394, - "src": "10193:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 387, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10193:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 390, - "indexed": true, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 394, - "src": "10215:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 389, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10215:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 392, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 394, - "src": "10235:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 391, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10235:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "10192:57:1" - }, - "src": "10178:72:1" - }, - { - "anonymous": false, - "documentation": { - "id": 395, - "nodeType": "StructuredDocumentation", - "src": "10256:148:1", - "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance." - }, - "id": 403, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 397, - "indexed": true, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 403, - "src": "10424:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 396, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10424:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 399, - "indexed": true, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 403, - "src": "10447:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 398, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10447:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 401, - "indexed": false, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 403, - "src": "10472:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 400, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10472:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "10423:63:1" - }, - "src": "10409:78:1" - } - ], - "scope": 929, - "src": "7923:2566:1" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": { - "id": 405, - "nodeType": "StructuredDocumentation", - "src": "10491:457:1", - "text": " @title SafeERC20\n @dev Wrappers around ERC20 operations that throw on failure (when the token\n contract returns false). Tokens that return no value (and instead revert or\n throw on failure) are also supported, non-reverting calls are assumed to be\n successful.\n To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n which allows you to call the safe operations as `token.safeTransfer(...)`, etc." - }, - "fullyImplemented": true, - "id": 623, - "linearizedBaseContracts": [ - 623 - ], - "name": "SafeERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 408, - "libraryName": { - "id": 406, - "name": "Address", - "nodeType": "IdentifierPath", - "referencedDeclaration": 328, - "src": "10979:7:1" - }, - "nodeType": "UsingForDirective", - "src": "10973:26:1", - "typeName": { - "id": 407, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10991:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "body": { - "id": 430, - "nodeType": "Block", - "src": "11077:103:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 419, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 411, - "src": "11107:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 422, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 411, - "src": "11137:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 353, - "src": "11137:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "11137:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 425, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 413, - "src": "11162:2:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 426, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "11166:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 420, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "11114:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "11114:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11114:58:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 418, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 622, - "src": "11087:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$404_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11087:86:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 429, - "nodeType": "ExpressionStatement", - "src": "11087:86:1" - } - ] - }, - "id": 431, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 416, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 411, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 431, - "src": "11027:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 410, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 409, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "11027:6:1" - }, - "referencedDeclaration": 404, - "src": "11027:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 413, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 431, - "src": "11041:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 412, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11041:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 415, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 431, - "src": "11053:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 414, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11053:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "11026:41:1" - }, - "returnParameters": { - "id": 417, - "nodeType": "ParameterList", - "parameters": [], - "src": "11077:0:1" - }, - "scope": 623, - "src": "11005:175:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 456, - "nodeType": "Block", - "src": "11276:113:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 444, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 434, - "src": "11306:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 447, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 434, - "src": "11336:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 385, - "src": "11336:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "11336:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 450, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 436, - "src": "11365:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 451, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 438, - "src": "11371:2:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 452, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 440, - "src": "11375:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 445, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "11313:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 446, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "11313:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11313:68:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 443, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 622, - "src": "11286:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$404_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11286:96:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 455, - "nodeType": "ExpressionStatement", - "src": "11286:96:1" - } - ] - }, - "id": 457, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 434, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 457, - "src": "11212:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 433, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 432, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "11212:6:1" - }, - "referencedDeclaration": 404, - "src": "11212:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 436, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 457, - "src": "11226:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 435, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11226:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 438, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 457, - "src": "11240:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 437, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11240:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 440, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 457, - "src": "11252:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 439, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11252:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "11211:55:1" - }, - "returnParameters": { - "id": 442, - "nodeType": "ParameterList", - "parameters": [], - "src": "11276:0:1" - }, - "scope": 623, - "src": "11186:203:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 500, - "nodeType": "Block", - "src": "11725:537:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 469, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 465, - "src": "12014:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "hexValue": "30", - "id": 470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12023:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12014:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 472, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12013:12:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 477, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "12054:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - ], - "id": 476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12046:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 475, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12046:7:1", - "typeDescriptions": {} - } - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12046:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 479, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 463, - "src": "12061:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 473, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 461, - "src": "12030:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 363, - "src": "12030:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12030:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "hexValue": "30", - "id": 481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12073:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12030:44:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 483, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12029:46:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "12013:62:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", - "id": 485, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12089:56:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - }, - "value": "SafeERC20: approve from non-zero to non-zero allowance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", - "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" - } - ], - "id": 468, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "12005:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12005:150:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 487, - "nodeType": "ExpressionStatement", - "src": "12005:150:1" - }, - { - "expression": { - "arguments": [ - { - "id": 489, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 461, - "src": "12185:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 492, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 461, - "src": "12215:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 373, - "src": "12215:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "12215:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 495, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 463, - "src": "12239:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 496, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 465, - "src": "12248:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 490, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "12192:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "12192:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12192:62:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 488, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 622, - "src": "12165:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$404_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12165:90:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 499, - "nodeType": "ExpressionStatement", - "src": "12165:90:1" - } - ] - }, - "documentation": { - "id": 458, - "nodeType": "StructuredDocumentation", - "src": "11395:249:1", - "text": " @dev Deprecated. This function has issues similar to the ones found in\n {IERC20-approve}, and its usage is discouraged.\n Whenever possible, use {safeIncreaseAllowance} and\n {safeDecreaseAllowance} instead." - }, - "id": 501, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeApprove", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 466, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 461, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 501, - "src": "11670:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 460, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 459, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "11670:6:1" - }, - "referencedDeclaration": 404, - "src": "11670:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 463, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 501, - "src": "11684:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 462, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11684:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 465, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 501, - "src": "11701:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 464, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11701:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "11669:46:1" - }, - "returnParameters": { - "id": 467, - "nodeType": "ParameterList", - "parameters": [], - "src": "11725:0:1" - }, - "scope": 623, - "src": "11649:613:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 536, - "nodeType": "Block", - "src": "12354:194:1", - "statements": [ - { - "assignments": [ - 512 - ], - "declarations": [ - { - "constant": false, - "id": 512, - "mutability": "mutable", - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 536, - "src": "12364:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 511, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12364:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 523, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 522, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 517, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "12411:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - ], - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12403:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 515, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12403:7:1", - "typeDescriptions": {} - } - }, - "id": 518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12403:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 519, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "12418:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 513, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 504, - "src": "12387:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 363, - "src": "12387:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 520, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12387:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "id": 521, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 508, - "src": "12429:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12387:47:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12364:70:1" - }, - { - "expression": { - "arguments": [ - { - "id": 525, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 504, - "src": "12464:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 528, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 504, - "src": "12494:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 373, - "src": "12494:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "12494:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 531, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "12518:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 532, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 512, - "src": "12527:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 526, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "12471:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 527, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "12471:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12471:69:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 524, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 622, - "src": "12444:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$404_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12444:97:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 535, - "nodeType": "ExpressionStatement", - "src": "12444:97:1" - } - ] - }, - "id": 537, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeIncreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 509, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 504, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 537, - "src": "12299:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 503, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 502, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "12299:6:1" - }, - "referencedDeclaration": 404, - "src": "12299:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 506, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 537, - "src": "12313:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 505, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12313:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 508, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 537, - "src": "12330:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 507, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12330:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "12298:46:1" - }, - "returnParameters": { - "id": 510, - "nodeType": "ParameterList", - "parameters": [], - "src": "12354:0:1" - }, - "scope": 623, - "src": "12268:280:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 583, - "nodeType": "Block", - "src": "12640:340:1", - "statements": [ - { - "assignments": [ - 548 - ], - "declarations": [ - { - "constant": false, - "id": 548, - "mutability": "mutable", - "name": "oldAllowance", - "nodeType": "VariableDeclaration", - "scope": 583, - "src": "12654:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 547, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12654:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 557, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "id": 553, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967268, - "src": "12701:4:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_SafeERC20_$623", - "typeString": "library SafeERC20" - } - ], - "id": 552, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12693:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 551, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12693:7:1", - "typeDescriptions": {} - } - }, - "id": 554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12693:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 555, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 542, - "src": "12708:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 549, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 540, - "src": "12677:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 363, - "src": "12677:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view external returns (uint256)" - } - }, - "id": 556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12677:39:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12654:62:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 559, - "name": "oldAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 548, - "src": "12738:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 560, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 544, - "src": "12754:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12738:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", - "id": 562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12761:43:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - }, - "value": "SafeERC20: decreased allowance below zero" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", - "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" - } - ], - "id": 558, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "12730:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12730:75:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 564, - "nodeType": "ExpressionStatement", - "src": "12730:75:1" - }, - { - "assignments": [ - 566 - ], - "declarations": [ - { - "constant": false, - "id": 566, - "mutability": "mutable", - "name": "newAllowance", - "nodeType": "VariableDeclaration", - "scope": 583, - "src": "12819:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 565, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12819:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 570, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 567, - "name": "oldAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 548, - "src": "12842:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "id": 568, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 544, - "src": "12857:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12842:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12819:43:1" - }, - { - "expression": { - "arguments": [ - { - "id": 572, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 540, - "src": "12896:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - { - "arguments": [ - { - "expression": { - "expression": { - "id": 575, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 540, - "src": "12926:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "id": 576, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 373, - "src": "12926:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "src": "12926:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "id": 578, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 542, - "src": "12950:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 579, - "name": "newAllowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 566, - "src": "12959:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 573, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "12903:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 574, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSelector", - "nodeType": "MemberAccess", - "src": "12903:22:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (bytes4) pure returns (bytes memory)" - } - }, - "id": 580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12903:69:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 571, - "name": "_callOptionalReturn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 622, - "src": "12876:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$404_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (contract IERC20,bytes memory)" - } - }, - "id": 581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12876:97:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 582, - "nodeType": "ExpressionStatement", - "src": "12876:97:1" - } - ] - }, - "id": 584, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeDecreaseAllowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 545, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 540, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 584, - "src": "12585:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 539, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 538, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "12585:6:1" - }, - "referencedDeclaration": 404, - "src": "12585:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 542, - "mutability": "mutable", - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 584, - "src": "12599:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 541, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12599:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 544, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 584, - "src": "12616:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 543, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12616:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "12584:46:1" - }, - "returnParameters": { - "id": 546, - "nodeType": "ParameterList", - "parameters": [], - "src": "12640:0:1" - }, - "scope": 623, - "src": "12554:426:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 621, - "nodeType": "Block", - "src": "13433:681:1", - "statements": [ - { - "assignments": [ - 594 - ], - "declarations": [ - { - "constant": false, - "id": 594, - "mutability": "mutable", - "name": "returndata", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "13782:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 593, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13782:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 603, - "initialValue": { - "arguments": [ - { - "id": 600, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "13836:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13842:34:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - }, - "value": "SafeERC20: low-level call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", - "typeString": "literal_string \"SafeERC20: low-level call failed\"" - } - ], - "expression": { - "arguments": [ - { - "id": 597, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 588, - "src": "13816:5:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - ], - "id": 596, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "13808:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 595, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13808:7:1", - "typeDescriptions": {} - } - }, - "id": 598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13808:14:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "functionCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 123, - "src": "13808:27:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_address_$", - "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" - } - }, - "id": 602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13808:69:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "13782:95:1" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 604, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 594, - "src": "13891:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "src": "13891:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 606, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13911:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "13891:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 620, - "nodeType": "IfStatement", - "src": "13887:221:1", - "trueBody": { - "id": 619, - "nodeType": "Block", - "src": "13914:194:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 611, - "name": "returndata", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 594, - "src": "14031:10:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "components": [ - { - "id": 613, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "14044:4:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - }, - "typeName": { - "id": 612, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14044:4:1", - "typeDescriptions": {} - } - } - ], - "id": 614, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "14043:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_type$_t_bool_$", - "typeString": "type(bool)" - } - ], - "expression": { - "id": 609, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "14020:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 610, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "src": "14020:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14020:30:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14052:44:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - }, - "value": "SafeERC20: ERC20 operation did not succeed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", - "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" - } - ], - "id": 608, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "14012:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14012:85:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 618, - "nodeType": "ExpressionStatement", - "src": "14012:85:1" - } - ] - } - } - ] - }, - "documentation": { - "id": 585, - "nodeType": "StructuredDocumentation", - "src": "12986:372:1", - "text": " @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n on the return value: the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param data The call data (encoded using abi.encode or one of its variants)." - }, - "id": 622, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_callOptionalReturn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 591, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 588, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 622, - "src": "13392:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - }, - "typeName": { - "id": 587, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 586, - "name": "IERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 404, - "src": "13392:6:1" - }, - "referencedDeclaration": 404, - "src": "13392:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$404", - "typeString": "contract IERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 590, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 622, - "src": "13406:17:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 589, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13406:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "13391:33:1" - }, - "returnParameters": { - "id": 592, - "nodeType": "ParameterList", - "parameters": [], - "src": "13433:0:1" - }, - "scope": 623, - "src": "13363:751:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "private" - } - ], - "scope": 929, - "src": "10949:3167:1" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "fullyImplemented": false, - "id": 690, - "linearizedBaseContracts": [ - 690 - ], - "name": "iToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "documentation": { - "id": 624, - "nodeType": "StructuredDocumentation", - "src": "14141:106:1", - "text": "@param _owner The address from which the balance will be retrieved\n @return balance the balance" - }, - "functionSelector": "70a08231", - "id": 631, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 627, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 626, - "mutability": "mutable", - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 631, - "src": "14271:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 625, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14271:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "14270:16:1" - }, - "returnParameters": { - "id": 630, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 629, - "mutability": "mutable", - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 631, - "src": "14310:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 628, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14310:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "14309:17:1" - }, - "scope": 690, - "src": "14252:75:1", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 632, - "nodeType": "StructuredDocumentation", - "src": "14333:233:1", - "text": "@notice send `_value` token to `_to` from `msg.sender`\n @param _to The address of the recipient\n @param _value The amount of token to be transferred\n @return success Whether the transfer was successful or not" - }, - "functionSelector": "a9059cbb", - "id": 641, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 637, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 634, - "mutability": "mutable", - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 641, - "src": "14589:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 633, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14589:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 636, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 641, - "src": "14602:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 635, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14602:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "14588:29:1" - }, - "returnParameters": { - "id": 640, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 639, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 641, - "src": "14637:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 638, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14637:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "14636:14:1" - }, - "scope": 690, - "src": "14571:80:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 642, - "nodeType": "StructuredDocumentation", - "src": "14657:318:1", - "text": "@notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\n @param _from The address of the sender\n @param _to The address of the recipient\n @param _value The amount of token to be transferred\n @return success Whether the transfer was successful or not" - }, - "functionSelector": "23b872dd", - "id": 653, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 649, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 644, - "mutability": "mutable", - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "15002:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 643, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15002:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 646, - "mutability": "mutable", - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "15017:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 645, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15017:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 648, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "15030:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 647, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15030:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "15001:44:1" - }, - "returnParameters": { - "id": 652, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 651, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "15064:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 650, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15064:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "15063:14:1" - }, - "scope": 690, - "src": "14980:98:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 654, - "nodeType": "StructuredDocumentation", - "src": "15084:280:1", - "text": "@notice `msg.sender` approves `_addr` to spend `_value` tokens\n @param _spender The address of the account able to transfer the tokens\n @param _value The amount of wei to be approved for transfer\n @return success Whether the approval was successful or not" - }, - "functionSelector": "095ea7b3", - "id": 663, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 659, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 656, - "mutability": "mutable", - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 663, - "src": "15386:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 655, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15386:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 658, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 663, - "src": "15406:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 657, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15406:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "15385:36:1" - }, - "returnParameters": { - "id": 662, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 661, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 663, - "src": "15440:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 660, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15440:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "15439:14:1" - }, - "scope": 690, - "src": "15369:85:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "documentation": { - "id": 664, - "nodeType": "StructuredDocumentation", - "src": "15460:207:1", - "text": "@param _owner The address of the account owning tokens\n @param _spender The address of the account able to transfer the tokens\n @return remaining Amount of remaining tokens allowed to spent" - }, - "functionSelector": "dd62ed3e", - "id": 673, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 669, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 666, - "mutability": "mutable", - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 673, - "src": "15691:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 665, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15691:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 668, - "mutability": "mutable", - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 673, - "src": "15707:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 667, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15707:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "15690:34:1" - }, - "returnParameters": { - "id": 672, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 671, - "mutability": "mutable", - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 673, - "src": "15748:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 670, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15748:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "15747:19:1" - }, - "scope": 690, - "src": "15672:95:1", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "anonymous": false, - "id": 681, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 680, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 675, - "indexed": true, - "mutability": "mutable", - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 681, - "src": "15788:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 674, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15788:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 677, - "indexed": true, - "mutability": "mutable", - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 681, - "src": "15811:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 676, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15811:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 679, - "indexed": false, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 681, - "src": "15832:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 678, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15832:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "15787:60:1" - }, - "src": "15773:75:1" - }, - { - "anonymous": false, - "id": 689, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 688, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 683, - "indexed": true, - "mutability": "mutable", - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 689, - "src": "15868:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 682, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15868:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 685, - "indexed": true, - "mutability": "mutable", - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 689, - "src": "15892:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 684, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "15892:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 687, - "indexed": false, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 689, - "src": "15918:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 686, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15918:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "15867:66:1" - }, - "src": "15853:81:1" - } - ], - "scope": 929, - "src": "14117:1819:1" - }, - { - "abstract": false, - "baseContracts": [ - { - "baseName": { - "id": 691, - "name": "iToken", - "nodeType": "IdentifierPath", - "referencedDeclaration": 690, - "src": "15961:6:1" - }, - "id": 692, - "nodeType": "InheritanceSpecifier", - "src": "15961:6:1" - } - ], - "contractDependencies": [ - 690 - ], - "contractKind": "contract", - "fullyImplemented": true, - "id": 928, - "linearizedBaseContracts": [ - 928, - 690 - ], - "name": "Test_Token", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 696, - "libraryName": { - "id": 693, - "name": "SafeERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 623, - "src": "15980:9:1" - }, - "nodeType": "UsingForDirective", - "src": "15974:27:1", - "typeName": { - "id": 695, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 694, - "name": "iToken", - "nodeType": "IdentifierPath", - "referencedDeclaration": 690, - "src": "15994:6:1" - }, - "referencedDeclaration": 690, - "src": "15994:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_iToken_$690", - "typeString": "contract iToken" - } - } - }, - { - "constant": true, - "id": 703, - "mutability": "constant", - "name": "MAX_UINT256", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16007:49:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 697, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16007:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "commonType": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9935" - }, - "id": 702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "commonType": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9936" - }, - "id": 700, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "hexValue": "32", - "id": 698, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16046:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "hexValue": "323536", - "id": 699, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16049:3:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_256_by_1", - "typeString": "int_const 256" - }, - "value": "256" - }, - "src": "16046:6:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9936" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "hexValue": "31", - "id": 701, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16055:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "16046:10:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9935" - } - }, - "visibility": "private" - }, - { - "constant": false, - "functionSelector": "27e235e3", - "id": 707, - "mutability": "mutable", - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16062:44:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 706, - "keyType": { - "id": 704, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16071:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "16062:28:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16082:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "5c658165", - "id": 713, - "mutability": "mutable", - "name": "allowed", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16112:64:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 712, - "keyType": { - "id": 708, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16121:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "16112:49:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 711, - "keyType": { - "id": 709, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16141:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "16132:28:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 710, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16152:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "18160ddd", - "id": 715, - "mutability": "mutable", - "name": "totalSupply", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16182:26:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 714, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16182:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "06fdde03", - "id": 717, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16501:18:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 716, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16501:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "313ce567", - "id": 719, - "mutability": "mutable", - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16572:21:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 718, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "16572:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "95d89b41", - "id": 721, - "mutability": "mutable", - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 928, - "src": "16643:20:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 720, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16643:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "public" - }, - { - "body": { - "id": 755, - "nodeType": "Block", - "src": "16822:493:1", - "statements": [ - { - "expression": { - "id": 737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 732, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "16832:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 735, - "indexExpression": { - "expression": { - "id": 733, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "16841:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "16841:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16832:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 736, - "name": "_initialAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 723, - "src": "16855:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16832:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 738, - "nodeType": "ExpressionStatement", - "src": "16832:37:1" - }, - { - "expression": { - "id": 741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 739, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "16932:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 740, - "name": "_initialAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 723, - "src": "16946:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16932:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 742, - "nodeType": "ExpressionStatement", - "src": "16932:28:1" - }, - { - "expression": { - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 743, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 717, - "src": "17016:4:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 744, - "name": "_tokenName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 725, - "src": "17023:10:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "17016:17:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 746, - "nodeType": "ExpressionStatement", - "src": "17016:17:1" - }, - { - "expression": { - "id": 749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 747, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 719, - "src": "17114:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 748, - "name": "_decimalUnits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "17125:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "17114:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 750, - "nodeType": "ExpressionStatement", - "src": "17114:24:1" - }, - { - "expression": { - "id": 753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 751, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 721, - "src": "17218:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 752, - "name": "_tokenSymbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 729, - "src": "17227:12:1", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "17218:21:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 754, - "nodeType": "ExpressionStatement", - "src": "17218:21:1" - } - ] - }, - "id": 756, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 730, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 723, - "mutability": "mutable", - "name": "_initialAmount", - "nodeType": "VariableDeclaration", - "scope": 756, - "src": "16722:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 722, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16722:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 725, - "mutability": "mutable", - "name": "_tokenName", - "nodeType": "VariableDeclaration", - "scope": 756, - "src": "16746:24:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 724, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16746:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 727, - "mutability": "mutable", - "name": "_decimalUnits", - "nodeType": "VariableDeclaration", - "scope": 756, - "src": "16772:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 726, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "16772:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 729, - "mutability": "mutable", - "name": "_tokenSymbol", - "nodeType": "VariableDeclaration", - "scope": 756, - "src": "16793:27:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 728, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "16793:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "16721:100:1" - }, - "returnParameters": { - "id": 731, - "nodeType": "ParameterList", - "parameters": [], - "src": "16822:0:1" - }, - "scope": 928, - "src": "16710:605:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 641 - ], - "body": { - "id": 798, - "nodeType": "Block", - "src": "17407:295:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 772, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "baseExpression": { - "id": 767, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "17425:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 770, - "indexExpression": { - "expression": { - "id": 768, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "17434:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "17434:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17425:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 771, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 760, - "src": "17449:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17425:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "746f6b656e2062616c616e6365206973206c6f776572207468616e207468652076616c756520726571756573746564", - "id": 773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17457:49:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1585781bcea687a18f97b1a94f6f8e11a9041130e156fda9ccf03b1c68f06452", - "typeString": "literal_string \"token balance is lower than the value requested\"" - }, - "value": "token balance is lower than the value requested" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1585781bcea687a18f97b1a94f6f8e11a9041130e156fda9ccf03b1c68f06452", - "typeString": "literal_string \"token balance is lower than the value requested\"" - } - ], - "id": 766, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "17417:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 774, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17417:90:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 775, - "nodeType": "ExpressionStatement", - "src": "17417:90:1" - }, - { - "expression": { - "id": 781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 776, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "17517:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 779, - "indexExpression": { - "expression": { - "id": 777, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "17526:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 778, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "17526:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "17517:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "id": 780, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 760, - "src": "17541:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17517:30:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 782, - "nodeType": "ExpressionStatement", - "src": "17517:30:1" - }, - { - "expression": { - "id": 787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 783, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "17557:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 785, - "indexExpression": { - "id": 784, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 758, - "src": "17566:3:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "17557:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "id": 786, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 760, - "src": "17574:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17557:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 788, - "nodeType": "ExpressionStatement", - "src": "17557:23:1" - }, - { - "eventCall": { - "arguments": [ - { - "expression": { - "id": 790, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "17604:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "17604:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 792, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 758, - "src": "17616:3:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 793, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 760, - "src": "17621:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 789, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 681, - "src": "17595:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17595:33:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 795, - "nodeType": "EmitStatement", - "src": "17590:38:1" - }, - { - "expression": { - "hexValue": "74727565", - "id": 796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17691:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 765, - "id": 797, - "nodeType": "Return", - "src": "17684:11:1" - } - ] - }, - "functionSelector": "a9059cbb", - "id": 799, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 762, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "17375:8:1" - }, - "parameters": { - "id": 761, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 758, - "mutability": "mutable", - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 799, - "src": "17339:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 757, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17339:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 760, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 799, - "src": "17352:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 759, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17352:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "17338:29:1" - }, - "returnParameters": { - "id": 765, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 764, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 799, - "src": "17393:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 763, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17393:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "17392:14:1" - }, - "scope": 928, - "src": "17321:381:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 653 - ], - "body": { - "id": 867, - "nodeType": "Block", - "src": "17813:468:1", - "statements": [ - { - "assignments": [ - 812 - ], - "declarations": [ - { - "constant": false, - "id": 812, - "mutability": "mutable", - "name": "allowance", - "nodeType": "VariableDeclaration", - "scope": 867, - "src": "17823:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 811, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17823:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 819, - "initialValue": { - "baseExpression": { - "baseExpression": { - "id": 813, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "17843:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 815, - "indexExpression": { - "id": 814, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "17851:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17843:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 818, - "indexExpression": { - "expression": { - "id": 816, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "17858:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 817, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "17858:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17843:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17823:46:1" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 829, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "baseExpression": { - "id": 821, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "17887:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 823, - "indexExpression": { - "id": 822, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "17896:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17887:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 824, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "17906:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17887:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 826, - "name": "allowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 812, - "src": "17916:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 827, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "17929:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17916:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "17887:48:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "746f6b656e2062616c616e6365206f7220616c6c6f77616e6365206973206c6f776572207468616e20616d6f756e7420726571756573746564", - "id": 830, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17937:59:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d8d39484df698fe59d78d2031639e610e556bf68a0e1f7af4e968ff763a96c6a", - "typeString": "literal_string \"token balance or allowance is lower than amount requested\"" - }, - "value": "token balance or allowance is lower than amount requested" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d8d39484df698fe59d78d2031639e610e556bf68a0e1f7af4e968ff763a96c6a", - "typeString": "literal_string \"token balance or allowance is lower than amount requested\"" - } - ], - "id": 820, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "17879:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17879:118:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 832, - "nodeType": "ExpressionStatement", - "src": "17879:118:1" - }, - { - "expression": { - "id": 837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 833, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "18007:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 835, - "indexExpression": { - "id": 834, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 803, - "src": "18016:3:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18007:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "id": 836, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "18024:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18007:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 838, - "nodeType": "ExpressionStatement", - "src": "18007:23:1" - }, - { - "expression": { - "id": 843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 839, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "18040:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 841, - "indexExpression": { - "id": 840, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "18049:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18040:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "id": 842, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "18059:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18040:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 844, - "nodeType": "ExpressionStatement", - "src": "18040:25:1" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 845, - "name": "allowance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 812, - "src": "18079:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "id": 846, - "name": "MAX_UINT256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "18091:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18079:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 858, - "nodeType": "IfStatement", - "src": "18075:90:1", - "trueBody": { - "id": 857, - "nodeType": "Block", - "src": "18104:61:1", - "statements": [ - { - "expression": { - "id": 855, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "baseExpression": { - "id": 848, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "18118:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 852, - "indexExpression": { - "id": 849, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "18126:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18118:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 853, - "indexExpression": { - "expression": { - "id": 850, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "18133:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "18133:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18118:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "id": 854, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "18148:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18118:36:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 856, - "nodeType": "ExpressionStatement", - "src": "18118:36:1" - } - ] - } - }, - { - "eventCall": { - "arguments": [ - { - "id": 860, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 801, - "src": "18188:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 861, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 803, - "src": "18195:3:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 862, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 805, - "src": "18200:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 859, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 681, - "src": "18179:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18179:28:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 864, - "nodeType": "EmitStatement", - "src": "18174:33:1" - }, - { - "expression": { - "hexValue": "74727565", - "id": 865, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18270:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 810, - "id": 866, - "nodeType": "Return", - "src": "18263:11:1" - } - ] - }, - "functionSelector": "23b872dd", - "id": 868, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 807, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "17781:8:1" - }, - "parameters": { - "id": 806, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 801, - "mutability": "mutable", - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 868, - "src": "17730:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 800, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17730:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 803, - "mutability": "mutable", - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 868, - "src": "17745:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 802, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17745:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 805, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 868, - "src": "17758:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 804, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17758:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "17729:44:1" - }, - "returnParameters": { - "id": 810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 809, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 868, - "src": "17799:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 808, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "17799:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "17798:14:1" - }, - "scope": 928, - "src": "17708:573:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 631 - ], - "body": { - "id": 880, - "nodeType": "Block", - "src": "18369:40:1", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 876, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 707, - "src": "18386:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 878, - "indexExpression": { - "id": 877, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 870, - "src": "18395:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18386:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 875, - "id": 879, - "nodeType": "Return", - "src": "18379:23:1" - } - ] - }, - "functionSelector": "70a08231", - "id": 881, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 872, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "18329:8:1" - }, - "parameters": { - "id": 871, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 870, - "mutability": "mutable", - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 881, - "src": "18306:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 869, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18306:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "18305:16:1" - }, - "returnParameters": { - "id": 875, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 874, - "mutability": "mutable", - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 881, - "src": "18352:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 873, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18352:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "18351:17:1" - }, - "scope": 928, - "src": "18287:122:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 663 - ], - "body": { - "id": 909, - "nodeType": "Block", - "src": "18505:175:1", - "statements": [ - { - "expression": { - "id": 898, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "baseExpression": { - "id": 891, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "18515:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 895, - "indexExpression": { - "expression": { - "id": 892, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "18523:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "18523:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18515:19:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 896, - "indexExpression": { - "id": 894, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 883, - "src": "18535:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18515:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 897, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 885, - "src": "18547:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18515:38:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 899, - "nodeType": "ExpressionStatement", - "src": "18515:38:1" - }, - { - "eventCall": { - "arguments": [ - { - "expression": { - "id": 901, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "18577:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "18577:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 903, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 883, - "src": "18589:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 904, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 885, - "src": "18599:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 900, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 689, - "src": "18568:8:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18568:38:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 906, - "nodeType": "EmitStatement", - "src": "18563:43:1" - }, - { - "expression": { - "hexValue": "74727565", - "id": 907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18669:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 890, - "id": 908, - "nodeType": "Return", - "src": "18662:11:1" - } - ] - }, - "functionSelector": "095ea7b3", - "id": 910, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 887, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "18473:8:1" - }, - "parameters": { - "id": 886, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 883, - "mutability": "mutable", - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 910, - "src": "18432:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 882, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18432:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 885, - "mutability": "mutable", - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 910, - "src": "18450:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 884, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18450:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "18431:34:1" - }, - "returnParameters": { - "id": 890, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 889, - "mutability": "mutable", - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 910, - "src": "18491:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 888, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "18491:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "18490:14:1" - }, - "scope": 928, - "src": "18415:265:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 673 - ], - "body": { - "id": 926, - "nodeType": "Block", - "src": "18788:49:1", - "statements": [ - { - "expression": { - "baseExpression": { - "baseExpression": { - "id": 920, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 713, - "src": "18805:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 922, - "indexExpression": { - "id": 921, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 912, - "src": "18813:6:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18805:15:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 924, - "indexExpression": { - "id": 923, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 914, - "src": "18821:8:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18805:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 919, - "id": 925, - "nodeType": "Return", - "src": "18798:32:1" - } - ] - }, - "functionSelector": "dd62ed3e", - "id": 927, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 916, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "18746:8:1" - }, - "parameters": { - "id": 915, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 912, - "mutability": "mutable", - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 927, - "src": "18705:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 911, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18705:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 914, - "mutability": "mutable", - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 927, - "src": "18721:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 913, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18721:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "18704:34:1" - }, - "returnParameters": { - "id": 919, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 918, - "mutability": "mutable", - "name": "remaining", - "nodeType": "VariableDeclaration", - "scope": 927, - "src": "18769:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 917, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "18769:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "18768:19:1" - }, - "scope": 928, - "src": "18686:151:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 929, - "src": "15938:2901:1" - } - ], - "src": "73:18766:1" - }, - "compiler": { - "name": "solc", - "version": "0.8.0+commit.c7dfd78e.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.3", - "updatedAt": "2021-02-08T17:00:21.793Z", - "devdoc": { - "kind": "dev", - "methods": { - "allowance(address,address)": { - "params": { - "_owner": "The address of the account owning tokens", - "_spender": "The address of the account able to transfer the tokens" - }, - "returns": { - "remaining": "Amount of remaining tokens allowed to spent" - } - }, - "approve(address,uint256)": { - "params": { - "_spender": "The address of the account able to transfer the tokens", - "_value": "The amount of wei to be approved for transfer" - }, - "returns": { - "success": "Whether the approval was successful or not" - } - }, - "balanceOf(address)": { - "params": { - "_owner": "The address from which the balance will be retrieved" - }, - "returns": { - "balance": "the balance" - } - }, - "transfer(address,uint256)": { - "params": { - "_to": "The address of the recipient", - "_value": "The amount of token to be transferred" - }, - "returns": { - "success": "Whether the transfer was successful or not" - } - }, - "transferFrom(address,address,uint256)": { - "params": { - "_from": "The address of the sender", - "_to": "The address of the recipient", - "_value": "The amount of token to be transferred" - }, - "returns": { - "success": "Whether the transfer was successful or not" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "approve(address,uint256)": { - "notice": "`msg.sender` approves `_addr` to spend `_value` tokens" - }, - "transfer(address,uint256)": { - "notice": "send `_value` token to `_to` from `msg.sender`" - }, - "transferFrom(address,address,uint256)": { - "notice": "send `_value` token to `_to` from `_from` on the condition it is approved by `_from`" - } - }, - "version": 1 - } -} \ No newline at end of file diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/Token.sol b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/Token.sol deleted file mode 100644 index 762acbc1a2..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/solidity/token-erc20-contract/Token.sol +++ /dev/null @@ -1,425 +0,0 @@ -// https://eips.ethereum.org/EIPS/eip-20 -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -/** - * @dev Collection of functions related to the address type - */ -library Address { - /** - * @dev Returns true if `account` is a contract. - * - * [IMPORTANT] - * ==== - * It is unsafe to assume that an address for which this function returns - * false is an externally-owned account (EOA) and not a contract. - * - * Among others, `isContract` will return false for the following - * types of addresses: - * - * - an externally-owned account - * - a contract in construction - * - an address where a contract will be created - * - an address where a contract lived, but was destroyed - * ==== - */ - function isContract(address account) internal view returns (bool) { - // This method relies on extcodesize, which returns 0 for contracts in - // construction, since the code is only stored at the end of the - // constructor execution. - - uint256 size; - // solhint-disable-next-line no-inline-assembly - assembly { size := extcodesize(account) } - return size > 0; - } - - /** - * @dev Replacement for Solidity's `transfer`: sends `amount` wei to - * `recipient`, forwarding all available gas and reverting on errors. - * - * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost - * of certain opcodes, possibly making contracts go over the 2300 gas limit - * imposed by `transfer`, making them unable to receive funds via - * `transfer`. {sendValue} removes this limitation. - * - * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. - * - * IMPORTANT: because control is transferred to `recipient`, care must be - * taken to not create reentrancy vulnerabilities. Consider using - * {ReentrancyGuard} or the - * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. - */ - function sendValue(address payable recipient, uint256 amount) internal { - require(address(this).balance >= amount, "Address: insufficient balance"); - - // solhint-disable-next-line avoid-low-level-calls, avoid-call-value - (bool success, ) = recipient.call{ value: amount }(""); - require(success, "Address: unable to send value, recipient may have reverted"); - } - - /** - * @dev Performs a Solidity function call using a low level `call`. A - * plain`call` is an unsafe replacement for a function call: use this - * function instead. - * - * If `target` reverts with a revert reason, it is bubbled up by this - * function (like regular Solidity function calls). - * - * Returns the raw returned data. To convert to the expected return value, - * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. - * - * Requirements: - * - * - `target` must be a contract. - * - calling `target` with `data` must not revert. - * - * _Available since v3.1._ - */ - function functionCall(address target, bytes memory data) internal returns (bytes memory) { - return functionCall(target, data, "Address: low-level call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with - * `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ - function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { - return functionCallWithValue(target, data, 0, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but also transferring `value` wei to `target`. - * - * Requirements: - * - * - the calling contract must have an ETH balance of at least `value`. - * - the called Solidity function must be `payable`. - * - * _Available since v3.1._ - */ - function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { - return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); - } - - /** - * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but - * with `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ - function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { - require(address(this).balance >= value, "Address: insufficient balance for call"); - require(isContract(target), "Address: call to non-contract"); - - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory returndata) = target.call{ value: value }(data); - return _verifyCallResult(success, returndata, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ - function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { - return functionStaticCall(target, data, "Address: low-level static call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ - function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { - require(isContract(target), "Address: static call to non-contract"); - - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory returndata) = target.staticcall(data); - return _verifyCallResult(success, returndata, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a delegate call. - * - * _Available since v3.4._ - */ - function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { - return functionDelegateCall(target, data, "Address: low-level delegate call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a delegate call. - * - * _Available since v3.4._ - */ - function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { - require(isContract(target), "Address: delegate call to non-contract"); - - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory returndata) = target.delegatecall(data); - return _verifyCallResult(success, returndata, errorMessage); - } - - function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { - if (success) { - return returndata; - } else { - // Look for revert reason and bubble it up if present - if (returndata.length > 0) { - // The easiest way to bubble the revert reason is using memory via assembly - - // solhint-disable-next-line no-inline-assembly - assembly { - let returndata_size := mload(returndata) - revert(add(32, returndata), returndata_size) - } - } else { - revert(errorMessage); - } - } - } -} - -/** - * @dev Interface of the ERC20 standard as defined in the EIP. - */ -interface IERC20 { - /** - * @dev Returns the amount of tokens in existence. - */ - function totalSupply() external view returns (uint256); - - /** - * @dev Returns the amount of tokens owned by `account`. - */ - function balanceOf(address account) external view returns (uint256); - - /** - * @dev Moves `amount` tokens from the caller's account to `recipient`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transfer(address recipient, uint256 amount) external returns (bool); - - /** - * @dev Returns the remaining number of tokens that `spender` will be - * allowed to spend on behalf of `owner` through {transferFrom}. This is - * zero by default. - * - * This value changes when {approve} or {transferFrom} are called. - */ - function allowance(address owner, address spender) external view returns (uint256); - - /** - * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * IMPORTANT: Beware that changing an allowance with this method brings the risk - * that someone may use both the old and the new allowance by unfortunate - * transaction ordering. One possible solution to mitigate this race - * condition is to first reduce the spender's allowance to 0 and set the - * desired value afterwards: - * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * - * Emits an {Approval} event. - */ - function approve(address spender, uint256 amount) external returns (bool); - - /** - * @dev Moves `amount` tokens from `sender` to `recipient` using the - * allowance mechanism. `amount` is then deducted from the caller's - * allowance. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); - - /** - * @dev Emitted when `value` tokens are moved from one account (`from`) to - * another (`to`). - * - * Note that `value` may be zero. - */ - event Transfer(address indexed from, address indexed to, uint256 value); - - /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by - * a call to {approve}. `value` is the new allowance. - */ - event Approval(address indexed owner, address indexed spender, uint256 value); -} - -/** - * @title SafeERC20 - * @dev Wrappers around ERC20 operations that throw on failure (when the token - * contract returns false). Tokens that return no value (and instead revert or - * throw on failure) are also supported, non-reverting calls are assumed to be - * successful. - * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, - * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. - */ -library SafeERC20 { - using Address for address; - - function safeTransfer(IERC20 token, address to, uint256 value) internal { - _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); - } - - function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { - _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); - } - - /** - * @dev Deprecated. This function has issues similar to the ones found in - * {IERC20-approve}, and its usage is discouraged. - * - * Whenever possible, use {safeIncreaseAllowance} and - * {safeDecreaseAllowance} instead. - */ - function safeApprove(IERC20 token, address spender, uint256 value) internal { - // safeApprove should only be called when setting an initial allowance, - // or when resetting it to zero. To increase and decrease it, use - // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' - // solhint-disable-next-line max-line-length - require((value == 0) || (token.allowance(address(this), spender) == 0), - "SafeERC20: approve from non-zero to non-zero allowance" - ); - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); - } - - function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { - uint256 newAllowance = token.allowance(address(this), spender) + value; - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); - } - - function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { - uint256 oldAllowance = token.allowance(address(this), spender); - require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); - uint256 newAllowance = oldAllowance - value; - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); - } - - /** - * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement - * on the return value: the return value is optional (but if data is returned, it must not be false). - * @param token The token targeted by the call. - * @param data The call data (encoded using abi.encode or one of its variants). - */ - function _callOptionalReturn(IERC20 token, bytes memory data) private { - // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since - // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that - // the target address contains contract code and also asserts for success in the low-level call. - - bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); - if (returndata.length > 0) { // Return data is optional - // solhint-disable-next-line max-line-length - require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); - } - } -} -interface iToken { - - /// @param _owner The address from which the balance will be retrieved - /// @return balance the balance - function balanceOf(address _owner) external view returns (uint256 balance); - - /// @notice send `_value` token to `_to` from `msg.sender` - /// @param _to The address of the recipient - /// @param _value The amount of token to be transferred - /// @return success Whether the transfer was successful or not - function transfer(address _to, uint256 _value) external returns (bool success); - - /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` - /// @param _from The address of the sender - /// @param _to The address of the recipient - /// @param _value The amount of token to be transferred - /// @return success Whether the transfer was successful or not - function transferFrom(address _from, address _to, uint256 _value) external returns (bool success); - - /// @notice `msg.sender` approves `_addr` to spend `_value` tokens - /// @param _spender The address of the account able to transfer the tokens - /// @param _value The amount of wei to be approved for transfer - /// @return success Whether the approval was successful or not - function approve(address _spender , uint256 _value) external returns (bool success); - - /// @param _owner The address of the account owning tokens - /// @param _spender The address of the account able to transfer the tokens - /// @return remaining Amount of remaining tokens allowed to spent - function allowance(address _owner, address _spender) external view returns (uint256 remaining); - - event Transfer(address indexed _from, address indexed _to, uint256 _value); - event Approval(address indexed _owner, address indexed _spender, uint256 _value); -} - -contract Test_Token is iToken { - using SafeERC20 for iToken; - - uint256 constant private MAX_UINT256 = 2**256 - 1; - mapping (address => uint256) public balances; - mapping (address => mapping (address => uint256)) public allowed; - uint256 public totalSupply; - /* - NOTE: - The following variables are OPTIONAL vanities. One does not have to include them. - They allow one to customise the token contract & in no way influences the core functionality. - Some wallets/interfaces might not even bother to look at this information. - */ - string public name; //fancy name: eg Simon Bucks - uint8 public decimals; //How many decimals to show. - string public symbol; //An identifier: eg SBX - - constructor(uint256 _initialAmount, string memory _tokenName, uint8 _decimalUnits, string memory _tokenSymbol) { - balances[msg.sender] = _initialAmount; // Give the creator all initial tokens - totalSupply = _initialAmount; // Update total supply - name = _tokenName; // Set the name for display purposes - decimals = _decimalUnits; // Amount of decimals for display purposes - symbol = _tokenSymbol; // Set the symbol for display purposes - } - - function transfer(address _to, uint256 _value) public override returns (bool success) { - require(balances[msg.sender] >= _value, "token balance is lower than the value requested"); - balances[msg.sender] -= _value; - balances[_to] += _value; - emit Transfer(msg.sender, _to, _value); //solhint-disable-line indent, no-unused-vars - return true; - } - - function transferFrom(address _from, address _to, uint256 _value) public override returns (bool success) { - uint256 allowance = allowed[_from][msg.sender]; - require(balances[_from] >= _value && allowance >= _value, "token balance or allowance is lower than amount requested"); - balances[_to] += _value; - balances[_from] -= _value; - if (allowance < MAX_UINT256) { - allowed[_from][msg.sender] -= _value; - } - emit Transfer(_from, _to, _value); //solhint-disable-line indent, no-unused-vars - return true; - } - - function balanceOf(address _owner) public override view returns (uint256 balance) { - return balances[_owner]; - } - - function approve(address _spender, uint256 _value) public override returns (bool success) { - allowed[msg.sender][_spender] = _value; - emit Approval(msg.sender, _spender, _value); //solhint-disable-line indent, no-unused-vars - return true; - } - - function allowance(address _owner, address _spender) public override view returns (uint256 remaining) { - return allowed[_owner][_spender]; - } -} \ No newline at end of file diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts deleted file mode 100644 index ed273dacbb..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts +++ /dev/null @@ -1,244 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import "jest-extended"; -import bodyParser from "body-parser"; -import { - Configuration, - DefaultApi as BesuApi, - InitializeRequest, - IPluginHtlcEthBesuErc20Options, - NewContractRequest, - PluginFactoryHtlcEthBesuErc20, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import TestTokenJSON from "../../../solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "../../../solidity/token-erc20-contract/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -const logLevel: LogLevelDesc = "TRACE"; -const estimatedGas = 6721975; -const expiration = 2147483648; -const besuTestLedger = new BesuTestLedger({ logLevel }); -const testCase = "get invalid id single status"; - -describe(testCase, () => { - const receiver = besuTestLedger.getGenesisAccountPubKey(); - const hashLock = - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32"; - const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; - const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; - const connectorId = uuidv4(); - const keychainId = uuidv4(); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - - let addressInfo, - address: string, - port: number, - apiHost, - configuration, - api: BesuApi, - connector: PluginLedgerConnectorBesu; - - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - beforeAll(async () => { - await besuTestLedger.start(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - configuration = new Configuration({ basePath: apiHost }); - api = new BesuApi(configuration); - }); - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => await Servers.shutdown(server)); - - afterAll(async () => await connector.shutdown()); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - expect(success).toBe(true); - - const responseBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseBalance.callOutput).toEqual("100"); - - const responseAllowance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - expect(responseAllowance.callOutput).toEqual("10"); - - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const resNewContract = await api.newContractV1(request); - expect(resNewContract.status).toEqual(200); - - const fakeId = "0x66616b654964"; - const res = await api.getSingleStatusV1({ - id: fakeId, - web3SigningCredential, - connectorId, - keychainId, - }); - expect(res.status).toEqual(200); - expect(res.data).toEqual(0); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts deleted file mode 100644 index ae58a1a723..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts +++ /dev/null @@ -1,266 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import "jest-extended"; -import bodyParser from "body-parser"; -import { - Configuration, - DefaultApi as BesuApi, - InitializeRequest, - IPluginHtlcEthBesuErc20Options, - NewContractRequest, - PluginFactoryHtlcEthBesuErc20, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import TestTokenJSON from "../../../solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "../../../solidity/token-erc20-contract/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -const logLevel: LogLevelDesc = "INFO"; -const estimatedGas = 6721975; -const expiration = 2147483648; -const besuTestLedger = new BesuTestLedger({ logLevel }); -const receiver = besuTestLedger.getGenesisAccountPubKey(); -const hashLock = - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32"; -const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; -const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; -const connectorId = uuidv4(); -const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, -} as Web3SigningCredential; - -const testCase = "Test get single status"; -describe(testCase, () => { - let server: http.Server; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - const keychainId = uuidv4(); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - - beforeAll(async () => { - server = http.createServer(expressApp); - await besuTestLedger.start(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => await Servers.shutdown(server)); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: estimatedGas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - expect(success).toBe(true); - - const responseBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseBalance.callOutput).toEqual("100"); - - const responseAllowance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - expect(responseAllowance.callOutput).toEqual("10"); - - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const resNewContract = await api.newContractV1(request); - expect(resNewContract.status).toEqual(200); - - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - expiration, - tokenAddress, - ], - }); - - const res = await api.getSingleStatusV1({ - id: callOutput as string, - web3SigningCredential, - connectorId, - keychainId, - }); - expect(res.status).toEqual(200); - expect(res.data).toEqual(1); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts deleted file mode 100644 index f710734fee..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts +++ /dev/null @@ -1,470 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { - Configuration, - DefaultApi as BesuApi, - InitializeRequest, - IPluginHtlcEthBesuErc20Options, - NewContractRequest, - PluginFactoryHtlcEthBesuErc20, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import TestTokenJSON from "../../../solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "../../../solidity/token-erc20-contract/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; - -const logLevel: LogLevelDesc = "INFO"; -const estimatedGas = 6721975; -const expiration = 2147483648; -const besuTestLedger = new BesuTestLedger({ logLevel }); -const receiver = besuTestLedger.getGenesisAccountPubKey(); -const hashLock = - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32"; -const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; -const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; -const connectorId = uuidv4(); -const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, -} as Web3SigningCredential; - -const testCase = "Test get status"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - t.comment("Starting Besu Test Ledger"); - const besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - test.onFinish(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - t.comment("Deploys HashTimeLock via .json file on initialize function"); - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - - t.ok(deployOut, "pluginHtlc.initialize() output is truthy OK"); - t.ok( - deployOut.transactionReceipt, - "pluginHtlc.initialize() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOut.transactionReceipt.contractAddress, - "pluginHtlc.initialize() output.transactionReceipt.contractAddress is truthy OK", - ); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - t.comment("Deploys TestToken via .json file on deployContract function"); - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - t.ok(deployOutToken, "deployContract() output is truthy OK"); - t.ok( - deployOutToken.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOutToken.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - t.comment("Deploys DemoHelpers via .json file on deployContract function"); - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: estimatedGas, - }); - t.ok(deployOutDemo, "deployContract() output is truthy OK"); - t.ok( - deployOutDemo.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOutDemo.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - - t.comment("Approve 10 Tokens to HashTimeLockAddress"); - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - t.equal(success, true, "approve() transactionReceipt.status is true OK"); - - t.comment("Get balance of account"); - const { callOutput } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - t.equal(callOutput, "100", "balance of account is 100 OK"); - - t.comment("Get HashTimeLock contract and account allowance"); - const responseAllowance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - t.equal(responseAllowance.callOutput, "10", "callOutput() is 10 OK"); - - t.comment("Create new contract for HTLC"); - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const responseNewContract = await api.newContractV1(request); - t.equal(responseNewContract.status, 200, "response status is 200 OK"); - - t.comment("Get status of HTLC"); - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - expiration, - tokenAddress, - ], - }); - const ids = [responseTxId.callOutput as string]; - const res = await api.getStatusV1({ - ids, - web3SigningCredential, - connectorId, - keychainId, - }); - t.equal(res.status, 200, "response status is 200 OK"); - t.equal(res.data[0], "1", "the contract status is 1 - Active"); - t.end(); -}); - -test("Test get invalid id status", async (t: Test) => { - t.comment("Starting Besu Test Ledger"); - const besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - test.onFinish(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - t.comment("Deploys HashTimeLock via .json file on initialize function"); - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - t.ok(deployOut, "pluginHtlc.initialize() output is truthy OK"); - t.ok( - deployOut.transactionReceipt, - "pluginHtlc.initialize() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOut.transactionReceipt.contractAddress, - "pluginHtlc.initialize() output.transactionReceipt.contractAddress is truthy OK", - ); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - t.comment("Deploys TestToken via .json file on deployContract function"); - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - t.ok(deployOutToken, "deployContract() output is truthy OK"); - t.ok( - deployOutToken.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOutToken.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - t.comment("Approve 10 Tokens to HashTimeLockAddress"); - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - keychainId, - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - t.equal(success, true, "approve() transactionReceipt.status is true OK"); - - t.comment("Get balance of account"); - const { callOutput } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - t.equal(callOutput, "100", "balance of account is 100 OK"); - - t.comment("Get HashTimeLock contract and account allowance"); - const responseAllowance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - t.equal(responseAllowance.callOutput, "10", "callOutput() is 10 OK"); - - t.comment("Create new contract for HTLC"); - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const responseNewContract = await api.newContractV1(request); - t.equal(responseNewContract.status, 200, "response status is 200 OK"); - - t.comment("Get invalid status of HTLC"); - const fakeId = "0x66616b654964"; - const res = await api.getStatusV1({ - ids: [fakeId], - web3SigningCredential, - connectorId, - keychainId, - }); - t.equal(res.status, 200, "response status is 200 OK"); - t.equal(res.data[0], "0", "the contract status is 0 - INVALID"); - t.end(); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/initialize-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/initialize-endpoint.test.ts deleted file mode 100644 index d4c7086b0c..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/initialize-endpoint.test.ts +++ /dev/null @@ -1,210 +0,0 @@ -import http from "http"; -import "jest-extended"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { - DefaultApi as BesuApi, - IPluginHtlcEthBesuErc20Options, - PluginFactoryHtlcEthBesuErc20, - InitializeRequest, - Web3SigningCredential, - Configuration, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; - -const logLevel: LogLevelDesc = "INFO"; -const estimatedGas = 6721975; -const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; -const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; -const connectorId = uuidv4(); -const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, -} as Web3SigningCredential; - -const testCase = "Test initialize function with valid params"; - -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger(); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - let addressInfo, address: string, port: number, api: BesuApi; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => await Servers.shutdown(server)); - - beforeAll(async () => { - await besuTestLedger.start(); - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - api = new BesuApi(configuration); - }); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [HashTimeLockJSON.contractName, JSON.stringify(HashTimeLockJSON)], - ]), - logLevel, - }); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const request: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - - const res = await api.initializeV1(request); - expect(res.status).toEqual(200); - - expect(res.data).toBeTruthy(); - expect(res.data.transactionReceipt).toBeTruthy(); - expect(res.data.transactionReceipt?.contractAddress).toBeTruthy(); - }); - - test("Test initialize function with invalid params", async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [HashTimeLockJSON.contractName, JSON.stringify(HashTimeLockJSON)], - ]), - logLevel, - }); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const fakeId = "0x66616b654964"; - const request: InitializeRequest = { - connectorId: fakeId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - try { - const res = await api.initializeV1(request); - expect(res.status).toEqual(400); - } catch (error: any) { - expect(error.response.status).toEqual(400); - } - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts deleted file mode 100644 index 3b5b36f9fc..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts +++ /dev/null @@ -1,337 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import { - DefaultApi as BesuApi, - IPluginHtlcEthBesuErc20Options, - PluginFactoryHtlcEthBesuErc20, - NewContractRequest, - InitializeRequest, - Web3SigningCredential, - Configuration, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; -import TestTokenJSON from "../../../solidity/token-erc20-contract/Test_Token.json"; -const testCase = "Test new valid contract"; - -describe(testCase, () => { - const logLevel: LogLevelDesc = "INFO"; - const estimatedGas = 6721975; - const expiration = 2147483648; - const besuTestLedger = new BesuTestLedger({ logLevel }); - const receiver = besuTestLedger.getGenesisAccountPubKey(); - const hashLock = - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32"; - const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; - const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; - const connectorId = uuidv4(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - const expressApp = express(); - const keychainId = uuidv4(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - let addressInfo, - rpcApiHttpHost: string, - connector: PluginLedgerConnectorBesu, - rpcApiWsHost: string, - keychainPlugin: PluginKeychainMemory, - address: string, - port: number, - factory: PluginFactoryLedgerConnector, - apiHost, - configuration, - api: BesuApi; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => { - await Servers.shutdown(server); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - expect(rpcApiHttpHost).toBeString(); - - rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - expect(rpcApiWsHost).toBeString(); - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - connector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - configuration = new Configuration({ basePath: apiHost }); - api = new BesuApi(configuration); - }); - - test(testCase, async () => { - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const pluginRegistry = new PluginRegistry({}); - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - expect(success).toBe(true); - - const responseBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseBalance.callOutput).toEqual("100"); - - const { callOutput } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - expect(callOutput).toEqual("10"); - - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const res = await api.newContractV1(request); - expect(res.status).toEqual(200); - }); - - test("Test new invalid contract with 0 inputAmount token for HTLC", async () => { - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const pluginRegistry = new PluginRegistry({}); - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - expect(success).toBe(true); - - const responseBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseBalance.callOutput).toEqual("100"); - - const { callOutput } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - expect(callOutput).toEqual("10"); - - try { - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 0, - outputAmount: 0, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const res = await api.newContractV1(request); - expect(res.status).toEqual(400); - } catch (error: any) { - expect(error.response.status).toEqual(400); - } - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts deleted file mode 100644 index 7bef6a2706..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts +++ /dev/null @@ -1,804 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { encodeParameter } from "web3-eth-abi"; -import { keccak256 } from "web3-utils"; -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuErc20Options, - PluginFactoryHtlcEthBesuErc20, - NewContractRequest, - InitializeRequest, - RefundRequest, - WithdrawRequest, - GetStatusRequest, - GetSingleStatusRequest, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import TestTokenJSON from "../../../../solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "../../../../solidity/token-erc20-contract/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../../cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; - -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; -import { PluginHtlcEthBesuErc20 } from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; -const expiration = 2147483648; -const secret = - "0x3853485acd2bfc3c632026ee365279743af107a30492e3ceaa7aefc30c2a048a"; -const estimatedGas = 6721975; -const receiver = "0x627306090abaB3A6e1400e9345bC60c78a8BEf57"; -const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; -const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; -const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, -} as Web3SigningCredential; - -const testCase = "Test cactus-plugin-htlc-eth-besu-erc20 openapi validation"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const secretEthAbiEncoded = encodeParameter("uint256", secret); - const hashLock = keccak256(secretEthAbiEncoded); - - const timeout = (ms: number) => { - return new Promise((resolve) => setTimeout(resolve, ms)); - }; - - t.comment("Starting Besu Test Ledger"); - const besuTestLedger = new BesuTestLedger({ logLevel }); - - test.onFailure(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - test.onFinish(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - const OAS = (pluginHtlc as PluginHtlcEthBesuErc20).getOpenApiSpec(); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const fInitialize = "initializeV1"; - const fNew = "newContractV1"; - const fRefund = "refundV1"; - const fWithdraw = "withdrawV1"; - const fStatus = "getStatusV1"; - const fSingleStatus = "getSingleStatusV1"; - - const cOk = "without bad request error"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - - let hashTimeLockAddress: string; - let timestamp: number; - let tokenAddress: string; - let txId: string; - - test(`${testCase} - ${fInitialize} - ${cOk}`, async (t2: Test) => { - const parameters = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - - const res = await api.initializeV1(parameters); - t2.ok(res, "initialize called successfully"); - t2.equal( - res.status, - 200, - `Endpoint ${fInitialize}: response.status === 200 OK`, - ); - - hashTimeLockAddress = res.data.transactionReceipt.contractAddress as string; - - t2.end(); - }); - - test(`${testCase} - ${fInitialize} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - - try { - await api.initializeV1(parameters as any as InitializeRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fInitialize} without required connectorId: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("connectorId"), - "Rejected because connectorId is required", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fInitialize} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - fake: 4, - }; - - try { - await api.initializeV1(parameters as any as InitializeRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fInitialize} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fNew} - ${cOk}`, async (t2: Test) => { - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - t2.ok(deployOutToken, "deployOutToken is truthy OK"); - t2.ok( - deployOutToken.transactionReceipt, - "deployOutToken.transactionReceipt is truthy OK", - ); - t2.ok( - deployOutToken.transactionReceipt.contractAddress, - "deployOutToken.transactionReceipt.contractAddress is truthy OK", - ); - tokenAddress = deployOutToken.transactionReceipt.contractAddress as string; - - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: estimatedGas, - }); - t2.ok(deployOutDemo, "deployOutToken is truthy OK"); - - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - t2.equal(success, true, "approve() transactionReceipt.status is true OK"); - - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTimestamp", - params: [], - }); - t2.ok(callOutput, "callOutput() output.callOutput is truthy OK"); - timestamp = callOutput as number; - timestamp = +timestamp + +10; - - t2.comment("Call to newContract endpoint"); - const parameters = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration: timestamp, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const res = await api.newContractV1(parameters); - t2.ok(res, "newContract called successfully"); - t2.equal(res.status, 200, `Endpoint ${fNew}: response.status === 200 OK`); - - t2.end(); - }); - - test(`${testCase} - ${fNew} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration: timestamp, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - try { - await api.newContractV1(parameters as any as NewContractRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fNew} without required contractAddress: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("contractAddress"), - "Rejected because contractAddress is required", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fNew} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration: timestamp, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - fake: 4, - }; - try { - await api.newContractV1(parameters as any as NewContractRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fNew} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fRefund} - ${cOk}`, async (t2: Test) => { - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - timestamp, - tokenAddress, - ], - }); - t2.ok(responseTxId.callOutput, "result is truthy OK"); - txId = responseTxId.callOutput as string; - - await timeout(6000); - - const parameters = { - id: txId, - web3SigningCredential, - connectorId, - keychainId, - }; - const res = await api.refundV1(parameters); - t2.equal( - res.status, - 200, - `Endpoint ${fRefund}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fRefund} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // id, - web3SigningCredential, - connectorId, - keychainId, - }; - try { - await api.refundV1(parameters as any as RefundRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fRefund} without required id: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok(fields.includes("id"), "Rejected because id is required"); - } - - t2.end(); - }); - - test(`${testCase} - ${fRefund} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - id: "", - web3SigningCredential, - connectorId, - keychainId, - fake: 4, - }; - try { - await api.refundV1(parameters as any as RefundRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fRefund} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fWithdraw} - ${cOk}`, async (t2: Test) => { - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - t2.ok( - deployOutToken.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: estimatedGas, - }); - - await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - - await api.newContractV1({ - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }); - - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - expiration, - tokenAddress, - ], - }); - t2.ok(responseTxId.callOutput, "result is truthy OK"); - const id = responseTxId.callOutput as string; - - const withdrawRequest: WithdrawRequest = { - id, - secret, - web3SigningCredential, - connectorId, - keychainId, - }; - const resWithdraw = await api.withdrawV1(withdrawRequest); - t2.equal( - resWithdraw.status, - 200, - `Endpoint ${fWithdraw}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fWithdraw} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // id, - secret, - web3SigningCredential, - connectorId, - keychainId, - }; - - try { - await api.withdrawV1(parameters as any as WithdrawRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fWithdraw} without required id: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok(fields.includes("id"), "Rejected because id is required"); - } - - t2.end(); - }); - - test(`${testCase} - ${fWithdraw} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - id: "", - secret, - web3SigningCredential, - connectorId, - keychainId, - fake: 4, - }; - - try { - await api.withdrawV1(parameters as any as WithdrawRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fWithdraw} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fStatus} - ${cOk}`, async (t2: Test) => { - const ids = [txId as string]; - - const parameters = { - ids, - web3SigningCredential, - connectorId, - keychainId, - }; - const res = await api.getStatusV1(parameters); - t2.equal( - res.status, - 200, - `Endpoint ${fStatus}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fStatus} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // ids, - web3SigningCredential, - connectorId, - keychainId, - }; - - try { - await api.getStatusV1(parameters as any as GetStatusRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fStatus} without required id: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok(fields.includes("ids"), "Rejected because ids is required"); - } - - t2.end(); - }); - - test(`${testCase} - ${fStatus} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - ids: [""], - web3SigningCredential, - connectorId, - keychainId, - fake: 4, - }; - - try { - await api.getStatusV1(parameters as any as GetStatusRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fStatus} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fSingleStatus} - ${cOk}`, async (t2: Test) => { - const parameters = { - id: txId, - web3SigningCredential, - connectorId, - keychainId, - }; - const res = await api.getSingleStatusV1(parameters); - t2.equal( - res.status, - 200, - `Endpoint ${fSingleStatus}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fSingleStatus} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // id: callOutput, - web3SigningCredential, - connectorId, - keychainId, - }; - - try { - await api.getSingleStatusV1(parameters as any as GetSingleStatusRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fSingleStatus} without required id: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok(fields.includes("id"), "Rejected because id is required"); - } - - t2.end(); - }); - - test(`${testCase} - ${fSingleStatus} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - id: "", - web3SigningCredential, - connectorId, - keychainId, - fake: 4, - }; - - try { - // eslint-disable-next-line prettier/prettier - await api.getSingleStatusV1(parameters as any as GetSingleStatusRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fSingleStatus} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: any) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - t.end(); -}); - -test("AFTER " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts deleted file mode 100644 index 4e81c9a226..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts +++ /dev/null @@ -1,297 +0,0 @@ -import http from "http"; -import { AddressInfo } from "net"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { - DefaultApi as BesuApi, - IPluginHtlcEthBesuErc20Options, - NewContractRequest, - PluginFactoryHtlcEthBesuErc20, - RefundRequest, - InitializeRequest, - Configuration, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - BESU_TEST_LEDGER_DEFAULT_OPTIONS, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import TestTokenJSON from "../../../solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "../../../solidity/token-erc20-contract/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; -const testCase = "Test refund endpoint"; -describe(testCase, () => { - const logLevel: LogLevelDesc = "TRACE"; - const estimatedGas = 6721975; - const receiver = "0x627306090abaB3A6e1400e9345bC60c78a8BEf57"; - const hashLock = - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32"; - const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; - const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; - const connectorId = uuidv4(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - const keychainId = uuidv4(); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const besuTestLedger = new BesuTestLedger({ - logLevel, - envVars: [...BESU_TEST_LEDGER_DEFAULT_OPTIONS.envVars, "BESU_LOGGING=ALL"], - }); - const server = http.createServer(expressApp); - let addressInfo, - address: string, - port: number, - apiHost, - configuration, - api: BesuApi; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => await Servers.shutdown(server)); - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - beforeAll(async () => { - await besuTestLedger.start(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - configuration = new Configuration({ basePath: apiHost }); - api = new BesuApi(configuration); - }); - - test("Test invalid refund with invalid time", async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: estimatedGas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - expect(success).toBeTruthy(); - - const responseBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseBalance.callOutput).toEqual("100"); - - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTimestamp", - params: [], - }); - expect(callOutput).toBeTruthy(); - let timestamp = 0; - timestamp = callOutput as number; - timestamp = +timestamp + +10; - - const responseAllowance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - expect(responseAllowance.callOutput).toEqual("10"); - - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration: timestamp, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const res = await api.newContractV1(request); - expect(res.status).toEqual(200); - - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - timestamp, - tokenAddress, - ], - }); - expect(responseTxId.callOutput).toBeTruthy(); - const id = responseTxId.callOutput as string; - - try { - const refundRequest: RefundRequest = { - id, - web3SigningCredential, - connectorId, - keychainId, - }; - const resRefund = await api.refundV1(refundRequest); - expect(resRefund.status).toEqual(400); - } catch (error: any) { - expect(error.response.status).toEqual(400); - } - - const responseFinalBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(responseFinalBalance.callOutput).toEqual("90"); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts deleted file mode 100644 index 1d4b6f605d..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts +++ /dev/null @@ -1,602 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { - DefaultApi as BesuApi, - IPluginHtlcEthBesuErc20Options, - NewContractRequest, - PluginFactoryHtlcEthBesuErc20, - RefundRequest, - InitializeRequest, - Configuration, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - BESU_TEST_LEDGER_DEFAULT_OPTIONS, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import TestTokenJSON from "../../../solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "../../../solidity/token-erc20-contract/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; - -const logLevel: LogLevelDesc = "INFO"; -const estimatedGas = 6721975; -const besuTestLedger = new BesuTestLedger({ logLevel }); -const receiver = besuTestLedger.getGenesisAccountPubKey(); -const hashLock = - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32"; -const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; -const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; -const connectorId = uuidv4(); -const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, -} as Web3SigningCredential; - -const timeout = (ms: number) => { - return new Promise((resolve) => setTimeout(resolve, ms)); -}; - -const testCase = "Test refund endpoint"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - t.comment("Starting Besu Test Ledger"); - const besuTestLedger = new BesuTestLedger({ - logLevel, - envVars: [...BESU_TEST_LEDGER_DEFAULT_OPTIONS.envVars, "BESU_LOGGING=ALL"], - }); - await besuTestLedger.start(); - - test.onFinish(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - t.comment("Deploys HashTimeLock via .json file on initialize function"); - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - - t.ok(deployOut, "pluginHtlc.initialize() output is truthy OK"); - t.ok( - deployOut.transactionReceipt, - "pluginHtlc.initialize() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOut.transactionReceipt.contractAddress, - "pluginHtlc.initialize() output.transactionReceipt.contractAddress is truthy OK", - ); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - t.comment("Deploys TestToken via .json file on deployContract function"); - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - t.ok(deployOutToken, "deployContract() output is truthy OK"); - t.ok( - deployOutToken.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOutToken.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - t.comment("Deploys DemoHelpers via .json file on deployContract function"); - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: estimatedGas, - }); - t.ok(deployOutDemo, "deployContract() output is truthy OK"); - t.ok( - deployOutDemo.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOutDemo.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - - t.comment("Approve 10 Tokens to HashTimeLockAddress"); - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - t.equal(success, true, "approve() transactionReceipt.status is true OK"); - - t.comment("Get account balance"); - const responseBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - t.equal(responseBalance.callOutput, "100", "balance of account is 100 OK"); - - t.comment("Get current timestamp"); - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTimestamp", - params: [], - }); - t.ok(callOutput, "callOutput() output.callOutput is truthy OK"); - let timestamp = 0; - timestamp = callOutput as number; - timestamp = +timestamp + +10; - - t.comment("Get HashTimeLock contract and account allowance"); - const responseAllowance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - t.equal(responseAllowance.callOutput, "10", "callOutput() is 10 OK"); - - t.comment("Create new contract for HTLC"); - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration: timestamp, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const res = await api.newContractV1(request); - t.equal(res.status, 200, "response status is 200 OK"); - - t.comment("Get account balance"); - const responseBalance2 = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - t.equal(responseBalance2.callOutput, "90", "balance of account is 90 OK"); - - t.comment("Get HTLC Id from DemoHelper"); - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - timestamp, - tokenAddress, - ], - }); - t.ok(responseTxId.callOutput, "result is truthy OK"); - const id = responseTxId.callOutput as string; - - t.comment("Refund HTLC"); - await timeout(6000); - const refundRequest: RefundRequest = { - id, - web3SigningCredential, - connectorId, - keychainId, - }; - const resRefund = await api.refundV1(refundRequest); - t.equal(resRefund.status, 200, "response status is 200 OK"); - - t.comment("Get account balance"); - const responseFinalBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - t.equal( - responseFinalBalance.callOutput, - "100", - "balance of account is 100 OK", - ); - t.comment("Get status of HTLC"); - const resStatus = await api.getSingleStatusV1({ - id, - web3SigningCredential, - connectorId, - keychainId, - }); - t.equal(resStatus.status, 200, "response status is 200 OK"); - t.equal(resStatus.data, 2, "the contract status is 2 - Refunded"); - t.end(); -}); - -test("Test invalid refund with invalid time", async (t: Test) => { - t.comment("Starting Besu Test Ledger"); - const besuTestLedger = new BesuTestLedger({ - logLevel, - envVars: [...BESU_TEST_LEDGER_DEFAULT_OPTIONS.envVars, "BESU_LOGGING=ALL"], - }); - await besuTestLedger.start(); - - test.onFinish(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - t.comment("Deploys HashTimeLock via .json file on initialize function"); - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - - t.ok(deployOut, "pluginHtlc.initialize() output is truthy OK"); - t.ok( - deployOut.transactionReceipt, - "pluginHtlc.initialize() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOut.transactionReceipt.contractAddress, - "pluginHtlc.initialize() output.transactionReceipt.contractAddress is truthy OK", - ); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - t.comment("Deploys TestToken via .json file on deployContract function"); - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - t.ok(deployOutToken, "deployContract() output is truthy OK"); - t.ok( - deployOutToken.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOutToken.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - t.comment("Deploys DemoHelpers via .json file on deployContract function"); - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: estimatedGas, - }); - t.ok(deployOutDemo, "deployContract() output is truthy OK"); - t.ok( - deployOutDemo.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOutDemo.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - - t.comment("Approve 10 Tokens to HashTimeLockAddress"); - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - t.equal(success, true, "approve() transactionReceipt.status is true OK"); - - t.comment("Get account balance"); - const responseBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - t.equal(responseBalance.callOutput, "100", "balance of account is 100 OK"); - - t.comment("Get current timestamp"); - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTimestamp", - params: [], - }); - t.ok(callOutput, "callOutput() output.callOutput is truthy OK"); - let timestamp = 0; - timestamp = callOutput as number; - timestamp = +timestamp + +10; - - t.comment("Get HashTimeLock contract and account allowance"); - const responseAllowance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - t.equal(responseAllowance.callOutput, "10", "callOutput() is 10 OK"); - - t.comment("Create new contract for HTLC"); - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration: timestamp, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const res = await api.newContractV1(request); - t.equal(res.status, 200, "response status is 200 OK"); - - t.comment("Get HTLC Id from DemoHelper"); - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - timestamp, - tokenAddress, - ], - }); - t.ok(responseTxId.callOutput, "result is truthy OK"); - const id = responseTxId.callOutput as string; - - t.comment("Refund HTLC when it is not possible yet"); - try { - const refundRequest: RefundRequest = { - id, - web3SigningCredential, - connectorId, - keychainId, - }; - const resRefund = await api.refundV1(refundRequest); - t.equal(resRefund.status, 400, "response status is 400"); - } catch (error) { - t.equal(error.response.status, 400, "response status is 400"); - } - - t.comment("Get balance of account"); - const responseFinalBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - t.equal(responseFinalBalance.callOutput, "90", "balance of account is 90 OK"); - t.end(); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/withdraw-endpoint-invalid-id.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/withdraw-endpoint-invalid-id.test.ts deleted file mode 100644 index ce0f1f4132..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/withdraw-endpoint-invalid-id.test.ts +++ /dev/null @@ -1,265 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { - DefaultApi as BesuApi, - IPluginHtlcEthBesuErc20Options, - NewContractRequest, - PluginFactoryHtlcEthBesuErc20, - WithdrawRequest, - InitializeRequest, - Configuration, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - BESU_TEST_LEDGER_DEFAULT_OPTIONS, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import TestTokenJSON from "../../../solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "../../../solidity/token-erc20-contract/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -const testCase = "Test invalid withdraw with invalid id"; - -describe(testCase, () => { - const logLevel: LogLevelDesc = "INFO"; - const estimatedGas = 6721975; - const expiration = 2147483648; - const secret = - "0x3853485acd2bfc3c632026ee365279743af107a30492e3ceaa7aefc30c2a048a"; - const besuTestLedger = new BesuTestLedger({ - logLevel, - envVars: [...BESU_TEST_LEDGER_DEFAULT_OPTIONS.envVars, "BESU_LOGGING=ALL"], - }); - const receiver = besuTestLedger.getGenesisAccountPubKey(); - const hashLock = - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32"; - const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; - const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; - const connectorId = uuidv4(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - let addressInfo, - address: string, - port: number, - apiHost, - configuration, - api: BesuApi; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => { - await Servers.shutdown(server); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - configuration = new Configuration({ basePath: apiHost }); - api = new BesuApi(configuration); - }); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - expect(success).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(callOutput).toEqual("100"); - - const responseAllowance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - expect(responseAllowance.callOutput).toEqual("10"); - - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const res = await api.newContractV1(request); - expect(res.status).toEqual(200); - - try { - const fakeId = "0x66616b654964"; - const withdrawRequest: WithdrawRequest = { - id: fakeId, - secret, - web3SigningCredential, - connectorId, - keychainId, - }; - const resWithdraw = await api.withdrawV1(withdrawRequest); - expect(resWithdraw.status).toEqual(400); - } catch (error: any) { - expect(error.response.status).toEqual(400); - } - - const responseFinalBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [receiver], - }); - expect(responseFinalBalance.callOutput).toEqual("0"); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/withdraw-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/withdraw-endpoint.test.ts deleted file mode 100644 index 8d1faf6fe7..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/withdraw-endpoint.test.ts +++ /dev/null @@ -1,295 +0,0 @@ -import http, { Server } from "http"; -import "jest-extended"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import type { Express } from "express"; -import bodyParser from "body-parser"; -import { encodeParameter } from "web3-eth-abi"; -import { keccak256 } from "web3-utils"; -import { - DefaultApi as BesuApi, - IPluginHtlcEthBesuErc20Options, - NewContractRequest, - PluginFactoryHtlcEthBesuErc20, - WithdrawRequest, - InitializeRequest, - Configuration, -} from "@hyperledger/cactus-plugin-htlc-eth-besu-erc20"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { LogLevelDesc, Servers } from "@hyperledger/cactus-common"; -import { IListenOptions } from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - BESU_TEST_LEDGER_DEFAULT_OPTIONS, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import TestTokenJSON from "../../../solidity/token-erc20-contract/Test_Token.json"; -import DemoHelperJSON from "../../../solidity/token-erc20-contract/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu-erc20/src/main/solidity/contracts/HashedTimeLockContract.json"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -const logLevel: LogLevelDesc = "INFO"; -const estimatedGas = 6721975; -const expiration = 2147483648; -const besuTestLedger = new BesuTestLedger({ - logLevel, - envVars: [...BESU_TEST_LEDGER_DEFAULT_OPTIONS.envVars, "BESU_LOGGING=ALL"], -}); -const secret = - "0x3853485acd2bfc3c632026ee365279743af107a30492e3ceaa7aefc30c2a048a"; -const receiver = besuTestLedger.getGenesisAccountPubKey(); -const firstHighNetWorthAccount = "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1"; -const privateKey = - "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; -const connectorId = uuidv4(); -const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, -} as Web3SigningCredential; - -const testCase = "Test withdraw endpoint"; -describe(testCase, () => { - let addressInfo, - address: string, - port: number, - apiHost: string, - server: Server, - expressApp: Express, - api: BesuApi; - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => await Servers.shutdown(server)); - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - beforeAll(async () => { - expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - const configuration = new Configuration({ basePath: apiHost }); - api = new BesuApi(configuration); - }); - - test(testCase, async () => { - await besuTestLedger.start(); - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [TestTokenJSON.contractName, JSON.stringify(TestTokenJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - DemoHelperJSON.contractName, - JSON.stringify(DemoHelperJSON), - ); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuErc20Options = { - instanceId: uuidv4(), - logLevel, - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesuErc20({ - pluginImportType: PluginImportType.Local, - }); - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: estimatedGas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - const deployOutToken = await connector.deployContract({ - contractName: TestTokenJSON.contractName, - contractAbi: TestTokenJSON.abi, - bytecode: TestTokenJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: ["100", "token", "2", "TKN"], - gas: estimatedGas, - }); - expect(deployOutToken).toBeTruthy(); - expect(deployOutToken.transactionReceipt).toBeTruthy(); - expect(deployOutToken.transactionReceipt.contractAddress).toBeTruthy(); - const tokenAddress = deployOutToken.transactionReceipt - .contractAddress as string; - - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: estimatedGas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - const { success } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Send, - methodName: "approve", - params: [hashTimeLockAddress, "10"], - gas: estimatedGas, - }); - expect(success).toBeTruthy(); - - const { callOutput } = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [firstHighNetWorthAccount], - }); - expect(callOutput).toEqual("100"); - - const responseAllowance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "allowance", - params: [firstHighNetWorthAccount, hashTimeLockAddress], - }); - expect(responseAllowance.callOutput).toEqual("10"); - - const secretEthAbiEncoded = encodeParameter("uint256", secret); - const hashLock = keccak256(secretEthAbiEncoded); - - const request: NewContractRequest = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 1, - expiration, - hashLock, - tokenAddress, - receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId, - keychainId, - web3SigningCredential, - gas: estimatedGas, - }; - const res = await api.newContractV1(request); - expect(res.status).toEqual(200); - - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - receiver, - 10, - hashLock, - expiration, - tokenAddress, - ], - }); - expect(responseTxId.callOutput).toBeTruthy(); - const id = responseTxId.callOutput as string; - - const withdrawRequest: WithdrawRequest = { - id, - secret, - web3SigningCredential, - connectorId, - keychainId, - }; - const resWithdraw = await api.withdrawV1(withdrawRequest); - expect(resWithdraw.status).toEqual(200); - - const resStatus = await api.getSingleStatusV1({ - id, - web3SigningCredential, - connectorId, - keychainId, - }); - expect(resStatus.status).toEqual(200); - expect(resStatus.data).toEqual(3); - - const responseFinalBalance = await connector.invokeContract({ - contractName: TestTokenJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "balanceOf", - params: [receiver], - }); - expect(responseFinalBalance.callOutput).toEqual("10"); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/tsconfig.json b/packages/cactus-test-plugin-htlc-eth-besu-erc20/tsconfig.json deleted file mode 100644 index d4d642af6d..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/tsconfig.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-plugin-htlc-eth-besu-erc20.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-htlc-eth-besu-erc20/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} diff --git a/packages/cactus-test-plugin-htlc-eth-besu/CHANGELOG.md b/packages/cactus-test-plugin-htlc-eth-besu/CHANGELOG.md deleted file mode 100644 index ed20d07ab1..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/CHANGELOG.md +++ /dev/null @@ -1,153 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cacti/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** crash in HeaderParser in dicer ([77fb559](https://github.com/hyperledger/cacti/commit/77fb559532448aae45cfe704da2637119bf93c27)) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -### Features - -* **plugin-htlc-eth-besu:** add private HTLCs and forge build & test ([aade510](https://github.com/hyperledger/cacti/commit/aade510c5fc13199006466aecd8235130d6ec353)) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Bug Fixes - -* **security:** address CVE-2021-23358 ([ed71f42](https://github.com/hyperledger/cactus/commit/ed71f42aca1683dd2fd6f762fbc6cd19b4c3c253)), closes [#1775](https://github.com/hyperledger/cactus/issues/1775) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* openapi tests for besu, htlc-eth-besu and htlc-eth-besu-erc20 ([b9170e9](https://github.com/hyperledger/cactus/commit/b9170e929492f3305a420c75c7d12d06b288e0ab)), closes [#1291](https://github.com/hyperledger/cactus/issues/1291) [#847](https://github.com/hyperledger/cactus/issues/847) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-htlc-eth-besu - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **connector-besu:** remove magic strings ([6d9ae53](https://github.com/hyperledger/cactus/commit/6d9ae53c64bd4e6c3eb33164bfa5d5507582220b)), closes [#1104](https://github.com/hyperledger/cactus/issues/1104) - -### Features - -* **htlc-eth-besu:** implemented plugin + test ([6684557](https://github.com/hyperledger/cactus/commit/6684557d5de863fa3e023b4c8afe239ea62143eb)) diff --git a/packages/cactus-test-plugin-htlc-eth-besu/package.json b/packages/cactus-test-plugin-htlc-eth-besu/package.json deleted file mode 100644 index 9c11257c03..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-plugin-htlc-eth-besu", - "version": "2.0.0", - "description": "Integration tests for the Besu ledger and the API server.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-test-plugin-htlc-eth-besu.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-htlc-eth-besu": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "axios": "1.7.7", - "key-encoder": "2.0.3", - "web3": "1.6.1", - "web3js-quorum": "22.4.0" - }, - "devDependencies": { - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/uuid": "10.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-test-plugin-htlc-eth-besu.web.umd.min.js", - "mainMinified": "dist/cactus-test-plugin-htlc-eth-besu.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/main/typescript/index.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/main/typescript/index.web.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/main/typescript/index.web.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/main/typescript/public-api.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/main/typescript/public-api.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/main/typescript/public-api.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/solidity/contracts/DemoHelpers.json b/packages/cactus-test-plugin-htlc-eth-besu/src/test/solidity/contracts/DemoHelpers.json deleted file mode 100644 index 103b8f6fef..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/solidity/contracts/DemoHelpers.json +++ /dev/null @@ -1,1194 +0,0 @@ -{ - "contractName": "DemoHelpers", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "_key", - "type": "string" - } - ], - "name": "getHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "result", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - } - ], - "name": "getTxId", - "outputs": [ - { - "internalType": "bytes32", - "name": "result", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "inputAmount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "hashLock", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - } - ], - "name": "getTxIdNoHash", - "outputs": [ - { - "internalType": "bytes", - "name": "result", - "type": "bytes" - } - ], - "stateMutability": "pure", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_key\",\"type\":\"string\"}],\"name\":\"getHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"result\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"}],\"name\":\"getTxId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"result\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"inputAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashLock\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"}],\"name\":\"getTxIdNoHash\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"result\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/cacti-1/packages/cactus-test-plugin-htlc-eth-besu/src/test/solidity/contracts/DemoHelpers.sol\":\"DemoHelpers\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/cacti-1/packages/cactus-test-plugin-htlc-eth-besu/src/test/solidity/contracts/DemoHelpers.sol\":{\"keccak256\":\"0xa36a07446f7601f3402c6024942d9b6f0d82fc6cce6b45480458b094c45d6c30\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f589da4a9886414cf01e5753b611451d2ffe255459ed4b82b6a4acb507ee04a0\",\"dweb:/ipfs/QmWZEzCico2Z1jfgT8BiQ4XGZoF8s4YNVE2PxX1pF1N86t\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b50610331806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063188ec356146100515780635b6beeb914610066578063da9a187a14610079578063eeafc5e6146100d9575b600080fd5b425b6040519081526020015b60405180910390f35b610053610074366004610181565b61013b565b61005361008736600461024e565b604080516001600160a01b0396871660208083019190915295909616868201526060860193909352608085019190915260a0808501919091528151808503909101815260c09093019052815191012090565b61012e6100e736600461024e565b604080516001600160a01b03968716602082015294909516848601526060840192909252608083015260a0808301919091528251808303909101815260c090910190915290565b60405161005d91906102e1565b60008160405160200161014e91906102e1565b604051602081830303815290604052805190602001209050919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561019357600080fd5b813567ffffffffffffffff808211156101ab57600080fd5b818401915084601f8301126101bf57600080fd5b8135818111156101d1576101d161016b565b604051601f8201601f19908116603f011681019083821181831017156101f9576101f961016b565b8160405282815287602084870101111561021257600080fd5b826020860160208301376000928101602001929092525095945050505050565b80356001600160a01b038116811461024957600080fd5b919050565b600080600080600060a0868803121561026657600080fd5b61026f86610232565b945061027d60208701610232565b94979496505050506040830135926060810135926080909101359150565b6000815180845260005b818110156102c1576020818501810151868301820152016102a5565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006102f4602083018461029b565b939250505056fea26469706673582212201b3a2adf5a65bbdbe7ad4c5c8d348c57fa7fcbaa7e5c5ea00da7302849109e6a64736f6c63430008130033", - "deployedBytecode": "608060405234801561001057600080fd5b506004361061004c5760003560e01c8063188ec356146100515780635b6beeb914610066578063da9a187a14610079578063eeafc5e6146100d9575b600080fd5b425b6040519081526020015b60405180910390f35b610053610074366004610181565b61013b565b61005361008736600461024e565b604080516001600160a01b0396871660208083019190915295909616868201526060860193909352608085019190915260a0808501919091528151808503909101815260c09093019052815191012090565b61012e6100e736600461024e565b604080516001600160a01b03968716602082015294909516848601526060840192909252608083015260a0808301919091528251808303909101815260c090910190915290565b60405161005d91906102e1565b60008160405160200161014e91906102e1565b604051602081830303815290604052805190602001209050919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561019357600080fd5b813567ffffffffffffffff808211156101ab57600080fd5b818401915084601f8301126101bf57600080fd5b8135818111156101d1576101d161016b565b604051601f8201601f19908116603f011681019083821181831017156101f9576101f961016b565b8160405282815287602084870101111561021257600080fd5b826020860160208301376000928101602001929092525095945050505050565b80356001600160a01b038116811461024957600080fd5b919050565b600080600080600060a0868803121561026657600080fd5b61026f86610232565b945061027d60208701610232565b94979496505050506040830135926060810135926080909101359150565b6000815180845260005b818110156102c1576020818501810151868301820152016102a5565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006102f4602083018461029b565b939250505056fea26469706673582212201b3a2adf5a65bbdbe7ad4c5c8d348c57fa7fcbaa7e5c5ea00da7302849109e6a64736f6c63430008130033", - "sourceMap": "99:789:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "99:789:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;261:100;339:15;261:100;;;160:25:1;;;148:2;133:18;261:100:0;;;;;;;;131:124;;;;;;:::i;:::-;;:::i;618:267::-;;;;;;:::i;:::-;805:63;;;-1:-1:-1;;;;;3274:15:1;;;805:63:0;;;;3256:34:1;;;;3326:15;;;;3306:18;;;3299:43;3358:18;;;3351:34;;;;3401:18;;;3394:34;;;;3444:19;;;;3437:35;;;;805:63:0;;;;;;;;;;3190:19:1;;;;805:63:0;;782:96;;;;;;618:267;367:245;;;;;;:::i;:::-;542:63;;;-1:-1:-1;;;;;3274:15:1;;;542:63:0;;;3256:34:1;3326:15;;;;3306:18;;;3299:43;504:19:0;3358:18:1;;3351:34;;;;3401:18;;;3394:34;3444:19;;;;3437:35;;;;542:63:0;;;;;;;;;;3190:19:1;;;;542:63:0;;;;367:245;;;;;;;;:::i;131:124::-;189:14;242:4;231:16;;;;;;;;:::i;:::-;;;;;;;;;;;;;221:27;;;;;;214:34;;131:124;;;:::o;196:127:1:-;257:10;252:3;248:20;245:1;238:31;288:4;285:1;278:15;312:4;309:1;302:15;328:922;397:6;450:2;438:9;429:7;425:23;421:32;418:52;;;466:1;463;456:12;418:52;506:9;493:23;535:18;576:2;568:6;565:14;562:34;;;592:1;589;582:12;562:34;630:6;619:9;615:22;605:32;;675:7;668:4;664:2;660:13;656:27;646:55;;697:1;694;687:12;646:55;733:2;720:16;755:2;751;748:10;745:36;;;761:18;;:::i;:::-;836:2;830:9;804:2;890:13;;-1:-1:-1;;886:22:1;;;910:2;882:31;878:40;866:53;;;934:18;;;954:22;;;931:46;928:72;;;980:18;;:::i;:::-;1020:10;1016:2;1009:22;1055:2;1047:6;1040:18;1095:7;1090:2;1085;1081;1077:11;1073:20;1070:33;1067:53;;;1116:1;1113;1106:12;1067:53;1172:2;1167;1163;1159:11;1154:2;1146:6;1142:15;1129:46;1217:1;1195:15;;;1212:2;1191:24;1184:35;;;;-1:-1:-1;1199:6:1;328:922;-1:-1:-1;;;;;328:922:1:o;1437:173::-;1505:20;;-1:-1:-1;;;;;1554:31:1;;1544:42;;1534:70;;1600:1;1597;1590:12;1534:70;1437:173;;;:::o;1615:466::-;1710:6;1718;1726;1734;1742;1795:3;1783:9;1774:7;1770:23;1766:33;1763:53;;;1812:1;1809;1802:12;1763:53;1835:29;1854:9;1835:29;:::i;:::-;1825:39;;1883:38;1917:2;1906:9;1902:18;1883:38;:::i;:::-;1615:466;;1873:48;;-1:-1:-1;;;;1968:2:1;1953:18;;1940:32;;2019:2;2004:18;;1991:32;;2070:3;2055:19;;;2042:33;;-1:-1:-1;1615:466:1:o;2086:422::-;2127:3;2165:5;2159:12;2192:6;2187:3;2180:19;2217:1;2227:162;2241:6;2238:1;2235:13;2227:162;;;2303:4;2359:13;;;2355:22;;2349:29;2331:11;;;2327:20;;2320:59;2256:12;2227:162;;;2231:3;2434:1;2427:4;2418:6;2413:3;2409:16;2405:27;2398:38;2497:4;2490:2;2486:7;2481:2;2473:6;2469:15;2465:29;2460:3;2456:39;2452:50;2445:57;;;2086:422;;;;:::o;2513:217::-;2660:2;2649:9;2642:21;2623:4;2680:44;2720:2;2709:9;2705:18;2697:6;2680:44;:::i;:::-;2672:52;2513:217;-1:-1:-1;;;2513:217:1:o", - "sourcePath": "/home/peter/a/cacti-1/packages/cactus-test-plugin-htlc-eth-besu/src/test/solidity/contracts/DemoHelpers.sol", - "compiler": { - "name": "solc", - "version": "0.8.19+commit.7dd6d404" - }, - "ast": { - "absolutePath": "/home/peter/a/cacti-1/packages/cactus-test-plugin-htlc-eth-besu/src/test/solidity/contracts/DemoHelpers.sol", - "exportedSymbols": { - "DemoHelpers": [ - 79 - ] - }, - "id": 80, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "0.8", - ".19" - ], - "nodeType": "PragmaDirective", - "src": "40:23:0" - }, - { - "id": 2, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "64:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "DemoHelpers", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 79, - "linearizedBaseContracts": [ - 79 - ], - "name": "DemoHelpers", - "nameLocation": "108:11:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 16, - "nodeType": "Block", - "src": "205:50:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 12, - "name": "_key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "242:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "id": 10, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "231:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "235:6:0", - "memberName": "encode", - "nodeType": "MemberAccess", - "src": "231:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "231:16:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 9, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "221:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "221:27:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 8, - "id": 15, - "nodeType": "Return", - "src": "214:34:0" - } - ] - }, - "functionSelector": "5b6beeb9", - "id": 17, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getHash", - "nameLocation": "140:7:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "_key", - "nameLocation": "162:4:0", - "nodeType": "VariableDeclaration", - "scope": 17, - "src": "148:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 3, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "148:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "147:20:0" - }, - "returnParameters": { - "id": 8, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "result", - "nameLocation": "197:6:0", - "nodeType": "VariableDeclaration", - "scope": 17, - "src": "189:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 6, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "188:16:0" - }, - "scope": 79, - "src": "131:124:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 25, - "nodeType": "Block", - "src": "322:39:0", - "statements": [ - { - "expression": { - "expression": { - "id": 22, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967292, - "src": "339:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "345:9:0", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "339:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 21, - "id": 24, - "nodeType": "Return", - "src": "332:22:0" - } - ] - }, - "functionSelector": "188ec356", - "id": 26, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTimestamp", - "nameLocation": "270:12:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 18, - "nodeType": "ParameterList", - "parameters": [], - "src": "282:2:0" - }, - "returnParameters": { - "id": 21, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "result", - "nameLocation": "314:6:0", - "nodeType": "VariableDeclaration", - "scope": 26, - "src": "306:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "306:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "305:16:0" - }, - "scope": 79, - "src": "261:100:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 50, - "nodeType": "Block", - "src": "525:87:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 43, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "553:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 44, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "561:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 45, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "571:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 46, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "584:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 47, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 36, - "src": "594:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 41, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "542:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 42, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "546:6:0", - "memberName": "encode", - "nodeType": "MemberAccess", - "src": "542:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "542:63:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 40, - "id": 49, - "nodeType": "Return", - "src": "535:70:0" - } - ] - }, - "functionSelector": "eeafc5e6", - "id": 51, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTxIdNoHash", - "nameLocation": "376:13:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 37, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 28, - "mutability": "mutable", - "name": "sender", - "nameLocation": "398:6:0", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "390:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 27, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "390:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 30, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "414:8:0", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "406:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 29, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "406:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "432:11:0", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "424:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "424:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "453:8:0", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "445:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 33, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "445:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 36, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "471:10:0", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "463:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 35, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "463:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "389:93:0" - }, - "returnParameters": { - "id": 40, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 39, - "mutability": "mutable", - "name": "result", - "nameLocation": "517:6:0", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "504:19:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 38, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "504:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "src": "503:21:0" - }, - "scope": 79, - "src": "367:245:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 77, - "nodeType": "Block", - "src": "765:120:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 69, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "816:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 70, - "name": "receiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "824:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 71, - "name": "inputAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "834:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 72, - "name": "hashLock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "847:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 73, - "name": "expiration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "857:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 67, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "805:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "809:6:0", - "memberName": "encode", - "nodeType": "MemberAccess", - "src": "805:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 74, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "805:63:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 66, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "782:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "782:96:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 65, - "id": 76, - "nodeType": "Return", - "src": "775:103:0" - } - ] - }, - "functionSelector": "da9a187a", - "id": 78, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getTxId", - "nameLocation": "627:7:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 62, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 53, - "mutability": "mutable", - "name": "sender", - "nameLocation": "643:6:0", - "nodeType": "VariableDeclaration", - "scope": 78, - "src": "635:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 52, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "635:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 55, - "mutability": "mutable", - "name": "receiver", - "nameLocation": "659:8:0", - "nodeType": "VariableDeclaration", - "scope": 78, - "src": "651:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 54, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "651:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 57, - "mutability": "mutable", - "name": "inputAmount", - "nameLocation": "677:11:0", - "nodeType": "VariableDeclaration", - "scope": 78, - "src": "669:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 56, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "669:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 59, - "mutability": "mutable", - "name": "hashLock", - "nameLocation": "698:8:0", - "nodeType": "VariableDeclaration", - "scope": 78, - "src": "690:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 58, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "690:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 61, - "mutability": "mutable", - "name": "expiration", - "nameLocation": "716:10:0", - "nodeType": "VariableDeclaration", - "scope": 78, - "src": "708:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 60, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "708:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "634:93:0" - }, - "returnParameters": { - "id": 65, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 64, - "mutability": "mutable", - "name": "result", - "nameLocation": "757:6:0", - "nodeType": "VariableDeclaration", - "scope": 78, - "src": "749:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 63, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "749:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "src": "748:16:0" - }, - "scope": 79, - "src": "618:267:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 80, - "src": "99:789:0", - "usedErrors": [] - } - ], - "src": "40:849:0" - }, - "functionHashes": { - "getHash(string)": "5b6beeb9", - "getTimestamp()": "188ec356", - "getTxId(address,address,uint256,bytes32,uint256)": "da9a187a", - "getTxIdNoHash(address,address,uint256,bytes32,uint256)": "eeafc5e6" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "163400", - "executionCost": "208", - "totalCost": "163608" - }, - "external": { - "getHash(string)": "infinite", - "getTimestamp()": "147", - "getTxId(address,address,uint256,bytes32,uint256)": "infinite", - "getTxIdNoHash(address,address,uint256,bytes32,uint256)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/solidity/contracts/DemoHelpers.sol b/packages/cactus-test-plugin-htlc-eth-besu/src/test/solidity/contracts/DemoHelpers.sol deleted file mode 100644 index 69f93250b2..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/solidity/contracts/DemoHelpers.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -pragma solidity 0.8.19; -pragma experimental ABIEncoderV2; - -contract DemoHelpers { - - - function getHash(string memory _key) public pure returns (bytes32 result) { - return keccak256(abi.encode(_key)); - } - - function getTimestamp() public view returns (uint256 result) { - return block.timestamp; - } - - function getTxIdNoHash(address sender, address receiver, uint256 inputAmount, bytes32 hashLock, uint256 expiration) public pure returns (bytes memory result) { - return abi.encode(sender, receiver, inputAmount, hashLock, expiration); - } - - function getTxId(address sender, address receiver, uint256 inputAmount, bytes32 hashLock, uint256 expiration) public pure returns (bytes32 result) { - return keccak256( - abi.encode(sender, receiver, inputAmount, hashLock, expiration) - ); - } - -} diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/data-test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/data-test.ts deleted file mode 100644 index 088dcf569c..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/data-test.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const DataTest = { - estimated_gas: 6721975, - expiration: 2147483648, - hashLock: - "0x3c335ba7f06a8b01d0596589f73c19069e21c81e5013b91f408165d1bf623d32", - receiver: "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0", -}; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts deleted file mode 100644 index d22c18ed64..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts +++ /dev/null @@ -1,211 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import Web3 from "web3"; -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, - HashTimeLockJson, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; -const testCase = "Test get invalid single status"; - -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger({ logLevel }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => await Servers.shutdown(server)); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const fakeWeb3SigningCredential: Web3SigningCredential = { - ethAccount: "fakeAccount", - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJson.contractName, - JSON.stringify(HashTimeLockJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const web3 = new Web3(rpcApiHttpHost); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - //Deploy DemoHelpers - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - - const balance = await web3.eth.getBalance(firstHighNetWorthAccount); - - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - const resp = await api.newContractV1(bodyObj); - expect(resp).toBeTruthy(); - expect(resp.status).toEqual(200); - - const balance2 = await web3.eth.getBalance(firstHighNetWorthAccount); - - expect(parseInt(balance)).toEqual(parseInt(balance2) - 10); - try { - const fakeId = "0x66616b654964"; - const res = await api.getSingleStatusV1({ - id: fakeId, - web3SigningCredential: fakeWeb3SigningCredential, - connectorId, - keychainId: "", - }); - expect(res.status).toEqual(500); - } catch (e: any) { - expect(e.response.status).toEqual(500); - } - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts deleted file mode 100644 index 4374082ca5..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts +++ /dev/null @@ -1,232 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import Web3 from "web3"; -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; -const testCase = "Test get single status"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - t.comment("Starting Besu Test Ledger"); - const besuTestLedger = new BesuTestLedger({ logLevel }); - - test.onFinish(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const web3 = new Web3(rpcApiHttpHost); - - t.comment("Deploys HashTimeLock via .json file on initialize function"); - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - t.ok( - deployOut.transactionReceipt, - "pluginHtlc.initialize() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOut.transactionReceipt.contractAddress, - "pluginHtlc.initialize() output.transactionReceipt.contractAddress is truthy OK", - ); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - //Deploy DemoHelpers - t.comment("Deploys DemoHelpers via .json file on deployContract function"); - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - t.ok(deployOutDemo, "deployContract() output is truthy OK"); - t.ok( - deployOutDemo.transactionReceipt, - "deployContract() output.transactionReceipt is truthy OK", - ); - t.ok( - deployOutDemo.transactionReceipt.contractAddress, - "deployContract() output.transactionReceipt.contractAddress is truthy OK", - ); - - t.comment("Get account balance"); - const balance = await web3.eth.getBalance(firstHighNetWorthAccount); - - t.comment("Create new contract for HTLC"); - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - const resp = await api.newContractV1(bodyObj); - t.ok(resp, "response newContract is OK"); - t.equal(resp.status, 200, "response status newContract is OK"); - - t.comment("Get single status of HTLC"); - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - DataTest.hashLock, - DataTest.expiration, - ], - }); - - const balance2 = await web3.eth.getBalance(firstHighNetWorthAccount); - - t.equal( - parseInt(balance), - parseInt(balance2) - 10, - "Balance of account is OK", - ); - - const res = await api.getSingleStatusV1({ - id: callOutput as string, - web3SigningCredential, - connectorId, - keychainId, - }); - t.equal(res.status, 200); - t.equal(res.data, 1, "the contract status is 1 - Active"); - t.end(); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts deleted file mode 100644 index a6b7ccd2d6..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts +++ /dev/null @@ -1,213 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import Web3 from "web3"; -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; -const testCase = "Test get invalid status"; -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger({ logLevel }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - afterAll(async () => await Servers.shutdown(server)); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const web3 = new Web3(rpcApiHttpHost); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - //Deploy DemoHelpers - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - - const balance = await web3.eth.getBalance(firstHighNetWorthAccount); - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - const resp = await api.newContractV1(bodyObj); - expect(resp).toBeTruthy(); - expect(resp.status).toEqual(200); - - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - DataTest.hashLock, - DataTest.expiration, - ], - }); - const balance2 = await web3.eth.getBalance(firstHighNetWorthAccount); - - expect(parseInt(balance)).toEqual(parseInt(balance2) - 10); - - try { - const ids = [responseTxId.callOutput as string]; - const res = await api.getStatusV1({ - ids, - web3SigningCredential, - connectorId, - keychainId: "", - }); - expect(res.status).toEqual(500); - } catch (e: any) { - expect(e.response.status).toEqual(500); - } - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts deleted file mode 100644 index e779a07c46..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts +++ /dev/null @@ -1,219 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; - -import express from "express"; -import bodyParser from "body-parser"; -import Web3 from "web3"; -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; - -const testCase = "Test get status"; -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger({ logLevel }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - afterAll(async () => await Servers.shutdown(server)); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const web3 = new Web3(rpcApiHttpHost); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - //Deploy DemoHelpers - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - const balance = await web3.eth.getBalance(firstHighNetWorthAccount); - - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - const resp = await api.newContractV1(bodyObj); - expect(resp).toBeTruthy(); - expect(resp.status).toEqual(200); - - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - DataTest.hashLock, - DataTest.expiration, - ], - }); - const balance2 = await web3.eth.getBalance(firstHighNetWorthAccount); - - expect(parseInt(balance)).toEqual(parseInt(balance2) - 10); - - const ids = [responseTxId.callOutput as string]; - const res = await api.getStatusV1({ - ids, - web3SigningCredential, - connectorId, - keychainId, - }); - expect(res.status).toEqual(200); - expect(res.data[0]).toEqual("1"); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts deleted file mode 100644 index aa6e42836e..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts +++ /dev/null @@ -1,137 +0,0 @@ -import http from "http"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - InitializeRequest, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; - -const testCase = "Test invalid initialize"; -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger({ logLevel }); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - await Servers.listen(listenOptions); - }); - afterAll(async () => await Servers.shutdown(server)); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId: "JORDI", - keychainId, - constructorArgs: ["FAKE"], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - await expect(pluginHtlc.initialize(initRequest)).toReject(); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts deleted file mode 100644 index 6871560a46..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts +++ /dev/null @@ -1,137 +0,0 @@ -import http from "http"; -import "jest-extended"; - -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - InitializeRequest, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; -const testCase = "Test initialize"; - -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger({ logLevel }); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - beforeAll(async () => { - await Servers.listen(listenOptions); - await besuTestLedger.start(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - afterAll(async () => await Servers.shutdown(server)); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts deleted file mode 100644 index bf5ffd75a1..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts +++ /dev/null @@ -1,182 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; - -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; - -const testCase = "Test invalid new contract"; -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger({ logLevel }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - afterAll(async () => await Servers.shutdown(server)); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - //Deploy DemoHelpers - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId: "", - gas: DataTest.estimated_gas, - }; - const apiCall = api.newContractV1(bodyObj); - await expect(apiCall).rejects.toHaveProperty(["response", "status"], 500); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts deleted file mode 100644 index 0c1b1de826..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts +++ /dev/null @@ -1,182 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; - -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; -const testCase = "Test new contract"; - -const besuTestLedger = new BesuTestLedger({ logLevel }); - -describe(testCase, () => { - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - afterAll(async () => await Servers.shutdown(server)); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - test(testCase, async () => { - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - //Deploy DemoHelpers - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - const resp = await api.newContractV1(bodyObj); - expect(resp).toBeTruthy(); - expect(resp.status).toEqual(200); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts deleted file mode 100644 index 3a8524c4cd..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts +++ /dev/null @@ -1,808 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import test, { Test } from "tape-promise/tape"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, - RefundReq, - WithdrawReq, - GetStatusRequest, - GetSingleStatusRequest, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { DataTest } from "../../data-test"; -import DemoHelperJSON from "../../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; -import { PluginHtlcEthBesu } from "@hyperledger/cactus-plugin-htlc-eth-besu"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; - -const FORTY_TWO_AS_HEX_STRING = - "0x0000000000000000000000000000000000000000000000000000000000003432"; -const FORTY_TWO_KECCAK_256 = - "0xf0095bab87a78fd2afa113b903c90a72ba1fd22c44f55b66cf409390814dfb69"; - -const testCase = "Test cactus-plugin-htlc-eth-besu openapi validation"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const timeout = (ms: number) => { - return new Promise((resolve) => setTimeout(resolve, ms)); - }; - - t.comment("Starting Besu Test Ledger"); - const besuTestLedger = new BesuTestLedger({ logLevel }); - - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - test.onFailure(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - test.onFinish(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - test.onFinish(async () => await Servers.shutdown(server)); - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - const OAS = (pluginHtlc as PluginHtlcEthBesu).getOpenApiSpec(); - - await installOpenapiValidationMiddleware({ - logLevel, - app: expressApp, - apiSpec: OAS, - }); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const fInitialize = "initialize"; - const fNew = "newContract"; - const fRefund = "refund"; - const fWithdraw = "withdraw"; - const fStatus = "getStatus"; - const fSingleStatus = "getSingleStatus"; - - const cOk = "without bad request error"; - const cWithoutParams = "not sending all required parameters"; - const cInvalidParams = "sending invalid parameters"; - - let hashTimeLockAddress: string; - let timestamp = 0; - - test(`${testCase} - ${fInitialize} - ${cOk}`, async (t2: Test) => { - const parameters = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - - const res = await api.initializeV1(parameters); - t2.ok(res, "initialize called successfully"); - t2.equal( - res.status, - 200, - `Endpoint ${fInitialize}: response.status === 200 OK`, - ); - - hashTimeLockAddress = res.data.transactionReceipt.contractAddress as string; - - t2.end(); - }); - - test(`${testCase} - ${fInitialize} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - - try { - await api.initializeV1(parameters as unknown as InitializeRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fInitialize} without required connectorId: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("connectorId"), - "Rejected because connectorId is required", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fInitialize} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - fake: 4, - }; - - try { - await api.initializeV1(parameters as unknown as InitializeRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fInitialize} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fNew} - ${cOk}`, async (t2: Test) => { - await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTimestamp", - params: [], - }); - t2.ok(callOutput, "callOutput() output.callOutput is truthy OK"); - timestamp = callOutput as number; - timestamp = +timestamp + +10; - - const parameters = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: timestamp, - hashLock: FORTY_TWO_KECCAK_256, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - const res = await api.newContractV1(parameters); - t2.ok(res, "newContract called successfully"); - t2.equal(res.status, 200, `Endpoint ${fNew}: response.status === 200 OK`); - - t2.end(); - }); - - test(`${testCase} - ${fNew} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: timestamp, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - try { - await api.newContractV1(parameters as unknown as NewContractObj); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fNew} without required contractAddress: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("contractAddress"), - "Rejected because contractAddress is required", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fNew} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: timestamp, - hashLock: FORTY_TWO_KECCAK_256, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - fake: 4, - }; - try { - await api.newContractV1(parameters as unknown as NewContractObj); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fNew} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fRefund} - ${cOk}`, async (t2: Test) => { - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - FORTY_TWO_KECCAK_256, - timestamp, - ], - }); - t2.ok(responseTxId.callOutput, "result is truthy OK"); - const id = responseTxId.callOutput as string; - - await timeout(6000); - - const parameters = { - id, - web3SigningCredential, - connectorId, - keychainId, - }; - const res = await api.refundV1(parameters); - t2.equal( - res.status, - 200, - `Endpoint ${fRefund}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fRefund} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // id, - web3SigningCredential, - connectorId, - keychainId, - }; - try { - await api.refundV1(parameters as unknown as RefundReq); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fRefund} without required id: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok(fields.includes("id"), "Rejected because id is required"); - } - - t2.end(); - }); - - test(`${testCase} - ${fRefund} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - id: "", - web3SigningCredential, - connectorId, - keychainId, - fake: 4, - }; - try { - await api.refundV1(parameters as unknown as RefundReq); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fRefund} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fWithdraw} - ${cOk}`, async (t2: Test) => { - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: FORTY_TWO_KECCAK_256, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - await api.newContractV1(bodyObj); - - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - FORTY_TWO_KECCAK_256, - DataTest.expiration, - ], - }); - - const parameters = { - id: callOutput, - secret: FORTY_TWO_AS_HEX_STRING, - web3SigningCredential, - connectorId, - keychainId, - }; - - const res = await api.withdrawV1(parameters); - t2.equal( - res.status, - 200, - `Endpoint ${fWithdraw}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fWithdraw} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // id: callOutput, - secret: - "0x3853485acd2bfc3c632026ee365279743af107a30492e3ceaa7aefc30c2a048a", - web3SigningCredential, - connectorId, - keychainId, - }; - - try { - await api.withdrawV1(parameters as unknown as WithdrawReq); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fWithdraw} without required id: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok(fields.includes("id"), "Rejected because id is required"); - } - - t2.end(); - }); - - test(`${testCase} - ${fWithdraw} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - id: "", - secret: - "0x3853485acd2bfc3c632026ee365279743af107a30492e3ceaa7aefc30c2a048a", - web3SigningCredential, - connectorId, - keychainId, - fake: 4, - }; - - try { - await api.withdrawV1(parameters as unknown as WithdrawReq); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fWithdraw} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fStatus} - ${cOk}`, async (t2: Test) => { - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - const hashTimeLockAddress2 = deployOut.transactionReceipt - .contractAddress as string; - - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress2, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - await api.newContractV1(bodyObj); - - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - DataTest.hashLock, - DataTest.expiration, - ], - }); - - const ids = [callOutput as string]; - - const parameters = { - ids, - web3SigningCredential, - connectorId, - keychainId, - }; - const res = await api.getStatusV1(parameters); - t2.equal( - res.status, - 200, - `Endpoint ${fStatus}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fStatus} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // ids, - web3SigningCredential, - connectorId, - keychainId, - }; - - try { - await api.getStatusV1(parameters as unknown as GetStatusRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fStatus} without required ids: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok(fields.includes("ids"), "Rejected because ids is required"); - } - - t2.end(); - }); - - test(`${testCase} - ${fStatus} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - ids: [""], - web3SigningCredential, - connectorId, - keychainId, - fake: 4, - }; - - try { - await api.getStatusV1(parameters as unknown as GetStatusRequest); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fStatus} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - test(`${testCase} - ${fSingleStatus} - ${cOk}`, async (t2: Test) => { - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - const hashTimeLockAddress2 = deployOut.transactionReceipt - .contractAddress as string; - - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress2, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - await api.newContractV1(bodyObj); - - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - DataTest.hashLock, - DataTest.expiration, - ], - }); - - const parameters = { - id: callOutput, - web3SigningCredential, - connectorId, - keychainId, - }; - const res = await api.getSingleStatusV1(parameters); - t2.equal( - res.status, - 200, - `Endpoint ${fSingleStatus}: response.status === 200 OK`, - ); - - t2.end(); - }); - - test(`${testCase} - ${fSingleStatus} - ${cWithoutParams}`, async (t2: Test) => { - const parameters = { - // id: callOutput, - web3SigningCredential, - connectorId, - keychainId, - }; - - try { - await api.getSingleStatusV1( - parameters as unknown as GetSingleStatusRequest, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fSingleStatus} without required id: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok(fields.includes("id"), "Rejected because id is required"); - } - - t2.end(); - }); - - test(`${testCase} - ${fSingleStatus} - ${cInvalidParams}`, async (t2: Test) => { - const parameters = { - id: "", - web3SigningCredential, - connectorId, - keychainId, - fake: 4, - }; - - try { - await api.getSingleStatusV1( - parameters as unknown as GetSingleStatusRequest, - ); - } catch (e) { - t2.equal( - e.response.status, - 400, - `Endpoint ${fSingleStatus} with fake=4: response.status === 400 OK`, - ); - const fields = e.response.data.map((param: { path: string }) => - param.path.replace("/body/", ""), - ); - t2.ok( - fields.includes("fake"), - "Rejected because fake is not a valid parameter", - ); - } - - t2.end(); - }); - - t.end(); -}); - -test("AFTER " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning did not throw OK"); - t.end(); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts deleted file mode 100644 index 0ae53cf4d0..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts +++ /dev/null @@ -1,226 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, - RefundReq, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; -const testCase = "Test invalid refund"; -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger({ logLevel }); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - afterAll(async () => await Servers.shutdown(server)); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - //Deploy DemoHelpers - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTimestamp", - params: [], - }); - expect(callOutput).toBeTruthy(); - let timestamp = 0; - timestamp = callOutput as number; - timestamp = +timestamp + +10; - - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: timestamp, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - const resp = await api.newContractV1(bodyObj); - expect(resp).toBeTruthy(); - expect(resp.status).toEqual(200); - - const responseTxId = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - DataTest.hashLock, - timestamp, - ], - }); - expect(responseTxId.callOutput).toBeTruthy(); - const id = responseTxId.callOutput as string; - - const refundRequest: RefundReq = { - id, - web3SigningCredential, - connectorId, - keychainId, - }; - const refundResponse = api.refundV1(refundRequest); - await expect(refundResponse).rejects.toHaveProperty( - ["response", "status"], - 500, - ); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts deleted file mode 100644 index 3cb236c555..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts +++ /dev/null @@ -1,248 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import "jest-extended"; -import bodyParser from "body-parser"; -import Web3 from "web3"; -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, - RefundReq, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; -const testCase = "Test refund"; - -const FORTY_TWO_AS_HEX_STRING = - "0x0000000000000000000000000000000000000000000000000000000000003432"; - -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger({ logLevel }); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - afterAll(async () => await Servers.shutdown(server)); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - test(testCase, async () => { - const timeout = (ms: number) => { - return new Promise((resolve) => setTimeout(resolve, ms)); - }; - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const web3 = new Web3(rpcApiHttpHost); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - //Deploy DemoHelpers - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - - const balance1 = await web3.eth.getBalance(firstHighNetWorthAccount); - - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTimestamp", - params: [], - }); - expect(callOutput).toBeTruthy(); - let timestamp = 0; - timestamp = callOutput as number; - timestamp = +timestamp + +10; - - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: timestamp, - hashLock: FORTY_TWO_AS_HEX_STRING, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - const resp = await api.newContractV1(bodyObj); - expect(resp).toBeTruthy(); - expect(resp.status).toEqual(200); - - const id = web3.utils.soliditySha3( - web3.eth.abi.encodeParameters( - ["address", "address", "uint256", "bytes32", "uint256"], - [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - FORTY_TWO_AS_HEX_STRING, - timestamp, - ], - ), - ); - expect(id).toBeTruthy(); - expect(id).toBeString(); - - await timeout(6000); - const refundRequest: RefundReq = { - id: id as string, - web3SigningCredential, - connectorId, - keychainId, - }; - const refundResponse = await api.refundV1(refundRequest); - expect(refundResponse.status).toEqual(200); - - const balance = await web3.eth.getBalance(firstHighNetWorthAccount); - expect(parseInt(balance)).toEqual(parseInt(balance1) - 10); - const balance2 = await web3.eth.getBalance(firstHighNetWorthAccount); - expect(balance1).toEqual(balance2); - const res = await api.getSingleStatusV1({ - id: id as string, - web3SigningCredential, - connectorId, - keychainId, - }); - expect(res.status).toEqual(200); - expect(res.data).toEqual(2); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts deleted file mode 100644 index f9d7ab63a8..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts +++ /dev/null @@ -1,207 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import express from "express"; -import bodyParser from "body-parser"; -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, - WithdrawReq, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; - -const testCase = "Test invalid withdraw"; - -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger({ logLevel }); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - afterAll(async () => await Servers.shutdown(server)); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - //Deploy DemoHelpers - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: DataTest.hashLock, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - const resp = await api.newContractV1(bodyObj); - expect(resp).toBeTruthy(); - expect(resp.status).toEqual(200); - - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - DataTest.hashLock, - DataTest.expiration, - ], - }); - - const bodyWithdraw: WithdrawReq = { - id: callOutput, - secret: - "0x3853485acd2bfc3c632026ee365279743af107a30492e3ceaa7aefc30c2a048a", - web3SigningCredential, - connectorId, - keychainId: "", - }; - const apiCall = api.withdrawV1(bodyWithdraw); - await expect(apiCall).rejects.toHaveProperty(["response", "status"], 500); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts deleted file mode 100644 index 5810fd86a5..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts +++ /dev/null @@ -1,232 +0,0 @@ -import http from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import Web3 from "web3"; -import { - Configuration, - DefaultApi as BesuApi, - IPluginHtlcEthBesuOptions, - PluginFactoryHtlcEthBesu, - NewContractObj, - InitializeRequest, - WithdrawReq, -} from "@hyperledger/cactus-plugin-htlc-eth-besu"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredential, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { DataTest } from "../data-test"; -import DemoHelperJSON from "../../../solidity/contracts/DemoHelpers.json"; -import HashTimeLockJSON from "../../../../../../cactus-plugin-htlc-eth-besu/src/main/solidity/contracts/HashTimeLock.json"; - -const connectorId = uuidv4(); -const logLevel: LogLevelDesc = "INFO"; - -const FORTY_TWO_AS_HEX_STRING = - "0x0000000000000000000000000000000000000000000000000000000000003432"; -const FORTY_TWO_KECCAK_256 = - "0xf0095bab87a78fd2afa113b903c90a72ba1fd22c44f55b66cf409390814dfb69"; - -const testCase = "Test withdraw"; - -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger({ logLevel }); - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - afterAll(async () => await Servers.shutdown(server)); - - test(testCase, async () => { - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const privateKey = besuTestLedger.getGenesisAccountPrivKey(); - const web3SigningCredential: Web3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - } as Web3SigningCredential; - - const keychainId = uuidv4(); - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId, - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [DemoHelperJSON.contractName, JSON.stringify(DemoHelperJSON)], - ]), - logLevel, - }); - keychainPlugin.set( - HashTimeLockJSON.contractName, - JSON.stringify(HashTimeLockJSON), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const pluginRegistry = new PluginRegistry({}); - const connector: PluginLedgerConnectorBesu = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: connectorId, - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - pluginRegistry.add(connector); - const pluginOptions: IPluginHtlcEthBesuOptions = { - logLevel, - instanceId: uuidv4(), - pluginRegistry, - }; - - const factoryHTLC = new PluginFactoryHtlcEthBesu({ - pluginImportType: PluginImportType.Local, - }); - - const pluginHtlc = await factoryHTLC.create(pluginOptions); - pluginRegistry.add(pluginHtlc); - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - const configuration = new Configuration({ basePath: apiHost }); - const api = new BesuApi(configuration); - - await pluginHtlc.getOrCreateWebServices(); - await pluginHtlc.registerWebServices(expressApp); - - const web3 = new Web3(rpcApiHttpHost); - - const initRequest: InitializeRequest = { - connectorId, - keychainId, - constructorArgs: [], - web3SigningCredential, - gas: DataTest.estimated_gas, - }; - const deployOut = await pluginHtlc.initialize(initRequest); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - const hashTimeLockAddress = deployOut.transactionReceipt - .contractAddress as string; - - //Deploy DemoHelpers - const deployOutDemo = await connector.deployContract({ - contractName: DemoHelperJSON.contractName, - contractAbi: DemoHelperJSON.abi, - bytecode: DemoHelperJSON.bytecode, - web3SigningCredential, - keychainId, - constructorArgs: [], - gas: DataTest.estimated_gas, - }); - expect(deployOutDemo).toBeTruthy(); - expect(deployOutDemo.transactionReceipt).toBeTruthy(); - expect(deployOutDemo.transactionReceipt.contractAddress).toBeTruthy(); - - const balance1 = await web3.eth.getBalance( - "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0", - ); - - const bodyObj: NewContractObj = { - contractAddress: hashTimeLockAddress, - inputAmount: 10, - outputAmount: 0x04, - expiration: DataTest.expiration, - hashLock: FORTY_TWO_KECCAK_256, - receiver: DataTest.receiver, - outputNetwork: "BTC", - outputAddress: "1AcVYm7M3kkJQH28FXAvyBFQzFRL6xPKu8", - connectorId: connectorId, - web3SigningCredential, - keychainId, - gas: DataTest.estimated_gas, - }; - const resp = await api.newContractV1(bodyObj); - expect(resp).toBeTruthy(); - expect(resp.status).toEqual(200); - - const { callOutput } = await connector.invokeContract({ - contractName: DemoHelperJSON.contractName, - keychainId, - signingCredential: web3SigningCredential, - invocationType: EthContractInvocationType.Call, - methodName: "getTxId", - params: [ - firstHighNetWorthAccount, - DataTest.receiver, - 10, - FORTY_TWO_KECCAK_256, - DataTest.expiration, - ], - }); - - // Test for 200 valid response test case - const bodyWithdraw: WithdrawReq = { - id: callOutput, - secret: FORTY_TWO_AS_HEX_STRING, - web3SigningCredential, - connectorId, - keychainId, - }; - const res = await api.withdrawV1(bodyWithdraw); - - expect(res.status).toEqual(200); - const balance2 = await web3.eth.getBalance( - "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0", - ); - expect(parseInt(balance1, 10) + 10).toEqual(parseInt(balance2, 10)); - const resStatus = await api.getSingleStatusV1({ - id: callOutput as string, - web3SigningCredential, - connectorId, - keychainId, - }); - expect(resStatus.status).toEqual(200); - expect(resStatus.data).toEqual(3); - }); -}); diff --git a/packages/cactus-test-plugin-htlc-eth-besu/tsconfig.json b/packages/cactus-test-plugin-htlc-eth-besu/tsconfig.json deleted file mode 100644 index e9a635f85b..0000000000 --- a/packages/cactus-test-plugin-htlc-eth-besu/tsconfig.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-plugin-htlc-eth-besu.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-htlc-eth-besu/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-test-plugin-keychain-memory/CHANGELOG.md b/packages/cactus-test-plugin-keychain-memory/CHANGELOG.md deleted file mode 100644 index 9db2ab4695..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/CHANGELOG.md +++ /dev/null @@ -1,61 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-keychain-memory - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-keychain-memory - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-keychain-memory - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-keychain-memory - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-keychain-memory - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Features - -* **plugin-keychain-memory:** add ConnectRPC support ([c5fecf6](https://github.com/hyperledger/cacti/commit/c5fecf6802efba0c982db1adc4a98b785c9cb8e0)), closes [#3183](https://github.com/hyperledger/cacti/issues/3183) diff --git a/packages/cactus-test-plugin-keychain-memory/README.md b/packages/cactus-test-plugin-keychain-memory/README.md deleted file mode 100644 index a3edaf9eea..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# `@hyperledger/cactus-test-plugin-keychain-memory` - -This is a private package only used for executing tests that cannot live in the -implementation package due to us trying to avoid circular dependencies between -the API server and the plugins. diff --git a/packages/cactus-test-plugin-keychain-memory/openapitools.json b/packages/cactus-test-plugin-keychain-memory/openapitools.json deleted file mode 100644 index 225ff1aaae..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/openapitools.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "6.6.0" - } -} diff --git a/packages/cactus-test-plugin-keychain-memory/package.json b/packages/cactus-test-plugin-keychain-memory/package.json deleted file mode 100644 index 16a7fb0cb5..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-plugin-keychain-memory", - "version": "2.0.0", - "private": true, - "description": "Tests with API server integration for the dummy keychain implementation. Private package not meant to be released.", - "keywords": [ - "Hyperledger", - "Cacti", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-test-plugin-keychain-memory.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch" - }, - "devDependencies": { - "@connectrpc/connect": "1.4.0", - "@connectrpc/connect-node": "1.4.0", - "@connectrpc/connect-web": "1.4.0", - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "express": "4.21.0", - "uuid": "10.0.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-test-plugin-keychain-memory.web.umd.min.js", - "mainMinified": "dist/cactus-test-plugin-keychain-memory.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-test-plugin-keychain-memory/src/main/typescript/index.ts b/packages/cactus-test-plugin-keychain-memory/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-plugin-keychain-memory/src/main/typescript/index.web.ts b/packages/cactus-test-plugin-keychain-memory/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-keychain-memory/src/main/typescript/public-api.ts b/packages/cactus-test-plugin-keychain-memory/src/main/typescript/public-api.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/src/main/typescript/public-api.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-keychain-memory/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-test-plugin-keychain-memory/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-plugin-keychain-memory/src/test/typescript/integration/test-keychain-memory-crpc-api-server.test.ts b/packages/cactus-test-plugin-keychain-memory/src/test/typescript/integration/test-keychain-memory-crpc-api-server.test.ts deleted file mode 100644 index bdf376a434..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/src/test/typescript/integration/test-keychain-memory-crpc-api-server.test.ts +++ /dev/null @@ -1,562 +0,0 @@ -import { AddressInfo } from "node:net"; -import http from "node:http"; - -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { createPromiseClient } from "@connectrpc/connect"; -import { createConnectTransport } from "@connectrpc/connect-node"; -import { createGrpcTransport } from "@connectrpc/connect-node"; -import { createGrpcWebTransport } from "@connectrpc/connect-node"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - LogLevelDesc, - Logger, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; -import { ApiServer } from "@hyperledger/cactus-cmd-api-server"; -import { AuthorizationProtocol } from "@hyperledger/cactus-cmd-api-server"; -import { ConfigService } from "@hyperledger/cactus-cmd-api-server"; -import { - DeleteKeychainEntryRequestV1PB, - DeleteKeychainEntryV1Request, - GetKeychainEntryRequestV1PB, - GetKeychainEntryV1Request, - HasKeychainEntryRequestV1PB, - HasKeychainEntryV1Request, - PluginKeychainMemory, - SetKeychainEntryRequestV1PB, - SetKeychainEntryV1Request, -} from "@hyperledger/cactus-plugin-keychain-memory"; -import { DefaultService } from "@hyperledger/cactus-plugin-keychain-memory"; - -const logLevel: LogLevelDesc = "DEBUG"; - -describe("PluginKeychainMemory", () => { - const log: Logger = LoggerProvider.getOrCreate({ - label: "plugin-ledger-connector-besu-grpc-service-test", - level: logLevel, - }); - - let httpServer: http.Server; - let apiServer: ApiServer; - let addressInfoHttp: AddressInfo; - let crpcApiUrl: string; - let apiHttpHost: string; - - beforeAll(async () => { - httpServer = await Servers.startOnPreferredPort(4050); - addressInfoHttp = httpServer.address() as AddressInfo; - apiHttpHost = `http://${addressInfoHttp.address}:${addressInfoHttp.port}`; - log.debug("HTTP API host: %s", apiHttpHost); - - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const cfgSrv = new ConfigService(); - const apiSrvOpts = await cfgSrv.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.logLevel = logLevel; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = addressInfoHttp.port; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.grpcMtlsEnabled = false; - apiSrvOpts.apiTlsEnabled = false; - apiSrvOpts.crpcPort = 0; - const cfg = await cfgSrv.newExampleConfigConvict(apiSrvOpts); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidV4(), - keychainId: uuidV4(), - logLevel, - }); - - pluginRegistry.add(keychainPlugin); - - apiServer = new ApiServer({ - httpServerApi: httpServer, - config: cfg.getProperties(), - pluginRegistry, - }); - - const { addressInfoGrpc, addressInfoCrpc } = await apiServer.start(); - const grpcPort = addressInfoGrpc.port; - const grpcHost = addressInfoGrpc.address; - const grpcFamily = addressInfoHttp.family; - log.info("gRPC family=%s host=%s port=%s", grpcFamily, grpcHost, grpcPort); - log.info("CRPC AddressInfo=%o", addressInfoCrpc); - crpcApiUrl = `http://${addressInfoCrpc.address}:${addressInfoCrpc.port}`; - - expect(apiServer).toBeTruthy(); - - const keychain = new PluginKeychainMemory({ - logLevel, - instanceId: uuidV4(), - keychainId: uuidV4(), - }); - - expect(keychain).toBeTruthy(); - }); - - afterAll(async () => { - await apiServer.shutdown(); - }); - - test("works via CRPC API server - HTTP/1.1 Transport:Connect", async () => { - const transport = createConnectTransport({ - baseUrl: apiHttpHost, - httpVersion: "1.1", - }); - - const key = uuidV4(); - const value = uuidV4(); - - const client = createPromiseClient(DefaultService, transport); - - const res1 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res1).toBeTruthy(); - expect(res1.isPresent).toBeFalse(); - expect(res1.checkedAt).toBeTruthy(); - expect(res1.checkedAt).toBeDateString(); - expect(res1.key).toEqual(key); - - const res2 = await client.setKeychainEntryV1( - new SetKeychainEntryV1Request({ - setKeychainEntryRequestV1PB: new SetKeychainEntryRequestV1PB({ - key, - value, - }), - }), - ); - expect(res2).toBeTruthy(); - expect(res2.key).toEqual(key); - - const res3 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res3).toBeTruthy(); - expect(res3.isPresent).toBeTrue(); - expect(res3.checkedAt).toBeTruthy(); - expect(res3.checkedAt).toBeDateString(); - expect(res3.key).toEqual(key); - - const res4 = await client.getKeychainEntryV1( - new GetKeychainEntryV1Request({ - getKeychainEntryRequestV1PB: new GetKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res4).toBeTruthy(); - expect(res4.value).toBeTruthy(); - expect(res4.value).toEqual(value); - expect(res4.key).toEqual(key); - - const res5 = await client.deleteKeychainEntryV1( - new DeleteKeychainEntryV1Request({ - deleteKeychainEntryRequestV1PB: new DeleteKeychainEntryRequestV1PB({ - key, - }), - }), - ); - expect(res5).toBeTruthy(); - expect(res5.key).toEqual(key); - - const res6 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res6).toBeTruthy(); - expect(res6.isPresent).toBeFalse(); - expect(res6.checkedAt).toBeTruthy(); - expect(res6.checkedAt).toBeDateString(); - expect(res6.key).toEqual(key); - }); - - test("works via CRPC API server - HTTP/1.1 Transport:gRPC", async () => { - const transport = createGrpcTransport({ - baseUrl: apiHttpHost, - httpVersion: "1.1", - }); - - const key = uuidV4(); - const value = uuidV4(); - - const client = createPromiseClient(DefaultService, transport); - - const res1 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res1).toBeTruthy(); - expect(res1.isPresent).toBeFalse(); - expect(res1.checkedAt).toBeTruthy(); - expect(res1.checkedAt).toBeDateString(); - expect(res1.key).toEqual(key); - - const res2 = await client.setKeychainEntryV1( - new SetKeychainEntryV1Request({ - setKeychainEntryRequestV1PB: new SetKeychainEntryRequestV1PB({ - key, - value, - }), - }), - ); - expect(res2).toBeTruthy(); - expect(res2.key).toEqual(key); - - const res3 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res3).toBeTruthy(); - expect(res3.isPresent).toBeTrue(); - expect(res3.checkedAt).toBeTruthy(); - expect(res3.checkedAt).toBeDateString(); - expect(res3.key).toEqual(key); - - const res4 = await client.getKeychainEntryV1( - new GetKeychainEntryV1Request({ - getKeychainEntryRequestV1PB: new GetKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res4).toBeTruthy(); - expect(res4.value).toBeTruthy(); - expect(res4.value).toEqual(value); - expect(res4.key).toEqual(key); - - const res5 = await client.deleteKeychainEntryV1( - new DeleteKeychainEntryV1Request({ - deleteKeychainEntryRequestV1PB: new DeleteKeychainEntryRequestV1PB({ - key, - }), - }), - ); - expect(res5).toBeTruthy(); - expect(res5.key).toEqual(key); - - const res6 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res6).toBeTruthy(); - expect(res6.isPresent).toBeFalse(); - expect(res6.checkedAt).toBeTruthy(); - expect(res6.checkedAt).toBeDateString(); - expect(res6.key).toEqual(key); - }); - - test("works via CRPC API server - HTTP/1.1 Transport:gRPC-Web", async () => { - const transport = createGrpcWebTransport({ - baseUrl: apiHttpHost, - httpVersion: "1.1", - }); - - const key = uuidV4(); - const value = uuidV4(); - - const client = createPromiseClient(DefaultService, transport); - - const res1 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res1).toBeTruthy(); - expect(res1.isPresent).toBeFalse(); - expect(res1.checkedAt).toBeTruthy(); - expect(res1.checkedAt).toBeDateString(); - expect(res1.key).toEqual(key); - - const res2 = await client.setKeychainEntryV1( - new SetKeychainEntryV1Request({ - setKeychainEntryRequestV1PB: new SetKeychainEntryRequestV1PB({ - key, - value, - }), - }), - ); - expect(res2).toBeTruthy(); - expect(res2.key).toEqual(key); - - const res3 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res3).toBeTruthy(); - expect(res3.isPresent).toBeTrue(); - expect(res3.checkedAt).toBeTruthy(); - expect(res3.checkedAt).toBeDateString(); - expect(res3.key).toEqual(key); - - const res4 = await client.getKeychainEntryV1( - new GetKeychainEntryV1Request({ - getKeychainEntryRequestV1PB: new GetKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res4).toBeTruthy(); - expect(res4.value).toBeTruthy(); - expect(res4.value).toEqual(value); - expect(res4.key).toEqual(key); - - const res5 = await client.deleteKeychainEntryV1( - new DeleteKeychainEntryV1Request({ - deleteKeychainEntryRequestV1PB: new DeleteKeychainEntryRequestV1PB({ - key, - }), - }), - ); - expect(res5).toBeTruthy(); - expect(res5.key).toEqual(key); - - const res6 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res6).toBeTruthy(); - expect(res6.isPresent).toBeFalse(); - expect(res6.checkedAt).toBeTruthy(); - expect(res6.checkedAt).toBeDateString(); - expect(res6.key).toEqual(key); - }); - - test("works via CRPC API server - HTTP/2 Transport:Connect", async () => { - const transport = createConnectTransport({ - baseUrl: crpcApiUrl, - httpVersion: "2", - }); - - const key = uuidV4(); - const value = uuidV4(); - - const client = createPromiseClient(DefaultService, transport); - - const res1 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res1).toBeTruthy(); - expect(res1.isPresent).toBeFalse(); - expect(res1.checkedAt).toBeTruthy(); - expect(res1.checkedAt).toBeDateString(); - expect(res1.key).toEqual(key); - - const res2 = await client.setKeychainEntryV1( - new SetKeychainEntryV1Request({ - setKeychainEntryRequestV1PB: new SetKeychainEntryRequestV1PB({ - key, - value, - }), - }), - ); - expect(res2).toBeTruthy(); - expect(res2.key).toEqual(key); - - const res3 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res3).toBeTruthy(); - expect(res3.isPresent).toBeTrue(); - expect(res3.checkedAt).toBeTruthy(); - expect(res3.checkedAt).toBeDateString(); - expect(res3.key).toEqual(key); - - const res4 = await client.getKeychainEntryV1( - new GetKeychainEntryV1Request({ - getKeychainEntryRequestV1PB: new GetKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res4).toBeTruthy(); - expect(res4.value).toBeTruthy(); - expect(res4.value).toEqual(value); - expect(res4.key).toEqual(key); - - const res5 = await client.deleteKeychainEntryV1( - new DeleteKeychainEntryV1Request({ - deleteKeychainEntryRequestV1PB: new DeleteKeychainEntryRequestV1PB({ - key, - }), - }), - ); - expect(res5).toBeTruthy(); - expect(res5.key).toEqual(key); - - const res6 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res6).toBeTruthy(); - expect(res6.isPresent).toBeFalse(); - expect(res6.checkedAt).toBeTruthy(); - expect(res6.checkedAt).toBeDateString(); - expect(res6.key).toEqual(key); - }); - - test("works via CRPC API server - HTTP/2 Transport:gRPC", async () => { - const transport = createGrpcTransport({ - baseUrl: crpcApiUrl, - httpVersion: "2", - }); - - const key = uuidV4(); - const value = uuidV4(); - - const client = createPromiseClient(DefaultService, transport); - - const res1 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res1).toBeTruthy(); - expect(res1.isPresent).toBeFalse(); - expect(res1.checkedAt).toBeTruthy(); - expect(res1.checkedAt).toBeDateString(); - expect(res1.key).toEqual(key); - - const res2 = await client.setKeychainEntryV1( - new SetKeychainEntryV1Request({ - setKeychainEntryRequestV1PB: new SetKeychainEntryRequestV1PB({ - key, - value, - }), - }), - ); - expect(res2).toBeTruthy(); - expect(res2.key).toEqual(key); - - const res3 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res3).toBeTruthy(); - expect(res3.isPresent).toBeTrue(); - expect(res3.checkedAt).toBeTruthy(); - expect(res3.checkedAt).toBeDateString(); - expect(res3.key).toEqual(key); - - const res4 = await client.getKeychainEntryV1( - new GetKeychainEntryV1Request({ - getKeychainEntryRequestV1PB: new GetKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res4).toBeTruthy(); - expect(res4.value).toBeTruthy(); - expect(res4.value).toEqual(value); - expect(res4.key).toEqual(key); - - const res5 = await client.deleteKeychainEntryV1( - new DeleteKeychainEntryV1Request({ - deleteKeychainEntryRequestV1PB: new DeleteKeychainEntryRequestV1PB({ - key, - }), - }), - ); - expect(res5).toBeTruthy(); - expect(res5.key).toEqual(key); - - const res6 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res6).toBeTruthy(); - expect(res6.isPresent).toBeFalse(); - expect(res6.checkedAt).toBeTruthy(); - expect(res6.checkedAt).toBeDateString(); - expect(res6.key).toEqual(key); - }); - - test("works via CRPC API server - HTTP/2 Transport:gRPC-Web", async () => { - const transport = createGrpcWebTransport({ - baseUrl: crpcApiUrl, - httpVersion: "2", - }); - - const key = uuidV4(); - const value = uuidV4(); - - const client = createPromiseClient(DefaultService, transport); - - const res1 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res1).toBeTruthy(); - expect(res1.isPresent).toBeFalse(); - expect(res1.checkedAt).toBeTruthy(); - expect(res1.checkedAt).toBeDateString(); - expect(res1.key).toEqual(key); - - const res2 = await client.setKeychainEntryV1( - new SetKeychainEntryV1Request({ - setKeychainEntryRequestV1PB: new SetKeychainEntryRequestV1PB({ - key, - value, - }), - }), - ); - expect(res2).toBeTruthy(); - expect(res2.key).toEqual(key); - - const res3 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res3).toBeTruthy(); - expect(res3.isPresent).toBeTrue(); - expect(res3.checkedAt).toBeTruthy(); - expect(res3.checkedAt).toBeDateString(); - expect(res3.key).toEqual(key); - - const res4 = await client.getKeychainEntryV1( - new GetKeychainEntryV1Request({ - getKeychainEntryRequestV1PB: new GetKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res4).toBeTruthy(); - expect(res4.value).toBeTruthy(); - expect(res4.value).toEqual(value); - expect(res4.key).toEqual(key); - - const res5 = await client.deleteKeychainEntryV1( - new DeleteKeychainEntryV1Request({ - deleteKeychainEntryRequestV1PB: new DeleteKeychainEntryRequestV1PB({ - key, - }), - }), - ); - expect(res5).toBeTruthy(); - expect(res5.key).toEqual(key); - - const res6 = await client.hasKeychainEntryV1( - new HasKeychainEntryV1Request({ - hasKeychainEntryRequestV1PB: new HasKeychainEntryRequestV1PB({ key }), - }), - ); - expect(res6).toBeTruthy(); - expect(res6.isPresent).toBeFalse(); - expect(res6.checkedAt).toBeTruthy(); - expect(res6.checkedAt).toBeDateString(); - expect(res6.key).toEqual(key); - }); -}); diff --git a/packages/cactus-test-plugin-keychain-memory/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-test-plugin-keychain-memory/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-plugin-keychain-memory/tsconfig.json b/packages/cactus-test-plugin-keychain-memory/tsconfig.json deleted file mode 100644 index ed24163eae..0000000000 --- a/packages/cactus-test-plugin-keychain-memory/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-plugin-keychain-memory.tsbuildinfo" - }, - "include": [ - "./src", - ], - "references": [ - { - "path": "../cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-test-plugin-ledger-connector-besu/CHANGELOG.md b/packages/cactus-test-plugin-ledger-connector-besu/CHANGELOG.md deleted file mode 100644 index e2feaf9e29..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/CHANGELOG.md +++ /dev/null @@ -1,194 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cacti/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) -* **security:** remediate qs vulnerability CVE-2022-24999 ([536b6b1](https://github.com/hyperledger/cacti/commit/536b6b1b7ab9014ebcd6b162e1a467e78b52afdd)) - -### Features - -* **connector-besu:** add gRPC support for operations ([ab676d2](https://github.com/hyperledger/cacti/commit/ab676d23e1781aa17b5f2c61cb7dec643443bded)), closes [#3173](https://github.com/hyperledger/cacti/issues/3173) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cacti/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cacti/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Bug Fixes - -* **security:** address CVE-2021-23358 ([ed71f42](https://github.com/hyperledger/cactus/commit/ed71f42aca1683dd2fd6f762fbc6cd19b4c3c253)), closes [#1775](https://github.com/hyperledger/cactus/issues/1775) - -### Features - -* **quorum-connector:** implement validator interface on go-quorum-connector ([8d36bea](https://github.com/hyperledger/cactus/commit/8d36bea5146a544a2cb4615ec7291a1b425e568f)), closes [#1604](https://github.com/hyperledger/cactus/issues/1604) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -### Features - -* **keychain-aws-sm:** complete request handler and endpoint ([e6099b8](https://github.com/hyperledger/cactus/commit/e6099b86152a35ac7a21aecc02824410c05eac88)), closes [#967](https://github.com/hyperledger/cactus/issues/967) [#1349](https://github.com/hyperledger/cactus/issues/1349) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Features - -* **besu:** support besu v21.1.6 [#982](https://github.com/hyperledger/cactus/issues/982) ([d715c67](https://github.com/hyperledger/cactus/commit/d715c679fee681844f29ed30f09f6d651daf087e)) -* **core:** add installOpenapiValidationMiddleware ([1f6ea5f](https://github.com/hyperledger/cactus/commit/1f6ea5fe3aa1ba997a655098d632034f13f232a5)), closes [#847](https://github.com/hyperledger/cactus/issues/847) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) -* **cmd-api-server:** support grpc web services [#1189](https://github.com/hyperledger/cactus/issues/1189) ([4cace1d](https://github.com/hyperledger/cactus/commit/4cace1dca3377e09d2ed37fdadeec6b125d47896)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) -* **test:** eliminate CVE-2020-8203 in besu connector test pkg ([6411933](https://github.com/hyperledger/cactus/commit/6411933a167711152165d86a260d5f49d272746d)) - -### Features - -* besu WatchBlocksV1Endpoint with SocketIO ([d5e1708](https://github.com/hyperledger/cactus/commit/d5e1708e84ab5192d07410d5120e144d477ef6ce)) -* **connector-besu:** add getBalance web service ([50107f6](https://github.com/hyperledger/cactus/commit/50107f62cda1e3be688576b9074b9408757e9b49)), closes [#1066](https://github.com/hyperledger/cactus/issues/1066) -* **connector-besu:** add getBlock web service [#1065](https://github.com/hyperledger/cactus/issues/1065) ([869c48b](https://github.com/hyperledger/cactus/commit/869c48ba4d8000b50d1d64a8a0897b50dde21d5d)) -* **connector-besu:** add getPastLogs web service ([c037ec5](https://github.com/hyperledger/cactus/commit/c037ec55bc07e5314cd2104579b1a882d79f1488)), closes [#1067](https://github.com/hyperledger/cactus/issues/1067) -* **connector-besu:** add getTransaction web service ([0ca0769](https://github.com/hyperledger/cactus/commit/0ca0769ac4d1c3d43afc553813cf31983e5cb1b1)), closes [#1062](https://github.com/hyperledger/cactus/issues/1062) [#1061](https://github.com/hyperledger/cactus/issues/1061) -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) -* **test:** eliminate CVE-2020-8203 in besu connector test pkg ([6411933](https://github.com/hyperledger/cactus/commit/6411933a167711152165d86a260d5f49d272746d)) - -### Features - -* **core-api:** jwt authorization [#770](https://github.com/hyperledger/cactus/issues/770) ([2016750](https://github.com/hyperledger/cactus/commit/2016750849b4333bb4dd78897468771f0642a4f5)) - -## [0.4.1](https://github.com/hyperledger/cactus/compare/v0.4.0...v0.4.1) (2021-04-02) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **ci:** disk full issues on GitHub Action Workflow runner [#698](https://github.com/hyperledger/cactus/issues/698) ([61e3f76](https://github.com/hyperledger/cactus/commit/61e3f76ed910c9b04b36f995456213018cc0e7ba)) -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-besu diff --git a/packages/cactus-test-plugin-ledger-connector-besu/README.md b/packages/cactus-test-plugin-ledger-connector-besu/README.md deleted file mode 100644 index b12e3b6c54..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# @hyperledger/cactus-test-plugin-ledger-connector-besu - -This package is designed to hold test cases verifying the correct operation of -the code in the package of similar name: `@hyperledger/cactus-plugin-ledger-connector-besu`. - -It contains no code that you would find useful in a production deployment. diff --git a/packages/cactus-test-plugin-ledger-connector-besu/package.json b/packages/cactus-test-plugin-ledger-connector-besu/package.json deleted file mode 100644 index 3aecfd843f..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-plugin-ledger-connector-besu", - "version": "2.0.0", - "description": "Integration tests for the Besu ledger and the API server.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-test-plugin-ledger-connector-besu.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@grpc/grpc-js": "1.11.3", - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@hyperledger/cactus-verifier-client": "2.0.0", - "key-encoder": "2.0.3", - "socket.io": "4.6.2", - "web3": "1.6.1", - "web3js-quorum": "22.4.0" - }, - "devDependencies": { - "@types/express": "5.0.0", - "@types/uuid": "10.0.0", - "axios": "1.7.7", - "express": "4.21.0", - "http-status-codes": "2.3.0", - "uuid": "10.0.0", - "web3-core": "1.6.1" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-test-plugin-ledger-connector-besu.web.umd.min.js", - "mainMinified": "dist/cactus-test-plugin-ledger-connector-besu.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/main/typescript/index.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/main/typescript/index.web.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/main/typescript/index.web.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/main/typescript/public-api.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/main/typescript/public-api.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/main/typescript/public-api.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json b/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json deleted file mode 100644 index 286294b996..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json +++ /dev/null @@ -1,5619 +0,0 @@ -{ - "contractName": "HelloWorld", - "abi": [ - { - "inputs": [], - "name": "sayHello", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getName", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getNameByIndex", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "setName", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getNameByIndex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sayHello\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol\":\"HelloWorld\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol\":{\"keccak256\":\"0x1e97027d32e8c3433b793d7b2b45e30ea2d341c96a3943508ba068dea106efab\",\"urls\":[\"bzz-raw://96e37a0bb119b1fe14a4e71627c077b180f4deb9acc4284aa987a3ca1a6f45b1\",\"dweb:/ipfs/QmTAiGsxb38hMgDgbrtLLdYxc76CposiN9moBuJXAg2Mgk\"]}},\"version\":1}", - "bytecode": "60806040526040518060400160405280600d81526020017f4361707461696e436163747573000000000000000000000000000000000000008152506000908051906020019061004f929190610062565b5034801561005c57600080fd5b50610166565b82805461006e90610105565b90600052602060002090601f01602090048101928261009057600085556100d7565b82601f106100a957805160ff19168380011785556100d7565b828001600101855582156100d7579182015b828111156100d65782518255916020019190600101906100bb565b5b5090506100e491906100e8565b5090565b5b808211156101015760008160009055506001016100e9565b5090565b6000600282049050600182168061011d57607f821691505b6020821081141561013157610130610137565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b61082c806101756000396000f3fe60806040526004361061004a5760003560e01c806317d7de7c1461004f57806359c293f11461007a578063c47f0027146100b7578063d0e30db0146100e0578063ef5fb05b146100ea575b600080fd5b34801561005b57600080fd5b50610064610115565b60405161007191906105ae565b60405180910390f35b34801561008657600080fd5b506100a1600480360381019061009c919061050c565b6101a7565b6040516100ae91906105ae565b60405180910390f35b3480156100c357600080fd5b506100de60048036038101906100d991906104cb565b61027d565b005b6100e86102d3565b005b3480156100f657600080fd5b506100ff61036e565b60405161010c91906105ae565b60405180910390f35b6060600080546101249061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546101509061070f565b801561019d5780601f106101725761010080835404028352916020019161019d565b820191906000526020600020905b81548152906001019060200180831161018057829003601f168201915b5050505050905090565b6060600282815481106101e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180546101f89061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546102249061070f565b80156102715780601f1061024657610100808354040283529160200191610271565b820191906000526020600020905b81548152906001019060200180831161025457829003601f168201915b50505050509050919050565b80600090805190602001906102939291906103ab565b506002819080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906102cf9291906103ab565b5050565b60003411610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d906105d0565b60405180910390fd5b34600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610365919061066d565b92505081905550565b60606040518060400160405280600c81526020017f48656c6c6f20576f726c64210000000000000000000000000000000000000000815250905090565b8280546103b79061070f565b90600052602060002090601f0160209004810192826103d95760008555610420565b82601f106103f257805160ff1916838001178555610420565b82800160010185558215610420579182015b8281111561041f578251825591602001919060010190610404565b5b50905061042d9190610431565b5090565b5b8082111561044a576000816000905550600101610432565b5090565b600061046161045c84610621565b6105f0565b90508281526020810184848401111561047957600080fd5b6104848482856106cd565b509392505050565b600082601f83011261049d57600080fd5b81356104ad84826020860161044e565b91505092915050565b6000813590506104c5816107df565b92915050565b6000602082840312156104dd57600080fd5b600082013567ffffffffffffffff8111156104f757600080fd5b6105038482850161048c565b91505092915050565b60006020828403121561051e57600080fd5b600061052c848285016104b6565b91505092915050565b600061054082610651565b61054a818561065c565b935061055a8185602086016106dc565b610563816107ce565b840191505092915050565b600061057b601b8361065c565b91507f56616c7565206d757374206265206469666572656e74206f66203000000000006000830152602082019050919050565b600060208201905081810360008301526105c88184610535565b905092915050565b600060208201905081810360008301526105e98161056e565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156106175761061661079f565b5b8060405250919050565b600067ffffffffffffffff82111561063c5761063b61079f565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610678826106c3565b9150610683836106c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106b8576106b7610741565b5b828201905092915050565b6000819050919050565b82818337600083830152505050565b60005b838110156106fa5780820151818401526020810190506106df565b83811115610709576000848401525b50505050565b6000600282049050600182168061072757607f821691505b6020821081141561073b5761073a610770565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6107e8816106c3565b81146107f357600080fd5b5056fea2646970667358221220450aa5d16069485df7d037ffe43b6593e232f4ac514d9169ba271384cc5d841964736f6c63430008000033", - "deployedBytecode": "60806040526004361061004a5760003560e01c806317d7de7c1461004f57806359c293f11461007a578063c47f0027146100b7578063d0e30db0146100e0578063ef5fb05b146100ea575b600080fd5b34801561005b57600080fd5b50610064610115565b60405161007191906105ae565b60405180910390f35b34801561008657600080fd5b506100a1600480360381019061009c919061050c565b6101a7565b6040516100ae91906105ae565b60405180910390f35b3480156100c357600080fd5b506100de60048036038101906100d991906104cb565b61027d565b005b6100e86102d3565b005b3480156100f657600080fd5b506100ff61036e565b60405161010c91906105ae565b60405180910390f35b6060600080546101249061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546101509061070f565b801561019d5780601f106101725761010080835404028352916020019161019d565b820191906000526020600020905b81548152906001019060200180831161018057829003601f168201915b5050505050905090565b6060600282815481106101e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180546101f89061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546102249061070f565b80156102715780601f1061024657610100808354040283529160200191610271565b820191906000526020600020905b81548152906001019060200180831161025457829003601f168201915b50505050509050919050565b80600090805190602001906102939291906103ab565b506002819080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906102cf9291906103ab565b5050565b60003411610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d906105d0565b60405180910390fd5b34600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610365919061066d565b92505081905550565b60606040518060400160405280600c81526020017f48656c6c6f20576f726c64210000000000000000000000000000000000000000815250905090565b8280546103b79061070f565b90600052602060002090601f0160209004810192826103d95760008555610420565b82601f106103f257805160ff1916838001178555610420565b82800160010185558215610420579182015b8281111561041f578251825591602001919060010190610404565b5b50905061042d9190610431565b5090565b5b8082111561044a576000816000905550600101610432565b5090565b600061046161045c84610621565b6105f0565b90508281526020810184848401111561047957600080fd5b6104848482856106cd565b509392505050565b600082601f83011261049d57600080fd5b81356104ad84826020860161044e565b91505092915050565b6000813590506104c5816107df565b92915050565b6000602082840312156104dd57600080fd5b600082013567ffffffffffffffff8111156104f757600080fd5b6105038482850161048c565b91505092915050565b60006020828403121561051e57600080fd5b600061052c848285016104b6565b91505092915050565b600061054082610651565b61054a818561065c565b935061055a8185602086016106dc565b610563816107ce565b840191505092915050565b600061057b601b8361065c565b91507f56616c7565206d757374206265206469666572656e74206f66203000000000006000830152602082019050919050565b600060208201905081810360008301526105c88184610535565b905092915050565b600060208201905081810360008301526105e98161056e565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156106175761061661079f565b5b8060405250919050565b600067ffffffffffffffff82111561063c5761063b61079f565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610678826106c3565b9150610683836106c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106b8576106b7610741565b5b828201905092915050565b6000819050919050565b82818337600083830152505050565b60005b838110156106fa5780820151818401526020810190506106df565b83811115610709576000848401525b50505050565b6000600282049050600182168061072757607f821691505b6020821081141561073b5761073a610770565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6107e8816106c3565b81146107f357600080fd5b5056fea2646970667358221220450aa5d16069485df7d037ffe43b6593e232f4ac514d9169ba271384cc5d841964736f6c63430008000033", - "immutableReferences": {}, - "generatedSources": [ - { - "ast": { - "nodeType": "YulBlock", - "src": "0:516:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "58:269:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "68:22:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "82:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "88:1:2", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "78:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "78:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "68:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "99:38:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "129:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "135:1:2", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "125:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "125:12:2" - }, - "variables": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulTypedName", - "src": "103:18:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "176:51:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "190:27:2", - "value": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "204:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "212:4:2", - "type": "", - "value": "0x7f" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "200:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "200:17:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "190:6:2" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "156:18:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "149:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "149:26:2" - }, - "nodeType": "YulIf", - "src": "146:2:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "279:42:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x22", - "nodeType": "YulIdentifier", - "src": "293:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "293:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "293:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "243:18:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "266:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "274:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "263:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "263:14:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "240:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "240:38:2" - }, - "nodeType": "YulIf", - "src": "237:2:2" - } - ] - }, - "name": "extract_byte_array_length", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "data", - "nodeType": "YulTypedName", - "src": "42:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "51:6:2", - "type": "" - } - ], - "src": "7:320:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "361:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "378:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "381:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "371:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "371:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "371:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "475:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "478:4:2", - "type": "", - "value": "0x22" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "468:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "468:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "468:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "499:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "502:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "492:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "492:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "492:15:2" - } - ] - }, - "name": "panic_error_0x22", - "nodeType": "YulFunctionDefinition", - "src": "333:180:2" - } - ] - }, - "contents": "{\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n}\n", - "id": 2, - "language": "Yul", - "name": "#utility.yul" - } - ], - "deployedGeneratedSources": [ - { - "ast": { - "nodeType": "YulBlock", - "src": "0:5780:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "91:260:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "101:74:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "167:6:2" - } - ], - "functionName": { - "name": "array_allocation_size_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "125:41:2" - }, - "nodeType": "YulFunctionCall", - "src": "125:49:2" - } - ], - "functionName": { - "name": "allocateMemory", - "nodeType": "YulIdentifier", - "src": "110:14:2" - }, - "nodeType": "YulFunctionCall", - "src": "110:65:2" - }, - "variableNames": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "101:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "191:5:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "198:6:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "184:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "184:21:2" - }, - "nodeType": "YulExpressionStatement", - "src": "184:21:2" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "214:27:2", - "value": { - "arguments": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "229:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "236:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "225:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "225:16:2" - }, - "variables": [ - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "218:3:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "279:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "288:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "291:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "281:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "281:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "281:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "260:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "265:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "256:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "256:16:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "274:3:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "253:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "253:25:2" - }, - "nodeType": "YulIf", - "src": "250:2:2" - }, - { - "expression": { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "328:3:2" - }, - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "333:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "338:6:2" - } - ], - "functionName": { - "name": "copy_calldata_to_memory", - "nodeType": "YulIdentifier", - "src": "304:23:2" - }, - "nodeType": "YulFunctionCall", - "src": "304:41:2" - }, - "nodeType": "YulExpressionStatement", - "src": "304:41:2" - } - ] - }, - "name": "abi_decode_available_length_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "64:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "69:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "77:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "array", - "nodeType": "YulTypedName", - "src": "85:5:2", - "type": "" - } - ], - "src": "7:344:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "433:211:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "482:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "491:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "494:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "484:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "484:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "484:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "461:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "469:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "457:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "457:17:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "476:3:2" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "453:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "453:27:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "446:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "446:35:2" - }, - "nodeType": "YulIf", - "src": "443:2:2" - }, - { - "nodeType": "YulVariableDeclaration", - "src": "507:34:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "534:6:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "521:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "521:20:2" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "511:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "550:88:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "611:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "619:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "607:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "607:17:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "626:6:2" - }, - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "634:3:2" - } - ], - "functionName": { - "name": "abi_decode_available_length_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "559:47:2" - }, - "nodeType": "YulFunctionCall", - "src": "559:79:2" - }, - "variableNames": [ - { - "name": "array", - "nodeType": "YulIdentifier", - "src": "550:5:2" - } - ] - } - ] - }, - "name": "abi_decode_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "411:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "419:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "array", - "nodeType": "YulTypedName", - "src": "427:5:2", - "type": "" - } - ], - "src": "371:273:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "702:87:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "712:29:2", - "value": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "734:6:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "721:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "721:20:2" - }, - "variableNames": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "712:5:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "777:5:2" - } - ], - "functionName": { - "name": "validator_revert_t_uint256", - "nodeType": "YulIdentifier", - "src": "750:26:2" - }, - "nodeType": "YulFunctionCall", - "src": "750:33:2" - }, - "nodeType": "YulExpressionStatement", - "src": "750:33:2" - } - ] - }, - "name": "abi_decode_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "680:6:2", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "688:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "696:5:2", - "type": "" - } - ], - "src": "650:139:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "871:299:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "917:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "926:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "929:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "919:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "919:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "919:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "892:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "901:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "888:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "888:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "913:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "884:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "884:32:2" - }, - "nodeType": "YulIf", - "src": "881:2:2" - }, - { - "nodeType": "YulBlock", - "src": "943:220:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "958:45:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "989:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1000:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "985:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "985:17:2" - } - ], - "functionName": { - "name": "calldataload", - "nodeType": "YulIdentifier", - "src": "972:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "972:31:2" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "962:6:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1050:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1059:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1062:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1052:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1052:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1052:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1022:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1030:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "1019:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "1019:30:2" - }, - "nodeType": "YulIf", - "src": "1016:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "1080:73:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1125:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1136:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1121:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1121:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1145:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "1090:30:2" - }, - "nodeType": "YulFunctionCall", - "src": "1090:63:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1080:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "841:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "852:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "864:6:2", - "type": "" - } - ], - "src": "795:375:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1242:196:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "1288:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1297:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1300:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1290:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "1290:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1290:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1263:7:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1272:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "1259:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1259:23:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1284:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "slt", - "nodeType": "YulIdentifier", - "src": "1255:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1255:32:2" - }, - "nodeType": "YulIf", - "src": "1252:2:2" - }, - { - "nodeType": "YulBlock", - "src": "1314:117:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1329:15:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1343:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1333:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1358:63:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1393:9:2" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1404:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1389:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1389:22:2" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1413:7:2" - } - ], - "functionName": { - "name": "abi_decode_t_uint256", - "nodeType": "YulIdentifier", - "src": "1368:20:2" - }, - "nodeType": "YulFunctionCall", - "src": "1368:53:2" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1358:6:2" - } - ] - } - ] - } - ] - }, - "name": "abi_decode_tuple_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "1212:9:2", - "type": "" - }, - { - "name": "dataEnd", - "nodeType": "YulTypedName", - "src": "1223:7:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "1235:6:2", - "type": "" - } - ], - "src": "1176:262:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1536:272:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1546:53:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "1593:5:2" - } - ], - "functionName": { - "name": "array_length_t_string_memory_ptr", - "nodeType": "YulIdentifier", - "src": "1560:32:2" - }, - "nodeType": "YulFunctionCall", - "src": "1560:39:2" - }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "1550:6:2", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "1608:78:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1674:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1679:6:2" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "1615:58:2" - }, - "nodeType": "YulFunctionCall", - "src": "1615:71:2" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1608:3:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "1721:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1728:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1717:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1717:16:2" - }, - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1735:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1740:6:2" - } - ], - "functionName": { - "name": "copy_memory_to_memory", - "nodeType": "YulIdentifier", - "src": "1695:21:2" - }, - "nodeType": "YulFunctionCall", - "src": "1695:52:2" - }, - "nodeType": "YulExpressionStatement", - "src": "1695:52:2" - }, - { - "nodeType": "YulAssignment", - "src": "1756:46:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1767:3:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1794:6:2" - } - ], - "functionName": { - "name": "round_up_to_mul_of_32", - "nodeType": "YulIdentifier", - "src": "1772:21:2" - }, - "nodeType": "YulFunctionCall", - "src": "1772:29:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1763:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "1763:39:2" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "1756:3:2" - } - ] - } - ] - }, - "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "1517:5:2", - "type": "" - }, - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "1524:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "1532:3:2", - "type": "" - } - ], - "src": "1444:364:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1960:179:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "1970:74:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2036:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2041:2:2", - "type": "", - "value": "27" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "1977:58:2" - }, - "nodeType": "YulFunctionCall", - "src": "1977:67:2" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "1970:3:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2065:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2070:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2061:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2061:11:2" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "2074:29:2", - "type": "", - "value": "Value must be diferent of 0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2054:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2054:50:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2054:50:2" - }, - { - "nodeType": "YulAssignment", - "src": "2114:19:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2125:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2130:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2121:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2121:12:2" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "2114:3:2" - } - ] - } - ] - }, - "name": "abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "1948:3:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "end", - "nodeType": "YulTypedName", - "src": "1956:3:2", - "type": "" - } - ], - "src": "1814:325:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2263:195:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2273:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2285:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2296:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2281:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2281:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2273:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2320:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2331:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2316:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2316:17:2" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2339:4:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2345:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "2335:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2335:20:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2309:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2309:47:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2309:47:2" - }, - { - "nodeType": "YulAssignment", - "src": "2365:86:2", - "value": { - "arguments": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "2437:6:2" - }, - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2446:4:2" - } - ], - "functionName": { - "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2373:63:2" - }, - "nodeType": "YulFunctionCall", - "src": "2373:78:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2365:4:2" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "2235:9:2", - "type": "" - }, - { - "name": "value0", - "nodeType": "YulTypedName", - "src": "2247:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "2258:4:2", - "type": "" - } - ], - "src": "2145:313:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2635:248:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2645:26:2", - "value": { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2657:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2668:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2653:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2653:18:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2645:4:2" - } - ] - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2692:9:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2703:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2688:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2688:17:2" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2711:4:2" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "2717:9:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "2707:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2707:20:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2681:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "2681:47:2" - }, - "nodeType": "YulExpressionStatement", - "src": "2681:47:2" - }, - { - "nodeType": "YulAssignment", - "src": "2737:139:2", - "value": { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2871:4:2" - } - ], - "functionName": { - "name": "abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2745:124:2" - }, - "nodeType": "YulFunctionCall", - "src": "2745:131:2" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "2737:4:2" - } - ] - } - ] - }, - "name": "abi_encode_tuple_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e__to_t_string_memory_ptr__fromStack_reversed", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "2615:9:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "tail", - "nodeType": "YulTypedName", - "src": "2630:4:2", - "type": "" - } - ], - "src": "2464:419:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2929:243:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "2939:19:2", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2955:2:2", - "type": "", - "value": "64" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "2949:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "2949:9:2" - }, - "variableNames": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "2939:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "2967:35:2", - "value": { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "2989:6:2" - }, - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "2997:4:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2985:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "2985:17:2" - }, - "variables": [ - { - "name": "newFreePtr", - "nodeType": "YulTypedName", - "src": "2971:10:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3113:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x41", - "nodeType": "YulIdentifier", - "src": "3115:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "3115:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3115:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "3056:10:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3068:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "3053:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3053:34:2" - }, - { - "arguments": [ - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "3092:10:2" - }, - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "3104:6:2" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "3089:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3089:22:2" - } - ], - "functionName": { - "name": "or", - "nodeType": "YulIdentifier", - "src": "3050:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3050:62:2" - }, - "nodeType": "YulIf", - "src": "3047:2:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3151:2:2", - "type": "", - "value": "64" - }, - { - "name": "newFreePtr", - "nodeType": "YulIdentifier", - "src": "3155:10:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3144:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3144:22:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3144:22:2" - } - ] - }, - "name": "allocateMemory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "size", - "nodeType": "YulTypedName", - "src": "2913:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "memPtr", - "nodeType": "YulTypedName", - "src": "2922:6:2", - "type": "" - } - ], - "src": "2889:283:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3245:265:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "3350:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x41", - "nodeType": "YulIdentifier", - "src": "3352:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "3352:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3352:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3322:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3330:18:2", - "type": "", - "value": "0xffffffffffffffff" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "3319:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3319:30:2" - }, - "nodeType": "YulIf", - "src": "3316:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "3402:41:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3418:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3426:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3414:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3414:17:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3437:4:2", - "type": "", - "value": "0x1f" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "3433:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3433:9:2" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "3410:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3410:33:2" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "3402:4:2" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "3480:23:2", - "value": { - "arguments": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "3492:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3498:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3488:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3488:15:2" - }, - "variableNames": [ - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "3480:4:2" - } - ] - } - ] - }, - "name": "array_allocation_size_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3229:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "size", - "nodeType": "YulTypedName", - "src": "3240:4:2", - "type": "" - } - ], - "src": "3178:332:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3575:40:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3586:22:2", - "value": { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "3602:5:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "3596:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "3596:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3586:6:2" - } - ] - } - ] - }, - "name": "array_length_t_string_memory_ptr", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "3558:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3568:6:2", - "type": "" - } - ], - "src": "3516:99:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3717:73:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3734:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "3739:6:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "3727:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "3727:19:2" - }, - "nodeType": "YulExpressionStatement", - "src": "3727:19:2" - }, - { - "nodeType": "YulAssignment", - "src": "3755:29:2", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3774:3:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3779:4:2", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "3770:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3770:14:2" - }, - "variableNames": [ - { - "name": "updated_pos", - "nodeType": "YulIdentifier", - "src": "3755:11:2" - } - ] - } - ] - }, - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "3689:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "3694:6:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "updated_pos", - "nodeType": "YulTypedName", - "src": "3705:11:2", - "type": "" - } - ], - "src": "3621:169:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "3840:261:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3850:25:2", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "3873:1:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "3855:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "3855:20:2" - }, - "variableNames": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "3850:1:2" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "3884:25:2", - "value": { - "arguments": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "3907:1:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "3889:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "3889:20:2" - }, - "variableNames": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "3884:1:2" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4047:22:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x11", - "nodeType": "YulIdentifier", - "src": "4049:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "4049:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4049:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "3968:1:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3975:66:2", - "type": "", - "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "4043:1:2" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "3971:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "3971:74:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "3965:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "3965:81:2" - }, - "nodeType": "YulIf", - "src": "3962:2:2" - }, - { - "nodeType": "YulAssignment", - "src": "4079:16:2", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "4090:1:2" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "4093:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4086:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4086:9:2" - }, - "variableNames": [ - { - "name": "sum", - "nodeType": "YulIdentifier", - "src": "4079:3:2" - } - ] - } - ] - }, - "name": "checked_add_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "x", - "nodeType": "YulTypedName", - "src": "3827:1:2", - "type": "" - }, - { - "name": "y", - "nodeType": "YulTypedName", - "src": "3830:1:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "sum", - "nodeType": "YulTypedName", - "src": "3836:3:2", - "type": "" - } - ], - "src": "3796:305:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4152:32:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4162:16:2", - "value": { - "name": "value", - "nodeType": "YulIdentifier", - "src": "4173:5:2" - }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "4162:7:2" - } - ] - } - ] - }, - "name": "cleanup_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "4134:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "4144:7:2", - "type": "" - } - ], - "src": "4107:77:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4241:103:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4264:3:2" - }, - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "4269:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4274:6:2" - } - ], - "functionName": { - "name": "calldatacopy", - "nodeType": "YulIdentifier", - "src": "4251:12:2" - }, - "nodeType": "YulFunctionCall", - "src": "4251:30:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4251:30:2" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4322:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4327:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4318:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4318:16:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4336:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4311:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4311:27:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4311:27:2" - } - ] - }, - "name": "copy_calldata_to_memory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "4223:3:2", - "type": "" - }, - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "4228:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "4233:6:2", - "type": "" - } - ], - "src": "4190:154:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4399:258:2", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "4409:10:2", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4418:1:2", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "i", - "nodeType": "YulTypedName", - "src": "4413:1:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4478:63:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4503:3:2" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4508:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4499:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4499:11:2" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "4522:3:2" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4527:1:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4518:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4518:11:2" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "4512:5:2" - }, - "nodeType": "YulFunctionCall", - "src": "4512:18:2" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4492:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4492:39:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4492:39:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4439:1:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4442:6:2" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "4436:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4436:13:2" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "4450:19:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4452:15:2", - "value": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4461:1:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4464:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4457:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4457:10:2" - }, - "variableNames": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4452:1:2" - } - ] - } - ] - }, - "pre": { - "nodeType": "YulBlock", - "src": "4432:3:2", - "statements": [] - }, - "src": "4428:113:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4575:76:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "4625:3:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4630:6:2" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "4621:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4621:16:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4639:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "4614:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4614:27:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4614:27:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "4556:1:2" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4559:6:2" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "4553:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4553:13:2" - }, - "nodeType": "YulIf", - "src": "4550:2:2" - } - ] - }, - "name": "copy_memory_to_memory", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "4381:3:2", - "type": "" - }, - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "4386:3:2", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "4391:6:2", - "type": "" - } - ], - "src": "4350:307:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4714:269:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4724:22:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "4738:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4744:1:2", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "4734:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4734:12:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4724:6:2" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "4755:38:2", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "4785:4:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4791:1:2", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "4781:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4781:12:2" - }, - "variables": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulTypedName", - "src": "4759:18:2", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4832:51:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "4846:27:2", - "value": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4860:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4868:4:2", - "type": "", - "value": "0x7f" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "4856:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "4856:17:2" - }, - "variableNames": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4846:6:2" - } - ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "4812:18:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "4805:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "4805:26:2" - }, - "nodeType": "YulIf", - "src": "4802:2:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "4935:42:2", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x22", - "nodeType": "YulIdentifier", - "src": "4949:16:2" - }, - "nodeType": "YulFunctionCall", - "src": "4949:18:2" - }, - "nodeType": "YulExpressionStatement", - "src": "4949:18:2" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "4899:18:2" - }, - { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "4922:6:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "4930:2:2", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "4919:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4919:14:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "4896:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "4896:38:2" - }, - "nodeType": "YulIf", - "src": "4893:2:2" - } - ] - }, - "name": "extract_byte_array_length", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "data", - "nodeType": "YulTypedName", - "src": "4698:4:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "4707:6:2", - "type": "" - } - ], - "src": "4663:320:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5017:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5034:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5037:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5027:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5027:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5027:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5131:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5134:4:2", - "type": "", - "value": "0x11" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5124:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5124:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5124:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5155:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5158:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5148:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5148:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5148:15:2" - } - ] - }, - "name": "panic_error_0x11", - "nodeType": "YulFunctionDefinition", - "src": "4989:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5203:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5220:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5223:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5213:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5213:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5213:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5317:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5320:4:2", - "type": "", - "value": "0x22" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5310:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5310:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5310:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5341:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5344:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5334:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5334:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5334:15:2" - } - ] - }, - "name": "panic_error_0x22", - "nodeType": "YulFunctionDefinition", - "src": "5175:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5389:152:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5406:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5409:77:2", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5399:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5399:88:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5399:88:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5503:1:2", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5506:4:2", - "type": "", - "value": "0x41" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "5496:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5496:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5496:15:2" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5527:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5530:4:2", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5520:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5520:15:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5520:15:2" - } - ] - }, - "name": "panic_error_0x41", - "nodeType": "YulFunctionDefinition", - "src": "5361:180:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5595:54:2", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "5605:38:2", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "5623:5:2" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5630:2:2", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "5619:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5619:14:2" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5639:2:2", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "5635:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5635:7:2" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "5615:3:2" - }, - "nodeType": "YulFunctionCall", - "src": "5615:28:2" - }, - "variableNames": [ - { - "name": "result", - "nodeType": "YulIdentifier", - "src": "5605:6:2" - } - ] - } - ] - }, - "name": "round_up_to_mul_of_32", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "5578:5:2", - "type": "" - } - ], - "returnVariables": [ - { - "name": "result", - "nodeType": "YulTypedName", - "src": "5588:6:2", - "type": "" - } - ], - "src": "5547:102:2" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "5698:79:2", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "5755:16:2", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5764:1:2", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "5767:1:2", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "5757:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5757:12:2" - }, - "nodeType": "YulExpressionStatement", - "src": "5757:12:2" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "5721:5:2" - }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "5746:5:2" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "5728:17:2" - }, - "nodeType": "YulFunctionCall", - "src": "5728:24:2" - } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "5718:2:2" - }, - "nodeType": "YulFunctionCall", - "src": "5718:35:2" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "5711:6:2" - }, - "nodeType": "YulFunctionCall", - "src": "5711:43:2" - }, - "nodeType": "YulIf", - "src": "5708:2:2" - } - ] - }, - "name": "validator_revert_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "5691:5:2", - "type": "" - } - ], - "src": "5655:122:2" - } - ] - }, - "contents": "{\n\n function abi_decode_available_length_t_string_memory_ptr(src, length, end) -> array {\n array := allocateMemory(array_allocation_size_t_string_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert(0, 0) }\n copy_calldata_to_memory(src, dst, length)\n }\n\n // string\n function abi_decode_t_string_memory_ptr(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n let length := calldataload(offset)\n array := abi_decode_available_length_t_string_memory_ptr(add(offset, 0x20), length, end)\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_string_memory_ptr(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := calldataload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n\n value0 := abi_decode_t_string_memory_ptr(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 27)\n\n mstore(add(pos, 0), \"Value must be diferent of 0\")\n\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function allocateMemory(size) -> memPtr {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, size)\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function array_allocation_size_t_string_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n // round up\n size := and(add(length, 0x1f), not(0x1f))\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function copy_calldata_to_memory(src, dst, length) {\n calldatacopy(dst, src, length)\n // clear end\n mstore(add(dst, length), 0)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n", - "id": 2, - "language": "Yul", - "name": "#utility.yul" - } - ], - "sourceMap": "439:671:0:-:0;;;463:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;439:671;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:320:2:-;;88:1;82:4;78:12;68:22;;135:1;129:4;125:12;156:18;146:2;;212:4;204:6;200:17;190:27;;146:2;274;266:6;263:14;243:18;240:38;237:2;;;293:18;;:::i;:::-;237:2;58:269;;;;:::o;333:180::-;381:77;378:1;371:88;478:4;475:1;468:15;502:4;499:1;492:15;439:671:0;;;;;;;", - "deployedSourceMap": "439:671:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;666:81;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;751:109;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;864:103;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;971:137;;;:::i;:::-;;573:89;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;666:81;706:13;738:4;731:11;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;666:81;:::o;751:109::-;811:13;843:5;849;843:12;;;;;;;;;;;;;;;;;;;;;;;836:19;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;751:109;;;:::o;864:103::-;928:7;921:4;:14;;;;;;;;;;;;:::i;:::-;;943:5;954:7;943:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;864:103;:::o;971:137::-;1031:1;1019:9;:13;1011:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;1094:9;1070:8;:20;1079:10;1070:20;;;;;;;;;;;;;;;;:33;;;;;;;:::i;:::-;;;;;;;;971:137::o;573:89::-;615:13;636:21;;;;;;;;;;;;;;;;;;;573:89;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:344:2:-;;110:65;125:49;167:6;125:49;:::i;:::-;110:65;:::i;:::-;101:74;;198:6;191:5;184:21;236:4;229:5;225:16;274:3;265:6;260:3;256:16;253:25;250:2;;;291:1;288;281:12;250:2;304:41;338:6;333:3;328;304:41;:::i;:::-;91:260;;;;;;:::o;371:273::-;;476:3;469:4;461:6;457:17;453:27;443:2;;494:1;491;484:12;443:2;534:6;521:20;559:79;634:3;626:6;619:4;611:6;607:17;559:79;:::i;:::-;550:88;;433:211;;;;;:::o;650:139::-;;734:6;721:20;712:29;;750:33;777:5;750:33;:::i;:::-;702:87;;;;:::o;795:375::-;;913:2;901:9;892:7;888:23;884:32;881:2;;;929:1;926;919:12;881:2;1000:1;989:9;985:17;972:31;1030:18;1022:6;1019:30;1016:2;;;1062:1;1059;1052:12;1016:2;1090:63;1145:7;1136:6;1125:9;1121:22;1090:63;:::i;:::-;1080:73;;943:220;871:299;;;;:::o;1176:262::-;;1284:2;1272:9;1263:7;1259:23;1255:32;1252:2;;;1300:1;1297;1290:12;1252:2;1343:1;1368:53;1413:7;1404:6;1393:9;1389:22;1368:53;:::i;:::-;1358:63;;1314:117;1242:196;;;;:::o;1444:364::-;;1560:39;1593:5;1560:39;:::i;:::-;1615:71;1679:6;1674:3;1615:71;:::i;:::-;1608:78;;1695:52;1740:6;1735:3;1728:4;1721:5;1717:16;1695:52;:::i;:::-;1772:29;1794:6;1772:29;:::i;:::-;1767:3;1763:39;1756:46;;1536:272;;;;;:::o;1814:325::-;;1977:67;2041:2;2036:3;1977:67;:::i;:::-;1970:74;;2074:29;2070:1;2065:3;2061:11;2054:50;2130:2;2125:3;2121:12;2114:19;;1960:179;;;:::o;2145:313::-;;2296:2;2285:9;2281:18;2273:26;;2345:9;2339:4;2335:20;2331:1;2320:9;2316:17;2309:47;2373:78;2446:4;2437:6;2373:78;:::i;:::-;2365:86;;2263:195;;;;:::o;2464:419::-;;2668:2;2657:9;2653:18;2645:26;;2717:9;2711:4;2707:20;2703:1;2692:9;2688:17;2681:47;2745:131;2871:4;2745:131;:::i;:::-;2737:139;;2635:248;;;:::o;2889:283::-;;2955:2;2949:9;2939:19;;2997:4;2989:6;2985:17;3104:6;3092:10;3089:22;3068:18;3056:10;3053:34;3050:62;3047:2;;;3115:18;;:::i;:::-;3047:2;3155:10;3151:2;3144:22;2929:243;;;;:::o;3178:332::-;;3330:18;3322:6;3319:30;3316:2;;;3352:18;;:::i;:::-;3316:2;3437:4;3433:9;3426:4;3418:6;3414:17;3410:33;3402:41;;3498:4;3492;3488:15;3480:23;;3245:265;;;:::o;3516:99::-;;3602:5;3596:12;3586:22;;3575:40;;;:::o;3621:169::-;;3739:6;3734:3;3727:19;3779:4;3774:3;3770:14;3755:29;;3717:73;;;;:::o;3796:305::-;;3855:20;3873:1;3855:20;:::i;:::-;3850:25;;3889:20;3907:1;3889:20;:::i;:::-;3884:25;;4043:1;3975:66;3971:74;3968:1;3965:81;3962:2;;;4049:18;;:::i;:::-;3962:2;4093:1;4090;4086:9;4079:16;;3840:261;;;;:::o;4107:77::-;;4173:5;4162:16;;4152:32;;;:::o;4190:154::-;4274:6;4269:3;4264;4251:30;4336:1;4327:6;4322:3;4318:16;4311:27;4241:103;;;:::o;4350:307::-;4418:1;4428:113;4442:6;4439:1;4436:13;4428:113;;;4527:1;4522:3;4518:11;4512:18;4508:1;4503:3;4499:11;4492:39;4464:2;4461:1;4457:10;4452:15;;4428:113;;;4559:6;4556:1;4553:13;4550:2;;;4639:1;4630:6;4625:3;4621:16;4614:27;4550:2;4399:258;;;;:::o;4663:320::-;;4744:1;4738:4;4734:12;4724:22;;4791:1;4785:4;4781:12;4812:18;4802:2;;4868:4;4860:6;4856:17;4846:27;;4802:2;4930;4922:6;4919:14;4899:18;4896:38;4893:2;;;4949:18;;:::i;:::-;4893:2;4714:269;;;;:::o;4989:180::-;5037:77;5034:1;5027:88;5134:4;5131:1;5124:15;5158:4;5155:1;5148:15;5175:180;5223:77;5220:1;5213:88;5320:4;5317:1;5310:15;5344:4;5341:1;5334:15;5361:180;5409:77;5406:1;5399:88;5506:4;5503:1;5496:15;5530:4;5527:1;5520:15;5547:102;;5639:2;5635:7;5630:2;5623:5;5619:14;5615:28;5605:38;;5595:54;;;:::o;5655:122::-;5728:24;5746:5;5728:24;:::i;:::-;5721:5;5718:35;5708:2;;5767:1;5764;5757:12;5708:2;5698:79;:::o", - "source": "// *****************************************************************************\n// IMPORTANT: If you update this code then make sure to recompile\n// it and update the .json file as well so that they\n// remain in sync for consistent test executions.\n// With that said, there shouldn't be any reason to recompile this, like ever...\n// *****************************************************************************\n\npragma solidity >=0.7.0;\n\ncontract HelloWorld {\n string private name = \"CaptainCactus\";\n mapping (address => uint256) deposits;\n string[] private names; \n\n function sayHello () public pure returns (string memory) {\n return 'Hello World!';\n }\n\n function getName() public view returns (string memory)\n {\n return name;\n }\n\n function getNameByIndex(uint256 index) public view returns (string memory)\n {\n return names[index];\n }\n\n function setName(string memory newName) public\n {\n name = newName;\n names.push(newName);\n }\n\n function deposit() public payable {\n require(msg.value > 0, \"Value must be diferent of 0\");\n deposits[msg.sender] += msg.value;\n }\n}\n", - "sourcePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", - "ast": { - "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", - "exportedSymbols": { - "HelloWorld": [ - 76 - ] - }, - "id": 77, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 76, - "linearizedBaseContracts": [ - 76 - ], - "name": "HelloWorld", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "463:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "463:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "hexValue": "4361707461696e436163747573", - "id": 3, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:15:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", - "typeString": "literal_string \"CaptainCactus\"" - }, - "value": "CaptainCactus" - }, - "visibility": "private" - }, - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "deposits", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "504:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7, - "keyType": { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "513:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "504:28:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "524:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "names", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "545:22:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "545:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 10, - "nodeType": "ArrayTypeName", - "src": "545:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "visibility": "private" - }, - { - "body": { - "id": 18, - "nodeType": "Block", - "src": "630:32:0", - "statements": [ - { - "expression": { - "hexValue": "48656c6c6f20576f726c6421", - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "643:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", - "typeString": "literal_string \"Hello World!\"" - }, - "value": "Hello World!" - }, - "functionReturnParameters": 15, - "id": 17, - "nodeType": "Return", - "src": "636:21:0" - } - ] - }, - "functionSelector": "ef5fb05b", - "id": 19, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sayHello", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12, - "nodeType": "ParameterList", - "parameters": [], - "src": "591:2:0" - }, - "returnParameters": { - "id": 15, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19, - "src": "615:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "615:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "614:15:0" - }, - "scope": 76, - "src": "573:89:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 26, - "nodeType": "Block", - "src": "723:24:0", - "statements": [ - { - "expression": { - "id": 24, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "738:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 23, - "id": 25, - "nodeType": "Return", - "src": "731:11:0" - } - ] - }, - "functionSelector": "17d7de7c", - "id": 27, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 20, - "nodeType": "ParameterList", - "parameters": [], - "src": "682:2:0" - }, - "returnParameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "706:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "706:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "705:15:0" - }, - "scope": 76, - "src": "666:81:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 38, - "nodeType": "Block", - "src": "828:32:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 34, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "843:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 36, - "indexExpression": { - "id": 35, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "849:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "843:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 33, - "id": 37, - "nodeType": "Return", - "src": "836:19:0" - } - ] - }, - "functionSelector": "59c293f1", - "id": 39, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNameByIndex", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 30, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "775:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "775:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "774:15:0" - }, - "returnParameters": { - "id": 33, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "811:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "811:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "810:15:0" - }, - "scope": 76, - "src": "751:109:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "913:54:0", - "statements": [ - { - "expression": { - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 44, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "921:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 45, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "928:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "921:14:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 47, - "nodeType": "ExpressionStatement", - "src": "921:14:0" - }, - { - "expression": { - "arguments": [ - { - "id": 51, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "954:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "id": 48, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "943:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "src": "943:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", - "typeString": "function (string storage ref)" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "943:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 53, - "nodeType": "ExpressionStatement", - "src": "943:19:0" - } - ] - }, - "functionSelector": "c47f0027", - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 42, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 41, - "mutability": "mutable", - "name": "newName", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "881:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 40, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "881:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "880:23:0" - }, - "returnParameters": { - "id": 43, - "nodeType": "ParameterList", - "parameters": [], - "src": "913:0:0" - }, - "scope": 76, - "src": "864:103:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 74, - "nodeType": "Block", - "src": "1005:103:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 59, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1019:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1019:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 61, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1031:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1019:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "56616c7565206d757374206265206469666572656e74206f662030", - "id": 63, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1034:29:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - }, - "value": "Value must be diferent of 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - } - ], - "id": 58, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1011:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1011:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "1011:53:0" - }, - { - "expression": { - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 66, - "name": "deposits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "1070:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 69, - "indexExpression": { - "expression": { - "id": 67, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1079:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1079:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1070:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "expression": { - "id": 70, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1094:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1094:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1070:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 73, - "nodeType": "ExpressionStatement", - "src": "1070:33:0" - } - ] - }, - "functionSelector": "d0e30db0", - "id": 75, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [], - "src": "987:2:0" - }, - "returnParameters": { - "id": 57, - "nodeType": "ParameterList", - "parameters": [], - "src": "1005:0:0" - }, - "scope": 76, - "src": "971:137:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 77, - "src": "439:671:0" - } - ], - "src": "413:698:0" - }, - "legacyAST": { - "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", - "exportedSymbols": { - "HelloWorld": [ - 76 - ] - }, - "id": 77, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 76, - "linearizedBaseContracts": [ - 76 - ], - "name": "HelloWorld", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "463:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "463:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "hexValue": "4361707461696e436163747573", - "id": 3, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:15:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", - "typeString": "literal_string \"CaptainCactus\"" - }, - "value": "CaptainCactus" - }, - "visibility": "private" - }, - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "deposits", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "504:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 7, - "keyType": { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "513:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "504:28:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "524:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "names", - "nodeType": "VariableDeclaration", - "scope": 76, - "src": "545:22:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string[]" - }, - "typeName": { - "baseType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "545:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "id": 10, - "nodeType": "ArrayTypeName", - "src": "545:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", - "typeString": "string[]" - } - }, - "visibility": "private" - }, - { - "body": { - "id": 18, - "nodeType": "Block", - "src": "630:32:0", - "statements": [ - { - "expression": { - "hexValue": "48656c6c6f20576f726c6421", - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "643:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", - "typeString": "literal_string \"Hello World!\"" - }, - "value": "Hello World!" - }, - "functionReturnParameters": 15, - "id": 17, - "nodeType": "Return", - "src": "636:21:0" - } - ] - }, - "functionSelector": "ef5fb05b", - "id": 19, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sayHello", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 12, - "nodeType": "ParameterList", - "parameters": [], - "src": "591:2:0" - }, - "returnParameters": { - "id": 15, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 19, - "src": "615:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 13, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "615:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "614:15:0" - }, - "scope": 76, - "src": "573:89:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 26, - "nodeType": "Block", - "src": "723:24:0", - "statements": [ - { - "expression": { - "id": 24, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "738:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 23, - "id": 25, - "nodeType": "Return", - "src": "731:11:0" - } - ] - }, - "functionSelector": "17d7de7c", - "id": 27, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 20, - "nodeType": "ParameterList", - "parameters": [], - "src": "682:2:0" - }, - "returnParameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "706:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "706:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "705:15:0" - }, - "scope": 76, - "src": "666:81:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 38, - "nodeType": "Block", - "src": "828:32:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 34, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "843:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 36, - "indexExpression": { - "id": 35, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "849:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "843:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 33, - "id": 37, - "nodeType": "Return", - "src": "836:19:0" - } - ] - }, - "functionSelector": "59c293f1", - "id": 39, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNameByIndex", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 30, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "775:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "775:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "774:15:0" - }, - "returnParameters": { - "id": 33, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 39, - "src": "811:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "811:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "810:15:0" - }, - "scope": 76, - "src": "751:109:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "913:54:0", - "statements": [ - { - "expression": { - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 44, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "921:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 45, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "928:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "921:14:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 47, - "nodeType": "ExpressionStatement", - "src": "921:14:0" - }, - { - "expression": { - "arguments": [ - { - "id": 51, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "954:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "id": 48, - "name": "names", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "943:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", - "typeString": "string storage ref[] storage ref" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "src": "943:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", - "typeString": "function (string storage ref)" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "943:19:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 53, - "nodeType": "ExpressionStatement", - "src": "943:19:0" - } - ] - }, - "functionSelector": "c47f0027", - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 42, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 41, - "mutability": "mutable", - "name": "newName", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "881:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 40, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "881:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "880:23:0" - }, - "returnParameters": { - "id": 43, - "nodeType": "ParameterList", - "parameters": [], - "src": "913:0:0" - }, - "scope": 76, - "src": "864:103:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 74, - "nodeType": "Block", - "src": "1005:103:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 59, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1019:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1019:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 61, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1031:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1019:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "56616c7565206d757374206265206469666572656e74206f662030", - "id": 63, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1034:29:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - }, - "value": "Value must be diferent of 0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", - "typeString": "literal_string \"Value must be diferent of 0\"" - } - ], - "id": 58, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1011:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1011:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "1011:53:0" - }, - { - "expression": { - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 66, - "name": "deposits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "1070:8:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 69, - "indexExpression": { - "expression": { - "id": 67, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1079:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1079:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1070:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "expression": { - "id": 70, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1094:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1094:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1070:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 73, - "nodeType": "ExpressionStatement", - "src": "1070:33:0" - } - ] - }, - "functionSelector": "d0e30db0", - "id": 75, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [], - "src": "987:2:0" - }, - "returnParameters": { - "id": 57, - "nodeType": "ParameterList", - "parameters": [], - "src": "1005:0:0" - }, - "scope": 76, - "src": "971:137:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 77, - "src": "439:671:0" - } - ], - "src": "413:698:0" - }, - "compiler": { - "name": "solc", - "version": "0.8.0+commit.c7dfd78e.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.3.3", - "updatedAt": "2021-02-12T11:15:58.676Z", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol b/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol deleted file mode 100644 index 30bc8f7134..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol +++ /dev/null @@ -1,40 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; - -contract HelloWorld { - string private name = "CaptainCactus"; - mapping (address => uint256) deposits; - string[] private names; - - function sayHello () public pure returns (string memory) { - return 'Hello World!'; - } - - function getName() public view returns (string memory) - { - return name; - } - - function getNameByIndex(uint256 index) public view returns (string memory) - { - return names[index]; - } - - function setName(string memory newName) public - { - name = newName; - names.push(newName); - } - - function deposit() public payable { - require(msg.value > 0, "Value must be diferent of 0"); - deposits[msg.sender] += msg.value; - } - -} diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/api-client/verifier-integration-with-besu-connector.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/api-client/verifier-integration-with-besu-connector.test.ts deleted file mode 100644 index 50afcda617..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/api-client/verifier-integration-with-besu-connector.test.ts +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright 2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -// Besu setup code based on: -// packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; -const containerImageName = "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; -const containerImageVersion = "2021-08-24--feat-1244"; - -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - ReceiptType, - BesuApiClient, - WatchBlocksV1Progress, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - Logger, - LoggerProvider, - LogLevelDesc, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import Web3 from "web3"; -import { Account } from "web3-core"; -import { Constants } from "@hyperledger/cactus-core-api"; -import express from "express"; -import http from "http"; -import { AddressInfo } from "net"; -import { BesuApiClientOptions } from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - Verifier, - IVerifierEventListener, - LedgerEvent, -} from "@hyperledger/cactus-verifier-client"; - -// Unit Test logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "verifier-integration-with-openapi-connectors.test", - level: testLogLevel, -}); -log.info("Test started"); - -describe("Verifier integration with besu connector tests", () => { - let besuTestLedger: BesuTestLedger; - let server: http.Server; - let connector: PluginLedgerConnectorBesu; - let apiClient: BesuApiClient; - let sourceEthAccountPubKey: string; - let sourceEthAccountPrivKey: { privateKey: string }; - let targetEthAccount: Account; - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - log.info("Start BesuTestLedger..."); - log.debug("Besu image:", containerImageName); - log.debug("Besu version:", containerImageVersion); - besuTestLedger = new BesuTestLedger({ - containerImageName, - containerImageVersion, - }); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - log.debug("rpcApiHttpHost:", rpcApiHttpHost); - log.debug("rpcApiWsHost:", rpcApiWsHost); - - // Source account - genesis account - sourceEthAccountPubKey = besuTestLedger.getGenesisAccountPubKey(); - sourceEthAccountPrivKey = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - // Target account - create new - const web3 = new Web3(rpcApiHttpHost); - targetEthAccount = web3.eth.accounts.create(uuidv4()); - const keychainEntryKey = uuidv4(); - const keychainEntryValue = targetEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel: sutLogLevel, - }); - - log.info("Create PluginLedgerConnectorBesu..."); - connector = new PluginLedgerConnectorBesu({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel: sutLogLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - log.info("Start HTTP and WS servers..."); - const expressApp = express(); - expressApp.use(express.json({ limit: "250mb" })); - server = http.createServer(expressApp); - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - log.info( - `Metrics URL: ${apiHost}/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/get-prometheus-exporter-metrics`, - ); - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - - log.info("Create BesuApiClientOptions..."); - const besuApiClientOptions = new BesuApiClientOptions({ - basePath: apiHost, - }); - apiClient = new BesuApiClient(besuApiClientOptions); - }); - - afterAll(async () => { - log.info("Shutdown the server..."); - if (server) { - await Servers.shutdown(server); - } - log.info("Stop and destroy the test ledger..."); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - log.info("Prune docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }); - - ////////////////////////////////// - // Functional Tests - ////////////////////////////////// - - test("Verifier is constructed on BesuApiClient", async () => { - const sut = new Verifier("BESU_2X", apiClient, sutLogLevel); - expect(sut.ledgerApi).toBe(apiClient); - }); - - function sendTransactionOnBesuLedger() { - return connector.transact({ - web3SigningCredential: { - ethAccount: sourceEthAccountPubKey, - secret: sourceEthAccountPrivKey.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - transactionConfig: { - from: sourceEthAccountPubKey, - to: targetEthAccount.address, - value: 10e9, - gas: 1000000, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - timeoutMs: 10000, - }, - }); - } - - test("Sanity check that BesuApiClient watchBlocksV1 works", async () => { - const newBlock = new Promise((resolve, reject) => { - const subscription = apiClient - .watchBlocksV1() - .subscribe((res: WatchBlocksV1Progress) => { - log.debug("Received block number", res.blockHeader.number); - if (!res.blockHeader) { - reject("Empty block received"); - } - subscription.unsubscribe(); - resolve(res); - }); - }); - - await sendTransactionOnBesuLedger(); - return expect(newBlock).toResolve(); - }); - - test("Verifier works with BesuApiClient", () => { - const newBlock = new Promise((resolve, reject) => { - const appId = "testMonitor"; - const sut = new Verifier("BESU_2X", apiClient, sutLogLevel); - - const monitor: IVerifierEventListener = { - onEvent(ledgerEvent: LedgerEvent): void { - try { - log.info("Received event:", ledgerEvent); - - if (!ledgerEvent.data) { - throw Error("No block data"); - } - log.info( - "Listener received ledgerEvent, block number", - ledgerEvent.data.blockHeader.number, - ); - sut.stopMonitor(appId); - resolve(ledgerEvent.data); - } catch (err) { - reject(err); - } - }, - onError(err: any): void { - log.error("Ledger monitoring error:", err); - reject(err); - }, - }; - - sut.startMonitor(appId, {}, monitor); - }); - - return sendTransactionOnBesuLedger().then(() => - expect(newBlock).not.toReject(), - ); - }); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/grpc-services/connector-besu-grpc-services.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/grpc-services/connector-besu-grpc-services.test.ts deleted file mode 100644 index e995cb0b6a..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/grpc-services/connector-besu-grpc-services.test.ts +++ /dev/null @@ -1,279 +0,0 @@ -import http from "http"; -import { AddressInfo } from "node:net"; - -import "jest-extended"; -import * as grpc from "@grpc/grpc-js"; -import { v4 as uuidv4 } from "uuid"; -import Web3 from "web3"; -import { Account } from "web3-core"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Servers, - isGrpcStatusObjectWithCode, -} from "@hyperledger/cactus-common"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - PluginLedgerConnectorBesu, - createGrpcInsecureChannelCredentials, - besu_grpc_svc_streams, - default_service, - get_block_v1_request_pb, - get_block_v1_response_pb, - google_protobuf_any, - watch_blocks_v1_progress_pb, - watch_blocks_v1_request_pb, - watch_blocks_v1_pb, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, - createGrpcServer, -} from "@hyperledger/cactus-cmd-api-server"; - -const logLevel: LogLevelDesc = "INFO"; - -type WatchBlocksV1ProgressPB = - watch_blocks_v1_progress_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1ProgressPB; - -describe("BesuGrpcSvcOpenApi", () => { - const log: Logger = LoggerProvider.getOrCreate({ - label: "plugin-ledger-connector-besu-grpc-service-test", - level: logLevel, - }); - - let ledger: BesuTestLedger; - let httpServer: http.Server; - let grpcServer: grpc.Server; - let connector: PluginLedgerConnectorBesu; - let grpcClientDefaultSvc: default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultServiceClient; - let grpcClientBesuSvc: besu_grpc_svc_streams.org.hyperledger.cacti.plugin.ledger.connector.besu.services.besuservice.BesuGrpcSvcStreamsClient; - let targetEthAccount: Account; - let apiServer: ApiServer; - let addressInfo: AddressInfo; - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel }); - - log.info("Start BesuTestLedger..."); - ledger = new BesuTestLedger({}); - await ledger.start(); - - grpcServer = createGrpcServer(); - - httpServer = await Servers.startOnPreferredPort(4050); - addressInfo = httpServer.address() as AddressInfo; - const apiHttpHost = `http://${addressInfo.address}:${addressInfo.port}`; - log.debug("HTTP API host: %s", apiHttpHost); - - const rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - const rpcApiWsHost = await ledger.getRpcApiWsHost(); - log.debug("rpcApiHttpHost:", rpcApiHttpHost); - log.debug("rpcApiWsHost:", rpcApiWsHost); - - // Target account - create new - const web3 = new Web3(rpcApiHttpHost); - targetEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = targetEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - - log.debug("Instantiating PluginLedgerConnectorBesu..."); - - connector = new PluginLedgerConnectorBesu({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [] }); - - const cfgSrv = new ConfigService(); - const apiSrvOpts = await cfgSrv.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.logLevel = logLevel; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = addressInfo.port; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.grpcMtlsEnabled = false; - apiSrvOpts.apiTlsEnabled = false; - const cfg = await cfgSrv.newExampleConfigConvict(apiSrvOpts); - - pluginRegistry.add(keychainPlugin); - pluginRegistry.add(connector); - - apiServer = new ApiServer({ - httpServerApi: httpServer, - grpcServer, - config: cfg.getProperties(), - pluginRegistry, - }); - - const { addressInfoGrpc } = await apiServer.start(); - const grpcPort = addressInfoGrpc.port; - const grpcHost = addressInfoGrpc.address; - const grpcFamily = addressInfo.family; - log.info("gRPC family=%s host=%s port=%s", grpcFamily, grpcHost, grpcPort); - - const grpcChannelCredentials = createGrpcInsecureChannelCredentials(); - const grpcUrl = `${grpcHost}:${grpcPort}`; - grpcClientDefaultSvc = - new default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.DefaultServiceClient( - grpcUrl, - grpcChannelCredentials, - { - "grpc-node.tls_enable_trace": 1, - }, - ); - - grpcClientBesuSvc = - new besu_grpc_svc_streams.org.hyperledger.cacti.plugin.ledger.connector.besu.services.besuservice.BesuGrpcSvcStreamsClient( - grpcUrl, - grpcChannelCredentials, - { - "grpc-node.tls_enable_trace": 1, - }, - ); - - log.debug("Created gRPC client OK."); - }); - - test("gRPC - getBlockV1() returns arbitrary ledger block", async () => { - const blockHashOrBlockNumberData = Buffer.from("latest", "utf-8"); - const blockHashOrBlockNumber = - new google_protobuf_any.google.protobuf.Any(); - - blockHashOrBlockNumber.value = blockHashOrBlockNumberData; - - const getBlockV1RequestPB = - new get_block_v1_request_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1RequestPB( - { blockHashOrBlockNumber }, - ); - - const req1 = - new default_service.org.hyperledger.cacti.plugin.ledger.connector.besu.services.defaultservice.GetBlockV1Request( - { getBlockV1RequestPB }, - ); - - const metadata1 = new grpc.Metadata(); - - const res1Promise = - new Promise( - (resolve, reject) => { - const call = grpcClientDefaultSvc.GetBlockV1( - req1, - metadata1, - ( - err: grpc.ServiceError | null, - value?: get_block_v1_response_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.GetBlockV1ResponsePB, - ) => { - log.debug("Received callback from gRPC service: ", err, value); - if (err) { - reject(err); - } else if (value) { - resolve(value); - } else { - reject(new Error("Received no gRPC error nor response value.")); - } - }, - ); - log.debug("gRPC call object: ", call); - expect(call).toBeTruthy(); - }, - ); - - expect(res1Promise).toResolve(); - const res1 = await res1Promise; - expect(res1).toBeTruthy(); - expect(res1).toBeObject(); - - const block = res1.block.toObject(); - expect(block).toBeTruthy(); - expect(block).toBeObject(); - expect(block).not.toBeEmptyObject(); - expect(block.number).toBeTruthy(); - expect(block.hash).toBeTruthy(); - expect(block.transactions).toBeArray(); - }); - - test("gRPC - watchBlocksV1() streams ledger blocks as they are created", async () => { - const reqMetadata = new grpc.Metadata(); - const stream = grpcClientBesuSvc.WatchBlocksV1(reqMetadata); - - const msgs: Array = []; - const MSG_COUNT_SUCCESS = 3; - - const streamDoneAsync = new Promise((resolve, reject) => { - stream.on("data", (chunk: WatchBlocksV1ProgressPB) => { - msgs.push(chunk); - log.debug("WatchBlocksV1::data=%o, msg.length=%o", chunk, msgs.length); - if (msgs.length >= MSG_COUNT_SUCCESS) { - const reqUnsubscribe = - new watch_blocks_v1_request_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1RequestPB(); - - reqUnsubscribe.event = - watch_blocks_v1_pb.org.hyperledger.cacti.plugin.ledger.connector.besu.WatchBlocksV1PB.WatchBlocksV1PB_Unsubscribe; - - stream.write(reqUnsubscribe); - } - }); - - stream.on("status", (status: unknown) => { - log.debug("WatchBlocksV1::status=%o", status); - if ( - isGrpcStatusObjectWithCode(status) && - status.code === grpc.status.OK - ) { - resolve(); - } else { - const statusJson = JSON.stringify(status); - reject(new Error(`Received non-OK grpc status code: ${statusJson}`)); - } - }); - - stream.on("error", (error: unknown) => { - log.debug("WatchBlocksV1::error=%o", error); - reject(error); - }); - - stream.on("close", () => { - log.debug("WatchBlocksV1::close="); - resolve(); - }); - }); - - await expect(streamDoneAsync).toResolve(); - }, 15000); - - afterAll(async () => { - if (apiServer) { - await apiServer.shutdown(); - } - await ledger.stop(); - await ledger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-balance-endpoint.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-balance-endpoint.test.ts deleted file mode 100644 index ea704c4328..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-balance-endpoint.test.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { createServer } from "node:http"; -import { AddressInfo } from "node:net"; - -Error.stackTraceLimit = 100; - -import "jest-extended"; - -import { StatusCodes } from "http-status-codes"; -import { v4 as uuidv4 } from "uuid"; -import KeyEncoder from "key-encoder"; -import { Account } from "web3-core"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - Secp256k1Keys, - KeyFormat, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - BesuTestLedger, - buildImageBesuAllInOneLatest, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - BesuApiClientOptions, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, - GetBalanceV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -describe("PluginLedgerConnectorBesu", () => { - const logLevel: LogLevelDesc = "INFO"; - const log = LoggerProvider.getOrCreate({ - label: "get-balance-endpoint.test.ts", - level: logLevel, - }); - - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainId = uuidv4(); - const keychainRef = uuidv4(); - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - const keychain = new PluginKeychainMemory({ - backend: new Map([[keychainRef, pem]]), - keychainId, - logLevel, - instanceId: uuidv4(), - }); - const pluginRegistry = new PluginRegistry({ plugins: [keychain] }); - const httpServer1 = createServer(); - - const expectedBalance = Math.ceil(Math.random() * Math.pow(10, 6)); - - let ledger: BesuTestLedger; - let apiServer: ApiServer; - let testAccount: Account; - let node1Host: string; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - - beforeAll(async () => { - const ledgerImg = await buildImageBesuAllInOneLatest({ logLevel }); - const { imageName, imageVersion } = ledgerImg; - ledger = new BesuTestLedger({ - containerImageName: imageName, - containerImageVersion: imageVersion, - logLevel, - }); - // we've built the image locally so trying to pull it would fail - const omitImagePullFromNetwork = true; - await ledger.start(omitImagePullFromNetwork); - }); - - beforeAll(async () => { - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - - const addressInfo1 = httpServer1.address() as AddressInfo; - log.debug(`HttpServer1 AddressInfo: ${JSON.stringify(addressInfo1)}`); - - node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - log.debug(`Cactus Node 1 Host: ${node1Host}`); - - testAccount = await ledger.createEthTestAccount(expectedBalance); - const rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - const rpcApiWsHost = await ledger.getRpcApiWsHost(); - - // 3. Instantiate the web service consortium plugin - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const pluginValidatorBesu = new PluginLedgerConnectorBesu(options); - - // 4. Create the API Server object that we embed in this test - const cfgSvc = new ConfigService(); - const apiSrvOpts = await cfgSvc.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = addressInfo1.port; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - const config = await cfgSvc.newExampleConfigConvict(apiSrvOpts); - - pluginRegistry.add(pluginValidatorBesu); - - apiServer = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer.start(); - log.debug(`AddressInfo: ${JSON.stringify(addressInfo1)}`); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - }); - - afterAll(async () => await apiServer.shutdown()); - - it("getBalanceV1() - retrieves ETH account balance", async () => { - const request: GetBalanceV1Request = { - address: testAccount.address, - }; - - const configuration = new BesuApiClientOptions({ basePath: node1Host }); - const api = new BesuApiClient(configuration); - - // Test for 200 valid response test case - const getBalanceExchange = api.getBalanceV1(request); - await expect(getBalanceExchange).resolves.toMatchObject({ - status: StatusCodes.OK, - data: expect.objectContaining({ - balance: expect.stringMatching(expectedBalance.toFixed(0)), - }), - }); - }); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-block-endpoint.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-block-endpoint.test.ts deleted file mode 100644 index 169a489910..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-block-endpoint.test.ts +++ /dev/null @@ -1,149 +0,0 @@ -import test, { Test } from "tape-promise/tape"; - -import { v4 as uuidv4 } from "uuid"; -import { createServer } from "http"; -import KeyEncoder from "key-encoder"; -import { AddressInfo } from "net"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - Secp256k1Keys, - KeyFormat, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - BesuApiClientOptions, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, - GetBlockV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -const testCase = "Test sign transaction endpoint"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainId = uuidv4(); - const keychainRef = uuidv4(); - - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - - const keychain = new PluginKeychainMemory({ - backend: new Map([[keychainRef, pem]]), - keychainId, - logLevel, - instanceId: uuidv4(), - }); - - const httpServer1 = createServer(); - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - const addressInfo1 = httpServer1.address() as AddressInfo; - t.comment(`HttpServer1 AddressInfo: ${JSON.stringify(addressInfo1)}`); - const node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - t.comment(`Cactus Node 1 Host: ${node1Host}`); - - const besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const tearDown = async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }; - - test.onFinish(tearDown); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - // 2. Instantiate plugin registry which will provide the web service plugin with the key value storage plugin - const pluginRegistry = new PluginRegistry({ plugins: [keychain] }); - - // 3. Instantiate the web service consortium plugin - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const pluginValidatorBesu = new PluginLedgerConnectorBesu(options); - - // 4. Create the API Server object that we embed in this test - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - const config = await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginValidatorBesu); - - const apiServer = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - // 5. make sure the API server is shut down when the testing if finished. - test.onFinish(() => apiServer.shutdown()); - - // 6. Start the API server which is now listening on port A and it's healthcheck works through the main SDK - await apiServer.start(); - - // 7. Instantiate the main SDK dynamically with whatever port the API server ended up bound to (port 0) - t.comment(`AddressInfo: ${JSON.stringify(addressInfo1)}`); - - const request: GetBlockV1Request = { - blockHashOrBlockNumber: 0, - }; - - const configuration = new BesuApiClientOptions({ basePath: node1Host }); - const api = new BesuApiClient(configuration); - - // Test for 200 valid response test case - const res = await api.getBlockV1(request); - - const { status, data } = res; - t.true(status >= 200, "status GTE 200 OK"); - t.true(status < 300, "status LT 300 OK"); - t.ok(data, "GetBlockResponse Truthy OK"); - t.true(typeof data.block === "object", "Response data is OK"); -}); - -test("AFTER " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-past-logs-endpoint.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-past-logs-endpoint.test.ts deleted file mode 100644 index 169265fe5a..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-past-logs-endpoint.test.ts +++ /dev/null @@ -1,174 +0,0 @@ -import test, { Test } from "tape-promise/tape"; - -import { v4 as uuidv4 } from "uuid"; -import { createServer } from "http"; -import KeyEncoder from "key-encoder"; -import { AddressInfo } from "net"; -import Web3 from "web3"; -import Web3JsQuorum, { IWeb3Quorum } from "web3js-quorum"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - Secp256k1Keys, - KeyFormat, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - BesuApiClientOptions, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, - GetPastLogsV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -const testCase = "API client can call getPastLogs via network"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainId = uuidv4(); - const keychainRef = uuidv4(); - - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - - const keychain = new PluginKeychainMemory({ - backend: new Map([[keychainRef, pem]]), - keychainId, - logLevel, - instanceId: uuidv4(), - }); - - const httpServer1 = createServer(); - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - const addressInfo1 = httpServer1.address() as AddressInfo; - t.comment(`HttpServer1 AddressInfo: ${JSON.stringify(addressInfo1)}`); - const node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - t.comment(`Cactus Node 1 Host: ${node1Host}`); - - const besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const tearDown = async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }; - - test.onFinish(tearDown); - const testAccount = await besuTestLedger.createEthTestAccount(); - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - // 2. Instantiate plugin registry which will provide the web service plugin with the key value storage plugin - const pluginRegistry = new PluginRegistry({ plugins: [keychain] }); - - // 3. Instantiate the web service consortium plugin - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const pluginValidatorBesu = new PluginLedgerConnectorBesu(options); - - // 4. Create the API Server object that we embed in this test - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - const config = await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginValidatorBesu); - - const apiServer = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - // 5. make sure the API server is shut down when the testing if finished. - test.onFinish(() => apiServer.shutdown()); - - // 6. Start the API server which is now listening on port A and it's healthcheck works through the main SDK - await apiServer.start(); - - // 7. Instantiate the main SDK dynamically with whatever port the API server ended up bound to (port 0) - t.comment(`AddressInfo: ${JSON.stringify(addressInfo1)}`); - - const web3Provider = new Web3.providers.HttpProvider(rpcApiHttpHost); - const web3 = new Web3(web3Provider); - const Web3Quorum: IWeb3Quorum = Web3JsQuorum(web3); - - const orionKeyPair = await besuTestLedger.getOrionKeyPair(); - const besuKeyPair = await besuTestLedger.getBesuKeyPair(); - - const besuPrivateKey = besuKeyPair.privateKey.toLowerCase().startsWith("0x") - ? besuKeyPair.privateKey.substring(2) - : besuKeyPair.privateKey; // besu node's private key - - const contractOptions = { - data: `0x123`, - // privateFrom : Orion public key of the sender. - privateFrom: orionKeyPair.publicKey, - // privateFor : Orion public keys of recipients or privacyGroupId: Privacy group to receive the transaction - privateFor: [orionKeyPair.publicKey], - // privateKey: Ethereum private key with which to sign the transaction. - privateKey: besuPrivateKey, - }; - - const transactionHash = - await Web3Quorum.priv.generateAndSendRawTransaction(contractOptions); - - await web3.eth.getTransaction(transactionHash); - - const request: GetPastLogsV1Request = { - address: testAccount.address, - }; - - const configuration = new BesuApiClientOptions({ basePath: node1Host }); - const api = new BesuApiClient(configuration); - - const res = await api.getPastLogsV1(request); - // const { } = res; - t.ok(res, "API response object is truthy"); - t.ok(res.data.logs, "Response.logs is truthy ok"); - t.true(Array.isArray(res.data.logs), "Response.logs is Array ok"); -}); - -test("AFTER " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-transaction-endpoint.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-transaction-endpoint.test.ts deleted file mode 100644 index 14e1b79d45..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-transaction-endpoint.test.ts +++ /dev/null @@ -1,179 +0,0 @@ -import test, { Test } from "tape-promise/tape"; - -import { v4 as uuidv4 } from "uuid"; -import { createServer } from "http"; -import KeyEncoder from "key-encoder"; -import { AddressInfo } from "net"; -import Web3 from "web3"; -import Web3JsQuorum, { IWeb3Quorum } from "web3js-quorum"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - Secp256k1Keys, - KeyFormat, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - BesuApiClientOptions, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, - GetTransactionV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -const testCase = "API client can call get-transaction via network"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainId = uuidv4(); - const keychainRef = uuidv4(); - - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - - const keychain = new PluginKeychainMemory({ - backend: new Map([[keychainRef, pem]]), - keychainId, - logLevel, - instanceId: uuidv4(), - }); - - const httpServer1 = createServer(); - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - const addressInfo1 = httpServer1.address() as AddressInfo; - t.comment(`HttpServer1 AddressInfo: ${JSON.stringify(addressInfo1)}`); - const node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - t.comment(`Cactus Node 1 Host: ${node1Host}`); - - const besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const tearDown = async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }; - - test.onFinish(tearDown); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - // 2. Instantiate plugin registry which will provide the web service plugin with the key value storage plugin - const pluginRegistry = new PluginRegistry({ plugins: [keychain] }); - - // 3. Instantiate the web service consortium plugin - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const pluginValidatorBesu = new PluginLedgerConnectorBesu(options); - - // 4. Create the API Server object that we embed in this test - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - const config = await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginValidatorBesu); - - const apiServer = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - // 5. make sure the API server is shut down when the testing if finished. - test.onFinish(() => apiServer.shutdown()); - - // 6. Start the API server which is now listening on port A and it's healthcheck works through the main SDK - await apiServer.start(); - - // 7. Instantiate the main SDK dynamically with whatever port the API server ended up bound to (port 0) - t.comment(`AddressInfo: ${JSON.stringify(addressInfo1)}`); - - const web3Provider = new Web3.providers.HttpProvider(rpcApiHttpHost); - const web3 = new Web3(web3Provider); - const web3JsQuorum: IWeb3Quorum = Web3JsQuorum(web3); - - const orionKeyPair = await besuTestLedger.getOrionKeyPair(); - const besuKeyPair = await besuTestLedger.getBesuKeyPair(); - - const besuPrivateKey = besuKeyPair.privateKey.toLowerCase().startsWith("0x") - ? besuKeyPair.privateKey.substring(2) - : besuKeyPair.privateKey; // besu node's private key - - const contractOptions = { - data: `0x123`, - // privateFrom : Orion public key of the sender. - privateFrom: orionKeyPair.publicKey, - // privateFor : Orion public keys of recipients or privacyGroupId: Privacy group to receive the transaction - privateFor: [orionKeyPair.publicKey], - // privateKey: Ethereum private key with which to sign the transaction. - privateKey: besuPrivateKey, - }; - - const transactionHash = - await web3JsQuorum.priv.generateAndSendRawTransaction(contractOptions); - - await web3.eth.getTransaction(transactionHash); - - const request: GetTransactionV1Request = { - transactionHash: transactionHash, - }; - - const configuration = new BesuApiClientOptions({ basePath: node1Host }); - const api = new BesuApiClient(configuration); - - // Test for 200 valid response test case - const res = await api.getTransactionV1(request); - - // const { } = res; - t.ok(res, "API response object is truthy"); - t.ok(res.data.transaction, "Transaction is truthy ok"); - t.true( - typeof res.data.transaction === "object", - "Response.transaction is OK", - ); -}); - -test("AFTER " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/sign-transaction-endpoint.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/sign-transaction-endpoint.test.ts deleted file mode 100644 index db85b1d7d5..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/sign-transaction-endpoint.test.ts +++ /dev/null @@ -1,188 +0,0 @@ -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { createServer } from "http"; -import KeyEncoder from "key-encoder"; -import { AddressInfo } from "net"; -import Web3 from "web3"; -import Web3JsQuorum, { IWeb3Quorum } from "web3js-quorum"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - JsObjectSigner, - IJsObjectSignerOptions, - Secp256k1Keys, - KeyFormat, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - BesuApiClientOptions, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, - SignTransactionRequest, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import axios from "axios"; - -const testCase = "Test sign transaction endpoint"; -const logLevel: LogLevelDesc = "TRACE"; - -describe(testCase, () => { - const besuTestLedger = new BesuTestLedger(); - let apiServer: ApiServer; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - await besuTestLedger.start(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await apiServer.shutdown(); - }); - - test(testCase, async () => { - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainId = uuidv4(); - const keychainRef = uuidv4(); - - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - - const keychain = new PluginKeychainMemory({ - backend: new Map([[keychainRef, pem]]), - keychainId, - logLevel, - instanceId: uuidv4(), - }); - - const httpServer1 = createServer(); - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - const addressInfo1 = httpServer1.address() as AddressInfo; - console.log(`HttpServer1 AddressInfo: ${JSON.stringify(addressInfo1)}`); - - const node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - console.log(`Cactus Node 1 Host: ${node1Host}`); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - const jsObjectSignerOptions: IJsObjectSignerOptions = { - privateKey: keyHex, - logLevel, - }; - const jsObjectSigner = new JsObjectSigner(jsObjectSignerOptions); - - const pluginRegistry = new PluginRegistry({ plugins: [keychain] }); - - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const pluginValidatorBesu = new PluginLedgerConnectorBesu(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.grpcPort = 0; - apiServerOptions.crpcPort = 0; - apiServerOptions.apiTlsEnabled = false; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginValidatorBesu); - - apiServer = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer.start(); - - console.log(`AddressInfo: ${JSON.stringify(addressInfo1)}`); - - const web3Provider = new Web3.providers.HttpProvider(rpcApiHttpHost); - const web3 = new Web3(web3Provider); - const web3JsQuorum: IWeb3Quorum = Web3JsQuorum(web3); - - const orionKeyPair = await besuTestLedger.getOrionKeyPair(); - const besuKeyPair = await besuTestLedger.getBesuKeyPair(); - - const besuPrivateKey = besuKeyPair.privateKey.toLowerCase().startsWith("0x") - ? besuKeyPair.privateKey.substring(2) - : besuKeyPair.privateKey; // besu node's private key - - const contractOptions = { - data: `0x123`, - // privateFrom : Orion public key of the sender. - privateFrom: orionKeyPair.publicKey, - // privateFor : Orion public keys of recipients or privacyGroupId: Privacy group to receive the transaction - privateFor: [orionKeyPair.publicKey], - // privateKey: Ethereum private key with which to sign the transaction. - privateKey: besuPrivateKey, - }; - - const transactionHash = - await web3JsQuorum.priv.generateAndSendRawTransaction(contractOptions); - - const transaction = await web3.eth.getTransaction(transactionHash); - const singData = jsObjectSigner.sign(transaction.input); - const signDataHex = Buffer.from(singData).toString("hex"); - - const request: SignTransactionRequest = { - keychainId, - keychainRef, - transactionHash: transactionHash, - }; - - const configuration = new BesuApiClientOptions({ basePath: node1Host }); - const api = new BesuApiClient(configuration); - - const res = await api.signTransactionV1(request); - expect(res).toBeTruthy(); - expect(signDataHex).toBe(res.data.signature); - - try { - const notFoundRequest: SignTransactionRequest = { - keychainId: "fake", - keychainRef: "fake", - transactionHash: - "0x46eac4d1d1ff81837698cbab38862a428ddf042f92855a72010de2771a7b704d", - }; - await api.signTransactionV1(notFoundRequest); - } catch (error: unknown) { - if (axios.isAxiosError(error)) { - expect(error.response?.status).toEqual(404); - expect(error.response?.statusText).toEqual("Transaction not found"); - } - } - }); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-balance-endpoint.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-balance-endpoint.test.ts deleted file mode 100644 index ef87fb08e3..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-balance-endpoint.test.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { createServer } from "node:http"; -import { AddressInfo } from "node:net"; - -Error.stackTraceLimit = 100; - -import "jest-extended"; - -import { StatusCodes } from "http-status-codes"; -import { v4 as uuidv4 } from "uuid"; -import KeyEncoder from "key-encoder"; -import { Account } from "web3-core"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - Secp256k1Keys, - KeyFormat, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - BesuApiClientOptions, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, - GetBalanceV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -describe("PluginLedgerConnectorBesu", () => { - const logLevel: LogLevelDesc = "INFO"; - const log = LoggerProvider.getOrCreate({ - label: "get-balance-endpoint.test.ts", - level: logLevel, - }); - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainId = uuidv4(); - const keychainRef = uuidv4(); - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - const keychain = new PluginKeychainMemory({ - backend: new Map([[keychainRef, pem]]), - keychainId, - logLevel, - instanceId: uuidv4(), - }); - const pluginRegistry = new PluginRegistry({ plugins: [keychain] }); - const httpServer1 = createServer(); - - const expectedBalance = Math.ceil(Math.random() * Math.pow(10, 6)); - - let ledger: BesuTestLedger; - let apiServer: ApiServer; - let testAccount: Account; - let node1Host: string; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - - beforeAll(async () => { - ledger = new BesuTestLedger({ - containerImageName, - containerImageVersion, - logLevel, - }); - // we've are using a pre-built image so pulling is necessary - const omitImagePullFromNetwork = false; - await ledger.start(omitImagePullFromNetwork); - }); - - beforeAll(async () => { - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - - const addressInfo1 = httpServer1.address() as AddressInfo; - log.debug(`HttpServer1 AddressInfo: ${JSON.stringify(addressInfo1)}`); - - node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - log.debug(`Cactus Node 1 Host: ${node1Host}`); - - testAccount = await ledger.createEthTestAccount(expectedBalance); - const rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - const rpcApiWsHost = await ledger.getRpcApiWsHost(); - - // 3. Instantiate the web service consortium plugin - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const pluginValidatorBesu = new PluginLedgerConnectorBesu(options); - - // 4. Create the API Server object that we embed in this test - const cfgSvc = new ConfigService(); - const apiSrvOpts = await cfgSvc.newExampleConfig(); - apiSrvOpts.authorizationProtocol = AuthorizationProtocol.NONE; - apiSrvOpts.configFile = ""; - apiSrvOpts.apiCorsDomainCsv = "*"; - apiSrvOpts.apiPort = addressInfo1.port; - apiSrvOpts.cockpitPort = 0; - apiSrvOpts.grpcPort = 0; - apiSrvOpts.crpcPort = 0; - apiSrvOpts.apiTlsEnabled = false; - const config = await cfgSvc.newExampleConfigConvict(apiSrvOpts); - - pluginRegistry.add(pluginValidatorBesu); - - apiServer = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer.start(); - log.debug(`AddressInfo: ${JSON.stringify(addressInfo1)}`); - }); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - - afterAll(async () => { - await ledger.stop(); - await ledger.destroy(); - }); - - afterAll(async () => await apiServer.shutdown()); - - it("getBalanceV1() - retrieves ETH account balance", async () => { - const request: GetBalanceV1Request = { - address: testAccount.address, - }; - - const configuration = new BesuApiClientOptions({ basePath: node1Host }); - const api = new BesuApiClient(configuration); - - // Test for 200 valid response test case - const getBalanceExchange = api.getBalanceV1(request); - await expect(getBalanceExchange).resolves.toMatchObject({ - status: StatusCodes.OK, - data: expect.objectContaining({ - balance: expect.stringMatching(expectedBalance.toFixed(0)), - }), - }); - }); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-block-endpoint.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-block-endpoint.test.ts deleted file mode 100644 index 85ea9965f7..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-block-endpoint.test.ts +++ /dev/null @@ -1,151 +0,0 @@ -import test, { Test } from "tape-promise/tape"; - -import { v4 as uuidv4 } from "uuid"; -import { createServer } from "http"; -import KeyEncoder from "key-encoder"; -import { AddressInfo } from "net"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - Secp256k1Keys, - KeyFormat, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - BesuApiClientOptions, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, - GetBlockV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -const testCase = "Test sign transaction endpoint"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainId = uuidv4(); - const keychainRef = uuidv4(); - - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - - const keychain = new PluginKeychainMemory({ - backend: new Map([[keychainRef, pem]]), - keychainId, - logLevel, - instanceId: uuidv4(), - }); - - const httpServer1 = createServer(); - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - const addressInfo1 = httpServer1.address() as AddressInfo; - t.comment(`HttpServer1 AddressInfo: ${JSON.stringify(addressInfo1)}`); - const node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - t.comment(`Cactus Node 1 Host: ${node1Host}`); - - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - await besuTestLedger.start(); - - const tearDown = async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }; - - test.onFinish(tearDown); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - // 2. Instantiate plugin registry which will provide the web service plugin with the key value storage plugin - const pluginRegistry = new PluginRegistry({ plugins: [keychain] }); - - // 3. Instantiate the web service consortium plugin - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const pluginValidatorBesu = new PluginLedgerConnectorBesu(options); - - // 4. Create the API Server object that we embed in this test - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.apiTlsEnabled = false; - const config = await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginValidatorBesu); - - const apiServer = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - // 5. make sure the API server is shut down when the testing if finished. - test.onFinish(() => apiServer.shutdown()); - - // 6. Start the API server which is now listening on port A and it's healthcheck works through the main SDK - await apiServer.start(); - - // 7. Instantiate the main SDK dynamically with whatever port the API server ended up bound to (port 0) - t.comment(`AddressInfo: ${JSON.stringify(addressInfo1)}`); - - const request: GetBlockV1Request = { - blockHashOrBlockNumber: 0, - }; - - const configuration = new BesuApiClientOptions({ basePath: node1Host }); - const api = new BesuApiClient(configuration); - - // Test for 200 valid response test case - const res = await api.getBlockV1(request); - - const { status, data } = res; - t.true(status >= 200, "status GTE 200 OK"); - t.true(status < 300, "status LT 300 OK"); - t.ok(data, "GetBlockResponse Truthy OK"); - t.true(typeof data.block === "object", "Response data is OK"); -}); - -test("AFTER " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-past-logs-endpoint.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-past-logs-endpoint.test.ts deleted file mode 100644 index d1dd532619..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-past-logs-endpoint.test.ts +++ /dev/null @@ -1,190 +0,0 @@ -import "jest-extended"; - -import { v4 as uuidv4 } from "uuid"; -import { createServer } from "http"; -import KeyEncoder from "key-encoder"; -import { AddressInfo } from "net"; -import Web3 from "web3"; -import Web3JsQuorum, { IWeb3Quorum } from "web3js-quorum"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - Secp256k1Keys, - KeyFormat, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - BesuApiClientOptions, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, - GetPastLogsV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -// Main test case name and log level -const testCase = "API client can call get-PastLogs via network"; -const logLevel: LogLevelDesc = "TRACE"; - -describe("PluginLedgerBesu-v21GetPastLogs", () => { - const log = LoggerProvider.getOrCreate({ - label: "v21-get-past-logs-endpoint.test.ts", - level: logLevel, - }); - - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - - let apiServer: ApiServer; - let web3JsQuorum: IWeb3Quorum; - let besuPrivateKey: string; - let node1Host: string; - let web3: Web3; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - beforeAll(async () => { - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainId = uuidv4(); - const keychainRef = uuidv4(); - - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - - const keychain = new PluginKeychainMemory({ - backend: new Map([[keychainRef, pem]]), - keychainId, - logLevel, - instanceId: uuidv4(), - }); - - const httpServer1 = createServer(); - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - - const addressInfo1 = httpServer1.address() as AddressInfo; - log.debug(`HttpServer1 AddressInfo: ${JSON.stringify(addressInfo1)}`); - node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - log.debug(`Cactus Node 1 Host: ${node1Host}`); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - const pluginRegistry = new PluginRegistry({ plugins: [keychain] }); - - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const pluginValidatorBesu = new PluginLedgerConnectorBesu(options); - - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.apiTlsEnabled = false; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginValidatorBesu); - - apiServer = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - await apiServer.start(); - - const web3Provider = new Web3.providers.HttpProvider(rpcApiHttpHost); - web3 = new Web3(web3Provider); - web3JsQuorum = Web3JsQuorum(web3); - - const besuKeyPair = await besuTestLedger.getBesuKeyPair(); - besuPrivateKey = besuKeyPair.privateKey.toLowerCase().startsWith("0x") - ? besuKeyPair.privateKey.substring(2) - : besuKeyPair.privateKey; - }); - - afterAll(async () => { - await apiServer.shutdown(); - }); - - const tearDown = async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }; - - afterAll(tearDown); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - - test(testCase, async () => { - const orionKeyPair = await besuTestLedger.getOrionKeyPair(); - const contractOptions = { - data: `0x123`, - // privateFrom : Orion public key of the sender. - privateFrom: orionKeyPair.publicKey, - // privateFor : Orion public keys of recipients or privacyGroupId: Privacy group to receive the transaction - privateFor: [orionKeyPair.publicKey], - // privateKey: Ethereum private key with which to sign the transaction. - privateKey: besuPrivateKey, - }; - - const transactionHash = - await web3JsQuorum.priv.generateAndSendRawTransaction(contractOptions); - - await web3.eth.getTransaction(transactionHash); - - const request: GetPastLogsV1Request = { - address: (await besuTestLedger.createEthTestAccount()).address, - }; - - const configuration = new BesuApiClientOptions({ basePath: node1Host }); - const api = new BesuApiClient(configuration); - - const res = await api.getPastLogsV1(request); - - expect(res).toBeTruthy(); - - expect(res.data.logs).toBeArray(); - expect(res.data.logs).toBeTruthy(); - }); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-transaction-endpoint.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-transaction-endpoint.test.ts deleted file mode 100644 index b26597af95..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-get-transaction-endpoint.test.ts +++ /dev/null @@ -1,196 +0,0 @@ -import "jest-extended"; - -import { v4 as uuidv4 } from "uuid"; -import { createServer } from "http"; -import KeyEncoder from "key-encoder"; -import { AddressInfo } from "net"; -import Web3 from "web3"; -import Web3JsQuorum, { IWeb3Quorum } from "web3js-quorum"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - Secp256k1Keys, - KeyFormat, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { - BesuTestLedger, - IKeyPair, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - BesuApiClientOptions, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, - GetTransactionV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -const testCase = "API client can call get-transaction via network"; -const logLevel: LogLevelDesc = "INFO"; - -describe("PluginLedgerBesu", () => { - const log = LoggerProvider.getOrCreate({ - label: "v21-get-transaction-endpoint.test.ts", - level: logLevel, - }); - - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - - let apiServer: ApiServer; - let web3JsQuorum: IWeb3Quorum; - let orionKeyPair: IKeyPair; - let besuPrivateKey: string; - let web3: Web3; - let node1Host: string; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - - beforeAll(async () => { - await besuTestLedger.start(); - }); - - beforeAll(async () => { - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainId = uuidv4(); - const keychainRef = uuidv4(); - - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - - const keychain = new PluginKeychainMemory({ - backend: new Map([[keychainRef, pem]]), - keychainId, - logLevel, - instanceId: uuidv4(), - }); - - const httpServer1 = createServer(); - await new Promise((resolve, reject) => { - httpServer1.once("error", reject); - httpServer1.once("listening", resolve); - httpServer1.listen(0, "127.0.0.1"); - }); - const addressInfo1 = httpServer1.address() as AddressInfo; - log.debug(`HttpServer1 AddressInfo: ${JSON.stringify(addressInfo1)}`); - node1Host = `http://${addressInfo1.address}:${addressInfo1.port}`; - log.debug(`Cactus Node 1 Host: ${node1Host}`); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - // 2. Instantiate plugin registry which will provide the web service plugin with the key value storage plugin - const pluginRegistry = new PluginRegistry({ plugins: [keychain] }); - - // 3. Instantiate the web service consortium plugin - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const pluginValidatorBesu = new PluginLedgerConnectorBesu(options); - - // 4. Create the API Server object that we embed in this test - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo1.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.apiTlsEnabled = false; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginValidatorBesu); - - apiServer = new ApiServer({ - httpServerApi: httpServer1, - config: config.getProperties(), - pluginRegistry, - }); - - // 6. Start the API server which is now listening on port A and it's healthcheck works through the main SDK - await apiServer.start(); - - const web3Provider = new Web3.providers.HttpProvider(rpcApiHttpHost); - web3 = new Web3(web3Provider); - web3JsQuorum = Web3JsQuorum(web3); - - orionKeyPair = await besuTestLedger.getOrionKeyPair(); - const besuKeyPair = await besuTestLedger.getBesuKeyPair(); - - besuPrivateKey = besuKeyPair.privateKey.toLowerCase().startsWith("0x") - ? besuKeyPair.privateKey.substring(2) - : besuKeyPair.privateKey; // besu node's private key - }); - - afterAll(async () => { - await apiServer.shutdown(); - }); - - const tearDown = async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }; - - afterAll(tearDown); - - afterAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).toResolve(); - }); - - test(testCase, async () => { - const contractOptions = { - data: `0x123`, - // privateFrom : Orion public key of the sender. - privateFrom: orionKeyPair.publicKey, - // privateFor : Orion public keys of recipients or privacyGroupId: Privacy group to receive the transaction - privateFor: [orionKeyPair.publicKey], - // privateKey: Ethereum private key with which to sign the transaction. - privateKey: besuPrivateKey, - }; - - const transactionHash = - await web3JsQuorum.priv.generateAndSendRawTransaction(contractOptions); - - await web3.eth.getTransaction(transactionHash); - - const request: GetTransactionV1Request = { - transactionHash: transactionHash, - }; - - const configuration = new BesuApiClientOptions({ basePath: node1Host }); - const api = new BesuApiClient(configuration); - - // Test for 200 valid response test case - const res = await api.getTransactionV1(request); - - expect(res).toBeTruthy(); - - expect(res.data.transaction).toBeTruthy(); - expect(res.data.transaction).toBeObject(); - }); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-sign-transaction-endpoint.test.ts b/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-sign-transaction-endpoint.test.ts deleted file mode 100644 index 08eb9361ec..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-sign-transaction-endpoint.test.ts +++ /dev/null @@ -1,204 +0,0 @@ -import "jest-extended"; - -import axios from "axios"; -import { v4 as uuidv4 } from "uuid"; -import { createServer } from "http"; -import KeyEncoder from "key-encoder"; -import { AddressInfo } from "net"; -import Web3 from "web3"; -import Web3JsQuorum, { IWeb3Quorum } from "web3js-quorum"; - -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { - JsObjectSigner, - IJsObjectSignerOptions, - Secp256k1Keys, - KeyFormat, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { - BesuTestLedger, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -import { - BesuApiClientOptions, - BesuApiClient, - IPluginLedgerConnectorBesuOptions, - PluginLedgerConnectorBesu, - SignTransactionRequest, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; - -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; - -const testCase = "Test sign transaction endpoint"; -const logLevel: LogLevelDesc = "TRACE"; - -describe(testCase, () => { - const log = LoggerProvider.getOrCreate({ - label: "v21-get-transaction-endpoint.test.ts", - level: logLevel, - }); - const containerImageVersion = "2021-08-24--feat-1244"; - const containerImageName = - "ghcr.io/hyperledger/cactus-besu-21-1-6-all-in-one"; - const besuOptions = { containerImageName, containerImageVersion }; - const besuTestLedger = new BesuTestLedger(besuOptions); - let apiServer: ApiServer; - - beforeAll(async () => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await expect(pruning).resolves.toBeTruthy(); - await besuTestLedger.start(); - }); - - afterAll(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - afterAll(async () => { - await apiServer.shutdown(); - }); - - test(testCase, async () => { - const keyEncoder: KeyEncoder = new KeyEncoder("secp256k1"); - const keychainId = uuidv4(); - const keychainRef = uuidv4(); - - const { privateKey } = Secp256k1Keys.generateKeyPairsBuffer(); - const keyHex = privateKey.toString("hex"); - const pem = keyEncoder.encodePrivate(keyHex, KeyFormat.Raw, KeyFormat.PEM); - - const keychain = new PluginKeychainMemory({ - backend: new Map([[keychainRef, pem]]), - keychainId, - logLevel, - instanceId: uuidv4(), - }); - - const httpServer = createServer(); - await new Promise((resolve, reject) => { - httpServer.once("error", reject); - httpServer.once("listening", resolve); - httpServer.listen(0, "127.0.0.1"); - }); - const addressInfo = httpServer.address() as AddressInfo; - log.debug(`HttpServer1 AddressInfo: ${JSON.stringify(addressInfo)}`); - - const nodeHost = `http://${addressInfo.address}:${addressInfo.port}`; - log.debug(`Cactus Node 1 Host: ${nodeHost}`); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - const jsObjectSignerOptions: IJsObjectSignerOptions = { - privateKey: keyHex, - logLevel, - }; - const jsObjectSigner = new JsObjectSigner(jsObjectSignerOptions); - - // 2. Instantiate plugin registry which will provide the web service plugin with the key value storage plugin - const pluginRegistry = new PluginRegistry({ plugins: [keychain] }); - - // 3. Instantiate the web service consortium plugin - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - const pluginValidatorBesu = new PluginLedgerConnectorBesu(options); - - // 4. Create the API Server object that we embed in this test - const configService = new ConfigService(); - const apiServerOptions = await configService.newExampleConfig(); - apiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - apiServerOptions.configFile = ""; - apiServerOptions.apiCorsDomainCsv = "*"; - apiServerOptions.apiPort = addressInfo.port; - apiServerOptions.cockpitPort = 0; - apiServerOptions.apiTlsEnabled = false; - const config = - await configService.newExampleConfigConvict(apiServerOptions); - - pluginRegistry.add(pluginValidatorBesu); - - apiServer = new ApiServer({ - httpServerApi: httpServer, - config: config.getProperties(), - pluginRegistry, - }); - - // 6. Start the API server which is now listening on port A and it's healthcheck works through the main SDK - await apiServer.start(); - - // 7. Instantiate the main SDK dynamically with whatever port the API server ended up bound to (port 0) - console.log(`AddressInfo: ${JSON.stringify(addressInfo)}`); - - const web3Provider = new Web3.providers.HttpProvider(rpcApiHttpHost); - const web3 = new Web3(web3Provider); - const web3JsQuorum: IWeb3Quorum = Web3JsQuorum(web3); - - const orionKeyPair = await besuTestLedger.getOrionKeyPair(); - const besuKeyPair = await besuTestLedger.getBesuKeyPair(); - - const besuPrivateKey = besuKeyPair.privateKey.toLowerCase().startsWith("0x") - ? besuKeyPair.privateKey.substring(2) - : besuKeyPair.privateKey; // besu node's private key - - const contractOptions = { - data: `0x123`, - // privateFrom : Orion public key of the sender. - privateFrom: orionKeyPair.publicKey, - // privateFor : Orion public keys of recipients or privacyGroupId: Privacy group to receive the transaction - privateFor: [orionKeyPair.publicKey], - // privateKey: Ethereum private key with which to sign the transaction. - privateKey: besuPrivateKey, - }; - - const transactionHash = - await web3JsQuorum.priv.generateAndSendRawTransaction(contractOptions); - - const transaction = await web3.eth.getTransaction(transactionHash); - const singData = jsObjectSigner.sign(transaction.input); - const signDataHex = Buffer.from(singData).toString("hex"); - - const request: SignTransactionRequest = { - keychainId, - keychainRef, - transactionHash: transactionHash, - }; - - const configuration = new BesuApiClientOptions({ basePath: nodeHost }); - const api = new BesuApiClient(configuration); - - const res = await api.signTransactionV1(request); - expect(res).toBeTruthy(); - expect(signDataHex).toBe(res.data.signature); - - try { - const notFoundRequest: SignTransactionRequest = { - keychainId: "fake", - keychainRef: "fake", - transactionHash: - "0x46eac4d1d1ff81837698cbab38862a428ddf042f92855a72010de2771a7b704d", - }; - await api.signTransactionV1(notFoundRequest); - } catch (error) { - if (axios.isAxiosError(error)) { - expect(error.response?.status).toEqual(404); - expect(error.response?.statusText).toEqual("Transaction not found"); - } - } - }); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/tsconfig.json b/packages/cactus-test-plugin-ledger-connector-besu/tsconfig.json deleted file mode 100644 index 0f6045bbfe..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-besu/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-plugin-ledger-connector-besu.tsbuildinfo" - }, - "include": [ - "./src", - "src/**/*.json" - ], - "references": [ - { - "path": "../cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - } - ] -} diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/CHANGELOG.md b/packages/cactus-test-plugin-ledger-connector-ethereum/CHANGELOG.md deleted file mode 100644 index 85c943b94d..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/CHANGELOG.md +++ /dev/null @@ -1,75 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-ethereum - -# [2.0.0-rc.6](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-ethereum - -# [2.0.0-rc.5](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-ethereum - -# [2.0.0-rc.4](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-ethereum - -# [2.0.0-rc.3](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cacti/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cacti/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-plugin-ledger-connector-ethereum - -# [2.0.0-rc.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cacti/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cacti/issues/2857) - -### Features - -* **cactus-plugin-ledger-connector-ethereum:** add stress test ([55fa26e](https://github.com/hyperledger/cacti/commit/55fa26ef41d405b26da02b099418da5fa281c78f)), closes [#2631](https://github.com/hyperledger/cacti/issues/2631) -* **cactus-plugin-ledger-connector-ethereum:** refactor connector API ([cda279f](https://github.com/hyperledger/cacti/commit/cda279fb0009a4d5756c461024ad88f525bfe946)), closes [#2630](https://github.com/hyperledger/cacti/issues/2630) -* **cactus-plugin-ledger-connector-ethereum:** support London fork gas prices ([80a89dd](https://github.com/hyperledger/cacti/commit/80a89dd95d51bdc604392dbe96ab27d233b116a4)), closes [#2581](https://github.com/hyperledger/cacti/issues/2581) -* **cactus-plugin-ledger-connector-ethereum:** update web3js to 4.X ([55f82c9](https://github.com/hyperledger/cacti/commit/55f82c9568b3e875de4f3ceb89a828f8b23d65be)), closes [#2580](https://github.com/hyperledger/cacti/issues/2580) [#2535](https://github.com/hyperledger/cacti/issues/2535) [#2578](https://github.com/hyperledger/cacti/issues/2578) -* **ethereum-connector:** support block monitoring with http only connection ([f4373a9](https://github.com/hyperledger/cacti/commit/f4373a90020cbc8bfbc16da6c32babe627e7d4ae)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Features - -* **cactus-plugin-ledger-connector-ethereum:** add new connector plugin ([f8a2131](https://github.com/hyperledger/cacti/commit/f8a2131e9fc0ea05c1c1c8863489a43a74f019ae)), closes [#2534](https://github.com/hyperledger/cacti/issues/2534) diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/README.md b/packages/cactus-test-plugin-ledger-connector-ethereum/README.md deleted file mode 100644 index 816efa51ac..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# `@hyperledger/cactus-test-plugin-ledger-connector-ethereum` - - -## Usage - -``` sh -# In root project dir -npx jest cactus-test-plugin-ledger-connector-ethereum -``` - -## FAQ - -### **What is a dedicated test package for?** - -This is a dedicated test package meaning that it verifies the integration between two packages that are somehow dependent on each other and therefore these tests cannot be added properly in the child package due to circular dependency issues and it would not be fitting to add it in the parent because the child package's tests should not be held by the parent as a matter of principle. diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/package.json b/packages/cactus-test-plugin-ledger-connector-ethereum/package.json deleted file mode 100644 index a2844bd084..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-plugin-ledger-connector-ethereum", - "version": "2.0.0", - "description": "Integration tests for the Ethereum ledger and the API server.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cacti#readme", - "bugs": { - "url": "https://github.com/hyperledger-cacti/cacti/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cactus" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-test-plugin-ledger-connector-ethereum.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0", - "@hyperledger/cactus-verifier-client": "2.0.0", - "web3-eth-contract": "4.2.0" - }, - "devDependencies": { - "@hyperledger/cactus-test-geth-ledger": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@types/lodash": "4.14.195", - "@types/uuid": "10.0.0", - "lodash": "4.17.21", - "uuid": "10.0.0", - "web3": "4.4.0" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-test-plugin-ledger-connector-ethereum.web.umd.min.js", - "mainMinified": "dist/cactus-test-plugin-ledger-connector-ethereum.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/src/main/typescript/index.ts b/packages/cactus-test-plugin-ledger-connector-ethereum/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/src/main/typescript/index.web.ts b/packages/cactus-test-plugin-ledger-connector-ethereum/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/src/main/typescript/public-api.ts b/packages/cactus-test-plugin-ledger-connector-ethereum/src/main/typescript/public-api.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/src/main/typescript/public-api.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.json b/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.json deleted file mode 100644 index 29f7eb9fc7..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.json +++ /dev/null @@ -1,418 +0,0 @@ -{ - "contractName": "HelloWorld", - "abi": [ - { - "inputs": [], - "name": "getName", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sayHello", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "setName", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.7.2+commit.51b20bc0\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sayHello\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-test-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol\":\"HelloWorld\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-test-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol\":{\"keccak256\":\"0x0b78fa11f33f7936a80da194c49f04198e38947e3f98f3a7b765b4adb4c455c1\",\"urls\":[\"bzz-raw://12697aa12341c70ed7a411a27a17398dcb2d4336a14dac51845e2123acf174c7\",\"dweb:/ipfs/QmPhH1UbHtUeeen9W2qMDwEVVWAtVJSMN29Nch5q8Gax1D\"]}},\"version\":1}", - "bytecode": "60c0604052600d60808190526c4361707461696e43616374757360981b60a090815261002e9160009190610041565b5034801561003b57600080fd5b506100d4565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061008257805160ff19168380011785556100af565b828001600101855582156100af579182015b828111156100af578251825591602001919060010190610094565b506100bb9291506100bf565b5090565b5b808211156100bb57600081556001016100c0565b61030f806100e36000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806317d7de7c14610046578063c47f0027146100c3578063ef5fb05b1461016b575b600080fd5b61004e610173565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610169600480360360208110156100d957600080fd5b8101906020810181356401000000008111156100f457600080fd5b82018360208201111561010657600080fd5b8035906020019184600183028401116401000000008311171561012857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610209945050505050565b005b61004e610220565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156101ff5780601f106101d4576101008083540402835291602001916101ff565b820191906000526020600020905b8154815290600101906020018083116101e257829003601f168201915b5050505050905090565b805161021c906000906020840190610246565b5050565b60408051808201909152600c81526b48656c6c6f20576f726c642160a01b602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061028757805160ff19168380011785556102b4565b828001600101855582156102b4579182015b828111156102b4578251825591602001919060010190610299565b506102c09291506102c4565b5090565b5b808211156102c057600081556001016102c556fea2646970667358221220b72c0e77fdf429e47051940ba62646ae01296865473f15795ffca6619fe80f9964736f6c63430007020033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100415760003560e01c806317d7de7c14610046578063c47f0027146100c3578063ef5fb05b1461016b575b600080fd5b61004e610173565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610169600480360360208110156100d957600080fd5b8101906020810181356401000000008111156100f457600080fd5b82018360208201111561010657600080fd5b8035906020019184600183028401116401000000008311171561012857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610209945050505050565b005b61004e610220565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156101ff5780601f106101d4576101008083540402835291602001916101ff565b820191906000526020600020905b8154815290600101906020018083116101e257829003601f168201915b5050505050905090565b805161021c906000906020840190610246565b5050565b60408051808201909152600c81526b48656c6c6f20576f726c642160a01b602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061028757805160ff19168380011785556102b4565b828001600101855582156102b4579182015b828111156102b4578251825591602001919060010190610299565b506102c09291506102c4565b5090565b5b808211156102c057600081556001016102c556fea2646970667358221220b72c0e77fdf429e47051940ba62646ae01296865473f15795ffca6619fe80f9964736f6c63430007020033", - "sourceMap": "463:37:0:-:0;439:322;463:37;;439:322;463:37;;;-1:-1:-1;;;463:37:0;;;;;;-1:-1:-1;;463:37:0;;:::i;:::-;;439:322;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;439:322:0;;;-1:-1:-1;439:322:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "439:322:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;598:81;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;683:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;683:76:0;;-1:-1:-1;683:76:0;;-1:-1:-1;;;;;683:76:0:i;:::-;;505:89;;;:::i;598:81::-;670:4;663:11;;;;;;;;-1:-1:-1;;663:11:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;638:13;;663:11;;670:4;;663:11;;670:4;663:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;598:81;:::o;683:76::-;740:14;;;;:4;;:14;;;;;:::i;:::-;;683:76;:::o;505:89::-;568:21;;;;;;;;;;;;-1:-1:-1;;;568:21:0;;;;505:89;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;", - "sourcePath": "/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-test-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol", - "compiler": { - "name": "solc", - "version": "0.7.2+commit.51b20bc0" - }, - "networks":{}, - "ast": { - "absolutePath": "/home/peter/a/blockchain/blockchain-integration-framework/packages/cactus-test-plugin-ledger-connector-quorum/src/test/solidity/hello-world-contract/HelloWorld.sol", - "exportedSymbols": { - "HelloWorld": [ - 31 - ] - }, - "id": 32, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 31, - "linearizedBaseContracts": [ - 31 - ], - "name": "HelloWorld", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "463:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "463:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "hexValue": "4361707461696e436163747573", - "id": 3, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:15:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", - "typeString": "literal_string \"CaptainCactus\"" - }, - "value": "CaptainCactus" - }, - "visibility": "private" - }, - { - "body": { - "id": 11, - "nodeType": "Block", - "src": "562:32:0", - "statements": [ - { - "expression": { - "hexValue": "48656c6c6f20576f726c6421", - "id": 9, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "575:14:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", - "typeString": "literal_string \"Hello World!\"" - }, - "value": "Hello World!" - }, - "functionReturnParameters": 8, - "id": 10, - "nodeType": "Return", - "src": "568:21:0" - } - ] - }, - "functionSelector": "ef5fb05b", - "id": 12, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sayHello", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5, - "nodeType": "ParameterList", - "parameters": [], - "src": "523:2:0" - }, - "returnParameters": { - "id": 8, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 12, - "src": "547:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 6, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "547:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "546:15:0" - }, - "scope": 31, - "src": "505:89:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 19, - "nodeType": "Block", - "src": "655:24:0", - "statements": [ - { - "expression": { - "id": 17, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "670:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 16, - "id": 18, - "nodeType": "Return", - "src": "663:11:0" - } - ] - }, - "functionSelector": "17d7de7c", - "id": 20, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 13, - "nodeType": "ParameterList", - "parameters": [], - "src": "614:2:0" - }, - "returnParameters": { - "id": 16, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 15, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "scope": 20, - "src": "638:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 14, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "638:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "637:15:0" - }, - "scope": 31, - "src": "598:81:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 29, - "nodeType": "Block", - "src": "732:27:0", - "statements": [ - { - "expression": { - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 25, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "740:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 26, - "name": "newName", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "747:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "740:14:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 28, - "nodeType": "ExpressionStatement", - "src": "740:14:0" - } - ] - }, - "functionSelector": "c47f0027", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setName", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "newName", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "700:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 21, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "700:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "699:23:0" - }, - "returnParameters": { - "id": 24, - "nodeType": "ParameterList", - "parameters": [], - "src": "732:0:0" - }, - "scope": 31, - "src": "683:76:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 32, - "src": "439:322:0" - } - ], - "src": "413:349:0" - }, - "functionHashes": { - "getName()": "17d7de7c", - "sayHello()": "ef5fb05b", - "setName(string)": "c47f0027" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "156600", - "executionCost": "infinite", - "totalCost": "infinite" - }, - "external": { - "getName()": "infinite", - "sayHello()": "infinite", - "setName(string)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.sol b/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.sol deleted file mode 100644 index befd843936..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/solidity/hello-world-contract/HelloWorld.sol +++ /dev/null @@ -1,26 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; - -contract HelloWorld { - string private name = "CaptainCactus"; - - function sayHello () public pure returns (string memory) { - return 'Hello World!'; - } - - function getName() public view returns (string memory) - { - return name; - } - - function setName(string memory newName) public - { - name = newName; - } -} diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/typescript/integration/api-client/verifier-integration-with-ethereum-connector.test.ts b/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/typescript/integration/api-client/verifier-integration-with-ethereum-connector.test.ts deleted file mode 100644 index dd5138ce84..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/typescript/integration/api-client/verifier-integration-with-ethereum-connector.test.ts +++ /dev/null @@ -1,580 +0,0 @@ -/* - * Copyright 2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * @todo - there's an ugly warning in the end caused by some issue with clearing web3js ws connection to geth. - * Investigate and report if needed. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel = "info"; -const sutLogLevel = "info"; - -import "jest-extended"; -import lodash from "lodash"; -import { v4 as uuidv4 } from "uuid"; -import Web3, { ContractAbi } from "web3"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - PluginLedgerConnectorEthereum, - EthereumApiClient, - WatchBlocksV1Progress, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { - ICactusPlugin, - ISendRequestResultV1, - IVerifierEventListener, - LedgerEvent, -} from "@hyperledger/cactus-core-api"; -import { AddressInfo } from "net"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, -} from "@hyperledger/cactus-cmd-api-server"; -import { Verifier, VerifierFactory } from "@hyperledger/cactus-verifier-client"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, -} from "@hyperledger/cactus-test-geth-ledger"; -import { PayableMethodObject } from "web3-eth-contract"; - -import HelloWorldContractJson from "../../../solidity/hello-world-contract/HelloWorld.json"; - -const log: Logger = LoggerProvider.getOrCreate({ - label: "verifier-integration-with-ethereum-connector.test", - level: testLogLevel, -}); - -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -log.info("Test started"); - -describe("Verifier integration with ethereum connector tests", () => { - let ethereumTestLedger: GethTestLedger; - let apiServer: ApiServer; - let connector: PluginLedgerConnectorEthereum; - let web3: InstanceType; - let keychainPlugin: PluginKeychainMemory; - const ethereumValidatorId = "testEthereumId"; - let globalVerifierFactory: VerifierFactory; - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - // Start Ledger - log.info("Start GethTestLedger..."); - // log.debug("GethTestLedger image:", containerImageName); - ethereumTestLedger = new GethTestLedger({ - containerImageName, - containerImageVersion, - logLevel: sutLogLevel, - }); - await ethereumTestLedger.start(); - - // Setup ApiServer plugins - const plugins: ICactusPlugin[] = []; - const pluginRegistry = new PluginRegistry({ plugins }); - - log.info("Create PluginKeychainMemory..."); - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - logLevel: sutLogLevel, - }); - keychainPlugin.set( - HelloWorldContractJson.contractName, - JSON.stringify(HelloWorldContractJson), - ); - plugins.push(keychainPlugin); - - log.info("Create PluginLedgerConnectorEthereum..."); - const rpcApiHttpHost = await ethereumTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await ethereumTestLedger.getRpcApiWebSocketHost(); - connector = new PluginLedgerConnectorEthereum({ - rpcApiHttpHost, - rpcApiWsHost, - logLevel: sutLogLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - plugins.push(connector); - - // Create web3 provider for test - web3 = new Web3(rpcApiHttpHost); - - // Create Api Server - log.info("Create ApiServer..."); - const configService = new ConfigService(); - const cactusApiServerOptions = await configService.newExampleConfig(); - cactusApiServerOptions.authorizationProtocol = AuthorizationProtocol.NONE; - cactusApiServerOptions.configFile = ""; - cactusApiServerOptions.apiCorsDomainCsv = "*"; - cactusApiServerOptions.apiTlsEnabled = false; - cactusApiServerOptions.apiPort = 0; - const config = await configService.newExampleConfigConvict( - cactusApiServerOptions, - ); - - apiServer = new ApiServer({ - config: config.getProperties(), - pluginRegistry, - }); - - // Start ApiServer - const apiServerStartOut = await apiServer.start(); - log.debug(`apiServerStartOut:`, apiServerStartOut); - const httpServer = apiServer.getHttpServerApi(); - - const addressInfo = httpServer?.address() as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - - // Create VerifierFactory - log.info("Create VerifierFactory with Ethereum Validator..."); - globalVerifierFactory = new VerifierFactory( - [ - { - validatorID: ethereumValidatorId, - validatorType: "ETH_1X", - basePath: apiHost, - logLevel: sutLogLevel, - }, - ], - sutLogLevel, - ); - }); - - afterAll(async () => { - log.info("Shutdown the server..."); - if (apiServer) { - await apiServer.shutdown(); - } - - log.info("Stop and destroy the test ledger..."); - if (ethereumTestLedger) { - await ethereumTestLedger.stop(); - await ethereumTestLedger.destroy(); - } - - log.info("Prune docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }); - - ////////////////////////////////// - // Helper Functions - ////////////////////////////////// - - async function monitorAndGetBlock( - options: Record = {}, - ): Promise> { - const appId = "testMonitor"; - const sut = await globalVerifierFactory.getVerifier(ethereumValidatorId); - - return new Promise>( - (resolve, reject) => { - const monitor: IVerifierEventListener = { - onEvent(ledgerEvent: LedgerEvent): void { - try { - log.info("Received event:", ledgerEvent); - - if (!ledgerEvent.data) { - throw Error("No block data"); - } - - log.info( - "Listener received ledgerEvent, block number", - ledgerEvent.data.blockHeader?.number, - ); - - sut.stopMonitor(appId); - resolve(ledgerEvent); - } catch (err) { - reject(err); - } - }, - onError(err: any): void { - log.error("Ledger monitoring error:", err); - reject(err); - }, - }; - - sut.startMonitor(appId, options, monitor); - }, - ); - } - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - test("Verifier of EthereumApiClient is created by VerifierFactory", async () => { - const sut = await globalVerifierFactory.getVerifier(ethereumValidatorId); - expect(sut.ledgerApi.className).toEqual("EthereumApiClient"); - }); - - describe("web3EthContract tests", () => { - let verifier: Verifier; - let contractCommon: { - abi: ContractAbi; - address: string; - }; - - beforeAll(async () => { - // Setup verifier - verifier = await globalVerifierFactory.getVerifier( - ethereumValidatorId, - "ETH_1X", - ); - - // Deploy contract to interact with - const deployOut = await connector.deployContract({ - contract: { - contractName: HelloWorldContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - expect(deployOut.transactionReceipt.status).toBeTrue(); - - contractCommon = { - abi: HelloWorldContractJson.abi, - address: deployOut.transactionReceipt.contractAddress as string, - }; - }); - - test("Invalid web3EthContract calls are rejected by EthereumApiClient", async () => { - // Define correct input parameters - const correctContract: Record = - lodash.clone(contractCommon); - const correctMethod: Record = { - type: "web3EthContract", - command: "call", - function: "getName", - params: [], - }; - const correctArgs: any = {}; - - // Sanity check if correct parameters work - const resultCorrect = (await verifier.sendSyncRequest( - correctContract, - correctMethod, - correctArgs, - )) as ISendRequestResultV1; - expect(resultCorrect.status).toEqual(200); - - // Failing: Missing contract ABI - const missingABIContract = lodash.clone(correctContract); - delete missingABIContract.abi; - - expect( - verifier.sendSyncRequest( - missingABIContract, - correctMethod, - correctArgs, - ), - ).toReject(); - - // Failing: Missing contract address - const missingAddressContract = lodash.clone(correctContract); - delete missingAddressContract.address; - - expect( - verifier.sendSyncRequest( - missingAddressContract, - correctMethod, - correctArgs, - ), - ).toReject(); - - // Failing: Unknown invocation method - const unknownMethod = lodash.clone(correctMethod); - unknownMethod.command = "foo"; - expect( - verifier.sendSyncRequest(correctContract, unknownMethod, correctArgs), - ).toReject(); - - // Failing: Empty invocation method - const emptyMethod = lodash.clone(correctMethod); - emptyMethod.command = ""; - expect( - verifier.sendSyncRequest(correctContract, emptyMethod, correctArgs), - ).toReject(); - - // Failing: Empty contract method - const emptyContractFunction = lodash.clone(correctMethod); - emptyContractFunction.function = ""; - expect( - verifier.sendSyncRequest( - correctContract, - emptyContractFunction, - correctArgs, - ), - ).toReject(); - - // Failing: Wrong method params format - const numericParam = lodash.clone(correctMethod); - numericParam.params = 42; - expect( - verifier.sendSyncRequest(correctContract, numericParam, correctArgs), - ).toReject(); - - const objectParam = lodash.clone(correctMethod); - objectParam.params = { arg1: 42 }; - expect( - verifier.sendSyncRequest(correctContract, objectParam, correctArgs), - ).toReject(); - }); - - test("Send unsigned transaction and use call to check results works", async () => { - const newName = "EthereumCactus"; - - // 1. Set new value (send) - // Will use signing key of the node we're connected to (member1) - const methodSend = { - type: "web3EthContract", - command: "send", - function: "setName", - params: [newName], - }; - const argsSend = { - args: { - from: WHALE_ACCOUNT_ADDRESS, - }, - }; - - const resultsSend = (await verifier.sendSyncRequest( - contractCommon, - methodSend, - argsSend, - )) as ISendRequestResultV1<{ readonly status: string }>; - expect(resultsSend.status).toEqual(200); - expect(resultsSend.data.status).toEqual("1"); - - // 2. Get new, updated value (call) - const methodCall = { - type: "web3EthContract", - command: "call", - function: "getName", - params: [], - }; - const argsCall = {}; - - const resultCall = (await verifier.sendSyncRequest( - contractCommon, - methodCall, - argsCall, - )) as ISendRequestResultV1; - expect(resultCall.status).toEqual(200); - expect(resultCall.data).toEqual(newName); - }); - - test("encodeABI of transactions gives same results as direct web3 call", async () => { - // Send encodeABI request to connector - const methodEncode = { - type: "web3EthContract", - command: "encodeABI", - function: "setName", - params: ["EthereumCactusEncode"], - }; - const argsEncode = { - args: { - from: WHALE_ACCOUNT_ADDRESS, - }, - }; - - const resultsEncode = (await verifier.sendSyncRequest( - contractCommon, - methodEncode, - argsEncode, - )) as ISendRequestResultV1; - expect(resultsEncode.status).toEqual(200); - expect(resultsEncode.data.length).toBeGreaterThan(5); - - // Compare encoded data with direct web3 call - const web3Contract = new web3.eth.Contract( - contractCommon.abi, - contractCommon.address, - ); - const methodRef = web3Contract.methods.setName as unknown as ( - ...args: unknown[] - ) => PayableMethodObject; - const web3Encode = methodRef(...methodEncode.params).encodeABI(); - expect(resultsEncode.data).toEqual(web3Encode); - }); - - test("estimateGas of transactions gives same results as direct web3 call", async () => { - // Send estimateGas request to connector - const methodEstimateGas = { - type: "web3EthContract", - command: "estimateGas", - function: "setName", - params: ["EthereumCactusGas"], - }; - const argsEstimateGas = {}; - - const resultsEstimateGas = (await verifier.sendSyncRequest( - contractCommon, - methodEstimateGas, - argsEstimateGas, - )) as ISendRequestResultV1; - expect(resultsEstimateGas.status).toEqual(200); - expect(Number(resultsEstimateGas.data)).toBeGreaterThan(0); - - // Compare gas estimate with direct web3 call - const web3Contract = new web3.eth.Contract( - contractCommon.abi, - contractCommon.address, - ); - const methodRef = web3Contract.methods.setName as unknown as ( - ...args: unknown[] - ) => PayableMethodObject; - const web3Encode = await methodRef( - ...methodEstimateGas.params, - ).estimateGas(argsEstimateGas); - expect(resultsEstimateGas.data).toEqual(web3Encode.toString()); - }); - - test("Sending transaction with sendAsyncRequest works", async () => { - const newName = "EthereumCactusAsync"; - - // 1. Set new value with async call (send) - // Will use signing key of the node we're connected to (member1) - const methodSendAsync = { - type: "web3EthContract", - command: "send", - function: "setName", - params: [newName], - }; - const argsSendAsync = { - args: { - from: WHALE_ACCOUNT_ADDRESS, - }, - }; - - await verifier.sendAsyncRequest( - contractCommon, - methodSendAsync, - argsSendAsync, - ); - - // 2. Wait for transaction commit - // We assume transaction will be included in the next block - await monitorAndGetBlock(); - - // 3. Get new, updated value (call) - const methodCall = { - type: "web3EthContract", - command: "call", - function: "getName", - params: [], - }; - const argsCall = {}; - - const resultsCall = (await verifier.sendSyncRequest( - contractCommon, - methodCall, - argsCall, - )) as ISendRequestResultV1; - expect(resultsCall.status).toEqual(200); - expect(resultsCall.data).toEqual(newName); - }); - }); - - test("Verifier of EthereumApiClient supports web3Eth function", async () => { - // web3Eth.getBalance - const contract = {}; - const method = { type: "web3Eth", command: "getBalance" }; - const args = { args: [WHALE_ACCOUNT_ADDRESS] }; - - const verifier = - await globalVerifierFactory.getVerifier(ethereumValidatorId); - const results = (await verifier.sendSyncRequest( - contract, - method, - args, - )) as ISendRequestResultV1; - expect(results.status).toEqual(200); - expect(results.data.length).toBeGreaterThan(0); - }); - - test("Invalid web3Eth calls are rejected by EthereumApiClient", async () => { - // Define correct input parameters - const correctContract = {}; - const correctMethod: Record = { - type: "web3Eth", - command: "getBalance", - }; - const correctArgs: any = { - args: [WHALE_ACCOUNT_ADDRESS], - }; - const verifier = - await globalVerifierFactory.getVerifier(ethereumValidatorId); - - // Sanity check if correct parameters work - const resultCorrect = (await verifier.sendSyncRequest( - correctContract, - correctMethod, - correctArgs, - )) as ISendRequestResultV1; - expect(resultCorrect.status).toEqual(200); - - // Failing: Empty web3.eth method - const emptyMethod = lodash.clone(correctMethod); - emptyMethod.command = ""; - - expect( - verifier.sendSyncRequest(correctContract, emptyMethod, correctArgs), - ).toReject(); - - // Failing: Wrong args format - const numericArgsFormat = lodash.clone(correctArgs); - numericArgsFormat.args = 42; - - expect( - verifier.sendSyncRequest(correctContract, numericArgsFormat, correctArgs), - ).toReject(); - - const objectArgsFormat = lodash.clone(correctArgs); - objectArgsFormat.args = { arg1: 42 }; - - expect( - verifier.sendSyncRequest(correctContract, objectArgsFormat, correctArgs), - ).toReject(); - }); - - test("EthereumApiClient web3Eth throws error on unknown method", async () => { - const contract = {}; - const method = { type: "web3Eth", command: "foo" }; - const args = {}; - - try { - const verifier = - await globalVerifierFactory.getVerifier(ethereumValidatorId); - await verifier.sendSyncRequest(contract, method, args); - fail("Expected sendSyncRequest call to fail but it succeeded."); - } catch (error) { - console.log("sendSyncRequest failed as expected"); - } - }); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/tsconfig.json b/packages/cactus-test-plugin-ledger-connector-ethereum/tsconfig.json deleted file mode 100644 index c7417cefd9..0000000000 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/tsconfig.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-plugin-ledger-connector-ethereum.tsbuildinfo" - }, - "include": ["./src", "src/**/*.json"], - "references": [ - { - "path": "../cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-ethereum/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - }, - { - "path": "../cactus-test-geth-ledger/tsconfig.json" - } - ] -} diff --git a/packages/cactus-test-tooling/CHANGELOG.md b/packages/cactus-test-tooling/CHANGELOG.md deleted file mode 100644 index e88be6a33c..0000000000 --- a/packages/cactus-test-tooling/CHANGELOG.md +++ /dev/null @@ -1,317 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -### Bug Fixes - -* **test-tooling:** use of hardcoded password ([63f2943](https://github.com/hyperledger/cactus/commit/63f2943d47960d2e09cd527da77f661b0f9265b2)) - -# [2.0.0-rc.6](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-tooling - -# [2.0.0-rc.5](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-tooling - -# [2.0.0-rc.4](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Bug Fixes - -* **security:** address CVE-2024-39338 SSRF in axios >= 1.3.2, <= 1.7.3 ([7e7bb44](https://github.com/hyperledger/cactus/commit/7e7bb44c01a2d19306ecaaaa2ba2e3c574039c87)) - -### Features - -* **corda:** support 5.1 via TS/HTTP (no JVM) ([ec9683d](https://github.com/hyperledger/cactus/commit/ec9683d38670fe5d657b602db8215e602fd4209d)), closes [#2978](https://github.com/hyperledger/cactus/issues/2978) [#3293](https://github.com/hyperledger/cactus/issues/3293) - -# [2.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cactus/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-tooling - -# [2.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **indy-vdr-nodejs:** update dependency version ([f81b46b](https://github.com/hyperledger/cactus/commit/f81b46bce5ca0880e6bf6b51be2233e2616759a5)) -* **security:** address CVE-2021-3749 - axios >=0.22.0 ([61fc700](https://github.com/hyperledger/cactus/commit/61fc7001b1dd0849ab1d9bcab08e2475c695adae)) - -### Features - -* **cactus-plugin-ledger-connector-iroha:** remove deprecated iroha connector ([fa27fde](https://github.com/hyperledger/cactus/commit/fa27fde9a28f83ff29964693be656dc107046517)), closes [#3159](https://github.com/hyperledger/cactus/issues/3159) [#3155](https://github.com/hyperledger/cactus/issues/3155) -* **connector-fabric:** drop support for Fabric v1.x ([ec8123c](https://github.com/hyperledger/cactus/commit/ec8123cf954b09ba8cb213c7332dfe82224c351f)) -* **connector-polkadot:** add connector pkg, openapi specs, test suite ([6a476a0](https://github.com/hyperledger/cactus/commit/6a476a0f1143380d2fd6bf81c68b0842c13c6ae2)) -* **indy-test-ledger:** add helper class for indy ledger ([8c746c3](https://github.com/hyperledger/cactus/commit/8c746c331564e76e8619c5c6987cd9380ce4a13f)), closes [#2861](https://github.com/hyperledger/cactus/issues/2861) -* **test-tooling:** add Stellar test ledger ([58fa94e](https://github.com/hyperledger/cactus/commit/58fa94e194f7716934e717a0e3075773ebd31b4c)), closes [#3239](https://github.com/hyperledger/cactus/issues/3239) - -### BREAKING CHANGES - -* **connector-fabric:** The Open API specification that has the enums for -ledger versions will no longer have an option for Fabric v1.x -This means that in the core-api package the LedgerType enum has changes -which means that code that depends on that enum value will need to be -updated. - -Fabric v1.x has had unmaintained dependencies associated with it such as -the native grpc package that stopped receiving security updates years ago -and therefore it's dangerous to have around. - -There are also some issues with Fabric v1.x that make the AIO image flaky -which also makes the relevant tests flaky due to which we couldn't run -the v1.x Fabric tests on the CI for a while now anyway. - -In order to reduce the CI resource usage and our own maintenance burden -I suggest that we get rid of the Fabric v1.x support meaning that we can -eliminate the AIO image build and some code complexity from the test ledger -code as well. - -In addition some old fixtures can be removed that the tests were using. -Overall a net-positive as deleting code without losing functionality (that -we care about) is always a plus. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-alpha.2](https://github.com/hyperledger/cactus/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* **security:** upgrade fabric 2.x deps to 2.2.18 ([36988a5](https://github.com/hyperledger/cactus/commit/36988a5edbf9856a1bcc960a3b9afe443536733e)), closes [#2610](https://github.com/hyperledger/cactus/issues/2610) -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cactus/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cactus/issues/2216) - -### Features - -* **besu-test-ledger:** send funds to already created address ([3a58508](https://github.com/hyperledger/cactus/commit/3a585085b4510d9755e1d70314187293cbe51222)), closes [#2250](https://github.com/hyperledger/cactus/issues/2250) -* **cbdc-bridging-app:** implementation of CBDC bridging example ([ca1b3be](https://github.com/hyperledger/cactus/commit/ca1b3be87bcc3242790647a71be8eb5db3dcd931)), closes [#2205](https://github.com/hyperledger/cactus/issues/2205) -* **connector-iroha2:** update to the new LTS image as of 28.07.2023 ([ccdaa12](https://github.com/hyperledger/cactus/commit/ccdaa1254cb4d46cc6a0af2c0472f3838603123f)) -* **connector-quorum:** add WebsocketProvider options to quorum LP ([b7ad571](https://github.com/hyperledger/cactus/commit/b7ad571e77c6b9e2abb2b5ab8ecd7ffb93172747)) -* **fabric-test-ledger:** add support to enrolling users in different Orgs ([b910681](https://github.com/hyperledger/cactus/commit/b9106810db11a2af19c8c06d6be39d2648f96fba)), closes [#2248](https://github.com/hyperledger/cactus/issues/2248) -* **quorum:** private transaction support ([3c944d6](https://github.com/hyperledger/cactus/commit/3c944d601d5824eaf3cc6a9a8af1f8a6e5fe6db3)) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-test-tooling - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -### Features - -* **cactus-plugin-persistence-ethereum:** add new persistence plugin ([617c4d3](https://github.com/hyperledger/cactus/commit/617c4d38981b450de3777dfe7d26fbc32219aca5)), closes [#2254](https://github.com/hyperledger/cactus/issues/2254) [#2256](https://github.com/hyperledger/cactus/issues/2256) - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -### Features - -* **connector-fabric:** add WatchBlocks endpoint ([6c62de4](https://github.com/hyperledger/cactus/commit/6c62de4dfb360536fc67a03cf10602e311c08a9d)), closes [#2118](https://github.com/hyperledger/cactus/issues/2118) - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -### Bug Fixes - -* **connector-iroha:** fix review comments and smaller issues ([b2742e8](https://github.com/hyperledger/cactus/commit/b2742e8f6512f9804c6b4a943947b5bbe90785f0)), closes [PR#2048](https://github.com/PR/issues/2048) -* **test-tooling:** substrate test ledger fails if WS_PORT not specified ([c668c41](https://github.com/hyperledger/cactus/commit/c668c41dcb4294530978e98349cd9158026d37e7)), closes [#2213](https://github.com/hyperledger/cactus/issues/2213) - -### Features - -* **fabric-socketio-connector:** sending transactions signed on the client-side ([0b34ca3](https://github.com/hyperledger/cactus/commit/0b34ca3d35a39826c05cc047e480d377c1c52bef)) -* **iroha2-ledger:** add Iroha V2 test ledger image and setup class ([6ff6aac](https://github.com/hyperledger/cactus/commit/6ff6aac7fff4669fca873ef40ae6b0818e70b5ec)), closes [#2138](https://github.com/hyperledger/cactus/issues/2138) -* monitoring, sync and async requests ([47da608](https://github.com/hyperledger/cactus/commit/47da608d378f5d48ca78b3d388b1c67da4c7aaf3)), closes [#1941](https://github.com/hyperledger/cactus/issues/1941) - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-tooling - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-test-tooling - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Features - -* **sawtooth-ledger:** add single sawtooth test ledger image ([cd4c746](https://github.com/hyperledger/cactus/commit/cd4c7460f6e005ce56a0d79edea6f609756bf9d5)), closes [#2108](https://github.com/hyperledger/cactus/issues/2108) [#2030](https://github.com/hyperledger/cactus/issues/2030) -* **secret:** remove Validator/Verifier secret keys from repository ([59b4af4](https://github.com/hyperledger/cactus/commit/59b4af44835e2babafe398040a280ed23e9b490e)) -* **substrate-aio:** add ws-port argument ([fbb9859](https://github.com/hyperledger/cactus/commit/fbb9859584bdd5daf88424f3571ee4204a1e6ee3)) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Features - -* **cactus-api-client:** add support for plain socketio validators in api-server and api-client ([634b10e](https://github.com/hyperledger/cactus/commit/634b10e5eaf82df08b04c11c3af5b109ede5b942)), closes [#1602](https://github.com/hyperledger/cactus/issues/1602) [#1602](https://github.com/hyperledger/cactus/issues/1602) -* **connector-corda:** enable Flow Database Access CorDapp ([60dfe1a](https://github.com/hyperledger/cactus/commit/60dfe1a772d06436132f79bf3e89589e181a783e)), closes [#1493](https://github.com/hyperledger/cactus/issues/1493) - -# [1.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2021-12-07) - -### Bug Fixes - -* **connector-fabric:** chain code deployment fails >1 scp concurrency ([71c9063](https://github.com/hyperledger/cactus/commit/71c9063a70d3ea77264d631272e792d339ffb1e3)), closes [#1570](https://github.com/hyperledger/cactus/issues/1570) -* **deps:** sibling package dependencies keychain-memory 0.6.0 [#1532](https://github.com/hyperledger/cactus/issues/1532) ([d01d72d](https://github.com/hyperledger/cactus/commit/d01d72d36200d47acac89f7ab90f6ddc96afba6f)) -* **security:** upgrade fabric-common to 2.2.10 or later ([45c4a69](https://github.com/hyperledger/cactus/commit/45c4a69fb86964bc4e7018c31c5914a0063c7638)), closes [#1600](https://github.com/hyperledger/cactus/issues/1600) - -### Features - -* **test-tooling:** embed couch-db image in the faio ([95d956d](https://github.com/hyperledger/cactus/commit/95d956d9bbfb15b15b043a753f07cbf876c33707)) -* **test-tooling:** env injenction for Besu, Fabric, Quorum AIOs ([bb0352d](https://github.com/hyperledger/cactus/commit/bb0352dad85a1acbb4fc4b34026f39f289cfa9c0)), closes [#1580](https://github.com/hyperledger/cactus/issues/1580) -* **test-tooling:** faio features and improvements ([794e8b8](https://github.com/hyperledger/cactus/commit/794e8b89aba5a7bc6144343607893bca64affda1)) - -# [1.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2021-11-01) - -### Features - -* **connector-fabric:** support for FabricSigningCredentialType.WsX509 ([50e666f](https://github.com/hyperledger/cactus/commit/50e666fa522c3ae8b2f517e694c581f04c446e13)) - -# [1.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v0.10.0...v1.0.0-rc.1) (2021-10-11) - -### Bug Fixes - -* openapi validation test for iroha plugin ([6deed6d](https://github.com/hyperledger/cactus/commit/6deed6d3f070982061e33a11064ffb8d4e752f37)), closes [#1331](https://github.com/hyperledger/cactus/issues/1331) [#847](https://github.com/hyperledger/cactus/issues/847) -* **webpack:** prod build chokes on upgraded ssh2 binaries [#1405](https://github.com/hyperledger/cactus/issues/1405) ([18979fb](https://github.com/hyperledger/cactus/commit/18979fb33880d8ca30e2fda01fb3d598deb839f9)) - -### Features - -* **besu-test-ledger:** added omitPull parameter to besu test ledger ([336a024](https://github.com/hyperledger/cactus/commit/336a0242e20b075736b1b008a478e65b4db3af8b)) -* **tools:** substrate test ledger ([1a5edea](https://github.com/hyperledger/cactus/commit/1a5edeae834bc275252e588379f214324977a3ff)) - -# [0.10.0](https://github.com/hyperledger/cactus/compare/v0.9.0...v0.10.0) (2021-09-28) - -### Bug Fixes - -* **test:** flaky fabric AIO container boot [#876](https://github.com/hyperledger/cactus/issues/876) ([beefcef](https://github.com/hyperledger/cactus/commit/beefcefbebbdb9a22d08118b6fb2e667493504cf)), closes [#718](https://github.com/hyperledger/cactus/issues/718) [#320](https://github.com/hyperledger/cactus/issues/320) [#319](https://github.com/hyperledger/cactus/issues/319) - -# [0.9.0](https://github.com/hyperledger/cactus/compare/v0.8.0...v0.9.0) (2021-08-31) - -### Features - -* besu private transaction support ([53b4980](https://github.com/hyperledger/cactus/commit/53b49808615aced96b628bf1498a1b62c5c9ca42)) -* **connector-fabric:** add support for vault transit secret engine ([2161e0d](https://github.com/hyperledger/cactus/commit/2161e0d75bac49654f0d38c8a9e2b03234894ed8)) -* **connector-iroha:** adds connector plugin ([4745df0](https://github.com/hyperledger/cactus/commit/4745df0bee6b9ab5fb9e57bb603ae95d6baeb391)) -* **iroha:** add iroha AIO image and iroha test ledger ([1eb811a](https://github.com/hyperledger/cactus/commit/1eb811a3c92f8459298c9f10b9e0d13e36d667b6)) - -# [0.8.0](https://github.com/hyperledger/cactus/compare/v0.7.0...v0.8.0) (2021-08-17) - -**Note:** Version bump only for package @hyperledger/cactus-test-tooling - -# [0.7.0](https://github.com/hyperledger/cactus/compare/v0.6.0...v0.7.0) (2021-08-04) - -### Features - -* **aws-sm:** added keychain plugin for aws secret manager ([ed6db9e](https://github.com/hyperledger/cactus/commit/ed6db9edc2064046308be91b73f620cbb2a6fb58)), closes [#912](https://github.com/hyperledger/cactus/issues/912) - -# [0.6.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.6.0) (2021-07-19) - -### Bug Fixes - -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) - -### Features - -* **atomic-swap-erc20:** implemented plugin and test ([0c9423a](https://github.com/hyperledger/cactus/commit/0c9423a2a2cd4675c3c6dec4288190f148cad938)) -* expose besu test ledger web socket API port ([e198a99](https://github.com/hyperledger/cactus/commit/e198a99f5fe7c2ac5c7bc1a8be0f0d29259871a8)) -* **keychain-vault:** add the missing endpoint classes [#676](https://github.com/hyperledger/cactus/issues/676) ([341cffc](https://github.com/hyperledger/cactus/commit/341cffcef72286169a4ceced69414618d5059d0e)) -* **test-tooling:** add besu multi-party test ledger ([89f173e](https://github.com/hyperledger/cactus/commit/89f173eea9deb15f0c2f6bd94ccefeb453fbeb39)) -* **test-tooling:** add besu test ledger log level constructor arg ([60ee32f](https://github.com/hyperledger/cactus/commit/60ee32fb0e65e8325194a8798dd8cde093a141d3)), closes [#780](https://github.com/hyperledger/cactus/issues/780) -* **test-tooling:** add keycloak container ([f1abb3e](https://github.com/hyperledger/cactus/commit/f1abb3e8d2e05aa18008da176753b240528e95e6)) -* **test-tooling:** add OpenEthereumTestLedger [#851](https://github.com/hyperledger/cactus/issues/851) ([9ca1f68](https://github.com/hyperledger/cactus/commit/9ca1f6839749450b4d8887c5af14a888225d645f)) -* **test-tooling:** containers#logDiagnostics() utility method ([ed9e125](https://github.com/hyperledger/cactus/commit/ed9e125723508827a096293c808dbfac1fdba41c)) -* **test-tooling:** go-ipfs test container ([e62b1b0](https://github.com/hyperledger/cactus/commit/e62b1b08988463fdccdd88743562081a486285f2)) -* **test-tooling:** quorum test ledger omit pull parameter ([73f84f7](https://github.com/hyperledger/cactus/commit/73f84f7399c30f6cf3e1a0c46e4b9b9ec26dbced)) -* **test-tooling:** rust compiler container for wasm builds ([ad7cdc0](https://github.com/hyperledger/cactus/commit/ad7cdc07e1f40e2b663577312ed47b1b64e9eafc)) - -# [0.5.0](https://github.com/hyperledger/cactus/compare/v0.4.1...v0.5.0) (2021-05-19) - -### Bug Fixes - -* **deps:** elliptic upgrade to >6.5.3 for CVE-2020-28498 ([d75b9af](https://github.com/hyperledger/cactus/commit/d75b9af764241ab2e10914769412201fb040b1ed)) - -### Features - -* **test-tooling:** add besu test ledger log level constructor arg ([60ee32f](https://github.com/hyperledger/cactus/commit/60ee32fb0e65e8325194a8798dd8cde093a141d3)), closes [#780](https://github.com/hyperledger/cactus/issues/780) -* **test-tooling:** add keycloak container ([f1abb3e](https://github.com/hyperledger/cactus/commit/f1abb3e8d2e05aa18008da176753b240528e95e6)) -* **test-tooling:** add OpenEthereumTestLedger [#851](https://github.com/hyperledger/cactus/issues/851) ([9ca1f68](https://github.com/hyperledger/cactus/commit/9ca1f6839749450b4d8887c5af14a888225d645f)) - -# [0.4.0](https://github.com/hyperledger/cactus/compare/v0.3.0...v0.4.0) (2021-03-30) - -### Bug Fixes - -* **general:** fixed unused deps and updated them ([b76a970](https://github.com/hyperledger/cactus/commit/b76a9703341c5a4cabe056e743338cbedebbeaad)) -* **test-tooling:** removed latest tag ([24d593d](https://github.com/hyperledger/cactus/commit/24d593d6156e8128286e6230dbb867f1afefef7d)) -* **test-tooling:** uncomment code that was forgotten ([3d635c0](https://github.com/hyperledger/cactus/commit/3d635c08b43a4001579380e63cab89adba206617)) -* **tools:** fabric AIO image log access in CI [#643](https://github.com/hyperledger/cactus/issues/643) ([9d9f805](https://github.com/hyperledger/cactus/commit/9d9f8054dfd064664b296eb4cc7e72bf6678fadf)) - -### Features - -* **common:** add containers.pruneDockerResources utility method ([d075168](https://github.com/hyperledger/cactus/commit/d0751681ec715fc20716fdc71fd0df00a01d0559)) -* **corda:** add Corda ledger support ([5623369](https://github.com/hyperledger/cactus/commit/5623369aa3b5f3b75cbafb58499b24da6efc896d)) -* **corda-connector:** params factory pattern support [#620](https://github.com/hyperledger/cactus/issues/620) ([0c3e58c](https://github.com/hyperledger/cactus/commit/0c3e58c4d1acd90d480682c7a4dfd77b95980948)) -* **corda-connector:** scp jars to nodes [#621](https://github.com/hyperledger/cactus/issues/621) ([c966769](https://github.com/hyperledger/cactus/commit/c966769ec7654596eea36d1fbc56cbf20d4e2233)) -* **keychain:** add rust keychain plugin vault implementation ([6dcdb8a](https://github.com/hyperledger/cactus/commit/6dcdb8a02db30e4dfe3d912bd56d5979b0cb3bc3)) -* **test-tooling:** add corda AIO emitContainerLogs option ([13fe677](https://github.com/hyperledger/cactus/commit/13fe67782addaccabec1d24bb2032da2d8ea3f94)) -* **test-tooling:** containers pull image retries exp. back-off [#656](https://github.com/hyperledger/cactus/issues/656) ([2735ec2](https://github.com/hyperledger/cactus/commit/2735ec27f3139222f2fa9eb2ebcfbb4272b85482)) -* **test-tooling:** containers#getById and #waitForHealthCheck ([4a7fbfe](https://github.com/hyperledger/cactus/commit/4a7fbfe19cdc269b3b197c736ecce4395b39e1e3)), closes [#471](https://github.com/hyperledger/cactus/issues/471) -* **test-tooling:** pruneDockerResources() observability [#694](https://github.com/hyperledger/cactus/issues/694) ([d92760f](https://github.com/hyperledger/cactus/commit/d92760f278ec06d26920362dc59999f274b29004)) -* **test-tooling:** utility function docker prune in GH action [#696](https://github.com/hyperledger/cactus/issues/696) ([2784ceb](https://github.com/hyperledger/cactus/commit/2784cebbf899946e3638735865dbb7e23c0a114c)) - -# [0.3.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.3.0) (2021-01-06) - -### Bug Fixes - -* **test-tooling:** bind test ledgers to port zero for macOS ([6ff1b98](https://github.com/hyperledger/cactus/commit/6ff1b981f353449a15627ec0ec724e6e4a3fbb8d)), closes [#186](https://github.com/hyperledger/cactus/issues/186) -* **test-tooling:** fabric AIO image docker in docker support ([4c2ae34](https://github.com/hyperledger/cactus/commit/4c2ae344aa9aec817e330773fc6f7b0e995ff43f)), closes [#279](https://github.com/hyperledger/cactus/issues/279) -* **test-tooling:** getContainerInfo methods lookup criteria ([7456967](https://github.com/hyperledger/cactus/commit/7456967512b0cf4e0e70f3b656de53c9690ea514)), closes [#265](https://github.com/hyperledger/cactus/issues/265) - -### Features - -* **fabric:** add run transaction endpoint ([07ff4f8](https://github.com/hyperledger/cactus/commit/07ff4f862f6d02fec5de887d73186777951b745a)) -* **fabric:** user defined fabric samples version ([8a60717](https://github.com/hyperledger/cactus/commit/8a607172f72afbdf2e0519eff3a58679975cd1ee)), closes [#391](https://github.com/hyperledger/cactus/issues/391) -* **fabric-all-in-one:** runs-a-Fabric-Network-in-one-docker-container ([703bc61](https://github.com/hyperledger/cactus/commit/703bc61a850b87176d04793545a9030b9bffc617)), closes [#132](https://github.com/hyperledger/cactus/issues/132) -* **ledger-connector-fabric:** golang chaincode deployment ([38e9780](https://github.com/hyperledger/cactus/commit/38e97808c74124bb35f0aa37e4b3d0eb42161920)), closes [#252](https://github.com/hyperledger/cactus/issues/252) [#275](https://github.com/hyperledger/cactus/issues/275) [#276](https://github.com/hyperledger/cactus/issues/276) [#277](https://github.com/hyperledger/cactus/issues/277) -* **test-tooling:** 🎸 createEthTestAccount() to Besu,Quorum test ledger ([2c0d73c](https://github.com/hyperledger/cactus/commit/2c0d73c0aba31e1d51d94d9482caad0e2d862ac9)) -* 🎸 add method: QuorumTestLedger#getGenesisAccount() ([ac19e49](https://github.com/hyperledger/cactus/commit/ac19e49b87dad7d23d9eea91e2bbca0e3a0f69e4)) -* **test-tooling:** Containers class ls() and exec() methods ([44ad88a](https://github.com/hyperledger/cactus/commit/44ad88a1f8ddc16735ef4533a1d25c9acf690d2e)), closes [#275](https://github.com/hyperledger/cactus/issues/275) - -# [0.2.0](https://github.com/hyperledger/cactus/compare/v0.1.0...v0.2.0) (2020-12-01) - -### Bug Fixes - -* **test-tooling:** bind test ledgers to port zero for macOS ([6ff1b98](https://github.com/hyperledger/cactus/commit/6ff1b981f353449a15627ec0ec724e6e4a3fbb8d)), closes [#186](https://github.com/hyperledger/cactus/issues/186) -* **test-tooling:** getContainerInfo methods lookup criteria ([7456967](https://github.com/hyperledger/cactus/commit/7456967512b0cf4e0e70f3b656de53c9690ea514)), closes [#265](https://github.com/hyperledger/cactus/issues/265) - -### Features - -* **test-tooling:** 🎸 createEthTestAccount() to Besu,Quorum test ledger ([2c0d73c](https://github.com/hyperledger/cactus/commit/2c0d73c0aba31e1d51d94d9482caad0e2d862ac9)) -* 🎸 add method: QuorumTestLedger#getGenesisAccount() ([ac19e49](https://github.com/hyperledger/cactus/commit/ac19e49b87dad7d23d9eea91e2bbca0e3a0f69e4)) -* **fabric-all-in-one:** runs-a-Fabric-Network-in-one-docker-container ([703bc61](https://github.com/hyperledger/cactus/commit/703bc61a850b87176d04793545a9030b9bffc617)), closes [#132](https://github.com/hyperledger/cactus/issues/132) -* **ledger-connector-fabric:** golang chaincode deployment ([38e9780](https://github.com/hyperledger/cactus/commit/38e97808c74124bb35f0aa37e4b3d0eb42161920)), closes [#252](https://github.com/hyperledger/cactus/issues/252) [#275](https://github.com/hyperledger/cactus/issues/275) [#276](https://github.com/hyperledger/cactus/issues/276) [#277](https://github.com/hyperledger/cactus/issues/277) -* **test-tooling:** Containers class ls() and exec() methods ([44ad88a](https://github.com/hyperledger/cactus/commit/44ad88a1f8ddc16735ef4533a1d25c9acf690d2e)), closes [#275](https://github.com/hyperledger/cactus/issues/275) diff --git a/packages/cactus-test-tooling/README.md b/packages/cactus-test-tooling/README.md deleted file mode 100644 index 3eb995365f..0000000000 --- a/packages/cactus-test-tooling/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# `@hyperledger/cactus-test-tooling` - -> TODO: description - -## Usage - -``` -// TODO: DEMONSTRATE API -``` - -## Docker image for the ws-identity server - -A docker image of the [ws-identity server](https://hub.docker.com/repository/docker/brioux/ws-identity) is used to test integration of WS-X.509 credential type in the fabric connector plugin. - -[ws-identity](https://github.com/brioux/ws-identity) includes A Docker file to build the image: -clone the repo, install packages, build src and the image - -``` -npm install -npm run build -docker build . -t [image-name] -``` - -## Stellar Test Ledger Usage - -The Stellar test ledger follows the same structure present in the test ledger tools for other networks within the Cacti project. It pulls up and manages the [Stellar Quickstart Docker Image](https://github.com/stellar/quickstart) and can be used by importing the class `StellarTestLedger`, then instantiating it with some key optional arguments to define how the image should be configure. - -- `network`: Defines if the image should pull up a pristine local ledger or alternatively connect to an existing public test ledger. Defaults to `local`. It is important to note that connecting to an existing network can take up to several minutes to synchronize the ledger state. - -- `limits`: Defines the resource limits for soroban smart contract transactions. A valid transaction and only be included in a ledger block if enough resources are available for that operation. Defaults to `testnet`, which mimics the actual resource limits applied to the mainnet based on its test environment. - -Once the class is successfully instantiated, one can start the environment by triggering - -```typescript -await stellarTestLedger.start(); -``` - -The image will be pulled up and wait until the healthcheck ensures all of its services have started successfully and are accessible, then returns the container object. - -When integrating to a Stellar environment, it is common to use a few key services provided at different ports and paths. Once the class has been started, one can use the method `getNetworkConfiguration()` to get an object containing the required information to connect to this services. - -This object is already formatted to be used with the [stellar-plus](https://github.com/CheesecakeLabs/stellar-plus) open source js library to create a custom network configuration object that integrates with its provided tools, ensuring a frictionless development flow for this test ledger. - -Once the image have been fully utilized, one can fully stop and remove the environment by triggering - -```typescript -await stellarTestLedger.stop(); -await stellarTestLedger.destroy(); -``` diff --git a/packages/cactus-test-tooling/package.json b/packages/cactus-test-tooling/package.json deleted file mode 100644 index 93c3dd5491..0000000000 --- a/packages/cactus-test-tooling/package.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-tooling", - "version": "2.0.0", - "description": "Swiss army knife for test development. Main goal is to make pulling up test/dummy ledgers on the fly for tests easy, especially for test cases that are about simulating clean ledger state or wiped ledger state, etc.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cactus#readme", - "bugs": { - "url": "https://github.com/hyperledger/cactus/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cactus.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Catarina Pedreira", - "email": "catarina.pedreira@tecnico.ulisboa.pt", - "url": "https://github.com/CatarinaPedreira" - }, - { - "name": "Rafael Belchior", - "email": "rafael.belchior@tecnico.ulisboa.pt", - "url": "https://rafaelapb.github.io/" - }, - { - "name": "Peter Somogyvari", - "email": "peter.somogyvari@accenture.com", - "url": "https://accenture.com" - }, - { - "name": "Fabricius Zatti", - "email": "fazzatti@gmail.com", - "url": "https://oififo.com" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-test-tooling.web.umd.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "watch": "npm-watch", - "webpack": "npm-run-all webpack:dev", - "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", - "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "axios": "1.7.7", - "compare-versions": "3.6.0", - "dockerode": "3.3.0", - "elliptic": "6.5.7", - "execa": "5.1.1", - "fabric-ca-client": "2.5.0-snapshot.23", - "fabric-network": "2.5.0-snapshot.23", - "fs-extra": "11.2.0", - "internal-ip": "6.2.0", - "is-port-reachable": "3.0.0", - "joi": "17.13.3", - "js-yaml": "4.1.0", - "keycloak-admin": "1.14.22", - "lodash": "4.17.21", - "node-forge": "1.3.0", - "node-ssh": "13.1.0", - "p-retry": "4.6.1", - "run-time-error-cjs": "1.4.0", - "socket.io": "4.6.2", - "socket.io-client-fixed-types": "4.5.4", - "tar-stream": "2.2.0", - "temp": "0.9.4", - "typescript-optional": "2.0.1", - "uuid": "10.0.0", - "web3": "1.6.1", - "web3-core": "1.6.1", - "web3-utils": "1.6.1" - }, - "devDependencies": { - "@aries-framework/askar": "0.5.0-alpha.58", - "@aries-framework/core": "0.5.0-alpha.58", - "@aries-framework/indy-vdr": "0.5.0-alpha.58", - "@aries-framework/node": "0.5.0-alpha.58", - "@hyperledger/aries-askar-nodejs": "0.2.0", - "@hyperledger/indy-vdr-nodejs": "0.2.0", - "@types/dockerode": "3.2.7", - "@types/esm": "3.2.0", - "@types/fs-extra": "11.0.4", - "@types/js-yaml": "4.0.3", - "@types/lodash": "4.14.172", - "@types/node": "18.11.9", - "@types/node-forge": "1.3.0", - "@types/ssh2": "0.5.47", - "@types/ssh2-streams": "0.1.9", - "@types/tar-stream": "2.2.1", - "@types/temp": "0.9.1", - "esm": "3.2.25", - "temp": "0.9.4" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cactus-test-tooling.web.umd.min.js", - "mainMinified": "dist/cactus-test-tooling.node.umd.min.js", - "watch": {} -} diff --git a/packages/cactus-test-tooling/src/main/typescript/besu/besu-mp-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/besu/besu-mp-test-ledger.ts deleted file mode 100644 index 3d4a99d8f3..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/besu/besu-mp-test-ledger.ts +++ /dev/null @@ -1,236 +0,0 @@ -import Dockerode from "dockerode"; -import type { Container } from "dockerode"; -import { Optional } from "typescript-optional"; -import { - Logger, - Checks, - LogLevelDesc, - Bools, -} from "@hyperledger/cactus-common"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { Containers } from "../common/containers"; -import { RuntimeError } from "run-time-error-cjs"; -import { EventEmitter } from "events"; - -export interface IBesuMpTestLedgerOptions { - readonly logLevel?: LogLevelDesc; - readonly imageName?: string; - readonly imageTag?: string; - readonly emitContainerLogs?: boolean; - readonly autoRemove?: boolean; - readonly envVars?: Map; -} - -export class BesuMpTestLedger { - public static readonly CLASS_NAME = "BesuMpTestLedger"; - - private readonly log: Logger; - - private readonly _imageName: string; - private readonly _imageTag: string; - private readonly _imageFqn: string; - private readonly _emitContainerLogs: boolean; - private readonly _autoRemove: boolean; - private readonly _envVars: Map; - - private _containerId: Optional; - - public get containerId(): Optional { - return this._containerId; - } - - public get envVars(): Map { - return this._envVars; - } - - public get imageTag(): string { - return this._imageTag; - } - - public get imageName(): string { - return this._imageName; - } - - public get imageFqn(): string { - return this._imageFqn; - } - - public get autoRemove(): boolean { - return this._autoRemove; - } - - public get emitContainerLogs(): boolean { - return this._emitContainerLogs; - } - - public get container(): Optional { - const docker = new Dockerode(); - return this.containerId.isPresent() - ? Optional.ofNonNull(docker.getContainer(this.containerId.get())) - : Optional.empty(); - } - - public get className(): string { - return BesuMpTestLedger.CLASS_NAME; - } - - constructor(public readonly options: IBesuMpTestLedgerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - this._containerId = Optional.empty(); - - this._imageName = - options.imageName || - "ghcr.io/hyperledger/cactus-besu-all-in-one-multi-party"; - this._imageTag = options.imageTag || "2021-08-13--private-tx"; - this._imageFqn = `${this._imageName}:${this._imageTag}`; - - this._envVars = options.envVars || new Map(); - this._emitContainerLogs = Bools.isBooleanStrict(options.emitContainerLogs) - ? (options.emitContainerLogs as boolean) - : true; - this._autoRemove = Bools.isBooleanStrict(options.autoRemove) - ? (options.autoRemove as boolean) - : true; - const level = this.options.logLevel || "INFO"; - const label = this.className; - - this.log = LoggerProvider.getOrCreate({ level, label }); - this.log.debug(`Instantiated ${this.className} OK`); - } - - public async start(omitPull = false): Promise { - const docker = new Dockerode(); - if (this.containerId.isPresent()) { - this.log.warn(`Container ID provided. Will not start new one.`); - const container = docker.getContainer(this.containerId.get()); - return container; - } - if (!omitPull) { - await Containers.pullImage(this.imageFqn, {}, this.options.logLevel); - } - - const dockerEnvVars: string[] = new Array(...this.envVars).map( - (pairs) => `${pairs[0]}=${pairs[1]}`, - ); - - const createOptions = { - HostConfig: { - AutoRemove: this.autoRemove, - Env: dockerEnvVars, - Privileged: true, - PublishAllPorts: true, - }, - }; - - this.log.debug(`Starting ${this.imageFqn} with options: `, createOptions); - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - this.imageFqn, - [], - [], - createOptions, - {}, - (err: Error) => { - if (err) { - const errorMessage = `Failed to start container ${this.imageFqn}`; - const exception = new RuntimeError(errorMessage, err); - this.log.error(exception); - reject(exception); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - const { id } = container; - this.log.debug(`Started ${this.imageFqn} successfully. ID=${id}`); - this._containerId = Optional.ofNonNull(id); - - if (this.emitContainerLogs) { - const fnTag = `[${this.imageFqn}]`; - await Containers.streamLogs({ - container: this.container.get(), - tag: fnTag, - log: this.log, - }); - } - - try { - await Containers.waitForHealthCheck(this.containerId.get()); - resolve(container); - } catch (ex) { - this.log.error(ex); - reject(ex); - } - }); - }); - } - - public async stop(): Promise { - return Containers.stop(this.container.get()); - } - - public async destroy(): Promise { - return this.container.get().remove(); - } - - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - public async getKeys() { - const containerId = this.containerId.orElseThrow( - () => new RuntimeError("Invalid state: Dockerode Container ID not set."), - ); - const container = await Containers.getById(containerId); - const member1HttpPort = await Containers.getPublicPort(20000, container); - const member1WsPort = await Containers.getPublicPort(20001, container); - - const member2HttpPort = await Containers.getPublicPort(20002, container); - const member2WsPort = await Containers.getPublicPort(20003, container); - - const member3HttpPort = await Containers.getPublicPort(20004, container); - const member3WsPort = await Containers.getPublicPort(20005, container); - - const ethSignerProxyPort = await Containers.getPublicPort(18545, container); - - // WARNING: the keys here are demo purposes ONLY. - // Please use a tool like Orchestrate or EthSigner for production, rather than hard coding private keys - return { - tessera: { - member1: { - publicKey: "BULeR8JyUWhiuuCMU/HLA0Q5pzkYT+cHII3ZKBey3Bo=", - }, - member2: { - publicKey: "QfeDAys9MPDs2XHExtc84jKGHxZg/aj52DTh0vtA3Xc=", - }, - member3: { - publicKey: "1iTZde/ndBHvzhcl7V68x44Vx7pl8nwx9LqnM/AfJUg=", - }, - }, - besu: { - member1: { - url: `http://127.0.0.1:${member1HttpPort}`, - wsUrl: `ws://127.0.0.1:${member1WsPort}`, - privateKey: - "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63", - }, - member2: { - url: `http://127.0.0.1:${member2HttpPort}`, - wsUrl: `ws://127.0.0.1:${member2WsPort}`, - privateKey: - "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3", - }, - member3: { - url: `http://127.0.0.1:${member3HttpPort}`, - wsUrl: `ws://127.0.0.1:${member3WsPort}`, - privateKey: - "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f", - }, - ethsignerProxy: { - url: `http://127.0.0.1:${ethSignerProxyPort}`, - accountAddress: "9b790656b9ec0db1936ed84b3bea605873558198", - }, - }, - }; - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts deleted file mode 100644 index ff7072aa39..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts +++ /dev/null @@ -1,441 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import Docker, { Container, ContainerInfo } from "dockerode"; -import Joi from "joi"; -import tar from "tar-stream"; -import { EventEmitter } from "events"; -import Web3 from "web3"; -import { Account, TransactionReceipt } from "web3-core"; -import { - LogLevelDesc, - Logger, - LoggerProvider, - Bools, -} from "@hyperledger/cactus-common"; -import { ITestLedger } from "../i-test-ledger"; -import { Streams } from "../common/streams"; -import { IKeyPair } from "../i-key-pair"; -import { Containers } from "../common/containers"; - -export interface IBesuTestLedgerConstructorOptions { - containerImageVersion?: string; - containerImageName?: string; - rpcApiHttpPort?: number; - rpcApiWsPort?: number; - envVars?: string[]; - logLevel?: LogLevelDesc; - emitContainerLogs?: boolean; -} - -export const BESU_TEST_LEDGER_DEFAULT_OPTIONS = Object.freeze({ - containerImageVersion: "2021-01-08-7a055c3", - containerImageName: "ghcr.io/hyperledger/cactus-besu-all-in-one", - rpcApiHttpPort: 8545, - rpcApiWsPort: 8546, - envVars: ["BESU_NETWORK=dev"], -}); - -export const BESU_TEST_LEDGER_OPTIONS_JOI_SCHEMA: Joi.Schema = - Joi.object().keys({ - containerImageVersion: Joi.string().min(5).required(), - containerImageName: Joi.string().min(1).required(), - rpcApiHttpPort: Joi.number() - .integer() - .positive() - .min(1024) - .max(65535) - .required(), - envVars: Joi.array().allow(null).required(), - }); - -export class BesuTestLedger implements ITestLedger { - public readonly containerImageVersion: string; - public readonly containerImageName: string; - public readonly rpcApiHttpPort: number; - public readonly rpcApiWsPort: number; - public readonly envVars: string[]; - public readonly emitContainerLogs: boolean; - - private readonly log: Logger; - private container: Container | undefined; - private containerId: string | undefined; - - constructor(public readonly options: IBesuTestLedgerConstructorOptions = {}) { - if (!options) { - throw new TypeError(`BesuTestLedger#ctor options was falsy.`); - } - this.containerImageVersion = - options.containerImageVersion || - BESU_TEST_LEDGER_DEFAULT_OPTIONS.containerImageVersion; - this.containerImageName = - options.containerImageName || - BESU_TEST_LEDGER_DEFAULT_OPTIONS.containerImageName; - this.rpcApiHttpPort = - options.rpcApiHttpPort || BESU_TEST_LEDGER_DEFAULT_OPTIONS.rpcApiHttpPort; - this.rpcApiWsPort = - options.rpcApiWsPort || BESU_TEST_LEDGER_DEFAULT_OPTIONS.rpcApiWsPort; - this.envVars = options.envVars || BESU_TEST_LEDGER_DEFAULT_OPTIONS.envVars; - - this.emitContainerLogs = Bools.isBooleanStrict(options.emitContainerLogs) - ? (options.emitContainerLogs as boolean) - : true; - - this.validateConstructorOptions(); - const label = "besu-test-ledger"; - const level = options.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getContainer(): Container { - const fnTag = "BesuTestLedger#getContainer()"; - if (!this.container) { - throw new Error(`${fnTag} container not yet started by this instance.`); - } else { - return this.container; - } - } - - public getContainerImageName(): string { - return `${this.containerImageName}:${this.containerImageVersion}`; - } - - public async getRpcApiHttpHost(): Promise { - const ipAddress = "127.0.0.1"; - const hostPort: number = await this.getRpcApiPublicPort(); - return `http://${ipAddress}:${hostPort}`; - } - - public async getRpcApiWsHost(): Promise { - const { rpcApiWsPort } = this; - const ipAddress = "127.0.0.1"; - const containerInfo = await this.getContainerInfo(); - const port = await Containers.getPublicPort(rpcApiWsPort, containerInfo); - return `ws://${ipAddress}:${port}`; - } - - public async getFileContents(filePath: string): Promise { - const response = await this.getContainer().getArchive({ - path: filePath, - }); - const extract: tar.Extract = tar.extract({ autoDestroy: true }); - - return new Promise((resolve, reject) => { - let fileContents = ""; - extract.on("entry", async (header: unknown, stream, next) => { - stream.on("error", (err: Error) => { - reject(err); - }); - const chunks: string[] = await Streams.aggregate(stream); - fileContents += chunks.join(""); - stream.resume(); - next(); - }); - - extract.on("finish", () => { - resolve(fileContents); - }); - - response.pipe(extract); - }); - } - - /** - * Output is based on the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - public getGenesisAccountPubKey(): string { - return "0x627306090abaB3A6e1400e9345bC60c78a8BEf57"; - } - - /** - * Output is based on the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - public getGenesisAccountPrivKey(): string { - return "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3"; - } - - /** - * Creates a new ETH account from scratch on the ledger and then sends it a - * little seed money to get things started. - * - * @param [seedMoney=10e8] The amount of money to seed the new test account with. - */ - public async createEthTestAccount(seedMoney = 10e8): Promise { - const rpcApiHttpHost = await this.getRpcApiHttpHost(); - const web3 = new Web3(rpcApiHttpHost); - const ethTestAccount = web3.eth.accounts.create(uuidv4()); - - await this.sendEthToAccount(ethTestAccount.address, seedMoney); - - return ethTestAccount; - } - - /** - * Sends seed money to a provided address to get things started. - * - * @param [seedMoney=10e8] The amount of money to seed the new test account with. - */ - public async sendEthToAccount( - address: string, - seedMoney = 10e8, - ): Promise { - const fnTag = `BesuTestLedger#sendEthToAccount()`; - - const rpcApiHttpHost = await this.getRpcApiHttpHost(); - const web3 = new Web3(rpcApiHttpHost); - - const tx = await web3.eth.accounts.signTransaction( - { - from: this.getGenesisAccountPubKey(), - to: address, - value: seedMoney, - gas: 1000000, - }, - this.getGenesisAccountPrivKey(), - ); - - if (!tx.rawTransaction) { - throw new Error(`${fnTag} Signing transaction failed, reason unknown.`); - } - - const receipt = await web3.eth.sendSignedTransaction(tx.rawTransaction); - - if (receipt instanceof Error) { - throw receipt; - } - return receipt; - } - - public async getBesuKeyPair(): Promise { - const publicKey = await this.getFileContents("/opt/besu/keys/key.pub"); - const privateKey = await this.getFileContents("/opt/besu/keys/key"); - return { publicKey, privateKey }; - } - - public async getOrionKeyPair(): Promise { - const publicKey = await this.getFileContents("/config/orion/nodeKey.pub"); - const privateKey = await this.getFileContents("/config/orion/nodeKey.key"); - return { publicKey, privateKey }; - } - - public async start(omitPull = false): Promise { - const imageFqn = this.getContainerImageName(); - - if (this.container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - if (!omitPull) { - this.log.debug(`Pulling container image ${imageFqn} ...`); - await this.pullContainerImage(imageFqn); - this.log.debug(`Pulled ${imageFqn} OK. Starting container...`); - } - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - imageFqn, - [], - [], - { - ExposedPorts: { - [`${this.rpcApiHttpPort}/tcp`]: {}, // besu RPC - HTTP - [`${this.rpcApiWsPort}/tcp`]: {}, // besu RPC - WebSocket - "8888/tcp": {}, // orion Client Port - HTTP - "8080/tcp": {}, // orion Node Port - HTTP - "9001/tcp": {}, // supervisord - HTTP - "9545/tcp": {}, // besu metrics - }, - // TODO: this can be removed once the new docker image is published and - // specified as the default one to be used by the tests. - Healthcheck: { - Test: [ - "CMD-SHELL", - `curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' 127.0.0.1:8545`, - ], - Interval: 1000000000, // 1 second - Timeout: 3000000000, // 3 seconds - Retries: 299, - StartPeriod: 3000000000, // 1 second - }, - HostConfig: { - PublishAllPorts: true, - }, - Env: this.envVars, - }, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.log.debug(`Started container OK. Waiting for healthcheck...`); - this.container = container; - this.containerId = container.id; - - if (this.emitContainerLogs) { - const fnTag = `[${this.getContainerImageName()}]`; - await Containers.streamLogs({ - container: this.getContainer(), - tag: fnTag, - log: this.log, - }); - } - - try { - await this.waitForHealthCheck(); - this.log.debug(`Healthcheck passing OK.`); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async waitForHealthCheck(timeoutMs = 360000): Promise { - const fnTag = "BesuTestLedger#waitForHealthCheck()"; - const startedAt = Date.now(); - let isHealthy = false; - do { - if (Date.now() >= startedAt + timeoutMs) { - throw new Error(`${fnTag} timed out (${timeoutMs}ms)`); - } - const { Status, State } = await this.getContainerInfo(); - this.log.debug(`ContainerInfo.Status=%o, State=O%`, Status, State); - isHealthy = Status.endsWith("(healthy)"); - if (!isHealthy) { - await new Promise((resolve2) => setTimeout(resolve2, 1000)); - } - } while (!isHealthy); - } - - public stop(): Promise { - const fnTag = "BesuTestLedger#stop()"; - return new Promise((resolve, reject) => { - if (this.container) { - this.container.stop({}, (err: unknown, result: unknown) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - } else { - return reject(new Error(`${fnTag} Container was not running.`)); - } - }); - } - - public destroy(): Promise { - const fnTag = "BesuTestLedger#destroy()"; - if (this.container) { - return this.container.remove(); - } else { - const ex = new Error(`${fnTag} Container not found, nothing to destroy.`); - return Promise.reject(ex); - } - } - - protected async getContainerInfo(): Promise { - const docker = new Docker(); - const image = this.getContainerImageName(); - const containerInfos = await docker.listContainers({}); - - let aContainerInfo; - if (this.containerId !== undefined) { - aContainerInfo = containerInfos.find((ci) => ci.Id === this.containerId); - } - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error(`BesuTestLedger#getContainerInfo() no image "${image}"`); - } - } - - public async getRpcApiPublicPort(): Promise { - const fnTag = "BesuTestLedger#getRpcApiPublicPort()"; - const aContainerInfo = await this.getContainerInfo(); - const { rpcApiHttpPort: thePort } = this; - const { Ports: ports } = aContainerInfo; - - if (ports.length < 1) { - throw new Error(`${fnTag} no ports exposed or mapped at all`); - } - const mapping = ports.find((x) => x.PrivatePort === thePort); - if (mapping) { - if (!mapping.PublicPort) { - throw new Error(`${fnTag} port ${thePort} mapped but not public`); - } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); - } else { - return mapping.PublicPort; - } - } else { - throw new Error(`${fnTag} no mapping found for ${thePort}`); - } - } - - public async getContainerIpAddress(): Promise { - const fnTag = "BesuTestLedger#getContainerIpAddress()"; - const aContainerInfo = await this.getContainerInfo(); - - if (aContainerInfo) { - const { NetworkSettings } = aContainerInfo; - const networkNames: string[] = Object.keys(NetworkSettings.Networks); - if (networkNames.length < 1) { - throw new Error(`${fnTag} container not connected to any networks`); - } else { - // return IP address of container on the first network that we found - // it connected to. Make this configurable? - return NetworkSettings.Networks[networkNames[0]].IPAddress; - } - } else { - throw new Error(`${fnTag} cannot find image: ${this.containerImageName}`); - } - } - - private pullContainerImage(containerNameAndTag: string): Promise { - return new Promise((resolve, reject) => { - const docker = new Docker(); - docker.pull(containerNameAndTag, (pullError: unknown, stream: never) => { - if (pullError) { - reject(pullError); - } else { - docker.modem.followProgress( - stream, - (progressError: unknown, output: unknown[]) => { - if (progressError) { - reject(progressError); - } else { - resolve(output); - } - }, - ); - } - }); - }); - } - - private validateConstructorOptions(): void { - const validationResult = BESU_TEST_LEDGER_OPTIONS_JOI_SCHEMA.validate({ - containerImageVersion: this.containerImageVersion, - containerImageName: this.containerImageName, - rpcApiHttpPort: this.rpcApiHttpPort, - envVars: this.envVars, - }); - - if (validationResult.error) { - throw new Error( - `BesuTestLedger#ctor ${validationResult.error.annotate()}`, - ); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/cactus-keychain-vault-server/cactus-keychain-vault-server.ts b/packages/cactus-test-tooling/src/main/typescript/cactus-keychain-vault-server/cactus-keychain-vault-server.ts deleted file mode 100644 index 80af323f99..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/cactus-keychain-vault-server/cactus-keychain-vault-server.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { EventEmitter } from "events"; - -import Docker, { Container } from "dockerode"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { Containers } from "../common/containers"; - -export interface ICactusKeychainVaultServerOptions { - envVars?: string[]; - imageVersion?: string; - imageName?: string; - logLevel?: LogLevelDesc; -} - -export const K_DEFAULT_KEYCHAIN_VAULT_IMAGE_NAME = - "ghcr.io/hyperledger/cactus-keychain-vault-server"; -export const K_DEFAULT_KEYCHAIN_VAULT_IMAGE_VERSION = "v1.0.0-rc.3"; -export const K_DEFAULT_KEYCHAIN_VAULT_HTTP_PORT = 8080; - -/** - * Class responsible for programmatically managing a container that is running - * the image made for hosting a keychain plugin, written in the Rust language. - */ -export class CactusKeychainVaultServer { - public static readonly CLASS_NAME = "CactusKeychainVaultServer"; - - private readonly log: Logger; - private readonly imageName: string; - private readonly imageVersion: string; - private readonly envVars: string[]; - - private container: Container | undefined; - private containerId: string | undefined; - - public get className(): string { - return CactusKeychainVaultServer.CLASS_NAME; - } - - public get imageFqn(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - constructor(public readonly options: ICactusKeychainVaultServerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.imageName = - this.options.imageName || K_DEFAULT_KEYCHAIN_VAULT_IMAGE_NAME; - this.imageVersion = - this.options.imageVersion || K_DEFAULT_KEYCHAIN_VAULT_IMAGE_VERSION; - this.envVars = this.options.envVars || []; - - this.log.info(`Created ${this.className} OK. Image FQN: ${this.imageFqn}`); - } - - public async start(): Promise { - if (this.container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - await Containers.pullImage(this.imageFqn, {}, this.options.logLevel); - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - this.imageFqn, - [], - [], - { - Env: this.envVars, - HostConfig: { - PublishAllPorts: true, - }, - }, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.container = container; - this.containerId = container.id; - try { - await Containers.waitForHealthCheck(this.containerId); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async stop(): Promise { - await Containers.stop(this.container as Container); - } - - public destroy(): Promise { - const fnTag = `${this.className}#destroy()`; - if (this.container) { - return this.container.remove(); - } else { - const ex = new Error(`${fnTag} Container not found, nothing to destroy.`); - return Promise.reject(ex); - } - } - - public async getHostPortHttp(): Promise { - const fnTag = `${this.className}#getHostPortHttp()`; - if (this.containerId) { - const cInfo = await Containers.getById(this.containerId); - return Containers.getPublicPort( - K_DEFAULT_KEYCHAIN_VAULT_HTTP_PORT, - cInfo, - ); - } else { - throw new Error(`${fnTag} Container ID not set. Did you call start()?`); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/common/base64-file.ts b/packages/cactus-test-tooling/src/main/typescript/common/base64-file.ts deleted file mode 100644 index bfbf55c366..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/common/base64-file.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Represents a file on the file-system, but encoded in - * base64 (its contents). - */ -export interface Base64File { - /** - * The name of the file as represented on a file system. - * @type {string} - * @memberof Base64File - */ - filename: string; - - /** - * The contents of the file, encoded as Base64. - * @type {string} - * @memberof Base64File - */ - contentBase64: string; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/common/build-container-image.ts b/packages/cactus-test-tooling/src/main/typescript/common/build-container-image.ts deleted file mode 100644 index 9bdd7d471e..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/common/build-container-image.ts +++ /dev/null @@ -1,102 +0,0 @@ -import Docker, { ImageBuildContext, ImageBuildOptions } from "dockerode"; - -import { - createRuntimeErrorWithCause, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -export interface IBuildContainerImageRequest { - readonly logLevel: LogLevelDesc; - readonly buildDir: Readonly; - readonly imageFile: Readonly; - readonly imageTag: Readonly; - readonly dockerEngine?: Readonly; - readonly dockerodeImageBuildOptions?: Partial; - readonly dockerodeImageBuildContext?: Partial; -} - -export interface IBuildImageResultFail { - readonly errorDetail: { - readonly code: Readonly; - readonly message: Readonly; - }; - readonly error: string; -} - -export function isIBuildImageResultFail( - x: unknown, -): x is IBuildImageResultFail { - if (!x) { - return false; - } - return ( - typeof (x as IBuildImageResultFail).error === "string" && - typeof (x as IBuildImageResultFail).errorDetail === "object" && - typeof (x as IBuildImageResultFail).errorDetail.code === "number" && - typeof (x as IBuildImageResultFail).errorDetail.message === "string" - ); -} - -export async function buildContainerImage( - req: Readonly, -): Promise { - if (!req) { - throw new Error("Expected arg req to be truthy."); - } - if (!req.buildDir) { - throw new Error("Expected arg req.buildDir to be truthy."); - } - if (!req.imageFile) { - throw new Error("Expected arg req.imageFile to be truthy."); - } - const logLevel: LogLevelDesc = req.logLevel || "INFO"; - const dockerEngine = req.dockerEngine || new Docker(); - - const log = LoggerProvider.getOrCreate({ - label: "build-container-image", - level: logLevel, - }); - - const imageBuildOptions: ImageBuildOptions = { - ...req.dockerodeImageBuildOptions, - t: req.imageTag, - }; - log.debug("imageBuildOptions=%o", imageBuildOptions); - - const imageBuildContext: ImageBuildContext = { - context: req.buildDir, - src: [req.imageFile, "."], - ...req.dockerodeImageBuildContext, - }; - log.debug("imageBuildContext=%o", imageBuildContext); - - const stream = await dockerEngine.buildImage( - imageBuildContext, - imageBuildOptions, - ); - - const buildErrors: IBuildImageResultFail[] = []; - stream.on("data", (data: unknown) => { - if (data instanceof Buffer) { - const logRowJson = data.toString("utf-8"); - const logRow = JSON.parse(logRowJson); - if (isIBuildImageResultFail(logRow)) { - buildErrors.push(logRow); - } - log.debug("[Build]: %s", logRowJson); - } - }); - - const out = await new Promise((resolve, reject) => { - dockerEngine.modem.followProgress(stream, (err, res) => - err ? reject(err) : resolve(res), - ); - }); - - if (buildErrors.length > 0) { - const eMsg = `Could not build image ${req.imageTag} from ${req.buildDir}/${req.imageFile}`; - throw createRuntimeErrorWithCause(eMsg, { buildErrors }); - } - return out; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/common/containers.ts b/packages/cactus-test-tooling/src/main/typescript/common/containers.ts deleted file mode 100644 index 4b575e9a4b..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/common/containers.ts +++ /dev/null @@ -1,684 +0,0 @@ -import path from "path"; -import { Duplex } from "stream"; -import { IncomingMessage } from "http"; -import throttle from "lodash/throttle"; -import { Container, ContainerInfo } from "dockerode"; -import Dockerode from "dockerode"; -import execa from "execa"; -import tar from "tar-stream"; -import fs from "fs-extra"; -import pRetry from "p-retry"; -import { RuntimeError } from "run-time-error-cjs"; -import { Streams } from "../common/streams"; -import { - Checks, - LogLevelDesc, - LoggerProvider, - Strings, - ILoggerOptions, - Logger, -} from "@hyperledger/cactus-common"; -import { IDockerPullProgress } from "./i-docker-pull-progress"; - -export interface IPruneDockerResourcesRequest { - logLevel?: LogLevelDesc; -} - -/** - * Contains a combined report of the resource pruning performed - * by the similarly named utility method of the `Containers` class. - * All the properties are optional because the method does a best - * effort algorithm with the pruning meaning that all failures are - * ignored in favor of continuing with trying to prune other - * resources, meaning that all four pruning categories (container, volume, network, image) - * are attempted regardless of how many of them succeed or fail. - * Based on the above, it is never known for sure if the response object - * will contain all, some or none of it's properties at all. - */ -export interface IPruneDockerResourcesResponse { - containers?: Dockerode.PruneContainersInfo; - images?: Dockerode.PruneImagesInfo; - networks?: Dockerode.PruneNetworksInfo; - volumes?: Dockerode.PruneVolumesInfo; -} - -export interface IPushFileFromFsOptions { - /** - * The dockerode container object to send the files to OR a docker container ID that will be used to look up an - * existing container (it is expected that it is already running). - */ - containerOrId: Container | string; - srcFileName?: string; - srcFileDir?: string; - srcFileAsString?: string; - dstFileName: string; - dstFileDir: string; -} - -export interface IGetDiagnosticsRequest { - logLevel: LogLevelDesc; - dockerodeOptions?: Dockerode.DockerOptions; -} - -export interface IGetDiagnosticsResponse { - readonly images: Dockerode.ImageInfo[]; - readonly containers: Dockerode.ContainerInfo[]; - readonly volumes: { - Volumes: Dockerode.VolumeInspectInfo[]; - Warnings: string[]; - }; - readonly networks: unknown[]; - readonly info: unknown; - readonly version: Dockerode.DockerVersion; -} - -export class Containers { - /** - * Obtains container diagnostic information that is mainly meant to be useful - * in the event of a hard-to-debug test failure. - */ - static async getDiagnostics( - req: IGetDiagnosticsRequest, - ): Promise { - const log = LoggerProvider.getOrCreate({ - label: "containers#get-diagnostics", - level: req.logLevel, - }); - - try { - const dockerode = new Dockerode(req.dockerodeOptions); - const images = await dockerode.listImages(); - const containers = await dockerode.listContainers(); - const volumes = await dockerode.listVolumes(); - const networks = await dockerode.listNetworks(); - const info = await dockerode.info(); - const version = await dockerode.version(); - - const response: IGetDiagnosticsResponse = { - images, - containers, - volumes, - networks, - info, - version, - }; - return response; - } catch (ex) { - log.error("Failed to get diagnostics of Docker daemon", ex); - throw new RuntimeError("Failed to get diagnostics of Docker daemon", ex); - } - } - /** - * Obtains container diagnostic information that is mainly meant to be useful - * in the event of a hard-to-debug test failure. - */ - static async logDiagnostics( - req: IGetDiagnosticsRequest, - ): Promise { - const log = LoggerProvider.getOrCreate({ - label: "containers#log-diagnostics", - level: req.logLevel, - }); - - const response = await Containers.getDiagnostics(req); - log.info("ContainerDiagnostics=%o", JSON.stringify(response, null, 4)); - return response; - } - - /** - * Uploads a file from the local (host) file system to a container's file-system. - * - * @param container - * @param srcPath File system path on the host's FS, pointing to the file that will be uploaded to the container. - * @param dstPath The path on the container's own file system where `srcPath` file will be placed. - */ - static async putFile(opts: IPushFileFromFsOptions): Promise { - if (!opts) { - throw new TypeError("Containers#putFileFromFs() opts was falsy."); - } - let container: Container; - if (typeof opts.containerOrId === "string") { - const docker = new Dockerode(); - container = docker.getContainer(opts.containerOrId); - } else { - container = opts.containerOrId; - } - - const fileAsTarStream = await new Promise((resolve, reject) => { - let fileAsString; - if (opts.srcFileAsString) { - fileAsString = opts.srcFileAsString; - } else if (opts.srcFileDir && opts.srcFileName) { - const srcFilePath = path.join(opts.srcFileDir, opts.srcFileName); - fileAsString = fs.readFileSync(srcFilePath); - } else { - const msg = "Containers#putFileFromFs: need file as string or dir+name"; - reject(new Error(msg)); - return; - } - - const pack = tar.pack({ autoDestroy: true }); - - pack.entry({ name: opts.dstFileName }, fileAsString, (err: unknown) => { - if (err) { - reject(err); - } else { - pack.finalize(); - resolve(pack); - } - }); - }); - - return new Promise((resolve, reject) => { - const handler = (err: unknown, data: unknown) => { - if (err) { - reject(err); - } else { - resolve(data as IncomingMessage); - } - }; - - container.putArchive( - fileAsTarStream, - { - path: opts.dstFileDir, - }, - handler, - ); - }); - } - - /** - * Reads the contents of a file from a container's file system and returns a promise of that string. - * - * @param container The dockerode container to use when pulling the file. - * @param filePath The path on the container's own file system where the file you want pulled is located. - */ - static async pullFile( - container: Container, - filePath: string, - encoding: - | "ascii" - | "utf8" - | "utf-8" - | "utf16le" - | "ucs2" - | "ucs-2" - | "base64" - | "latin1" - | "binary" - | "hex" - | undefined = "utf-8", - ): Promise { - Checks.truthy(container, "Containers#pullFile() container"); - Checks.truthy(filePath, "Containers#pullFile() filePath"); - - const response = await container.getArchive({ path: filePath }); - const extract: tar.Extract = tar.extract({ autoDestroy: true }); - - return new Promise((resolve, reject) => { - let fileContents = ""; - extract.on("entry", async (header: unknown, stream, next) => { - stream.on("error", (err: Error) => { - reject(err); - }); - const chunks = await Streams.aggregate(stream, encoding); - fileContents += chunks.join(""); - stream.resume(); - next(); - }); - - extract.on("finish", () => { - resolve(fileContents); - }); - - response.pipe(extract); - }); - } - - /** - * Reads the contents of a file from a container's file system and returns a promise of that string. - * - * @param container The dockerode container to use when pulling the file. - * @param filePath The path on the container's own file system where the file you want pulled is located. - */ - static async pullBinaryFile( - container: Container, - filePath: string, - ): Promise { - const fnTag = `Containers#pullFile()`; - Checks.truthy(container, `${fnTag} container`); - Checks.truthy(filePath, `${fnTag} filePath`); - - const response = await container.getArchive({ path: filePath }); - const extract: tar.Extract = tar.extract({ autoDestroy: true }); - - return new Promise((resolve, reject) => { - let buffer: Buffer; - extract.on("entry", async (header: unknown, stream, next) => { - stream.on("error", (err: Error) => { - reject(err); - }); - const buffers = await Streams.aggregateToBuffer(stream); - if (buffer) { - reject(new Error(`${fnTag} Multiple entries from: ${filePath}`)); - } - buffer = Buffer.concat(buffers); - stream.resume(); - next(); - }); - - extract.on("finish", () => { - resolve(buffer); - }); - - response.pipe(extract); - }); - } - - /** - * - * @param container The docker container to execute the `ls` command in. - * @param dir The directory path to pass in to the `ls` binary for listing. - */ - public static async ls(container: Container, dir: string): Promise { - const fnTag = "Containers#ls()"; - Checks.truthy(container, `${fnTag} container`); - Checks.truthy(dir, `${fnTag} path`); - Checks.truthy(typeof dir === "string", `${fnTag} path typeof string`); - Checks.truthy(dir.length > 0, `${fnTag} path non blank`); - - const cmdArgs = ["ls", "-A", "-1", "-q", dir]; - const output = await Containers.exec(container, cmdArgs); - return output - .split(`\n`) - .map((str) => Strings.dropNonPrintable(str)) // drop SOH, NUL, etc. ... - .filter((str) => str); // drop empty strings - } - - /** - * - * Note about `Tty: true` this is necessary because otherwise docker injects - * 8 bytes of custom data to the beginning of each line. See details: - * @link https://github.com/moby/moby/issues/7375#issuecomment-51462963 - * - * @param container The container to execute `cmd` in. - * @param cmd The list of strings that make up the command itself. - * - */ - public static async exec( - container: Container, - cmd: string[], - timeoutMs = 300000, // 5 minutes default timeout - logLevel: LogLevelDesc = "INFO", - workingDir?: string, - ): Promise { - const fnTag = "Containers#exec()"; - Checks.truthy(container, `${fnTag} container`); - Checks.truthy(cmd, `${fnTag} cmd`); - Checks.truthy(Array.isArray(cmd), `${fnTag} isArray(cmd)`); - Checks.truthy(cmd.length > 0, `${fnTag} path non empty array`); - Checks.nonBlankString(logLevel, `${fnTag} logLevel`); - - const log = LoggerProvider.getOrCreate({ label: fnTag, level: logLevel }); - - const execOptions: Record = { - Cmd: cmd, - AttachStdout: true, - AttachStderr: true, - Tty: true, - }; - if (workingDir) { - execOptions.WorkingDir = workingDir; - } - const exec = await container.exec(execOptions); - - return new Promise((resolve, reject) => { - log.debug(`Calling Exec Start on Docker Engine API...`); - - exec.start({ Tty: true }, (err: Error, stream: Duplex | undefined) => { - const timeoutIntervalId = setInterval(() => { - reject(new Error(`Docker Exec timed out after ${timeoutMs}ms`)); - }, timeoutMs); - - if (err) { - clearInterval(timeoutIntervalId); - const errorMessage = `Docker Engine API Exec Start Failed:`; - log.error(errorMessage, err); - return reject(new RuntimeError(errorMessage, err)); - } - if (!stream) { - const msg = `${fnTag} container engine returned falsy stream object, cannot continue.`; - return reject(new RuntimeError(msg)); - } - log.debug(`Obtained output stream of Exec Start OK`); - let output = ""; - stream.on("data", (data: Buffer) => { - output += data.toString("utf-8"); - }); - stream.on("end", () => { - clearInterval(timeoutIntervalId); - log.debug(`Finished Docker Exec OK. Output: ${output.length} bytes`); - resolve(output); - }); - }); - }); - } - - public static async getPublicPort( - privatePort: number, - aContainerInfo: ContainerInfo, - ): Promise { - const fnTag = `Containers#getPublicPort(privatePort=${privatePort})`; - const { Ports: ports } = aContainerInfo; - - if (ports.length < 1) { - throw new Error(`${fnTag} no ports exposed or mapped at all`); - } - const mapping = ports.find((x) => x.PrivatePort === privatePort); - if (mapping) { - if (!mapping.PublicPort) { - throw new Error(`${fnTag} port ${privatePort} mapped but not public`); - } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${privatePort} mapped to 127.0.0.1`); - } else { - return mapping.PublicPort; - } - } else { - throw new Error(`${fnTag} no mapping found for ${privatePort}`); - } - } - - public static async getContainerInternalIp( - containerInfo: ContainerInfo, - ): Promise { - const fnTag = "Containers#getContainerInternalIp()"; - Checks.truthy(containerInfo, `${fnTag} arg #1 containerInfo`); - - const { NetworkSettings } = containerInfo; - const networkNames: string[] = Object.keys(NetworkSettings.Networks); - - if (networkNames.length < 1) { - throw new Error(`${fnTag} container not connected to any networks`); - } else { - // return IP address of container on the first network that we found it connected to. Make this configurable? - return NetworkSettings.Networks[networkNames[0]].IPAddress; - } - } - public static pullImage( - imageFqn: string, - options: Record = {}, - logLevel?: LogLevelDesc, - ): Promise { - const defaultLoggerOptions: ILoggerOptions = { - label: "containers#pullImage()", - level: logLevel || "INFO", - }; - const log = LoggerProvider.getOrCreate(defaultLoggerOptions); - const task = () => Containers.tryPullImage(imageFqn, options, logLevel); - const retryOptions: pRetry.Options & { retries: number } = { - retries: 6, - onFailedAttempt: async (ex) => { - log.debug(`Failed attempt at pulling container image ${imageFqn}`, ex); - }, - }; - return pRetry(task, retryOptions); - } - - public static tryPullImage( - imageFqn: string, - options: Record = {}, - logLevel?: LogLevelDesc, - ): Promise { - return new Promise((resolve, reject) => { - const loggerOptions: ILoggerOptions = { - label: "containers#tryPullImage()", - level: logLevel || "INFO", - }; - const log = LoggerProvider.getOrCreate(loggerOptions); - - const docker = new Dockerode(); - - const progressPrinter = throttle((msg: IDockerPullProgress): void => { - log.debug(JSON.stringify(msg.progress || msg.status)); - }, 1000); - - const pullStreamStartedHandler = ( - pullError: unknown, - stream: NodeJS.ReadableStream, - ) => { - if (pullError) { - log.error(`Could not even start ${imageFqn} pull:`, pullError); - reject(pullError); - } else { - log.debug(`Started ${imageFqn} pull progress stream OK`); - docker.modem.followProgress( - stream, - (progressError: unknown, output: unknown[]) => { - if (progressError) { - log.error(`Failed to finish ${imageFqn} pull:`, progressError); - reject(progressError); - } else { - log.debug(`Finished ${imageFqn} pull completely OK`); - resolve(output); - } - }, - (msg: IDockerPullProgress): void => progressPrinter(msg), - ); - } - }; - - docker.pull(imageFqn, options, pullStreamStartedHandler); - }); - } - - public static stop(container: Container): Promise { - const fnTag = "Containers#stop()"; - return new Promise((resolve, reject) => { - if (container) { - container.stop({}, (err: unknown, result: unknown) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - } else { - return reject(new Error(`${fnTag} Container was not running.`)); - } - }); - } - - public static async getByPredicate( - pred: (ci: ContainerInfo) => boolean, - ): Promise { - const docker = new Dockerode(); - const containerList = await docker.listContainers(); - const containerInfo = containerList.find(pred); - - if (!containerInfo) { - throw new Error(`No container that matches given predicate!`); - } - - return containerInfo; - } - - public static async getById(containerId: string): Promise { - const fnTag = `Containers#getById()`; - Checks.nonBlankString(containerId, `${fnTag}:containerId`); - - try { - return this.getByPredicate((ci) => ci.Id === containerId); - } catch { - throw new Error(`${fnTag} no container by ID"${containerId}"`); - } - } - - /** - * Awaits until a container identified by the containerId - * parameter becomes healthy. - * @param containerId The ID of the container to wait for the healthy status. - * @param timeoutMs How much (in milliseconds) do we wait before giving up. - */ - public static async waitForHealthCheck( - containerId: string, - timeoutMs = 180000, - ): Promise { - const fnTag = "Containers#waitForHealthCheck()"; - - Checks.nonBlankString(containerId, `${fnTag}:containerId`); - - const startedAt = Date.now(); - let reachable = false; - do { - try { - const { Status } = await Containers.getById(containerId); - reachable = Status.endsWith(" (healthy)"); - } catch (ex) { - // FIXME: if the container is slow to start this might trip with a - // false positive because there is no container YET in the beginning. - // if (ex.stack.includes(`no container by ID"${containerId}"`)) { - // throw new Error( - // `${fnTag} container crashed while awaiting healthheck -> ${ex.stack}`, - // ); - // } - if (Date.now() >= startedAt + timeoutMs) { - throw new Error(`${fnTag} timed out (${timeoutMs}ms) -> ${ex.stack}`); - } - reachable = false; - } - await new Promise((resolve2) => setTimeout(resolve2, 1000)); - } while (!reachable); - } - - /** - * Attempts to prune all docker resources that are unused on the current - * docker host in the following order: - * 1. Containers - * 2. Volumes - * 3. Images - * 4. Networks - * - * @returns A complete rundown of how each pruning process worked out - * where the properties pertaining to the pruning processes are `undefined` - * if they failed. - */ - public static async pruneDockerResources( - req?: IPruneDockerResourcesRequest, - ): Promise { - const fnTag = `Containers#pruneDockerResources()`; - const level = req?.logLevel || "INFO"; - const log = LoggerProvider.getOrCreate({ level, label: fnTag }); - const docker = new Dockerode(); - let containers; - let volumes; - let images; - let networks; - log.debug(`Pruning all docker resources...`); - try { - const { all } = await execa("docker", ["system", "df"], { all: true }); - log.debug(all); - } catch (ex) { - log.info(`Ignoring failure of docker system df.`, ex); - } - try { - containers = await docker.pruneContainers(); - } catch (ex) { - log.warn(`Failed to prune docker containers: `, ex); - } - try { - images = await docker.pruneImages(); - } catch (ex) { - log.warn(`Failed to prune docker images: `, ex); - } - try { - volumes = await docker.pruneVolumes(); - } catch (ex) { - log.warn(`Failed to prune docker volumes: `, ex); - } - try { - networks = await docker.pruneNetworks(); - } catch (ex) { - log.warn(`Failed to prune docker networks: `, ex); - } - - const existingImages = await docker.listImages(); - const imageIds = existingImages.map((it) => it.Id); - log.debug(`Clearing ${imageIds.length} images.... %o`, imageIds); - - const cleanUpCommands = [ - { binary: "docker", args: ["rmi", ...imageIds] }, - { binary: "docker", args: ["volume", "prune", "--force"] }, - ]; - for (const { binary, args } of cleanUpCommands) { - try { - const { all, command } = await execa(binary, args, { all: true }); - log.debug(command); - log.debug(all); - } catch (ex) { - // The first 3 commands might fail if there are no containers or images - // to delete (e.g. their number is zero) - log.info("Ignoring docker resource cleanup command failure.", ex); - } - } - const response: IPruneDockerResourcesResponse = { - containers, - images, - networks, - volumes, - }; - - log.debug(`Finished pruning all docker resources. Outcome: %o`, response); - try { - const { all } = await execa("df", [], { all: true }); - log.debug(all); - } catch (ex) { - log.info(`Ignoring failure of df.`, ex); - } - try { - const { all } = await execa("docker", ["system", "df"], { all: true }); - log.debug(all); - } catch (ex) { - log.info(`Ignoring failure of docker system df.`, ex); - } - return response; - } - - public static async streamLogs(req: IStreamLogsRequest): Promise { - const logOptions = { follow: true, stderr: true, stdout: true }; - const logStream = await req.container.logs(logOptions); - const newLineOnlyLogMessages = [`\r\n`, `+\r\n`, `.\r\n`]; - - logStream.on("data", (data: Buffer) => { - const msg = data.toString("utf-8"); - if (!newLineOnlyLogMessages.includes(msg)) { - req.log.debug(`${req.tag} %o`, msg); - } - }); - } - - /** - * Get all environment variables defined in container provided in argument. - * - * @param container Running dockerode container instance - * @returns Map between environment variable name and it's value. - */ - public static async getEnvVars( - container: Container, - ): Promise> { - Checks.truthy(container); - - const inspectInfo = await container.inspect(); - return new Map( - inspectInfo.Config.Env.map( - (entry) => entry.split("=") as [string, string], - ), - ); - } -} - -export interface IStreamLogsRequest { - readonly container: Container; - readonly log: Logger; - readonly tag: string; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/common/env-map-to-docker.ts b/packages/cactus-test-tooling/src/main/typescript/common/env-map-to-docker.ts deleted file mode 100644 index 6ad44c5f25..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/common/env-map-to-docker.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Checks } from "@hyperledger/cactus-common"; - -/** - * Converts an ES6 Map of environment variables into an - * array of strings which is the expected format of the Dockerode library that - * we heavily use in our testing code to launch containers for infrastructure - * simulation. - * - * @param envMap Environment variables as an ES6 map that will be converted into - * an array of strings. - */ -export function envMapToDocker(envMap: Map): string[] { - Checks.truthy(envMap, "test-tooling#envMapToDocker()"); - const out = []; - for (const [key, value] of envMap) { - out.push(`${key}=${value}`); - } - return out; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/common/env-node-to-docker.ts b/packages/cactus-test-tooling/src/main/typescript/common/env-node-to-docker.ts deleted file mode 100644 index 4f385cb47c..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/common/env-node-to-docker.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Checks } from "@hyperledger/cactus-common"; - -/** - * Converts the NodeJS formatted (POJO) environment variable object into an - * array of strings which is the expected format of the Dockerode library that - * we heavily use in our testing code to launch containers for infrastructure - * simulation. - * - * @param envNodeJs Environment variables in the format NodeJS provides it to - * the script file that it is running. It's just a plain on Javascript object - * that maps the environment variable names to values like this: - * ```json - * { - * "MY_ENV_VAR": "SomeInterestingValueOfMyEnvVar" - * } - * ``` - */ -export function envNodeToDocker(envNodeJs: NodeJS.ProcessEnv): string[] { - Checks.truthy(envNodeJs, "test-tooling#envNodeToDocker()"); - return Object.entries(envNodeJs).map((parts: [string, unknown]) => { - return `${parts[0]}=${parts[1]}`; - }); -} diff --git a/packages/cactus-test-tooling/src/main/typescript/common/env-node-to-map.ts b/packages/cactus-test-tooling/src/main/typescript/common/env-node-to-map.ts deleted file mode 100644 index 41381f75ec..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/common/env-node-to-map.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Checks } from "@hyperledger/cactus-common"; - -/** - * Converts the NodeJS formatted (POJO) environment variable object into an ES6 - * Map object containing the same information. - * - * @param envNodeJs Environment variables in the format NodeJS provides it to - * the script file that it is running. It's just a plain on Javascript object - * that maps the environment variable names to values like this: - * ```json - * { - * "MY_ENV_VAR": "SomeInterestingValueOfMyEnvVar" - * } - * ``` - */ -export function envNodeToMap( - envNodeJs: NodeJS.ProcessEnv, -): Map { - Checks.truthy(envNodeJs, "test-tooling#envNodeToDocker()"); - const map = new Map(); - Object.entries(envNodeJs).forEach(([key, value]) => map.set(key, value)); - return map; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/common/i-docker-pull-progress.ts b/packages/cactus-test-tooling/src/main/typescript/common/i-docker-pull-progress.ts deleted file mode 100644 index 4c8f25d6a7..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/common/i-docker-pull-progress.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface IDockerPullProgressDetail { - readonly current: number; - readonly total: number; -} - -export interface IDockerPullProgress { - readonly status: "Downloading"; - readonly progressDetail: IDockerPullProgressDetail; - readonly progress: string; - readonly id: string; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/common/streams.ts b/packages/cactus-test-tooling/src/main/typescript/common/streams.ts deleted file mode 100644 index dfe5328934..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/common/streams.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Stream } from "stream"; - -export class Streams { - public static aggregate( - stream: Stream, - encoding: - | "ascii" - | "utf8" - | "utf-8" - | "utf16le" - | "ucs2" - | "ucs-2" - | "base64" - | "latin1" - | "binary" - | "hex" - | undefined = "utf-8", - ): Promise { - const data: T[] = []; - - return new Promise((resolve, reject) => { - stream.on("data", (buffer: Buffer) => { - const item = buffer.toString(encoding) as unknown as T; - data.push(item); - }); - - stream.on("error", (err: unknown) => { - if (err instanceof Error) { - reject(err); - } else if (typeof err === "string") { - reject( - new Error( - `Streams#aggregate() stream failed internally with: ${err}`, - ), - ); - } else { - reject( - new Error( - `Streams#aggregate() stream failed internally with: ${JSON.stringify( - err, - )}`, - ), - ); - } - }); - - stream.on("end", () => { - resolve(data); - }); - }); - } - - public static aggregateToBuffer(stream: Stream): Promise { - const fnTag = `Streams#aggregateToBuffer()`; - const data: Buffer[] = []; - - return new Promise((resolve, reject) => { - stream.on("data", (buffer: Buffer) => { - data.push(buffer); - }); - - stream.on("error", (err: unknown) => { - if (err instanceof Error) { - reject(err); - } else if (typeof err === "string") { - reject(new Error(`${fnTag} stream failed with: ${err}`)); - } else { - reject( - new Error(`${fnTag} stream failed with: ${JSON.stringify(err)}`), - ); - } - }); - - stream.on("end", () => { - resolve(data); - }); - }); - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts b/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts deleted file mode 100644 index aed3beda76..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts +++ /dev/null @@ -1,254 +0,0 @@ -import { EventEmitter } from "events"; - -import Docker, { Container, ContainerInfo } from "dockerode"; -import Joi from "joi"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Checks, - Bools, -} from "@hyperledger/cactus-common"; - -import { Containers } from "../common/containers"; - -/* - * Provides default options for Corda connector server - */ -const DEFAULTS = Object.freeze({ - imageVersion: - "2024-07-09-test-connector-corda-fix-flow-database-access-v4-8-37919dc84", - imageName: "ghcr.io/hyperledger/cactus-connector-corda-server", - apiPort: 8080, - envVars: [], -}); -export const CORDA_CONNECTOR_DEFAULT_OPTIONS = DEFAULTS; - -/* - * Provides validations for the Corda container's options - */ -const JOI_SCHEMA: Joi.Schema = Joi.object().keys({ - imageVersion: Joi.string().min(5).required(), - imageName: Joi.string().min(1).required(), - apiPort: Joi.number().min(1).max(65535).required(), -}); -export const CORDA_CONNECTOR_OPTIONS_JOI_SCHEMA = JOI_SCHEMA; - -/* - * Contains options for Corda container - */ -export interface ICordaConnectorContainerOptions { - imageVersion?: string; - imageName?: string; - apiPort?: number; - logLevel?: LogLevelDesc; - envVars?: string[]; - emitContainerLogs?: boolean; -} - -/** - * Class responsible for programmatically managing a container that is running - * the image made for hosting a connector plugin for Corda, written in Kotlin, a - * JVM language because the JMS messages one needs to push to Corda for RPC - * execution are particularly tricky to produce from a NodeJS app. - */ -export class CordaConnectorContainer { - public static readonly CLASS_NAME = "CordaConnectorContainer"; - - private readonly log: Logger; - private readonly envVars: string[]; - public readonly imageVersion: string; - public readonly imageName: string; - public readonly apiPort: number; - public readonly emitContainerLogs: boolean; - private container: Container | undefined; - private containerId: string | undefined; - - public get className(): string { - return CordaConnectorContainer.CLASS_NAME; - } - - constructor(public readonly opts: ICordaConnectorContainerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - - this.imageVersion = opts.imageVersion || DEFAULTS.imageVersion; - this.imageName = opts.imageName || DEFAULTS.imageName; - - this.apiPort = opts.apiPort || DEFAULTS.apiPort; - - this.emitContainerLogs = Bools.isBooleanStrict(opts.emitContainerLogs) - ? (opts.emitContainerLogs as boolean) - : true; - - this.envVars = opts.envVars ? opts.envVars : DEFAULTS.envVars; - Checks.truthy(Array.isArray(this.envVars), `${fnTag}:envVars not an array`); - - this.validateConstructorOptions(); - - const level = this.opts.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getContainerId(): string { - const fnTag = `${this.className}.getContainerId()`; - Checks.nonBlankString(this.containerId, `${fnTag}::containerId`); - return this.containerId as string; - } - - public async start(skipPull = false): Promise { - const imageFqn = this.getContainerImageName(); - - if (this.container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - if (!skipPull) { - await Containers.pullImage(imageFqn, {}, this.opts.logLevel); - } - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - imageFqn, - [], - [], - { - ExposedPorts: { - [`${this.apiPort}/tcp`]: {}, // REST API HTTP port - [`9001/tcp`]: {}, // SupervisorD Web UI - }, - Healthcheck: { - Test: [ - "CMD-SHELL", - `curl -vv -i -X POST http://127.0.0.1:8080/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map`, - ], - Interval: 5000000000, // 5 seconds - Timeout: 3000000000, // 3 seconds - Retries: 50, - StartPeriod: 1000000000, // 5 second - }, - HostConfig: { - PublishAllPorts: true, - }, - Env: this.envVars, - }, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.container = container; - this.containerId = container.id; - - if (this.emitContainerLogs) { - const fnTag = `[${this.getContainerImageName()}]`; - await Containers.streamLogs({ - container: this.getContainer(), - tag: fnTag, - log: this.log, - }); - } - - try { - await Containers.waitForHealthCheck(this.containerId); - resolve(container); - } catch (ex) { - this.log.error(`Waiting for healthcheck to pass failed:`, ex); - reject(ex); - } - }); - }); - } - - public async logDebugPorts(): Promise { - const apiUrl = await this.getSupervisorDLocalhostUrl(); - this.log.info(`HTTP REST API accessible: %o`, apiUrl); - - const supervisorDUrl = await this.getSupervisorDLocalhostUrl(); - this.log.info(`SupervisorD Web UI accessible: %o`, supervisorDUrl); - } - - public stop(): Promise { - return Containers.stop(this.getContainer()); - } - - public destroy(): Promise { - const fnTag = `${this.className}.destroy()`; - if (this.container) { - return this.container.remove(); - } else { - return Promise.reject( - new Error(`${fnTag} Container was never created, nothing to destroy.`), - ); - } - } - - protected async getContainerInfo(): Promise { - const fnTag = `${this.className}.getContainerInfo()`; - const docker = new Docker(); - const containerInfos = await docker.listContainers({}); - const id = this.getContainerId(); - - const aContainerInfo = containerInfos.find((ci) => ci.Id === id); - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error(`${fnTag} no container with ID "${id}"`); - } - } - - public async getApiPublicPort(): Promise { - const aContainerInfo = await this.getContainerInfo(); - return Containers.getPublicPort(this.apiPort, aContainerInfo); - } - - public async getSupervisorDPublicPort(): Promise { - const aContainerInfo = await this.getContainerInfo(); - return Containers.getPublicPort(9001, aContainerInfo); - } - - public async getSupervisorDLocalhostUrl(): Promise { - const port = await this.getSupervisorDPublicPort(); - return `http://127.0.0.1:${port}`; - } - - public async getApiLocalhostUrl(): Promise { - const port = await this.getApiPublicPort(); - return `http://127.0.0.1:${port}`; - } - - public getContainer(): Container { - const fnTag = `${this.className}.getContainer()`; - if (!this.container) { - throw new Error(`${fnTag} container not set on this instance yet.`); - } else { - return this.container; - } - } - - public getContainerImageName(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - private validateConstructorOptions(): void { - const fnTag = `${this.className}#validateConstructorOptions()`; - const validationResult = JOI_SCHEMA.validate({ - imageVersion: this.imageVersion, - imageName: this.imageName, - apiPort: this.apiPort, - }); - - if (validationResult.error) { - throw new Error(`${fnTag} ${validationResult.error.annotate()}`); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/corda/build-image-besu-all-in-one-latest.ts b/packages/cactus-test-tooling/src/main/typescript/corda/build-image-besu-all-in-one-latest.ts deleted file mode 100644 index 82ca16eb2a..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/corda/build-image-besu-all-in-one-latest.ts +++ /dev/null @@ -1,49 +0,0 @@ -import path from "node:path"; -import { buildContainerImage } from "../public-api"; -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; - -export interface IBuildImageBesuAllInOneLatestResponse { - readonly imageName: Readonly; - readonly imageVersion: Readonly; - /** - * The concatenation of `imageName` a colon character and `imageVersion`. - */ - readonly imageTag: Readonly; -} - -export interface IBuildImageBesuAllInOneLatestRequest { - readonly logLevel?: Readonly; -} - -export async function buildImageBesuAllInOneLatest( - req: IBuildImageBesuAllInOneLatestRequest, -): Promise { - if (!req) { - throw new Error("Expected arg req to be truthy."); - } - const logLevel: LogLevelDesc = req.logLevel || "WARN"; - const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "build-image-besu-all-in-one-latest.ts", - }); - const projectRoot = path.join(__dirname, "../../../../../../../"); - - const buildDirRel = "./tools/docker/besu-all-in-one/"; - - const buildDirAbs = path.join(projectRoot, buildDirRel); - - log.info("Invoking container build with build dir: %s", buildDirAbs); - - const imageName = "baio"; - const imageVersion = "latest"; - const imageTag = `${imageName}:${imageVersion}`; - - await buildContainerImage({ - buildDir: buildDirAbs, - imageFile: "Dockerfile", - imageTag, - logLevel: logLevel, - }); - - return { imageName, imageVersion, imageTag }; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/corda/build-image-connector-corda-server.ts b/packages/cactus-test-tooling/src/main/typescript/corda/build-image-connector-corda-server.ts deleted file mode 100644 index 1bd8862518..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/corda/build-image-connector-corda-server.ts +++ /dev/null @@ -1,52 +0,0 @@ -import path from "node:path"; -import { buildContainerImage } from "../public-api"; -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; - -export interface IBuildImageConnectorCordaServerResponse { - readonly imageName: Readonly; - readonly imageVersion: Readonly; - /** - * The concatenation of `imageName` a colon character and `imageVersion`. - */ - readonly imageTag: Readonly; -} - -export interface IBuildImageConnectorCordaServerRequest { - readonly logLevel?: Readonly; -} - -export async function buildImageConnectorCordaServer( - req: IBuildImageConnectorCordaServerRequest, -): Promise { - if (!req) { - throw new Error("Expected arg req to be truthy."); - } - const logLevel: LogLevelDesc = req.logLevel || "WARN"; - const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "build-image-connector-corda-server.ts", - }); - const projectRoot = path.join(__dirname, "../../../../../../../"); - - const buildDirRel = - "./packages/cactus-plugin-ledger-connector-corda/src/main-server/"; - - const buildDirAbs = path.join(projectRoot, buildDirRel); - - log.info("Invoking container build with build dir: %s", buildDirAbs); - - const imageName = "cccs"; - const imageVersion = "latest"; - const imageTag = `${imageName}:${imageVersion}`; - - await buildContainerImage({ - buildDir: buildDirAbs, - imageFile: "Dockerfile", - imageTag, - logLevel: logLevel, - }); - - log.info("Building Corda v4 JVM Connector finished OK"); - - return { imageName, imageVersion, imageTag }; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/corda/build-image-corda-all-in-one-v4-12.ts b/packages/cactus-test-tooling/src/main/typescript/corda/build-image-corda-all-in-one-v4-12.ts deleted file mode 100644 index 82f2ce4d6f..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/corda/build-image-corda-all-in-one-v4-12.ts +++ /dev/null @@ -1,49 +0,0 @@ -import path from "node:path"; -import { buildContainerImage } from "../public-api"; -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; - -export interface IBuildImageCordaAllInOneV412Response { - readonly imageName: Readonly; - readonly imageVersion: Readonly; - /** - * The concatenation of `imageName` a colon character and `imageVersion`. - */ - readonly imageTag: Readonly; -} - -export interface IBuildImageCordaAllInOneV412Request { - readonly logLevel?: Readonly; -} - -export async function buildImageCordaAllInOneV412( - req: IBuildImageCordaAllInOneV412Request, -): Promise { - if (!req) { - throw new Error("Expected arg req to be truthy."); - } - const logLevel: LogLevelDesc = req.logLevel || "WARN"; - const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "build-image-corda-all-in-one-v4-12.ts", - }); - const projectRoot = path.join(__dirname, "../../../../../../../"); - - const buildDirRel = "./tools/docker/corda-all-in-one/corda-v4_12/"; - - const buildDirAbs = path.join(projectRoot, buildDirRel); - - log.info("Invoking container build with build dir: %s", buildDirAbs); - - const imageName = "caio412"; - const imageVersion = "latest"; - const imageTag = `${imageName}:${imageVersion}`; - - await buildContainerImage({ - buildDir: buildDirAbs, - imageFile: "Dockerfile", - imageTag, - logLevel: logLevel, - }); - - return { imageName, imageVersion, imageTag }; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts deleted file mode 100644 index d9174b55e1..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts +++ /dev/null @@ -1,470 +0,0 @@ -import { EventEmitter } from "events"; -import path from "path"; - -import { NodeSSH, Config as SshConfig } from "node-ssh"; -import Docker, { Container, ContainerInfo } from "dockerode"; -import Joi from "joi"; - -import { ITestLedger } from "../i-test-ledger"; -import { Containers } from "../common/containers"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Checks, - Bools, -} from "@hyperledger/cactus-common"; - -import { SampleCordappEnum, SAMPLE_CORDAPP_DATA } from "./sample-cordapp-enum"; -import { ICordappJarFile } from "./cordapp-jar-file"; - -/* - * Contains options for Corda container - */ -export interface ICordaTestLedgerConstructorOptions { - imageVersion?: string; - imageName?: string; - rpcPortNotary?: number; - sshPort?: number; - rpcPortA?: number; - rpcPortB?: number; - rpcPortC?: number; - logLevel?: LogLevelDesc; - envVars?: string[]; - emitContainerLogs?: boolean; -} - -/* - * Provides default options for Corda container - */ -const DEFAULTS = Object.freeze({ - imageVersion: "2021-03-01-7e07b5b", - imageName: "petermetz/cactus-corda-4-6-all-in-one-obligation", - rpcPortNotary: 10003, - sshPort: 22, - rpcPortA: 10008, - rpcPortB: 10011, - rpcPortC: 10014, - envVars: [ - "PARTY_A_NODE_ENABLED=true", - "PARTY_B_NODE_ENABLED=true", - "PARTY_C_NODE_ENABLED=true", - ], -}); -export const CORDA_TEST_LEDGER_DEFAULT_OPTIONS = DEFAULTS; - -/* - * Provides validations for the Corda container's options - */ -export const JOI_SCHEMA: Joi.Schema = Joi.object().keys({ - imageVersion: Joi.string().min(5).required(), - imageName: Joi.string().min(1).required(), - rpcPortNotary: Joi.number().min(1).max(65535).required(), - sshPort: Joi.number().min(1).max(65535).required(), - rpcPortA: Joi.number().min(1).max(65535).required(), - rpcPortB: Joi.number().min(1).max(65535).required(), - rpcPortC: Joi.number().min(1).max(65535).required(), -}); -export const CORDA_TEST_LEDGER_OPTIONS_JOI_SCHEMA = JOI_SCHEMA; - -export class CordaTestLedger implements ITestLedger { - public static readonly CLASS_NAME = "CordaTestLedger"; - - private readonly log: Logger; - private readonly envVars: string[]; - - public get className(): string { - return CordaTestLedger.CLASS_NAME; - } - - public readonly imageVersion: string; - public readonly imageName: string; - public readonly rpcPortNotary: number; - public readonly sshPort: number; - public readonly rpcPortA: number; - public readonly rpcPortB: number; - public readonly rpcPortC: number; - public readonly emitContainerLogs: boolean; - - private container: Container | undefined; - private containerId: string | undefined; - - constructor(public readonly opts: ICordaTestLedgerConstructorOptions = {}) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} options`); - - this.imageVersion = opts.imageVersion || DEFAULTS.imageVersion; - this.imageName = opts.imageName || DEFAULTS.imageName; - - this.sshPort = opts.sshPort || DEFAULTS.sshPort; - this.rpcPortA = opts.rpcPortA || DEFAULTS.rpcPortA; - this.rpcPortB = opts.rpcPortB || DEFAULTS.rpcPortB; - this.rpcPortC = opts.rpcPortC || DEFAULTS.rpcPortC; - this.rpcPortNotary = opts.rpcPortNotary || DEFAULTS.rpcPortNotary; - this.emitContainerLogs = Bools.isBooleanStrict(opts.emitContainerLogs) - ? (opts.emitContainerLogs as boolean) - : true; - - this.envVars = opts.envVars ? opts.envVars : DEFAULTS.envVars; - Checks.truthy(Array.isArray(this.envVars), `${fnTag}:envVars not an array`); - - this.validateConstructorOptions(); - const label = "corda-test-ledger"; - const level = opts.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getContainerId(): string { - const fnTag = `${this.className}.getContainerId()`; - Checks.nonBlankString(this.containerId, `${fnTag}::containerId`); - return this.containerId as string; - } - - public async start(skipPull = false): Promise { - const imageFqn = this.getContainerImageName(); - - if (this.container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - if (!skipPull) { - await Containers.pullImage(imageFqn, {}, this.opts.logLevel); - } - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - imageFqn, - [], - [], - { - // TODO: scrutinize this and eliminate needing root if possible - // (might not be possible due to something with Corda itself, but we have to investigate) - User: "root", - ExposedPorts: { - [`${this.rpcPortNotary}/tcp`]: {}, // corda Notary RPC - [`${this.rpcPortA}/tcp`]: {}, // corda PartyA RPC - [`${this.rpcPortB}/tcp`]: {}, // corda PartyB RPC - [`${this.rpcPortC}/tcp`]: {}, // corda PartyC RPC - [`${this.sshPort}/tcp`]: {}, // ssh server - }, - HostConfig: { - PublishAllPorts: true, - }, - // TODO: this can be removed once the new docker image is published and - // specified as the default one to be used by the tests. - // Healthcheck: { - // Test: [ - // "CMD-SHELL", - // `curl -v 'http://127.0.0.1:7005/jolokia/exec/org.apache.activemq.artemis:address=%22rpc.server%22,broker=%22RPC%22,component=addresses,queue=%22rpc.server%22,routing-type=%22multicast%22,subcomponent=queues/countMessages()/'`, - // ], - // Interval: 1000000000, // 1 second - // Timeout: 3000000000, // 3 seconds - // Retries: 99, - // StartPeriod: 1000000000, // 1 second - // }, - Privileged: true, - Env: this.envVars, - }, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.container = container; - this.containerId = container.id; - - if (this.emitContainerLogs) { - const fnTag = `[${this.getContainerImageName()}]`; - await Containers.streamLogs({ - container: this.getContainer(), - tag: fnTag, - log: this.log, - }); - } - - try { - let isHealthy = false; - do { - const containerInfo = await this.getContainerInfo(); - this.log.debug(`ContainerInfo.Status=%o`, containerInfo.Status); - this.log.debug(`ContainerInfo.State=%o`, containerInfo.State); - isHealthy = containerInfo.Status.endsWith("(healthy)"); - if (!isHealthy) { - await new Promise((resolve2) => setTimeout(resolve2, 1000)); - } - } while (!isHealthy); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async logDebugPorts(): Promise { - const partyNotaryRpcPort = await this.getRpcNotaryPublicPort(); - const sshPort = await this.getSSHPublicPort(); - const partyARpcPort = await this.getRpcAPublicPort(); - const partyBRpcPort = await this.getRpcBPublicPort(); - const partyCRpcPort = await this.getRpcCPublicPort(); - this.log.info(`AIO Image SSH Port: ${sshPort}`); - this.log.info(`Party Notary RPC Port: ${partyNotaryRpcPort}`); - this.log.info(`Party A RPC Port: ${partyARpcPort}`); - this.log.info(`Party B RPC Port: ${partyBRpcPort}`); - this.log.info(`Party C RPC Port: ${partyCRpcPort}`); - - const supervisorDUrl = await this.getSupervisorDLocalhostUrl(); - this.log.info(`SupervisorD Web UI accessible: %o`, supervisorDUrl); - } - - public stop(): Promise { - return Containers.stop(this.getContainer()); - } - - public destroy(): Promise { - const fnTag = `${this.className}.destroy()`; - if (this.container) { - return this.container.remove(); - } else { - return Promise.reject( - new Error(`${fnTag} Container was never created, nothing to destroy.`), - ); - } - } - - protected async getContainerInfo(): Promise { - const fnTag = `${this.className}.getContainerInfo()`; - const docker = new Docker(); - const containerInfos = await docker.listContainers({}); - const id = this.getContainerId(); - - const aContainerInfo = containerInfos.find((ci) => ci.Id === id); - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error(`${fnTag} no container with ID "${id}"`); - } - } - - public async pullCordappJars( - sampleCordapp: SampleCordappEnum, - ): Promise { - await new Promise((resolve2) => setTimeout(resolve2, 1000)); - const fnTag = `${this.className}.pullCordappJars()`; - Checks.truthy(sampleCordapp, `${fnTag}:sampleCordapp`); - await this.buildCordapp(sampleCordapp); - const container = this.getContainer(); - const cordappData = SAMPLE_CORDAPP_DATA[sampleCordapp]; - - const jars: ICordappJarFile[] = []; - - for (const jarFile of cordappData.jars) { - const jarPath = path.join(cordappData.rootDir, jarFile.jarRelativePath); - this.log.debug(`Pulling jar file from container at: %o`, jarPath); - const jar = await Containers.pullBinaryFile(container, jarPath); - jars.push({ - contentBase64: jar.toString("base64"), - filename: `${sampleCordapp}${jarFile.fileName}`, - hasDbMigrations: true, - }); - this.log.debug(`Pulled jar (%o bytes) %o`, jarPath, jar.length); - } - - if (jars.length == 0) { - throw new Error(`${fnTag} no jars found for this SampleCordappEnum.`); - } - - return jars; - } - - public async buildCordapp(sampleCordapp: SampleCordappEnum): Promise { - await new Promise((resolve2) => setTimeout(resolve2, 1000)); - const fnTag = `${this.className}.buildCordapp()`; - Checks.truthy(sampleCordapp, `${fnTag}:sampleCordapp`); - const sshConfig = await this.getSshConfig(); - const ssh = new NodeSSH(); - try { - await ssh.connect(sshConfig); - } catch (ex) { - this.log.error(`Failed to establish SSH connection to Corda node.`, ex); - throw ex; - } - - const cwd = SAMPLE_CORDAPP_DATA[sampleCordapp].rootDir; - - try { - const cmd = `./gradlew build -x test`; - this.log.debug(`${fnTag}:CMD=%o, CWD=%o`, cmd, cwd); - const response = await ssh.execCommand(cmd, { cwd }); - const { code, signal, stderr, stdout } = response; - this.log.debug(`${fnTag}:code=%o`, code); - this.log.debug(`${fnTag}:signal=%o`, signal); - this.log.debug(`${fnTag}:stderr=%o`, stderr); - this.log.debug(`${fnTag}:stdout=%o`, stdout); - } finally { - ssh.dispose(); - } - } - - /** - * Used for deleting the exiting build files of a sample cordapp. This is - * useful because if you are writing a test case that builds the jars and then - * uploads them as part of the deployment to the corda node then you end up with - * a duplicate contract error that looks something like this (on a single row): - * - * ```sh - * E 04:20:01 1 NodeStartupLogging. - The CorDapp ( - * name: Negotiation CorDapp, - * file: ADVANCED_NEGOTIATION_workflows-0.2) is installed multiple times on the node. - * The following files correspond to the exact same content: - * [workflows-0.2] - * [Error Code: cordapp-duplicate-cordapps-installed - * For further information, please go to https://docs.corda.net/docs/corda-os/4.12/error-codes.html] - * ``` - * - * @param sampleCordapp The sample cordapp that you wish to clean - */ - public async cleanCordapp(sampleCordapp: SampleCordappEnum): Promise { - await new Promise((resolve2) => setTimeout(resolve2, 2000)); - const fnTag = `${this.className}.cleanCordapp()`; - Checks.truthy(sampleCordapp, `${fnTag}:sampleCordapp`); - const sshConfig = await this.getSshConfig(); - const ssh = new NodeSSH(); - try { - await ssh.connect(sshConfig); - } catch (ex) { - this.log.error(`Failed to establish SSH connection to Corda node.`, ex); - throw ex; - } - - const cwd = "/"; - - try { - const deletePathPattern = `${SAMPLE_CORDAPP_DATA[sampleCordapp].rootDir}build/nodes/{PartyA,PartyB,PartyC,Notary}/cordapps/*`; - const cmd = `rm -rf ${deletePathPattern}`; - - this.log.debug(`${fnTag}:CMD=%o, CWD=%o`, cmd, cwd); - const response = await ssh.execCommand(cmd, { cwd }); - const { code, signal, stderr, stdout } = response; - this.log.debug(`${fnTag}:code=%o`, code); - this.log.debug(`${fnTag}:signal=%o`, signal); - this.log.debug(`${fnTag}:stderr=%o`, stderr); - this.log.debug(`${fnTag}:stdout=%o`, stdout); - } finally { - ssh.dispose(); - } - } - - public async getRpcNotaryPublicPort(): Promise { - const aContainerInfo = await this.getContainerInfo(); - return Containers.getPublicPort(this.rpcPortNotary, aContainerInfo); - } - - public async getRpcAPublicPort(): Promise { - const aContainerInfo = await this.getContainerInfo(); - return Containers.getPublicPort(this.rpcPortA, aContainerInfo); - } - - public async getRpcBPublicPort(): Promise { - const aContainerInfo = await this.getContainerInfo(); - return Containers.getPublicPort(this.rpcPortB, aContainerInfo); - } - - public async getRpcCPublicPort(): Promise { - const aContainerInfo = await this.getContainerInfo(); - return Containers.getPublicPort(this.rpcPortC, aContainerInfo); - } - - public async getSupervisorDPublicPort(): Promise { - const aContainerInfo = await this.getContainerInfo(); - return Containers.getPublicPort(9001, aContainerInfo); - } - - public async getSupervisorDLocalhostUrl(): Promise { - const port = await this.getSupervisorDPublicPort(); - return `http://127.0.0.1:${port}`; - } - - public async getSSHPublicPort(): Promise { - const aContainerInfo = await this.getContainerInfo(); - return Containers.getPublicPort(this.sshPort, aContainerInfo); - } - - public async getCorDappsDirPartyA( - sampleCordapp: SampleCordappEnum = SampleCordappEnum.ADVANCED_OBLIGATION, - ): Promise { - return SAMPLE_CORDAPP_DATA[sampleCordapp].cordappDirPartyA; - } - - public async getCorDappsDirPartyB( - sampleCordapp: SampleCordappEnum = SampleCordappEnum.ADVANCED_OBLIGATION, - ): Promise { - return SAMPLE_CORDAPP_DATA[sampleCordapp].cordappDirPartyB; - } - - public async getCorDappsDirPartyC( - sampleCordapp: SampleCordappEnum = SampleCordappEnum.ADVANCED_OBLIGATION, - ): Promise { - return SAMPLE_CORDAPP_DATA[sampleCordapp].cordappDirPartyC; - } - - public async getCorDappsDirPartyNotary( - sampleCordapp: SampleCordappEnum = SampleCordappEnum.ADVANCED_OBLIGATION, - ): Promise { - return SAMPLE_CORDAPP_DATA[sampleCordapp].cordappDirNotary; - } - - public async getSshConfig(): Promise { - const privKeyPath = `/etc/hyperledger/cactus/corda-aio-image.key`; - const container = this.getContainer(); - const privateKey = await Containers.pullFile(container, privKeyPath); - const publicPort = await this.getSSHPublicPort(); - const sshConfig: SshConfig = { - host: "127.0.0.1", - port: publicPort, - username: "root", - password: "root", - privateKey, - }; - - return sshConfig; - } - - public getContainer(): Container { - const fnTag = `${this.className}.getContainer()`; - if (!this.container) { - throw new Error(`${fnTag} container not set on this instance yet.`); - } else { - return this.container; - } - } - - public getContainerImageName(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - private validateConstructorOptions(): void { - const fnTag = `${this.className}#validateConstructorOptions()`; - const validationResult = JOI_SCHEMA.validate({ - imageVersion: this.imageVersion, - imageName: this.imageName, - sshPort: this.sshPort, - rpcPortNotary: this.rpcPortNotary, - rpcPortA: this.rpcPortA, - rpcPortB: this.rpcPortB, - rpcPortC: this.rpcPortC, - }); - - if (validationResult.error) { - throw new Error(`${fnTag} ${validationResult.error.annotate()}`); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/corda/corda-v5-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/corda/corda-v5-test-ledger.ts deleted file mode 100644 index 57c452be1a..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/corda/corda-v5-test-ledger.ts +++ /dev/null @@ -1,267 +0,0 @@ -import { EventEmitter } from "events"; -//import path from "path"; - -import { Config as SshConfig } from "node-ssh"; -import Docker, { Container, ContainerInfo } from "dockerode"; -import Joi from "joi"; - -import { ITestLedger } from "../i-test-ledger"; -import { Containers } from "../common/containers"; - -import { - LogLevelDesc, - Logger, - LoggerProvider, - Checks, - Bools, -} from "@hyperledger/cactus-common"; - -/* - * Contains options for Corda container - */ -export interface ICordaV5TestLedgerConstructorOptions { - imageVersion?: string; - imageName?: string; - publicPort?: number; - postgresPort?: number; - logLevel?: LogLevelDesc; - emitContainerLogs?: boolean; - rpcPortA?: number; -} - -/* - * Provides default options for Corda container - */ -const DEFAULTS = Object.freeze({ - imageVersion: "2024-06-18-issue3293-3e1660df4", - imageName: "ghcr.io/hyperledger/cacti-corda-5-all-in-one", - publicPort: 8888, - postgresPort: 5431, - rpcPortA: 10008, -}); -export const CORDA_V5_TEST_LEDGER_DEFAULT_OPTIONS = DEFAULTS; - -/* - * Provides validations for the Corda container's options - */ -export const JOI_SCHEMA: Joi.Schema = Joi.object().keys({ - imageVersion: Joi.string().min(5).required(), - imageName: Joi.string().min(1).required(), - publicPort: Joi.number().min(1).max(65535).required(), - postgresPort: Joi.number().min(1).max(65535).required(), -}); -export const CORDA_V5_TEST_LEDGER_OPTIONS_JOI_SCHEMA = JOI_SCHEMA; - -export class CordaV5TestLedger implements ITestLedger { - public static readonly CLASS_NAME = "CordaV5TestLedger"; - - private readonly log: Logger; - //private readonly envVars: string[]; - - public get className(): string { - return CordaV5TestLedger.CLASS_NAME; - } - public readonly rpcPortA: number; - public readonly imageVersion: string; - public readonly imageName: string; - public readonly publicPort: number; - public readonly postgresPort: number; - public readonly emitContainerLogs: boolean; - - private container: Container | undefined; - private containerId: string | undefined; - - constructor(public readonly opts: ICordaV5TestLedgerConstructorOptions = {}) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} options`); - - this.imageVersion = opts.imageVersion || DEFAULTS.imageVersion; - this.imageName = opts.imageName || DEFAULTS.imageName; - - this.publicPort = opts.publicPort || DEFAULTS.publicPort; - this.postgresPort = opts.postgresPort || DEFAULTS.postgresPort; - this.emitContainerLogs = Bools.isBooleanStrict(opts.emitContainerLogs) - ? (opts.emitContainerLogs as boolean) - : true; - - this.rpcPortA = opts.rpcPortA || DEFAULTS.rpcPortA; - - this.validateConstructorOptions(); - const label = "corda-v5-test-ledger"; - const level = opts.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getContainerId(): string { - const fnTag = `${this.className}.getContainerId()`; - Checks.nonBlankString(this.containerId, `${fnTag}::containerId`); - return this.containerId as string; - } - - public async start(skipPull = false): Promise { - const imageFqn = this.getContainerImageName(); - - if (this.container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - if (!skipPull) { - await Containers.pullImage(imageFqn, {}, this.opts.logLevel); - } - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - imageFqn, - [], - [], - { - User: "root", - NetworkMode: "host", // Set the container to use the host network - Binds: ["/var/run/docker.sock:/var/run/docker.sock"], // Mount the Docker socket - PublishAllPorts: true, - Privileged: true, - }, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.container = container; - this.containerId = container.id; - - if (this.emitContainerLogs) { - const fnTag = `[${this.getContainerImageName()}]`; - await Containers.streamLogs({ - container: this.getContainer(), - tag: fnTag, - log: this.log, - }); - } - - try { - let isHealthy = false; - do { - const containerInfo = await this.getContainerInfo(); - this.log.debug(`ContainerInfo.Status=%o`, containerInfo.Status); - this.log.debug(`ContainerInfo.State=%o`, containerInfo.State); - isHealthy = containerInfo.Status.endsWith("(healthy)"); - if (!isHealthy) { - await new Promise((resolve2) => setTimeout(resolve2, 1000)); - } - } while (!isHealthy); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async logDebugPorts(): Promise { - const publicPort = await this.getPublicPort(); - this.log.info(`R3 Corda V5 public port: ${publicPort}`); - - const supervisorDUrl = await this.getSupervisorDLocalhostUrl(); - this.log.info(`SupervisorD Web UI accessible: %o`, supervisorDUrl); - } - - public stop(): Promise { - return Containers.stop(this.getContainer()); - } - - public destroy(): Promise { - const fnTag = `${this.className}.destroy()`; - if (this.container) { - return this.container.remove(); - } else { - return Promise.reject( - new Error(`${fnTag} Container was never created, nothing to destroy.`), - ); - } - } - - protected async getContainerInfo(): Promise { - const fnTag = `${this.className}.getContainerInfo()`; - const docker = new Docker(); - const containerInfos = await docker.listContainers({}); - const id = this.getContainerId(); - - const aContainerInfo = containerInfos.find((ci) => ci.Id === id); - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error(`${fnTag} no container with ID "${id}"`); - } - } - - public async getPublicPort(): Promise { - const aContainerInfo = await this.getContainerInfo(); - return Containers.getPublicPort(8888, aContainerInfo); - } - - public async getSupervisorDLocalhostUrl(): Promise { - const port = await this.getPublicPort(); - return `https://localhost:${port}/api/v1/swagger#`; - } - - public async getSSHPublicPort(): Promise { - const aContainerInfo = await this.getContainerInfo(); - return Containers.getPublicPort(22, aContainerInfo); - } - - public async getSshConfig(): Promise { - //port 22 is not being checked as of now because we can't modify the export ports unless we change the gradle sample - //const publicPort = await this.getSSHPublicPort(); - const sshConfig: SshConfig = { - host: "127.0.0.1", - port: 22, - username: "root", - }; - - return sshConfig; - } - - public getContainer(): Container { - const fnTag = `${this.className}.getContainer()`; - if (!this.container) { - throw new Error(`${fnTag} container not set on this instance yet.`); - } else { - return this.container; - } - } - - public getContainerImageName(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - private validateConstructorOptions(): void { - const fnTag = `${this.className}#validateConstructorOptions()`; - const validationResult = JOI_SCHEMA.validate({ - imageVersion: this.imageVersion, - imageName: this.imageName, - publicPort: this.publicPort, - postgresPort: this.postgresPort, - }); - - if (validationResult.error) { - throw new Error(`${fnTag} ${validationResult.error.annotate()}`); - } - } -} - -export function extractShortHash(shortHashID: string, name: string) { - const regex = new RegExp(`MyCorDapp\\s*([A-Z0-9]*)\\s*CN=${name}`); - const match = shortHashID.match(regex); - if (match) { - return match[1]; - } else { - return "err"; - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/corda/cordapp-jar-file.ts b/packages/cactus-test-tooling/src/main/typescript/corda/cordapp-jar-file.ts deleted file mode 100644 index df109c5b7c..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/corda/cordapp-jar-file.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Base64File } from "../common/base64-file"; - -export interface ICordappJarFile extends Base64File { - hasDbMigrations: boolean; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/corda/sample-cordapp-enum.ts b/packages/cactus-test-tooling/src/main/typescript/corda/sample-cordapp-enum.ts deleted file mode 100644 index cec9a830c9..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/corda/sample-cordapp-enum.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Enumerates over a sub-set of the sample corda applications - * from the `sample-kotlin` repo under the Corda GitHub - * organization. - * @see https://github.com/corda/samples-kotlin - */ -export enum SampleCordappEnum { - ADVANCED_OBLIGATION = "ADVANCED_OBLIGATION", - ADVANCED_NEGOTIATION = "ADVANCED_NEGOTIATION", - BASIC_CORDAPP = "BASIC_CORDAPP", - BASIC_FLOW = "BASIC_FLOW", -} - -/** - * Stores the mapping between the samples and their project - * roots on the file-system within the samples-kotlin git - * repository and the jars location. - * @see https://github.com/corda/samples-kotlin - */ -export const SAMPLE_CORDAPP_DATA = Object.freeze({ - [SampleCordappEnum.ADVANCED_OBLIGATION]: { - rootDir: "/samples-kotlin/Advanced/obligation-cordapp/", - cordappDirPartyA: - "/samples-kotlin/Advanced/obligation-cordapp/build/nodes/ParticipantA/cordapps", - cordappDirPartyB: - "/samples-kotlin/Advanced/obligation-cordapp/build/nodes/ParticipantB/cordapps", - cordappDirPartyC: - "/samples-kotlin/Advanced/obligation-cordapp/build/nodes/ParticipantC/cordapps", - cordappDirNotary: - "/samples-kotlin/Advanced/obligation-cordapp/build/nodes/Notary/cordapps", - jars: [ - { - jarRelativePath: "contracts/build/libs/contracts-1.0.jar", - fileName: "_contracts-1.0.jar", - }, - { - jarRelativePath: "workflows/build/libs/workflows-1.0.jar", - fileName: "_workflows-1.0.jar", - }, - ], - }, - [SampleCordappEnum.ADVANCED_NEGOTIATION]: { - rootDir: "/samples-kotlin/Advanced/negotiation-cordapp/", - cordappDirPartyA: - "/samples-kotlin/Advanced/negotiation-cordapp/build/nodes/PartyA/cordapps", - cordappDirPartyB: - "/samples-kotlin/Advanced/negotiation-cordapp/build/nodes/PartyB/cordapps", - cordappDirPartyC: "NOT_APPLICABLE__THIS_SAMPLE_ONLY_HAS_A_AND_B_PARTIES", - cordappDirNotary: - "/samples-kotlin/Advanced/negotiation-cordapp/build/nodes/Notary/cordapps", - jars: [ - { - jarRelativePath: "contracts/build/libs/contracts-0.2.jar", - fileName: "_contracts-0.2.jar", - }, - { - jarRelativePath: "workflows/build/libs/workflows-0.2.jar", - fileName: "_workflows-0.2.jar", - }, - ], - }, - [SampleCordappEnum.BASIC_CORDAPP]: { - rootDir: "/samples-kotlin/Basic/cordapp-example/", - cordappDirPartyA: - "/samples-kotlin/Basic/cordapp-example/build/nodes/ParticipantA/cordapps", - cordappDirPartyB: - "/samples-kotlin/Basic/cordapp-example/build/nodes/ParticipantB/cordapps", - cordappDirPartyC: - "/samples-kotlin/Basic/cordapp-example/build/nodes/ParticipantC/cordapps", - cordappDirNotary: - "/samples-kotlin/Basic/cordapp-example/build/nodes/Notary/cordapps", - jars: [ - { - jarRelativePath: "contracts/build/libs/contracts-1.0.jar", - fileName: "_contracts-1.0.jar", - }, - { - jarRelativePath: "workflows/build/libs/workflows-1.0.jar", - fileName: "_workflows-1.0.jar", - }, - ], - }, - [SampleCordappEnum.BASIC_FLOW]: { - rootDir: "/samples-kotlin/Basic/flow-database-access/", - cordappDirPartyA: - "/samples-kotlin/Basic/flow-database-access/build/nodes/PartyA/cordapps", - cordappDirPartyB: "-", - cordappDirPartyC: "-", - cordappDirNotary: "-", - jars: [ - { - jarRelativePath: "workflows/build/libs/workflows-0.1.jar", - fileName: "_workflows-0.1.jar", - }, - ], - }, -}); diff --git a/packages/cactus-test-tooling/src/main/typescript/daml/daml-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/daml/daml-test-ledger.ts deleted file mode 100644 index b42c09077e..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/daml/daml-test-ledger.ts +++ /dev/null @@ -1,345 +0,0 @@ -import Docker, { Container, ContainerInfo } from "dockerode"; -import Joi from "joi"; -import tar from "tar-stream"; -import { EventEmitter } from "events"; -import { - LogLevelDesc, - Logger, - LoggerProvider, - Bools, -} from "@hyperledger/cactus-common"; -import { ITestLedger } from "../i-test-ledger"; -import { Streams } from "../common/streams"; -import { Containers } from "../common/containers"; - -export interface IDamlTestLedgerOptions { - imageVersion?: string; - imageName?: string; - rpcApiHttpPort?: number; - logLevel?: LogLevelDesc; - emitContainerLogs?: boolean; -} - -const DEFAULTS = Object.freeze({ - imageVersion: "2024-09-08T07-40-07-dev-2cc217b7a", - imageName: "ghcr.io/hyperledger/cacti-daml-all-in-one", - rpcApiHttpPort: 7575, -}); - -export const DAML_TEST_LEDGER_DEFAULT_OPTIONS = DEFAULTS; - -export const DAML_TEST_LEDGER_OPTIONS_JOI_SCHEMA: Joi.Schema = - Joi.object().keys({ - imageVersion: Joi.string().min(5).required(), - imageName: Joi.string().min(1).required(), - rpcApiHttpPort: Joi.number() - .integer() - .positive() - .min(1024) - .max(65535) - .required(), - }); - -export class DamlTestLedger implements ITestLedger { - public readonly imageVersion: string; - public readonly imageName: string; - public readonly rpcApiHttpPort: number; - public readonly emitContainerLogs: boolean; - - private readonly log: Logger; - private container: Container | undefined; - private containerId: string | undefined; - - constructor(public readonly opts?: IDamlTestLedgerOptions) { - if (!opts) { - throw new TypeError(`DAMLTestLedger#ctor options was falsy.`); - } - this.imageVersion = opts.imageVersion || DEFAULTS.imageVersion; - this.imageName = opts.imageName || DEFAULTS.imageName; - this.rpcApiHttpPort = opts.rpcApiHttpPort || DEFAULTS.rpcApiHttpPort; - - this.emitContainerLogs = Bools.isBooleanStrict(opts.emitContainerLogs) - ? (opts.emitContainerLogs as boolean) - : true; - - this.validateConstructorOptions(); - const label = "daml-test-ledger"; - const level = opts.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getContainer(): Container { - const fnTag = "DAMLTestLedger#getContainer()"; - if (!this.container) { - throw new Error(`${fnTag} container not yet started by this instance.`); - } else { - return this.container; - } - } - - public getContainerImageName(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - public async getRpcApiHttpHost(): Promise { - const ipAddress = "127.0.0.1"; - const hostPort: number = await this.getRpcApiPublicPort(); - return `http://${ipAddress}:${hostPort}`; - } - - public async getFileContents(filePath: string): Promise { - const response = await this.getContainer().getArchive({ - path: filePath, - }); - const extract: tar.Extract = tar.extract({ autoDestroy: true }); - - return new Promise((resolve, reject) => { - let fileContents = ""; - extract.on("entry", async (header: unknown, stream, next) => { - stream.on("error", (err: Error) => { - reject(err); - }); - const chunks: string[] = await Streams.aggregate(stream); - fileContents += chunks.join(""); - stream.resume(); - next(); - }); - - extract.on("finish", () => { - resolve(fileContents); - }); - - response.pipe(extract); - }); - } - - public async start(omitPull = false): Promise { - const imageFqn = this.getContainerImageName(); - - if (this.container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - if (!omitPull) { - this.log.debug(`Pulling container image ${imageFqn} ...`); - await this.pullContainerImage(imageFqn); - this.log.debug(`Pulled ${imageFqn} OK. Starting container...`); - } - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - imageFqn, - [], - [], - { - NetworkMode: "host", - ExposedPorts: { - "7575/tcp": {}, // DAML http endpoint - }, - HostConfig: { - PublishAllPorts: true, - PortBindings: { - "7575/tcp": [ - { - HostPort: "7575", //change the default port of docker back to 7575 - }, - ], - }, - }, - }, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.log.debug(`Started container OK. Waiting for healthcheck...`); - this.container = container; - this.containerId = container.id; - - if (this.emitContainerLogs) { - const fnTag = `[${this.getContainerImageName()}]`; - await Containers.streamLogs({ - container: this.getContainer(), - tag: fnTag, - log: this.log, - }); - } - - try { - await this.waitForHealthCheck(); - this.log.debug(`Healthcheck passing OK.`); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async waitForHealthCheck(timeoutMs = 360000): Promise { - const fnTag = "DAMLTestLedger#waitForHealthCheck()"; - const startedAt = Date.now(); - let isHealthy = false; - do { - if (Date.now() >= startedAt + timeoutMs) { - throw new Error(`${fnTag} timed out (${timeoutMs}ms)`); - } - const { Status, State } = await this.getContainerInfo(); - this.log.debug(`ContainerInfo.Status=%o, State=O%`, Status, State); - isHealthy = Status.endsWith("(healthy)"); - if (!isHealthy) { - await new Promise((resolve2) => setTimeout(resolve2, 1000)); - } - } while (!isHealthy); - } - - public stop(): Promise { - const fnTag = "DAMLTestLedger#stop()"; - return new Promise((resolve, reject) => { - if (this.container) { - this.container.stop({}, (err: unknown, result: unknown) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - } else { - return reject(new Error(`${fnTag} Container was not running.`)); - } - }); - } - - public destroy(): Promise { - const fnTag = "DAMLTestLedger#destroy()"; - if (this.container) { - return this.container.remove(); - } else { - const ex = new Error(`${fnTag} Container not found, nothing to destroy.`); - return Promise.reject(ex); - } - } - - protected async getContainerInfo(): Promise { - const docker = new Docker(); - const image = this.getContainerImageName(); - const containerInfos = await docker.listContainers({}); - - let aContainerInfo; - if (this.containerId !== undefined) { - aContainerInfo = containerInfos.find((ci) => ci.Id === this.containerId); - } - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error(`DAMLTestLedger#getContainerInfo() no image "${image}"`); - } - } - - public async getRpcApiPublicPort(): Promise { - const fnTag = "DAMLTestLedger#getRpcApiPublicPort()"; - const aContainerInfo = await this.getContainerInfo(); - const { rpcApiHttpPort: thePort } = this; - const { Ports: ports } = aContainerInfo; - - if (ports.length < 1) { - throw new Error(`${fnTag} no ports exposed or mapped at all`); - } - const mapping = ports.find((x) => x.PrivatePort === thePort); - if (mapping) { - if (!mapping.PublicPort) { - throw new Error(`${fnTag} port ${thePort} mapped but not public`); - } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); - } else { - return mapping.PublicPort; - } - } else { - throw new Error(`${fnTag} no mapping found for ${thePort}`); - } - } - public async getDamlAuthorizationToken(): Promise { - const docker = new Docker(); - const aContainerInfo = await this.getContainerInfo(); - const containerId = aContainerInfo.Id; - const exec = await docker.getContainer(containerId).exec({ - AttachStdin: false, - AttachStdout: true, - AttachStderr: true, - Tty: true, - Cmd: ["/bin/bash", "-c", "cat jwt"], // Command to execute - }); - const stream = await exec.start({}); - - return new Promise((resolve, reject) => { - let output = ""; - stream.on("data", (data: Buffer) => { - output += data.toString(); // Accumulate the output - resolve(output); - }); - stream.on("error", (err: Error) => { - reject(err); - }); - }); - } - - public async getContainerIpAddress(): Promise { - const fnTag = "DAMLTestLedger#getContainerIpAddress()"; - const aContainerInfo = await this.getContainerInfo(); - - if (aContainerInfo) { - const { NetworkSettings } = aContainerInfo; - const networkNames: string[] = Object.keys(NetworkSettings.Networks); - if (networkNames.length < 1) { - throw new Error(`${fnTag} container not connected to any networks`); - } else { - return NetworkSettings.Networks[networkNames[0]].IPAddress; - } - } else { - throw new Error(`${fnTag} cannot find image: ${this.imageName}`); - } - } - - private pullContainerImage(containerNameAndTag: string): Promise { - return new Promise((resolve, reject) => { - const docker = new Docker(); - docker.pull(containerNameAndTag, (pullError: unknown, stream: never) => { - if (pullError) { - reject(pullError); - } else { - docker.modem.followProgress( - stream, - (progressError: unknown, output: unknown[]) => { - if (progressError) { - reject(progressError); - } else { - resolve(output); - } - }, - ); - } - }); - }); - } - - private validateConstructorOptions(): void { - const validationResult = DAML_TEST_LEDGER_OPTIONS_JOI_SCHEMA.validate({ - imageVersion: this.imageVersion, - imageName: this.imageName, - rpcApiHttpPort: this.rpcApiHttpPort, - }); - - if (validationResult.error) { - throw new Error( - `DAMLTestLedger#ctor ${validationResult.error.annotate()}`, - ); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-samples-env-constants.ts b/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-samples-env-constants.ts deleted file mode 100644 index 077bb0cc72..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-samples-env-constants.ts +++ /dev/null @@ -1,125 +0,0 @@ -export interface IFabricOrgEnvInfo extends NodeJS.ProcessEnv { - [key: string]: string | undefined; - readonly CORE_PEER_TLS_ENABLED: string; - readonly CORE_PEER_LOCALMSPID: string; - readonly CORE_PEER_TLS_CERT_FILE: string; - readonly CORE_PEER_TLS_KEY_FILE: string; - readonly CORE_PEER_ADDRESS: string; - readonly CORE_PEER_MSPCONFIGPATH: string; - readonly CORE_PEER_TLS_ROOTCERT_FILE: string; - readonly ORDERER_TLS_ROOTCERT_FILE: string; -} - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ENABLED_ORG_1 = "true"; -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_LOCALMSPID_ORG_1 = - "Org1MSP"; -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_CERT_FILE_ORG_1 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_KEY_FILE_ORG_1 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_ADDRESS_ORG_1 = - "peer0.org1.example.com:7051"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_MSPCONFIGPATH_ORG_1 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ROOTCERT_FILE_ORG_1 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_1 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"; - -/** - * Contains the file paths and other configuration parameters (such as flags, - * hostnames etc.) that are a match for what you need to execute peer commands - * from within the "cli" container of the fabric samples test network. - * - * The aforementioned test network ships with 2 organizations by default, this - * is the configuration to make the peer binary talk to the **first** organization. - * - * Important note: The paths are only accurate within the mentioned `cli` container - * as defined in the compose .yaml files describing the test network. Therefore, - * if you have shelled into the Cacti All-in-One Fabric container, these are not - * useful there, instead you need to shell into the nested `cli` container by - * executing something like `docker exec -it cli bash` which will then get you - * to the environment where these paths are representative and useful. - * - * @see https://github.com/hyperledger/fabric-samples - */ -export const FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1: IFabricOrgEnvInfo = { - CORE_PEER_TLS_ENABLED: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ENABLED_ORG_1, - CORE_PEER_LOCALMSPID: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_LOCALMSPID_ORG_1, - CORE_PEER_TLS_CERT_FILE: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_CERT_FILE_ORG_1, - CORE_PEER_TLS_KEY_FILE: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_KEY_FILE_ORG_1, - CORE_PEER_ADDRESS: FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_ADDRESS_ORG_1, - CORE_PEER_MSPCONFIGPATH: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_MSPCONFIGPATH_ORG_1, - CORE_PEER_TLS_ROOTCERT_FILE: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ROOTCERT_FILE_ORG_1, - ORDERER_TLS_ROOTCERT_FILE: - FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_1, -}; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ENABLED_ORG_2 = "true"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_LOCALMSPID_ORG_2 = - "Org2MSP"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_CERT_FILE_ORG_2 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_KEY_FILE_ORG_2 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_ADDRESS_ORG_2 = - "peer0.org2.example.com:9051"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_MSPCONFIGPATH_ORG_2 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ROOTCERT_FILE_ORG_2 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"; - -export const FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_2 = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"; - -/** - * Contains the file paths and other configuration parameters (such as flags, - * hostnames etc.) that are a match for what you need to execute peer commands - * from within the "cli" container of the fabric samples test network. - * - * The aforementioned test network ships with 2 organizations by default, this - * is the configuration to make the peer binary talk to the **second** organization. - * - * Important note: The paths are only accurate within the mentioned `cli` container - * as defined in the compose .yaml files describing the test network. Therefore, - * if you have shelled into the Cacti All-in-One Fabric container, these are not - * useful there, instead you need to shell into the nested `cli` container by - * executing something like `docker exec -it cli bash` which will then get you - * to the environment where these paths are representative and useful. - * - * @see https://github.com/hyperledger/fabric-samples - */ -export const FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2: IFabricOrgEnvInfo = { - CORE_PEER_TLS_ENABLED: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ENABLED_ORG_2, - CORE_PEER_LOCALMSPID: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_LOCALMSPID_ORG_2, - CORE_PEER_TLS_CERT_FILE: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_CERT_FILE_ORG_2, - CORE_PEER_TLS_KEY_FILE: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_KEY_FILE_ORG_2, - CORE_PEER_ADDRESS: FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_ADDRESS_ORG_2, - CORE_PEER_MSPCONFIGPATH: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_MSPCONFIGPATH_ORG_2, - CORE_PEER_TLS_ROOTCERT_FILE: - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ROOTCERT_FILE_ORG_2, - ORDERER_TLS_ROOTCERT_FILE: - FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_2, -}; diff --git a/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts b/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts deleted file mode 100644 index 58033cec1a..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts +++ /dev/null @@ -1,1519 +0,0 @@ -import { EventEmitter } from "events"; - -import compareVersions from "compare-versions"; -import temp from "temp"; - -import Docker, { - Container, - ContainerCreateOptions, - ContainerInfo, -} from "dockerode"; - -import { Wallets, Gateway, Wallet, X509Identity } from "fabric-network"; -import FabricCAServices from "fabric-ca-client"; - -import Joi from "joi"; -import { ITestLedger } from "../i-test-ledger"; -import { Containers } from "../common/containers"; -import { - Checks, - Logger, - LogLevelDesc, - LoggerProvider, - Bools, - safeStringifyException, -} from "@hyperledger/cactus-common"; -import Dockerode from "dockerode"; -import { - NodeSSH, - Config as SshConfig, - SSHExecCommandOptions, - SSHExecCommandResponse, -} from "node-ssh"; -import path from "path"; -import fs from "fs"; -import yaml from "js-yaml"; -import { envMapToDocker } from "../common/env-map-to-docker"; -import { RuntimeError } from "run-time-error-cjs"; - -export interface organizationDefinitionFabricV2 { - path: string; - orgName: string; - orgChannel: string; - certificateAuthority: boolean; - stateDatabase: STATE_DATABASE; - port: string; -} - -export interface EnrollFabricIdentityOptionsV1 { - readonly wallet: Wallet; - readonly enrollmentID: string; - readonly organization: string; -} - -/* - * Contains options for Fabric container - */ -export interface IFabricTestLedgerV1ConstructorOptions { - publishAllPorts: boolean; - imageVersion?: string; - imageName?: string; - envVars?: Map; - logLevel?: LogLevelDesc; - emitContainerLogs?: boolean; - stateDatabase?: STATE_DATABASE; - orgList?: string[]; - extraOrgs?: organizationDefinitionFabricV2[]; - // For test development, attach to ledger that is already running, don't spin up new one - useRunningLedger?: boolean; -} - -export enum STATE_DATABASE { - LEVEL_DB = "leveldb", - COUCH_DB = "couchdb", -} -export interface LedgerStartOptions { - omitPull?: boolean; - setContainer?: boolean; - containerID?: string; -} - -export const DEFAULT_FABRIC_2_AIO_IMAGE_NAME = - "ghcr.io/hyperledger/cactus-fabric2-all-in-one"; -export const DEFAULT_FABRIC_2_AIO_IMAGE_VERSION = "2023-08-17-issue2057-pr2135"; -export const DEFAULT_FABRIC_2_AIO_FABRIC_VERSION = "2.4.4"; - -export const FABRIC_25_LTS_AIO_IMAGE_VERSION = - "2024-03-03--issue-2945-fabric-v2-5-6"; -export const FABRIC_25_LTS_AIO_FABRIC_VERSION = "2.5.6"; - -/* - * Provides default options for Fabric container - */ -const DEFAULT_OPTS = Object.freeze({ - imageName: "ghcr.io/hyperledger/cactus-fabric-all-in-one", - imageVersion: "v1.0.0-rc.2", - envVars: new Map([["FABRIC_VERSION", "1.4.8"]]), - stateDatabase: STATE_DATABASE.COUCH_DB, - orgList: ["org1", "org2"], -}); -export const FABRIC_TEST_LEDGER_DEFAULT_OPTIONS = DEFAULT_OPTS; - -/* - * Provides validations for the Fabric container's options - */ -const OPTS_JOI_SCHEMA: Joi.Schema = Joi.object().keys({ - publishAllPorts: Joi.boolean().required(), - imageVersion: Joi.string().min(5).required(), - imageName: Joi.string() - .regex(/[a-z0-9]+(?:[._-]{1,2}[a-z0-9]+)*/) - .min(1) - .required(), - envVars: Joi.object().pattern(/.*/, [ - Joi.string().required(), - Joi.string().min(1).required(), - ]), -}); - -export const FABRIC_TEST_LEDGER_OPTIONS_JOI_SCHEMA = OPTS_JOI_SCHEMA; - -export class FabricTestLedgerV1 implements ITestLedger { - public static readonly CLASS_NAME = "FabricTestLedgerV1"; - - public readonly imageVersion: string; - public readonly imageName: string; - public readonly publishAllPorts: boolean; - public readonly emitContainerLogs: boolean; - public readonly envVars: Map; - public readonly stateDatabase: STATE_DATABASE; - public orgList: string[]; - public readonly testLedgerId: string; - public extraOrgs: organizationDefinitionFabricV2[] | undefined; - - private readonly log: Logger; - - private container: Container | undefined; - private containerId: string | undefined; - private readonly useRunningLedger: boolean; - - public get className(): string { - return FabricTestLedgerV1.CLASS_NAME; - } - - constructor(public readonly options: IFabricTestLedgerV1ConstructorOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.imageVersion = options.imageVersion || DEFAULT_OPTS.imageVersion; - this.imageName = options.imageName || DEFAULT_OPTS.imageName; - this.publishAllPorts = options.publishAllPorts; - this.emitContainerLogs = Bools.isBooleanStrict(options.emitContainerLogs) - ? (options.emitContainerLogs as boolean) - : true; - this.envVars = options.envVars || DEFAULT_OPTS.envVars; - this.stateDatabase = options.stateDatabase || DEFAULT_OPTS.stateDatabase; - this.orgList = options.orgList || DEFAULT_OPTS.orgList; - this.extraOrgs = options.extraOrgs; - - if (compareVersions.compare(this.getFabricVersion(), "1.4", "<")) - this.log.warn( - `This version of Fabric ${this.getFabricVersion()} is unsupported`, - ); - - this.useRunningLedger = Bools.isBooleanStrict(options.useRunningLedger) - ? (options.useRunningLedger as boolean) - : false; - - this.testLedgerId = `cactusf2aio.${this.imageVersion}.${Date.now()}`; - - this.validateConstructorOptions(); - } - - public getContainer(): Container { - const fnTag = "FabricTestLedgerV1#getContainer()"; - if (!this.container) { - throw new Error(`${fnTag} container not yet started by this instance.`); - } else { - return this.container; - } - } - - public getContainerImageName(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - public getFabricVersion(): string { - return `${this.envVars.get("FABRIC_VERSION")}`; - } - - public capitalizedMspIdOfOrg(organization: string): string { - return organization.charAt(0).toUpperCase() + organization.slice(1) + "MSP"; - } - - public getDefaultMspId(): string { - return "Org1MSP"; - } - - public async createCaClientV2( - organization: string, - ): Promise { - const fnTag = `${this.className}#createCaClientV2()`; - this.log.debug(`${fnTag} ENTER`); - try { - const ccp = await this.getConnectionProfileOrgX(organization); - const caInfo = - ccp.certificateAuthorities["ca." + organization + ".example.com"]; - const { tlsCACerts, url: caUrl, caName } = caInfo; - const { pem: caTLSCACertPem } = tlsCACerts; - const tlsOptions = { trustedRoots: caTLSCACertPem, verify: false }; - this.log.debug(`createCaClientV2() caName=%o caUrl=%o`, caName, caUrl); - this.log.debug(`createCaClientV2() tlsOptions=%o`, tlsOptions); - return new FabricCAServices(caUrl, tlsOptions, caName); - } catch (ex) { - this.log.error(`createCaClientV2() Failure:`, ex); - throw new RuntimeError(`${fnTag} Inner Exception:`, ex); - } - } - - public async createCaClient(): Promise { - const fnTag = `${this.className}#createCaClient()`; - try { - return this.createCaClientV2("org1"); - } catch (ex) { - this.log.error(`createCaClient() Failure:`, ex); - throw new RuntimeError(`${fnTag} Inner Exception:`, ex); - } - } - - public async enrollUserV2(opts: EnrollFabricIdentityOptionsV1): Promise { - const fnTag = `${this.className}#enrollUserV2()`; - - Checks.truthy(opts, "enrollUserV2 opts"); - Checks.nonBlankString(opts.organization, "enrollUserV2 opts.organization"); - Checks.nonBlankString(opts.enrollmentID, "enrollUserV2 opts.enrollmentID"); - Checks.truthy(opts.wallet, "enrollUserV2 opts.wallet"); - - const { enrollmentID, organization, wallet } = opts; - try { - const mspId = this.capitalizedMspIdOfOrg(organization); - const connectionProfile = - await this.getConnectionProfileOrgX(organization); - // Create a new gateway for connecting to our peer node. - const gateway = new Gateway(); - const discovery = { enabled: true, asLocalhost: true }; - const gatewayOptions = { - wallet, - identity: "admin", - discovery, - }; - await gateway.connect(connectionProfile, gatewayOptions); - - // Get the CA client object from the gateway for interacting with the CA. - // const ca = gateway.getClient().getCertificateAuthority(); - const ca = await this.createCaClientV2(opts.organization); - const adminIdentity = gateway.getIdentity(); - - // Register the user, enroll the user, and import the new identity into the wallet. - const registrationRequest = { - affiliation: opts.organization + ".department1", - enrollmentID: opts.enrollmentID, - role: "client", - }; - - const provider = opts.wallet - .getProviderRegistry() - .getProvider(adminIdentity.type); - const adminUser = await provider.getUserContext(adminIdentity, "admin"); - - const secret = await ca.register(registrationRequest, adminUser); - this.log.debug(`Registered client user "${enrollmentID}" OK`); - - const enrollmentRequest = { enrollmentID, enrollmentSecret: secret }; - const enrollment = await ca.enroll(enrollmentRequest); - this.log.debug(`Enrolled client user "${enrollmentID}" OK`); - - const { certificate, key } = enrollment; - const keyBytes = key.toBytes(); - - const x509Identity: X509Identity = { - credentials: { - certificate: certificate, - privateKey: keyBytes, - }, - mspId, - type: "X.509", - }; - await wallet.put(enrollmentID, x509Identity); - this.log.debug(`Wallet import of "${enrollmentID}" OK`); - - return [x509Identity, wallet]; - } catch (ex) { - this.log.error(`${fnTag} failed with inner exception:`, ex); - throw new RuntimeError(`${fnTag} failed with inner exception:`, ex); - } - } - - public async enrollUser(wallet: Wallet): Promise { - const fnTag = `${this.className}#enrollUser()`; - try { - const enrollmentID = "user"; - const opts = { enrollmentID, organization: "org1", wallet }; - const out = await this.enrollUserV2(opts); - return out; - } catch (ex) { - this.log.error(`${fnTag} failed with inner exception:`, ex); - throw new RuntimeError(`${fnTag} failed with inner exception:`, ex); - } - } - - /** - * Tuple of [adminUsername, adminSecret] - */ - public get adminCredentials(): [string, string] { - return ["admin", "adminpw"]; - } - - public async enrollAdminV2( - opts: Partial, - ): Promise<[X509Identity, Wallet]> { - const fnTag = `${this.className}#enrollAdminV2()`; - this.log.debug(`${fnTag} ENTER`); - - const { organization } = opts; - if (!organization) { - throw new RuntimeError(`${fnTag} opts.organization cannot be falsy.`); - } - Checks.nonBlankString(organization, `${fnTag}:opts.organization`); - - try { - const ca = await this.createCaClientV2(organization); - const wallet = await Wallets.newInMemoryWallet(); - - // Enroll the admin user, and import the new identity into the wallet. - const request = { - enrollmentID: this.adminCredentials[0], - enrollmentSecret: this.adminCredentials[1], - }; - const enrollment = await ca.enroll(request); - - const mspId = this.capitalizedMspIdOfOrg(organization); - const { certificate, key } = enrollment; - const keyBytes = key.toBytes(); - - const x509Identity: X509Identity = { - credentials: { - certificate: certificate, - privateKey: keyBytes, - }, - mspId, - type: "X.509", - }; - - await wallet.put("admin", x509Identity); - return [x509Identity, wallet]; - } catch (ex) { - this.log.error(`${fnTag} Failure:`, ex); - throw new RuntimeError(`${fnTag} Exception:`, ex); - } - } - - public async enrollAdmin(): Promise<[X509Identity, Wallet]> { - const fnTag = `${this.className}#enrollAdmin()`; - try { - const out = await this.enrollAdminV2({ organization: "org1" }); - return out; - } catch (ex) { - this.log.error(`${fnTag} Failure:`, ex); - throw new RuntimeError(`${fnTag} Exception:`, ex); - } - } - - public async getConnectionProfileOrg1(): Promise { - const cInfo = await this.getContainerInfo(); - const container = this.getContainer(); - const CCP_JSON_PATH_FABRIC_V2 = - "/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/connection-org1.json"; - const ccpJsonPath = CCP_JSON_PATH_FABRIC_V2; - const ccpJson = await Containers.pullFile(container, ccpJsonPath); - const ccp = JSON.parse(ccpJson); - - { - // peer0.org1.example.com - const privatePort = 7051; - const hostPort = await Containers.getPublicPort(privatePort, cInfo); - ccp.peers["peer0.org1.example.com"].url = `grpcs://localhost:${hostPort}`; - } - if (ccp.peers["peer1.org1.example.com"]) { - // peer1.org1.example.com - const privatePort = 8051; - const hostPort = await Containers.getPublicPort(privatePort, cInfo); - ccp.peers["peer1.org1.example.com"].url = `grpcs://localhost:${hostPort}`; - } - { - // ca_peerOrg1 - const privatePort = 7054; - const hostPort = await Containers.getPublicPort(privatePort, cInfo); - const { certificateAuthorities: cas } = ccp; - cas["ca.org1.example.com"].url = `https://localhost:${hostPort}`; - } - - // FIXME - this still doesn't work. At this moment the only successful tests - // we could run was with host ports bound to the matching ports of the internal - // containers and with discovery enabled. - // When discovery is disabled, it just doesn't yet work and these changes - // below are my attempts so far at making the connection profile work without - // discovery being turned on (which we cannot use when the ports are randomized - // on the host for the parent container) - if (this.publishAllPorts) { - // orderer.example.com - - const privatePort = 7050; - const hostPort = await Containers.getPublicPort(privatePort, cInfo); - const url = `grpcs://localhost:${hostPort}`; - - const ORDERER_PEM_PATH_FABRIC_V2 = - "/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem"; - - const ordererPemPath = ORDERER_PEM_PATH_FABRIC_V2; - const pem = await Containers.pullFile(container, ordererPemPath); - - ccp.orderers = { - "orderer.example.com": { - url, - grpcOptions: { - "ssl-target-name-override": "orderer.example.com", - }, - tlsCACerts: { - pem, - }, - }, - }; - - ccp.channels = { - mychannel: { - orderers: ["orderer.example.com"], - peers: { - "peer0.org1.example.com": { - endorsingPeer: true, - chaincodeQuery: true, - ledgerQuery: true, - eventSource: true, - discover: true, - }, - }, - }, - }; - - // FIXME: Still have no idea if we can use these options to make it work - // with discovery - // { - // const { grpcOptions } = ccp.peers["peer0.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; - // } - // { - // const { grpcOptions } = ccp.peers["peer1.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; - // } - } - return ccp; - } - - public async getConnectionProfileOrgX(orgName: string): Promise { - const fnTag = `${this.className}:getConnectionProfileOrgX()`; - this.log.debug(`${fnTag} ENTER - orgName=%s`, orgName); - - const connectionProfilePath = - orgName === "org1" || orgName === "org2" - ? path.join( - "fabric-samples/test-network", - "organizations/peerOrganizations", - orgName + ".example.com", - "connection-" + orgName + ".json", - ) - : path.join( - "add-org-" + orgName, - "organizations/peerOrganizations", - orgName + ".example.com", - "connection-" + orgName + ".json", - ); - const peer0Name = `peer0.${orgName}.example.com`; - const peer1Name = `peer1.${orgName}.example.com`; - const cInfo = await this.getContainerInfo(); - const container = this.getContainer(); - const CCP_JSON_PATH_FABRIC_V2 = connectionProfilePath; - const ccpJsonPath = CCP_JSON_PATH_FABRIC_V2; - try { - const cId = container.id; - this.log.debug(`${fnTag} Pull Fabric CP %s :: %s`, cId, ccpJsonPath); - const ccpJson = await Containers.pullFile(container, ccpJsonPath); - this.log.debug(`${fnTag} Got Fabric CP %s :: %s OK`, cId, ccpJsonPath); - const ccp = JSON.parse(ccpJson); - - // Treat peer0 - const urlGrpcs = ccp["peers"][peer0Name]["url"]; - const privatePortPeer0 = parseFloat(urlGrpcs.replace(/^\D+/g, "")); - - const hostPort = await Containers.getPublicPort(privatePortPeer0, cInfo); - ccp["peers"][peer0Name]["url"] = `grpcs://localhost:${hostPort}`; - - // if there is a peer1 - if (ccp.peers["peer1.org" + orgName + ".example.com"]) { - const urlGrpcs = ccp["peers"][peer1Name]["url"]; - const privatePortPeer1 = parseFloat(urlGrpcs.replace(/^\D+/g, "")); - - const hostPortPeer1 = await Containers.getPublicPort( - privatePortPeer1, - cInfo, - ); - ccp["peers"][peer1Name]["url"] = `grpcs://localhost:${hostPortPeer1}`; - } - { - // ca_peerOrg1 - const caName = `ca.${orgName}.example.com`; - const urlGrpcs = ccp["certificateAuthorities"][caName]["url"]; - const caPort = parseFloat(urlGrpcs.replace(/^\D+/g, "")); - - const caHostPort = await Containers.getPublicPort(caPort, cInfo); - const { certificateAuthorities: cas } = ccp; - cas[caName].url = `https://localhost:${caHostPort}`; - } - - // FIXME - this still doesn't work. At this moment the only successful tests - // we could run was with host ports bound to the matching ports of the internal - // containers and with discovery enabled. - // When discovery is disabled, it just doesn't yet work and these changes - // below are my attempts so far at making the connection profile work without - // discovery being turned on (which we cannot use when the ports are randomized - // on the host for the parent container) - if (this.publishAllPorts) { - // orderer.example.com - - const privatePort = 7050; - const hostPort = await Containers.getPublicPort(privatePort, cInfo); - const url = `grpcs://localhost:${hostPort}`; - const ORDERER_PEM_PATH_FABRIC_V2 = - "/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem"; - const ordererPemPath = ORDERER_PEM_PATH_FABRIC_V2; - const pem = await Containers.pullFile(container, ordererPemPath); - ccp.orderers = { - "orderer.example.com": { - url, - grpcOptions: { - "ssl-target-name-override": "orderer.example.com", - }, - tlsCACerts: { - pem, - }, - }, - }; - const specificPeer = "peer0." + orgName + ".example.com"; - - ccp.channels = { - mychannel: { - orderers: ["orderer.example.com"], - peers: {}, - }, - }; - - ccp.channels["mychannel"]["peers"][specificPeer] = { - endorsingPeer: true, - chaincodeQuery: true, - ledgerQuery: true, - eventSource: true, - discover: true, - }; - - // FIXME: Still have no idea if we can use these options to make it work - // with discovery - // { - // const { grpcOptions } = ccp.peers["peer0.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; - // } - // { - // const { grpcOptions } = ccp.peers["peer1.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; - // } - } - return ccp; - } catch (ex: unknown) { - this.log.debug(`getConnectionProfileOrgX() crashed: `, ex); - const e = ex instanceof Error ? ex : safeStringifyException(ex); - throw new RuntimeError(`getConnectionProfileOrgX() crashed.`, e); - } - } - - public async populateFile( - addOrgXDirectoryPath: string, - templateType: string, - orgName: string, - port: string, - destinationPath: string, - ): Promise { - const fnTag = `FabricTestLedger#populateFile()`; - const { log } = this; - try { - log.debug(`${fnTag}: init`); - const createdFile = { - body: "", - filename: "", - filepath: "", - }; - const mspId = orgName + "MSP"; - const networkName = "cactusfabrictestnetwork"; - - if (port === undefined) { - throw new Error(`${fnTag} undefined port`); - } - - //const dockerDirectoryAddOrgX = path.join(addOrgXDirectoryPath, "docker"); - - let filename; - switch (templateType) { - case "couch": - filename = `docker-compose-couch-org3.yaml`; - break; - case "compose": - filename = `docker-compose-org3.yaml`; - - break; - case "ca": - filename = `docker-compose-ca-org3.yaml`; - break; - case "crypto": - filename = `org3-crypto.yaml`; - break; - case "configTxGen": - filename = `configtx-default.yaml`; - break; - case "updateChannelConfig": - filename = `updateChannelConfig.sh`; - break; - default: - throw new Error(`${fnTag} Template type not defined`); - } - - const filePath = path.join(addOrgXDirectoryPath, filename); - const contents = fs.readFileSync(filePath, "utf8"); - log.debug(`${fnTag}: loaded file: ${filename}`); - const peer0OrgName = `peer0.${orgName}.example.com`; - - switch (templateType) { - case "couch": - log.debug(`${fnTag}: entered case couch`); - //const dataCouch: IDockerFabricComposeCouchDbTemplate = yaml.load(contents); - const dataCouch: any = yaml.load(contents); - log.debug(dataCouch); - //await fs.promises.writeFile("test", dataCouch); - - if (dataCouch === null || dataCouch === undefined) { - throw new Error(`${fnTag} Could not read yaml`); - } - const couchDbName = `couchdb${orgName}`; - // services: couchdbX: - dataCouch["services"][couchDbName] = - dataCouch["services"]["couchdb4"]; - delete dataCouch["services"]["couchdb4"]; - - dataCouch["networks"]["test"]["name"] = networkName; - - dataCouch["services"][couchDbName]["container_name"] = - `couchdb${orgName}`; - dataCouch["services"][couchDbName]["ports"] = [`${port}:5984`]; - - // services: orgX.example.com: - dataCouch["services"][peer0OrgName] = - dataCouch["services"]["peer0.org3.example.com"]; - - dataCouch["services"][peer0OrgName]["environment"][1] = - `CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=${couchDbName}:5984`; - - dataCouch["services"][peer0OrgName]["depends_on"] = [couchDbName]; - - delete dataCouch["services"]["peer0.org3.example.com"]; - log.debug(dataCouch); - - const dumpCouch = yaml.dump(dataCouch, { - flowLevel: -1, - quotingType: '"', - styles: { - "!!int": "decimal", - "!!null": "camelcase", - }, - }); - - createdFile.filename = `docker-compose-couch-${orgName}.yaml`; - createdFile.filepath = path.join( - destinationPath, - createdFile.filename, - ); - createdFile.body = dumpCouch; - await fs.promises.writeFile(createdFile.filepath, createdFile.body); - - log.debug(`Created file at ${createdFile.filepath}`); - log.debug(`docker/docker-compose-couch-${orgName}.yaml`); - return createdFile; - - case "compose": - log.debug(`${fnTag}: entered case compose`); - const dataCompose: any = yaml.load(contents); - if (dataCompose === null || dataCompose === undefined) { - throw new Error(`${fnTag} Could not read yaml`); - } - - log.debug("dataCompose: \n"); - log.debug(dataCompose); - // l.9: volume name; peer0.org3.example.com: - dataCompose["volumes"][peer0OrgName] = null; - delete dataCompose["volumes"]["peer0.org3.example.com"]; - - //dataCompose["volumes"][orgName] = null; - // l. 17: org name - dataCompose["services"][peer0OrgName] = - dataCompose["services"]["peer0.org3.example.com"]; - delete dataCompose["services"]["peer0.org3.example.com"]; - - // Delete label - delete dataCompose["networks"]["test"]["name"]; - //dataCompose['networks']['test']['name'] = networkName; - //dataCompose["networks"]["test"] = null; - delete dataCompose["services"][peer0OrgName]["labels"]; - - //l.18: container name - dataCompose["services"][peer0OrgName]["container_name"] = - peer0OrgName; - - // - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=cactusfabrictestnetwork_test - - dataCompose["services"][peer0OrgName]["environment"][1] = - `CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${networkName}`; - - // CORE_PEER_ID=peer0.org3.example.com - dataCompose["services"][peer0OrgName]["environment"][8] = - `CORE_PEER_ID=${peer0OrgName}`; - - // CORE_PEER_ADDRESS=peer0.org3.example.com:11051 - dataCompose["services"][peer0OrgName]["environment"][9] = - `CORE_PEER_ADDRESS=${peer0OrgName}:${port}`; - - // CORE_PEER_LISTENADDRESS=0.0.0.0:11051 - dataCompose["services"][peer0OrgName]["environment"][10] = - `CORE_PEER_LISTENADDRESS=0.0.0.0:${port}`; - - // - CORE_PEER_CHAINCODEADDRESS=peer0.org3.example.com:11052 - const chaincodePort = parseInt(port) + 1; - dataCompose["services"][peer0OrgName]["environment"][11] = - `CORE_PEER_CHAINCODEADDRESS=${peer0OrgName}:${chaincodePort}`; - - // CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:11052 - dataCompose["services"][peer0OrgName]["environment"][12] = - `CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:${chaincodePort}`; - - // - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org3.example.com:11051 - dataCompose["services"][peer0OrgName]["environment"][13] = - `CORE_PEER_GOSSIP_BOOTSTRAP=${peer0OrgName}:${port}`; - - // - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org3.example.com:11051 - - dataCompose["services"][peer0OrgName]["environment"][14] = - `CORE_PEER_GOSSIP_EXTERNALENDPOINT=${peer0OrgName}:${port}`; - - // - CORE_PEER_LOCALMSPID=Org3MSP - - dataCompose["services"][peer0OrgName]["environment"][15] = - `CORE_PEER_LOCALMSPID=${mspId}`; - - /* - dataCompose["services"][peer0OrgName][ - "environment" - ][16] = `COMPOSE_PROJECT_NAME=${networkName}`; - - */ - - /// Volumes - // - ../../organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/msp:/etc/hyperledger/fabric/msp - dataCompose["services"][peer0OrgName]["volumes"][1] = - `/add-org-${orgName}/organizations/peerOrganizations/${orgName}.example.com/peers/peer0.${orgName}.example.com/msp:/etc/hyperledger/fabric/msp`; - - // - ../../organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls:/etc/hyperledger/fabric/tls - dataCompose["services"][peer0OrgName]["volumes"][2] = - `/add-org-${orgName}/organizations/peerOrganizations/${orgName}.example.com/peers/peer0.${orgName}.example.com/tls:/etc/hyperledger/fabric/tls`; - - // - peer0.org3.example.com:/var/hyperledger/production - dataCompose["services"][peer0OrgName]["volumes"][3] = - `${peer0OrgName}:/var/hyperledger/production`; - - dataCompose["services"][peer0OrgName]["ports"] = [`${port}:${port}`]; - - log.debug("dataCompose after modifications: \n"); - log.debug(dataCompose); - const dumpCompose = yaml.dump(dataCompose, { - flowLevel: -1, - quotingType: '"', - styles: { - "!!int": "decimal", - "!!null": "camelcase", - }, - }); - - const nullRegex = new RegExp(/Null/g); - const newCompose = dumpCompose.replace(nullRegex, ""); - - createdFile.filename = `docker-compose-${orgName}.yaml`; - createdFile.filepath = path.join( - destinationPath, - createdFile.filename, - ); - createdFile.body = newCompose; - - await fs.promises.writeFile(createdFile.filepath, createdFile.body); - - log.debug(`Created file at ${createdFile.filepath}`); - log.debug(`docker/docker-compose-${orgName}.yaml`); - - return createdFile; - - case "ca": - log.info(`${fnTag}: entered case ca`); - const dataCa: any = yaml.load(contents); - if (dataCa === null || dataCa === undefined) { - throw new Error(`${fnTag} Could not read yaml`); - } - log.debug("dataCa: \n"); - log.debug(dataCa); - - const caName = `ca_${orgName}`; - dataCa["services"][caName] = dataCa["services"]["ca_org3"]; - delete dataCa["services"]["ca_org3"]; - - // - FABRIC_CA_SERVER_CA_NAME=ca-org3 - dataCa["services"][caName]["environment"][1] = - `FABRIC_CA_SERVER_CA_NAME=${caName}`; - - // - FABRIC_CA_SERVER_PORT=11054 - dataCa["services"][caName]["environment"][3] = - `FABRIC_CA_SERVER_PORT=${port}`; - - // - "11054:11054" - dataCa["services"][caName]["ports"] = [`${port}:${port}`]; - - dataCa["services"][caName]["volumes"] = [ - `../fabric-ca/${orgName}:/etc/hyperledger/fabric-ca-server`, - ]; - - dataCa["services"][caName]["container_name"] = caName; - - log.debug("dataCa after modifications: \n"); - log.debug(dataCa); - const dumpCa = yaml.dump(dataCa, { - flowLevel: -1, - quotingType: '"', - styles: { - "!!int": "decimal", - "!!null": "camelcase", - }, - }); - - createdFile.filename = `docker-compose-ca-${orgName}.yaml`; - createdFile.filepath = path.join( - destinationPath, - createdFile.filename, - ); - createdFile.body = dumpCa; - log.debug(`Created file at ${createdFile.filepath}`); - log.debug(`docker/docker-compose-ca-${orgName}.yaml`); - await fs.promises.writeFile(createdFile.filepath, createdFile.body); - - return createdFile; - case "crypto": - log.info(`${fnTag}: entered case crypto`); - const dataCrypto: any = yaml.load(contents); - if (dataCrypto === null || dataCrypto === undefined) { - throw new Error(`${fnTag} Could not read yaml`); - } - log.debug("dataCrypto: \n"); - log.debug(dataCrypto); - dataCrypto["PeerOrgs"][0]["Name"] = orgName; - dataCrypto["PeerOrgs"][0]["Domain"] = `${orgName}.example.com`; - - log.debug("dataCrypto after modifications: \n"); - log.debug(dataCrypto); - const dumpCrypto = yaml.dump(dataCrypto, { - flowLevel: -1, - quotingType: '"', - styles: { - "!!int": "decimal", - "!!null": "camelcase", - }, - }); - - createdFile.filename = `${orgName}-crypto.yaml`; - createdFile.filepath = path.join( - destinationPath, - createdFile.filename, - ); - createdFile.body = dumpCrypto; - log.debug(`Created file at ${createdFile.filepath}`); - log.debug(createdFile.filename); - await fs.promises.writeFile(createdFile.filepath, createdFile.body); - - return createdFile; - case "configTxGen": - log.info(`${fnTag}: entered case configTxGen`); - const loadOptions = { - json: true, - }; - const dataConfigTxGen: any = yaml.load(contents, loadOptions); - if (dataConfigTxGen === null || dataConfigTxGen === undefined) { - throw new Error(`${fnTag} Could not read yaml`); - } - log.debug("dataConfigTxGen: \n"); - log.debug(dataConfigTxGen); - - // how to map - &Org3 - // workaround: define a variable TO_REPLACE, and then manually replace that for the necessary reference - //dataConfigTxGen["Organizations"][orgName] = dataConfigTxGen["Organizations"]; - dataConfigTxGen["Organizations"][0]["Name"] = mspId; - dataConfigTxGen["Organizations"][0]["ID"] = mspId; - dataConfigTxGen["Organizations"][0]["MSPDir"] = - `organizations/peerOrganizations/${orgName}.example.com/msp`; - dataConfigTxGen["Organizations"][0]["Policies"]["Readers"]["Rule"] = - `OR('${mspId}.admin','${mspId}.peer','${mspId}.client')`; - - dataConfigTxGen["Organizations"][0]["Policies"]["Writers"]["Rule"] = - `OR('${mspId}.admin','${mspId}.client')`; - dataConfigTxGen["Organizations"][0]["Policies"]["Admins"]["Rule"] = - `OR('${mspId}.admin')`; - dataConfigTxGen["Organizations"][0]["Policies"]["Endorsement"][ - "Rule" - ] = `OR('${mspId}.peer')`; - - log.debug("dataConfigTxGen after modifications: \n"); - log.debug(dataConfigTxGen); - - log.debug("dataConfigTxGen after modifications: \n"); - log.debug(dataConfigTxGen); - - const dumpConfigTxGen = yaml.dump(dataConfigTxGen, { - flowLevel: -1, - quotingType: '"', - styles: { - "!!int": "decimal", - "!!null": "camelcase", - }, - }); - - // TODO - const regexOrOpening = new RegExp(/OR/g); - let replacedConfigTx = dumpConfigTxGen.replace(regexOrOpening, '"OR'); - - const regexOrClosing = new RegExp(/\)/g); - replacedConfigTx = replacedConfigTx.replace(regexOrClosing, ')"'); - - const regexName = new RegExp(/Name:/g); - replacedConfigTx = replacedConfigTx.replace( - regexName, - `&${orgName}\n Name: `, - ); - - log.debug(replacedConfigTx); - - // const readersCloseRegEx = new RegExp("')"); - //dumpConfigTxGen.replace(readersCloseRegEx, "')\""); - - createdFile.filename = `configtx.yaml`; - createdFile.filepath = path.join( - destinationPath, - createdFile.filename, - ); - createdFile.body = replacedConfigTx; - log.debug(`Created file at ${createdFile.filepath}`); - log.debug(createdFile.filename); - await fs.promises.writeFile(createdFile.filepath, createdFile.body); - - return createdFile; - - default: - this.log.error(`${fnTag} template type not found`); - throw new Error(`${fnTag} template type not found`); - } - } catch (error) { - this.log.error(`populateFile() crashed: `, error); - throw new Error(`${fnTag} Unable to run transaction: ${error}`); - } - } - - public setContainer(id: string): void { - const fnTag = "FabricTestLedgerV1#setContainer()"; - let container; - try { - const docker = new Docker(); - container = docker.getContainer(id); - this.container = container; - this.containerId = id; - } catch (error) { - throw new Error(`${fnTag} cannot set container.`); - } - } - - public async addExtraOrgs(): Promise { - const fnTag = `FabricTestLedger#addOrgX()`; - const { log } = this; - if (!this.extraOrgs) { - throw new Error(`${fnTag}: there are no extra orgs`); - } - - log.debug(` - Adding ${this.extraOrgs.length} orgs`); - for (let i = 0; i < this.extraOrgs.length; i++) { - await this.addOrgX( - this.extraOrgs[i].path, - this.extraOrgs[i].orgName, - this.extraOrgs[i].orgChannel, - this.extraOrgs[i].certificateAuthority, - this.extraOrgs[i].stateDatabase, - this.extraOrgs[i].port, - ); - } - } - // req: AddOrganizationFabricV2Request - // returns promise - public async addOrgX( - addOrgXDirectoryPath: string, - orgName: string, - channel = "mychannel", - certificateAuthority: boolean, - database: string, - peerPort = "11051", - ): Promise { - const fnTag = `FabricTestLedger#addOrgX()`; - const { log } = this; - log.debug(` - Adding ${orgName} on ${channel}, with state database ${database}. - Certification authority: ${certificateAuthority}. - Default port: ${peerPort} - Path to original source files: ${addOrgXDirectoryPath}`); - - if (certificateAuthority) { - throw new Error("Adding orgs with CA enabled is not currently supported"); - } - - if (this.stateDatabase !== database) { - log.warn( - "Adding an organization with a different state database than org1 and org2", - ); - } - - const peerPortNumber = Number(peerPort); - const mspId = orgName + "MSP"; - - const ssh = new NodeSSH(); - const sshConfig = await this.getSshConfig(); - await ssh.connect(sshConfig); - log.debug(`SSH connection OK`); - - try { - if (peerPortNumber < 1024) { - throw new Error(`${fnTag} Invalid port, port too small`); - } - const couchDbPort = Math.abs(peerPortNumber - 1067).toString(); - const caPort = (peerPortNumber + 3).toString(); - - temp.track(); - - const tmpDirPrefix = `hyperledger-cactus-${this.className}-${this.containerId}`; - const tmpDirPath = temp.mkdirSync(tmpDirPrefix); - const dockerPath = path.join(addOrgXDirectoryPath, "docker"); - fs.mkdirSync(dockerPath, { recursive: true }); - - const couchdbFile = await this.populateFile( - dockerPath, - "couch", - orgName, - couchDbPort, - tmpDirPath, - ); - - const caFile = await this.populateFile( - dockerPath, - "ca", - orgName, - caPort, - tmpDirPath, - ); - - const composeFile = await this.populateFile( - dockerPath, - "compose", - orgName, - peerPort, - tmpDirPath, - ); - - const cryptoFile = await this.populateFile( - addOrgXDirectoryPath, - "crypto", - orgName, - peerPort, - tmpDirPath, - ); - - const configTxGenFile = await this.populateFile( - addOrgXDirectoryPath, - "configTxGen", - orgName, - peerPort, - tmpDirPath, - ); - - const sourceFiles = [ - couchdbFile, - caFile, - composeFile, - cryptoFile, - configTxGenFile, - ]; - - Checks.truthy(sourceFiles, `${fnTag}:sourceFiles`); - Checks.truthy(Array.isArray(sourceFiles), `${fnTag}:sourceFiles array`); - - for (const sourceFile of sourceFiles) { - const { filename, filepath, body } = sourceFile; - const relativePath = filepath || "./"; - const subDirPath = path.join(tmpDirPath, relativePath); - fs.mkdirSync(subDirPath, { recursive: true }); - const localFilePath = path.join(subDirPath, filename); - fs.writeFileSync(localFilePath, body, "base64"); - } - - const remoteDirPath = path.join("/", "add-org-" + orgName); - log.debug(`SCP from/to %o => %o`, addOrgXDirectoryPath, remoteDirPath); - await ssh.putDirectory(addOrgXDirectoryPath, remoteDirPath); - log.debug(`SCP OK %o`, remoteDirPath); - - log.debug(`SCP from/to %o => %o`, tmpDirPath, remoteDirPath); - await ssh.putDirectory(tmpDirPath, remoteDirPath, { concurrency: 1 }); - log.debug(`SCP OK %o`, remoteDirPath); - - log.debug(`Initializing docker commands`); - - const envVarsList = { - VERBOSE: "true", - PATH: "$PATH:/fabric-samples/bin", - GO111MODULE: "on", - FABRIC_CFG_PATH: `/add-org-${orgName}`, - FABRIC_LOGGING_SPEC: "DEBUG", - CHANNEL_NAME: channel, - CLI_TIMEOUT: 300, - CLI_DELAY: 15, - MAX_RETRY: 5, - ORG_NAME: orgName, - ORG_MSPID: mspId, - DATABASE: database, - CA: certificateAuthority, - NEW_ORG_PORT: peerPort, - COUCH_DB_PORT: couchDbPort, - CA_PORT: caPort, - CONFIG_TX_GEN_PATH: path.join(remoteDirPath), - COMPOSE_FILE_COUCH: path.join(remoteDirPath, couchdbFile.filename), - COMPOSE_FILE: path.join(remoteDirPath, composeFile.filename), - COMPOSE_FILE_CA: path.join(remoteDirPath, caFile.filename), - //COMPOSE_PROJECT_NAME: "cactusfabrictestnetwork_test", - }; - - log.debug("envVars list:"); - log.debug(envVarsList); - - console.log(composeFile); - const sshCmdOptionsDocker: SSHExecCommandOptions = { - execOptions: { - pty: true, - }, - cwd: remoteDirPath, - }; - - const envVars = Object.entries(envVarsList) - .map(([key, value]) => `${key}=${value}`) - .join(" "); - - log.debug("envVars loading command:"); - log.debug(envVars); - - { - const label = "give permissions to files"; - const cmd = `chmod 777 -R *`; - const response = await this.sshExec( - cmd, - label, - ssh, - sshCmdOptionsDocker, - ); - log.debug(`${label} executed: ${JSON.stringify(response)}`); - } - - { - const label = "execute add org script"; - const cmd = certificateAuthority - ? `${envVars} ./addOrgX.sh up -ca` - : `${envVars} ./addOrgX.sh up`; - const response = await this.sshExec( - cmd, - label, - ssh, - sshCmdOptionsDocker, - ); - log.debug(`${label} executed: ${response.stdout}`); - } - - this.orgList.push(orgName); - } catch (error) { - this.log.error(`addOrgX() crashed: `, error); - throw new Error(`${fnTag} Unable to run transaction: ${error}`); - } finally { - try { - ssh.dispose(); - } finally { - temp.cleanup(); - } - } - } - - public async getSshConfig(): Promise { - const fnTag = "FabricTestLedger#getSshConnectionOptions()"; - if (!this.container) { - throw new Error(`${fnTag} - invalid state no container instance set`); - } - const filePath = "/etc/hyperledger/cactus/fabric-aio-image.key"; - const privateKey = await Containers.pullFile(this.container, filePath); - const containerInfo = await this.getContainerInfo(); - const port = await Containers.getPublicPort(22, containerInfo); - const sshConfig: SshConfig = { - host: "localhost", - privateKey, - username: "root", - port, - }; - return sshConfig; - } - - private async sshExec( - cmd: string, - label: string, - ssh: NodeSSH, - sshCmdOptions: SSHExecCommandOptions, - ): Promise { - this.log.debug(`${label} CMD: ${cmd}`); - const cmdRes = await ssh.execCommand(cmd, sshCmdOptions); - this.log.debug(`${label} CMD Response: %o`, cmdRes); - Checks.truthy(cmdRes.code === null, `${label} cmdRes.code === null`); - return cmdRes; - } - - public async start(ops?: LedgerStartOptions): Promise { - const containerNameAndTag = this.getContainerImageName(); - - if (this.useRunningLedger) { - this.log.info( - "Search for already running Fabric Test Ledger because 'useRunningLedger' flag is enabled.", - ); - this.log.info( - "Search criteria - image name: ", - containerNameAndTag, - ", state: running", - ); - const containerInfo = await Containers.getByPredicate( - (ci) => ci.Image === containerNameAndTag && ci.State === "running", - ); - const docker = new Docker(); - this.containerId = containerInfo.Id; - this.container = docker.getContainer(this.containerId); - return this.container; - } - - const dockerEnvVars = envMapToDocker(this.envVars); - - if (this.container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - if (ops) { - if (!ops.omitPull) { - await Containers.pullImage(containerNameAndTag); - } - if (ops.setContainer && ops.containerID) { - this.setContainer(ops.containerID); - if (this.container) { - return this.container; - } else { - throw new Error( - `Cannot set container ID without a running test ledger`, - ); - } - } - } else { - // Pull image by default - await Containers.pullImage(containerNameAndTag); - } - - const createOptions: ContainerCreateOptions = { - name: this.testLedgerId, - ExposedPorts: { - "22/tcp": {}, // OpenSSH Server - TCP - "5984/tcp": {}, // couchdb0 - "6984/tcp": {}, // couchdb1 - "7050/tcp": {}, // orderer.example.com - "7051/tcp": {}, // peer0.org1.example.com - "7054/tcp": {}, // ca_peerOrg1 - "7984/tcp": {}, // couchdb2 - "8051/tcp": {}, // peer1.org1.example.com - "8054/tcp": {}, // ca_peerOrg2 - "8984/tcp": {}, // couchdb3 - "9001/tcp": {}, // supervisord web ui/dashboard - "9051/tcp": {}, // peer0.org2.example.com - "10051/tcp": {}, // peer1.org2.example.com - }, - - Env: dockerEnvVars, - - // This is a workaround needed for macOS which has issues with routing - // to docker container's IP addresses directly... - // https://stackoverflow.com/a/39217691 - - // needed for Docker-in-Docker support - // Privileged: true, - HostConfig: { - PublishAllPorts: this.publishAllPorts, - Privileged: true, - PortBindings: { - "22/tcp": [{ HostPort: "30022" }], - "7050/tcp": [{ HostPort: "7050" }], - "7051/tcp": [{ HostPort: "7051" }], - "7054/tcp": [{ HostPort: "7054" }], - "8051/tcp": [{ HostPort: "8051" }], - "8054/tcp": [{ HostPort: "8054" }], - "9051/tcp": [{ HostPort: "9051" }], - "10051/tcp": [{ HostPort: "10051" }], - }, - }, - }; - if (this.extraOrgs) { - this.extraOrgs.forEach((org) => { - const caPort = String(Number(org.port) + 3); - if (createOptions["ExposedPorts"] && createOptions["HostConfig"]) { - createOptions["ExposedPorts"][`${org.port}/tcp`] = {}; - createOptions["ExposedPorts"][`${caPort}/tcp`] = {}; - createOptions["HostConfig"]["PortBindings"][org.port] = [ - { HostPort: org.port }, - ]; - createOptions["HostConfig"]["PortBindings"][caPort] = [ - { HostPort: caPort }, - ]; - } - }); - } - // (createOptions as any).PortBindings = { - // "22/tcp": [{ HostPort: "30022" }], - // "7050/tcp": [{ HostPort: "7050" }], - // "7051/tcp": [{ HostPort: "7051" }], - // "7054/tcp": [{ HostPort: "7054" }], - // "8051/tcp": [{ HostPort: "8051" }], - // "8054/tcp": [{ HostPort: "8054" }], - // "9051/tcp": [{ HostPort: "9051" }], - // "10051/tcp": [{ HostPort: "10051" }], - // }; - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - containerNameAndTag, - [], - [], - createOptions, - {}, - (err: any) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.container = container; - this.containerId = container.id; - - if (this.emitContainerLogs) { - const fnTag = `[${this.getContainerImageName()}]`; - await Containers.streamLogs({ - container: this.getContainer(), - tag: fnTag, - log: this.log, - }); - } - - try { - await this.waitForHealthCheck(); - if (this.extraOrgs) { - for (let i = 0; i < this.extraOrgs.length; i++) { - await this.addOrgX( - this.extraOrgs[i].path, - this.extraOrgs[i].orgName, - this.extraOrgs[i].orgChannel, - this.extraOrgs[i].certificateAuthority, - this.extraOrgs[i].stateDatabase, - this.extraOrgs[i].port, - ); - } - } - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async waitForHealthCheck(timeoutMs = 180000): Promise { - const fnTag = "FabricTestLedgerV1#waitForHealthCheck()"; - const startedAt = Date.now(); - let reachable = false; - do { - try { - const { Status } = await this.getContainerInfo(); - reachable = Status.endsWith(" (healthy)"); - } catch (ex) { - reachable = false; - if (Date.now() >= startedAt + timeoutMs) { - throw new Error(`${fnTag} timed out (${timeoutMs}ms) -> ${ex}`); - } - } - await new Promise((resolve2) => setTimeout(resolve2, 1000)); - } while (!reachable); - } - - public stop(): Promise { - if (this.useRunningLedger) { - this.log.info("Ignore stop request because useRunningLedger is enabled."); - return Promise.resolve(); - } else if (this.container) { - return Containers.stop(this.container); - } else { - return Promise.reject( - new Error(`Container was never created, nothing to stop.`), - ); - } - } - - public async destroy(): Promise { - const fnTag = "FabricTestLedgerV1#destroy()"; - - if (this.useRunningLedger) { - this.log.info( - "Ignore destroy request because useRunningLedger is enabled.", - ); - return Promise.resolve(); - } - - try { - if (!this.container) { - throw new Error(`${fnTag} Container not found, nothing to destroy.`); - } - const docker = new Dockerode(); - const containerInfo = await this.container.inspect(); - const volumes = containerInfo.Mounts; - await this.container.remove(); - volumes.forEach(async (volume) => { - this.log.debug("Removing volume: ", volume); - if (volume.Name) { - const volumeToDelete = docker.getVolume(volume.Name); - await volumeToDelete.remove(); - } else { - this.log.debug("Volume", volume, "could not be removed"); - } - }); - } catch (error) { - this.log.debug(error); - throw new Error(`${fnTag}": ${error}"`); - } - } - - protected async getContainerInfo(): Promise { - const fnTag = "FabricTestLedgerV1#getContainerInfo()"; - const docker = new Docker(); - const image = this.getContainerImageName(); - const containerInfos = await docker.listContainers({}); - - let aContainerInfo; - if (this.containerId !== undefined) { - aContainerInfo = containerInfos.find((ci) => ci.Id === this.containerId); - } - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error(`${fnTag} no image "${image}"`); - } - } - - public async getContainerIpAddress(): Promise { - const containerInfo = await this.getContainerInfo(); - return Containers.getContainerInternalIp(containerInfo); - } - - private validateConstructorOptions(): void { - const fnTag = "FabricTestLedgerV1#validateConstructorOptions()"; - const result = OPTS_JOI_SCHEMA.validate({ - imageVersion: this.imageVersion, - imageName: this.imageName, - publishAllPorts: this.publishAllPorts, - envVars: this.envVars, - }); - - if (result.error) { - throw new Error(`${fnTag} ${result.error.annotate()}`); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/fabric/interfaces-docker-compose-files.ts b/packages/cactus-test-tooling/src/main/typescript/fabric/interfaces-docker-compose-files.ts deleted file mode 100644 index 35fd4b3de2..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/fabric/interfaces-docker-compose-files.ts +++ /dev/null @@ -1,17 +0,0 @@ -export interface IDockerFabricComposeCouchDbTemplate { - services: IDockerFabricComposeCouchDbTemplateService; -} - -export interface IDockerFabricComposeCouchDbTemplateService { - [key: string]: IDockerCouchdb4; -} - -export interface IDockerCouchdb4 { - ports: string; - [key: string]: string; -} - -export interface IDockerFabricComposeTemplate { - volumes: string; - services: IDockerFabricComposeCouchDbTemplateService; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/github-actions/is-running-in-github-action.ts b/packages/cactus-test-tooling/src/main/typescript/github-actions/is-running-in-github-action.ts deleted file mode 100644 index 9e2aaffd9e..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/github-actions/is-running-in-github-action.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Checks } from "@hyperledger/cactus-common"; - -/** - * Utility/helper function that examines if the current code is running on Github Actions - * or not. - * - * Important note: Do not use this in production code it is meant to be used for tests - * only. Do not depend on this function in your code outside of the test cases. - * - * Uses the environment variable `GITHUB_ACTIONS` to determine its output which is always - * set to `"true"` when GitHub Actions is running the workflow. - * You can use this variable to differentiate when tests are being run locally or by GitHub Actions. - * - * @see https://docs.github.com/en/actions/reference/environment-variables - * - * @param env The process environment variables object to look into when attempting to - * determine if the current execution environment appears to be a GitHub Action VM or - * not. - * @returns - */ -export function isRunningInGithubAction( - env: NodeJS.ProcessEnv = process.env, -): boolean { - Checks.truthy(env, "isRunningInGithubAction():env"); - - // Force a negative result in order to re-enable image caching for tests. - // This is a potentially temporary change that we can only test across multiple - // pull requests because it has to do with the stability of the CI/build/tests - // and therefore the hacky workaround here instead of just deleteing the whole - // mechanism completely. - return false; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/github-actions/prune-docker-all-if-github-action.ts b/packages/cactus-test-tooling/src/main/typescript/github-actions/prune-docker-all-if-github-action.ts deleted file mode 100644 index 11ac18a7d1..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/github-actions/prune-docker-all-if-github-action.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Optional } from "typescript-optional"; -import { - Containers, - IPruneDockerResourcesRequest, - IPruneDockerResourcesResponse, -} from "../common/containers"; -import { isRunningInGithubAction } from "./is-running-in-github-action"; - -/** - * Github Actions started to run out of disk space recently (as of March, 2021) so we have this - * hack here to attempt to free up disk space when running inside a VM of the CI system. - * The idea is that tests can call this function before and after their execution so that - * their container images/volumes get freed up. - */ -export async function pruneDockerAllIfGithubAction( - req?: IPruneDockerResourcesRequest, -): Promise> { - if (!isRunningInGithubAction()) { - return Optional.empty(); - } - console.log( - "Detected current process to be running " + - "inside a Github Action. Pruning all docker resources...", - ); - const res = await Containers.pruneDockerResources(req); - return Optional.of(res); -} diff --git a/packages/cactus-test-tooling/src/main/typescript/go-ipfs/go-ipfs-test-container.ts b/packages/cactus-test-tooling/src/main/typescript/go-ipfs/go-ipfs-test-container.ts deleted file mode 100644 index 0fd85bdffa..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/go-ipfs/go-ipfs-test-container.ts +++ /dev/null @@ -1,192 +0,0 @@ -import type { EventEmitter } from "events"; -import { Optional } from "typescript-optional"; -import { RuntimeError } from "run-time-error-cjs"; -import type { Container } from "dockerode"; -import Docker from "dockerode"; -import { Logger, Checks, Bools } from "@hyperledger/cactus-common"; -import type { LogLevelDesc } from "@hyperledger/cactus-common"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { Containers } from "../common/containers"; - -export interface IGoIpfsTestContainerOptions { - readonly logLevel?: LogLevelDesc; - readonly imageName?: string; - readonly imageTag?: string; - readonly emitContainerLogs?: boolean; - readonly envVars?: Map; - readonly containerId?: string; - readonly apiPort?: number; - readonly swarmPort?: number; - readonly webGatewayPort?: number; -} - -export class GoIpfsTestContainer { - public static readonly CLASS_NAME = "GoIpfsTestContainer"; - - public readonly logLevel: LogLevelDesc; - public readonly imageName: string; - public readonly imageTag: string; - public readonly imageFqn: string; - public readonly log: Logger; - public readonly emitContainerLogs: boolean; - public readonly envVars: Map; - public readonly apiPort: number; - public readonly swarmPort: number; - public readonly webGatewayPort: number; - - private _containerId: Optional; - - public get containerId(): Optional { - return this._containerId; - } - - public get container(): Optional { - const docker = new Docker(); - return this.containerId.isPresent() - ? Optional.ofNonNull(docker.getContainer(this.containerId.get())) - : Optional.empty(); - } - - public get className(): string { - return GoIpfsTestContainer.CLASS_NAME; - } - - constructor(public readonly options: IGoIpfsTestContainerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - this.swarmPort = options.swarmPort || 4001; - this.apiPort = options.apiPort || 5001; - this.webGatewayPort = options.webGatewayPort || 8080; - this.imageName = options.imageName || "ipfs/go-ipfs"; - this.imageTag = options.imageTag || "v0.8.0"; - this.imageFqn = `${this.imageName}:${this.imageTag}`; - this.envVars = options.envVars || new Map(); - this.emitContainerLogs = Bools.isBooleanStrict(options.emitContainerLogs) - ? (options.emitContainerLogs as boolean) - : true; - - this._containerId = Optional.ofNullable(options.containerId); - - this.logLevel = options.logLevel || "INFO"; - - const level = this.logLevel; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.log.debug(`Created instance of ${this.className} OK`); - } - - public async start(omitPull = false): Promise { - const docker = new Docker(); - if (this.containerId.isPresent()) { - this.log.warn(`Container ID provided. Will not start new one.`); - const container = docker.getContainer(this.containerId.get()); - return container; - } - // otherwise we carry on with launching the container - - if (!omitPull) { - await Containers.pullImage(this.imageFqn), {}, this.options.logLevel; - } - - const dockerEnvVars: string[] = new Array(...this.envVars).map( - (pairs) => `${pairs[0]}=${pairs[1]}`, - ); - - const createOptions = { - ExposedPorts: { - [`${this.swarmPort}/tcp`]: {}, - [`${this.apiPort}/tcp`]: {}, - [`${this.webGatewayPort}/tcp`]: {}, - }, - Env: dockerEnvVars, - Healthcheck: { - Test: [ - "CMD-SHELL", - `wget -O- --post-data='' --header='Content-Type:application/json' 'http://127.0.0.1:5001/api/v0/commands'`, - ], - Interval: 1000000000, // 1 second - Timeout: 3000000000, // 3 seconds - Retries: 99, - StartPeriod: 1000000000, // 1 second - }, - HostConfig: { - PublishAllPorts: true, - }, - }; - - this.log.debug(`Starting ${this.imageFqn} with options: `, createOptions); - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - this.imageFqn, - [], - [], - createOptions, - {}, - (err: Error) => { - if (err) { - const errorMessage = `Failed to start container ${this.imageFqn}`; - reject(new RuntimeError(errorMessage, err)); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - const { id } = container; - this.log.debug(`Started ${this.imageFqn} successfully. ID=${id}`); - this._containerId = Optional.ofNonNull(id); - - if (this.emitContainerLogs) { - const fnTag = `[${this.imageFqn}]`; - await Containers.streamLogs({ - container: this.container.get(), - tag: fnTag, - log: this.log, - }); - } - - try { - await Containers.waitForHealthCheck(this.containerId.get()); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async stop(): Promise { - return Containers.stop(this.container.get()); - } - - public async destroy(): Promise { - return this.container.get().remove(); - } - - public async getApiUrl(): Promise { - const port = await this.getApiPort(); - return `http://127.0.0.1:${port}`; - } - - public async getWebGatewayUrl(): Promise { - const port = await this.getWebGatewayPort(); - return `http://127.0.0.1:${port}`; - } - - public async getApiPort(): Promise { - const containerInfo = await Containers.getById(this.containerId.get()); - return Containers.getPublicPort(this.apiPort, containerInfo); - } - - public async getWebGatewayPort(): Promise { - const containerInfo = await Containers.getById(this.containerId.get()); - return Containers.getPublicPort(this.webGatewayPort, containerInfo); - } - - public async getSwarmPort(): Promise { - const containerInfo = await Containers.getById(this.containerId.get()); - return Containers.getPublicPort(this.swarmPort, containerInfo); - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts b/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts deleted file mode 100644 index 938fe4445c..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts +++ /dev/null @@ -1,248 +0,0 @@ -import Docker, { Container, ContainerInfo } from "dockerode"; -import isPortReachable from "is-port-reachable"; -import Joi from "joi"; -import { EventEmitter } from "events"; -import { ITestLedger } from "../i-test-ledger"; - -const OPTS_SCHEMA: Joi.Schema = Joi.object().keys({ - imageVersion: Joi.string().min(5).required(), - imageName: Joi.string().min(1).required(), - httpPort: Joi.number().integer().positive().min(1024).max(65535).required(), -}); - -const CTOR_DEFAULTS = Object.freeze({ - imageVersion: "0.4.2", - imageName: "ealen/echo-server", - httpPort: 8080, -}); - -export interface IHttpEchoContainerConstructorOptions { - imageVersion?: string; - imageName?: string; - httpPort?: number; -} - -export const HTTP_ECHO_CONTAINER_CTOR_DEFAULTS = CTOR_DEFAULTS; - -export const HTTP_ECHO_CONTAINER_OPTS_SCHEMA = OPTS_SCHEMA; - -export class HttpEchoContainer implements ITestLedger { - public readonly imageVersion: string; - public readonly imageName: string; - public readonly httpPort: number; - - private container: Container | undefined; - private containerId: string | undefined; - - constructor( - public readonly options: IHttpEchoContainerConstructorOptions = {}, - ) { - if (!options) { - throw new TypeError(`HttpEchoContainer#ctor options was falsy.`); - } - this.imageVersion = options.imageVersion || CTOR_DEFAULTS.imageVersion; - this.imageName = options.imageName || CTOR_DEFAULTS.imageName; - this.httpPort = options.httpPort || CTOR_DEFAULTS.httpPort; - - this.validateConstructorOptions(); - } - - public getContainer(): Container { - if (!this.container) { - throw new Error(`HttpEchoContainer Wasn't started yet, cannot get it.`); - } else { - return this.container; - } - } - - public getImageName(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - public async getHttpHost(): Promise { - const ipAddress: string = await this.getContainerIpAddress(); - return `http://${ipAddress}:${this.httpPort}`; - } - - public async start(): Promise { - const containerNameAndTag = this.getImageName(); - - if (this.container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - await this.pullContainerImage(containerNameAndTag); - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - containerNameAndTag, - ["--port", this.httpPort.toString(10)], - [], - { - ExposedPorts: { - [`${this.httpPort}/tcp`]: {}, - }, - // This is a workaround needed for macOS which has issues with routing - // to docker container's IP addresses directly... - // https://stackoverflow.com/a/39217691 - PublishAllPorts: true, - }, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.container = container; - this.containerId = container.id; - const host = "127.0.0.1"; - const hostPort = await this.getPublicHttpPort(); - try { - let reachable = false; - do { - reachable = await isPortReachable(hostPort, { host }); - await new Promise((resolve2) => setTimeout(resolve2, 100)); - } while (!reachable); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public stop(): Promise { - return new Promise((resolve, reject) => { - if (this.container) { - this.container.stop({}, (err: unknown, result: Container) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - } else { - return reject( - new Error( - `HttpEchoContainer#stop() Container was not running to begin with.`, - ), - ); - } - }); - } - - public destroy(): Promise { - if (this.container) { - return this.container.remove(); - } else { - return Promise.reject( - new Error( - `HttpEchoContainer#destroy() Container was never created, nothing to destroy.`, - ), - ); - } - } - - protected async getContainerInfo(): Promise { - const fnTag = "HttpEchoContainer#getContainerInfo()"; - const docker = new Docker(); - const image = this.getImageName(); - const containerInfos = await docker.listContainers({}); - - let aContainerInfo; - if (this.containerId !== undefined) { - aContainerInfo = containerInfos.find((ci) => ci.Id === this.containerId); - } - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error(`${fnTag} no image found: "${image}"`); - } - } - - public async getPublicHttpPort(): Promise { - const fnTag = "HttpEchoContainer#getRpcApiPublicPort()"; - const aContainerInfo = await this.getContainerInfo(); - const { httpPort: thePort } = this; - const { Ports: ports } = aContainerInfo; - - if (ports.length < 1) { - throw new Error(`${fnTag} no ports exposed or mapped at all`); - } - const mapping = ports.find((x) => x.PrivatePort === thePort); - if (mapping) { - if (!mapping.PublicPort) { - throw new Error(`${fnTag} port ${thePort} mapped but not public`); - } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); - } else { - return mapping.PublicPort; - } - } else { - throw new Error(`${fnTag} no mapping found for ${thePort}`); - } - } - - public async getContainerIpAddress(): Promise { - const fnTag = "HttpEchoContainer#getContainerIpAddress()"; - const aContainerInfo = await this.getContainerInfo(); - - if (aContainerInfo) { - const { NetworkSettings } = aContainerInfo; - const networkNames: string[] = Object.keys(NetworkSettings.Networks); - if (networkNames.length < 1) { - throw new Error(`${fnTag} container not on any networks`); - } else { - // return IP address of container on the first network that we found it connected to. Make this configurable? - return NetworkSettings.Networks[networkNames[0]].IPAddress; - } - } else { - throw new Error(`${fnTag} cannot find container image ${this.imageName}`); - } - } - - private pullContainerImage(containerNameAndTag: string): Promise { - return new Promise((resolve, reject) => { - const docker = new Docker(); - docker.pull( - containerNameAndTag, - (pullError: unknown, stream: NodeJS.ReadableStream) => { - if (pullError) { - reject(pullError); - } else { - docker.modem.followProgress( - stream, - (progressError: unknown, output: unknown[]) => { - if (progressError) { - reject(progressError); - } else { - resolve(output); - } - }, - ); - } - }, - ); - }); - } - - private validateConstructorOptions(): void { - const validationResult = OPTS_SCHEMA.validate({ - imageVersion: this.imageVersion, - imageName: this.imageName, - httpPort: this.httpPort, - }); - - if (validationResult.error) { - throw new Error( - `HttpEchoContainer#ctor ${validationResult.error.annotate()}`, - ); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/i-key-pair.ts b/packages/cactus-test-tooling/src/main/typescript/i-key-pair.ts deleted file mode 100644 index 4a429508f5..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/i-key-pair.ts +++ /dev/null @@ -1,15 +0,0 @@ -export interface IKeyPair { - publicKey: string; - privateKey: string; -} - -export function isIKeyPair( - allegedKeyPair: IKeyPair, -): allegedKeyPair is IKeyPair { - return ( - typeof allegedKeyPair.privateKey === "string" && - typeof allegedKeyPair.publicKey === "string" && - allegedKeyPair.privateKey.length > 0 && - allegedKeyPair.publicKey.length > 0 - ); -} diff --git a/packages/cactus-test-tooling/src/main/typescript/i-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/i-test-ledger.ts deleted file mode 100644 index e89df4f190..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/i-test-ledger.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Container } from "dockerode"; - -export interface ITestLedger { - start(): Promise; - stop(): Promise; - destroy(): Promise; -} diff --git a/packages/cactus-test-tooling/src/main/typescript/index.ts b/packages/cactus-test-tooling/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-tooling/src/main/typescript/index.web.ts b/packages/cactus-test-tooling/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-tooling/src/main/typescript/indy/indy-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/indy/indy-test-ledger.ts deleted file mode 100644 index d3e73193cc..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/indy/indy-test-ledger.ts +++ /dev/null @@ -1,368 +0,0 @@ -import { EventEmitter } from "events"; -import Docker, { Container } from "dockerode"; -import { v4 as internalIpV4 } from "internal-ip"; -import type { IndyVdrPoolConfig } from "@aries-framework/indy-vdr"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { Containers } from "../common/containers"; - -export interface IIndyTestLedgerOptions { - readonly containerImageName?: string; - readonly containerImageVersion?: string; - readonly logLevel?: LogLevelDesc; - readonly emitContainerLogs?: boolean; - readonly envVars?: string[]; - // For test development, attach to ledger that is already running, don't spin up new one - readonly useRunningLedger?: boolean; -} - -/** - * Default values used by IndyTestLedger constructor. - */ -export const INDY_TEST_LEDGER_DEFAULT_OPTIONS = Object.freeze({ - containerImageName: "ghcr.io/outsh/cactus-indy-all-in-one", - containerImageVersion: "0.1", - logLevel: "info" as LogLevelDesc, - emitContainerLogs: false, - envVars: [], - useRunningLedger: false, -}); - -const INDY_ENDORSER_DID_SEED = "000000000000000000000000Steward1"; -const GENESIS_FILE_PATH = "/var/lib/indy/sandbox/pool_transactions_genesis"; -const DEFAULT_DID_INDY_NAMESPACE = "cacti:test"; -const DEFAULT_POOL_ADDRESS = "172.16.0.2"; -const DEFAULT_NODE1_PORT = "9701"; -const DEFAULT_NODE1_CLIENT_PORT = "9702"; -const DEFAULT_NODE2_PORT = "9703"; -const DEFAULT_NODE2_CLIENT_PORT = "9704"; -const DEFAULT_NODE3_PORT = "9705"; -const DEFAULT_NODE3_CLIENT_PORT = "9706"; -const DEFAULT_NODE4_PORT = "9707"; -const DEFAULT_NODE4_CLIENT_PORT = "9708"; - -export class IndyTestLedger { - private readonly log: Logger; - private readonly logLevel: LogLevelDesc; - private readonly containerImageName: string; - private readonly containerImageVersion: string; - private readonly envVars: string[]; - private readonly emitContainerLogs: boolean; - public readonly useRunningLedger: boolean; - private _container: Container | undefined; - - public get fullContainerImageName(): string { - return [this.containerImageName, this.containerImageVersion].join(":"); - } - - public get className(): string { - return "IndyTestLedger"; - } - - public get container(): Container { - if (this._container) { - return this._container; - } else { - throw new Error(`Invalid state: _container is not set. Called start()?`); - } - } - - constructor(public readonly options: IIndyTestLedgerOptions) { - Checks.truthy(options, `${this.className} arg options`); - - this.logLevel = - this.options.logLevel || INDY_TEST_LEDGER_DEFAULT_OPTIONS.logLevel; - this.log = LoggerProvider.getOrCreate({ - level: this.logLevel, - label: this.className, - }); - - this.emitContainerLogs = - options?.emitContainerLogs ?? - INDY_TEST_LEDGER_DEFAULT_OPTIONS.emitContainerLogs; - this.useRunningLedger = - options?.useRunningLedger ?? - INDY_TEST_LEDGER_DEFAULT_OPTIONS.useRunningLedger; - this.containerImageName = - this.options.containerImageName || - INDY_TEST_LEDGER_DEFAULT_OPTIONS.containerImageName; - this.containerImageVersion = - this.options.containerImageVersion || - INDY_TEST_LEDGER_DEFAULT_OPTIONS.containerImageVersion; - this.envVars = - this.options.envVars || INDY_TEST_LEDGER_DEFAULT_OPTIONS.envVars; - - this.log.info( - `Created ${this.className} OK. Image FQN: ${this.fullContainerImageName}`, - ); - } - - /** - * Get container status. - * - * @returns status string - */ - public async getContainerStatus(): Promise { - if (!this.container) { - throw new Error( - "IndyTestLedger#getContainerStatus(): Container not started yet!", - ); - } - - const { Status } = await Containers.getById(this.container.id); - return Status; - } - - /** - * Start a test Indy ledger. - * - * @param omitPull Don't pull docker image from upstream if true. - * @returns Promise - */ - public async start(omitPull = false): Promise { - if (this.useRunningLedger) { - this.log.info( - "Search for already running Indy Test Ledger because 'useRunningLedger' flag is enabled.", - ); - this.log.info( - "Search criteria - image name: ", - this.fullContainerImageName, - ", state: running", - ); - const containerInfo = await Containers.getByPredicate( - (ci) => - ci.Image === this.fullContainerImageName && ci.State === "running", - ); - const docker = new Docker(); - this._container = docker.getContainer(containerInfo.Id); - return this._container; - } - - if (this._container) { - this.log.warn("Container was already running - restarting it..."); - await this.container.stop(); - await this.container.remove(); - this._container = undefined; - } - - if (!omitPull) { - await Containers.pullImage( - this.fullContainerImageName, - {}, - this.logLevel, - ); - } - - return new Promise((resolve, reject) => { - const docker = new Docker(); - const eventEmitter: EventEmitter = docker.run( - this.fullContainerImageName, - [], - [], - { - ExposedPorts: { - [`${DEFAULT_NODE1_PORT}/tcp`]: {}, - [`${DEFAULT_NODE1_CLIENT_PORT}/tcp`]: {}, - [`${DEFAULT_NODE2_PORT}/tcp`]: {}, - [`${DEFAULT_NODE2_CLIENT_PORT}/tcp`]: {}, - [`${DEFAULT_NODE3_PORT}/tcp`]: {}, - [`${DEFAULT_NODE3_CLIENT_PORT}/tcp`]: {}, - [`${DEFAULT_NODE4_PORT}/tcp`]: {}, - [`${DEFAULT_NODE4_CLIENT_PORT}/tcp`]: {}, - }, - Env: this.envVars, - HostConfig: { - PublishAllPorts: true, - }, - }, - {}, - (err?: Error) => { - if (err) { - this.log.error( - `Failed to start ${this.fullContainerImageName} container; `, - err, - ); - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this._container = container; - - if (this.emitContainerLogs) { - const fnTag = `[${this.fullContainerImageName}]`; - await Containers.streamLogs({ - container: this.container, - tag: fnTag, - log: this.log, - }); - } - - try { - await Containers.waitForHealthCheck(this.container.id); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - /** - * Stop a test Indy ledger. - * - * @returns Stop operation results. - */ - public async stop(): Promise { - if (this.useRunningLedger) { - this.log.info("Ignore stop request because useRunningLedger is enabled."); - return; - } else if (this.container) { - return Containers.stop(this.container); - } else { - throw new Error( - `IndyTestLedger#stop() Container was never created, nothing to stop.`, - ); - } - } - - /** - * Destroy a test Indy ledger. - * - * @returns Destroy operation results. - */ - public async destroy(): Promise { - if (this.useRunningLedger) { - this.log.info( - "Ignore destroy request because useRunningLedger is enabled.", - ); - return; - } else if (this.container) { - return this.container.remove(); - } else { - throw new Error( - `IndyTestLedger#destroy() Container was never created, nothing to destroy.`, - ); - } - } - - /** - * Get localhost mapping of specified container port. - * - * @param port port in container - * @returns localhost port - */ - private async getHostPort(port: string): Promise { - const fnTag = `${this.className}#getHostPort()`; - if (this.container) { - const cInfo = await Containers.getById(this.container.id); - return Containers.getPublicPort(parseInt(port, 10), cInfo); - } else { - throw new Error(`${fnTag} Container not set. Did you call start()?`); - } - } - - /** - * Read ledger `pool_transactions_genesis` file from container storage. - * Patch the node IP and ports to match the ones exported to the localhost matchine. - * - * @returns pool_transactions_genesis contents - */ - public async readPoolTransactionsGenesis(): Promise { - if (!this.container) { - throw new Error( - "IndyTestLedger#readPoolTransactionsGenesis(): Container not started yet!", - ); - } - - // Read pool_transactions_genesis file - this.log.debug("Get client config from path:", GENESIS_FILE_PATH); - let genesisFile = await Containers.pullFile( - this.container, - GENESIS_FILE_PATH, - "ascii", - ); - // this.log.debug("Raw pool_transactions_genesis file:", genesisFile); - - // Patch pool address - const localhostIp = (await internalIpV4()) || "121.0.0.1"; - this.log.debug("localhost address found:", localhostIp); - genesisFile = genesisFile.replace( - new RegExp(DEFAULT_POOL_ADDRESS, "g"), - localhostIp, - ); - - // Patch ports - genesisFile = genesisFile - .replace( - DEFAULT_NODE1_PORT, - (await this.getHostPort(DEFAULT_NODE1_PORT)).toString(), - ) - .replace( - DEFAULT_NODE1_CLIENT_PORT, - (await this.getHostPort(DEFAULT_NODE1_CLIENT_PORT)).toString(), - ) - .replace( - DEFAULT_NODE2_PORT, - (await this.getHostPort(DEFAULT_NODE2_PORT)).toString(), - ) - .replace( - DEFAULT_NODE2_CLIENT_PORT, - (await this.getHostPort(DEFAULT_NODE2_CLIENT_PORT)).toString(), - ) - .replace( - DEFAULT_NODE3_PORT, - (await this.getHostPort(DEFAULT_NODE3_PORT)).toString(), - ) - .replace( - DEFAULT_NODE3_CLIENT_PORT, - (await this.getHostPort(DEFAULT_NODE3_CLIENT_PORT)).toString(), - ) - .replace( - DEFAULT_NODE4_PORT, - (await this.getHostPort(DEFAULT_NODE4_PORT)).toString(), - ) - .replace( - DEFAULT_NODE4_CLIENT_PORT, - (await this.getHostPort(DEFAULT_NODE4_CLIENT_PORT)).toString(), - ); - this.log.debug("Patched pool_transactions_genesis file:", genesisFile); - - return genesisFile; - } - - /** - * Get indy VDR pool configuration object. - * - * @param indyNamespace namespace to use (default: `cacti:test`) - * @returns `IndyVdrPoolConfig` - */ - public async getIndyVdrPoolConfig( - indyNamespace = DEFAULT_DID_INDY_NAMESPACE, - ): Promise { - const genesisTransactions = await this.readPoolTransactionsGenesis(); - return { - isProduction: false, - genesisTransactions, - indyNamespace, - connectOnStartup: true, - }; - } - - /** - * Get secret seed of already registered endorser did on indy ledger. - * Can be imported into ledger and used to authenticate write operations on Indy VDR. - * - * @returns DID Seed - */ - public getEndorserDidSeed(): string { - return INDY_ENDORSER_DID_SEED; - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts deleted file mode 100644 index de74d16735..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts +++ /dev/null @@ -1,389 +0,0 @@ -/** - * Helper utils for setting up and starting Iroha V2 ledger for testing. - */ - -import { EventEmitter } from "events"; -import Docker, { - Container, - ContainerCreateOptions, - ContainerInfo, -} from "dockerode"; -import { - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { ITestLedger } from "../i-test-ledger"; -import { Containers } from "../common/containers"; - -/** - * Input options to Iroha2TestLedger constructor. - */ -export interface IIroha2TestLedgerOptions { - readonly containerImageName?: string; - readonly containerImageVersion?: string; - readonly logLevel?: LogLevelDesc; - readonly emitContainerLogs?: boolean; - readonly envVars?: string[]; - // For test development, attach to ledger that is already running, don't spin up new one - readonly useRunningLedger?: boolean; -} - -/** - * Default values used by Iroha2TestLedger constructor. - */ -export const IROHA2_TEST_LEDGER_DEFAULT_OPTIONS = Object.freeze({ - containerImageName: "ghcr.io/hyperledger/cactus-iroha2-all-in-one", - containerImageVersion: "2023-07-29-f2bc772ee", - logLevel: "info" as LogLevelDesc, - emitContainerLogs: true, - envVars: [], - useRunningLedger: false, -}); - -/** - * Iroha V2 configuration used by `iroha_client_cli` tool. - * Contains all the necessary data needed to connect to the Iroha ledger. - */ -export type Iroha2ClientConfig = { - PUBLIC_KEY: string; - PRIVATE_KEY: { - digest_function: string; - payload: string; - }; - ACCOUNT_ID: string; - BASIC_AUTH: { - web_login: string; - password: string; - }; - TORII_API_URL: string; - TORII_TELEMETRY_URL: string; - TRANSACTION_TIME_TO_LIVE_MS: number; - TRANSACTION_STATUS_TIMEOUT_MS: number; - TRANSACTION_LIMITS: { - max_instruction_number: number; - max_wasm_size_bytes: number; - }; - ADD_TRANSACTION_NONCE: boolean; -}; - -/** - * Class for running a test Iroha V2 ledger in a container. - */ -export class Iroha2TestLedger implements ITestLedger { - public readonly containerImageName: string; - public readonly containerImageVersion: string; - public readonly logLevel: LogLevelDesc; - public readonly emitContainerLogs: boolean; - public readonly envVars: string[]; - public readonly useRunningLedger: boolean; - public container: Container | undefined; - - private readonly log: Logger; - - constructor(options?: IIroha2TestLedgerOptions) { - // Parse input options - this.containerImageName = - options?.containerImageName ?? - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.containerImageName; - - this.containerImageVersion = - options?.containerImageVersion ?? - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.containerImageVersion; - - this.logLevel = - options?.logLevel ?? IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.logLevel; - - this.emitContainerLogs = - options?.emitContainerLogs ?? - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.emitContainerLogs; - - this.envVars = - options?.envVars ?? IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.envVars; - - this.useRunningLedger = - options?.useRunningLedger ?? - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.useRunningLedger; - - // Instantiate logger - this.log = LoggerProvider.getOrCreate({ - level: this.logLevel, - label: "iroha2-test-ledger", - }); - } - - /** - * Full container name with a version tag - */ - public get fullContainerImageName(): string { - return [this.containerImageName, this.containerImageVersion].join(":"); - } - - /** - * Start a test Iroha V2 ledger. - * - * @param omitPull Don't pull docker image from upstream if true. - * @returns Promise - */ - public async start(omitPull = false): Promise { - if (this.useRunningLedger) { - this.log.info( - "Search for already running Iroha V2 Test Ledger because 'useRunningLedger' flag is enabled.", - ); - this.log.info( - "Search criteria - image name: ", - this.fullContainerImageName, - ", state: running", - ); - const containerInfo = await Containers.getByPredicate( - (ci) => - ci.Image === this.fullContainerImageName && ci.State === "healthy", - ); - const docker = new Docker(); - this.container = docker.getContainer(containerInfo.Id); - return this.container; - } - - if (this.container) { - this.log.warn("Container was already running - restarting it..."); - await this.container.stop(); - await this.container.remove(); - this.container = undefined; - } - - if (!omitPull) { - await Containers.pullImage( - this.fullContainerImageName, - {}, - this.logLevel, - ); - } - - const createOptions: ContainerCreateOptions = { - ExposedPorts: { - "8080/tcp": {}, // Peer0 API - "8180/tcp": {}, // Peer0 Telemetry - }, - - Env: this.envVars, - - HostConfig: { - PublishAllPorts: true, - Privileged: true, - }, - }; - - return new Promise((resolve, reject) => { - const docker = new Docker(); - const eventEmitter: EventEmitter = docker.run( - this.fullContainerImageName, - [], - [], - createOptions, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.container = container; - - if (this.emitContainerLogs) { - const fnTag = `[${this.fullContainerImageName}]`; - await Containers.streamLogs({ - container: this.container, - tag: fnTag, - log: this.log, - }); - } - - try { - await Containers.waitForHealthCheck(container.id); - resolve(container); - } catch (ex) { - this.log.error(ex); - reject(ex); - } - }); - }); - } - - /** - * Get container status. - * - * @returns status string - */ - public async getContainerStatus(): Promise { - if (!this.container) { - throw new Error( - "Iroha2TestLedger#getContainerStatus(): Container not started yet!", - ); - } - - const { Status } = await Containers.getById(this.container.id); - return Status; - } - - /** - * Stop a test Iroha V2 ledger. - * - * @returns Stop operation results. - */ - public async stop(): Promise { - if (this.useRunningLedger) { - this.log.info("Ignore stop request because useRunningLedger is enabled."); - return; - } else if (this.container) { - return Containers.stop(this.container); - } else { - throw new Error( - `Iroha2TestLedger#stop() Container was never created, nothing to stop.`, - ); - } - } - - /** - * Destroy a test Iroha V2 ledger. - * - * @returns Destroy operation results. - */ - public async destroy(): Promise { - if (this.useRunningLedger) { - this.log.info( - "Ignore destroy request because useRunningLedger is enabled.", - ); - return; - } else if (this.container) { - return this.container.remove(); - } else { - throw new Error( - `Iroha2TestLedger#destroy() Container was never created, nothing to destroy.`, - ); - } - } - - /** - * Get this container info (output from dockerode listContainers method). - * - * @returns ContainerInfo - */ - protected async getContainerInfo(): Promise { - if (!this.container) { - throw new Error( - "Iroha2TestLedger#getContainerInfo(): Container not started yet!", - ); - } - - const containerInfos = await new Docker().listContainers({}); - const containerId = this.container.id; - const thisContainerInfo = containerInfos.find( - (ci) => ci.Id === containerId, - ); - - if (thisContainerInfo) { - return thisContainerInfo; - } else { - throw new Error( - "Iroha2TestLedger#getContainerInfo() could not find container info.", - ); - } - } - - /** - * Change the port in URL from original to the one that was exported by docker - * (i.e. the one that is available in `127.0.0.1` running this container, not inside the container). - * - * @param url some URL ending with a port (e.g. `http://127.0.0.1:8080`) - * @param containerInfo dockerode container info. - * @returns patched URL string. - */ - protected async patchDockerPortInURL( - url: string, - containerInfo: ContainerInfo, - ): Promise { - this.log.debug("URL before adjustment:", url); - - const origPort = url.substring(url.lastIndexOf(":") + 1); - const localhostPort = await Containers.getPublicPort( - parseInt(origPort, 10), - containerInfo, - ); - - const newUrl = url.replace(origPort, localhostPort.toString()); - this.log.debug("URL after adjustment:", newUrl); - - return newUrl; - } - - /** - * Read client config file from the container. Adjust the ports in URL so that the endpoints - * can be used from 127.0.0.1. - * - * @returns parsed `Iroha2ClientConfig` - */ - public async getClientConfig(): Promise { - if (!this.container) { - throw new Error( - "Iroha2TestLedger#getClientConfig(): Container not started yet!", - ); - } - - // Get App root - const envVars = await Containers.getEnvVars(this.container); - const appRootDir = envVars.get("APP_ROOT") ?? "/app"; - - // Read config file - const configPath = `${appRootDir}/configs/client_cli/config.json`; - this.log.debug("Get client config from path:", configPath); - const configFile = await Containers.pullFile( - this.container, - configPath, - "ascii", - ); - this.log.debug("Raw config file:", configFile); - - // Parse file - const configObj = JSON.parse(configFile) as Iroha2ClientConfig; - - // Patch ports - const containerInfo = await this.getContainerInfo(); - configObj.TORII_API_URL = await this.patchDockerPortInURL( - configObj.TORII_API_URL, - containerInfo, - ); - configObj.TORII_TELEMETRY_URL = await this.patchDockerPortInURL( - configObj.TORII_TELEMETRY_URL, - containerInfo, - ); - - return configObj; - } - - /** - * Execute `iroha_client_cli` on the ledger. - * - * @param cmd Array of `iroha_client_cli` arguments. - * @param timeout Command timeout. - * @returns Output of the command. - * @note The output will contain some additional output (like fetching the cli image), not only the command response. - */ - public async runIrohaClientCli( - cmd: string[], - timeout = 60 * 1000, - ): Promise { - if (!this.container) { - throw new Error( - "Iroha2TestLedger#runIrohaClientCli(): Container not started yet!", - ); - } - - // Pass the command to shell helper script in the container - cmd.unshift("iroha_client_cli"); - - this.log.debug("Run shell command:", cmd); - return Containers.exec(this.container, cmd, timeout, this.logLevel); - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts b/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts deleted file mode 100644 index 30aa9f1c05..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts +++ /dev/null @@ -1,355 +0,0 @@ -import { EventEmitter } from "events"; -import Docker, { Container } from "dockerode"; -import { v4 as internalIpV4 } from "internal-ip"; -import { v4 as uuidv4 } from "uuid"; -import KcAdminClient from "keycloak-admin"; -import UserRepresentation from "keycloak-admin/lib/defs/userRepresentation"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { Containers } from "../common/containers"; -import RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation"; - -export interface IKeycloakContainerOptions { - envVars?: string[]; - imageVersion?: string; - imageName?: string; - adminUsername?: string; - adminPassword?: string; - logLevel?: LogLevelDesc; -} - -export const K_DEFAULT_KEYCLOAK_IMAGE_NAME = "jboss/keycloak"; -export const K_DEFAULT_KEYCLOAK_IMAGE_VERSION = "11.0.3"; -export const K_DEFAULT_KEYCLOAK_HTTP_PORT = 8080; - -/** - * Class responsible for programmatically managing a container that is running - * the image made for hosting a keycloak instance which can be used to test - * authorization/authentication related use-cases. - */ -export class KeycloakContainer { - public static readonly CLASS_NAME = "KeycloakContainer"; - private readonly log: Logger; - private readonly imageName: string; - private readonly imageVersion: string; - private readonly _adminUsername: string; - private readonly _adminPassword: string; - private readonly envVars: string[]; - private _container: Container | undefined; - private _containerId: string | undefined; - - public get imageFqn(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - public get className(): string { - return KeycloakContainer.CLASS_NAME; - } - - public get container(): Container { - if (this._container) { - return this._container; - } else { - throw new Error(`Invalid state: _container is not set. Called start()?`); - } - } - - constructor(public readonly options: IKeycloakContainerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.imageName = this.options.imageName || K_DEFAULT_KEYCLOAK_IMAGE_NAME; - this.imageVersion = - this.options.imageVersion || K_DEFAULT_KEYCLOAK_IMAGE_VERSION; - this.envVars = this.options.envVars || []; - - this._adminPassword = options.adminPassword || uuidv4(); - this._adminUsername = options.adminUsername || "admin"; - - this.log.info(`Created ${this.className} OK. Image FQN: ${this.imageFqn}`); - } - - public async start(): Promise { - if (this._container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - await Containers.pullImage(this.imageFqn, {}, this.options.logLevel); - - const Env = [ - ...[ - `KEYCLOAK_USER=${this._adminUsername}`, - `KEYCLOAK_PASSWORD=${this._adminPassword}`, - `PROXY_ADDRESS_FORWARDING=true`, - `DEBUG=true`, - `DEBUG_PORT='*:8787'`, - ], - ...this.envVars, - ]; - this.log.debug(`Effective Env of container: %o`, Env); - - const Healthcheck = { - Test: ["CMD-SHELL", `curl -v 'http://127.0.0.1:9990/'`], - Interval: 1000000000, // 1 second - Timeout: 3000000000, // 3 seconds - Retries: 99, - StartPeriod: 1000000000, // 1 second - }; - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - this.imageFqn, - [], - [], - { - Env, - PublishAllPorts: true, - Healthcheck, - }, - {}, - (err?: Error) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this._container = container; - this._containerId = container.id; - try { - await Containers.waitForHealthCheck(this._containerId); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - // { - // authorizationURL: "https://www.example.com/oauth2/authorize", - // tokenURL: "https://www.example.com/oauth2/token", - // clientID: "EXAMPLE_CLIENT_ID", - // clientSecret: "EXAMPLE_CLIENT_SECRET", - // callbackURL: "http://127.0.0.1:3000/auth/example/callback", - // } - public async getOauth2Options(clientId = "account"): Promise { - const fnTag = `${this.className}#getOauth2Options()`; - const { log } = this; - const defaultRealm = await this.getDefaultRealm(); - const apiBaseUrl = await this.getApiBaseUrl(); - const kcAdminClient = await this.createAdminClient(); - const realm = defaultRealm.realm; - const realmBaseUrl = `${apiBaseUrl}/realms/${realm}`; - - const clients = await kcAdminClient.clients.find({}); - - const aClient = clients.find((c) => c.clientId === clientId); - if (!aClient) { - throw new Error(`${fnTag} could not find client with ID ${clientId}`); - } - - const secret = await kcAdminClient.clients.getClientSecret({ - id: aClient.id as string, - }); - - const oauth2Options = { - // http://:/auth/realms//protocol/openid-connect/token - authorizationURL: `${realmBaseUrl}/protocol/openid-connect/auth`, - tokenURL: `${realmBaseUrl}/protocol/openid-connect/token`, - clientID: clientId, - clientSecret: secret.value, - }; - log.debug(`OAuth2_Options for passport strategy: %o`, oauth2Options); - return oauth2Options; - } - - public async getOidcOptions(clientId = "account"): Promise { - const fnTag = `${this.className}#getOidcOptions()`; - const { log } = this; - const defaultRealm = await this.getDefaultRealm(); - const apiBaseUrl = await this.getApiBaseUrl(); - const kcAdminClient = await this.createAdminClient(); - const realm = defaultRealm.realm; - const realmBaseUrl = `${apiBaseUrl}/realms/${realm}`; - - const clients = await kcAdminClient.clients.find({}); - - const aClient = clients.find((c) => c.clientId === clientId); - if (!aClient) { - throw new Error(`${fnTag} could not find client with ID ${clientId}`); - } - - const secret = await kcAdminClient.clients.getClientSecret({ - id: aClient.id as string, - }); - - const oidcOptions = { - // http://:/auth/realms//protocol/openid-connect/token - authorizationURL: `${realmBaseUrl}/protocol/openid-connect/auth`, - tokenURL: `${realmBaseUrl}/protocol/openid-connect/token`, - userProfileURL: `${realmBaseUrl}/protocol/openid-connect/userinfo`, - clientID: clientId, - clientSecret: secret.value, - callbackURL: `${realmBaseUrl}/account?referrer=${clientId}`, - }; - log.debug(`OIDC_Options for passport strategy: %o`, oidcOptions); - return oidcOptions; - } - - // FIXME - this does not work yet - public async getSaml2Options( - clientId: string, - callbackUrl: string, - ): Promise { - const fnTag = `${this.className}#getSaml2Options()`; - Checks.truthy(clientId, `${fnTag}:clientId`); - const { log } = this; - const defaultRealm = await this.getDefaultRealm(); - const apiBaseUrl = await this.getApiBaseUrl("127.0.0.1"); - const realm = defaultRealm.realm; - const realmBaseUrl = `${apiBaseUrl}/realms/${realm}`; - - const kcAdminClient = await this.createAdminClient(); - const clients = await kcAdminClient.clients.find({}); - const client = clients.find((c) => c.clientId === clientId); - log.debug("SAML2 client: %o", JSON.stringify(client, null, 4)); - - // http://127.0.0.1:32819/auth/realms/master/protocol/saml - const saml2Opts = { - entryPoint: `${realmBaseUrl}/protocol/saml`, - // issuer: 'https://your-app.example.net/login/callback', - callbackUrl, - issuer: client?.clientId, - }; - log.debug(`SAML2_Options for passport strategy: %o`, saml2Opts); - return saml2Opts; - } - - public async getApiBaseUrl(host?: string): Promise { - const port = await this.getHostPortHttp(); - const lanIpV4OrUndefined = await internalIpV4(); - const lanAddress = host || lanIpV4OrUndefined || "127.0.0.1"; // best effort... - return `http://${lanAddress}:${port}/auth`; - } - - public async getDefaultRealm(): Promise { - const kcAdminClient = await this.createAdminClient(); - const [firstRealm] = await kcAdminClient.realms.find({}); - return firstRealm; - } - - public async createAdminClient(): Promise { - const baseUrl = await this.getApiBaseUrl(); - const kcAdminClient = new KcAdminClient({ - baseUrl, - realmName: "master", - requestConfig: { - /* Axios request config options https://github.com/axios/axios#request-config */ - }, - }); - - this.log.debug(`Authenticating against the Keycloak admin API...`); - // Authorize with username / password - await kcAdminClient.auth({ - username: this._adminUsername, - password: this._adminPassword, - grantType: "password", - clientId: "admin-cli", - }); - this.log.debug(`Keycloak admin API auth OK`); - return kcAdminClient; - } - - public async ensureRealmExists( - realmRepresentation: RealmRepresentation, - ): Promise { - const fnTag = `${this.className}#ensureRealmExists()`; - Checks.truthy(realmRepresentation, `${fnTag}:realmRepresentation`); - Checks.nonBlankString( - realmRepresentation.realm, - `${fnTag}:realmRepresentation.realm`, - ); - const realmName = realmRepresentation.realm; - - const kcAdminClient = await this.createAdminClient(); - - this.log.debug(`Looking for realm with name ${realmName} ...`); - const realms = await kcAdminClient.realms.find({}); - this.log.debug(`Fetched a list of realms ${realms.length} long...`); - const aRealm = realms.find((r) => r.realm === realmName); - if (aRealm) { - this.log.debug(`Returning pre-existing realm, skip create: %o`, aRealm); - return aRealm; - } - - this.log.debug(`Creating ${realmName} realm... %o`, realmRepresentation); - const newRealm = await kcAdminClient.realms.create(realmRepresentation); - this.log.debug(`Created new realm: %o`, newRealm); - return newRealm; - } - - public async createTestUser( - payload?: UserRepresentation & { realm?: string }, - ): Promise<{ id: string }> { - const kcAdminClient = await this.createAdminClient(); - - // List all users - const users = await kcAdminClient.users.find(); - this.log.debug(`Users: %o`, users); - - // Override client configuration for all further requests: - // kcAdminClient.setConfig({ - // realmName: "another-realm", - // }); - - // This operation will now be performed in 'another-realm' if the user has access. - const groups = await kcAdminClient.groups.find(); - this.log.debug(`Groups: %o`, groups); - - // Set a `realm` property to override the realm for only a single operation. - // For example, creating a user in another realm: - const theUser = await kcAdminClient.users.create(payload); - this.log.debug(`Created new user: %o`, theUser); - return theUser; - } - - public async stop(): Promise { - if (this._container) { - await Containers.stop(this.container); - } - } - - public destroy(): Promise { - const fnTag = `${this.className}#destroy()`; - if (this._container) { - return this._container.remove(); - } else { - const ex = new Error(`${fnTag} Container not found, nothing to destroy.`); - return Promise.reject(ex); - } - } - - public async getHostPortHttp(): Promise { - const fnTag = `${this.className}#getHostPortHttp()`; - if (this._containerId) { - const cInfo = await Containers.getById(this._containerId); - return Containers.getPublicPort(K_DEFAULT_KEYCLOAK_HTTP_PORT, cInfo); - } else { - throw new Error(`${fnTag} Container ID not set. Did you call start()?`); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts b/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts deleted file mode 100644 index 628b9ffa2a..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { EventEmitter } from "events"; - -import Docker, { Container } from "dockerode"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { Containers } from "../common/containers"; - -export interface ILocalStackContainerOptions { - imageVersion?: string; - imageName?: string; - logLevel?: LogLevelDesc; -} - -export const K_DEFAULT_LOCALSTACK_IMAGE_NAME = "localstack/localstack"; -export const K_DEFAULT_LOCALSTACK_IMAGE_VERSION = "0.12.10"; -export const K_DEFAULT_LOCALSTACK_HTTP_PORT = 4566; - -/** - * > **Do not use this image in production.** - * - * Class responsible for programmatically managing a container that is running - * the official LocalStack image in development mode. - */ -export class LocalStackContainer { - public static readonly CLASS_NAME = "LocalStackContainer"; - - private readonly log: Logger; - private readonly imageName: string; - private readonly imageVersion: string; - - private _container: Container | undefined; - private _containerId: string | undefined; - - public get containerId(): string { - Checks.nonBlankString(this._containerId, `${this.className}:_containerId`); - return this._containerId as string; - } - - public get container(): Container { - Checks.nonBlankString(this._container, `${this.className}:_container`); - return this._container as Container; - } - - public get className(): string { - return LocalStackContainer.CLASS_NAME; - } - - public get imageFqn(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - constructor(public readonly options: ILocalStackContainerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.imageName = this.options.imageName || K_DEFAULT_LOCALSTACK_IMAGE_NAME; - this.imageVersion = - this.options.imageVersion || K_DEFAULT_LOCALSTACK_IMAGE_VERSION; - - this.log.info(`Created ${this.className} OK. Image FQN: ${this.imageFqn}`); - } - - public async start(): Promise { - if (this._container) { - await this._container.stop(); - await this._container.remove(); - } - const docker = new Docker(); - - await Containers.pullImage(this.imageFqn, {}, this.options.logLevel); - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - this.imageFqn, - [], - [], - { - ExposedPorts: { - [`${K_DEFAULT_LOCALSTACK_HTTP_PORT}/tcp`]: {}, - }, - // This is a workaround needed for macOS which has issues with routing - // to docker container's IP addresses directly... - // https://stackoverflow.com/a/39217691 - PublishAllPorts: true, - HostConfig: { - // NetworkMode: "host", - // CapAdd: ["IPC_LOCK"], - PublishAllPorts: true, - }, - Healthcheck: { - Test: [ - "CMD-SHELL", - 'curl -s 127.0.0.1:4566/health | grep \'"secretsmanager": "running"\'', - ], - Interval: 100 * 1000000, - }, - }, - {}, - (err: Error) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this._container = container; - this._containerId = container.id; - try { - await Containers.waitForHealthCheck(this._containerId); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async stop(): Promise { - await Containers.stop(this._container as Docker.Container); - } - - public destroy(): Promise { - const fnTag = `${this.className}#destroy()`; - if (this._container) { - return this._container.remove(); - } else { - const ex = new Error(`${fnTag} Container not found, nothing to destroy.`); - return Promise.reject(ex); - } - } - - public async getHostPortHttp(): Promise { - const fnTag = `${this.className}#getHostPortHttp()`; - if (this._containerId) { - const cInfo = await Containers.getById(this._containerId); - return Containers.getPublicPort(K_DEFAULT_LOCALSTACK_HTTP_PORT, cInfo); - } else { - throw new Error(`${fnTag} Container ID not set. Did you call start()?`); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts deleted file mode 100644 index fe0b86e46a..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts +++ /dev/null @@ -1,374 +0,0 @@ -import { EventEmitter } from "events"; -import Docker, { Container } from "dockerode"; -import { v4 as internalIpV4 } from "internal-ip"; -import Web3 from "web3"; -import { AbiItem } from "web3-utils"; -import { Account, TransactionReceipt } from "web3-core"; -import { v4 as uuidv4 } from "uuid"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - Bools, -} from "@hyperledger/cactus-common"; - -import { Containers } from "../common/containers"; -import { RuntimeError } from "run-time-error-cjs"; - -export interface IOpenEthereumTestLedgerOptions { - envVars?: string[]; - imageVersion?: string; - imageName?: string; - chainId?: string; - logLevel?: LogLevelDesc; - emitContainerLogs?: boolean; - chain?: string; - httpPort?: number; - wsPort?: number; -} - -export const K_DEFAULT_OPEN_ETHEREUM_IMAGE_NAME = "openethereum/openethereum"; -export const K_DEFAULT_OPEN_ETHEREUM_IMAGE_VERSION = "v3.2.4"; -export const K_DEFAULT_OPEN_ETHEREUM_HTTP_PORT = 8545; -export const K_DEFAULT_OPEN_ETHEREUM_WS_PORT = 8546; -// @see https://openethereum.github.io/Chain-specification -// @see https://github.com/openethereum/openethereum/tree/main/crates/ethcore/res/chainspec -export const K_DEFAULT_OPEN_ETHEREUM_CHAIN = "dev"; - -// @see https://openethereum.github.io/Private-development-chain -export const K_DEV_WHALE_ACCOUNT_PRIVATE_KEY = - "4d5db4107d237df6a3d58ee5f70ae63d73d7658d4026f2eefd2f204c81682cb7"; -export const K_DEV_WHALE_ACCOUNT_PUBLIC_KEY = - "00a329c0648769a73afac7f9381e08fb43dbea72"; - -/** - * Class responsible for programmatically managing a container that is running - * the image made for hosting a keycloak instance which can be used to test - * authorization/authentication related use-cases. - */ -export class OpenEthereumTestLedger { - public static readonly CLASS_NAME = "OpenEthereumTestLedger"; - private readonly log: Logger; - private readonly imageName: string; - private readonly imageVersion: string; - private readonly envVars: string[]; - private readonly emitContainerLogs: boolean; - private readonly chain: string; - private readonly httpPort: number; - private readonly wsPort: number; - private _container: Container | undefined; - private _containerId: string | undefined; - private _web3: Web3 | undefined; - - public get imageFqn(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - public get className(): string { - return OpenEthereumTestLedger.CLASS_NAME; - } - - public get container(): Container { - if (this._container) { - return this._container; - } else { - throw new Error(`Invalid state: _container is not set. Called start()?`); - } - } - - private get web3(): Web3 { - if (this._web3) { - return this._web3; - } else { - throw new Error( - "Invalid state: web3 client is missing, start the ledger container first.", - ); - } - } - - constructor(public readonly options: IOpenEthereumTestLedgerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.emitContainerLogs = Bools.isBooleanStrict(options.emitContainerLogs) - ? (options.emitContainerLogs as boolean) - : true; - - this.chain = this.options.chain || K_DEFAULT_OPEN_ETHEREUM_CHAIN; - this.httpPort = this.options.httpPort || K_DEFAULT_OPEN_ETHEREUM_HTTP_PORT; - this.wsPort = this.options.wsPort || K_DEFAULT_OPEN_ETHEREUM_WS_PORT; - this.imageName = - this.options.imageName || K_DEFAULT_OPEN_ETHEREUM_IMAGE_NAME; - this.imageVersion = - this.options.imageVersion || K_DEFAULT_OPEN_ETHEREUM_IMAGE_VERSION; - this.envVars = this.options.envVars || []; - - this.log.info(`Created ${this.className} OK. Image FQN: ${this.imageFqn}`); - } - - public async start(): Promise { - if (this._container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - await Containers.pullImage(this.imageFqn, {}, this.options.logLevel); - - const Env = [...[], ...this.envVars]; - this.log.debug(`Effective Env of container: %o`, Env); - - const apiUrl = await this.getRpcApiHttpHost("127.0.0.1", this.httpPort); - const Healthcheck = { - Test: ["CMD-SHELL", `curl -v '${apiUrl}'`], - Interval: 1000000000, // 1 second - Timeout: 3000000000, // 3 seconds - Retries: 99, - StartPeriod: 1000000000, // 1 second - }; - - const cmd = [ - "--chain=" + this.chain, - "--no-persistent-txqueue", // Don't save pending local transactions to disk to be restored whenever the node restarts. - "--jsonrpc-port=" + this.httpPort, - "--jsonrpc-cors=all", - "--jsonrpc-interface=all", - "--jsonrpc-hosts=all", - "--jsonrpc-apis=web3,eth,personal,net,parity", - "--ws-port=" + this.wsPort, - "--ws-interface=all", - "--ws-apis=web3,eth,net,parity,pubsub", - "--ws-origins=all", - "--ws-hosts=all", - "--ws-max-connections=10", - "--max-peers=100", - ]; - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - this.imageFqn, - [...cmd], - [], - { - Env, - Healthcheck, - ExposedPorts: { - [`${this.httpPort}/tcp`]: {}, - [`${this.wsPort}/tcp`]: {}, - }, - HostConfig: { - PublishAllPorts: true, - }, - }, - {}, - (err?: Error) => { - if (err) { - this.log.error(`Failed to start ${this.imageFqn} container; `, err); - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this._container = container; - this._containerId = container.id; - - if (this.emitContainerLogs) { - const fnTag = `[${this.imageFqn}]`; - await Containers.streamLogs({ - container: this.container, - tag: fnTag, - log: this.log, - }); - } - - try { - await Containers.waitForHealthCheck(this._containerId); - this._web3 = new Web3(await this.getRpcApiHttpHost()); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - /** - * Creates a new ETH account from scratch on the ledger and then sends it a - * little seed money to get things started. - * - * Uses `web3.eth.accounts.create` - * - * @param [seedMoney=10e8] The amount of money to seed the new test account with. - */ - public async createEthTestAccount(seedMoney = 10e8): Promise { - const ethTestAccount = this.web3.eth.accounts.create(uuidv4()); - - const receipt = await this.transferAssetFromCoinbase( - ethTestAccount.address, - seedMoney, - ); - - if (receipt instanceof Error) { - throw new RuntimeError("Error in createEthTestAccount", receipt); - } else { - return ethTestAccount; - } - } - - /** - * Creates a new personal ethereum account with specified initial money and password. - * - * Uses `web3.eth.personal.newAccount` - * - * @param seedMoney Initial money to transfer to this account - * @param password Personal account password - * @returns New account address - */ - public async newEthPersonalAccount( - seedMoney = 10e8, - password: string, - ): Promise { - const account = await this.web3.eth.personal.newAccount(password); - - const receipt = await this.transferAssetFromCoinbase(account, seedMoney); - - if (receipt instanceof Error) { - throw new RuntimeError("Error in newEthPersonalAccount", receipt); - } else { - return account; - } - } - - /** - * Seed `targetAccount` with money from coin base account. - * - * @param targetAccount Ethereum account to send money to. - * @param value Amount of money. - * @returns Transfer `TransactionReceipt` - */ - public async transferAssetFromCoinbase( - targetAccount: string, - value: number, - ): Promise { - const fnTag = `${this.className}#transferAssetFromCoinbase()`; - - const tx = await this.web3.eth.accounts.signTransaction( - { - from: K_DEV_WHALE_ACCOUNT_PUBLIC_KEY, - to: targetAccount, - value: value, - gas: 1000000, - }, - K_DEV_WHALE_ACCOUNT_PRIVATE_KEY, - ); - - if (!tx.rawTransaction) { - throw new Error(`${fnTag} Signing transaction failed, reason unknown.`); - } - - return await this.web3.eth.sendSignedTransaction(tx.rawTransaction); - } - - /** - * Deploy contract from coin base account to the ledger. - * - * @param abi - JSON interface of the contract. - * @param bytecode - Compiled code of the contract. - * @param args - Contract arguments. - * @returns Contract deployment `TransactionReceipt` - */ - public async deployContract( - abi: AbiItem | AbiItem[], - bytecode: string, - args?: any[], - ): Promise { - // Encode ABI - const contractProxy = new this.web3.eth.Contract(abi); - const contractTx = contractProxy.deploy({ - data: bytecode, - arguments: args, - }); - - // Send TX - const signedTx = await this.web3.eth.accounts.signTransaction( - { - from: K_DEV_WHALE_ACCOUNT_PUBLIC_KEY, - data: contractTx.encodeABI(), - gas: 8000000, // Max possible gas - nonce: await this.web3.eth.getTransactionCount( - K_DEV_WHALE_ACCOUNT_PUBLIC_KEY, - ), - }, - K_DEV_WHALE_ACCOUNT_PRIVATE_KEY, - ); - - if (!signedTx.rawTransaction) { - throw new Error(`Signing transaction failed, reason unknown.`); - } - - return await this.web3.eth.sendSignedTransaction(signedTx.rawTransaction); - } - - public async getRpcApiHttpHost( - host?: string, - port?: number, - ): Promise { - const thePort = port || (await this.getHostPortHttp()); - const lanIpV4OrUndefined = await internalIpV4(); - const lanAddress = host || lanIpV4OrUndefined || "127.0.0.1"; // best effort... - return `http://${lanAddress}:${thePort}`; - } - - public async getRpcApiWebSocketHost( - host?: string, - port?: number, - ): Promise { - const thePort = port || (await this.getHostPortWs()); - const lanIpV4OrUndefined = await internalIpV4(); - const lanAddress = host || lanIpV4OrUndefined || "127.0.0.1"; // best effort... - return `ws://${lanAddress}:${thePort}`; - } - - public async stop(): Promise { - if (this._container) { - await Containers.stop(this.container); - this._web3 = undefined; - } - } - - public destroy(): Promise { - const fnTag = `${this.className}#destroy()`; - if (this._container) { - this._web3 = undefined; - return this._container.remove(); - } else { - const ex = new Error(`${fnTag} Container not found, nothing to destroy.`); - return Promise.reject(ex); - } - } - - private async getHostPort(port: number): Promise { - const fnTag = `${this.className}#getHostPort()`; - if (this._containerId) { - const cInfo = await Containers.getById(this._containerId); - return Containers.getPublicPort(port, cInfo); - } else { - throw new Error(`${fnTag} Container ID not set. Did you call start()?`); - } - } - - public async getHostPortHttp(): Promise { - return this.getHostPort(this.httpPort); - } - - public async getHostPortWs(): Promise { - return this.getHostPort(this.wsPort); - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/pki/self-signed-pki-generator.ts b/packages/cactus-test-tooling/src/main/typescript/pki/self-signed-pki-generator.ts deleted file mode 100644 index 1c15284f93..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/pki/self-signed-pki-generator.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { pki, md } from "node-forge"; -import { v4 as uuidV4 } from "uuid"; -import { Strings } from "@hyperledger/cactus-common"; - -export type ForgeKeyPair = pki.rsa.KeyPair; -export type ForgePrivateKey = pki.rsa.PrivateKey; -export type ForgeCertificate = pki.Certificate; -export type ForgeCertificateField = pki.CertificateField; - -/** - * PKI as in public key infrastructure and x509 certificates. - */ -export interface IPki { - keyPair: ForgeKeyPair; - certificate: ForgeCertificate; - certificatePem: string; - privateKeyPem: string; -} - -/** - * Do not use this for anything in a production deployment. It's meant as a helper - * class for development and testing purposes (enhancing developer experience). - * - * Secure by default is one of our core design principles and it's much harder to - * enforce/implement that it sounds when you also do not want to ruin the ease - * of use of the software. Dynamically pre-provisioning PKI is notoriously - * complicated and error prone to the average user/developer. - * - */ -export class SelfSignedPkiGenerator { - public create(commonName: string, parent?: IPki): IPki { - const keyPair: pki.rsa.KeyPair = pki.rsa.generateKeyPair(4096); - const privateKeyPem: string = pki.privateKeyToPem(keyPair.privateKey); - const certificate = pki.createCertificate(); - - this.configureCertificateParameters(keyPair, certificate, commonName); - if (parent) { - certificate.setIssuer(parent.certificate.subject.attributes); - certificate.publicKey = keyPair.publicKey; - // certificate.privateKey = keyPair.privateKey; - certificate.sign(parent.keyPair.privateKey, md.sha512.create()); - - if (!parent.certificate.verify(certificate)) { - throw new Error("Could not verify newly generated certificate"); - } - } else { - certificate.sign(keyPair.privateKey, md.sha512.create()); - } - - const certificatePem = pki.certificateToPem(certificate); - return { keyPair, certificate, certificatePem, privateKeyPem }; - } - - public configureCertificateParameters( - keyPair: pki.rsa.KeyPair, - certificate: pki.Certificate, - commonName: string, - ): pki.Certificate { - // 20 octets max for serial numbers of certs as per the standard - const serialNumber = Strings.replaceAll(uuidV4(), "-", "").substring(0, 19); - certificate.serialNumber = serialNumber; - certificate.publicKey = keyPair.publicKey; - certificate.privateKey = keyPair.privateKey; - certificate.validity.notBefore = new Date(); - certificate.validity.notAfter = new Date(); - - const nextYear = certificate.validity.notBefore.getFullYear() + 1; - certificate.validity.notAfter.setFullYear(nextYear); - - const certificateFields: ForgeCertificateField[] = [ - { - shortName: "CN", - name: "commonName", - value: commonName, - }, - { - name: "countryName", - value: "Universe", - }, - { - shortName: "ST", - value: "Milky Way", - }, - { - shortName: "L", - name: "localityName", - value: "Planet Earth", - }, - { - shortName: "O", - name: "organizationName", - value: "Hyperledger", - }, - { - shortName: "OU", - value: "Cactus", - }, - { - name: "unstructuredName", - value: "Cactus Dummy Self Signed Certificates", - }, - ]; - - certificate.setSubject(certificateFields); - - certificate.setIssuer(certificateFields); - - certificate.setExtensions([ - { - name: "basicConstraints", - cA: true, - }, - { - name: "keyUsage", - keyCertSign: true, - digitalSignature: true, - nonRepudiation: true, - keyEncipherment: true, - dataEncipherment: true, - }, - { - name: "extKeyUsage", - serverAuth: true, - clientAuth: true, - codeSigning: true, - emailProtection: true, - timeStamping: true, - }, - { - name: "nsCertType", - client: true, - server: true, - email: true, - objsign: true, - sslCA: true, - emailCA: true, - objCA: true, - }, - { - name: "subjectAltName", - altNames: [ - { - type: 7, // IP - ip: "127.0.0.1", - }, - ], - }, - { - name: "subjectKeyIdentifier", - }, - ]); - - return certificate; - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts b/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts deleted file mode 100644 index 95885132e2..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts +++ /dev/null @@ -1,326 +0,0 @@ -import Docker, { Container, ContainerInfo } from "dockerode"; -import Joi from "joi"; -import tar from "tar-stream"; -import { EventEmitter } from "events"; -import { - LogLevelDesc, - Logger, - LoggerProvider, - Bools, -} from "@hyperledger/cactus-common"; -import { ITestLedger } from "../i-test-ledger"; -import { Streams } from "../common/streams"; -import { Containers } from "../common/containers"; - -/* - * Contains options for Postgres container - */ -export interface IPostgresTestContainerConstructorOptions { - readonly imageVersion?: string; - readonly imageName?: string; - readonly postgresPort?: number; - readonly envVars?: string[]; - readonly logLevel?: LogLevelDesc; - readonly emitContainerLogs?: boolean; -} - -/* - * Provides default options for Postgres container - */ -export const POSTGRES_TEST_CONTAINER_DEFAULT_OPTIONS = Object.freeze({ - imageVersion: "9.5-alpine", - imageName: "postgres", - postgresPort: 5432, - envVars: ["POSTGRES_USER=postgres", "POSTGRES_PASSWORD=my-secret-password"], -}); - -/* - * Provides validations for Postgres container's options - */ -export const POSTGRES_TEST_CONTAINER_OPTIONS_JOI_SCHEMA: Joi.Schema = - Joi.object().keys({ - imageVersion: Joi.string().min(5).required(), - imageName: Joi.string().min(1).required(), - postgresPort: Joi.number().min(1024).max(65535).required(), - envVars: Joi.array().allow(null).required(), - }); - -export class PostgresTestContainer implements ITestLedger { - public readonly imageVersion: string; - public readonly imageName: string; - public readonly postgresPort: number; - public readonly envVars: string[]; - public readonly emitContainerLogs: boolean; - - private readonly log: Logger; - private container: Container | undefined; - private containerId: string | undefined; - - constructor( - public readonly options: IPostgresTestContainerConstructorOptions = {}, - ) { - if (!options) { - throw new TypeError(`PostgresTestContainer#ctor options was falsy.`); - } - this.imageVersion = - options.imageVersion || - POSTGRES_TEST_CONTAINER_DEFAULT_OPTIONS.imageVersion; - this.imageName = - options.imageName || POSTGRES_TEST_CONTAINER_DEFAULT_OPTIONS.imageName; - this.postgresPort = - options.postgresPort || - POSTGRES_TEST_CONTAINER_DEFAULT_OPTIONS.postgresPort; - this.envVars = - options.envVars || POSTGRES_TEST_CONTAINER_DEFAULT_OPTIONS.envVars; - - this.emitContainerLogs = Bools.isBooleanStrict(options.emitContainerLogs) - ? (options.emitContainerLogs as boolean) - : true; - - this.validateConstructorOptions(); - const label = "postgres-test-container"; - const level = options.logLevel || "INFO"; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getContainer(): Container { - const fnTag = "PostgresTestContainer#getContainer()"; - if (!this.container) { - throw new Error(`${fnTag} container not yet started by this instance.`); - } else { - return this.container; - } - } - - public getimageName(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - public async getPostgresPortHost(): Promise { - const ipAddress = "127.0.0.1"; - const hostPort: number = await this.getPostgresPort(); - return `http://${ipAddress}:${hostPort}`; - } - - public async getFileContents(filePath: string): Promise { - const response = await this.getContainer().getArchive({ - path: filePath, - }); - const extract: tar.Extract = tar.extract({ autoDestroy: true }); - - return new Promise((resolve, reject) => { - let fileContents = ""; - extract.on("entry", async (header: unknown, stream, next) => { - stream.on("error", (err: Error) => { - reject(err); - }); - const chunks: string[] = await Streams.aggregate(stream); - fileContents += chunks.join(""); - stream.resume(); - next(); - }); - - extract.on("finish", () => { - resolve(fileContents); - }); - - response.pipe(extract); - }); - } - - public async start(): Promise { - const imageFqn = this.getimageName(); - - if (this.container) { - await this.container.stop(); - await this.container.remove(); - } - const docker = new Docker(); - - this.log.debug(`Pulling container image ${imageFqn} ...`); - await this.pullContainerImage(imageFqn); - this.log.debug(`Pulled ${imageFqn} OK. Starting container...`); - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - imageFqn, - [], - [], - { - Env: this.envVars, - Healthcheck: { - Test: ["CMD-SHELL", "pg_isready -U postgres"], - Interval: 1000000000, // 1 second - Timeout: 3000000000, // 3 seconds - Retries: 299, - StartPeriod: 3000000000, // 3 seconds - }, - HostConfig: { - PublishAllPorts: true, - AutoRemove: true, - }, - }, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.log.debug(`Started container OK. Waiting for healthcheck...`); - this.container = container; - this.containerId = container.id; - if (this.emitContainerLogs) { - const logOptions = { follow: true, stderr: true, stdout: true }; - const logStream = await container.logs(logOptions); - logStream.on("data", (data: Buffer) => { - this.log.debug(`[${imageFqn}] %o`, data.toString("utf-8")); - }); - } - try { - await this.waitForHealthCheck(); - this.log.debug(`Healthcheck passing OK.`); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async waitForHealthCheck(timeoutMs = 180000): Promise { - const fnTag = "PostgresTestContainer#waitForHealthCheck()"; - const startedAt = Date.now(); - let isHealthy = false; - do { - if (Date.now() >= startedAt + timeoutMs) { - throw new Error(`${fnTag} timed out (${timeoutMs}ms)`); - } - const containerInfo = await this.getContainerInfo(); - this.log.debug(`ContainerInfo.Status=%o`, containerInfo.Status); - this.log.debug(`ContainerInfo.State=%o`, containerInfo.State); - isHealthy = containerInfo.Status.endsWith("(healthy)"); - if (!isHealthy) { - await new Promise((resolve2) => setTimeout(resolve2, 1000)); - } - } while (!isHealthy); - } - - public stop(): Promise { - return Containers.stop(this.container as Container); - } - - public destroy(): Promise { - const fnTag = "PostgresTestContainer#destroy()"; - if (this.container) { - return this.container.remove(); - } else { - const ex = new Error(`${fnTag} Container not found, nothing to destroy.`); - return Promise.reject(ex); - } - } - - protected async getContainerInfo(): Promise { - const docker = new Docker(); - const image = this.getimageName(); - const containerInfos = await docker.listContainers({}); - - let aContainerInfo; - if (this.containerId !== undefined) { - aContainerInfo = containerInfos.find((ci) => ci.Id === this.containerId); - } - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error( - `PostgresTestContainer#getContainerInfo() no image "${image}"`, - ); - } - } - - public async getPostgresPort(): Promise { - const fnTag = "PostgresTestContainer#getPostgresPort()"; - const aContainerInfo = await this.getContainerInfo(); - const { postgresPort: thePort } = this; - const { Ports: ports } = aContainerInfo; - - if (ports.length < 1) { - throw new Error(`${fnTag} no ports exposed or mapped at all`); - } - const mapping = ports.find((x) => x.PrivatePort === thePort); - if (mapping) { - if (!mapping.PublicPort) { - throw new Error(`${fnTag} port ${thePort} mapped but not public`); - } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); - } else { - return mapping.PublicPort; - } - } else { - throw new Error(`${fnTag} no mapping found for ${thePort}`); - } - } - - public async getContainerIpAddress(): Promise { - const fnTag = "PostgresTestContainer#getContainerIpAddress()"; - const aContainerInfo = await this.getContainerInfo(); - - if (aContainerInfo) { - const { NetworkSettings } = aContainerInfo; - const networkNames: string[] = Object.keys(NetworkSettings.Networks); - if (networkNames.length < 1) { - throw new Error(`${fnTag} container not connected to any networks`); - } else { - // return IP address of container on the first network that we found - // it connected to. Make this configurable? - return NetworkSettings.Networks[networkNames[0]].IPAddress; - } - } else { - throw new Error(`${fnTag} cannot find image: ${this.imageName}`); - } - } - - private pullContainerImage(containerNameAndTag: string): Promise { - return new Promise((resolve, reject) => { - const docker = new Docker(); - docker.pull( - containerNameAndTag, - (pullError: unknown, stream: NodeJS.ReadableStream) => { - if (pullError) { - reject(pullError); - } else { - docker.modem.followProgress( - stream, - (progressError: unknown, output: unknown[]) => { - if (progressError) { - reject(progressError); - } else { - resolve(output); - } - }, - ); - } - }, - ); - }); - } - - private validateConstructorOptions(): void { - const validationResult = - POSTGRES_TEST_CONTAINER_OPTIONS_JOI_SCHEMA.validate({ - imageVersion: this.imageVersion, - imageName: this.imageName, - postgresPort: this.postgresPort, - envVars: this.envVars, - }); - - if (validationResult.error) { - throw new Error( - `PostgresTestContainer#ctor ${validationResult.error.annotate()}`, - ); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/public-api.ts b/packages/cactus-test-tooling/src/main/typescript/public-api.ts deleted file mode 100755 index 6054d279b0..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/public-api.ts +++ /dev/null @@ -1,232 +0,0 @@ -export { ITestLedger } from "./i-test-ledger"; -export { IKeyPair, isIKeyPair } from "./i-key-pair"; - -export { - BesuTestLedger, - IBesuTestLedgerConstructorOptions, - BESU_TEST_LEDGER_DEFAULT_OPTIONS, - BESU_TEST_LEDGER_OPTIONS_JOI_SCHEMA, -} from "./besu/besu-test-ledger"; - -export { - BesuMpTestLedger, - IBesuMpTestLedgerOptions, -} from "./besu/besu-mp-test-ledger"; - -export { - DamlTestLedger, - DAML_TEST_LEDGER_DEFAULT_OPTIONS, - IDamlTestLedgerOptions, -} from "./daml/daml-test-ledger"; - -export { - CordaTestLedger, - ICordaTestLedgerConstructorOptions, - CORDA_TEST_LEDGER_DEFAULT_OPTIONS, - JOI_SCHEMA as CORDA_TEST_LEDGER_OPTIONS_JOI_SCHEMA, -} from "./corda/corda-test-ledger"; - -export { ICordappJarFile } from "./corda/cordapp-jar-file"; - -export { - CordaV5TestLedger, - ICordaV5TestLedgerConstructorOptions, - CORDA_V5_TEST_LEDGER_DEFAULT_OPTIONS, - CORDA_V5_TEST_LEDGER_OPTIONS_JOI_SCHEMA, -} from "./corda/corda-v5-test-ledger"; - -export { - Containers, - IPruneDockerResourcesRequest, - IPruneDockerResourcesResponse, -} from "./common/containers"; - -export { - HttpEchoContainer, - IHttpEchoContainerConstructorOptions, - HTTP_ECHO_CONTAINER_CTOR_DEFAULTS, - HTTP_ECHO_CONTAINER_OPTS_SCHEMA, -} from "./http-echo/http-echo-container"; - -export { - DEFAULT_FABRIC_2_AIO_FABRIC_VERSION, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - DEFAULT_FABRIC_2_AIO_IMAGE_VERSION, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FabricTestLedgerV1, - IFabricTestLedgerV1ConstructorOptions, - FABRIC_TEST_LEDGER_DEFAULT_OPTIONS, - FABRIC_TEST_LEDGER_OPTIONS_JOI_SCHEMA, - STATE_DATABASE, - organizationDefinitionFabricV2, - LedgerStartOptions, -} from "./fabric/fabric-test-ledger-v1"; - -export { - IndyTestLedger, - IIndyTestLedgerOptions, - INDY_TEST_LEDGER_DEFAULT_OPTIONS, -} from "./indy/indy-test-ledger"; - -export { - Iroha2TestLedger, - IIroha2TestLedgerOptions, - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS, - Iroha2ClientConfig, -} from "./iroha/iroha2-test-ledger"; - -export { - PostgresTestContainer, - IPostgresTestContainerConstructorOptions, - POSTGRES_TEST_CONTAINER_DEFAULT_OPTIONS, - POSTGRES_TEST_CONTAINER_OPTIONS_JOI_SCHEMA, -} from "./postgres/postgres-test-container"; - -export { - CactusKeychainVaultServer, - ICactusKeychainVaultServerOptions, - K_DEFAULT_KEYCHAIN_VAULT_HTTP_PORT, - K_DEFAULT_KEYCHAIN_VAULT_IMAGE_NAME, - K_DEFAULT_KEYCHAIN_VAULT_IMAGE_VERSION, -} from "./cactus-keychain-vault-server/cactus-keychain-vault-server"; - -export { - IVaultTestServerOptions, - VaultTestServer, - K_DEFAULT_VAULT_IMAGE_NAME, - K_DEFAULT_VAULT_IMAGE_VERSION, - K_DEFAULT_VAULT_HTTP_PORT, - K_DEFAULT_VAULT_DEV_ROOT_TOKEN, -} from "./vault-test-server/vault-test-server"; - -export { - IWsTestServerOptions, - WsTestServer, - WS_IDENTITY_HTTP_PORT, -} from "./ws-test-server/ws-test-server"; - -export { - ILocalStackContainerOptions, - LocalStackContainer, - K_DEFAULT_LOCALSTACK_HTTP_PORT, - K_DEFAULT_LOCALSTACK_IMAGE_NAME, - K_DEFAULT_LOCALSTACK_IMAGE_VERSION, -} from "./localstack/localstack-container"; - -export { - CORDA_CONNECTOR_DEFAULT_OPTIONS, - CORDA_CONNECTOR_OPTIONS_JOI_SCHEMA, - CordaConnectorContainer, - ICordaConnectorContainerOptions, -} from "./corda-connector/corda-connector-container"; - -export { - IKeycloakContainerOptions, - K_DEFAULT_KEYCLOAK_HTTP_PORT, - K_DEFAULT_KEYCLOAK_IMAGE_NAME, - K_DEFAULT_KEYCLOAK_IMAGE_VERSION, - KeycloakContainer, -} from "./keycloak/keycloak-container"; - -export { - IOpenEthereumTestLedgerOptions, - K_DEFAULT_OPEN_ETHEREUM_HTTP_PORT, - K_DEFAULT_OPEN_ETHEREUM_IMAGE_NAME, - K_DEFAULT_OPEN_ETHEREUM_IMAGE_VERSION, - K_DEFAULT_OPEN_ETHEREUM_CHAIN, - K_DEV_WHALE_ACCOUNT_PRIVATE_KEY, - K_DEV_WHALE_ACCOUNT_PUBLIC_KEY, - OpenEthereumTestLedger, -} from "./openethereum/openethereum-test-ledger"; - -export { - SelfSignedPkiGenerator, - ForgeCertificateField, - ForgeCertificate, - ForgeKeyPair, - ForgePrivateKey, - IPki, -} from "./pki/self-signed-pki-generator"; - -export { - GoIpfsTestContainer, - IGoIpfsTestContainerOptions, -} from "./go-ipfs/go-ipfs-test-container"; - -export { - SAMPLE_CORDAPP_DATA, - SampleCordappEnum, -} from "./corda/sample-cordapp-enum"; - -export { - ISawtoothTestLedgerOptions, - SAWTOOTH_LEDGER_DEFAULT_OPTIONS, - SawtoothTestLedger, -} from "./sawtooth/sawtooth-test-ledger"; - -export { - IStellarTestLedgerOptions, - StellarTestLedger, -} from "./stellar/stellar-test-ledger"; - -export { - ISubstrateTestLedgerOptions, - SubstrateTestLedger, -} from "./substrate-test-ledger/substrate-test-ledger"; - -export { Streams } from "./common/streams"; - -export { isRunningInGithubAction } from "./github-actions/is-running-in-github-action"; -export { pruneDockerAllIfGithubAction } from "./github-actions/prune-docker-all-if-github-action"; -export { IDockerPullProgress } from "./common/i-docker-pull-progress"; -export { IDockerPullProgressDetail } from "./common/i-docker-pull-progress"; -export { envNodeToDocker } from "./common/env-node-to-docker"; -export { envMapToDocker } from "./common/env-map-to-docker"; -export { envNodeToMap } from "./common/env-node-to-map"; -export * as SocketIOTestSetupHelpers from "./socketio-test-setup-helpers/socketio-test-setup-helpers"; - -export { - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_ADDRESS_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_ADDRESS_ORG_2, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_LOCALMSPID_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_LOCALMSPID_ORG_2, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_MSPCONFIGPATH_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_MSPCONFIGPATH_ORG_2, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_CERT_FILE_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_CERT_FILE_ORG_2, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ENABLED_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ENABLED_ORG_2, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_KEY_FILE_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_KEY_FILE_ORG_2, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ROOTCERT_FILE_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES__CORE_PEER_TLS_ROOTCERT_FILE_ORG_2, - FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES__ORDERER_TLS_ROOTCERT_FILE_ORG_2, - IFabricOrgEnvInfo, -} from "./fabric/fabric-samples-env-constants"; - -export { - IBuildContainerImageRequest, - buildContainerImage, -} from "./common/build-container-image"; - -export { - IBuildImageConnectorCordaServerRequest, - IBuildImageConnectorCordaServerResponse, - buildImageConnectorCordaServer, -} from "./corda/build-image-connector-corda-server"; - -export { - IBuildImageCordaAllInOneV412Request, - IBuildImageCordaAllInOneV412Response, - buildImageCordaAllInOneV412, -} from "./corda/build-image-corda-all-in-one-v4-12"; - -export { - IBuildImageBesuAllInOneLatestRequest, - IBuildImageBesuAllInOneLatestResponse, - buildImageBesuAllInOneLatest, -} from "./corda/build-image-besu-all-in-one-latest"; diff --git a/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts deleted file mode 100644 index 89538dfbb1..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts +++ /dev/null @@ -1,337 +0,0 @@ -/** - * Helper utils for setting up and starting Sawtooth ledger for testing. - */ - -import { EventEmitter } from "events"; -import Docker, { Container, ContainerCreateOptions } from "dockerode"; -import { - Bools, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { ITestLedger } from "../i-test-ledger"; -import { Containers } from "../common/containers"; -import { v4 as internalIpV4 } from "internal-ip"; - -/** - * Type of input parameters to `SawtoothTestLedger` constructor. - */ -export interface ISawtoothTestLedgerOptions { - readonly containerImageName?: string; - readonly containerImageVersion?: string; - readonly ledgerApiPort?: number; - readonly logLevel?: LogLevelDesc; - readonly emitContainerLogs?: boolean; - readonly envVars?: string[]; - // For test development, attach to ledger that is already running, don't spin up new one - readonly useRunningLedger?: boolean; -} - -/** - * Default options for Sawtooth test ledger. - */ -const DEFAULTS = Object.freeze({ - // @todo Replace with hyperledger ghcr link when available - containerImageName: "ghcr.io/hyperledger/cactus-sawtooth-all-in-one", - containerImageVersion: "2022-07-20-bb7a75cb", - ledgerApiPort: 8008, - logLevel: "info" as LogLevelDesc, - emitContainerLogs: false, - envVars: [], - useRunningLedger: false, -}); -export const SAWTOOTH_LEDGER_DEFAULT_OPTIONS = DEFAULTS; - -/** - * Class for running a test sawtooth ledger in a container. - */ -export class SawtoothTestLedger implements ITestLedger { - public readonly containerImageName: string; - public readonly containerImageVersion: string; - private readonly ledgerApiPort: number; - private readonly logLevel: LogLevelDesc; - private readonly emitContainerLogs: boolean; - private readonly useRunningLedger: boolean; - private readonly envVars: string[]; - - private readonly log: Logger; - public container: Container | undefined; - public containerId: string | undefined; - - constructor(public readonly options: ISawtoothTestLedgerOptions) { - this.containerImageName = - options?.containerImageName || DEFAULTS.containerImageName; - - this.containerImageVersion = - options?.containerImageVersion || DEFAULTS.containerImageVersion; - - this.ledgerApiPort = options?.ledgerApiPort || DEFAULTS.ledgerApiPort; - - this.logLevel = options?.logLevel || DEFAULTS.logLevel; - - this.emitContainerLogs = Bools.isBooleanStrict(options.emitContainerLogs) - ? (options.emitContainerLogs as boolean) - : DEFAULTS.emitContainerLogs; - - this.useRunningLedger = Bools.isBooleanStrict(options.useRunningLedger) - ? (options.useRunningLedger as boolean) - : DEFAULTS.useRunningLedger; - - this.envVars = options?.envVars || DEFAULTS.envVars; - - this.log = LoggerProvider.getOrCreate({ - level: this.logLevel, - label: "sawtooth-test-ledger", - }); - } - - /** - * Sawtooth ledger image name and tag - */ - public get fullContainerImageName(): string { - return [this.containerImageName, this.containerImageVersion].join(":"); - } - - /** - * Start a test sawtooth ledger. - * - * @param omitPull Don't pull docker image from upstream if true. - * @returns Promise - */ - public async start(omitPull = false): Promise { - if (this.useRunningLedger) { - this.log.info( - "Search for already running Sawtooth Test Ledger because 'useRunningLedger' flag is enabled.", - ); - this.log.info( - "Search criteria - image name: ", - this.fullContainerImageName, - ", state: running", - ); - const containerInfo = await Containers.getByPredicate( - (ci) => - ci.Image === this.fullContainerImageName && ci.State === "running", - ); - const docker = new Docker(); - this.containerId = containerInfo.Id; - this.container = docker.getContainer(this.containerId); - return this.container; - } - - if (this.container) { - await this.container.stop(); - await this.container.remove(); - this.container = undefined; - this.containerId = undefined; - } - - if (!omitPull) { - await Containers.pullImage( - this.fullContainerImageName, - {}, - this.logLevel, - ); - } - - const createOptions: ContainerCreateOptions = { - ExposedPorts: { - "8008/tcp": {}, // Rest API - }, - Env: this.envVars, - HostConfig: { - PublishAllPorts: true, - Privileged: true, - }, - }; - - return new Promise((resolve, reject) => { - const docker = new Docker(); - const eventEmitter: EventEmitter = docker.run( - this.fullContainerImageName, - [], - [], - createOptions, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.container = container; - this.containerId = container.id; - - if (this.emitContainerLogs) { - const fnTag = `[${this.fullContainerImageName}]`; - await Containers.streamLogs({ - container: this.container, - tag: fnTag, - log: this.log, - }); - } - - try { - await Containers.waitForHealthCheck(this.containerId); - resolve(container); - } catch (ex) { - this.log.error(ex); - reject(ex); - } - }); - }); - } - - /** - * Stop a test sawtooth ledger. - * - * @returns Stop operation results. - */ - public stop(): Promise { - if (this.useRunningLedger) { - this.log.info("Ignore stop request because useRunningLedger is enabled."); - return Promise.resolve(); - } else if (this.container) { - return Containers.stop(this.container); - } else { - return Promise.reject( - new Error( - `SawtoothTestLedger#destroy() Container was never created, nothing to stop.`, - ), - ); - } - } - - /** - * Destroy a test sawtooth ledger. - * - * @returns Destroy operation results. - */ - public destroy(): Promise { - if (this.useRunningLedger) { - this.log.info( - "Ignore destroy request because useRunningLedger is enabled.", - ); - return Promise.resolve(); - } else if (this.container) { - return this.container.remove(); - } else { - return Promise.reject( - new Error( - `SawtoothTestLedger#destroy() Container was never created, nothing to destroy.`, - ), - ); - } - } - - /** - * Get 127.0.0.1 port that can be used to access ledger rest API in the container. - * - * @returns port - */ - private async getRestApiPort() { - if (this.containerId) { - const cInfo = await Containers.getById(this.containerId); - return Containers.getPublicPort(this.ledgerApiPort, cInfo); - } else { - throw new Error( - "getRestApiPort(): Container ID not set. Did you call start()?", - ); - } - } - - /** - * Get 127.0.0.1 URL that can be used to access ledger rest API in the container. - * - * @returns Sawtooth Rest API URL. - */ - public async getRestApiHost(): Promise { - const port = await this.getRestApiPort(); - const lanAddress = (await internalIpV4()) ?? "127.0.0.1"; - return `http://${lanAddress}:${port}`; - } - - /** - * Execute Sawtooth shell command on the ledger. - * - * @param cmd Tokenized command to be executed. - * @param timeout Docker exec timeout (default: 1 minute) - * @param workdir Where to execute the command from (default: undefined) - * - * @returns Command response. - */ - public async runSawtoothShell( - cmd: string[], - timeout = 60 * 1000, - workdir?: string, - ): Promise { - if (this.container) { - // Pass the command to shell helper script in the container - cmd.unshift("shell"); - - if (!cmd.includes("--url")) { - this.log.debug("Append URL argument to the shell command"); - cmd.push("--url", "http://rest-api:8008"); - } - - this.log.debug("Run Sawtooth shell command:", cmd); - - return Containers.exec( - this.container, - cmd, - timeout, - this.logLevel, - workdir, - ); - } else { - throw new Error( - "runSawtoothShell(): Container not set. Did you call start()?", - ); - } - } - - /** - * Check transaction status when supplied with sawtooth status check URL. - * Will execute curl on the URL and block until status is other then PENDING. - * - * @param url Sawtooth batch statuses URL for given transaction (like http://rest-api:8008/batch_statuses?id=) - * @param timeout How many seconds to wait for transaction commit. - * - * @returns Transaction status. - */ - public async waitOnTransaction(url: string, timeout = 30): Promise { - this.log.debug("Wait on transaction with URL", url); - - const checkStatus = async () => { - // Fetch status - const curlResponse = await this.runSawtoothShell(["curl", url]); - this.log.debug("CURL response:", curlResponse); - // Clear response (it's a string with request status appended at the end) - const responseObject = curlResponse.match(/{[\s\S]*}/g) as any; - const parsedResponse = JSON.parse(responseObject); - this.log.debug("Parsed response:", parsedResponse); - return parsedResponse.data[0].status; - }; - - const currentCount = 0; - let status = await checkStatus(); - this.log.debug("Init status:", status); - while (status === "PENDING") { - if (currentCount >= timeout) { - throw new Error(`waitOnTransaction(): timeout for URL '${url}'`); - } - - // Sleep 1 second - await new Promise((resolve) => setTimeout(resolve, 1000)); - - status = await checkStatus(); - this.log.debug("New status:", status); - timeout++; - } - - this.log.info("TX finished. Status:", status); - return status; - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts b/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts deleted file mode 100644 index dfbb33ac09..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Helper module for setting up client/server test sockets. - */ - -import { - Server, - ServerOptions as SocketServerOptions, - Socket as ServerSocket, -} from "socket.io"; -import { io, Socket as ClientSocket } from "socket.io-client-fixed-types"; -import { createServer } from "http"; - -export { Server, ServerSocket, ClientSocket }; - -/** - * Create a socket.io server listening on random local port for test purposes. - * - * @returns [socketio Server, port] - */ -export function createListeningMockServer(): Promise<[Server, string]> { - return new Promise((resolve, reject) => { - const httpServer = createServer(); - httpServer.unref(); - - const socketServerOptions: Partial = { - transports: ["websocket"], - cookie: false, - }; - - const testServer = new Server(httpServer, socketServerOptions); - - httpServer.listen(0, () => { - const addrInfo = httpServer.address(); - - if (addrInfo && typeof addrInfo == "object") { - const port = addrInfo.port.toString(); - resolve([testServer, port]); - } else { - reject(Error("Couldn't create mock server")); - } - }); - }); -} - -/** - * Create client socket to 127.0.0.1. - * - * @port - Localhost port to connect to. - */ -export function createClientSocket(port: string): ClientSocket { - const clientSocketOpts = { - reconnectionAttempts: 10, - reconnectionDelay: 1000, - transports: ["websocket"], - }; - - return io(`http://127.0.0.1:${port}`, clientSocketOpts); -} - -/** - * Connects supplied client to the test server. - * @returns connected client socket - */ -export function connectTestClient(socket: ClientSocket): Promise { - return new Promise((resolve, reject) => { - // Install setup-time error handlers - const errorHandlerFactory = (event: string) => { - // TODO - Better logging / Remove this - return (err: Record | Error) => { - if (socket) { - console.log("connect error - event", event); - socket.close(); - reject(err); - } - }; - }; - - socket.on("error", errorHandlerFactory("error")); - socket.on("connect_error", errorHandlerFactory("connect_error")); - socket.on("connect_timeout", errorHandlerFactory("connect_timeout")); - - socket.on("connect", () => { - socket.removeAllListeners(); - resolve(socket); - }); - }); -} diff --git a/packages/cactus-test-tooling/src/main/typescript/stellar/network.ts b/packages/cactus-test-tooling/src/main/typescript/stellar/network.ts deleted file mode 100644 index 7a3229ec63..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/stellar/network.ts +++ /dev/null @@ -1,9 +0,0 @@ -// -// List of supported networks to connect -// when the test ledger image is pulled up. -// -export enum Network { - LOCAL = "local", // (Default) pull up a new pristine network image locally. - FUTURENET = "futurenet", // pull up an image to connect to futurenet. Can take several minutes to sync the ledger state. - TESTNET = "testnet", // pull up an image to connect to testnet Can take several minutes to sync the ledger state. -} diff --git a/packages/cactus-test-tooling/src/main/typescript/stellar/resource-limits.ts b/packages/cactus-test-tooling/src/main/typescript/stellar/resource-limits.ts deleted file mode 100644 index 984f8caecd..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/stellar/resource-limits.ts +++ /dev/null @@ -1,12 +0,0 @@ -// -// Define the resource limits set to Soroban transactions -// when pulling up a local network. This defines how smart contract -// transactions are limited in terms of resources during execution. -// -// Transactions that exceed these limits will be rejected. -// -export enum ResourceLimits { - TESTNET = "testnet", // (Default) sets the limits to match those used on testnet. - DEFAULT = "default", // leaves resource limits set extremely low as per Stellar's core default configuration - UNLIMITED = "unlimited", // set limits to maximum resources that can be configured -} diff --git a/packages/cactus-test-tooling/src/main/typescript/stellar/stellar-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/stellar/stellar-test-ledger.ts deleted file mode 100644 index 6fcd1c492f..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/stellar/stellar-test-ledger.ts +++ /dev/null @@ -1,421 +0,0 @@ -import Docker, { - Container, - ContainerCreateOptions, - ContainerInfo, -} from "dockerode"; -import { ITestLedger } from "../i-test-ledger"; -import { - Bools, - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { Containers } from "../common/containers"; -import EventEmitter from "events"; -import { SupportedImageVersions } from "./supported-image-versions"; -import { Network } from "./network"; -import { ResourceLimits } from "./resource-limits"; - -export interface IStellarTestLedger extends ITestLedger { - getNetworkConfiguration(): Promise; - getContainer(): Container; - getContainerIpAddress(): Promise; -} - -// This interface defines the network configuration data for the test stellar ledger. -// This is used to manage the connections to different services necessary to interact with the ledger. -export interface INetworkConfigData { - networkPassphrase: string; - rpcUrl?: string; - horizonUrl?: string; - friendbotUrl?: string; - allowHttp?: boolean; -} - -export interface IStellarTestLedgerOptions { - // Defines which type of network will the image will be configured to run. - network?: Network; - - // Defines the resource limits for soroban transactions. A valid transaction and only be included in a ledger - // block if enough resources are available for that operation. - limits?: ResourceLimits; - - // For test development, attach to ledger that is already running, don't spin up new one - useRunningLedger?: boolean; - - readonly logLevel?: LogLevelDesc; - readonly containerImageName?: string; - readonly containerImageVersion?: SupportedImageVersions; - readonly emitContainerLogs?: boolean; -} - -const DEFAULTS = Object.freeze({ - imageName: "stellar/quickstart", - imageVersion: SupportedImageVersions.V425_LATEST, - network: Network.LOCAL, - limits: ResourceLimits.TESTNET, - useRunningLedger: false, - logLevel: "info" as LogLevelDesc, - emitContainerLogs: false, -}); - -/** - * This class provides the functionality to start and stop a test stellar ledger. - * The ledger is started as a docker container and can be configured to run on different networks. - * - * @param {IStellarTestLedgerOptions} options - Options for the test stellar ledger. - * @param {Network} options.network - Defines which type of network will the image will be configured to run. - * @param {ResourceLimits} options.limits - Defines the resource limits for soroban transactions. - * @param {boolean} options.useRunningLedger - For test development, attach to ledger that is already running, don't spin up new one. - * @param {LogLevelDesc} options.logLevel - The log level for the test stellar ledger. - * @param {string} options.containerImageName - The name of the container image to use for the test stellar ledger. - * @param {SupportedImageVersions} options.containerImageVersion - The version of the container image to use for the test stellar ledger. - * @param {boolean} options.emitContainerLogs - If true, the container logs will be emitted. - * - */ -export class StellarTestLedger implements IStellarTestLedger { - public readonly containerImageName: string; - public readonly containerImageVersion: SupportedImageVersions; - - private readonly network: string; - private readonly limits: string; - private readonly useRunningLedger: boolean; - - private readonly emitContainerLogs: boolean; - private readonly log: Logger; - private readonly logLevel: LogLevelDesc; - public container: Container | undefined; - public containerId: string | undefined; - - constructor(options?: IStellarTestLedgerOptions) { - this.network = options?.network || DEFAULTS.network; - this.limits = options?.limits || DEFAULTS.limits; - - if (this.network != Network.LOCAL) { - throw new Error( - `StellarTestLedger#constructor() network ${this.network} not supported yet.`, - ); - } - if (this.limits != Network.TESTNET) { - throw new Error( - `StellarTestLedger#constructor() limits ${this.limits} not supported yet.`, - ); - } - - this.containerImageVersion = - options?.containerImageVersion || DEFAULTS.imageVersion; - - // if image name is not a supported version - if ( - !Object.values(SupportedImageVersions).includes( - this.containerImageVersion, - ) - ) { - throw new Error( - `StellarTestLedger#constructor() containerImageVersion ${options?.containerImageVersion} not supported.`, - ); - } - - this.containerImageName = options?.containerImageName || DEFAULTS.imageName; - - this.useRunningLedger = Bools.isBooleanStrict(options?.useRunningLedger) - ? (options?.useRunningLedger as boolean) - : DEFAULTS.useRunningLedger; - - this.logLevel = options?.logLevel || DEFAULTS.logLevel; - this.emitContainerLogs = Bools.isBooleanStrict(options?.emitContainerLogs) - ? (options?.emitContainerLogs as boolean) - : DEFAULTS.emitContainerLogs; - - this.log = LoggerProvider.getOrCreate({ - level: this.logLevel, - label: "stellar-test-ledger", - }); - } - - /** - * Get the full container image name. - * - * @returns {string} Full container image name - */ - public get fullContainerImageName(): string { - return [this.containerImageName, this.containerImageVersion].join(":"); - } - - public getContainer(): Container { - if (!this.container) { - throw new Error( - `StellarTestLedger#getContainer() Container not started yet by this instance.`, - ); - } else { - return this.container; - } - } - - /** - * - * Get the container information for the test stellar ledger. - * - * @returns {ContainerInfo} Container information - */ - protected async getContainerInfo(): Promise { - const fnTag = "StellarTestLedger#getContainerInfo()"; - const docker = new Docker(); - const image = this.containerImageName; - const containerInfos = await docker.listContainers({}); - - let aContainerInfo; - if (this.containerId !== undefined) { - aContainerInfo = containerInfos.find((ci) => ci.Id === this.containerId); - } - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error(`${fnTag} no image "${image}"`); - } - } - - /** - * - * Get the IP address of the container. - * - * @returns {string} IP address of the container - */ - public async getContainerIpAddress(): Promise { - const fnTag = "StellarTestLedger#getContainerIpAddress()"; - const aContainerInfo = await this.getContainerInfo(); - - if (aContainerInfo) { - const { NetworkSettings } = aContainerInfo; - const networkNames: string[] = Object.keys(NetworkSettings.Networks); - if (networkNames.length < 1) { - throw new Error(`${fnTag} container not connected to any networks`); - } else { - // return IP address of container on the first network that we found - return NetworkSettings.Networks[networkNames[0]].IPAddress; - } - } else { - throw new Error(`${fnTag} cannot find image: ${this.containerImageName}`); - } - } - - /** - * - * Get the commands to pass to the docker container. - * - * @returns {string[]} Array of commands to pass to the docker container - */ - private getImageCommands(): string[] { - const cmds = []; - - switch (this.network) { - case Network.FUTURENET: - cmds.push("--futurenet"); - break; - case Network.TESTNET: - cmds.push("--testnet"); - break; - case Network.LOCAL: - default: - cmds.push("--local"); - break; - } - - switch (this.limits) { - case ResourceLimits.DEFAULT: - cmds.push("--limits", "default"); - break; - case ResourceLimits.UNLIMITED: - cmds.push("--limits", "unlimited"); - break; - case ResourceLimits.TESTNET: - default: - cmds.push("--limits", "testnet"); - break; - } - - return cmds; - } - - /** - * - * Get the network configuration data for the test stellar ledger. - * This includes the network passphrase, rpcUrl, horizonUrl, - * friendbotUrl, and the allowHttp flag. - * - * @returns {INetworkConfigData} Network configuration data - */ - public async getNetworkConfiguration(): Promise { - if (this.network != "local") { - throw new Error( - `StellarTestLedger#getNetworkConfiguration() network ${this.network} not supported yet.`, - ); - } - const cInfo = await this.getContainerInfo(); - const publicPort = await Containers.getPublicPort(8000, cInfo); - - // Default docker internal domain. Redirects to the local host where docker is running. - const domain = "127.0.0.1"; - - return Promise.resolve({ - networkPassphrase: "Standalone Network ; February 2017", - rpcUrl: `http://${domain}:${publicPort}/rpc`, - horizonUrl: `http://${domain}:${publicPort}`, - friendbotUrl: `http://${domain}:${publicPort}/friendbot`, - allowHttp: true, - }); - } - - /** - * Start a test stellar ledger. - * - * @param {boolean} omitPull - If true, the image will not be pulled from the registry. - * @returns {Container} The container object. - */ - public async start(omitPull = false): Promise { - if (this.useRunningLedger) { - this.log.info( - "Search for already running Stellar Test Ledger because 'useRunningLedger' flag is enabled.", - ); - this.log.info( - "Search criteria - image name: ", - this.fullContainerImageName, - ", state: running", - ); - const containerInfo = await Containers.getByPredicate( - (ci) => - ci.Image === this.fullContainerImageName && ci.State === "running", - ); - const docker = new Docker(); - this.containerId = containerInfo.Id; - this.container = docker.getContainer(this.containerId); - return this.container; - } - - if (this.container) { - await this.container.stop(); - await this.container.remove(); - this.container = undefined; - this.containerId = undefined; - } - - if (!omitPull) { - await Containers.pullImage( - this.fullContainerImageName, - {}, - this.logLevel, - ); - } - - const createOptions: ContainerCreateOptions = { - ExposedPorts: { - "8000/tcp": {}, // Stellar services will use this port (Horizon, RPC and Friendbot) - }, - HostConfig: { - PublishAllPorts: true, - Privileged: true, - }, - }; - - const Healthcheck = { - Test: [ - "CMD-SHELL", - "curl -s -o /dev/null -w '%{http_code}' http://localhost:8000 | grep -q '200' && curl -s -X POST -H 'Content-Type: application/json' -d '{\"jsonrpc\": \"2.0\", \"id\": 8675309, \"method\": \"getHealth\"}' http://localhost:8000/rpc | grep -q 'healthy' && curl -s http://localhost:8000/friendbot | grep -q '\"status\": 400' || exit 1", - ], - Interval: 1000000000, // 1 second - Timeout: 3000000000, // 3 seconds - Retries: 120, // 120 retries over 2 min should be enough for a big variety of systems - StartPeriod: 1000000000, // 1 second - }; - - return new Promise((resolve, reject) => { - const docker = new Docker(); - const eventEmitter: EventEmitter = docker.run( - this.fullContainerImageName, - [...this.getImageCommands()], - [], - { ...createOptions, Healthcheck: Healthcheck }, - {}, - (err: unknown) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this.container = container; - this.containerId = container.id; - - if (this.emitContainerLogs) { - const fnTag = `[${this.fullContainerImageName}]`; - await Containers.streamLogs({ - container: this.container, - tag: fnTag, - log: this.log, - }); - } - - try { - this.log.debug("Waiting for services to fully start."); - await Containers.waitForHealthCheck(this.containerId); - this.log.debug("Stellar Test Ledger is ready."); - resolve(container); - } catch (ex) { - this.log.error(ex); - reject(ex); - } - }); - }); - } - - /** - * Stop the test stellar ledger. - * - * @returns {Promise} A promise that resolves when the ledger is stopped. - */ - public async stop(): Promise { - if (this.useRunningLedger) { - this.log.info("Ignore stop request because useRunningLedger is enabled."); - return Promise.resolve(); - } else { - return Containers.stop(this.getContainer()); - } - } - - /** - * Destroy the test stellar ledger. - * - * @returns {Promise} A promise that resolves when the ledger is destroyed. - */ - public async destroy(): Promise { - if (this.useRunningLedger) { - this.log.info( - "Ignore destroy request because useRunningLedger is enabled.", - ); - return Promise.resolve(); - } else if (this.container) { - const docker = new Docker(); - const containerInfo = await this.container.inspect(); - const volumes = containerInfo.Mounts; - await this.container.remove(); - volumes.forEach(async (volume) => { - this.log.info(`Removing volume ${volume}`); - if (volume.Name) { - const volumeToDelete = docker.getVolume(volume.Name); - await volumeToDelete.remove(); - } else { - this.log.warn(`Volume ${volume} could not be removed!`); - } - }); - return Promise.resolve(); - } else { - return Promise.reject( - new Error( - `StellarTestLedger#destroy() Container was never created, nothing to destroy.`, - ), - ); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/stellar/supported-image-versions.ts b/packages/cactus-test-tooling/src/main/typescript/stellar/supported-image-versions.ts deleted file mode 100644 index c02715bdc2..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/stellar/supported-image-versions.ts +++ /dev/null @@ -1,6 +0,0 @@ -// For now, only the latest version of the image is supported. -// This enum can be expanded to support more versions in the future. -export enum SupportedImageVersions { - LASTEST = "latest", - V425_LATEST = "v425-latest", -} diff --git a/packages/cactus-test-tooling/src/main/typescript/substrate-test-ledger/substrate-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/substrate-test-ledger/substrate-test-ledger.ts deleted file mode 100644 index 981db2e65b..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/substrate-test-ledger/substrate-test-ledger.ts +++ /dev/null @@ -1,220 +0,0 @@ -import type { EventEmitter } from "events"; -import { Optional } from "typescript-optional"; -import { RuntimeError } from "run-time-error-cjs"; -import type { - Container, - ContainerCreateOptions, - ContainerInfo, -} from "dockerode"; -import Docker from "dockerode"; -import { Logger, Checks, Bools } from "@hyperledger/cactus-common"; -import type { LogLevelDesc } from "@hyperledger/cactus-common"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { Containers } from "../common/containers"; - -export interface ISubstrateTestLedgerOptions { - readonly publishAllPorts: boolean; - readonly logLevel?: LogLevelDesc; - readonly imageName?: string; - readonly imageTag?: string; - readonly emitContainerLogs?: boolean; - readonly envVars?: Map; -} - -export class SubstrateTestLedger { - public static readonly CLASS_NAME = "SubstrateTestLedger"; - - public readonly logLevel: LogLevelDesc; - public readonly imageName: string; - public readonly imageTag: string; - public readonly imageFqn: string; - public readonly log: Logger; - public readonly emitContainerLogs: boolean; - public readonly publishAllPorts: boolean; - public readonly envVars: Map; - - private _containerId: Optional; - - public get containerId(): Optional { - return this._containerId; - } - - public get container(): Optional { - const docker = new Docker(); - return this.containerId.isPresent() - ? Optional.ofNonNull(docker.getContainer(this.containerId.get())) - : Optional.empty(); - } - - public get className(): string { - return SubstrateTestLedger.CLASS_NAME; - } - - constructor(public readonly opts: ISubstrateTestLedgerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - - this.publishAllPorts = opts.publishAllPorts; - this._containerId = Optional.empty(); - this.imageName = - opts.imageName || "ghcr.io/hyperledger/cactus-substrate-all-in-one"; - this.imageTag = opts.imageTag || "2024-01-16-pr-2877"; - this.imageFqn = `${this.imageName}:${this.imageTag}`; - this.envVars = opts.envVars || new Map(); - this.emitContainerLogs = Bools.isBooleanStrict(opts.emitContainerLogs) - ? (opts.emitContainerLogs as boolean) - : true; - - this.logLevel = opts.logLevel || "INFO"; - - const level = this.logLevel; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.log.debug(`Created instance of ${this.className} OK`); - } - public getContainerImageName(): string { - return `${this.imageName}:${this.imageTag}`; - } - public async start(omitPull = false): Promise { - const docker = new Docker(); - if (this.containerId.isPresent()) { - this.log.debug(`Container ID provided. Will not start new one.`); - const container = docker.getContainer(this.containerId.get()); - return container; - } - if (!omitPull) { - this.log.debug(`Pulling image ${this.imageFqn}...`); - await Containers.pullImage(this.imageFqn); - this.log.debug(`Pulled image ${this.imageFqn} OK`); - } - - const dockerEnvVars: string[] = new Array(...this.envVars).map( - (pairs) => `${pairs[0]}=${pairs[1]}`, - ); - - const wsPort: string = this.envVars.get("WS_PORT") ?? "9944"; - const portToExpose = `${wsPort}/tcp`; - - // TODO: dynamically expose ports for custom port mapping - const createOptions: ContainerCreateOptions & { - Healthcheck: Record; - } = { - Env: dockerEnvVars, - Healthcheck: { - Test: [ - "CMD-SHELL", - `(echo '{"id":1,"jsonrpc":"2.0","method":"system_health","params":[]}' | websocat -n1 ws://127.0.0.1:9944) > /dev/null; echo $?`, - ], - Interval: 1000000000, // 1 second - Timeout: 3000000000, // 3 seconds - Retries: 10, - StartPeriod: 1000000000, // 1 second - }, - // Default exposed port commented to allow multiple test ledgers - ExposedPorts: { - // "9944/tcp": {}, // OpenSSH Server - TCP default port - }, - HostConfig: { - AutoRemove: true, - PublishAllPorts: this.publishAllPorts, - Privileged: false, - // Default port bindings commented to allow multiple test ledgers - PortBindings: { - // "9944/tcp": [{ HostPort: "9944" }], // default binding - }, - }, - }; - - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - createOptions["ExposedPorts"]![portToExpose] = {}; - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - createOptions["HostConfig"]!["PortBindings"][portToExpose] = [ - { HostPort: wsPort }, - ]; - - this.log.debug(`Starting ${this.imageFqn} with options: `, createOptions); - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - this.imageFqn, - [], - [], - createOptions, - {}, - (err: Error) => { - if (err) { - const errorMessage = `Failed to start container ${this.imageFqn}`; - const exception = new RuntimeError(errorMessage, err); - this.log.error(exception); - reject(exception); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - const { id } = container; - this.log.debug(`Started ${this.imageFqn} successfully. ID=${id}`); - this._containerId = Optional.ofNonNull(id); - - if (this.emitContainerLogs) { - const logOptions = { follow: true, stderr: true, stdout: true }; - const logStream = await container.logs(logOptions); - logStream.on("data", (data: Buffer) => { - const fnTag = `[${this.imageFqn}]`; - this.log.debug(`${fnTag} %o`, data.toString("utf-8")); - }); - } - this.log.debug(`Registered container log stream callbacks OK`); - - try { - this.log.debug(`Starting to wait for healthcheck... `); - await Containers.waitForHealthCheck(this.containerId.get()); - this.log.debug(`Healthcheck passed OK`); - resolve(container); - } catch (ex) { - this.log.error(ex); - reject(ex); - } - }); - }); - } - - public async stop(): Promise { - this.log.debug("Stopping the test ledger"); - return Containers.stop(this.container.get()); - } - - public async destroy(): Promise { - return this.container.get().remove(); - } - - public async getContainerIpAddress(): Promise { - const containerInfo = await this.getContainerInfo(); - return Containers.getContainerInternalIp(containerInfo); - } - - protected async getContainerInfo(): Promise { - const fnTag = "FabricTestLedgerV1#getContainerInfo()"; - const docker = new Docker(); - const image = this.getContainerImageName(); - const containerInfos = await docker.listContainers({}); - - let aContainerInfo; - if (this.containerId !== undefined) { - aContainerInfo = containerInfos.find( - (ci) => ci.Id == this.containerId.toString(), - ); - } - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error(`${fnTag} no image "${image}"`); - } - } - - protected async purgeDevChain(): Promise { - throw new Error("TODO"); - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/vault-test-server/vault-test-server.ts b/packages/cactus-test-tooling/src/main/typescript/vault-test-server/vault-test-server.ts deleted file mode 100644 index 545bba4c9a..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/vault-test-server/vault-test-server.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { EventEmitter } from "events"; - -import Docker, { Container } from "dockerode"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { Containers } from "../common/containers"; - -export interface IVaultTestServerOptions { - envVars?: string[]; - imageVersion?: string; - imageName?: string; - logLevel?: LogLevelDesc; -} - -export const K_DEFAULT_VAULT_IMAGE_NAME = "vault"; -export const K_DEFAULT_VAULT_IMAGE_VERSION = "1.6.1"; -export const K_DEFAULT_VAULT_HTTP_PORT = 8200; -export const K_DEFAULT_VAULT_DEV_ROOT_TOKEN = "myroot"; - -/** - * > **Do not use this image in production.** - * - * Class responsible for programmatically managing a container that is running - * the official Hashicorp Vault image in development mode. - */ -export class VaultTestServer { - public static readonly CLASS_NAME = "VaultTestServer"; - - private readonly log: Logger; - private readonly imageName: string; - private readonly imageVersion: string; - private readonly envVars: string[]; - - private _container: Container | undefined; - private _containerId: string | undefined; - - public get containerId(): string { - Checks.nonBlankString(this._containerId, `${this.className}:_containerId`); - return this._containerId as string; - } - - public get container(): Container { - Checks.nonBlankString(this._container, `${this.className}:_container`); - return this._container as Container; - } - - public get className(): string { - return VaultTestServer.CLASS_NAME; - } - - public get imageFqn(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - constructor(public readonly options: IVaultTestServerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.imageName = this.options.imageName || K_DEFAULT_VAULT_IMAGE_NAME; - this.imageVersion = - this.options.imageVersion || K_DEFAULT_VAULT_IMAGE_VERSION; - this.envVars = this.options.envVars || []; - - this.log.info(`Created ${this.className} OK. Image FQN: ${this.imageFqn}`); - } - - public async start(): Promise { - if (this._container) { - await this._container.stop(); - await this._container.remove(); - } - const docker = new Docker(); - - await Containers.pullImage(this.imageFqn, {}, this.options.logLevel); - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - this.imageFqn, - [], - [], - { - ExposedPorts: { - [`${K_DEFAULT_VAULT_HTTP_PORT}/tcp`]: {}, - }, - // This is a workaround needed for macOS which has issues with routing - // to docker container's IP addresses directly... - // https://stackoverflow.com/a/39217691 - PublishAllPorts: true, - Env: [ - `VAULT_DEV_ROOT_TOKEN_ID=${K_DEFAULT_VAULT_DEV_ROOT_TOKEN}`, - ...this.envVars, - ], - HostConfig: { - // NetworkMode: "host", - CapAdd: ["IPC_LOCK"], - PublishAllPorts: true, - }, - Healthcheck: { - Test: ["CMD-SHELL", "wget -O- http://127.0.0.1:8200/v1/sys/health"], - Interval: 100 * 1000000, - }, - }, - {}, - (err: Error) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this._container = container; - this._containerId = container.id; - try { - await Containers.waitForHealthCheck(this._containerId); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async stop(): Promise { - await Containers.stop(this._container as Docker.Container); - } - - public destroy(): Promise { - const fnTag = `${this.className}#destroy()`; - if (this._container) { - return this._container.remove(); - } else { - const ex = new Error(`${fnTag} Container not found, nothing to destroy.`); - return Promise.reject(ex); - } - } - - public async getHostPortHttp(): Promise { - const fnTag = `${this.className}#getHostPortHttp()`; - if (this._containerId) { - const cInfo = await Containers.getById(this._containerId); - return Containers.getPublicPort(K_DEFAULT_VAULT_HTTP_PORT, cInfo); - } else { - throw new Error(`${fnTag} Container ID not set. Did you call start()?`); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/ws-test-server/ws-test-server.ts b/packages/cactus-test-tooling/src/main/typescript/ws-test-server/ws-test-server.ts deleted file mode 100644 index 70d95d1738..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/ws-test-server/ws-test-server.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { EventEmitter } from "events"; - -import Docker, { Container } from "dockerode"; - -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { Containers } from "../common/containers"; - -export const WS_IDENTITY_IMAGE_NAME = `ghcr.io/brioux/ws-identity`; -export const WS_IDENTITY_IMAGE_VERSION = "0.0.1"; -export const WS_IDENTITY_HTTP_PORT = 8700; - -export interface IWsTestServerOptions { - envVars?: string[]; - imageVersion?: string; - imageName?: string; - logLevel?: LogLevelDesc; -} - -/** - * > **Do not use this image in production.** - * - * Class responsible for programmatically managing a container that is running - * ws-identity server - */ -export class WsTestServer { - public static readonly CLASS_NAME = "WsTestServer"; - - private readonly log: Logger; - private readonly imageName: string; - private readonly imageVersion: string; - private readonly envVars: string[]; - - private _container: Container | undefined; - private _containerId: string | undefined; - - public get containerId(): string { - Checks.nonBlankString(this._containerId, `${this.className}:_containerId`); - return this._containerId as string; - } - - public get container(): Container { - Checks.nonBlankString(this._container, `${this.className}:_container`); - return this._container as Container; - } - - public get className(): string { - return WsTestServer.CLASS_NAME; - } - - public get imageFqn(): string { - return `${this.imageName}:${this.imageVersion}`; - } - - constructor(public readonly options: IWsTestServerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.imageName = this.options.imageName || WS_IDENTITY_IMAGE_NAME; - this.imageVersion = this.options.imageVersion || WS_IDENTITY_IMAGE_VERSION; - this.envVars = this.options.envVars || []; - - this.log.info(`Created ${this.className} OK. Image FQN: ${this.imageFqn}`); - } - - public async start(): Promise { - if (this._container) { - await this._container.stop(); - await this._container.remove(); - } - const docker = new Docker(); - - await Containers.pullImage(this.imageFqn, {}, this.options.logLevel); - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - this.imageFqn, - [], - [], - { - ExposedPorts: { - [`${WS_IDENTITY_HTTP_PORT}/tcp`]: {}, - }, - // This is a workaround needed for macOS which has issues with routing - // to docker container's IP addresses directly... - // https://stackoverflow.com/a/39217691 - PublishAllPorts: true, - /*Env: [`WS_IDENTITY_PATH=${WS_IDENTITY_PATH}`, ...this.envVars],*/ - HostConfig: { - // NetworkMode: "host", - // CapAdd: ["IPC_LOCK"], - PublishAllPorts: true, - }, - //Healthcheck: { - // Test: ["CMD-SHELL", "wget -O- http://127.0.0.1:8200/v1/sys/health"], - // Interval: 100 * 1000000, - //}, - }, - {}, - (err: Error) => { - if (err) { - reject(err); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - this._container = container; - this._containerId = container.id; - resolve(container); - try { - await Containers.waitForHealthCheck(this._containerId); - resolve(container); - } catch (ex) { - reject(ex); - } - }); - }); - } - - public async stop(): Promise { - await Containers.stop(this._container as Docker.Container); - } - - public destroy(): Promise { - const fnTag = `${this.className}#destroy()`; - if (this._container) { - return this._container.remove(); - } else { - const ex = new Error(`${fnTag} Container not found, nothing to destroy.`); - return Promise.reject(ex); - } - } - - public async getHostPortHttp(): Promise { - const fnTag = `${this.className}#getHostPortHttp()`; - if (this._containerId) { - const cInfo = await Containers.getById(this._containerId); - return Containers.getPublicPort(WS_IDENTITY_HTTP_PORT, cInfo); - } else { - throw new Error(`${fnTag} Container ID not set. Did you call start()?`); - } - } -} diff --git a/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/.gitignore b/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/.gitignore deleted file mode 100644 index ebf1dde788..0000000000 --- a/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -pkg/ -target/ diff --git a/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/Cargo.lock b/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/Cargo.lock deleted file mode 100644 index 7fa3aa500c..0000000000 --- a/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/Cargo.lock +++ /dev/null @@ -1,146 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "bumpalo" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "hello-world" -version = "1.0.0" -dependencies = [ - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "js-sys" -version = "0.3.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "proc-macro2" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "quote" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "syn" -version = "1.0.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] -name = "wasm-bindgen" -version = "0.2.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" - -[[package]] -name = "web-sys" -version = "0.3.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e828417b379f3df7111d3a2a9e5753706cae29c41f7c4029ee9fd77f3e09e582" -dependencies = [ - "js-sys", - "wasm-bindgen", -] diff --git a/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/Cargo.toml b/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/Cargo.toml deleted file mode 100644 index 88f6dc1a04..0000000000 --- a/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "hello-world" -version = "2.0.0" -authors = ["Hyperledger Cactus Contributors"] -edition = "2018" - -[lib] -crate-type = ["cdylib"] - -[dependencies] -wasm-bindgen = "0.2.68" -web-sys = {version = "0.3.45", features = ["console"]} diff --git a/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/src/lib.rs b/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/src/lib.rs deleted file mode 100644 index 8a5a434322..0000000000 --- a/packages/cactus-test-tooling/src/test/rust/fixtures/wasm-hello-world/src/lib.rs +++ /dev/null @@ -1,16 +0,0 @@ -use wasm_bindgen::prelude::*; -use web_sys::console; - -#[wasm_bindgen] -pub fn hello_world() -> String { - let message = "Hello World!"; - console::log_1(&JsValue::from_str(message)); - return message.to_string(); -} - -#[wasm_bindgen] -pub fn say_hello(name: &str) -> String { - let greeting = format!("Hello {}!", name); - console::log_1(&JsValue::from_str(&*greeting)); - return greeting; -} \ No newline at end of file diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts deleted file mode 100644 index 2af3ed0865..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts +++ /dev/null @@ -1,51 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import isPortReachable from "is-port-reachable"; -import { Container } from "dockerode"; -import { - BesuTestLedger, - IKeyPair, - isIKeyPair, -} from "../../../../../main/typescript/public-api"; - -test("constructor throws if invalid input is provided", (assert: Test) => { - assert.ok(BesuTestLedger); - assert.throws(() => new BesuTestLedger({ containerImageVersion: "nope" })); - assert.end(); -}); - -test("constructor does not throw if valid input is provided", (assert: Test) => { - assert.ok(BesuTestLedger); - assert.doesNotThrow(() => new BesuTestLedger()); - assert.end(); -}); - -test("starts/stops/destroys a docker container", async (assert: Test) => { - const besuTestLedger = new BesuTestLedger(); - test.onFinish(async () => { - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - }); - - const container: Container = await besuTestLedger.start(); - assert.ok(container); - const ipAddress: string = await besuTestLedger.getContainerIpAddress(); - assert.ok(ipAddress); - assert.ok(ipAddress.length); - - const hostPort: number = await besuTestLedger.getRpcApiPublicPort(); - assert.ok(hostPort, "getRpcApiPublicPort() returns truthy OK"); - assert.ok(isFinite(hostPort), "getRpcApiPublicPort() returns finite OK"); - - const isReachable = await isPortReachable(hostPort, { host: "127.0.0.1" }); - assert.ok(isReachable, `HostPort ${hostPort} is reachable via 127.0.0.1`); - - const besuKeyPair: IKeyPair = await besuTestLedger.getBesuKeyPair(); - assert.ok(besuKeyPair, "getBesuKeyPair() returns truthy OK"); - assert.ok(isIKeyPair(besuKeyPair)); - - const orionKeyPair: IKeyPair = await besuTestLedger.getOrionKeyPair(); - assert.ok(orionKeyPair, "getOrionKeyPair() returns truthy OK"); - assert.ok(isIKeyPair(orionKeyPair)); - - assert.end(); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/common/containers.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/common/containers.test.ts deleted file mode 100644 index 12a6f5d63c..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/common/containers.test.ts +++ /dev/null @@ -1,126 +0,0 @@ -import os from "os"; -import path from "path"; -import "jest-extended"; -import type { IncomingMessage } from "http"; -import { v4 as uuidV4 } from "uuid"; -import fs from "fs-extra"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { - HttpEchoContainer, - Containers, -} from "../../../../main/typescript/public-api"; - -LoggerProvider.setLogLevel("DEBUG"); -const log: Logger = LoggerProvider.getOrCreate({ label: "containers-test" }); -const testCase = "pushes file to container unharmed"; - -describe(testCase, () => { - let container: any; - const anHttpEchoContainer = new HttpEchoContainer(); - console.log("Starting HttpEchoContainer..."); - const httpEchoContainer = new HttpEchoContainer(); - - beforeAll(async () => { - container = await anHttpEchoContainer.start(); - log.debug("Container started OK."); - }); - - afterAll(async () => { - await anHttpEchoContainer.stop(); - await anHttpEchoContainer.destroy(); - await httpEchoContainer.stop(); - await httpEchoContainer.destroy(); - }); - - test(testCase, async () => { - const srcFileName = uuidV4(); - const srcFileDir = os.tmpdir(); - const dstFileDir = "/"; - const dstFileName = srcFileName; - const srcFilePath = path.join(srcFileDir, srcFileName); - const dstFilePath = path.join(dstFileDir, dstFileName); - - const fileContents = { - id: srcFileName, - message: "Hello world!", - }; - - const srcFileAsString = JSON.stringify(fileContents); - fs.writeFileSync(srcFilePath, srcFileAsString); - { - const res: IncomingMessage = await Containers.putFile({ - containerOrId: container, - srcFileDir, - srcFileName, - dstFileDir, - dstFileName, - }); - - expect(res).toBeTruthy(); - expect(typeof res.statusCode).toBe("number"); - const statusCode: number = res.statusCode as number; - - expect(statusCode).toBeGreaterThan(199); - expect(statusCode).toBeLessThan(300); - expect(res.statusMessage).toEqual("OK"); - - log.debug("Put file result: %o %o", res.statusCode, res.statusMessage); - - const fileAsString2 = await Containers.pullFile(container, dstFilePath); - expect(fileAsString2).toBeTruthy(); - - const fileContents2 = JSON.parse(fileAsString2); - expect(fileContents2).toBeTruthy(); - expect(fileContents2.id).toEqual(fileContents.id); - } - - { - expect(httpEchoContainer).toBeTruthy(); - const container = await httpEchoContainer.start(); - expect(container).toBeTruthy(); - - const diag = await Containers.getDiagnostics({ logLevel: "TRACE" }); - expect(diag).toBeTruthy(); - - expect(diag.containers).toBeTruthy(); - expect(Array.isArray(diag.containers)).toBeTruthy(); - expect(diag.containers.length > 0).toBeTruthy(); - - expect(diag.images).toBeTruthy(); - expect(diag.images.length > 0).toBeTruthy(); - expect(Array.isArray(diag.images)).toBeTruthy(); - - expect(diag.info).toBeTruthy(); - - expect(diag.networks).toBeTruthy(); - expect(diag.networks.length > 0).toBeTruthy(); - expect(Array.isArray(diag.networks)).toBeTruthy(); - - expect(diag.version).toBeTruthy(); - - expect(diag.volumes).toBeTruthy(); - expect(diag.volumes.Volumes).toBeTruthy(); - expect(Array.isArray(diag.volumes.Volumes)).toBeTruthy(); - } - - { - const badSocketPath = "/some-non-existent-path/to-make-it-trip-up/"; - try { - await Containers.getDiagnostics({ - logLevel: "TRACE", - // pass in an incorrect value for the port so that it fails for sure - dockerodeOptions: { - port: 9999, - socketPath: badSocketPath, - }, - }); - fail(Containers.getDiagnostics); - } catch (ex: unknown) { - expect(ex).toBeTruthy(); - const connectEN = "connect ENOENT "; - const fullBadPath = connectEN.concat(badSocketPath); - expect(ex).toHaveProperty(["cause", "message"], fullBadPath); - } - } - }); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/corda/corda-test-ledger/corda-test-ledger-constructor.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/corda/corda-test-ledger/corda-test-ledger-constructor.test.ts deleted file mode 100644 index 2b67058cf2..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/corda/corda-test-ledger/corda-test-ledger-constructor.test.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { CordaTestLedger } from "../../../../../main/typescript/public-api"; -import "jest-extended"; - -test("constructor throws if invalid input is provided", () => { - expect(CordaTestLedger).toBeTruthy(); - expect(() => new CordaTestLedger({ imageVersion: "nope" })).toThrow(Error); -}); - -test("constructor does not throw if valid input is provided", () => { - expect(CordaTestLedger).toBeTruthy(); - expect(() => new CordaTestLedger()).not.toThrow(); -}); - -test("starts/stops/destroys a docker container", async () => { - const cordaTestLedger = new CordaTestLedger(); - expect(cordaTestLedger).toBeTruthy(); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/fabric/fabric-test-ledger-v1/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/fabric/fabric-test-ledger-v1/constructor-validates-options.test.ts deleted file mode 100644 index bff927923b..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/fabric/fabric-test-ledger-v1/constructor-validates-options.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -import test, { Test } from "tape"; -import { FabricTestLedgerV1 } from "../../../../../main/typescript/public-api"; - -test("FabricTestLedgerV1#constructor()", (t: Test) => { - t.ok(FabricTestLedgerV1, "Importing FabricTestLedgerV1 class OK"); - - t.throws( - () => - new FabricTestLedgerV1({ - imageVersion: "nope", - publishAllPorts: false, - }), - /"imageVersion" length must be at least 5 characters long/, - "throws if invalid imageVersion is provided OK", - ); - - t.throws( - () => - new FabricTestLedgerV1({ - imageName: "----", - publishAllPorts: false, - }), - /"imageName" with value (.*) fails to match the required pattern/, - "throws if empty string imageName is provided OK", - ); - - t.doesNotThrow( - () => new FabricTestLedgerV1({ publishAllPorts: false }), - "does not throw if valid input is provided OK", - ); - - t.end(); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/indy/indy-test-ledger/indy-test-ledger.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/indy/indy-test-ledger/indy-test-ledger.test.ts deleted file mode 100644 index b01295e2e8..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/indy/indy-test-ledger/indy-test-ledger.test.ts +++ /dev/null @@ -1,239 +0,0 @@ -/** - * Tests of Indy helper typescript setup class. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Ledger settings -const containerImageName = "ghcr.io/outsh/cactus-indy-all-in-one"; -const containerImageVersion = "0.1"; - -// For development on local sawtooth network -// 1. leaveLedgerRunning = true, useRunningLedger = false to run ledger and leave it running after test finishes. -// 2. leaveLedgerRunning = true, useRunningLedger = true to use that ledger in future runs. -const leaveLedgerRunning = false; -const useRunningLedger = false; - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import { - IndyTestLedger, - pruneDockerAllIfGithubAction, -} from "../../../../../main/typescript/index"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; - -import * as path from "node:path"; -import * as os from "node:os"; -import { rm } from "node:fs/promises"; -import "jest-extended"; -import { v4 as uuidv4 } from "uuid"; -import { - Agent, - DidsModule, - TypedArrayEncoder, - KeyType, -} from "@aries-framework/core"; -import { - IndyVdrIndyDidResolver, - IndyVdrModule, -} from "@aries-framework/indy-vdr"; -import { AskarModule } from "@aries-framework/askar"; -import { agentDependencies } from "@aries-framework/node"; -import { ariesAskar } from "@hyperledger/aries-askar-nodejs"; -import { indyVdr } from "@hyperledger/indy-vdr-nodejs"; - -const TEST_WALLET_PATH = path.join( - os.tmpdir(), - "indy-test-ledger.test-test-wallet", -); -const TEST_INDY_NAMESPACE = "cacti:test"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "indy-test-ledger.test", - level: testLogLevel, -}); - -/** - * Import endorser DID using it's seed. - * @warn If there's any endorser DID already in a wallet then it will be returned. New one (`seed`) will be ignored! - * - * @param agent Aries agent - * @param seed private DID seed - * - * @returns endorser fully-qualified DID - */ -async function importExistingIndyDidFromPrivateKey( - agent: Agent, - seed: string, -): Promise { - const [endorserDid] = await agent.dids.getCreatedDids({ method: "indy" }); - if (endorserDid) { - throw new Error("Endorser DID already present in a wallet"); - } - - const seedBuffer = TypedArrayEncoder.fromString(seed); - const key = await agent.wallet.createKey({ - keyType: KeyType.Ed25519, - privateKey: seedBuffer, - }); - - // did is first 16 bytes of public key encoded as base58 - const unqualifiedIndyDid = TypedArrayEncoder.toBase58( - key.publicKey.slice(0, 16), - ); - - const did = `did:indy:${TEST_INDY_NAMESPACE}:${unqualifiedIndyDid}`; - - await agent.dids.import({ - did, - }); - - return did; -} - -/** - * Main test suite - */ -describe("Indy Test Ledger checks", () => { - const walletName = uuidv4(); - let ledger: IndyTestLedger; - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - log.info("Start IndyTestLedger..."); - ledger = new IndyTestLedger({ - containerImageName, - containerImageVersion, - useRunningLedger, - emitContainerLogs: false, - logLevel: testLogLevel, - }); - log.debug("Indy image:", ledger.fullContainerImageName); - expect(ledger).toBeTruthy(); - - await ledger.start(); - }); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (ledger && !leaveLedgerRunning) { - log.info("Stop the indy ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - try { - await rm(TEST_WALLET_PATH, { - recursive: true, - force: true, - maxRetries: 5, - }); - log.info(`${TEST_WALLET_PATH} removed successfully.`); - } catch (error) { - log.warn(`${TEST_WALLET_PATH} could not be removed:`, error); - } - }); - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - /** - * Check if started container is still healthy. - */ - test("Started container is healthy", async () => { - const status = await ledger.getContainerStatus(); - expect(status).toEndWith("(healthy)"); - }); - - test("Can read pool_transactions_genesis file from a container", async () => { - const genesisObj = await ledger.readPoolTransactionsGenesis(); - const genesisTxList = genesisObj - .split("\n") - .filter((v: string) => v.trim()); // remove empty lines - expect(genesisTxList.length).toBeGreaterThan(0); - - for (const tx of genesisTxList) { - expect(tx).toBeTruthy(); - const parsedTx = JSON.parse(tx); - expect(parsedTx).toBeTruthy(); - const txData = parsedTx.txn.data.data; - expect(txData).toBeTruthy(); - expect(txData.node_ip).toBeTruthy(); - expect(txData.node_port).toBeTruthy(); - } - }); - - test("Can get valid IndyVdrPoolConfig", async () => { - const indyPoolConfig = await ledger.getIndyVdrPoolConfig(); - expect(indyPoolConfig).toBeTruthy(); - expect(indyPoolConfig.isProduction).toBeDefined(); - expect(indyPoolConfig.genesisTransactions).toBeTruthy(); - expect(indyPoolConfig.indyNamespace).toBeTruthy(); - expect(indyPoolConfig.connectOnStartup).toBeDefined(); - }); - - test("Indy agent can connect and resolve did on the pool", async () => { - const indyPoolConfig = - await ledger.getIndyVdrPoolConfig(TEST_INDY_NAMESPACE); - expect(indyPoolConfig).toBeTruthy(); - const agent = new Agent({ - config: { - label: walletName, - walletConfig: { - id: walletName, - key: walletName, - storage: { - type: "sqlite", - path: path.join(TEST_WALLET_PATH, "test-wallet.sqlite"), - }, - }, - }, - modules: { - indyVdr: new IndyVdrModule({ - indyVdr, - networks: [indyPoolConfig], - }), - dids: new DidsModule({ - resolvers: [new IndyVdrIndyDidResolver()], - }), - askar: new AskarModule({ ariesAskar }), - }, - dependencies: agentDependencies, - }); - expect(agent).toBeTruthy(); - - try { - await agent.initialize(); - expect(agent.isInitialized).toBeTrue(); - - await importExistingIndyDidFromPrivateKey( - agent, - ledger.getEndorserDidSeed(), - ); - const createdDids = await agent.dids.getCreatedDids(); - expect(createdDids.length).toBeGreaterThan(0); - } finally { - agent.shutdown(); - } - }); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha2-test-ledger/iroha2-test-ledger.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha2-test-ledger/iroha2-test-ledger.test.ts deleted file mode 100644 index 5554f86030..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha2-test-ledger/iroha2-test-ledger.test.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * Tests of Iroha V2 helper typescript setup class. - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -// Ledger settings -const containerImageName = "ghcr.io/hyperledger/cactus-iroha2-all-in-one"; -const containerImageVersion = "2023-07-29-f2bc772ee"; -const useRunningLedger = false; - -// Log settings -const testLogLevel: LogLevelDesc = "info"; - -import { - Iroha2TestLedger, - pruneDockerAllIfGithubAction, - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS, -} from "../../../../../main/typescript/index"; - -import { - LogLevelDesc, - LoggerProvider, - Logger, -} from "@hyperledger/cactus-common"; - -import "jest-extended"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "iroha2-test-ledger.test", - level: testLogLevel, -}); - -/** - * Main test suite - */ -describe("Iroha V2 Test Ledger checks", () => { - let ledger: Iroha2TestLedger; - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - log.info("Start Iroha2TestLedger..."); - ledger = new Iroha2TestLedger({ - containerImageName, - containerImageVersion, - useRunningLedger, - emitContainerLogs: false, - logLevel: testLogLevel, - }); - log.debug("IrohaV2 image:", ledger.fullContainerImageName); - expect(ledger).toBeTruthy(); - - await ledger.start(); - }); - - afterAll(async () => { - log.info("FINISHING THE TESTS"); - - if (ledger) { - log.info("Stop the iroha2 ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - }); - - ////////////////////////////////// - // Tests - ////////////////////////////////// - - /** - * Check if started container is still healthy. - */ - test("Started container is healthy", async () => { - const status = await ledger.getContainerStatus(); - expect(status).toEndWith("(healthy)"); - }); - - /** - * Check handling of default constructor options. - */ - test("Starting without options sets default values correctly", async () => { - const defaultLedger = new Iroha2TestLedger(); - - expect(defaultLedger.containerImageName).toEqual( - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.containerImageName, - ); - expect(defaultLedger.containerImageVersion).toEqual( - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.containerImageVersion, - ); - expect(defaultLedger.logLevel).toEqual( - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.logLevel, - ); - expect(defaultLedger.emitContainerLogs).toEqual( - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.emitContainerLogs, - ); - expect(defaultLedger.envVars).toEqual( - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.envVars, - ); - expect(defaultLedger.useRunningLedger).toEqual( - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.useRunningLedger, - ); - }); - - /** - * Check handling of default boolean constructor options. - */ - test("Constructor handles default boolean values correctly", async () => { - // true flags - const trueOptsLedger = new Iroha2TestLedger({ - emitContainerLogs: true, - useRunningLedger: true, - }); - expect(trueOptsLedger.emitContainerLogs).toEqual(true); - expect(trueOptsLedger.useRunningLedger).toEqual(true); - - // false flags - const falseOptsLedger = new Iroha2TestLedger({ - emitContainerLogs: false, - useRunningLedger: false, - }); - expect(falseOptsLedger.emitContainerLogs).toEqual(false); - expect(falseOptsLedger.useRunningLedger).toEqual(false); - - // undefined flags - const undefinedOptsLedger = new Iroha2TestLedger({ - emitContainerLogs: undefined, - useRunningLedger: undefined, - }); - expect(undefinedOptsLedger.emitContainerLogs).toEqual( - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.emitContainerLogs, - ); - expect(undefinedOptsLedger.useRunningLedger).toEqual( - IROHA2_TEST_LEDGER_DEFAULT_OPTIONS.useRunningLedger, - ); - }); - - /** - * Check response of `getClientConfig()` - */ - test("getClientConfig returns correct data", async () => { - const config = await ledger.getClientConfig(); - log.info("Received client config:", JSON.stringify(config)); - expect(config).toBeTruthy(); - expect(config.PUBLIC_KEY).toBeTruthy(); - expect(config.PRIVATE_KEY.digest_function).toBeTruthy(); - expect(config.PRIVATE_KEY.payload).toBeTruthy(); - expect(config.ACCOUNT_ID).toBeTruthy(); - expect(config.BASIC_AUTH.web_login).toBeTruthy(); - expect(config.BASIC_AUTH.password).toBeTruthy(); - expect(config.TORII_API_URL).toBeTruthy(); - expect(config.TORII_TELEMETRY_URL).toBeTruthy(); - expect(config.TRANSACTION_TIME_TO_LIVE_MS).toBeDefined(); - expect(config.TRANSACTION_STATUS_TIMEOUT_MS).toBeDefined(); - expect(config.TRANSACTION_LIMITS.max_instruction_number).toBeDefined(); - expect(config.TRANSACTION_LIMITS.max_wasm_size_bytes).toBeDefined(); - expect(config.ADD_TRANSACTION_NONCE).toBeDefined(); - }); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts deleted file mode 100644 index 217fbf6c7e..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts +++ /dev/null @@ -1,46 +0,0 @@ -import "jest-extended"; -import isPortReachable from "is-port-reachable"; -import { Container } from "dockerode"; -import { PostgresTestContainer } from "../../../../../main/typescript/public-api"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -const logLevel: LogLevelDesc = "INFO"; - -describe("PostgresTestContainer", () => { - const postgresTestContainer = new PostgresTestContainer({ logLevel }); - let postgresContainer: Container; - - beforeAll(async () => { - postgresContainer = await postgresTestContainer.start(); - }); - - afterAll(async () => { - await postgresTestContainer.stop(); - }); - - it("constructor throws if invalid input is provided", () => { - expect(PostgresTestContainer).toBeTruthy(); - expect( - () => new PostgresTestContainer({ imageVersion: "nope" }), - ).toThrowError(); - }); - - it("constructor does not throw if valid input is provided", () => { - expect(PostgresTestContainer).toBeTruthy(); - expect(() => new PostgresTestContainer()).not.toThrow(); - }); - - it("starts/stops/destroys a docker container", async () => { - expect(postgresContainer).toBeTruthy(); - const ip: string = await postgresTestContainer.getContainerIpAddress(); - expect(ip).toBeString(); - expect(ip).not.toBeEmpty(); - - const hostPort: number = await postgresTestContainer.getPostgresPort(); - expect(hostPort).toBeTruthy(); - expect(hostPort).toBeFinite(); - - const reachabilityCheck = isPortReachable(hostPort, { host: "127.0.0.1" }); - expect(reachabilityCheck).resolves.toBeTrue(); - }); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/stellar/stellar-test-ledger/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/stellar/stellar-test-ledger/constructor-validates-options.test.ts deleted file mode 100644 index 69596067dd..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/stellar/stellar-test-ledger/constructor-validates-options.test.ts +++ /dev/null @@ -1,48 +0,0 @@ -import "jest-extended"; -import { Container } from "dockerode"; -import { StellarTestLedger } from "../../../../../main/typescript/public-api"; -import axios from "axios"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { SupportedImageVersions } from "../../../../../main/typescript/stellar/supported-image-versions"; - -describe("StellarTestLEdger", () => { - const logLevel: LogLevelDesc = "TRACE"; - const stellarTestLedger = new StellarTestLedger({ logLevel }); - - afterAll(async () => { - await stellarTestLedger.stop(); - await stellarTestLedger.destroy(); - }); - - test("constructor throws if invalid input is provided", () => { - expect(StellarTestLedger).toBeDefined(); - - expect(() => { - new StellarTestLedger({ - containerImageVersion: "nope" as unknown as SupportedImageVersions, - }); - }).toThrow(); - }); - - test("constructor does not throw if valid input is provided", async () => { - expect(StellarTestLedger).toBeDefined(); - expect(() => { - new StellarTestLedger(); - }).not.toThrow(); - }); - - test("starts/stops/destroys a valid docker container", async () => { - const container: Container = await stellarTestLedger.start(); - expect(container).toBeDefined(); - - const networkConfig = await stellarTestLedger.getNetworkConfiguration(); - expect(networkConfig).toBeDefined(); - expect(networkConfig.horizonUrl).toBeDefined(); - expect(networkConfig.networkPassphrase).toBeDefined(); - expect(networkConfig.rpcUrl).toBeDefined(); - expect(networkConfig.friendbotUrl).toBeDefined(); - - const horizonResponse = await axios.get(networkConfig.horizonUrl as string); - expect(horizonResponse.status).toBe(200); - }); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/substrate/substrate-test-ledger-constructor.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/substrate/substrate-test-ledger-constructor.test.ts deleted file mode 100644 index f2da95a35a..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/substrate/substrate-test-ledger-constructor.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { SubstrateTestLedger } from "../../../../main/typescript/substrate-test-ledger/substrate-test-ledger"; -import { pruneDockerAllIfGithubAction } from "../../../../main/typescript/github-actions/prune-docker-all-if-github-action"; - -const testCase = "Instantiate plugin"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const options = { - publishAllPorts: true, - logLevel: logLevel, - emitContainerLogs: true, - }; - - const ledger = new SubstrateTestLedger(options); - const tearDown = async () => { - await ledger.stop(); - await pruneDockerAllIfGithubAction({ logLevel }); - }; - - test.onFinish(tearDown); - await ledger.start(); - t.ok(ledger); - - t.end(); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/substrate/substrate-test-ledger-multiple-concurrent.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/substrate/substrate-test-ledger-multiple-concurrent.test.ts deleted file mode 100644 index f89eba6197..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/integration/substrate/substrate-test-ledger-multiple-concurrent.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { SubstrateTestLedger } from "../../../../main/typescript/substrate-test-ledger/substrate-test-ledger"; -import { pruneDockerAllIfGithubAction } from "../../../../main/typescript/github-actions/prune-docker-all-if-github-action"; - -const testCase = "Runs multiple test ledgers concurrently"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const options = { - publishAllPorts: true, - logLevel: logLevel, - emitContainerLogs: true, - envVars: new Map([ - ["WS_PORT", "9945"], - ["PORT", "9944"], - ["DOCKER_PORT", "9945"], - ]), - }; - - const ledger = new SubstrateTestLedger(options); - - const optionsSecondLedger = { - publishAllPorts: true, - logLevel: logLevel, - emitContainerLogs: true, - envVars: new Map([ - ["WS_PORT", "9947"], - ["PORT", "9946"], - ["DOCKER_PORT", "9947"], - ]), - }; - - const secondLedger = new SubstrateTestLedger(optionsSecondLedger); - - const tearDown = async () => { - await ledger.stop(); - await secondLedger.stop(); - await pruneDockerAllIfGithubAction({ logLevel }); - }; - - test.onFinish(tearDown); - await ledger.start(); - await secondLedger.start(); - t.ok(ledger); - t.ok(secondLedger); - t.end(); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/unit/api-surface.test.ts b/packages/cactus-test-tooling/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index a65ea58247..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/packages/cactus-test-tooling/src/test/typescript/unit/common/env-to-docker-conversions.test.ts b/packages/cactus-test-tooling/src/test/typescript/unit/common/env-to-docker-conversions.test.ts deleted file mode 100644 index 36a97b64af..0000000000 --- a/packages/cactus-test-tooling/src/test/typescript/unit/common/env-to-docker-conversions.test.ts +++ /dev/null @@ -1,50 +0,0 @@ -import "jest-extended"; - -import { envNodeToDocker } from "../../../../main/typescript/public-api"; -import { envMapToDocker } from "../../../../main/typescript/public-api"; -import { envNodeToMap } from "../../../../main/typescript/public-api"; - -describe("test-tooling#envMapToDocker()", () => { - test("Empty Map", () => { - expect(envMapToDocker(new Map())).toBeArrayOfSize(0); - }); - - test("Non-empty Map", () => { - const data = new Map(); - data.set("X", "Y"); - const out = envMapToDocker(data); - expect(out).toBeArrayOfSize(1); - expect(out[0]).toEqual("X=Y"); - }); -}); - -describe("test-tooling#envNodeToDocker()", () => { - test("Empty POJO", () => { - expect(envNodeToDocker({})).toBeArrayOfSize(0); - }); - - test("Non-empty POJO", () => { - const data = { X: "Y" }; - const out = envNodeToDocker(data); - expect(out).toBeArrayOfSize(1); - expect(out[0]).toEqual("X=Y"); - }); -}); - -describe("test-tooling#envNodeToMap()", () => { - test("Empty POJO", () => { - const out = envNodeToMap({}); - expect(out).toBeTruthy(); - expect(out).toBeInstanceOf(Map); - expect(out.size).toStrictEqual(0); - }); - - test("Non-empty POJO", () => { - const data = { X: "Y" }; - const out = envNodeToMap(data); - expect(out).toBeTruthy(); - expect(out).toBeInstanceOf(Map); - expect(out.size).toStrictEqual(1); - expect(out.get("X")).toStrictEqual("Y"); - }); -}); diff --git a/packages/cactus-test-tooling/tsconfig.json b/packages/cactus-test-tooling/tsconfig.json deleted file mode 100644 index b3b6c88671..0000000000 --- a/packages/cactus-test-tooling/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-tooling.tsbuildinfo" - }, - "include": [ - "./src" - ], - "references": [ - { - "path": "../cactus-common/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-test-verifier-client/CHANGELOG.md b/packages/cactus-test-verifier-client/CHANGELOG.md deleted file mode 100644 index 57d40a4c4a..0000000000 --- a/packages/cactus-test-verifier-client/CHANGELOG.md +++ /dev/null @@ -1,85 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-test-verifier-client - -# [2.0.0-rc.6](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-verifier-client - -# [2.0.0-rc.5](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-test-verifier-client - -# [2.0.0-rc.4](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -**Note:** Version bump only for package @hyperledger/cactus-test-verifier-client - -# [2.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -### Build System - -* bump uuid@10.0.0 fs-extra@11.2.0 @bufbuild/protobuf@1.10.0 ([9970352](https://github.com/hyperledger/cactus/commit/997035216694fe335215b8a3586488ac8c12447f)) - -### BREAKING CHANGES - -* Renamed classes to fix typos in their name: `PluginFactoryPersistanceFabric` -This is being done in this pull request because for some reason (that I still don't understand) -the spell checker started failing on these only in the context of this pull request. -The typos were present on the main branch already somehow having passed spellchecking earlier -and every other time since then. - -And also -- prom-clien@15.1.3 -- del-cli@5.1.0 -- cspell@8.10.4 -- del-cli@5.1.0 - -Quality of life improvements and also hoping to get rid of a few of the -vulnerable dependency versions we have in the codebase according to -dependabot. - -More similar changes are coming in with further upgrades but I want to -avoid making bigger changes in one go so that it's easier to hunt down -bugs later if something only gets discovered after we've merged a bunch -of these. - -Signed-off-by: Peter Somogyvari - -# [2.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -### Bug Fixes - -* **deps:** fix batch of missing production dependencies v2.0.0-rc.1 ([51d64ee](https://github.com/hyperledger/cactus/commit/51d64eead473d928086eb53adf0850c3b43cbda9)), closes [#3344](https://github.com/hyperledger/cactus/issues/3344) - -# [2.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Bug Fixes - -* **deps:** bulk add missing dependencies - 2023-11-02 ([8addb01](https://github.com/hyperledger/cactus/commit/8addb018b6d124d54d9d948bbaeba6ea33b67153)), closes [#2857](https://github.com/hyperledger/cactus/issues/2857) - -### Features - -* **indy-test-ledger:** add helper class for indy ledger ([8c746c3](https://github.com/hyperledger/cactus/commit/8c746c331564e76e8619c5c6987cd9380ce4a13f)), closes [#2861](https://github.com/hyperledger/cactus/issues/2861) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cactus/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cactus/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cactus/issues/2216) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-test-verifier-client - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-test-verifier-client - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -**Note:** Version bump only for package @hyperledger/cactus-test-verifier-client diff --git a/packages/cactus-test-verifier-client/README.md b/packages/cactus-test-verifier-client/README.md deleted file mode 100644 index ff02083ef2..0000000000 --- a/packages/cactus-test-verifier-client/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# `@hyperledger/cactus-test-verifier-client` - -## Usage - -### Stress test -- Used for manual leak analysis. -- The test will execute with exposed GC and disabled optimizations. -- Results will be written to `./integration-with-verifier-client-stress.log` for further analysis (in the `cwd` where you execute the command). Columns (in order): - - `rss` - - `heapTotal` - - `heapUsed` - - `external` - - `arrayBuffers` -- Report lines: - - Initial memory usage (before running the tests). - - Usage after running the stress test. - - Usage after freeing the verifier client. -- You can uncomment the `checkMemory` call in test file for more step-by-step report, but it will make the test run longer. -- To investigate with the node debugger use `stress-test-inspect` script. - -``` bash -# Make sure the build was successful before executing these commands. - -# Execute stress test -yarn run stress-test - -# Execute stress test with debugger inspect break -yarn run stress-test-inspect -``` - -## FAQ - -### **What is a dedicated test package for?** - -This is a dedicated test package meaning that it verifies the integration between two packages that are somehow dependent on each other and therefore these tests cannot be added properly in the child package due to circular dependency issues and it would not be fitting to add it in the parent because the child package's tests should not be held by the parent as a matter of principle. diff --git a/packages/cactus-test-verifier-client/package.json b/packages/cactus-test-verifier-client/package.json deleted file mode 100644 index 3081910c8a..0000000000 --- a/packages/cactus-test-verifier-client/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "@hyperledger/cactus-test-verifier-client", - "version": "2.0.0", - "description": "Integration and stress tests for the verifier client.", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cactus#readme", - "bugs": { - "url": "https://github.com/hyperledger/cactus/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cactus.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "stress-test": "node --expose-gc --no-opt dist/lib/main/typescript/verifier-with-go-eth-stress-check.js", - "stress-test-inspect": "node --expose-gc --inspect-brk --no-opt dist/lib/main/typescript/verifier-with-go-eth-stress-check.js" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0", - "@hyperledger/cactus-test-geth-ledger": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@hyperledger/cactus-verifier-client": "2.0.0", - "body-parser": "1.20.3", - "express": "4.21.0", - "log4js": "6.4.1", - "socket.io": "4.6.2", - "uuid": "10.0.0", - "web3": "1.7.3", - "web3-core": "1.7.3" - }, - "devDependencies": { - "@types/body-parser": "1.19.4", - "@types/express": "5.0.0", - "@types/node": "18.11.9", - "@types/uuid": "10.0.0", - "web3-eth-accounts": "4.0.3" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "watch": {} -} diff --git a/packages/cactus-test-verifier-client/src/main/typescript/index.ts b/packages/cactus-test-verifier-client/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/packages/cactus-test-verifier-client/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-test-verifier-client/src/main/typescript/index.web.ts b/packages/cactus-test-verifier-client/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/packages/cactus-test-verifier-client/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/packages/cactus-test-verifier-client/src/main/typescript/public-api.ts b/packages/cactus-test-verifier-client/src/main/typescript/public-api.ts deleted file mode 100755 index ea1bc5d462..0000000000 --- a/packages/cactus-test-verifier-client/src/main/typescript/public-api.ts +++ /dev/null @@ -1 +0,0 @@ -export { runStressTest } from "./verifier-with-go-eth-stress-check"; diff --git a/packages/cactus-test-verifier-client/src/main/typescript/verifier-with-go-eth-stress-check.ts b/packages/cactus-test-verifier-client/src/main/typescript/verifier-with-go-eth-stress-check.ts deleted file mode 100644 index cff6be76ce..0000000000 --- a/packages/cactus-test-verifier-client/src/main/typescript/verifier-with-go-eth-stress-check.ts +++ /dev/null @@ -1,225 +0,0 @@ -/** - * Stress test to detect possible memory leaks in cactus-verifier-client. - * Repeated requests are sent to ethereum validator (packages/cactus-plugin-ledger-connector-ethereum). - * Run command: - * node --expose-gc --no-opt dist/main/typescript/verifier-with-go-eth-stress-check.js - */ - -const STRESS_LOG_FILENAME = "integration-with-verifier-client-stress.log"; -const testLogLevel: LogLevelDesc = "info"; -const sutLogLevel: LogLevelDesc = "info"; - -// Ledger settings -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - LogLevelDesc, - LoggerProvider, - Logger, - IListenOptions, - Servers, -} from "@hyperledger/cactus-common"; -import { Constants } from "@hyperledger/cactus-core-api"; -import { GethTestLedger } from "@hyperledger/cactus-test-geth-ledger"; -import { - EthereumApiClient, - PluginLedgerConnectorEthereum, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { Verifier, VerifierFactory } from "@hyperledger/cactus-verifier-client"; - -import http from "http"; -import express from "express"; -import bodyParser from "body-parser"; -import { v4 as uuidV4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import type { Web3Account } from "web3-eth-accounts"; -import { appendFileSync, writeFileSync } from "node:fs"; -import { AddressInfo } from "node:net"; - -// Logger setup -const log: Logger = LoggerProvider.getOrCreate({ - label: "integration-with-verifier-client-stress.test", - level: testLogLevel, -}); - -let ledger: GethTestLedger; -let connector: PluginLedgerConnectorEthereum; -let verifier: Verifier; -let constTestAcc: Web3Account; -const constTestAccBalance = 5 * 1000000; - -const expressApp = express(); -expressApp.use(bodyParser.json({ limit: "250mb" })); -const server = http.createServer(expressApp); -const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, -}); -// Add custom replacer to handle bigint responses correctly -expressApp.set("json replacer", (_key: string, value: bigint | unknown) => { - if (typeof value === "bigint") { - return value.toString(); - } - return value; -}); - -/** - * Check current memory usage, log it to the screen and write it to a file for future analysis. - */ -function checkMemory(): void { - if (global.gc) { - log.info("Run GC"); - global.gc(); - } else { - throw new Error("Run with --expose-gc"); - } - - const memoryUsage = process.memoryUsage(); - const entry = [ - memoryUsage.rss, - memoryUsage.heapTotal, - memoryUsage.heapUsed, - memoryUsage.external, - memoryUsage.arrayBuffers, - ].join(", "); - - log.warn(entry); - appendFileSync(STRESS_LOG_FILENAME, entry + "\n"); -} - -/** - * Startup the ledger and cactus connector - */ -async function setupEnvironment(): Promise { - log.info("Prune Docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - - log.info(`Start Ledger ${containerImageName}:${containerImageVersion}...`); - ledger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ledger.start(); - const ledgerRpcUrl = await ledger.getRpcApiWebSocketHost(); - log.info(`Ledger started, RPC: ${ledgerRpcUrl}`); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiHost = `http://${address}:${port}`; - connector = new PluginLedgerConnectorEthereum({ - instanceId: uuidV4(), - rpcApiWsHost: ledgerRpcUrl, - logLevel: testLogLevel, - pluginRegistry: new PluginRegistry({ plugins: [] }), - }); - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - - // Create Test Account - constTestAcc = await ledger.createEthTestAccount(constTestAccBalance); - - // Create Verifier - const ethereumValidatorId = "eth_openapi_connector"; - const verifierFactory = new VerifierFactory( - [ - { - validatorID: ethereumValidatorId, - validatorType: "ETH_1X", - basePath: apiHost, - logLevel: sutLogLevel, - }, - ], - sutLogLevel, - ); - - verifier = await verifierFactory.getVerifier(ethereumValidatorId, "ETH_1X"); - - // Clear the stress log file - writeFileSync(STRESS_LOG_FILENAME, ""); -} - -/** - * Cleanup the ledger and cactus connector - */ -async function cleanupEnvironment(): Promise { - if (server) { - log.info("Shutdown the connector server..."); - await Servers.shutdown(server); - } - - if (connector) { - log.info("Shutdown the connector..."); - await connector.shutdown(); - } - - if (ledger) { - log.info("Stop and destroy the test ledger..."); - await ledger.stop(); - await ledger.destroy(); - } - - // Report after connector close - await new Promise((resolve) => setTimeout(resolve, 2000)); - checkMemory(); - - log.info("Prune docker..."); - await pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); -} - -/** - * Stress test body - */ -async function executeTest(): Promise { - // getNumericBalance input - const getBalanceMethod = { type: "web3Eth", command: "getBalance" }; - const getBalanceArgs = { - args: [constTestAcc.address], - }; - - // Initial memory report - await new Promise((resolve) => setTimeout(resolve, 5000)); - checkMemory(); - - // Test loop - const startTime = Date.now(); - let count = 10000; - while (count-- > 0) { - try { - await verifier.sendSyncRequest({}, getBalanceMethod, getBalanceArgs); - //checkMemory(); - } catch (error) { - log.error(error); - } - } - const endTime = Date.now(); - log.info(`Execution time: ${(endTime - startTime) / 1000} seconds.`); - - // Final report - await new Promise((resolve) => setTimeout(resolve, 5000)); - checkMemory(); -} - -/** - * Main logic of the test - */ -export async function runStressTest(): Promise { - await setupEnvironment(); - try { - await executeTest(); - } catch (error) { - log.error("Stress test failed -", error); - } finally { - log.info("Cleanup the environment"); - await cleanupEnvironment(); - } -} - -// Entry point -runStressTest(); diff --git a/packages/cactus-test-verifier-client/tsconfig.json b/packages/cactus-test-verifier-client/tsconfig.json deleted file mode 100644 index ee534b3a6d..0000000000 --- a/packages/cactus-test-verifier-client/tsconfig.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib", - "declarationDir": "dist/lib", - "resolveJsonModule": true, - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-test-verifier-client.tsbuildinfo" - }, - "include": [ - "./src" - ], - "references": [ - - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-ethereum/tsconfig.json" - }, - { - "path": "../cactus-test-geth-ledger/tsconfig.json" - }, - { - "path": "../cactus-test-tooling/tsconfig.json" - }, - { - "path": "../cactus-verifier-client/tsconfig.json" - } - ] -} \ No newline at end of file diff --git a/packages/cactus-verifier-client/CHANGELOG.md b/packages/cactus-verifier-client/CHANGELOG.md deleted file mode 100644 index a3661981a8..0000000000 --- a/packages/cactus-verifier-client/CHANGELOG.md +++ /dev/null @@ -1,100 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [2.0.0](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.7...v2.0.0) (2024-10-15) - -**Note:** Version bump only for package @hyperledger/cactus-verifier-client - -# [2.0.0-rc.6](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-09-30) - -**Note:** Version bump only for package @hyperledger/cactus-verifier-client - -# [2.0.0-rc.5](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-09-30) - -### Features - -* **cmd-socketio-server:** move to examples as deprecated ([4de8069](https://github.com/hyperledger/cactus/commit/4de806974f0066359cca422561042a55173d3655)) - -# [2.0.0-rc.4](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-09-08) - -### Features - -* **go-ethereum-socketio:** remove deprecated connector ([56dd9f8](https://github.com/hyperledger/cactus/commit/56dd9f8aa72883aeb5bfcf0303b0af6e84daad7a)), closes [#3155](https://github.com/hyperledger/cactus/issues/3155) - -# [2.0.0-rc.3](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-07-21) - -**Note:** Version bump only for package @hyperledger/cactus-verifier-client - -# [2.0.0-rc.2](https://github.com/hyperledger/cactus/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-07-03) - -**Note:** Version bump only for package @hyperledger/cactus-verifier-client - -# [2.0.0-rc.1](https://github.com/hyperledger/cactus/compare/v2.0.0-alpha.2...v2.0.0-rc.1) (2024-06-14) - -### Features - -* **cactus-plugin-ledger-connector-fabric-socketio:** remove fabric-socketio connector ([704e201](https://github.com/hyperledger/cactus/commit/704e201d6bd6bf7a38f0de7da60723118e18cea7)), closes [#2644](https://github.com/hyperledger/cactus/issues/2644) -* **cactus-plugin-ledger-connector-iroha:** remove deprecated iroha connector ([fa27fde](https://github.com/hyperledger/cactus/commit/fa27fde9a28f83ff29964693be656dc107046517)), closes [#3159](https://github.com/hyperledger/cactus/issues/3159) [#3155](https://github.com/hyperledger/cactus/issues/3155) -* **cactus-plugin-ledger-connector-sawtooth:** add new connector plugin ([e379504](https://github.com/hyperledger/cactus/commit/e37950403636a3fbc378fc7462b886294e6c7923)) - -# [2.0.0-alpha.2](https://github.com/hyperledger/cactus/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-09-27) - -### Bug Fixes - -* use common conventions: tsconfig.json, package.json ([50f5c02](https://github.com/hyperledger/cactus/commit/50f5c02190ba28b77492c09e81f5d5ba6578e862)), closes [#2216](https://github.com/hyperledger/cactus/issues/2216) - -### Features - -* **cactus-plugin-ledger-connector-ethereum:** add new connector plugin ([f8a2131](https://github.com/hyperledger/cactus/commit/f8a2131e9fc0ea05c1c1c8863489a43a74f019ae)), closes [#2534](https://github.com/hyperledger/cactus/issues/2534) - -# [2.0.0-alpha.1](https://github.com/hyperledger/cacti/compare/v2.0.0-alpha-prerelease...v2.0.0-alpha.1) (2023-05-19) - -**Note:** Version bump only for package @hyperledger/cactus-verifier-client - -# [2.0.0-alpha-prerelease](https://github.com/hyperledger/cacti/compare/v1.2.0...v2.0.0-alpha-prerelease) (2023-05-11) - -**Note:** Version bump only for package @hyperledger/cactus-verifier-client - -# [1.2.0](https://github.com/hyperledger/cactus/compare/v1.1.3...v1.2.0) (2023-03-28) - -### Features - -* **connector-fabric:** add WatchBlocks endpoint ([6c62de4](https://github.com/hyperledger/cactus/commit/6c62de4dfb360536fc67a03cf10602e311c08a9d)), closes [#2118](https://github.com/hyperledger/cactus/issues/2118) -* **connector-iroha2:** add support for Iroha V2 ([db78969](https://github.com/hyperledger/cactus/commit/db789690b64d68b3dda70578127338bdc02e92bd)), closes [#2138](https://github.com/hyperledger/cactus/issues/2138) [#2140](https://github.com/hyperledger/cactus/issues/2140) - -## [1.1.3](https://github.com/hyperledger/cactus/compare/v1.1.2...v1.1.3) (2022-12-08) - -### Bug Fixes - -* **connector-iroha:** fix review comments and smaller issues ([b2742e8](https://github.com/hyperledger/cactus/commit/b2742e8f6512f9804c6b4a943947b5bbe90785f0)), closes [PR#2048](https://github.com/PR/issues/2048) - -### Features - -* monitoring, sync and async requests ([47da608](https://github.com/hyperledger/cactus/commit/47da608d378f5d48ca78b3d388b1c67da4c7aaf3)), closes [#1941](https://github.com/hyperledger/cactus/issues/1941) - -## [1.1.2](https://github.com/hyperledger/cactus/compare/v1.1.1...v1.1.2) (2022-11-11) - -**Note:** Version bump only for package @hyperledger/cactus-verifier-client - -## [1.1.1](https://github.com/hyperledger/cactus/compare/v1.1.0...v1.1.1) (2022-11-03) - -**Note:** Version bump only for package @hyperledger/cactus-verifier-client - -# [1.1.0](https://github.com/hyperledger/cactus/compare/v1.0.0...v1.1.0) (2022-10-17) - -### Bug Fixes - -* **cactus-verifier-client:** update supported ledgers in readme ([84f3bae](https://github.com/hyperledger/cactus/commit/84f3bae982167d2d8c55ab44579f99dc5ee09c9f)) - -### Features - -* **corda4:** implement monitoring of state changes ([865ec2f](https://github.com/hyperledger/cactus/commit/865ec2f097df73e4907d812b18c2acf25e7896b1)), closes [#1610](https://github.com/hyperledger/cactus/issues/1610) -* **quorum-connector:** implement validator interface on go-quorum-connector ([8d36bea](https://github.com/hyperledger/cactus/commit/8d36bea5146a544a2cb4615ec7291a1b425e568f)), closes [#1604](https://github.com/hyperledger/cactus/issues/1604) - -# [1.0.0](https://github.com/hyperledger/cactus/compare/v1.0.0-rc.3...v1.0.0) (2022-03-16) - -### Features - -* **cactus-api-client:** common verifier-factory ([2f70a64](https://github.com/hyperledger/cactus/commit/2f70a6473f30446859427335f2d3602bddca636d)), closes [#1878](https://github.com/hyperledger/cactus/issues/1878) diff --git a/packages/cactus-verifier-client/README.md b/packages/cactus-verifier-client/README.md deleted file mode 100644 index 80bde0bb0b..0000000000 --- a/packages/cactus-verifier-client/README.md +++ /dev/null @@ -1,105 +0,0 @@ -# `@hyperledger/cactus-verifier-client` - -## Summary - -This package provides `Verifier` and `VerifierFactory` components that can be used to communicate with compatible Cactus ledger connectors (validators) through single, unified interface. - -### Supported ledger connectors - -| validatorType | cactus ledger connector plugin | -| -------------------- | --------------------------------------- | -| BESU_1X
BESU_2X | cactus-plugin-ledger-connector-besu | -| ETH_1X | cactus-plugin-ledger-connector-ethereum | -| CORDA_4X | cactus-plugin-ledger-connector-corda | -| IROHA_2X | cactus-plugin-ledger-connector-iroha2 | -| FABRIC_2X | cactus-plugin-ledger-connector-fabric | -| SAWTOOTH_1X | cactus-plugin-ledger-connector-sawtooth | - -## VerifierFactory - -- Used to create single verifier per ledger based on pre-defined configuration. -- See [verifier-factory.test.ts](../cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts) for unit tests. -- **In order to use `VerifierFactory` or `getValidatorApiClient` you must manually install the connector package that provides given ledger ApiClient!** - - Example: if your project uses ethereum and corda validators, you must install `cactus-plugin-ledger-connector-ethereum` and `cactus-plugin-ledger-connector-corda `. See table above for validator to package mapping. - -### Usage - -```typescript -import { - VerifierFactory, - VerifierFactoryConfig, -} from "@hyperledger/cactus-verifier-client"; - -// Create VerifierFactory configuration that should describe all validators we want to connect to. -// This can be read from a file or typed manually, the config is a superset of cactus-common-example-server ledger plugin config. -const ledgerPluginInfo: VerifierFactoryConfig = [ - { - validatorID: "besu_openapi_connector", // required - validatorType: "BESU_2X", // required - see table above for supported validator types - basePath: "https://localhost:9999", // besu specific config - }, -]; - -// Instantiate single VerifierFactory from given config in your Bussiness Logic Plugin. -const verifierFactory = new VerifierFactory(ledgerPluginInfo); - -// Get ApiClient to validator with ID "myBesuValidatorId" -// Second argument will determine type of returned Verifier (BesuApiClient in this case) -const myBesu: Verifier = await sut.getVerifier("myBesuValidatorId", "BESU_1X")) - -// Second argument can be ignored for backward-compatibility -// It will return Verifier<(union of all supported ApiClients)> -const client: Verifier = sut.getVerifier(validatorId); -``` - -## Verifier - -- Common interface to all supported connector plugins. -- See [verifier.test.ts](../cactus-verifier-client/src/test/typescript/unit/verifier.test.ts) for unit tests. -- See [verifier-integration-with-openapi-connectors.test.ts](../cactus-test-api-client/src/test/typescript/integration/verifier-integration-with-openapi-connectors.test.ts) for integration test with Besu ledger connector. - -### Construction - -```typescript -// Use VerifierFactory to get an instance of ledger connector Verifier -const myBesu: Verifier = sut.getVerifier("myBesuValidatorId", "BESU_1X")) - -// Or create it manually from ledger ApiClient -const besuApiClientOptions = new BesuApiClientOptions({ - basePath: "https://localhost:9999", -}); -const apiClient = new BesuApiClient(besuApiClientOptions); -const myBesu: Verifier = new Verifier("besu_openapi_connector", apiClient, "info"); -``` - -### Interface - -- Interface is defined in [cactus-core-api package](../cactus-core-api/src/main/typescript/client/i-verifier.ts). - -```typescript -export interface IVerifier { - // Immediately sends request to the validator, doesn't report any error or responses. - sendAsyncRequest( - contract: Record, - method: Record, - args: Record, - ): Promise; - - // Sends request to be executed on the ledger, watches and reports any error and the response from a ledger. - sendSyncRequest( - contract: Record, - method: Record, - args: Record, - ): Promise; - - // Start monitoring for new events / blocks from underlying ledger. - startMonitor( - id: string, - options: Record, - eventListener: IVerifierEventListener, - ): void; - - // Stops the monitor for specified app, removes it's subscription from internal storage. - stopMonitor(id?: string): void; -} -``` diff --git a/packages/cactus-verifier-client/package.json b/packages/cactus-verifier-client/package.json deleted file mode 100644 index e5da9e0599..0000000000 --- a/packages/cactus-verifier-client/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "name": "@hyperledger/cactus-verifier-client", - "version": "2.0.0", - "description": "Verifier cactus client library to communicate with validators through socket.io", - "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", - "Distributed Ledger Technology" - ], - "homepage": "https://github.com/hyperledger/cactus#readme", - "bugs": { - "url": "https://github.com/hyperledger/cactus/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cactus.git" - }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger Cactus Contributors", - "email": "cactus@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" - }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Michal Bajer", - "email": "michal.bajer@fujitsu.com", - "url": "https://www.fujitsu.com/global/" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "scripts": { - "build": "tsc" - }, - "dependencies": { - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0" - }, - "devDependencies": { - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-corda": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-iroha2": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-sawtooth": "2.0.0", - "jest-extended": "4.0.1", - "rxjs": "7.8.1" - }, - "peerDependencies": { - "@hyperledger/cactus-api-client": "2.x", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.x", - "@hyperledger/cactus-plugin-ledger-connector-corda": "2.x", - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.x", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.x", - "@hyperledger/cactus-plugin-ledger-connector-iroha2": "2.x", - "@hyperledger/cactus-plugin-ledger-connector-sawtooth": "2.x" - }, - "peerDependenciesMeta": { - "@hyperledger/cactus-plugin-ledger-connector-besu": { - "optional": true - }, - "@hyperledger/cactus-plugin-ledger-connector-corda": { - "optional": true - }, - "@hyperledger/cactus-plugin-ledger-connector-ethereum": { - "optional": true - }, - "@hyperledger/cactus-plugin-ledger-connector-fabric": { - "optional": true - }, - "@hyperledger/cactus-plugin-ledger-connector-iroha2": { - "optional": true - }, - "@hyperledger/cactus-plugin-ledger-connector-sawtooth": { - "optional": true - } - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/cactus-verifier-client/src/main/typescript/get-validator-api-client.ts b/packages/cactus-verifier-client/src/main/typescript/get-validator-api-client.ts deleted file mode 100644 index 223e6ae4a6..0000000000 --- a/packages/cactus-verifier-client/src/main/typescript/get-validator-api-client.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2020-2023 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * get-validator-api-client.ts - */ - -import type { - BesuApiClient, - BesuApiClientOptions, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import type { - EthereumApiClient, - EthereumApiClientOptions, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import type { - CordaApiClient, - CordaApiClientOptions, -} from "@hyperledger/cactus-plugin-ledger-connector-corda"; -import type { - Iroha2ApiClient, - Iroha2ApiClientOptions, -} from "@hyperledger/cactus-plugin-ledger-connector-iroha2"; -import type { - FabricApiClient, - FabricApiClientOptions, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import type { - SawtoothApiClient, - SawtoothApiClientOptions, -} from "@hyperledger/cactus-plugin-ledger-connector-sawtooth"; - -/** - * Configuration of ApiClients currently supported by Verifier and VerifierFactory - * Each entry key defines the name of the connection type that has to be specified in VerifierFactory config. - * Each entry value defines two values: in, for input options for ApiClient, and out, for type of ApiClient. - * @warning Remember to keep this list updated to have new ApiClients visible in VerifierFactory interface. - */ -export type ClientApiConfig = { - BESU_1X: { - in: BesuApiClientOptions; - out: BesuApiClient; - }; - BESU_2X: { - in: BesuApiClientOptions; - out: BesuApiClient; - }; - ETH_1X: { - in: EthereumApiClientOptions; - out: EthereumApiClient; - }; - CORDA_4X: { - in: CordaApiClientOptions; - out: CordaApiClient; - }; - IROHA_2X: { - in: Iroha2ApiClientOptions; - out: Iroha2ApiClient; - }; - FABRIC_2X: { - in: FabricApiClientOptions; - out: FabricApiClient; - }; - SAWTOOTH_1X: { - in: SawtoothApiClientOptions; - out: SawtoothApiClient; - }; -}; - -/** - * Getter function for ApiClient based only on it's type/ledger name. - * - * @param validatorType: what kind of validator to create, must be defined in ClientApiConfig. - * @param options: Configuration for given ApiClients, depends on validatorType supplied earlier - * @returns Api coresponding to validatorType requested in arguments. - */ -export async function getValidatorApiClient( - validatorType: K, - options: ClientApiConfig[K]["in"], -): Promise { - switch (validatorType) { - case "BESU_1X": - case "BESU_2X": - // TODO - replace with dynamic imports once ESM is supported - const besuPackage = require("@hyperledger/cactus-plugin-ledger-connector-besu"); - return new besuPackage.BesuApiClient(options as BesuApiClientOptions); - case "ETH_1X": - const ethereumPackage = require("@hyperledger/cactus-plugin-ledger-connector-ethereum"); - return new ethereumPackage.EthereumApiClient( - options as EthereumApiClientOptions, - ); - case "CORDA_4X": - const cordaPackage = require("@hyperledger/cactus-plugin-ledger-connector-corda"); - return new cordaPackage.CordaApiClient(options as CordaApiClientOptions); - case "IROHA_2X": - const iroha2Package = require("@hyperledger/cactus-plugin-ledger-connector-iroha2"); - return new iroha2Package.Iroha2ApiClient( - options as Iroha2ApiClientOptions, - ); - case "FABRIC_2X": - const fabricPackage = require("@hyperledger/cactus-plugin-ledger-connector-fabric"); - return new fabricPackage.FabricApiClient( - options as FabricApiClientOptions, - ); - case "SAWTOOTH_1X": - const sawtoothPackage = require("@hyperledger/cactus-plugin-ledger-connector-sawtooth"); - return new sawtoothPackage.SawtoothApiClient( - options as SawtoothApiClientOptions, - ); - default: - // Will not compile if any ClientApiConfig key was not handled by this switch - const _: never = validatorType; - return _; - } -} diff --git a/packages/cactus-verifier-client/src/main/typescript/index.ts b/packages/cactus-verifier-client/src/main/typescript/index.ts deleted file mode 100644 index 87cb558397..0000000000 --- a/packages/cactus-verifier-client/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/packages/cactus-verifier-client/src/main/typescript/public-api.ts b/packages/cactus-verifier-client/src/main/typescript/public-api.ts deleted file mode 100644 index 0a18c20af4..0000000000 --- a/packages/cactus-verifier-client/src/main/typescript/public-api.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { Verifier, IVerifierEventListener, LedgerEvent } from "./verifier"; -export { getValidatorApiClient } from "./get-validator-api-client"; -export { - VerifierFactory, - ValidatorConfigEntry, - VerifierFactoryConfig, -} from "./verifier-factory"; diff --git a/packages/cactus-verifier-client/src/main/typescript/verifier-factory.ts b/packages/cactus-verifier-client/src/main/typescript/verifier-factory.ts deleted file mode 100644 index 3be55f2edf..0000000000 --- a/packages/cactus-verifier-client/src/main/typescript/verifier-factory.ts +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2020-2023 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * verifier-factory.ts - */ - -import { Verifier } from "./verifier"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; - -import { ISocketApiClient } from "@hyperledger/cactus-core-api"; - -import { - ClientApiConfig, - getValidatorApiClient, -} from "./get-validator-api-client"; - -////////////////////////////////// -// Type Declarations -////////////////////////////////// - -type RequestedData = { - dataName: string; - dataType: string; -}; - -type ApiInfo = { - apiType: string; - requestedData: Array; -}; - -/** - * Validator config entry fields that are mandatory for all ledgers. - */ -type BaseValidatorFields = { - validatorID: string; - validatorType: keyof ClientApiConfig; - ledgerInfo?: { - ledgerAbstract: string; - }; - apiInfo?: Array; -}; - -/** - * Validator config entry fields specific to any supported ledger. - */ -type LedgerSpecificValidatorFields = Record; - -/** - * Validator config entry. - */ -export type ValidatorConfigEntry = BaseValidatorFields & - LedgerSpecificValidatorFields; - -/** - * VerifierFactory config is a list of validator configs that constitute a cactus network. - */ -export type VerifierFactoryConfig = ValidatorConfigEntry[]; - -////////////////////////////////// -// VerifierFactory class -////////////////////////////////// - -/** - * VerifierFactory creates Verifier instances based only on validator id and it's ledger type. - * Returned Verifiers are stored internally and reused for any future requests. - */ -export class VerifierFactory { - private verifierMap = new Map>>(); - private readonly log: Logger; - - readonly className: string; - - /** - * @param verifierConfig: Configuration of validators - * @param loglevel: Debug logging level - */ - constructor( - private readonly verifierConfig: VerifierFactoryConfig, - private readonly loglevel: LogLevelDesc = "info", - ) { - this.className = this.constructor.name; - - verifierConfig.forEach((v) => - Checks.nonBlankString(v.validatorID, `${v.validatorID} validator config`), - ); - verifierConfig.forEach((v) => - Checks.nonBlankString( - v.validatorType, - `${v.validatorType} validator config`, - ), - ); - - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level: this.loglevel, label }); - this.log.debug(`${this.className} created with config:`, verifierConfig); - } - - /** - * Get single validator from internal VerifierFactory config. - * - * @param validatorId: Id of verifier to create. - * @returns Single validator config entry. - */ - private getValidatorConfigEntryOrThrow( - validatorId: string, - ): ValidatorConfigEntry { - this.log.debug("Search for config of validator with id", validatorId); - - const validatorConfig = this.verifierConfig.find( - (v) => v.validatorID === validatorId, - ); - - if (!validatorConfig) { - throw new Error( - `VerifierFactory - Missing validator config with ID ${validatorId}`, - ); - } - - return validatorConfig; - } - - /** - * Get verifier from internal map, or create new one based on requested validator ID. - * - * @param validatorId: Id of verifier to create. - * @param type: optional parameter, will determine the return type. - * @returns Verifier or Verifier if type argument was not provided. - */ - async getVerifier( - validatorId: string, - type?: K, - ): Promise> { - const validatorConfig = this.getValidatorConfigEntryOrThrow(validatorId); - - // Assert ClientApi types - if (type && type !== validatorConfig.validatorType) { - throw new Error( - `VerifierFactory - Validator ${validatorId} type mismatch; requested=${type}, config=${validatorConfig.validatorType}`, - ); - } - - if (this.verifierMap.has(validatorId)) { - this.log.info( - `Verifier for Validator ${validatorId} found in internal map - reuse.`, - ); - return this.verifierMap.get(validatorId) as Verifier< - ClientApiConfig[K]["out"] - >; - } else { - this.log.info(`No Verifier for Validator ${validatorId} - create new.`); - - const clientApi = await getValidatorApiClient( - validatorConfig.validatorType, - validatorConfig as unknown as ClientApiConfig[K]["in"], - ); - - const verifier = new Verifier(validatorId, clientApi, this.loglevel); - this.verifierMap.set(validatorId, verifier); - - return verifier; - } - } -} diff --git a/packages/cactus-verifier-client/src/main/typescript/verifier.ts b/packages/cactus-verifier-client/src/main/typescript/verifier.ts deleted file mode 100644 index 9b66bde97b..0000000000 --- a/packages/cactus-verifier-client/src/main/typescript/verifier.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright 2020-2023 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * verifier.ts - */ - -import type { Subscription } from "rxjs"; - -import { - Logger, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - ISocketApiClient, - IVerifier, - IVerifierEventListener, -} from "@hyperledger/cactus-core-api"; - -export { - IVerifierEventListener, - LedgerEvent, -} from "@hyperledger/cactus-core-api"; - -/** - * Utility type for retrieving monitoring event / new block type from generic ISocketApiClient interface. - */ -type BlockTypeFromSocketApi = - T extends ISocketApiClient ? U : never; - -/** - * Extends ledger connector ApiClient with additional monitoring methods (using callbacks, instead of reactive). - * - * @todo Don't throw exception for not supported operations, don't include these methods at all (if possible) - */ -export class Verifier> - implements IVerifier -{ - private readonly log: Logger; - readonly className: string; - readonly runningMonitors = new Map(); - - /** - * @param ledgerApi - ApiClient for communicating with ledger connector plugin (must implement `ISocketApiClient`) - * @param logLevel - Log level used by the Verifier. - */ - constructor( - public readonly verifierID: string, - public readonly ledgerApi: LedgerApiType, - logLevel: LogLevelDesc = "INFO", - ) { - this.className = this.constructor.name; - this.log = LoggerProvider.getOrCreate({ - level: logLevel, - label: this.className, - }); - this.log.debug("Created Verifier for ledger API"); - } - - /** - * Start monitoring for new events / blocks from underlying ledger. - * - * @param appId - Used to track different apps that use the monitoring. - * Each app has one subscription to common monitoring subject returned by the ApiClient watch method. - * @param options - Options passed to the validator. - * @param eventListener - Type that supplies callbacks called when new event / error was encountered. - * - * @todo Change return type from Promise to void, this method is already async by design. - */ - async startMonitor( - appId: string, - options: Record, - eventListener: IVerifierEventListener< - BlockTypeFromSocketApi - >, - ): Promise { - if (!(this.ledgerApi.watchBlocksV1 || this.ledgerApi.watchBlocksAsyncV1)) { - throw new Error("startMonitor not supported on this ledger"); - } - - if (this.runningMonitors.has(appId)) { - throw new Error(`Monitor with appId '${appId}' is already running!`); - } - - this.log.debug("call : startMonitor appId =", appId); - - try { - const blocksObservable = this.ledgerApi.watchBlocksV1 - ? this.ledgerApi.watchBlocksV1(options) - : await this.ledgerApi.watchBlocksAsyncV1?.(options); - - if (!blocksObservable) { - throw new Error( - "Could not get a valid blocks observable in startMonitor", - ); - } - - const watchBlocksSub = blocksObservable.subscribe({ - next: (blockData: unknown) => { - const event = { - id: "", - verifierId: this.verifierID, - data: blockData as BlockTypeFromSocketApi, - }; - eventListener.onEvent(event); - }, - error: (err) => { - this.log.error("Error when watching for new blocks, err:", err); - if (eventListener.onError) { - eventListener.onError(err); - } - }, - complete: () => { - this.log.info("Watch completed"); - }, - }); - - this.runningMonitors.set(appId, watchBlocksSub); - this.log.debug( - "New monitor added, runningMonitors.size ==", - this.runningMonitors.size, - ); - } catch (err) { - this.log.error(`##Error: startMonitor, ${err}`); - this.runningMonitors.delete(appId); - } - } - - /** - * Stops the monitor for specified app, removes it's subscription from internal storage. - * - * @param appId - ID of application that requested the monitoring. - */ - stopMonitor(appId: string): void { - if (!this.ledgerApi.watchBlocksV1) { - throw new Error("stopMonitor not supported on this ledger"); - } - - const watchBlocksSub = this.runningMonitors.get(appId); - if (!watchBlocksSub) { - throw new Error("No monitor running with appId: " + appId); - } - watchBlocksSub.unsubscribe(); - this.runningMonitors.delete(appId); - - this.log.debug( - "Monitor removed, runningMonitors.size ==", - this.runningMonitors.size, - ); - } - - /** - * Immediately sends request to the validator, doesn't report any error or responses. - * @param contract - contract to execute on the ledger. - * @param method - function / method to be executed by validator. - * @param args - arguments. - * - * @todo Change return type from Promise to void, this method is already async by design. - */ - async sendAsyncRequest( - contract: Record, - method: Record, - args: unknown, - ): Promise { - if (!this.ledgerApi.sendAsyncRequest) { - throw new Error("sendAsyncRequest not supported on this ledger"); - } - - return this.ledgerApi.sendAsyncRequest(contract, method, args); - } - - /** - * Sends request to be executed on the ledger, watches and reports any error and the response from a ledger. - * @param contract - contract to execute on the ledger. - * @param method - function / method to be executed by validator. - * @param args - arguments. - * @returns Promise that will resolve with response from the ledger, or reject when error occurred. - */ - async sendSyncRequest( - contract: Record, - method: Record, - args: unknown, - ): Promise { - if (!this.ledgerApi.sendSyncRequest) { - throw new Error("sendSyncRequest not supported on this ledger"); - } - - return this.ledgerApi.sendSyncRequest(contract, method, args); - } -} diff --git a/packages/cactus-verifier-client/src/test/typescript/unit/get-validator-api-client.test.ts b/packages/cactus-verifier-client/src/test/typescript/unit/get-validator-api-client.test.ts deleted file mode 100644 index 692d6f8cb0..0000000000 --- a/packages/cactus-verifier-client/src/test/typescript/unit/get-validator-api-client.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Base Class: packages/cactus-verifier-client/src/main/typescript/get-validator-api-client.ts - -import "jest-extended"; - -import { getValidatorApiClient } from "../../../main/typescript/get-validator-api-client"; - -import { BesuApiClientOptions } from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -test("Create besu client", async () => { - const clientOptions = new BesuApiClientOptions({ basePath: "foo" }); - - // BESU 1 - const clientApi1 = await getValidatorApiClient("BESU_1X", clientOptions); - expect(clientApi1.className).toEqual("BesuApiClient"); - expect(clientApi1.options).toEqual(clientOptions); - - // BESU 2 - const clientApi2 = await getValidatorApiClient("BESU_2X", clientOptions); - expect(clientApi2.className).toEqual("BesuApiClient"); - expect(clientApi2.options).toEqual(clientOptions); -}); diff --git a/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts b/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts deleted file mode 100644 index 7fbfb5ec7c..0000000000 --- a/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts +++ /dev/null @@ -1,137 +0,0 @@ -// Base Class: packages/cactus-verifier-client/src/main/typescript/verifier-factory.ts - -import "jest-extended"; - -import { Verifier } from "../../../main/typescript/verifier"; -import { - VerifierFactory, - VerifierFactoryConfig, -} from "../../../main/typescript/verifier-factory"; -import { BesuApiClient } from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -describe("Constructor Tests", () => { - test("Basic construction", () => { - const ledgerPluginInfo: VerifierFactoryConfig = [ - { - validatorID: "besu_openapi_connector", - validatorType: "BESU_2X", - basePath: "127.0.0.1", - ledgerInfo: { - ledgerAbstract: "Besu-OpenAPI Ledger", - }, - apiInfo: [], - }, - ]; - - const verifierFactory = new VerifierFactory(ledgerPluginInfo); - expect(verifierFactory.className).toEqual("VerifierFactory"); - expect(verifierFactory["verifierMap"].size).toBe(0); - expect(verifierFactory["verifierConfig"]).toEqual(ledgerPluginInfo); - }); - - test("Empty validatorID throws exception", () => { - const ledgerPluginInfo: VerifierFactoryConfig = [ - { - validatorID: "", - validatorType: "BESU_2X", - basePath: "127.0.0.1", - username: "admin", - password: "password", - ledgerInfo: { - ledgerAbstract: "Besu-OpenAPI Ledger", - }, - apiInfo: [], - }, - ]; - - expect(() => new VerifierFactory(ledgerPluginInfo)).toThrow(); - }); -}); - -describe("getVerifier Tests", () => { - const ledgerPluginInfo: VerifierFactoryConfig = [ - { - validatorID: "myBesuValidatorId", - validatorType: "BESU_2X", - basePath: "myBesuPath", - username: "admin", - password: "password", - ledgerInfo: { - ledgerAbstract: "Besu-OpenAPI Ledger", - }, - apiInfo: [], - }, - ]; - - let sut: VerifierFactory; - - beforeEach(() => { - sut = new VerifierFactory(ledgerPluginInfo); - }); - - test("Throws when requesting validator not defined in config", async () => { - try { - await sut.getVerifier("missingValidatorId"); - expect(1).toBe("getVerifier with invalid Id should throw an error!"); - } catch (error) { - console.log("getVerifier with invalid Id throw error as expected."); - } - }); - - test("Throws when requested client type differs from configured type", async () => { - try { - await sut.getVerifier("myBesuValidatorId", "CORDA_4X"); - expect(1).toBe( - "getVerifier with invalid verifier type should throw an error!", - ); - } catch (error) { - console.log("getVerifier with invalid type throw error as expected."); - } - - // even though the same clientApi is used for both BESU_1X and BESU_2X this should fail - // client code should not depend on internal implementation detail. - try { - await sut.getVerifier("myBesuValidatorId", "BESU_1X"); - expect(1).toBe( - "getVerifier with invalid verifier type should throw an error!", - ); - } catch (error) { - console.log("getVerifier with invalid type throw error as expected."); - } - }); - - test("Creates a open-api based client", async () => { - const validatorId = "myBesuValidatorId"; - - const client = await sut.getVerifier(validatorId, "BESU_2X"); - - expect(client.verifierID).toEqual(validatorId); - expect(client.ledgerApi.className).toEqual("BesuApiClient"); - expect(client.ledgerApi.options.basePath).toEqual("myBesuPath"); - }); - - test("Creates correct api client without explicit type specification", async () => { - const validatorId = "myBesuValidatorId"; - - const client = (await sut.getVerifier( - validatorId, - )) as Verifier; - - expect(client.verifierID).toEqual(validatorId); - expect(client.ledgerApi.className).toEqual("BesuApiClient"); - }); - - test("Factory reuses already created verifiers", async () => { - const validatorId = "myBesuValidatorId"; - - const client = await sut.getVerifier(validatorId, "BESU_2X"); - expect(client.verifierID).toEqual(validatorId); - expect(sut["verifierMap"].size).toBe(1); - - const anotherClient = await sut.getVerifier(validatorId, "BESU_2X"); - expect(anotherClient.verifierID).toEqual(validatorId); - expect(sut["verifierMap"].size).toBe(1); // No new verifier added - - expect(client).toBe(anotherClient); - }); -}); diff --git a/packages/cactus-verifier-client/src/test/typescript/unit/verifier.test.ts b/packages/cactus-verifier-client/src/test/typescript/unit/verifier.test.ts deleted file mode 100644 index f486430460..0000000000 --- a/packages/cactus-verifier-client/src/test/typescript/unit/verifier.test.ts +++ /dev/null @@ -1,222 +0,0 @@ -// Base Class: packages/cactus-api-client/src/main/typescript/verifier.ts - -const testLogLevel: LogLevelDesc = "debug"; -const sutLogLevel: LogLevelDesc = "debug"; -const testTimeout = 1000 * 5; // 5 second timeout per test -const setupTimeout = 1000 * 60; // 1 minute timeout for setup - -import "jest-extended"; -import { Observable } from "rxjs"; - -import { - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -const log: Logger = LoggerProvider.getOrCreate({ - label: "verifier.test", - level: testLogLevel, -}); - -import { ISocketApiClient } from "@hyperledger/cactus-core-api"; -import { - Verifier, - IVerifierEventListener, - LedgerEvent, -} from "../../../main/typescript/verifier"; - -////////////////////////////////// -// Test Timeout -////////////////////////////////// - -jest.setTimeout(testTimeout); - -////////////////////////////////// -// Mocks -////////////////////////////////// - -class MockApiClient implements ISocketApiClient { - // isWatchBlocksRunning = jest - // .fn() - // .mockName("isWatchBlocksRunning") - // .mockReturnValueOnce(true) - // .mockReturnValue(false); - sendAsyncRequest = jest.fn().mockName("sendAsyncRequest"); - sendSyncRequest = jest.fn().mockName("sendSyncRequest"); - watchBlocksV1 = jest.fn().mockName("watchBlocksV1"); -} - -class MockEventListener implements IVerifierEventListener { - onEvent = jest.fn().mockName("onEvent"); - onError = jest.fn().mockName("onError"); -} - -////////////////////////////// -// Monitoring Tests -////////////////////////////// - -test("Using operation not implemented on the ledger throws error", () => { - class EmptyImpl implements ISocketApiClient {} - const apiClient = new EmptyImpl(); - const sut = new Verifier("test-id", apiClient, sutLogLevel); - - // Monitoring - const eventListenerMock = new MockEventListener(); - expect(sut.startMonitor("someId", {}, eventListenerMock)).toReject(); - expect(() => sut.stopMonitor("someId")).toThrowError(); - - // Sending Requests - expect(sut.sendSyncRequest({}, {}, "")).toReject(); - expect(sut.sendAsyncRequest({}, {}, "")).toReject(); -}); - -describe("Monitoring Tests", () => { - // Assume block data format is string - let apiClientMock: MockApiClient; - let sut: Verifier>; - let eventListenerMock: MockEventListener; - - beforeEach(() => { - apiClientMock = new MockApiClient(); - apiClientMock.watchBlocksV1.mockReturnValue( - new Observable(() => log.debug("Mock subscribe called")), - ); - sut = new Verifier("test-id", apiClientMock, sutLogLevel); - eventListenerMock = new MockEventListener(); - }, setupTimeout); - - test("Entry is added to runningMonitors for new monitoring requests", async () => { - const monitorOptions = { test: true }; - - expect(sut.runningMonitors.size).toEqual(0); - await sut.startMonitor("someId", monitorOptions, eventListenerMock); - expect(sut.runningMonitors.size).toEqual(1); - expect(apiClientMock.watchBlocksV1).toBeCalledWith(monitorOptions); - }); - - test("Running multiple monitors with same ID throws an Error", () => { - expect(sut.startMonitor("someId", {}, eventListenerMock)).toResolve(); - expect(sut.startMonitor("someId", {}, eventListenerMock)).toReject(); - }); - - test("In case of ApiClient exception runningMonitors is not updated", () => { - apiClientMock = new MockApiClient(); - apiClientMock.watchBlocksV1.mockImplementation(() => { - throw Error("Some mock error in watchBlocks"); - }); - sut = new Verifier("test-id", apiClientMock, sutLogLevel); - - expect(sut.runningMonitors.size).toEqual(0); - expect(sut.startMonitor("someId", {}, eventListenerMock)).toResolve(); - expect(sut.runningMonitors.size).toEqual(0); - }); - - test("stopMonitor throws error when called with unknown monitor id", () => { - expect(() => sut.stopMonitor("someId")).toThrow(); - }); - - test("onEvent callback is called when new block was received", (done) => { - // Our mock block data is just a string - const mockBlockData = "MockBlockData"; - apiClientMock = new MockApiClient(); - apiClientMock.watchBlocksV1.mockReturnValueOnce( - new Observable((subscriber) => { - log.debug("Observable has started..."); - subscriber.next(mockBlockData); - }), - ); - sut = new Verifier("test-id", apiClientMock, sutLogLevel); - - eventListenerMock = new MockEventListener(); - eventListenerMock.onEvent.mockImplementation( - (ledgerEvent: LedgerEvent) => { - log.debug("onEvent() called with ledger event:", ledgerEvent); - expect(ledgerEvent.data).toEqual(mockBlockData); - done(); - }, - ); - - sut.startMonitor("someId", {}, eventListenerMock); - }); - - test("onError callback is called in when monitoring failed", (done) => { - const mockError = Error("Something terrible"); - apiClientMock = new MockApiClient(); - apiClientMock.watchBlocksV1.mockReturnValueOnce( - new Observable((subscriber) => { - log.debug("Observable has started..."); - subscriber.error(mockError); - }), - ); - sut = new Verifier("test-id", apiClientMock, sutLogLevel); - - eventListenerMock = new MockEventListener(); - eventListenerMock.onError.mockImplementation((err: any) => { - log.debug("onError() called with error:", err); - expect(err).toEqual(mockError); - done(); - }); - - sut.startMonitor("someId", {}, eventListenerMock); - }); - - test("stopMonitor unsubscribes and deletes entry from runningMonitors", async () => { - const thisAppId = "someId"; - - // Start monitor - expect(sut.runningMonitors.size).toEqual(0); - await sut.startMonitor(thisAppId, {}, eventListenerMock); - expect(sut.runningMonitors.size).toEqual(1); - - // Assert monitor is running - const mon = sut.runningMonitors.get(thisAppId); - expect(mon?.closed).toBeFalse(); - - // Stop monitor - sut.stopMonitor(thisAppId); - - // Assert monitor closed and removed from runningMonitors - expect(sut.runningMonitors.size).toEqual(0); - expect(mon?.closed).toBeTrue(); - }); -}); - -describe("Sending Requests Tests", () => { - let apiClientMock: MockApiClient; - let sut: Verifier>; - - beforeEach(() => { - apiClientMock = new MockApiClient(); - apiClientMock.watchBlocksV1.mockReturnValue( - new Observable(() => log.debug("Mock subscribe called")), - ); - sut = new Verifier("test-id", apiClientMock, sutLogLevel); - }, setupTimeout); - - test("Send async request call proxied to the apiClient", async () => { - const inContract = { foo: "bar" }; - const inMethod = { func: "a" }; - const inArgs = 5; - - await sut.sendAsyncRequest(inContract, inMethod, inArgs); - - expect(apiClientMock.sendAsyncRequest).toBeCalledWith( - inContract, - inMethod, - inArgs, - ); - }); - - test("Send sync request call proxied to the apiClient", async () => { - const inContract = { foo: "bar" }; - const inMethod = { func: "a" }; - const inArgs = 5; - - await sut.sendSyncRequest(inContract, inMethod, inArgs); - expect(apiClientMock.sendSyncRequest).toBeCalledWith( - inContract, - inMethod, - inArgs, - ); - }); -}); diff --git a/packages/cactus-verifier-client/tsconfig.json b/packages/cactus-verifier-client/tsconfig.json deleted file mode 100644 index a49a65fd62..0000000000 --- a/packages/cactus-verifier-client/tsconfig.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "./dist/lib", - "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-verifier-client.tsbuildinfo" - }, - "include": [ - "./src" - ], - "references": [ - { - "path": "../cactus-api-client/tsconfig.json" - }, - { - "path": "../cactus-common/tsconfig.json" - }, - { - "path": "../cactus-core-api/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-ethereum/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-corda/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-iroha2/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../cactus-plugin-ledger-connector-sawtooth/tsconfig.json" - } - ] -} diff --git a/tools/sync-npm-deps-to-tsc-projects.ts b/tools/sync-npm-deps-to-tsc-projects.ts index 095f118027..1780de8262 100644 --- a/tools/sync-npm-deps-to-tsc-projects.ts +++ b/tools/sync-npm-deps-to-tsc-projects.ts @@ -56,7 +56,7 @@ const main = async (argv: string[], env: NodeJS.ProcessEnv) => { const pkgNameToPath = new Map(); const pkgPathToName = new Map(); tsConfigPaths.forEach((it) => { - const pkgName = "@hyperledger/".concat(path.basename(path.dirname(it))); + const pkgName = "@adrianbatuto/".concat(path.basename(path.dirname(it))); pkgNameToPath.set(pkgName, it); pkgPathToName.set(it, pkgName); }); diff --git a/tsconfig.json b/tsconfig.json index 790f7474e6..88e0c1cef2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,173 +1,8 @@ { "files": [], "references": [ - { - "path": "./packages/cactus-api-client/tsconfig.json" - }, - { - "path": "./packages/cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "./packages/cacti-ledger-browser/tsconfig.json" - }, { "path": "./packages/cactus-common/tsconfig.json" - }, - { - "path": "./packages/cactus-core/tsconfig.json" - }, - { - "path": "./packages/cactus-core-api/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-bungee-hermes/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-consortium-manual/tsconfig.json" - }, - { - "path": "./packages/cacti-plugin-consortium-static/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-htlc-eth-besu/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-htlc-eth-besu-erc20/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-keychain-aws-sm/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-keychain-azure-kv/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-keychain-google-sm/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-keychain-memory-wasm/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-keychain-vault/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-ledger-connector-aries/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-ledger-connector-polkadot/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-ledger-connector-corda/tsconfig.json" - }, - { - "path": "./packages/cacti-plugin-ledger-connector-stellar/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-ledger-connector-ethereum/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-ledger-connector-cdl/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-ledger-connector-xdai/tsconfig.json" - }, - { - "path": "./packages/cactus-verifier-client/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-persistence-ethereum/tsconfig.json" - }, - { - "path": "./packages/cactus-test-api-client/tsconfig.json" - }, - { - "path": "./packages/cactus-test-cmd-api-server/tsconfig.json" - }, - { - "path": "./packages/cactus-test-geth-ledger/tsconfig.json" - }, - { - "path": "./packages/cactus-test-plugin-consortium-manual/tsconfig.json" - }, - { - "path": "./packages/cactus-test-plugin-htlc-eth-besu/tsconfig.json" - }, - { - "path": "./packages/cactus-test-plugin-htlc-eth-besu-erc20/tsconfig.json" - }, - { - "path": "./packages/cactus-test-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "./packages/cactus-test-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "./packages/cactus-test-plugin-ledger-connector-ethereum/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-ledger-connector-sawtooth/tsconfig.json" - }, - { - "path": "./packages/cactus-test-tooling/tsconfig.json" - }, - { - "path": "./packages/cactus-test-verifier-client/tsconfig.json" - }, - { - "path": "./examples/cactus-common-example-server/tsconfig.json" - }, - { - "path": "./examples/cactus-example-carbon-accounting-backend/tsconfig.json" - }, - { - "path": "./examples/cactus-example-carbon-accounting-business-logic-plugin/tsconfig.json" - }, - { - "path": "./examples/cactus-example-carbon-accounting-frontend/tsconfig.json" - }, - { - "path": "./examples/cactus-example-supply-chain-backend/tsconfig.json" - }, - { - "path": "./examples/cactus-example-supply-chain-business-logic-plugin/tsconfig.json" - }, - { - "path": "./examples/cactus-example-supply-chain-frontend/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-satp-hermes/tsconfig.json" - }, - { - "path": "./examples/cactus-example-electricity-trade/tsconfig.json" - }, - { - "path": "./examples/cactus-example-discounted-asset-trade/tsconfig.json" - }, - { - "path": "./examples/cactus-example-discounted-asset-trade-client/tsconfig.json" - }, - { - "path": "./examples/cactus-example-cbdc-bridging-backend/tsconfig.json" - }, - { - "path": "./examples/cactus-example-cbdc-bridging-frontend/tsconfig.json" - }, - { - "path": "./extensions/cactus-plugin-object-store-ipfs/tsconfig.json" - }, - { - "path": "./extensions/cactus-plugin-htlc-coordinator-besu/tsconfig.json" - }, - { - "path": "./packages/cactus-plugin-persistence-fabric/tsconfig.json" } ], "compilerOptions": { diff --git a/weaver/common/protos-js/package.json b/weaver/common/protos-js/package.json index 8f7add06e9..9724d0f36c 100644 --- a/weaver/common/protos-js/package.json +++ b/weaver/common/protos-js/package.json @@ -17,7 +17,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" + "url": "git+https://github.com/adrianbatuto/cacti.git" }, "license": "Apache-2.0", "author": "Sandeep Nishad", diff --git a/weaver/tests/network-setups/besu/package.json b/weaver/tests/network-setups/besu/package.json index f98840914e..87e09e9741 100644 --- a/weaver/tests/network-setups/besu/package.json +++ b/weaver/tests/network-setups/besu/package.json @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" + "url": "git+https://github.com/adrianbatuto/cacti.git" }, "author": "", "license": "Apache-2.0", diff --git a/yarn.lock b/yarn.lock index a85c6ec45f..70265c572a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,34 +5,6 @@ __metadata: version: 8 cacheKey: 10 -"@2060.io/ffi-napi@npm:4.0.8, @2060.io/ffi-napi@npm:^4.0.8": - version: 4.0.8 - resolution: "@2060.io/ffi-napi@npm:4.0.8" - dependencies: - "@2060.io/ref-napi": "npm:^3.0.6" - debug: "npm:^4.1.1" - get-uv-event-loop-napi-h: "npm:^1.0.5" - node-addon-api: "npm:^3.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.1" - ref-struct-di: "npm:^1.1.0" - checksum: 10/d632944fb51fad1e849223e8e9924282afa6b8398532dba40d1c22d3b10e6846dcd4b03c997b44a6da0cda10a8874162b68e930b79f2b880b5e6095ca9c16cb3 - languageName: node - linkType: hard - -"@2060.io/ref-napi@npm:3.0.6, @2060.io/ref-napi@npm:^3.0.6": - version: 3.0.6 - resolution: "@2060.io/ref-napi@npm:3.0.6" - dependencies: - debug: "npm:^4.1.1" - get-symbol-from-current-process-h: "npm:^1.0.2" - node-addon-api: "npm:^3.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.1" - checksum: 10/09b5d336c118d0caa6cd91cb8ee273a7da169824ff834d1540c65731365e584bdc009927b8a4721c4e9fcaa21a25bb2d7eb4b8e15a80e9e912994a9e252cca0a - languageName: node - linkType: hard - "@aashutoshrathi/word-wrap@npm:^1.2.3": version: 1.2.6 resolution: "@aashutoshrathi/word-wrap@npm:1.2.6" @@ -40,34 +12,6 @@ __metadata: languageName: node linkType: hard -"@adobe/css-tools@npm:^4.0.1": - version: 4.4.0 - resolution: "@adobe/css-tools@npm:4.4.0" - checksum: 10/9c6315fe9efa5075d6ddb6ded7a1424bc9c41a01f2314b6bdcc368723985fe161008d03ddcc2b27b2da50cb9c14190fbce965d15cefe5f9a31bdd43f35b52115 - languageName: node - linkType: hard - -"@adraffy/ens-normalize@npm:1.10.0": - version: 1.10.0 - resolution: "@adraffy/ens-normalize@npm:1.10.0" - checksum: 10/5cdb5d2a9c9f8c0a71a7bb830967da0069cae1f1235cd41ae11147e4000f368f6958386e622cd4d52bf45c1ed3f8275056b387cba28902b83354e40ff323ecde - languageName: node - linkType: hard - -"@adraffy/ens-normalize@npm:1.10.1": - version: 1.10.1 - resolution: "@adraffy/ens-normalize@npm:1.10.1" - checksum: 10/4cb938c4abb88a346d50cb0ea44243ab3574330c81d4f5aaaf9dfee584b96189d0faa404de0fcbef5a1b73909ea4ebc3e63d84bd23f9949e5c8d4085207a5091 - languageName: node - linkType: hard - -"@adraffy/ens-normalize@npm:1.9.0": - version: 1.9.0 - resolution: "@adraffy/ens-normalize@npm:1.9.0" - checksum: 10/5257bbb45796720386a250ec2747f1c93b8fccd7063839ccda4aeb1b97ebec81caf5b435252dae1842c37175fe2e0ddcb89039f4ec1a4934fa4c6901a7f4992b - languageName: node - linkType: hard - "@adraffy/ens-normalize@npm:^1.8.8": version: 1.9.4 resolution: "@adraffy/ens-normalize@npm:1.9.4" @@ -75,32 +19,53 @@ __metadata: languageName: node linkType: hard -"@alloc/quick-lru@npm:^5.2.0": - version: 5.2.0 - resolution: "@alloc/quick-lru@npm:5.2.0" - checksum: 10/bdc35758b552bcf045733ac047fb7f9a07c4678b944c641adfbd41f798b4b91fffd0fdc0df2578d9b0afc7b4d636aa6e110ead5d6281a2adc1ab90efd7f057f8 - languageName: node - linkType: hard - -"@ampproject/remapping@npm:2.2.1, @ampproject/remapping@npm:^2.2.0": - version: 2.2.1 - resolution: "@ampproject/remapping@npm:2.2.1" +"@adrianbatuto/cactus-common@workspace:packages/cactus-common": + version: 0.0.0-use.local + resolution: "@adrianbatuto/cactus-common@workspace:packages/cactus-common" dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.0" - "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 10/e15fecbf3b54c988c8b4fdea8ef514ab482537e8a080b2978cc4b47ccca7140577ca7b65ad3322dcce65bc73ee6e5b90cbfe0bbd8c766dad04d5c62ec9634c42 - languageName: node - linkType: hard + "@grpc/grpc-js": "npm:1.11.3" + "@types/json-stable-stringify": "npm:1.0.33" + "@types/sanitize-html": "npm:2.9.5" + "@types/secp256k1": "npm:4.0.3" + "@types/uuid": "npm:10.0.0" + fast-safe-stringify: "npm:2.1.1" + json-stable-stringify: "npm:1.0.1" + key-encoder: "npm:2.0.3" + loglevel: "npm:1.7.1" + loglevel-plugin-prefix: "npm:0.8.4" + run-time-error-cjs: "npm:1.4.0" + sanitize-html: "npm:2.12.1" + secp256k1: "npm:4.0.3" + sha3: "npm:2.1.4" + uuid: "npm:10.0.0" + languageName: unknown + linkType: soft -"@ampproject/remapping@npm:2.3.0": - version: 2.3.0 - resolution: "@ampproject/remapping@npm:2.3.0" +"@adrianbatuto/cactus-core-api@workspace:packages/cactus-core-api": + version: 0.0.0-use.local + resolution: "@adrianbatuto/cactus-core-api@workspace:packages/cactus-core-api" dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.24" - checksum: 10/f3451525379c68a73eb0a1e65247fbf28c0cccd126d93af21c75fceff77773d43c0d4a2d51978fb131aff25b5f2cb41a9fe48cc296e61ae65e679c4f6918b0ab - languageName: node - linkType: hard + "@bufbuild/protobuf": "npm:1.10.0" + "@connectrpc/connect": "npm:1.4.0" + "@grpc/grpc-js": "npm:1.11.3" + "@grpc/proto-loader": "npm:0.7.13" + "@hyperledger/cactus-common": "npm:2.0.0" + "@types/express": "npm:5.0.0" + "@types/google-protobuf": "npm:3.15.5" + ajv: "npm:8.17.1" + ajv-draft-04: "npm:1.0.0" + ajv-formats: "npm:3.0.1" + axios: "npm:1.7.7" + google-protobuf: "npm:3.21.4" + grpc-tools: "npm:1.12.4" + grpc_tools_node_protoc_ts: "npm:5.3.3" + make-dir-cli: "npm:3.1.0" + npm-run-all: "npm:4.1.5" + rxjs: "npm:7.8.1" + socket.io: "npm:4.6.2" + typescript-optional: "npm:2.0.1" + languageName: unknown + linkType: soft "@ampproject/remapping@npm:^2.1.0": version: 2.1.2 @@ -111,54927 +76,18777 @@ __metadata: languageName: node linkType: hard -"@angular-builders/common@npm:1.0.2": - version: 1.0.2 - resolution: "@angular-builders/common@npm:1.0.2" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/code-frame@npm:7.16.7" dependencies: - "@angular-devkit/core": "npm:^17.1.0" - ts-node: "npm:^10.0.0" - tsconfig-paths: "npm:^4.1.0" - checksum: 10/a305986676968e5fd2729711fee0c52706373ac55ea4ffd2e56c1c18dcb5b055cbaa30e2a73def3dc29d1b12bd458608767285c52cb4e18434b45acb7d3330cf + "@babel/highlight": "npm:^7.16.7" + checksum: 10/db2f7faa31bc2c9cf63197b481b30ea57147a5fc1a6fab60e5d6c02cdfbf6de8e17b5121f99917b3dabb5eeb572da078312e70697415940383efc140d4e0808b languageName: node linkType: hard -"@angular-builders/custom-webpack@npm:16.0.1": - version: 16.0.1 - resolution: "@angular-builders/custom-webpack@npm:16.0.1" +"@babel/code-frame@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/code-frame@npm:7.18.6" dependencies: - "@angular-devkit/architect": "npm:>=0.1600.0 < 0.1700.0" - "@angular-devkit/build-angular": "npm:^16.0.0" - "@angular-devkit/core": "npm:^16.0.0" - lodash: "npm:^4.17.15" - ts-node: "npm:^10.0.0" - tsconfig-paths: "npm:^4.1.0" - webpack-merge: "npm:^5.7.3" - peerDependencies: - "@angular/compiler-cli": ^16.0.0 - checksum: 10/d262f0ae5553d733b1e8f63dfd58673b9bb3a742bee046514a3ba411d1a2b857aea3fb351154ac8503d6e8c37c39f0b010200a5c080fbff9b8e2065807fee6b6 + "@babel/highlight": "npm:^7.18.6" + checksum: 10/195e2be3172d7684bf95cff69ae3b7a15a9841ea9d27d3c843662d50cdd7d6470fd9c8e64be84d031117e4a4083486effba39f9aef6bbb2c89f7f21bcfba33ba languageName: node linkType: hard -"@angular-builders/custom-webpack@npm:17.0.2": - version: 17.0.2 - resolution: "@angular-builders/custom-webpack@npm:17.0.2" +"@babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.22.13": + version: 7.22.13 + resolution: "@babel/code-frame@npm:7.22.13" dependencies: - "@angular-builders/common": "npm:1.0.2" - "@angular-devkit/architect": "npm:>=0.1700.0 < 0.1800.0" - "@angular-devkit/build-angular": "npm:^17.0.0" - "@angular-devkit/core": "npm:^17.0.0" - lodash: "npm:^4.17.15" - webpack-merge: "npm:^5.7.3" - peerDependencies: - "@angular/compiler-cli": ^17.0.0 - checksum: 10/6812a7dd6305d7425c0cfcf61848df553a5308800de4585b18446973e080253fb2d62876d6fabf2a6a2163c2f445261486839f7ed4a95f2cadd440301220759b + "@babel/highlight": "npm:^7.22.13" + chalk: "npm:^2.4.2" + checksum: 10/bf6ae6ba3a510adfda6a211b4a89b0f1c98ca1352b745c077d113f3b568141e0d44ce750b9ac2a80143ba5c8c4080c50fcfc1aa11d86e194ea6785f62520eb5a languageName: node linkType: hard -"@angular-devkit/architect@npm:0.1602.1, @angular-devkit/architect@npm:>=0.1600.0 < 0.1700.0": - version: 0.1602.1 - resolution: "@angular-devkit/architect@npm:0.1602.1" - dependencies: - "@angular-devkit/core": "npm:16.2.1" - rxjs: "npm:7.8.1" - checksum: 10/50922d371101d2e8494a4bc1917111ee642632caf7f7d000378962ec24ade5882c5df653bf4abdd8b723bc213365dd060fc20c3175799c1d81e921c1585849fa +"@babel/compat-data@npm:^7.16.4, @babel/compat-data@npm:^7.17.0": + version: 7.17.0 + resolution: "@babel/compat-data@npm:7.17.0" + checksum: 10/ca06df56c156640395ce16cb66038f570724ae86bdf35cfd71e928a4e1771c46fa8804ff78a7404c380c8b4ab6a85912bbf068e8f3c26d4e2aa2380ec8d60b92 languageName: node linkType: hard -"@angular-devkit/architect@npm:0.1703.8, @angular-devkit/architect@npm:>=0.1700.0 < 0.1800.0": - version: 0.1703.8 - resolution: "@angular-devkit/architect@npm:0.1703.8" - dependencies: - "@angular-devkit/core": "npm:17.3.8" - rxjs: "npm:7.8.1" - checksum: 10/0100a3e690723e1c2680af002352fb528c66c780fd9d89ddba1dfcde9a1fa9554c4c0271677b7b65301ecece6314c8b9f7bf330e80231fa3e7bb882414963538 - languageName: node - linkType: hard - -"@angular-devkit/build-angular@npm:16.2.1, @angular-devkit/build-angular@npm:^16.0.0": - version: 16.2.1 - resolution: "@angular-devkit/build-angular@npm:16.2.1" - dependencies: - "@ampproject/remapping": "npm:2.2.1" - "@angular-devkit/architect": "npm:0.1602.1" - "@angular-devkit/build-webpack": "npm:0.1602.1" - "@angular-devkit/core": "npm:16.2.1" - "@babel/core": "npm:7.22.9" - "@babel/generator": "npm:7.22.9" - "@babel/helper-annotate-as-pure": "npm:7.22.5" - "@babel/helper-split-export-declaration": "npm:7.22.6" - "@babel/plugin-proposal-async-generator-functions": "npm:7.20.7" - "@babel/plugin-transform-async-to-generator": "npm:7.22.5" - "@babel/plugin-transform-runtime": "npm:7.22.9" - "@babel/preset-env": "npm:7.22.9" - "@babel/runtime": "npm:7.22.6" - "@babel/template": "npm:7.22.5" - "@discoveryjs/json-ext": "npm:0.5.7" - "@ngtools/webpack": "npm:16.2.1" - "@vitejs/plugin-basic-ssl": "npm:1.0.1" - ansi-colors: "npm:4.1.3" - autoprefixer: "npm:10.4.14" - babel-loader: "npm:9.1.3" - babel-plugin-istanbul: "npm:6.1.1" - browserslist: "npm:^4.21.5" - chokidar: "npm:3.5.3" - copy-webpack-plugin: "npm:11.0.0" - critters: "npm:0.0.20" - css-loader: "npm:6.8.1" - esbuild: "npm:0.18.17" - esbuild-wasm: "npm:0.18.17" - fast-glob: "npm:3.3.1" - guess-parser: "npm:0.4.22" - https-proxy-agent: "npm:5.0.1" - inquirer: "npm:8.2.4" - jsonc-parser: "npm:3.2.0" - karma-source-map-support: "npm:1.4.0" - less: "npm:4.1.3" - less-loader: "npm:11.1.0" - license-webpack-plugin: "npm:4.0.2" - loader-utils: "npm:3.2.1" - magic-string: "npm:0.30.1" - mini-css-extract-plugin: "npm:2.7.6" - mrmime: "npm:1.0.1" - open: "npm:8.4.2" - ora: "npm:5.4.1" - parse5-html-rewriting-stream: "npm:7.0.0" - picomatch: "npm:2.3.1" - piscina: "npm:4.0.0" - postcss: "npm:8.4.27" - postcss-loader: "npm:7.3.3" - resolve-url-loader: "npm:5.0.0" - rxjs: "npm:7.8.1" - sass: "npm:1.64.1" - sass-loader: "npm:13.3.2" - semver: "npm:7.5.4" - source-map-loader: "npm:4.0.1" - source-map-support: "npm:0.5.21" - terser: "npm:5.19.2" - text-table: "npm:0.2.0" - tree-kill: "npm:1.2.2" - tslib: "npm:2.6.1" - vite: "npm:4.4.7" - webpack: "npm:5.88.2" - webpack-dev-middleware: "npm:6.1.1" - webpack-dev-server: "npm:4.15.1" - webpack-merge: "npm:5.9.0" - webpack-subresource-integrity: "npm:5.1.0" - peerDependencies: - "@angular/compiler-cli": ^16.0.0 - "@angular/localize": ^16.0.0 - "@angular/platform-server": ^16.0.0 - "@angular/service-worker": ^16.0.0 - jest: ^29.5.0 - jest-environment-jsdom: ^29.5.0 - karma: ^6.3.0 - ng-packagr: ^16.0.0 - protractor: ^7.0.0 - tailwindcss: ^2.0.0 || ^3.0.0 - typescript: ">=4.9.3 <5.2" - dependenciesMeta: - esbuild: - optional: true - peerDependenciesMeta: - "@angular/localize": - optional: true - "@angular/platform-server": - optional: true - "@angular/service-worker": - optional: true - jest: - optional: true - jest-environment-jsdom: - optional: true - karma: - optional: true - ng-packagr: - optional: true - protractor: - optional: true - tailwindcss: - optional: true - checksum: 10/1eb2446d904b6114c6be960f4d71ce6ee3b8b371ddb3d349ed923ba67f7b899aa4885df0ab21411b7be7b512087812b2f3c88bad164b623539c0cd9f56023fa9 - languageName: node - linkType: hard - -"@angular-devkit/build-angular@npm:17.3.8, @angular-devkit/build-angular@npm:^17.0.0": - version: 17.3.8 - resolution: "@angular-devkit/build-angular@npm:17.3.8" - dependencies: - "@ampproject/remapping": "npm:2.3.0" - "@angular-devkit/architect": "npm:0.1703.8" - "@angular-devkit/build-webpack": "npm:0.1703.8" - "@angular-devkit/core": "npm:17.3.8" - "@babel/core": "npm:7.24.0" - "@babel/generator": "npm:7.23.6" - "@babel/helper-annotate-as-pure": "npm:7.22.5" - "@babel/helper-split-export-declaration": "npm:7.22.6" - "@babel/plugin-transform-async-generator-functions": "npm:7.23.9" - "@babel/plugin-transform-async-to-generator": "npm:7.23.3" - "@babel/plugin-transform-runtime": "npm:7.24.0" - "@babel/preset-env": "npm:7.24.0" - "@babel/runtime": "npm:7.24.0" - "@discoveryjs/json-ext": "npm:0.5.7" - "@ngtools/webpack": "npm:17.3.8" - "@vitejs/plugin-basic-ssl": "npm:1.1.0" - ansi-colors: "npm:4.1.3" - autoprefixer: "npm:10.4.18" - babel-loader: "npm:9.1.3" - babel-plugin-istanbul: "npm:6.1.1" - browserslist: "npm:^4.21.5" - copy-webpack-plugin: "npm:11.0.0" - critters: "npm:0.0.22" - css-loader: "npm:6.10.0" - esbuild: "npm:0.20.1" - esbuild-wasm: "npm:0.20.1" - fast-glob: "npm:3.3.2" - http-proxy-middleware: "npm:2.0.6" - https-proxy-agent: "npm:7.0.4" - inquirer: "npm:9.2.15" - jsonc-parser: "npm:3.2.1" - karma-source-map-support: "npm:1.4.0" - less: "npm:4.2.0" - less-loader: "npm:11.1.0" - license-webpack-plugin: "npm:4.0.2" - loader-utils: "npm:3.2.1" - magic-string: "npm:0.30.8" - mini-css-extract-plugin: "npm:2.8.1" - mrmime: "npm:2.0.0" - open: "npm:8.4.2" - ora: "npm:5.4.1" - parse5-html-rewriting-stream: "npm:7.0.0" - picomatch: "npm:4.0.1" - piscina: "npm:4.4.0" - postcss: "npm:8.4.35" - postcss-loader: "npm:8.1.1" - resolve-url-loader: "npm:5.0.0" - rxjs: "npm:7.8.1" - sass: "npm:1.71.1" - sass-loader: "npm:14.1.1" - semver: "npm:7.6.0" - source-map-loader: "npm:5.0.0" - source-map-support: "npm:0.5.21" - terser: "npm:5.29.1" - tree-kill: "npm:1.2.2" - tslib: "npm:2.6.2" - undici: "npm:6.11.1" - vite: "npm:5.1.7" - watchpack: "npm:2.4.0" - webpack: "npm:5.90.3" - webpack-dev-middleware: "npm:6.1.2" - webpack-dev-server: "npm:4.15.1" - webpack-merge: "npm:5.10.0" - webpack-subresource-integrity: "npm:5.1.0" - peerDependencies: - "@angular/compiler-cli": ^17.0.0 - "@angular/localize": ^17.0.0 - "@angular/platform-server": ^17.0.0 - "@angular/service-worker": ^17.0.0 - "@web/test-runner": ^0.18.0 - browser-sync: ^3.0.2 - jest: ^29.5.0 - jest-environment-jsdom: ^29.5.0 - karma: ^6.3.0 - ng-packagr: ^17.0.0 - protractor: ^7.0.0 - tailwindcss: ^2.0.0 || ^3.0.0 - typescript: ">=5.2 <5.5" - dependenciesMeta: - esbuild: - optional: true - peerDependenciesMeta: - "@angular/localize": - optional: true - "@angular/platform-server": - optional: true - "@angular/service-worker": - optional: true - "@web/test-runner": - optional: true - browser-sync: - optional: true - jest: - optional: true - jest-environment-jsdom: - optional: true - karma: - optional: true - ng-packagr: - optional: true - protractor: - optional: true - tailwindcss: - optional: true - checksum: 10/3ed64d807e40466b0a753c5bf7c029b5da10a8fe2ac2178d831c0ce9c48d7a020a406a6b73926afa9649c69c053dc5ea0b0f24c4aeb299bcfc03fa471e011de6 +"@babel/compat-data@npm:^7.18.8": + version: 7.18.8 + resolution: "@babel/compat-data@npm:7.18.8" + checksum: 10/85d41394bf6892f74e339f5356e855167ffe443e0daccdafdbe0b189fa5238d7180dc50b0b7e55c376544a9cd63f341d99492a7774091beb9ee1382e85ca22d3 languageName: node linkType: hard -"@angular-devkit/build-webpack@npm:0.1602.1": - version: 0.1602.1 - resolution: "@angular-devkit/build-webpack@npm:0.1602.1" +"@babel/core@npm:^7.11.6": + version: 7.18.9 + resolution: "@babel/core@npm:7.18.9" dependencies: - "@angular-devkit/architect": "npm:0.1602.1" - rxjs: "npm:7.8.1" - peerDependencies: - webpack: ^5.30.0 - webpack-dev-server: ^4.0.0 - checksum: 10/a436f86e3482796fb4e3b6880740ae27703cf46757cdadef22d45ca88fb4df795a47417478e45a35530dec024dd60dee9df082cea4a26aae0c232f972801bc1d + "@ampproject/remapping": "npm:^2.1.0" + "@babel/code-frame": "npm:^7.18.6" + "@babel/generator": "npm:^7.18.9" + "@babel/helper-compilation-targets": "npm:^7.18.9" + "@babel/helper-module-transforms": "npm:^7.18.9" + "@babel/helpers": "npm:^7.18.9" + "@babel/parser": "npm:^7.18.9" + "@babel/template": "npm:^7.18.6" + "@babel/traverse": "npm:^7.18.9" + "@babel/types": "npm:^7.18.9" + convert-source-map: "npm:^1.7.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.1" + semver: "npm:^6.3.0" + checksum: 10/ebd9a458562ff3981c761bc69ac34e50d9b717dd6128c34f30097d1958439dc24b128a45cdff1ff2453fc65157e0edb3707848c4f95bc45e587e9fec4d0e3e05 languageName: node linkType: hard -"@angular-devkit/build-webpack@npm:0.1703.8": - version: 0.1703.8 - resolution: "@angular-devkit/build-webpack@npm:0.1703.8" +"@babel/core@npm:^7.12.3, @babel/core@npm:^7.5.5, @babel/core@npm:^7.7.5": + version: 7.17.5 + resolution: "@babel/core@npm:7.17.5" dependencies: - "@angular-devkit/architect": "npm:0.1703.8" - rxjs: "npm:7.8.1" - peerDependencies: - webpack: ^5.30.0 - webpack-dev-server: ^4.0.0 - checksum: 10/01963bf2733f8b1a2207e6d2ff1733812d3d48fad43eee683e8174496deeae6d0e8ca6416fc77102ed3bcece4fdbf34230b49c7f9522c43af88908ba44a6694b + "@ampproject/remapping": "npm:^2.1.0" + "@babel/code-frame": "npm:^7.16.7" + "@babel/generator": "npm:^7.17.3" + "@babel/helper-compilation-targets": "npm:^7.16.7" + "@babel/helper-module-transforms": "npm:^7.16.7" + "@babel/helpers": "npm:^7.17.2" + "@babel/parser": "npm:^7.17.3" + "@babel/template": "npm:^7.16.7" + "@babel/traverse": "npm:^7.17.3" + "@babel/types": "npm:^7.17.0" + convert-source-map: "npm:^1.7.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.1.2" + semver: "npm:^6.3.0" + checksum: 10/1e45d498ca92fded7fcaff555a55ac2391385be307f83cf1994312c114303bdcab553c2b0b2e4201ec8e2f033f8eb3f5f9c46e496a98c93be02da11343a69393 languageName: node linkType: hard -"@angular-devkit/core@npm:16.2.1, @angular-devkit/core@npm:^16.0.0": - version: 16.2.1 - resolution: "@angular-devkit/core@npm:16.2.1" +"@babel/generator@npm:^7.17.3, @babel/generator@npm:^7.7.2": + version: 7.17.3 + resolution: "@babel/generator@npm:7.17.3" dependencies: - ajv: "npm:8.12.0" - ajv-formats: "npm:2.1.1" - jsonc-parser: "npm:3.2.0" - picomatch: "npm:2.3.1" - rxjs: "npm:7.8.1" - source-map: "npm:0.7.4" - peerDependencies: - chokidar: ^3.5.2 - peerDependenciesMeta: - chokidar: - optional: true - checksum: 10/0b2037145eac56b87a1cb0b773b6e88223db360524a3caaa02467d4d985e6ba2b74c59c516e39262b17de9c09339a9025fc8497aab61d9255a5651b7789ec44a + "@babel/types": "npm:^7.17.0" + jsesc: "npm:^2.5.1" + source-map: "npm:^0.5.0" + checksum: 10/9a102a87b4e477aace1febc89a3692faf09c442015f24c3dffc1f54691498a73bd97a9eda9120be5626ede62728e15f7942ce841ff96c5b464703c701a7ab82a languageName: node linkType: hard -"@angular-devkit/core@npm:17.3.8, @angular-devkit/core@npm:^17.0.0, @angular-devkit/core@npm:^17.1.0": - version: 17.3.8 - resolution: "@angular-devkit/core@npm:17.3.8" +"@babel/generator@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/generator@npm:7.18.9" dependencies: - ajv: "npm:8.12.0" - ajv-formats: "npm:2.1.1" - jsonc-parser: "npm:3.2.1" - picomatch: "npm:4.0.1" - rxjs: "npm:7.8.1" - source-map: "npm:0.7.4" - peerDependencies: - chokidar: ^3.5.2 - peerDependenciesMeta: - chokidar: - optional: true - checksum: 10/0119001e98950773db1a130d9011528135d9778dc6fe4a5058d9ad4501582f754f26b2ae516e0e8e96c69e9671c9fe31566c656ed87f1b493c2c29568503c098 + "@babel/types": "npm:^7.18.9" + "@jridgewell/gen-mapping": "npm:^0.3.2" + jsesc: "npm:^2.5.1" + checksum: 10/cd19e568724c6389f75c64c178f72bafcbb97af1de0412eecacf5431401b81714521530d98914640dbb096d8ba5a829f09a6cb91ce81fd30fd75d9dace0a00ed languageName: node linkType: hard -"@angular-devkit/schematics@npm:16.2.1, @angular-devkit/schematics@npm:^16.0.0": - version: 16.2.1 - resolution: "@angular-devkit/schematics@npm:16.2.1" +"@babel/generator@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/generator@npm:7.23.0" dependencies: - "@angular-devkit/core": "npm:16.2.1" - jsonc-parser: "npm:3.2.0" - magic-string: "npm:0.30.1" - ora: "npm:5.4.1" - rxjs: "npm:7.8.1" - checksum: 10/ef535beeb9d5cad6cc2032a99f9d2234fbf5d0f9e0a2053247559c6588a83af2d08c97d3aab47152706f4d07f0bf1a32031c624c7048112bb20dcc5f2d94146c + "@babel/types": "npm:^7.23.0" + "@jridgewell/gen-mapping": "npm:^0.3.2" + "@jridgewell/trace-mapping": "npm:^0.3.17" + jsesc: "npm:^2.5.1" + checksum: 10/bd1598bd356756065d90ce26968dd464ac2b915c67623f6f071fb487da5f9eb454031a380e20e7c9a7ce5c4a49d23be6cb9efde404952b0b3f3c0c3a9b73d68a languageName: node linkType: hard -"@angular-devkit/schematics@npm:17.3.8": - version: 17.3.8 - resolution: "@angular-devkit/schematics@npm:17.3.8" +"@babel/helper-annotate-as-pure@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-annotate-as-pure@npm:7.16.7" dependencies: - "@angular-devkit/core": "npm:17.3.8" - jsonc-parser: "npm:3.2.1" - magic-string: "npm:0.30.8" - ora: "npm:5.4.1" - rxjs: "npm:7.8.1" - checksum: 10/d5419504f36ff4a13c9769372a7aeb6dfa3bc3f843f446ad58ffb2a56e5c82fede68dbd73027f6d1fe6a91817ce302d01cec0065b168e0d19be699046db0209e + "@babel/types": "npm:^7.16.7" + checksum: 10/d235be963fed5d48a8a4cfabc41c3f03fad6a947810dbcab9cebed7f819811457e10d99b4b2e942ad71baa7ee8e3cd3f5f38a4e4685639ddfddb7528d9a07179 languageName: node linkType: hard -"@angular/cli@npm:16.2.1": - version: 16.2.1 - resolution: "@angular/cli@npm:16.2.1" +"@babel/helper-compilation-targets@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-compilation-targets@npm:7.16.7" dependencies: - "@angular-devkit/architect": "npm:0.1602.1" - "@angular-devkit/core": "npm:16.2.1" - "@angular-devkit/schematics": "npm:16.2.1" - "@schematics/angular": "npm:16.2.1" - "@yarnpkg/lockfile": "npm:1.1.0" - ansi-colors: "npm:4.1.3" - ini: "npm:4.1.1" - inquirer: "npm:8.2.4" - jsonc-parser: "npm:3.2.0" - npm-package-arg: "npm:10.1.0" - npm-pick-manifest: "npm:8.0.1" - open: "npm:8.4.2" - ora: "npm:5.4.1" - pacote: "npm:15.2.0" - resolve: "npm:1.22.2" - semver: "npm:7.5.4" - symbol-observable: "npm:4.0.0" - yargs: "npm:17.7.2" - bin: - ng: bin/ng.js - checksum: 10/37a913828e37e66eb39c1a33e72a30d4d62a51817108e0a7a5aa9265c378350abd0613de310b184746c5017a8f41adc6c37b47287018f463b68b042d5e818ee3 - languageName: node - linkType: hard - -"@angular/cli@npm:17.3.8": - version: 17.3.8 - resolution: "@angular/cli@npm:17.3.8" - dependencies: - "@angular-devkit/architect": "npm:0.1703.8" - "@angular-devkit/core": "npm:17.3.8" - "@angular-devkit/schematics": "npm:17.3.8" - "@schematics/angular": "npm:17.3.8" - "@yarnpkg/lockfile": "npm:1.1.0" - ansi-colors: "npm:4.1.3" - ini: "npm:4.1.2" - inquirer: "npm:9.2.15" - jsonc-parser: "npm:3.2.1" - npm-package-arg: "npm:11.0.1" - npm-pick-manifest: "npm:9.0.0" - open: "npm:8.4.2" - ora: "npm:5.4.1" - pacote: "npm:17.0.6" - resolve: "npm:1.22.8" - semver: "npm:7.6.0" - symbol-observable: "npm:4.0.0" - yargs: "npm:17.7.2" - bin: - ng: bin/ng.js - checksum: 10/cb1846ba39bc11644d5412417b27936db17a66bb6173dd147e1f616c8d21feab44434fcb314ee91e655bb7a25ad85811441020803b756e3da89b3e0e6eaf18a3 + "@babel/compat-data": "npm:^7.16.4" + "@babel/helper-validator-option": "npm:^7.16.7" + browserslist: "npm:^4.17.5" + semver: "npm:^6.3.0" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/87cd35911856e03fa45a0593a36e5f20bec745dbb2f82e0689dc09f4607a13c225d9295e26e7bf44b178f323a3bccad0c025be7e7c32564bcd0a08b2e9ab727d languageName: node linkType: hard -"@angular/common@npm:16.2.4": - version: 16.2.4 - resolution: "@angular/common@npm:16.2.4" +"@babel/helper-compilation-targets@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/helper-compilation-targets@npm:7.18.9" dependencies: - tslib: "npm:^2.3.0" + "@babel/compat-data": "npm:^7.18.8" + "@babel/helper-validator-option": "npm:^7.18.6" + browserslist: "npm:^4.20.2" + semver: "npm:^6.3.0" peerDependencies: - "@angular/core": 16.2.4 - rxjs: ^6.5.3 || ^7.4.0 - checksum: 10/34d3e18a4eb071039c8fa29814e8767ee1d457c6e0313928fff6783931c066dec5be8289a7cc56b31f5cce37feafcbd8a2557dbb89057ee6987128294e5d6843 + "@babel/core": ^7.0.0 + checksum: 10/74f9cff2925a19c8a7ce9c7b6e79257cf6f22a6dd6d8448d28fd3682a399af4cedfaad43ae2108b5c7a439b4b50f094737fb199c5345a9dba03f8113df742225 languageName: node linkType: hard -"@angular/common@npm:17.3.11": - version: 17.3.11 - resolution: "@angular/common@npm:17.3.11" +"@babel/helper-environment-visitor@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-environment-visitor@npm:7.16.7" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/core": 17.3.11 - rxjs: ^6.5.3 || ^7.4.0 - checksum: 10/566cc0e8603d7ca69bf10479c3d4b24dd40fb06c75c34aa42e5002d8ef8698bb19ff981d16c37f0652a79c17c2f57a4f0c912993f4b2cae74166d99a65d35bc9 + "@babel/types": "npm:^7.16.7" + checksum: 10/c03a10105d9ebd1fe632a77356b2e6e2f3c44edba9a93b0dc3591b6a66bd7a2e323dd9502f9ce96fc6401234abff1907aa877b6674f7826b61c953f7c8204bbe languageName: node linkType: hard -"@angular/compiler-cli@npm:16.2.4": - version: 16.2.4 - resolution: "@angular/compiler-cli@npm:16.2.4" - dependencies: - "@babel/core": "npm:7.22.5" - "@jridgewell/sourcemap-codec": "npm:^1.4.14" - chokidar: "npm:^3.0.0" - convert-source-map: "npm:^1.5.1" - reflect-metadata: "npm:^0.1.2" - semver: "npm:^7.0.0" - tslib: "npm:^2.3.0" - yargs: "npm:^17.2.1" - peerDependencies: - "@angular/compiler": 16.2.4 - typescript: ">=4.9.3 <5.2" - bin: - ng-xi18n: bundles/src/bin/ng_xi18n.js - ngc: bundles/src/bin/ngc.js - ngcc: bundles/ngcc/index.js - checksum: 10/4e676ee837d95125ca04095249e3e4c3f477f1085365d6897cf691199da483a6629576e7a219cca87e16f335b9ab36bf0418d5a5e8d40257b6278044d5b74eef +"@babel/helper-environment-visitor@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/helper-environment-visitor@npm:7.18.9" + checksum: 10/b25101f6162ddca2d12da73942c08ad203d7668e06663df685634a8fde54a98bc015f6f62938e8554457a592a024108d45b8f3e651fd6dcdb877275b73cc4420 languageName: node linkType: hard -"@angular/compiler-cli@npm:17.3.11": - version: 17.3.11 - resolution: "@angular/compiler-cli@npm:17.3.11" - dependencies: - "@babel/core": "npm:7.23.9" - "@jridgewell/sourcemap-codec": "npm:^1.4.14" - chokidar: "npm:^3.0.0" - convert-source-map: "npm:^1.5.1" - reflect-metadata: "npm:^0.2.0" - semver: "npm:^7.0.0" - tslib: "npm:^2.3.0" - yargs: "npm:^17.2.1" - peerDependencies: - "@angular/compiler": 17.3.11 - typescript: ">=5.2 <5.5" - bin: - ng-xi18n: bundles/src/bin/ng_xi18n.js - ngc: bundles/src/bin/ngc.js - ngcc: bundles/ngcc/index.js - checksum: 10/9a304c06703864470529ac9d45e9851bb586d3ec0f94087b6fae10fa1d2a54fe90ab83aefca75e527c19642dd2bdbfa21a8a6336c909b4feaed0427b565d5de6 +"@babel/helper-environment-visitor@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: 10/d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 languageName: node linkType: hard -"@angular/compiler@npm:16.2.4": - version: 16.2.4 - resolution: "@angular/compiler@npm:16.2.4" +"@babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/core": 16.2.4 - peerDependenciesMeta: - "@angular/core": - optional: true - checksum: 10/2ebf4460ac27344167ad49f2e99a974a6aab1ad23b4e97f29c3d87d8229edfb9ea6d9a12ce3d56a27598127fe7ffc529d39181a8855e010e75cbf3b5b78b2ffb + "@babel/template": "npm:^7.22.15" + "@babel/types": "npm:^7.23.0" + checksum: 10/7b2ae024cd7a09f19817daf99e0153b3bf2bc4ab344e197e8d13623d5e36117ed0b110914bc248faa64e8ccd3e97971ec7b41cc6fd6163a2b980220c58dcdf6d languageName: node linkType: hard -"@angular/compiler@npm:17.3.11": - version: 17.3.11 - resolution: "@angular/compiler@npm:17.3.11" +"@babel/helper-hoist-variables@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-hoist-variables@npm:7.22.5" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/core": 17.3.11 - peerDependenciesMeta: - "@angular/core": - optional: true - checksum: 10/90fa980763cfd45cef76e0a685c25e2869c378f85903ae44932d28d1e8a390671ef6f652955c089a3c08eee670c09ebc14f95d8b058ad83bc110bf498e851670 + "@babel/types": "npm:^7.22.5" + checksum: 10/394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc languageName: node linkType: hard -"@angular/core@npm:16.2.4": - version: 16.2.4 - resolution: "@angular/core@npm:16.2.4" +"@babel/helper-module-imports@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-module-imports@npm:7.16.7" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - rxjs: ^6.5.3 || ^7.4.0 - zone.js: ~0.13.0 - checksum: 10/29a9c1ecad2e048fc7e05a2c1ba68cfb949ca2162479cc012a82f8a4af5c8734a366b71fe53c9580059202db013761b9476982db1d1e7e51bb06575affb74a3e + "@babel/types": "npm:^7.16.7" + checksum: 10/f48cb485be7cad70c3fdcbc1d6d104732565288fe5dd38575be4b6dd577aa606a0e7553078cebf91bea5182e1b059bcc5b6882cd1f8ccb9013d6c76b6ff136ff languageName: node linkType: hard -"@angular/core@npm:17.3.11": - version: 17.3.11 - resolution: "@angular/core@npm:17.3.11" +"@babel/helper-module-imports@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-module-imports@npm:7.18.6" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - rxjs: ^6.5.3 || ^7.4.0 - zone.js: ~0.14.0 - checksum: 10/728409dcebeec1fdcd4c60abed03c6c0a1e632d1c34aacdd35e9aed949ee37ed68b4f857726b1500080479a3dec29afde1d6a4510a2e67e77d25515c4951c52d + "@babel/types": "npm:^7.18.6" + checksum: 10/75b0d510271c2d220c426ec1174666febbe8ce520e66f99f87e8944acddaf5d1e88167fe500a1c8e46a770a5cb916e566d3b514ec0af6cbdac93089ed8200716 languageName: node linkType: hard -"@angular/forms@npm:16.2.4": - version: 16.2.4 - resolution: "@angular/forms@npm:16.2.4" +"@babel/helper-module-transforms@npm:^7.16.7": + version: 7.17.6 + resolution: "@babel/helper-module-transforms@npm:7.17.6" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/common": 16.2.4 - "@angular/core": 16.2.4 - "@angular/platform-browser": 16.2.4 - rxjs: ^6.5.3 || ^7.4.0 - checksum: 10/63d03d881ae853465e81a2d372769f93d6bda1904fd31c62e3b1d54514b402ad0237262df9e2a3781977b673adab87bdf5ed09efd259c79915b07fe224080701 + "@babel/helper-environment-visitor": "npm:^7.16.7" + "@babel/helper-module-imports": "npm:^7.16.7" + "@babel/helper-simple-access": "npm:^7.16.7" + "@babel/helper-split-export-declaration": "npm:^7.16.7" + "@babel/helper-validator-identifier": "npm:^7.16.7" + "@babel/template": "npm:^7.16.7" + "@babel/traverse": "npm:^7.17.3" + "@babel/types": "npm:^7.17.0" + checksum: 10/548455e05142a1def4bbfc946c1be12241a99628a2c3e25a12ec81db49a62e494c47719c7d4aa5091b73ffac0a3e2b442731ed188ff53506c93e49e9d10db82d languageName: node linkType: hard -"@angular/forms@npm:17.3.11": - version: 17.3.11 - resolution: "@angular/forms@npm:17.3.11" +"@babel/helper-module-transforms@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/helper-module-transforms@npm:7.18.9" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/common": 17.3.11 - "@angular/core": 17.3.11 - "@angular/platform-browser": 17.3.11 - rxjs: ^6.5.3 || ^7.4.0 - checksum: 10/d63fe14f80b732b8a93324bf303d07fbadbab70a37df2398033ff9f6a2e872707d92a552faaf16fc28af5fe533be9529245bbd572528396f3c2dc42a28d20eaf + "@babel/helper-environment-visitor": "npm:^7.18.9" + "@babel/helper-module-imports": "npm:^7.18.6" + "@babel/helper-simple-access": "npm:^7.18.6" + "@babel/helper-split-export-declaration": "npm:^7.18.6" + "@babel/helper-validator-identifier": "npm:^7.18.6" + "@babel/template": "npm:^7.18.6" + "@babel/traverse": "npm:^7.18.9" + "@babel/types": "npm:^7.18.9" + checksum: 10/2e64d723405071946ab3019cfde1bdf95d98a2a220802a782a920b3ce3fe7ab92caf81d11b2b7722cdb5fd0c9f428ff3b33b86478bde39520e886fefe0b67e6d languageName: node linkType: hard -"@angular/language-service@npm:16.2.4": - version: 16.2.4 - resolution: "@angular/language-service@npm:16.2.4" - checksum: 10/1a7e58361d1c76cb2a8bbba495ab936b8f9815e71d514a1d0ccae386519df69ce71f565b000d7b2b5f14ec010da7365a1b5f903267d355154a29293b1b51e0aa +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.8.0": + version: 7.16.7 + resolution: "@babel/helper-plugin-utils@npm:7.16.7" + checksum: 10/d08dd86554a186c2538547cd537552e4029f704994a9201d41d82015c10ed7f58f9036e8d1527c3760f042409163269d308b0b3706589039c5f1884619c6d4ce languageName: node linkType: hard -"@angular/language-service@npm:17.3.11": - version: 17.3.11 - resolution: "@angular/language-service@npm:17.3.11" - checksum: 10/c5ab33eadf6134cef12428a20397e29e4eefd98e78b9b43f682831ef2612bb472350328c87d73d452a1c948ab638a2ad729cace402ee593db87bfbc527a32647 +"@babel/helper-plugin-utils@npm:^7.20.2": + version: 7.20.2 + resolution: "@babel/helper-plugin-utils@npm:7.20.2" + checksum: 10/7bd5be752998e8bfa616e6fbf1fd8f1a7664039a435d5da11cfd97a320b6eb58e28156f4789b2da242a53ed45994d04632b2e19684c1209e827522a07f0cd022 languageName: node linkType: hard -"@angular/platform-browser-dynamic@npm:16.2.4": - version: 16.2.4 - resolution: "@angular/platform-browser-dynamic@npm:16.2.4" +"@babel/helper-simple-access@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-simple-access@npm:7.16.7" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/common": 16.2.4 - "@angular/compiler": 16.2.4 - "@angular/core": 16.2.4 - "@angular/platform-browser": 16.2.4 - checksum: 10/157dd89b352122692f25cf6ee36ac0152d213652103a91da072176ff527ade34fc682b54fc1eac0b08c50a8d0c4bc8a8274c022565720ba1245c848d91132114 + "@babel/types": "npm:^7.16.7" + checksum: 10/8d22c46c5ec2ead0686c4d5a3d1d12b5190c59be676bfe0d9d89df62b437b51d1a3df2ccfb8a77dded2e585176ebf12986accb6d45a18cff229eef3b10344f4b languageName: node linkType: hard -"@angular/platform-browser-dynamic@npm:17.3.11": - version: 17.3.11 - resolution: "@angular/platform-browser-dynamic@npm:17.3.11" +"@babel/helper-simple-access@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-simple-access@npm:7.18.6" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/common": 17.3.11 - "@angular/compiler": 17.3.11 - "@angular/core": 17.3.11 - "@angular/platform-browser": 17.3.11 - checksum: 10/9ef7e9c7f5f6979c1db87dcb69ea6c2883587944354f1b9976487bbe0dde41b9397808b81030729ad679d079ae803a31ae6694011bcd136ca98b990b0771ab5b + "@babel/types": "npm:^7.18.6" + checksum: 10/37cd36eef199e0517845763c1e6ff6ea5e7876d6d707a6f59c9267c547a50aa0e84260ba9285d49acfaf2cfa0a74a772d92967f32ac1024c961517d40b6c16a5 languageName: node linkType: hard -"@angular/platform-browser@npm:16.2.4": - version: 16.2.4 - resolution: "@angular/platform-browser@npm:16.2.4" +"@babel/helper-split-export-declaration@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-split-export-declaration@npm:7.16.7" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/animations": 16.2.4 - "@angular/common": 16.2.4 - "@angular/core": 16.2.4 - peerDependenciesMeta: - "@angular/animations": - optional: true - checksum: 10/222f523a7569bf3e1981b43239762e38f45d9051a7c5245b8839a960eb611bc7b0c227fa8eb700fcbcc26d264284193fcc2177e3787c271ac7d712df203d5026 + "@babel/types": "npm:^7.16.7" + checksum: 10/e10aaf135465c55114627951b79115f24bc7af72ecbb58d541d66daf1edaee5dde7cae3ec8c3639afaf74526c03ae3ce723444e3b5b3dc77140c456cd84bcaa1 languageName: node linkType: hard -"@angular/platform-browser@npm:17.3.11": - version: 17.3.11 - resolution: "@angular/platform-browser@npm:17.3.11" +"@babel/helper-split-export-declaration@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-split-export-declaration@npm:7.18.6" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/animations": 17.3.11 - "@angular/common": 17.3.11 - "@angular/core": 17.3.11 - peerDependenciesMeta: - "@angular/animations": - optional: true - checksum: 10/7b75895f139202229a95a46bdbb84f9ebc946192f2bdec0730b7048f8d835822c286d39a7d3173e12391564d3aa8b7b7336d96330b5e921a4455d0c496865976 + "@babel/types": "npm:^7.18.6" + checksum: 10/c6d3dede53878f6be1d869e03e9ffbbb36f4897c7cc1527dc96c56d127d834ffe4520a6f7e467f5b6f3c2843ea0e81a7819d66ae02f707f6ac057f3d57943a2b languageName: node linkType: hard -"@angular/router@npm:16.2.4": - version: 16.2.4 - resolution: "@angular/router@npm:16.2.4" +"@babel/helper-split-export-declaration@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/helper-split-export-declaration@npm:7.22.6" dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/common": 16.2.4 - "@angular/core": 16.2.4 - "@angular/platform-browser": 16.2.4 - rxjs: ^6.5.3 || ^7.4.0 - checksum: 10/a548d5fe344b4859acd98dd3a6c563cb0c4df50198fc9370a8466e7ca2d686354a72dcaa58483729cbd43ebc60c3c428cd9edce2da883975872341fcf8f22406 + "@babel/types": "npm:^7.22.5" + checksum: 10/e141cace583b19d9195f9c2b8e17a3ae913b7ee9b8120246d0f9ca349ca6f03cb2c001fd5ec57488c544347c0bb584afec66c936511e447fd20a360e591ac921 languageName: node linkType: hard -"@angular/router@npm:17.3.11": - version: 17.3.11 - resolution: "@angular/router@npm:17.3.11" - dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/common": 17.3.11 - "@angular/core": 17.3.11 - "@angular/platform-browser": 17.3.11 - rxjs: ^6.5.3 || ^7.4.0 - checksum: 10/cf711deee932aa1008194747c4d20334c79eb3241157ee4f56bc88ca4f93fb28566b40cd86fe4febde248298f4ba62fa0beeff6958547779c1a1b8d9cc3b9739 +"@babel/helper-string-parser@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-string-parser@npm:7.22.5" + checksum: 10/7f275a7f1a9504da06afc33441e219796352a4a3d0288a961bc14d1e30e06833a71621b33c3e60ee3ac1ff3c502d55e392bcbc0665f6f9d2629809696fab7cdd languageName: node linkType: hard -"@apideck/better-ajv-errors@npm:^0.3.1": - version: 0.3.6 - resolution: "@apideck/better-ajv-errors@npm:0.3.6" - dependencies: - json-schema: "npm:^0.4.0" - jsonpointer: "npm:^5.0.0" - leven: "npm:^3.1.0" - peerDependencies: - ajv: ">=8" - checksum: 10/d638f4d5654081b874671a5729b111d1bea5960834968847e8b05d5f57bf2f50cf29fd29d0bbb7f0077640785daacec22cf018a5f01501e276ee96d271fe8330 +"@babel/helper-string-parser@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-string-parser@npm:7.24.7" + checksum: 10/603d8d962bbe89907aa99a8f19a006759ab7b2464615f20a6a22e3e2e8375af37ddd0e5175c9e622e1c4b2d83607ffb41055a59d0ce34404502af30fde573a5c languageName: node linkType: hard -"@apidevtools/json-schema-ref-parser@npm:^11.6.2": - version: 11.6.4 - resolution: "@apidevtools/json-schema-ref-parser@npm:11.6.4" - dependencies: - "@jsdevtools/ono": "npm:^7.1.3" - "@types/json-schema": "npm:^7.0.15" - js-yaml: "npm:^4.1.0" - checksum: 10/66ab61d49d29915d7a95f452d753f5fccdc26e565262864cf3a44b838b25d8bca1961d0b285b119d1daa44321f606ddf22ee2090a49a5af5e7d348dc63c916e0 +"@babel/helper-validator-identifier@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-validator-identifier@npm:7.16.7" + checksum: 10/42b9b56c3543ded08992e8c118cb017dbde258895bd6a2e69186cb98f4f5811cd94ceedf4b5ace4877e7be07a7280aa9b9de65d1cb416064a1e0e1fd5a89fcca languageName: node linkType: hard -"@apollo/protobufjs@npm:1.2.6": - version: 1.2.6 - resolution: "@apollo/protobufjs@npm:1.2.6" - dependencies: - "@protobufjs/aspromise": "npm:^1.1.2" - "@protobufjs/base64": "npm:^1.1.2" - "@protobufjs/codegen": "npm:^2.0.4" - "@protobufjs/eventemitter": "npm:^1.1.0" - "@protobufjs/fetch": "npm:^1.1.0" - "@protobufjs/float": "npm:^1.0.2" - "@protobufjs/inquire": "npm:^1.1.0" - "@protobufjs/path": "npm:^1.1.2" - "@protobufjs/pool": "npm:^1.1.0" - "@protobufjs/utf8": "npm:^1.1.0" - "@types/long": "npm:^4.0.0" - "@types/node": "npm:^10.1.0" - long: "npm:^4.0.0" - bin: - apollo-pbjs: bin/pbjs - apollo-pbts: bin/pbts - checksum: 10/a134200f943983edbb46cdf358a5e4364599870dc9be4dbce043dfa842903cb0ad4f16e1d99f06f49cf00fbfb6ad95dbac101c9187ce723c968eeb27e6c66822 +"@babel/helper-validator-identifier@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-validator-identifier@npm:7.18.6" + checksum: 10/9386e19302aefeadcb02f1e5593e43c40adef5ed64746ee338c3772a0a423f6f339f5547bc898b5bfa904e2b4b994c020ab1fb4fe108b696ac74ebb3e4c83663 languageName: node linkType: hard -"@apollo/protobufjs@npm:1.2.7": - version: 1.2.7 - resolution: "@apollo/protobufjs@npm:1.2.7" - dependencies: - "@protobufjs/aspromise": "npm:^1.1.2" - "@protobufjs/base64": "npm:^1.1.2" - "@protobufjs/codegen": "npm:^2.0.4" - "@protobufjs/eventemitter": "npm:^1.1.0" - "@protobufjs/fetch": "npm:^1.1.0" - "@protobufjs/float": "npm:^1.0.2" - "@protobufjs/inquire": "npm:^1.1.0" - "@protobufjs/path": "npm:^1.1.2" - "@protobufjs/pool": "npm:^1.1.0" - "@protobufjs/utf8": "npm:^1.1.0" - "@types/long": "npm:^4.0.0" - long: "npm:^4.0.0" - bin: - apollo-pbjs: bin/pbjs - apollo-pbts: bin/pbts - checksum: 10/9b2c2d5daa5221397bc9cf37f3fa8a45dc6f217783d0fe51eca12895f88f8a5d1b66efba2e288657a1c2da5b2e20fe0eb649a440ceeb30bfc5a3af75ccea832d +"@babel/helper-validator-identifier@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-validator-identifier@npm:7.22.15" + checksum: 10/4c142549ab5a1235c638d89b52b612a32a123ae19b7da70708385b1e2522530b3c90c85e38604dc6a5fee6a7928b447edacd55176f48a70e103d232eb0da31e5 languageName: node linkType: hard -"@apollo/usage-reporting-protobuf@npm:^4.0.0": - version: 4.1.0 - resolution: "@apollo/usage-reporting-protobuf@npm:4.1.0" - dependencies: - "@apollo/protobufjs": "npm:1.2.7" - checksum: 10/cbc57707ab8fb6daa2b5e86f20df4697db569e497060865a43993e1fdc0aae5c747507789f1d3eb17ff2367de9f018fa72347dcdcfc9fe8d2a9058351b0b6f44 +"@babel/helper-validator-identifier@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: 10/df882d2675101df2d507b95b195ca2f86a3ef28cb711c84f37e79ca23178e13b9f0d8b522774211f51e40168bf5142be4c1c9776a150cddb61a0d5bf3e95750b languageName: node linkType: hard -"@apollo/utils.dropunuseddefinitions@npm:^1.1.0": - version: 1.1.0 - resolution: "@apollo/utils.dropunuseddefinitions@npm:1.1.0" - peerDependencies: - graphql: 14.x || 15.x || 16.x - checksum: 10/b66e07086ea65bcb94d84cfd5e6d90d0406c4e7f602c9a5e793c2001273380a4f61c287f60ee1d81d47d49d3a62ef3f0afb8049243540d3021ff445869124094 +"@babel/helper-validator-identifier@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-validator-identifier@npm:7.22.5" + checksum: 10/12cb7d4535b3f8d109a446f7bef08d20eebe94fd97b534cd415c936ab342e9634edc5c99961af976bd78bcae6e6ec4b2ab8483d0da2ac5926fbe9f7dd9ab28ab languageName: node linkType: hard -"@apollo/utils.keyvaluecache@npm:^1.0.1": - version: 1.0.2 - resolution: "@apollo/utils.keyvaluecache@npm:1.0.2" - dependencies: - "@apollo/utils.logger": "npm:^1.0.0" - lru-cache: "npm:7.10.1 - 7.13.1" - checksum: 10/353794482ad8c476e36c2152d6a647244a8cffbbc26a9b2b28986b3651aaff16b73df1dfed9edc8eb151fe7bd4c59d06b3b1b4c6b1aa516fceb8119a46fa8f72 +"@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 10/86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b languageName: node linkType: hard -"@apollo/utils.logger@npm:^1.0.0": - version: 1.0.1 - resolution: "@apollo/utils.logger@npm:1.0.1" - checksum: 10/621bd80ce43a73f97342568b712fd46fee9041212d4c7264a63676e29d17ab292773c3c21b91f8a2dffb1fe7931ece3954886bd04e3100e1765c6d05e231e2a7 +"@babel/helper-validator-option@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-validator-option@npm:7.16.7" + checksum: 10/c5ccc451911883cc9f12125d47be69434f28094475c1b9d2ada7c3452e6ac98a1ee8ddd364ca9e3f9855fcdee96cdeafa32543ebd9d17fee7a1062c202e80570 languageName: node linkType: hard -"@apollo/utils.printwithreducedwhitespace@npm:^1.1.0": - version: 1.1.0 - resolution: "@apollo/utils.printwithreducedwhitespace@npm:1.1.0" - peerDependencies: - graphql: 14.x || 15.x || 16.x - checksum: 10/86536751681c64f35a2d37b0c2f69a39d91ea0e4f0c3c993d9f76fa109f85e9d306e6994bd6e38eef1e4e5b83245125aaa125ecc94e185d90b3255f06a538503 +"@babel/helper-validator-option@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-validator-option@npm:7.18.6" + checksum: 10/f9cc6eb7cc5d759c5abf006402180f8d5e4251e9198197428a97e05d65eb2f8ae5a0ce73b1dfd2d35af41d0eb780627a64edf98a4e71f064eeeacef8de58f2cf languageName: node linkType: hard -"@apollo/utils.removealiases@npm:1.0.0": - version: 1.0.0 - resolution: "@apollo/utils.removealiases@npm:1.0.0" - peerDependencies: - graphql: 14.x || 15.x || 16.x - checksum: 10/fda30ad4ee1fbf012e4289b9963b8b75a102eadbdfa5e558dc923cfc68df42eff6e232dc20c34b7e7563e5aac7ae3781d17919cd8f5eccb90c4225a274b2af93 +"@babel/helpers@npm:^7.17.2": + version: 7.17.2 + resolution: "@babel/helpers@npm:7.17.2" + dependencies: + "@babel/template": "npm:^7.16.7" + "@babel/traverse": "npm:^7.17.0" + "@babel/types": "npm:^7.17.0" + checksum: 10/02c8b0b5f1e37bd4e1fc2505ab7925ebdf3a86e31e6e56f7dc34dee5ed7cd559d42c07b7776ccfcd80412f14b596e2e70b1edc211d8b0e6e59125db0af320201 languageName: node linkType: hard -"@apollo/utils.sortast@npm:^1.1.0": - version: 1.1.0 - resolution: "@apollo/utils.sortast@npm:1.1.0" +"@babel/helpers@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/helpers@npm:7.18.9" dependencies: - lodash.sortby: "npm:^4.7.0" - peerDependencies: - graphql: 14.x || 15.x || 16.x - checksum: 10/5ec695d8c91efd82ad75cb3e27662644c71e22be71793908135b38965be6fe1f229c24fd2f4fed1bc1829b84bec2a1f6470817a83c633d95292db7635a625471 + "@babel/template": "npm:^7.18.6" + "@babel/traverse": "npm:^7.18.9" + "@babel/types": "npm:^7.18.9" + checksum: 10/8949183b2e8d73c923fe38041e1e37815529e5a4fc2bbccf5917d86bc1b286bc8bf140b0576b2994cd6db16757d871801554a1fd6cd698f091fe133b1a430d5f languageName: node linkType: hard -"@apollo/utils.stripsensitiveliterals@npm:^1.2.0": - version: 1.2.0 - resolution: "@apollo/utils.stripsensitiveliterals@npm:1.2.0" - peerDependencies: - graphql: 14.x || 15.x || 16.x - checksum: 10/5910186a30be23fac59652d350e83a8a7a53adb9146ed545906f6893ad9c8d380752e679348ee210ae01fa39cc0487692b632e960003dcedc2282bd28de2aa01 +"@babel/highlight@npm:^7.16.7": + version: 7.16.10 + resolution: "@babel/highlight@npm:7.16.10" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.16.7" + chalk: "npm:^2.0.0" + js-tokens: "npm:^4.0.0" + checksum: 10/1f1bdd752a90844f4efc22166a46303fb651ba0fd75a06daba3ebae2575ab3edc1da9827c279872a3aaf305f50a18473c5fa1966752726a2b253065fd4c0745e languageName: node linkType: hard -"@apollo/utils.usagereporting@npm:^1.0.0": - version: 1.0.1 - resolution: "@apollo/utils.usagereporting@npm:1.0.1" - dependencies: - "@apollo/usage-reporting-protobuf": "npm:^4.0.0" - "@apollo/utils.dropunuseddefinitions": "npm:^1.1.0" - "@apollo/utils.printwithreducedwhitespace": "npm:^1.1.0" - "@apollo/utils.removealiases": "npm:1.0.0" - "@apollo/utils.sortast": "npm:^1.1.0" - "@apollo/utils.stripsensitiveliterals": "npm:^1.2.0" - peerDependencies: - graphql: 14.x || 15.x || 16.x - checksum: 10/9ffd30e60543163dfb112167024b4fb89113974aba7255350b46eafceaf49b267b2660f36e36654c3e97a1676877fe0b17cb3586b2ead4d0abb85b9f4a86916a +"@babel/highlight@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/highlight@npm:7.18.6" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.18.6" + chalk: "npm:^2.0.0" + js-tokens: "npm:^4.0.0" + checksum: 10/92d8ee61549de5ff5120e945e774728e5ccd57fd3b2ed6eace020ec744823d4a98e242be1453d21764a30a14769ecd62170fba28539b211799bbaf232bbb2789 languageName: node linkType: hard -"@apollographql/apollo-tools@npm:^0.5.3": - version: 0.5.4 - resolution: "@apollographql/apollo-tools@npm:0.5.4" - peerDependencies: - graphql: ^14.2.1 || ^15.0.0 || ^16.0.0 - checksum: 10/4f69566d23ffb77ffedd87c679dcab608400f297e4cd5423151977b917737c427015485a8e0436feeb5154574171742ab626fb1a8f5ae2739070757976fd49f2 +"@babel/highlight@npm:^7.22.13": + version: 7.22.13 + resolution: "@babel/highlight@npm:7.22.13" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.22.5" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + checksum: 10/cb6053267f6485c7e315bad437829d8e9e6df5d29d02c23318199f45b4ac8bf256ed41d70445314041e51fad446a511017b8e6a140993cd2edd748c39bf8d351 languageName: node linkType: hard -"@apollographql/graphql-playground-html@npm:1.6.29": - version: 1.6.29 - resolution: "@apollographql/graphql-playground-html@npm:1.6.29" - dependencies: - xss: "npm:^1.0.8" - checksum: 10/5e45cdc122dbc18c71f89fd9be8c19d1e35417ea27d3915206438d351f7775894957cd5b8bb378921bb96a8f6e6a9d182ce3d674abaddefd36a3a7e9cf6f1e68 +"@babel/parser@npm:7.24.7, @babel/parser@npm:^7.21.8": + version: 7.24.7 + resolution: "@babel/parser@npm:7.24.7" + bin: + parser: ./bin/babel-parser.js + checksum: 10/ef9ebce60e13db560ccc7af9235d460f6726bb7e23ae2d675098c1fc43d5249067be60d4118889dad33b1d4f85162cf66baf554719e1669f29bb20e71322568e languageName: node linkType: hard -"@aries-framework/anoncreds-rs@npm:0.5.0-alpha.71": - version: 0.5.0-alpha.71 - resolution: "@aries-framework/anoncreds-rs@npm:0.5.0-alpha.71" - dependencies: - "@aries-framework/anoncreds": "npm:0.5.0-alpha.71+4c08179b" - "@aries-framework/core": "npm:0.5.0-alpha.71+4c08179b" - class-transformer: "npm:^0.5.1" - class-validator: "npm:0.14.0" - rxjs: "npm:^7.2.0" - tsyringe: "npm:^4.8.0" - peerDependencies: - "@hyperledger/anoncreds-shared": ^0.2.0-dev.4 - checksum: 10/f75b9c176f020e6bc51c9acce338d8848512897b435138698f239b867e8ec5b55456d5660043a98e71d61d86bd481df96347b6b601bb9eb54007e1827a5fe669 +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.16.7, @babel/parser@npm:^7.17.3": + version: 7.17.3 + resolution: "@babel/parser@npm:7.17.3" + bin: + parser: ./bin/babel-parser.js + checksum: 10/2d45750cdf0565842a1210928534f73dacfbfd3c45be6e85961e34e8c7d74643721f802d331fad3bfdcc783fb5ab8703432e43c9e7b460588ec6ee26242793be languageName: node linkType: hard -"@aries-framework/anoncreds@npm:0.5.0-alpha.58+17854790": - version: 0.5.0-alpha.58 - resolution: "@aries-framework/anoncreds@npm:0.5.0-alpha.58" - dependencies: - "@aries-framework/core": "npm:0.5.0-alpha.58+17854790" - bn.js: "npm:^5.2.1" - class-transformer: "npm:0.5.1" - class-validator: "npm:0.14.0" - reflect-metadata: "npm:^0.1.13" - checksum: 10/9c84ed992d42679563e6b9d912f06a6bacdfec58c614e94d4f72163523d880226089caa6aa0e0b371fa2e839b9daeb5a134257bebef1638dbc53b2bd5ec7b785 +"@babel/parser@npm:^7.18.6, @babel/parser@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/parser@npm:7.18.9" + bin: + parser: ./bin/babel-parser.js + checksum: 10/5f1c4151e264207dfaed09daa23eaa41920a2a2e1423ca7f4f34adcc9008e220a229e1640889f03f882e6c85f1b12daed965a0a11ab6ff726cbba97871142bec languageName: node linkType: hard -"@aries-framework/anoncreds@npm:0.5.0-alpha.71, @aries-framework/anoncreds@npm:0.5.0-alpha.71+4c08179b": - version: 0.5.0-alpha.71 - resolution: "@aries-framework/anoncreds@npm:0.5.0-alpha.71" - dependencies: - "@aries-framework/core": "npm:0.5.0-alpha.71+4c08179b" - bn.js: "npm:^5.2.1" - class-transformer: "npm:0.5.1" - class-validator: "npm:0.14.0" - reflect-metadata: "npm:^0.1.13" - checksum: 10/4570154f307564d9af023b677d98349f6e11e74013e00bcdaced063becd9ee686424ce9041085004197ce1f1e37cd89e1a553e081470840bf3cea14f0abe7cdb +"@babel/parser@npm:^7.22.15": + version: 7.22.16 + resolution: "@babel/parser@npm:7.22.16" + bin: + parser: ./bin/babel-parser.js + checksum: 10/220df7dc0dbe8bc73540e66123f9c45ae3e5db40738fc1e97579205364240bed3e9724fc737c0828f9d46c96ce9b23728314f598e5bf8a62566ccef539d15bdf languageName: node linkType: hard -"@aries-framework/askar@npm:0.5.0-alpha.58": - version: 0.5.0-alpha.58 - resolution: "@aries-framework/askar@npm:0.5.0-alpha.58" - dependencies: - "@aries-framework/core": "npm:0.5.0-alpha.58+17854790" - bn.js: "npm:^5.2.1" - class-transformer: "npm:0.5.1" - class-validator: "npm:0.14.0" - rxjs: "npm:^7.2.0" - tsyringe: "npm:^4.8.0" - peerDependencies: - "@hyperledger/aries-askar-shared": ^0.2.0-dev.1 - checksum: 10/596a02f7e6b50a88fa96727977a9a54e87d731be43474c680eeb5dcd7949bfed58c39fb2f97fa0e4654164fb13e5029fd5ba83c8f967e8bbc517bb49e88f3eed +"@babel/parser@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/parser@npm:7.23.0" + bin: + parser: ./bin/babel-parser.js + checksum: 10/201641e068f8cca1ff12b141fcba32d7ccbabc586961bd1b85ae89d9695867f84d57fc2e1176dc4981fd28e5e97ca0e7c32cd688bd5eabb641a302abc0cb5040 languageName: node linkType: hard -"@aries-framework/askar@npm:0.5.0-alpha.71": - version: 0.5.0-alpha.71 - resolution: "@aries-framework/askar@npm:0.5.0-alpha.71" +"@babel/plugin-proposal-object-rest-spread@npm:^7.5.5": + version: 7.17.3 + resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.17.3" dependencies: - "@aries-framework/core": "npm:0.5.0-alpha.71+4c08179b" - bn.js: "npm:^5.2.1" - class-transformer: "npm:0.5.1" - class-validator: "npm:0.14.0" - rxjs: "npm:^7.2.0" - tsyringe: "npm:^4.8.0" - peerDependencies: - "@hyperledger/aries-askar-shared": ^0.2.0-dev.1 - checksum: 10/ee35e7565cd8a69503afacbe4c5cc95fd169a278a7c81f5f682b2cc680a3187059a52949cff13d759e57cae479c837cd2d3b73fe76e948262566c0330ac24f5b - languageName: node - linkType: hard - -"@aries-framework/core@npm:0.5.0-alpha.58, @aries-framework/core@npm:0.5.0-alpha.58+17854790": - version: 0.5.0-alpha.58 - resolution: "@aries-framework/core@npm:0.5.0-alpha.58" - dependencies: - "@digitalcredentials/jsonld": "npm:^5.2.1" - "@digitalcredentials/jsonld-signatures": "npm:^9.3.1" - "@digitalcredentials/vc": "npm:^1.1.2" - "@multiformats/base-x": "npm:^4.0.1" - "@stablelib/ed25519": "npm:^1.0.2" - "@stablelib/random": "npm:^1.0.1" - "@stablelib/sha256": "npm:^1.0.1" - "@types/node-fetch": "npm:2.6.2" - "@types/ws": "npm:^8.5.4" - abort-controller: "npm:^3.0.0" - big-integer: "npm:^1.6.51" - borc: "npm:^3.0.0" - buffer: "npm:^6.0.3" - class-transformer: "npm:0.5.1" - class-validator: "npm:0.14.0" - did-resolver: "npm:^4.1.0" - lru_map: "npm:^0.4.1" - luxon: "npm:^3.3.0" - make-error: "npm:^1.3.6" - object-inspect: "npm:^1.10.3" - query-string: "npm:^7.0.1" - reflect-metadata: "npm:^0.1.13" - rxjs: "npm:^7.2.0" - tsyringe: "npm:^4.8.0" - uuid: "npm:^9.0.0" - varint: "npm:^6.0.0" - web-did-resolver: "npm:^2.0.21" - checksum: 10/647d3038aecda4b29f1943d2036f4c5135aa32c830c3097400cecbb123d615e712b7467c8889373d4b665af83be5c51731f373c48b7aa2539f0bce183fae3d67 - languageName: node - linkType: hard - -"@aries-framework/core@npm:0.5.0-alpha.71, @aries-framework/core@npm:0.5.0-alpha.71+4c08179b": - version: 0.5.0-alpha.71 - resolution: "@aries-framework/core@npm:0.5.0-alpha.71" - dependencies: - "@digitalcredentials/jsonld": "npm:^5.2.1" - "@digitalcredentials/jsonld-signatures": "npm:^9.3.1" - "@digitalcredentials/vc": "npm:^1.1.2" - "@multiformats/base-x": "npm:^4.0.1" - "@stablelib/ed25519": "npm:^1.0.2" - "@stablelib/random": "npm:^1.0.1" - "@stablelib/sha256": "npm:^1.0.1" - "@types/ws": "npm:^8.5.4" - abort-controller: "npm:^3.0.0" - big-integer: "npm:^1.6.51" - borc: "npm:^3.0.0" - buffer: "npm:^6.0.3" - class-transformer: "npm:0.5.1" - class-validator: "npm:0.14.0" - did-resolver: "npm:^4.1.0" - lru_map: "npm:^0.4.1" - luxon: "npm:^3.3.0" - make-error: "npm:^1.3.6" - object-inspect: "npm:^1.10.3" - query-string: "npm:^7.0.1" - reflect-metadata: "npm:^0.1.13" - rxjs: "npm:^7.2.0" - tsyringe: "npm:^4.8.0" - uuid: "npm:^9.0.0" - varint: "npm:^6.0.0" - web-did-resolver: "npm:^2.0.21" - checksum: 10/70227b0085d9f364aa21a81ac6bedc851c637e8ae9495cfa4fbb4dc04090811c678f0f9aa767471252981f08ea2227dfecad297c03c9caca114a5e9b2724f817 - languageName: node - linkType: hard - -"@aries-framework/indy-sdk@npm:0.5.0-alpha.71": - version: 0.5.0-alpha.71 - resolution: "@aries-framework/indy-sdk@npm:0.5.0-alpha.71" - dependencies: - "@aries-framework/anoncreds": "npm:0.5.0-alpha.71+4c08179b" - "@aries-framework/core": "npm:0.5.0-alpha.71+4c08179b" - "@stablelib/ed25519": "npm:^1.0.3" - "@types/indy-sdk": "npm:1.16.27" - class-transformer: "npm:0.5.1" - class-validator: "npm:0.14.0" - rxjs: "npm:^7.2.0" - tsyringe: "npm:^4.8.0" - checksum: 10/dd4df76ba4c6fa0f3895d492d89bf65bc16deda5a5ba924505acf246862f8fd3536e3a07dc82e94c020dc7b55b082fa491b18addbd5c427497d84bccb3052f30 - languageName: node - linkType: hard - -"@aries-framework/indy-vdr@npm:0.5.0-alpha.58": - version: 0.5.0-alpha.58 - resolution: "@aries-framework/indy-vdr@npm:0.5.0-alpha.58" - dependencies: - "@aries-framework/anoncreds": "npm:0.5.0-alpha.58+17854790" - "@aries-framework/core": "npm:0.5.0-alpha.58+17854790" + "@babel/compat-data": "npm:^7.17.0" + "@babel/helper-compilation-targets": "npm:^7.16.7" + "@babel/helper-plugin-utils": "npm:^7.16.7" + "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" + "@babel/plugin-transform-parameters": "npm:^7.16.7" peerDependencies: - "@hyperledger/indy-vdr-shared": ^0.2.0-dev.3 - checksum: 10/9da65fbac9c378a79b43e7b0556ad82334648a94388fd3d9cdee161336ce0b4d28e76bd787785d32a595739415068175c89ad8bea4e1b19d4834d9107f645b34 + "@babel/core": ^7.0.0-0 + checksum: 10/6fdb79f8ac80098a96e8570ca4302d3759e28be536f4763df87a81e3f0d8e5fc573a351f2cfbbd80893156c7644cd7f14928907eefe7b3d6f1d298e329991c63 languageName: node linkType: hard -"@aries-framework/indy-vdr@npm:0.5.0-alpha.71": - version: 0.5.0-alpha.71 - resolution: "@aries-framework/indy-vdr@npm:0.5.0-alpha.71" +"@babel/plugin-syntax-async-generators@npm:^7.8.4": + version: 7.8.4 + resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" dependencies: - "@aries-framework/anoncreds": "npm:0.5.0-alpha.71+4c08179b" - "@aries-framework/core": "npm:0.5.0-alpha.71+4c08179b" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: - "@hyperledger/indy-vdr-shared": ^0.2.0-dev.5 - checksum: 10/ab5da73c37be329d223858e6637fd7b1104413e1b5f721cd76c8a2b8059522415b8becadea4cb5d8ed82e0a5c65e9435e4e630adf1d9e8996f1d2d7b4830e91f + "@babel/core": ^7.0.0-0 + checksum: 10/7ed1c1d9b9e5b64ef028ea5e755c0be2d4e5e4e3d6cf7df757b9a8c4cfa4193d268176d0f1f7fbecdda6fe722885c7fda681f480f3741d8a2d26854736f05367 languageName: node linkType: hard -"@aries-framework/node@npm:0.5.0-alpha.58": - version: 0.5.0-alpha.58 - resolution: "@aries-framework/node@npm:0.5.0-alpha.58" +"@babel/plugin-syntax-bigint@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" dependencies: - "@2060.io/ffi-napi": "npm:^4.0.8" - "@2060.io/ref-napi": "npm:^3.0.6" - "@aries-framework/core": "npm:0.5.0-alpha.58+17854790" - "@types/express": "npm:^4.17.15" - express: "npm:^4.17.1" - node-fetch: "npm:^2.6.1" - ws: "npm:^8.13.0" - checksum: 10/86490c4b356ee400ffa2947b1c507148cc35752a03fedbaeabc4ddf9bdef776cc437a7ba5a8e4674e696d464e014e3a87553da554793def1c4e0f86260a1e97e + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/3a10849d83e47aec50f367a9e56a6b22d662ddce643334b087f9828f4c3dd73bdc5909aaeabe123fed78515767f9ca43498a0e621c438d1cd2802d7fae3c9648 languageName: node linkType: hard -"@aries-framework/node@npm:0.5.0-alpha.71": - version: 0.5.0-alpha.71 - resolution: "@aries-framework/node@npm:0.5.0-alpha.71" +"@babel/plugin-syntax-class-properties@npm:^7.8.3": + version: 7.12.13 + resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" dependencies: - "@2060.io/ffi-napi": "npm:^4.0.8" - "@2060.io/ref-napi": "npm:^3.0.6" - "@aries-framework/core": "npm:0.5.0-alpha.71+4c08179b" - "@types/express": "npm:^4.17.15" - express: "npm:^4.17.1" - ws: "npm:^8.13.0" - checksum: 10/8c060881d3553b2d6d03dc792b9133f7a9f66d609e461c7c983218a3c052512b875893e8945dda6242182704d4f5a2033a52f3fa08a5af9c7f5628592a1709a1 + "@babel/helper-plugin-utils": "npm:^7.12.13" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/24f34b196d6342f28d4bad303612d7ff566ab0a013ce89e775d98d6f832969462e7235f3e7eaf17678a533d4be0ba45d3ae34ab4e5a9dcbda5d98d49e5efa2fc languageName: node linkType: hard -"@assemblyscript/loader@npm:^0.10.1": - version: 0.10.1 - resolution: "@assemblyscript/loader@npm:0.10.1" - checksum: 10/62f3a070052f578c28bdb860b046c6a079f03755fd5b1c97cc4dd17869c1f292fd50cbafc5fb804073d71ba6b6a50b8bce976724d8a0ce402ffe8957e9a5b9ec +"@babel/plugin-syntax-import-meta@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.10.4" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/166ac1125d10b9c0c430e4156249a13858c0366d38844883d75d27389621ebe651115cb2ceb6dc011534d5055719fa1727b59f39e1ab3ca97820eef3dcab5b9b languageName: node linkType: hard -"@azure/abort-controller@npm:^1.0.0": - version: 1.0.4 - resolution: "@azure/abort-controller@npm:1.0.4" +"@babel/plugin-syntax-json-strings@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" dependencies: - tslib: "npm:^2.0.0" - checksum: 10/961855736b70f0576346d77537ceb49e1ad7808dd1b287dac732046a7e93f1dba9ebd9cda3bd1bad1a8d1ff1835601b12636a44443e169e2b6353404895f1b39 + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/bf5aea1f3188c9a507e16efe030efb996853ca3cadd6512c51db7233cc58f3ac89ff8c6bdfb01d30843b161cfe7d321e1bf28da82f7ab8d7e6bc5464666f354a languageName: node linkType: hard -"@azure/core-asynciterator-polyfill@npm:^1.0.0": - version: 1.0.2 - resolution: "@azure/core-asynciterator-polyfill@npm:1.0.2" - checksum: 10/ccdad3bcf3f670e0b4f52e421cd1566368dce36ea4b3cb18a9b554c14ea0c1436868cb55e774b2377307dcb222e4eb3777b48e97249157c612e9c24654a56d16 +"@babel/plugin-syntax-jsx@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/plugin-syntax-jsx@npm:7.16.7" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.16.7" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/cd9b0e53c50e8ddb0afaf0f42e0b221a94e4f59aee32a591364266a31195c48cac5fef288d02c1c935686bda982d2e0f1ed61cceb995fc9f6fb09ef5ebecdd2b languageName: node linkType: hard -"@azure/core-auth@npm:^1.3.0": - version: 1.3.2 - resolution: "@azure/core-auth@npm:1.3.2" +"@babel/plugin-syntax-jsx@npm:^7.7.2": + version: 7.21.4 + resolution: "@babel/plugin-syntax-jsx@npm:7.21.4" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/e0e1311d91375cd3fb1d8d24ef5ee4c987b226b894dc247f640db73c7339ee8c86c145fac411d64bc59665929b15ed1587a9b6b439cc058807183ffe7cf71817 + "@babel/helper-plugin-utils": "npm:^7.20.2" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/bb7309402a1d4e155f32aa0cf216e1fa8324d6c4cfd248b03280028a015a10e46b6efd6565f515f8913918a3602b39255999c06046f7d4b8a5106be2165d724a languageName: node linkType: hard -"@azure/core-auth@npm:^1.4.0, @azure/core-auth@npm:^1.5.0": - version: 1.5.0 - resolution: "@azure/core-auth@npm:1.5.0" +"@babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-util": "npm:^1.1.0" - tslib: "npm:^2.2.0" - checksum: 10/07d93f672e9381c40c2c71ddbd9bbf9f0c6f617acd51ecf7d3481373076cb13921788512c5c5a8ad42ff3c1c9e610d56e0f6e02198924f4a3ec3b958b2dffc9f + "@babel/helper-plugin-utils": "npm:^7.10.4" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/aff33577037e34e515911255cdbb1fd39efee33658aa00b8a5fd3a4b903585112d037cce1cc9e4632f0487dc554486106b79ccd5ea63a2e00df4363f6d4ff886 languageName: node linkType: hard -"@azure/core-client@npm:^1.4.0": - version: 1.7.3 - resolution: "@azure/core-client@npm:1.7.3" - dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-auth": "npm:^1.4.0" - "@azure/core-rest-pipeline": "npm:^1.9.1" - "@azure/core-tracing": "npm:^1.0.0" - "@azure/core-util": "npm:^1.0.0" - "@azure/logger": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/8564d001b3edddb394b0a1a9590864748899aa512a4a12945cdc7e187dfd8a998acb98fd66ce3b830eda6e54f89107aea4f70aa7fd885b8bee1d9e14d4cb7150 - languageName: node - linkType: hard - -"@azure/core-http@npm:^2.0.0": - version: 2.2.4 - resolution: "@azure/core-http@npm:2.2.4" - dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-asynciterator-polyfill": "npm:^1.0.0" - "@azure/core-auth": "npm:^1.3.0" - "@azure/core-tracing": "npm:1.0.0-preview.13" - "@azure/logger": "npm:^1.0.0" - "@types/node-fetch": "npm:^2.5.0" - "@types/tunnel": "npm:^0.0.3" - form-data: "npm:^4.0.0" - node-fetch: "npm:^2.6.7" - process: "npm:^0.11.10" - tough-cookie: "npm:^4.0.0" - tslib: "npm:^2.2.0" - tunnel: "npm:^0.0.6" - uuid: "npm:^8.3.0" - xml2js: "npm:^0.4.19" - checksum: 10/9b7155799c1cf286281a7ef3bd858e81f46e3f0cfa9d9ac2a393a1acee8a98c39308e23f033291b76acfb38e75c079441831b76ecc84e8848f8e49dcae4ba3e1 +"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/87aca4918916020d1fedba54c0e232de408df2644a425d153be368313fdde40d96088feed6c4e5ab72aac89be5d07fef2ddf329a15109c5eb65df006bf2580d1 languageName: node linkType: hard -"@azure/core-lro@npm:^2.0.0": - version: 2.2.3 - resolution: "@azure/core-lro@npm:2.2.3" +"@babel/plugin-syntax-numeric-separator@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-tracing": "npm:1.0.0-preview.13" - "@azure/logger": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/626dbe74ad4044e95c29f901df6aae1e68461d07648767d4210630ecc4a4277fba0d867f2c4bf0b7ca76260ceada906b3ac6dc64057a2bbcb35ec8cafa06d35c + "@babel/helper-plugin-utils": "npm:^7.10.4" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/01ec5547bd0497f76cc903ff4d6b02abc8c05f301c88d2622b6d834e33a5651aa7c7a3d80d8d57656a4588f7276eba357f6b7e006482f5b564b7a6488de493a1 languageName: node linkType: hard -"@azure/core-paging@npm:^1.1.1": - version: 1.2.1 - resolution: "@azure/core-paging@npm:1.2.1" +"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" dependencies: - "@azure/core-asynciterator-polyfill": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/3f5abeca2b73b0d9b0ac78ac525a022db847695bb0a35226b82899fcfedd9d3dcb4cbe4f9fe91f8a99bbc6d74fc5a91c8b7972e823ff591b30b7549a96cccec1 + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/fddcf581a57f77e80eb6b981b10658421bc321ba5f0a5b754118c6a92a5448f12a0c336f77b8abf734841e102e5126d69110a306eadb03ca3e1547cab31f5cbf languageName: node linkType: hard -"@azure/core-rest-pipeline@npm:^1.1.0": - version: 1.5.0 - resolution: "@azure/core-rest-pipeline@npm:1.5.0" +"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-auth": "npm:^1.3.0" - "@azure/core-tracing": "npm:1.0.0-preview.13" - "@azure/logger": "npm:^1.0.0" - form-data: "npm:^4.0.0" - http-proxy-agent: "npm:^4.0.1" - https-proxy-agent: "npm:^5.0.0" - tslib: "npm:^2.2.0" - uuid: "npm:^8.3.0" - checksum: 10/dc4664bb699904f3819c767d978d419d3fb38faf6f647fac6b4001466a4e1587e9115dc39ccc423943315c08d7fb7eaf06f6a4a35e67c18247d0da346ef22963 + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/910d90e72bc90ea1ce698e89c1027fed8845212d5ab588e35ef91f13b93143845f94e2539d831dc8d8ededc14ec02f04f7bd6a8179edd43a326c784e7ed7f0b9 languageName: node linkType: hard -"@azure/core-rest-pipeline@npm:^1.9.1": - version: 1.12.1 - resolution: "@azure/core-rest-pipeline@npm:1.12.1" +"@babel/plugin-syntax-optional-chaining@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-auth": "npm:^1.4.0" - "@azure/core-tracing": "npm:^1.0.1" - "@azure/core-util": "npm:^1.3.0" - "@azure/logger": "npm:^1.0.0" - form-data: "npm:^4.0.0" - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.0" - tslib: "npm:^2.2.0" - checksum: 10/1cd652745d2ace10733b94b24e2ca5dabb2aa2ff39f2a676f7451aff543fce97a3667175f1aa3d2b66ff25665118c8373116919295879b527fa1b4c4042b5962 + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/eef94d53a1453361553c1f98b68d17782861a04a392840341bc91780838dd4e695209c783631cf0de14c635758beafb6a3a65399846ffa4386bff90639347f30 languageName: node linkType: hard -"@azure/core-tracing@npm:1.0.0-preview.13": - version: 1.0.0-preview.13 - resolution: "@azure/core-tracing@npm:1.0.0-preview.13" +"@babel/plugin-syntax-top-level-await@npm:^7.8.3": + version: 7.14.5 + resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" dependencies: - "@opentelemetry/api": "npm:^1.0.1" - tslib: "npm:^2.2.0" - checksum: 10/7a1832fdc7e3a6330a7714b68dcfc210258e52e1f003aaeb8174e0d6675466caf9bb11d977891d0445808119df4ab9045fb6d2888be4a4b6efa1404f02af5a9d + "@babel/helper-plugin-utils": "npm:^7.14.5" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/bbd1a56b095be7820029b209677b194db9b1d26691fe999856462e66b25b281f031f3dfd91b1619e9dcf95bebe336211833b854d0fb8780d618e35667c2d0d7e languageName: node linkType: hard -"@azure/core-tracing@npm:^1.0.0, @azure/core-tracing@npm:^1.0.1": - version: 1.0.1 - resolution: "@azure/core-tracing@npm:1.0.1" +"@babel/plugin-syntax-typescript@npm:^7.7.2": + version: 7.16.7 + resolution: "@babel/plugin-syntax-typescript@npm:7.16.7" dependencies: - tslib: "npm:^2.2.0" - checksum: 10/13305f936d695d465df4f66bc259bf261ea81511d8c40f983b1aa198d04107342f210f5710ee53140cc6a5a4655af4e6a1b8aac3835632e1afc85ad40a097490 + "@babel/helper-plugin-utils": "npm:^7.16.7" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/661e636060609ede9a402e22603b01784c21fabb0a637e65f561c8159351fe0130bbc11fdefe31902107885e3332fc34d95eb652ac61d3f61f2d61f5da20609e languageName: node linkType: hard -"@azure/core-util@npm:^1.0.0, @azure/core-util@npm:^1.1.0, @azure/core-util@npm:^1.3.0": - version: 1.5.0 - resolution: "@azure/core-util@npm:1.5.0" +"@babel/plugin-transform-destructuring@npm:^7.5.0": + version: 7.17.3 + resolution: "@babel/plugin-transform-destructuring@npm:7.17.3" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/2dd97919d37f7c89ddaaf85ee58f298a1f8cf5cfc43c2c8bf2645752186f3e7627937307e1907b5c2d28c12aa285534c552d3019fc33a07520926fac66cee4d8 + "@babel/helper-plugin-utils": "npm:^7.16.7" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/5d5701d9f0d5276b1f16455bdf521698da33613f8f653832bdc216fda4a3187c2111f7a3743fef46d0a1651546420bbf5d9066316cf9e799a89307729f3cc8d0 languageName: node linkType: hard -"@azure/identity@npm:4.2.1": - version: 4.2.1 - resolution: "@azure/identity@npm:4.2.1" - dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-auth": "npm:^1.5.0" - "@azure/core-client": "npm:^1.4.0" - "@azure/core-rest-pipeline": "npm:^1.1.0" - "@azure/core-tracing": "npm:^1.0.0" - "@azure/core-util": "npm:^1.3.0" - "@azure/logger": "npm:^1.0.0" - "@azure/msal-browser": "npm:^3.11.1" - "@azure/msal-node": "npm:^2.9.2" - events: "npm:^3.0.0" - jws: "npm:^4.0.0" - open: "npm:^8.0.0" - stoppable: "npm:^1.1.0" - tslib: "npm:^2.2.0" - checksum: 10/56adf3313ae52410d15dc760fe41a56e07f08c7629a7f61d2788a49345e313037a70bc1c82b5beb950f1bbf50e79f9726c58aa7fe335b8785a4c542a88a9c5fa - languageName: node - linkType: hard - -"@azure/keyvault-secrets@npm:4.3.0": - version: 4.3.0 - resolution: "@azure/keyvault-secrets@npm:4.3.0" +"@babel/plugin-transform-parameters@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/plugin-transform-parameters@npm:7.16.7" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-http": "npm:^2.0.0" - "@azure/core-lro": "npm:^2.0.0" - "@azure/core-paging": "npm:^1.1.1" - "@azure/core-tracing": "npm:1.0.0-preview.13" - "@azure/logger": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/d0a0a2de97047562c9f1494953d2d46a900508746801a9f5b1395bd1d548d352872e77f2dc1bd9f31aa7e267ccbbaacf7dbe2a84eef7b9f545a52e45be24c949 + "@babel/helper-plugin-utils": "npm:^7.16.7" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/000fabb790d9f744cf39674eed804bb312e493d3c38dcc474c6b212cfc3068b3e320d871049dff5c460b6521e7ef88b6bdff54d8cc5dfae77cb7ae5a7733433e languageName: node linkType: hard -"@azure/logger@npm:^1.0.0": - version: 1.0.3 - resolution: "@azure/logger@npm:1.0.3" +"@babel/plugin-transform-react-jsx@npm:^7.3.0": + version: 7.17.3 + resolution: "@babel/plugin-transform-react-jsx@npm:7.17.3" dependencies: - tslib: "npm:^2.2.0" - checksum: 10/35115b374a17b6f06370deb0348d40290ba92eec8526402f622f93cb794c763fb027f675c10658a8122cca15792e8545d8dea2d1c000e10b0d6c7e27106b2abc + "@babel/helper-annotate-as-pure": "npm:^7.16.7" + "@babel/helper-module-imports": "npm:^7.16.7" + "@babel/helper-plugin-utils": "npm:^7.16.7" + "@babel/plugin-syntax-jsx": "npm:^7.16.7" + "@babel/types": "npm:^7.17.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/d3de8c08858d8c79ecc5ee26c65567f3a187529bd936951d673454226154889c67aa634a79dd8b80e0b8e6119eed46e7432402095201bb5cce8007de73d8c333 languageName: node linkType: hard -"@azure/msal-browser@npm:^3.11.1": - version: 3.17.0 - resolution: "@azure/msal-browser@npm:3.17.0" +"@babel/template@npm:^7.16.7, @babel/template@npm:^7.3.3": + version: 7.16.7 + resolution: "@babel/template@npm:7.16.7" dependencies: - "@azure/msal-common": "npm:14.12.0" - checksum: 10/0ff3c7e8abfdc2eed9cf22b72bae413d2e251025113789fec82564f4badfda7812a3d954029ffdbfa1aba48dcf4b2040ee6322d9125326e9aa1ed31f8ac08839 + "@babel/code-frame": "npm:^7.16.7" + "@babel/parser": "npm:^7.16.7" + "@babel/types": "npm:^7.16.7" + checksum: 10/f35836a8cd53663508bc5e0b13e7fe3d646197fc1baa74c21d3a713c0c91d39fe6f6c5be8ec1ec139b3d0a00443ab1b8cc7ddf88c6ceb6f9fcf7ea0ae7594eca languageName: node linkType: hard -"@azure/msal-common@npm:14.12.0": - version: 14.12.0 - resolution: "@azure/msal-common@npm:14.12.0" - checksum: 10/5a0905beae17e20d66b352425dfd86d41ddf402f3c2c324aacf0590844e61c2c13ed439c3c63a1d7b4d3861b8d885ed11b7f257373facefe8fa3dc63455ee9c2 +"@babel/template@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/template@npm:7.18.6" + dependencies: + "@babel/code-frame": "npm:^7.18.6" + "@babel/parser": "npm:^7.18.6" + "@babel/types": "npm:^7.18.6" + checksum: 10/6b57edbe71168d82e05198d03e7be2e234c6f438789f26d09e3b05f010faf5cc51c352c99e09aa8e915ac4b084b1f7609a21617b4a9304baab857edeea456128 languageName: node linkType: hard -"@azure/msal-node@npm:^2.9.2": - version: 2.9.2 - resolution: "@azure/msal-node@npm:2.9.2" +"@babel/template@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/template@npm:7.22.15" dependencies: - "@azure/msal-common": "npm:14.12.0" - jsonwebtoken: "npm:^9.0.0" - uuid: "npm:^8.3.0" - checksum: 10/0cbaa209291a300515ab94883b9920ba7fa66b11e34428214e46384c3ab12c6e159904ed0a3190e2babf6509780f855f8c4345c07af9bafca0a94d68ff838ba5 + "@babel/code-frame": "npm:^7.22.13" + "@babel/parser": "npm:^7.22.15" + "@babel/types": "npm:^7.22.15" + checksum: 10/21e768e4eed4d1da2ce5d30aa51db0f4d6d8700bc1821fec6292587df7bba2fe1a96451230de8c64b989740731888ebf1141138bfffb14cacccf4d05c66ad93f languageName: node linkType: hard -"@babel/code-frame@npm:7.0.0-beta.51": - version: 7.0.0-beta.51 - resolution: "@babel/code-frame@npm:7.0.0-beta.51" +"@babel/traverse@npm:>=7.23.2": + version: 7.23.2 + resolution: "@babel/traverse@npm:7.23.2" dependencies: - "@babel/highlight": "npm:7.0.0-beta.51" - checksum: 10/99706ada90c4b1ee3118f367512d945caea5ccf90332bd2ab7ffabfa176e15eabf497d52a787a9a77aec87cc3024eb7591de2863fd67a39b85d386b0aa4021aa + "@babel/code-frame": "npm:^7.22.13" + "@babel/generator": "npm:^7.23.0" + "@babel/helper-environment-visitor": "npm:^7.22.20" + "@babel/helper-function-name": "npm:^7.23.0" + "@babel/helper-hoist-variables": "npm:^7.22.5" + "@babel/helper-split-export-declaration": "npm:^7.22.6" + "@babel/parser": "npm:^7.23.0" + "@babel/types": "npm:^7.23.0" + debug: "npm:^4.1.0" + globals: "npm:^11.1.0" + checksum: 10/e4fcb8f8395804956df4ae1301230a14b6eb35b74a7058a0e0b40f6f4be7281e619e6dafe400e833d4512da5d61cf17ea177d04b00a8f7cf3d8d69aff83ca3d8 languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/code-frame@npm:7.16.7" +"@babel/types@npm:7.24.7": + version: 7.24.7 + resolution: "@babel/types@npm:7.24.7" dependencies: - "@babel/highlight": "npm:^7.16.7" - checksum: 10/db2f7faa31bc2c9cf63197b481b30ea57147a5fc1a6fab60e5d6c02cdfbf6de8e17b5121f99917b3dabb5eeb572da078312e70697415940383efc140d4e0808b + "@babel/helper-string-parser": "npm:^7.24.7" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/ad3c8c0d6fb4acb0bb74bb5b4bb849b181bf6185677ef9c59c18856c81e43628d0858253cf232f0eca806f02e08eff85a1d3e636a3e94daea737597796b0b430 languageName: node linkType: hard -"@babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.8.3": - version: 7.22.13 - resolution: "@babel/code-frame@npm:7.22.13" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.16.7, @babel/types@npm:^7.17.0, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3": + version: 7.17.0 + resolution: "@babel/types@npm:7.17.0" dependencies: - "@babel/highlight": "npm:^7.22.13" - chalk: "npm:^2.4.2" - checksum: 10/bf6ae6ba3a510adfda6a211b4a89b0f1c98ca1352b745c077d113f3b568141e0d44ce750b9ac2a80143ba5c8c4080c50fcfc1aa11d86e194ea6785f62520eb5a + "@babel/helper-validator-identifier": "npm:^7.16.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/535ccef360d0c74e2bb685050f3a45e6ab30f66c740bbdd0858148ed502043f1ae2006a9d0269ac3b7356b690091ae313efd912e408bc0198d80a14b2a6f1537 languageName: node linkType: hard -"@babel/code-frame@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/code-frame@npm:7.18.6" - dependencies: - "@babel/highlight": "npm:^7.18.6" - checksum: 10/195e2be3172d7684bf95cff69ae3b7a15a9841ea9d27d3c843662d50cdd7d6470fd9c8e64be84d031117e4a4083486effba39f9aef6bbb2c89f7f21bcfba33ba - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/code-frame@npm:7.22.10" +"@babel/types@npm:^7.18.6, @babel/types@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/types@npm:7.18.9" dependencies: - "@babel/highlight": "npm:^7.22.10" - chalk: "npm:^2.4.2" - checksum: 10/53620d831c8f2230a7d2fbe833c01c071740a642317c960d45cda9b0b2d0492e152e00ab45aad8b55329ba5de647354b95f42b546fb905c0b7acf78d3f2d3ecd + "@babel/helper-validator-identifier": "npm:^7.18.6" + to-fast-properties: "npm:^2.0.0" + checksum: 10/a45958594383c7bf8050e550a0ec08f50485c218dbac1afae8583fccf5cf7893ce2861f6056a8f35c4bd024acdd2a69231b8493c78c41334ce083246ff8965db languageName: node linkType: hard -"@babel/code-frame@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/code-frame@npm:7.22.5" +"@babel/types@npm:^7.22.15": + version: 7.22.17 + resolution: "@babel/types@npm:7.22.17" dependencies: - "@babel/highlight": "npm:^7.22.5" - checksum: 10/b1ac7de75859699a9118c5247f489cc943d8d041339323904cd8140592993762f50abc14bc49b6703cb8a94b1aa90d6df2599625825e7ae470c9283b4a6170aa + "@babel/helper-string-parser": "npm:^7.22.5" + "@babel/helper-validator-identifier": "npm:^7.22.15" + to-fast-properties: "npm:^2.0.0" + checksum: 10/fafeea0d9a4a887da78790189bda4bcb139713673fb47a75abf6d09ca3f2d370ff011fd2f4ba6d31ae841aae2dfb18b141d8722edeb274e6e9af8cd4325b264b languageName: node linkType: hard -"@babel/code-frame@npm:^7.23.5": - version: 7.23.5 - resolution: "@babel/code-frame@npm:7.23.5" +"@babel/types@npm:^7.22.5, @babel/types@npm:^7.8.3": + version: 7.22.5 + resolution: "@babel/types@npm:7.22.5" dependencies: - "@babel/highlight": "npm:^7.23.4" - chalk: "npm:^2.4.2" - checksum: 10/44e58529c9d93083288dc9e649c553c5ba997475a7b0758cc3ddc4d77b8a7d985dbe78cc39c9bbc61f26d50af6da1ddf0a3427eae8cc222a9370619b671ed8f5 + "@babel/helper-string-parser": "npm:^7.22.5" + "@babel/helper-validator-identifier": "npm:^7.22.5" + to-fast-properties: "npm:^2.0.0" + checksum: 10/7f7edffe7e13dbd26a182677575ca7451bc234ce43b93dc49d27325306748628019e7753e6b5619ae462ea0d7e5ce2c0cc24092d53b592642ea89542037748b5 languageName: node linkType: hard -"@babel/code-frame@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/code-frame@npm:7.24.7" +"@babel/types@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/types@npm:7.23.0" dependencies: - "@babel/highlight": "npm:^7.24.7" - picocolors: "npm:^1.0.0" - checksum: 10/4812e94885ba7e3213d49583a155fdffb05292330f0a9b2c41b49288da70cf3c746a3fda0bf1074041a6d741c33f8d7be24be5e96f41ef77395eeddc5c9ff624 + "@babel/helper-string-parser": "npm:^7.22.5" + "@babel/helper-validator-identifier": "npm:^7.22.20" + to-fast-properties: "npm:^2.0.0" + checksum: 10/ca5b896a26c91c5672254725c4c892a35567d2122afc47bd5331d1611a7f9230c19fc9ef591a5a6f80bf0d80737e104a9ac205c96447c74bee01d4319db58001 languageName: node linkType: hard -"@babel/compat-data@npm:^7.16.4, @babel/compat-data@npm:^7.17.0": - version: 7.17.0 - resolution: "@babel/compat-data@npm:7.17.0" - checksum: 10/ca06df56c156640395ce16cb66038f570724ae86bdf35cfd71e928a4e1771c46fa8804ff78a7404c380c8b4ab6a85912bbf068e8f3c26d4e2aa2380ec8d60b92 +"@bcoe/v8-coverage@npm:^0.2.3": + version: 0.2.3 + resolution: "@bcoe/v8-coverage@npm:0.2.3" + checksum: 10/1a1f0e356a3bb30b5f1ced6f79c413e6ebacf130421f15fac5fcd8be5ddf98aedb4404d7f5624e3285b700e041f9ef938321f3ca4d359d5b716f96afa120d88d languageName: node linkType: hard -"@babel/compat-data@npm:^7.18.8": - version: 7.18.8 - resolution: "@babel/compat-data@npm:7.18.8" - checksum: 10/85d41394bf6892f74e339f5356e855167ffe443e0daccdafdbe0b189fa5238d7180dc50b0b7e55c376544a9cd63f341d99492a7774091beb9ee1382e85ca22d3 +"@bufbuild/buf-darwin-arm64@npm:1.30.0": + version: 1.30.0 + resolution: "@bufbuild/buf-darwin-arm64@npm:1.30.0" + conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@babel/compat-data@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/compat-data@npm:7.22.5" - checksum: 10/18eb983dd250d94b4c794dd332bf80c4d2af147636991f214df19f15531fb6e405763f9bfec90de51dbbc368b9542bfd4f775cab74427adae0e80830cf0686dd +"@bufbuild/buf-darwin-x64@npm:1.30.0": + version: 1.30.0 + resolution: "@bufbuild/buf-darwin-x64@npm:1.30.0" + conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/compat-data@npm:7.22.9" - checksum: 10/6797f59857917e57e1765811e4f48371f2bc6063274be012e380e83cbc1a4f7931d616c235df56404134aa4bb4775ee61f7b382688314e1b625a4d51caabd734 +"@bufbuild/buf-linux-aarch64@npm:1.30.0": + version: 1.30.0 + resolution: "@bufbuild/buf-linux-aarch64@npm:1.30.0" + conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@babel/compat-data@npm:^7.23.5": - version: 7.23.5 - resolution: "@babel/compat-data@npm:7.23.5" - checksum: 10/088f14f646ecbddd5ef89f120a60a1b3389a50a9705d44603dca77662707d0175a5e0e0da3943c3298f1907a4ab871468656fbbf74bb7842cd8b0686b2c19736 +"@bufbuild/buf-linux-x64@npm:1.30.0": + version: 1.30.0 + resolution: "@bufbuild/buf-linux-x64@npm:1.30.0" + conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@babel/compat-data@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/compat-data@npm:7.24.8" - checksum: 10/6989b8a61782d9c6c7a1fc58b4efd4fb68e5f5a5b6be3463a3de3752f39a30d21438b8b4485c18cb6b8d7f29e07f79d79639caa08737fae57838e81d7da055c0 +"@bufbuild/buf-win32-arm64@npm:1.30.0": + version: 1.30.0 + resolution: "@bufbuild/buf-win32-arm64@npm:1.30.0" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@babel/core@npm:7.22.5": - version: 7.22.5 - resolution: "@babel/core@npm:7.22.5" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.22.5" - "@babel/generator": "npm:^7.22.5" - "@babel/helper-compilation-targets": "npm:^7.22.5" - "@babel/helper-module-transforms": "npm:^7.22.5" - "@babel/helpers": "npm:^7.22.5" - "@babel/parser": "npm:^7.22.5" - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.2" - semver: "npm:^6.3.0" - checksum: 10/6bd54a2524b02650cf7bb3d3af86ef71b67a221b980a6b86fe0e206f6d50d25fc354545b92027f78eb292b37505477fd3cbace1abd58668b3320b81496b86a2f +"@bufbuild/buf-win32-x64@npm:1.30.0": + version: 1.30.0 + resolution: "@bufbuild/buf-win32-x64@npm:1.30.0" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@babel/core@npm:7.22.9": - version: 7.22.9 - resolution: "@babel/core@npm:7.22.9" +"@bufbuild/buf@npm:1.30.0": + version: 1.30.0 + resolution: "@bufbuild/buf@npm:1.30.0" dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.22.5" - "@babel/generator": "npm:^7.22.9" - "@babel/helper-compilation-targets": "npm:^7.22.9" - "@babel/helper-module-transforms": "npm:^7.22.9" - "@babel/helpers": "npm:^7.22.6" - "@babel/parser": "npm:^7.22.7" - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.8" - "@babel/types": "npm:^7.22.5" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.2" - semver: "npm:^6.3.1" - checksum: 10/0c209a850651e23acd5662fecbd928a4805294579e13b28d1dc7adfb9e3ad31c500e2c5c3db2c8ea18c1f3613b0aed3e24652089652efc8401d824b88962bcf9 + "@bufbuild/buf-darwin-arm64": "npm:1.30.0" + "@bufbuild/buf-darwin-x64": "npm:1.30.0" + "@bufbuild/buf-linux-aarch64": "npm:1.30.0" + "@bufbuild/buf-linux-x64": "npm:1.30.0" + "@bufbuild/buf-win32-arm64": "npm:1.30.0" + "@bufbuild/buf-win32-x64": "npm:1.30.0" + dependenciesMeta: + "@bufbuild/buf-darwin-arm64": + optional: true + "@bufbuild/buf-darwin-x64": + optional: true + "@bufbuild/buf-linux-aarch64": + optional: true + "@bufbuild/buf-linux-x64": + optional: true + "@bufbuild/buf-win32-arm64": + optional: true + "@bufbuild/buf-win32-x64": + optional: true + bin: + buf: bin/buf + protoc-gen-buf-breaking: bin/protoc-gen-buf-breaking + protoc-gen-buf-lint: bin/protoc-gen-buf-lint + checksum: 10/5e383bd7d8b8820c7336e6471c2cef03edfa4003c66ff7543cff8b76815bbc7c96b54016cfbffe7acc37b6738277d545a2b1e4941880bcc4e219790773db34f0 languageName: node linkType: hard -"@babel/core@npm:7.23.9, @babel/core@npm:^7.23.5": - version: 7.23.9 - resolution: "@babel/core@npm:7.23.9" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.23.5" - "@babel/generator": "npm:^7.23.6" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helpers": "npm:^7.23.9" - "@babel/parser": "npm:^7.23.9" - "@babel/template": "npm:^7.23.9" - "@babel/traverse": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" - convert-source-map: "npm:^2.0.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10/268cdbb86bef1b8ea5b1300f2f325e56a1740a5051360cb228ffeaa0f80282b6674f3a2b4d6466adb0691183759b88d4c37b4a4f77232c84a49ed771c84cdc27 +"@bufbuild/protobuf@npm:1.10.0": + version: 1.10.0 + resolution: "@bufbuild/protobuf@npm:1.10.0" + checksum: 10/1f120f72bbb40dd3d0f8c73f1474b001cfb9be09c38b7b0292e35fec98c5184a3db380a6feff7626fb3fff108c8a8aa7fc8cfea14904dc0a1174a01c8e637cc6 languageName: node linkType: hard -"@babel/core@npm:7.24.0": - version: 7.24.0 - resolution: "@babel/core@npm:7.24.0" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.23.5" - "@babel/generator": "npm:^7.23.6" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helpers": "npm:^7.24.0" - "@babel/parser": "npm:^7.24.0" - "@babel/template": "npm:^7.24.0" - "@babel/traverse": "npm:^7.24.0" - "@babel/types": "npm:^7.24.0" - convert-source-map: "npm:^2.0.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10/1e22215cc89e061e0cbfed72f265ad24d363f3e9b24b51e9c4cf3ccb9222260a29a1c1e62edb439cb7e2229a3fce924edd43300500416613236c13fc8d62a947 +"@bufbuild/protobuf@npm:1.8.0, @bufbuild/protobuf@npm:^1.7.2, @bufbuild/protobuf@npm:^1.8.0": + version: 1.8.0 + resolution: "@bufbuild/protobuf@npm:1.8.0" + checksum: 10/f91d60ff1609c023466500e99312d2e92ac09c163d615c315fa25d9e50f1e9b76a3a9cac776786a3dd5c5065bb7061bf29388587e2a1d27306f68ed98e57a892 languageName: node linkType: hard -"@babel/core@npm:^7.1.0": - version: 7.23.2 - resolution: "@babel/core@npm:7.23.2" +"@bufbuild/protoc-gen-es@npm:1.8.0": + version: 1.8.0 + resolution: "@bufbuild/protoc-gen-es@npm:1.8.0" dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.0" - "@babel/helper-compilation-targets": "npm:^7.22.15" - "@babel/helper-module-transforms": "npm:^7.23.0" - "@babel/helpers": "npm:^7.23.2" - "@babel/parser": "npm:^7.23.0" - "@babel/template": "npm:^7.22.15" - "@babel/traverse": "npm:^7.23.2" - "@babel/types": "npm:^7.23.0" - convert-source-map: "npm:^2.0.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10/b69d7008695b2ac7a3a2db83c5c712fbb79f7031c4480f6351cde327930e38873003d1d021059b729a1d0cb48093f1d384c64269b78f6189f50051fe4f64dc2d + "@bufbuild/protobuf": "npm:^1.8.0" + "@bufbuild/protoplugin": "npm:1.8.0" + peerDependencies: + "@bufbuild/protobuf": 1.8.0 + peerDependenciesMeta: + "@bufbuild/protobuf": + optional: true + bin: + protoc-gen-es: bin/protoc-gen-es + checksum: 10/85fd18dcd53003b3057bd98e2fec0c785ec7e834b658609ad284f24e98c0e2cb06616c8c96065e2df25e9a309f74379b369112ce2c433aadaea380ad7b120ab3 languageName: node linkType: hard -"@babel/core@npm:^7.11.1, @babel/core@npm:^7.16.0, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": - version: 7.22.11 - resolution: "@babel/core@npm:7.22.11" +"@bufbuild/protoplugin@npm:1.8.0, @bufbuild/protoplugin@npm:^1.7.2": + version: 1.8.0 + resolution: "@bufbuild/protoplugin@npm:1.8.0" dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.22.10" - "@babel/generator": "npm:^7.22.10" - "@babel/helper-compilation-targets": "npm:^7.22.10" - "@babel/helper-module-transforms": "npm:^7.22.9" - "@babel/helpers": "npm:^7.22.11" - "@babel/parser": "npm:^7.22.11" - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.11" - "@babel/types": "npm:^7.22.11" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10/3d46373e7ce9731f7160329ecf5fb1fcf2b3614e05514ad4eb2004f4a528c424d95c1f780cc7b17a59a5ad7e564947e15538a6c324cc4490b6f70b078d04599f + "@bufbuild/protobuf": "npm:1.8.0" + "@typescript/vfs": "npm:^1.4.0" + typescript: "npm:4.5.2" + checksum: 10/e243f655dd02fe2dc857a48c00846857c4a9fae89565aabe98ae35e3a5d3002727b9e0790bc136e8f358a8e7d42c594b308ff6b47027cd679646273d3a76cb7b languageName: node linkType: hard -"@babel/core@npm:^7.11.6": - version: 7.18.9 - resolution: "@babel/core@npm:7.18.9" +"@commitlint/cli@npm:17.7.1": + version: 17.7.1 + resolution: "@commitlint/cli@npm:17.7.1" dependencies: - "@ampproject/remapping": "npm:^2.1.0" - "@babel/code-frame": "npm:^7.18.6" - "@babel/generator": "npm:^7.18.9" - "@babel/helper-compilation-targets": "npm:^7.18.9" - "@babel/helper-module-transforms": "npm:^7.18.9" - "@babel/helpers": "npm:^7.18.9" - "@babel/parser": "npm:^7.18.9" - "@babel/template": "npm:^7.18.6" - "@babel/traverse": "npm:^7.18.9" - "@babel/types": "npm:^7.18.9" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.1" - semver: "npm:^6.3.0" - checksum: 10/ebd9a458562ff3981c761bc69ac34e50d9b717dd6128c34f30097d1958439dc24b128a45cdff1ff2453fc65157e0edb3707848c4f95bc45e587e9fec4d0e3e05 + "@commitlint/format": "npm:^17.4.4" + "@commitlint/lint": "npm:^17.7.0" + "@commitlint/load": "npm:^17.7.1" + "@commitlint/read": "npm:^17.5.1" + "@commitlint/types": "npm:^17.4.4" + execa: "npm:^5.0.0" + lodash.isfunction: "npm:^3.0.9" + resolve-from: "npm:5.0.0" + resolve-global: "npm:1.0.0" + yargs: "npm:^17.0.0" + bin: + commitlint: cli.js + checksum: 10/163e4b9f7ff3ccd7e15efac6993924a72fe660979accc04c86ba5de813a6725095a087c172306d957d1f3fa21718499ab9caae9342f0bdfd854bf8bd47135dd7 languageName: node linkType: hard -"@babel/core@npm:^7.12.3, @babel/core@npm:^7.5.5, @babel/core@npm:^7.7.5": - version: 7.17.5 - resolution: "@babel/core@npm:7.17.5" +"@commitlint/config-conventional@npm:17.7.0": + version: 17.7.0 + resolution: "@commitlint/config-conventional@npm:17.7.0" dependencies: - "@ampproject/remapping": "npm:^2.1.0" - "@babel/code-frame": "npm:^7.16.7" - "@babel/generator": "npm:^7.17.3" - "@babel/helper-compilation-targets": "npm:^7.16.7" - "@babel/helper-module-transforms": "npm:^7.16.7" - "@babel/helpers": "npm:^7.17.2" - "@babel/parser": "npm:^7.17.3" - "@babel/template": "npm:^7.16.7" - "@babel/traverse": "npm:^7.17.3" - "@babel/types": "npm:^7.17.0" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.1.2" - semver: "npm:^6.3.0" - checksum: 10/1e45d498ca92fded7fcaff555a55ac2391385be307f83cf1994312c114303bdcab553c2b0b2e4201ec8e2f033f8eb3f5f9c46e496a98c93be02da11343a69393 + conventional-changelog-conventionalcommits: "npm:^6.1.0" + checksum: 10/932cf35c12855e360c750bc19ffedc0925f8658f316aaacdf5441ce775712934386643a9ac418f18e24e5bb1bf71ed721b8ae452a13d04908b0e55cd3d2d988f languageName: node linkType: hard -"@babel/eslint-parser@npm:^7.16.3": - version: 7.22.15 - resolution: "@babel/eslint-parser@npm:7.22.15" +"@commitlint/config-validator@npm:^17.6.7": + version: 17.6.7 + resolution: "@commitlint/config-validator@npm:17.6.7" dependencies: - "@nicolo-ribaudo/eslint-scope-5-internals": "npm:5.1.1-v1" - eslint-visitor-keys: "npm:^2.1.0" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.11.0 - eslint: ^7.5.0 || ^8.0.0 - checksum: 10/daaac4a15125d139f1036015ab282a3742ee5cec3d1c281696a4960bdbc96664c15edd4c6ce2dcf3c24f7521ef9a1b7ad170a741b19a75c33e92df4b9924797a + "@commitlint/types": "npm:^17.4.4" + ajv: "npm:^8.11.0" + checksum: 10/e13e512ce9dc788f7ce1c84faf4d2e2d4d3b7c4dc18a7982ecbfc33faa5fe977793efdb868e228061d34ea8825cbbed5fc9e8e69fd5e4f0c0c08f60e21a9214e languageName: node linkType: hard -"@babel/generator@npm:7.0.0-beta.51": - version: 7.0.0-beta.51 - resolution: "@babel/generator@npm:7.0.0-beta.51" +"@commitlint/ensure@npm:^17.6.7": + version: 17.6.7 + resolution: "@commitlint/ensure@npm:17.6.7" dependencies: - "@babel/types": "npm:7.0.0-beta.51" - jsesc: "npm:^2.5.1" - lodash: "npm:^4.17.5" - source-map: "npm:^0.5.0" - trim-right: "npm:^1.0.1" - checksum: 10/e4632f89591d4db87da80a8832f937333fd606ce75e71d131bde23f8112c7f79198c172504c00ce505296483170a65836565166c4781a156aa0efe8a40918353 + "@commitlint/types": "npm:^17.4.4" + lodash.camelcase: "npm:^4.3.0" + lodash.kebabcase: "npm:^4.1.1" + lodash.snakecase: "npm:^4.1.1" + lodash.startcase: "npm:^4.4.0" + lodash.upperfirst: "npm:^4.3.1" + checksum: 10/1ffdce807dbb303e8fa215511a965375abeea2702f64b4f1c4d7823f1e231cb343e82c97633d12d3c89b4f71d2eaf28169db08b4f1d3b052c26c942f4b9d9380 languageName: node linkType: hard -"@babel/generator@npm:7.18.2": - version: 7.18.2 - resolution: "@babel/generator@npm:7.18.2" - dependencies: - "@babel/types": "npm:^7.18.2" - "@jridgewell/gen-mapping": "npm:^0.3.0" - jsesc: "npm:^2.5.1" - checksum: 10/961191f7548794711730e21adf215302c2f5f95bdc025ce997a31c4de39ec17c91e27d3ecdc1d641e7b1756872599045145a9334acbb80a5abfb626f678280e5 +"@commitlint/execute-rule@npm:^17.4.0": + version: 17.4.0 + resolution: "@commitlint/execute-rule@npm:17.4.0" + checksum: 10/17d8e56ab00bd45fdecb0ed33186d2020ce261250d6a516204b6509610b75af8c930e7226b1111af3de298db32a7e4d0ba2c9cc7ed67db5ba5159eeed634f067 languageName: node linkType: hard -"@babel/generator@npm:7.22.9, @babel/generator@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/generator@npm:7.22.9" +"@commitlint/format@npm:^17.4.4": + version: 17.4.4 + resolution: "@commitlint/format@npm:17.4.4" dependencies: - "@babel/types": "npm:^7.22.5" - "@jridgewell/gen-mapping": "npm:^0.3.2" - "@jridgewell/trace-mapping": "npm:^0.3.17" - jsesc: "npm:^2.5.1" - checksum: 10/1ee43f99512c51d594c8992f4c4cd07d2843eb58cf3c22d1f605906b9c0ed89640bdcea2c8d583e75a8032a49bb4d950d2055007ecb75af404ebc2db8a513b94 + "@commitlint/types": "npm:^17.4.4" + chalk: "npm:^4.1.0" + checksum: 10/832d9641129f2da8d32389b4a47db59d41eb1adfab742723972cad64b833c4af9e253f96757b27664fedae61644dd4c01d21f775773b45b604bd7f93b23a27d2 languageName: node linkType: hard -"@babel/generator@npm:7.23.6, @babel/generator@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/generator@npm:7.23.6" +"@commitlint/is-ignored@npm:^17.7.0": + version: 17.7.0 + resolution: "@commitlint/is-ignored@npm:17.7.0" dependencies: - "@babel/types": "npm:^7.23.6" - "@jridgewell/gen-mapping": "npm:^0.3.2" - "@jridgewell/trace-mapping": "npm:^0.3.17" - jsesc: "npm:^2.5.1" - checksum: 10/864090d5122c0aa3074471fd7b79d8a880c1468480cbd28925020a3dcc7eb6e98bedcdb38983df299c12b44b166e30915b8085a7bc126e68fa7e2aadc7bd1ac5 + "@commitlint/types": "npm:^17.4.4" + semver: "npm:7.5.4" + checksum: 10/aa0b695d6e7bee5e732f96a2ff383347ff476eb48f9d3b4ed75b098cafa27e56da15563833d3cf4e1268fc26819180cd8b5bdc322b087073a63bc94f699944b2 languageName: node linkType: hard -"@babel/generator@npm:^7.17.3, @babel/generator@npm:^7.7.2": - version: 7.17.3 - resolution: "@babel/generator@npm:7.17.3" +"@commitlint/lint@npm:^17.7.0": + version: 17.7.0 + resolution: "@commitlint/lint@npm:17.7.0" dependencies: - "@babel/types": "npm:^7.17.0" - jsesc: "npm:^2.5.1" - source-map: "npm:^0.5.0" - checksum: 10/9a102a87b4e477aace1febc89a3692faf09c442015f24c3dffc1f54691498a73bd97a9eda9120be5626ede62728e15f7942ce841ff96c5b464703c701a7ab82a + "@commitlint/is-ignored": "npm:^17.7.0" + "@commitlint/parse": "npm:^17.7.0" + "@commitlint/rules": "npm:^17.7.0" + "@commitlint/types": "npm:^17.4.4" + checksum: 10/922b644584a0e69e4d8fdde863b4d11d068d42cacaf7121f748041928aba5200154f16986ff512f83bef6f65855b0aff7c8e3e83457898614cc3ac5596e2a487 languageName: node linkType: hard -"@babel/generator@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/generator@npm:7.18.9" +"@commitlint/load@npm:^17.7.1": + version: 17.7.1 + resolution: "@commitlint/load@npm:17.7.1" dependencies: - "@babel/types": "npm:^7.18.9" - "@jridgewell/gen-mapping": "npm:^0.3.2" - jsesc: "npm:^2.5.1" - checksum: 10/cd19e568724c6389f75c64c178f72bafcbb97af1de0412eecacf5431401b81714521530d98914640dbb096d8ba5a829f09a6cb91ce81fd30fd75d9dace0a00ed + "@commitlint/config-validator": "npm:^17.6.7" + "@commitlint/execute-rule": "npm:^17.4.0" + "@commitlint/resolve-extends": "npm:^17.6.7" + "@commitlint/types": "npm:^17.4.4" + "@types/node": "npm:20.4.7" + chalk: "npm:^4.1.0" + cosmiconfig: "npm:^8.0.0" + cosmiconfig-typescript-loader: "npm:^4.0.0" + lodash.isplainobject: "npm:^4.0.6" + lodash.merge: "npm:^4.6.2" + lodash.uniq: "npm:^4.5.0" + resolve-from: "npm:^5.0.0" + ts-node: "npm:^10.8.1" + typescript: "npm:^4.6.4 || ^5.0.0" + checksum: 10/8d0e56b49a0e4dec7e8e28a2c6bc7ce985e6b8e10274aa20d0e3f6c2465fc9082d18f91bbe5c336594ebabcc4dc9668fdeaa039ef5bbfaf26ca0be423461ef61 languageName: node linkType: hard -"@babel/generator@npm:^7.22.10, @babel/generator@npm:^7.4.0": - version: 7.22.10 - resolution: "@babel/generator@npm:7.22.10" - dependencies: - "@babel/types": "npm:^7.22.10" - "@jridgewell/gen-mapping": "npm:^0.3.2" - "@jridgewell/trace-mapping": "npm:^0.3.17" - jsesc: "npm:^2.5.1" - checksum: 10/b0df0265694a4baa8e824f1c065769ebd83678a78b5ef16bc75b8471e27d17f7a68d3658d8ce401d3fbbe8bc2e4e9f1d9506c89931d3fc125ff32dfdea1c0f7e +"@commitlint/message@npm:^17.4.2": + version: 17.4.2 + resolution: "@commitlint/message@npm:17.4.2" + checksum: 10/55b6cfeb57f7c9f913e18821aa4d972a6b6faa78c62741390996151f99554396f6df68ccfee86c163d24d8c27a4dbbcb50ef03c2972ab0a7a21d89daa2f9a519 languageName: node linkType: hard -"@babel/generator@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/generator@npm:7.22.5" +"@commitlint/parse@npm:^17.7.0": + version: 17.7.0 + resolution: "@commitlint/parse@npm:17.7.0" dependencies: - "@babel/types": "npm:^7.22.5" - "@jridgewell/gen-mapping": "npm:^0.3.2" - "@jridgewell/trace-mapping": "npm:^0.3.17" - jsesc: "npm:^2.5.1" - checksum: 10/56849bc15d130fe8b31f5c4cccda00aaa6005cb1a2b40cdf7754cf4905d804e41468a25b5b95f07059820926873039066ed1cb82f92cf7bf76a72c853274d1f7 + "@commitlint/types": "npm:^17.4.4" + conventional-changelog-angular: "npm:^6.0.0" + conventional-commits-parser: "npm:^4.0.0" + checksum: 10/d70d53932576fa30c078099fe9ab00190298ed6aec696648633ab16eb80386e0c1b407c44eb7c548b598573c260ed1bfa890dd8134166d28811f66ed436efbea languageName: node linkType: hard -"@babel/generator@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/generator@npm:7.23.0" +"@commitlint/read@npm:^17.5.1": + version: 17.5.1 + resolution: "@commitlint/read@npm:17.5.1" dependencies: - "@babel/types": "npm:^7.23.0" - "@jridgewell/gen-mapping": "npm:^0.3.2" - "@jridgewell/trace-mapping": "npm:^0.3.17" - jsesc: "npm:^2.5.1" - checksum: 10/bd1598bd356756065d90ce26968dd464ac2b915c67623f6f071fb487da5f9eb454031a380e20e7c9a7ce5c4a49d23be6cb9efde404952b0b3f3c0c3a9b73d68a + "@commitlint/top-level": "npm:^17.4.0" + "@commitlint/types": "npm:^17.4.4" + fs-extra: "npm:^11.0.0" + git-raw-commits: "npm:^2.0.11" + minimist: "npm:^1.2.6" + checksum: 10/62ee4f7a47b22a8571ae313bca36b418805a248f4986557f38f06317c44b6d18072889f95e7bc22bbb33a2f2b08236f74596ff28e3dbd0894249477a9df367c3 languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:7.22.5, @babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" +"@commitlint/resolve-extends@npm:^17.6.7": + version: 17.6.7 + resolution: "@commitlint/resolve-extends@npm:17.6.7" dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/53da330f1835c46f26b7bf4da31f7a496dee9fd8696cca12366b94ba19d97421ce519a74a837f687749318f94d1a37f8d1abcbf35e8ed22c32d16373b2f6198d + "@commitlint/config-validator": "npm:^17.6.7" + "@commitlint/types": "npm:^17.4.4" + import-fresh: "npm:^3.0.0" + lodash.mergewith: "npm:^4.6.2" + resolve-from: "npm:^5.0.0" + resolve-global: "npm:^1.0.0" + checksum: 10/3717b4ccef6e46136f8d4a4b8d78d57184b4331401db07e27f89acb049a3903035bb2b0dbd4c07e3cdcc402cbe693b365c244a0da3df47e0f74cbf3ba76be9ec languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-annotate-as-pure@npm:7.16.7" +"@commitlint/rules@npm:^17.7.0": + version: 17.7.0 + resolution: "@commitlint/rules@npm:17.7.0" dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10/d235be963fed5d48a8a4cfabc41c3f03fad6a947810dbcab9cebed7f819811457e10d99b4b2e942ad71baa7ee8e3cd3f5f38a4e4685639ddfddb7528d9a07179 + "@commitlint/ensure": "npm:^17.6.7" + "@commitlint/message": "npm:^17.4.2" + "@commitlint/to-lines": "npm:^17.4.0" + "@commitlint/types": "npm:^17.4.4" + execa: "npm:^5.0.0" + checksum: 10/bc6af55cb8fab82baac450f87e02fa51d91f44855aadced92d74d05f9af99ccfd90b08c67355b53ca6b4b45f386854bcf52e1a4e5bc003665f4873e785eb7c70 languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-annotate-as-pure@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/a9017bfc1c4e9f2225b967fbf818004703de7cf29686468b54002ffe8d6b56e0808afa20d636819fcf3a34b89ba72f52c11bdf1d69f303928ee10d92752cad95 +"@commitlint/to-lines@npm:^17.4.0": + version: 17.4.0 + resolution: "@commitlint/to-lines@npm:17.4.0" + checksum: 10/841f90f606238e145ab4ba02940662d511fc04fe553619900152a8542170fe664031b95d820ffaeb8864d4851344278e662ef29637d763fc19fd828e0f8d139b languageName: node linkType: hard -"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.22.5" +"@commitlint/top-level@npm:^17.4.0": + version: 17.4.0 + resolution: "@commitlint/top-level@npm:17.4.0" dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/d753acac62399fc6dd354cf1b9441bde0c331c2fe792a4c14904c5e5eafc3cac79478f6aa038e8a51c1148b0af6710a2e619855e4b5d54497ac972eaffed5884 + find-up: "npm:^5.0.0" + checksum: 10/14cd77e982d2dd7989718dafdbf7a2168a5fb387005e0686c2dfa9ffc36bb9a749e5d80a151884459e4d8c88564339688dca26e9c711abe043beeb3f30c3dfd6 languageName: node linkType: hard -"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.24.7" +"@commitlint/types@npm:^17.4.4": + version: 17.4.4 + resolution: "@commitlint/types@npm:17.4.4" dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/3ddff45d1e086c9c6dcef53ef46521a0c11ddb09fe3ab42dca5af6bb1b1703895a9f4f8056f49fdf53c2dbf6e5cf1ddb4baf17d7e3766c63f051ab8d60a919ee + chalk: "npm:^4.1.0" + checksum: 10/03c52429052d161710896d198000196bd2e60be0fd71459b22133dd83dee43e8d05ea8ee703c8369823bc40f77a54881b80d8aa4368ac52aea7f30fb234b73d2 languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-compilation-targets@npm:7.16.7" - dependencies: - "@babel/compat-data": "npm:^7.16.4" - "@babel/helper-validator-option": "npm:^7.16.7" - browserslist: "npm:^4.17.5" - semver: "npm:^6.3.0" +"@connectrpc/connect@npm:1.4.0": + version: 1.4.0 + resolution: "@connectrpc/connect@npm:1.4.0" peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/87cd35911856e03fa45a0593a36e5f20bec745dbb2f82e0689dc09f4607a13c225d9295e26e7bf44b178f323a3bccad0c025be7e7c32564bcd0a08b2e9ab727d + "@bufbuild/protobuf": ^1.4.2 + checksum: 10/5e84fbba544f7e52533bdd0058caaa6d5c89903f522fbd9551c6bad0cd2fea2d3f14c7396696609d1787a5e2018054dd53db40b2d08c55975ff81334074eeeae languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-compilation-targets@npm:7.18.9" +"@connectrpc/protoc-gen-connect-es@npm:1.4.0": + version: 1.4.0 + resolution: "@connectrpc/protoc-gen-connect-es@npm:1.4.0" dependencies: - "@babel/compat-data": "npm:^7.18.8" - "@babel/helper-validator-option": "npm:^7.18.6" - browserslist: "npm:^4.20.2" - semver: "npm:^6.3.0" + "@bufbuild/protobuf": "npm:^1.7.2" + "@bufbuild/protoplugin": "npm:^1.7.2" peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/74f9cff2925a19c8a7ce9c7b6e79257cf6f22a6dd6d8448d28fd3682a399af4cedfaad43ae2108b5c7a439b4b50f094737fb199c5345a9dba03f8113df742225 + "@bufbuild/protoc-gen-es": ^1.7.2 + "@connectrpc/connect": 1.4.0 + peerDependenciesMeta: + "@bufbuild/protoc-gen-es": + optional: true + "@connectrpc/connect": + optional: true + bin: + protoc-gen-connect-es: bin/protoc-gen-connect-es + checksum: 10/41aca6dd648857504595acb063e5061aa058f629b4939bb9941464f292915b4b40d63793e6567745517ec187d069b6110827f6649ecea203b1ca99de5efca4d9 languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.22.10, @babel/helper-compilation-targets@npm:^7.22.6": - version: 7.22.10 - resolution: "@babel/helper-compilation-targets@npm:7.22.10" +"@cspell/cspell-bundled-dicts@npm:8.10.4": + version: 8.10.4 + resolution: "@cspell/cspell-bundled-dicts@npm:8.10.4" dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-validator-option": "npm:^7.22.5" - browserslist: "npm:^4.21.9" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10/974085237b34b3d5e7eb0ec62454e1855fce3e5285cdd9461f01e0058ffaefab2491305be2b218f6e9a0f3f1e7f3edcb2067932a9f5545c39c6a9079328e5931 + "@cspell/dict-ada": "npm:^4.0.2" + "@cspell/dict-aws": "npm:^4.0.2" + "@cspell/dict-bash": "npm:^4.1.3" + "@cspell/dict-companies": "npm:^3.1.2" + "@cspell/dict-cpp": "npm:^5.1.10" + "@cspell/dict-cryptocurrencies": "npm:^5.0.0" + "@cspell/dict-csharp": "npm:^4.0.2" + "@cspell/dict-css": "npm:^4.0.12" + "@cspell/dict-dart": "npm:^2.0.3" + "@cspell/dict-django": "npm:^4.1.0" + "@cspell/dict-docker": "npm:^1.1.7" + "@cspell/dict-dotnet": "npm:^5.0.2" + "@cspell/dict-elixir": "npm:^4.0.3" + "@cspell/dict-en-common-misspellings": "npm:^2.0.3" + "@cspell/dict-en-gb": "npm:1.1.33" + "@cspell/dict-en_us": "npm:^4.3.23" + "@cspell/dict-filetypes": "npm:^3.0.4" + "@cspell/dict-fonts": "npm:^4.0.0" + "@cspell/dict-fsharp": "npm:^1.0.1" + "@cspell/dict-fullstack": "npm:^3.1.8" + "@cspell/dict-gaming-terms": "npm:^1.0.5" + "@cspell/dict-git": "npm:^3.0.0" + "@cspell/dict-golang": "npm:^6.0.9" + "@cspell/dict-google": "npm:^1.0.1" + "@cspell/dict-haskell": "npm:^4.0.1" + "@cspell/dict-html": "npm:^4.0.5" + "@cspell/dict-html-symbol-entities": "npm:^4.0.0" + "@cspell/dict-java": "npm:^5.0.7" + "@cspell/dict-julia": "npm:^1.0.1" + "@cspell/dict-k8s": "npm:^1.0.5" + "@cspell/dict-latex": "npm:^4.0.0" + "@cspell/dict-lorem-ipsum": "npm:^4.0.0" + "@cspell/dict-lua": "npm:^4.0.3" + "@cspell/dict-makefile": "npm:^1.0.0" + "@cspell/dict-monkeyc": "npm:^1.0.6" + "@cspell/dict-node": "npm:^5.0.1" + "@cspell/dict-npm": "npm:^5.0.16" + "@cspell/dict-php": "npm:^4.0.8" + "@cspell/dict-powershell": "npm:^5.0.4" + "@cspell/dict-public-licenses": "npm:^2.0.7" + "@cspell/dict-python": "npm:^4.2.1" + "@cspell/dict-r": "npm:^2.0.1" + "@cspell/dict-ruby": "npm:^5.0.2" + "@cspell/dict-rust": "npm:^4.0.4" + "@cspell/dict-scala": "npm:^5.0.2" + "@cspell/dict-software-terms": "npm:^3.4.9" + "@cspell/dict-sql": "npm:^2.1.3" + "@cspell/dict-svelte": "npm:^1.0.2" + "@cspell/dict-swift": "npm:^2.0.1" + "@cspell/dict-terraform": "npm:^1.0.0" + "@cspell/dict-typescript": "npm:^3.1.5" + "@cspell/dict-vue": "npm:^3.0.0" + checksum: 10/c2cc2171e64f759ecc5fe38b31508d99cf38a2ce35e589c6b6027efe0cb83f3b10130d82fafbd0dc26f7f163de3e4ec0981dbc8eded039bd8a2965a12efb88e5 languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-compilation-targets@npm:7.22.15" +"@cspell/cspell-json-reporter@npm:8.10.4": + version: 8.10.4 + resolution: "@cspell/cspell-json-reporter@npm:8.10.4" dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-validator-option": "npm:^7.22.15" - browserslist: "npm:^4.21.9" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10/9706decaa1591cf44511b6f3447eb9653b50ca3538215fe2e5387a8598c258c062f4622da5b95e61f0415706534deee619bbf53a2889f9bd967949b8f6024e0e + "@cspell/cspell-types": "npm:8.10.4" + checksum: 10/4eba16203c021f5e118907996958e57c2f930fb33557b7960bb372f59f377611be4b6564072e1d8dc001872186ecd7d48ede84a000b20707d05a1bb3e8a7bed6 languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-compilation-targets@npm:7.22.5" - dependencies: - "@babel/compat-data": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.5" - browserslist: "npm:^4.21.3" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/aff56630b85481d7fa1f268fecc6f70df30c06df5073ea72cd422caccb957a0504f119d9681952f7f7b024f27117dc5e9147a48cc0046c2d84856eae92bfae03 +"@cspell/cspell-pipe@npm:8.10.4": + version: 8.10.4 + resolution: "@cspell/cspell-pipe@npm:8.10.4" + checksum: 10/06602031930827f751acf6b24bf9229b78abd2c524036123cc628288c0a0023ac927ef03709aaf01335af45235bb85e6d725bc2eca8f13e92a109f5174131ad2 languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/helper-compilation-targets@npm:7.22.9" +"@cspell/cspell-resolver@npm:8.10.4": + version: 8.10.4 + resolution: "@cspell/cspell-resolver@npm:8.10.4" dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-validator-option": "npm:^7.22.5" - browserslist: "npm:^4.21.9" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/779510e4c2036fa9880c0ed7b77ce84e5926093e216dffa0044f31a146f0daae363c00d1cdda2250788edc8d6457b9bce6245c51d9f4161bb51e053c12c4b478 + global-directory: "npm:^4.0.1" + checksum: 10/80ec4da36bc58f48b5ef9453cf9a2b42169869f8c63b9b253af1bd62138d3130c8a13f040f4fd97564bd51a9555a5aa0ee723ed63c371d177a26f0befa614910 languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/helper-compilation-targets@npm:7.23.6" - dependencies: - "@babel/compat-data": "npm:^7.23.5" - "@babel/helper-validator-option": "npm:^7.23.5" - browserslist: "npm:^4.22.2" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10/05595cd73087ddcd81b82d2f3297aac0c0422858dfdded43d304786cf680ec33e846e2317e6992d2c964ee61d93945cbf1fa8ec80b55aee5bfb159227fb02cb9 +"@cspell/cspell-service-bus@npm:8.10.4": + version: 8.10.4 + resolution: "@cspell/cspell-service-bus@npm:8.10.4" + checksum: 10/f0a9759605e920eef5ca41ef11a41b477d823b6d8b8df2b4360b950a6da7e418285af60e8f7158f4e4f6f342f44891d82b6fd4f98726947332f0935e30b9db18 languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.24.7, @babel/helper-compilation-targets@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-compilation-targets@npm:7.24.8" - dependencies: - "@babel/compat-data": "npm:^7.24.8" - "@babel/helper-validator-option": "npm:^7.24.8" - browserslist: "npm:^4.23.1" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10/3489280d07b871af565b32f9b11946ff9a999fac0db9bec5df960760f6836c7a4b52fccb9d64229ccce835d37a43afb85659beb439ecedde04dcea7eb062a143 +"@cspell/cspell-types@npm:8.10.4": + version: 8.10.4 + resolution: "@cspell/cspell-types@npm:8.10.4" + checksum: 10/b5f5ca7e64e01c21f37b7b7d68135d8fad42dc90da3f1e590b84dc8c0f29fb3506b67f3d17f9da047134004d401d4c18eaa2e0509004cac13a4ed7d53d17c056 languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.21.0, @babel/helper-create-class-features-plugin@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-create-class-features-plugin@npm:7.22.15" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/helper-member-expression-to-functions": "npm:^7.22.15" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/000d29f1df397b7fdcb97ad0e9a442781787e5cb0456a9b8da690d13e03549a716bf74348029d3bd3fa4837b35d143a535cad1006f9d552063799ecdd96df672 +"@cspell/dict-ada@npm:^4.0.2": + version: 4.0.2 + resolution: "@cspell/dict-ada@npm:4.0.2" + checksum: 10/31b0f0f6b9b324e8d3be4074302ddc9a7e968833d79c0a9f7899de9138b386bd6dcad3f63afdb1d42e87838bba5881c7b7f2b0916621fb1e64c7fdb6a572afe5 languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.22.11, @babel/helper-create-class-features-plugin@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/helper-create-class-features-plugin@npm:7.22.11" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/helper-member-expression-to-functions": "npm:^7.22.5" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/53f77935602f330a1334ae61a681ab50778ea35dbe85b04ddf95cd39f49b3da84632b8986caa97e25ccad07b23a72a2c819bd60c902d16e140a3f970aef18708 +"@cspell/dict-aws@npm:^4.0.2": + version: 4.0.2 + resolution: "@cspell/dict-aws@npm:4.0.2" + checksum: 10/7f784f0a054f4d142a22e94d411d6383b5bbba8b1d77952d45664a3bf35626926a0b8057293663287e6c53655c7dd32c6348905ecceb2970056e1cc5cf962e11 languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.24.7": - version: 7.24.8 - resolution: "@babel/helper-create-class-features-plugin@npm:7.24.8" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/helper-member-expression-to-functions": "npm:^7.24.8" - "@babel/helper-optimise-call-expression": "npm:^7.24.7" - "@babel/helper-replace-supers": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/helper-split-export-declaration": "npm:^7.24.7" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/a779c5356fcc4881e807d85d973fd37e99e773fe95837b0f6582ca9a89331f84e5f26b0b6aa9a101181325b73cf3f54081d178b657a79819b8abadc53b0ea8ec +"@cspell/dict-bash@npm:^4.1.3": + version: 4.1.3 + resolution: "@cspell/dict-bash@npm:4.1.3" + checksum: 10/4ba66c76c144d4c7ea1dd0fb92dfb0d7fd1e43a106a73fc7e9010b4a5c276aa4ef791c7161f56bf911356e3667ba043ee63271c1ffc485d9f8712553770e3ea9 languageName: node linkType: hard -"@babel/helper-create-regexp-features-plugin@npm:^7.16.7": - version: 7.17.0 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.17.0" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.16.7" - regexpu-core: "npm:^5.0.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/de60946279ce46ab64f07e2c93d981ace72625afeee1b5807af5007499f88ccbf4729f3aa421db5c4bc17b24cb5d9e0a79ce1dd7237dc1f21f65f7d66676de6c +"@cspell/dict-companies@npm:^3.1.2": + version: 3.1.2 + resolution: "@cspell/dict-companies@npm:3.1.2" + checksum: 10/58a95faba7cf7397530064ab9fc29aea0b5a95c5d4c31abd2abd0537f344705c71112a50ae61a1c026078dd1ca2e4433164eee1761cd05bfae4b25a75161ba4f languageName: node linkType: hard -"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.22.5" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - regexpu-core: "npm:^5.3.1" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/a6c2583918a0b4b66f23a7209ea9f430fc346360376684788c08c13fb31a1a55be6d0f1acd597f2689831045d31aadaee6e45e1f18d819b9088e900928512581 +"@cspell/dict-cpp@npm:^5.1.10": + version: 5.1.10 + resolution: "@cspell/dict-cpp@npm:5.1.10" + checksum: 10/ba8727af8ab3ac18f0ba030f043378bb6c951d819b7fba0114ca9377271752d04c1b3b6dfe4f9384fc35069ab7ff671313bc681a06345ef6625be7ca7fc37132 languageName: node linkType: hard -"@babel/helper-create-regexp-features-plugin@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.24.7" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - regexpu-core: "npm:^5.3.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/dd7238af30ea6b26a627192422822ae810873fd899150dd8d4348eb107045721a849abcfa2bd04f917493784a93724b8caf6994c31afd16f9347a8a9b9862425 +"@cspell/dict-cryptocurrencies@npm:^5.0.0": + version: 5.0.0 + resolution: "@cspell/dict-cryptocurrencies@npm:5.0.0" + checksum: 10/116e7f117b59ea4c9fa7ae1c3b47fc963e050448d43e059fb93731a256881ee262420edd5b9701ffe88af3d5e95b0337fc99b4dde1b0283ee0aaed45b23e281e languageName: node linkType: hard -"@babel/helper-define-polyfill-provider@npm:^0.4.2": - version: 0.4.2 - resolution: "@babel/helper-define-polyfill-provider@npm:0.4.2" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/6383a34af4048957e46366fa7e6228b61e140955a707f8af7b69c26b2b780880db164d08b6de9420f6ec5a0ee01eb23aa5d78a4b141f2b65b3670e71906471bf +"@cspell/dict-csharp@npm:^4.0.2": + version: 4.0.2 + resolution: "@cspell/dict-csharp@npm:4.0.2" + checksum: 10/d2ecb2aada51c5f0d6d557fd4f0c6eddb5b299e0955e066c49cd2afe96a1c6fe0afde699fdb885dd3183603a1efbd1d793b6a490b8d039256445b4b154b7375b languageName: node linkType: hard -"@babel/helper-define-polyfill-provider@npm:^0.4.3": - version: 0.4.3 - resolution: "@babel/helper-define-polyfill-provider@npm:0.4.3" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/9ab9d6a2cfaffc44f8b7ad661b642b03f31597282557686b7f4c64f67acd3c5844d4eac028e63d238819bcec0549ddef7dc0539d10966ace96f4c61e97b33138 +"@cspell/dict-css@npm:^4.0.12": + version: 4.0.12 + resolution: "@cspell/dict-css@npm:4.0.12" + checksum: 10/da812243c92ef07082334d512561606f178e003fa50324332c322655fab0982ed1bea055d75a348b37cea71fbe652224dcfff14dc445d26530cfa3c491b2b324 languageName: node linkType: hard -"@babel/helper-define-polyfill-provider@npm:^0.5.0": - version: 0.5.0 - resolution: "@babel/helper-define-polyfill-provider@npm:0.5.0" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/f849e816ec4b182a3e8fa8e09ff016f88bb95259cd6b2190b815c48f83c3d3b68e973a8ec72acc5086bfe93705cbd46ec089c06476421d858597780e42235a03 +"@cspell/dict-dart@npm:^2.0.3": + version: 2.0.3 + resolution: "@cspell/dict-dart@npm:2.0.3" + checksum: 10/66bfcfa029baacd0b14b3ff5b6ab7597cf9459f77185d88b25123b42a4babb66df6786806843f1b6506c335326100599a2e1db6e6104e66bd021ede9ccb3cec4 languageName: node linkType: hard -"@babel/helper-define-polyfill-provider@npm:^0.6.2": - version: 0.6.2 - resolution: "@babel/helper-define-polyfill-provider@npm:0.6.2" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/bb32ec12024d3f16e70641bc125d2534a97edbfdabbc9f69001ec9c4ce46f877c7a224c566aa6c8c510c3b0def2e43dc4433bf6a40896ba5ce0cef4ea5ccbcff +"@cspell/dict-data-science@npm:^2.0.1": + version: 2.0.1 + resolution: "@cspell/dict-data-science@npm:2.0.1" + checksum: 10/1ae8e71161a02e8ee1bfed86bc815b81ae3eaeb9476fea4bc3c41556c525657123bac85fc2789bdbe18e444f9629fe8a1e69fd78a99f89b42edfa3211098a588 languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-environment-visitor@npm:7.16.7" - dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10/c03a10105d9ebd1fe632a77356b2e6e2f3c44edba9a93b0dc3591b6a66bd7a2e323dd9502f9ce96fc6401234abff1907aa877b6674f7826b61c953f7c8204bbe +"@cspell/dict-django@npm:^4.1.0": + version: 4.1.0 + resolution: "@cspell/dict-django@npm:4.1.0" + checksum: 10/d64b830ab761f3610ca5eb81b06447c91a64b988bc3e40bac214fc611de498fa019e1cd76f6f21254ad2d3bfaeb3d10248481f0a02711d6a3ed715df062b2ba6 languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-environment-visitor@npm:7.18.9" - checksum: 10/b25101f6162ddca2d12da73942c08ad203d7668e06663df685634a8fde54a98bc015f6f62938e8554457a592a024108d45b8f3e651fd6dcdb877275b73cc4420 +"@cspell/dict-docker@npm:^1.1.7": + version: 1.1.7 + resolution: "@cspell/dict-docker@npm:1.1.7" + checksum: 10/307f8b5132edca7cd291ba0ab6ed88f8787df984d6a42401b12a0da1ecb935d50af3a108ede885ce5bede96c445acdc88bb9ea8396de151c565a90a3bf66853e languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-environment-visitor@npm:7.22.20" - checksum: 10/d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 +"@cspell/dict-dotnet@npm:^5.0.2": + version: 5.0.2 + resolution: "@cspell/dict-dotnet@npm:5.0.2" + checksum: 10/319c6ed2793ad9f5ab01b2a7a3fa7280edd762714ff109dfafc24b397bc7ba7e8917cf8c68dd2d124eb11a7b7f60e677b1fd36d3610733b3f32668f966902ebd languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-environment-visitor@npm:7.22.5" - checksum: 10/248532077d732a34cd0844eb7b078ff917c3a8ec81a7f133593f71a860a582f05b60f818dc5049c2212e5baa12289c27889a4b81d56ef409b4863db49646c4b1 +"@cspell/dict-elixir@npm:^4.0.3": + version: 4.0.3 + resolution: "@cspell/dict-elixir@npm:4.0.3" + checksum: 10/f084449b2de5a2fa08076ac699c6073beaa4bb43796a662d681ea8fe5cba31f9efe718f3f98ef432ba75d4ea574316de34ab8422f79f4f2022cfddee7a7b8653 languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-environment-visitor@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/079d86e65701b29ebc10baf6ed548d17c19b808a07aa6885cc141b690a78581b180ee92b580d755361dc3b16adf975b2d2058b8ce6c86675fcaf43cf22f2f7c6 +"@cspell/dict-en-common-misspellings@npm:^2.0.3": + version: 2.0.3 + resolution: "@cspell/dict-en-common-misspellings@npm:2.0.3" + checksum: 10/8ea5f6843635089a82f135ca4302b8ed0c208254cda83b56fa72a72a30ee983452a1abaf003f5ccf76a8f1faf9596da91dfe4441f2bbd00145b305a2e501311e languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-function-name@npm:7.22.5" - dependencies: - "@babel/template": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - checksum: 10/6d02e304a45fe2a64d69dfa5b4fdfd6d68e08deb32b0a528e7b99403d664e9207e6b856787a8ff3f420e77d15987ac1de4eb869906e6ed764b67b07c804d20ba +"@cspell/dict-en-gb@npm:1.1.33": + version: 1.1.33 + resolution: "@cspell/dict-en-gb@npm:1.1.33" + checksum: 10/72db891c955ce9b24ba756c1baad41e92854a85fe326699f9ab328358b02a76d57b65d26d02afa050c4f96668a51c1dab6fce7eaad51c70c113588bbc2b46756 languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/helper-function-name@npm:7.23.0" - dependencies: - "@babel/template": "npm:^7.22.15" - "@babel/types": "npm:^7.23.0" - checksum: 10/7b2ae024cd7a09f19817daf99e0153b3bf2bc4ab344e197e8d13623d5e36117ed0b110914bc248faa64e8ccd3e97971ec7b41cc6fd6163a2b980220c58dcdf6d +"@cspell/dict-en_us@npm:^4.3.23": + version: 4.3.23 + resolution: "@cspell/dict-en_us@npm:4.3.23" + checksum: 10/d1c9a5b599ab13a9fe572b240e473b87945bd95ffbe9d39b66da2938b3902dc84448a1ce120c99b22bdcad0e0547523f1d92f027ea38ed8d5902441bbb0c0c53 languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-function-name@npm:7.24.7" - dependencies: - "@babel/template": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/2ceb3d9b2b35a0fc4100fc06ed7be3bc38f03ff0bf128ff0edbc0cc7dd842967b1496fc70b5c616c747d7711c2b87e7d025c8888f48740631d6148a9d3614f85 +"@cspell/dict-filetypes@npm:^3.0.4": + version: 3.0.4 + resolution: "@cspell/dict-filetypes@npm:3.0.4" + checksum: 10/d5e8e46f9caf40c895326c7557f42c0648458717f79d9f41f145170dbe36ec9e21dea322117a92a6a904385dfb3efd0dd63a349edf705c6cc4255861f8b97cce languageName: node linkType: hard -"@babel/helper-hoist-variables@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-hoist-variables@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc +"@cspell/dict-fonts@npm:^4.0.0": + version: 4.0.0 + resolution: "@cspell/dict-fonts@npm:4.0.0" + checksum: 10/894a31f3df8e3a43a3dcf13e1706eb94cb5e83bd6d2aa26b0e9fc79c2de304eb5e9118eec4dff6a673e2a3243c842ca694c8e0f3c0ad78301004f983acf53832 languageName: node linkType: hard -"@babel/helper-hoist-variables@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-hoist-variables@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/6cfdcf2289cd12185dcdbdf2435fa8d3447b797ac75851166de9fc8503e2fd0021db6baf8dfbecad3753e582c08e6a3f805c8d00cbed756060a877d705bd8d8d +"@cspell/dict-fsharp@npm:^1.0.1": + version: 1.0.1 + resolution: "@cspell/dict-fsharp@npm:1.0.1" + checksum: 10/ce0df20704bf95d1fe434d2889cc764279cbce2b057fc5247be1ccaf7a8cc57372de3da2cdab6643b3df5221119716929b2e2aaad3f60533dcf0bd3c7d892fab languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-member-expression-to-functions@npm:7.22.15" - dependencies: - "@babel/types": "npm:^7.22.15" - checksum: 10/2f10bd39605539d5a30580d8da7e24d90788960cd22c93e640dfd95f8edf5c9d9d2f664e4dfc08a3cf2f14c4976178b638db7433321a20e8f90c33968e4465c6 +"@cspell/dict-fullstack@npm:^3.1.8": + version: 3.1.8 + resolution: "@cspell/dict-fullstack@npm:3.1.8" + checksum: 10/c0f178e751f0e4779600749d5f77e313e33362ba6d4737d3969f64ca272200bb8cc94dd10cccc18de58e60223b46a39247c5e4ca1d5eda768a1d08c1725fb9e7 languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-member-expression-to-functions@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/bb51f195c17d8d98ca5fda630fed436643d27f094f3c936f670b43cb05865f192900f455ffb730c8d4310702b2211996a90354fd55ae8659b096bc6c75d36ec5 +"@cspell/dict-gaming-terms@npm:^1.0.5": + version: 1.0.5 + resolution: "@cspell/dict-gaming-terms@npm:1.0.5" + checksum: 10/25d50653ed5e940f9302cc5536c37a20854bb274dec9302d73c5349e51ec623d33d99e4fe283e3b30e70f452063361fbc4cae7dc603232fa82004262f37d0f50 languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.24.7, @babel/helper-member-expression-to-functions@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-member-expression-to-functions@npm:7.24.8" - dependencies: - "@babel/traverse": "npm:^7.24.8" - "@babel/types": "npm:^7.24.8" - checksum: 10/ac878761cfd0a46c081cda0da75cc186f922cf16e8ecdd0c4fb6dca4330d9fe4871b41a9976224cf9669c9e7fe0421b5c27349f2e99c125fa0be871b327fa770 +"@cspell/dict-git@npm:^3.0.0": + version: 3.0.0 + resolution: "@cspell/dict-git@npm:3.0.0" + checksum: 10/97b6da58c93108bae0867515f790d84728f0bce580cc8ad6f0f5f63b2c81eaf6d084d543d99b693ff4d7fbea2413ff068c3e4811fc107820d243da2c06d381fa languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.10.4, @babel/helper-module-imports@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-module-imports@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/d8296447c0cdc3c02417ba32864da3374e53bd2763a6c404aae118987c222c47238d9d1f4fd2a88250a85e0a68eff38d878c491b00c56d9bd20e809f91eb41b4 +"@cspell/dict-golang@npm:^6.0.9": + version: 6.0.9 + resolution: "@cspell/dict-golang@npm:6.0.9" + checksum: 10/4ce7fc8f1a925eb3c4a2a2a2ae4d75be79e698d2f6cd90ff549892705687011a190b9aabc8bb5c2c7616d24f42a3264121ad8ae056a844937984d301fa7cd90f languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-module-imports@npm:7.16.7" - dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10/f48cb485be7cad70c3fdcbc1d6d104732565288fe5dd38575be4b6dd577aa606a0e7553078cebf91bea5182e1b059bcc5b6882cd1f8ccb9013d6c76b6ff136ff +"@cspell/dict-google@npm:^1.0.1": + version: 1.0.1 + resolution: "@cspell/dict-google@npm:1.0.1" + checksum: 10/4e2975c76e661884defdce928847f6babd3e0e296867540cf37ca56623854f97f74e225d668116b904d572574915c8c723f17171f1d00847bb877e1eae375e7d languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-module-imports@npm:7.18.6" - dependencies: - "@babel/types": "npm:^7.18.6" - checksum: 10/75b0d510271c2d220c426ec1174666febbe8ce520e66f99f87e8944acddaf5d1e88167fe500a1c8e46a770a5cb916e566d3b514ec0af6cbdac93089ed8200716 +"@cspell/dict-haskell@npm:^4.0.1": + version: 4.0.1 + resolution: "@cspell/dict-haskell@npm:4.0.1" + checksum: 10/cfb51e415b60c5eb266a5782d0a4b19a37f1389b9b018d1bbb2ff4358bd739af1f76f68f26a138d4b4bd0ab67146d6eb9032fc3d3c212695237c134e05339c79 languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-module-imports@npm:7.22.15" - dependencies: - "@babel/types": "npm:^7.22.15" - checksum: 10/5ecf9345a73b80c28677cfbe674b9f567bb0d079e37dcba9055e36cb337db24ae71992a58e1affa9d14a60d3c69907d30fe1f80aea105184501750a58d15c81c +"@cspell/dict-html-symbol-entities@npm:^4.0.0": + version: 4.0.0 + resolution: "@cspell/dict-html-symbol-entities@npm:4.0.0" + checksum: 10/79f05f9080f39dbde703980eb587ed6624b8fc2f5cedc297327bc1b9b7e6022a7c382e6013149b1afe00609b96003ab5c8d18d378979f76f336ab626317183f4 languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-module-imports@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/df8bfb2bb18413aa151ecd63b7d5deb0eec102f924f9de6bc08022ced7ed8ca7fed914562d2f6fa5b59b74a5d6e255dc35612b2bc3b8abf361e13f61b3704770 +"@cspell/dict-html@npm:^4.0.5": + version: 4.0.5 + resolution: "@cspell/dict-html@npm:4.0.5" + checksum: 10/8801b7f77910f6a269efc652c88ecc3299cabedec03566ad6fb661845fdf9a4950bd7a2cdd1216dde982eddc9caf9ec00c6917ac90707fabb7686d02b30b0a5c languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.16.7": - version: 7.17.6 - resolution: "@babel/helper-module-transforms@npm:7.17.6" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.16.7" - "@babel/helper-module-imports": "npm:^7.16.7" - "@babel/helper-simple-access": "npm:^7.16.7" - "@babel/helper-split-export-declaration": "npm:^7.16.7" - "@babel/helper-validator-identifier": "npm:^7.16.7" - "@babel/template": "npm:^7.16.7" - "@babel/traverse": "npm:^7.17.3" - "@babel/types": "npm:^7.17.0" - checksum: 10/548455e05142a1def4bbfc946c1be12241a99628a2c3e25a12ec81db49a62e494c47719c7d4aa5091b73ffac0a3e2b442731ed188ff53506c93e49e9d10db82d +"@cspell/dict-java@npm:^5.0.7": + version: 5.0.7 + resolution: "@cspell/dict-java@npm:5.0.7" + checksum: 10/c33b5e69c7eb03d6416a5a9a6971e69374167967a380dbc91062d8143e249c9595fcc26f9163112ff36d3b8dbca23eed2025b48e086c622eb6bb450f755087ef languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-module-transforms@npm:7.18.9" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.18.9" - "@babel/helper-module-imports": "npm:^7.18.6" - "@babel/helper-simple-access": "npm:^7.18.6" - "@babel/helper-split-export-declaration": "npm:^7.18.6" - "@babel/helper-validator-identifier": "npm:^7.18.6" - "@babel/template": "npm:^7.18.6" - "@babel/traverse": "npm:^7.18.9" - "@babel/types": "npm:^7.18.9" - checksum: 10/2e64d723405071946ab3019cfde1bdf95d98a2a220802a782a920b3ce3fe7ab92caf81d11b2b7722cdb5fd0c9f428ff3b33b86478bde39520e886fefe0b67e6d +"@cspell/dict-julia@npm:^1.0.1": + version: 1.0.1 + resolution: "@cspell/dict-julia@npm:1.0.1" + checksum: 10/4cce630dddb7579b3750875af43f40fb4e6019fe6ab30791b160b71a677c17e2c6e227d54555193255b43dd08a1f1fab500a82012d9831ccca923c4f8791b976 languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-module-transforms@npm:7.22.5" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-module-imports": "npm:^7.22.5" - "@babel/helper-simple-access": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.5" - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - checksum: 10/1ebe1e0458f7eaaf085953888df4311ca1a2cdac15a656c63a7f9c5ecd003993cf3eb41ad1545d0e41039955f8d2f8fa64747a9419ae32bbf5bea532a51fa9f4 +"@cspell/dict-k8s@npm:^1.0.5": + version: 1.0.5 + resolution: "@cspell/dict-k8s@npm:1.0.5" + checksum: 10/d7a251e44412ff7d337dabe20deedd5bb9553e2825f81a7c01788aa80dbae99a24c57cc6f686d9a249bcfbd0436248d1814b8c786425a3b20a7e189b1019775f languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/helper-module-transforms@npm:7.22.9" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-module-imports": "npm:^7.22.5" - "@babel/helper-simple-access": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/helper-validator-identifier": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/80244f45e3f665305f8cf9412ee2efe44d1d30c201f869ceb0e87f9cddbbff06ebfed1dbe122a40875404867b747e7df73c0825c93765c108bcf2e86d2ef8b9b +"@cspell/dict-latex@npm:^4.0.0": + version: 4.0.0 + resolution: "@cspell/dict-latex@npm:4.0.0" + checksum: 10/7e7a520196d143d0a3185689d09d84bf1e23b5328dfc78187c4e4ab264bd49c3dd695eb92f8d582583e5bc26bcab4ed0976b310b56a000af81d88a7acdea7f8c languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/helper-module-transforms@npm:7.23.0" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-simple-access": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/helper-validator-identifier": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/d72fe444f7b6c5aadaac8f393298d603eedd48e5dead67273a48e5c83a677cbccbd8a12a06c5bf5d97924666083279158a4bd0e799d28b86cbbfacba9e41f598 +"@cspell/dict-lorem-ipsum@npm:^4.0.0": + version: 4.0.0 + resolution: "@cspell/dict-lorem-ipsum@npm:4.0.0" + checksum: 10/d3575fb7b9684480192d2cd647484312c555f3d1215d6b35371b70de3ecde4273010e5916cc2d130ff1e1223a1a49f75825651671a76d3dabdec98acf67a3902 languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/helper-module-transforms@npm:7.23.3" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-simple-access": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/helper-validator-identifier": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/583fa580f8e50e6f45c4f46aa76a8e49c2528deb84e25f634d66461b9a0e2420e13979b0a607b67aef67eaf8db8668eb9edc038b4514b16e3879fe09e8fd294b +"@cspell/dict-lua@npm:^4.0.3": + version: 4.0.3 + resolution: "@cspell/dict-lua@npm:4.0.3" + checksum: 10/eee20135a4f0620302c5feeb50485f59af93c24b64eb2081a9e2096a106ce33ae565d6d92607582b44c9f17c8a091d82fbcb443ebae9b77f8512b0d66a703c3b languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.24.7, @babel/helper-module-transforms@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-module-transforms@npm:7.24.8" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-module-imports": "npm:^7.24.7" - "@babel/helper-simple-access": "npm:^7.24.7" - "@babel/helper-split-export-declaration": "npm:^7.24.7" - "@babel/helper-validator-identifier": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/912ad994da126c3150d8f8702030380849608094a7a352523ffa8e697080da9358d63af2582d38902c929839f394bbc6f1ae4921ba132ba3f65f27f0696aa2c7 +"@cspell/dict-makefile@npm:^1.0.0": + version: 1.0.0 + resolution: "@cspell/dict-makefile@npm:1.0.0" + checksum: 10/f0cac4caf31e27accd5df5e0c2f53097cccbbd085126c4b4ecc08be2a32bd7f89fe6b052e9eae4ec99843175cafa94561868271fb53c5389f27cc078565b5123 languageName: node linkType: hard -"@babel/helper-optimise-call-expression@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-optimise-call-expression@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/c70ef6cc6b6ed32eeeec4482127e8be5451d0e5282d5495d5d569d39eb04d7f1d66ec99b327f45d1d5842a9ad8c22d48567e93fc502003a47de78d122e355f7c +"@cspell/dict-monkeyc@npm:^1.0.6": + version: 1.0.6 + resolution: "@cspell/dict-monkeyc@npm:1.0.6" + checksum: 10/3d174203af5c12e515e0bdcc7b43a75cc8f5ef097db65249773f386e063febbfe6a47c39414fc52e0970e7dde1f0b32bc5fc0e586761f1e0cd082f1bce0e7572 languageName: node linkType: hard -"@babel/helper-optimise-call-expression@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-optimise-call-expression@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/da7a7f2d1bb1be4cffd5fa820bd605bc075c7dd014e0458f608bb6f34f450fe9412c8cea93e788227ab396e0e02c162d7b1db3fbcb755a6360e354c485d61df0 +"@cspell/dict-node@npm:^5.0.1": + version: 5.0.1 + resolution: "@cspell/dict-node@npm:5.0.1" + checksum: 10/553d09eb7a0ec6eb1d5be85b7fb34fb88c9f87712708982a289f67157068a5e69e0e7e46321c17c9d9c2e57d1e442399fa0f96bc2916221eddcc6519c96b0105 languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.16.7 - resolution: "@babel/helper-plugin-utils@npm:7.16.7" - checksum: 10/d08dd86554a186c2538547cd537552e4029f704994a9201d41d82015c10ed7f58f9036e8d1527c3760f042409163269d308b0b3706589039c5f1884619c6d4ce +"@cspell/dict-npm@npm:^5.0.16": + version: 5.0.16 + resolution: "@cspell/dict-npm@npm:5.0.16" + checksum: 10/ec77d0e297e6a50b1889a15332771c6605997bb1c4a8d9f0528ded69ea993fae449f303f4bca04c4cd56c24ad4151feb67b64cfade58aa21c81d80e1b0474b32 languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-plugin-utils@npm:7.22.5" - checksum: 10/ab220db218089a2aadd0582f5833fd17fa300245999f5f8784b10f5a75267c4e808592284a29438a0da365e702f05acb369f99e1c915c02f9f9210ec60eab8ea +"@cspell/dict-php@npm:^4.0.8": + version: 4.0.8 + resolution: "@cspell/dict-php@npm:4.0.8" + checksum: 10/245c46db2d387044b9d9cfa6de4eb46b5a8cbbb33a0875c171c75230db599af5d8592165a618c849e99610f2c173564a6867c5475a2dbc5bbdea437bcb2b569b languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.20.2": - version: 7.20.2 - resolution: "@babel/helper-plugin-utils@npm:7.20.2" - checksum: 10/7bd5be752998e8bfa616e6fbf1fd8f1a7664039a435d5da11cfd97a320b6eb58e28156f4789b2da242a53ed45994d04632b2e19684c1209e827522a07f0cd022 +"@cspell/dict-powershell@npm:^5.0.4": + version: 5.0.4 + resolution: "@cspell/dict-powershell@npm:5.0.4" + checksum: 10/13aa687130db6330a86f7b9cd1f7be9046ac3102aa96be9c71e130639fc3eff9b0a1ad45914bcaa497af2d628e2d3bc8babf02d6b657fd18d88fddc412ec4fec languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-plugin-utils@npm:7.24.8" - checksum: 10/adbc9fc1142800a35a5eb0793296924ee8057fe35c61657774208670468a9fbfbb216f2d0bc46c680c5fefa785e5ff917cc1674b10bd75cdf9a6aa3444780630 +"@cspell/dict-public-licenses@npm:^2.0.7": + version: 2.0.7 + resolution: "@cspell/dict-public-licenses@npm:2.0.7" + checksum: 10/7bbd067668499c45bad9eb8e3dae598bc5635e6035160bff7343b87cd31e419387e704fa290d0e23903fff6c80b65838ebe5638e2951dc5d9214df9b98b60ce2 languageName: node linkType: hard -"@babel/helper-remap-async-to-generator@npm:^7.18.9, @babel/helper-remap-async-to-generator@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-remap-async-to-generator@npm:7.22.5" +"@cspell/dict-python@npm:^4.2.1": + version: 4.2.1 + resolution: "@cspell/dict-python@npm:4.2.1" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-wrap-function": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/1e51dcff1c22e97ea3d22034b77788048eb6d8c6860325bd7a1046b7a7135730cefd93b5c96fd9839d76031095d5ffb6f0cd6ee90a5d69a4c7de980d7f4623d9 + "@cspell/dict-data-science": "npm:^2.0.1" + checksum: 10/f0941bcfd518a3c63c68d8ed08304b98142e90e3b445b12ab4b13ce23508b573e323f4a5136bde2cd610f99814963e119b8b06c0d91fc5808e1a7c29a804cce4 languageName: node linkType: hard -"@babel/helper-remap-async-to-generator@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-remap-async-to-generator@npm:7.22.20" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-wrap-function": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/2fe6300a6f1b58211dffa0aed1b45d4958506d096543663dba83bd9251fe8d670fa909143a65b45e72acb49e7e20fbdb73eae315d9ddaced467948c3329986e7 +"@cspell/dict-r@npm:^2.0.1": + version: 2.0.1 + resolution: "@cspell/dict-r@npm:2.0.1" + checksum: 10/fe85939ad4c8ada34284a673918be711cca60b6d6f1c48ee98602c27905228dfbaea3462a350094633032c1d6b6bba9548df7019e0b21673cf1cf887c57ca228 languageName: node linkType: hard -"@babel/helper-remap-async-to-generator@npm:^7.22.9": - version: 7.22.17 - resolution: "@babel/helper-remap-async-to-generator@npm:7.22.17" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-wrap-function": "npm:^7.22.17" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/59307e623d00b6f5fa7f974e29081b2243e3f7bc3a89df331e8c1f8815d83f97bd092404a28b8bef5299028e3259450b5a943f34e1b32c7c55350436d218ab13 +"@cspell/dict-ruby@npm:^5.0.2": + version: 5.0.2 + resolution: "@cspell/dict-ruby@npm:5.0.2" + checksum: 10/c2006bcc808448b1eef146eb4b6b74388113c50334206191a9fe5817fb13669482ecd114f7bbd397562ad2e19a9683266ff396f48c6ce282f6445c2cfa8e82c7 languageName: node linkType: hard -"@babel/helper-remap-async-to-generator@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-remap-async-to-generator@npm:7.24.7" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-wrap-function": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/4b7c925e71811902c8aa57904044921027eae10ac9b5b029df491ed4abc1ea18b450a7923fd0feb1248ae37703889e72b6c27f2a0e2d5811103c7655c49ad355 +"@cspell/dict-rust@npm:^4.0.4": + version: 4.0.4 + resolution: "@cspell/dict-rust@npm:4.0.4" + checksum: 10/7ff86c4f172bf039ff1264f4736d9638d0792ab39ff5fc48812831241d622040f6591a3d9f630325537b0a4913e242bea14005ec3d2e3c167f933fe1416e0caa languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-replace-supers@npm:7.22.20" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-member-expression-to-functions": "npm:^7.22.15" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/617666f57b0f94a2f430ee66b67c8f6fa94d4c22400f622947580d8f3638ea34b71280af59599ed4afbb54ae6e2bdd4f9083fe0e341184a4bb0bd26ef58d3017 +"@cspell/dict-scala@npm:^5.0.2": + version: 5.0.2 + resolution: "@cspell/dict-scala@npm:5.0.2" + checksum: 10/c07bda723929f8b01ae0575af3d05ffffee9ed7523e0658a22d533cf287dd564d11bf16062a1692fb06c3aff2d519d07c7c2c3e5662ced8af1194b31b352af51 languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-replace-supers@npm:7.22.5" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-member-expression-to-functions": "npm:^7.22.5" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - checksum: 10/da219df60dfd7b22ad5dd514112a8fc93d5f916821fe4cc7fdb5c5d24b2efed478974363af9142b23b7fc1e15de5b0d9ce8431a13e28dabf335a8a5eec4fa223 +"@cspell/dict-software-terms@npm:^3.4.9": + version: 3.4.9 + resolution: "@cspell/dict-software-terms@npm:3.4.9" + checksum: 10/2fc21d7fefbd0269b760d2f634b22d6e54bd71dd3c03d96b59931fd1ef0c7380b6596e578621f907823eb8423bbdd297f56d8eaa150f2bbb23ed0559656c7523 languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/helper-replace-supers@npm:7.22.9" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-member-expression-to-functions": "npm:^7.22.5" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/b5a740a95f12250b67afe30574ad60fa44175db92441658c6c3e8f473fcb8f8eaffd24fdad436cdfa1beee21b470d1190d64a0bb97b444525ca952e6cc081dc9 +"@cspell/dict-sql@npm:^2.1.3": + version: 2.1.3 + resolution: "@cspell/dict-sql@npm:2.1.3" + checksum: 10/a435812cc697d4c453f11efa49962992150702518e49808381ea34548b8a8ed81432a10cca36682007912b013c28e9ce3c6c183341c6cde58c8af0eef25cddc3 languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-replace-supers@npm:7.24.7" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-member-expression-to-functions": "npm:^7.24.7" - "@babel/helper-optimise-call-expression": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/18b7c3709819d008a14953e885748f3e197537f131d8f7ae095fec245506d854ff40b236edb1754afb6467f795aa90ae42a1d961a89557702249bacfc3fdad19 +"@cspell/dict-svelte@npm:^1.0.2": + version: 1.0.2 + resolution: "@cspell/dict-svelte@npm:1.0.2" + checksum: 10/5b42989bc6743a26ca5172cc23ebc1449d930695b10c908376048ce1835bf57fef7a0004f02ec5e43219f24a97f154e125041df470441199a045ed0be9e654fc languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-simple-access@npm:7.16.7" - dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10/8d22c46c5ec2ead0686c4d5a3d1d12b5190c59be676bfe0d9d89df62b437b51d1a3df2ccfb8a77dded2e585176ebf12986accb6d45a18cff229eef3b10344f4b +"@cspell/dict-swift@npm:^2.0.1": + version: 2.0.1 + resolution: "@cspell/dict-swift@npm:2.0.1" + checksum: 10/0bbb106266205c5f5e12886a73ebf0db2078bab1bdd2e1f304fe28445cd72d847a4c5072bf4fe8f9e8cdb4bc69d52fffec0806aea19ea9b64b7a87c67ee01175 languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-simple-access@npm:7.18.6" - dependencies: - "@babel/types": "npm:^7.18.6" - checksum: 10/37cd36eef199e0517845763c1e6ff6ea5e7876d6d707a6f59c9267c547a50aa0e84260ba9285d49acfaf2cfa0a74a772d92967f32ac1024c961517d40b6c16a5 +"@cspell/dict-terraform@npm:^1.0.0": + version: 1.0.0 + resolution: "@cspell/dict-terraform@npm:1.0.0" + checksum: 10/132b8f0532aa5a6a08fa57487313722bc10ad37a4b94a5d76b072922eb4eb56d204a3e33c1569613af5b337bd125b8e2d30cae6bf5400a07fa58c551c7fe3b37 languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-simple-access@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/7d5430eecf880937c27d1aed14245003bd1c7383ae07d652b3932f450f60bfcf8f2c1270c593ab063add185108d26198c69d1aca0e6fb7c6fdada4bcf72ab5b7 +"@cspell/dict-typescript@npm:^3.1.5": + version: 3.1.5 + resolution: "@cspell/dict-typescript@npm:3.1.5" + checksum: 10/9e99aa7c849133fcab6d16864045b512be3f0b89c76caf31234fcc6edf818e06e2af4087f576e5837e209dc0bdc1d1379d6752bac48aab517e0661c0e4eeff58 languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-simple-access@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/5083e190186028e48fc358a192e4b93ab320bd016103caffcfda81302a13300ccce46c9cd255ae520c25d2a6a9b47671f93e5fe5678954a2329dc0a685465c49 +"@cspell/dict-vue@npm:^3.0.0": + version: 3.0.0 + resolution: "@cspell/dict-vue@npm:3.0.0" + checksum: 10/4db58b1d6f9be1a523a35678877f2cca2bb04548b136ec5ec4e7186500978dbc32cc8747ced80ade3cad3acc3c80eb23afe980679165810f8f8f26802e952e2f languageName: node linkType: hard -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0, @babel/helper-skip-transparent-expression-wrappers@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.22.5" +"@cspell/dynamic-import@npm:8.10.4": + version: 8.10.4 + resolution: "@cspell/dynamic-import@npm:8.10.4" dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/1012ef2295eb12dc073f2b9edf3425661e9b8432a3387e62a8bc27c42963f1f216ab3124228015c748770b2257b4f1fda882ca8fa34c0bf485e929ae5bc45244 + import-meta-resolve: "npm:^4.1.0" + checksum: 10/d07b83c990a0ff4a645df5ea45a7aa9eb6a948a16132382a2b3aafe470094892b90d53bb81cad336d5df27cd7f6a30c0c4289327825e05fcb26556a59ae91b15 languageName: node linkType: hard -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/784a6fdd251a9a7e42ccd04aca087ecdab83eddc60fda76a2950e00eb239cc937d3c914266f0cc476298b52ac3f44ffd04c358e808bd17552a7e008d75494a77 +"@cspell/strong-weak-map@npm:8.10.4": + version: 8.10.4 + resolution: "@cspell/strong-weak-map@npm:8.10.4" + checksum: 10/3249a3584b38c0079ac3b245c419b99ba65dfede461c81b3a14747107d20760c1b2b7f912e5cba220bdd7c9d5f2756b8bb977f05e33f3674f91d98fc604d12c5 languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:7.22.6, @babel/helper-split-export-declaration@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/helper-split-export-declaration@npm:7.22.6" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/e141cace583b19d9195f9c2b8e17a3ae913b7ee9b8120246d0f9ca349ca6f03cb2c001fd5ec57488c544347c0bb584afec66c936511e447fd20a360e591ac921 +"@cspell/url@npm:8.10.4": + version: 8.10.4 + resolution: "@cspell/url@npm:8.10.4" + checksum: 10/d288407f2b623502302afe76a17279d414b87d1c8523d37c5ebac780cf30706fc9eaceaa8f07ac3ca0ceae2ad5ec3eb0d533349c14bb92aad4d5163ff812a7a4 languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-split-export-declaration@npm:7.16.7" +"@cspotcode/source-map-support@npm:^0.8.0": + version: 0.8.1 + resolution: "@cspotcode/source-map-support@npm:0.8.1" dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10/e10aaf135465c55114627951b79115f24bc7af72ecbb58d541d66daf1edaee5dde7cae3ec8c3639afaf74526c03ae3ce723444e3b5b3dc77140c456cd84bcaa1 + "@jridgewell/trace-mapping": "npm:0.3.9" + checksum: 10/b6e38a1712fab242c86a241c229cf562195aad985d0564bd352ac404be583029e89e93028ffd2c251d2c407ecac5fb0cbdca94a2d5c10f29ac806ede0508b3ff languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-split-export-declaration@npm:7.18.6" +"@dependents/detective-less@npm:^4.1.0": + version: 4.1.0 + resolution: "@dependents/detective-less@npm:4.1.0" dependencies: - "@babel/types": "npm:^7.18.6" - checksum: 10/c6d3dede53878f6be1d869e03e9ffbbb36f4897c7cc1527dc96c56d127d834ffe4520a6f7e467f5b6f3c2843ea0e81a7819d66ae02f707f6ac057f3d57943a2b + gonzales-pe: "npm:^4.3.0" + node-source-walk: "npm:^6.0.1" + checksum: 10/5188bc4f0314ea2c7d6390c938904e91ba8aea15c7eb62f633e916db4d90af9e0cf27b6ab30e4b5bf60af9401433825d8d256076ef7ad258c9edb860f37fdb43 languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-split-export-declaration@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/d10e05a02f49c1f7c578cea63d2ac55356501bbf58856d97ac9bfde4957faee21ae97c7f566aa309e38a256eef58b58e5b670a7f568b362c00e93dfffe072650 +"@discoveryjs/json-ext@npm:^0.5.0": + version: 0.5.6 + resolution: "@discoveryjs/json-ext@npm:0.5.6" + checksum: 10/61f84f6098f5ae31128e98ff0e9415d1af4c2b61fcfb01a23800e2863a0a2a08ddc187a2152d68b7f4dcff6982f60f4e684bddda1edbbc55775ba9af58ca160b languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-split-export-declaration@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/ff04a3071603c87de0d6ee2540b7291ab36305b329bd047cdbb6cbd7db335a12f9a77af1cf708779f75f13c4d9af46093c00b34432e50b2411872c658d1a2e5e +"@esbuild/aix-ppc64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/aix-ppc64@npm:0.21.5" + conditions: os=aix & cpu=ppc64 languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.18.10, @babel/helper-string-parser@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-string-parser@npm:7.24.8" - checksum: 10/6d1bf8f27dd725ce02bdc6dffca3c95fb9ab8a06adc2edbd9c1c9d68500274230d1a609025833ed81981eff560045b6b38f7b4c6fb1ab19fc90e5004e3932535 +"@esbuild/android-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-arm64@npm:0.21.5" + conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.19.4": - version: 7.19.4 - resolution: "@babel/helper-string-parser@npm:7.19.4" - checksum: 10/05d428ed8111a2393a69f5ac2f075554d8d61ed3ffc885b62a1829ef25c2eaa7c53e69d0d35e658c995755dc916aeb4c8c04fe51391758ea4b86c931111ebbc2 - languageName: node - linkType: hard +"@esbuild/android-arm@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-arm@npm:0.21.5" + conditions: os=android & cpu=arm + languageName: node + linkType: hard -"@babel/helper-string-parser@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-string-parser@npm:7.22.5" - checksum: 10/7f275a7f1a9504da06afc33441e219796352a4a3d0288a961bc14d1e30e06833a71621b33c3e60ee3ac1ff3c502d55e392bcbc0665f6f9d2629809696fab7cdd +"@esbuild/android-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-x64@npm:0.21.5" + conditions: os=android & cpu=x64 languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/helper-string-parser@npm:7.23.4" - checksum: 10/c352082474a2ee1d2b812bd116a56b2e8b38065df9678a32a535f151ec6f58e54633cc778778374f10544b930703cca6ddf998803888a636afa27e2658068a9c +"@esbuild/darwin-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/darwin-arm64@npm:0.21.5" + conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-string-parser@npm:7.24.7" - checksum: 10/603d8d962bbe89907aa99a8f19a006759ab7b2464615f20a6a22e3e2e8375af37ddd0e5175c9e622e1c4b2d83607ffb41055a59d0ce34404502af30fde573a5c +"@esbuild/darwin-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/darwin-x64@npm:0.21.5" + conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-validator-identifier@npm:7.16.7" - checksum: 10/42b9b56c3543ded08992e8c118cb017dbde258895bd6a2e69186cb98f4f5811cd94ceedf4b5ace4877e7be07a7280aa9b9de65d1cb416064a1e0e1fd5a89fcca +"@esbuild/freebsd-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/freebsd-arm64@npm:0.21.5" + conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-validator-identifier@npm:7.18.6" - checksum: 10/9386e19302aefeadcb02f1e5593e43c40adef5ed64746ee338c3772a0a423f6f339f5547bc898b5bfa904e2b4b994c020ab1fb4fe108b696ac74ebb3e4c83663 +"@esbuild/freebsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/freebsd-x64@npm:0.21.5" + conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.19.1": - version: 7.19.1 - resolution: "@babel/helper-validator-identifier@npm:7.19.1" - checksum: 10/30ecd53b7276970d59d65e68e147ea885f8812e50d06a59315dd1f12dc41467d29d6c56bf1fd02e91100f939cba378815b2c19f5d3604331a153aed9efcbd2a9 +"@esbuild/linux-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-arm64@npm:0.21.5" + conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-validator-identifier@npm:7.22.15" - checksum: 10/4c142549ab5a1235c638d89b52b612a32a123ae19b7da70708385b1e2522530b3c90c85e38604dc6a5fee6a7928b447edacd55176f48a70e103d232eb0da31e5 +"@esbuild/linux-arm@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-arm@npm:0.21.5" + conditions: os=linux & cpu=arm languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-validator-identifier@npm:7.22.20" - checksum: 10/df882d2675101df2d507b95b195ca2f86a3ef28cb711c84f37e79ca23178e13b9f0d8b522774211f51e40168bf5142be4c1c9776a150cddb61a0d5bf3e95750b +"@esbuild/linux-ia32@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-ia32@npm:0.21.5" + conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-validator-identifier@npm:7.22.5" - checksum: 10/12cb7d4535b3f8d109a446f7bef08d20eebe94fd97b534cd415c936ab342e9634edc5c99961af976bd78bcae6e6ec4b2ab8483d0da2ac5926fbe9f7dd9ab28ab +"@esbuild/linux-loong64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-loong64@npm:0.21.5" + conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-validator-identifier@npm:7.24.7" - checksum: 10/86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b +"@esbuild/linux-mips64el@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-mips64el@npm:0.21.5" + conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-validator-option@npm:7.16.7" - checksum: 10/c5ccc451911883cc9f12125d47be69434f28094475c1b9d2ada7c3452e6ac98a1ee8ddd364ca9e3f9855fcdee96cdeafa32543ebd9d17fee7a1062c202e80570 +"@esbuild/linux-ppc64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-ppc64@npm:0.21.5" + conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-validator-option@npm:7.18.6" - checksum: 10/f9cc6eb7cc5d759c5abf006402180f8d5e4251e9198197428a97e05d65eb2f8ae5a0ce73b1dfd2d35af41d0eb780627a64edf98a4e71f064eeeacef8de58f2cf +"@esbuild/linux-riscv64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-riscv64@npm:0.21.5" + conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-validator-option@npm:7.22.15" - checksum: 10/68da52b1e10002a543161494c4bc0f4d0398c8fdf361d5f7f4272e95c45d5b32d974896d44f6a0ea7378c9204988879d73613ca683e13bd1304e46d25ff67a8d +"@esbuild/linux-s390x@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-s390x@npm:0.21.5" + conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-validator-option@npm:7.22.5" - checksum: 10/bbeca8a85ee86990215c0424997438b388b8d642d69b9f86c375a174d3cdeb270efafd1ff128bc7a1d370923d13b6e45829ba8581c027620e83e3a80c5c414b3 +"@esbuild/linux-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-x64@npm:0.21.5" + conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.23.5": - version: 7.23.5 - resolution: "@babel/helper-validator-option@npm:7.23.5" - checksum: 10/537cde2330a8aede223552510e8a13e9c1c8798afee3757995a7d4acae564124fe2bf7e7c3d90d62d3657434a74340a274b3b3b1c6f17e9a2be1f48af29cb09e +"@esbuild/netbsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/netbsd-x64@npm:0.21.5" + conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-validator-option@npm:7.24.8" - checksum: 10/a52442dfa74be6719c0608fee3225bd0493c4057459f3014681ea1a4643cd38b68ff477fe867c4b356da7330d085f247f0724d300582fa4ab9a02efaf34d107c +"@esbuild/openbsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/openbsd-x64@npm:0.21.5" + conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@babel/helper-wrap-function@npm:^7.22.17": - version: 7.22.17 - resolution: "@babel/helper-wrap-function@npm:7.22.17" - dependencies: - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/template": "npm:^7.22.15" - "@babel/types": "npm:^7.22.17" - checksum: 10/6057749399199e12421c6bb1fa1ed0b669b9848aac213dd25d1d3bb7fe54569b71ca3ffc54220fe87dd1c9cc7137b78627f5ae79807d10779dbf1aa70310b2b2 +"@esbuild/sunos-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/sunos-x64@npm:0.21.5" + conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@babel/helper-wrap-function@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-wrap-function@npm:7.22.20" - dependencies: - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/template": "npm:^7.22.15" - "@babel/types": "npm:^7.22.19" - checksum: 10/b22e4666dec3d401bdf8ebd01d448bb3733617dae5aa6fbd1b684a22a35653cca832edd876529fd139577713b44fb89b4f5e52b7315ab218620f78b8a8ae23de +"@esbuild/win32-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-arm64@npm:0.21.5" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@babel/helper-wrap-function@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-wrap-function@npm:7.22.5" - dependencies: - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - checksum: 10/70f225615aad1756ea44f1121ec78633200fa00b82e46aa7e5211b7c36f7984d57cc2a2aea8852eaacd5044b1d1cbd2b20d0c371e42096aec19733cb95001096 +"@esbuild/win32-ia32@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-ia32@npm:0.21.5" + conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@babel/helper-wrap-function@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-wrap-function@npm:7.24.7" - dependencies: - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/template": "npm:^7.24.7" - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/1c248accfbb09a891293840506e3fbfc807b524abf16fc32115a6e73f760387d2dc7935282b48caa281c8033bf93dc80eca7649250524cfb95da8643771bca02 +"@esbuild/win32-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-x64@npm:0.21.5" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@babel/helpers@npm:^7.17.2": - version: 7.17.2 - resolution: "@babel/helpers@npm:7.17.2" +"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": + version: 4.4.0 + resolution: "@eslint-community/eslint-utils@npm:4.4.0" dependencies: - "@babel/template": "npm:^7.16.7" - "@babel/traverse": "npm:^7.17.0" - "@babel/types": "npm:^7.17.0" - checksum: 10/02c8b0b5f1e37bd4e1fc2505ab7925ebdf3a86e31e6e56f7dc34dee5ed7cd559d42c07b7776ccfcd80412f14b596e2e70b1edc211d8b0e6e59125db0af320201 + eslint-visitor-keys: "npm:^3.3.0" + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + checksum: 10/8d70bcdcd8cd279049183aca747d6c2ed7092a5cf0cf5916faac1ef37ffa74f0c245c2a3a3d3b9979d9dfdd4ca59257b4c5621db699d637b847a2c5e02f491c2 languageName: node linkType: hard -"@babel/helpers@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helpers@npm:7.18.9" - dependencies: - "@babel/template": "npm:^7.18.6" - "@babel/traverse": "npm:^7.18.9" - "@babel/types": "npm:^7.18.9" - checksum: 10/8949183b2e8d73c923fe38041e1e37815529e5a4fc2bbccf5917d86bc1b286bc8bf140b0576b2994cd6db16757d871801554a1fd6cd698f091fe133b1a430d5f +"@eslint-community/regexpp@npm:^4.5.1": + version: 4.6.2 + resolution: "@eslint-community/regexpp@npm:4.6.2" + checksum: 10/59ea2fa13a70996a8cebbd5a9f4499c92bceeff872286ef2fb34948fcfb9d3467692371d9cc116e7d613f2c18086a1c8337c9d461ccdf213f0dc47f6f6d2fbb6 languageName: node linkType: hard -"@babel/helpers@npm:^7.22.11": - version: 7.22.11 - resolution: "@babel/helpers@npm:7.22.11" - dependencies: - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.11" - "@babel/types": "npm:^7.22.11" - checksum: 10/5af97344f666418150354cf28a7946ba772bac604add51f1e9547d4e4d5301466cd3bbd37bb0e099884807587523da6f8b19e53bc3d40a7f1e8340711a0d5452 +"@eslint-community/regexpp@npm:^4.6.1": + version: 4.9.1 + resolution: "@eslint-community/regexpp@npm:4.9.1" + checksum: 10/8f1ba51fa5dedd93f01623382d006c838a436aaea85561c7e540b15600988350843bf746a60e2aaefa79ee4904c9dc0a2f3f00e025b162112c76520ffb34805d languageName: node linkType: hard -"@babel/helpers@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/helpers@npm:7.22.15" +"@eslint/eslintrc@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/eslintrc@npm:2.1.4" dependencies: - "@babel/template": "npm:^7.22.15" - "@babel/traverse": "npm:^7.22.15" - "@babel/types": "npm:^7.22.15" - checksum: 10/ed7344bee94a4c8712b5fe69d2f8fd6e921283ae13028bf8dbce7c14ee687d732d7f091e7f24b238035034d1fdff6254340c89dcc7368e15af1d92df7554dc2e + ajv: "npm:^6.12.4" + debug: "npm:^4.3.2" + espree: "npm:^9.6.0" + globals: "npm:^13.19.0" + ignore: "npm:^5.2.0" + import-fresh: "npm:^3.2.1" + js-yaml: "npm:^4.1.0" + minimatch: "npm:^3.1.2" + strip-json-comments: "npm:^3.1.1" + checksum: 10/7a3b14f4b40fc1a22624c3f84d9f467a3d9ea1ca6e9a372116cb92507e485260359465b58e25bcb6c9981b155416b98c9973ad9b796053fd7b3f776a6946bce8 languageName: node linkType: hard -"@babel/helpers@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/helpers@npm:7.22.6" - dependencies: - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.6" - "@babel/types": "npm:^7.22.5" - checksum: 10/c7c5876476321c979f2c15086e526e3424121829a3abd52a79a5a886008b251e1fcb5ea6e498eca3204e5f1d2455804bf9eb87b7478a535449805acc9dbce190 +"@eslint/js@npm:8.57.0": + version: 8.57.0 + resolution: "@eslint/js@npm:8.57.0" + checksum: 10/3c501ce8a997cf6cbbaf4ed358af5492875e3550c19b9621413b82caa9ae5382c584b0efa79835639e6e0ddaa568caf3499318e5bdab68643ef4199dce5eb0a0 languageName: node linkType: hard -"@babel/helpers@npm:^7.23.2": - version: 7.23.2 - resolution: "@babel/helpers@npm:7.23.2" - dependencies: - "@babel/template": "npm:^7.22.15" - "@babel/traverse": "npm:^7.23.2" - "@babel/types": "npm:^7.23.0" - checksum: 10/d66d949d41513f19e62e43a9426e283d46bc9a3c72f1e3dd136568542382edd411047403458aaa0ae3adf7c14d23e0e9a1126092bb56e72ba796a6dd7e4c082a +"@ethereumjs/rlp@npm:^4.0.1": + version: 4.0.1 + resolution: "@ethereumjs/rlp@npm:4.0.1" + bin: + rlp: bin/rlp + checksum: 10/bfdffd634ce72f3b17e3d085d071f2fe7ce9680aebdf10713d74b30afd80ef882d17f19ff7175fcb049431a56e800bd3558d3b028bd0d82341927edb303ab450 languageName: node linkType: hard -"@babel/helpers@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/helpers@npm:7.23.9" +"@ethersproject/abi@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/abi@npm:5.7.0" dependencies: - "@babel/template": "npm:^7.23.9" - "@babel/traverse": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" - checksum: 10/dd56daac8bbd7ed174bb00fd185926fd449e591d9a00edaceb7ac6edbdd7a8db57e2cb365b4fafda382201752789ced2f7ae010f667eab0f198a4571cda4d2c5 + "@ethersproject/address": "npm:^5.7.0" + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/constants": "npm:^5.7.0" + "@ethersproject/hash": "npm:^5.7.0" + "@ethersproject/keccak256": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + "@ethersproject/strings": "npm:^5.7.0" + checksum: 10/6ed002cbc61a7e21bc0182702345659c1984f6f8e6bad166e43aee76ea8f74766dd0f6236574a868e1b4600af27972bf25b973fae7877ae8da3afa90d3965cac languageName: node linkType: hard -"@babel/helpers@npm:^7.24.0": - version: 7.24.8 - resolution: "@babel/helpers@npm:7.24.8" +"@ethersproject/abstract-provider@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/abstract-provider@npm:5.7.0" dependencies: - "@babel/template": "npm:^7.24.7" - "@babel/types": "npm:^7.24.8" - checksum: 10/61c08a2baa87382a87c7110e9b5574c782603e247b7e6267769ee0e8b7b54b70ff05f16466f05bb318622b7ac28e79b449edff565abf5adcb1adb1b0f42fee9c + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/networks": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + "@ethersproject/transactions": "npm:^5.7.0" + "@ethersproject/web": "npm:^5.7.0" + checksum: 10/c03e413a812486002525f4036bf2cb90e77a19b98fa3d16279e28e0a05520a1085690fac2ee9f94b7931b9a803249ff8a8bbb26ff8dee52196a6ef7a3fc5edc5 languageName: node linkType: hard -"@babel/highlight@npm:7.0.0-beta.51": - version: 7.0.0-beta.51 - resolution: "@babel/highlight@npm:7.0.0-beta.51" +"@ethersproject/abstract-signer@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/abstract-signer@npm:5.7.0" dependencies: - chalk: "npm:^2.0.0" - esutils: "npm:^2.0.2" - js-tokens: "npm:^3.0.0" - checksum: 10/09b37b6b71a40d5de09ef592b5e68a1ad1e68069559fd34c4fe933525fa9809429e86b9deb486922523d3e03301bd3c46c11a88d6055c31c60779934640ef861 + "@ethersproject/abstract-provider": "npm:^5.7.0" + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + checksum: 10/0a6ffade0a947c9ba617048334e1346838f394d1d0a5307ac435a0c63ed1033b247e25ffb0cd6880d7dcf5459581f52f67e3804ebba42ff462050f1e4321ba0c languageName: node linkType: hard -"@babel/highlight@npm:^7.16.7": - version: 7.16.10 - resolution: "@babel/highlight@npm:7.16.10" +"@ethersproject/address@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/address@npm:5.7.0" dependencies: - "@babel/helper-validator-identifier": "npm:^7.16.7" - chalk: "npm:^2.0.0" - js-tokens: "npm:^4.0.0" - checksum: 10/1f1bdd752a90844f4efc22166a46303fb651ba0fd75a06daba3ebae2575ab3edc1da9827c279872a3aaf305f50a18473c5fa1966752726a2b253065fd4c0745e + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/keccak256": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/rlp": "npm:^5.7.0" + checksum: 10/1ac4f3693622ed9fbbd7e966a941ec1eba0d9445e6e8154b1daf8e93b8f62ad91853d1de5facf4c27b41e6f1e47b94a317a2492ba595bee1841fd3030c3e9a27 languageName: node linkType: hard -"@babel/highlight@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/highlight@npm:7.18.6" +"@ethersproject/base64@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/base64@npm:5.7.0" dependencies: - "@babel/helper-validator-identifier": "npm:^7.18.6" - chalk: "npm:^2.0.0" - js-tokens: "npm:^4.0.0" - checksum: 10/92d8ee61549de5ff5120e945e774728e5ccd57fd3b2ed6eace020ec744823d4a98e242be1453d21764a30a14769ecd62170fba28539b211799bbaf232bbb2789 + "@ethersproject/bytes": "npm:^5.7.0" + checksum: 10/7105105f401e1c681e61db1e9da1b5960d8c5fbd262bbcacc99d61dbb9674a9db1181bb31903d98609f10e8a0eb64c850475f3b040d67dea953e2b0ac6380e96 languageName: node linkType: hard -"@babel/highlight@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/highlight@npm:7.22.10" +"@ethersproject/bignumber@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/bignumber@npm:5.7.0" dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.5" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - checksum: 10/faea6aa09ea7bc02d4d51aabdd1303b00aa2587933a08310d7502f29140bc8bcb32a74387d81dc08e97edd04f891e266623b90043ea4502e052dcbfd7e423a3c + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + bn.js: "npm:^5.2.1" + checksum: 10/09cffa18a9f0730856b57c14c345bd68ba451159417e5aff684a8808011cd03b27b7c465d423370333a7d1c9a621392fc74f064a3b02c9edc49ebe497da6d45d languageName: node linkType: hard -"@babel/highlight@npm:^7.22.13": - version: 7.22.13 - resolution: "@babel/highlight@npm:7.22.13" +"@ethersproject/bytes@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/bytes@npm:5.7.0" dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.5" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - checksum: 10/cb6053267f6485c7e315bad437829d8e9e6df5d29d02c23318199f45b4ac8bf256ed41d70445314041e51fad446a511017b8e6a140993cd2edd748c39bf8d351 + "@ethersproject/logger": "npm:^5.7.0" + checksum: 10/8b3ffedb68c1a82cfb875e9738361409cc33e2dcb1286b6ccfdc4dd8dd0317f7eacc8937b736c467d213dffc44b469690fe1a951e901953d5a90c5af2b675ae4 languageName: node linkType: hard -"@babel/highlight@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/highlight@npm:7.22.5" +"@ethersproject/constants@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/constants@npm:5.7.0" dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.5" - chalk: "npm:^2.0.0" - js-tokens: "npm:^4.0.0" - checksum: 10/ff59305c0184648c9cb042638e9d2d184c12df2a112c71359268a982e7ab65cd5236f392ee8eb722a3bf5b5bd155954fdc7b5aacb6b2b1cd5e38dafcbe63cc57 + "@ethersproject/bignumber": "npm:^5.7.0" + checksum: 10/6d4b1355747cce837b3e76ec3bde70e4732736f23b04f196f706ebfa5d4d9c2be50904a390d4d40ce77803b98d03d16a9b6898418e04ba63491933ce08c4ba8a languageName: node linkType: hard -"@babel/highlight@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/highlight@npm:7.23.4" +"@ethersproject/hash@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/hash@npm:5.7.0" dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.20" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - checksum: 10/62fef9b5bcea7131df4626d009029b1ae85332042f4648a4ce6e740c3fd23112603c740c45575caec62f260c96b11054d3be5987f4981a5479793579c3aac71f + "@ethersproject/abstract-signer": "npm:^5.7.0" + "@ethersproject/address": "npm:^5.7.0" + "@ethersproject/base64": "npm:^5.7.0" + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/keccak256": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + "@ethersproject/strings": "npm:^5.7.0" + checksum: 10/d83de3f3a1b99b404a2e7bb503f5cdd90c66a97a32cce1d36b09bb8e3fb7205b96e30ad28e2b9f30083beea6269b157d0c6e3425052bb17c0a35fddfdd1c72a3 languageName: node linkType: hard -"@babel/highlight@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/highlight@npm:7.24.7" +"@ethersproject/keccak256@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/keccak256@npm:5.7.0" dependencies: - "@babel/helper-validator-identifier": "npm:^7.24.7" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10/69b73f38cdd4f881b09b939a711e76646da34f4834f4ce141d7a49a6bb1926eab1c594148970a8aa9360398dff800f63aade4e81fafdd7c8d8a8489ea93bfec1 - languageName: node - linkType: hard - -"@babel/parser@npm:7.0.0-beta.51": - version: 7.0.0-beta.51 - resolution: "@babel/parser@npm:7.0.0-beta.51" - bin: - parser: ./bin/babel-parser.js - checksum: 10/b3e96b86c86e7380c8bbc6b1eebb4eed217cd60d8e215257065dffc02a9ce7988a668044422279b35ea23f744e872f181a2fd45ed9f188fed0315b61c69afb07 - languageName: node - linkType: hard - -"@babel/parser@npm:7.18.4": - version: 7.18.4 - resolution: "@babel/parser@npm:7.18.4" - bin: - parser: ./bin/babel-parser.js - checksum: 10/7aca0241b2ee45ac1aafd39b58af6f1d57e2fdefd98ffd5f3834cb1f1fc0577315e21931fe9356810b2c0613fd3af6ed94a2774ecf79c5da14315bc5a319b216 - languageName: node - linkType: hard - -"@babel/parser@npm:7.24.7, @babel/parser@npm:^7.21.8": - version: 7.24.7 - resolution: "@babel/parser@npm:7.24.7" - bin: - parser: ./bin/babel-parser.js - checksum: 10/ef9ebce60e13db560ccc7af9235d460f6726bb7e23ae2d675098c1fc43d5249067be60d4118889dad33b1d4f85162cf66baf554719e1669f29bb20e71322568e - languageName: node - linkType: hard - -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.16.7, @babel/parser@npm:^7.17.3": - version: 7.17.3 - resolution: "@babel/parser@npm:7.17.3" - bin: - parser: ./bin/babel-parser.js - checksum: 10/2d45750cdf0565842a1210928534f73dacfbfd3c45be6e85961e34e8c7d74643721f802d331fad3bfdcc783fb5ab8703432e43c9e7b460588ec6ee26242793be - languageName: node - linkType: hard - -"@babel/parser@npm:^7.18.6, @babel/parser@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/parser@npm:7.18.9" - bin: - parser: ./bin/babel-parser.js - checksum: 10/5f1c4151e264207dfaed09daa23eaa41920a2a2e1423ca7f4f34adcc9008e220a229e1640889f03f882e6c85f1b12daed965a0a11ab6ff726cbba97871142bec - languageName: node - linkType: hard - -"@babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.11, @babel/parser@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/parser@npm:7.23.0" - bin: - parser: ./bin/babel-parser.js - checksum: 10/201641e068f8cca1ff12b141fcba32d7ccbabc586961bd1b85ae89d9695867f84d57fc2e1176dc4981fd28e5e97ca0e7c32cd688bd5eabb641a302abc0cb5040 + "@ethersproject/bytes": "npm:^5.7.0" + js-sha3: "npm:0.8.0" + checksum: 10/ff70950d82203aab29ccda2553422cbac2e7a0c15c986bd20a69b13606ed8bb6e4fdd7b67b8d3b27d4f841e8222cbaccd33ed34be29f866fec7308f96ed244c6 languageName: node linkType: hard -"@babel/parser@npm:^7.22.15, @babel/parser@npm:^7.22.5": - version: 7.22.16 - resolution: "@babel/parser@npm:7.22.16" - bin: - parser: ./bin/babel-parser.js - checksum: 10/220df7dc0dbe8bc73540e66123f9c45ae3e5db40738fc1e97579205364240bed3e9724fc737c0828f9d46c96ce9b23728314f598e5bf8a62566ccef539d15bdf +"@ethersproject/logger@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/logger@npm:5.7.0" + checksum: 10/683a939f467ae7510deedc23d7611d0932c3046137f5ffb92ba1e3c8cd9cf2fbbaa676b660c248441a0fa9143783137c46d6e6d17d676188dd5a6ef0b72dd091 languageName: node linkType: hard -"@babel/parser@npm:^7.22.7": - version: 7.22.7 - resolution: "@babel/parser@npm:7.22.7" - bin: - parser: ./bin/babel-parser.js - checksum: 10/f420f89ea8e5803a44f76a57630002ca5721fbde719c10ac4eaebf1d01fad102447cd90a7721c97b1176bde33ec9bc2b68fe8c7d541668dc6610727ba79c8862 +"@ethersproject/networks@npm:^5.7.0": + version: 5.7.1 + resolution: "@ethersproject/networks@npm:5.7.1" + dependencies: + "@ethersproject/logger": "npm:^5.7.0" + checksum: 10/5265d0b4b72ef91af57be804b44507f4943038d609699764d8a69157ed381e30fe22ebf63630ed8e530ceb220f15d69dae8cda2e5023ccd793285c9d5882e599 languageName: node linkType: hard -"@babel/parser@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/parser@npm:7.23.9" - bin: - parser: ./bin/babel-parser.js - checksum: 10/727a7a807100f6a26df859e2f009c4ddbd0d3363287b45daa50bd082ccd0d431d0c4d0e610a91f806e04a1918726cd0f5a0592c9b902a815337feed12e1cafd9 +"@ethersproject/properties@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/properties@npm:5.7.0" + dependencies: + "@ethersproject/logger": "npm:^5.7.0" + checksum: 10/f8401a161940aa1c32695115a20c65357877002a6f7dc13ab1600064bf54d7b825b4db49de8dc8da69efcbb0c9f34f8813e1540427e63e262ab841c1bf6c1c1e languageName: node linkType: hard -"@babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.7": - version: 7.24.8 - resolution: "@babel/parser@npm:7.24.8" - bin: - parser: ./bin/babel-parser.js - checksum: 10/e44b8327da46e8659bc9fb77f66e2dc4364dd66495fb17d046b96a77bf604f0446f1e9a89cf2f011d78fc3f5cdfbae2e9e0714708e1c985988335683b2e781ef +"@ethersproject/rlp@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/rlp@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + checksum: 10/3b8c5279f7654794d5874569f5598ae6a880e19e6616013a31e26c35c5f586851593a6e85c05ed7b391fbc74a1ea8612dd4d867daefe701bf4e8fcf2ab2f29b9 languageName: node linkType: hard -"@babel/parser@npm:^7.4.3": - version: 7.22.10 - resolution: "@babel/parser@npm:7.22.10" - bin: - parser: ./bin/babel-parser.js - checksum: 10/a11e93c9b371bdd9c44bc96fd37e63eca8450fd11c19f9a8b1d7e2582835a3db970d8202a21736d04c653c8d1facde7b66c15c15bbf095047b7ca98e057a5eb9 +"@ethersproject/signing-key@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/signing-key@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + bn.js: "npm:^5.2.1" + elliptic: "npm:6.5.4" + hash.js: "npm:1.1.7" + checksum: 10/ff2f79ded86232b139e7538e4aaa294c6022a7aaa8c95a6379dd7b7c10a6d363685c6967c816f98f609581cf01f0a5943c667af89a154a00bcfe093a8c7f3ce7 languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.22.15" +"@ethersproject/strings@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/strings@npm:5.7.0" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/8910ca21a7ec7c06f7b247d4b86c97c5aa15ef321518f44f6f490c5912fdf82c605aaa02b90892e375d82ccbedeadfdeadd922c1b836c9dd4c596871bf654753 + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/constants": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + checksum: 10/24191bf30e98d434a9fba2f522784f65162d6712bc3e1ccc98ed85c5da5884cfdb5a1376b7695374655a7b95ec1f5fdbeef5afc7d0ea77ffeb78047e9b791fa5 languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.24.7" +"@ethersproject/transactions@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/transactions@npm:5.7.0" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/f0e0e9bdcf5479f8c5b4494353dc64dee37205e5ffd30920e649e75537a8f795cdcf32dfb40a00e908469a5d61cf62806bc359294cb2a6f2e604bf4efe086301 + "@ethersproject/address": "npm:^5.7.0" + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/constants": "npm:^5.7.0" + "@ethersproject/keccak256": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + "@ethersproject/rlp": "npm:^5.7.0" + "@ethersproject/signing-key": "npm:^5.7.0" + checksum: 10/d809e9d40020004b7de9e34bf39c50377dce8ed417cdf001bfabc81ecb1b7d1e0c808fdca0a339ea05e1b380648eaf336fe70f137904df2d3c3135a38190a5af languageName: node linkType: hard -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.22.15" +"@ethersproject/web@npm:^5.7.0": + version: 5.7.1 + resolution: "@ethersproject/web@npm:5.7.1" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-transform-optional-chaining": "npm:^7.22.15" - peerDependencies: - "@babel/core": ^7.13.0 - checksum: 10/fbefedc0da014c37f1a50a8094ce7dbbf2181ae93243f23d6ecba2499b5b20196c2124d6a4dfe3e9e0125798e80593103e456352a4beb4e5c6f7c75efb80fdac + "@ethersproject/base64": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + "@ethersproject/strings": "npm:^5.7.0" + checksum: 10/c83b6b3ac40573ddb67b1750bb4cf21ded7d8555be5e53a97c0f34964622fd88de9220a90a118434bae164a2bff3acbdc5ecb990517b5f6dc32bdad7adf604c2 languageName: node linkType: hard -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.24.7" +"@grpc/grpc-js@npm:1.11.3": + version: 1.11.3 + resolution: "@grpc/grpc-js@npm:1.11.3" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/plugin-transform-optional-chaining": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.13.0 - checksum: 10/887f1b8bd0ef61206ece47919fda78a32eef35da31c0d95ab8d7adc8b4722534dc5177c86c8d6d81bcf4343f3c08c6adab2b46cfd2bea8e33c6c04e51306f9cc + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/b4662cd357296ff279e6f4ff4039fb5379d1087f9f7758102eae85a0d093cd8ec4054f27a62e27862efe67d8b25ad7b6733dcb0ffb0ecbc2bd9e3dcb9450d978 languageName: node linkType: hard -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.7": - version: 7.24.7 - resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.24.7" +"@grpc/proto-loader@npm:0.7.13, @grpc/proto-loader@npm:^0.7.13": + version: 0.7.13 + resolution: "@grpc/proto-loader@npm:0.7.13" dependencies: - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/ad63317eb72ca7e160394e9223768b1f826287eaf65297f2794d0203510225f20dd9858bce217af4a050754abf94565841617b45b35a2de355c4e2bba546b39c + lodash.camelcase: "npm:^4.3.0" + long: "npm:^5.0.0" + protobufjs: "npm:^7.2.5" + yargs: "npm:^17.7.2" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/7e2d842c2061cbaf6450c71da0077263be3bab165454d5c8a3e1ae4d3c6d2915f02fd27da63ff01f05e127b1221acd40705273f5d29303901e60514e852992f4 languageName: node linkType: hard -"@babel/plugin-proposal-async-generator-functions@npm:7.20.7": - version: 7.20.7 - resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.20.7" +"@humanwhocodes/config-array@npm:^0.11.14": + version: 0.11.14 + resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: - "@babel/helper-environment-visitor": "npm:^7.18.9" - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/helper-remap-async-to-generator": "npm:^7.18.9" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/111109ee118c9e69982f08d5e119eab04190b36a0f40e22e873802d941956eee66d2aa5a15f5321e51e3f9aa70a91136451b987fe15185ef8cc547ac88937723 + "@humanwhocodes/object-schema": "npm:^2.0.2" + debug: "npm:^4.3.1" + minimatch: "npm:^3.0.5" + checksum: 10/3ffb24ecdfab64014a230e127118d50a1a04d11080cbb748bc21629393d100850496456bbcb4e8c438957fe0934430d731042f1264d6a167b62d32fc2863580a languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.16.0": - version: 7.18.6 - resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/49a78a2773ec0db56e915d9797e44fd079ab8a9b2e1716e0df07c92532f2c65d76aeda9543883916b8e0ff13606afeffa67c5b93d05b607bc87653ad18a91422 +"@humanwhocodes/module-importer@npm:^1.0.1": + version: 1.0.1 + resolution: "@humanwhocodes/module-importer@npm:1.0.1" + checksum: 10/e993950e346331e5a32eefb27948ecdee2a2c4ab3f072b8f566cd213ef485dd50a3ca497050608db91006f5479e43f91a439aef68d2a313bd3ded06909c7c5b3 languageName: node linkType: hard -"@babel/plugin-proposal-decorators@npm:^7.16.4": - version: 7.23.2 - resolution: "@babel/plugin-proposal-decorators@npm:7.23.2" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.20" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/plugin-syntax-decorators": "npm:^7.22.10" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/392440bad262e54246ee22da4c50774cd72cda4b62818a94b99e13cbb6e06f074a8858d0253909990fa680d94e434ff194383bfe5481c82a866408b091cb9307 +"@humanwhocodes/object-schema@npm:^2.0.2": + version: 2.0.2 + resolution: "@humanwhocodes/object-schema@npm:2.0.2" + checksum: 10/ef915e3e2f34652f3d383b28a9a99cfea476fa991482370889ab14aac8ecd2b38d47cc21932526c6d949da0daf4a4a6bf629d30f41b0caca25e146819cbfa70e languageName: node linkType: hard -"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.16.0": - version: 7.18.6 - resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/949c9ddcdecdaec766ee610ef98f965f928ccc0361dd87cf9f88cf4896a6ccd62fce063d4494778e50da99dea63d270a1be574a62d6ab81cbe9d85884bf55a7d +"@hutson/parse-repository-url@npm:^5.0.0": + version: 5.0.0 + resolution: "@hutson/parse-repository-url@npm:5.0.0" + checksum: 10/040bc80dd1be5b12718af8a1d2fc58bbf793d41040ad4cedfe864079fddb542f106aee998beb7e42b7ebf882237e45b559bdf1ed3f6a607a403e51d849f37118 languageName: node linkType: hard -"@babel/plugin-proposal-numeric-separator@npm:^7.16.0": - version: 7.18.6 - resolution: "@babel/plugin-proposal-numeric-separator@npm:7.18.6" +"@hyperledger/cactus-common@npm:2.0.0": + version: 2.0.0 + resolution: "@hyperledger/cactus-common@npm:2.0.0" dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.6" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/f370ea584c55bf4040e1f78c80b4eeb1ce2e6aaa74f87d1a48266493c33931d0b6222d8cee3a082383d6bb648ab8d6b7147a06f974d3296ef3bc39c7851683ec + fast-safe-stringify: "npm:2.1.1" + json-stable-stringify: "npm:1.0.1" + key-encoder: "npm:2.0.3" + loglevel: "npm:1.7.1" + loglevel-plugin-prefix: "npm:0.8.4" + run-time-error-cjs: "npm:1.4.0" + sanitize-html: "npm:2.12.1" + secp256k1: "npm:4.0.3" + sha3: "npm:2.1.4" + checksum: 10/8911016a7918b571eb7e4f1342bcb430f0f74dcdde08785407947588fef8c220589c566fc38dc343d3a30a22361fbd92c89acabcae626c6a67e8ae5de2fcfbde languageName: node linkType: hard -"@babel/plugin-proposal-object-rest-spread@npm:^7.5.5": - version: 7.17.3 - resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.17.3" - dependencies: - "@babel/compat-data": "npm:^7.17.0" - "@babel/helper-compilation-targets": "npm:^7.16.7" - "@babel/helper-plugin-utils": "npm:^7.16.7" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6fdb79f8ac80098a96e8570ca4302d3759e28be536f4763df87a81e3f0d8e5fc573a351f2cfbbd80893156c7644cd7f14928907eefe7b3d6f1d298e329991c63 - languageName: node - linkType: hard - -"@babel/plugin-proposal-optional-chaining@npm:^7.16.0": - version: 7.21.0 - resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.20.0" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/522cd133aff5c94c0ef36ff83c64f03deee183815da68b65b6950e81972ace3b514e032df07ea76d0f9ec8cc7a49578092907adfa17fccb4612117557c04a882 - languageName: node - linkType: hard - -"@babel/plugin-proposal-private-methods@npm:^7.16.0": - version: 7.18.6 - resolution: "@babel/plugin-proposal-private-methods@npm:7.18.6" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/22d8502ee96bca99ad2c8393e8493e2b8d4507576dd054490fd8201a36824373440106f5b098b6d821b026c7e72b0424ff4aeca69ed5f42e48f029d3a156d5ad - languageName: node - linkType: hard - -"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": - version: 7.21.0-placeholder-for-preset-env.2 - resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fab70f399aa869275690ec6c7cedb4ef361d4e8b6f55c3d7b04bfee61d52fb93c87cec2c65d73cddbaca89fb8ef5ec0921fce675c9169d9d51f18305ab34e78a - languageName: node - linkType: hard - -"@babel/plugin-proposal-private-property-in-object@npm:^7.16.7": - version: 7.21.11 - resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.11" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.18.6" - "@babel/helper-create-class-features-plugin": "npm:^7.21.0" - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/f803b5e1de0cb7c53f0d7f70bfbf57f2b3a20d95c19f8f2710719c4938149b490ee14d2d0c2f8316080823f0943c6cb8668fa8c139420e7bc7f80a66bfd50fff - languageName: node - linkType: hard - -"@babel/plugin-proposal-unicode-property-regex@npm:^7.4.4": - version: 7.16.7 - resolution: "@babel/plugin-proposal-unicode-property-regex@npm:7.16.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.16.7" - "@babel/helper-plugin-utils": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2b8a33713d456183f0b7d011011e7bd932c08cc06216399a7b2015ab39284b511993dc10a89bbb15d1d728e6a2ef42ca08c3202619aa148cbd48052422ea3995 - languageName: node - linkType: hard - -"@babel/plugin-syntax-async-generators@npm:^7.8.4": - version: 7.8.4 - resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/7ed1c1d9b9e5b64ef028ea5e755c0be2d4e5e4e3d6cf7df757b9a8c4cfa4193d268176d0f1f7fbecdda6fe722885c7fda681f480f3741d8a2d26854736f05367 - languageName: node - linkType: hard - -"@babel/plugin-syntax-bigint@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3a10849d83e47aec50f367a9e56a6b22d662ddce643334b087f9828f4c3dd73bdc5909aaeabe123fed78515767f9ca43498a0e621c438d1cd2802d7fae3c9648 - languageName: node - linkType: hard - -"@babel/plugin-syntax-class-properties@npm:^7.12.13, @babel/plugin-syntax-class-properties@npm:^7.8.3": - version: 7.12.13 - resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.12.13" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/24f34b196d6342f28d4bad303612d7ff566ab0a013ce89e775d98d6f832969462e7235f3e7eaf17678a533d4be0ba45d3ae34ab4e5a9dcbda5d98d49e5efa2fc - languageName: node - linkType: hard - -"@babel/plugin-syntax-class-static-block@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-class-static-block@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3e80814b5b6d4fe17826093918680a351c2d34398a914ce6e55d8083d72a9bdde4fbaf6a2dcea0e23a03de26dc2917ae3efd603d27099e2b98380345703bf948 - languageName: node - linkType: hard - -"@babel/plugin-syntax-decorators@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/plugin-syntax-decorators@npm:7.22.10" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/983caa82f5a9cbb55196cd9ff3a6e2cf11e6eba5c11fc5fecb4ef7229ca05af08a5eeab0c668e5cd9fae62c01b038ec1906ced09fd7cb6dde94f0b8824e231c6 - languageName: node - linkType: hard - -"@babel/plugin-syntax-dynamic-import@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-dynamic-import@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ce307af83cf433d4ec42932329fad25fa73138ab39c7436882ea28742e1c0066626d224e0ad2988724c82644e41601cef607b36194f695cb78a1fcdc959637bd - languageName: node - linkType: hard - -"@babel/plugin-syntax-export-namespace-from@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-export-namespace-from@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/85740478be5b0de185228e7814451d74ab8ce0a26fcca7613955262a26e99e8e15e9da58f60c754b84515d4c679b590dbd3f2148f0f58025f4ae706f1c5a5d4a - languageName: node - linkType: hard - -"@babel/plugin-syntax-flow@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-flow@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/84c8c40fcfe8e78cecdd6fb90e8f97f419e3f3b27a33de8324ae97d5ce1b87cdd98a636fa21a68d4d2c37c7d63f3a279bb84b6956b849921affed6b806b6ffe7 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-assertions@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2b8b5572db04a7bef1e6cd20debf447e4eef7cb012616f5eceb8fa3e23ce469b8f76ee74fd6d1e158ba17a8f58b0aec579d092fb67c5a30e83ccfbc5754916c1 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-assertions@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bd065cd73ae3dbe69e6f9167aa605da3df77d69bbad2ede95e4aa9e7af7744d5bc1838b928c77338ca62df7691a7adf6e608279be50c18e4b3c70cf77e3013d7 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-attributes@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/197b3c5ea2a9649347f033342cb222ab47f4645633695205c0250c6bf2af29e643753b8bb24a2db39948bef08e7c540babfd365591eb57fc110cb30b425ffc47 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-attributes@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/22fc50bd85a491bb8d22065f330a41f60d66f2f2d7a1deb73e80c8a4b5d7a42a092a03f8da18800650eca0fc14585167cc4e5c9fab351f0d390d1592347162ae - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-meta@npm:^7.10.4, @babel/plugin-syntax-import-meta@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/166ac1125d10b9c0c430e4156249a13858c0366d38844883d75d27389621ebe651115cb2ceb6dc011534d5055719fa1727b59f39e1ab3ca97820eef3dcab5b9b - languageName: node - linkType: hard - -"@babel/plugin-syntax-json-strings@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bf5aea1f3188c9a507e16efe030efb996853ca3cadd6512c51db7233cc58f3ac89ff8c6bdfb01d30843b161cfe7d321e1bf28da82f7ab8d7e6bc5464666f354a - languageName: node - linkType: hard - -"@babel/plugin-syntax-jsx@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/plugin-syntax-jsx@npm:7.16.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/cd9b0e53c50e8ddb0afaf0f42e0b221a94e4f59aee32a591364266a31195c48cac5fef288d02c1c935686bda982d2e0f1ed61cceb995fc9f6fb09ef5ebecdd2b - languageName: node - linkType: hard - -"@babel/plugin-syntax-jsx@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-jsx@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/8829d30c2617ab31393d99cec2978e41f014f4ac6f01a1cecf4c4dd8320c3ec12fdc3ce121126b2d8d32f6887e99ca1a0bad53dedb1e6ad165640b92b24980ce - languageName: node - linkType: hard - -"@babel/plugin-syntax-jsx@npm:^7.7.2": - version: 7.21.4 - resolution: "@babel/plugin-syntax-jsx@npm:7.21.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.20.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bb7309402a1d4e155f32aa0cf216e1fa8324d6c4cfd248b03280028a015a10e46b6efd6565f515f8913918a3602b39255999c06046f7d4b8a5106be2165d724a - languageName: node - linkType: hard - -"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4, @babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/aff33577037e34e515911255cdbb1fd39efee33658aa00b8a5fd3a4b903585112d037cce1cc9e4632f0487dc554486106b79ccd5ea63a2e00df4363f6d4ff886 - languageName: node - linkType: hard - -"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/87aca4918916020d1fedba54c0e232de408df2644a425d153be368313fdde40d96088feed6c4e5ab72aac89be5d07fef2ddf329a15109c5eb65df006bf2580d1 - languageName: node - linkType: hard - -"@babel/plugin-syntax-numeric-separator@npm:^7.10.4, @babel/plugin-syntax-numeric-separator@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/01ec5547bd0497f76cc903ff4d6b02abc8c05f301c88d2622b6d834e33a5651aa7c7a3d80d8d57656a4588f7276eba357f6b7e006482f5b564b7a6488de493a1 - languageName: node - linkType: hard - -"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fddcf581a57f77e80eb6b981b10658421bc321ba5f0a5b754118c6a92a5448f12a0c336f77b8abf734841e102e5126d69110a306eadb03ca3e1547cab31f5cbf - languageName: node - linkType: hard - -"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/910d90e72bc90ea1ce698e89c1027fed8845212d5ab588e35ef91f13b93143845f94e2539d831dc8d8ededc14ec02f04f7bd6a8179edd43a326c784e7ed7f0b9 - languageName: node - linkType: hard - -"@babel/plugin-syntax-optional-chaining@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/eef94d53a1453361553c1f98b68d17782861a04a392840341bc91780838dd4e695209c783631cf0de14c635758beafb6a3a65399846ffa4386bff90639347f30 - languageName: node - linkType: hard - -"@babel/plugin-syntax-private-property-in-object@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-private-property-in-object@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b317174783e6e96029b743ccff2a67d63d38756876e7e5d0ba53a322e38d9ca452c13354a57de1ad476b4c066dbae699e0ca157441da611117a47af88985ecda - languageName: node - linkType: hard - -"@babel/plugin-syntax-top-level-await@npm:^7.14.5, @babel/plugin-syntax-top-level-await@npm:^7.8.3": - version: 7.14.5 - resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bbd1a56b095be7820029b209677b194db9b1d26691fe999856462e66b25b281f031f3dfd91b1619e9dcf95bebe336211833b854d0fb8780d618e35667c2d0d7e - languageName: node - linkType: hard - -"@babel/plugin-syntax-typescript@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-typescript@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/8ab7718fbb026d64da93681a57797d60326097fd7cb930380c8bffd9eb101689e90142c760a14b51e8e69c88a73ba3da956cb4520a3b0c65743aee5c71ef360a - languageName: node - linkType: hard - -"@babel/plugin-syntax-typescript@npm:^7.7.2": - version: 7.16.7 - resolution: "@babel/plugin-syntax-typescript@npm:7.16.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/661e636060609ede9a402e22603b01784c21fabb0a637e65f561c8159351fe0130bbc11fdefe31902107885e3332fc34d95eb652ac61d3f61f2d61f5da20609e - languageName: node - linkType: hard - -"@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/a651d700fe63ff0ddfd7186f4ebc24447ca734f114433139e3c027bc94a900d013cf1ef2e2db8430425ba542e39ae160c3b05f06b59fd4656273a3df97679e9c - languageName: node - linkType: hard - -"@babel/plugin-transform-arrow-functions@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/35abb6c57062802c7ce8bd96b2ef2883e3124370c688bbd67609f7d2453802fb73944df8808f893b6c67de978eb2bcf87bbfe325e46d6f39b5fcb09ece11d01a - languageName: node - linkType: hard - -"@babel/plugin-transform-arrow-functions@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6720173645826046878015c579c2ca9d93cdba79a2832f0180f5cf147d9817c85bf9c8338b16d6bdaa71f87809b7a194a6902e6c82ec00b6354aca6b40abe5e6 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-generator-functions@npm:7.23.9": - version: 7.23.9 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.9" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d402494087a6b803803eb5ab46b837aab100a04c4c5148e38bfa943ea1bbfc1ecfb340f1ced68972564312d3580f550c125f452372e77607a558fbbaf98c31c0 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-generator-functions@npm:^7.22.10": - version: 7.23.2 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.2" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e1abae0edcda7304d7c17702ac25a127578791b89c4f767d60589249fa3e50ec33f8c9ff39d3d8d41f00b29947654eaddd4fd586e04c4d598122db745fab2868 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-generator-functions@npm:^7.22.7": - version: 7.22.15 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.22.15" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.9" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fad98786b446ce63bde0d14a221e2617eef5a7bbca62b49d96f16ab5e1694521234cfba6145b830fbf9af16d60a8a3dbf148e8694830bd91796fe333b0599e73 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-generator-functions@npm:^7.23.9": - version: 7.24.7 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.24.7" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-remap-async-to-generator": "npm:^7.24.7" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/cf0a4b5ffc6d7f3f3bf12d4792535e8a46332714211326fd5058a6e45988891ee402b26cb9cc6c7121b2c8283ebd160e431827f885bdfa51d6127f934bd9ba7f - languageName: node - linkType: hard - -"@babel/plugin-transform-async-to-generator@npm:7.22.5, @babel/plugin-transform-async-to-generator@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.22.5" - dependencies: - "@babel/helper-module-imports": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b95f23f99dcb379a9f0a1c2a3bbea3f8dc0e1b16dc1ac8b484fe378370169290a7a63d520959a9ba1232837cf74a80e23f6facbe14fd42a3cda6d3c2d7168e62 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-to-generator@npm:7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.23.3" - dependencies: - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2e9d9795d4b3b3d8090332104e37061c677f29a1ce65bcbda4099a32d243e5d9520270a44bbabf0fb1fb40d463bd937685b1a1042e646979086c546d55319c3c - languageName: node - linkType: hard - -"@babel/plugin-transform-async-to-generator@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.24.7" - dependencies: - "@babel/helper-module-imports": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-remap-async-to-generator": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b2041d9d50b09afef983c4f1dece63fdfc5a8e4646e42591db398bc4322958434d60b3cb0f5d0f9f9dbdad8577e8a1a33ba9859aacc3004bf6d25d094d20193f - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoped-functions@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/416b1341858e8ca4e524dee66044735956ced5f478b2c3b9bc11ec2285b0c25d7dbb96d79887169eb938084c95d0a89338c8b2fe70d473bd9dc92e5d9db1732c - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoped-functions@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/33e2fb9f24c11889b2bacbe9c3625f738edafc2136c8206598e0422664267ec5ca9422cb4563cc42039ccfc333fb42ce5f8513382e56c5b02f934005d0d6e8ff - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.22.10": - version: 7.23.0 - resolution: "@babel/plugin-transform-block-scoping@npm:7.23.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/9f60c71a0b72c7bdc0734ab363cf8ad40c4366456d9429ab3f2caedf6566c12f1ae8190478827222e93c60855b6c746a2c0e24381646fe7220d4666c332dc090 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-transform-block-scoping@npm:7.22.15" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fecbcbfa657670ed09016fe9b7fbc97d96eec186dbacf280dd170161d7cfa6f03f80dcf46d2fb8e840ebbcaab34414b2f71ca9af1caa25e403c0a0b956ca4f37 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-block-scoping@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/9656e7bb0673279e18d9f9408027786f1b20d657e2cc106456e0bd7826bd12d81813299adbef2b2a5837b05740f2295fe8fb62389122d38c9e961b3005270777 - languageName: node - linkType: hard - -"@babel/plugin-transform-class-properties@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-class-properties@npm:7.22.5" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b830152dfc2ff2f647f0abe76e6251babdfbef54d18c4b2c73a6bf76b1a00050a5d998dac80dc901a48514e95604324943a9dd39317073fe0928b559e0e0c579 - languageName: node - linkType: hard - -"@babel/plugin-transform-class-properties@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-class-properties@npm:7.24.7" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/1c6f645dd3889257028f27bfbb04526ac7676763a923fc8203aa79aa5232820e0201cb858c73b684b1922327af10304121ac013c7b756876d54560a9c1a7bc79 - languageName: node - linkType: hard - -"@babel/plugin-transform-class-static-block@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-class-static-block@npm:7.22.11" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.11" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10/69f040506fad66f1c6918d288d0e0edbc5c8a07c8b4462c1184ad2f9f08995d68b057126c213871c0853ae0c72afc60ec87492049dfacb20902e32346a448bcb - languageName: node - linkType: hard - -"@babel/plugin-transform-class-static-block@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-class-static-block@npm:7.24.7" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10/00b4d35788bcfefb56b6a1d3506ca23f11dd55d4bb5a34eb70397c06283dc7f596cd9d40995c4a6cb897b45ad220de211f854e7a030a05e26a307c8f56b6ba4b - languageName: node - linkType: hard - -"@babel/plugin-transform-classes@npm:^7.22.6": - version: 7.22.15 - resolution: "@babel/plugin-transform-classes@npm:7.22.15" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-compilation-targets": "npm:^7.22.15" - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.9" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - globals: "npm:^11.1.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/21d7a171055634b4c407e42fc99ef340bde70d5582d47f7bcdc9781d09b3736607d346f56c3abb1e8b9b62516e1af25ab9023a295be0c347c963d6a20f74b55f - languageName: node - linkType: hard - -"@babel/plugin-transform-classes@npm:^7.23.8": - version: 7.24.8 - resolution: "@babel/plugin-transform-classes@npm:7.24.8" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-compilation-targets": "npm:^7.24.8" - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-replace-supers": "npm:^7.24.7" - "@babel/helper-split-export-declaration": "npm:^7.24.7" - globals: "npm:^11.1.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3d586018691423ed1fbcb4589cc29001226c96e5e060932bf99379568c684a4a230cca7871e7c825335336ef0326066ba6e3bf5e6d0209425b0f5ceeda3eaed2 - languageName: node - linkType: hard - -"@babel/plugin-transform-computed-properties@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-computed-properties@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/template": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/a3efa8de19e4c52f01a99301d864819a7997a7845044d9cef5b67b0fb1e5e3e610ecc23053a8b5cf8fe40fcad93c15a586eaeffd22b89eeaa038339c37919661 - languageName: node - linkType: hard - -"@babel/plugin-transform-computed-properties@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-computed-properties@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/template": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fecf3c770b2dd8e70be6da12d4dd0273de9d8ef4d0f46be98d56fddb3a451932cdc9bb81de3057c9acb903e05ece657886cc31886d5762afa7b0a256db0f791e - languageName: node - linkType: hard - -"@babel/plugin-transform-destructuring@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/plugin-transform-destructuring@npm:7.22.10" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/36cec1b8e3ecfc77753fe31698cc2441678ee4f70cf042202c3589a3b0079b04934f2d7d2f1c3d811ce6e3b2fe68fa1f4b6b6910555250987fce209d841cc686 - languageName: node - linkType: hard - -"@babel/plugin-transform-destructuring@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-transform-destructuring@npm:7.22.15" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6d2c12376e48d4e78752e9def38ff107a99a25efca35c10f78704b6eafa4d39ca0c0f2f0ebbb67498cca63963dd9c525cb7622efdc31ac3f93771fa04e80dcca - languageName: node - linkType: hard - -"@babel/plugin-transform-destructuring@npm:^7.23.3": - version: 7.24.8 - resolution: "@babel/plugin-transform-destructuring@npm:7.24.8" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e3bba0bb050592615fbf062ea07ae94f99e9cf22add006eaa66ed672d67ff7051b578a5ea68a7d79f9184fb3c27c65333d86b0b8ea04f9810bcccbeea2ffbe76 - languageName: node - linkType: hard - -"@babel/plugin-transform-destructuring@npm:^7.5.0": - version: 7.17.3 - resolution: "@babel/plugin-transform-destructuring@npm:7.17.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/5d5701d9f0d5276b1f16455bdf521698da33613f8f653832bdc216fda4a3187c2111f7a3743fef46d0a1651546420bbf5d9066316cf9e799a89307729f3cc8d0 - languageName: node - linkType: hard - -"@babel/plugin-transform-dotall-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.22.5" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/409b658d11e3082c8f69e9cdef2d96e4d6d11256f005772425fb230cc48fd05945edbfbcb709dab293a1a2f01f9c8a5bb7b4131e632b23264039d9f95864b453 - languageName: node - linkType: hard - -"@babel/plugin-transform-dotall-regex@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/51b75638748f6e5adab95b711d3365b8d7757f881c178946618a43b15063ec1160b07f4aa3b116bf3f1e097a88226a01db4cae2c5c4aad4c71fe5568828a03f5 - languageName: node - linkType: hard - -"@babel/plugin-transform-dotall-regex@npm:^7.4.4": - version: 7.16.7 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.16.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.16.7" - "@babel/helper-plugin-utils": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/554570dddfd5bfd87ab307be520f69a3d4ed2d2db677c165971b400d4c96656d0c165b318e69f1735612dcd12e04c0ee257697dc26800e8a572ca73bc05fa0f4 - languageName: node - linkType: hard - -"@babel/plugin-transform-duplicate-keys@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bb1280fbabaab6fab2ede585df34900712698210a3bd413f4df5bae6d8c24be36b496c92722ae676a7a67d060a4624f4d6c23b923485f906bfba8773c69f55b4 - languageName: node - linkType: hard - -"@babel/plugin-transform-duplicate-keys@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/4284d8fe058c838f80d594bace1380ce02995fa9a271decbece59c40815bc2f7e715807dcbe4d5da8b444716e6d05cc6d79771f500fb044cd0dd00ce4324b619 - languageName: node - linkType: hard - -"@babel/plugin-transform-dynamic-import@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-dynamic-import@npm:7.22.11" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/78fc9c532210bf9e8f231747f542318568ac360ee6c27e80853962c984283c73da3f8f8aebe83c2096090a435b356b092ed85de617a156cbe0729d847632be45 - languageName: node - linkType: hard - -"@babel/plugin-transform-dynamic-import@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-dynamic-import@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e949c02aa57098d916eb6edcbef0f3f7d62640f37e1a061b0692523964e081f8182f2c4292173b4dbea4edb8d146e65d6a20ce4b6b5f8c33be34bd846ae114ea - languageName: node - linkType: hard - -"@babel/plugin-transform-exponentiation-operator@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.22.5" - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/f2d660c1b1d51ad5fec1cd5ad426a52187204068c4158f8c4aa977b31535c61b66898d532603eef21c15756827be8277f724c869b888d560f26d7fe848bb5eae - languageName: node - linkType: hard - -"@babel/plugin-transform-exponentiation-operator@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.24.7" - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/014b211f73a524ee98441541ddc4f6b067eefcf94d509e99074a45ea8c3f3ad0e36cab6f5f96666ac05b747a21fa6fda949aa25153656bb2821545a4b302e0d4 - languageName: node - linkType: hard - -"@babel/plugin-transform-export-namespace-from@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-export-namespace-from@npm:7.22.11" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/73af5883a321ed56a4bfd43c8a7de0164faebe619287706896fc6ee2f7a4e69042adaa1338c0b8b4bdb9f7e5fdceb016fb1d40694cb43ca3b8827429e8aac4bf - languageName: node - linkType: hard - -"@babel/plugin-transform-export-namespace-from@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-export-namespace-from@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d59d21945d2fd1ead914bb21f909f75b70ebe0e7627c2b1326ce500babca4c8e4a2513af6899d92e06e87186c61ee5087209345f5102fb4ff5a0e47e7b159a2c - languageName: node - linkType: hard - -"@babel/plugin-transform-flow-strip-types@npm:^7.16.0": - version: 7.22.5 - resolution: "@babel/plugin-transform-flow-strip-types@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-flow": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/0657042178061517cd5641a9a5eed1251aa1d8cf93a4111568ae663773854a1e8f6af167ecae042237d261389751dc5ee32ba12a15e65e41af29d04150005cab - languageName: node - linkType: hard - -"@babel/plugin-transform-for-of@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-transform-for-of@npm:7.22.15" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d6ac155fcc8dc3d37a092325e5b7df738a7a953c4a47520c0c02fbc30433e6a5ac38197690845ebb931870af958ac95d36132d5accf41ed4bb0765a7618371fc - languageName: node - linkType: hard - -"@babel/plugin-transform-for-of@npm:^7.23.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-for-of@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ea471ad1345f1153f7f72f1f084e74f48dc349272ca1b2d8710b841b015c9861d673e12c3c98d42ab3c640cb6ab88bb9a8da1f4ca9c57a8f71f00815fa23ecef - languageName: node - linkType: hard - -"@babel/plugin-transform-function-name@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-function-name@npm:7.22.5" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.5" - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/cff3b876357999cb8ae30e439c3ec6b0491a53b0aa6f722920a4675a6dd5b53af97a833051df4b34791fe5b3dd326ccf769d5c8e45b322aa50ee11a660b17845 - languageName: node - linkType: hard - -"@babel/plugin-transform-function-name@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-function-name@npm:7.24.7" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.24.7" - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/9d4dcffea45acd255fed4a97e372ada234579f9bae01a4d0ced657091f159edf1635ff2a666508a08f8e59390def09ae6ce8372679faad894aa6f3247728ebe1 - languageName: node - linkType: hard - -"@babel/plugin-transform-json-strings@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-json-strings@npm:7.22.11" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/50665e5979e66358c50e90a26db53c55917f78175127ac2fa05c7888d156d418ffb930ec0a109353db0a7c5f57c756ce01bfc9825d24cbfd2b3ec453f2ed8cba - languageName: node - linkType: hard - -"@babel/plugin-transform-json-strings@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-json-strings@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/5549dc97fc2d429a089d14ccfd51d8b3ba23c39b79edfe6d754e804fb1d50e6a4c070e73550be514a919c4db1553d8e6f7406178d68756b5959afe025a602cb2 - languageName: node - linkType: hard - -"@babel/plugin-transform-literals@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-literals@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ec37cc2ffb32667af935ab32fe28f00920ec8a1eb999aa6dc6602f2bebd8ba205a558aeedcdccdebf334381d5c57106c61f52332045730393e73410892a9735b - languageName: node - linkType: hard - -"@babel/plugin-transform-literals@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bf341a5a0ffb5129670ac9a14ea53b67bd1d3d0e13173ce7ac2d4184c4b405d33f67df68c59a2e94a895bf80269ec1df82c011d9ddb686f9f08a40c37b881177 - languageName: node - linkType: hard - -"@babel/plugin-transform-logical-assignment-operators@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.22.11" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/c664e9798e85afa7f92f07b867682dee7392046181d82f5d21bae6f2ca26dfe9c8375cdc52b7483c3fc09a983c1989f60eff9fbc4f373b0c0a74090553d05739 - languageName: node - linkType: hard - -"@babel/plugin-transform-logical-assignment-operators@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e39581cf1f9a43330b8340177c618fdb3232deb03faab1937819ef39327660a1fe94fd0ec2f66d1f5b5f98acba68871a77a9931588011c13dded3d7094ecc9de - languageName: node - linkType: hard - -"@babel/plugin-transform-member-expression-literals@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ec4b0e07915ddd4fda0142fd104ee61015c208608a84cfa13643a95d18760b1dc1ceb6c6e0548898b8c49e5959a994e46367260176dbabc4467f729b21868504 - languageName: node - linkType: hard - -"@babel/plugin-transform-member-expression-literals@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/837b60ea42fc69a430c8f7fb124247ba009ff6d93187a521fe9f83556fe124715bd46533b1684a3e139f272849a14d1d4faf3397bde13714f99ce0938526ea6f - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-amd@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-modules-amd@npm:7.22.5" - dependencies: - "@babel/helper-module-transforms": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/5453f829205f6c918cc74d66946c9bf9544869f961d72a9934b4370049bf72a9b0ac089b64389be5172b217858c5353ec3479a18ab14cebb23329d708f6fc1ab - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-amd@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-amd@npm:7.24.7" - dependencies: - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/66465ffba49af7a7b7a62995eb58f591ecd23ab42b0c67f8a70020177b3789d2a379bd6cbb68cbd09a69fd75c38a91f5a09ea70f5c8347bf4c6ea81caa0f6c6b - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-commonjs@npm:^7.22.11": - version: 7.23.0 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.23.0" - dependencies: - "@babel/helper-module-transforms": "npm:^7.23.0" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-simple-access": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/65085c8f2578b0c272b3969b78e54430ea3217fca8de7a21ded845a74ddf2d97aee284559da102d826fcb8aed5a79d09536a6e4610d868f539d7bc382eb319ff - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-commonjs@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.22.5" - dependencies: - "@babel/helper-module-transforms": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-simple-access": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bf8bcc7a0f28f1fb2bfad3e65a50e6aee54998917caf89c68fc871d1831808a74ae7563b8a37485da03a583a9bd1211c30b667bb366c3161a22c6105962ab5f8 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-commonjs@npm:^7.23.3": - version: 7.24.8 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.24.8" - dependencies: - "@babel/helper-module-transforms": "npm:^7.24.8" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-simple-access": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/18e5d229767c7b5b6ff0cbf1a8d2d555965b90201839d0ac2dc043b56857624ea344e59f733f028142a8c1d54923b82e2a0185694ef36f988d797bfbaf59819c - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-systemjs@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.22.11" - dependencies: - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-module-transforms": "npm:^7.22.9" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/beccd37144e8c482da83282ee1ac8b605a188b9b3ddc5dbf99425a1a4e470158a3792c91cccdfb19fbd046436c42b63bb7432a60a83f7c3b50999f5f6a18819a - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-systemjs@npm:^7.23.9": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.24.7" - dependencies: - "@babel/helper-hoist-variables": "npm:^7.24.7" - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-validator-identifier": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/14f0ed1a252a2a04e075cd9051b809e33cd45374a2495dc0a428517893b8e951819acc8343c61d348c51ba54e42660bc93990a77aa3460d16a1c21d52d9c2cf1 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-umd@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-modules-umd@npm:7.22.5" - dependencies: - "@babel/helper-module-transforms": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b955d066c68b60c1179bfb0b744e2fad32dbe86d0673bd94637439cfe425d1e3ff579bd47a417233609aac1624f4fe69915bee73e6deb2af6188fda8aaa5db63 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-umd@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-umd@npm:7.24.7" - dependencies: - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/cef9c8917b3c35c3b6cb424dc2e6f74016122f1d25c196e2c7e51eb080d95e96c5d34966c0d5b9d4e17b8e60d455a97ed271317ed104e0e70bff159830a59678 - languageName: node - linkType: hard - -"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.22.5" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/3ee564ddee620c035b928fdc942c5d17e9c4b98329b76f9cefac65c111135d925eb94ed324064cd7556d4f5123beec79abea1d4b97d1c8a2a5c748887a2eb623 - languageName: node - linkType: hard - -"@babel/plugin-transform-new-target@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-new-target@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6b72112773487a881a1d6ffa680afde08bad699252020e86122180ee7a88854d5da3f15d9bca3331cf2e025df045604494a8208a2e63b486266b07c14e2ffbf3 - languageName: node - linkType: hard - -"@babel/plugin-transform-new-target@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-new-target@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/91b6a7439b7622f80dc755ddfb9ab083355bedc0b2af18e7c7a948faed14467599609331c8d59cfab4273640e3fc36e4cd02ad5b6dcb4a428f5a8baefc507acc - languageName: node - linkType: hard - -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.22.11" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/167babecc8b8fe70796a7b7d34af667ebbf43da166c21689502e5e8cc93180b7a85979c77c9f64b7cce431b36718bd0a6df9e5e0ffea4ae22afb22cfef886372 - languageName: node - linkType: hard - -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/113cd24b6ce4d0a8e54ad9324428244942ce752a3fd38f8b615c3a786641ec18a00a01b662fe4cbebf369358f5904a975bbde0a977b839f2438b16f0d7d1dd36 - languageName: node - linkType: hard - -"@babel/plugin-transform-numeric-separator@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-numeric-separator@npm:7.22.11" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/af064d06a4a041767ec396a5f258103f64785df290e038bba9f0ef454e6c914f2ac45d862bbdad8fac2c7ad47fa4e95356f29053c60c100a0160b02a995fe2a3 - languageName: node - linkType: hard - -"@babel/plugin-transform-numeric-separator@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-numeric-separator@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/dc5bb0534889d207b1da125635471c42da61a4a4e9e68855f24b1cd04ccdcf8325b2c29112e719913c2097242e7e62d660e0fea2a46f3a9a983c9d02a0ec7a04 - languageName: node - linkType: hard - -"@babel/plugin-transform-object-rest-spread@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-transform-object-rest-spread@npm:7.22.15" - dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-compilation-targets": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.22.15" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/04b9f4bbabf4bbd019b47c60b294d873fe5d2f6063628a5b311d88da9e81b0a8622756dd42c7030359925479b7a3cd743dee46e73d84e03afd907d8cfd44ddea - languageName: node - linkType: hard - -"@babel/plugin-transform-object-rest-spread@npm:^7.24.0": - version: 7.24.7 - resolution: "@babel/plugin-transform-object-rest-spread@npm:7.24.7" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d586995dc3396bbf8fb75b84f0a3548d923e4c3500bb414641a7fe30762a4ffd82987887fece6381f600d8de2da1e3310fc9a725271724d35f9020fcd5d4b2a3 - languageName: node - linkType: hard - -"@babel/plugin-transform-object-super@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-object-super@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b71887877d74cb64dbccb5c0324fa67e31171e6a5311991f626650e44a4083e5436a1eaa89da78c0474fb095d4ec322d63ee778b202d33aa2e4194e1ed8e62d7 - languageName: node - linkType: hard - -"@babel/plugin-transform-object-super@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-object-super@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-replace-supers": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/382739a017972d7126416b958ea81b4b950b6275414908a54bfef6aeed9b9fcc6c8d247db3a1134b09a3b355a60039670ce41ee41c626f8acec70f49c3c8d2a6 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-catch-binding@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.22.11" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/f17abd90e1de67c84d63afea29c8021c74abb2794d3a6eeafb0bbe7372d3db32aefca386e392116ec63884537a4a2815d090d26264d259bacc08f6e3ed05294c - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-catch-binding@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/605ae3764354e83f73c1e6430bac29e308806abcce8d1369cf69e4921771ff3592e8f60ba60c15990070d79b8d8740f0841069d64b466b3ce8a8c43e9743da7e - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-chaining@npm:^7.22.10": - version: 7.23.0 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.23.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fb1103c6489b91df06c483a97fc12515c2f3840f573cbecb27959307c0a838fdd1502a34ada43805c4fb7f7dab3d1c0d1ab8428775d098af6778a7b00f494c27 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-chaining@npm:^7.22.15, @babel/plugin-transform-optional-chaining@npm:^7.22.6": - version: 7.22.15 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.22.15" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6e7b35f2c673363d0fc78290b816b2a3996ad1201616bf4b52da20dda9f37d05c05c0c815b52cb65523b3160d4fdc7ffe0022629f2cb07135482ca57e42ce311 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-chaining@npm:^7.23.4, @babel/plugin-transform-optional-chaining@npm:^7.24.7": - version: 7.24.8 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.24.8" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/1f873fb9d86c280b64dfe5ebc59244b459b717ed72a7682da2386db3d9e11fc9d831cfc2e11d37262b4325a7a0e3ccbccfb8cd0b944caf199d3c9e03fff7b0af - languageName: node - linkType: hard - -"@babel/plugin-transform-parameters@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/plugin-transform-parameters@npm:7.16.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/000fabb790d9f744cf39674eed804bb312e493d3c38dcc474c6b212cfc3068b3e320d871049dff5c460b6521e7ef88b6bdff54d8cc5dfae77cb7ae5a7733433e - languageName: node - linkType: hard - -"@babel/plugin-transform-parameters@npm:^7.22.15, @babel/plugin-transform-parameters@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-transform-parameters@npm:7.22.15" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fa9f2340fe48b88c344ff38cd86318f61e48bedafdc567a1607106a1c3a65c0db845792f406b1320f89745192fe1ae6739b0bc4eb646ff60cd797ca85752d462 - languageName: node - linkType: hard - -"@babel/plugin-transform-parameters@npm:^7.23.3, @babel/plugin-transform-parameters@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-parameters@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/41ff6bda926fabfb2e5d90b70621f279330691bed92009297340a8e776cfe9c3f2dda6afbc31dd3cbdccdfa9a5c57f2046e3ccc84f963c3797356df003d1703a - languageName: node - linkType: hard - -"@babel/plugin-transform-private-methods@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-private-methods@npm:7.22.5" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/321479b4fcb6d3b3ef622ab22fd24001e43d46e680e8e41324c033d5810c84646e470f81b44cbcbef5c22e99030784f7cac92f1829974da7a47a60a7139082c3 - languageName: node - linkType: hard - -"@babel/plugin-transform-private-methods@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-private-methods@npm:7.24.7" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/5338df2aae53c43e6a7ea0c44f20a1100709778769c7e42d4901a61945c3200ba0e7fca83832f48932423a68528219fbea233cb5b8741a2501fdecbacdc08292 - languageName: node - linkType: hard - -"@babel/plugin-transform-private-property-in-object@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-private-property-in-object@npm:7.22.11" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.22.11" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b00623d107069c91a164d5cf7486c0929a4ee3023fcddbc8844e21b5e66f369271e1aa51921c7d87b80d9927bc75d63afcfe4d577872457ddb0443a5b86bacca - languageName: node - linkType: hard - -"@babel/plugin-transform-private-property-in-object@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-private-property-in-object@npm:7.24.7" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/a23ee18340818e292abfcb98b1086a188c81d640b1045e6809e9a3e8add78f9cb26607774de4ed653cbecd4277965dc4f4f1affc3504682209bb2a65fd4251f8 - languageName: node - linkType: hard - -"@babel/plugin-transform-property-literals@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-property-literals@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/796176a3176106f77fcb8cd04eb34a8475ce82d6d03a88db089531b8f0453a2fb8b0c6ec9a52c27948bc0ea478becec449893741fc546dfc3930ab927e3f9f2e - languageName: node - linkType: hard - -"@babel/plugin-transform-property-literals@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-property-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/71708890fe007d45ad7a130150a2ba1fea0205f575b925ca2e1bb65018730636a68e65c634a474e5b658378d72871c337c953560009c081a645e088769bf168a - languageName: node - linkType: hard - -"@babel/plugin-transform-react-constant-elements@npm:^7.12.1": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-constant-elements@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/0f2fc4d0a4025975f6cb4e1e80be1fe2e14546d86341beed8dbbbf9357b56908574e89476bd693431966c15b31f9c30f735636232058cf7812ca46b687d053be - languageName: node - linkType: hard - -"@babel/plugin-transform-react-display-name@npm:^7.16.0, @babel/plugin-transform-react-display-name@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-display-name@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/a12bfd1e4e93055efca3ace3c34722571bda59d9740dca364d225d9c6e3ca874f134694d21715c42cc63d79efd46db9665bd4a022998767f9245f1e29d5d204d - languageName: node - linkType: hard - -"@babel/plugin-transform-react-jsx-development@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-jsx-development@npm:7.22.5" - dependencies: - "@babel/plugin-transform-react-jsx": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/36bc3ff0b96bb0ef4723070a50cfdf2e72cfd903a59eba448f9fe92fea47574d6f22efd99364413719e1f3fb3c51b6c9b2990b87af088f8486a84b2a5f9e4560 - languageName: node - linkType: hard - -"@babel/plugin-transform-react-jsx-self@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-react-jsx-self@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/882bf56bc932d015c2d83214133939ddcf342e5bcafa21f1a93b19f2e052145115e1e0351730897fd66e5f67cad7875b8a8d81ceb12b6e2a886ad0102cb4eb1f - languageName: node - linkType: hard - -"@babel/plugin-transform-react-jsx-source@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-react-jsx-source@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/92287fb797e522d99bdc77eaa573ce79ff0ad9f1cf4e7df374645e28e51dce0adad129f6f075430b129b5bac8dad843f65021970e12e992d6d6671f0d65bb1e0 - languageName: node - linkType: hard - -"@babel/plugin-transform-react-jsx@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-jsx@npm:7.22.5" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-module-imports": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-jsx": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6be5db99b170c937c71fbe68dc64804bb041729d2f95b376ab5e7bc51c34a790f28753b14384160e87cabacf5e1b1aa3379a1a430a60b1fd6b031ba58955f5a6 - languageName: node - linkType: hard - -"@babel/plugin-transform-react-jsx@npm:^7.3.0": - version: 7.17.3 - resolution: "@babel/plugin-transform-react-jsx@npm:7.17.3" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.16.7" - "@babel/helper-module-imports": "npm:^7.16.7" - "@babel/helper-plugin-utils": "npm:^7.16.7" - "@babel/plugin-syntax-jsx": "npm:^7.16.7" - "@babel/types": "npm:^7.17.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d3de8c08858d8c79ecc5ee26c65567f3a187529bd936951d673454226154889c67aa634a79dd8b80e0b8e6119eed46e7432402095201bb5cce8007de73d8c333 - languageName: node - linkType: hard - -"@babel/plugin-transform-react-pure-annotations@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.22.5" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/092021c4f404e267002099ec20b3f12dd730cb90b0d83c5feed3dc00dbe43b9c42c795a18e7c6c7d7bddea20c7dd56221b146aec81b37f2e7eb5137331c61120 - languageName: node - linkType: hard - -"@babel/plugin-transform-regenerator@npm:^7.22.10, @babel/plugin-transform-regenerator@npm:^7.22.5": - version: 7.22.10 - resolution: "@babel/plugin-transform-regenerator@npm:7.22.10" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - regenerator-transform: "npm:^0.15.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e13678d62d6fa96f11cb8b863f00e8693491e7adc88bfca3f2820f80cbac8336e7dec3a596eee6a1c4663b7ececc3564f2cd7fb44ed6d4ce84ac2bb7f39ecc6e - languageName: node - linkType: hard - -"@babel/plugin-transform-regenerator@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-regenerator@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - regenerator-transform: "npm:^0.15.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/70fa2bb36d3e2ce69a25c7227da8ad92307ab7b50cb6dfcc4dc5ce8f1cc79b0fcf997292a1cb3b4ae7cb136f515d1b2c3fb78c927bdba8d719794430403eb0c6 - languageName: node - linkType: hard - -"@babel/plugin-transform-reserved-words@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-reserved-words@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3ffd7dbc425fe8132bfec118b9817572799cab1473113a635d25ab606c1f5a2341a636c04cf6b22df3813320365ed5a965b5eeb3192320a10e4cc2c137bd8bfc - languageName: node - linkType: hard - -"@babel/plugin-transform-reserved-words@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-reserved-words@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/64a2669671bb97c3dee3830a82c3e932fe6e02d56a4053c6ee4453d317b5f436d3d44907fbb0f4fbd8a56ebee34f6aee250e49743b7243d14d00c069215f3113 - languageName: node - linkType: hard - -"@babel/plugin-transform-runtime@npm:7.22.9": - version: 7.22.9 - resolution: "@babel/plugin-transform-runtime@npm:7.22.9" - dependencies: - "@babel/helper-module-imports": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - babel-plugin-polyfill-corejs2: "npm:^0.4.4" - babel-plugin-polyfill-corejs3: "npm:^0.8.2" - babel-plugin-polyfill-regenerator: "npm:^0.5.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6bf65a27f90fd2fafc10f4c780378fb83ccb5a73bb4a384364c561eac7ec42bbc7e9daf023f064ac3fcf5ed7e4f5169cf258d7295da33ee6732179cf21fbbc39 - languageName: node - linkType: hard - -"@babel/plugin-transform-runtime@npm:7.24.0": - version: 7.24.0 - resolution: "@babel/plugin-transform-runtime@npm:7.24.0" - dependencies: - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.24.0" - babel-plugin-polyfill-corejs2: "npm:^0.4.8" - babel-plugin-polyfill-corejs3: "npm:^0.9.0" - babel-plugin-polyfill-regenerator: "npm:^0.5.5" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/162c59982d1c6df45458c6a449f305d1b61b113bb2bbdad6bb19e41390749f118edb225f68bedf90ae1e8d32abefe7314480ad1ca770bc916cd15c46724a1458 - languageName: node - linkType: hard - -"@babel/plugin-transform-runtime@npm:^7.16.4": - version: 7.23.2 - resolution: "@babel/plugin-transform-runtime@npm:7.23.2" - dependencies: - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - babel-plugin-polyfill-corejs2: "npm:^0.4.6" - babel-plugin-polyfill-corejs3: "npm:^0.8.5" - babel-plugin-polyfill-regenerator: "npm:^0.5.3" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/536c444c494a43c1de4eec8297242199a7e778a82f64a8203a15bec46af17757ad59b520ee1fb414a03100ae743b8a2ca8527b6c0e4cc3e05be9ac1361260a44 - languageName: node - linkType: hard - -"@babel/plugin-transform-shorthand-properties@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/a5ac902c56ea8effa99f681340ee61bac21094588f7aef0bc01dff98246651702e677552fa6d10e548c4ac22a3ffad047dd2f8c8f0540b68316c2c203e56818b - languageName: node - linkType: hard - -"@babel/plugin-transform-shorthand-properties@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/c68c2be965007e0cb6667daa209bc0af877cab4b327ef2e21b2114c38554243c3f7fdcc5b03679b20f72a26d966aa646af771f3165c882067e85a3887647f028 - languageName: node - linkType: hard - -"@babel/plugin-transform-spread@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-spread@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/f9fd247b3fa8953416c8808c124c3a5db5cd697abbf791aae0143a0587fff6b386045f94c62bcd1b6783a1fd275629cc194f25f6c0aafc9f05f12a56fd5f94bf - languageName: node - linkType: hard - -"@babel/plugin-transform-spread@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-spread@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/76e2c8544129d727d5a698e2a67d74e438bc35df843adb5f769316ec432c5e1bbb4128123a95b2fe8ef0aec7b26d87efe81d64326291c77ad757ff184d38448a - languageName: node - linkType: hard - -"@babel/plugin-transform-sticky-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/63b2c575e3e7f96c32d52ed45ee098fb7d354b35c2223b8c8e76840b32cc529ee0c0ceb5742fd082e56e91e3d82842a367ce177e82b05039af3d602c9627a729 - languageName: node - linkType: hard - -"@babel/plugin-transform-sticky-regex@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3b9a99ae043ef363c81bfb097fa7a553fcf7c7d9fddc13dd2b47b3b2e45cf2741a9ca78cfe55f463983b043b365f0f8452f2d5eaadbdea20e6d6de50c16bed25 - languageName: node - linkType: hard - -"@babel/plugin-transform-template-literals@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-template-literals@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/27e9bb030654cb425381c69754be4abe6a7c75b45cd7f962cd8d604b841b2f0fb7b024f2efc1c25cc53f5b16d79d5e8cfc47cacbdaa983895b3aeefa3e7e24ff - languageName: node - linkType: hard - -"@babel/plugin-transform-template-literals@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-template-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ecf05a8511176d5570cb0d481577a407a4e8a9a430f86522d809e0ac2c823913e854ef9e2a1c83c0bd7c12489d82e1b48fabb52e697e80d6a6962125197593ca - languageName: node - linkType: hard - -"@babel/plugin-transform-typeof-symbol@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/82a53a63ffc3010b689ca9a54e5f53b2718b9f4b4a9818f36f9b7dba234f38a01876680553d2716a645a61920b5e6e4aaf8d4a0064add379b27ca0b403049512 - languageName: node - linkType: hard - -"@babel/plugin-transform-typeof-symbol@npm:^7.23.3": - version: 7.24.8 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.24.8" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/5f113fed94b694ec4a40a27b8628ce736cfa172b69fcffa2833c9a41895032127f3daeea552e94fdb4a3ce4e8cd51de67a670ab87a1f447a0cf55c9cb2d7ed11 - languageName: node - linkType: hard - -"@babel/plugin-transform-typescript@npm:^7.22.11": - version: 7.22.11 - resolution: "@babel/plugin-transform-typescript@npm:7.22.11" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.22.11" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-typescript": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/4404bf514cc9d24602e0a15cef699d29645d92d1b4359d70a1037c6b88fa201c6042c79f06e5f3519250b2856621b278da7af1fcbf5b2aada9373de67e688970 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-escapes@npm:^7.22.10, @babel/plugin-transform-unicode-escapes@npm:^7.22.5": - version: 7.22.10 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.22.10" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/807f40ed1324c8cb107c45358f1903384ca3f0ef1d01c5a3c5c9b271c8d8eec66936a3dcc8d75ddfceea9421420368c2e77ae3adef0a50557e778dfe296bf382 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-escapes@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6b8bca3495acedc89e880942de7b83c263fb5b4c9599594dcf3923e2128ae25f1f4725a295fe101027f75d8ef081ef28319296adf274b5022e57039e42836103 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-property-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.22.5" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2495e5f663cb388e3d888b4ba3df419ac436a5012144ac170b622ddfc221f9ea9bdba839fa2bc0185cb776b578030666406452ec7791cbf0e7a3d4c88ae9574c - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-property-regex@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/c0c284bbbdead7e17e059d72e1b288f86b0baacc410398ef6c6c703fe4326b069e68515ccb84359601315cd8e888f9226731d00624b7c6959b1c0853f072b61f - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.22.5" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6b5d1404c8c623b0ec9bd436c00d885a17d6a34f3f2597996343ddb9d94f6379705b21582dfd4cec2c47fd34068872e74ab6b9580116c0566b3f9447e2a7fa06 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-regex@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b545310d0d592d75566b9cd158f4b8951e34d07d839656789d179b39b3fd92b32bd387cdfaf33a93e636609f3bfb9bb03d41f3e43be598116c9c6c80cc3418c4 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-sets-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.22.5" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/c042070f980b139547f8b0179efbc049ac5930abec7fc26ed7a41d89a048d8ab17d362200e204b6f71c3c20d6991a0e74415e1a412a49adc8131c2a40c04822e - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-sets-regex@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/183b72d5987dc93f9971667ce3f26d28b0e1058e71b129733dd9d5282aecba4c062b67c9567526780d2defd2bfbf950ca58d8306dc90b2761fd1e960d867ddb7 - languageName: node - linkType: hard - -"@babel/preset-env@npm:7.22.9": - version: 7.22.9 - resolution: "@babel/preset-env@npm:7.22.9" - dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-compilation-targets": "npm:^7.22.9" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.5" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.22.5" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.22.5" - "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-class-properties": "npm:^7.12.13" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - "@babel/plugin-syntax-import-assertions": "npm:^7.22.5" - "@babel/plugin-syntax-import-attributes": "npm:^7.22.5" - "@babel/plugin-syntax-import-meta": "npm:^7.10.4" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" - "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" - "@babel/plugin-transform-arrow-functions": "npm:^7.22.5" - "@babel/plugin-transform-async-generator-functions": "npm:^7.22.7" - "@babel/plugin-transform-async-to-generator": "npm:^7.22.5" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.22.5" - "@babel/plugin-transform-block-scoping": "npm:^7.22.5" - "@babel/plugin-transform-class-properties": "npm:^7.22.5" - "@babel/plugin-transform-class-static-block": "npm:^7.22.5" - "@babel/plugin-transform-classes": "npm:^7.22.6" - "@babel/plugin-transform-computed-properties": "npm:^7.22.5" - "@babel/plugin-transform-destructuring": "npm:^7.22.5" - "@babel/plugin-transform-dotall-regex": "npm:^7.22.5" - "@babel/plugin-transform-duplicate-keys": "npm:^7.22.5" - "@babel/plugin-transform-dynamic-import": "npm:^7.22.5" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.22.5" - "@babel/plugin-transform-export-namespace-from": "npm:^7.22.5" - "@babel/plugin-transform-for-of": "npm:^7.22.5" - "@babel/plugin-transform-function-name": "npm:^7.22.5" - "@babel/plugin-transform-json-strings": "npm:^7.22.5" - "@babel/plugin-transform-literals": "npm:^7.22.5" - "@babel/plugin-transform-logical-assignment-operators": "npm:^7.22.5" - "@babel/plugin-transform-member-expression-literals": "npm:^7.22.5" - "@babel/plugin-transform-modules-amd": "npm:^7.22.5" - "@babel/plugin-transform-modules-commonjs": "npm:^7.22.5" - "@babel/plugin-transform-modules-systemjs": "npm:^7.22.5" - "@babel/plugin-transform-modules-umd": "npm:^7.22.5" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.22.5" - "@babel/plugin-transform-new-target": "npm:^7.22.5" - "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.22.5" - "@babel/plugin-transform-numeric-separator": "npm:^7.22.5" - "@babel/plugin-transform-object-rest-spread": "npm:^7.22.5" - "@babel/plugin-transform-object-super": "npm:^7.22.5" - "@babel/plugin-transform-optional-catch-binding": "npm:^7.22.5" - "@babel/plugin-transform-optional-chaining": "npm:^7.22.6" - "@babel/plugin-transform-parameters": "npm:^7.22.5" - "@babel/plugin-transform-private-methods": "npm:^7.22.5" - "@babel/plugin-transform-private-property-in-object": "npm:^7.22.5" - "@babel/plugin-transform-property-literals": "npm:^7.22.5" - "@babel/plugin-transform-regenerator": "npm:^7.22.5" - "@babel/plugin-transform-reserved-words": "npm:^7.22.5" - "@babel/plugin-transform-shorthand-properties": "npm:^7.22.5" - "@babel/plugin-transform-spread": "npm:^7.22.5" - "@babel/plugin-transform-sticky-regex": "npm:^7.22.5" - "@babel/plugin-transform-template-literals": "npm:^7.22.5" - "@babel/plugin-transform-typeof-symbol": "npm:^7.22.5" - "@babel/plugin-transform-unicode-escapes": "npm:^7.22.5" - "@babel/plugin-transform-unicode-property-regex": "npm:^7.22.5" - "@babel/plugin-transform-unicode-regex": "npm:^7.22.5" - "@babel/plugin-transform-unicode-sets-regex": "npm:^7.22.5" - "@babel/preset-modules": "npm:^0.1.5" - "@babel/types": "npm:^7.22.5" - babel-plugin-polyfill-corejs2: "npm:^0.4.4" - babel-plugin-polyfill-corejs3: "npm:^0.8.2" - babel-plugin-polyfill-regenerator: "npm:^0.5.1" - core-js-compat: "npm:^3.31.0" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/da06b7256c6db910f3fb8425846cfef7aa908897d4771d2ca172717318ac2e623c16d52f446c75792505ea20eb08b62ef013ea807584e4ff1f2e15d3655405a8 - languageName: node - linkType: hard - -"@babel/preset-env@npm:7.24.0": - version: 7.24.0 - resolution: "@babel/preset-env@npm:7.24.0" - dependencies: - "@babel/compat-data": "npm:^7.23.5" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/helper-validator-option": "npm:^7.23.5" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.23.3" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.23.3" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^7.23.7" - "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-class-properties": "npm:^7.12.13" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - "@babel/plugin-syntax-import-assertions": "npm:^7.23.3" - "@babel/plugin-syntax-import-attributes": "npm:^7.23.3" - "@babel/plugin-syntax-import-meta": "npm:^7.10.4" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" - "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" - "@babel/plugin-transform-arrow-functions": "npm:^7.23.3" - "@babel/plugin-transform-async-generator-functions": "npm:^7.23.9" - "@babel/plugin-transform-async-to-generator": "npm:^7.23.3" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.23.3" - "@babel/plugin-transform-block-scoping": "npm:^7.23.4" - "@babel/plugin-transform-class-properties": "npm:^7.23.3" - "@babel/plugin-transform-class-static-block": "npm:^7.23.4" - "@babel/plugin-transform-classes": "npm:^7.23.8" - "@babel/plugin-transform-computed-properties": "npm:^7.23.3" - "@babel/plugin-transform-destructuring": "npm:^7.23.3" - "@babel/plugin-transform-dotall-regex": "npm:^7.23.3" - "@babel/plugin-transform-duplicate-keys": "npm:^7.23.3" - "@babel/plugin-transform-dynamic-import": "npm:^7.23.4" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.23.3" - "@babel/plugin-transform-export-namespace-from": "npm:^7.23.4" - "@babel/plugin-transform-for-of": "npm:^7.23.6" - "@babel/plugin-transform-function-name": "npm:^7.23.3" - "@babel/plugin-transform-json-strings": "npm:^7.23.4" - "@babel/plugin-transform-literals": "npm:^7.23.3" - "@babel/plugin-transform-logical-assignment-operators": "npm:^7.23.4" - "@babel/plugin-transform-member-expression-literals": "npm:^7.23.3" - "@babel/plugin-transform-modules-amd": "npm:^7.23.3" - "@babel/plugin-transform-modules-commonjs": "npm:^7.23.3" - "@babel/plugin-transform-modules-systemjs": "npm:^7.23.9" - "@babel/plugin-transform-modules-umd": "npm:^7.23.3" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.22.5" - "@babel/plugin-transform-new-target": "npm:^7.23.3" - "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.23.4" - "@babel/plugin-transform-numeric-separator": "npm:^7.23.4" - "@babel/plugin-transform-object-rest-spread": "npm:^7.24.0" - "@babel/plugin-transform-object-super": "npm:^7.23.3" - "@babel/plugin-transform-optional-catch-binding": "npm:^7.23.4" - "@babel/plugin-transform-optional-chaining": "npm:^7.23.4" - "@babel/plugin-transform-parameters": "npm:^7.23.3" - "@babel/plugin-transform-private-methods": "npm:^7.23.3" - "@babel/plugin-transform-private-property-in-object": "npm:^7.23.4" - "@babel/plugin-transform-property-literals": "npm:^7.23.3" - "@babel/plugin-transform-regenerator": "npm:^7.23.3" - "@babel/plugin-transform-reserved-words": "npm:^7.23.3" - "@babel/plugin-transform-shorthand-properties": "npm:^7.23.3" - "@babel/plugin-transform-spread": "npm:^7.23.3" - "@babel/plugin-transform-sticky-regex": "npm:^7.23.3" - "@babel/plugin-transform-template-literals": "npm:^7.23.3" - "@babel/plugin-transform-typeof-symbol": "npm:^7.23.3" - "@babel/plugin-transform-unicode-escapes": "npm:^7.23.3" - "@babel/plugin-transform-unicode-property-regex": "npm:^7.23.3" - "@babel/plugin-transform-unicode-regex": "npm:^7.23.3" - "@babel/plugin-transform-unicode-sets-regex": "npm:^7.23.3" - "@babel/preset-modules": "npm:0.1.6-no-external-plugins" - babel-plugin-polyfill-corejs2: "npm:^0.4.8" - babel-plugin-polyfill-corejs3: "npm:^0.9.0" - babel-plugin-polyfill-regenerator: "npm:^0.5.5" - core-js-compat: "npm:^3.31.0" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/88bca150a09e658124997178ee1ff375a9aceecfd70ec11c7ccc12e82f5be5f7ff2ddfefba5b10fb617891645f92949392b350509de9742d2aa138f42959e190 - languageName: node - linkType: hard - -"@babel/preset-env@npm:^7.11.0, @babel/preset-env@npm:^7.12.1, @babel/preset-env@npm:^7.16.4": - version: 7.22.10 - resolution: "@babel/preset-env@npm:7.22.10" - dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-compilation-targets": "npm:^7.22.10" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.5" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.22.5" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.22.5" - "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-class-properties": "npm:^7.12.13" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - "@babel/plugin-syntax-import-assertions": "npm:^7.22.5" - "@babel/plugin-syntax-import-attributes": "npm:^7.22.5" - "@babel/plugin-syntax-import-meta": "npm:^7.10.4" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" - "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" - "@babel/plugin-transform-arrow-functions": "npm:^7.22.5" - "@babel/plugin-transform-async-generator-functions": "npm:^7.22.10" - "@babel/plugin-transform-async-to-generator": "npm:^7.22.5" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.22.5" - "@babel/plugin-transform-block-scoping": "npm:^7.22.10" - "@babel/plugin-transform-class-properties": "npm:^7.22.5" - "@babel/plugin-transform-class-static-block": "npm:^7.22.5" - "@babel/plugin-transform-classes": "npm:^7.22.6" - "@babel/plugin-transform-computed-properties": "npm:^7.22.5" - "@babel/plugin-transform-destructuring": "npm:^7.22.10" - "@babel/plugin-transform-dotall-regex": "npm:^7.22.5" - "@babel/plugin-transform-duplicate-keys": "npm:^7.22.5" - "@babel/plugin-transform-dynamic-import": "npm:^7.22.5" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.22.5" - "@babel/plugin-transform-export-namespace-from": "npm:^7.22.5" - "@babel/plugin-transform-for-of": "npm:^7.22.5" - "@babel/plugin-transform-function-name": "npm:^7.22.5" - "@babel/plugin-transform-json-strings": "npm:^7.22.5" - "@babel/plugin-transform-literals": "npm:^7.22.5" - "@babel/plugin-transform-logical-assignment-operators": "npm:^7.22.5" - "@babel/plugin-transform-member-expression-literals": "npm:^7.22.5" - "@babel/plugin-transform-modules-amd": "npm:^7.22.5" - "@babel/plugin-transform-modules-commonjs": "npm:^7.22.5" - "@babel/plugin-transform-modules-systemjs": "npm:^7.22.5" - "@babel/plugin-transform-modules-umd": "npm:^7.22.5" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.22.5" - "@babel/plugin-transform-new-target": "npm:^7.22.5" - "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.22.5" - "@babel/plugin-transform-numeric-separator": "npm:^7.22.5" - "@babel/plugin-transform-object-rest-spread": "npm:^7.22.5" - "@babel/plugin-transform-object-super": "npm:^7.22.5" - "@babel/plugin-transform-optional-catch-binding": "npm:^7.22.5" - "@babel/plugin-transform-optional-chaining": "npm:^7.22.10" - "@babel/plugin-transform-parameters": "npm:^7.22.5" - "@babel/plugin-transform-private-methods": "npm:^7.22.5" - "@babel/plugin-transform-private-property-in-object": "npm:^7.22.5" - "@babel/plugin-transform-property-literals": "npm:^7.22.5" - "@babel/plugin-transform-regenerator": "npm:^7.22.10" - "@babel/plugin-transform-reserved-words": "npm:^7.22.5" - "@babel/plugin-transform-shorthand-properties": "npm:^7.22.5" - "@babel/plugin-transform-spread": "npm:^7.22.5" - "@babel/plugin-transform-sticky-regex": "npm:^7.22.5" - "@babel/plugin-transform-template-literals": "npm:^7.22.5" - "@babel/plugin-transform-typeof-symbol": "npm:^7.22.5" - "@babel/plugin-transform-unicode-escapes": "npm:^7.22.10" - "@babel/plugin-transform-unicode-property-regex": "npm:^7.22.5" - "@babel/plugin-transform-unicode-regex": "npm:^7.22.5" - "@babel/plugin-transform-unicode-sets-regex": "npm:^7.22.5" - "@babel/preset-modules": "npm:0.1.6-no-external-plugins" - "@babel/types": "npm:^7.22.10" - babel-plugin-polyfill-corejs2: "npm:^0.4.5" - babel-plugin-polyfill-corejs3: "npm:^0.8.3" - babel-plugin-polyfill-regenerator: "npm:^0.5.2" - core-js-compat: "npm:^3.31.0" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/887cc41e6df54342ffb41b42248f584b2f220e653fc70c683e3d7cc1aa6964b9694d7d6846694647e681f440cd7f2e4454c8a9ee5bce3f523c2e22a99278f2fd - languageName: node - linkType: hard - -"@babel/preset-modules@npm:0.1.6-no-external-plugins": - version: 0.1.6-no-external-plugins - resolution: "@babel/preset-modules@npm:0.1.6-no-external-plugins" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.0.0" - "@babel/types": "npm:^7.4.4" - esutils: "npm:^2.0.2" - peerDependencies: - "@babel/core": ^7.0.0-0 || ^8.0.0-0 <8.0.0 - checksum: 10/039aba98a697b920d6440c622aaa6104bb6076d65356b29dad4b3e6627ec0354da44f9621bafbeefd052cd4ac4d7f88c9a2ab094efcb50963cb352781d0c6428 - languageName: node - linkType: hard - -"@babel/preset-modules@npm:^0.1.5": - version: 0.1.5 - resolution: "@babel/preset-modules@npm:0.1.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.0.0" - "@babel/plugin-proposal-unicode-property-regex": "npm:^7.4.4" - "@babel/plugin-transform-dotall-regex": "npm:^7.4.4" - "@babel/types": "npm:^7.4.4" - esutils: "npm:^2.0.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/41583c17748890ad4950ae90ae38bd3f9d56268adc6c3d755839000a72963bda0db448296e4e74069a63567ae5f71f42d4a6dd1672386124bf0897f77c411870 - languageName: node - linkType: hard - -"@babel/preset-react@npm:^7.12.5, @babel/preset-react@npm:^7.16.0": - version: 7.22.5 - resolution: "@babel/preset-react@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.5" - "@babel/plugin-transform-react-display-name": "npm:^7.22.5" - "@babel/plugin-transform-react-jsx": "npm:^7.22.5" - "@babel/plugin-transform-react-jsx-development": "npm:^7.22.5" - "@babel/plugin-transform-react-pure-annotations": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/7c78b1bca3f2de9cb863b50cf0a5378d5e80b1b2e7573b9daabf09c0517d197aa7ff7fcd7daeb4a51e148743ab5dbd24c7b34422c86a256baf0e10e13400fe98 - languageName: node - linkType: hard - -"@babel/preset-typescript@npm:^7.16.0": - version: 7.22.11 - resolution: "@babel/preset-typescript@npm:7.22.11" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.5" - "@babel/plugin-syntax-jsx": "npm:^7.22.5" - "@babel/plugin-transform-modules-commonjs": "npm:^7.22.11" - "@babel/plugin-transform-typescript": "npm:^7.22.11" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b5da0fb7dbaf191bc32dae0eba4d89c8999e53ab22055c762f97fff5172c97c7ff784353abcc7145d611773da5e36b7cd491f6e0ef7fa82dcb2315b74be4ad0a - languageName: node - linkType: hard - -"@babel/regjsgen@npm:^0.8.0": - version: 0.8.0 - resolution: "@babel/regjsgen@npm:0.8.0" - checksum: 10/c57fb730b17332b7572574b74364a77d70faa302a281a62819476fa3b09822974fd75af77aea603ad77378395be64e81f89f0e800bf86cbbf21652d49ce12ee8 - languageName: node - linkType: hard - -"@babel/runtime@npm:7.22.6, @babel/runtime@npm:^7.6.3, @babel/runtime@npm:^7.9.2": - version: 7.22.6 - resolution: "@babel/runtime@npm:7.22.6" - dependencies: - regenerator-runtime: "npm:^0.13.11" - checksum: 10/1d2f56797f548b009910bddf3dc04f980a9701193233145dc923f3ea87c8f88121a3c3ef1d449e9cb52a370d7d025a2243c748882d5546ff079ddf5ffe29f240 - languageName: node - linkType: hard - -"@babel/runtime@npm:7.24.0": - version: 7.24.0 - resolution: "@babel/runtime@npm:7.24.0" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10/8d32c7e116606ea322b89f9fde8ffae6be9503b549dc0d0abb38bd9dc26e87469b9fb7a66964cc089ee558fd0a97d304fb0a3cfec140694764fb0d71b6a6f5e4 - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7": - version: 7.23.2 - resolution: "@babel/runtime@npm:7.23.2" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10/abdcbdd590c7e31762e1bdab94dd466823c8bcedd3ff2fde85eeb94dac7cccaef151ac37c428bda7018ededd27c9a82b4dfeb621f978ad934232475a902f8e3a - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.23.4": - version: 7.23.5 - resolution: "@babel/runtime@npm:7.23.5" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10/0f1669f639af30a0a2948ffcefa2c61935f337b0777bd94f8d7bc66bba8e7d4499e725caeb0449540d9c6d67399b733c4e719babb43ce9a0f33095aa01b42b37 - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/runtime@npm:7.23.9" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10/9a520fe1bf72249f7dd60ff726434251858de15cccfca7aa831bd19d0d3fb17702e116ead82724659b8da3844977e5e13de2bae01eb8a798f2823a669f122be6 - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.4.4": - version: 7.22.10 - resolution: "@babel/runtime@npm:7.22.10" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10/88bba6dfdfd6f6e9365199397146a0dd5d04409e7142a0df95125a198eb76c83fd0a52c117aba50f9a61db2f0186780574c071ea48010e5ffa1f157585c8c950 - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.8.4": - version: 7.17.2 - resolution: "@babel/runtime@npm:7.17.2" - dependencies: - regenerator-runtime: "npm:^0.13.4" - checksum: 10/a59e74f2a5cb4c788145a43e488b735e7cd583bb97fabe52eebbc34a3c4687182647468b2567152cd69927631ffb45f013db9bb04f057c5410f18cf521335140 - languageName: node - linkType: hard - -"@babel/template@npm:7.0.0-beta.51": - version: 7.0.0-beta.51 - resolution: "@babel/template@npm:7.0.0-beta.51" - dependencies: - "@babel/code-frame": "npm:7.0.0-beta.51" - "@babel/parser": "npm:7.0.0-beta.51" - "@babel/types": "npm:7.0.0-beta.51" - lodash: "npm:^4.17.5" - checksum: 10/0adecde4c2be87dc300044996aabaefcd0b82eb2e21361f3aaf56b3935779f99029231280466d8bd498b2b85fa66f14d2e88e9325b4cd01ba4bf7fe4b2e8cbb6 - languageName: node - linkType: hard - -"@babel/template@npm:7.22.5, @babel/template@npm:^7.22.5, @babel/template@npm:^7.4.0": - version: 7.22.5 - resolution: "@babel/template@npm:7.22.5" - dependencies: - "@babel/code-frame": "npm:^7.22.5" - "@babel/parser": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - checksum: 10/460634b1c5d61c779270968bd2f0817c19e3a5f20b469330dcab0a324dd29409b15ad1baa8530a21e09a9eb6c7db626500f437690c7be72987e40baa75357799 - languageName: node - linkType: hard - -"@babel/template@npm:^7.16.7, @babel/template@npm:^7.3.3": - version: 7.16.7 - resolution: "@babel/template@npm:7.16.7" - dependencies: - "@babel/code-frame": "npm:^7.16.7" - "@babel/parser": "npm:^7.16.7" - "@babel/types": "npm:^7.16.7" - checksum: 10/f35836a8cd53663508bc5e0b13e7fe3d646197fc1baa74c21d3a713c0c91d39fe6f6c5be8ec1ec139b3d0a00443ab1b8cc7ddf88c6ceb6f9fcf7ea0ae7594eca - languageName: node - linkType: hard - -"@babel/template@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/template@npm:7.18.6" - dependencies: - "@babel/code-frame": "npm:^7.18.6" - "@babel/parser": "npm:^7.18.6" - "@babel/types": "npm:^7.18.6" - checksum: 10/6b57edbe71168d82e05198d03e7be2e234c6f438789f26d09e3b05f010faf5cc51c352c99e09aa8e915ac4b084b1f7609a21617b4a9304baab857edeea456128 - languageName: node - linkType: hard - -"@babel/template@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/template@npm:7.22.15" - dependencies: - "@babel/code-frame": "npm:^7.22.13" - "@babel/parser": "npm:^7.22.15" - "@babel/types": "npm:^7.22.15" - checksum: 10/21e768e4eed4d1da2ce5d30aa51db0f4d6d8700bc1821fec6292587df7bba2fe1a96451230de8c64b989740731888ebf1141138bfffb14cacccf4d05c66ad93f - languageName: node - linkType: hard - -"@babel/template@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/template@npm:7.23.9" - dependencies: - "@babel/code-frame": "npm:^7.23.5" - "@babel/parser": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" - checksum: 10/1b011ba9354dc2e646561d54b6862e0df51760e6179faadd79be05825b0b6da04911e4e192df943f1766748da3037fd8493615b38707f7cadb0cf0c96601c170 - languageName: node - linkType: hard - -"@babel/template@npm:^7.24.0, @babel/template@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/template@npm:7.24.7" - dependencies: - "@babel/code-frame": "npm:^7.24.7" - "@babel/parser": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/5975d404ef51cf379515eb0f80b115981d0b9dff5539e53a47516644abb8c83d7559f5b083eb1d4977b20d8359ebb2f911ccd4f729143f8958fdc465f976d843 - languageName: node - linkType: hard - -"@babel/traverse@npm:>=7.23.2": - version: 7.23.2 - resolution: "@babel/traverse@npm:7.23.2" - dependencies: - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.0" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.23.0" - "@babel/types": "npm:^7.23.0" - debug: "npm:^4.1.0" - globals: "npm:^11.1.0" - checksum: 10/e4fcb8f8395804956df4ae1301230a14b6eb35b74a7058a0e0b40f6f4be7281e619e6dafe400e833d4512da5d61cf17ea177d04b00a8f7cf3d8d69aff83ca3d8 - languageName: node - linkType: hard - -"@babel/types@npm:7.0.0-beta.51": - version: 7.0.0-beta.51 - resolution: "@babel/types@npm:7.0.0-beta.51" - dependencies: - esutils: "npm:^2.0.2" - lodash: "npm:^4.17.5" - to-fast-properties: "npm:^2.0.0" - checksum: 10/b0c0fa3f6962e729daae2c9feabfb3347a08c10c2030fa00ce8241b486ed42c952410289b22eb9a0924387260f2658b256cad0c27e59ff9758a3f7dbc7ccd792 - languageName: node - linkType: hard - -"@babel/types@npm:7.19.0": - version: 7.19.0 - resolution: "@babel/types@npm:7.19.0" - dependencies: - "@babel/helper-string-parser": "npm:^7.18.10" - "@babel/helper-validator-identifier": "npm:^7.18.6" - to-fast-properties: "npm:^2.0.0" - checksum: 10/6839d041b69746f35c74d25d82f49ea4e5844cf7f2d781f57aafd8ce4f5ac14ab7749f690454ea25147c9b2251cc753ae9733094e7a6f72f4e1f785f275cb174 - languageName: node - linkType: hard - -"@babel/types@npm:7.24.7, @babel/types@npm:^7.18.2": - version: 7.24.7 - resolution: "@babel/types@npm:7.24.7" - dependencies: - "@babel/helper-string-parser": "npm:^7.24.7" - "@babel/helper-validator-identifier": "npm:^7.24.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10/ad3c8c0d6fb4acb0bb74bb5b4bb849b181bf6185677ef9c59c18856c81e43628d0858253cf232f0eca806f02e08eff85a1d3e636a3e94daea737597796b0b430 - languageName: node - linkType: hard - -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.16.7, @babel/types@npm:^7.17.0, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": - version: 7.17.0 - resolution: "@babel/types@npm:7.17.0" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.16.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10/535ccef360d0c74e2bb685050f3a45e6ab30f66c740bbdd0858148ed502043f1ae2006a9d0269ac3b7356b690091ae313efd912e408bc0198d80a14b2a6f1537 - languageName: node - linkType: hard - -"@babel/types@npm:^7.12.6, @babel/types@npm:^7.22.11, @babel/types@npm:^7.22.19, @babel/types@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/types@npm:7.23.0" - dependencies: - "@babel/helper-string-parser": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.20" - to-fast-properties: "npm:^2.0.0" - checksum: 10/ca5b896a26c91c5672254725c4c892a35567d2122afc47bd5331d1611a7f9230c19fc9ef591a5a6f80bf0d80737e104a9ac205c96447c74bee01d4319db58001 - languageName: node - linkType: hard - -"@babel/types@npm:^7.18.6, @babel/types@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/types@npm:7.18.9" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.18.6" - to-fast-properties: "npm:^2.0.0" - checksum: 10/a45958594383c7bf8050e550a0ec08f50485c218dbac1afae8583fccf5cf7893ce2861f6056a8f35c4bd024acdd2a69231b8493c78c41334ce083246ff8965db - languageName: node - linkType: hard - -"@babel/types@npm:^7.20.7": - version: 7.21.4 - resolution: "@babel/types@npm:7.21.4" - dependencies: - "@babel/helper-string-parser": "npm:^7.19.4" - "@babel/helper-validator-identifier": "npm:^7.19.1" - to-fast-properties: "npm:^2.0.0" - checksum: 10/3070d1e15ef263961d23766400badb60e2e87b0384cb259f824793ab37375e21e1a7e54952fea82d198b9e6195d99f7d690ebc9b46d8b14fd157d316aca502dc - languageName: node - linkType: hard - -"@babel/types@npm:^7.22.10, @babel/types@npm:^7.4.0": - version: 7.22.10 - resolution: "@babel/types@npm:7.22.10" - dependencies: - "@babel/helper-string-parser": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.5" - to-fast-properties: "npm:^2.0.0" - checksum: 10/b11f8d13f3418276df654b5276443f95742484c3c83e74f90f92bff01315118507a082edf1e74903b284106447660c31e5f29678730f647fb25e766ce47c56f0 - languageName: node - linkType: hard - -"@babel/types@npm:^7.22.15, @babel/types@npm:^7.22.17": - version: 7.22.17 - resolution: "@babel/types@npm:7.22.17" - dependencies: - "@babel/helper-string-parser": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.15" - to-fast-properties: "npm:^2.0.0" - checksum: 10/fafeea0d9a4a887da78790189bda4bcb139713673fb47a75abf6d09ca3f2d370ff011fd2f4ba6d31ae841aae2dfb18b141d8722edeb274e6e9af8cd4325b264b - languageName: node - linkType: hard - -"@babel/types@npm:^7.22.5, @babel/types@npm:^7.8.3": - version: 7.22.5 - resolution: "@babel/types@npm:7.22.5" - dependencies: - "@babel/helper-string-parser": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.5" - to-fast-properties: "npm:^2.0.0" - checksum: 10/7f7edffe7e13dbd26a182677575ca7451bc234ce43b93dc49d27325306748628019e7753e6b5619ae462ea0d7e5ce2c0cc24092d53b592642ea89542037748b5 - languageName: node - linkType: hard - -"@babel/types@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/types@npm:7.23.6" - dependencies: - "@babel/helper-string-parser": "npm:^7.23.4" - "@babel/helper-validator-identifier": "npm:^7.22.20" - to-fast-properties: "npm:^2.0.0" - checksum: 10/07e70bb94d30b0231396b5e9a7726e6d9227a0a62e0a6830c0bd3232f33b024092e3d5a7d1b096a65bbf2bb43a9ab4c721bf618e115bfbb87b454fa060f88cbf - languageName: node - linkType: hard - -"@babel/types@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/types@npm:7.23.9" - dependencies: - "@babel/helper-string-parser": "npm:^7.23.4" - "@babel/helper-validator-identifier": "npm:^7.22.20" - to-fast-properties: "npm:^2.0.0" - checksum: 10/bed9634e5fd0f9dc63c84cfa83316c4cb617192db9fedfea464fca743affe93736d7bf2ebf418ee8358751a9d388e303af87a0c050cb5d87d5870c1b0154f6cb - languageName: node - linkType: hard - -"@babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/types@npm:7.24.8" - dependencies: - "@babel/helper-string-parser": "npm:^7.24.8" - "@babel/helper-validator-identifier": "npm:^7.24.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10/29b080b2753c22ee5e2455ff767a971443245d945dea4d1b3130e036dcdf0949a89539a581753c68d03d2f2f2325244ee0f91fb83dabee1cbac5db5246838137 - languageName: node - linkType: hard - -"@bcoe/v8-coverage@npm:^0.2.3": - version: 0.2.3 - resolution: "@bcoe/v8-coverage@npm:0.2.3" - checksum: 10/1a1f0e356a3bb30b5f1ced6f79c413e6ebacf130421f15fac5fcd8be5ddf98aedb4404d7f5624e3285b700e041f9ef938321f3ca4d359d5b716f96afa120d88d - languageName: node - linkType: hard - -"@bufbuild/buf-darwin-arm64@npm:1.30.0": - version: 1.30.0 - resolution: "@bufbuild/buf-darwin-arm64@npm:1.30.0" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@bufbuild/buf-darwin-x64@npm:1.30.0": - version: 1.30.0 - resolution: "@bufbuild/buf-darwin-x64@npm:1.30.0" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@bufbuild/buf-linux-aarch64@npm:1.30.0": - version: 1.30.0 - resolution: "@bufbuild/buf-linux-aarch64@npm:1.30.0" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@bufbuild/buf-linux-x64@npm:1.30.0": - version: 1.30.0 - resolution: "@bufbuild/buf-linux-x64@npm:1.30.0" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@bufbuild/buf-win32-arm64@npm:1.30.0": - version: 1.30.0 - resolution: "@bufbuild/buf-win32-arm64@npm:1.30.0" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@bufbuild/buf-win32-x64@npm:1.30.0": - version: 1.30.0 - resolution: "@bufbuild/buf-win32-x64@npm:1.30.0" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@bufbuild/buf@npm:1.30.0": - version: 1.30.0 - resolution: "@bufbuild/buf@npm:1.30.0" - dependencies: - "@bufbuild/buf-darwin-arm64": "npm:1.30.0" - "@bufbuild/buf-darwin-x64": "npm:1.30.0" - "@bufbuild/buf-linux-aarch64": "npm:1.30.0" - "@bufbuild/buf-linux-x64": "npm:1.30.0" - "@bufbuild/buf-win32-arm64": "npm:1.30.0" - "@bufbuild/buf-win32-x64": "npm:1.30.0" - dependenciesMeta: - "@bufbuild/buf-darwin-arm64": - optional: true - "@bufbuild/buf-darwin-x64": - optional: true - "@bufbuild/buf-linux-aarch64": - optional: true - "@bufbuild/buf-linux-x64": - optional: true - "@bufbuild/buf-win32-arm64": - optional: true - "@bufbuild/buf-win32-x64": - optional: true - bin: - buf: bin/buf - protoc-gen-buf-breaking: bin/protoc-gen-buf-breaking - protoc-gen-buf-lint: bin/protoc-gen-buf-lint - checksum: 10/5e383bd7d8b8820c7336e6471c2cef03edfa4003c66ff7543cff8b76815bbc7c96b54016cfbffe7acc37b6738277d545a2b1e4941880bcc4e219790773db34f0 - languageName: node - linkType: hard - -"@bufbuild/protobuf@npm:1.10.0": - version: 1.10.0 - resolution: "@bufbuild/protobuf@npm:1.10.0" - checksum: 10/1f120f72bbb40dd3d0f8c73f1474b001cfb9be09c38b7b0292e35fec98c5184a3db380a6feff7626fb3fff108c8a8aa7fc8cfea14904dc0a1174a01c8e637cc6 - languageName: node - linkType: hard - -"@bufbuild/protobuf@npm:1.8.0, @bufbuild/protobuf@npm:^1.7.2, @bufbuild/protobuf@npm:^1.8.0": - version: 1.8.0 - resolution: "@bufbuild/protobuf@npm:1.8.0" - checksum: 10/f91d60ff1609c023466500e99312d2e92ac09c163d615c315fa25d9e50f1e9b76a3a9cac776786a3dd5c5065bb7061bf29388587e2a1d27306f68ed98e57a892 - languageName: node - linkType: hard - -"@bufbuild/protoc-gen-es@npm:1.8.0": - version: 1.8.0 - resolution: "@bufbuild/protoc-gen-es@npm:1.8.0" - dependencies: - "@bufbuild/protobuf": "npm:^1.8.0" - "@bufbuild/protoplugin": "npm:1.8.0" - peerDependencies: - "@bufbuild/protobuf": 1.8.0 - peerDependenciesMeta: - "@bufbuild/protobuf": - optional: true - bin: - protoc-gen-es: bin/protoc-gen-es - checksum: 10/85fd18dcd53003b3057bd98e2fec0c785ec7e834b658609ad284f24e98c0e2cb06616c8c96065e2df25e9a309f74379b369112ce2c433aadaea380ad7b120ab3 - languageName: node - linkType: hard - -"@bufbuild/protoplugin@npm:1.8.0, @bufbuild/protoplugin@npm:^1.7.2": - version: 1.8.0 - resolution: "@bufbuild/protoplugin@npm:1.8.0" - dependencies: - "@bufbuild/protobuf": "npm:1.8.0" - "@typescript/vfs": "npm:^1.4.0" - typescript: "npm:4.5.2" - checksum: 10/e243f655dd02fe2dc857a48c00846857c4a9fae89565aabe98ae35e3a5d3002727b9e0790bc136e8f358a8e7d42c594b308ff6b47027cd679646273d3a76cb7b - languageName: node - linkType: hard - -"@chainsafe/as-sha256@npm:^0.3.1": - version: 0.3.1 - resolution: "@chainsafe/as-sha256@npm:0.3.1" - checksum: 10/3bae7b4bc6e307baa3cf1f9d2c75827874cd0fb458bc592656d741d374b48e71c042fe21616a506cb821487a5abfc6b92181e4b7fbf49b7370cee4df0b67d95a - languageName: node - linkType: hard - -"@chainsafe/is-ip@npm:^2.0.1": - version: 2.0.2 - resolution: "@chainsafe/is-ip@npm:2.0.2" - checksum: 10/86957254fc23e0998c2e01b76d843f96d0fbaca93cbeec7e8c1fd099a8736777a7a0ec7b0cecd507c4b1e74e54eff5b37b6cb21adfcb84588dc11df9e0a65257 - languageName: node - linkType: hard - -"@chainsafe/netmask@npm:^2.0.0": - version: 2.0.0 - resolution: "@chainsafe/netmask@npm:2.0.0" - dependencies: - "@chainsafe/is-ip": "npm:^2.0.1" - checksum: 10/fa696cdffd8b80efc76b988902655976aae4fd80cf1ff51db849c0476cc477d1bb0e50bf2700162dfa2aa5602b8594e7d92d6fa2235cdeb0246e4afc7f64947f - languageName: node - linkType: hard - -"@chainsafe/persistent-merkle-tree@npm:^0.4.2": - version: 0.4.2 - resolution: "@chainsafe/persistent-merkle-tree@npm:0.4.2" - dependencies: - "@chainsafe/as-sha256": "npm:^0.3.1" - checksum: 10/a7e59f80be3ce0a86fe452a3c003bd159a1719ed22cae22e9841668f0eda8c35412fa16b3b150d96f583a24f430a5cc2a1bfcabafc1b9cf6e1fdb227e98c4dc7 - languageName: node - linkType: hard - -"@chainsafe/persistent-merkle-tree@npm:^0.5.0": - version: 0.5.0 - resolution: "@chainsafe/persistent-merkle-tree@npm:0.5.0" - dependencies: - "@chainsafe/as-sha256": "npm:^0.3.1" - checksum: 10/c8a37eb2fbe04d8b6f219774400dad5c50e109a9daf427883c9e33826a294a1bbd6bc759b5d6d38fefb2398443d2d880b67130eacab55b34d95d1332ac8ab680 - languageName: node - linkType: hard - -"@chainsafe/ssz@npm:^0.10.0": - version: 0.10.2 - resolution: "@chainsafe/ssz@npm:0.10.2" - dependencies: - "@chainsafe/as-sha256": "npm:^0.3.1" - "@chainsafe/persistent-merkle-tree": "npm:^0.5.0" - checksum: 10/359b3a672b460ad7fee524115fe7e5d9518c62b667dfc3dc6d8be0286ebb785ce303a68070cde5b31fc2860f99fda40df4296030cb9af42554143290f542326b - languageName: node - linkType: hard - -"@chainsafe/ssz@npm:^0.9.2": - version: 0.9.4 - resolution: "@chainsafe/ssz@npm:0.9.4" - dependencies: - "@chainsafe/as-sha256": "npm:^0.3.1" - "@chainsafe/persistent-merkle-tree": "npm:^0.4.2" - case: "npm:^1.6.3" - checksum: 10/2fe83d0b3ef131e14b51b88bb3343b14e7a02185fa9fd3da84b4726dbd857daaa4f7f6f4840fe3772fc1380352b1675a13b5f6153c4211c0f00ffa542b62bf2f - languageName: node - linkType: hard - -"@colors/colors@npm:1.5.0": - version: 1.5.0 - resolution: "@colors/colors@npm:1.5.0" - checksum: 10/9d226461c1e91e95f067be2bdc5e6f99cfe55a721f45afb44122e23e4b8602eeac4ff7325af6b5a369f36396ee1514d3809af3f57769066d80d83790d8e53339 - languageName: node - linkType: hard - -"@commitlint/cli@npm:17.7.1": - version: 17.7.1 - resolution: "@commitlint/cli@npm:17.7.1" - dependencies: - "@commitlint/format": "npm:^17.4.4" - "@commitlint/lint": "npm:^17.7.0" - "@commitlint/load": "npm:^17.7.1" - "@commitlint/read": "npm:^17.5.1" - "@commitlint/types": "npm:^17.4.4" - execa: "npm:^5.0.0" - lodash.isfunction: "npm:^3.0.9" - resolve-from: "npm:5.0.0" - resolve-global: "npm:1.0.0" - yargs: "npm:^17.0.0" - bin: - commitlint: cli.js - checksum: 10/163e4b9f7ff3ccd7e15efac6993924a72fe660979accc04c86ba5de813a6725095a087c172306d957d1f3fa21718499ab9caae9342f0bdfd854bf8bd47135dd7 - languageName: node - linkType: hard - -"@commitlint/config-conventional@npm:17.7.0": - version: 17.7.0 - resolution: "@commitlint/config-conventional@npm:17.7.0" - dependencies: - conventional-changelog-conventionalcommits: "npm:^6.1.0" - checksum: 10/932cf35c12855e360c750bc19ffedc0925f8658f316aaacdf5441ce775712934386643a9ac418f18e24e5bb1bf71ed721b8ae452a13d04908b0e55cd3d2d988f - languageName: node - linkType: hard - -"@commitlint/config-validator@npm:^17.6.7": - version: 17.6.7 - resolution: "@commitlint/config-validator@npm:17.6.7" - dependencies: - "@commitlint/types": "npm:^17.4.4" - ajv: "npm:^8.11.0" - checksum: 10/e13e512ce9dc788f7ce1c84faf4d2e2d4d3b7c4dc18a7982ecbfc33faa5fe977793efdb868e228061d34ea8825cbbed5fc9e8e69fd5e4f0c0c08f60e21a9214e - languageName: node - linkType: hard - -"@commitlint/ensure@npm:^17.6.7": - version: 17.6.7 - resolution: "@commitlint/ensure@npm:17.6.7" - dependencies: - "@commitlint/types": "npm:^17.4.4" - lodash.camelcase: "npm:^4.3.0" - lodash.kebabcase: "npm:^4.1.1" - lodash.snakecase: "npm:^4.1.1" - lodash.startcase: "npm:^4.4.0" - lodash.upperfirst: "npm:^4.3.1" - checksum: 10/1ffdce807dbb303e8fa215511a965375abeea2702f64b4f1c4d7823f1e231cb343e82c97633d12d3c89b4f71d2eaf28169db08b4f1d3b052c26c942f4b9d9380 - languageName: node - linkType: hard - -"@commitlint/execute-rule@npm:^17.4.0": - version: 17.4.0 - resolution: "@commitlint/execute-rule@npm:17.4.0" - checksum: 10/17d8e56ab00bd45fdecb0ed33186d2020ce261250d6a516204b6509610b75af8c930e7226b1111af3de298db32a7e4d0ba2c9cc7ed67db5ba5159eeed634f067 - languageName: node - linkType: hard - -"@commitlint/format@npm:^17.4.4": - version: 17.4.4 - resolution: "@commitlint/format@npm:17.4.4" - dependencies: - "@commitlint/types": "npm:^17.4.4" - chalk: "npm:^4.1.0" - checksum: 10/832d9641129f2da8d32389b4a47db59d41eb1adfab742723972cad64b833c4af9e253f96757b27664fedae61644dd4c01d21f775773b45b604bd7f93b23a27d2 - languageName: node - linkType: hard - -"@commitlint/is-ignored@npm:^17.7.0": - version: 17.7.0 - resolution: "@commitlint/is-ignored@npm:17.7.0" - dependencies: - "@commitlint/types": "npm:^17.4.4" - semver: "npm:7.5.4" - checksum: 10/aa0b695d6e7bee5e732f96a2ff383347ff476eb48f9d3b4ed75b098cafa27e56da15563833d3cf4e1268fc26819180cd8b5bdc322b087073a63bc94f699944b2 - languageName: node - linkType: hard - -"@commitlint/lint@npm:^17.7.0": - version: 17.7.0 - resolution: "@commitlint/lint@npm:17.7.0" - dependencies: - "@commitlint/is-ignored": "npm:^17.7.0" - "@commitlint/parse": "npm:^17.7.0" - "@commitlint/rules": "npm:^17.7.0" - "@commitlint/types": "npm:^17.4.4" - checksum: 10/922b644584a0e69e4d8fdde863b4d11d068d42cacaf7121f748041928aba5200154f16986ff512f83bef6f65855b0aff7c8e3e83457898614cc3ac5596e2a487 - languageName: node - linkType: hard - -"@commitlint/load@npm:^17.7.1": - version: 17.7.1 - resolution: "@commitlint/load@npm:17.7.1" - dependencies: - "@commitlint/config-validator": "npm:^17.6.7" - "@commitlint/execute-rule": "npm:^17.4.0" - "@commitlint/resolve-extends": "npm:^17.6.7" - "@commitlint/types": "npm:^17.4.4" - "@types/node": "npm:20.4.7" - chalk: "npm:^4.1.0" - cosmiconfig: "npm:^8.0.0" - cosmiconfig-typescript-loader: "npm:^4.0.0" - lodash.isplainobject: "npm:^4.0.6" - lodash.merge: "npm:^4.6.2" - lodash.uniq: "npm:^4.5.0" - resolve-from: "npm:^5.0.0" - ts-node: "npm:^10.8.1" - typescript: "npm:^4.6.4 || ^5.0.0" - checksum: 10/8d0e56b49a0e4dec7e8e28a2c6bc7ce985e6b8e10274aa20d0e3f6c2465fc9082d18f91bbe5c336594ebabcc4dc9668fdeaa039ef5bbfaf26ca0be423461ef61 - languageName: node - linkType: hard - -"@commitlint/message@npm:^17.4.2": - version: 17.4.2 - resolution: "@commitlint/message@npm:17.4.2" - checksum: 10/55b6cfeb57f7c9f913e18821aa4d972a6b6faa78c62741390996151f99554396f6df68ccfee86c163d24d8c27a4dbbcb50ef03c2972ab0a7a21d89daa2f9a519 - languageName: node - linkType: hard - -"@commitlint/parse@npm:^17.7.0": - version: 17.7.0 - resolution: "@commitlint/parse@npm:17.7.0" - dependencies: - "@commitlint/types": "npm:^17.4.4" - conventional-changelog-angular: "npm:^6.0.0" - conventional-commits-parser: "npm:^4.0.0" - checksum: 10/d70d53932576fa30c078099fe9ab00190298ed6aec696648633ab16eb80386e0c1b407c44eb7c548b598573c260ed1bfa890dd8134166d28811f66ed436efbea - languageName: node - linkType: hard - -"@commitlint/read@npm:^17.5.1": - version: 17.5.1 - resolution: "@commitlint/read@npm:17.5.1" - dependencies: - "@commitlint/top-level": "npm:^17.4.0" - "@commitlint/types": "npm:^17.4.4" - fs-extra: "npm:^11.0.0" - git-raw-commits: "npm:^2.0.11" - minimist: "npm:^1.2.6" - checksum: 10/62ee4f7a47b22a8571ae313bca36b418805a248f4986557f38f06317c44b6d18072889f95e7bc22bbb33a2f2b08236f74596ff28e3dbd0894249477a9df367c3 - languageName: node - linkType: hard - -"@commitlint/resolve-extends@npm:^17.6.7": - version: 17.6.7 - resolution: "@commitlint/resolve-extends@npm:17.6.7" - dependencies: - "@commitlint/config-validator": "npm:^17.6.7" - "@commitlint/types": "npm:^17.4.4" - import-fresh: "npm:^3.0.0" - lodash.mergewith: "npm:^4.6.2" - resolve-from: "npm:^5.0.0" - resolve-global: "npm:^1.0.0" - checksum: 10/3717b4ccef6e46136f8d4a4b8d78d57184b4331401db07e27f89acb049a3903035bb2b0dbd4c07e3cdcc402cbe693b365c244a0da3df47e0f74cbf3ba76be9ec - languageName: node - linkType: hard - -"@commitlint/rules@npm:^17.7.0": - version: 17.7.0 - resolution: "@commitlint/rules@npm:17.7.0" - dependencies: - "@commitlint/ensure": "npm:^17.6.7" - "@commitlint/message": "npm:^17.4.2" - "@commitlint/to-lines": "npm:^17.4.0" - "@commitlint/types": "npm:^17.4.4" - execa: "npm:^5.0.0" - checksum: 10/bc6af55cb8fab82baac450f87e02fa51d91f44855aadced92d74d05f9af99ccfd90b08c67355b53ca6b4b45f386854bcf52e1a4e5bc003665f4873e785eb7c70 - languageName: node - linkType: hard - -"@commitlint/to-lines@npm:^17.4.0": - version: 17.4.0 - resolution: "@commitlint/to-lines@npm:17.4.0" - checksum: 10/841f90f606238e145ab4ba02940662d511fc04fe553619900152a8542170fe664031b95d820ffaeb8864d4851344278e662ef29637d763fc19fd828e0f8d139b - languageName: node - linkType: hard - -"@commitlint/top-level@npm:^17.4.0": - version: 17.4.0 - resolution: "@commitlint/top-level@npm:17.4.0" - dependencies: - find-up: "npm:^5.0.0" - checksum: 10/14cd77e982d2dd7989718dafdbf7a2168a5fb387005e0686c2dfa9ffc36bb9a749e5d80a151884459e4d8c88564339688dca26e9c711abe043beeb3f30c3dfd6 - languageName: node - linkType: hard - -"@commitlint/types@npm:^17.4.4": - version: 17.4.4 - resolution: "@commitlint/types@npm:17.4.4" - dependencies: - chalk: "npm:^4.1.0" - checksum: 10/03c52429052d161710896d198000196bd2e60be0fd71459b22133dd83dee43e8d05ea8ee703c8369823bc40f77a54881b80d8aa4368ac52aea7f30fb234b73d2 - languageName: node - linkType: hard - -"@connectrpc/connect-express@npm:1.4.0": - version: 1.4.0 - resolution: "@connectrpc/connect-express@npm:1.4.0" - dependencies: - "@types/express": "npm:^4.17.18" - peerDependencies: - "@bufbuild/protobuf": ^1.4.2 - "@connectrpc/connect": 1.4.0 - "@connectrpc/connect-node": 1.4.0 - checksum: 10/0df491302a0377eb736b7d78f67c88bb5443dde5cf0d3632274f3e5b0c87898068dae0fd3cff32407ead0660421d7e834d8e5438e404e878d747ff4113562e4b - languageName: node - linkType: hard - -"@connectrpc/connect-fastify@npm:1.4.0": - version: 1.4.0 - resolution: "@connectrpc/connect-fastify@npm:1.4.0" - peerDependencies: - "@bufbuild/protobuf": ^1.4.2 - "@connectrpc/connect": 1.4.0 - "@connectrpc/connect-node": 1.4.0 - fastify: ^4.22.1 - checksum: 10/043ee56ef2d2a5bac271c0ea6f553fc218f0c1bc2d0f54a94b2286191ac5b4025e50a9356d865825534b3e9483e647074e62a94c62dedb55b78253fd0c57f6ec - languageName: node - linkType: hard - -"@connectrpc/connect-node@npm:1.4.0": - version: 1.4.0 - resolution: "@connectrpc/connect-node@npm:1.4.0" - dependencies: - undici: "npm:^5.28.3" - peerDependencies: - "@bufbuild/protobuf": ^1.4.2 - "@connectrpc/connect": 1.4.0 - checksum: 10/3b0647b3f202222fafe42a95db72d5dd96acf2307238324158240bdad5af45b3c3851899e7ea33cbefd484c69ecd9d6759a52dd24f48b30c239c445069c5075e - languageName: node - linkType: hard - -"@connectrpc/connect-web@npm:1.4.0": - version: 1.4.0 - resolution: "@connectrpc/connect-web@npm:1.4.0" - peerDependencies: - "@bufbuild/protobuf": ^1.4.2 - "@connectrpc/connect": 1.4.0 - checksum: 10/9274918a1c351353d8e38cc931b36013189698553eb7211fc60eb03454c605eff63cc542eec359ebaca1d37edb7558f32fe8ab70ed36811912765e0ec37822db - languageName: node - linkType: hard - -"@connectrpc/connect@npm:1.4.0": - version: 1.4.0 - resolution: "@connectrpc/connect@npm:1.4.0" - peerDependencies: - "@bufbuild/protobuf": ^1.4.2 - checksum: 10/5e84fbba544f7e52533bdd0058caaa6d5c89903f522fbd9551c6bad0cd2fea2d3f14c7396696609d1787a5e2018054dd53db40b2d08c55975ff81334074eeeae - languageName: node - linkType: hard - -"@connectrpc/protoc-gen-connect-es@npm:1.4.0": - version: 1.4.0 - resolution: "@connectrpc/protoc-gen-connect-es@npm:1.4.0" - dependencies: - "@bufbuild/protobuf": "npm:^1.7.2" - "@bufbuild/protoplugin": "npm:^1.7.2" - peerDependencies: - "@bufbuild/protoc-gen-es": ^1.7.2 - "@connectrpc/connect": 1.4.0 - peerDependenciesMeta: - "@bufbuild/protoc-gen-es": - optional: true - "@connectrpc/connect": - optional: true - bin: - protoc-gen-connect-es: bin/protoc-gen-connect-es - checksum: 10/41aca6dd648857504595acb063e5061aa058f629b4939bb9941464f292915b4b40d63793e6567745517ec187d069b6110827f6649ecea203b1ca99de5efca4d9 - languageName: node - linkType: hard - -"@cspell/cspell-bundled-dicts@npm:8.10.4": - version: 8.10.4 - resolution: "@cspell/cspell-bundled-dicts@npm:8.10.4" - dependencies: - "@cspell/dict-ada": "npm:^4.0.2" - "@cspell/dict-aws": "npm:^4.0.2" - "@cspell/dict-bash": "npm:^4.1.3" - "@cspell/dict-companies": "npm:^3.1.2" - "@cspell/dict-cpp": "npm:^5.1.10" - "@cspell/dict-cryptocurrencies": "npm:^5.0.0" - "@cspell/dict-csharp": "npm:^4.0.2" - "@cspell/dict-css": "npm:^4.0.12" - "@cspell/dict-dart": "npm:^2.0.3" - "@cspell/dict-django": "npm:^4.1.0" - "@cspell/dict-docker": "npm:^1.1.7" - "@cspell/dict-dotnet": "npm:^5.0.2" - "@cspell/dict-elixir": "npm:^4.0.3" - "@cspell/dict-en-common-misspellings": "npm:^2.0.3" - "@cspell/dict-en-gb": "npm:1.1.33" - "@cspell/dict-en_us": "npm:^4.3.23" - "@cspell/dict-filetypes": "npm:^3.0.4" - "@cspell/dict-fonts": "npm:^4.0.0" - "@cspell/dict-fsharp": "npm:^1.0.1" - "@cspell/dict-fullstack": "npm:^3.1.8" - "@cspell/dict-gaming-terms": "npm:^1.0.5" - "@cspell/dict-git": "npm:^3.0.0" - "@cspell/dict-golang": "npm:^6.0.9" - "@cspell/dict-google": "npm:^1.0.1" - "@cspell/dict-haskell": "npm:^4.0.1" - "@cspell/dict-html": "npm:^4.0.5" - "@cspell/dict-html-symbol-entities": "npm:^4.0.0" - "@cspell/dict-java": "npm:^5.0.7" - "@cspell/dict-julia": "npm:^1.0.1" - "@cspell/dict-k8s": "npm:^1.0.5" - "@cspell/dict-latex": "npm:^4.0.0" - "@cspell/dict-lorem-ipsum": "npm:^4.0.0" - "@cspell/dict-lua": "npm:^4.0.3" - "@cspell/dict-makefile": "npm:^1.0.0" - "@cspell/dict-monkeyc": "npm:^1.0.6" - "@cspell/dict-node": "npm:^5.0.1" - "@cspell/dict-npm": "npm:^5.0.16" - "@cspell/dict-php": "npm:^4.0.8" - "@cspell/dict-powershell": "npm:^5.0.4" - "@cspell/dict-public-licenses": "npm:^2.0.7" - "@cspell/dict-python": "npm:^4.2.1" - "@cspell/dict-r": "npm:^2.0.1" - "@cspell/dict-ruby": "npm:^5.0.2" - "@cspell/dict-rust": "npm:^4.0.4" - "@cspell/dict-scala": "npm:^5.0.2" - "@cspell/dict-software-terms": "npm:^3.4.9" - "@cspell/dict-sql": "npm:^2.1.3" - "@cspell/dict-svelte": "npm:^1.0.2" - "@cspell/dict-swift": "npm:^2.0.1" - "@cspell/dict-terraform": "npm:^1.0.0" - "@cspell/dict-typescript": "npm:^3.1.5" - "@cspell/dict-vue": "npm:^3.0.0" - checksum: 10/c2cc2171e64f759ecc5fe38b31508d99cf38a2ce35e589c6b6027efe0cb83f3b10130d82fafbd0dc26f7f163de3e4ec0981dbc8eded039bd8a2965a12efb88e5 - languageName: node - linkType: hard - -"@cspell/cspell-json-reporter@npm:8.10.4": - version: 8.10.4 - resolution: "@cspell/cspell-json-reporter@npm:8.10.4" - dependencies: - "@cspell/cspell-types": "npm:8.10.4" - checksum: 10/4eba16203c021f5e118907996958e57c2f930fb33557b7960bb372f59f377611be4b6564072e1d8dc001872186ecd7d48ede84a000b20707d05a1bb3e8a7bed6 - languageName: node - linkType: hard - -"@cspell/cspell-pipe@npm:8.10.4": - version: 8.10.4 - resolution: "@cspell/cspell-pipe@npm:8.10.4" - checksum: 10/06602031930827f751acf6b24bf9229b78abd2c524036123cc628288c0a0023ac927ef03709aaf01335af45235bb85e6d725bc2eca8f13e92a109f5174131ad2 - languageName: node - linkType: hard - -"@cspell/cspell-resolver@npm:8.10.4": - version: 8.10.4 - resolution: "@cspell/cspell-resolver@npm:8.10.4" - dependencies: - global-directory: "npm:^4.0.1" - checksum: 10/80ec4da36bc58f48b5ef9453cf9a2b42169869f8c63b9b253af1bd62138d3130c8a13f040f4fd97564bd51a9555a5aa0ee723ed63c371d177a26f0befa614910 - languageName: node - linkType: hard - -"@cspell/cspell-service-bus@npm:8.10.4": - version: 8.10.4 - resolution: "@cspell/cspell-service-bus@npm:8.10.4" - checksum: 10/f0a9759605e920eef5ca41ef11a41b477d823b6d8b8df2b4360b950a6da7e418285af60e8f7158f4e4f6f342f44891d82b6fd4f98726947332f0935e30b9db18 - languageName: node - linkType: hard - -"@cspell/cspell-types@npm:8.10.4": - version: 8.10.4 - resolution: "@cspell/cspell-types@npm:8.10.4" - checksum: 10/b5f5ca7e64e01c21f37b7b7d68135d8fad42dc90da3f1e590b84dc8c0f29fb3506b67f3d17f9da047134004d401d4c18eaa2e0509004cac13a4ed7d53d17c056 - languageName: node - linkType: hard - -"@cspell/dict-ada@npm:^4.0.2": - version: 4.0.2 - resolution: "@cspell/dict-ada@npm:4.0.2" - checksum: 10/31b0f0f6b9b324e8d3be4074302ddc9a7e968833d79c0a9f7899de9138b386bd6dcad3f63afdb1d42e87838bba5881c7b7f2b0916621fb1e64c7fdb6a572afe5 - languageName: node - linkType: hard - -"@cspell/dict-aws@npm:^4.0.2": - version: 4.0.2 - resolution: "@cspell/dict-aws@npm:4.0.2" - checksum: 10/7f784f0a054f4d142a22e94d411d6383b5bbba8b1d77952d45664a3bf35626926a0b8057293663287e6c53655c7dd32c6348905ecceb2970056e1cc5cf962e11 - languageName: node - linkType: hard - -"@cspell/dict-bash@npm:^4.1.3": - version: 4.1.3 - resolution: "@cspell/dict-bash@npm:4.1.3" - checksum: 10/4ba66c76c144d4c7ea1dd0fb92dfb0d7fd1e43a106a73fc7e9010b4a5c276aa4ef791c7161f56bf911356e3667ba043ee63271c1ffc485d9f8712553770e3ea9 - languageName: node - linkType: hard - -"@cspell/dict-companies@npm:^3.1.2": - version: 3.1.2 - resolution: "@cspell/dict-companies@npm:3.1.2" - checksum: 10/58a95faba7cf7397530064ab9fc29aea0b5a95c5d4c31abd2abd0537f344705c71112a50ae61a1c026078dd1ca2e4433164eee1761cd05bfae4b25a75161ba4f - languageName: node - linkType: hard - -"@cspell/dict-cpp@npm:^5.1.10": - version: 5.1.10 - resolution: "@cspell/dict-cpp@npm:5.1.10" - checksum: 10/ba8727af8ab3ac18f0ba030f043378bb6c951d819b7fba0114ca9377271752d04c1b3b6dfe4f9384fc35069ab7ff671313bc681a06345ef6625be7ca7fc37132 - languageName: node - linkType: hard - -"@cspell/dict-cryptocurrencies@npm:^5.0.0": - version: 5.0.0 - resolution: "@cspell/dict-cryptocurrencies@npm:5.0.0" - checksum: 10/116e7f117b59ea4c9fa7ae1c3b47fc963e050448d43e059fb93731a256881ee262420edd5b9701ffe88af3d5e95b0337fc99b4dde1b0283ee0aaed45b23e281e - languageName: node - linkType: hard - -"@cspell/dict-csharp@npm:^4.0.2": - version: 4.0.2 - resolution: "@cspell/dict-csharp@npm:4.0.2" - checksum: 10/d2ecb2aada51c5f0d6d557fd4f0c6eddb5b299e0955e066c49cd2afe96a1c6fe0afde699fdb885dd3183603a1efbd1d793b6a490b8d039256445b4b154b7375b - languageName: node - linkType: hard - -"@cspell/dict-css@npm:^4.0.12": - version: 4.0.12 - resolution: "@cspell/dict-css@npm:4.0.12" - checksum: 10/da812243c92ef07082334d512561606f178e003fa50324332c322655fab0982ed1bea055d75a348b37cea71fbe652224dcfff14dc445d26530cfa3c491b2b324 - languageName: node - linkType: hard - -"@cspell/dict-dart@npm:^2.0.3": - version: 2.0.3 - resolution: "@cspell/dict-dart@npm:2.0.3" - checksum: 10/66bfcfa029baacd0b14b3ff5b6ab7597cf9459f77185d88b25123b42a4babb66df6786806843f1b6506c335326100599a2e1db6e6104e66bd021ede9ccb3cec4 - languageName: node - linkType: hard - -"@cspell/dict-data-science@npm:^2.0.1": - version: 2.0.1 - resolution: "@cspell/dict-data-science@npm:2.0.1" - checksum: 10/1ae8e71161a02e8ee1bfed86bc815b81ae3eaeb9476fea4bc3c41556c525657123bac85fc2789bdbe18e444f9629fe8a1e69fd78a99f89b42edfa3211098a588 - languageName: node - linkType: hard - -"@cspell/dict-django@npm:^4.1.0": - version: 4.1.0 - resolution: "@cspell/dict-django@npm:4.1.0" - checksum: 10/d64b830ab761f3610ca5eb81b06447c91a64b988bc3e40bac214fc611de498fa019e1cd76f6f21254ad2d3bfaeb3d10248481f0a02711d6a3ed715df062b2ba6 - languageName: node - linkType: hard - -"@cspell/dict-docker@npm:^1.1.7": - version: 1.1.7 - resolution: "@cspell/dict-docker@npm:1.1.7" - checksum: 10/307f8b5132edca7cd291ba0ab6ed88f8787df984d6a42401b12a0da1ecb935d50af3a108ede885ce5bede96c445acdc88bb9ea8396de151c565a90a3bf66853e - languageName: node - linkType: hard - -"@cspell/dict-dotnet@npm:^5.0.2": - version: 5.0.2 - resolution: "@cspell/dict-dotnet@npm:5.0.2" - checksum: 10/319c6ed2793ad9f5ab01b2a7a3fa7280edd762714ff109dfafc24b397bc7ba7e8917cf8c68dd2d124eb11a7b7f60e677b1fd36d3610733b3f32668f966902ebd - languageName: node - linkType: hard - -"@cspell/dict-elixir@npm:^4.0.3": - version: 4.0.3 - resolution: "@cspell/dict-elixir@npm:4.0.3" - checksum: 10/f084449b2de5a2fa08076ac699c6073beaa4bb43796a662d681ea8fe5cba31f9efe718f3f98ef432ba75d4ea574316de34ab8422f79f4f2022cfddee7a7b8653 - languageName: node - linkType: hard - -"@cspell/dict-en-common-misspellings@npm:^2.0.3": - version: 2.0.3 - resolution: "@cspell/dict-en-common-misspellings@npm:2.0.3" - checksum: 10/8ea5f6843635089a82f135ca4302b8ed0c208254cda83b56fa72a72a30ee983452a1abaf003f5ccf76a8f1faf9596da91dfe4441f2bbd00145b305a2e501311e - languageName: node - linkType: hard - -"@cspell/dict-en-gb@npm:1.1.33": - version: 1.1.33 - resolution: "@cspell/dict-en-gb@npm:1.1.33" - checksum: 10/72db891c955ce9b24ba756c1baad41e92854a85fe326699f9ab328358b02a76d57b65d26d02afa050c4f96668a51c1dab6fce7eaad51c70c113588bbc2b46756 - languageName: node - linkType: hard - -"@cspell/dict-en_us@npm:^4.3.23": - version: 4.3.23 - resolution: "@cspell/dict-en_us@npm:4.3.23" - checksum: 10/d1c9a5b599ab13a9fe572b240e473b87945bd95ffbe9d39b66da2938b3902dc84448a1ce120c99b22bdcad0e0547523f1d92f027ea38ed8d5902441bbb0c0c53 - languageName: node - linkType: hard - -"@cspell/dict-filetypes@npm:^3.0.4": - version: 3.0.4 - resolution: "@cspell/dict-filetypes@npm:3.0.4" - checksum: 10/d5e8e46f9caf40c895326c7557f42c0648458717f79d9f41f145170dbe36ec9e21dea322117a92a6a904385dfb3efd0dd63a349edf705c6cc4255861f8b97cce - languageName: node - linkType: hard - -"@cspell/dict-fonts@npm:^4.0.0": - version: 4.0.0 - resolution: "@cspell/dict-fonts@npm:4.0.0" - checksum: 10/894a31f3df8e3a43a3dcf13e1706eb94cb5e83bd6d2aa26b0e9fc79c2de304eb5e9118eec4dff6a673e2a3243c842ca694c8e0f3c0ad78301004f983acf53832 - languageName: node - linkType: hard - -"@cspell/dict-fsharp@npm:^1.0.1": - version: 1.0.1 - resolution: "@cspell/dict-fsharp@npm:1.0.1" - checksum: 10/ce0df20704bf95d1fe434d2889cc764279cbce2b057fc5247be1ccaf7a8cc57372de3da2cdab6643b3df5221119716929b2e2aaad3f60533dcf0bd3c7d892fab - languageName: node - linkType: hard - -"@cspell/dict-fullstack@npm:^3.1.8": - version: 3.1.8 - resolution: "@cspell/dict-fullstack@npm:3.1.8" - checksum: 10/c0f178e751f0e4779600749d5f77e313e33362ba6d4737d3969f64ca272200bb8cc94dd10cccc18de58e60223b46a39247c5e4ca1d5eda768a1d08c1725fb9e7 - languageName: node - linkType: hard - -"@cspell/dict-gaming-terms@npm:^1.0.5": - version: 1.0.5 - resolution: "@cspell/dict-gaming-terms@npm:1.0.5" - checksum: 10/25d50653ed5e940f9302cc5536c37a20854bb274dec9302d73c5349e51ec623d33d99e4fe283e3b30e70f452063361fbc4cae7dc603232fa82004262f37d0f50 - languageName: node - linkType: hard - -"@cspell/dict-git@npm:^3.0.0": - version: 3.0.0 - resolution: "@cspell/dict-git@npm:3.0.0" - checksum: 10/97b6da58c93108bae0867515f790d84728f0bce580cc8ad6f0f5f63b2c81eaf6d084d543d99b693ff4d7fbea2413ff068c3e4811fc107820d243da2c06d381fa - languageName: node - linkType: hard - -"@cspell/dict-golang@npm:^6.0.9": - version: 6.0.9 - resolution: "@cspell/dict-golang@npm:6.0.9" - checksum: 10/4ce7fc8f1a925eb3c4a2a2a2ae4d75be79e698d2f6cd90ff549892705687011a190b9aabc8bb5c2c7616d24f42a3264121ad8ae056a844937984d301fa7cd90f - languageName: node - linkType: hard - -"@cspell/dict-google@npm:^1.0.1": - version: 1.0.1 - resolution: "@cspell/dict-google@npm:1.0.1" - checksum: 10/4e2975c76e661884defdce928847f6babd3e0e296867540cf37ca56623854f97f74e225d668116b904d572574915c8c723f17171f1d00847bb877e1eae375e7d - languageName: node - linkType: hard - -"@cspell/dict-haskell@npm:^4.0.1": - version: 4.0.1 - resolution: "@cspell/dict-haskell@npm:4.0.1" - checksum: 10/cfb51e415b60c5eb266a5782d0a4b19a37f1389b9b018d1bbb2ff4358bd739af1f76f68f26a138d4b4bd0ab67146d6eb9032fc3d3c212695237c134e05339c79 - languageName: node - linkType: hard - -"@cspell/dict-html-symbol-entities@npm:^4.0.0": - version: 4.0.0 - resolution: "@cspell/dict-html-symbol-entities@npm:4.0.0" - checksum: 10/79f05f9080f39dbde703980eb587ed6624b8fc2f5cedc297327bc1b9b7e6022a7c382e6013149b1afe00609b96003ab5c8d18d378979f76f336ab626317183f4 - languageName: node - linkType: hard - -"@cspell/dict-html@npm:^4.0.5": - version: 4.0.5 - resolution: "@cspell/dict-html@npm:4.0.5" - checksum: 10/8801b7f77910f6a269efc652c88ecc3299cabedec03566ad6fb661845fdf9a4950bd7a2cdd1216dde982eddc9caf9ec00c6917ac90707fabb7686d02b30b0a5c - languageName: node - linkType: hard - -"@cspell/dict-java@npm:^5.0.7": - version: 5.0.7 - resolution: "@cspell/dict-java@npm:5.0.7" - checksum: 10/c33b5e69c7eb03d6416a5a9a6971e69374167967a380dbc91062d8143e249c9595fcc26f9163112ff36d3b8dbca23eed2025b48e086c622eb6bb450f755087ef - languageName: node - linkType: hard - -"@cspell/dict-julia@npm:^1.0.1": - version: 1.0.1 - resolution: "@cspell/dict-julia@npm:1.0.1" - checksum: 10/4cce630dddb7579b3750875af43f40fb4e6019fe6ab30791b160b71a677c17e2c6e227d54555193255b43dd08a1f1fab500a82012d9831ccca923c4f8791b976 - languageName: node - linkType: hard - -"@cspell/dict-k8s@npm:^1.0.5": - version: 1.0.5 - resolution: "@cspell/dict-k8s@npm:1.0.5" - checksum: 10/d7a251e44412ff7d337dabe20deedd5bb9553e2825f81a7c01788aa80dbae99a24c57cc6f686d9a249bcfbd0436248d1814b8c786425a3b20a7e189b1019775f - languageName: node - linkType: hard - -"@cspell/dict-latex@npm:^4.0.0": - version: 4.0.0 - resolution: "@cspell/dict-latex@npm:4.0.0" - checksum: 10/7e7a520196d143d0a3185689d09d84bf1e23b5328dfc78187c4e4ab264bd49c3dd695eb92f8d582583e5bc26bcab4ed0976b310b56a000af81d88a7acdea7f8c - languageName: node - linkType: hard - -"@cspell/dict-lorem-ipsum@npm:^4.0.0": - version: 4.0.0 - resolution: "@cspell/dict-lorem-ipsum@npm:4.0.0" - checksum: 10/d3575fb7b9684480192d2cd647484312c555f3d1215d6b35371b70de3ecde4273010e5916cc2d130ff1e1223a1a49f75825651671a76d3dabdec98acf67a3902 - languageName: node - linkType: hard - -"@cspell/dict-lua@npm:^4.0.3": - version: 4.0.3 - resolution: "@cspell/dict-lua@npm:4.0.3" - checksum: 10/eee20135a4f0620302c5feeb50485f59af93c24b64eb2081a9e2096a106ce33ae565d6d92607582b44c9f17c8a091d82fbcb443ebae9b77f8512b0d66a703c3b - languageName: node - linkType: hard - -"@cspell/dict-makefile@npm:^1.0.0": - version: 1.0.0 - resolution: "@cspell/dict-makefile@npm:1.0.0" - checksum: 10/f0cac4caf31e27accd5df5e0c2f53097cccbbd085126c4b4ecc08be2a32bd7f89fe6b052e9eae4ec99843175cafa94561868271fb53c5389f27cc078565b5123 - languageName: node - linkType: hard - -"@cspell/dict-monkeyc@npm:^1.0.6": - version: 1.0.6 - resolution: "@cspell/dict-monkeyc@npm:1.0.6" - checksum: 10/3d174203af5c12e515e0bdcc7b43a75cc8f5ef097db65249773f386e063febbfe6a47c39414fc52e0970e7dde1f0b32bc5fc0e586761f1e0cd082f1bce0e7572 - languageName: node - linkType: hard - -"@cspell/dict-node@npm:^5.0.1": - version: 5.0.1 - resolution: "@cspell/dict-node@npm:5.0.1" - checksum: 10/553d09eb7a0ec6eb1d5be85b7fb34fb88c9f87712708982a289f67157068a5e69e0e7e46321c17c9d9c2e57d1e442399fa0f96bc2916221eddcc6519c96b0105 - languageName: node - linkType: hard - -"@cspell/dict-npm@npm:^5.0.16": - version: 5.0.16 - resolution: "@cspell/dict-npm@npm:5.0.16" - checksum: 10/ec77d0e297e6a50b1889a15332771c6605997bb1c4a8d9f0528ded69ea993fae449f303f4bca04c4cd56c24ad4151feb67b64cfade58aa21c81d80e1b0474b32 - languageName: node - linkType: hard - -"@cspell/dict-php@npm:^4.0.8": - version: 4.0.8 - resolution: "@cspell/dict-php@npm:4.0.8" - checksum: 10/245c46db2d387044b9d9cfa6de4eb46b5a8cbbb33a0875c171c75230db599af5d8592165a618c849e99610f2c173564a6867c5475a2dbc5bbdea437bcb2b569b - languageName: node - linkType: hard - -"@cspell/dict-powershell@npm:^5.0.4": - version: 5.0.4 - resolution: "@cspell/dict-powershell@npm:5.0.4" - checksum: 10/13aa687130db6330a86f7b9cd1f7be9046ac3102aa96be9c71e130639fc3eff9b0a1ad45914bcaa497af2d628e2d3bc8babf02d6b657fd18d88fddc412ec4fec - languageName: node - linkType: hard - -"@cspell/dict-public-licenses@npm:^2.0.7": - version: 2.0.7 - resolution: "@cspell/dict-public-licenses@npm:2.0.7" - checksum: 10/7bbd067668499c45bad9eb8e3dae598bc5635e6035160bff7343b87cd31e419387e704fa290d0e23903fff6c80b65838ebe5638e2951dc5d9214df9b98b60ce2 - languageName: node - linkType: hard - -"@cspell/dict-python@npm:^4.2.1": - version: 4.2.1 - resolution: "@cspell/dict-python@npm:4.2.1" - dependencies: - "@cspell/dict-data-science": "npm:^2.0.1" - checksum: 10/f0941bcfd518a3c63c68d8ed08304b98142e90e3b445b12ab4b13ce23508b573e323f4a5136bde2cd610f99814963e119b8b06c0d91fc5808e1a7c29a804cce4 - languageName: node - linkType: hard - -"@cspell/dict-r@npm:^2.0.1": - version: 2.0.1 - resolution: "@cspell/dict-r@npm:2.0.1" - checksum: 10/fe85939ad4c8ada34284a673918be711cca60b6d6f1c48ee98602c27905228dfbaea3462a350094633032c1d6b6bba9548df7019e0b21673cf1cf887c57ca228 - languageName: node - linkType: hard - -"@cspell/dict-ruby@npm:^5.0.2": - version: 5.0.2 - resolution: "@cspell/dict-ruby@npm:5.0.2" - checksum: 10/c2006bcc808448b1eef146eb4b6b74388113c50334206191a9fe5817fb13669482ecd114f7bbd397562ad2e19a9683266ff396f48c6ce282f6445c2cfa8e82c7 - languageName: node - linkType: hard - -"@cspell/dict-rust@npm:^4.0.4": - version: 4.0.4 - resolution: "@cspell/dict-rust@npm:4.0.4" - checksum: 10/7ff86c4f172bf039ff1264f4736d9638d0792ab39ff5fc48812831241d622040f6591a3d9f630325537b0a4913e242bea14005ec3d2e3c167f933fe1416e0caa - languageName: node - linkType: hard - -"@cspell/dict-scala@npm:^5.0.2": - version: 5.0.2 - resolution: "@cspell/dict-scala@npm:5.0.2" - checksum: 10/c07bda723929f8b01ae0575af3d05ffffee9ed7523e0658a22d533cf287dd564d11bf16062a1692fb06c3aff2d519d07c7c2c3e5662ced8af1194b31b352af51 - languageName: node - linkType: hard - -"@cspell/dict-software-terms@npm:^3.4.9": - version: 3.4.9 - resolution: "@cspell/dict-software-terms@npm:3.4.9" - checksum: 10/2fc21d7fefbd0269b760d2f634b22d6e54bd71dd3c03d96b59931fd1ef0c7380b6596e578621f907823eb8423bbdd297f56d8eaa150f2bbb23ed0559656c7523 - languageName: node - linkType: hard - -"@cspell/dict-sql@npm:^2.1.3": - version: 2.1.3 - resolution: "@cspell/dict-sql@npm:2.1.3" - checksum: 10/a435812cc697d4c453f11efa49962992150702518e49808381ea34548b8a8ed81432a10cca36682007912b013c28e9ce3c6c183341c6cde58c8af0eef25cddc3 - languageName: node - linkType: hard - -"@cspell/dict-svelte@npm:^1.0.2": - version: 1.0.2 - resolution: "@cspell/dict-svelte@npm:1.0.2" - checksum: 10/5b42989bc6743a26ca5172cc23ebc1449d930695b10c908376048ce1835bf57fef7a0004f02ec5e43219f24a97f154e125041df470441199a045ed0be9e654fc - languageName: node - linkType: hard - -"@cspell/dict-swift@npm:^2.0.1": - version: 2.0.1 - resolution: "@cspell/dict-swift@npm:2.0.1" - checksum: 10/0bbb106266205c5f5e12886a73ebf0db2078bab1bdd2e1f304fe28445cd72d847a4c5072bf4fe8f9e8cdb4bc69d52fffec0806aea19ea9b64b7a87c67ee01175 - languageName: node - linkType: hard - -"@cspell/dict-terraform@npm:^1.0.0": - version: 1.0.0 - resolution: "@cspell/dict-terraform@npm:1.0.0" - checksum: 10/132b8f0532aa5a6a08fa57487313722bc10ad37a4b94a5d76b072922eb4eb56d204a3e33c1569613af5b337bd125b8e2d30cae6bf5400a07fa58c551c7fe3b37 - languageName: node - linkType: hard - -"@cspell/dict-typescript@npm:^3.1.5": - version: 3.1.5 - resolution: "@cspell/dict-typescript@npm:3.1.5" - checksum: 10/9e99aa7c849133fcab6d16864045b512be3f0b89c76caf31234fcc6edf818e06e2af4087f576e5837e209dc0bdc1d1379d6752bac48aab517e0661c0e4eeff58 - languageName: node - linkType: hard - -"@cspell/dict-vue@npm:^3.0.0": - version: 3.0.0 - resolution: "@cspell/dict-vue@npm:3.0.0" - checksum: 10/4db58b1d6f9be1a523a35678877f2cca2bb04548b136ec5ec4e7186500978dbc32cc8747ced80ade3cad3acc3c80eb23afe980679165810f8f8f26802e952e2f - languageName: node - linkType: hard - -"@cspell/dynamic-import@npm:8.10.4": - version: 8.10.4 - resolution: "@cspell/dynamic-import@npm:8.10.4" - dependencies: - import-meta-resolve: "npm:^4.1.0" - checksum: 10/d07b83c990a0ff4a645df5ea45a7aa9eb6a948a16132382a2b3aafe470094892b90d53bb81cad336d5df27cd7f6a30c0c4289327825e05fcb26556a59ae91b15 - languageName: node - linkType: hard - -"@cspell/strong-weak-map@npm:8.10.4": - version: 8.10.4 - resolution: "@cspell/strong-weak-map@npm:8.10.4" - checksum: 10/3249a3584b38c0079ac3b245c419b99ba65dfede461c81b3a14747107d20760c1b2b7f912e5cba220bdd7c9d5f2756b8bb977f05e33f3674f91d98fc604d12c5 - languageName: node - linkType: hard - -"@cspell/url@npm:8.10.4": - version: 8.10.4 - resolution: "@cspell/url@npm:8.10.4" - checksum: 10/d288407f2b623502302afe76a17279d414b87d1c8523d37c5ebac780cf30706fc9eaceaa8f07ac3ca0ceae2ad5ec3eb0d533349c14bb92aad4d5163ff812a7a4 - languageName: node - linkType: hard - -"@cspotcode/source-map-consumer@npm:0.8.0": - version: 0.8.0 - resolution: "@cspotcode/source-map-consumer@npm:0.8.0" - checksum: 10/dfe1399712e4d54e1d53b0c7782f929647ff8675c37ae7637ce2ffdbcc8bad06fea969bcbec6147e7ea70a89257cfc86695a3702c1946a1c334454480937b966 - languageName: node - linkType: hard - -"@cspotcode/source-map-support@npm:0.7.0": - version: 0.7.0 - resolution: "@cspotcode/source-map-support@npm:0.7.0" - dependencies: - "@cspotcode/source-map-consumer": "npm:0.8.0" - checksum: 10/d58b31640c4b1438c0caf8ed7eb46647674c042a625919660d9fb2d76f3621875520082934bae88ef54a75d53e8f9cafb506160bb02403a19e7155aa5f4ac59b - languageName: node - linkType: hard - -"@cspotcode/source-map-support@npm:^0.8.0": - version: 0.8.1 - resolution: "@cspotcode/source-map-support@npm:0.8.1" - dependencies: - "@jridgewell/trace-mapping": "npm:0.3.9" - checksum: 10/b6e38a1712fab242c86a241c229cf562195aad985d0564bd352ac404be583029e89e93028ffd2c251d2c407ecac5fb0cbdca94a2d5c10f29ac806ede0508b3ff - languageName: node - linkType: hard - -"@csstools/normalize.css@npm:*": - version: 12.0.0 - resolution: "@csstools/normalize.css@npm:12.0.0" - checksum: 10/d3c3ebeba561da21e2fc62425356dc3d9cc976f23f258d7c8d40343b97385ee243c0688effce6fd37ab4b8ef59793e1d3447749b3b1c9f500df7dfb87a1b4e24 - languageName: node - linkType: hard - -"@csstools/postcss-cascade-layers@npm:^1.1.1": - version: 1.1.1 - resolution: "@csstools/postcss-cascade-layers@npm:1.1.1" - dependencies: - "@csstools/selector-specificity": "npm:^2.0.2" - postcss-selector-parser: "npm:^6.0.10" - peerDependencies: - postcss: ^8.2 - checksum: 10/9e8172402ed8d0ac5a2300eabb2120aa455f8a9911fe6530dc68d74accde32dfc458b80966bb549846d7ac09e21ec44da24ad74d1d2d89d90afe659d6b6f24de - languageName: node - linkType: hard - -"@csstools/postcss-color-function@npm:^1.1.1": - version: 1.1.1 - resolution: "@csstools/postcss-color-function@npm:1.1.1" - dependencies: - "@csstools/postcss-progressive-custom-properties": "npm:^1.1.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/82824ae7ef9664c97b066da9981e0fe9b1be9ae811f9f95bbfecd988f06d5e896b88d2b35c58f0629ddc56048569abfd56b47863276a991fba7447f252033bb0 - languageName: node - linkType: hard - -"@csstools/postcss-font-format-keywords@npm:^1.0.1": - version: 1.0.1 - resolution: "@csstools/postcss-font-format-keywords@npm:1.0.1" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/18af07bef7a92ea65572251cfe0ff483158aa0f43256d420a0a2e77eb19f84dca9b9ff0560beeaeef3bf07e62b1dba13582e425679fc72f73701cdf5b0d78845 - languageName: node - linkType: hard - -"@csstools/postcss-hwb-function@npm:^1.0.2": - version: 1.0.2 - resolution: "@csstools/postcss-hwb-function@npm:1.0.2" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/7dc8dc71924fcf2f61e55cbf83602f6d7c08f8f8a47c8a9fe0bdc2c71742e03ecaf5284a55afc4ea6ed646feb8a0a9cfaec4f31cc3b83c5ab0c3e99847aceab8 - languageName: node - linkType: hard - -"@csstools/postcss-ic-unit@npm:^1.0.1": - version: 1.0.1 - resolution: "@csstools/postcss-ic-unit@npm:1.0.1" - dependencies: - "@csstools/postcss-progressive-custom-properties": "npm:^1.1.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/e3bee4cdb258ff7471341fc0d814bab1d1e3ea061c13be64ef40b3be8576b75c855cf24ffd3967b3eeb435552d5910af5df35519705192e58309e440cacf02e5 - languageName: node - linkType: hard - -"@csstools/postcss-is-pseudo-class@npm:^2.0.7": - version: 2.0.7 - resolution: "@csstools/postcss-is-pseudo-class@npm:2.0.7" - dependencies: - "@csstools/selector-specificity": "npm:^2.0.0" - postcss-selector-parser: "npm:^6.0.10" - peerDependencies: - postcss: ^8.2 - checksum: 10/b6d509a63d3130dd1e1a7dacb9fef9e68a80e32eafce6e951f51808441821dad025a9b9209c6b9d331f373ee4977c25e1d305b036ee770d9e974cc1ad96df807 - languageName: node - linkType: hard - -"@csstools/postcss-nested-calc@npm:^1.0.0": - version: 1.0.0 - resolution: "@csstools/postcss-nested-calc@npm:1.0.0" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/b02656b35dc2982649ba8a6318b6081e47f7c902c50c0c8d158b380c4b3d38d62018a02cc8863d85ba31e78eb4d0d06499735b8f847ddf24ceeff0e9308e8c83 - languageName: node - linkType: hard - -"@csstools/postcss-normalize-display-values@npm:^1.0.1": - version: 1.0.1 - resolution: "@csstools/postcss-normalize-display-values@npm:1.0.1" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/9ea1b199d377fa2feaf6cae303afc316ea51ef5c770811e277a5a5403cee486ade2d2393fa622e41c56222bf664a3740eb62221bb157af0f8c84d8aed55e3234 - languageName: node - linkType: hard - -"@csstools/postcss-oklab-function@npm:^1.1.1": - version: 1.1.1 - resolution: "@csstools/postcss-oklab-function@npm:1.1.1" - dependencies: - "@csstools/postcss-progressive-custom-properties": "npm:^1.1.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/3d0f923e10a9378658a640f46f50740041346469dd965787d20646aaee55168ca5ef81c679e39cdd07b918c9f107d4d47067cbb06008bac5ac7798d71c9a2a25 - languageName: node - linkType: hard - -"@csstools/postcss-progressive-custom-properties@npm:^1.1.0, @csstools/postcss-progressive-custom-properties@npm:^1.3.0": - version: 1.3.0 - resolution: "@csstools/postcss-progressive-custom-properties@npm:1.3.0" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.3 - checksum: 10/cc88ee26fa3b56434c38906ab13463c3510bab92b2c206c50fa6199266407942fdb035733869c75e75c6f43a48e3ef8a8538a605157d3a580ea4ef2bf93b3df7 - languageName: node - linkType: hard - -"@csstools/postcss-stepped-value-functions@npm:^1.0.1": - version: 1.0.1 - resolution: "@csstools/postcss-stepped-value-functions@npm:1.0.1" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/5dbc3cf9edcbc7a43309e6378eb6f2455c6748ef26b83a781a9c9c7df2b8bbb748f887de760a355c798b0e6f0f41d551a10e51ed7276b0de17f6fc4c2f7dbefb - languageName: node - linkType: hard - -"@csstools/postcss-text-decoration-shorthand@npm:^1.0.0": - version: 1.0.0 - resolution: "@csstools/postcss-text-decoration-shorthand@npm:1.0.0" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/2dc1394307fa8f9a8cea83f54f0df76a4f065b8364b572ce46221f47518b026c886f19334483c038f178e24004adcf3dbf36903cfa28112e17d932176cb2a21b - languageName: node - linkType: hard - -"@csstools/postcss-trigonometric-functions@npm:^1.0.2": - version: 1.0.2 - resolution: "@csstools/postcss-trigonometric-functions@npm:1.0.2" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/d971403ac69a12e5db31ab798e15be96aa9a06bcfbe20893ce40935da2bdea7c14de3522e2c050a457b6a428699711c0b717d396e05d5ff1d652f8beca0d5d48 - languageName: node - linkType: hard - -"@csstools/postcss-unset-value@npm:^1.0.2": - version: 1.0.2 - resolution: "@csstools/postcss-unset-value@npm:1.0.2" - peerDependencies: - postcss: ^8.2 - checksum: 10/58312dcb457b0f8c9bdcc45601e799da5270e09f6573041a00c50acff77089ceb2a33ed285990cd4a6d847677545a52cfd0919af26de9a40889c483a84df45d3 - languageName: node - linkType: hard - -"@csstools/selector-specificity@npm:^2.0.0, @csstools/selector-specificity@npm:^2.0.2": - version: 2.2.0 - resolution: "@csstools/selector-specificity@npm:2.2.0" - peerDependencies: - postcss-selector-parser: ^6.0.10 - checksum: 10/84ae0e902e8879d375406bd7d2e117b862e18cf8e5f82cecad62fcf729a8fc1527e2b3e2774b0e869a17e2006bd27ac5240f79220638183b273aeece97acd3f2 - languageName: node - linkType: hard - -"@dabh/diagnostics@npm:^2.0.2": - version: 2.0.3 - resolution: "@dabh/diagnostics@npm:2.0.3" - dependencies: - colorspace: "npm:1.1.x" - enabled: "npm:2.0.x" - kuler: "npm:^2.0.0" - checksum: 10/14e449a7f42f063f959b472f6ce02d16457a756e852a1910aaa831b63fc21d86f6c32b2a1aa98a4835b856548c926643b51062d241fb6e9b2b7117996053e6b9 - languageName: node - linkType: hard - -"@dependents/detective-less@npm:^4.1.0": - version: 4.1.0 - resolution: "@dependents/detective-less@npm:4.1.0" - dependencies: - gonzales-pe: "npm:^4.3.0" - node-source-walk: "npm:^6.0.1" - checksum: 10/5188bc4f0314ea2c7d6390c938904e91ba8aea15c7eb62f633e916db4d90af9e0cf27b6ab30e4b5bf60af9401433825d8d256076ef7ad258c9edb860f37fdb43 - languageName: node - linkType: hard - -"@digitalbazaar/security-context@npm:^1.0.0": - version: 1.0.1 - resolution: "@digitalbazaar/security-context@npm:1.0.1" - checksum: 10/f4ca23817fe774d59779c4d333dae579b8831a018abb0ee1269ad050a6971b830b64e0d796417476227bd125a033778d6b047bff080306a2fcd08de48f957bf3 - languageName: node - linkType: hard - -"@digitalcredentials/http-client@npm:^1.0.0": - version: 1.2.2 - resolution: "@digitalcredentials/http-client@npm:1.2.2" - dependencies: - ky: "npm:^0.25.1" - ky-universal: "npm:^0.8.2" - checksum: 10/67cc3d84afed403456d4da733af4f7da88f5b963204e15082fd30dfb2df9a7e2ea5086de692e131da4f5d02fa2cd8d0eaa8dbffc918ab3188a8f9e959ff4d6c9 - languageName: node - linkType: hard - -"@digitalcredentials/jsonld-signatures@npm:^9.3.1": - version: 9.3.2 - resolution: "@digitalcredentials/jsonld-signatures@npm:9.3.2" - dependencies: - "@digitalbazaar/security-context": "npm:^1.0.0" - "@digitalcredentials/jsonld": "npm:^6.0.0" - fast-text-encoding: "npm:^1.0.3" - isomorphic-webcrypto: "npm:^2.3.8" - serialize-error: "npm:^8.0.1" - checksum: 10/025b6146e3758c0a66c9f4364ea1ee6bc006021f5fa6bd83e6bae4389f5c3b2e52415b93a6846a7fecfb1df7b59291b8d66ed96125f98135f70803324a6d1eaf - languageName: node - linkType: hard - -"@digitalcredentials/jsonld@npm:^5.2.1": - version: 5.2.2 - resolution: "@digitalcredentials/jsonld@npm:5.2.2" - dependencies: - "@digitalcredentials/http-client": "npm:^1.0.0" - "@digitalcredentials/rdf-canonize": "npm:^1.0.0" - canonicalize: "npm:^1.0.1" - lru-cache: "npm:^6.0.0" - checksum: 10/d3ecafca13d271f59a5c2a6cd6b3e8c9f22f75fa669e12e7bda291f896d2cf89851aaf89974902bd86939b169bbe17f1b168c6f2b95e399217d26ca88506bbf4 - languageName: node - linkType: hard - -"@digitalcredentials/jsonld@npm:^6.0.0": - version: 6.0.0 - resolution: "@digitalcredentials/jsonld@npm:6.0.0" - dependencies: - "@digitalcredentials/http-client": "npm:^1.0.0" - "@digitalcredentials/rdf-canonize": "npm:^1.0.0" - canonicalize: "npm:^1.0.1" - lru-cache: "npm:^6.0.0" - checksum: 10/d13228e4a609ef6437189e8bfeedaff7e3c90bfb77a8dad68762f377f82586009e8abbe2144760708ae90a1c5303a64b262a1bb851154bc0126e1d3b5d0875ae - languageName: node - linkType: hard - -"@digitalcredentials/rdf-canonize@npm:^1.0.0": - version: 1.0.0 - resolution: "@digitalcredentials/rdf-canonize@npm:1.0.0" - dependencies: - fast-text-encoding: "npm:^1.0.3" - isomorphic-webcrypto: "npm:^2.3.8" - checksum: 10/05d35654a7aa7e9593fb2500b7c3b666ee089382b646dd5b46ed64159cc49d3b7dfffa763bbe5bd73b5daf2013f2d163fd71c07951da0d4774a7e9859ee26295 - languageName: node - linkType: hard - -"@digitalcredentials/vc@npm:^1.1.2": - version: 1.1.2 - resolution: "@digitalcredentials/vc@npm:1.1.2" - dependencies: - "@digitalcredentials/jsonld": "npm:^5.2.1" - "@digitalcredentials/jsonld-signatures": "npm:^9.3.1" - credentials-context: "npm:^2.0.0" - checksum: 10/dade4edcbd9c2454a5133fae47bb5a0a8018cb7f6374984a5157ffe57bcd552dc28b4c0f8faa3a43c2e3268859a18c54452589126472c119453ba878c8a3b1b1 - languageName: node - linkType: hard - -"@discoveryjs/json-ext@npm:0.5.7": - version: 0.5.7 - resolution: "@discoveryjs/json-ext@npm:0.5.7" - checksum: 10/b95682a852448e8ef50d6f8e3b7ba288aab3fd98a2bafbe46881a3db0c6e7248a2debe9e1ee0d4137c521e4743ca5bbcb1c0765c9d7b3e0ef53231506fec42b4 - languageName: node - linkType: hard - -"@discoveryjs/json-ext@npm:^0.5.0": - version: 0.5.6 - resolution: "@discoveryjs/json-ext@npm:0.5.6" - checksum: 10/61f84f6098f5ae31128e98ff0e9415d1af4c2b61fcfb01a23800e2863a0a2a08ddc187a2152d68b7f4dcff6982f60f4e684bddda1edbbc55775ba9af58ca160b - languageName: node - linkType: hard - -"@emotion/babel-plugin@npm:^11.11.0": - version: 11.11.0 - resolution: "@emotion/babel-plugin@npm:11.11.0" - dependencies: - "@babel/helper-module-imports": "npm:^7.16.7" - "@babel/runtime": "npm:^7.18.3" - "@emotion/hash": "npm:^0.9.1" - "@emotion/memoize": "npm:^0.8.1" - "@emotion/serialize": "npm:^1.1.2" - babel-plugin-macros: "npm:^3.1.0" - convert-source-map: "npm:^1.5.0" - escape-string-regexp: "npm:^4.0.0" - find-root: "npm:^1.1.0" - source-map: "npm:^0.5.7" - stylis: "npm:4.2.0" - checksum: 10/8de017666838fc06b1a961d7a49b4e6dc0c83dbb064ea33512bae056594f0811a87e3242ef90fa2aa49fc080fab1cc7af536e7aee9398eaca7a1fc020d2dd527 - languageName: node - linkType: hard - -"@emotion/cache@npm:^11.11.0": - version: 11.11.0 - resolution: "@emotion/cache@npm:11.11.0" - dependencies: - "@emotion/memoize": "npm:^0.8.1" - "@emotion/sheet": "npm:^1.2.2" - "@emotion/utils": "npm:^1.2.1" - "@emotion/weak-memoize": "npm:^0.3.1" - stylis: "npm:4.2.0" - checksum: 10/ef29756247dafb87168b4ffb76ee60feb06b8a1016323ecb1d3ba8aed3f4300ca10049bedbfe83aa11e0d81e616c328002a9d50020ebb3af6e4f5337a785c1fe - languageName: node - linkType: hard - -"@emotion/hash@npm:^0.9.1": - version: 0.9.1 - resolution: "@emotion/hash@npm:0.9.1" - checksum: 10/716e17e48bf9047bf9383982c071de49f2615310fb4e986738931776f5a823bc1f29c84501abe0d3df91a3803c80122d24e28b57351bca9e01356ebb33d89876 - languageName: node - linkType: hard - -"@emotion/is-prop-valid@npm:^1.2.1": - version: 1.2.1 - resolution: "@emotion/is-prop-valid@npm:1.2.1" - dependencies: - "@emotion/memoize": "npm:^0.8.1" - checksum: 10/fe231c472d38b3bbe519bcc9a5585cd41c45604147f3a065e333caf0f695d668aa21bc4229e657c1b6ea7398e096899e6ad54662548c73f11f6ba594aebd76a1 - languageName: node - linkType: hard - -"@emotion/is-prop-valid@npm:^1.2.2": - version: 1.2.2 - resolution: "@emotion/is-prop-valid@npm:1.2.2" - dependencies: - "@emotion/memoize": "npm:^0.8.1" - checksum: 10/0fa3960abfbe845d40cc230ab8c9408e1f33d3c03b321980359911c7212133cdcb0344d249e9dab23342b304567eece7a10ec44b986f7230e0640ba00049dceb - languageName: node - linkType: hard - -"@emotion/memoize@npm:^0.8.1": - version: 0.8.1 - resolution: "@emotion/memoize@npm:0.8.1" - checksum: 10/a19cc01a29fcc97514948eaab4dc34d8272e934466ed87c07f157887406bc318000c69ae6f813a9001c6a225364df04249842a50e692ef7a9873335fbcc141b0 - languageName: node - linkType: hard - -"@emotion/react@npm:11.11.4": - version: 11.11.4 - resolution: "@emotion/react@npm:11.11.4" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@emotion/babel-plugin": "npm:^11.11.0" - "@emotion/cache": "npm:^11.11.0" - "@emotion/serialize": "npm:^1.1.3" - "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" - "@emotion/utils": "npm:^1.2.1" - "@emotion/weak-memoize": "npm:^0.3.1" - hoist-non-react-statics: "npm:^3.3.1" - peerDependencies: - react: ">=16.8.0" - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/e7da3a1ddc1d72a4179010bdfd17423c13b1a77bf83a8b18271e919fd382d08c62dc2313ed5347acfd1ef85bb1bae8932597647a986e8a1ea1462552716cd495 - languageName: node - linkType: hard - -"@emotion/react@npm:^11.11.1": - version: 11.11.1 - resolution: "@emotion/react@npm:11.11.1" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@emotion/babel-plugin": "npm:^11.11.0" - "@emotion/cache": "npm:^11.11.0" - "@emotion/serialize": "npm:^1.1.2" - "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" - "@emotion/utils": "npm:^1.2.1" - "@emotion/weak-memoize": "npm:^0.3.1" - hoist-non-react-statics: "npm:^3.3.1" - peerDependencies: - react: ">=16.8.0" - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/dfc140718d0a8051a74e51c379226d9de6b19f6a5dd595fb282ef72f4413695a2d012ba919f1e9eeff761c6659e6f7398da8e0e36eb7997a4fdf54cef88644ae - languageName: node - linkType: hard - -"@emotion/serialize@npm:^1.1.2": - version: 1.1.2 - resolution: "@emotion/serialize@npm:1.1.2" - dependencies: - "@emotion/hash": "npm:^0.9.1" - "@emotion/memoize": "npm:^0.8.1" - "@emotion/unitless": "npm:^0.8.1" - "@emotion/utils": "npm:^1.2.1" - csstype: "npm:^3.0.2" - checksum: 10/71ed270ee4e9678d6d1c541cb111f8247aef862a28729e511f7036f22b12822e976b5843f5829a1c2a7b959a9728dcac831f39de3084664725eba1345a03b4a0 - languageName: node - linkType: hard - -"@emotion/serialize@npm:^1.1.3": - version: 1.1.3 - resolution: "@emotion/serialize@npm:1.1.3" - dependencies: - "@emotion/hash": "npm:^0.9.1" - "@emotion/memoize": "npm:^0.8.1" - "@emotion/unitless": "npm:^0.8.1" - "@emotion/utils": "npm:^1.2.1" - csstype: "npm:^3.0.2" - checksum: 10/48d88923663273ae70359bc1a1f30454136716cbe0ddd9664be08e257ce56acedab911f125b627627358e37c9f450bbac3ea09b534ef42f9f67325d47b1e2a7b - languageName: node - linkType: hard - -"@emotion/serialize@npm:^1.1.4": - version: 1.1.4 - resolution: "@emotion/serialize@npm:1.1.4" - dependencies: - "@emotion/hash": "npm:^0.9.1" - "@emotion/memoize": "npm:^0.8.1" - "@emotion/unitless": "npm:^0.8.1" - "@emotion/utils": "npm:^1.2.1" - csstype: "npm:^3.0.2" - checksum: 10/11fc4f960226778e9a5f86310b739703986d13b2de3e89a16d788126ce312b2c8c174a2947c9bfc80cb124b331c36feeac44193f81150616d94b1ba19a92d70a - languageName: node - linkType: hard - -"@emotion/sheet@npm:^1.2.2": - version: 1.2.2 - resolution: "@emotion/sheet@npm:1.2.2" - checksum: 10/cc46b20ef7273dc28de889927ae1498f854be2890905745fcc3154fbbacaa54df1e28c3d89ff3339c2022782c78933f51955bb950d105d5a219576db1eadfb7a - languageName: node - linkType: hard - -"@emotion/styled@npm:11.11.5": - version: 11.11.5 - resolution: "@emotion/styled@npm:11.11.5" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@emotion/babel-plugin": "npm:^11.11.0" - "@emotion/is-prop-valid": "npm:^1.2.2" - "@emotion/serialize": "npm:^1.1.4" - "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" - "@emotion/utils": "npm:^1.2.1" - peerDependencies: - "@emotion/react": ^11.0.0-rc.0 - react: ">=16.8.0" - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/a936787ef80d73066840391522d88280424de0abb56bec83d17e14bdc5a515e77e343dd171f7caae1405462e3f71815b5480dcc4e1eff5e8ff4a020f5c39341e - languageName: node - linkType: hard - -"@emotion/styled@npm:^11.11.0": - version: 11.11.0 - resolution: "@emotion/styled@npm:11.11.0" - dependencies: - "@babel/runtime": "npm:^7.18.3" - "@emotion/babel-plugin": "npm:^11.11.0" - "@emotion/is-prop-valid": "npm:^1.2.1" - "@emotion/serialize": "npm:^1.1.2" - "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" - "@emotion/utils": "npm:^1.2.1" - peerDependencies: - "@emotion/react": ^11.0.0-rc.0 - react: ">=16.8.0" - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/ac471a40645ee7bc950378ff9453028078bc2e45a6317f77636e4ed27f7ea61eb549b1efefdc5433640f73246ae5ee212e6c864085dc042b6541b2ffa0e21a49 - languageName: node - linkType: hard - -"@emotion/unitless@npm:^0.8.1": - version: 0.8.1 - resolution: "@emotion/unitless@npm:0.8.1" - checksum: 10/918f73c46ac0b7161e3c341cc07d651ce87e31ab1695e74b12adb7da6bb98dfbff8c69cf68a4e40d9eb3d820ca055dc1267aeb3007927ce88f98b885bf729b63 - languageName: node - linkType: hard - -"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1": - version: 1.0.1 - resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.0.1" - peerDependencies: - react: ">=16.8.0" - checksum: 10/7d7ead9ba3f615510f550aea67815281ec5a5487de55aafc250f820317afc1fd419bd9e9e27602a0206ec5c152f13dc6130bccad312c1036706c584c65d66ef7 - languageName: node - linkType: hard - -"@emotion/utils@npm:^1.2.1": - version: 1.2.1 - resolution: "@emotion/utils@npm:1.2.1" - checksum: 10/472fa529c64a13edff80aa11698092e8841c1ffb5001c739d84eb9d0fdd6d8e1cd1848669310578ccfa6383b8601132eca54f8749fca40af85d21fdfc9b776c4 - languageName: node - linkType: hard - -"@emotion/weak-memoize@npm:^0.3.1": - version: 0.3.1 - resolution: "@emotion/weak-memoize@npm:0.3.1" - checksum: 10/b2be47caa24a8122622ea18cd2d650dbb4f8ad37b636dc41ed420c2e082f7f1e564ecdea68122b546df7f305b159bf5ab9ffee872abd0f052e687428459af594 - languageName: node - linkType: hard - -"@ensdomains/address-encoder@npm:^0.1.7": - version: 0.1.9 - resolution: "@ensdomains/address-encoder@npm:0.1.9" - dependencies: - bech32: "npm:^1.1.3" - blakejs: "npm:^1.1.0" - bn.js: "npm:^4.11.8" - bs58: "npm:^4.0.1" - crypto-addr-codec: "npm:^0.1.7" - nano-base32: "npm:^1.0.1" - ripemd160: "npm:^2.0.2" - checksum: 10/23a02f72e8e99d7303cce82eae7dfa2d1cff07cc60a625b9fde3ff17db23178a1dbe29f96b92a486b937eeed5908a2e3221ab9b245c92b543ac8c2df2e75d704 - languageName: node - linkType: hard - -"@ensdomains/ens@npm:0.4.5": - version: 0.4.5 - resolution: "@ensdomains/ens@npm:0.4.5" - dependencies: - bluebird: "npm:^3.5.2" - eth-ens-namehash: "npm:^2.0.8" - solc: "npm:^0.4.20" - testrpc: "npm:0.0.1" - web3-utils: "npm:^1.0.0-beta.31" - checksum: 10/3e02c9666904366bee59fbf25f87a04363cba79769840e5b7ebd21d74c6c15272a3045fc0b7397b3836214f8172c66ced8133e31f63d9c199ea065b724d269e3 - languageName: node - linkType: hard - -"@ensdomains/ensjs@npm:^2.1.0": - version: 2.1.0 - resolution: "@ensdomains/ensjs@npm:2.1.0" - dependencies: - "@babel/runtime": "npm:^7.4.4" - "@ensdomains/address-encoder": "npm:^0.1.7" - "@ensdomains/ens": "npm:0.4.5" - "@ensdomains/resolver": "npm:0.2.4" - content-hash: "npm:^2.5.2" - eth-ens-namehash: "npm:^2.0.8" - ethers: "npm:^5.0.13" - js-sha3: "npm:^0.8.0" - checksum: 10/5edee5179487e6fc643b3354e4c698167c694d2d6a804fa6cb69a1f846162dcd9b0da4c327421c222ae2e01dfefc43a79d878236935c1f73c3c8c53a89a9cd1a - languageName: node - linkType: hard - -"@ensdomains/resolver@npm:0.2.4": - version: 0.2.4 - resolution: "@ensdomains/resolver@npm:0.2.4" - checksum: 10/3972e9df3cd75b0c29415acef12fa9094735984305f974e5156131b928f03f86559c55283207d20f0d489419d3b0b360775b4813671393cb471fbdb4ecf1140e - languageName: node - linkType: hard - -"@esbuild/aix-ppc64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/aix-ppc64@npm:0.20.1" - conditions: os=aix & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/aix-ppc64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/aix-ppc64@npm:0.21.5" - conditions: os=aix & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/android-arm64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/android-arm64@npm:0.18.17" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/android-arm64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/android-arm64@npm:0.20.1" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/android-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/android-arm64@npm:0.21.5" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/android-arm@npm:0.18.17" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/android-arm@npm:0.20.1" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/android-arm@npm:0.21.5" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@esbuild/android-x64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/android-x64@npm:0.18.17" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/android-x64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/android-x64@npm:0.20.1" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/android-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/android-x64@npm:0.21.5" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/darwin-arm64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/darwin-arm64@npm:0.18.17" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/darwin-arm64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/darwin-arm64@npm:0.20.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/darwin-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/darwin-arm64@npm:0.21.5" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/darwin-x64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/darwin-x64@npm:0.18.17" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/darwin-x64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/darwin-x64@npm:0.20.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/darwin-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/darwin-x64@npm:0.21.5" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/freebsd-arm64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/freebsd-arm64@npm:0.18.17" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/freebsd-arm64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/freebsd-arm64@npm:0.20.1" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/freebsd-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/freebsd-arm64@npm:0.21.5" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/freebsd-x64@npm:0.18.17" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/freebsd-x64@npm:0.20.1" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/freebsd-x64@npm:0.21.5" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/linux-arm64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/linux-arm64@npm:0.18.17" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/linux-arm64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/linux-arm64@npm:0.20.1" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/linux-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-arm64@npm:0.21.5" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/linux-arm@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/linux-arm@npm:0.18.17" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@esbuild/linux-arm@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/linux-arm@npm:0.20.1" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@esbuild/linux-arm@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-arm@npm:0.21.5" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@esbuild/linux-ia32@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/linux-ia32@npm:0.18.17" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/linux-ia32@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/linux-ia32@npm:0.20.1" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/linux-ia32@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-ia32@npm:0.21.5" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/linux-loong64@npm:0.18.17" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/linux-loong64@npm:0.20.1" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-loong64@npm:0.21.5" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - -"@esbuild/linux-mips64el@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/linux-mips64el@npm:0.18.17" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"@esbuild/linux-mips64el@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/linux-mips64el@npm:0.20.1" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"@esbuild/linux-mips64el@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-mips64el@npm:0.21.5" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"@esbuild/linux-ppc64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/linux-ppc64@npm:0.18.17" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/linux-ppc64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/linux-ppc64@npm:0.20.1" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/linux-ppc64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-ppc64@npm:0.21.5" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/linux-riscv64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/linux-riscv64@npm:0.18.17" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"@esbuild/linux-riscv64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/linux-riscv64@npm:0.20.1" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"@esbuild/linux-riscv64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-riscv64@npm:0.21.5" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/linux-s390x@npm:0.18.17" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/linux-s390x@npm:0.20.1" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-s390x@npm:0.21.5" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"@esbuild/linux-x64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/linux-x64@npm:0.18.17" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/linux-x64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/linux-x64@npm:0.20.1" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/linux-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-x64@npm:0.21.5" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/netbsd-x64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/netbsd-x64@npm:0.18.17" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/netbsd-x64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/netbsd-x64@npm:0.20.1" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/netbsd-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/netbsd-x64@npm:0.21.5" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/openbsd-x64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/openbsd-x64@npm:0.18.17" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/openbsd-x64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/openbsd-x64@npm:0.20.1" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/openbsd-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/openbsd-x64@npm:0.21.5" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/sunos-x64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/sunos-x64@npm:0.18.17" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/sunos-x64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/sunos-x64@npm:0.20.1" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/sunos-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/sunos-x64@npm:0.21.5" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-arm64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/win32-arm64@npm:0.18.17" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/win32-arm64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/win32-arm64@npm:0.20.1" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/win32-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/win32-arm64@npm:0.21.5" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/win32-ia32@npm:0.18.17" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/win32-ia32@npm:0.20.1" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/win32-ia32@npm:0.21.5" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/win32-x64@npm:0.18.17": - version: 0.18.17 - resolution: "@esbuild/win32-x64@npm:0.18.17" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-x64@npm:0.20.1": - version: 0.20.1 - resolution: "@esbuild/win32-x64@npm:0.20.1" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/win32-x64@npm:0.21.5" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.4.0 - resolution: "@eslint-community/eslint-utils@npm:4.4.0" - dependencies: - eslint-visitor-keys: "npm:^3.3.0" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10/8d70bcdcd8cd279049183aca747d6c2ed7092a5cf0cf5916faac1ef37ffa74f0c245c2a3a3d3b9979d9dfdd4ca59257b4c5621db699d637b847a2c5e02f491c2 - languageName: node - linkType: hard - -"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.1": - version: 4.6.2 - resolution: "@eslint-community/regexpp@npm:4.6.2" - checksum: 10/59ea2fa13a70996a8cebbd5a9f4499c92bceeff872286ef2fb34948fcfb9d3467692371d9cc116e7d613f2c18086a1c8337c9d461ccdf213f0dc47f6f6d2fbb6 - languageName: node - linkType: hard - -"@eslint-community/regexpp@npm:^4.6.1": - version: 4.9.1 - resolution: "@eslint-community/regexpp@npm:4.9.1" - checksum: 10/8f1ba51fa5dedd93f01623382d006c838a436aaea85561c7e540b15600988350843bf746a60e2aaefa79ee4904c9dc0a2f3f00e025b162112c76520ffb34805d - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^2.1.2": - version: 2.1.2 - resolution: "@eslint/eslintrc@npm:2.1.2" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^9.6.0" - globals: "npm:^13.19.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10/fa25638f2666cac6810f98ee7d0f4b912f191806467c1b40d72bac759fffef0b3357f12a1869817286837b258e4de3517e0c7408520e156ca860fc53a1fbaed9 - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^2.1.4": - version: 2.1.4 - resolution: "@eslint/eslintrc@npm:2.1.4" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^9.6.0" - globals: "npm:^13.19.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10/7a3b14f4b40fc1a22624c3f84d9f467a3d9ea1ca6e9a372116cb92507e485260359465b58e25bcb6c9981b155416b98c9973ad9b796053fd7b3f776a6946bce8 - languageName: node - linkType: hard - -"@eslint/js@npm:8.48.0": - version: 8.48.0 - resolution: "@eslint/js@npm:8.48.0" - checksum: 10/55f6c58b046772c2bcb479366e23d9bd6fe9a32e2143729a593b6482d134debfb90bf49186ebd5884dcbab27c29f0baa2a47a3239afbae3622561eb82deed193 - languageName: node - linkType: hard - -"@eslint/js@npm:8.57.0": - version: 8.57.0 - resolution: "@eslint/js@npm:8.57.0" - checksum: 10/3c501ce8a997cf6cbbaf4ed358af5492875e3550c19b9621413b82caa9ae5382c584b0efa79835639e6e0ddaa568caf3499318e5bdab68643ef4199dce5eb0a0 - languageName: node - linkType: hard - -"@ethereumjs/common@npm:2.5.0": - version: 2.5.0 - resolution: "@ethereumjs/common@npm:2.5.0" - dependencies: - crc-32: "npm:^1.2.0" - ethereumjs-util: "npm:^7.1.1" - checksum: 10/8fba3e67b184f040d0f7630be84315d2738e3e322fc3559e00a5083b790e85433d5ea6b98833bc802eb2c8569f97a0166ffb2a592eeb09e942c0de9262a8c346 - languageName: node - linkType: hard - -"@ethereumjs/common@npm:4.0.0, @ethereumjs/common@npm:^4.0.0": - version: 4.0.0 - resolution: "@ethereumjs/common@npm:4.0.0" - dependencies: - "@ethereumjs/util": "npm:^9.0.0" - crc: "npm:^4.3.2" - checksum: 10/cd1a12beb94f6890269d43d339645984a2bda129170f3d2017e140c8df3985c6ab9f2d86fe1e4dbbac9cc026613a8ba48d3092e78e82ff5a91595d8e44563af1 - languageName: node - linkType: hard - -"@ethereumjs/common@npm:^2.5.0": - version: 2.6.4 - resolution: "@ethereumjs/common@npm:2.6.4" - dependencies: - crc-32: "npm:^1.2.0" - ethereumjs-util: "npm:^7.1.4" - checksum: 10/2dcd913e298c234ceb8d23aab9cb4ad5e6e14d426cf8c331ccf053cc68c70532c42d24ca86d4897321421b44126decd9738597bb634d86d69442ec9efa9f3725 - languageName: node - linkType: hard - -"@ethereumjs/common@npm:^2.6.4": - version: 2.6.5 - resolution: "@ethereumjs/common@npm:2.6.5" - dependencies: - crc-32: "npm:^1.2.0" - ethereumjs-util: "npm:^7.1.5" - checksum: 10/e931e16cafc908b086492ca5fcbb1820fff3edfb83cfd4ae48002517b3be0d1f7622c750874b3b347c122d06372e133ddae44ac129b5ba141f68808a79430135 - languageName: node - linkType: hard - -"@ethereumjs/rlp@npm:^4.0.1": - version: 4.0.1 - resolution: "@ethereumjs/rlp@npm:4.0.1" - bin: - rlp: bin/rlp - checksum: 10/bfdffd634ce72f3b17e3d085d071f2fe7ce9680aebdf10713d74b30afd80ef882d17f19ff7175fcb049431a56e800bd3558d3b028bd0d82341927edb303ab450 - languageName: node - linkType: hard - -"@ethereumjs/rlp@npm:^5.0.0": - version: 5.0.0 - resolution: "@ethereumjs/rlp@npm:5.0.0" - bin: - rlp: bin/rlp - checksum: 10/ed2478580489f0adbb037b8c054b178ab2f22e0b1417470fb6659e655436a3a5c9762030f29c5ab64db6a902911fcad92eeaebdfe59d0561a6ecc149d1a42f06 - languageName: node - linkType: hard - -"@ethereumjs/tx@npm:3.3.2": - version: 3.3.2 - resolution: "@ethereumjs/tx@npm:3.3.2" - dependencies: - "@ethereumjs/common": "npm:^2.5.0" - ethereumjs-util: "npm:^7.1.2" - checksum: 10/9d88b9627b9c6a465b931ddba7a6aa4a124d3662c91f5f6658be1ad11fefd7f7429042feb47f5676854300a8cb3e107184154d1123d7292a92938afc057b58de - languageName: node - linkType: hard - -"@ethereumjs/tx@npm:5.0.0": - version: 5.0.0 - resolution: "@ethereumjs/tx@npm:5.0.0" - dependencies: - "@ethereumjs/common": "npm:^4.0.0" - "@ethereumjs/rlp": "npm:^5.0.0" - "@ethereumjs/util": "npm:^9.0.0" - ethereum-cryptography: "npm:^2.1.2" - peerDependencies: - c-kzg: ^2.1.0 - peerDependenciesMeta: - c-kzg: - optional: true - checksum: 10/27626d1692a35fd8a9a31c50ce71e5ed84c81fbea1dcbadd7f3e4b217ee11965a4b60b7418f2e38db7d9c140bbb20b930d844f1244ac7e86b5ff6c06646eb8a1 - languageName: node - linkType: hard - -"@ethereumjs/tx@npm:^3.3.2": - version: 3.5.2 - resolution: "@ethereumjs/tx@npm:3.5.2" - dependencies: - "@ethereumjs/common": "npm:^2.6.4" - ethereumjs-util: "npm:^7.1.5" - checksum: 10/891e12738206229ac428685536844f7765e8547ae794462b1e406399445bf1f6f918af6ebc33ee5fa4a1340f14f48871a579f11c0e1d7c142ba0dd525bae5df5 - languageName: node - linkType: hard - -"@ethereumjs/util@npm:^8.1.0": - version: 8.1.0 - resolution: "@ethereumjs/util@npm:8.1.0" - dependencies: - "@ethereumjs/rlp": "npm:^4.0.1" - ethereum-cryptography: "npm:^2.0.0" - micro-ftch: "npm:^0.3.1" - checksum: 10/cc35338932e49b15e54ca6e548b32a1f48eed7d7e1d34ee743e4d3600dd616668bd50f70139e86c5c35f55aac35fba3b6cc4e6f679cf650aeba66bf93016200c - languageName: node - linkType: hard - -"@ethereumjs/util@npm:^9.0.0": - version: 9.0.0 - resolution: "@ethereumjs/util@npm:9.0.0" - dependencies: - "@ethereumjs/rlp": "npm:^5.0.0" - ethereum-cryptography: "npm:^2.1.2" - peerDependencies: - c-kzg: ^2.1.0 - peerDependenciesMeta: - c-kzg: - optional: true - checksum: 10/a7d15ef4bda52141f9aeab7fe23fc49cd280f89127c8b7868a36681765b66b28a258e9d47b15356d6506632679becfe0c7733f9daf6dd2b6d26acda5f79a8ce8 - languageName: node - linkType: hard - -"@ethersproject/abi@npm:5.0.7": - version: 5.0.7 - resolution: "@ethersproject/abi@npm:5.0.7" - dependencies: - "@ethersproject/address": "npm:^5.0.4" - "@ethersproject/bignumber": "npm:^5.0.7" - "@ethersproject/bytes": "npm:^5.0.4" - "@ethersproject/constants": "npm:^5.0.4" - "@ethersproject/hash": "npm:^5.0.4" - "@ethersproject/keccak256": "npm:^5.0.3" - "@ethersproject/logger": "npm:^5.0.5" - "@ethersproject/properties": "npm:^5.0.3" - "@ethersproject/strings": "npm:^5.0.4" - checksum: 10/c42efea760f11b88b3a1edf3d4d6baf14699d3822df314e81120e5cee7a906f4391bacc66ace5e31914205f6f66821614690da759b038d78a7041daaffc9ba75 - languageName: node - linkType: hard - -"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.6.3, @ethersproject/abi@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/abi@npm:5.7.0" - dependencies: - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/hash": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10/6ed002cbc61a7e21bc0182702345659c1984f6f8e6bad166e43aee76ea8f74766dd0f6236574a868e1b4600af27972bf25b973fae7877ae8da3afa90d3965cac - languageName: node - linkType: hard - -"@ethersproject/abi@npm:^5.1.2": - version: 5.5.0 - resolution: "@ethersproject/abi@npm:5.5.0" - dependencies: - "@ethersproject/address": "npm:^5.5.0" - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/constants": "npm:^5.5.0" - "@ethersproject/hash": "npm:^5.5.0" - "@ethersproject/keccak256": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - "@ethersproject/strings": "npm:^5.5.0" - checksum: 10/bd1e112b198a39b062f94e70ec62be07829a2d3c607488d613315de5efdb6e8fed9bb988a5161174dc0daee8034bb4ddd7e30e03668b4486189d46dd257ca674 - languageName: node - linkType: hard - -"@ethersproject/abstract-provider@npm:5.7.0, @ethersproject/abstract-provider@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/abstract-provider@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/networks": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - "@ethersproject/web": "npm:^5.7.0" - checksum: 10/c03e413a812486002525f4036bf2cb90e77a19b98fa3d16279e28e0a05520a1085690fac2ee9f94b7931b9a803249ff8a8bbb26ff8dee52196a6ef7a3fc5edc5 - languageName: node - linkType: hard - -"@ethersproject/abstract-provider@npm:^5.5.0": - version: 5.5.1 - resolution: "@ethersproject/abstract-provider@npm:5.5.1" - dependencies: - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/networks": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - "@ethersproject/transactions": "npm:^5.5.0" - "@ethersproject/web": "npm:^5.5.0" - checksum: 10/0668055c01a130dee9c6f5d43bb901e54bd4430dd158ea01730038e35a2b9d1f8feb76738628ee884a44f11cf4de1612e303bad908bde39f0d0def8ea228d043 - languageName: node - linkType: hard - -"@ethersproject/abstract-signer@npm:5.7.0, @ethersproject/abstract-signer@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/abstract-signer@npm:5.7.0" - dependencies: - "@ethersproject/abstract-provider": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - checksum: 10/0a6ffade0a947c9ba617048334e1346838f394d1d0a5307ac435a0c63ed1033b247e25ffb0cd6880d7dcf5459581f52f67e3804ebba42ff462050f1e4321ba0c - languageName: node - linkType: hard - -"@ethersproject/abstract-signer@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/abstract-signer@npm:5.5.0" - dependencies: - "@ethersproject/abstract-provider": "npm:^5.5.0" - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - checksum: 10/e29b49a0e8ce6d61873fe7de310288e498e2be3db9205b384bc098ad67fe46364750b64cdd6df6ce0a6090b5aac5e5d05e07f2737ba8ce14ed97080d2ea4fddb - languageName: node - linkType: hard - -"@ethersproject/address@npm:5.7.0, @ethersproject/address@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/address@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/rlp": "npm:^5.7.0" - checksum: 10/1ac4f3693622ed9fbbd7e966a941ec1eba0d9445e6e8154b1daf8e93b8f62ad91853d1de5facf4c27b41e6f1e47b94a317a2492ba595bee1841fd3030c3e9a27 - languageName: node - linkType: hard - -"@ethersproject/address@npm:^5.0.4, @ethersproject/address@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/address@npm:5.5.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/keccak256": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/rlp": "npm:^5.5.0" - checksum: 10/b38c4efd61434f720b33f4a398f5ddbc8a1234bbfccb6895ef73b3f7c27b2e0af4a874769a76e31c48659701800fa50d177fa3adf547094aca31c510adf1b11c - languageName: node - linkType: hard - -"@ethersproject/base64@npm:5.7.0, @ethersproject/base64@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/base64@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - checksum: 10/7105105f401e1c681e61db1e9da1b5960d8c5fbd262bbcacc99d61dbb9674a9db1181bb31903d98609f10e8a0eb64c850475f3b040d67dea953e2b0ac6380e96 - languageName: node - linkType: hard - -"@ethersproject/base64@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/base64@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - checksum: 10/563991f6fc8bed96f04b99578de0126296ba48d8df283bcd811668191365ba533c9b46f85cd9b1ea9ee017e786d515ea7b592de8d6374609be05785469c1af74 - languageName: node - linkType: hard - -"@ethersproject/basex@npm:5.7.0, @ethersproject/basex@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/basex@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - checksum: 10/840e333e109bff2fcf8d91dcfd45fa951835844ef0e1ba710037e87291c7b5f3c189ba86f6cee2ca7de2ede5b7d59fbb930346607695855bee20d2f9f63371ef - languageName: node - linkType: hard - -"@ethersproject/bignumber@npm:5.7.0, @ethersproject/bignumber@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/bignumber@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - bn.js: "npm:^5.2.1" - checksum: 10/09cffa18a9f0730856b57c14c345bd68ba451159417e5aff684a8808011cd03b27b7c465d423370333a7d1c9a621392fc74f064a3b02c9edc49ebe497da6d45d - languageName: node - linkType: hard - -"@ethersproject/bignumber@npm:^5.0.7, @ethersproject/bignumber@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/bignumber@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - bn.js: "npm:^4.11.9" - checksum: 10/3da18cee3138de4c3d1293c6067c387597dccc4326fffa1594ae40d98cd5fb83d116ab3730b671254ba07dfe488089fc762cb5d409e6d4d0962cae6ff7156c18 - languageName: node - linkType: hard - -"@ethersproject/bytes@npm:5.7.0, @ethersproject/bytes@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/bytes@npm:5.7.0" - dependencies: - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/8b3ffedb68c1a82cfb875e9738361409cc33e2dcb1286b6ccfdc4dd8dd0317f7eacc8937b736c467d213dffc44b469690fe1a951e901953d5a90c5af2b675ae4 - languageName: node - linkType: hard - -"@ethersproject/bytes@npm:^5.0.4, @ethersproject/bytes@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/bytes@npm:5.5.0" - dependencies: - "@ethersproject/logger": "npm:^5.5.0" - checksum: 10/f5ce43064f516b34d1365b6f89761094e432647fbea6c97de960f7ca84ffc97254c48bbe310c4b493738a49a707a18748094f7cff2400fc0d20608a503d50bd6 - languageName: node - linkType: hard - -"@ethersproject/constants@npm:5.7.0, @ethersproject/constants@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/constants@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - checksum: 10/6d4b1355747cce837b3e76ec3bde70e4732736f23b04f196f706ebfa5d4d9c2be50904a390d4d40ce77803b98d03d16a9b6898418e04ba63491933ce08c4ba8a - languageName: node - linkType: hard - -"@ethersproject/constants@npm:^5.0.4, @ethersproject/constants@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/constants@npm:5.5.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.5.0" - checksum: 10/20519ec5abcbff6d2a7f1260f58b33e1c472abdfb2ee3d5428d08091484fed572f8f873b1cb0410f9248f92512016bbf680324f9f2a537b5f65413a6a1359fd3 - languageName: node - linkType: hard - -"@ethersproject/contracts@npm:5.7.0": - version: 5.7.0 - resolution: "@ethersproject/contracts@npm:5.7.0" - dependencies: - "@ethersproject/abi": "npm:^5.7.0" - "@ethersproject/abstract-provider": "npm:^5.7.0" - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - checksum: 10/5df66179af242faabea287a83fd2f8f303a4244dc87a6ff802e1e3b643f091451295c8e3d088c7739970b7915a16a581c192d4e007d848f1fdf3cc9e49010053 - languageName: node - linkType: hard - -"@ethersproject/hash@npm:5.7.0, @ethersproject/hash@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/hash@npm:5.7.0" - dependencies: - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/base64": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10/d83de3f3a1b99b404a2e7bb503f5cdd90c66a97a32cce1d36b09bb8e3fb7205b96e30ad28e2b9f30083beea6269b157d0c6e3425052bb17c0a35fddfdd1c72a3 - languageName: node - linkType: hard - -"@ethersproject/hash@npm:^5.0.4, @ethersproject/hash@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/hash@npm:5.5.0" - dependencies: - "@ethersproject/abstract-signer": "npm:^5.5.0" - "@ethersproject/address": "npm:^5.5.0" - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/keccak256": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - "@ethersproject/strings": "npm:^5.5.0" - checksum: 10/d6bf33bb96a76f35357f026632c52e931da1f47d1a257c35a5e7714bd5b8af78fc297b4f5ab85565fd3c6993c75bc59dd91c5e59f419b1e1c6d86c4c5f8c0886 - languageName: node - linkType: hard - -"@ethersproject/hdnode@npm:5.7.0, @ethersproject/hdnode@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/hdnode@npm:5.7.0" - dependencies: - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/basex": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/pbkdf2": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/sha2": "npm:^5.7.0" - "@ethersproject/signing-key": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - "@ethersproject/wordlists": "npm:^5.7.0" - checksum: 10/2fbe6278c324235afaa88baa5dea24d8674c72b14ad037fe2096134d41025977f410b04fd146e333a1b6cac9482e9de62d6375d1705fd42667543f2d0eb66655 - languageName: node - linkType: hard - -"@ethersproject/json-wallets@npm:5.7.0, @ethersproject/json-wallets@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/json-wallets@npm:5.7.0" - dependencies: - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/hdnode": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/pbkdf2": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/random": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - aes-js: "npm:3.0.0" - scrypt-js: "npm:3.0.1" - checksum: 10/4a1ef0912ffc8d18c392ae4e292948d86bffd715fe3dd3e66d1cd21f6c9267aeadad4da84261db853327f97cdfd765a377f9a87e39d4c6749223a69226faf0a1 - languageName: node - linkType: hard - -"@ethersproject/keccak256@npm:5.7.0, @ethersproject/keccak256@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/keccak256@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - js-sha3: "npm:0.8.0" - checksum: 10/ff70950d82203aab29ccda2553422cbac2e7a0c15c986bd20a69b13606ed8bb6e4fdd7b67b8d3b27d4f841e8222cbaccd33ed34be29f866fec7308f96ed244c6 - languageName: node - linkType: hard - -"@ethersproject/keccak256@npm:^5.0.3, @ethersproject/keccak256@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/keccak256@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - js-sha3: "npm:0.8.0" - checksum: 10/587590c8448f3e1db52320d4fecc807d94a8ee83253110c076c7f8ce3b3127f7fd56c302f1ee80e6bc2764a4949a490ee5143344fabfad2a65020dc2f5896a85 - languageName: node - linkType: hard - -"@ethersproject/logger@npm:5.7.0, @ethersproject/logger@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/logger@npm:5.7.0" - checksum: 10/683a939f467ae7510deedc23d7611d0932c3046137f5ffb92ba1e3c8cd9cf2fbbaa676b660c248441a0fa9143783137c46d6e6d17d676188dd5a6ef0b72dd091 - languageName: node - linkType: hard - -"@ethersproject/logger@npm:^5.0.5, @ethersproject/logger@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/logger@npm:5.5.0" - checksum: 10/84269c2221ae03fc11f0017f6fe3b6ad2c29e11ed09b1182511379e9f40ff22dd09043c0bff995f82e37849f21e2eafa5e8a2b4e25a81b9f4f805432d9d6914c - languageName: node - linkType: hard - -"@ethersproject/networks@npm:5.7.1, @ethersproject/networks@npm:^5.7.0": - version: 5.7.1 - resolution: "@ethersproject/networks@npm:5.7.1" - dependencies: - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/5265d0b4b72ef91af57be804b44507f4943038d609699764d8a69157ed381e30fe22ebf63630ed8e530ceb220f15d69dae8cda2e5023ccd793285c9d5882e599 - languageName: node - linkType: hard - -"@ethersproject/networks@npm:^5.5.0": - version: 5.5.2 - resolution: "@ethersproject/networks@npm:5.5.2" - dependencies: - "@ethersproject/logger": "npm:^5.5.0" - checksum: 10/09626f4d0a67b543462c19e4afaa12f422165eb3b6ba3b2e289c1cb49e508486887934447bbd53f276d6d532bff8a096cc53142b26df3f6a9c95597e0862da72 - languageName: node - linkType: hard - -"@ethersproject/pbkdf2@npm:5.7.0, @ethersproject/pbkdf2@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/pbkdf2@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/sha2": "npm:^5.7.0" - checksum: 10/dea7ba747805e24b81dfb99e695eb329509bf5cad1a42e48475ade28e060e567458a3d5bf930f302691bded733fd3fa364f0c7adce920f9f05a5ef8c13267aaa - languageName: node - linkType: hard - -"@ethersproject/properties@npm:5.7.0, @ethersproject/properties@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/properties@npm:5.7.0" - dependencies: - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/f8401a161940aa1c32695115a20c65357877002a6f7dc13ab1600064bf54d7b825b4db49de8dc8da69efcbb0c9f34f8813e1540427e63e262ab841c1bf6c1c1e - languageName: node - linkType: hard - -"@ethersproject/properties@npm:^5.0.3, @ethersproject/properties@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/properties@npm:5.5.0" - dependencies: - "@ethersproject/logger": "npm:^5.5.0" - checksum: 10/d395a534f0a7009920b8a3c095a838088b190f84ba07a7263e3e3c4857dcdf3933560dc9fcfd6c7fa0456c00b5dfc988b8999e1286157178715069c78209408a - languageName: node - linkType: hard - -"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.7.1, @ethersproject/providers@npm:^5.7.2": - version: 5.7.2 - resolution: "@ethersproject/providers@npm:5.7.2" - dependencies: - "@ethersproject/abstract-provider": "npm:^5.7.0" - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/base64": "npm:^5.7.0" - "@ethersproject/basex": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/hash": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/networks": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/random": "npm:^5.7.0" - "@ethersproject/rlp": "npm:^5.7.0" - "@ethersproject/sha2": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - "@ethersproject/web": "npm:^5.7.0" - bech32: "npm:1.1.4" - ws: "npm:7.4.6" - checksum: 10/8534a1896e61b9f0b66427a639df64a5fe76d0c08ec59b9f0cc64fdd1d0cc28d9fc3312838ae8d7817c8f5e2e76b7f228b689bc33d1cbb8e1b9517d4c4f678d8 - languageName: node - linkType: hard - -"@ethersproject/random@npm:5.7.0, @ethersproject/random@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/random@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/c23ec447998ce1147651bd58816db4d12dbeb404f66a03d14a13e1edb439879bab18528e1fc46b931502903ac7b1c08ea61d6a86e621a6e060fa63d41aeed3ac - languageName: node - linkType: hard - -"@ethersproject/rlp@npm:5.7.0, @ethersproject/rlp@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/rlp@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/3b8c5279f7654794d5874569f5598ae6a880e19e6616013a31e26c35c5f586851593a6e85c05ed7b391fbc74a1ea8612dd4d867daefe701bf4e8fcf2ab2f29b9 - languageName: node - linkType: hard - -"@ethersproject/rlp@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/rlp@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - checksum: 10/046c3e53fdb6aec68d11f961738d34aae5cf60220ce7f3774d20e2742c2912c49a72671905507ce510bc45d55c9341e6dd117d3c984a0dc8a750074497852967 - languageName: node - linkType: hard - -"@ethersproject/sha2@npm:5.7.0, @ethersproject/sha2@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/sha2@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - hash.js: "npm:1.1.7" - checksum: 10/09321057c022effbff4cc2d9b9558228690b5dd916329d75c4b1ffe32ba3d24b480a367a7cc92d0f0c0b1c896814d03351ae4630e2f1f7160be2bcfbde435dbc - languageName: node - linkType: hard - -"@ethersproject/signing-key@npm:5.7.0, @ethersproject/signing-key@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/signing-key@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - bn.js: "npm:^5.2.1" - elliptic: "npm:6.5.4" - hash.js: "npm:1.1.7" - checksum: 10/ff2f79ded86232b139e7538e4aaa294c6022a7aaa8c95a6379dd7b7c10a6d363685c6967c816f98f609581cf01f0a5943c667af89a154a00bcfe093a8c7f3ce7 - languageName: node - linkType: hard - -"@ethersproject/signing-key@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/signing-key@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - bn.js: "npm:^4.11.9" - elliptic: "npm:6.5.4" - hash.js: "npm:1.1.7" - checksum: 10/3c426346bceb73d799f508d61fcebcc5459c42a3eba6292fa11ea7520b849609cb4c29d7aa9f8f9b1cda967b672725d298f1f7c616176eecb7a793d9fa81af1b - languageName: node - linkType: hard - -"@ethersproject/solidity@npm:5.7.0": - version: 5.7.0 - resolution: "@ethersproject/solidity@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/sha2": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10/9a02f37f801c96068c3e7721f83719d060175bc4e80439fe060e92bd7acfcb6ac1330c7e71c49f4c2535ca1308f2acdcb01e00133129aac00581724c2d6293f3 - languageName: node - linkType: hard - -"@ethersproject/strings@npm:5.7.0, @ethersproject/strings@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/strings@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/24191bf30e98d434a9fba2f522784f65162d6712bc3e1ccc98ed85c5da5884cfdb5a1376b7695374655a7b95ec1f5fdbeef5afc7d0ea77ffeb78047e9b791fa5 - languageName: node - linkType: hard - -"@ethersproject/strings@npm:^5.0.4, @ethersproject/strings@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/strings@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/constants": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - checksum: 10/dd3d601a91ad65049d994bd19e72aa179dfba31d001e8667c82fa7c3f6ae26774cbbc35428f744f397e154918641ff4db10e3e5b49dac9ea8e08807441d5b168 - languageName: node - linkType: hard - -"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.6.2, @ethersproject/transactions@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/transactions@npm:5.7.0" - dependencies: - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/rlp": "npm:^5.7.0" - "@ethersproject/signing-key": "npm:^5.7.0" - checksum: 10/d809e9d40020004b7de9e34bf39c50377dce8ed417cdf001bfabc81ecb1b7d1e0c808fdca0a339ea05e1b380648eaf336fe70f137904df2d3c3135a38190a5af - languageName: node - linkType: hard - -"@ethersproject/transactions@npm:^5.0.0-beta.135, @ethersproject/transactions@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/transactions@npm:5.5.0" - dependencies: - "@ethersproject/address": "npm:^5.5.0" - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/constants": "npm:^5.5.0" - "@ethersproject/keccak256": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - "@ethersproject/rlp": "npm:^5.5.0" - "@ethersproject/signing-key": "npm:^5.5.0" - checksum: 10/f92868be223abcdbf29ae698162cba4168169f4acd7751fe911dbfe455a7d667d2bf731bbb02c667672ea70694a453d7d95de7b2e8d622b79e8208c326d18e53 - languageName: node - linkType: hard - -"@ethersproject/units@npm:5.7.0": - version: 5.7.0 - resolution: "@ethersproject/units@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/304714f848cd32e57df31bf545f7ad35c2a72adae957198b28cbc62166daa929322a07bff6e9c9ac4577ab6aa0de0546b065ed1b2d20b19e25748b7d475cb0fc - languageName: node - linkType: hard - -"@ethersproject/wallet@npm:5.7.0": - version: 5.7.0 - resolution: "@ethersproject/wallet@npm:5.7.0" - dependencies: - "@ethersproject/abstract-provider": "npm:^5.7.0" - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/hash": "npm:^5.7.0" - "@ethersproject/hdnode": "npm:^5.7.0" - "@ethersproject/json-wallets": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/random": "npm:^5.7.0" - "@ethersproject/signing-key": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - "@ethersproject/wordlists": "npm:^5.7.0" - checksum: 10/340f8e5c77c6c47c4d1596c200d97c53c1d4b4eb54d9166d0f2a114cb81685e7689255b0627e917fbcdc29cb54c4bd1f1a9909f3096ef9dff9acc0b24972f1c1 - languageName: node - linkType: hard - -"@ethersproject/web@npm:5.7.1, @ethersproject/web@npm:^5.7.0": - version: 5.7.1 - resolution: "@ethersproject/web@npm:5.7.1" - dependencies: - "@ethersproject/base64": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10/c83b6b3ac40573ddb67b1750bb4cf21ded7d8555be5e53a97c0f34964622fd88de9220a90a118434bae164a2bff3acbdc5ecb990517b5f6dc32bdad7adf604c2 - languageName: node - linkType: hard - -"@ethersproject/web@npm:^5.5.0": - version: 5.5.1 - resolution: "@ethersproject/web@npm:5.5.1" - dependencies: - "@ethersproject/base64": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - "@ethersproject/strings": "npm:^5.5.0" - checksum: 10/3cf4e9726578ea2460c01a5b59969782265cf41e0c5c52f04270c313c87d50766864bdd64a3b022c50c16b0e26c76a4729d33253ac76b5d11f5fb3bd815a0541 - languageName: node - linkType: hard - -"@ethersproject/wordlists@npm:5.7.0, @ethersproject/wordlists@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/wordlists@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/hash": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10/737fca67ad743a32020f50f5b9e147e5683cfba2692367c1124a5a5538be78515865257b426ec9141daac91a70295e5e21bef7a193b79fe745f1be378562ccaa - languageName: node - linkType: hard - -"@fastify/ajv-compiler@npm:^3.5.0": - version: 3.6.0 - resolution: "@fastify/ajv-compiler@npm:3.6.0" - dependencies: - ajv: "npm:^8.11.0" - ajv-formats: "npm:^2.1.1" - fast-uri: "npm:^2.0.0" - checksum: 10/32296718996979ab734875e7952374400dfda7de5fb13ae0c99c1fab4203e60107c9cfcc036225c8eaa85b991182df7ad1cd569c5a7d574aade411ff1ae39ec4 - languageName: node - linkType: hard - -"@fastify/busboy@npm:^2.0.0": - version: 2.0.0 - resolution: "@fastify/busboy@npm:2.0.0" - checksum: 10/6a2366d06b82aac1069b8323792f76f7a8fca02533cb3745fcd218d8f0f953dc4dbef057287237414658cd43f8dede0846ef33398999e3dbe54ddaeefec71c0a - languageName: node - linkType: hard - -"@fastify/error@npm:^3.3.0, @fastify/error@npm:^3.4.0": - version: 3.4.1 - resolution: "@fastify/error@npm:3.4.1" - checksum: 10/4d63660f7d4a0d6091abf869208d30898bde82f513ca7be542243d9d740df743dd4be293e7db30858fca612dd512d28a818ea06dc674e06b445278fcefcdda92 - languageName: node - linkType: hard - -"@fastify/fast-json-stringify-compiler@npm:^4.3.0": - version: 4.3.0 - resolution: "@fastify/fast-json-stringify-compiler@npm:4.3.0" - dependencies: - fast-json-stringify: "npm:^5.7.0" - checksum: 10/9ad575907d44bbd371dbc23a51853fd349a459092340fe91c50317f92707961f2e6ca6c9d17707a8e4a087c635e09bce1166e082d54f191769a582339c94badd - languageName: node - linkType: hard - -"@fastify/merge-json-schemas@npm:^0.1.0": - version: 0.1.1 - resolution: "@fastify/merge-json-schemas@npm:0.1.1" - dependencies: - fast-deep-equal: "npm:^3.1.3" - checksum: 10/99d0795f8dde75c204ee86fd2d42d8b24da3818c4bb6de8e3d595da1b123e678dcf832d14bd8ab3167fc22e36762ecd5b473ef764888a04dd94831befadac7f0 - languageName: node - linkType: hard - -"@fidm/asn1@npm:^1.0.4": - version: 1.0.4 - resolution: "@fidm/asn1@npm:1.0.4" - checksum: 10/38b47e1739fcf7405ae96308679a0b24b3a9c4b2f4d5737f0c114b539b68a9d4ff6d20044311651862fda05d95d53b6590ffff3a73b35cf674dad2a8917d899f - languageName: node - linkType: hard - -"@fidm/x509@npm:1.2.1": - version: 1.2.1 - resolution: "@fidm/x509@npm:1.2.1" - dependencies: - "@fidm/asn1": "npm:^1.0.4" - tweetnacl: "npm:^1.0.1" - checksum: 10/30ff6de908d57d2a7a85f7e8d56af96153a4ef17864cf8263777fec0eee575b9383eb7cf48f8cc33e33074735570214c5495c03c43452c6a207e181166e219b9 - languageName: node - linkType: hard - -"@floating-ui/core@npm:^1.0.0": - version: 1.6.0 - resolution: "@floating-ui/core@npm:1.6.0" - dependencies: - "@floating-ui/utils": "npm:^0.2.1" - checksum: 10/d6a47cacde193cd8ccb4c268b91ccc4ca254dffaec6242b07fd9bcde526044cc976d27933a7917f9a671de0a0e27f8d358f46400677dbd0c8199de293e9746e1 - languageName: node - linkType: hard - -"@floating-ui/core@npm:^1.4.1": - version: 1.4.1 - resolution: "@floating-ui/core@npm:1.4.1" - dependencies: - "@floating-ui/utils": "npm:^0.1.1" - checksum: 10/2a2dd8a2ae443e63cb9c822785891b1194ad3a402b8252054a3c238763eab86a2f09ab89096fa7d1667e3cb7d2ff2f28b7ab07d5e5ee56544e825e5bd4665570 - languageName: node - linkType: hard - -"@floating-ui/dom@npm:^1.5.1": - version: 1.5.1 - resolution: "@floating-ui/dom@npm:1.5.1" - dependencies: - "@floating-ui/core": "npm:^1.4.1" - "@floating-ui/utils": "npm:^0.1.1" - checksum: 10/3af542d549e394feb0c74f39ef01d87debb5295b49b8852ad481a055503e5dc61768880710c83de6e49a2c100cad8671298d3c73293cb63a13e23068f0612224 - languageName: node - linkType: hard - -"@floating-ui/dom@npm:^1.6.1": - version: 1.6.3 - resolution: "@floating-ui/dom@npm:1.6.3" - dependencies: - "@floating-ui/core": "npm:^1.0.0" - "@floating-ui/utils": "npm:^0.2.0" - checksum: 10/83e97076c7a5f55c3506f574bc53f03d38bed6eb8181920c8733076889371e287e9ae6f28c520a076967759b9b6ff425362832a5cdf16a999069530dbb9cce53 - languageName: node - linkType: hard - -"@floating-ui/react-dom@npm:^2.0.4": - version: 2.0.4 - resolution: "@floating-ui/react-dom@npm:2.0.4" - dependencies: - "@floating-ui/dom": "npm:^1.5.1" - peerDependencies: - react: ">=16.8.0" - react-dom: ">=16.8.0" - checksum: 10/4240a718502c797fd2e174cd06dcd7321a6eda9c8966dbaf61864b9e16445e95649a59bfe7c19ee13f68c11f3693724d7970c7e618089a3d3915bd343639cfae - languageName: node - linkType: hard - -"@floating-ui/react-dom@npm:^2.0.8": - version: 2.0.8 - resolution: "@floating-ui/react-dom@npm:2.0.8" - dependencies: - "@floating-ui/dom": "npm:^1.6.1" - peerDependencies: - react: ">=16.8.0" - react-dom: ">=16.8.0" - checksum: 10/e57b2a498aecf8de0ec28adf434257fca7893bd9bd7e78b63ac98c63b29b9fc086fc175630154352f3610f5c4a0d329823837f4f6c235cc0459fde6417065590 - languageName: node - linkType: hard - -"@floating-ui/utils@npm:^0.1.1": - version: 0.1.1 - resolution: "@floating-ui/utils@npm:0.1.1" - checksum: 10/ba1a6d073f8af4290f9d0ecf2ca73f97a742ed9bae060bf4aec604db5642a6cc7aa38041c2c1a1ffb0dd1c99549bbfde3dc61202ad7cb91a963d2b2eea747719 - languageName: node - linkType: hard - -"@floating-ui/utils@npm:^0.2.0, @floating-ui/utils@npm:^0.2.1": - version: 0.2.1 - resolution: "@floating-ui/utils@npm:0.2.1" - checksum: 10/33c9ab346e7b05c5a1e6a95bc902aafcfc2c9d513a147e2491468843bd5607531b06d0b9aa56aa491cbf22a6c2495c18ccfc4c0344baec54a689a7bb8e4898d6 - languageName: node - linkType: hard - -"@gar/promisify@npm:^1.0.1, @gar/promisify@npm:^1.1.3": - version: 1.1.3 - resolution: "@gar/promisify@npm:1.1.3" - checksum: 10/052dd232140fa60e81588000cbe729a40146579b361f1070bce63e2a761388a22a16d00beeffc504bd3601cb8e055c57b21a185448b3ed550cf50716f4fd442e - languageName: node - linkType: hard - -"@google-cloud/secret-manager@npm:5.0.1": - version: 5.0.1 - resolution: "@google-cloud/secret-manager@npm:5.0.1" - dependencies: - google-gax: "npm:^4.0.3" - checksum: 10/902122d4ea6eb981b72d7ac8fbd1f42a84b2008063a0e31a487977df57aca4d1eb626053230ccb526a913bec3bf0fbde4bde86a73ec4974aa93b3679e9be9aff - languageName: node - linkType: hard - -"@graphql-tools/batch-execute@npm:8.5.1": - version: 8.5.1 - resolution: "@graphql-tools/batch-execute@npm:8.5.1" - dependencies: - "@graphql-tools/utils": "npm:8.9.0" - dataloader: "npm:2.1.0" - tslib: "npm:^2.4.0" - value-or-promise: "npm:1.0.11" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10/0efb69f27ecb18c050c92ae03fbb33893e19b95e0680561bd87a7f84eb4a8235206860f0ba850cb1d4e1a973470f7bcf8b410817da9b2a54b0f790a708e633a0 - languageName: node - linkType: hard - -"@graphql-tools/delegate@npm:^8.4.3": - version: 8.8.1 - resolution: "@graphql-tools/delegate@npm:8.8.1" - dependencies: - "@graphql-tools/batch-execute": "npm:8.5.1" - "@graphql-tools/schema": "npm:8.5.1" - "@graphql-tools/utils": "npm:8.9.0" - dataloader: "npm:2.1.0" - tslib: "npm:~2.4.0" - value-or-promise: "npm:1.0.11" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10/f853b434c9e5759a3ff380cea6ee5b0f030e495f0d1e132a866c48337bbed940557677e4dec6f160c9cc70b93d072c952ea454cc28c6b640aec1c88b1b1b9cee - languageName: node - linkType: hard - -"@graphql-tools/merge@npm:8.3.1": - version: 8.3.1 - resolution: "@graphql-tools/merge@npm:8.3.1" - dependencies: - "@graphql-tools/utils": "npm:8.9.0" - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10/9354a68aa1b851ee72d2d727a3a264279f1e5ed95100f6c6e7e0a2ad7449943d2ebe6fce43b4873a15e5c3e9df52ea9d23ff51ffc1f73c417c4ccf368f8486ab - languageName: node - linkType: hard - -"@graphql-tools/merge@npm:^8.4.1": - version: 8.4.2 - resolution: "@graphql-tools/merge@npm:8.4.2" - dependencies: - "@graphql-tools/utils": "npm:^9.2.1" - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10/62a4e93812e11d083c17f7763f4333a29dbe99fddbff705ff5942a0bdbb9dcd14f668bd76bd3edda485534d5d1a7f09bac311b979196b6149df11d8968a83723 - languageName: node - linkType: hard - -"@graphql-tools/mock@npm:^8.1.2": - version: 8.7.20 - resolution: "@graphql-tools/mock@npm:8.7.20" - dependencies: - "@graphql-tools/schema": "npm:^9.0.18" - "@graphql-tools/utils": "npm:^9.2.1" - fast-json-stable-stringify: "npm:^2.1.0" - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10/832f8080c91121f1ce7fc5ca37498ae0a0bbc12ef0d65029b97aa192c6ebb3bc6894a275577da37fb5641ce5dab65f1c60ad83fd782e9928d75711e9a5b558bb - languageName: node - linkType: hard - -"@graphql-tools/schema@npm:8.5.1, @graphql-tools/schema@npm:^8.0.0, @graphql-tools/schema@npm:^8.3.1": - version: 8.5.1 - resolution: "@graphql-tools/schema@npm:8.5.1" - dependencies: - "@graphql-tools/merge": "npm:8.3.1" - "@graphql-tools/utils": "npm:8.9.0" - tslib: "npm:^2.4.0" - value-or-promise: "npm:1.0.11" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10/98f57502cc67ee48157bcf6f26c334e27b0673ec6f5a35c1a5bc1901772063c8bfdca435f81664ab1a41f9274b43dc78aa12791feee83546640d0a034b38c836 - languageName: node - linkType: hard - -"@graphql-tools/schema@npm:^9.0.18": - version: 9.0.19 - resolution: "@graphql-tools/schema@npm:9.0.19" - dependencies: - "@graphql-tools/merge": "npm:^8.4.1" - "@graphql-tools/utils": "npm:^9.2.1" - tslib: "npm:^2.4.0" - value-or-promise: "npm:^1.0.12" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10/762811fe08ec67000b190305783677ea086e6b300a1882f46b804bdf790e32de986bef7bbd574ddd4114393ca9b97422cc604390652537d4595eba7dde825259 - languageName: node - linkType: hard - -"@graphql-tools/utils@npm:8.9.0": - version: 8.9.0 - resolution: "@graphql-tools/utils@npm:8.9.0" - dependencies: - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10/de5930b33664c53f0d22781bb16b4e029afaad165539faf80bd520adfad969c024891db672a2ff96195d8d1185bac66b284ebde67938e554d04c0798453da002 - languageName: node - linkType: hard - -"@graphql-tools/utils@npm:^9.2.1": - version: 9.2.1 - resolution: "@graphql-tools/utils@npm:9.2.1" - dependencies: - "@graphql-typed-document-node/core": "npm:^3.1.1" - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10/b1665043c2180a74d1e071f9f495ce16b2f46eeed1b319a290ae58f699629fe0a47b619c4f9be89135ff20b1c34fe6cc27e86570cf1e2cff07d3ae204f3d170d - languageName: node - linkType: hard - -"@graphql-typed-document-node/core@npm:^3.1.1": - version: 3.2.0 - resolution: "@graphql-typed-document-node/core@npm:3.2.0" - peerDependencies: - graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10/fa44443accd28c8cf4cb96aaaf39d144a22e8b091b13366843f4e97d19c7bfeaf609ce3c7603a4aeffe385081eaf8ea245d078633a7324c11c5ec4b2011bb76d - languageName: node - linkType: hard - -"@grpc/grpc-js@npm:1.11.3": - version: 1.11.3 - resolution: "@grpc/grpc-js@npm:1.11.3" - dependencies: - "@grpc/proto-loader": "npm:^0.7.13" - "@js-sdsl/ordered-map": "npm:^4.4.2" - checksum: 10/b4662cd357296ff279e6f4ff4039fb5379d1087f9f7758102eae85a0d093cd8ec4054f27a62e27862efe67d8b25ad7b6733dcb0ffb0ecbc2bd9e3dcb9450d978 - languageName: node - linkType: hard - -"@grpc/grpc-js@npm:~1.7.3": - version: 1.7.3 - resolution: "@grpc/grpc-js@npm:1.7.3" - dependencies: - "@grpc/proto-loader": "npm:^0.7.0" - "@types/node": "npm:>=12.12.47" - checksum: 10/178901c938c85ec00f1f5aa0fd6058bde790cb77afc43133a37c9aaed1b9c117644827689012c7f2c22b353c6c406002a0fca61ce35e497579103c30e9d2c14c - languageName: node - linkType: hard - -"@grpc/grpc-js@npm:~1.9.0": - version: 1.9.6 - resolution: "@grpc/grpc-js@npm:1.9.6" - dependencies: - "@grpc/proto-loader": "npm:^0.7.8" - "@types/node": "npm:>=12.12.47" - checksum: 10/8ece98f3c35448d7aeb63437576f30cfae22958d51991cfdddfcd57cf11a3bad6381aded55187c3fc4d3100c69e803b4bc698a31ffb1334438f65f43da4dfd99 - languageName: node - linkType: hard - -"@grpc/grpc-js@npm:~1.9.6": - version: 1.9.9 - resolution: "@grpc/grpc-js@npm:1.9.9" - dependencies: - "@grpc/proto-loader": "npm:^0.7.8" - "@types/node": "npm:>=12.12.47" - checksum: 10/80f9d8eac4dc46fa18fc81dbb06e6a1af11e61935be696a9f6434795ed899600fa8f1dc315711526c6600d57ad5472e502dee74a274ce01a0699d8c8efef2827 - languageName: node - linkType: hard - -"@grpc/proto-loader@npm:0.7.13, @grpc/proto-loader@npm:^0.7.13": - version: 0.7.13 - resolution: "@grpc/proto-loader@npm:0.7.13" - dependencies: - lodash.camelcase: "npm:^4.3.0" - long: "npm:^5.0.0" - protobufjs: "npm:^7.2.5" - yargs: "npm:^17.7.2" - bin: - proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 10/7e2d842c2061cbaf6450c71da0077263be3bab165454d5c8a3e1ae4d3c6d2915f02fd27da63ff01f05e127b1221acd40705273f5d29303901e60514e852992f4 - languageName: node - linkType: hard - -"@grpc/proto-loader@npm:^0.7.0": - version: 0.7.7 - resolution: "@grpc/proto-loader@npm:0.7.7" - dependencies: - "@types/long": "npm:^4.0.1" - lodash.camelcase: "npm:^4.3.0" - long: "npm:^4.0.0" - protobufjs: "npm:^7.0.0" - yargs: "npm:^17.7.2" - bin: - proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 10/0f9401c43f419bd1e2dea50f3bef37406ae55b3c55786c61995caf9bf1d8c53e9cd0df2721f6abaee0a23a470f1937a6d05b635b0800a306a147806c1ede8b3a - languageName: node - linkType: hard - -"@grpc/proto-loader@npm:^0.7.8": - version: 0.7.10 - resolution: "@grpc/proto-loader@npm:0.7.10" - dependencies: - lodash.camelcase: "npm:^4.3.0" - long: "npm:^5.0.0" - protobufjs: "npm:^7.2.4" - yargs: "npm:^17.7.2" - bin: - proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 10/1fdc0b10480614cecc4bf52578756cbf59ec75f1bea37452947125eff81cd3ceabba04606247ed8361f97bcd00d147ca4118abc22b046cc0541cb749671b97d9 - languageName: node - linkType: hard - -"@hapi/hoek@npm:^9.0.0": - version: 9.2.1 - resolution: "@hapi/hoek@npm:9.2.1" - checksum: 10/dd1268451a5072b005233da5b1d13d9e2d232b22ca44526275dc8d21992a5669221ec6c0706adc4341f85e24ca0fd6988b727e356b9c436128ab4e336593c35d - languageName: node - linkType: hard - -"@hapi/hoek@npm:^9.3.0": - version: 9.3.0 - resolution: "@hapi/hoek@npm:9.3.0" - checksum: 10/ad83a223787749f3873bce42bd32a9a19673765bf3edece0a427e138859ff729469e68d5fdf9ff6bbee6fb0c8e21bab61415afa4584f527cfc40b59ea1957e70 - languageName: node - linkType: hard - -"@hapi/topo@npm:^5.1.0": - version: 5.1.0 - resolution: "@hapi/topo@npm:5.1.0" - dependencies: - "@hapi/hoek": "npm:^9.0.0" - checksum: 10/084bfa647015f4fd3fdd51fadb2747d09ef2f5e1443d6cbada2988b0c88494f85edf257ec606c790db146ac4e34ff57f3fcb22e3299b8e06ed5c87ba7583495c - languageName: node - linkType: hard - -"@humanwhocodes/config-array@npm:^0.11.10": - version: 0.11.11 - resolution: "@humanwhocodes/config-array@npm:0.11.11" - dependencies: - "@humanwhocodes/object-schema": "npm:^1.2.1" - debug: "npm:^4.1.1" - minimatch: "npm:^3.0.5" - checksum: 10/4aad64bc4c68ec99a72c91ad9a8a9070e8da47e8fc4f51eefa2eaf56f4b0cae17dfc3ff82eb9268298f687b5bb3b68669ff542203c77bcd400dc27924d56cad6 - languageName: node - linkType: hard - -"@humanwhocodes/config-array@npm:^0.11.14": - version: 0.11.14 - resolution: "@humanwhocodes/config-array@npm:0.11.14" - dependencies: - "@humanwhocodes/object-schema": "npm:^2.0.2" - debug: "npm:^4.3.1" - minimatch: "npm:^3.0.5" - checksum: 10/3ffb24ecdfab64014a230e127118d50a1a04d11080cbb748bc21629393d100850496456bbcb4e8c438957fe0934430d731042f1264d6a167b62d32fc2863580a - languageName: node - linkType: hard - -"@humanwhocodes/module-importer@npm:^1.0.1": - version: 1.0.1 - resolution: "@humanwhocodes/module-importer@npm:1.0.1" - checksum: 10/e993950e346331e5a32eefb27948ecdee2a2c4ab3f072b8f566cd213ef485dd50a3ca497050608db91006f5479e43f91a439aef68d2a313bd3ded06909c7c5b3 - languageName: node - linkType: hard - -"@humanwhocodes/object-schema@npm:^1.2.1": - version: 1.2.1 - resolution: "@humanwhocodes/object-schema@npm:1.2.1" - checksum: 10/b48a8f87fcd5fdc4ac60a31a8bf710d19cc64556050575e6a35a4a48a8543cf8cde1598a65640ff2cdfbfd165b38f9db4fa3782bea7848eb585cc3db824002e6 - languageName: node - linkType: hard - -"@humanwhocodes/object-schema@npm:^2.0.2": - version: 2.0.2 - resolution: "@humanwhocodes/object-schema@npm:2.0.2" - checksum: 10/ef915e3e2f34652f3d383b28a9a99cfea476fa991482370889ab14aac8ecd2b38d47cc21932526c6d949da0daf4a4a6bf629d30f41b0caca25e146819cbfa70e - languageName: node - linkType: hard - -"@hutson/parse-repository-url@npm:^5.0.0": - version: 5.0.0 - resolution: "@hutson/parse-repository-url@npm:5.0.0" - checksum: 10/040bc80dd1be5b12718af8a1d2fc58bbf793d41040ad4cedfe864079fddb542f106aee998beb7e42b7ebf882237e45b559bdf1ed3f6a607a403e51d849f37118 - languageName: node - linkType: hard - -"@hyperledger/anoncreds-nodejs@npm:0.2.0": - version: 0.2.0 - resolution: "@hyperledger/anoncreds-nodejs@npm:0.2.0" - dependencies: - "@2060.io/ffi-napi": "npm:4.0.8" - "@2060.io/ref-napi": "npm:3.0.6" - "@hyperledger/anoncreds-shared": "npm:0.2.0" - "@mapbox/node-pre-gyp": "npm:^1.0.11" - ref-array-di: "npm:1.2.2" - ref-struct-di: "npm:1.1.1" - checksum: 10/76e0a44a8ebec4dbb53341f46ddc0eb9656e4aa2994f2d8954f03ab04bdc6062d2845fadb24f2950fe8d547e0a7fae4c715be3439b5a37825193472896cf093e - languageName: node - linkType: hard - -"@hyperledger/anoncreds-shared@npm:0.2.0": - version: 0.2.0 - resolution: "@hyperledger/anoncreds-shared@npm:0.2.0" - checksum: 10/629c395c84628557358e3a5fa0d4b4188f20d7a111167ac8095835ab9020096885e9db8168540aedc74ecb5982f71841929b98e0b7c2be24e34ab8da19a8abc3 - languageName: node - linkType: hard - -"@hyperledger/aries-askar-nodejs@npm:0.2.0": - version: 0.2.0 - resolution: "@hyperledger/aries-askar-nodejs@npm:0.2.0" - dependencies: - "@2060.io/ffi-napi": "npm:4.0.8" - "@2060.io/ref-napi": "npm:3.0.6" - "@hyperledger/aries-askar-shared": "npm:0.2.0" - "@mapbox/node-pre-gyp": "npm:^1.0.10" - node-cache: "npm:^5.1.2" - ref-array-di: "npm:^1.2.2" - ref-struct-di: "npm:^1.1.1" - checksum: 10/87e42cd4ba8fd7af9de7f28b6b8b580457d75546e111b9c0743ad639ec60b6f73e94636826d710ff59c18384c6a15026f5251612b4f260a83593ce4733955c2d - languageName: node - linkType: hard - -"@hyperledger/aries-askar-shared@npm:0.2.0": - version: 0.2.0 - resolution: "@hyperledger/aries-askar-shared@npm:0.2.0" - dependencies: - buffer: "npm:^6.0.3" - checksum: 10/29ef58ffad58f75c385c360fcad6856b2e927c57b2b2e0c12ab15a05a3a5015af3f10966cdb06e45d80c085d29c89f2ff8acc2679c9d71637a4dd3cfbebba64f - languageName: node - linkType: hard - -"@hyperledger/cacti-example-cbdc-bridging-frontend@workspace:examples/cactus-example-cbdc-bridging-frontend": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-example-cbdc-bridging-frontend@workspace:examples/cactus-example-cbdc-bridging-frontend" - dependencies: - "@emotion/react": "npm:^11.11.1" - "@emotion/styled": "npm:^11.11.0" - "@mui/icons-material": "npm:^5.14.19" - "@mui/material": "npm:^5.14.19" - "@testing-library/jest-dom": "npm:^5.17.0" - "@testing-library/react": "npm:^13.4.0" - "@testing-library/user-event": "npm:^13.5.0" - "@types/jest": "npm:^27.5.2" - "@types/node": "npm:18.11.9" - "@types/react": "npm:^18.2.39" - "@types/react-dom": "npm:^18.2.17" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - react: "npm:^18.2.0" - react-dom: "npm:^18.2.0" - react-scripts: "npm:5.0.1" - typescript: "npm:5.5.2" - uuid: "npm:10.0.0" - web-vitals: "npm:^2.1.4" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-ledger-browser@workspace:packages/cacti-ledger-browser": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-ledger-browser@workspace:packages/cacti-ledger-browser" - dependencies: - "@emotion/react": "npm:11.11.4" - "@emotion/styled": "npm:11.11.5" - "@mui/icons-material": "npm:5.15.10" - "@mui/lab": "npm:5.0.0-alpha.170" - "@mui/material": "npm:5.15.15" - "@supabase/supabase-js": "npm:1.35.6" - "@tanstack/eslint-plugin-query": "npm:5.28.11" - "@tanstack/react-query": "npm:5.29.2" - "@tanstack/react-query-devtools": "npm:5.29.2" - "@types/react": "npm:18.2.43" - "@types/react-dom": "npm:18.2.17" - "@vitejs/plugin-react": "npm:4.2.1" - apexcharts: "npm:3.45.2" - axios: "npm:1.7.7" - buffer: "npm:6.0.3" - ethers: "npm:6.12.1" - react: "npm:18.2.0" - react-apexcharts: "npm:1.4.1" - react-dom: "npm:18.2.0" - react-router-dom: "npm:6.21.3" - typescript: "npm:5.5.2" - vite: "npm:5.4.8" - web3: "npm:4.1.1" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-plugin-consortium-static@workspace:packages/cacti-plugin-consortium-static": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-plugin-consortium-static@workspace:packages/cacti-plugin-consortium-static" - dependencies: - "@hyperledger/cactus-api-client": "npm:2.0.0" - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/json-stable-stringify": "npm:1.0.33" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - http-errors-enhanced-cjs: "npm:2.0.1" - jose: "npm:4.15.5" - merkletreejs: "npm:0.4.0" - prom-client: "npm:15.1.3" - safe-stable-stringify: "npm:2.4.3" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3: "npm:1.6.1" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-plugin-ledger-connector-stellar@workspace:packages/cacti-plugin-ledger-connector-stellar": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-plugin-ledger-connector-stellar@workspace:packages/cacti-plugin-ledger-connector-stellar" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/http-errors": "npm:2.0.4" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - http-errors-enhanced-cjs: "npm:2.0.1" - joi: "npm:17.13.3" - npm-run-all2: "npm:6.1.2" - openapi-types: "npm:12.1.3" - prom-client: "npm:15.1.3" - run-time-error-cjs: "npm:1.4.0" - rxjs: "npm:7.8.1" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - stellar-plus: "npm:0.8.4" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-plugin-weaver-driver-fabric@workspace:packages/cacti-plugin-weaver-driver-fabric": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-plugin-weaver-driver-fabric@workspace:packages/cacti-plugin-weaver-driver-fabric" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-weaver-besu-cli@workspace:weaver/samples/besu/besu-cli": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-weaver-besu-cli@workspace:weaver/samples/besu/besu-cli" - dependencies: - "@hyperledger/cacti-weaver-protos-js": "npm:2.0.0" - "@hyperledger/cacti-weaver-sdk-besu": "npm:2.0.0" - "@truffle/contract": "npm:4.6.28" - "@types/jest": "npm:29.5.3" - "@types/node": "npm:18.11.9" - gluegun: "npm:5.1.6" - jest: "npm:29.6.2" - ts-jest: "npm:29.1.1" - ts-node: "npm:10.9.1" - typescript: "npm:5.5.2" - web3: "npm:1.10.0" - winston: "npm:3.10.0" - bin: - besu-cli: bin/besu-cli - languageName: unknown - linkType: soft - -"@hyperledger/cacti-weaver-besu-simpleasset@workspace:weaver/samples/besu/simpleasset": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-weaver-besu-simpleasset@workspace:weaver/samples/besu/simpleasset" - dependencies: - "@lazyledger/protobuf3-solidity-lib": "npm:0.6.0" - "@openzeppelin/contracts": "npm:4.9.6" - "@truffle/contract": "npm:4.6.28" - chai: "npm:4.3.7" - dotenv: "npm:16.3.1" - ganache-cli: "npm:6.12.2" - solc: "npm:0.8.21" - truffle: "npm:5.11.2" - typescript: "npm:5.5.2" - web3: "npm:1.10.0" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-weaver-besu-simplestate@workspace:weaver/samples/besu/simplestate": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-weaver-besu-simplestate@workspace:weaver/samples/besu/simplestate" - dependencies: - "@openzeppelin/contracts": "npm:4.9.6" - "@truffle/contract": "npm:4.6.28" - chai: "npm:4.3.7" - dotenv: "npm:16.3.1" - ganache-cli: "npm:6.12.2" - solc: "npm:0.8.21" - truffle: "npm:5.11.2" - web3: "npm:1.10.0" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-weaver-driver-fabric@workspace:weaver/core/drivers/fabric-driver": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-weaver-driver-fabric@workspace:weaver/core/drivers/fabric-driver" - dependencies: - "@fidm/x509": "npm:1.2.1" - "@grpc/grpc-js": "npm:1.11.3" - "@hyperledger/cacti-weaver-protos-js": "npm:2.0.0" - "@hyperledger/cacti-weaver-sdk-fabric": "npm:2.0.0" - "@types/node": "npm:18.11.9" - dotenv: "npm:8.6.0" - fabric-ca-client: "npm:2.2.20" - fabric-common: "npm:2.2.20" - fabric-network: "npm:2.2.20" - fabric-protos: "npm:2.2.20" - level: "npm:8.0.0" - nodemon: "npm:2.0.22" - typedoc: "npm:0.26.2" - typescript: "npm:5.5.2" - winston: "npm:3.10.0" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-weaver-fabric-cli@workspace:weaver/samples/fabric/fabric-cli": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-weaver-fabric-cli@workspace:weaver/samples/fabric/fabric-cli" - dependencies: - "@fidm/x509": "npm:1.2.1" - "@grpc/grpc-js": "npm:1.11.3" - "@grpc/proto-loader": "npm:0.7.13" - "@hyperledger/cacti-weaver-protos-js": "npm:2.0.0" - "@hyperledger/cacti-weaver-sdk-fabric": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/node": "npm:18.11.9" - body-parser: "npm:1.20.3" - dotenv: "npm:8.6.0" - express: "npm:4.21.0" - fabric-ca-client: "npm:2.2.20" - fabric-common: "npm:2.2.20" - fabric-network: "npm:2.2.20" - gluegun: "npm:5.1.6" - google-protobuf: "npm:3.21.4" - jest: "npm:29.6.2" - pkg: "npm:5.8.1" - protobufjs: "npm:7.4.0" - ts-jest: "npm:29.1.1" - ts-node: "npm:10.9.1" - typescript: "npm:5.5.2" - uuid: "npm:10.0.0" - winston: "npm:3.10.0" - bin: - fabric-cli: bin/fabric-cli - languageName: unknown - linkType: soft - -"@hyperledger/cacti-weaver-iin-agent@workspace:weaver/core/identity-management/iin-agent": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-weaver-iin-agent@workspace:weaver/core/identity-management/iin-agent" - dependencies: - "@fidm/x509": "npm:1.2.1" - "@grpc/grpc-js": "npm:1.11.3" - "@hyperledger/cacti-weaver-protos-js": "npm:2.0.0" - "@hyperledger/cacti-weaver-sdk-fabric": "npm:2.0.0" - "@types/jsrsasign": "npm:10.5.11" - "@types/node": "npm:18.11.9" - "@types/uuid": "npm:10.0.0" - chai: "npm:4.3.7" - chai-as-promised: "npm:7.1.1" - dotenv: "npm:8.6.0" - fabric-ca-client: "npm:2.2.20" - fabric-common: "npm:2.2.20" - fabric-network: "npm:2.2.20" - jsrsasign: "npm:11.0.0" - mocha: "npm:10.7.3" - nodemon: "npm:2.0.22" - nyc: "npm:12.0.2" - proto3-json-serializer: "npm:1.1.1" - rewire: "npm:4.0.1" - sinon: "npm:6.3.5" - sinon-chai: "npm:3.7.0" - ts-node: "npm:10.9.1" - typedoc: "npm:0.26.2" - typescript: "npm:5.5.2" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-weaver-protos-js@npm:2.0.0, @hyperledger/cacti-weaver-protos-js@workspace:weaver/common/protos-js": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-weaver-protos-js@workspace:weaver/common/protos-js" - dependencies: - "@grpc/grpc-js": "npm:1.11.3" - "@grpc/proto-loader": "npm:0.7.13" - google-protobuf: "npm:3.21.4" - grpc-tools: "npm:1.12.4" - grpc_tools_node_protoc_ts: "npm:5.3.3" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-weaver-sdk-besu@npm:2.0.0, @hyperledger/cacti-weaver-sdk-besu@workspace:weaver/sdks/besu/node": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-weaver-sdk-besu@workspace:weaver/sdks/besu/node" - dependencies: - "@hyperledger/cacti-weaver-protos-js": "npm:2.0.0" - "@types/node": "npm:18.11.9" - chai: "npm:4.3.7" - chai-as-promised: "npm:7.1.1" - log4js: "npm:6.9.1" - mocha: "npm:10.7.3" - nyc: "npm:12.0.2" - rewire: "npm:4.0.1" - sinon: "npm:6.3.5" - sinon-chai: "npm:3.7.0" - ts-node: "npm:10.9.1" - typedoc: "npm:0.26.2" - typescript: "npm:5.5.2" - web3: "npm:1.10.0" - web3-utils: "npm:1.10.0" - languageName: unknown - linkType: soft - -"@hyperledger/cacti-weaver-sdk-fabric@npm:2.0.0, @hyperledger/cacti-weaver-sdk-fabric@workspace:weaver/sdks/fabric/interoperation-node-sdk": - version: 0.0.0-use.local - resolution: "@hyperledger/cacti-weaver-sdk-fabric@workspace:weaver/sdks/fabric/interoperation-node-sdk" - dependencies: - "@grpc/grpc-js": "npm:1.11.3" - "@grpc/proto-loader": "npm:0.7.13" - "@hyperledger/cacti-weaver-protos-js": "npm:2.0.0" - "@types/node": "npm:18.11.9" - chai: "npm:4.3.7" - chai-as-promised: "npm:7.1.1" - elliptic: "npm:6.5.7" - fabric-common: "npm:2.2.20" - fabric-network: "npm:2.2.20" - fabric-protos: "npm:2.2.20" - js-sha3: "npm:0.8.0" - jsrsasign: "npm:11.0.0" - log4js: "npm:6.9.1" - mocha: "npm:10.7.3" - nyc: "npm:12.0.2" - pkcs11js: "npm:1.3.1" - rewire: "npm:4.0.1" - sinon: "npm:6.3.5" - sinon-chai: "npm:3.7.0" - sjcl: "npm:1.0.8" - sshpk: "npm:1.17.0" - ts-node: "npm:10.9.1" - typedoc: "npm:0.26.2" - typescript: "npm:5.5.2" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-api-client@npm:2.0.0, @hyperledger/cactus-api-client@workspace:packages/cactus-api-client": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-api-client@workspace:packages/cactus-api-client" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-consortium-manual": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/jsonwebtoken": "npm:9.0.0" - "@types/lodash": "npm:4.14.195" - "@types/node": "npm:18.11.9" - http-status-codes: "npm:2.3.0" - jsonwebtoken: "npm:9.0.0" - lodash: "npm:4.17.21" - rxjs: "npm:7.8.1" - socket.io-client-fixed-types: "npm:4.5.4" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-cmd-api-server@npm:2.0.0, @hyperledger/cactus-cmd-api-server@workspace:packages/cactus-cmd-api-server": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-cmd-api-server@workspace:packages/cactus-cmd-api-server" - dependencies: - "@bufbuild/buf": "npm:1.30.0" - "@bufbuild/protobuf": "npm:1.10.0" - "@bufbuild/protoc-gen-es": "npm:1.8.0" - "@connectrpc/connect": "npm:1.4.0" - "@connectrpc/connect-express": "npm:1.4.0" - "@connectrpc/connect-fastify": "npm:1.4.0" - "@connectrpc/connect-node": "npm:1.4.0" - "@connectrpc/protoc-gen-connect-es": "npm:1.4.0" - "@grpc/grpc-js": "npm:1.11.3" - "@grpc/proto-loader": "npm:0.7.13" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-vault": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@openapitools/openapi-generator-cli": "npm:2.7.0" - "@thream/socketio-jwt": "npm:2.1.1" - "@types/async-exit-hook": "npm:2.0.2" - "@types/benchmark": "npm:2.1.5" - "@types/compression": "npm:1.7.4" - "@types/convict": "npm:6.1.1" - "@types/cors": "npm:2.8.12" - "@types/express": "npm:5.0.0" - "@types/express-http-proxy": "npm:1.6.2" - "@types/google-protobuf": "npm:3.15.5" - "@types/json-stable-stringify": "npm:1.0.34" - "@types/jsonwebtoken": "npm:8.5.4" - "@types/multer": "npm:1.4.7" - "@types/node-forge": "npm:1.0.1" - "@types/passport": "npm:1.0.7" - "@types/passport-oauth2": "npm:1.4.11" - "@types/passport-saml": "npm:1.1.3" - "@types/passport-strategy": "npm:0.2.35" - "@types/semver": "npm:7.3.8" - "@types/uuid": "npm:10.0.0" - "@types/xml2js": "npm:0.4.9" - "@vercel/ncc": "npm:0.38.1" - async-exit-hook: "npm:2.0.1" - axios: "npm:1.7.7" - benchmark: "npm:2.1.4" - bluebird: "npm:3.7.2" - body-parser: "npm:1.20.3" - compression: "npm:1.7.4" - convict: "npm:6.2.4" - convict-format-with-validator: "npm:6.2.0" - cors: "npm:2.8.5" - express: "npm:4.21.0" - express-http-proxy: "npm:1.6.2" - express-jwt: "npm:8.4.1" - express-openapi-validator: "npm:5.2.0" - express-rate-limit: "npm:6.7.0" - fastify: "npm:4.28.1" - fs-extra: "npm:11.2.0" - google-protobuf: "npm:3.21.4" - grpc-tools: "npm:1.12.4" - grpc_tools_node_protoc_ts: "npm:5.3.3" - http-status-codes: "npm:2.1.4" - jose: "npm:4.15.5" - json-stable-stringify: "npm:1.0.2" - lmify: "npm:0.3.0" - node-forge: "npm:1.3.0" - prom-client: "npm:15.1.3" - protobufjs: "npm:7.4.0" - run-time-error-cjs: "npm:1.4.0" - rxjs: "npm:7.8.1" - safe-stable-stringify: "npm:2.4.3" - semver: "npm:7.6.2" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - tsx: "npm:4.16.2" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-common-example-server@npm:2.0.0, @hyperledger/cactus-common-example-server@workspace:examples/cactus-common-example-server": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-common-example-server@workspace:examples/cactus-common-example-server" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/config": "npm:3.3.0" - "@types/cookie-parser": "npm:1.4.5" - "@types/debug": "npm:4.1.8" - "@types/escape-html": "npm:1.0.1" - "@types/express": "npm:5.0.0" - "@types/http-errors": "npm:1.6.3" - "@types/js-yaml": "npm:4.0.5" - "@types/jsonwebtoken": "npm:9.0.6" - "@types/lodash": "npm:4.14.195" - "@types/morgan": "npm:1.9.1" - "@types/node": "npm:18.11.9" - "@types/shelljs": "npm:0.8.11" - body-parser: "npm:1.20.3" - config: "npm:3.3.7" - cookie-parser: "npm:1.4.5" - debug: "npm:3.1.0" - escape-html: "npm:1.0.3" - ethereumjs-common: "npm:1.5.2" - ethereumjs-tx: "npm:2.1.2" - express: "npm:4.21.0" - fabric-network: "npm:2.2.20" - http-errors: "npm:1.6.3" - http-terminator: "npm:3.2.0" - js-yaml: "npm:3.14.1" - jsonwebtoken: "npm:9.0.2" - lodash: "npm:4.17.21" - log4js: "npm:6.4.1" - morgan: "npm:1.10.0" - shelljs: "npm:0.8.5" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - ts-node: "npm:8.9.1" - web3: "npm:1.6.1" - xmlhttprequest: "npm:1.8.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-common@npm:0.9.0": - version: 0.9.0 - resolution: "@hyperledger/cactus-common@npm:0.9.0" - dependencies: - json-stable-stringify: "npm:1.0.1" - key-encoder: "npm:2.0.3" - loglevel: "npm:1.7.1" - loglevel-plugin-prefix: "npm:0.8.4" - secp256k1: "npm:4.0.2" - sha3: "npm:2.1.4" - checksum: 10/0e5b334c76f916079bf54f81de9d252907b70b5148871d42f51c55eda6777f32997c31d18e24cb5eaa8573ea2f3b1c9a858ef874bf788832ba66d5a9d734ef94 - languageName: node - linkType: hard - -"@hyperledger/cactus-common@npm:2.0.0, @hyperledger/cactus-common@workspace:packages/cactus-common": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-common@workspace:packages/cactus-common" - dependencies: - "@grpc/grpc-js": "npm:1.11.3" - "@types/json-stable-stringify": "npm:1.0.33" - "@types/sanitize-html": "npm:2.9.5" - "@types/secp256k1": "npm:4.0.3" - "@types/uuid": "npm:10.0.0" - fast-safe-stringify: "npm:2.1.1" - json-stable-stringify: "npm:1.0.1" - key-encoder: "npm:2.0.3" - loglevel: "npm:1.7.1" - loglevel-plugin-prefix: "npm:0.8.4" - run-time-error-cjs: "npm:1.4.0" - sanitize-html: "npm:2.12.1" - secp256k1: "npm:4.0.3" - sha3: "npm:2.1.4" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-core-api@npm:2.0.0, @hyperledger/cactus-core-api@workspace:packages/cactus-core-api": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-core-api@workspace:packages/cactus-core-api" - dependencies: - "@bufbuild/protobuf": "npm:1.10.0" - "@connectrpc/connect": "npm:1.4.0" - "@grpc/grpc-js": "npm:1.11.3" - "@grpc/proto-loader": "npm:0.7.13" - "@hyperledger/cactus-common": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/google-protobuf": "npm:3.15.5" - ajv: "npm:8.17.1" - ajv-draft-04: "npm:1.0.0" - ajv-formats: "npm:3.0.1" - axios: "npm:1.7.7" - google-protobuf: "npm:3.21.4" - grpc-tools: "npm:1.12.4" - grpc_tools_node_protoc_ts: "npm:5.3.3" - make-dir-cli: "npm:3.1.0" - npm-run-all: "npm:4.1.5" - rxjs: "npm:7.8.1" - socket.io: "npm:4.6.2" - typescript-optional: "npm:2.0.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-core@npm:2.0.0, @hyperledger/cactus-core@workspace:packages/cactus-core": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-core@workspace:packages/cactus-core" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/http-errors": "npm:2.0.2" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - express-jwt-authz: "npm:2.4.1" - express-openapi-validator: "npm:5.2.0" - http-errors: "npm:2.0.0" - http-errors-enhanced-cjs: "npm:2.0.1" - node-mocks-http: "npm:1.14.0" - run-time-error-cjs: "npm:1.4.0" - safe-stable-stringify: "npm:2.4.3" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-example-carbon-accounting-backend@workspace:examples/cactus-example-carbon-accounting-backend": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-example-carbon-accounting-backend@workspace:examples/cactus-example-carbon-accounting-backend" - dependencies: - "@hyperledger/cactus-api-client": "npm:2.0.0" - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-example-carbon-accounting-business-logic-plugin": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-xdai": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@openzeppelin/contracts": "npm:4.9.6" - "@openzeppelin/contracts-upgradeable": "npm:4.9.6" - "@types/express": "npm:5.0.0" - "@types/fs-extra": "npm:11.0.4" - "@types/json-stable-stringify": "npm:1.0.34" - "@types/qs": "npm:6.9.14" - "@types/uuid": "npm:10.0.0" - async-exit-hook: "npm:2.0.1" - express-jwt: "npm:8.4.1" - fabric-network: "npm:2.2.20" - fs-extra: "npm:11.2.0" - hardhat: "npm:2.17.2" - http-cache-semantics: "npm:4.1.1" - http-status-codes: "npm:2.1.4" - jose: "npm:4.15.5" - json-stable-stringify: "npm:1.0.2" - openapi-types: "npm:12.1.3" - qs: "npm:6.13.0" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3-core: "npm:1.6.1" - web3-utils: "npm:1.6.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-example-carbon-accounting-business-logic-plugin@npm:2.0.0, @hyperledger/cactus-example-carbon-accounting-business-logic-plugin@workspace:examples/cactus-example-carbon-accounting-business-logic-plugin": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-example-carbon-accounting-business-logic-plugin@workspace:examples/cactus-example-carbon-accounting-business-logic-plugin" - dependencies: - "@hyperledger/cactus-api-client": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-consortium-manual": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-xdai": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/ssh2": "npm:0.5.47" - "@types/uuid": "npm:10.0.0" - async-exit-hook: "npm:2.0.1" - axios: "npm:1.7.7" - express: "npm:4.21.0" - openapi-types: "npm:12.1.3" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-example-carbon-accounting-frontend@workspace:examples/cactus-example-carbon-accounting-frontend": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-example-carbon-accounting-frontend@workspace:examples/cactus-example-carbon-accounting-frontend" - dependencies: - "@angular-builders/custom-webpack": "npm:16.0.1" - "@angular-devkit/build-angular": "npm:16.2.1" - "@angular/cli": "npm:16.2.1" - "@angular/common": "npm:16.2.4" - "@angular/compiler": "npm:16.2.4" - "@angular/compiler-cli": "npm:16.2.4" - "@angular/core": "npm:16.2.4" - "@angular/forms": "npm:16.2.4" - "@angular/language-service": "npm:16.2.4" - "@angular/platform-browser": "npm:16.2.4" - "@angular/platform-browser-dynamic": "npm:16.2.4" - "@angular/router": "npm:16.2.4" - "@hyperledger/cactus-api-client": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-example-carbon-accounting-business-logic-plugin": "npm:2.0.0" - "@hyperledger/cactus-plugin-consortium-manual": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@ionic-native/core": "npm:5.36.0" - "@ionic-native/splash-screen": "patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch" - "@ionic-native/status-bar": "patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch" - "@ionic/angular": "npm:7.3.3" - "@ionic/angular-toolkit": "npm:10.0.0" - browserify-fs: "npm:1.0.0" - https-browserify: "npm:1.0.0" - net-browserify: "npm:0.2.4" - os-browserify: "npm:0.3.0" - path-browserify: "npm:1.0.1" - rxjs: "npm:7.8.1" - tls-browserify: "npm:0.2.2" - tslib: "npm:2.6.2" - zone.js: "npm:0.13.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-example-cbdc-bridging-backend@workspace:examples/cactus-example-cbdc-bridging-backend": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-example-cbdc-bridging-backend@workspace:examples/cactus-example-cbdc-bridging-backend" - dependencies: - "@hyperledger/cactus-api-client": "npm:2.0.0" - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-xdai": "npm:2.0.0" - "@hyperledger/cactus-plugin-object-store-ipfs": "npm:2.0.0" - "@hyperledger/cactus-plugin-satp-hermes": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@openzeppelin/contracts": "npm:4.9.6" - "@openzeppelin/contracts-upgradeable": "npm:4.9.6" - "@types/crypto-js": "npm:4.1.1" - "@types/cucumber": "npm:4.0.4" - "@types/express": "npm:5.0.0" - "@types/express-jwt": "npm:6.0.2" - "@types/fs-extra": "npm:11.0.4" - "@types/node": "npm:18.11.9" - "@types/uuid": "npm:10.0.0" - async-exit-hook: "npm:2.0.1" - axios: "npm:1.7.7" - crypto-js: "npm:4.2.0" - cucumber: "npm:5.0.3" - dotenv: "npm:16.0.1" - fabric-network: "npm:2.2.20" - fs-extra: "npm:11.2.0" - hardhat: "npm:2.17.2" - http-status-codes: "npm:2.1.4" - jose: "npm:4.15.5" - knex: "npm:2.5.1" - kubo-rpc-client: "npm:3.0.1" - nyc: "npm:13.1.0" - openapi-types: "npm:12.1.3" - remix-tests: "npm:0.1.34" - sqlite3: "npm:5.1.5" - ts-node: "npm:7.0.1" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3-core: "npm:1.10.1" - web3-utils: "npm:1.10.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-example-discounted-asset-trade-client@workspace:examples/cactus-example-discounted-asset-trade-client": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-example-discounted-asset-trade-client@workspace:examples/cactus-example-discounted-asset-trade-client" - dependencies: - "@aries-framework/anoncreds": "npm:0.5.0-alpha.71" - "@aries-framework/anoncreds-rs": "npm:0.5.0-alpha.71" - "@aries-framework/askar": "npm:0.5.0-alpha.71" - "@aries-framework/core": "npm:0.5.0-alpha.71" - "@aries-framework/indy-sdk": "npm:0.5.0-alpha.71" - "@aries-framework/indy-vdr": "npm:0.5.0-alpha.71" - "@aries-framework/node": "npm:0.5.0-alpha.71" - "@hyperledger/anoncreds-nodejs": "npm:0.2.0" - "@hyperledger/aries-askar-nodejs": "npm:0.2.0" - "@hyperledger/indy-vdr-nodejs": "npm:0.2.0" - "@types/inquirer": "npm:8.2.6" - axios: "npm:1.7.7" - inquirer: "npm:8.2.6" - loglevel: "npm:1.8.1" - bin: - run-discounted-asset-trade-client: dist/lib/main/typescript/scripts/run-discounted-asset-trade-client.js - setup-credentials: dist/lib/main/typescript/scripts/setup-credentials.js - languageName: unknown - linkType: soft - -"@hyperledger/cactus-example-discounted-asset-trade@workspace:examples/cactus-example-discounted-asset-trade": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-example-discounted-asset-trade@workspace:examples/cactus-example-discounted-asset-trade" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-common-example-server": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-aries": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@types/elliptic": "npm:6.4.14" - "@types/escape-html": "npm:1.0.1" - "@types/express": "npm:5.0.0" - "@types/jsonwebtoken": "npm:9.0.6" - "@types/jsrsasign": "npm:10.5.8" - "@types/node": "npm:18.11.9" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - cookie-parser: "npm:1.4.6" - debug: "npm:3.1.0" - elliptic: "npm:6.5.7" - escape-html: "npm:1.0.3" - ethereumjs-common: "npm:1.5.2" - ethereumjs-tx: "npm:2.1.2" - express: "npm:4.21.0" - fabric-ca-client: "npm:2.2.20" - fabric-network: "npm:2.2.20" - http-errors: "npm:1.6.3" - indy-sdk: "npm:1.16.0-dev-1655" - jsonwebtoken: "npm:9.0.2" - jsrsasign: "npm:11.0.0" - log4js: "npm:6.4.0" - morgan: "npm:1.9.1" - run-time-error-cjs: "npm:1.4.0" - shelljs: "npm:0.8.5" - socket.io: "npm:4.6.2" - ts-node: "npm:8.9.1" - uuid: "npm:10.0.0" - xmlhttprequest: "npm:1.8.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-example-electricity-trade@workspace:examples/cactus-example-electricity-trade": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-example-electricity-trade@workspace:examples/cactus-example-electricity-trade" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-common-example-server": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-sawtooth": "npm:2.0.0" - "@types/escape-html": "npm:1.0.1" - "@types/express": "npm:5.0.0" - "@types/node": "npm:18.11.9" - "@types/uuid": "npm:10.0.0" - body-parser: "npm:1.20.3" - cookie-parser: "npm:1.4.6" - debug: "npm:3.1.0" - escape-html: "npm:1.0.3" - ethereumjs-common: "npm:1.5.2" - ethereumjs-tx: "npm:2.1.2" - express: "npm:4.21.0" - fabric-ca-client: "npm:2.2.20" - fabric-network: "npm:2.2.20" - http-errors: "npm:1.6.3" - js-yaml: "npm:3.14.1" - jsonwebtoken: "npm:9.0.2" - log4js: "npm:6.4.0" - morgan: "npm:1.9.1" - shelljs: "npm:0.8.5" - socket.io: "npm:4.6.2" - ts-node: "npm:8.9.1" - uuid: "npm:10.0.0" - web3: "npm:1.8.1" - xmlhttprequest: "npm:1.8.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-example-supply-chain-backend@workspace:examples/cactus-example-supply-chain-backend": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-example-supply-chain-backend@workspace:examples/cactus-example-supply-chain-backend" - dependencies: - "@hyperledger/cactus-api-client": "npm:2.0.0" - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-example-supply-chain-business-logic-plugin": "npm:2.0.0" - "@hyperledger/cactus-example-supply-chain-frontend": "npm:2.0.0" - "@hyperledger/cactus-plugin-consortium-manual": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-xdai": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/uuid": "npm:10.0.0" - async-exit-hook: "npm:2.0.1" - axios: "npm:1.7.7" - dotenv: "npm:16.0.0" - express: "npm:4.21.0" - express-jwt: "npm:8.4.1" - fabric-network: "npm:2.2.20" - jose: "npm:4.15.5" - openapi-types: "npm:12.1.3" - solc: "npm:0.8.6" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3-core: "npm:1.6.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-example-supply-chain-business-logic-plugin@npm:2.0.0, @hyperledger/cactus-example-supply-chain-business-logic-plugin@workspace:examples/cactus-example-supply-chain-business-logic-plugin": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-example-supply-chain-business-logic-plugin@workspace:examples/cactus-example-supply-chain-business-logic-plugin" - dependencies: - "@hyperledger/cactus-api-client": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-consortium-manual": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-xdai": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/ssh2": "npm:0.5.47" - "@types/uuid": "npm:10.0.0" - async-exit-hook: "npm:2.0.1" - axios: "npm:1.7.7" - express: "npm:4.21.0" - openapi-types: "npm:12.1.3" - run-time-error-cjs: "npm:1.4.0" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-example-supply-chain-frontend@npm:2.0.0, @hyperledger/cactus-example-supply-chain-frontend@workspace:examples/cactus-example-supply-chain-frontend": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-example-supply-chain-frontend@workspace:examples/cactus-example-supply-chain-frontend" - dependencies: - "@angular-builders/custom-webpack": "npm:17.0.2" - "@angular-devkit/build-angular": "npm:17.3.8" - "@angular/cli": "npm:17.3.8" - "@angular/common": "npm:17.3.11" - "@angular/compiler": "npm:17.3.11" - "@angular/compiler-cli": "npm:17.3.11" - "@angular/core": "npm:17.3.11" - "@angular/forms": "npm:17.3.11" - "@angular/language-service": "npm:17.3.11" - "@angular/platform-browser": "npm:17.3.11" - "@angular/platform-browser-dynamic": "npm:17.3.11" - "@angular/router": "npm:17.3.11" - "@hyperledger/cactus-api-client": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-example-supply-chain-business-logic-plugin": "npm:2.0.0" - "@hyperledger/cactus-plugin-consortium-manual": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-xdai": "npm:2.0.0" - "@ionic-native/core": "npm:5.36.0" - "@ionic-native/splash-screen": "patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch" - "@ionic-native/status-bar": "patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch" - "@ionic/angular": "npm:8.2.5" - "@ionic/angular-toolkit": "npm:10.0.0" - "@types/uuid": "npm:10.0.0" - browserify-fs: "npm:1.0.0" - https-browserify: "npm:1.0.0" - net-browserify: "npm:0.2.4" - os-browserify: "npm:0.3.0" - path-browserify: "npm:1.0.1" - run-time-error: "npm:1.4.0" - rxjs: "npm:7.8.1" - tls-browserify: "npm:0.2.2" - tslib: "npm:2.6.2" - uuid: "npm:10.0.0" - zone.js: "npm:0.14.7" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-bungee-hermes@workspace:packages/cactus-plugin-bungee-hermes": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-bungee-hermes@workspace:packages/cactus-plugin-bungee-hermes" - dependencies: - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@hyperledger/cactus-test-geth-ledger": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/crypto-js": "npm:4.0.1" - "@types/express": "npm:5.0.0" - "@types/fs-extra": "npm:11.0.4" - "@types/tape": "npm:4.13.4" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - fabric-network: "npm:2.2.20" - fs-extra: "npm:11.2.0" - http-errors-enhanced-cjs: "npm:2.0.1" - key-encoder: "npm:2.0.3" - merkletreejs: "npm:0.3.11" - socket.io: "npm:4.6.2" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3: "npm:1.6.1" - web3-core: "npm:1.6.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-consortium-manual@npm:2.0.0, @hyperledger/cactus-plugin-consortium-manual@workspace:packages/cactus-plugin-consortium-manual": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-consortium-manual@workspace:packages/cactus-plugin-consortium-manual" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/json-stable-stringify": "npm:1.0.33" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - jose: "npm:4.15.5" - json-stable-stringify: "npm:1.0.1" - prom-client: "npm:15.1.3" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-htlc-coordinator-besu@workspace:extensions/cactus-plugin-htlc-coordinator-besu": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-htlc-coordinator-besu@workspace:extensions/cactus-plugin-htlc-coordinator-besu" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-htlc-eth-besu": "npm:2.0.0" - "@hyperledger/cactus-plugin-htlc-eth-besu-erc20": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - fast-safe-stringify: "npm:2.1.1" - joi: "npm:17.13.3" - openapi-types: "npm:12.1.3" - prom-client: "npm:15.1.3" - run-time-error-cjs: "npm:1.4.0" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3-eth-abi: "npm:4.2.1" - web3-utils: "npm:4.2.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-htlc-eth-besu-erc20@npm:2.0.0, @hyperledger/cactus-plugin-htlc-eth-besu-erc20@workspace:packages/cactus-plugin-htlc-eth-besu-erc20": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-htlc-eth-besu-erc20@workspace:packages/cactus-plugin-htlc-eth-besu-erc20" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@types/express": "npm:5.0.0" - axios: "npm:1.7.7" - express: "npm:4.21.0" - joi: "npm:17.13.3" - openapi-types: "npm:12.1.3" - typescript-optional: "npm:2.0.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-htlc-eth-besu@npm:2.0.0, @hyperledger/cactus-plugin-htlc-eth-besu@workspace:packages/cactus-plugin-htlc-eth-besu": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-htlc-eth-besu@workspace:packages/cactus-plugin-htlc-eth-besu" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/express": "npm:5.0.0" - axios: "npm:1.7.7" - bn.js: "npm:5.2.1" - dotenv: "npm:16.0.3" - ds-test: "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0" - ethers: "npm:6.3.0" - express: "npm:4.21.0" - forge-std: "https://github.com/foundry-rs/forge-std.git#66bf4e2c92cf507531599845e8d5a08cc2e3b5bb" - joi: "npm:17.13.3" - openapi-types: "npm:12.1.3" - typescript-optional: "npm:2.0.1" - web3js-quorum: "npm:22.4.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-keychain-aws-sm@workspace:packages/cactus-plugin-keychain-aws-sm": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-keychain-aws-sm@workspace:packages/cactus-plugin-keychain-aws-sm" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/request": "npm:2.48.7" - "@types/uuid": "npm:10.0.0" - aws-sdk: "npm:2.965.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - http-status-codes: "npm:2.1.4" - internal-ip: "npm:6.2.0" - openapi-types: "npm:12.1.3" - prom-client: "npm:15.1.3" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-keychain-azure-kv@workspace:packages/cactus-plugin-keychain-azure-kv": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-keychain-azure-kv@workspace:packages/cactus-plugin-keychain-azure-kv" - dependencies: - "@azure/identity": "npm:4.2.1" - "@azure/keyvault-secrets": "npm:4.3.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/request": "npm:2.48.7" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - http-status-codes: "npm:2.1.4" - internal-ip: "npm:6.2.0" - openapi-types: "npm:12.1.3" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-keychain-google-sm@workspace:packages/cactus-plugin-keychain-google-sm": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-keychain-google-sm@workspace:packages/cactus-plugin-keychain-google-sm" - dependencies: - "@google-cloud/secret-manager": "npm:5.0.1" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/request": "npm:2.48.7" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - google-gax: "npm:4.0.5" - http-status-codes: "npm:2.1.4" - internal-ip: "npm:6.2.0" - openapi-types: "npm:12.1.3" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-keychain-memory-wasm@workspace:packages/cactus-plugin-keychain-memory-wasm": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-keychain-memory-wasm@workspace:packages/cactus-plugin-keychain-memory-wasm" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - cpy-cli: "npm:4.2.0" - del-cli: "npm:5.1.0" - express: "npm:4.21.0" - prom-client: "npm:15.1.3" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-keychain-memory@npm:2.0.0, @hyperledger/cactus-plugin-keychain-memory@workspace:packages/cactus-plugin-keychain-memory": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-keychain-memory@workspace:packages/cactus-plugin-keychain-memory" - dependencies: - "@bufbuild/buf": "npm:1.30.0" - "@bufbuild/protobuf": "npm:1.10.0" - "@bufbuild/protoc-gen-es": "npm:1.8.0" - "@connectrpc/connect": "npm:1.4.0" - "@connectrpc/protoc-gen-connect-es": "npm:1.4.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - npm-run-all2: "npm:6.1.2" - prom-client: "npm:15.1.3" - rxjs: "npm:7.8.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-keychain-vault@npm:2.0.0, @hyperledger/cactus-plugin-keychain-vault@workspace:packages/cactus-plugin-keychain-vault": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-keychain-vault@workspace:packages/cactus-plugin-keychain-vault" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.3" - "@types/express": "npm:5.0.0" - "@types/internal-ip": "npm:4.1.0" - "@types/request": "npm:2.48.7" - "@types/tape-promise": "npm:4.0.1" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - http-status-codes: "npm:2.1.4" - internal-ip: "npm:6.2.0" - node-vault: "npm:0.9.22" - openapi-types: "npm:12.1.3" - prom-client: "npm:15.1.3" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-ledger-connector-aries@npm:2.0.0, @hyperledger/cactus-plugin-ledger-connector-aries@workspace:packages/cactus-plugin-ledger-connector-aries": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-ledger-connector-aries@workspace:packages/cactus-plugin-ledger-connector-aries" - dependencies: - "@aries-framework/anoncreds": "npm:0.5.0-alpha.71" - "@aries-framework/anoncreds-rs": "npm:0.5.0-alpha.71" - "@aries-framework/askar": "npm:0.5.0-alpha.71" - "@aries-framework/core": "npm:0.5.0-alpha.71" - "@aries-framework/indy-vdr": "npm:0.5.0-alpha.71" - "@aries-framework/node": "npm:0.5.0-alpha.71" - "@hyperledger/anoncreds-nodejs": "npm:0.2.0" - "@hyperledger/aries-askar-nodejs": "npm:0.2.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@hyperledger/indy-vdr-nodejs": "npm:0.2.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - jest: "npm:29.6.2" - jest-extended: "npm:4.0.1" - rxjs: "npm:7.8.1" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-ledger-connector-besu@npm:2.0.0, @hyperledger/cactus-plugin-ledger-connector-besu@workspace:packages/cactus-plugin-ledger-connector-besu": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-ledger-connector-besu@workspace:packages/cactus-plugin-ledger-connector-besu" - dependencies: - "@grpc/grpc-js": "npm:1.11.3" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@openapitools/openapi-generator-cli": "npm:2.7.0" - "@types/benchmark": "npm:2.1.5" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/fs-extra": "npm:11.0.4" - "@types/google-protobuf": "npm:3.15.5" - "@types/http-errors": "npm:2.0.4" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - benchmark: "npm:2.1.4" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - fs-extra: "npm:11.2.0" - google-protobuf: "npm:3.21.4" - grpc-tools: "npm:1.12.4" - grpc_tools_node_protoc_ts: "npm:5.3.3" - http-errors: "npm:2.0.0" - http-errors-enhanced-cjs: "npm:2.0.1" - joi: "npm:17.13.3" - key-encoder: "npm:2.0.3" - npm-run-all2: "npm:6.1.2" - openapi-types: "npm:12.1.3" - prom-client: "npm:15.1.3" - protobufjs: "npm:7.4.0" - run-time-error-cjs: "npm:1.4.0" - rxjs: "npm:7.8.1" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - tsx: "npm:4.16.2" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3: "npm:1.6.1" - web3-core: "npm:1.6.1" - web3-eth: "npm:1.6.1" - web3-eth-contract: "npm:1.6.1" - web3-utils: "npm:1.6.1" - web3js-quorum: "npm:22.4.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-ledger-connector-cdl@workspace:packages/cactus-plugin-ledger-connector-cdl": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-ledger-connector-cdl@workspace:packages/cactus-plugin-ledger-connector-cdl" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/node": "npm:18.11.9" - "@types/sanitize-html": "npm:2.6.2" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - jest-extended: "npm:4.0.1" - sanitize-html: "npm:2.12.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-ledger-connector-corda@npm:2.0.0, @hyperledger/cactus-plugin-ledger-connector-corda@workspace:packages/cactus-plugin-ledger-connector-corda": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-ledger-connector-corda@workspace:packages/cactus-plugin-ledger-connector-corda" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/multer": "npm:1.4.7" - "@types/temp": "npm:0.9.1" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - express-openapi-validator: "npm:5.2.0" - http-errors-enhanced-cjs: "npm:2.0.1" - internal-ip: "npm:6.2.0" - joi: "npm:17.13.3" - node-fetch: "npm:2.7.0" - node-ssh: "npm:13.1.0" - prom-client: "npm:15.1.3" - rxjs: "npm:7.8.1" - temp: "npm:0.9.4" - typescript-optional: "npm:2.0.1" - urlcat: "npm:3.1.0" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-ledger-connector-ethereum@npm:2.0.0, @hyperledger/cactus-plugin-ledger-connector-ethereum@workspace:packages/cactus-plugin-ledger-connector-ethereum": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-ledger-connector-ethereum@workspace:packages/cactus-plugin-ledger-connector-ethereum" - dependencies: - "@ethereumjs/common": "npm:4.0.0" - "@ethereumjs/tx": "npm:5.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-test-geth-ledger": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/js-yaml": "npm:4.0.5" - "@types/minimist": "npm:1.2.2" - "@types/sanitize-html": "npm:2.9.5" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - chalk: "npm:4.1.2" - ethers: "npm:6.8.1" - express: "npm:4.21.0" - http-proxy-middleware: "npm:2.0.6" - js-yaml: "npm:4.1.0" - minimist: "npm:1.2.8" - prom-client: "npm:15.1.3" - run-time-error-cjs: "npm:1.4.0" - rxjs: "npm:7.8.1" - sanitize-html: "npm:2.12.1" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3: "npm:4.4.0" - web3-eth: "npm:4.4.0" - web3-eth-accounts: "npm:4.1.1" - web3-eth-contract: "npm:4.2.0" - bin: - cacti-ethereum-connector-status: dist/lib/scripts/get-ethereum-connector-status.js - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-ledger-connector-fabric@npm:2.0.0, @hyperledger/cactus-plugin-ledger-connector-fabric@workspace:packages/cactus-plugin-ledger-connector-fabric": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-ledger-connector-fabric@workspace:packages/cactus-plugin-ledger-connector-fabric" - dependencies: - "@fidm/x509": "npm:1.2.1" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/bn.js": "npm:5.1.0" - "@types/body-parser": "npm:1.19.4" - "@types/elliptic": "npm:6.4.16" - "@types/express": "npm:5.0.0" - "@types/fs-extra": "npm:11.0.4" - "@types/jsrsasign": "npm:8.0.13" - "@types/multer": "npm:1.4.7" - "@types/node-vault": "npm:0.9.13" - "@types/sanitize-html": "npm:2.9.5" - "@types/temp": "npm:0.9.1" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - bl: "npm:6.0.16" - bn.js: "npm:4.12.0" - body-parser: "npm:1.20.3" - elliptic: "npm:6.5.7" - express: "npm:4.21.0" - fabric-ca-client: "npm:2.5.0-snapshot.23" - fabric-common: "npm:2.5.0-snapshot.23" - fabric-network: "npm:2.5.0-snapshot.23" - fabric-protos: "npm:2.5.0-snapshot.23" - fast-safe-stringify: "npm:2.1.1" - form-data: "npm:4.0.0" - fs-extra: "npm:11.2.0" - http-status-codes: "npm:2.1.4" - internal-ip: "npm:6.2.0" - jsrsasign: "npm:11.0.0" - long: "npm:5.2.3" - multer: "npm:1.4.5-lts.1" - ngo: "npm:2.7.0" - node-ssh: "npm:13.1.0" - node-vault: "npm:0.9.22" - openapi-types: "npm:12.1.3" - prom-client: "npm:15.1.3" - run-time-error-cjs: "npm:1.4.0" - rxjs: "npm:7.8.1" - sanitize-filename: "npm:1.6.3" - sanitize-html: "npm:2.12.1" - secp256k1: "npm:4.0.3" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - temp: "npm:0.9.4" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - ws-identity-client: "npm:1.0.2" - ws-wallet: "npm:1.1.5" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-ledger-connector-iroha2@npm:2.0.0, @hyperledger/cactus-plugin-ledger-connector-iroha2@workspace:packages/cactus-plugin-ledger-connector-iroha2": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-ledger-connector-iroha2@workspace:packages/cactus-plugin-ledger-connector-iroha2" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@iroha2/client": "npm:4.0.0" - "@iroha2/crypto-core": "npm:0.1.1" - "@iroha2/crypto-target-node": "npm:0.4.0" - "@iroha2/data-model": "npm:4.0.0" - "@types/express": "npm:5.0.0" - "@types/sanitize-html": "npm:2.9.5" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - fast-safe-stringify: "npm:2.1.1" - hada: "npm:0.0.8" - jest: "npm:29.6.2" - jest-extended: "npm:4.0.1" - rxjs: "npm:7.8.1" - sanitize-html: "npm:2.12.1" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - undici: "npm:6.19.8" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-ledger-connector-polkadot@workspace:packages/cactus-plugin-ledger-connector-polkadot": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-ledger-connector-polkadot@workspace:packages/cactus-plugin-ledger-connector-polkadot" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@polkadot/api": "npm:10.9.1" - "@polkadot/api-contract": "npm:10.9.1" - "@polkadot/rpc-provider": "npm:10.9.1" - "@polkadot/types": "npm:10.9.1" - "@polkadot/util": "npm:12.6.2" - "@types/express": "npm:5.0.0" - "@types/joi": "npm:17.2.3" - "@types/multer": "npm:1.4.7" - "@types/ssh2": "npm:0.5.44" - "@types/supertest": "npm:2.0.11" - "@types/temp": "npm:0.9.1" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - bl: "npm:6.0.16" - express: "npm:4.21.0" - express-openapi-validator: "npm:5.2.0" - form-data: "npm:4.0.0" - fs-extra: "npm:11.2.0" - http-errors-enhanced-cjs: "npm:2.0.1" - http-status-codes: "npm:2.1.4" - joi: "npm:17.13.3" - multer: "npm:1.4.5-lts.1" - ngo: "npm:2.6.2" - openapi-types: "npm:12.1.3" - prom-client: "npm:15.1.3" - run-time-error: "npm:1.4.0" - supertest: "npm:6.1.6" - temp: "npm:0.9.1" - tslint: "npm:6.1.3" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-ledger-connector-sawtooth@npm:2.0.0, @hyperledger/cactus-plugin-ledger-connector-sawtooth@workspace:packages/cactus-plugin-ledger-connector-sawtooth": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-ledger-connector-sawtooth@workspace:packages/cactus-plugin-ledger-connector-sawtooth" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - cbor: "npm:9.0.1" - express: "npm:4.21.0" - rxjs: "npm:7.8.1" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-ledger-connector-xdai@npm:2.0.0, @hyperledger/cactus-plugin-ledger-connector-xdai@workspace:packages/cactus-plugin-ledger-connector-xdai": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-ledger-connector-xdai@workspace:packages/cactus-plugin-ledger-connector-xdai" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - joi: "npm:17.13.3" - openapi-types: "npm:12.1.3" - prom-client: "npm:15.1.3" - run-time-error-cjs: "npm:1.4.0" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3: "npm:1.6.1" - web3-core: "npm:1.6.1" - web3-eth: "npm:1.6.1" - web3-eth-contract: "npm:1.6.1" - web3-utils: "npm:1.6.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-object-store-ipfs@npm:2.0.0, @hyperledger/cactus-plugin-object-store-ipfs@workspace:extensions/cactus-plugin-object-store-ipfs": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-object-store-ipfs@workspace:extensions/cactus-plugin-object-store-ipfs" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@multiformats/multiaddr": "npm:11.6.1" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - ipfs-core-types: "npm:0.14.1" - ipfs-unixfs: "npm:9.0.1" - kubo-rpc-client: "npm:3.0.1" - kubo-rpc-client-esm-cjs: "npm:3.0.1" - multiformats: "npm:11.0.2" - run-time-error-cjs: "npm:1.4.0" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-persistence-ethereum@workspace:packages/cactus-plugin-persistence-ethereum": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-persistence-ethereum@workspace:packages/cactus-plugin-persistence-ethereum" - dependencies: - "@ethersproject/abi": "npm:5.7.0" - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "npm:2.0.0" - "@hyperledger/cactus-test-geth-ledger": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@openapitools/openapi-generator-cli": "npm:2.7.0" - "@types/express": "npm:5.0.0" - "@types/pg": "npm:8.6.5" - async-mutex: "npm:0.4.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - jest-extended: "npm:4.0.1" - npm-run-all: "npm:4.1.5" - pg: "npm:8.8.0" - run-time-error-cjs: "npm:1.4.0" - rxjs: "npm:7.8.1" - socket.io: "npm:4.6.2" - uuid: "npm:10.0.0" - web3: "npm:4.0.3" - web3-eth-accounts: "npm:4.0.3" - web3-utils: "npm:4.3.0" - web3-validator: "npm:2.0.2" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-persistence-fabric@workspace:packages/cactus-plugin-persistence-fabric": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-persistence-fabric@workspace:packages/cactus-plugin-persistence-fabric" - dependencies: - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@openapitools/openapi-generator-cli": "npm:2.7.0" - "@types/express": "npm:5.0.0" - "@types/pg": "npm:8.6.5" - async-mutex: "npm:0.4.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - fabric-network: "npm:2.5.0-snapshot.23" - jest-extended: "npm:4.0.1" - pg: "npm:8.8.0" - run-time-error-cjs: "npm:1.4.0" - rxjs: "npm:7.8.1" - socket.io: "npm:4.6.2" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-plugin-satp-hermes@npm:2.0.0, @hyperledger/cactus-plugin-satp-hermes@workspace:packages/cactus-plugin-satp-hermes": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-satp-hermes@workspace:packages/cactus-plugin-satp-hermes" - dependencies: - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@hyperledger/cactus-plugin-object-store-ipfs": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/crypto-js": "npm:4.0.1" - "@types/express": "npm:5.0.0" - "@types/fs-extra": "npm:11.0.4" - "@types/tape": "npm:4.13.4" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - crypto-js: "npm:4.2.0" - express: "npm:4.21.0" - fabric-network: "npm:2.2.20" - fs-extra: "npm:11.2.0" - knex: "npm:2.4.0" - kubo-rpc-client: "npm:3.0.1" - secp256k1: "npm:4.0.3" - socket.io: "npm:4.6.2" - sqlite3: "npm:5.1.5" - typescript: "npm:5.5.2" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3: "npm:1.6.1" - web3-utils: "npm:1.6.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-api-client@workspace:packages/cactus-test-api-client": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-api-client@workspace:packages/cactus-test-api-client" - dependencies: - "@hyperledger/cactus-api-client": "npm:2.0.0" - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-consortium-manual": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/uuid": "npm:10.0.0" - jose: "npm:4.15.5" - uuid: "npm:10.0.0" - web3: "npm:1.6.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-cmd-api-server@workspace:packages/cactus-test-cmd-api-server": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-cmd-api-server@workspace:packages/cactus-test-cmd-api-server" - dependencies: - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-vault": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/uuid": "npm:10.0.0" - express-jwt-authz: "npm:2.4.1" - jose: "npm:4.15.5" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-geth-ledger@npm:2.0.0, @hyperledger/cactus-test-geth-ledger@workspace:packages/cactus-test-geth-ledger": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-geth-ledger@workspace:packages/cactus-test-geth-ledger" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/dockerode": "npm:3.2.7" - dockerode: "npm:3.3.0" - internal-ip: "npm:6.2.0" - run-time-error-cjs: "npm:1.4.0" - web3: "npm:4.0.3" - web3-eth-accounts: "npm:4.0.3" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-plugin-consortium-manual@workspace:packages/cactus-test-plugin-consortium-manual": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-plugin-consortium-manual@workspace:packages/cactus-test-plugin-consortium-manual" - dependencies: - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-consortium-manual": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - jose: "npm:4.15.5" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20@npm:2.0.0, @hyperledger/cactus-test-plugin-htlc-eth-besu-erc20@workspace:packages/cactus-test-plugin-htlc-eth-besu-erc20": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-plugin-htlc-eth-besu-erc20@workspace:packages/cactus-test-plugin-htlc-eth-besu-erc20" - dependencies: - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-htlc-eth-besu-erc20": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - uuid: "npm:10.0.0" - web3-eth-abi: "npm:4.0.3" - web3-utils: "npm:4.2.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-plugin-htlc-eth-besu@workspace:packages/cactus-test-plugin-htlc-eth-besu": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-plugin-htlc-eth-besu@workspace:packages/cactus-test-plugin-htlc-eth-besu" - dependencies: - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-htlc-eth-besu": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - key-encoder: "npm:2.0.3" - uuid: "npm:10.0.0" - web3: "npm:1.6.1" - web3js-quorum: "npm:22.4.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-plugin-keychain-memory@workspace:packages/cactus-test-plugin-keychain-memory": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-plugin-keychain-memory@workspace:packages/cactus-test-plugin-keychain-memory" - dependencies: - "@connectrpc/connect": "npm:1.4.0" - "@connectrpc/connect-node": "npm:1.4.0" - "@connectrpc/connect-web": "npm:1.4.0" - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - express: "npm:4.21.0" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-plugin-ledger-connector-besu@workspace:packages/cactus-test-plugin-ledger-connector-besu": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-plugin-ledger-connector-besu@workspace:packages/cactus-test-plugin-ledger-connector-besu" - dependencies: - "@grpc/grpc-js": "npm:1.11.3" - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@hyperledger/cactus-verifier-client": "npm:2.0.0" - "@types/express": "npm:5.0.0" - "@types/uuid": "npm:10.0.0" - axios: "npm:1.7.7" - express: "npm:4.21.0" - http-status-codes: "npm:2.3.0" - key-encoder: "npm:2.0.3" - socket.io: "npm:4.6.2" - uuid: "npm:10.0.0" - web3: "npm:1.6.1" - web3-core: "npm:1.6.1" - web3js-quorum: "npm:22.4.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-plugin-ledger-connector-ethereum@workspace:packages/cactus-test-plugin-ledger-connector-ethereum": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-plugin-ledger-connector-ethereum@workspace:packages/cactus-test-plugin-ledger-connector-ethereum" - dependencies: - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "npm:2.0.0" - "@hyperledger/cactus-test-geth-ledger": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@hyperledger/cactus-verifier-client": "npm:2.0.0" - "@types/lodash": "npm:4.14.195" - "@types/uuid": "npm:10.0.0" - lodash: "npm:4.17.21" - uuid: "npm:10.0.0" - web3: "npm:4.4.0" - web3-eth-contract: "npm:4.2.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-tooling@npm:2.0.0, @hyperledger/cactus-test-tooling@workspace:packages/cactus-test-tooling": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-tooling@workspace:packages/cactus-test-tooling" - dependencies: - "@aries-framework/askar": "npm:0.5.0-alpha.58" - "@aries-framework/core": "npm:0.5.0-alpha.58" - "@aries-framework/indy-vdr": "npm:0.5.0-alpha.58" - "@aries-framework/node": "npm:0.5.0-alpha.58" - "@hyperledger/aries-askar-nodejs": "npm:0.2.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/indy-vdr-nodejs": "npm:0.2.0" - "@types/dockerode": "npm:3.2.7" - "@types/esm": "npm:3.2.0" - "@types/fs-extra": "npm:11.0.4" - "@types/js-yaml": "npm:4.0.3" - "@types/lodash": "npm:4.14.172" - "@types/node": "npm:18.11.9" - "@types/node-forge": "npm:1.3.0" - "@types/ssh2": "npm:0.5.47" - "@types/ssh2-streams": "npm:0.1.9" - "@types/tar-stream": "npm:2.2.1" - "@types/temp": "npm:0.9.1" - axios: "npm:1.7.7" - compare-versions: "npm:3.6.0" - dockerode: "npm:3.3.0" - elliptic: "npm:6.5.7" - esm: "npm:3.2.25" - execa: "npm:5.1.1" - fabric-ca-client: "npm:2.5.0-snapshot.23" - fabric-network: "npm:2.5.0-snapshot.23" - fs-extra: "npm:11.2.0" - internal-ip: "npm:6.2.0" - is-port-reachable: "npm:3.0.0" - joi: "npm:17.13.3" - js-yaml: "npm:4.1.0" - keycloak-admin: "npm:1.14.22" - lodash: "npm:4.17.21" - node-forge: "npm:1.3.0" - node-ssh: "npm:13.1.0" - p-retry: "npm:4.6.1" - run-time-error-cjs: "npm:1.4.0" - socket.io: "npm:4.6.2" - socket.io-client-fixed-types: "npm:4.5.4" - tar-stream: "npm:2.2.0" - temp: "npm:0.9.4" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - web3: "npm:1.6.1" - web3-core: "npm:1.6.1" - web3-utils: "npm:1.6.1" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-test-verifier-client@workspace:packages/cactus-test-verifier-client": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-test-verifier-client@workspace:packages/cactus-test-verifier-client" - dependencies: - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "npm:2.0.0" - "@hyperledger/cactus-test-geth-ledger": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@hyperledger/cactus-verifier-client": "npm:2.0.0" - "@types/body-parser": "npm:1.19.4" - "@types/express": "npm:5.0.0" - "@types/node": "npm:18.11.9" - "@types/uuid": "npm:10.0.0" - body-parser: "npm:1.20.3" - express: "npm:4.21.0" - log4js: "npm:6.4.1" - socket.io: "npm:4.6.2" - uuid: "npm:10.0.0" - web3: "npm:1.7.3" - web3-core: "npm:1.7.3" - web3-eth-accounts: "npm:4.0.3" - languageName: unknown - linkType: soft - -"@hyperledger/cactus-verifier-client@npm:2.0.0, @hyperledger/cactus-verifier-client@workspace:packages/cactus-verifier-client": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-verifier-client@workspace:packages/cactus-verifier-client" - dependencies: - "@hyperledger/cactus-api-client": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-corda": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-iroha2": "npm:2.0.0" - "@hyperledger/cactus-plugin-ledger-connector-sawtooth": "npm:2.0.0" - jest-extended: "npm:4.0.1" - rxjs: "npm:7.8.1" - peerDependencies: - "@hyperledger/cactus-api-client": 2.x - "@hyperledger/cactus-plugin-ledger-connector-besu": 2.x - "@hyperledger/cactus-plugin-ledger-connector-corda": 2.x - "@hyperledger/cactus-plugin-ledger-connector-ethereum": 2.x - "@hyperledger/cactus-plugin-ledger-connector-fabric": 2.x - "@hyperledger/cactus-plugin-ledger-connector-iroha2": 2.x - "@hyperledger/cactus-plugin-ledger-connector-sawtooth": 2.x - peerDependenciesMeta: - "@hyperledger/cactus-plugin-ledger-connector-besu": - optional: true - "@hyperledger/cactus-plugin-ledger-connector-corda": - optional: true - "@hyperledger/cactus-plugin-ledger-connector-ethereum": - optional: true - "@hyperledger/cactus-plugin-ledger-connector-fabric": - optional: true - "@hyperledger/cactus-plugin-ledger-connector-iroha2": - optional: true - "@hyperledger/cactus-plugin-ledger-connector-sawtooth": - optional: true - languageName: unknown - linkType: soft - -"@hyperledger/cactus-workshop-examples-2022-11-14@workspace:examples/cactus-workshop-examples-2022-11-14": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-workshop-examples-2022-11-14@workspace:examples/cactus-workshop-examples-2022-11-14" - dependencies: - "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" - "@hyperledger/cactus-common": "npm:2.0.0" - "@hyperledger/cactus-core": "npm:2.0.0" - "@hyperledger/cactus-core-api": "npm:2.0.0" - "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@types/uuid": "npm:10.0.0" - kubo-rpc-client: "npm:3.0.1" - typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" - languageName: unknown - linkType: soft - -"@hyperledger/cactus@workspace:.": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus@workspace:." - dependencies: - "@babel/parser": "npm:7.24.7" - "@babel/types": "npm:7.24.7" - "@bufbuild/buf": "npm:1.30.0" - "@bufbuild/protobuf": "npm:1.10.0" - "@bufbuild/protoc-gen-es": "npm:1.8.0" - "@commitlint/cli": "npm:17.7.1" - "@commitlint/config-conventional": "npm:17.7.0" - "@connectrpc/connect": "npm:1.4.0" - "@connectrpc/protoc-gen-connect-es": "npm:1.4.0" - "@lerna-lite/cli": "npm:3.7.0" - "@lerna-lite/exec": "npm:3.7.0" - "@lerna-lite/list": "npm:3.7.0" - "@lerna-lite/publish": "npm:3.7.0" - "@lerna-lite/run": "npm:3.7.0" - "@lerna-lite/version": "npm:3.7.0" - "@openapitools/openapi-generator-cli": "npm:2.7.0" - "@redocly/openapi-core": "npm:1.15.0" - "@types/adm-zip": "npm:0.5.0" - "@types/benchmark": "npm:2.1.5" - "@types/debug": "npm:4.1.12" - "@types/fs-extra": "npm:11.0.4" - "@types/jest": "npm:29.5.3" - "@types/madge": "npm:5.0.3" - "@types/node": "npm:18.11.9" - "@types/node-fetch": "npm:2.6.4" - "@types/tape": "npm:4.13.4" - "@types/tape-promise": "npm:4.0.1" - "@types/uuid": "npm:10.0.0" - "@types/yargs": "npm:17.0.24" - "@typescript-eslint/eslint-plugin": "npm:7.1.0" - "@typescript-eslint/parser": "npm:7.1.0" - adm-zip: "npm:0.5.10" - benchmark: "npm:2.1.4" - buffer: "npm:6.0.3" - cpy-cli: "npm:4.2.0" - cross-env: "npm:7.0.3" - crypto-browserify: "npm:3.12.0" - cspell: "npm:8.10.4" - debug: "npm:4.3.5" - del: "npm:7.1.0" - del-cli: "npm:5.1.0" - depcheck: "npm:1.4.7" - es-main: "npm:1.2.0" - eslint: "npm:8.57.0" - eslint-config-prettier: "npm:9.1.0" - eslint-config-standard: "npm:17.1.0" - eslint-plugin-import: "npm:2.29.1" - eslint-plugin-node: "npm:11.1.0" - eslint-plugin-prettier: "npm:5.1.3" - eslint-plugin-promise: "npm:6.1.1" - eslint-plugin-standard: "npm:5.0.0" - fast-safe-stringify: "npm:2.1.1" - fs-extra: "npm:11.2.0" - globby: "npm:12.2.0" - google-protobuf: "npm:3.21.4" - grpc-tools: "npm:1.12.4" - grpc_tools_node_protoc_ts: "npm:5.3.3" - husky: "npm:7.0.4" - inquirer: "npm:8.2.6" - jest: "npm:29.6.2" - jest-extended: "npm:4.0.1" - json5: "npm:2.2.3" - license-report: "npm:6.4.0" - lint-staged: "npm:11.2.6" - madge: "npm:7.0.0" - make-dir-cli: "npm:3.1.0" - node-polyfill-webpack-plugin: "npm:1.1.4" - npm-run-all: "npm:4.1.5" - npm-watch: "npm:0.11.0" - openapi-types: "npm:12.1.3" - prettier: "npm:3.2.5" - protoc-gen-ts: "npm:0.8.7" - replace: "npm:1.2.2" - run-time-error: "npm:1.4.0" - run-time-error-cjs: "npm:1.4.0" - secp256k1: "npm:4.0.3" - semver-parser: "npm:4.1.4" - shebang-loader: "npm:0.0.1" - simple-git: "npm:3.19.1" - sort-package-json: "npm:1.57.0" - source-map-loader: "npm:4.0.1" - stream-browserify: "npm:3.0.0" - tap: "npm:16.3.8" - tape: "npm:5.6.6" - tape-promise: "npm:4.0.0" - ts-jest: "npm:29.1.1" - ts-loader: "npm:9.4.4" - ts-node: "npm:10.9.1" - tsx: "npm:4.16.2" - typescript: "npm:5.5.2" - web3: "npm:4.1.1" - web3-core: "npm:4.1.1" - web3-eth: "npm:4.1.1" - web3-utils: "npm:4.3.0" - webpack: "npm:5.95.0" - webpack-cli: "npm:4.10.0" - wget-improved: "npm:3.4.0" - yargs: "npm:17.7.2" - dependenciesMeta: - "@apollo/protobufjs": - built: false - "@nestjs/core": - built: false - "@openapitools/openapi-generator-cli": - built: false - "@trufflesuite/bigint-buffer": - built: false - aws-sdk: - built: false - bufferutil: - built: false - cbor: - built: false - classic-level: - built: false - core-js: - built: false - cpu-features: - built: false - deasync: - built: false - es5-ext: - built: false - esbuild: - built: false - indy-sdk: - built: false - iso-constants: - built: false - keccak: - built: false - keytar: - built: false - leveldown: - built: false - nice-napi: - built: false - nodemon: - built: false - pkcs11js: - built: false - protobufjs: - built: false - secp256k1: - built: false - sqlite3: - built: true - ssh2: - built: false - truffle: - built: false - utf-8-validate: - built: false - web3: - built: false - web3-bzz: - built: false - web3-shh: - built: false - languageName: unknown - linkType: soft - -"@hyperledger/indy-vdr-nodejs@npm:0.2.0": - version: 0.2.0 - resolution: "@hyperledger/indy-vdr-nodejs@npm:0.2.0" - dependencies: - "@2060.io/ffi-napi": "npm:4.0.8" - "@2060.io/ref-napi": "npm:3.0.6" - "@hyperledger/indy-vdr-shared": "npm:0.2.0" - "@mapbox/node-pre-gyp": "npm:^1.0.10" - ref-array-di: "npm:^1.2.2" - ref-struct-di: "npm:^1.1.1" - checksum: 10/19b65fe81673610a49d8c297b1d72c685a9c676fcb2966307f2ae0986577171c71cd934043bdf760feef7da4107cd825125512d3d260f4228de860983c541afe - languageName: node - linkType: hard - -"@hyperledger/indy-vdr-shared@npm:0.2.0": - version: 0.2.0 - resolution: "@hyperledger/indy-vdr-shared@npm:0.2.0" - checksum: 10/729760438fbc6b7b98686fa654384a517645463106e747560564f6cbe4e702b52cd2996983b5d23551d29eac58c21beaf889f6195313ccdd7ea07c115fd19a25 - languageName: node - linkType: hard - -"@inquirer/figures@npm:^1.0.3": - version: 1.0.3 - resolution: "@inquirer/figures@npm:1.0.3" - checksum: 10/fa5c46527580c64ba151e1399f91772670f5f59e47045a3d2366188ed4cab1b63b7fb2a6d40d340f622cb174ca6dd3d5e22b962811c00548f9a9b4024b105dce - languageName: node - linkType: hard - -"@ionic-native/core@npm:5.36.0": - version: 5.36.0 - resolution: "@ionic-native/core@npm:5.36.0" - dependencies: - "@types/cordova": "npm:latest" - peerDependencies: - rxjs: ^5.5.0 || ^6.5.0 - checksum: 10/9bfe547b83bdab6092b2cb33b4768500d5a9aeb99d8cd5e72353debf592a3b28268ec36f16113b4a314b7ab1238464528a311b93ea2107b37825c4d6075ed2bd - languageName: node - linkType: hard - -"@ionic-native/splash-screen@npm:5.36.0": - version: 5.36.0 - resolution: "@ionic-native/splash-screen@npm:5.36.0" - dependencies: - "@types/cordova": "npm:latest" - peerDependencies: - "@ionic-native/core": ^5.1.0 - rxjs: ^5.5.0 || ^6.5.0 - checksum: 10/4675603dddde9683810a26c30226031006530b0184b5547bdc67c47258e595618a1db58153aa1694ddd49c431cf838745a57c3d8c2e7eeca40d3374850487397 - languageName: node - linkType: hard - -"@ionic-native/splash-screen@patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch": - version: 5.36.0 - resolution: "@ionic-native/splash-screen@patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch::version=5.36.0&hash=a5ae6e" - dependencies: - "@types/cordova": "npm:latest" - peerDependencies: - "@ionic-native/core": ^5.1.0 - rxjs: ^5.5.0 || ^6.5.0 - checksum: 10/acb82a20b17d6db326a11388f39cb1cb66dd3524d3d6e4de68bb9fa47176c62a217caeef57edcba6a1cf8ac3dbf476bd8c1ca4d7d64914baa5ccbb37ecd5cd18 - languageName: node - linkType: hard - -"@ionic-native/status-bar@npm:5.36.0": - version: 5.36.0 - resolution: "@ionic-native/status-bar@npm:5.36.0" - dependencies: - "@types/cordova": "npm:latest" - peerDependencies: - "@ionic-native/core": ^5.1.0 - rxjs: ^5.5.0 || ^6.5.0 - checksum: 10/0367b2448aee13938a218ea6f95c90223ccf7c8dd6bccbd283af19c0265d232f439a23cbd61f0a2a98843f819e017e1a0cf821123e5efab37ba2dc1abffcb5d9 - languageName: node - linkType: hard - -"@ionic-native/status-bar@patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch": - version: 5.36.0 - resolution: "@ionic-native/status-bar@patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch::version=5.36.0&hash=3fcc00" - dependencies: - "@types/cordova": "npm:latest" - peerDependencies: - "@ionic-native/core": ^5.1.0 - rxjs: ^5.5.0 || ^6.5.0 - checksum: 10/90d1849f7ac83072aa66c4e403dbc8eb4025d51aac6ca5e47047963dc450b5227bf52527c0700000fb1dae7e3df991235638933b6705b4412d458eeb6dc98722 - languageName: node - linkType: hard - -"@ionic/angular-toolkit@npm:10.0.0": - version: 10.0.0 - resolution: "@ionic/angular-toolkit@npm:10.0.0" - dependencies: - "@angular-devkit/core": "npm:^16.0.0" - "@angular-devkit/schematics": "npm:^16.0.0" - "@schematics/angular": "npm:^16.0.0" - checksum: 10/91ec62504c553a3e1882c02fc35a94ee61a806ff4a3236fbb783902552574554183cd8dbe3125763cc144714202b85554202459ca6758400f326592f76e9a5c4 - languageName: node - linkType: hard - -"@ionic/angular@npm:7.3.3": - version: 7.3.3 - resolution: "@ionic/angular@npm:7.3.3" - dependencies: - "@ionic/core": "npm:7.3.3" - ionicons: "npm:^7.0.0" - jsonc-parser: "npm:^3.0.0" - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/core": ">=14.0.0" - "@angular/forms": ">=14.0.0" - "@angular/router": ">=14.0.0" - rxjs: ">=7.5.0" - zone.js: ">=0.11.0" - checksum: 10/0c8dc955a6d42eed72b29fa493077e54fad54e2f9af6c0ede444e3a174e51f5832f96615b0011d578d4705ae4b18e3942b0e2125ad8bca86cd09b243468418b7 - languageName: node - linkType: hard - -"@ionic/angular@npm:8.2.5": - version: 8.2.5 - resolution: "@ionic/angular@npm:8.2.5" - dependencies: - "@ionic/core": "npm:8.2.5" - ionicons: "npm:^7.0.0" - jsonc-parser: "npm:^3.0.0" - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/core": ">=16.0.0" - "@angular/forms": ">=16.0.0" - "@angular/router": ">=16.0.0" - rxjs: ">=7.5.0" - zone.js: ">=0.13.0" - checksum: 10/4306a85f848e1ea162f7612efb8559cf38ca1290cebd1594fc955889f6d8977ce4c41b68ef178aca753354b4563667c7ceec7ac6856e9818f63be66f8c587600 - languageName: node - linkType: hard - -"@ionic/core@npm:7.3.3": - version: 7.3.3 - resolution: "@ionic/core@npm:7.3.3" - dependencies: - "@stencil/core": "npm:^4.1.0" - ionicons: "npm:7.1.0" - tslib: "npm:^2.1.0" - checksum: 10/95489e67d4a29636faced46788d2b69aeec38c112b1efdddc2836fe5c790dacf85b3bb2636960f02b7c3308e2715acf2dc6ab38667c109b6ada7021c0295da18 - languageName: node - linkType: hard - -"@ionic/core@npm:8.2.5": - version: 8.2.5 - resolution: "@ionic/core@npm:8.2.5" - dependencies: - "@stencil/core": "npm:^4.19.2" - ionicons: "npm:^7.2.2" - tslib: "npm:^2.1.0" - checksum: 10/c6b35de1d485293b835ed395c706e70d6a1c7a82a8a6afbaf27a7d27d90bad2e4406bfcb3463b4a21e4dedaf0ef17930417a51a281c164bf4e4c40c65b4ea2ae - languageName: node - linkType: hard - -"@ipld/dag-cbor@npm:^9.0.0": - version: 9.0.6 - resolution: "@ipld/dag-cbor@npm:9.0.6" - dependencies: - cborg: "npm:^4.0.0" - multiformats: "npm:^12.0.1" - checksum: 10/f2ed6fe867dd5b4ea9b36af6e2658f6f3edc8758c7132c5974cf5eddcea46e2b6025032e9fbc878f7615a8e2f1c5d1176327f8d32a255bbe0b2a8a07db3753bd - languageName: node - linkType: hard - -"@ipld/dag-json@npm:^10.0.0": - version: 10.1.5 - resolution: "@ipld/dag-json@npm:10.1.5" - dependencies: - cborg: "npm:^4.0.0" - multiformats: "npm:^12.0.1" - checksum: 10/6f06e4e45aaf57d655d8684ace717b0ba9fe8f455aeb6ec82f706d55e65052fb57a5c2e64794ac4430b07b32c8c283b9f45acc31ab366fe7a899d0f34419c297 - languageName: node - linkType: hard - -"@ipld/dag-pb@npm:^4.0.0": - version: 4.0.6 - resolution: "@ipld/dag-pb@npm:4.0.6" - dependencies: - multiformats: "npm:^12.0.1" - checksum: 10/49b3f98e53d4459ea53462a3c29dddaeb02e0217a4bab32615059ca66eef0a7a631a5a994bebc818372409b23d7f356bf43f0d36bff451cd9e7f8a4b8e3745f1 - languageName: node - linkType: hard - -"@iroha2/client@npm:4.0.0": - version: 4.0.0 - resolution: "@iroha2/client@npm:4.0.0" - dependencies: - "@iroha2/crypto-core": "npm:^0.1.1" - "@iroha2/data-model": "npm:4.0.0" - "@types/ws": "npm:^8.2.2" - debug: "npm:^4.3.4" - emittery: "npm:^0.10.1" - json-bigint: "npm:^1.0.0" - ws: "npm:^8.4.0" - checksum: 10/8ac4bda3d1ae9dd56bb995046760d5b8db99d0a830ab48d8c4334bb637bd207ca9dba04c1a6461b89b19f7c448cd7092458da84bf225c47dc9b88a7ac154dd91 - languageName: node - linkType: hard - -"@iroha2/crypto-core@npm:0.1.1, @iroha2/crypto-core@npm:^0.1.1": - version: 0.1.1 - resolution: "@iroha2/crypto-core@npm:0.1.1" - checksum: 10/83dc315cadbade695c0f38acb03461476f5c3844f46a2c7faf8f61f479436a0ddd8ad6664d53cc5e4ab93442a8b5c43aea9303f540af47beb07fdbd6b59968f8 - languageName: node - linkType: hard - -"@iroha2/crypto-target-node@npm:0.4.0": - version: 0.4.0 - resolution: "@iroha2/crypto-target-node@npm:0.4.0" - dependencies: - "@iroha2/crypto-core": "npm:^0.1.1" - checksum: 10/a58263f6b7aaadcf298099caf13459b31f019066ea38c986507fb00bf7c103d312ff1ed8434a2ba0e77c45d3e5812aec1ef69af845ed6b77db23b590f7d458d5 - languageName: node - linkType: hard - -"@iroha2/data-model@npm:4.0.0": - version: 4.0.0 - resolution: "@iroha2/data-model@npm:4.0.0" - dependencies: - "@iroha2/i64-fixnum": "npm:^0.4.2" - "@scale-codec/definition-runtime": "npm:^2.2.2" - checksum: 10/8172fe31991dd7c83bbedb19ce5ffccb7fc4e982db3dc97993f09981d81ff5dbadfa98961396dc88b3880c129d44becdff50aa873c180ffdd4a564765a629898 - languageName: node - linkType: hard - -"@iroha2/i64-fixnum@npm:^0.4.2": - version: 0.4.2 - resolution: "@iroha2/i64-fixnum@npm:0.4.2" - dependencies: - "@scale-codec/util": "npm:^1.1.1" - checksum: 10/7a675a70f85e6d03a02e88bea10f0bf743c0a4ddc5c03854b6a7256fd8647ea5a408ea58fec7de8a639fe37ae41176371a12db52d09e7ea1ca6546c72eed6524 - languageName: node - linkType: hard - -"@isaacs/cliui@npm:^8.0.2": - version: 8.0.2 - resolution: "@isaacs/cliui@npm:8.0.2" - dependencies: - string-width: "npm:^5.1.2" - string-width-cjs: "npm:string-width@^4.2.0" - strip-ansi: "npm:^7.0.1" - strip-ansi-cjs: "npm:strip-ansi@^6.0.1" - wrap-ansi: "npm:^8.1.0" - wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" - checksum: 10/e9ed5fd27c3aec1095e3a16e0c0cf148d1fee55a38665c35f7b3f86a9b5d00d042ddaabc98e8a1cb7463b9378c15f22a94eb35e99469c201453eb8375191f243 - languageName: node - linkType: hard - -"@isaacs/import-jsx@npm:^4.0.1": - version: 4.0.1 - resolution: "@isaacs/import-jsx@npm:4.0.1" - dependencies: - "@babel/core": "npm:^7.5.5" - "@babel/plugin-proposal-object-rest-spread": "npm:^7.5.5" - "@babel/plugin-transform-destructuring": "npm:^7.5.0" - "@babel/plugin-transform-react-jsx": "npm:^7.3.0" - caller-path: "npm:^3.0.1" - find-cache-dir: "npm:^3.2.0" - make-dir: "npm:^3.0.2" - resolve-from: "npm:^3.0.0" - rimraf: "npm:^3.0.0" - checksum: 10/6844139a62132933246c4882ffb335f9641cc416e10a317d1d1887eee9f4a2572e5a899d19b8d5a29c102f00104def38c399e2b06582c4076228eb230de17c7d - languageName: node - linkType: hard - -"@isaacs/string-locale-compare@npm:^1.1.0": - version: 1.1.0 - resolution: "@isaacs/string-locale-compare@npm:1.1.0" - checksum: 10/85682b14602f32023e487f62bc4076fe13cd3e887df9cca36acc0d41ea99b403100d586acb9367331526f3ee737d802ecaa582f59020998d75991e62a7ef0db5 - languageName: node - linkType: hard - -"@istanbuljs/load-nyc-config@npm:^1.0.0": - version: 1.1.0 - resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" - dependencies: - camelcase: "npm:^5.3.1" - find-up: "npm:^4.1.0" - get-package-type: "npm:^0.1.0" - js-yaml: "npm:^3.13.1" - resolve-from: "npm:^5.0.0" - checksum: 10/b000a5acd8d4fe6e34e25c399c8bdbb5d3a202b4e10416e17bfc25e12bab90bb56d33db6089ae30569b52686f4b35ff28ef26e88e21e69821d2b85884bd055b8 - languageName: node - linkType: hard - -"@istanbuljs/schema@npm:^0.1.2": - version: 0.1.3 - resolution: "@istanbuljs/schema@npm:0.1.3" - checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b - languageName: node - linkType: hard - -"@jest/console@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/console@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - jest-message-util: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - slash: "npm:^3.0.0" - checksum: 10/f724ff9693b09711fded8b87145c3446091bde87f572e210667c2b8290b5364c776f3a99c7d1fd6d5642f7f9424d5acc312c12e9cc4da2ef0260d34547869fdd - languageName: node - linkType: hard - -"@jest/console@npm:^28.1.3": - version: 28.1.3 - resolution: "@jest/console@npm:28.1.3" - dependencies: - "@jest/types": "npm:^28.1.3" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - jest-message-util: "npm:^28.1.3" - jest-util: "npm:^28.1.3" - slash: "npm:^3.0.0" - checksum: 10/82153eb24e61bd442bff350a7537d598e7c49097aabd9545b340582dcf1f17e5749baa342a67e564816a3a6ce746038b618ed9f66702140264bfa1e1d5cc9e5e - languageName: node - linkType: hard - -"@jest/console@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/console@npm:29.6.2" - dependencies: - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - jest-message-util: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - slash: "npm:^3.0.0" - checksum: 10/8a11314aef8b85912f72952a89b50605a117b60b133a52abb247748392220db836923e5251e23650abdf6c1a373cb7e5267683249a9e83ba63f8700e66874ba4 - languageName: node - linkType: hard - -"@jest/core@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/core@npm:27.5.1" - dependencies: - "@jest/console": "npm:^27.5.1" - "@jest/reporters": "npm:^27.5.1" - "@jest/test-result": "npm:^27.5.1" - "@jest/transform": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.0.0" - emittery: "npm:^0.8.1" - exit: "npm:^0.1.2" - graceful-fs: "npm:^4.2.9" - jest-changed-files: "npm:^27.5.1" - jest-config: "npm:^27.5.1" - jest-haste-map: "npm:^27.5.1" - jest-message-util: "npm:^27.5.1" - jest-regex-util: "npm:^27.5.1" - jest-resolve: "npm:^27.5.1" - jest-resolve-dependencies: "npm:^27.5.1" - jest-runner: "npm:^27.5.1" - jest-runtime: "npm:^27.5.1" - jest-snapshot: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - jest-validate: "npm:^27.5.1" - jest-watcher: "npm:^27.5.1" - micromatch: "npm:^4.0.4" - rimraf: "npm:^3.0.0" - slash: "npm:^3.0.0" - strip-ansi: "npm:^6.0.0" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - checksum: 10/79eb63c3197336c39de6a3341d3f5e7dbca7e20796bd4ee3d725e4ef2832f4d07242898a8af6c9de19ebd700983385a3df16c024b4497f8beb666c8ffe96ccb4 - languageName: node - linkType: hard - -"@jest/core@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/core@npm:29.6.2" - dependencies: - "@jest/console": "npm:^29.6.2" - "@jest/reporters": "npm:^29.6.2" - "@jest/test-result": "npm:^29.6.2" - "@jest/transform": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - exit: "npm:^0.1.2" - graceful-fs: "npm:^4.2.9" - jest-changed-files: "npm:^29.5.0" - jest-config: "npm:^29.6.2" - jest-haste-map: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-regex-util: "npm:^29.4.3" - jest-resolve: "npm:^29.6.2" - jest-resolve-dependencies: "npm:^29.6.2" - jest-runner: "npm:^29.6.2" - jest-runtime: "npm:^29.6.2" - jest-snapshot: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - jest-validate: "npm:^29.6.2" - jest-watcher: "npm:^29.6.2" - micromatch: "npm:^4.0.4" - pretty-format: "npm:^29.6.2" - slash: "npm:^3.0.0" - strip-ansi: "npm:^6.0.0" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - checksum: 10/08e3560504e491a73433cc626b3519fd90e44aa584a8faf524a93e5e563ee3433239e6612a82af98360a9d26a08aabd147325d74055ae4c25282d2df7cbe0660 - languageName: node - linkType: hard - -"@jest/environment@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/environment@npm:27.5.1" - dependencies: - "@jest/fake-timers": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - jest-mock: "npm:^27.5.1" - checksum: 10/74a2a4427f82b096c4f7223c56a27f64487ee4639b017129f31e99ebb2e9a614eb365ec77c3701d6eedc1c8d711ad2dd4b31d6dfad72cbb6d73a4f1fdc4a86cb - languageName: node - linkType: hard - -"@jest/environment@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/environment@npm:29.6.2" - dependencies: - "@jest/fake-timers": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - jest-mock: "npm:^29.6.2" - checksum: 10/46860767a55f7982a092f31bca24be39e3a12be148dd0bbab7249dd82ce914f154f59b59aae375c661727cd5552ab769cd21e2e845288cea448e966a0c36a0c3 - languageName: node - linkType: hard - -"@jest/expect-utils@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/expect-utils@npm:29.6.2" - dependencies: - jest-get-type: "npm:^29.4.3" - checksum: 10/5ad8884dafa9320ff454f5898d5f79d540f3cbab86aa8b0260351081094bcbcd6bb056e4fc6aac1147f0ec3dda634b8b3491abc0035cdc28a71ff9ded8aad359 - languageName: node - linkType: hard - -"@jest/expect@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/expect@npm:29.6.2" - dependencies: - expect: "npm:^29.6.2" - jest-snapshot: "npm:^29.6.2" - checksum: 10/2beed96e3d24945a72aa2ae4843c99f4c631564569258fdde6746fae3efcbfbff96dbf92ed28d6531299bd12b2766075bacaaae88ebf84b99316e77151b43a9f - languageName: node - linkType: hard - -"@jest/fake-timers@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/fake-timers@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - "@sinonjs/fake-timers": "npm:^8.0.1" - "@types/node": "npm:*" - jest-message-util: "npm:^27.5.1" - jest-mock: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - checksum: 10/dd8b736edbc8da77af3ca14ffaa2f331168618db7b879a3a07a4667af11ae4ff840f64a61e3828e217ee94f06d5a9ba30bf19e5103bb74e193b8216ce4c0708d - languageName: node - linkType: hard - -"@jest/fake-timers@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/fake-timers@npm:29.6.2" - dependencies: - "@jest/types": "npm:^29.6.1" - "@sinonjs/fake-timers": "npm:^10.0.2" - "@types/node": "npm:*" - jest-message-util: "npm:^29.6.2" - jest-mock: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - checksum: 10/4a9f402bc3be311b8d7de2672c93fe97bf0726a67c7f5170ff7aa718ae333655b35177a08182a6e3920bdee5b2ec66c806b866a34641eee1ad8d01534b7fcad2 - languageName: node - linkType: hard - -"@jest/globals@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/globals@npm:27.5.1" - dependencies: - "@jest/environment": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - expect: "npm:^27.5.1" - checksum: 10/f3b06e9b81686d7a5dd7bafb229cba73bdc90d3e16815deebf302d3a402ac29a1e9bafa274d908caefe7083938402619974c89420d247ab8739acd652c11b16d - languageName: node - linkType: hard - -"@jest/globals@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/globals@npm:29.6.2" - dependencies: - "@jest/environment": "npm:^29.6.2" - "@jest/expect": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - jest-mock: "npm:^29.6.2" - checksum: 10/aa4a54f19cc025205bc696546940e1fe9c752c2d4d825852088aa76d44677ebba1ec66fabb78e615480cff23a06a70b5a3f893ab5163d901cdfa0d2267870b10 - languageName: node - linkType: hard - -"@jest/reporters@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/reporters@npm:27.5.1" - dependencies: - "@bcoe/v8-coverage": "npm:^0.2.3" - "@jest/console": "npm:^27.5.1" - "@jest/test-result": "npm:^27.5.1" - "@jest/transform": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - collect-v8-coverage: "npm:^1.0.0" - exit: "npm:^0.1.2" - glob: "npm:^7.1.2" - graceful-fs: "npm:^4.2.9" - istanbul-lib-coverage: "npm:^3.0.0" - istanbul-lib-instrument: "npm:^5.1.0" - istanbul-lib-report: "npm:^3.0.0" - istanbul-lib-source-maps: "npm:^4.0.0" - istanbul-reports: "npm:^3.1.3" - jest-haste-map: "npm:^27.5.1" - jest-resolve: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - jest-worker: "npm:^27.5.1" - slash: "npm:^3.0.0" - source-map: "npm:^0.6.0" - string-length: "npm:^4.0.1" - terminal-link: "npm:^2.0.0" - v8-to-istanbul: "npm:^8.1.0" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - checksum: 10/d49aea4e5b09f9a316f0ff303d11f2db057cadaf370e3e706c024e4ea7f270899cccf7488711def4a930bc23e4f4676f406d1c646f8c6656de4c43dd40652877 - languageName: node - linkType: hard - -"@jest/reporters@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/reporters@npm:29.6.2" - dependencies: - "@bcoe/v8-coverage": "npm:^0.2.3" - "@jest/console": "npm:^29.6.2" - "@jest/test-result": "npm:^29.6.2" - "@jest/transform": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - "@jridgewell/trace-mapping": "npm:^0.3.18" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - collect-v8-coverage: "npm:^1.0.0" - exit: "npm:^0.1.2" - glob: "npm:^7.1.3" - graceful-fs: "npm:^4.2.9" - istanbul-lib-coverage: "npm:^3.0.0" - istanbul-lib-instrument: "npm:^5.1.0" - istanbul-lib-report: "npm:^3.0.0" - istanbul-lib-source-maps: "npm:^4.0.0" - istanbul-reports: "npm:^3.1.3" - jest-message-util: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - jest-worker: "npm:^29.6.2" - slash: "npm:^3.0.0" - string-length: "npm:^4.0.1" - strip-ansi: "npm:^6.0.0" - v8-to-istanbul: "npm:^9.0.1" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - checksum: 10/7579c1cc2e2ef50e8ed57fef33574ea46fce74b807a5bfa3704140f9e9009f60c0699ccf5400caefee95bcb1713a3550d8734123860444b53828c9657e8b7241 - languageName: node - linkType: hard - -"@jest/schemas@npm:^28.1.3": - version: 28.1.3 - resolution: "@jest/schemas@npm:28.1.3" - dependencies: - "@sinclair/typebox": "npm:^0.24.1" - checksum: 10/3cf1d4b66c9c4ffda58b246de1ddcba8e6ad085af63dccdf07922511f13b68c0cc480a7bc620cb4f3099a6f134801c747e1df7bfc7a4ef4dceefbdea3e31e1de - languageName: node - linkType: hard - -"@jest/schemas@npm:^29.4.3": - version: 29.4.3 - resolution: "@jest/schemas@npm:29.4.3" - dependencies: - "@sinclair/typebox": "npm:^0.25.16" - checksum: 10/ac754e245c19dc39e10ebd41dce09040214c96a4cd8efa143b82148e383e45128f24599195ab4f01433adae4ccfbe2db6574c90db2862ccd8551a86704b5bebd - languageName: node - linkType: hard - -"@jest/schemas@npm:^29.6.0": - version: 29.6.0 - resolution: "@jest/schemas@npm:29.6.0" - dependencies: - "@sinclair/typebox": "npm:^0.27.8" - checksum: 10/c00511c69cf89138a7d974404d3a5060af375b5a52b9c87215d91873129b382ca11c1ff25bd6d605951404bb381ddce5f8091004a61e76457da35db1f5c51365 - languageName: node - linkType: hard - -"@jest/source-map@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/source-map@npm:27.5.1" - dependencies: - callsites: "npm:^3.0.0" - graceful-fs: "npm:^4.2.9" - source-map: "npm:^0.6.0" - checksum: 10/90b1f4212b7191d594275c9b9aae18319b944e4ed018af74a1661fd9b783983074d00369a111274697b87193aa2b084f0f022a265d070f4a66d39d06d14a0336 - languageName: node - linkType: hard - -"@jest/source-map@npm:^29.6.0": - version: 29.6.0 - resolution: "@jest/source-map@npm:29.6.0" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.18" - callsites: "npm:^3.0.0" - graceful-fs: "npm:^4.2.9" - checksum: 10/9c6c40387410bb70b2fae8124287fc28f6bdd1b2d7f24348e8611e1bb638b404518228a4ce64a582365b589c536ae8e7ebab0126cef59a87874b71061d19783b - languageName: node - linkType: hard - -"@jest/test-result@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/test-result@npm:27.5.1" - dependencies: - "@jest/console": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - collect-v8-coverage: "npm:^1.0.0" - checksum: 10/43cdc31b39857d4d6487345f1bfb9c97157ddfb7ff3e3b843f3999d4a3be5b1e7c1079302459ea627976fa9da7462426dfb26cf231ef2b6eb79bc80b67361c23 - languageName: node - linkType: hard - -"@jest/test-result@npm:^28.1.3": - version: 28.1.3 - resolution: "@jest/test-result@npm:28.1.3" - dependencies: - "@jest/console": "npm:^28.1.3" - "@jest/types": "npm:^28.1.3" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - collect-v8-coverage: "npm:^1.0.0" - checksum: 10/d343f08e6e4971e8132540014711c5d29887651b036f03db8c7e9d6509fe9801316f0a6a393cd0af0431c50e6d1c1d310957f06b6cc20c08cab2e67b66a00c88 - languageName: node - linkType: hard - -"@jest/test-result@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/test-result@npm:29.6.2" - dependencies: - "@jest/console": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - collect-v8-coverage: "npm:^1.0.0" - checksum: 10/68e9f639c74524ef10b9b8fc059872fa789f677ffb823f3f285d09b34d0ebc9ddb349625fe11cc3c54d41df625adce29b7a6152f8bbe99b7b3151ab533be3a64 - languageName: node - linkType: hard - -"@jest/test-sequencer@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/test-sequencer@npm:27.5.1" - dependencies: - "@jest/test-result": "npm:^27.5.1" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^27.5.1" - jest-runtime: "npm:^27.5.1" - checksum: 10/74c9c773eb0d8de581e17a7ea1d9173b835c0c91b40665caa42fd68931a2ee7429f9ed59c97a15855d3ad46024a17e7387ad4b900d4540890a7681d4a8a42bdd - languageName: node - linkType: hard - -"@jest/test-sequencer@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/test-sequencer@npm:29.6.2" - dependencies: - "@jest/test-result": "npm:^29.6.2" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.6.2" - slash: "npm:^3.0.0" - checksum: 10/81ca00ddcdbe10c4999efe9d751930eabfcc9aa4219e3491d47c11ff86c9d69e757315ae3d4eaf09d5456c3841d579a9eab65f21b09037e05ee60e198e869275 - languageName: node - linkType: hard - -"@jest/transform@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/transform@npm:27.5.1" - dependencies: - "@babel/core": "npm:^7.1.0" - "@jest/types": "npm:^27.5.1" - babel-plugin-istanbul: "npm:^6.1.1" - chalk: "npm:^4.0.0" - convert-source-map: "npm:^1.4.0" - fast-json-stable-stringify: "npm:^2.0.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^27.5.1" - jest-regex-util: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - micromatch: "npm:^4.0.4" - pirates: "npm:^4.0.4" - slash: "npm:^3.0.0" - source-map: "npm:^0.6.1" - write-file-atomic: "npm:^3.0.0" - checksum: 10/9e0bec99971d28fc205e5e282be384a0269760b8452aa94e3d400465819b6c790c862ec5597d8c9439f2da97e68c0c4cec071340ff3e4c4414a34e5b2a19074a - languageName: node - linkType: hard - -"@jest/transform@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/transform@npm:29.6.2" - dependencies: - "@babel/core": "npm:^7.11.6" - "@jest/types": "npm:^29.6.1" - "@jridgewell/trace-mapping": "npm:^0.3.18" - babel-plugin-istanbul: "npm:^6.1.1" - chalk: "npm:^4.0.0" - convert-source-map: "npm:^2.0.0" - fast-json-stable-stringify: "npm:^2.1.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.6.2" - jest-regex-util: "npm:^29.4.3" - jest-util: "npm:^29.6.2" - micromatch: "npm:^4.0.4" - pirates: "npm:^4.0.4" - slash: "npm:^3.0.0" - write-file-atomic: "npm:^4.0.2" - checksum: 10/ab1759672e460bdcc2950ab6fcc2509b40c87d022164492363553ebb5efb0ce67a1721c0aaf5dd00370d20771cb234360bd03635d72354b0fd3e959355becbd7 - languageName: node - linkType: hard - -"@jest/types@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/types@npm:27.5.1" - dependencies: - "@types/istanbul-lib-coverage": "npm:^2.0.0" - "@types/istanbul-reports": "npm:^3.0.0" - "@types/node": "npm:*" - "@types/yargs": "npm:^16.0.0" - chalk: "npm:^4.0.0" - checksum: 10/d3ca1655673539c54665f3e9135dc70887feb6b667b956e712c38f42e513ae007d3593b8075aecea8f2db7119f911773010f17f93be070b1725fbc6225539b6e - languageName: node - linkType: hard - -"@jest/types@npm:^28.1.3": - version: 28.1.3 - resolution: "@jest/types@npm:28.1.3" - dependencies: - "@jest/schemas": "npm:^28.1.3" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - "@types/istanbul-reports": "npm:^3.0.0" - "@types/node": "npm:*" - "@types/yargs": "npm:^17.0.8" - chalk: "npm:^4.0.0" - checksum: 10/a90e636df760799b6c3d91e34e539e701ea803e80312257e674e345a3c23a7c892df7a301afbc7883ec1d623daf3ba266cde57c5965e0692e5f1e61915d3524b - languageName: node - linkType: hard - -"@jest/types@npm:^29.5.0": - version: 29.5.0 - resolution: "@jest/types@npm:29.5.0" - dependencies: - "@jest/schemas": "npm:^29.4.3" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - "@types/istanbul-reports": "npm:^3.0.0" - "@types/node": "npm:*" - "@types/yargs": "npm:^17.0.8" - chalk: "npm:^4.0.0" - checksum: 10/910a134cd1c2cd7d74dfcf9981c2f1a6c1d9772edecb7738947b059c4e0bb843a0d26a3c7dfff112f2fc4a473ecc18679edda498416f0048a8d181ff43a08bee - languageName: node - linkType: hard - -"@jest/types@npm:^29.6.1": - version: 29.6.1 - resolution: "@jest/types@npm:29.6.1" - dependencies: - "@jest/schemas": "npm:^29.6.0" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - "@types/istanbul-reports": "npm:^3.0.0" - "@types/node": "npm:*" - "@types/yargs": "npm:^17.0.8" - chalk: "npm:^4.0.0" - checksum: 10/f6264fb0fc60efcb95adf3c4b30be6433aae75769b4f90d09de35fb19c65f7184d6c227a75f5b9e0054368d4fbf5cc4b397f9756d9a59eee25f3247d2e020f93 - languageName: node - linkType: hard - -"@josephg/resolvable@npm:^1.0.0": - version: 1.0.1 - resolution: "@josephg/resolvable@npm:1.0.1" - checksum: 10/64eb763b5138bdae4fb59c0c0e89ed261b690917ae6bd777b533257668f151b8868698fb73dfd7665746ad07c7c917fe89ccfdf2404048d39f373f57f1a14e34 - languageName: node - linkType: hard - -"@jridgewell/gen-mapping@npm:^0.3.0": - version: 0.3.3 - resolution: "@jridgewell/gen-mapping@npm:0.3.3" - dependencies: - "@jridgewell/set-array": "npm:^1.0.1" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 10/072ace159c39ab85944bdabe017c3de15c5e046a4a4a772045b00ff05e2ebdcfa3840b88ae27e897d473eb4d4845b37be3c78e28910c779f5aeeeae2fb7f0cc2 - languageName: node - linkType: hard - -"@jridgewell/gen-mapping@npm:^0.3.2": - version: 0.3.2 - resolution: "@jridgewell/gen-mapping@npm:0.3.2" - dependencies: - "@jridgewell/set-array": "npm:^1.0.1" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 10/7ba0070be1aeda7d7694b09d847c3b95879409b26559b9d7e97a88ec94b838fb380df43ae328ee2d2df4d79e75d7afe6ba315199d18d79aa20839ebdfb739420 - languageName: node - linkType: hard - -"@jridgewell/gen-mapping@npm:^0.3.5": - version: 0.3.5 - resolution: "@jridgewell/gen-mapping@npm:0.3.5" - dependencies: - "@jridgewell/set-array": "npm:^1.2.1" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - "@jridgewell/trace-mapping": "npm:^0.3.24" - checksum: 10/81587b3c4dd8e6c60252122937cea0c637486311f4ed208b52b62aae2e7a87598f63ec330e6cd0984af494bfb16d3f0d60d3b21d7e5b4aedd2602ff3fe9d32e2 - languageName: node - linkType: hard - -"@jridgewell/resolve-uri@npm:3.1.0": - version: 3.1.0 - resolution: "@jridgewell/resolve-uri@npm:3.1.0" - checksum: 10/320ceb37af56953757b28e5b90c34556157676d41e3d0a3ff88769274d62373582bb0f0276a4f2d29c3f4fdd55b82b8be5731f52d391ad2ecae9b321ee1c742d - languageName: node - linkType: hard - -"@jridgewell/resolve-uri@npm:^3.0.3": - version: 3.0.5 - resolution: "@jridgewell/resolve-uri@npm:3.0.5" - checksum: 10/66da0c14dfaebd3481ac363306eefa45aca6779f8635df7337b97c18873853a7e2946d79104fad3e2ab832fe438ebabcaa2091e55e069a81b35001fa6738f532 - languageName: node - linkType: hard - -"@jridgewell/resolve-uri@npm:^3.1.0": - version: 3.1.2 - resolution: "@jridgewell/resolve-uri@npm:3.1.2" - checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d - languageName: node - linkType: hard - -"@jridgewell/set-array@npm:^1.0.1": - version: 1.1.2 - resolution: "@jridgewell/set-array@npm:1.1.2" - checksum: 10/69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e - languageName: node - linkType: hard - -"@jridgewell/set-array@npm:^1.2.1": - version: 1.2.1 - resolution: "@jridgewell/set-array@npm:1.2.1" - checksum: 10/832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 - languageName: node - linkType: hard - -"@jridgewell/source-map@npm:^0.3.3": - version: 0.3.5 - resolution: "@jridgewell/source-map@npm:0.3.5" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.0" - "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 10/73838ac43235edecff5efc850c0d759704008937a56b1711b28c261e270fe4bf2dc06d0b08663aeb1ab304f81f6de4f5fb844344403cf53ba7096967a9953cae - languageName: node - linkType: hard - -"@jridgewell/sourcemap-codec@npm:1.4.14": - version: 1.4.14 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.14" - checksum: 10/26e768fae6045481a983e48aa23d8fcd23af5da70ebd74b0649000e815e7fbb01ea2bc088c9176b3fffeb9bec02184e58f46125ef3320b30eaa1f4094cfefa38 - languageName: node - linkType: hard - -"@jridgewell/sourcemap-codec@npm:^1.4.10": - version: 1.4.11 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.11" - checksum: 10/591ca7f7884a51643e713b1b623c6c7d751bdc78d61b6cda1dcf7de1287e7f0530514c3f2c7d443273ddc8687637a95cd19f5d8986b32e2349d0f7310623df40 - languageName: node - linkType: hard - -"@jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15": - version: 1.4.15 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" - checksum: 10/89960ac087781b961ad918978975bcdf2051cd1741880469783c42de64239703eab9db5230d776d8e6a09d73bb5e4cb964e07d93ee6e2e7aea5a7d726e865c09 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:0.3.9": - version: 0.3.9 - resolution: "@jridgewell/trace-mapping@npm:0.3.9" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.0.3" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - checksum: 10/83deafb8e7a5ca98993c2c6eeaa93c270f6f647a4c0dc00deb38c9cf9b2d3b7bf15e8839540155247ef034a052c0ec4466f980bf0c9e2ab63b97d16c0cedd3ff - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.0": - version: 0.3.4 - resolution: "@jridgewell/trace-mapping@npm:0.3.4" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.0.3" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - checksum: 10/2f47f796000ddb956b8fc43b60515594adfba867747d982da83dac0790147027902486ebc997e78944ca7531b0fc091ce8a105f9a863fba3fffa79b1a976fee6 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.18": - version: 0.3.18 - resolution: "@jridgewell/trace-mapping@npm:0.3.18" - dependencies: - "@jridgewell/resolve-uri": "npm:3.1.0" - "@jridgewell/sourcemap-codec": "npm:1.4.14" - checksum: 10/f4fabdddf82398a797bcdbb51c574cd69b383db041a6cae1a6a91478681d6aab340c01af655cfd8c6e01cde97f63436a1445f08297cdd33587621cf05ffa0d55 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.17": - version: 0.3.17 - resolution: "@jridgewell/trace-mapping@npm:0.3.17" - dependencies: - "@jridgewell/resolve-uri": "npm:3.1.0" - "@jridgewell/sourcemap-codec": "npm:1.4.14" - checksum: 10/790d439c9b271d9fc381dc4a837393ab942920245efedd5db20f65a665c0f778637fa623573337d3241ff784ffdb6724bbadf7fa2b61666bcd4884064b02f113 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.24": - version: 0.3.25 - resolution: "@jridgewell/trace-mapping@npm:0.3.25" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.1.0" - "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.13 - resolution: "@jridgewell/trace-mapping@npm:0.3.13" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.0.3" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - checksum: 10/b563ad016492becc14ec1df0edc0276087049df6974d95594ec2e5215d8ec241159d7f4aecb4e2197154732ba97982988e9accbaf496bc365fbb4506b67929f9 - languageName: node - linkType: hard - -"@js-sdsl/ordered-map@npm:^4.4.2": - version: 4.4.2 - resolution: "@js-sdsl/ordered-map@npm:4.4.2" - checksum: 10/ac64e3f0615ecc015461c9f527f124d2edaa9e68de153c1e270c627e01e83d046522d7e872692fd57a8c514578b539afceff75831c0d8b2a9a7a347fbed35af4 - languageName: node - linkType: hard - -"@jsdevtools/ono@npm:7.1.3, @jsdevtools/ono@npm:^7.1.3": - version: 7.1.3 - resolution: "@jsdevtools/ono@npm:7.1.3" - checksum: 10/d4a036ccb9d2b21b7e4cec077c59a5a83fad58adacbce89e7e6b77a703050481ff5b6d813aef7f5ff0a8347a85a0eedf599e2e6bb5784a971a93e53e43b10157 - languageName: node - linkType: hard - -"@jsonjoy.com/base64@npm:^1.1.1": - version: 1.1.2 - resolution: "@jsonjoy.com/base64@npm:1.1.2" - peerDependencies: - tslib: 2 - checksum: 10/d76bb58eff841c090d9bf69a073611ffa73c40a664ccbcea689f65961f57d7b24051269d06b437e4f6204285d6ba92f50f587c5e95c5f9e4f10b36a2ed4cd0c8 - languageName: node - linkType: hard - -"@jsonjoy.com/json-pack@npm:^1.0.3": - version: 1.0.4 - resolution: "@jsonjoy.com/json-pack@npm:1.0.4" - dependencies: - "@jsonjoy.com/base64": "npm:^1.1.1" - "@jsonjoy.com/util": "npm:^1.1.2" - hyperdyperid: "npm:^1.2.0" - thingies: "npm:^1.20.0" - peerDependencies: - tslib: 2 - checksum: 10/dd749e7c4610db4ab7d53d9df6d8465b9805e560eda9c60dac4435b50a30710d39e975887104021a11d91c12fdf9c1752f0b0c63580a1b6b1b12854633cfea39 - languageName: node - linkType: hard - -"@jsonjoy.com/util@npm:^1.1.2": - version: 1.2.0 - resolution: "@jsonjoy.com/util@npm:1.2.0" - peerDependencies: - tslib: 2 - checksum: 10/6af58b3d34266f1f8e4f953668f163ef1028a5d372a90391bd238c2ea637e0ea3792b18b99162b8ec072af35baebe0e947d9eedd702ad942e697ed419f1e54eb - languageName: node - linkType: hard - -"@kessler/tableify@npm:^1.0.2": - version: 1.0.2 - resolution: "@kessler/tableify@npm:1.0.2" - checksum: 10/705d5218559bcbcde2a3a7908f42f0738f92a4d703d687e4a1f716fd9215e8bee5a326d8181b9f3e783fb3713a7bee65bdbe3cf0ef339cb3e51ec5fa6a2bf467 - languageName: node - linkType: hard - -"@kwsites/file-exists@npm:^1.1.1": - version: 1.1.1 - resolution: "@kwsites/file-exists@npm:1.1.1" - dependencies: - debug: "npm:^4.1.1" - checksum: 10/4ff945de7293285133aeae759caddc71e73c4a44a12fac710fdd4f574cce2671a3f89d8165fdb03d383cfc97f3f96f677d8de3c95133da3d0e12a123a23109fe - languageName: node - linkType: hard - -"@kwsites/promise-deferred@npm:^1.1.1": - version: 1.1.1 - resolution: "@kwsites/promise-deferred@npm:1.1.1" - checksum: 10/07455477a0123d9a38afb503739eeff2c5424afa8d3dbdcc7f9502f13604488a4b1d9742fc7288832a52a6422cf1e1c0a1d51f69a39052f14d27c9a0420b6629 - languageName: node - linkType: hard - -"@lazyledger/protobuf3-solidity-lib@npm:0.6.0": - version: 0.6.0 - resolution: "@lazyledger/protobuf3-solidity-lib@npm:0.6.0" - checksum: 10/e3e1225ebd492b4d6710d27c971dca9ed6b47f04b2a3f1aad5b5cf365217c14f65cacfcc1d8bbfc5d8de9fc11c375ee94ed0683033dbffef75c9e2642f9c3762 - languageName: node - linkType: hard - -"@leichtgewicht/ip-codec@npm:^2.0.1": - version: 2.0.4 - resolution: "@leichtgewicht/ip-codec@npm:2.0.4" - checksum: 10/3c7ffb0afb86c731a02813aa4370da27eac037abf8a15fce211226c11b644610382c8eca7efadace9471ee1959afe72fc1d43a62227d974b9fca8eae8b8d2124 - languageName: node - linkType: hard - -"@lerna-lite/cli@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/cli@npm:3.7.0" - dependencies: - "@lerna-lite/core": "npm:3.7.0" - "@lerna-lite/init": "npm:3.7.0" - "@lerna-lite/npmlog": "npm:3.7.0" - dedent: "npm:^1.5.3" - dotenv: "npm:^16.4.5" - import-local: "npm:^3.1.0" - load-json-file: "npm:^7.0.1" - yargs: "npm:^17.7.2" - peerDependenciesMeta: - "@lerna-lite/exec": - optional: true - "@lerna-lite/list": - optional: true - "@lerna-lite/publish": - optional: true - "@lerna-lite/run": - optional: true - "@lerna-lite/version": - optional: true - "@lerna-lite/watch": - optional: true - bin: - lerna: dist/cli.js - checksum: 10/744c0c748ea1959ea302f3c70800af4de365516952a3d5519a28e69f9c16a1ba14dda289fd509412239851dc06bd3c7e845da48087400c4d16c2df1866ee25fc - languageName: node - linkType: hard - -"@lerna-lite/core@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/core@npm:3.7.0" - dependencies: - "@lerna-lite/npmlog": "npm:^3.7.0" - "@npmcli/run-script": "npm:^8.1.0" - chalk: "npm:^5.3.0" - clone-deep: "npm:^4.0.1" - config-chain: "npm:^1.1.13" - cosmiconfig: "npm:^9.0.0" - dedent: "npm:^1.5.3" - execa: "npm:^8.0.1" - fs-extra: "npm:^11.2.0" - glob-parent: "npm:^6.0.2" - globby: "npm:^14.0.2" - inquirer: "npm:^9.3.4" - is-ci: "npm:^3.0.1" - json5: "npm:^2.2.3" - load-json-file: "npm:^7.0.1" - minimatch: "npm:^9.0.5" - npm-package-arg: "npm:^11.0.2" - p-map: "npm:^7.0.2" - p-queue: "npm:^8.0.1" - resolve-from: "npm:^5.0.0" - semver: "npm:^7.6.2" - slash: "npm:^5.1.0" - strong-log-transformer: "npm:^2.1.0" - write-file-atomic: "npm:^5.0.1" - write-json-file: "npm:^5.0.0" - write-package: "npm:^7.0.1" - checksum: 10/5fb81c515c4d5c7053e3ced88a5c58455e72d52e1204db85f3c6f07183001fcdcd12af41fb0489ec470c053ba78a583667740e18fdf2f819640f8cd4640538b5 - languageName: node - linkType: hard - -"@lerna-lite/exec@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/exec@npm:3.7.0" - dependencies: - "@lerna-lite/cli": "npm:3.7.0" - "@lerna-lite/core": "npm:3.7.0" - "@lerna-lite/filter-packages": "npm:3.7.0" - "@lerna-lite/profiler": "npm:3.7.0" - chalk: "npm:^5.3.0" - dotenv: "npm:^16.4.5" - p-map: "npm:^7.0.2" - checksum: 10/b27fdd59bf2d8d89277ff3d0087e6dbc77bac4822d4fe794abfe42be549a237922a165190a6e5e1f6c3b248430e78f189181376e3208b7f5210d0be3bb264cd5 - languageName: node - linkType: hard - -"@lerna-lite/filter-packages@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/filter-packages@npm:3.7.0" - dependencies: - "@lerna-lite/core": "npm:3.7.0" - "@lerna-lite/npmlog": "npm:^3.7.0" - multimatch: "npm:^7.0.0" - checksum: 10/1d1dac59dd7e1d4aa1f4df9106c7e57946846b7772392541990f58558c2fb185dfe373c3aadf2f676a41b12df6564f133ad6049fad57626cec78c648c47e190f - languageName: node - linkType: hard - -"@lerna-lite/init@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/init@npm:3.7.0" - dependencies: - "@lerna-lite/core": "npm:3.7.0" - fs-extra: "npm:^11.2.0" - p-map: "npm:^7.0.2" - write-json-file: "npm:^5.0.0" - checksum: 10/6661f877074dea63ba2b1feb6ea2633b59770a8d962b2e4351004742e6974b4d81d3f11fae2f07f54820b0fbb78bc98b7cacfa3e54b460479d6aee8a41cb143c - languageName: node - linkType: hard - -"@lerna-lite/list@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/list@npm:3.7.0" - dependencies: - "@lerna-lite/cli": "npm:3.7.0" - "@lerna-lite/core": "npm:3.7.0" - "@lerna-lite/filter-packages": "npm:3.7.0" - "@lerna-lite/listable": "npm:3.7.0" - checksum: 10/66fc8204f93a3c557dd78cb30d3eecc1ea9d100e2e1af14f6f2daf523c1aa88cae9b77167af0498dd0adaaaaac1bd6a1e13fe82501ac977a4ed14f24ea32a7d6 - languageName: node - linkType: hard - -"@lerna-lite/listable@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/listable@npm:3.7.0" - dependencies: - "@lerna-lite/core": "npm:3.7.0" - chalk: "npm:^5.3.0" - columnify: "npm:^1.6.0" - checksum: 10/c735f9e9501374c9b65816648d2ee52619034eb3e214e10d49e8f3b4fdfde1d554bb35a531f064c21bda981b987a8cf8aabae89b11ab064135a189ea27ea48e0 - languageName: node - linkType: hard - -"@lerna-lite/npmlog@npm:3.7.0, @lerna-lite/npmlog@npm:^3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/npmlog@npm:3.7.0" - dependencies: - aproba: "npm:^2.0.0" - color-support: "npm:^1.1.3" - console-control-strings: "npm:^1.1.0" - has-unicode: "npm:^2.0.1" - set-blocking: "npm:^2.0.0" - signal-exit: "npm:^4.1.0" - string-width: "npm:^7.2.0" - strip-ansi: "npm:^7.1.0" - wide-align: "npm:^1.1.5" - checksum: 10/c8a33b9ab870bb4acd7820a61873ec45c763936aa1309a3874c7b6e06beaf490070e1a479953769ad9161f1d84aa3093fb9d70ce285bc08d9ddb98cac2d9bd4a - languageName: node - linkType: hard - -"@lerna-lite/profiler@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/profiler@npm:3.7.0" - dependencies: - "@lerna-lite/core": "npm:3.7.0" - "@lerna-lite/npmlog": "npm:3.7.0" - fs-extra: "npm:^11.2.0" - upath: "npm:^2.0.1" - checksum: 10/15011f22dd639eb0f9488019f954c348b4f7d96945bd226d605fe3816f044af5d09ad47f9049c3f9b52f2a7573b8b9523d89d58b26ee2d4d48d9f3d41c5da7ab - languageName: node - linkType: hard - -"@lerna-lite/publish@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/publish@npm:3.7.0" - dependencies: - "@lerna-lite/cli": "npm:3.7.0" - "@lerna-lite/core": "npm:3.7.0" - "@lerna-lite/npmlog": "npm:^3.7.0" - "@lerna-lite/version": "npm:3.7.0" - "@npmcli/arborist": "npm:^7.5.3" - "@npmcli/package-json": "npm:^5.2.0" - byte-size: "npm:^8.1.1" - chalk: "npm:^5.3.0" - columnify: "npm:^1.6.0" - fs-extra: "npm:^11.2.0" - glob: "npm:^10.4.2" - has-unicode: "npm:^2.0.1" - libnpmaccess: "npm:^8.0.6" - libnpmpublish: "npm:^9.0.9" - normalize-path: "npm:^3.0.0" - npm-package-arg: "npm:^11.0.2" - npm-packlist: "npm:^8.0.2" - npm-registry-fetch: "npm:^17.1.0" - p-map: "npm:^7.0.2" - p-pipe: "npm:^4.0.0" - pacote: "npm:^18.0.6" - semver: "npm:^7.6.2" - ssri: "npm:^10.0.6" - tar: "npm:^6.2.1" - temp-dir: "npm:^3.0.0" - checksum: 10/ca9221b0bfbd12e90c300c82ca7b6db355c5c2bb99f481b47ecf01756e5604eb919568b4b9f9393f7472b28bfca5f1506b89ba6019e0de13448794a2f6af1715 - languageName: node - linkType: hard - -"@lerna-lite/run@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/run@npm:3.7.0" - dependencies: - "@lerna-lite/cli": "npm:3.7.0" - "@lerna-lite/core": "npm:3.7.0" - "@lerna-lite/filter-packages": "npm:3.7.0" - "@lerna-lite/npmlog": "npm:3.7.0" - "@lerna-lite/profiler": "npm:3.7.0" - chalk: "npm:^5.3.0" - fs-extra: "npm:^11.2.0" - p-map: "npm:^7.0.2" - checksum: 10/044311de3b629fd8b21dea322ea3e0182a5d608bf3f2bf52311ce4a5e79800f5860e2a0facfec84e0bb01bdd61aa9b3a3d42c1ac3ae315743cdbfd3ede64b299 - languageName: node - linkType: hard - -"@lerna-lite/version@npm:3.7.0": - version: 3.7.0 - resolution: "@lerna-lite/version@npm:3.7.0" - dependencies: - "@lerna-lite/cli": "npm:3.7.0" - "@lerna-lite/core": "npm:3.7.0" - "@lerna-lite/npmlog": "npm:^3.7.0" - "@octokit/plugin-enterprise-rest": "npm:^6.0.1" - "@octokit/rest": "npm:^21.0.0" - chalk: "npm:^5.3.0" - conventional-changelog-angular: "npm:^7.0.0" - conventional-changelog-core: "npm:^7.0.0" - conventional-changelog-writer: "npm:^7.0.1" - conventional-commits-parser: "npm:^5.0.0" - conventional-recommended-bump: "npm:^9.0.0" - dedent: "npm:^1.5.3" - fs-extra: "npm:^11.2.0" - get-stream: "npm:^9.0.1" - git-url-parse: "npm:^14.0.0" - graceful-fs: "npm:^4.2.11" - is-stream: "npm:^4.0.1" - load-json-file: "npm:^7.0.1" - make-dir: "npm:^5.0.0" - minimatch: "npm:^9.0.5" - new-github-release-url: "npm:^2.0.0" - node-fetch: "npm:^3.3.2" - npm-package-arg: "npm:^11.0.2" - p-limit: "npm:^6.0.0" - p-map: "npm:^7.0.2" - p-pipe: "npm:^4.0.0" - p-reduce: "npm:^3.0.0" - pify: "npm:^6.1.0" - semver: "npm:^7.6.2" - slash: "npm:^5.1.0" - temp-dir: "npm:^3.0.0" - uuid: "npm:^10.0.0" - write-json-file: "npm:^5.0.0" - checksum: 10/bb9002808578a05f5c7ffcb127f25f3e0a2846fc351a48377f21eea9f27ea5c6722ea4d599ec9299adb1195516cc7c6b7d075b1377fa6043984fd4290867de2d - languageName: node - linkType: hard - -"@libp2p/crypto@npm:^1.0.11": - version: 1.0.17 - resolution: "@libp2p/crypto@npm:1.0.17" - dependencies: - "@libp2p/interface-keys": "npm:^1.0.2" - "@libp2p/interfaces": "npm:^3.2.0" - "@noble/ed25519": "npm:^1.6.0" - "@noble/secp256k1": "npm:^1.5.4" - multiformats: "npm:^11.0.0" - node-forge: "npm:^1.1.0" - protons-runtime: "npm:^5.0.0" - uint8arraylist: "npm:^2.4.3" - uint8arrays: "npm:^4.0.2" - checksum: 10/e827686d0964a82e94c19c19866822a022c415a5d6097ac9a032ea563731ab35d8e215c992137fec3e75d3d7815249d3fad9daee3d4cf2c9d63ea846bd186231 - languageName: node - linkType: hard - -"@libp2p/interface-connection@npm:^4.0.0": - version: 4.0.0 - resolution: "@libp2p/interface-connection@npm:4.0.0" - dependencies: - "@libp2p/interface-peer-id": "npm:^2.0.0" - "@libp2p/interfaces": "npm:^3.0.0" - "@multiformats/multiaddr": "npm:^12.0.0" - it-stream-types: "npm:^1.0.4" - uint8arraylist: "npm:^2.1.2" - checksum: 10/a9781e5e49f492a6c616d39f0e12268cb4db2d078af42d766d86299c8ca6cee0000090587ad9aa80bb0af3d7f0f58dfe41725418fa5f9c31bdc6d363f693f6d6 - languageName: node - linkType: hard - -"@libp2p/interface-keychain@npm:^2.0.0": - version: 2.0.5 - resolution: "@libp2p/interface-keychain@npm:2.0.5" - dependencies: - "@libp2p/interface-peer-id": "npm:^2.0.0" - multiformats: "npm:^11.0.0" - checksum: 10/d54cedb414ea31e1a00b4a5f629ac725c3e4fc98c8cc434f0bd3296b9257665446dfa6d69da04928bd53a2bea0f404bbab0c2cb8e1a14dc6d4fd1badddaceb78 - languageName: node - linkType: hard - -"@libp2p/interface-keys@npm:^1.0.2": - version: 1.0.8 - resolution: "@libp2p/interface-keys@npm:1.0.8" - checksum: 10/f501e9ce5645e244efa3aba4b1690b4cf6160f31381d7da0bfe4859f92d997f08b261f20a2e87716502556f04bd9bf0486d75c8985b573bf9cf2fd7952552cc3 - languageName: node - linkType: hard - -"@libp2p/interface-peer-id@npm:^2.0.0, @libp2p/interface-peer-id@npm:^2.0.2": - version: 2.0.2 - resolution: "@libp2p/interface-peer-id@npm:2.0.2" - dependencies: - multiformats: "npm:^11.0.0" - checksum: 10/4467271d73a8c9c97e41af3cf5b2883eef1f9657870d1967a3e97d1539c34a8a3f85633cb754458557f782b1cf612d25760096822092b725cec14b023b740d25 - languageName: node - linkType: hard - -"@libp2p/interface-peer-info@npm:^1.0.2": - version: 1.0.10 - resolution: "@libp2p/interface-peer-info@npm:1.0.10" - dependencies: - "@libp2p/interface-peer-id": "npm:^2.0.0" - "@multiformats/multiaddr": "npm:^12.0.0" - checksum: 10/95dd5d11a199f71f3dddb01b7dcdb7e0985846cebcc512cdedeb0c4702681200310d71c79866ab365bd2895bc161900f25c8d4b29ce7360a72ee282565adc1be - languageName: node - linkType: hard - -"@libp2p/interface-pubsub@npm:^3.0.0": - version: 3.0.7 - resolution: "@libp2p/interface-pubsub@npm:3.0.7" - dependencies: - "@libp2p/interface-connection": "npm:^4.0.0" - "@libp2p/interface-peer-id": "npm:^2.0.0" - "@libp2p/interfaces": "npm:^3.0.0" - it-pushable: "npm:^3.0.0" - uint8arraylist: "npm:^2.1.2" - checksum: 10/8750222239eccfb088755c85acc5eca143960eff778412690315ce58fd2dade4b7bf11985f82d1d67ee7a1056fba7cb004153bd4b983633ef30d1237147c2296 - languageName: node - linkType: hard - -"@libp2p/interface@npm:^0.1.1": - version: 0.1.3 - resolution: "@libp2p/interface@npm:0.1.3" - dependencies: - "@multiformats/multiaddr": "npm:^12.1.5" - abortable-iterator: "npm:^5.0.1" - it-pushable: "npm:^3.2.0" - it-stream-types: "npm:^2.0.1" - multiformats: "npm:^12.0.1" - p-defer: "npm:^4.0.0" - race-signal: "npm:^1.0.0" - uint8arraylist: "npm:^2.4.3" - checksum: 10/1344de067be903623b4b11667435fff0ed2869be941dcc7882004220f787039d50c8ea947abea45ba66d1265f4edb3a60c8fa345f641cfd06b9e1c62675eef2d - languageName: node - linkType: hard - -"@libp2p/interfaces@npm:^3.0.0, @libp2p/interfaces@npm:^3.2.0": - version: 3.3.2 - resolution: "@libp2p/interfaces@npm:3.3.2" - checksum: 10/4614ef7c6ef1f605525182713a0eab403ebb0e15b0a3d57d100670ce415c2ad233b5477e91488177346087d1c6d4a4dbddf33ebf98641268e9e7f683e5deabc7 - languageName: node - linkType: hard - -"@libp2p/logger@npm:^2.0.5": - version: 2.1.1 - resolution: "@libp2p/logger@npm:2.1.1" - dependencies: - "@libp2p/interface-peer-id": "npm:^2.0.2" - "@multiformats/multiaddr": "npm:^12.1.3" - debug: "npm:^4.3.4" - interface-datastore: "npm:^8.2.0" - multiformats: "npm:^11.0.2" - checksum: 10/6e4dd89d9cec07d337b297206e8f6b8941b2f6aca6ffcf37ce19cfb27eaa86d914d1e5bc2e62438cc3e96512812e98c542cd0da88f7575fe0fa4f3aefe78e6d4 - languageName: node - linkType: hard - -"@libp2p/peer-id@npm:^2.0.0": - version: 2.0.4 - resolution: "@libp2p/peer-id@npm:2.0.4" - dependencies: - "@libp2p/interface-peer-id": "npm:^2.0.0" - "@libp2p/interfaces": "npm:^3.2.0" - multiformats: "npm:^11.0.0" - uint8arrays: "npm:^4.0.2" - checksum: 10/36ce2ef7d76f382067da885863d256e83b26fede396f568b0578e5b2216525cb28f618a3f10e5ba55b6399eb08b3a5f42e58bc3f30278d5011385bd8af524e78 - languageName: node - linkType: hard - -"@ljharb/resumer@npm:^0.0.1": - version: 0.0.1 - resolution: "@ljharb/resumer@npm:0.0.1" - dependencies: - "@ljharb/through": "npm:^2.3.9" - checksum: 10/fb23e016164614eaf0f7893a27f6f463d9a44c1b91e736adc9520f4f40b721a2f2865af9b8ae7486f632ee8a4291807795c6e38731677bf74e55140a7ed3cd7e - languageName: node - linkType: hard - -"@ljharb/through@npm:^2.3.12": - version: 2.3.13 - resolution: "@ljharb/through@npm:2.3.13" - dependencies: - call-bind: "npm:^1.0.7" - checksum: 10/6150c6c43a726d52c26863ed6dc4ab54fa7cf625c81463a5ddec86278c99e23bf94dfc99ebf09a9ac3191332d4a27344e092f7e07f252b8cd600e2b38e645870 - languageName: node - linkType: hard - -"@ljharb/through@npm:^2.3.9": - version: 2.3.9 - resolution: "@ljharb/through@npm:2.3.9" - checksum: 10/e767600d91fde814ee1742ec0dc3181ca82cd01e030c234246d30b86e60717401fed739f900196bd0b69222e3655fc6c0271eec954a43ace55795fc20711e292 - languageName: node - linkType: hard - -"@lukeed/csprng@npm:^1.0.0": - version: 1.1.0 - resolution: "@lukeed/csprng@npm:1.1.0" - checksum: 10/926f5f7fc629470ca9a8af355bfcd0271d34535f7be3890f69902432bddc3262029bb5dbe9025542cf6c9883d878692eef2815fc2f3ba5b92e9da1f9eba2e51b - languageName: node - linkType: hard - -"@mapbox/node-pre-gyp@npm:^1.0.0, @mapbox/node-pre-gyp@npm:^1.0.10, @mapbox/node-pre-gyp@npm:^1.0.11, @mapbox/node-pre-gyp@npm:^1.0.5": - version: 1.0.11 - resolution: "@mapbox/node-pre-gyp@npm:1.0.11" - dependencies: - detect-libc: "npm:^2.0.0" - https-proxy-agent: "npm:^5.0.0" - make-dir: "npm:^3.1.0" - node-fetch: "npm:^2.6.7" - nopt: "npm:^5.0.0" - npmlog: "npm:^5.0.1" - rimraf: "npm:^3.0.2" - semver: "npm:^7.3.5" - tar: "npm:^6.1.11" - bin: - node-pre-gyp: bin/node-pre-gyp - checksum: 10/59529a2444e44fddb63057152452b00705aa58059079191126c79ac1388ae4565625afa84ed4dd1bf017d1111ab6e47907f7c5192e06d83c9496f2f3e708680a - languageName: node - linkType: hard - -"@metamask/eth-sig-util@npm:^4.0.0": - version: 4.0.1 - resolution: "@metamask/eth-sig-util@npm:4.0.1" - dependencies: - ethereumjs-abi: "npm:^0.6.8" - ethereumjs-util: "npm:^6.2.1" - ethjs-util: "npm:^0.1.6" - tweetnacl: "npm:^1.0.3" - tweetnacl-util: "npm:^0.15.1" - checksum: 10/a41a986abd14675badeb02041466e30e1c3ef529c1d131f47c27fd48d73144fcf590f45d8ee8b7cd357725ebf75ece93f4484adf1baf6311cc996f7ef82c4ae1 - languageName: node - linkType: hard - -"@mui/base@npm:5.0.0-beta.25": - version: 5.0.0-beta.25 - resolution: "@mui/base@npm:5.0.0-beta.25" - dependencies: - "@babel/runtime": "npm:^7.23.4" - "@floating-ui/react-dom": "npm:^2.0.4" - "@mui/types": "npm:^7.2.10" - "@mui/utils": "npm:^5.14.19" - "@popperjs/core": "npm:^2.11.8" - clsx: "npm:^2.0.0" - prop-types: "npm:^15.8.1" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/93cecb438ec9d5bac2440a65c295fbd2cde6aa7f1264005b0c9ef76c1332b77111f7b688209364b97344642bee0e71f2bd3b3b14039921f68a8b7111d3a513e4 - languageName: node - linkType: hard - -"@mui/base@npm:5.0.0-beta.40": - version: 5.0.0-beta.40 - resolution: "@mui/base@npm:5.0.0-beta.40" - dependencies: - "@babel/runtime": "npm:^7.23.9" - "@floating-ui/react-dom": "npm:^2.0.8" - "@mui/types": "npm:^7.2.14" - "@mui/utils": "npm:^5.15.14" - "@popperjs/core": "npm:^2.11.8" - clsx: "npm:^2.1.0" - prop-types: "npm:^15.8.1" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/ebee3d9e1136710dcb2af5828acc6bd8d54f6b124785d011585c2665a48dc66e35ccb344d5ebc7fd8bfd776cccb8ea434911f151a62bee193677ee9dc67fc7fc - languageName: node - linkType: hard - -"@mui/core-downloads-tracker@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/core-downloads-tracker@npm:5.14.19" - checksum: 10/e71c886f12bbd83791638545017c0b8439c3c6b51125979fea105f938f2f5b109629d4deddd38448c05b8be10b3249334324f1505c1306c52a2b8d315a1005c3 - languageName: node - linkType: hard - -"@mui/core-downloads-tracker@npm:^5.15.15": - version: 5.15.15 - resolution: "@mui/core-downloads-tracker@npm:5.15.15" - checksum: 10/3e99a04e03f66d5fa5f0c23cdce0f9fa2331ba08c99a75dc2347ccaa1c6ed520153e04aaeb0d613c9dca099a3e6242558a6284c33d93f95cc65e3243b17860bc - languageName: node - linkType: hard - -"@mui/icons-material@npm:5.15.10": - version: 5.15.10 - resolution: "@mui/icons-material@npm:5.15.10" - dependencies: - "@babel/runtime": "npm:^7.23.9" - peerDependencies: - "@mui/material": ^5.0.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/ce22c02dc7ed960a21f8d5ea7c4d4fc03d9f71e8a26ced02f75da1ffd6c768e6fa0682a308a03be53bffc2325a5aaf68be69f9e192b0a57c6752f7548e5b9045 - languageName: node - linkType: hard - -"@mui/icons-material@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/icons-material@npm:5.14.19" - dependencies: - "@babel/runtime": "npm:^7.23.4" - peerDependencies: - "@mui/material": ^5.0.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/648a44af9a18a39062126d80268d0d4816d408d253d46f097cf8ad525e37dad8301a7727942f4908a15c432de361dabe29de0595f3771cf8acf7da311374441e - languageName: node - linkType: hard - -"@mui/lab@npm:5.0.0-alpha.170": - version: 5.0.0-alpha.170 - resolution: "@mui/lab@npm:5.0.0-alpha.170" - dependencies: - "@babel/runtime": "npm:^7.23.9" - "@mui/base": "npm:5.0.0-beta.40" - "@mui/system": "npm:^5.15.15" - "@mui/types": "npm:^7.2.14" - "@mui/utils": "npm:^5.15.14" - clsx: "npm:^2.1.0" - prop-types: "npm:^15.8.1" - peerDependencies: - "@emotion/react": ^11.5.0 - "@emotion/styled": ^11.3.0 - "@mui/material": ">=5.15.0" - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@emotion/react": - optional: true - "@emotion/styled": - optional: true - "@types/react": - optional: true - checksum: 10/be723d3824a8c56681c2fa71f3bfda5cad9404ed527ab82258ae85219fbb28e8080b90870954c064491699c15409fc2aa4e008e29011cadae1cb978179166f2d - languageName: node - linkType: hard - -"@mui/material@npm:5.15.15": - version: 5.15.15 - resolution: "@mui/material@npm:5.15.15" - dependencies: - "@babel/runtime": "npm:^7.23.9" - "@mui/base": "npm:5.0.0-beta.40" - "@mui/core-downloads-tracker": "npm:^5.15.15" - "@mui/system": "npm:^5.15.15" - "@mui/types": "npm:^7.2.14" - "@mui/utils": "npm:^5.15.14" - "@types/react-transition-group": "npm:^4.4.10" - clsx: "npm:^2.1.0" - csstype: "npm:^3.1.3" - prop-types: "npm:^15.8.1" - react-is: "npm:^18.2.0" - react-transition-group: "npm:^4.4.5" - peerDependencies: - "@emotion/react": ^11.5.0 - "@emotion/styled": ^11.3.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@emotion/react": - optional: true - "@emotion/styled": - optional: true - "@types/react": - optional: true - checksum: 10/e2803d078243ee5489bf693f7e9d421061dfda79b6ce74762f3a81e3c519cf69c18af179e4267fc9d0ce799898e6b3d7eac029e7dcfbea12dab5e867d641984b - languageName: node - linkType: hard - -"@mui/material@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/material@npm:5.14.19" - dependencies: - "@babel/runtime": "npm:^7.23.4" - "@mui/base": "npm:5.0.0-beta.25" - "@mui/core-downloads-tracker": "npm:^5.14.19" - "@mui/system": "npm:^5.14.19" - "@mui/types": "npm:^7.2.10" - "@mui/utils": "npm:^5.14.19" - "@types/react-transition-group": "npm:^4.4.9" - clsx: "npm:^2.0.0" - csstype: "npm:^3.1.2" - prop-types: "npm:^15.8.1" - react-is: "npm:^18.2.0" - react-transition-group: "npm:^4.4.5" - peerDependencies: - "@emotion/react": ^11.5.0 - "@emotion/styled": ^11.3.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@emotion/react": - optional: true - "@emotion/styled": - optional: true - "@types/react": - optional: true - checksum: 10/9b89bf20e5086801d8737d906d4c84023e04883a67186c4f523748740a90bee495a8c93ba7bc1272fdc0f9ee9951e2ebff149ecd63697abfba06dbfe9787f5fa - languageName: node - linkType: hard - -"@mui/private-theming@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/private-theming@npm:5.14.19" - dependencies: - "@babel/runtime": "npm:^7.23.4" - "@mui/utils": "npm:^5.14.19" - prop-types: "npm:^15.8.1" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/248687351477c7794a002dd0c4ae68216b5794591407e0b4751eede8fe35db94c163642365578938dc66fbeb7a6c771c811ab2f7fa4b2bc60f663dc826084ca0 - languageName: node - linkType: hard - -"@mui/private-theming@npm:^5.15.14": - version: 5.15.14 - resolution: "@mui/private-theming@npm:5.15.14" - dependencies: - "@babel/runtime": "npm:^7.23.9" - "@mui/utils": "npm:^5.15.14" - prop-types: "npm:^15.8.1" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/6a14311ed53ee4adccfe0ba93275b43773d22fdd10c0d4ba680b9368fc0616a5e0f38f29d2080bcd7e4ed79123047e5f245c403d3fd822e960a97762be65218d - languageName: node - linkType: hard - -"@mui/styled-engine@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/styled-engine@npm:5.14.19" - dependencies: - "@babel/runtime": "npm:^7.23.4" - "@emotion/cache": "npm:^11.11.0" - csstype: "npm:^3.1.2" - prop-types: "npm:^15.8.1" - peerDependencies: - "@emotion/react": ^11.4.1 - "@emotion/styled": ^11.3.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@emotion/react": - optional: true - "@emotion/styled": - optional: true - checksum: 10/210da24bcb47c8b911b0f4174ecd77ced2aa5eba442861b474fe575384d736edc9553b707be35a086ae514503c26dbfa5541a352db65fa7de970c6251365214b - languageName: node - linkType: hard - -"@mui/styled-engine@npm:^5.15.14": - version: 5.15.14 - resolution: "@mui/styled-engine@npm:5.15.14" - dependencies: - "@babel/runtime": "npm:^7.23.9" - "@emotion/cache": "npm:^11.11.0" - csstype: "npm:^3.1.3" - prop-types: "npm:^15.8.1" - peerDependencies: - "@emotion/react": ^11.4.1 - "@emotion/styled": ^11.3.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@emotion/react": - optional: true - "@emotion/styled": - optional: true - checksum: 10/2a5e03bb20502aef94cfb908898c50abb769192deb32d7f4237039683ce5266104cdc4055a7f0a8342aa62447d52b7439a4f2d0dda0fa6709c227c3621468cab - languageName: node - linkType: hard - -"@mui/system@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/system@npm:5.14.19" - dependencies: - "@babel/runtime": "npm:^7.23.4" - "@mui/private-theming": "npm:^5.14.19" - "@mui/styled-engine": "npm:^5.14.19" - "@mui/types": "npm:^7.2.10" - "@mui/utils": "npm:^5.14.19" - clsx: "npm:^2.0.0" - csstype: "npm:^3.1.2" - prop-types: "npm:^15.8.1" - peerDependencies: - "@emotion/react": ^11.5.0 - "@emotion/styled": ^11.3.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@emotion/react": - optional: true - "@emotion/styled": - optional: true - "@types/react": - optional: true - checksum: 10/68fddc614aae5dba86db134ae1b2ab7540d61e4008068ccd3c1cfa20d9f54508b9cf3ce68d2d1a4c7de237c9314206da291e987d323fa1425a12e5b36f2bc488 - languageName: node - linkType: hard - -"@mui/system@npm:^5.15.15": - version: 5.15.15 - resolution: "@mui/system@npm:5.15.15" - dependencies: - "@babel/runtime": "npm:^7.23.9" - "@mui/private-theming": "npm:^5.15.14" - "@mui/styled-engine": "npm:^5.15.14" - "@mui/types": "npm:^7.2.14" - "@mui/utils": "npm:^5.15.14" - clsx: "npm:^2.1.0" - csstype: "npm:^3.1.3" - prop-types: "npm:^15.8.1" - peerDependencies: - "@emotion/react": ^11.5.0 - "@emotion/styled": ^11.3.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@emotion/react": - optional: true - "@emotion/styled": - optional: true - "@types/react": - optional: true - checksum: 10/90a84ad0bc1b401b6e53b13fe9cfe8a34668e84885d391abf5ab80b3cd0f37370be25cb40af253cdd468746386282fed24964315933fcb28d2d6e62de0db7bf1 - languageName: node - linkType: hard - -"@mui/types@npm:^7.2.10": - version: 7.2.10 - resolution: "@mui/types@npm:7.2.10" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/83067cd1da9c79f7ee82f171ba718435d8aa12c6e72c4d5d24bee9e310416ccb91cb86cb0502f463e683e9707d90befc5112509fe7af54cacd39f8556b150f9b - languageName: node - linkType: hard - -"@mui/types@npm:^7.2.14": - version: 7.2.14 - resolution: "@mui/types@npm:7.2.14" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/b10cca8f63ea522be4f7c185acd1f4d031947e53824cbf9dc5649c165bcfa8a2749e83fd0bd1809b8e2698f58638ab2b4ce03550095989189d14434ea5c6c0b6 - languageName: node - linkType: hard - -"@mui/utils@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/utils@npm:5.14.19" - dependencies: - "@babel/runtime": "npm:^7.23.4" - "@types/prop-types": "npm:^15.7.11" - prop-types: "npm:^15.8.1" - react-is: "npm:^18.2.0" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/1abbcfef21fc71805af1a4d653d9adeec252ebe4892715a0c6c49246c6cfa84f46c82e033679ab50eb2cf3ef391d9eb622c48aa78f152032aa99a996eac98806 - languageName: node - linkType: hard - -"@mui/utils@npm:^5.15.14": - version: 5.15.14 - resolution: "@mui/utils@npm:5.15.14" - dependencies: - "@babel/runtime": "npm:^7.23.9" - "@types/prop-types": "npm:^15.7.11" - prop-types: "npm:^15.8.1" - react-is: "npm:^18.2.0" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/b3cbe2d0aa7ec65969752dababc39fc6e0b8bb1a9cf8b9bac42ca40e3dd3eaa59b79765bd259019318acc7421d64b9f421bc67e776a581d7c9da6a1c0c50bfbc - languageName: node - linkType: hard - -"@multiformats/base-x@npm:^4.0.1": - version: 4.0.1 - resolution: "@multiformats/base-x@npm:4.0.1" - checksum: 10/ecbf84bdd7613fd795e4a41f20f3e8cc7df8bbee84690b7feed383d45a638ed228a80ff6f5c930373cbf24539f64857b66023ee3c1e914f6bac9995c76414a87 - languageName: node - linkType: hard - -"@multiformats/multiaddr-to-uri@npm:^9.0.1": - version: 9.0.7 - resolution: "@multiformats/multiaddr-to-uri@npm:9.0.7" - dependencies: - "@multiformats/multiaddr": "npm:^12.0.0" - checksum: 10/39fe64f9e0817d0ba92e6baf3d57b6535d53e497dac6a0aa5d94c89924fb0a899b7ad8f6e20fb775c294d1b8e3e986259af7a58a9b97384d6d984c53397b21ad - languageName: node - linkType: hard - -"@multiformats/multiaddr@npm:11.6.1, @multiformats/multiaddr@npm:^11.1.5": - version: 11.6.1 - resolution: "@multiformats/multiaddr@npm:11.6.1" - dependencies: - "@chainsafe/is-ip": "npm:^2.0.1" - dns-over-http-resolver: "npm:^2.1.0" - err-code: "npm:^3.0.1" - multiformats: "npm:^11.0.0" - uint8arrays: "npm:^4.0.2" - varint: "npm:^6.0.0" - checksum: 10/eeb56dbbf658623d99a2280bf045e09d86ec9378f21c8b9a59dddc6c38be826365fe1ea77534af534e502dabda76131266f74e674db7a525ec562d5604700c71 - languageName: node - linkType: hard - -"@multiformats/multiaddr@npm:^12.0.0, @multiformats/multiaddr@npm:^12.1.3, @multiformats/multiaddr@npm:^12.1.5": - version: 12.1.7 - resolution: "@multiformats/multiaddr@npm:12.1.7" - dependencies: - "@chainsafe/is-ip": "npm:^2.0.1" - "@chainsafe/netmask": "npm:^2.0.0" - "@libp2p/interface": "npm:^0.1.1" - dns-over-http-resolver: "npm:^2.1.0" - multiformats: "npm:^12.0.1" - uint8-varint: "npm:^2.0.1" - uint8arrays: "npm:^4.0.2" - checksum: 10/b2575e785462c2b98a958f0fe3e12772757d9614defa30a4a3baaa1e843bf0859db4147d7d18f2039852a6b01443b644b63723412cae9449c714a918e41b7bd2 - languageName: node - linkType: hard - -"@nestjs/axios@npm:0.1.0": - version: 0.1.0 - resolution: "@nestjs/axios@npm:0.1.0" - dependencies: - axios: "npm:0.27.2" - peerDependencies: - "@nestjs/common": ^7.0.0 || ^8.0.0 || ^9.0.0 - reflect-metadata: ^0.1.12 - rxjs: ^6.0.0 || ^7.0.0 - checksum: 10/e524d365b2ad3229caa2166b5cea4a9dac899971ca729a36234b7301173acecd8c0fbad9bc4b2010d41f5155f1f24869b22a5782977c6aeeaa6f04d681531ec4 - languageName: node - linkType: hard - -"@nestjs/common@npm:9.3.11": - version: 9.3.11 - resolution: "@nestjs/common@npm:9.3.11" - dependencies: - iterare: "npm:1.2.1" - tslib: "npm:2.5.0" - uid: "npm:2.0.1" - peerDependencies: - cache-manager: <=5 - class-transformer: "*" - class-validator: "*" - reflect-metadata: ^0.1.12 - rxjs: ^7.1.0 - peerDependenciesMeta: - cache-manager: - optional: true - class-transformer: - optional: true - class-validator: - optional: true - checksum: 10/0c315c81368a65da8d6131e4f2be8843b0c64df0c01ecc29fddc22d5709c16816ef7f49d3e3ee26364c1eb799f2b8007c934571a618762b2fba2046a584a88ee - languageName: node - linkType: hard - -"@nestjs/core@npm:9.3.11": - version: 9.3.11 - resolution: "@nestjs/core@npm:9.3.11" - dependencies: - "@nuxtjs/opencollective": "npm:0.3.2" - fast-safe-stringify: "npm:2.1.1" - iterare: "npm:1.2.1" - path-to-regexp: "npm:3.2.0" - tslib: "npm:2.5.0" - uid: "npm:2.0.1" - peerDependencies: - "@nestjs/common": ^9.0.0 - "@nestjs/microservices": ^9.0.0 - "@nestjs/platform-express": ^9.0.0 - "@nestjs/websockets": ^9.0.0 - reflect-metadata: ^0.1.12 - rxjs: ^7.1.0 - peerDependenciesMeta: - "@nestjs/microservices": - optional: true - "@nestjs/platform-express": - optional: true - "@nestjs/websockets": - optional: true - checksum: 10/25ebc6220915d4fa0adc1b7e8edaf03f95bb9877335ac298bd01af75dd1014292d64e5e29773e4e4fa5daac3cba4fdaeb964759f66633b97816cba515e48b6f9 - languageName: node - linkType: hard - -"@ngtools/webpack@npm:16.2.1": - version: 16.2.1 - resolution: "@ngtools/webpack@npm:16.2.1" - peerDependencies: - "@angular/compiler-cli": ^16.0.0 - typescript: ">=4.9.3 <5.2" - webpack: ^5.54.0 - checksum: 10/dfdca8493de795625cb742ff745dbe3d7a6359884dbcde2368703a757600066c280a86685c623c047fbfa9179ebdce636402fa0153f5d598e0e36529d88ffebb - languageName: node - linkType: hard - -"@ngtools/webpack@npm:17.3.8": - version: 17.3.8 - resolution: "@ngtools/webpack@npm:17.3.8" - peerDependencies: - "@angular/compiler-cli": ^17.0.0 - typescript: ">=5.2 <5.5" - webpack: ^5.54.0 - checksum: 10/b608d11566c8cb85fe500a042b2230c12d36a995d0d26b5bb5135782cb3d48a2c0970dc2ae2022fa52ab1b204c2bec14d23bdd5a8ea8319a6ee61f760ae43cfc - languageName: node - linkType: hard - -"@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1": - version: 5.1.1-v1 - resolution: "@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1" - dependencies: - eslint-scope: "npm:5.1.1" - checksum: 10/f2e3b2d6a6e2d9f163ca22105910c9f850dc4897af0aea3ef0a5886b63d8e1ba6505b71c99cb78a3bba24a09557d601eb21c8dede3f3213753fcfef364eb0e57 - languageName: node - linkType: hard - -"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0": - version: 1.1.0 - resolution: "@noble/curves@npm:1.1.0" - dependencies: - "@noble/hashes": "npm:1.3.1" - checksum: 10/7028e3f19a4a2a601f9159e5423f51ae86ab231bed79a6e40649b063e1ed7f55f5da0475f1377bd2c5a8e5fc485af9ce0549ad89da6b983d6af48e5d0a2041ca - languageName: node - linkType: hard - -"@noble/curves@npm:1.2.0": - version: 1.2.0 - resolution: "@noble/curves@npm:1.2.0" - dependencies: - "@noble/hashes": "npm:1.3.2" - checksum: 10/94e02e9571a9fd42a3263362451849d2f54405cb3ce9fa7c45bc6b9b36dcd7d1d20e2e1e14cfded24937a13d82f1e60eefc4d7a14982ce0bc219a9fc0f51d1f9 - languageName: node - linkType: hard - -"@noble/curves@npm:^1.3.0": - version: 1.3.0 - resolution: "@noble/curves@npm:1.3.0" - dependencies: - "@noble/hashes": "npm:1.3.3" - checksum: 10/f3cbdd1af00179e30146eac5539e6df290228fb857a7a8ba36d1a772cbe59288a2ca83d06f175d3446ef00db3a80d7fd8b8347f7de9c2d4d5bf3865d8bb78252 - languageName: node - linkType: hard - -"@noble/ed25519@npm:^1.6.0": - version: 1.7.3 - resolution: "@noble/ed25519@npm:1.7.3" - checksum: 10/48d389a36ec5222366b477a22cfe33dc3837044b58232d99b3fff8ee8aba90877b8153eb60dd436869004f85c6101e8c907f17a48d818d218b4efecee1817237 - languageName: node - linkType: hard - -"@noble/hashes@npm:1.1.2": - version: 1.1.2 - resolution: "@noble/hashes@npm:1.1.2" - checksum: 10/2826c94ea30b8d2447fda549f4ffa97a637a480eeef5c96702a2f932c305038465f7436caf5b2bad41eb43c08c270b921e101488b18165feebe3854091b56d91 - languageName: node - linkType: hard - -"@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": - version: 1.2.0 - resolution: "@noble/hashes@npm:1.2.0" - checksum: 10/c295684a2799f4ddad10a855efd9b82c70c27ac5f7437642df9700e120087c796851dd95b12d2e7596802303fe6afbfdf0f8733b5c7453f70c4c080746dde6ff - languageName: node - linkType: hard - -"@noble/hashes@npm:1.3.1, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": - version: 1.3.1 - resolution: "@noble/hashes@npm:1.3.1" - checksum: 10/39474bab7e7813dbbfd8750476f48046d3004984e161fcd4333e40ca823f07b069010b35a20246e5b4ac20858e29913172a4d69720fd1e93620f7bedb70f9b72 - languageName: node - linkType: hard - -"@noble/hashes@npm:1.3.2": - version: 1.3.2 - resolution: "@noble/hashes@npm:1.3.2" - checksum: 10/685f59d2d44d88e738114b71011d343a9f7dce9dfb0a121f1489132f9247baa60bc985e5ec6f3213d114fbd1e1168e7294644e46cbd0ce2eba37994f28eeb51b - languageName: node - linkType: hard - -"@noble/hashes@npm:1.3.3, @noble/hashes@npm:^1.3.3": - version: 1.3.3 - resolution: "@noble/hashes@npm:1.3.3" - checksum: 10/1025ddde4d24630e95c0818e63d2d54ee131b980fe113312d17ed7468bc18f54486ac86c907685759f8a7e13c2f9b9e83ec7b67d1cc20836f36b5e4a65bb102d - languageName: node - linkType: hard - -"@noble/secp256k1@npm:1.7.1, @noble/secp256k1@npm:^1.5.4, @noble/secp256k1@npm:~1.7.0": - version: 1.7.1 - resolution: "@noble/secp256k1@npm:1.7.1" - checksum: 10/214d4756c20ed20809d948d0cc161e95664198cb127266faf747fd7deffe5444901f05fe9f833787738f2c6e60b09e544c2f737f42f73b3699e3999ba15b1b63 - languageName: node - linkType: hard - -"@nodelib/fs.scandir@npm:2.1.5": - version: 2.1.5 - resolution: "@nodelib/fs.scandir@npm:2.1.5" - dependencies: - "@nodelib/fs.stat": "npm:2.0.5" - run-parallel: "npm:^1.1.9" - checksum: 10/6ab2a9b8a1d67b067922c36f259e3b3dfd6b97b219c540877a4944549a4d49ea5ceba5663905ab5289682f1f3c15ff441d02f0447f620a42e1cb5e1937174d4b - languageName: node - linkType: hard - -"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": - version: 2.0.5 - resolution: "@nodelib/fs.stat@npm:2.0.5" - checksum: 10/012480b5ca9d97bff9261571dbbec7bbc6033f69cc92908bc1ecfad0792361a5a1994bc48674b9ef76419d056a03efadfce5a6cf6dbc0a36559571a7a483f6f0 - languageName: node - linkType: hard - -"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": - version: 1.2.8 - resolution: "@nodelib/fs.walk@npm:1.2.8" - dependencies: - "@nodelib/fs.scandir": "npm:2.1.5" - fastq: "npm:^1.6.0" - checksum: 10/40033e33e96e97d77fba5a238e4bba4487b8284678906a9f616b5579ddaf868a18874c0054a75402c9fbaaa033a25ceae093af58c9c30278e35c23c9479e79b0 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-block@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.2" - dependencies: - "@nomicfoundation/ethereumjs-common": "npm:4.0.2" - "@nomicfoundation/ethereumjs-rlp": "npm:5.0.2" - "@nomicfoundation/ethereumjs-trie": "npm:6.0.2" - "@nomicfoundation/ethereumjs-tx": "npm:5.0.2" - "@nomicfoundation/ethereumjs-util": "npm:9.0.2" - ethereum-cryptography: "npm:0.1.3" - ethers: "npm:^5.7.1" - checksum: 10/e3d7c24aa10306ae26389ce464f71e36fe8d331706e942a626594afdd097451d3bda210238b1da843e582b347f4349115b53432076b0f9b37ba36e31818b12cb - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-blockchain@npm:7.0.2": - version: 7.0.2 - resolution: "@nomicfoundation/ethereumjs-blockchain@npm:7.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": "npm:5.0.2" - "@nomicfoundation/ethereumjs-common": "npm:4.0.2" - "@nomicfoundation/ethereumjs-ethash": "npm:3.0.2" - "@nomicfoundation/ethereumjs-rlp": "npm:5.0.2" - "@nomicfoundation/ethereumjs-trie": "npm:6.0.2" - "@nomicfoundation/ethereumjs-tx": "npm:5.0.2" - "@nomicfoundation/ethereumjs-util": "npm:9.0.2" - abstract-level: "npm:^1.0.3" - debug: "npm:^4.3.3" - ethereum-cryptography: "npm:0.1.3" - level: "npm:^8.0.0" - lru-cache: "npm:^5.1.1" - memory-level: "npm:^1.0.0" - checksum: 10/4cc27cf1d39175f93ec02b4627f0320258685fc19541c0cb2b9208204e65a924f3fbeb69c23840d7100a75c6d88b7a0c65f552cb44bf1e06b530a39ac6f04e17 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-common@npm:4.0.2": - version: 4.0.2 - resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.2" - dependencies: - "@nomicfoundation/ethereumjs-util": "npm:9.0.2" - crc-32: "npm:^1.2.0" - checksum: 10/ea0199240a9cfc932450421b00ba390a9d357092fdbb6ceee2b09ee6a8bc7820fb1df076ead94e0b6748158620ec655099e401816d47ad24eb603694f3a787d1 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-ethash@npm:3.0.2": - version: 3.0.2 - resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": "npm:5.0.2" - "@nomicfoundation/ethereumjs-rlp": "npm:5.0.2" - "@nomicfoundation/ethereumjs-util": "npm:9.0.2" - abstract-level: "npm:^1.0.3" - bigint-crypto-utils: "npm:^3.0.23" - ethereum-cryptography: "npm:0.1.3" - checksum: 10/c7d963a6806e70cb96ff290a9bc461fb6ad4f74144d9f38eb5f190b228d9b0961aa67d398f80da4b59efb8c57957c936b32faab26c17cf07a6145efe0a6d16e9 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-evm@npm:2.0.2": - version: 2.0.2 - resolution: "@nomicfoundation/ethereumjs-evm@npm:2.0.2" - dependencies: - "@ethersproject/providers": "npm:^5.7.1" - "@nomicfoundation/ethereumjs-common": "npm:4.0.2" - "@nomicfoundation/ethereumjs-tx": "npm:5.0.2" - "@nomicfoundation/ethereumjs-util": "npm:9.0.2" - debug: "npm:^4.3.3" - ethereum-cryptography: "npm:0.1.3" - mcl-wasm: "npm:^0.7.1" - rustbn.js: "npm:~0.2.0" - checksum: 10/abcc280500d776a214b282d5a66093fdf3b91582e9f69d6f35e0c7000f58af57060cd384acda7d147193f962f17a8c4ed55e5f2453b2d5b43d694d6588306ef9 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-rlp@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.2" - bin: - rlp: bin/rlp - checksum: 10/ceb820296624f45fa8f7cd3e2cfa4d229722953e91631e6fb3fbca9d1ebe8eea21a8ef4917fa15295f05bed369db06eb81f44e74382b1bca4ece2bb000c6e6d4 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-statemanager@npm:2.0.2": - version: 2.0.2 - resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.2" - dependencies: - "@nomicfoundation/ethereumjs-common": "npm:4.0.2" - "@nomicfoundation/ethereumjs-rlp": "npm:5.0.2" - debug: "npm:^4.3.3" - ethereum-cryptography: "npm:0.1.3" - ethers: "npm:^5.7.1" - js-sdsl: "npm:^4.1.4" - checksum: 10/0eb939c75aa63517ec8832330c02a71c060fd8424ebe608a072c563a0a9d16621dca9a9c851fa98971316aed80dd9174a0d72ae09633a9698367a3316d773389 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-trie@npm:6.0.2": - version: 6.0.2 - resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.2" - dependencies: - "@nomicfoundation/ethereumjs-rlp": "npm:5.0.2" - "@nomicfoundation/ethereumjs-util": "npm:9.0.2" - "@types/readable-stream": "npm:^2.3.13" - ethereum-cryptography: "npm:0.1.3" - readable-stream: "npm:^3.6.0" - checksum: 10/f70b89e7f089a90647ea96babc23427cf4db3bdc027667b93be38a0ff03f3222c5130529778fb210ffa56eb2a53cb1657cafdfe828c6a41825bb7e2b74614060 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-tx@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.2" - dependencies: - "@chainsafe/ssz": "npm:^0.9.2" - "@ethersproject/providers": "npm:^5.7.2" - "@nomicfoundation/ethereumjs-common": "npm:4.0.2" - "@nomicfoundation/ethereumjs-rlp": "npm:5.0.2" - "@nomicfoundation/ethereumjs-util": "npm:9.0.2" - ethereum-cryptography: "npm:0.1.3" - checksum: 10/0feb40b602d3b525359f57ad76d64542e192a6f8bb714477b9044b5ba13ab7007a3b5a8a2b2df50e3fdcc9da0c04d07daa3797bc5cc6aad5d29d5633c5616251 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-util@npm:9.0.2": - version: 9.0.2 - resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.2" - dependencies: - "@chainsafe/ssz": "npm:^0.10.0" - "@nomicfoundation/ethereumjs-rlp": "npm:5.0.2" - ethereum-cryptography: "npm:0.1.3" - checksum: 10/ec687ecd964bf624e82b5f0cbbffd0896dfdcff6e7b3eb216d18b79cdb6735f2c8a516d04c5a2b0e36a906bd8f35174a4653634151f35e615a7d24d901a35905 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-vm@npm:7.0.2": - version: 7.0.2 - resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": "npm:5.0.2" - "@nomicfoundation/ethereumjs-blockchain": "npm:7.0.2" - "@nomicfoundation/ethereumjs-common": "npm:4.0.2" - "@nomicfoundation/ethereumjs-evm": "npm:2.0.2" - "@nomicfoundation/ethereumjs-rlp": "npm:5.0.2" - "@nomicfoundation/ethereumjs-statemanager": "npm:2.0.2" - "@nomicfoundation/ethereumjs-trie": "npm:6.0.2" - "@nomicfoundation/ethereumjs-tx": "npm:5.0.2" - "@nomicfoundation/ethereumjs-util": "npm:9.0.2" - debug: "npm:^4.3.3" - ethereum-cryptography: "npm:0.1.3" - mcl-wasm: "npm:^0.7.1" - rustbn.js: "npm:~0.2.0" - checksum: 10/7ad391bc68e8e755ed0b88012e8857390590b5ba8b11bdb4995b04ba7afed5570a4259b85fff329affb643e87be12972ca44d269e14e5f840a82c315011d0d7a - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.1" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.1" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.1" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.1" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.1" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.1" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.1" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.1" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer@npm:^0.1.0": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer@npm:0.1.1" - dependencies: - "@nomicfoundation/solidity-analyzer-darwin-arm64": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-darwin-x64": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-freebsd-x64": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-linux-x64-musl": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "npm:0.1.1" - dependenciesMeta: - "@nomicfoundation/solidity-analyzer-darwin-arm64": - optional: true - "@nomicfoundation/solidity-analyzer-darwin-x64": - optional: true - "@nomicfoundation/solidity-analyzer-freebsd-x64": - optional: true - "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": - optional: true - "@nomicfoundation/solidity-analyzer-linux-arm64-musl": - optional: true - "@nomicfoundation/solidity-analyzer-linux-x64-gnu": - optional: true - "@nomicfoundation/solidity-analyzer-linux-x64-musl": - optional: true - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": - optional: true - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": - optional: true - "@nomicfoundation/solidity-analyzer-win32-x64-msvc": - optional: true - checksum: 10/a3b3b557f911791b26a352d4e11abf5cbac427de33fda7d70fda043f1994a7f63f542c1752e6415a82c5452625470ba4fbf040e7d87dddd1aa3366e79b3dc2c6 - languageName: node - linkType: hard - -"@npmcli/agent@npm:^2.0.0": - version: 2.1.1 - resolution: "@npmcli/agent@npm:2.1.1" - dependencies: - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.1" - lru-cache: "npm:^10.0.1" - socks-proxy-agent: "npm:^8.0.1" - checksum: 10/3b0e613ae75766ed3919066d826a3a204f091b5274243a52d68924322ab7678997803ea8a48073ded1de072b53d83022e4cbd8c531d1559b3c9ce87fac054db0 - languageName: node - linkType: hard - -"@npmcli/arborist@npm:^7.5.3": - version: 7.5.3 - resolution: "@npmcli/arborist@npm:7.5.3" - dependencies: - "@isaacs/string-locale-compare": "npm:^1.1.0" - "@npmcli/fs": "npm:^3.1.1" - "@npmcli/installed-package-contents": "npm:^2.1.0" - "@npmcli/map-workspaces": "npm:^3.0.2" - "@npmcli/metavuln-calculator": "npm:^7.1.1" - "@npmcli/name-from-folder": "npm:^2.0.0" - "@npmcli/node-gyp": "npm:^3.0.0" - "@npmcli/package-json": "npm:^5.1.0" - "@npmcli/query": "npm:^3.1.0" - "@npmcli/redact": "npm:^2.0.0" - "@npmcli/run-script": "npm:^8.1.0" - bin-links: "npm:^4.0.4" - cacache: "npm:^18.0.3" - common-ancestor-path: "npm:^1.0.1" - hosted-git-info: "npm:^7.0.2" - json-parse-even-better-errors: "npm:^3.0.2" - json-stringify-nice: "npm:^1.1.4" - lru-cache: "npm:^10.2.2" - minimatch: "npm:^9.0.4" - nopt: "npm:^7.2.1" - npm-install-checks: "npm:^6.2.0" - npm-package-arg: "npm:^11.0.2" - npm-pick-manifest: "npm:^9.0.1" - npm-registry-fetch: "npm:^17.0.1" - pacote: "npm:^18.0.6" - parse-conflict-json: "npm:^3.0.0" - proc-log: "npm:^4.2.0" - proggy: "npm:^2.0.0" - promise-all-reject-late: "npm:^1.0.0" - promise-call-limit: "npm:^3.0.1" - read-package-json-fast: "npm:^3.0.2" - semver: "npm:^7.3.7" - ssri: "npm:^10.0.6" - treeverse: "npm:^3.0.0" - walk-up-path: "npm:^3.0.1" - bin: - arborist: bin/index.js - checksum: 10/e149df712a2396f59e348ff32d763f62bbdf576f3976110f47b10cd912a91cce76c83f859bb0f97f4ca5273f15a270df54a702190753772f3539a3f10307b6ed - languageName: node - linkType: hard - -"@npmcli/fs@npm:^1.0.0": - version: 1.1.1 - resolution: "@npmcli/fs@npm:1.1.1" - dependencies: - "@gar/promisify": "npm:^1.0.1" - semver: "npm:^7.3.5" - checksum: 10/8b5e6d75759b9f1a8b7885913df274c8cbbb1221176872615f2aecedf47b2c36e5dfbf4046ff1a905c9f3592fbd32051b3050b8a897bf03514a1a404b39af074 - languageName: node - linkType: hard - -"@npmcli/fs@npm:^2.1.0": - version: 2.1.0 - resolution: "@npmcli/fs@npm:2.1.0" - dependencies: - "@gar/promisify": "npm:^1.1.3" - semver: "npm:^7.3.5" - checksum: 10/1fe97efb5c1250c5986b46b6c8256b1eab8159a6d50fc8ace9f90937b3195541272faf77f18bdbf5eeb89bab68332c7846ac5ab9337e6099e63c6007388ebe84 - languageName: node - linkType: hard - -"@npmcli/fs@npm:^3.1.0": - version: 3.1.0 - resolution: "@npmcli/fs@npm:3.1.0" - dependencies: - semver: "npm:^7.3.5" - checksum: 10/f3a7ab3a31de65e42aeb6ed03ed035ef123d2de7af4deb9d4a003d27acc8618b57d9fb9d259fe6c28ca538032a028f37337264388ba27d26d37fff7dde22476e - languageName: node - linkType: hard - -"@npmcli/fs@npm:^3.1.1": - version: 3.1.1 - resolution: "@npmcli/fs@npm:3.1.1" - dependencies: - semver: "npm:^7.3.5" - checksum: 10/1e0e04087049b24b38bc0b30d87a9388ee3ca1d3fdfc347c2f77d84fcfe6a51f250bc57ba2c1f614d7e4285c6c62bf8c769bc19aa0949ea39e5b043ee023b0bd - languageName: node - linkType: hard - -"@npmcli/git@npm:^4.0.0": - version: 4.0.4 - resolution: "@npmcli/git@npm:4.0.4" - dependencies: - "@npmcli/promise-spawn": "npm:^6.0.0" - lru-cache: "npm:^7.4.4" - npm-pick-manifest: "npm:^8.0.0" - proc-log: "npm:^3.0.0" - promise-inflight: "npm:^1.0.1" - promise-retry: "npm:^2.0.1" - semver: "npm:^7.3.5" - which: "npm:^3.0.0" - checksum: 10/98e656d198ecf987816c926ca6d8797554ddb8d2da4b018bac6e240ff3ad25e63f947b797a2b19144d4adbcd38eaf78cf2ab684459c36df73117c00352d0e2a9 - languageName: node - linkType: hard - -"@npmcli/git@npm:^5.0.0": - version: 5.0.3 - resolution: "@npmcli/git@npm:5.0.3" - dependencies: - "@npmcli/promise-spawn": "npm:^7.0.0" - lru-cache: "npm:^10.0.1" - npm-pick-manifest: "npm:^9.0.0" - proc-log: "npm:^3.0.0" - promise-inflight: "npm:^1.0.1" - promise-retry: "npm:^2.0.1" - semver: "npm:^7.3.5" - which: "npm:^4.0.0" - checksum: 10/cf2216c5e6e2ef30eac135b9f6fdc3c999253c2778e9af38d5acda73af10c3f20b2fbf834521ea3e874e27633854c7fd32ba36162ba1dcaa5f67d19438059626 - languageName: node - linkType: hard - -"@npmcli/installed-package-contents@npm:^2.0.1": - version: 2.0.2 - resolution: "@npmcli/installed-package-contents@npm:2.0.2" - dependencies: - npm-bundled: "npm:^3.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - bin: - installed-package-contents: lib/index.js - checksum: 10/4598a97e3d6e4c8602157d9ac47723071f09662852add0f275af62d1038d8e44d0c5ff9afa05358ba3ca7e100c860d679964be0a163add6ea028dc72d31f0af1 - languageName: node - linkType: hard - -"@npmcli/installed-package-contents@npm:^2.1.0": - version: 2.1.0 - resolution: "@npmcli/installed-package-contents@npm:2.1.0" - dependencies: - npm-bundled: "npm:^3.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - bin: - installed-package-contents: bin/index.js - checksum: 10/68ab3ea2994f5ea21c61940de94ec4f2755fe569ef0b86e22db0695d651a3c88915c5eab61d634cfa203b9c801ee307c8aa134c2c4bd2e4fe1aa8d295ce8a163 - languageName: node - linkType: hard - -"@npmcli/map-workspaces@npm:^3.0.2": - version: 3.0.3 - resolution: "@npmcli/map-workspaces@npm:3.0.3" - dependencies: - "@npmcli/name-from-folder": "npm:^2.0.0" - glob: "npm:^9.3.1" - minimatch: "npm:^7.4.2" - read-package-json-fast: "npm:^3.0.0" - checksum: 10/d2718ca70fa7c0300062443e55168982045a77fac0e31d68e995d7b4aa255e2fd45ffe4116507dbc5741043c4135997acc18fd3e7b21abc67bbe57d130893776 - languageName: node - linkType: hard - -"@npmcli/metavuln-calculator@npm:^7.1.1": - version: 7.1.1 - resolution: "@npmcli/metavuln-calculator@npm:7.1.1" - dependencies: - cacache: "npm:^18.0.0" - json-parse-even-better-errors: "npm:^3.0.0" - pacote: "npm:^18.0.0" - proc-log: "npm:^4.1.0" - semver: "npm:^7.3.5" - checksum: 10/57163b4bde4af3f5badb0c9b0c868f9539e2a112ee73c606680b7548b148bf58e793952d74eb1e581c9cc2e630bc03bc60adc04b3f1e7960482f97af817f28d2 - languageName: node - linkType: hard - -"@npmcli/move-file@npm:^1.0.1": - version: 1.1.2 - resolution: "@npmcli/move-file@npm:1.1.2" - dependencies: - mkdirp: "npm:^1.0.4" - rimraf: "npm:^3.0.2" - checksum: 10/c96381d4a37448ea280951e46233f7e541058cf57a57d4094dd4bdcaae43fa5872b5f2eb6bfb004591a68e29c5877abe3cdc210cb3588cbf20ab2877f31a7de7 - languageName: node - linkType: hard - -"@npmcli/move-file@npm:^2.0.0": - version: 2.0.0 - resolution: "@npmcli/move-file@npm:2.0.0" - dependencies: - mkdirp: "npm:^1.0.4" - rimraf: "npm:^3.0.2" - checksum: 10/1388777b507b0c592d53f41b9d182e1a8de7763bc625fc07999b8edbc22325f074e5b3ec90af79c89d6987fdb2325bc66d59f483258543c14a43661621f841b0 - languageName: node - linkType: hard - -"@npmcli/name-from-folder@npm:^2.0.0": - version: 2.0.0 - resolution: "@npmcli/name-from-folder@npm:2.0.0" - checksum: 10/75beb40373f916cfcf7327958b3ab920ab4e32d24217197927dd1c76a325c7645695011fce9cb2a8f93616f8b74946e84eebe3830303e11ed9d400dae623a99b - languageName: node - linkType: hard - -"@npmcli/node-gyp@npm:^3.0.0": - version: 3.0.0 - resolution: "@npmcli/node-gyp@npm:3.0.0" - checksum: 10/dd9fed3e80df8fbb20443f28651a8ed7235f2c15286ecc010e2d3cd392c85912e59ef29218c0b02f098defb4cbc8cdf045aab1d32d5cef6ace289913196ed5df - languageName: node - linkType: hard - -"@npmcli/package-json@npm:^5.0.0": - version: 5.0.0 - resolution: "@npmcli/package-json@npm:5.0.0" - dependencies: - "@npmcli/git": "npm:^5.0.0" - glob: "npm:^10.2.2" - hosted-git-info: "npm:^7.0.0" - json-parse-even-better-errors: "npm:^3.0.0" - normalize-package-data: "npm:^6.0.0" - proc-log: "npm:^3.0.0" - semver: "npm:^7.5.3" - checksum: 10/bb907e934e96dae3d3aa26aa45cbaa87b318cb64c4aaaacfa3596b1ca5147ad1b51c3281eb529df12116a163d33ca99f48c4593b0c168e38412dfbf2c5cced72 - languageName: node - linkType: hard - -"@npmcli/package-json@npm:^5.1.0, @npmcli/package-json@npm:^5.2.0": - version: 5.2.0 - resolution: "@npmcli/package-json@npm:5.2.0" - dependencies: - "@npmcli/git": "npm:^5.0.0" - glob: "npm:^10.2.2" - hosted-git-info: "npm:^7.0.0" - json-parse-even-better-errors: "npm:^3.0.0" - normalize-package-data: "npm:^6.0.0" - proc-log: "npm:^4.0.0" - semver: "npm:^7.5.3" - checksum: 10/c3d2218877bfc005bca3b7a11f53825bf16a68811b8e8ed0c9b219cceb8e8e646d70efab8c5d6decbd8007f286076468b3f456dab4d41d648aff73a5f3a6fce2 - languageName: node - linkType: hard - -"@npmcli/promise-spawn@npm:^6.0.0, @npmcli/promise-spawn@npm:^6.0.1": - version: 6.0.2 - resolution: "@npmcli/promise-spawn@npm:6.0.2" - dependencies: - which: "npm:^3.0.0" - checksum: 10/cc94a83ff1626ad93d42c2ea583dba1fb2d24cdab49caf0af77a3a0ff9bdbba34e09048b6821d4060ea7a58d4a41d49bece4ae3716929e2077c2fff0f5e94d94 - languageName: node - linkType: hard - -"@npmcli/promise-spawn@npm:^7.0.0": - version: 7.0.0 - resolution: "@npmcli/promise-spawn@npm:7.0.0" - dependencies: - which: "npm:^4.0.0" - checksum: 10/6bda8e0cd007d34799b49fa20bc70eeb3fcac03aaecd021207b39e9b253511c5e5a0586345ae7726a8e34e49dbfd5927fcc7b5793273f4a995701687210c9614 - languageName: node - linkType: hard - -"@npmcli/query@npm:^3.1.0": - version: 3.1.0 - resolution: "@npmcli/query@npm:3.1.0" - dependencies: - postcss-selector-parser: "npm:^6.0.10" - checksum: 10/fa79ae317934c95d14b89cb149cb8eb0b2a4e611acf0661681cfa964bf9af6740f60efe095c8bb7e880398e0955666408cc8a3ffede90e87922cb81cce1efcdb - languageName: node - linkType: hard - -"@npmcli/redact@npm:^1.1.0": - version: 1.1.0 - resolution: "@npmcli/redact@npm:1.1.0" - checksum: 10/c6c81c2d1463bc9f30d40f983a3dbb3144503030ff455e5a8904ff82ca39b95e46e9830fa4413f17f9a77604cdbb1f2370c53dd0ba4841cf24b79843e1fcf825 - languageName: node - linkType: hard - -"@npmcli/redact@npm:^2.0.0": - version: 2.0.1 - resolution: "@npmcli/redact@npm:2.0.1" - checksum: 10/f19a521fa71b539707eee69106ed3d97e3047712d4f279c80007a8d0aef63d137e3062941f11e19d6cec03812eaa0872891ae20c84f603d9e021dfb93cc9d6e5 - languageName: node - linkType: hard - -"@npmcli/run-script@npm:^6.0.0": - version: 6.0.0 - resolution: "@npmcli/run-script@npm:6.0.0" - dependencies: - "@npmcli/node-gyp": "npm:^3.0.0" - "@npmcli/promise-spawn": "npm:^6.0.0" - node-gyp: "npm:^9.0.0" - read-package-json-fast: "npm:^3.0.0" - which: "npm:^3.0.0" - checksum: 10/e9230124fdb53ae9decfb47c2f3ef3b71f52339e38d636f792bd3cd867928591d647478eabe6d11accca7057c8e30fbbb5f1cfae0821488aa464c726f4431fcc - languageName: node - linkType: hard - -"@npmcli/run-script@npm:^7.0.0": - version: 7.0.4 - resolution: "@npmcli/run-script@npm:7.0.4" - dependencies: - "@npmcli/node-gyp": "npm:^3.0.0" - "@npmcli/package-json": "npm:^5.0.0" - "@npmcli/promise-spawn": "npm:^7.0.0" - node-gyp: "npm:^10.0.0" - which: "npm:^4.0.0" - checksum: 10/f09268051f74af7d7be46e9911a23126d531160c338d3c05d53e6cd7994b88271fb4ec524139fe7f2d826525f15a281eafef3be02831adc1f68556a8a668621a - languageName: node - linkType: hard - -"@npmcli/run-script@npm:^8.0.0, @npmcli/run-script@npm:^8.1.0": - version: 8.1.0 - resolution: "@npmcli/run-script@npm:8.1.0" - dependencies: - "@npmcli/node-gyp": "npm:^3.0.0" - "@npmcli/package-json": "npm:^5.0.0" - "@npmcli/promise-spawn": "npm:^7.0.0" - node-gyp: "npm:^10.0.0" - proc-log: "npm:^4.0.0" - which: "npm:^4.0.0" - checksum: 10/256bd580f82b98db93e54065bf9bcc94946be4f2d668a062cf756cb8ea091f58ef7154b3d2450d79738081a150f25cc48f6075351911e672f24ffd34350f02f2 - languageName: node - linkType: hard - -"@nuxtjs/opencollective@npm:0.3.2": - version: 0.3.2 - resolution: "@nuxtjs/opencollective@npm:0.3.2" - dependencies: - chalk: "npm:^4.1.0" - consola: "npm:^2.15.0" - node-fetch: "npm:^2.6.1" - bin: - opencollective: bin/opencollective.js - checksum: 10/0512871f424a2eae41e9385671ac840f28e8508a209df68c363cc97e009b95a6fd4bdfa2a34c9df78a74fa36d7e171e28792cd11da0b2be28c20ee1806b3ea5e - languageName: node - linkType: hard - -"@octokit/auth-token@npm:^5.0.0": - version: 5.1.1 - resolution: "@octokit/auth-token@npm:5.1.1" - checksum: 10/956ee8166ad1b623478ac5168529a081658bceb16e267102b149b44366a9280b5104a0346a4f1c5de12981d2dedb767f7b71d7e1b1ddd1ccb591efa8c6c06f94 - languageName: node - linkType: hard - -"@octokit/core@npm:^6.1.2": - version: 6.1.2 - resolution: "@octokit/core@npm:6.1.2" - dependencies: - "@octokit/auth-token": "npm:^5.0.0" - "@octokit/graphql": "npm:^8.0.0" - "@octokit/request": "npm:^9.0.0" - "@octokit/request-error": "npm:^6.0.1" - "@octokit/types": "npm:^13.0.0" - before-after-hook: "npm:^3.0.2" - universal-user-agent: "npm:^7.0.0" - checksum: 10/ef8cc502790142d892b97b92a6e398323f1e4be777e5675681d5985d4681855f4e6f02a7b16466984af702ecdffed0ab923610d59c07c540c3e243160818eaec - languageName: node - linkType: hard - -"@octokit/endpoint@npm:^10.0.0": - version: 10.1.1 - resolution: "@octokit/endpoint@npm:10.1.1" - dependencies: - "@octokit/types": "npm:^13.0.0" - universal-user-agent: "npm:^7.0.2" - checksum: 10/6b8991b278ba7e63ddf95e7396f54e5f1347237f11fb845322ec25101764336ed0994ccb197c449b4fd4bc00ec5b78780ccbc3a0b48ba0620dcc115027a3add1 - languageName: node - linkType: hard - -"@octokit/graphql@npm:^8.0.0": - version: 8.1.1 - resolution: "@octokit/graphql@npm:8.1.1" - dependencies: - "@octokit/request": "npm:^9.0.0" - "@octokit/types": "npm:^13.0.0" - universal-user-agent: "npm:^7.0.0" - checksum: 10/d8b3941e6afa724fba0cff79c71c839971aed6f87777833e1f6facc816c5fcd9a5b637dad779462cd723aa7490151f69fc6634758ca5bfe76f2cce298df934a1 - languageName: node - linkType: hard - -"@octokit/openapi-types@npm:^22.2.0": - version: 22.2.0 - resolution: "@octokit/openapi-types@npm:22.2.0" - checksum: 10/0471b0c789fada5aa2390e6f82ba477738228ef7d2d986dda9aab0cb625d1562bd178ba0ba4d2655ce841079cd5efff9e58ece2077c27e569ea22109ea301830 - languageName: node - linkType: hard - -"@octokit/plugin-enterprise-rest@npm:^6.0.1": - version: 6.0.1 - resolution: "@octokit/plugin-enterprise-rest@npm:6.0.1" - checksum: 10/2ea8aca141a0329479cfaf9425f7bc226fe6aa0064fd6e7798b565aa962a5a757a89a03e78b956909e767aa86cd28e1346bf82908dfdf614af921d175a6a95e1 - languageName: node - linkType: hard - -"@octokit/plugin-paginate-rest@npm:^11.0.0": - version: 11.3.3 - resolution: "@octokit/plugin-paginate-rest@npm:11.3.3" - dependencies: - "@octokit/types": "npm:^13.5.0" - peerDependencies: - "@octokit/core": ">=6" - checksum: 10/87eeb4dd68a8207e669989cdbf9de3717b74038d630c2b803cbc7a9c44c3ff74771ce1cf45fa056b7172aaaa80fd9a0e4bf5eca06aabc19f30e7e29898f1f69e - languageName: node - linkType: hard - -"@octokit/plugin-request-log@npm:^5.1.0": - version: 5.3.0 - resolution: "@octokit/plugin-request-log@npm:5.3.0" - peerDependencies: - "@octokit/core": ">=6" - checksum: 10/8c918b14f0687e8a3d9c7c81ef1092a49de07681940cc1aee0aeb7e3dd8ac64f69af5d65932eec32f6db4af3dca80541ad3bb13ac0fa44af3e2340ed91909272 - languageName: node - linkType: hard - -"@octokit/plugin-rest-endpoint-methods@npm:^13.0.0": - version: 13.2.4 - resolution: "@octokit/plugin-rest-endpoint-methods@npm:13.2.4" - dependencies: - "@octokit/types": "npm:^13.5.0" - peerDependencies: - "@octokit/core": ">=6" - checksum: 10/5d90adb9b5ab52a7ce260fcd2acc48a6723fc888e4f5711f958694c4bfb53fa146ad6791ce651060566d1bd513b3d9287c44a25b1da866d9611c3e1e739b5981 - languageName: node - linkType: hard - -"@octokit/request-error@npm:^6.0.1": - version: 6.1.1 - resolution: "@octokit/request-error@npm:6.1.1" - dependencies: - "@octokit/types": "npm:^13.0.0" - checksum: 10/cae7bc4078629a02edcf35977f496a4b943e730165f6d7828795073f99a1d884ac67343b02eff69e553a5057765e466d70ddd9d266787f505aa29018858ab06d - languageName: node - linkType: hard - -"@octokit/request@npm:^9.0.0": - version: 9.1.1 - resolution: "@octokit/request@npm:9.1.1" - dependencies: - "@octokit/endpoint": "npm:^10.0.0" - "@octokit/request-error": "npm:^6.0.1" - "@octokit/types": "npm:^13.1.0" - universal-user-agent: "npm:^7.0.2" - checksum: 10/aef47d85751c387c6ef29e70b3b86c9033fc7940361092c80728f7e99cc0ba54ddd00bbecb4422e50df78744600cfb8a1a2bc6916c5b6440677aa8ebd6b9b291 - languageName: node - linkType: hard - -"@octokit/rest@npm:^21.0.0": - version: 21.0.0 - resolution: "@octokit/rest@npm:21.0.0" - dependencies: - "@octokit/core": "npm:^6.1.2" - "@octokit/plugin-paginate-rest": "npm:^11.0.0" - "@octokit/plugin-request-log": "npm:^5.1.0" - "@octokit/plugin-rest-endpoint-methods": "npm:^13.0.0" - checksum: 10/7da1c97866af04038fe4e384ce0a90cc4750bb951085c10053ceb73a4818cfe460336d7794ab3c65648cf5e195dba8e90940e36aec1e7ed22b6606cda38c88e0 - languageName: node - linkType: hard - -"@octokit/types@npm:^13.0.0, @octokit/types@npm:^13.1.0, @octokit/types@npm:^13.5.0": - version: 13.5.0 - resolution: "@octokit/types@npm:13.5.0" - dependencies: - "@octokit/openapi-types": "npm:^22.2.0" - checksum: 10/d2aeebc1d8684c4e950f054a52b484e898b72d9f5f8433bcf010161716eea20d1132820d922212f19557a8f147354f2674d1a27b22941308b7c298bdd2674ffa - languageName: node - linkType: hard - -"@openapitools/openapi-generator-cli@npm:2.7.0": - version: 2.7.0 - resolution: "@openapitools/openapi-generator-cli@npm:2.7.0" - dependencies: - "@nestjs/axios": "npm:0.1.0" - "@nestjs/common": "npm:9.3.11" - "@nestjs/core": "npm:9.3.11" - "@nuxtjs/opencollective": "npm:0.3.2" - chalk: "npm:4.1.2" - commander: "npm:8.3.0" - compare-versions: "npm:4.1.4" - concurrently: "npm:6.5.1" - console.table: "npm:0.10.0" - fs-extra: "npm:10.1.0" - glob: "npm:7.1.6" - inquirer: "npm:8.2.5" - lodash: "npm:4.17.21" - reflect-metadata: "npm:0.1.13" - rxjs: "npm:7.8.0" - tslib: "npm:2.0.3" - bin: - openapi-generator-cli: main.js - checksum: 10/4081b31e519c6714c98bdf3c9b1013bce8ce2074b17c1ed362a9ac1ab7ce44be99b238224cbb61a80160fa4e4e087171eef7b3e5182cb44e6b3145ce7a88334e - languageName: node - linkType: hard - -"@opentelemetry/api@npm:^1.0.1": - version: 1.0.4 - resolution: "@opentelemetry/api@npm:1.0.4" - checksum: 10/3e1535e26fb3c690c478379fd6262c4a3fe6887c9e100b17afbecf952a51dc1e3079a4e450c2e27368ab4f0673820195bf43eda0e8da530aaffa04032cae008b - languageName: node - linkType: hard - -"@opentelemetry/api@npm:^1.4.0": - version: 1.9.0 - resolution: "@opentelemetry/api@npm:1.9.0" - checksum: 10/a607f0eef971893c4f2ee2a4c2069aade6ec3e84e2a1f5c2aac19f65c5d9eeea41aa72db917c1029faafdd71789a1a040bdc18f40d63690e22ccae5d7070f194 - languageName: node - linkType: hard - -"@openzeppelin/contracts-upgradeable@npm:4.9.6": - version: 4.9.6 - resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.6" - checksum: 10/af9057147f13b6f0e13ca69581777f615f2cce8c6c274ec00fbea906a9095cd9ca1fb70e2c1282122a9f522fd639641c180bf1ad79bb2722494aac5ae9e565bc - languageName: node - linkType: hard - -"@openzeppelin/contracts@npm:4.9.6": - version: 4.9.6 - resolution: "@openzeppelin/contracts@npm:4.9.6" - checksum: 10/71f45ad42e68c0559be4ba502115462a01c76fc805c08d3005c10b5550a093f1a2b00b2d7e9d6d1f331e147c50fd4ad832f71c4470ec5b34f5a2d0751cd19a47 - languageName: node - linkType: hard - -"@peculiar/asn1-schema@npm:^2.3.6": - version: 2.3.8 - resolution: "@peculiar/asn1-schema@npm:2.3.8" - dependencies: - asn1js: "npm:^3.0.5" - pvtsutils: "npm:^1.3.5" - tslib: "npm:^2.6.2" - checksum: 10/da349985cff73ae7ea52b6b66c6b4b339a768d5eb9164ad03e73c30985ec0a1c94849b323a826b00a049d7de3840368f77bebe84193205a77565cdfdac6ed524 - languageName: node - linkType: hard - -"@peculiar/json-schema@npm:^1.1.12": - version: 1.1.12 - resolution: "@peculiar/json-schema@npm:1.1.12" - dependencies: - tslib: "npm:^2.0.0" - checksum: 10/dfec178afe63a02b6d45da8a18e51ef417e9f5412a8c2809c9a07b29b9376fadee1b4f2ea2d92d4e5a7b8eba76d9e99afbef6d7e9a27bd85257f69c4da228cbc - languageName: node - linkType: hard - -"@peculiar/webcrypto@npm:^1.0.22": - version: 1.4.3 - resolution: "@peculiar/webcrypto@npm:1.4.3" - dependencies: - "@peculiar/asn1-schema": "npm:^2.3.6" - "@peculiar/json-schema": "npm:^1.1.12" - pvtsutils: "npm:^1.3.2" - tslib: "npm:^2.5.0" - webcrypto-core: "npm:^1.7.7" - checksum: 10/548f5e32badcfdb02c903ca240daccac5d87ba841e436bd6d30e5455ced22917146130dab21afb718568ea935d6b04dc66fb33a4b6ab652dd868abff81e74a81 - languageName: node - linkType: hard - -"@pkgjs/parseargs@npm:^0.11.0": - version: 0.11.0 - resolution: "@pkgjs/parseargs@npm:0.11.0" - checksum: 10/115e8ceeec6bc69dff2048b35c0ab4f8bbee12d8bb6c1f4af758604586d802b6e669dcb02dda61d078de42c2b4ddce41b3d9e726d7daa6b4b850f4adbf7333ff - languageName: node - linkType: hard - -"@pkgr/core@npm:^0.1.0": - version: 0.1.1 - resolution: "@pkgr/core@npm:0.1.1" - checksum: 10/6f25fd2e3008f259c77207ac9915b02f1628420403b2630c92a07ff963129238c9262afc9e84344c7a23b5cc1f3965e2cd17e3798219f5fd78a63d144d3cceba - languageName: node - linkType: hard - -"@pmmmwh/react-refresh-webpack-plugin@npm:^0.5.3": - version: 0.5.11 - resolution: "@pmmmwh/react-refresh-webpack-plugin@npm:0.5.11" - dependencies: - ansi-html-community: "npm:^0.0.8" - common-path-prefix: "npm:^3.0.0" - core-js-pure: "npm:^3.23.3" - error-stack-parser: "npm:^2.0.6" - find-up: "npm:^5.0.0" - html-entities: "npm:^2.1.0" - loader-utils: "npm:^2.0.4" - schema-utils: "npm:^3.0.0" - source-map: "npm:^0.7.3" - peerDependencies: - "@types/webpack": 4.x || 5.x - react-refresh: ">=0.10.0 <1.0.0" - sockjs-client: ^1.4.0 - type-fest: ">=0.17.0 <5.0.0" - webpack: ">=4.43.0 <6.0.0" - webpack-dev-server: 3.x || 4.x - webpack-hot-middleware: 2.x - webpack-plugin-serve: 0.x || 1.x - peerDependenciesMeta: - "@types/webpack": - optional: true - sockjs-client: - optional: true - type-fest: - optional: true - webpack-dev-server: - optional: true - webpack-hot-middleware: - optional: true - webpack-plugin-serve: - optional: true - checksum: 10/ee7eff63ef930c8ec37b341d12f180598a5173938a5b8d1d7c53306eab10b3f3f23adcba4824e5a93ddcd0cf185a90baa0b6f483f27a320dd86ad61941940eb6 - languageName: node - linkType: hard - -"@polkadot/api-augment@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/api-augment@npm:10.9.1" - dependencies: - "@polkadot/api-base": "npm:10.9.1" - "@polkadot/rpc-augment": "npm:10.9.1" - "@polkadot/types": "npm:10.9.1" - "@polkadot/types-augment": "npm:10.9.1" - "@polkadot/types-codec": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - tslib: "npm:^2.5.3" - checksum: 10/718699caf85df407dd92df8054ad50ce9f9ba57cf3289fad03de497212956f606a358513023487625a15a691ac7f8e226e4dc04b4da867be93e359c88becc6be - languageName: node - linkType: hard - -"@polkadot/api-base@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/api-base@npm:10.9.1" - dependencies: - "@polkadot/rpc-core": "npm:10.9.1" - "@polkadot/types": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - rxjs: "npm:^7.8.1" - tslib: "npm:^2.5.3" - checksum: 10/390b172ac19cfc3a4b527641db3be539a2f3e97d3f95013d91409f5c4d9fa588dd39aea8703368c8ab48ebf1a4ddb68756d3acc9e632aa6abbc043967884856f - languageName: node - linkType: hard - -"@polkadot/api-contract@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/api-contract@npm:10.9.1" - dependencies: - "@polkadot/api": "npm:10.9.1" - "@polkadot/api-augment": "npm:10.9.1" - "@polkadot/types": "npm:10.9.1" - "@polkadot/types-codec": "npm:10.9.1" - "@polkadot/types-create": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - "@polkadot/util-crypto": "npm:^12.3.1" - rxjs: "npm:^7.8.1" - tslib: "npm:^2.5.3" - checksum: 10/b2c9227e0c3e2cf98c13fe084d79dc67c86dd879d4f2671ba95553c4363d347f90aee7b6e324e501f0044d0a09b597be566c1ffade5e66f66578d00c74db455d - languageName: node - linkType: hard - -"@polkadot/api-derive@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/api-derive@npm:10.9.1" - dependencies: - "@polkadot/api": "npm:10.9.1" - "@polkadot/api-augment": "npm:10.9.1" - "@polkadot/api-base": "npm:10.9.1" - "@polkadot/rpc-core": "npm:10.9.1" - "@polkadot/types": "npm:10.9.1" - "@polkadot/types-codec": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - "@polkadot/util-crypto": "npm:^12.3.1" - rxjs: "npm:^7.8.1" - tslib: "npm:^2.5.3" - checksum: 10/ec35e731d3f1cb20c5914f1a54be96d98a72e30ba3e757045213ceaee20292f3abb7bb6307f89c2ee4e143341f2392efd6524e5a0104da062f054b74cc3bd986 - languageName: node - linkType: hard - -"@polkadot/api@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/api@npm:10.9.1" - dependencies: - "@polkadot/api-augment": "npm:10.9.1" - "@polkadot/api-base": "npm:10.9.1" - "@polkadot/api-derive": "npm:10.9.1" - "@polkadot/keyring": "npm:^12.3.1" - "@polkadot/rpc-augment": "npm:10.9.1" - "@polkadot/rpc-core": "npm:10.9.1" - "@polkadot/rpc-provider": "npm:10.9.1" - "@polkadot/types": "npm:10.9.1" - "@polkadot/types-augment": "npm:10.9.1" - "@polkadot/types-codec": "npm:10.9.1" - "@polkadot/types-create": "npm:10.9.1" - "@polkadot/types-known": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - "@polkadot/util-crypto": "npm:^12.3.1" - eventemitter3: "npm:^5.0.1" - rxjs: "npm:^7.8.1" - tslib: "npm:^2.5.3" - checksum: 10/5abc194abaefe30450459118bf5dfa857baf14a1d0d488b0aafc085afcd23ddb8b1e1f3505e56f6b551c6ee11152cd96b4ca883eaba448d05fea5484d8869db9 - languageName: node - linkType: hard - -"@polkadot/keyring@npm:^12.3.1": - version: 12.6.2 - resolution: "@polkadot/keyring@npm:12.6.2" - dependencies: - "@polkadot/util": "npm:12.6.2" - "@polkadot/util-crypto": "npm:12.6.2" - tslib: "npm:^2.6.2" - peerDependencies: - "@polkadot/util": 12.6.2 - "@polkadot/util-crypto": 12.6.2 - checksum: 10/8faf59684ff5d041ba5fa7dd85c3ee4ac3920b2d907f81a485e37aedab64798f9c59b7ec914eb24dfc5271a4ef31e1244aecbd247c66f2b2ec518cfd37dd30fc - languageName: node - linkType: hard - -"@polkadot/networks@npm:12.6.2, @polkadot/networks@npm:^12.3.1": - version: 12.6.2 - resolution: "@polkadot/networks@npm:12.6.2" - dependencies: - "@polkadot/util": "npm:12.6.2" - "@substrate/ss58-registry": "npm:^1.44.0" - tslib: "npm:^2.6.2" - checksum: 10/6c2cd7f631ec40489e8f8260b15a138bd0d276d222e4133847e8915c476aea415498dd8d8ab583bdf76f2e4e5bb1c7a20bca9dac110eae2fb48d5f6cf6798349 - languageName: node - linkType: hard - -"@polkadot/rpc-augment@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/rpc-augment@npm:10.9.1" - dependencies: - "@polkadot/rpc-core": "npm:10.9.1" - "@polkadot/types": "npm:10.9.1" - "@polkadot/types-codec": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - tslib: "npm:^2.5.3" - checksum: 10/b09904476ee7ef7a589420d662662968d51ae5b65c0825cfaa9e552f32db66dce5a527b5528078c765478b721de2c158bc0465255eab425e6af6c9f93e7344d6 - languageName: node - linkType: hard - -"@polkadot/rpc-core@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/rpc-core@npm:10.9.1" - dependencies: - "@polkadot/rpc-augment": "npm:10.9.1" - "@polkadot/rpc-provider": "npm:10.9.1" - "@polkadot/types": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - rxjs: "npm:^7.8.1" - tslib: "npm:^2.5.3" - checksum: 10/5fee9517f16afcc7423ad105a9dda9897b9570fda58e0850d36538742e5e992bac0d5cf6135246a2d514f80e59ed41739268bfc4427e0e18c7efb8a2f0328b05 - languageName: node - linkType: hard - -"@polkadot/rpc-provider@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/rpc-provider@npm:10.9.1" - dependencies: - "@polkadot/keyring": "npm:^12.3.1" - "@polkadot/types": "npm:10.9.1" - "@polkadot/types-support": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - "@polkadot/util-crypto": "npm:^12.3.1" - "@polkadot/x-fetch": "npm:^12.3.1" - "@polkadot/x-global": "npm:^12.3.1" - "@polkadot/x-ws": "npm:^12.3.1" - "@substrate/connect": "npm:0.7.26" - eventemitter3: "npm:^5.0.1" - mock-socket: "npm:^9.2.1" - nock: "npm:^13.3.1" - tslib: "npm:^2.5.3" - dependenciesMeta: - "@substrate/connect": - optional: true - checksum: 10/d068aa0258daad35d2a2e2427051f6f4f4dcb395efe8f7beb9cc59040670d9db718fb94a07dad1f25e820cc5369a1926e483546fac3b74fa1abccd26c7fdcd6f - languageName: node - linkType: hard - -"@polkadot/types-augment@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/types-augment@npm:10.9.1" - dependencies: - "@polkadot/types": "npm:10.9.1" - "@polkadot/types-codec": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - tslib: "npm:^2.5.3" - checksum: 10/17c48daede6f31a202e8be7495598a5843a96595dcbba2b2afff8a8bb7d9bc3624c8c70c0e0b069b49fe90d7e84775cdc17a002d5d53109f1ea0ee6a7d5855b8 - languageName: node - linkType: hard - -"@polkadot/types-codec@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/types-codec@npm:10.9.1" - dependencies: - "@polkadot/util": "npm:^12.3.1" - "@polkadot/x-bigint": "npm:^12.3.1" - tslib: "npm:^2.5.3" - checksum: 10/4f7bad74e92606a8d272fd124dd6ad345ae4754a20fc00816ec90606b3085f1aaca115e9e793599dc75e8fafc9d493e3ef39e4a2af8ccfdc62b79d7f306f2eb4 - languageName: node - linkType: hard - -"@polkadot/types-create@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/types-create@npm:10.9.1" - dependencies: - "@polkadot/types-codec": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - tslib: "npm:^2.5.3" - checksum: 10/d8de4a012128c9e73e551bef64690353a311b6e53df67aa04dcceb29d7f0689b84b10a94ed0aa621b522b346f019bdc6518b87cd900eb22cc48b141b93a5f22b - languageName: node - linkType: hard - -"@polkadot/types-known@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/types-known@npm:10.9.1" - dependencies: - "@polkadot/networks": "npm:^12.3.1" - "@polkadot/types": "npm:10.9.1" - "@polkadot/types-codec": "npm:10.9.1" - "@polkadot/types-create": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - tslib: "npm:^2.5.3" - checksum: 10/c70a3a27431b36c2c4a799f56471797727960e07cca6fca0a6f906dfe118c2fab4d438a57b7dd40e8491e4ef46efa43f6b5d3d0bfb2e986e4447a57c22793dea - languageName: node - linkType: hard - -"@polkadot/types-support@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/types-support@npm:10.9.1" - dependencies: - "@polkadot/util": "npm:^12.3.1" - tslib: "npm:^2.5.3" - checksum: 10/c2f20f9c8d27f99227d926b534470dd22a9ede17ef54fd77072ae5fd990c6d12b480238630060acce7d69c8d40596d1618e21ddd919fefd441df6b8ce80b0b3d - languageName: node - linkType: hard - -"@polkadot/types@npm:10.9.1": - version: 10.9.1 - resolution: "@polkadot/types@npm:10.9.1" - dependencies: - "@polkadot/keyring": "npm:^12.3.1" - "@polkadot/types-augment": "npm:10.9.1" - "@polkadot/types-codec": "npm:10.9.1" - "@polkadot/types-create": "npm:10.9.1" - "@polkadot/util": "npm:^12.3.1" - "@polkadot/util-crypto": "npm:^12.3.1" - rxjs: "npm:^7.8.1" - tslib: "npm:^2.5.3" - checksum: 10/ef62b6ff8d454b27f5d3cee450c13e9d64eb0d837560d368a3a0c183ffebaef8b879a630bdebfb4b925cfcc9f97cd7e2f67b97388fed4dbda4f22d8e2e1560b0 - languageName: node - linkType: hard - -"@polkadot/util-crypto@npm:12.6.2, @polkadot/util-crypto@npm:^12.3.1": - version: 12.6.2 - resolution: "@polkadot/util-crypto@npm:12.6.2" - dependencies: - "@noble/curves": "npm:^1.3.0" - "@noble/hashes": "npm:^1.3.3" - "@polkadot/networks": "npm:12.6.2" - "@polkadot/util": "npm:12.6.2" - "@polkadot/wasm-crypto": "npm:^7.3.2" - "@polkadot/wasm-util": "npm:^7.3.2" - "@polkadot/x-bigint": "npm:12.6.2" - "@polkadot/x-randomvalues": "npm:12.6.2" - "@scure/base": "npm:^1.1.5" - tslib: "npm:^2.6.2" - peerDependencies: - "@polkadot/util": 12.6.2 - checksum: 10/a587e5e25697f3a928ae8677b82ccdbcc1df95122db2bbde753b0605f44487136fe2f55c502460d931def0007e856db40b1b34b4da3c674638ead459e79f227a - languageName: node - linkType: hard - -"@polkadot/util@npm:12.6.2, @polkadot/util@npm:^12.3.1": - version: 12.6.2 - resolution: "@polkadot/util@npm:12.6.2" - dependencies: - "@polkadot/x-bigint": "npm:12.6.2" - "@polkadot/x-global": "npm:12.6.2" - "@polkadot/x-textdecoder": "npm:12.6.2" - "@polkadot/x-textencoder": "npm:12.6.2" - "@types/bn.js": "npm:^5.1.5" - bn.js: "npm:^5.2.1" - tslib: "npm:^2.6.2" - checksum: 10/b7a3c2be417d670fc64d0642818cadbf041cbcfae830f2ee45fc2496e86c8e11c385854b733504a7d6a6391066fd0ef544a1748f0f8809215c37a5c0ff64571d - languageName: node - linkType: hard - -"@polkadot/wasm-bridge@npm:7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-bridge@npm:7.3.2" - dependencies: - "@polkadot/wasm-util": "npm:7.3.2" - tslib: "npm:^2.6.2" - peerDependencies: - "@polkadot/util": "*" - "@polkadot/x-randomvalues": "*" - checksum: 10/8d8afa55d9f14043fb9e414b356d6ba4aa0ccc52219b8022fc86a5ea5be569dea34383b461528069996f5399011db6060ceff158227606d95ab779717ea25f5f - languageName: node - linkType: hard - -"@polkadot/wasm-crypto-asmjs@npm:7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-crypto-asmjs@npm:7.3.2" - dependencies: - tslib: "npm:^2.6.2" - peerDependencies: - "@polkadot/util": "*" - checksum: 10/b8c0c7b3a1e5b4b07b0d4fbec51ae19c529c8a943c0b3c4631490e05f5cc61fa352e7eaf7a9fabeb49ab2e40760ff584346a929e67f6eece82134c13963e6c4b - languageName: node - linkType: hard - -"@polkadot/wasm-crypto-init@npm:7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-crypto-init@npm:7.3.2" - dependencies: - "@polkadot/wasm-bridge": "npm:7.3.2" - "@polkadot/wasm-crypto-asmjs": "npm:7.3.2" - "@polkadot/wasm-crypto-wasm": "npm:7.3.2" - "@polkadot/wasm-util": "npm:7.3.2" - tslib: "npm:^2.6.2" - peerDependencies: - "@polkadot/util": "*" - "@polkadot/x-randomvalues": "*" - checksum: 10/94b950c01f20c2ce98e2e8bfd3dc94fdcdc095a2b3d609c5de3db3bc9e403871ff08479d7eac1d2e4d048b9375e82dafb5bfab3d9d86988ec4afc41e7539d0af - languageName: node - linkType: hard - -"@polkadot/wasm-crypto-wasm@npm:7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-crypto-wasm@npm:7.3.2" - dependencies: - "@polkadot/wasm-util": "npm:7.3.2" - tslib: "npm:^2.6.2" - peerDependencies: - "@polkadot/util": "*" - checksum: 10/f984db1bf121827b8a39b2f18d838958dfcedb901037a382a5b67126dc20a9c1cec4f3dd8f9ccc2ccd5a5f259d9f2b62df2f03d55cf83185f84709c1b87c5673 - languageName: node - linkType: hard - -"@polkadot/wasm-crypto@npm:^7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-crypto@npm:7.3.2" - dependencies: - "@polkadot/wasm-bridge": "npm:7.3.2" - "@polkadot/wasm-crypto-asmjs": "npm:7.3.2" - "@polkadot/wasm-crypto-init": "npm:7.3.2" - "@polkadot/wasm-crypto-wasm": "npm:7.3.2" - "@polkadot/wasm-util": "npm:7.3.2" - tslib: "npm:^2.6.2" - peerDependencies: - "@polkadot/util": "*" - "@polkadot/x-randomvalues": "*" - checksum: 10/ec0bf040388890b0d268ca94d2311bbb27a45b46b4f5812a2a478c1fea3c747878244535280b9c38bf2a65b9b4533bf4f9fddbc4c715d167940e6d951fef146b - languageName: node - linkType: hard - -"@polkadot/wasm-util@npm:7.3.2, @polkadot/wasm-util@npm:^7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-util@npm:7.3.2" - dependencies: - tslib: "npm:^2.6.2" - peerDependencies: - "@polkadot/util": "*" - checksum: 10/4b19f59aaca5c62933c5b355116a0fcd8dfa03b3e13f2b4c8491058f6d29fd030c956dee3f1c0821da981b874741c9ea62840c179369afb1a358a22216e5ff3c - languageName: node - linkType: hard - -"@polkadot/x-bigint@npm:12.6.2, @polkadot/x-bigint@npm:^12.3.1": - version: 12.6.2 - resolution: "@polkadot/x-bigint@npm:12.6.2" - dependencies: - "@polkadot/x-global": "npm:12.6.2" - tslib: "npm:^2.6.2" - checksum: 10/8a9533ba955d06213e3810d48e95618186cc832375f82d8b52376a99d7c8f9fdd01ffb9c35495522aec8c28d18ca5ef6c8feeec9770b83ebb64cded4cd3b7e27 - languageName: node - linkType: hard - -"@polkadot/x-fetch@npm:^12.3.1": - version: 12.6.2 - resolution: "@polkadot/x-fetch@npm:12.6.2" - dependencies: - "@polkadot/x-global": "npm:12.6.2" - node-fetch: "npm:^3.3.2" - tslib: "npm:^2.6.2" - checksum: 10/755feee15234b31de9e74bae5eca1a2e9c17e3e76330e5c5cca5e446fc3c350b8f02e3c3853005d1dd4b3da9d4f6a6c3ffd6d2146ae529b0fa6ed3c4206343af - languageName: node - linkType: hard - -"@polkadot/x-global@npm:12.6.2, @polkadot/x-global@npm:^12.3.1": - version: 12.6.2 - resolution: "@polkadot/x-global@npm:12.6.2" - dependencies: - tslib: "npm:^2.6.2" - checksum: 10/9159bd77e099f734f7c48ba3e37a886ba376c50066b664ee52caf0bf8eb0399b762ca08404ef6470c22e4d20e9fc8c5e0a87026efcbbd0f21ea5504b0e33d587 - languageName: node - linkType: hard - -"@polkadot/x-randomvalues@npm:12.6.2": - version: 12.6.2 - resolution: "@polkadot/x-randomvalues@npm:12.6.2" - dependencies: - "@polkadot/x-global": "npm:12.6.2" - tslib: "npm:^2.6.2" - peerDependencies: - "@polkadot/util": 12.6.2 - "@polkadot/wasm-util": "*" - checksum: 10/9ab555931ab81a8834800da35f04cb86df48b0d706d33ea89c51f42b8d340dab7312c462d01ecae04573ba6a01ff1ad6066ea6cf82b1330482ff537eb3c12eeb - languageName: node - linkType: hard - -"@polkadot/x-textdecoder@npm:12.6.2": - version: 12.6.2 - resolution: "@polkadot/x-textdecoder@npm:12.6.2" - dependencies: - "@polkadot/x-global": "npm:12.6.2" - tslib: "npm:^2.6.2" - checksum: 10/ba8ebe34cce1445a78d4eb744c8cfcf068cebfaf6c8efca23e1cdb037e8769cb2738b77b7266e3f86cd2459bb3eb87744f9518cba76e76fca609a16e6b84789e - languageName: node - linkType: hard - -"@polkadot/x-textencoder@npm:12.6.2": - version: 12.6.2 - resolution: "@polkadot/x-textencoder@npm:12.6.2" - dependencies: - "@polkadot/x-global": "npm:12.6.2" - tslib: "npm:^2.6.2" - checksum: 10/b2e721d19660f7bcf3995d695fac5d78d4bc8c5fd0632ec0735eb20dd9b4b79fad1ce7dfe7ade202c4ace5cd2d6b8ac663bb4dca273afa050f73cf1e99498f82 - languageName: node - linkType: hard - -"@polkadot/x-ws@npm:^12.3.1": - version: 12.6.2 - resolution: "@polkadot/x-ws@npm:12.6.2" - dependencies: - "@polkadot/x-global": "npm:12.6.2" - tslib: "npm:^2.6.2" - ws: "npm:^8.15.1" - checksum: 10/de987c0a9d5df7d9eb17d96fd47afb2417eb85b7126e4e11bc4fe7dc908b54307390a1e3da61d251cd5f1f6edd054712f018bdc695ce946e0267806d1f050119 - languageName: node - linkType: hard - -"@popperjs/core@npm:^2.11.8": - version: 2.11.8 - resolution: "@popperjs/core@npm:2.11.8" - checksum: 10/ddd16090cde777aaf102940f05d0274602079a95ad9805bd20bc55dcc7c3a2ba1b99dd5c73e5cc2753c3d31250ca52a67d58059459d7d27debb983a9f552936c - languageName: node - linkType: hard - -"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/aspromise@npm:1.1.2" - checksum: 10/8a938d84fe4889411296db66b29287bd61ea3c14c2d23e7a8325f46a2b8ce899857c5f038d65d7641805e6c1d06b495525c7faf00c44f85a7ee6476649034969 - languageName: node - linkType: hard - -"@protobufjs/base64@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/base64@npm:1.1.2" - checksum: 10/c71b100daeb3c9bdccab5cbc29495b906ba0ae22ceedc200e1ba49717d9c4ab15a6256839cebb6f9c6acae4ed7c25c67e0a95e734f612b258261d1a3098fe342 - languageName: node - linkType: hard - -"@protobufjs/codegen@npm:^2.0.4": - version: 2.0.4 - resolution: "@protobufjs/codegen@npm:2.0.4" - checksum: 10/c6ee5fa172a8464f5253174d3c2353ea520c2573ad7b6476983d9b1346f4d8f2b44aa29feb17a949b83c1816bc35286a5ea265ed9d8fdd2865acfa09668c0447 - languageName: node - linkType: hard - -"@protobufjs/eventemitter@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/eventemitter@npm:1.1.0" - checksum: 10/03af3e99f17ad421283d054c88a06a30a615922a817741b43ca1b13e7c6b37820a37f6eba9980fb5150c54dba6e26cb6f7b64a6f7d8afa83596fafb3afa218c3 - languageName: node - linkType: hard - -"@protobufjs/fetch@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/fetch@npm:1.1.0" - dependencies: - "@protobufjs/aspromise": "npm:^1.1.1" - "@protobufjs/inquire": "npm:^1.1.0" - checksum: 10/67ae40572ad536e4ef94269199f252c024b66e3059850906bdaee161ca1d75c73d04d35cd56f147a8a5a079f5808e342b99e61942c1dae15604ff0600b09a958 - languageName: node - linkType: hard - -"@protobufjs/float@npm:^1.0.2": - version: 1.0.2 - resolution: "@protobufjs/float@npm:1.0.2" - checksum: 10/634c2c989da0ef2f4f19373d64187e2a79f598c5fb7991afb689d29a2ea17c14b796b29725945fa34b9493c17fb799e08ac0a7ccaae460ee1757d3083ed35187 - languageName: node - linkType: hard - -"@protobufjs/inquire@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/inquire@npm:1.1.0" - checksum: 10/c09efa34a5465cb120775e1a482136f2340a58b4abce7e93d72b8b5a9324a0e879275016ef9fcd73d72a4731639c54f2bb755bb82f916e4a78892d1d840bb3d2 - languageName: node - linkType: hard - -"@protobufjs/path@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/path@npm:1.1.2" - checksum: 10/bb709567935fd385a86ad1f575aea98131bbd719c743fb9b6edd6b47ede429ff71a801cecbd64fc72deebf4e08b8f1bd8062793178cdaed3713b8d15771f9b83 - languageName: node - linkType: hard - -"@protobufjs/pool@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/pool@npm:1.1.0" - checksum: 10/b9c7047647f6af28e92aac54f6f7c1f7ff31b201b4bfcc7a415b2861528854fce3ec666d7e7e10fd744da905f7d4aef2205bbcc8944ca0ca7a82e18134d00c46 - languageName: node - linkType: hard - -"@protobufjs/utf8@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/utf8@npm:1.1.0" - checksum: 10/131e289c57534c1d73a0e55782d6751dd821db1583cb2f7f7e017c9d6747addaebe79f28120b2e0185395d990aad347fb14ffa73ef4096fa38508d61a0e64602 - languageName: node - linkType: hard - -"@redocly/ajv@npm:^8.11.0": - version: 8.11.0 - resolution: "@redocly/ajv@npm:8.11.0" - dependencies: - fast-deep-equal: "npm:^3.1.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - uri-js: "npm:^4.2.2" - checksum: 10/ec2fca2c08715e5618c498ce55884f7703e296deebf93675e3c9ad124caf5fe36f4da04be6729575f80a75e3d09295f7072ce066ed58393ced289e43dd6eabd8 - languageName: node - linkType: hard - -"@redocly/config@npm:^0.6.0": - version: 0.6.0 - resolution: "@redocly/config@npm:0.6.0" - checksum: 10/bde6c0f32e85bf70d7645fccd5332ddee6a4bbb07893bd61cd3c8067eee7b339edb1c1de3cb8b1bbd982ba461ac6e70837a4b9eafb20993cc0fd44dd8e500312 - languageName: node - linkType: hard - -"@redocly/openapi-core@npm:1.15.0": - version: 1.15.0 - resolution: "@redocly/openapi-core@npm:1.15.0" - dependencies: - "@redocly/ajv": "npm:^8.11.0" - "@redocly/config": "npm:^0.6.0" - colorette: "npm:^1.2.0" - js-levenshtein: "npm:^1.1.6" - js-yaml: "npm:^4.1.0" - lodash.isequal: "npm:^4.5.0" - minimatch: "npm:^5.0.1" - node-fetch: "npm:^2.6.1" - pluralize: "npm:^8.0.0" - yaml-ast-parser: "npm:0.0.43" - checksum: 10/7234f23d324999fcac38a7a78530cb3c88dcf9289ac331123324f7029ec79b701507de43137d86293273ef6be094ca1b818cf0e0bf0404509bccc1e575589655 - languageName: node - linkType: hard - -"@redux-saga/core@npm:^1.0.0": - version: 1.2.3 - resolution: "@redux-saga/core@npm:1.2.3" - dependencies: - "@babel/runtime": "npm:^7.6.3" - "@redux-saga/deferred": "npm:^1.2.1" - "@redux-saga/delay-p": "npm:^1.2.1" - "@redux-saga/is": "npm:^1.1.3" - "@redux-saga/symbols": "npm:^1.1.3" - "@redux-saga/types": "npm:^1.2.1" - redux: "npm:^4.0.4" - typescript-tuple: "npm:^2.2.1" - checksum: 10/9398033da1da4fcf8f6d3b0b0bd9901bd1530cca437023a8e9aba0b7616e246c801ab2a836dd8b2181ff38d2857896a962a35304d9902e77e1dec5079b9d9851 - languageName: node - linkType: hard - -"@redux-saga/deferred@npm:^1.2.1": - version: 1.2.1 - resolution: "@redux-saga/deferred@npm:1.2.1" - checksum: 10/d06af67b3da8fb9932e5ab6c75de999be113c757f0bc05688e3509ec26c73e823eae6d16626079691342caedc3b179bd2665a006690a9fc372eea80b5bf0d404 - languageName: node - linkType: hard - -"@redux-saga/delay-p@npm:^1.2.1": - version: 1.2.1 - resolution: "@redux-saga/delay-p@npm:1.2.1" - dependencies: - "@redux-saga/symbols": "npm:^1.1.3" - checksum: 10/060533ce8ba6b919caa5d47961eb5d8c1d171519fccd5d44208c26a0b94f3f315c8ea440f1b23af70ed53ebd0445b64567d6a0ac9663a6f703dd8088746ce2b5 - languageName: node - linkType: hard - -"@redux-saga/is@npm:^1.1.3": - version: 1.1.3 - resolution: "@redux-saga/is@npm:1.1.3" - dependencies: - "@redux-saga/symbols": "npm:^1.1.3" - "@redux-saga/types": "npm:^1.2.1" - checksum: 10/36907fcd8bd6acfdcc2e4cca8bb1ae0676e4169375da7dc1ef0dab66b6e367417e1653def98d02ee8e8f654de1f3694d15e5110a614444d3f9f1ad6169476bea - languageName: node - linkType: hard - -"@redux-saga/symbols@npm:^1.1.3": - version: 1.1.3 - resolution: "@redux-saga/symbols@npm:1.1.3" - checksum: 10/005cb0939673c0c50b477c40df942e10c31d4f3405561c223640c6f8c2bd29cb207ad089a02ad79a8777f307e128904f00336358aba7e72869f1263fe6744b3e - languageName: node - linkType: hard - -"@redux-saga/types@npm:^1.2.1": - version: 1.2.1 - resolution: "@redux-saga/types@npm:1.2.1" - checksum: 10/521bda9f19cb28c9572bcef28b065908d10b3acec5ad27d0b8993f4d21ecb2ccef8cdbce459e27c60f7cc6a8b87d5d5231048ddb1026527e05d145ea0db5aec2 - languageName: node - linkType: hard - -"@remix-run/router@npm:1.14.2": - version: 1.14.2 - resolution: "@remix-run/router@npm:1.14.2" - checksum: 10/422844e88b985f1e287301b302c6cf8169c9eea792f80d40464f97b25393bb2e697228ebd7a7b61444d5a51c5873c4a637aad20acde5886a5caf62e833c5ceee - languageName: node - linkType: hard - -"@rollup/plugin-babel@npm:^5.2.0": - version: 5.3.1 - resolution: "@rollup/plugin-babel@npm:5.3.1" - dependencies: - "@babel/helper-module-imports": "npm:^7.10.4" - "@rollup/pluginutils": "npm:^3.1.0" - peerDependencies: - "@babel/core": ^7.0.0 - "@types/babel__core": ^7.1.9 - rollup: ^1.20.0||^2.0.0 - peerDependenciesMeta: - "@types/babel__core": - optional: true - checksum: 10/eb3ee5fedd86fa39ad70c2f8e05f14f8b185261b9f63699a01ac7eae664167f2e5cf87377434bf6aadad7eaf2b13c955ac26f8332a02f8d6a46b3c91990a9fbc - languageName: node - linkType: hard - -"@rollup/plugin-node-resolve@npm:^11.2.1": - version: 11.2.1 - resolution: "@rollup/plugin-node-resolve@npm:11.2.1" - dependencies: - "@rollup/pluginutils": "npm:^3.1.0" - "@types/resolve": "npm:1.17.1" - builtin-modules: "npm:^3.1.0" - deepmerge: "npm:^4.2.2" - is-module: "npm:^1.0.0" - resolve: "npm:^1.19.0" - peerDependencies: - rollup: ^1.20.0||^2.0.0 - checksum: 10/8007f6a01d709da1078df19bb5ecb1339f43042786a68d98645e0a4c1765064d1500a1b86b65e12de6ae35d9b1ae693e22e63b3ebb69a627ce81172ea21cc228 - languageName: node - linkType: hard - -"@rollup/plugin-replace@npm:^2.4.1": - version: 2.4.2 - resolution: "@rollup/plugin-replace@npm:2.4.2" - dependencies: - "@rollup/pluginutils": "npm:^3.1.0" - magic-string: "npm:^0.25.7" - peerDependencies: - rollup: ^1.20.0 || ^2.0.0 - checksum: 10/fc4844c4cd7286013d4ccb51a7a2c86135024e3940797af1af1f24357622c8e874d9a17acfa4be9d2546542a87b68e158cc8d2c1f2a7926d17b9433eea00f6bf - languageName: node - linkType: hard - -"@rollup/pluginutils@npm:^3.1.0": - version: 3.1.0 - resolution: "@rollup/pluginutils@npm:3.1.0" - dependencies: - "@types/estree": "npm:0.0.39" - estree-walker: "npm:^1.0.1" - picomatch: "npm:^2.2.2" - peerDependencies: - rollup: ^1.20.0||^2.0.0 - checksum: 10/3b69f02893eea42455fb97b81f612ac6bfadf94ac73bebd481ea13e90a693eef52c163210a095b12e574a25603af5e55f86a020889019167f331aa8dd3ff30e0 - languageName: node - linkType: hard - -"@rollup/rollup-android-arm-eabi@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.18.1" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@rollup/rollup-android-arm64@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-android-arm64@npm:4.18.1" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-darwin-arm64@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-darwin-arm64@npm:4.18.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-darwin-x64@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-darwin-x64@npm:4.18.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-gnueabihf@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.18.1" - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-musleabihf@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.18.1" - conditions: os=linux & cpu=arm & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm64-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.18.1" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm64-musl@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.18.1" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.1" - conditions: os=linux & cpu=ppc64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-riscv64-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.18.1" - conditions: os=linux & cpu=riscv64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-s390x-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.18.1" - conditions: os=linux & cpu=s390x & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.18.1" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-musl@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.18.1" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-win32-arm64-msvc@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.18.1" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-win32-ia32-msvc@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.18.1" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@rollup/rollup-win32-x64-msvc@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.18.1" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@rushstack/eslint-patch@npm:^1.1.0": - version: 1.3.3 - resolution: "@rushstack/eslint-patch@npm:1.3.3" - checksum: 10/411c93510a00f0a52ba88f03810ca72ff09809102aeac5fd74dfd3c99afde06158ac94e24f5262bf437cdd7ac6b0dd03335b1e96ce795fe079f968f6c81d09a1 - languageName: node - linkType: hard - -"@scale-codec/core@npm:^1.1.1": - version: 1.1.1 - resolution: "@scale-codec/core@npm:1.1.1" - dependencies: - "@scale-codec/enum": "npm:^1.1.1" - "@scale-codec/util": "npm:^1.1.1" - checksum: 10/bda28f921d9a15a2e656bd896c17d6394e0ea3a649c1b3ce41effd30c54f1d351ff1d99286e5e204ccbc8911eb95e65b0493423aebd5c64b74e1ab8ee6ca2bad - languageName: node - linkType: hard - -"@scale-codec/definition-runtime@npm:^2.2.2": - version: 2.2.2 - resolution: "@scale-codec/definition-runtime@npm:2.2.2" - dependencies: - "@scale-codec/core": "npm:^1.1.1" - "@scale-codec/util": "npm:^1.1.1" - fmt-subs: "npm:^1.1.1" - type-fest: "npm:^2.13.0" - checksum: 10/ffae122a183863bda1ee3ad13df2c189c120da1da015008b7d965cdf324224d911ae05f33c71a68efc8870009dda11dbaff8154f68dd3b07ab60622ba6e4f5a4 - languageName: node - linkType: hard - -"@scale-codec/enum@npm:^1.1.1": - version: 1.1.1 - resolution: "@scale-codec/enum@npm:1.1.1" - checksum: 10/a92a7c384d6cbc38927bb4a7c1dfdb8d86a66e4223afec04d7ac0d9edccf3e043f8ff536be138700e19ed585259bd34e534a78ebf66abbd917cd37c3d629e032 - languageName: node - linkType: hard - -"@scale-codec/util@npm:^1.1.1": - version: 1.1.1 - resolution: "@scale-codec/util@npm:1.1.1" - checksum: 10/ea5de2dea649880843a787d5b40da5903f798ed42149599d913019ffd5a2240dfec2928101a95dd019e954134989f37bd3681f70d34d7424de2538614ae598b0 - languageName: node - linkType: hard - -"@schematics/angular@npm:16.2.1, @schematics/angular@npm:^16.0.0": - version: 16.2.1 - resolution: "@schematics/angular@npm:16.2.1" - dependencies: - "@angular-devkit/core": "npm:16.2.1" - "@angular-devkit/schematics": "npm:16.2.1" - jsonc-parser: "npm:3.2.0" - checksum: 10/9ea5e4179b72ff68d639ad67b74f4a73eb0e97d539e9913d8793c20c2e2fe1aec7576afcf865491fb05ccdfb2463c1d59fdd1ef669d83ba15cba32c8965e2ba8 - languageName: node - linkType: hard - -"@schematics/angular@npm:17.3.8": - version: 17.3.8 - resolution: "@schematics/angular@npm:17.3.8" - dependencies: - "@angular-devkit/core": "npm:17.3.8" - "@angular-devkit/schematics": "npm:17.3.8" - jsonc-parser: "npm:3.2.1" - checksum: 10/24ccb7a48482bc469db8cbbf6fa88a63f626d86274e4e1796fd8382dd00a71ee3209a2bcd654e5495f5f619d88bf89b52cdb5b756ec0e077d5f513f2cfb34be9 - languageName: node - linkType: hard - -"@scure/base@npm:^1.1.5": - version: 1.1.5 - resolution: "@scure/base@npm:1.1.5" - checksum: 10/543fa9991c6378b6a0d5ab7f1e27b30bb9c1e860d3ac81119b4213cfdf0ad7b61be004e06506e89de7ce0cec9391c17f5c082bb34c3b617a2ee6a04129f52481 - languageName: node - linkType: hard - -"@scure/base@npm:~1.1.0": - version: 1.1.1 - resolution: "@scure/base@npm:1.1.1" - checksum: 10/9aaa525ac25215cbe1bde00733a2fd25e99f03793aa1fd2961c567bb62b60c8a3a485a7cb5d748c41604fca79d149de19b05e64449b770c0a04b9ae38d0b5b2b - languageName: node - linkType: hard - -"@scure/bip32@npm:1.1.5": - version: 1.1.5 - resolution: "@scure/bip32@npm:1.1.5" - dependencies: - "@noble/hashes": "npm:~1.2.0" - "@noble/secp256k1": "npm:~1.7.0" - "@scure/base": "npm:~1.1.0" - checksum: 10/4c83e943a66e7b212d18f47b4650ed9b1dfeb69d8bdd8b491b12ba70ca8635cda67fb1ac920d642d66c8a3c2c03303b623c1faceafe7141a6f20a7cd7f66191e - languageName: node - linkType: hard - -"@scure/bip32@npm:1.3.1": - version: 1.3.1 - resolution: "@scure/bip32@npm:1.3.1" - dependencies: - "@noble/curves": "npm:~1.1.0" - "@noble/hashes": "npm:~1.3.1" - "@scure/base": "npm:~1.1.0" - checksum: 10/0595955374dfa54a60adfa33d4793fd8b27230e962aaceb5bb5fcf8ccbb935184aa2c45154ec9bdfb26a1877b2ae0a8e4808c9a5464d4ffd971120740b816def - languageName: node - linkType: hard - -"@scure/bip39@npm:1.1.1": - version: 1.1.1 - resolution: "@scure/bip39@npm:1.1.1" - dependencies: - "@noble/hashes": "npm:~1.2.0" - "@scure/base": "npm:~1.1.0" - checksum: 10/08908145e0890e481e3398191424961d9ebfb8913fed6e6cdfc63eb1281bd1895244d46c0e8762b0e30d8dc6f498ed296311382fecbf034253838e3a50f60ca1 - languageName: node - linkType: hard - -"@scure/bip39@npm:1.2.1": - version: 1.2.1 - resolution: "@scure/bip39@npm:1.2.1" - dependencies: - "@noble/hashes": "npm:~1.3.0" - "@scure/base": "npm:~1.1.0" - checksum: 10/2ea368bbed34d6b1701c20683bf465e147f231a9e37e639b8c82f585d6f978bb0f3855fca7ceff04954ae248b3e313f5d322d0210614fb7acb402739415aaf31 - languageName: node - linkType: hard - -"@sec-ant/readable-stream@npm:^0.4.1": - version: 0.4.1 - resolution: "@sec-ant/readable-stream@npm:0.4.1" - checksum: 10/aac89581652ac85debe7c5303451c2ebf8bf25ca25db680e4b9b73168f6940616d9a4bbe3348981827b1159b14e2f2e6af4b7bd5735cac898c12d5c51909c102 - languageName: node - linkType: hard - -"@sentry/core@npm:5.30.0": - version: 5.30.0 - resolution: "@sentry/core@npm:5.30.0" - dependencies: - "@sentry/hub": "npm:5.30.0" - "@sentry/minimal": "npm:5.30.0" - "@sentry/types": "npm:5.30.0" - "@sentry/utils": "npm:5.30.0" - tslib: "npm:^1.9.3" - checksum: 10/fef7808017cc9581e94c51fbce3ffeb6bdb62b30d94920fae143d298aed194176ac7c026923d569a33606b93a3747b877e78215a1668ed8eb44e5941527e17e0 - languageName: node - linkType: hard - -"@sentry/hub@npm:5.30.0": - version: 5.30.0 - resolution: "@sentry/hub@npm:5.30.0" - dependencies: - "@sentry/types": "npm:5.30.0" - "@sentry/utils": "npm:5.30.0" - tslib: "npm:^1.9.3" - checksum: 10/b0e21a7acb1c363a3097c7578dd483b2e534bc62541977da7d3c643703767bbcfd65831b70b102fefa715e6b75004ca1dab680d117e1a7455e839042118c1051 - languageName: node - linkType: hard - -"@sentry/minimal@npm:5.30.0": - version: 5.30.0 - resolution: "@sentry/minimal@npm:5.30.0" - dependencies: - "@sentry/hub": "npm:5.30.0" - "@sentry/types": "npm:5.30.0" - tslib: "npm:^1.9.3" - checksum: 10/e74bf519f5e284decb81eea8fd7c75b02827bde36c8ccef5ad0b941043e62a6d6578d7f1ad9dba33e03d240593140990b1999215a35abb344e2b4f3e09b15c90 - languageName: node - linkType: hard - -"@sentry/node@npm:^5.18.1": - version: 5.30.0 - resolution: "@sentry/node@npm:5.30.0" - dependencies: - "@sentry/core": "npm:5.30.0" - "@sentry/hub": "npm:5.30.0" - "@sentry/tracing": "npm:5.30.0" - "@sentry/types": "npm:5.30.0" - "@sentry/utils": "npm:5.30.0" - cookie: "npm:^0.4.1" - https-proxy-agent: "npm:^5.0.0" - lru_map: "npm:^0.3.3" - tslib: "npm:^1.9.3" - checksum: 10/9fa37b3ce646954f68e4b7506d17c67f5779c69cd432801aaf6796f9ecea9632eb8729b77b71a31dcd5a9f57fb7759fd213222955a667d8ad557df6e997a00c4 - languageName: node - linkType: hard - -"@sentry/tracing@npm:5.30.0": - version: 5.30.0 - resolution: "@sentry/tracing@npm:5.30.0" - dependencies: - "@sentry/hub": "npm:5.30.0" - "@sentry/minimal": "npm:5.30.0" - "@sentry/types": "npm:5.30.0" - "@sentry/utils": "npm:5.30.0" - tslib: "npm:^1.9.3" - checksum: 10/7e74a29823b445adb104c323324348882987554d049e83e5d3439149d2677024350974161c28b1a55a2750509b030525f81056a48427be06183f3744220ba4b0 - languageName: node - linkType: hard - -"@sentry/types@npm:5.30.0": - version: 5.30.0 - resolution: "@sentry/types@npm:5.30.0" - checksum: 10/3ca60689871b298dbab16c1bb6fb4637f72d3c21820017bac9df1765fd560004862cc9e75fb438e5714048b3a9bc641c396cdbb3c3573ac62481d2ea83f1da6d - languageName: node - linkType: hard - -"@sentry/utils@npm:5.30.0": - version: 5.30.0 - resolution: "@sentry/utils@npm:5.30.0" - dependencies: - "@sentry/types": "npm:5.30.0" - tslib: "npm:^1.9.3" - checksum: 10/4aa8acf7d0d9688c927a620cbb9fd37d6d2738f701863af772be329baca2cede909dcae6c7b4b449474787245c09212909ee740b4cae143d21ddb1fed910cc3a - languageName: node - linkType: hard - -"@shikijs/core@npm:1.9.0": - version: 1.9.0 - resolution: "@shikijs/core@npm:1.9.0" - checksum: 10/ec07699742f0561ab4d2fb07715397183cbed23ca42e082b14e9e5f85eb7f8647897f69698d003d8c6a1b8682da0af77861b3a2f78d366eef7581bae4415142c - languageName: node - linkType: hard - -"@sideway/address@npm:^4.1.5": - version: 4.1.5 - resolution: "@sideway/address@npm:4.1.5" - dependencies: - "@hapi/hoek": "npm:^9.0.0" - checksum: 10/c4c73ac0339504f34e016d3a687118e7ddf197c1c968579572123b67b230be84caa705f0f634efdfdde7f2e07a6e0224b3c70665dc420d8bc95bf400cfc4c998 - languageName: node - linkType: hard - -"@sideway/formula@npm:^3.0.1": - version: 3.0.1 - resolution: "@sideway/formula@npm:3.0.1" - checksum: 10/8d3ee7f80df4e5204b2cbe92a2a711ca89684965a5c9eb3b316b7051212d3522e332a65a0bb2a07cc708fcd1d0b27fcb30f43ff0bcd5089d7006c7160a89eefe - languageName: node - linkType: hard - -"@sideway/pinpoint@npm:^2.0.0": - version: 2.0.0 - resolution: "@sideway/pinpoint@npm:2.0.0" - checksum: 10/1ed21800128b2b23280ba4c9db26c8ff6142b97a8683f17639fd7f2128aa09046461574800b30fb407afc5b663c2331795ccf3b654d4b38fa096e41a5c786bf8 - languageName: node - linkType: hard - -"@sigstore/bundle@npm:^1.1.0": - version: 1.1.0 - resolution: "@sigstore/bundle@npm:1.1.0" - dependencies: - "@sigstore/protobuf-specs": "npm:^0.2.0" - checksum: 10/79e6cc4cc1858bccbd852dee85d95c66c891b109ea415d5b7b00b6d73791c4f6064c40d09b5aa3f9ec6c19b3145c5cfeece02302f912c186ff0a769667bb9491 - languageName: node - linkType: hard - -"@sigstore/bundle@npm:^2.3.2": - version: 2.3.2 - resolution: "@sigstore/bundle@npm:2.3.2" - dependencies: - "@sigstore/protobuf-specs": "npm:^0.3.2" - checksum: 10/16c2dd624612171acf40c0daf6ca8f43332abfab3ea522e6fcff70df70207061f8a9faa43e10f8b5d0006ff1edebe5179101f4ba566ff6d271099158d3ae9503 - languageName: node - linkType: hard - -"@sigstore/core@npm:^1.0.0, @sigstore/core@npm:^1.1.0": - version: 1.1.0 - resolution: "@sigstore/core@npm:1.1.0" - checksum: 10/4149572091d61c246dd2ff636ff9a31441877db78cc3afe25fd0b28ece87f0094576f8b9077d1dc7c1c959ac4b000d407595becb6cd784c3664e9dd7cb6da36a - languageName: node - linkType: hard - -"@sigstore/protobuf-specs@npm:^0.2.0": - version: 0.2.1 - resolution: "@sigstore/protobuf-specs@npm:0.2.1" - checksum: 10/cb0b9d9b3ef44a9f1729d85616c5d7c2ebccde303836a5a345ec33a500c7bd5205ffcc31332e0a90831cccc581dafbdf5b868f050c84270c8df6a4a6f2ce0bcb - languageName: node - linkType: hard - -"@sigstore/protobuf-specs@npm:^0.3.2": - version: 0.3.2 - resolution: "@sigstore/protobuf-specs@npm:0.3.2" - checksum: 10/350a6eb834e0f5c50987935c329350ba9df5baedba7c3db6ab6bc55d8730d9e6ff2deb31e770e721b9fef53f1cf6b32f376e28ed72c6e090493bceb820acfb4a - languageName: node - linkType: hard - -"@sigstore/sign@npm:^1.0.0": - version: 1.0.0 - resolution: "@sigstore/sign@npm:1.0.0" - dependencies: - "@sigstore/bundle": "npm:^1.1.0" - "@sigstore/protobuf-specs": "npm:^0.2.0" - make-fetch-happen: "npm:^11.0.1" - checksum: 10/44f23fc5eef5b160c0c36c6b19863039bbf375834eeca1ce7f711c82eb5a022174a475f0c06594f17732473c6878f2512f37e65949b7d33af3b2e2773f1bd34f - languageName: node - linkType: hard - -"@sigstore/sign@npm:^2.3.2": - version: 2.3.2 - resolution: "@sigstore/sign@npm:2.3.2" - dependencies: - "@sigstore/bundle": "npm:^2.3.2" - "@sigstore/core": "npm:^1.0.0" - "@sigstore/protobuf-specs": "npm:^0.3.2" - make-fetch-happen: "npm:^13.0.1" - proc-log: "npm:^4.2.0" - promise-retry: "npm:^2.0.1" - checksum: 10/3b0198fb8f8c6fe1c7fd34e9be25484d4472cd93ec3709c68f4cf45a07a0a90ebceb2193e77dfe780bb0a3effa31152a7f9d01497010bde9d9ab4e85873e2843 - languageName: node - linkType: hard - -"@sigstore/tuf@npm:^1.0.3": - version: 1.0.3 - resolution: "@sigstore/tuf@npm:1.0.3" - dependencies: - "@sigstore/protobuf-specs": "npm:^0.2.0" - tuf-js: "npm:^1.1.7" - checksum: 10/5aa1cdea05fabb78232f802821f7e8ee9db3352719b325f2f703f940aac75fc2e71d89cfbd3623ef6b0429e125a5c6145c1fc8ede8d3d5af3affcb71c6453c7b - languageName: node - linkType: hard - -"@sigstore/tuf@npm:^2.3.4": - version: 2.3.4 - resolution: "@sigstore/tuf@npm:2.3.4" - dependencies: - "@sigstore/protobuf-specs": "npm:^0.3.2" - tuf-js: "npm:^2.2.1" - checksum: 10/4ef978a0b29e1bdf4a8ac48580ff68bc7a3f10db7b301d033f212cc42b1ee58bf555ac77f67b21b44e8315de38640f23f24c7022fe46f66c236e0c0293d23b00 - languageName: node - linkType: hard - -"@sigstore/verify@npm:^1.2.1": - version: 1.2.1 - resolution: "@sigstore/verify@npm:1.2.1" - dependencies: - "@sigstore/bundle": "npm:^2.3.2" - "@sigstore/core": "npm:^1.1.0" - "@sigstore/protobuf-specs": "npm:^0.3.2" - checksum: 10/68a1bb341e93a86f738b4e55be8812034df398bdae1746b5f8c7e49d35c6a223ff634fa70b55152de5db992e8356cfaeae5779d6d805ecf4dd18caf167de8b95 - languageName: node - linkType: hard - -"@sinclair/typebox@npm:^0.24.1": - version: 0.24.51 - resolution: "@sinclair/typebox@npm:0.24.51" - checksum: 10/7886847b9deda1d926934066fe69165a1d9bbe7b0f836543c25efb96173c17009ef7a98619f48b379294bf27958844da3428eb35e65f8d941ea43563ad6e961e - languageName: node - linkType: hard - -"@sinclair/typebox@npm:^0.25.16": - version: 0.25.24 - resolution: "@sinclair/typebox@npm:0.25.24" - checksum: 10/d415546153478befa3c8386a4723e3061ac065867c7e22fe0374d36091991676d231e5381e66daa0ed21639217c6c80e0d6224a9c89aaac269e58b82b2f4a2f4 - languageName: node - linkType: hard - -"@sinclair/typebox@npm:^0.27.8": - version: 0.27.8 - resolution: "@sinclair/typebox@npm:0.27.8" - checksum: 10/297f95ff77c82c54de8c9907f186076e715ff2621c5222ba50b8d40a170661c0c5242c763cba2a4791f0f91cb1d8ffa53ea1d7294570cf8cd4694c0e383e484d - languageName: node - linkType: hard - -"@sindresorhus/is@npm:^0.14.0": - version: 0.14.0 - resolution: "@sindresorhus/is@npm:0.14.0" - checksum: 10/789cd128f0b43e158e657c4505539c8997905fcb5c06d750b7df778cab2b6887bc1eb8878026a20d84524528786ef69fc3d12a964ae56a478a87bcfc7f8272f3 - languageName: node - linkType: hard - -"@sindresorhus/is@npm:^4.6.0": - version: 4.6.0 - resolution: "@sindresorhus/is@npm:4.6.0" - checksum: 10/e7f36ed72abfcd5e0355f7423a72918b9748bb1ef370a59f3e5ad8d40b728b85d63b272f65f63eec1faf417cda89dcb0aeebe94015647b6054659c1442fe5ce0 - languageName: node - linkType: hard - -"@sindresorhus/is@npm:^5.2.0": - version: 5.5.2 - resolution: "@sindresorhus/is@npm:5.5.2" - checksum: 10/d8f7abae42a38236ecfc3a1bdc26956ce7302b2992a002349f42e34c1b017a588d2eee70bf3444d7753d5c4055a9bc85b3d7a5965c34a16d5281972ce3094f83 - languageName: node - linkType: hard - -"@sindresorhus/merge-streams@npm:^2.1.0": - version: 2.3.0 - resolution: "@sindresorhus/merge-streams@npm:2.3.0" - checksum: 10/798bcb53cd1ace9df84fcdd1ba86afdc9e0cd84f5758d26ae9b1eefd8e8887e5fc30051132b9e74daf01bb41fa5a2faf1369361f83d76a3b3d7ee938058fd71c - languageName: node - linkType: hard - -"@sinonjs/commons@npm:^1, @sinonjs/commons@npm:^1.0.2, @sinonjs/commons@npm:^1.3.0": - version: 1.8.6 - resolution: "@sinonjs/commons@npm:1.8.6" - dependencies: - type-detect: "npm:4.0.8" - checksum: 10/51987338fd8b4d1e135822ad593dd23a3288764aa41d83c695124d512bc38b87eece859078008651ecc7f1df89a7e558a515dc6f02d21a93be4ba50b39a28914 - languageName: node - linkType: hard - -"@sinonjs/commons@npm:^1.7.0": - version: 1.8.3 - resolution: "@sinonjs/commons@npm:1.8.3" - dependencies: - type-detect: "npm:4.0.8" - checksum: 10/910720ef0a5465474a593b4f48d39b67ca7f1a3962475e85d67ed8a13194e3c16b9bfe21081b51c66b631d649376fce0efd5a7c74066d3fe6fcda2729829af1f - languageName: node - linkType: hard - -"@sinonjs/commons@npm:^2.0.0": - version: 2.0.0 - resolution: "@sinonjs/commons@npm:2.0.0" - dependencies: - type-detect: "npm:4.0.8" - checksum: 10/bd6b44957077cd99067dcf401e80ed5ea03ba930cba2066edbbfe302d5fc973a108db25c0ae4930ee53852716929e4c94fa3b8a1510a51ac6869443a139d1e3d - languageName: node - linkType: hard - -"@sinonjs/fake-timers@npm:^10.0.2": - version: 10.0.2 - resolution: "@sinonjs/fake-timers@npm:10.0.2" - dependencies: - "@sinonjs/commons": "npm:^2.0.0" - checksum: 10/f7b47a290426d545894774c946c39877de6d6b3645e46d7d4dc99b9fc869c513791fb5be2496e877472fa630df0b61fc05b12a150bbdca606651a41ec3d5da2d - languageName: node - linkType: hard - -"@sinonjs/fake-timers@npm:^8.0.1": - version: 8.1.0 - resolution: "@sinonjs/fake-timers@npm:8.1.0" - dependencies: - "@sinonjs/commons": "npm:^1.7.0" - checksum: 10/da50ddd68411617fcf72d9fb70b621aa2a6d17faa93a2769c7af390c88b40e045f84544db022dd1ac30a6db115d2a0f96473854d4a106b0174351f22d42910ce - languageName: node - linkType: hard - -"@sinonjs/formatio@npm:^3.0.0, @sinonjs/formatio@npm:^3.2.1": - version: 3.2.2 - resolution: "@sinonjs/formatio@npm:3.2.2" - dependencies: - "@sinonjs/commons": "npm:^1" - "@sinonjs/samsam": "npm:^3.1.0" - checksum: 10/c83f630a30a2c8bc308e64594625720fea22ce4c8d4eada9f505e2231928fab8c1d5e981b1b05e71972a79be5f2f1f688a91d7771d3a95f72d85f77170f05ebe - languageName: node - linkType: hard - -"@sinonjs/samsam@npm:^2.1.2": - version: 2.1.3 - resolution: "@sinonjs/samsam@npm:2.1.3" - checksum: 10/b75937a3d9607b283d615874958bf2d5f3bf72b0a60f80d8c89b3a4404852910f17bc47fc55934b5efbb6a5b86d6065225372c8d0941770bdf2f307683bcbfdc - languageName: node - linkType: hard - -"@sinonjs/samsam@npm:^3.1.0": - version: 3.3.3 - resolution: "@sinonjs/samsam@npm:3.3.3" - dependencies: - "@sinonjs/commons": "npm:^1.3.0" - array-from: "npm:^2.1.1" - lodash: "npm:^4.17.15" - checksum: 10/2c54bbf6ea8adcd9b2687db0583c1e23e2a206ccaef81510c8143eaab5125e969e7519c66d6ffccb821329d40f4cf9b262692ede5fbe0e1157012cae99eb8df1 - languageName: node - linkType: hard - -"@sinonjs/text-encoding@npm:^0.7.1": - version: 0.7.2 - resolution: "@sinonjs/text-encoding@npm:0.7.2" - checksum: 10/ec713fb44888c852d84ca54f6abf9c14d036c11a5d5bfab7825b8b9d2b22127dbe53412c68f4dbb0c05ea5ed61c64679bd2845c177d81462db41e0d3d7eca499 - languageName: node - linkType: hard - -"@socket.io/base64-arraybuffer@npm:~1.0.2": - version: 1.0.2 - resolution: "@socket.io/base64-arraybuffer@npm:1.0.2" - checksum: 10/fa3e58c7581643d0557969cd3bece20e198596df77968ff29ede6be329d488e65104bef900e68a67f39d8855abfa59baa2b08d96fb856504bd01cbdd8f52249c - languageName: node - linkType: hard - -"@socket.io/component-emitter@npm:~3.1.0": - version: 3.1.0 - resolution: "@socket.io/component-emitter@npm:3.1.0" - checksum: 10/db069d95425b419de1514dffe945cc439795f6a8ef5b9465715acf5b8b50798e2c91b8719cbf5434b3fe7de179d6cdcd503c277b7871cb3dd03febb69bdd50fa - languageName: node - linkType: hard - -"@sovpro/delimited-stream@npm:^1.1.0": - version: 1.1.0 - resolution: "@sovpro/delimited-stream@npm:1.1.0" - checksum: 10/e78fc97a8509c07b55483df2253137de07b10f14db15d230526a6dd95c86e99d8f54c7af8697806bd16522eec2c50e44e5b4e0294bed80da833a2185f17f3ab6 - languageName: node - linkType: hard - -"@stablelib/binary@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/binary@npm:1.0.1" - dependencies: - "@stablelib/int": "npm:^1.0.1" - checksum: 10/c5ed769e2b5d607a5cdb72d325fcf98db437627862fade839daad934bd9ccf02a6f6e34f9de8cb3b18d72fce2ba6cc019a5d22398187d7d69d2607165f27f8bf - languageName: node - linkType: hard - -"@stablelib/ed25519@npm:^1.0.2, @stablelib/ed25519@npm:^1.0.3": - version: 1.0.3 - resolution: "@stablelib/ed25519@npm:1.0.3" - dependencies: - "@stablelib/random": "npm:^1.0.2" - "@stablelib/sha512": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10/52e861e4fbd9d3d0a1a370d9ad96de8e2e15f133249bbbc32da66b8993e843db598054a3af17a746beb3fd5043b7529613a5dda7f2e79de6613eb3ebe5ffe3dd - languageName: node - linkType: hard - -"@stablelib/hash@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/hash@npm:1.0.1" - checksum: 10/3ff1f12d1a4082aaf4b6cdf40c2010aabe5c4209d3b40b97b5bbb0d9abc0ee94abdc545e57de0614afaea807ca0212ac870e247ec8f66cdce91ec39ce82948cf - languageName: node - linkType: hard - -"@stablelib/int@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/int@npm:1.0.1" - checksum: 10/65bfbf50a382eea70c68e05366bf379cfceff8fbc076f1c267ef2f2411d7aed64fd140c415cb6c29f19a3910d3b8b7805d4b32ad5721a5007a8e744a808c7ae3 - languageName: node - linkType: hard - -"@stablelib/random@npm:^1.0.1, @stablelib/random@npm:^1.0.2": - version: 1.0.2 - resolution: "@stablelib/random@npm:1.0.2" - dependencies: - "@stablelib/binary": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10/f5ace0a588dc4c21f01cb85837892d4c872e994ae77a58a8eb7dd61aa0b26fb1e9b46b0445e71af57d963ef7d9f5965c64258fc0d04df7b2947bc48f2d3560c5 - languageName: node - linkType: hard - -"@stablelib/sha256@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/sha256@npm:1.0.1" - dependencies: - "@stablelib/binary": "npm:^1.0.1" - "@stablelib/hash": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10/4d55f6c676e2cc0dd2a32be0cfa96837f3e15ae48dc50a340e56db2b201f1341a9ecabb429a3a44a5bf31adee0a8151467a8e7cc15346c561c914faad415d4d4 - languageName: node - linkType: hard - -"@stablelib/sha512@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/sha512@npm:1.0.1" - dependencies: - "@stablelib/binary": "npm:^1.0.1" - "@stablelib/hash": "npm:^1.0.1" - "@stablelib/wipe": "npm:^1.0.1" - checksum: 10/35d188cd62f20d27e1d61ea07984022e9a78815a023c8f7c747d92456a60823f0683138591e87158a47cd72e73cf24ecf97f8936aa6fba8b3bef6fcb138e723d - languageName: node - linkType: hard - -"@stablelib/wipe@npm:^1.0.1": - version: 1.0.1 - resolution: "@stablelib/wipe@npm:1.0.1" - checksum: 10/287802eb146810a46ba72af70b82022caf83a8aeebde23605f5ee0decf64fe2b97a60c856e43b6617b5801287c30cfa863cfb0469e7fcde6f02d143cf0c6cbf4 - languageName: node - linkType: hard - -"@stellar/freighter-api@npm:^1.7.1": - version: 1.7.1 - resolution: "@stellar/freighter-api@npm:1.7.1" - checksum: 10/5cec07fd3b5fe7565db3ebd1698182b605f9060da782d6e081a9d8cf8325c43222599d417730fa21474a3acca1f4ac8e68eb93122e1055ec11a7d6458c5223e6 - languageName: node - linkType: hard - -"@stellar/js-xdr@npm:^3.1.1": - version: 3.1.1 - resolution: "@stellar/js-xdr@npm:3.1.1" - checksum: 10/3bc8ee3f1611b55938ef0249b7a90b3d689177d45b4c8c24c5562b8fe32372148f7544a0aab67776f4c7b95aef8cb0f97606b86ec800bb087302ff404cb8ccbc - languageName: node - linkType: hard - -"@stellar/stellar-base@npm:^11.0.1": - version: 11.0.1 - resolution: "@stellar/stellar-base@npm:11.0.1" - dependencies: - "@stellar/js-xdr": "npm:^3.1.1" - base32.js: "npm:^0.1.0" - bignumber.js: "npm:^9.1.2" - buffer: "npm:^6.0.3" - sha.js: "npm:^2.3.6" - sodium-native: "npm:^4.0.10" - tweetnacl: "npm:^1.0.3" - dependenciesMeta: - sodium-native: - optional: true - checksum: 10/03ad775791793548563f4dfecc62843d84f0fcf41ccc7f3bb30090dd0506061fb38ca505fbb4ebd8b97d48a06c026733fa7b1146dd04216f3363843f8d09f0f3 - languageName: node - linkType: hard - -"@stellar/stellar-sdk@npm:^11.2.2": - version: 11.3.0 - resolution: "@stellar/stellar-sdk@npm:11.3.0" - dependencies: - "@stellar/stellar-base": "npm:^11.0.1" - axios: "npm:^1.6.8" - bignumber.js: "npm:^9.1.2" - eventsource: "npm:^2.0.2" - randombytes: "npm:^2.1.0" - toml: "npm:^3.0.0" - urijs: "npm:^1.19.1" - checksum: 10/a4f35793aa6f43fb4384fddb9c4870751952228d2196f3bc9fbe6f7cdb796d960af1bce02aac957bb52e594c010a85326c909c0f8390bf738d98ccc23fc015db - languageName: node - linkType: hard - -"@stencil/core@npm:^2.18.0": - version: 2.22.3 - resolution: "@stencil/core@npm:2.22.3" - bin: - stencil: bin/stencil - checksum: 10/c758a09d70affbc3bccfa37ed84893760fdfbe211ab0c20d5ee45222f8ab412a49b7db1e44acc6cef43caaf33136ded1565d155cf0e87c89da8da0d83dc71bbe - languageName: node - linkType: hard - -"@stencil/core@npm:^4.0.3, @stencil/core@npm:^4.19.2": - version: 4.19.2 - resolution: "@stencil/core@npm:4.19.2" - bin: - stencil: bin/stencil - checksum: 10/9e188af9988e9068368e8e512f3146833b1241f2aee562d2aecb4654cec6bacd5b76c80ea8e4c47322d9586186211cefaf93fd4525a729103fa95bd2e4cbb602 - languageName: node - linkType: hard - -"@stencil/core@npm:^4.1.0": - version: 4.2.0 - resolution: "@stencil/core@npm:4.2.0" - bin: - stencil: bin/stencil - checksum: 10/5d85d492371a5c526d5a44e6bb019b3de400c88be360ef39b087d859de8639e7f1759ad5e2ce090f20684f0f000abd4405a5d25e5370716a9f7af1116ca2b8ff - languageName: node - linkType: hard - -"@substrate/connect-extension-protocol@npm:^1.0.1": - version: 1.0.1 - resolution: "@substrate/connect-extension-protocol@npm:1.0.1" - checksum: 10/476e253f997ac3b00ada12becea390ef6566d2bb2b62a2d8ebe15d554faf5552d4c4a1a8be7324c1d95f673232638a19f5dd3fe7599a6287df4784f97d6dee47 - languageName: node - linkType: hard - -"@substrate/connect@npm:0.7.26": - version: 0.7.26 - resolution: "@substrate/connect@npm:0.7.26" - dependencies: - "@substrate/connect-extension-protocol": "npm:^1.0.1" - eventemitter3: "npm:^4.0.7" - smoldot: "npm:1.0.4" - checksum: 10/502874dd695735d857850b09654c0a34a9e00d15f01b69c00275f6d09b47fbab3afcd78c2b031419f8fe3d3a21ce672bba5c19e3f33a75b1cf22b1e4740e6359 - languageName: node - linkType: hard - -"@substrate/ss58-registry@npm:^1.44.0": - version: 1.46.0 - resolution: "@substrate/ss58-registry@npm:1.46.0" - checksum: 10/464d1f0b3bb382f8ae1f5037ac66c53534a44c95edffa19183ae40012f1c5e5532d9f9ce307b6ac84d0775ae16493353a27d2db31d61133a1677ed904c37f30e - languageName: node - linkType: hard - -"@supabase/functions-js@npm:^1.3.4": - version: 1.3.4 - resolution: "@supabase/functions-js@npm:1.3.4" - dependencies: - cross-fetch: "npm:^3.1.5" - checksum: 10/e4b9a00e8ad4bae94c7e9c1f8ff72f8d5ac13786b55064d0de0c0fd761764f57325f96ade69f43b127e4c5758151dac88984567d2d9c488852d937b11ab3b94a - languageName: node - linkType: hard - -"@supabase/gotrue-js@npm:^1.22.21": - version: 1.24.0 - resolution: "@supabase/gotrue-js@npm:1.24.0" - dependencies: - cross-fetch: "npm:^3.0.6" - checksum: 10/8d947d2a7a4923316a0edade57fb76aa36d90cbfc6f00d18453ec10c3f99e77b5c8b440bc283af0acd12cb04c736190d8d9ad13adf44dff04b1a332157e8ec2c - languageName: node - linkType: hard - -"@supabase/postgrest-js@npm:^0.37.4": - version: 0.37.4 - resolution: "@supabase/postgrest-js@npm:0.37.4" - dependencies: - cross-fetch: "npm:^3.1.5" - checksum: 10/0a40ce484909fa5720c4e8bfa3affd7761abe4da04e9b9ab52757ce64ff3d20c6b1c0b4bfcb7fe70f56f00f131daae213b7b29a6958d54a136f3fee6bdc17a61 - languageName: node - linkType: hard - -"@supabase/realtime-js@npm:^1.7.4": - version: 1.7.5 - resolution: "@supabase/realtime-js@npm:1.7.5" - dependencies: - "@types/phoenix": "npm:^1.5.4" - websocket: "npm:^1.0.34" - checksum: 10/e5e67a35005875553f62d83d55fd548a3dfefbf19cc3505aedc00a32564f8db13f01734ac476a7d83660acab701caf8d8f54e04101479ea634aaa2712a629ba3 - languageName: node - linkType: hard - -"@supabase/storage-js@npm:^1.7.2": - version: 1.7.3 - resolution: "@supabase/storage-js@npm:1.7.3" - dependencies: - cross-fetch: "npm:^3.1.0" - checksum: 10/c5202cb1685b6e53ad3b8833710ff334aa6967441de4b7dd568ef69cbea4f0622b8a7620da045a5003c67d873c198905b28e09b0c1dd1bbd87f350e25a1849d4 - languageName: node - linkType: hard - -"@supabase/supabase-js@npm:1.35.6": - version: 1.35.6 - resolution: "@supabase/supabase-js@npm:1.35.6" - dependencies: - "@supabase/functions-js": "npm:^1.3.4" - "@supabase/gotrue-js": "npm:^1.22.21" - "@supabase/postgrest-js": "npm:^0.37.4" - "@supabase/realtime-js": "npm:^1.7.4" - "@supabase/storage-js": "npm:^1.7.2" - checksum: 10/415a77fb987ca06ce6e80adf58a6173fe0609fbb3ab0bdff305eb515c8051ab217cee832839bdf97ce04b24eca79a6a30c843f71da95b4ea8373ce5533c59b06 - languageName: node - linkType: hard - -"@surma/rollup-plugin-off-main-thread@npm:^2.2.3": - version: 2.2.3 - resolution: "@surma/rollup-plugin-off-main-thread@npm:2.2.3" - dependencies: - ejs: "npm:^3.1.6" - json5: "npm:^2.2.0" - magic-string: "npm:^0.25.0" - string.prototype.matchall: "npm:^4.0.6" - checksum: 10/0c7dc1c1fc396454513dec9ef34e743ffc8662adc20eeaf392a9cca4bd8a4a33af239c057022b6272c3fc438550e3c7099cdea5f50eb61c5058308989c7c48d6 - languageName: node - linkType: hard - -"@svgr/babel-plugin-add-jsx-attribute@npm:^5.4.0": - version: 5.4.0 - resolution: "@svgr/babel-plugin-add-jsx-attribute@npm:5.4.0" - checksum: 10/1c538cf312b486598c6aea17f9b72d7fc308eb5dd32effd804630206a185493b8a828ff980ceb29d57d8319c085614c7cea967be709c71ae77702a4c30037011 - languageName: node - linkType: hard - -"@svgr/babel-plugin-remove-jsx-attribute@npm:^5.4.0": - version: 5.4.0 - resolution: "@svgr/babel-plugin-remove-jsx-attribute@npm:5.4.0" - checksum: 10/ad2231bfcb14daa944201df66236c222cde05a07c4cffaecab1d36d33f606b6caf17bda21844fc435780c1a27195e49beb8397536fe5e7545dfffcfbbcecb7f8 - languageName: node - linkType: hard - -"@svgr/babel-plugin-remove-jsx-empty-expression@npm:^5.0.1": - version: 5.0.1 - resolution: "@svgr/babel-plugin-remove-jsx-empty-expression@npm:5.0.1" - checksum: 10/175c8f13ddcb0744f7c3910ebed3799cfb961a75bff130e1ed2071c87ca8b8df8964825c988e511b2e3c5dbf48ad3d4fbbb6989edc53294253df40cf2a24375e - languageName: node - linkType: hard - -"@svgr/babel-plugin-replace-jsx-attribute-value@npm:^5.0.1": - version: 5.0.1 - resolution: "@svgr/babel-plugin-replace-jsx-attribute-value@npm:5.0.1" - checksum: 10/68f4e2a5b95eca44e22fce485dc2ddd10adabe2b38f6db3ef9071b35e84bf379685f7acab6c05b7a82f722328c02f6424f8252c6dd5c2c4ed2f00104072b1dfe - languageName: node - linkType: hard - -"@svgr/babel-plugin-svg-dynamic-title@npm:^5.4.0": - version: 5.4.0 - resolution: "@svgr/babel-plugin-svg-dynamic-title@npm:5.4.0" - checksum: 10/c46feb52454acea32031d1d881a81334f2e5f838ed25a2d9014acb5e9541d404405911e86dbee8bee9f1e43c9e07118123a07dc297962dbed0c4c5a86bdc4be9 - languageName: node - linkType: hard - -"@svgr/babel-plugin-svg-em-dimensions@npm:^5.4.0": - version: 5.4.0 - resolution: "@svgr/babel-plugin-svg-em-dimensions@npm:5.4.0" - checksum: 10/0d19b26147bbba932bd973258dab4a80a7ea6b9d674713186f0e10fa21a9e3aa4327326b2bf1892e8051712bce0ea30561eb187ca27bb241d33c350cea51ac88 - languageName: node - linkType: hard - -"@svgr/babel-plugin-transform-react-native-svg@npm:^5.4.0": - version: 5.4.0 - resolution: "@svgr/babel-plugin-transform-react-native-svg@npm:5.4.0" - checksum: 10/8ac5dc9fb2dee24addc74dbcb169860c95a69247606f986eabb0618fb300dd08e8f220891b758e62c051428ba04d8dd50f2c2bf877e15fa190e6d384d1ccd2ad - languageName: node - linkType: hard - -"@svgr/babel-plugin-transform-svg-component@npm:^5.5.0": - version: 5.5.0 - resolution: "@svgr/babel-plugin-transform-svg-component@npm:5.5.0" - checksum: 10/fcd5502c69303550eae36cdd659629799159d3598e57b06432a08aa7112ff5b6d6a3a0f8d3ce90c44754b8d333c2f5515724ad580cd8bdb6885295142039b0eb - languageName: node - linkType: hard - -"@svgr/babel-preset@npm:^5.5.0": - version: 5.5.0 - resolution: "@svgr/babel-preset@npm:5.5.0" - dependencies: - "@svgr/babel-plugin-add-jsx-attribute": "npm:^5.4.0" - "@svgr/babel-plugin-remove-jsx-attribute": "npm:^5.4.0" - "@svgr/babel-plugin-remove-jsx-empty-expression": "npm:^5.0.1" - "@svgr/babel-plugin-replace-jsx-attribute-value": "npm:^5.0.1" - "@svgr/babel-plugin-svg-dynamic-title": "npm:^5.4.0" - "@svgr/babel-plugin-svg-em-dimensions": "npm:^5.4.0" - "@svgr/babel-plugin-transform-react-native-svg": "npm:^5.4.0" - "@svgr/babel-plugin-transform-svg-component": "npm:^5.5.0" - checksum: 10/90185ff3761b942e806eb127e2802e9b161f8c471de510c0d989aa9c1669f1328c258a1bf1924c8977faddd534107c36e8f49e416088b30c721f9919aea12255 - languageName: node - linkType: hard - -"@svgr/core@npm:^5.5.0": - version: 5.5.0 - resolution: "@svgr/core@npm:5.5.0" - dependencies: - "@svgr/plugin-jsx": "npm:^5.5.0" - camelcase: "npm:^6.2.0" - cosmiconfig: "npm:^7.0.0" - checksum: 10/fc8621b8542052cdc38c031884d970ea25b325ae1ac4bebf72fba6351052ff13f490c029b6bb0d59f83d02ebbda9df938f94ca3bd442b731cf2c2f5e7adca561 - languageName: node - linkType: hard - -"@svgr/hast-util-to-babel-ast@npm:^5.5.0": - version: 5.5.0 - resolution: "@svgr/hast-util-to-babel-ast@npm:5.5.0" - dependencies: - "@babel/types": "npm:^7.12.6" - checksum: 10/a46c77510d0e5b08cf910959fb2199155932bcbf2a3280b737e2be2f8f7526abb70ebd790fe61be97e652008bc6a8e90b2e55dd8d61aaaae9fc69d3c104b4836 - languageName: node - linkType: hard - -"@svgr/plugin-jsx@npm:^5.5.0": - version: 5.5.0 - resolution: "@svgr/plugin-jsx@npm:5.5.0" - dependencies: - "@babel/core": "npm:^7.12.3" - "@svgr/babel-preset": "npm:^5.5.0" - "@svgr/hast-util-to-babel-ast": "npm:^5.5.0" - svg-parser: "npm:^2.0.2" - checksum: 10/e053f8dd6bfcd72377b432dd5b1db3c89d503d29839639a87f85b597a680d0b69e33a4db376f5a1074a89615f7157cd36f63f94bdb4083a0fd5bbe918c7fcb9b - languageName: node - linkType: hard - -"@svgr/plugin-svgo@npm:^5.5.0": - version: 5.5.0 - resolution: "@svgr/plugin-svgo@npm:5.5.0" - dependencies: - cosmiconfig: "npm:^7.0.0" - deepmerge: "npm:^4.2.2" - svgo: "npm:^1.2.2" - checksum: 10/7cc92eabcaffe117d6f9ac5ab80207dc43b17d4f42ab3f84da202f93a44081ed6adc0fe4e23c2629a8e6ef227649b1083234dfa0728726c471dd0b4eb68221ae - languageName: node - linkType: hard - -"@svgr/webpack@npm:^5.5.0": - version: 5.5.0 - resolution: "@svgr/webpack@npm:5.5.0" - dependencies: - "@babel/core": "npm:^7.12.3" - "@babel/plugin-transform-react-constant-elements": "npm:^7.12.1" - "@babel/preset-env": "npm:^7.12.1" - "@babel/preset-react": "npm:^7.12.5" - "@svgr/core": "npm:^5.5.0" - "@svgr/plugin-jsx": "npm:^5.5.0" - "@svgr/plugin-svgo": "npm:^5.5.0" - loader-utils: "npm:^2.0.0" - checksum: 10/91f0b4176d22e8414d200f785d6cf9793ce39062f44be1eb2426c2f4415ee75d57e0670ae1e549b4a9222f20f4f06157fd9b121fa74c107d2cb821920874e79e - languageName: node - linkType: hard - -"@szmarczak/http-timer@npm:^1.1.2": - version: 1.1.2 - resolution: "@szmarczak/http-timer@npm:1.1.2" - dependencies: - defer-to-connect: "npm:^1.0.1" - checksum: 10/9b63853bd53bff72c4990ebc9cd3f625bbab757247099af172564da6649a27a1d41b1a70cd849dd65b2a078300029c1c80bf3079e6a91e285da7b259eb147146 - languageName: node - linkType: hard - -"@szmarczak/http-timer@npm:^5.0.1": - version: 5.0.1 - resolution: "@szmarczak/http-timer@npm:5.0.1" - dependencies: - defer-to-connect: "npm:^2.0.1" - checksum: 10/fc9cb993e808806692e4a3337c90ece0ec00c89f4b67e3652a356b89730da98bc824273a6d67ca84d5f33cd85f317dcd5ce39d8cc0a2f060145a608a7cb8ce92 - languageName: node - linkType: hard - -"@tanstack/eslint-plugin-query@npm:5.28.11": - version: 5.28.11 - resolution: "@tanstack/eslint-plugin-query@npm:5.28.11" - dependencies: - "@typescript-eslint/utils": "npm:^6.20.0" - peerDependencies: - eslint: ^8.0.0 - checksum: 10/f5fb6fa4dea4917ec173e86cc7fe733abe9ea7942283af34292f90724321a7fad57f4d918326a49fbf4c301c0f4fe749090f673766679e8d57dbaed0c1a53cc4 - languageName: node - linkType: hard - -"@tanstack/query-core@npm:5.29.0": - version: 5.29.0 - resolution: "@tanstack/query-core@npm:5.29.0" - checksum: 10/a58f1f899292daea66bf8341a4e6b8f96064c0a45bbcb350d68b004b871c6d2894dcecb268389695b093167b0a0acb6bcf5d01f52a335ffb128348b6705450b1 - languageName: node - linkType: hard - -"@tanstack/query-devtools@npm:5.28.10": - version: 5.28.10 - resolution: "@tanstack/query-devtools@npm:5.28.10" - checksum: 10/3caa49e83507abc1fb5d44283738d6c5d88fd4b7d6f6ec2c26aa77d938157679fc99da51e1f832295e76940d9d90f793549ae927d11bfba67fcc2dfeaf0d5a43 - languageName: node - linkType: hard - -"@tanstack/react-query-devtools@npm:5.29.2": - version: 5.29.2 - resolution: "@tanstack/react-query-devtools@npm:5.29.2" - dependencies: - "@tanstack/query-devtools": "npm:5.28.10" - peerDependencies: - "@tanstack/react-query": ^5.29.2 - react: ^18.0.0 - checksum: 10/83226e7c5eefa1faddcf1f1ddcf65137f3926468d0e029bbd4bae124606e00ff11641cd9624f3bc2b07159ea6333752c2382359bfab107b98d83ceb1f56bdc30 - languageName: node - linkType: hard - -"@tanstack/react-query@npm:5.29.2": - version: 5.29.2 - resolution: "@tanstack/react-query@npm:5.29.2" - dependencies: - "@tanstack/query-core": "npm:5.29.0" - peerDependencies: - react: ^18.0.0 - checksum: 10/fff25a36d764b0bec7d4ec3f499a74881abf043e81a8f97c71ffffd52fb6b1cfd60f0199ac4150902beccc95e80b7c32ec3a56ae2ee07bdd388e14bb4546123b - languageName: node - linkType: hard - -"@testing-library/dom@npm:^8.5.0": - version: 8.20.1 - resolution: "@testing-library/dom@npm:8.20.1" - dependencies: - "@babel/code-frame": "npm:^7.10.4" - "@babel/runtime": "npm:^7.12.5" - "@types/aria-query": "npm:^5.0.1" - aria-query: "npm:5.1.3" - chalk: "npm:^4.1.0" - dom-accessibility-api: "npm:^0.5.9" - lz-string: "npm:^1.5.0" - pretty-format: "npm:^27.0.2" - checksum: 10/6c7a92fcc89931ef62a9a92dacec09b3e5ee5c3aba2171aa8de6c7504927b7c9364d73d2ed87b72447d6783108c1c92c207d16f788de64c69bc97059d7105e3c - languageName: node - linkType: hard - -"@testing-library/jest-dom@npm:^5.17.0": - version: 5.17.0 - resolution: "@testing-library/jest-dom@npm:5.17.0" - dependencies: - "@adobe/css-tools": "npm:^4.0.1" - "@babel/runtime": "npm:^7.9.2" - "@types/testing-library__jest-dom": "npm:^5.9.1" - aria-query: "npm:^5.0.0" - chalk: "npm:^3.0.0" - css.escape: "npm:^1.5.1" - dom-accessibility-api: "npm:^0.5.6" - lodash: "npm:^4.17.15" - redent: "npm:^3.0.0" - checksum: 10/5a75f2094f935d2da58ea1d2b3d0c9f58dc0bca2592f2ca8125176596b4adba88b742b7553ef228e2085eadcb498ce6cece3e78402e34e6af7b6bc26bf0a0baa - languageName: node - linkType: hard - -"@testing-library/react@npm:^13.4.0": - version: 13.4.0 - resolution: "@testing-library/react@npm:13.4.0" - dependencies: - "@babel/runtime": "npm:^7.12.5" - "@testing-library/dom": "npm:^8.5.0" - "@types/react-dom": "npm:^18.0.0" - peerDependencies: - react: ^18.0.0 - react-dom: ^18.0.0 - checksum: 10/788249aad25a0161b197b7d387011e2578701ab18451b69a987eb073b2d24eb1041f242581c3dd4800f5abcf4f11811f5f6b1e682a45f1840a08fdde3ce559b7 - languageName: node - linkType: hard - -"@testing-library/user-event@npm:^13.5.0": - version: 13.5.0 - resolution: "@testing-library/user-event@npm:13.5.0" - dependencies: - "@babel/runtime": "npm:^7.12.5" - peerDependencies: - "@testing-library/dom": ">=7.21.4" - checksum: 10/e2bdf2b2375d1399a4fd45195705ab0be05f5e3e8220ecbfc26cba98985e45cb505e4e11ed4d909a7052ce90d1e83751cfe21bb1b70fa82d2a2c268370432d8b - languageName: node - linkType: hard - -"@thream/socketio-jwt@npm:2.1.1": - version: 2.1.1 - resolution: "@thream/socketio-jwt@npm:2.1.1" - dependencies: - jsonwebtoken: "npm:8.5.1" - peerDependencies: - socket.io: ">=3.0.0" - checksum: 10/e04b27a193fe711752a5b25fc76420165446d08f0e4ed39192d9b74a8ba659bd2d1857af7a525dbbd56eb63667ba02057a664119fbad05288fd121bc5a62c843 - languageName: node - linkType: hard - -"@tootallnate/once@npm:1": - version: 1.1.2 - resolution: "@tootallnate/once@npm:1.1.2" - checksum: 10/e1fb1bbbc12089a0cb9433dc290f97bddd062deadb6178ce9bcb93bb7c1aecde5e60184bc7065aec42fe1663622a213493c48bbd4972d931aae48315f18e1be9 - languageName: node - linkType: hard - -"@tootallnate/once@npm:2": - version: 2.0.0 - resolution: "@tootallnate/once@npm:2.0.0" - checksum: 10/ad87447820dd3f24825d2d947ebc03072b20a42bfc96cbafec16bff8bbda6c1a81fcb0be56d5b21968560c5359a0af4038a68ba150c3e1694fe4c109a063bed8 - languageName: node - linkType: hard - -"@truffle/abi-utils@npm:^1.0.2": - version: 1.0.2 - resolution: "@truffle/abi-utils@npm:1.0.2" - dependencies: - change-case: "npm:3.0.2" - fast-check: "npm:3.1.1" - web3-utils: "npm:1.10.0" - checksum: 10/f992d7b495f9c1806e5eddae545b5acb51f4a1ce24c2b2ddd84382d258c226bceeeefb38c9af3dcdf5aa018f8c18795a632497a02b3a21d9975a4361d6e3208a - languageName: node - linkType: hard - -"@truffle/blockchain-utils@npm:^0.1.8": - version: 0.1.8 - resolution: "@truffle/blockchain-utils@npm:0.1.8" - checksum: 10/094070d27d68ab63f4fe1bdc61917089f6a5a8ba6e1f92330b0684c38410aea907a3781aaada26d0c283cef7b32812ae690e89a696c98ede0624d86f3d993b5e - languageName: node - linkType: hard - -"@truffle/code-utils@npm:^3.0.3": - version: 3.0.3 - resolution: "@truffle/code-utils@npm:3.0.3" - dependencies: - cbor: "npm:^5.2.0" - checksum: 10/6b255595568ab8e5bee8ab771f4bbd69df940d8b2c246b619874462520cbee30fab0f7ccb181be7cec2866c1fb240f42bd4aa160beb1a791ea499a0d12b9fde3 - languageName: node - linkType: hard - -"@truffle/codec@npm:^0.17.2": - version: 0.17.2 - resolution: "@truffle/codec@npm:0.17.2" - dependencies: - "@truffle/abi-utils": "npm:^1.0.2" - "@truffle/compile-common": "npm:^0.9.7" - big.js: "npm:^6.0.3" - bn.js: "npm:^5.1.3" - cbor: "npm:^5.2.0" - debug: "npm:^4.3.1" - lodash: "npm:^4.17.21" - semver: "npm:7.5.2" - utf8: "npm:^3.0.0" - web3-utils: "npm:1.10.0" - checksum: 10/9332dc23da32f97afbbf5289e0c3d9f2e706efb69cfdf7fa923aa3d938c133d34a174dc8e17a6c5abeaa715afc43f87045edffc943c6ffbbc5df5da90863a6a2 - languageName: node - linkType: hard - -"@truffle/compile-common@npm:^0.9.7": - version: 0.9.7 - resolution: "@truffle/compile-common@npm:0.9.7" - dependencies: - "@truffle/error": "npm:^0.2.1" - colors: "npm:1.4.0" - checksum: 10/9e9eed52403f1684d73b22eb871775d981a3029d10499e7241166ac34c656c7acf7bd13c946e1c2c8276dc30c2a787a4e975de3891ef3cd7ffc059d682d9a4c4 - languageName: node - linkType: hard - -"@truffle/config@npm:^1.3.59": - version: 1.3.59 - resolution: "@truffle/config@npm:1.3.59" - dependencies: - "@truffle/error": "npm:^0.2.1" - "@truffle/events": "npm:^0.1.24" - "@truffle/provider": "npm:^0.3.11" - conf: "npm:^10.1.2" - debug: "npm:^4.3.1" - find-up: "npm:^2.1.0" - lodash: "npm:^4.17.21" - original-require: "npm:^1.0.1" - checksum: 10/c365378ed339f80865ed318740f33e6091981087f340859d617038ca3eb78cc08672595100c9af9a8688962f4790f3c273b53b812e219188723c982f8df8886c - languageName: node - linkType: hard - -"@truffle/contract-schema@npm:^3.4.15": - version: 3.4.15 - resolution: "@truffle/contract-schema@npm:3.4.15" - dependencies: - ajv: "npm:^6.10.0" - debug: "npm:^4.3.1" - checksum: 10/2106f34097effd7ee38ca9007345e59231772c14a5bd657e6e0dcdcd6d53f426945bb56f478ddbeef1c6d99fabb278cde70e8e6d03d5b4290cd7921fdf18eefb - languageName: node - linkType: hard - -"@truffle/contract@npm:4.6.28": - version: 4.6.28 - resolution: "@truffle/contract@npm:4.6.28" - dependencies: - "@ensdomains/ensjs": "npm:^2.1.0" - "@truffle/blockchain-utils": "npm:^0.1.8" - "@truffle/contract-schema": "npm:^3.4.15" - "@truffle/debug-utils": "npm:^6.0.56" - "@truffle/error": "npm:^0.2.1" - "@truffle/interface-adapter": "npm:^0.5.35" - bignumber.js: "npm:^7.2.1" - debug: "npm:^4.3.1" - ethers: "npm:^4.0.32" - web3: "npm:1.10.0" - web3-core-helpers: "npm:1.10.0" - web3-core-promievent: "npm:1.10.0" - web3-eth-abi: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/4a2d2f3418748ccf167fc360383e8ed247f2e0a5147f18e73aef7376ba19a15a70aad1f5c82562fc88bf06571f0719dd1edab1a03e64454c7c93604d645948e1 - languageName: node - linkType: hard - -"@truffle/dashboard-message-bus-client@npm:^0.1.11": - version: 0.1.11 - resolution: "@truffle/dashboard-message-bus-client@npm:0.1.11" - dependencies: - "@truffle/dashboard-message-bus-common": "npm:^0.1.6" - "@truffle/promise-tracker": "npm:^0.1.6" - axios: "npm:1.2.4" - debug: "npm:^4.3.1" - delay: "npm:^5.0.0" - isomorphic-ws: "npm:^4.0.1" - node-abort-controller: "npm:^3.0.1" - tiny-typed-emitter: "npm:^2.1.0" - ws: "npm:^7.2.0" - checksum: 10/a7b58497459561c35c6d9fb8e6c9cbef3cd81266bc33147a07028107c6f541c6401d4b1404a515e88db7b85ac3de343b21788563aaf58273c4064f8ce7773fe1 - languageName: node - linkType: hard - -"@truffle/dashboard-message-bus-common@npm:^0.1.6": - version: 0.1.6 - resolution: "@truffle/dashboard-message-bus-common@npm:0.1.6" - checksum: 10/e985217d874754d1ede8bc16df797d3caac83287c7a1d6ce3a44e78740ed30c0718b807dd8c31ad002a2b413e24eeb320d53cd3faf23af6a136d7e2ab945bc5b - languageName: node - linkType: hard - -"@truffle/db-loader@npm:^0.2.33": - version: 0.2.33 - resolution: "@truffle/db-loader@npm:0.2.33" - dependencies: - "@truffle/db": "npm:^2.0.33" - dependenciesMeta: - "@truffle/db": - optional: true - checksum: 10/90863196d2cd5273c4b8f709049dda69dc4302496dcd576f678e8b924519202429414f8df7eb7c7a4a17ffdc936561d070a187ca8f0192e96bd6a41c09aa1380 - languageName: node - linkType: hard - -"@truffle/db@npm:^2.0.33": - version: 2.0.33 - resolution: "@truffle/db@npm:2.0.33" - dependencies: - "@graphql-tools/delegate": "npm:^8.4.3" - "@graphql-tools/schema": "npm:^8.3.1" - "@truffle/abi-utils": "npm:^1.0.2" - "@truffle/code-utils": "npm:^3.0.3" - "@truffle/config": "npm:^1.3.59" - abstract-leveldown: "npm:^7.2.0" - apollo-server: "npm:^3.11.0" - debug: "npm:^4.3.1" - fs-extra: "npm:^9.1.0" - graphql: "npm:^15.3.0" - graphql-tag: "npm:^2.12.6" - json-stable-stringify: "npm:^1.0.1" - pascal-case: "npm:^2.0.1" - pluralize: "npm:^8.0.0" - pouchdb: "npm:7.3.0" - pouchdb-adapter-memory: "npm:^7.1.1" - pouchdb-debug: "npm:^7.1.1" - pouchdb-find: "npm:^7.0.0" - web3-utils: "npm:1.10.0" - checksum: 10/9dfdedf657864a1cb7d5e9a053aa392eac006095369a2b9a8f16c3cb0b558b609e7b818b301b970f11d8c16b1e87291f8d5a4e3b55b8af59f1ddaf6e1927e8e1 - languageName: node - linkType: hard - -"@truffle/debug-utils@npm:^6.0.56": - version: 6.0.56 - resolution: "@truffle/debug-utils@npm:6.0.56" - dependencies: - "@truffle/codec": "npm:^0.17.2" - "@trufflesuite/chromafi": "npm:^3.0.0" - bn.js: "npm:^5.1.3" - chalk: "npm:^2.4.2" - debug: "npm:^4.3.1" - highlightjs-solidity: "npm:^2.0.6" - checksum: 10/84499d1b552acd32178e8292565567801a2f60f928e755e8bee66943776e7fc0ce6d97787ed2c50364cc2d9f240216447590eab87a7d5bb718d56b835498beec - languageName: node - linkType: hard - -"@truffle/debugger@npm:^12.1.2": - version: 12.1.2 - resolution: "@truffle/debugger@npm:12.1.2" - dependencies: - "@ensdomains/ensjs": "npm:^2.1.0" - "@truffle/abi-utils": "npm:^1.0.2" - "@truffle/codec": "npm:^0.17.2" - "@truffle/source-map-utils": "npm:^1.3.118" - bn.js: "npm:^5.1.3" - debug: "npm:^4.3.1" - json-pointer: "npm:^0.6.1" - json-stable-stringify: "npm:^1.0.1" - lodash: "npm:^4.17.21" - redux: "npm:^3.7.2" - redux-saga: "npm:1.0.0" - reselect-tree: "npm:^1.3.7" - semver: "npm:7.5.2" - web3: "npm:1.10.0" - web3-eth-abi: "npm:1.10.0" - checksum: 10/fac92369f2d2dee8d21d962c0066e71094e4f8b711c0779f64f30ec7f5c6a026eb9454e3f4c78a163a325479ff213fa61caa6ab4075eff7e3bd00cadc90b1909 - languageName: node - linkType: hard - -"@truffle/error@npm:^0.2.1": - version: 0.2.1 - resolution: "@truffle/error@npm:0.2.1" - checksum: 10/2a7967786fc30aac4b18522f64295511358e952759314c766e5722fc21b3561b0a9177d0346ebca83e9c8d454950aa48b4efe6dffef7b9219ba2d2f1b09de0e8 - languageName: node - linkType: hard - -"@truffle/events@npm:^0.1.24": - version: 0.1.24 - resolution: "@truffle/events@npm:0.1.24" - dependencies: - "@truffle/dashboard-message-bus-client": "npm:^0.1.11" - "@truffle/spinners": "npm:^0.2.4" - debug: "npm:^4.3.1" - emittery: "npm:^0.4.1" - web3-utils: "npm:1.10.0" - checksum: 10/8837840e239c6a0aac84316a0ca285e7414466eb0f9bbacc3d17247f3521fd794ec6cddf50c1b2a10b77a95a7732cfaa057e53ed4e21fbb4786a0deb5ba64b1c - languageName: node - linkType: hard - -"@truffle/interface-adapter@npm:^0.5.35": - version: 0.5.35 - resolution: "@truffle/interface-adapter@npm:0.5.35" - dependencies: - bn.js: "npm:^5.1.3" - ethers: "npm:^4.0.32" - web3: "npm:1.10.0" - checksum: 10/91b0222e80ff7d29b4913740c6ec9d3b4a81c03faf949b6c107d923faf510a9058d1a4aa0bc07b7aedf3a826d7f6d1b311e7b0903e45ae0777e98cba8653e98b - languageName: node - linkType: hard - -"@truffle/promise-tracker@npm:^0.1.6": - version: 0.1.6 - resolution: "@truffle/promise-tracker@npm:0.1.6" - checksum: 10/63c98bbd25c96ebb09d453960534ada50c04a21723cd1ded59cd8ea41f67b26fde5c5b66f31110ef3d94774973bfb3f276fc71c214c8d4f56c2a49918ffba27d - languageName: node - linkType: hard - -"@truffle/provider@npm:^0.3.11": - version: 0.3.11 - resolution: "@truffle/provider@npm:0.3.11" - dependencies: - "@truffle/error": "npm:^0.2.1" - "@truffle/interface-adapter": "npm:^0.5.35" - debug: "npm:^4.3.1" - web3: "npm:1.10.0" - checksum: 10/4ec4327189b9464fad6206c54d2e456ebdab1cf6431d389bcb6e7d8244ba355805af829bd6eb2a6fbcd59b90eb8593c666a76cfcd6e6f659f70a987fe01ded64 - languageName: node - linkType: hard - -"@truffle/source-map-utils@npm:^1.3.118": - version: 1.3.118 - resolution: "@truffle/source-map-utils@npm:1.3.118" - dependencies: - "@truffle/code-utils": "npm:^3.0.3" - "@truffle/codec": "npm:^0.17.2" - debug: "npm:^4.3.1" - json-pointer: "npm:^0.6.1" - node-interval-tree: "npm:^1.3.3" - web3-utils: "npm:1.10.0" - checksum: 10/428cf7b8863ba33b8aa3959a9ad4ba194280bdf81885219d119ab12f112b2b3f8eb2edd97688054b43c07e7bcb23ff9491cab4f4468e85d1ae642874141ace8a - languageName: node - linkType: hard - -"@truffle/spinners@npm:^0.2.4": - version: 0.2.4 - resolution: "@truffle/spinners@npm:0.2.4" - dependencies: - "@trufflesuite/spinnies": "npm:^0.1.1" - checksum: 10/89864e5df98f68fb9bef4e6a602f08e56684e2c96b6a876bf8c76713a2f8c69cdbe5f28076dbb5783c49826fc7142c96561c58133c6562d3596257573f195948 - languageName: node - linkType: hard - -"@trufflesuite/bigint-buffer@npm:1.1.10": - version: 1.1.10 - resolution: "@trufflesuite/bigint-buffer@npm:1.1.10" - dependencies: - node-gyp: "npm:latest" - node-gyp-build: "npm:4.4.0" - checksum: 10/544b39fe3c7ebf895359bc46d255e350c723700601498674c8797bc2e6b6139cb898307530331d1c96821faa0b4a63d5a38876b4b32891dc3a4b3422014df0bf - languageName: node - linkType: hard - -"@trufflesuite/chromafi@npm:^3.0.0": - version: 3.0.0 - resolution: "@trufflesuite/chromafi@npm:3.0.0" - dependencies: - camelcase: "npm:^4.1.0" - chalk: "npm:^2.3.2" - cheerio: "npm:^1.0.0-rc.2" - detect-indent: "npm:^5.0.0" - highlight.js: "npm:^10.4.1" - lodash.merge: "npm:^4.6.2" - strip-ansi: "npm:^4.0.0" - strip-indent: "npm:^2.0.0" - checksum: 10/1d5d5f0e23b413ebabf6ae6d9148e9f7e7185416e79666ebd92f17901304f7455b12072c36eb5f71861dae12a0505a399d68c0ad43620ac81ef7eeaca4832d14 - languageName: node - linkType: hard - -"@trufflesuite/spinnies@npm:^0.1.1": - version: 0.1.1 - resolution: "@trufflesuite/spinnies@npm:0.1.1" - dependencies: - chalk: "npm:^4.1.2" - cli-cursor: "npm:^3.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10/63eb93d4d28f71d25e8bd26a5ef63968d0f63a20f81ee399a38ee64714a188f630ea7811bbc534573adfe59093bc9b7c1670d793d873894f16a8abbd4760f3c0 - languageName: node - linkType: hard - -"@trufflesuite/uws-js-unofficial@npm:20.10.0-unofficial.2": - version: 20.10.0-unofficial.2 - resolution: "@trufflesuite/uws-js-unofficial@npm:20.10.0-unofficial.2" - dependencies: - bufferutil: "npm:4.0.5" - utf-8-validate: "npm:5.0.7" - ws: "npm:8.2.3" - dependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10/76a057192d2c677d0dfdbe50b72dfb292fb674a8c7f5ab20e77bdc44df3f40a25653ea0b9d2d93c1d0dfd0e8051a49007abc4405e7c675e870c24b7e203928c1 - languageName: node - linkType: hard - -"@trysound/sax@npm:0.2.0": - version: 0.2.0 - resolution: "@trysound/sax@npm:0.2.0" - checksum: 10/7379713eca480ac0d9b6c7b063e06b00a7eac57092354556c81027066eb65b61ea141a69d0cc2e15d32e05b2834d4c9c2184793a5e36bbf5daf05ee5676af18c - languageName: node - linkType: hard - -"@tsconfig/node10@npm:^1.0.7": - version: 1.0.8 - resolution: "@tsconfig/node10@npm:1.0.8" - checksum: 10/b8d5fffbc6b17ef64ef74f7fdbccee02a809a063ade785c3648dae59406bc207f70ea2c4296f92749b33019fa36a5ae716e42e49cc7f1bbf0fd147be0d6b970a - languageName: node - linkType: hard - -"@tsconfig/node12@npm:^1.0.7": - version: 1.0.9 - resolution: "@tsconfig/node12@npm:1.0.9" - checksum: 10/a01b2400ab3582b86b589c6d31dcd0c0656f333adecde85d6d7d4086adb059808b82692380bb169546d189bf771ae21d02544a75b57bd6da4a5dd95f8567bec9 - languageName: node - linkType: hard - -"@tsconfig/node14@npm:^1.0.0": - version: 1.0.1 - resolution: "@tsconfig/node14@npm:1.0.1" - checksum: 10/976345e896c0f059867f94f8d0f6ddb8b1844fb62bf36b727de8a9a68f024857e5db97ed51d3325e23e0616a5e48c034ff51a8d595b3fe7e955f3587540489be - languageName: node - linkType: hard - -"@tsconfig/node16@npm:^1.0.2": - version: 1.0.2 - resolution: "@tsconfig/node16@npm:1.0.2" - checksum: 10/ca94d3639714672bbfd55f03521d3f56bb6a25479bd425da81faf21f13e1e9d15f40f97377dedbbf477a5841c5b0c8f4cd1b391f33553d750b9202c54c2c07aa - languageName: node - linkType: hard - -"@tufjs/canonical-json@npm:1.0.0": - version: 1.0.0 - resolution: "@tufjs/canonical-json@npm:1.0.0" - checksum: 10/9ff3bcd12988fb23643690da3e009f9130b7b10974f8e7af4bd8ad230a228119de8609aa76d75264fe80f152b50872dea6ea53def69534436a4c24b4fcf6a447 - languageName: node - linkType: hard - -"@tufjs/canonical-json@npm:2.0.0": - version: 2.0.0 - resolution: "@tufjs/canonical-json@npm:2.0.0" - checksum: 10/cc719a1d0d0ae1aa1ba551a82c87dcbefac088e433c03a3d8a1d547ea721350e47dab4ab5b0fca40d5c7ab1f4882e72edc39c9eae15bf47c45c43bcb6ee39f4f - languageName: node - linkType: hard - -"@tufjs/models@npm:1.0.4": - version: 1.0.4 - resolution: "@tufjs/models@npm:1.0.4" - dependencies: - "@tufjs/canonical-json": "npm:1.0.0" - minimatch: "npm:^9.0.0" - checksum: 10/2c63e9cfc04a4ce8888e9cc9668a7207e3047d64c50dccc3d2c30057d8bd6c4e89256b6094d2109549278da72c75e20cd8717bb5f4b544dc2323288a2a96607f - languageName: node - linkType: hard - -"@tufjs/models@npm:2.0.1": - version: 2.0.1 - resolution: "@tufjs/models@npm:2.0.1" - dependencies: - "@tufjs/canonical-json": "npm:2.0.0" - minimatch: "npm:^9.0.4" - checksum: 10/7c5d2b8194195cecddc92ae37523c1375e7aaf2e554941c0f9b71db93bbef4f0af8190438dd321e8f9dfd4ce2a9b582e35a4c4c04bec87e25a289c9c8bedcd4e - languageName: node - linkType: hard - -"@types/accepts@npm:^1.3.5": - version: 1.3.5 - resolution: "@types/accepts@npm:1.3.5" - dependencies: - "@types/node": "npm:*" - checksum: 10/3984edd631d9e308ef10286454a05e2388812a740d404abf93522a3bc3d10032ae6a60816e8cc4ae1bc96367db39e543d3ef862944cea53d1eea48be1f624fc2 - languageName: node - linkType: hard - -"@types/adm-zip@npm:0.5.0": - version: 0.5.0 - resolution: "@types/adm-zip@npm:0.5.0" - dependencies: - "@types/node": "npm:*" - checksum: 10/59110171eb2a961c916487c8206decfb747611d68b8383bba896421261550c1b76d895826b53d5fdfd2192f4ea997504cbcd095abe9a2e1f16c37a884931bbd4 - languageName: node - linkType: hard - -"@types/aria-query@npm:^5.0.1": - version: 5.0.4 - resolution: "@types/aria-query@npm:5.0.4" - checksum: 10/c0084c389dc030daeaf0115a92ce43a3f4d42fc8fef2d0e22112d87a42798d4a15aac413019d4a63f868327d52ad6740ab99609462b442fe6b9286b172d2e82e - languageName: node - linkType: hard - -"@types/async-exit-hook@npm:2.0.2": - version: 2.0.2 - resolution: "@types/async-exit-hook@npm:2.0.2" - checksum: 10/f0afd1548d93784c3500b84ff9d804010896246efcfc4f57f71c6eecb619207d9ae31af6cef267d9792a9d30bb2f5d97b9e4d60b89cf2c468e60a758270242eb - languageName: node - linkType: hard - -"@types/babel__core@npm:^7.0.0": - version: 7.20.2 - resolution: "@types/babel__core@npm:7.20.2" - dependencies: - "@babel/parser": "npm:^7.20.7" - "@babel/types": "npm:^7.20.7" - "@types/babel__generator": "npm:*" - "@types/babel__template": "npm:*" - "@types/babel__traverse": "npm:*" - checksum: 10/78aede009117ff6c95ef36db19e27ad15ecdcb5cfc9ad57d43caa5d2f44127105691a3e6e8d1806fd305484db8a74fdec5640e88da452c511f6351353f7ac0c8 - languageName: node - linkType: hard - -"@types/babel__core@npm:^7.1.14": - version: 7.1.18 - resolution: "@types/babel__core@npm:7.1.18" - dependencies: - "@babel/parser": "npm:^7.1.0" - "@babel/types": "npm:^7.0.0" - "@types/babel__generator": "npm:*" - "@types/babel__template": "npm:*" - "@types/babel__traverse": "npm:*" - checksum: 10/7921d75d42eed69b9ba9fc282490216ab77a6bcf93681ed8a9da77f9ba2912c973667e9d706e6e012673e713b36c4e3654ecd25057736346e6c794f25d309a87 - languageName: node - linkType: hard - -"@types/babel__core@npm:^7.20.5": - version: 7.20.5 - resolution: "@types/babel__core@npm:7.20.5" - dependencies: - "@babel/parser": "npm:^7.20.7" - "@babel/types": "npm:^7.20.7" - "@types/babel__generator": "npm:*" - "@types/babel__template": "npm:*" - "@types/babel__traverse": "npm:*" - checksum: 10/c32838d280b5ab59d62557f9e331d3831f8e547ee10b4f85cb78753d97d521270cebfc73ce501e9fb27fe71884d1ba75e18658692c2f4117543f0fc4e3e118b3 - languageName: node - linkType: hard - -"@types/babel__generator@npm:*": - version: 7.6.4 - resolution: "@types/babel__generator@npm:7.6.4" - dependencies: - "@babel/types": "npm:^7.0.0" - checksum: 10/34f361a0d54a0d85ea4c4b5122c4025a5738fe6795361c85f07a4f8f9add383de640e8611edeeb8339db8203c2d64bff30be266bdcfe3cf777c19e8d34f9cebc - languageName: node - linkType: hard - -"@types/babel__template@npm:*": - version: 7.4.1 - resolution: "@types/babel__template@npm:7.4.1" - dependencies: - "@babel/parser": "npm:^7.1.0" - "@babel/types": "npm:^7.0.0" - checksum: 10/649fe8b42c2876be1fd28c6ed9b276f78152d5904ec290b6c861d9ef324206e0a5c242e8305c421ac52ecf6358fa7e32ab7a692f55370484825c1df29b1596ee - languageName: node - linkType: hard - -"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": - version: 7.14.2 - resolution: "@types/babel__traverse@npm:7.14.2" - dependencies: - "@babel/types": "npm:^7.3.0" - checksum: 10/daa949c48570f7ccc1dc0fad6d660244257de7110bae5a151842d4dac6ac90c6e0f476c8d7ac0a5a856fa34cb5f0c3299784da25a07eb79d5a9d75c7e4c68655 - languageName: node - linkType: hard - -"@types/babel__traverse@npm:^7.0.4": - version: 7.20.1 - resolution: "@types/babel__traverse@npm:7.20.1" - dependencies: - "@babel/types": "npm:^7.20.7" - checksum: 10/8f18d1488adf296f50d01e2386797c56a607cde2cfc3c7c55cea34d760aed9386c81ea808a151a0efb11d99e0083c138c5733d3f214471a30abed055bede39d8 - languageName: node - linkType: hard - -"@types/benchmark@npm:2.1.5": - version: 2.1.5 - resolution: "@types/benchmark@npm:2.1.5" - checksum: 10/1540d8698620da2f4ef0d93dd6e57e40583bb3d5c735768d94c52bdfc039f474f83213badcc66013f0c1f73edcebec99dc731fa8943fc13b4f0d18ddfdf77bee - languageName: node - linkType: hard - -"@types/bn.js@npm:*, @types/bn.js@npm:5.1.0, @types/bn.js@npm:^5.1.0": - version: 5.1.0 - resolution: "@types/bn.js@npm:5.1.0" - dependencies: - "@types/node": "npm:*" - checksum: 10/43d06b6f802eb7479fc58a7910cfc7af0c540fab86529c1c9b0022b992df916fc41f811da8822b6726f4e20209d5809b456c25e7f3fce37c338ebdf684b8a4b6 - languageName: node - linkType: hard - -"@types/bn.js@npm:^4.11.3, @types/bn.js@npm:^4.11.5": - version: 4.11.6 - resolution: "@types/bn.js@npm:4.11.6" - dependencies: - "@types/node": "npm:*" - checksum: 10/9ff3e7a1539a953c381c0d30ea2049162e3cab894cda91ee10f3a84d603f9afa2b2bc2a38fe9b427de94b6e2b7b77aefd217c1c7b07a10ae8d7499f9d6697a41 - languageName: node - linkType: hard - -"@types/bn.js@npm:^5.1.1": - version: 5.1.1 - resolution: "@types/bn.js@npm:5.1.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/cf2c45833e67ecfc45e5336151965a47857431640b61708b6e4dc81d88ed53585c9b30be59abbbee609cdf7a63828e5b8a58c1a27eb4306e5cb7ddd9bad46650 - languageName: node - linkType: hard - -"@types/bn.js@npm:^5.1.5": - version: 5.1.5 - resolution: "@types/bn.js@npm:5.1.5" - dependencies: - "@types/node": "npm:*" - checksum: 10/9719330c86aeae0a6a447c974cf0f853ba3660ede20de61f435b03d699e30e6d8b35bf71a8dc9fdc8317784438e83177644ba068ed653d0ae0106e1ecbfe289e - languageName: node - linkType: hard - -"@types/body-parser@npm:*, @types/body-parser@npm:1.19.2": - version: 1.19.2 - resolution: "@types/body-parser@npm:1.19.2" - dependencies: - "@types/connect": "npm:*" - "@types/node": "npm:*" - checksum: 10/e17840c7d747a549f00aebe72c89313d09fbc4b632b949b2470c5cb3b1cb73863901ae84d9335b567a79ec5efcfb8a28ff8e3f36bc8748a9686756b6d5681f40 - languageName: node - linkType: hard - -"@types/body-parser@npm:1.19.3": - version: 1.19.3 - resolution: "@types/body-parser@npm:1.19.3" - dependencies: - "@types/connect": "npm:*" - "@types/node": "npm:*" - checksum: 10/932fa71437c275023799123680ef26ffd90efd37f51a1abe405e6ae6e5b4ad9511b7a3a8f5a12877ed1444a02b6286c0a137a98e914b3c61932390c83643cc2c - languageName: node - linkType: hard - -"@types/body-parser@npm:1.19.4": - version: 1.19.4 - resolution: "@types/body-parser@npm:1.19.4" - dependencies: - "@types/connect": "npm:*" - "@types/node": "npm:*" - checksum: 10/10accc30773319bd49af7d12d2cd5faf9a0293ea4764345297f26ba6ef31d5caa7609da7619584d6c61279e09b89d3ab13d28c5cb644807c5d9c722ae1454778 - languageName: node - linkType: hard - -"@types/bonjour@npm:^3.5.9": - version: 3.5.10 - resolution: "@types/bonjour@npm:3.5.10" - dependencies: - "@types/node": "npm:*" - checksum: 10/bfcadb042a41b124c4e3de4925e3be6d35b78f93f27c4535d5ff86980dc0f8bc407ed99b9b54528952dc62834d5a779392f7a12c2947dd19330eb05a6bcae15a - languageName: node - linkType: hard - -"@types/cacheable-request@npm:^6.0.2": - version: 6.0.3 - resolution: "@types/cacheable-request@npm:6.0.3" - dependencies: - "@types/http-cache-semantics": "npm:*" - "@types/keyv": "npm:^3.1.4" - "@types/node": "npm:*" - "@types/responselike": "npm:^1.0.0" - checksum: 10/159f9fdb2a1b7175eef453ae2ced5ea04c0d2b9610cc9ccd9f9abb066d36dacb1f37acd879ace10ad7cbb649490723feb396fb7307004c9670be29636304b988 - languageName: node - linkType: hard - -"@types/caseless@npm:*": - version: 0.12.2 - resolution: "@types/caseless@npm:0.12.2" - checksum: 10/8bd3c34109d528364ee231813538ff17afaa3bc62cd079172e8c1e3dceda9e912ae7cae442008bb6e4dff0d57d8b24f44bbb07b8539bdf4efdb30f3c476eb450 - languageName: node - linkType: hard - -"@types/compression@npm:1.7.4": - version: 1.7.4 - resolution: "@types/compression@npm:1.7.4" - dependencies: - "@types/express": "npm:*" - checksum: 10/1276449683418fa2442b4d97af70c670b9b322506f25fd027ff74a1d7555c199129581db3c491315ac3c2e8e10085731ac92a93cd556ee6a7dfff81d6c72d9c6 - languageName: node - linkType: hard - -"@types/config@npm:3.3.0": - version: 3.3.0 - resolution: "@types/config@npm:3.3.0" - checksum: 10/d9485041cfa05864d3b8095cf7b44fae910887f6782dc43ab1ba4ea78d9cdf4a8c9d697557318ede2b4b63a05b7f91e8571b8dbe048ad024e709d9e51e0487d8 - languageName: node - linkType: hard - -"@types/connect-history-api-fallback@npm:^1.3.5": - version: 1.3.5 - resolution: "@types/connect-history-api-fallback@npm:1.3.5" - dependencies: - "@types/express-serve-static-core": "npm:*" - "@types/node": "npm:*" - checksum: 10/464d06e5ab00f113fa89978633d5eb00d225aeb4ebbadc07f6f3bc337aa7cbfcd74957b2a539d6d47f2e128e956a17819973ec7ae62ade2e16e367a6c38b8d3a - languageName: node - linkType: hard - -"@types/connect@npm:*": - version: 3.4.35 - resolution: "@types/connect@npm:3.4.35" - dependencies: - "@types/node": "npm:*" - checksum: 10/fe81351470f2d3165e8b12ce33542eef89ea893e36dd62e8f7d72566dfb7e448376ae962f9f3ea888547ce8b55a40020ca0e01d637fab5d99567673084542641 - languageName: node - linkType: hard - -"@types/convict@npm:6.1.1": - version: 6.1.1 - resolution: "@types/convict@npm:6.1.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/ae12146e38a4f9043906c6bc23bfb31c85fa9154d9abd1ca1924c083c5545a1c5fdde8a754966db65ccee76ffab67ef7bbb9a623ec531cc72f8b8c526effcfa6 - languageName: node - linkType: hard - -"@types/cookie-parser@npm:1.4.5": - version: 1.4.5 - resolution: "@types/cookie-parser@npm:1.4.5" - dependencies: - "@types/express": "npm:*" - checksum: 10/45855721706d6a57bb0441db11fb59db407414ea83a0000a0df80d19230447cc3bcc43c436397bfb8998ec78db222265fa8083456b00c5b5054a0c03d06f0086 - languageName: node - linkType: hard - -"@types/cookie@npm:^0.4.1": - version: 0.4.1 - resolution: "@types/cookie@npm:0.4.1" - checksum: 10/427c9220217d3d74f3e5d53d68cd39502f3bbebdb1af4ecf0d05076bcbe9ddab299ad6369fe0f517389296ba4ca49ddf9a8c22f68e5e9eb8ae6d0076cfab90b2 - languageName: node - linkType: hard - -"@types/cookiejar@npm:^2.1.5": - version: 2.1.5 - resolution: "@types/cookiejar@npm:2.1.5" - checksum: 10/04d5990e87b6387532d15a87d9ec9b2eb783039291193863751dcfd7fc723a3b3aa30ce4c06b03975cba58632e933772f1ff031af23eaa3ac7f94e71afa6e073 - languageName: node - linkType: hard - -"@types/cordova@npm:latest": - version: 0.0.34 - resolution: "@types/cordova@npm:0.0.34" - checksum: 10/028946904cd28a0fcf38885cc801124fd0f2e521d0e990a2a8f3261802eaeffa6bf29d3d3ca6405ceee5d22cfbd5dd5087807e46fc57dbf150bd677ffee5d9e8 - languageName: node - linkType: hard - -"@types/cors@npm:2.8.12, @types/cors@npm:^2.8.12": - version: 2.8.12 - resolution: "@types/cors@npm:2.8.12" - checksum: 10/8c45f112c7d1d2d831b4b266f2e6ed33a1887a35dcbfe2a18b28370751fababb7cd045e745ef84a523c33a25932678097bf79afaa367c6cb3fa0daa7a6438257 - languageName: node - linkType: hard - -"@types/crypto-js@npm:4.0.1": - version: 4.0.1 - resolution: "@types/crypto-js@npm:4.0.1" - checksum: 10/e801a0f765f7561ad84ecd55e13fb70d6d954e907332315fd2e376ca33269029f2f20f0d4c4554546454558aa56b37f333f87ba73a72eab2d683f77abf9dfb49 - languageName: node - linkType: hard - -"@types/crypto-js@npm:4.1.1": - version: 4.1.1 - resolution: "@types/crypto-js@npm:4.1.1" - checksum: 10/822e798b97ef6f8f4d3114151547c90569b253356e3fb2f6d9bf44c072148a1e9a90685b439cced0374d72fc9c187bf25a77d64d42493c472850e9ea21eb2cbd - languageName: node - linkType: hard - -"@types/cucumber@npm:4.0.4": - version: 4.0.4 - resolution: "@types/cucumber@npm:4.0.4" - checksum: 10/c296941f0e80344c2a752fe21da73865788225e2914c189d875d9bd00dc408e7509e50d3584de9bf954837243fd26fa5f17e90d147dc79614b2b7d8af4a5dbf8 - languageName: node - linkType: hard - -"@types/debug@npm:4.1.12": - version: 4.1.12 - resolution: "@types/debug@npm:4.1.12" - dependencies: - "@types/ms": "npm:*" - checksum: 10/47876a852de8240bfdaf7481357af2b88cb660d30c72e73789abf00c499d6bc7cd5e52f41c915d1b9cd8ec9fef5b05688d7b7aef17f7f272c2d04679508d1053 - languageName: node - linkType: hard - -"@types/debug@npm:4.1.8": - version: 4.1.8 - resolution: "@types/debug@npm:4.1.8" - dependencies: - "@types/ms": "npm:*" - checksum: 10/a9a9bb40a199e9724aa944e139a7659173a9b274798ea7efbc277cb084bc37d32fc4c00877c3496fac4fed70a23243d284adb75c00b5fdabb38a22154d18e5df - languageName: node - linkType: hard - -"@types/debug@npm:^4.1.7": - version: 4.1.7 - resolution: "@types/debug@npm:4.1.7" - dependencies: - "@types/ms": "npm:*" - checksum: 10/0a7b89d8ed72526858f0b61c6fd81f477853e8c4415bb97f48b1b5545248d2ae389931680b94b393b993a7cfe893537a200647d93defe6d87159b96812305adc - languageName: node - linkType: hard - -"@types/docker-modem@npm:*": - version: 3.0.2 - resolution: "@types/docker-modem@npm:3.0.2" - dependencies: - "@types/node": "npm:*" - "@types/ssh2": "npm:*" - checksum: 10/1f23db30e6e9bdd4c6d6e43572fb7ac7251d106a1906a9f3faabac393897712a5a9cd5a471baedc0ac8055dab3f48eda331f41a1e2c7c6bbe3c7f433e039151c - languageName: node - linkType: hard - -"@types/dockerode@npm:3.2.7": - version: 3.2.7 - resolution: "@types/dockerode@npm:3.2.7" - dependencies: - "@types/docker-modem": "npm:*" - "@types/node": "npm:*" - checksum: 10/e5abbd04c2af0d266aa03a7860eea890577444c1480dd46f9257c743900697e0d121a5342e330300c0cc9fa9894acaf5da3b5bf26dffa5000a2ef1e1e8c8177a - languageName: node - linkType: hard - -"@types/elliptic@npm:6.4.14, @types/elliptic@npm:^6.4.9": - version: 6.4.14 - resolution: "@types/elliptic@npm:6.4.14" - dependencies: - "@types/bn.js": "npm:*" - checksum: 10/603e75b2eb5581d568d3506d26b00340aa2d1a459182a044e5358fdcf7cfcec068e1e25e2e281f44a02aafa1769c6da5dfd0b6a4a307e9f6d8cdb7f1a475d412 - languageName: node - linkType: hard - -"@types/elliptic@npm:6.4.16": - version: 6.4.16 - resolution: "@types/elliptic@npm:6.4.16" - dependencies: - "@types/bn.js": "npm:*" - checksum: 10/082dbaded93cb078e622f108cb297875d579e851c64a3083429b0cae628c58141c850617a8bc4be613a803051b42b533a29d5b0aec4f7b6daa903ecd9936d6c3 - languageName: node - linkType: hard - -"@types/escape-html@npm:1.0.1": - version: 1.0.1 - resolution: "@types/escape-html@npm:1.0.1" - checksum: 10/141d6e44dd514b0bf8a1c5e7730d6b9fa291bb11a52bcc3434d269252b10622f52bd7458553efc2c95ca8341bafab836fe696f8fe72f82c5809204239b8ba791 - languageName: node - linkType: hard - -"@types/eslint-scope@npm:^3.7.3": - version: 3.7.3 - resolution: "@types/eslint-scope@npm:3.7.3" - dependencies: - "@types/eslint": "npm:*" - "@types/estree": "npm:*" - checksum: 10/6772b05e1b92003d1f295e81bc847a61f4fbe8ddab77ffa49e84ed3f9552513bdde677eb53ef167753901282857dd1d604d9f82eddb34a233495932b2dc3dc17 - languageName: node - linkType: hard - -"@types/eslint@npm:*": - version: 8.4.1 - resolution: "@types/eslint@npm:8.4.1" - dependencies: - "@types/estree": "npm:*" - "@types/json-schema": "npm:*" - checksum: 10/5053fbe6573bd3d5e598c7a6ec11b5df02894bd4e1848361b9f10da83d8210b3d4605d50669da21ae53dd3948cb8173bd68ac9d32c4de992dafc640a0cfa7cfe - languageName: node - linkType: hard - -"@types/eslint@npm:^7.29.0 || ^8.4.1": - version: 8.44.2 - resolution: "@types/eslint@npm:8.44.2" - dependencies: - "@types/estree": "npm:*" - "@types/json-schema": "npm:*" - checksum: 10/9fe07d4fba1ab9d53d0da404c5774c056deb4bb37a3712a11d35f40ec4389d5d8cc46f19387cf79a3054754e1b71f5dbb796ee6f7411449e9f2399aff8a94def - languageName: node - linkType: hard - -"@types/esm@npm:3.2.0": - version: 3.2.0 - resolution: "@types/esm@npm:3.2.0" - dependencies: - "@types/node": "npm:*" - checksum: 10/a051a18ac96e769e8d247a30d9265afd79114f3918659e4124ffdacadd9f7639f26ac785fb01a582737da61a6d33565a3672566ba89754a48c63c00913fb7a33 - languageName: node - linkType: hard - -"@types/estree@npm:*": - version: 0.0.51 - resolution: "@types/estree@npm:0.0.51" - checksum: 10/b566c7a3fc8a81ca3d9e00a717e90b8f5d567e2476b4f6d76a20ec6da33ec28165b8f989ed8dd0c9df41405199777ec36a4f85f32a347fbc6c3f696a3128b6e7 - languageName: node - linkType: hard - -"@types/estree@npm:0.0.39": - version: 0.0.39 - resolution: "@types/estree@npm:0.0.39" - checksum: 10/9f0f20990dbf725470564d4d815d3758ac688b790f601ea98654b6e0b9797dc3c80306fb525abdacd9e75e014e3d09ad326098eaa2ed1851e4823a8e278538aa - languageName: node - linkType: hard - -"@types/estree@npm:1.0.5, @types/estree@npm:^1.0.5": - version: 1.0.5 - resolution: "@types/estree@npm:1.0.5" - checksum: 10/7de6d928dd4010b0e20c6919e1a6c27b61f8d4567befa89252055fad503d587ecb9a1e3eab1b1901f923964d7019796db810b7fd6430acb26c32866d126fd408 - languageName: node - linkType: hard - -"@types/estree@npm:^1.0.0": - version: 1.0.1 - resolution: "@types/estree@npm:1.0.1" - checksum: 10/f252569c002506c61ad913e778aa69415908078c46c78c901ccad77bc66cd34f1e1b9babefb8ff0d27c07a15fb0824755edd7bb3fa7ea828f32ae0fe5faa9962 - languageName: node - linkType: hard - -"@types/express-http-proxy@npm:1.6.2": - version: 1.6.2 - resolution: "@types/express-http-proxy@npm:1.6.2" - dependencies: - "@types/express": "npm:*" - checksum: 10/f462bb988566a92f55ccfbdb7686cd426027da85c9cf6e0c2518058f0b92830108d9c3cb1bace678c304f7c554c21566c16211167a5e8e00563e3fa01043be63 - languageName: node - linkType: hard - -"@types/express-jwt@npm:6.0.2": - version: 6.0.2 - resolution: "@types/express-jwt@npm:6.0.2" - dependencies: - "@types/express": "npm:*" - "@types/express-unless": "npm:*" - checksum: 10/0fffb222216173342ba9fa53878153012563827645ccc59e3ed46b9facd1249ba3967fd38a28417a40fb669d5b5182c75b7992813e516adc6be9b95a0559e807 - languageName: node - linkType: hard - -"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.18": - version: 4.17.28 - resolution: "@types/express-serve-static-core@npm:4.17.28" - dependencies: - "@types/node": "npm:*" - "@types/qs": "npm:*" - "@types/range-parser": "npm:*" - checksum: 10/ee96644c3c3c9a69b27ad11fa27500dd16fe296137d5ccb1cac0d5a3c98648adf29f898d9102524068228545d8ec51373b13ba7bcc654f13f3c130c9762bea67 - languageName: node - linkType: hard - -"@types/express-serve-static-core@npm:4.17.31": - version: 4.17.31 - resolution: "@types/express-serve-static-core@npm:4.17.31" - dependencies: - "@types/node": "npm:*" - "@types/qs": "npm:*" - "@types/range-parser": "npm:*" - checksum: 10/020210f32d12fa4848d686e3acb98bc35dcec3ade16ae857e99005ac808aa07e1e1a909fdf4f1f2033159afb3eec3622811ac4cb82fa41553c714d9fa35fb77a - languageName: node - linkType: hard - -"@types/express-serve-static-core@npm:^4.17.33": - version: 4.17.33 - resolution: "@types/express-serve-static-core@npm:4.17.33" - dependencies: - "@types/node": "npm:*" - "@types/qs": "npm:*" - "@types/range-parser": "npm:*" - checksum: 10/47ee1b46be710ae6451a2e658e2eab75f4affe874b0d156a31e792db0ddb35184ac7b35be926eb23424cc45f6e0d3dbacc86ac5d63a3c988d8235aedb1143841 - languageName: node - linkType: hard - -"@types/express-serve-static-core@npm:^5.0.0": - version: 5.0.0 - resolution: "@types/express-serve-static-core@npm:5.0.0" - dependencies: - "@types/node": "npm:*" - "@types/qs": "npm:*" - "@types/range-parser": "npm:*" - "@types/send": "npm:*" - checksum: 10/fc40cdeae61113d8b2335f4b0f9334a7a64388a0931f2e98f8fc9bdadd0b13b501a70da14c256ae4aa140db49bd2eff75a99a683266d561e62540784a61dc489 - languageName: node - linkType: hard - -"@types/express-unless@npm:*": - version: 0.5.3 - resolution: "@types/express-unless@npm:0.5.3" - dependencies: - "@types/express": "npm:*" - checksum: 10/5c76425ff7490123f3c072c942ae6d18bb3cbf91d5d9857c52fca1f9a3d11b72413dbfb3e4af28fdd7f745d1a443f90daadbcf7daff714d608eef10bd7c8763c - languageName: node - linkType: hard - -"@types/express@npm:*": - version: 4.17.13 - resolution: "@types/express@npm:4.17.13" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.18" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/20783f6b8a0eec68d06c9478fd55bfe98ff747485316b585b3d637ca472811a1a2664b12b4b5014dc4127a2ed32c6856268228bafb2ed7840baf2a23662a1def - languageName: node - linkType: hard - -"@types/express@npm:4.17.14": - version: 4.17.14 - resolution: "@types/express@npm:4.17.14" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.18" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/293e53a7572ef93f70c830a0b1d620b5e16670509bb91e800393a67e7f41f170478809d862deed0edf573fc1afc3a6f7fc99ed176a28c0d8dd3f07c433f88672 - languageName: node - linkType: hard - -"@types/express@npm:5.0.0": - version: 5.0.0 - resolution: "@types/express@npm:5.0.0" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^5.0.0" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/45b199ab669caa33e6badafeebf078e277ea95042309d325a04b1ec498f33d33fd5a4ae9c8e358342367b178fe454d7323c5dfc8002bf27070b210a2c6cc11f0 - languageName: node - linkType: hard - -"@types/express@npm:^4.17.13": - version: 4.17.17 - resolution: "@types/express@npm:4.17.17" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.33" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/e2959a5fecdc53f8a524891a16e66dfc330ee0519e89c2579893179db686e10cfa6079a68e0fb8fd00eedbcaf3eabfd10916461939f3bc02ef671d848532c37e - languageName: node - linkType: hard - -"@types/express@npm:^4.17.15": - version: 4.17.20 - resolution: "@types/express@npm:4.17.20" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.33" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/7dba63831c61102397cb8dfc2a8b71bb85d93760958c43292cbd7962ba44e8978c998e47226b152d103c0a7492e2bfb2174c1f20805ddad796c7854973c8ebf9 - languageName: node - linkType: hard - -"@types/express@npm:^4.17.18": - version: 4.17.21 - resolution: "@types/express@npm:4.17.21" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.33" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/7a6d26cf6f43d3151caf4fec66ea11c9d23166e4f3102edfe45a94170654a54ea08cf3103d26b3928d7ebcc24162c90488e33986b7e3a5f8941225edd5eb18c7 - languageName: node - linkType: hard - -"@types/fs-extra@npm:11.0.4": - version: 11.0.4 - resolution: "@types/fs-extra@npm:11.0.4" - dependencies: - "@types/jsonfile": "npm:*" - "@types/node": "npm:*" - checksum: 10/acc4c1eb0cde7b1f23f3fe6eb080a14832d8fa9dc1761aa444c5e2f0f6b6fa657ed46ebae32fb580a6700fc921b6165ce8ac3e3ba030c3dd15f10ad4dd4cae98 - languageName: node - linkType: hard - -"@types/glob@npm:*, @types/glob@npm:^7.1.1": - version: 7.2.0 - resolution: "@types/glob@npm:7.2.0" - dependencies: - "@types/minimatch": "npm:*" - "@types/node": "npm:*" - checksum: 10/6ae717fedfdfdad25f3d5a568323926c64f52ef35897bcac8aca8e19bc50c0bd84630bbd063e5d52078b2137d8e7d3c26eabebd1a2f03ff350fff8a91e79fc19 - languageName: node - linkType: hard - -"@types/google-protobuf@npm:3.15.5": - version: 3.15.5 - resolution: "@types/google-protobuf@npm:3.15.5" - checksum: 10/cbcf33239a3c423d113efc2b926310ca65fdb61c38b78d45d80bccb2414dc75b3b76224395187bbe449aeffa4831f1ac68710a8d47058770c5257d1a2fa9682a - languageName: node - linkType: hard - -"@types/graceful-fs@npm:^4.1.2": - version: 4.1.6 - resolution: "@types/graceful-fs@npm:4.1.6" - dependencies: - "@types/node": "npm:*" - checksum: 10/c3070ccdc9ca0f40df747bced1c96c71a61992d6f7c767e8fd24bb6a3c2de26e8b84135ede000b7e79db530a23e7e88dcd9db60eee6395d0f4ce1dae91369dd4 - languageName: node - linkType: hard - -"@types/graceful-fs@npm:^4.1.3": - version: 4.1.5 - resolution: "@types/graceful-fs@npm:4.1.5" - dependencies: - "@types/node": "npm:*" - checksum: 10/d076bb61f45d0fc42dee496ef8b1c2f8742e15d5e47e90e20d0243386e426c04d4efd408a48875ab432f7960b4ce3414db20ed0fbbfc7bcc89d84e574f6e045a - languageName: node - linkType: hard - -"@types/html-minifier-terser@npm:^6.0.0": - version: 6.1.0 - resolution: "@types/html-minifier-terser@npm:6.1.0" - checksum: 10/06bb3e1e8ebff43602c826d67f53f1fd3a6b9c751bfbc67d7ea4e85679446a639e20e60adad8c9d44ab4baf1337b3861b91e7e5e2be798575caf0cc1a5712552 - languageName: node - linkType: hard - -"@types/http-cache-semantics@npm:*": - version: 4.0.3 - resolution: "@types/http-cache-semantics@npm:4.0.3" - checksum: 10/d9859ba19513836eaea48d15c392c1a55bd45db8a6488dd024e78a6f2afff3437c09ecaec1546c2e2c8de7464f43ce49cd5784494950427507ecaaad8f4c83ac - languageName: node - linkType: hard - -"@types/http-cache-semantics@npm:^4.0.1": - version: 4.0.1 - resolution: "@types/http-cache-semantics@npm:4.0.1" - checksum: 10/d059bf8a15d5163cc60da51ba00d17620507f968d0b792cd55f62043016344a5f0e1aa94fa411089d41114035fcd0ea656f968bda7eabb6663a97787e3445a1c - languageName: node - linkType: hard - -"@types/http-errors@npm:*": - version: 2.0.1 - resolution: "@types/http-errors@npm:2.0.1" - checksum: 10/3bb0c50b0a652e679a84c30cd0340d696c32ef6558518268c238840346c077f899315daaf1c26c09c57ddd5dc80510f2a7f46acd52bf949e339e35ed3ee9654f - languageName: node - linkType: hard - -"@types/http-errors@npm:1.6.3": - version: 1.6.3 - resolution: "@types/http-errors@npm:1.6.3" - checksum: 10/c769ed815bb2efe7fc8646d0eeb98bc04868d5c6ac9132c3fa4a9efbb3b2b89c3363ad61753ae89c464ce47fd3406ad8ffcf2a8e64aec3e202808adcde0e2eca - languageName: node - linkType: hard - -"@types/http-errors@npm:2.0.2": - version: 2.0.2 - resolution: "@types/http-errors@npm:2.0.2" - checksum: 10/d7f14045240ac4b563725130942b8e5c8080bfabc724c8ff3f166ea928ff7ae02c5194763bc8f6aaf21897e8a44049b0492493b9de3e058247e58fdfe0f86692 - languageName: node - linkType: hard - -"@types/http-errors@npm:2.0.4": - version: 2.0.4 - resolution: "@types/http-errors@npm:2.0.4" - checksum: 10/1f3d7c3b32c7524811a45690881736b3ef741bf9849ae03d32ad1ab7062608454b150a4e7f1351f83d26a418b2d65af9bdc06198f1c079d75578282884c4e8e3 - languageName: node - linkType: hard - -"@types/http-proxy@npm:^1.17.8": - version: 1.17.9 - resolution: "@types/http-proxy@npm:1.17.9" - dependencies: - "@types/node": "npm:*" - checksum: 10/48075c535a5d4805feca388a539b4dcb80666963499018918584aefb4f7806c2c86b0c289bb0f1d96539816d90d702b7c2167e68c3ebe858725e598a1c3c05d2 - languageName: node - linkType: hard - -"@types/indy-sdk@npm:1.16.27": - version: 1.16.27 - resolution: "@types/indy-sdk@npm:1.16.27" - dependencies: - buffer: "npm:^6.0.0" - checksum: 10/417475ce509acb80a532858db2365521d9c8b7588fad1ac6f35e57c15d36bc9b619ed0be375a197e244b3dedb191eccec567941510acc3b39d8de1e46c89f352 - languageName: node - linkType: hard - -"@types/inquirer@npm:8.2.6": - version: 8.2.6 - resolution: "@types/inquirer@npm:8.2.6" - dependencies: - "@types/through": "npm:*" - rxjs: "npm:^7.2.0" - checksum: 10/7f93b12b4da7a3a8bca270b6adca761e88a6c8a05b6ea61553ced2d92f26795143ff886792057028b68ea94ed00b610b2cbed317d13e96e3e520a09bc48f03a7 - languageName: node - linkType: hard - -"@types/internal-ip@npm:4.1.0": - version: 4.1.0 - resolution: "@types/internal-ip@npm:4.1.0" - dependencies: - internal-ip: "npm:*" - checksum: 10/f9090eb1d8f4c058f58b92adc895e4c686954175d43c00af4cd47f8dda9b1bf9c902f1900d12087fa6d42996db280bb13d32df0d65f2745e7e6bb0629b7e7f2b - languageName: node - linkType: hard - -"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": - version: 2.0.4 - resolution: "@types/istanbul-lib-coverage@npm:2.0.4" - checksum: 10/a25d7589ee65c94d31464c16b72a9dc81dfa0bea9d3e105ae03882d616e2a0712a9c101a599ec482d297c3591e16336962878cb3eb1a0a62d5b76d277a890ce7 - languageName: node - linkType: hard - -"@types/istanbul-lib-report@npm:*": - version: 3.0.0 - resolution: "@types/istanbul-lib-report@npm:3.0.0" - dependencies: - "@types/istanbul-lib-coverage": "npm:*" - checksum: 10/f121dcac8a6b8184f3cab97286d8d519f1937fa8620ada5dbc43b699d602b8be289e4a4bccbd6ee1aade6869d3c9fb68bf04c6fdca8c5b0c4e7e314c31c7900a - languageName: node - linkType: hard - -"@types/istanbul-reports@npm:^3.0.0": - version: 3.0.1 - resolution: "@types/istanbul-reports@npm:3.0.1" - dependencies: - "@types/istanbul-lib-report": "npm:*" - checksum: 10/f1ad54bc68f37f60b30c7915886b92f86b847033e597f9b34f2415acdbe5ed742fa559a0a40050d74cdba3b6a63c342cac1f3a64dba5b68b66a6941f4abd7903 - languageName: node - linkType: hard - -"@types/jest@npm:*": - version: 29.5.10 - resolution: "@types/jest@npm:29.5.10" - dependencies: - expect: "npm:^29.0.0" - pretty-format: "npm:^29.0.0" - checksum: 10/f31cdc9cf840a3bc2230148bb5cba1e0369e3180ae75d85804038905300dd8cfa1d989a4dbbd909633c04568d0c1a9251b2ee5c4197309ec033403dd2a08ea42 - languageName: node - linkType: hard - -"@types/jest@npm:29.5.3": - version: 29.5.3 - resolution: "@types/jest@npm:29.5.3" - dependencies: - expect: "npm:^29.0.0" - pretty-format: "npm:^29.0.0" - checksum: 10/e8b4eda3ba379b21fcd5c2d1d531ec94f636676f1690f06ff3f7b8dc199c2cec711d4c4e122175f05d50040e5dec69f3c13ef88bd825f0b1a1ac1332eb072c12 - languageName: node - linkType: hard - -"@types/jest@npm:^27.5.2": - version: 27.5.2 - resolution: "@types/jest@npm:27.5.2" - dependencies: - jest-matcher-utils: "npm:^27.0.0" - pretty-format: "npm:^27.0.0" - checksum: 10/8608696fbdea81bc9a600d1c5aeb290063357eaa55c0174e7db15087c4f483113b35f8b4c4ae364d2632cfed15a4dd674786254826b946c896de5612c8cb1a26 - languageName: node - linkType: hard - -"@types/joi@npm:17.2.3": - version: 17.2.3 - resolution: "@types/joi@npm:17.2.3" - dependencies: - joi: "npm:*" - checksum: 10/f26d0132b4e16d667176a0dce52a013fce1557a9d7a7b68c67e1bdb1ca470a221e638f2ad4566ca8fcfad544ca0845f6e241b3e86cb387ffee07910bad1147bb - languageName: node - linkType: hard - -"@types/js-yaml@npm:4.0.3": - version: 4.0.3 - resolution: "@types/js-yaml@npm:4.0.3" - checksum: 10/2f5dce3df107970cd0033be75b9e12b25a3640f88b10f64b8935ad23f52192a8a6402f108afaca8ce99360fd2d2ef7da7abfa1b1f6b3bc9430b6d9a9d4f3e496 - languageName: node - linkType: hard - -"@types/js-yaml@npm:4.0.5": - version: 4.0.5 - resolution: "@types/js-yaml@npm:4.0.5" - checksum: 10/6fff5f47d97070f1a01022517ce4bd81a0cfac7cd30f9dbc7222dc5f8db4bfe5f5c8cba3f4b02bdbd6f31f691050db97395b33c8df66d1e7c4f66096b41a3df6 - languageName: node - linkType: hard - -"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.8": - version: 7.0.9 - resolution: "@types/json-schema@npm:7.0.9" - checksum: 10/7ceb41e396240aa69ae15c02ffbb6548ea2bb2f845a7378c711c7c908a9a8438a0330f3135f1ccb6e82e334b9e2ec5b94fb57a1435f2b15362d38e9d5109e5ea - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.12": - version: 7.0.12 - resolution: "@types/json-schema@npm:7.0.12" - checksum: 10/7a72ba9cb7d2b45d7bb032e063c9eeb1ce4102d62551761e84c91f99f8273ba5aaffd34be835869456ec7c40761b4389009d9e777c0020a7227ca0f5e3238e94 - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.15": - version: 7.0.15 - resolution: "@types/json-schema@npm:7.0.15" - checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.4, @types/json-schema@npm:^7.0.5": - version: 7.0.13 - resolution: "@types/json-schema@npm:7.0.13" - checksum: 10/24000f93d34b3848053b8eb36bbbcfb6b465f691d61186ddac9596b6f1fb105ae84a8be63c0c0f3b6d8f7eb6f891f6cdf3c34910aefc756a1971164c4262de1a - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.9": - version: 7.0.11 - resolution: "@types/json-schema@npm:7.0.11" - checksum: 10/e50864a93f4dcb9de64c0c605d836f5416341c824d7a8cde1aa15a5fc68bed44b33cdcb2e04e5098339e9121848378f2d0cc5b124dec41c89203c6f67d6f344a - languageName: node - linkType: hard - -"@types/json-stable-stringify@npm:1.0.33": - version: 1.0.33 - resolution: "@types/json-stable-stringify@npm:1.0.33" - checksum: 10/5fb2b6761d7079396372239366afbb4d454bdf2c78fb26a78214b1c3f7a94e131910b1fe0607aae90f8a49dd71972d8a10d74088145b92d3fcb5b38fb1359e30 - languageName: node - linkType: hard - -"@types/json-stable-stringify@npm:1.0.34": - version: 1.0.34 - resolution: "@types/json-stable-stringify@npm:1.0.34" - checksum: 10/45767ecef0f6aae5680c3be6488d5c493f16046e34f182d7e6a2c69a667aab035799752c6f03017c883b134ad3f80e3f78d7e7da81a9c1f3d01676126baf5d0e - languageName: node - linkType: hard - -"@types/json5@npm:^0.0.29": - version: 0.0.29 - resolution: "@types/json5@npm:0.0.29" - checksum: 10/4e5aed58cabb2bbf6f725da13421aa50a49abb6bc17bfab6c31b8774b073fa7b50d557c61f961a09a85f6056151190f8ac95f13f5b48136ba5841f7d4484ec56 - languageName: node - linkType: hard - -"@types/jsonfile@npm:*": - version: 6.1.3 - resolution: "@types/jsonfile@npm:6.1.3" - dependencies: - "@types/node": "npm:*" - checksum: 10/3f2d0060a567f78b5d666971d5371e72f37294cbfc19069912c76ba9585d209ceb5aac421658f2b3ab922f96b8df53081e9f51d09aef34f2b4882b813a0e0c38 - languageName: node - linkType: hard - -"@types/jsonwebtoken@npm:8.5.4": - version: 8.5.4 - resolution: "@types/jsonwebtoken@npm:8.5.4" - dependencies: - "@types/node": "npm:*" - checksum: 10/9326111efd601ab0594019714182b141ffd6f21fcc8bb565355230daa78baafc06ad5211ea404ca65aae4c353056b17643ebf78659f1535067f56e80eeb9c76f - languageName: node - linkType: hard - -"@types/jsonwebtoken@npm:9.0.0": - version: 9.0.0 - resolution: "@types/jsonwebtoken@npm:9.0.0" - dependencies: - "@types/node": "npm:*" - checksum: 10/f70b26ca2ec2d63a4c5e5e93bdee13aecfc74872361c04a17dacbe8df50a31b592e41f5f37cf6b4937ea42f47b2d8823a417be115a0f87d3db579be3689ecce3 - languageName: node - linkType: hard - -"@types/jsonwebtoken@npm:9.0.6": - version: 9.0.6 - resolution: "@types/jsonwebtoken@npm:9.0.6" - dependencies: - "@types/node": "npm:*" - checksum: 10/1f2145222f62da1b3dbfc586160c4f9685782a671f4a4f4a72151c773945fe25807fd88ed1c270536b76f49053ed932c5dbf714ea0ed77f785665abb75beef05 - languageName: node - linkType: hard - -"@types/jsonwebtoken@npm:^9": - version: 9.0.1 - resolution: "@types/jsonwebtoken@npm:9.0.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/3eaaaf2a372464e88ebc550cc9ac93f067fa615545b348b8488cf57972ff7a2e12977d5766ee45c1dfcce6df8bd333dc3f810f2727934c78edc0048e644a2f52 - languageName: node - linkType: hard - -"@types/jsrsasign@npm:10.5.11": - version: 10.5.11 - resolution: "@types/jsrsasign@npm:10.5.11" - checksum: 10/8cdd592170841660cf63164ad10e3bcc27e38d8afdf1048c96e6f18a1f8edd15e07779e0e8c874705c4815ff3febe51c723ece804ecc69f4b3c6ddda9de5af96 - languageName: node - linkType: hard - -"@types/jsrsasign@npm:10.5.8": - version: 10.5.8 - resolution: "@types/jsrsasign@npm:10.5.8" - checksum: 10/b7e85b458782f90ca1510f9db382722ca4319f8b0a86acdf5955e357dac4ce11b274aef06dc585f7085be822d40d276bfda0d156e8004381a56562b8445fbcea - languageName: node - linkType: hard - -"@types/jsrsasign@npm:8.0.13": - version: 8.0.13 - resolution: "@types/jsrsasign@npm:8.0.13" - checksum: 10/ff7123cf4d46817a08b177d9f42629c70d7ea20c4d49a3ccf8b792a65c50af21235b6c6b2ee5cbe836761421b5a8c01b9f6cc8a3913bc4defce8945c76ee953a - languageName: node - linkType: hard - -"@types/keyv@npm:^3.1.1, @types/keyv@npm:^3.1.4": - version: 3.1.4 - resolution: "@types/keyv@npm:3.1.4" - dependencies: - "@types/node": "npm:*" - checksum: 10/e009a2bfb50e90ca9b7c6e8f648f8464067271fd99116f881073fa6fa76dc8d0133181dd65e6614d5fb1220d671d67b0124aef7d97dc02d7e342ab143a47779d - languageName: node - linkType: hard - -"@types/lodash@npm:4.14.172": - version: 4.14.172 - resolution: "@types/lodash@npm:4.14.172" - checksum: 10/0653e578262d42071b31b3ae349e962d9f18442e5ec7f09894d3b6207995cfbdfef0bdd3917acb90c0ddd22c6eaf72215c84cf118d44a9fdcfafb0faa848882a - languageName: node - linkType: hard - -"@types/lodash@npm:4.14.195": - version: 4.14.195 - resolution: "@types/lodash@npm:4.14.195" - checksum: 10/d7c0902684508a3d0fdb60fe939a855f9f244fd4bf828eb75388a39d00b44e955dac16faea6c90c0ae4592a57784e45ceb6d51354af8dfd401de38046c685775 - languageName: node - linkType: hard - -"@types/long@npm:^4.0.0, @types/long@npm:^4.0.1": - version: 4.0.1 - resolution: "@types/long@npm:4.0.1" - checksum: 10/6eed014270e35eda86f56c9156222cb09945b6e31e0e47e0e5d186a72fa199cb6a55e89aa7c9b44d83f189eb8f4b6b153a0b717f92b2a93e291b79b130ded76b - languageName: node - linkType: hard - -"@types/lru-cache@npm:5.1.1, @types/lru-cache@npm:^5.1.0": - version: 5.1.1 - resolution: "@types/lru-cache@npm:5.1.1" - checksum: 10/0afadefc983306684a8ef95b6337a0d9e3f687e7e89e1f1f3f2e1ce3fbab5b018bb84cf277d781f871175a2c8f0176762b69e58b6f4296ee1b816cea94d5ef06 - languageName: node - linkType: hard - -"@types/madge@npm:5.0.3": - version: 5.0.3 - resolution: "@types/madge@npm:5.0.3" - dependencies: - "@types/node": "npm:*" - checksum: 10/6f09cd5cc9a4074067d50b387899f967e3f84dbe890d69b007f31c4518df2ffca40823e76ab3d9d6438d32f8304a4d5103182b0159ebfb5bc895541d1215672b - languageName: node - linkType: hard - -"@types/methods@npm:^1.1.4": - version: 1.1.4 - resolution: "@types/methods@npm:1.1.4" - checksum: 10/ad2a7178486f2fd167750f3eb920ab032a947ff2e26f55c86670a6038632d790b46f52e5b6ead5823f1e53fc68028f1e9ddd15cfead7903e04517c88debd72b1 - languageName: node - linkType: hard - -"@types/mime@npm:*": - version: 3.0.1 - resolution: "@types/mime@npm:3.0.1" - checksum: 10/4040fac73fd0cea2460e29b348c1a6173da747f3a87da0dbce80dd7a9355a3d0e51d6d9a401654f3e5550620e3718b5a899b2ec1debf18424e298a2c605346e7 - languageName: node - linkType: hard - -"@types/mime@npm:^1": - version: 1.3.2 - resolution: "@types/mime@npm:1.3.2" - checksum: 10/0493368244cced1a69cb791b485a260a422e6fcc857782e1178d1e6f219f1b161793e9f87f5fae1b219af0f50bee24fcbe733a18b4be8fdd07a38a8fb91146fd - languageName: node - linkType: hard - -"@types/minimatch@npm:*, @types/minimatch@npm:^3.0.3, @types/minimatch@npm:^3.0.4": - version: 3.0.5 - resolution: "@types/minimatch@npm:3.0.5" - checksum: 10/c41d136f67231c3131cf1d4ca0b06687f4a322918a3a5adddc87ce90ed9dbd175a3610adee36b106ae68c0b92c637c35e02b58c8a56c424f71d30993ea220b92 - languageName: node - linkType: hard - -"@types/minimist@npm:1.2.2, @types/minimist@npm:^1.2.0, @types/minimist@npm:^1.2.2": - version: 1.2.2 - resolution: "@types/minimist@npm:1.2.2" - checksum: 10/b8da83c66eb4aac0440e64674b19564d9d86c80ae273144db9681e5eeff66f238ade9515f5006ffbfa955ceff8b89ad2bd8ec577d7caee74ba101431fb07045d - languageName: node - linkType: hard - -"@types/morgan@npm:1.9.1": - version: 1.9.1 - resolution: "@types/morgan@npm:1.9.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/e26aa6e60159c1c90845f7fd83cd4a1500a18a4855395bc40f5c89031c5be4b3ee0dcf3796e90beffc530ab26f30c3940c1119f124695d2bafd23cbd7ae1a6e6 - languageName: node - linkType: hard - -"@types/ms@npm:*": - version: 0.7.31 - resolution: "@types/ms@npm:0.7.31" - checksum: 10/6647b295fb2a5b8347c35efabaaed1777221f094be9941d387b4bf11df0eeacb3f8a4e495b8b66ce0e4c00593bc53ab5fc25f01ebb274cd989a834ae578099de - languageName: node - linkType: hard - -"@types/multer@npm:1.4.7": - version: 1.4.7 - resolution: "@types/multer@npm:1.4.7" - dependencies: - "@types/express": "npm:*" - checksum: 10/99988c8643dcfcd44a4a297d79a06126a86e90421daf6aa4bb947ebf3fd33e70b1b8c5277688bdd0025b0cbecceffe259c0933a749896592236261a9f0323cf4 - languageName: node - linkType: hard - -"@types/multer@npm:^1.4.11": - version: 1.4.11 - resolution: "@types/multer@npm:1.4.11" - dependencies: - "@types/express": "npm:*" - checksum: 10/5abbc9a8b0d7bb817a52429c52f052152ebe2fb212e7138359c0c0b9207486ef7b1e54f65915c968300a0874cee546dbfc850415584fc9d14eff2b27bb926e7f - languageName: node - linkType: hard - -"@types/node-fetch@npm:2.6.2": - version: 2.6.2 - resolution: "@types/node-fetch@npm:2.6.2" - dependencies: - "@types/node": "npm:*" - form-data: "npm:^3.0.0" - checksum: 10/8f964e8372f6221e99c9421985bc22b7786db665b886e3db0d17a985faf617c069f49b71c02d93a6585809bd692063f483068abc86a1291cb9762fada4823c21 - languageName: node - linkType: hard - -"@types/node-fetch@npm:2.6.4": - version: 2.6.4 - resolution: "@types/node-fetch@npm:2.6.4" - dependencies: - "@types/node": "npm:*" - form-data: "npm:^3.0.0" - checksum: 10/e904b5f887099a2728979bce9bbae9cc5f851e97a8dc71fe9a6f900798ef0cab761a3027609e70ca73b0bfbd0a9433acdbc052301762eb2d7695d97975746be6 - languageName: node - linkType: hard - -"@types/node-fetch@npm:^2.5.0": - version: 2.6.1 - resolution: "@types/node-fetch@npm:2.6.1" - dependencies: - "@types/node": "npm:*" - form-data: "npm:^3.0.0" - checksum: 10/088cd7de89383f18f21c7dc176f9613f946f7281757c9bb217224b5ee114a46a27a662ea0ae3b59ddf8b7a705066dec8e5109c23ff3c97892abadd9e9974cab2 - languageName: node - linkType: hard - -"@types/node-forge@npm:1.0.1": - version: 1.0.1 - resolution: "@types/node-forge@npm:1.0.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/7d17d252f5bf126f871431e5a5c5d834107ba28b5be68cc70cce13d94774e5bb073774c22c2b5085731e414bc5a42e925aaf8394eb49555cfe63bcb81a0fb900 - languageName: node - linkType: hard - -"@types/node-forge@npm:1.3.0": - version: 1.3.0 - resolution: "@types/node-forge@npm:1.3.0" - dependencies: - "@types/node": "npm:*" - checksum: 10/4d9a27f537415a26eb35a08a86bed54cbb4adb11f4ab5460d51c44402fe89bfe254f32f5c46454a5e19e632bf5f8cefab2e73d02efa25299dca27d3a35b5179e - languageName: node - linkType: hard - -"@types/node-vault@npm:0.9.13": - version: 0.9.13 - resolution: "@types/node-vault@npm:0.9.13" - dependencies: - node-vault: "npm:*" - checksum: 10/598713fdad9e2d9fa389bd6d5bc31767f492b455ff2eaa61b99ade667e312b656c39521d88167deb2e653cb653283a17e5989583c501aa5e1ef8fdd3a85946bc - languageName: node - linkType: hard - -"@types/node@npm:*, @types/node@npm:>=10.0.0, @types/node@npm:>=12.12.47, @types/node@npm:>=13.7.0": - version: 17.0.32 - resolution: "@types/node@npm:17.0.32" - checksum: 10/fb3ef1c19f7134b1e54b3167e6de1b981b9db39ed9efa91767a0d8cc06cc3e64364a3d111a192cbba451bb4c273054e2203aa5784acd19e84e65be99c2741506 - languageName: node - linkType: hard - -"@types/node@npm:18.11.9": - version: 18.11.9 - resolution: "@types/node@npm:18.11.9" - checksum: 10/d87a947519d8c1569b812a95cd18383f7a1500204c18454b69ba817f4aef2a563bb925432debcab25a3db1ba116c8ddb1ef79d8fded054fb3866424847325bae - languageName: node - linkType: hard - -"@types/node@npm:18.15.13": - version: 18.15.13 - resolution: "@types/node@npm:18.15.13" - checksum: 10/b9bbe923573797ef7c5fd2641a6793489e25d9369c32aeadcaa5c7c175c85b42eb12d6fe173f6781ab6f42eaa1ebd9576a419eeaa2a1ec810094adb8adaa9a54 - languageName: node - linkType: hard - -"@types/node@npm:20.4.7": - version: 20.4.7 - resolution: "@types/node@npm:20.4.7" - checksum: 10/63c43283caeaf854853b2a1717754ebb094ea15cd9bb7b93a0a49cc5f5f533d6125986effec1e9bb5d8150c353c76a516bdecc7a74aba20bfde6a78e59952845 - languageName: node - linkType: hard - -"@types/node@npm:^10.1.0": - version: 10.17.60 - resolution: "@types/node@npm:10.17.60" - checksum: 10/f9161493b3284b1d41d5d594c2768625acdd9e33f992f71ccde47861916e662e2ae438d2cc5f1b285053391a31b52a7564ecedc22d485610d236bfad9c7e6a1c - languageName: node - linkType: hard - -"@types/node@npm:^12.12.6": - version: 12.20.55 - resolution: "@types/node@npm:12.20.55" - checksum: 10/1f916a06fff02faadb09a16ed6e31820ce170798b202ef0b14fc244bfbd721938c54a3a99836e185e4414ca461fe96c5bb5c67c3d248f153555b7e6347f061dd - languageName: node - linkType: hard - -"@types/node@npm:^18.0.0": - version: 18.18.5 - resolution: "@types/node@npm:18.18.5" - checksum: 10/a7363aab9f402290799d3e2696fbc70c76a8a65e2354f72b8f399c38edc346f600066f8ac59dde985cfc64160cfeb63ed7fc917aecdfe7ec469345d3ce029bda - languageName: node - linkType: hard - -"@types/node@npm:^18.11.18": - version: 18.17.4 - resolution: "@types/node@npm:18.17.4" - checksum: 10/1cd48b497af7cd6f0fcb3e31bebdc9aaef92178e1888e8842dcadda096f9e133535813e1de0efd981c3314fb3fde5988509d98dfbcec6bd4064467212e7bf878 - languageName: node - linkType: hard - -"@types/normalize-package-data@npm:^2.4.0, @types/normalize-package-data@npm:^2.4.1": - version: 2.4.1 - resolution: "@types/normalize-package-data@npm:2.4.1" - checksum: 10/e87bccbf11f95035c89a132b52b79ce69a1e3652fe55962363063c9c0dae0fe2477ebc585e03a9652adc6f381d24ba5589cc5e51849df4ced3d3e004a7d40ed5 - languageName: node - linkType: hard - -"@types/normalize-package-data@npm:^2.4.3": - version: 2.4.4 - resolution: "@types/normalize-package-data@npm:2.4.4" - checksum: 10/65dff72b543997b7be8b0265eca7ace0e34b75c3e5fee31de11179d08fa7124a7a5587265d53d0409532ecb7f7fba662c2012807963e1f9b059653ec2c83ee05 - languageName: node - linkType: hard - -"@types/oauth@npm:*": - version: 0.9.1 - resolution: "@types/oauth@npm:0.9.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/cd83c34b2f2de2815fbbd763f1a8f7816711d5e35a0830f94d51186500a32f49471bcbdf3dc2b59796aea7d57677e11385920ff99b7a0ca3b37cc4a03f6423ed - languageName: node - linkType: hard - -"@types/parse-json@npm:^4.0.0": - version: 4.0.0 - resolution: "@types/parse-json@npm:4.0.0" - checksum: 10/4df9de98150d2978afc2161482a3a8e6617883effba3223324f079de97ba7eabd7d84b90ced11c3f82b0c08d4a8383f678c9f73e9c41258f769b3fa234a2bb4f - languageName: node - linkType: hard - -"@types/passport-oauth2@npm:1.4.11": - version: 1.4.11 - resolution: "@types/passport-oauth2@npm:1.4.11" - dependencies: - "@types/express": "npm:*" - "@types/oauth": "npm:*" - "@types/passport": "npm:*" - checksum: 10/09d047a6c09a05c036f7db0cf8f8c09bf5878fdd15949bb1baa09a35f439929d471048fa6595f09ea4a4ea25396ce3918b362136579cf4a2b2ee29a92c0dd1ce - languageName: node - linkType: hard - -"@types/passport-saml@npm:1.1.3": - version: 1.1.3 - resolution: "@types/passport-saml@npm:1.1.3" - dependencies: - "@types/express": "npm:*" - "@types/passport": "npm:*" - checksum: 10/1d0abc04b1f19c043f9dd311248d3d98b00b311ed6d2cfa6cb17ef0954d0b403de4ccca4f1be192cbfda92105eb799c7963da6f39e4542ca254b06d5c467ed4a - languageName: node - linkType: hard - -"@types/passport-strategy@npm:0.2.35": - version: 0.2.35 - resolution: "@types/passport-strategy@npm:0.2.35" - dependencies: - "@types/express": "npm:*" - "@types/passport": "npm:*" - checksum: 10/3fa0e72099b3fd5dbad59609076fe06a5dca327e5fd487be44665dcf1bdbdae6b13ac0df5fed4632b781d2725e50ff466111bf9e7e63e91df39de3de92748cbc - languageName: node - linkType: hard - -"@types/passport@npm:*, @types/passport@npm:1.0.7": - version: 1.0.7 - resolution: "@types/passport@npm:1.0.7" - dependencies: - "@types/express": "npm:*" - checksum: 10/af24d9984ceef503f2a5472d87930e1be5717b4e595bbc74248160136ee262741d0bcca8773d221bd224dea3b9aeb804030ddbbab689a2803dfc4d2bf8ad2080 - languageName: node - linkType: hard - -"@types/pbkdf2@npm:^3.0.0": - version: 3.1.0 - resolution: "@types/pbkdf2@npm:3.1.0" - dependencies: - "@types/node": "npm:*" - checksum: 10/d15024b1957c21cf3b8887329d9bd8dfde754cf13a09d76ae25f1391cfc62bb8b8d7b760773c5dbaa748172fba8b3e0c3dbe962af6ccbd69b76df12a48dfba40 - languageName: node - linkType: hard - -"@types/pg@npm:8.6.5": - version: 8.6.5 - resolution: "@types/pg@npm:8.6.5" - dependencies: - "@types/node": "npm:*" - pg-protocol: "npm:*" - pg-types: "npm:^2.2.0" - checksum: 10/a64da7168842bb4c907cceb9ed1253ddc69d4caf5e6f01c79b453c22187cb6488f356bec287a9f1a6c67729fd1c3532632bb439fa7618feb026149c70fdfb4d5 - languageName: node - linkType: hard - -"@types/phoenix@npm:^1.5.4": - version: 1.6.0 - resolution: "@types/phoenix@npm:1.6.0" - checksum: 10/715d9b9c6e57d6cd32e2260bf51301954a7ec346d51e091de3c579314c9eb6f0d69a8d43b7aae49a0aa280982765fb8c2cce6109a38ca5db3e82697547d0f3db - languageName: node - linkType: hard - -"@types/prettier@npm:^2.1.5": - version: 2.7.3 - resolution: "@types/prettier@npm:2.7.3" - checksum: 10/cda84c19acc3bf327545b1ce71114a7d08efbd67b5030b9e8277b347fa57b05178045f70debe1d363ff7efdae62f237260713aafc2d7217e06fc99b048a88497 - languageName: node - linkType: hard - -"@types/prop-types@npm:*": - version: 15.7.4 - resolution: "@types/prop-types@npm:15.7.4" - checksum: 10/ef6e1899e59b876c273811b1bd845022fc66d5a3d11cb38a25b6c566b30514ae38fe20a40f67622f362a4f4f7f9224e22d8da101cff3d6e97e11d7b4c307cfc1 - languageName: node - linkType: hard - -"@types/prop-types@npm:^15.7.11": - version: 15.7.11 - resolution: "@types/prop-types@npm:15.7.11" - checksum: 10/7519ff11d06fbf6b275029fe03fff9ec377b4cb6e864cac34d87d7146c7f5a7560fd164bdc1d2dbe00b60c43713631251af1fd3d34d46c69cd354602bc0c7c54 - languageName: node - linkType: hard - -"@types/q@npm:^1.5.1": - version: 1.5.5 - resolution: "@types/q@npm:1.5.5" - checksum: 10/37bb27dbd602650577052a3c1ee749b0d027caa6ff06ea307f3f2012ee64fa5740e9bf5fe548c8377f319797a5ecb28a602fb2be977339bc9e035f42d91601a3 - languageName: node - linkType: hard - -"@types/qs@npm:*": - version: 6.9.7 - resolution: "@types/qs@npm:6.9.7" - checksum: 10/7fd6f9c25053e9b5bb6bc9f9f76c1d89e6c04f7707a7ba0e44cc01f17ef5284adb82f230f542c2d5557d69407c9a40f0f3515e8319afd14e1e16b5543ac6cdba - languageName: node - linkType: hard - -"@types/qs@npm:6.9.14": - version: 6.9.14 - resolution: "@types/qs@npm:6.9.14" - checksum: 10/d3b76021d36b86c0063ec4b7373e9fa470754914e486fbfe54b3a8866dad037800a2c2068ecbcaa9399ae3ed15772a26b07e67793ed2519cf2de199104014716 - languageName: node - linkType: hard - -"@types/range-parser@npm:*": - version: 1.2.4 - resolution: "@types/range-parser@npm:1.2.4" - checksum: 10/b7c0dfd5080a989d6c8bb0b6750fc0933d9acabeb476da6fe71d8bdf1ab65e37c136169d84148034802f48378ab94e3c37bb4ef7656b2bec2cb9c0f8d4146a95 - languageName: node - linkType: hard - -"@types/react-dom@npm:18.2.17, @types/react-dom@npm:^18.0.0, @types/react-dom@npm:^18.2.17": - version: 18.2.17 - resolution: "@types/react-dom@npm:18.2.17" - dependencies: - "@types/react": "npm:*" - checksum: 10/fe0dbb3224b48515da8fe25559e3777d756a27c3f22903f0b1b020de8d68bd57eb1f0af62b52ee65d9632637950afed8cbad24d158c4f3d910d083d49bd73fba - languageName: node - linkType: hard - -"@types/react-transition-group@npm:^4.4.10": - version: 4.4.10 - resolution: "@types/react-transition-group@npm:4.4.10" - dependencies: - "@types/react": "npm:*" - checksum: 10/b429f3bd54d9aea6c0395943ce2dda6b76fb458e902365bd91fd99bf72064fb5d59e2b74e78d10f2871908501d350da63e230d81bda2b616c967cab8dc51bd16 - languageName: node - linkType: hard - -"@types/react-transition-group@npm:^4.4.9": - version: 4.4.9 - resolution: "@types/react-transition-group@npm:4.4.9" - dependencies: - "@types/react": "npm:*" - checksum: 10/74ed0985380544bd1d63d8865a452a859ed7122b35dd2cf919fa7d1f31936345671995d36c89263456f27dbb5940eac8d4607be969e27187102eecff1cc64ba3 - languageName: node - linkType: hard - -"@types/react@npm:*": - version: 18.2.21 - resolution: "@types/react@npm:18.2.21" - dependencies: - "@types/prop-types": "npm:*" - "@types/scheduler": "npm:*" - csstype: "npm:^3.0.2" - checksum: 10/7b315e2b14da1cd895719ba957fd71a0a8a35300fd76689d0268ed9afd8065a56b4fdcd1306871e3e16706dd3ecd706a846af74caca8fcad88052469cf0d83a1 - languageName: node - linkType: hard - -"@types/react@npm:18.2.43": - version: 18.2.43 - resolution: "@types/react@npm:18.2.43" - dependencies: - "@types/prop-types": "npm:*" - "@types/scheduler": "npm:*" - csstype: "npm:^3.0.2" - checksum: 10/a9d90a93380bb67623f27eba83e2d05b548109f7eb6fd591f5c4a3716bc257cc7cb078455db7ea4308d5f2ff6b4fe48d9a4a560145d9384069a2b5121bc93937 - languageName: node - linkType: hard - -"@types/react@npm:^17.0.52": - version: 17.0.62 - resolution: "@types/react@npm:17.0.62" - dependencies: - "@types/prop-types": "npm:*" - "@types/scheduler": "npm:*" - csstype: "npm:^3.0.2" - checksum: 10/62cff105fef4270c4ad0d1a1ff9bf6dfb1f2d4e25ad9d20202e82e9748d1a660790dc94240621a9994273b80050e6481e13533ad7e1f8522f5c839f88955d273 - languageName: node - linkType: hard - -"@types/react@npm:^18.2.39": - version: 18.2.39 - resolution: "@types/react@npm:18.2.39" - dependencies: - "@types/prop-types": "npm:*" - "@types/scheduler": "npm:*" - csstype: "npm:^3.0.2" - checksum: 10/870f7774c676ae0f3ab6339a62b3315f5a296e89412358b15a5249a61e781a8807a2253ef7ad2ec98e7a5bea1e8c3ddd95b02226d6b8ac4a085da59b4a496564 - languageName: node - linkType: hard - -"@types/readable-stream@npm:^2.3.13": - version: 2.3.15 - resolution: "@types/readable-stream@npm:2.3.15" - dependencies: - "@types/node": "npm:*" - safe-buffer: "npm:~5.1.1" - checksum: 10/49b51e56f9cc401cb31c72973a7565ef4208d7e2465a789843104ec0fcbe609727b0b5bf4682fbec773c7f7bd14858e5dba739fd85e14d8a85e41185d65984d3 - languageName: node - linkType: hard - -"@types/readable-stream@npm:^4.0.0": - version: 4.0.15 - resolution: "@types/readable-stream@npm:4.0.15" - dependencies: - "@types/node": "npm:*" - safe-buffer: "npm:~5.1.1" - checksum: 10/33a273dcd74bec84f0d7d507c0d719487f9d0b4f48cd9e3fd2b0c6e848f23ce0c6cac1250be03c94df29e78cfd29940aae80ed2a4407fe4188eb959d15b32646 - languageName: node - linkType: hard - -"@types/request@npm:2.48.7": - version: 2.48.7 - resolution: "@types/request@npm:2.48.7" - dependencies: - "@types/caseless": "npm:*" - "@types/node": "npm:*" - "@types/tough-cookie": "npm:*" - form-data: "npm:^2.5.0" - checksum: 10/fdc53acaf55ce2126b7d3c4361751a1cd8e7b3d36546b6aa963fad42765f798812120459807be9e1d959c85569a0cd8f466906398b9365206c59a45a789e6c81 - languageName: node - linkType: hard - -"@types/request@npm:^2.48.8": - version: 2.48.11 - resolution: "@types/request@npm:2.48.11" - dependencies: - "@types/caseless": "npm:*" - "@types/node": "npm:*" - "@types/tough-cookie": "npm:*" - form-data: "npm:^2.5.0" - checksum: 10/50212efbe4916edb78758f6cbf8f5ff5417e3271f526fcc6be01004582c588a699c8e0c91cdb8c8c06244d3a10ca9febf9fcb9f487799c76223ff77ecd2782a9 - languageName: node - linkType: hard - -"@types/resolve@npm:1.17.1": - version: 1.17.1 - resolution: "@types/resolve@npm:1.17.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/dc6a6df507656004e242dcb02c784479deca516d5f4b58a1707e708022b269ae147e1da0521f3e8ad0d63638869d87e0adc023f0bd5454aa6f72ac66c7525cf5 - languageName: node - linkType: hard - -"@types/responselike@npm:^1.0.0": - version: 1.0.2 - resolution: "@types/responselike@npm:1.0.2" - dependencies: - "@types/node": "npm:*" - checksum: 10/ff1767e947eb7d49849e4566040453efcd894888e85b398f7f8cb731552f303f26aceda573b680a142b77ec5fb6c79535d9c6d047d9f936c386dbf3863d2ae17 - languageName: node - linkType: hard - -"@types/retry@npm:0.12.0": - version: 0.12.0 - resolution: "@types/retry@npm:0.12.0" - checksum: 10/bbd0b88f4b3eba7b7acfc55ed09c65ef6f2e1bcb4ec9b4dca82c66566934351534317d294a770a7cc6c0468d5573c5350abab6e37c65f8ef254443e1b028e44d - languageName: node - linkType: hard - -"@types/retry@npm:^0.12.0": - version: 0.12.1 - resolution: "@types/retry@npm:0.12.1" - checksum: 10/5f46b2556053655f78262bb33040dc58417c900457cc63ff37d6c35349814471453ef511af0cec76a540c601296cd2b22f64bab1ab649c0dacc0223765ba876c - languageName: node - linkType: hard - -"@types/sanitize-html@npm:2.6.2": - version: 2.6.2 - resolution: "@types/sanitize-html@npm:2.6.2" - dependencies: - htmlparser2: "npm:^6.0.0" - checksum: 10/08b43427427cbd8acd2843bbf9e00576c06e3916fc523d27fd9016f39563f7999f78b632ff473ef83a77f86bdea9286de2f81e3a8f8a05af6721687651c84f1c - languageName: node - linkType: hard - -"@types/sanitize-html@npm:2.9.5": - version: 2.9.5 - resolution: "@types/sanitize-html@npm:2.9.5" - dependencies: - htmlparser2: "npm:^8.0.0" - checksum: 10/fd0afee5dac91aa2c42391f0c8c9254204f4ee1f10b902aa04e8f7809043d785e28af2732f75277ef09e46838013ad60abedb02ba1424b6218264f3333437fb5 - languageName: node - linkType: hard - -"@types/scheduler@npm:*": - version: 0.16.2 - resolution: "@types/scheduler@npm:0.16.2" - checksum: 10/b6b4dcfeae6deba2e06a70941860fb1435730576d3689225a421280b7742318d1548b3d22c1f66ab68e414f346a9542f29240bc955b6332c5b11e561077583bc - languageName: node - linkType: hard - -"@types/secp256k1@npm:4.0.3, @types/secp256k1@npm:^4.0.1": - version: 4.0.3 - resolution: "@types/secp256k1@npm:4.0.3" - dependencies: - "@types/node": "npm:*" - checksum: 10/aa8176f3fb9a9f37189592425cb6bfec4ffcf3dc397f2bfd8e3acd06be25f5213cbc0df01f541c7cc955b906a61befd5c1092d46adc62e489970bfebf4409e1d - languageName: node - linkType: hard - -"@types/seedrandom@npm:3.0.1": - version: 3.0.1 - resolution: "@types/seedrandom@npm:3.0.1" - checksum: 10/d9755452f224a4f5072a1d8738da6c9de3039fc59a2a449b1f658e51087be7b48ada49bcabc8b0f16633c095f55598c32fcd072c448858422a2f6a0566569e4c - languageName: node - linkType: hard - -"@types/semver@npm:7.3.8": - version: 7.3.8 - resolution: "@types/semver@npm:7.3.8" - checksum: 10/222494c8bfc8defe2683d34ebd03df44502cd0bf481cebe5e686a1ce03674f4aaf43c5016364b2c2b9f44817ba9fd5f0433e349ff93901e473d9986aedb74852 - languageName: node - linkType: hard - -"@types/semver@npm:^7.3.12, @types/semver@npm:^7.5.0": - version: 7.5.0 - resolution: "@types/semver@npm:7.5.0" - checksum: 10/8fbfbf79e9c14c3c20160a42145a146cba44d9763d0fac78358b394dc36e41bc2590bc4f0129c6fcbbc9b30f12ea1ba821bfe84b29dc80897f315cc7dd251393 - languageName: node - linkType: hard - -"@types/send@npm:*": - version: 0.17.4 - resolution: "@types/send@npm:0.17.4" - dependencies: - "@types/mime": "npm:^1" - "@types/node": "npm:*" - checksum: 10/28320a2aa1eb704f7d96a65272a07c0bf3ae7ed5509c2c96ea5e33238980f71deeed51d3631927a77d5250e4091b3e66bce53b42d770873282c6a20bb8b0280d - languageName: node - linkType: hard - -"@types/serve-index@npm:^1.9.1": - version: 1.9.1 - resolution: "@types/serve-index@npm:1.9.1" - dependencies: - "@types/express": "npm:*" - checksum: 10/026f3995fb500f6df7c3fe5009e53bad6d739e20b84089f58ebfafb2f404bbbb6162bbe33f72d2f2af32d5b8d3799c8e179793f90d9ed5871fb8591190bb6056 - languageName: node - linkType: hard - -"@types/serve-static@npm:*": - version: 1.13.10 - resolution: "@types/serve-static@npm:1.13.10" - dependencies: - "@types/mime": "npm:^1" - "@types/node": "npm:*" - checksum: 10/62b4e79cb049a5ed81789e2cdd8b91e289eb03b08130c249d74c8fd6d32840cffc6b50384c1ccd2ef0ecf306fe1188634fd9a8bce4339acd4bcc19ed16b2a0c3 - languageName: node - linkType: hard - -"@types/serve-static@npm:^1.13.10": - version: 1.15.2 - resolution: "@types/serve-static@npm:1.15.2" - dependencies: - "@types/http-errors": "npm:*" - "@types/mime": "npm:*" - "@types/node": "npm:*" - checksum: 10/d5f8f5aaa765be6417aa3f2ebe36591f4e9d2d8a7480edf7d3db041427420fd565cb921fc021271098dd2afafce2b443fc0d978faa3ae21a2a58ebde7d525e9e - languageName: node - linkType: hard - -"@types/shelljs@npm:0.8.11": - version: 0.8.11 - resolution: "@types/shelljs@npm:0.8.11" - dependencies: - "@types/glob": "npm:*" - "@types/node": "npm:*" - checksum: 10/0b890fcddd25f33326b8b23558a91378b298e6e36ae6525fa6f8715791547b8432775e4640fbaee23717314fe4db7d93e24307f46ef31270e69c762685899001 - languageName: node - linkType: hard - -"@types/sockjs@npm:^0.3.33": - version: 0.3.33 - resolution: "@types/sockjs@npm:0.3.33" - dependencies: - "@types/node": "npm:*" - checksum: 10/b9bbb2b5c5ead2fb884bb019f61a014e37410bddd295de28184e1b2e71ee6b04120c5ba7b9954617f0bdf962c13d06249ce65004490889c747c80d3f628ea842 - languageName: node - linkType: hard - -"@types/ssh2-streams@npm:*, @types/ssh2-streams@npm:0.1.9": - version: 0.1.9 - resolution: "@types/ssh2-streams@npm:0.1.9" - dependencies: - "@types/node": "npm:*" - checksum: 10/fe1933f04ad39344ef25b10bcbcab24ac5cc65c4896fa27ba96983104eba06723a696bceaa83a4822998438af761cc0fc1151459c9eab8c723e0696eb31b352d - languageName: node - linkType: hard - -"@types/ssh2@npm:*": - version: 0.5.51 - resolution: "@types/ssh2@npm:0.5.51" - dependencies: - "@types/node": "npm:*" - "@types/ssh2-streams": "npm:*" - checksum: 10/730aade59a7a79078d9ab620c29b8be488b117d998571522a5264718c00e68179c23ed9fc7d652a813f16544ecf7f4f2167a1a6ed1f4345571061febac74ee5d - languageName: node - linkType: hard - -"@types/ssh2@npm:0.5.44": - version: 0.5.44 - resolution: "@types/ssh2@npm:0.5.44" - dependencies: - "@types/node": "npm:*" - "@types/ssh2-streams": "npm:*" - checksum: 10/7c091e9a18724bcc4dfbf98de761ff8554700e8a88923aa71b312be2fd73e31ef639b8a7e2b91a3cad05c5f0cdc178021865b49cab8a7685483fdf5ba456ea2a - languageName: node - linkType: hard - -"@types/ssh2@npm:0.5.47": - version: 0.5.47 - resolution: "@types/ssh2@npm:0.5.47" - dependencies: - "@types/node": "npm:*" - "@types/ssh2-streams": "npm:*" - checksum: 10/9dea0db5f1dc1fd136c85b973457a6dd3854e4bea9da2b65cb22601cb10367f67307efeb1b24c810afe55a720bcb4e0af09976fde04d90457035d6615529846e - languageName: node - linkType: hard - -"@types/ssh2@npm:^1.11.9": - version: 1.11.13 - resolution: "@types/ssh2@npm:1.11.13" - dependencies: - "@types/node": "npm:^18.11.18" - checksum: 10/424b25e0f81c37ce9f10ceef35a3fbb08dcc3c16a4bf1fecabd1ac84d14d335d772acb61fa2aaaa7c183d98c66acb6bb9f0496ec0196ccbbff30e50e6c1cda4b - languageName: node - linkType: hard - -"@types/stack-utils@npm:^2.0.0": - version: 2.0.1 - resolution: "@types/stack-utils@npm:2.0.1" - checksum: 10/205fdbe3326b7046d7eaf5e494d8084f2659086a266f3f9cf00bccc549c8e36e407f88168ad4383c8b07099957ad669f75f2532ed4bc70be2b037330f7bae019 - languageName: node - linkType: hard - -"@types/superagent@npm:*": - version: 8.1.4 - resolution: "@types/superagent@npm:8.1.4" - dependencies: - "@types/cookiejar": "npm:^2.1.5" - "@types/methods": "npm:^1.1.4" - "@types/node": "npm:*" - checksum: 10/06ec4510ca396b73f8271a14c62bbbe8aef80991531bcc4eb1ef7de3e6ac88e677050fbf7da16d8838f9e57d55a20d9a308824adf99b4382849eaae47f0e7035 - languageName: node - linkType: hard - -"@types/supertest@npm:2.0.11": - version: 2.0.11 - resolution: "@types/supertest@npm:2.0.11" - dependencies: - "@types/superagent": "npm:*" - checksum: 10/291abc0d37abe833d517fcfd0c22d51e7d5ffea85ce990603a0d058afa7fe2465b1251d50642ddfd640f66d047029af512793215b612c39adbee72fae5b2ef4f - languageName: node - linkType: hard - -"@types/tape-promise@npm:4.0.1": - version: 4.0.1 - resolution: "@types/tape-promise@npm:4.0.1" - dependencies: - "@types/tape": "npm:*" - checksum: 10/3dfc88b00ccebe645e9390d16237cac4449593c352b66be07c8b1793df17f011b24ab3e5950f5f88f110075252fb7d300e5856c1589984412651100a303f7f97 - languageName: node - linkType: hard - -"@types/tape@npm:*": - version: 4.13.2 - resolution: "@types/tape@npm:4.13.2" - dependencies: - "@types/node": "npm:*" - checksum: 10/c45331cf1098ad3b7aa128b43aef2b2cc6a26f3690c1b5df8ab10009323acb155258d52d5502544a25c103353170d23d084d695410b22110376e11a7a190ecd6 - languageName: node - linkType: hard - -"@types/tape@npm:4.13.4": - version: 4.13.4 - resolution: "@types/tape@npm:4.13.4" - dependencies: - "@types/node": "npm:*" - "@types/through": "npm:*" - checksum: 10/2b5e230ec85ce3a9d451f2825b550e5db94a054573dcb18c07d8c5fe1dc2261c06b56eaa3496e9aa494e6c905767867e18eb77828d7015afdb0293fc55967927 - languageName: node - linkType: hard - -"@types/tar-stream@npm:2.2.1": - version: 2.2.1 - resolution: "@types/tar-stream@npm:2.2.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/b9e54720a9b5eeb1c3aa119b4a11188c07350e2580a2ba48ccb3aaac645057407dd3bb3296ccf8835305a10eebd78f7b3ff3bf9222e3065361a20cdd5df0812a - languageName: node - linkType: hard - -"@types/temp@npm:0.9.1": - version: 0.9.1 - resolution: "@types/temp@npm:0.9.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/b376c1022ba60689eebc2d1ed7f6ad8a598539f347e073356886b0bd987793d062c7e84ea5778f13b1c8e92b667f5e1ef774ca2d4d41a98fea8313fe848e9da9 - languageName: node - linkType: hard - -"@types/testing-library__jest-dom@npm:^5.9.1": - version: 5.14.9 - resolution: "@types/testing-library__jest-dom@npm:5.14.9" - dependencies: - "@types/jest": "npm:*" - checksum: 10/e257de95a4a9385cc09ae4ca3396d23ad4b5cfb8e021a1ca3454c424c34636075f6fe151b2f881f79bf9d497aa04fbfae62449b135f293e8d2d614fa899898a8 - languageName: node - linkType: hard - -"@types/through@npm:*": - version: 0.0.30 - resolution: "@types/through@npm:0.0.30" - dependencies: - "@types/node": "npm:*" - checksum: 10/9578470db0b527c26e246a1220ae9bffc6bf47f20f89c54aac467c083ab1f7e16c00d9a7b4bb6cb4e2dfae465027270827e5908a6236063f6214625e50585d78 - languageName: node - linkType: hard - -"@types/tough-cookie@npm:*": - version: 4.0.1 - resolution: "@types/tough-cookie@npm:4.0.1" - checksum: 10/795178f8ba0155ff7f7449101c0cb2f38922b9981c504baa8b132defd98c189dd8d17a861e8123c4430423e8b71e1380735a69111e55611461a22e8ba2657415 - languageName: node - linkType: hard - -"@types/trusted-types@npm:^2.0.2": - version: 2.0.3 - resolution: "@types/trusted-types@npm:2.0.3" - checksum: 10/4794804bc4a4a173d589841b6d26cf455ff5dc4f3e704e847de7d65d215f2e7043d8757e4741ce3a823af3f08260a8d04a1a6e9c5ec9b20b7b04586956a6b005 - languageName: node - linkType: hard - -"@types/tunnel@npm:^0.0.3": - version: 0.0.3 - resolution: "@types/tunnel@npm:0.0.3" - dependencies: - "@types/node": "npm:*" - checksum: 10/53e23a1f9fb14a491c00425b2a4fc443817564d77be5e1b95fcbeb6d009551b62ea82ffc3e5ca0c6b9f6b186824ca6ec46e7450c1bcd6674a46d1325f0116e24 - languageName: node - linkType: hard - -"@types/uuid@npm:10.0.0": - version: 10.0.0 - resolution: "@types/uuid@npm:10.0.0" - checksum: 10/e3958f8b0fe551c86c14431f5940c3470127293280830684154b91dc7eb3514aeb79fe3216968833cf79d4d1c67f580f054b5be2cd562bebf4f728913e73e944 - languageName: node - linkType: hard - -"@types/validator@npm:^13.7.10": - version: 13.11.7 - resolution: "@types/validator@npm:13.11.7" - checksum: 10/5935d363a9a6099ee6a2100ae3be46d9d1f113dbea16e03b627b48b2f746f01100535febc564d215a7054dd9a632ec0cda10ecd6a75d088e3e38834290fb76f6 - languageName: node - linkType: hard - -"@types/ws@npm:8.5.3, @types/ws@npm:^8.2.2": - version: 8.5.3 - resolution: "@types/ws@npm:8.5.3" - dependencies: - "@types/node": "npm:*" - checksum: 10/08aac698ce6480b532d8311f790a8744ae489ccdd98f374cfe4b8245855439825c64b031abcbba4f30fb280da6cc2b02a4e261e16341d058ffaeecaa24ba2bd3 - languageName: node - linkType: hard - -"@types/ws@npm:^8.5.4": - version: 8.5.8 - resolution: "@types/ws@npm:8.5.8" - dependencies: - "@types/node": "npm:*" - checksum: 10/5f33608d1afa38236f0c0c6e153555d94d8ff74f54a21d1c062f4a93f0cb8c1aaecd6f11f0dd9a41774f79b1c56235aaccaad290e57f69350ccc9bd47c63b040 - languageName: node - linkType: hard - -"@types/ws@npm:^8.5.5": - version: 8.5.5 - resolution: "@types/ws@npm:8.5.5" - dependencies: - "@types/node": "npm:*" - checksum: 10/b2d7da5bd469c2ff1ddcfba1da33a556dc02c539e727001e7dc7b4182935154143e96a101cc091686acefb4e115c8ee38111c6634934748b8dd2db0c851c50ab - languageName: node - linkType: hard - -"@types/xml2js@npm:0.4.9": - version: 0.4.9 - resolution: "@types/xml2js@npm:0.4.9" - dependencies: - "@types/node": "npm:*" - checksum: 10/8803fc10c11382b00b4791b237d79bb128726de35b5d5194ab27e106f558d22e8a66d893b64c73de3184b4ca7e02be24b9f56f4c976de7e5be247e7b497a4a25 - languageName: node - linkType: hard - -"@types/yargs-parser@npm:*": - version: 20.2.1 - resolution: "@types/yargs-parser@npm:20.2.1" - checksum: 10/08b67730b36ec5af0b429d8bd7cd2cd7d5586ec9fd7f9f935a64bc4e1235eae63054b40ec648705462d81472b0ffbd67a5854e0d38311d9e4c5b6009dfe3d3fd - languageName: node - linkType: hard - -"@types/yargs@npm:17.0.24": - version: 17.0.24 - resolution: "@types/yargs@npm:17.0.24" - dependencies: - "@types/yargs-parser": "npm:*" - checksum: 10/03d9a985cb9331b2194a52d57a66aad88bf46aa32b3968a71cc6f39fb05c74f0709f0dd3aa9c0b29099cfe670343e3b1bd2ac6df2abfab596ede4453a616f63f - languageName: node - linkType: hard - -"@types/yargs@npm:^16.0.0": - version: 16.0.6 - resolution: "@types/yargs@npm:16.0.6" - dependencies: - "@types/yargs-parser": "npm:*" - checksum: 10/a1908b4344d34b918bb99b6157b3ee87f8441dc6d697c7787b779374d9118f69d979a93a44eec134ff20f25479d1fa460caac3d5a8e66e4af09c2cb261d2352d - languageName: node - linkType: hard - -"@types/yargs@npm:^17.0.2": - version: 17.0.8 - resolution: "@types/yargs@npm:17.0.8" - dependencies: - "@types/yargs-parser": "npm:*" - checksum: 10/3c062686a4741a9b53b75c9d602e366c34f49e372453028e526b9c576686b322bea0682cb086547b66c99c72ee3fe48df793e8bf0a86e168cda044c5b9107529 - languageName: node - linkType: hard - -"@types/yargs@npm:^17.0.8": - version: 17.0.10 - resolution: "@types/yargs@npm:17.0.10" - dependencies: - "@types/yargs-parser": "npm:*" - checksum: 10/cfe94e8ba50364e08d7b3ecb10a7c153762d0e56c571079538bb06b306638d1045e395fc5a745b94519e73798779c761fa386ec13c82306a62349f64d7b9eec1 - languageName: node - linkType: hard - -"@types/yoga-layout@npm:1.9.2": - version: 1.9.2 - resolution: "@types/yoga-layout@npm:1.9.2" - checksum: 10/3cbcab36d9e19d077cc2bc956d3182dc26f35f13f8fcf01648717bcba412be7ed3c4b6f43c4f8f201ea815160d0cb2b96e82698c4b43d4a179c5603a7725f34e - languageName: node - linkType: hard - -"@typescript-eslint/eslint-plugin@npm:7.1.0": - version: 7.1.0 - resolution: "@typescript-eslint/eslint-plugin@npm:7.1.0" - dependencies: - "@eslint-community/regexpp": "npm:^4.5.1" - "@typescript-eslint/scope-manager": "npm:7.1.0" - "@typescript-eslint/type-utils": "npm:7.1.0" - "@typescript-eslint/utils": "npm:7.1.0" - "@typescript-eslint/visitor-keys": "npm:7.1.0" - debug: "npm:^4.3.4" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.4" - natural-compare: "npm:^1.4.0" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" - peerDependencies: - "@typescript-eslint/parser": ^7.0.0 - eslint: ^8.56.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/f0b6b6e6ae2afee1df8dd2fd0c56588f9bb600468be9f255e033709a53371c6434da687e75dcb673503ef4f0416226f4ca3c94c65272828106e39b56aac87334 - languageName: node - linkType: hard - -"@typescript-eslint/eslint-plugin@npm:^5.5.0": - version: 5.62.0 - resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0" - dependencies: - "@eslint-community/regexpp": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:5.62.0" - "@typescript-eslint/type-utils": "npm:5.62.0" - "@typescript-eslint/utils": "npm:5.62.0" - debug: "npm:^4.3.4" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.0" - natural-compare-lite: "npm:^1.4.0" - semver: "npm:^7.3.7" - tsutils: "npm:^3.21.0" - peerDependencies: - "@typescript-eslint/parser": ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/9cc8319c6fd8a21938f5b69476974a7e778c283a55ef9fad183c850995b9adcb0087d57cea7b2ac6b9449570eee983aad39491d14cdd2e52d6b4b0485e7b2482 - languageName: node - linkType: hard - -"@typescript-eslint/experimental-utils@npm:^5.0.0": - version: 5.62.0 - resolution: "@typescript-eslint/experimental-utils@npm:5.62.0" - dependencies: - "@typescript-eslint/utils": "npm:5.62.0" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10/ce55d9f74eac5cb94d66d5db9ead9a5d734f4301519fb5956a57f4b405a5318a115b0316195a3c039e0111489138680411709cb769085d71e1e1db1376ea0949 - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:7.1.0": - version: 7.1.0 - resolution: "@typescript-eslint/parser@npm:7.1.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:7.1.0" - "@typescript-eslint/types": "npm:7.1.0" - "@typescript-eslint/typescript-estree": "npm:7.1.0" - "@typescript-eslint/visitor-keys": "npm:7.1.0" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^8.56.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/39238d37f5a5f7058371ee3882fb7cd8a4579883fc5f13fda645c151fcf8d15e4c0db3ea7ffa7915a55c82451b544e9340c0228b45b83085158cb97974112f19 - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:^5.5.0": - version: 5.62.0 - resolution: "@typescript-eslint/parser@npm:5.62.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:5.62.0" - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/typescript-estree": "npm:5.62.0" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/b6ca629d8f4e6283ff124501731cc886703eb4ce2c7d38b3e4110322ea21452b9d9392faf25be6bd72f54b89de7ffc72a40d9b159083ac54345a3d04b4fa5394 - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/scope-manager@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - checksum: 10/e827770baa202223bc0387e2fd24f630690809e460435b7dc9af336c77322290a770d62bd5284260fa881c86074d6a9fd6c97b07382520b115f6786b8ed499da - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:6.21.0": - version: 6.21.0 - resolution: "@typescript-eslint/scope-manager@npm:6.21.0" - dependencies: - "@typescript-eslint/types": "npm:6.21.0" - "@typescript-eslint/visitor-keys": "npm:6.21.0" - checksum: 10/fe91ac52ca8e09356a71dc1a2f2c326480f3cccfec6b2b6d9154c1a90651ab8ea270b07c67df5678956c3bbf0bbe7113ab68f68f21b20912ea528b1214197395 - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:7.1.0": - version: 7.1.0 - resolution: "@typescript-eslint/scope-manager@npm:7.1.0" - dependencies: - "@typescript-eslint/types": "npm:7.1.0" - "@typescript-eslint/visitor-keys": "npm:7.1.0" - checksum: 10/3fb18de864331739c1b04fe9e3bb5d926e2fdf0d1fea2871181f68d0fb52325cbc9a5b81da58b7fe7f22d6d58d62b21c83460907146bc2f54ef0720fb3f9037f - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/type-utils@npm:5.62.0" - dependencies: - "@typescript-eslint/typescript-estree": "npm:5.62.0" - "@typescript-eslint/utils": "npm:5.62.0" - debug: "npm:^4.3.4" - tsutils: "npm:^3.21.0" - peerDependencies: - eslint: "*" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/f9a4398d6d2aae09e3e765eff04cf4ab364376a87868031ac5c6a64c9bbb555cb1a7f99b07b3d1017e7422725b5f0bbee537f13b82ab2d930f161c987b3dece0 - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:7.1.0": - version: 7.1.0 - resolution: "@typescript-eslint/type-utils@npm:7.1.0" - dependencies: - "@typescript-eslint/typescript-estree": "npm:7.1.0" - "@typescript-eslint/utils": "npm:7.1.0" - debug: "npm:^4.3.4" - ts-api-utils: "npm:^1.0.1" - peerDependencies: - eslint: ^8.56.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/439e6fadab3df3c21adfd651af4e605e1020c86c8c2400b0127c2ee914646bc73945b4add31ca7201cafeead261ad2958362c339ebdfc0798064d56daeb60661 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/types@npm:5.62.0" - checksum: 10/24e8443177be84823242d6729d56af2c4b47bfc664dd411a1d730506abf2150d6c31bdefbbc6d97c8f91043e3a50e0c698239dcb145b79bb6b0c34469aaf6c45 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:6.21.0": - version: 6.21.0 - resolution: "@typescript-eslint/types@npm:6.21.0" - checksum: 10/e26da86d6f36ca5b6ef6322619f8ec55aabcd7d43c840c977ae13ae2c964c3091fc92eb33730d8be08927c9de38466c5323e78bfb270a9ff1d3611fe821046c5 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:7.1.0": - version: 7.1.0 - resolution: "@typescript-eslint/types@npm:7.1.0" - checksum: 10/34801a14ea1444a1707de5bd3211f0ea53afc82a3c6c4543092f123267389da607c498d1a7de554ac9f071e6ef488238728a5f279ff2abaa0cbdfaa733899b67 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:5.62.0, @typescript-eslint/typescript-estree@npm:^5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - debug: "npm:^4.3.4" - globby: "npm:^11.1.0" - is-glob: "npm:^4.0.3" - semver: "npm:^7.3.7" - tsutils: "npm:^3.21.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/06c975eb5f44b43bd19fadc2e1023c50cf87038fe4c0dd989d4331c67b3ff509b17fa60a3251896668ab4d7322bdc56162a9926971218d2e1a1874d2bef9a52e - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:6.21.0": - version: 6.21.0 - resolution: "@typescript-eslint/typescript-estree@npm:6.21.0" - dependencies: - "@typescript-eslint/types": "npm:6.21.0" - "@typescript-eslint/visitor-keys": "npm:6.21.0" - debug: "npm:^4.3.4" - globby: "npm:^11.1.0" - is-glob: "npm:^4.0.3" - minimatch: "npm:9.0.3" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/b32fa35fca2a229e0f5f06793e5359ff9269f63e9705e858df95d55ca2cd7fdb5b3e75b284095a992c48c5fc46a1431a1a4b6747ede2dd08929dc1cbacc589b8 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:7.1.0": - version: 7.1.0 - resolution: "@typescript-eslint/typescript-estree@npm:7.1.0" - dependencies: - "@typescript-eslint/types": "npm:7.1.0" - "@typescript-eslint/visitor-keys": "npm:7.1.0" - debug: "npm:^4.3.4" - globby: "npm:^11.1.0" - is-glob: "npm:^4.0.3" - minimatch: "npm:9.0.3" - semver: "npm:^7.5.4" - ts-api-utils: "npm:^1.0.1" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/7dfc6fc70ff00875728ce5d85a3c5d6cb01435082b20ff9301ebe4d8e4a31a0c997282c762c636937bd66a40b4e0154e2ce98f85d888a6c46d433e9a24c46c4c - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:5.62.0, @typescript-eslint/utils@npm:^5.58.0": - version: 5.62.0 - resolution: "@typescript-eslint/utils@npm:5.62.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@types/json-schema": "npm:^7.0.9" - "@types/semver": "npm:^7.3.12" - "@typescript-eslint/scope-manager": "npm:5.62.0" - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/typescript-estree": "npm:5.62.0" - eslint-scope: "npm:^5.1.1" - semver: "npm:^7.3.7" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10/15ef13e43998a082b15f85db979f8d3ceb1f9ce4467b8016c267b1738d5e7cdb12aa90faf4b4e6dd6486c236cf9d33c463200465cf25ff997dbc0f12358550a1 - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:7.1.0": - version: 7.1.0 - resolution: "@typescript-eslint/utils@npm:7.1.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@types/json-schema": "npm:^7.0.12" - "@types/semver": "npm:^7.5.0" - "@typescript-eslint/scope-manager": "npm:7.1.0" - "@typescript-eslint/types": "npm:7.1.0" - "@typescript-eslint/typescript-estree": "npm:7.1.0" - semver: "npm:^7.5.4" - peerDependencies: - eslint: ^8.56.0 - checksum: 10/26d64094d8b828ce6cfea660c95cdbd4d0193d338646fc773312093388bc781653fc1ca16977b3be5288579fe43f14c7108fc431da66dd95b6ed680ad44712a0 - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:^6.20.0": - version: 6.21.0 - resolution: "@typescript-eslint/utils@npm:6.21.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@types/json-schema": "npm:^7.0.12" - "@types/semver": "npm:^7.5.0" - "@typescript-eslint/scope-manager": "npm:6.21.0" - "@typescript-eslint/types": "npm:6.21.0" - "@typescript-eslint/typescript-estree": "npm:6.21.0" - semver: "npm:^7.5.4" - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - checksum: 10/b404a2c55a425a79d054346ae123087d30c7ecf7ed7abcf680c47bf70c1de4fabadc63434f3f460b2fa63df76bc9e4a0b9fa2383bb8a9fcd62733fb5c4e4f3e3 - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - eslint-visitor-keys: "npm:^3.3.0" - checksum: 10/dc613ab7569df9bbe0b2ca677635eb91839dfb2ca2c6fa47870a5da4f160db0b436f7ec0764362e756d4164e9445d49d5eb1ff0b87f4c058946ae9d8c92eb388 - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:6.21.0": - version: 6.21.0 - resolution: "@typescript-eslint/visitor-keys@npm:6.21.0" - dependencies: - "@typescript-eslint/types": "npm:6.21.0" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/30422cdc1e2ffad203df40351a031254b272f9c6f2b7e02e9bfa39e3fc2c7b1c6130333b0057412968deda17a3a68a578a78929a8139c6acef44d9d841dc72e1 - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:7.1.0": - version: 7.1.0 - resolution: "@typescript-eslint/visitor-keys@npm:7.1.0" - dependencies: - "@typescript-eslint/types": "npm:7.1.0" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/c3e98ebf166fd1854adb0e9599dc108cdbbd95f6eb099d31deae2fd1d4df8fcd8dc9c24ad4f509b961ad900b474c246f6b4b228b5711cc504106c3e0f751a11c - languageName: node - linkType: hard - -"@typescript/vfs@npm:^1.4.0": - version: 1.5.0 - resolution: "@typescript/vfs@npm:1.5.0" - dependencies: - debug: "npm:^4.1.1" - checksum: 10/9a60cfd4e4ef37f69558e7e8a0c4633f86aae969a4c1193435bfdf80eb9573d23850b65621631d07e2f9699a2d7351ae6d9caa46080595314bde03c2c63443dd - languageName: node - linkType: hard - -"@ungap/structured-clone@npm:^1.2.0": - version: 1.2.0 - resolution: "@ungap/structured-clone@npm:1.2.0" - checksum: 10/c6fe89a505e513a7592e1438280db1c075764793a2397877ff1351721fe8792a966a5359769e30242b3cd023f2efb9e63ca2ca88019d73b564488cc20e3eab12 - languageName: node - linkType: hard - -"@unimodules/core@npm:*": - version: 7.2.0 - resolution: "@unimodules/core@npm:7.2.0" - dependencies: - expo-modules-core: "npm:~0.4.0" - checksum: 10/789b30c8bdab258fbac8cae36b91c8c6d7a10379681499858eee41db9444c405ef0512dbe7674c8ba082e87e455438af3cf4c4ee48b7cd2b10cd1b0696a10b99 - languageName: node - linkType: hard - -"@unimodules/react-native-adapter@npm:*": - version: 6.5.0 - resolution: "@unimodules/react-native-adapter@npm:6.5.0" - dependencies: - expo-modules-autolinking: "npm:^0.3.2" - expo-modules-core: "npm:~0.4.0" - checksum: 10/adb1157ce5df860369acb64ef302915a5afc2caf9108921f221fc8f5475eb1071bcc5eeea56788cfd8ff73313530a0683ed76056ca1cd55ae193880d1e03e5d5 - languageName: node - linkType: hard - -"@vercel/ncc@npm:0.38.1": - version: 0.38.1 - resolution: "@vercel/ncc@npm:0.38.1" - dependencies: - node-gyp: "npm:latest" - bin: - ncc: dist/ncc/cli.js - checksum: 10/2ed9dff34ba2e7c2ba7113ed075effd023549d5041d355a367f5bf749b20916f68d2adad6737f7a2d03f0d92237f948ce8dfbc9429bdf3febc18d4fa5159d9b4 - languageName: node - linkType: hard - -"@vitejs/plugin-basic-ssl@npm:1.0.1": - version: 1.0.1 - resolution: "@vitejs/plugin-basic-ssl@npm:1.0.1" - peerDependencies: - vite: ^3.0.0 || ^4.0.0 - checksum: 10/45895d58a885205774bf27c888d3525ad321c0652f2c0b211e423f60e514cbc21bde59bc9289caf620ec2d7bfeb354d99b25a4938525bb1d3de755e3d83121e6 - languageName: node - linkType: hard - -"@vitejs/plugin-basic-ssl@npm:1.1.0": - version: 1.1.0 - resolution: "@vitejs/plugin-basic-ssl@npm:1.1.0" - peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - checksum: 10/2c0631d1202a1b5f198a96c761cbcdde3730cc03a9be565ea12c37b47c22dd22976dc4bd614a400c431a55be0270359cf59fbb0530e77fafc0e591b1f58858ef - languageName: node - linkType: hard - -"@vitejs/plugin-react@npm:4.2.1": - version: 4.2.1 - resolution: "@vitejs/plugin-react@npm:4.2.1" - dependencies: - "@babel/core": "npm:^7.23.5" - "@babel/plugin-transform-react-jsx-self": "npm:^7.23.3" - "@babel/plugin-transform-react-jsx-source": "npm:^7.23.3" - "@types/babel__core": "npm:^7.20.5" - react-refresh: "npm:^0.14.0" - peerDependencies: - vite: ^4.2.0 || ^5.0.0 - checksum: 10/d7fa6dacd3c246bcee482ff4b7037b2978b6ca002b79780ad4921e91ae4bc85ab234cfb94f8d4d825fed8488a0acdda2ff02b47c27b3055187c0727b18fc725e - languageName: node - linkType: hard - -"@vue/compiler-core@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/compiler-core@npm:3.3.7" - dependencies: - "@babel/parser": "npm:^7.23.0" - "@vue/shared": "npm:3.3.7" - estree-walker: "npm:^2.0.2" - source-map-js: "npm:^1.0.2" - checksum: 10/846c6a3c68fc66ab7b1e59b69e75fb753e5bec91dfbb74878bc5f689d28eb34bb2a7f5e71ad32772d33587302a6d36a0c1e297699f2e29e0d2c60bff77e3de2e - languageName: node - linkType: hard - -"@vue/compiler-dom@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/compiler-dom@npm:3.3.7" - dependencies: - "@vue/compiler-core": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" - checksum: 10/e00decdd66acfab90f4aa9d545bb29bdf4512d2be728a65724dd0f28afbc7bdd2355fa8b83b0616cfcdbb8a5706e362c9717a1fc7776d8445faa37e6f71f332c - languageName: node - linkType: hard - -"@vue/compiler-sfc@npm:^3.3.4": - version: 3.3.7 - resolution: "@vue/compiler-sfc@npm:3.3.7" - dependencies: - "@babel/parser": "npm:^7.23.0" - "@vue/compiler-core": "npm:3.3.7" - "@vue/compiler-dom": "npm:3.3.7" - "@vue/compiler-ssr": "npm:3.3.7" - "@vue/reactivity-transform": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" - estree-walker: "npm:^2.0.2" - magic-string: "npm:^0.30.5" - postcss: "npm:^8.4.31" - source-map-js: "npm:^1.0.2" - checksum: 10/4f7fb03126a539fe745e3b07aae25a639dd3525c909b526f2f9a0b96862a1d4722d11f923921714fe6b604f9a0b9cdcbb723070909f6c65b4a42333ee8bb2c12 - languageName: node - linkType: hard - -"@vue/compiler-ssr@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/compiler-ssr@npm:3.3.7" - dependencies: - "@vue/compiler-dom": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" - checksum: 10/d675dc71d87d3dad423c53077326af74c0c315feeecb8e74fb4320a9fa4bae632d70a130a72f512fdc389ff27ccee5f64af0a6a5eb88aded9ebb48e9db770492 - languageName: node - linkType: hard - -"@vue/reactivity-transform@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/reactivity-transform@npm:3.3.7" - dependencies: - "@babel/parser": "npm:^7.23.0" - "@vue/compiler-core": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" - estree-walker: "npm:^2.0.2" - magic-string: "npm:^0.30.5" - checksum: 10/674c308a8db8627a62049b89e8a55581a35486c6c57ee88ef8c3bd40a3729bd52cf7fd2de61b9fa1d75479da4ccd45e9656e4fd5736686adc978fcfe7b471109 - languageName: node - linkType: hard - -"@vue/shared@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/shared@npm:3.3.7" - checksum: 10/c3d746757fc254897b701a0ecc2dec5bb61e8a0ca7aae86ba7288ab2a7a89cbf6afd79c5ec9a47cf484db65c3c3ad100882c440023d8928be6aa087a71391153 - languageName: node - linkType: hard - -"@webassemblyjs/ast@npm:1.11.6, @webassemblyjs/ast@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/ast@npm:1.11.6" - dependencies: - "@webassemblyjs/helper-numbers": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - checksum: 10/4c1303971ccd5188731c9b01073d9738333f37b946a48c4e049f7b788706cdc66f473cd6f3e791423a94c52a3b2230d070007930d29bccbce238b23835839f3c - languageName: node - linkType: hard - -"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/ast@npm:1.12.1" - dependencies: - "@webassemblyjs/helper-numbers": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - checksum: 10/a775b0559437ae122d14fec0cfe59fdcaf5ca2d8ff48254014fd05d6797e20401e0f1518e628f9b06819aa085834a2534234977f9608b3f2e51f94b6e8b0bc43 - languageName: node - linkType: hard - -"@webassemblyjs/floating-point-hex-parser@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.6" - checksum: 10/29b08758841fd8b299c7152eda36b9eb4921e9c584eb4594437b5cd90ed6b920523606eae7316175f89c20628da14326801090167cc7fbffc77af448ac84b7e2 - languageName: node - linkType: hard - -"@webassemblyjs/helper-api-error@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-api-error@npm:1.11.6" - checksum: 10/e8563df85161096343008f9161adb138a6e8f3c2cc338d6a36011aa55eabb32f2fd138ffe63bc278d009ada001cc41d263dadd1c0be01be6c2ed99076103689f - languageName: node - linkType: hard - -"@webassemblyjs/helper-buffer@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-buffer@npm:1.11.6" - checksum: 10/b14d0573bf680d22b2522e8a341ec451fddd645d1f9c6bd9012ccb7e587a2973b86ab7b89fe91e1c79939ba96095f503af04369a3b356c8023c13a5893221644 - languageName: node - linkType: hard - -"@webassemblyjs/helper-buffer@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/helper-buffer@npm:1.12.1" - checksum: 10/1d8705daa41f4d22ef7c6d422af4c530b84d69d0c253c6db5adec44d511d7caa66837803db5b1addcea611a1498fd5a67d2cf318b057a916283ae41ffb85ba8a - languageName: node - linkType: hard - -"@webassemblyjs/helper-numbers@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-numbers@npm:1.11.6" - dependencies: - "@webassemblyjs/floating-point-hex-parser": "npm:1.11.6" - "@webassemblyjs/helper-api-error": "npm:1.11.6" - "@xtuc/long": "npm:4.2.2" - checksum: 10/9ffd258ad809402688a490fdef1fd02222f20cdfe191c895ac215a331343292164e5033dbc0347f0f76f2447865c0b5c2d2e3304ee948d44f7aa27857028fd08 - languageName: node - linkType: hard - -"@webassemblyjs/helper-wasm-bytecode@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.6" - checksum: 10/4ebf03e9c1941288c10e94e0f813f413f972bfaa1f09be2cc2e5577f300430906b61aa24d52f5ef2f894e8e24e61c6f7c39871d7e3d98bc69460e1b8e00bb20b - languageName: node - linkType: hard - -"@webassemblyjs/helper-wasm-section@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.11.6" - dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@webassemblyjs/helper-buffer": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/wasm-gen": "npm:1.11.6" - checksum: 10/38a615ab3d55f953daaf78b69f145e2cc1ff5288ab71715d1a164408b735c643a87acd7e7ba3e9633c5dd965439a45bb580266b05a06b22ff678d6c013514108 - languageName: node - linkType: hard - -"@webassemblyjs/helper-wasm-section@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.12.1" - dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-buffer": "npm:1.12.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/wasm-gen": "npm:1.12.1" - checksum: 10/e91e6b28114e35321934070a2db8973a08a5cd9c30500b817214c683bbf5269ed4324366dd93ad83bf2fba0d671ac8f39df1c142bf58f70c57a827eeba4a3d2f - languageName: node - linkType: hard - -"@webassemblyjs/ieee754@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/ieee754@npm:1.11.6" - dependencies: - "@xtuc/ieee754": "npm:^1.2.0" - checksum: 10/13574b8e41f6ca39b700e292d7edf102577db5650fe8add7066a320aa4b7a7c09a5056feccac7a74eb68c10dea9546d4461412af351f13f6b24b5f32379b49de - languageName: node - linkType: hard - -"@webassemblyjs/leb128@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/leb128@npm:1.11.6" - dependencies: - "@xtuc/long": "npm:4.2.2" - checksum: 10/ec3b72db0e7ce7908fe08ec24395bfc97db486063824c0edc580f0973a4cfbadf30529569d9c7db663a56513e45b94299cca03be9e1992ea3308bb0744164f3d - languageName: node - linkType: hard - -"@webassemblyjs/utf8@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/utf8@npm:1.11.6" - checksum: 10/361a537bd604101b320a5604c3c96d1038d83166f1b9fb86cedadc7e81bae54c3785ae5d90bf5b1842f7da08194ccaf0f44a64fcca0cbbd6afe1a166196986d6 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-edit@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-edit@npm:1.11.6" - dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@webassemblyjs/helper-buffer": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/helper-wasm-section": "npm:1.11.6" - "@webassemblyjs/wasm-gen": "npm:1.11.6" - "@webassemblyjs/wasm-opt": "npm:1.11.6" - "@webassemblyjs/wasm-parser": "npm:1.11.6" - "@webassemblyjs/wast-printer": "npm:1.11.6" - checksum: 10/c168bfc6d0cdd371345f36f95a4766d098a96ccc1257e6a6e3a74d987a5c4f2ddd2244a6aecfa5d032a47d74ed2c3b579e00a314d31e4a0b76ad35b31cdfa162 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-edit@npm:^1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-edit@npm:1.12.1" - dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-buffer": "npm:1.12.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/helper-wasm-section": "npm:1.12.1" - "@webassemblyjs/wasm-gen": "npm:1.12.1" - "@webassemblyjs/wasm-opt": "npm:1.12.1" - "@webassemblyjs/wasm-parser": "npm:1.12.1" - "@webassemblyjs/wast-printer": "npm:1.12.1" - checksum: 10/5678ae02dbebba2f3a344e25928ea5a26a0df777166c9be77a467bfde7aca7f4b57ef95587e4bd768a402cdf2fddc4c56f0a599d164cdd9fe313520e39e18137 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-gen@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-gen@npm:1.11.6" - dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/ieee754": "npm:1.11.6" - "@webassemblyjs/leb128": "npm:1.11.6" - "@webassemblyjs/utf8": "npm:1.11.6" - checksum: 10/f91903506ce50763592863df5d80ffee80f71a1994a882a64cdb83b5e44002c715f1ef1727d8ccb0692d066af34d3d4f5e59e8f7a4e2eeb2b7c32692ac44e363 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-gen@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-gen@npm:1.12.1" - dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/ieee754": "npm:1.11.6" - "@webassemblyjs/leb128": "npm:1.11.6" - "@webassemblyjs/utf8": "npm:1.11.6" - checksum: 10/ec45bd50e86bc9856f80fe9af4bc1ae5c98fb85f57023d11dff2b670da240c47a7b1b9b6c89755890314212bd167cf3adae7f1157216ddffb739a4ce589fc338 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-opt@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-opt@npm:1.11.6" - dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@webassemblyjs/helper-buffer": "npm:1.11.6" - "@webassemblyjs/wasm-gen": "npm:1.11.6" - "@webassemblyjs/wasm-parser": "npm:1.11.6" - checksum: 10/e0cfeea381ecbbd0ca1616e9a08974acfe7fc81f8a16f9f2d39f565dc51784dd7043710b6e972f9968692d273e32486b9a8a82ca178d4bd520b2d5e2cf28234d - languageName: node - linkType: hard - -"@webassemblyjs/wasm-opt@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-opt@npm:1.12.1" - dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-buffer": "npm:1.12.1" - "@webassemblyjs/wasm-gen": "npm:1.12.1" - "@webassemblyjs/wasm-parser": "npm:1.12.1" - checksum: 10/21f25ae109012c49bb084e09f3b67679510429adc3e2408ad3621b2b505379d9cce337799a7919ef44db64e0d136833216914aea16b0d4856f353b9778e0cdb7 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-parser@npm:1.11.6, @webassemblyjs/wasm-parser@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-parser@npm:1.11.6" - dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@webassemblyjs/helper-api-error": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/ieee754": "npm:1.11.6" - "@webassemblyjs/leb128": "npm:1.11.6" - "@webassemblyjs/utf8": "npm:1.11.6" - checksum: 10/6995e0b7b8ebc52b381459c6a555f87763dcd3975c4a112407682551e1c73308db7af23385972a253dceb5af94e76f9c97cb861e8239b5ed1c3e79b95d8e2097 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-parser@npm:1.12.1" - dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-api-error": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/ieee754": "npm:1.11.6" - "@webassemblyjs/leb128": "npm:1.11.6" - "@webassemblyjs/utf8": "npm:1.11.6" - checksum: 10/f7311685b76c3e1def2abea3488be1e77f06ecd8633143a6c5c943ca289660952b73785231bb76a010055ca64645227a4bc79705c26ab7536216891b6bb36320 - languageName: node - linkType: hard - -"@webassemblyjs/wast-printer@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wast-printer@npm:1.11.6" - dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@xtuc/long": "npm:4.2.2" - checksum: 10/fd45fd0d693141d678cc2f6ff2d3a0d7a8884acb1c92fb0c63cf43b7978e9560be04118b12792638a39dd185640453510229e736f3049037d0c361f6435f2d5f - languageName: node - linkType: hard - -"@webassemblyjs/wast-printer@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wast-printer@npm:1.12.1" - dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@xtuc/long": "npm:4.2.2" - checksum: 10/1a6a4b6bc4234f2b5adbab0cb11a24911b03380eb1cab6fb27a2250174a279fdc6aa2f5a9cf62dd1f6d4eb39f778f488e8ff15b9deb0670dee5c5077d46cf572 - languageName: node - linkType: hard - -"@webpack-cli/configtest@npm:^1.2.0": - version: 1.2.0 - resolution: "@webpack-cli/configtest@npm:1.2.0" - peerDependencies: - webpack: 4.x.x || 5.x.x - webpack-cli: 4.x.x - checksum: 10/a2726cd9ec601d2b57e5fc15e0ebf5200a8892065e735911269ac2038e62be4bfc176ea1f88c2c46ff09b4d05d4c10ae045e87b3679372483d47da625a327e28 - languageName: node - linkType: hard - -"@webpack-cli/info@npm:^1.5.0": - version: 1.5.0 - resolution: "@webpack-cli/info@npm:1.5.0" - dependencies: - envinfo: "npm:^7.7.3" - peerDependencies: - webpack-cli: 4.x.x - checksum: 10/7f56fe037cd7d1fd5c7428588519fbf04a0cad33925ee4202ffbafd00f8ec1f2f67d991245e687d50e0f3e23f7b7814273d56cb9f7da4b05eed47c8d815c6296 - languageName: node - linkType: hard - -"@webpack-cli/serve@npm:^1.7.0": - version: 1.7.0 - resolution: "@webpack-cli/serve@npm:1.7.0" - peerDependencies: - webpack-cli: 4.x.x - peerDependenciesMeta: - webpack-dev-server: - optional: true - checksum: 10/0b90c963a6b8424a914a85532e3a7dfe2f7eea1c98acea1c6c1a368bf349733f0d6cb2e83ce9ced7c8208f58d518cced767d1e1d0ab26126d8a9bad3b3f5352e - languageName: node - linkType: hard - -"@wessberg/ts-evaluator@npm:0.0.27": - version: 0.0.27 - resolution: "@wessberg/ts-evaluator@npm:0.0.27" - dependencies: - chalk: "npm:^4.1.0" - jsdom: "npm:^16.4.0" - object-path: "npm:^0.11.5" - tslib: "npm:^2.0.3" - peerDependencies: - typescript: ">=3.2.x || >= 4.x" - checksum: 10/936c68f2c48719d89b8d200bef9c1766e8307c9203ccf34b5a9e6d238ce7ce1176d731cce71210c9e20c2d7a38ee31f6ed776bba8d86c05bf2267797e21b2c28 - languageName: node - linkType: hard - -"@xtuc/ieee754@npm:^1.2.0": - version: 1.2.0 - resolution: "@xtuc/ieee754@npm:1.2.0" - checksum: 10/ab033b032927d77e2f9fa67accdf31b1ca7440974c21c9cfabc8349e10ca2817646171c4f23be98d0e31896d6c2c3462a074fe37752e523abc3e45c79254259c - languageName: node - linkType: hard - -"@xtuc/long@npm:4.2.2": - version: 4.2.2 - resolution: "@xtuc/long@npm:4.2.2" - checksum: 10/7217bae9fe240e0d804969e7b2af11cb04ec608837c78b56ca88831991b287e232a0b7fce8d548beaff42aaf0197ffa471d81be6ac4c4e53b0148025a2c076ec - languageName: node - linkType: hard - -"@yarnpkg/lockfile@npm:1.1.0": - version: 1.1.0 - resolution: "@yarnpkg/lockfile@npm:1.1.0" - checksum: 10/cd19e1114aaf10a05126aeea8833ef4ca8af8a46e88e12884f8359d19333fd19711036dbc2698dbe937f81f037070cf9a8da45c2e8c6ca19cafd7d15659094ed - languageName: node - linkType: hard - -"@yr/monotone-cubic-spline@npm:^1.0.3": - version: 1.0.3 - resolution: "@yr/monotone-cubic-spline@npm:1.0.3" - checksum: 10/f946b0a1aa3e976126b8ee07d4fd430f3b956f195b16f2497ab4510d8463b777d6dd53c49e4f86c6c506de7d8420c05fa566a7454548afde804ffd7fb21ff8d4 - languageName: node - linkType: hard - -"JSONStream@npm:^1.3.5": - version: 1.3.5 - resolution: "JSONStream@npm:1.3.5" - dependencies: - jsonparse: "npm:^1.2.0" - through: "npm:>=2.2.7 <3" - bin: - JSONStream: ./bin.js - checksum: 10/e30daf7b9b2da23076181d9a0e4bec33bc1d97e8c0385b949f1b16ba3366a1d241ec6f077850c01fe32379b5ebb8b96b65496984bc1545a93a5150bf4c267439 - languageName: node - linkType: hard - -"abab@npm:^2.0.3, abab@npm:^2.0.6": - version: 2.0.6 - resolution: "abab@npm:2.0.6" - checksum: 10/ebe95d7278999e605823fc515a3b05d689bc72e7f825536e73c95ebf621636874c6de1b749b3c4bf866b96ccd4b3a2802efa313d0e45ad51a413c8c73247db20 - languageName: node - linkType: hard - -"abab@npm:^2.0.5": - version: 2.0.5 - resolution: "abab@npm:2.0.5" - checksum: 10/92deff85d54efe307bbe2ea824741f6ef429181751968e3eb55279be6072b3ffaa2100978eb72a9f55c1220f7117c65651e37f2631ea1e25a763e5e687800706 - languageName: node - linkType: hard - -"abbrev@npm:1, abbrev@npm:^1.0.0": - version: 1.1.1 - resolution: "abbrev@npm:1.1.1" - checksum: 10/2d882941183c66aa665118bafdab82b7a177e9add5eb2776c33e960a4f3c89cff88a1b38aba13a456de01d0dd9d66a8bea7c903268b21ea91dd1097e1e2e8243 - languageName: node - linkType: hard - -"abbrev@npm:^2.0.0": - version: 2.0.0 - resolution: "abbrev@npm:2.0.0" - checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 - languageName: node - linkType: hard - -"abitype@npm:0.7.1": - version: 0.7.1 - resolution: "abitype@npm:0.7.1" - peerDependencies: - typescript: ">=4.9.4" - zod: ^3 >=3.19.1 - peerDependenciesMeta: - zod: - optional: true - checksum: 10/deee4a18c9c7218ab2e5e57e07e4cb3e2f3e785657be364d098ab0587cd552c4fbb41e1bdddbc6fa52387f51ebd181461fe70a13127cc77091655775fdfb18fe - languageName: node - linkType: hard - -"abort-controller@npm:3.0.0, abort-controller@npm:^3.0.0": - version: 3.0.0 - resolution: "abort-controller@npm:3.0.0" - dependencies: - event-target-shim: "npm:^5.0.0" - checksum: 10/ed84af329f1828327798229578b4fe03a4dd2596ba304083ebd2252666bdc1d7647d66d0b18704477e1f8aa315f055944aa6e859afebd341f12d0a53c37b4b40 - languageName: node - linkType: hard - -"abortable-iterator@npm:^5.0.1": - version: 5.0.1 - resolution: "abortable-iterator@npm:5.0.1" - dependencies: - get-iterator: "npm:^2.0.0" - it-stream-types: "npm:^2.0.1" - checksum: 10/05b9e2601ae4e03ea2038f55013b8dfa074f3c7fa898cbc996107f99098b4c8338c8efececa36a953ef75cd8e4af7859b152d98c14b4472a6c79307fe94d369e - languageName: node - linkType: hard - -"abortcontroller-polyfill@npm:^1.7.3": - version: 1.7.5 - resolution: "abortcontroller-polyfill@npm:1.7.5" - checksum: 10/aac398f7fc076235fe731adaffd2c319fe6c1527af8ca561890242d5396351350e0705726478778dc90326a69a4c044890c156fe867cba7f3ffeb670f8665a51 - languageName: node - linkType: hard - -"abstract-level@npm:1.0.3, abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3": - version: 1.0.3 - resolution: "abstract-level@npm:1.0.3" - dependencies: - buffer: "npm:^6.0.3" - catering: "npm:^2.1.0" - is-buffer: "npm:^2.0.5" - level-supports: "npm:^4.0.0" - level-transcoder: "npm:^1.0.1" - module-error: "npm:^1.0.1" - queue-microtask: "npm:^1.2.3" - checksum: 10/a6872010a7be78240e1e5bf24b202950adbbd2a382970e17cc661ac8a73663327c241dc25f2863e599f3f5b24d0c3c357b5af4092c4ce34511bae1c09283a278 - languageName: node - linkType: hard - -"abstract-leveldown@npm:7.2.0, abstract-leveldown@npm:^7.2.0": - version: 7.2.0 - resolution: "abstract-leveldown@npm:7.2.0" - dependencies: - buffer: "npm:^6.0.3" - catering: "npm:^2.0.0" - is-buffer: "npm:^2.0.5" - level-concat-iterator: "npm:^3.0.0" - level-supports: "npm:^2.0.1" - queue-microtask: "npm:^1.2.3" - checksum: 10/607a43c0963a8ac1388f8248045f84fb557440b6668b45464a0668652d6fd442d726d536d1f03ab2865530ccdb689a55bca400144fe0ae9c710d4594f0400b55 - languageName: node - linkType: hard - -"abstract-leveldown@npm:^5.0.0, abstract-leveldown@npm:~5.0.0": - version: 5.0.0 - resolution: "abstract-leveldown@npm:5.0.0" - dependencies: - xtend: "npm:~4.0.0" - checksum: 10/bce08839fc5a9be06308c3c9669c5b5b31932b8994fb44599c9190a02592fd4eee7441bfc1de780ce7c2cadfa23e865e57a80f34f0005c8b4218a905518ad21f - languageName: node - linkType: hard - -"abstract-leveldown@npm:^6.2.1": - version: 6.3.0 - resolution: "abstract-leveldown@npm:6.3.0" - dependencies: - buffer: "npm:^5.5.0" - immediate: "npm:^3.2.3" - level-concat-iterator: "npm:~2.0.0" - level-supports: "npm:~1.0.0" - xtend: "npm:~4.0.0" - checksum: 10/b12d224822ba9351d525c22de35eb3f0f432f7392ee58d9f229fe8f0103aef732dea036c34787df5196152a24808f7377a8d11d55a8db2627219d06f3ea2c0b0 - languageName: node - linkType: hard - -"abstract-leveldown@npm:~0.12.0, abstract-leveldown@npm:~0.12.1": - version: 0.12.4 - resolution: "abstract-leveldown@npm:0.12.4" - dependencies: - xtend: "npm:~3.0.0" - checksum: 10/0d2bd2c643c2a42c58d1bbdb3dbc86357afd247e6b968532626722528a5e9f20a580d418778ba9db07fdbad639c458e09eedf2291f8c47839d6b4703d8d0d35a - languageName: node - linkType: hard - -"abstract-leveldown@npm:~2.6.0": - version: 2.6.3 - resolution: "abstract-leveldown@npm:2.6.3" - dependencies: - xtend: "npm:~4.0.0" - checksum: 10/3f9db6c3c77991018adcad133acb2e084446d7583753c46343ec3ba6ff60ab89cd1aa3813b2131ccc92191863802cacbca3240490fadde20118845267643c543 - languageName: node - linkType: hard - -"abstract-leveldown@npm:~2.7.1": - version: 2.7.2 - resolution: "abstract-leveldown@npm:2.7.2" - dependencies: - xtend: "npm:~4.0.0" - checksum: 10/cac79f5e24b91259706501d5e9881b63418623d3d192a42c7aa8ab427c5403142f81c6ce3649169bdf16514aea06b5ae7e2d6f4d22740ad967b48f2fa319e3f0 - languageName: node - linkType: hard - -"abstract-leveldown@npm:~6.2.1, abstract-leveldown@npm:~6.2.3": - version: 6.2.3 - resolution: "abstract-leveldown@npm:6.2.3" - dependencies: - buffer: "npm:^5.5.0" - immediate: "npm:^3.2.3" - level-concat-iterator: "npm:~2.0.0" - level-supports: "npm:~1.0.0" - xtend: "npm:~4.0.0" - checksum: 10/4e0b4ce14715822f3e54610d8e91c22bb62fa9bb684860c6af7fac82e28c1efdf14b82c5a8ee7c9cf4912e67e3320209fc230eed7a668c66811b6fadea279277 - languageName: node - linkType: hard - -"abstract-logging@npm:^2.0.1": - version: 2.0.1 - resolution: "abstract-logging@npm:2.0.1" - checksum: 10/6967d15e5abbafd17f56eaf30ba8278c99333586fa4f7935fd80e93cfdc006c37fcc819c5d63ee373a12e6cb2d0417f7c3c6b9e42b957a25af9937d26749415e - languageName: node - linkType: hard - -"accepts@npm:^1.3.5, accepts@npm:^1.3.7, accepts@npm:~1.3.8": - version: 1.3.8 - resolution: "accepts@npm:1.3.8" - dependencies: - mime-types: "npm:~2.1.34" - negotiator: "npm:0.6.3" - checksum: 10/67eaaa90e2917c58418e7a9b89392002d2b1ccd69bcca4799135d0c632f3b082f23f4ae4ddeedbced5aa59bcc7bdf4699c69ebed4593696c922462b7bc5744d6 - languageName: node - linkType: hard - -"accepts@npm:~1.3.4, accepts@npm:~1.3.5": - version: 1.3.7 - resolution: "accepts@npm:1.3.7" - dependencies: - mime-types: "npm:~2.1.24" - negotiator: "npm:0.6.2" - checksum: 10/599aa3cc775a2b4fb393f666be41ba7f3da4f46ba8bb422908a68042d3d59ef71f1631f1657b22842fe53f4cd562fc02f8bb42cfde6af0cec3a9b1f9508843cc - languageName: node - linkType: hard - -"acorn-globals@npm:^6.0.0": - version: 6.0.0 - resolution: "acorn-globals@npm:6.0.0" - dependencies: - acorn: "npm:^7.1.1" - acorn-walk: "npm:^7.1.1" - checksum: 10/72d95e5b5e585f9acd019b993ab8bbba68bb3cbc9d9b5c1ebb3c2f1fe5981f11deababfb4949f48e6262f9c57878837f5958c0cca396f81023814680ca878042 - languageName: node - linkType: hard - -"acorn-import-assertions@npm:^1.9.0": - version: 1.9.0 - resolution: "acorn-import-assertions@npm:1.9.0" - peerDependencies: - acorn: ^8 - checksum: 10/af8dd58f6b0c6a43e85849744534b99f2133835c6fcdabda9eea27d0a0da625a0d323c4793ba7cb25cf4507609d0f747c210ccc2fc9b5866de04b0e59c9c5617 - languageName: node - linkType: hard - -"acorn-import-attributes@npm:^1.9.5": - version: 1.9.5 - resolution: "acorn-import-attributes@npm:1.9.5" - peerDependencies: - acorn: ^8 - checksum: 10/8bfbfbb6e2467b9b47abb4d095df717ab64fce2525da65eabee073e85e7975fb3a176b6c8bba17c99a7d8ede283a10a590272304eb54a93c4aa1af9790d47a8b - languageName: node - linkType: hard - -"acorn-jsx@npm:^3.0.0": - version: 3.0.1 - resolution: "acorn-jsx@npm:3.0.1" - dependencies: - acorn: "npm:^3.0.4" - checksum: 10/8cb7f7b44f1a7a631d7ad2d20a89c6e737231b49c63ad14f1d0b96a834e2029333fb90a458583265dd8ed5171ceafae088b3f8c4f8f2c5e9c26a71d642ae90cf - languageName: node - linkType: hard - -"acorn-jsx@npm:^5.3.2": - version: 5.3.2 - resolution: "acorn-jsx@npm:5.3.2" - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10/d4371eaef7995530b5b5ca4183ff6f062ca17901a6d3f673c9ac011b01ede37e7a1f7f61f8f5cfe709e88054757bb8f3277dc4061087cdf4f2a1f90ccbcdb977 - languageName: node - linkType: hard - -"acorn-walk@npm:^7.1.1": - version: 7.2.0 - resolution: "acorn-walk@npm:7.2.0" - checksum: 10/4d3e186f729474aed3bc3d0df44692f2010c726582655b20a23347bef650867655521c48ada444cb4fda241ee713dcb792da363ec74c6282fa884fb7144171bb - languageName: node - linkType: hard - -"acorn-walk@npm:^8.1.1": - version: 8.2.0 - resolution: "acorn-walk@npm:8.2.0" - checksum: 10/e69f7234f2adfeb16db3671429a7c80894105bd7534cb2032acf01bb26e6a847952d11a062d071420b43f8d82e33d2e57f26fe87d9cce0853e8143d8910ff1de - languageName: node - linkType: hard - -"acorn@npm:^3.0.4": - version: 3.3.0 - resolution: "acorn@npm:3.3.0" - bin: - acorn: ./bin/acorn - checksum: 10/ae9a421f7ff31a1238c742e6f958f627f15d04c3b0edd5e97fce643b3d45c665be68f1f64b462605c9722ed758812ceb44b91ea7f0cae903e703d1adc7cf0b8f - languageName: node - linkType: hard - -"acorn@npm:^5.5.0": - version: 5.7.4 - resolution: "acorn@npm:5.7.4" - bin: - acorn: bin/acorn - checksum: 10/97f2ae55e99aed81a7aa9039719c60283a66817fadb3152beb323ba6038824770512f807436e99090be38602f23bcbf6021867d86442616da471f1dfaca7c3d9 - languageName: node - linkType: hard - -"acorn@npm:^7.1.1": - version: 7.4.1 - resolution: "acorn@npm:7.4.1" - bin: - acorn: bin/acorn - checksum: 10/8be2a40714756d713dfb62544128adce3b7102c6eb94bc312af196c2cc4af76e5b93079bd66b05e9ca31b35a9b0ce12171d16bc55f366cafdb794fdab9d753ec - languageName: node - linkType: hard - -"acorn@npm:^8.2.4, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.10.0 - resolution: "acorn@npm:8.10.0" - bin: - acorn: bin/acorn - checksum: 10/522310c20fdc3c271caed3caf0f06c51d61cb42267279566edd1d58e83dbc12eebdafaab666a0f0be1b7ad04af9c6bc2a6f478690a9e6391c3c8b165ada917dd - languageName: node - linkType: hard - -"acorn@npm:^8.4.1, acorn@npm:^8.7.1": - version: 8.8.2 - resolution: "acorn@npm:8.8.2" - bin: - acorn: bin/acorn - checksum: 10/b4e77d56d24d3e11a45d9ac8ae661b4e14a4af04ae33edbf1e6bf910887e5bb352cc60e9ea06a0944880e6b658f58c095d3b54e88e1921cb9319608b51085dd7 - languageName: node - linkType: hard - -"add-stream@npm:^1.0.0": - version: 1.0.0 - resolution: "add-stream@npm:1.0.0" - checksum: 10/3e9e8b0b8f0170406d7c3a9a39bfbdf419ccccb0fd2a396338c0fda0a339af73bf738ad414fc520741de74517acf0dd92b4a36fd3298a47fd5371eee8f2c5a06 - languageName: node - linkType: hard - -"address@npm:^1.0.1, address@npm:^1.1.2": - version: 1.2.2 - resolution: "address@npm:1.2.2" - checksum: 10/57d80a0c6ccadc8769ad3aeb130c1599e8aee86a8d25f671216c40df9b8489d6c3ef879bc2752b40d1458aa768f947c2d91e5b2fedfe63cf702c40afdfda9ba9 - languageName: node - linkType: hard - -"adjust-sourcemap-loader@npm:^4.0.0": - version: 4.0.0 - resolution: "adjust-sourcemap-loader@npm:4.0.0" - dependencies: - loader-utils: "npm:^2.0.0" - regex-parser: "npm:^2.2.11" - checksum: 10/813004ae62b3b409208ae6994b2b95cdc833b52655706f487c5334221218add29f1b7c597a15128c7cbc2784c15d8a1bcb8e7f9a8ea0d1f156973998ea695c82 - languageName: node - linkType: hard - -"adm-zip@npm:0.5.10": - version: 0.5.10 - resolution: "adm-zip@npm:0.5.10" - checksum: 10/c5ab79b77114d8277f0cbfd6cca830198d6c7ee4971f6960f48e08cd2375953b11dc71729b7f396abd51d2d6cce8c862fad185ea90cb2c84ab5161c37ed1b099 - languageName: node - linkType: hard - -"adm-zip@npm:^0.4.16": - version: 0.4.16 - resolution: "adm-zip@npm:0.4.16" - checksum: 10/897003d21a445bfce251d5a328706035dc03af53cd4c66bb0a4558496939f89767ae5e7c67d10a5a9ad0146081a339bed3361405d6cca648a4378198573e9cad - languageName: node - linkType: hard - -"aes-js@npm:3.0.0": - version: 3.0.0 - resolution: "aes-js@npm:3.0.0" - checksum: 10/1b3772e5ba74abdccb6c6b99bf7f50b49057b38c0db1612b46c7024414f16e65ba7f1643b2d6e38490b1870bdf3ba1b87b35e2c831fd3fdaeff015f08aad19d1 - languageName: node - linkType: hard - -"aes-js@npm:4.0.0-beta.3": - version: 4.0.0-beta.3 - resolution: "aes-js@npm:4.0.0-beta.3" - checksum: 10/8cdf3542ac2acab1c7e934fff7f4093dfdc647c3ad15ecf013acc7170383d0109d95f203f0fb48a9d01af0a35a47e871a30e9a50cfc35415d7b4c9194ded46d2 - languageName: node - linkType: hard - -"aes-js@npm:4.0.0-beta.5": - version: 4.0.0-beta.5 - resolution: "aes-js@npm:4.0.0-beta.5" - checksum: 10/8f745da2e8fb38e91297a8ec13c2febe3219f8383303cd4ed4660ca67190242ccfd5fdc2f0d1642fd1ea934818fb871cd4cc28d3f28e812e3dc6c3d0f1f97c24 - languageName: node - linkType: hard - -"agent-base@npm:6, agent-base@npm:^6.0.2": - version: 6.0.2 - resolution: "agent-base@npm:6.0.2" - dependencies: - debug: "npm:4" - checksum: 10/21fb903e0917e5cb16591b4d0ef6a028a54b83ac30cd1fca58dece3d4e0990512a8723f9f83130d88a41e2af8b1f7be1386fda3ea2d181bb1a62155e75e95e23 - languageName: node - linkType: hard - -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": - version: 7.1.0 - resolution: "agent-base@npm:7.1.0" - dependencies: - debug: "npm:^4.3.4" - checksum: 10/f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f - languageName: node - linkType: hard - -"agentkeepalive@npm:^4.1.3, agentkeepalive@npm:^4.2.1": - version: 4.2.1 - resolution: "agentkeepalive@npm:4.2.1" - dependencies: - debug: "npm:^4.1.0" - depd: "npm:^1.1.2" - humanize-ms: "npm:^1.2.1" - checksum: 10/63961cba1afa26d708da94159f3b9428d46fdc137b783fbc399b848e750c5e28c97d96839efa8cb3c2d11ecd12dd411298c00d164600212f660e8c55369c9e55 - languageName: node - linkType: hard - -"aggregate-error@npm:^3.0.0": - version: 3.1.0 - resolution: "aggregate-error@npm:3.1.0" - dependencies: - clean-stack: "npm:^2.0.0" - indent-string: "npm:^4.0.0" - checksum: 10/1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 - languageName: node - linkType: hard - -"aggregate-error@npm:^4.0.0": - version: 4.0.0 - resolution: "aggregate-error@npm:4.0.0" - dependencies: - clean-stack: "npm:^4.0.0" - indent-string: "npm:^5.0.0" - checksum: 10/586397769e25fc5c2da5995c736f11ba83adf0bbc5f72c7101ea38e795458fd7b497f672318119218b4d3b1f8b8d3001417cebe9de55b5467af5cbcbff4befa3 - languageName: node - linkType: hard - -"ajv-draft-04@npm:1.0.0, ajv-draft-04@npm:^1.0.0": - version: 1.0.0 - resolution: "ajv-draft-04@npm:1.0.0" - peerDependencies: - ajv: ^8.5.0 - peerDependenciesMeta: - ajv: - optional: true - checksum: 10/3f11fa0e7f7359bef6608657f02ab78e9cc62b1fb7bdd860db0d00351b3863a1189c1a23b72466d2d82726cab4eb20725c76f5e7c134a89865e2bfd0e6828137 - languageName: node - linkType: hard - -"ajv-formats@npm:2.1.1, ajv-formats@npm:^2.1.1": - version: 2.1.1 - resolution: "ajv-formats@npm:2.1.1" - dependencies: - ajv: "npm:^8.0.0" - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - checksum: 10/70c263ded219bf277ffd9127f793b625f10a46113b2e901e150da41931fcfd7f5592da6d66862f4449bb157ffe65867c3294a7df1d661cc232c4163d5a1718ed - languageName: node - linkType: hard - -"ajv-formats@npm:3.0.1, ajv-formats@npm:^3.0.1": - version: 3.0.1 - resolution: "ajv-formats@npm:3.0.1" - dependencies: - ajv: "npm:^8.0.0" - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - checksum: 10/5679b9f9ced9d0213a202a37f3aa91efcffe59a6de1a6e3da5c873344d3c161820a1f11cc29899661fee36271fd2895dd3851b6461c902a752ad661d1c1e8722 - languageName: node - linkType: hard - -"ajv-keywords@npm:^1.0.0": - version: 1.5.1 - resolution: "ajv-keywords@npm:1.5.1" - peerDependencies: - ajv: ">=4.10.0" - checksum: 10/e7eaae4f41d0c4178b611aa63f4dc2e94cb069a8c9017fe68f34cea5a5eefe5430e93906b7abe8b093f4a6297487ebbbd09ad065b323a7d59ea352d401266557 - languageName: node - linkType: hard - -"ajv-keywords@npm:^2.1.0": - version: 2.1.1 - resolution: "ajv-keywords@npm:2.1.1" - peerDependencies: - ajv: ^5.0.0 - checksum: 10/24f13aa91119f3aee9eb360f8f168455958b978eee84f563d9a8ba2967dd024a42ab05fc242f0d6f3051a2c534c84aee993916ea729ddb6187dd23cfa4d28461 - languageName: node - linkType: hard - -"ajv-keywords@npm:^3.4.1, ajv-keywords@npm:^3.5.2": - version: 3.5.2 - resolution: "ajv-keywords@npm:3.5.2" - peerDependencies: - ajv: ^6.9.1 - checksum: 10/d57c9d5bf8849bddcbd801b79bc3d2ddc736c2adb6b93a6a365429589dd7993ddbd5d37c6025ed6a7f89c27506b80131d5345c5b1fa6a97e40cd10a96bcd228c - languageName: node - linkType: hard - -"ajv-keywords@npm:^5.0.0": - version: 5.1.0 - resolution: "ajv-keywords@npm:5.1.0" - dependencies: - fast-deep-equal: "npm:^3.1.3" - peerDependencies: - ajv: ^8.8.2 - checksum: 10/5021f96ab7ddd03a4005326bd06f45f448ebfbb0fe7018b1b70b6c28142fa68372bda2057359814b83fd0b2d4c8726c297f0a7557b15377be7b56ce5344533d8 - languageName: node - linkType: hard - -"ajv@npm:8.12.0, ajv@npm:^8.11.0, ajv@npm:^8.6.0, ajv@npm:^8.6.3": - version: 8.12.0 - resolution: "ajv@npm:8.12.0" - dependencies: - fast-deep-equal: "npm:^3.1.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - uri-js: "npm:^4.2.2" - checksum: 10/b406f3b79b5756ac53bfe2c20852471b08e122bc1ee4cde08ae4d6a800574d9cd78d60c81c69c63ff81e4da7cd0b638fafbb2303ae580d49cf1600b9059efb85 - languageName: node - linkType: hard - -"ajv@npm:8.17.1, ajv@npm:^8.10.0, ajv@npm:^8.14.0": - version: 8.17.1 - resolution: "ajv@npm:8.17.1" - dependencies: - fast-deep-equal: "npm:^3.1.3" - fast-uri: "npm:^3.0.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - checksum: 10/ee3c62162c953e91986c838f004132b6a253d700f1e51253b99791e2dbfdb39161bc950ebdc2f156f8568035bb5ed8be7bd78289cd9ecbf3381fe8f5b82e3f33 - languageName: node - linkType: hard - -"ajv@npm:^4.7.0": - version: 4.11.8 - resolution: "ajv@npm:4.11.8" - dependencies: - co: "npm:^4.6.0" - json-stable-stringify: "npm:^1.0.1" - checksum: 10/dc008cdd33190af18a0f807f9823a16b0d756a5f26bbcaa50d6ed72f86d419654d9e9c35853e5ba81ef535485d8931c37fc71da53b3bb7a15e278ee141c616b7 - languageName: node - linkType: hard - -"ajv@npm:^5.2.3, ajv@npm:^5.3.0": - version: 5.5.2 - resolution: "ajv@npm:5.5.2" - dependencies: - co: "npm:^4.6.0" - fast-deep-equal: "npm:^1.0.0" - fast-json-stable-stringify: "npm:^2.0.0" - json-schema-traverse: "npm:^0.3.0" - checksum: 10/944526c6f61e859d2d0e0f54c9a6c046b207410ddde601dc5d0bb65d20fb116cc493a604d02e5a354f6112813d679e46058c876639c8802674b6de8e7dadb31c - languageName: node - linkType: hard - -"ajv@npm:^6.10.0, ajv@npm:^6.11.0, ajv@npm:^6.12.2, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.5": - version: 6.12.6 - resolution: "ajv@npm:6.12.6" - dependencies: - fast-deep-equal: "npm:^3.1.1" - fast-json-stable-stringify: "npm:^2.0.0" - json-schema-traverse: "npm:^0.4.1" - uri-js: "npm:^4.2.2" - checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c - languageName: node - linkType: hard - -"ajv@npm:^8.0.0": - version: 8.10.0 - resolution: "ajv@npm:8.10.0" - dependencies: - fast-deep-equal: "npm:^3.1.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - uri-js: "npm:^4.2.2" - checksum: 10/19f265a0895d1156cb13cb22a973cfce5587718b56c7e0141d8d60c1e7a016eb698aecffca158e06d2bac6d199d86c803a7ad686ba61a38e50a9e2e93894209b - languageName: node - linkType: hard - -"ajv@npm:^8.8.0": - version: 8.11.0 - resolution: "ajv@npm:8.11.0" - dependencies: - fast-deep-equal: "npm:^3.1.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - uri-js: "npm:^4.2.2" - checksum: 10/aa0dfd6cebdedde8e77747e84e7b7c55921930974b8547f54b4156164ff70445819398face32dafda4bd4c61bbc7513d308d4c2bf769f8ea6cb9c8449f9faf54 - languageName: node - linkType: hard - -"ansi-align@npm:^3.0.0": - version: 3.0.1 - resolution: "ansi-align@npm:3.0.1" - dependencies: - string-width: "npm:^4.1.0" - checksum: 10/4c7e8b6a10eaf18874ecee964b5db62ac86d0b9266ad4987b3a1efcb5d11a9e12c881ee40d14951833135a8966f10a3efe43f9c78286a6e632f53d85ad28b9c0 - languageName: node - linkType: hard - -"ansi-colors@npm:4.1.1, ansi-colors@npm:^4.1.1": - version: 4.1.1 - resolution: "ansi-colors@npm:4.1.1" - checksum: 10/e862fddd0a9ca88f1e7c9312ea70674cec3af360c994762309f6323730525e92c77d2715ee5f08aa8f438b7ca18efe378af647f501fc92b15b8e4b3b52d09db4 - languageName: node - linkType: hard - -"ansi-colors@npm:4.1.3, ansi-colors@npm:^4.1.3": - version: 4.1.3 - resolution: "ansi-colors@npm:4.1.3" - checksum: 10/43d6e2fc7b1c6e4dc373de708ee76311ec2e0433e7e8bd3194e7ff123ea6a747428fc61afdcf5969da5be3a5f0fd054602bec56fc0ebe249ce2fcde6e649e3c2 - languageName: node - linkType: hard - -"ansi-escapes@npm:^1.1.0": - version: 1.4.0 - resolution: "ansi-escapes@npm:1.4.0" - checksum: 10/287f18ea70cde710dbb83b6b6c4e1d62fcb962b951a601d976df69478a4ebdff6305691e3befb9053d740060544929732b8bade7a9781611dcd2b997e6bda3d6 - languageName: node - linkType: hard - -"ansi-escapes@npm:^3.0.0": - version: 3.2.0 - resolution: "ansi-escapes@npm:3.2.0" - checksum: 10/0f94695b677ea742f7f1eed961f7fd8d05670f744c6ad1f8f635362f6681dcfbc1575cb05b43abc7bb6d67e25a75fb8c7ea8f2a57330eb2c76b33f18cb2cef0a - languageName: node - linkType: hard - -"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0, ansi-escapes@npm:^4.3.1, ansi-escapes@npm:^4.3.2": - version: 4.3.2 - resolution: "ansi-escapes@npm:4.3.2" - dependencies: - type-fest: "npm:^0.21.3" - checksum: 10/8661034456193ffeda0c15c8c564a9636b0c04094b7f78bd01517929c17c504090a60f7a75f949f5af91289c264d3e1001d91492c1bd58efc8e100500ce04de2 - languageName: node - linkType: hard - -"ansi-gray@npm:^0.1.1": - version: 0.1.1 - resolution: "ansi-gray@npm:0.1.1" - dependencies: - ansi-wrap: "npm:0.1.0" - checksum: 10/b1f0cfefe43fb2f2f2f324daa578f528b7079514261e9ed060de05e21d99797e5fabf69d500c466c263f9c6302751a2c0709ab52324912cdee71be249deffbf7 - languageName: node - linkType: hard - -"ansi-html-community@npm:^0.0.8": - version: 0.0.8 - resolution: "ansi-html-community@npm:0.0.8" - bin: - ansi-html: bin/ansi-html - checksum: 10/08df3696720edacd001a8d53b197bb5728242c55484680117dab9f7633a6320e961a939bddd88ee5c71d4a64f3ddb49444d1c694bd0668adbb3f95ba114f2386 - languageName: node - linkType: hard - -"ansi-regex@npm:^2.0.0": - version: 2.1.1 - resolution: "ansi-regex@npm:2.1.1" - checksum: 10/190abd03e4ff86794f338a31795d262c1dfe8c91f7e01d04f13f646f1dcb16c5800818f886047876f1272f065570ab86b24b99089f8b68a0e11ff19aed4ca8f1 - languageName: node - linkType: hard - -"ansi-regex@npm:^3.0.0": - version: 3.0.1 - resolution: "ansi-regex@npm:3.0.1" - checksum: 10/09daf180c5f59af9850c7ac1bd7fda85ba596cc8cbeb210826e90755f06c818af86d9fa1e6e8322fab2c3b9e9b03f56c537b42241139f824dd75066a1e7257cc - languageName: node - linkType: hard - -"ansi-regex@npm:^4.1.0": - version: 4.1.1 - resolution: "ansi-regex@npm:4.1.1" - checksum: 10/b1a6ee44cb6ecdabaa770b2ed500542714d4395d71c7e5c25baa631f680fb2ad322eb9ba697548d498a6fd366949fc8b5bfcf48d49a32803611f648005b01888 - languageName: node - linkType: hard - -"ansi-regex@npm:^5.0.1": - version: 5.0.1 - resolution: "ansi-regex@npm:5.0.1" - checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b - languageName: node - linkType: hard - -"ansi-regex@npm:^6.0.1": - version: 6.0.1 - resolution: "ansi-regex@npm:6.0.1" - checksum: 10/1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 - languageName: node - linkType: hard - -"ansi-styles@npm:^2.2.1": - version: 2.2.1 - resolution: "ansi-styles@npm:2.2.1" - checksum: 10/ebc0e00381f2a29000d1dac8466a640ce11943cef3bda3cd0020dc042e31e1058ab59bf6169cd794a54c3a7338a61ebc404b7c91e004092dd20e028c432c9c2c - languageName: node - linkType: hard - -"ansi-styles@npm:^3.2.0, ansi-styles@npm:^3.2.1": - version: 3.2.1 - resolution: "ansi-styles@npm:3.2.1" - dependencies: - color-convert: "npm:^1.9.0" - checksum: 10/d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 - languageName: node - linkType: hard - -"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": - version: 4.3.0 - resolution: "ansi-styles@npm:4.3.0" - dependencies: - color-convert: "npm:^2.0.1" - checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff - languageName: node - linkType: hard - -"ansi-styles@npm:^5.0.0": - version: 5.2.0 - resolution: "ansi-styles@npm:5.2.0" - checksum: 10/d7f4e97ce0623aea6bc0d90dcd28881ee04cba06c570b97fd3391bd7a268eedfd9d5e2dd4fdcbdd82b8105df5faf6f24aaedc08eaf3da898e702db5948f63469 - languageName: node - linkType: hard - -"ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": - version: 6.2.1 - resolution: "ansi-styles@npm:6.2.1" - checksum: 10/70fdf883b704d17a5dfc9cde206e698c16bcd74e7f196ab821511651aee4f9f76c9514bdfa6ca3a27b5e49138b89cb222a28caf3afe4567570139577f991df32 - languageName: node - linkType: hard - -"ansi-wrap@npm:0.1.0": - version: 0.1.0 - resolution: "ansi-wrap@npm:0.1.0" - checksum: 10/f24f652a5e450c0561cbc7d298ffa62dcd33c72f9da34fd3c24538dbf82de8fc21b7f924dc30cd9d01360bd2893d1954f0a60eee0550ca629bb148dcbeef5c5b - languageName: node - linkType: hard - -"ansicolors@npm:~0.3.2": - version: 0.3.2 - resolution: "ansicolors@npm:0.3.2" - checksum: 10/0704d1485d84d65a47aacd3d2d26f501f21aeeb509922c8f2496d0ec5d346dc948efa64f3151aef0571d73e5c44eb10fd02f27f59762e9292fe123bb1ea9ff7d - languageName: node - linkType: hard - -"any-promise@npm:^1.0.0, any-promise@npm:^1.1.0": - version: 1.3.0 - resolution: "any-promise@npm:1.3.0" - checksum: 10/6737469ba353b5becf29e4dc3680736b9caa06d300bda6548812a8fee63ae7d336d756f88572fa6b5219aed36698d808fa55f62af3e7e6845c7a1dc77d240edb - languageName: node - linkType: hard - -"any-signal@npm:^3.0.0, any-signal@npm:^3.0.1": - version: 3.0.1 - resolution: "any-signal@npm:3.0.1" - checksum: 10/073eb14c365b7552f9f16fbf36cd76171e4a0fe156a8faa865fe1d5ac4ed2f5c5ab6e3faad0ac0d4c69511b5892971c5573baa8a1cbf85fe250d0c54ff0734ff - languageName: node - linkType: hard - -"anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": - version: 3.1.2 - resolution: "anymatch@npm:3.1.2" - dependencies: - normalize-path: "npm:^3.0.0" - picomatch: "npm:^2.0.4" - checksum: 10/985163db2292fac9e5a1e072bf99f1b5baccf196e4de25a0b0b81865ebddeb3b3eb4480734ef0a2ac8c002845396b91aa89121f5b84f93981a4658164a9ec6e9 - languageName: node - linkType: hard - -"apexcharts@npm:3.45.2": - version: 3.45.2 - resolution: "apexcharts@npm:3.45.2" - dependencies: - "@yr/monotone-cubic-spline": "npm:^1.0.3" - svg.draggable.js: "npm:^2.2.2" - svg.easing.js: "npm:^2.0.0" - svg.filter.js: "npm:^2.0.2" - svg.pathmorphing.js: "npm:^0.1.3" - svg.resize.js: "npm:^1.4.3" - svg.select.js: "npm:^3.0.1" - checksum: 10/a506604a1f61ecdaee5b75f3397e26b01365718cc14d97aa3222f94cae31cc25a9b9b548ae1576371357c32146dcc5dbe78ee2fce9eef320526f2a3868b9ce53 - languageName: node - linkType: hard - -"apisauce@npm:^2.1.5": - version: 2.1.6 - resolution: "apisauce@npm:2.1.6" - dependencies: - axios: "npm:^0.21.4" - checksum: 10/3a1b31780bcb192ebf3e58b3f8d6416f9e31e9518b01fbc0ecefab5e66f938fdb7a8537623bd131dc8c16d0fdeebd10f566c49c47015d1300a580974a4d96d26 - languageName: node - linkType: hard - -"apollo-datasource@npm:^3.3.2": - version: 3.3.2 - resolution: "apollo-datasource@npm:3.3.2" - dependencies: - "@apollo/utils.keyvaluecache": "npm:^1.0.1" - apollo-server-env: "npm:^4.2.1" - checksum: 10/70244e792655b357213b92e9dd0e8ca553724857847c9bedb53a1dbf7a92fc0d8b05a60d77203d6c30331599b44c5d7cc5f4d94c934465fa05b146b681ed2293 - languageName: node - linkType: hard - -"apollo-reporting-protobuf@npm:^3.4.0": - version: 3.4.0 - resolution: "apollo-reporting-protobuf@npm:3.4.0" - dependencies: - "@apollo/protobufjs": "npm:1.2.6" - checksum: 10/d6c731c1e07f952770166c71222a34ea97dd90f4b1d74f3261caa1542e1fb81a591c74586cd973c28c12e8bb9aa54ff0de411698f2311978f7144f98258c1a0b - languageName: node - linkType: hard - -"apollo-server-core@npm:^3.12.0": - version: 3.13.0 - resolution: "apollo-server-core@npm:3.13.0" - dependencies: - "@apollo/utils.keyvaluecache": "npm:^1.0.1" - "@apollo/utils.logger": "npm:^1.0.0" - "@apollo/utils.usagereporting": "npm:^1.0.0" - "@apollographql/apollo-tools": "npm:^0.5.3" - "@apollographql/graphql-playground-html": "npm:1.6.29" - "@graphql-tools/mock": "npm:^8.1.2" - "@graphql-tools/schema": "npm:^8.0.0" - "@josephg/resolvable": "npm:^1.0.0" - apollo-datasource: "npm:^3.3.2" - apollo-reporting-protobuf: "npm:^3.4.0" - apollo-server-env: "npm:^4.2.1" - apollo-server-errors: "npm:^3.3.1" - apollo-server-plugin-base: "npm:^3.7.2" - apollo-server-types: "npm:^3.8.0" - async-retry: "npm:^1.2.1" - fast-json-stable-stringify: "npm:^2.1.0" - graphql-tag: "npm:^2.11.0" - loglevel: "npm:^1.6.8" - lru-cache: "npm:^6.0.0" - node-abort-controller: "npm:^3.0.1" - sha.js: "npm:^2.4.11" - uuid: "npm:^9.0.0" - whatwg-mimetype: "npm:^3.0.0" - peerDependencies: - graphql: ^15.3.0 || ^16.0.0 - checksum: 10/7d0c7d712a2f3d70b08d4d0b303d73b9ccaf5edfa9de324724332f0949b51ff1da29fa720e598390843d27eeb73ae66978f49c130b3cf582b0851d1c58c8c44f - languageName: node - linkType: hard - -"apollo-server-env@npm:^4.2.1": - version: 4.2.1 - resolution: "apollo-server-env@npm:4.2.1" - dependencies: - node-fetch: "npm:^2.6.7" - checksum: 10/9172288c89c2ebb2a02d58542f807896de1ca0ba80c430f09242f2fa9ece40d7ecb8f9527357ba5e1d9997c64c364e7a9716e4f5485c5fb4938f69627bf1cea4 - languageName: node - linkType: hard - -"apollo-server-errors@npm:^3.3.1": - version: 3.3.1 - resolution: "apollo-server-errors@npm:3.3.1" - peerDependencies: - graphql: ^15.3.0 || ^16.0.0 - checksum: 10/5090af0280e40ce9b3b042fca6bd195d84c8507d8fe0b16b7fd52501b8f88cb2b5cca99882a9c5253f04c78b94ff2d350eb148867e20b0ddd6211071bb17f553 - languageName: node - linkType: hard - -"apollo-server-express@npm:^3.12.0": - version: 3.12.0 - resolution: "apollo-server-express@npm:3.12.0" - dependencies: - "@types/accepts": "npm:^1.3.5" - "@types/body-parser": "npm:1.19.2" - "@types/cors": "npm:2.8.12" - "@types/express": "npm:4.17.14" - "@types/express-serve-static-core": "npm:4.17.31" - accepts: "npm:^1.3.5" - apollo-server-core: "npm:^3.12.0" - apollo-server-types: "npm:^3.8.0" - body-parser: "npm:^1.19.0" - cors: "npm:^2.8.5" - parseurl: "npm:^1.3.3" - peerDependencies: - express: ^4.17.1 - graphql: ^15.3.0 || ^16.0.0 - checksum: 10/93bbf8967d3addb01bf1821a6db83c390f56380db46160aedfa1dc25200503915aa58cea6022bf582ab45fd30788340a1b9578175059b837eebbc8e7acf313f2 - languageName: node - linkType: hard - -"apollo-server-plugin-base@npm:^3.7.2": - version: 3.7.2 - resolution: "apollo-server-plugin-base@npm:3.7.2" - dependencies: - apollo-server-types: "npm:^3.8.0" - peerDependencies: - graphql: ^15.3.0 || ^16.0.0 - checksum: 10/b2599f51e66dce930208c1c6f6b4394e3bde6c635e971a80d677b33e7d3d6c2050453ede99bde66281e4d6d6675094b6fb50a5ec30d16e04bee13d7570ad2715 - languageName: node - linkType: hard - -"apollo-server-types@npm:^3.8.0": - version: 3.8.0 - resolution: "apollo-server-types@npm:3.8.0" - dependencies: - "@apollo/utils.keyvaluecache": "npm:^1.0.1" - "@apollo/utils.logger": "npm:^1.0.0" - apollo-reporting-protobuf: "npm:^3.4.0" - apollo-server-env: "npm:^4.2.1" - peerDependencies: - graphql: ^15.3.0 || ^16.0.0 - checksum: 10/c802fecba27ff5f0b45fc4a3d6c88e18c39c6e5ba5785db067588d4e0c7d56aba6f4dc69171b07ac6348e9e313b036c57c178af58b8b3414331517e0b280324e - languageName: node - linkType: hard - -"apollo-server@npm:^3.11.0": - version: 3.12.0 - resolution: "apollo-server@npm:3.12.0" - dependencies: - "@types/express": "npm:4.17.14" - apollo-server-core: "npm:^3.12.0" - apollo-server-express: "npm:^3.12.0" - express: "npm:^4.17.1" - peerDependencies: - graphql: ^15.3.0 || ^16.0.0 - checksum: 10/94aa09fb908840dc56e014c3dec178272555c0e2c73b7b22e030e67b2e6ed46c3c49a0fd542a89cc63c9c11ef390b288546d0ac59623fb220301f0bae93b88f7 - languageName: node - linkType: hard - -"app-module-path@npm:^2.2.0": - version: 2.2.0 - resolution: "app-module-path@npm:2.2.0" - checksum: 10/9ed8c6ce6247a6b5d556039f29b4610869237bbb5b8f3d905b22bd2d314c30efcc0fb70c2626d7461ecc52ec7edec9908f660d0938d2bea5b8cfc6868a28806f - languageName: node - linkType: hard - -"append-field@npm:^1.0.0": - version: 1.0.0 - resolution: "append-field@npm:1.0.0" - checksum: 10/afb50f5ff668af1cb66bc5cfebb55ed9a1d99e24901782ee83d00aed1a499835f9375a149cf27b17f79595ecfcc3d1de0cd5b020b210a5359c43eaf607c217de - languageName: node - linkType: hard - -"append-transform@npm:^0.4.0": - version: 0.4.0 - resolution: "append-transform@npm:0.4.0" - dependencies: - default-require-extensions: "npm:^1.0.0" - checksum: 10/f5edcf48e3327e8c9594d3ff57ea250401c1cda8dd2460704025fca5ef304b31cdba6e4ad522101ca69bd2245835add4831427bb18a7eb454ec275af08be11d0 - languageName: node - linkType: hard - -"append-transform@npm:^1.0.0": - version: 1.0.0 - resolution: "append-transform@npm:1.0.0" - dependencies: - default-require-extensions: "npm:^2.0.0" - checksum: 10/65fc4fe074aa1cf291763a5835b1e209b5e407597d6662c30b0921928be8a074f75e69e751ddf388ad16411dd61cb70351a10914090b354a7a447c7bc164b0ac - languageName: node - linkType: hard - -"append-transform@npm:^2.0.0": - version: 2.0.0 - resolution: "append-transform@npm:2.0.0" - dependencies: - default-require-extensions: "npm:^3.0.0" - checksum: 10/f26f393bf7a428fd1bb18f2758a819830a582243310c5170edb3f98fdc5a535333d02b952f7c2d9b14522bd8ead5b132a0b15000eca18fa9f49172963ebbc231 - languageName: node - linkType: hard - -"aproba@npm:^1.0.3 || ^2.0.0, aproba@npm:^2.0.0": - version: 2.0.0 - resolution: "aproba@npm:2.0.0" - checksum: 10/c2b9a631298e8d6f3797547e866db642f68493808f5b37cd61da778d5f6ada890d16f668285f7d60bd4fc3b03889bd590ffe62cf81b700e9bb353431238a0a7b - languageName: node - linkType: hard - -"archy@npm:^1.0.0": - version: 1.0.0 - resolution: "archy@npm:1.0.0" - checksum: 10/d7928049a57988b86df3f4de75ca16a4252ccee591d085c627e649fc54c5ae5daa833f17aa656bd825bd00bc0a2756ae03d2b983050bdbda1046b6d832bf7303 - languageName: node - linkType: hard - -"are-we-there-yet@npm:^2.0.0": - version: 2.0.0 - resolution: "are-we-there-yet@npm:2.0.0" - dependencies: - delegates: "npm:^1.0.0" - readable-stream: "npm:^3.6.0" - checksum: 10/ea6f47d14fc33ae9cbea3e686eeca021d9d7b9db83a306010dd04ad5f2c8b7675291b127d3fcbfcbd8fec26e47b3324ad5b469a6cc3733a582f2fe4e12fc6756 - languageName: node - linkType: hard - -"are-we-there-yet@npm:^3.0.0": - version: 3.0.0 - resolution: "are-we-there-yet@npm:3.0.0" - dependencies: - delegates: "npm:^1.0.0" - readable-stream: "npm:^3.6.0" - checksum: 10/7266eee19d0be9dd8e58b63cfb1e1ad45945125fac1e75f00237b55960891bf3bb0be291757a8d9dcf1dbfacfb3802d3eb3f9a064084a6a70a61fe0571f9318f - languageName: node - linkType: hard - -"arg@npm:^4.1.0": - version: 4.1.3 - resolution: "arg@npm:4.1.3" - checksum: 10/969b491082f20cad166649fa4d2073ea9e974a4e5ac36247ca23d2e5a8b3cb12d60e9ff70a8acfe26d76566c71fd351ee5e6a9a6595157eb36f92b1fd64e1599 - languageName: node - linkType: hard - -"arg@npm:^5.0.2": - version: 5.0.2 - resolution: "arg@npm:5.0.2" - checksum: 10/92fe7de222054a060fd2329e92e867410b3ea260328147ee3fb7855f78efae005f4087e698d4e688a856893c56bb09951588c40f2c901cf6996cd8cd7bcfef2c - languageName: node - linkType: hard - -"argparse@npm:^1.0.7": - version: 1.0.10 - resolution: "argparse@npm:1.0.10" - dependencies: - sprintf-js: "npm:~1.0.2" - checksum: 10/c6a621343a553ff3779390bb5ee9c2263d6643ebcd7843227bdde6cc7adbed796eb5540ca98db19e3fd7b4714e1faa51551f8849b268bb62df27ddb15cbcd91e - languageName: node - linkType: hard - -"argparse@npm:^2.0.1": - version: 2.0.1 - resolution: "argparse@npm:2.0.1" - checksum: 10/18640244e641a417ec75a9bd38b0b2b6b95af5199aa241b131d4b2fb206f334d7ecc600bd194861610a5579084978bfcbb02baa399dbe442d56d0ae5e60dbaef - languageName: node - linkType: hard - -"argsarray@npm:0.0.1": - version: 0.0.1 - resolution: "argsarray@npm:0.0.1" - checksum: 10/eee94a3de0626d87c73b8f3f749e72b2f5d2743aaaf750f14b7bbd5bd2dafa209d666e0af0cb9d2e2c65e5f3c885d3c42b91c356e54bcf003b18910f594fd830 - languageName: node - linkType: hard - -"aria-query@npm:5.1.3": - version: 5.1.3 - resolution: "aria-query@npm:5.1.3" - dependencies: - deep-equal: "npm:^2.0.5" - checksum: 10/e5da608a7c4954bfece2d879342b6c218b6b207e2d9e5af270b5e38ef8418f02d122afdc948b68e32649b849a38377785252059090d66fa8081da95d1609c0d2 - languageName: node - linkType: hard - -"aria-query@npm:^5.0.0, aria-query@npm:^5.1.3": - version: 5.3.0 - resolution: "aria-query@npm:5.3.0" - dependencies: - dequal: "npm:^2.0.3" - checksum: 10/c3e1ed127cc6886fea4732e97dd6d3c3938e64180803acfb9df8955517c4943760746ffaf4020ce8f7ffaa7556a3b5f85c3769a1f5ca74a1288e02d042f9ae4e - languageName: node - linkType: hard - -"arr-diff@npm:^2.0.0": - version: 2.0.0 - resolution: "arr-diff@npm:2.0.0" - dependencies: - arr-flatten: "npm:^1.0.1" - checksum: 10/b56e8d34e8c8d8dba40de3235c61e3ef4e3626486d6d1c83c34fba4fe6187eff96ffde872100e834e8931e724a96ab9dbd71b0bf0068ba5a3deb7d19cb596892 - languageName: node - linkType: hard - -"arr-diff@npm:^4.0.0": - version: 4.0.0 - resolution: "arr-diff@npm:4.0.0" - checksum: 10/ea7c8834842ad3869297f7915689bef3494fd5b102ac678c13ffccab672d3d1f35802b79e90c4cfec2f424af3392e44112d1ccf65da34562ed75e049597276a0 - languageName: node - linkType: hard - -"arr-flatten@npm:^1.0.1": - version: 1.1.0 - resolution: "arr-flatten@npm:1.1.0" - checksum: 10/963fe12564fca2f72c055f3f6c206b9e031f7c433a0c66ca9858b484821f248c5b1e5d53c8e4989d80d764cd776cf6d9b160ad05f47bdc63022bfd63b5455e22 - languageName: node - linkType: hard - -"arr-union@npm:^3.1.0": - version: 3.1.0 - resolution: "arr-union@npm:3.1.0" - checksum: 10/b5b0408c6eb7591143c394f3be082fee690ddd21f0fdde0a0a01106799e847f67fcae1b7e56b0a0c173290e29c6aca9562e82b300708a268bc8f88f3d6613cb9 - languageName: node - linkType: hard - -"array-buffer-byte-length@npm:^1.0.0": - version: 1.0.0 - resolution: "array-buffer-byte-length@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - is-array-buffer: "npm:^3.0.1" - checksum: 10/044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 - languageName: node - linkType: hard - -"array-buffer-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "array-buffer-byte-length@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.5" - is-array-buffer: "npm:^3.0.4" - checksum: 10/53524e08f40867f6a9f35318fafe467c32e45e9c682ba67b11943e167344d2febc0f6977a17e699b05699e805c3e8f073d876f8bbf1b559ed494ad2cd0fae09e - languageName: node - linkType: hard - -"array-differ@npm:^3.0.0": - version: 3.0.0 - resolution: "array-differ@npm:3.0.0" - checksum: 10/117edd9df5c1530bd116c6e8eea891d4bd02850fd89b1b36e532b6540e47ca620a373b81feca1c62d1395d9ae601516ba538abe5e8172d41091da2c546b05fb7 - languageName: node - linkType: hard - -"array-differ@npm:^4.0.0": - version: 4.0.0 - resolution: "array-differ@npm:4.0.0" - checksum: 10/1de99a06bc3219f96b062a561a4c19af7a68bfaf2c1e0ccedd1d82ce1fbc7757f939e03cf0d3ad76b71f855a8ad2b2a16bf53df331bf5f0c90002774f04fb0b5 - languageName: node - linkType: hard - -"array-flatten@npm:1.1.1": - version: 1.1.1 - resolution: "array-flatten@npm:1.1.1" - checksum: 10/e13c9d247241be82f8b4ec71d035ed7204baa82fae820d4db6948d30d3c4a9f2b3905eb2eec2b937d4aa3565200bd3a1c500480114cff649fa748747d2a50feb - languageName: node - linkType: hard - -"array-flatten@npm:^2.1.2": - version: 2.1.2 - resolution: "array-flatten@npm:2.1.2" - checksum: 10/e8988aac1fbfcdaae343d08c9a06a6fddd2c6141721eeeea45c3cf523bf4431d29a46602929455ed548c7a3e0769928cdc630405427297e7081bd118fdec9262 - languageName: node - linkType: hard - -"array-from@npm:^2.1.1": - version: 2.1.1 - resolution: "array-from@npm:2.1.1" - checksum: 10/38dbc69b284ebcbbc7012c2c2a68926ece1700f00ae40f08881cd7d27db0e8efc0d349d024d1e7931be37734443323279686d44266af25abb48fb4d441e932e9 - languageName: node - linkType: hard - -"array-ify@npm:^1.0.0": - version: 1.0.0 - resolution: "array-ify@npm:1.0.0" - checksum: 10/c0502015b319c93dd4484f18036bcc4b654eb76a4aa1f04afbcef11ac918859bb1f5d71ba1f0f1141770db9eef1a4f40f1761753650873068010bbf7bcdae4a4 - languageName: node - linkType: hard - -"array-includes@npm:^3.1.6": - version: 3.1.6 - resolution: "array-includes@npm:3.1.6" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - get-intrinsic: "npm:^1.1.3" - is-string: "npm:^1.0.7" - checksum: 10/a7168bd16821ec76b95a8f50f73076577a7cbd6c762452043d2b978c8a5fa4afe4f98a025d6f1d5c971b8d0b440b4ee73f6a57fc45382c858b8e17c275015428 - languageName: node - linkType: hard - -"array-includes@npm:^3.1.7": - version: 3.1.7 - resolution: "array-includes@npm:3.1.7" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" - is-string: "npm:^1.0.7" - checksum: 10/856a8be5d118967665936ad33ff3b07adfc50b06753e596e91fb80c3da9b8c022e92e3cc6781156d6ad95db7109b9f603682c7df2d6a529ed01f7f6b39a4a360 - languageName: node - linkType: hard - -"array-index@npm:^1.0.0": - version: 1.0.0 - resolution: "array-index@npm:1.0.0" - dependencies: - debug: "npm:^2.2.0" - es6-symbol: "npm:^3.0.2" - checksum: 10/9f1f04ebeb860c7f095a316740999066ccb12aa010041e14d93218f4ba128492d7613509deae24a9e434c65b6d747d7bc8852e02132a3d1a0435e3557065eecf - languageName: node - linkType: hard - -"array-timsort@npm:^1.0.3": - version: 1.0.3 - resolution: "array-timsort@npm:1.0.3" - checksum: 10/f417f073b3733baec3a80decdf5d45bf763f04676ef3610b0e71f9b1d88c6e4c38154c05b28b31529d308bfd0e043d08059fcd9df966245a1276af15b5584936 - languageName: node - linkType: hard - -"array-union@npm:^2.1.0": - version: 2.1.0 - resolution: "array-union@npm:2.1.0" - checksum: 10/5bee12395cba82da674931df6d0fea23c4aa4660cb3b338ced9f828782a65caa232573e6bf3968f23e0c5eb301764a382cef2f128b170a9dc59de0e36c39f98d - languageName: node - linkType: hard - -"array-union@npm:^3.0.1": - version: 3.0.1 - resolution: "array-union@npm:3.0.1" - checksum: 10/47b29f88258e8f37ffb93ddaa327d4308edd950b52943c172b73558afdd3fa74cfd68816ba5aa4b894242cf281fa3c6d0362ae057e4a18bddbaedbe46ebe7112 - languageName: node - linkType: hard - -"array-unique@npm:^0.2.1": - version: 0.2.1 - resolution: "array-unique@npm:0.2.1" - checksum: 10/899deaf07abedf17ee89a757c7bcc9253fb248a7f6c394a1fec9ec3f3ac244314feb3048efee80ed7fdcb047960e32d7c234291bfd26b78ced668c346d9f4e3c - languageName: node - linkType: hard - -"array-unique@npm:^0.3.2": - version: 0.3.2 - resolution: "array-unique@npm:0.3.2" - checksum: 10/da344b89cfa6b0a5c221f965c21638bfb76b57b45184a01135382186924f55973cd9b171d4dad6bf606c6d9d36b0d721d091afdc9791535ead97ccbe78f8a888 - languageName: node - linkType: hard - -"array.prototype.every@npm:^1.1.4": - version: 1.1.4 - resolution: "array.prototype.every@npm:1.1.4" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - is-string: "npm:^1.0.7" - checksum: 10/1c036bfbdc51aa364d0a98cda80f794c11e56414a3c8e51c89ac30b21faff93dbe860cf4394267b09686ecd3fff046a399ecd4524491a5f6a81db08f8852bccb - languageName: node - linkType: hard - -"array.prototype.filter@npm:^1.0.3": - version: 1.0.3 - resolution: "array.prototype.filter@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-array-method-boxes-properly: "npm:^1.0.0" - is-string: "npm:^1.0.7" - checksum: 10/3da2189afb00f95559cc73fc3c50f17a071a65bb705c0b2f2e2a2b2142781215b622442368c8b4387389b6ab251adf09ad347f9a8a4cf29d24404cc5ea1e295c - languageName: node - linkType: hard - -"array.prototype.find@npm:^2.0.1": - version: 2.2.1 - resolution: "array.prototype.find@npm:2.2.1" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/3bde6c9137a1b11e28c8e098574ae93aa4c660f3b917ab08e7076ee8ca32704ee158d562437b38b8a5a03b0f0ccacf4df9b7a4e4b4497f4bbe66b8406dc334e5 - languageName: node - linkType: hard - -"array.prototype.findlastindex@npm:^1.2.2": - version: 1.2.2 - resolution: "array.prototype.findlastindex@npm:1.2.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-shim-unscopables: "npm:^1.0.0" - get-intrinsic: "npm:^1.1.3" - checksum: 10/a97b6dad48ac27bccb1a062c1d9dec6726bcedf34d6be2ee7b9ed9a8db519df6d278b8011c2d6c49ed70802488f23ab10c0142606ef58e48dbc0a035a810318e - languageName: node - linkType: hard - -"array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.4 - resolution: "array.prototype.findlastindex@npm:1.2.4" - dependencies: - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.3" - es-errors: "npm:^1.3.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10/12d7de8da619065b9d4c40550d11c13f2fbbc863c4270ef01d022f49ef16fbe9022441ee9d60b1e952853c661dd4b3e05c21e4348d4631c6d93ddf802a252296 - languageName: node - linkType: hard - -"array.prototype.flat@npm:^1.3.1": - version: 1.3.1 - resolution: "array.prototype.flat@npm:1.3.1" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/787bd3e93887b1c12cfed018864cb819a4fe361728d4aadc7b401b0811cf923121881cca369557432529ffa803a463f01e37eaa4b52e4c13bc574c438cd615cb - languageName: node - linkType: hard - -"array.prototype.flat@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flat@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/d9d2f6f27584de92ec7995bc931103e6de722cd2498bdbfc4cba814fc3e52f056050a93be883018811f7c0a35875f5056584a0e940603a5e5934f0279896aebe - languageName: node - linkType: hard - -"array.prototype.flatmap@npm:^1.3.1": - version: 1.3.1 - resolution: "array.prototype.flatmap@npm:1.3.1" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/f1f3d8e0610afce06a8622295b4843507dfc2fbbd2c2b2a8d541d9f42871747393c3099d630a3f8266ca086b97b089687db64cd86b6eb7e270ebc8f767eec9fc - languageName: node - linkType: hard - -"array.prototype.flatmap@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flatmap@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/33f20006686e0cbe844fde7fd290971e8366c6c5e3380681c2df15738b1df766dd02c7784034aeeb3b037f65c496ee54de665388288edb323a2008bb550f77ea - languageName: node - linkType: hard - -"array.prototype.reduce@npm:^1.0.5": - version: 1.0.5 - resolution: "array.prototype.reduce@npm:1.0.5" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-array-method-boxes-properly: "npm:^1.0.0" - is-string: "npm:^1.0.7" - checksum: 10/ad8976da587854088fe8d5290e0709d670ba0dcac840b380b4aee11eae61b25fa78c324373387d39f4242345fda9cc57ff1b0cbfe510b9afa0cd1624ab1a1cab - languageName: node - linkType: hard - -"array.prototype.reduce@npm:^1.0.6": - version: 1.0.6 - resolution: "array.prototype.reduce@npm:1.0.6" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-array-method-boxes-properly: "npm:^1.0.0" - is-string: "npm:^1.0.7" - checksum: 10/991989a3edb9716a3e3c6feb67a09abc8317e42535f1560156784e920f521418fff43abec57d14684015ef2d3f134830962b47b3d0be0c8a5dd68d8d7c65b9c1 - languageName: node - linkType: hard - -"array.prototype.tosorted@npm:^1.1.1": - version: 1.1.1 - resolution: "array.prototype.tosorted@npm:1.1.1" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-shim-unscopables: "npm:^1.0.0" - get-intrinsic: "npm:^1.1.3" - checksum: 10/23e86074d0dda9260aaa137ec45ae5a8196916ee3f256e41665381f120fdb5921bd84ad93eeba8d0234e5cd355093049585167ba2307fde340e5cee15b12415d - languageName: node - linkType: hard - -"arraybuffer.prototype.slice@npm:^1.0.1": - version: 1.0.1 - resolution: "arraybuffer.prototype.slice@npm:1.0.1" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - get-intrinsic: "npm:^1.2.1" - is-array-buffer: "npm:^3.0.2" - is-shared-array-buffer: "npm:^1.0.2" - checksum: 10/e3e9b2a3e988ebfeddce4c7e8f69df730c9e48cb04b0d40ff0874ce3d86b3d1339dd520ffde5e39c02610bc172ecfbd4bc93324b1cabd9554c44a56b131ce0ce - languageName: node - linkType: hard - -"arraybuffer.prototype.slice@npm:^1.0.3": - version: 1.0.3 - resolution: "arraybuffer.prototype.slice@npm:1.0.3" - dependencies: - array-buffer-byte-length: "npm:^1.0.1" - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.3" - es-errors: "npm:^1.2.1" - get-intrinsic: "npm:^1.2.3" - is-array-buffer: "npm:^3.0.4" - is-shared-array-buffer: "npm:^1.0.2" - checksum: 10/0221f16c1e3ec7b67da870ee0e1f12b825b5f9189835392b59a22990f715827561a4f4cd5330dc7507de272d8df821be6cd4b0cb569babf5ea4be70e365a2f3d - languageName: node - linkType: hard - -"arrify@npm:^1.0.0, arrify@npm:^1.0.1": - version: 1.0.1 - resolution: "arrify@npm:1.0.1" - checksum: 10/745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 - languageName: node - linkType: hard - -"arrify@npm:^2.0.1": - version: 2.0.1 - resolution: "arrify@npm:2.0.1" - checksum: 10/067c4c1afd182806a82e4c1cb8acee16ab8b5284fbca1ce29408e6e91281c36bb5b612f6ddfbd40a0f7a7e0c75bf2696eb94c027f6e328d6e9c52465c98e4209 - languageName: node - linkType: hard - -"arrify@npm:^3.0.0": - version: 3.0.0 - resolution: "arrify@npm:3.0.0" - checksum: 10/d6c6f3dad9571234f320e130d57fddb2cc283c87f2ac7df6c7005dffc5161b7bb9376f4be655ed257050330336e84afc4f3020d77696ad231ff580a94ae5aba6 - languageName: node - linkType: hard - -"asap@npm:~2.0.6": - version: 2.0.6 - resolution: "asap@npm:2.0.6" - checksum: 10/b244c0458c571945e4b3be0b14eb001bea5596f9868cc50cc711dc03d58a7e953517d3f0dad81ccde3ff37d1f074701fa76a6f07d41aaa992d7204a37b915dda - languageName: node - linkType: hard - -"asmcrypto.js@npm:^0.22.0": - version: 0.22.0 - resolution: "asmcrypto.js@npm:0.22.0" - checksum: 10/cda8f3e726d6917162fe474da99fd46138d934d2bae30f9ce4c30fddc7195bcd5f3ff8056972dfa6c811b364da523f5664f50658dbad5438570e0cc3c95781ed - languageName: node - linkType: hard - -"asn1.js@npm:^4.10.1": - version: 4.10.1 - resolution: "asn1.js@npm:4.10.1" - dependencies: - bn.js: "npm:^4.0.0" - inherits: "npm:^2.0.1" - minimalistic-assert: "npm:^1.0.0" - checksum: 10/5a02104b9ba167917c786a3fdac9840a057d29e6b609250e6af924d0529ead1a32417da13eec809cadea8f991eb67782196f3df427c5b4f30eaf22044fc64fda - languageName: node - linkType: hard - -"asn1.js@npm:^5.0.1, asn1.js@npm:^5.2.0": - version: 5.4.1 - resolution: "asn1.js@npm:5.4.1" - dependencies: - bn.js: "npm:^4.0.0" - inherits: "npm:^2.0.1" - minimalistic-assert: "npm:^1.0.0" - safer-buffer: "npm:^2.1.0" - checksum: 10/63d57c766f6afc81ff175bbf922626b3778d770c8b91b32cbcf672d7bf73b4198aca66c60a6427bff3aebc48feff1eab4a161f2681b7300b6c5b775a1e6fd791 - languageName: node - linkType: hard - -"asn1@npm:^0.2.4, asn1@npm:^0.2.6, asn1@npm:~0.2.3": - version: 0.2.6 - resolution: "asn1@npm:0.2.6" - dependencies: - safer-buffer: "npm:~2.1.0" - checksum: 10/cf629291fee6c1a6f530549939433ebf32200d7849f38b810ff26ee74235e845c0c12b2ed0f1607ac17383d19b219b69cefa009b920dab57924c5c544e495078 - languageName: node - linkType: hard - -"asn1js@npm:^3.0.1, asn1js@npm:^3.0.5": - version: 3.0.5 - resolution: "asn1js@npm:3.0.5" - dependencies: - pvtsutils: "npm:^1.3.2" - pvutils: "npm:^1.1.3" - tslib: "npm:^2.4.0" - checksum: 10/17fb0302432186631550de9606a4622ec366646d072cde9cdf4bcafa47bd2425e157eeb7b1377ee6520f8b46687b4ecaee31cf0ad2fa494361a1938b2ed53194 - languageName: node - linkType: hard - -"assert-plus@npm:1.0.0, assert-plus@npm:^1.0.0": - version: 1.0.0 - resolution: "assert-plus@npm:1.0.0" - checksum: 10/f4f991ae2df849cc678b1afba52d512a7cbf0d09613ba111e72255409ff9158550c775162a47b12d015d1b82b3c273e8e25df0e4783d3ddb008a293486d00a07 - languageName: node - linkType: hard - -"assert@npm:^2.0.0": - version: 2.0.0 - resolution: "assert@npm:2.0.0" - dependencies: - es6-object-assign: "npm:^1.1.0" - is-nan: "npm:^1.2.1" - object-is: "npm:^1.0.1" - util: "npm:^0.12.0" - checksum: 10/5bd5e80a0dc5fce9ac812254ad39bcec8c224878705e5021a1a0ae84e2c30b980f90584ef544a5f6b1cd79edb002e80972367731260dac723c7a6f76e0fcd2ea - languageName: node - linkType: hard - -"assertion-error-formatter@npm:^2.0.1": - version: 2.0.1 - resolution: "assertion-error-formatter@npm:2.0.1" - dependencies: - diff: "npm:^3.0.0" - pad-right: "npm:^0.2.2" - repeat-string: "npm:^1.6.1" - checksum: 10/6c054ba5adec3e84d145aeecfc1ade92559ae1ab1a53539fc4dbdd309e0f1ed2b813a01cf7e3300a72ce77d1db52f4379869bc3ec5250918ab36443a6cd375ef - languageName: node - linkType: hard - -"assertion-error@npm:^1.1.0": - version: 1.1.0 - resolution: "assertion-error@npm:1.1.0" - checksum: 10/fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf - languageName: node - linkType: hard - -"assign-symbols@npm:^1.0.0": - version: 1.0.0 - resolution: "assign-symbols@npm:1.0.0" - checksum: 10/c0eb895911d05b6b2d245154f70461c5e42c107457972e5ebba38d48967870dee53bcdf6c7047990586daa80fab8dab3cc6300800fbd47b454247fdedd859a2c - languageName: node - linkType: hard - -"ast-module-types@npm:^5.0.0": - version: 5.0.0 - resolution: "ast-module-types@npm:5.0.0" - checksum: 10/188a0c331929962c7ea0d9174b31393d31b0f9d5cc3bb3ad1dcb6f94c611eddfff10194104f247f1cba03f0bb9a2b5c757e619f5a5940333f60b8a12a7db244d - languageName: node - linkType: hard - -"ast-types-flow@npm:^0.0.7": - version: 0.0.7 - resolution: "ast-types-flow@npm:0.0.7" - checksum: 10/663b90e99b56ee2d7f736a6b6fff8b3c5404f28fa1860bb8d83ee5a9bff9e687520d0d6d9db6edff5a34fd4d3c0c11a3beb1cf75e43c9a880cca04371cc99808 - languageName: node - linkType: hard - -"astral-regex@npm:^2.0.0": - version: 2.0.0 - resolution: "astral-regex@npm:2.0.0" - checksum: 10/876231688c66400473ba505731df37ea436e574dd524520294cc3bbc54ea40334865e01fa0d074d74d036ee874ee7e62f486ea38bc421ee8e6a871c06f011766 - languageName: node - linkType: hard - -"async-eventemitter@npm:0.2.4, async-eventemitter@npm:^0.2.2": - version: 0.2.4 - resolution: "async-eventemitter@npm:0.2.4" - dependencies: - async: "npm:^2.4.0" - checksum: 10/4f927de88add821cb11640dcbbc8bad561dace016b661ad8d597b60641d57cee740477a34ba9832b60f89a93cad43e78a3eb881f00fe0da49a85844a7b9de026 - languageName: node - linkType: hard - -"async-exit-hook@npm:2.0.1": - version: 2.0.1 - resolution: "async-exit-hook@npm:2.0.1" - checksum: 10/fffabbe5ef194ec8283efed48eaf8f4b7982d547de6d4cf7aadf83c8690f0f7929ad01b7cb5de99935ea8f3deb2c21fd009892d8215a43b5a2dcc55c04d42c9f - languageName: node - linkType: hard - -"async-hook-domain@npm:^2.0.4": - version: 2.0.4 - resolution: "async-hook-domain@npm:2.0.4" - checksum: 10/a4fda54d73da08d73f6b6e636e112e5963ae00ede8b57049a2b1de2aac9f5692e3383027a196ffc3f7b88b37aa26b35b2c3c8ee710b8cc215f3c3cdbb221764f - languageName: node - linkType: hard - -"async-mutex@npm:0.4.0": - version: 0.4.0 - resolution: "async-mutex@npm:0.4.0" - dependencies: - tslib: "npm:^2.4.0" - checksum: 10/4a55065aae8c7283e45e2a8ac38ba9812f030696640d650c4ec62cfd67e5d61bd698e67b758a81fcb845e2d5ea1d857106f9235cc4282ad40cd1944b26fde1b2 - languageName: node - linkType: hard - -"async-retry@npm:^1.2.1": - version: 1.3.3 - resolution: "async-retry@npm:1.3.3" - dependencies: - retry: "npm:0.13.1" - checksum: 10/38a7152ff7265a9321ea214b9c69e8224ab1febbdec98efbbde6e562f17ff68405569b796b1c5271f354aef8783665d29953f051f68c1fc45306e61aec82fdc4 - languageName: node - linkType: hard - -"async@npm:^1.4.2": - version: 1.5.2 - resolution: "async@npm:1.5.2" - checksum: 10/8afcdcee05168250926a3e7bd4dfaa74b681a74f634bae2af424fb716042461cbd20a375d9bc2534daa50a2d45286c9b174952fb239cee4ab8d6351a40c65327 - languageName: node - linkType: hard - -"async@npm:^2.0.1, async@npm:^2.1.2, async@npm:^2.4.0, async@npm:^2.6.0, async@npm:^2.6.1": - version: 2.6.4 - resolution: "async@npm:2.6.4" - dependencies: - lodash: "npm:^4.17.14" - checksum: 10/df8e52817d74677ab50c438d618633b9450aff26deb274da6dfedb8014130909482acdc7753bce9b72e6171ce9a9f6a92566c4ced34c3cb3714d57421d58ad27 - languageName: node - linkType: hard - -"async@npm:^3.0.0, async@npm:^3.1.0": - version: 3.2.4 - resolution: "async@npm:3.2.4" - checksum: 10/bebb5dc2258c45b83fa1d3be179ae0eb468e1646a62d443c8d60a45e84041b28fccebe1e2d1f234bfc3dcad44e73dcdbf4ba63d98327c9f6556e3dbd47c2ae8b - languageName: node - linkType: hard - -"async@npm:^3.2.3": - version: 3.2.3 - resolution: "async@npm:3.2.3" - checksum: 10/1265841be4f461fb17a8ed1c6ac1d427c57b33fea999cefdcee588f08f218886fd41d48da6943e4dca6a8ccd76d4536b6901a28927588ff671ce0ed61ac415a2 - languageName: node - linkType: hard - -"async@npm:~1.0.0": - version: 1.0.0 - resolution: "async@npm:1.0.0" - checksum: 10/c5a0ece08e65afd77f8f94ccf67350dec41fe99022794396e938b10350c9399fd8ff37d3a91d8333d15d6b96bfc5bec16d92da866aa43af8114989c037e9fb74 - languageName: node - linkType: hard - -"asynciterator.prototype@npm:^1.0.0": - version: 1.0.0 - resolution: "asynciterator.prototype@npm:1.0.0" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10/e8ebfd9493ac651cf9b4165e9d64030b3da1d17181bb1963627b59e240cdaf021d9b59d44b827dc1dde4e22387ec04c2d0f8720cf58a1c282e34e40cc12721b3 - languageName: node - linkType: hard - -"asynckit@npm:^0.4.0": - version: 0.4.0 - resolution: "asynckit@npm:0.4.0" - checksum: 10/3ce727cbc78f69d6a4722517a58ee926c8c21083633b1d3fdf66fd688f6c127a53a592141bd4866f9b63240a86e9d8e974b13919450bd17fa33c2d22c4558ad8 - languageName: node - linkType: hard - -"at-least-node@npm:^1.0.0": - version: 1.0.0 - resolution: "at-least-node@npm:1.0.0" - checksum: 10/463e2f8e43384f1afb54bc68485c436d7622acec08b6fad269b421cb1d29cebb5af751426793d0961ed243146fe4dc983402f6d5a51b720b277818dbf6f2e49e - languageName: node - linkType: hard - -"atob@npm:^2.1.2": - version: 2.1.2 - resolution: "atob@npm:2.1.2" - bin: - atob: bin/atob.js - checksum: 10/0624406cc0295533b38b60ab2e3b028aa7b8225f37e0cde6be3bc5c13a8015c889b192e874fd7660671179cef055f2e258855f372b0e495bd4096cf0b4785c25 - languageName: node - linkType: hard - -"atomic-sleep@npm:^1.0.0": - version: 1.0.0 - resolution: "atomic-sleep@npm:1.0.0" - checksum: 10/3ab6d2cf46b31394b4607e935ec5c1c3c4f60f3e30f0913d35ea74b51b3585e84f590d09e58067f11762eec71c87d25314ce859030983dc0e4397eed21daa12e - languageName: node - linkType: hard - -"atomically@npm:^1.7.0": - version: 1.7.0 - resolution: "atomically@npm:1.7.0" - checksum: 10/085a81b7c34183c6b05e3f53beae9900657efa8cf366ba086fd76481095f001b8eb4566d02e0d34ecc296bfc832eee8319049db314de39ac360fb4b128e7ec5e - languageName: node - linkType: hard - -"auto-bind@npm:4.0.0": - version: 4.0.0 - resolution: "auto-bind@npm:4.0.0" - checksum: 10/00cad71cce5742faccb7dd65c1b55ebc4f45add4b0c9a1547b10b05bab22813230133b0c892c67ba3eb969a4524710c5e43cc45c72898ec84e56f3a596e7a04f - languageName: node - linkType: hard - -"autoprefixer@npm:10.4.14": - version: 10.4.14 - resolution: "autoprefixer@npm:10.4.14" - dependencies: - browserslist: "npm:^4.21.5" - caniuse-lite: "npm:^1.0.30001464" - fraction.js: "npm:^4.2.0" - normalize-range: "npm:^0.1.2" - picocolors: "npm:^1.0.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.1.0 - bin: - autoprefixer: bin/autoprefixer - checksum: 10/9cee5c32557611520aadf3f0caacccaf37fe845e5e8f042a0e1321a235725b537edc01e5897206fd68322997430fdd38fe63f52a1c926d64f4a5514ee5acab81 - languageName: node - linkType: hard - -"autoprefixer@npm:10.4.18": - version: 10.4.18 - resolution: "autoprefixer@npm:10.4.18" - dependencies: - browserslist: "npm:^4.23.0" - caniuse-lite: "npm:^1.0.30001591" - fraction.js: "npm:^4.3.7" - normalize-range: "npm:^0.1.2" - picocolors: "npm:^1.0.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.1.0 - bin: - autoprefixer: bin/autoprefixer - checksum: 10/c5bc0b539451557ac0b531bd6dad2db50499cf3d5daff9ead57d0d90d8f63ea6aa0e0556cbda3fbd3d081ec1199202f14533d54494ea47f42b239852d6bde16f - languageName: node - linkType: hard - -"autoprefixer@npm:^10.4.13": - version: 10.4.15 - resolution: "autoprefixer@npm:10.4.15" - dependencies: - browserslist: "npm:^4.21.10" - caniuse-lite: "npm:^1.0.30001520" - fraction.js: "npm:^4.2.0" - normalize-range: "npm:^0.1.2" - picocolors: "npm:^1.0.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.1.0 - bin: - autoprefixer: bin/autoprefixer - checksum: 10/99ab82461d33bb79318dbf26c76d207eab8bf98680d8981aeddf7af4208fd57579b4c68dcf576b1d1baba8bd5410665b9406eac468f8119bd42e11b9ff0074b7 - languageName: node - linkType: hard - -"available-typed-arrays@npm:^1.0.5": - version: 1.0.5 - resolution: "available-typed-arrays@npm:1.0.5" - checksum: 10/4d4d5e86ea0425696f40717882f66a570647b94ac8d273ddc7549a9b61e5da099e149bf431530ccbd776bd74e02039eb8b5edf426e3e2211ee61af16698a9064 - languageName: node - linkType: hard - -"available-typed-arrays@npm:^1.0.6, available-typed-arrays@npm:^1.0.7": - version: 1.0.7 - resolution: "available-typed-arrays@npm:1.0.7" - dependencies: - possible-typed-array-names: "npm:^1.0.0" - checksum: 10/6c9da3a66caddd83c875010a1ca8ef11eac02ba15fb592dc9418b2b5e7b77b645fa7729380a92d9835c2f05f2ca1b6251f39b993e0feb3f1517c74fa1af02cab - languageName: node - linkType: hard - -"avvio@npm:^8.3.0": - version: 8.4.0 - resolution: "avvio@npm:8.4.0" - dependencies: - "@fastify/error": "npm:^3.3.0" - fastq: "npm:^1.17.1" - checksum: 10/b98ffd99743d404d32094a26ce5296937cdfc8a7c75837fedfb79b409a9a51b177173aa90e930b1fa453965b5fa18ee4548dca20eac191846d5de91c487c4da4 - languageName: node - linkType: hard - -"aws-sdk@npm:2.965.0": - version: 2.965.0 - resolution: "aws-sdk@npm:2.965.0" - dependencies: - buffer: "npm:4.9.2" - events: "npm:1.1.1" - ieee754: "npm:1.1.13" - jmespath: "npm:0.15.0" - querystring: "npm:0.2.0" - sax: "npm:1.2.1" - url: "npm:0.10.3" - uuid: "npm:3.3.2" - xml2js: "npm:0.4.19" - checksum: 10/b6c4fd0d6f2b308939a4ad1ecb48a85719cbf487a02511428ac0edbe79a85fee566896778ab47ddc3ac480e7ffe9e3e75dd0a28c15b286d0155485ee58462358 - languageName: node - linkType: hard - -"aws-sign2@npm:~0.7.0": - version: 0.7.0 - resolution: "aws-sign2@npm:0.7.0" - checksum: 10/2ac497d739f71be3264cf096a33ab256a1fea7fe80b87dc51ec29374505bd5a661279ef1c22989d68528ea61ed634021ca63b31cf1d3c2a3682ffc106f7d0e96 - languageName: node - linkType: hard - -"aws4@npm:^1.8.0": - version: 1.11.0 - resolution: "aws4@npm:1.11.0" - checksum: 10/54886f07b3f9555f7f3ae9fb2aef7abbac302e892263ec4d9901f4502e667bb302a0639672f6bc8453033102ddd2512b79886a7de417dc0c24ecce003a888297 - languageName: node - linkType: hard - -"axe-core@npm:^4.6.2": - version: 4.7.2 - resolution: "axe-core@npm:4.7.2" - checksum: 10/1b94fcbe203296fc7174992a3d70dbcd477d88b933afa045aaffa1704fe63d8da8945e4b38fc576f9c7384abeb353e2d6607ab54d25b5c90b255ef2244bda29a - languageName: node - linkType: hard - -"axios@npm:>=0.27.2": - version: 1.7.2 - resolution: "axios@npm:1.7.2" - dependencies: - follow-redirects: "npm:^1.15.6" - form-data: "npm:^4.0.0" - proxy-from-env: "npm:^1.1.0" - checksum: 10/6ae80dda9736bb4762ce717f1a26ff997d94672d3a5799ad9941c24d4fb019c1dff45be8272f08d1975d7950bac281f3ba24aff5ecd49ef5a04d872ec428782f - languageName: node - linkType: hard - -"axobject-query@npm:^3.1.1": - version: 3.2.1 - resolution: "axobject-query@npm:3.2.1" - dependencies: - dequal: "npm:^2.0.3" - checksum: 10/675af2548ed4ece75ad6d50cc0473cfdec7579eac77ec9861e7088d03ffb171aa697b70d2877423bee2ce16460ef62c698c6442a105612cc015719e8ea06b0bd - languageName: node - linkType: hard - -"b64-lite@npm:^1.3.1, b64-lite@npm:^1.4.0": - version: 1.4.0 - resolution: "b64-lite@npm:1.4.0" - dependencies: - base-64: "npm:^0.1.0" - checksum: 10/75ff8556c265b603223d083c57358a9734261d398637f0f6345bb2e4b63d7fcd815bcc5aa72d8d414ca790e5a4c95f96c04d5acb393f8bd245d3d451ef94e8db - languageName: node - linkType: hard - -"b64u-lite@npm:^1.0.1": - version: 1.1.0 - resolution: "b64u-lite@npm:1.1.0" - dependencies: - b64-lite: "npm:^1.4.0" - checksum: 10/e427b153c29794d97acdaeafc3d4ddd2df207c9f244c8c9c00bde6f2eb910c8286a3e5a1eae092615d78da2e7fdb6dc3c8ec2714e0a25f4992ee8ed6353325e8 - languageName: node - linkType: hard - -"babel-code-frame@npm:^6.16.0, babel-code-frame@npm:^6.22.0": - version: 6.26.0 - resolution: "babel-code-frame@npm:6.26.0" - dependencies: - chalk: "npm:^1.1.3" - esutils: "npm:^2.0.2" - js-tokens: "npm:^3.0.2" - checksum: 10/9410c3d5a921eb02fa409675d1a758e493323a49e7b9dddb7a2a24d47e61d39ab1129dd29f9175836eac9ce8b1d4c0a0718fcdc57ce0b865b529fd250dbab313 - languageName: node - linkType: hard - -"babel-jest@npm:^27.4.2, babel-jest@npm:^27.5.1": - version: 27.5.1 - resolution: "babel-jest@npm:27.5.1" - dependencies: - "@jest/transform": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/babel__core": "npm:^7.1.14" - babel-plugin-istanbul: "npm:^6.1.1" - babel-preset-jest: "npm:^27.5.1" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - slash: "npm:^3.0.0" - peerDependencies: - "@babel/core": ^7.8.0 - checksum: 10/d032823796072b3c269edaa623dd7fe6ecf2f72aff5b003066e7b16ad0ec4068ed04f3f569237183161d28b638936121975014bcb26ae539e669f2bdad5babe6 - languageName: node - linkType: hard - -"babel-jest@npm:^29.6.2": - version: 29.6.2 - resolution: "babel-jest@npm:29.6.2" - dependencies: - "@jest/transform": "npm:^29.6.2" - "@types/babel__core": "npm:^7.1.14" - babel-plugin-istanbul: "npm:^6.1.1" - babel-preset-jest: "npm:^29.5.0" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - slash: "npm:^3.0.0" - peerDependencies: - "@babel/core": ^7.8.0 - checksum: 10/d1860f1c0ede72c3c246906e7ded535e25b1f8b4ac39a74e6d555ec7dd5f0ae7541cf0bc172588f9fed4a11a64eed9eda9688d23403577b36a9e97dc609b9b0a - languageName: node - linkType: hard - -"babel-loader@npm:9.1.3": - version: 9.1.3 - resolution: "babel-loader@npm:9.1.3" - dependencies: - find-cache-dir: "npm:^4.0.0" - schema-utils: "npm:^4.0.0" - peerDependencies: - "@babel/core": ^7.12.0 - webpack: ">=5" - checksum: 10/7086e678273b5d1261141dca84ed784caab9f7921c8c24d7278c8ee3088235a9a9fd85caac9f0fa687336cb3c27248ca22dbf431469769b1b995d55aec606992 - languageName: node - linkType: hard - -"babel-loader@npm:^8.2.3": - version: 8.3.0 - resolution: "babel-loader@npm:8.3.0" - dependencies: - find-cache-dir: "npm:^3.3.1" - loader-utils: "npm:^2.0.0" - make-dir: "npm:^3.1.0" - schema-utils: "npm:^2.6.5" - peerDependencies: - "@babel/core": ^7.0.0 - webpack: ">=2" - checksum: 10/e775e96f605f10d68adc693403ccda2470e856cc52e6017f3621c17dade003d0fc53facfce7b4ada02273a1c0a6a48167f798cc81b73110585d74bf890b39bd5 - languageName: node - linkType: hard - -"babel-plugin-istanbul@npm:6.1.1, babel-plugin-istanbul@npm:^6.1.1": - version: 6.1.1 - resolution: "babel-plugin-istanbul@npm:6.1.1" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.0.0" - "@istanbuljs/load-nyc-config": "npm:^1.0.0" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-instrument: "npm:^5.0.4" - test-exclude: "npm:^6.0.0" - checksum: 10/ffd436bb2a77bbe1942a33245d770506ab2262d9c1b3c1f1da7f0592f78ee7445a95bc2efafe619dd9c1b6ee52c10033d6c7d29ddefe6f5383568e60f31dfe8d - languageName: node - linkType: hard - -"babel-plugin-jest-hoist@npm:^27.5.1": - version: 27.5.1 - resolution: "babel-plugin-jest-hoist@npm:27.5.1" - dependencies: - "@babel/template": "npm:^7.3.3" - "@babel/types": "npm:^7.3.3" - "@types/babel__core": "npm:^7.0.0" - "@types/babel__traverse": "npm:^7.0.6" - checksum: 10/9e334903433fd92ef9a65ea5c61f7d786238704b1327d9ca227ef40ef7142fba2bb8219bcb9b2d56eaf36ecfbcc50aa1e177db64508438569e98cfd67cce5043 - languageName: node - linkType: hard - -"babel-plugin-jest-hoist@npm:^29.5.0": - version: 29.5.0 - resolution: "babel-plugin-jest-hoist@npm:29.5.0" - dependencies: - "@babel/template": "npm:^7.3.3" - "@babel/types": "npm:^7.3.3" - "@types/babel__core": "npm:^7.1.14" - "@types/babel__traverse": "npm:^7.0.6" - checksum: 10/18066c177da855f478178bd2a48fa1c131d31f15c04af8c732bb4c7eb5c952fde8ac9b11133e5ddd5b74aed92c6a833fbfde51cc5dec1f7169bf865b548da680 - languageName: node - linkType: hard - -"babel-plugin-macros@npm:^3.1.0": - version: 3.1.0 - resolution: "babel-plugin-macros@npm:3.1.0" - dependencies: - "@babel/runtime": "npm:^7.12.5" - cosmiconfig: "npm:^7.0.0" - resolve: "npm:^1.19.0" - checksum: 10/30be6ca45e9a124c58ca00af9a0753e5410ec0b79a737714fc4722bbbeb693e55d9258f05c437145ef4a867c2d1603e06a1c292d66c243ce1227458c8ea2ca8c - languageName: node - linkType: hard - -"babel-plugin-named-asset-import@npm:^0.3.8": - version: 0.3.8 - resolution: "babel-plugin-named-asset-import@npm:0.3.8" - peerDependencies: - "@babel/core": ^7.1.0 - checksum: 10/d1e58df8cb75d91d070feea31087bc989906d3465144bde7e9f3c3690b514a90a55d3aebf3e65e76c5d4c743ecedde5f640f09f43a21fa60f1a5d413cb3f7a67 - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs2@npm:^0.4.4": - version: 0.4.5 - resolution: "babel-plugin-polyfill-corejs2@npm:0.4.5" - dependencies: - "@babel/compat-data": "npm:^7.22.6" - "@babel/helper-define-polyfill-provider": "npm:^0.4.2" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/75552d49f7d874e2e9a082d19e3ce9cc95998abadbdc589e5af7de64f5088059863eb194989cfcfefc99623925c46e273bd49333f6aae58f6fff59696279132b - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs2@npm:^0.4.5, babel-plugin-polyfill-corejs2@npm:^0.4.6": - version: 0.4.6 - resolution: "babel-plugin-polyfill-corejs2@npm:0.4.6" - dependencies: - "@babel/compat-data": "npm:^7.22.6" - "@babel/helper-define-polyfill-provider": "npm:^0.4.3" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/736b1bb8e570be029f941a374c769972af870c96b5c324a5387c6b6994aabdad045ce560c530038c8626f02ec70f711ad7445f2572c32ba81fa0e13402cc23f8 - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs2@npm:^0.4.8": - version: 0.4.11 - resolution: "babel-plugin-polyfill-corejs2@npm:0.4.11" - dependencies: - "@babel/compat-data": "npm:^7.22.6" - "@babel/helper-define-polyfill-provider": "npm:^0.6.2" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/9c79908bed61b9f52190f254e22d3dca6ce25769738642579ba8d23832f3f9414567a90d8367a31831fa45d9b9607ac43d8d07ed31167d8ca8cda22871f4c7a1 - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs3@npm:^0.8.2": - version: 0.8.3 - resolution: "babel-plugin-polyfill-corejs3@npm:0.8.3" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.4.2" - core-js-compat: "npm:^3.31.0" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/95e57300341c52b4954b8c8d9d7dd6f9a5bd26f3ac6f67180f146398e5ea5ec5a8496a79d222e147a3e61b698ce4176677a194397ac9887bfa8072d2d7e4e29c - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs3@npm:^0.8.3, babel-plugin-polyfill-corejs3@npm:^0.8.5": - version: 0.8.5 - resolution: "babel-plugin-polyfill-corejs3@npm:0.8.5" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.4.3" - core-js-compat: "npm:^3.32.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/5c2ac3615bd064f294a0b36bf6a1939995ec510173602e317fb18b1c015d31f46e2dd885faa3376e4da22785a515e5ba37e069f0008e5eea830d2fe3b0e66a27 - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs3@npm:^0.9.0": - version: 0.9.0 - resolution: "babel-plugin-polyfill-corejs3@npm:0.9.0" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.5.0" - core-js-compat: "npm:^3.34.0" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/efdf9ba82e7848a2c66e0522adf10ac1646b16f271a9006b61a22f976b849de22a07c54c8826887114842ccd20cc9a4617b61e8e0789227a74378ab508e715cd - languageName: node - linkType: hard - -"babel-plugin-polyfill-regenerator@npm:^0.5.1, babel-plugin-polyfill-regenerator@npm:^0.5.2": - version: 0.5.2 - resolution: "babel-plugin-polyfill-regenerator@npm:0.5.2" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.4.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/d962200f604016a9a09bc9b4aaf60a3db7af876bb65bcefaeac04d44ac9d9ec4037cf24ce117760cc141d7046b6394c7eb0320ba9665cb4a2ee64df2be187c93 - languageName: node - linkType: hard - -"babel-plugin-polyfill-regenerator@npm:^0.5.3": - version: 0.5.3 - resolution: "babel-plugin-polyfill-regenerator@npm:0.5.3" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.4.3" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/2bb546582cda1870d19e646a7183baeb2cccd56e0ef3e4eaeabd28e120daf17cb87399194a9ccdcf32506bcaa68d23e73440fc8ab990a7a0f8c5a77c12d5d4bc - languageName: node - linkType: hard - -"babel-plugin-polyfill-regenerator@npm:^0.5.5": - version: 0.5.5 - resolution: "babel-plugin-polyfill-regenerator@npm:0.5.5" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.5.0" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/3a9b4828673b23cd648dcfb571eadcd9d3fadfca0361d0a7c6feeb5a30474e92faaa49f067a6e1c05e49b6a09812879992028ff3ef3446229ff132d6e1de7eb6 - languageName: node - linkType: hard - -"babel-plugin-transform-react-remove-prop-types@npm:^0.4.24": - version: 0.4.24 - resolution: "babel-plugin-transform-react-remove-prop-types@npm:0.4.24" - checksum: 10/4ce1755af02375f0764683f9703ef47607e33ee57cefd348f054208e06a52b1517e43180c1c448046338a149853f2c9d7f63f27d5b27c74db5df74fba117f040 - languageName: node - linkType: hard - -"babel-preset-current-node-syntax@npm:^1.0.0": - version: 1.0.1 - resolution: "babel-preset-current-node-syntax@npm:1.0.1" - dependencies: - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-bigint": "npm:^7.8.3" - "@babel/plugin-syntax-class-properties": "npm:^7.8.3" - "@babel/plugin-syntax-import-meta": "npm:^7.8.3" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.8.3" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-top-level-await": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/94561959cb12bfa80867c9eeeace7c3d48d61707d33e55b4c3fdbe82fc745913eb2dbfafca62aef297421b38aadcb58550e5943f50fbcebbeefd70ce2bed4b74 - languageName: node - linkType: hard - -"babel-preset-jest@npm:^27.5.1": - version: 27.5.1 - resolution: "babel-preset-jest@npm:27.5.1" - dependencies: - babel-plugin-jest-hoist: "npm:^27.5.1" - babel-preset-current-node-syntax: "npm:^1.0.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/251bcea11c18fd9672fec104eadb45b43f117ceeb326fa7345ced778d4c1feab29343cd7a87a1dcfae4997d6c851a8b386d7f7213792da6e23b74f4443a8976d - languageName: node - linkType: hard - -"babel-preset-jest@npm:^29.5.0": - version: 29.5.0 - resolution: "babel-preset-jest@npm:29.5.0" - dependencies: - babel-plugin-jest-hoist: "npm:^29.5.0" - babel-preset-current-node-syntax: "npm:^1.0.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/5566ca2762766c9319b4973d018d2fa08c0fcf6415c72cc54f4c8e7199e851ea8f5e6c6730f03ed7ed44fc8beefa959dd15911f2647dee47c615ff4faeddb1ad - languageName: node - linkType: hard - -"babel-preset-react-app@npm:^10.0.1": - version: 10.0.1 - resolution: "babel-preset-react-app@npm:10.0.1" - dependencies: - "@babel/core": "npm:^7.16.0" - "@babel/plugin-proposal-class-properties": "npm:^7.16.0" - "@babel/plugin-proposal-decorators": "npm:^7.16.4" - "@babel/plugin-proposal-nullish-coalescing-operator": "npm:^7.16.0" - "@babel/plugin-proposal-numeric-separator": "npm:^7.16.0" - "@babel/plugin-proposal-optional-chaining": "npm:^7.16.0" - "@babel/plugin-proposal-private-methods": "npm:^7.16.0" - "@babel/plugin-transform-flow-strip-types": "npm:^7.16.0" - "@babel/plugin-transform-react-display-name": "npm:^7.16.0" - "@babel/plugin-transform-runtime": "npm:^7.16.4" - "@babel/preset-env": "npm:^7.16.4" - "@babel/preset-react": "npm:^7.16.0" - "@babel/preset-typescript": "npm:^7.16.0" - "@babel/runtime": "npm:^7.16.3" - babel-plugin-macros: "npm:^3.1.0" - babel-plugin-transform-react-remove-prop-types: "npm:^0.4.24" - checksum: 10/ce66970267cfa6d6289b7bf070f184b3ece4f66fbdcd098c40573e3e86b42ffde7d16d74eabb0d18dc5960ddd3d943a16fac27c8dbb435f63350d6af1acbb28b - languageName: node - linkType: hard - -"babel-runtime@npm:^6.11.6": - version: 6.26.0 - resolution: "babel-runtime@npm:6.26.0" - dependencies: - core-js: "npm:^2.4.0" - regenerator-runtime: "npm:^0.11.0" - checksum: 10/2cdf0f083b9598a43cdb11cbf1e7060584079a9a2230f06aec997ba81e887ef17fdcb5ad813a484ee099e06d2de0cea832bdd3011c06325acb284284c754ee8f - languageName: node - linkType: hard - -"balanced-match@npm:^1.0.0": - version: 1.0.2 - resolution: "balanced-match@npm:1.0.2" - checksum: 10/9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 - languageName: node - linkType: hard - -"base-64@npm:^0.1.0": - version: 0.1.0 - resolution: "base-64@npm:0.1.0" - checksum: 10/5a42938f82372ab5392cbacc85a5a78115cbbd9dbef9f7540fa47d78763a3a8bd7d598475f0d92341f66285afd377509851a9bb5c67bbecb89686e9255d5b3eb - languageName: node - linkType: hard - -"base-x@npm:^3.0.2, base-x@npm:^3.0.8": - version: 3.0.9 - resolution: "base-x@npm:3.0.9" - dependencies: - safe-buffer: "npm:^5.0.1" - checksum: 10/957101d6fd09e1903e846fd8f69fd7e5e3e50254383e61ab667c725866bec54e5ece5ba49ce385128ae48f9ec93a26567d1d5ebb91f4d56ef4a9cc0d5a5481e8 - languageName: node - linkType: hard - -"base32.js@npm:^0.1.0": - version: 0.1.0 - resolution: "base32.js@npm:0.1.0" - checksum: 10/7d7401a8f5c4ec45336ff72c97ee554b9bc22c2153b301acf657e6f9e25928a6205b2cfc55731072ba5686515e4903e2d3e462bea49db5f1515bbd01da1276ad - languageName: node - linkType: hard - -"base64-js@npm:*, base64-js@npm:^1.0.2, base64-js@npm:^1.2.0, base64-js@npm:^1.3.0, base64-js@npm:^1.3.1": - version: 1.5.1 - resolution: "base64-js@npm:1.5.1" - checksum: 10/669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005 - languageName: node - linkType: hard - -"base64-js@npm:1.3.1": - version: 1.3.1 - resolution: "base64-js@npm:1.3.1" - checksum: 10/957b9ced0ea1b39588a117193f801b045a5fb2d6f1b9943dd304bcad46e5681bf837fe092105692b11653658e8443764139d6b11d3c4037093b96e8db4e1dbb2 - languageName: node - linkType: hard - -"base64id@npm:2.0.0, base64id@npm:~2.0.0": - version: 2.0.0 - resolution: "base64id@npm:2.0.0" - checksum: 10/e3312328429e512b0713469c5312f80b447e71592cae0a5bddf3f1adc9c89d1b2ed94156ad7bb9f529398f310df7ff6f3dbe9550735c6a759f247c088ea67364 - languageName: node - linkType: hard - -"base@npm:^0.11.1": - version: 0.11.2 - resolution: "base@npm:0.11.2" - dependencies: - cache-base: "npm:^1.0.1" - class-utils: "npm:^0.3.5" - component-emitter: "npm:^1.2.1" - define-property: "npm:^1.0.0" - isobject: "npm:^3.0.1" - mixin-deep: "npm:^1.2.0" - pascalcase: "npm:^0.1.1" - checksum: 10/33b0c5d570840873cf370248e653d43e8d82ce4f03161ad3c58b7da6238583cfc65bf4bbb06b27050d6c2d8f40628777f3933f483c0a7c0274fcef4c51f70a7e - languageName: node - linkType: hard - -"basic-auth@npm:~2.0.0, basic-auth@npm:~2.0.1": - version: 2.0.1 - resolution: "basic-auth@npm:2.0.1" - dependencies: - safe-buffer: "npm:5.1.2" - checksum: 10/3419b805d5dfc518f3a05dcf42aa53aa9ce820e50b6df5097f9e186322e1bc733c36722b624802cd37e791035aa73b828ed814d8362333d42d7f5cd04d7a5e48 - languageName: node - linkType: hard - -"batch@npm:0.6.1": - version: 0.6.1 - resolution: "batch@npm:0.6.1" - checksum: 10/61f9934c7378a51dce61b915586191078ef7f1c3eca707fdd58b96ff2ff56d9e0af2bdab66b1462301a73c73374239e6542d9821c0af787f3209a23365d07e7f - languageName: node - linkType: hard - -"bcrypt-pbkdf@npm:^1.0.0, bcrypt-pbkdf@npm:^1.0.2": - version: 1.0.2 - resolution: "bcrypt-pbkdf@npm:1.0.2" - dependencies: - tweetnacl: "npm:^0.14.3" - checksum: 10/13a4cde058250dbf1fa77a4f1b9a07d32ae2e3b9e28e88a0c7a1827835bc3482f3e478c4a0cfd4da6ff0c46dae07da1061123a995372b32cc563d9975f975404 - languageName: node - linkType: hard - -"bech32@npm:1.1.4, bech32@npm:^1.1.3": - version: 1.1.4 - resolution: "bech32@npm:1.1.4" - checksum: 10/63ff37c0ce43be914c685ce89700bba1589c319af0dac1ea04f51b33d0e5ecfd40d14c24f527350b94f0a4e236385373bb9122ec276410f354ddcdbf29ca13f4 - languageName: node - linkType: hard - -"becke-ch--regex--s0-0-v1--base--pl--lib@npm:^1.2.0": - version: 1.4.0 - resolution: "becke-ch--regex--s0-0-v1--base--pl--lib@npm:1.4.0" - checksum: 10/c86e2ec70a6530a0efded204c6d27b5648e8713c6175178bea6fd1867aaaec601c9b228070fcf4b43f387ddad63fddfe935d7298f9adf7a4cff403bb5ed6ff4d - languageName: node - linkType: hard - -"before-after-hook@npm:^3.0.2": - version: 3.0.2 - resolution: "before-after-hook@npm:3.0.2" - checksum: 10/57dfee78930276a740559552460a83f31c605e0164f02f170f71352aa1f4f5fb2c1632ac3bcba06ba711c32bd88b7e3c82431428e0c4984fbd2336faa78cf08c - languageName: node - linkType: hard - -"benchmark@npm:2.1.4": - version: 2.1.4 - resolution: "benchmark@npm:2.1.4" - dependencies: - lodash: "npm:^4.17.4" - platform: "npm:^1.3.3" - checksum: 10/0f42f865aeb8b79992bb6204874312f9cb384e122f4fd3b20ba6d0bc7cff003610400fb37e52580a7b4aec4a3d1291c51b5ff887691b1abc80e9df4ff032a675 - languageName: node - linkType: hard - -"bfj@npm:^7.0.2": - version: 7.0.2 - resolution: "bfj@npm:7.0.2" - dependencies: - bluebird: "npm:^3.5.5" - check-types: "npm:^11.1.1" - hoopy: "npm:^0.1.4" - tryer: "npm:^1.0.1" - checksum: 10/e1040fe6aec2afeb6f6c5231bbbc055616fa99c23c5249c7d20a2919507a69d8fd4d82d2245eca5ee08cbfcd3e70ce817328b8a20acda69af4638f1c11343bc7 - languageName: node - linkType: hard - -"big-integer@npm:1.6.36": - version: 1.6.36 - resolution: "big-integer@npm:1.6.36" - checksum: 10/961fdd96c847765907e38759053ef4f9e66646739f2e6561087639dce7d1707db180dcb878761bb812a265af600f2d57cc31f5a57645dd790e4bd52c5d28382a - languageName: node - linkType: hard - -"big-integer@npm:^1.6.51": - version: 1.6.51 - resolution: "big-integer@npm:1.6.51" - checksum: 10/c7a12640901906d6f6b6bdb42a4eaba9578397b6d9a0dd090cf001ec813ff2bfcd441e364068ea0416db6175d2615f8ed19cff7d1a795115bf7c92d44993f991 - languageName: node - linkType: hard - -"big.js@npm:^5.2.2": - version: 5.2.2 - resolution: "big.js@npm:5.2.2" - checksum: 10/c04416aeb084f4aa1c5857722439c327cc0ada9bd99ab80b650e3f30e2e4f1b92a04527ed1e7df8ffcd7c0ea311745a04af12d53e2f091bf09a06f1292003827 - languageName: node - linkType: hard - -"big.js@npm:^6.0.3": - version: 6.2.1 - resolution: "big.js@npm:6.2.1" - checksum: 10/1d4b621451de712cab20464a26f22b2eee5e7daf0ee88c49dfbfa76061ec37cff2257751e8c3fc183c231bcffac2f006e33af930d8f49b03c758890080b76ada - languageName: node - linkType: hard - -"bigint-crypto-utils@npm:^3.0.23": - version: 3.2.2 - resolution: "bigint-crypto-utils@npm:3.2.2" - checksum: 10/e7a3ccd915003f755da94ec709ca42a0aa58e018ff4af2c3381c7ba75b7fab569b7e143bc8ebe7c0ad315713d4987ac076035fcd8223c9fc6dcfba9363f200c4 - languageName: node - linkType: hard - -"bignumber.js@npm:^7.2.1": - version: 7.2.1 - resolution: "bignumber.js@npm:7.2.1" - checksum: 10/9bfd02d93cba7d61607b9d52ffb3176844af5712f7f6a0530350daf7852894215fbaa8e6090a9fc841b297b39d475abb90451d3533bc939d1e96a4bfe293e226 - languageName: node - linkType: hard - -"bignumber.js@npm:^9.0.0, bignumber.js@npm:^9.0.1": - version: 9.0.2 - resolution: "bignumber.js@npm:9.0.2" - checksum: 10/d270e73abb79a9beffd1347139266c08b9c022f91c5613226ec16a3eba240fabcbc7c597bbecbb43300038c9d94e3674a269784feac0f5b17c8d0b2b17940798 - languageName: node - linkType: hard - -"bignumber.js@npm:^9.1.2": - version: 9.1.2 - resolution: "bignumber.js@npm:9.1.2" - checksum: 10/d89b8800a987225d2c00dcbf8a69dc08e92aa0880157c851c287b307d31ceb2fc2acb0c62c3e3a3d42b6c5fcae9b004035f13eb4386e56d529d7edac18d5c9d8 - languageName: node - linkType: hard - -"bin-links@npm:^4.0.4": - version: 4.0.4 - resolution: "bin-links@npm:4.0.4" - dependencies: - cmd-shim: "npm:^6.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - read-cmd-shim: "npm:^4.0.0" - write-file-atomic: "npm:^5.0.0" - checksum: 10/58d62143aacdbb783b076e9bdd970d8470f2750e1076d6fd1ae559fa532c4647478dd2550a911ba22d4c9e6339881451046e2fbc4b8958f4bf3bf8e5144d1e4d - languageName: node - linkType: hard - -"binary-extensions@npm:^2.0.0": - version: 2.2.0 - resolution: "binary-extensions@npm:2.2.0" - checksum: 10/ccd267956c58d2315f5d3ea6757cf09863c5fc703e50fbeb13a7dc849b812ef76e3cf9ca8f35a0c48498776a7478d7b4a0418e1e2b8cb9cb9731f2922aaad7f8 - languageName: node - linkType: hard - -"bind-obj-methods@npm:^3.0.0": - version: 3.0.0 - resolution: "bind-obj-methods@npm:3.0.0" - checksum: 10/107ab8428da9cfc86623357b0b558a612f84840daccee906bda92e2d01b0cb6e09f0248856e52900dfa47c611fe636dfb7af64e1f02f68f96c76bcadb9cec680 - languageName: node - linkType: hard - -"bindings@npm:^1.3.1": - version: 1.5.0 - resolution: "bindings@npm:1.5.0" - dependencies: - file-uri-to-path: "npm:1.0.0" - checksum: 10/593d5ae975ffba15fbbb4788fe5abd1e125afbab849ab967ab43691d27d6483751805d98cb92f7ac24a2439a8a8678cd0131c535d5d63de84e383b0ce2786133 - languageName: node - linkType: hard - -"bintrees@npm:1.0.1": - version: 1.0.1 - resolution: "bintrees@npm:1.0.1" - checksum: 10/b314eed4540921916c4435e5d9ac90162f64c9fb7b82c26a33fd609a4b9a4cb98a7f4077c622e73d10b0a61a82094088454cecca209f3b7ceb5466ed4cde8a61 - languageName: node - linkType: hard - -"bl@npm:6.0.16": - version: 6.0.16 - resolution: "bl@npm:6.0.16" - dependencies: - "@types/readable-stream": "npm:^4.0.0" - buffer: "npm:^6.0.3" - inherits: "npm:^2.0.4" - readable-stream: "npm:^4.2.0" - checksum: 10/6c4e5c01205b60263149ee37b896d078a9ae2302eabe52f0fdbc67f8ef6be46cae989e1711a53424a1db765bcc23a657e18909e5c63c8df20034e4da6601fe5d - languageName: node - linkType: hard - -"bl@npm:^1.0.0": - version: 1.2.3 - resolution: "bl@npm:1.2.3" - dependencies: - readable-stream: "npm:^2.3.5" - safe-buffer: "npm:^5.1.1" - checksum: 10/11d775b09ebd7d8c0df1ed7efd03cc8a2b1283c804a55153c81a0b586728a085fa24240647cac9a60163eb6f36a28cf8c45b80bf460a46336d4c84c40205faff - languageName: node - linkType: hard - -"bl@npm:^4.0.3, bl@npm:^4.1.0": - version: 4.1.0 - resolution: "bl@npm:4.1.0" - dependencies: - buffer: "npm:^5.5.0" - inherits: "npm:^2.0.4" - readable-stream: "npm:^3.4.0" - checksum: 10/b7904e66ed0bdfc813c06ea6c3e35eafecb104369dbf5356d0f416af90c1546de3b74e5b63506f0629acf5e16a6f87c3798f16233dcff086e9129383aa02ab55 - languageName: node - linkType: hard - -"bl@npm:~0.8.1": - version: 0.8.2 - resolution: "bl@npm:0.8.2" - dependencies: - readable-stream: "npm:~1.0.26" - checksum: 10/870e0b9d4f0f4e5b15130280551076791bfac21be239d02fd0fc65cde2a638f52de4438cf2bae2a7794c4cbdef6ddea3f48f5dff390ee708b72d79bad0dd49b6 - languageName: node - linkType: hard - -"blakejs@npm:^1.1.0": - version: 1.1.1 - resolution: "blakejs@npm:1.1.1" - checksum: 10/dbda7da6e0ad9bc3cfda1e7763da08ad29a0e7677318236308f0402fd9d692d4a0585f23a04d41b84e42644459cc04c8f9f35c3e89ef6017aca6c4ee775b239b - languageName: node - linkType: hard - -"blob-to-it@npm:^2.0.0": - version: 2.0.4 - resolution: "blob-to-it@npm:2.0.4" - dependencies: - browser-readablestream-to-it: "npm:^2.0.0" - checksum: 10/1d88f3eb07ee00033acf25a8787e3271b627d7fbad32df4f1cf6bd7257808e7c7e22854c2e55a1658937995414e1e5fa7e40e954b0606845ee3731ff022938c3 - languageName: node - linkType: hard - -"bluebird@npm:3.7.2, bluebird@npm:^3.4.1, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.5.5": - version: 3.7.2 - resolution: "bluebird@npm:3.7.2" - checksum: 10/007c7bad22c5d799c8dd49c85b47d012a1fe3045be57447721e6afbd1d5be43237af1db62e26cb9b0d9ba812d2e4ca3bac82f6d7e016b6b88de06ee25ceb96e7 - languageName: node - linkType: hard - -"bn.js@npm:4.11.6": - version: 4.11.6 - resolution: "bn.js@npm:4.11.6" - checksum: 10/22741b015c9fff60fce32fc9988331b298eb9b6db5bfb801babb23b846eaaf894e440e0d067b2b3ae4e46aab754e90972f8f333b31bf94a686bbcb054bfa7b14 - languageName: node - linkType: hard - -"bn.js@npm:4.12.0, bn.js@npm:^4.0.0, bn.js@npm:^4.1.0, bn.js@npm:^4.11.0, bn.js@npm:^4.11.6, bn.js@npm:^4.11.8, bn.js@npm:^4.11.9": - version: 4.12.0 - resolution: "bn.js@npm:4.12.0" - checksum: 10/10f8db196d3da5adfc3207d35d0a42aa29033eb33685f20ba2c36cadfe2de63dad05df0a20ab5aae01b418d1c4b3d4d205273085262fa020d17e93ff32b67527 - languageName: node - linkType: hard - -"bn.js@npm:5.2.1, bn.js@npm:^5.1.3, bn.js@npm:^5.2.1": - version: 5.2.1 - resolution: "bn.js@npm:5.2.1" - checksum: 10/7a7e8764d7a6e9708b8b9841b2b3d6019cc154d2fc23716d0efecfe1e16921b7533c6f7361fb05471eab47986c4aa310c270f88e3507172104632ac8df2cfd84 - languageName: node - linkType: hard - -"bn.js@npm:^5.0.0, bn.js@npm:^5.1.2, bn.js@npm:^5.2.0": - version: 5.2.0 - resolution: "bn.js@npm:5.2.0" - checksum: 10/37052dad02242b70e21f59b52642d67521d160239964a7f5653d86d856f9c4936aee229a66b69e6864e020f41e934ede9ddd0f873b23cffee42c132163558c2a - languageName: node - linkType: hard - -"body-parser@npm:1.20.1": - version: 1.20.1 - resolution: "body-parser@npm:1.20.1" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.4" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.11.0" - raw-body: "npm:2.5.1" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 10/5f8d128022a2fb8b6e7990d30878a0182f300b70e46b3f9d358a9433ad6275f0de46add6d63206da3637c01c3b38b6111a7480f7e7ac2e9f7b989f6133fe5510 - languageName: node - linkType: hard - -"body-parser@npm:1.20.3": - version: 1.20.3 - resolution: "body-parser@npm:1.20.3" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.5" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.13.0" - raw-body: "npm:2.5.2" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 10/8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca - languageName: node - linkType: hard - -"body-parser@npm:^1.10.0, body-parser@npm:^1.18.2": - version: 1.20.2 - resolution: "body-parser@npm:1.20.2" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.5" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.11.0" - raw-body: "npm:2.5.2" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 10/3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a - languageName: node - linkType: hard - -"body-parser@npm:^1.16.0, body-parser@npm:^1.19.0": - version: 1.20.0 - resolution: "body-parser@npm:1.20.0" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.4" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.10.3" - raw-body: "npm:2.5.1" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 10/63fe82c27fdacac51d26665c3d13d4c6e48d1c3e9efe1fbc0fd18801aa9a598ab1023b09298ae4b3d0a7598d55902d793f7fa1b5551da99c16eabfed9b022a51 - languageName: node - linkType: hard - -"bonjour-service@npm:^1.0.11": - version: 1.1.1 - resolution: "bonjour-service@npm:1.1.1" - dependencies: - array-flatten: "npm:^2.1.2" - dns-equal: "npm:^1.0.0" - fast-deep-equal: "npm:^3.1.3" - multicast-dns: "npm:^7.2.5" - checksum: 10/60a14328dff846a66ae5cddbba4f2e2845a4b3cf62f64d93b57808e08e5e1a8e8c4454e37e0e289741706b359a343444ba132957bf53be9e8f5eaebdebb06306 - languageName: node - linkType: hard - -"boolbase@npm:^1.0.0": - version: 1.0.0 - resolution: "boolbase@npm:1.0.0" - checksum: 10/3e25c80ef626c3a3487c73dbfc70ac322ec830666c9ad915d11b701142fab25ec1e63eff2c450c74347acfd2de854ccde865cd79ef4db1683f7c7b046ea43bb0 - languageName: node - linkType: hard - -"boolean@npm:^3.1.4": - version: 3.2.0 - resolution: "boolean@npm:3.2.0" - checksum: 10/d28a49dcaeef7fe10cf9fdf488214d3859f07350be8f5caa0c73ec621baf20650e5da6523262e5ce9221909519d4261c16d8430a5bf307fee9ef0e170cdb29f3 - languageName: node - linkType: hard - -"borc@npm:^3.0.0": - version: 3.0.0 - resolution: "borc@npm:3.0.0" - dependencies: - bignumber.js: "npm:^9.0.0" - buffer: "npm:^6.0.3" - commander: "npm:^2.15.0" - ieee754: "npm:^1.1.13" - iso-url: "npm:^1.1.5" - json-text-sequence: "npm:~0.3.0" - readable-stream: "npm:^3.6.0" - bin: - cbor2comment: bin/cbor2comment.js - cbor2diag: bin/cbor2diag.js - cbor2json: bin/cbor2json.js - json2cbor: bin/json2cbor.js - checksum: 10/fc9eaae0a544a300d0eaa4173d523649c9b85ed13f46156d802b5514c75aa4ec80c7ff183afd2bb4067a3166a7561f1a362edeb1673a7760d401b801b688477e - languageName: node - linkType: hard - -"boxen@npm:^5.0.0": - version: 5.1.2 - resolution: "boxen@npm:5.1.2" - dependencies: - ansi-align: "npm:^3.0.0" - camelcase: "npm:^6.2.0" - chalk: "npm:^4.1.0" - cli-boxes: "npm:^2.2.1" - string-width: "npm:^4.2.2" - type-fest: "npm:^0.20.2" - widest-line: "npm:^3.1.0" - wrap-ansi: "npm:^7.0.0" - checksum: 10/bc3d3d88d77dc8cabb0811844acdbd4805e8ca8011222345330817737042bf6f86d93eb74a3f7e0cab634e64ef69db03cf52b480761ed90a965de0c8ff1bea8c - languageName: node - linkType: hard - -"brace-expansion@npm:^1.1.7": - version: 1.1.11 - resolution: "brace-expansion@npm:1.1.11" - dependencies: - balanced-match: "npm:^1.0.0" - concat-map: "npm:0.0.1" - checksum: 10/faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 - languageName: node - linkType: hard - -"brace-expansion@npm:^2.0.1": - version: 2.0.1 - resolution: "brace-expansion@npm:2.0.1" - dependencies: - balanced-match: "npm:^1.0.0" - checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 - languageName: node - linkType: hard - -"braces@npm:>=3.0.3": - version: 3.0.3 - resolution: "braces@npm:3.0.3" - dependencies: - fill-range: "npm:^7.1.1" - checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 - languageName: node - linkType: hard - -"brorand@npm:^1.0.1, brorand@npm:^1.1.0": - version: 1.1.0 - resolution: "brorand@npm:1.1.0" - checksum: 10/8a05c9f3c4b46572dec6ef71012b1946db6cae8c7bb60ccd4b7dd5a84655db49fe043ecc6272e7ef1f69dc53d6730b9e2a3a03a8310509a3d797a618cbee52be - languageName: node - linkType: hard - -"browser-level@npm:^1.0.1": - version: 1.0.1 - resolution: "browser-level@npm:1.0.1" - dependencies: - abstract-level: "npm:^1.0.2" - catering: "npm:^2.1.1" - module-error: "npm:^1.0.2" - run-parallel-limit: "npm:^1.1.0" - checksum: 10/e712569111782da76853fecf648b43ff878ff2301c2830a9e7399685b646824a85f304dea5f023e02ee41a63a972f9aad734bd411069095adc9c79784fc649a5 - languageName: node - linkType: hard - -"browser-process-hrtime@npm:^1.0.0": - version: 1.0.0 - resolution: "browser-process-hrtime@npm:1.0.0" - checksum: 10/e30f868cdb770b1201afb714ad1575dd86366b6e861900884665fb627109b3cc757c40067d3bfee1ff2a29c835257ea30725a8018a9afd02ac1c24b408b1e45f - languageName: node - linkType: hard - -"browser-readablestream-to-it@npm:^1.0.0": - version: 1.0.3 - resolution: "browser-readablestream-to-it@npm:1.0.3" - checksum: 10/633fea490b5fc7e67d68dfeb229aa054dfe239f422fc620b9ba105b909a589066d981701f042aaa044b85a1695f74d0d11a83509da3e9b1141aa9190fb0d918c - languageName: node - linkType: hard - -"browser-readablestream-to-it@npm:^2.0.0": - version: 2.0.4 - resolution: "browser-readablestream-to-it@npm:2.0.4" - checksum: 10/7d3f5694a18a71b0cc0db37521b2ab806458cbf3aa5639bab681f328255cd22246a39d3973adb7774f3104a3c28b2fa7e54767ad5d03082c58b5dd4e6068cd2a - languageName: node - linkType: hard - -"browser-stdout@npm:1.3.1, browser-stdout@npm:^1.3.1": - version: 1.3.1 - resolution: "browser-stdout@npm:1.3.1" - checksum: 10/ac70a84e346bb7afc5045ec6f22f6a681b15a4057447d4cc1c48a25c6dedb302a49a46dd4ddfb5cdd9c96e0c905a8539be1b98ae7bc440512152967009ec7015 - languageName: node - linkType: hard - -"browserify-aes@npm:^1.0.0, browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": - version: 1.2.0 - resolution: "browserify-aes@npm:1.2.0" - dependencies: - buffer-xor: "npm:^1.0.3" - cipher-base: "npm:^1.0.0" - create-hash: "npm:^1.1.0" - evp_bytestokey: "npm:^1.0.3" - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - checksum: 10/2813058f74e083a00450b11ea9d5d1f072de7bf0133f5d122d4ff7b849bece56d52b9c51ad0db0fad21c0bc4e8272fd5196114bbe7b94a9b7feb0f9fbb33a3bf - languageName: node - linkType: hard - -"browserify-cipher@npm:^1.0.0": - version: 1.0.1 - resolution: "browserify-cipher@npm:1.0.1" - dependencies: - browserify-aes: "npm:^1.0.4" - browserify-des: "npm:^1.0.0" - evp_bytestokey: "npm:^1.0.0" - checksum: 10/2d8500acf1ee535e6bebe808f7a20e4c3a9e2ed1a6885fff1facbfd201ac013ef030422bec65ca9ece8ffe82b03ca580421463f9c45af6c8415fd629f4118c13 - languageName: node - linkType: hard - -"browserify-des@npm:^1.0.0": - version: 1.0.2 - resolution: "browserify-des@npm:1.0.2" - dependencies: - cipher-base: "npm:^1.0.1" - des.js: "npm:^1.0.0" - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.1.2" - checksum: 10/2fd9018e598b1b25e002abaf656d46d8e0f2ee2666ff18852d37e5c3d0e47701d6824256b060fac395420d56a0c49c2b0d40a194e6fbd837bfdd893e7eb5ade4 - languageName: node - linkType: hard - -"browserify-fs@npm:1.0.0": - version: 1.0.0 - resolution: "browserify-fs@npm:1.0.0" - dependencies: - level-filesystem: "npm:^1.0.1" - level-js: "npm:^2.1.3" - levelup: "npm:^0.18.2" - checksum: 10/e0c35cf42c839c0a217048b1671d91ee6e53fd05f163db4f809e46c2f6264f784768e7c850abc200b0eaca378d42e00e01876eda21fd84fc0a4280bd6200a9c3 - languageName: node - linkType: hard - -"browserify-rsa@npm:^4.0.0, browserify-rsa@npm:^4.1.0": - version: 4.1.0 - resolution: "browserify-rsa@npm:4.1.0" - dependencies: - bn.js: "npm:^5.0.0" - randombytes: "npm:^2.0.1" - checksum: 10/155f0c135873efc85620571a33d884aa8810e40176125ad424ec9d85016ff105a07f6231650914a760cca66f29af0494087947b7be34880dd4599a0cd3c38e54 - languageName: node - linkType: hard - -"browserify-sign@npm:^4.0.0": - version: 4.2.3 - resolution: "browserify-sign@npm:4.2.3" - dependencies: - bn.js: "npm:^5.2.1" - browserify-rsa: "npm:^4.1.0" - create-hash: "npm:^1.2.0" - create-hmac: "npm:^1.1.7" - elliptic: "npm:^6.5.5" - hash-base: "npm:~3.0" - inherits: "npm:^2.0.4" - parse-asn1: "npm:^5.1.7" - readable-stream: "npm:^2.3.8" - safe-buffer: "npm:^5.2.1" - checksum: 10/403a8061d229ae31266670345b4a7c00051266761d2c9bbeb68b1a9bcb05f68143b16110cf23a171a5d6716396a1f41296282b3e73eeec0a1871c77f0ff4ee6b - languageName: node - linkType: hard - -"browserify-zlib@npm:^0.2.0": - version: 0.2.0 - resolution: "browserify-zlib@npm:0.2.0" - dependencies: - pako: "npm:~1.0.5" - checksum: 10/852e72effdc00bf8acc6d167d835179eda9e5bd13721ae5d0a2d132dc542f33e73bead2959eb43a2f181a9c495bc2ae2bdb4ec37c4e37ff61a0277741cbaaa7a - languageName: node - linkType: hard - -"browserslist@npm:^4.0.0, browserslist@npm:^4.18.1, browserslist@npm:^4.21.4, browserslist@npm:^4.22.1": - version: 4.22.1 - resolution: "browserslist@npm:4.22.1" - dependencies: - caniuse-lite: "npm:^1.0.30001541" - electron-to-chromium: "npm:^1.4.535" - node-releases: "npm:^2.0.13" - update-browserslist-db: "npm:^1.0.13" - bin: - browserslist: cli.js - checksum: 10/4a515168e0589c7b1ccbf13a93116ce0418cc5e65d228ec036022cf0e08773fdfb732e2abbf1e1188b96d19ecd4dd707504e75b6d393cba2782fc7d6a7fdefe8 - languageName: node - linkType: hard - -"browserslist@npm:^4.14.5, browserslist@npm:^4.17.5, browserslist@npm:^4.20.2": - version: 4.20.3 - resolution: "browserslist@npm:4.20.3" - dependencies: - caniuse-lite: "npm:^1.0.30001332" - electron-to-chromium: "npm:^1.4.118" - escalade: "npm:^3.1.1" - node-releases: "npm:^2.0.3" - picocolors: "npm:^1.0.0" - bin: - browserslist: cli.js - checksum: 10/63e285ae2d19aca763616a48b3ad48dc84fb896038faa3a85bcfed801411ed783fd166bdbf5f4af0d11494ea1b6632aa390a4ba32ce92249bd627f4563c88cd0 - languageName: node - linkType: hard - -"browserslist@npm:^4.21.10": - version: 4.21.10 - resolution: "browserslist@npm:4.21.10" - dependencies: - caniuse-lite: "npm:^1.0.30001517" - electron-to-chromium: "npm:^1.4.477" - node-releases: "npm:^2.0.13" - update-browserslist-db: "npm:^1.0.11" - bin: - browserslist: cli.js - checksum: 10/cdb9272433994393a995235720c304e8c7123b4994b02fc0b24ca0f483db482c4f85fe8b40995aa6193d47d781e5535cf5d0efe96e465d2af42058fb3251b13a - languageName: node - linkType: hard - -"browserslist@npm:^4.21.3, browserslist@npm:^4.21.5": - version: 4.21.5 - resolution: "browserslist@npm:4.21.5" - dependencies: - caniuse-lite: "npm:^1.0.30001449" - electron-to-chromium: "npm:^1.4.284" - node-releases: "npm:^2.0.8" - update-browserslist-db: "npm:^1.0.10" - bin: - browserslist: cli.js - checksum: 10/560ec095ab4fa878f611ddf29038193d3a40ce69282dd15e633bcb9523fa25122e566d34192ab45e261a637d768884e7318cb3545533720469ee8f10d10c3298 - languageName: node - linkType: hard - -"browserslist@npm:^4.21.9": - version: 4.21.9 - resolution: "browserslist@npm:4.21.9" - dependencies: - caniuse-lite: "npm:^1.0.30001503" - electron-to-chromium: "npm:^1.4.431" - node-releases: "npm:^2.0.12" - update-browserslist-db: "npm:^1.0.11" - bin: - browserslist: cli.js - checksum: 10/f015dd3d97e9eadcc13aaaf03b4a78a071874eee1cf756a2361191c0888f238dd0ddf1b92c20d072ecd1834d9a51e5a6361f5efaf966728da6a5daaf95b37eb3 - languageName: node - linkType: hard - -"browserslist@npm:^4.22.2": - version: 4.22.2 - resolution: "browserslist@npm:4.22.2" - dependencies: - caniuse-lite: "npm:^1.0.30001565" - electron-to-chromium: "npm:^1.4.601" - node-releases: "npm:^2.0.14" - update-browserslist-db: "npm:^1.0.13" - bin: - browserslist: cli.js - checksum: 10/e3590793db7f66ad3a50817e7b7f195ce61e029bd7187200244db664bfbe0ac832f784e4f6b9c958aef8ea4abe001ae7880b7522682df521f4bc0a5b67660b5e - languageName: node - linkType: hard - -"browserslist@npm:^4.23.0, browserslist@npm:^4.23.1": - version: 4.23.2 - resolution: "browserslist@npm:4.23.2" - dependencies: - caniuse-lite: "npm:^1.0.30001640" - electron-to-chromium: "npm:^1.4.820" - node-releases: "npm:^2.0.14" - update-browserslist-db: "npm:^1.1.0" - bin: - browserslist: cli.js - checksum: 10/326a98b1c39bcc9a99b197f15790dc28e122b1aead3257c837421899377ac96239123f26868698085b3d9be916d72540602738e1f857e86a387e810af3fda6e5 - languageName: node - linkType: hard - -"bs-logger@npm:0.x": - version: 0.2.6 - resolution: "bs-logger@npm:0.2.6" - dependencies: - fast-json-stable-stringify: "npm:2.x" - checksum: 10/e6d3ff82698bb3f20ce64fb85355c5716a3cf267f3977abe93bf9c32a2e46186b253f48a028ae5b96ab42bacd2c826766d9ae8cf6892f9b944656be9113cf212 - languageName: node - linkType: hard - -"bs58@npm:^4.0.0, bs58@npm:^4.0.1": - version: 4.0.1 - resolution: "bs58@npm:4.0.1" - dependencies: - base-x: "npm:^3.0.2" - checksum: 10/b3c5365bb9e0c561e1a82f1a2d809a1a692059fae016be233a6127ad2f50a6b986467c3a50669ce4c18929dcccb297c5909314dd347a25a68c21b68eb3e95ac2 - languageName: node - linkType: hard - -"bs58check@npm:^2.1.2": - version: 2.1.2 - resolution: "bs58check@npm:2.1.2" - dependencies: - bs58: "npm:^4.0.0" - create-hash: "npm:^1.1.0" - safe-buffer: "npm:^5.1.2" - checksum: 10/43bdf08a5dd04581b78f040bc4169480e17008da482ffe2a6507327bbc4fc5c28de0501f7faf22901cfe57fbca79cbb202ca529003fedb4cb8dccd265b38e54d - languageName: node - linkType: hard - -"bser@npm:2.1.1": - version: 2.1.1 - resolution: "bser@npm:2.1.1" - dependencies: - node-int64: "npm:^0.4.0" - checksum: 10/edba1b65bae682450be4117b695997972bd9a3c4dfee029cab5bcb72ae5393a79a8f909b8bc77957eb0deec1c7168670f18f4d5c556f46cdd3bca5f3b3a8d020 - languageName: node - linkType: hard - -"buffer-alloc-unsafe@npm:^1.1.0": - version: 1.1.0 - resolution: "buffer-alloc-unsafe@npm:1.1.0" - checksum: 10/c5e18bf51f67754ec843c9af3d4c005051aac5008a3992938dda1344e5cfec77c4b02b4ca303644d1e9a6e281765155ce6356d85c6f5ccc5cd21afc868def396 - languageName: node - linkType: hard - -"buffer-alloc@npm:^1.2.0": - version: 1.2.0 - resolution: "buffer-alloc@npm:1.2.0" - dependencies: - buffer-alloc-unsafe: "npm:^1.1.0" - buffer-fill: "npm:^1.0.0" - checksum: 10/560cd27f3cbe73c614867da373407d4506309c62fe18de45a1ce191f3785ec6ca2488d802ff82065798542422980ca25f903db078c57822218182c37c3576df5 - languageName: node - linkType: hard - -"buffer-crc32@npm:~0.2.3": - version: 0.2.13 - resolution: "buffer-crc32@npm:0.2.13" - checksum: 10/06252347ae6daca3453b94e4b2f1d3754a3b146a111d81c68924c22d91889a40623264e95e67955b1cb4a68cbedf317abeabb5140a9766ed248973096db5ce1c - languageName: node - linkType: hard - -"buffer-equal-constant-time@npm:1.0.1": - version: 1.0.1 - resolution: "buffer-equal-constant-time@npm:1.0.1" - checksum: 10/80bb945f5d782a56f374b292770901065bad21420e34936ecbe949e57724b4a13874f735850dd1cc61f078773c4fb5493a41391e7bda40d1fa388d6bd80daaab - languageName: node - linkType: hard - -"buffer-fill@npm:^1.0.0": - version: 1.0.0 - resolution: "buffer-fill@npm:1.0.0" - checksum: 10/c29b4723ddeab01e74b5d3b982a0c6828f2ded49cef049ddca3dac661c874ecdbcecb5dd8380cf0f4adbeb8cff90a7de724126750a1f1e5ebd4eb6c59a1315b1 - languageName: node - linkType: hard - -"buffer-from@npm:1.1.2, buffer-from@npm:^1.0.0, buffer-from@npm:^1.1.0": - version: 1.1.2 - resolution: "buffer-from@npm:1.1.2" - checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb - languageName: node - linkType: hard - -"buffer-reverse@npm:^1.0.1": - version: 1.0.1 - resolution: "buffer-reverse@npm:1.0.1" - checksum: 10/e350872a89b17af0a7e1bd7a73239a535164f3f010b0800add44f2e52bd0511548dc5b96c20309effba969868c385023d2d02a0add6155f6a76da7b3073b77bd - languageName: node - linkType: hard - -"buffer-to-arraybuffer@npm:^0.0.5": - version: 0.0.5 - resolution: "buffer-to-arraybuffer@npm:0.0.5" - checksum: 10/df16190b3bf0ecdf70e761514ecc8dbb9b8310e7c2882c800dc6d2d06859b9c85baa67f4cad53aaf9f0cbdd936f4b1c09f549eed8ae33c1c1258d7b6b1648cde - languageName: node - linkType: hard - -"buffer-writer@npm:2.0.0": - version: 2.0.0 - resolution: "buffer-writer@npm:2.0.0" - checksum: 10/fdca8e28c55704de7af2f41c8f875293de69ad22005d5041d54aa916d125cead00afa969bc09e4702ae6b66e098409958c06bebfc97fcf8fa4ea5afcae088cd9 - languageName: node - linkType: hard - -"buffer-xor@npm:^1.0.3": - version: 1.0.3 - resolution: "buffer-xor@npm:1.0.3" - checksum: 10/4a63d48b5117c7eda896d81cd3582d9707329b07c97a14b0ece2edc6e64220ea7ea17c94b295e8c2cb7b9f8291e2b079f9096be8ac14be238420a43e06ec66e2 - languageName: node - linkType: hard - -"buffer-xor@npm:^2.0.1": - version: 2.0.2 - resolution: "buffer-xor@npm:2.0.2" - dependencies: - safe-buffer: "npm:^5.1.1" - checksum: 10/78226fcae9f4a0b4adec69dffc049f26f6bab240dfdd1b3f6fe07c4eb6b90da202ea5c363f98af676156ee39450a06405fddd9e8965f68a5327edcc89dcbe5d0 - languageName: node - linkType: hard - -"buffer@npm:4.9.2": - version: 4.9.2 - resolution: "buffer@npm:4.9.2" - dependencies: - base64-js: "npm:^1.0.2" - ieee754: "npm:^1.1.4" - isarray: "npm:^1.0.0" - checksum: 10/4852a455e167bc8ca580c3c585176bbe0931c9929aeb68f3e0b49adadcb4e513fd0922a43efdf67ddb2e8785bbe8254ae17f4b69038dd06329ee9e3283c8508f - languageName: node - linkType: hard - -"buffer@npm:6.0.3, buffer@npm:^6.0.0, buffer@npm:^6.0.1, buffer@npm:^6.0.3": - version: 6.0.3 - resolution: "buffer@npm:6.0.3" - dependencies: - base64-js: "npm:^1.3.1" - ieee754: "npm:^1.2.1" - checksum: 10/b6bc68237ebf29bdacae48ce60e5e28fc53ae886301f2ad9496618efac49427ed79096750033e7eab1897a4f26ae374ace49106a5758f38fb70c78c9fda2c3b1 - languageName: node - linkType: hard - -"buffer@npm:^5.0.5, buffer@npm:^5.2.1, buffer@npm:^5.5.0, buffer@npm:^5.6.0": - version: 5.7.1 - resolution: "buffer@npm:5.7.1" - dependencies: - base64-js: "npm:^1.3.1" - ieee754: "npm:^1.1.13" - checksum: 10/997434d3c6e3b39e0be479a80288875f71cd1c07d75a3855e6f08ef848a3c966023f79534e22e415ff3a5112708ce06127277ab20e527146d55c84566405c7c6 - languageName: node - linkType: hard - -"bufferutil@npm:4.0.5": - version: 4.0.5 - resolution: "bufferutil@npm:4.0.5" - dependencies: - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.3.0" - checksum: 10/f6fadb1f024b355a3bb08cffbc56c5d013944d0229eb793e5308f86fc0d8e7f8f17b69958aa5baa84db8f11870c8b0e2383d501cf41e79b93a1f3a5ef257c6e6 - languageName: node - linkType: hard - -"bufferutil@npm:^4.0.1": - version: 4.0.6 - resolution: "bufferutil@npm:4.0.6" - dependencies: - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.3.0" - checksum: 10/8d82cda2e68bf531af03d5ba2997ec96e1c3aed1f5315f2d74d452b9dcaab24287348639e849deaae841be7dee68073cd566bb8b32729c3b79878965cb546988 - languageName: node - linkType: hard - -"buildcheck@npm:~0.0.6": - version: 0.0.6 - resolution: "buildcheck@npm:0.0.6" - checksum: 10/194ee8d3b0926fd6f3e799732130ad7ab194882c56900b8670ad43c81326f64871f49b7d9f1e9baad91ca3070eb4e8b678797fe9ae78cf87dde86d8916eb25d2 - languageName: node - linkType: hard - -"builtin-modules@npm:^1.1.1": - version: 1.1.1 - resolution: "builtin-modules@npm:1.1.1" - checksum: 10/0fbf69ffe77fecf11c441b9a7d1e664bb8119a7d3004831d9bd6ce0eacfd5d121ed4b667172870b5f66ecfce4bd54f7c20060d21c339c29049a7a5dd2bb7bf8c - languageName: node - linkType: hard - -"builtin-modules@npm:^3.1.0": - version: 3.3.0 - resolution: "builtin-modules@npm:3.3.0" - checksum: 10/62e063ab40c0c1efccbfa9ffa31873e4f9d57408cb396a2649981a0ecbce56aabc93c28feaccbc5658c95aab2703ad1d11980e62ec2e5e72637404e1eb60f39e - languageName: node - linkType: hard - -"builtin-status-codes@npm:^3.0.0": - version: 3.0.0 - resolution: "builtin-status-codes@npm:3.0.0" - checksum: 10/1119429cf4b0d57bf76b248ad6f529167d343156ebbcc4d4e4ad600484f6bc63002595cbb61b67ad03ce55cd1d3c4711c03bbf198bf24653b8392420482f3773 - languageName: node - linkType: hard - -"builtins@npm:^5.0.0": - version: 5.0.1 - resolution: "builtins@npm:5.0.1" - dependencies: - semver: "npm:^7.0.0" - checksum: 10/90136fa0ba98b7a3aea33190b1262a5297164731efb6a323b0231acf60cc2ea0b2b1075dbf107038266b8b77d6045fa9631d1c3f90efc1c594ba61218fbfbb4c - languageName: node - linkType: hard - -"busboy@npm:^1.0.0, busboy@npm:^1.6.0": - version: 1.6.0 - resolution: "busboy@npm:1.6.0" - dependencies: - streamsearch: "npm:^1.1.0" - checksum: 10/bee10fa10ea58e7e3e7489ffe4bda6eacd540a17de9f9cd21cc37e297b2dd9fe52b2715a5841afaec82900750d810d01d7edb4b2d456427f449b92b417579763 - languageName: node - linkType: hard - -"byte-size@npm:^8.1.1": - version: 8.1.1 - resolution: "byte-size@npm:8.1.1" - checksum: 10/eacd83b5f39b4b35115160201553150c3c085473ddb1e788d0f4ee22a2f3461470de5732eef8d7874efbbd883b7ae1277190b579128060e616d606ff419fe1e0 - languageName: node - linkType: hard - -"bytes@npm:3.0.0": - version: 3.0.0 - resolution: "bytes@npm:3.0.0" - checksum: 10/a2b386dd8188849a5325f58eef69c3b73c51801c08ffc6963eddc9be244089ba32d19347caf6d145c86f315ae1b1fc7061a32b0c1aa6379e6a719090287ed101 - languageName: node - linkType: hard - -"bytes@npm:3.1.2": - version: 3.1.2 - resolution: "bytes@npm:3.1.2" - checksum: 10/a10abf2ba70c784471d6b4f58778c0beeb2b5d405148e66affa91f23a9f13d07603d0a0354667310ae1d6dc141474ffd44e2a074be0f6e2254edb8fc21445388 - languageName: node - linkType: hard - -"cacache@npm:^15.2.0": - version: 15.3.0 - resolution: "cacache@npm:15.3.0" - dependencies: - "@npmcli/fs": "npm:^1.0.0" - "@npmcli/move-file": "npm:^1.0.1" - chownr: "npm:^2.0.0" - fs-minipass: "npm:^2.0.0" - glob: "npm:^7.1.4" - infer-owner: "npm:^1.0.4" - lru-cache: "npm:^6.0.0" - minipass: "npm:^3.1.1" - minipass-collect: "npm:^1.0.2" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.2" - mkdirp: "npm:^1.0.3" - p-map: "npm:^4.0.0" - promise-inflight: "npm:^1.0.1" - rimraf: "npm:^3.0.2" - ssri: "npm:^8.0.1" - tar: "npm:^6.0.2" - unique-filename: "npm:^1.1.1" - checksum: 10/1432d84f3f4b31421cf47c15e6956e5e736a93c65126b0fd69ae5f70643d29be8996f33d4995204f578850de5d556268540911c04ecc1c026375b18600534f08 - languageName: node - linkType: hard - -"cacache@npm:^16.1.0": - version: 16.1.0 - resolution: "cacache@npm:16.1.0" - dependencies: - "@npmcli/fs": "npm:^2.1.0" - "@npmcli/move-file": "npm:^2.0.0" - chownr: "npm:^2.0.0" - fs-minipass: "npm:^2.1.0" - glob: "npm:^8.0.1" - infer-owner: "npm:^1.0.4" - lru-cache: "npm:^7.7.1" - minipass: "npm:^3.1.6" - minipass-collect: "npm:^1.0.2" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - mkdirp: "npm:^1.0.4" - p-map: "npm:^4.0.0" - promise-inflight: "npm:^1.0.1" - rimraf: "npm:^3.0.2" - ssri: "npm:^9.0.0" - tar: "npm:^6.1.11" - unique-filename: "npm:^1.1.1" - checksum: 10/5a84a79db11204cd6827bfa5e05c72d512ed091b77df772988f8df1eea4aaa879e30e38093d10db1267ed2d0cb9cafe31c64ad7f55074dca52e4cb5dca204382 - languageName: node - linkType: hard - -"cacache@npm:^17.0.0": - version: 17.0.5 - resolution: "cacache@npm:17.0.5" - dependencies: - "@npmcli/fs": "npm:^3.1.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^9.3.1" - lru-cache: "npm:^7.7.1" - minipass: "npm:^4.0.0" - minipass-collect: "npm:^1.0.2" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^4.0.0" - promise-inflight: "npm:^1.0.1" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - unique-filename: "npm:^3.0.0" - checksum: 10/ef7ca5227ba340911884dd2cde0eb207c671e0afe8327fca70bd469bb7358b93eb7642743084e547ce4afd5c6323e444d9e55ec7724a2004d42e1b576e48420b - languageName: node - linkType: hard - -"cacache@npm:^18.0.0": - version: 18.0.0 - resolution: "cacache@npm:18.0.0" - dependencies: - "@npmcli/fs": "npm:^3.1.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" - minipass: "npm:^7.0.3" - minipass-collect: "npm:^1.0.2" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^4.0.0" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - unique-filename: "npm:^3.0.0" - checksum: 10/b71fefe97b9799a863dc48ac79da2bd57a724ff0922fddd3aef4f3b70395ba00d1ef9547a0594d3d6d3cd57aeaeaf4d938c54f89695053eb2198cf8758b47511 - languageName: node - linkType: hard - -"cacache@npm:^18.0.3": - version: 18.0.3 - resolution: "cacache@npm:18.0.3" - dependencies: - "@npmcli/fs": "npm:^3.1.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" - minipass: "npm:^7.0.3" - minipass-collect: "npm:^2.0.1" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^4.0.0" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - unique-filename: "npm:^3.0.0" - checksum: 10/d4c161f071524bb636334b8cf94780c014e29c180a886b8184da8f2f44d2aca88d5664797c661e9f74bdbd34697c2f231ed7c24c256cecbb0a0563ad1ada2219 - languageName: node - linkType: hard - -"cache-base@npm:^1.0.1": - version: 1.0.1 - resolution: "cache-base@npm:1.0.1" - dependencies: - collection-visit: "npm:^1.0.0" - component-emitter: "npm:^1.2.1" - get-value: "npm:^2.0.6" - has-value: "npm:^1.0.0" - isobject: "npm:^3.0.1" - set-value: "npm:^2.0.0" - to-object-path: "npm:^0.3.0" - union-value: "npm:^1.0.0" - unset-value: "npm:^1.0.0" - checksum: 10/50dd11af5ce4aaa8a8bff190a870c940db80234cf087cd47dd177be8629c36ad8cd0716e62418ec1e135f2d01b28aafff62cd22d33412c3d18b2109dd9073711 - languageName: node - linkType: hard - -"cacheable-lookup@npm:^6.0.4": - version: 6.1.0 - resolution: "cacheable-lookup@npm:6.1.0" - checksum: 10/9b37d31fba27ff244254294814dfdad69e3d257cb283932f58823141de5043a46d35339fa81ec40fdbb5d76d1578324258995f41a4fd37ed05d4e9b54823802e - languageName: node - linkType: hard - -"cacheable-lookup@npm:^7.0.0": - version: 7.0.0 - resolution: "cacheable-lookup@npm:7.0.0" - checksum: 10/69ea78cd9f16ad38120372e71ba98b64acecd95bbcbcdad811f857dc192bad81ace021f8def012ce19178583db8d46afd1a00b3e8c88527e978e049edbc23252 - languageName: node - linkType: hard - -"cacheable-request@npm:^10.2.8": - version: 10.2.12 - resolution: "cacheable-request@npm:10.2.12" - dependencies: - "@types/http-cache-semantics": "npm:^4.0.1" - get-stream: "npm:^6.0.1" - http-cache-semantics: "npm:^4.1.1" - keyv: "npm:^4.5.2" - mimic-response: "npm:^4.0.0" - normalize-url: "npm:^8.0.0" - responselike: "npm:^3.0.0" - checksum: 10/abc1541f80e0995a52cfc6197ad12d2a910363c7342815a88f1606b767d81d5ccb43b8f1ba5a16180f3bf939b28f9b07dff22d346572d343f50a908813118e0b - languageName: node - linkType: hard - -"cacheable-request@npm:^6.0.0": - version: 6.1.0 - resolution: "cacheable-request@npm:6.1.0" - dependencies: - clone-response: "npm:^1.0.2" - get-stream: "npm:^5.1.0" - http-cache-semantics: "npm:^4.0.0" - keyv: "npm:^3.0.0" - lowercase-keys: "npm:^2.0.0" - normalize-url: "npm:^4.1.0" - responselike: "npm:^1.0.2" - checksum: 10/804f6c377ce6fef31c584babde31d55c69305569058ad95c24a41bb7b33d0ea188d388467a9da6cb340e95a3a1f8a94e1f3a709fef5eaf9c6b88e62448fa29be - languageName: node - linkType: hard - -"cacheable-request@npm:^7.0.2": - version: 7.0.4 - resolution: "cacheable-request@npm:7.0.4" - dependencies: - clone-response: "npm:^1.0.2" - get-stream: "npm:^5.1.0" - http-cache-semantics: "npm:^4.0.0" - keyv: "npm:^4.0.0" - lowercase-keys: "npm:^2.0.0" - normalize-url: "npm:^6.0.1" - responselike: "npm:^2.0.0" - checksum: 10/0f4f2001260ecca78b9f64fc8245e6b5a5dcde24ea53006daab71f5e0e1338095aa1512ec099c4f9895a9e5acfac9da423cb7c079e131485891e9214aca46c41 - languageName: node - linkType: hard - -"caching-transform@npm:^1.0.0": - version: 1.0.1 - resolution: "caching-transform@npm:1.0.1" - dependencies: - md5-hex: "npm:^1.2.0" - mkdirp: "npm:^0.5.1" - write-file-atomic: "npm:^1.1.4" - checksum: 10/03b93231dd691f25445430c1689a9d771426efbc3ba0af609ae9f6907b90f3599b0a6ece70c4dd8045e2dc48351a859140b6cfcb1c1d2faf1bbb849a262bb128 - languageName: node - linkType: hard - -"caching-transform@npm:^2.0.0": - version: 2.0.0 - resolution: "caching-transform@npm:2.0.0" - dependencies: - make-dir: "npm:^1.0.0" - md5-hex: "npm:^2.0.0" - package-hash: "npm:^2.0.0" - write-file-atomic: "npm:^2.0.0" - checksum: 10/83275a2529b4c65cc5c59b548ec5a0e7829883518235c45ff67e344d1bca6720d7233837b88e881e940f4e372503e1265df326f18dd4d717375e87fabca6dba2 - languageName: node - linkType: hard - -"caching-transform@npm:^4.0.0": - version: 4.0.0 - resolution: "caching-transform@npm:4.0.0" - dependencies: - hasha: "npm:^5.0.0" - make-dir: "npm:^3.0.0" - package-hash: "npm:^4.0.0" - write-file-atomic: "npm:^3.0.0" - checksum: 10/7e7ca628511ab18c86eea1231834d2591de29a13ae771a7d9ab85be8c6e53e45c5a5b0d0d95d4a3274fc4f26c16956a98162e40c191c131204b5d5aa949660b5 - languageName: node - linkType: hard - -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": - version: 1.0.2 - resolution: "call-bind@npm:1.0.2" - dependencies: - function-bind: "npm:^1.1.1" - get-intrinsic: "npm:^1.0.2" - checksum: 10/ca787179c1cbe09e1697b56ad499fd05dc0ae6febe5081d728176ade699ea6b1589240cb1ff1fe11fcf9f61538c1af60ad37e8eb2ceb4ef21cd6085dfd3ccedd - languageName: node - linkType: hard - -"call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": - version: 1.0.5 - resolution: "call-bind@npm:1.0.5" - dependencies: - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.1" - set-function-length: "npm:^1.1.1" - checksum: 10/246d44db6ef9bbd418828dbd5337f80b46be4398d522eded015f31554cbb2ea33025b0203b75c7ab05a1a255b56ef218880cca1743e4121e306729f9e414da39 - languageName: node - linkType: hard - -"call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": - version: 1.0.7 - resolution: "call-bind@npm:1.0.7" - dependencies: - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - set-function-length: "npm:^1.2.1" - checksum: 10/cd6fe658e007af80985da5185bff7b55e12ef4c2b6f41829a26ed1eef254b1f1c12e3dfd5b2b068c6ba8b86aba62390842d81752e67dcbaec4f6f76e7113b6b7 - languageName: node - linkType: hard - -"caller-callsite@npm:^4.1.0": - version: 4.1.0 - resolution: "caller-callsite@npm:4.1.0" - dependencies: - callsites: "npm:^3.1.0" - checksum: 10/4a3e775344f553a473947ddb01e45c91c7e0e5a0d77d697095063ad0efd8ea38e4093654837470aaf529cedff338320ece9e5da91224bc5cc9109a0ded25cd11 - languageName: node - linkType: hard - -"caller-path@npm:^0.1.0": - version: 0.1.0 - resolution: "caller-path@npm:0.1.0" - dependencies: - callsites: "npm:^0.2.0" - checksum: 10/f4f2216897d2c150e30d06c6a9243115e500184433b42d597f0b8816fda8f6b7f782dba39fc37310dcc67c90e1112729709d3bb9e10983552e76632250b075f3 - languageName: node - linkType: hard - -"caller-path@npm:^3.0.1": - version: 3.0.1 - resolution: "caller-path@npm:3.0.1" - dependencies: - caller-callsite: "npm:^4.1.0" - checksum: 10/ed00224727925d7e6807230e054a7bb995fa09cd9b8c8241c3985de9c50c96784cf4b996360c2c417b56d82af340c7752300ad3387c68e7e9cfd9c5516e3faa9 - languageName: node - linkType: hard - -"callsite@npm:^1.0.0": - version: 1.0.0 - resolution: "callsite@npm:1.0.0" - checksum: 10/39fc89ef9dbee7d5491bc69034fc16fbb8876a73456f831cc27060b5828e94357bb6705e0127a6d0182d79b03dbdb0ef88223d0b599c26667c871c89b30eb681 - languageName: node - linkType: hard - -"callsites@npm:^0.2.0": - version: 0.2.0 - resolution: "callsites@npm:0.2.0" - checksum: 10/a6293327e566388e564fde9cefcb4c0a4b44033b9c6cf42effa9128017da45438027caff1cf758af3f8304b36e05902ba00fd75a286d7748eb57b7f83cdcce30 - languageName: node - linkType: hard - -"callsites@npm:^3.0.0, callsites@npm:^3.1.0": - version: 3.1.0 - resolution: "callsites@npm:3.1.0" - checksum: 10/072d17b6abb459c2ba96598918b55868af677154bec7e73d222ef95a8fdb9bbf7dae96a8421085cdad8cd190d86653b5b6dc55a4484f2e5b2e27d5e0c3fc15b3 - languageName: node - linkType: hard - -"camel-case@npm:^3.0.0": - version: 3.0.0 - resolution: "camel-case@npm:3.0.0" - dependencies: - no-case: "npm:^2.2.0" - upper-case: "npm:^1.1.1" - checksum: 10/4190ed6ab8acf4f3f6e1a78ad4d0f3f15ce717b6bfa1b5686d58e4bcd29960f6e312dd746b5fa259c6d452f1413caef25aee2e10c9b9a580ac83e516533a961a - languageName: node - linkType: hard - -"camel-case@npm:^4.1.2": - version: 4.1.2 - resolution: "camel-case@npm:4.1.2" - dependencies: - pascal-case: "npm:^3.1.2" - tslib: "npm:^2.0.3" - checksum: 10/bcbd25cd253b3cbc69be3f535750137dbf2beb70f093bdc575f73f800acc8443d34fd52ab8f0a2413c34f1e8203139ffc88428d8863e4dfe530cfb257a379ad6 - languageName: node - linkType: hard - -"camelcase-css@npm:^2.0.1": - version: 2.0.1 - resolution: "camelcase-css@npm:2.0.1" - checksum: 10/1cec2b3b3dcb5026688a470b00299a8db7d904c4802845c353dbd12d9d248d3346949a814d83bfd988d4d2e5b9904c07efe76fecd195a1d4f05b543e7c0b56b1 - languageName: node - linkType: hard - -"camelcase-keys@npm:^6.2.2": - version: 6.2.2 - resolution: "camelcase-keys@npm:6.2.2" - dependencies: - camelcase: "npm:^5.3.1" - map-obj: "npm:^4.0.0" - quick-lru: "npm:^4.0.1" - checksum: 10/c1999f5b6d03bee7be9a36e48eef3da9e93e51b000677348ec8d15d51fc4418375890fb6c7155e387322d2ebb2a2cdebf9cd96607a6753d1d6c170d9b1e2eed5 - languageName: node - linkType: hard - -"camelcase-keys@npm:^7.0.0": - version: 7.0.2 - resolution: "camelcase-keys@npm:7.0.2" - dependencies: - camelcase: "npm:^6.3.0" - map-obj: "npm:^4.1.0" - quick-lru: "npm:^5.1.1" - type-fest: "npm:^1.2.1" - checksum: 10/6f92d969b7fa97456ffc35fe93f0a42d0d0a00fbd94bfc6cac07c84da86e6acfb89fdf04151460d47c583d2dd38a3e9406f980efe9a3d2e143cdfe46a7343083 - languageName: node - linkType: hard - -"camelcase@npm:^4.1.0": - version: 4.1.0 - resolution: "camelcase@npm:4.1.0" - checksum: 10/9683356daf9b64fae4b30c91f8ceb1f34f22746e03d1804efdbe738357d38b47f206cdd71efcf2ed72018b2e88eeb8ec3f79adb09c02f1253a4b6d5d405ff2ae - languageName: node - linkType: hard - -"camelcase@npm:^5.3.1": - version: 5.3.1 - resolution: "camelcase@npm:5.3.1" - checksum: 10/e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b - languageName: node - linkType: hard - -"camelcase@npm:^6.0.0, camelcase@npm:^6.2.0, camelcase@npm:^6.2.1, camelcase@npm:^6.3.0": - version: 6.3.0 - resolution: "camelcase@npm:6.3.0" - checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d - languageName: node - linkType: hard - -"camelize@npm:^1.0.0": - version: 1.0.0 - resolution: "camelize@npm:1.0.0" - checksum: 10/ad285ffc909e43fc0e973bebd269c063657c5b69344def478896b0d4a6d64643af1908b0455f50d1fe8ef0ea7591a8a649086f20eae0de4c7e1f8e1cdf5c552f - languageName: node - linkType: hard - -"caniuse-api@npm:^3.0.0": - version: 3.0.0 - resolution: "caniuse-api@npm:3.0.0" - dependencies: - browserslist: "npm:^4.0.0" - caniuse-lite: "npm:^1.0.0" - lodash.memoize: "npm:^4.1.2" - lodash.uniq: "npm:^4.5.0" - checksum: 10/db2a229383b20d0529b6b589dde99d7b6cb56ba371366f58cbbfa2929c9f42c01f873e2b6ef641d4eda9f0b4118de77dbb2805814670bdad4234bf08e720b0b4 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001520": - version: 1.0.30001524 - resolution: "caniuse-lite@npm:1.0.30001524" - checksum: 10/381e0bbaeb2a60f1fcd10c17d233c17826a2af933dfc68fa8e315c6ae08b6b56d316e7fa07b039912aac8d8b2b07fb8188edbbdd29dffacb3860e0013548c445 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001332": - version: 1.0.30001340 - resolution: "caniuse-lite@npm:1.0.30001340" - checksum: 10/d1c6583f15e32b847f27d5482e900021deec37c864b988147aa242e4859fbfd20a4f83b2e13001e7808e9701dc30a510fcae03619218488c4c5d09b981efce6f - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001449": - version: 1.0.30001474 - resolution: "caniuse-lite@npm:1.0.30001474" - checksum: 10/14bfb222e51b302069f4051904600fc33263bcf7c5fb9a9b0e5ec2df90636841cb529e1e3368ef19c2ab9f441586fc6a44d8234bde23004f3bd3a8fac827dcb5 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001464, caniuse-lite@npm:^1.0.30001517": - version: 1.0.30001532 - resolution: "caniuse-lite@npm:1.0.30001532" - checksum: 10/3be6aae89a588f1111eec0cd9d3125f24a5bb2a9ca2b2ead5a3bee529b85f32b01fd5aa751f292d18da0941948288187ff558b2ca199dac37fed18fba25047ec - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001503": - version: 1.0.30001510 - resolution: "caniuse-lite@npm:1.0.30001510" - checksum: 10/7d999b0bd93b32ff53b9c8ce0d904c18ed7b2b688406f541f7e9fcd1bade8ac1338a24c7a9845a1985edb56dd473948a90c2546166304a0880376bc47f4e1ac0 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001541": - version: 1.0.30001549 - resolution: "caniuse-lite@npm:1.0.30001549" - checksum: 10/515ea123e5249075566a602e2c6a3239e16283d3cd4b78daf4fa86569c450ea6eec8a1c2d2cc33e3d554fa37b3a203306dc8423fee635ec04a86b2a9164dbbf2 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001565": - version: 1.0.30001579 - resolution: "caniuse-lite@npm:1.0.30001579" - checksum: 10/2cd0c02e5d66b09888743ad2b624dbde697ace5c76b55bfd6065ea033f6abea8ac3f5d3c9299c042f91b396e2141b49bc61f5e17086dc9ba3a866cc6790134c0 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001591, caniuse-lite@npm:^1.0.30001640": - version: 1.0.30001642 - resolution: "caniuse-lite@npm:1.0.30001642" - checksum: 10/8d80ea82be453ae0fdfea8766d82740a4945c1b99189650f29bfc458d4e235d7e99027a8f8bc5a4228d8c4457ba896315284b0703f300353ad5f09d8e693de10 - languageName: node - linkType: hard - -"canonicalize@npm:^1.0.1": - version: 1.0.8 - resolution: "canonicalize@npm:1.0.8" - checksum: 10/4087d6de4a2412b9d36f9cbc0825336d97fa61021365d53869b30d3476a348425f193d019e18a21c97ebd042ac9f98f93f6059f14b4105b741c69b4b940bd91a - languageName: node - linkType: hard - -"cardinal@npm:^2.1.1": - version: 2.1.1 - resolution: "cardinal@npm:2.1.1" - dependencies: - ansicolors: "npm:~0.3.2" - redeyed: "npm:~2.1.0" - bin: - cdl: ./bin/cdl.js - checksum: 10/caf0d34739ef7b1d80e1753311f889997b62c4490906819eb5da5bd46e7f5e5caba7a8a96ca401190c7d9c18443a7749e5338630f7f9a1ae98d60cac49b9008e - languageName: node - linkType: hard - -"case-sensitive-paths-webpack-plugin@npm:^2.4.0": - version: 2.4.0 - resolution: "case-sensitive-paths-webpack-plugin@npm:2.4.0" - checksum: 10/8187f4a6d9c1342a62e76466d4f2ed53e6c0ea73fdbf7779751538f2abe49738bfd16b43592367f00f37fdd593accf92162c1043c016dd6d9ccb55180b6b5fa7 - languageName: node - linkType: hard - -"case@npm:^1.6.3": - version: 1.6.3 - resolution: "case@npm:1.6.3" - checksum: 10/2fc1df75bbb4118339e06141b9a54aba95cc62460ac92730290144fbec6b6a04f5bf7abf6a6486a1338f5821bd184402f216cec8cea0472451759c27e20fc332 - languageName: node - linkType: hard - -"caseless@npm:~0.12.0": - version: 0.12.0 - resolution: "caseless@npm:0.12.0" - checksum: 10/ea1efdf430975fdbac3505cdd21007f7ac5aa29b6d4d1c091f965853cd1bf87e4b08ea07b31a6d688b038872b7cdf0589d9262d59c699d199585daad052aeb20 - languageName: node - linkType: hard - -"catering@npm:^2.0.0, catering@npm:^2.1.0, catering@npm:^2.1.1": - version: 2.1.1 - resolution: "catering@npm:2.1.1" - checksum: 10/4669c9fa5f3a73273535fb458a964d8aba12dc5102d8487049cf03623bef3cdff4b5d9f92ff04c00f1001057a7cc7df6e700752ac622c2a7baf7bcff34166683 - languageName: node - linkType: hard - -"cbor@npm:9.0.1": - version: 9.0.1 - resolution: "cbor@npm:9.0.1" - dependencies: - nofilter: "npm:^3.1.0" - checksum: 10/fa1bdf233b7d8b95b991c7d3861b6bf300b0d62fcebda34e4cca53605d32585021e80ee00b52378f492da011ebde6b21d704ac5117c2c6cce30de0b6419d2372 - languageName: node - linkType: hard - -"cbor@npm:^5.2.0": - version: 5.2.0 - resolution: "cbor@npm:5.2.0" - dependencies: - bignumber.js: "npm:^9.0.1" - nofilter: "npm:^1.0.4" - checksum: 10/e7c4467536dc6693b5993c71f83a76c18d3c5e898011dc1a0c89dcb27ae1ad4b8d13f1ec338d47623f8f1a6ed5440db769df38c2c70378573766ce89436c5122 - languageName: node - linkType: hard - -"cborg@npm:^4.0.0": - version: 4.0.3 - resolution: "cborg@npm:4.0.3" - bin: - cborg: lib/bin.js - checksum: 10/d5f08ea88ccb01d6fb31eede395200a7f05cfd5c9872f166f85cba603c8b3684c12d919059d16d2d0eb000cd3adcf3ccd9a47e51835840c5f8e3dc77378cefbd - languageName: node - linkType: hard - -"chai-as-promised@npm:7.1.1": - version: 7.1.1 - resolution: "chai-as-promised@npm:7.1.1" - dependencies: - check-error: "npm:^1.0.2" - peerDependencies: - chai: ">= 2.1.2 < 5" - checksum: 10/5d9ecab37b313047f5ea25d00b1cb6e7f2710c6e2f57d91aed7cfed5008d995cb65ea723af4e5d782bafd9a6eff5a4267af53dfe7212dc10dd1d92b9127bc531 - languageName: node - linkType: hard - -"chai@npm:4.3.7": - version: 4.3.7 - resolution: "chai@npm:4.3.7" - dependencies: - assertion-error: "npm:^1.1.0" - check-error: "npm:^1.0.2" - deep-eql: "npm:^4.1.2" - get-func-name: "npm:^2.0.0" - loupe: "npm:^2.3.1" - pathval: "npm:^1.1.1" - type-detect: "npm:^4.0.5" - checksum: 10/615eabfeb9032315fb2d287fb03c29b7996f943024c7d4482b1b5370b6c22807fd4da329244dc5ac0c8802408d741dfb9b86245ffeddc83ce18898dda8d7aed4 - languageName: node - linkType: hard - -"chalk-template@npm:^1.1.0": - version: 1.1.0 - resolution: "chalk-template@npm:1.1.0" - dependencies: - chalk: "npm:^5.2.0" - checksum: 10/868aae8d4e7556ad2f35de4e04fe65dbe1ea6c5c80ad783f1c156d0a5c33f444c6814f49cbb68fe348c78e99daf2bcf566b47ad7e13603e4691ca78b2f422824 - languageName: node - linkType: hard - -"chalk@npm:2.4.2, chalk@npm:^2.0.0, chalk@npm:^2.1.0, chalk@npm:^2.3.0, chalk@npm:^2.3.2, chalk@npm:^2.4.1, chalk@npm:^2.4.2": - version: 2.4.2 - resolution: "chalk@npm:2.4.2" - dependencies: - ansi-styles: "npm:^3.2.1" - escape-string-regexp: "npm:^1.0.5" - supports-color: "npm:^5.3.0" - checksum: 10/3d1d103433166f6bfe82ac75724951b33769675252d8417317363ef9d54699b7c3b2d46671b772b893a8e50c3ece70c4b933c73c01e81bc60ea4df9b55afa303 - languageName: node - linkType: hard - -"chalk@npm:4.1.2, chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" - dependencies: - ansi-styles: "npm:^4.1.0" - supports-color: "npm:^7.1.0" - checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 - languageName: node - linkType: hard - -"chalk@npm:^1.0.0, chalk@npm:^1.1.1, chalk@npm:^1.1.3": - version: 1.1.3 - resolution: "chalk@npm:1.1.3" - dependencies: - ansi-styles: "npm:^2.2.1" - escape-string-regexp: "npm:^1.0.2" - has-ansi: "npm:^2.0.0" - strip-ansi: "npm:^3.0.0" - supports-color: "npm:^2.0.0" - checksum: 10/abcf10da02afde04cc615f06c4bdb3ffc70d2bfbf37e0df03bb88b7459a9411dab4d01210745b773abc936031530a20355f1facc4bee1bbf08613d8fdcfb3aeb - languageName: node - linkType: hard - -"chalk@npm:^3.0.0": - version: 3.0.0 - resolution: "chalk@npm:3.0.0" - dependencies: - ansi-styles: "npm:^4.1.0" - supports-color: "npm:^7.1.0" - checksum: 10/37f90b31fd655fb49c2bd8e2a68aebefddd64522655d001ef417e6f955def0ed9110a867ffc878a533f2dafea5f2032433a37c8a7614969baa7f8a1cd424ddfc - languageName: node - linkType: hard - -"chalk@npm:^5.2.0, chalk@npm:^5.3.0": - version: 5.3.0 - resolution: "chalk@npm:5.3.0" - checksum: 10/6373caaab21bd64c405bfc4bd9672b145647fc9482657b5ea1d549b3b2765054e9d3d928870cdf764fb4aad67555f5061538ff247b8310f110c5c888d92397ea - languageName: node - linkType: hard - -"change-case@npm:3.0.2": - version: 3.0.2 - resolution: "change-case@npm:3.0.2" - dependencies: - camel-case: "npm:^3.0.0" - constant-case: "npm:^2.0.0" - dot-case: "npm:^2.1.0" - header-case: "npm:^1.0.0" - is-lower-case: "npm:^1.1.0" - is-upper-case: "npm:^1.1.0" - lower-case: "npm:^1.1.1" - lower-case-first: "npm:^1.0.0" - no-case: "npm:^2.3.2" - param-case: "npm:^2.1.0" - pascal-case: "npm:^2.0.0" - path-case: "npm:^2.1.0" - sentence-case: "npm:^2.1.0" - snake-case: "npm:^2.1.0" - swap-case: "npm:^1.1.0" - title-case: "npm:^2.1.0" - upper-case: "npm:^1.1.1" - upper-case-first: "npm:^1.1.0" - checksum: 10/32caa824380cca8775e3b22210821cfbbad02833f1d9cba146468848f49240096f41cbae596215961d6b6090791db66efc0edbb14511b014667d5fb0bc7bc523 - languageName: node - linkType: hard - -"change-case@npm:^3.0.1": - version: 3.1.0 - resolution: "change-case@npm:3.1.0" - dependencies: - camel-case: "npm:^3.0.0" - constant-case: "npm:^2.0.0" - dot-case: "npm:^2.1.0" - header-case: "npm:^1.0.0" - is-lower-case: "npm:^1.1.0" - is-upper-case: "npm:^1.1.0" - lower-case: "npm:^1.1.1" - lower-case-first: "npm:^1.0.0" - no-case: "npm:^2.3.2" - param-case: "npm:^2.1.0" - pascal-case: "npm:^2.0.0" - path-case: "npm:^2.1.0" - sentence-case: "npm:^2.1.0" - snake-case: "npm:^2.1.0" - swap-case: "npm:^1.1.0" - title-case: "npm:^2.1.0" - upper-case: "npm:^1.1.1" - upper-case-first: "npm:^1.1.0" - checksum: 10/04ecb4db5ea15b71db7d229fd4fb4034e3f8a4f3e79c3729994eb9339f401b2b18cd5e01f19c1a6a607716ad32206cdee40812df76d9808629e8694f847da8a9 - languageName: node - linkType: hard - -"char-regex@npm:^1.0.2": - version: 1.0.2 - resolution: "char-regex@npm:1.0.2" - checksum: 10/1ec5c2906adb9f84e7f6732a40baef05d7c85401b82ffcbc44b85fbd0f7a2b0c2a96f2eb9cf55cae3235dc12d4023003b88f09bcae8be9ae894f52ed746f4d48 - languageName: node - linkType: hard - -"char-regex@npm:^2.0.0": - version: 2.0.1 - resolution: "char-regex@npm:2.0.1" - checksum: 10/fadd100b963c160a70192e47e122c654cadf447c2c8f23b0bda4dc9ef1a02c993abbb0f21f50e2e58f90a8453ca019b3c86f001688cb42fb7b54af4e661b1ada - languageName: node - linkType: hard - -"chardet@npm:^0.4.0": - version: 0.4.2 - resolution: "chardet@npm:0.4.2" - checksum: 10/9c17cb164674a78dd889505d6544d74080d8587c1aa7f64f0d1fbfba02f0cbfc8c719ed59323b7c4970fb42d2970dedfcb4555cde0b76306d8aa2c07827f2f78 - languageName: node - linkType: hard - -"chardet@npm:^0.7.0": - version: 0.7.0 - resolution: "chardet@npm:0.7.0" - checksum: 10/b0ec668fba5eeec575ed2559a0917ba41a6481f49063c8445400e476754e0957ee09e44dc032310f526182b8f1bf25e9d4ed371f74050af7be1383e06bc44952 - languageName: node - linkType: hard - -"check-error@npm:^1.0.2": - version: 1.0.2 - resolution: "check-error@npm:1.0.2" - checksum: 10/011e74b2eac49bd42c5610f15d6949d982e7ec946247da0276278a90e7476e6b88d25d3c605a4115d5e3575312e1f5a11e91c82290c8a47ca275c92f5d0981db - languageName: node - linkType: hard - -"check-types@npm:^11.1.1": - version: 11.2.2 - resolution: "check-types@npm:11.2.2" - checksum: 10/a741fc4748d1923b0ff11003aab3fc18eaa8d8b6b3d5e93d21796fc6355f95557b9acc6189fe9e2411efe8724313b3123ba0bc1d728c0db30791c3b8a894a38a - languageName: node - linkType: hard - -"checkpoint-store@npm:^1.1.0": - version: 1.1.0 - resolution: "checkpoint-store@npm:1.1.0" - dependencies: - functional-red-black-tree: "npm:^1.0.1" - checksum: 10/94e921ccb222c7970615e8b2bcd956dbd52f15a1c397af0447dbdef8ecd32ffe342e394d39e55f2912278a460f3736de777b5b57a5baf229c0a6bd04d2465511 - languageName: node - linkType: hard - -"cheerio-select@npm:^2.1.0": - version: 2.1.0 - resolution: "cheerio-select@npm:2.1.0" - dependencies: - boolbase: "npm:^1.0.0" - css-select: "npm:^5.1.0" - css-what: "npm:^6.1.0" - domelementtype: "npm:^2.3.0" - domhandler: "npm:^5.0.3" - domutils: "npm:^3.0.1" - checksum: 10/b5d89208c23468c3a32d1e04f88b9e8c6e332e3649650c5cd29255e2cebc215071ae18563f58c3dc3f6ef4c234488fc486035490fceb78755572288245e2931a - languageName: node - linkType: hard - -"cheerio@npm:^1.0.0-rc.2": - version: 1.0.0-rc.12 - resolution: "cheerio@npm:1.0.0-rc.12" - dependencies: - cheerio-select: "npm:^2.1.0" - dom-serializer: "npm:^2.0.0" - domhandler: "npm:^5.0.3" - domutils: "npm:^3.0.1" - htmlparser2: "npm:^8.0.1" - parse5: "npm:^7.0.0" - parse5-htmlparser2-tree-adapter: "npm:^7.0.0" - checksum: 10/812fed61aa4b669bbbdd057d0d7f73ba4649cabfd4fc3a8f1d5c7499e4613b430636102716369cbd6bbed8f1bdcb06387ae8342289fb908b2743184775f94f18 - languageName: node - linkType: hard - -"chokidar@npm:3.5.3, chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.0.0, chokidar@npm:^3.3.0, chokidar@npm:^3.4.0, chokidar@npm:^3.4.2, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": - version: 3.5.3 - resolution: "chokidar@npm:3.5.3" - dependencies: - anymatch: "npm:~3.1.2" - braces: "npm:~3.0.2" - fsevents: "npm:~2.3.2" - glob-parent: "npm:~5.1.2" - is-binary-path: "npm:~2.1.0" - is-glob: "npm:~4.0.1" - normalize-path: "npm:~3.0.0" - readdirp: "npm:~3.6.0" - dependenciesMeta: - fsevents: - optional: true - checksum: 10/863e3ff78ee7a4a24513d2a416856e84c8e4f5e60efbe03e8ab791af1a183f569b62fc6f6b8044e2804966cb81277ddbbc1dc374fba3265bd609ea8efd62f5b3 - languageName: node - linkType: hard - -"chownr@npm:^1.1.1, chownr@npm:^1.1.4": - version: 1.1.4 - resolution: "chownr@npm:1.1.4" - checksum: 10/115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d - languageName: node - linkType: hard - -"chownr@npm:^2.0.0": - version: 2.0.0 - resolution: "chownr@npm:2.0.0" - checksum: 10/c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f - languageName: node - linkType: hard - -"chrome-trace-event@npm:^1.0.2": - version: 1.0.3 - resolution: "chrome-trace-event@npm:1.0.3" - checksum: 10/b5fbdae5bf00c96fa3213de919f2b2617a942bfcb891cdf735fbad2a6f4f3c25d42e3f2b1703328619d352c718b46b9e18999fd3af7ef86c26c91db6fae1f0da - languageName: node - linkType: hard - -"ci-info@npm:^2.0.0": - version: 2.0.0 - resolution: "ci-info@npm:2.0.0" - checksum: 10/3b374666a85ea3ca43fa49aa3a048d21c9b475c96eb13c133505d2324e7ae5efd6a454f41efe46a152269e9b6a00c9edbe63ec7fa1921957165aae16625acd67 - languageName: node - linkType: hard - -"ci-info@npm:^3.1.1, ci-info@npm:^3.2.0": - version: 3.3.0 - resolution: "ci-info@npm:3.3.0" - checksum: 10/8adea555a4f92e4f80f5e58e63277b349efa439dabfc6e2ca3773126f3fea7699f3546ff931f996a08f9905b2f6a7fc4d671a0c549cfedab7369e35aa0723b00 - languageName: node - linkType: hard - -"ci-info@npm:^4.0.0": - version: 4.0.0 - resolution: "ci-info@npm:4.0.0" - checksum: 10/c983bb7ff1b06648f4a47432201abbd58291147d8ab5043dbb5c03e1a0e3fb2347f40d29b66a3044f28ffeb5dade01ac35aa6bd4e7464a44d9a49a3d7532415a - languageName: node - linkType: hard - -"cids@npm:^0.7.1": - version: 0.7.5 - resolution: "cids@npm:0.7.5" - dependencies: - buffer: "npm:^5.5.0" - class-is: "npm:^1.1.0" - multibase: "npm:~0.6.0" - multicodec: "npm:^1.0.0" - multihashes: "npm:~0.4.15" - checksum: 10/b916b0787e238dd9f84fb5e155333cadf07fd7ad34ea8dbd47f98bb618eecc9c70760767c0966d0eae73050c4fa6080fdc387e515565b009d2126253c7775fac - languageName: node - linkType: hard - -"cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": - version: 1.0.4 - resolution: "cipher-base@npm:1.0.4" - dependencies: - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - checksum: 10/3d5d6652ca499c3f7c5d7fdc2932a357ec1e5aa84f2ad766d850efd42e89753c97b795c3a104a8e7ae35b4e293f5363926913de3bf8181af37067d9d541ca0db - languageName: node - linkType: hard - -"circular-json@npm:^0.3.1": - version: 0.3.3 - resolution: "circular-json@npm:0.3.3" - checksum: 10/b0f6a91e7322d561097d1e26dda9db14bd8b1759633ad9c62c102e20e47f2cb056ab7b0dc1bd1cacf31e2071d2b294bcf4729cffad5faafc50ee9c83496c428c - languageName: node - linkType: hard - -"cjs-module-lexer@npm:^1.0.0": - version: 1.2.2 - resolution: "cjs-module-lexer@npm:1.2.2" - checksum: 10/f80f84bfdcc53379cc18e25ea3c0cdb4595c142b8e28df304f5c88f38202e1bccf13e845401593656781f79fb43273e1d402d6187d0eeee8dca5ddecee1dcad4 - languageName: node - linkType: hard - -"class-is@npm:^1.1.0": - version: 1.1.0 - resolution: "class-is@npm:1.1.0" - checksum: 10/8147a3e4ce86eb103d78621d665b87e8e33fcb3f54932fdca894b8222820903b43b2f6b4335d8822104702a5dc904c8f187127fdea4e7d48d905488b35c9e6a7 - languageName: node - linkType: hard - -"class-transformer@npm:0.5.1, class-transformer@npm:^0.5.1": - version: 0.5.1 - resolution: "class-transformer@npm:0.5.1" - checksum: 10/750327e3e9a5cf233c5234252f4caf6b06c437bf68a24acbdcfb06c8e0bfff7aa97c30428184813e38e08111b42871f20c5cf669ea4490f8ae837c09f08b31e7 - languageName: node - linkType: hard - -"class-utils@npm:^0.3.5": - version: 0.3.6 - resolution: "class-utils@npm:0.3.6" - dependencies: - arr-union: "npm:^3.1.0" - define-property: "npm:^0.2.5" - isobject: "npm:^3.0.0" - static-extend: "npm:^0.1.1" - checksum: 10/b236d9deb6594828966e45c5f48abac9a77453ee0dbdb89c635ce876f59755d7952309d554852b6f7d909198256c335a4bd51b09c1d238b36b92152eb2b9d47a - languageName: node - linkType: hard - -"class-validator@npm:0.14.0": - version: 0.14.0 - resolution: "class-validator@npm:0.14.0" - dependencies: - "@types/validator": "npm:^13.7.10" - libphonenumber-js: "npm:^1.10.14" - validator: "npm:^13.7.0" - checksum: 10/bf550a4ab7b424467737c75e7e6171a45fe010ccab6af50793539d9d2e1f5cce1a35fbc8b11f9a5de4f049852f768232acca16f05cf80993a36369b494560f44 - languageName: node - linkType: hard - -"classic-level@npm:^1.2.0": - version: 1.3.0 - resolution: "classic-level@npm:1.3.0" - dependencies: - abstract-level: "npm:^1.0.2" - catering: "npm:^2.1.0" - module-error: "npm:^1.0.1" - napi-macros: "npm:^2.2.2" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.3.0" - checksum: 10/b2d07a5932a09bdf0a5b27e662154888c85edd59d75816c7e60960dacadbc7553daa9f5efb58d2575b3eae0540d504ef71d49f438744366626762a0ddefe5cc5 - languageName: node - linkType: hard - -"clean-css@npm:^5.2.2": - version: 5.3.2 - resolution: "clean-css@npm:5.3.2" - dependencies: - source-map: "npm:~0.6.0" - checksum: 10/efd9efbf400f38a12f99324bad5359bdd153211b048721e4d4ddb629a88865dff3012dca547a14bdd783d78ccf064746e39fd91835546a08e2d811866aff0857 - languageName: node - linkType: hard - -"clean-stack@npm:^2.0.0": - version: 2.2.0 - resolution: "clean-stack@npm:2.2.0" - checksum: 10/2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 - languageName: node - linkType: hard - -"clean-stack@npm:^4.0.0": - version: 4.1.0 - resolution: "clean-stack@npm:4.1.0" - dependencies: - escape-string-regexp: "npm:5.0.0" - checksum: 10/56fdca7a67a61528676eaddce35442824700b674cf882150ac416824966f65b5e15d4ea02d1d47f4d16ad50213718c1f00ae0f6cca46aeec3fd761b49cf7204f - languageName: node - linkType: hard - -"clear-module@npm:^4.1.2": - version: 4.1.2 - resolution: "clear-module@npm:4.1.2" - dependencies: - parent-module: "npm:^2.0.0" - resolve-from: "npm:^5.0.0" - checksum: 10/4931f0c461f5d7b9b79f62c2d1bc31c37f7f1d33b4e95eef7080a83955c0374f4c180f5a96cc4d63bbefc64a9aa5d12b155641109e8e489dfa50fd5820e5101f - languageName: node - linkType: hard - -"cli-boxes@npm:^2.2.0, cli-boxes@npm:^2.2.1": - version: 2.2.1 - resolution: "cli-boxes@npm:2.2.1" - checksum: 10/be79f8ec23a558b49e01311b39a1ea01243ecee30539c880cf14bf518a12e223ef40c57ead0cb44f509bffdffc5c129c746cd50d863ab879385370112af4f585 - languageName: node - linkType: hard - -"cli-cursor@npm:^1.0.1": - version: 1.0.2 - resolution: "cli-cursor@npm:1.0.2" - dependencies: - restore-cursor: "npm:^1.0.1" - checksum: 10/e3b4400d5e925ed11c7596f82e80e170693f69ac6f0f21da2a400043c37548dd780f985a1a5ef1ffb038e36fc6711d1d4f066b104eed851ae76e34bd883cf2bf - languageName: node - linkType: hard - -"cli-cursor@npm:^2.1.0": - version: 2.1.0 - resolution: "cli-cursor@npm:2.1.0" - dependencies: - restore-cursor: "npm:^2.0.0" - checksum: 10/d88e97bfdac01046a3ffe7d49f06757b3126559d7e44aa2122637eb179284dc6cd49fca2fac4f67c19faaf7e6dab716b6fe1dfcd309977407d8c7578ec2d044d - languageName: node - linkType: hard - -"cli-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "cli-cursor@npm:3.1.0" - dependencies: - restore-cursor: "npm:^3.1.0" - checksum: 10/2692784c6cd2fd85cfdbd11f53aea73a463a6d64a77c3e098b2b4697a20443f430c220629e1ca3b195ea5ac4a97a74c2ee411f3807abf6df2b66211fec0c0a29 - languageName: node - linkType: hard - -"cli-spinners@npm:^2.2.0": - version: 2.9.0 - resolution: "cli-spinners@npm:2.9.0" - checksum: 10/457497ccef70eec3f1d0825e4a3396ba43f6833a4900c2047c0efe2beecb1c0df476949ea378bcb6595754f7508e28ae943eeb30bbda807f59f547b270ec334c - languageName: node - linkType: hard - -"cli-spinners@npm:^2.5.0": - version: 2.6.1 - resolution: "cli-spinners@npm:2.6.1" - checksum: 10/3e2dc5df72cf02120bebe256881fc8e3ec49867e5023d39f1e7340d7da57964f5236f4c75e568aa9dea6460b56f7a6d5870b89453c743c6c15e213cb52be2122 - languageName: node - linkType: hard - -"cli-table3@npm:0.6.0": - version: 0.6.0 - resolution: "cli-table3@npm:0.6.0" - dependencies: - colors: "npm:^1.1.2" - object-assign: "npm:^4.1.0" - string-width: "npm:^4.2.0" - dependenciesMeta: - colors: - optional: true - checksum: 10/1b05dd043155e31ea9a0312f70b69291ecb34a58f0edd65fcb6d9bc79ae4b187bde968bb764755fc605eee71f518ab61933669a11f50c217603abb7f4799dd69 - languageName: node - linkType: hard - -"cli-table3@npm:^0.5.1": - version: 0.5.1 - resolution: "cli-table3@npm:0.5.1" - dependencies: - colors: "npm:^1.1.2" - object-assign: "npm:^4.1.0" - string-width: "npm:^2.1.1" - dependenciesMeta: - colors: - optional: true - checksum: 10/5b4aaa81943c9030e3366aaf20cc4be0792397d82dea3a1660e80ce49edded4dcc722f9bf272354061c5bfa3f4236ad2fdc86bc7bb0bbf7e4b8e8d3b418b955a - languageName: node - linkType: hard - -"cli-truncate@npm:2.1.0, cli-truncate@npm:^2.1.0": - version: 2.1.0 - resolution: "cli-truncate@npm:2.1.0" - dependencies: - slice-ansi: "npm:^3.0.0" - string-width: "npm:^4.2.0" - checksum: 10/976f1887de067a8cd6ec830a7a8508336aebe6cec79b521d98ed13f67ef073b637f7305675b6247dd22f9e9cf045ec55fe746c7bdb288fbe8db0dfdc9fd52e55 - languageName: node - linkType: hard - -"cli-width@npm:^2.0.0": - version: 2.2.1 - resolution: "cli-width@npm:2.2.1" - checksum: 10/e173dbe2bb70821dfc6a790183c949ed41cfc573bbabd700db64c6e21d19d8ce937dce84340b6bc225fb4ac99d9aaa54a46dcce5150e7cbd9b7ad7120301ee8d - languageName: node - linkType: hard - -"cli-width@npm:^3.0.0": - version: 3.0.0 - resolution: "cli-width@npm:3.0.0" - checksum: 10/8730848b04fb189666ab037a35888d191c8f05b630b1d770b0b0e4c920b47bb5cc14bddf6b8ffe5bfc66cee97c8211d4d18e756c1ffcc75d7dbe7e1186cd7826 - languageName: node - linkType: hard - -"cli-width@npm:^4.1.0": - version: 4.1.0 - resolution: "cli-width@npm:4.1.0" - checksum: 10/b58876fbf0310a8a35c79b72ecfcf579b354e18ad04e6b20588724ea2b522799a758507a37dfe132fafaf93a9922cafd9514d9e1598e6b2cd46694853aed099f - languageName: node - linkType: hard - -"cliui@npm:^3.2.0": - version: 3.2.0 - resolution: "cliui@npm:3.2.0" - dependencies: - string-width: "npm:^1.0.1" - strip-ansi: "npm:^3.0.1" - wrap-ansi: "npm:^2.0.0" - checksum: 10/a8acc1a2e5f6307bb3200738a55b353ae5ca13d7a9a8001e40bdf2449c228104daf245e29cdfe60652ffafc3e70096fc1624cd9cf8651bb322903dbbb22a4ac3 - languageName: node - linkType: hard - -"cliui@npm:^4.0.0": - version: 4.1.0 - resolution: "cliui@npm:4.1.0" - dependencies: - string-width: "npm:^2.1.1" - strip-ansi: "npm:^4.0.0" - wrap-ansi: "npm:^2.0.0" - checksum: 10/b73eea68d48774dc178ac6aeb411c7000c1d9a5ae532e5a1d496f395acb797c47337e32285d54448d60d7d703e4ac6398d65f2db26bcadc3c73e59a2027471f3 - languageName: node - linkType: hard - -"cliui@npm:^5.0.0": - version: 5.0.0 - resolution: "cliui@npm:5.0.0" - dependencies: - string-width: "npm:^3.1.0" - strip-ansi: "npm:^5.2.0" - wrap-ansi: "npm:^5.1.0" - checksum: 10/381264fcc3c8316b77b378ce5471ff9a1974d1f6217e0be8f4f09788482b3e6f7c0894eb21e0a86eab4ce0c68426653a407226dd51997306cb87f734776f5fdc - languageName: node - linkType: hard - -"cliui@npm:^6.0.0": - version: 6.0.0 - resolution: "cliui@npm:6.0.0" - dependencies: - string-width: "npm:^4.2.0" - strip-ansi: "npm:^6.0.0" - wrap-ansi: "npm:^6.2.0" - checksum: 10/44afbcc29df0899e87595590792a871cd8c4bc7d6ce92832d9ae268d141a77022adafca1aeaeccff618b62a613b8354e57fe22a275c199ec04baf00d381ef6ab - languageName: node - linkType: hard - -"cliui@npm:^7.0.2, cliui@npm:^7.0.4": - version: 7.0.4 - resolution: "cliui@npm:7.0.4" - dependencies: - string-width: "npm:^4.2.0" - strip-ansi: "npm:^6.0.0" - wrap-ansi: "npm:^7.0.0" - checksum: 10/db858c49af9d59a32d603987e6fddaca2ce716cd4602ba5a2bb3a5af1351eebe82aba8dff3ef3e1b331f7fa9d40ca66e67bdf8e7c327ce0ea959747ead65c0ef - languageName: node - linkType: hard - -"cliui@npm:^8.0.1": - version: 8.0.1 - resolution: "cliui@npm:8.0.1" - dependencies: - string-width: "npm:^4.2.0" - strip-ansi: "npm:^6.0.1" - wrap-ansi: "npm:^7.0.0" - checksum: 10/eaa5561aeb3135c2cddf7a3b3f562fc4238ff3b3fc666869ef2adf264be0f372136702f16add9299087fb1907c2e4ec5dbfe83bd24bce815c70a80c6c1a2e950 - languageName: node - linkType: hard - -"clone-buffer@npm:1.0.0": - version: 1.0.0 - resolution: "clone-buffer@npm:1.0.0" - checksum: 10/a39a35e7fd081e0f362ba8195bd15cbc8205df1fbe4598bb4e09c1f9a13c0320a47ab8a61a8aa83561e4ed34dc07666d73254ee952ddd3985e4286b082fe63b9 - languageName: node - linkType: hard - -"clone-deep@npm:^4.0.1": - version: 4.0.1 - resolution: "clone-deep@npm:4.0.1" - dependencies: - is-plain-object: "npm:^2.0.4" - kind-of: "npm:^6.0.2" - shallow-clone: "npm:^3.0.0" - checksum: 10/770f912fe4e6f21873c8e8fbb1e99134db3b93da32df271d00589ea4a29dbe83a9808a322c93f3bcaf8584b8b4fa6fc269fc8032efbaa6728e0c9886c74467d2 - languageName: node - linkType: hard - -"clone-response@npm:^1.0.2": - version: 1.0.3 - resolution: "clone-response@npm:1.0.3" - dependencies: - mimic-response: "npm:^1.0.0" - checksum: 10/4e671cac39b11c60aa8ba0a450657194a5d6504df51bca3fac5b3bd0145c4f8e8464898f87c8406b83232e3bc5cca555f51c1f9c8ac023969ebfbf7f6bdabb2e - languageName: node - linkType: hard - -"clone@npm:2.x": - version: 2.1.2 - resolution: "clone@npm:2.1.2" - checksum: 10/d9c79efba655f0bf601ab299c57eb54cbaa9860fb011aee9d89ed5ac0d12df1660ab7642fddaabb9a26b7eff0e117d4520512cb70798319ff5d30a111b5310c2 - languageName: node - linkType: hard - -"clone@npm:^1.0.2": - version: 1.0.4 - resolution: "clone@npm:1.0.4" - checksum: 10/d06418b7335897209e77bdd430d04f882189582e67bd1f75a04565f3f07f5b3f119a9d670c943b6697d0afb100f03b866b3b8a1f91d4d02d72c4ecf2bb64b5dd - languageName: node - linkType: hard - -"clone@npm:~0.1.9": - version: 0.1.19 - resolution: "clone@npm:0.1.19" - checksum: 10/b16ddba999af2345f716d95e7a0905b6c4c304f4d1ef0fac876c72531438bcdb79853d95a097767385185b705b84f81ec5601ace70d8daa38265a03b6f6c2452 - languageName: node - linkType: hard - -"clsx@npm:^2.0.0": - version: 2.0.0 - resolution: "clsx@npm:2.0.0" - checksum: 10/943766d1b02fee3538c871e56638d87f973fbc2d6291ce221215ea436fdecb9be97ad323f411839c2d52c45640c449b1a53fbfe7e8b3d529b4e263308b630c9a - languageName: node - linkType: hard - -"clsx@npm:^2.1.0": - version: 2.1.0 - resolution: "clsx@npm:2.1.0" - checksum: 10/2e0ce7c3b6803d74fc8147c408f88e79245583202ac14abd9691e2aebb9f312de44270b79154320d10bb7804a9197869635d1291741084826cff20820f31542b - languageName: node - linkType: hard - -"cmd-shim@npm:^6.0.0": - version: 6.0.1 - resolution: "cmd-shim@npm:6.0.1" - checksum: 10/d0718e4a49265a9195ced19f662a77569ce5939145451125bdc8bb302781f15564ade92f6c49e231f9d0bb6f3d71db1a2d0a50af940490eb324e152325039541 - languageName: node - linkType: hard - -"co@npm:^4.6.0": - version: 4.6.0 - resolution: "co@npm:4.6.0" - checksum: 10/a5d9f37091c70398a269e625cedff5622f200ed0aa0cff22ee7b55ed74a123834b58711776eb0f1dc58eb6ebbc1185aa7567b57bd5979a948c6e4f85073e2c05 - languageName: node - linkType: hard - -"coa@npm:^2.0.2": - version: 2.0.2 - resolution: "coa@npm:2.0.2" - dependencies: - "@types/q": "npm:^1.5.1" - chalk: "npm:^2.4.1" - q: "npm:^1.1.2" - checksum: 10/3934203d8c2bc0b824c2347cc19060db7affcc522da1f21a3dd79ac1e9d9c8a60124fd5d771a4d99b4a49005e26022cd4e11268d868fb19cabd9a51ab652583f - languageName: node - linkType: hard - -"code-excerpt@npm:^3.0.0": - version: 3.0.0 - resolution: "code-excerpt@npm:3.0.0" - dependencies: - convert-to-spaces: "npm:^1.0.1" - checksum: 10/fa3a8ed15967076a43a4093b0c824cf0ada15d9aab12ea3c028851b72a69b56495aac1eadf18c3b6ae4baf0a95bb1e1faa9dbeeb0a2b2b5ae058da23328e9dd8 - languageName: node - linkType: hard - -"code-point-at@npm:^1.0.0": - version: 1.1.0 - resolution: "code-point-at@npm:1.1.0" - checksum: 10/17d5666611f9b16d64fdf48176d9b7fb1c7d1c1607a189f7e600040a11a6616982876af148230336adb7d8fe728a559f743a4e29db3747e3b1a32fa7f4529681 - languageName: node - linkType: hard - -"collect-v8-coverage@npm:^1.0.0": - version: 1.0.1 - resolution: "collect-v8-coverage@npm:1.0.1" - checksum: 10/85b26945ab9b8e15077f877a4a5bc91d836480c600bac4cd0a0e8be8515583fdfc393ccff049ff3e9f46cac39e5295af049209f3c484f30a028056cc5dd1fe8a - languageName: node - linkType: hard - -"collection-visit@npm:^1.0.0": - version: 1.0.0 - resolution: "collection-visit@npm:1.0.0" - dependencies: - map-visit: "npm:^1.0.0" - object-visit: "npm:^1.0.0" - checksum: 10/15d9658fe6eb23594728346adad5433b86bb7a04fd51bbab337755158722f9313a5376ef479de5b35fbc54140764d0d39de89c339f5d25b959ed221466981da9 - languageName: node - linkType: hard - -"color-convert@npm:^1.9.0, color-convert@npm:^1.9.3": - version: 1.9.3 - resolution: "color-convert@npm:1.9.3" - dependencies: - color-name: "npm:1.1.3" - checksum: 10/ffa319025045f2973919d155f25e7c00d08836b6b33ea2d205418c59bd63a665d713c52d9737a9e0fe467fb194b40fbef1d849bae80d674568ee220a31ef3d10 - languageName: node - linkType: hard - -"color-convert@npm:^2.0.1": - version: 2.0.1 - resolution: "color-convert@npm:2.0.1" - dependencies: - color-name: "npm:~1.1.4" - checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 - languageName: node - linkType: hard - -"color-name@npm:1.1.3": - version: 1.1.3 - resolution: "color-name@npm:1.1.3" - checksum: 10/09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d - languageName: node - linkType: hard - -"color-name@npm:^1.0.0, color-name@npm:^1.1.4, color-name@npm:~1.1.4": - version: 1.1.4 - resolution: "color-name@npm:1.1.4" - checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 - languageName: node - linkType: hard - -"color-string@npm:^1.6.0": - version: 1.9.0 - resolution: "color-string@npm:1.9.0" - dependencies: - color-name: "npm:^1.0.0" - simple-swizzle: "npm:^0.2.2" - checksum: 10/6e347b463aa8e40eb193d6ee21ef501c88dad9c20c4607f5394f3b3c4ce40d828c87a35ac4acdc94696d8dae00a04cb30f0bc73f001ccc812f1d58dccaf26591 - languageName: node - linkType: hard - -"color-support@npm:^1.1.0, color-support@npm:^1.1.2, color-support@npm:^1.1.3": - version: 1.1.3 - resolution: "color-support@npm:1.1.3" - bin: - color-support: bin.js - checksum: 10/4bcfe30eea1498fe1cabc852bbda6c9770f230ea0e4faf4611c5858b1b9e4dde3730ac485e65f54ca182f4c50b626c1bea7c8441ceda47367a54a818c248aa7a - languageName: node - linkType: hard - -"color@npm:^3.1.3": - version: 3.2.1 - resolution: "color@npm:3.2.1" - dependencies: - color-convert: "npm:^1.9.3" - color-string: "npm:^1.6.0" - checksum: 10/bf70438e0192f4f62f4bfbb303e7231289e8cc0d15ff6b6cbdb722d51f680049f38d4fdfc057a99cb641895cf5e350478c61d98586400b060043afc44285e7ae - languageName: node - linkType: hard - -"colord@npm:^2.9.1": - version: 2.9.3 - resolution: "colord@npm:2.9.3" - checksum: 10/907a4506d7307e2f580b471b581e992181ed75ab0c6925ece9ca46d88161d2fc50ed15891cd0556d0d9321237ca75afc9d462e4c050b939ef88428517f047f30 - languageName: node - linkType: hard - -"colorette@npm:2.0.19": - version: 2.0.19 - resolution: "colorette@npm:2.0.19" - checksum: 10/6e2606435cd30e1cae8fc6601b024fdd809e20515c57ce1e588d0518403cff0c98abf807912ba543645a9188af36763b69b67e353d47397f24a1c961aba300bd - languageName: node - linkType: hard - -"colorette@npm:^1.2.0, colorette@npm:^1.4.0": - version: 1.4.0 - resolution: "colorette@npm:1.4.0" - checksum: 10/c8d6c8c3ef5a99acfc3dd9a68f48019f1479ec347551387e4a1762e40f69e98ce19d4dc321ffb4919d1f28a7bdc90c39d4e9a901f4c474fd2124ad93a00c0454 - languageName: node - linkType: hard - -"colorette@npm:^2.0.10, colorette@npm:^2.0.16": - version: 2.0.16 - resolution: "colorette@npm:2.0.16" - checksum: 10/8501db5750d3b8f0935bdc9e999cbd6b6420b5c127a8c0bd41aaf252fe3f6636ff3a5c51e6dc8e12692e0b96ee3d28a4dfd0f89a86ef167a5728d4c926b67f31 - languageName: node - linkType: hard - -"colorette@npm:^2.0.14": - version: 2.0.20 - resolution: "colorette@npm:2.0.20" - checksum: 10/0b8de48bfa5d10afc160b8eaa2b9938f34a892530b2f7d7897e0458d9535a066e3998b49da9d21161c78225b272df19ae3a64d6df28b4c9734c0e55bbd02406f - languageName: node - linkType: hard - -"colors@npm:1.0.x": - version: 1.0.3 - resolution: "colors@npm:1.0.3" - checksum: 10/8d81835f217ffca6de6665c8dd9ed132c562d108d4ba842d638c7cb5f8127cff47cb1b54c6bbea49e22eaa7b56caee6b85278dde9c2564f8a0eaef161e028ae0 - languageName: node - linkType: hard - -"colors@npm:1.4.0, colors@npm:^1.1.2": - version: 1.4.0 - resolution: "colors@npm:1.4.0" - checksum: 10/90b2d5465159813a3983ea72ca8cff75f784824ad70f2cc2b32c233e95bcfbcda101ebc6d6766bc50f57263792629bfb4f1f8a4dfbd1d240f229fc7f69b785fc - languageName: node - linkType: hard - -"colorspace@npm:1.1.x": - version: 1.1.4 - resolution: "colorspace@npm:1.1.4" - dependencies: - color: "npm:^3.1.3" - text-hex: "npm:1.0.x" - checksum: 10/bb3934ef3c417e961e6d03d7ca60ea6e175947029bfadfcdb65109b01881a1c0ecf9c2b0b59abcd0ee4a0d7c1eae93beed01b0e65848936472270a0b341ebce8 - languageName: node - linkType: hard - -"columnify@npm:^1.6.0": - version: 1.6.0 - resolution: "columnify@npm:1.6.0" - dependencies: - strip-ansi: "npm:^6.0.1" - wcwidth: "npm:^1.0.0" - checksum: 10/ab742cc646c07293db603f7a4387ca9d46d32beaaba0a08008c2f31f30042e6e5a940096fb7d2d432495597ed3d5c5fe07a5bacd55e4ac24a768d344a47dd678 - languageName: node - linkType: hard - -"combined-stream@npm:^1.0.6, combined-stream@npm:^1.0.8, combined-stream@npm:~1.0.6": - version: 1.0.8 - resolution: "combined-stream@npm:1.0.8" - dependencies: - delayed-stream: "npm:~1.0.0" - checksum: 10/2e969e637d05d09fa50b02d74c83a1186f6914aae89e6653b62595cc75a221464f884f55f231b8f4df7a49537fba60bdc0427acd2bf324c09a1dbb84837e36e4 - languageName: node - linkType: hard - -"command-exists@npm:^1.2.8": - version: 1.2.9 - resolution: "command-exists@npm:1.2.9" - checksum: 10/46fb3c4d626ca5a9d274f8fe241230817496abc34d12911505370b7411999e183c11adff7078dd8a03ec4cf1391290facda40c6a4faac8203ae38c985eaedd63 - languageName: node - linkType: hard - -"commander@npm:3.0.2": - version: 3.0.2 - resolution: "commander@npm:3.0.2" - checksum: 10/f42053569f5954498246783465b39139917a51284bf3361574c9f731fea27a4bd6452dbb1755cc2d923c7b47dfea67930037c7b7e862288f2c397cec9a74da87 - languageName: node - linkType: hard - -"commander@npm:8.3.0, commander@npm:^8.1.0, commander@npm:^8.2.0, commander@npm:^8.3.0": - version: 8.3.0 - resolution: "commander@npm:8.3.0" - checksum: 10/6b7b5d334483ce24bd73c5dac2eab901a7dbb25fd983ea24a1eeac6e7166bb1967f641546e8abf1920afbde86a45fbfe5812fbc69d0dc451bb45ca416a12a3a3 - languageName: node - linkType: hard - -"commander@npm:^10.0.0, commander@npm:^10.0.1": - version: 10.0.1 - resolution: "commander@npm:10.0.1" - checksum: 10/8799faa84a30da985802e661cc9856adfaee324d4b138413013ef7f087e8d7924b144c30a1f1405475f0909f467665cd9e1ce13270a2f41b141dab0b7a58f3fb - languageName: node - linkType: hard - -"commander@npm:^12.1.0": - version: 12.1.0 - resolution: "commander@npm:12.1.0" - checksum: 10/cdaeb672d979816853a4eed7f1310a9319e8b976172485c2a6b437ed0db0a389a44cfb222bfbde772781efa9f215bdd1b936f80d6b249485b465c6cb906e1f93 - languageName: node - linkType: hard - -"commander@npm:^2.12.1, commander@npm:^2.13.0, commander@npm:^2.15.0, commander@npm:^2.19.0, commander@npm:^2.20.0, commander@npm:^2.20.3, commander@npm:^2.8.1, commander@npm:^2.9.0": - version: 2.20.3 - resolution: "commander@npm:2.20.3" - checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b - languageName: node - linkType: hard - -"commander@npm:^4.0.0": - version: 4.1.1 - resolution: "commander@npm:4.1.1" - checksum: 10/3b2dc4125f387dab73b3294dbcb0ab2a862f9c0ad748ee2b27e3544d25325b7a8cdfbcc228d103a98a716960b14478114a5206b5415bd48cdafa38797891562c - languageName: node - linkType: hard - -"commander@npm:^7.0.0, commander@npm:^7.2.0": - version: 7.2.0 - resolution: "commander@npm:7.2.0" - checksum: 10/9973af10727ad4b44f26703bf3e9fdc323528660a7590efe3aa9ad5042b4584c0deed84ba443f61c9d6f02dade54a5a5d3c95e306a1e1630f8374ae6db16c06d - languageName: node - linkType: hard - -"commander@npm:^9.1.0": - version: 9.2.0 - resolution: "commander@npm:9.2.0" - checksum: 10/db4855c6cd7694d4117e17ec353c7fcc678695e008e12dd5cd45ebaf3fd15607a476df690bf658c7a20a661743580fb0150c825087d773847a24392891e7b4bc - languageName: node - linkType: hard - -"comment-json@npm:^4.2.4": - version: 4.2.4 - resolution: "comment-json@npm:4.2.4" - dependencies: - array-timsort: "npm:^1.0.3" - core-util-is: "npm:^1.0.3" - esprima: "npm:^4.0.1" - has-own-prop: "npm:^2.0.0" - repeat-string: "npm:^1.6.1" - checksum: 10/b39109b318cbad9c8d991aebdcb1835542338b4e1c03a3d00ec72eab2e13045589c071943cb238443b9e1595800e6f82318e08aeba516d38571d7c146c58a38e - languageName: node - linkType: hard - -"common-ancestor-path@npm:^1.0.1": - version: 1.0.1 - resolution: "common-ancestor-path@npm:1.0.1" - checksum: 10/1d2e4186067083d8cc413f00fc2908225f04ae4e19417ded67faa6494fb313c4fcd5b28a52326d1a62b466e2b3a4325e92c31133c5fee628cdf8856b3a57c3d7 - languageName: node - linkType: hard - -"common-path-prefix@npm:^3.0.0": - version: 3.0.0 - resolution: "common-path-prefix@npm:3.0.0" - checksum: 10/09c180e8d8495d42990d617f4d4b7522b5da20f6b236afe310192d401d1da8147a7835ae1ea37797ba0c2238ef3d06f3492151591451df34539fdb4b2630f2b3 - languageName: node - linkType: hard - -"common-tags@npm:^1.8.0": - version: 1.8.2 - resolution: "common-tags@npm:1.8.2" - checksum: 10/c665d0f463ee79dda801471ad8da6cb33ff7332ba45609916a508ad3d77ba07ca9deeb452e83f81f24c2b081e2c1315347f23d239210e63d1c5e1a0c7c019fe2 - languageName: node - linkType: hard - -"commondir@npm:^1.0.1": - version: 1.0.1 - resolution: "commondir@npm:1.0.1" - checksum: 10/4620bc4936a4ef12ce7dfcd272bb23a99f2ad68889a4e4ad766c9f8ad21af982511934d6f7050d4a8bde90011b1c15d56e61a1b4576d9913efbf697a20172d6c - languageName: node - linkType: hard - -"compare-func@npm:^2.0.0": - version: 2.0.0 - resolution: "compare-func@npm:2.0.0" - dependencies: - array-ify: "npm:^1.0.0" - dot-prop: "npm:^5.1.0" - checksum: 10/fb71d70632baa1e93283cf9d80f30ac97f003aabee026e0b4426c9716678079ef5fea7519b84d012cbed938c476493866a38a79760564a9e21ae9433e40e6f0d - languageName: node - linkType: hard - -"compare-versions@npm:3.6.0, compare-versions@npm:^3.4.0": - version: 3.6.0 - resolution: "compare-versions@npm:3.6.0" - checksum: 10/7492a50cdaa2c27f5254eee7c4b38856e1c164991bab3d98d7fd067fe4b570d47123ecb92523b78338be86aa221668fd3868bfe8caa5587dc3ebbe1a03d52b5d - languageName: node - linkType: hard - -"compare-versions@npm:4.1.4": - version: 4.1.4 - resolution: "compare-versions@npm:4.1.4" - checksum: 10/0c4f0d943477b824234f5c6600ea7404a86ef506c696b9d91ee67979bd32c08371a8b6532cc17e6e17cf2916e46ef16d499dce70245a4f6786c3c055afcea697 - languageName: node - linkType: hard - -"component-emitter@npm:^1.2.1": - version: 1.3.0 - resolution: "component-emitter@npm:1.3.0" - checksum: 10/dfc1ec2e7aa2486346c068f8d764e3eefe2e1ca0b24f57506cd93b2ae3d67829a7ebd7cc16e2bf51368fac2f45f78fcff231718e40b1975647e4a86be65e1d05 - languageName: node - linkType: hard - -"component-emitter@npm:^1.3.0": - version: 1.3.1 - resolution: "component-emitter@npm:1.3.1" - checksum: 10/94550aa462c7bd5a61c1bc480e28554aa306066930152d1b1844a0dd3845d4e5db7e261ddec62ae184913b3e59b55a2ad84093b9d3596a8f17c341514d6c483d - languageName: node - linkType: hard - -"compressible@npm:~2.0.16": - version: 2.0.18 - resolution: "compressible@npm:2.0.18" - dependencies: - mime-db: "npm:>= 1.43.0 < 2" - checksum: 10/58321a85b375d39230405654721353f709d0c1442129e9a17081771b816302a012471a9b8f4864c7dbe02eef7f2aaac3c614795197092262e94b409c9be108f0 - languageName: node - linkType: hard - -"compression@npm:1.7.4, compression@npm:^1.7.4": - version: 1.7.4 - resolution: "compression@npm:1.7.4" - dependencies: - accepts: "npm:~1.3.5" - bytes: "npm:3.0.0" - compressible: "npm:~2.0.16" - debug: "npm:2.6.9" - on-headers: "npm:~1.0.2" - safe-buffer: "npm:5.1.2" - vary: "npm:~1.1.2" - checksum: 10/469cd097908fe1d3ff146596d4c24216ad25eabb565c5456660bdcb3a14c82ebc45c23ce56e19fc642746cf407093b55ab9aa1ac30b06883b27c6c736e6383c2 - languageName: node - linkType: hard - -"concat-map@npm:0.0.1": - version: 0.0.1 - resolution: "concat-map@npm:0.0.1" - checksum: 10/9680699c8e2b3af0ae22592cb764acaf973f292a7b71b8a06720233011853a58e256c89216a10cbe889727532fd77f8bcd49a760cedfde271b8e006c20e079f2 - languageName: node - linkType: hard - -"concat-stream@npm:^1.4.4, concat-stream@npm:^1.5.2, concat-stream@npm:^1.6.0": - version: 1.6.2 - resolution: "concat-stream@npm:1.6.2" - dependencies: - buffer-from: "npm:^1.0.0" - inherits: "npm:^2.0.3" - readable-stream: "npm:^2.2.2" - typedarray: "npm:^0.0.6" - checksum: 10/71db903c84fc073ca35a274074e8d26c4330713d299f8623e993c448c1f6bf8b967806dd1d1a7b0f8add6f15ab1af7435df21fe79b4fe7efd78420c89e054e28 - languageName: node - linkType: hard - -"concurrently@npm:6.5.1": - version: 6.5.1 - resolution: "concurrently@npm:6.5.1" - dependencies: - chalk: "npm:^4.1.0" - date-fns: "npm:^2.16.1" - lodash: "npm:^4.17.21" - rxjs: "npm:^6.6.3" - spawn-command: "npm:^0.0.2-1" - supports-color: "npm:^8.1.0" - tree-kill: "npm:^1.2.2" - yargs: "npm:^16.2.0" - bin: - concurrently: bin/concurrently.js - checksum: 10/9ea52a75547418b64fd9d6a956f2f6ffc5b5262d99958b258dce4403b041e81dc79ae09dd9edeb4ba81df1fd6bf62d73e779b8a23c1a76e5464b151830bd92d8 - languageName: node - linkType: hard - -"conf@npm:^10.1.2": - version: 10.2.0 - resolution: "conf@npm:10.2.0" - dependencies: - ajv: "npm:^8.6.3" - ajv-formats: "npm:^2.1.1" - atomically: "npm:^1.7.0" - debounce-fn: "npm:^4.0.0" - dot-prop: "npm:^6.0.1" - env-paths: "npm:^2.2.1" - json-schema-typed: "npm:^7.0.3" - onetime: "npm:^5.1.2" - pkg-up: "npm:^3.1.0" - semver: "npm:^7.3.5" - checksum: 10/429c23634793366aa35ebfd3b04eff550bb21dcc982986abcc069bffba8d1596d08c41df1456df76a9b8fb334aa72b021364b556f177fff06eb89afac70eb011 - languageName: node - linkType: hard - -"config-chain@npm:^1.1.13": - version: 1.1.13 - resolution: "config-chain@npm:1.1.13" - dependencies: - ini: "npm:^1.3.4" - proto-list: "npm:~1.2.1" - checksum: 10/83d22cabf709e7669f6870021c4d552e4fc02e9682702b726be94295f42ce76cfed00f70b2910ce3d6c9465d9758e191e28ad2e72ff4e3331768a90da6c1ef03 - languageName: node - linkType: hard - -"config@npm:3.3.7": - version: 3.3.7 - resolution: "config@npm:3.3.7" - dependencies: - json5: "npm:^2.1.1" - checksum: 10/0e4dae97de77ca229feb63b715254b4219aa3b09d1bb66ecdadf82bd4d6617bf85bfec54b0b7ae09727058386fa9dadfe9ea66e73330a696ab1ae0c7e6555b63 - languageName: node - linkType: hard - -"configstore@npm:^5.0.1": - version: 5.0.1 - resolution: "configstore@npm:5.0.1" - dependencies: - dot-prop: "npm:^5.2.0" - graceful-fs: "npm:^4.1.2" - make-dir: "npm:^3.0.0" - unique-string: "npm:^2.0.0" - write-file-atomic: "npm:^3.0.0" - xdg-basedir: "npm:^4.0.0" - checksum: 10/60ef65d493b63f96e14b11ba7ec072fdbf3d40110a94fb7199d1c287761bdea5c5244e76b2596325f30c1b652213aa75de96ea20afd4a5f82065e61ea090988e - languageName: node - linkType: hard - -"confusing-browser-globals@npm:^1.0.11": - version: 1.0.11 - resolution: "confusing-browser-globals@npm:1.0.11" - checksum: 10/3afc635abd37e566477f610e7978b15753f0e84025c25d49236f1f14d480117185516bdd40d2a2167e6bed8048641a9854964b9c067e3dcdfa6b5d0ad3c3a5ef - languageName: node - linkType: hard - -"connect-history-api-fallback@npm:^2.0.0": - version: 2.0.0 - resolution: "connect-history-api-fallback@npm:2.0.0" - checksum: 10/3b26bf4041fdb33deacdcb3af9ae11e9a0b413fb14c95844d74a460b55e407625b364955dcf965c654605cde9d24ad5dad423c489aa430825aab2035859aba0c - languageName: node - linkType: hard - -"consola@npm:^2.15.0": - version: 2.15.3 - resolution: "consola@npm:2.15.3" - checksum: 10/ba5b3c6960b2eafb9d2ff2325444dd1d4eb53115df46eba823a4e7bfe6afbba0eb34747c0de82c7cd8a939db59b0cb5a8b8a54a94bb2e44feeddc26cefde3622 - languageName: node - linkType: hard - -"console-browserify@npm:^1.2.0": - version: 1.2.0 - resolution: "console-browserify@npm:1.2.0" - checksum: 10/4f16c471fa84909af6ae00527ce8d19dd9ed587eab85923c145cadfbc35414139f87e7bdd61746138e22cd9df45c2a1ca060370998c2c39f801d4a778105bac5 - languageName: node - linkType: hard - -"console-control-strings@npm:^1.0.0, console-control-strings@npm:^1.1.0": - version: 1.1.0 - resolution: "console-control-strings@npm:1.1.0" - checksum: 10/27b5fa302bc8e9ae9e98c03c66d76ca289ad0c61ce2fe20ab288d288bee875d217512d2edb2363fc83165e88f1c405180cf3f5413a46e51b4fe1a004840c6cdb - languageName: node - linkType: hard - -"console.table@npm:0.10.0": - version: 0.10.0 - resolution: "console.table@npm:0.10.0" - dependencies: - easy-table: "npm:1.1.0" - checksum: 10/bd7d1d1507c60e4d0fdfe5d94d18a6dac2d7929a216f9e3cece26fef7ee38bdc40ad96844547b0a16d978e7c410bb9f6acda249a71038e33be16160ce948121b - languageName: node - linkType: hard - -"constant-case@npm:^2.0.0": - version: 2.0.0 - resolution: "constant-case@npm:2.0.0" - dependencies: - snake-case: "npm:^2.1.0" - upper-case: "npm:^1.1.1" - checksum: 10/893c793a425ebcd0744061c7f12650c655aae259b89d5654fb8eda42d22c3690716a4988ed03f2abe370b1ee7bfec44f8e4395e76e2f1458a8921982b15410ba - languageName: node - linkType: hard - -"constants-browserify@npm:^1.0.0": - version: 1.0.0 - resolution: "constants-browserify@npm:1.0.0" - checksum: 10/49ef0babd907616dddde6905b80fe44ad5948e1eaaf6cf65d5f23a8c60c029ff63a1198c364665be1d6b2cb183d7e12921f33049cc126734ade84a3cfdbc83f6 - languageName: node - linkType: hard - -"contains-path@npm:^0.1.0": - version: 0.1.0 - resolution: "contains-path@npm:0.1.0" - checksum: 10/94ecfd944e0bc51be8d3fc596dcd17d705bd4c8a1a627952a3a8c5924bac01c7ea19034cf40b4b4f89e576cdead130a7e5fd38f5f7f07ef67b4b261d875871e3 - languageName: node - linkType: hard - -"content-disposition@npm:0.5.4, content-disposition@npm:^0.5.3": - version: 0.5.4 - resolution: "content-disposition@npm:0.5.4" - dependencies: - safe-buffer: "npm:5.2.1" - checksum: 10/b7f4ce176e324f19324be69b05bf6f6e411160ac94bc523b782248129eb1ef3be006f6cff431aaea5e337fe5d176ce8830b8c2a1b721626ead8933f0cbe78720 - languageName: node - linkType: hard - -"content-hash@npm:^2.5.2": - version: 2.5.2 - resolution: "content-hash@npm:2.5.2" - dependencies: - cids: "npm:^0.7.1" - multicodec: "npm:^0.5.5" - multihashes: "npm:^0.4.15" - checksum: 10/7c5d05052aecead40a1bbdd251468a6cc9bf4c48b361b4f138d60e6d876dc3028da6142031578ddc42e44e0024f91cc01b7a539bdb0bf7187e36bec15052e02d - languageName: node - linkType: hard - -"content-type@npm:^1.0.5, content-type@npm:~1.0.5": - version: 1.0.5 - resolution: "content-type@npm:1.0.5" - checksum: 10/585847d98dc7fb8035c02ae2cb76c7a9bd7b25f84c447e5ed55c45c2175e83617c8813871b4ee22f368126af6b2b167df655829007b21aa10302873ea9c62662 - languageName: node - linkType: hard - -"content-type@npm:~1.0.4": - version: 1.0.4 - resolution: "content-type@npm:1.0.4" - checksum: 10/5ea85c5293475c0cdf2f84e2c71f0519ced565840fb8cbda35997cb67cc45b879d5b9dbd37760c4041ca7415a3687f8a5f2f87b556b2aaefa49c0f3436a346d4 - languageName: node - linkType: hard - -"conventional-changelog-angular@npm:^6.0.0": - version: 6.0.0 - resolution: "conventional-changelog-angular@npm:6.0.0" - dependencies: - compare-func: "npm:^2.0.0" - checksum: 10/ddc59ead53a45b817d83208200967f5340866782b8362d5e2e34105fdfa3d3a31585ebbdec7750bdb9de53da869f847e8ca96634a9801f51e27ecf4e7ffe2bad - languageName: node - linkType: hard - -"conventional-changelog-angular@npm:^7.0.0": - version: 7.0.0 - resolution: "conventional-changelog-angular@npm:7.0.0" - dependencies: - compare-func: "npm:^2.0.0" - checksum: 10/e7966d2fee5475e76263f30f8b714b2b592b5bf556df225b7091e5090831fc9a20b99598a7d2997e19c2ef8118c0a3150b1eba290786367b0f55a5ccfa804ec9 - languageName: node - linkType: hard - -"conventional-changelog-conventionalcommits@npm:^6.1.0": - version: 6.1.0 - resolution: "conventional-changelog-conventionalcommits@npm:6.1.0" - dependencies: - compare-func: "npm:^2.0.0" - checksum: 10/7e5caef7d65b381a0b302534058acff83adc7a907094c85379ef138c35f2aa043cf8e7a3bef30f42078dcc4bff0e8bc763b179c007dd732d92856fae0607a4bc - languageName: node - linkType: hard - -"conventional-changelog-core@npm:^7.0.0": - version: 7.0.0 - resolution: "conventional-changelog-core@npm:7.0.0" - dependencies: - "@hutson/parse-repository-url": "npm:^5.0.0" - add-stream: "npm:^1.0.0" - conventional-changelog-writer: "npm:^7.0.0" - conventional-commits-parser: "npm:^5.0.0" - git-raw-commits: "npm:^4.0.0" - git-semver-tags: "npm:^7.0.0" - hosted-git-info: "npm:^7.0.0" - normalize-package-data: "npm:^6.0.0" - read-pkg: "npm:^8.0.0" - read-pkg-up: "npm:^10.0.0" - checksum: 10/e6c7cd40ae5d7de9db314252f03ebca71b239c3cb5fd8e64e72ffa04558e4cc28b073f29d5e9e96fb8069dfd0f538045d08c299254f76b698a4c1b1dfb199f20 - languageName: node - linkType: hard - -"conventional-changelog-preset-loader@npm:^4.1.0": - version: 4.1.0 - resolution: "conventional-changelog-preset-loader@npm:4.1.0" - checksum: 10/8813c34884a9e3f4be9f3a9ffa216012ee40ef8c0eb1593a70fa8ab906e08de09cab9e0b769b187a43456dbcb24b01a517b3798ebc5b8b9264af2e32c976d9c9 - languageName: node - linkType: hard - -"conventional-changelog-writer@npm:^7.0.0, conventional-changelog-writer@npm:^7.0.1": - version: 7.0.1 - resolution: "conventional-changelog-writer@npm:7.0.1" - dependencies: - conventional-commits-filter: "npm:^4.0.0" - handlebars: "npm:^4.7.7" - json-stringify-safe: "npm:^5.0.1" - meow: "npm:^12.0.1" - semver: "npm:^7.5.2" - split2: "npm:^4.0.0" - bin: - conventional-changelog-writer: cli.mjs - checksum: 10/fdb13864104eb0df33bb21397091837177da2e24afe1380b4c48921db01d59b3016254d6d6f2de663a86fc7eac8537fcd1fa924354d478d9f2d5eec026b5f554 - languageName: node - linkType: hard - -"conventional-commits-filter@npm:^4.0.0": - version: 4.0.0 - resolution: "conventional-commits-filter@npm:4.0.0" - checksum: 10/46d2d90531f024d596f61d353876276e5357adb5c4684e042467bb7d159feb0a2831b74656bd3038ac9ec38d99b0b24ac39f319ad511861e1299c4cdfb5a119a - languageName: node - linkType: hard - -"conventional-commits-parser@npm:^4.0.0": - version: 4.0.0 - resolution: "conventional-commits-parser@npm:4.0.0" - dependencies: - JSONStream: "npm:^1.3.5" - is-text-path: "npm:^1.0.1" - meow: "npm:^8.1.2" - split2: "npm:^3.2.2" - bin: - conventional-commits-parser: cli.js - checksum: 10/d3b7d947b486d3bb40f961808947ee46487429e050be840030211a80aa2eec170e427207c830f2720d8ab898649a652bbbe1825993b8bf0596517e3603f5a1bd - languageName: node - linkType: hard - -"conventional-commits-parser@npm:^5.0.0": - version: 5.0.0 - resolution: "conventional-commits-parser@npm:5.0.0" - dependencies: - JSONStream: "npm:^1.3.5" - is-text-path: "npm:^2.0.0" - meow: "npm:^12.0.1" - split2: "npm:^4.0.0" - bin: - conventional-commits-parser: cli.mjs - checksum: 10/3b56a9313127f18c56b7fc0fdb0c49d2184ec18e0574e64580a0d5a3c3e0f3eecfb8bc3131dce967bfe9fd27debd5f42b7fc1f09e8e541e688e1dd2b57f49278 - languageName: node - linkType: hard - -"conventional-recommended-bump@npm:^9.0.0": - version: 9.0.0 - resolution: "conventional-recommended-bump@npm:9.0.0" - dependencies: - conventional-changelog-preset-loader: "npm:^4.1.0" - conventional-commits-filter: "npm:^4.0.0" - conventional-commits-parser: "npm:^5.0.0" - git-raw-commits: "npm:^4.0.0" - git-semver-tags: "npm:^7.0.0" - meow: "npm:^12.0.1" - bin: - conventional-recommended-bump: cli.mjs - checksum: 10/a24350a2e1633bf22da884933bd0fffe750547fa9df51d8d3aeaacf5d0447f12d9bc8bf994294b945c6c79beecdfc491f47b5e07d20ebacc663c48c057344b71 - languageName: node - linkType: hard - -"convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.5.0": - version: 1.9.0 - resolution: "convert-source-map@npm:1.9.0" - checksum: 10/dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 - languageName: node - linkType: hard - -"convert-source-map@npm:^1.5.1, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": - version: 1.8.0 - resolution: "convert-source-map@npm:1.8.0" - dependencies: - safe-buffer: "npm:~5.1.1" - checksum: 10/985d974a2d33e1a2543ada51c93e1ba2f73eaed608dc39f229afc78f71dcc4c8b7d7c684aa647e3c6a3a204027444d69e53e169ce94e8d1fa8d7dee80c9c8fed - languageName: node - linkType: hard - -"convert-source-map@npm:^2.0.0": - version: 2.0.0 - resolution: "convert-source-map@npm:2.0.0" - checksum: 10/c987be3ec061348cdb3c2bfb924bec86dea1eacad10550a85ca23edb0fe3556c3a61c7399114f3331ccb3499d7fd0285ab24566e5745929412983494c3926e15 - languageName: node - linkType: hard - -"convert-to-spaces@npm:^1.0.1": - version: 1.0.2 - resolution: "convert-to-spaces@npm:1.0.2" - checksum: 10/e73f2ae39eb2b184f0796138eaab9c088b03b94937377d31be5b2282aef6a6ccce6b46f51bd99b3b7dfc70f516e2a6b16c0dd911883bfadf8d1073f462480224 - languageName: node - linkType: hard - -"convict-format-with-validator@npm:6.2.0": - version: 6.2.0 - resolution: "convict-format-with-validator@npm:6.2.0" - dependencies: - validator: "npm:^13.6.0" - checksum: 10/a416185c8ad250ce8f107ee3476c466cd96a51c7642815db7c1eb11d524732a8ef47371f42a63d77e27cc516ec70e8c83608f0f7305cb10ed5b9220ffead530c - languageName: node - linkType: hard - -"convict@npm:6.2.4": - version: 6.2.4 - resolution: "convict@npm:6.2.4" - dependencies: - lodash.clonedeep: "npm:^4.5.0" - yargs-parser: "npm:^20.2.7" - checksum: 10/d4b9c50dcddf4b5da7a80c1d99d1cfae8a47d78d291f0cc11637ab25b6b4515f5f0e9029abd45bcc30cc3e33032aa8814ead22142b4563c4e4959d2e56bdf1ae - languageName: node - linkType: hard - -"cookie-parser@npm:1.4.5": - version: 1.4.5 - resolution: "cookie-parser@npm:1.4.5" - dependencies: - cookie: "npm:0.4.0" - cookie-signature: "npm:1.0.6" - checksum: 10/09b41e191af8e472229b53468b858a53f64a355b438ecb56a38be2a729b862b8233041e5af102115caebae534d399813ec7270b68a949bba3b987b38555c30b6 - languageName: node - linkType: hard - -"cookie-parser@npm:1.4.6": - version: 1.4.6 - resolution: "cookie-parser@npm:1.4.6" - dependencies: - cookie: "npm:0.4.1" - cookie-signature: "npm:1.0.6" - checksum: 10/1e5a63aa82e8eb4e02d2977c6902983dee87b02e87ec5ec43ac3cb1e72da354003716570cd5190c0ad9e8a454c9d3237f4ad6e2f16d0902205a96a1c72b77ba5 - languageName: node - linkType: hard - -"cookie-signature@npm:1.0.6": - version: 1.0.6 - resolution: "cookie-signature@npm:1.0.6" - checksum: 10/f4e1b0a98a27a0e6e66fd7ea4e4e9d8e038f624058371bf4499cfcd8f3980be9a121486995202ba3fca74fbed93a407d6d54d43a43f96fd28d0bd7a06761591a - languageName: node - linkType: hard - -"cookie@npm:0.4.0": - version: 0.4.0 - resolution: "cookie@npm:0.4.0" - checksum: 10/494314fb0edfc3262e7809ba184829f3dea798800bf81c3e6ca5185083f75ba10fe37ee32a2aa5a4cd79ea1abcc1452ec47d331a4e6beaceaa30b8e6b3ec7636 - languageName: node - linkType: hard - -"cookie@npm:0.4.1": - version: 0.4.1 - resolution: "cookie@npm:0.4.1" - checksum: 10/0f2defd60ac93645ee31e82d11da695080435eb4fe5bed9b14d2fc4e0621a66f4c5c60f3eb05761df08a9d6279366e8646edfd1654f359d0b5afc25304fc4ddc - languageName: node - linkType: hard - -"cookie@npm:0.5.0": - version: 0.5.0 - resolution: "cookie@npm:0.5.0" - checksum: 10/aae7911ddc5f444a9025fbd979ad1b5d60191011339bce48e555cb83343d0f98b865ff5c4d71fecdfb8555a5cafdc65632f6fce172f32aaf6936830a883a0380 - languageName: node - linkType: hard - -"cookie@npm:0.6.0, cookie@npm:^0.6.0": - version: 0.6.0 - resolution: "cookie@npm:0.6.0" - checksum: 10/c1f8f2ea7d443b9331680598b0ae4e6af18a618c37606d1bbdc75bec8361cce09fe93e727059a673f2ba24467131a9fb5a4eec76bb1b149c1b3e1ccb268dc583 - languageName: node - linkType: hard - -"cookie@npm:^0.4.1, cookie@npm:~0.4.1": - version: 0.4.2 - resolution: "cookie@npm:0.4.2" - checksum: 10/2e1de9fdedca54881eab3c0477aeb067f281f3155d9cfee9d28dfb252210d09e85e9d175c0a60689661feb9e35e588515352f2456bc1f8e8db4267e05fd70137 - languageName: node - linkType: hard - -"cookiejar@npm:^2.1.1, cookiejar@npm:^2.1.2": - version: 2.1.4 - resolution: "cookiejar@npm:2.1.4" - checksum: 10/4a184f5a0591df8b07d22a43ea5d020eacb4572c383e853a33361a99710437eaa0971716c688684075bbf695b484f5872e9e3f562382e46858716cb7fc8ce3f4 - languageName: node - linkType: hard - -"copy-anything@npm:^2.0.1": - version: 2.0.6 - resolution: "copy-anything@npm:2.0.6" - dependencies: - is-what: "npm:^3.14.1" - checksum: 10/3b41be8f6322c2c13e93cde62a64d532f138f31d44ab85a3405d88601134afccc068be06534c162ed5c06b209788c423d7aaa50f1c34a92db81a1f8560d199eb - languageName: node - linkType: hard - -"copy-descriptor@npm:^0.1.0": - version: 0.1.1 - resolution: "copy-descriptor@npm:0.1.1" - checksum: 10/edf4651bce36166c7fcc60b5c1db2c5dad1d87820f468507331dd154b686ece8775f5d383127d44aeef813462520c866f83908aa2d4291708f898df776816860 - languageName: node - linkType: hard - -"copy-webpack-plugin@npm:11.0.0": - version: 11.0.0 - resolution: "copy-webpack-plugin@npm:11.0.0" - dependencies: - fast-glob: "npm:^3.2.11" - glob-parent: "npm:^6.0.1" - globby: "npm:^13.1.1" - normalize-path: "npm:^3.0.0" - schema-utils: "npm:^4.0.0" - serialize-javascript: "npm:^6.0.0" - peerDependencies: - webpack: ^5.1.0 - checksum: 10/dc103be79ef72a4bb0bc8ce498b2cca964e3771326b009a1f3cb2d17960fca17538a725b09427161eccf485e2badbbd5490ddf2570f7976938e4e7338f1fd7e9 - languageName: node - linkType: hard - -"core-js-compat@npm:^3.31.0": - version: 3.32.1 - resolution: "core-js-compat@npm:3.32.1" - dependencies: - browserslist: "npm:^4.21.10" - checksum: 10/e01f29cd369d4c2ba690a591e1613b167126afd10c44af4e260da1348394262f5b78c727cff864c342e328b2bf2522acad9afdcc783bc14ceb66bc18b0bf931d - languageName: node - linkType: hard - -"core-js-compat@npm:^3.32.2": - version: 3.33.0 - resolution: "core-js-compat@npm:3.33.0" - dependencies: - browserslist: "npm:^4.22.1" - checksum: 10/b1a5f7aab1c6ac0efd86c1412a5b27fb372c4e52c4b8f2c80b05216385125c4de30e4c36e4bcc6bfeec917a56e7736c87fab6a301ff8faaa1ae4acf81643fc9a - languageName: node - linkType: hard - -"core-js-compat@npm:^3.34.0": - version: 3.37.1 - resolution: "core-js-compat@npm:3.37.1" - dependencies: - browserslist: "npm:^4.23.0" - checksum: 10/30c6fdbd9ff179cc53951814689b8aabec106e5de6cddfa7a7feacc96b66d415b8eebcf5ec8f7c68ef35c552fe7d39edb8b15b1ce0f27379a272295b6e937061 - languageName: node - linkType: hard - -"core-js-pure@npm:^3.0.1": - version: 3.32.0 - resolution: "core-js-pure@npm:3.32.0" - checksum: 10/f98fc9610fedffd5587266cabddc880a8259bb0c99e81c5630e2076a4cd39b618f8db54137a6fdc578a8bb12a7fef2f341175085d89a16683a36aa89bc0ee137 - languageName: node - linkType: hard - -"core-js-pure@npm:^3.23.3": - version: 3.32.1 - resolution: "core-js-pure@npm:3.32.1" - checksum: 10/6ebd41c95cf5da8e032f9c9100360196c5e2af8b0c074a6e151c96e6390329814e87ad737bc44566990928d9af73304252112b6c15d3f43784473d0260bbe0f4 - languageName: node - linkType: hard - -"core-js@npm:^2.4.0": - version: 2.6.12 - resolution: "core-js@npm:2.6.12" - checksum: 10/7c624eb00a59c74c769d5d80f751f3bf1fc6201205b6562f27286ad5e00bbca1483f2f7eb0c2854b86f526ef5c7dc958b45f2ff536f8a31b8e9cb1a13a96efca - languageName: node - linkType: hard - -"core-js@npm:^3.19.2": - version: 3.32.1 - resolution: "core-js@npm:3.32.1" - checksum: 10/8d76615ef67f2cf8d2af05e4ec8e5663c941a461c97ff3f53eca6b4ab6fb765ef1b88509827b510963044aa122153f25c3073f3de7fcad06cc1b3f6c06a725c3 - languageName: node - linkType: hard - -"core-util-is@npm:1.0.2": - version: 1.0.2 - resolution: "core-util-is@npm:1.0.2" - checksum: 10/d0f7587346b44a1fe6c269267e037dd34b4787191e473c3e685f507229d88561c40eb18872fabfff02977301815d474300b7bfbd15396c13c5377393f7e87ec3 - languageName: node - linkType: hard - -"core-util-is@npm:^1.0.3, core-util-is@npm:~1.0.0": - version: 1.0.3 - resolution: "core-util-is@npm:1.0.3" - checksum: 10/9de8597363a8e9b9952491ebe18167e3b36e7707569eed0ebf14f8bba773611376466ae34575bca8cfe3c767890c859c74056084738f09d4e4a6f902b2ad7d99 - languageName: node - linkType: hard - -"cors@npm:2.8.5, cors@npm:^2.8.1, cors@npm:^2.8.5, cors@npm:~2.8.5": - version: 2.8.5 - resolution: "cors@npm:2.8.5" - dependencies: - object-assign: "npm:^4" - vary: "npm:^1" - checksum: 10/66e88e08edee7cbce9d92b4d28a2028c88772a4c73e02f143ed8ca76789f9b59444eed6b1c167139e76fa662998c151322720093ba229f9941365ada5a6fc2c6 - languageName: node - linkType: hard - -"cosmiconfig-typescript-loader@npm:^4.0.0": - version: 4.4.0 - resolution: "cosmiconfig-typescript-loader@npm:4.4.0" - peerDependencies: - "@types/node": "*" - cosmiconfig: ">=7" - ts-node: ">=10" - typescript: ">=4" - checksum: 10/7450491304cf498aa8bf9bffab5aaa189c1abc3e763e4ca7afca32d7c62cdba9abbc032e754ec2a6980580127c39d7227e9e5ea453c3456f150ab09196ae2661 - languageName: node - linkType: hard - -"cosmiconfig@npm:7.0.1, cosmiconfig@npm:^7.0.1": - version: 7.0.1 - resolution: "cosmiconfig@npm:7.0.1" - dependencies: - "@types/parse-json": "npm:^4.0.0" - import-fresh: "npm:^3.2.1" - parse-json: "npm:^5.0.0" - path-type: "npm:^4.0.0" - yaml: "npm:^1.10.0" - checksum: 10/861bf4c2c9e88e6c50f14278b25bb0509c484623de11fadf3788a3d543bc7c45178aeebeb6657293b12dc8bd1b86d926c5f25c803c4dc3821d628a1b24c3d20b - languageName: node - linkType: hard - -"cosmiconfig@npm:^6.0.0": - version: 6.0.0 - resolution: "cosmiconfig@npm:6.0.0" - dependencies: - "@types/parse-json": "npm:^4.0.0" - import-fresh: "npm:^3.1.0" - parse-json: "npm:^5.0.0" - path-type: "npm:^4.0.0" - yaml: "npm:^1.7.2" - checksum: 10/b184d2bfbced9ba6840fd097dbf3455c68b7258249bb9b1277913823d516d8dfdade8c5ccbf79db0ca8ebd4cc9b9be521ccc06a18396bd242d50023c208f1594 - languageName: node - linkType: hard - -"cosmiconfig@npm:^7.0.0, cosmiconfig@npm:^7.1.0": - version: 7.1.0 - resolution: "cosmiconfig@npm:7.1.0" - dependencies: - "@types/parse-json": "npm:^4.0.0" - import-fresh: "npm:^3.2.1" - parse-json: "npm:^5.0.0" - path-type: "npm:^4.0.0" - yaml: "npm:^1.10.0" - checksum: 10/03600bb3870c80ed151b7b706b99a1f6d78df8f4bdad9c95485072ea13358ef294b13dd99f9e7bf4cc0b43bcd3599d40df7e648750d21c2f6817ca2cd687e071 - languageName: node - linkType: hard - -"cosmiconfig@npm:^8.0.0, cosmiconfig@npm:^8.2.0": - version: 8.3.5 - resolution: "cosmiconfig@npm:8.3.5" - dependencies: - import-fresh: "npm:^3.3.0" - js-yaml: "npm:^4.1.0" - parse-json: "npm:^5.2.0" - path-type: "npm:^4.0.0" - peerDependencies: - typescript: ">=4.9.5" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/f1963997fb42bc9c3d1b7d553b72ca48f58deb2ea1bb7736930aa7255b876179f35a74dffaa0a95b9d5d7a830b04d592bc34173baad14b8084933a49a873971d - languageName: node - linkType: hard - -"cosmiconfig@npm:^9.0.0": - version: 9.0.0 - resolution: "cosmiconfig@npm:9.0.0" - dependencies: - env-paths: "npm:^2.2.1" - import-fresh: "npm:^3.3.0" - js-yaml: "npm:^4.1.0" - parse-json: "npm:^5.2.0" - peerDependencies: - typescript: ">=4.9.5" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/8bdf1dfbb6fdb3755195b6886dc0649a3c742ec75afa4cb8da7b070936aed22a4f4e5b7359faafe03180358f311dbc300d248fd6586c458203d376a40cc77826 - languageName: node - linkType: hard - -"cp-file@npm:^9.1.0": - version: 9.1.0 - resolution: "cp-file@npm:9.1.0" - dependencies: - graceful-fs: "npm:^4.1.2" - make-dir: "npm:^3.0.0" - nested-error-stacks: "npm:^2.0.0" - p-event: "npm:^4.1.0" - checksum: 10/3251e3c895304eeefc2394efea27e5527e79ab747bdd096cf3fac050818ad1e7a62885d5d8dbcc63bc01d8116a23a448407e145d4e9d9c3c1b28305ac5af6f31 - languageName: node - linkType: hard - -"cpu-features@npm:0.0.2": - version: 0.0.2 - resolution: "cpu-features@npm:0.0.2" - dependencies: - nan: "npm:^2.14.1" - node-gyp: "npm:latest" - checksum: 10/f39e11d1898025f98da7e51945b1095d58e2a16ff0c1835de95ecfb4ca60d3427667b38094ccf021cca8c5df69a05a4bba29aae8344426af3e06daf06ce0bbf4 - languageName: node - linkType: hard - -"cpu-features@npm:~0.0.8": - version: 0.0.8 - resolution: "cpu-features@npm:0.0.8" - dependencies: - buildcheck: "npm:~0.0.6" - nan: "npm:^2.17.0" - node-gyp: "npm:latest" - checksum: 10/0fa7071a671c847bf7742e0843a7cb89b4f422a162632a49363d6065e7e8b08c07e3ddaa0d523fe66d06625a5848b8c96bc5f0aa31ab7ef95442dc9abae49c23 - languageName: node - linkType: hard - -"cpy-cli@npm:4.2.0": - version: 4.2.0 - resolution: "cpy-cli@npm:4.2.0" - dependencies: - cpy: "npm:^9.0.0" - meow: "npm:^10.1.2" - bin: - cpy: cli.js - checksum: 10/df741608b3e06484ce9ef92aba074acbf4c6e7aa0ec48bc0457314db13e3fa62e023d562f91f71c8dec69485fc883194974f2aa20cd6a11e97e2838823701056 - languageName: node - linkType: hard - -"cpy@npm:^9.0.0": - version: 9.0.1 - resolution: "cpy@npm:9.0.1" - dependencies: - arrify: "npm:^3.0.0" - cp-file: "npm:^9.1.0" - globby: "npm:^13.1.1" - junk: "npm:^4.0.0" - micromatch: "npm:^4.0.4" - nested-error-stacks: "npm:^2.1.0" - p-filter: "npm:^3.0.0" - p-map: "npm:^5.3.0" - checksum: 10/e0306c5508b6c78529aab7f6f8222906744b0519e4eecd5510e4fb6d2484179fdca10ace86aaaf4a49db967b8fb0866e7aa0578eab5a3697abad3a77ed9c5dca - languageName: node - linkType: hard - -"crc-32@npm:^1.2.0": - version: 1.2.1 - resolution: "crc-32@npm:1.2.1" - dependencies: - exit-on-epipe: "npm:~1.0.1" - printj: "npm:~1.3.1" - bin: - crc32: bin/crc32.njs - checksum: 10/20349ff0e7f73c1fed382f5b572522767681f241820382df601c5e61eda365b525e0fe87d58182c07d563557b67bde526b42bfcb907b25359c0f3f56ccf34e80 - languageName: node - linkType: hard - -"crc-32@npm:^1.2.2": - version: 1.2.2 - resolution: "crc-32@npm:1.2.2" - bin: - crc32: bin/crc32.njs - checksum: 10/824f696a5baaf617809aa9cd033313c8f94f12d15ebffa69f10202480396be44aef9831d900ab291638a8022ed91c360696dd5b1ba691eb3f34e60be8835b7c3 - languageName: node - linkType: hard - -"crc@npm:^4.3.2": - version: 4.3.2 - resolution: "crc@npm:4.3.2" - peerDependencies: - buffer: ">=6.0.3" - peerDependenciesMeta: - buffer: - optional: true - checksum: 10/daa5c340de4ccb0d248ad579d1ca1317efe89d2b3f68a124850a140e9afc17d595cdfc058bd14ea78325c0a706ac73ad94962c1efede6a2a1abf58a48ebbb9da - languageName: node - linkType: hard - -"create-ecdh@npm:^4.0.0": - version: 4.0.4 - resolution: "create-ecdh@npm:4.0.4" - dependencies: - bn.js: "npm:^4.1.0" - elliptic: "npm:^6.5.3" - checksum: 10/0dd7fca9711d09e152375b79acf1e3f306d1a25ba87b8ff14c2fd8e68b83aafe0a7dd6c4e540c9ffbdd227a5fa1ad9b81eca1f233c38bb47770597ba247e614b - languageName: node - linkType: hard - -"create-hash@npm:^1.1.0, create-hash@npm:^1.1.2, create-hash@npm:^1.2.0": - version: 1.2.0 - resolution: "create-hash@npm:1.2.0" - dependencies: - cipher-base: "npm:^1.0.1" - inherits: "npm:^2.0.1" - md5.js: "npm:^1.3.4" - ripemd160: "npm:^2.0.1" - sha.js: "npm:^2.4.0" - checksum: 10/3cfef32043b47a8999602af9bcd74966db6971dd3eb828d1a479f3a44d7f58e38c1caf34aa21a01941cc8d9e1a841738a732f200f00ea155f8a8835133d2e7bc - languageName: node - linkType: hard - -"create-hmac@npm:^1.1.0, create-hmac@npm:^1.1.4, create-hmac@npm:^1.1.7": - version: 1.1.7 - resolution: "create-hmac@npm:1.1.7" - dependencies: - cipher-base: "npm:^1.0.3" - create-hash: "npm:^1.1.0" - inherits: "npm:^2.0.1" - ripemd160: "npm:^2.0.0" - safe-buffer: "npm:^5.0.1" - sha.js: "npm:^2.4.8" - checksum: 10/2b26769f87e99ef72150bf99d1439d69272b2e510e23a2b8daf4e93e2412f4842504237d726044fa797cb20ee0ec8bee78d414b11f2d7ca93299185c93df0dae - languageName: node - linkType: hard - -"create-require@npm:^1.1.0": - version: 1.1.1 - resolution: "create-require@npm:1.1.1" - checksum: 10/a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff - languageName: node - linkType: hard - -"credentials-context@npm:^2.0.0": - version: 2.0.0 - resolution: "credentials-context@npm:2.0.0" - checksum: 10/aa943c657adf5e9125c5828e86b67c0e7ab29301e1f5a4858df3528fbaa3dfd94ca11a3573d6996213b557e9af14e5893f07140a774a0481b9a7b1846ebe167c - languageName: node - linkType: hard - -"critters@npm:0.0.20": - version: 0.0.20 - resolution: "critters@npm:0.0.20" - dependencies: - chalk: "npm:^4.1.0" - css-select: "npm:^5.1.0" - dom-serializer: "npm:^2.0.0" - domhandler: "npm:^5.0.2" - htmlparser2: "npm:^8.0.2" - postcss: "npm:^8.4.23" - pretty-bytes: "npm:^5.3.0" - checksum: 10/5c5fdf79f4bb1947ac9e47c2834e843e7a9d2f8c12a52cbca00144a4fc69af1490d2ecfc35390088c1aad425d9e5179e55ea664242f6f9dd9c273a188281044e - languageName: node - linkType: hard - -"critters@npm:0.0.22": - version: 0.0.22 - resolution: "critters@npm:0.0.22" - dependencies: - chalk: "npm:^4.1.0" - css-select: "npm:^5.1.0" - dom-serializer: "npm:^2.0.0" - domhandler: "npm:^5.0.2" - htmlparser2: "npm:^8.0.2" - postcss: "npm:^8.4.23" - postcss-media-query-parser: "npm:^0.2.3" - checksum: 10/57806f9141ef12fddbe4c6fa8442573b4d5fcc4f564bedaf3b34f8eb231b4177bb9122a31dec8037d129f78813c1f8b9acdc84883de527a7eac5ef66440cf1da - languageName: node - linkType: hard - -"cross-env@npm:7.0.3": - version: 7.0.3 - resolution: "cross-env@npm:7.0.3" - dependencies: - cross-spawn: "npm:^7.0.1" - bin: - cross-env: src/bin/cross-env.js - cross-env-shell: src/bin/cross-env-shell.js - checksum: 10/e99911f0d31c20e990fd92d6fd001f4b01668a303221227cc5cb42ed155f086351b1b3bd2699b200e527ab13011b032801f8ce638e6f09f854bdf744095e604c - languageName: node - linkType: hard - -"cross-fetch@npm:^3.0.6, cross-fetch@npm:^3.1.0, cross-fetch@npm:^3.1.5": - version: 3.1.8 - resolution: "cross-fetch@npm:3.1.8" - dependencies: - node-fetch: "npm:^2.6.12" - checksum: 10/ac8c4ca87d2ac0e17a19b6a293a67ee8934881aee5ec9a5a8323c30e9a9a60a0f5291d3c0d633ec2a2f970cbc60978d628804dfaf03add92d7e720b6d37f392c - languageName: node - linkType: hard - -"cross-fetch@npm:^3.1.4": - version: 3.1.5 - resolution: "cross-fetch@npm:3.1.5" - dependencies: - node-fetch: "npm:2.6.7" - checksum: 10/5d101a3b1e6cb172f0e5e8168cbc927eeff2ef915f33ceef50fed85441df870e1fdff195b56eca36fae8b78ddba5d8e913b8927f73d11b19d27e96301438cd30 - languageName: node - linkType: hard - -"cross-fetch@npm:^4.0.0": - version: 4.0.0 - resolution: "cross-fetch@npm:4.0.0" - dependencies: - node-fetch: "npm:^2.6.12" - checksum: 10/e231a71926644ef122d334a3a4e73d9ba3ba4b480a8a277fb9badc434c1ba905b3d60c8034e18b348361a09afbec40ba9371036801ba2b675a7b84588f9f55d8 - languageName: node - linkType: hard - -"cross-spawn@npm:7.0.3, cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": - version: 7.0.3 - resolution: "cross-spawn@npm:7.0.3" - dependencies: - path-key: "npm:^3.1.0" - shebang-command: "npm:^2.0.0" - which: "npm:^2.0.1" - checksum: 10/e1a13869d2f57d974de0d9ef7acbf69dc6937db20b918525a01dacb5032129bd552d290d886d981e99f1b624cb03657084cc87bd40f115c07ecf376821c729ce - languageName: node - linkType: hard - -"cross-spawn@npm:^4": - version: 4.0.2 - resolution: "cross-spawn@npm:4.0.2" - dependencies: - lru-cache: "npm:^4.0.1" - which: "npm:^1.2.9" - checksum: 10/7a384580d0534a55706a6b694b500f75e48511675021a4aac698c7144b0bf60c4e058a2add938322739f4d7e733920a4665bbf89681cd3632238622e3ea2fbb0 - languageName: node - linkType: hard - -"cross-spawn@npm:^5.0.1, cross-spawn@npm:^5.1.0": - version: 5.1.0 - resolution: "cross-spawn@npm:5.1.0" - dependencies: - lru-cache: "npm:^4.0.1" - shebang-command: "npm:^1.2.0" - which: "npm:^1.2.9" - checksum: 10/726939c9954fc70c20e538923feaaa33bebc253247d13021737c3c7f68cdc3e0a57f720c0fe75057c0387995349f3f12e20e9bfdbf12274db28019c7ea4ec166 - languageName: node - linkType: hard - -"cross-spawn@npm:^6.0.0, cross-spawn@npm:^6.0.5": - version: 6.0.5 - resolution: "cross-spawn@npm:6.0.5" - dependencies: - nice-try: "npm:^1.0.4" - path-key: "npm:^2.0.1" - semver: "npm:^5.5.0" - shebang-command: "npm:^1.2.0" - which: "npm:^1.2.9" - checksum: 10/f07e643b4875f26adffcd7f13bc68d9dff20cf395f8ed6f43a23f3ee24fc3a80a870a32b246fd074e514c8fd7da5f978ac6a7668346eec57aa87bac89c1ed3a1 - languageName: node - linkType: hard - -"crypto-addr-codec@npm:^0.1.7": - version: 0.1.7 - resolution: "crypto-addr-codec@npm:0.1.7" - dependencies: - base-x: "npm:^3.0.8" - big-integer: "npm:1.6.36" - blakejs: "npm:^1.1.0" - bs58: "npm:^4.0.1" - ripemd160-min: "npm:0.0.6" - safe-buffer: "npm:^5.2.0" - sha3: "npm:^2.1.1" - checksum: 10/57bb8bdba342bd6a3b16a49a421fe0edb9b0b52d7695385baabf55a2ed91cb61ec90b5436921885fc78a30f75ceaa2569bcf953f6d8b532ea8323f70b4ae806c - languageName: node - linkType: hard - -"crypto-browserify@npm:3.12.0, crypto-browserify@npm:^3.12.0": - version: 3.12.0 - resolution: "crypto-browserify@npm:3.12.0" - dependencies: - browserify-cipher: "npm:^1.0.0" - browserify-sign: "npm:^4.0.0" - create-ecdh: "npm:^4.0.0" - create-hash: "npm:^1.1.0" - create-hmac: "npm:^1.1.0" - diffie-hellman: "npm:^5.0.0" - inherits: "npm:^2.0.1" - pbkdf2: "npm:^3.0.3" - public-encrypt: "npm:^4.0.0" - randombytes: "npm:^2.0.0" - randomfill: "npm:^1.0.3" - checksum: 10/5ab534474e24c8c3925bd1ec0de57c9022329cb267ca8437f1e3a7200278667c0bea0a51235030a9da3165c1885c73f51cfbece1eca31fd4a53cfea23f628c9b - languageName: node - linkType: hard - -"crypto-js@npm:4.2.0, crypto-js@npm:^4.2.0": - version: 4.2.0 - resolution: "crypto-js@npm:4.2.0" - checksum: 10/c7bcc56a6e01c3c397e95aa4a74e4241321f04677f9a618a8f48a63b5781617248afb9adb0629824792e7ec20ca0d4241a49b6b2938ae6f973ec4efc5c53c924 - languageName: node - linkType: hard - -"crypto-random-string@npm:^2.0.0": - version: 2.0.0 - resolution: "crypto-random-string@npm:2.0.0" - checksum: 10/0283879f55e7c16fdceacc181f87a0a65c53bc16ffe1d58b9d19a6277adcd71900d02bb2c4843dd55e78c51e30e89b0fec618a7f170ebcc95b33182c28f05fd6 - languageName: node - linkType: hard - -"cspell-config-lib@npm:8.10.4": - version: 8.10.4 - resolution: "cspell-config-lib@npm:8.10.4" - dependencies: - "@cspell/cspell-types": "npm:8.10.4" - comment-json: "npm:^4.2.4" - yaml: "npm:^2.4.5" - checksum: 10/dfe86bb6325666913665106749163482413e9bf754e53405dbf87a8add4979db7f8db7865bc7a2c35ee51614984e00e26a9fbd93396cca73600e3b48a733a76b - languageName: node - linkType: hard - -"cspell-dictionary@npm:8.10.4": - version: 8.10.4 - resolution: "cspell-dictionary@npm:8.10.4" - dependencies: - "@cspell/cspell-pipe": "npm:8.10.4" - "@cspell/cspell-types": "npm:8.10.4" - cspell-trie-lib: "npm:8.10.4" - fast-equals: "npm:^5.0.1" - gensequence: "npm:^7.0.0" - checksum: 10/2919fa4396d89ea31f7f132258a85bbc8611f30a85a511e3f151e413c4223cdce09f4102de2e59409c6c43ec963856b0f46176e5aff756023c7a40ae91300388 - languageName: node - linkType: hard - -"cspell-gitignore@npm:8.10.4": - version: 8.10.4 - resolution: "cspell-gitignore@npm:8.10.4" - dependencies: - "@cspell/url": "npm:8.10.4" - cspell-glob: "npm:8.10.4" - cspell-io: "npm:8.10.4" - find-up-simple: "npm:^1.0.0" - bin: - cspell-gitignore: bin.mjs - checksum: 10/d88f4cbd4f78475b71a9aae586907a097a6cf35a80e7b54448c59e134ea5d2506b7c6cc752ed35cc3ccd6bd517de7cf899aee9d4208bbbd38e7205b8bf89920b - languageName: node - linkType: hard - -"cspell-glob@npm:8.10.4": - version: 8.10.4 - resolution: "cspell-glob@npm:8.10.4" - dependencies: - "@cspell/url": "npm:8.10.4" - micromatch: "npm:^4.0.7" - checksum: 10/5d4891bd4b8ab49f68b6791c575d98ec61ab7c87a0d729789c2e9612ed3fe7332f4c9b953270119864e8e32589cd8a5e45695dabfe64d4196e1c1364f1330486 - languageName: node - linkType: hard - -"cspell-grammar@npm:8.10.4": - version: 8.10.4 - resolution: "cspell-grammar@npm:8.10.4" - dependencies: - "@cspell/cspell-pipe": "npm:8.10.4" - "@cspell/cspell-types": "npm:8.10.4" - bin: - cspell-grammar: bin.mjs - checksum: 10/f84cc9eb0bb1df57bca4301d47a02c6841da8981fd93b015223543052c0fb92aa1ab3348bc2f901c7ee12d14b4328579cff02429c042f08ea1af5371f68a605a - languageName: node - linkType: hard - -"cspell-io@npm:8.10.4": - version: 8.10.4 - resolution: "cspell-io@npm:8.10.4" - dependencies: - "@cspell/cspell-service-bus": "npm:8.10.4" - "@cspell/url": "npm:8.10.4" - checksum: 10/0fcd4263bef3fea7f01059381d28a17030e8e31f8677dc6f5fc438e1ef73ac1e1aa996040b13f17798adb6c943a26f80b75ce25d2dda96c8dcf5fcb4e4a9c0c8 - languageName: node - linkType: hard - -"cspell-lib@npm:8.10.4": - version: 8.10.4 - resolution: "cspell-lib@npm:8.10.4" - dependencies: - "@cspell/cspell-bundled-dicts": "npm:8.10.4" - "@cspell/cspell-pipe": "npm:8.10.4" - "@cspell/cspell-resolver": "npm:8.10.4" - "@cspell/cspell-types": "npm:8.10.4" - "@cspell/dynamic-import": "npm:8.10.4" - "@cspell/strong-weak-map": "npm:8.10.4" - "@cspell/url": "npm:8.10.4" - clear-module: "npm:^4.1.2" - comment-json: "npm:^4.2.4" - cspell-config-lib: "npm:8.10.4" - cspell-dictionary: "npm:8.10.4" - cspell-glob: "npm:8.10.4" - cspell-grammar: "npm:8.10.4" - cspell-io: "npm:8.10.4" - cspell-trie-lib: "npm:8.10.4" - env-paths: "npm:^3.0.0" - fast-equals: "npm:^5.0.1" - gensequence: "npm:^7.0.0" - import-fresh: "npm:^3.3.0" - resolve-from: "npm:^5.0.0" - vscode-languageserver-textdocument: "npm:^1.0.11" - vscode-uri: "npm:^3.0.8" - xdg-basedir: "npm:^5.1.0" - checksum: 10/bee2de73af7fc3913af79729040e767ecd251ba1ce1e569d841da9a42245e80aa363af496f2d585aacf3baa8ec8299de41f29db7b75c8f62eb45bade09e72077 - languageName: node - linkType: hard - -"cspell-trie-lib@npm:8.10.4": - version: 8.10.4 - resolution: "cspell-trie-lib@npm:8.10.4" - dependencies: - "@cspell/cspell-pipe": "npm:8.10.4" - "@cspell/cspell-types": "npm:8.10.4" - gensequence: "npm:^7.0.0" - checksum: 10/283d3bcdcf746e9f80178054f821876c80bfeb9ec5be825dcf2bf38f0a5a5e6b04bed8d90da45a774c31b0adc20e77ce16e28044232c5f371fe5782fa554e5cd - languageName: node - linkType: hard - -"cspell@npm:8.10.4": - version: 8.10.4 - resolution: "cspell@npm:8.10.4" - dependencies: - "@cspell/cspell-json-reporter": "npm:8.10.4" - "@cspell/cspell-pipe": "npm:8.10.4" - "@cspell/cspell-types": "npm:8.10.4" - "@cspell/dynamic-import": "npm:8.10.4" - chalk: "npm:^5.3.0" - chalk-template: "npm:^1.1.0" - commander: "npm:^12.1.0" - cspell-gitignore: "npm:8.10.4" - cspell-glob: "npm:8.10.4" - cspell-io: "npm:8.10.4" - cspell-lib: "npm:8.10.4" - fast-glob: "npm:^3.3.2" - fast-json-stable-stringify: "npm:^2.1.0" - file-entry-cache: "npm:^8.0.0" - get-stdin: "npm:^9.0.0" - semver: "npm:^7.6.2" - strip-ansi: "npm:^7.1.0" - vscode-uri: "npm:^3.0.8" - bin: - cspell: bin.mjs - cspell-esm: bin.mjs - checksum: 10/2bf80e744c131b191acb184e679dc66991bb4f96587e3290907f5cda224f4c8beb3b406379fe7cc127319385e126fb09cdd060f76bfa2cabfb5dd5a78d43b5aa - languageName: node - linkType: hard - -"css-blank-pseudo@npm:^3.0.3": - version: 3.0.3 - resolution: "css-blank-pseudo@npm:3.0.3" - dependencies: - postcss-selector-parser: "npm:^6.0.9" - peerDependencies: - postcss: ^8.4 - bin: - css-blank-pseudo: dist/cli.cjs - checksum: 10/3c4a258c27e719cd8f841b4c652247f2a25c0a04edff6a5a70bf91ad9fe539665013e0a2d357abd6f04f04cceaef99f4cbe29a2fc9bb8d7a5f1935d9b610209a - languageName: node - linkType: hard - -"css-declaration-sorter@npm:^6.3.1": - version: 6.4.1 - resolution: "css-declaration-sorter@npm:6.4.1" - peerDependencies: - postcss: ^8.0.9 - checksum: 10/06cbfd1f470b8accf5e235b0e658e2f82d33a1cea8c2a21b55dfef5280769b874a8979c50f2c035af9213836cf85fb7e4687748a9162d564d7638ed4a194888e - languageName: node - linkType: hard - -"css-has-pseudo@npm:^3.0.4": - version: 3.0.4 - resolution: "css-has-pseudo@npm:3.0.4" - dependencies: - postcss-selector-parser: "npm:^6.0.9" - peerDependencies: - postcss: ^8.4 - bin: - css-has-pseudo: dist/cli.cjs - checksum: 10/bad885b0bb2b88d3753427f05ca6d6d833c1af89857222675c0742ef6c3461ae06f56a9be8a464bb6ac860c12581dfa2ae1cb8f15598ffb52d38cb3b6d291a48 - languageName: node - linkType: hard - -"css-loader@npm:6.10.0": - version: 6.10.0 - resolution: "css-loader@npm:6.10.0" - dependencies: - icss-utils: "npm:^5.1.0" - postcss: "npm:^8.4.33" - postcss-modules-extract-imports: "npm:^3.0.0" - postcss-modules-local-by-default: "npm:^4.0.4" - postcss-modules-scope: "npm:^3.1.1" - postcss-modules-values: "npm:^4.0.0" - postcss-value-parser: "npm:^4.2.0" - semver: "npm:^7.5.4" - peerDependencies: - "@rspack/core": 0.x || 1.x - webpack: ^5.0.0 - peerDependenciesMeta: - "@rspack/core": - optional: true - webpack: - optional: true - checksum: 10/1abd52e24a72a4c54762330bab2e0e816778db5bc711a8fc1b1ee99470a1728f2aa9b54b9ebbf2278a1730d68b76303094cc855f9119b2ffc0424fe57fea3bc6 - languageName: node - linkType: hard - -"css-loader@npm:6.8.1, css-loader@npm:^6.5.1": - version: 6.8.1 - resolution: "css-loader@npm:6.8.1" - dependencies: - icss-utils: "npm:^5.1.0" - postcss: "npm:^8.4.21" - postcss-modules-extract-imports: "npm:^3.0.0" - postcss-modules-local-by-default: "npm:^4.0.3" - postcss-modules-scope: "npm:^3.0.0" - postcss-modules-values: "npm:^4.0.0" - postcss-value-parser: "npm:^4.2.0" - semver: "npm:^7.3.8" - peerDependencies: - webpack: ^5.0.0 - checksum: 10/f20bb2a181c64d2f49586ab3922cae884519cfc8ae9ba8513065032255ed7bbdb4de75362f99d641d39d36d3732b7932884cd0e6fc71c8b0fb8b99a654f9cd08 - languageName: node - linkType: hard - -"css-minimizer-webpack-plugin@npm:^3.2.0": - version: 3.4.1 - resolution: "css-minimizer-webpack-plugin@npm:3.4.1" - dependencies: - cssnano: "npm:^5.0.6" - jest-worker: "npm:^27.0.2" - postcss: "npm:^8.3.5" - schema-utils: "npm:^4.0.0" - serialize-javascript: "npm:^6.0.0" - source-map: "npm:^0.6.1" - peerDependencies: - webpack: ^5.0.0 - peerDependenciesMeta: - "@parcel/css": - optional: true - clean-css: - optional: true - csso: - optional: true - esbuild: - optional: true - checksum: 10/d3b060fc3ab8747eb7c123378474e9b8fa884d93223c49995bd450f05a32f1f349cd23a912a27bb966faeb6dddc34445ffa45be17d11b80515bd55c8a81c8eea - languageName: node - linkType: hard - -"css-prefers-color-scheme@npm:^6.0.3": - version: 6.0.3 - resolution: "css-prefers-color-scheme@npm:6.0.3" - peerDependencies: - postcss: ^8.4 - bin: - css-prefers-color-scheme: dist/cli.cjs - checksum: 10/389f8d5b102270aaefd7f1db269d12bd883d9f7e13d139c2ef7ad6eb462c0c87f2dd466efeb8cc1b93432b07f94a3a5c82fc0ed6b950ba2da2f44d86f109fdc7 - languageName: node - linkType: hard - -"css-select-base-adapter@npm:^0.1.1": - version: 0.1.1 - resolution: "css-select-base-adapter@npm:0.1.1" - checksum: 10/0c99404c19123c3d270e80d5bf5af2b1990ed6b29a9b9db056d5b402660e5b7e5be48a86e00283b82e3240141c756879dbea14bab44230ca26396ba531c6d8a7 - languageName: node - linkType: hard - -"css-select@npm:^2.0.0": - version: 2.1.0 - resolution: "css-select@npm:2.1.0" - dependencies: - boolbase: "npm:^1.0.0" - css-what: "npm:^3.2.1" - domutils: "npm:^1.7.0" - nth-check: "npm:^1.0.2" - checksum: 10/87d514a6884c989df4d05d658cc2e7864b64ebf8f3dac5930a12930e712bbac7f16cfa765a22dc3f8fa00d3ae62ce0f3832624eedfac4b116694ea808749fb8a - languageName: node - linkType: hard - -"css-select@npm:^4.1.3": - version: 4.3.0 - resolution: "css-select@npm:4.3.0" - dependencies: - boolbase: "npm:^1.0.0" - css-what: "npm:^6.0.1" - domhandler: "npm:^4.3.1" - domutils: "npm:^2.8.0" - nth-check: "npm:^2.0.1" - checksum: 10/8f7310c9af30ccaba8f72cb4a54d32232c53bf9ba05d019b693e16bfd7ba5df0affc1f4d74b1ee55923643d23b80a837eedcf60938c53356e479b04049ff9994 - languageName: node - linkType: hard - -"css-select@npm:^5.1.0": - version: 5.1.0 - resolution: "css-select@npm:5.1.0" - dependencies: - boolbase: "npm:^1.0.0" - css-what: "npm:^6.1.0" - domhandler: "npm:^5.0.2" - domutils: "npm:^3.0.1" - nth-check: "npm:^2.0.1" - checksum: 10/d486b1e7eb140468218a5ab5af53257e01f937d2173ac46981f6b7de9c5283d55427a36715dc8decfc0c079cf89259ac5b41ef58f6e1a422eee44ab8bfdc78da - languageName: node - linkType: hard - -"css-tree@npm:1.0.0-alpha.37": - version: 1.0.0-alpha.37 - resolution: "css-tree@npm:1.0.0-alpha.37" - dependencies: - mdn-data: "npm:2.0.4" - source-map: "npm:^0.6.1" - checksum: 10/a936e4276e797af951f3cae66acadcd10642493c221b4f34fbb8f7d2d3b5496730474695efe2645731be19443324c0cc26e09a09e87efcfd397ade1b92d1fd68 - languageName: node - linkType: hard - -"css-tree@npm:^1.1.2, css-tree@npm:^1.1.3": - version: 1.1.3 - resolution: "css-tree@npm:1.1.3" - dependencies: - mdn-data: "npm:2.0.14" - source-map: "npm:^0.6.1" - checksum: 10/29710728cc4b136f1e9b23ee1228ec403ec9f3d487bc94a9c5dbec563c1e08c59bc917dd6f82521a35e869ff655c298270f43ca673265005b0cd05b292eb05ab - languageName: node - linkType: hard - -"css-what@npm:^3.2.1": - version: 3.4.2 - resolution: "css-what@npm:3.4.2" - checksum: 10/d5a5343619828499f0aa3fa5c1301123541eea41057a7da45516a3ceb19ed79e722e829913b71bce490bfdf08599a847e77ba4917bd2623c2d7fd4654e6b94f4 - languageName: node - linkType: hard - -"css-what@npm:^6.0.1, css-what@npm:^6.1.0": - version: 6.1.0 - resolution: "css-what@npm:6.1.0" - checksum: 10/c67a3a2d0d81843af87f8bf0a4d0845b0f952377714abbb2884e48942409d57a2110eabee003609d02ee487b054614bdfcfc59ee265728ff105bd5aa221c1d0e - languageName: node - linkType: hard - -"css.escape@npm:^1.5.1": - version: 1.5.1 - resolution: "css.escape@npm:1.5.1" - checksum: 10/f6d38088d870a961794a2580b2b2af1027731bb43261cfdce14f19238a88664b351cc8978abc20f06cc6bbde725699dec8deb6fe9816b139fc3f2af28719e774 - languageName: node - linkType: hard - -"cssdb@npm:^7.1.0": - version: 7.7.1 - resolution: "cssdb@npm:7.7.1" - checksum: 10/2e24443084b9d38bcceae91ed6d2d47f2c6726ea55e653f258b880b509f1ad66d63a013385e43dcd5189899904a918b7b31ef236d831c1d7f3707c9441a1d711 - languageName: node - linkType: hard - -"cssesc@npm:^3.0.0": - version: 3.0.0 - resolution: "cssesc@npm:3.0.0" - bin: - cssesc: bin/cssesc - checksum: 10/0e161912c1306861d8f46e1883be1cbc8b1b2879f0f509287c0db71796e4ddfb97ac96bdfca38f77f452e2c10554e1bb5678c99b07a5cf947a12778f73e47e12 - languageName: node - linkType: hard - -"cssfilter@npm:0.0.10": - version: 0.0.10 - resolution: "cssfilter@npm:0.0.10" - checksum: 10/1e45182f42de848f092f50a313113c28a88e4ac98333bf1603ee1c3b200384a3bc83c12e35cd61135e3b0f218295f600d51120ca1f926b7958b2d3262d711214 - languageName: node - linkType: hard - -"cssnano-preset-default@npm:^5.2.14": - version: 5.2.14 - resolution: "cssnano-preset-default@npm:5.2.14" - dependencies: - css-declaration-sorter: "npm:^6.3.1" - cssnano-utils: "npm:^3.1.0" - postcss-calc: "npm:^8.2.3" - postcss-colormin: "npm:^5.3.1" - postcss-convert-values: "npm:^5.1.3" - postcss-discard-comments: "npm:^5.1.2" - postcss-discard-duplicates: "npm:^5.1.0" - postcss-discard-empty: "npm:^5.1.1" - postcss-discard-overridden: "npm:^5.1.0" - postcss-merge-longhand: "npm:^5.1.7" - postcss-merge-rules: "npm:^5.1.4" - postcss-minify-font-values: "npm:^5.1.0" - postcss-minify-gradients: "npm:^5.1.1" - postcss-minify-params: "npm:^5.1.4" - postcss-minify-selectors: "npm:^5.2.1" - postcss-normalize-charset: "npm:^5.1.0" - postcss-normalize-display-values: "npm:^5.1.0" - postcss-normalize-positions: "npm:^5.1.1" - postcss-normalize-repeat-style: "npm:^5.1.1" - postcss-normalize-string: "npm:^5.1.0" - postcss-normalize-timing-functions: "npm:^5.1.0" - postcss-normalize-unicode: "npm:^5.1.1" - postcss-normalize-url: "npm:^5.1.0" - postcss-normalize-whitespace: "npm:^5.1.1" - postcss-ordered-values: "npm:^5.1.3" - postcss-reduce-initial: "npm:^5.1.2" - postcss-reduce-transforms: "npm:^5.1.0" - postcss-svgo: "npm:^5.1.0" - postcss-unique-selectors: "npm:^5.1.1" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/4103f879a594e24eef7b2f175cd46b59d777982be23f0d1b84e962d044e0bea2f26aa107dea59a711e6394fdd77faf313cee6ae4be61d34656fdf33ff278f69d - languageName: node - linkType: hard - -"cssnano-utils@npm:^3.1.0": - version: 3.1.0 - resolution: "cssnano-utils@npm:3.1.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/975c84ce9174cf23bb1da1e9faed8421954607e9ea76440cd3bb0c1bea7e17e490d800fca5ae2812d1d9e9d5524eef23ede0a3f52497d7ccc628e5d7321536f2 - languageName: node - linkType: hard - -"cssnano@npm:^5.0.6": - version: 5.1.15 - resolution: "cssnano@npm:5.1.15" - dependencies: - cssnano-preset-default: "npm:^5.2.14" - lilconfig: "npm:^2.0.3" - yaml: "npm:^1.10.2" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/8c5acbeabd10ffc05d01c63d3a82dcd8742299ead3f6da4016c853548b687d9b392de43e6d0f682dad1c2200d577c9360d8e709711c23721509aa4e55e052fb3 - languageName: node - linkType: hard - -"csso@npm:^4.0.2, csso@npm:^4.2.0": - version: 4.2.0 - resolution: "csso@npm:4.2.0" - dependencies: - css-tree: "npm:^1.1.2" - checksum: 10/8b6a2dc687f2a8165dde13f67999d5afec63cb07a00ab100fbb41e4e8b28d986cfa0bc466b4f5ba5de7260c2448a64e6ad26ec718dd204d3a7d109982f0bf1aa - languageName: node - linkType: hard - -"cssom@npm:^0.4.4": - version: 0.4.4 - resolution: "cssom@npm:0.4.4" - checksum: 10/6302c5f9b33a15f5430349f91553dd370f60707b1f2bb2c21954abe307b701d6095da134679fd0891a7814bc98061e1639bd0562d8f70c2dc529918111be8d2b - languageName: node - linkType: hard - -"cssom@npm:~0.3.6": - version: 0.3.8 - resolution: "cssom@npm:0.3.8" - checksum: 10/49eacc88077555e419646c0ea84ddc73c97e3a346ad7cb95e22f9413a9722d8964b91d781ce21d378bd5ae058af9a745402383fa4e35e9cdfd19654b63f892a9 - languageName: node - linkType: hard - -"cssstyle@npm:^2.3.0": - version: 2.3.0 - resolution: "cssstyle@npm:2.3.0" - dependencies: - cssom: "npm:~0.3.6" - checksum: 10/46f7f05a153446c4018b0454ee1464b50f606cb1803c90d203524834b7438eb52f3b173ba0891c618f380ced34ee12020675dc0052a7f1be755fe4ebc27ee977 - languageName: node - linkType: hard - -"csstype@npm:^3.0.2": - version: 3.0.10 - resolution: "csstype@npm:3.0.10" - checksum: 10/0c731ca8305004cc64abac17798e654e89b21ebd1ad68a7dff48084743c29cc22aed268341998d88d9b39f8f91ed61b0083e93a6105d7776eb1650efcc417c5b - languageName: node - linkType: hard - -"csstype@npm:^3.1.2": - version: 3.1.2 - resolution: "csstype@npm:3.1.2" - checksum: 10/1f39c541e9acd9562996d88bc9fb62d1cb234786ef11ed275567d4b2bd82e1ceacde25debc8de3d3b4871ae02c2933fa02614004c97190711caebad6347debc2 - languageName: node - linkType: hard - -"csstype@npm:^3.1.3": - version: 3.1.3 - resolution: "csstype@npm:3.1.3" - checksum: 10/f593cce41ff5ade23f44e77521e3a1bcc2c64107041e1bf6c3c32adc5187d0d60983292fda326154d20b01079e24931aa5b08e4467cc488b60bb1e7f6d478ade - languageName: node - linkType: hard - -"cucumber-expressions@npm:^6.0.0": - version: 6.6.2 - resolution: "cucumber-expressions@npm:6.6.2" - dependencies: - becke-ch--regex--s0-0-v1--base--pl--lib: "npm:^1.2.0" - checksum: 10/9878c49c8217fd95915c9537509c54979c2d749bb3beb8b306905511b675e087de08a4191017fa175bb432a8b0a83efa6d037351d5135ab51ca8dc8e8f8edff1 - languageName: node - linkType: hard - -"cucumber-tag-expressions@npm:^1.1.1": - version: 1.1.1 - resolution: "cucumber-tag-expressions@npm:1.1.1" - checksum: 10/50a355f08359930ee3e7b766083b2e1c443324cc2c983ea9b8d23b45f8e0e10a7fb5da3d3d7c88bc6fa08cb6559e2c48f0acfc8078a8311ebee08b4d5bc91acb - languageName: node - linkType: hard - -"cucumber@npm:5.0.3": - version: 5.0.3 - resolution: "cucumber@npm:5.0.3" - dependencies: - assertion-error-formatter: "npm:^2.0.1" - babel-runtime: "npm:^6.11.6" - bluebird: "npm:^3.4.1" - cli-table3: "npm:^0.5.1" - colors: "npm:^1.1.2" - commander: "npm:^2.9.0" - cross-spawn: "npm:^6.0.5" - cucumber-expressions: "npm:^6.0.0" - cucumber-tag-expressions: "npm:^1.1.1" - duration: "npm:^0.2.1" - escape-string-regexp: "npm:^1.0.5" - figures: "npm:2.0.0" - gherkin: "npm:^5.0.0" - glob: "npm:^7.1.3" - indent-string: "npm:^3.1.0" - is-generator: "npm:^1.0.2" - is-stream: "npm:^1.1.0" - knuth-shuffle-seeded: "npm:^1.0.6" - lodash: "npm:^4.17.10" - mz: "npm:^2.4.0" - progress: "npm:^2.0.0" - resolve: "npm:^1.3.3" - serialize-error: "npm:^2.1.0" - stack-chain: "npm:^2.0.0" - stacktrace-js: "npm:^2.0.0" - string-argv: "npm:0.1.1" - title-case: "npm:^2.1.1" - util-arity: "npm:^1.0.2" - verror: "npm:^1.9.0" - bin: - cucumber-js: ./bin/cucumber-js - checksum: 10/610544885dbd8ac110f80c9407d2d1907467bf3fe38541f2d7b0c0124acbc8136a43df9f70d85847038b00e1d312792bca60ed83b434c24645ac667f0fa112f3 - languageName: node - linkType: hard - -"cycle@npm:1.0.x": - version: 1.0.3 - resolution: "cycle@npm:1.0.3" - checksum: 10/b9f131094fb832a8c4ba18c6d2dc9c87fc80d3242847a45f0a5f70911b2acab68abc1c25eb23e5155fcf2135a27d8fcc3635556745b03b488c4f360cfbc352df - languageName: node - linkType: hard - -"d@npm:1, d@npm:^1.0.1": - version: 1.0.1 - resolution: "d@npm:1.0.1" - dependencies: - es5-ext: "npm:^0.10.50" - type: "npm:^1.0.1" - checksum: 10/1296e3f92e646895681c1cb564abd0eb23c29db7d62c5120a279e84e98915499a477808e9580760f09e3744c0ed7ac8f7cff98d096ba9770754f6ef0f1c97983 - languageName: node - linkType: hard - -"dag-jose@npm:^4.0.0": - version: 4.0.0 - resolution: "dag-jose@npm:4.0.0" - dependencies: - "@ipld/dag-cbor": "npm:^9.0.0" - multiformats: "npm:^11.0.0" - checksum: 10/2a56e0eac5a7554a95a5ec91eae3adf1ed021ef90be0d6b63eebe70bfd353cfda5f13c02c1354d32d0958c57595c65c7f011695ec41c2a67b6182cc832ce3fd5 - languageName: node - linkType: hard - -"damerau-levenshtein@npm:^1.0.8": - version: 1.0.8 - resolution: "damerau-levenshtein@npm:1.0.8" - checksum: 10/f4eba1c90170f96be25d95fa3857141b5f81e254f7e4d530da929217b19990ea9a0390fc53d3c1cafac9152fda78e722ea4894f765cf6216be413b5af1fbf821 - languageName: node - linkType: hard - -"dargs@npm:^7.0.0": - version: 7.0.0 - resolution: "dargs@npm:7.0.0" - checksum: 10/b8f1e3cba59c42e1f13a114ad4848c3fc1cf7470f633ee9e9f1043762429bc97d91ae31b826fb135eefde203a3fdb20deb0c0a0222ac29d937b8046085d668d1 - languageName: node - linkType: hard - -"dargs@npm:^8.0.0": - version: 8.1.0 - resolution: "dargs@npm:8.1.0" - checksum: 10/33f1b8f5f08e72c8a28355a87c0e1a9b6a0fec99252ecd9cf4735e65dd5f2e19747c860251ed5747b38e7204c7915fd7a7146aee5aaef5882c69169aae8b1d09 - languageName: node - linkType: hard - -"dashdash@npm:^1.12.0": - version: 1.14.1 - resolution: "dashdash@npm:1.14.1" - dependencies: - assert-plus: "npm:^1.0.0" - checksum: 10/137b287fa021201ce100cef772c8eeeaaafdd2aa7282864022acf3b873021e54cb809e9c060fa164840bf54ff72d00d6e2d8da1ee5a86d7200eeefa1123a8f7f - languageName: node - linkType: hard - -"data-uri-to-buffer@npm:^3.0.1": - version: 3.0.1 - resolution: "data-uri-to-buffer@npm:3.0.1" - checksum: 10/c59c3009686a78c071806b72f4810856ec28222f0f4e252aa495ec027ed9732298ceea99c50328cf59b151dd34cbc3ad6150bbb43e41fc56fa19f48c99e9fc30 - languageName: node - linkType: hard - -"data-uri-to-buffer@npm:^4.0.0": - version: 4.0.1 - resolution: "data-uri-to-buffer@npm:4.0.1" - checksum: 10/0d0790b67ffec5302f204c2ccca4494f70b4e2d940fea3d36b09f0bb2b8539c2e86690429eb1f1dc4bcc9e4df0644193073e63d9ee48ac9fce79ec1506e4aa4c - languageName: node - linkType: hard - -"data-urls@npm:^2.0.0": - version: 2.0.0 - resolution: "data-urls@npm:2.0.0" - dependencies: - abab: "npm:^2.0.3" - whatwg-mimetype: "npm:^2.3.0" - whatwg-url: "npm:^8.0.0" - checksum: 10/97caf828aac25e25e04ba6869db0f99c75e6859bb5b424ada28d3e7841941ebf08ddff3c1b1bb4585986bd507a5d54c2a716853ea6cb98af877400e637393e71 - languageName: node - linkType: hard - -"dataloader@npm:2.1.0": - version: 2.1.0 - resolution: "dataloader@npm:2.1.0" - checksum: 10/671b5806d4f130629dce9bdd902786a3098a47d0ee83b16ed877cc3e77efa68f618e914696b6218c8ae11db0656f81c1a3fa33aa62e56044b0a7b3f13119e19d - languageName: node - linkType: hard - -"date-fns@npm:^2.16.1": - version: 2.28.0 - resolution: "date-fns@npm:2.28.0" - checksum: 10/2d99e884f7dc020971a394deef35cc4a2685cdf6c99585a79d64d271eb639e0e483f17948ec06c2820b01cc662b6e76b7be2aa3d671d530444447bf836cd40f8 - languageName: node - linkType: hard - -"date-format@npm:^4.0.14": - version: 4.0.14 - resolution: "date-format@npm:4.0.14" - checksum: 10/6b07fd1df247439c53b71244e3468b93e6dfebb5d409b9328dd7b7e9ed0d2e875018e20fb1a95ae6b677dea708ec06aaa5058a7a5faa1a7f649338aabf04991a - languageName: node - linkType: hard - -"date-format@npm:^4.0.3": - version: 4.0.3 - resolution: "date-format@npm:4.0.3" - checksum: 10/5f5ea388dc211e8e5cab515b72b5b6fa071d42d029bdc8cc71a7f8a2d25726c3128a49d9ad78474d1b1ba39f83fe9837e431d0bfc8de5941f850d06cf5841eb5 - languageName: node - linkType: hard - -"debounce-fn@npm:^4.0.0": - version: 4.0.0 - resolution: "debounce-fn@npm:4.0.0" - dependencies: - mimic-fn: "npm:^3.0.0" - checksum: 10/1f0641c4dbfa38c2893943cd02cf94547840ac8fa21bed95489910bb7d312dd63dbad2d9cfcf0cf0ca47599090f41ebb4c356253aa9993a22461fa1f1d805ead - languageName: node - linkType: hard - -"debug-log@npm:^1.0.0, debug-log@npm:^1.0.1": - version: 1.0.1 - resolution: "debug-log@npm:1.0.1" - checksum: 10/1439f9dac2e77cd915abd534b8876dd655cd86214e3bab8f78fff284b61fda3a143bad56ed71071fcbfbe11cc8c453ff719e1512f24c3b1056d12fa0b4db8520 - languageName: node - linkType: hard - -"debug@npm:2.6.9, debug@npm:^2.1.1, debug@npm:^2.2.0, debug@npm:^2.3.3, debug@npm:^2.6.0": - version: 2.6.9 - resolution: "debug@npm:2.6.9" - dependencies: - ms: "npm:2.0.0" - checksum: 10/e07005f2b40e04f1bd14a3dd20520e9c4f25f60224cb006ce9d6781732c917964e9ec029fc7f1a151083cd929025ad5133814d4dc624a9aaf020effe4914ed14 - languageName: node - linkType: hard - -"debug@npm:3.1.0": - version: 3.1.0 - resolution: "debug@npm:3.1.0" - dependencies: - ms: "npm:2.0.0" - checksum: 10/f5fd4b1390dd3b03a78aa30133a4b4db62acc3e6cd86af49f114bf7f7bd57c41a5c5c2eced2ad2c8190d70c60309f2dd5782feeaa0704dbaa5697890e3c5ad07 - languageName: node - linkType: hard - -"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:~4.3.1, debug@npm:~4.3.2": - version: 4.3.4 - resolution: "debug@npm:4.3.4" - dependencies: - ms: "npm:2.1.2" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10/0073c3bcbd9cb7d71dd5f6b55be8701af42df3e56e911186dfa46fac3a5b9eb7ce7f377dd1d3be6db8977221f8eb333d945216f645cf56f6b688cd484837d255 - languageName: node - linkType: hard - -"debug@npm:4.3.5, debug@npm:~4.3.4": - version: 4.3.5 - resolution: "debug@npm:4.3.5" - dependencies: - ms: "npm:2.1.2" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10/cb6eab424c410e07813ca1392888589972ce9a32b8829c6508f5e1f25f3c3e70a76731610ae55b4bbe58d1a2fffa1424b30e97fa8d394e49cd2656a9643aedd2 - languageName: node - linkType: hard - -"debug@npm:^3.0.1, debug@npm:^3.1.0, debug@npm:^3.2.6, debug@npm:^3.2.7": - version: 3.2.7 - resolution: "debug@npm:3.2.7" - dependencies: - ms: "npm:^2.1.1" - checksum: 10/d86fd7be2b85462297ea16f1934dc219335e802f629ca9a69b63ed8ed041dda492389bb2ee039217c02e5b54792b1c51aa96ae954cf28634d363a2360c7a1639 - languageName: node - linkType: hard - -"debug@npm:^4.3.5": - version: 4.3.6 - resolution: "debug@npm:4.3.6" - dependencies: - ms: "npm:2.1.2" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10/d3adb9af7d57a9e809a68f404490cf776122acca16e6359a2702c0f462e510e91f9765c07f707b8ab0d91e03bad57328f3256f5082631cefb5393d0394d50fb7 - languageName: node - linkType: hard - -"decamelize-keys@npm:^1.1.0": - version: 1.1.0 - resolution: "decamelize-keys@npm:1.1.0" - dependencies: - decamelize: "npm:^1.1.0" - map-obj: "npm:^1.0.0" - checksum: 10/968813219ec20e167b01294cdc0eb754a8b4dc979fda6989f498d9a483822efd341683aeb09a3f3c50bf974211bc4779c39d792e19cfafc6fc2e6e5d9343850c - languageName: node - linkType: hard - -"decamelize@npm:^1.1.0, decamelize@npm:^1.1.1, decamelize@npm:^1.2.0": - version: 1.2.0 - resolution: "decamelize@npm:1.2.0" - checksum: 10/ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa - languageName: node - linkType: hard - -"decamelize@npm:^4.0.0": - version: 4.0.0 - resolution: "decamelize@npm:4.0.0" - checksum: 10/b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 - languageName: node - linkType: hard - -"decamelize@npm:^5.0.0": - version: 5.0.1 - resolution: "decamelize@npm:5.0.1" - checksum: 10/643e88804c538a334fae303ae1da8b30193b81dad8689643b35e6ab8ab60a3b03492cab6096d8163bd41fd384d969485f0634c000f80af502aa7f4047258d5b4 - languageName: node - linkType: hard - -"decimal.js@npm:^10.2.1": - version: 10.4.3 - resolution: "decimal.js@npm:10.4.3" - checksum: 10/de663a7bc4d368e3877db95fcd5c87b965569b58d16cdc4258c063d231ca7118748738df17cd638f7e9dd0be8e34cec08d7234b20f1f2a756a52fc5a38b188d0 - languageName: node - linkType: hard - -"decode-uri-component@npm:^0.2.0, decode-uri-component@npm:^0.2.2": - version: 0.2.2 - resolution: "decode-uri-component@npm:0.2.2" - checksum: 10/17a0e5fa400bf9ea84432226e252aa7b5e72793e16bf80b907c99b46a799aeacc139ec20ea57121e50c7bd875a1a4365928f884e92abf02e21a5a13790a0f33e - languageName: node - linkType: hard - -"decompress-response@npm:^3.2.0, decompress-response@npm:^3.3.0": - version: 3.3.0 - resolution: "decompress-response@npm:3.3.0" - dependencies: - mimic-response: "npm:^1.0.0" - checksum: 10/952552ac3bd7de2fc18015086b09468645c9638d98a551305e485230ada278c039c91116e946d07894b39ee53c0f0d5b6473f25a224029344354513b412d7380 - languageName: node - linkType: hard - -"decompress-response@npm:^6.0.0": - version: 6.0.0 - resolution: "decompress-response@npm:6.0.0" - dependencies: - mimic-response: "npm:^3.1.0" - checksum: 10/d377cf47e02d805e283866c3f50d3d21578b779731e8c5072d6ce8c13cc31493db1c2f6784da9d1d5250822120cefa44f1deab112d5981015f2e17444b763812 - languageName: node - linkType: hard - -"decompress-tar@npm:^4.0.0, decompress-tar@npm:^4.1.0, decompress-tar@npm:^4.1.1": - version: 4.1.1 - resolution: "decompress-tar@npm:4.1.1" - dependencies: - file-type: "npm:^5.2.0" - is-stream: "npm:^1.1.0" - tar-stream: "npm:^1.5.2" - checksum: 10/820c645dfa9a0722c4c817363431d07687374338e2af337cc20c9a44b285fdd89296837a1d1281ee9fa85c6f03d7c0f50670aec9abbd4eb198a714bb179ea0bd - languageName: node - linkType: hard - -"decompress-tarbz2@npm:^4.0.0": - version: 4.1.1 - resolution: "decompress-tarbz2@npm:4.1.1" - dependencies: - decompress-tar: "npm:^4.1.0" - file-type: "npm:^6.1.0" - is-stream: "npm:^1.1.0" - seek-bzip: "npm:^1.0.5" - unbzip2-stream: "npm:^1.0.9" - checksum: 10/519c81337730159a1f2d7072a6ee8523ffd76df48d34f14c27cb0a27f89b4e2acf75dad2f761838e5bc63230cea1ac154b092ecb7504be4e93f7d0e32ddd6aff - languageName: node - linkType: hard - -"decompress-targz@npm:^4.0.0": - version: 4.1.1 - resolution: "decompress-targz@npm:4.1.1" - dependencies: - decompress-tar: "npm:^4.1.1" - file-type: "npm:^5.2.0" - is-stream: "npm:^1.1.0" - checksum: 10/22738f58eb034568dc50d370c03b346c428bfe8292fe56165847376b5af17d3c028fefca82db642d79cb094df4c0a599d40a8f294b02aad1d3ddec82f3fd45d4 - languageName: node - linkType: hard - -"decompress-unzip@npm:^4.0.1": - version: 4.0.1 - resolution: "decompress-unzip@npm:4.0.1" - dependencies: - file-type: "npm:^3.8.0" - get-stream: "npm:^2.2.0" - pify: "npm:^2.3.0" - yauzl: "npm:^2.4.2" - checksum: 10/ba9f3204ab2415bedb18d796244928a18148ef40dbb15174d0d01e5991b39536b03d02800a8a389515a1523f8fb13efc7cd44697df758cd06c674879caefd62b - languageName: node - linkType: hard - -"decompress@npm:^4.2.1": - version: 4.2.1 - resolution: "decompress@npm:4.2.1" - dependencies: - decompress-tar: "npm:^4.0.0" - decompress-tarbz2: "npm:^4.0.0" - decompress-targz: "npm:^4.0.0" - decompress-unzip: "npm:^4.0.1" - graceful-fs: "npm:^4.1.10" - make-dir: "npm:^1.0.0" - pify: "npm:^2.3.0" - strip-dirs: "npm:^2.0.0" - checksum: 10/8247a31c6db7178413715fdfb35a482f019c81dfcd6e8e623d9f0382c9889ce797ce0144de016b256ed03298907a620ce81387cca0e69067a933470081436cb8 - languageName: node - linkType: hard - -"dedent@npm:^0.7.0": - version: 0.7.0 - resolution: "dedent@npm:0.7.0" - checksum: 10/87de191050d9a40dd70cad01159a0bcf05ecb59750951242070b6abf9569088684880d00ba92a955b4058804f16eeaf91d604f283929b4f614d181cd7ae633d2 - languageName: node - linkType: hard - -"dedent@npm:^1.0.0": - version: 1.5.1 - resolution: "dedent@npm:1.5.1" - peerDependencies: - babel-plugin-macros: ^3.1.0 - peerDependenciesMeta: - babel-plugin-macros: - optional: true - checksum: 10/fc00a8bc3dfb7c413a778dc40ee8151b6c6ff35159d641f36ecd839c1df5c6e0ec5f4992e658c82624a1a62aaecaffc23b9c965ceb0bbf4d698bfc16469ac27d - languageName: node - linkType: hard - -"dedent@npm:^1.5.3": - version: 1.5.3 - resolution: "dedent@npm:1.5.3" - peerDependencies: - babel-plugin-macros: ^3.1.0 - peerDependenciesMeta: - babel-plugin-macros: - optional: true - checksum: 10/e5277f6268f288649503125b781a7b7a2c9b22d011139688c0b3619fe40121e600eb1f077c891938d4b2428bdb6326cc3c77a763e4b1cc681bd9666ab1bad2a1 - languageName: node - linkType: hard - -"deep-eql@npm:^4.1.2": - version: 4.1.3 - resolution: "deep-eql@npm:4.1.3" - dependencies: - type-detect: "npm:^4.0.0" - checksum: 10/12ce93ae63de187e77b076d3d51bfc28b11f98910a22c18714cce112791195e86a94f97788180994614b14562a86c9763f67c69f785e4586f806b5df39bf9301 - languageName: node - linkType: hard - -"deep-equal@npm:^2.0.5": - version: 2.2.3 - resolution: "deep-equal@npm:2.2.3" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - call-bind: "npm:^1.0.5" - es-get-iterator: "npm:^1.1.3" - get-intrinsic: "npm:^1.2.2" - is-arguments: "npm:^1.1.1" - is-array-buffer: "npm:^3.0.2" - is-date-object: "npm:^1.0.5" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - isarray: "npm:^2.0.5" - object-is: "npm:^1.1.5" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.5.1" - side-channel: "npm:^1.0.4" - which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.1" - which-typed-array: "npm:^1.1.13" - checksum: 10/1ce49d0b71d0f14d8ef991a742665eccd488dfc9b3cada069d4d7a86291e591c92d2589c832811dea182b4015736b210acaaebce6184be356c1060d176f5a05f - languageName: node - linkType: hard - -"deep-equal@npm:^2.2.2": - version: 2.2.2 - resolution: "deep-equal@npm:2.2.2" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - call-bind: "npm:^1.0.2" - es-get-iterator: "npm:^1.1.3" - get-intrinsic: "npm:^1.2.1" - is-arguments: "npm:^1.1.1" - is-array-buffer: "npm:^3.0.2" - is-date-object: "npm:^1.0.5" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - isarray: "npm:^2.0.5" - object-is: "npm:^1.1.5" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.5.0" - side-channel: "npm:^1.0.4" - which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.1" - which-typed-array: "npm:^1.1.9" - checksum: 10/883cb8b3cf10d387ce8fb191f7d7b46b48022e00810074c5629053953aa3be5c5890dd40d30d31d27fb140af9a541c06c852ab5d28f76b07095c9d28e3c4b04f - languageName: node - linkType: hard - -"deep-extend@npm:^0.6.0": - version: 0.6.0 - resolution: "deep-extend@npm:0.6.0" - checksum: 10/7be7e5a8d468d6b10e6a67c3de828f55001b6eb515d014f7aeb9066ce36bd5717161eb47d6a0f7bed8a9083935b465bc163ee2581c8b128d29bf61092fdf57a7 - languageName: node - linkType: hard - -"deep-is@npm:^0.1.3, deep-is@npm:~0.1.3": - version: 0.1.4 - resolution: "deep-is@npm:0.1.4" - checksum: 10/ec12d074aef5ae5e81fa470b9317c313142c9e8e2afe3f8efa124db309720db96d1d222b82b84c834e5f87e7a614b44a4684b6683583118b87c833b3be40d4d8 - languageName: node - linkType: hard - -"deepmerge-ts@npm:^5.1.0": - version: 5.1.0 - resolution: "deepmerge-ts@npm:5.1.0" - checksum: 10/0f615ccfb27b93a286abc315d7d1ec171f1befe9c511c2799ca7184c11fc6a6f29f5368d446c6885338de0d95cf6cb66a5ff4c55141a1265012730bd69408cf9 - languageName: node - linkType: hard - -"deepmerge@npm:^4.2.2": - version: 4.2.2 - resolution: "deepmerge@npm:4.2.2" - checksum: 10/0e58ed14f530d08f9b996cfc3a41b0801691620235bc5e1883260e3ed1c1b4a1dfb59f865770e45d5dfb1d7ee108c4fc10c2f85e822989d4123490ea90be2545 - languageName: node - linkType: hard - -"default-gateway@npm:^6.0.0, default-gateway@npm:^6.0.3": - version: 6.0.3 - resolution: "default-gateway@npm:6.0.3" - dependencies: - execa: "npm:^5.0.0" - checksum: 10/126f8273ecac8ee9ff91ea778e8784f6cd732d77c3157e8c5bdd6ed03651b5291f71446d05bc02d04073b1e67583604db5394ea3cf992ede0088c70ea15b7378 - languageName: node - linkType: hard - -"default-require-extensions@npm:^1.0.0": - version: 1.0.0 - resolution: "default-require-extensions@npm:1.0.0" - dependencies: - strip-bom: "npm:^2.0.0" - checksum: 10/8be10a3e1f997c8a579c3f00fdd8117c30fa3a12d2ac544dc1ee93fd6138c77fba69fe69546c76d0299d7f74c26416301b9a1dc775557e99991a6ebe2f850df4 - languageName: node - linkType: hard - -"default-require-extensions@npm:^2.0.0": - version: 2.0.0 - resolution: "default-require-extensions@npm:2.0.0" - dependencies: - strip-bom: "npm:^3.0.0" - checksum: 10/a0b18bdcdee93018ee39161208c193f274d5f6553c32f518ad86eba92edf6485d194012ffb402e8207f9b80f2da2c6de48e0189fd63bd682f0760e4dbd35cb79 - languageName: node - linkType: hard - -"default-require-extensions@npm:^3.0.0": - version: 3.0.0 - resolution: "default-require-extensions@npm:3.0.0" - dependencies: - strip-bom: "npm:^4.0.0" - checksum: 10/0b5bdb6786ebb0ff6ef55386f37c8d221963fbbd3009588fe71032c85ca16da05eff2ad01bfe9bfc8bac5ce95a18f66b38c50d454482e3e9d2de1142424a3e7c - languageName: node - linkType: hard - -"defaults@npm:^1.0.3": - version: 1.0.3 - resolution: "defaults@npm:1.0.3" - dependencies: - clone: "npm:^1.0.2" - checksum: 10/96e2112da6553d376afd5265ea7cbdb2a3b45535965d71ab8bb1da10c8126d168fdd5268799625324b368356d21ba2a7b3d4ec50961f11a47b7feb9de3d4413e - languageName: node - linkType: hard - -"defer-to-connect@npm:^1.0.1": - version: 1.1.3 - resolution: "defer-to-connect@npm:1.1.3" - checksum: 10/9491b301dcfa04956f989481ba7a43c2231044206269eb4ab64a52d6639ee15b1252262a789eb4239fb46ab63e44d4e408641bae8e0793d640aee55398cb3930 - languageName: node - linkType: hard - -"defer-to-connect@npm:^2.0.1": - version: 2.0.1 - resolution: "defer-to-connect@npm:2.0.1" - checksum: 10/8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b - languageName: node - linkType: hard - -"deferred-leveldown@npm:~0.2.0": - version: 0.2.0 - resolution: "deferred-leveldown@npm:0.2.0" - dependencies: - abstract-leveldown: "npm:~0.12.1" - checksum: 10/f7690ec5b1e951e6f56998be26dd0a1331ef28cb7eaa9e090a282780d47dc006effd4b82a2a82b636cae801378047997aca10c0b44b09c8624633cdb96b07913 - languageName: node - linkType: hard - -"deferred-leveldown@npm:~1.2.1": - version: 1.2.2 - resolution: "deferred-leveldown@npm:1.2.2" - dependencies: - abstract-leveldown: "npm:~2.6.0" - checksum: 10/17a79955e8191264c79422235dc5eea46fa1b5be43c06d50bfb149679721ec389168198ac2edf6635bd02372db19c1b0db5154d502b2ee93c33f0ad9644597be - languageName: node - linkType: hard - -"deferred-leveldown@npm:~4.0.0": - version: 4.0.2 - resolution: "deferred-leveldown@npm:4.0.2" - dependencies: - abstract-leveldown: "npm:~5.0.0" - inherits: "npm:^2.0.3" - checksum: 10/124de023a7f6d4b7109a2a8cdb361e533702035386718ab047960a763e993532854a027b7712caeb68d22e5c4358074fb5c3f7e7d7860dae16f3e482759d2cd6 - languageName: node - linkType: hard - -"deferred-leveldown@npm:~5.3.0": - version: 5.3.0 - resolution: "deferred-leveldown@npm:5.3.0" - dependencies: - abstract-leveldown: "npm:~6.2.1" - inherits: "npm:^2.0.3" - checksum: 10/23739c39525e4a51b3ef33cfd462b4acc9b09d66c19f2731ae6ce21a72ad00e5fad4205c0f4f46bb3f3a07844502aa9207b3c0d468a9e4da3aca32341ccabe7a - languageName: node - linkType: hard - -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": - version: 1.1.1 - resolution: "define-data-property@npm:1.1.1" - dependencies: - get-intrinsic: "npm:^1.2.1" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - checksum: 10/5573c8df96b5857408cad64d9b91b69152e305ce4b06218e5f49b59c6cafdbb90a8bd8a0bb83c7bc67a8d479c04aa697063c9bc28d849b7282f9327586d6bc7b - languageName: node - linkType: hard - -"define-data-property@npm:^1.1.2": - version: 1.1.4 - resolution: "define-data-property@npm:1.1.4" - dependencies: - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.0.1" - checksum: 10/abdcb2505d80a53524ba871273e5da75e77e52af9e15b3aa65d8aad82b8a3a424dad7aee2cc0b71470ac7acf501e08defac362e8b6a73cdb4309f028061df4ae - languageName: node - linkType: hard - -"define-lazy-prop@npm:^2.0.0": - version: 2.0.0 - resolution: "define-lazy-prop@npm:2.0.0" - checksum: 10/0115fdb065e0490918ba271d7339c42453d209d4cb619dfe635870d906731eff3e1ade8028bb461ea27ce8264ec5e22c6980612d332895977e89c1bbc80fcee2 - languageName: node - linkType: hard - -"define-properties@npm:^1.1.3": - version: 1.1.3 - resolution: "define-properties@npm:1.1.3" - dependencies: - object-keys: "npm:^1.0.12" - checksum: 10/33125cafaf4de2c9934cfba20e0a45bccc53fa6d85370a48c0b5a9a0c76c7d0497a5fdf01bc5c1186cb61f2747f19f43520ca6fdd37b4d0290f552c6747e0a17 - languageName: node - linkType: hard - -"define-properties@npm:^1.1.4, define-properties@npm:^1.2.0": - version: 1.2.0 - resolution: "define-properties@npm:1.2.0" - dependencies: - has-property-descriptors: "npm:^1.0.0" - object-keys: "npm:^1.1.1" - checksum: 10/e60aee6a19b102df4e2b1f301816804e81ab48bb91f00d0d935f269bf4b3f79c88b39e4f89eaa132890d23267335fd1140dfcd8d5ccd61031a0a2c41a54e33a6 - languageName: node - linkType: hard - -"define-properties@npm:^1.2.1": - version: 1.2.1 - resolution: "define-properties@npm:1.2.1" - dependencies: - define-data-property: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - object-keys: "npm:^1.1.1" - checksum: 10/b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 - languageName: node - linkType: hard - -"define-property@npm:^0.2.5": - version: 0.2.5 - resolution: "define-property@npm:0.2.5" - dependencies: - is-descriptor: "npm:^0.1.0" - checksum: 10/85af107072b04973b13f9e4128ab74ddfda48ec7ad2e54b193c0ffb57067c4ce5b7786a7b4ae1f24bd03e87c5d18766b094571810b314d7540f86d4354dbd394 - languageName: node - linkType: hard - -"define-property@npm:^1.0.0": - version: 1.0.0 - resolution: "define-property@npm:1.0.0" - dependencies: - is-descriptor: "npm:^1.0.0" - checksum: 10/5fbed11dace44dd22914035ba9ae83ad06008532ca814d7936a53a09e897838acdad5b108dd0688cc8d2a7cf0681acbe00ee4136cf36743f680d10517379350a - languageName: node - linkType: hard - -"define-property@npm:^2.0.2": - version: 2.0.2 - resolution: "define-property@npm:2.0.2" - dependencies: - is-descriptor: "npm:^1.0.2" - isobject: "npm:^3.0.1" - checksum: 10/3217ed53fc9eed06ba8da6f4d33e28c68a82e2f2a8ab4d562c4920d8169a166fe7271453675e6c69301466f36a65d7f47edf0cf7f474b9aa52a5ead9c1b13c99 - languageName: node - linkType: hard - -"defined@npm:^1.0.1": - version: 1.0.1 - resolution: "defined@npm:1.0.1" - checksum: 10/c4c3c41819721ddc07f689a53cfdf5edb085d8d762e410e9e7705fdbcccb41ff34a7331e795cdc2c416f5e524215413815b47051507c0cd4d3c8a8d74baf8ccb - languageName: node - linkType: hard - -"deglob@npm:^2.1.0": - version: 2.1.1 - resolution: "deglob@npm:2.1.1" - dependencies: - find-root: "npm:^1.0.0" - glob: "npm:^7.0.5" - ignore: "npm:^3.0.9" - pkg-config: "npm:^1.1.0" - run-parallel: "npm:^1.1.2" - uniq: "npm:^1.0.1" - checksum: 10/cf1ae819dbdbf9bcd88f86a6e9abc7f28eb65702d5a01292572717e89c339ffc7cd8cd3ab1c76e345b93af2c986da35a2238839cbb6cb63574927add780d4cf7 - languageName: node - linkType: hard - -"del-cli@npm:5.1.0": - version: 5.1.0 - resolution: "del-cli@npm:5.1.0" - dependencies: - del: "npm:^7.1.0" - meow: "npm:^10.1.3" - bin: - del: cli.js - del-cli: cli.js - checksum: 10/b52b7ce997a5f1591fb420c0931ef24e71cee80788a7750704903f6e82fc846375466bb991655e2ad7234d237a9e8a90545e2ab1d728fba5ad9e67573500b084 - languageName: node - linkType: hard - -"del@npm:7.1.0, del@npm:^7.1.0": - version: 7.1.0 - resolution: "del@npm:7.1.0" - dependencies: - globby: "npm:^13.1.2" - graceful-fs: "npm:^4.2.10" - is-glob: "npm:^4.0.3" - is-path-cwd: "npm:^3.0.0" - is-path-inside: "npm:^4.0.0" - p-map: "npm:^5.5.0" - rimraf: "npm:^3.0.2" - slash: "npm:^4.0.0" - checksum: 10/93527e78e95125809ff20a112814b00648ed64af204be1a565862698060c9ec8f5c5fe1a4866725acfde9b0da6423f4b7a7642c1d38cd4b05cbeb643a7b089e3 - languageName: node - linkType: hard - -"delay@npm:^5.0.0": - version: 5.0.0 - resolution: "delay@npm:5.0.0" - checksum: 10/62f151151ecfde0d9afbb8a6be37a6d103c4cb24f35a20ef3fe56f920b0d0d0bb02bc9c0a3084d0179ef669ca332b91155f2ee4d9854622cd2cdba5fc95285f9 - languageName: node - linkType: hard - -"delayed-stream@npm:~1.0.0": - version: 1.0.0 - resolution: "delayed-stream@npm:1.0.0" - checksum: 10/46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 - languageName: node - linkType: hard - -"delegates@npm:^1.0.0": - version: 1.0.0 - resolution: "delegates@npm:1.0.0" - checksum: 10/a51744d9b53c164ba9c0492471a1a2ffa0b6727451bdc89e31627fdf4adda9d51277cfcbfb20f0a6f08ccb3c436f341df3e92631a3440226d93a8971724771fd - languageName: node - linkType: hard - -"depcheck@npm:1.4.7": - version: 1.4.7 - resolution: "depcheck@npm:1.4.7" - dependencies: - "@babel/parser": "npm:^7.23.0" - "@babel/traverse": "npm:^7.23.2" - "@vue/compiler-sfc": "npm:^3.3.4" - callsite: "npm:^1.0.0" - camelcase: "npm:^6.3.0" - cosmiconfig: "npm:^7.1.0" - debug: "npm:^4.3.4" - deps-regex: "npm:^0.2.0" - findup-sync: "npm:^5.0.0" - ignore: "npm:^5.2.4" - is-core-module: "npm:^2.12.0" - js-yaml: "npm:^3.14.1" - json5: "npm:^2.2.3" - lodash: "npm:^4.17.21" - minimatch: "npm:^7.4.6" - multimatch: "npm:^5.0.0" - please-upgrade-node: "npm:^3.2.0" - readdirp: "npm:^3.6.0" - require-package-name: "npm:^2.0.1" - resolve: "npm:^1.22.3" - resolve-from: "npm:^5.0.0" - semver: "npm:^7.5.4" - yargs: "npm:^16.2.0" - bin: - depcheck: bin/depcheck.js - checksum: 10/e35e87517348a3fd678f9ed7324cb96aff350c65cd0ede7da5be303f03144ad66a18d03ff2b52531cd7900b2ca83f8c2a4fac3295e00db8f701f92fb33744b78 - languageName: node - linkType: hard - -"depd@npm:2.0.0, depd@npm:~2.0.0": - version: 2.0.0 - resolution: "depd@npm:2.0.0" - checksum: 10/c0c8ff36079ce5ada64f46cc9d6fd47ebcf38241105b6e0c98f412e8ad91f084bcf906ff644cc3a4bd876ca27a62accb8b0fff72ea6ed1a414b89d8506f4a5ca - languageName: node - linkType: hard - -"depd@npm:^1.1.0, depd@npm:^1.1.2, depd@npm:~1.1.2": - version: 1.1.2 - resolution: "depd@npm:1.1.2" - checksum: 10/2ed6966fc14463a9e85451db330ab8ba041efed0b9a1a472dbfc6fbf2f82bab66491915f996b25d8517dddc36c8c74e24c30879b34877f3c4410733444a51d1d - languageName: node - linkType: hard - -"dependency-tree@npm:^10.0.9": - version: 10.0.9 - resolution: "dependency-tree@npm:10.0.9" - dependencies: - commander: "npm:^10.0.1" - filing-cabinet: "npm:^4.1.6" - precinct: "npm:^11.0.5" - typescript: "npm:^5.0.4" - bin: - dependency-tree: bin/cli.js - checksum: 10/ddfd641f4ff82fe33d0d9578fd71ea9d044b9416191f93e484e7a2b2ed195e02f8dfe7cbb4f00fb25ba37aeca46158fc29782d22bd3a5ef3582c01d15d6705c8 - languageName: node - linkType: hard - -"deps-regex@npm:^0.2.0": - version: 0.2.0 - resolution: "deps-regex@npm:0.2.0" - checksum: 10/d8eeb89727037f2ae680a619f8eefbc8475d21c3d5273e2bbcb9838aabd1c93fd9e011f51bcda5bd65f042921c1bc156119d9a8a2f3539aa4009950b8f9c79b3 - languageName: node - linkType: hard - -"dequal@npm:^2.0.3": - version: 2.0.3 - resolution: "dequal@npm:2.0.3" - checksum: 10/6ff05a7561f33603df87c45e389c9ac0a95e3c056be3da1a0c4702149e3a7f6fe5ffbb294478687ba51a9e95f3a60e8b6b9005993acd79c292c7d15f71964b6b - languageName: node - linkType: hard - -"des.js@npm:^1.0.0": - version: 1.0.1 - resolution: "des.js@npm:1.0.1" - dependencies: - inherits: "npm:^2.0.1" - minimalistic-assert: "npm:^1.0.0" - checksum: 10/f8eed334f85228d0cd985e3299c9e65ab70f6b82852f4dfb3eb2614ec7927ece262fed172daca02b57899388477046739225663739e54185d90cc5e5c10b4e11 - languageName: node - linkType: hard - -"destroy@npm:1.2.0": - version: 1.2.0 - resolution: "destroy@npm:1.2.0" - checksum: 10/0acb300b7478a08b92d810ab229d5afe0d2f4399272045ab22affa0d99dbaf12637659411530a6fcd597a9bdac718fc94373a61a95b4651bbc7b83684a565e38 - languageName: node - linkType: hard - -"detect-file@npm:^1.0.0": - version: 1.0.0 - resolution: "detect-file@npm:1.0.0" - checksum: 10/1861e4146128622e847abe0e1ed80fef01e78532665858a792267adf89032b7a9c698436137707fcc6f02956c2a6a0052d6a0cef5be3d4b76b1ff0da88e2158a - languageName: node - linkType: hard - -"detect-indent@npm:^5.0.0": - version: 5.0.0 - resolution: "detect-indent@npm:5.0.0" - checksum: 10/61763211daa498e00eec073aba95d544ae5baed19286a0a655697fa4fffc9f4539c8376e2c7df8fa11d6f8eaa16c1e6a689f403ac41ee78a060278cdadefe2ff - languageName: node - linkType: hard - -"detect-indent@npm:^6.0.0": - version: 6.1.0 - resolution: "detect-indent@npm:6.1.0" - checksum: 10/ab953a73c72dbd4e8fc68e4ed4bfd92c97eb6c43734af3900add963fd3a9316f3bc0578b018b24198d4c31a358571eff5f0656e81a1f3b9ad5c547d58b2d093d - languageName: node - linkType: hard - -"detect-indent@npm:^7.0.0": - version: 7.0.1 - resolution: "detect-indent@npm:7.0.1" - checksum: 10/cbf3f0b1c3c881934ca94428e1179b26ab2a587e0d719031d37a67fb506d49d067de54ff057cb1e772e75975fed5155c01cd4518306fee60988b1486e3fc7768 - languageName: node - linkType: hard - -"detect-libc@npm:^2.0.0": - version: 2.0.1 - resolution: "detect-libc@npm:2.0.1" - checksum: 10/f41b3d8c726127cc010c78bf4cdb6fda20a1a0731ae9fc34698e3b9887d82e19f249f4dc997b423f930d5be0c3ee05dc7fe6c2473dd058856c6b0700eb3e0dc6 - languageName: node - linkType: hard - -"detect-newline@npm:3.1.0, detect-newline@npm:^3.0.0": - version: 3.1.0 - resolution: "detect-newline@npm:3.1.0" - checksum: 10/ae6cd429c41ad01b164c59ea36f264a2c479598e61cba7c99da24175a7ab80ddf066420f2bec9a1c57a6bead411b4655ff15ad7d281c000a89791f48cbe939e7 - languageName: node - linkType: hard - -"detect-node@npm:^2.0.4": - version: 2.1.0 - resolution: "detect-node@npm:2.1.0" - checksum: 10/832184ec458353e41533ac9c622f16c19f7c02d8b10c303dfd3a756f56be93e903616c0bb2d4226183c9351c15fc0b3dba41a17a2308262afabcfa3776e6ae6e - languageName: node - linkType: hard - -"detect-port-alt@npm:^1.1.6": - version: 1.1.6 - resolution: "detect-port-alt@npm:1.1.6" - dependencies: - address: "npm:^1.0.1" - debug: "npm:^2.6.0" - bin: - detect: ./bin/detect-port - detect-port: ./bin/detect-port - checksum: 10/35c9f9c69d12d2ca43d093f4f02d7763b47673910749bd12e6fedeb0ab5c546d27ab8e6425a9cbc65edd408490241390a8e680e8ec7e13940e84754ad81d632e - languageName: node - linkType: hard - -"detective-amd@npm:^5.0.2": - version: 5.0.2 - resolution: "detective-amd@npm:5.0.2" - dependencies: - ast-module-types: "npm:^5.0.0" - escodegen: "npm:^2.0.0" - get-amd-module-type: "npm:^5.0.1" - node-source-walk: "npm:^6.0.1" - bin: - detective-amd: bin/cli.js - checksum: 10/6117eec09b4908abe74a3c3bc1f037334092e2a9388231c5f1b672a22c48f6e17ade9ecaf8c0cbbef6fcde52da178b0693e9810ef3c824c11c5c64c6c5865ca1 - languageName: node - linkType: hard - -"detective-cjs@npm:^5.0.1": - version: 5.0.1 - resolution: "detective-cjs@npm:5.0.1" - dependencies: - ast-module-types: "npm:^5.0.0" - node-source-walk: "npm:^6.0.0" - checksum: 10/c51c27ab10e4c441b26d13e44569c4cd1015268b10537fdfca698996c569ce98e9d69ce635a9680789c9e4fbc6d60c77a752ae64d7532e92678c19fb19ff313b - languageName: node - linkType: hard - -"detective-es6@npm:^4.0.1": - version: 4.0.1 - resolution: "detective-es6@npm:4.0.1" - dependencies: - node-source-walk: "npm:^6.0.1" - checksum: 10/f9fbcae9399fad5d1c4120d22db97fdab6fc8d9ec8011cec2214b23970b3524d5a8ec30943009543cda99cb6dec2e8b78549b6dd918d7c2bff8f13c0565345c8 - languageName: node - linkType: hard - -"detective-postcss@npm:^6.1.3": - version: 6.1.3 - resolution: "detective-postcss@npm:6.1.3" - dependencies: - is-url: "npm:^1.2.4" - postcss: "npm:^8.4.23" - postcss-values-parser: "npm:^6.0.2" - checksum: 10/ee6e07fed20ac93a6ba84736b9c586a942a4a6b2df173f963f95ea753380c99e4a606da22b8d9e8407c50e356f3d893a127eb68cf84c97233a209e9fbbadb026 - languageName: node - linkType: hard - -"detective-sass@npm:^5.0.3": - version: 5.0.3 - resolution: "detective-sass@npm:5.0.3" - dependencies: - gonzales-pe: "npm:^4.3.0" - node-source-walk: "npm:^6.0.1" - checksum: 10/5b09526931c6d87b8159fd9f10518b546ac2cbbc3cec91db194e67553a64c312bcf53de6950f34236ba7747a4f7855885b662c0e2df42aff7deb9d8aed0ce5e3 - languageName: node - linkType: hard - -"detective-scss@npm:^4.0.3": - version: 4.0.3 - resolution: "detective-scss@npm:4.0.3" - dependencies: - gonzales-pe: "npm:^4.3.0" - node-source-walk: "npm:^6.0.1" - checksum: 10/afeda1e45468d23499349bedaece546b63f9269b51faf05b00f8d9a8a092f6961a6f2f366cc7664b8a1e4291454085b57cfa94fc7e1a1eaf16ef63c06782cfa9 - languageName: node - linkType: hard - -"detective-stylus@npm:^4.0.0": - version: 4.0.0 - resolution: "detective-stylus@npm:4.0.0" - checksum: 10/50a765f95e95c8204a86122f015dc9b3d32eb1c38d25cba9a71bbcb0441d398185679baa0d15d8cf43ff1c37e071c98b18599adc7ffe6147cc3c7f7f874cf6a3 - languageName: node - linkType: hard - -"detective-typescript@npm:^11.1.0": - version: 11.2.0 - resolution: "detective-typescript@npm:11.2.0" - dependencies: - "@typescript-eslint/typescript-estree": "npm:^5.62.0" - ast-module-types: "npm:^5.0.0" - node-source-walk: "npm:^6.0.2" - typescript: "npm:^5.4.4" - checksum: 10/e990cf13e0dc1c992ee80f4dfe961ac1ae1a48d42360d150302453547fa28fc012db7c0e73d20c6eea66bb7b2232e7c1304fc6861820f22e3005f86bcf56f67d - languageName: node - linkType: hard - -"did-resolver@npm:^4.0.0, did-resolver@npm:^4.1.0": - version: 4.1.0 - resolution: "did-resolver@npm:4.1.0" - checksum: 10/22c306007133213c8a7316137e174d08904db6cddebc55baa6d6fdbe7414ec2d2b031ba72fad449d069c1261468bc80963b08f47990a9eb5825b7535ee5ce252 - languageName: node - linkType: hard - -"didyoumean@npm:^1.2.2": - version: 1.2.2 - resolution: "didyoumean@npm:1.2.2" - checksum: 10/de7f11b6a0c8c61018629b7f405bb9746d6e994ce87c1a4b7655c3c718442dc69037a3d46d804950604fd9cbe85c074f7b224a119fc1bda851690a74540c6cf8 - languageName: node - linkType: hard - -"diff-sequences@npm:^27.5.1": - version: 27.5.1 - resolution: "diff-sequences@npm:27.5.1" - checksum: 10/34d852a13eb82735c39944a050613f952038614ce324256e1c3544948fa090f1ca7f329a4f1f57c31fe7ac982c17068d8915b633e300f040b97708c81ceb26cd - languageName: node - linkType: hard - -"diff-sequences@npm:^29.4.3": - version: 29.4.3 - resolution: "diff-sequences@npm:29.4.3" - checksum: 10/2287b259400513332d757f921eeda7c740863a919a00bd1d1b22ab2532b3e763538c404aec0953a813bbe33e660cbc77d0742875d6674d8dc5bc31d74ec88cc1 - languageName: node - linkType: hard - -"diff@npm:5.0.0": - version: 5.0.0 - resolution: "diff@npm:5.0.0" - checksum: 10/4a179a75b17cbb420eb9145be913f9ddb34b47cb2ba4301e80ae745122826a468f02ca8f5e56945958de26ace594899c8381acb6659c88e7803ef078b53d690c - languageName: node - linkType: hard - -"diff@npm:^3.0.0, diff@npm:^3.1.0, diff@npm:^3.5.0": - version: 3.5.0 - resolution: "diff@npm:3.5.0" - checksum: 10/cfbc2df98d6f8eb82c0f7735c8468695f65189d31f95a708d4c97cd96a8083fdfd83d87a067a29924ae7d8ff64f578e7da78391af537815750268555fe0df9f0 - languageName: node - linkType: hard - -"diff@npm:^4.0.1, diff@npm:^4.0.2": - version: 4.0.2 - resolution: "diff@npm:4.0.2" - checksum: 10/ec09ec2101934ca5966355a229d77afcad5911c92e2a77413efda5455636c4cf2ce84057e2d7715227a2eeeda04255b849bd3ae3a4dd22eb22e86e76456df069 - languageName: node - linkType: hard - -"diff@npm:^5.2.0": - version: 5.2.0 - resolution: "diff@npm:5.2.0" - checksum: 10/01b7b440f83a997350a988e9d2f558366c0f90f15be19f4aa7f1bb3109a4e153dfc3b9fbf78e14ea725717017407eeaa2271e3896374a0181e8f52445740846d - languageName: node - linkType: hard - -"diffie-hellman@npm:^5.0.0": - version: 5.0.3 - resolution: "diffie-hellman@npm:5.0.3" - dependencies: - bn.js: "npm:^4.1.0" - miller-rabin: "npm:^4.0.0" - randombytes: "npm:^2.0.0" - checksum: 10/2ff28231f93b27a4903461432d2de831df02e3568ea7633d5d7b6167eb73077f823b2bca26de6ba4f5c7ecd10a3df5aa94d376d136ab6209948c03cc4e4ac1fe - languageName: node - linkType: hard - -"dir-glob@npm:^3.0.1": - version: 3.0.1 - resolution: "dir-glob@npm:3.0.1" - dependencies: - path-type: "npm:^4.0.0" - checksum: 10/fa05e18324510d7283f55862f3161c6759a3f2f8dbce491a2fc14c8324c498286c54282c1f0e933cb930da8419b30679389499b919122952a4f8592362ef4615 - languageName: node - linkType: hard - -"dlv@npm:^1.1.3": - version: 1.1.3 - resolution: "dlv@npm:1.1.3" - checksum: 10/836459ec6b50e43e9ed388a5fc28954be99e3481af3fa4b5d82a600762eb65ef8faacd454097ed7fc2f8a60aea2800d65a4cece5cd0d81ab82b2031f3f759e6e - languageName: node - linkType: hard - -"dns-equal@npm:^1.0.0": - version: 1.0.0 - resolution: "dns-equal@npm:1.0.0" - checksum: 10/c4f55af6f13536de39ebcfa15f504a5678d4fc2cf37b76fd41e73aa46dbd1fa596c9468c0c929aeb248ec443cb217fde949942c513312acf93c76cf783276617 - languageName: node - linkType: hard - -"dns-over-http-resolver@npm:^2.1.0": - version: 2.1.2 - resolution: "dns-over-http-resolver@npm:2.1.2" - dependencies: - debug: "npm:^4.3.1" - native-fetch: "npm:^4.0.2" - receptacle: "npm:^1.3.2" - undici: "npm:^5.12.0" - checksum: 10/bdefd7873ebf2a86752d17b4abc1388451aa894c76c06e231bf1e6e33168f8ac71417c6d6e84e1323a3749ce08f3670f81a160bed761e639dd0f5d3952a3f0b7 - languageName: node - linkType: hard - -"dns-packet@npm:^5.2.2": - version: 5.5.0 - resolution: "dns-packet@npm:5.5.0" - dependencies: - "@leichtgewicht/ip-codec": "npm:^2.0.1" - checksum: 10/5726c63b83a085ecd9b4a2bd0434a69b500aec30ed9aaf51cc3ff270081e2543a6fc096edcba88905ee5f6b304c5ab5e4139fdbcbc777d35cabe74e34378c295 - languageName: node - linkType: hard - -"docker-modem@npm:^3.0.0": - version: 3.0.3 - resolution: "docker-modem@npm:3.0.3" - dependencies: - debug: "npm:^4.1.1" - readable-stream: "npm:^3.5.0" - split-ca: "npm:^1.0.1" - ssh2: "npm:^1.4.0" - checksum: 10/266030d49961a82810152150b13be459490eabb00ca319786930a31ca4a0491bf1ea89ac43b7972a7dbc807e1f73b92bb482be0682247cbf1180b58b80fc08d7 - languageName: node - linkType: hard - -"dockerode@npm:3.3.0": - version: 3.3.0 - resolution: "dockerode@npm:3.3.0" - dependencies: - docker-modem: "npm:^3.0.0" - tar-fs: "npm:~2.0.1" - checksum: 10/88cf73ff79678a7914580630eedc1b0b8b9973633da830438cc9e2f3d5715b92cf95658bab4b8c7d94e7bc09b3ecaee7a348001f0402caa9791d04065758bb46 - languageName: node - linkType: hard - -"dockerode@npm:^3.3.1": - version: 3.3.1 - resolution: "dockerode@npm:3.3.1" - dependencies: - docker-modem: "npm:^3.0.0" - tar-fs: "npm:~2.0.1" - checksum: 10/7bf4c06a2f63b6afaf8000355cca6c89f142a7dbb61a92efb8b0947adc277b9e85e642b9b8ee51d6c2a2d6d8d115088afb852c6055a22562eb39d9f40aabc874 - languageName: node - linkType: hard - -"doctrine@npm:1.5.0, doctrine@npm:^1.2.2": - version: 1.5.0 - resolution: "doctrine@npm:1.5.0" - dependencies: - esutils: "npm:^2.0.2" - isarray: "npm:^1.0.0" - checksum: 10/3ac7d891225f95292f9b9cfc1fe24e75e05ea53b08706298bbf4bf2451f8e1b9de25b1017f5dac23a8deeb8f3ba15fe2c1b454e78d1e97a0921af30aa6d5e753 - languageName: node - linkType: hard - -"doctrine@npm:^2.0.0, doctrine@npm:^2.1.0": - version: 2.1.0 - resolution: "doctrine@npm:2.1.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10/555684f77e791b17173ea86e2eea45ef26c22219cb64670669c4f4bebd26dbc95cd90ec1f4159e9349a6bb9eb892ce4dde8cd0139e77bedd8bf4518238618474 - languageName: node - linkType: hard - -"doctrine@npm:^3.0.0": - version: 3.0.0 - resolution: "doctrine@npm:3.0.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10/b4b28f1df5c563f7d876e7461254a4597b8cabe915abe94d7c5d1633fed263fcf9a85e8d3836591fc2d040108e822b0d32758e5ec1fe31c590dc7e08086e3e48 - languageName: node - linkType: hard - -"dom-accessibility-api@npm:^0.5.6, dom-accessibility-api@npm:^0.5.9": - version: 0.5.16 - resolution: "dom-accessibility-api@npm:0.5.16" - checksum: 10/377b4a7f9eae0a5d72e1068c369c99e0e4ca17fdfd5219f3abd32a73a590749a267475a59d7b03a891f9b673c27429133a818c44b2e47e32fec024b34274e2ca - languageName: node - linkType: hard - -"dom-converter@npm:^0.2.0": - version: 0.2.0 - resolution: "dom-converter@npm:0.2.0" - dependencies: - utila: "npm:~0.4" - checksum: 10/71b22f56bce6255a963694a72860a99f08763cf500f02ff38ce4c7489f95b07e7a0069f10b04c7d200e21375474abe01232833ca1600f104bdee7173e493a5b9 - languageName: node - linkType: hard - -"dom-helpers@npm:^5.0.1": - version: 5.2.1 - resolution: "dom-helpers@npm:5.2.1" - dependencies: - "@babel/runtime": "npm:^7.8.7" - csstype: "npm:^3.0.2" - checksum: 10/bed2341adf8864bf932b3289c24f35fdd99930af77df46688abf2d753ff291df49a15850c874d686d9be6ec4e1c6835673906e64dbd8b2839d227f117a11fd41 - languageName: node - linkType: hard - -"dom-serializer@npm:0": - version: 0.2.2 - resolution: "dom-serializer@npm:0.2.2" - dependencies: - domelementtype: "npm:^2.0.1" - entities: "npm:^2.0.0" - checksum: 10/376344893e4feccab649a14ca1a46473e9961f40fe62479ea692d4fee4d9df1c00ca8654811a79c1ca7b020096987e1ca4fb4d7f8bae32c1db800a680a0e5d5e - languageName: node - linkType: hard - -"dom-serializer@npm:^1.0.1": - version: 1.3.2 - resolution: "dom-serializer@npm:1.3.2" - dependencies: - domelementtype: "npm:^2.0.1" - domhandler: "npm:^4.2.0" - entities: "npm:^2.0.0" - checksum: 10/102ea83664e4943977a83a76b37a626b81491498d93b64f80cc45abc0e86cc0feec6fbaa98dba0750fd1005712a4449bc3de491a2032ba7befdfd18e42bcb349 - languageName: node - linkType: hard - -"dom-serializer@npm:^2.0.0": - version: 2.0.0 - resolution: "dom-serializer@npm:2.0.0" - dependencies: - domelementtype: "npm:^2.3.0" - domhandler: "npm:^5.0.2" - entities: "npm:^4.2.0" - checksum: 10/e3bf9027a64450bca0a72297ecdc1e3abb7a2912268a9f3f5d33a2e29c1e2c3502c6e9f860fc6625940bfe0cfb57a44953262b9e94df76872fdfb8151097eeb3 - languageName: node - linkType: hard - -"dom-walk@npm:^0.1.0": - version: 0.1.2 - resolution: "dom-walk@npm:0.1.2" - checksum: 10/19eb0ce9c6de39d5e231530685248545d9cd2bd97b2cb3486e0bfc0f2a393a9addddfd5557463a932b52fdfcf68ad2a619020cd2c74a5fe46fbecaa8e80872f3 - languageName: node - linkType: hard - -"domain-browser@npm:^4.19.0": - version: 4.22.0 - resolution: "domain-browser@npm:4.22.0" - checksum: 10/3ffbaf0cae8da717698d472ca85ab52f96c538fe1fe85e5eb3351d4e7af52423ce096b8a0c51bb318e1c9ccf9c2e94b3b0f68e5923ad0aa0c623a32b641ed11c - languageName: node - linkType: hard - -"domelementtype@npm:1": - version: 1.3.1 - resolution: "domelementtype@npm:1.3.1" - checksum: 10/7893da40218ae2106ec6ffc146b17f203487a52f5228b032ea7aa470e41dfe03e1bd762d0ee0139e792195efda765434b04b43cddcf63207b098f6ae44b36ad6 - languageName: node - linkType: hard - -"domelementtype@npm:^2.0.1, domelementtype@npm:^2.2.0": - version: 2.2.0 - resolution: "domelementtype@npm:2.2.0" - checksum: 10/24cb386198640cd58aa36f8c987f2ea61859929106d06ffcc8f547e70cb2ed82a6dc56dcb8252b21fba1f1ea07df6e4356d60bfe57f77114ca1aed6828362629 - languageName: node - linkType: hard - -"domelementtype@npm:^2.3.0": - version: 2.3.0 - resolution: "domelementtype@npm:2.3.0" - checksum: 10/ee837a318ff702622f383409d1f5b25dd1024b692ef64d3096ff702e26339f8e345820f29a68bcdcea8cfee3531776b3382651232fbeae95612d6f0a75efb4f6 - languageName: node - linkType: hard - -"domexception@npm:^2.0.1": - version: 2.0.1 - resolution: "domexception@npm:2.0.1" - dependencies: - webidl-conversions: "npm:^5.0.0" - checksum: 10/d638e9cb05c52999f1b2eb87c374b03311ea5b1d69c2f875bc92da73e17db60c12142b45c950228642ff7f845c536b65305483350d080df59003a653da80b691 - languageName: node - linkType: hard - -"domhandler@npm:^4.0.0, domhandler@npm:^4.2.0": - version: 4.3.0 - resolution: "domhandler@npm:4.3.0" - dependencies: - domelementtype: "npm:^2.2.0" - checksum: 10/9f158c0af1307176cbca5de9a18e4a514156710dd732de306efbe4b923b8ac8f49b61b19ff0db3dcc8969e865e5abcfcb281fe1f637926dc62125da8961a088a - languageName: node - linkType: hard - -"domhandler@npm:^4.3.1": - version: 4.3.1 - resolution: "domhandler@npm:4.3.1" - dependencies: - domelementtype: "npm:^2.2.0" - checksum: 10/e0d2af7403997a3ca040a9ace4a233b75ebe321e0ef628b417e46d619d65d47781b2f2038b6c2ef6e56e73e66aec99caf6a12c7e687ecff18ef74af6dfbde5de - languageName: node - linkType: hard - -"domhandler@npm:^5.0.1, domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": - version: 5.0.3 - resolution: "domhandler@npm:5.0.3" - dependencies: - domelementtype: "npm:^2.3.0" - checksum: 10/809b805a50a9c6884a29f38aec0a4e1b4537f40e1c861950ed47d10b049febe6b79ab72adaeeebb3cc8fc1cd33f34e97048a72a9265103426d93efafa78d3e96 - languageName: node - linkType: hard - -"domutils@npm:^1.7.0": - version: 1.7.0 - resolution: "domutils@npm:1.7.0" - dependencies: - dom-serializer: "npm:0" - domelementtype: "npm:1" - checksum: 10/8c1d879fd3bbfc0156c970d12ebdf530f541cbda895d7f631b2444d22bbb9d0e5a3a4c3210cffb17708ad67531d7d40e1bef95e915c53a218d268607b66b63c8 - languageName: node - linkType: hard - -"domutils@npm:^2.5.2, domutils@npm:^2.8.0": - version: 2.8.0 - resolution: "domutils@npm:2.8.0" - dependencies: - dom-serializer: "npm:^1.0.1" - domelementtype: "npm:^2.2.0" - domhandler: "npm:^4.2.0" - checksum: 10/1f316a03f00b09a8893d4a25d297d5cbffd02c564509dede28ef72d5ce38d93f6d61f1de88d439f31b14a1d9b42f587ed711b9e8b1b4d3bf6001399832bfc4e0 - languageName: node - linkType: hard - -"domutils@npm:^3.0.1": - version: 3.0.1 - resolution: "domutils@npm:3.0.1" - dependencies: - dom-serializer: "npm:^2.0.0" - domelementtype: "npm:^2.3.0" - domhandler: "npm:^5.0.1" - checksum: 10/c0031e4bf89bf701c552c6aa7937262351ae863d5bb0395ebae9cdb23eb3de0077343ca0ddfa63861d98c31c02bbabe4c6e0e11be87b04a090a4d5dbb75197dc - languageName: node - linkType: hard - -"dot-case@npm:^2.1.0": - version: 2.1.1 - resolution: "dot-case@npm:2.1.1" - dependencies: - no-case: "npm:^2.2.0" - checksum: 10/5c9d937245ff810a7ae788602e40c62e38cb515146ddf9b11c7f60cb02aae84859588761f1e8769d9e713609fae3c78dc99c8da9e0ee8e4d8b5c09a2fdf70328 - languageName: node - linkType: hard - -"dot-case@npm:^3.0.4": - version: 3.0.4 - resolution: "dot-case@npm:3.0.4" - dependencies: - no-case: "npm:^3.0.4" - tslib: "npm:^2.0.3" - checksum: 10/a65e3519414856df0228b9f645332f974f2bf5433370f544a681122eab59e66038fc3349b4be1cdc47152779dac71a5864f1ccda2f745e767c46e9c6543b1169 - languageName: node - linkType: hard - -"dot-prop@npm:^5.1.0, dot-prop@npm:^5.2.0": - version: 5.3.0 - resolution: "dot-prop@npm:5.3.0" - dependencies: - is-obj: "npm:^2.0.0" - checksum: 10/33b2561617bd5c73cf9305368ba4638871c5dbf9c8100c8335acd2e2d590a81ec0e75c11cfaea5cc3cf8c2f668cad4beddb52c11856d0c9e666348eee1baf57a - languageName: node - linkType: hard - -"dot-prop@npm:^6.0.1": - version: 6.0.1 - resolution: "dot-prop@npm:6.0.1" - dependencies: - is-obj: "npm:^2.0.0" - checksum: 10/1200a4f6f81151161b8526c37966d60738cf12619b0ed1f55be01bdb55790bf0a5cd1398b8f2c296dcc07d0a7c2dd0e650baf0b069c367e74bb5df2f6603aba0 - languageName: node - linkType: hard - -"dotenv-expand@npm:^5.1.0": - version: 5.1.0 - resolution: "dotenv-expand@npm:5.1.0" - checksum: 10/d52af2a6e4642979ae4221408f1b75102508dbe4f5bac1c0613f92a3cf3880d5c31f86b2f5cff3273f7c23e10421e75028546e8b6cd0376fcd20e3803b374e15 - languageName: node - linkType: hard - -"dotenv@npm:16.0.0": - version: 16.0.0 - resolution: "dotenv@npm:16.0.0" - checksum: 10/f69609f6e2833e604024d2086a1df871fb37f65f404e3daa7463666183207215d8d71fe5c441e0cf2dff96af8e65e632a421067b66f50a7d8d77ab2d5eeaaff2 - languageName: node - linkType: hard - -"dotenv@npm:16.0.1": - version: 16.0.1 - resolution: "dotenv@npm:16.0.1" - checksum: 10/4b530b0cc1ecfbff93ce4641fb7bbcd5731a54c3acfbdbd00283073ec3f0cbff8e93946a68eaa6fa8ece33d442555e6a61a01da8fffb553d20838ba079bf1a20 - languageName: node - linkType: hard - -"dotenv@npm:16.0.3": - version: 16.0.3 - resolution: "dotenv@npm:16.0.3" - checksum: 10/d6788c8e40b35ad9a9ca29249dccf37fa6b3ad26700fcbc87f2f41101bf914f5193a04e36a3d23de70b1dcb8e5d5a3b21e151debace2c4cd08d868be500a1b29 - languageName: node - linkType: hard - -"dotenv@npm:16.3.1": - version: 16.3.1 - resolution: "dotenv@npm:16.3.1" - checksum: 10/dbb778237ef8750e9e3cd1473d3c8eaa9cc3600e33a75c0e36415d0fa0848197f56c3800f77924c70e7828f0b03896818cd52f785b07b9ad4d88dba73fbba83f - languageName: node - linkType: hard - -"dotenv@npm:8.6.0": - version: 8.6.0 - resolution: "dotenv@npm:8.6.0" - checksum: 10/31d7b5c010cebb80046ba6853d703f9573369b00b15129536494f04b0af4ea0060ce8646e3af58b455af2f6f1237879dd261a5831656410ec92561ae1ea44508 - languageName: node - linkType: hard - -"dotenv@npm:^10.0.0": - version: 10.0.0 - resolution: "dotenv@npm:10.0.0" - checksum: 10/55f701ae213e3afe3f4232fae5edfb6e0c49f061a363ff9f1c5a0c2bf3fb990a6e49aeada11b2a116efb5fdc3bc3f1ef55ab330be43033410b267f7c0809a9dc - languageName: node - linkType: hard - -"dotenv@npm:^16.4.5": - version: 16.4.5 - resolution: "dotenv@npm:16.4.5" - checksum: 10/55a3134601115194ae0f924e54473459ed0d9fc340ae610b676e248cca45aa7c680d86365318ea964e6da4e2ea80c4514c1adab5adb43d6867fb57ff068f95c8 - languageName: node - linkType: hard - -"dotignore@npm:^0.1.2": - version: 0.1.2 - resolution: "dotignore@npm:0.1.2" - dependencies: - minimatch: "npm:^3.0.4" - bin: - ignored: bin/ignored - checksum: 10/06bab15e2a2400c6f823a0edbcd73661180f6245a4041a3fe3b9fde4b22ae74b896604df4520a877093f05c656bd080087376c9f605bccdea847664c59910f37 - languageName: node - linkType: hard - -"double-ended-queue@npm:2.1.0-0": - version: 2.1.0-0 - resolution: "double-ended-queue@npm:2.1.0-0" - checksum: 10/873661712790b1e1b7f598255cc6fa272f080ddfa74ea916277d96ef1a9bc02bf236103f493384593b39b9433c6831a1e6b2b27f5149cc610765da7b16b0db0e - languageName: node - linkType: hard - -"ds-test@https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0": - version: 1.0.0 - resolution: "ds-test@https://github.com/dapphub/ds-test.git#commit=e282159d5170298eb2455a6c05280ab5a73a4ef0" - checksum: 10/a63cada107d8f2775934bc580f04cb6f6509f843cb41cbc3a617e77b2e628a86d7fd858f964e7e2d6f41c3797c0e16ec2d87a6cb4c6187c5b6c2bc969ccae4b3 - languageName: node - linkType: hard - -"duplexer3@npm:^0.1.4": - version: 0.1.5 - resolution: "duplexer3@npm:0.1.5" - checksum: 10/e677cb4c48f031ca728601d6a20bf6aed4c629d69ef9643cb89c67583d673c4ec9317cc6427501f38bd8c368d3a18f173987cc02bd99d8cf8fe3d94259a22a20 - languageName: node - linkType: hard - -"duplexer@npm:^0.1.1, duplexer@npm:^0.1.2": - version: 0.1.2 - resolution: "duplexer@npm:0.1.2" - checksum: 10/62ba61a830c56801db28ff6305c7d289b6dc9f859054e8c982abd8ee0b0a14d2e9a8e7d086ffee12e868d43e2bbe8a964be55ddbd8c8957714c87373c7a4f9b0 - languageName: node - linkType: hard - -"duplexify@npm:^4.0.0": - version: 4.1.2 - resolution: "duplexify@npm:4.1.2" - dependencies: - end-of-stream: "npm:^1.4.1" - inherits: "npm:^2.0.3" - readable-stream: "npm:^3.1.1" - stream-shift: "npm:^1.0.0" - checksum: 10/eeb4f362defa4da0b2474d853bc4edfa446faeb1bde76819a68035632c118de91f6a58e6fe05c84f6e6de2548f8323ec8473aa9fe37332c99e4d77539747193e - languageName: node - linkType: hard - -"duration@npm:^0.2.1": - version: 0.2.2 - resolution: "duration@npm:0.2.2" - dependencies: - d: "npm:1" - es5-ext: "npm:~0.10.46" - checksum: 10/823c7d1d06c5126346147e5271ddce1c1bd186c110beaac3d18f22a83a1725d4a66c29bbefe1a550cd49a093727978a01708628c2f0d479eb2abd9e0afb77554 - languageName: node - linkType: hard - -"eastasianwidth@npm:^0.2.0": - version: 0.2.0 - resolution: "eastasianwidth@npm:0.2.0" - checksum: 10/9b1d3e1baefeaf7d70799db8774149cef33b97183a6addceeba0cf6b85ba23ee2686f302f14482006df32df75d32b17c509c143a3689627929e4a8efaf483952 - languageName: node - linkType: hard - -"easy-table@npm:1.1.0": - version: 1.1.0 - resolution: "easy-table@npm:1.1.0" - dependencies: - wcwidth: "npm:>=1.0.1" - dependenciesMeta: - wcwidth: - optional: true - checksum: 10/f01fde1162c41ad770e0067c6a732d9bad9edf542d79306ed08509e4f829dd9b18e98b7e25b065ea7e5e5de67f4ff3a4331e3f8c384b17b82c4869b58bb81307 - languageName: node - linkType: hard - -"ecc-jsbn@npm:~0.1.1": - version: 0.1.2 - resolution: "ecc-jsbn@npm:0.1.2" - dependencies: - jsbn: "npm:~0.1.0" - safer-buffer: "npm:^2.1.0" - checksum: 10/d43591f2396196266e186e6d6928038cc11c76c3699a912cb9c13757060f7bbc7f17f47c4cb16168cdeacffc7965aef021142577e646fb3cb88810c15173eb57 - languageName: node - linkType: hard - -"ecdsa-sig-formatter@npm:1.0.11, ecdsa-sig-formatter@npm:^1.0.11": - version: 1.0.11 - resolution: "ecdsa-sig-formatter@npm:1.0.11" - dependencies: - safe-buffer: "npm:^5.0.1" - checksum: 10/878e1aab8a42773320bc04c6de420bee21aebd71810e40b1799880a8a1c4594bcd6adc3d4213a0fb8147d4c3f529d8f9a618d7f59ad5a9a41b142058aceda23f - languageName: node - linkType: hard - -"ee-first@npm:1.1.1": - version: 1.1.1 - resolution: "ee-first@npm:1.1.1" - checksum: 10/1b4cac778d64ce3b582a7e26b218afe07e207a0f9bfe13cc7395a6d307849cfe361e65033c3251e00c27dd060cab43014c2d6b2647676135e18b77d2d05b3f4f - languageName: node - linkType: hard - -"ejs@npm:3.1.8": - version: 3.1.8 - resolution: "ejs@npm:3.1.8" - dependencies: - jake: "npm:^10.8.5" - bin: - ejs: bin/cli.js - checksum: 10/879f84c8ee56d06dea7b47a8b493e1b398dba578ec7a701660cf77c8a6d565b932c5896639d1dc4a3be29204eccdb70ee4e1bdf634647c2490227f727d5d6a3d - languageName: node - linkType: hard - -"ejs@npm:^3.1.6": - version: 3.1.9 - resolution: "ejs@npm:3.1.9" - dependencies: - jake: "npm:^10.8.5" - bin: - ejs: bin/cli.js - checksum: 10/71f56d37540d2c2d71701f0116710c676f75314a3e997ef8b83515d5d4d2b111c5a72725377caeecb928671bacb84a0d38135f345904812e989847057d59f21a - languageName: node - linkType: hard - -"electron-fetch@npm:^1.7.2": - version: 1.7.4 - resolution: "electron-fetch@npm:1.7.4" - dependencies: - encoding: "npm:^0.1.13" - checksum: 10/194823297aedc30cc4d4e653110b7e21d4db3a543ae846a1405318a04b34eb1471eed112eacfaef183c7f47ce89389dea73c6b6122fa2ea8b7f12329773f2e9c - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.118": - version: 1.4.137 - resolution: "electron-to-chromium@npm:1.4.137" - checksum: 10/3e0bbd1faaa654efcc13214245cbee8c51178e8c4f3bfdb1a458bc933fe2d3794b9992c627f73f5fbf131f9f0268ba8dfbba1198efbfc868821fa071fbc17d57 - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.284": - version: 1.4.351 - resolution: "electron-to-chromium@npm:1.4.351" - checksum: 10/24e83251330f3a14f7e58c1272da8f4337e9ebbc818fbaa1ef543ad6550d1bbf48a2fc3c0caa8a7cb8f6778b832ec40091f15b924cdba1d442e7d9f351ae7abd - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.431": - version: 1.4.447 - resolution: "electron-to-chromium@npm:1.4.447" - checksum: 10/96930b29c58f1ba5db97c1537a8dd84eecc4040f612a47c96b92d0981decd74a9588d0ca5a27e4a4bdf18b34db1f11ea18d5ecf44484ae14e9f7d20682eaa0ab - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.477": - version: 1.4.513 - resolution: "electron-to-chromium@npm:1.4.513" - checksum: 10/13f79eb6fbe18feba45e79283f119d098d58f08774e881ed9f41ac0d0b161457da08717c8705a0bf694147876331bfd0a0e0f49c5ffd6ab0303aa4cf70aa7188 - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.535": - version: 1.4.556 - resolution: "electron-to-chromium@npm:1.4.556" - checksum: 10/b5edf73fa95d5a9d2dceb66c77e5893656d2af938065416dc7d3d5dbb91d6e661a314d069d10cdc4f78adbb8c74eea1a0d6d9012c36415d4418046c6f407cbef - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.601": - version: 1.4.640 - resolution: "electron-to-chromium@npm:1.4.640" - checksum: 10/75cfe02be2e2b0c7f53e8d97e9d3cd0d8959a4e861f7bf944abace94f9872b9e31128ca3140f657b8b886b919d46f7af03efaf0d8bd8b9a4b48e3212fdd2ec01 - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.820": - version: 1.4.827 - resolution: "electron-to-chromium@npm:1.4.827" - checksum: 10/7fa44aeebc5548874d33e417579d998d8e9a3d7b07fae22429ee7de5866c73b3158d56969146df3dcf44a222dcd91972ee786d0427f461e0c98bff79e408e782 - languageName: node - linkType: hard - -"elliptic@npm:>=6.5.7": - version: 6.5.7 - resolution: "elliptic@npm:6.5.7" - dependencies: - bn.js: "npm:^4.11.9" - brorand: "npm:^1.1.0" - hash.js: "npm:^1.0.0" - hmac-drbg: "npm:^1.0.1" - inherits: "npm:^2.0.4" - minimalistic-assert: "npm:^1.0.1" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10/fbad1fad0a5cc07df83f80cc1f7a784247ef59075194d3e340eaeb2f4dd594825ee24c7e9b0cf279c9f1982efe610503bb3139737926428c4821d4fca1bcf348 - languageName: node - linkType: hard - -"emittery@npm:0.10.0": - version: 0.10.0 - resolution: "emittery@npm:0.10.0" - checksum: 10/bc94df362052f0c3ea50e764e2b754c94647867af9eff7cc617a2b3b566b90fea588f264cfc86eb3dd1460f3fe7e6cf62cb72d38bd32038786bff014d8eeb248 - languageName: node - linkType: hard - -"emittery@npm:^0.10.1, emittery@npm:^0.10.2": - version: 0.10.2 - resolution: "emittery@npm:0.10.2" - checksum: 10/fa86fc2b1f4c792d7d479a4de1a6a1f74b0b597770bae770336f0be6501e64be0995aa07d284ae502b269f5cec960cd0c44c91dd090d06d8deecee6d9787e396 - languageName: node - linkType: hard - -"emittery@npm:^0.13.1": - version: 0.13.1 - resolution: "emittery@npm:0.13.1" - checksum: 10/fbe214171d878b924eedf1757badf58a5dce071cd1fa7f620fa841a0901a80d6da47ff05929d53163105e621ce11a71b9d8acb1148ffe1745e045145f6e69521 - languageName: node - linkType: hard - -"emittery@npm:^0.4.1": - version: 0.4.1 - resolution: "emittery@npm:0.4.1" - checksum: 10/2f74fbea08224e0036e51334376a42597e34a59a5f1261542029d10bb4f33ecd3cf303e5fab9814403e098cd6ed8a7e927377e51f10abc0386d9a5c07bd1c285 - languageName: node - linkType: hard - -"emittery@npm:^0.8.1": - version: 0.8.1 - resolution: "emittery@npm:0.8.1" - checksum: 10/3b882c0bdc3121b4e92b85315f87da0db8e965766d6c7ff70a8f45e0c38ed49d561936650afa32759d8fb320a458bc9e12631799a0a276e9e8a960ae16c1f6f1 - languageName: node - linkType: hard - -"emoji-regex@npm:^10.3.0": - version: 10.3.0 - resolution: "emoji-regex@npm:10.3.0" - checksum: 10/b9b084ebe904f13bb4b66ee4c29fb41a7a4a1165adcc33c1ce8056c0194b882cc91ebdc782f1a779b5d7ea7375c5064643a7734893d7c657b44c5c6b9d7bf1e7 - languageName: node - linkType: hard - -"emoji-regex@npm:^7.0.1": - version: 7.0.3 - resolution: "emoji-regex@npm:7.0.3" - checksum: 10/9159b2228b1511f2870ac5920f394c7e041715429a68459ebe531601555f11ea782a8e1718f969df2711d38c66268174407cbca57ce36485544f695c2dfdc96e - languageName: node - linkType: hard - -"emoji-regex@npm:^8.0.0": - version: 8.0.0 - resolution: "emoji-regex@npm:8.0.0" - checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 - languageName: node - linkType: hard - -"emoji-regex@npm:^9.2.2": - version: 9.2.2 - resolution: "emoji-regex@npm:9.2.2" - checksum: 10/915acf859cea7131dac1b2b5c9c8e35c4849e325a1d114c30adb8cd615970f6dca0e27f64f3a4949d7d6ed86ecd79a1c5c63f02e697513cddd7b5835c90948b8 - languageName: node - linkType: hard - -"emojis-list@npm:^3.0.0": - version: 3.0.0 - resolution: "emojis-list@npm:3.0.0" - checksum: 10/114f47d6d45612621497d2b1556c8f142c35332a591780a54e863e42d281e72d6c7d7c419f2e419319d4eb7f6ebf1db82d9744905d90f275db20d06a763b5e19 - languageName: node - linkType: hard - -"enabled@npm:2.0.x": - version: 2.0.0 - resolution: "enabled@npm:2.0.0" - checksum: 10/9d256d89f4e8a46ff988c6a79b22fa814b4ffd82826c4fdacd9b42e9b9465709d3b748866d0ab4d442dfc6002d81de7f7b384146ccd1681f6a7f868d2acca063 - languageName: node - linkType: hard - -"encodeurl@npm:~1.0.2": - version: 1.0.2 - resolution: "encodeurl@npm:1.0.2" - checksum: 10/e50e3d508cdd9c4565ba72d2012e65038e5d71bdc9198cb125beb6237b5b1ade6c0d343998da9e170fb2eae52c1bed37d4d6d98a46ea423a0cddbed5ac3f780c - languageName: node - linkType: hard - -"encodeurl@npm:~2.0.0": - version: 2.0.0 - resolution: "encodeurl@npm:2.0.0" - checksum: 10/abf5cd51b78082cf8af7be6785813c33b6df2068ce5191a40ca8b1afe6a86f9230af9a9ce694a5ce4665955e5c1120871826df9c128a642e09c58d592e2807fe - languageName: node - linkType: hard - -"encoding-down@npm:^6.3.0": - version: 6.3.0 - resolution: "encoding-down@npm:6.3.0" - dependencies: - abstract-leveldown: "npm:^6.2.1" - inherits: "npm:^2.0.3" - level-codec: "npm:^9.0.0" - level-errors: "npm:^2.0.0" - checksum: 10/903af3c76264e3fe0838e7a721954a450e848c301dd3c8ee3dd81d8ed429edca3c8a787f3e19d17ecbe5410cae480913644bfcb0ac9444b74d3a5565e341f21d - languageName: node - linkType: hard - -"encoding-down@npm:~5.0.0": - version: 5.0.4 - resolution: "encoding-down@npm:5.0.4" - dependencies: - abstract-leveldown: "npm:^5.0.0" - inherits: "npm:^2.0.3" - level-codec: "npm:^9.0.0" - level-errors: "npm:^2.0.0" - xtend: "npm:^4.0.1" - checksum: 10/aed668bb68e0db1f93979eb784f88d2350b268b1d4e2096a3421e4d0a4232fa928ff1af8b0131d4553f6189254bc9668053dc5e5d00b7230b5590e9e2c5bba22 - languageName: node - linkType: hard - -"encoding@npm:^0.1.12, encoding@npm:^0.1.13": - version: 0.1.13 - resolution: "encoding@npm:0.1.13" - dependencies: - iconv-lite: "npm:^0.6.2" - checksum: 10/bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f - languageName: node - linkType: hard - -"end-of-stream@npm:^1.0.0, end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1": - version: 1.4.4 - resolution: "end-of-stream@npm:1.4.4" - dependencies: - once: "npm:^1.4.0" - checksum: 10/530a5a5a1e517e962854a31693dbb5c0b2fc40b46dad2a56a2deec656ca040631124f4795823acc68238147805f8b021abbe221f4afed5ef3c8e8efc2024908b - languageName: node - linkType: hard - -"end-stream@npm:~0.1.0": - version: 0.1.0 - resolution: "end-stream@npm:0.1.0" - dependencies: - write-stream: "npm:~0.4.3" - checksum: 10/c866e3b4577ff52fc2aa4cf11ddfbaee3433974b4ec6f4b274991294d7cc439ee7a345e9f82f2354d6bc352221f0cedc8c3b422ae317d4851546a7b8be2edf99 - languageName: node - linkType: hard - -"engine.io-client@npm:~6.2.3": - version: 6.2.3 - resolution: "engine.io-client@npm:6.2.3" - dependencies: - "@socket.io/component-emitter": "npm:~3.1.0" - debug: "npm:~4.3.1" - engine.io-parser: "npm:~5.0.3" - ws: "npm:~8.2.3" - xmlhttprequest-ssl: "npm:~2.0.0" - checksum: 10/0bf8b74a185cab929fbe7ffbce9927c42a599d527ee00123469be655a78d3c3af63b9cd138622169a1ed56bc77f95dd1eaa3b31dc17168d4059d7e19554bd8c8 - languageName: node - linkType: hard - -"engine.io-parser@npm:~5.0.3": - version: 5.0.3 - resolution: "engine.io-parser@npm:5.0.3" - dependencies: - "@socket.io/base64-arraybuffer": "npm:~1.0.2" - checksum: 10/2d20b041378d612c0038a71a323d2baa26c594cbee1c2d0f7f0fb737f5273e8a8ec46348bdb5c9c613e3451a48dc9e36a2dba206865239f082fed3404b6d1da4 - languageName: node - linkType: hard - -"engine.io-parser@npm:~5.2.1": - version: 5.2.1 - resolution: "engine.io-parser@npm:5.2.1" - checksum: 10/31f16fd1d64d6c3997f910606a0a8b143a86da98b06346ba7970e9bdf25cc8485caf69b4939dc5a829b312c7db5dbbdcc1fe3787b105bcc175e61b9d37a7e687 - languageName: node - linkType: hard - -"engine.io@npm:>=6.4.2": - version: 6.5.3 - resolution: "engine.io@npm:6.5.3" - dependencies: - "@types/cookie": "npm:^0.4.1" - "@types/cors": "npm:^2.8.12" - "@types/node": "npm:>=10.0.0" - accepts: "npm:~1.3.4" - base64id: "npm:2.0.0" - cookie: "npm:~0.4.1" - cors: "npm:~2.8.5" - debug: "npm:~4.3.1" - engine.io-parser: "npm:~5.2.1" - ws: "npm:~8.11.0" - checksum: 10/50e022f94d6417be00d0ab4b70b57fe6b0f597a73c7fdf7e2b7570e0ce65d3e94caadebca759155fdf66a6812159b068afb88fd56655d5fa71d43933c9985c81 - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.0.0": - version: 5.12.0 - resolution: "enhanced-resolve@npm:5.12.0" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10/ea5b49a0641827c6a083eaa3a625f953f4bd4e8f015bf70b9fb8cf60a35aaeb44e567df2da91ed28efaea3882845016e1d22a3152c2fdf773ea14f39cbe3d8a9 - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.14.1": - version: 5.17.0 - resolution: "enhanced-resolve@npm:5.17.0" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10/8f7bf71537d78e7d20a27363793f2c9e13ec44800c7c7830364a448f80a44994aa19d64beecefa1ab49e4de6f7fbe18cc0931dc449c115f02918ff5fcbe7705f - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.15.0": - version: 5.15.0 - resolution: "enhanced-resolve@npm:5.15.0" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10/180c3f2706f9117bf4dc7982e1df811dad83a8db075723f299245ef4488e0cad7e96859c5f0e410682d28a4ecd4da021ec7d06265f7e4eb6eed30c69ca5f7d3e - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.17.1": - version: 5.17.1 - resolution: "enhanced-resolve@npm:5.17.1" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10/e8e03cb7a4bf3c0250a89afbd29e5ec20e90ba5fcd026066232a0754864d7d0a393fa6fc0e5379314a6529165a1834b36731147080714459d98924520410d8f5 - languageName: node - linkType: hard - -"enquirer@npm:2.3.6, enquirer@npm:^2.3.0, enquirer@npm:^2.3.6": - version: 2.3.6 - resolution: "enquirer@npm:2.3.6" - dependencies: - ansi-colors: "npm:^4.1.1" - checksum: 10/751d14f037eb7683997e696fb8d5fe2675e0b0cde91182c128cf598acf3f5bd9005f35f7c2a9109e291140af496ebec237b6dac86067d59a9b44f3688107f426 - languageName: node - linkType: hard - -"entities@npm:^2.0.0": - version: 2.2.0 - resolution: "entities@npm:2.2.0" - checksum: 10/2c765221ee324dbe25e1b8ca5d1bf2a4d39e750548f2e85cbf7ca1d167d709689ddf1796623e66666ae747364c11ed512c03b48c5bbe70968d30f2a4009509b7 - languageName: node - linkType: hard - -"entities@npm:^4.2.0, entities@npm:^4.3.0, entities@npm:^4.4.0": - version: 4.4.0 - resolution: "entities@npm:4.4.0" - checksum: 10/b627cb900e901cc7817037b83bf993a1cbf6a64850540f7526af7bcf9c7d09ebc671198e6182cfae4680f733799e2852e6a1c46aa62ff36eb99680057a038df5 - languageName: node - linkType: hard - -"env-paths@npm:^2.2.0, env-paths@npm:^2.2.1": - version: 2.2.1 - resolution: "env-paths@npm:2.2.1" - checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e - languageName: node - linkType: hard - -"env-paths@npm:^3.0.0": - version: 3.0.0 - resolution: "env-paths@npm:3.0.0" - checksum: 10/b2b0a0d0d9931a13d279c22ed94d78648a1cc5f408f05d47ff3e0c1616f0aa0c38fb33deec5e5be50497225d500607d57f9c8652c4d39c2f2b7608cd45768128 - languageName: node - linkType: hard - -"envinfo@npm:^7.7.3": - version: 7.8.1 - resolution: "envinfo@npm:7.8.1" - bin: - envinfo: dist/cli.js - checksum: 10/e7a2d71c7dfe398a4ffda0e844e242d2183ef2627f98e74e4cd71edd2af691c8707a2b34aacef92538c27b3daf9a360d32202f33c0a9f27f767c4e1c6ba8b522 - languageName: node - linkType: hard - -"eol@npm:^0.9.1": - version: 0.9.1 - resolution: "eol@npm:0.9.1" - checksum: 10/9d3fd93bb2bb5c69c7fe8dfb97b62213ed95857a2e90f5db3110415993e8a989d87fb011755ce22fdb92ca36fbe4e111b395a6f4ce00b9b51d3f00f19c2acf52 - languageName: node - linkType: hard - -"err-code@npm:^2.0.2": - version: 2.0.3 - resolution: "err-code@npm:2.0.3" - checksum: 10/1d20d825cdcce8d811bfbe86340f4755c02655a7feb2f13f8c880566d9d72a3f6c92c192a6867632e490d6da67b678271f46e01044996a6443e870331100dfdd - languageName: node - linkType: hard - -"err-code@npm:^3.0.1": - version: 3.0.1 - resolution: "err-code@npm:3.0.1" - checksum: 10/37af52bc46cde34b2979a5503dbf348aeae84c8ed122731d2c228250a6fd3cfe979aa07fd53f2b368dc3f8ecaf35f5d7d45ef98ff752f08bc7c6c6917c40d44c - languageName: node - linkType: hard - -"errno@npm:^0.1.1, errno@npm:~0.1.1": - version: 0.1.8 - resolution: "errno@npm:0.1.8" - dependencies: - prr: "npm:~1.0.1" - bin: - errno: cli.js - checksum: 10/93076ed11bedb8f0389cbefcbdd3445f66443159439dccbaac89a053428ad92147676736235d275612dc0296d3f9a7e6b7177ed78a566b6cd15dacd4fa0d5888 - languageName: node - linkType: hard - -"error-ex@npm:^1.2.0, error-ex@npm:^1.3.1, error-ex@npm:^1.3.2": - version: 1.3.2 - resolution: "error-ex@npm:1.3.2" - dependencies: - is-arrayish: "npm:^0.2.1" - checksum: 10/d547740aa29c34e753fb6fed2c5de81802438529c12b3673bd37b6bb1fe49b9b7abdc3c11e6062fe625d8a296b3cf769a80f878865e25e685f787763eede3ffb - languageName: node - linkType: hard - -"error-stack-parser@npm:^2.0.6": - version: 2.1.4 - resolution: "error-stack-parser@npm:2.1.4" - dependencies: - stackframe: "npm:^1.3.4" - checksum: 10/23db33135bfc6ba701e5eee45e1bb9bd2fe33c5d4f9927440d9a499c7ac538f91f455fcd878611361269893c56734419252c40d8105eb3b023cf8b0fc2ebb64e - languageName: node - linkType: hard - -"es-abstract@npm:^1.17.2, es-abstract@npm:^1.22.1": - version: 1.22.1 - resolution: "es-abstract@npm:1.22.1" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - arraybuffer.prototype.slice: "npm:^1.0.1" - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - es-set-tostringtag: "npm:^2.0.1" - es-to-primitive: "npm:^1.2.1" - function.prototype.name: "npm:^1.1.5" - get-intrinsic: "npm:^1.2.1" - get-symbol-description: "npm:^1.0.0" - globalthis: "npm:^1.0.3" - gopd: "npm:^1.0.1" - has: "npm:^1.0.3" - has-property-descriptors: "npm:^1.0.0" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.5" - is-array-buffer: "npm:^3.0.2" - is-callable: "npm:^1.2.7" - is-negative-zero: "npm:^2.0.2" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - is-string: "npm:^1.0.7" - is-typed-array: "npm:^1.1.10" - is-weakref: "npm:^1.0.2" - object-inspect: "npm:^1.12.3" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.5.0" - safe-array-concat: "npm:^1.0.0" - safe-regex-test: "npm:^1.0.0" - string.prototype.trim: "npm:^1.2.7" - string.prototype.trimend: "npm:^1.0.6" - string.prototype.trimstart: "npm:^1.0.6" - typed-array-buffer: "npm:^1.0.0" - typed-array-byte-length: "npm:^1.0.0" - typed-array-byte-offset: "npm:^1.0.0" - typed-array-length: "npm:^1.0.4" - unbox-primitive: "npm:^1.0.2" - which-typed-array: "npm:^1.1.10" - checksum: 10/bd6c243a128ea1cb97cdd11c433a1f712b607b66bb2d40b42e4a4e4c746e679d3c168b59614fefed4bc3b0d7abc106ad202e8f417739371a151b9189d75af72a - languageName: node - linkType: hard - -"es-abstract@npm:^1.18.5, es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1": - version: 1.19.1 - resolution: "es-abstract@npm:1.19.1" - dependencies: - call-bind: "npm:^1.0.2" - es-to-primitive: "npm:^1.2.1" - function-bind: "npm:^1.1.1" - get-intrinsic: "npm:^1.1.1" - get-symbol-description: "npm:^1.0.0" - has: "npm:^1.0.3" - has-symbols: "npm:^1.0.2" - internal-slot: "npm:^1.0.3" - is-callable: "npm:^1.2.4" - is-negative-zero: "npm:^2.0.1" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.1" - is-string: "npm:^1.0.7" - is-weakref: "npm:^1.0.1" - object-inspect: "npm:^1.11.0" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.2" - string.prototype.trimend: "npm:^1.0.4" - string.prototype.trimstart: "npm:^1.0.4" - unbox-primitive: "npm:^1.0.1" - checksum: 10/39d31c7dea477bd0fc89404e4beb3b008832e8c56426a448e5c44577929063037824130ea12f6273012b6d744b49c0ba11d7696fc8eb55731f2444d86a8a8e14 - languageName: node - linkType: hard - -"es-abstract@npm:^1.20.4, es-abstract@npm:^1.21.2": - version: 1.21.2 - resolution: "es-abstract@npm:1.21.2" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - es-set-tostringtag: "npm:^2.0.1" - es-to-primitive: "npm:^1.2.1" - function.prototype.name: "npm:^1.1.5" - get-intrinsic: "npm:^1.2.0" - get-symbol-description: "npm:^1.0.0" - globalthis: "npm:^1.0.3" - gopd: "npm:^1.0.1" - has: "npm:^1.0.3" - has-property-descriptors: "npm:^1.0.0" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.5" - is-array-buffer: "npm:^3.0.2" - is-callable: "npm:^1.2.7" - is-negative-zero: "npm:^2.0.2" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - is-string: "npm:^1.0.7" - is-typed-array: "npm:^1.1.10" - is-weakref: "npm:^1.0.2" - object-inspect: "npm:^1.12.3" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.4.3" - safe-regex-test: "npm:^1.0.0" - string.prototype.trim: "npm:^1.2.7" - string.prototype.trimend: "npm:^1.0.6" - string.prototype.trimstart: "npm:^1.0.6" - typed-array-length: "npm:^1.0.4" - unbox-primitive: "npm:^1.0.2" - which-typed-array: "npm:^1.1.9" - checksum: 10/2e1d6922c9a03d90f5a45fa56574a14f9436d9711ed424ace23ae87f79d0190dbffda1c0564980f6048dc2348f0390427a1fbae309fdb16a9ed42cd5c79dce6e - languageName: node - linkType: hard - -"es-abstract@npm:^1.22.3": - version: 1.22.5 - resolution: "es-abstract@npm:1.22.5" - dependencies: - array-buffer-byte-length: "npm:^1.0.1" - arraybuffer.prototype.slice: "npm:^1.0.3" - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.7" - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - es-set-tostringtag: "npm:^2.0.3" - es-to-primitive: "npm:^1.2.1" - function.prototype.name: "npm:^1.1.6" - get-intrinsic: "npm:^1.2.4" - get-symbol-description: "npm:^1.0.2" - globalthis: "npm:^1.0.3" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - hasown: "npm:^2.0.1" - internal-slot: "npm:^1.0.7" - is-array-buffer: "npm:^3.0.4" - is-callable: "npm:^1.2.7" - is-negative-zero: "npm:^2.0.3" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.3" - is-string: "npm:^1.0.7" - is-typed-array: "npm:^1.1.13" - is-weakref: "npm:^1.0.2" - object-inspect: "npm:^1.13.1" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.5" - regexp.prototype.flags: "npm:^1.5.2" - safe-array-concat: "npm:^1.1.0" - safe-regex-test: "npm:^1.0.3" - string.prototype.trim: "npm:^1.2.8" - string.prototype.trimend: "npm:^1.0.7" - string.prototype.trimstart: "npm:^1.0.7" - typed-array-buffer: "npm:^1.0.2" - typed-array-byte-length: "npm:^1.0.1" - typed-array-byte-offset: "npm:^1.0.2" - typed-array-length: "npm:^1.0.5" - unbox-primitive: "npm:^1.0.2" - which-typed-array: "npm:^1.1.14" - checksum: 10/33bba7be636a6c56d836bb7d8860d2082deb02903c906cf31a93840302ac42c731b6d4f6393c1d112fa46c8778b2c1282e7833d206fe5e88e803dab1c8afefed - languageName: node - linkType: hard - -"es-array-method-boxes-properly@npm:^1.0.0": - version: 1.0.0 - resolution: "es-array-method-boxes-properly@npm:1.0.0" - checksum: 10/27a8a21acf20f3f51f69dce8e643f151e380bffe569e95dc933b9ded9fcd89a765ee21b5229c93f9206c93f87395c6b75f80be8ac8c08a7ceb8771e1822ff1fb - languageName: node - linkType: hard - -"es-define-property@npm:^1.0.0": - version: 1.0.0 - resolution: "es-define-property@npm:1.0.0" - dependencies: - get-intrinsic: "npm:^1.2.4" - checksum: 10/f66ece0a887b6dca71848fa71f70461357c0e4e7249696f81bad0a1f347eed7b31262af4a29f5d726dc026426f085483b6b90301855e647aa8e21936f07293c6 - languageName: node - linkType: hard - -"es-errors@npm:^1.0.0, es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "es-errors@npm:1.3.0" - checksum: 10/96e65d640156f91b707517e8cdc454dd7d47c32833aa3e85d79f24f9eb7ea85f39b63e36216ef0114996581969b59fe609a94e30316b08f5f4df1d44134cf8d5 - languageName: node - linkType: hard - -"es-get-iterator@npm:^1.1.3": - version: 1.1.3 - resolution: "es-get-iterator@npm:1.1.3" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.3" - has-symbols: "npm:^1.0.3" - is-arguments: "npm:^1.1.1" - is-map: "npm:^2.0.2" - is-set: "npm:^2.0.2" - is-string: "npm:^1.0.7" - isarray: "npm:^2.0.5" - stop-iteration-iterator: "npm:^1.0.0" - checksum: 10/bc2194befbe55725f9489098626479deee3c801eda7e83ce0dff2eb266a28dc808edb9b623ff01d31ebc1328f09d661333d86b601036692c2e3c1a6942319433 - languageName: node - linkType: hard - -"es-iterator-helpers@npm:^1.0.12": - version: 1.0.15 - resolution: "es-iterator-helpers@npm:1.0.15" - dependencies: - asynciterator.prototype: "npm:^1.0.0" - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.1" - es-set-tostringtag: "npm:^2.0.1" - function-bind: "npm:^1.1.1" - get-intrinsic: "npm:^1.2.1" - globalthis: "npm:^1.0.3" - has-property-descriptors: "npm:^1.0.0" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.5" - iterator.prototype: "npm:^1.1.2" - safe-array-concat: "npm:^1.0.1" - checksum: 10/78535c00c49d81df603e650886d3806f3cd8d288e2c07703cfb145725753a3d2df19bff9feeb14cd1baed02252d1f85c4bbc922c8db02841722ab3ec02e78339 - languageName: node - linkType: hard - -"es-main@npm:1.2.0": - version: 1.2.0 - resolution: "es-main@npm:1.2.0" - checksum: 10/b1feaaa71c0c5b0c494cd7d4f1fdb32fcdc9835b824ca2f61a7fbb899627305d88efef584490c24ebacde79289ac14908823c066176e15a784c49fa924db9b0b - languageName: node - linkType: hard - -"es-module-lexer@npm:^1.2.1": - version: 1.3.0 - resolution: "es-module-lexer@npm:1.3.0" - checksum: 10/dee2af09669d05282db987839681ea1917ce31ce4a2364cc9eb598675344c5c709895e7e782db87794065a6f3af054552e2cf42ccadcaec4c9fc0cbc4898f193 - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.0.1": - version: 2.0.1 - resolution: "es-set-tostringtag@npm:2.0.1" - dependencies: - get-intrinsic: "npm:^1.1.3" - has: "npm:^1.0.3" - has-tostringtag: "npm:^1.0.0" - checksum: 10/ec416a12948cefb4b2a5932e62093a7cf36ddc3efd58d6c58ca7ae7064475ace556434b869b0bbeb0c365f1032a8ccd577211101234b69837ad83ad204fff884 - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.0.3": - version: 2.0.3 - resolution: "es-set-tostringtag@npm:2.0.3" - dependencies: - get-intrinsic: "npm:^1.2.4" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.1" - checksum: 10/7227fa48a41c0ce83e0377b11130d324ac797390688135b8da5c28994c0165be8b252e15cd1de41e1325e5a5412511586960213e88f9ab4a5e7d028895db5129 - languageName: node - linkType: hard - -"es-shim-unscopables@npm:^1.0.0": - version: 1.0.0 - resolution: "es-shim-unscopables@npm:1.0.0" - dependencies: - has: "npm:^1.0.3" - checksum: 10/ac2db2c70d253cf83bebcdc974d185239e205ca18af743efd3b656bac00cabfee2358a050b18b63b46972dab5cfa10ef3f2597eb3a8d4d6d9417689793665da6 - languageName: node - linkType: hard - -"es-shim-unscopables@npm:^1.0.2": - version: 1.0.2 - resolution: "es-shim-unscopables@npm:1.0.2" - dependencies: - hasown: "npm:^2.0.0" - checksum: 10/6d3bf91f658a27cc7217cd32b407a0d714393a84d125ad576319b9e83a893bea165cf41270c29e9ceaa56d3cf41608945d7e2a2c31fd51c0009b0c31402b91c7 - languageName: node - linkType: hard - -"es-to-primitive@npm:^1.2.1": - version: 1.2.1 - resolution: "es-to-primitive@npm:1.2.1" - dependencies: - is-callable: "npm:^1.1.4" - is-date-object: "npm:^1.0.1" - is-symbol: "npm:^1.0.2" - checksum: 10/74aeeefe2714cf99bb40cab7ce3012d74e1e2c1bd60d0a913b467b269edde6e176ca644b5ba03a5b865fb044a29bca05671cd445c85ca2cdc2de155d7fc8fe9b - languageName: node - linkType: hard - -"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.46, es5-ext@npm:^0.10.50, es5-ext@npm:^0.10.62, es5-ext@npm:~0.10.14, es5-ext@npm:~0.10.46": - version: 0.10.64 - resolution: "es5-ext@npm:0.10.64" - dependencies: - es6-iterator: "npm:^2.0.3" - es6-symbol: "npm:^3.1.3" - esniff: "npm:^2.0.1" - next-tick: "npm:^1.1.0" - checksum: 10/0c5d8657708b1695ddc4b06f4e0b9fbdda4d2fe46d037b6bedb49a7d1931e542ec9eecf4824d59e1d357e93229deab014bb4b86485db2d41b1d68e54439689ce - languageName: node - linkType: hard - -"es6-error@npm:^4.0.1": - version: 4.1.1 - resolution: "es6-error@npm:4.1.1" - checksum: 10/48483c25701dc5a6376f39bbe2eaf5da0b505607ec5a98cd3ade472c1939242156660636e2e508b33211e48e88b132d245341595c067bd4a95ac79fa7134da06 - languageName: node - linkType: hard - -"es6-iterator@npm:^2.0.3, es6-iterator@npm:~2.0.1, es6-iterator@npm:~2.0.3": - version: 2.0.3 - resolution: "es6-iterator@npm:2.0.3" - dependencies: - d: "npm:1" - es5-ext: "npm:^0.10.35" - es6-symbol: "npm:^3.1.1" - checksum: 10/dbadecf3d0e467692815c2b438dfa99e5a97cbbecf4a58720adcb467a04220e0e36282399ba297911fd472c50ae4158fffba7ed0b7d4273fe322b69d03f9e3a5 - languageName: node - linkType: hard - -"es6-map@npm:^0.1.3": - version: 0.1.5 - resolution: "es6-map@npm:0.1.5" - dependencies: - d: "npm:1" - es5-ext: "npm:~0.10.14" - es6-iterator: "npm:~2.0.1" - es6-set: "npm:~0.1.5" - es6-symbol: "npm:~3.1.1" - event-emitter: "npm:~0.3.5" - checksum: 10/ca271c8efcd5b03bc430fe7508803b8b47c1db2956299b538a68244a3473d176536ee10db2db3b31174c71f83d6a6d67dff8311ad25ec6e71a7ffae01f4ca9d2 - languageName: node - linkType: hard - -"es6-object-assign@npm:^1.1.0": - version: 1.1.0 - resolution: "es6-object-assign@npm:1.1.0" - checksum: 10/396c30376c89e91b5435f177ff83ba0d5ba265e3583cbaaa3bce185df08bf87db58c6d5d84600634280cbf35f8f342569b6ab776d728a12e177e5db82f5b6e2f - languageName: node - linkType: hard - -"es6-promise@npm:^4.1.1, es6-promise@npm:^4.2.8": - version: 4.2.8 - resolution: "es6-promise@npm:4.2.8" - checksum: 10/b250c55523c496c43c9216c2646e58ec182b819e036fe5eb8d83fa16f044ecc6b8dcefc88ace2097be3d3c4d02b6aa8eeae1a66deeaf13e7bee905ebabb350a3 - languageName: node - linkType: hard - -"es6-set@npm:~0.1.5": - version: 0.1.6 - resolution: "es6-set@npm:0.1.6" - dependencies: - d: "npm:^1.0.1" - es5-ext: "npm:^0.10.62" - es6-iterator: "npm:~2.0.3" - es6-symbol: "npm:^3.1.3" - event-emitter: "npm:^0.3.5" - type: "npm:^2.7.2" - checksum: 10/45e8a4432edf71be7e0b7415ec434f62e294a6cb790646a5475b01ac13fda820141eab9fa7d18e91f4e5977bdf8d27d944123fafd15740a1c7f832a2caf45ba4 - languageName: node - linkType: hard - -"es6-symbol@npm:^3.0.2, es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3, es6-symbol@npm:~3.1.1": - version: 3.1.3 - resolution: "es6-symbol@npm:3.1.3" - dependencies: - d: "npm:^1.0.1" - ext: "npm:^1.1.2" - checksum: 10/b404e5ecae1a076058aa2ba2568d87e2cb4490cb1130784b84e7b4c09c570b487d4f58ed685a08db8d350bd4916500dd3d623b26e6b3520841d30d2ebb152f8d - languageName: node - linkType: hard - -"es6-weak-map@npm:^2.0.1": - version: 2.0.3 - resolution: "es6-weak-map@npm:2.0.3" - dependencies: - d: "npm:1" - es5-ext: "npm:^0.10.46" - es6-iterator: "npm:^2.0.3" - es6-symbol: "npm:^3.1.1" - checksum: 10/5958a321cf8dfadc82b79eeaa57dc855893a4afd062b4ef5c9ded0010d3932099311272965c3d3fdd3c85df1d7236013a570e704fa6c1f159bbf979c203dd3a3 - languageName: node - linkType: hard - -"esbuild-wasm@npm:0.18.17": - version: 0.18.17 - resolution: "esbuild-wasm@npm:0.18.17" - bin: - esbuild: bin/esbuild - checksum: 10/15e229b0333994058cafa147e49e64e9421157098012ed5591c21ad527e32aae6bc23375619a5eae6f8b31fbb77e3eab376f5ff20e34f48ad7b15d563cb67b4f - languageName: node - linkType: hard - -"esbuild-wasm@npm:0.20.1": - version: 0.20.1 - resolution: "esbuild-wasm@npm:0.20.1" - bin: - esbuild: bin/esbuild - checksum: 10/6832eb9166a026b9f18cbb2737c9182698ddc3d07fe7fe6ea3c4b62010b723e6c08acfad7a3ba5ee126f00b1291a144ed98012be83509400d798b5b993639aa7 - languageName: node - linkType: hard - -"esbuild@npm:0.18.17": - version: 0.18.17 - resolution: "esbuild@npm:0.18.17" - dependencies: - "@esbuild/android-arm": "npm:0.18.17" - "@esbuild/android-arm64": "npm:0.18.17" - "@esbuild/android-x64": "npm:0.18.17" - "@esbuild/darwin-arm64": "npm:0.18.17" - "@esbuild/darwin-x64": "npm:0.18.17" - "@esbuild/freebsd-arm64": "npm:0.18.17" - "@esbuild/freebsd-x64": "npm:0.18.17" - "@esbuild/linux-arm": "npm:0.18.17" - "@esbuild/linux-arm64": "npm:0.18.17" - "@esbuild/linux-ia32": "npm:0.18.17" - "@esbuild/linux-loong64": "npm:0.18.17" - "@esbuild/linux-mips64el": "npm:0.18.17" - "@esbuild/linux-ppc64": "npm:0.18.17" - "@esbuild/linux-riscv64": "npm:0.18.17" - "@esbuild/linux-s390x": "npm:0.18.17" - "@esbuild/linux-x64": "npm:0.18.17" - "@esbuild/netbsd-x64": "npm:0.18.17" - "@esbuild/openbsd-x64": "npm:0.18.17" - "@esbuild/sunos-x64": "npm:0.18.17" - "@esbuild/win32-arm64": "npm:0.18.17" - "@esbuild/win32-ia32": "npm:0.18.17" - "@esbuild/win32-x64": "npm:0.18.17" - dependenciesMeta: - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 10/5f46b54e8ce4b944e2ba9c6a7fb152b86fdad3105a92f6416d481f7bc4b1ffd709a1de74dcb436da8260d584579ae308bc56725845d72c2ff95a1d89bc664367 - languageName: node - linkType: hard - -"esbuild@npm:0.20.1": - version: 0.20.1 - resolution: "esbuild@npm:0.20.1" - dependencies: - "@esbuild/aix-ppc64": "npm:0.20.1" - "@esbuild/android-arm": "npm:0.20.1" - "@esbuild/android-arm64": "npm:0.20.1" - "@esbuild/android-x64": "npm:0.20.1" - "@esbuild/darwin-arm64": "npm:0.20.1" - "@esbuild/darwin-x64": "npm:0.20.1" - "@esbuild/freebsd-arm64": "npm:0.20.1" - "@esbuild/freebsd-x64": "npm:0.20.1" - "@esbuild/linux-arm": "npm:0.20.1" - "@esbuild/linux-arm64": "npm:0.20.1" - "@esbuild/linux-ia32": "npm:0.20.1" - "@esbuild/linux-loong64": "npm:0.20.1" - "@esbuild/linux-mips64el": "npm:0.20.1" - "@esbuild/linux-ppc64": "npm:0.20.1" - "@esbuild/linux-riscv64": "npm:0.20.1" - "@esbuild/linux-s390x": "npm:0.20.1" - "@esbuild/linux-x64": "npm:0.20.1" - "@esbuild/netbsd-x64": "npm:0.20.1" - "@esbuild/openbsd-x64": "npm:0.20.1" - "@esbuild/sunos-x64": "npm:0.20.1" - "@esbuild/win32-arm64": "npm:0.20.1" - "@esbuild/win32-ia32": "npm:0.20.1" - "@esbuild/win32-x64": "npm:0.20.1" - dependenciesMeta: - "@esbuild/aix-ppc64": - optional: true - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 10/b672fd5df28ae917e2b16e77edbbf6b3099c390ab0a9d4cd331f78b4a4567cf33f506a055e1aa272ac90f7f522835b2173abea9bac6c38906acfda68e60a7ab7 - languageName: node - linkType: hard - -"esbuild@npm:^0.21.3, esbuild@npm:~0.21.5": - version: 0.21.5 - resolution: "esbuild@npm:0.21.5" - dependencies: - "@esbuild/aix-ppc64": "npm:0.21.5" - "@esbuild/android-arm": "npm:0.21.5" - "@esbuild/android-arm64": "npm:0.21.5" - "@esbuild/android-x64": "npm:0.21.5" - "@esbuild/darwin-arm64": "npm:0.21.5" - "@esbuild/darwin-x64": "npm:0.21.5" - "@esbuild/freebsd-arm64": "npm:0.21.5" - "@esbuild/freebsd-x64": "npm:0.21.5" - "@esbuild/linux-arm": "npm:0.21.5" - "@esbuild/linux-arm64": "npm:0.21.5" - "@esbuild/linux-ia32": "npm:0.21.5" - "@esbuild/linux-loong64": "npm:0.21.5" - "@esbuild/linux-mips64el": "npm:0.21.5" - "@esbuild/linux-ppc64": "npm:0.21.5" - "@esbuild/linux-riscv64": "npm:0.21.5" - "@esbuild/linux-s390x": "npm:0.21.5" - "@esbuild/linux-x64": "npm:0.21.5" - "@esbuild/netbsd-x64": "npm:0.21.5" - "@esbuild/openbsd-x64": "npm:0.21.5" - "@esbuild/sunos-x64": "npm:0.21.5" - "@esbuild/win32-arm64": "npm:0.21.5" - "@esbuild/win32-ia32": "npm:0.21.5" - "@esbuild/win32-x64": "npm:0.21.5" - dependenciesMeta: - "@esbuild/aix-ppc64": - optional: true - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 10/d2ff2ca84d30cce8e871517374d6c2290835380dc7cd413b2d49189ed170d45e407be14de2cb4794cf76f75cf89955c4714726ebd3de7444b3046f5cab23ab6b - languageName: node - linkType: hard - -"escalade@npm:^3.1.1": - version: 3.1.1 - resolution: "escalade@npm:3.1.1" - checksum: 10/afa618e73362576b63f6ca83c975456621095a1ed42ff068174e3f5cea48afc422814dda548c96e6ebb5333e7265140c7292abcc81bbd6ccb1757d50d3a4e182 - languageName: node - linkType: hard - -"escalade@npm:^3.1.2": - version: 3.1.2 - resolution: "escalade@npm:3.1.2" - checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3 - languageName: node - linkType: hard - -"escape-goat@npm:^2.0.0": - version: 2.1.1 - resolution: "escape-goat@npm:2.1.1" - checksum: 10/ce05c70c20dd7007b60d2d644b625da5412325fdb57acf671ba06cb2ab3cd6789e2087026921a05b665b0a03fadee2955e7fc0b9a67da15a6551a980b260eba7 - languageName: node - linkType: hard - -"escape-html@npm:1.0.3, escape-html@npm:~1.0.3": - version: 1.0.3 - resolution: "escape-html@npm:1.0.3" - checksum: 10/6213ca9ae00d0ab8bccb6d8d4e0a98e76237b2410302cf7df70aaa6591d509a2a37ce8998008cbecae8fc8ffaadf3fb0229535e6a145f3ce0b211d060decbb24 - languageName: node - linkType: hard - -"escape-string-regexp@npm:4.0.0, escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 10/98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 - languageName: node - linkType: hard - -"escape-string-regexp@npm:5.0.0": - version: 5.0.0 - resolution: "escape-string-regexp@npm:5.0.0" - checksum: 10/20daabe197f3cb198ec28546deebcf24b3dbb1a5a269184381b3116d12f0532e06007f4bc8da25669d6a7f8efb68db0758df4cd981f57bc5b57f521a3e12c59e - languageName: node - linkType: hard - -"escape-string-regexp@npm:^1.0.2, escape-string-regexp@npm:^1.0.5": - version: 1.0.5 - resolution: "escape-string-regexp@npm:1.0.5" - checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 - languageName: node - linkType: hard - -"escape-string-regexp@npm:^2.0.0": - version: 2.0.0 - resolution: "escape-string-regexp@npm:2.0.0" - checksum: 10/9f8a2d5743677c16e85c810e3024d54f0c8dea6424fad3c79ef6666e81dd0846f7437f5e729dfcdac8981bc9e5294c39b4580814d114076b8d36318f46ae4395 - languageName: node - linkType: hard - -"escodegen@npm:^2.0.0": - version: 2.1.0 - resolution: "escodegen@npm:2.1.0" - dependencies: - esprima: "npm:^4.0.1" - estraverse: "npm:^5.2.0" - esutils: "npm:^2.0.2" - source-map: "npm:~0.6.1" - dependenciesMeta: - source-map: - optional: true - bin: - escodegen: bin/escodegen.js - esgenerate: bin/esgenerate.js - checksum: 10/47719a65b2888b4586e3fa93769068b275961c13089e90d5d01a96a6e8e95871b1c3893576814c8fbf08a4a31a496f37e7b2c937cf231270f4d81de012832c7c - languageName: node - linkType: hard - -"escope@npm:^3.6.0": - version: 3.6.0 - resolution: "escope@npm:3.6.0" - dependencies: - es6-map: "npm:^0.1.3" - es6-weak-map: "npm:^2.0.1" - esrecurse: "npm:^4.1.0" - estraverse: "npm:^4.1.1" - checksum: 10/8a656e71f01b7f4a3a262c2a9ea54654975e093f3b89f1b4ef5767fbf94567f8196772963b967ffb7a4aa9b211c5e47ba3a7e9f05828af5169183ac4f6eb2da9 - languageName: node - linkType: hard - -"eslint-config-prettier@npm:9.1.0": - version: 9.1.0 - resolution: "eslint-config-prettier@npm:9.1.0" - peerDependencies: - eslint: ">=7.0.0" - bin: - eslint-config-prettier: bin/cli.js - checksum: 10/411e3b3b1c7aa04e3e0f20d561271b3b909014956c4dba51c878bf1a23dbb8c800a3be235c46c4732c70827276e540b6eed4636d9b09b444fd0a8e07f0fcd830 - languageName: node - linkType: hard - -"eslint-config-react-app@npm:^7.0.1": - version: 7.0.1 - resolution: "eslint-config-react-app@npm:7.0.1" - dependencies: - "@babel/core": "npm:^7.16.0" - "@babel/eslint-parser": "npm:^7.16.3" - "@rushstack/eslint-patch": "npm:^1.1.0" - "@typescript-eslint/eslint-plugin": "npm:^5.5.0" - "@typescript-eslint/parser": "npm:^5.5.0" - babel-preset-react-app: "npm:^10.0.1" - confusing-browser-globals: "npm:^1.0.11" - eslint-plugin-flowtype: "npm:^8.0.3" - eslint-plugin-import: "npm:^2.25.3" - eslint-plugin-jest: "npm:^25.3.0" - eslint-plugin-jsx-a11y: "npm:^6.5.1" - eslint-plugin-react: "npm:^7.27.1" - eslint-plugin-react-hooks: "npm:^4.3.0" - eslint-plugin-testing-library: "npm:^5.0.1" - peerDependencies: - eslint: ^8.0.0 - checksum: 10/8bd69354e6ea84eb66712f19b2a11a002bc257d0685f686a985abdc2825499eff5e0bbbc77c0c68b967ad47808904f578bed735c03e28c312f8a469556e8233d - languageName: node - linkType: hard - -"eslint-config-standard-jsx@npm:4.0.2": - version: 4.0.2 - resolution: "eslint-config-standard-jsx@npm:4.0.2" - peerDependencies: - eslint: ">=3.19.0" - eslint-plugin-react: ">=6.10.3" - checksum: 10/192133bbcf22967c75eff498c50c9c5ab29d616cae35274b99d99aa1fb0910a832352422ed6e2dbfb6adfd35b988cea138421885a1755dabf53088de20f88dd0 - languageName: node - linkType: hard - -"eslint-config-standard@npm:10.2.1": - version: 10.2.1 - resolution: "eslint-config-standard@npm:10.2.1" - peerDependencies: - eslint: ">=3.19.0" - eslint-plugin-import: ">=2.2.0" - eslint-plugin-node: ">=4.2.2" - eslint-plugin-promise: ">=3.5.0" - eslint-plugin-standard: ">=3.0.0" - checksum: 10/9fbcdcd0934cfb547fff0f73b8e2c94295b4d59adbe0bc935421f6360b219906d144bce5666189a0165212b141b0e3eaba4a76edec567adfe13b06227e2fefb4 - languageName: node - linkType: hard - -"eslint-config-standard@npm:17.1.0": - version: 17.1.0 - resolution: "eslint-config-standard@npm:17.1.0" - peerDependencies: - eslint: ^8.0.1 - eslint-plugin-import: ^2.25.2 - eslint-plugin-n: "^15.0.0 || ^16.0.0 " - eslint-plugin-promise: ^6.0.0 - checksum: 10/1fb3f98a1badee85a8378e9a8df21ebfc3d6a0556fca309b7e9ddd60243cbeb2486e3d5706dafbf296b116b3b28b5aa3ff00536b2f3067092e98157074a95b1d - languageName: node - linkType: hard - -"eslint-import-resolver-node@npm:^0.2.0": - version: 0.2.3 - resolution: "eslint-import-resolver-node@npm:0.2.3" - dependencies: - debug: "npm:^2.2.0" - object-assign: "npm:^4.0.1" - resolve: "npm:^1.1.6" - checksum: 10/942425aff3c581fb174a53c40a55332fa3910f248147251d4b61a932a22761a5680ab3f419d12bc21dfff3e264c8c44b92c3ec8c0147dd2e67affbc8185dd170 - languageName: node - linkType: hard - -"eslint-import-resolver-node@npm:^0.3.7, eslint-import-resolver-node@npm:^0.3.9": - version: 0.3.9 - resolution: "eslint-import-resolver-node@npm:0.3.9" - dependencies: - debug: "npm:^3.2.7" - is-core-module: "npm:^2.13.0" - resolve: "npm:^1.22.4" - checksum: 10/d52e08e1d96cf630957272e4f2644dcfb531e49dcfd1edd2e07e43369eb2ec7a7d4423d417beee613201206ff2efa4eb9a582b5825ee28802fc7c71fcd53ca83 - languageName: node - linkType: hard - -"eslint-module-utils@npm:^2.0.0, eslint-module-utils@npm:^2.8.0": - version: 2.8.0 - resolution: "eslint-module-utils@npm:2.8.0" - dependencies: - debug: "npm:^3.2.7" - peerDependenciesMeta: - eslint: - optional: true - checksum: 10/a9a7ed93eb858092e3cdc797357d4ead2b3ea06959b0eada31ab13862d46a59eb064b9cb82302214232e547980ce33618c2992f6821138a4934e65710ed9cc29 - languageName: node - linkType: hard - -"eslint-plugin-es@npm:^3.0.0": - version: 3.0.1 - resolution: "eslint-plugin-es@npm:3.0.1" - dependencies: - eslint-utils: "npm:^2.0.0" - regexpp: "npm:^3.0.0" - peerDependencies: - eslint: ">=4.19.1" - checksum: 10/9814e6305183edfdff7d99cbc0f95f0aed1446045cbd1d4f28e7be0903d0013880f0aaf04486a27de96bfb2f5a746bea97cbb238f9b0035cb378d48d179a0a1b - languageName: node - linkType: hard - -"eslint-plugin-flowtype@npm:^8.0.3": - version: 8.0.3 - resolution: "eslint-plugin-flowtype@npm:8.0.3" - dependencies: - lodash: "npm:^4.17.21" - string-natural-compare: "npm:^3.0.1" - peerDependencies: - "@babel/plugin-syntax-flow": ^7.14.5 - "@babel/plugin-transform-react-jsx": ^7.14.9 - eslint: ^8.1.0 - checksum: 10/62a90c57a452cf5a3c510608b3358212b417022a592d367358339d5bbbe07d2b2cb3888745ee211a75e805898c82818fbc990a5f2aff474bbf5bdaaf1618d7c5 - languageName: node - linkType: hard - -"eslint-plugin-import@npm:2.29.1": - version: 2.29.1 - resolution: "eslint-plugin-import@npm:2.29.1" - dependencies: - array-includes: "npm:^3.1.7" - array.prototype.findlastindex: "npm:^1.2.3" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" - debug: "npm:^3.2.7" - doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.8.0" - hasown: "npm:^2.0.0" - is-core-module: "npm:^2.13.1" - is-glob: "npm:^4.0.3" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.7" - object.groupby: "npm:^1.0.1" - object.values: "npm:^1.1.7" - semver: "npm:^6.3.1" - tsconfig-paths: "npm:^3.15.0" - peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: 10/5865f05c38552145423c535326ec9a7113ab2305c7614c8b896ff905cfabc859c8805cac21e979c9f6f742afa333e6f62f812eabf891a7e8f5f0b853a32593c1 - languageName: node - linkType: hard - -"eslint-plugin-import@npm:^2.25.3": - version: 2.28.1 - resolution: "eslint-plugin-import@npm:2.28.1" - dependencies: - array-includes: "npm:^3.1.6" - array.prototype.findlastindex: "npm:^1.2.2" - array.prototype.flat: "npm:^1.3.1" - array.prototype.flatmap: "npm:^1.3.1" - debug: "npm:^3.2.7" - doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.7" - eslint-module-utils: "npm:^2.8.0" - has: "npm:^1.0.3" - is-core-module: "npm:^2.13.0" - is-glob: "npm:^4.0.3" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.6" - object.groupby: "npm:^1.0.0" - object.values: "npm:^1.1.6" - semver: "npm:^6.3.1" - tsconfig-paths: "npm:^3.14.2" - peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: 10/707dc97f06b12b0f3f91d5248dcea91bcd6a72c1168249a3ba177dd1ab6f31de9d5db829705236207a6ae79ad99a7a03efdfddb4a703da3a85530f9cc7401b2f - languageName: node - linkType: hard - -"eslint-plugin-import@npm:~2.2.0": - version: 2.2.0 - resolution: "eslint-plugin-import@npm:2.2.0" - dependencies: - builtin-modules: "npm:^1.1.1" - contains-path: "npm:^0.1.0" - debug: "npm:^2.2.0" - doctrine: "npm:1.5.0" - eslint-import-resolver-node: "npm:^0.2.0" - eslint-module-utils: "npm:^2.0.0" - has: "npm:^1.0.1" - lodash.cond: "npm:^4.3.0" - minimatch: "npm:^3.0.3" - pkg-up: "npm:^1.0.0" - peerDependencies: - eslint: 2.x - 3.x - checksum: 10/646734c8b1bf355ec1d0b2c90a51e5e9a7c764b12570e93b7ab6085db5df3f9aef718e941874148543b3eac61fcc7fb3668169d8e18b4b08b88ccefe054f942b - languageName: node - linkType: hard - -"eslint-plugin-jest@npm:^25.3.0": - version: 25.7.0 - resolution: "eslint-plugin-jest@npm:25.7.0" - dependencies: - "@typescript-eslint/experimental-utils": "npm:^5.0.0" - peerDependencies: - "@typescript-eslint/eslint-plugin": ^4.0.0 || ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - "@typescript-eslint/eslint-plugin": - optional: true - jest: - optional: true - checksum: 10/7c358f4503fff7091ddaa8986aba7f4846acc36e7478923cb43fc2cc2ae7be6f49cb1aed222e58d0493154a5e35c4e60111627bf58e72e256831bd2d2c6fd90f - languageName: node - linkType: hard - -"eslint-plugin-jsx-a11y@npm:^6.5.1": - version: 6.7.1 - resolution: "eslint-plugin-jsx-a11y@npm:6.7.1" - dependencies: - "@babel/runtime": "npm:^7.20.7" - aria-query: "npm:^5.1.3" - array-includes: "npm:^3.1.6" - array.prototype.flatmap: "npm:^1.3.1" - ast-types-flow: "npm:^0.0.7" - axe-core: "npm:^4.6.2" - axobject-query: "npm:^3.1.1" - damerau-levenshtein: "npm:^1.0.8" - emoji-regex: "npm:^9.2.2" - has: "npm:^1.0.3" - jsx-ast-utils: "npm:^3.3.3" - language-tags: "npm:=1.0.5" - minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.6" - object.fromentries: "npm:^2.0.6" - semver: "npm:^6.3.0" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 10/b7eb451304dc27c9552649a716be1de3b5d577f39e53f6da6a2dac084b84b349b0224be3020439f99c2b3bf417a13c5591326f1ce6af8d74f1cb5d5d95c4222b - languageName: node - linkType: hard - -"eslint-plugin-node@npm:11.1.0": - version: 11.1.0 - resolution: "eslint-plugin-node@npm:11.1.0" - dependencies: - eslint-plugin-es: "npm:^3.0.0" - eslint-utils: "npm:^2.0.0" - ignore: "npm:^5.1.1" - minimatch: "npm:^3.0.4" - resolve: "npm:^1.10.1" - semver: "npm:^6.1.0" - peerDependencies: - eslint: ">=5.16.0" - checksum: 10/bda540f390a84d835989f21f56743f3aa8f41fd9b53359d635c116632c86af92d70d8e6449ddd18860e6241f9cef04fc90c37eb192a9047c3c3a46de6145c30c - languageName: node - linkType: hard - -"eslint-plugin-node@npm:~4.2.2": - version: 4.2.3 - resolution: "eslint-plugin-node@npm:4.2.3" - dependencies: - ignore: "npm:^3.0.11" - minimatch: "npm:^3.0.2" - object-assign: "npm:^4.0.1" - resolve: "npm:^1.1.7" - semver: "npm:5.3.0" - peerDependencies: - eslint: ">=3.1.0" - checksum: 10/72bdc48d39588c204f626cbcc20fa74321f46729a57814ca3472382bbeb5aef6d035cd683f40d3a5f3ebf817be76358a7fa7aa7eeca71979d44d9032048b7dc5 - languageName: node - linkType: hard - -"eslint-plugin-prettier@npm:5.1.3": - version: 5.1.3 - resolution: "eslint-plugin-prettier@npm:5.1.3" - dependencies: - prettier-linter-helpers: "npm:^1.0.0" - synckit: "npm:^0.8.6" - peerDependencies: - "@types/eslint": ">=8.0.0" - eslint: ">=8.0.0" - eslint-config-prettier: "*" - prettier: ">=3.0.0" - peerDependenciesMeta: - "@types/eslint": - optional: true - eslint-config-prettier: - optional: true - checksum: 10/4f26a30444adc61ed692cdb5a9f7e8d9f5794f0917151051e66755ce032a08c3cc72c8b5d56101412e90f6d77035bd8194ea8731e9c16aacdd5ae345a8dae188 - languageName: node - linkType: hard - -"eslint-plugin-promise@npm:6.1.1": - version: 6.1.1 - resolution: "eslint-plugin-promise@npm:6.1.1" - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - checksum: 10/216c4348f796c5e90984224532d42a8f8d0455b8cbb1955bcb328b3aa10a52e9718f6fb044b6fe19825eda3a2d62a32b1042d9cbb10731353cf61b7a6cab2d71 - languageName: node - linkType: hard - -"eslint-plugin-promise@npm:~3.5.0": - version: 3.5.0 - resolution: "eslint-plugin-promise@npm:3.5.0" - checksum: 10/e40b70e0eab0b7c31c0cffebbd4e334e7244c6a381e377bb191232e302830546f04cf54336cee10b8b73a7a29af42f2577db272de44019194b60226e3245dbd6 - languageName: node - linkType: hard - -"eslint-plugin-react-hooks@npm:^4.3.0": - version: 4.6.0 - resolution: "eslint-plugin-react-hooks@npm:4.6.0" - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - checksum: 10/3c63134e056a6d98d66e2c475c81f904169db817e89316d14e36269919e31f4876a2588aa0e466ec8ef160465169c627fe823bfdaae7e213946584e4a165a3ac - languageName: node - linkType: hard - -"eslint-plugin-react@npm:^7.27.1": - version: 7.33.2 - resolution: "eslint-plugin-react@npm:7.33.2" - dependencies: - array-includes: "npm:^3.1.6" - array.prototype.flatmap: "npm:^1.3.1" - array.prototype.tosorted: "npm:^1.1.1" - doctrine: "npm:^2.1.0" - es-iterator-helpers: "npm:^1.0.12" - estraverse: "npm:^5.3.0" - jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" - minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.6" - object.fromentries: "npm:^2.0.6" - object.hasown: "npm:^1.1.2" - object.values: "npm:^1.1.6" - prop-types: "npm:^15.8.1" - resolve: "npm:^2.0.0-next.4" - semver: "npm:^6.3.1" - string.prototype.matchall: "npm:^4.0.8" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 10/cb8c5dd5859cace330e24b7d74b9c652c0d93ef1d87957261fe1ac2975c27c918d0d5dc607f25aba4972ce74d04456f4f93883a16ac10cd598680d047fc3495d - languageName: node - linkType: hard - -"eslint-plugin-react@npm:~6.10.0": - version: 6.10.3 - resolution: "eslint-plugin-react@npm:6.10.3" - dependencies: - array.prototype.find: "npm:^2.0.1" - doctrine: "npm:^1.2.2" - has: "npm:^1.0.1" - jsx-ast-utils: "npm:^1.3.4" - object.assign: "npm:^4.0.4" - peerDependencies: - eslint: ^2.0.0 || ^3.0.0 - checksum: 10/461c9ae99fcbcd2b3e15b49ac5afcd80ac59890f23e95022c7bb3c6d7cdf737d108bc0ca76495f41ea693d692c6f94a0a9679d8a0f344571b2e48522300c1487 - languageName: node - linkType: hard - -"eslint-plugin-standard@npm:5.0.0": - version: 5.0.0 - resolution: "eslint-plugin-standard@npm:5.0.0" - peerDependencies: - eslint: ">=5.0.0" - checksum: 10/f11e6b0a58606347a256d2ab9c63d290ee580389f09cc29f58fbcaf9a588560f5a8043640a2ced63060eab469e2807d5d81f238ca4fc65a945444ebf71296727 - languageName: node - linkType: hard - -"eslint-plugin-standard@npm:~3.0.1": - version: 3.0.1 - resolution: "eslint-plugin-standard@npm:3.0.1" - peerDependencies: - eslint: ">=3.19.0" - checksum: 10/7aa7b941bfa09eee5d2501ad7c5e39655a847a404e3d57cdacd0c58a361157f6cf20a70523e6ba3bf24ebb9356c53abe57c2214c37e4ef2746be460700e5b141 - languageName: node - linkType: hard - -"eslint-plugin-testing-library@npm:^5.0.1": - version: 5.11.1 - resolution: "eslint-plugin-testing-library@npm:5.11.1" - dependencies: - "@typescript-eslint/utils": "npm:^5.58.0" - peerDependencies: - eslint: ^7.5.0 || ^8.0.0 - checksum: 10/3b2f010b13fbffd9a2018815cdca7edfce64523d9263ed376b33bdc43fca297100dab755a40f5b8be0f8e76b44bc7883590acfa9016fbff20888d9ee67f964d0 - languageName: node - linkType: hard - -"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.0.0, eslint-scope@npm:^5.1.1": - version: 5.1.1 - resolution: "eslint-scope@npm:5.1.1" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^4.1.1" - checksum: 10/c541ef384c92eb5c999b7d3443d80195fcafb3da335500946f6db76539b87d5826c8f2e1d23bf6afc3154ba8cd7c8e566f8dc00f1eea25fdf3afc8fb9c87b238 - languageName: node - linkType: hard - -"eslint-scope@npm:^3.7.1": - version: 3.7.3 - resolution: "eslint-scope@npm:3.7.3" - dependencies: - esrecurse: "npm:^4.1.0" - estraverse: "npm:^4.1.1" - checksum: 10/48c13bf69f7f65c0c9bb81eecac64e2d05b9a7121b5d1813ddd7ecb06d8abbcce6548a27f5f12665037bef9b08246014da24931004246ecc4d83bd2348c7ed5c - languageName: node - linkType: hard - -"eslint-scope@npm:^7.2.2": - version: 7.2.2 - resolution: "eslint-scope@npm:7.2.2" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^5.2.0" - checksum: 10/5c660fb905d5883ad018a6fea2b49f3cb5b1cbf2cd4bd08e98646e9864f9bc2c74c0839bed2d292e90a4a328833accc197c8f0baed89cbe8d605d6f918465491 - languageName: node - linkType: hard - -"eslint-utils@npm:^2.0.0": - version: 2.1.0 - resolution: "eslint-utils@npm:2.1.0" - dependencies: - eslint-visitor-keys: "npm:^1.1.0" - checksum: 10/a7e43a5154a16a90c021cabeb160c3668cccbcf6474ccb2a7d7762698582398f3b938c5330909b858ef7c21182edfc9786dbf89ed7b294f51b7659a378bf7cec - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^1.0.0, eslint-visitor-keys@npm:^1.1.0": - version: 1.3.0 - resolution: "eslint-visitor-keys@npm:1.3.0" - checksum: 10/595ab230e0fcb52f86ba0986a9a473b9fcae120f3729b43f1157f88f27f8addb1e545c4e3d444185f2980e281ca15be5ada6f65b4599eec227cf30e41233b762 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^2.1.0": - version: 2.1.0 - resolution: "eslint-visitor-keys@npm:2.1.0" - checksum: 10/db4547eef5039122d518fa307e938ceb8589da5f6e8f5222efaf14dd62f748ce82e2d2becd3ff9412a50350b726bda95dbea8515a471074547daefa58aee8735 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1": - version: 3.4.1 - resolution: "eslint-visitor-keys@npm:3.4.1" - checksum: 10/92641e7ccde470065aa2931161a6a053690a54aae35ae08f38e376ecfd7c012573c542b37a3baecf921eb951fd57943411392f464c2b8f3399adee4723a1369f - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.4.3": - version: 3.4.3 - resolution: "eslint-visitor-keys@npm:3.4.3" - checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b - languageName: node - linkType: hard - -"eslint-webpack-plugin@npm:^3.1.1": - version: 3.2.0 - resolution: "eslint-webpack-plugin@npm:3.2.0" - dependencies: - "@types/eslint": "npm:^7.29.0 || ^8.4.1" - jest-worker: "npm:^28.0.2" - micromatch: "npm:^4.0.5" - normalize-path: "npm:^3.0.0" - schema-utils: "npm:^4.0.0" - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - webpack: ^5.0.0 - checksum: 10/3f78c2fb3c363bfc7284664686a1a445d9266bdc27b5a28a4f0ce0cefe7f769de5f6d9d1c5e2e1c08dc3cabca472afdaf32cff6fc260f97c39c08ec9a5180e84 - languageName: node - linkType: hard - -"eslint@npm:8.57.0": - version: 8.57.0 - resolution: "eslint@npm:8.57.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.57.0" - "@humanwhocodes/config-array": "npm:^0.11.14" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@nodelib/fs.walk": "npm:^1.2.8" - "@ungap/structured-clone": "npm:^1.2.0" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" - debug: "npm:^4.3.2" - doctrine: "npm:^3.0.0" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.2.2" - eslint-visitor-keys: "npm:^3.4.3" - espree: "npm:^9.6.1" - esquery: "npm:^1.4.2" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^6.0.1" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - globals: "npm:^13.19.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - is-path-inside: "npm:^3.0.3" - js-yaml: "npm:^4.1.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.4.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - strip-ansi: "npm:^6.0.1" - text-table: "npm:^0.2.0" - bin: - eslint: bin/eslint.js - checksum: 10/00496e218b23747a7a9817bf58b522276d0dc1f2e546dceb4eea49f9871574088f72f1f069a6b560ef537efa3a75261b8ef70e51ef19033da1cc4c86a755ef15 - languageName: node - linkType: hard - -"eslint@npm:^4.19.1": - version: 4.19.1 - resolution: "eslint@npm:4.19.1" - dependencies: - ajv: "npm:^5.3.0" - babel-code-frame: "npm:^6.22.0" - chalk: "npm:^2.1.0" - concat-stream: "npm:^1.6.0" - cross-spawn: "npm:^5.1.0" - debug: "npm:^3.1.0" - doctrine: "npm:^2.1.0" - eslint-scope: "npm:^3.7.1" - eslint-visitor-keys: "npm:^1.0.0" - espree: "npm:^3.5.4" - esquery: "npm:^1.0.0" - esutils: "npm:^2.0.2" - file-entry-cache: "npm:^2.0.0" - functional-red-black-tree: "npm:^1.0.1" - glob: "npm:^7.1.2" - globals: "npm:^11.0.1" - ignore: "npm:^3.3.3" - imurmurhash: "npm:^0.1.4" - inquirer: "npm:^3.0.6" - is-resolvable: "npm:^1.0.0" - js-yaml: "npm:^3.9.1" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.3.0" - lodash: "npm:^4.17.4" - minimatch: "npm:^3.0.2" - mkdirp: "npm:^0.5.1" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.8.2" - path-is-inside: "npm:^1.0.2" - pluralize: "npm:^7.0.0" - progress: "npm:^2.0.0" - regexpp: "npm:^1.0.1" - require-uncached: "npm:^1.0.3" - semver: "npm:^5.3.0" - strip-ansi: "npm:^4.0.0" - strip-json-comments: "npm:~2.0.1" - table: "npm:4.0.2" - text-table: "npm:~0.2.0" - bin: - eslint: ./bin/eslint.js - checksum: 10/1033658067551a82ce254f3c54856075268e52a95945707a3685e679e7558754ea19d9cad7438af32e0db30d2e7599fa1cb4b8e4437ea83dd703f24d521c6b37 - languageName: node - linkType: hard - -"eslint@npm:^8.3.0": - version: 8.48.0 - resolution: "eslint@npm:8.48.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.2" - "@eslint/js": "npm:8.48.0" - "@humanwhocodes/config-array": "npm:^0.11.10" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@nodelib/fs.walk": "npm:^1.2.8" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" - debug: "npm:^4.3.2" - doctrine: "npm:^3.0.0" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.2.2" - eslint-visitor-keys: "npm:^3.4.3" - espree: "npm:^9.6.1" - esquery: "npm:^1.4.2" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^6.0.1" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - globals: "npm:^13.19.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - is-path-inside: "npm:^3.0.3" - js-yaml: "npm:^4.1.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.4.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - strip-ansi: "npm:^6.0.1" - text-table: "npm:^0.2.0" - bin: - eslint: bin/eslint.js - checksum: 10/43ba3a939aa9203b2d98de9aa242262f10dd242eba6f9f72d17cd9ba8a82085441ffa8b93e017aae0561d52d3bcf49fde3afda4d25b4f95ff4e7274dc911474a - languageName: node - linkType: hard - -"eslint@npm:~3.19.0": - version: 3.19.0 - resolution: "eslint@npm:3.19.0" - dependencies: - babel-code-frame: "npm:^6.16.0" - chalk: "npm:^1.1.3" - concat-stream: "npm:^1.5.2" - debug: "npm:^2.1.1" - doctrine: "npm:^2.0.0" - escope: "npm:^3.6.0" - espree: "npm:^3.4.0" - esquery: "npm:^1.0.0" - estraverse: "npm:^4.2.0" - esutils: "npm:^2.0.2" - file-entry-cache: "npm:^2.0.0" - glob: "npm:^7.0.3" - globals: "npm:^9.14.0" - ignore: "npm:^3.2.0" - imurmurhash: "npm:^0.1.4" - inquirer: "npm:^0.12.0" - is-my-json-valid: "npm:^2.10.0" - is-resolvable: "npm:^1.0.0" - js-yaml: "npm:^3.5.1" - json-stable-stringify: "npm:^1.0.0" - levn: "npm:^0.3.0" - lodash: "npm:^4.0.0" - mkdirp: "npm:^0.5.0" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.8.2" - path-is-inside: "npm:^1.0.1" - pluralize: "npm:^1.2.1" - progress: "npm:^1.1.8" - require-uncached: "npm:^1.0.2" - shelljs: "npm:^0.7.5" - strip-bom: "npm:^3.0.0" - strip-json-comments: "npm:~2.0.1" - table: "npm:^3.7.8" - text-table: "npm:~0.2.0" - user-home: "npm:^2.0.0" - bin: - eslint: ./bin/eslint.js - checksum: 10/38bbd71dd73a516c760feb4d7457cb192a288fed9facbe71c46d3088e69de37884503fb9b97a09b27c6ef4ade1c6072bd072dec08a00374069896ed9a0a82bad - languageName: node - linkType: hard - -"esm@npm:3.2.25, esm@npm:^3.2.25": - version: 3.2.25 - resolution: "esm@npm:3.2.25" - checksum: 10/ee96b8202b76dd1841c55e8a066608d6f0ae0333012be5c77829ccadcd21114283b4d7bf9ac1b8c09853258829c7843e9c6d7e0594acbc5e813cb37d82728d4b - languageName: node - linkType: hard - -"esniff@npm:^2.0.1": - version: 2.0.1 - resolution: "esniff@npm:2.0.1" - dependencies: - d: "npm:^1.0.1" - es5-ext: "npm:^0.10.62" - event-emitter: "npm:^0.3.5" - type: "npm:^2.7.2" - checksum: 10/f6a2abd2f8c5fe57c5fcf53e5407c278023313d0f6c3a92688e7122ab9ac233029fd424508a196ae5bc561aa1f67d23f4e2435b1a0d378030f476596129056ac - languageName: node - linkType: hard - -"espree@npm:^3.4.0, espree@npm:^3.5.4": - version: 3.5.4 - resolution: "espree@npm:3.5.4" - dependencies: - acorn: "npm:^5.5.0" - acorn-jsx: "npm:^3.0.0" - checksum: 10/af594cc39976015bfdc16e4f0b001aa0bd3c392c59912a2be5c68dd40a2ef9297878ddc5be49db76d1db8fc26a0c2d6d1d47867348ffc4eab825c8e786730255 - languageName: node - linkType: hard - -"espree@npm:^9.6.0, espree@npm:^9.6.1": - version: 9.6.1 - resolution: "espree@npm:9.6.1" - dependencies: - acorn: "npm:^8.9.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/255ab260f0d711a54096bdeda93adff0eadf02a6f9b92f02b323e83a2b7fc258797919437ad331efec3930475feb0142c5ecaaf3cdab4befebd336d47d3f3134 - languageName: node - linkType: hard - -"esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": - version: 4.0.1 - resolution: "esprima@npm:4.0.1" - bin: - esparse: ./bin/esparse.js - esvalidate: ./bin/esvalidate.js - checksum: 10/f1d3c622ad992421362294f7acf866aa9409fbad4eb2e8fa230bd33944ce371d32279667b242d8b8907ec2b6ad7353a717f3c0e60e748873a34a7905174bc0eb - languageName: node - linkType: hard - -"esquery@npm:^1.0.0, esquery@npm:^1.4.2": - version: 1.5.0 - resolution: "esquery@npm:1.5.0" - dependencies: - estraverse: "npm:^5.1.0" - checksum: 10/e65fcdfc1e0ff5effbf50fb4f31ea20143ae5df92bb2e4953653d8d40aa4bc148e0d06117a592ce4ea53eeab1dafdfded7ea7e22a5be87e82d73757329a1b01d - languageName: node - linkType: hard - -"esrecurse@npm:^4.1.0, esrecurse@npm:^4.3.0": - version: 4.3.0 - resolution: "esrecurse@npm:4.3.0" - dependencies: - estraverse: "npm:^5.2.0" - checksum: 10/44ffcd89e714ea6b30143e7f119b104fc4d75e77ee913f34d59076b40ef2d21967f84e019f84e1fd0465b42cdbf725db449f232b5e47f29df29ed76194db8e16 - languageName: node - linkType: hard - -"estraverse@npm:^4.1.1, estraverse@npm:^4.2.0": - version: 4.3.0 - resolution: "estraverse@npm:4.3.0" - checksum: 10/3f67ad02b6dbfaddd9ea459cf2b6ef4ecff9a6082a7af9d22e445b9abc082ad9ca47e1825557b293fcdae477f4714e561123e30bb6a5b2f184fb2bad4a9497eb - languageName: node - linkType: hard - -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": - version: 5.3.0 - resolution: "estraverse@npm:5.3.0" - checksum: 10/37cbe6e9a68014d34dbdc039f90d0baf72436809d02edffcc06ba3c2a12eb298048f877511353b130153e532aac8d68ba78430c0dd2f44806ebc7c014b01585e - languageName: node - linkType: hard - -"estree-walker@npm:^1.0.1": - version: 1.0.1 - resolution: "estree-walker@npm:1.0.1" - checksum: 10/1cf11a0aff7613aa765dc535ed1d83e2a1986207d2353f4795df309a2c55726de3ca4948df635c09969a739dc59e8e2d69f88d3b3d2c6dfc5701257aafd1d11b - languageName: node - linkType: hard - -"estree-walker@npm:^2.0.2": - version: 2.0.2 - resolution: "estree-walker@npm:2.0.2" - checksum: 10/b02109c5d46bc2ed47de4990eef770f7457b1159a229f0999a09224d2b85ffeed2d7679cffcff90aeb4448e94b0168feb5265b209cdec29aad50a3d6e93d21e2 - languageName: node - linkType: hard - -"esutils@npm:^2.0.2": - version: 2.0.3 - resolution: "esutils@npm:2.0.3" - checksum: 10/b23acd24791db11d8f65be5ea58fd9a6ce2df5120ae2da65c16cfc5331ff59d5ac4ef50af66cd4bde238881503ec839928a0135b99a036a9cdfa22d17fd56cdb - languageName: node - linkType: hard - -"etag@npm:~1.8.1": - version: 1.8.1 - resolution: "etag@npm:1.8.1" - checksum: 10/571aeb3dbe0f2bbd4e4fadbdb44f325fc75335cd5f6f6b6a091e6a06a9f25ed5392f0863c5442acb0646787446e816f13cbfc6edce5b07658541dff573cab1ff - languageName: node - linkType: hard - -"eth-ens-namehash@npm:2.0.8, eth-ens-namehash@npm:^2.0.8": - version: 2.0.8 - resolution: "eth-ens-namehash@npm:2.0.8" - dependencies: - idna-uts46-hx: "npm:^2.3.1" - js-sha3: "npm:^0.5.7" - checksum: 10/098c04378b0b998191b4bcd2f1a59be976946bbb80cea7bc2a6d1df3a035e061b2fd120b16bf41558c4beb2dd846433742058b091b20195e4b0e1fc64b67979f - languageName: node - linkType: hard - -"eth-lib@npm:0.2.8": - version: 0.2.8 - resolution: "eth-lib@npm:0.2.8" - dependencies: - bn.js: "npm:^4.11.6" - elliptic: "npm:^6.4.0" - xhr-request-promise: "npm:^0.1.2" - checksum: 10/85a6f1673c7106252864fdf6c86973d6bfdf454b238ee8d07d8f642599fa9f390129b6fbd060742a5be7c197be924951535a0c0ebb3e912cfd9f2130b64f74ce - languageName: node - linkType: hard - -"eth-lib@npm:^0.1.26": - version: 0.1.29 - resolution: "eth-lib@npm:0.1.29" - dependencies: - bn.js: "npm:^4.11.6" - elliptic: "npm:^6.4.0" - nano-json-stream-parser: "npm:^0.1.2" - servify: "npm:^0.1.12" - ws: "npm:^3.0.0" - xhr-request-promise: "npm:^0.1.2" - checksum: 10/ee4fcd8400fad0b637c25bd0a4483a54c986b78ac6c4d7fd2a5df12b41468abfa50a66684e315e16894b870d2fcf5d2273a81f429f89c460b275bf4477365f60 - languageName: node - linkType: hard - -"ethashjs@npm:~0.0.7": - version: 0.0.8 - resolution: "ethashjs@npm:0.0.8" - dependencies: - async: "npm:^2.1.2" - buffer-xor: "npm:^2.0.1" - ethereumjs-util: "npm:^7.0.2" - miller-rabin: "npm:^4.0.0" - checksum: 10/5364b2603df6cd0462d0408063fdf716ae6ed96b4dbc09278dde79132f94a92b458021446aa7db83568338d1cf3be180e140eda4c727e89261a01adf10574488 - languageName: node - linkType: hard - -"ethereum-bloom-filters@npm:^1.0.6": - version: 1.0.10 - resolution: "ethereum-bloom-filters@npm:1.0.10" - dependencies: - js-sha3: "npm:^0.8.0" - checksum: 10/dc4191c5d810db864ace106886f340b541bf03f1ad3249459ac630cab9c191f1e45c03e935887cca903cca884326e3ac97acfef0a083c7e1a004108f5991f9ba - languageName: node - linkType: hard - -"ethereum-cryptography@npm:0.1.3, ethereum-cryptography@npm:^0.1.3": - version: 0.1.3 - resolution: "ethereum-cryptography@npm:0.1.3" - dependencies: - "@types/pbkdf2": "npm:^3.0.0" - "@types/secp256k1": "npm:^4.0.1" - blakejs: "npm:^1.1.0" - browserify-aes: "npm:^1.2.0" - bs58check: "npm:^2.1.2" - create-hash: "npm:^1.2.0" - create-hmac: "npm:^1.1.7" - hash.js: "npm:^1.1.7" - keccak: "npm:^3.0.0" - pbkdf2: "npm:^3.0.17" - randombytes: "npm:^2.1.0" - safe-buffer: "npm:^5.1.2" - scrypt-js: "npm:^3.0.0" - secp256k1: "npm:^4.0.1" - setimmediate: "npm:^1.0.5" - checksum: 10/975e476782746acd97d5b37366801ae622a52fb31e5d83f600804be230a61ef7b9d289dcecd9c308fb441967caf3a6e3768dd7c8add6441fcc60c398175d5a96 - languageName: node - linkType: hard - -"ethereum-cryptography@npm:^1.0.3": - version: 1.2.0 - resolution: "ethereum-cryptography@npm:1.2.0" - dependencies: - "@noble/hashes": "npm:1.2.0" - "@noble/secp256k1": "npm:1.7.1" - "@scure/bip32": "npm:1.1.5" - "@scure/bip39": "npm:1.1.1" - checksum: 10/e8b2ab91e0237ed83a6e6ab1aa2a61ee081dea137ac994c7daa935b0b620e866f70e2ac7eb2fb8db2dec044fe22283d2bf940598417e4dccd15a2b704a817a1b - languageName: node - linkType: hard - -"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2": - version: 2.1.2 - resolution: "ethereum-cryptography@npm:2.1.2" - dependencies: - "@noble/curves": "npm:1.1.0" - "@noble/hashes": "npm:1.3.1" - "@scure/bip32": "npm:1.3.1" - "@scure/bip39": "npm:1.2.1" - checksum: 10/78983d01ac95047158ec03237ba318152b2c707ccc6a44225da11c72ed6ca575ca0c1630eaf9878fc82fe26272d6624939ef6f020cc89ddddfb941a7393ab909 - languageName: node - linkType: hard - -"ethereumjs-abi@npm:^0.6.8": - version: 0.6.8 - resolution: "ethereumjs-abi@npm:0.6.8" - dependencies: - bn.js: "npm:^4.11.8" - ethereumjs-util: "npm:^6.0.0" - checksum: 10/d4633ca30048b53c0f900ba5d7d6013ca228822055fbd93f975befc41f5c3054e0fffc27562d78050f164170e546af66c20e9ca1d35e67ea861df07d59a65a91 - languageName: node - linkType: hard - -"ethereumjs-account@npm:^3.0.0": - version: 3.0.0 - resolution: "ethereumjs-account@npm:3.0.0" - dependencies: - ethereumjs-util: "npm:^6.0.0" - rlp: "npm:^2.2.1" - safe-buffer: "npm:^5.1.1" - checksum: 10/64dbe026d29aca12c79596cf4085fb27e209988f11b7d5bf3a1f2aadaaa517d90d722680c8b525144c26a2d9cd8494aa26ac088fa80b358cc3e28024f7ddbe81 - languageName: node - linkType: hard - -"ethereumjs-block@npm:^2.2.2, ethereumjs-block@npm:~2.2.2": - version: 2.2.2 - resolution: "ethereumjs-block@npm:2.2.2" - dependencies: - async: "npm:^2.0.1" - ethereumjs-common: "npm:^1.5.0" - ethereumjs-tx: "npm:^2.1.1" - ethereumjs-util: "npm:^5.0.0" - merkle-patricia-tree: "npm:^2.1.2" - checksum: 10/5179e91d27acc3614199d8098449f16de7927e14239a996c8e7af6e2f65867048a3125ab79af4bac4f828228d332a0ae5837997b5bb259bd2dab2fe6dde455ac - languageName: node - linkType: hard - -"ethereumjs-blockchain@npm:^4.0.3": - version: 4.0.4 - resolution: "ethereumjs-blockchain@npm:4.0.4" - dependencies: - async: "npm:^2.6.1" - ethashjs: "npm:~0.0.7" - ethereumjs-block: "npm:~2.2.2" - ethereumjs-common: "npm:^1.5.0" - ethereumjs-util: "npm:^6.1.0" - flow-stoplight: "npm:^1.0.0" - level-mem: "npm:^3.0.1" - lru-cache: "npm:^5.1.1" - rlp: "npm:^2.2.2" - semaphore: "npm:^1.1.0" - checksum: 10/70041abc21eece9401d47b984608ae11dd55b1ae2c30551fc7c9387d1215ba5ae595641bcfe4fdff01da001707af3887611fcb6f2d027bcf7db6befa3bff2f0f - languageName: node - linkType: hard - -"ethereumjs-common@npm:1.5.2, ethereumjs-common@npm:^1.5.0": - version: 1.5.2 - resolution: "ethereumjs-common@npm:1.5.2" - checksum: 10/ae24d814ff25a15aaef2ca03d526ce6fe60a5edd17bacb66f7af4ca57910b91e70507f8611a4aac640f92ddcccd2ee7c38e354024c53f5705bc1d489a70f8298 - languageName: node - linkType: hard - -"ethereumjs-tx@npm:2.1.2, ethereumjs-tx@npm:^2.1.1, ethereumjs-tx@npm:^2.1.2": - version: 2.1.2 - resolution: "ethereumjs-tx@npm:2.1.2" - dependencies: - ethereumjs-common: "npm:^1.5.0" - ethereumjs-util: "npm:^6.0.0" - checksum: 10/8a9fcbafe1ec9fdc66248238987f83a78de853f9c1735897741d2bd151f463829a04b351eeb23f2723bf41cf57b35d0761b1424a11aa6cf62a63833aa7181f17 - languageName: node - linkType: hard - -"ethereumjs-util@npm:6.2.1, ethereumjs-util@npm:^6.0.0, ethereumjs-util@npm:^6.1.0, ethereumjs-util@npm:^6.2.0, ethereumjs-util@npm:^6.2.1": - version: 6.2.1 - resolution: "ethereumjs-util@npm:6.2.1" - dependencies: - "@types/bn.js": "npm:^4.11.3" - bn.js: "npm:^4.11.0" - create-hash: "npm:^1.1.2" - elliptic: "npm:^6.5.2" - ethereum-cryptography: "npm:^0.1.3" - ethjs-util: "npm:0.1.6" - rlp: "npm:^2.2.3" - checksum: 10/dedc8a623e21d1864b09c47f28851fc0fca6233cdefa4755a308507822ce75c893bbb2c3ba422109d1247986ec757941718f06574437e41b0d68604108b03fd0 - languageName: node - linkType: hard - -"ethereumjs-util@npm:^5.0.0": - version: 5.2.1 - resolution: "ethereumjs-util@npm:5.2.1" - dependencies: - bn.js: "npm:^4.11.0" - create-hash: "npm:^1.1.2" - elliptic: "npm:^6.5.2" - ethereum-cryptography: "npm:^0.1.3" - ethjs-util: "npm:^0.1.3" - rlp: "npm:^2.0.0" - safe-buffer: "npm:^5.1.1" - checksum: 10/f3957c7ccb4abe55c894ab1d039ecfbac1ce3025f4adfee61722760440b704f13dd056fdd9eaaa2be1154c17bba152e1c7f93ce91da3d3d1314de9c479003f9b - languageName: node - linkType: hard - -"ethereumjs-util@npm:^7.0.10, ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.4": - version: 7.1.4 - resolution: "ethereumjs-util@npm:7.1.4" - dependencies: - "@types/bn.js": "npm:^5.1.0" - bn.js: "npm:^5.1.2" - create-hash: "npm:^1.1.2" - ethereum-cryptography: "npm:^0.1.3" - rlp: "npm:^2.2.4" - checksum: 10/811aa8e1498e8a503eef14cd035076af83f6dddd065d503075bbb65c873256bf57ac8c668789919567d4833c132f04d0e181a2fc5e9ed7dee38858535faa3dde - languageName: node - linkType: hard - -"ethereumjs-util@npm:^7.0.2, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": - version: 7.1.5 - resolution: "ethereumjs-util@npm:7.1.5" - dependencies: - "@types/bn.js": "npm:^5.1.0" - bn.js: "npm:^5.1.2" - create-hash: "npm:^1.1.2" - ethereum-cryptography: "npm:^0.1.3" - rlp: "npm:^2.2.4" - checksum: 10/f28fc1ebb8f35bf9e418f76f51be737d94d603b912c3e014c4e87cd45ccd1b10bdfef764c8f152574b57e9faa260a18773cbc110f9e0a754d6b3730699e54dc9 - languageName: node - linkType: hard - -"ethereumjs-vm@npm:4.1.3": - version: 4.1.3 - resolution: "ethereumjs-vm@npm:4.1.3" - dependencies: - async: "npm:^2.1.2" - async-eventemitter: "npm:^0.2.2" - core-js-pure: "npm:^3.0.1" - ethereumjs-account: "npm:^3.0.0" - ethereumjs-block: "npm:^2.2.2" - ethereumjs-blockchain: "npm:^4.0.3" - ethereumjs-common: "npm:^1.5.0" - ethereumjs-tx: "npm:^2.1.2" - ethereumjs-util: "npm:^6.2.0" - fake-merkle-patricia-tree: "npm:^1.0.1" - functional-red-black-tree: "npm:^1.0.1" - merkle-patricia-tree: "npm:^2.3.2" - rustbn.js: "npm:~0.2.0" - safe-buffer: "npm:^5.1.1" - util.promisify: "npm:^1.0.0" - checksum: 10/6101649632df0762155d952109d17ae735121009fbad704f83884e6aa5a898153bb4fba9856d218bede8c9bb41fa2c600b6a92e9e3dfcbac230076569a0a1b7e - languageName: node - linkType: hard - -"ethers@npm:6.12.1": - version: 6.12.1 - resolution: "ethers@npm:6.12.1" - dependencies: - "@adraffy/ens-normalize": "npm:1.10.1" - "@noble/curves": "npm:1.2.0" - "@noble/hashes": "npm:1.3.2" - "@types/node": "npm:18.15.13" - aes-js: "npm:4.0.0-beta.5" - tslib: "npm:2.4.0" - ws: "npm:8.5.0" - checksum: 10/2995766164292b531499764d319d753b1f4e1cd7ddb4f26c6557a26e42947d5642a4b3bbeace0b8bb398b909dc22fafa4f52d5190a9bb8180bebf2dd3d4d48a9 - languageName: node - linkType: hard - -"ethers@npm:6.3.0": - version: 6.3.0 - resolution: "ethers@npm:6.3.0" - dependencies: - "@adraffy/ens-normalize": "npm:1.9.0" - "@noble/hashes": "npm:1.1.2" - "@noble/secp256k1": "npm:1.7.1" - aes-js: "npm:4.0.0-beta.3" - tslib: "npm:2.4.0" - ws: "npm:8.5.0" - checksum: 10/45c88344be8a8503ddb498a33a9baec6953809bdc6d424b9e02fe47b2530106f285020e3158857493779fa6b73eb4eec24547a0cb4d65501bf5218400d0a90e0 - languageName: node - linkType: hard - -"ethers@npm:6.8.1": - version: 6.8.1 - resolution: "ethers@npm:6.8.1" - dependencies: - "@adraffy/ens-normalize": "npm:1.10.0" - "@noble/curves": "npm:1.2.0" - "@noble/hashes": "npm:1.3.2" - "@types/node": "npm:18.15.13" - aes-js: "npm:4.0.0-beta.5" - tslib: "npm:2.4.0" - ws: "npm:8.5.0" - checksum: 10/22d17fb038fd48aa23d4c43f4b0a8c20aa1c74676724adb94b52f363f42044b7d14dfa086dd2f881f172f79fcb7108ff161e672e323dcebef9d9ed4d373f072f - languageName: node - linkType: hard - -"ethers@npm:^4.0.32, ethers@npm:^4.0.40": - version: 4.0.49 - resolution: "ethers@npm:4.0.49" - dependencies: - aes-js: "npm:3.0.0" - bn.js: "npm:^4.11.9" - elliptic: "npm:6.5.4" - hash.js: "npm:1.1.3" - js-sha3: "npm:0.5.7" - scrypt-js: "npm:2.0.4" - setimmediate: "npm:1.0.4" - uuid: "npm:2.0.1" - xmlhttprequest: "npm:1.8.0" - checksum: 10/a4cec0254f940a0fb118317d23676faa46eb5540fc0a3b9177b8aef71318f509ed19b8264f102b1a2a32d0256274ecc526fd926bd22a4a4ac25cd8e0e6560f12 - languageName: node - linkType: hard - -"ethers@npm:^5.0.13, ethers@npm:^5.7.1": - version: 5.7.2 - resolution: "ethers@npm:5.7.2" - dependencies: - "@ethersproject/abi": "npm:5.7.0" - "@ethersproject/abstract-provider": "npm:5.7.0" - "@ethersproject/abstract-signer": "npm:5.7.0" - "@ethersproject/address": "npm:5.7.0" - "@ethersproject/base64": "npm:5.7.0" - "@ethersproject/basex": "npm:5.7.0" - "@ethersproject/bignumber": "npm:5.7.0" - "@ethersproject/bytes": "npm:5.7.0" - "@ethersproject/constants": "npm:5.7.0" - "@ethersproject/contracts": "npm:5.7.0" - "@ethersproject/hash": "npm:5.7.0" - "@ethersproject/hdnode": "npm:5.7.0" - "@ethersproject/json-wallets": "npm:5.7.0" - "@ethersproject/keccak256": "npm:5.7.0" - "@ethersproject/logger": "npm:5.7.0" - "@ethersproject/networks": "npm:5.7.1" - "@ethersproject/pbkdf2": "npm:5.7.0" - "@ethersproject/properties": "npm:5.7.0" - "@ethersproject/providers": "npm:5.7.2" - "@ethersproject/random": "npm:5.7.0" - "@ethersproject/rlp": "npm:5.7.0" - "@ethersproject/sha2": "npm:5.7.0" - "@ethersproject/signing-key": "npm:5.7.0" - "@ethersproject/solidity": "npm:5.7.0" - "@ethersproject/strings": "npm:5.7.0" - "@ethersproject/transactions": "npm:5.7.0" - "@ethersproject/units": "npm:5.7.0" - "@ethersproject/wallet": "npm:5.7.0" - "@ethersproject/web": "npm:5.7.1" - "@ethersproject/wordlists": "npm:5.7.0" - checksum: 10/227dfa88a2547c799c0c3c9e92e5e246dd11342f4b495198b3ae7c942d5bf81d3970fcef3fbac974a9125d62939b2d94f3c0458464e702209b839a8e6e615028 - languageName: node - linkType: hard - -"ethjs-unit@npm:0.1.6": - version: 0.1.6 - resolution: "ethjs-unit@npm:0.1.6" - dependencies: - bn.js: "npm:4.11.6" - number-to-bn: "npm:1.7.0" - checksum: 10/35086cb671806992ec36d5dd43ab67e68ad7a9237e42c0e963f9081c88e40147cda86c1a258b0a3180bf2b7bc1960e607c5bcaefdb2196e0f3564acf73276189 - languageName: node - linkType: hard - -"ethjs-util@npm:0.1.6, ethjs-util@npm:^0.1.3, ethjs-util@npm:^0.1.6": - version: 0.1.6 - resolution: "ethjs-util@npm:0.1.6" - dependencies: - is-hex-prefixed: "npm:1.0.0" - strip-hex-prefix: "npm:1.0.0" - checksum: 10/02e1d37f743a78742651a11be35461dfe8ed653f113d630435aada8036e1e199691c2cfffbbf1e800bfdeb14bb34c7ed69fab5d3c727058c1daf3effc6bf6f69 - languageName: node - linkType: hard - -"event-emitter@npm:^0.3.5, event-emitter@npm:~0.3.5": - version: 0.3.5 - resolution: "event-emitter@npm:0.3.5" - dependencies: - d: "npm:1" - es5-ext: "npm:~0.10.14" - checksum: 10/a7f5ea80029193f4869782d34ef7eb43baa49cd397013add1953491b24588468efbe7e3cc9eb87d53f33397e7aab690fd74c079ec440bf8b12856f6bdb6e9396 - languageName: node - linkType: hard - -"event-target-shim@npm:^5.0.0": - version: 5.0.1 - resolution: "event-target-shim@npm:5.0.1" - checksum: 10/49ff46c3a7facbad3decb31f597063e761785d7fdb3920d4989d7b08c97a61c2f51183e2f3a03130c9088df88d4b489b1b79ab632219901f184f85158508f4c8 - languageName: node - linkType: hard - -"eventemitter-asyncresource@npm:^1.0.0": - version: 1.0.0 - resolution: "eventemitter-asyncresource@npm:1.0.0" - checksum: 10/3cfbbc3490bd429a165bff6336289ff810f7df214796f25000d2097a5a0883eae51542a78674916ff99bbd4c66811911b310df1cb4fc96dfc9546ba9dfc89f8f - languageName: node - linkType: hard - -"eventemitter3@npm:4.0.4": - version: 4.0.4 - resolution: "eventemitter3@npm:4.0.4" - checksum: 10/6a85beb36d7ff2363de71aa19a17c24ecde7a92f706347891befc5901793e41ac847ce9c04c96dc0f5095384890cc737e64f21ed334e75c523d2352056fc6a9e - languageName: node - linkType: hard - -"eventemitter3@npm:^4.0.0, eventemitter3@npm:^4.0.7": - version: 4.0.7 - resolution: "eventemitter3@npm:4.0.7" - checksum: 10/8030029382404942c01d0037079f1b1bc8fed524b5849c237b80549b01e2fc49709e1d0c557fa65ca4498fc9e24cff1475ef7b855121fcc15f9d61f93e282346 - languageName: node - linkType: hard - -"eventemitter3@npm:^5.0.1": - version: 5.0.1 - resolution: "eventemitter3@npm:5.0.1" - checksum: 10/ac6423ec31124629c84c7077eed1e6987f6d66c31cf43c6fcbf6c87791d56317ce808d9ead483652436df171b526fc7220eccdc9f3225df334e81582c3cf7dd5 - languageName: node - linkType: hard - -"events-to-array@npm:^1.0.1": - version: 1.1.2 - resolution: "events-to-array@npm:1.1.2" - checksum: 10/4107636c81c9f4dd6fe3545e37cff29c0e772cf806597939e048f43ad0594efc22be2f403c1d7035c04084c9f9389795224d8bc70c0c3df097e0ece21959430a - languageName: node - linkType: hard - -"events@npm:1.1.1": - version: 1.1.1 - resolution: "events@npm:1.1.1" - checksum: 10/524355c4364b4851d53ccf4fdab9570e3953e1f64ebca15554f33e50bebb4e71ab947ac0dee6f4ed5a567ff2eda54b0489b278b4fb7c8ec1f4982150079dfd40 - languageName: node - linkType: hard - -"events@npm:^3.0.0, events@npm:^3.2.0, events@npm:^3.3.0": - version: 3.3.0 - resolution: "events@npm:3.3.0" - checksum: 10/a3d47e285e28d324d7180f1e493961a2bbb4cad6412090e4dec114f4db1f5b560c7696ee8e758f55e23913ede856e3689cd3aa9ae13c56b5d8314cd3b3ddd1be - languageName: node - linkType: hard - -"eventsource@npm:^2.0.2": - version: 2.0.2 - resolution: "eventsource@npm:2.0.2" - checksum: 10/e1c4c3664cebf9efdd55c90818ef847099f298bf521768d479cf22d8a681e666b3042de85327711ba6a8414ac6a04c70d2aeb4f405bba8239a8c36e06a019374 - languageName: node - linkType: hard - -"evp_bytestokey@npm:^1.0.0, evp_bytestokey@npm:^1.0.3": - version: 1.0.3 - resolution: "evp_bytestokey@npm:1.0.3" - dependencies: - md5.js: "npm:^1.3.4" - node-gyp: "npm:latest" - safe-buffer: "npm:^5.1.1" - checksum: 10/ad4e1577f1a6b721c7800dcc7c733fe01f6c310732bb5bf2240245c2a5b45a38518b91d8be2c610611623160b9d1c0e91f1ce96d639f8b53e8894625cf20fa45 - languageName: node - linkType: hard - -"execa@npm:5.1.1, execa@npm:^5.0.0, execa@npm:^5.1.1": - version: 5.1.1 - resolution: "execa@npm:5.1.1" - dependencies: - cross-spawn: "npm:^7.0.3" - get-stream: "npm:^6.0.0" - human-signals: "npm:^2.1.0" - is-stream: "npm:^2.0.0" - merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^4.0.1" - onetime: "npm:^5.1.2" - signal-exit: "npm:^3.0.3" - strip-final-newline: "npm:^2.0.0" - checksum: 10/8ada91f2d70f7dff702c861c2c64f21dfdc1525628f3c0454fd6f02fce65f7b958616cbd2b99ca7fa4d474e461a3d363824e91b3eb881705231abbf387470597 - languageName: node - linkType: hard - -"execa@npm:^0.7.0": - version: 0.7.0 - resolution: "execa@npm:0.7.0" - dependencies: - cross-spawn: "npm:^5.0.1" - get-stream: "npm:^3.0.0" - is-stream: "npm:^1.1.0" - npm-run-path: "npm:^2.0.0" - p-finally: "npm:^1.0.0" - signal-exit: "npm:^3.0.0" - strip-eof: "npm:^1.0.0" - checksum: 10/7c1721de38e51d67cef2367b1f6037c4a89bc64993d93683f9f740fc74d6930dfc92faf2749b917b7337a8d632d7b86a4673400f762bc1fe4a977ea6b0f9055f - languageName: node - linkType: hard - -"execa@npm:^1.0.0": - version: 1.0.0 - resolution: "execa@npm:1.0.0" - dependencies: - cross-spawn: "npm:^6.0.0" - get-stream: "npm:^4.0.0" - is-stream: "npm:^1.1.0" - npm-run-path: "npm:^2.0.0" - p-finally: "npm:^1.0.0" - signal-exit: "npm:^3.0.0" - strip-eof: "npm:^1.0.0" - checksum: 10/9b7a0077ba9d0ecdd41bf2d8644f83abf736e37622e3d1af39dec9d5f2cfa6bf8263301d0df489688dda3873d877f4168c01172cbafed5fffd12c808983515b0 - languageName: node - linkType: hard - -"execa@npm:^4.0.0": - version: 4.1.0 - resolution: "execa@npm:4.1.0" - dependencies: - cross-spawn: "npm:^7.0.0" - get-stream: "npm:^5.0.0" - human-signals: "npm:^1.1.1" - is-stream: "npm:^2.0.0" - merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^4.0.0" - onetime: "npm:^5.1.0" - signal-exit: "npm:^3.0.2" - strip-final-newline: "npm:^2.0.0" - checksum: 10/ed58e41fe424797f3d837c8fb622548eeb72fa03324f2676af95f806568904eb55f196127a097f87d4517cab524c169ece13e6c9e201867de57b089584864b8f - languageName: node - linkType: hard - -"execa@npm:^8.0.1": - version: 8.0.1 - resolution: "execa@npm:8.0.1" - dependencies: - cross-spawn: "npm:^7.0.3" - get-stream: "npm:^8.0.1" - human-signals: "npm:^5.0.0" - is-stream: "npm:^3.0.0" - merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^5.1.0" - onetime: "npm:^6.0.0" - signal-exit: "npm:^4.1.0" - strip-final-newline: "npm:^3.0.0" - checksum: 10/d2ab5fe1e2bb92b9788864d0713f1fce9a07c4594e272c0c97bc18c90569897ab262e4ea58d27a694d288227a2e24f16f5e2575b44224ad9983b799dc7f1098d - languageName: node - linkType: hard - -"exit-hook@npm:^1.0.0": - version: 1.1.1 - resolution: "exit-hook@npm:1.1.1" - checksum: 10/1b4f16da7c202cd336ca07acb052922639182b4e2f1ad4007ed481bb774ce93469f505dec1371d9cd580ac54146a9fd260f053b0e4a48fa87c49fa3dc4a3f144 - languageName: node - linkType: hard - -"exit-on-epipe@npm:~1.0.1": - version: 1.0.1 - resolution: "exit-on-epipe@npm:1.0.1" - checksum: 10/b180aa277aec5bef2609b34e5876061f421a1f81bf343beb213c4d60b382ddcb6b83012833f0ba329d6bc38042685c8d89b1c52ea495b9b6327948ea80627398 - languageName: node - linkType: hard - -"exit@npm:^0.1.2": - version: 0.1.2 - resolution: "exit@npm:0.1.2" - checksum: 10/387555050c5b3c10e7a9e8df5f43194e95d7737c74532c409910e585d5554eaff34960c166643f5e23d042196529daad059c292dcf1fb61b8ca878d3677f4b87 - languageName: node - linkType: hard - -"expand-brackets@npm:^0.1.4": - version: 0.1.5 - resolution: "expand-brackets@npm:0.1.5" - dependencies: - is-posix-bracket: "npm:^0.1.0" - checksum: 10/71b2971027eb026f055a1c310d24d18a266427b84fc18cadddcedb4de2e07aaef6084e252406b20e58f7aa7613f6bfbe6136962955562529a66675bf49bb10d7 - languageName: node - linkType: hard - -"expand-brackets@npm:^2.1.4": - version: 2.1.4 - resolution: "expand-brackets@npm:2.1.4" - dependencies: - debug: "npm:^2.3.3" - define-property: "npm:^0.2.5" - extend-shallow: "npm:^2.0.1" - posix-character-classes: "npm:^0.1.0" - regex-not: "npm:^1.0.0" - snapdragon: "npm:^0.8.1" - to-regex: "npm:^3.0.1" - checksum: 10/aa4acc62084638c761ecdbe178bd3136f01121939f96bbfc3be27c46c66625075f77fe0a446b627c9071b1aaf6d93ccf5bde5ff34b7ef883e4f46067a8e63e41 - languageName: node - linkType: hard - -"expand-template@npm:^2.0.3": - version: 2.0.3 - resolution: "expand-template@npm:2.0.3" - checksum: 10/588c19847216421ed92befb521767b7018dc88f88b0576df98cb242f20961425e96a92cbece525ef28cc5becceae5d544ae0f5b9b5e2aa05acb13716ca5b3099 - languageName: node - linkType: hard - -"expand-tilde@npm:^2.0.0, expand-tilde@npm:^2.0.2": - version: 2.0.2 - resolution: "expand-tilde@npm:2.0.2" - dependencies: - homedir-polyfill: "npm:^1.0.1" - checksum: 10/2efe6ed407d229981b1b6ceb552438fbc9e5c7d6a6751ad6ced3e0aa5cf12f0b299da695e90d6c2ac79191b5c53c613e508f7149e4573abfbb540698ddb7301a - languageName: node - linkType: hard - -"expect@npm:^27.5.1": - version: 27.5.1 - resolution: "expect@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - jest-get-type: "npm:^27.5.1" - jest-matcher-utils: "npm:^27.5.1" - jest-message-util: "npm:^27.5.1" - checksum: 10/65152be11e791361bb8f74b2516b6ba83021ac4a280b16575340a7dbb72be7fb51b021119a3f40f309a36b375cfb05d4854d5d7af3c53a293a342afc7f86bdaa - languageName: node - linkType: hard - -"expect@npm:^29.0.0, expect@npm:^29.6.2": - version: 29.6.2 - resolution: "expect@npm:29.6.2" - dependencies: - "@jest/expect-utils": "npm:^29.6.2" - "@types/node": "npm:*" - jest-get-type: "npm:^29.4.3" - jest-matcher-utils: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - checksum: 10/304472c4c63fc89accdf32a6817c62945efbcb3d536347dd49bc793dfc91f73fd9661411e0cc919f483ef309be589e33dd5bc9a27b55a5d88ae99009ad0df8f7 - languageName: node - linkType: hard - -"expo-modules-autolinking@npm:^0.3.2": - version: 0.3.4 - resolution: "expo-modules-autolinking@npm:0.3.4" - dependencies: - chalk: "npm:^4.1.0" - commander: "npm:^7.2.0" - fast-glob: "npm:^3.2.5" - find-up: "npm:~5.0.0" - fs-extra: "npm:^9.1.0" - bin: - expo-modules-autolinking: bin/expo-modules-autolinking.js - checksum: 10/a13ec57b4018d6ffa3f45c992961645b6660e6311a7c18cf009f32dab6934cb4cd4bd2c9712b89e6e572bc8264418ebae08650f2c78ef666a1f53ac1618f3c0a - languageName: node - linkType: hard - -"expo-modules-core@npm:~0.4.0": - version: 0.4.10 - resolution: "expo-modules-core@npm:0.4.10" - dependencies: - compare-versions: "npm:^3.4.0" - invariant: "npm:^2.2.4" - checksum: 10/6da3b466db558741ca7dc4bc24f930cf1e24d7995bd18d2813229c5d38a46f5a3d76163ccc675ebf0e2610f42a49a2eb913d7880e13195d8e1146e07e0e39e17 - languageName: node - linkType: hard - -"expo-random@npm:*": - version: 13.5.0 - resolution: "expo-random@npm:13.5.0" - dependencies: - base64-js: "npm:^1.3.0" - peerDependencies: - expo: "*" - checksum: 10/702476765cf3ad87f85be8c0a334304a080e3a9d840d03ecb7ad2edf3cbce8cadabe91d980d1d18a85543048365e26361ca387460cf91d9a7d566b240ac0e9cd - languageName: node - linkType: hard - -"exponential-backoff@npm:^3.1.1": - version: 3.1.1 - resolution: "exponential-backoff@npm:3.1.1" - checksum: 10/2d9bbb6473de7051f96790d5f9a678f32e60ed0aa70741dc7fdc96fec8d631124ec3374ac144387604f05afff9500f31a1d45bd9eee4cdc2e4f9ad2d9b9d5dbd - languageName: node - linkType: hard - -"express-http-proxy@npm:1.6.2": - version: 1.6.2 - resolution: "express-http-proxy@npm:1.6.2" - dependencies: - debug: "npm:^3.0.1" - es6-promise: "npm:^4.1.1" - raw-body: "npm:^2.3.0" - checksum: 10/81775c23cb79b40471eeba93904fe57b887ca0ab635b5177a96b0c680afec01eada97694eeedbc73e03c5da31ecf17b9308221e066fc75906c126ad7e25ecdb0 - languageName: node - linkType: hard - -"express-jwt-authz@npm:2.4.1": - version: 2.4.1 - resolution: "express-jwt-authz@npm:2.4.1" - peerDependencies: - "@types/express": ^4.0.0 - express: ^4.0.0 - checksum: 10/e2187939e35d868ca746d2123eab32c22055e55f3fff399e795aa9c20d945d8ee542ff3bd711af19cd2e1ea477e2f219f049aece4a4b126cd281e104ce89bdcd - languageName: node - linkType: hard - -"express-jwt@npm:8.4.1": - version: 8.4.1 - resolution: "express-jwt@npm:8.4.1" - dependencies: - "@types/jsonwebtoken": "npm:^9" - express-unless: "npm:^2.1.3" - jsonwebtoken: "npm:^9.0.0" - checksum: 10/931ad8e98ef86ce73fb4fa37c4fec4dd6d806657d622ae9e5d296182edbb049f578b7a00b746ef762ea016987cba6a5600d191f55a553507e4c1c4543d7783d5 - languageName: node - linkType: hard - -"express-openapi-validator@npm:5.2.0": - version: 5.2.0 - resolution: "express-openapi-validator@npm:5.2.0" - dependencies: - "@apidevtools/json-schema-ref-parser": "npm:^11.6.2" - "@types/multer": "npm:^1.4.11" - ajv: "npm:^8.14.0" - ajv-draft-04: "npm:^1.0.0" - ajv-formats: "npm:^2.1.1" - content-type: "npm:^1.0.5" - json-schema-traverse: "npm:^1.0.0" - lodash.clonedeep: "npm:^4.5.0" - lodash.get: "npm:^4.4.2" - media-typer: "npm:^1.1.0" - multer: "npm:^1.4.5-lts.1" - ono: "npm:^7.1.3" - path-to-regexp: "npm:^6.2.2" - peerDependencies: - express: "*" - checksum: 10/f39ea66819f1d63f7e3ea8e917dfea50bac046cafdd1018d6236870dfdc778408fbd19686cc7f2a4ede9c3fc8a77754caf7543bc449188fc9c3f28b8faf66e74 - languageName: node - linkType: hard - -"express-rate-limit@npm:6.7.0": - version: 6.7.0 - resolution: "express-rate-limit@npm:6.7.0" - peerDependencies: - express: ^4 || ^5 - checksum: 10/0993f63137ba4da1ad3c2b55ff7611c3ca772a79160d9f76305429252c72edfa675aa546069b763e6cb85319e8b0fb8cc20f089f2b79ea96f94230c73b56efc2 - languageName: node - linkType: hard - -"express-unless@npm:^2.1.3": - version: 2.1.3 - resolution: "express-unless@npm:2.1.3" - checksum: 10/c34d4e71740c36586fcdf3d126c1f13af894b0d8bde829d32d072f024344af7077b204f698a07eb9329bf97b076d93047cd0a8bae5902f050376ae29af9122f6 - languageName: node - linkType: hard - -"express-ws@npm:^0.2.1": - version: 0.2.6 - resolution: "express-ws@npm:0.2.6" - dependencies: - url-join: "npm:0.0.1" - ws: "npm:~0.4.31" - checksum: 10/d4891e29f7a760b2c39a3e61d3d5469a02a368edef802c416218d2ae52027bc248646c35823674f30c70bdc581173a49a5e2ea5911d1037421a43fd6f52c067e - languageName: node - linkType: hard - -"express-ws@npm:^4.0.0": - version: 4.0.0 - resolution: "express-ws@npm:4.0.0" - dependencies: - ws: "npm:^5.2.0" - peerDependencies: - express: ^4.0.0 || ^5.0.0-alpha.1 - checksum: 10/5caa16bc6ca109ce4b4380794537d0e915758f3cc9e780f675bc992e843cd554c8deb01cedd75734d8f029b003eac1c32eed4ca885b9a359b8bfefd015d003ec - languageName: node - linkType: hard - -"express@npm:4.21.0": - version: 4.21.0 - resolution: "express@npm:4.21.0" - dependencies: - accepts: "npm:~1.3.8" - array-flatten: "npm:1.1.1" - body-parser: "npm:1.20.3" - content-disposition: "npm:0.5.4" - content-type: "npm:~1.0.4" - cookie: "npm:0.6.0" - cookie-signature: "npm:1.0.6" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - encodeurl: "npm:~2.0.0" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - finalhandler: "npm:1.3.1" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - merge-descriptors: "npm:1.0.3" - methods: "npm:~1.1.2" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - path-to-regexp: "npm:0.1.10" - proxy-addr: "npm:~2.0.7" - qs: "npm:6.13.0" - range-parser: "npm:~1.2.1" - safe-buffer: "npm:5.2.1" - send: "npm:0.19.0" - serve-static: "npm:1.16.2" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - type-is: "npm:~1.6.18" - utils-merge: "npm:1.0.1" - vary: "npm:~1.1.2" - checksum: 10/3b1ee5bc5b1bd996f688702519cebc9b63a24e506965f6e1773268238cfa2c24ffdb38cc3fcb4fde66f77de1c0bebd9ee058dad06bb9c6f084b525f3c09164d3 - languageName: node - linkType: hard - -"express@npm:^4.10.6, express@npm:^4.14.0, express@npm:^4.16.3, express@npm:^4.17.1, express@npm:^4.17.3": - version: 4.18.2 - resolution: "express@npm:4.18.2" - dependencies: - accepts: "npm:~1.3.8" - array-flatten: "npm:1.1.1" - body-parser: "npm:1.20.1" - content-disposition: "npm:0.5.4" - content-type: "npm:~1.0.4" - cookie: "npm:0.5.0" - cookie-signature: "npm:1.0.6" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - finalhandler: "npm:1.2.0" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - merge-descriptors: "npm:1.0.1" - methods: "npm:~1.1.2" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - path-to-regexp: "npm:0.1.7" - proxy-addr: "npm:~2.0.7" - qs: "npm:6.11.0" - range-parser: "npm:~1.2.1" - safe-buffer: "npm:5.2.1" - send: "npm:0.18.0" - serve-static: "npm:1.15.0" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - type-is: "npm:~1.6.18" - utils-merge: "npm:1.0.1" - vary: "npm:~1.1.2" - checksum: 10/869ae89ed6ff4bed7b373079dc58e5dddcf2915a2669b36037ff78c99d675ae930e5fe052b35c24f56557d28a023bb1cbe3e2f2fb87eaab96a1cedd7e597809d - languageName: node - linkType: hard - -"ext@npm:^1.1.2": - version: 1.6.0 - resolution: "ext@npm:1.6.0" - dependencies: - type: "npm:^2.5.0" - checksum: 10/8a72d4d062dcb4803278250cfb4221628d91acd5e569faf4e78c17814aa6686632c3bd1378d822b20630719731c0af19acb729d4f0fc7eebaabcd22fe28bb800 - languageName: node - linkType: hard - -"extend-shallow@npm:^2.0.1": - version: 2.0.1 - resolution: "extend-shallow@npm:2.0.1" - dependencies: - is-extendable: "npm:^0.1.0" - checksum: 10/8fb58d9d7a511f4baf78d383e637bd7d2e80843bd9cd0853649108ea835208fb614da502a553acc30208e1325240bb7cc4a68473021612496bb89725483656d8 - languageName: node - linkType: hard - -"extend-shallow@npm:^3.0.0, extend-shallow@npm:^3.0.2": - version: 3.0.2 - resolution: "extend-shallow@npm:3.0.2" - dependencies: - assign-symbols: "npm:^1.0.0" - is-extendable: "npm:^1.0.1" - checksum: 10/a920b0cd5838a9995ace31dfd11ab5e79bf6e295aa566910ce53dff19f4b1c0fda2ef21f26b28586c7a2450ca2b42d97bd8c0f5cec9351a819222bf861e02461 - languageName: node - linkType: hard - -"extend@npm:^3.0.2, extend@npm:~3.0.2": - version: 3.0.2 - resolution: "extend@npm:3.0.2" - checksum: 10/59e89e2dc798ec0f54b36d82f32a27d5f6472c53974f61ca098db5d4648430b725387b53449a34df38fd0392045434426b012f302b3cc049a6500ccf82877e4e - languageName: node - linkType: hard - -"external-editor@npm:^2.0.4": - version: 2.2.0 - resolution: "external-editor@npm:2.2.0" - dependencies: - chardet: "npm:^0.4.0" - iconv-lite: "npm:^0.4.17" - tmp: "npm:^0.0.33" - checksum: 10/81614ce39aea61b6f5153040c53d943c9ee915f0f459cbf12217766b90465740ccd35f6d463193b9a1437c50fc04615a1a514f64e33e1e310a033fdad449e3eb - languageName: node - linkType: hard - -"external-editor@npm:^3.0.3, external-editor@npm:^3.1.0": - version: 3.1.0 - resolution: "external-editor@npm:3.1.0" - dependencies: - chardet: "npm:^0.7.0" - iconv-lite: "npm:^0.4.24" - tmp: "npm:^0.0.33" - checksum: 10/776dff1d64a1d28f77ff93e9e75421a81c062983fd1544279d0a32f563c0b18c52abbb211f31262e2827e48edef5c9dc8f960d06dd2d42d1654443b88568056b - languageName: node - linkType: hard - -"extglob@npm:^0.3.1": - version: 0.3.2 - resolution: "extglob@npm:0.3.2" - dependencies: - is-extglob: "npm:^1.0.0" - checksum: 10/c1c8d5365fe4992fc5b007140cbb37292ffadcd767cb602606de4d572ff96f38620e42855f8cb75020c050aacf1eeb51212dd6312de46eab42e2200277b5fc45 - languageName: node - linkType: hard - -"extglob@npm:^2.0.4": - version: 2.0.4 - resolution: "extglob@npm:2.0.4" - dependencies: - array-unique: "npm:^0.3.2" - define-property: "npm:^1.0.0" - expand-brackets: "npm:^2.1.4" - extend-shallow: "npm:^2.0.1" - fragment-cache: "npm:^0.2.1" - regex-not: "npm:^1.0.0" - snapdragon: "npm:^0.8.1" - to-regex: "npm:^3.0.1" - checksum: 10/6869edd48d40c322e1cda9bf494ed2407c69a19063fd2897184cb62d6d35c14fa7402b01d9dedd65d77ed1ccc74a291235a702c68b4f28a7314da0cdee97c85b - languageName: node - linkType: hard - -"extsprintf@npm:1.3.0": - version: 1.3.0 - resolution: "extsprintf@npm:1.3.0" - checksum: 10/26967d6c7ecbfb5bc5b7a6c43503dc5fafd9454802037e9fa1665e41f615da4ff5918bd6cb871a3beabed01a31eca1ccd0bdfb41231f50ad50d405a430f78377 - languageName: node - linkType: hard - -"extsprintf@npm:^1.2.0": - version: 1.4.1 - resolution: "extsprintf@npm:1.4.1" - checksum: 10/bfd6d55f3c0c04d826fe0213264b383c03f32825af6b1ff777f3f2dc49467e599361993568d75b7b19a8ea1bb08c8e7cd8c3d87d179ced91bb0dcf81ca6938e0 - languageName: node - linkType: hard - -"eyes@npm:0.1.x": - version: 0.1.8 - resolution: "eyes@npm:0.1.8" - checksum: 10/58480c1f4c8e80ae9d4147afa0e0cc3403e5a3d1fa9e0c17dd8418f87273762c40ab035919ed407f6ed0992086495b93ff7163eb2a1027f58ae70e3c847d6c08 - languageName: node - linkType: hard - -"fabric-ca-client@npm:2.2.20": - version: 2.2.20 - resolution: "fabric-ca-client@npm:2.2.20" - dependencies: - fabric-common: "npm:2.2.20" - jsrsasign: "npm:^10.5.25" - url: "npm:^0.11.0" - winston: "npm:^2.4.5" - checksum: 10/1035323a4fc9697b569a4a5ae89d4f60adf6cd4e7ab415a2744d97e5ad478c21ba928f18bc3e241189975e14c290d1e878bc39305ea1f8c24958561ceaf97d02 - languageName: node - linkType: hard - -"fabric-ca-client@npm:2.5.0-snapshot.23": - version: 2.5.0-snapshot.23 - resolution: "fabric-ca-client@npm:2.5.0-snapshot.23" - dependencies: - fabric-common: "npm:2.5.0-snapshot.23" - jsrsasign: "npm:^10.5.25" - url: "npm:^0.11.0" - winston: "npm:^2.4.5" - checksum: 10/17190473b53f1bea3ef342f39375f416131dfe75feb56a0328091c119d63e82e97e0f432faa49b54ea64a54c18b805c45468ae955f360dd9b5ddff4dd54090b0 - languageName: node - linkType: hard - -"fabric-common@npm:2.2.20": - version: 2.2.20 - resolution: "fabric-common@npm:2.2.20" - dependencies: - callsite: "npm:^1.0.0" - elliptic: "npm:^6.5.4" - fabric-protos: "npm:2.2.20" - js-sha3: "npm:^0.9.2" - jsrsasign: "npm:^10.5.25" - long: "npm:^5.2.3" - nconf: "npm:^0.12.0" - pkcs11js: "npm:^1.3.0" - promise-settle: "npm:^0.3.0" - sjcl: "npm:^1.0.8" - winston: "npm:^2.4.5" - yn: "npm:^4.0.0" - dependenciesMeta: - pkcs11js: - optional: true - checksum: 10/318a45ee131667fa2c18302e10be4a473b5d3037cef99f4f5f4d430ccaa6865e94fb7fd45bfda9f353c56ba52131c4adba0fcfc32d8b048c1df4909948d1a8b1 - languageName: node - linkType: hard - -"fabric-common@npm:2.5.0-snapshot.23": - version: 2.5.0-snapshot.23 - resolution: "fabric-common@npm:2.5.0-snapshot.23" - dependencies: - callsite: "npm:^1.0.0" - elliptic: "npm:^6.5.4" - fabric-protos: "npm:2.5.0-snapshot.23" - js-sha3: "npm:^0.8.0" - jsrsasign: "npm:^10.5.25" - nconf: "npm:^0.12.0" - pkcs11js: "npm:^1.0.6" - promise-settle: "npm:^0.3.0" - sjcl: "npm:^1.0.8" - winston: "npm:^2.4.5" - yn: "npm:^4.0.0" - dependenciesMeta: - pkcs11js: - optional: true - checksum: 10/380ffd503a48f4d7d6a6b28fd14df15bf1960917d0ac4a2e6331a77b517a8813c7b1cb227abda7bf0847060698c43abcc7586a7414ef262f881c8eb5c93e4b30 - languageName: node - linkType: hard - -"fabric-network@npm:2.2.20": - version: 2.2.20 - resolution: "fabric-network@npm:2.2.20" - dependencies: - fabric-common: "npm:2.2.20" - fabric-protos: "npm:2.2.20" - long: "npm:^5.2.3" - nano: "npm:^10.1.2" - checksum: 10/bdf7a3102eee4d24d996731b1fce4bedaaee16482ef102998195064bbc955eeb06955af49704b4ce3e198b2b41b4919ab5e9995808cad8ac5788b56a2a425d44 - languageName: node - linkType: hard - -"fabric-network@npm:2.5.0-snapshot.23": - version: 2.5.0-snapshot.23 - resolution: "fabric-network@npm:2.5.0-snapshot.23" - dependencies: - fabric-common: "npm:2.5.0-snapshot.23" - fabric-protos: "npm:2.5.0-snapshot.23" - nano: "npm:^10.0.0" - checksum: 10/ec91b2bc5f72f256c343ab285bfe4ef2ff7be686e4af024166f2dcedbd8defb1983c1597a21c9156b8812e216f1f9a98749d2b6c4af691a46df767ef12958f7d - languageName: node - linkType: hard - -"fabric-protos@npm:2.2.20": - version: 2.2.20 - resolution: "fabric-protos@npm:2.2.20" - dependencies: - "@grpc/grpc-js": "npm:~1.9.0" - "@grpc/proto-loader": "npm:^0.7.0" - long: "npm:^5.2.3" - protobufjs: "npm:^7.2.0" - checksum: 10/241e79bcca2bdbf7c92ff527f093794978328863bead70c81cc603ffc00c547db91c6cb03d1f6ac6c2b3e18ab5a7a69b77b7d19dcfcc5a5961bab39112fa1aed - languageName: node - linkType: hard - -"fabric-protos@npm:2.5.0-snapshot.23": - version: 2.5.0-snapshot.23 - resolution: "fabric-protos@npm:2.5.0-snapshot.23" - dependencies: - "@grpc/grpc-js": "npm:~1.7.3" - "@grpc/proto-loader": "npm:^0.7.0" - protobufjs: "npm:^7.0.0" - checksum: 10/11b902c96b9c087544629f4cd83fe76e091732e15bb4db69b67c87e6a3e0e4d13c05474347cbda35a12d99269877eea29a4aba278085652994ef3c84c8011de2 - languageName: node - linkType: hard - -"fake-merkle-patricia-tree@npm:^1.0.1": - version: 1.0.1 - resolution: "fake-merkle-patricia-tree@npm:1.0.1" - dependencies: - checkpoint-store: "npm:^1.1.0" - checksum: 10/db445809b41a3b99db604cfd943a894a1a10d6e0fe50d4192331fc9b411ef88f544c33c40cdbf5b04d57633799d13eaf2a690c501b026863539acb941880321c - languageName: node - linkType: hard - -"fast-check@npm:3.1.1": - version: 3.1.1 - resolution: "fast-check@npm:3.1.1" - dependencies: - pure-rand: "npm:^5.0.1" - checksum: 10/54b89e554c86a900534aa342638d7258120d243104e67e51894b091c5c0a297e96f772564e8a88d6486aa802858db90ff4bc7f9501198b7fcaedd48fc081f5bc - languageName: node - linkType: hard - -"fast-content-type-parse@npm:^1.1.0": - version: 1.1.0 - resolution: "fast-content-type-parse@npm:1.1.0" - checksum: 10/8637228a19b11296992af5d9b5f5ae84c6f27a465cf36a901b303b784ce0ca6f10502375da59958eb2b9c4949b98e5cc460ecb4bd777d22c3fa236c1e8da1ed8 - languageName: node - linkType: hard - -"fast-decode-uri-component@npm:^1.0.1": - version: 1.0.1 - resolution: "fast-decode-uri-component@npm:1.0.1" - checksum: 10/4b6ed26974414f688be4a15eab6afa997bad4a7c8605cb1deb928b28514817b4523a1af0fa06621c6cbfedb7e5615144c2c3e7512860e3a333a31a28d537dca7 - languageName: node - linkType: hard - -"fast-deep-equal@npm:^1.0.0": - version: 1.1.0 - resolution: "fast-deep-equal@npm:1.1.0" - checksum: 10/69b4c9534d9805f13a341aa72f69641d0b9ae3cc8beb25c64e68a257241c7bb34370266db27ae4fc3c4da0518448c01a5f587a096a211471c86a38facd9a1486 - languageName: node - linkType: hard - -"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": - version: 3.1.3 - resolution: "fast-deep-equal@npm:3.1.3" - checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d - languageName: node - linkType: hard - -"fast-diff@npm:^1.1.2": - version: 1.2.0 - resolution: "fast-diff@npm:1.2.0" - checksum: 10/f62419b3d770f201d51c3ee8c4443b752b3ba2d548a6639026b7e09a08203ed2699a8d1fe21efcb8c5186135002d5d2916c12a687cac63785626456a92915adc - languageName: node - linkType: hard - -"fast-equals@npm:^5.0.1": - version: 5.0.1 - resolution: "fast-equals@npm:5.0.1" - checksum: 10/9dc1ef767903600e5694a89a787782fc3a4f56cc04d235afc13616c848c33563b8f415b1c6a248b2a236424f624aa1a7513f46b7fa69590a640e7784f1296bce - languageName: node - linkType: hard - -"fast-fifo@npm:^1.0.0": - version: 1.1.0 - resolution: "fast-fifo@npm:1.1.0" - checksum: 10/895f4c9873a4d5059dfa244aa0dde2b22ee563fd673d85b638869715f92244f9d6469bc0873bcb40554d28c51cbc7590045718462cfda1da503b1c6985815209 - languageName: node - linkType: hard - -"fast-glob@npm:3.3.1, fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.5, fast-glob@npm:^3.3.0": - version: 3.3.1 - resolution: "fast-glob@npm:3.3.1" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.4" - checksum: 10/51bcd15472879dfe51d4b01c5b70bbc7652724d39cdd082ba11276dbd7d84db0f6b33757e1938af8b2768a4bf485d9be0c89153beae24ee8331d6dcc7550379f - languageName: node - linkType: hard - -"fast-glob@npm:3.3.2, fast-glob@npm:^3.3.2": - version: 3.3.2 - resolution: "fast-glob@npm:3.3.2" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.4" - checksum: 10/222512e9315a0efca1276af9adb2127f02105d7288fa746145bf45e2716383fb79eb983c89601a72a399a56b7c18d38ce70457c5466218c5f13fad957cee16df - languageName: node - linkType: hard - -"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": - version: 3.2.11 - resolution: "fast-glob@npm:3.2.11" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.4" - checksum: 10/6b736d92a47f27218a85bf184a4ccab9f707398f86711bf84d730243b10a999a85f79afc526133c044ebebfcb42a68d09f769fdbedcc00680ddd56e56a56483a - languageName: node - linkType: hard - -"fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": - version: 2.1.0 - resolution: "fast-json-stable-stringify@npm:2.1.0" - checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e - languageName: node - linkType: hard - -"fast-json-stringify@npm:^2.7.10": - version: 2.7.13 - resolution: "fast-json-stringify@npm:2.7.13" - dependencies: - ajv: "npm:^6.11.0" - deepmerge: "npm:^4.2.2" - rfdc: "npm:^1.2.0" - string-similarity: "npm:^4.0.1" - checksum: 10/c9c9f4cd7313b242ba313d77d7a5eff086889aec7f018459c770231c170e311dc0d3f7977a9705b83cd92d4091274e4fa750c43992653ebd6551660fb617154b - languageName: node - linkType: hard - -"fast-json-stringify@npm:^5.7.0, fast-json-stringify@npm:^5.8.0": - version: 5.16.1 - resolution: "fast-json-stringify@npm:5.16.1" - dependencies: - "@fastify/merge-json-schemas": "npm:^0.1.0" - ajv: "npm:^8.10.0" - ajv-formats: "npm:^3.0.1" - fast-deep-equal: "npm:^3.1.3" - fast-uri: "npm:^2.1.0" - json-schema-ref-resolver: "npm:^1.0.1" - rfdc: "npm:^1.2.0" - checksum: 10/7ae834a926770c7ea5469915e78720c0e0d7a5d4bbe5410f4d22b7c1b422c97ba1a5a1987234ed356dd25de8c9df2fa1bf5a4de3482973cd1100f2d55e5f617d - languageName: node - linkType: hard - -"fast-levenshtein@npm:^2.0.6, fast-levenshtein@npm:~2.0.6": - version: 2.0.6 - resolution: "fast-levenshtein@npm:2.0.6" - checksum: 10/eb7e220ecf2bab5159d157350b81d01f75726a4382f5a9266f42b9150c4523b9795f7f5d9fbbbeaeac09a441b2369f05ee02db48ea938584205530fe5693cfe1 - languageName: node - linkType: hard - -"fast-printf@npm:^1.6.9": - version: 1.6.9 - resolution: "fast-printf@npm:1.6.9" - dependencies: - boolean: "npm:^3.1.4" - checksum: 10/fbb20bf41eccf7771441226f17d5488fecdf84977092628b2863be38ae1c482ca41e70fc1d8517b9f18ee3c9014cdbdb677812de711765796656d4f9df07bd5f - languageName: node - linkType: hard - -"fast-querystring@npm:^1.0.0": - version: 1.1.2 - resolution: "fast-querystring@npm:1.1.2" - dependencies: - fast-decode-uri-component: "npm:^1.0.1" - checksum: 10/981da9b914f2b639dc915bdfa4f34ab028b967d428f02fbd293d99258593fde69c48eea73dfa03ced088268e0a8045c642e8debcd9b4821ebd125e130a0430c7 - languageName: node - linkType: hard - -"fast-redact@npm:^3.1.1": - version: 3.5.0 - resolution: "fast-redact@npm:3.5.0" - checksum: 10/24b27e2023bd5a62f908d97a753b1adb8d89206b260f97727728e00b693197dea2fc2aa3711147a385d0ec6e713569fd533df37a4ef947e08cb65af3019c7ad5 - languageName: node - linkType: hard - -"fast-safe-stringify@npm:2.1.1, fast-safe-stringify@npm:^2.0.7, fast-safe-stringify@npm:^2.1.1": - version: 2.1.1 - resolution: "fast-safe-stringify@npm:2.1.1" - checksum: 10/dc1f063c2c6ac9533aee14d406441f86783a8984b2ca09b19c2fe281f9ff59d315298bc7bc22fd1f83d26fe19ef2f20e2ddb68e96b15040292e555c5ced0c1e4 - languageName: node - linkType: hard - -"fast-text-encoding@npm:^1.0.3": - version: 1.0.6 - resolution: "fast-text-encoding@npm:1.0.6" - checksum: 10/f7b9e2e7a21e4ae5f4b8d3729850be83fb45052b28c9c38c09b8366463a291d6dc5448359238bdaf87f6a9e907d5895a94319a2c5e0e9f0786859ad6312d1d06 - languageName: node - linkType: hard - -"fast-uri@npm:^2.0.0, fast-uri@npm:^2.1.0": - version: 2.4.0 - resolution: "fast-uri@npm:2.4.0" - checksum: 10/07338f5665c29697ed5359c8010e58450b5c3fee2e9a3d6457e8b4a045995a36a7b9062c9849dad4ffe8959d3e150beccb78beecaab84f6b5f0976a2360f3028 - languageName: node - linkType: hard - -"fast-uri@npm:^3.0.1": - version: 3.0.1 - resolution: "fast-uri@npm:3.0.1" - checksum: 10/e8ee4712270de0d29eb0fbf41ffad0ac80952e8797be760e8bb62c4707f08f50a86fe2d7829681ca133c07d6eb4b4a75389a5fc36674c5b254a3ac0891a68fc7 - languageName: node - linkType: hard - -"fastest-levenshtein@npm:^1.0.12": - version: 1.0.12 - resolution: "fastest-levenshtein@npm:1.0.12" - checksum: 10/e1a013698dd1d302c7a78150130c7d50bb678c2c2f8839842a796d66cc7cdf50ea6b3d7ca930b0c8e7e8c2cd84fea8ab831023b382f7aab6922c318c1451beab - languageName: node - linkType: hard - -"fastify@npm:4.28.1": - version: 4.28.1 - resolution: "fastify@npm:4.28.1" - dependencies: - "@fastify/ajv-compiler": "npm:^3.5.0" - "@fastify/error": "npm:^3.4.0" - "@fastify/fast-json-stringify-compiler": "npm:^4.3.0" - abstract-logging: "npm:^2.0.1" - avvio: "npm:^8.3.0" - fast-content-type-parse: "npm:^1.1.0" - fast-json-stringify: "npm:^5.8.0" - find-my-way: "npm:^8.0.0" - light-my-request: "npm:^5.11.0" - pino: "npm:^9.0.0" - process-warning: "npm:^3.0.0" - proxy-addr: "npm:^2.0.7" - rfdc: "npm:^1.3.0" - secure-json-parse: "npm:^2.7.0" - semver: "npm:^7.5.4" - toad-cache: "npm:^3.3.0" - checksum: 10/8a749dd540609579258cd0471c521696ed16bf66e34d46babbbed9d9a184bd7a378c2ec87a233e382071c1c91b223db0a1ad1a7f9dc8a8f2240aaf8e173ed597 - languageName: node - linkType: hard - -"fastq@npm:^1.17.1": - version: 1.17.1 - resolution: "fastq@npm:1.17.1" - dependencies: - reusify: "npm:^1.0.4" - checksum: 10/a443180068b527dd7b3a63dc7f2a47ceca2f3e97b9c00a1efe5538757e6cc4056a3526df94308075d7727561baf09ebaa5b67da8dcbddb913a021c5ae69d1f69 - languageName: node - linkType: hard - -"fastq@npm:^1.6.0": - version: 1.13.0 - resolution: "fastq@npm:1.13.0" - dependencies: - reusify: "npm:^1.0.4" - checksum: 10/0902cb9b81accf34e5542612c8a1df6c6ea47674f85bcc9cdc38795a28b53e4a096f751cfcf4fb25d2ea42fee5447499ba6cf5af5d0209297e1d1fd4dd551bb6 - languageName: node - linkType: hard - -"faye-websocket@npm:^0.11.3": - version: 0.11.4 - resolution: "faye-websocket@npm:0.11.4" - dependencies: - websocket-driver: "npm:>=0.5.1" - checksum: 10/22433c14c60925e424332d2794463a8da1c04848539b5f8db5fced62a7a7c71a25335a4a8b37334e3a32318835e2b87b1733d008561964121c4a0bd55f0878c3 - languageName: node - linkType: hard - -"fb-watchman@npm:^2.0.0": - version: 2.0.1 - resolution: "fb-watchman@npm:2.0.1" - dependencies: - bser: "npm:2.1.1" - checksum: 10/9a03efc7d41ce3ca3d799d63505a1f7312caddf4e7737d39f2165bfe4872cbd4b87eccc9e6c57229ea08f14b4d7187896da31a7270b8da7a4aaa8fba2d3d1c42 - languageName: node - linkType: hard - -"fd-slicer@npm:~1.1.0": - version: 1.1.0 - resolution: "fd-slicer@npm:1.1.0" - dependencies: - pend: "npm:~1.2.0" - checksum: 10/db3e34fa483b5873b73f248e818f8a8b59a6427fd8b1436cd439c195fdf11e8659419404826059a642b57d18075c856d06d6a50a1413b714f12f833a9341ead3 - languageName: node - linkType: hard - -"fecha@npm:^4.2.0": - version: 4.2.1 - resolution: "fecha@npm:4.2.1" - checksum: 10/6cf959d41a4c68d5b3296d9621e0d5b7c8ee6a5ea51f11b468742a5533b74d635dd12d2edafae0b29c9df060d4d650d1c30d415a14bdaae8fc1b5c836451fbb8 - languageName: node - linkType: hard - -"fetch-blob@npm:^2.1.1": - version: 2.1.2 - resolution: "fetch-blob@npm:2.1.2" - peerDependenciesMeta: - domexception: - optional: true - checksum: 10/22d4487ce78ea4e52b432b0057d8d42922d5d93c0374b0bc2692cebdcb11bf8fac4f6d141b31f1633db1e9212effd38385adbd765a2c7412a621307058499214 - languageName: node - linkType: hard - -"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4": - version: 3.2.0 - resolution: "fetch-blob@npm:3.2.0" - dependencies: - node-domexception: "npm:^1.0.0" - web-streams-polyfill: "npm:^3.0.3" - checksum: 10/5264ecceb5fdc19eb51d1d0359921f12730941e333019e673e71eb73921146dceabcb0b8f534582be4497312d656508a439ad0f5edeec2b29ab2e10c72a1f86b - languageName: node - linkType: hard - -"fetch-cookie@npm:0.11.0": - version: 0.11.0 - resolution: "fetch-cookie@npm:0.11.0" - dependencies: - tough-cookie: "npm:^2.3.3 || ^3.0.1 || ^4.0.0" - checksum: 10/0d2082cb7de34c1e566a7c22ab844c6e9e6a8f8c9c1bc7a62382931b4bb99f0ff6c00324ec00874728c57cfd0c655c6fde62badcae019f2e5bb220c5726fdd17 - languageName: node - linkType: hard - -"figures@npm:2.0.0, figures@npm:^2.0.0": - version: 2.0.0 - resolution: "figures@npm:2.0.0" - dependencies: - escape-string-regexp: "npm:^1.0.5" - checksum: 10/0e5bba8d2b8847c6844a476113d8d283af8757143d7760cc1a5422cceec5e8dd68c15ba50e0847597bc2c4e3865711657aeef394478c6ddce8aed7e0cd18beca - languageName: node - linkType: hard - -"figures@npm:^1.3.5": - version: 1.7.0 - resolution: "figures@npm:1.7.0" - dependencies: - escape-string-regexp: "npm:^1.0.5" - object-assign: "npm:^4.1.0" - checksum: 10/3a815f8a3b488f818e661694112b4546ddff799aa6a07c864c46dadff923af74021f84d42ded402432a98c3208acebf2d096f3a7cc3d1a7b19a2cdc9cbcaea2e - languageName: node - linkType: hard - -"figures@npm:^3.0.0, figures@npm:^3.2.0": - version: 3.2.0 - resolution: "figures@npm:3.2.0" - dependencies: - escape-string-regexp: "npm:^1.0.5" - checksum: 10/a3bf94e001be51d3770500789157f067218d4bc681a65e1f69d482de15120bcac822dceb1a7b3803f32e4e3a61a46df44f7f2c8ba95d6375e7491502e0dd3d97 - languageName: node - linkType: hard - -"file-entry-cache@npm:^2.0.0": - version: 2.0.0 - resolution: "file-entry-cache@npm:2.0.0" - dependencies: - flat-cache: "npm:^1.2.1" - object-assign: "npm:^4.0.1" - checksum: 10/5417582696fae1aa2a30697538169d955e29640038a4b6dc1af946d19508c5af9e765059eb1f58c23d9e09765cbc3bd56aaeda230dcb871331d8d2a34a16f30f - languageName: node - linkType: hard - -"file-entry-cache@npm:^6.0.1": - version: 6.0.1 - resolution: "file-entry-cache@npm:6.0.1" - dependencies: - flat-cache: "npm:^3.0.4" - checksum: 10/099bb9d4ab332cb93c48b14807a6918a1da87c45dce91d4b61fd40e6505d56d0697da060cb901c729c90487067d93c9243f5da3dc9c41f0358483bfdebca736b - languageName: node - linkType: hard - -"file-entry-cache@npm:^8.0.0": - version: 8.0.0 - resolution: "file-entry-cache@npm:8.0.0" - dependencies: - flat-cache: "npm:^4.0.0" - checksum: 10/afe55c4de4e0d226a23c1eae62a7219aafb390859122608a89fa4df6addf55c7fd3f1a2da6f5b41e7cdff496e4cf28bbd215d53eab5c817afa96d2b40c81bfb0 - languageName: node - linkType: hard - -"file-loader@npm:^6.2.0": - version: 6.2.0 - resolution: "file-loader@npm:6.2.0" - dependencies: - loader-utils: "npm:^2.0.0" - schema-utils: "npm:^3.0.0" - peerDependencies: - webpack: ^4.0.0 || ^5.0.0 - checksum: 10/3a854be3a7501bdb0fd8a1c0d45c156c0dc8f0afced07cbdac0b13a79c2f2a03f7770d68cb555ff30b5ea7c20719df34e1b2bd896c93e3138ee31f0bdc560310 - languageName: node - linkType: hard - -"file-type@npm:^3.8.0": - version: 3.9.0 - resolution: "file-type@npm:3.9.0" - checksum: 10/1c8bc99bbb9cfcf13d3489e0c0250188dde622658b5a990f2ba09e6c784f183556b37b7de22104b4b0fd87f478ce12f8dc199b988616ce7cdcb41248dc0a79f9 - languageName: node - linkType: hard - -"file-type@npm:^5.2.0": - version: 5.2.0 - resolution: "file-type@npm:5.2.0" - checksum: 10/73b44eaba7a3e0684d35f24bb3f98ea8a943bf897e103768371b747b0714618301411e66ceff717c866db780af6f5bb1a3da15b744c2e04fa83d605a0682b72b - languageName: node - linkType: hard - -"file-type@npm:^6.1.0": - version: 6.2.0 - resolution: "file-type@npm:6.2.0" - checksum: 10/c7214c3cf6c72a4ed02b473a792841b4bf626a8e95bb010bd8679016b86e5bf52117264c3133735a8424bfde378c3a39b90e1f4902f5f294c41de4e81ec85fdc - languageName: node - linkType: hard - -"file-uri-to-path@npm:1.0.0": - version: 1.0.0 - resolution: "file-uri-to-path@npm:1.0.0" - checksum: 10/b648580bdd893a008c92c7ecc96c3ee57a5e7b6c4c18a9a09b44fb5d36d79146f8e442578bc0e173dc027adf3987e254ba1dfd6e3ec998b7c282873010502144 - languageName: node - linkType: hard - -"filelist@npm:^1.0.4": - version: 1.0.4 - resolution: "filelist@npm:1.0.4" - dependencies: - minimatch: "npm:^5.0.1" - checksum: 10/4b436fa944b1508b95cffdfc8176ae6947b92825483639ef1b9a89b27d82f3f8aa22b21eed471993f92709b431670d4e015b39c087d435a61e1bb04564cf51de - languageName: node - linkType: hard - -"filename-regex@npm:^2.0.0": - version: 2.0.1 - resolution: "filename-regex@npm:2.0.1" - checksum: 10/ac181f8184cf49d2f08889a446995537c3967e6f6195752d903b69c7d85f134425fb1446c4e384e77390bac488b60a9658805debc5a91e8c0bc9f81340505371 - languageName: node - linkType: hard - -"filesize@npm:^8.0.6": - version: 8.0.7 - resolution: "filesize@npm:8.0.7" - checksum: 10/e35f1799c314cef49a585af82fe2d15b362f743a74c95f06e3dd99cf0334ca45516ed144f6a58649ca0e2e5e63844c0ef476d9374d5d43736d26f7c13aa49dad - languageName: node - linkType: hard - -"filing-cabinet@npm:^4.1.6": - version: 4.2.0 - resolution: "filing-cabinet@npm:4.2.0" - dependencies: - app-module-path: "npm:^2.2.0" - commander: "npm:^10.0.1" - enhanced-resolve: "npm:^5.14.1" - is-relative-path: "npm:^1.0.2" - module-definition: "npm:^5.0.1" - module-lookup-amd: "npm:^8.0.5" - resolve: "npm:^1.22.3" - resolve-dependency-path: "npm:^3.0.2" - sass-lookup: "npm:^5.0.1" - stylus-lookup: "npm:^5.0.1" - tsconfig-paths: "npm:^4.2.0" - typescript: "npm:^5.0.4" - bin: - filing-cabinet: bin/cli.js - checksum: 10/df533d35634608baec943d02ecef346746e9e297cb8cce4ad73e3f035e3e7806f0ce447301a6ef7f6c1a62718a196675c94edff2e8e13a790c82ec8c5f902b5a - languageName: node - linkType: hard - -"fill-range@npm:^7.1.1": - version: 7.1.1 - resolution: "fill-range@npm:7.1.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea - languageName: node - linkType: hard - -"filter-obj@npm:^1.1.0": - version: 1.1.0 - resolution: "filter-obj@npm:1.1.0" - checksum: 10/9d681939eec2b4b129cb4f307b7e93d954a0657421d4e5357d86093b26d3f4f570909ed43717dcfd62428b3cf8cddd9841b35f9d40d12ac62cfabaa677942593 - languageName: node - linkType: hard - -"filter-obj@npm:^2.0.2": - version: 2.0.2 - resolution: "filter-obj@npm:2.0.2" - checksum: 10/ab0ac143367eac21020cbb04d495014649d17ea642c5308f6710a7238fc502c1a30291a7d8b28edd7e59a3fe3589cc6988be64d5cd125b881892dfbc5e9d45d8 - languageName: node - linkType: hard - -"finalhandler@npm:1.2.0": - version: 1.2.0 - resolution: "finalhandler@npm:1.2.0" - dependencies: - debug: "npm:2.6.9" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - statuses: "npm:2.0.1" - unpipe: "npm:~1.0.0" - checksum: 10/635718cb203c6d18e6b48dfbb6c54ccb08ea470e4f474ddcef38c47edcf3227feec316f886dd701235997d8af35240cae49856721ce18f539ad038665ebbf163 - languageName: node - linkType: hard - -"finalhandler@npm:1.3.1": - version: 1.3.1 - resolution: "finalhandler@npm:1.3.1" - dependencies: - debug: "npm:2.6.9" - encodeurl: "npm:~2.0.0" - escape-html: "npm:~1.0.3" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - statuses: "npm:2.0.1" - unpipe: "npm:~1.0.0" - checksum: 10/4babe72969b7373b5842bc9f75c3a641a4d0f8eb53af6b89fa714d4460ce03fb92b28de751d12ba415e96e7e02870c436d67412120555e2b382640535697305b - languageName: node - linkType: hard - -"find-cache-dir@npm:^0.1.1": - version: 0.1.1 - resolution: "find-cache-dir@npm:0.1.1" - dependencies: - commondir: "npm:^1.0.1" - mkdirp: "npm:^0.5.1" - pkg-dir: "npm:^1.0.0" - checksum: 10/9a211a32f671ce55786088e6607ec55b79e1e64ac6aaa444754b438521ae43cf77bf0285a503153be8c73e40d89da565bd6e5704d26b33d7768bf2c21a44266a - languageName: node - linkType: hard - -"find-cache-dir@npm:^2.0.0": - version: 2.1.0 - resolution: "find-cache-dir@npm:2.1.0" - dependencies: - commondir: "npm:^1.0.1" - make-dir: "npm:^2.0.0" - pkg-dir: "npm:^3.0.0" - checksum: 10/60ad475a6da9f257df4e81900f78986ab367d4f65d33cf802c5b91e969c28a8762f098693d7a571b6e4dd4c15166c2da32ae2d18b6766a18e2071079448fdce4 - languageName: node - linkType: hard - -"find-cache-dir@npm:^3.2.0, find-cache-dir@npm:^3.3.1": - version: 3.3.2 - resolution: "find-cache-dir@npm:3.3.2" - dependencies: - commondir: "npm:^1.0.1" - make-dir: "npm:^3.0.2" - pkg-dir: "npm:^4.1.0" - checksum: 10/3907c2e0b15132704ed67083686cd3e68ab7d9ecc22e50ae9da20678245d488b01fa22c0e34c0544dc6edc4354c766f016c8c186a787be7c17f7cde8c5281e85 - languageName: node - linkType: hard - -"find-cache-dir@npm:^4.0.0": - version: 4.0.0 - resolution: "find-cache-dir@npm:4.0.0" - dependencies: - common-path-prefix: "npm:^3.0.0" - pkg-dir: "npm:^7.0.0" - checksum: 10/52a456a80deeb27daa3af6e06059b63bdb9cc4af4d845fc6d6229887e505ba913cd56000349caa60bc3aa59dacdb5b4c37903d4ba34c75102d83cab330b70d2f - languageName: node - linkType: hard - -"find-my-way@npm:^8.0.0": - version: 8.2.2 - resolution: "find-my-way@npm:8.2.2" - dependencies: - fast-deep-equal: "npm:^3.1.3" - fast-querystring: "npm:^1.0.0" - safe-regex2: "npm:^3.1.0" - checksum: 10/8a3e7531a7471d1ea93e77d4e486f4ca8c42fc0349efaaefba197cabf4e2fa62f4ae65866b34702eb74c7f2caf9121d26e04c9f4b25db76310b5399a6db7f5a5 - languageName: node - linkType: hard - -"find-root@npm:^1.0.0, find-root@npm:^1.1.0": - version: 1.1.0 - resolution: "find-root@npm:1.1.0" - checksum: 10/caa799c976a14925ba7f31ca1a226fe73d3aa270f4f1b623fcfeb1c6e263111db4beb807d8acd31bd4d48d44c343b93688a9288dfbccca27463c36a0301b0bb9 - languageName: node - linkType: hard - -"find-up-simple@npm:^1.0.0": - version: 1.0.0 - resolution: "find-up-simple@npm:1.0.0" - checksum: 10/91c3d51c1111b5eb4e6e6d71d21438f6571a37a69dc288d4222b98996756e2f472fa5393a4dddb5e1a84929405d87e86f4bdce798ba84ee513b79854960ec140 - languageName: node - linkType: hard - -"find-up@npm:5.0.0, find-up@npm:^5.0.0, find-up@npm:~5.0.0": - version: 5.0.0 - resolution: "find-up@npm:5.0.0" - dependencies: - locate-path: "npm:^6.0.0" - path-exists: "npm:^4.0.0" - checksum: 10/07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 - languageName: node - linkType: hard - -"find-up@npm:^1.0.0": - version: 1.1.2 - resolution: "find-up@npm:1.1.2" - dependencies: - path-exists: "npm:^2.0.0" - pinkie-promise: "npm:^2.0.0" - checksum: 10/a2cb9f4c9f06ee3a1e92ed71d5aed41ac8ae30aefa568132f6c556fac7678a5035126153b59eaec68da78ac409eef02503b2b059706bdbf232668d7245e3240a - languageName: node - linkType: hard - -"find-up@npm:^2.0.0, find-up@npm:^2.1.0": - version: 2.1.0 - resolution: "find-up@npm:2.1.0" - dependencies: - locate-path: "npm:^2.0.0" - checksum: 10/43284fe4da09f89011f08e3c32cd38401e786b19226ea440b75386c1b12a4cb738c94969808d53a84f564ede22f732c8409e3cfc3f7fb5b5c32378ad0bbf28bd - languageName: node - linkType: hard - -"find-up@npm:^3.0.0": - version: 3.0.0 - resolution: "find-up@npm:3.0.0" - dependencies: - locate-path: "npm:^3.0.0" - checksum: 10/38eba3fe7a66e4bc7f0f5a1366dc25508b7cfc349f852640e3678d26ad9a6d7e2c43eff0a472287de4a9753ef58f066a0ea892a256fa3636ad51b3fe1e17fae9 - languageName: node - linkType: hard - -"find-up@npm:^4.0.0, find-up@npm:^4.1.0": - version: 4.1.0 - resolution: "find-up@npm:4.1.0" - dependencies: - locate-path: "npm:^5.0.0" - path-exists: "npm:^4.0.0" - checksum: 10/4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 - languageName: node - linkType: hard - -"find-up@npm:^6.3.0": - version: 6.3.0 - resolution: "find-up@npm:6.3.0" - dependencies: - locate-path: "npm:^7.1.0" - path-exists: "npm:^5.0.0" - checksum: 10/4f3bdc30d41778c647e53f4923e72de5e5fb055157031f34501c5b36c2eb59f77b997edf9cb00165c6060cda7eaa2e3da82cb6be2e61d68ad3e07c4bc4cce67e - languageName: node - linkType: hard - -"findit@npm:^2.0.0": - version: 2.0.0 - resolution: "findit@npm:2.0.0" - checksum: 10/1fa2890cf3f700efb5b28680fcedc64b93fd184e4e2c1e1eb97050be687c53ee165dfa0546902a34be2755a3b3b387d7a2d6f475da5879cc2236dd7787760906 - languageName: node - linkType: hard - -"findup-sync@npm:^5.0.0": - version: 5.0.0 - resolution: "findup-sync@npm:5.0.0" - dependencies: - detect-file: "npm:^1.0.0" - is-glob: "npm:^4.0.3" - micromatch: "npm:^4.0.4" - resolve-dir: "npm:^1.0.1" - checksum: 10/576716c77a0e8330b17ae9cba27d1fda8907c8cda7bf33a47f1999e16e089bfc6df4dd62933e0760f430736183c054348c34aa45dd882d49c8c098f55b89ee1d - languageName: node - linkType: hard - -"flat-cache@npm:^1.2.1": - version: 1.3.4 - resolution: "flat-cache@npm:1.3.4" - dependencies: - circular-json: "npm:^0.3.1" - graceful-fs: "npm:^4.1.2" - rimraf: "npm:~2.6.2" - write: "npm:^0.2.1" - checksum: 10/33a975f848d0d597d7ab42710bbcbd6e8c12c201bb32b089b5daa19e60ca7d50b9cb92dca70119ab559c93e0ea0eb90ed5fcf205fd5346a95c720ce92d0bb2d4 - languageName: node - linkType: hard - -"flat-cache@npm:^3.0.4": - version: 3.0.4 - resolution: "flat-cache@npm:3.0.4" - dependencies: - flatted: "npm:^3.1.0" - rimraf: "npm:^3.0.2" - checksum: 10/9fe5d0cb97c988e3b25242e71346965fae22757674db3fca14206850af2efa3ca3b04a3ba0eba8d5e20fd8a3be80a2e14b1c2917e70ffe1acb98a8c3327e4c9f - languageName: node - linkType: hard - -"flat-cache@npm:^4.0.0": - version: 4.0.1 - resolution: "flat-cache@npm:4.0.1" - dependencies: - flatted: "npm:^3.2.9" - keyv: "npm:^4.5.4" - checksum: 10/58ce851d9045fffc7871ce2bd718bc485ad7e777bf748c054904b87c351ff1080c2c11da00788d78738bfb51b71e4d5ea12d13b98eb36e3358851ffe495b62dc - languageName: node - linkType: hard - -"flat@npm:^5.0.2": - version: 5.0.2 - resolution: "flat@npm:5.0.2" - bin: - flat: cli.js - checksum: 10/72479e651c15eab53e25ce04c31bab18cfaac0556505cac19221dbbe85bbb9686bc76e4d397e89e5bf516ce667dcf818f8b07e585568edba55abc2bf1f698fb5 - languageName: node - linkType: hard - -"flatted@npm:^3.1.0, flatted@npm:^3.2.4": - version: 3.2.5 - resolution: "flatted@npm:3.2.5" - checksum: 10/eed01f72ad0317561e4d6187f7408dc391f7849d9cd6700520ce06155d1859539b6899afdfefc815ce51ec48f97d1015350287c541b5302a49581cf25cec1cd2 - languageName: node - linkType: hard - -"flatted@npm:^3.2.7": - version: 3.2.7 - resolution: "flatted@npm:3.2.7" - checksum: 10/427633049d55bdb80201c68f7eb1cbd533e03eac541f97d3aecab8c5526f12a20ccecaeede08b57503e772c769e7f8680b37e8d482d1e5f8d7e2194687f9ea35 - languageName: node - linkType: hard - -"flatted@npm:^3.2.9": - version: 3.3.1 - resolution: "flatted@npm:3.3.1" - checksum: 10/7b8376061d5be6e0d3658bbab8bde587647f68797cf6bfeae9dea0e5137d9f27547ab92aaff3512dd9d1299086a6d61be98e9d48a56d17531b634f77faadbc49 - languageName: node - linkType: hard - -"flow-stoplight@npm:^1.0.0": - version: 1.0.0 - resolution: "flow-stoplight@npm:1.0.0" - checksum: 10/e5bfbbb7274f444a926392243eb286292d0da1c8af3ca21d9f2e71a00631b8c0e29b5aba9cc9039c2d2ffc8b80714bb8f48ed6c93b01ca856304b38224e44192 - languageName: node - linkType: hard - -"fmt-subs@npm:^1.1.1": - version: 1.1.1 - resolution: "fmt-subs@npm:1.1.1" - checksum: 10/dbe8eba2e91a0d84beae9bc76dd5667e97f6f1a960b6a51e93f9e1683c0678d031ba5b6cccbbf9374b4143fd6240c8049129c3fafa1b471dc4ef0ef9277155f7 - languageName: node - linkType: hard - -"fn.name@npm:1.x.x": - version: 1.1.0 - resolution: "fn.name@npm:1.1.0" - checksum: 10/000198af190ae02f0138ac5fa4310da733224c628e0230c81e3fff7c4e094af7e0e8bb9f4357cabd21db601759d89f3445da744afbae20623cfa41edf3888397 - languageName: node - linkType: hard - -"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.15.6": - version: 1.15.6 - resolution: "follow-redirects@npm:1.15.6" - peerDependenciesMeta: - debug: - optional: true - checksum: 10/70c7612c4cab18e546e36b991bbf8009a1a41cf85354afe04b113d1117569abf760269409cb3eb842d9f7b03d62826687086b081c566ea7b1e6613cf29030bf7 - languageName: node - linkType: hard - -"for-each@npm:^0.3.3": - version: 0.3.3 - resolution: "for-each@npm:0.3.3" - dependencies: - is-callable: "npm:^1.1.3" - checksum: 10/fdac0cde1be35610bd635ae958422e8ce0cc1313e8d32ea6d34cfda7b60850940c1fd07c36456ad76bd9c24aef6ff5e03b02beb58c83af5ef6c968a64eada676 - languageName: node - linkType: hard - -"for-in@npm:^1.0.1, for-in@npm:^1.0.2": - version: 1.0.2 - resolution: "for-in@npm:1.0.2" - checksum: 10/09f4ae93ce785d253ac963d94c7f3432d89398bf25ac7a24ed034ca393bf74380bdeccc40e0f2d721a895e54211b07c8fad7132e8157827f6f7f059b70b4043d - languageName: node - linkType: hard - -"for-own@npm:^0.1.4": - version: 0.1.5 - resolution: "for-own@npm:0.1.5" - dependencies: - for-in: "npm:^1.0.1" - checksum: 10/07eb0a2e98eb55ce13b56dd11ef4fb5e619ba7380aaec388b9eec1946153d74fa734ce409e8434020557e9489a50c34bc004d55754f5863bf7d77b441d8dee8c - languageName: node - linkType: hard - -"foreach@npm:^2.0.4, foreach@npm:~2.0.1": - version: 2.0.6 - resolution: "foreach@npm:2.0.6" - checksum: 10/93b0e65b3f03d9f696418d45f589d0135268b97bf71b4c2628687ce77ce49c20abd60f3c1b23052306b4e789435683a467a7828beac486d2ea17ba8b80933d38 - languageName: node - linkType: hard - -"foreach@npm:^2.0.5": - version: 2.0.5 - resolution: "foreach@npm:2.0.5" - checksum: 10/3962224ad3343019aab128cbfd11ba8e17ef8a67de09d2b217651f097a038294dcf641e07ebeae2b715e1a5e81bd212ebacae323950a3c28bc340a4c5955c032 - languageName: node - linkType: hard - -"foreground-child@npm:^1.5.3, foreground-child@npm:^1.5.6": - version: 1.5.6 - resolution: "foreground-child@npm:1.5.6" - dependencies: - cross-spawn: "npm:^4" - signal-exit: "npm:^3.0.0" - checksum: 10/86277cd900e5f5c53d2b24d3e2b1d422d33ffc2a2dcd00016adf226640c14fa653bad2b15d0deaadd94243c6661e6d8dda80eed4501f6bf8e19d075e0c71b1ee - languageName: node - linkType: hard - -"foreground-child@npm:^2.0.0": - version: 2.0.0 - resolution: "foreground-child@npm:2.0.0" - dependencies: - cross-spawn: "npm:^7.0.0" - signal-exit: "npm:^3.0.2" - checksum: 10/f36574ad8e19d69ce06fceac7d86161b863968e4ba292c14b7b40e5c464e3e9bcd7711250d33427d95cc2bb0d48cf101df9687433dbbc7fd3c7e4f595be8305e - languageName: node - linkType: hard - -"foreground-child@npm:^3.1.0": - version: 3.1.1 - resolution: "foreground-child@npm:3.1.1" - dependencies: - cross-spawn: "npm:^7.0.0" - signal-exit: "npm:^4.0.1" - checksum: 10/087edd44857d258c4f73ad84cb8df980826569656f2550c341b27adf5335354393eec24ea2fabd43a253233fb27cee177ebe46bd0b7ea129c77e87cb1e9936fb - languageName: node - linkType: hard - -"forever-agent@npm:~0.6.1": - version: 0.6.1 - resolution: "forever-agent@npm:0.6.1" - checksum: 10/c1e1644d5e074ac063ecbc3fb8582013ef91fff0e3fa41e76db23d2f62bc6d9677aac86db950917deed4fe1fdd772df780cfaa352075f23deec9c015313afb97 - languageName: node - linkType: hard - -"forge-std@https://github.com/foundry-rs/forge-std.git#66bf4e2c92cf507531599845e8d5a08cc2e3b5bb": - version: 1.5.6 - resolution: "forge-std@https://github.com/foundry-rs/forge-std.git#commit=66bf4e2c92cf507531599845e8d5a08cc2e3b5bb" - checksum: 10/74ae4d0314cdfa2d1b3b67a4315445e9691c2f35afc1804e681cebae6ac048736426bc5c5feca60a3254a03935c5e2fe8b16465c5f497dee3db8ac972a6a502c - languageName: node - linkType: hard - -"fork-ts-checker-webpack-plugin@npm:^6.5.0": - version: 6.5.3 - resolution: "fork-ts-checker-webpack-plugin@npm:6.5.3" - dependencies: - "@babel/code-frame": "npm:^7.8.3" - "@types/json-schema": "npm:^7.0.5" - chalk: "npm:^4.1.0" - chokidar: "npm:^3.4.2" - cosmiconfig: "npm:^6.0.0" - deepmerge: "npm:^4.2.2" - fs-extra: "npm:^9.0.0" - glob: "npm:^7.1.6" - memfs: "npm:^3.1.2" - minimatch: "npm:^3.0.4" - schema-utils: "npm:2.7.0" - semver: "npm:^7.3.2" - tapable: "npm:^1.0.0" - peerDependencies: - eslint: ">= 6" - typescript: ">= 2.7" - vue-template-compiler: "*" - webpack: ">= 4" - peerDependenciesMeta: - eslint: - optional: true - vue-template-compiler: - optional: true - checksum: 10/415263839afe11c291be60e3335ece3ccdc80c5e0d91eeecf0d3060cfb72c7b0cb33be326dd24b325939357d53215e10c41e8187edb5db8a08fe9aaa8aa6c510 - languageName: node - linkType: hard - -"form-data-encoder@npm:1.7.1": - version: 1.7.1 - resolution: "form-data-encoder@npm:1.7.1" - checksum: 10/1abc9059d991b105ba4122a36f9b5c17fd0af77ce8fa59a826a5b9ce56d616807e7780963616dd7e7906ec7aa1ba28cfb7c9defd9747ad10484e039a2b946cca - languageName: node - linkType: hard - -"form-data-encoder@npm:^2.1.2": - version: 2.1.4 - resolution: "form-data-encoder@npm:2.1.4" - checksum: 10/3778e7db3c21457296e6fdbc4200642a6c01e8be9297256e845ee275f9ddaecb5f49bfb0364690ad216898c114ec59bf85f01ec823a70670b8067273415d62f6 - languageName: node - linkType: hard - -"form-data@npm:4.0.0, form-data@npm:^4.0.0": - version: 4.0.0 - resolution: "form-data@npm:4.0.0" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.8" - mime-types: "npm:^2.1.12" - checksum: 10/7264aa760a8cf09482816d8300f1b6e2423de1b02bba612a136857413fdc96d7178298ced106817655facc6b89036c6e12ae31c9eb5bdc16aabf502ae8a5d805 - languageName: node - linkType: hard - -"form-data@npm:^2.5.0": - version: 2.5.1 - resolution: "form-data@npm:2.5.1" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.6" - mime-types: "npm:^2.1.12" - checksum: 10/2e2e5e927979ba3623f9b4c4bcc939275fae3f2dea9dafc8db3ca656a3d75476605de2c80f0e6f1487987398e056f0b4c738972d6e1edd83392d5686d0952eed - languageName: node - linkType: hard - -"form-data@npm:^3.0.0": - version: 3.0.1 - resolution: "form-data@npm:3.0.1" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.8" - mime-types: "npm:^2.1.12" - checksum: 10/944b40ff63b9cb1ca7a97e70f72104c548e0b0263e3e817e49919015a0d687453086259b93005389896dbffd3777cccea2e67c51f4e827590e5979b14ff91bf7 - languageName: node - linkType: hard - -"form-data@npm:~2.3.2": - version: 2.3.3 - resolution: "form-data@npm:2.3.3" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.6" - mime-types: "npm:^2.1.12" - checksum: 10/1b6f3ccbf4540e535887b42218a2431a3f6cfdea320119c2affa2a7a374ad8fdd1e60166fc865181f45d49b1684c3e90e7b2190d3fe016692957afb9cf0d0d02 - languageName: node - linkType: hard - -"formdata-polyfill@npm:^4.0.10": - version: 4.0.10 - resolution: "formdata-polyfill@npm:4.0.10" - dependencies: - fetch-blob: "npm:^3.1.2" - checksum: 10/9b5001d2edef3c9449ac3f48bd4f8cc92e7d0f2e7c1a5c8ba555ad4e77535cc5cf621fabe49e97f304067037282dd9093b9160a3cb533e46420b446c4e6bc06f - languageName: node - linkType: hard - -"formidable@npm:^1.2.2": - version: 1.2.6 - resolution: "formidable@npm:1.2.6" - checksum: 10/0ac4690a4664725051142b41c8e9de2072b4c9bde8e03bf07abe7c747d1e2cbefd2463de93938e6503cad628f2b06accf330885e2b6511f2511693af186ae08d - languageName: node - linkType: hard - -"forwarded@npm:0.2.0": - version: 0.2.0 - resolution: "forwarded@npm:0.2.0" - checksum: 10/29ba9fd347117144e97cbb8852baae5e8b2acb7d1b591ef85695ed96f5b933b1804a7fac4a15dd09ca7ac7d0cdc104410e8102aae2dd3faa570a797ba07adb81 - languageName: node - linkType: hard - -"fp-ts@npm:1.19.3": - version: 1.19.3 - resolution: "fp-ts@npm:1.19.3" - checksum: 10/3b3426f9a033b3e1b43f68da1baeb9d25b1a7cfeda0f55d4eadf0a1ab951898edc8b3453e4fec3113c140c98fdbf5fe8ab5232d349376ea7920e280af4e52050 - languageName: node - linkType: hard - -"fp-ts@npm:^1.0.0": - version: 1.19.5 - resolution: "fp-ts@npm:1.19.5" - checksum: 10/17aa04bbbba9096ac32efd4f192de6211687cab195c423d4072a904f1346c2d508243880685d6f4bb4be29e5f337a67cfa211645e491491683b6aaff23b5dd4a - languageName: node - linkType: hard - -"fraction.js@npm:^4.2.0": - version: 4.2.0 - resolution: "fraction.js@npm:4.2.0" - checksum: 10/8f8e3c02a4d10cd03bae5c036c02ef0bd1a50be69ac56e5b9b25025ff07466c1d2288f383fb613ecec583e77bcfd586dee2d932f40e588c910bf55c5103014ab - languageName: node - linkType: hard - -"fraction.js@npm:^4.3.7": - version: 4.3.7 - resolution: "fraction.js@npm:4.3.7" - checksum: 10/bb5ebcdeeffcdc37b68ead3bdfc244e68de188e0c64e9702197333c72963b95cc798883ad16adc21588088b942bca5b6a6ff4aeb1362d19f6f3b629035dc15f5 - languageName: node - linkType: hard - -"fragment-cache@npm:^0.2.1": - version: 0.2.1 - resolution: "fragment-cache@npm:0.2.1" - dependencies: - map-cache: "npm:^0.2.2" - checksum: 10/1cbbd0b0116b67d5790175de0038a11df23c1cd2e8dcdbade58ebba5594c2d641dade6b4f126d82a7b4a6ffc2ea12e3d387dbb64ea2ae97cf02847d436f60fdc - languageName: node - linkType: hard - -"fresh@npm:0.5.2, fresh@npm:^0.5.2": - version: 0.5.2 - resolution: "fresh@npm:0.5.2" - checksum: 10/64c88e489b5d08e2f29664eb3c79c705ff9a8eb15d3e597198ef76546d4ade295897a44abb0abd2700e7ef784b2e3cbf1161e4fbf16f59129193fd1030d16da1 - languageName: node - linkType: hard - -"from2@npm:^2.3.0": - version: 2.3.0 - resolution: "from2@npm:2.3.0" - dependencies: - inherits: "npm:^2.0.1" - readable-stream: "npm:^2.0.0" - checksum: 10/9164fbe5bbf9a48864bb8960296ccd1173c570ba1301a1c20de453b06eee39b52332f72279f2393948789afe938d8e951d50fea01064ba69fb5674b909f102b6 - languageName: node - linkType: hard - -"fromentries@npm:^1.2.0": - version: 1.3.2 - resolution: "fromentries@npm:1.3.2" - checksum: 10/10d6e07d289db102c0c1eaf5c3e3fa55ddd6b50033d7de16d99a7cd89f1e1a302dfadb26457031f9bb5d2ed95a179aaf0396092dde5abcae06e8a2f0476826be - languageName: node - linkType: hard - -"fs-constants@npm:^1.0.0": - version: 1.0.0 - resolution: "fs-constants@npm:1.0.0" - checksum: 10/18f5b718371816155849475ac36c7d0b24d39a11d91348cfcb308b4494824413e03572c403c86d3a260e049465518c4f0d5bd00f0371cdfcad6d4f30a85b350d - languageName: node - linkType: hard - -"fs-exists-cached@npm:^1.0.0": - version: 1.0.0 - resolution: "fs-exists-cached@npm:1.0.0" - checksum: 10/c9376d912dd7c5ed85fec9e33d3151b7283bdb3bed2d345f4cd83b175552b13f911b003b2d8f4c3a3c87e57ef28ad02a242b20c96466c402e7b9de7c82aea406 - languageName: node - linkType: hard - -"fs-extra@npm:10.1.0": - version: 10.1.0 - resolution: "fs-extra@npm:10.1.0" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10/05ce2c3b59049bcb7b52001acd000e44b3c4af4ec1f8839f383ef41ec0048e3cfa7fd8a637b1bddfefad319145db89be91f4b7c1db2908205d38bf91e7d1d3b7 - languageName: node - linkType: hard - -"fs-extra@npm:11.2.0, fs-extra@npm:^11.2.0": - version: 11.2.0 - resolution: "fs-extra@npm:11.2.0" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10/0579bf6726a4cd054d4aa308f10b483f52478bb16284f32cf60b4ce0542063d551fca1a08a2af365e35db21a3fa5a06cf2a6ed614004b4368982bc754cb816b3 - languageName: node - linkType: hard - -"fs-extra@npm:^0.30.0": - version: 0.30.0 - resolution: "fs-extra@npm:0.30.0" - dependencies: - graceful-fs: "npm:^4.1.2" - jsonfile: "npm:^2.1.0" - klaw: "npm:^1.0.0" - path-is-absolute: "npm:^1.0.0" - rimraf: "npm:^2.2.8" - checksum: 10/bfdd95f598a36a3f24b02db840c1dc54facba2793dea06355c75a6ed823f92e4033589e287f2b91a02a9980c3fb44099e3f00fce5230f045c87431f69be26084 - languageName: node - linkType: hard - -"fs-extra@npm:^10.0.0": - version: 10.0.1 - resolution: "fs-extra@npm:10.0.1" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10/81c8f5668f8c00a94c22910c7deadbb5a68621a36efa64cc483bcb6e96c74a1e86bb1ed338855c54ec8ed778c54762e187912d668a59bffc06d1f0c1ef3b26c4 - languageName: node - linkType: hard - -"fs-extra@npm:^11.0.0": - version: 11.1.1 - resolution: "fs-extra@npm:11.1.1" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10/c4e9fabf9762a70d1403316b7faa899f3d3303c8afa765b891c2210fdeba368461e04ae1203920b64ef6a7d066a39ab8cef2160b5ce8d1011bb4368688cd9bb7 - languageName: node - linkType: hard - -"fs-extra@npm:^4.0.2": - version: 4.0.3 - resolution: "fs-extra@npm:4.0.3" - dependencies: - graceful-fs: "npm:^4.1.2" - jsonfile: "npm:^4.0.0" - universalify: "npm:^0.1.0" - checksum: 10/c1ab28ac6b19a1e37f9c0fb3a233b7333bd4d12ea2a514b5469ba956f022fa0e2aefa3b351d1117b80ed45495bb779427c8f64727c150bb1599c2ce9ab3b42ac - languageName: node - linkType: hard - -"fs-extra@npm:^7.0.1": - version: 7.0.1 - resolution: "fs-extra@npm:7.0.1" - dependencies: - graceful-fs: "npm:^4.1.2" - jsonfile: "npm:^4.0.0" - universalify: "npm:^0.1.0" - checksum: 10/3fc6e56ba2f07c00d452163f27f21a7076b72ef7da8a50fef004336d59ef4c34deda11d10ecd73fd8fbcf20e4f575f52857293090b3c9f8741d4e0598be30fea - languageName: node - linkType: hard - -"fs-extra@npm:^8.1.0": - version: 8.1.0 - resolution: "fs-extra@npm:8.1.0" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^4.0.0" - universalify: "npm:^0.1.0" - checksum: 10/6fb12449f5349be724a138b4a7b45fe6a317d2972054517f5971959c26fbd17c0e145731a11c7324460262baa33e0a799b183ceace98f7a372c95fbb6f20f5de - languageName: node - linkType: hard - -"fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1, fs-extra@npm:^9.1.0": - version: 9.1.0 - resolution: "fs-extra@npm:9.1.0" - dependencies: - at-least-node: "npm:^1.0.0" - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10/08600da1b49552ed23dfac598c8fc909c66776dd130fea54fbcad22e330f7fcc13488bb995f6bc9ce5651aa35b65702faf616fe76370ee56f1aade55da982dca - languageName: node - linkType: hard - -"fs-jetpack@npm:4.3.1": - version: 4.3.1 - resolution: "fs-jetpack@npm:4.3.1" - dependencies: - minimatch: "npm:^3.0.2" - rimraf: "npm:^2.6.3" - checksum: 10/cb6636a083011124e8ca33720035171d177874fffb508448573db9eebef0d9ec5c29d73665373aa619f7ee4b495b142ae888f07217ea6ce40ba2f752894fec63 - languageName: node - linkType: hard - -"fs-minipass@npm:^1.2.7": - version: 1.2.7 - resolution: "fs-minipass@npm:1.2.7" - dependencies: - minipass: "npm:^2.6.0" - checksum: 10/6a2d39963eaad748164530ffab49606d0f3462c7867748521af3b7039d13689be533636d50a04e8ba6bd327d4d2e899d0907f8830d1161fe2db467d59cc46dc3 - languageName: node - linkType: hard - -"fs-minipass@npm:^2.0.0, fs-minipass@npm:^2.1.0": - version: 2.1.0 - resolution: "fs-minipass@npm:2.1.0" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10/03191781e94bc9a54bd376d3146f90fe8e082627c502185dbf7b9b3032f66b0b142c1115f3b2cc5936575fc1b44845ce903dd4c21bec2a8d69f3bd56f9cee9ec - languageName: node - linkType: hard - -"fs-minipass@npm:^3.0.0": - version: 3.0.1 - resolution: "fs-minipass@npm:3.0.1" - dependencies: - minipass: "npm:^4.0.0" - checksum: 10/c6c0a7b976aa6ba86ae2f4b03fe633fd07b03191453b56045af75299fd6fa669da2de0771defcbb20ea0e4e9ac3afbd411ae3de0a2af18e4ee09586be930375c - languageName: node - linkType: hard - -"fs-monkey@npm:^1.0.4": - version: 1.0.4 - resolution: "fs-monkey@npm:1.0.4" - checksum: 10/9944223c25e62e176cbb9b0f9e0ee1697a1676419529e948ec013b49156863411a09b45671b56267d3118c867d3a0d5c08225845160a6148861cc16fc1eec79e - languageName: node - linkType: hard - -"fs.realpath@npm:^1.0.0": - version: 1.0.0 - resolution: "fs.realpath@npm:1.0.0" - checksum: 10/e703107c28e362d8d7b910bbcbfd371e640a3bb45ae157a362b5952c0030c0b6d4981140ec319b347bce7adc025dd7813da1ff908a945ac214d64f5402a51b96 - languageName: node - linkType: hard - -"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": - version: 2.3.2 - resolution: "fsevents@npm:2.3.2" - dependencies: - node-gyp: "npm:latest" - checksum: 10/6b5b6f5692372446ff81cf9501c76e3e0459a4852b3b5f1fc72c103198c125a6b8c72f5f166bdd76ffb2fca261e7f6ee5565daf80dca6e571e55bcc589cc1256 - conditions: os=darwin - languageName: node - linkType: hard - -"fsevents@npm:~2.3.3": - version: 2.3.3 - resolution: "fsevents@npm:2.3.3" - dependencies: - node-gyp: "npm:latest" - checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 - conditions: os=darwin - languageName: node - linkType: hard - -"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": - version: 2.3.2 - resolution: "fsevents@patch:fsevents@npm%3A2.3.2#optional!builtin::version=2.3.2&hash=df0bf1" - dependencies: - node-gyp: "npm:latest" - conditions: os=darwin - languageName: node - linkType: hard - -"fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": - version: 2.3.3 - resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" - dependencies: - node-gyp: "npm:latest" - conditions: os=darwin - languageName: node - linkType: hard - -"function-bind@npm:^1.1.1": - version: 1.1.1 - resolution: "function-bind@npm:1.1.1" - checksum: 10/d83f2968030678f0b8c3f2183d63dcd969344eb8b55b4eb826a94ccac6de8b87c95bebffda37a6386c74f152284eb02956ff2c496897f35d32bdc2628ac68ac5 - languageName: node - linkType: hard - -"function-bind@npm:^1.1.2": - version: 1.1.2 - resolution: "function-bind@npm:1.1.2" - checksum: 10/185e20d20f10c8d661d59aac0f3b63b31132d492e1b11fcc2a93cb2c47257ebaee7407c38513efd2b35cafdf972d9beb2ea4593c1e0f3bf8f2744836928d7454 - languageName: node - linkType: hard - -"function-loop@npm:^2.0.1": - version: 2.0.1 - resolution: "function-loop@npm:2.0.1" - checksum: 10/1f919e82733064bdbeeb91373d1ccf8410a119aa4003779955cefe6be67b9ebc0e20d52f405a728b488fda4064c55c5376aa8b2f0cc06c7e0dc820d5a8e1d28d - languageName: node - linkType: hard - -"function.prototype.name@npm:^1.1.5": - version: 1.1.5 - resolution: "function.prototype.name@npm:1.1.5" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.19.0" - functions-have-names: "npm:^1.2.2" - checksum: 10/5d426e5a38ac41747bcfce6191e0ec818ed18678c16cfc36b5d1ca87f56ff98c4ce958ee2c1ea2a18dc3da989844a37b1065311e2d2ae4cf12da8f82418b686b - languageName: node - linkType: hard - -"function.prototype.name@npm:^1.1.6": - version: 1.1.6 - resolution: "function.prototype.name@npm:1.1.6" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - functions-have-names: "npm:^1.2.3" - checksum: 10/4d40be44d4609942e4e90c4fff77a811fa936f4985d92d2abfcf44f673ba344e2962bf223a33101f79c1a056465f36f09b072b9c289d7660ca554a12491cd5a2 - languageName: node - linkType: hard - -"functional-red-black-tree@npm:^1.0.1, functional-red-black-tree@npm:~1.0.1": - version: 1.0.1 - resolution: "functional-red-black-tree@npm:1.0.1" - checksum: 10/debe73e92204341d1fa5f89614e44284d3add26dee660722978d8c50829170f87d1c74768f68c251d215ae461c11db7bac13101c77f4146ff051da75466f7a12 - languageName: node - linkType: hard - -"functions-have-names@npm:^1.2.2, functions-have-names@npm:^1.2.3": - version: 1.2.3 - resolution: "functions-have-names@npm:1.2.3" - checksum: 10/0ddfd3ed1066a55984aaecebf5419fbd9344a5c38dd120ffb0739fac4496758dcf371297440528b115e4367fc46e3abc86a2cc0ff44612181b175ae967a11a05 - languageName: node - linkType: hard - -"fwd-stream@npm:^1.0.4": - version: 1.0.4 - resolution: "fwd-stream@npm:1.0.4" - dependencies: - readable-stream: "npm:~1.0.26-4" - checksum: 10/db4dcf68f214b3fabd6cd9658630dfd1d7ed8d43f7f45408027a90220cd75276e782d1e958821775d7a3a4a83034778e75a097bdc7002c758e8896f76213c65d - languageName: node - linkType: hard - -"ganache-cli@npm:6.12.2": - version: 6.12.2 - resolution: "ganache-cli@npm:6.12.2" - dependencies: - ethereumjs-util: "npm:6.2.1" - source-map-support: "npm:0.5.12" - yargs: "npm:13.2.4" - bin: - ganache-cli: cli.js - checksum: 10/5351e7933752bd80a312209cddf235cf2be5f6474aa9a09dfc53906b3c7ebc398674703661bb0fe7328c275538c8ced4dc3cdc394b01f59c410de980787c2328 - languageName: node - linkType: hard - -"ganache@npm:7.9.0": - version: 7.9.0 - resolution: "ganache@npm:7.9.0" - dependencies: - "@trufflesuite/bigint-buffer": "npm:1.1.10" - "@trufflesuite/uws-js-unofficial": "npm:20.10.0-unofficial.2" - "@types/bn.js": "npm:^5.1.0" - "@types/lru-cache": "npm:5.1.1" - "@types/seedrandom": "npm:3.0.1" - abstract-level: "npm:1.0.3" - abstract-leveldown: "npm:7.2.0" - async-eventemitter: "npm:0.2.4" - bufferutil: "npm:4.0.5" - emittery: "npm:0.10.0" - keccak: "npm:3.0.2" - leveldown: "npm:6.1.0" - secp256k1: "npm:4.0.3" - utf-8-validate: "npm:5.0.7" - dependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - bin: - ganache: dist/node/cli.js - ganache-cli: dist/node/cli.js - checksum: 10/106a627560612a16d1cc045ecbc7e33a85f0a8bedb899b444397d70639c64ca83e3750798920a25bae6e500445c5772837c2e9609039d716bbf41bfed0cd925d - languageName: node - linkType: hard - -"gauge@npm:^3.0.0": - version: 3.0.2 - resolution: "gauge@npm:3.0.2" - dependencies: - aproba: "npm:^1.0.3 || ^2.0.0" - color-support: "npm:^1.1.2" - console-control-strings: "npm:^1.0.0" - has-unicode: "npm:^2.0.1" - object-assign: "npm:^4.1.1" - signal-exit: "npm:^3.0.0" - string-width: "npm:^4.2.3" - strip-ansi: "npm:^6.0.1" - wide-align: "npm:^1.1.2" - checksum: 10/46df086451672a5fecd58f7ec86da74542c795f8e00153fbef2884286ce0e86653c3eb23be2d0abb0c4a82b9b2a9dec3b09b6a1cf31c28085fa0376599a26589 - languageName: node - linkType: hard - -"gauge@npm:^4.0.3": - version: 4.0.4 - resolution: "gauge@npm:4.0.4" - dependencies: - aproba: "npm:^1.0.3 || ^2.0.0" - color-support: "npm:^1.1.3" - console-control-strings: "npm:^1.1.0" - has-unicode: "npm:^2.0.1" - signal-exit: "npm:^3.0.7" - string-width: "npm:^4.2.3" - strip-ansi: "npm:^6.0.1" - wide-align: "npm:^1.1.5" - checksum: 10/09535dd53b5ced6a34482b1fa9f3929efdeac02f9858569cde73cef3ed95050e0f3d095706c1689614059898924b7a74aa14042f51381a1ccc4ee5c29d2389c4 - languageName: node - linkType: hard - -"gaxios@npm:^6.0.0": - version: 6.1.1 - resolution: "gaxios@npm:6.1.1" - dependencies: - extend: "npm:^3.0.2" - https-proxy-agent: "npm:^7.0.1" - is-stream: "npm:^2.0.0" - node-fetch: "npm:^2.6.9" - checksum: 10/ee16e6f61fccda89f00e6fc2dcd1205fb398a5629350a18aa2db84abb8794ef62de5e7f88d8a7f86d27fe2a996b2739d1cad0020b23999e533d925231919e1b3 - languageName: node - linkType: hard - -"gcp-metadata@npm:^6.0.0": - version: 6.0.0 - resolution: "gcp-metadata@npm:6.0.0" - dependencies: - gaxios: "npm:^6.0.0" - json-bigint: "npm:^1.0.0" - checksum: 10/c6bfc054828de3cf4f180479867fe5d34c2065cdd14321677c468f8c6e98b83f00b638b3eeb61dd3207f2e4cf83988aa34c2d3835c61a9b307f377b3ebae36f2 - languageName: node - linkType: hard - -"generate-function@npm:^2.0.0": - version: 2.3.1 - resolution: "generate-function@npm:2.3.1" - dependencies: - is-property: "npm:^1.0.2" - checksum: 10/318f85af87c3258d86df4ebbb56b63a2ae52e71bd6cde8d0a79de09450de7422a7047fb1f8d52ccc135564a36cb986d73c63149eed96b7ac57e38acba44f29e2 - languageName: node - linkType: hard - -"generate-object-property@npm:^1.1.0": - version: 1.2.0 - resolution: "generate-object-property@npm:1.2.0" - dependencies: - is-property: "npm:^1.0.0" - checksum: 10/5141ca5fd545f0aabd24fd13f9f3ecf9cfea2255db00d46e282d65141d691d560c70b6361c3c0c4982f86f600361925bfd4773e0350c66d0210e6129ae553a09 - languageName: node - linkType: hard - -"gensequence@npm:^7.0.0": - version: 7.0.0 - resolution: "gensequence@npm:7.0.0" - checksum: 10/22e404384349b17952e4102a3dd3a9476772a6fc8f05e36885b489406f710c1fe2ec3c0687a1da554ccd845ce1ab7e418a867d3a1b4cf86cda2f5a7ce4f33bc4 - languageName: node - linkType: hard - -"gensync@npm:^1.0.0-beta.2": - version: 1.0.0-beta.2 - resolution: "gensync@npm:1.0.0-beta.2" - checksum: 10/17d8333460204fbf1f9160d067e1e77f908a5447febb49424b8ab043026049835c9ef3974445c57dbd39161f4d2b04356d7de12b2eecaa27a7a7ea7d871cbedd - languageName: node - linkType: hard - -"get-amd-module-type@npm:^5.0.1": - version: 5.0.1 - resolution: "get-amd-module-type@npm:5.0.1" - dependencies: - ast-module-types: "npm:^5.0.0" - node-source-walk: "npm:^6.0.1" - checksum: 10/77b6a59b90c54fd2d8adb1555e3939462d7b97c617e74271bbcb8f9741ca6681e831216e9e45f4ab1ab1b249394b89d5c8d9e4afa1497c68d02698775cd2225e - languageName: node - linkType: hard - -"get-caller-file@npm:^1.0.1": - version: 1.0.3 - resolution: "get-caller-file@npm:1.0.3" - checksum: 10/0b776558c1d94ac131ec0d47bf9da4e00a38e7d3a6cbde534e0e4656c13ead344e69ef7ed2c0bca16620cc2e1e26529f90e2336c8962736517b64890d583a2a0 - languageName: node - linkType: hard - -"get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": - version: 2.0.5 - resolution: "get-caller-file@npm:2.0.5" - checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 - languageName: node - linkType: hard - -"get-east-asian-width@npm:^1.0.0": - version: 1.2.0 - resolution: "get-east-asian-width@npm:1.2.0" - checksum: 10/c9b280e7c7c67fb89fa17e867c4a9d1c9f1321aba2a9ee27bff37fb6ca9552bccda328c70a80c1f83a0e39ba1b7e3427e60f47823402d19e7a41b83417ec047a - languageName: node - linkType: hard - -"get-func-name@npm:>=2.0.1": - version: 3.0.0 - resolution: "get-func-name@npm:3.0.0" - checksum: 10/6cfc29baa43ef7a68caddffb85b3afc02e4945f488fc49205414116cd323bb9c590eb699bba8070ec07b0b4f1fd35ed41859d6ba86784bba916fa58e413cd8e1 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.0.2": - version: 1.1.2 - resolution: "get-intrinsic@npm:1.1.2" - dependencies: - function-bind: "npm:^1.1.1" - has: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - checksum: 10/0364e4d4538486672d3125ca6e3e3ce30f1ac0eebfbaed1ffb27f588697a49b9d8ccf9e9fc30b915663942f5c24063cfd81008d13d02c9358f72b3c70b4c74f4 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1": - version: 1.1.1 - resolution: "get-intrinsic@npm:1.1.1" - dependencies: - function-bind: "npm:^1.1.1" - has: "npm:^1.0.3" - has-symbols: "npm:^1.0.1" - checksum: 10/7143f5407b000473f4b62717a79628dc151aa622eadac682da0ea3d377fc45839b3ea203d0956d72f6cc8c1f6ae0dcd47fb4bd970647ba5234f9e11679f86cb5 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0": - version: 1.2.0 - resolution: "get-intrinsic@npm:1.2.0" - dependencies: - function-bind: "npm:^1.1.1" - has: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - checksum: 10/f57c5fe67a96adace4f8e80c288728bcd0ccfdc82c9cc53e4a5ef1ec857b5f7ef4b1c289e39649b1df226bace81103630bf7e128c821f82cd603450036e54f97 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.1": - version: 1.2.1 - resolution: "get-intrinsic@npm:1.2.1" - dependencies: - function-bind: "npm:^1.1.1" - has: "npm:^1.0.3" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - checksum: 10/aee631852063f8ad0d4a374970694b5c17c2fb5c92bd1929476d7eb8798ce7aebafbf9a34022c05fd1adaa2ce846d5877a627ce1986f81fc65adf3b81824bd54 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.2": - version: 1.2.2 - resolution: "get-intrinsic@npm:1.2.2" - dependencies: - function-bind: "npm:^1.1.2" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - hasown: "npm:^2.0.0" - checksum: 10/aa96db4f809734d26d49b59bc8669d73a0ae792da561514e987735573a1dfaede516cd102f217a078ea2b42d4c4fb1f83d487932cb15d49826b726cc9cd4470b - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": - version: 1.2.4 - resolution: "get-intrinsic@npm:1.2.4" - dependencies: - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - hasown: "npm:^2.0.0" - checksum: 10/85bbf4b234c3940edf8a41f4ecbd4e25ce78e5e6ad4e24ca2f77037d983b9ef943fd72f00f3ee97a49ec622a506b67db49c36246150377efcda1c9eb03e5f06d - languageName: node - linkType: hard - -"get-iterator@npm:^1.0.2": - version: 1.0.2 - resolution: "get-iterator@npm:1.0.2" - checksum: 10/4a819aa91ecb61f4fd507bd62e3468d55f642f06011f944c381a739a21f685c36a37feb9324c8971e7c0fc70ca172066c45874fa2d1dcdf4b4fb8e43f16058c2 - languageName: node - linkType: hard - -"get-iterator@npm:^2.0.0": - version: 2.0.1 - resolution: "get-iterator@npm:2.0.1" - checksum: 10/353baac51f5e335c19cb734cbf0401d7c47deeac9d375e2939fed646fe52db2912d61ed2a60112050cf4687080817d159ec938803e48e03cd602edd489a116f2 - languageName: node - linkType: hard - -"get-own-enumerable-property-symbols@npm:^3.0.0": - version: 3.0.2 - resolution: "get-own-enumerable-property-symbols@npm:3.0.2" - checksum: 10/8f0331f14159f939830884799f937343c8c0a2c330506094bc12cbee3665d88337fe97a4ea35c002cc2bdba0f5d9975ad7ec3abb925015cdf2a93e76d4759ede - languageName: node - linkType: hard - -"get-package-type@npm:^0.1.0": - version: 0.1.0 - resolution: "get-package-type@npm:0.1.0" - checksum: 10/bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 - languageName: node - linkType: hard - -"get-stdin@npm:^5.0.1": - version: 5.0.1 - resolution: "get-stdin@npm:5.0.1" - checksum: 10/f9784638ad3e68a0a8bdc031aedf0fca749843cd134956fbd4f3bbac17c359e0fb9210343fcbed72ee79fb19d8e4c49b7a6e742cc5d44e94ac1405e9371d4b3e - languageName: node - linkType: hard - -"get-stdin@npm:^9.0.0": - version: 9.0.0 - resolution: "get-stdin@npm:9.0.0" - checksum: 10/5972bc34d05932b45512c8e2d67b040f1c1ca8afb95c56cbc480985f2d761b7e37fe90dc8abd22527f062cc5639a6930ff346e9952ae4c11a2d4275869459594 - languageName: node - linkType: hard - -"get-stream@npm:^2.2.0": - version: 2.3.1 - resolution: "get-stream@npm:2.3.1" - dependencies: - object-assign: "npm:^4.0.1" - pinkie-promise: "npm:^2.0.0" - checksum: 10/712738e6a39b06da774aea5d35efa16a8f067a0d93b1b564e8d0e733fafddcf021e03098895735bc45d6594d3094369d700daa0d33891f980595cf6495e33294 - languageName: node - linkType: hard - -"get-stream@npm:^3.0.0": - version: 3.0.0 - resolution: "get-stream@npm:3.0.0" - checksum: 10/de14fbb3b4548ace9ab6376be852eef9898c491282e29595bc908a1814a126d3961b11cd4b7be5220019fe3b2abb84568da7793ad308fc139925a217063fa159 - languageName: node - linkType: hard - -"get-stream@npm:^4.0.0, get-stream@npm:^4.1.0": - version: 4.1.0 - resolution: "get-stream@npm:4.1.0" - dependencies: - pump: "npm:^3.0.0" - checksum: 10/12673e8aebc79767d187b203e5bfabb8266304037815d3bcc63b6f8c67c6d4ad0d98d4d4528bcdc1cbea68f1dd91bcbd87827aa3cdcfa9c5fa4a4644716d72c2 - languageName: node - linkType: hard - -"get-stream@npm:^5.0.0, get-stream@npm:^5.1.0": - version: 5.2.0 - resolution: "get-stream@npm:5.2.0" - dependencies: - pump: "npm:^3.0.0" - checksum: 10/13a73148dca795e41421013da6e3ebff8ccb7fba4d2f023fd0c6da2c166ec4e789bec9774a73a7b49c08daf2cae552f8a3e914042ac23b5f59dd278cc8f9cbfb - languageName: node - linkType: hard - -"get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": - version: 6.0.1 - resolution: "get-stream@npm:6.0.1" - checksum: 10/781266d29725f35c59f1d214aedc92b0ae855800a980800e2923b3fbc4e56b3cb6e462c42e09a1cf1a00c64e056a78fa407cbe06c7c92b7e5cd49b4b85c2a497 - languageName: node - linkType: hard - -"get-stream@npm:^8.0.1": - version: 8.0.1 - resolution: "get-stream@npm:8.0.1" - checksum: 10/dde5511e2e65a48e9af80fea64aff11b4921b14b6e874c6f8294c50975095af08f41bfb0b680c887f28b566dd6ec2cb2f960f9d36a323359be324ce98b766e9e - languageName: node - linkType: hard - -"get-stream@npm:^9.0.1": - version: 9.0.1 - resolution: "get-stream@npm:9.0.1" - dependencies: - "@sec-ant/readable-stream": "npm:^0.4.1" - is-stream: "npm:^4.0.1" - checksum: 10/ce56e6db6bcd29ca9027b0546af035c3e93dcd154ca456b54c298901eb0e5b2ce799c5d727341a100c99e14c523f267f1205f46f153f7b75b1f4da6d98a21c5e - languageName: node - linkType: hard - -"get-symbol-description@npm:^1.0.0": - version: 1.0.0 - resolution: "get-symbol-description@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.1" - checksum: 10/7e5f298afe0f0872747dce4a949ce490ebc5d6dd6aefbbe5044543711c9b19a4dfaebdbc627aee99e1299d58a435b2fbfa083458c1d58be6dc03a3bada24d359 - languageName: node - linkType: hard - -"get-symbol-description@npm:^1.0.2": - version: 1.0.2 - resolution: "get-symbol-description@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.5" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.4" - checksum: 10/e1cb53bc211f9dbe9691a4f97a46837a553c4e7caadd0488dc24ac694db8a390b93edd412b48dcdd0b4bbb4c595de1709effc75fc87c0839deedc6968f5bd973 - languageName: node - linkType: hard - -"get-symbol-from-current-process-h@npm:^1.0.1, get-symbol-from-current-process-h@npm:^1.0.2": - version: 1.0.2 - resolution: "get-symbol-from-current-process-h@npm:1.0.2" - checksum: 10/623cec9e343b50ee75effd6d5c1608c062dc0d0a85a82dd75d5bfe54bb9111d1c956e83e6fe8b190ad4defbacdbb8bcd27ee6b41b56079aead6603629d414616 - languageName: node - linkType: hard - -"get-tsconfig@npm:^4.7.5": - version: 4.7.5 - resolution: "get-tsconfig@npm:4.7.5" - dependencies: - resolve-pkg-maps: "npm:^1.0.0" - checksum: 10/de7de5e4978354e8e6d9985baf40ea32f908a13560f793bc989930c229cc8d5c3f7b6b2896d8e43eb1a9b4e9e30018ef4b506752fd2a4b4d0dfee4af6841b119 - languageName: node - linkType: hard - -"get-uv-event-loop-napi-h@npm:^1.0.5": - version: 1.0.6 - resolution: "get-uv-event-loop-napi-h@npm:1.0.6" - dependencies: - get-symbol-from-current-process-h: "npm:^1.0.1" - checksum: 10/3a2a9f9fc18196113d94496c79d5208c7e750cee6f65625fa34df195cab6bf9f122981c923e10cadd81d7f8da1ff92fe4020a7414d3ec16c820dee18e45bb29c - languageName: node - linkType: hard - -"get-value@npm:^2.0.3, get-value@npm:^2.0.6": - version: 2.0.6 - resolution: "get-value@npm:2.0.6" - checksum: 10/5c3b99cb5398ea8016bf46ff17afc5d1d286874d2ad38ca5edb6e87d75c0965b0094cb9a9dddef2c59c23d250702323539a7fbdd870620db38c7e7d7ec87c1eb - languageName: node - linkType: hard - -"getopts@npm:2.3.0": - version: 2.3.0 - resolution: "getopts@npm:2.3.0" - checksum: 10/64c7494d05d6b6205f3351336d9c000265e3f84975ab1bb2b500ff9488eb506bad1d04fa8d2687fd7d81379846e9a500409f8e4b9e20dc604c785abd9b5cf7fd - languageName: node - linkType: hard - -"getpass@npm:^0.1.1": - version: 0.1.7 - resolution: "getpass@npm:0.1.7" - dependencies: - assert-plus: "npm:^1.0.0" - checksum: 10/ab18d55661db264e3eac6012c2d3daeafaab7a501c035ae0ccb193c3c23e9849c6e29b6ac762b9c2adae460266f925d55a3a2a3a3c8b94be2f222df94d70c046 - languageName: node - linkType: hard - -"gherkin@npm:^5.0.0": - version: 5.1.0 - resolution: "gherkin@npm:5.1.0" - bin: - gherkin-javascript: bin/gherkin - checksum: 10/e2f74b7f0e36c1a4e38cb670439b078c41d4268f988c487f4a51acc85ea566c433f4c9426527a9d5c8dd0a7258593557597fd778b961d8025548b7452c55881a - languageName: node - linkType: hard - -"git-hooks-list@npm:1.0.3": - version: 1.0.3 - resolution: "git-hooks-list@npm:1.0.3" - checksum: 10/a1dd03d39c1d727ba08a35dbdbdcc6e96de8c4170c942dc95bf787ca6e34998d39fb5295a00242b58a3d265de0b69a0686d0cf583baa6b7830f268542c4576b9 - languageName: node - linkType: hard - -"git-raw-commits@npm:^2.0.11": - version: 2.0.11 - resolution: "git-raw-commits@npm:2.0.11" - dependencies: - dargs: "npm:^7.0.0" - lodash: "npm:^4.17.15" - meow: "npm:^8.0.0" - split2: "npm:^3.0.0" - through2: "npm:^4.0.0" - bin: - git-raw-commits: cli.js - checksum: 10/04e02b3da7c0e13a55f3e6fa8c1c5f06f7d0d641a9f90d896393ef0144bfcf91aa59beede68d14d61ed56aaf09f2c8dba175563c47ec000a8cf70f9df4877577 - languageName: node - linkType: hard - -"git-raw-commits@npm:^4.0.0": - version: 4.0.0 - resolution: "git-raw-commits@npm:4.0.0" - dependencies: - dargs: "npm:^8.0.0" - meow: "npm:^12.0.1" - split2: "npm:^4.0.0" - bin: - git-raw-commits: cli.mjs - checksum: 10/95546f4afcb33cf00ff638f7fec55ad61d4d927447737900e1f6fcbbdbb341b3f150908424cc62acb6d9faaea6f1e8f55d0697b899f0589af9d2733afb20abfb - languageName: node - linkType: hard - -"git-semver-tags@npm:^7.0.0": - version: 7.0.1 - resolution: "git-semver-tags@npm:7.0.1" - dependencies: - meow: "npm:^12.0.1" - semver: "npm:^7.5.2" - bin: - git-semver-tags: cli.mjs - checksum: 10/07b8a352bd28ad7678a2e12c91b11b5e53aff017420497bbb1cba0645e609f58d0a7d02d5f2ea6c7cd3019d7631ce7737f64cc90c47d944753c6bd2a36c03211 - languageName: node - linkType: hard - -"git-up@npm:^7.0.0": - version: 7.0.0 - resolution: "git-up@npm:7.0.0" - dependencies: - is-ssh: "npm:^1.4.0" - parse-url: "npm:^8.1.0" - checksum: 10/003ef38424702ac4cbe6d2817ccfb5811251244c955a8011ca40298d12cf1fb6529529f074d5832b5221e193ec05f4742ecf7806e6c4f41a81a2f2cff65d6bf4 - languageName: node - linkType: hard - -"git-url-parse@npm:^14.0.0": - version: 14.0.0 - resolution: "git-url-parse@npm:14.0.0" - dependencies: - git-up: "npm:^7.0.0" - checksum: 10/c19430947895676c59ce472d534c88e5d2d9f443e6b6e4deaa8ad9ad921ded6c27a996b219503775c37fbb90f4a3c02a5f106f14b61286386f9e5098dff7d634 - languageName: node - linkType: hard - -"github-from-package@npm:0.0.0": - version: 0.0.0 - resolution: "github-from-package@npm:0.0.0" - checksum: 10/2a091ba07fbce22205642543b4ea8aaf068397e1433c00ae0f9de36a3607baf5bcc14da97fbb798cfca6393b3c402031fca06d8b491a44206d6efef391c58537 - languageName: node - linkType: hard - -"glob-base@npm:^0.3.0": - version: 0.3.0 - resolution: "glob-base@npm:0.3.0" - dependencies: - glob-parent: "npm:^2.0.0" - is-glob: "npm:^2.0.0" - checksum: 10/106477297e0e2a120a2ba530a0b443d82a2750dc614c21b8d1ac064d100e3ba262397501828cb768c21e0b2d645da717d06ff58d7979a0d6ce6cbb29aa2d62e0 - languageName: node - linkType: hard - -"glob-parent@npm:>=5.1.2": - version: 6.0.2 - resolution: "glob-parent@npm:6.0.2" - dependencies: - is-glob: "npm:^4.0.3" - checksum: 10/c13ee97978bef4f55106b71e66428eb1512e71a7466ba49025fc2aec59a5bfb0954d5abd58fc5ee6c9b076eef4e1f6d3375c2e964b88466ca390da4419a786a8 - languageName: node - linkType: hard - -"glob-to-regexp@npm:^0.4.1": - version: 0.4.1 - resolution: "glob-to-regexp@npm:0.4.1" - checksum: 10/9009529195a955c40d7b9690794aeff5ba665cc38f1519e111c58bb54366fd0c106bde80acf97ba4e533208eb53422c83b136611a54c5fefb1edd8dc267cb62e - languageName: node - linkType: hard - -"glob@npm:7.1.6": - version: 7.1.6 - resolution: "glob@npm:7.1.6" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^3.0.4" - once: "npm:^1.3.0" - path-is-absolute: "npm:^1.0.0" - checksum: 10/7d6ec98bc746980d5fe4d764b9c7ada727e3fbd2a7d85cd96dd95fb18638c9c54a70c692fd2ab5d68a186dc8cd9d6a4192d3df220beed891f687db179c430237 - languageName: node - linkType: hard - -"glob@npm:7.2.0, glob@npm:^7.0.0, glob@npm:^7.0.5, glob@npm:^7.0.6, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": - version: 7.2.0 - resolution: "glob@npm:7.2.0" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^3.0.4" - once: "npm:^1.3.0" - path-is-absolute: "npm:^1.0.0" - checksum: 10/bc78b6ea0735b6e23d20678aba4ae6a4760e8c9527e3c4683ac25b14e70f55f9531245dcf25959b70cbc4aa3dcce1fc37ab65fd026a4cbd70aa3a44880bd396b - languageName: node - linkType: hard - -"glob@npm:^10.2.2": - version: 10.3.4 - resolution: "glob@npm:10.3.4" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^2.0.3" - minimatch: "npm:^9.0.1" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry: "npm:^1.10.1" - bin: - glob: dist/cjs/src/bin.js - checksum: 10/6375721bcd0c615fe4c1d61faaf9eb93e15d428f26bac6e85739221a84659b42601b2a085b20915142c0eb3d8a7155914884ff80f145d8c9f2397c8b771b8b60 - languageName: node - linkType: hard - -"glob@npm:^10.3.10": - version: 10.3.10 - resolution: "glob@npm:10.3.10" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^2.3.5" - minimatch: "npm:^9.0.1" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry: "npm:^1.10.1" - bin: - glob: dist/esm/bin.mjs - checksum: 10/38bdb2c9ce75eb5ed168f309d4ed05b0798f640b637034800a6bf306f39d35409bf278b0eaaffaec07591085d3acb7184a201eae791468f0f617771c2486a6a8 - languageName: node - linkType: hard - -"glob@npm:^10.4.2": - version: 10.4.2 - resolution: "glob@npm:10.4.2" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^3.1.2" - minimatch: "npm:^9.0.4" - minipass: "npm:^7.1.2" - package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^1.11.1" - bin: - glob: dist/esm/bin.mjs - checksum: 10/e412776b5952a818eba790c830bea161c9a56813fd767d8c4c49f855603b1fb962b3e73f1f627a47298a57d2992b9f0f2fe15cf93e74ecaaa63fb45d63fdd090 - languageName: node - linkType: hard - -"glob@npm:^7.0.3, glob@npm:^7.1.2, glob@npm:^7.2.3": - version: 7.2.3 - resolution: "glob@npm:7.2.3" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^3.1.1" - once: "npm:^1.3.0" - path-is-absolute: "npm:^1.0.0" - checksum: 10/59452a9202c81d4508a43b8af7082ca5c76452b9fcc4a9ab17655822e6ce9b21d4f8fbadabe4fe3faef448294cec249af305e2cd824b7e9aaf689240e5e96a7b - languageName: node - linkType: hard - -"glob@npm:^8.0.1": - version: 8.0.1 - resolution: "glob@npm:8.0.1" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^5.0.1" - once: "npm:^1.3.0" - path-is-absolute: "npm:^1.0.0" - checksum: 10/b69c95a2019ef186ba4dfa7a8c5382b901fd81caf66ab71a474a94f34d46f2b9ce81ba3099d4f3a3689a9a0b2fa74757d0793e110f27f62a35356209c5b65107 - languageName: node - linkType: hard - -"glob@npm:^8.1.0": - version: 8.1.0 - resolution: "glob@npm:8.1.0" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^5.0.1" - once: "npm:^1.3.0" - checksum: 10/9aab1c75eb087c35dbc41d1f742e51d0507aa2b14c910d96fb8287107a10a22f4bbdce26fc0a3da4c69a20f7b26d62f1640b346a4f6e6becfff47f335bb1dc5e - languageName: node - linkType: hard - -"glob@npm:^9.3.0, glob@npm:^9.3.1": - version: 9.3.4 - resolution: "glob@npm:9.3.4" - dependencies: - fs.realpath: "npm:^1.0.0" - minimatch: "npm:^8.0.2" - minipass: "npm:^4.2.4" - path-scurry: "npm:^1.6.1" - checksum: 10/6943df605ece77a1669145306500fb1421c51bf66b23a40e79dab676532d0954fa49256142ed7d47fd043dd97bb1841e1be475752b483d64448ccd913f25f928 - languageName: node - linkType: hard - -"global-directory@npm:^4.0.1": - version: 4.0.1 - resolution: "global-directory@npm:4.0.1" - dependencies: - ini: "npm:4.1.1" - checksum: 10/5b4df24438a4e5f21e43fbdd9e54f5e12bb48dce01a0a83b415d8052ce91be2d3a97e0c8f98a535e69649b2190036155e9f0f7d3c62f9318f31bdc3fd4f235f5 - languageName: node - linkType: hard - -"global-dirs@npm:^0.1.1": - version: 0.1.1 - resolution: "global-dirs@npm:0.1.1" - dependencies: - ini: "npm:^1.3.4" - checksum: 10/10624f5a8ddb8634c22804c6b24f93fb591c3639a6bc78e3584e01a238fc6f7b7965824184e57d63f6df36980b6c191484ad7bc6c35a1599b8f1d64be64c2a4a - languageName: node - linkType: hard - -"global-dirs@npm:^3.0.0": - version: 3.0.0 - resolution: "global-dirs@npm:3.0.0" - dependencies: - ini: "npm:2.0.0" - checksum: 10/953c17cf14bf6ee0e2100ae82a0d779934eed8a3ec5c94a7a4f37c5b3b592c31ea015fb9a15cf32484de13c79f4a814f3015152f3e1d65976cfbe47c1bfe4a88 - languageName: node - linkType: hard - -"global-modules@npm:^1.0.0": - version: 1.0.0 - resolution: "global-modules@npm:1.0.0" - dependencies: - global-prefix: "npm:^1.0.1" - is-windows: "npm:^1.0.1" - resolve-dir: "npm:^1.0.0" - checksum: 10/e4031a01c0c7401349bb69e1499c7268d636552b16374c0002d677c7a6185da6782a2927a7a3a7c046eb7be97cd26b3c7b1b736f9818ecc7ac09e9d61449065e - languageName: node - linkType: hard - -"global-modules@npm:^2.0.0": - version: 2.0.0 - resolution: "global-modules@npm:2.0.0" - dependencies: - global-prefix: "npm:^3.0.0" - checksum: 10/4aee73adf533fe82ead2ad15c8bfb6ea4fb29e16d2d067521ab39d3b45b8f834d71c47a807e4f8f696e79497c3946d4ccdcd708da6f3a4522d65b087b8852f64 - languageName: node - linkType: hard - -"global-prefix@npm:^1.0.1": - version: 1.0.2 - resolution: "global-prefix@npm:1.0.2" - dependencies: - expand-tilde: "npm:^2.0.2" - homedir-polyfill: "npm:^1.0.1" - ini: "npm:^1.3.4" - is-windows: "npm:^1.0.1" - which: "npm:^1.2.14" - checksum: 10/68cf78f81cd85310095ca1f0ec22dd5f43a1059646b2c7b3fc4a7c9ce744356e66ca833adda4e5753e38021847aaec393a159a029ba2d257c08ccb3f00ca2899 - languageName: node - linkType: hard - -"global-prefix@npm:^3.0.0": - version: 3.0.0 - resolution: "global-prefix@npm:3.0.0" - dependencies: - ini: "npm:^1.3.5" - kind-of: "npm:^6.0.2" - which: "npm:^1.3.1" - checksum: 10/a405b9f83c7d88a49dc1c1e458d6585e258356810d3d0f41094265152a06a0f393b14d911f45616e35a4ce3894176a73be2984883575e778f55e90bf812d7337 - languageName: node - linkType: hard - -"global@npm:~4.4.0": - version: 4.4.0 - resolution: "global@npm:4.4.0" - dependencies: - min-document: "npm:^2.19.0" - process: "npm:^0.11.10" - checksum: 10/9c057557c8f5a5bcfbeb9378ba4fe2255d04679452be504608dd5f13b54edf79f7be1db1031ea06a4ec6edd3b9f5f17d2d172fb47e6c69dae57fd84b7e72b77f - languageName: node - linkType: hard - -"globals@npm:^11.0.1, globals@npm:^11.1.0": - version: 11.12.0 - resolution: "globals@npm:11.12.0" - checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 - languageName: node - linkType: hard - -"globals@npm:^13.19.0": - version: 13.21.0 - resolution: "globals@npm:13.21.0" - dependencies: - type-fest: "npm:^0.20.2" - checksum: 10/98ce947dc413e6c8feed236f980dee4bc8d9f4b29790e27bccb277d385fac5d77146e1f9c244c6609aca1d109101642e663caf88c0ba6bff0b069ea82d571441 - languageName: node - linkType: hard - -"globals@npm:^9.14.0": - version: 9.18.0 - resolution: "globals@npm:9.18.0" - checksum: 10/492600be44eb7ae107d37fa8536fb98f36a6f051c1420cd912a6de307758d502b9930a8f7beda0e74a98a5613aae464c828bb81418fc335c9ff4707ba9fd9070 - languageName: node - linkType: hard - -"globalthis@npm:^1.0.2, globalthis@npm:^1.0.3": - version: 1.0.3 - resolution: "globalthis@npm:1.0.3" - dependencies: - define-properties: "npm:^1.1.3" - checksum: 10/45ae2f3b40a186600d0368f2a880ae257e8278b4c7704f0417d6024105ad7f7a393661c5c2fa1334669cd485ea44bc883a08fdd4516df2428aec40c99f52aa89 - languageName: node - linkType: hard - -"globby@npm:10.0.0": - version: 10.0.0 - resolution: "globby@npm:10.0.0" - dependencies: - "@types/glob": "npm:^7.1.1" - array-union: "npm:^2.1.0" - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.0.3" - glob: "npm:^7.1.3" - ignore: "npm:^5.1.1" - merge2: "npm:^1.2.3" - slash: "npm:^3.0.0" - checksum: 10/d0c94128706b5e12a251ddbd1b87cf0e67e57e373c816f242bb7a4a2fbe931602db1a330780d511a5bce675c25fac297622ac01d540c8479cca9c8177528947a - languageName: node - linkType: hard - -"globby@npm:12.2.0": - version: 12.2.0 - resolution: "globby@npm:12.2.0" - dependencies: - array-union: "npm:^3.0.1" - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.2.7" - ignore: "npm:^5.1.9" - merge2: "npm:^1.4.1" - slash: "npm:^4.0.0" - checksum: 10/894e05b2eaec0ba7cdad1e459061078f9973768927f5aa28bbc81f967af92bfa7726c3f38fbb09de51905beebf5e8670d6b990b480e897845f770d9c42ac3556 - languageName: node - linkType: hard - -"globby@npm:^11.0.4, globby@npm:^11.1.0": - version: 11.1.0 - resolution: "globby@npm:11.1.0" - dependencies: - array-union: "npm:^2.1.0" - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.2.9" - ignore: "npm:^5.2.0" - merge2: "npm:^1.4.1" - slash: "npm:^3.0.0" - checksum: 10/288e95e310227bbe037076ea81b7c2598ccbc3122d87abc6dab39e1eec309aa14f0e366a98cdc45237ffcfcbad3db597778c0068217dcb1950fef6249104e1b1 - languageName: node - linkType: hard - -"globby@npm:^13.1.1": - version: 13.1.1 - resolution: "globby@npm:13.1.1" - dependencies: - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.2.11" - ignore: "npm:^5.2.0" - merge2: "npm:^1.4.1" - slash: "npm:^4.0.0" - checksum: 10/cbf1a949aa5543c52ef00054ec29582bacdb2639eda79993da83fc8ac4f51d94c90018cd3ee50b22b76d357575c75bb9a9746ab010b8e0dd0f2bab7544154538 - languageName: node - linkType: hard - -"globby@npm:^13.1.2": - version: 13.2.2 - resolution: "globby@npm:13.2.2" - dependencies: - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.3.0" - ignore: "npm:^5.2.4" - merge2: "npm:^1.4.1" - slash: "npm:^4.0.0" - checksum: 10/4494a9d2162a7e4d327988b26be66d8eab87d7f59a83219e74b065e2c3ced23698f68fb10482bf9337133819281803fb886d6ae06afbb2affa743623eb0b1949 - languageName: node - linkType: hard - -"globby@npm:^14.0.2": - version: 14.0.2 - resolution: "globby@npm:14.0.2" - dependencies: - "@sindresorhus/merge-streams": "npm:^2.1.0" - fast-glob: "npm:^3.3.2" - ignore: "npm:^5.2.4" - path-type: "npm:^5.0.0" - slash: "npm:^5.1.0" - unicorn-magic: "npm:^0.1.0" - checksum: 10/67660da70fc1223f7170c1a62ba6c373385e9e39765d952b6518606dec15ed8c7958e9dae6ba5752a31dbc1e9126f146938b830ad680fe794141734ffc3fbb75 - languageName: node - linkType: hard - -"gluegun@npm:5.1.6": - version: 5.1.6 - resolution: "gluegun@npm:5.1.6" - dependencies: - apisauce: "npm:^2.1.5" - app-module-path: "npm:^2.2.0" - cli-table3: "npm:0.6.0" - colors: "npm:1.4.0" - cosmiconfig: "npm:7.0.1" - cross-spawn: "npm:7.0.3" - ejs: "npm:3.1.8" - enquirer: "npm:2.3.6" - execa: "npm:5.1.1" - fs-jetpack: "npm:4.3.1" - lodash.camelcase: "npm:^4.3.0" - lodash.kebabcase: "npm:^4.1.1" - lodash.lowercase: "npm:^4.3.0" - lodash.lowerfirst: "npm:^4.3.1" - lodash.pad: "npm:^4.5.1" - lodash.padend: "npm:^4.6.1" - lodash.padstart: "npm:^4.6.1" - lodash.repeat: "npm:^4.1.0" - lodash.snakecase: "npm:^4.1.1" - lodash.startcase: "npm:^4.4.0" - lodash.trim: "npm:^4.5.1" - lodash.trimend: "npm:^4.5.1" - lodash.trimstart: "npm:^4.5.1" - lodash.uppercase: "npm:^4.3.0" - lodash.upperfirst: "npm:^4.3.1" - ora: "npm:4.0.2" - pluralize: "npm:^8.0.0" - semver: "npm:7.3.5" - which: "npm:2.0.2" - yargs-parser: "npm:^21.0.0" - bin: - gluegun: bin/gluegun - checksum: 10/b6a9938307611e200b799158fca3d3631c194dc0d74e708211d21d894550a8de55ce4d15711d8ac746ea8d4a5538231e96abd1e0bac299f5c0fbd09a0763c433 - languageName: node - linkType: hard - -"go-bin@npm:^1.4.0": - version: 1.4.0 - resolution: "go-bin@npm:1.4.0" - dependencies: - decompress: "npm:^4.2.1" - mkdirp: "npm:^1.0.4" - bin: - go-bin: cli.js - checksum: 10/609b77945fdd4a4a7fc1ec649624a5ab0ad792ef3d931d4590c75f0c3bb16b4d83adb0d1da3187414cfeba0180a1a7d7bd5e038cfcbb90217f20726327eede2e - languageName: node - linkType: hard - -"go-versions@npm:^1.3.2": - version: 1.3.2 - resolution: "go-versions@npm:1.3.2" - bin: - go-versions: cli.js - checksum: 10/29ec937247a165cc2c3ba707e979a500a6232862e64ce3021576cccdb2587dee93a4c9075be099decd6e724a7a529d1dd9ebffd1ccd900554e2a67c9b7bf6004 - languageName: node - linkType: hard - -"gonzales-pe@npm:^4.3.0": - version: 4.3.0 - resolution: "gonzales-pe@npm:4.3.0" - dependencies: - minimist: "npm:^1.2.5" - bin: - gonzales: bin/gonzales.js - checksum: 10/d1676546bcaa4cb1c6c1fc5de5d62e85960665a13a4c489b02baeb58a10c53a249beef05ceaf21ea801813a559ff17d7b61158aa417211c135bcb8bdcb1701ca - languageName: node - linkType: hard - -"google-auth-library@npm:^9.0.0": - version: 9.1.0 - resolution: "google-auth-library@npm:9.1.0" - dependencies: - base64-js: "npm:^1.3.0" - ecdsa-sig-formatter: "npm:^1.0.11" - gaxios: "npm:^6.0.0" - gcp-metadata: "npm:^6.0.0" - gtoken: "npm:^7.0.0" - jws: "npm:^4.0.0" - lru-cache: "npm:^6.0.0" - checksum: 10/5b273bdc7629d3d0dbb78449b9ce5c9edaa35e6d22b6c4fc86b797de8b6c34b8e3cf73c36e3b1fb0517ecf13a8970e89da4172453d031e492ca2729f035d1d31 - languageName: node - linkType: hard - -"google-gax@npm:4.0.5": - version: 4.0.5 - resolution: "google-gax@npm:4.0.5" - dependencies: - "@grpc/grpc-js": "npm:~1.9.6" - "@grpc/proto-loader": "npm:^0.7.0" - "@types/long": "npm:^4.0.0" - abort-controller: "npm:^3.0.0" - duplexify: "npm:^4.0.0" - google-auth-library: "npm:^9.0.0" - node-fetch: "npm:^2.6.1" - object-hash: "npm:^3.0.0" - proto3-json-serializer: "npm:^2.0.0" - protobufjs: "npm:7.2.5" - retry-request: "npm:^7.0.0" - checksum: 10/ad642fbffd68ed77d0a365584f8761887ac26564f0d6a3fea7a40f3dcc34137f90b276fc2337ec7a7dd145f55236553cb19a162291741780822bcafddcc246b2 - languageName: node - linkType: hard - -"google-gax@npm:^4.0.3": - version: 4.0.4 - resolution: "google-gax@npm:4.0.4" - dependencies: - "@grpc/grpc-js": "npm:~1.9.0" - "@grpc/proto-loader": "npm:^0.7.0" - "@types/long": "npm:^4.0.0" - abort-controller: "npm:^3.0.0" - duplexify: "npm:^4.0.0" - google-auth-library: "npm:^9.0.0" - node-fetch: "npm:^2.6.1" - object-hash: "npm:^3.0.0" - proto3-json-serializer: "npm:^2.0.0" - protobufjs: "npm:7.2.5" - retry-request: "npm:^6.0.0" - checksum: 10/4dd17ba8a78108565c4b5dc1c8149d34cdfdf1ccdeadcaba8385e0caaa39d7c0cb1d3ecc7c7239e3cbed10d669ca895ebf2666c091cab523f0e5ebe60f72e301 - languageName: node - linkType: hard - -"google-protobuf@npm:3.15.8": - version: 3.15.8 - resolution: "google-protobuf@npm:3.15.8" - checksum: 10/0b1ea24a552e0870b658b975ce5090c13f35793dc4ff8a733ad9c27990126eb9bd375fa9d3204af4f634930ae358d8b5e78f9f4cdb1f700e35b4d857f0aac742 - languageName: node - linkType: hard - -"google-protobuf@npm:3.21.4": - version: 3.21.4 - resolution: "google-protobuf@npm:3.21.4" - checksum: 10/0d87fe8ef221d105cbaa808f4024bd577638524d8e461469e3733f2e4933391ad4da86b7fcbd11e8781bee04eacf2e8ba19aaacd5f9deb336a220485841d980f - languageName: node - linkType: hard - -"gopd@npm:^1.0.1": - version: 1.0.1 - resolution: "gopd@npm:1.0.1" - dependencies: - get-intrinsic: "npm:^1.1.3" - checksum: 10/5fbc7ad57b368ae4cd2f41214bd947b045c1a4be2f194a7be1778d71f8af9dbf4004221f3b6f23e30820eb0d052b4f819fe6ebe8221e2a3c6f0ee4ef173421ca - languageName: node - linkType: hard - -"got@npm:12.1.0": - version: 12.1.0 - resolution: "got@npm:12.1.0" - dependencies: - "@sindresorhus/is": "npm:^4.6.0" - "@szmarczak/http-timer": "npm:^5.0.1" - "@types/cacheable-request": "npm:^6.0.2" - "@types/responselike": "npm:^1.0.0" - cacheable-lookup: "npm:^6.0.4" - cacheable-request: "npm:^7.0.2" - decompress-response: "npm:^6.0.0" - form-data-encoder: "npm:1.7.1" - get-stream: "npm:^6.0.1" - http2-wrapper: "npm:^2.1.10" - lowercase-keys: "npm:^3.0.0" - p-cancelable: "npm:^3.0.0" - responselike: "npm:^2.0.0" - checksum: 10/d1dab1884b14d1f59d10005ee3834faf6d9b43530c7faf603c176d35dceb2b8e0e2e01b9e0d4fc320409ac1b4d958196ff928dc6df0ddd0a3e7a254aa9edfd45 - languageName: node - linkType: hard - -"got@npm:9.6.0, got@npm:^9.6.0": - version: 9.6.0 - resolution: "got@npm:9.6.0" - dependencies: - "@sindresorhus/is": "npm:^0.14.0" - "@szmarczak/http-timer": "npm:^1.1.2" - cacheable-request: "npm:^6.0.0" - decompress-response: "npm:^3.3.0" - duplexer3: "npm:^0.1.4" - get-stream: "npm:^4.1.0" - lowercase-keys: "npm:^1.0.1" - mimic-response: "npm:^1.0.1" - p-cancelable: "npm:^1.0.0" - to-readable-stream: "npm:^1.0.0" - url-parse-lax: "npm:^3.0.0" - checksum: 10/fae3273b44392b6b1d88071d04ea984784e63dbf8ba3f70b04cb7edda53c7668ee17288ac46af507a9f2aa60c183c5ea1732339141d253dda3eb19f92985c771 - languageName: node - linkType: hard - -"got@npm:^12.6.0": - version: 12.6.1 - resolution: "got@npm:12.6.1" - dependencies: - "@sindresorhus/is": "npm:^5.2.0" - "@szmarczak/http-timer": "npm:^5.0.1" - cacheable-lookup: "npm:^7.0.0" - cacheable-request: "npm:^10.2.8" - decompress-response: "npm:^6.0.0" - form-data-encoder: "npm:^2.1.2" - get-stream: "npm:^6.0.1" - http2-wrapper: "npm:^2.1.10" - lowercase-keys: "npm:^3.0.0" - p-cancelable: "npm:^3.0.0" - responselike: "npm:^3.0.0" - checksum: 10/6c22f1449f4574d79a38e0eba0b753ce2f9030d61838a1ae1e25d3ff5b0db7916aa21023ac369c67d39d17f87bba9283a0b0cb88590de77926c968630aacae75 - languageName: node - linkType: hard - -"got@npm:^7.1.0": - version: 7.1.0 - resolution: "got@npm:7.1.0" - dependencies: - decompress-response: "npm:^3.2.0" - duplexer3: "npm:^0.1.4" - get-stream: "npm:^3.0.0" - is-plain-obj: "npm:^1.1.0" - is-retry-allowed: "npm:^1.0.0" - is-stream: "npm:^1.0.0" - isurl: "npm:^1.0.0-alpha5" - lowercase-keys: "npm:^1.0.0" - p-cancelable: "npm:^0.3.0" - p-timeout: "npm:^1.1.1" - safe-buffer: "npm:^5.0.1" - timed-out: "npm:^4.0.0" - url-parse-lax: "npm:^1.0.0" - url-to-options: "npm:^1.0.1" - checksum: 10/b72514add3b716cbc9e4c0ff16c10e093c08167e1b91caca177c3a967b8a397ac2a6c12665fd0150ef56d1c746bc466b04469714f125a4f5eea1e77435d6704a - languageName: node - linkType: hard - -"graceful-fs@npm:^4.1.10, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": - version: 4.2.9 - resolution: "graceful-fs@npm:4.2.9" - checksum: 10/4bcf2de4f1108a928dd64d5e894b833cba634b2e82729c0e57f327d384bf15098e4706639f3045e587e845afed06bae52e70916f74a42db5a56e9ca44f6c2fd1 - languageName: node - linkType: hard - -"graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.11": - version: 4.2.11 - resolution: "graceful-fs@npm:4.2.11" - checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 - languageName: node - linkType: hard - -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10/6dd60dba97007b21e3a829fab3f771803cc1292977fe610e240ea72afd67e5690ac9eeaafc4a99710e78962e5936ab5a460787c2a1180f1cb0ccfac37d29f897 - languageName: node - linkType: hard - -"graphql-tag@npm:^2.11.0, graphql-tag@npm:^2.12.6": - version: 2.12.6 - resolution: "graphql-tag@npm:2.12.6" - dependencies: - tslib: "npm:^2.1.0" - peerDependencies: - graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: 10/23a2bc1d3fbeae86444204e0ac08522e09dc369559ba75768e47421a7321b59f352fb5b2c9a5c37d3cf6de890dca4e5ac47e740c7cc622e728572ecaa649089e - languageName: node - linkType: hard - -"graphql@npm:^15.3.0": - version: 15.8.0 - resolution: "graphql@npm:15.8.0" - checksum: 10/f8d830287a9028d6779b59c437e0ade63a713b47521b02b60316df1761b805b1a7ce03be88053d224b7f78f5d1d1a786d287ab229cd158b42ebeea9e86daaba5 - languageName: node - linkType: hard - -"grpc-tools@npm:1.12.4": - version: 1.12.4 - resolution: "grpc-tools@npm:1.12.4" - dependencies: - "@mapbox/node-pre-gyp": "npm:^1.0.5" - bin: - grpc_tools_node_protoc: bin/protoc.js - grpc_tools_node_protoc_plugin: bin/protoc_plugin.js - checksum: 10/56852c756fe34be5f3b2cf75b1d432886b17ad32d438cacbcf8d30e980c7361a8e8325b1e626ce99826b8dbf1364145bedbedeb6d7feb916c4801481810a05d1 - languageName: node - linkType: hard - -"grpc_tools_node_protoc_ts@npm:5.3.3": - version: 5.3.3 - resolution: "grpc_tools_node_protoc_ts@npm:5.3.3" - dependencies: - google-protobuf: "npm:3.15.8" - handlebars: "npm:4.7.7" - bin: - protoc-gen-ts: bin/protoc-gen-ts - checksum: 10/96fe57b04a7d9e7e656678fab14dd4fc8027849abbb487a7eae4d2841651aa9a481402d5b9df34b4ac3bac6f190551db2e647127d6f6736d5f89ea2fa791ff33 - languageName: node - linkType: hard - -"gtoken@npm:^7.0.0": - version: 7.0.1 - resolution: "gtoken@npm:7.0.1" - dependencies: - gaxios: "npm:^6.0.0" - jws: "npm:^4.0.0" - checksum: 10/0400ba81af8d2a5b630fd1fd4d748999b4091ee4c5ee52991826e72cd33e5d5373d4e29218c8cad18c81bea75966087415d5ba222165864e8a89d2d130802e71 - languageName: node - linkType: hard - -"guess-parser@npm:0.4.22": - version: 0.4.22 - resolution: "guess-parser@npm:0.4.22" - dependencies: - "@wessberg/ts-evaluator": "npm:0.0.27" - peerDependencies: - typescript: ">=3.7.5" - checksum: 10/cd30599650548616c429c3f5744cafd2d30dd9a3c51e848b340ef7cff4844d1dcf7a98446acbbf8f929495b21a4ea1fea1a03e236ab5ad65b322b490b08fbfe8 - languageName: node - linkType: hard - -"gzip-size@npm:^6.0.0": - version: 6.0.0 - resolution: "gzip-size@npm:6.0.0" - dependencies: - duplexer: "npm:^0.1.2" - checksum: 10/2df97f359696ad154fc171dcb55bc883fe6e833bca7a65e457b9358f3cb6312405ed70a8da24a77c1baac0639906cd52358dc0ce2ec1a937eaa631b934c94194 - languageName: node - linkType: hard - -"hada@npm:0.0.8": - version: 0.0.8 - resolution: "hada@npm:0.0.8" - checksum: 10/ef0fc4fad6c698afebbd95072dd7b90963731232d5cca1c2f84d5e1ed8557df2a706584cc481b60571df460d8510ab3faf9612045c1095da1f6522df993deef0 - languageName: node - linkType: hard - -"handle-thing@npm:^2.0.0": - version: 2.0.1 - resolution: "handle-thing@npm:2.0.1" - checksum: 10/441ec98b07f26819c70c702f6c874088eebeb551b242fe8fae4eab325746b82bf84ae7a1f6419547698accb3941fa26806c5f5f93c50e19f90e499065a711d61 - languageName: node - linkType: hard - -"handlebars@npm:4.7.7, handlebars@npm:^4.0.3, handlebars@npm:^4.7.7": - version: 4.7.7 - resolution: "handlebars@npm:4.7.7" - dependencies: - minimist: "npm:^1.2.5" - neo-async: "npm:^2.6.0" - source-map: "npm:^0.6.1" - uglify-js: "npm:^3.1.4" - wordwrap: "npm:^1.0.0" - dependenciesMeta: - uglify-js: - optional: true - bin: - handlebars: bin/handlebars - checksum: 10/617b1e689b7577734abc74564bdb8cdaddf8fd48ce72afdb489f426e9c60a7d6ee2a2707c023720c4059070128243c948bded8f2716e4543378033e3971b85ea - languageName: node - linkType: hard - -"har-schema@npm:^2.0.0": - version: 2.0.0 - resolution: "har-schema@npm:2.0.0" - checksum: 10/d8946348f333fb09e2bf24cc4c67eabb47c8e1d1aa1c14184c7ffec1140a49ec8aa78aa93677ae452d71d5fc0fdeec20f0c8c1237291fc2bcb3f502a5d204f9b - languageName: node - linkType: hard - -"har-validator@npm:~5.1.0, har-validator@npm:~5.1.3": - version: 5.1.5 - resolution: "har-validator@npm:5.1.5" - dependencies: - ajv: "npm:^6.12.3" - har-schema: "npm:^2.0.0" - checksum: 10/b998a7269ca560d7f219eedc53e2c664cd87d487e428ae854a6af4573fc94f182fe9d2e3b92ab968249baec7ebaf9ead69cf975c931dc2ab282ec182ee988280 - languageName: node - linkType: hard - -"hard-rejection@npm:^2.1.0": - version: 2.1.0 - resolution: "hard-rejection@npm:2.1.0" - checksum: 10/7baaf80a0c7fff4ca79687b4060113f1529589852152fa935e6787a2bc96211e784ad4588fb3048136ff8ffc9dfcf3ae385314a5b24db32de20bea0d1597f9dc - languageName: node - linkType: hard - -"hardhat@npm:2.17.2": - version: 2.17.2 - resolution: "hardhat@npm:2.17.2" - dependencies: - "@ethersproject/abi": "npm:^5.1.2" - "@metamask/eth-sig-util": "npm:^4.0.0" - "@nomicfoundation/ethereumjs-block": "npm:5.0.2" - "@nomicfoundation/ethereumjs-blockchain": "npm:7.0.2" - "@nomicfoundation/ethereumjs-common": "npm:4.0.2" - "@nomicfoundation/ethereumjs-evm": "npm:2.0.2" - "@nomicfoundation/ethereumjs-rlp": "npm:5.0.2" - "@nomicfoundation/ethereumjs-statemanager": "npm:2.0.2" - "@nomicfoundation/ethereumjs-trie": "npm:6.0.2" - "@nomicfoundation/ethereumjs-tx": "npm:5.0.2" - "@nomicfoundation/ethereumjs-util": "npm:9.0.2" - "@nomicfoundation/ethereumjs-vm": "npm:7.0.2" - "@nomicfoundation/solidity-analyzer": "npm:^0.1.0" - "@sentry/node": "npm:^5.18.1" - "@types/bn.js": "npm:^5.1.0" - "@types/lru-cache": "npm:^5.1.0" - adm-zip: "npm:^0.4.16" - aggregate-error: "npm:^3.0.0" - ansi-escapes: "npm:^4.3.0" - chalk: "npm:^2.4.2" - chokidar: "npm:^3.4.0" - ci-info: "npm:^2.0.0" - debug: "npm:^4.1.1" - enquirer: "npm:^2.3.0" - env-paths: "npm:^2.2.0" - ethereum-cryptography: "npm:^1.0.3" - ethereumjs-abi: "npm:^0.6.8" - find-up: "npm:^2.1.0" - fp-ts: "npm:1.19.3" - fs-extra: "npm:^7.0.1" - glob: "npm:7.2.0" - immutable: "npm:^4.0.0-rc.12" - io-ts: "npm:1.10.4" - keccak: "npm:^3.0.2" - lodash: "npm:^4.17.11" - mnemonist: "npm:^0.38.0" - mocha: "npm:^10.0.0" - p-map: "npm:^4.0.0" - raw-body: "npm:^2.4.1" - resolve: "npm:1.17.0" - semver: "npm:^6.3.0" - solc: "npm:0.7.3" - source-map-support: "npm:^0.5.13" - stacktrace-parser: "npm:^0.1.10" - tsort: "npm:0.0.1" - undici: "npm:^5.14.0" - uuid: "npm:^8.3.2" - ws: "npm:^7.4.6" - peerDependencies: - ts-node: "*" - typescript: "*" - peerDependenciesMeta: - ts-node: - optional: true - typescript: - optional: true - bin: - hardhat: internal/cli/bootstrap.js - checksum: 10/5b5055095ba22cca4221e9defe2886c6112202abf06321952355f338eed180972e2ebe73f7e312d678a47f5cf98fef7334e217289e8e8e3ddfc027fd916d8c36 - languageName: node - linkType: hard - -"harmony-reflect@npm:^1.4.6": - version: 1.6.2 - resolution: "harmony-reflect@npm:1.6.2" - checksum: 10/69d30ebfb5dbd6ff0553725c7922404cf1dfe5390db1618298eed27fe6c9bd2f3f677727e9da969d21648f4a6a39041e2f46e99976be4385f9e34bac23058cd4 - languageName: node - linkType: hard - -"has-ansi@npm:^2.0.0": - version: 2.0.0 - resolution: "has-ansi@npm:2.0.0" - dependencies: - ansi-regex: "npm:^2.0.0" - checksum: 10/1b51daa0214440db171ff359d0a2d17bc20061164c57e76234f614c91dbd2a79ddd68dfc8ee73629366f7be45a6df5f2ea9de83f52e1ca24433f2cc78c35d8ec - languageName: node - linkType: hard - -"has-bigints@npm:^1.0.1": - version: 1.0.1 - resolution: "has-bigints@npm:1.0.1" - checksum: 10/44ab55868174470065d2e0f8f6def1c990d12b82162a8803c679699fa8a39f966e336f2a33c185092fe8aea7e8bf2e85f1c26add5f29d98f2318bd270096b183 - languageName: node - linkType: hard - -"has-bigints@npm:^1.0.2": - version: 1.0.2 - resolution: "has-bigints@npm:1.0.2" - checksum: 10/4e0426c900af034d12db14abfece02ce7dbf53f2022d28af1a97913ff4c07adb8799476d57dc44fbca0e07d1dbda2a042c2928b1f33d3f09c15de0640a7fb81b - languageName: node - linkType: hard - -"has-dynamic-import@npm:^2.0.1": - version: 2.0.1 - resolution: "has-dynamic-import@npm:2.0.1" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.1" - checksum: 10/518f474357cc77118682eafae93ee63007f1d8a580b14cb815088bd407e7e8d1c27b47147b5fba6af47c3181b45fbfd3d7cf57704be723f4ef9f922bc334415c - languageName: node - linkType: hard - -"has-flag@npm:^1.0.0": - version: 1.0.0 - resolution: "has-flag@npm:1.0.0" - checksum: 10/ce3f8ae978e70f16e4bbe17d3f0f6d6c0a3dd3b62a23f97c91d0fda9ed8e305e13baf95cc5bee4463b9f25ac9f5255de113165c5fb285e01b8065b2ac079b301 - languageName: node - linkType: hard - -"has-flag@npm:^3.0.0": - version: 3.0.0 - resolution: "has-flag@npm:3.0.0" - checksum: 10/4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b - languageName: node - linkType: hard - -"has-flag@npm:^4.0.0": - version: 4.0.0 - resolution: "has-flag@npm:4.0.0" - checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad - languageName: node - linkType: hard - -"has-own-prop@npm:^2.0.0": - version: 2.0.0 - resolution: "has-own-prop@npm:2.0.0" - checksum: 10/ca6336e85ead2295c9603880cbc199e2d3ff7eaea0e9035d68fbc79892e9cf681abc62c0909520f112c671dad9961be2173b21dff951358cc98425c560e789e0 - languageName: node - linkType: hard - -"has-property-descriptors@npm:^1.0.0": - version: 1.0.0 - resolution: "has-property-descriptors@npm:1.0.0" - dependencies: - get-intrinsic: "npm:^1.1.1" - checksum: 10/a6d3f0a266d0294d972e354782e872e2fe1b6495b321e6ef678c9b7a06a40408a6891817350c62e752adced73a94ac903c54734fee05bf65b1905ee1368194bb - languageName: node - linkType: hard - -"has-property-descriptors@npm:^1.0.1, has-property-descriptors@npm:^1.0.2": - version: 1.0.2 - resolution: "has-property-descriptors@npm:1.0.2" - dependencies: - es-define-property: "npm:^1.0.0" - checksum: 10/2d8c9ab8cebb572e3362f7d06139a4592105983d4317e68f7adba320fe6ddfc8874581e0971e899e633fd5f72e262830edce36d5a0bc863dad17ad20572484b2 - languageName: node - linkType: hard - -"has-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "has-proto@npm:1.0.1" - checksum: 10/eab2ab0ed1eae6d058b9bbc4c1d99d2751b29717be80d02fd03ead8b62675488de0c7359bc1fdd4b87ef6fd11e796a9631ad4d7452d9324fdada70158c2e5be7 - languageName: node - linkType: hard - -"has-proto@npm:^1.0.3": - version: 1.0.3 - resolution: "has-proto@npm:1.0.3" - checksum: 10/0b67c2c94e3bea37db3e412e3c41f79d59259875e636ba471e94c009cdfb1fa82bf045deeffafc7dbb9c148e36cae6b467055aaa5d9fad4316e11b41e3ba551a - languageName: node - linkType: hard - -"has-symbol-support-x@npm:^1.4.1": - version: 1.4.2 - resolution: "has-symbol-support-x@npm:1.4.2" - checksum: 10/c6ea5f3a8114e70f5b1ee260c2140ebc2146253aa955d35100d5525a8e841680f5fbbaaaf03f45a3c28082f7037860e6f240af9e9f891a66f20e2115222fbba6 - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2": - version: 1.0.2 - resolution: "has-symbols@npm:1.0.2" - checksum: 10/3d8b4f3c7d9e1535a1ba969035234e20d127519447ce6252be615fae55201119ef557f629328699385ca3e992f1d480e19fe2a850088bd98044d0d9f10199b70 - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.3": - version: 1.0.3 - resolution: "has-symbols@npm:1.0.3" - checksum: 10/464f97a8202a7690dadd026e6d73b1ceeddd60fe6acfd06151106f050303eaa75855aaa94969df8015c11ff7c505f196114d22f7386b4a471038da5874cf5e9b - languageName: node - linkType: hard - -"has-to-string-tag-x@npm:^1.2.0": - version: 1.4.1 - resolution: "has-to-string-tag-x@npm:1.4.1" - dependencies: - has-symbol-support-x: "npm:^1.4.1" - checksum: 10/9ef3fe5e79a7265aaff14f117417a67f46edfcb7c93af8a897613941a669009062cf8eae15496e531c688227dd46524e6b51c5c2f88ed578276a7f9b4242781e - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.0": - version: 1.0.0 - resolution: "has-tostringtag@npm:1.0.0" - dependencies: - has-symbols: "npm:^1.0.2" - checksum: 10/95546e7132efc895a9ae64a8a7cf52588601fc3d52e0304ed228f336992cdf0baaba6f3519d2655e560467db35a1ed79f6420c286cc91a13aa0647a31ed92570 - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.1, has-tostringtag@npm:^1.0.2": - version: 1.0.2 - resolution: "has-tostringtag@npm:1.0.2" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10/c74c5f5ceee3c8a5b8bc37719840dc3749f5b0306d818974141dda2471a1a2ca6c8e46b9d6ac222c5345df7a901c9b6f350b1e6d62763fec877e26609a401bfe - languageName: node - linkType: hard - -"has-unicode@npm:^2.0.1": - version: 2.0.1 - resolution: "has-unicode@npm:2.0.1" - checksum: 10/041b4293ad6bf391e21c5d85ed03f412506d6623786b801c4ab39e4e6ca54993f13201bceb544d92963f9e0024e6e7fbf0cb1d84c9d6b31cb9c79c8c990d13d8 - languageName: node - linkType: hard - -"has-value@npm:^0.3.1": - version: 0.3.1 - resolution: "has-value@npm:0.3.1" - dependencies: - get-value: "npm:^2.0.3" - has-values: "npm:^0.1.4" - isobject: "npm:^2.0.0" - checksum: 10/29e2a1e6571dad83451b769c7ce032fce6009f65bccace07c2962d3ad4d5530b6743d8f3229e4ecf3ea8e905d23a752c5f7089100c1f3162039fa6dc3976558f - languageName: node - linkType: hard - -"has-value@npm:^1.0.0": - version: 1.0.0 - resolution: "has-value@npm:1.0.0" - dependencies: - get-value: "npm:^2.0.6" - has-values: "npm:^1.0.0" - isobject: "npm:^3.0.0" - checksum: 10/b9421d354e44f03d3272ac39fd49f804f19bc1e4fa3ceef7745df43d6b402053f828445c03226b21d7d934a21ac9cf4bc569396dc312f496ddff873197bbd847 - languageName: node - linkType: hard - -"has-values@npm:^0.1.4": - version: 0.1.4 - resolution: "has-values@npm:0.1.4" - checksum: 10/ab1c4bcaf811ccd1856c11cfe90e62fca9e2b026ebe474233a3d282d8d67e3b59ed85b622c7673bac3db198cb98bd1da2b39300a2f98e453729b115350af49bc - languageName: node - linkType: hard - -"has-values@npm:^1.0.0": - version: 1.0.0 - resolution: "has-values@npm:1.0.0" - dependencies: - is-number: "npm:^3.0.0" - kind-of: "npm:^4.0.0" - checksum: 10/77e6693f732b5e4cf6c38dfe85fdcefad0fab011af74995c3e83863fabf5e3a836f406d83565816baa0bc0a523c9410db8b990fe977074d61aeb6d8f4fcffa11 - languageName: node - linkType: hard - -"has-yarn@npm:^2.1.0": - version: 2.1.0 - resolution: "has-yarn@npm:2.1.0" - checksum: 10/5eb1d0bb8518103d7da24532bdbc7124ffc6d367b5d3c10840b508116f2f1bcbcf10fd3ba843ff6e2e991bdf9969fd862d42b2ed58aade88343326c950b7e7f7 - languageName: node - linkType: hard - -"has@npm:^1.0.1, has@npm:^1.0.3": - version: 1.0.3 - resolution: "has@npm:1.0.3" - dependencies: - function-bind: "npm:^1.1.1" - checksum: 10/a449f3185b1d165026e8d25f6a8c3390bd25c201ff4b8c1aaf948fc6a5fcfd6507310b8c00c13a3325795ea9791fcc3d79d61eafa313b5750438fc19183df57b - languageName: node - linkType: hard - -"hash-base@npm:^3.0.0": - version: 3.1.0 - resolution: "hash-base@npm:3.1.0" - dependencies: - inherits: "npm:^2.0.4" - readable-stream: "npm:^3.6.0" - safe-buffer: "npm:^5.2.0" - checksum: 10/26b7e97ac3de13cb23fc3145e7e3450b0530274a9562144fc2bf5c1e2983afd0e09ed7cc3b20974ba66039fad316db463da80eb452e7373e780cbee9a0d2f2dc - languageName: node - linkType: hard - -"hash-base@npm:~3.0": - version: 3.0.4 - resolution: "hash-base@npm:3.0.4" - dependencies: - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - checksum: 10/878465a0dfcc33cce195c2804135352c590d6d10980adc91a9005fd377e77f2011256c2b7cfce472e3f2e92d561d1bf3228d2da06348a9017ce9a258b3b49764 - languageName: node - linkType: hard - -"hash.js@npm:1.1.3": - version: 1.1.3 - resolution: "hash.js@npm:1.1.3" - dependencies: - inherits: "npm:^2.0.3" - minimalistic-assert: "npm:^1.0.0" - checksum: 10/0dc4cb8164a906b06cc2ca2f333581a3fb91c36b64acd1e2f57da1b51ac5ed6b2135141f0513b734bf80e2c955b8d88fe0eade2a54c92d73d2eb26f49252d209 - languageName: node - linkType: hard - -"hash.js@npm:1.1.7, hash.js@npm:^1.0.0, hash.js@npm:^1.0.3, hash.js@npm:^1.1.7": - version: 1.1.7 - resolution: "hash.js@npm:1.1.7" - dependencies: - inherits: "npm:^2.0.3" - minimalistic-assert: "npm:^1.0.1" - checksum: 10/0c89ee4006606a40f92df5cc3c263342e7fea68110f3e9ef032bd2083650430505db01b6b7926953489517d4027535e4fdc7f970412893d3031c361d3ec8f4b3 - languageName: node - linkType: hard - -"hasha@npm:^5.0.0": - version: 5.2.2 - resolution: "hasha@npm:5.2.2" - dependencies: - is-stream: "npm:^2.0.0" - type-fest: "npm:^0.8.0" - checksum: 10/06cc474bed246761ff61c19d629977eb5f53fa817be4313a255a64ae0f433e831a29e83acb6555e3f4592b348497596f1d1653751008dda4f21c9c21ca60ac5a - languageName: node - linkType: hard - -"hasown@npm:^2.0.0": - version: 2.0.0 - resolution: "hasown@npm:2.0.0" - dependencies: - function-bind: "npm:^1.1.2" - checksum: 10/c330f8d93f9d23fe632c719d4db3d698ef7d7c367d51548b836069e06a90fa9151e868c8e67353cfe98d67865bf7354855db28fa36eb1b18fa5d4a3f4e7f1c90 - languageName: node - linkType: hard - -"hasown@npm:^2.0.1": - version: 2.0.1 - resolution: "hasown@npm:2.0.1" - dependencies: - function-bind: "npm:^1.1.2" - checksum: 10/b7f9107387ee68abed88e965c2b99e868b5e0e9d289db1ddd080706ffafb69533b4f538b0e6362585bae8d6cbd080249f65e79702f74c225990f66d6106be3f6 - languageName: node - linkType: hard - -"hdr-histogram-js@npm:^2.0.1": - version: 2.0.3 - resolution: "hdr-histogram-js@npm:2.0.3" - dependencies: - "@assemblyscript/loader": "npm:^0.10.1" - base64-js: "npm:^1.2.0" - pako: "npm:^1.0.3" - checksum: 10/c88970b2df733daad3eb30adfbe44517dc03bb816c49ed3e85d03dc40df38a0a25109a20d0620baf968048ae57720dac3958c35081a056f264f33c22368690d3 - languageName: node - linkType: hard - -"hdr-histogram-percentiles-obj@npm:^3.0.0": - version: 3.0.0 - resolution: "hdr-histogram-percentiles-obj@npm:3.0.0" - checksum: 10/8fb15ab608997faf7716b641c032c538320f2479aee99af89d40aa5b9215f15b879d096e32745b552f7c50081acced7182bf58133d53dc61230aede5ac255d53 - languageName: node - linkType: hard - -"he@npm:1.2.0, he@npm:^1.2.0": - version: 1.2.0 - resolution: "he@npm:1.2.0" - bin: - he: bin/he - checksum: 10/d09b2243da4e23f53336e8de3093e5c43d2c39f8d0d18817abfa32ce3e9355391b2edb4bb5edc376aea5d4b0b59d6a0482aab4c52bc02ef95751e4b818e847f1 - languageName: node - linkType: hard - -"header-case@npm:^1.0.0": - version: 1.0.1 - resolution: "header-case@npm:1.0.1" - dependencies: - no-case: "npm:^2.2.0" - upper-case: "npm:^1.1.3" - checksum: 10/fe1cc9a555ec9aabc2de80f4dd961a81c534fc23951694fef34297e59b0dd60f26647148731bf0dd3fdb3a1c688089d3cd147d7038db850e25be7c0a5fabb022 - languageName: node - linkType: hard - -"highlight.js@npm:^10.4.1": - version: 10.7.3 - resolution: "highlight.js@npm:10.7.3" - checksum: 10/db8d10a541936b058e221dbde77869664b2b45bca75d660aa98065be2cd29f3924755fbc7348213f17fd931aefb6e6597448ba6fe82afba6d8313747a91983ee - languageName: node - linkType: hard - -"highlightjs-solidity@npm:^2.0.6": - version: 2.0.6 - resolution: "highlightjs-solidity@npm:2.0.6" - checksum: 10/c3f936c6cfc09e5cf7d03c18d911ff48a796ed0ef841b2517712d36a46d43a79715d6d08f5ba4807d1e53346c7372d13ef2d60a026e5d18587611052a53d7424 - languageName: node - linkType: hard - -"hmac-drbg@npm:^1.0.1": - version: 1.0.1 - resolution: "hmac-drbg@npm:1.0.1" - dependencies: - hash.js: "npm:^1.0.3" - minimalistic-assert: "npm:^1.0.0" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10/0298a1445b8029a69b713d918ecaa84a1d9f614f5857e0c6e1ca517abfa1357216987b2ee08cc6cc73ba82a6c6ddf2ff11b9717a653530ef03be599d4699b836 - languageName: node - linkType: hard - -"hoist-non-react-statics@npm:^3.3.1": - version: 3.3.2 - resolution: "hoist-non-react-statics@npm:3.3.2" - dependencies: - react-is: "npm:^16.7.0" - checksum: 10/1acbe85f33e5a39f90c822ad4d28b24daeb60f71c545279431dc98c312cd28a54f8d64788e477fe21dc502b0e3cf58589ebe5c1ad22af27245370391c2d24ea6 - languageName: node - linkType: hard - -"homedir-polyfill@npm:^1.0.1": - version: 1.0.3 - resolution: "homedir-polyfill@npm:1.0.3" - dependencies: - parse-passwd: "npm:^1.0.0" - checksum: 10/18dd4db87052c6a2179d1813adea0c4bfcfa4f9996f0e226fefb29eb3d548e564350fa28ec46b0bf1fbc0a1d2d6922ceceb80093115ea45ff8842a4990139250 - languageName: node - linkType: hard - -"hoopy@npm:^0.1.4": - version: 0.1.4 - resolution: "hoopy@npm:0.1.4" - checksum: 10/7a73f1839a7fd6b953356770dff2c3cff813d97d899cddd75b348926c4df36059d987c06bedb57b1b7711504dba83d3b7b986f979a08b1e415da73a51fefa767 - languageName: node - linkType: hard - -"hosted-git-info@npm:^2.1.4": - version: 2.8.9 - resolution: "hosted-git-info@npm:2.8.9" - checksum: 10/96da7d412303704af41c3819207a09ea2cab2de97951db4cf336bb8bce8d8e36b9a6821036ad2e55e67d3be0af8f967a7b57981203fbfb88bc05cd803407b8c3 - languageName: node - linkType: hard - -"hosted-git-info@npm:^4.0.1": - version: 4.1.0 - resolution: "hosted-git-info@npm:4.1.0" - dependencies: - lru-cache: "npm:^6.0.0" - checksum: 10/4dc67022b7ecb12829966bd731fb9a5f14d351547aafc6520ef3c8e7211f4f0e69452d24e29eae3d9b17df924d660052e53d8ca321cf3008418fb7e6c7c47d6f - languageName: node - linkType: hard - -"hosted-git-info@npm:^6.0.0": - version: 6.1.1 - resolution: "hosted-git-info@npm:6.1.1" - dependencies: - lru-cache: "npm:^7.5.1" - checksum: 10/2e48e3fac799b52d82277ff5693916bfa33441a2c06d1f11f9e82886bd235514783c2bdffb3abde67b7aeb6af457a48df38e6894740c7fc2e1bb78f5bcfac61e - languageName: node - linkType: hard - -"hosted-git-info@npm:^7.0.0": - version: 7.0.1 - resolution: "hosted-git-info@npm:7.0.1" - dependencies: - lru-cache: "npm:^10.0.1" - checksum: 10/5f740ecf3c70838e27446ff433a9a9a583de8747f7b661390b373ad12ca47edb937136e79999a4f953d0953079025a11df173f1fd9f7d52b0277b2fb9433e1c7 - languageName: node - linkType: hard - -"hosted-git-info@npm:^7.0.2": - version: 7.0.2 - resolution: "hosted-git-info@npm:7.0.2" - dependencies: - lru-cache: "npm:^10.0.1" - checksum: 10/8f085df8a4a637d995f357f48b1e3f6fc1f9f92e82b33fb406415b5741834ed431a510a09141071001e8deea2eee43ce72786463e2aa5e5a70db8648c0eedeab - languageName: node - linkType: hard - -"hpack.js@npm:^2.1.6": - version: 2.1.6 - resolution: "hpack.js@npm:2.1.6" - dependencies: - inherits: "npm:^2.0.1" - obuf: "npm:^1.0.0" - readable-stream: "npm:^2.0.1" - wbuf: "npm:^1.1.0" - checksum: 10/6910e4b9d943a78fd8e84ac42729fdab9bd406789d6204ad160af9dc5aa4750fc01f208249bf7116c11dc0678207a387b4ade24e4b628b95385b251ceeeb719c - languageName: node - linkType: hard - -"html-encoding-sniffer@npm:^2.0.1": - version: 2.0.1 - resolution: "html-encoding-sniffer@npm:2.0.1" - dependencies: - whatwg-encoding: "npm:^1.0.5" - checksum: 10/70365109cad69ee60376715fe0a56dd9ebb081327bf155cda93b2c276976c79cbedee2b988de6b0aefd0671a5d70597a35796e6e7d91feeb2c0aba46df059630 - languageName: node - linkType: hard - -"html-entities@npm:^2.1.0": - version: 2.4.0 - resolution: "html-entities@npm:2.4.0" - checksum: 10/646f2f19214bad751e060ceef4df98520654a1d0cd631b55d45504df2f0aaf8a14d8c0a5a4f92b353be298774d856157ac2d04a031d78889c9011892078ca157 - languageName: node - linkType: hard - -"html-entities@npm:^2.3.2": - version: 2.3.3 - resolution: "html-entities@npm:2.3.3" - checksum: 10/24f6b77ce234e263f3d44530de2356e67c313c8ba7e5f6e02c16dcea3a950711d8820afb320746d57b8dae61fde7aaaa7f60017b706fa4bce8624ba3c29ad316 - languageName: node - linkType: hard - -"html-escaper@npm:^2.0.0": - version: 2.0.2 - resolution: "html-escaper@npm:2.0.2" - checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 - languageName: node - linkType: hard - -"html-minifier-terser@npm:^6.0.2": - version: 6.1.0 - resolution: "html-minifier-terser@npm:6.1.0" - dependencies: - camel-case: "npm:^4.1.2" - clean-css: "npm:^5.2.2" - commander: "npm:^8.3.0" - he: "npm:^1.2.0" - param-case: "npm:^3.0.4" - relateurl: "npm:^0.2.7" - terser: "npm:^5.10.0" - bin: - html-minifier-terser: cli.js - checksum: 10/a244fa944e002b57c66cc829a3f2dfdb9514b1833c2d838ada624964bf8c0afaf61d36c371758c7e44dedae95cea740a84d8d1067b916ed204f35175184d0e27 - languageName: node - linkType: hard - -"html-webpack-plugin@npm:^5.5.0": - version: 5.5.3 - resolution: "html-webpack-plugin@npm:5.5.3" - dependencies: - "@types/html-minifier-terser": "npm:^6.0.0" - html-minifier-terser: "npm:^6.0.2" - lodash: "npm:^4.17.21" - pretty-error: "npm:^4.0.0" - tapable: "npm:^2.0.0" - peerDependencies: - webpack: ^5.20.0 - checksum: 10/01d302a434e3db9f0e2db370f06300fb613de0fb8bdcafd4693e44c2528b8608621e5e7ca5d8302446db3f20c5f8875f1f675926d469b13ebab139954d241055 - languageName: node - linkType: hard - -"htmlparser2@npm:^6.0.0, htmlparser2@npm:^6.1.0": - version: 6.1.0 - resolution: "htmlparser2@npm:6.1.0" - dependencies: - domelementtype: "npm:^2.0.1" - domhandler: "npm:^4.0.0" - domutils: "npm:^2.5.2" - entities: "npm:^2.0.0" - checksum: 10/c9c34b0b722f5923c4ae05e59268aeb768582152969e3338a1cd3342b87f8dd2c0420f4745e46d2fd87f1b677ea2f314c3a93436ed8831905997e6347e081a5d - languageName: node - linkType: hard - -"htmlparser2@npm:^8.0.0, htmlparser2@npm:^8.0.2": - version: 8.0.2 - resolution: "htmlparser2@npm:8.0.2" - dependencies: - domelementtype: "npm:^2.3.0" - domhandler: "npm:^5.0.3" - domutils: "npm:^3.0.1" - entities: "npm:^4.4.0" - checksum: 10/ea5512956eee06f5835add68b4291d313c745e8407efa63848f4b8a90a2dee45f498a698bca8614e436f1ee0cfdd609938b71d67c693794545982b76e53e6f11 - languageName: node - linkType: hard - -"htmlparser2@npm:^8.0.1": - version: 8.0.1 - resolution: "htmlparser2@npm:8.0.1" - dependencies: - domelementtype: "npm:^2.3.0" - domhandler: "npm:^5.0.2" - domutils: "npm:^3.0.1" - entities: "npm:^4.3.0" - checksum: 10/f891041c331ef7ef300f1e8f0e6756d663cf8096f8a343a1bf474e7a5ce34fe7cd71b9dfb0227277f7de2007e847ef2a447e8b48eab592d6f3631aae18301d22 - languageName: node - linkType: hard - -"http-cache-semantics@npm:>=4.1.1": - version: 4.1.1 - resolution: "http-cache-semantics@npm:4.1.1" - checksum: 10/362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f - languageName: node - linkType: hard - -"http-deceiver@npm:^1.2.7": - version: 1.2.7 - resolution: "http-deceiver@npm:1.2.7" - checksum: 10/9ae293b0acbfad6ed45d52c1f85f58ab062465872fd9079c80d78c6527634002d73c2a9d8c0296cc12d178a0b689bb5291d9979aad3ce71ab17a7517588adbf7 - languageName: node - linkType: hard - -"http-errors-enhanced-cjs@npm:2.0.1": - version: 2.0.1 - resolution: "http-errors-enhanced-cjs@npm:2.0.1" - checksum: 10/e9fe559b55ac297b4df50fba03053c47efebb1eb3a561c57870c27d14b7b7d8f8034da842d2bd57b14afb085b1ed94ad8d676fd3865c304eb8fbe57ac42ed82a - languageName: node - linkType: hard - -"http-errors@npm:1.6.3, http-errors@npm:~1.6.2": - version: 1.6.3 - resolution: "http-errors@npm:1.6.3" - dependencies: - depd: "npm:~1.1.2" - inherits: "npm:2.0.3" - setprototypeof: "npm:1.1.0" - statuses: "npm:>= 1.4.0 < 2" - checksum: 10/e48732657ea0b4a09853d2696a584fa59fa2a8c1ba692af7af3137b5491a997d7f9723f824e7e08eb6a87098532c09ce066966ddf0f9f3dd30905e52301acadb - languageName: node - linkType: hard - -"http-errors@npm:2.0.0": - version: 2.0.0 - resolution: "http-errors@npm:2.0.0" - dependencies: - depd: "npm:2.0.0" - inherits: "npm:2.0.4" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - toidentifier: "npm:1.0.1" - checksum: 10/0e7f76ee8ff8a33e58a3281a469815b893c41357378f408be8f6d4aa7d1efafb0da064625518e7078381b6a92325949b119dc38fcb30bdbc4e3a35f78c44c439 - languageName: node - linkType: hard - -"http-https@npm:^1.0.0": - version: 1.0.0 - resolution: "http-https@npm:1.0.0" - checksum: 10/fd3c0802982b1e951a03206690271dacb641b39b80d1820e95095db923d8f63cc7f0df1259969400c8487787a2a46f7b33383c0427ec780a78131b153741b144 - languageName: node - linkType: hard - -"http-parser-js@npm:>=0.5.1": - version: 0.5.5 - resolution: "http-parser-js@npm:0.5.5" - checksum: 10/4a003119986a2213b7abbb51f3c0979d68e982052d7ca4f8d9b4414ca7ffd7113747f37179fe5f983592f05bc8d8a9e191e1aa301bacf86e14264b16e869cd30 - languageName: node - linkType: hard - -"http-proxy-agent@npm:^4.0.1": - version: 4.0.1 - resolution: "http-proxy-agent@npm:4.0.1" - dependencies: - "@tootallnate/once": "npm:1" - agent-base: "npm:6" - debug: "npm:4" - checksum: 10/2e17f5519f2f2740b236d1d14911ea4be170c67419dc15b05ea9a860a22c5d9c6ff4da270972117067cc2cefeba9df5f7cd5e7818fdc6ae52b6acf2a533e5fdd - languageName: node - linkType: hard - -"http-proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "http-proxy-agent@npm:5.0.0" - dependencies: - "@tootallnate/once": "npm:2" - agent-base: "npm:6" - debug: "npm:4" - checksum: 10/5ee19423bc3e0fd5f23ce991b0755699ad2a46a440ce9cec99e8126bb98448ad3479d2c0ea54be5519db5b19a4ffaa69616bac01540db18506dd4dac3dc418f0 - languageName: node - linkType: hard - -"http-proxy-agent@npm:^7.0.0": - version: 7.0.0 - resolution: "http-proxy-agent@npm:7.0.0" - dependencies: - agent-base: "npm:^7.1.0" - debug: "npm:^4.3.4" - checksum: 10/dbaaf3d9f3fc4df4a5d7ec45d456ec50f575240b557160fa63427b447d1f812dd7fe4a4f17d2e1ba003d231f07edf5a856ea6d91cb32d533062ff20a7803ccac - languageName: node - linkType: hard - -"http-proxy-middleware@npm:2.0.6, http-proxy-middleware@npm:^2.0.3": - version: 2.0.6 - resolution: "http-proxy-middleware@npm:2.0.6" - dependencies: - "@types/http-proxy": "npm:^1.17.8" - http-proxy: "npm:^1.18.1" - is-glob: "npm:^4.0.1" - is-plain-obj: "npm:^3.0.0" - micromatch: "npm:^4.0.2" - peerDependencies: - "@types/express": ^4.17.13 - peerDependenciesMeta: - "@types/express": - optional: true - checksum: 10/768e7ae5a422bbf4b866b64105b4c2d1f468916b7b0e9c96750551c7732383069b411aa7753eb7b34eab113e4f77fb770122cb7fb9c8ec87d138d5ddaafda891 - languageName: node - linkType: hard - -"http-proxy@npm:^1.18.1": - version: 1.18.1 - resolution: "http-proxy@npm:1.18.1" - dependencies: - eventemitter3: "npm:^4.0.0" - follow-redirects: "npm:^1.0.0" - requires-port: "npm:^1.0.0" - checksum: 10/2489e98aba70adbfd8b9d41ed1ff43528be4598c88616c558b109a09eaffe4bb35e551b6c75ac42ed7d948bb7530a22a2be6ef4f0cecacb5927be139f4274594 - languageName: node - linkType: hard - -"http-signature@npm:~1.2.0": - version: 1.2.0 - resolution: "http-signature@npm:1.2.0" - dependencies: - assert-plus: "npm:^1.0.0" - jsprim: "npm:^1.2.2" - sshpk: "npm:^1.7.0" - checksum: 10/2ff7112e6b0d8f08b382dfe705078c655501f2ddd76cf589d108445a9dd388a0a9be928c37108261519a7f53e6bbd1651048d74057b804807cce1ec49e87a95b - languageName: node - linkType: hard - -"http-status-codes@npm:2.1.4": - version: 2.1.4 - resolution: "http-status-codes@npm:2.1.4" - checksum: 10/01db6e25c19fce4cb0da2251189c35c33a4d7eff26577b9652bbd841183132e0c8cf2042ff9a840cb196f4bef265ff2d3e1c40ef46a01580020f423314017658 - languageName: node - linkType: hard - -"http-status-codes@npm:2.3.0": - version: 2.3.0 - resolution: "http-status-codes@npm:2.3.0" - checksum: 10/1b8a01940b5e14d3c5b2f842313f4531469b41ce4fa40ca3aae5c82a3101828db2cc9406bfb2d50a46e6d521d106577b6656c2b065c76125b99ee54b2cbbac09 - languageName: node - linkType: hard - -"http-terminator@npm:3.2.0": - version: 3.2.0 - resolution: "http-terminator@npm:3.2.0" - dependencies: - delay: "npm:^5.0.0" - p-wait-for: "npm:^3.2.0" - roarr: "npm:^7.0.4" - type-fest: "npm:^2.3.3" - checksum: 10/82d06be231c5705d3ecce1bce0d26e41df975cdfc470a6edfdfa64e9a19b273bf9114266acfe64f9aca245ead3dc618e718eaa415e18c36af1c2cdd923a3d19c - languageName: node - linkType: hard - -"http2-wrapper@npm:^2.1.10": - version: 2.2.0 - resolution: "http2-wrapper@npm:2.2.0" - dependencies: - quick-lru: "npm:^5.1.1" - resolve-alpn: "npm:^1.2.0" - checksum: 10/f02842f0db16a265426baa1b0eed708c3e0bcf9abc64b943712d2a06df9221564490c4f62cea1df9ff767dba9a4afc13e8e47fa41b526bea7d62f0ceb49c5fa7 - languageName: node - linkType: hard - -"https-browserify@npm:1.0.0, https-browserify@npm:^1.0.0": - version: 1.0.0 - resolution: "https-browserify@npm:1.0.0" - checksum: 10/2d707c457319e1320adf0e7556174c190865fb345b6a183f033cee440f73221dbe7fa3f0adcffb1e6b0664726256bd44771a82e50fe6c66976c10b237100536a - languageName: node - linkType: hard - -"https-proxy-agent@npm:5.0.1": - version: 5.0.1 - resolution: "https-proxy-agent@npm:5.0.1" - dependencies: - agent-base: "npm:6" - debug: "npm:4" - checksum: 10/f0dce7bdcac5e8eaa0be3c7368bb8836ed010fb5b6349ffb412b172a203efe8f807d9a6681319105ea1b6901e1972c7b5ea899672a7b9aad58309f766dcbe0df - languageName: node - linkType: hard - -"https-proxy-agent@npm:7.0.4": - version: 7.0.4 - resolution: "https-proxy-agent@npm:7.0.4" - dependencies: - agent-base: "npm:^7.0.2" - debug: "npm:4" - checksum: 10/405fe582bba461bfe5c7e2f8d752b384036854488b828ae6df6a587c654299cbb2c50df38c4b6ab303502c3c5e029a793fbaac965d1e86ee0be03faceb554d63 - languageName: node - linkType: hard - -"https-proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "https-proxy-agent@npm:5.0.0" - dependencies: - agent-base: "npm:6" - debug: "npm:4" - checksum: 10/517037badcbbe30757a9a88aaf5e8c198d31aa0b1e9c0a49a0053ab8e812809242218cc9ea1929171f74d95ae1ec89782ba471ffc3709b8910e91d1761f5f1a6 - languageName: node - linkType: hard - -"https-proxy-agent@npm:^7.0.1": - version: 7.0.2 - resolution: "https-proxy-agent@npm:7.0.2" - dependencies: - agent-base: "npm:^7.0.2" - debug: "npm:4" - checksum: 10/9ec844f78fd643608239c9c3f6819918631df5cd3e17d104cc507226a39b5d4adda9d790fc9fd63ac0d2bb8a761b2f9f60faa80584a9bf9d7f2e8c5ed0acd330 - languageName: node - linkType: hard - -"human-signals@npm:^1.1.1": - version: 1.1.1 - resolution: "human-signals@npm:1.1.1" - checksum: 10/6a58224dffcef5588910b1028bda8623c9a7053460a1fe3367e61921a6b5f6b93aba30f323868a958f968d7de3f5f78421f11d4d9f7e9563b1bd2b00ed9a4deb - languageName: node - linkType: hard - -"human-signals@npm:^2.1.0": - version: 2.1.0 - resolution: "human-signals@npm:2.1.0" - checksum: 10/df59be9e0af479036798a881d1f136c4a29e0b518d4abb863afbd11bf30efa3eeb1d0425fc65942dcc05ab3bf40205ea436b0ff389f2cd20b75b8643d539bf86 - languageName: node - linkType: hard - -"human-signals@npm:^5.0.0": - version: 5.0.0 - resolution: "human-signals@npm:5.0.0" - checksum: 10/30f8870d831cdcd2d6ec0486a7d35d49384996742052cee792854273fa9dd9e7d5db06bb7985d4953e337e10714e994e0302e90dc6848069171b05ec836d65b0 - languageName: node - linkType: hard - -"humanize-ms@npm:^1.2.1": - version: 1.2.1 - resolution: "humanize-ms@npm:1.2.1" - dependencies: - ms: "npm:^2.0.0" - checksum: 10/9c7a74a2827f9294c009266c82031030eae811ca87b0da3dceb8d6071b9bde22c9f3daef0469c3c533cc67a97d8a167cd9fc0389350e5f415f61a79b171ded16 - languageName: node - linkType: hard - -"husky@npm:7.0.4": - version: 7.0.4 - resolution: "husky@npm:7.0.4" - bin: - husky: lib/bin.js - checksum: 10/8fecb619ab924bd99b2c9ce494bff88e45369c1125e07a603dfacb4bd60ef86840e08c689794c476189183e6223f0ea93aadebf78e3508479453c219358ca787 - languageName: node - linkType: hard - -"hyperdyperid@npm:^1.2.0": - version: 1.2.0 - resolution: "hyperdyperid@npm:1.2.0" - checksum: 10/64abb5568ff17aa08ac0175ae55e46e22831c5552be98acdd1692081db0209f36fff58b31432017b4e1772c178962676a2cc3c54e4d5d7f020d7710cec7ad7a6 - languageName: node - linkType: hard - -"iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.17, iconv-lite@npm:^0.4.24": - version: 0.4.24 - resolution: "iconv-lite@npm:0.4.24" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3" - checksum: 10/6d3a2dac6e5d1fb126d25645c25c3a1209f70cceecc68b8ef51ae0da3cdc078c151fade7524a30b12a3094926336831fca09c666ef55b37e2c69638b5d6bd2e3 - languageName: node - linkType: hard - -"iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3": - version: 0.6.3 - resolution: "iconv-lite@npm:0.6.3" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3.0.0" - checksum: 10/24e3292dd3dadaa81d065c6f8c41b274a47098150d444b96e5f53b4638a9a71482921ea6a91a1f59bb71d9796de25e04afd05919fa64c360347ba65d3766f10f - languageName: node - linkType: hard - -"icss-utils@npm:^5.0.0, icss-utils@npm:^5.1.0": - version: 5.1.0 - resolution: "icss-utils@npm:5.1.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/5c324d283552b1269cfc13a503aaaa172a280f914e5b81544f3803bc6f06a3b585fb79f66f7c771a2c052db7982c18bf92d001e3b47282e3abbbb4c4cc488d68 - languageName: node - linkType: hard - -"idb-wrapper@npm:^1.5.0": - version: 1.7.2 - resolution: "idb-wrapper@npm:1.7.2" - checksum: 10/949c5bd4541ddc16ae5bc22710df1b2493251d3351a5d2761de5cea00891e3b4bd1aa432de1414a0e96a71accc55fc53cc48a680fb395012a951405737c54e44 - languageName: node - linkType: hard - -"idb@npm:^7.0.1": - version: 7.1.1 - resolution: "idb@npm:7.1.1" - checksum: 10/8e33eaebf21055129864acb89932e0739b8c96788e559df24c253ce114d8c6deb977a3b30ea47a9bb8a2ae8a55964861c3df65f360d95745e341cee40d5c17f4 - languageName: node - linkType: hard - -"identity-obj-proxy@npm:^3.0.0": - version: 3.0.0 - resolution: "identity-obj-proxy@npm:3.0.0" - dependencies: - harmony-reflect: "npm:^1.4.6" - checksum: 10/66fe4d2ffc67655174f6abe100ab3b36d2f5e4de5b28a7c3121e5f51bd4e7c8c1bee4f9a41ce0586ace57fb63bfedbfc39508b7cb43b9e3ed6dc42f762158b4e - languageName: node - linkType: hard - -"idna-uts46-hx@npm:^2.3.1": - version: 2.3.1 - resolution: "idna-uts46-hx@npm:2.3.1" - dependencies: - punycode: "npm:2.1.0" - checksum: 10/5cb65dbc375d42ce9b38dab6e2a7f41b8c059f9a88d236bc9ca32084485f5f22fec11ea5b4e6b61239448148443c3f825fddaa5f298d22e12ecfe845de71a807 - languageName: node - linkType: hard - -"ieee754@npm:1.1.13": - version: 1.1.13 - resolution: "ieee754@npm:1.1.13" - checksum: 10/5c2f365168e629b164f6b8863c399af03e4515cafb690fe143039c9bd76b8f670af6539a43859bbfbe7df707eac755478515319a357a29f8c5f17ec2daa24a4c - languageName: node - linkType: hard - -"ieee754@npm:^1.1.13, ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": - version: 1.2.1 - resolution: "ieee754@npm:1.2.1" - checksum: 10/d9f2557a59036f16c282aaeb107832dc957a93d73397d89bbad4eb1130560560eb695060145e8e6b3b498b15ab95510226649a0b8f52ae06583575419fe10fc4 - languageName: node - linkType: hard - -"ignore-by-default@npm:^1.0.1": - version: 1.0.1 - resolution: "ignore-by-default@npm:1.0.1" - checksum: 10/441509147b3615e0365e407a3c18e189f78c07af08564176c680be1fabc94b6c789cad1342ad887175d4ecd5225de86f73d376cec8e06b42fd9b429505ffcf8a - languageName: node - linkType: hard - -"ignore-walk@npm:^6.0.0": - version: 6.0.2 - resolution: "ignore-walk@npm:6.0.2" - dependencies: - minimatch: "npm:^7.4.2" - checksum: 10/ec3bd6f5bb413ed56204875eb3d097a46415408cbd9b828002214f35674b9e5f7b708faafa510df7ea462d12112add8d6df402f742fefcc47abc18fe8817354b - languageName: node - linkType: hard - -"ignore-walk@npm:^6.0.4": - version: 6.0.4 - resolution: "ignore-walk@npm:6.0.4" - dependencies: - minimatch: "npm:^9.0.0" - checksum: 10/a56c3f929bb0890ffb6e87dfaca7d5ce97f9e179fd68d49711edea55760aaee367cea3845d7620689b706249053c4b1805e21158f6751c7333f9b2ffb3668272 - languageName: node - linkType: hard - -"ignore@npm:^3.0.11, ignore@npm:^3.0.9, ignore@npm:^3.2.0, ignore@npm:^3.3.3": - version: 3.3.10 - resolution: "ignore@npm:3.3.10" - checksum: 10/7cbe87d9ed0e6b710ed76f040733f4d1dbed7aa573b579949d6cc25572a72c69d546acda11c2d4bf202691ddda5db8078d32a50a6623eade424d81e6f1d32133 - languageName: node - linkType: hard - -"ignore@npm:^5.1.1, ignore@npm:^5.2.0": - version: 5.2.0 - resolution: "ignore@npm:5.2.0" - checksum: 10/30283f05fb7d867ee0e08faebb3e69caba2c6c55092042cd061eac1b37a3e78db72bfcfbb08b3598999344fba3d93a9c693b5401da5faaecc0fb7c2dce87beb4 - languageName: node - linkType: hard - -"ignore@npm:^5.1.9, ignore@npm:^5.2.4": - version: 5.2.4 - resolution: "ignore@npm:5.2.4" - checksum: 10/4f7caf5d2005da21a382d4bd1d2aa741a3bed51de185c8562dd7f899a81a620ac4fd0619b06f7029a38ae79e4e4c134399db3bd0192c703c3ef54bb82df3086c - languageName: node - linkType: hard - -"image-size@npm:~0.5.0": - version: 0.5.5 - resolution: "image-size@npm:0.5.5" - bin: - image-size: bin/image-size.js - checksum: 10/f41ec6cfccfa6471980e83568033a66ec53f84d1bcb70033e946a7db9c1b6bbf5645ec90fa5a8bdcdc84d86af0032014eff6fa078a60c2398dfce6676c46bdb7 - languageName: node - linkType: hard - -"immediate@npm:3.3.0, immediate@npm:^3.2.3": - version: 3.3.0 - resolution: "immediate@npm:3.3.0" - checksum: 10/39aefd16e7d423a0435f12ed47e45cc18fbb5825fea56d573805f68a056ab5727a16ea79893d35db565f9de14a224bfabffa5e5e2c422117c5fa24428ac0aa69 - languageName: node - linkType: hard - -"immediate@npm:~3.2.3": - version: 3.2.3 - resolution: "immediate@npm:3.2.3" - checksum: 10/fcc2223bdaeac9ba378543658c4c6420a61b6eef2e8447f4b274a2964721d1c707b37725768af20226c8ea66b5b9e7ca982e28c36fc4c2d1af318c1fd4a9e687 - languageName: node - linkType: hard - -"immer@npm:^9.0.7": - version: 9.0.21 - resolution: "immer@npm:9.0.21" - checksum: 10/8455d6b4dc8abfe40f06eeec9bcc944d147c81279424c0f927a4d4905ae34e5af19ab6da60bcc700c14f51c452867d7089b3b9236f5a9a2248e39b4a09ee89de - languageName: node - linkType: hard - -"immutable@npm:^4.0.0, immutable@npm:^4.0.0-rc.12": - version: 4.0.0 - resolution: "immutable@npm:4.0.0" - checksum: 10/bc8e3f46a539ca060531d3e94bb691a75b3acf75abbe856cb1c3365f7cff2c12f51bdd0ec428ce7fc6283ee5d284867dbfcb08baf12e08242185cdb13f4ad151 - languageName: node - linkType: hard - -"import-fresh@npm:^3.0.0, import-fresh@npm:^3.1.0, import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": - version: 3.3.0 - resolution: "import-fresh@npm:3.3.0" - dependencies: - parent-module: "npm:^1.0.0" - resolve-from: "npm:^4.0.0" - checksum: 10/2cacfad06e652b1edc50be650f7ec3be08c5e5a6f6d12d035c440a42a8cc028e60a5b99ca08a77ab4d6b1346da7d971915828f33cdab730d3d42f08242d09baa - languageName: node - linkType: hard - -"import-lazy@npm:^2.1.0": - version: 2.1.0 - resolution: "import-lazy@npm:2.1.0" - checksum: 10/05294f3b9dd4971d3a996f0d2f176410fb6745d491d6e73376429189f5c1c3d290548116b2960a7cf3e89c20cdf11431739d1d2d8c54b84061980795010e803a - languageName: node - linkType: hard - -"import-local@npm:^3.0.2, import-local@npm:^3.1.0": - version: 3.1.0 - resolution: "import-local@npm:3.1.0" - dependencies: - pkg-dir: "npm:^4.2.0" - resolve-cwd: "npm:^3.0.0" - bin: - import-local-fixture: fixtures/cli.js - checksum: 10/bfcdb63b5e3c0e245e347f3107564035b128a414c4da1172a20dc67db2504e05ede4ac2eee1252359f78b0bfd7b19ef180aec427c2fce6493ae782d73a04cddd - languageName: node - linkType: hard - -"import-meta-resolve@npm:^4.1.0": - version: 4.1.0 - resolution: "import-meta-resolve@npm:4.1.0" - checksum: 10/40162f67eb406c8d5d49266206ef12ff07b54f5fad8cfd806db9efe3a055958e9969be51d6efaf82e34b8bea6758113dcc17bb79ff148292a4badcabc3472f22 - languageName: node - linkType: hard - -"imurmurhash@npm:^0.1.4": - version: 0.1.4 - resolution: "imurmurhash@npm:0.1.4" - checksum: 10/2d30b157a91fe1c1d7c6f653cbf263f039be6c5bfa959245a16d4ee191fc0f2af86c08545b6e6beeb041c56b574d2d5b9f95343d378ab49c0f37394d541e7fc8 - languageName: node - linkType: hard - -"indent-string@npm:^3.1.0": - version: 3.2.0 - resolution: "indent-string@npm:3.2.0" - checksum: 10/a0b72603bba6c985d367fda3a25aad16423d2056b22a7e83ee2dd9ce0ce3d03d1e078644b679087aa7edf1cfb457f0d96d9eeadc0b12f38582088cc00e995d2f - languageName: node - linkType: hard - -"indent-string@npm:^4.0.0": - version: 4.0.0 - resolution: "indent-string@npm:4.0.0" - checksum: 10/cd3f5cbc9ca2d624c6a1f53f12e6b341659aba0e2d3254ae2b4464aaea8b4294cdb09616abbc59458f980531f2429784ed6a420d48d245bcad0811980c9efae9 - languageName: node - linkType: hard - -"indent-string@npm:^5.0.0": - version: 5.0.0 - resolution: "indent-string@npm:5.0.0" - checksum: 10/e466c27b6373440e6d84fbc19e750219ce25865cb82d578e41a6053d727e5520dc5725217d6eb1cc76005a1bb1696a0f106d84ce7ebda3033b963a38583fb3b3 - languageName: node - linkType: hard - -"index-to-position@npm:^0.1.2": - version: 0.1.2 - resolution: "index-to-position@npm:0.1.2" - checksum: 10/ae8e2304ed7c959bc6d1121712e9f625634ed884e32ef93fc0795c6aab1131b10198929a50c7d16d470dab37be7438eccb0afe021d79f69116273d500898daee - languageName: node - linkType: hard - -"indexof@npm:~0.0.1": - version: 0.0.1 - resolution: "indexof@npm:0.0.1" - checksum: 10/0fb04e8b147b8585d981a6df1564f25bb3678d6fa74e33e5cecc1464b10f78e15e8ef6bb688f135fe5c2844a128fac8a7831cbe5adc81fdcf12681b093dfcc25 - languageName: node - linkType: hard - -"indy-sdk@npm:1.16.0-dev-1655": - version: 1.16.0-dev-1655 - resolution: "indy-sdk@npm:1.16.0-dev-1655" - dependencies: - bindings: "npm:^1.3.1" - nan: "npm:^2.11.1" - node-gyp: "npm:^8.0.0" - checksum: 10/f688e7f43bc5b0cb423a1391818ab173e9b2bf1fc29274bad558d4a5ae0bba08df8aae44a421d292a82601ca876d22c88b50a448d0419e4b44d25bfeb83ae67a - languageName: node - linkType: hard - -"infer-owner@npm:^1.0.4": - version: 1.0.4 - resolution: "infer-owner@npm:1.0.4" - checksum: 10/181e732764e4a0611576466b4b87dac338972b839920b2a8cde43642e4ed6bd54dc1fb0b40874728f2a2df9a1b097b8ff83b56d5f8f8e3927f837fdcb47d8a89 - languageName: node - linkType: hard - -"inflight@npm:^1.0.4": - version: 1.0.6 - resolution: "inflight@npm:1.0.6" - dependencies: - once: "npm:^1.3.0" - wrappy: "npm:1" - checksum: 10/d2ebd65441a38c8336c223d1b80b921b9fa737e37ea466fd7e253cb000c64ae1f17fa59e68130ef5bda92cfd8d36b83d37dab0eb0a4558bcfec8e8cdfd2dcb67 - languageName: node - linkType: hard - -"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.1, inherits@npm:~2.0.3, inherits@npm:~2.0.4": - version: 2.0.4 - resolution: "inherits@npm:2.0.4" - checksum: 10/cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 - languageName: node - linkType: hard - -"inherits@npm:2.0.3": - version: 2.0.3 - resolution: "inherits@npm:2.0.3" - checksum: 10/8771303d66c51be433b564427c16011a8e3fbc3449f1f11ea50efb30a4369495f1d0e89f0fc12bdec0bd7e49102ced5d137e031d39ea09821cb3c717fcf21e69 - languageName: node - linkType: hard - -"ini@npm:2.0.0, ini@npm:^2.0.0": - version: 2.0.0 - resolution: "ini@npm:2.0.0" - checksum: 10/04e24ba05c4f6947e15560824e153b4610bceea2f5a3ab68651d221a4aab3c77d4e3e90a917ebc8bf5ad71a30a8575de56c39d6b4c4b1375a28016b9f3625f9d - languageName: node - linkType: hard - -"ini@npm:4.1.1": - version: 4.1.1 - resolution: "ini@npm:4.1.1" - checksum: 10/64c7102301742a7527bb17257d18451410eacf63b4b5648a20e108816c355c21c4e8a1761bbcbf3fe8c4ded3297f1b832b885d5e3e485d781e293ebfaf56fea6 - languageName: node - linkType: hard - -"ini@npm:4.1.2": - version: 4.1.2 - resolution: "ini@npm:4.1.2" - checksum: 10/383396e45965bdd32ac18d405db1726d51e43e5c792325b4247736c4a402cdc0b448cc9e85960f0c13f1ab603a14a11ed4c9c796a385aced6d9045756a19a469 - languageName: node - linkType: hard - -"ini@npm:^1.3.4, ini@npm:^1.3.5, ini@npm:~1.3.0": - version: 1.3.8 - resolution: "ini@npm:1.3.8" - checksum: 10/314ae176e8d4deb3def56106da8002b462221c174ddb7ce0c49ee72c8cd1f9044f7b10cc555a7d8850982c3b9ca96fc212122749f5234bc2b6fb05fb942ed566 - languageName: node - linkType: hard - -"ink@npm:^3.2.0": - version: 3.2.0 - resolution: "ink@npm:3.2.0" - dependencies: - ansi-escapes: "npm:^4.2.1" - auto-bind: "npm:4.0.0" - chalk: "npm:^4.1.0" - cli-boxes: "npm:^2.2.0" - cli-cursor: "npm:^3.1.0" - cli-truncate: "npm:^2.1.0" - code-excerpt: "npm:^3.0.0" - indent-string: "npm:^4.0.0" - is-ci: "npm:^2.0.0" - lodash: "npm:^4.17.20" - patch-console: "npm:^1.0.0" - react-devtools-core: "npm:^4.19.1" - react-reconciler: "npm:^0.26.2" - scheduler: "npm:^0.20.2" - signal-exit: "npm:^3.0.2" - slice-ansi: "npm:^3.0.0" - stack-utils: "npm:^2.0.2" - string-width: "npm:^4.2.2" - type-fest: "npm:^0.12.0" - widest-line: "npm:^3.1.0" - wrap-ansi: "npm:^6.2.0" - ws: "npm:^7.5.5" - yoga-layout-prebuilt: "npm:^1.9.6" - peerDependencies: - "@types/react": ">=16.8.0" - react: ">=16.8.0" - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/cfbd8808cd1ee995440aac7a89af1156e587fec271bc3bc7460788b8b0c844eaf6364ac3d19dd4caa9f8f19bfb97d3fa0a51a5f7d89b6c6b990686ac68f083f6 - languageName: node - linkType: hard - -"inquirer@npm:8.2.4": - version: 8.2.4 - resolution: "inquirer@npm:8.2.4" - dependencies: - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.1.1" - cli-cursor: "npm:^3.1.0" - cli-width: "npm:^3.0.0" - external-editor: "npm:^3.0.3" - figures: "npm:^3.0.0" - lodash: "npm:^4.17.21" - mute-stream: "npm:0.0.8" - ora: "npm:^5.4.1" - run-async: "npm:^2.4.0" - rxjs: "npm:^7.5.5" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - through: "npm:^2.3.6" - wrap-ansi: "npm:^7.0.0" - checksum: 10/879e462bec401ea1c89ee219359cd321ac7eee623571c34c584b4c6db52d12584f4955dca5889966f417f8af7b6aff96a7bdac8039771871f9e32acfbcceaab4 - languageName: node - linkType: hard - -"inquirer@npm:8.2.5": - version: 8.2.5 - resolution: "inquirer@npm:8.2.5" - dependencies: - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.1.1" - cli-cursor: "npm:^3.1.0" - cli-width: "npm:^3.0.0" - external-editor: "npm:^3.0.3" - figures: "npm:^3.0.0" - lodash: "npm:^4.17.21" - mute-stream: "npm:0.0.8" - ora: "npm:^5.4.1" - run-async: "npm:^2.4.0" - rxjs: "npm:^7.5.5" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - through: "npm:^2.3.6" - wrap-ansi: "npm:^7.0.0" - checksum: 10/50a240dfeaca37a14e6a6d11d7d6f7da947be3a9fe1e34ac41db6a49fc27022e7b3875ebe8ccd739497359808694488f3509792cc986f9ac48c43135f4e14172 - languageName: node - linkType: hard - -"inquirer@npm:8.2.6": - version: 8.2.6 - resolution: "inquirer@npm:8.2.6" - dependencies: - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.1.1" - cli-cursor: "npm:^3.1.0" - cli-width: "npm:^3.0.0" - external-editor: "npm:^3.0.3" - figures: "npm:^3.0.0" - lodash: "npm:^4.17.21" - mute-stream: "npm:0.0.8" - ora: "npm:^5.4.1" - run-async: "npm:^2.4.0" - rxjs: "npm:^7.5.5" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - through: "npm:^2.3.6" - wrap-ansi: "npm:^6.0.1" - checksum: 10/f642b9e5a94faaba54f277bdda2af0e0a6b592bd7f88c60e1614b5795b19336c7025e0c2923915d5f494f600a02fe8517413779a794415bb79a9563b061d68ab - languageName: node - linkType: hard - -"inquirer@npm:9.2.15": - version: 9.2.15 - resolution: "inquirer@npm:9.2.15" - dependencies: - "@ljharb/through": "npm:^2.3.12" - ansi-escapes: "npm:^4.3.2" - chalk: "npm:^5.3.0" - cli-cursor: "npm:^3.1.0" - cli-width: "npm:^4.1.0" - external-editor: "npm:^3.1.0" - figures: "npm:^3.2.0" - lodash: "npm:^4.17.21" - mute-stream: "npm:1.0.0" - ora: "npm:^5.4.1" - run-async: "npm:^3.0.0" - rxjs: "npm:^7.8.1" - string-width: "npm:^4.2.3" - strip-ansi: "npm:^6.0.1" - wrap-ansi: "npm:^6.2.0" - checksum: 10/7bca66f54fc3ef511e4be4ed781ef975325ad3a3e5ebeb4d070af78bba37966068a21db53fadac89ba808f19fd2fd88149c80cf6bcfd7e7fbc358fd0127a74f9 - languageName: node - linkType: hard - -"inquirer@npm:^0.12.0": - version: 0.12.0 - resolution: "inquirer@npm:0.12.0" - dependencies: - ansi-escapes: "npm:^1.1.0" - ansi-regex: "npm:^2.0.0" - chalk: "npm:^1.0.0" - cli-cursor: "npm:^1.0.1" - cli-width: "npm:^2.0.0" - figures: "npm:^1.3.5" - lodash: "npm:^4.3.0" - readline2: "npm:^1.0.1" - run-async: "npm:^0.1.0" - rx-lite: "npm:^3.1.2" - string-width: "npm:^1.0.1" - strip-ansi: "npm:^3.0.0" - through: "npm:^2.3.6" - checksum: 10/43a5e31fb28348627a1775eee1162966fe97fff39ec0114ef2e1ca09961e2bb3875d5bf8377469ccf01e341c9029214b950fa8581e6760a8ebec6b0f7423606f - languageName: node - linkType: hard - -"inquirer@npm:^3.0.6": - version: 3.3.0 - resolution: "inquirer@npm:3.3.0" - dependencies: - ansi-escapes: "npm:^3.0.0" - chalk: "npm:^2.0.0" - cli-cursor: "npm:^2.1.0" - cli-width: "npm:^2.0.0" - external-editor: "npm:^2.0.4" - figures: "npm:^2.0.0" - lodash: "npm:^4.3.0" - mute-stream: "npm:0.0.7" - run-async: "npm:^2.2.0" - rx-lite: "npm:^4.0.8" - rx-lite-aggregates: "npm:^4.0.8" - string-width: "npm:^2.1.0" - strip-ansi: "npm:^4.0.0" - through: "npm:^2.3.6" - checksum: 10/0d98c40e1ec1078d16e4e04cb7439192a8b7911cd5bf91e2e404b211bf455273c391393f9a2187129b78b93c9ff96666dfe49cac0827480421103dbbf9cabeb1 - languageName: node - linkType: hard - -"inquirer@npm:^9.3.4": - version: 9.3.4 - resolution: "inquirer@npm:9.3.4" - dependencies: - "@inquirer/figures": "npm:^1.0.3" - ansi-escapes: "npm:^4.3.2" - cli-width: "npm:^4.1.0" - external-editor: "npm:^3.1.0" - mute-stream: "npm:1.0.0" - ora: "npm:^5.4.1" - run-async: "npm:^3.0.0" - rxjs: "npm:^7.8.1" - string-width: "npm:^4.2.3" - strip-ansi: "npm:^6.0.1" - wrap-ansi: "npm:^6.2.0" - yoctocolors-cjs: "npm:^2.1.2" - checksum: 10/f9d20820ad07bfaa98ad1b0e1bb65da9cb020edafda25f781a28e7fe0fc98eb15b3fe95687258140a24a6bc9d209740d38ab17cc265c12fa6738db530c71b17e - languageName: node - linkType: hard - -"interface-datastore@npm:^7.0.0": - version: 7.0.4 - resolution: "interface-datastore@npm:7.0.4" - dependencies: - interface-store: "npm:^3.0.0" - nanoid: "npm:^4.0.0" - uint8arrays: "npm:^4.0.2" - checksum: 10/346bf4c53047056b009e9172dcbd5d64cc03a2eb333ab9288c8753012cfaa816b00e156862c549be185b517abb42f876983b7387fdc260b717af359e806177f9 - languageName: node - linkType: hard - -"interface-datastore@npm:^8.2.0": - version: 8.2.5 - resolution: "interface-datastore@npm:8.2.5" - dependencies: - interface-store: "npm:^5.0.0" - nanoid: "npm:^4.0.0" - uint8arrays: "npm:^4.0.2" - checksum: 10/34eeac161928075133af02eba9b3c807ed40a0ec6e3699fc9a2f5006ff3c97a049d68f15d2d7f91eaa802680ede0e6e3827a6042eba8110ce6adb0f514e4d310 - languageName: node - linkType: hard - -"interface-store@npm:^3.0.0": - version: 3.0.4 - resolution: "interface-store@npm:3.0.4" - checksum: 10/b3ad39602cea98fec6a29bbb54c6dba6049f56f555cef0030d282b3c3e518215adfa5562a6176edc8294c647eb2293f260c40154832df21212b861fa8f5a0563 - languageName: node - linkType: hard - -"interface-store@npm:^5.0.0": - version: 5.1.4 - resolution: "interface-store@npm:5.1.4" - checksum: 10/6088314f34839a442c7dec6307adfa92460d91ff62d06fcf3c8abe1d78642f5621588ce54a0bbc7972df525a06339707e52a23c9cf4701dd14ef2f8890bae9d0 - languageName: node - linkType: hard - -"internal-ip@npm:*": - version: 7.0.0 - resolution: "internal-ip@npm:7.0.0" - dependencies: - default-gateway: "npm:^6.0.3" - ipaddr.js: "npm:^2.0.1" - is-ip: "npm:^3.1.0" - p-event: "npm:^4.2.0" - checksum: 10/058fafe81a7e4d2466474361b74fd712d986f553def881c7dff51fd7eb98573d03c44cab047dddf41473252406e66fa20ed23f6a1b76962b090eee26a22854b6 - languageName: node - linkType: hard - -"internal-ip@npm:6.2.0": - version: 6.2.0 - resolution: "internal-ip@npm:6.2.0" - dependencies: - default-gateway: "npm:^6.0.0" - ipaddr.js: "npm:^1.9.1" - is-ip: "npm:^3.1.0" - p-event: "npm:^4.2.0" - checksum: 10/6d08299c052c4ec926fa4e3643049d81daacbc33d3ab90fc30cd59cd7f12902152107bc75778e1202a269eb82cab0c412ff04a78f0361e056de0c5c2628881fa - languageName: node - linkType: hard - -"internal-slot@npm:^1.0.3": - version: 1.0.3 - resolution: "internal-slot@npm:1.0.3" - dependencies: - get-intrinsic: "npm:^1.1.0" - has: "npm:^1.0.3" - side-channel: "npm:^1.0.4" - checksum: 10/1c6d22f7977b325e51387191a992a553bf7c380db548a32c09bbb4563a799d739d3ef629841234290a032dc555ca7e89178e8a35404dad77b55f2676be8a1ba2 - languageName: node - linkType: hard - -"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.5": - version: 1.0.5 - resolution: "internal-slot@npm:1.0.5" - dependencies: - get-intrinsic: "npm:^1.2.0" - has: "npm:^1.0.3" - side-channel: "npm:^1.0.4" - checksum: 10/e2eb5b348e427957dd4092cb57b9374a2cbcabbf61e5e5b4d99cb68eeaae29394e8efd79f23dc2b1831253346f3c16b82010737b84841225e934d80d04d68643 - languageName: node - linkType: hard - -"internal-slot@npm:^1.0.7": - version: 1.0.7 - resolution: "internal-slot@npm:1.0.7" - dependencies: - es-errors: "npm:^1.3.0" - hasown: "npm:^2.0.0" - side-channel: "npm:^1.0.4" - checksum: 10/3e66720508831153ecf37d13def9f6856f9f2960989ec8a0a0476c98f887fca9eff0163127466485cb825c900c2d6fc601aa9117b7783b90ffce23a71ea5d053 - languageName: node - linkType: hard - -"interpret@npm:^1.0.0": - version: 1.4.0 - resolution: "interpret@npm:1.4.0" - checksum: 10/5beec568d3f60543d0f61f2c5969d44dffcb1a372fe5abcdb8013968114d4e4aaac06bc971a4c9f5bd52d150881d8ebad72a8c60686b1361f5f0522f39c0e1a3 - languageName: node - linkType: hard - -"interpret@npm:^2.2.0": - version: 2.2.0 - resolution: "interpret@npm:2.2.0" - checksum: 10/a62d4de5c1f8ab1fd0ccc8a1a8cca8dc31e14928b70364f0787576fe4639c0c463bd79cfe58c9bd9f54db9b7e53d3e646e68fb7627c6b65e3b0e3893156c5126 - languageName: node - linkType: hard - -"into-stream@npm:^6.0.0": - version: 6.0.0 - resolution: "into-stream@npm:6.0.0" - dependencies: - from2: "npm:^2.3.0" - p-is-promise: "npm:^3.0.0" - checksum: 10/8df24c9eadd7cdd1cbc160bc20914b961dfd0ca29767785b69e698f799e85466b6f7c637d237dca1472d09d333399f70cc05a2fb8d08cb449dc9a80d92193980 - languageName: node - linkType: hard - -"invariant@npm:^2.2.4": - version: 2.2.4 - resolution: "invariant@npm:2.2.4" - dependencies: - loose-envify: "npm:^1.0.0" - checksum: 10/cc3182d793aad82a8d1f0af697b462939cb46066ec48bbf1707c150ad5fad6406137e91a262022c269702e01621f35ef60269f6c0d7fd178487959809acdfb14 - languageName: node - linkType: hard - -"invert-kv@npm:^1.0.0": - version: 1.0.0 - resolution: "invert-kv@npm:1.0.0" - checksum: 10/0820af99ca21818fa4a78815a8d06cf621a831306a5db57d7558234624b4891a89bb19a95fc3a868db4e754384c0ee38b70a00b75d81a0a46ee3937184a7cf6d - languageName: node - linkType: hard - -"invert-kv@npm:^2.0.0": - version: 2.0.0 - resolution: "invert-kv@npm:2.0.0" - checksum: 10/0a03bfaa5b01406250ff7daae34fe5d4103db2b7d967655c7935b70f5fd8b2543fd98320a564a0ed037803c927156d2f77bb3bcf1fee489b3651cab955af7684 - languageName: node - linkType: hard - -"io-ts@npm:1.10.4": - version: 1.10.4 - resolution: "io-ts@npm:1.10.4" - dependencies: - fp-ts: "npm:^1.0.0" - checksum: 10/d68cb0928b37485cf631c923628dd189784d3dbbcb2d681d86f5c64b9b0321aa33bd2ff271381ac54a279aec5935ff7a743264c858b5172e83b6a9f0cbafc7d1 - languageName: node - linkType: hard - -"ionicons@npm:7.1.0": - version: 7.1.0 - resolution: "ionicons@npm:7.1.0" - dependencies: - "@stencil/core": "npm:^2.18.0" - checksum: 10/a79db0ce7ccc4e41d18c1224cd7d930eb9e9c475b0f8b0785d832426e9f364d1b6846601dbb407ffa663ac1f5477d666cbd865b662650e6c5732ae0c9da66e0b - languageName: node - linkType: hard - -"ionicons@npm:^7.0.0": - version: 7.1.2 - resolution: "ionicons@npm:7.1.2" - dependencies: - "@stencil/core": "npm:^2.18.0" - checksum: 10/6201c77cd63f6808b43a807f1995a293d6b7587babdee1c8e1d8e9cfaadd5aa9635b1e4d6b35149173b9d14cf570c03d327f7d6d57b8b7b18d415ff66df2a3f9 - languageName: node - linkType: hard - -"ionicons@npm:^7.2.2": - version: 7.4.0 - resolution: "ionicons@npm:7.4.0" - dependencies: - "@stencil/core": "npm:^4.0.3" - checksum: 10/364c1d723cd93a6d205ad8aab035c29eea038aa29b0cd5a227c93e7e77872e438ead1e2a90c7a1b8f8a0b58adbb7a14be18f6bd339a124b7bff26f018a0bf3a8 - languageName: node - linkType: hard - -"ip-regex@npm:^4.0.0": - version: 4.3.0 - resolution: "ip-regex@npm:4.3.0" - checksum: 10/7ff904b891221b1847f3fdf3dbb3e6a8660dc39bc283f79eb7ed88f5338e1a3d1104b779bc83759159be266249c59c2160e779ee39446d79d4ed0890dfd06f08 - languageName: node - linkType: hard - -"ip@npm:^1.1.5": - version: 1.1.5 - resolution: "ip@npm:1.1.5" - checksum: 10/40a00572cf06b53f4c7b7fe6270a8427ef4c6c0820a380f9f1eb48a323eb09c7dbd16245b472cf5a2d083911d0deae4d712b6e6c88b346fa274e8ce07756a7d6 - languageName: node - linkType: hard - -"ip@npm:^2.0.0": - version: 2.0.0 - resolution: "ip@npm:2.0.0" - checksum: 10/1270b11e534a466fb4cf4426cbcc3a907c429389f7f4e4e3b288b42823562e88d6a509ceda8141a507de147ca506141f745005c0aa144569d94cf24a54eb52bc - languageName: node - linkType: hard - -"ipaddr.js@npm:1.9.1, ipaddr.js@npm:^1.9.1": - version: 1.9.1 - resolution: "ipaddr.js@npm:1.9.1" - checksum: 10/864d0cced0c0832700e9621913a6429ccdc67f37c1bd78fb8c6789fff35c9d167cb329134acad2290497a53336813ab4798d2794fd675d5eb33b5fdf0982b9ca - languageName: node - linkType: hard - -"ipaddr.js@npm:^2.0.1": - version: 2.0.1 - resolution: "ipaddr.js@npm:2.0.1" - checksum: 10/b809f60af0473f1452480b05a2cec8270284290d18d2778df522d08e0b6d0db21b84f5bf4949190f3c728794d3eef36bfaeff14a1e1acf6045553f4532b119de - languageName: node - linkType: hard - -"ipfs-core-types@npm:0.14.1, ipfs-core-types@npm:^0.14.1": - version: 0.14.1 - resolution: "ipfs-core-types@npm:0.14.1" - dependencies: - "@ipld/dag-pb": "npm:^4.0.0" - "@libp2p/interface-keychain": "npm:^2.0.0" - "@libp2p/interface-peer-id": "npm:^2.0.0" - "@libp2p/interface-peer-info": "npm:^1.0.2" - "@libp2p/interface-pubsub": "npm:^3.0.0" - "@multiformats/multiaddr": "npm:^11.1.5" - "@types/node": "npm:^18.0.0" - interface-datastore: "npm:^7.0.0" - ipfs-unixfs: "npm:^9.0.0" - multiformats: "npm:^11.0.0" - checksum: 10/d48f3385a598b86595db03f4c787ac8cf25b5b6816e7a15cf25e952370a995f6445f6b2fa8f825caedaef77ab81aa935adccd2ba54728dd62ae1a7ecf55c4509 - languageName: node - linkType: hard - -"ipfs-core-utils@npm:^0.18.0": - version: 0.18.1 - resolution: "ipfs-core-utils@npm:0.18.1" - dependencies: - "@libp2p/logger": "npm:^2.0.5" - "@multiformats/multiaddr": "npm:^11.1.5" - "@multiformats/multiaddr-to-uri": "npm:^9.0.1" - any-signal: "npm:^3.0.0" - blob-to-it: "npm:^2.0.0" - browser-readablestream-to-it: "npm:^2.0.0" - err-code: "npm:^3.0.1" - ipfs-core-types: "npm:^0.14.1" - ipfs-unixfs: "npm:^9.0.0" - ipfs-utils: "npm:^9.0.13" - it-all: "npm:^2.0.0" - it-map: "npm:^2.0.0" - it-peekable: "npm:^2.0.0" - it-to-stream: "npm:^1.0.0" - merge-options: "npm:^3.0.4" - multiformats: "npm:^11.0.0" - nanoid: "npm:^4.0.0" - parse-duration: "npm:^1.0.0" - timeout-abort-controller: "npm:^3.0.0" - uint8arrays: "npm:^4.0.2" - checksum: 10/c10b54c289f755efe2af690ed35f14b31e7d4a2d9e2072d37ffd1d7054b3581541014922d688214bb17dc30a8f10443ab91f5532411057f84badc0e533a4416b - languageName: node - linkType: hard - -"ipfs-unixfs@npm:9.0.1, ipfs-unixfs@npm:^9.0.0": - version: 9.0.1 - resolution: "ipfs-unixfs@npm:9.0.1" - dependencies: - err-code: "npm:^3.0.1" - protobufjs: "npm:^7.0.0" - checksum: 10/37649bd2c52016c40edf829d7a069c41eb5c4022444698e943e73d306477bab4c689ce9b6fe026fe9e2687db650b09293bbf631a88d995384aa12450de6404cf - languageName: node - linkType: hard - -"ipfs-utils@npm:^9.0.13, ipfs-utils@npm:^9.0.7": - version: 9.0.14 - resolution: "ipfs-utils@npm:9.0.14" - dependencies: - any-signal: "npm:^3.0.0" - browser-readablestream-to-it: "npm:^1.0.0" - buffer: "npm:^6.0.1" - electron-fetch: "npm:^1.7.2" - err-code: "npm:^3.0.1" - is-electron: "npm:^2.2.0" - iso-url: "npm:^1.1.5" - it-all: "npm:^1.0.4" - it-glob: "npm:^1.0.1" - it-to-stream: "npm:^1.0.0" - merge-options: "npm:^3.0.4" - nanoid: "npm:^3.1.20" - native-fetch: "npm:^3.0.0" - node-fetch: "npm:^2.6.8" - react-native-fetch-api: "npm:^3.0.0" - stream-to-it: "npm:^0.2.2" - checksum: 10/5b54f7f29b50a1a2c9e0cbe609632bc30982d5a8759edc436d369a53761b80a1299a3b67d61db324dbfea075729edd6668679ff63506f134bf72d6746ad6fb3b - languageName: node - linkType: hard - -"is-accessor-descriptor@npm:^0.1.6": - version: 0.1.6 - resolution: "is-accessor-descriptor@npm:0.1.6" - dependencies: - kind-of: "npm:^3.0.2" - checksum: 10/3d629a086a9585bc16a83a8e8a3416f400023301855cafb7ccc9a1d63145b7480f0ad28877dcc2cce09492c4ec1c39ef4c071996f24ee6ac626be4217b8ffc8a - languageName: node - linkType: hard - -"is-accessor-descriptor@npm:^1.0.0": - version: 1.0.0 - resolution: "is-accessor-descriptor@npm:1.0.0" - dependencies: - kind-of: "npm:^6.0.0" - checksum: 10/8e475968e9b22f9849343c25854fa24492dbe8ba0dea1a818978f9f1b887339190b022c9300d08c47fe36f1b913d70ce8cbaca00369c55a56705fdb7caed37fe - languageName: node - linkType: hard - -"is-arguments@npm:^1.0.4, is-arguments@npm:^1.1.1": - version: 1.1.1 - resolution: "is-arguments@npm:1.1.1" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10/a170c7e26082e10de9be6e96d32ae3db4d5906194051b792e85fae3393b53cf2cb5b3557863e5c8ccbab55e2fd8f2f75aa643d437613f72052cf0356615c34be - languageName: node - linkType: hard - -"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": - version: 3.0.2 - resolution: "is-array-buffer@npm:3.0.2" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.0" - is-typed-array: "npm:^1.1.10" - checksum: 10/dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 - languageName: node - linkType: hard - -"is-array-buffer@npm:^3.0.4": - version: 3.0.4 - resolution: "is-array-buffer@npm:3.0.4" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.1" - checksum: 10/34a26213d981d58b30724ef37a1e0682f4040d580fa9ff58fdfdd3cefcb2287921718c63971c1c404951e7b747c50fdc7caf6e867e951353fa71b369c04c969b - languageName: node - linkType: hard - -"is-arrayish@npm:^0.2.1": - version: 0.2.1 - resolution: "is-arrayish@npm:0.2.1" - checksum: 10/73ced84fa35e59e2c57da2d01e12cd01479f381d7f122ce41dcbb713f09dbfc651315832cd2bf8accba7681a69e4d6f1e03941d94dd10040d415086360e7005e - languageName: node - linkType: hard - -"is-arrayish@npm:^0.3.1": - version: 0.3.2 - resolution: "is-arrayish@npm:0.3.2" - checksum: 10/81a78d518ebd8b834523e25d102684ee0f7e98637136d3bdc93fd09636350fa06f1d8ca997ea28143d4d13cb1b69c0824f082db0ac13e1ab3311c10ffea60ade - languageName: node - linkType: hard - -"is-async-function@npm:^2.0.0": - version: 2.0.0 - resolution: "is-async-function@npm:2.0.0" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10/2cf336fbf8cba3badcf526aa3d10384c30bab32615ac4831b74492eb4e843ccb7d8439a119c27f84bcf217d72024e611b1373f870f433b48f3fa57d3d1b863f1 - languageName: node - linkType: hard - -"is-bigint@npm:^1.0.1": - version: 1.0.4 - resolution: "is-bigint@npm:1.0.4" - dependencies: - has-bigints: "npm:^1.0.1" - checksum: 10/cc981cf0564c503aaccc1e5f39e994ae16ae2d1a8fcd14721f14ad431809071f39ec568cfceef901cff408045f1a6d6bac90d1b43eeb0b8e3bc34c8eb1bdb4c4 - languageName: node - linkType: hard - -"is-binary-path@npm:~2.1.0": - version: 2.1.0 - resolution: "is-binary-path@npm:2.1.0" - dependencies: - binary-extensions: "npm:^2.0.0" - checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e - languageName: node - linkType: hard - -"is-boolean-object@npm:^1.1.0": - version: 1.1.2 - resolution: "is-boolean-object@npm:1.1.2" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10/ba794223b56a49a9f185e945eeeb6b7833b8ea52a335cec087d08196cf27b538940001615d3bb976511287cefe94e5907d55f00bb49580533f9ca9b4515fcc2e - languageName: node - linkType: hard - -"is-buffer@npm:^1.1.5": - version: 1.1.6 - resolution: "is-buffer@npm:1.1.6" - checksum: 10/f63da109e74bbe8947036ed529d43e4ae0c5fcd0909921dce4917ad3ea212c6a87c29f525ba1d17c0858c18331cf1046d4fc69ef59ed26896b25c8288a627133 - languageName: node - linkType: hard - -"is-buffer@npm:^2.0.5": - version: 2.0.5 - resolution: "is-buffer@npm:2.0.5" - checksum: 10/3261a8b858edcc6c9566ba1694bf829e126faa88911d1c0a747ea658c5d81b14b6955e3a702d59dabadd58fdd440c01f321aa71d6547105fd21d03f94d0597e7 - languageName: node - linkType: hard - -"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.4": - version: 1.2.4 - resolution: "is-callable@npm:1.2.4" - checksum: 10/4e3d8c08208475e74a4108a9dc44dbcb74978782e38a1d1b55388342a4824685765d95917622efa2ca1483f7c4dbec631dd979cbb3ebd239f57a75c83a46d99f - languageName: node - linkType: hard - -"is-callable@npm:^1.2.7": - version: 1.2.7 - resolution: "is-callable@npm:1.2.7" - checksum: 10/48a9297fb92c99e9df48706241a189da362bff3003354aea4048bd5f7b2eb0d823cd16d0a383cece3d76166ba16d85d9659165ac6fcce1ac12e6c649d66dbdb9 - languageName: node - linkType: hard - -"is-ci@npm:^2.0.0": - version: 2.0.0 - resolution: "is-ci@npm:2.0.0" - dependencies: - ci-info: "npm:^2.0.0" - bin: - is-ci: bin.js - checksum: 10/77b869057510f3efa439bbb36e9be429d53b3f51abd4776eeea79ab3b221337fe1753d1e50058a9e2c650d38246108beffb15ccfd443929d77748d8c0cc90144 - languageName: node - linkType: hard - -"is-ci@npm:^3.0.1": - version: 3.0.1 - resolution: "is-ci@npm:3.0.1" - dependencies: - ci-info: "npm:^3.2.0" - bin: - is-ci: bin.js - checksum: 10/192c66dc7826d58f803ecae624860dccf1899fc1f3ac5505284c0a5cf5f889046ffeb958fa651e5725d5705c5bcb14f055b79150ea5fcad7456a9569de60260e - languageName: node - linkType: hard - -"is-core-module@npm:2.9.0": - version: 2.9.0 - resolution: "is-core-module@npm:2.9.0" - dependencies: - has: "npm:^1.0.3" - checksum: 10/1a17939da6f9c6c90073a2a13a6b79c423ed375b9ba1f87ca5daab6e706ccef6b5aaba7ebede08514441ba773ce21a0f8ce29ff2b88e68d5ede8b8de2b157bde - languageName: node - linkType: hard - -"is-core-module@npm:^2.11.0": - version: 2.12.0 - resolution: "is-core-module@npm:2.12.0" - dependencies: - has: "npm:^1.0.3" - checksum: 10/c1585e0695ad4f01ce67189c85ffc27b487c6b23f80f319c27f057f9724f8926c62baf53743bd77a717a0491c86eeb1a07b065e332672a1325872abf16e0cdbc - languageName: node - linkType: hard - -"is-core-module@npm:^2.12.0, is-core-module@npm:^2.13.1": - version: 2.13.1 - resolution: "is-core-module@npm:2.13.1" - dependencies: - hasown: "npm:^2.0.0" - checksum: 10/d53bd0cc24b0a0351fb4b206ee3908f71b9bbf1c47e9c9e14e5f06d292af1663704d2abd7e67700d6487b2b7864e0d0f6f10a1edf1892864bdffcb197d1845a2 - languageName: node - linkType: hard - -"is-core-module@npm:^2.13.0": - version: 2.13.0 - resolution: "is-core-module@npm:2.13.0" - dependencies: - has: "npm:^1.0.3" - checksum: 10/55ccb5ccd208a1e088027065ee6438a99367e4c31c366b52fbaeac8fa23111cd17852111836d904da604801b3286d38d3d1ffa6cd7400231af8587f021099dc6 - languageName: node - linkType: hard - -"is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1": - version: 2.8.1 - resolution: "is-core-module@npm:2.8.1" - dependencies: - has: "npm:^1.0.3" - checksum: 10/80b33fbd450c3b7070a8ea101b730a8ae0aee326bb665cdb067220edbc98fb847d1294f8ded036d5b022827fb8d3e6fcf30313a601785c5d902db7660f6cd7b1 - languageName: node - linkType: hard - -"is-core-module@npm:^2.9.0": - version: 2.12.1 - resolution: "is-core-module@npm:2.12.1" - dependencies: - has: "npm:^1.0.3" - checksum: 10/35d5f90c95f7c737d287121e924bdfcad0a47b33efd7f89c58e9ab3810b43b1f1d377b641797326bde500e47edf5a7bf74a464e0c336a5c7e827b13fa41b57af - languageName: node - linkType: hard - -"is-data-descriptor@npm:^0.1.4": - version: 0.1.4 - resolution: "is-data-descriptor@npm:0.1.4" - dependencies: - kind-of: "npm:^3.0.2" - checksum: 10/5c622e078ba933a78338ae398a3d1fc5c23332b395312daf4f74bab4afb10d061cea74821add726cb4db8b946ba36217ee71a24fe71dd5bca4632edb7f6aad87 - languageName: node - linkType: hard - -"is-data-descriptor@npm:^1.0.0": - version: 1.0.0 - resolution: "is-data-descriptor@npm:1.0.0" - dependencies: - kind-of: "npm:^6.0.0" - checksum: 10/b8b1f13a535800a9f35caba2743b2cfd1e76312c0f94248c333d3b724d6ac6e07f06011e8b00eb2442f27dfc8fb71faf3dd52ced6bee41bb836be3df5d7811ee - languageName: node - linkType: hard - -"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": - version: 1.0.5 - resolution: "is-date-object@npm:1.0.5" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10/cc80b3a4b42238fa0d358b9a6230dae40548b349e64a477cb7c5eff9b176ba194c11f8321daaf6dd157e44073e9b7fd01f87db1f14952a88d5657acdcd3a56e2 - languageName: node - linkType: hard - -"is-descriptor@npm:^0.1.0": - version: 0.1.6 - resolution: "is-descriptor@npm:0.1.6" - dependencies: - is-accessor-descriptor: "npm:^0.1.6" - is-data-descriptor: "npm:^0.1.4" - kind-of: "npm:^5.0.0" - checksum: 10/b946ba842187c2784a5a0d67bd0e0271b14678f4fdce7d2295dfda9201f3408f55f56e11e5e66bfa4d2b9d45655b6105ad872ad7d37fb63f582587464fd414d7 - languageName: node - linkType: hard - -"is-descriptor@npm:^1.0.0, is-descriptor@npm:^1.0.2": - version: 1.0.2 - resolution: "is-descriptor@npm:1.0.2" - dependencies: - is-accessor-descriptor: "npm:^1.0.0" - is-data-descriptor: "npm:^1.0.0" - kind-of: "npm:^6.0.2" - checksum: 10/e68059b333db331d5ea68cb367ce12fc6810853ced0e2221e6747143bbdf223dee73ebe8f331bafe04e34fdbe3da584b6af3335e82eabfaa33d5026efa33ca34 - languageName: node - linkType: hard - -"is-docker@npm:^2.0.0, is-docker@npm:^2.1.1": - version: 2.2.1 - resolution: "is-docker@npm:2.2.1" - bin: - is-docker: cli.js - checksum: 10/3fef7ddbf0be25958e8991ad941901bf5922ab2753c46980b60b05c1bf9c9c2402d35e6dc32e4380b980ef5e1970a5d9d5e5aa2e02d77727c3b6b5e918474c56 - languageName: node - linkType: hard - -"is-dotfile@npm:^1.0.0": - version: 1.0.3 - resolution: "is-dotfile@npm:1.0.3" - checksum: 10/5257760d998d50ba2d5b4707007c043c69da0b62172f2221505edc6671ff634581c05df494a19d8d7206d248154c2f29f8432193ee199d33b09733e66371fb35 - languageName: node - linkType: hard - -"is-electron@npm:^2.2.0": - version: 2.2.1 - resolution: "is-electron@npm:2.2.1" - checksum: 10/06e569aa933a737d418489bb9ca081af62eceb714d4c3d553ad2497610e35494be6dddd010c4e29890c7dd9d0481c2e3e1e9097af9d19df1c52dd5be747d80a0 - languageName: node - linkType: hard - -"is-equal-shallow@npm:^0.1.3": - version: 0.1.3 - resolution: "is-equal-shallow@npm:0.1.3" - dependencies: - is-primitive: "npm:^2.0.0" - checksum: 10/1a296b660b8749ba1449017d9572e81fe8a96764877d5f9739c523a20cc7cdfa49594c16fa17052d0c3ee4711e35fd6919b06bf1b11b7126feab61abb9503ce6 - languageName: node - linkType: hard - -"is-extendable@npm:^0.1.0, is-extendable@npm:^0.1.1": - version: 0.1.1 - resolution: "is-extendable@npm:0.1.1" - checksum: 10/3875571d20a7563772ecc7a5f36cb03167e9be31ad259041b4a8f73f33f885441f778cee1f1fe0085eb4bc71679b9d8c923690003a36a6a5fdf8023e6e3f0672 - languageName: node - linkType: hard - -"is-extendable@npm:^1.0.1": - version: 1.0.1 - resolution: "is-extendable@npm:1.0.1" - dependencies: - is-plain-object: "npm:^2.0.4" - checksum: 10/db07bc1e9de6170de70eff7001943691f05b9d1547730b11be01c0ebfe67362912ba743cf4be6fd20a5e03b4180c685dad80b7c509fe717037e3eee30ad8e84f - languageName: node - linkType: hard - -"is-extglob@npm:^1.0.0": - version: 1.0.0 - resolution: "is-extglob@npm:1.0.0" - checksum: 10/5eea8517feeae5206547c0fc838c1416ec763b30093c286e1965a05f46b74a59ad391f912565f3b67c9c31cab4769ab9c35420e016b608acb47309be8d0d6e94 - languageName: node - linkType: hard - -"is-extglob@npm:^2.1.1": - version: 2.1.1 - resolution: "is-extglob@npm:2.1.1" - checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 - languageName: node - linkType: hard - -"is-finalizationregistry@npm:^1.0.2": - version: 1.0.2 - resolution: "is-finalizationregistry@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10/1b8e9e1bf2075e862315ef9d38ce6d39c43ca9d81d46f73b34473506992f4b0fbaadb47ec9b420a5e76afe3f564d9f1f0d9b552ef272cc2395e0f21d743c9c29 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^1.0.0": - version: 1.0.0 - resolution: "is-fullwidth-code-point@npm:1.0.0" - dependencies: - number-is-nan: "npm:^1.0.0" - checksum: 10/4d46a7465a66a8aebcc5340d3b63a56602133874af576a9ca42c6f0f4bd787a743605771c5f246db77da96605fefeffb65fc1dbe862dcc7328f4b4d03edf5a57 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^2.0.0": - version: 2.0.0 - resolution: "is-fullwidth-code-point@npm:2.0.0" - checksum: 10/eef9c6e15f68085fec19ff6a978a6f1b8f48018fd1265035552078ee945573594933b09bbd6f562553e2a241561439f1ef5339276eba68d272001343084cfab8 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^3.0.0": - version: 3.0.0 - resolution: "is-fullwidth-code-point@npm:3.0.0" - checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 - languageName: node - linkType: hard - -"is-function@npm:^1.0.1": - version: 1.0.2 - resolution: "is-function@npm:1.0.2" - checksum: 10/7d564562e07b4b51359547d3ccc10fb93bb392fd1b8177ae2601ee4982a0ece86d952323fc172a9000743a3971f09689495ab78a1d49a9b14fc97a7e28521dc0 - languageName: node - linkType: hard - -"is-generator-fn@npm:^2.0.0": - version: 2.1.0 - resolution: "is-generator-fn@npm:2.1.0" - checksum: 10/a6ad5492cf9d1746f73b6744e0c43c0020510b59d56ddcb78a91cbc173f09b5e6beff53d75c9c5a29feb618bfef2bf458e025ecf3a57ad2268e2fb2569f56215 - languageName: node - linkType: hard - -"is-generator-function@npm:^1.0.10, is-generator-function@npm:^1.0.7": - version: 1.0.10 - resolution: "is-generator-function@npm:1.0.10" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10/499a3ce6361064c3bd27fbff5c8000212d48506ebe1977842bbd7b3e708832d0deb1f4cc69186ece3640770e8c4f1287b24d99588a0b8058b2dbdd344bc1f47f - languageName: node - linkType: hard - -"is-generator@npm:^1.0.2": - version: 1.0.3 - resolution: "is-generator@npm:1.0.3" - checksum: 10/416ab44184fcb75923fd07cdffd05cbfc27c13d75ab9d5df441180f9689def4ba4e430a249b1b39669c651e9ea697c107493391e8265ab78ffe22e5eafb34c6b - languageName: node - linkType: hard - -"is-glob@npm:^2.0.0, is-glob@npm:^2.0.1": - version: 2.0.1 - resolution: "is-glob@npm:2.0.1" - dependencies: - is-extglob: "npm:^1.0.0" - checksum: 10/089f5f93640072491396a5f075ce73e949a90f35832b782bc49a6b7637d58e392d53cb0b395e059ccab70fcb82ff35d183f6f9ebbcb43227a1e02e3fed5430c9 - languageName: node - linkType: hard - -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": - version: 4.0.3 - resolution: "is-glob@npm:4.0.3" - dependencies: - is-extglob: "npm:^2.1.1" - checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 - languageName: node - linkType: hard - -"is-hex-prefixed@npm:1.0.0": - version: 1.0.0 - resolution: "is-hex-prefixed@npm:1.0.0" - checksum: 10/5ac58e6e528fb029cc43140f6eeb380fad23d0041cc23154b87f7c9a1b728bcf05909974e47248fd0b7fcc11ba33cf7e58d64804883056fabd23e2b898be41de - languageName: node - linkType: hard - -"is-installed-globally@npm:^0.4.0": - version: 0.4.0 - resolution: "is-installed-globally@npm:0.4.0" - dependencies: - global-dirs: "npm:^3.0.0" - is-path-inside: "npm:^3.0.2" - checksum: 10/5294d21c82cb9beedd693ce1dfb12117c4db36d6e35edc9dc6bf06cb300d23c96520d1bfb063386b054268ae3d7255c3f09393b52218cc26ace99b217bf37c93 - languageName: node - linkType: hard - -"is-interactive@npm:^1.0.0": - version: 1.0.0 - resolution: "is-interactive@npm:1.0.0" - checksum: 10/824808776e2d468b2916cdd6c16acacebce060d844c35ca6d82267da692e92c3a16fdba624c50b54a63f38bdc4016055b6f443ce57d7147240de4f8cdabaf6f9 - languageName: node - linkType: hard - -"is-ip@npm:^3.1.0": - version: 3.1.0 - resolution: "is-ip@npm:3.1.0" - dependencies: - ip-regex: "npm:^4.0.0" - checksum: 10/da2c2b282407194adf2320bade0bad94be9c9d0bdab85ff45b1b62d8185f31c65dff3884519d57bf270277e5ea2046c7916a6e5a6db22fe4b7ddcdd3760f23eb - languageName: node - linkType: hard - -"is-lambda@npm:^1.0.1": - version: 1.0.1 - resolution: "is-lambda@npm:1.0.1" - checksum: 10/93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 - languageName: node - linkType: hard - -"is-lower-case@npm:^1.1.0": - version: 1.1.3 - resolution: "is-lower-case@npm:1.1.3" - dependencies: - lower-case: "npm:^1.1.0" - checksum: 10/55a2a9fe384f669ab349985bb3d1b2ab99dff4ca6d898255786ed97722680ee407a2b2c9977e05157043fd48727d71a1ca15493b58710ab076b13820ee84eed0 - languageName: node - linkType: hard - -"is-map@npm:^2.0.1, is-map@npm:^2.0.2": - version: 2.0.2 - resolution: "is-map@npm:2.0.2" - checksum: 10/60ba910f835f2eacb1fdf5b5a6c60fe1c702d012a7673e6546992bcc0c873f62ada6e13d327f9e48f1720d49c152d6cdecae1fa47a261ef3d247c3ce6f0e1d39 - languageName: node - linkType: hard - -"is-module@npm:^1.0.0": - version: 1.0.0 - resolution: "is-module@npm:1.0.0" - checksum: 10/8cd5390730c7976fb4e8546dd0b38865ee6f7bacfa08dfbb2cc07219606755f0b01709d9361e01f13009bbbd8099fa2927a8ed665118a6105d66e40f1b838c3f - languageName: node - linkType: hard - -"is-my-ip-valid@npm:^1.0.0": - version: 1.0.1 - resolution: "is-my-ip-valid@npm:1.0.1" - checksum: 10/97d28349e64b0c127f8e1c3c3f4fb92dfaadea7d34b67c43bbd9fe06d473fca66f3e1fd013b0a7c4b762db992d49a01af91b9cc994fac71db0cefb383f634ec6 - languageName: node - linkType: hard - -"is-my-json-valid@npm:^2.10.0, is-my-json-valid@npm:^2.20.6": - version: 2.20.6 - resolution: "is-my-json-valid@npm:2.20.6" - dependencies: - generate-function: "npm:^2.0.0" - generate-object-property: "npm:^1.1.0" - is-my-ip-valid: "npm:^1.0.0" - jsonpointer: "npm:^5.0.0" - xtend: "npm:^4.0.0" - checksum: 10/0c23fb1ead07442269d52e58d2a62796d091e3f4741dbd1e25a689e1bcad15d9351abd8c90a62a9a3e75a3a6104e6ca94699db55c536114ff1f94b54067a0ff9 - languageName: node - linkType: hard - -"is-nan@npm:^1.2.1": - version: 1.3.2 - resolution: "is-nan@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.0" - define-properties: "npm:^1.1.3" - checksum: 10/1f784d3472c09bc2e47acba7ffd4f6c93b0394479aa613311dc1d70f1bfa72eb0846c81350967722c959ba65811bae222204d6c65856fdce68f31986140c7b0e - languageName: node - linkType: hard - -"is-natural-number@npm:^4.0.1": - version: 4.0.1 - resolution: "is-natural-number@npm:4.0.1" - checksum: 10/3e5e3d52e0dfa4fea923b5d2b8a5cdbd9bf110c4598d30304b98528b02f40c9058a2abf1bae10bcbaf2bac18ace41cff7bc9673aff339f8c8297fae74ae0e75d - languageName: node - linkType: hard - -"is-negative-zero@npm:^2.0.1, is-negative-zero@npm:^2.0.2": - version: 2.0.2 - resolution: "is-negative-zero@npm:2.0.2" - checksum: 10/edbec1a9e6454d68bf595a114c3a72343d2d0be7761d8173dae46c0b73d05bb8fe9398c85d121e7794a66467d2f40b4a610b0be84cd804262d234fc634c86131 - languageName: node - linkType: hard - -"is-negative-zero@npm:^2.0.3": - version: 2.0.3 - resolution: "is-negative-zero@npm:2.0.3" - checksum: 10/8fe5cffd8d4fb2ec7b49d657e1691889778d037494c6f40f4d1a524cadd658b4b53ad7b6b73a59bcb4b143ae9a3d15829af864b2c0f9d65ac1e678c4c80f17e5 - languageName: node - linkType: hard - -"is-npm@npm:^5.0.0": - version: 5.0.0 - resolution: "is-npm@npm:5.0.0" - checksum: 10/9baff02b0c69a3d3c79b162cb2f9e67fb40ef6d172c16601b2e2471c21e9a4fa1fc9885a308d7bc6f3a3cd2a324c27fa0bf284c133c3349bb22571ab70d041cc - languageName: node - linkType: hard - -"is-number-object@npm:^1.0.4": - version: 1.0.6 - resolution: "is-number-object@npm:1.0.6" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10/d848fdc0fc69e30866b87fcaae17a3e68a8be669073ab3bf9a578c29106a2d5084089a2e7bc40819ec55eac94a52d9e20d735e7bfd3a46202b17199e555f91fa - languageName: node - linkType: hard - -"is-number@npm:^3.0.0": - version: 3.0.0 - resolution: "is-number@npm:3.0.0" - dependencies: - kind-of: "npm:^3.0.2" - checksum: 10/0c62bf8e9d72c4dd203a74d8cfc751c746e75513380fef420cda8237e619a988ee43e678ddb23c87ac24d91ac0fe9f22e4ffb1301a50310c697e9d73ca3994e9 - languageName: node - linkType: hard - -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 - languageName: node - linkType: hard - -"is-obj@npm:^1.0.1": - version: 1.0.1 - resolution: "is-obj@npm:1.0.1" - checksum: 10/3ccf0efdea12951e0b9c784e2b00e77e87b2f8bd30b42a498548a8afcc11b3287342a2030c308e473e93a7a19c9ea7854c99a8832a476591c727df2a9c79796c - languageName: node - linkType: hard - -"is-obj@npm:^2.0.0": - version: 2.0.0 - resolution: "is-obj@npm:2.0.0" - checksum: 10/c9916ac8f4621962a42f5e80e7ffdb1d79a3fab7456ceaeea394cd9e0858d04f985a9ace45be44433bf605673c8be8810540fe4cc7f4266fc7526ced95af5a08 - languageName: node - linkType: hard - -"is-object@npm:^1.0.1": - version: 1.0.2 - resolution: "is-object@npm:1.0.2" - checksum: 10/db53971751c50277f0ed31d065d93038d23cb9785090ab5c8070a903cf5bab16cdb18f05b8855599ad87ec19eb4c85afa05980bcda77dd4a8482120b6348c73c - languageName: node - linkType: hard - -"is-object@npm:~0.1.2": - version: 0.1.2 - resolution: "is-object@npm:0.1.2" - checksum: 10/c4425bcd69a86c6de77f4b047eee80922d37f7406fedbcf0d8b2384406d07266e77266badc6b2dc00ed0b3fea4ca26b300af1bec49ca2004a01a4f8846a1c239 - languageName: node - linkType: hard - -"is-path-cwd@npm:^3.0.0": - version: 3.0.0 - resolution: "is-path-cwd@npm:3.0.0" - checksum: 10/bc34d13b6a03dfca4a3ab6a8a5ba78ae4b24f4f1db4b2b031d2760c60d0913bd16a4b980dcb4e590adfc906649d5f5132684079a3972bd219da49deebb9adea8 - languageName: node - linkType: hard - -"is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": - version: 3.0.3 - resolution: "is-path-inside@npm:3.0.3" - checksum: 10/abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 - languageName: node - linkType: hard - -"is-path-inside@npm:^4.0.0": - version: 4.0.0 - resolution: "is-path-inside@npm:4.0.0" - checksum: 10/8810fa11c58e6360b82c3e0d6cd7d9c7d0392d3ac9eb10f980b81f9839f40ac6d1d6d6f05d069db0d227759801228f0b072e1b6c343e4469b065ab5fe0b68fe5 - languageName: node - linkType: hard - -"is-plain-obj@npm:2.1.0, is-plain-obj@npm:^2.1.0": - version: 2.1.0 - resolution: "is-plain-obj@npm:2.1.0" - checksum: 10/cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa - languageName: node - linkType: hard - -"is-plain-obj@npm:^1.1.0": - version: 1.1.0 - resolution: "is-plain-obj@npm:1.1.0" - checksum: 10/0ee04807797aad50859652a7467481816cbb57e5cc97d813a7dcd8915da8195dc68c436010bf39d195226cde6a2d352f4b815f16f26b7bf486a5754290629931 - languageName: node - linkType: hard - -"is-plain-obj@npm:^3.0.0": - version: 3.0.0 - resolution: "is-plain-obj@npm:3.0.0" - checksum: 10/a6ebdf8e12ab73f33530641972a72a4b8aed6df04f762070d823808303e4f76d87d5ea5bd76f96a7bbe83d93f04ac7764429c29413bd9049853a69cb630fb21c - languageName: node - linkType: hard - -"is-plain-obj@npm:^4.0.0": - version: 4.1.0 - resolution: "is-plain-obj@npm:4.1.0" - checksum: 10/6dc45da70d04a81f35c9310971e78a6a3c7a63547ef782e3a07ee3674695081b6ca4e977fbb8efc48dae3375e0b34558d2bcd722aec9bddfa2d7db5b041be8ce - languageName: node - linkType: hard - -"is-plain-object@npm:^2.0.3, is-plain-object@npm:^2.0.4": - version: 2.0.4 - resolution: "is-plain-object@npm:2.0.4" - dependencies: - isobject: "npm:^3.0.1" - checksum: 10/2a401140cfd86cabe25214956ae2cfee6fbd8186809555cd0e84574f88de7b17abacb2e477a6a658fa54c6083ecbda1e6ae404c7720244cd198903848fca70ca - languageName: node - linkType: hard - -"is-plain-object@npm:^5.0.0": - version: 5.0.0 - resolution: "is-plain-object@npm:5.0.0" - checksum: 10/e32d27061eef62c0847d303125440a38660517e586f2f3db7c9d179ae5b6674ab0f469d519b2e25c147a1a3bc87156d0d5f4d8821e0ce4a9ee7fe1fcf11ce45c - languageName: node - linkType: hard - -"is-port-reachable@npm:3.0.0": - version: 3.0.0 - resolution: "is-port-reachable@npm:3.0.0" - checksum: 10/ba7a67407bd1602395e3394868137d8c60d13f5a99884989bf6b64438cab7ec5fb616711e03453f406f4a95f2110272373d86ea7ffef7b63e3471c331c6736c7 - languageName: node - linkType: hard - -"is-posix-bracket@npm:^0.1.0": - version: 0.1.1 - resolution: "is-posix-bracket@npm:0.1.1" - checksum: 10/8a6391b41e7acef6898e64b00e06885b28c14b0c76398d3251a6ab1e5350d495dd32ec3f7f88f3f877558ce4b970939356fb315ee607f8f99a1716d4db7bdd40 - languageName: node - linkType: hard - -"is-potential-custom-element-name@npm:^1.0.1": - version: 1.0.1 - resolution: "is-potential-custom-element-name@npm:1.0.1" - checksum: 10/ced7bbbb6433a5b684af581872afe0e1767e2d1146b2207ca0068a648fb5cab9d898495d1ac0583524faaf24ca98176a7d9876363097c2d14fee6dd324f3a1ab - languageName: node - linkType: hard - -"is-primitive@npm:^2.0.0": - version: 2.0.0 - resolution: "is-primitive@npm:2.0.0" - checksum: 10/4d63fe952e31a4bc1d1a65d72f8485f5952407dce8d1cd8d8f070586936ea9ae2df79e0a83956b224aa7776cbbf5767eba3277f28119c36a616b20a439f057c0 - languageName: node - linkType: hard - -"is-promise@npm:^2.1.0": - version: 2.2.2 - resolution: "is-promise@npm:2.2.2" - checksum: 10/18bf7d1c59953e0ad82a1ed963fb3dc0d135c8f299a14f89a17af312fc918373136e56028e8831700e1933519630cc2fd4179a777030330fde20d34e96f40c78 - languageName: node - linkType: hard - -"is-property@npm:^1.0.0, is-property@npm:^1.0.2": - version: 1.0.2 - resolution: "is-property@npm:1.0.2" - checksum: 10/2f66eacb3d7237ba5c725496672edec656a20b12c80790921988578e6b11c258a062ce1e602f3cd2e3c2e05dd8b6e24e1d59254375207f157424a02ef0abb3d7 - languageName: node - linkType: hard - -"is-regex@npm:^1.1.4": - version: 1.1.4 - resolution: "is-regex@npm:1.1.4" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10/36d9174d16d520b489a5e9001d7d8d8624103b387be300c50f860d9414556d0485d74a612fdafc6ebbd5c89213d947dcc6b6bff6b2312093f71ea03cbb19e564 - languageName: node - linkType: hard - -"is-regexp@npm:^1.0.0": - version: 1.0.0 - resolution: "is-regexp@npm:1.0.0" - checksum: 10/be692828e24cba479ec33644326fa98959ec68ba77965e0291088c1a741feaea4919d79f8031708f85fd25e39de002b4520622b55460660b9c369e6f7187faef - languageName: node - linkType: hard - -"is-relative-path@npm:^1.0.2": - version: 1.0.2 - resolution: "is-relative-path@npm:1.0.2" - checksum: 10/6c2ccffd3c0a3e3990535d0571370883d558b825b51940085f3446ec338857f4552f44521dfec3e83b7e067de08c0b0369de290208a91200bcae2c569533e340 - languageName: node - linkType: hard - -"is-resolvable@npm:^1.0.0": - version: 1.1.0 - resolution: "is-resolvable@npm:1.1.0" - checksum: 10/2ddff983be0cabc2c8d60246365755f8fb322f5fb9db834740d3e694c635c1b74c1bd674cf221e072fc4bd911ef3f08f2247d390e476f7e80af9092443193c68 - languageName: node - linkType: hard - -"is-retry-allowed@npm:^1.0.0": - version: 1.2.0 - resolution: "is-retry-allowed@npm:1.2.0" - checksum: 10/50d700a89ae31926b1c91b3eb0104dbceeac8790d8b80d02f5c76d9a75c2056f1bb24b5268a8a018dead606bddf116b2262e5ac07401eb8b8783b266ed22558d - languageName: node - linkType: hard - -"is-root@npm:^2.1.0": - version: 2.1.0 - resolution: "is-root@npm:2.1.0" - checksum: 10/37eea0822a2a9123feb58a9d101558ba276771a6d830f87005683349a9acff15958a9ca590a44e778c6b335660b83e85c744789080d734f6081a935a4880aee2 - languageName: node - linkType: hard - -"is-set@npm:^2.0.1, is-set@npm:^2.0.2": - version: 2.0.2 - resolution: "is-set@npm:2.0.2" - checksum: 10/d89e82acdc7760993474f529e043f9c4a1d63ed4774d21cc2e331d0e401e5c91c27743cd7c889137028f6a742234759a4bd602368fbdbf0b0321994aefd5603f - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.1": - version: 1.0.1 - resolution: "is-shared-array-buffer@npm:1.0.1" - checksum: 10/ddb03381c5b6a468ddfbe0340506b3a18abc3525b4695f06683261d8febb5b69a51dc277f6835d440f765432fd5e666fbbfaae91051adc77b74babadcdb755d4 - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "is-shared-array-buffer@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10/23d82259d6cd6dbb7c4ff3e4efeff0c30dbc6b7f88698498c17f9821cb3278d17d2b6303a5341cbd638ab925a28f3f086a6c79b3df70ac986cc526c725d43b4f - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.3": - version: 1.0.3 - resolution: "is-shared-array-buffer@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.7" - checksum: 10/bc5402900dc62b96ebb2548bf5b0a0bcfacc2db122236fe3ab3b3e3c884293a0d5eb777e73f059bcbf8dc8563bb65eae972fee0fb97e38a9ae27c8678f62bcfe - languageName: node - linkType: hard - -"is-ssh@npm:^1.4.0": - version: 1.4.0 - resolution: "is-ssh@npm:1.4.0" - dependencies: - protocols: "npm:^2.0.1" - checksum: 10/e2d17d74a19b4368cc06ce5c76d4f625952442da337098d670a9840e1db5334c646aa0a6ed3a01e9d396901e22c755174ce64e74c3139bb10e5df03d5a6fb3fa - languageName: node - linkType: hard - -"is-stream@npm:^1.0.0, is-stream@npm:^1.1.0": - version: 1.1.0 - resolution: "is-stream@npm:1.1.0" - checksum: 10/351aa77c543323c4e111204482808cfad68d2e940515949e31ccd0b010fc13d5fba4b9c230e4887fd24284713040f43e542332fbf172f6b9944b7d62e389c0ec - languageName: node - linkType: hard - -"is-stream@npm:^2.0.0": - version: 2.0.1 - resolution: "is-stream@npm:2.0.1" - checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 - languageName: node - linkType: hard - -"is-stream@npm:^3.0.0": - version: 3.0.0 - resolution: "is-stream@npm:3.0.0" - checksum: 10/172093fe99119ffd07611ab6d1bcccfe8bc4aa80d864b15f43e63e54b7abc71e779acd69afdb854c4e2a67fdc16ae710e370eda40088d1cfc956a50ed82d8f16 - languageName: node - linkType: hard - -"is-stream@npm:^4.0.1": - version: 4.0.1 - resolution: "is-stream@npm:4.0.1" - checksum: 10/cbea3f1fc271b21ceb228819d0c12a0965a02b57f39423925f99530b4eb86935235f258f06310b67cd02b2d10b49e9a0998f5ececf110ab7d3760bae4055ad23 - languageName: node - linkType: hard - -"is-string@npm:^1.0.5, is-string@npm:^1.0.7": - version: 1.0.7 - resolution: "is-string@npm:1.0.7" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10/2bc292fe927493fb6dfc3338c099c3efdc41f635727c6ebccf704aeb2a27bca7acb9ce6fd34d103db78692b10b22111a8891de26e12bfa1c5e11e263c99d1fef - languageName: node - linkType: hard - -"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": - version: 1.0.4 - resolution: "is-symbol@npm:1.0.4" - dependencies: - has-symbols: "npm:^1.0.2" - checksum: 10/a47dd899a84322528b71318a89db25c7ecdec73197182dad291df15ffea501e17e3c92c8de0bfb50e63402747399981a687b31c519971b1fa1a27413612be929 - languageName: node - linkType: hard - -"is-text-path@npm:^1.0.1": - version: 1.0.1 - resolution: "is-text-path@npm:1.0.1" - dependencies: - text-extensions: "npm:^1.0.0" - checksum: 10/fb5d78752c22b3f73a7c9540768f765ffcfa38c9e421e2b9af869565307fa1ae5e3d3a2ba016a43549742856846566d327da406e94a5846ec838a288b1704fd2 - languageName: node - linkType: hard - -"is-text-path@npm:^2.0.0": - version: 2.0.0 - resolution: "is-text-path@npm:2.0.0" - dependencies: - text-extensions: "npm:^2.0.0" - checksum: 10/e26ade26a6aa6b26c3f00c913871c3c1ceb5a2a5ca4380aac3f0e092b151ad8e2ce4cee1060fb7a13a5684fa55ce62c9df04fa7723b180c82a34ae4c0fa34adb - languageName: node - linkType: hard - -"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.9": - version: 1.1.10 - resolution: "is-typed-array@npm:1.1.10" - dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.0" - checksum: 10/2392b2473bbc994f5c30d6848e32bab3cab6c80b795aaec3020baf5419ff7df38fc11b3a043eb56d50f842394c578dbb204a7a29398099f895cf111c5b27f327 - languageName: node - linkType: hard - -"is-typed-array@npm:^1.1.13": - version: 1.1.13 - resolution: "is-typed-array@npm:1.1.13" - dependencies: - which-typed-array: "npm:^1.1.14" - checksum: 10/f850ba08286358b9a11aee6d93d371a45e3c59b5953549ee1c1a9a55ba5c1dd1bd9952488ae194ad8f32a9cf5e79c8fa5f0cc4d78c00720aa0bbcf238b38062d - languageName: node - linkType: hard - -"is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.7": - version: 1.1.8 - resolution: "is-typed-array@npm:1.1.8" - dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - es-abstract: "npm:^1.18.5" - foreach: "npm:^2.0.5" - has-tostringtag: "npm:^1.0.0" - checksum: 10/3b7d1a365dea95cfbd1b3822261b9b399b76d3170e94b8d1c65e5aa2dc53a965086030b31488ad06e62898e7afef7057e93f710ac62fdb0655efef97cd88e48e - languageName: node - linkType: hard - -"is-typedarray@npm:^1.0.0, is-typedarray@npm:~1.0.0": - version: 1.0.0 - resolution: "is-typedarray@npm:1.0.0" - checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c - languageName: node - linkType: hard - -"is-unicode-supported@npm:^0.1.0": - version: 0.1.0 - resolution: "is-unicode-supported@npm:0.1.0" - checksum: 10/a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 - languageName: node - linkType: hard - -"is-upper-case@npm:^1.1.0": - version: 1.1.2 - resolution: "is-upper-case@npm:1.1.2" - dependencies: - upper-case: "npm:^1.1.0" - checksum: 10/c85805dfb9c5465f1db2492ce0feddd9273398a6dc0250b4d866f9bd23dbd92d0e2b57f4560ab195b2695b8403ff989265cf637f34b7443b706e0cd4d482b5ee - languageName: node - linkType: hard - -"is-url-superb@npm:^4.0.0": - version: 4.0.0 - resolution: "is-url-superb@npm:4.0.0" - checksum: 10/fd55e91c96349acb0d688f95fcb1ac67450e5db934976e3a8ff13ef446841e779a6f4d18b15f02331f05a3429c8fdaba2382ac1ab444059e86e9ffcde1ec8db0 - languageName: node - linkType: hard - -"is-url@npm:^1.2.4": - version: 1.2.4 - resolution: "is-url@npm:1.2.4" - checksum: 10/100e74b3b1feab87a43ef7653736e88d997eb7bd32e71fd3ebc413e58c1cbe56269699c776aaea84244b0567f2a7d68dfaa512a062293ed2f9fdecb394148432 - languageName: node - linkType: hard - -"is-utf8@npm:^0.2.0": - version: 0.2.1 - resolution: "is-utf8@npm:0.2.1" - checksum: 10/167ccd2be869fc228cc62c1a28df4b78c6b5485d15a29027d3b5dceb09b383e86a3522008b56dcac14b592b22f0a224388718c2505027a994fd8471465de54b3 - languageName: node - linkType: hard - -"is-weakmap@npm:^2.0.1": - version: 2.0.1 - resolution: "is-weakmap@npm:2.0.1" - checksum: 10/289fa4e8ba1bdda40ca78481266f6925b7c46a85599e6a41a77010bf91e5a24dfb660db96863bbf655ecdbda0ab517204d6a4e0c151dbec9d022c556321f3776 - languageName: node - linkType: hard - -"is-weakref@npm:^1.0.1, is-weakref@npm:^1.0.2": - version: 1.0.2 - resolution: "is-weakref@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10/0023fd0e4bdf9c338438ffbe1eed7ebbbff7e7e18fb7cdc227caaf9d4bd024a2dcdf6a8c9f40c92192022eac8391243bb9e66cccebecbf6fe1d8a366108f8513 - languageName: node - linkType: hard - -"is-weakset@npm:^2.0.1": - version: 2.0.2 - resolution: "is-weakset@npm:2.0.2" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.1" - checksum: 10/8f2ddb9639716fd7936784e175ea1183c5c4c05274c34f34f6a53175313cb1c9c35a8b795623306995e2f7cc8f25aa46302f15a2113e51c5052d447be427195c - languageName: node - linkType: hard - -"is-what@npm:^3.14.1": - version: 3.14.1 - resolution: "is-what@npm:3.14.1" - checksum: 10/249beb4a8c1729c80ed24fa8527835301c8c70d2fa99706a301224576e0650df61edd7a0a8853999bf5fbe2c551f07148d2c3535260772e05a4c373d3d5362e1 - languageName: node - linkType: hard - -"is-windows@npm:^1.0.1, is-windows@npm:^1.0.2": - version: 1.0.2 - resolution: "is-windows@npm:1.0.2" - checksum: 10/438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 - languageName: node - linkType: hard - -"is-wsl@npm:^2.2.0": - version: 2.2.0 - resolution: "is-wsl@npm:2.2.0" - dependencies: - is-docker: "npm:^2.0.0" - checksum: 10/20849846ae414997d290b75e16868e5261e86ff5047f104027026fd61d8b5a9b0b3ade16239f35e1a067b3c7cc02f70183cb661010ed16f4b6c7c93dad1b19d8 - languageName: node - linkType: hard - -"is-yarn-global@npm:^0.3.0": - version: 0.3.0 - resolution: "is-yarn-global@npm:0.3.0" - checksum: 10/bca013d65fee2862024c9fbb3ba13720ffca2fe750095174c1c80922fdda16402b5c233f5ac9e265bc12ecb5446e7b7f519a32d9541788f01d4d44e24d2bf481 - languageName: node - linkType: hard - -"is@npm:~0.2.6": - version: 0.2.7 - resolution: "is@npm:0.2.7" - checksum: 10/98b685a8b19e5418dd2d518127b0e846fcec586e6b9853f894121973e81d4cb7669451c050a70d47daf256f690d65a126ce405393a5e02c13ce77aed03dfe808 - languageName: node - linkType: hard - -"isarray@npm:0.0.1": - version: 0.0.1 - resolution: "isarray@npm:0.0.1" - checksum: 10/49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 - languageName: node - linkType: hard - -"isarray@npm:1.0.0, isarray@npm:^1.0.0, isarray@npm:~1.0.0": - version: 1.0.0 - resolution: "isarray@npm:1.0.0" - checksum: 10/f032df8e02dce8ec565cf2eb605ea939bdccea528dbcf565cdf92bfa2da9110461159d86a537388ef1acef8815a330642d7885b29010e8f7eac967c9993b65ab - languageName: node - linkType: hard - -"isarray@npm:^2.0.5": - version: 2.0.5 - resolution: "isarray@npm:2.0.5" - checksum: 10/1d8bc7911e13bb9f105b1b3e0b396c787a9e63046af0b8fe0ab1414488ab06b2b099b87a2d8a9e31d21c9a6fad773c7fc8b257c4880f2d957274479d28ca3414 - languageName: node - linkType: hard - -"isbuffer@npm:~0.0.0": - version: 0.0.0 - resolution: "isbuffer@npm:0.0.0" - checksum: 10/9796296d3c493974c1f71ccf3170cc8007217a19ce8b3b9dedffd32e8ccc3ac42473b572bbf1b24b86143e826ea157aead11fd1285389518abab76c7da5f50ed - languageName: node - linkType: hard - -"isexe@npm:^2.0.0": - version: 2.0.0 - resolution: "isexe@npm:2.0.0" - checksum: 10/7c9f715c03aff08f35e98b1fadae1b9267b38f0615d501824f9743f3aab99ef10e303ce7db3f186763a0b70a19de5791ebfc854ff884d5a8c4d92211f642ec92 - languageName: node - linkType: hard - -"isexe@npm:^3.1.1": - version: 3.1.1 - resolution: "isexe@npm:3.1.1" - checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e - languageName: node - linkType: hard - -"iso-url@npm:^1.1.5": - version: 1.2.1 - resolution: "iso-url@npm:1.2.1" - checksum: 10/87455fd79166c7b269df7711ea0bee896338330fb46164dd3e6d73ba09c294326ae356b60032dc3217c1455b66f57216a44b95ded8fb2c1c2f9e490396060ef9 - languageName: node - linkType: hard - -"isobject@npm:^2.0.0": - version: 2.1.0 - resolution: "isobject@npm:2.1.0" - dependencies: - isarray: "npm:1.0.0" - checksum: 10/811c6f5a866877d31f0606a88af4a45f282544de886bf29f6a34c46616a1ae2ed17076cc6bf34c0128f33eecf7e1fcaa2c82cf3770560d3e26810894e96ae79f - languageName: node - linkType: hard - -"isobject@npm:^3.0.0, isobject@npm:^3.0.1": - version: 3.0.1 - resolution: "isobject@npm:3.0.1" - checksum: 10/db85c4c970ce30693676487cca0e61da2ca34e8d4967c2e1309143ff910c207133a969f9e4ddb2dc6aba670aabce4e0e307146c310350b298e74a31f7d464703 - languageName: node - linkType: hard - -"isomorphic-webcrypto@npm:^2.3.8": - version: 2.3.8 - resolution: "isomorphic-webcrypto@npm:2.3.8" - dependencies: - "@peculiar/webcrypto": "npm:^1.0.22" - "@unimodules/core": "npm:*" - "@unimodules/react-native-adapter": "npm:*" - asmcrypto.js: "npm:^0.22.0" - b64-lite: "npm:^1.3.1" - b64u-lite: "npm:^1.0.1" - expo-random: "npm:*" - msrcrypto: "npm:^1.5.6" - react-native-securerandom: "npm:^0.1.1" - str2buf: "npm:^1.3.0" - webcrypto-shim: "npm:^0.1.4" - dependenciesMeta: - "@unimodules/core": - optional: true - "@unimodules/react-native-adapter": - optional: true - expo-random: - optional: true - react-native-securerandom: - optional: true - checksum: 10/ecd214c9b78ffbffab54d78b027fb0b099c2af214a9f9829f321485d89127f4115620b4a829d560dd5d2c8e78e08576fe7d46fb74615093ca9220b3279ff4554 - languageName: node - linkType: hard - -"isomorphic-ws@npm:^4.0.1": - version: 4.0.1 - resolution: "isomorphic-ws@npm:4.0.1" - peerDependencies: - ws: "*" - checksum: 10/d7190eadefdc28bdb93d67b5f0c603385aaf87724fa2974abb382ac1ec9756ed2cfb27065cbe76122879c2d452e2982bc4314317f3d6c737ddda6c047328771a - languageName: node - linkType: hard - -"isomorphic-ws@npm:^5.0.0": - version: 5.0.0 - resolution: "isomorphic-ws@npm:5.0.0" - peerDependencies: - ws: "*" - checksum: 10/e20eb2aee09ba96247465fda40c6d22c1153394c0144fa34fe6609f341af4c8c564f60ea3ba762335a7a9c306809349f9b863c8beedf2beea09b299834ad5398 - languageName: node - linkType: hard - -"isstream@npm:0.1.x, isstream@npm:~0.1.2": - version: 0.1.2 - resolution: "isstream@npm:0.1.2" - checksum: 10/22d9c181015226d4534a227539256897bbbcb7edd1066ca4fc4d3a06dbd976325dfdd16b3983c7d236a89f256805c1a685a772e0364e98873d3819b064ad35a1 - languageName: node - linkType: hard - -"istanbul-lib-coverage@npm:^1.2.0, istanbul-lib-coverage@npm:^1.2.1": - version: 1.2.1 - resolution: "istanbul-lib-coverage@npm:1.2.1" - checksum: 10/d22f18573e6c8b1de731a00297d1c2fe22e6b959243765f184d4441c41700c1e94111efa4160a0f22e2c7d23294ec412905e382adef12d1064e9dfbd1572606a - languageName: node - linkType: hard - -"istanbul-lib-coverage@npm:^2.0.1, istanbul-lib-coverage@npm:^2.0.5": - version: 2.0.5 - resolution: "istanbul-lib-coverage@npm:2.0.5" - checksum: 10/57b7d67dd004977e9b3b1ab9584cea06d7359cb6fa85570880e35b3db8ed04bf60ffd3a4a0067c79d7105f8b0935334315e38b9bb47f4192b5c4727659c6a575 - languageName: node - linkType: hard - -"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.0.0-alpha.1, istanbul-lib-coverage@npm:^3.2.0": - version: 3.2.0 - resolution: "istanbul-lib-coverage@npm:3.2.0" - checksum: 10/31621b84ad29339242b63d454243f558a7958ee0b5177749bacf1f74be7d95d3fd93853738ef7eebcddfaf3eab014716e51392a8dbd5aa1bdc1b15c2ebc53c24 - languageName: node - linkType: hard - -"istanbul-lib-hook@npm:^1.1.0": - version: 1.2.2 - resolution: "istanbul-lib-hook@npm:1.2.2" - dependencies: - append-transform: "npm:^0.4.0" - checksum: 10/5fdde55b0abd162acd8b53214b2fe2e6f6f8e0d9ed9d9e5d434e1e2734e18df02a17057937b4a59953ceb58aa251cbabe40ef65dbe2501f04ce679d219772204 - languageName: node - linkType: hard - -"istanbul-lib-hook@npm:^2.0.1": - version: 2.0.7 - resolution: "istanbul-lib-hook@npm:2.0.7" - dependencies: - append-transform: "npm:^1.0.0" - checksum: 10/a6a8c3a8af08e1783079aaf32bdd4459fe118eb757068efcdae20e1d86ef982080cd7350f7420aabf970736fce6c3e800b77e83fcd173ddb8e60774c43a7bbb4 - languageName: node - linkType: hard - -"istanbul-lib-hook@npm:^3.0.0": - version: 3.0.0 - resolution: "istanbul-lib-hook@npm:3.0.0" - dependencies: - append-transform: "npm:^2.0.0" - checksum: 10/512a996cce6b1b9003ba59eab42299dd1527176c01f3ceb7b16bf68f437eeab4958f9df7df0a6b258d45d5f1a2ca2a1bdb915970711e1a5d7b2de911c582f721 - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^2.1.0": - version: 2.3.2 - resolution: "istanbul-lib-instrument@npm:2.3.2" - dependencies: - "@babel/generator": "npm:7.0.0-beta.51" - "@babel/parser": "npm:7.0.0-beta.51" - "@babel/template": "npm:7.0.0-beta.51" - "@babel/traverse": "npm:7.0.0-beta.51" - "@babel/types": "npm:7.0.0-beta.51" - istanbul-lib-coverage: "npm:^2.0.1" - semver: "npm:^5.5.0" - checksum: 10/98c15d40ae05e55a74e53d17c045f603c8c627fc6e9a2334546f400785ed8284dd5ce831262abdd524e6e3838becdf84f8f41786087912ed373f2ab8170c9dd7 - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^3.0.0": - version: 3.3.0 - resolution: "istanbul-lib-instrument@npm:3.3.0" - dependencies: - "@babel/generator": "npm:^7.4.0" - "@babel/parser": "npm:^7.4.3" - "@babel/template": "npm:^7.4.0" - "@babel/traverse": "npm:^7.4.3" - "@babel/types": "npm:^7.4.0" - istanbul-lib-coverage: "npm:^2.0.5" - semver: "npm:^6.0.0" - checksum: 10/6e5d7347ded2d50a0c86b15177ec35f3e6e5dc8ccb9b885dccd3640b5983b76c364ae04ff7b2e953dbd53fa2301d60c4b8061ddcb53d962beb3b425467fb7558 - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^4.0.0": - version: 4.0.3 - resolution: "istanbul-lib-instrument@npm:4.0.3" - dependencies: - "@babel/core": "npm:^7.7.5" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-coverage: "npm:^3.0.0" - semver: "npm:^6.3.0" - checksum: 10/6e04ab365b95644ec4954b645f901be90be8ad81233d6df536300cdafcf70dd1ed22a912ceda38b32053c7fc9830c44cd23550c603f493329a8532073d1d6c42 - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^5.0.4, istanbul-lib-instrument@npm:^5.1.0": - version: 5.1.0 - resolution: "istanbul-lib-instrument@npm:5.1.0" - dependencies: - "@babel/core": "npm:^7.12.3" - "@babel/parser": "npm:^7.14.7" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-coverage: "npm:^3.2.0" - semver: "npm:^6.3.0" - checksum: 10/7447ba3f8049f331d5b4a1c450183e88c2fdad044149ad0d9830f71bc8da90d841c393b830bc33237ae75122c3b0e03ca845701873d6c51690bc25caa1f13a94 - languageName: node - linkType: hard - -"istanbul-lib-processinfo@npm:^2.0.2": - version: 2.0.2 - resolution: "istanbul-lib-processinfo@npm:2.0.2" - dependencies: - archy: "npm:^1.0.0" - cross-spawn: "npm:^7.0.0" - istanbul-lib-coverage: "npm:^3.0.0-alpha.1" - make-dir: "npm:^3.0.0" - p-map: "npm:^3.0.0" - rimraf: "npm:^3.0.0" - uuid: "npm:^3.3.3" - checksum: 10/40efb26ea9d96a4c7571a70cf657ff7dc3e9fde3863020c3086c482bd8851320b127cc0a7e80e403a70e26b2b88579b007ca1a15af6ed351db6d4ec63fc2792d - languageName: node - linkType: hard - -"istanbul-lib-processinfo@npm:^2.0.3": - version: 2.0.3 - resolution: "istanbul-lib-processinfo@npm:2.0.3" - dependencies: - archy: "npm:^1.0.0" - cross-spawn: "npm:^7.0.3" - istanbul-lib-coverage: "npm:^3.2.0" - p-map: "npm:^3.0.0" - rimraf: "npm:^3.0.0" - uuid: "npm:^8.3.2" - checksum: 10/60e7b3441687249460f34a817c7204967b07830a69b6e430e60a45615319c2ab4e2b2eaeb8b3decf549fccd419cd600d21173961632229967608d7d1b194f39e - languageName: node - linkType: hard - -"istanbul-lib-report@npm:^1.1.3": - version: 1.1.5 - resolution: "istanbul-lib-report@npm:1.1.5" - dependencies: - istanbul-lib-coverage: "npm:^1.2.1" - mkdirp: "npm:^0.5.1" - path-parse: "npm:^1.0.5" - supports-color: "npm:^3.1.2" - checksum: 10/0063ef8af0ca4a4bee69d9b0e5b40cc219a6b5faee39aa5b824725a2e2ccb6a41f376767b69dbf00d275916b6371c32a0a9ecb94812a9663d23f973a6147073d - languageName: node - linkType: hard - -"istanbul-lib-report@npm:^2.0.2": - version: 2.0.8 - resolution: "istanbul-lib-report@npm:2.0.8" - dependencies: - istanbul-lib-coverage: "npm:^2.0.5" - make-dir: "npm:^2.1.0" - supports-color: "npm:^6.1.0" - checksum: 10/acd9f662c56784c84faa117605e49955caa92fb8ccd3c15031390b2b801c909eb640ab51d3bb6befdca84290dda5039de2308dc2618c32ecdbe5e1ee8183de75 - languageName: node - linkType: hard - -"istanbul-lib-report@npm:^3.0.0": - version: 3.0.0 - resolution: "istanbul-lib-report@npm:3.0.0" - dependencies: - istanbul-lib-coverage: "npm:^3.0.0" - make-dir: "npm:^3.0.0" - supports-color: "npm:^7.1.0" - checksum: 10/06b37952e9cb0fe419a37c7f3d74612a098167a9eb0e5264228036e78b42ca5226501e8130738b5306d94bae2ea068ca674080d4af959992523d84aacff67728 - languageName: node - linkType: hard - -"istanbul-lib-source-maps@npm:^1.2.5": - version: 1.2.6 - resolution: "istanbul-lib-source-maps@npm:1.2.6" - dependencies: - debug: "npm:^3.1.0" - istanbul-lib-coverage: "npm:^1.2.1" - mkdirp: "npm:^0.5.1" - rimraf: "npm:^2.6.1" - source-map: "npm:^0.5.3" - checksum: 10/c3db201497e7345e9ce9cb59b076253b506a56d18842228e033ccbf793c6438cd34b3331465be220addf4b74789b70421926f7495a85b6ff94177c6917a4810d - languageName: node - linkType: hard - -"istanbul-lib-source-maps@npm:^2.0.1": - version: 2.0.1 - resolution: "istanbul-lib-source-maps@npm:2.0.1" - dependencies: - debug: "npm:^3.1.0" - istanbul-lib-coverage: "npm:^2.0.1" - make-dir: "npm:^1.3.0" - rimraf: "npm:^2.6.2" - source-map: "npm:^0.6.1" - checksum: 10/f53e0d7c24e9e454e08ecc02b3ec84f580b4dea92897827ae1873b057acd9580756d002063b035564141eadda673e1f6a33a38daa67018777c1c83742c33caad - languageName: node - linkType: hard - -"istanbul-lib-source-maps@npm:^4.0.0": - version: 4.0.1 - resolution: "istanbul-lib-source-maps@npm:4.0.1" - dependencies: - debug: "npm:^4.1.1" - istanbul-lib-coverage: "npm:^3.0.0" - source-map: "npm:^0.6.1" - checksum: 10/5526983462799aced011d776af166e350191b816821ea7bcf71cab3e5272657b062c47dc30697a22a43656e3ced78893a42de677f9ccf276a28c913190953b82 - languageName: node - linkType: hard - -"istanbul-reports@npm:^1.4.1": - version: 1.5.1 - resolution: "istanbul-reports@npm:1.5.1" - dependencies: - handlebars: "npm:^4.0.3" - checksum: 10/4f97372bf38c2158a18b231665728b2aec15bb8852e290e9b1d2fa91314dc80eef7fb9fa3ec864329deefd6b11f66354d7632e0ca6bc4ce46d3bd5fba8c5d9d2 - languageName: node - linkType: hard - -"istanbul-reports@npm:^2.0.1": - version: 2.2.7 - resolution: "istanbul-reports@npm:2.2.7" - dependencies: - html-escaper: "npm:^2.0.0" - checksum: 10/10e6822d676511fc65a79d506e2267ecb52fe2623c5e628bb09b0df0225f2b6121046683329fbd5eee26988f43f8390771a29440afa1dd35c3ebc8f32894b24e - languageName: node - linkType: hard - -"istanbul-reports@npm:^3.0.2, istanbul-reports@npm:^3.1.3": - version: 3.1.4 - resolution: "istanbul-reports@npm:3.1.4" - dependencies: - html-escaper: "npm:^2.0.0" - istanbul-lib-report: "npm:^3.0.0" - checksum: 10/b720f7ff87a37e1500e001913e781395b96cc6ca4d475e01da2ec78d1571435ded4b1b31fb53ef8d760bc5fa691b2b6b647bcb4c1238f6aaf58b261d47510c93 - languageName: node - linkType: hard - -"isurl@npm:^1.0.0-alpha5": - version: 1.0.0 - resolution: "isurl@npm:1.0.0" - dependencies: - has-to-string-tag-x: "npm:^1.2.0" - is-object: "npm:^1.0.1" - checksum: 10/28a96e019269d57015fa5869f19dda5a3ed1f7b21e3e0c4ff695419bd0541547db352aa32ee4a3659e811a177b0e37a5bc1a036731e71939dd16b59808ab92bd - languageName: node - linkType: hard - -"it-all@npm:^1.0.4": - version: 1.0.6 - resolution: "it-all@npm:1.0.6" - checksum: 10/7ca9a528c08ebe2fc8a3c93a41409219d18325ed31fedb9834ebac2822f0b2a96d7abcb6cbfa092114ab4d5f08951e694c7a2c3929ce4b5300769e710ae665db - languageName: node - linkType: hard - -"it-all@npm:^2.0.0": - version: 2.0.1 - resolution: "it-all@npm:2.0.1" - checksum: 10/596a27c68f9b24b7288c4055d76514812a642e56b8b19fe7151c565399f55bec993c31fe5010cf49e5dc01ef77c529f27f89eb5dbd30ea9231e46d994d7395a6 - languageName: node - linkType: hard - -"it-first@npm:^2.0.0": - version: 2.0.1 - resolution: "it-first@npm:2.0.1" - checksum: 10/c46df491c4c9dfb74bc61bc34b472bb0f49c23a3498b818c5e56397f40b9602ebac367125bcdbe81d390f2bf105df3f2cfd7c17c1708230d6e917801b8b234d1 - languageName: node - linkType: hard - -"it-glob@npm:^1.0.1": - version: 1.0.2 - resolution: "it-glob@npm:1.0.2" - dependencies: - "@types/minimatch": "npm:^3.0.4" - minimatch: "npm:^3.0.4" - checksum: 10/629e7b66510006041df98882acfd73ac785836d51fc3ffa5c83c7099f931b3287a64c5a3772e7c1e46b63f1d511a9222f5b637c50f1c738222b46d104ff2e91c - languageName: node - linkType: hard - -"it-last@npm:^2.0.0": - version: 2.0.1 - resolution: "it-last@npm:2.0.1" - checksum: 10/f50b92c01ee6795b6b1d062367964fba18be4394e41b73dd17d7b3d0b9810d1b11a022cb31ff9515cc32ae25e15b95c7c4846a0adb72744202f7252c536e5caa - languageName: node - linkType: hard - -"it-map@npm:^2.0.0": - version: 2.0.1 - resolution: "it-map@npm:2.0.1" - checksum: 10/5a7bea0c2b6097e415560b23612b44d4df3c8b66e8bd9b6f3c28b2ef18a5f7e03d56739670213630db415acb42619c536e6e377f56baa59ac90045fe4104df81 - languageName: node - linkType: hard - -"it-peekable@npm:^2.0.0": - version: 2.0.1 - resolution: "it-peekable@npm:2.0.1" - checksum: 10/0edce239aa1cd1a7caf8243dab21f206b7dc4f1467f8f057dd90ebd885013ac38b8b8d65fd71246e3c2a9bdf7ec32d2b92d0732fd6c08610ec0ad5903d617bd2 - languageName: node - linkType: hard - -"it-pushable@npm:^3.0.0, it-pushable@npm:^3.2.0": - version: 3.2.1 - resolution: "it-pushable@npm:3.2.1" - dependencies: - p-defer: "npm:^4.0.0" - checksum: 10/ec94087c5e5823695ade9b02ae0982c32331e71d00b8c3405843e9fec104e47b70dfae78d1e8e25ecea00316f1e4c0d144bbcf37fe84689a0203f4a612965b8c - languageName: node - linkType: hard - -"it-stream-types@npm:^1.0.4": - version: 1.0.5 - resolution: "it-stream-types@npm:1.0.5" - checksum: 10/b38d5261a6571c4f119137dc96e484595b79b5e755489f851b79d330e9030bfe5ec410694332ab52963e6eff29f46fe5c8a18df4444dc1b1d3514e977f1b2a19 - languageName: node - linkType: hard - -"it-stream-types@npm:^2.0.1": - version: 2.0.1 - resolution: "it-stream-types@npm:2.0.1" - checksum: 10/06193e2f7c7a9e9c1cea430884e24fd769670c2ddc897bf7a3e424bd048fa1f8da280ee3c1c404fdab5667f434002b2f45d5ff5cebdccbc41ca1516a0ae11907 - languageName: node - linkType: hard - -"it-to-stream@npm:^1.0.0": - version: 1.0.0 - resolution: "it-to-stream@npm:1.0.0" - dependencies: - buffer: "npm:^6.0.3" - fast-fifo: "npm:^1.0.0" - get-iterator: "npm:^1.0.2" - p-defer: "npm:^3.0.0" - p-fifo: "npm:^1.0.0" - readable-stream: "npm:^3.6.0" - checksum: 10/c947bedf25c21b27a7d3bf299aa7072f3ea9c4a4bfe2e8586428ae8760cfe3d37339445c48184436ba71e23bee03d5692a8420a0f7f0537cb118104cd54d2aaa - languageName: node - linkType: hard - -"iterare@npm:1.2.1": - version: 1.2.1 - resolution: "iterare@npm:1.2.1" - checksum: 10/ee8322dd9d92e86d8653c899df501c58c5b8e90d6767cf2af0b6d6dc5a4b9b7ed8bce936976f4f4c3a55be110a300c8a7d71967d03f72e104e8db66befcfd874 - languageName: node - linkType: hard - -"iterator.prototype@npm:^1.1.2": - version: 1.1.2 - resolution: "iterator.prototype@npm:1.1.2" - dependencies: - define-properties: "npm:^1.2.1" - get-intrinsic: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - reflect.getprototypeof: "npm:^1.0.4" - set-function-name: "npm:^2.0.1" - checksum: 10/b5013967ad8f28c9ca1be8e159eb10f591b8e46deae87476fe39d668c04374fe9158c815e8b6d2f45885b0a3fd842a8ba13f497ec762b3a0eff49bec278670b1 - languageName: node - linkType: hard - -"jackspeak@npm:^1.4.2": - version: 1.4.2 - resolution: "jackspeak@npm:1.4.2" - dependencies: - cliui: "npm:^7.0.4" - checksum: 10/dfb6a116615bc16190c3dd091733e5c2341860b30665239ce602f799ef4d756b7960a295d4e194ffad8eb0eff2445fcca89875a8605c23c0077c64c8f050f144 - languageName: node - linkType: hard - -"jackspeak@npm:^2.0.3": - version: 2.3.3 - resolution: "jackspeak@npm:2.3.3" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10/a4c7c1a3ffea90bbcaa2f7a0d2885861e94138982aef0ced8efd299b32ccb69645b49d27f5e3e81c57005002674dd7e2b5d08a4287e9110534e512ada53557b2 - languageName: node - linkType: hard - -"jackspeak@npm:^2.3.5": - version: 2.3.6 - resolution: "jackspeak@npm:2.3.6" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10/6e6490d676af8c94a7b5b29b8fd5629f21346911ebe2e32931c2a54210134408171c24cee1a109df2ec19894ad04a429402a8438cbf5cc2794585d35428ace76 - languageName: node - linkType: hard - -"jackspeak@npm:^3.1.2": - version: 3.4.0 - resolution: "jackspeak@npm:3.4.0" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10/5032c43c0c1fb92e72846ce496df559214253bc6870c90399cbd7858571c53169d9494b7c152df04abcb75f2fb5e9cffe65651c67d573380adf3a482b150d84b - languageName: node - linkType: hard - -"jake@npm:^10.8.5": - version: 10.8.7 - resolution: "jake@npm:10.8.7" - dependencies: - async: "npm:^3.2.3" - chalk: "npm:^4.0.2" - filelist: "npm:^1.0.4" - minimatch: "npm:^3.1.2" - bin: - jake: bin/cli.js - checksum: 10/ad1cfe398836df4e6962954e5095597c21c5af1ea5a4182f6adf0869df8aca467a2eeca7869bf44f47120f4dd4ea52589d16050d295c87a5906c0d744775acc3 - languageName: node - linkType: hard - -"jest-changed-files@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-changed-files@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - execa: "npm:^5.0.0" - throat: "npm:^6.0.1" - checksum: 10/fad21687f899e527bc23b3cabda1b1fa74acb8e17e81bca4d6ca10ab83ebf1d7555f38ba66dda148f97c45b816f941aa4694a09ed0d16a4d7fe3216abf1a222f - languageName: node - linkType: hard - -"jest-changed-files@npm:^29.5.0": - version: 29.5.0 - resolution: "jest-changed-files@npm:29.5.0" - dependencies: - execa: "npm:^5.0.0" - p-limit: "npm:^3.1.0" - checksum: 10/6e337b09dca173dc60d53a1c880817ef31f91c6ddc23d93fabb7e714d4388857332c76e7a7fc627bf150e3fba0b70ba968912f86934bd176ca0dc66883303122 - languageName: node - linkType: hard - -"jest-circus@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-circus@npm:27.5.1" - dependencies: - "@jest/environment": "npm:^27.5.1" - "@jest/test-result": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - co: "npm:^4.6.0" - dedent: "npm:^0.7.0" - expect: "npm:^27.5.1" - is-generator-fn: "npm:^2.0.0" - jest-each: "npm:^27.5.1" - jest-matcher-utils: "npm:^27.5.1" - jest-message-util: "npm:^27.5.1" - jest-runtime: "npm:^27.5.1" - jest-snapshot: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - pretty-format: "npm:^27.5.1" - slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - throat: "npm:^6.0.1" - checksum: 10/cf8502d2c7669a89d6d9c309842a6bae1b336335f9a108b0ba3d555dcc635c6cc119d28627a5df455215a8bb04bdcdf18b1fee3441aca39c78c8b10053cd33f7 - languageName: node - linkType: hard - -"jest-circus@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-circus@npm:29.6.2" - dependencies: - "@jest/environment": "npm:^29.6.2" - "@jest/expect": "npm:^29.6.2" - "@jest/test-result": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - co: "npm:^4.6.0" - dedent: "npm:^1.0.0" - is-generator-fn: "npm:^2.0.0" - jest-each: "npm:^29.6.2" - jest-matcher-utils: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-runtime: "npm:^29.6.2" - jest-snapshot: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - p-limit: "npm:^3.1.0" - pretty-format: "npm:^29.6.2" - pure-rand: "npm:^6.0.0" - slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - checksum: 10/985034d5182adba11cfb667db9f0264c305cdfc9e7a61a42fb35ad981ce4d8b8499751e0af682e170b143e112827503fa15eea90d87129fb27940c9483b5ced1 - languageName: node - linkType: hard - -"jest-cli@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-cli@npm:27.5.1" - dependencies: - "@jest/core": "npm:^27.5.1" - "@jest/test-result": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - chalk: "npm:^4.0.0" - exit: "npm:^0.1.2" - graceful-fs: "npm:^4.2.9" - import-local: "npm:^3.0.2" - jest-config: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - jest-validate: "npm:^27.5.1" - prompts: "npm:^2.0.1" - yargs: "npm:^16.2.0" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - bin: - jest: bin/jest.js - checksum: 10/527be160786a14f541b3f75e6241da1bd9ba51894fc9f2ba6466dba7f6ffd3a03de02b40d172ad1d29edc725847f7dd4f6dbf71d304d2364b075ec81c9a53224 - languageName: node - linkType: hard - -"jest-cli@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-cli@npm:29.6.2" - dependencies: - "@jest/core": "npm:^29.6.2" - "@jest/test-result": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - chalk: "npm:^4.0.0" - exit: "npm:^0.1.2" - graceful-fs: "npm:^4.2.9" - import-local: "npm:^3.0.2" - jest-config: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - jest-validate: "npm:^29.6.2" - prompts: "npm:^2.0.1" - yargs: "npm:^17.3.1" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - bin: - jest: bin/jest.js - checksum: 10/64393941163b1f8969fe7eb91d4d2c209880d709c446fc4c9ae9d69c50553eb83fe50e7a18967587dc324eb0168ee7fbe330115c902cc2a37aac0fb214317a23 - languageName: node - linkType: hard - -"jest-config@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-config@npm:27.5.1" - dependencies: - "@babel/core": "npm:^7.8.0" - "@jest/test-sequencer": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - babel-jest: "npm:^27.5.1" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - deepmerge: "npm:^4.2.2" - glob: "npm:^7.1.1" - graceful-fs: "npm:^4.2.9" - jest-circus: "npm:^27.5.1" - jest-environment-jsdom: "npm:^27.5.1" - jest-environment-node: "npm:^27.5.1" - jest-get-type: "npm:^27.5.1" - jest-jasmine2: "npm:^27.5.1" - jest-regex-util: "npm:^27.5.1" - jest-resolve: "npm:^27.5.1" - jest-runner: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - jest-validate: "npm:^27.5.1" - micromatch: "npm:^4.0.4" - parse-json: "npm:^5.2.0" - pretty-format: "npm:^27.5.1" - slash: "npm:^3.0.0" - strip-json-comments: "npm:^3.1.1" - peerDependencies: - ts-node: ">=9.0.0" - peerDependenciesMeta: - ts-node: - optional: true - checksum: 10/63bc2dce50289ff921debedab766daa5122129671c77a9f4137d153a27b29ef77725db15d4809553b687c83495cd7ffefc8eadfd8dfa940d7ea878de57f428c2 - languageName: node - linkType: hard - -"jest-config@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-config@npm:29.6.2" - dependencies: - "@babel/core": "npm:^7.11.6" - "@jest/test-sequencer": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - babel-jest: "npm:^29.6.2" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - deepmerge: "npm:^4.2.2" - glob: "npm:^7.1.3" - graceful-fs: "npm:^4.2.9" - jest-circus: "npm:^29.6.2" - jest-environment-node: "npm:^29.6.2" - jest-get-type: "npm:^29.4.3" - jest-regex-util: "npm:^29.4.3" - jest-resolve: "npm:^29.6.2" - jest-runner: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - jest-validate: "npm:^29.6.2" - micromatch: "npm:^4.0.4" - parse-json: "npm:^5.2.0" - pretty-format: "npm:^29.6.2" - slash: "npm:^3.0.0" - strip-json-comments: "npm:^3.1.1" - peerDependencies: - "@types/node": "*" - ts-node: ">=9.0.0" - peerDependenciesMeta: - "@types/node": - optional: true - ts-node: - optional: true - checksum: 10/c0cff6578c2efd2b6918568a0848e2138e122debcc81843f7ffd27a2ed761a09a9ed10f424c021a47a083e54701711c7590388a52e57d1fcaeb074db03527a01 - languageName: node - linkType: hard - -"jest-diff@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-diff@npm:27.5.1" - dependencies: - chalk: "npm:^4.0.0" - diff-sequences: "npm:^27.5.1" - jest-get-type: "npm:^27.5.1" - pretty-format: "npm:^27.5.1" - checksum: 10/af454f30f33af625832bdb02614e188a41e33ce79086b43f95dbcc515274dd36bf8443b8d0299e22c2416e7591da4321e6bc7f2b0aef56471d1133c6b6833221 - languageName: node - linkType: hard - -"jest-diff@npm:^29.0.0, jest-diff@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-diff@npm:29.6.2" - dependencies: - chalk: "npm:^4.0.0" - diff-sequences: "npm:^29.4.3" - jest-get-type: "npm:^29.4.3" - pretty-format: "npm:^29.6.2" - checksum: 10/8c66d29afbb64b4cb1c0daa7c20a7838b32ec16e989f7767f7088b466bfa64d7a501b3f8592c6ab148dde19645740cb868a18b29b992eb72517842287c03144e - languageName: node - linkType: hard - -"jest-docblock@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-docblock@npm:27.5.1" - dependencies: - detect-newline: "npm:^3.0.0" - checksum: 10/65c765c5418986313685b7c49dcd844cd3bc281807a35f778d6ba479246b6ea070cdd98384582a9aed1a0d3ebf94b7fb14a33df5975aaae2eb20dc00281731f4 - languageName: node - linkType: hard - -"jest-docblock@npm:^29.4.3": - version: 29.4.3 - resolution: "jest-docblock@npm:29.4.3" - dependencies: - detect-newline: "npm:^3.0.0" - checksum: 10/fd6bb0b6c60a1d87ade37b8bd8404c64518dc42357f256eeb8cb3f313eb00c138645d602ba7c57059a3de4a6570f12ab1234cb3d2d7a9b948d9dfa255e85b1d2 - languageName: node - linkType: hard - -"jest-each@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-each@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - chalk: "npm:^4.0.0" - jest-get-type: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - pretty-format: "npm:^27.5.1" - checksum: 10/d73e3c7bbcd3a073e9fa29bd1f200bb9757cbcc568460c1d0971fc21924800f2d3e421219a85e20c54ea2a0129d2da9e2dfc266b6014244c5901f3ca2de7a99e - languageName: node - linkType: hard - -"jest-each@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-each@npm:29.6.2" - dependencies: - "@jest/types": "npm:^29.6.1" - chalk: "npm:^4.0.0" - jest-get-type: "npm:^29.4.3" - jest-util: "npm:^29.6.2" - pretty-format: "npm:^29.6.2" - checksum: 10/04c21926df07c7468d3ab1a9a6e142de1802c353f755c26e8100081bbc4fa121aa1ba8ce8d2c8770e1410dfe5172bbfad0d1f77116038c9aeabbd93e9b00a12a - languageName: node - linkType: hard - -"jest-environment-jsdom@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-environment-jsdom@npm:27.5.1" - dependencies: - "@jest/environment": "npm:^27.5.1" - "@jest/fake-timers": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - jest-mock: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - jsdom: "npm:^16.6.0" - checksum: 10/bc104aef7d7530d0740402aa84ac812138b6d1e51fe58adecce679f82b99340ddab73e5ec68fa079f33f50c9ddec9728fc9f0ddcca2ad6f0b351eed2762cc555 - languageName: node - linkType: hard - -"jest-environment-node@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-environment-node@npm:27.5.1" - dependencies: - "@jest/environment": "npm:^27.5.1" - "@jest/fake-timers": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - jest-mock: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - checksum: 10/0f988330c4f3eec092e3fb37ea753b0c6f702e83cd8f4d770af9c2bf964a70bc45fbd34ec6fdb6d71ce98a778d9f54afd673e63f222e4667fff289e8069dba39 - languageName: node - linkType: hard - -"jest-environment-node@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-environment-node@npm:29.6.2" - dependencies: - "@jest/environment": "npm:^29.6.2" - "@jest/fake-timers": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - jest-mock: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - checksum: 10/60e7a134424ced4e2a7e41b54687154cbcf5e282432968c3caedb52c269e1b4e250020ceedec383babaa31d25deee47475277100ed239cac7afbdb297f9b9af3 - languageName: node - linkType: hard - -"jest-extended@npm:4.0.1": - version: 4.0.1 - resolution: "jest-extended@npm:4.0.1" - dependencies: - jest-diff: "npm:^29.0.0" - jest-get-type: "npm:^29.0.0" - peerDependencies: - jest: ">=27.2.5" - peerDependenciesMeta: - jest: - optional: true - checksum: 10/68cd5acf86fe84ae26e34a46c88e431e2c9010582ad8be5213f6de6b3ac92365aa1267f82789a23fa9d73ef16711bebcf4a1003005e3d36e56558f2e7aa8e2a1 - languageName: node - linkType: hard - -"jest-get-type@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-get-type@npm:27.5.1" - checksum: 10/63064ab70195c21007d897c1157bf88ff94a790824a10f8c890392e7d17eda9c3900513cb291ca1c8d5722cad79169764e9a1279f7c8a9c4cd6e9109ff04bbc0 - languageName: node - linkType: hard - -"jest-get-type@npm:^29.0.0, jest-get-type@npm:^29.4.3": - version: 29.4.3 - resolution: "jest-get-type@npm:29.4.3" - checksum: 10/6ac7f2dde1c65e292e4355b6c63b3a4897d7e92cb4c8afcf6d397f2682f8080e094c8b0b68205a74d269882ec06bf696a9de6cd3e1b7333531e5ed7b112605ce - languageName: node - linkType: hard - -"jest-haste-map@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-haste-map@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - "@types/graceful-fs": "npm:^4.1.2" - "@types/node": "npm:*" - anymatch: "npm:^3.0.3" - fb-watchman: "npm:^2.0.0" - fsevents: "npm:^2.3.2" - graceful-fs: "npm:^4.2.9" - jest-regex-util: "npm:^27.5.1" - jest-serializer: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - jest-worker: "npm:^27.5.1" - micromatch: "npm:^4.0.4" - walker: "npm:^1.0.7" - dependenciesMeta: - fsevents: - optional: true - checksum: 10/cbf42e4a3d2b6fc8ad64d732c1bb8a230fe25ad3df7f9f93e8af2950691ef9a5241a9d48c5c88e365744a7467b8cb00ab21c01baee4ee0c2b62acc657782545f - languageName: node - linkType: hard - -"jest-haste-map@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-haste-map@npm:29.6.2" - dependencies: - "@jest/types": "npm:^29.6.1" - "@types/graceful-fs": "npm:^4.1.3" - "@types/node": "npm:*" - anymatch: "npm:^3.0.3" - fb-watchman: "npm:^2.0.0" - fsevents: "npm:^2.3.2" - graceful-fs: "npm:^4.2.9" - jest-regex-util: "npm:^29.4.3" - jest-util: "npm:^29.6.2" - jest-worker: "npm:^29.6.2" - micromatch: "npm:^4.0.4" - walker: "npm:^1.0.8" - dependenciesMeta: - fsevents: - optional: true - checksum: 10/855d2c94979ad0795d5ef31cc81ccf40d2c2f6abd63de34a89e8b12e6b1cf7b9ae875f7479b783b7a2e9f55502ad1d241d483c103bed85a75c2b10eaafea3634 - languageName: node - linkType: hard - -"jest-jasmine2@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-jasmine2@npm:27.5.1" - dependencies: - "@jest/environment": "npm:^27.5.1" - "@jest/source-map": "npm:^27.5.1" - "@jest/test-result": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - co: "npm:^4.6.0" - expect: "npm:^27.5.1" - is-generator-fn: "npm:^2.0.0" - jest-each: "npm:^27.5.1" - jest-matcher-utils: "npm:^27.5.1" - jest-message-util: "npm:^27.5.1" - jest-runtime: "npm:^27.5.1" - jest-snapshot: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - pretty-format: "npm:^27.5.1" - throat: "npm:^6.0.1" - checksum: 10/052d3c99c36295564a6688ae7e66cfd59997ca9589ccaaa2551d344d84699816a6b8c7bebf3a5f7bcdf691a07f7065c61f4a0770b810e5d887acd21f80a06304 - languageName: node - linkType: hard - -"jest-leak-detector@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-leak-detector@npm:27.5.1" - dependencies: - jest-get-type: "npm:^27.5.1" - pretty-format: "npm:^27.5.1" - checksum: 10/5c9689060960567ddaf16c570d87afa760a461885765d2c71ef4f4857bbc3af1482c34e3cce88e50beefde1bf35e33530b020480752057a7e3dbb1ca0bae359f - languageName: node - linkType: hard - -"jest-leak-detector@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-leak-detector@npm:29.6.2" - dependencies: - jest-get-type: "npm:^29.4.3" - pretty-format: "npm:^29.6.2" - checksum: 10/e00152acdba8aa8f9334775b77375947508051c34646fbeb702275da2b6ac6145f8cad6d5893112e76484d00fa8c0b4fd71b78ab0b4ef34950f5b6a84f37ae67 - languageName: node - linkType: hard - -"jest-matcher-utils@npm:^27.0.0, jest-matcher-utils@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-matcher-utils@npm:27.5.1" - dependencies: - chalk: "npm:^4.0.0" - jest-diff: "npm:^27.5.1" - jest-get-type: "npm:^27.5.1" - pretty-format: "npm:^27.5.1" - checksum: 10/037f99878a0515581d7728ed3aed03707810f4da5a1c7ffb9d68a2c6c3180851a6ec40b559af37fbe891dde3ba12552b19e47b8188a27b6c5a53376be6907f32 - languageName: node - linkType: hard - -"jest-matcher-utils@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-matcher-utils@npm:29.6.2" - dependencies: - chalk: "npm:^4.0.0" - jest-diff: "npm:^29.6.2" - jest-get-type: "npm:^29.4.3" - pretty-format: "npm:^29.6.2" - checksum: 10/38dc3f71620745054246fb31e1979587fb241d3a2ecea1f325dbcba6503653d7e2482c6deffa99d661b9da2f093c7713d6977fd2a6b8f57537875745049088ed - languageName: node - linkType: hard - -"jest-message-util@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-message-util@npm:27.5.1" - dependencies: - "@babel/code-frame": "npm:^7.12.13" - "@jest/types": "npm:^27.5.1" - "@types/stack-utils": "npm:^2.0.0" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - micromatch: "npm:^4.0.4" - pretty-format: "npm:^27.5.1" - slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - checksum: 10/8fbf39dc25a7ef328dab22efcb3b198cbc788e309bc93e39fdb42b5541dba201c76acf47df476a4ee3d3fc6a6898e77bfc02677c198a98af91db1af0a435ade6 - languageName: node - linkType: hard - -"jest-message-util@npm:^28.1.3": - version: 28.1.3 - resolution: "jest-message-util@npm:28.1.3" - dependencies: - "@babel/code-frame": "npm:^7.12.13" - "@jest/types": "npm:^28.1.3" - "@types/stack-utils": "npm:^2.0.0" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - micromatch: "npm:^4.0.4" - pretty-format: "npm:^28.1.3" - slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - checksum: 10/91137a507e9eb79ef6156a3d17c882a181fa662da28cc1a86245ff53ba13726653c8d5fed2660e922aae020a9caca4d22c3689bfe61a215c8a17a43e01b7eb5c - languageName: node - linkType: hard - -"jest-message-util@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-message-util@npm:29.6.2" - dependencies: - "@babel/code-frame": "npm:^7.12.13" - "@jest/types": "npm:^29.6.1" - "@types/stack-utils": "npm:^2.0.0" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - micromatch: "npm:^4.0.4" - pretty-format: "npm:^29.6.2" - slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - checksum: 10/a0e972367f12894dd0bcda2c2cd540607a6884315a411757b2e136eb54a53b54675f2e632b58a121e253bb456cfa564a9e10d5b7238b46de190095de78e445ba - languageName: node - linkType: hard - -"jest-mock@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-mock@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - checksum: 10/be9a8777801659227d3bb85317a3aca617542779a290a6a45c9addec8bda29f494a524cb4af96c82b825ecb02171e320dfbfde3e3d9218672f9e38c9fac118f4 - languageName: node - linkType: hard - -"jest-mock@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-mock@npm:29.6.2" - dependencies: - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - jest-util: "npm:^29.6.2" - checksum: 10/b2cd0e61d22d2bcbaefb167e177977e37a28176f0b54717c068b655da18679db4daa9762d478bf5a347819a89e082a68b3f1f53a4da22401521668424a6d6bac - languageName: node - linkType: hard - -"jest-pnp-resolver@npm:^1.2.2": - version: 1.2.2 - resolution: "jest-pnp-resolver@npm:1.2.2" - peerDependencies: - jest-resolve: "*" - peerDependenciesMeta: - jest-resolve: - optional: true - checksum: 10/bd85dcc0e76e0eb0c3d56382ec140f08d25ff4068cda9d0e360bb78fb176cb726d0beab82dc0e8694cafd09f55fee7622b8bcb240afa5fad301f4ed3eebb4f47 - languageName: node - linkType: hard - -"jest-regex-util@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-regex-util@npm:27.5.1" - checksum: 10/d45ca7a9543616a34f7f3079337439cf07566e677a096472baa2810e274b9808b76767c97b0a4029b8a5b82b9d256dee28ef9ad4138b2b9e5933f6fac106c418 - languageName: node - linkType: hard - -"jest-regex-util@npm:^28.0.0": - version: 28.0.2 - resolution: "jest-regex-util@npm:28.0.2" - checksum: 10/0ea8c5c82ec88bc85e273c0ec82e0c0f35f7a1e2d055070e50f0cc2a2177f848eec55f73e37ae0d045c3db5014c42b2f90ac62c1ab3fdb354d2abd66a9e08add - languageName: node - linkType: hard - -"jest-regex-util@npm:^29.4.3": - version: 29.4.3 - resolution: "jest-regex-util@npm:29.4.3" - checksum: 10/96fc7fc28cd4dd73a63c13a526202c4bd8b351d4e5b68b1a2a2c88da3308c2a16e26feaa593083eb0bac38cca1aa9dd05025412e7de013ba963fb8e66af22b8a - languageName: node - linkType: hard - -"jest-resolve-dependencies@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-resolve-dependencies@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - jest-regex-util: "npm:^27.5.1" - jest-snapshot: "npm:^27.5.1" - checksum: 10/c67af97afad1da88f5530317c732bbd1262d1225f6cd7f4e4740a5db48f90ab0bd8564738ac70d1a43934894f9aef62205c1b8f8ee89e5c7a737e6a121ee4c25 - languageName: node - linkType: hard - -"jest-resolve-dependencies@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-resolve-dependencies@npm:29.6.2" - dependencies: - jest-regex-util: "npm:^29.4.3" - jest-snapshot: "npm:^29.6.2" - checksum: 10/f66441b6f2e61c7ab6a00c42f43c42716ce7dca21a5e90bef1a442baf4c7c73445ed06c64442c1f3c933bd96e99fd754e1f9f944ff59d93fb9958270f4a00f40 - languageName: node - linkType: hard - -"jest-resolve@npm:^27.4.2, jest-resolve@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-resolve@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^27.5.1" - jest-pnp-resolver: "npm:^1.2.2" - jest-util: "npm:^27.5.1" - jest-validate: "npm:^27.5.1" - resolve: "npm:^1.20.0" - resolve.exports: "npm:^1.1.0" - slash: "npm:^3.0.0" - checksum: 10/93659a9d5ec365a9f2fd3fcaa8f799e3bd090318c48890951ca4325e863f4eb778bb7f7e8d1d8495eda4c157ee771d93fb31f37364ce1a36a09f77f1089e52a1 - languageName: node - linkType: hard - -"jest-resolve@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-resolve@npm:29.6.2" - dependencies: - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.6.2" - jest-pnp-resolver: "npm:^1.2.2" - jest-util: "npm:^29.6.2" - jest-validate: "npm:^29.6.2" - resolve: "npm:^1.20.0" - resolve.exports: "npm:^2.0.0" - slash: "npm:^3.0.0" - checksum: 10/3b42d596cef79966bef8e10435fc0ba1699db9f00b694f2017c55051e12528253e829eaf34eef06065737c5a7a79013e48b546379126ad3687354ee62d6e1a16 - languageName: node - linkType: hard - -"jest-runner@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-runner@npm:27.5.1" - dependencies: - "@jest/console": "npm:^27.5.1" - "@jest/environment": "npm:^27.5.1" - "@jest/test-result": "npm:^27.5.1" - "@jest/transform": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - emittery: "npm:^0.8.1" - graceful-fs: "npm:^4.2.9" - jest-docblock: "npm:^27.5.1" - jest-environment-jsdom: "npm:^27.5.1" - jest-environment-node: "npm:^27.5.1" - jest-haste-map: "npm:^27.5.1" - jest-leak-detector: "npm:^27.5.1" - jest-message-util: "npm:^27.5.1" - jest-resolve: "npm:^27.5.1" - jest-runtime: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - jest-worker: "npm:^27.5.1" - source-map-support: "npm:^0.5.6" - throat: "npm:^6.0.1" - checksum: 10/97bd741f442ebbcebfdb5e8389c0df645448d0b4b634e4128b3387d6fe432cf0f93feb0ecfc3842fed20a35c43c24460ed5dd89d7501ca9e2fdba65e5a4edf37 - languageName: node - linkType: hard - -"jest-runner@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-runner@npm:29.6.2" - dependencies: - "@jest/console": "npm:^29.6.2" - "@jest/environment": "npm:^29.6.2" - "@jest/test-result": "npm:^29.6.2" - "@jest/transform": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - emittery: "npm:^0.13.1" - graceful-fs: "npm:^4.2.9" - jest-docblock: "npm:^29.4.3" - jest-environment-node: "npm:^29.6.2" - jest-haste-map: "npm:^29.6.2" - jest-leak-detector: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-resolve: "npm:^29.6.2" - jest-runtime: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - jest-watcher: "npm:^29.6.2" - jest-worker: "npm:^29.6.2" - p-limit: "npm:^3.1.0" - source-map-support: "npm:0.5.13" - checksum: 10/378600bec4017b101986ce5a4df7a3a6926f9b24667a4c8cd7e0cf0f38076e1148b25000a2bd3c37b789fe1823ab949b0ffbd6ec250a7bf8fb371533bef2d81e - languageName: node - linkType: hard - -"jest-runtime@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-runtime@npm:27.5.1" - dependencies: - "@jest/environment": "npm:^27.5.1" - "@jest/fake-timers": "npm:^27.5.1" - "@jest/globals": "npm:^27.5.1" - "@jest/source-map": "npm:^27.5.1" - "@jest/test-result": "npm:^27.5.1" - "@jest/transform": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - chalk: "npm:^4.0.0" - cjs-module-lexer: "npm:^1.0.0" - collect-v8-coverage: "npm:^1.0.0" - execa: "npm:^5.0.0" - glob: "npm:^7.1.3" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^27.5.1" - jest-message-util: "npm:^27.5.1" - jest-mock: "npm:^27.5.1" - jest-regex-util: "npm:^27.5.1" - jest-resolve: "npm:^27.5.1" - jest-snapshot: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - slash: "npm:^3.0.0" - strip-bom: "npm:^4.0.0" - checksum: 10/cc6cdce5bee4bc02935a4671394e19962f3469eeb6e823442ca99e5670fd87f60ed64b7c7156ac13d2799fc44fe9bb806454a3f17c8342bd35e564b1a40e3920 - languageName: node - linkType: hard - -"jest-runtime@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-runtime@npm:29.6.2" - dependencies: - "@jest/environment": "npm:^29.6.2" - "@jest/fake-timers": "npm:^29.6.2" - "@jest/globals": "npm:^29.6.2" - "@jest/source-map": "npm:^29.6.0" - "@jest/test-result": "npm:^29.6.2" - "@jest/transform": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - cjs-module-lexer: "npm:^1.0.0" - collect-v8-coverage: "npm:^1.0.0" - glob: "npm:^7.1.3" - graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-mock: "npm:^29.6.2" - jest-regex-util: "npm:^29.4.3" - jest-resolve: "npm:^29.6.2" - jest-snapshot: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - slash: "npm:^3.0.0" - strip-bom: "npm:^4.0.0" - checksum: 10/2f2a1b9cac3019f5b752bb9abf42d1d58cce0b4780399b87c480c74e01b62460bf2f624fdc7288decfe706a99f67f49e9bdc905bb28e0ace2305ee03ae0d886a - languageName: node - linkType: hard - -"jest-serializer@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-serializer@npm:27.5.1" - dependencies: - "@types/node": "npm:*" - graceful-fs: "npm:^4.2.9" - checksum: 10/803e03a552278610edc6753c0dd9fa5bb5cd3ca47414a7b2918106efb62b79fd5e9ae785d0a21f12a299fa599fea8acc1fa6dd41283328cee43962cf7df9bb44 - languageName: node - linkType: hard - -"jest-snapshot@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-snapshot@npm:27.5.1" - dependencies: - "@babel/core": "npm:^7.7.2" - "@babel/generator": "npm:^7.7.2" - "@babel/plugin-syntax-typescript": "npm:^7.7.2" - "@babel/traverse": "npm:^7.7.2" - "@babel/types": "npm:^7.0.0" - "@jest/transform": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/babel__traverse": "npm:^7.0.4" - "@types/prettier": "npm:^2.1.5" - babel-preset-current-node-syntax: "npm:^1.0.0" - chalk: "npm:^4.0.0" - expect: "npm:^27.5.1" - graceful-fs: "npm:^4.2.9" - jest-diff: "npm:^27.5.1" - jest-get-type: "npm:^27.5.1" - jest-haste-map: "npm:^27.5.1" - jest-matcher-utils: "npm:^27.5.1" - jest-message-util: "npm:^27.5.1" - jest-util: "npm:^27.5.1" - natural-compare: "npm:^1.4.0" - pretty-format: "npm:^27.5.1" - semver: "npm:^7.3.2" - checksum: 10/01b2c70c56980f21fc299fa68a1d1e3a9612f06d2fcdd1cf60f636c3dd427b814efc5f15aacc567e0c3b28fd32129be4a10fca34555f358534fc88e5cee4ffbb - languageName: node - linkType: hard - -"jest-snapshot@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-snapshot@npm:29.6.2" - dependencies: - "@babel/core": "npm:^7.11.6" - "@babel/generator": "npm:^7.7.2" - "@babel/plugin-syntax-jsx": "npm:^7.7.2" - "@babel/plugin-syntax-typescript": "npm:^7.7.2" - "@babel/types": "npm:^7.3.3" - "@jest/expect-utils": "npm:^29.6.2" - "@jest/transform": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - babel-preset-current-node-syntax: "npm:^1.0.0" - chalk: "npm:^4.0.0" - expect: "npm:^29.6.2" - graceful-fs: "npm:^4.2.9" - jest-diff: "npm:^29.6.2" - jest-get-type: "npm:^29.4.3" - jest-matcher-utils: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - natural-compare: "npm:^1.4.0" - pretty-format: "npm:^29.6.2" - semver: "npm:^7.5.3" - checksum: 10/d9412eeea378ba070b9a67a161bb65b1b1038106dce8849c9e8266d4688dc8739063c9acd2d011f02f0f2cce2ff4e709be89c0657b03b89150fe7bdae769ec1c - languageName: node - linkType: hard - -"jest-util@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-util@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - graceful-fs: "npm:^4.2.9" - picomatch: "npm:^2.2.3" - checksum: 10/ecc7da41769558e57dbde544141ffceb536ee53b663de1e002d4b86784cea500a10f9a7f02e8b804e517aa0e34d3145118734c7e8b5071f9f18a153ede5b062d - languageName: node - linkType: hard - -"jest-util@npm:^28.1.3": - version: 28.1.3 - resolution: "jest-util@npm:28.1.3" - dependencies: - "@jest/types": "npm:^28.1.3" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - graceful-fs: "npm:^4.2.9" - picomatch: "npm:^2.2.3" - checksum: 10/92895523d30ddde8f22bebbc20ed6e1be35b0a21c8e9df8a1fc289bf354f6a3f96e5d271340f2ed212a5aa0b55fd7717ff3167da8c5f247d623e2a93a3bf7b32 - languageName: node - linkType: hard - -"jest-util@npm:^29.0.0": - version: 29.5.0 - resolution: "jest-util@npm:29.5.0" - dependencies: - "@jest/types": "npm:^29.5.0" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - graceful-fs: "npm:^4.2.9" - picomatch: "npm:^2.2.3" - checksum: 10/27ae6fc6221d29b31df9c071f190e0e27a9caaeca04ee1ce03f5c925ec8abf594fcf0cb57bdcb93149381415ff1f8198157332b0c76f3592065b7c3fdb35fca1 - languageName: node - linkType: hard - -"jest-util@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-util@npm:29.6.2" - dependencies: - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - graceful-fs: "npm:^4.2.9" - picomatch: "npm:^2.2.3" - checksum: 10/95d510b7bbac6976c71bf9c8f2e861cdc6c47dca0a70c470ebce6fa2afef3fecd73772efdffc04e7aad89602ab388c2f1ee1cb27c505210d767f0731da65c13b - languageName: node - linkType: hard - -"jest-validate@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-validate@npm:27.5.1" - dependencies: - "@jest/types": "npm:^27.5.1" - camelcase: "npm:^6.2.0" - chalk: "npm:^4.0.0" - jest-get-type: "npm:^27.5.1" - leven: "npm:^3.1.0" - pretty-format: "npm:^27.5.1" - checksum: 10/1fc4d46ecead311a0362bb8ea7767718b682e3d73b65c2bf55cb33722c13bb340e52d20f35d7af38918f8655a78ebbedf3d8a9eaba4ac067883cef006fcf9197 - languageName: node - linkType: hard - -"jest-validate@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-validate@npm:29.6.2" - dependencies: - "@jest/types": "npm:^29.6.1" - camelcase: "npm:^6.2.0" - chalk: "npm:^4.0.0" - jest-get-type: "npm:^29.4.3" - leven: "npm:^3.1.0" - pretty-format: "npm:^29.6.2" - checksum: 10/90ca8e977743a9bacfb2ef647f48c67c692543feacb4ae40235086df7e28bdef1180196d43dfc92074d8c7c807ab0877c4974a91baed4206c8b773fe2b2298ec - languageName: node - linkType: hard - -"jest-watch-typeahead@npm:^1.0.0": - version: 1.1.0 - resolution: "jest-watch-typeahead@npm:1.1.0" - dependencies: - ansi-escapes: "npm:^4.3.1" - chalk: "npm:^4.0.0" - jest-regex-util: "npm:^28.0.0" - jest-watcher: "npm:^28.0.0" - slash: "npm:^4.0.0" - string-length: "npm:^5.0.1" - strip-ansi: "npm:^7.0.1" - peerDependencies: - jest: ^27.0.0 || ^28.0.0 - checksum: 10/59b0a494ac01e3801c9ec586de3209153eedb024b981e25443111c5703711d23b67ebc71b072986c1758307e0bfb5bf1c92bd323f73f58602d6f4f609dce6a0c - languageName: node - linkType: hard - -"jest-watcher@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-watcher@npm:27.5.1" - dependencies: - "@jest/test-result": "npm:^27.5.1" - "@jest/types": "npm:^27.5.1" - "@types/node": "npm:*" - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.0.0" - jest-util: "npm:^27.5.1" - string-length: "npm:^4.0.1" - checksum: 10/2c2f6cb4256d5cf90c4ae2d8400d5a40399aea9152c85b8b04c3fe4cbecb65e188462de1267d134a42c69d2ddb13a6e50a8ea1aef809b1e4c8fff7a0019ca2c4 - languageName: node - linkType: hard - -"jest-watcher@npm:^28.0.0": - version: 28.1.3 - resolution: "jest-watcher@npm:28.1.3" - dependencies: - "@jest/test-result": "npm:^28.1.3" - "@jest/types": "npm:^28.1.3" - "@types/node": "npm:*" - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.0.0" - emittery: "npm:^0.10.2" - jest-util: "npm:^28.1.3" - string-length: "npm:^4.0.1" - checksum: 10/e6d2c099d461408a992d144c230112fb282b2d8f54c49227bdb0c3efcfa5ecab70a019fc57d8ad6360000459087bb942c4f72670b52fc5b97ac0d9834f87d24e - languageName: node - linkType: hard - -"jest-watcher@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-watcher@npm:29.6.2" - dependencies: - "@jest/test-result": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - ansi-escapes: "npm:^4.2.1" - chalk: "npm:^4.0.0" - emittery: "npm:^0.13.1" - jest-util: "npm:^29.6.2" - string-length: "npm:^4.0.1" - checksum: 10/dbba1872ef7d2874569b7e3397e2426d16487d3802acdfce836ed995709feac739a74b27f81711346e2bdb9e64f998df590b2e80de5db863d496ac35e41f1ad7 - languageName: node - linkType: hard - -"jest-worker@npm:^26.2.1": - version: 26.6.2 - resolution: "jest-worker@npm:26.6.2" - dependencies: - "@types/node": "npm:*" - merge-stream: "npm:^2.0.0" - supports-color: "npm:^7.0.0" - checksum: 10/5f6b94cf0e8701392a9402fc7af34a1324d334fc6a440d4d55d2d9348114659c035b8d9b259930f9c9e40cbdda0ef9bfe4d7c780e1107057bbe1202672b38533 - languageName: node - linkType: hard - -"jest-worker@npm:^27.0.2, jest-worker@npm:^27.4.5, jest-worker@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-worker@npm:27.5.1" - dependencies: - "@types/node": "npm:*" - merge-stream: "npm:^2.0.0" - supports-color: "npm:^8.0.0" - checksum: 10/06c6e2a84591d9ede704d5022fc13791e8876e83397c89d481b0063332abbb64c0f01ef4ca7de520b35c7a1058556078d6bdc3631376f4e9ffb42316c1a8488e - languageName: node - linkType: hard - -"jest-worker@npm:^28.0.2": - version: 28.1.3 - resolution: "jest-worker@npm:28.1.3" - dependencies: - "@types/node": "npm:*" - merge-stream: "npm:^2.0.0" - supports-color: "npm:^8.0.0" - checksum: 10/0b5992308276ac8440a789e5317ff8feaa496cd9a0512c9cd73dbb9b6d2ff81b717cef1aa20113633c7280c9e29319af00a4d53d6bb35adbd1e3c01f0c290152 - languageName: node - linkType: hard - -"jest-worker@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-worker@npm:29.6.2" - dependencies: - "@types/node": "npm:*" - jest-util: "npm:^29.6.2" - merge-stream: "npm:^2.0.0" - supports-color: "npm:^8.0.0" - checksum: 10/7564896d0e61fdd202652c1ce17e1c20ef01dcbf313471dd83e687efa424e82745cc4d7ebf19ba8342327fa62971107c0e507a654e0041f310b4d53bee82584f - languageName: node - linkType: hard - -"jest@npm:29.6.2": - version: 29.6.2 - resolution: "jest@npm:29.6.2" - dependencies: - "@jest/core": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - import-local: "npm:^3.0.2" - jest-cli: "npm:^29.6.2" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - bin: - jest: bin/jest.js - checksum: 10/1c5279ad907572898890ca86de365eaae8dadcbca66543c57e8137754c6b733df2142e9032bbd249d885615e5ad3e2c5d41e2a681061f71f9a011603a8019f71 - languageName: node - linkType: hard - -"jest@npm:^27.4.3": - version: 27.5.1 - resolution: "jest@npm:27.5.1" - dependencies: - "@jest/core": "npm:^27.5.1" - import-local: "npm:^3.0.2" - jest-cli: "npm:^27.5.1" - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - bin: - jest: bin/jest.js - checksum: 10/a1435098e1885e48d2a46c660176cd34d69bc80fa72966a1ea8781ab6d5355ee514d45cf871d2da2b5a54509979e53d39fbb9b149c94e430127f44ed0d70639c - languageName: node - linkType: hard - -"jiti@npm:^1.18.2": - version: 1.20.0 - resolution: "jiti@npm:1.20.0" - bin: - jiti: bin/jiti.js - checksum: 10/c4e59419dcf5599e599602c6c6bd0b3e19748c0bce886887cc91542ea085ef11f69a25dbda2b0ac7af8085afda34eef89ac6e9311949a01839c52a9af4352ec2 - languageName: node - linkType: hard - -"jiti@npm:^1.20.0": - version: 1.21.6 - resolution: "jiti@npm:1.21.6" - bin: - jiti: bin/jiti.js - checksum: 10/289b124cea411c130a14ffe88e3d38376ab44b6695616dfa0a1f32176a8f20ec90cdd6d2b9d81450fc6467cfa4d865f04f49b98452bff0f812bc400fd0ae78d6 - languageName: node - linkType: hard - -"jmespath@npm:0.15.0": - version: 0.15.0 - resolution: "jmespath@npm:0.15.0" - checksum: 10/575eea08816166004fbd3c0a0d1aa1ae3368fb7f60f6a97022d247082009d7c4d3d295c9ed318495ef005e496ec77150a8a48a7787e00c1f9128cc38c5dbef7e - languageName: node - linkType: hard - -"joi@npm:*, joi@npm:17.13.3": - version: 17.13.3 - resolution: "joi@npm:17.13.3" - dependencies: - "@hapi/hoek": "npm:^9.3.0" - "@hapi/topo": "npm:^5.1.0" - "@sideway/address": "npm:^4.1.5" - "@sideway/formula": "npm:^3.0.1" - "@sideway/pinpoint": "npm:^2.0.0" - checksum: 10/4c150db0c820c3a52f4a55c82c1fc5e144a5b5f4da9ffebc7339a15469d1a447ebb427ced446efcb9709ab56bd71a06c4c67c9381bc1b9f9ae63fc7c89209bdf - languageName: node - linkType: hard - -"jose@npm:4.15.5": - version: 4.15.5 - resolution: "jose@npm:4.15.5" - checksum: 10/17944fcc0d9afa07387eef23127c30ecfcc77eafddc4b4f1a349a8eee0536bee9b08ecd745406eaa0af65d531f738b94d2467976479cbfe8b3b60f8fc8082b8d - languageName: node - linkType: hard - -"js-levenshtein@npm:^1.1.6": - version: 1.1.6 - resolution: "js-levenshtein@npm:1.1.6" - checksum: 10/bb034043fdebab606122fe5b5c0316036f1bb0ea352038af8b0ba4cda4b016303b24f64efb59d9918f66e3680eea97ff421396ff3c153cb00a6f982908f61f8a - languageName: node - linkType: hard - -"js-sdsl@npm:^4.1.4": - version: 4.4.0 - resolution: "js-sdsl@npm:4.4.0" - checksum: 10/529d29cf54906b3987a51962e81b112333010be2cac740497dad10048da85839f5ec8d9f0338d6866d93cccf999100ae4d7e81fddaa85e24cb23f2e0c5766c09 - languageName: node - linkType: hard - -"js-sha256@npm:0.9.0": - version: 0.9.0 - resolution: "js-sha256@npm:0.9.0" - checksum: 10/4dc16be74bf4e60d8ee2a482cc822c4d4f5cd060d9f92a060fe3ab1f143cd0946edda552cd274459251c279073df15872a5df47fc4bff054bbc3812e396e990b - languageName: node - linkType: hard - -"js-sha3@npm:0.5.7, js-sha3@npm:^0.5.7": - version: 0.5.7 - resolution: "js-sha3@npm:0.5.7" - checksum: 10/32885c7edb50fca04017bacada8e5315c072d21d3d35e071e9640fc5577e200076a4718e0b2f33d86ab704accb68d2ade44f1e2ca424cc73a5929b9129dab948 - languageName: node - linkType: hard - -"js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": - version: 0.8.0 - resolution: "js-sha3@npm:0.8.0" - checksum: 10/a49ac6d3a6bfd7091472a28ab82a94c7fb8544cc584ee1906486536ba1cb4073a166f8c7bb2b0565eade23c5b3a7b8f7816231e0309ab5c549b737632377a20c - languageName: node - linkType: hard - -"js-sha3@npm:^0.9.2": - version: 0.9.3 - resolution: "js-sha3@npm:0.9.3" - checksum: 10/8daacb93b18609a0dc081f2f6199b80a96df36f9975b4b9c7476ae92822e07100b9e1969fc76f4b58e703cd6175f0de7656a99cbb2335cfb554c66f988fbead5 - languageName: node - linkType: hard - -"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": - version: 4.0.0 - resolution: "js-tokens@npm:4.0.0" - checksum: 10/af37d0d913fb56aec6dc0074c163cc71cd23c0b8aad5c2350747b6721d37ba118af35abdd8b33c47ec2800de07dedb16a527ca9c530ee004093e04958bd0cbf2 - languageName: node - linkType: hard - -"js-tokens@npm:^3.0.0, js-tokens@npm:^3.0.2": - version: 3.0.2 - resolution: "js-tokens@npm:3.0.2" - checksum: 10/a2d47dbe77c2d7d1abd99f25fcec61c825797e5775a187101879c4fb8e7bbbf89eb83bd315157b92c35d5eed5951962a47b1fedc8c778824b5d95cfb164a310c - languageName: node - linkType: hard - -"js-yaml@npm:3.14.1, js-yaml@npm:^3.13.1, js-yaml@npm:^3.14.1, js-yaml@npm:^3.5.1, js-yaml@npm:^3.9.1": - version: 3.14.1 - resolution: "js-yaml@npm:3.14.1" - dependencies: - argparse: "npm:^1.0.7" - esprima: "npm:^4.0.0" - bin: - js-yaml: bin/js-yaml.js - checksum: 10/9e22d80b4d0105b9899135365f746d47466ed53ef4223c529b3c0f7a39907743fdbd3c4379f94f1106f02755b5e90b2faaf84801a891135544e1ea475d1a1379 - languageName: node - linkType: hard - -"js-yaml@npm:4.1.0, js-yaml@npm:^4.1.0": - version: 4.1.0 - resolution: "js-yaml@npm:4.1.0" - dependencies: - argparse: "npm:^2.0.1" - bin: - js-yaml: bin/js-yaml.js - checksum: 10/c138a34a3fd0d08ebaf71273ad4465569a483b8a639e0b118ff65698d257c2791d3199e3f303631f2cb98213fa7b5f5d6a4621fd0fff819421b990d30d967140 - languageName: node - linkType: hard - -"jsbn@npm:~0.1.0": - version: 0.1.1 - resolution: "jsbn@npm:0.1.1" - checksum: 10/5450133242845100e694f0ef9175f44c012691a9b770b2571e677314e6f70600abb10777cdfc9a0c6a9f2ac6d134577403633de73e2fcd0f97875a67744e2d14 - languageName: node - linkType: hard - -"jsdom@npm:^16.4.0, jsdom@npm:^16.6.0": - version: 16.7.0 - resolution: "jsdom@npm:16.7.0" - dependencies: - abab: "npm:^2.0.5" - acorn: "npm:^8.2.4" - acorn-globals: "npm:^6.0.0" - cssom: "npm:^0.4.4" - cssstyle: "npm:^2.3.0" - data-urls: "npm:^2.0.0" - decimal.js: "npm:^10.2.1" - domexception: "npm:^2.0.1" - escodegen: "npm:^2.0.0" - form-data: "npm:^3.0.0" - html-encoding-sniffer: "npm:^2.0.1" - http-proxy-agent: "npm:^4.0.1" - https-proxy-agent: "npm:^5.0.0" - is-potential-custom-element-name: "npm:^1.0.1" - nwsapi: "npm:^2.2.0" - parse5: "npm:6.0.1" - saxes: "npm:^5.0.1" - symbol-tree: "npm:^3.2.4" - tough-cookie: "npm:^4.0.0" - w3c-hr-time: "npm:^1.0.2" - w3c-xmlserializer: "npm:^2.0.0" - webidl-conversions: "npm:^6.1.0" - whatwg-encoding: "npm:^1.0.5" - whatwg-mimetype: "npm:^2.3.0" - whatwg-url: "npm:^8.5.0" - ws: "npm:^7.4.6" - xml-name-validator: "npm:^3.0.0" - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - checksum: 10/c530c04b0e3718769a66e19b0b5c762126658bce384d6743b807a28a9d89beba4ad932e474f570323efe6ce832b3d9a8f94816fd6c4d386416d5ea0b64e07ebc - languageName: node - linkType: hard - -"jsesc@npm:^2.5.1": - version: 2.5.2 - resolution: "jsesc@npm:2.5.2" - bin: - jsesc: bin/jsesc - checksum: 10/d2096abdcdec56969764b40ffc91d4a23408aa2f351b4d1c13f736f25476643238c43fdbaf38a191c26b1b78fd856d965f5d4d0dde7b89459cd94025190cdf13 - languageName: node - linkType: hard - -"jsesc@npm:~0.5.0": - version: 0.5.0 - resolution: "jsesc@npm:0.5.0" - bin: - jsesc: bin/jsesc - checksum: 10/fab949f585c71e169c5cbe00f049f20de74f067081bbd64a55443bad1c71e1b5a5b448f2359bf2fe06f5ed7c07e2e4a9101843b01c823c30b6afc11f5bfaf724 - languageName: node - linkType: hard - -"json-bigint@npm:^1.0.0": - version: 1.0.0 - resolution: "json-bigint@npm:1.0.0" - dependencies: - bignumber.js: "npm:^9.0.0" - checksum: 10/cd3973b88e5706f8f89d2a9c9431f206ef385bd5c584db1b258891a5e6642507c32316b82745239088c697f5ddfe967351e1731f5789ba7855aed56ad5f70e1f - languageName: node - linkType: hard - -"json-buffer@npm:3.0.0": - version: 3.0.0 - resolution: "json-buffer@npm:3.0.0" - checksum: 10/6e364585600598c42f1cc85d1305569aeb1a6a13e7c67960f17b403f087e2700104ec8e49fc681ab6d6278ee4d132ac033f2625c22a9777ed9b83b403b40f23e - languageName: node - linkType: hard - -"json-buffer@npm:3.0.1": - version: 3.0.1 - resolution: "json-buffer@npm:3.0.1" - checksum: 10/82876154521b7b68ba71c4f969b91572d1beabadd87bd3a6b236f85fbc7dc4695089191ed60bb59f9340993c51b33d479f45b6ba9f3548beb519705281c32c3c - languageName: node - linkType: hard - -"json-parse-better-errors@npm:^1.0.1": - version: 1.0.2 - resolution: "json-parse-better-errors@npm:1.0.2" - checksum: 10/5553232045359b767b0f2039a6777fede1a8d7dca1a0ffb1f9ef73a7519489ae7f566b2e040f2b4c38edb8e35e37ae07af7f0a52420902f869ee0dbf5dc6c784 - languageName: node - linkType: hard - -"json-parse-even-better-errors@npm:^2.3.0, json-parse-even-better-errors@npm:^2.3.1": - version: 2.3.1 - resolution: "json-parse-even-better-errors@npm:2.3.1" - checksum: 10/5f3a99009ed5f2a5a67d06e2f298cc97bc86d462034173308156f15b43a6e850be8511dc204b9b94566305da2947f7d90289657237d210351a39059ff9d666cf - languageName: node - linkType: hard - -"json-parse-even-better-errors@npm:^3.0.0": - version: 3.0.0 - resolution: "json-parse-even-better-errors@npm:3.0.0" - checksum: 10/f1970b5220c7fa23d888565510752c3d5e863f93668a202fcaa719739fa41485dfc6a1db212f702ebd3c873851cc067aebc2917e3f79763cae2fdb95046f38f3 - languageName: node - linkType: hard - -"json-parse-even-better-errors@npm:^3.0.2": - version: 3.0.2 - resolution: "json-parse-even-better-errors@npm:3.0.2" - checksum: 10/6f04ea6c9ccb783630a59297959247e921cc90b917b8351197ca7fd058fccc7079268fd9362be21ba876fc26aa5039369dd0a2280aae49aae425784794a94927 - languageName: node - linkType: hard - -"json-pointer@npm:^0.6.1": - version: 0.6.2 - resolution: "json-pointer@npm:0.6.2" - dependencies: - foreach: "npm:^2.0.4" - checksum: 10/1d8fc507008cf28815ad398baa7a6d62a73cce2d5ca7859097bb56043b3b6889e393bf5285db9674ddcdb8bc10551146cf8048d3d6430d55ce922105813661e2 - languageName: node - linkType: hard - -"json-schema-ref-resolver@npm:^1.0.1": - version: 1.0.1 - resolution: "json-schema-ref-resolver@npm:1.0.1" - dependencies: - fast-deep-equal: "npm:^3.1.3" - checksum: 10/5ec9879fd939e0ddf84740fbdef31c574a6999cc4ecd8cee8e2a07d2627ec395f1a588d9433173cfe59d2473759389cea2782d67f850f9b95212f5bd2940a24b - languageName: node - linkType: hard - -"json-schema-traverse@npm:^0.3.0": - version: 0.3.1 - resolution: "json-schema-traverse@npm:0.3.1" - checksum: 10/a685c36222023471c25c86cddcff506306ecb8f8941922fd356008419889c41c38e1c16d661d5499d0a561b34f417693e9bb9212ba2b2b2f8f8a345a49e4ec1a - languageName: node - linkType: hard - -"json-schema-traverse@npm:^0.4.1": - version: 0.4.1 - resolution: "json-schema-traverse@npm:0.4.1" - checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b - languageName: node - linkType: hard - -"json-schema-traverse@npm:^1.0.0": - version: 1.0.0 - resolution: "json-schema-traverse@npm:1.0.0" - checksum: 10/02f2f466cdb0362558b2f1fd5e15cce82ef55d60cd7f8fa828cf35ba74330f8d767fcae5c5c2adb7851fa811766c694b9405810879bc4e1ddd78a7c0e03658ad - languageName: node - linkType: hard - -"json-schema-typed@npm:^7.0.3": - version: 7.0.3 - resolution: "json-schema-typed@npm:7.0.3" - checksum: 10/66c6b7e10aefb2d3f45284679f6dc3efc2dd6fbaceef3df74751d6c60d0334fc6c3fd649e980e9f70c0820e4529517e05813555529ca75d6c628c3a1c68b9810 - languageName: node - linkType: hard - -"json-schema@npm:0.4.0, json-schema@npm:^0.4.0": - version: 0.4.0 - resolution: "json-schema@npm:0.4.0" - checksum: 10/8b3b64eff4a807dc2a3045b104ed1b9335cd8d57aa74c58718f07f0f48b8baa3293b00af4dcfbdc9144c3aafea1e97982cc27cc8e150fc5d93c540649507a458 - languageName: node - linkType: hard - -"json-stable-stringify-without-jsonify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" - checksum: 10/12786c2e2f22c27439e6db0532ba321f1d0617c27ad8cb1c352a0e9249a50182fd1ba8b52a18899291604b0c32eafa8afd09e51203f19109a0537f68db2b652d - languageName: node - linkType: hard - -"json-stable-stringify@npm:1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify@npm:1.0.1" - dependencies: - jsonify: "npm:~0.0.0" - checksum: 10/a6a17cc1a858c85d3a441d0cdc9dde71125d231790c7fd261812587346525e85eca61522cc3bf390f2a7696aff771627f2a33efd1de0d4781ab9f8fd02f96a83 - languageName: node - linkType: hard - -"json-stable-stringify@npm:1.0.2, json-stable-stringify@npm:^1.0.0, json-stable-stringify@npm:^1.0.1": - version: 1.0.2 - resolution: "json-stable-stringify@npm:1.0.2" - dependencies: - jsonify: "npm:^0.0.1" - checksum: 10/96c8d697520072231c4916b7c0084ea857418cad0d06dc910f89a40df3824386a8eee5ed83ceea25b6052d67223fe821f9b1e51be311383104c5b2305b1dc87e - languageName: node - linkType: hard - -"json-stringify-nice@npm:^1.1.4": - version: 1.1.4 - resolution: "json-stringify-nice@npm:1.1.4" - checksum: 10/0e02cae900a1f24df64613dd10a54b354e4ba2b17822f0d7f0d2708182e71a8bbbfac107d54d3ae8fa3d8bab3556e20cef84f193ace92c9df7bc30872ec2926e - languageName: node - linkType: hard - -"json-stringify-safe@npm:^5.0.1, json-stringify-safe@npm:~5.0.1": - version: 5.0.1 - resolution: "json-stringify-safe@npm:5.0.1" - checksum: 10/59169a081e4eeb6f9559ae1f938f656191c000e0512aa6df9f3c8b2437a4ab1823819c6b9fd1818a4e39593ccfd72e9a051fdd3e2d1e340ed913679e888ded8c - languageName: node - linkType: hard - -"json-text-sequence@npm:~0.3.0": - version: 0.3.0 - resolution: "json-text-sequence@npm:0.3.0" - dependencies: - "@sovpro/delimited-stream": "npm:^1.1.0" - checksum: 10/e5dc050aadd626938514363399cf14c409f878628914922c5d470530c3f3473d6b0e16a10338dd7d863aab0291bb0e5e15d71526d14733c22e30cba771b03297 - languageName: node - linkType: hard - -"json5@npm:2.2.3, json5@npm:^2.2.0, json5@npm:^2.2.2, json5@npm:^2.2.3": - version: 2.2.3 - resolution: "json5@npm:2.2.3" - bin: - json5: lib/cli.js - checksum: 10/1db67b853ff0de3534085d630691d3247de53a2ed1390ba0ddff681ea43e9b3e30ecbdb65c5e9aab49435e44059c23dbd6fee8ee619419ba37465bb0dd7135da - languageName: node - linkType: hard - -"json5@npm:^1.0.2": - version: 1.0.2 - resolution: "json5@npm:1.0.2" - dependencies: - minimist: "npm:^1.2.0" - bin: - json5: lib/cli.js - checksum: 10/a78d812dbbd5642c4f637dd130954acfd231b074965871c3e28a5bbd571f099d623ecf9161f1960c4ddf68e0cc98dee8bebfdb94a71ad4551f85a1afc94b63f6 - languageName: node - linkType: hard - -"json5@npm:^2.1.1, json5@npm:^2.1.2, json5@npm:^2.2.1": - version: 2.2.2 - resolution: "json5@npm:2.2.2" - bin: - json5: lib/cli.js - checksum: 10/b95425711d180dbe2b48d62b581fa2899fe66731bf20f5a7e278567a44b2d5111e82f9ae382c07251a616065c919255ab5ad7851cc446eee6a8bc8e539348086 - languageName: node - linkType: hard - -"jsonc-parser@npm:3.2.0": - version: 3.2.0 - resolution: "jsonc-parser@npm:3.2.0" - checksum: 10/bd68b902e5f9394f01da97921f49c5084b2dc03a0c5b4fdb2a429f8d6f292686c1bf87badaeb0a8148d024192a88f5ad2e57b2918ba43fe25cf15f3371db64d4 - languageName: node - linkType: hard - -"jsonc-parser@npm:3.2.1": - version: 3.2.1 - resolution: "jsonc-parser@npm:3.2.1" - checksum: 10/fe2df6f39e21653781d52cae20c5b9e0ab62461918d97f9430b216cea9b6500efc1d8b42c6584cc0a7548b4c996055e9cdc39f09b9782fa6957af2f45306c530 - languageName: node - linkType: hard - -"jsonc-parser@npm:^3.0.0": - version: 3.0.0 - resolution: "jsonc-parser@npm:3.0.0" - checksum: 10/30747660fe34a1abc9b749b7381f5750c0283bedaf8b806f8d0984111e67729476cd4d31529b86b5d85a148d30bb62b8f65dc43e681750b38020fbe5b6c0ea1a - languageName: node - linkType: hard - -"jsonfile@npm:^2.1.0": - version: 2.4.0 - resolution: "jsonfile@npm:2.4.0" - dependencies: - graceful-fs: "npm:^4.1.6" - dependenciesMeta: - graceful-fs: - optional: true - checksum: 10/517656e0a7c4eda5a90341dd0ec9e9b7590d0c77d66d8aad0162615dfc7c5f219c82565b927cc4cc774ca93e484d118a274ef0def74279a3d8afb4ff2f4e4800 - languageName: node - linkType: hard - -"jsonfile@npm:^4.0.0": - version: 4.0.0 - resolution: "jsonfile@npm:4.0.0" - dependencies: - graceful-fs: "npm:^4.1.6" - dependenciesMeta: - graceful-fs: - optional: true - checksum: 10/17796f0ab1be8479827d3683433f97ebe0a1c6932c3360fa40348eac36904d69269aab26f8b16da311882d94b42e9208e8b28e490bf926364f3ac9bff134c226 - languageName: node - linkType: hard - -"jsonfile@npm:^6.0.1": - version: 6.1.0 - resolution: "jsonfile@npm:6.1.0" - dependencies: - graceful-fs: "npm:^4.1.6" - universalify: "npm:^2.0.0" - dependenciesMeta: - graceful-fs: - optional: true - checksum: 10/03014769e7dc77d4cf05fa0b534907270b60890085dd5e4d60a382ff09328580651da0b8b4cdf44d91e4c8ae64d91791d965f05707beff000ed494a38b6fec85 - languageName: node - linkType: hard - -"jsonify@npm:^0.0.1": - version: 0.0.1 - resolution: "jsonify@npm:0.0.1" - checksum: 10/7b86b6f4518582ff1d8b7624ed6c6277affd5246445e864615dbdef843a4057ac58587684faf129ea111eeb80e01c15f0a4d9d03820eb3f3985fa67e81b12398 - languageName: node - linkType: hard - -"jsonify@npm:~0.0.0": - version: 0.0.0 - resolution: "jsonify@npm:0.0.0" - checksum: 10/dc738debf7cc7ebbff2024f07fe089c43f1de48ac68b5ec23aa257e133aaf45a5d3e147a17eac51339a0e1ac6b956a7aad0a18f4e4ce7f583acbadc99c43a566 - languageName: node - linkType: hard - -"jsonparse@npm:^1.2.0, jsonparse@npm:^1.3.1": - version: 1.3.1 - resolution: "jsonparse@npm:1.3.1" - checksum: 10/24531e956f0f19d79e22c157cebd81b37af3486ae22f9bc1028f8c2a4d1b70df48b168ff86f8568d9c2248182de9b6da9f50f685d5e4b9d1d2d339d2a29d15bc - languageName: node - linkType: hard - -"jsonpointer@npm:^5.0.0": - version: 5.0.1 - resolution: "jsonpointer@npm:5.0.1" - checksum: 10/0b40f712900ad0c846681ea2db23b6684b9d5eedf55807b4708c656f5894b63507d0e28ae10aa1bddbea551241035afe62b6df0800fc94c2e2806a7f3adecd7c - languageName: node - linkType: hard - -"jsonwebtoken@npm:>=9.0.0": - version: 9.0.2 - resolution: "jsonwebtoken@npm:9.0.2" - dependencies: - jws: "npm:^3.2.2" - lodash.includes: "npm:^4.3.0" - lodash.isboolean: "npm:^3.0.3" - lodash.isinteger: "npm:^4.0.4" - lodash.isnumber: "npm:^3.0.3" - lodash.isplainobject: "npm:^4.0.6" - lodash.isstring: "npm:^4.0.1" - lodash.once: "npm:^4.0.0" - ms: "npm:^2.1.1" - semver: "npm:^7.5.4" - checksum: 10/6e9b6d879cec2b27f2f3a88a0c0973edc7ba956a5d9356b2626c4fddfda969e34a3832deaf79c3e1c6c9a525bc2c4f2c2447fa477f8ac660f0017c31a59ae96b - languageName: node - linkType: hard - -"jsprim@npm:^1.2.2": - version: 1.4.2 - resolution: "jsprim@npm:1.4.2" - dependencies: - assert-plus: "npm:1.0.0" - extsprintf: "npm:1.3.0" - json-schema: "npm:0.4.0" - verror: "npm:1.10.0" - checksum: 10/df2bf234eab1b5078d01bcbff3553d50a243f7b5c10a169745efeda6344d62798bd1d85bcca6a8446f3b5d0495e989db45f9de8dae219f0f9796e70e0c776089 - languageName: node - linkType: hard - -"jsrsasign@npm:>=11.0.0": - version: 11.0.0 - resolution: "jsrsasign@npm:11.0.0" - checksum: 10/f317f4aa48ea646f3330e6cc9459df4a1891b01848b87f3a1a55b0fa6e7731e90f0d1682954db81c4e39f0db8732d01ea7743e593bc12e79b99cd8e88ea6fc18 - languageName: node - linkType: hard - -"jsx-ast-utils@npm:^1.3.4": - version: 1.4.1 - resolution: "jsx-ast-utils@npm:1.4.1" - checksum: 10/7682d3165fef499aed99f0162cdca3801d3eb2939c1097f7d6db41d5bfc9131966689bd9ef05568955e500a57594a00b967dd9e5e16fb36459e83879c17d2de4 - languageName: node - linkType: hard - -"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.3": - version: 3.3.5 - resolution: "jsx-ast-utils@npm:3.3.5" - dependencies: - array-includes: "npm:^3.1.6" - array.prototype.flat: "npm:^1.3.1" - object.assign: "npm:^4.1.4" - object.values: "npm:^1.1.6" - checksum: 10/b61d44613687dfe4cc8ad4b4fbf3711bf26c60b8d5ed1f494d723e0808415c59b24a7c0ed8ab10736a40ff84eef38cbbfb68b395e05d31117b44ffc59d31edfc - languageName: node - linkType: hard - -"junk@npm:^4.0.0": - version: 4.0.0 - resolution: "junk@npm:4.0.0" - checksum: 10/af79841fbdc0f3a8ec328a4bf68381013c7f52a78821184855a4b19ef95713edb3c30cd144c6393e6159e1b7dfb76b3f682dc983aafb54e52ff321ab1b4a9983 - languageName: node - linkType: hard - -"just-diff-apply@npm:^5.2.0": - version: 5.5.0 - resolution: "just-diff-apply@npm:5.5.0" - checksum: 10/5515c436c89e9ef934f1ea2aac447588c38dd017247ed85254537b005706e64321ca7a9c246fe7106338da1ef3a693f8550ebf11759c854713e9ccffb788a43b - languageName: node - linkType: hard - -"just-diff@npm:^6.0.0": - version: 6.0.2 - resolution: "just-diff@npm:6.0.2" - checksum: 10/4c6b14d6be2a3391b020ea2b3d1a0acf2f4c60fcb16681c7f6f76d4c0f1841fae5b00c1a2e719980992e46320e4b6c55a4713683cb1873dd41a2621f08c9f8e8 - languageName: node - linkType: hard - -"just-extend@npm:^4.0.2": - version: 4.2.1 - resolution: "just-extend@npm:4.2.1" - checksum: 10/375389c0847d56300873fa622fbc5c5e208933e372bbedb39c82f583299cdad4fe9c4773bc35fcd9c42cd85744f07474ca4163aa0f9125dd5be37bc09075eb49 - languageName: node - linkType: hard - -"jwa@npm:^1.4.1": - version: 1.4.1 - resolution: "jwa@npm:1.4.1" - dependencies: - buffer-equal-constant-time: "npm:1.0.1" - ecdsa-sig-formatter: "npm:1.0.11" - safe-buffer: "npm:^5.0.1" - checksum: 10/0bc002b71dd70480fedc7d442a4d2b9185a9947352a027dcb4935864ad2323c57b5d391adf968a3622b61e940cef4f3484d5813b95864539272d41cac145d6f3 - languageName: node - linkType: hard - -"jwa@npm:^2.0.0": - version: 2.0.0 - resolution: "jwa@npm:2.0.0" - dependencies: - buffer-equal-constant-time: "npm:1.0.1" - ecdsa-sig-formatter: "npm:1.0.11" - safe-buffer: "npm:^5.0.1" - checksum: 10/ab983f6685d99d13ddfbffef9b1c66309a536362a8412d49ba6e687d834a1240ce39290f30ac7dbe241e0ab6c76fee7ff795776ce534e11d148158c9b7193498 - languageName: node - linkType: hard - -"jws@npm:^3.2.2": - version: 3.2.2 - resolution: "jws@npm:3.2.2" - dependencies: - jwa: "npm:^1.4.1" - safe-buffer: "npm:^5.0.1" - checksum: 10/70b016974af8a76d25030c80a0097b24ed5b17a9cf10f43b163c11cb4eb248d5d04a3fe48c0d724d2884c32879d878ccad7be0663720f46b464f662f7ed778fe - languageName: node - linkType: hard - -"jws@npm:^4.0.0": - version: 4.0.0 - resolution: "jws@npm:4.0.0" - dependencies: - jwa: "npm:^2.0.0" - safe-buffer: "npm:^5.0.1" - checksum: 10/1d15f4cdea376c6bd6a81002bd2cb0bf3d51d83da8f0727947b5ba3e10cf366721b8c0d099bf8c1eb99eb036e2c55e5fd5efd378ccff75a2b4e0bd10002348b9 - languageName: node - linkType: hard - -"karma-source-map-support@npm:1.4.0": - version: 1.4.0 - resolution: "karma-source-map-support@npm:1.4.0" - dependencies: - source-map-support: "npm:^0.5.5" - checksum: 10/7a482bc836c70f8c1d9468382a9e1c887d032697f6ace97fac90b02e73d0523cb59fc0af8759356293e6bc4ce3a17bab59b331bad0560cab9dd77ac65b343de8 - languageName: node - linkType: hard - -"keccak@npm:3.0.2, keccak@npm:^3.0.0": - version: 3.0.2 - resolution: "keccak@npm:3.0.2" - dependencies: - node-addon-api: "npm:^2.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.0" - readable-stream: "npm:^3.6.0" - checksum: 10/03f8d513040562f90ae892765431de29de0abf329dec40f1ef8b17eae634d56e283a7aeec5ae62e6ef96b9e8d1601329f2ef5c30a9d6c7baa6062d0f78d11b58 - languageName: node - linkType: hard - -"keccak@npm:^3.0.2": - version: 3.0.3 - resolution: "keccak@npm:3.0.3" - dependencies: - node-addon-api: "npm:^2.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.0" - readable-stream: "npm:^3.6.0" - checksum: 10/30c652c39e935132eb92300eca974fad1f4ec4aed4c6e2f21d774b06001d07e24117dd46ef1494272f5674f7f11d5e7a8ee50c7bf8d87bb3895aa60607c4aabc - languageName: node - linkType: hard - -"key-encoder@npm:2.0.3": - version: 2.0.3 - resolution: "key-encoder@npm:2.0.3" - dependencies: - "@types/elliptic": "npm:^6.4.9" - asn1.js: "npm:^5.0.1" - bn.js: "npm:^4.11.8" - elliptic: "npm:^6.4.1" - checksum: 10/17f10809dbe7078277aa61a58f64ca6b50abe3475e49311816c83b511f34854dfa1ae8223000e8e1aab3e182f08fe70c925796d444568cd86dfe725969b65613 - languageName: node - linkType: hard - -"keycloak-admin@npm:1.14.22": - version: 1.14.22 - resolution: "keycloak-admin@npm:1.14.22" - dependencies: - axios: "npm:^0.21.0" - camelize: "npm:^1.0.0" - keycloak-js: "npm:^11.0.3" - lodash: "npm:^4.17.21" - query-string: "npm:^6.13.7" - url-join: "npm:^4.0.0" - url-template: "npm:^2.0.8" - checksum: 10/b04829d205f71dc482dd27659807029c4daeaa2ba10c9c39455bc55930858a5b9a36d5e9cd0c882ef76218e05e4b3ebcd099009a0271933349abaaadc441db43 - languageName: node - linkType: hard - -"keycloak-js@npm:^11.0.3": - version: 11.0.3 - resolution: "keycloak-js@npm:11.0.3" - dependencies: - base64-js: "npm:1.3.1" - js-sha256: "npm:0.9.0" - checksum: 10/c2998bffb2916c046b085725c9a568fa3366e6dde2ea1c6bc23ece1d88d6f38fa5245b7dc0015722af4f3cf41bd7ded193a7984a3085d021162cccad24cccba8 - languageName: node - linkType: hard - -"keyv@npm:^3.0.0": - version: 3.1.0 - resolution: "keyv@npm:3.1.0" - dependencies: - json-buffer: "npm:3.0.0" - checksum: 10/6de272b3f78975a9a0b12259953c09d5bbe9de9acfd845471ebd758928b523f70563462f0c16a866fe9b447ff5bdebda72c62bc23734eb72cd1fb8f1d7076843 - languageName: node - linkType: hard - -"keyv@npm:^4.0.0, keyv@npm:^4.5.4": - version: 4.5.4 - resolution: "keyv@npm:4.5.4" - dependencies: - json-buffer: "npm:3.0.1" - checksum: 10/167eb6ef64cc84b6fa0780ee50c9de456b422a1e18802209234f7c2cf7eae648c7741f32e50d7e24ccb22b24c13154070b01563d642755b156c357431a191e75 - languageName: node - linkType: hard - -"keyv@npm:^4.5.2": - version: 4.5.3 - resolution: "keyv@npm:4.5.3" - dependencies: - json-buffer: "npm:3.0.1" - checksum: 10/2c96e345ecee2c7bf8876b368190b0067308b8da080c1462486fbe71a5b863242c350f1507ddad8f373c5d886b302c42f491de4d3be725071c6743a2f1188ff2 - languageName: node - linkType: hard - -"kind-of@npm:^3.0.2, kind-of@npm:^3.0.3": - version: 3.2.2 - resolution: "kind-of@npm:3.2.2" - dependencies: - is-buffer: "npm:^1.1.5" - checksum: 10/b6e7eed10f9dea498500e73129c9bf289bc417568658648aecfc2e104aa32683b908e5d349563fc78d6752da0ea60c9ed1dda4b24dd85a0c8fc0c7376dc0acac - languageName: node - linkType: hard - -"kind-of@npm:^4.0.0": - version: 4.0.0 - resolution: "kind-of@npm:4.0.0" - dependencies: - is-buffer: "npm:^1.1.5" - checksum: 10/b35a90e0690f06bf07c8970b5290256b1740625fb3bf17ef8c9813a9e197302dbe9ad710b0d97a44556c9280becfc2132cbc3b370056f63b7e350a85f79088f1 - languageName: node - linkType: hard - -"kind-of@npm:^5.0.0": - version: 5.1.0 - resolution: "kind-of@npm:5.1.0" - checksum: 10/acf7cc73881f27629f700a80de77ff7fe4abc9430eac7ddb09117f75126e578ee8d7e44c4dacb6a9e802d5d881abf007ee6af3cfbe55f8b5cf0a7fdc49a02aa3 - languageName: node - linkType: hard - -"kind-of@npm:^6.0.0, kind-of@npm:^6.0.2, kind-of@npm:^6.0.3": - version: 6.0.3 - resolution: "kind-of@npm:6.0.3" - checksum: 10/5873d303fb36aad875b7538798867da2ae5c9e328d67194b0162a3659a627d22f742fc9c4ae95cd1704132a24b00cae5041fc00c0f6ef937dc17080dc4dbb962 - languageName: node - linkType: hard - -"klaw@npm:^1.0.0": - version: 1.3.1 - resolution: "klaw@npm:1.3.1" - dependencies: - graceful-fs: "npm:^4.1.9" - dependenciesMeta: - graceful-fs: - optional: true - checksum: 10/68b8ccb89f222dca60805df2b0e0fa0b3e4203ca1928b8facc0afac660e3e362809fe00f868ac877f495ebf89e376bb9ac9275508a132b5573e7382bed3ab006 - languageName: node - linkType: hard - -"kleur@npm:^3.0.3": - version: 3.0.3 - resolution: "kleur@npm:3.0.3" - checksum: 10/0c0ecaf00a5c6173d25059c7db2113850b5457016dfa1d0e3ef26da4704fbb186b4938d7611246d86f0ddf1bccf26828daa5877b1f232a65e7373d0122a83e7f - languageName: node - linkType: hard - -"klona@npm:^2.0.4": - version: 2.0.5 - resolution: "klona@npm:2.0.5" - checksum: 10/27cc78ea2dab88da6671b5a19c60215c30ed1e1f8ba3dc900a1beb88d1f8dba815a5d5a61306cd4982330bc6f5db3e3d5d2410556a3a225428341bb6482f90ae - languageName: node - linkType: hard - -"klona@npm:^2.0.5": - version: 2.0.6 - resolution: "klona@npm:2.0.6" - checksum: 10/ed7e2c9af58cb646e758e60b75dec24bf72466066290f78c515a2bae23a06fa280f11ff3210c43b94a18744954aa5358f9d46583d5e4c36da073ecc3606355c4 - languageName: node - linkType: hard - -"knex@npm:2.4.0": - version: 2.4.0 - resolution: "knex@npm:2.4.0" - dependencies: - colorette: "npm:2.0.19" - commander: "npm:^9.1.0" - debug: "npm:4.3.4" - escalade: "npm:^3.1.1" - esm: "npm:^3.2.25" - get-package-type: "npm:^0.1.0" - getopts: "npm:2.3.0" - interpret: "npm:^2.2.0" - lodash: "npm:^4.17.21" - pg-connection-string: "npm:2.5.0" - rechoir: "npm:^0.8.0" - resolve-from: "npm:^5.0.0" - tarn: "npm:^3.0.2" - tildify: "npm:2.0.0" - peerDependenciesMeta: - better-sqlite3: - optional: true - mysql: - optional: true - mysql2: - optional: true - pg: - optional: true - pg-native: - optional: true - sqlite3: - optional: true - tedious: - optional: true - bin: - knex: bin/cli.js - checksum: 10/6bb1dd2b7e884b21890ba085d3d55854e1a0bcb13a656a58dd78bbe05420982d402f0546214fb13eda7ed5fe3f052ac49cdfacd9c220129a3b58dce005b59ba7 - languageName: node - linkType: hard - -"knex@npm:2.5.1": - version: 2.5.1 - resolution: "knex@npm:2.5.1" - dependencies: - colorette: "npm:2.0.19" - commander: "npm:^10.0.0" - debug: "npm:4.3.4" - escalade: "npm:^3.1.1" - esm: "npm:^3.2.25" - get-package-type: "npm:^0.1.0" - getopts: "npm:2.3.0" - interpret: "npm:^2.2.0" - lodash: "npm:^4.17.21" - pg-connection-string: "npm:2.6.1" - rechoir: "npm:^0.8.0" - resolve-from: "npm:^5.0.0" - tarn: "npm:^3.0.2" - tildify: "npm:2.0.0" - peerDependenciesMeta: - better-sqlite3: - optional: true - mysql: - optional: true - mysql2: - optional: true - pg: - optional: true - pg-native: - optional: true - sqlite3: - optional: true - tedious: - optional: true - bin: - knex: bin/cli.js - checksum: 10/7ab53dfdc382633d890355c15cb4d6e501560cdbc2b03c77f7fc098bdb55a85dfd37e5e8a7f5f38d351c82d5ab77e5e924376ec60e4a0f746901c387ce09b397 - languageName: node - linkType: hard - -"knuth-shuffle-seeded@npm:^1.0.6": - version: 1.0.6 - resolution: "knuth-shuffle-seeded@npm:1.0.6" - dependencies: - seed-random: "npm:~2.2.0" - checksum: 10/1bf533232cba7a9701791ef94df4e5afd4d561f8f94e54e83a598292746a3fa6f5bc7676e694718f1247addf80e43179eb46ad971508bb35dd7e3f47b523dc39 - languageName: node - linkType: hard - -"kubo-rpc-client-esm-cjs@npm:3.0.1": - version: 3.0.1 - resolution: "kubo-rpc-client-esm-cjs@npm:3.0.1" - dependencies: - "@ipld/dag-cbor": "npm:^9.0.0" - "@ipld/dag-json": "npm:^10.0.0" - "@ipld/dag-pb": "npm:^4.0.0" - "@libp2p/crypto": "npm:^1.0.11" - "@libp2p/logger": "npm:^2.0.5" - "@libp2p/peer-id": "npm:^2.0.0" - "@multiformats/multiaddr": "npm:^11.1.5" - any-signal: "npm:^3.0.1" - dag-jose: "npm:^4.0.0" - err-code: "npm:^3.0.1" - ipfs-core-utils: "npm:^0.18.0" - ipfs-utils: "npm:^9.0.7" - it-first: "npm:^2.0.0" - it-last: "npm:^2.0.0" - merge-options: "npm:^3.0.4" - multiformats: "npm:^11.0.0" - parse-duration: "npm:^1.0.2" - stream-to-it: "npm:^0.2.4" - uint8arrays: "npm:^4.0.3" - checksum: 10/76dcce1576fbdb0380bc86b31765bad4868d40361abf94f6a0de52ba39347ce55b181b1519e3c3722be301ddc7963e3476c13a70f6dc355d4a631b3d95dd602a - languageName: node - linkType: hard - -"kubo-rpc-client@npm:3.0.1": - version: 3.0.1 - resolution: "kubo-rpc-client@npm:3.0.1" - dependencies: - "@ipld/dag-cbor": "npm:^9.0.0" - "@ipld/dag-json": "npm:^10.0.0" - "@ipld/dag-pb": "npm:^4.0.0" - "@libp2p/crypto": "npm:^1.0.11" - "@libp2p/logger": "npm:^2.0.5" - "@libp2p/peer-id": "npm:^2.0.0" - "@multiformats/multiaddr": "npm:^11.1.5" - any-signal: "npm:^3.0.1" - dag-jose: "npm:^4.0.0" - err-code: "npm:^3.0.1" - ipfs-core-utils: "npm:^0.18.0" - ipfs-utils: "npm:^9.0.7" - it-first: "npm:^2.0.0" - it-last: "npm:^2.0.0" - merge-options: "npm:^3.0.4" - multiformats: "npm:^11.0.0" - parse-duration: "npm:^1.0.2" - stream-to-it: "npm:^0.2.4" - uint8arrays: "npm:^4.0.3" - checksum: 10/ca5a21c23da5461afccad8a942f2af3e09b2678364bac919782ebce1f0bb3265587d8e3e38e3dc4e38014d7bfd66090564eb0efdaebd2f6f4ce0e88562025489 - languageName: node - linkType: hard - -"kuler@npm:^2.0.0": - version: 2.0.0 - resolution: "kuler@npm:2.0.0" - checksum: 10/9e10b5a1659f9ed8761d38df3c35effabffbd19fc6107324095238e4ef0ff044392cae9ac64a1c2dda26e532426485342226b93806bd97504b174b0dcf04ed81 - languageName: node - linkType: hard - -"ky-universal@npm:^0.8.2": - version: 0.8.2 - resolution: "ky-universal@npm:0.8.2" - dependencies: - abort-controller: "npm:^3.0.0" - node-fetch: "npm:3.0.0-beta.9" - peerDependencies: - ky: ">=0.17.0" - web-streams-polyfill: ">=2.0.0" - peerDependenciesMeta: - web-streams-polyfill: - optional: true - checksum: 10/87ed38c5c5a5b4448502fd5a64b68f30db69d366e148e5321cd9c0cb57d616519578ff0ae50146ff92ad037ef5cd77fbc40d893675459eead0d3f13101374570 - languageName: node - linkType: hard - -"ky@npm:^0.25.1": - version: 0.25.1 - resolution: "ky@npm:0.25.1" - checksum: 10/c50ccc634f7c032943e1de54e620c2ea23f357a7714d92e1de56e0b748d0e3d974f76c221b30d9d98a493b46884130a2e0ec50fb3092ffde17d9559aa82504b3 - languageName: node - linkType: hard - -"language-subtag-registry@npm:~0.3.2": - version: 0.3.22 - resolution: "language-subtag-registry@npm:0.3.22" - checksum: 10/5591f4abd775d1ab5945355a5ba894327d2d94c900607bdb69aac1bc5bb921dbeeeb5f616df95e8c0ae875501d19c1cfa0e852ece822121e95048deb34f2b4d2 - languageName: node - linkType: hard - -"language-tags@npm:=1.0.5": - version: 1.0.5 - resolution: "language-tags@npm:1.0.5" - dependencies: - language-subtag-registry: "npm:~0.3.2" - checksum: 10/2161292ddae73ff2f5a15fd2d753b21096b81324337dff4ad78d702c63210d5beb18892cd53a3455ee6e88065807c8e285e82c40503678951d2071d101a473b4 - languageName: node - linkType: hard - -"latest-version@npm:^5.1.0": - version: 5.1.0 - resolution: "latest-version@npm:5.1.0" - dependencies: - package-json: "npm:^6.3.0" - checksum: 10/fbc72b071eb66c40f652441fd783a9cca62f08bf42433651937f078cd9ef94bf728ec7743992777826e4e89305aef24f234b515e6030503a2cbee7fc9bdc2c0f - languageName: node - linkType: hard - -"launch-editor@npm:^2.6.0": - version: 2.6.0 - resolution: "launch-editor@npm:2.6.0" - dependencies: - picocolors: "npm:^1.0.0" - shell-quote: "npm:^1.7.3" - checksum: 10/48e4230643e8fdb5c14c11314706d58d9f3fbafe2606be3d6e37da1918ad8bfe39dd87875c726a1b59b9f4da99d87ec3e36d4c528464f0b820f9e91e5cb1c02d - languageName: node - linkType: hard - -"lcid@npm:^1.0.0": - version: 1.0.0 - resolution: "lcid@npm:1.0.0" - dependencies: - invert-kv: "npm:^1.0.0" - checksum: 10/e8c7a4db07663068c5c44b650938a2bc41aa992037eebb69376214320f202c1250e70b50c32f939e28345fd30c2d35b8e8cd9a19d5932c398246a864ce54843d - languageName: node - linkType: hard - -"lcid@npm:^2.0.0": - version: 2.0.0 - resolution: "lcid@npm:2.0.0" - dependencies: - invert-kv: "npm:^2.0.0" - checksum: 10/278e27b5a0707cf9ab682146963ebff2328795be10cd6f8ea8edae293439325d345ac5e33079cce77ac3a86a3dcfb97a34f279dbc46b03f3e419aa39b5915a16 - languageName: node - linkType: hard - -"less-loader@npm:11.1.0": - version: 11.1.0 - resolution: "less-loader@npm:11.1.0" - dependencies: - klona: "npm:^2.0.4" - peerDependencies: - less: ^3.5.0 || ^4.0.0 - webpack: ^5.0.0 - checksum: 10/d77955978f6e41d22bef6dee776a6d566ebebd42adca02bf6754ebd382c966806ed1dc8dce99aadba4a97749d73656c7ed615acb5db46a56268d51382dbbfa46 - languageName: node - linkType: hard - -"less@npm:4.1.3": - version: 4.1.3 - resolution: "less@npm:4.1.3" - dependencies: - copy-anything: "npm:^2.0.1" - errno: "npm:^0.1.1" - graceful-fs: "npm:^4.1.2" - image-size: "npm:~0.5.0" - make-dir: "npm:^2.1.0" - mime: "npm:^1.4.1" - needle: "npm:^3.1.0" - parse-node-version: "npm:^1.0.1" - source-map: "npm:~0.6.0" - tslib: "npm:^2.3.0" - dependenciesMeta: - errno: - optional: true - graceful-fs: - optional: true - image-size: - optional: true - make-dir: - optional: true - mime: - optional: true - needle: - optional: true - source-map: - optional: true - bin: - lessc: bin/lessc - checksum: 10/d0688b6b46196b6d5378e4de153678e8b52d991d1a738e469fbc798a61d39df37ad4496ee398e26d59aad4bd463839441046542080b17e5719628fb4196e6ecc - languageName: node - linkType: hard - -"less@npm:4.2.0": - version: 4.2.0 - resolution: "less@npm:4.2.0" - dependencies: - copy-anything: "npm:^2.0.1" - errno: "npm:^0.1.1" - graceful-fs: "npm:^4.1.2" - image-size: "npm:~0.5.0" - make-dir: "npm:^2.1.0" - mime: "npm:^1.4.1" - needle: "npm:^3.1.0" - parse-node-version: "npm:^1.0.1" - source-map: "npm:~0.6.0" - tslib: "npm:^2.3.0" - dependenciesMeta: - errno: - optional: true - graceful-fs: - optional: true - image-size: - optional: true - make-dir: - optional: true - mime: - optional: true - needle: - optional: true - source-map: - optional: true - bin: - lessc: bin/lessc - checksum: 10/98200dce570cdc396e03cafc95fb7bbbecdbe3ae28e456a6dcf7a1ac75c3b1979aa56749ac7581ace1814f8a03c9d3456b272280cc098a6e1e24295c4b7caddb - languageName: node - linkType: hard - -"level-blobs@npm:^0.1.7": - version: 0.1.7 - resolution: "level-blobs@npm:0.1.7" - dependencies: - level-peek: "npm:1.0.6" - once: "npm:^1.3.0" - readable-stream: "npm:^1.0.26-4" - checksum: 10/736e6fd8782bdd585579203feb27564a31ed7332e00e75b79ebfd5901aab2de561f9c5d724ff86e780830a7dda9a0bbf0129802c6c7f7c93dca0df43323854ec - languageName: node - linkType: hard - -"level-codec@npm:9.0.2, level-codec@npm:^9.0.0": - version: 9.0.2 - resolution: "level-codec@npm:9.0.2" - dependencies: - buffer: "npm:^5.6.0" - checksum: 10/de74b43f68f74211a12d4772f20e3bf7207eb2d400613c7f5835bf8f1f29b4e1f0a1375ebaa5516016734622f17a65e6aaa72432895c18012b101bc9c8361f72 - languageName: node - linkType: hard - -"level-codec@npm:~7.0.0": - version: 7.0.1 - resolution: "level-codec@npm:7.0.1" - checksum: 10/76a8a814cab0bdd45d10ee17f5a642c28996500de6684a08611925c4c342ace0587e028903afd35cc2991749c22196a735976743385f4a9dadd1273c97902420 - languageName: node - linkType: hard - -"level-concat-iterator@npm:^3.0.0": - version: 3.1.0 - resolution: "level-concat-iterator@npm:3.1.0" - dependencies: - catering: "npm:^2.1.0" - checksum: 10/a15bc4c5fbbb30c1efa7fad06b72feaac84d90990b356b461593c198a833336f31f6daff8f40c3908fabd14cfd8856d1c5ecae9e1cb0575037b65fa607e760e9 - languageName: node - linkType: hard - -"level-concat-iterator@npm:~2.0.0": - version: 2.0.1 - resolution: "level-concat-iterator@npm:2.0.1" - checksum: 10/96b7d77d2130389ca2366931cc3cdf7efa2bbc18cbaabd3128c03f22dc4a6a87f0511b9bb2eb3dffd2b4bcfeefeabd6c471640dff905fed49f19b7ac7e7eae10 - languageName: node - linkType: hard - -"level-errors@npm:^1.0.3": - version: 1.1.2 - resolution: "level-errors@npm:1.1.2" - dependencies: - errno: "npm:~0.1.1" - checksum: 10/18c22fd574ff31567642a85d9a306604a32cbe969b8469fee29620c10488214a6b5e6bbf19e3b5e2042859e4b81041af537319c18132a1aaa56d4ed5981157b7 - languageName: node - linkType: hard - -"level-errors@npm:^2.0.0, level-errors@npm:~2.0.0": - version: 2.0.1 - resolution: "level-errors@npm:2.0.1" - dependencies: - errno: "npm:~0.1.1" - checksum: 10/3f800be6a30637ff4ae907b100512fc36d077b237dc407f976f283122984059002a67cc89c8f9c0f74a49cc84c7e519d09fcc0ece53af64360bcd5ecc762e3a3 - languageName: node - linkType: hard - -"level-errors@npm:~1.0.3": - version: 1.0.5 - resolution: "level-errors@npm:1.0.5" - dependencies: - errno: "npm:~0.1.1" - checksum: 10/ae5d5c042c52975aa1543120fe5e1bf3d382c3f64aa9f036a616c6bf4b2de841eea4fc26107e96fe70ba34a21565e7902f9cafcf9ec699de0d98b02d53b42467 - languageName: node - linkType: hard - -"level-filesystem@npm:^1.0.1": - version: 1.2.0 - resolution: "level-filesystem@npm:1.2.0" - dependencies: - concat-stream: "npm:^1.4.4" - errno: "npm:^0.1.1" - fwd-stream: "npm:^1.0.4" - level-blobs: "npm:^0.1.7" - level-peek: "npm:^1.0.6" - level-sublevel: "npm:^5.2.0" - octal: "npm:^1.0.0" - once: "npm:^1.3.0" - xtend: "npm:^2.2.0" - checksum: 10/4907051b25ff0dedeb4d5d5c444144e50df4dd67b4a5937e9f6b41450dda72845517b443109149a4c62f48069d1e1f0416b8930137fa1867e703d45af02f2081 - languageName: node - linkType: hard - -"level-fix-range@npm:2.0": - version: 2.0.0 - resolution: "level-fix-range@npm:2.0.0" - dependencies: - clone: "npm:~0.1.9" - checksum: 10/250cefa69e1035d1412b4ba3e5cab83cceb894aa833fb0a93417d8d6230c60f6f8154feffbd0f116461ddd441b909e7df1323355d3e1769b3bb20a55729145b5 - languageName: node - linkType: hard - -"level-fix-range@npm:~1.0.2": - version: 1.0.2 - resolution: "level-fix-range@npm:1.0.2" - checksum: 10/6c9a3894ea08947fae79c41b75e8b9d57979523b656bec43c589f2dc4455276a150df445d9a7ca880a7c58c2ef19f5cea7f661d777993b870f4943af6b31d5bb - languageName: node - linkType: hard - -"level-hooks@npm:>=4.4.0 <5": - version: 4.5.0 - resolution: "level-hooks@npm:4.5.0" - dependencies: - string-range: "npm:~1.2" - checksum: 10/f6f8ed44ea80afd72e9b11420f3856e6652323cdd0d92ce2746e5dd9e03ffa7eb926159538f9e36c366caa0db05072ddadcb9f81ba88c00cb8da8ee4d02b5f98 - languageName: node - linkType: hard - -"level-iterator-stream@npm:~1.3.0": - version: 1.3.1 - resolution: "level-iterator-stream@npm:1.3.1" - dependencies: - inherits: "npm:^2.0.1" - level-errors: "npm:^1.0.3" - readable-stream: "npm:^1.0.33" - xtend: "npm:^4.0.0" - checksum: 10/ed9a865cc02ff2edfbc231ab8bf911f4645c0571bfadc5c55a1893435a0c9990bbf8b0176c5f5838cf4117937c6b196e09d24a14da007c25c6c00c989e92fe72 - languageName: node - linkType: hard - -"level-iterator-stream@npm:~3.0.0": - version: 3.0.1 - resolution: "level-iterator-stream@npm:3.0.1" - dependencies: - inherits: "npm:^2.0.1" - readable-stream: "npm:^2.3.6" - xtend: "npm:^4.0.0" - checksum: 10/53ff9825fcdf44f73210d3d3979add8f2ba1a928ce6313928adc6258ae58107b112b43e4632f6fedf9e0455b6ccd24969338b633f63846c0d4a8fe516495e5f2 - languageName: node - linkType: hard - -"level-iterator-stream@npm:~4.0.0": - version: 4.0.2 - resolution: "level-iterator-stream@npm:4.0.2" - dependencies: - inherits: "npm:^2.0.4" - readable-stream: "npm:^3.4.0" - xtend: "npm:^4.0.2" - checksum: 10/94990b83dda12f2b8d77398b5bc82f1d4fba99c617ae56cb01db1649827c449f746044b05a62d0a060908dc75b4f41aa6d29ae6c0188d61412e98a1fb88d32ee - languageName: node - linkType: hard - -"level-js@npm:^2.1.3": - version: 2.2.4 - resolution: "level-js@npm:2.2.4" - dependencies: - abstract-leveldown: "npm:~0.12.0" - idb-wrapper: "npm:^1.5.0" - isbuffer: "npm:~0.0.0" - ltgt: "npm:^2.1.2" - typedarray-to-buffer: "npm:~1.0.0" - xtend: "npm:~2.1.2" - checksum: 10/ca45d1be0a289cf318c7eca250bdccebc2fd96d0b725399f21a88d488f0905674e290296d97fbf54168b442a7668db0d8a7bbcdd716a8b2c509d326e13ec9315 - languageName: node - linkType: hard - -"level-js@npm:^5.0.0": - version: 5.0.2 - resolution: "level-js@npm:5.0.2" - dependencies: - abstract-leveldown: "npm:~6.2.3" - buffer: "npm:^5.5.0" - inherits: "npm:^2.0.3" - ltgt: "npm:^2.1.2" - checksum: 10/fdd4fbfaf0e336c599cd20d98cdde2d062e71fea1aa7587a7715219245edc7a9186ebf1c671f168566e1fa60c6e456b731ded933eb8a699c55994c4e5d37b5a5 - languageName: node - linkType: hard - -"level-mem@npm:^3.0.1": - version: 3.0.1 - resolution: "level-mem@npm:3.0.1" - dependencies: - level-packager: "npm:~4.0.0" - memdown: "npm:~3.0.0" - checksum: 10/e4c680922afc3c8cd4502d761ab610c8aa7bcacde2550a0a463e1db069eeb55b6b7bec0bb7fda564cec82422944776f9909fe101b0d7746ad8f4f7446ec2a5cd - languageName: node - linkType: hard - -"level-packager@npm:^5.1.0": - version: 5.1.1 - resolution: "level-packager@npm:5.1.1" - dependencies: - encoding-down: "npm:^6.3.0" - levelup: "npm:^4.3.2" - checksum: 10/b5e40fbfc611f0b63ef544bd37f1f7a28965a866a56341314ceba4d2b95fb81ac33342383eaad8332abe307b6d7c0bbe0124ef377e7200b3a02a12fd39163350 - languageName: node - linkType: hard - -"level-packager@npm:~4.0.0": - version: 4.0.1 - resolution: "level-packager@npm:4.0.1" - dependencies: - encoding-down: "npm:~5.0.0" - levelup: "npm:^3.0.0" - checksum: 10/7521845db87475daaa001bf80748c6e1c53a3a14dd1d14daaffe168c02a0d559b88b86e565ff30fef5a00368ba47a16aea3b96588831423fdc6e0252155371b3 - languageName: node - linkType: hard - -"level-peek@npm:1.0.6, level-peek@npm:^1.0.6": - version: 1.0.6 - resolution: "level-peek@npm:1.0.6" - dependencies: - level-fix-range: "npm:~1.0.2" - checksum: 10/e07d5f8b80675727204d9a226a249139da9e354e633b9d57b7a5186a7b85be445e550ca628f5133bf7a220a9311a193ded5a3f83588dc4eaa53ffb86b426154a - languageName: node - linkType: hard - -"level-sublevel@npm:^5.2.0": - version: 5.2.3 - resolution: "level-sublevel@npm:5.2.3" - dependencies: - level-fix-range: "npm:2.0" - level-hooks: "npm:>=4.4.0 <5" - string-range: "npm:~1.2.1" - xtend: "npm:~2.0.4" - checksum: 10/7b92fc51fd6a51160612512fe8f07a24895b8e89a5b58e3eb85d0665c14f1770a48d9596e1e4c0842464fb63727de7a3c089ee5d058bd2deb3b20860d8724856 - languageName: node - linkType: hard - -"level-supports@npm:^2.0.1": - version: 2.1.0 - resolution: "level-supports@npm:2.1.0" - checksum: 10/0cb4281580d45fbeb333507b8d1ad8c4216f88bb29f7409ea5a09b2444bcae4648defe7dc1d2cdf9528b92add170f954d12e1d23005a5a894b8f6894d0910bca - languageName: node - linkType: hard - -"level-supports@npm:^4.0.0": - version: 4.0.1 - resolution: "level-supports@npm:4.0.1" - checksum: 10/e2f177af813a25af29d15406a14240e2e10e5efb1c35b03643c885ac5931af760b9337826506b6395f98cf6b1e68ba294bfc345a248a1ae3f9c69e08e81824b2 - languageName: node - linkType: hard - -"level-supports@npm:~1.0.0": - version: 1.0.1 - resolution: "level-supports@npm:1.0.1" - dependencies: - xtend: "npm:^4.0.2" - checksum: 10/27c2054c483c61b098454ff20917429ba73dc9b2af5aeafd959acf7ff36c3230ec200fcc63d920710935b8f3d59d18030a93fec472e9233d28f0dc0bca8b362d - languageName: node - linkType: hard - -"level-transcoder@npm:^1.0.1": - version: 1.0.1 - resolution: "level-transcoder@npm:1.0.1" - dependencies: - buffer: "npm:^6.0.3" - module-error: "npm:^1.0.1" - checksum: 10/2fb41a1d8037fc279f851ead8cdc3852b738f1f935ac2895183cd606aae3e57008e085c7c2bd2b2d43cfd057333108cfaed604092e173ac2abdf5ab1b8333f9e - languageName: node - linkType: hard - -"level-write-stream@npm:1.0.0": - version: 1.0.0 - resolution: "level-write-stream@npm:1.0.0" - dependencies: - end-stream: "npm:~0.1.0" - checksum: 10/459edbd913adfbb3f4ab49c210a5ebb83b102098b0d949be5db598453f3af828eb64189f65933f0d0ae0353399bd0726a4b43b6aff4e1d9ce2b52d2147baba27 - languageName: node - linkType: hard - -"level-ws@npm:0.0.0": - version: 0.0.0 - resolution: "level-ws@npm:0.0.0" - dependencies: - readable-stream: "npm:~1.0.15" - xtend: "npm:~2.1.1" - checksum: 10/ee85b24c8fac8c48185af0dce6b87228c3ef941b2241793fe7201f7676a1588beb1cad5db1fbad75532628a28aaee50a4fbfd510c8da35faffc348a9fd05c272 - languageName: node - linkType: hard - -"level@npm:6.0.1": - version: 6.0.1 - resolution: "level@npm:6.0.1" - dependencies: - level-js: "npm:^5.0.0" - level-packager: "npm:^5.1.0" - leveldown: "npm:^5.4.0" - checksum: 10/c482c81a79a7cf7c21a4cb7d7c04e2716f2fead1f794e8408cb28c6ffe659600f70095b539145767511f77128aedf0811b485de24acbc8216ba07cf191a98559 - languageName: node - linkType: hard - -"level@npm:8.0.0, level@npm:^8.0.0": - version: 8.0.0 - resolution: "level@npm:8.0.0" - dependencies: - browser-level: "npm:^1.0.1" - classic-level: "npm:^1.2.0" - checksum: 10/1e7df97fe80fb158c8c1d6feeb651ee1381fd8e45af773b2bb02d3dd020fefd4f48a69d260b2d0ce9c4245ee9d8d40b8a9c49275b0b1ef6e1d4158feb5c39081 - languageName: node - linkType: hard - -"leveldown@npm:5.6.0, leveldown@npm:^5.4.0": - version: 5.6.0 - resolution: "leveldown@npm:5.6.0" - dependencies: - abstract-leveldown: "npm:~6.2.1" - napi-macros: "npm:~2.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:~4.1.0" - checksum: 10/c12100c3739223999c4b31ed803b64bb719d3b657d2ecef5a9d351f42ecf31e2ad1d48cb1259f3caa58ae051ffcc85cb248af98b15e317f29b8d21235712835f - languageName: node - linkType: hard - -"leveldown@npm:6.1.0": - version: 6.1.0 - resolution: "leveldown@npm:6.1.0" - dependencies: - abstract-leveldown: "npm:^7.2.0" - napi-macros: "npm:~2.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.3.0" - checksum: 10/f9d20c872fb82a5635499dd6a1c892020c0c836828195ac4eb1d7c4ee51686a5403a8986d018f2282a6745e9ca00e76c6552ce2d5dae6c14efbe83a99ff3ff78 - languageName: node - linkType: hard - -"levelup@npm:4.4.0, levelup@npm:^4.3.2": - version: 4.4.0 - resolution: "levelup@npm:4.4.0" - dependencies: - deferred-leveldown: "npm:~5.3.0" - level-errors: "npm:~2.0.0" - level-iterator-stream: "npm:~4.0.0" - level-supports: "npm:~1.0.0" - xtend: "npm:~4.0.0" - checksum: 10/6af62b625d216e71cef94c375c26515c58a1ea7c3c043474df6c443494c953f7191ae8f7d27791d5b86b3bcfc2b9e804e22f654ea6a90a465fb91eb6cbd17ad6 - languageName: node - linkType: hard - -"levelup@npm:^0.18.2": - version: 0.18.6 - resolution: "levelup@npm:0.18.6" - dependencies: - bl: "npm:~0.8.1" - deferred-leveldown: "npm:~0.2.0" - errno: "npm:~0.1.1" - prr: "npm:~0.0.0" - readable-stream: "npm:~1.0.26" - semver: "npm:~2.3.1" - xtend: "npm:~3.0.0" - checksum: 10/d9fd4fdd55baa73e412e3065402e6ed50314ad90294b477ebd47bb853e89231be58e012f3041683119f7de240a60fbf6359ef65054ca536e8b002b6ff31f2254 - languageName: node - linkType: hard - -"levelup@npm:^1.2.1": - version: 1.3.9 - resolution: "levelup@npm:1.3.9" - dependencies: - deferred-leveldown: "npm:~1.2.1" - level-codec: "npm:~7.0.0" - level-errors: "npm:~1.0.3" - level-iterator-stream: "npm:~1.3.0" - prr: "npm:~1.0.1" - semver: "npm:~5.4.1" - xtend: "npm:~4.0.0" - checksum: 10/2d7ce905a08b8073f3d012d66fdf7582111cc699da64772f0ebbb0dc225566674ef528d7167f6a7be9a0686a883623f638a9583c7b1a3e8cdcea40018666f2ca - languageName: node - linkType: hard - -"levelup@npm:^3.0.0": - version: 3.1.1 - resolution: "levelup@npm:3.1.1" - dependencies: - deferred-leveldown: "npm:~4.0.0" - level-errors: "npm:~2.0.0" - level-iterator-stream: "npm:~3.0.0" - xtend: "npm:~4.0.0" - checksum: 10/df3ecd82b21261c21a6e07bd780f7fc212d0988e02c0a3801e4f49fcfb6f4f277ed803c839bc8334cf21316835d43bcc33839c7d660da7d60e0728996bf78698 - languageName: node - linkType: hard - -"leven@npm:^3.1.0": - version: 3.1.0 - resolution: "leven@npm:3.1.0" - checksum: 10/638401d534585261b6003db9d99afd244dfe82d75ddb6db5c0df412842d5ab30b2ef18de471aaec70fe69a46f17b4ae3c7f01d8a4e6580ef7adb9f4273ad1e55 - languageName: node - linkType: hard - -"levn@npm:^0.3.0, levn@npm:~0.3.0": - version: 0.3.0 - resolution: "levn@npm:0.3.0" - dependencies: - prelude-ls: "npm:~1.1.2" - type-check: "npm:~0.3.2" - checksum: 10/e1c3e75b5c430d9aa4c32c83c8a611e4ca53608ca78e3ea3bf6bbd9d017e4776d05d86e27df7901baebd3afa732abede9f26f715b8c1be19e95505c7a3a7b589 - languageName: node - linkType: hard - -"levn@npm:^0.4.1": - version: 0.4.1 - resolution: "levn@npm:0.4.1" - dependencies: - prelude-ls: "npm:^1.2.1" - type-check: "npm:~0.4.0" - checksum: 10/2e4720ff79f21ae08d42374b0a5c2f664c5be8b6c8f565bb4e1315c96ed3a8acaa9de788ffed82d7f2378cf36958573de07ef92336cb5255ed74d08b8318c9ee - languageName: node - linkType: hard - -"libnpmaccess@npm:^8.0.6": - version: 8.0.6 - resolution: "libnpmaccess@npm:8.0.6" - dependencies: - npm-package-arg: "npm:^11.0.2" - npm-registry-fetch: "npm:^17.0.1" - checksum: 10/62fa6a476321268ebd379f35782d9ead8993964bd9dfc8afbd201921d9037b7bc9d956f8b2717f1247e44ab33cb7de45b556ded66144f4b3038a828299cb260d - languageName: node - linkType: hard - -"libnpmpublish@npm:^9.0.9": - version: 9.0.9 - resolution: "libnpmpublish@npm:9.0.9" - dependencies: - ci-info: "npm:^4.0.0" - normalize-package-data: "npm:^6.0.1" - npm-package-arg: "npm:^11.0.2" - npm-registry-fetch: "npm:^17.0.1" - proc-log: "npm:^4.2.0" - semver: "npm:^7.3.7" - sigstore: "npm:^2.2.0" - ssri: "npm:^10.0.6" - checksum: 10/ea1064a727938abefe345d5af1261db8bdc1e71aedabf6945187c2b3a6ef1a4c9db69747ad3ffd4ecd61ea16866890e0da1a4defcbed64e555e7dcae49e55a98 - languageName: node - linkType: hard - -"libphonenumber-js@npm:^1.10.14": - version: 1.10.49 - resolution: "libphonenumber-js@npm:1.10.49" - checksum: 10/0d6e60564cc3cae9b94ee77207e7889335f07ae1a4da908943e27b123b291d93ee79e7c9c6c9b8a9a1a53d7abbb6c78d52f13e19f1406acfe6a94d38bc196f94 - languageName: node - linkType: hard - -"libtap@npm:^1.4.0": - version: 1.4.1 - resolution: "libtap@npm:1.4.1" - dependencies: - async-hook-domain: "npm:^2.0.4" - bind-obj-methods: "npm:^3.0.0" - diff: "npm:^4.0.2" - function-loop: "npm:^2.0.1" - minipass: "npm:^3.1.5" - own-or: "npm:^1.0.0" - own-or-env: "npm:^1.0.2" - signal-exit: "npm:^3.0.4" - stack-utils: "npm:^2.0.4" - tap-parser: "npm:^11.0.0" - tap-yaml: "npm:^1.0.0" - tcompare: "npm:^5.0.6" - trivial-deferred: "npm:^1.0.1" - checksum: 10/911448d32cae54b75798fe936a0e4bd896d5f47db26cce2662620beabd5c2bd2d978e6af4cb1ca9e48a41650c777f61a27aceee7ce56dbe14efde62fb9f6f486 - languageName: node - linkType: hard - -"license-report@npm:6.4.0": - version: 6.4.0 - resolution: "license-report@npm:6.4.0" +"@hyperledger/cactus@workspace:.": + version: 0.0.0-use.local + resolution: "@hyperledger/cactus@workspace:." dependencies: - "@kessler/tableify": "npm:^1.0.2" - debug: "npm:^4.3.4" - eol: "npm:^0.9.1" - got: "npm:^12.6.0" - rc: "npm:^1.2.8" - semver: "npm:^7.3.8" - tablemark: "npm:^3.0.0" - text-table: "npm:^0.2.0" - visit-values: "npm:^2.0.0" - bin: - license-report: index.js - checksum: 10/75421d49a59f7c79e8bb59f31bdd4f69e1f8480ab1b0712f6fcf73cf03289f1722902410801922ecc8bb09e130b6766bccf61976ff19785e12c202cc60a13040 + "@babel/parser": "npm:7.24.7" + "@babel/types": "npm:7.24.7" + "@bufbuild/buf": "npm:1.30.0" + "@bufbuild/protobuf": "npm:1.10.0" + "@bufbuild/protoc-gen-es": "npm:1.8.0" + "@commitlint/cli": "npm:17.7.1" + "@commitlint/config-conventional": "npm:17.7.0" + "@connectrpc/connect": "npm:1.4.0" + "@connectrpc/protoc-gen-connect-es": "npm:1.4.0" + "@lerna-lite/cli": "npm:3.7.0" + "@lerna-lite/exec": "npm:3.7.0" + "@lerna-lite/list": "npm:3.7.0" + "@lerna-lite/publish": "npm:3.7.0" + "@lerna-lite/run": "npm:3.7.0" + "@lerna-lite/version": "npm:3.7.0" + "@openapitools/openapi-generator-cli": "npm:2.7.0" + "@redocly/openapi-core": "npm:1.15.0" + "@types/adm-zip": "npm:0.5.0" + "@types/benchmark": "npm:2.1.5" + "@types/debug": "npm:4.1.12" + "@types/fs-extra": "npm:11.0.4" + "@types/jest": "npm:29.5.3" + "@types/madge": "npm:5.0.3" + "@types/node": "npm:18.11.9" + "@types/node-fetch": "npm:2.6.4" + "@types/tape": "npm:4.13.4" + "@types/tape-promise": "npm:4.0.1" + "@types/uuid": "npm:10.0.0" + "@types/yargs": "npm:17.0.24" + "@typescript-eslint/eslint-plugin": "npm:7.1.0" + "@typescript-eslint/parser": "npm:7.1.0" + adm-zip: "npm:0.5.10" + benchmark: "npm:2.1.4" + buffer: "npm:6.0.3" + cpy-cli: "npm:4.2.0" + cross-env: "npm:7.0.3" + crypto-browserify: "npm:3.12.0" + cspell: "npm:8.10.4" + debug: "npm:4.3.5" + del: "npm:7.1.0" + del-cli: "npm:5.1.0" + depcheck: "npm:1.4.7" + es-main: "npm:1.2.0" + eslint: "npm:8.57.0" + eslint-config-prettier: "npm:9.1.0" + eslint-config-standard: "npm:17.1.0" + eslint-plugin-import: "npm:2.29.1" + eslint-plugin-node: "npm:11.1.0" + eslint-plugin-prettier: "npm:5.1.3" + eslint-plugin-promise: "npm:6.1.1" + eslint-plugin-standard: "npm:5.0.0" + fast-safe-stringify: "npm:2.1.1" + fs-extra: "npm:11.2.0" + globby: "npm:12.2.0" + google-protobuf: "npm:3.21.4" + grpc-tools: "npm:1.12.4" + grpc_tools_node_protoc_ts: "npm:5.3.3" + husky: "npm:7.0.4" + inquirer: "npm:8.2.6" + jest: "npm:29.6.2" + jest-extended: "npm:4.0.1" + json5: "npm:2.2.3" + license-report: "npm:6.4.0" + lint-staged: "npm:11.2.6" + madge: "npm:7.0.0" + make-dir-cli: "npm:3.1.0" + node-polyfill-webpack-plugin: "npm:1.1.4" + npm-run-all: "npm:4.1.5" + npm-watch: "npm:0.11.0" + openapi-types: "npm:12.1.3" + prettier: "npm:3.2.5" + protoc-gen-ts: "npm:0.8.7" + replace: "npm:1.2.2" + run-time-error: "npm:1.4.0" + run-time-error-cjs: "npm:1.4.0" + secp256k1: "npm:4.0.3" + semver-parser: "npm:4.1.4" + shebang-loader: "npm:0.0.1" + simple-git: "npm:3.19.1" + sort-package-json: "npm:1.57.0" + source-map-loader: "npm:4.0.1" + stream-browserify: "npm:3.0.0" + tap: "npm:16.3.8" + tape: "npm:5.6.6" + tape-promise: "npm:4.0.0" + ts-jest: "npm:29.1.1" + ts-loader: "npm:9.4.4" + ts-node: "npm:10.9.1" + tsx: "npm:4.16.2" + typescript: "npm:5.5.2" + web3: "npm:4.1.1" + web3-core: "npm:4.1.1" + web3-eth: "npm:4.1.1" + web3-utils: "npm:4.3.0" + webpack: "npm:5.95.0" + webpack-cli: "npm:4.10.0" + wget-improved: "npm:3.4.0" + yargs: "npm:17.7.2" + dependenciesMeta: + "@apollo/protobufjs": + built: false + "@nestjs/core": + built: false + "@openapitools/openapi-generator-cli": + built: false + "@trufflesuite/bigint-buffer": + built: false + aws-sdk: + built: false + bufferutil: + built: false + cbor: + built: false + classic-level: + built: false + core-js: + built: false + cpu-features: + built: false + deasync: + built: false + es5-ext: + built: false + esbuild: + built: false + indy-sdk: + built: false + iso-constants: + built: false + keccak: + built: false + keytar: + built: false + leveldown: + built: false + nice-napi: + built: false + nodemon: + built: false + pkcs11js: + built: false + protobufjs: + built: false + secp256k1: + built: false + sqlite3: + built: true + ssh2: + built: false + truffle: + built: false + utf-8-validate: + built: false + web3: + built: false + web3-bzz: + built: false + web3-shh: + built: false + languageName: unknown + linkType: soft + +"@inquirer/figures@npm:^1.0.3": + version: 1.0.3 + resolution: "@inquirer/figures@npm:1.0.3" + checksum: 10/fa5c46527580c64ba151e1399f91772670f5f59e47045a3d2366188ed4cab1b63b7fb2a6d40d340f622cb174ca6dd3d5e22b962811c00548f9a9b4024b105dce languageName: node linkType: hard -"license-webpack-plugin@npm:4.0.2": - version: 4.0.2 - resolution: "license-webpack-plugin@npm:4.0.2" +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" dependencies: - webpack-sources: "npm:^3.0.0" - peerDependenciesMeta: - webpack: - optional: true - webpack-sources: - optional: true - checksum: 10/b0c4cc7c6e9d14e2eff2229f0886d5ea0d9aaa3869d507b6cc6eba9597889a3f2a5e94397898bdc9589c4a94f2e97656e0bcf99baa2ce75c8f8429a44e3a697c + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10/e9ed5fd27c3aec1095e3a16e0c0cf148d1fee55a38665c35f7b3f86a9b5d00d042ddaabc98e8a1cb7463b9378c15f22a94eb35e99469c201453eb8375191f243 languageName: node linkType: hard -"light-my-request@npm:^5.11.0": - version: 5.13.0 - resolution: "light-my-request@npm:5.13.0" +"@isaacs/import-jsx@npm:^4.0.1": + version: 4.0.1 + resolution: "@isaacs/import-jsx@npm:4.0.1" dependencies: - cookie: "npm:^0.6.0" - process-warning: "npm:^3.0.0" - set-cookie-parser: "npm:^2.4.1" - checksum: 10/29407ecd0fcc240fbc4ac53457247e7f796962aaa228e9c5057bb4a7d84fda4f14eaaf39212f2dbfe0869b78a2a42ec82ec4a597a181b9ee19ac23a636c0160d + "@babel/core": "npm:^7.5.5" + "@babel/plugin-proposal-object-rest-spread": "npm:^7.5.5" + "@babel/plugin-transform-destructuring": "npm:^7.5.0" + "@babel/plugin-transform-react-jsx": "npm:^7.3.0" + caller-path: "npm:^3.0.1" + find-cache-dir: "npm:^3.2.0" + make-dir: "npm:^3.0.2" + resolve-from: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + checksum: 10/6844139a62132933246c4882ffb335f9641cc416e10a317d1d1887eee9f4a2572e5a899d19b8d5a29c102f00104def38c399e2b06582c4076228eb230de17c7d languageName: node linkType: hard -"lilconfig@npm:^2.0.3, lilconfig@npm:^2.0.5, lilconfig@npm:^2.1.0": - version: 2.1.0 - resolution: "lilconfig@npm:2.1.0" - checksum: 10/b1314a2e55319013d5e7d7d08be39015829d2764a1eaee130129545d40388499d81b1c31b0f9b3417d4db12775a88008b72ec33dd06e0184cf7503b32ca7cc0b +"@isaacs/string-locale-compare@npm:^1.1.0": + version: 1.1.0 + resolution: "@isaacs/string-locale-compare@npm:1.1.0" + checksum: 10/85682b14602f32023e487f62bc4076fe13cd3e887df9cca36acc0d41ea99b403100d586acb9367331526f3ee737d802ecaa582f59020998d75991e62a7ef0db5 languageName: node linkType: hard -"lines-and-columns@npm:^1.1.6": - version: 1.2.4 - resolution: "lines-and-columns@npm:1.2.4" - checksum: 10/0c37f9f7fa212b38912b7145e1cd16a5f3cd34d782441c3e6ca653485d326f58b3caccda66efce1c5812bde4961bbde3374fae4b0d11bf1226152337f3894aa5 +"@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: "npm:^5.3.1" + find-up: "npm:^4.1.0" + get-package-type: "npm:^0.1.0" + js-yaml: "npm:^3.13.1" + resolve-from: "npm:^5.0.0" + checksum: 10/b000a5acd8d4fe6e34e25c399c8bdbb5d3a202b4e10416e17bfc25e12bab90bb56d33db6089ae30569b52686f4b35ff28ef26e88e21e69821d2b85884bd055b8 languageName: node linkType: hard -"lines-and-columns@npm:^2.0.3": - version: 2.0.3 - resolution: "lines-and-columns@npm:2.0.3" - checksum: 10/b5bb0d6ee2f82ae834ceddc9251af2060c30db476673e9c817c34c00bed58e0c5d90a6866b64afe7bdcb2c5eb1b418a5b1ee631d2592dc8ff381540901fa4da6 +"@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b languageName: node linkType: hard -"linkify-it@npm:^5.0.0": - version: 5.0.0 - resolution: "linkify-it@npm:5.0.0" +"@jest/console@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/console@npm:29.6.2" dependencies: - uc.micro: "npm:^2.0.0" - checksum: 10/ef3b7609dda6ec0c0be8a7b879cea195f0d36387b0011660cd6711bba0ad82137f59b458b7e703ec74f11d88e7c1328e2ad9b855a8500c0ded67461a8c4519e6 + "@jest/types": "npm:^29.6.1" + "@types/node": "npm:*" + chalk: "npm:^4.0.0" + jest-message-util: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + slash: "npm:^3.0.0" + checksum: 10/8a11314aef8b85912f72952a89b50605a117b60b133a52abb247748392220db836923e5251e23650abdf6c1a373cb7e5267683249a9e83ba63f8700e66874ba4 languageName: node linkType: hard -"lint-staged@npm:11.2.6": - version: 11.2.6 - resolution: "lint-staged@npm:11.2.6" +"@jest/core@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/core@npm:29.6.2" dependencies: - cli-truncate: "npm:2.1.0" - colorette: "npm:^1.4.0" - commander: "npm:^8.2.0" - cosmiconfig: "npm:^7.0.1" - debug: "npm:^4.3.2" - enquirer: "npm:^2.3.6" - execa: "npm:^5.1.1" - listr2: "npm:^3.12.2" + "@jest/console": "npm:^29.6.2" + "@jest/reporters": "npm:^29.6.2" + "@jest/test-result": "npm:^29.6.2" + "@jest/transform": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + "@types/node": "npm:*" + ansi-escapes: "npm:^4.2.1" + chalk: "npm:^4.0.0" + ci-info: "npm:^3.2.0" + exit: "npm:^0.1.2" + graceful-fs: "npm:^4.2.9" + jest-changed-files: "npm:^29.5.0" + jest-config: "npm:^29.6.2" + jest-haste-map: "npm:^29.6.2" + jest-message-util: "npm:^29.6.2" + jest-regex-util: "npm:^29.4.3" + jest-resolve: "npm:^29.6.2" + jest-resolve-dependencies: "npm:^29.6.2" + jest-runner: "npm:^29.6.2" + jest-runtime: "npm:^29.6.2" + jest-snapshot: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + jest-validate: "npm:^29.6.2" + jest-watcher: "npm:^29.6.2" micromatch: "npm:^4.0.4" - normalize-path: "npm:^3.0.0" - please-upgrade-node: "npm:^3.2.0" - string-argv: "npm:0.3.1" - stringify-object: "npm:3.3.0" - supports-color: "npm:8.1.1" - bin: - lint-staged: bin/lint-staged.js - checksum: 10/04c588fdbd3f9209f5f1d00b8044410e0b4b84101310e8d0fd5d6bc8053f281b1276b8fa643b886060b909bcb5aa16083f421fefdf8f167c0fa5a40ee306b76d - languageName: node - linkType: hard - -"listr2@npm:^3.12.2": - version: 3.14.0 - resolution: "listr2@npm:3.14.0" - dependencies: - cli-truncate: "npm:^2.1.0" - colorette: "npm:^2.0.16" - log-update: "npm:^4.0.0" - p-map: "npm:^4.0.0" - rfdc: "npm:^1.3.0" - rxjs: "npm:^7.5.1" - through: "npm:^2.3.8" - wrap-ansi: "npm:^7.0.0" + pretty-format: "npm:^29.6.2" + slash: "npm:^3.0.0" + strip-ansi: "npm:^6.0.0" peerDependencies: - enquirer: ">= 2.3.0 < 3" + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: - enquirer: + node-notifier: optional: true - checksum: 10/cebbd692330279ea82f05468cbb0a16f5b40015a6163e0a2fb04ef168da8e2d6c54e129148e90112d92e7f9ecb85a56e6b88d867a58a8ebdf36e0c98df49ae5c - languageName: node - linkType: hard - -"lmify@npm:0.3.0": - version: 0.3.0 - resolution: "lmify@npm:0.3.0" - dependencies: - execa: "npm:^4.0.0" - fs-extra: "npm:^9.0.0" - std-env: "npm:^2.2.1" - checksum: 10/4035dee4f8b9e2e6331dee0ac5d8ebf41232168768b5fe6d22cd609d99ac79a0e4999021de22f35b934686171d9498291bd1de7d22a17d38a3974ed4f0052f8c - languageName: node - linkType: hard - -"load-json-file@npm:^1.0.0": - version: 1.1.0 - resolution: "load-json-file@npm:1.1.0" - dependencies: - graceful-fs: "npm:^4.1.2" - parse-json: "npm:^2.2.0" - pify: "npm:^2.0.0" - pinkie-promise: "npm:^2.0.0" - strip-bom: "npm:^2.0.0" - checksum: 10/bb16e169d87df38806f5ffa7efa3287921839fdfee2c20c8525f53b53ba43d14b56b6881901c04190f7da4a4ba6e0c9784d212e83ee3a32d49bb986b5a6094cb - languageName: node - linkType: hard - -"load-json-file@npm:^4.0.0": - version: 4.0.0 - resolution: "load-json-file@npm:4.0.0" - dependencies: - graceful-fs: "npm:^4.1.2" - parse-json: "npm:^4.0.0" - pify: "npm:^3.0.0" - strip-bom: "npm:^3.0.0" - checksum: 10/8f5d6d93ba64a9620445ee9bde4d98b1eac32cf6c8c2d20d44abfa41a6945e7969456ab5f1ca2fb06ee32e206c9769a20eec7002fe290de462e8c884b6b8b356 - languageName: node - linkType: hard - -"load-json-file@npm:^7.0.1": - version: 7.0.1 - resolution: "load-json-file@npm:7.0.1" - checksum: 10/a560288da6891778321ef993e4bdbdf05374a4f3a3aeedd5ba6b64672798c830d748cfc59a2ec9891a3db30e78b3d04172e0dcb0d4828168289a393147ca0e74 - languageName: node - linkType: hard - -"loader-runner@npm:^4.2.0": - version: 4.2.0 - resolution: "loader-runner@npm:4.2.0" - checksum: 10/89a648e0418f23edf2f310bf74a8adb0710548e8d8d47040def081e1b822bdc27b664b796ce43ceb7921fa56485e1f5046417e425714730dc6ea4242e7a176fa - languageName: node - linkType: hard - -"loader-utils@npm:3.2.1, loader-utils@npm:^3.2.0": - version: 3.2.1 - resolution: "loader-utils@npm:3.2.1" - checksum: 10/177f5bb9b4c651263714fcd1b50682c1367b06893462529f510287775f9e461ca27a41bf364c8dffa9cd74ed9e8b1fdb30c03a526f6bcf12573bdc1a1644d086 - languageName: node - linkType: hard - -"loader-utils@npm:^2.0.0, loader-utils@npm:^2.0.4": - version: 2.0.4 - resolution: "loader-utils@npm:2.0.4" - dependencies: - big.js: "npm:^5.2.2" - emojis-list: "npm:^3.0.0" - json5: "npm:^2.1.2" - checksum: 10/28bd9af2025b0cb2fc6c9c2d8140a75a3ab61016e5a86edf18f63732216e985a50bf2479a662555beb472a54d12292e380423705741bfd2b54cab883aa067f18 - languageName: node - linkType: hard - -"locate-path@npm:^2.0.0": - version: 2.0.0 - resolution: "locate-path@npm:2.0.0" - dependencies: - p-locate: "npm:^2.0.0" - path-exists: "npm:^3.0.0" - checksum: 10/02d581edbbbb0fa292e28d96b7de36b5b62c2fa8b5a7e82638ebb33afa74284acf022d3b1e9ae10e3ffb7658fbc49163fcd5e76e7d1baaa7801c3e05a81da755 - languageName: node - linkType: hard - -"locate-path@npm:^3.0.0": - version: 3.0.0 - resolution: "locate-path@npm:3.0.0" - dependencies: - p-locate: "npm:^3.0.0" - path-exists: "npm:^3.0.0" - checksum: 10/53db3996672f21f8b0bf2a2c645ae2c13ffdae1eeecfcd399a583bce8516c0b88dcb4222ca6efbbbeb6949df7e46860895be2c02e8d3219abd373ace3bfb4e11 - languageName: node - linkType: hard - -"locate-path@npm:^5.0.0": - version: 5.0.0 - resolution: "locate-path@npm:5.0.0" - dependencies: - p-locate: "npm:^4.1.0" - checksum: 10/83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + checksum: 10/08e3560504e491a73433cc626b3519fd90e44aa584a8faf524a93e5e563ee3433239e6612a82af98360a9d26a08aabd147325d74055ae4c25282d2df7cbe0660 languageName: node linkType: hard -"locate-path@npm:^6.0.0": - version: 6.0.0 - resolution: "locate-path@npm:6.0.0" +"@jest/environment@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/environment@npm:29.6.2" dependencies: - p-locate: "npm:^5.0.0" - checksum: 10/72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + "@jest/fake-timers": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + "@types/node": "npm:*" + jest-mock: "npm:^29.6.2" + checksum: 10/46860767a55f7982a092f31bca24be39e3a12be148dd0bbab7249dd82ce914f154f59b59aae375c661727cd5552ab769cd21e2e845288cea448e966a0c36a0c3 languageName: node linkType: hard -"locate-path@npm:^7.1.0": - version: 7.2.0 - resolution: "locate-path@npm:7.2.0" +"@jest/expect-utils@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/expect-utils@npm:29.6.2" dependencies: - p-locate: "npm:^6.0.0" - checksum: 10/1c6d269d4efec555937081be964e8a9b4a136319c79ca1d45ac6382212a8466113c75bd89e44521ca8ecd1c47fb08523b56eee5c0712bc7d14fec5f729deeb42 - languageName: node - linkType: hard - -"lodash-es@npm:^4.2.1": - version: 4.17.21 - resolution: "lodash-es@npm:4.17.21" - checksum: 10/03f39878ea1e42b3199bd3f478150ab723f93cc8730ad86fec1f2804f4a07c6e30deaac73cad53a88e9c3db33348bb8ceeb274552390e7a75d7849021c02df43 - languageName: node - linkType: hard - -"lodash.assign@npm:^4.0.3": - version: 4.2.0 - resolution: "lodash.assign@npm:4.2.0" - checksum: 10/2571d0d487375d5882ece0d94bf18807b6d9d1722ad77a84c220f27fabb6cf3e4f9109183317c95b0cb0d42dae6c2cad453a31d50c9cdcd102b3bbf1b78b1ea7 - languageName: node - linkType: hard - -"lodash.camelcase@npm:^4.3.0": - version: 4.3.0 - resolution: "lodash.camelcase@npm:4.3.0" - checksum: 10/c301cc379310441dc73cd6cebeb91fb254bea74e6ad3027f9346fc43b4174385153df420ffa521654e502fd34c40ef69ca4e7d40ee7129a99e06f306032bfc65 - languageName: node - linkType: hard - -"lodash.clonedeep@npm:^4.5.0": - version: 4.5.0 - resolution: "lodash.clonedeep@npm:4.5.0" - checksum: 10/957ed243f84ba6791d4992d5c222ffffca339a3b79dbe81d2eaf0c90504160b500641c5a0f56e27630030b18b8e971ea10b44f928a977d5ced3c8948841b555f + jest-get-type: "npm:^29.4.3" + checksum: 10/5ad8884dafa9320ff454f5898d5f79d540f3cbab86aa8b0260351081094bcbcd6bb056e4fc6aac1147f0ec3dda634b8b3491abc0035cdc28a71ff9ded8aad359 languageName: node linkType: hard -"lodash.cond@npm:^4.3.0": - version: 4.5.2 - resolution: "lodash.cond@npm:4.5.2" - checksum: 10/3c4b129baee08e97413dfed1d00d4ea72bb33d6193ad7158c10a0685433012ab4e8a938c41252c26392b8ee8871523974886ed1c58a17fe456c057f8b9cf7c02 +"@jest/expect@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/expect@npm:29.6.2" + dependencies: + expect: "npm:^29.6.2" + jest-snapshot: "npm:^29.6.2" + checksum: 10/2beed96e3d24945a72aa2ae4843c99f4c631564569258fdde6746fae3efcbfbff96dbf92ed28d6531299bd12b2766075bacaaae88ebf84b99316e77151b43a9f languageName: node linkType: hard -"lodash.debounce@npm:^4.0.8": - version: 4.0.8 - resolution: "lodash.debounce@npm:4.0.8" - checksum: 10/cd0b2819786e6e80cb9f5cda26b1a8fc073daaf04e48d4cb462fa4663ec9adb3a5387aa22d7129e48eed1afa05b482e2a6b79bfc99b86886364449500cbb00fd +"@jest/fake-timers@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/fake-timers@npm:29.6.2" + dependencies: + "@jest/types": "npm:^29.6.1" + "@sinonjs/fake-timers": "npm:^10.0.2" + "@types/node": "npm:*" + jest-message-util: "npm:^29.6.2" + jest-mock: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + checksum: 10/4a9f402bc3be311b8d7de2672c93fe97bf0726a67c7f5170ff7aa718ae333655b35177a08182a6e3920bdee5b2ec66c806b866a34641eee1ad8d01534b7fcad2 languageName: node linkType: hard -"lodash.flattendeep@npm:^4.4.0": - version: 4.4.0 - resolution: "lodash.flattendeep@npm:4.4.0" - checksum: 10/0d0b41d8d86999e8bea94905ac65347404d427aacddbc6654dc2f85905e27cd2b708139671ecea135fa6f0a17ed94b9d4cab8ce12b08eddcbb1ddd83952ee4c2 +"@jest/globals@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/globals@npm:29.6.2" + dependencies: + "@jest/environment": "npm:^29.6.2" + "@jest/expect": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + jest-mock: "npm:^29.6.2" + checksum: 10/aa4a54f19cc025205bc696546940e1fe9c752c2d4d825852088aa76d44677ebba1ec66fabb78e615480cff23a06a70b5a3f893ab5163d901cdfa0d2267870b10 languageName: node linkType: hard -"lodash.get@npm:^4.4.2": - version: 4.4.2 - resolution: "lodash.get@npm:4.4.2" - checksum: 10/2a4925f6e89bc2c010a77a802d1ba357e17ed1ea03c2ddf6a146429f2856a216663e694a6aa3549a318cbbba3fd8b7decb392db457e6ac0b83dc745ed0a17380 +"@jest/reporters@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/reporters@npm:29.6.2" + dependencies: + "@bcoe/v8-coverage": "npm:^0.2.3" + "@jest/console": "npm:^29.6.2" + "@jest/test-result": "npm:^29.6.2" + "@jest/transform": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + "@jridgewell/trace-mapping": "npm:^0.3.18" + "@types/node": "npm:*" + chalk: "npm:^4.0.0" + collect-v8-coverage: "npm:^1.0.0" + exit: "npm:^0.1.2" + glob: "npm:^7.1.3" + graceful-fs: "npm:^4.2.9" + istanbul-lib-coverage: "npm:^3.0.0" + istanbul-lib-instrument: "npm:^5.1.0" + istanbul-lib-report: "npm:^3.0.0" + istanbul-lib-source-maps: "npm:^4.0.0" + istanbul-reports: "npm:^3.1.3" + jest-message-util: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + jest-worker: "npm:^29.6.2" + slash: "npm:^3.0.0" + string-length: "npm:^4.0.1" + strip-ansi: "npm:^6.0.0" + v8-to-istanbul: "npm:^9.0.1" + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + checksum: 10/7579c1cc2e2ef50e8ed57fef33574ea46fce74b807a5bfa3704140f9e9009f60c0699ccf5400caefee95bcb1713a3550d8734123860444b53828c9657e8b7241 languageName: node linkType: hard -"lodash.includes@npm:^4.3.0": - version: 4.3.0 - resolution: "lodash.includes@npm:4.3.0" - checksum: 10/45e0a7c7838c931732cbfede6327da321b2b10482d5063ed21c020fa72b09ca3a4aa3bda4073906ab3f436cf36eb85a52ea3f08b7bab1e0baca8235b0e08fe51 +"@jest/schemas@npm:^29.4.3": + version: 29.4.3 + resolution: "@jest/schemas@npm:29.4.3" + dependencies: + "@sinclair/typebox": "npm:^0.25.16" + checksum: 10/ac754e245c19dc39e10ebd41dce09040214c96a4cd8efa143b82148e383e45128f24599195ab4f01433adae4ccfbe2db6574c90db2862ccd8551a86704b5bebd languageName: node linkType: hard -"lodash.isboolean@npm:^3.0.3": - version: 3.0.3 - resolution: "lodash.isboolean@npm:3.0.3" - checksum: 10/b70068b4a8b8837912b54052557b21fc4774174e3512ed3c5b94621e5aff5eb6c68089d0a386b7e801d679cd105d2e35417978a5e99071750aa2ed90bffd0250 +"@jest/schemas@npm:^29.6.0": + version: 29.6.0 + resolution: "@jest/schemas@npm:29.6.0" + dependencies: + "@sinclair/typebox": "npm:^0.27.8" + checksum: 10/c00511c69cf89138a7d974404d3a5060af375b5a52b9c87215d91873129b382ca11c1ff25bd6d605951404bb381ddce5f8091004a61e76457da35db1f5c51365 languageName: node linkType: hard -"lodash.isequal@npm:^4.5.0": - version: 4.5.0 - resolution: "lodash.isequal@npm:4.5.0" - checksum: 10/82fc58a83a1555f8df34ca9a2cd300995ff94018ac12cc47c349655f0ae1d4d92ba346db4c19bbfc90510764e0c00ddcc985a358bdcd4b3b965abf8f2a48a214 +"@jest/source-map@npm:^29.6.0": + version: 29.6.0 + resolution: "@jest/source-map@npm:29.6.0" + dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.18" + callsites: "npm:^3.0.0" + graceful-fs: "npm:^4.2.9" + checksum: 10/9c6c40387410bb70b2fae8124287fc28f6bdd1b2d7f24348e8611e1bb638b404518228a4ce64a582365b589c536ae8e7ebab0126cef59a87874b71061d19783b languageName: node linkType: hard -"lodash.isfunction@npm:^3.0.9": - version: 3.0.9 - resolution: "lodash.isfunction@npm:3.0.9" - checksum: 10/99e54c34b1e8a9ba75c034deb39cedbd2aca7af685815e67a2a8ec4f73ec9748cda6ebee5a07d7de4b938e90d421fd280e9c385cc190f903ac217ac8aff30314 +"@jest/test-result@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/test-result@npm:29.6.2" + dependencies: + "@jest/console": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + "@types/istanbul-lib-coverage": "npm:^2.0.0" + collect-v8-coverage: "npm:^1.0.0" + checksum: 10/68e9f639c74524ef10b9b8fc059872fa789f677ffb823f3f285d09b34d0ebc9ddb349625fe11cc3c54d41df625adce29b7a6152f8bbe99b7b3151ab533be3a64 languageName: node linkType: hard -"lodash.isinteger@npm:^4.0.4": - version: 4.0.4 - resolution: "lodash.isinteger@npm:4.0.4" - checksum: 10/c971f5a2d67384f429892715550c67bac9f285604a0dd79275fd19fef7717aec7f2a6a33d60769686e436ceb9771fd95fe7fcb68ad030fc907d568d5a3b65f70 +"@jest/test-sequencer@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/test-sequencer@npm:29.6.2" + dependencies: + "@jest/test-result": "npm:^29.6.2" + graceful-fs: "npm:^4.2.9" + jest-haste-map: "npm:^29.6.2" + slash: "npm:^3.0.0" + checksum: 10/81ca00ddcdbe10c4999efe9d751930eabfcc9aa4219e3491d47c11ff86c9d69e757315ae3d4eaf09d5456c3841d579a9eab65f21b09037e05ee60e198e869275 languageName: node linkType: hard -"lodash.isnumber@npm:^3.0.3": - version: 3.0.3 - resolution: "lodash.isnumber@npm:3.0.3" - checksum: 10/913784275b565346255e6ae6a6e30b760a0da70abc29f3e1f409081585875105138cda4a429ff02577e1bc0a7ae2a90e0a3079a37f3a04c3d6c5aaa532f4cab2 +"@jest/transform@npm:^29.6.2": + version: 29.6.2 + resolution: "@jest/transform@npm:29.6.2" + dependencies: + "@babel/core": "npm:^7.11.6" + "@jest/types": "npm:^29.6.1" + "@jridgewell/trace-mapping": "npm:^0.3.18" + babel-plugin-istanbul: "npm:^6.1.1" + chalk: "npm:^4.0.0" + convert-source-map: "npm:^2.0.0" + fast-json-stable-stringify: "npm:^2.1.0" + graceful-fs: "npm:^4.2.9" + jest-haste-map: "npm:^29.6.2" + jest-regex-util: "npm:^29.4.3" + jest-util: "npm:^29.6.2" + micromatch: "npm:^4.0.4" + pirates: "npm:^4.0.4" + slash: "npm:^3.0.0" + write-file-atomic: "npm:^4.0.2" + checksum: 10/ab1759672e460bdcc2950ab6fcc2509b40c87d022164492363553ebb5efb0ce67a1721c0aaf5dd00370d20771cb234360bd03635d72354b0fd3e959355becbd7 languageName: node linkType: hard -"lodash.isplainobject@npm:^4.0.6": - version: 4.0.6 - resolution: "lodash.isplainobject@npm:4.0.6" - checksum: 10/29c6351f281e0d9a1d58f1a4c8f4400924b4c79f18dfc4613624d7d54784df07efaff97c1ff2659f3e085ecf4fff493300adc4837553104cef2634110b0d5337 +"@jest/types@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/types@npm:29.5.0" + dependencies: + "@jest/schemas": "npm:^29.4.3" + "@types/istanbul-lib-coverage": "npm:^2.0.0" + "@types/istanbul-reports": "npm:^3.0.0" + "@types/node": "npm:*" + "@types/yargs": "npm:^17.0.8" + chalk: "npm:^4.0.0" + checksum: 10/910a134cd1c2cd7d74dfcf9981c2f1a6c1d9772edecb7738947b059c4e0bb843a0d26a3c7dfff112f2fc4a473ecc18679edda498416f0048a8d181ff43a08bee languageName: node linkType: hard -"lodash.isstring@npm:^4.0.1": - version: 4.0.1 - resolution: "lodash.isstring@npm:4.0.1" - checksum: 10/eaac87ae9636848af08021083d796e2eea3d02e80082ab8a9955309569cb3a463ce97fd281d7dc119e402b2e7d8c54a23914b15d2fc7fff56461511dc8937ba0 +"@jest/types@npm:^29.6.1": + version: 29.6.1 + resolution: "@jest/types@npm:29.6.1" + dependencies: + "@jest/schemas": "npm:^29.6.0" + "@types/istanbul-lib-coverage": "npm:^2.0.0" + "@types/istanbul-reports": "npm:^3.0.0" + "@types/node": "npm:*" + "@types/yargs": "npm:^17.0.8" + chalk: "npm:^4.0.0" + checksum: 10/f6264fb0fc60efcb95adf3c4b30be6433aae75769b4f90d09de35fb19c65f7184d6c227a75f5b9e0054368d4fbf5cc4b397f9756d9a59eee25f3247d2e020f93 languageName: node linkType: hard -"lodash.kebabcase@npm:^4.1.1": - version: 4.1.1 - resolution: "lodash.kebabcase@npm:4.1.1" - checksum: 10/d84ec5441ef8e5c718c50315f35b0a045a77c7e8ee3e54472c06dc31f6f3602e95551a16c0923d689198b51deb8902c4bbc54fc9b965b26c1f86e21df3a05f34 +"@jridgewell/gen-mapping@npm:^0.3.0": + version: 0.3.3 + resolution: "@jridgewell/gen-mapping@npm:0.3.3" + dependencies: + "@jridgewell/set-array": "npm:^1.0.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.9" + checksum: 10/072ace159c39ab85944bdabe017c3de15c5e046a4a4a772045b00ff05e2ebdcfa3840b88ae27e897d473eb4d4845b37be3c78e28910c779f5aeeeae2fb7f0cc2 languageName: node linkType: hard -"lodash.lowercase@npm:^4.3.0": - version: 4.3.0 - resolution: "lodash.lowercase@npm:4.3.0" - checksum: 10/9c809375a3e6f5a49e9a4c639d20763cab40ecdf33256627a3607b5e0fb13a065113a9f093ab256b6495f857c2d29e8f1a2416da56f000bab192a7ced51ceb7e +"@jridgewell/gen-mapping@npm:^0.3.2": + version: 0.3.2 + resolution: "@jridgewell/gen-mapping@npm:0.3.2" + dependencies: + "@jridgewell/set-array": "npm:^1.0.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.9" + checksum: 10/7ba0070be1aeda7d7694b09d847c3b95879409b26559b9d7e97a88ec94b838fb380df43ae328ee2d2df4d79e75d7afe6ba315199d18d79aa20839ebdfb739420 languageName: node linkType: hard -"lodash.lowerfirst@npm:^4.3.1": - version: 4.3.1 - resolution: "lodash.lowerfirst@npm:4.3.1" - checksum: 10/4aa96e391ef12a8fc47b54f9843554c96c4aad44e63005df1dd5ad12a5f6c9108ac612031d7f5fc39571cb172840c2899f8c4b806c17ce3a4fed84da5a5df7e8 +"@jridgewell/resolve-uri@npm:3.1.0": + version: 3.1.0 + resolution: "@jridgewell/resolve-uri@npm:3.1.0" + checksum: 10/320ceb37af56953757b28e5b90c34556157676d41e3d0a3ff88769274d62373582bb0f0276a4f2d29c3f4fdd55b82b8be5731f52d391ad2ecae9b321ee1c742d languageName: node linkType: hard -"lodash.memoize@npm:4.x, lodash.memoize@npm:^4.1.2": - version: 4.1.2 - resolution: "lodash.memoize@npm:4.1.2" - checksum: 10/192b2168f310c86f303580b53acf81ab029761b9bd9caa9506a019ffea5f3363ea98d7e39e7e11e6b9917066c9d36a09a11f6fe16f812326390d8f3a54a1a6da +"@jridgewell/resolve-uri@npm:^3.0.3": + version: 3.0.5 + resolution: "@jridgewell/resolve-uri@npm:3.0.5" + checksum: 10/66da0c14dfaebd3481ac363306eefa45aca6779f8635df7337b97c18873853a7e2946d79104fad3e2ab832fe438ebabcaa2091e55e069a81b35001fa6738f532 languageName: node linkType: hard -"lodash.merge@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.merge@npm:4.6.2" - checksum: 10/d0ea2dd0097e6201be083865d50c3fb54fbfbdb247d9cc5950e086c991f448b7ab0cdab0d57eacccb43473d3f2acd21e134db39f22dac2d6c9ba6bf26978e3d6 +"@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d languageName: node linkType: hard -"lodash.mergewith@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.mergewith@npm:4.6.2" - checksum: 10/aea75a4492541a4902ac7e551dc6c54b722da0c187f84385d02e8fc33a7ae3454b837822446e5f63fcd5ad1671534ea408740b776670ea4d9c7890b10105fce0 +"@jridgewell/set-array@npm:^1.0.1": + version: 1.1.2 + resolution: "@jridgewell/set-array@npm:1.1.2" + checksum: 10/69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e languageName: node linkType: hard -"lodash.once@npm:^4.0.0": - version: 4.1.1 - resolution: "lodash.once@npm:4.1.1" - checksum: 10/202f2c8c3d45e401b148a96de228e50ea6951ee5a9315ca5e15733d5a07a6b1a02d9da1e7fdf6950679e17e8ca8f7190ec33cae47beb249b0c50019d753f38f3 +"@jridgewell/source-map@npm:^0.3.3": + version: 0.3.5 + resolution: "@jridgewell/source-map@npm:0.3.5" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.0" + "@jridgewell/trace-mapping": "npm:^0.3.9" + checksum: 10/73838ac43235edecff5efc850c0d759704008937a56b1711b28c261e270fe4bf2dc06d0b08663aeb1ab304f81f6de4f5fb844344403cf53ba7096967a9953cae languageName: node linkType: hard -"lodash.pad@npm:^4.5.1": - version: 4.5.1 - resolution: "lodash.pad@npm:4.5.1" - checksum: 10/00b965e1152131cb24adecd8240d63e7fe1ea098b5077be28681a3fc0f37dbad23898bb95746ffe4e70a7bf66a66bba3642ee54bd1ec64942b8cde7236976fd9 +"@jridgewell/sourcemap-codec@npm:1.4.14": + version: 1.4.14 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.14" + checksum: 10/26e768fae6045481a983e48aa23d8fcd23af5da70ebd74b0649000e815e7fbb01ea2bc088c9176b3fffeb9bec02184e58f46125ef3320b30eaa1f4094cfefa38 languageName: node linkType: hard -"lodash.padend@npm:^4.6.1": - version: 4.6.1 - resolution: "lodash.padend@npm:4.6.1" - checksum: 10/9553cdc2ca89c8ea2904757cbbc2aff8eae65b6712486e68251090c8ac118729c0bb8572bc19bcbb70805866e4350f5560662f634132d479b487a3ed7db4a536 +"@jridgewell/sourcemap-codec@npm:^1.4.10": + version: 1.4.11 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.11" + checksum: 10/591ca7f7884a51643e713b1b623c6c7d751bdc78d61b6cda1dcf7de1287e7f0530514c3f2c7d443273ddc8687637a95cd19f5d8986b32e2349d0f7310623df40 languageName: node linkType: hard -"lodash.padstart@npm:^4.6.1": - version: 4.6.1 - resolution: "lodash.padstart@npm:4.6.1" - checksum: 10/2005941fffed0e884b0649f496b77f2a11614d9113c33a7fe50c2be3338da42fcd19a50b6519a450a2ac4bcccddb5604e424ee001e98a9d829c7289a32480175 +"@jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15": + version: 1.4.15 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" + checksum: 10/89960ac087781b961ad918978975bcdf2051cd1741880469783c42de64239703eab9db5230d776d8e6a09d73bb5e4cb964e07d93ee6e2e7aea5a7d726e865c09 languageName: node linkType: hard -"lodash.repeat@npm:^4.1.0": - version: 4.1.0 - resolution: "lodash.repeat@npm:4.1.0" - checksum: 10/1d2f3f436e929b7917a3fc0eaddba3839bffd84ccc63e98697a1b7566cb9aed605cae340e8d062408da9ed32f8876c6aad192c80c52e51818064bc41100a2d70 +"@jridgewell/trace-mapping@npm:0.3.9": + version: 0.3.9 + resolution: "@jridgewell/trace-mapping@npm:0.3.9" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.0.3" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + checksum: 10/83deafb8e7a5ca98993c2c6eeaa93c270f6f647a4c0dc00deb38c9cf9b2d3b7bf15e8839540155247ef034a052c0ec4466f980bf0c9e2ab63b97d16c0cedd3ff languageName: node linkType: hard -"lodash.snakecase@npm:^4.1.1": - version: 4.1.1 - resolution: "lodash.snakecase@npm:4.1.1" - checksum: 10/82ed40935d840477ef8fee64f9f263f75989c6cde36b84aae817246d95826228e1b5a7f6093c51de324084f86433634c7af244cb89496633cacfe443071450d0 +"@jridgewell/trace-mapping@npm:^0.3.0": + version: 0.3.4 + resolution: "@jridgewell/trace-mapping@npm:0.3.4" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.0.3" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + checksum: 10/2f47f796000ddb956b8fc43b60515594adfba867747d982da83dac0790147027902486ebc997e78944ca7531b0fc091ce8a105f9a863fba3fffa79b1a976fee6 languageName: node linkType: hard -"lodash.sortby@npm:^4.7.0": - version: 4.7.0 - resolution: "lodash.sortby@npm:4.7.0" - checksum: 10/38df19ae28608af2c50ac342fc1f414508309d53e1d58ed9adfb2c3cd17c3af290058c0a0478028d932c5404df3d53349d19fa364ef6bed6145a6bc21320399e +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.18": + version: 0.3.18 + resolution: "@jridgewell/trace-mapping@npm:0.3.18" + dependencies: + "@jridgewell/resolve-uri": "npm:3.1.0" + "@jridgewell/sourcemap-codec": "npm:1.4.14" + checksum: 10/f4fabdddf82398a797bcdbb51c574cd69b383db041a6cae1a6a91478681d6aab340c01af655cfd8c6e01cde97f63436a1445f08297cdd33587621cf05ffa0d55 languageName: node linkType: hard -"lodash.startcase@npm:^4.4.0": - version: 4.4.0 - resolution: "lodash.startcase@npm:4.4.0" - checksum: 10/3091048a54a2f92bcf2c6441d2bd9a706fb133d5f461ae7c310d6dca1530338a06c91e9e42a5b14b12e875ddae1814d448050dc02afe2cec09b3995d8e836837 +"@jridgewell/trace-mapping@npm:^0.3.17": + version: 0.3.17 + resolution: "@jridgewell/trace-mapping@npm:0.3.17" + dependencies: + "@jridgewell/resolve-uri": "npm:3.1.0" + "@jridgewell/sourcemap-codec": "npm:1.4.14" + checksum: 10/790d439c9b271d9fc381dc4a837393ab942920245efedd5db20f65a665c0f778637fa623573337d3241ff784ffdb6724bbadf7fa2b61666bcd4884064b02f113 languageName: node linkType: hard -"lodash.trim@npm:^4.5.1": - version: 4.5.1 - resolution: "lodash.trim@npm:4.5.1" - checksum: 10/05bb421380c7565a13f678797521c53dd468759f52a76b039e91ac8d24415f163d89a5c45ec24fe81eeff82b15cfb47a346981c5f0b9a0aa3cfbb45b3e5ff70c +"@jridgewell/trace-mapping@npm:^0.3.20": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc languageName: node linkType: hard -"lodash.trimend@npm:^4.5.1": - version: 4.5.1 - resolution: "lodash.trimend@npm:4.5.1" - checksum: 10/287fab90bcfe7770fa901154aabef6e13b99eeb3b599e47bc71b306949dfb672979f7c98822830311e2acadd21fcae8a5b40b18b22a903f5dab9e6a7a3e0ba3c +"@jridgewell/trace-mapping@npm:^0.3.9": + version: 0.3.13 + resolution: "@jridgewell/trace-mapping@npm:0.3.13" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.0.3" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + checksum: 10/b563ad016492becc14ec1df0edc0276087049df6974d95594ec2e5215d8ec241159d7f4aecb4e2197154732ba97982988e9accbaf496bc365fbb4506b67929f9 languageName: node linkType: hard -"lodash.trimstart@npm:^4.5.1": - version: 4.5.1 - resolution: "lodash.trimstart@npm:4.5.1" - checksum: 10/66280d921c5221aed6bc96d698923c6d7eb97aa14923ff528ae6ffb5454eee495e8a3c1525ca149d85c428543b014ca141c31f6021ac1cd444aa54f1f7f398a6 +"@js-sdsl/ordered-map@npm:^4.4.2": + version: 4.4.2 + resolution: "@js-sdsl/ordered-map@npm:4.4.2" + checksum: 10/ac64e3f0615ecc015461c9f527f124d2edaa9e68de153c1e270c627e01e83d046522d7e872692fd57a8c514578b539afceff75831c0d8b2a9a7a347fbed35af4 languageName: node linkType: hard -"lodash.uniq@npm:^4.5.0": - version: 4.5.0 - resolution: "lodash.uniq@npm:4.5.0" - checksum: 10/86246ca64ac0755c612e5df6d93cfe92f9ecac2e5ff054b965efbbb1d9a647b6310969e78545006f70f52760554b03233ad0103324121ae31474c20d5f7a2812 +"@kessler/tableify@npm:^1.0.2": + version: 1.0.2 + resolution: "@kessler/tableify@npm:1.0.2" + checksum: 10/705d5218559bcbcde2a3a7908f42f0738f92a4d703d687e4a1f716fd9215e8bee5a326d8181b9f3e783fb3713a7bee65bdbe3cf0ef339cb3e51ec5fa6a2bf467 languageName: node linkType: hard -"lodash.uppercase@npm:^4.3.0": - version: 4.3.0 - resolution: "lodash.uppercase@npm:4.3.0" - checksum: 10/911e99a3f16ce9b1c8a2039e8aa561549258ee7f270023e9db95e14c83944a9a5bd219acda1c220c8c9e99eb18fbf37dff6601dd20229f458bc5c1487747d5cf +"@kwsites/file-exists@npm:^1.1.1": + version: 1.1.1 + resolution: "@kwsites/file-exists@npm:1.1.1" + dependencies: + debug: "npm:^4.1.1" + checksum: 10/4ff945de7293285133aeae759caddc71e73c4a44a12fac710fdd4f574cce2671a3f89d8165fdb03d383cfc97f3f96f677d8de3c95133da3d0e12a123a23109fe languageName: node linkType: hard -"lodash.upperfirst@npm:^4.3.1": - version: 4.3.1 - resolution: "lodash.upperfirst@npm:4.3.1" - checksum: 10/3e849d4eb4dbf26faee6435edda8e707b65a5dbd2f10f8def5a16a57bbbf38d3b7506950f0dd455e9c46ba73af35f1de75df4ef83952106949413d64eed59333 +"@kwsites/promise-deferred@npm:^1.1.1": + version: 1.1.1 + resolution: "@kwsites/promise-deferred@npm:1.1.1" + checksum: 10/07455477a0123d9a38afb503739eeff2c5424afa8d3dbdcc7f9502f13604488a4b1d9742fc7288832a52a6422cf1e1c0a1d51f69a39052f14d27c9a0420b6629 languageName: node linkType: hard -"lodash@npm:>=4.17.21": - version: 4.17.21 - resolution: "lodash@npm:4.17.21" - checksum: 10/c08619c038846ea6ac754abd6dd29d2568aa705feb69339e836dfa8d8b09abbb2f859371e86863eda41848221f9af43714491467b5b0299122431e202bb0c532 +"@lerna-lite/cli@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/cli@npm:3.7.0" + dependencies: + "@lerna-lite/core": "npm:3.7.0" + "@lerna-lite/init": "npm:3.7.0" + "@lerna-lite/npmlog": "npm:3.7.0" + dedent: "npm:^1.5.3" + dotenv: "npm:^16.4.5" + import-local: "npm:^3.1.0" + load-json-file: "npm:^7.0.1" + yargs: "npm:^17.7.2" + peerDependenciesMeta: + "@lerna-lite/exec": + optional: true + "@lerna-lite/list": + optional: true + "@lerna-lite/publish": + optional: true + "@lerna-lite/run": + optional: true + "@lerna-lite/version": + optional: true + "@lerna-lite/watch": + optional: true + bin: + lerna: dist/cli.js + checksum: 10/744c0c748ea1959ea302f3c70800af4de365516952a3d5519a28e69f9c16a1ba14dda289fd509412239851dc06bd3c7e845da48087400c4d16c2df1866ee25fc languageName: node linkType: hard -"log-symbols@npm:4.1.0, log-symbols@npm:^4.1.0": - version: 4.1.0 - resolution: "log-symbols@npm:4.1.0" +"@lerna-lite/core@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/core@npm:3.7.0" dependencies: - chalk: "npm:^4.1.0" - is-unicode-supported: "npm:^0.1.0" - checksum: 10/fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + "@lerna-lite/npmlog": "npm:^3.7.0" + "@npmcli/run-script": "npm:^8.1.0" + chalk: "npm:^5.3.0" + clone-deep: "npm:^4.0.1" + config-chain: "npm:^1.1.13" + cosmiconfig: "npm:^9.0.0" + dedent: "npm:^1.5.3" + execa: "npm:^8.0.1" + fs-extra: "npm:^11.2.0" + glob-parent: "npm:^6.0.2" + globby: "npm:^14.0.2" + inquirer: "npm:^9.3.4" + is-ci: "npm:^3.0.1" + json5: "npm:^2.2.3" + load-json-file: "npm:^7.0.1" + minimatch: "npm:^9.0.5" + npm-package-arg: "npm:^11.0.2" + p-map: "npm:^7.0.2" + p-queue: "npm:^8.0.1" + resolve-from: "npm:^5.0.0" + semver: "npm:^7.6.2" + slash: "npm:^5.1.0" + strong-log-transformer: "npm:^2.1.0" + write-file-atomic: "npm:^5.0.1" + write-json-file: "npm:^5.0.0" + write-package: "npm:^7.0.1" + checksum: 10/5fb81c515c4d5c7053e3ced88a5c58455e72d52e1204db85f3c6f07183001fcdcd12af41fb0489ec470c053ba78a583667740e18fdf2f819640f8cd4640538b5 languageName: node linkType: hard -"log-symbols@npm:^3.0.0": - version: 3.0.0 - resolution: "log-symbols@npm:3.0.0" +"@lerna-lite/exec@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/exec@npm:3.7.0" dependencies: - chalk: "npm:^2.4.2" - checksum: 10/f2322e1452d819050b11aad247660e1494f8b2219d40a964af91d5f9af1a90636f1b3d93f2952090e42af07cc5550aecabf6c1d8ec1181207e95cb66ba112361 + "@lerna-lite/cli": "npm:3.7.0" + "@lerna-lite/core": "npm:3.7.0" + "@lerna-lite/filter-packages": "npm:3.7.0" + "@lerna-lite/profiler": "npm:3.7.0" + chalk: "npm:^5.3.0" + dotenv: "npm:^16.4.5" + p-map: "npm:^7.0.2" + checksum: 10/b27fdd59bf2d8d89277ff3d0087e6dbc77bac4822d4fe794abfe42be549a237922a165190a6e5e1f6c3b248430e78f189181376e3208b7f5210d0be3bb264cd5 languageName: node linkType: hard -"log-update@npm:^4.0.0": - version: 4.0.0 - resolution: "log-update@npm:4.0.0" +"@lerna-lite/filter-packages@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/filter-packages@npm:3.7.0" dependencies: - ansi-escapes: "npm:^4.3.0" - cli-cursor: "npm:^3.1.0" - slice-ansi: "npm:^4.0.0" - wrap-ansi: "npm:^6.2.0" - checksum: 10/ae2f85bbabc1906034154fb7d4c4477c79b3e703d22d78adee8b3862fa913942772e7fa11713e3d96fb46de4e3cabefbf5d0a544344f03b58d3c4bff52aa9eb2 + "@lerna-lite/core": "npm:3.7.0" + "@lerna-lite/npmlog": "npm:^3.7.0" + multimatch: "npm:^7.0.0" + checksum: 10/1d1dac59dd7e1d4aa1f4df9106c7e57946846b7772392541990f58558c2fb185dfe373c3aadf2f676a41b12df6564f133ad6049fad57626cec78c648c47e190f languageName: node linkType: hard -"log4js@npm:6.4.0": - version: 6.4.0 - resolution: "log4js@npm:6.4.0" +"@lerna-lite/init@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/init@npm:3.7.0" dependencies: - date-format: "npm:^4.0.3" - debug: "npm:^4.3.3" - flatted: "npm:^3.2.4" - rfdc: "npm:^1.3.0" - streamroller: "npm:^3.0.2" - checksum: 10/e26891934bb7b0d0ad0db1c23031c8805ad60034b68af4e9ce1d923295f248c21f0fbce7d29befcae60ba006863d9f7624f27588e8b974c2487178d5232deeb1 + "@lerna-lite/core": "npm:3.7.0" + fs-extra: "npm:^11.2.0" + p-map: "npm:^7.0.2" + write-json-file: "npm:^5.0.0" + checksum: 10/6661f877074dea63ba2b1feb6ea2633b59770a8d962b2e4351004742e6974b4d81d3f11fae2f07f54820b0fbb78bc98b7cacfa3e54b460479d6aee8a41cb143c languageName: node linkType: hard -"log4js@npm:6.4.1": - version: 6.4.1 - resolution: "log4js@npm:6.4.1" +"@lerna-lite/list@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/list@npm:3.7.0" dependencies: - date-format: "npm:^4.0.3" - debug: "npm:^4.3.3" - flatted: "npm:^3.2.4" - rfdc: "npm:^1.3.0" - streamroller: "npm:^3.0.2" - checksum: 10/cdb1279da22d8677d80ff7537a28c9a5014eeabe7bd3afb8ea42150f9d988dbc6f2334ce7f49eec587534a75d91defed6ae0f33fe66a35348ab61fdb5b3d60b2 + "@lerna-lite/cli": "npm:3.7.0" + "@lerna-lite/core": "npm:3.7.0" + "@lerna-lite/filter-packages": "npm:3.7.0" + "@lerna-lite/listable": "npm:3.7.0" + checksum: 10/66fc8204f93a3c557dd78cb30d3eecc1ea9d100e2e1af14f6f2daf523c1aa88cae9b77167af0498dd0adaaaaac1bd6a1e13fe82501ac977a4ed14f24ea32a7d6 languageName: node linkType: hard -"log4js@npm:6.9.1": - version: 6.9.1 - resolution: "log4js@npm:6.9.1" +"@lerna-lite/listable@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/listable@npm:3.7.0" dependencies: - date-format: "npm:^4.0.14" - debug: "npm:^4.3.4" - flatted: "npm:^3.2.7" - rfdc: "npm:^1.3.0" - streamroller: "npm:^3.1.5" - checksum: 10/421fb9c1e5a8859a810a40c9ee01fb8e4dfc2fed838049946e67c0064d197bdf76ca43b8fc45df50c5d709e6fc4f218d314f189a0feb8be0c48bdae80cb0934c + "@lerna-lite/core": "npm:3.7.0" + chalk: "npm:^5.3.0" + columnify: "npm:^1.6.0" + checksum: 10/c735f9e9501374c9b65816648d2ee52619034eb3e214e10d49e8f3b4fdfde1d554bb35a531f064c21bda981b987a8cf8aabae89b11ab064135a189ea27ea48e0 languageName: node linkType: hard -"logform@npm:^2.3.2, logform@npm:^2.4.0": - version: 2.4.0 - resolution: "logform@npm:2.4.0" +"@lerna-lite/npmlog@npm:3.7.0, @lerna-lite/npmlog@npm:^3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/npmlog@npm:3.7.0" dependencies: - "@colors/colors": "npm:1.5.0" - fecha: "npm:^4.2.0" - ms: "npm:^2.1.1" - safe-stable-stringify: "npm:^2.3.1" - triple-beam: "npm:^1.3.0" - checksum: 10/6f24e316b00e05cc90e4f5641345edb2f1c566805ff5bed0ec4a61fb1f4240e983a6c21d7d6d8ca604a33193b89a321154e8ceec86dc43fa48a988765e5ca453 + aproba: "npm:^2.0.0" + color-support: "npm:^1.1.3" + console-control-strings: "npm:^1.1.0" + has-unicode: "npm:^2.0.1" + set-blocking: "npm:^2.0.0" + signal-exit: "npm:^4.1.0" + string-width: "npm:^7.2.0" + strip-ansi: "npm:^7.1.0" + wide-align: "npm:^1.1.5" + checksum: 10/c8a33b9ab870bb4acd7820a61873ec45c763936aa1309a3874c7b6e06beaf490070e1a479953769ad9161f1d84aa3093fb9d70ce285bc08d9ddb98cac2d9bd4a languageName: node linkType: hard -"loglevel-plugin-prefix@npm:0.8.4": - version: 0.8.4 - resolution: "loglevel-plugin-prefix@npm:0.8.4" - checksum: 10/23db44ee8e820c9a9e8df5d28499998ecbd90559ce29d2439cd6f69e181ed8605090f61ae8e25aa86a9a760c14a3ae23e363bc6df48d8c90bb120a2bafa4424e +"@lerna-lite/profiler@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/profiler@npm:3.7.0" + dependencies: + "@lerna-lite/core": "npm:3.7.0" + "@lerna-lite/npmlog": "npm:3.7.0" + fs-extra: "npm:^11.2.0" + upath: "npm:^2.0.1" + checksum: 10/15011f22dd639eb0f9488019f954c348b4f7d96945bd226d605fe3816f044af5d09ad47f9049c3f9b52f2a7573b8b9523d89d58b26ee2d4d48d9f3d41c5da7ab languageName: node linkType: hard -"loglevel@npm:1.7.1": - version: 1.7.1 - resolution: "loglevel@npm:1.7.1" - checksum: 10/f202a6348c98f65ff970f8b9fa0a9a6001206c134732bd50ceaff0ac6585534349a482043909ee22caffcec57a89422ae39773dbe7a6f108b0e4409dd26ed387 +"@lerna-lite/publish@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/publish@npm:3.7.0" + dependencies: + "@lerna-lite/cli": "npm:3.7.0" + "@lerna-lite/core": "npm:3.7.0" + "@lerna-lite/npmlog": "npm:^3.7.0" + "@lerna-lite/version": "npm:3.7.0" + "@npmcli/arborist": "npm:^7.5.3" + "@npmcli/package-json": "npm:^5.2.0" + byte-size: "npm:^8.1.1" + chalk: "npm:^5.3.0" + columnify: "npm:^1.6.0" + fs-extra: "npm:^11.2.0" + glob: "npm:^10.4.2" + has-unicode: "npm:^2.0.1" + libnpmaccess: "npm:^8.0.6" + libnpmpublish: "npm:^9.0.9" + normalize-path: "npm:^3.0.0" + npm-package-arg: "npm:^11.0.2" + npm-packlist: "npm:^8.0.2" + npm-registry-fetch: "npm:^17.1.0" + p-map: "npm:^7.0.2" + p-pipe: "npm:^4.0.0" + pacote: "npm:^18.0.6" + semver: "npm:^7.6.2" + ssri: "npm:^10.0.6" + tar: "npm:^6.2.1" + temp-dir: "npm:^3.0.0" + checksum: 10/ca9221b0bfbd12e90c300c82ca7b6db355c5c2bb99f481b47ecf01756e5604eb919568b4b9f9393f7472b28bfca5f1506b89ba6019e0de13448794a2f6af1715 languageName: node linkType: hard -"loglevel@npm:1.8.1, loglevel@npm:^1.6.8": - version: 1.8.1 - resolution: "loglevel@npm:1.8.1" - checksum: 10/36a786082a7e4f1d962de330122291da3a102b88dbde81a45eb92a045c38b0903783958ba39dce641440c0413da303410e7f2565f897bccad828853bd5974c86 +"@lerna-lite/run@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/run@npm:3.7.0" + dependencies: + "@lerna-lite/cli": "npm:3.7.0" + "@lerna-lite/core": "npm:3.7.0" + "@lerna-lite/filter-packages": "npm:3.7.0" + "@lerna-lite/npmlog": "npm:3.7.0" + "@lerna-lite/profiler": "npm:3.7.0" + chalk: "npm:^5.3.0" + fs-extra: "npm:^11.2.0" + p-map: "npm:^7.0.2" + checksum: 10/044311de3b629fd8b21dea322ea3e0182a5d608bf3f2bf52311ce4a5e79800f5860e2a0facfec84e0bb01bdd61aa9b3a3d42c1ac3ae315743cdbfd3ede64b299 languageName: node linkType: hard -"lolex@npm:^2.7.5": - version: 2.7.5 - resolution: "lolex@npm:2.7.5" - checksum: 10/ebdb87d7d81411f569d6f4d7039ee4107929ac4e1a65eb42f0225690efadc1fb5498e8d1092f9e62b6e587773d3db5dc77618b53099606cb2aa4ff88854a3c32 +"@lerna-lite/version@npm:3.7.0": + version: 3.7.0 + resolution: "@lerna-lite/version@npm:3.7.0" + dependencies: + "@lerna-lite/cli": "npm:3.7.0" + "@lerna-lite/core": "npm:3.7.0" + "@lerna-lite/npmlog": "npm:^3.7.0" + "@octokit/plugin-enterprise-rest": "npm:^6.0.1" + "@octokit/rest": "npm:^21.0.0" + chalk: "npm:^5.3.0" + conventional-changelog-angular: "npm:^7.0.0" + conventional-changelog-core: "npm:^7.0.0" + conventional-changelog-writer: "npm:^7.0.1" + conventional-commits-parser: "npm:^5.0.0" + conventional-recommended-bump: "npm:^9.0.0" + dedent: "npm:^1.5.3" + fs-extra: "npm:^11.2.0" + get-stream: "npm:^9.0.1" + git-url-parse: "npm:^14.0.0" + graceful-fs: "npm:^4.2.11" + is-stream: "npm:^4.0.1" + load-json-file: "npm:^7.0.1" + make-dir: "npm:^5.0.0" + minimatch: "npm:^9.0.5" + new-github-release-url: "npm:^2.0.0" + node-fetch: "npm:^3.3.2" + npm-package-arg: "npm:^11.0.2" + p-limit: "npm:^6.0.0" + p-map: "npm:^7.0.2" + p-pipe: "npm:^4.0.0" + p-reduce: "npm:^3.0.0" + pify: "npm:^6.1.0" + semver: "npm:^7.6.2" + slash: "npm:^5.1.0" + temp-dir: "npm:^3.0.0" + uuid: "npm:^10.0.0" + write-json-file: "npm:^5.0.0" + checksum: 10/bb9002808578a05f5c7ffcb127f25f3e0a2846fc351a48377f21eea9f27ea5c6722ea4d599ec9299adb1195516cc7c6b7d075b1377fa6043984fd4290867de2d languageName: node linkType: hard -"lolex@npm:^5.0.1": - version: 5.1.2 - resolution: "lolex@npm:5.1.2" +"@ljharb/resumer@npm:^0.0.1": + version: 0.0.1 + resolution: "@ljharb/resumer@npm:0.0.1" dependencies: - "@sinonjs/commons": "npm:^1.7.0" - checksum: 10/ca8681fcb60e285eb317084876d8a46a58d8a0c62b966bb77b69527a807d9430abdd5b7a4fae6c824aa05a06a48402f17192d59b87eac99bca1a74eb82460b73 + "@ljharb/through": "npm:^2.3.9" + checksum: 10/fb23e016164614eaf0f7893a27f6f463d9a44c1b91e736adc9520f4f40b721a2f2865af9b8ae7486f632ee8a4291807795c6e38731677bf74e55140a7ed3cd7e languageName: node linkType: hard -"long@npm:5.2.3, long@npm:^5.0.0, long@npm:^5.2.3": - version: 5.2.3 - resolution: "long@npm:5.2.3" - checksum: 10/9167ec6947a825b827c30da169a7384eec6c0c9ec2f0b9c74da2e93d81159bbe39fb09c3f13dae9721d4b807ccfa09797a7dd1012f5d478e3e33ca3c78b608e6 +"@ljharb/through@npm:^2.3.9": + version: 2.3.9 + resolution: "@ljharb/through@npm:2.3.9" + checksum: 10/e767600d91fde814ee1742ec0dc3181ca82cd01e030c234246d30b86e60717401fed739f900196bd0b69222e3655fc6c0271eec954a43ace55795fc20711e292 languageName: node linkType: hard -"long@npm:^4.0.0": - version: 4.0.0 - resolution: "long@npm:4.0.0" - checksum: 10/8296e2ba7bab30f9cfabb81ebccff89c819af6a7a78b4bb5a70ea411aa764ee0532f7441381549dfa6a1a98d72abe9138bfcf99f4fa41238629849bc035b845b +"@lukeed/csprng@npm:^1.0.0": + version: 1.1.0 + resolution: "@lukeed/csprng@npm:1.1.0" + checksum: 10/926f5f7fc629470ca9a8af355bfcd0271d34535f7be3890f69902432bddc3262029bb5dbe9025542cf6c9883d878692eef2815fc2f3ba5b92e9da1f9eba2e51b languageName: node linkType: hard -"loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0": - version: 1.4.0 - resolution: "loose-envify@npm:1.4.0" +"@mapbox/node-pre-gyp@npm:^1.0.5": + version: 1.0.11 + resolution: "@mapbox/node-pre-gyp@npm:1.0.11" dependencies: - js-tokens: "npm:^3.0.0 || ^4.0.0" + detect-libc: "npm:^2.0.0" + https-proxy-agent: "npm:^5.0.0" + make-dir: "npm:^3.1.0" + node-fetch: "npm:^2.6.7" + nopt: "npm:^5.0.0" + npmlog: "npm:^5.0.1" + rimraf: "npm:^3.0.2" + semver: "npm:^7.3.5" + tar: "npm:^6.1.11" bin: - loose-envify: cli.js - checksum: 10/6517e24e0cad87ec9888f500c5b5947032cdfe6ef65e1c1936a0c48a524b81e65542c9c3edc91c97d5bddc806ee2a985dbc79be89215d613b1de5db6d1cfe6f4 + node-pre-gyp: bin/node-pre-gyp + checksum: 10/59529a2444e44fddb63057152452b00705aa58059079191126c79ac1388ae4565625afa84ed4dd1bf017d1111ab6e47907f7c5192e06d83c9496f2f3e708680a languageName: node linkType: hard -"loupe@npm:^2.3.1": - version: 2.3.6 - resolution: "loupe@npm:2.3.6" +"@nestjs/axios@npm:0.1.0": + version: 0.1.0 + resolution: "@nestjs/axios@npm:0.1.0" dependencies: - get-func-name: "npm:^2.0.0" - checksum: 10/8e695f3c99d9670d524767bc2bcbf799444b865d1d05e974d6dc53d72863c2ce9990103f311f89f04019f064e5ae7bbe70f3fba030a57d65aacfb951aad34d9f + axios: "npm:0.27.2" + peerDependencies: + "@nestjs/common": ^7.0.0 || ^8.0.0 || ^9.0.0 + reflect-metadata: ^0.1.12 + rxjs: ^6.0.0 || ^7.0.0 + checksum: 10/e524d365b2ad3229caa2166b5cea4a9dac899971ca729a36234b7301173acecd8c0fbad9bc4b2010d41f5155f1f24869b22a5782977c6aeeaa6f04d681531ec4 languageName: node linkType: hard -"lower-case-first@npm:^1.0.0": - version: 1.0.2 - resolution: "lower-case-first@npm:1.0.2" +"@nestjs/common@npm:9.3.11": + version: 9.3.11 + resolution: "@nestjs/common@npm:9.3.11" dependencies: - lower-case: "npm:^1.1.2" - checksum: 10/97eb5ce68998153552f3627d405f6821299a45dac90423f712ccd696f77fa96e9d707a5509970c8b61b99c08947eb1e70e35cddb67bc40ea64069c574edd4f78 - languageName: node - linkType: hard - -"lower-case@npm:^1.1.0, lower-case@npm:^1.1.1, lower-case@npm:^1.1.2": - version: 1.1.4 - resolution: "lower-case@npm:1.1.4" - checksum: 10/0c4aebc459ba330bcc38d20cad26ee33111155ed09c09e7d7ec395997277feee3a4d8db541ed5ca555f20ddc5c65a3b23648d18fcd2a950376da6d0c2e01416e + iterare: "npm:1.2.1" + tslib: "npm:2.5.0" + uid: "npm:2.0.1" + peerDependencies: + cache-manager: <=5 + class-transformer: "*" + class-validator: "*" + reflect-metadata: ^0.1.12 + rxjs: ^7.1.0 + peerDependenciesMeta: + cache-manager: + optional: true + class-transformer: + optional: true + class-validator: + optional: true + checksum: 10/0c315c81368a65da8d6131e4f2be8843b0c64df0c01ecc29fddc22d5709c16816ef7f49d3e3ee26364c1eb799f2b8007c934571a618762b2fba2046a584a88ee languageName: node linkType: hard -"lower-case@npm:^2.0.2": - version: 2.0.2 - resolution: "lower-case@npm:2.0.2" +"@nestjs/core@npm:9.3.11": + version: 9.3.11 + resolution: "@nestjs/core@npm:9.3.11" dependencies: - tslib: "npm:^2.0.3" - checksum: 10/83a0a5f159ad7614bee8bf976b96275f3954335a84fad2696927f609ddae902802c4f3312d86668722e668bef41400254807e1d3a7f2e8c3eede79691aa1f010 - languageName: node - linkType: hard - -"lowercase-keys@npm:^1.0.0, lowercase-keys@npm:^1.0.1": - version: 1.0.1 - resolution: "lowercase-keys@npm:1.0.1" - checksum: 10/12ba64572dc25ae9ee30d37a11f3a91aea046c1b6b905fdf8ac77e2f268f153ed36e60d39cb3bfa47a89f31d981dae9a8cc9915124a56fe51ff01ed6e8bb68fa - languageName: node - linkType: hard - -"lowercase-keys@npm:^2.0.0": - version: 2.0.0 - resolution: "lowercase-keys@npm:2.0.0" - checksum: 10/1c233d2da35056e8c49fae8097ee061b8c799b2f02e33c2bf32f9913c7de8fb481ab04dab7df35e94156c800f5f34e99acbf32b21781d87c3aa43ef7b748b79e + "@nuxtjs/opencollective": "npm:0.3.2" + fast-safe-stringify: "npm:2.1.1" + iterare: "npm:1.2.1" + path-to-regexp: "npm:3.2.0" + tslib: "npm:2.5.0" + uid: "npm:2.0.1" + peerDependencies: + "@nestjs/common": ^9.0.0 + "@nestjs/microservices": ^9.0.0 + "@nestjs/platform-express": ^9.0.0 + "@nestjs/websockets": ^9.0.0 + reflect-metadata: ^0.1.12 + rxjs: ^7.1.0 + peerDependenciesMeta: + "@nestjs/microservices": + optional: true + "@nestjs/platform-express": + optional: true + "@nestjs/websockets": + optional: true + checksum: 10/25ebc6220915d4fa0adc1b7e8edaf03f95bb9877335ac298bd01af75dd1014292d64e5e29773e4e4fa5daac3cba4fdaeb964759f66633b97816cba515e48b6f9 languageName: node linkType: hard -"lowercase-keys@npm:^3.0.0": - version: 3.0.0 - resolution: "lowercase-keys@npm:3.0.0" - checksum: 10/67a3f81409af969bc0c4ca0e76cd7d16adb1e25aa1c197229587eaf8671275c8c067cd421795dbca4c81be0098e4c426a086a05e30de8a9c587b7a13c0c7ccc5 +"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0": + version: 1.1.0 + resolution: "@noble/curves@npm:1.1.0" + dependencies: + "@noble/hashes": "npm:1.3.1" + checksum: 10/7028e3f19a4a2a601f9159e5423f51ae86ab231bed79a6e40649b063e1ed7f55f5da0475f1377bd2c5a8e5fc485af9ce0549ad89da6b983d6af48e5d0a2041ca languageName: node linkType: hard -"lru-cache@npm:7.10.1 - 7.13.1": - version: 7.13.1 - resolution: "lru-cache@npm:7.13.1" - checksum: 10/81ebb3f1fd3e1d3c32762a58c5964364220fc4b413f5180588b74473bd9a075cdafee32421f8ee6105148c8986d183bf40539017dea03abed32f4e1e59bf2654 +"@noble/hashes@npm:1.3.1, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": + version: 1.3.1 + resolution: "@noble/hashes@npm:1.3.1" + checksum: 10/39474bab7e7813dbbfd8750476f48046d3004984e161fcd4333e40ca823f07b069010b35a20246e5b4ac20858e29913172a4d69720fd1e93620f7bedb70f9b72 languageName: node linkType: hard -"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.0.1 - resolution: "lru-cache@npm:10.0.1" - checksum: 10/5bb91a97a342a41fd049c3494b44d9e21a7d4843f9284d0a0b26f00bb0e436f1f627d0641c78f88be16b86b4231546c5ee4f284733fb530c7960f0bcd7579026 +"@nodelib/fs.scandir@npm:2.1.5": + version: 2.1.5 + resolution: "@nodelib/fs.scandir@npm:2.1.5" + dependencies: + "@nodelib/fs.stat": "npm:2.0.5" + run-parallel: "npm:^1.1.9" + checksum: 10/6ab2a9b8a1d67b067922c36f259e3b3dfd6b97b219c540877a4944549a4d49ea5ceba5663905ab5289682f1f3c15ff441d02f0447f620a42e1cb5e1937174d4b languageName: node linkType: hard -"lru-cache@npm:^10.2.0, lru-cache@npm:^10.2.2": - version: 10.3.0 - resolution: "lru-cache@npm:10.3.0" - checksum: 10/37e921aedbd1f4062475d9fa6760391fa7adfaaee3a5a6cbedd1d6d0b46705c14012312c1edb2b13f119eae6584a48f73c158d118828d42475b44a7abf7d05ab +"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": + version: 2.0.5 + resolution: "@nodelib/fs.stat@npm:2.0.5" + checksum: 10/012480b5ca9d97bff9261571dbbec7bbc6033f69cc92908bc1ecfad0792361a5a1994bc48674b9ef76419d056a03efadfce5a6cf6dbc0a36559571a7a483f6f0 languageName: node linkType: hard -"lru-cache@npm:^4.0.1": - version: 4.1.5 - resolution: "lru-cache@npm:4.1.5" +"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" dependencies: - pseudomap: "npm:^1.0.2" - yallist: "npm:^2.1.2" - checksum: 10/9ec7d73f11a32cba0e80b7a58fdf29970814c0c795acaee1a6451ddfd609bae6ef9df0837f5bbeabb571ecd49c1e2d79e10e9b4ed422cfba17a0cb6145b018a9 + "@nodelib/fs.scandir": "npm:2.1.5" + fastq: "npm:^1.6.0" + checksum: 10/40033e33e96e97d77fba5a238e4bba4487b8284678906a9f616b5579ddaf868a18874c0054a75402c9fbaaa033a25ceae093af58c9c30278e35c23c9479e79b0 languageName: node linkType: hard -"lru-cache@npm:^5.1.1": - version: 5.1.1 - resolution: "lru-cache@npm:5.1.1" +"@npmcli/agent@npm:^2.0.0": + version: 2.1.1 + resolution: "@npmcli/agent@npm:2.1.1" dependencies: - yallist: "npm:^3.0.2" - checksum: 10/951d2673dcc64a7fb888bf3d13bc2fdf923faca97d89cdb405ba3dfff77e2b26e5798d405e78fcd7094c9e7b8b4dab2ddc5a4f8a11928af24a207b7c738ca3f8 + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^10.0.1" + socks-proxy-agent: "npm:^8.0.1" + checksum: 10/3b0e613ae75766ed3919066d826a3a204f091b5274243a52d68924322ab7678997803ea8a48073ded1de072b53d83022e4cbd8c531d1559b3c9ce87fac054db0 languageName: node linkType: hard -"lru-cache@npm:^6.0.0": - version: 6.0.0 - resolution: "lru-cache@npm:6.0.0" +"@npmcli/arborist@npm:^7.5.3": + version: 7.5.3 + resolution: "@npmcli/arborist@npm:7.5.3" dependencies: - yallist: "npm:^4.0.0" - checksum: 10/fc1fe2ee205f7c8855fa0f34c1ab0bcf14b6229e35579ec1fd1079f31d6fc8ef8eb6fd17f2f4d99788d7e339f50e047555551ebd5e434dda503696e7c6591825 - languageName: node - linkType: hard - -"lru-cache@npm:^7.14.1, lru-cache@npm:^7.4.4, lru-cache@npm:^7.5.1, lru-cache@npm:^7.7.1": - version: 7.18.3 - resolution: "lru-cache@npm:7.18.3" - checksum: 10/6029ca5aba3aacb554e919d7ef804fffd4adfc4c83db00fac8248c7c78811fb6d4b6f70f7fd9d55032b3823446546a007edaa66ad1f2377ae833bd983fac5d98 - languageName: node - linkType: hard - -"lru_map@npm:^0.3.3": - version: 0.3.3 - resolution: "lru_map@npm:0.3.3" - checksum: 10/50f6597924a7763ab0b31192e5e9965f08ca64a0044254138e74a65aecab95047d540f73739cff489866f4310e0202c11c10fdf18b10b236472160baaa68bbb1 - languageName: node - linkType: hard - -"lru_map@npm:^0.4.1": - version: 0.4.1 - resolution: "lru_map@npm:0.4.1" - checksum: 10/c399afdb959c1820ace33b253c307c00e39a8a63705037f9dd58bf489950265de347b1614642fcfde26e0ff613fba633ddfd7eb5814ffb0a360a7037cc8a4008 + "@isaacs/string-locale-compare": "npm:^1.1.0" + "@npmcli/fs": "npm:^3.1.1" + "@npmcli/installed-package-contents": "npm:^2.1.0" + "@npmcli/map-workspaces": "npm:^3.0.2" + "@npmcli/metavuln-calculator": "npm:^7.1.1" + "@npmcli/name-from-folder": "npm:^2.0.0" + "@npmcli/node-gyp": "npm:^3.0.0" + "@npmcli/package-json": "npm:^5.1.0" + "@npmcli/query": "npm:^3.1.0" + "@npmcli/redact": "npm:^2.0.0" + "@npmcli/run-script": "npm:^8.1.0" + bin-links: "npm:^4.0.4" + cacache: "npm:^18.0.3" + common-ancestor-path: "npm:^1.0.1" + hosted-git-info: "npm:^7.0.2" + json-parse-even-better-errors: "npm:^3.0.2" + json-stringify-nice: "npm:^1.1.4" + lru-cache: "npm:^10.2.2" + minimatch: "npm:^9.0.4" + nopt: "npm:^7.2.1" + npm-install-checks: "npm:^6.2.0" + npm-package-arg: "npm:^11.0.2" + npm-pick-manifest: "npm:^9.0.1" + npm-registry-fetch: "npm:^17.0.1" + pacote: "npm:^18.0.6" + parse-conflict-json: "npm:^3.0.0" + proc-log: "npm:^4.2.0" + proggy: "npm:^2.0.0" + promise-all-reject-late: "npm:^1.0.0" + promise-call-limit: "npm:^3.0.1" + read-package-json-fast: "npm:^3.0.2" + semver: "npm:^7.3.7" + ssri: "npm:^10.0.6" + treeverse: "npm:^3.0.0" + walk-up-path: "npm:^3.0.1" + bin: + arborist: bin/index.js + checksum: 10/e149df712a2396f59e348ff32d763f62bbdf576f3976110f47b10cd912a91cce76c83f859bb0f97f4ca5273f15a270df54a702190753772f3539a3f10307b6ed languageName: node linkType: hard -"ltgt@npm:2.2.1, ltgt@npm:^2.1.2, ltgt@npm:~2.2.0": - version: 2.2.1 - resolution: "ltgt@npm:2.2.1" - checksum: 10/10536cee1d01114cf7aadd0c24fab432a4825bb8ef091488ae6d255df916ac7f15141f6bc1e023886aea0397353f0c14608581ce0dbb57f43704f77cc33731d0 +"@npmcli/fs@npm:^3.1.0": + version: 3.1.0 + resolution: "@npmcli/fs@npm:3.1.0" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/f3a7ab3a31de65e42aeb6ed03ed035ef123d2de7af4deb9d4a003d27acc8618b57d9fb9d259fe6c28ca538032a028f37337264388ba27d26d37fff7dde22476e languageName: node linkType: hard -"lunr@npm:^2.3.9": - version: 2.3.9 - resolution: "lunr@npm:2.3.9" - checksum: 10/f2f6db34c046f5a767782fe2454e6dd69c75ba3c5cf5c1cb9cacca2313a99c2ba78ff8fa67dac866fb7c4ffd5f22e06684793f5f15ba14bddb598b94513d54bf +"@npmcli/fs@npm:^3.1.1": + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/1e0e04087049b24b38bc0b30d87a9388ee3ca1d3fdfc347c2f77d84fcfe6a51f250bc57ba2c1f614d7e4285c6c62bf8c769bc19aa0949ea39e5b043ee023b0bd languageName: node linkType: hard -"luxon@npm:^3.3.0": - version: 3.4.4 - resolution: "luxon@npm:3.4.4" - checksum: 10/c14164bc338987349075a08e63ea3ff902866735f7f5553a355b27be22667919765ff96fde4d3413d0e9a0edc4ff9e2e74ebcb8f86eae0ce8b14b27330d87d6e +"@npmcli/git@npm:^5.0.0": + version: 5.0.3 + resolution: "@npmcli/git@npm:5.0.3" + dependencies: + "@npmcli/promise-spawn": "npm:^7.0.0" + lru-cache: "npm:^10.0.1" + npm-pick-manifest: "npm:^9.0.0" + proc-log: "npm:^3.0.0" + promise-inflight: "npm:^1.0.1" + promise-retry: "npm:^2.0.1" + semver: "npm:^7.3.5" + which: "npm:^4.0.0" + checksum: 10/cf2216c5e6e2ef30eac135b9f6fdc3c999253c2778e9af38d5acda73af10c3f20b2fbf834521ea3e874e27633854c7fd32ba36162ba1dcaa5f67d19438059626 languageName: node linkType: hard -"lz-string@npm:^1.5.0": - version: 1.5.0 - resolution: "lz-string@npm:1.5.0" +"@npmcli/installed-package-contents@npm:^2.0.1": + version: 2.0.2 + resolution: "@npmcli/installed-package-contents@npm:2.0.2" + dependencies: + npm-bundled: "npm:^3.0.0" + npm-normalize-package-bin: "npm:^3.0.0" bin: - lz-string: bin/bin.js - checksum: 10/e86f0280e99a8d8cd4eef24d8601ddae15ce54e43ac9990dfcb79e1e081c255ad24424a30d78d2ad8e51a8ce82a66a930047fed4b4aa38c6f0b392ff9300edfc + installed-package-contents: lib/index.js + checksum: 10/4598a97e3d6e4c8602157d9ac47723071f09662852add0f275af62d1038d8e44d0c5ff9afa05358ba3ca7e100c860d679964be0a163add6ea028dc72d31f0af1 languageName: node linkType: hard -"madge@npm:7.0.0": - version: 7.0.0 - resolution: "madge@npm:7.0.0" +"@npmcli/installed-package-contents@npm:^2.1.0": + version: 2.1.0 + resolution: "@npmcli/installed-package-contents@npm:2.1.0" dependencies: - chalk: "npm:^4.1.2" - commander: "npm:^7.2.0" - commondir: "npm:^1.0.1" - debug: "npm:^4.3.4" - dependency-tree: "npm:^10.0.9" - ora: "npm:^5.4.1" - pluralize: "npm:^8.0.0" - precinct: "npm:^11.0.5" - pretty-ms: "npm:^7.0.1" - rc: "npm:^1.2.8" - stream-to-array: "npm:^2.3.0" - ts-graphviz: "npm:^1.8.1" - walkdir: "npm:^0.4.1" - peerDependencies: - typescript: ^3.9.5 || ^4.9.5 || ^5 - peerDependenciesMeta: - typescript: - optional: true + npm-bundled: "npm:^3.0.0" + npm-normalize-package-bin: "npm:^3.0.0" bin: - madge: bin/cli.js - checksum: 10/2503b2dec14d0fec01b6279acc2c2556931fc6aabf35a6c48abaf2a0c2c6185248216bdc9d051dfa93b5b347448d17e82f559faa9b826bcc5d3ec9d4800a668d + installed-package-contents: bin/index.js + checksum: 10/68ab3ea2994f5ea21c61940de94ec4f2755fe569ef0b86e22db0695d651a3c88915c5eab61d634cfa203b9c801ee307c8aa134c2c4bd2e4fe1aa8d295ce8a163 languageName: node linkType: hard -"magic-string@npm:0.30.1": - version: 0.30.1 - resolution: "magic-string@npm:0.30.1" +"@npmcli/map-workspaces@npm:^3.0.2": + version: 3.0.3 + resolution: "@npmcli/map-workspaces@npm:3.0.3" dependencies: - "@jridgewell/sourcemap-codec": "npm:^1.4.15" - checksum: 10/35303570586e1074c1486f4e0065d8dbc45539e2e486336d7f898f75d2b1e4556eabd24ec6be34dd6cb9bb5df1d5b162284118ef7911e3c94315be9ebc195a29 + "@npmcli/name-from-folder": "npm:^2.0.0" + glob: "npm:^9.3.1" + minimatch: "npm:^7.4.2" + read-package-json-fast: "npm:^3.0.0" + checksum: 10/d2718ca70fa7c0300062443e55168982045a77fac0e31d68e995d7b4aa255e2fd45ffe4116507dbc5741043c4135997acc18fd3e7b21abc67bbe57d130893776 languageName: node linkType: hard -"magic-string@npm:0.30.8": - version: 0.30.8 - resolution: "magic-string@npm:0.30.8" +"@npmcli/metavuln-calculator@npm:^7.1.1": + version: 7.1.1 + resolution: "@npmcli/metavuln-calculator@npm:7.1.1" dependencies: - "@jridgewell/sourcemap-codec": "npm:^1.4.15" - checksum: 10/72ab63817af600e92c19dc8489c1aa4a9599da00cfd59b2319709bd48fb0cf533fdf354bf140ac86e598dbd63e6b2cc83647fe8448f864a3eb6061c62c94e784 + cacache: "npm:^18.0.0" + json-parse-even-better-errors: "npm:^3.0.0" + pacote: "npm:^18.0.0" + proc-log: "npm:^4.1.0" + semver: "npm:^7.3.5" + checksum: 10/57163b4bde4af3f5badb0c9b0c868f9539e2a112ee73c606680b7548b148bf58e793952d74eb1e581c9cc2e630bc03bc60adc04b3f1e7960482f97af817f28d2 languageName: node linkType: hard -"magic-string@npm:^0.25.0, magic-string@npm:^0.25.7": - version: 0.25.9 - resolution: "magic-string@npm:0.25.9" - dependencies: - sourcemap-codec: "npm:^1.4.8" - checksum: 10/87a14b944bd169821cbd54b169a7ab6b0348fd44b5497266dc555dd70280744e9e88047da9dcb95675bdc23b1ce33f13398b0f70b3be7b858225ccb1d185ff51 +"@npmcli/name-from-folder@npm:^2.0.0": + version: 2.0.0 + resolution: "@npmcli/name-from-folder@npm:2.0.0" + checksum: 10/75beb40373f916cfcf7327958b3ab920ab4e32d24217197927dd1c76a325c7645695011fce9cb2a8f93616f8b74946e84eebe3830303e11ed9d400dae623a99b languageName: node linkType: hard -"magic-string@npm:^0.30.5": - version: 0.30.5 - resolution: "magic-string@npm:0.30.5" - dependencies: - "@jridgewell/sourcemap-codec": "npm:^1.4.15" - checksum: 10/c8a6b25f813215ca9db526f3a407d6dc0bf35429c2b8111d6f1c2cf6cf6afd5e2d9f9cd189416a0e3959e20ecd635f73639f9825c73de1074b29331fe36ace59 +"@npmcli/node-gyp@npm:^3.0.0": + version: 3.0.0 + resolution: "@npmcli/node-gyp@npm:3.0.0" + checksum: 10/dd9fed3e80df8fbb20443f28651a8ed7235f2c15286ecc010e2d3cd392c85912e59ef29218c0b02f098defb4cbc8cdf045aab1d32d5cef6ace289913196ed5df languageName: node linkType: hard -"make-dir-cli@npm:3.1.0": - version: 3.1.0 - resolution: "make-dir-cli@npm:3.1.0" +"@npmcli/package-json@npm:^5.0.0": + version: 5.0.0 + resolution: "@npmcli/package-json@npm:5.0.0" dependencies: - make-dir: "npm:^4.0.0" - meow: "npm:^10.0.0" - bin: - make-dir: cli.js - checksum: 10/8a5b4cc92efdde9bdc82be5abfaf6819ab862ffd0c0a96788fa3685baff7af23ab4e8a7a9e85cde4a9f585345fcf638da098ecd993f5420b87e1c643e794381d + "@npmcli/git": "npm:^5.0.0" + glob: "npm:^10.2.2" + hosted-git-info: "npm:^7.0.0" + json-parse-even-better-errors: "npm:^3.0.0" + normalize-package-data: "npm:^6.0.0" + proc-log: "npm:^3.0.0" + semver: "npm:^7.5.3" + checksum: 10/bb907e934e96dae3d3aa26aa45cbaa87b318cb64c4aaaacfa3596b1ca5147ad1b51c3281eb529df12116a163d33ca99f48c4593b0c168e38412dfbf2c5cced72 languageName: node linkType: hard -"make-dir@npm:^1.0.0, make-dir@npm:^1.3.0": - version: 1.3.0 - resolution: "make-dir@npm:1.3.0" +"@npmcli/package-json@npm:^5.1.0, @npmcli/package-json@npm:^5.2.0": + version: 5.2.0 + resolution: "@npmcli/package-json@npm:5.2.0" dependencies: - pify: "npm:^3.0.0" - checksum: 10/c564f6e7bb5ace1c02ad56b3a5f5e07d074af0c0b693c55c7b2c2b148882827c8c2afc7b57e43338a9f90c125b58d604e8cf3e6990a48bf949dfea8c79668c0b + "@npmcli/git": "npm:^5.0.0" + glob: "npm:^10.2.2" + hosted-git-info: "npm:^7.0.0" + json-parse-even-better-errors: "npm:^3.0.0" + normalize-package-data: "npm:^6.0.0" + proc-log: "npm:^4.0.0" + semver: "npm:^7.5.3" + checksum: 10/c3d2218877bfc005bca3b7a11f53825bf16a68811b8e8ed0c9b219cceb8e8e646d70efab8c5d6decbd8007f286076468b3f456dab4d41d648aff73a5f3a6fce2 languageName: node linkType: hard -"make-dir@npm:^2.0.0, make-dir@npm:^2.1.0": - version: 2.1.0 - resolution: "make-dir@npm:2.1.0" +"@npmcli/promise-spawn@npm:^7.0.0": + version: 7.0.0 + resolution: "@npmcli/promise-spawn@npm:7.0.0" dependencies: - pify: "npm:^4.0.1" - semver: "npm:^5.6.0" - checksum: 10/043548886bfaf1820323c6a2997e6d2fa51ccc2586ac14e6f14634f7458b4db2daf15f8c310e2a0abd3e0cddc64df1890d8fc7263033602c47bb12cbfcf86aab + which: "npm:^4.0.0" + checksum: 10/6bda8e0cd007d34799b49fa20bc70eeb3fcac03aaecd021207b39e9b253511c5e5a0586345ae7726a8e34e49dbfd5927fcc7b5793273f4a995701687210c9614 languageName: node linkType: hard -"make-dir@npm:^3.0.0, make-dir@npm:^3.0.2, make-dir@npm:^3.1.0": +"@npmcli/query@npm:^3.1.0": version: 3.1.0 - resolution: "make-dir@npm:3.1.0" + resolution: "@npmcli/query@npm:3.1.0" dependencies: - semver: "npm:^6.0.0" - checksum: 10/484200020ab5a1fdf12f393fe5f385fc8e4378824c940fba1729dcd198ae4ff24867bc7a5646331e50cead8abff5d9270c456314386e629acec6dff4b8016b78 + postcss-selector-parser: "npm:^6.0.10" + checksum: 10/fa79ae317934c95d14b89cb149cb8eb0b2a4e611acf0661681cfa964bf9af6740f60efe095c8bb7e880398e0955666408cc8a3ffede90e87922cb81cce1efcdb languageName: node linkType: hard -"make-dir@npm:^4.0.0": - version: 4.0.0 - resolution: "make-dir@npm:4.0.0" - dependencies: - semver: "npm:^7.5.3" - checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a +"@npmcli/redact@npm:^2.0.0": + version: 2.0.1 + resolution: "@npmcli/redact@npm:2.0.1" + checksum: 10/f19a521fa71b539707eee69106ed3d97e3047712d4f279c80007a8d0aef63d137e3062941f11e19d6cec03812eaa0872891ae20c84f603d9e021dfb93cc9d6e5 languageName: node linkType: hard -"make-dir@npm:^5.0.0": - version: 5.0.0 - resolution: "make-dir@npm:5.0.0" - checksum: 10/9f40f4756af5138ca3b138f9e8af144b0420516e96b0e079d816a173d2f69b2ef3425abf20e25764d222c0939a9fd2bce91dd26c22002a559cd6beaea5c994d2 +"@npmcli/run-script@npm:^8.0.0, @npmcli/run-script@npm:^8.1.0": + version: 8.1.0 + resolution: "@npmcli/run-script@npm:8.1.0" + dependencies: + "@npmcli/node-gyp": "npm:^3.0.0" + "@npmcli/package-json": "npm:^5.0.0" + "@npmcli/promise-spawn": "npm:^7.0.0" + node-gyp: "npm:^10.0.0" + proc-log: "npm:^4.0.0" + which: "npm:^4.0.0" + checksum: 10/256bd580f82b98db93e54065bf9bcc94946be4f2d668a062cf756cb8ea091f58ef7154b3d2450d79738081a150f25cc48f6075351911e672f24ffd34350f02f2 languageName: node linkType: hard -"make-error@npm:1.x, make-error@npm:^1.1.1, make-error@npm:^1.3.6": - version: 1.3.6 - resolution: "make-error@npm:1.3.6" - checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 +"@nuxtjs/opencollective@npm:0.3.2": + version: 0.3.2 + resolution: "@nuxtjs/opencollective@npm:0.3.2" + dependencies: + chalk: "npm:^4.1.0" + consola: "npm:^2.15.0" + node-fetch: "npm:^2.6.1" + bin: + opencollective: bin/opencollective.js + checksum: 10/0512871f424a2eae41e9385671ac840f28e8508a209df68c363cc97e009b95a6fd4bdfa2a34c9df78a74fa36d7e171e28792cd11da0b2be28c20ee1806b3ea5e languageName: node linkType: hard -"make-fetch-happen@npm:^10.0.3": - version: 10.2.1 - resolution: "make-fetch-happen@npm:10.2.1" - dependencies: - agentkeepalive: "npm:^4.2.1" - cacache: "npm:^16.1.0" - http-cache-semantics: "npm:^4.1.0" - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.0" - is-lambda: "npm:^1.0.1" - lru-cache: "npm:^7.7.1" - minipass: "npm:^3.1.6" - minipass-collect: "npm:^1.0.2" - minipass-fetch: "npm:^2.0.3" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - promise-retry: "npm:^2.0.1" - socks-proxy-agent: "npm:^7.0.0" - ssri: "npm:^9.0.0" - checksum: 10/fef5acb865a46f25ad0b5ad7d979799125db5dbb24ea811ffa850fbb804bc8e495df2237a8ec3a4fc6250e73c2f95549cca6d6d36a73b1faa61224504eb1188f +"@octokit/auth-token@npm:^5.0.0": + version: 5.1.1 + resolution: "@octokit/auth-token@npm:5.1.1" + checksum: 10/956ee8166ad1b623478ac5168529a081658bceb16e267102b149b44366a9280b5104a0346a4f1c5de12981d2dedb767f7b71d7e1b1ddd1ccb591efa8c6c06f94 languageName: node linkType: hard -"make-fetch-happen@npm:^11.0.0, make-fetch-happen@npm:^11.0.1": - version: 11.0.3 - resolution: "make-fetch-happen@npm:11.0.3" +"@octokit/core@npm:^6.1.2": + version: 6.1.2 + resolution: "@octokit/core@npm:6.1.2" dependencies: - agentkeepalive: "npm:^4.2.1" - cacache: "npm:^17.0.0" - http-cache-semantics: "npm:^4.1.1" - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.0" - is-lambda: "npm:^1.0.1" - lru-cache: "npm:^7.7.1" - minipass: "npm:^4.0.0" - minipass-fetch: "npm:^3.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - promise-retry: "npm:^2.0.1" - socks-proxy-agent: "npm:^7.0.0" - ssri: "npm:^10.0.0" - checksum: 10/5436d221af82e5fa9b7ddee8b797f822904ba96082d70d8ae2d375e03e75e838ce9e643521ecf840d9f10ccae9fe317d46256654fe1044f349d8a10c6f98b539 + "@octokit/auth-token": "npm:^5.0.0" + "@octokit/graphql": "npm:^8.0.0" + "@octokit/request": "npm:^9.0.0" + "@octokit/request-error": "npm:^6.0.1" + "@octokit/types": "npm:^13.0.0" + before-after-hook: "npm:^3.0.2" + universal-user-agent: "npm:^7.0.0" + checksum: 10/ef8cc502790142d892b97b92a6e398323f1e4be777e5675681d5985d4681855f4e6f02a7b16466984af702ecdffed0ab923610d59c07c540c3e243160818eaec languageName: node linkType: hard -"make-fetch-happen@npm:^11.0.3, make-fetch-happen@npm:^11.1.1": - version: 11.1.1 - resolution: "make-fetch-happen@npm:11.1.1" - dependencies: - agentkeepalive: "npm:^4.2.1" - cacache: "npm:^17.0.0" - http-cache-semantics: "npm:^4.1.1" - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.0" - is-lambda: "npm:^1.0.1" - lru-cache: "npm:^7.7.1" - minipass: "npm:^5.0.0" - minipass-fetch: "npm:^3.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - promise-retry: "npm:^2.0.1" - socks-proxy-agent: "npm:^7.0.0" - ssri: "npm:^10.0.0" - checksum: 10/b4b442cfaaec81db159f752a5f2e3ee3d7aa682782868fa399200824ec6298502e01bdc456e443dc219bcd5546c8e4471644d54109c8599841dc961d17a805fa +"@octokit/endpoint@npm:^10.0.0": + version: 10.1.1 + resolution: "@octokit/endpoint@npm:10.1.1" + dependencies: + "@octokit/types": "npm:^13.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10/6b8991b278ba7e63ddf95e7396f54e5f1347237f11fb845322ec25101764336ed0994ccb197c449b4fd4bc00ec5b78780ccbc3a0b48ba0620dcc115027a3add1 languageName: node linkType: hard -"make-fetch-happen@npm:^13.0.0": - version: 13.0.0 - resolution: "make-fetch-happen@npm:13.0.0" +"@octokit/graphql@npm:^8.0.0": + version: 8.1.1 + resolution: "@octokit/graphql@npm:8.1.1" dependencies: - "@npmcli/agent": "npm:^2.0.0" - cacache: "npm:^18.0.0" - http-cache-semantics: "npm:^4.1.1" - is-lambda: "npm:^1.0.1" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^3.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - promise-retry: "npm:^2.0.1" - ssri: "npm:^10.0.0" - checksum: 10/ded5a91a02b76381b06a4ec4d5c1d23ebbde15d402b3c3e4533b371dac7e2f7ca071ae71ae6dae72aa261182557b7b1b3fd3a705b39252dc17f74fa509d3e76f + "@octokit/request": "npm:^9.0.0" + "@octokit/types": "npm:^13.0.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10/d8b3941e6afa724fba0cff79c71c839971aed6f87777833e1f6facc816c5fcd9a5b637dad779462cd723aa7490151f69fc6634758ca5bfe76f2cce298df934a1 languageName: node linkType: hard -"make-fetch-happen@npm:^13.0.1": - version: 13.0.1 - resolution: "make-fetch-happen@npm:13.0.1" - dependencies: - "@npmcli/agent": "npm:^2.0.0" - cacache: "npm:^18.0.0" - http-cache-semantics: "npm:^4.1.1" - is-lambda: "npm:^1.0.1" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^3.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - proc-log: "npm:^4.2.0" - promise-retry: "npm:^2.0.1" - ssri: "npm:^10.0.0" - checksum: 10/11bae5ad6ac59b654dbd854f30782f9de052186c429dfce308eda42374528185a100ee40ac9ffdc36a2b6c821ecaba43913e4730a12f06f15e895ea9cb23fa59 +"@octokit/openapi-types@npm:^22.2.0": + version: 22.2.0 + resolution: "@octokit/openapi-types@npm:22.2.0" + checksum: 10/0471b0c789fada5aa2390e6f82ba477738228ef7d2d986dda9aab0cb625d1562bd178ba0ba4d2655ce841079cd5efff9e58ece2077c27e569ea22109ea301830 languageName: node linkType: hard -"make-fetch-happen@npm:^9.1.0": - version: 9.1.0 - resolution: "make-fetch-happen@npm:9.1.0" - dependencies: - agentkeepalive: "npm:^4.1.3" - cacache: "npm:^15.2.0" - http-cache-semantics: "npm:^4.1.0" - http-proxy-agent: "npm:^4.0.1" - https-proxy-agent: "npm:^5.0.0" - is-lambda: "npm:^1.0.1" - lru-cache: "npm:^6.0.0" - minipass: "npm:^3.1.3" - minipass-collect: "npm:^1.0.2" - minipass-fetch: "npm:^1.3.2" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.2" - promise-retry: "npm:^2.0.1" - socks-proxy-agent: "npm:^6.0.0" - ssri: "npm:^8.0.0" - checksum: 10/a868e74fc223a78afb7a1f8115133befdffae84f07a5f5dd9317cbf9f784a8373f28829a73ae3f31060e1b0cb4944e73257733c3b10c314354060fab412b6028 +"@octokit/plugin-enterprise-rest@npm:^6.0.1": + version: 6.0.1 + resolution: "@octokit/plugin-enterprise-rest@npm:6.0.1" + checksum: 10/2ea8aca141a0329479cfaf9425f7bc226fe6aa0064fd6e7798b565aa962a5a757a89a03e78b956909e767aa86cd28e1346bf82908dfdf614af921d175a6a95e1 languageName: node linkType: hard -"makeerror@npm:1.0.12": - version: 1.0.12 - resolution: "makeerror@npm:1.0.12" +"@octokit/plugin-paginate-rest@npm:^11.0.0": + version: 11.3.3 + resolution: "@octokit/plugin-paginate-rest@npm:11.3.3" dependencies: - tmpl: "npm:1.0.5" - checksum: 10/4c66ddfc654537333da952c084f507fa4c30c707b1635344eb35be894d797ba44c901a9cebe914aa29a7f61357543ba09b09dddbd7f65b4aee756b450f169f40 + "@octokit/types": "npm:^13.5.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10/87eeb4dd68a8207e669989cdbf9de3717b74038d630c2b803cbc7a9c44c3ff74771ce1cf45fa056b7172aaaa80fd9a0e4bf5eca06aabc19f30e7e29898f1f69e languageName: node linkType: hard -"map-age-cleaner@npm:^0.1.1": - version: 0.1.3 - resolution: "map-age-cleaner@npm:0.1.3" +"@octokit/plugin-request-log@npm:^5.1.0": + version: 5.3.0 + resolution: "@octokit/plugin-request-log@npm:5.3.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10/8c918b14f0687e8a3d9c7c81ef1092a49de07681940cc1aee0aeb7e3dd8ac64f69af5d65932eec32f6db4af3dca80541ad3bb13ac0fa44af3e2340ed91909272 + languageName: node + linkType: hard + +"@octokit/plugin-rest-endpoint-methods@npm:^13.0.0": + version: 13.2.4 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:13.2.4" dependencies: - p-defer: "npm:^1.0.0" - checksum: 10/cb2804a5bcb3cbdfe4b59066ea6d19f5e7c8c196cd55795ea4c28f792b192e4c442426ae52524e5e1acbccf393d3bddacefc3d41f803e66453f6c4eda3650bc1 + "@octokit/types": "npm:^13.5.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10/5d90adb9b5ab52a7ce260fcd2acc48a6723fc888e4f5711f958694c4bfb53fa146ad6791ce651060566d1bd513b3d9287c44a25b1da866d9611c3e1e739b5981 languageName: node linkType: hard -"map-cache@npm:^0.2.2": - version: 0.2.2 - resolution: "map-cache@npm:0.2.2" - checksum: 10/3067cea54285c43848bb4539f978a15dedc63c03022abeec6ef05c8cb6829f920f13b94bcaf04142fc6a088318e564c4785704072910d120d55dbc2e0c421969 +"@octokit/request-error@npm:^6.0.1": + version: 6.1.1 + resolution: "@octokit/request-error@npm:6.1.1" + dependencies: + "@octokit/types": "npm:^13.0.0" + checksum: 10/cae7bc4078629a02edcf35977f496a4b943e730165f6d7828795073f99a1d884ac67343b02eff69e553a5057765e466d70ddd9d266787f505aa29018858ab06d languageName: node linkType: hard -"map-obj@npm:^1.0.0": - version: 1.0.1 - resolution: "map-obj@npm:1.0.1" - checksum: 10/f8e6fc7f6137329c376c4524f6d25b3c243c17019bc8f621d15a2dcb855919e482a9298a78ae58b00dbd0e76b640bf6533aa343a9e993cfc16e0346a2507e7f8 +"@octokit/request@npm:^9.0.0": + version: 9.1.1 + resolution: "@octokit/request@npm:9.1.1" + dependencies: + "@octokit/endpoint": "npm:^10.0.0" + "@octokit/request-error": "npm:^6.0.1" + "@octokit/types": "npm:^13.1.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10/aef47d85751c387c6ef29e70b3b86c9033fc7940361092c80728f7e99cc0ba54ddd00bbecb4422e50df78744600cfb8a1a2bc6916c5b6440677aa8ebd6b9b291 languageName: node linkType: hard -"map-obj@npm:^4.0.0, map-obj@npm:^4.1.0": - version: 4.3.0 - resolution: "map-obj@npm:4.3.0" - checksum: 10/fbc554934d1a27a1910e842bc87b177b1a556609dd803747c85ece420692380827c6ae94a95cce4407c054fa0964be3bf8226f7f2cb2e9eeee432c7c1985684e +"@octokit/rest@npm:^21.0.0": + version: 21.0.0 + resolution: "@octokit/rest@npm:21.0.0" + dependencies: + "@octokit/core": "npm:^6.1.2" + "@octokit/plugin-paginate-rest": "npm:^11.0.0" + "@octokit/plugin-request-log": "npm:^5.1.0" + "@octokit/plugin-rest-endpoint-methods": "npm:^13.0.0" + checksum: 10/7da1c97866af04038fe4e384ce0a90cc4750bb951085c10053ceb73a4818cfe460336d7794ab3c65648cf5e195dba8e90940e36aec1e7ed22b6606cda38c88e0 languageName: node linkType: hard -"map-visit@npm:^1.0.0": - version: 1.0.0 - resolution: "map-visit@npm:1.0.0" +"@octokit/types@npm:^13.0.0, @octokit/types@npm:^13.1.0, @octokit/types@npm:^13.5.0": + version: 13.5.0 + resolution: "@octokit/types@npm:13.5.0" dependencies: - object-visit: "npm:^1.0.0" - checksum: 10/c27045a5021c344fc19b9132eb30313e441863b2951029f8f8b66f79d3d8c1e7e5091578075a996f74e417479506fe9ede28c44ca7bc351a61c9d8073daec36a + "@octokit/openapi-types": "npm:^22.2.0" + checksum: 10/d2aeebc1d8684c4e950f054a52b484e898b72d9f5f8433bcf010161716eea20d1132820d922212f19557a8f147354f2674d1a27b22941308b7c298bdd2674ffa languageName: node linkType: hard -"markdown-it@npm:^14.1.0": - version: 14.1.0 - resolution: "markdown-it@npm:14.1.0" +"@openapitools/openapi-generator-cli@npm:2.7.0": + version: 2.7.0 + resolution: "@openapitools/openapi-generator-cli@npm:2.7.0" dependencies: - argparse: "npm:^2.0.1" - entities: "npm:^4.4.0" - linkify-it: "npm:^5.0.0" - mdurl: "npm:^2.0.0" - punycode.js: "npm:^2.3.1" - uc.micro: "npm:^2.1.0" + "@nestjs/axios": "npm:0.1.0" + "@nestjs/common": "npm:9.3.11" + "@nestjs/core": "npm:9.3.11" + "@nuxtjs/opencollective": "npm:0.3.2" + chalk: "npm:4.1.2" + commander: "npm:8.3.0" + compare-versions: "npm:4.1.4" + concurrently: "npm:6.5.1" + console.table: "npm:0.10.0" + fs-extra: "npm:10.1.0" + glob: "npm:7.1.6" + inquirer: "npm:8.2.5" + lodash: "npm:4.17.21" + reflect-metadata: "npm:0.1.13" + rxjs: "npm:7.8.0" + tslib: "npm:2.0.3" bin: - markdown-it: bin/markdown-it.mjs - checksum: 10/f34f921be178ed0607ba9e3e27c733642be445e9bb6b1dba88da7aafe8ba1bc5d2f1c3aa8f3fc33b49a902da4e4c08c2feadfafb290b8c7dda766208bb6483a9 + openapi-generator-cli: main.js + checksum: 10/4081b31e519c6714c98bdf3c9b1013bce8ce2074b17c1ed362a9ac1ab7ce44be99b238224cbb61a80160fa4e4e087171eef7b3e5182cb44e6b3145ce7a88334e languageName: node linkType: hard -"mcl-wasm@npm:^0.7.1": - version: 0.7.9 - resolution: "mcl-wasm@npm:0.7.9" - checksum: 10/eb689cf0e2422ef7b98e8b040ed601821aea839718c876cd734e9148ca7013adf1c869bbc9495aac351e645d314ec3bd3d3612c91f60c499c5aea8d3dd2a7e38 +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10/115e8ceeec6bc69dff2048b35c0ab4f8bbee12d8bb6c1f4af758604586d802b6e669dcb02dda61d078de42c2b4ddce41b3d9e726d7daa6b4b850f4adbf7333ff languageName: node linkType: hard -"md5-hex@npm:^1.2.0": - version: 1.3.0 - resolution: "md5-hex@npm:1.3.0" - dependencies: - md5-o-matic: "npm:^0.1.1" - checksum: 10/0ae323444c7912a1d104eef5ac356564911a0d49266dbb215190be190dd5d908d7b51a0d52a894da80e482848858d4230a94d817f6196bda0441dac035e60360 +"@pkgr/core@npm:^0.1.0": + version: 0.1.1 + resolution: "@pkgr/core@npm:0.1.1" + checksum: 10/6f25fd2e3008f259c77207ac9915b02f1628420403b2630c92a07ff963129238c9262afc9e84344c7a23b5cc1f3965e2cd17e3798219f5fd78a63d144d3cceba languageName: node linkType: hard -"md5-hex@npm:^2.0.0": - version: 2.0.0 - resolution: "md5-hex@npm:2.0.0" - dependencies: - md5-o-matic: "npm:^0.1.1" - checksum: 10/2d4ab121347ab66dfdfc7f38c6c29f24c4c0c0f9faf036216b1b9f717a8495465d09bca32b86b9e96c12516e85e881fef75533a3ade554eef8de3f57d25db7df +"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/aspromise@npm:1.1.2" + checksum: 10/8a938d84fe4889411296db66b29287bd61ea3c14c2d23e7a8325f46a2b8ce899857c5f038d65d7641805e6c1d06b495525c7faf00c44f85a7ee6476649034969 languageName: node linkType: hard -"md5-o-matic@npm:^0.1.1": - version: 0.1.1 - resolution: "md5-o-matic@npm:0.1.1" - checksum: 10/6b7238c0513fb5d21ab2c0d58d36e67b30595dc45c14127965d947aa8b4c400289b276d20794ca177c23c2ed8f6979fff1abbf2d62c40a9cf8766da724de1358 +"@protobufjs/base64@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/base64@npm:1.1.2" + checksum: 10/c71b100daeb3c9bdccab5cbc29495b906ba0ae22ceedc200e1ba49717d9c4ab15a6256839cebb6f9c6acae4ed7c25c67e0a95e734f612b258261d1a3098fe342 languageName: node linkType: hard -"md5.js@npm:^1.3.4": - version: 1.3.5 - resolution: "md5.js@npm:1.3.5" - dependencies: - hash-base: "npm:^3.0.0" - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.1.2" - checksum: 10/098494d885684bcc4f92294b18ba61b7bd353c23147fbc4688c75b45cb8590f5a95fd4584d742415dcc52487f7a1ef6ea611cfa1543b0dc4492fe026357f3f0c +"@protobufjs/codegen@npm:^2.0.4": + version: 2.0.4 + resolution: "@protobufjs/codegen@npm:2.0.4" + checksum: 10/c6ee5fa172a8464f5253174d3c2353ea520c2573ad7b6476983d9b1346f4d8f2b44aa29feb17a949b83c1816bc35286a5ea265ed9d8fdd2865acfa09668c0447 languageName: node linkType: hard -"mdn-data@npm:2.0.14": - version: 2.0.14 - resolution: "mdn-data@npm:2.0.14" - checksum: 10/64c629fcf14807e30d6dc79f97cbcafa16db066f53a294299f3932b3beb0eb0d1386d3a7fe408fc67348c449a4e0999360c894ba4c81eb209d7be4e36503de0e +"@protobufjs/eventemitter@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/eventemitter@npm:1.1.0" + checksum: 10/03af3e99f17ad421283d054c88a06a30a615922a817741b43ca1b13e7c6b37820a37f6eba9980fb5150c54dba6e26cb6f7b64a6f7d8afa83596fafb3afa218c3 languageName: node linkType: hard -"mdn-data@npm:2.0.4": - version: 2.0.4 - resolution: "mdn-data@npm:2.0.4" - checksum: 10/2236dbec301f7e148a9cc4f91c0c45fd0271a9a5e7defc80792da2d64d823f24be51dd28d24f328896fc504d84e00d1833eeac47a55e47729ec6ed0308aa824a +"@protobufjs/fetch@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/fetch@npm:1.1.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.1" + "@protobufjs/inquire": "npm:^1.1.0" + checksum: 10/67ae40572ad536e4ef94269199f252c024b66e3059850906bdaee161ca1d75c73d04d35cd56f147a8a5a079f5808e342b99e61942c1dae15604ff0600b09a958 languageName: node linkType: hard -"mdurl@npm:^2.0.0": - version: 2.0.0 - resolution: "mdurl@npm:2.0.0" - checksum: 10/1720349d4a53e401aa993241368e35c0ad13d816ad0b28388928c58ca9faa0cf755fa45f18ccbf64f4ce54a845a50ddce5c84e4016897b513096a68dac4b0158 +"@protobufjs/float@npm:^1.0.2": + version: 1.0.2 + resolution: "@protobufjs/float@npm:1.0.2" + checksum: 10/634c2c989da0ef2f4f19373d64187e2a79f598c5fb7991afb689d29a2ea17c14b796b29725945fa34b9493c17fb799e08ac0a7ccaae460ee1757d3083ed35187 languageName: node linkType: hard -"media-typer@npm:0.3.0": - version: 0.3.0 - resolution: "media-typer@npm:0.3.0" - checksum: 10/38e0984db39139604756903a01397e29e17dcb04207bb3e081412ce725ab17338ecc47220c1b186b6bbe79a658aad1b0d41142884f5a481f36290cdefbe6aa46 +"@protobufjs/inquire@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/inquire@npm:1.1.0" + checksum: 10/c09efa34a5465cb120775e1a482136f2340a58b4abce7e93d72b8b5a9324a0e879275016ef9fcd73d72a4731639c54f2bb755bb82f916e4a78892d1d840bb3d2 + languageName: node + linkType: hard + +"@protobufjs/path@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/path@npm:1.1.2" + checksum: 10/bb709567935fd385a86ad1f575aea98131bbd719c743fb9b6edd6b47ede429ff71a801cecbd64fc72deebf4e08b8f1bd8062793178cdaed3713b8d15771f9b83 languageName: node linkType: hard -"media-typer@npm:^1.1.0": +"@protobufjs/pool@npm:^1.1.0": version: 1.1.0 - resolution: "media-typer@npm:1.1.0" - checksum: 10/a58dd60804df73c672942a7253ccc06815612326dc1c0827984b1a21704466d7cde351394f47649e56cf7415e6ee2e26e000e81b51b3eebb5a93540e8bf93cbd + resolution: "@protobufjs/pool@npm:1.1.0" + checksum: 10/b9c7047647f6af28e92aac54f6f7c1f7ff31b201b4bfcc7a415b2861528854fce3ec666d7e7e10fd744da905f7d4aef2205bbcc8944ca0ca7a82e18134d00c46 languageName: node linkType: hard -"mem@npm:^1.1.0": +"@protobufjs/utf8@npm:^1.1.0": version: 1.1.0 - resolution: "mem@npm:1.1.0" - dependencies: - mimic-fn: "npm:^1.0.0" - checksum: 10/c6e01ec0059a453d67566fd7d35d45c7996148e2b7446546b33c3d5971ec84663a3ba11faa87ce90cc753257a2babc3ac35f5fca02c0f695bd38132a1a29b8a9 + resolution: "@protobufjs/utf8@npm:1.1.0" + checksum: 10/131e289c57534c1d73a0e55782d6751dd821db1583cb2f7f7e017c9d6747addaebe79f28120b2e0185395d990aad347fb14ffa73ef4096fa38508d61a0e64602 languageName: node linkType: hard -"mem@npm:^4.0.0": - version: 4.3.0 - resolution: "mem@npm:4.3.0" +"@redocly/ajv@npm:^8.11.0": + version: 8.11.0 + resolution: "@redocly/ajv@npm:8.11.0" dependencies: - map-age-cleaner: "npm:^0.1.1" - mimic-fn: "npm:^2.0.0" - p-is-promise: "npm:^2.0.0" - checksum: 10/ae4afa1cac2b4d64e089ecd54e06ae857b6e5aae410802564032cb407aad13aa598c5aededae8cca6c5827f4057ec3f58415a078c80181dd08019ae1a9aa1226 + fast-deep-equal: "npm:^3.1.1" + json-schema-traverse: "npm:^1.0.0" + require-from-string: "npm:^2.0.2" + uri-js: "npm:^4.2.2" + checksum: 10/ec2fca2c08715e5618c498ce55884f7703e296deebf93675e3c9ad124caf5fe36f4da04be6729575f80a75e3d09295f7072ce066ed58393ced289e43dd6eabd8 languageName: node linkType: hard -"memdown@npm:1.4.1, memdown@npm:^1.0.0": - version: 1.4.1 - resolution: "memdown@npm:1.4.1" - dependencies: - abstract-leveldown: "npm:~2.7.1" - functional-red-black-tree: "npm:^1.0.1" - immediate: "npm:^3.2.3" - inherits: "npm:~2.0.1" - ltgt: "npm:~2.2.0" - safe-buffer: "npm:~5.1.1" - checksum: 10/3f89142a12389b1ebfc7adaf3be19ed57cd073f84160eb7419b61c8e188e2b82eb787dad168d7b00ca68355b6b952067d9badaa5ac88c8ee014e4b0af2bfaea0 +"@redocly/config@npm:^0.6.0": + version: 0.6.0 + resolution: "@redocly/config@npm:0.6.0" + checksum: 10/bde6c0f32e85bf70d7645fccd5332ddee6a4bbb07893bd61cd3c8067eee7b339edb1c1de3cb8b1bbd982ba461ac6e70837a4b9eafb20993cc0fd44dd8e500312 languageName: node linkType: hard -"memdown@npm:~3.0.0": - version: 3.0.0 - resolution: "memdown@npm:3.0.0" +"@redocly/openapi-core@npm:1.15.0": + version: 1.15.0 + resolution: "@redocly/openapi-core@npm:1.15.0" dependencies: - abstract-leveldown: "npm:~5.0.0" - functional-red-black-tree: "npm:~1.0.1" - immediate: "npm:~3.2.3" - inherits: "npm:~2.0.1" - ltgt: "npm:~2.2.0" - safe-buffer: "npm:~5.1.1" - checksum: 10/c3b9d58f32ae8694b1a2daa4c3a7aafd08ac986df9a6de56b9630920d69955b8b1df4c54ca2021d2e0c80153b53142cab469b39e311eb36dab9436798414e640 + "@redocly/ajv": "npm:^8.11.0" + "@redocly/config": "npm:^0.6.0" + colorette: "npm:^1.2.0" + js-levenshtein: "npm:^1.1.6" + js-yaml: "npm:^4.1.0" + lodash.isequal: "npm:^4.5.0" + minimatch: "npm:^5.0.1" + node-fetch: "npm:^2.6.1" + pluralize: "npm:^8.0.0" + yaml-ast-parser: "npm:0.0.43" + checksum: 10/7234f23d324999fcac38a7a78530cb3c88dcf9289ac331123324f7029ec79b701507de43137d86293273ef6be094ca1b818cf0e0bf0404509bccc1e575589655 languageName: node linkType: hard -"memfs@npm:^3.1.2": - version: 3.5.3 - resolution: "memfs@npm:3.5.3" - dependencies: - fs-monkey: "npm:^1.0.4" - checksum: 10/7c9cdb453a6b06e87f11e2dbe6c518fd3c1c1581b370ffa24f42f3fd5b1db8c2203f596e43321a0032963f3e9b66400f2c3cf043904ac496d6ae33eafd0878fe +"@scure/base@npm:~1.1.0": + version: 1.1.1 + resolution: "@scure/base@npm:1.1.1" + checksum: 10/9aaa525ac25215cbe1bde00733a2fd25e99f03793aa1fd2961c567bb62b60c8a3a485a7cb5d748c41604fca79d149de19b05e64449b770c0a04b9ae38d0b5b2b languageName: node linkType: hard -"memfs@npm:^4.6.0": - version: 4.9.3 - resolution: "memfs@npm:4.9.3" +"@scure/bip32@npm:1.3.1": + version: 1.3.1 + resolution: "@scure/bip32@npm:1.3.1" dependencies: - "@jsonjoy.com/json-pack": "npm:^1.0.3" - "@jsonjoy.com/util": "npm:^1.1.2" - tree-dump: "npm:^1.0.1" - tslib: "npm:^2.0.0" - checksum: 10/0fb971420ac005e8c1e66a3c8ad97c22195374ca869ca7d9dcef45b6bc944e98df079fa30e6ff5a1fb9d0559e1afa2d47662671e3a2ff7be985896485cdb37be + "@noble/curves": "npm:~1.1.0" + "@noble/hashes": "npm:~1.3.1" + "@scure/base": "npm:~1.1.0" + checksum: 10/0595955374dfa54a60adfa33d4793fd8b27230e962aaceb5bb5fcf8ccbb935184aa2c45154ec9bdfb26a1877b2ae0a8e4808c9a5464d4ffd971120740b816def languageName: node linkType: hard -"memory-level@npm:^1.0.0": - version: 1.0.0 - resolution: "memory-level@npm:1.0.0" +"@scure/bip39@npm:1.2.1": + version: 1.2.1 + resolution: "@scure/bip39@npm:1.2.1" dependencies: - abstract-level: "npm:^1.0.0" - functional-red-black-tree: "npm:^1.0.1" - module-error: "npm:^1.0.1" - checksum: 10/e3293d8c67ebc0aa4b29982c5f8e3d139c5b1b04b97fa3ae98f940f91c7bdfefec9ff189742943734ebb6c7efa85fed6a4d559407b2d5751106b24cac17a23a6 + "@noble/hashes": "npm:~1.3.0" + "@scure/base": "npm:~1.1.0" + checksum: 10/2ea368bbed34d6b1701c20683bf465e147f231a9e37e639b8c82f585d6f978bb0f3855fca7ceff04954ae248b3e313f5d322d0210614fb7acb402739415aaf31 languageName: node linkType: hard -"memorystream@npm:^0.3.1": - version: 0.3.1 - resolution: "memorystream@npm:0.3.1" - checksum: 10/2e34a1e35e6eb2e342f788f75f96c16f115b81ff6dd39e6c2f48c78b464dbf5b1a4c6ebfae4c573bd0f8dbe8c57d72bb357c60523be184655260d25855c03902 +"@sec-ant/readable-stream@npm:^0.4.1": + version: 0.4.1 + resolution: "@sec-ant/readable-stream@npm:0.4.1" + checksum: 10/aac89581652ac85debe7c5303451c2ebf8bf25ca25db680e4b9b73168f6940616d9a4bbe3348981827b1159b14e2f2e6af4b7bd5735cac898c12d5c51909c102 languageName: node linkType: hard -"meow@npm:^10.0.0, meow@npm:^10.1.2": - version: 10.1.2 - resolution: "meow@npm:10.1.2" +"@sigstore/bundle@npm:^2.3.2": + version: 2.3.2 + resolution: "@sigstore/bundle@npm:2.3.2" dependencies: - "@types/minimist": "npm:^1.2.2" - camelcase-keys: "npm:^7.0.0" - decamelize: "npm:^5.0.0" - decamelize-keys: "npm:^1.1.0" - hard-rejection: "npm:^2.1.0" - minimist-options: "npm:4.1.0" - normalize-package-data: "npm:^3.0.2" - read-pkg-up: "npm:^8.0.0" - redent: "npm:^4.0.0" - trim-newlines: "npm:^4.0.2" - type-fest: "npm:^1.2.2" - yargs-parser: "npm:^20.2.9" - checksum: 10/b7cf32ac7d858e9d5e55ba70768f0d13c71be6d6167c1000ce795e4963be5fdddd6bbc6958bb1b392149140dd6c07409cd8a394d297cdbfcc45d428f2c102292 + "@sigstore/protobuf-specs": "npm:^0.3.2" + checksum: 10/16c2dd624612171acf40c0daf6ca8f43332abfab3ea522e6fcff70df70207061f8a9faa43e10f8b5d0006ff1edebe5179101f4ba566ff6d271099158d3ae9503 languageName: node linkType: hard -"meow@npm:^10.1.3": - version: 10.1.5 - resolution: "meow@npm:10.1.5" - dependencies: - "@types/minimist": "npm:^1.2.2" - camelcase-keys: "npm:^7.0.0" - decamelize: "npm:^5.0.0" - decamelize-keys: "npm:^1.1.0" - hard-rejection: "npm:^2.1.0" - minimist-options: "npm:4.1.0" - normalize-package-data: "npm:^3.0.2" - read-pkg-up: "npm:^8.0.0" - redent: "npm:^4.0.0" - trim-newlines: "npm:^4.0.2" - type-fest: "npm:^1.2.2" - yargs-parser: "npm:^20.2.9" - checksum: 10/4d6d4c233b9405bace4fd6c60db0b5806d7186a047852ddce0748e56a57c75d4fef3ab2603a480bd74595e4e8e3a47b932d737397a62e043da1d3187f1240ff4 +"@sigstore/core@npm:^1.0.0, @sigstore/core@npm:^1.1.0": + version: 1.1.0 + resolution: "@sigstore/core@npm:1.1.0" + checksum: 10/4149572091d61c246dd2ff636ff9a31441877db78cc3afe25fd0b28ece87f0094576f8b9077d1dc7c1c959ac4b000d407595becb6cd784c3664e9dd7cb6da36a languageName: node linkType: hard -"meow@npm:^12.0.1": - version: 12.1.1 - resolution: "meow@npm:12.1.1" - checksum: 10/8594c319f4671a562c1fef584422902f1bbbad09ea49cdf9bb26dc92f730fa33398dd28a8cf34fcf14167f1d1148d05a867e50911fc4286751a4fb662fdd2dc2 +"@sigstore/protobuf-specs@npm:^0.3.2": + version: 0.3.2 + resolution: "@sigstore/protobuf-specs@npm:0.3.2" + checksum: 10/350a6eb834e0f5c50987935c329350ba9df5baedba7c3db6ab6bc55d8730d9e6ff2deb31e770e721b9fef53f1cf6b32f376e28ed72c6e090493bceb820acfb4a languageName: node linkType: hard -"meow@npm:^8.0.0, meow@npm:^8.1.2": - version: 8.1.2 - resolution: "meow@npm:8.1.2" +"@sigstore/sign@npm:^2.3.2": + version: 2.3.2 + resolution: "@sigstore/sign@npm:2.3.2" dependencies: - "@types/minimist": "npm:^1.2.0" - camelcase-keys: "npm:^6.2.2" - decamelize-keys: "npm:^1.1.0" - hard-rejection: "npm:^2.1.0" - minimist-options: "npm:4.1.0" - normalize-package-data: "npm:^3.0.0" - read-pkg-up: "npm:^7.0.1" - redent: "npm:^3.0.0" - trim-newlines: "npm:^3.0.0" - type-fest: "npm:^0.18.0" - yargs-parser: "npm:^20.2.3" - checksum: 10/d4770f90135c0ef4d0f4fa4f4310a18c07bbbe408221fa79a68fda93944134001ffc24ed605e7668f61e920dd8db30936548e927d2331b0e30699d56247f9873 - languageName: node - linkType: hard - -"merge-descriptors@npm:1.0.1": - version: 1.0.1 - resolution: "merge-descriptors@npm:1.0.1" - checksum: 10/5abc259d2ae25bb06d19ce2b94a21632583c74e2a9109ee1ba7fd147aa7362b380d971e0251069f8b3eb7d48c21ac839e21fa177b335e82c76ec172e30c31a26 + "@sigstore/bundle": "npm:^2.3.2" + "@sigstore/core": "npm:^1.0.0" + "@sigstore/protobuf-specs": "npm:^0.3.2" + make-fetch-happen: "npm:^13.0.1" + proc-log: "npm:^4.2.0" + promise-retry: "npm:^2.0.1" + checksum: 10/3b0198fb8f8c6fe1c7fd34e9be25484d4472cd93ec3709c68f4cf45a07a0a90ebceb2193e77dfe780bb0a3effa31152a7f9d01497010bde9d9ab4e85873e2843 languageName: node linkType: hard -"merge-descriptors@npm:1.0.3, merge-descriptors@npm:^1.0.1": - version: 1.0.3 - resolution: "merge-descriptors@npm:1.0.3" - checksum: 10/52117adbe0313d5defa771c9993fe081e2d2df9b840597e966aadafde04ae8d0e3da46bac7ca4efc37d4d2b839436582659cd49c6a43eacb3fe3050896a105d1 +"@sigstore/tuf@npm:^2.3.4": + version: 2.3.4 + resolution: "@sigstore/tuf@npm:2.3.4" + dependencies: + "@sigstore/protobuf-specs": "npm:^0.3.2" + tuf-js: "npm:^2.2.1" + checksum: 10/4ef978a0b29e1bdf4a8ac48580ff68bc7a3f10db7b301d033f212cc42b1ee58bf555ac77f67b21b44e8315de38640f23f24c7022fe46f66c236e0c0293d23b00 languageName: node linkType: hard -"merge-options@npm:^3.0.4": - version: 3.0.4 - resolution: "merge-options@npm:3.0.4" +"@sigstore/verify@npm:^1.2.1": + version: 1.2.1 + resolution: "@sigstore/verify@npm:1.2.1" dependencies: - is-plain-obj: "npm:^2.1.0" - checksum: 10/d86ddb3dd6e85d558dbf25dc944f3527b6bacb944db3fdda6e84a3f59c4e4b85231095f58b835758b9a57708342dee0f8de0dffa352974a48221487fe9f4584f + "@sigstore/bundle": "npm:^2.3.2" + "@sigstore/core": "npm:^1.1.0" + "@sigstore/protobuf-specs": "npm:^0.3.2" + checksum: 10/68a1bb341e93a86f738b4e55be8812034df398bdae1746b5f8c7e49d35c6a223ff634fa70b55152de5db992e8356cfaeae5779d6d805ecf4dd18caf167de8b95 languageName: node linkType: hard -"merge-source-map@npm:^1.1.0": - version: 1.1.0 - resolution: "merge-source-map@npm:1.1.0" - dependencies: - source-map: "npm:^0.6.1" - checksum: 10/945a83dcc59eff77dde709be1d3d6cb575c11cd7164a7ccdc1c6f0d463aad7c12750a510bdf84af2c05fac4615c4305d97ac90477975348bb901a905c8e92c4b +"@sinclair/typebox@npm:^0.25.16": + version: 0.25.24 + resolution: "@sinclair/typebox@npm:0.25.24" + checksum: 10/d415546153478befa3c8386a4723e3061ac065867c7e22fe0374d36091991676d231e5381e66daa0ed21639217c6c80e0d6224a9c89aaac269e58b82b2f4a2f4 languageName: node linkType: hard -"merge-stream@npm:^2.0.0": - version: 2.0.0 - resolution: "merge-stream@npm:2.0.0" - checksum: 10/6fa4dcc8d86629705cea944a4b88ef4cb0e07656ebf223fa287443256414283dd25d91c1cd84c77987f2aec5927af1a9db6085757cb43d90eb170ebf4b47f4f4 +"@sinclair/typebox@npm:^0.27.8": + version: 0.27.8 + resolution: "@sinclair/typebox@npm:0.27.8" + checksum: 10/297f95ff77c82c54de8c9907f186076e715ff2621c5222ba50b8d40a170661c0c5242c763cba2a4791f0f91cb1d8ffa53ea1d7294570cf8cd4694c0e383e484d languageName: node linkType: hard -"merge2@npm:^1.2.3, merge2@npm:^1.3.0, merge2@npm:^1.4.1": - version: 1.4.1 - resolution: "merge2@npm:1.4.1" - checksum: 10/7268db63ed5169466540b6fb947aec313200bcf6d40c5ab722c22e242f651994619bcd85601602972d3c85bd2cc45a358a4c61937e9f11a061919a1da569b0c2 +"@sindresorhus/is@npm:^0.14.0": + version: 0.14.0 + resolution: "@sindresorhus/is@npm:0.14.0" + checksum: 10/789cd128f0b43e158e657c4505539c8997905fcb5c06d750b7df778cab2b6887bc1eb8878026a20d84524528786ef69fc3d12a964ae56a478a87bcfc7f8272f3 languageName: node linkType: hard -"merge@npm:^1.2.0": - version: 1.2.1 - resolution: "merge@npm:1.2.1" - checksum: 10/2298c4fdcf64561f320b92338681f7ffcafafb579a6e294066ae3e7bd10ae25df363903d2f028072733b9f79a1f75d2b999aef98ad5d73de13641da39cda0913 +"@sindresorhus/is@npm:^5.2.0": + version: 5.5.2 + resolution: "@sindresorhus/is@npm:5.5.2" + checksum: 10/d8f7abae42a38236ecfc3a1bdc26956ce7302b2992a002349f42e34c1b017a588d2eee70bf3444d7753d5c4055a9bc85b3d7a5965c34a16d5281972ce3094f83 languageName: node linkType: hard -"merkle-patricia-tree@npm:^2.1.2, merkle-patricia-tree@npm:^2.3.2": - version: 2.3.2 - resolution: "merkle-patricia-tree@npm:2.3.2" - dependencies: - async: "npm:^1.4.2" - ethereumjs-util: "npm:^5.0.0" - level-ws: "npm:0.0.0" - levelup: "npm:^1.2.1" - memdown: "npm:^1.0.0" - readable-stream: "npm:^2.0.0" - rlp: "npm:^2.0.0" - semaphore: "npm:>=1.0.1" - checksum: 10/4188bd5b163719bd9c5da45ba356fac753a0f0ac0b9990923b5f064852e083334abd5e4d838dcd35ee50d884dad5c52adbd103387c89d20be3ec47b51784946a +"@sindresorhus/merge-streams@npm:^2.1.0": + version: 2.3.0 + resolution: "@sindresorhus/merge-streams@npm:2.3.0" + checksum: 10/798bcb53cd1ace9df84fcdd1ba86afdc9e0cd84f5758d26ae9b1eefd8e8887e5fc30051132b9e74daf01bb41fa5a2faf1369361f83d76a3b3d7ee938058fd71c languageName: node linkType: hard -"merkletreejs@npm:0.3.11": - version: 0.3.11 - resolution: "merkletreejs@npm:0.3.11" +"@sinonjs/commons@npm:^2.0.0": + version: 2.0.0 + resolution: "@sinonjs/commons@npm:2.0.0" dependencies: - bignumber.js: "npm:^9.0.1" - buffer-reverse: "npm:^1.0.1" - crypto-js: "npm:^4.2.0" - treeify: "npm:^1.1.0" - web3-utils: "npm:^1.3.4" - checksum: 10/a93520ef768648d1e4ebd175182bd3d304270b8eb0700df5be99395fb3ad8805407bdaf3231d13b1649e87de799aa06d71c616db047ad039025764eb23b02244 + type-detect: "npm:4.0.8" + checksum: 10/bd6b44957077cd99067dcf401e80ed5ea03ba930cba2066edbbfe302d5fc973a108db25c0ae4930ee53852716929e4c94fa3b8a1510a51ac6869443a139d1e3d languageName: node linkType: hard -"merkletreejs@npm:0.4.0": - version: 0.4.0 - resolution: "merkletreejs@npm:0.4.0" +"@sinonjs/fake-timers@npm:^10.0.2": + version: 10.0.2 + resolution: "@sinonjs/fake-timers@npm:10.0.2" dependencies: - bignumber.js: "npm:^9.0.1" - buffer-reverse: "npm:^1.0.1" - crypto-js: "npm:^4.2.0" - treeify: "npm:^1.1.0" - web3-utils: "npm:^1.3.4" - checksum: 10/ebf8bd2ebb42b7f489c8da8ed39e230fa131c0a5b23a2e3be667a0589671df118f996b73d44e5b83f2c70a3c956515328386e94b2841cd279033eca8caf71aee + "@sinonjs/commons": "npm:^2.0.0" + checksum: 10/f7b47a290426d545894774c946c39877de6d6b3645e46d7d4dc99b9fc869c513791fb5be2496e877472fa630df0b61fc05b12a150bbdca606651a41ec3d5da2d languageName: node linkType: hard -"methods@npm:^1.1.2, methods@npm:~1.1.2": - version: 1.1.2 - resolution: "methods@npm:1.1.2" - checksum: 10/a385dd974faa34b5dd021b2bbf78c722881bf6f003bfe6d391d7da3ea1ed625d1ff10ddd13c57531f628b3e785be38d3eed10ad03cebd90b76932413df9a1820 +"@socket.io/component-emitter@npm:~3.1.0": + version: 3.1.2 + resolution: "@socket.io/component-emitter@npm:3.1.2" + checksum: 10/89888f00699eb34e3070624eb7b8161fa29f064aeb1389a48f02195d55dd7c52a504e52160016859f6d6dffddd54324623cdd47fd34b3d46f9ed96c18c456edc languageName: node linkType: hard -"micro-ftch@npm:^0.3.1": - version: 0.3.1 - resolution: "micro-ftch@npm:0.3.1" - checksum: 10/a7ab07d25e28ec4ae492ce4542ea9b06eee85538742b3b1263b247366ee8872f2c5ce9c8651138b2f1d22c8212f691a7b8b5384fe86ead5aff1852e211f1c035 - languageName: node - linkType: hard - -"micromatch@npm:^2.3.11": - version: 2.3.11 - resolution: "micromatch@npm:2.3.11" - dependencies: - arr-diff: "npm:^2.0.0" - array-unique: "npm:^0.2.1" - braces: "npm:^1.8.2" - expand-brackets: "npm:^0.1.4" - extglob: "npm:^0.3.1" - filename-regex: "npm:^2.0.0" - is-extglob: "npm:^1.0.0" - is-glob: "npm:^2.0.1" - kind-of: "npm:^3.0.2" - normalize-path: "npm:^2.0.1" - object.omit: "npm:^2.0.0" - parse-glob: "npm:^3.0.4" - regex-cache: "npm:^0.4.2" - checksum: 10/25b10db54a95ac0b3409005cf74ccb267e4693f14171c88860a6505e8f1a51940fee1f0bf629a3f85c34ec725ecbf48986fb3edf2d8f9283c322fcdb0512ed42 - languageName: node - linkType: hard - -"micromatch@npm:^3.1.10": - version: 3.1.10 - resolution: "micromatch@npm:3.1.10" - dependencies: - arr-diff: "npm:^4.0.0" - array-unique: "npm:^0.3.2" - braces: "npm:^2.3.1" - define-property: "npm:^2.0.2" - extend-shallow: "npm:^3.0.2" - extglob: "npm:^2.0.4" - fragment-cache: "npm:^0.2.1" - kind-of: "npm:^6.0.2" - nanomatch: "npm:^1.2.9" - object.pick: "npm:^1.3.0" - regex-not: "npm:^1.0.0" - snapdragon: "npm:^0.8.1" - to-regex: "npm:^3.0.2" - checksum: 10/4102bac83685dc7882ca1a28443d158b464653f84450de68c07cf77dbd531ed98c25006e9d9f6082bf3b95aabbff4cf231b26fd3bc84f7c4e7f263376101fad6 +"@szmarczak/http-timer@npm:^1.1.2": + version: 1.1.2 + resolution: "@szmarczak/http-timer@npm:1.1.2" + dependencies: + defer-to-connect: "npm:^1.0.1" + checksum: 10/9b63853bd53bff72c4990ebc9cd3f625bbab757247099af172564da6649a27a1d41b1a70cd849dd65b2a078300029c1c80bf3079e6a91e285da7b259eb147146 languageName: node linkType: hard -"micromatch@npm:^4.0.0, micromatch@npm:^4.0.4": - version: 4.0.4 - resolution: "micromatch@npm:4.0.4" +"@szmarczak/http-timer@npm:^5.0.1": + version: 5.0.1 + resolution: "@szmarczak/http-timer@npm:5.0.1" dependencies: - braces: "npm:^3.0.1" - picomatch: "npm:^2.2.3" - checksum: 10/c499da5aad38f3ba1a32a73a81f3dd9b631e12492133c503c14ce59aa5c631159c08f2c43d3a7e0ea3955c7921d41b7b97e662360fe3b28b2cfb0923949c176d + defer-to-connect: "npm:^2.0.1" + checksum: 10/fc9cb993e808806692e4a3337c90ece0ec00c89f4b67e3652a356b89730da98bc824273a6d67ca84d5f33cd85f317dcd5ce39d8cc0a2f060145a608a7cb8ce92 languageName: node linkType: hard -"micromatch@npm:^4.0.2, micromatch@npm:^4.0.5": - version: 4.0.5 - resolution: "micromatch@npm:4.0.5" - dependencies: - braces: "npm:^3.0.2" - picomatch: "npm:^2.3.1" - checksum: 10/a749888789fc15cac0e03273844dbd749f9f8e8d64e70c564bcf06a033129554c789bb9e30d7566d7ff6596611a08e58ac12cf2a05f6e3c9c47c50c4c7e12fa2 +"@tootallnate/once@npm:2": + version: 2.0.0 + resolution: "@tootallnate/once@npm:2.0.0" + checksum: 10/ad87447820dd3f24825d2d947ebc03072b20a42bfc96cbafec16bff8bbda6c1a81fcb0be56d5b21968560c5359a0af4038a68ba150c3e1694fe4c109a063bed8 languageName: node linkType: hard -"micromatch@npm:^4.0.7": - version: 4.0.7 - resolution: "micromatch@npm:4.0.7" - dependencies: - braces: "npm:^3.0.3" - picomatch: "npm:^2.3.1" - checksum: 10/a11ed1cb67dcbbe9a5fc02c4062cf8bb0157d73bf86956003af8dcfdf9b287f9e15ec0f6d6925ff6b8b5b496202335e497b01de4d95ef6cf06411bc5e5c474a0 +"@tsconfig/node10@npm:^1.0.7": + version: 1.0.8 + resolution: "@tsconfig/node10@npm:1.0.8" + checksum: 10/b8d5fffbc6b17ef64ef74f7fdbccee02a809a063ade785c3648dae59406bc207f70ea2c4296f92749b33019fa36a5ae716e42e49cc7f1bbf0fd147be0d6b970a languageName: node linkType: hard -"miller-rabin@npm:^4.0.0": - version: 4.0.1 - resolution: "miller-rabin@npm:4.0.1" - dependencies: - bn.js: "npm:^4.0.0" - brorand: "npm:^1.0.1" - bin: - miller-rabin: bin/miller-rabin - checksum: 10/2a38ba9d1e878d94ee8a8ab3505b40e8d44fb9700a7716570fe4c8ca7e20d49b69aea579106580618c877cc6ff969eff71705042fafb47573736bf89404417bc +"@tsconfig/node12@npm:^1.0.7": + version: 1.0.9 + resolution: "@tsconfig/node12@npm:1.0.9" + checksum: 10/a01b2400ab3582b86b589c6d31dcd0c0656f333adecde85d6d7d4086adb059808b82692380bb169546d189bf771ae21d02544a75b57bd6da4a5dd95f8567bec9 languageName: node linkType: hard -"mime-db@npm:1.52.0, mime-db@npm:>= 1.43.0 < 2": - version: 1.52.0 - resolution: "mime-db@npm:1.52.0" - checksum: 10/54bb60bf39e6f8689f6622784e668a3d7f8bed6b0d886f5c3c446cb3284be28b30bf707ed05d0fe44a036f8469976b2629bbea182684977b084de9da274694d7 +"@tsconfig/node14@npm:^1.0.0": + version: 1.0.1 + resolution: "@tsconfig/node14@npm:1.0.1" + checksum: 10/976345e896c0f059867f94f8d0f6ddb8b1844fb62bf36b727de8a9a68f024857e5db97ed51d3325e23e0616a5e48c034ff51a8d595b3fe7e955f3587540489be languageName: node linkType: hard -"mime-types@npm:^2.1.12, mime-types@npm:^2.1.16, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": - version: 2.1.35 - resolution: "mime-types@npm:2.1.35" - dependencies: - mime-db: "npm:1.52.0" - checksum: 10/89aa9651b67644035de2784a6e665fc685d79aba61857e02b9c8758da874a754aed4a9aced9265f5ed1171fd934331e5516b84a7f0218031b6fa0270eca1e51a +"@tsconfig/node16@npm:^1.0.2": + version: 1.0.2 + resolution: "@tsconfig/node16@npm:1.0.2" + checksum: 10/ca94d3639714672bbfd55f03521d3f56bb6a25479bd425da81faf21f13e1e9d15f40f97377dedbbf477a5841c5b0c8f4cd1b391f33553d750b9202c54c2c07aa languageName: node linkType: hard -"mime@npm:1.6.0, mime@npm:^1.3.4, mime@npm:^1.4.1": - version: 1.6.0 - resolution: "mime@npm:1.6.0" - bin: - mime: cli.js - checksum: 10/b7d98bb1e006c0e63e2c91b590fe1163b872abf8f7ef224d53dd31499c2197278a6d3d0864c45239b1a93d22feaf6f9477e9fc847eef945838150b8c02d03170 +"@tufjs/canonical-json@npm:2.0.0": + version: 2.0.0 + resolution: "@tufjs/canonical-json@npm:2.0.0" + checksum: 10/cc719a1d0d0ae1aa1ba551a82c87dcbefac088e433c03a3d8a1d547ea721350e47dab4ab5b0fca40d5c7ab1f4882e72edc39c9eae15bf47c45c43bcb6ee39f4f languageName: node linkType: hard -"mime@npm:^2.4.6": - version: 2.6.0 - resolution: "mime@npm:2.6.0" - bin: - mime: cli.js - checksum: 10/7da117808b5cd0203bb1b5e33445c330fe213f4d8ee2402a84d62adbde9716ca4fb90dd6d9ab4e77a4128c6c5c24a9c4c9f6a4d720b095b1b342132d02dba58d +"@tufjs/models@npm:2.0.1": + version: 2.0.1 + resolution: "@tufjs/models@npm:2.0.1" + dependencies: + "@tufjs/canonical-json": "npm:2.0.0" + minimatch: "npm:^9.0.4" + checksum: 10/7c5d2b8194195cecddc92ae37523c1375e7aaf2e554941c0f9b71db93bbef4f0af8190438dd321e8f9dfd4ce2a9b582e35a4c4c04bec87e25a289c9c8bedcd4e languageName: node linkType: hard -"mimic-fn@npm:^1.0.0": - version: 1.2.0 - resolution: "mimic-fn@npm:1.2.0" - checksum: 10/69c08205156a1f4906d9c46f9b4dc08d18a50176352e77fdeb645cedfe9f20c0b19865d465bd2dec27a5c432347f24dc07fc3695e11159d193f892834233e939 +"@types/adm-zip@npm:0.5.0": + version: 0.5.0 + resolution: "@types/adm-zip@npm:0.5.0" + dependencies: + "@types/node": "npm:*" + checksum: 10/59110171eb2a961c916487c8206decfb747611d68b8383bba896421261550c1b76d895826b53d5fdfd2192f4ea997504cbcd095abe9a2e1f16c37a884931bbd4 languageName: node linkType: hard -"mimic-fn@npm:^2.0.0, mimic-fn@npm:^2.1.0": - version: 2.1.0 - resolution: "mimic-fn@npm:2.1.0" - checksum: 10/d2421a3444848ce7f84bd49115ddacff29c15745db73f54041edc906c14b131a38d05298dae3081667627a59b2eb1ca4b436ff2e1b80f69679522410418b478a +"@types/babel__core@npm:^7.1.14": + version: 7.1.18 + resolution: "@types/babel__core@npm:7.1.18" + dependencies: + "@babel/parser": "npm:^7.1.0" + "@babel/types": "npm:^7.0.0" + "@types/babel__generator": "npm:*" + "@types/babel__template": "npm:*" + "@types/babel__traverse": "npm:*" + checksum: 10/7921d75d42eed69b9ba9fc282490216ab77a6bcf93681ed8a9da77f9ba2912c973667e9d706e6e012673e713b36c4e3654ecd25057736346e6c794f25d309a87 languageName: node linkType: hard -"mimic-fn@npm:^3.0.0": - version: 3.1.0 - resolution: "mimic-fn@npm:3.1.0" - checksum: 10/f7b167f9115b8bbdf2c3ee55dce9149d14be9e54b237259c4bc1d8d0512ea60f25a1b323f814eb1fe8f5a541662804bcfcfff3202ca58df143edb986849d58db +"@types/babel__generator@npm:*": + version: 7.6.4 + resolution: "@types/babel__generator@npm:7.6.4" + dependencies: + "@babel/types": "npm:^7.0.0" + checksum: 10/34f361a0d54a0d85ea4c4b5122c4025a5738fe6795361c85f07a4f8f9add383de640e8611edeeb8339db8203c2d64bff30be266bdcfe3cf777c19e8d34f9cebc languageName: node linkType: hard -"mimic-fn@npm:^4.0.0": - version: 4.0.0 - resolution: "mimic-fn@npm:4.0.0" - checksum: 10/995dcece15ee29aa16e188de6633d43a3db4611bcf93620e7e62109ec41c79c0f34277165b8ce5e361205049766e371851264c21ac64ca35499acb5421c2ba56 +"@types/babel__template@npm:*": + version: 7.4.1 + resolution: "@types/babel__template@npm:7.4.1" + dependencies: + "@babel/parser": "npm:^7.1.0" + "@babel/types": "npm:^7.0.0" + checksum: 10/649fe8b42c2876be1fd28c6ed9b276f78152d5904ec290b6c861d9ef324206e0a5c242e8305c421ac52ecf6358fa7e32ab7a692f55370484825c1df29b1596ee languageName: node linkType: hard -"mimic-response@npm:^1.0.0, mimic-response@npm:^1.0.1": - version: 1.0.1 - resolution: "mimic-response@npm:1.0.1" - checksum: 10/034c78753b0e622bc03c983663b1cdf66d03861050e0c8606563d149bc2b02d63f62ce4d32be4ab50d0553ae0ffe647fc34d1f5281184c6e1e8cf4d85e8d9823 +"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": + version: 7.14.2 + resolution: "@types/babel__traverse@npm:7.14.2" + dependencies: + "@babel/types": "npm:^7.3.0" + checksum: 10/daa949c48570f7ccc1dc0fad6d660244257de7110bae5a151842d4dac6ac90c6e0f476c8d7ac0a5a856fa34cb5f0c3299784da25a07eb79d5a9d75c7e4c68655 languageName: node linkType: hard -"mimic-response@npm:^3.1.0": - version: 3.1.0 - resolution: "mimic-response@npm:3.1.0" - checksum: 10/7e719047612411fe071332a7498cf0448bbe43c485c0d780046c76633a771b223ff49bd00267be122cedebb897037fdb527df72335d0d0f74724604ca70b37ad +"@types/benchmark@npm:2.1.5": + version: 2.1.5 + resolution: "@types/benchmark@npm:2.1.5" + checksum: 10/1540d8698620da2f4ef0d93dd6e57e40583bb3d5c735768d94c52bdfc039f474f83213badcc66013f0c1f73edcebec99dc731fa8943fc13b4f0d18ddfdf77bee languageName: node linkType: hard -"mimic-response@npm:^4.0.0": - version: 4.0.0 - resolution: "mimic-response@npm:4.0.0" - checksum: 10/33b804cc961efe206efdb1fca6a22540decdcfce6c14eb5c0c50e5ae9022267ab22ce8f5568b1f7247ba67500fe20d523d81e0e9f009b321ccd9d472e78d1850 +"@types/bn.js@npm:*": + version: 5.1.0 + resolution: "@types/bn.js@npm:5.1.0" + dependencies: + "@types/node": "npm:*" + checksum: 10/43d06b6f802eb7479fc58a7910cfc7af0c540fab86529c1c9b0022b992df916fc41f811da8822b6726f4e20209d5809b456c25e7f3fce37c338ebdf684b8a4b6 languageName: node linkType: hard -"min-document@npm:^2.19.0": - version: 2.19.0 - resolution: "min-document@npm:2.19.0" +"@types/body-parser@npm:*": + version: 1.19.5 + resolution: "@types/body-parser@npm:1.19.5" dependencies: - dom-walk: "npm:^0.1.0" - checksum: 10/4e45a0686c81cc04509989235dc6107e2678a59bb48ce017d3c546d7d9a18d782e341103e66c78081dd04544704e2196e529905c41c2550bca069b69f95f07c8 + "@types/connect": "npm:*" + "@types/node": "npm:*" + checksum: 10/1e251118c4b2f61029cc43b0dc028495f2d1957fe8ee49a707fb940f86a9bd2f9754230805598278fe99958b49e9b7e66eec8ef6a50ab5c1f6b93e1ba2aaba82 languageName: node linkType: hard -"min-indent@npm:^1.0.0, min-indent@npm:^1.0.1": - version: 1.0.1 - resolution: "min-indent@npm:1.0.1" - checksum: 10/bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 +"@types/connect@npm:*": + version: 3.4.38 + resolution: "@types/connect@npm:3.4.38" + dependencies: + "@types/node": "npm:*" + checksum: 10/7eb1bc5342a9604facd57598a6c62621e244822442976c443efb84ff745246b10d06e8b309b6e80130026a396f19bf6793b7cecd7380169f369dac3bfc46fb99 languageName: node linkType: hard -"mini-css-extract-plugin@npm:2.7.6, mini-css-extract-plugin@npm:^2.4.5": - version: 2.7.6 - resolution: "mini-css-extract-plugin@npm:2.7.6" - dependencies: - schema-utils: "npm:^4.0.0" - peerDependencies: - webpack: ^5.0.0 - checksum: 10/1f718bfdcb7c2bf5e4336f694e5576432149d63f9dacaf94eae38ad046534050471a712a2d1bedf95e1722a2d3b56c3361d7352849e802e4875e716885e952c3 +"@types/cookie@npm:^0.4.1": + version: 0.4.1 + resolution: "@types/cookie@npm:0.4.1" + checksum: 10/427c9220217d3d74f3e5d53d68cd39502f3bbebdb1af4ecf0d05076bcbe9ddab299ad6369fe0f517389296ba4ca49ddf9a8c22f68e5e9eb8ae6d0076cfab90b2 languageName: node linkType: hard -"mini-css-extract-plugin@npm:2.8.1": - version: 2.8.1 - resolution: "mini-css-extract-plugin@npm:2.8.1" +"@types/cors@npm:^2.8.12": + version: 2.8.17 + resolution: "@types/cors@npm:2.8.17" dependencies: - schema-utils: "npm:^4.0.0" - tapable: "npm:^2.2.1" - peerDependencies: - webpack: ^5.0.0 - checksum: 10/e00f6d19ad1be94701db8e5f126bdf8a9f4739cd8e8eb68690254aac4699c49c872a1ca761461d7d0c37a933f823df5f87674688fe0d568e00e7c0e9d6e5c798 + "@types/node": "npm:*" + checksum: 10/469bd85e29a35977099a3745c78e489916011169a664e97c4c3d6538143b0a16e4cc72b05b407dc008df3892ed7bf595f9b7c0f1f4680e169565ee9d64966bde languageName: node linkType: hard -"minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": - version: 1.0.1 - resolution: "minimalistic-assert@npm:1.0.1" - checksum: 10/cc7974a9268fbf130fb055aff76700d7e2d8be5f761fb5c60318d0ed010d839ab3661a533ad29a5d37653133385204c503bfac995aaa4236f4e847461ea32ba7 +"@types/debug@npm:4.1.12": + version: 4.1.12 + resolution: "@types/debug@npm:4.1.12" + dependencies: + "@types/ms": "npm:*" + checksum: 10/47876a852de8240bfdaf7481357af2b88cb660d30c72e73789abf00c499d6bc7cd5e52f41c915d1b9cd8ec9fef5b05688d7b7aef17f7f272c2d04679508d1053 languageName: node linkType: hard -"minimalistic-crypto-utils@npm:^1.0.1": - version: 1.0.1 - resolution: "minimalistic-crypto-utils@npm:1.0.1" - checksum: 10/6e8a0422b30039406efd4c440829ea8f988845db02a3299f372fceba56ffa94994a9c0f2fd70c17f9969eedfbd72f34b5070ead9656a34d3f71c0bd72583a0ed +"@types/elliptic@npm:^6.4.9": + version: 6.4.14 + resolution: "@types/elliptic@npm:6.4.14" + dependencies: + "@types/bn.js": "npm:*" + checksum: 10/603e75b2eb5581d568d3506d26b00340aa2d1a459182a044e5358fdcf7cfcec068e1e25e2e281f44a02aafa1769c6da5dfd0b6a4a307e9f6d8cdb7f1a475d412 languageName: node linkType: hard -"minimatch@npm:3.0.5": - version: 3.0.5 - resolution: "minimatch@npm:3.0.5" - dependencies: - brace-expansion: "npm:^1.1.7" - checksum: 10/8f9707491183a07a9542b8cf45aacb3745ba9fe6c611173fb225d7bf191e55416779aee31e17673a516a178af02d8d3d71ddd36ae3d5cc2495f627977ad1a012 +"@types/estree@npm:^1.0.5": + version: 1.0.5 + resolution: "@types/estree@npm:1.0.5" + checksum: 10/7de6d928dd4010b0e20c6919e1a6c27b61f8d4567befa89252055fad503d587ecb9a1e3eab1b1901f923964d7019796db810b7fd6430acb26c32866d126fd408 languageName: node linkType: hard -"minimatch@npm:5.0.1": +"@types/express-serve-static-core@npm:^5.0.0": version: 5.0.1 - resolution: "minimatch@npm:5.0.1" + resolution: "@types/express-serve-static-core@npm:5.0.1" dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10/2656580f18d9f38ada186196fcc72dc9076d70f7227adc664e72614d464e075dc4ae3936e6742519e09e336996ef33c6035e606888b12f65ca7fda792ddd2085 + "@types/node": "npm:*" + "@types/qs": "npm:*" + "@types/range-parser": "npm:*" + "@types/send": "npm:*" + checksum: 10/9bccbf4c927a877e4fe60f9664737ec6ac39d4d906dbb2c8d00f67849bb0968833573c48602b5e77d3e0129fd1bdbe0eae08e68485f028ebf8c557806caa3377 languageName: node linkType: hard -"minimatch@npm:9.0.3": - version: 9.0.3 - resolution: "minimatch@npm:9.0.3" +"@types/express@npm:5.0.0": + version: 5.0.0 + resolution: "@types/express@npm:5.0.0" dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10/c81b47d28153e77521877649f4bab48348d10938df9e8147a58111fe00ef89559a2938de9f6632910c4f7bf7bb5cd81191a546167e58d357f0cfb1e18cecc1c5 + "@types/body-parser": "npm:*" + "@types/express-serve-static-core": "npm:^5.0.0" + "@types/qs": "npm:*" + "@types/serve-static": "npm:*" + checksum: 10/45b199ab669caa33e6badafeebf078e277ea95042309d325a04b1ec498f33d33fd5a4ae9c8e358342367b178fe454d7323c5dfc8002bf27070b210a2c6cc11f0 languageName: node linkType: hard -"minimatch@npm:^3.0.2, minimatch@npm:^3.0.3, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": - version: 3.1.2 - resolution: "minimatch@npm:3.1.2" +"@types/fs-extra@npm:11.0.4": + version: 11.0.4 + resolution: "@types/fs-extra@npm:11.0.4" dependencies: - brace-expansion: "npm:^1.1.7" - checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634 + "@types/jsonfile": "npm:*" + "@types/node": "npm:*" + checksum: 10/acc4c1eb0cde7b1f23f3fe6eb080a14832d8fa9dc1761aa444c5e2f0f6b6fa657ed46ebae32fb580a6700fc921b6165ce8ac3e3ba030c3dd15f10ad4dd4cae98 languageName: node linkType: hard -"minimatch@npm:^5.0.1, minimatch@npm:^5.1.6": - version: 5.1.6 - resolution: "minimatch@npm:5.1.6" +"@types/glob@npm:^7.1.1": + version: 7.2.0 + resolution: "@types/glob@npm:7.2.0" dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10/126b36485b821daf96d33b5c821dac600cc1ab36c87e7a532594f9b1652b1fa89a1eebcaad4dff17c764dce1a7ac1531327f190fed5f97d8f6e5f889c116c429 + "@types/minimatch": "npm:*" + "@types/node": "npm:*" + checksum: 10/6ae717fedfdfdad25f3d5a568323926c64f52ef35897bcac8aca8e19bc50c0bd84630bbd063e5d52078b2137d8e7d3c26eabebd1a2f03ff350fff8a91e79fc19 languageName: node linkType: hard -"minimatch@npm:^7.4.2, minimatch@npm:^7.4.6": - version: 7.4.6 - resolution: "minimatch@npm:7.4.6" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10/0046ba1161ac6414bde1b07c440792ebcdb2ed93e6714c85c73974332b709b7e692801550bc9da22028a8613407b3f13861e17dd0dd44f4babdeacd44950430b +"@types/google-protobuf@npm:3.15.5": + version: 3.15.5 + resolution: "@types/google-protobuf@npm:3.15.5" + checksum: 10/cbcf33239a3c423d113efc2b926310ca65fdb61c38b78d45d80bccb2414dc75b3b76224395187bbe449aeffa4831f1ac68710a8d47058770c5257d1a2fa9682a languageName: node linkType: hard -"minimatch@npm:^8.0.2": - version: 8.0.4 - resolution: "minimatch@npm:8.0.4" +"@types/graceful-fs@npm:^4.1.3": + version: 4.1.5 + resolution: "@types/graceful-fs@npm:4.1.5" dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10/aef05598ee565e1013bc8a10f53410ac681561f901c1a084b8ecfd016c9ed919f58f4bbd5b63e05643189dfb26e8106a84f0e1ff12e4a263aa37e1cae7ce9828 + "@types/node": "npm:*" + checksum: 10/d076bb61f45d0fc42dee496ef8b1c2f8742e15d5e47e90e20d0243386e426c04d4efd408a48875ab432f7960b4ce3414db20ed0fbbfc7bcc89d84e574f6e045a languageName: node linkType: hard -"minimatch@npm:^9.0.0, minimatch@npm:^9.0.1, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": - version: 9.0.5 - resolution: "minimatch@npm:9.0.5" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10/dd6a8927b063aca6d910b119e1f2df6d2ce7d36eab91de83167dd136bb85e1ebff97b0d3de1cb08bd1f7e018ca170b4962479fefab5b2a69e2ae12cb2edc8348 +"@types/http-cache-semantics@npm:^4.0.1": + version: 4.0.1 + resolution: "@types/http-cache-semantics@npm:4.0.1" + checksum: 10/d059bf8a15d5163cc60da51ba00d17620507f968d0b792cd55f62043016344a5f0e1aa94fa411089d41114035fcd0ea656f968bda7eabb6663a97787e3445a1c languageName: node linkType: hard -"minimist-options@npm:4.1.0": - version: 4.1.0 - resolution: "minimist-options@npm:4.1.0" - dependencies: - arrify: "npm:^1.0.1" - is-plain-obj: "npm:^1.1.0" - kind-of: "npm:^6.0.3" - checksum: 10/8c040b3068811e79de1140ca2b708d3e203c8003eb9a414c1ab3cd467fc5f17c9ca02a5aef23bedc51a7f8bfbe77f87e9a7e31ec81fba304cda675b019496f4e +"@types/http-errors@npm:*": + version: 2.0.4 + resolution: "@types/http-errors@npm:2.0.4" + checksum: 10/1f3d7c3b32c7524811a45690881736b3ef741bf9849ae03d32ad1ab7062608454b150a4e7f1351f83d26a418b2d65af9bdc06198f1c079d75578282884c4e8e3 languageName: node linkType: hard -"minimist@npm:>=1.2.6": - version: 1.2.8 - resolution: "minimist@npm:1.2.8" - checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f +"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": + version: 2.0.4 + resolution: "@types/istanbul-lib-coverage@npm:2.0.4" + checksum: 10/a25d7589ee65c94d31464c16b72a9dc81dfa0bea9d3e105ae03882d616e2a0712a9c101a599ec482d297c3591e16336962878cb3eb1a0a62d5b76d277a890ce7 languageName: node linkType: hard -"minipass-collect@npm:^1.0.2": - version: 1.0.2 - resolution: "minipass-collect@npm:1.0.2" +"@types/istanbul-lib-report@npm:*": + version: 3.0.0 + resolution: "@types/istanbul-lib-report@npm:3.0.0" dependencies: - minipass: "npm:^3.0.0" - checksum: 10/14df761028f3e47293aee72888f2657695ec66bd7d09cae7ad558da30415fdc4752bbfee66287dcc6fd5e6a2fa3466d6c484dc1cbd986525d9393b9523d97f10 + "@types/istanbul-lib-coverage": "npm:*" + checksum: 10/f121dcac8a6b8184f3cab97286d8d519f1937fa8620ada5dbc43b699d602b8be289e4a4bccbd6ee1aade6869d3c9fb68bf04c6fdca8c5b0c4e7e314c31c7900a languageName: node linkType: hard -"minipass-collect@npm:^2.0.1": - version: 2.0.1 - resolution: "minipass-collect@npm:2.0.1" +"@types/istanbul-reports@npm:^3.0.0": + version: 3.0.1 + resolution: "@types/istanbul-reports@npm:3.0.1" dependencies: - minipass: "npm:^7.0.3" - checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + "@types/istanbul-lib-report": "npm:*" + checksum: 10/f1ad54bc68f37f60b30c7915886b92f86b847033e597f9b34f2415acdbe5ed742fa559a0a40050d74cdba3b6a63c342cac1f3a64dba5b68b66a6941f4abd7903 languageName: node linkType: hard -"minipass-fetch@npm:^1.3.2": - version: 1.4.1 - resolution: "minipass-fetch@npm:1.4.1" +"@types/jest@npm:29.5.3": + version: 29.5.3 + resolution: "@types/jest@npm:29.5.3" dependencies: - encoding: "npm:^0.1.12" - minipass: "npm:^3.1.0" - minipass-sized: "npm:^1.0.3" - minizlib: "npm:^2.0.0" - dependenciesMeta: - encoding: - optional: true - checksum: 10/4c6f678d2c976c275ba35735aa18e341401d1fb94bbf38a36bb2c2d01835ac699f15b7ab1adaf4ee40a751361527d312a18853feaf9c0121f4904f811656575a + expect: "npm:^29.0.0" + pretty-format: "npm:^29.0.0" + checksum: 10/e8b4eda3ba379b21fcd5c2d1d531ec94f636676f1690f06ff3f7b8dc199c2cec711d4c4e122175f05d50040e5dec69f3c13ef88bd825f0b1a1ac1332eb072c12 languageName: node linkType: hard -"minipass-fetch@npm:^2.0.3": - version: 2.1.0 - resolution: "minipass-fetch@npm:2.1.0" - dependencies: - encoding: "npm:^0.1.13" - minipass: "npm:^3.1.6" - minipass-sized: "npm:^1.0.3" - minizlib: "npm:^2.1.2" - dependenciesMeta: - encoding: - optional: true - checksum: 10/33b6927ef8a4516e27878e1e9966a6dee5c2efb844584b39712a8c222cf7cc586ae00c09897ce3b21e77b6600ad4c7503f8bd732ef1a8bf98137f18c45c6d6c4 +"@types/json-schema@npm:^7.0.12": + version: 7.0.12 + resolution: "@types/json-schema@npm:7.0.12" + checksum: 10/7a72ba9cb7d2b45d7bb032e063c9eeb1ce4102d62551761e84c91f99f8273ba5aaffd34be835869456ec7c40761b4389009d9e777c0020a7227ca0f5e3238e94 languageName: node linkType: hard - -"minipass-fetch@npm:^3.0.0": - version: 3.0.1 - resolution: "minipass-fetch@npm:3.0.1" - dependencies: - encoding: "npm:^0.1.13" - minipass: "npm:^4.0.0" - minipass-sized: "npm:^1.0.3" - minizlib: "npm:^2.1.2" - dependenciesMeta: - encoding: - optional: true - checksum: 10/8af4555abeea05832c76469b7340c4895f60d955173db89df3374f45c97322c7f56093a94d3d5d0c66c97cb52983bb465a5801a551d17d13c0dff46746996172 + +"@types/json-schema@npm:^7.0.8": + version: 7.0.9 + resolution: "@types/json-schema@npm:7.0.9" + checksum: 10/7ceb41e396240aa69ae15c02ffbb6548ea2bb2f845a7378c711c7c908a9a8438a0330f3135f1ccb6e82e334b9e2ec5b94fb57a1435f2b15362d38e9d5109e5ea languageName: node linkType: hard -"minipass-flush@npm:^1.0.5": - version: 1.0.5 - resolution: "minipass-flush@npm:1.0.5" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10/56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf +"@types/json-stable-stringify@npm:1.0.33": + version: 1.0.33 + resolution: "@types/json-stable-stringify@npm:1.0.33" + checksum: 10/5fb2b6761d7079396372239366afbb4d454bdf2c78fb26a78214b1c3f7a94e131910b1fe0607aae90f8a49dd71972d8a10d74088145b92d3fcb5b38fb1359e30 languageName: node linkType: hard -"minipass-json-stream@npm:^1.0.1": - version: 1.0.1 - resolution: "minipass-json-stream@npm:1.0.1" - dependencies: - jsonparse: "npm:^1.3.1" - minipass: "npm:^3.0.0" - checksum: 10/3c65482c630b063c3fa86c853f324a50d9484f2eb6c3034f9c86c0b22f44181668848088f2c869cc764f8a9b8adc8f617f93762cd9d11521f563b8a71c5b815d +"@types/json5@npm:^0.0.29": + version: 0.0.29 + resolution: "@types/json5@npm:0.0.29" + checksum: 10/4e5aed58cabb2bbf6f725da13421aa50a49abb6bc17bfab6c31b8774b073fa7b50d557c61f961a09a85f6056151190f8ac95f13f5b48136ba5841f7d4484ec56 languageName: node linkType: hard -"minipass-pipeline@npm:^1.2.2, minipass-pipeline@npm:^1.2.4": - version: 1.2.4 - resolution: "minipass-pipeline@npm:1.2.4" +"@types/jsonfile@npm:*": + version: 6.1.3 + resolution: "@types/jsonfile@npm:6.1.3" dependencies: - minipass: "npm:^3.0.0" - checksum: 10/b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + "@types/node": "npm:*" + checksum: 10/3f2d0060a567f78b5d666971d5371e72f37294cbfc19069912c76ba9585d209ceb5aac421658f2b3ab922f96b8df53081e9f51d09aef34f2b4882b813a0e0c38 languageName: node linkType: hard -"minipass-sized@npm:^1.0.3": - version: 1.0.3 - resolution: "minipass-sized@npm:1.0.3" +"@types/keyv@npm:^3.1.1": + version: 3.1.4 + resolution: "@types/keyv@npm:3.1.4" dependencies: - minipass: "npm:^3.0.0" - checksum: 10/40982d8d836a52b0f37049a0a7e5d0f089637298e6d9b45df9c115d4f0520682a78258905e5c8b180fb41b593b0a82cc1361d2c74b45f7ada66334f84d1ecfdd + "@types/node": "npm:*" + checksum: 10/e009a2bfb50e90ca9b7c6e8f648f8464067271fd99116f881073fa6fa76dc8d0133181dd65e6614d5fb1220d671d67b0124aef7d97dc02d7e342ab143a47779d languageName: node linkType: hard -"minipass@npm:^2.6.0, minipass@npm:^2.9.0": - version: 2.9.0 - resolution: "minipass@npm:2.9.0" +"@types/madge@npm:5.0.3": + version: 5.0.3 + resolution: "@types/madge@npm:5.0.3" dependencies: - safe-buffer: "npm:^5.1.2" - yallist: "npm:^3.0.0" - checksum: 10/fdd1a77996c184991f8d2ce7c5b3979bec624e2a3225e2e1e140c4038fd65873d7eb90fb29779f8733735a8827b2686f283871a0c74c908f4f7694c56fa8dadf + "@types/node": "npm:*" + checksum: 10/6f09cd5cc9a4074067d50b387899f967e3f84dbe890d69b007f31c4518df2ffca40823e76ab3d9d6438d32f8304a4d5103182b0159ebfb5bc895541d1215672b languageName: node linkType: hard -"minipass@npm:^3.0.0, minipass@npm:^3.1.0, minipass@npm:^3.1.1, minipass@npm:^3.1.3, minipass@npm:^3.1.5, minipass@npm:^3.1.6": - version: 3.1.6 - resolution: "minipass@npm:3.1.6" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10/464654ae469c4f25b2f3d6e7bd6e65615b90b68cdfd0148e69ce039b199a778b689f2a552bfa4d3a81812d914d0b48a3a49715b50dcc1eba96bba3bed21f428a +"@types/mime@npm:^1": + version: 1.3.5 + resolution: "@types/mime@npm:1.3.5" + checksum: 10/e29a5f9c4776f5229d84e525b7cd7dd960b51c30a0fb9a028c0821790b82fca9f672dab56561e2acd9e8eed51d431bde52eafdfef30f643586c4162f1aecfc78 languageName: node linkType: hard -"minipass@npm:^3.3.4": - version: 3.3.6 - resolution: "minipass@npm:3.3.6" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10/a5c6ef069f70d9a524d3428af39f2b117ff8cd84172e19b754e7264a33df460873e6eb3d6e55758531580970de50ae950c496256bb4ad3691a2974cddff189f0 +"@types/minimatch@npm:*, @types/minimatch@npm:^3.0.3": + version: 3.0.5 + resolution: "@types/minimatch@npm:3.0.5" + checksum: 10/c41d136f67231c3131cf1d4ca0b06687f4a322918a3a5adddc87ce90ed9dbd175a3610adee36b106ae68c0b92c637c35e02b58c8a56c424f71d30993ea220b92 languageName: node linkType: hard -"minipass@npm:^4.0.0, minipass@npm:^4.0.2, minipass@npm:^4.2.4": - version: 4.2.5 - resolution: "minipass@npm:4.2.5" - checksum: 10/0b0bf5910acc856f8fedbf5ac2567cc80dfdea99916f949c336c2ad52340a73b0bf48773a8a90b8ae2c79a415d9444f6e3a99915847577b1a5277f1235098056 +"@types/minimist@npm:^1.2.0, @types/minimist@npm:^1.2.2": + version: 1.2.2 + resolution: "@types/minimist@npm:1.2.2" + checksum: 10/b8da83c66eb4aac0440e64674b19564d9d86c80ae273144db9681e5eeff66f238ade9515f5006ffbfa955ceff8b89ad2bd8ec577d7caee74ba101431fb07045d languageName: node linkType: hard -"minipass@npm:^5.0.0": - version: 5.0.0 - resolution: "minipass@npm:5.0.0" - checksum: 10/61682162d29f45d3152b78b08bab7fb32ca10899bc5991ffe98afc18c9e9543bd1e3be94f8b8373ba6262497db63607079dc242ea62e43e7b2270837b7347c93 +"@types/ms@npm:*": + version: 0.7.31 + resolution: "@types/ms@npm:0.7.31" + checksum: 10/6647b295fb2a5b8347c35efabaaed1777221f094be9941d387b4bf11df0eeacb3f8a4e495b8b66ce0e4c00593bc53ab5fc25f01ebb274cd989a834ae578099de languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": - version: 7.0.3 - resolution: "minipass@npm:7.0.3" - checksum: 10/04d72c8a437de54a024f3758ff17c0226efb532ef37dbdaca1ea6039c7b9b1704e612abbd2e3a0d2c825c64eb0a9ab266c843baa71d18ad1a279baecee28ed97 +"@types/node-fetch@npm:2.6.4": + version: 2.6.4 + resolution: "@types/node-fetch@npm:2.6.4" + dependencies: + "@types/node": "npm:*" + form-data: "npm:^3.0.0" + checksum: 10/e904b5f887099a2728979bce9bbae9cc5f851e97a8dc71fe9a6f900798ef0cab761a3027609e70ca73b0bfbd0a9433acdbc052301762eb2d7695d97975746be6 languageName: node linkType: hard -"minipass@npm:^7.1.2": - version: 7.1.2 - resolution: "minipass@npm:7.1.2" - checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 +"@types/node@npm:*, @types/node@npm:>=13.7.0": + version: 17.0.32 + resolution: "@types/node@npm:17.0.32" + checksum: 10/fb3ef1c19f7134b1e54b3167e6de1b981b9db39ed9efa91767a0d8cc06cc3e64364a3d111a192cbba451bb4c273054e2203aa5784acd19e84e65be99c2741506 languageName: node linkType: hard -"minizlib@npm:^1.3.3": - version: 1.3.3 - resolution: "minizlib@npm:1.3.3" - dependencies: - minipass: "npm:^2.9.0" - checksum: 10/9c2c47e5687d7f896431a9b5585988ef72f848b56c6a974c9489534e8f619388d500d986ef82e1c13aedd46f3a0e81b6a88110cb1b27de7524cc8dabe8885e17 +"@types/node@npm:18.11.9": + version: 18.11.9 + resolution: "@types/node@npm:18.11.9" + checksum: 10/d87a947519d8c1569b812a95cd18383f7a1500204c18454b69ba817f4aef2a563bb925432debcab25a3db1ba116c8ddb1ef79d8fded054fb3866424847325bae languageName: node linkType: hard -"minizlib@npm:^2.0.0, minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": - version: 2.1.2 - resolution: "minizlib@npm:2.1.2" - dependencies: - minipass: "npm:^3.0.0" - yallist: "npm:^4.0.0" - checksum: 10/ae0f45436fb51344dcb87938446a32fbebb540d0e191d63b35e1c773d47512e17307bf54aa88326cc6d176594d00e4423563a091f7266c2f9a6872cdc1e234d1 +"@types/node@npm:20.4.7": + version: 20.4.7 + resolution: "@types/node@npm:20.4.7" + checksum: 10/63c43283caeaf854853b2a1717754ebb094ea15cd9bb7b93a0a49cc5f5f533d6125986effec1e9bb5d8150c353c76a516bdecc7a74aba20bfde6a78e59952845 languageName: node linkType: hard -"mixin-deep@npm:^1.2.0": - version: 1.3.2 - resolution: "mixin-deep@npm:1.3.2" +"@types/node@npm:>=10.0.0": + version: 22.9.0 + resolution: "@types/node@npm:22.9.0" dependencies: - for-in: "npm:^1.0.2" - is-extendable: "npm:^1.0.1" - checksum: 10/820d5a51fcb7479f2926b97f2c3bb223546bc915e6b3a3eb5d906dda871bba569863595424a76682f2b15718252954644f3891437cb7e3f220949bed54b1750d + undici-types: "npm:~6.19.8" + checksum: 10/a7df3426891868b0f5fb03e46aeddd8446178233521c624a44531c92a040cf08a82d8235f7e1e02af731fd16984665d4d71f3418caf9c2788313b10f040d615d languageName: node linkType: hard -"mkdirp-classic@npm:^0.5.2, mkdirp-classic@npm:^0.5.3": - version: 0.5.3 - resolution: "mkdirp-classic@npm:0.5.3" - checksum: 10/3f4e088208270bbcc148d53b73e9a5bd9eef05ad2cbf3b3d0ff8795278d50dd1d11a8ef1875ff5aea3fa888931f95bfcb2ad5b7c1061cfefd6284d199e6776ac +"@types/normalize-package-data@npm:^2.4.0, @types/normalize-package-data@npm:^2.4.1": + version: 2.4.1 + resolution: "@types/normalize-package-data@npm:2.4.1" + checksum: 10/e87bccbf11f95035c89a132b52b79ce69a1e3652fe55962363063c9c0dae0fe2477ebc585e03a9652adc6f381d24ba5589cc5e51849df4ced3d3e004a7d40ed5 languageName: node linkType: hard -"mkdirp-promise@npm:^5.0.1": - version: 5.0.1 - resolution: "mkdirp-promise@npm:5.0.1" - dependencies: - mkdirp: "npm:*" - checksum: 10/31ddc9478216adf6d6bee9ea7ce9ccfe90356d9fcd1dfb18128eac075390b4161356d64c3a7b0a75f9de01a90aadd990a0ec8c7434036563985c4b853a053ee2 +"@types/normalize-package-data@npm:^2.4.3": + version: 2.4.4 + resolution: "@types/normalize-package-data@npm:2.4.4" + checksum: 10/65dff72b543997b7be8b0265eca7ace0e34b75c3e5fee31de11179d08fa7124a7a5587265d53d0409532ecb7f7fba662c2012807963e1f9b059653ec2c83ee05 languageName: node linkType: hard -"mkdirp@npm:*, mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": - version: 1.0.4 - resolution: "mkdirp@npm:1.0.4" - bin: - mkdirp: bin/cmd.js - checksum: 10/d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2 +"@types/parse-json@npm:^4.0.0": + version: 4.0.0 + resolution: "@types/parse-json@npm:4.0.0" + checksum: 10/4df9de98150d2978afc2161482a3a8e6617883effba3223324f079de97ba7eabd7d84b90ced11c3f82b0c08d4a8383f678c9f73e9c41258f769b3fa234a2bb4f languageName: node linkType: hard -"mkdirp@npm:^0.5.0, mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.3, mkdirp@npm:^0.5.4, mkdirp@npm:^0.5.5, mkdirp@npm:~0.5.1": - version: 0.5.6 - resolution: "mkdirp@npm:0.5.6" - dependencies: - minimist: "npm:^1.2.6" - bin: - mkdirp: bin/cmd.js - checksum: 10/0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 +"@types/prop-types@npm:*": + version: 15.7.4 + resolution: "@types/prop-types@npm:15.7.4" + checksum: 10/ef6e1899e59b876c273811b1bd845022fc66d5a3d11cb38a25b6c566b30514ae38fe20a40f67622f362a4f4f7f9224e22d8da101cff3d6e97e11d7b4c307cfc1 languageName: node linkType: hard -"mnemonist@npm:^0.38.0": - version: 0.38.5 - resolution: "mnemonist@npm:0.38.5" - dependencies: - obliterator: "npm:^2.0.0" - checksum: 10/2df34862567376acb8c2411d546ba9f109229acb2b7fe7593df6fe62194d98f124cf7ff7b2d6f457a3f0410d4d8b44389022ac853d5e5448a2603c4b12f733bf +"@types/qs@npm:*": + version: 6.9.17 + resolution: "@types/qs@npm:6.9.17" + checksum: 10/fc3beda0be70e820ddabaa361e8dfec5e09b482b8f6cf1515615479a027dd06cd5ba0ffbd612b654c2605523f45f484c8905a475623d6cd0c4cadcf5d0c517f5 languageName: node linkType: hard -"mocha@npm:10.1.0": - version: 10.1.0 - resolution: "mocha@npm:10.1.0" - dependencies: - ansi-colors: "npm:4.1.1" - browser-stdout: "npm:1.3.1" - chokidar: "npm:3.5.3" - debug: "npm:4.3.4" - diff: "npm:5.0.0" - escape-string-regexp: "npm:4.0.0" - find-up: "npm:5.0.0" - glob: "npm:7.2.0" - he: "npm:1.2.0" - js-yaml: "npm:4.1.0" - log-symbols: "npm:4.1.0" - minimatch: "npm:5.0.1" - ms: "npm:2.1.3" - nanoid: "npm:3.3.3" - serialize-javascript: "npm:6.0.0" - strip-json-comments: "npm:3.1.1" - supports-color: "npm:8.1.1" - workerpool: "npm:6.2.1" - yargs: "npm:16.2.0" - yargs-parser: "npm:20.2.4" - yargs-unparser: "npm:2.0.0" - bin: - _mocha: bin/_mocha - mocha: bin/mocha.js - checksum: 10/346bf5929cf4e6ae22a7c896048f683255b5c1ce3db4cfa03a450ff6421674fbbf321677b5127eb061c2ca8569e03a027bc14efe9ebdafc25c58cd390088e982 +"@types/range-parser@npm:*": + version: 1.2.7 + resolution: "@types/range-parser@npm:1.2.7" + checksum: 10/95640233b689dfbd85b8c6ee268812a732cf36d5affead89e806fe30da9a430767af8ef2cd661024fd97e19d61f3dec75af2df5e80ec3bea000019ab7028629a languageName: node linkType: hard -"mocha@npm:10.7.3": - version: 10.7.3 - resolution: "mocha@npm:10.7.3" +"@types/react@npm:^17.0.52": + version: 17.0.62 + resolution: "@types/react@npm:17.0.62" dependencies: - ansi-colors: "npm:^4.1.3" - browser-stdout: "npm:^1.3.1" - chokidar: "npm:^3.5.3" - debug: "npm:^4.3.5" - diff: "npm:^5.2.0" - escape-string-regexp: "npm:^4.0.0" - find-up: "npm:^5.0.0" - glob: "npm:^8.1.0" - he: "npm:^1.2.0" - js-yaml: "npm:^4.1.0" - log-symbols: "npm:^4.1.0" - minimatch: "npm:^5.1.6" - ms: "npm:^2.1.3" - serialize-javascript: "npm:^6.0.2" - strip-json-comments: "npm:^3.1.1" - supports-color: "npm:^8.1.1" - workerpool: "npm:^6.5.1" - yargs: "npm:^16.2.0" - yargs-parser: "npm:^20.2.9" - yargs-unparser: "npm:^2.0.0" - bin: - _mocha: bin/_mocha - mocha: bin/mocha.js - checksum: 10/5757aeb320df2507338bfba41731070ce16d27177c5876672fff4bcc4f7b7bcf1afe6ec761bfded43a5d28032d7b797b8b905b5b44c9420203f3ee71457732c1 - languageName: node - linkType: hard - -"mocha@npm:^10.0.0": - version: 10.2.0 - resolution: "mocha@npm:10.2.0" - dependencies: - ansi-colors: "npm:4.1.1" - browser-stdout: "npm:1.3.1" - chokidar: "npm:3.5.3" - debug: "npm:4.3.4" - diff: "npm:5.0.0" - escape-string-regexp: "npm:4.0.0" - find-up: "npm:5.0.0" - glob: "npm:7.2.0" - he: "npm:1.2.0" - js-yaml: "npm:4.1.0" - log-symbols: "npm:4.1.0" - minimatch: "npm:5.0.1" - ms: "npm:2.1.3" - nanoid: "npm:3.3.3" - serialize-javascript: "npm:6.0.0" - strip-json-comments: "npm:3.1.1" - supports-color: "npm:8.1.1" - workerpool: "npm:6.2.1" - yargs: "npm:16.2.0" - yargs-parser: "npm:20.2.4" - yargs-unparser: "npm:2.0.0" - bin: - _mocha: bin/_mocha - mocha: bin/mocha.js - checksum: 10/f7362898ae65e8fe716cfe62fd014b432d100c9611aaf5abe85ed14efcbfdd82f3bdf32c44bccf00c9059a264c7e8d93a69dd5b830652109052a92beffb7ea35 + "@types/prop-types": "npm:*" + "@types/scheduler": "npm:*" + csstype: "npm:^3.0.2" + checksum: 10/62cff105fef4270c4ad0d1a1ff9bf6dfb1f2d4e25ad9d20202e82e9748d1a660790dc94240621a9994273b80050e6481e13533ad7e1f8522f5c839f88955d273 + languageName: node + linkType: hard + +"@types/responselike@npm:^1.0.0": + version: 1.0.2 + resolution: "@types/responselike@npm:1.0.2" + dependencies: + "@types/node": "npm:*" + checksum: 10/ff1767e947eb7d49849e4566040453efcd894888e85b398f7f8cb731552f303f26aceda573b680a142b77ec5fb6c79535d9c6d047d9f936c386dbf3863d2ae17 languageName: node linkType: hard -"mock-fs@npm:^4.1.0": - version: 4.14.0 - resolution: "mock-fs@npm:4.14.0" - checksum: 10/20facbc85bb62df02dbfc946b354fcdd8b2b2aeafef4986adab18dc9a23efccb34ce49d4dac22aaed1a24420fc50c53d77e90984cc888bcce314e18e0e21872a +"@types/sanitize-html@npm:2.9.5": + version: 2.9.5 + resolution: "@types/sanitize-html@npm:2.9.5" + dependencies: + htmlparser2: "npm:^8.0.0" + checksum: 10/fd0afee5dac91aa2c42391f0c8c9254204f4ee1f10b902aa04e8f7809043d785e28af2732f75277ef09e46838013ad60abedb02ba1424b6218264f3333437fb5 languageName: node linkType: hard -"mock-socket@npm:^9.2.1": - version: 9.3.1 - resolution: "mock-socket@npm:9.3.1" - checksum: 10/c5c07568f2859db6926d79cb61580c07e67958b5cd6b52d1270fdfa17ae066d7f74a18a4208fc4386092eea4e1ee001aa23f015c88a1774265994e4fae34d18e +"@types/scheduler@npm:*": + version: 0.16.2 + resolution: "@types/scheduler@npm:0.16.2" + checksum: 10/b6b4dcfeae6deba2e06a70941860fb1435730576d3689225a421280b7742318d1548b3d22c1f66ab68e414f346a9542f29240bc955b6332c5b11e561077583bc languageName: node linkType: hard -"module-definition@npm:^5.0.1": - version: 5.0.1 - resolution: "module-definition@npm:5.0.1" +"@types/secp256k1@npm:4.0.3": + version: 4.0.3 + resolution: "@types/secp256k1@npm:4.0.3" dependencies: - ast-module-types: "npm:^5.0.0" - node-source-walk: "npm:^6.0.1" - bin: - module-definition: bin/cli.js - checksum: 10/d769181d119af6a80abb14219c6ca60b49689eec6e2dd7f8760a499a2c64646ec619a2e7f71760f777f86af763f61efc431e22693b03500ca3db9d7c73cfcb4c + "@types/node": "npm:*" + checksum: 10/aa8176f3fb9a9f37189592425cb6bfec4ffcf3dc397f2bfd8e3acd06be25f5213cbc0df01f541c7cc955b906a61befd5c1092d46adc62e489970bfebf4409e1d languageName: node linkType: hard -"module-error@npm:^1.0.1, module-error@npm:^1.0.2": - version: 1.0.2 - resolution: "module-error@npm:1.0.2" - checksum: 10/5d653e35bd55b3e95f8aee2cdac108082ea892e71b8f651be92cde43e4ee86abee4fa8bd7fc3fe5e68b63926d42f63c54cd17b87a560c31f18739295575a3962 +"@types/semver@npm:^7.5.0": + version: 7.5.0 + resolution: "@types/semver@npm:7.5.0" + checksum: 10/8fbfbf79e9c14c3c20160a42145a146cba44d9763d0fac78358b394dc36e41bc2590bc4f0129c6fcbbc9b30f12ea1ba821bfe84b29dc80897f315cc7dd251393 languageName: node linkType: hard -"module-lookup-amd@npm:^8.0.5": - version: 8.0.5 - resolution: "module-lookup-amd@npm:8.0.5" +"@types/send@npm:*": + version: 0.17.4 + resolution: "@types/send@npm:0.17.4" dependencies: - commander: "npm:^10.0.1" - glob: "npm:^7.2.3" - requirejs: "npm:^2.3.6" - requirejs-config-file: "npm:^4.0.0" - bin: - lookup-amd: bin/cli.js - checksum: 10/2808a5dfff52365dd5f7c9a50c3c5985414dcd13d5b966dad82f61f3274b0bbc246aadcefb0dd0421eb2a43709be0a8d937f0d1a19008e722e81cc361bb10dca + "@types/mime": "npm:^1" + "@types/node": "npm:*" + checksum: 10/28320a2aa1eb704f7d96a65272a07c0bf3ae7ed5509c2c96ea5e33238980f71deeed51d3631927a77d5250e4091b3e66bce53b42d770873282c6a20bb8b0280d languageName: node linkType: hard -"morgan@npm:1.10.0": - version: 1.10.0 - resolution: "morgan@npm:1.10.0" +"@types/serve-static@npm:*": + version: 1.15.7 + resolution: "@types/serve-static@npm:1.15.7" dependencies: - basic-auth: "npm:~2.0.1" - debug: "npm:2.6.9" - depd: "npm:~2.0.0" - on-finished: "npm:~2.3.0" - on-headers: "npm:~1.0.2" - checksum: 10/4497ace00dac65318658595528c1924942c900aae88b7adc5e69e18dd78fb5d1fcccdc2048404ce7d88b5344dc088c492e3aa7cf8023f1e601c6b0f4ff806b93 + "@types/http-errors": "npm:*" + "@types/node": "npm:*" + "@types/send": "npm:*" + checksum: 10/c5a7171d5647f9fbd096ed1a26105759f3153ccf683824d99fee4c7eb9cde2953509621c56a070dd9fb1159e799e86d300cbe4e42245ebc5b0c1767e8ca94a67 languageName: node linkType: hard -"morgan@npm:1.9.1": - version: 1.9.1 - resolution: "morgan@npm:1.9.1" - dependencies: - basic-auth: "npm:~2.0.0" - debug: "npm:2.6.9" - depd: "npm:~1.1.2" - on-finished: "npm:~2.3.0" - on-headers: "npm:~1.0.1" - checksum: 10/0334e4ccbd1e6b458c438d23db5b4feb74f4c2474917a8ea2ad8c1db2614df7fb3e8d19bac7f787df033ce88734103e5515a43dcb92d1bff60bbd642849c0962 +"@types/stack-utils@npm:^2.0.0": + version: 2.0.1 + resolution: "@types/stack-utils@npm:2.0.1" + checksum: 10/205fdbe3326b7046d7eaf5e494d8084f2659086a266f3f9cf00bccc549c8e36e407f88168ad4383c8b07099957ad669f75f2532ed4bc70be2b037330f7bae019 languageName: node linkType: hard -"mrmime@npm:1.0.1": - version: 1.0.1 - resolution: "mrmime@npm:1.0.1" - checksum: 10/a157e833ffe76648ab2107319deeff024b80b136ec66c60fae9d339009a1bb72c57ec1feecfd6a905dfd3df29e2299e850bff84b69cad790cc9bd9ab075834d1 +"@types/tape-promise@npm:4.0.1": + version: 4.0.1 + resolution: "@types/tape-promise@npm:4.0.1" + dependencies: + "@types/tape": "npm:*" + checksum: 10/3dfc88b00ccebe645e9390d16237cac4449593c352b66be07c8b1793df17f011b24ab3e5950f5f88f110075252fb7d300e5856c1589984412651100a303f7f97 languageName: node linkType: hard -"mrmime@npm:2.0.0": - version: 2.0.0 - resolution: "mrmime@npm:2.0.0" - checksum: 10/8d95f714ea200c6cf3e3777cbc6168be04b05ac510090a9b41eef5ec081efeb1d1de3e535ffb9c9689fffcc42f59864fd52a500e84a677274f070adeea615c45 +"@types/tape@npm:*": + version: 4.13.2 + resolution: "@types/tape@npm:4.13.2" + dependencies: + "@types/node": "npm:*" + checksum: 10/c45331cf1098ad3b7aa128b43aef2b2cc6a26f3690c1b5df8ab10009323acb155258d52d5502544a25c103353170d23d084d695410b22110376e11a7a190ecd6 languageName: node linkType: hard -"ms@npm:2.0.0": - version: 2.0.0 - resolution: "ms@npm:2.0.0" - checksum: 10/0e6a22b8b746d2e0b65a430519934fefd41b6db0682e3477c10f60c76e947c4c0ad06f63ffdf1d78d335f83edee8c0aa928aa66a36c7cd95b69b26f468d527f4 +"@types/tape@npm:4.13.4": + version: 4.13.4 + resolution: "@types/tape@npm:4.13.4" + dependencies: + "@types/node": "npm:*" + "@types/through": "npm:*" + checksum: 10/2b5e230ec85ce3a9d451f2825b550e5db94a054573dcb18c07d8c5fe1dc2261c06b56eaa3496e9aa494e6c905767867e18eb77828d7015afdb0293fc55967927 languageName: node linkType: hard -"ms@npm:2.1.2": - version: 2.1.2 - resolution: "ms@npm:2.1.2" - checksum: 10/673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f +"@types/through@npm:*": + version: 0.0.30 + resolution: "@types/through@npm:0.0.30" + dependencies: + "@types/node": "npm:*" + checksum: 10/9578470db0b527c26e246a1220ae9bffc6bf47f20f89c54aac467c083ab1f7e16c00d9a7b4bb6cb4e2dfae465027270827e5908a6236063f6214625e50585d78 languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.2, ms@npm:^2.1.3": - version: 2.1.3 - resolution: "ms@npm:2.1.3" - checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d +"@types/uuid@npm:10.0.0": + version: 10.0.0 + resolution: "@types/uuid@npm:10.0.0" + checksum: 10/e3958f8b0fe551c86c14431f5940c3470127293280830684154b91dc7eb3514aeb79fe3216968833cf79d4d1c67f580f054b5be2cd562bebf4f728913e73e944 languageName: node linkType: hard -"msrcrypto@npm:^1.5.6": - version: 1.5.8 - resolution: "msrcrypto@npm:1.5.8" - checksum: 10/ccf3dd183a62b721526ee4297693c2b3bc34c0bc22542eea6212a009dbfd39028227b46d4f2fc2519bb8d88a825ea77ef1e95c1010cfe2fc586201bd5fe55f23 +"@types/ws@npm:8.5.3": + version: 8.5.3 + resolution: "@types/ws@npm:8.5.3" + dependencies: + "@types/node": "npm:*" + checksum: 10/08aac698ce6480b532d8311f790a8744ae489ccdd98f374cfe4b8245855439825c64b031abcbba4f30fb280da6cc2b02a4e261e16341d058ffaeecaa24ba2bd3 languageName: node linkType: hard -"multer@npm:1.4.5-lts.1, multer@npm:^1.4.5-lts.1": - version: 1.4.5-lts.1 - resolution: "multer@npm:1.4.5-lts.1" - dependencies: - append-field: "npm:^1.0.0" - busboy: "npm:^1.0.0" - concat-stream: "npm:^1.5.2" - mkdirp: "npm:^0.5.4" - object-assign: "npm:^4.1.1" - type-is: "npm:^1.6.4" - xtend: "npm:^4.0.0" - checksum: 10/957c09956f3b7f79d8586cac5e2a50e9a5c3011eb841667b5e4590c5f31d9464f5b46aecd399c83e183a15b88b019cccf0e4fa5620db40bf16b9e3af7fab3ac6 +"@types/yargs-parser@npm:*": + version: 20.2.1 + resolution: "@types/yargs-parser@npm:20.2.1" + checksum: 10/08b67730b36ec5af0b429d8bd7cd2cd7d5586ec9fd7f9f935a64bc4e1235eae63054b40ec648705462d81472b0ffbd67a5854e0d38311d9e4c5b6009dfe3d3fd languageName: node linkType: hard -"multibase@npm:^0.7.0": - version: 0.7.0 - resolution: "multibase@npm:0.7.0" +"@types/yargs@npm:17.0.24": + version: 17.0.24 + resolution: "@types/yargs@npm:17.0.24" dependencies: - base-x: "npm:^3.0.8" - buffer: "npm:^5.5.0" - checksum: 10/a5cbbf00b8aa61bcb92a706e210d8f258e8413cff2893584fedbc316c98bf2a44b8f648b57c124ddfaa29750c3b686ee5ba973cb8da84a896c19d63101b09445 + "@types/yargs-parser": "npm:*" + checksum: 10/03d9a985cb9331b2194a52d57a66aad88bf46aa32b3968a71cc6f39fb05c74f0709f0dd3aa9c0b29099cfe670343e3b1bd2ac6df2abfab596ede4453a616f63f languageName: node linkType: hard -"multibase@npm:~0.6.0": - version: 0.6.1 - resolution: "multibase@npm:0.6.1" +"@types/yargs@npm:^17.0.8": + version: 17.0.10 + resolution: "@types/yargs@npm:17.0.10" dependencies: - base-x: "npm:^3.0.8" - buffer: "npm:^5.5.0" - checksum: 10/c9e3bf20dc1b109019b94b14a76731ea0a6b0e654a4ef627ba154bfc2b8602ac43b160c44d8245d18cd6a9ed971826efb204230f22b929c8b3e72da13dbc1859 + "@types/yargs-parser": "npm:*" + checksum: 10/cfe94e8ba50364e08d7b3ecb10a7c153762d0e56c571079538bb06b306638d1045e395fc5a745b94519e73798779c761fa386ec13c82306a62349f64d7b9eec1 languageName: node linkType: hard -"multicast-dns@npm:^7.2.5": - version: 7.2.5 - resolution: "multicast-dns@npm:7.2.5" - dependencies: - dns-packet: "npm:^5.2.2" - thunky: "npm:^1.0.2" - bin: - multicast-dns: cli.js - checksum: 10/e9add8035fb7049ccbc87b1b069f05bb3b31e04fe057bf7d0116739d81295165afc2568291a4a962bee01a5074e475996816eed0f50c8110d652af5abb74f95a +"@types/yoga-layout@npm:1.9.2": + version: 1.9.2 + resolution: "@types/yoga-layout@npm:1.9.2" + checksum: 10/3cbcab36d9e19d077cc2bc956d3182dc26f35f13f8fcf01648717bcba412be7ed3c4b6f43c4f8f201ea815160d0cb2b96e82698c4b43d4a179c5603a7725f34e languageName: node linkType: hard -"multicodec@npm:^0.5.5": - version: 0.5.7 - resolution: "multicodec@npm:0.5.7" +"@typescript-eslint/eslint-plugin@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/eslint-plugin@npm:7.1.0" dependencies: - varint: "npm:^5.0.0" - checksum: 10/b61bbf04e1bfff180f77693661b8111bf94f65580abc455e6d83d2240c227d8c2e8af99ca93b6c02500c5da43d16e2b028dbbec1b376a85145a774f542d9ca2c + "@eslint-community/regexpp": "npm:^4.5.1" + "@typescript-eslint/scope-manager": "npm:7.1.0" + "@typescript-eslint/type-utils": "npm:7.1.0" + "@typescript-eslint/utils": "npm:7.1.0" + "@typescript-eslint/visitor-keys": "npm:7.1.0" + debug: "npm:^4.3.4" + graphemer: "npm:^1.4.0" + ignore: "npm:^5.2.4" + natural-compare: "npm:^1.4.0" + semver: "npm:^7.5.4" + ts-api-utils: "npm:^1.0.1" + peerDependencies: + "@typescript-eslint/parser": ^7.0.0 + eslint: ^8.56.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/f0b6b6e6ae2afee1df8dd2fd0c56588f9bb600468be9f255e033709a53371c6434da687e75dcb673503ef4f0416226f4ca3c94c65272828106e39b56aac87334 languageName: node linkType: hard -"multicodec@npm:^1.0.0": - version: 1.0.4 - resolution: "multicodec@npm:1.0.4" +"@typescript-eslint/parser@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/parser@npm:7.1.0" dependencies: - buffer: "npm:^5.6.0" - varint: "npm:^5.0.0" - checksum: 10/3a78ac54d3715e6b095a1805f63b4c4e7d5bb4642445691c0c4e6442cad9f97823469634e73ee362ba748596570db1050d69d5cc74a88928b1e9658916cdfbcd + "@typescript-eslint/scope-manager": "npm:7.1.0" + "@typescript-eslint/types": "npm:7.1.0" + "@typescript-eslint/typescript-estree": "npm:7.1.0" + "@typescript-eslint/visitor-keys": "npm:7.1.0" + debug: "npm:^4.3.4" + peerDependencies: + eslint: ^8.56.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/39238d37f5a5f7058371ee3882fb7cd8a4579883fc5f13fda645c151fcf8d15e4c0db3ea7ffa7915a55c82451b544e9340c0228b45b83085158cb97974112f19 languageName: node linkType: hard -"multiformats@npm:11.0.2, multiformats@npm:^11.0.0, multiformats@npm:^11.0.2": - version: 11.0.2 - resolution: "multiformats@npm:11.0.2" - checksum: 10/4baf52891531c7264d1cbcf9925282e44fd8e45dd0b2ae45c653abfb898f0bc836a93c3fa16836f16551f0c44f24d3eaabb573d00b128d712a2b457c5778a037 +"@typescript-eslint/scope-manager@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/scope-manager@npm:7.1.0" + dependencies: + "@typescript-eslint/types": "npm:7.1.0" + "@typescript-eslint/visitor-keys": "npm:7.1.0" + checksum: 10/3fb18de864331739c1b04fe9e3bb5d926e2fdf0d1fea2871181f68d0fb52325cbc9a5b81da58b7fe7f22d6d58d62b21c83460907146bc2f54ef0720fb3f9037f languageName: node linkType: hard -"multiformats@npm:^12.0.1": - version: 12.1.2 - resolution: "multiformats@npm:12.1.2" - checksum: 10/245cb2e88c17a9dec9072b4cb0d4a854a735ad84261a914429c4b1f20c30d9534e55d8e3d123317f08edd137f2c2ff3ad16fd69b50c16788395b13becc48d70d +"@typescript-eslint/type-utils@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/type-utils@npm:7.1.0" + dependencies: + "@typescript-eslint/typescript-estree": "npm:7.1.0" + "@typescript-eslint/utils": "npm:7.1.0" + debug: "npm:^4.3.4" + ts-api-utils: "npm:^1.0.1" + peerDependencies: + eslint: ^8.56.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/439e6fadab3df3c21adfd651af4e605e1020c86c8c2400b0127c2ee914646bc73945b4add31ca7201cafeead261ad2958362c339ebdfc0798064d56daeb60661 languageName: node linkType: hard -"multihashes@npm:^0.4.15, multihashes@npm:~0.4.15": - version: 0.4.21 - resolution: "multihashes@npm:0.4.21" - dependencies: - buffer: "npm:^5.5.0" - multibase: "npm:^0.7.0" - varint: "npm:^5.0.0" - checksum: 10/a482d9ba7ed0ad41db22ca589f228e4b7a30207a229a64dfc9888796752314fca00a8d03025fe40d6d73965bbb246f54b73626c5a235463e30c06c7bf7a8785f +"@typescript-eslint/types@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/types@npm:5.62.0" + checksum: 10/24e8443177be84823242d6729d56af2c4b47bfc664dd411a1d730506abf2150d6c31bdefbbc6d97c8f91043e3a50e0c698239dcb145b79bb6b0c34469aaf6c45 languageName: node linkType: hard -"multimatch@npm:^5.0.0": - version: 5.0.0 - resolution: "multimatch@npm:5.0.0" - dependencies: - "@types/minimatch": "npm:^3.0.3" - array-differ: "npm:^3.0.0" - array-union: "npm:^2.1.0" - arrify: "npm:^2.0.1" - minimatch: "npm:^3.0.4" - checksum: 10/82c8030a53af965cab48da22f1b0f894ef99e16ee680dabdfbd38d2dfacc3c8208c475203d747afd9e26db44118ed0221d5a0d65268c864f06d6efc7ac6df812 +"@typescript-eslint/types@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/types@npm:7.1.0" + checksum: 10/34801a14ea1444a1707de5bd3211f0ea53afc82a3c6c4543092f123267389da607c498d1a7de554ac9f071e6ef488238728a5f279ff2abaa0cbdfaa733899b67 languageName: node linkType: hard -"multimatch@npm:^7.0.0": - version: 7.0.0 - resolution: "multimatch@npm:7.0.0" +"@typescript-eslint/typescript-estree@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/typescript-estree@npm:7.1.0" dependencies: - array-differ: "npm:^4.0.0" - array-union: "npm:^3.0.1" - minimatch: "npm:^9.0.3" - checksum: 10/d0f2943135ed415014d3a078521147210cca685fbe0bac4519c7b2f4dbb4512ad595112115e263fa92b1f7815e204cf649782e4a233fa19fbfc5e6ea2c792592 + "@typescript-eslint/types": "npm:7.1.0" + "@typescript-eslint/visitor-keys": "npm:7.1.0" + debug: "npm:^4.3.4" + globby: "npm:^11.1.0" + is-glob: "npm:^4.0.3" + minimatch: "npm:9.0.3" + semver: "npm:^7.5.4" + ts-api-utils: "npm:^1.0.1" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/7dfc6fc70ff00875728ce5d85a3c5d6cb01435082b20ff9301ebe4d8e4a31a0c997282c762c636937bd66a40b4e0154e2ce98f85d888a6c46d433e9a24c46c4c languageName: node linkType: hard -"multistream@npm:^4.1.0": - version: 4.1.0 - resolution: "multistream@npm:4.1.0" +"@typescript-eslint/typescript-estree@npm:^5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" dependencies: - once: "npm:^1.4.0" - readable-stream: "npm:^3.6.0" - checksum: 10/305c49a1aadcb7f63f64d8ca2bb6e7852e5f7dba94c7329e9a72ce53cd0046686b71668dc1adbf123f17d2dd107765fc946e64c36a26b15c470a3146ea3bc923 + "@typescript-eslint/types": "npm:5.62.0" + "@typescript-eslint/visitor-keys": "npm:5.62.0" + debug: "npm:^4.3.4" + globby: "npm:^11.1.0" + is-glob: "npm:^4.0.3" + semver: "npm:^7.3.7" + tsutils: "npm:^3.21.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/06c975eb5f44b43bd19fadc2e1023c50cf87038fe4c0dd989d4331c67b3ff509b17fa60a3251896668ab4d7322bdc56162a9926971218d2e1a1874d2bef9a52e languageName: node linkType: hard -"mustache@npm:^2.2.1": - version: 2.3.2 - resolution: "mustache@npm:2.3.2" - bin: - mustache: ./bin/mustache - checksum: 10/1b3f0599a670b722f43ad4e74f8ce415ca9783870548d5fa9871ff5ce5706d83dbe60830150950f9da8b3076e491f7b50eec3cbd382c005b1f7170c1d3981460 +"@typescript-eslint/utils@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/utils@npm:7.1.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.4.0" + "@types/json-schema": "npm:^7.0.12" + "@types/semver": "npm:^7.5.0" + "@typescript-eslint/scope-manager": "npm:7.1.0" + "@typescript-eslint/types": "npm:7.1.0" + "@typescript-eslint/typescript-estree": "npm:7.1.0" + semver: "npm:^7.5.4" + peerDependencies: + eslint: ^8.56.0 + checksum: 10/26d64094d8b828ce6cfea660c95cdbd4d0193d338646fc773312093388bc781653fc1ca16977b3be5288579fe43f14c7108fc431da66dd95b6ed680ad44712a0 languageName: node linkType: hard -"mute-stream@npm:0.0.5": - version: 0.0.5 - resolution: "mute-stream@npm:0.0.5" - checksum: 10/a2a3b25fa0e6adf3516f51b1d8bd0cc48e256fc9384c3c5bd3a5c3635e0823d6dee4c28909a3f2a9d8782d7d8daa3a8c081163d881e4d7f30ff17e7d2eabde76 +"@typescript-eslint/visitor-keys@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" + dependencies: + "@typescript-eslint/types": "npm:5.62.0" + eslint-visitor-keys: "npm:^3.3.0" + checksum: 10/dc613ab7569df9bbe0b2ca677635eb91839dfb2ca2c6fa47870a5da4f160db0b436f7ec0764362e756d4164e9445d49d5eb1ff0b87f4c058946ae9d8c92eb388 languageName: node linkType: hard -"mute-stream@npm:0.0.7": - version: 0.0.7 - resolution: "mute-stream@npm:0.0.7" - checksum: 10/63c177ae8ba754cf4618be635a3863078767d29a80a931ba714fc08b0a7ac8028bd373ec71b48bb22d91f6e8b62a186206aca79a16c9860d8e1027358f2a7c1a +"@typescript-eslint/visitor-keys@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/visitor-keys@npm:7.1.0" + dependencies: + "@typescript-eslint/types": "npm:7.1.0" + eslint-visitor-keys: "npm:^3.4.1" + checksum: 10/c3e98ebf166fd1854adb0e9599dc108cdbbd95f6eb099d31deae2fd1d4df8fcd8dc9c24ad4f509b961ad900b474c246f6b4b228b5711cc504106c3e0f751a11c languageName: node linkType: hard -"mute-stream@npm:0.0.8": - version: 0.0.8 - resolution: "mute-stream@npm:0.0.8" - checksum: 10/a2d2e79dde87e3424ffc8c334472c7f3d17b072137734ca46e6f221131f1b014201cc593b69a38062e974fb2394d3d1cb4349f80f012bbf8b8ac1b28033e515f +"@typescript/vfs@npm:^1.4.0": + version: 1.5.0 + resolution: "@typescript/vfs@npm:1.5.0" + dependencies: + debug: "npm:^4.1.1" + checksum: 10/9a60cfd4e4ef37f69558e7e8a0c4633f86aae969a4c1193435bfdf80eb9573d23850b65621631d07e2f9699a2d7351ae6d9caa46080595314bde03c2c63443dd languageName: node linkType: hard -"mute-stream@npm:1.0.0": - version: 1.0.0 - resolution: "mute-stream@npm:1.0.0" - checksum: 10/36fc968b0e9c9c63029d4f9dc63911950a3bdf55c9a87f58d3a266289b67180201cade911e7699f8b2fa596b34c9db43dad37649e3f7fdd13c3bb9edb0017ee7 +"@ungap/structured-clone@npm:^1.2.0": + version: 1.2.0 + resolution: "@ungap/structured-clone@npm:1.2.0" + checksum: 10/c6fe89a505e513a7592e1438280db1c075764793a2397877ff1351721fe8792a966a5359769e30242b3cd023f2efb9e63ca2ca88019d73b564488cc20e3eab12 languageName: node linkType: hard -"mz@npm:^2.4.0, mz@npm:^2.7.0": - version: 2.7.0 - resolution: "mz@npm:2.7.0" +"@vue/compiler-core@npm:3.3.7": + version: 3.3.7 + resolution: "@vue/compiler-core@npm:3.3.7" dependencies: - any-promise: "npm:^1.0.0" - object-assign: "npm:^4.0.1" - thenify-all: "npm:^1.0.0" - checksum: 10/8427de0ece99a07e9faed3c0c6778820d7543e3776f9a84d22cf0ec0a8eb65f6e9aee9c9d353ff9a105ff62d33a9463c6ca638974cc652ee8140cd1e35951c87 + "@babel/parser": "npm:^7.23.0" + "@vue/shared": "npm:3.3.7" + estree-walker: "npm:^2.0.2" + source-map-js: "npm:^1.0.2" + checksum: 10/846c6a3c68fc66ab7b1e59b69e75fb753e5bec91dfbb74878bc5f689d28eb34bb2a7f5e71ad32772d33587302a6d36a0c1e297699f2e29e0d2c60bff77e3de2e languageName: node linkType: hard -"nan@npm:^2.11.1": - version: 2.18.0 - resolution: "nan@npm:2.18.0" +"@vue/compiler-dom@npm:3.3.7": + version: 3.3.7 + resolution: "@vue/compiler-dom@npm:3.3.7" dependencies: - node-gyp: "npm:latest" - checksum: 10/5520e22c64e2b5b495b1d765d6334c989b848bbe1502fec89c5857cabcc7f9f0474563377259e7574bff1c8a041d3b90e9ffa1f5e15502ffddee7b2550cc26a0 + "@vue/compiler-core": "npm:3.3.7" + "@vue/shared": "npm:3.3.7" + checksum: 10/e00decdd66acfab90f4aa9d545bb29bdf4512d2be728a65724dd0f28afbc7bdd2355fa8b83b0616cfcdbb8a5706e362c9717a1fc7776d8445faa37e6f71f332c languageName: node linkType: hard -"nan@npm:^2.14.1, nan@npm:^2.15.0": - version: 2.15.0 - resolution: "nan@npm:2.15.0" +"@vue/compiler-sfc@npm:^3.3.4": + version: 3.3.7 + resolution: "@vue/compiler-sfc@npm:3.3.7" dependencies: - node-gyp: "npm:latest" - checksum: 10/1a5a53bea35ce2844f85c7d276d358fa131c6e60ee88bcb104b61596254963892378a54b7b65365ad1fe048b4c1aeeabf6e3966a2b293f68fb53a4f91b4337fc + "@babel/parser": "npm:^7.23.0" + "@vue/compiler-core": "npm:3.3.7" + "@vue/compiler-dom": "npm:3.3.7" + "@vue/compiler-ssr": "npm:3.3.7" + "@vue/reactivity-transform": "npm:3.3.7" + "@vue/shared": "npm:3.3.7" + estree-walker: "npm:^2.0.2" + magic-string: "npm:^0.30.5" + postcss: "npm:^8.4.31" + source-map-js: "npm:^1.0.2" + checksum: 10/4f7fb03126a539fe745e3b07aae25a639dd3525c909b526f2f9a0b96862a1d4722d11f923921714fe6b604f9a0b9cdcbb723070909f6c65b4a42333ee8bb2c12 languageName: node linkType: hard -"nan@npm:^2.17.0": - version: 2.17.0 - resolution: "nan@npm:2.17.0" +"@vue/compiler-ssr@npm:3.3.7": + version: 3.3.7 + resolution: "@vue/compiler-ssr@npm:3.3.7" dependencies: - node-gyp: "npm:latest" - checksum: 10/bba1efee2475afb0cce154300b554863fb4bb0a683a28f5d0fa7390794b3b4381356aabeab6472c70651d9c8a2830e7595963f3ec0aa2008e5c4d83dbeb820fa + "@vue/compiler-dom": "npm:3.3.7" + "@vue/shared": "npm:3.3.7" + checksum: 10/d675dc71d87d3dad423c53077326af74c0c315feeecb8e74fb4320a9fa4bae632d70a130a72f512fdc389ff27ccee5f64af0a6a5eb88aded9ebb48e9db770492 languageName: node linkType: hard -"nano-base32@npm:^1.0.1": - version: 1.0.1 - resolution: "nano-base32@npm:1.0.1" - checksum: 10/91acac2bc7883c2e6abe7e190d1253a9441ca89a05d839b46a737e3cf76ae0c5d160590b584f20c963198691b60d89fd6bb255ab5ec1b6c259759966c907a382 +"@vue/reactivity-transform@npm:3.3.7": + version: 3.3.7 + resolution: "@vue/reactivity-transform@npm:3.3.7" + dependencies: + "@babel/parser": "npm:^7.23.0" + "@vue/compiler-core": "npm:3.3.7" + "@vue/shared": "npm:3.3.7" + estree-walker: "npm:^2.0.2" + magic-string: "npm:^0.30.5" + checksum: 10/674c308a8db8627a62049b89e8a55581a35486c6c57ee88ef8c3bd40a3729bd52cf7fd2de61b9fa1d75479da4ccd45e9656e4fd5736686adc978fcfe7b471109 languageName: node linkType: hard -"nano-json-stream-parser@npm:^0.1.2": - version: 0.1.2 - resolution: "nano-json-stream-parser@npm:0.1.2" - checksum: 10/00a3ce63d3b66220def9fd6c26cd495100efd155e7bda54a11f1dfd185ba6750d5ce266076e0f229bad3f5ef892e2017f24da012669f146b404a8e47a44568ec +"@vue/shared@npm:3.3.7": + version: 3.3.7 + resolution: "@vue/shared@npm:3.3.7" + checksum: 10/c3d746757fc254897b701a0ecc2dec5bb61e8a0ca7aae86ba7288ab2a7a89cbf6afd79c5ec9a47cf484db65c3c3ad100882c440023d8928be6aa087a71391153 languageName: node linkType: hard -"nano@npm:>=10.0.0": - version: 10.1.2 - resolution: "nano@npm:10.1.2" +"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/ast@npm:1.12.1" dependencies: - axios: "npm:^1.2.2" - node-abort-controller: "npm:^3.0.1" - qs: "npm:^6.11.0" - checksum: 10/99258b309744ee3cb8f2f557a709fd744740ddf37d2433d7dbc83fb1eeecc80f96b9f75628d567c1e658dfac9d51c7e4c26dc19bc802fad221752c8c2df67483 + "@webassemblyjs/helper-numbers": "npm:1.11.6" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" + checksum: 10/a775b0559437ae122d14fec0cfe59fdcaf5ca2d8ff48254014fd05d6797e20401e0f1518e628f9b06819aa085834a2534234977f9608b3f2e51f94b6e8b0bc43 languageName: node linkType: hard -"nanoid@npm:3.3.3": - version: 3.3.3 - resolution: "nanoid@npm:3.3.3" - bin: - nanoid: bin/nanoid.cjs - checksum: 10/c703ed58a234b68245a8a4826dd25c1453a9017d34fa28bc58e7aa8247de87d854582fa2209d7aee04084cff9ce150be8fd30300abe567dc615d4e8e735f2d99 +"@webassemblyjs/floating-point-hex-parser@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.6" + checksum: 10/29b08758841fd8b299c7152eda36b9eb4921e9c584eb4594437b5cd90ed6b920523606eae7316175f89c20628da14326801090167cc7fbffc77af448ac84b7e2 languageName: node linkType: hard -"nanoid@npm:^3.1.20": - version: 3.3.1 - resolution: "nanoid@npm:3.3.1" - bin: - nanoid: bin/nanoid.cjs - checksum: 10/306f2cb9e4dcfb94738b09de9dc63839a37db33626f66b24dbcc8f66d4b91784645794a7c4f250d629e4d66f5385164c6748c58ac5b7c95217e9e048590efbe4 +"@webassemblyjs/helper-api-error@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/helper-api-error@npm:1.11.6" + checksum: 10/e8563df85161096343008f9161adb138a6e8f3c2cc338d6a36011aa55eabb32f2fd138ffe63bc278d009ada001cc41d263dadd1c0be01be6c2ed99076103689f languageName: node linkType: hard -"nanoid@npm:^3.3.6": - version: 3.3.6 - resolution: "nanoid@npm:3.3.6" - bin: - nanoid: bin/nanoid.cjs - checksum: 10/67235c39d1bc05851383dadde5cf77ae1c90c2a1d189e845c7f20f646f0488d875ad5f5226bbba072a88cebbb085a3f784a6673117daf785bdf614a852550362 +"@webassemblyjs/helper-buffer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.12.1" + checksum: 10/1d8705daa41f4d22ef7c6d422af4c530b84d69d0c253c6db5adec44d511d7caa66837803db5b1addcea611a1498fd5a67d2cf318b057a916283ae41ffb85ba8a languageName: node linkType: hard -"nanoid@npm:^4.0.0": - version: 4.0.2 - resolution: "nanoid@npm:4.0.2" - bin: - nanoid: bin/nanoid.js - checksum: 10/8c0c267de44cddcad79c3361d2cbd281694c36bf7ab6a163f36dd8f6e6ee43e9783561302c55fab2986a2fa847e7a6b30fedabd1e117fdb8aecc5ab21555428d +"@webassemblyjs/helper-numbers@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/helper-numbers@npm:1.11.6" + dependencies: + "@webassemblyjs/floating-point-hex-parser": "npm:1.11.6" + "@webassemblyjs/helper-api-error": "npm:1.11.6" + "@xtuc/long": "npm:4.2.2" + checksum: 10/9ffd258ad809402688a490fdef1fd02222f20cdfe191c895ac215a331343292164e5033dbc0347f0f76f2447865c0b5c2d2e3304ee948d44f7aa27857028fd08 languageName: node linkType: hard -"nanomatch@npm:^1.2.9": - version: 1.2.13 - resolution: "nanomatch@npm:1.2.13" - dependencies: - arr-diff: "npm:^4.0.0" - array-unique: "npm:^0.3.2" - define-property: "npm:^2.0.2" - extend-shallow: "npm:^3.0.2" - fragment-cache: "npm:^0.2.1" - is-windows: "npm:^1.0.2" - kind-of: "npm:^6.0.2" - object.pick: "npm:^1.3.0" - regex-not: "npm:^1.0.0" - snapdragon: "npm:^0.8.1" - to-regex: "npm:^3.0.1" - checksum: 10/5c4ec7d6264b93795248f22d19672f0b972f900772c057bc67e43ae4999165b5fea7b937359efde78707930a460ceaa6d93e0732ac1d993dab8654655a2e959b +"@webassemblyjs/helper-wasm-bytecode@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.6" + checksum: 10/4ebf03e9c1941288c10e94e0f813f413f972bfaa1f09be2cc2e5577f300430906b61aa24d52f5ef2f894e8e24e61c6f7c39871d7e3d98bc69460e1b8e00bb20b languageName: node linkType: hard -"napi-build-utils@npm:^1.0.1": - version: 1.0.2 - resolution: "napi-build-utils@npm:1.0.2" - checksum: 10/276feb8e30189fe18718e85b6f82e4f952822baa2e7696f771cc42571a235b789dc5907a14d9ffb6838c3e4ff4c25717c2575e5ce1cf6e02e496e204c11e57f6 +"@webassemblyjs/helper-wasm-section@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.12.1" + dependencies: + "@webassemblyjs/ast": "npm:1.12.1" + "@webassemblyjs/helper-buffer": "npm:1.12.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" + "@webassemblyjs/wasm-gen": "npm:1.12.1" + checksum: 10/e91e6b28114e35321934070a2db8973a08a5cd9c30500b817214c683bbf5269ed4324366dd93ad83bf2fba0d671ac8f39df1c142bf58f70c57a827eeba4a3d2f languageName: node linkType: hard -"napi-macros@npm:^2.2.2": - version: 2.2.2 - resolution: "napi-macros@npm:2.2.2" - checksum: 10/2cdb9c40ad4b424b14fbe5e13c5329559e2b511665acf41cdcda172fd2270202dc747a2d288b687c72bc70f654c797bc24a93adb67631128d62461588d7cc070 +"@webassemblyjs/ieee754@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/ieee754@npm:1.11.6" + dependencies: + "@xtuc/ieee754": "npm:^1.2.0" + checksum: 10/13574b8e41f6ca39b700e292d7edf102577db5650fe8add7066a320aa4b7a7c09a5056feccac7a74eb68c10dea9546d4461412af351f13f6b24b5f32379b49de languageName: node linkType: hard -"napi-macros@npm:~2.0.0": - version: 2.0.0 - resolution: "napi-macros@npm:2.0.0" - checksum: 10/6ffa499356a09727d4a622bc68a9c22996adfb9b95e0d4426be9084b73dd1f0dc8f78adf7e86b560ac463e3ce1707a57dd2644f858dcbb303c36fb8bb3d915b2 +"@webassemblyjs/leb128@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/leb128@npm:1.11.6" + dependencies: + "@xtuc/long": "npm:4.2.2" + checksum: 10/ec3b72db0e7ce7908fe08ec24395bfc97db486063824c0edc580f0973a4cfbadf30529569d9c7db663a56513e45b94299cca03be9e1992ea3308bb0744164f3d languageName: node linkType: hard -"native-fetch@npm:^3.0.0": - version: 3.0.0 - resolution: "native-fetch@npm:3.0.0" - peerDependencies: - node-fetch: "*" - checksum: 10/eec8cc78d6da4d0f3f56055e3e557473ac86dd35fd40053ea268d644af7b20babc891d2b53ef821b77ed2428265f60b85e49d754c555de89bfa071a743b853bb +"@webassemblyjs/utf8@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/utf8@npm:1.11.6" + checksum: 10/361a537bd604101b320a5604c3c96d1038d83166f1b9fb86cedadc7e81bae54c3785ae5d90bf5b1842f7da08194ccaf0f44a64fcca0cbbd6afe1a166196986d6 languageName: node linkType: hard -"native-fetch@npm:^4.0.2": - version: 4.0.2 - resolution: "native-fetch@npm:4.0.2" - peerDependencies: - undici: "*" - checksum: 10/3ed5881a685a9690bfe35d0b0419586296bbc4f48e584a37b01bc14b57ac02c8c6fcb870ac36a343782002ee73080e9117e4f99cbf5bb7480be2111707857caa +"@webassemblyjs/wasm-edit@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.12.1" + dependencies: + "@webassemblyjs/ast": "npm:1.12.1" + "@webassemblyjs/helper-buffer": "npm:1.12.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" + "@webassemblyjs/helper-wasm-section": "npm:1.12.1" + "@webassemblyjs/wasm-gen": "npm:1.12.1" + "@webassemblyjs/wasm-opt": "npm:1.12.1" + "@webassemblyjs/wasm-parser": "npm:1.12.1" + "@webassemblyjs/wast-printer": "npm:1.12.1" + checksum: 10/5678ae02dbebba2f3a344e25928ea5a26a0df777166c9be77a467bfde7aca7f4b57ef95587e4bd768a402cdf2fddc4c56f0a599d164cdd9fe313520e39e18137 languageName: node linkType: hard -"natural-compare-lite@npm:^1.4.0": - version: 1.4.0 - resolution: "natural-compare-lite@npm:1.4.0" - checksum: 10/5222ac3986a2b78dd6069ac62cbb52a7bf8ffc90d972ab76dfe7b01892485d229530ed20d0c62e79a6b363a663b273db3bde195a1358ce9e5f779d4453887225 +"@webassemblyjs/wasm-gen@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.12.1" + dependencies: + "@webassemblyjs/ast": "npm:1.12.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" + "@webassemblyjs/ieee754": "npm:1.11.6" + "@webassemblyjs/leb128": "npm:1.11.6" + "@webassemblyjs/utf8": "npm:1.11.6" + checksum: 10/ec45bd50e86bc9856f80fe9af4bc1ae5c98fb85f57023d11dff2b670da240c47a7b1b9b6c89755890314212bd167cf3adae7f1157216ddffb739a4ce589fc338 languageName: node linkType: hard -"natural-compare@npm:^1.4.0": - version: 1.4.0 - resolution: "natural-compare@npm:1.4.0" - checksum: 10/23ad088b08f898fc9b53011d7bb78ec48e79de7627e01ab5518e806033861bef68d5b0cd0e2205c2f36690ac9571ff6bcb05eb777ced2eeda8d4ac5b44592c3d +"@webassemblyjs/wasm-opt@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.12.1" + dependencies: + "@webassemblyjs/ast": "npm:1.12.1" + "@webassemblyjs/helper-buffer": "npm:1.12.1" + "@webassemblyjs/wasm-gen": "npm:1.12.1" + "@webassemblyjs/wasm-parser": "npm:1.12.1" + checksum: 10/21f25ae109012c49bb084e09f3b67679510429adc3e2408ad3621b2b505379d9cce337799a7919ef44db64e0d136833216914aea16b0d4856f353b9778e0cdb7 languageName: node linkType: hard -"nconf@npm:^0.12.0": - version: 0.12.0 - resolution: "nconf@npm:0.12.0" +"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.12.1" dependencies: - async: "npm:^3.0.0" - ini: "npm:^2.0.0" - secure-keys: "npm:^1.0.0" - yargs: "npm:^16.1.1" - checksum: 10/6bd712eb28cdc6adc1a0a65fa65032058aaca027aafff56eb2624e49a35034fc65434f8d9a56dce70f5126919e58c078e522959ff74dfc78779672521a3ba958 + "@webassemblyjs/ast": "npm:1.12.1" + "@webassemblyjs/helper-api-error": "npm:1.11.6" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" + "@webassemblyjs/ieee754": "npm:1.11.6" + "@webassemblyjs/leb128": "npm:1.11.6" + "@webassemblyjs/utf8": "npm:1.11.6" + checksum: 10/f7311685b76c3e1def2abea3488be1e77f06ecd8633143a6c5c943ca289660952b73785231bb76a010055ca64645227a4bc79705c26ab7536216891b6bb36320 languageName: node linkType: hard -"needle@npm:^3.1.0": - version: 3.2.0 - resolution: "needle@npm:3.2.0" +"@webassemblyjs/wast-printer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wast-printer@npm:1.12.1" dependencies: - debug: "npm:^3.2.6" - iconv-lite: "npm:^0.6.3" - sax: "npm:^1.2.4" - bin: - needle: bin/needle - checksum: 10/65ec7c7166a054bfcce667bed87e38c1a0b1f493f89f6852658c61575b5f736d4d55a476a96bd90c0c3c3b0233aef5431ef2d4ce1c536eff6a5c6f0b4f95e6b9 + "@webassemblyjs/ast": "npm:1.12.1" + "@xtuc/long": "npm:4.2.2" + checksum: 10/1a6a4b6bc4234f2b5adbab0cb11a24911b03380eb1cab6fb27a2250174a279fdc6aa2f5a9cf62dd1f6d4eb39f778f488e8ff15b9deb0670dee5c5077d46cf572 languageName: node linkType: hard -"negotiator@npm:0.6.2": - version: 0.6.2 - resolution: "negotiator@npm:0.6.2" - checksum: 10/eaf267fedd6503c98beee76e1a0388a04c185d9acb70c1ad206f212849392ad63d6beccea5813f0ac1ace79c16b113d2b89734af28554a0bece9a274b5a02628 +"@webpack-cli/configtest@npm:^1.2.0": + version: 1.2.0 + resolution: "@webpack-cli/configtest@npm:1.2.0" + peerDependencies: + webpack: 4.x.x || 5.x.x + webpack-cli: 4.x.x + checksum: 10/a2726cd9ec601d2b57e5fc15e0ebf5200a8892065e735911269ac2038e62be4bfc176ea1f88c2c46ff09b4d05d4c10ae045e87b3679372483d47da625a327e28 languageName: node linkType: hard -"negotiator@npm:0.6.3, negotiator@npm:^0.6.2, negotiator@npm:^0.6.3": - version: 0.6.3 - resolution: "negotiator@npm:0.6.3" - checksum: 10/2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 +"@webpack-cli/info@npm:^1.5.0": + version: 1.5.0 + resolution: "@webpack-cli/info@npm:1.5.0" + dependencies: + envinfo: "npm:^7.7.3" + peerDependencies: + webpack-cli: 4.x.x + checksum: 10/7f56fe037cd7d1fd5c7428588519fbf04a0cad33925ee4202ffbafd00f8ec1f2f67d991245e687d50e0f3e23f7b7814273d56cb9f7da4b05eed47c8d815c6296 languageName: node linkType: hard -"neo-async@npm:^2.6.0, neo-async@npm:^2.6.2": - version: 2.6.2 - resolution: "neo-async@npm:2.6.2" - checksum: 10/1a7948fea86f2b33ec766bc899c88796a51ba76a4afc9026764aedc6e7cde692a09067031e4a1bf6db4f978ccd99e7f5b6c03fe47ad9865c3d4f99050d67e002 +"@webpack-cli/serve@npm:^1.7.0": + version: 1.7.0 + resolution: "@webpack-cli/serve@npm:1.7.0" + peerDependencies: + webpack-cli: 4.x.x + peerDependenciesMeta: + webpack-dev-server: + optional: true + checksum: 10/0b90c963a6b8424a914a85532e3a7dfe2f7eea1c98acea1c6c1a368bf349733f0d6cb2e83ce9ced7c8208f58d518cced767d1e1d0ab26126d8a9bad3b3f5352e languageName: node linkType: hard -"nested-error-stacks@npm:^2.0.0, nested-error-stacks@npm:^2.1.0": - version: 2.1.0 - resolution: "nested-error-stacks@npm:2.1.0" - checksum: 10/206ee736f9eb83489cc093d43e7d3024255ec93c66a31eaee58ca14d5ad9d925d813494725dcf5dec264e70cd8430167b7f82a2d00b0dd099f83c78d9ca650fd +"@xtuc/ieee754@npm:^1.2.0": + version: 1.2.0 + resolution: "@xtuc/ieee754@npm:1.2.0" + checksum: 10/ab033b032927d77e2f9fa67accdf31b1ca7440974c21c9cfabc8349e10ca2817646171c4f23be98d0e31896d6c2c3462a074fe37752e523abc3e45c79254259c languageName: node linkType: hard -"net-browserify@npm:0.2.4": - version: 0.2.4 - resolution: "net-browserify@npm:0.2.4" - dependencies: - body-parser: "npm:^1.10.0" - express: "npm:^4.10.6" - express-ws: "npm:^0.2.1" - checksum: 10/0104e6183b18baff74f0f1e51227a0fa2f03d835f9cefa531bc7b80b1543a966031ba99fc3b1309d077002aeef997737cd9d365aacecb44aedc76e6e440fcdab +"@xtuc/long@npm:4.2.2": + version: 4.2.2 + resolution: "@xtuc/long@npm:4.2.2" + checksum: 10/7217bae9fe240e0d804969e7b2af11cb04ec608837c78b56ca88831991b287e232a0b7fce8d548beaff42aaf0197ffa471d81be6ac4c4e53b0148025a2c076ec languageName: node linkType: hard -"new-github-release-url@npm:^2.0.0": - version: 2.0.0 - resolution: "new-github-release-url@npm:2.0.0" +"JSONStream@npm:^1.3.5": + version: 1.3.5 + resolution: "JSONStream@npm:1.3.5" dependencies: - type-fest: "npm:^2.5.1" - checksum: 10/3d4ae0f3b775623ceed8e558b6f9850e897aea981a9c937d3ad4e018669c829beccb2c4b5a6af996726ebf86c5b7638368dfc01f3ac2e395d1df29309bc0c5ca + jsonparse: "npm:^1.2.0" + through: "npm:>=2.2.7 <3" + bin: + JSONStream: ./bin.js + checksum: 10/e30daf7b9b2da23076181d9a0e4bec33bc1d97e8c0385b949f1b16ba3366a1d241ec6f077850c01fe32379b5ebb8b96b65496984bc1545a93a5150bf4c267439 languageName: node linkType: hard -"next-tick@npm:^1.1.0": - version: 1.1.0 - resolution: "next-tick@npm:1.1.0" - checksum: 10/83b5cf36027a53ee6d8b7f9c0782f2ba87f4858d977342bfc3c20c21629290a2111f8374d13a81221179603ffc4364f38374b5655d17b6a8f8a8c77bdea4fe8b +"abab@npm:^2.0.6": + version: 2.0.6 + resolution: "abab@npm:2.0.6" + checksum: 10/ebe95d7278999e605823fc515a3b05d689bc72e7f825536e73c95ebf621636874c6de1b749b3c4bf866b96ccd4b3a2802efa313d0e45ad51a413c8c73247db20 languageName: node linkType: hard -"ngo@npm:2.6.2": - version: 2.6.2 - resolution: "ngo@npm:2.6.2" - dependencies: - execa: "npm:^4.0.0" - go-bin: "npm:^1.4.0" - go-versions: "npm:^1.3.2" - bin: - ngo: cli.js - ngo-binary: cli-binary.js - ngo-update: cli-update.js - checksum: 10/dd39a2361233018e61aa86713ea59b5109c990eac1c2260e64330dfca4e01a1fbb7f00339b4a994939a0b933bf61af7bdc405bf952c77f6a7666c4e71b08215e +"abbrev@npm:1, abbrev@npm:^1.0.0": + version: 1.1.1 + resolution: "abbrev@npm:1.1.1" + checksum: 10/2d882941183c66aa665118bafdab82b7a177e9add5eb2776c33e960a4f3c89cff88a1b38aba13a456de01d0dd9d66a8bea7c903268b21ea91dd1097e1e2e8243 languageName: node linkType: hard -"ngo@npm:2.7.0": - version: 2.7.0 - resolution: "ngo@npm:2.7.0" - dependencies: - execa: "npm:^5.1.1" - go-bin: "npm:^1.4.0" - go-versions: "npm:^1.3.2" - semver: "npm:^7.3.5" - bin: - ngo: cli.js - ngo-binary: cli-binary.js - ngo-update: cli-update.js - ngo-version: cli-update.js - checksum: 10/19e38c902fda3dd217974613b06435eca9b03d55ab460427069724dd0ff5e570c5895b849a636c01707852f3d882ba745f03aaecaa299ddc9824e53737c44da6 +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 languageName: node linkType: hard -"nice-napi@npm:^1.0.2": - version: 1.0.2 - resolution: "nice-napi@npm:1.0.2" +"accepts@npm:~1.3.4": + version: 1.3.8 + resolution: "accepts@npm:1.3.8" dependencies: - node-addon-api: "npm:^3.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.2" - conditions: "!os=win32" + mime-types: "npm:~2.1.34" + negotiator: "npm:0.6.3" + checksum: 10/67eaaa90e2917c58418e7a9b89392002d2b1ccd69bcca4799135d0c632f3b082f23f4ae4ddeedbced5aa59bcc7bdf4699c69ebed4593696c922462b7bc5744d6 languageName: node linkType: hard -"nice-try@npm:^1.0.4": - version: 1.0.5 - resolution: "nice-try@npm:1.0.5" - checksum: 10/0b4af3b5bb5d86c289f7a026303d192a7eb4417231fe47245c460baeabae7277bcd8fd9c728fb6bd62c30b3e15cd6620373e2cf33353b095d8b403d3e8a15aff +"acorn-import-attributes@npm:^1.9.5": + version: 1.9.5 + resolution: "acorn-import-attributes@npm:1.9.5" + peerDependencies: + acorn: ^8 + checksum: 10/8bfbfbb6e2467b9b47abb4d095df717ab64fce2525da65eabee073e85e7975fb3a176b6c8bba17c99a7d8ede283a10a590272304eb54a93c4aa1af9790d47a8b languageName: node linkType: hard -"nise@npm:^1.4.5": - version: 1.5.3 - resolution: "nise@npm:1.5.3" - dependencies: - "@sinonjs/formatio": "npm:^3.2.1" - "@sinonjs/text-encoding": "npm:^0.7.1" - just-extend: "npm:^4.0.2" - lolex: "npm:^5.0.1" - path-to-regexp: "npm:^1.7.0" - checksum: 10/6b58d34409d5b430d8179be6550265f10dbcdea39c20facb39d46cac56fa986ee242cc0a42aadbc62da8f7ae503cc2146244af75525bc0526755ad7da045b05b +"acorn-jsx@npm:^5.3.2": + version: 5.3.2 + resolution: "acorn-jsx@npm:5.3.2" + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 10/d4371eaef7995530b5b5ca4183ff6f062ca17901a6d3f673c9ac011b01ede37e7a1f7f61f8f5cfe709e88054757bb8f3277dc4061087cdf4f2a1f90ccbcdb977 languageName: node linkType: hard -"no-case@npm:^2.2.0, no-case@npm:^2.3.2": - version: 2.3.2 - resolution: "no-case@npm:2.3.2" - dependencies: - lower-case: "npm:^1.1.1" - checksum: 10/a92fc7c10f40477bb69c3ca00e2a12fd08f838204bcef66233cbe8a36c0ec7938ba0cdf3f0534b38702376cbfa26270130607c0b8460ea87f44d474919c39c91 +"acorn-walk@npm:^8.1.1": + version: 8.2.0 + resolution: "acorn-walk@npm:8.2.0" + checksum: 10/e69f7234f2adfeb16db3671429a7c80894105bd7534cb2032acf01bb26e6a847952d11a062d071420b43f8d82e33d2e57f26fe87d9cce0853e8143d8910ff1de languageName: node linkType: hard -"no-case@npm:^3.0.4": - version: 3.0.4 - resolution: "no-case@npm:3.0.4" - dependencies: - lower-case: "npm:^2.0.2" - tslib: "npm:^2.0.3" - checksum: 10/0b2ebc113dfcf737d48dde49cfebf3ad2d82a8c3188e7100c6f375e30eafbef9e9124aadc3becef237b042fd5eb0aad2fd78669c20972d045bbe7fea8ba0be5c +"acorn@npm:^8.4.1, acorn@npm:^8.7.1": + version: 8.8.2 + resolution: "acorn@npm:8.8.2" + bin: + acorn: bin/acorn + checksum: 10/b4e77d56d24d3e11a45d9ac8ae661b4e14a4af04ae33edbf1e6bf910887e5bb352cc60e9ea06a0944880e6b658f58c095d3b54e88e1921cb9319608b51085dd7 languageName: node linkType: hard -"nock@npm:^13.3.1": - version: 13.5.4 - resolution: "nock@npm:13.5.4" - dependencies: - debug: "npm:^4.1.0" - json-stringify-safe: "npm:^5.0.1" - propagate: "npm:^2.0.0" - checksum: 10/75bad391bae4efb81b742734af5f2d87309cd93d3ca6b78372fd37946d78ccb254d79104676619866915e6734abfc1b00fee2aa42073a4843ca3c746aad35a4d +"acorn@npm:^8.8.2, acorn@npm:^8.9.0": + version: 8.10.0 + resolution: "acorn@npm:8.10.0" + bin: + acorn: bin/acorn + checksum: 10/522310c20fdc3c271caed3caf0f06c51d61cb42267279566edd1d58e83dbc12eebdafaab666a0f0be1b7ad04af9c6bc2a6f478690a9e6391c3c8b165ada917dd languageName: node linkType: hard -"node-abi@npm:^3.3.0": - version: 3.67.0 - resolution: "node-abi@npm:3.67.0" - dependencies: - semver: "npm:^7.3.5" - checksum: 10/fe47dfd9a0770d300ce1dd9b527441e691cba077c19fdbcb304796a5bc182f8cbe40933f2a013127b98a32bd6d06e0efa2b5f76ca38d791d44f83307920bafac +"add-stream@npm:^1.0.0": + version: 1.0.0 + resolution: "add-stream@npm:1.0.0" + checksum: 10/3e9e8b0b8f0170406d7c3a9a39bfbdf419ccccb0fd2a396338c0fda0a339af73bf738ad414fc520741de74517acf0dd92b4a36fd3298a47fd5371eee8f2c5a06 languageName: node linkType: hard -"node-abort-controller@npm:^3.0.1": - version: 3.1.1 - resolution: "node-abort-controller@npm:3.1.1" - checksum: 10/0a2cdb7ec0aeaf3cb31e1ca0e192f5add48f1c5c9c9ed822129f9dddbd9432f69b7425982f94ce803c56a2104884530aa67cd57696e5774b2e5b8ec2f58de042 +"adm-zip@npm:0.5.10": + version: 0.5.10 + resolution: "adm-zip@npm:0.5.10" + checksum: 10/c5ab79b77114d8277f0cbfd6cca830198d6c7ee4971f6960f48e08cd2375953b11dc71729b7f396abd51d2d6cce8c862fad185ea90cb2c84ab5161c37ed1b099 languageName: node linkType: hard -"node-addon-api@npm:^2.0.0": - version: 2.0.2 - resolution: "node-addon-api@npm:2.0.2" +"agent-base@npm:6, agent-base@npm:^6.0.2": + version: 6.0.2 + resolution: "agent-base@npm:6.0.2" dependencies: - node-gyp: "npm:latest" - checksum: 10/e4ce4daac5b2fefa6b94491b86979a9c12d9cceba571d2c6df1eb5859f9da68e5dc198f128798e1785a88aafee6e11f4992dcccd4bf86bec90973927d158bd60 + debug: "npm:4" + checksum: 10/21fb903e0917e5cb16591b4d0ef6a028a54b83ac30cd1fca58dece3d4e0990512a8723f9f83130d88a41e2af8b1f7be1386fda3ea2d181bb1a62155e75e95e23 languageName: node linkType: hard -"node-addon-api@npm:^3.0.0": - version: 3.2.1 - resolution: "node-addon-api@npm:3.2.1" +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": + version: 7.1.0 + resolution: "agent-base@npm:7.1.0" dependencies: - node-gyp: "npm:latest" - checksum: 10/681b52dfa3e15b0a8e5cf283cc0d8cd5fd2a57c559ae670fcfd20544cbb32f75de7648674110defcd17ab2c76ebef630aa7d2d2f930bc7a8cc439b20fe233518 + debug: "npm:^4.3.4" + checksum: 10/f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f languageName: node linkType: hard -"node-addon-api@npm:^4.2.0": - version: 4.3.0 - resolution: "node-addon-api@npm:4.3.0" +"agentkeepalive@npm:^4.2.1": + version: 4.2.1 + resolution: "agentkeepalive@npm:4.2.1" dependencies: - node-gyp: "npm:latest" - checksum: 10/d3b38d16cb9ad0714d965331d0e38cef1c27750c2c3343cd3464a9ed8158501a2910ccbf2fd9fdc476e806a19dbc9e0524ff9d66a7c779d42a9752a63ba30b80 + debug: "npm:^4.1.0" + depd: "npm:^1.1.2" + humanize-ms: "npm:^1.2.1" + checksum: 10/63961cba1afa26d708da94159f3b9428d46fdc137b783fbc399b848e750c5e28c97d96839efa8cb3c2d11ecd12dd411298c00d164600212f660e8c55369c9e55 languageName: node linkType: hard -"node-cache@npm:^5.1.2": - version: 5.1.2 - resolution: "node-cache@npm:5.1.2" +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" dependencies: - clone: "npm:2.x" - checksum: 10/6ac71a9e65fdd8940883c3c188de4888ff592f5bf52e4d42436c49e2a575d635e7327acea490c49fa7c01d5fa81f7b6e060fd35cf6f6ec401fbd5f77a3ebeecf + clean-stack: "npm:^2.0.0" + indent-string: "npm:^4.0.0" + checksum: 10/1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 languageName: node linkType: hard -"node-domexception@npm:^1.0.0": - version: 1.0.0 - resolution: "node-domexception@npm:1.0.0" - checksum: 10/e332522f242348c511640c25a6fc7da4f30e09e580c70c6b13cb0be83c78c3e71c8d4665af2527e869fc96848924a4316ae7ec9014c091e2156f41739d4fa233 +"aggregate-error@npm:^4.0.0": + version: 4.0.0 + resolution: "aggregate-error@npm:4.0.0" + dependencies: + clean-stack: "npm:^4.0.0" + indent-string: "npm:^5.0.0" + checksum: 10/586397769e25fc5c2da5995c736f11ba83adf0bbc5f72c7101ea38e795458fd7b497f672318119218b4d3b1f8b8d3001417cebe9de55b5467af5cbcbff4befa3 languageName: node linkType: hard -"node-fetch@npm:2.6.7, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": - version: 2.6.7 - resolution: "node-fetch@npm:2.6.7" - dependencies: - whatwg-url: "npm:^5.0.0" +"ajv-draft-04@npm:1.0.0": + version: 1.0.0 + resolution: "ajv-draft-04@npm:1.0.0" peerDependencies: - encoding: ^0.1.0 + ajv: ^8.5.0 peerDependenciesMeta: - encoding: + ajv: optional: true - checksum: 10/4bc9245383db92c35601a798c9a992fdf38d99920ceac11e0e6512ef3014d188b3807ccb060bc6c4bdb57a145030c73f5b5fd6730f665979f9264bc43ca3afea + checksum: 10/3f11fa0e7f7359bef6608657f02ab78e9cc62b1fb7bdd860db0d00351b3863a1189c1a23b72466d2d82726cab4eb20725c76f5e7c134a89865e2bfd0e6828137 languageName: node linkType: hard -"node-fetch@npm:2.7.0, node-fetch@npm:^2.6.6, node-fetch@npm:^2.6.8, node-fetch@npm:^2.6.9": - version: 2.7.0 - resolution: "node-fetch@npm:2.7.0" +"ajv-formats@npm:3.0.1": + version: 3.0.1 + resolution: "ajv-formats@npm:3.0.1" dependencies: - whatwg-url: "npm:^5.0.0" + ajv: "npm:^8.0.0" peerDependencies: - encoding: ^0.1.0 + ajv: ^8.0.0 peerDependenciesMeta: - encoding: + ajv: optional: true - checksum: 10/b24f8a3dc937f388192e59bcf9d0857d7b6940a2496f328381641cb616efccc9866e89ec43f2ec956bbd6c3d3ee05524ce77fe7b29ccd34692b3a16f237d6676 - languageName: node - linkType: hard - -"node-fetch@npm:3.0.0-beta.9": - version: 3.0.0-beta.9 - resolution: "node-fetch@npm:3.0.0-beta.9" - dependencies: - data-uri-to-buffer: "npm:^3.0.1" - fetch-blob: "npm:^2.1.1" - checksum: 10/419fe532b80d6f291950ec995b32a80a6ffbf3ede476c0d3e81ccac116029160e5799d7a2b6474128756ec6a1faa6a23b5e515f9ba28c089430ea157750dcd89 + checksum: 10/5679b9f9ced9d0213a202a37f3aa91efcffe59a6de1a6e3da5c873344d3c161820a1f11cc29899661fee36271fd2895dd3851b6461c902a752ad661d1c1e8722 languageName: node linkType: hard -"node-fetch@npm:^2.6.12": - version: 2.6.12 - resolution: "node-fetch@npm:2.6.12" - dependencies: - whatwg-url: "npm:^5.0.0" +"ajv-keywords@npm:^3.5.2": + version: 3.5.2 + resolution: "ajv-keywords@npm:3.5.2" peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - checksum: 10/370ed4d906edad9709a81b54a0141d37d2973a27dc80c723d8ac14afcec6dc67bc6c70986a96992b64ec75d08159cc4b65ce6aa9063941168ea5ac73b24df9f8 + ajv: ^6.9.1 + checksum: 10/d57c9d5bf8849bddcbd801b79bc3d2ddc736c2adb6b93a6a365429589dd7993ddbd5d37c6025ed6a7f89c27506b80131d5345c5b1fa6a97e40cd10a96bcd228c languageName: node linkType: hard -"node-fetch@npm:^3.3.2": - version: 3.3.2 - resolution: "node-fetch@npm:3.3.2" +"ajv@npm:8.17.1, ajv@npm:^8.0.0": + version: 8.17.1 + resolution: "ajv@npm:8.17.1" dependencies: - data-uri-to-buffer: "npm:^4.0.0" - fetch-blob: "npm:^3.1.4" - formdata-polyfill: "npm:^4.0.10" - checksum: 10/24207ca8c81231c7c59151840e3fded461d67a31cf3e3b3968e12201a42f89ce4a0b5fb7079b1fa0a4655957b1ca9257553200f03a9f668b45ebad265ca5593d - languageName: node - linkType: hard - -"node-forge@npm:>=1.3.0": - version: 1.3.1 - resolution: "node-forge@npm:1.3.1" - checksum: 10/05bab6868633bf9ad4c3b1dd50ec501c22ffd69f556cdf169a00998ca1d03e8107a6032ba013852f202035372021b845603aeccd7dfcb58cdb7430013b3daa8d + fast-deep-equal: "npm:^3.1.3" + fast-uri: "npm:^3.0.1" + json-schema-traverse: "npm:^1.0.0" + require-from-string: "npm:^2.0.2" + checksum: 10/ee3c62162c953e91986c838f004132b6a253d700f1e51253b99791e2dbfdb39161bc950ebdc2f156f8568035bb5ed8be7bd78289cd9ecbf3381fe8f5b82e3f33 languageName: node linkType: hard -"node-gyp-build@npm:4.4.0": - version: 4.4.0 - resolution: "node-gyp-build@npm:4.4.0" - bin: - node-gyp-build: bin.js - node-gyp-build-optional: optional.js - node-gyp-build-test: build-test.js - checksum: 10/a2f77e622ed738209f20ee808c812fe5697c3c641b76b6a369b989a810ed40d1a7f5e7687ca0ea5987363697c284f1c75cdc8164e8cfdd5e6ff3bae17e9898ff +"ajv@npm:^6.12.4, ajv@npm:^6.12.5": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c languageName: node linkType: hard -"node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.2.2, node-gyp-build@npm:^4.3.0": - version: 4.3.0 - resolution: "node-gyp-build@npm:4.3.0" - bin: - node-gyp-build: bin.js - node-gyp-build-optional: optional.js - node-gyp-build-test: build-test.js - checksum: 10/673bd8f12694cc226747333fc181a7288e32dc96e88067bccb9ae3969ed1459fe461f85ad76d0ec8566ec1ae75c179e7a6667b0094cc78c9431ecfc95b5c24aa +"ajv@npm:^8.11.0": + version: 8.12.0 + resolution: "ajv@npm:8.12.0" + dependencies: + fast-deep-equal: "npm:^3.1.1" + json-schema-traverse: "npm:^1.0.0" + require-from-string: "npm:^2.0.2" + uri-js: "npm:^4.2.2" + checksum: 10/b406f3b79b5756ac53bfe2c20852471b08e122bc1ee4cde08ae4d6a800574d9cd78d60c81c69c63ff81e4da7cd0b638fafbb2303ae580d49cf1600b9059efb85 languageName: node linkType: hard -"node-gyp-build@npm:^4.2.1": - version: 4.6.1 - resolution: "node-gyp-build@npm:4.6.1" - bin: - node-gyp-build: bin.js - node-gyp-build-optional: optional.js - node-gyp-build-test: build-test.js - checksum: 10/79b948377492ae8e1aa1c18071661e6020c11f8847d5ce822abd67ec02bee5b21715b1b4861041d2b40d16633824476735bc9a60e81c82c49e715d55ee29b206 +"ansi-align@npm:^3.0.0": + version: 3.0.1 + resolution: "ansi-align@npm:3.0.1" + dependencies: + string-width: "npm:^4.1.0" + checksum: 10/4c7e8b6a10eaf18874ecee964b5db62ac86d0b9266ad4987b3a1efcb5d11a9e12c881ee40d14951833135a8966f10a3efe43f9c78286a6e632f53d85ad28b9c0 languageName: node linkType: hard -"node-gyp-build@npm:^4.8.0": - version: 4.8.0 - resolution: "node-gyp-build@npm:4.8.0" - bin: - node-gyp-build: bin.js - node-gyp-build-optional: optional.js - node-gyp-build-test: build-test.js - checksum: 10/80f410ab412df38e84171d3634a5716b6c6f14ecfa4eb971424d289381fb76f8bcbe1b666419ceb2c81060e558fd7c6d70cc0f60832bcca6a1559098925d9657 +"ansi-colors@npm:^4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 10/e862fddd0a9ca88f1e7c9312ea70674cec3af360c994762309f6323730525e92c77d2715ee5f08aa8f438b7ca18efe378af647f501fc92b15b8e4b3b52d09db4 languageName: node linkType: hard -"node-gyp-build@npm:~4.1.0": - version: 4.1.1 - resolution: "node-gyp-build@npm:4.1.1" - bin: - node-gyp-build: ./bin.js - node-gyp-build-optional: ./optional.js - node-gyp-build-test: ./build-test.js - checksum: 10/959d42221cc44b92700003efae741652bc4e379e4cf375830ddde03ba43c89f99694bf0883078ed0d4e03ffe2f85decab0572e04068d3900b8538d165dbc17df +"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0, ansi-escapes@npm:^4.3.2": + version: 4.3.2 + resolution: "ansi-escapes@npm:4.3.2" + dependencies: + type-fest: "npm:^0.21.3" + checksum: 10/8661034456193ffeda0c15c8c564a9636b0c04094b7f78bd01517929c17c504090a60f7a75f949f5af91289c264d3e1001d91492c1bd58efc8e100500ce04de2 languageName: node linkType: hard -"node-gyp@npm:8.x, node-gyp@npm:^8.0.0": - version: 8.4.1 - resolution: "node-gyp@npm:8.4.1" - dependencies: - env-paths: "npm:^2.2.0" - glob: "npm:^7.1.4" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^9.1.0" - nopt: "npm:^5.0.0" - npmlog: "npm:^6.0.0" - rimraf: "npm:^3.0.2" - semver: "npm:^7.3.5" - tar: "npm:^6.1.2" - which: "npm:^2.0.2" - bin: - node-gyp: bin/node-gyp.js - checksum: 10/5ac19a7f6212c787f33bb72f889fafb1ce9d80b7ecb87b3785aebb0ff94a70cd5dbb3ecb435a308eaeb26d037c6edaf173951a9edacaadf0f4c3ae189f1e5077 +"ansi-regex@npm:^2.0.0": + version: 2.1.1 + resolution: "ansi-regex@npm:2.1.1" + checksum: 10/190abd03e4ff86794f338a31795d262c1dfe8c91f7e01d04f13f646f1dcb16c5800818f886047876f1272f065570ab86b24b99089f8b68a0e11ff19aed4ca8f1 languageName: node linkType: hard -"node-gyp@npm:^10.0.0": - version: 10.0.1 - resolution: "node-gyp@npm:10.0.1" - dependencies: - env-paths: "npm:^2.2.0" - exponential-backoff: "npm:^3.1.1" - glob: "npm:^10.3.10" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^13.0.0" - nopt: "npm:^7.0.0" - proc-log: "npm:^3.0.0" - semver: "npm:^7.3.5" - tar: "npm:^6.1.2" - which: "npm:^4.0.0" - bin: - node-gyp: bin/node-gyp.js - checksum: 10/578cf0c821f258ce4b6ebce4461eca4c991a4df2dee163c0624f2fe09c7d6d37240be4942285a0048d307230248ee0b18382d6623b9a0136ce9533486deddfa8 +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b languageName: node linkType: hard -"node-gyp@npm:^9.0.0": - version: 9.3.1 - resolution: "node-gyp@npm:9.3.1" - dependencies: - env-paths: "npm:^2.2.0" - glob: "npm:^7.1.4" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^10.0.3" - nopt: "npm:^6.0.0" - npmlog: "npm:^6.0.0" - rimraf: "npm:^3.0.2" - semver: "npm:^7.3.5" - tar: "npm:^6.1.2" - which: "npm:^2.0.2" - bin: - node-gyp: bin/node-gyp.js - checksum: 10/e9345b22be0a3256af87a16ba9604362cd8e4db304e67e71dd83bb8e573f3fdbaf69e359b5af572a14a98730cc3e1813679444ee029093d2a2f38ba3cac4ed7e +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 10/1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 languageName: node linkType: hard -"node-gyp@npm:latest": - version: 9.4.0 - resolution: "node-gyp@npm:9.4.0" +"ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" dependencies: - env-paths: "npm:^2.2.0" - exponential-backoff: "npm:^3.1.1" - glob: "npm:^7.1.4" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^11.0.3" - nopt: "npm:^6.0.0" - npmlog: "npm:^6.0.0" - rimraf: "npm:^3.0.2" - semver: "npm:^7.3.5" - tar: "npm:^6.1.2" - which: "npm:^2.0.2" - bin: - node-gyp: bin/node-gyp.js - checksum: 10/458317127c63877365f227b18ef2362b013b7f8440b35ae722935e61b31e6b84ec0e3625ab07f90679e2f41a1d5a7df6c4049fdf8e7b3c81fcf22775147b47ac + color-convert: "npm:^1.9.0" + checksum: 10/d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 languageName: node linkType: hard -"node-int64@npm:^0.4.0": - version: 0.4.0 - resolution: "node-int64@npm:0.4.0" - checksum: 10/b7afc2b65e56f7035b1a2eec57ae0fbdee7d742b1cdcd0f4387562b6527a011ab1cbe9f64cc8b3cca61e3297c9637c8bf61cec2e6b8d3a711d4b5267dfafbe02 +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff languageName: node linkType: hard -"node-interval-tree@npm:^1.3.3": - version: 1.3.3 - resolution: "node-interval-tree@npm:1.3.3" - dependencies: - shallowequal: "npm:^1.0.2" - checksum: 10/a63b60dd6243c862428ac6d5578f38d4b57cf0961472fc3b75b9c07cef985b6b06a8fe9051a0a2c68e9192f800b1d639bc86347f262de664452cb161d773f399 +"ansi-styles@npm:^5.0.0": + version: 5.2.0 + resolution: "ansi-styles@npm:5.2.0" + checksum: 10/d7f4e97ce0623aea6bc0d90dcd28881ee04cba06c570b97fd3391bd7a268eedfd9d5e2dd4fdcbdd82b8105df5faf6f24aaedc08eaf3da898e702db5948f63469 languageName: node linkType: hard -"node-mocks-http@npm:1.14.0": - version: 1.14.0 - resolution: "node-mocks-http@npm:1.14.0" - dependencies: - accepts: "npm:^1.3.7" - content-disposition: "npm:^0.5.3" - depd: "npm:^1.1.0" - fresh: "npm:^0.5.2" - merge-descriptors: "npm:^1.0.1" - methods: "npm:^1.1.2" - mime: "npm:^1.3.4" - parseurl: "npm:^1.3.3" - range-parser: "npm:^1.2.0" - type-is: "npm:^1.6.18" - checksum: 10/9c168268fa3c1a7eb9c614d6fb20cf3122ce5322a571a1e41092cbc2e7bb874c7c4e1c456da7445582be88f7d4231a67f24c707608995090c6f02e2af960bbc5 +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10/70fdf883b704d17a5dfc9cde206e698c16bcd74e7f196ab821511651aee4f9f76c9514bdfa6ca3a27b5e49138b89cb222a28caf3afe4567570139577f991df32 languageName: node linkType: hard -"node-polyfill-webpack-plugin@npm:1.1.4": - version: 1.1.4 - resolution: "node-polyfill-webpack-plugin@npm:1.1.4" - dependencies: - assert: "npm:^2.0.0" - browserify-zlib: "npm:^0.2.0" - buffer: "npm:^6.0.3" - console-browserify: "npm:^1.2.0" - constants-browserify: "npm:^1.0.0" - crypto-browserify: "npm:^3.12.0" - domain-browser: "npm:^4.19.0" - events: "npm:^3.3.0" - filter-obj: "npm:^2.0.2" - https-browserify: "npm:^1.0.0" - os-browserify: "npm:^0.3.0" - path-browserify: "npm:^1.0.1" - process: "npm:^0.11.10" - punycode: "npm:^2.1.1" - querystring-es3: "npm:^0.2.1" - readable-stream: "npm:^3.6.0" - stream-browserify: "npm:^3.0.0" - stream-http: "npm:^3.2.0" - string_decoder: "npm:^1.3.0" - timers-browserify: "npm:^2.0.12" - tty-browserify: "npm:^0.0.1" - url: "npm:^0.11.0" - util: "npm:^0.12.4" - vm-browserify: "npm:^1.1.2" - peerDependencies: - webpack: ">=5" - checksum: 10/a700b86a673771ccb604673310b619b19b2e5a99646f08ce34f42644c9743c7501c2b0f906e9b215c7eb44b9eefe2366e99a86b26d1680436a5efbb9a984ca18 +"ansicolors@npm:~0.3.2": + version: 0.3.2 + resolution: "ansicolors@npm:0.3.2" + checksum: 10/0704d1485d84d65a47aacd3d2d26f501f21aeeb509922c8f2496d0ec5d346dc948efa64f3151aef0571d73e5c44eb10fd02f27f59762e9292fe123bb1ea9ff7d languageName: node linkType: hard -"node-preload@npm:^0.2.1": - version: 0.2.1 - resolution: "node-preload@npm:0.2.1" - dependencies: - process-on-spawn: "npm:^1.0.0" - checksum: 10/de36ed365b7e474eaf05c41f976774dece23a7f398fe76dbf9705f9670a1f49e6a27c5f31fe58b4e43d96413fdce4806192c60d35317b25725636c90889d5bab +"any-promise@npm:^1.1.0": + version: 1.3.0 + resolution: "any-promise@npm:1.3.0" + checksum: 10/6737469ba353b5becf29e4dc3680736b9caa06d300bda6548812a8fee63ae7d336d756f88572fa6b5219aed36698d808fa55f62af3e7e6845c7a1dc77d240edb languageName: node linkType: hard -"node-releases@npm:^2.0.12": - version: 2.0.12 - resolution: "node-releases@npm:2.0.12" - checksum: 10/5b376582d1e348132aeb2c7c14990ca2d6d8687bd57fec912fd7f4e09abb44464fc72503ab2a29804613a7654d7a18f45a69506d249f79dba48fb1258df75c0b +"anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": + version: 3.1.2 + resolution: "anymatch@npm:3.1.2" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10/985163db2292fac9e5a1e072bf99f1b5baccf196e4de25a0b0b81865ebddeb3b3eb4480734ef0a2ac8c002845396b91aa89121f5b84f93981a4658164a9ec6e9 languageName: node linkType: hard -"node-releases@npm:^2.0.13": - version: 2.0.13 - resolution: "node-releases@npm:2.0.13" - checksum: 10/c9bb813aab2717ff8b3015ecd4c7c5670a5546e9577699a7c84e8d69230cd3b1ce8f863f8e9b50f18b19a5ffa4b9c1a706bbbfe4c378de955fedbab04488a338 +"app-module-path@npm:^2.2.0": + version: 2.2.0 + resolution: "app-module-path@npm:2.2.0" + checksum: 10/9ed8c6ce6247a6b5d556039f29b4610869237bbb5b8f3d905b22bd2d314c30efcc0fb70c2626d7461ecc52ec7edec9908f660d0938d2bea5b8cfc6868a28806f languageName: node linkType: hard -"node-releases@npm:^2.0.14": - version: 2.0.14 - resolution: "node-releases@npm:2.0.14" - checksum: 10/0f7607ec7db5ef1dc616899a5f24ae90c869b6a54c2d4f36ff6d84a282ab9343c7ff3ca3670fe4669171bb1e8a9b3e286e1ef1c131f09a83d70554f855d54f24 +"append-transform@npm:^2.0.0": + version: 2.0.0 + resolution: "append-transform@npm:2.0.0" + dependencies: + default-require-extensions: "npm:^3.0.0" + checksum: 10/f26f393bf7a428fd1bb18f2758a819830a582243310c5170edb3f98fdc5a535333d02b952f7c2d9b14522bd8ead5b132a0b15000eca18fa9f49172963ebbc231 languageName: node linkType: hard -"node-releases@npm:^2.0.3": - version: 2.0.4 - resolution: "node-releases@npm:2.0.4" - checksum: 10/b32d6c2032c7b169ae3938b416fc50f123f5bd577d54a79b2ae201febf27b22846b01c803dd35ac8689afe840f8ba4e5f7154723db629b80f359836b6707b92f +"aproba@npm:^1.0.3 || ^2.0.0, aproba@npm:^2.0.0": + version: 2.0.0 + resolution: "aproba@npm:2.0.0" + checksum: 10/c2b9a631298e8d6f3797547e866db642f68493808f5b37cd61da778d5f6ada890d16f668285f7d60bd4fc3b03889bd590ffe62cf81b700e9bb353431238a0a7b languageName: node linkType: hard -"node-releases@npm:^2.0.8": - version: 2.0.10 - resolution: "node-releases@npm:2.0.10" - checksum: 10/d784ecde25696a15d449c4433077f5cce620ed30a1656c4abf31282bfc691a70d9618bae6868d247a67914d1be5cc4fde22f65a05f4398cdfb92e0fc83cadfbc +"archy@npm:^1.0.0": + version: 1.0.0 + resolution: "archy@npm:1.0.0" + checksum: 10/d7928049a57988b86df3f4de75ca16a4252ccee591d085c627e649fc54c5ae5daa833f17aa656bd825bd00bc0a2756ae03d2b983050bdbda1046b6d832bf7303 languageName: node linkType: hard -"node-source-walk@npm:^6.0.0, node-source-walk@npm:^6.0.1, node-source-walk@npm:^6.0.2": - version: 6.0.2 - resolution: "node-source-walk@npm:6.0.2" +"are-we-there-yet@npm:^2.0.0": + version: 2.0.0 + resolution: "are-we-there-yet@npm:2.0.0" dependencies: - "@babel/parser": "npm:^7.21.8" - checksum: 10/eacaaa11fa71fd48da16d75a108d5e1e945b581550112b37c5e909c7f112c1b48acf8648d7fa167e6f482e41f047bceca1ffc5aa3c91fee74406acc003f98190 + delegates: "npm:^1.0.0" + readable-stream: "npm:^3.6.0" + checksum: 10/ea6f47d14fc33ae9cbea3e686eeca021d9d7b9db83a306010dd04ad5f2c8b7675291b127d3fcbfcbd8fec26e47b3324ad5b469a6cc3733a582f2fe4e12fc6756 languageName: node linkType: hard -"node-ssh@npm:13.1.0": - version: 13.1.0 - resolution: "node-ssh@npm:13.1.0" +"are-we-there-yet@npm:^3.0.0": + version: 3.0.0 + resolution: "are-we-there-yet@npm:3.0.0" dependencies: - "@types/ssh2": "npm:^1.11.9" - is-stream: "npm:^2.0.0" - make-dir: "npm:^3.1.0" - sb-promise-queue: "npm:^2.1.0" - sb-scandir: "npm:^3.1.0" - shell-escape: "npm:^0.2.0" - ssh2: "npm:^1.11.0" - checksum: 10/1731284d3154d850e3c8ca15a23bb3ef29c8ff32f0a75ab50e2a46789901ce793eb97d764ec6fb3343d0803a4439f325dff4f1ba188e100f05662363072768ae + delegates: "npm:^1.0.0" + readable-stream: "npm:^3.6.0" + checksum: 10/7266eee19d0be9dd8e58b63cfb1e1ad45945125fac1e75f00237b55960891bf3bb0be291757a8d9dcf1dbfacfb3802d3eb3f9a064084a6a70a61fe0571f9318f languageName: node linkType: hard -"node-vault@npm:*, node-vault@npm:0.9.22": - version: 0.9.22 - resolution: "node-vault@npm:0.9.22" - dependencies: - debug: "npm:3.1.0" - mustache: "npm:^2.2.1" - request: "npm:2.88.0" - request-promise-native: "npm:1.0.7" - tv4: "npm:^1.2.7" - checksum: 10/42279b3ecd1d19ca839c8fa9742b55bede82f422f6b86f4b7c1f30cadbb553346e115133ed324756d3cfe7a4af9a00f0c7a8545d8ddc6ba0c9f42c6c5433d4fd +"arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 10/969b491082f20cad166649fa4d2073ea9e974a4e5ac36247ca23d2e5a8b3cb12d60e9ff70a8acfe26d76566c71fd351ee5e6a9a6595157eb36f92b1fd64e1599 languageName: node linkType: hard -"nodemon@npm:2.0.22": - version: 2.0.22 - resolution: "nodemon@npm:2.0.22" +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" dependencies: - chokidar: "npm:^3.5.2" - debug: "npm:^3.2.7" - ignore-by-default: "npm:^1.0.1" - minimatch: "npm:^3.1.2" - pstree.remy: "npm:^1.1.8" - semver: "npm:^5.7.1" - simple-update-notifier: "npm:^1.0.7" - supports-color: "npm:^5.5.0" - touch: "npm:^3.1.0" - undefsafe: "npm:^2.0.5" - bin: - nodemon: bin/nodemon.js - checksum: 10/1fbddb426e6c5510ed42001a947e9caad3f3ca29c36ca7aac143b3a084d3ba855fdf4020f41a890101b91cbe60824e70fcbcb98f21574ed0a7964b3a825e0a1f + sprintf-js: "npm:~1.0.2" + checksum: 10/c6a621343a553ff3779390bb5ee9c2263d6643ebcd7843227bdde6cc7adbed796eb5540ca98db19e3fd7b4714e1faa51551f8849b268bb62df27ddb15cbcd91e languageName: node linkType: hard -"nodemon@npm:^2.0.7": - version: 2.0.15 - resolution: "nodemon@npm:2.0.15" - dependencies: - chokidar: "npm:^3.5.2" - debug: "npm:^3.2.7" - ignore-by-default: "npm:^1.0.1" - minimatch: "npm:^3.0.4" - pstree.remy: "npm:^1.1.8" - semver: "npm:^5.7.1" - supports-color: "npm:^5.5.0" - touch: "npm:^3.1.0" - undefsafe: "npm:^2.0.5" - update-notifier: "npm:^5.1.0" - bin: - nodemon: bin/nodemon.js - checksum: 10/98f9a1af1d5dd302d0113ee93405b620205c45341e35614397f86f3034900664e551684b3ede8285d9969e09805873538e4cab2fcedb4a485f8df01890a22a69 +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10/18640244e641a417ec75a9bd38b0b2b6b95af5199aa241b131d4b2fb206f334d7ecc600bd194861610a5579084978bfcbb02baa399dbe442d56d0ae5e60dbaef languageName: node linkType: hard -"nofilter@npm:^1.0.4": - version: 1.0.4 - resolution: "nofilter@npm:1.0.4" - checksum: 10/864d1945d29de91ee0b21349c7404fe506b5f07febd8e11988918e3686467a95570b131282fd2bdad7aee9e4b0ed567386e439690ee6ff177541e7e8b8442144 +"array-buffer-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "array-buffer-byte-length@npm:1.0.0" + dependencies: + call-bind: "npm:^1.0.2" + is-array-buffer: "npm:^3.0.1" + checksum: 10/044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 languageName: node linkType: hard -"nofilter@npm:^3.1.0": - version: 3.1.0 - resolution: "nofilter@npm:3.1.0" - checksum: 10/f63d87231dfda4b783db17d75b15aac948f78e65f4f1043096ef441147f6667ff74cd4b3f57ada5dbe240be282d3e9838558ac863a66cb04ef25fff7b2b4be4e +"array-buffer-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "array-buffer-byte-length@npm:1.0.1" + dependencies: + call-bind: "npm:^1.0.5" + is-array-buffer: "npm:^3.0.4" + checksum: 10/53524e08f40867f6a9f35318fafe467c32e45e9c682ba67b11943e167344d2febc0f6977a17e699b05699e805c3e8f073d876f8bbf1b559ed494ad2cd0fae09e languageName: node linkType: hard -"nopt@npm:^5.0.0": - version: 5.0.0 - resolution: "nopt@npm:5.0.0" - dependencies: - abbrev: "npm:1" - bin: - nopt: bin/nopt.js - checksum: 10/00f9bb2d16449469ba8ffcf9b8f0eae6bae285ec74b135fec533e5883563d2400c0cd70902d0a7759e47ac031ccf206ace4e86556da08ed3f1c66dda206e9ccd +"array-differ@npm:^3.0.0": + version: 3.0.0 + resolution: "array-differ@npm:3.0.0" + checksum: 10/117edd9df5c1530bd116c6e8eea891d4bd02850fd89b1b36e532b6540e47ca620a373b81feca1c62d1395d9ae601516ba538abe5e8172d41091da2c546b05fb7 languageName: node linkType: hard -"nopt@npm:^6.0.0": - version: 6.0.0 - resolution: "nopt@npm:6.0.0" - dependencies: - abbrev: "npm:^1.0.0" - bin: - nopt: bin/nopt.js - checksum: 10/3c1128e07cd0241ae66d6e6a472170baa9f3e84dd4203950ba8df5bafac4efa2166ce917a57ef02b01ba7c40d18b2cc64b29b225fd3640791fe07b24f0b33a32 +"array-differ@npm:^4.0.0": + version: 4.0.0 + resolution: "array-differ@npm:4.0.0" + checksum: 10/1de99a06bc3219f96b062a561a4c19af7a68bfaf2c1e0ccedd1d82ce1fbc7757f939e03cf0d3ad76b71f855a8ad2b2a16bf53df331bf5f0c90002774f04fb0b5 languageName: node linkType: hard -"nopt@npm:^7.0.0": - version: 7.1.0 - resolution: "nopt@npm:7.1.0" - dependencies: - abbrev: "npm:^2.0.0" - bin: - nopt: bin/nopt.js - checksum: 10/92d6e425bb18c422ddace4c284ab9c3dc6f50df03902e0030afff33a4aebe5ab6f80bf77b1cdc70adde266678f96f87de4939e211f2e2573904fe5daffbc9d61 +"array-ify@npm:^1.0.0": + version: 1.0.0 + resolution: "array-ify@npm:1.0.0" + checksum: 10/c0502015b319c93dd4484f18036bcc4b654eb76a4aa1f04afbcef11ac918859bb1f5d71ba1f0f1141770db9eef1a4f40f1761753650873068010bbf7bcdae4a4 languageName: node linkType: hard -"nopt@npm:^7.2.1": - version: 7.2.1 - resolution: "nopt@npm:7.2.1" +"array-includes@npm:^3.1.7": + version: 3.1.7 + resolution: "array-includes@npm:3.1.7" dependencies: - abbrev: "npm:^2.0.0" - bin: - nopt: bin/nopt.js - checksum: 10/95a1f6dec8a81cd18cdc2fed93e6f0b4e02cf6bdb4501c848752c6e34f9883d9942f036a5e3b21a699047d8a448562d891e67492df68ec9c373e6198133337ae + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + get-intrinsic: "npm:^1.2.1" + is-string: "npm:^1.0.7" + checksum: 10/856a8be5d118967665936ad33ff3b07adfc50b06753e596e91fb80c3da9b8c022e92e3cc6781156d6ad95db7109b9f603682c7df2d6a529ed01f7f6b39a4a360 languageName: node linkType: hard -"nopt@npm:~1.0.10": - version: 1.0.10 - resolution: "nopt@npm:1.0.10" - dependencies: - abbrev: "npm:1" - bin: - nopt: ./bin/nopt.js - checksum: 10/4f01ad1e144883a190d70bd6003f26e2f3a899230fe1b0f3310e43779c61cab5ae0063a9209912cd52fc4c552b266b38173853aa9abe27ecb04acbdfdca2e9fc +"array-timsort@npm:^1.0.3": + version: 1.0.3 + resolution: "array-timsort@npm:1.0.3" + checksum: 10/f417f073b3733baec3a80decdf5d45bf763f04676ef3610b0e71f9b1d88c6e4c38154c05b28b31529d308bfd0e043d08059fcd9df966245a1276af15b5584936 languageName: node linkType: hard -"normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.5.0": - version: 2.5.0 - resolution: "normalize-package-data@npm:2.5.0" - dependencies: - hosted-git-info: "npm:^2.1.4" - resolve: "npm:^1.10.0" - semver: "npm:2 || 3 || 4 || 5" - validate-npm-package-license: "npm:^3.0.1" - checksum: 10/644f830a8bb9b7cc9bf2f6150618727659ee27cdd0840d1c1f97e8e6cab0803a098a2c19f31c6247ad9d3a0792e61521a13a6e8cd87cc6bb676e3150612c03d4 +"array-union@npm:^2.1.0": + version: 2.1.0 + resolution: "array-union@npm:2.1.0" + checksum: 10/5bee12395cba82da674931df6d0fea23c4aa4660cb3b338ced9f828782a65caa232573e6bf3968f23e0c5eb301764a382cef2f128b170a9dc59de0e36c39f98d languageName: node linkType: hard -"normalize-package-data@npm:^3.0.0, normalize-package-data@npm:^3.0.2": - version: 3.0.3 - resolution: "normalize-package-data@npm:3.0.3" - dependencies: - hosted-git-info: "npm:^4.0.1" - is-core-module: "npm:^2.5.0" - semver: "npm:^7.3.4" - validate-npm-package-license: "npm:^3.0.1" - checksum: 10/3cd3b438c9c7b15d72ed2d1bbf0f8cc2d07bfe27702fc9e95d039f0af4e069dc75c0646e75068f9f9255a8aae64b59aa4fe2177e65787145fb996c3d38d48acb +"array-union@npm:^3.0.1": + version: 3.0.1 + resolution: "array-union@npm:3.0.1" + checksum: 10/47b29f88258e8f37ffb93ddaa327d4308edd950b52943c172b73558afdd3fa74cfd68816ba5aa4b894242cf281fa3c6d0362ae057e4a18bddbaedbe46ebe7112 languageName: node linkType: hard -"normalize-package-data@npm:^5.0.0": - version: 5.0.0 - resolution: "normalize-package-data@npm:5.0.0" +"array.prototype.every@npm:^1.1.4": + version: 1.1.4 + resolution: "array.prototype.every@npm:1.1.4" dependencies: - hosted-git-info: "npm:^6.0.0" - is-core-module: "npm:^2.8.1" - semver: "npm:^7.3.5" - validate-npm-package-license: "npm:^3.0.4" - checksum: 10/477344ee99c6c81afbc4359f9dc7a3a219cc29a37fe0220a4595bbdb7e1e5fa9e3c195e99900228b72d8676edf99eb99fd3b66aa94b4b8ab74d516f2ff60e510 + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.4" + es-abstract: "npm:^1.20.4" + is-string: "npm:^1.0.7" + checksum: 10/1c036bfbdc51aa364d0a98cda80f794c11e56414a3c8e51c89ac30b21faff93dbe860cf4394267b09686ecd3fff046a399ecd4524491a5f6a81db08f8852bccb languageName: node linkType: hard -"normalize-package-data@npm:^6.0.0": - version: 6.0.0 - resolution: "normalize-package-data@npm:6.0.0" +"array.prototype.filter@npm:^1.0.3": + version: 1.0.3 + resolution: "array.prototype.filter@npm:1.0.3" dependencies: - hosted-git-info: "npm:^7.0.0" - is-core-module: "npm:^2.8.1" - semver: "npm:^7.3.5" - validate-npm-package-license: "npm:^3.0.4" - checksum: 10/e31e31a2ebaef93ef107feb9408f105044eeae9cb7d0d4619544ab2323cd4b15ca648b0d558ac29db2fece161c7b8658206bb27ebe9340df723f7174b3e2759d + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + es-array-method-boxes-properly: "npm:^1.0.0" + is-string: "npm:^1.0.7" + checksum: 10/3da2189afb00f95559cc73fc3c50f17a071a65bb705c0b2f2e2a2b2142781215b622442368c8b4387389b6ab251adf09ad347f9a8a4cf29d24404cc5ea1e295c languageName: node linkType: hard -"normalize-package-data@npm:^6.0.1": - version: 6.0.2 - resolution: "normalize-package-data@npm:6.0.2" +"array.prototype.findlastindex@npm:^1.2.3": + version: 1.2.4 + resolution: "array.prototype.findlastindex@npm:1.2.4" dependencies: - hosted-git-info: "npm:^7.0.0" - semver: "npm:^7.3.5" - validate-npm-package-license: "npm:^3.0.4" - checksum: 10/7c4216a2426aa76c0197f8372f06b23a0484d62b3518fb5c0f6ebccb16376bdfab29ceba96f95c75f60506473198f1337fe337b945c8df0541fe32b8049ab4c9 + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.22.3" + es-errors: "npm:^1.3.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/12d7de8da619065b9d4c40550d11c13f2fbbc863c4270ef01d022f49ef16fbe9022441ee9d60b1e952853c661dd4b3e05c21e4348d4631c6d93ddf802a252296 languageName: node linkType: hard -"normalize-path@npm:^2.0.1": - version: 2.1.1 - resolution: "normalize-path@npm:2.1.1" +"array.prototype.flat@npm:^1.3.2": + version: 1.3.2 + resolution: "array.prototype.flat@npm:1.3.2" dependencies: - remove-trailing-separator: "npm:^1.0.1" - checksum: 10/7e9cbdcf7f5b8da7aa191fbfe33daf290cdcd8c038f422faf1b8a83c972bf7a6d94c5be34c4326cb00fb63bc0fd97d9fbcfaf2e5d6142332c2cd36d2e1b86cea + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + es-shim-unscopables: "npm:^1.0.0" + checksum: 10/d9d2f6f27584de92ec7995bc931103e6de722cd2498bdbfc4cba814fc3e52f056050a93be883018811f7c0a35875f5056584a0e940603a5e5934f0279896aebe languageName: node linkType: hard -"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": - version: 3.0.0 - resolution: "normalize-path@npm:3.0.0" - checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 +"array.prototype.flatmap@npm:^1.3.2": + version: 1.3.2 + resolution: "array.prototype.flatmap@npm:1.3.2" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + es-shim-unscopables: "npm:^1.0.0" + checksum: 10/33f20006686e0cbe844fde7fd290971e8366c6c5e3380681c2df15738b1df766dd02c7784034aeeb3b037f65c496ee54de665388288edb323a2008bb550f77ea languageName: node linkType: hard -"normalize-range@npm:^0.1.2": - version: 0.1.2 - resolution: "normalize-range@npm:0.1.2" - checksum: 10/9b2f14f093593f367a7a0834267c24f3cb3e887a2d9809c77d8a7e5fd08738bcd15af46f0ab01cc3a3d660386f015816b5c922cea8bf2ee79777f40874063184 +"arraybuffer.prototype.slice@npm:^1.0.1": + version: 1.0.1 + resolution: "arraybuffer.prototype.slice@npm:1.0.1" + dependencies: + array-buffer-byte-length: "npm:^1.0.0" + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + get-intrinsic: "npm:^1.2.1" + is-array-buffer: "npm:^3.0.2" + is-shared-array-buffer: "npm:^1.0.2" + checksum: 10/e3e9b2a3e988ebfeddce4c7e8f69df730c9e48cb04b0d40ff0874ce3d86b3d1339dd520ffde5e39c02610bc172ecfbd4bc93324b1cabd9554c44a56b131ce0ce languageName: node linkType: hard -"normalize-url@npm:^4.1.0": - version: 4.5.1 - resolution: "normalize-url@npm:4.5.1" - checksum: 10/20ced2845fcfaa46da74efc0aa39b7bed22f3db39e6e8b844261613082a36a2dcd468decad89fa9313b5464bebab4034f96bda7880e8fc468027fecf6a6fa254 +"arraybuffer.prototype.slice@npm:^1.0.3": + version: 1.0.3 + resolution: "arraybuffer.prototype.slice@npm:1.0.3" + dependencies: + array-buffer-byte-length: "npm:^1.0.1" + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.22.3" + es-errors: "npm:^1.2.1" + get-intrinsic: "npm:^1.2.3" + is-array-buffer: "npm:^3.0.4" + is-shared-array-buffer: "npm:^1.0.2" + checksum: 10/0221f16c1e3ec7b67da870ee0e1f12b825b5f9189835392b59a22990f715827561a4f4cd5330dc7507de272d8df821be6cd4b0cb569babf5ea4be70e365a2f3d languageName: node linkType: hard -"normalize-url@npm:^6.0.1": - version: 6.1.0 - resolution: "normalize-url@npm:6.1.0" - checksum: 10/5ae699402c9d5ffa330adc348fcd6fc6e6a155ab7c811b96e30b7ecab60ceef821d8f86443869671dda71bbc47f4b9625739c82ad247e883e9aefe875bfb8659 +"arrify@npm:^1.0.1": + version: 1.0.1 + resolution: "arrify@npm:1.0.1" + checksum: 10/745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 languageName: node linkType: hard -"normalize-url@npm:^8.0.0": - version: 8.0.0 - resolution: "normalize-url@npm:8.0.0" - checksum: 10/4347d6ee39d9e1e7138c9e7c0b459c1e07304d9cd7c62d92c1ca01ed1f0c5397b292079fe7cfa953f469722ae150eec82e14b97e2175af39ede0b58f99ef8cac +"arrify@npm:^2.0.1": + version: 2.0.1 + resolution: "arrify@npm:2.0.1" + checksum: 10/067c4c1afd182806a82e4c1cb8acee16ab8b5284fbca1ce29408e6e91281c36bb5b612f6ddfbd40a0f7a7e0c75bf2696eb94c027f6e328d6e9c52465c98e4209 languageName: node linkType: hard -"npm-bundled@npm:^3.0.0": +"arrify@npm:^3.0.0": version: 3.0.0 - resolution: "npm-bundled@npm:3.0.0" - dependencies: - npm-normalize-package-bin: "npm:^3.0.0" - checksum: 10/704fce20114d36d665c20edc56d3f9f7778c52ca1cd48731ec31f65af9e65805f9308ca7ed9e5a6bd9fe22327a63aa5d83a8c5aaee0c715e5047de1fa659e8bf + resolution: "arrify@npm:3.0.0" + checksum: 10/d6c6f3dad9571234f320e130d57fddb2cc283c87f2ac7df6c7005dffc5161b7bb9376f4be655ed257050330336e84afc4f3020d77696ad231ff580a94ae5aba6 languageName: node linkType: hard -"npm-install-checks@npm:^6.0.0": - version: 6.1.0 - resolution: "npm-install-checks@npm:6.1.0" +"asn1.js@npm:^4.10.1": + version: 4.10.1 + resolution: "asn1.js@npm:4.10.1" dependencies: - semver: "npm:^7.1.1" - checksum: 10/efbb4deac45bfe18ab8f619801f736f675ee9f80a60eeafc9fbf8f4657816b67d8e1b1a8dc50d47ee4226727f96e111974a752c4861e1aef1cc2e2ed70581e7c + bn.js: "npm:^4.0.0" + inherits: "npm:^2.0.1" + minimalistic-assert: "npm:^1.0.0" + checksum: 10/5a02104b9ba167917c786a3fdac9840a057d29e6b609250e6af924d0529ead1a32417da13eec809cadea8f991eb67782196f3df427c5b4f30eaf22044fc64fda languageName: node linkType: hard -"npm-install-checks@npm:^6.2.0": - version: 6.2.0 - resolution: "npm-install-checks@npm:6.2.0" +"asn1.js@npm:^5.0.1, asn1.js@npm:^5.2.0": + version: 5.4.1 + resolution: "asn1.js@npm:5.4.1" dependencies: - semver: "npm:^7.1.1" - checksum: 10/2f91f71e07111ef89c6f4ad37b89933322567be51ca3a4ec5e972cc5edbc8d1ac6059f3b8904d2bab9893df1567366230eda3d0fe3bcf0de610c48f3f57f17a8 + bn.js: "npm:^4.0.0" + inherits: "npm:^2.0.1" + minimalistic-assert: "npm:^1.0.0" + safer-buffer: "npm:^2.1.0" + checksum: 10/63d57c766f6afc81ff175bbf922626b3778d770c8b91b32cbcf672d7bf73b4198aca66c60a6427bff3aebc48feff1eab4a161f2681b7300b6c5b775a1e6fd791 languageName: node linkType: hard -"npm-normalize-package-bin@npm:^3.0.0": - version: 3.0.0 - resolution: "npm-normalize-package-bin@npm:3.0.0" - checksum: 10/6a34886c150b0f5302aad52a9446e5c939aa14eeb462323e75681517b36c6b9eaef83e1f5bc2d7e5154b3b752cbce81bed05e290db3f1f7edf857cbb895e35c0 +"assert@npm:^2.0.0": + version: 2.0.0 + resolution: "assert@npm:2.0.0" + dependencies: + es6-object-assign: "npm:^1.1.0" + is-nan: "npm:^1.2.1" + object-is: "npm:^1.0.1" + util: "npm:^0.12.0" + checksum: 10/5bd5e80a0dc5fce9ac812254ad39bcec8c224878705e5021a1a0ae84e2c30b980f90584ef544a5f6b1cd79edb002e80972367731260dac723c7a6f76e0fcd2ea languageName: node linkType: hard -"npm-package-arg@npm:10.1.0, npm-package-arg@npm:^10.0.0": - version: 10.1.0 - resolution: "npm-package-arg@npm:10.1.0" - dependencies: - hosted-git-info: "npm:^6.0.0" - proc-log: "npm:^3.0.0" - semver: "npm:^7.3.5" - validate-npm-package-name: "npm:^5.0.0" - checksum: 10/3bbb5f081099f73e852b4d3a3a10f78d495bdf21e050ca5c78dc134921c99ec856d1555ff6ba9c1c15b7475ad976ce803ef53fdda34abec622fe8f5d76421319 +"ast-module-types@npm:^5.0.0": + version: 5.0.0 + resolution: "ast-module-types@npm:5.0.0" + checksum: 10/188a0c331929962c7ea0d9174b31393d31b0f9d5cc3bb3ad1dcb6f94c611eddfff10194104f247f1cba03f0bb9a2b5c757e619f5a5940333f60b8a12a7db244d languageName: node linkType: hard -"npm-package-arg@npm:11.0.1, npm-package-arg@npm:^11.0.0": - version: 11.0.1 - resolution: "npm-package-arg@npm:11.0.1" - dependencies: - hosted-git-info: "npm:^7.0.0" - proc-log: "npm:^3.0.0" - semver: "npm:^7.3.5" - validate-npm-package-name: "npm:^5.0.0" - checksum: 10/a16e632703e106b3e9a6b4902d14a3493c8371745bcf8ba8f4ea9f152e12d5ed927487931e9adf817d05ba97b04941b33fec1d140dbd7da09181b546fde35b3c +"astral-regex@npm:^2.0.0": + version: 2.0.0 + resolution: "astral-regex@npm:2.0.0" + checksum: 10/876231688c66400473ba505731df37ea436e574dd524520294cc3bbc54ea40334865e01fa0d074d74d036ee874ee7e62f486ea38bc421ee8e6a871c06f011766 languageName: node linkType: hard -"npm-package-arg@npm:^11.0.2": - version: 11.0.2 - resolution: "npm-package-arg@npm:11.0.2" - dependencies: - hosted-git-info: "npm:^7.0.0" - proc-log: "npm:^4.0.0" - semver: "npm:^7.3.5" - validate-npm-package-name: "npm:^5.0.0" - checksum: 10/ce4c51900a73aadb408c9830c38a61b1930e1ab08509ec5ebbcf625ad14326ee33b014df289c942039bd28071ab17e813368f68d26a4ccad0eb6e9928f8ad03c +"async-hook-domain@npm:^2.0.4": + version: 2.0.4 + resolution: "async-hook-domain@npm:2.0.4" + checksum: 10/a4fda54d73da08d73f6b6e636e112e5963ae00ede8b57049a2b1de2aac9f5692e3383027a196ffc3f7b88b37aa26b35b2c3c8ee710b8cc215f3c3cdbb221764f languageName: node linkType: hard -"npm-packlist@npm:^7.0.0": - version: 7.0.4 - resolution: "npm-packlist@npm:7.0.4" - dependencies: - ignore-walk: "npm:^6.0.0" - checksum: 10/b24644eefa21d33c55a8f49c64eda4b06edfb7d25853be8ded7346e73c6c447be8a0482314b74f04f94e3f5712e467505dc030826ba55a71d1b948459fad6486 +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: 10/3ce727cbc78f69d6a4722517a58ee926c8c21083633b1d3fdf66fd688f6c127a53a592141bd4866f9b63240a86e9d8e974b13919450bd17fa33c2d22c4558ad8 languageName: node linkType: hard -"npm-packlist@npm:^8.0.0": - version: 8.0.0 - resolution: "npm-packlist@npm:8.0.0" - dependencies: - ignore-walk: "npm:^6.0.0" - checksum: 10/64bd475183761903e766c8c0a2008cd2b7564e841f3681930020c75cb92929b2331f9de7768530eb7c2b5f45fdf9b9febf4cdfb7b8f6279b95a1fb9d93fadc6b +"auto-bind@npm:4.0.0": + version: 4.0.0 + resolution: "auto-bind@npm:4.0.0" + checksum: 10/00cad71cce5742faccb7dd65c1b55ebc4f45add4b0c9a1547b10b05bab22813230133b0c892c67ba3eb969a4524710c5e43cc45c72898ec84e56f3a596e7a04f languageName: node linkType: hard -"npm-packlist@npm:^8.0.2": - version: 8.0.2 - resolution: "npm-packlist@npm:8.0.2" - dependencies: - ignore-walk: "npm:^6.0.4" - checksum: 10/707206e5c09a1b8aa04e590592715ba5ab8732add1bbb5eeaff54b9c6b2740764c9e94c99e390c13245970b51c2cc92b8d44594c2784fcd96f255c7109622322 +"available-typed-arrays@npm:^1.0.5": + version: 1.0.5 + resolution: "available-typed-arrays@npm:1.0.5" + checksum: 10/4d4d5e86ea0425696f40717882f66a570647b94ac8d273ddc7549a9b61e5da099e149bf431530ccbd776bd74e02039eb8b5edf426e3e2211ee61af16698a9064 languageName: node linkType: hard -"npm-pick-manifest@npm:8.0.1, npm-pick-manifest@npm:^8.0.0": - version: 8.0.1 - resolution: "npm-pick-manifest@npm:8.0.1" +"available-typed-arrays@npm:^1.0.6, available-typed-arrays@npm:^1.0.7": + version: 1.0.7 + resolution: "available-typed-arrays@npm:1.0.7" dependencies: - npm-install-checks: "npm:^6.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - npm-package-arg: "npm:^10.0.0" - semver: "npm:^7.3.5" - checksum: 10/ffa69b86292f1270efb93e50ae2d218017dd0a278ae3704b0a9d4add4934283e49fa711475c87be49caa3964b66b62b7cc982e17526807d7586b3922a8698e2e + possible-typed-array-names: "npm:^1.0.0" + checksum: 10/6c9da3a66caddd83c875010a1ca8ef11eac02ba15fb592dc9418b2b5e7b77b645fa7729380a92d9835c2f05f2ca1b6251f39b993e0feb3f1517c74fa1af02cab languageName: node linkType: hard -"npm-pick-manifest@npm:9.0.0, npm-pick-manifest@npm:^9.0.0": - version: 9.0.0 - resolution: "npm-pick-manifest@npm:9.0.0" +"axios@npm:>=0.27.2": + version: 1.7.2 + resolution: "axios@npm:1.7.2" dependencies: - npm-install-checks: "npm:^6.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - npm-package-arg: "npm:^11.0.0" - semver: "npm:^7.3.5" - checksum: 10/29dca2a838ed35c714df1a76f76616df2df51ce31bc3ca5943a0668b2eca2a5aab448f9f89cadf7a77eb5e3831c554cebaf7802f3e432838acb34c1a74fa2786 + follow-redirects: "npm:^1.15.6" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: 10/6ae80dda9736bb4762ce717f1a26ff997d94672d3a5799ad9941c24d4fb019c1dff45be8272f08d1975d7950bac281f3ba24aff5ecd49ef5a04d872ec428782f languageName: node linkType: hard -"npm-pick-manifest@npm:^9.0.1": - version: 9.0.1 - resolution: "npm-pick-manifest@npm:9.0.1" +"babel-jest@npm:^29.6.2": + version: 29.6.2 + resolution: "babel-jest@npm:29.6.2" dependencies: - npm-install-checks: "npm:^6.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - npm-package-arg: "npm:^11.0.0" - semver: "npm:^7.3.5" - checksum: 10/870053b63c8765a5d22df3aabcf09505342dd30398c68e15a57cc32e9da629c361b12285d72bd0bac100786623d2f2dc5ced16270f39dda7c14660fae677590e + "@jest/transform": "npm:^29.6.2" + "@types/babel__core": "npm:^7.1.14" + babel-plugin-istanbul: "npm:^6.1.1" + babel-preset-jest: "npm:^29.5.0" + chalk: "npm:^4.0.0" + graceful-fs: "npm:^4.2.9" + slash: "npm:^3.0.0" + peerDependencies: + "@babel/core": ^7.8.0 + checksum: 10/d1860f1c0ede72c3c246906e7ded535e25b1f8b4ac39a74e6d555ec7dd5f0ae7541cf0bc172588f9fed4a11a64eed9eda9688d23403577b36a9e97dc609b9b0a languageName: node linkType: hard -"npm-registry-fetch@npm:^14.0.0": - version: 14.0.3 - resolution: "npm-registry-fetch@npm:14.0.3" +"babel-plugin-istanbul@npm:^6.1.1": + version: 6.1.1 + resolution: "babel-plugin-istanbul@npm:6.1.1" dependencies: - make-fetch-happen: "npm:^11.0.0" - minipass: "npm:^4.0.0" - minipass-fetch: "npm:^3.0.0" - minipass-json-stream: "npm:^1.0.1" - minizlib: "npm:^2.1.2" - npm-package-arg: "npm:^10.0.0" - proc-log: "npm:^3.0.0" - checksum: 10/0332e0e7a1798d897b5525a208136a4f74146038804b058c966b482650d6c4941706fb731a70a64e1c51fa720e0c791d6d3244c00d1026d957df08e0112a7233 + "@babel/helper-plugin-utils": "npm:^7.0.0" + "@istanbuljs/load-nyc-config": "npm:^1.0.0" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-instrument: "npm:^5.0.4" + test-exclude: "npm:^6.0.0" + checksum: 10/ffd436bb2a77bbe1942a33245d770506ab2262d9c1b3c1f1da7f0592f78ee7445a95bc2efafe619dd9c1b6ee52c10033d6c7d29ddefe6f5383568e60f31dfe8d languageName: node linkType: hard -"npm-registry-fetch@npm:^16.0.0": - version: 16.2.1 - resolution: "npm-registry-fetch@npm:16.2.1" +"babel-plugin-jest-hoist@npm:^29.5.0": + version: 29.5.0 + resolution: "babel-plugin-jest-hoist@npm:29.5.0" dependencies: - "@npmcli/redact": "npm:^1.1.0" - make-fetch-happen: "npm:^13.0.0" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^3.0.0" - minipass-json-stream: "npm:^1.0.1" - minizlib: "npm:^2.1.2" - npm-package-arg: "npm:^11.0.0" - proc-log: "npm:^4.0.0" - checksum: 10/eb5a939f8f1c187b8d739e41bbc37f5d376480e2479f61a4f55af5aa00262a9a55e0053a0cd673d2945716863aaef6afbf97ebbb33fb194259573151c4dff37b + "@babel/template": "npm:^7.3.3" + "@babel/types": "npm:^7.3.3" + "@types/babel__core": "npm:^7.1.14" + "@types/babel__traverse": "npm:^7.0.6" + checksum: 10/18066c177da855f478178bd2a48fa1c131d31f15c04af8c732bb4c7eb5c952fde8ac9b11133e5ddd5b74aed92c6a833fbfde51cc5dec1f7169bf865b548da680 languageName: node linkType: hard -"npm-registry-fetch@npm:^17.0.0, npm-registry-fetch@npm:^17.0.1, npm-registry-fetch@npm:^17.1.0": - version: 17.1.0 - resolution: "npm-registry-fetch@npm:17.1.0" +"babel-preset-current-node-syntax@npm:^1.0.0": + version: 1.0.1 + resolution: "babel-preset-current-node-syntax@npm:1.0.1" dependencies: - "@npmcli/redact": "npm:^2.0.0" - jsonparse: "npm:^1.3.1" - make-fetch-happen: "npm:^13.0.0" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^3.0.0" - minizlib: "npm:^2.1.2" - npm-package-arg: "npm:^11.0.0" - proc-log: "npm:^4.0.0" - checksum: 10/b9b2a73907fb5b2d8187031e040d7b2918f2b127ac858a84bd244f6435d16dd04df23c9660f32d7e9deb0216b91071623f040fd51b0bd375e8c7fed7d7a82a1c + "@babel/plugin-syntax-async-generators": "npm:^7.8.4" + "@babel/plugin-syntax-bigint": "npm:^7.8.3" + "@babel/plugin-syntax-class-properties": "npm:^7.8.3" + "@babel/plugin-syntax-import-meta": "npm:^7.8.3" + "@babel/plugin-syntax-json-strings": "npm:^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.8.3" + "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" + "@babel/plugin-syntax-numeric-separator": "npm:^7.8.3" + "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" + "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" + "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" + "@babel/plugin-syntax-top-level-await": "npm:^7.8.3" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/94561959cb12bfa80867c9eeeace7c3d48d61707d33e55b4c3fdbe82fc745913eb2dbfafca62aef297421b38aadcb58550e5943f50fbcebbeefd70ce2bed4b74 languageName: node linkType: hard -"npm-run-all2@npm:6.1.2": - version: 6.1.2 - resolution: "npm-run-all2@npm:6.1.2" +"babel-preset-jest@npm:^29.5.0": + version: 29.5.0 + resolution: "babel-preset-jest@npm:29.5.0" dependencies: - ansi-styles: "npm:^6.2.1" - cross-spawn: "npm:^7.0.3" - memorystream: "npm:^0.3.1" - minimatch: "npm:^9.0.0" - pidtree: "npm:^0.6.0" - read-package-json-fast: "npm:^3.0.2" - shell-quote: "npm:^1.7.3" - bin: - npm-run-all: bin/npm-run-all/index.js - npm-run-all2: bin/npm-run-all/index.js - run-p: bin/run-p/index.js - run-s: bin/run-s/index.js - checksum: 10/b031f409a8c7144cd4dc6ef7cbe6007c9c78b1df38e32d2b5049e697f204d13145dcd419656f313a5afce44c9148a77ed87cf050ff98ceff75cc3553d031b896 + babel-plugin-jest-hoist: "npm:^29.5.0" + babel-preset-current-node-syntax: "npm:^1.0.0" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/5566ca2762766c9319b4973d018d2fa08c0fcf6415c72cc54f4c8e7199e851ea8f5e6c6730f03ed7ed44fc8beefa959dd15911f2647dee47c615ff4faeddb1ad languageName: node linkType: hard -"npm-run-all@npm:4.1.5": - version: 4.1.5 - resolution: "npm-run-all@npm:4.1.5" - dependencies: - ansi-styles: "npm:^3.2.1" - chalk: "npm:^2.4.1" - cross-spawn: "npm:^6.0.5" - memorystream: "npm:^0.3.1" - minimatch: "npm:^3.0.4" - pidtree: "npm:^0.3.0" - read-pkg: "npm:^3.0.0" - shell-quote: "npm:^1.6.1" - string.prototype.padend: "npm:^3.0.0" - bin: - npm-run-all: bin/npm-run-all/index.js - run-p: bin/run-p/index.js - run-s: bin/run-s/index.js - checksum: 10/46020e92813223d015f4178cce5a2338164be5f25b0c391e256c0e84ac082544986c220013f1be7f002dcac07b81c7ee0cb5c5c30b84fd6ebb6de96a8d713745 +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10/9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 languageName: node linkType: hard -"npm-run-path@npm:^2.0.0": - version: 2.0.2 - resolution: "npm-run-path@npm:2.0.2" - dependencies: - path-key: "npm:^2.0.0" - checksum: 10/acd5ad81648ba4588ba5a8effb1d98d2b339d31be16826a118d50f182a134ac523172101b82eab1d01cb4c2ba358e857d54cfafd8163a1ffe7bd52100b741125 +"base64-js@npm:^1.3.1": + version: 1.5.1 + resolution: "base64-js@npm:1.5.1" + checksum: 10/669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005 languageName: node linkType: hard -"npm-run-path@npm:^4.0.0, npm-run-path@npm:^4.0.1": - version: 4.0.1 - resolution: "npm-run-path@npm:4.0.1" - dependencies: - path-key: "npm:^3.0.0" - checksum: 10/5374c0cea4b0bbfdfae62da7bbdf1e1558d338335f4cacf2515c282ff358ff27b2ecb91ffa5330a8b14390ac66a1e146e10700440c1ab868208430f56b5f4d23 +"base64id@npm:2.0.0, base64id@npm:~2.0.0": + version: 2.0.0 + resolution: "base64id@npm:2.0.0" + checksum: 10/e3312328429e512b0713469c5312f80b447e71592cae0a5bddf3f1adc9c89d1b2ed94156ad7bb9f529398f310df7ff6f3dbe9550735c6a759f247c088ea67364 languageName: node linkType: hard -"npm-run-path@npm:^5.1.0": - version: 5.1.0 - resolution: "npm-run-path@npm:5.1.0" - dependencies: - path-key: "npm:^4.0.0" - checksum: 10/dc184eb5ec239d6a2b990b43236845332ef12f4e0beaa9701de724aa797fe40b6bbd0157fb7639d24d3ab13f5d5cf22d223a19c6300846b8126f335f788bee66 +"before-after-hook@npm:^3.0.2": + version: 3.0.2 + resolution: "before-after-hook@npm:3.0.2" + checksum: 10/57dfee78930276a740559552460a83f31c605e0164f02f170f71352aa1f4f5fb2c1632ac3bcba06ba711c32bd88b7e3c82431428e0c4984fbd2336faa78cf08c languageName: node linkType: hard -"npm-watch@npm:0.11.0": - version: 0.11.0 - resolution: "npm-watch@npm:0.11.0" +"benchmark@npm:2.1.4": + version: 2.1.4 + resolution: "benchmark@npm:2.1.4" dependencies: - nodemon: "npm:^2.0.7" - through2: "npm:^4.0.2" - bin: - npm-watch: cli.js - checksum: 10/004663835ff84e7d9390b47ab05508d2e216e452171d6474b8a3f805104894280fd8e53d69a0b378fdeea253028ff402173d9964743f5a2552109b22fd1ebc89 + lodash: "npm:^4.17.4" + platform: "npm:^1.3.3" + checksum: 10/0f42f865aeb8b79992bb6204874312f9cb384e122f4fd3b20ba6d0bc7cff003610400fb37e52580a7b4aec4a3d1291c51b5ff887691b1abc80e9df4ff032a675 languageName: node linkType: hard -"npmlog@npm:^5.0.1": - version: 5.0.1 - resolution: "npmlog@npm:5.0.1" +"bin-links@npm:^4.0.4": + version: 4.0.4 + resolution: "bin-links@npm:4.0.4" dependencies: - are-we-there-yet: "npm:^2.0.0" - console-control-strings: "npm:^1.1.0" - gauge: "npm:^3.0.0" - set-blocking: "npm:^2.0.0" - checksum: 10/f42c7b9584cdd26a13c41a21930b6f5912896b6419ab15be88cc5721fc792f1c3dd30eb602b26ae08575694628ba70afdcf3675d86e4f450fc544757e52726ec + cmd-shim: "npm:^6.0.0" + npm-normalize-package-bin: "npm:^3.0.0" + read-cmd-shim: "npm:^4.0.0" + write-file-atomic: "npm:^5.0.0" + checksum: 10/58d62143aacdbb783b076e9bdd970d8470f2750e1076d6fd1ae559fa532c4647478dd2550a911ba22d4c9e6339881451046e2fbc4b8958f4bf3bf8e5144d1e4d languageName: node linkType: hard -"npmlog@npm:^6.0.0": - version: 6.0.2 - resolution: "npmlog@npm:6.0.2" - dependencies: - are-we-there-yet: "npm:^3.0.0" - console-control-strings: "npm:^1.1.0" - gauge: "npm:^4.0.3" - set-blocking: "npm:^2.0.0" - checksum: 10/82b123677e62deb9e7472e27b92386c09e6e254ee6c8bcd720b3011013e4168bc7088e984f4fbd53cb6e12f8b4690e23e4fa6132689313e0d0dc4feea45489bb +"binary-extensions@npm:^2.0.0": + version: 2.2.0 + resolution: "binary-extensions@npm:2.2.0" + checksum: 10/ccd267956c58d2315f5d3ea6757cf09863c5fc703e50fbeb13a7dc849b812ef76e3cf9ca8f35a0c48498776a7478d7b4a0418e1e2b8cb9cb9731f2922aaad7f8 languageName: node linkType: hard -"nth-check@npm:>=2.0.1": - version: 2.1.1 - resolution: "nth-check@npm:2.1.1" +"bind-obj-methods@npm:^3.0.0": + version: 3.0.0 + resolution: "bind-obj-methods@npm:3.0.0" + checksum: 10/107ab8428da9cfc86623357b0b558a612f84840daccee906bda92e2d01b0cb6e09f0248856e52900dfa47c611fe636dfb7af64e1f02f68f96c76bcadb9cec680 + languageName: node + linkType: hard + +"bl@npm:^4.1.0": + version: 4.1.0 + resolution: "bl@npm:4.1.0" dependencies: - boolbase: "npm:^1.0.0" - checksum: 10/5afc3dafcd1573b08877ca8e6148c52abd565f1d06b1eb08caf982e3fa289a82f2cae697ffb55b5021e146d60443f1590a5d6b944844e944714a5b549675bcd3 + buffer: "npm:^5.5.0" + inherits: "npm:^2.0.4" + readable-stream: "npm:^3.4.0" + checksum: 10/b7904e66ed0bdfc813c06ea6c3e35eafecb104369dbf5356d0f416af90c1546de3b74e5b63506f0629acf5e16a6f87c3798f16233dcff086e9129383aa02ab55 languageName: node linkType: hard -"number-is-nan@npm:^1.0.0": - version: 1.0.1 - resolution: "number-is-nan@npm:1.0.1" - checksum: 10/13656bc9aa771b96cef209ffca31c31a03b507ca6862ba7c3f638a283560620d723d52e626d57892c7fff475f4c36ac07f0600f14544692ff595abff214b9ffb +"bn.js@npm:^4.0.0, bn.js@npm:^4.1.0, bn.js@npm:^4.11.8, bn.js@npm:^4.11.9": + version: 4.12.0 + resolution: "bn.js@npm:4.12.0" + checksum: 10/10f8db196d3da5adfc3207d35d0a42aa29033eb33685f20ba2c36cadfe2de63dad05df0a20ab5aae01b418d1c4b3d4d205273085262fa020d17e93ff32b67527 languageName: node linkType: hard -"number-to-bn@npm:1.7.0": - version: 1.7.0 - resolution: "number-to-bn@npm:1.7.0" - dependencies: - bn.js: "npm:4.11.6" - strip-hex-prefix: "npm:1.0.0" - checksum: 10/702e8f00b6b90abd23f711056005179c3bd5ce3b063c47d468250f63ab3b9b4b82e27bff3b4642a9e71e06c717d5ed359873501746df0a64c3db1fa6d704e704 +"bn.js@npm:^5.0.0": + version: 5.2.0 + resolution: "bn.js@npm:5.2.0" + checksum: 10/37052dad02242b70e21f59b52642d67521d160239964a7f5653d86d856f9c4936aee229a66b69e6864e020f41e934ede9ddd0f873b23cffee42c132163558c2a languageName: node linkType: hard -"nwsapi@npm:^2.2.0": - version: 2.2.7 - resolution: "nwsapi@npm:2.2.7" - checksum: 10/22c002080f0297121ad138aba5a6509e724774d6701fe2c4777627bd939064ecd9e1b6dc1c2c716bb7ca0b9f16247892ff2f664285202ac7eff6ec9543725320 +"bn.js@npm:^5.2.1": + version: 5.2.1 + resolution: "bn.js@npm:5.2.1" + checksum: 10/7a7e8764d7a6e9708b8b9841b2b3d6019cc154d2fc23716d0efecfe1e16921b7533c6f7361fb05471eab47986c4aa310c270f88e3507172104632ac8df2cfd84 languageName: node linkType: hard -"nyc@npm:12.0.2": - version: 12.0.2 - resolution: "nyc@npm:12.0.2" +"boxen@npm:^5.0.0": + version: 5.1.2 + resolution: "boxen@npm:5.1.2" dependencies: - archy: "npm:^1.0.0" - arrify: "npm:^1.0.1" - caching-transform: "npm:^1.0.0" - convert-source-map: "npm:^1.5.1" - debug-log: "npm:^1.0.1" - default-require-extensions: "npm:^1.0.0" - find-cache-dir: "npm:^0.1.1" - find-up: "npm:^2.1.0" - foreground-child: "npm:^1.5.3" - glob: "npm:^7.0.6" - istanbul-lib-coverage: "npm:^1.2.0" - istanbul-lib-hook: "npm:^1.1.0" - istanbul-lib-instrument: "npm:^2.1.0" - istanbul-lib-report: "npm:^1.1.3" - istanbul-lib-source-maps: "npm:^1.2.5" - istanbul-reports: "npm:^1.4.1" - md5-hex: "npm:^1.2.0" - merge-source-map: "npm:^1.1.0" - micromatch: "npm:^3.1.10" - mkdirp: "npm:^0.5.0" - resolve-from: "npm:^2.0.0" - rimraf: "npm:^2.6.2" - signal-exit: "npm:^3.0.1" - spawn-wrap: "npm:^1.4.2" - test-exclude: "npm:^4.2.0" - yargs: "npm:11.1.0" - yargs-parser: "npm:^8.0.0" - bin: - nyc: ./bin/nyc.js - checksum: 10/65d2f9b77f62f59b10ad3edb31995d548d51f97e7eb08e5246bec2dc669b919d95ceed5c674646d0d5944e97703c7b7860ca960202fc6aac64b90ffc95ee54d5 + ansi-align: "npm:^3.0.0" + camelcase: "npm:^6.2.0" + chalk: "npm:^4.1.0" + cli-boxes: "npm:^2.2.1" + string-width: "npm:^4.2.2" + type-fest: "npm:^0.20.2" + widest-line: "npm:^3.1.0" + wrap-ansi: "npm:^7.0.0" + checksum: 10/bc3d3d88d77dc8cabb0811844acdbd4805e8ca8011222345330817737042bf6f86d93eb74a3f7e0cab634e64ef69db03cf52b480761ed90a965de0c8ff1bea8c languageName: node linkType: hard -"nyc@npm:13.1.0": - version: 13.1.0 - resolution: "nyc@npm:13.1.0" +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" dependencies: - archy: "npm:^1.0.0" - arrify: "npm:^1.0.1" - caching-transform: "npm:^2.0.0" - convert-source-map: "npm:^1.6.0" - debug-log: "npm:^1.0.1" - find-cache-dir: "npm:^2.0.0" - find-up: "npm:^3.0.0" - foreground-child: "npm:^1.5.6" - glob: "npm:^7.1.3" - istanbul-lib-coverage: "npm:^2.0.1" - istanbul-lib-hook: "npm:^2.0.1" - istanbul-lib-instrument: "npm:^3.0.0" - istanbul-lib-report: "npm:^2.0.2" - istanbul-lib-source-maps: "npm:^2.0.1" - istanbul-reports: "npm:^2.0.1" - make-dir: "npm:^1.3.0" - merge-source-map: "npm:^1.1.0" - resolve-from: "npm:^4.0.0" - rimraf: "npm:^2.6.2" - signal-exit: "npm:^3.0.2" - spawn-wrap: "npm:^1.4.2" - test-exclude: "npm:^5.0.0" - uuid: "npm:^3.3.2" - yargs: "npm:11.1.0" - yargs-parser: "npm:^9.0.2" - bin: - nyc: ./bin/nyc.js - checksum: 10/30e4247e5d2fae022d327eb55286d9f60f14334664be93ef222f786a527a7bd25160efe70bf218539f6e694e34fb98f58272730fd1be01d12c050092dd3742a3 + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10/faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 languageName: node linkType: hard -"nyc@npm:^15.1.0": - version: 15.1.0 - resolution: "nyc@npm:15.1.0" - dependencies: - "@istanbuljs/load-nyc-config": "npm:^1.0.0" - "@istanbuljs/schema": "npm:^0.1.2" - caching-transform: "npm:^4.0.0" - convert-source-map: "npm:^1.7.0" - decamelize: "npm:^1.2.0" - find-cache-dir: "npm:^3.2.0" - find-up: "npm:^4.1.0" - foreground-child: "npm:^2.0.0" - get-package-type: "npm:^0.1.0" - glob: "npm:^7.1.6" - istanbul-lib-coverage: "npm:^3.0.0" - istanbul-lib-hook: "npm:^3.0.0" - istanbul-lib-instrument: "npm:^4.0.0" - istanbul-lib-processinfo: "npm:^2.0.2" - istanbul-lib-report: "npm:^3.0.0" - istanbul-lib-source-maps: "npm:^4.0.0" - istanbul-reports: "npm:^3.0.2" - make-dir: "npm:^3.0.0" - node-preload: "npm:^0.2.1" - p-map: "npm:^3.0.0" - process-on-spawn: "npm:^1.0.0" - resolve-from: "npm:^5.0.0" - rimraf: "npm:^3.0.0" - signal-exit: "npm:^3.0.2" - spawn-wrap: "npm:^2.0.0" - test-exclude: "npm:^6.0.0" - yargs: "npm:^15.0.2" - bin: - nyc: bin/nyc.js - checksum: 10/c987f04f4192dfd94e9e69869c76a54220b3ed555016751f380a413a378cceff8ec346df579e9126035b6acbc60ab893cc65e67729cc427c0171361bcb481e66 +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 languageName: node linkType: hard -"oauth-sign@npm:~0.9.0": - version: 0.9.0 - resolution: "oauth-sign@npm:0.9.0" - checksum: 10/1809a366d258f41fdf4ab5310cff3d1e15f96b187503bc7333cef4351de7bd0f52cb269bc95800f1fae5fb04dd886287df1471985fd67e8484729fdbcf857119 +"braces@npm:>=3.0.3": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 languageName: node linkType: hard -"object-assign@npm:^4, object-assign@npm:^4.0.1, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1": - version: 4.1.1 - resolution: "object-assign@npm:4.1.1" - checksum: 10/fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f +"brorand@npm:^1.0.1, brorand@npm:^1.1.0": + version: 1.1.0 + resolution: "brorand@npm:1.1.0" + checksum: 10/8a05c9f3c4b46572dec6ef71012b1946db6cae8c7bb60ccd4b7dd5a84655db49fe043ecc6272e7ef1f69dc53d6730b9e2a3a03a8310509a3d797a618cbee52be languageName: node linkType: hard -"object-copy@npm:^0.1.0": - version: 0.1.0 - resolution: "object-copy@npm:0.1.0" +"browserify-aes@npm:^1.0.0, browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": + version: 1.2.0 + resolution: "browserify-aes@npm:1.2.0" dependencies: - copy-descriptor: "npm:^0.1.0" - define-property: "npm:^0.2.5" - kind-of: "npm:^3.0.3" - checksum: 10/a9e35f07e3a2c882a7e979090360d1a20ab51d1fa19dfdac3aa8873b328a7c4c7683946ee97c824ae40079d848d6740a3788fa14f2185155dab7ed970a72c783 + buffer-xor: "npm:^1.0.3" + cipher-base: "npm:^1.0.0" + create-hash: "npm:^1.1.0" + evp_bytestokey: "npm:^1.0.3" + inherits: "npm:^2.0.1" + safe-buffer: "npm:^5.0.1" + checksum: 10/2813058f74e083a00450b11ea9d5d1f072de7bf0133f5d122d4ff7b849bece56d52b9c51ad0db0fad21c0bc4e8272fd5196114bbe7b94a9b7feb0f9fbb33a3bf languageName: node linkType: hard -"object-hash@npm:^3.0.0": - version: 3.0.0 - resolution: "object-hash@npm:3.0.0" - checksum: 10/f498d456a20512ba7be500cef4cf7b3c183cc72c65372a549c9a0e6dd78ce26f375e9b1315c07592d3fde8f10d5019986eba35970570d477ed9a2a702514432a +"browserify-cipher@npm:^1.0.0": + version: 1.0.1 + resolution: "browserify-cipher@npm:1.0.1" + dependencies: + browserify-aes: "npm:^1.0.4" + browserify-des: "npm:^1.0.0" + evp_bytestokey: "npm:^1.0.0" + checksum: 10/2d8500acf1ee535e6bebe808f7a20e4c3a9e2ed1a6885fff1facbfd201ac013ef030422bec65ca9ece8ffe82b03ca580421463f9c45af6c8415fd629f4118c13 languageName: node linkType: hard -"object-inspect@npm:^1.10.3, object-inspect@npm:^1.13.1": - version: 1.13.1 - resolution: "object-inspect@npm:1.13.1" - checksum: 10/92f4989ed83422d56431bc39656d4c780348eb15d397ce352ade6b7fec08f973b53744bd41b94af021901e61acaf78fcc19e65bf464ecc0df958586a672700f0 +"browserify-des@npm:^1.0.0": + version: 1.0.2 + resolution: "browserify-des@npm:1.0.2" + dependencies: + cipher-base: "npm:^1.0.1" + des.js: "npm:^1.0.0" + inherits: "npm:^2.0.1" + safe-buffer: "npm:^5.1.2" + checksum: 10/2fd9018e598b1b25e002abaf656d46d8e0f2ee2666ff18852d37e5c3d0e47701d6824256b060fac395420d56a0c49c2b0d40a194e6fbd837bfdd893e7eb5ade4 languageName: node linkType: hard -"object-inspect@npm:^1.11.0": - version: 1.12.0 - resolution: "object-inspect@npm:1.12.0" - checksum: 10/f13b824784749ac2d40d62a4c2a60df13fd57a221968efe1d686565ef71713b56b82e01b57bc2588d6b2ab124c342f130a2d0304c14a79f7fabe01bfa327515b +"browserify-rsa@npm:^4.0.0, browserify-rsa@npm:^4.1.0": + version: 4.1.0 + resolution: "browserify-rsa@npm:4.1.0" + dependencies: + bn.js: "npm:^5.0.0" + randombytes: "npm:^2.0.1" + checksum: 10/155f0c135873efc85620571a33d884aa8810e40176125ad424ec9d85016ff105a07f6231650914a760cca66f29af0494087947b7be34880dd4599a0cd3c38e54 languageName: node linkType: hard -"object-inspect@npm:^1.12.3": - version: 1.12.3 - resolution: "object-inspect@npm:1.12.3" - checksum: 10/532b0036f0472f561180fac0d04fe328ee01f57637624c83fb054f81b5bfe966cdf4200612a499ed391a7ca3c46b20a0bc3a55fc8241d944abe687c556a32b39 +"browserify-sign@npm:^4.0.0": + version: 4.2.3 + resolution: "browserify-sign@npm:4.2.3" + dependencies: + bn.js: "npm:^5.2.1" + browserify-rsa: "npm:^4.1.0" + create-hash: "npm:^1.2.0" + create-hmac: "npm:^1.1.7" + elliptic: "npm:^6.5.5" + hash-base: "npm:~3.0" + inherits: "npm:^2.0.4" + parse-asn1: "npm:^5.1.7" + readable-stream: "npm:^2.3.8" + safe-buffer: "npm:^5.2.1" + checksum: 10/403a8061d229ae31266670345b4a7c00051266761d2c9bbeb68b1a9bcb05f68143b16110cf23a171a5d6716396a1f41296282b3e73eeec0a1871c77f0ff4ee6b languageName: node linkType: hard -"object-inspect@npm:^1.9.0": - version: 1.12.2 - resolution: "object-inspect@npm:1.12.2" - checksum: 10/aa11100d45fa919b36448347d4f7c8a78b0247886881db56a2026b512c4042a9749e64894519b00a4db8c6e2b713a965b5ceaa3b59324aeb3da007c54a33bc58 +"browserify-zlib@npm:^0.2.0": + version: 0.2.0 + resolution: "browserify-zlib@npm:0.2.0" + dependencies: + pako: "npm:~1.0.5" + checksum: 10/852e72effdc00bf8acc6d167d835179eda9e5bd13721ae5d0a2d132dc542f33e73bead2959eb43a2f181a9c495bc2ae2bdb4ec37c4e37ff61a0277741cbaaa7a languageName: node linkType: hard -"object-is@npm:^1.0.1, object-is@npm:^1.1.5": - version: 1.1.5 - resolution: "object-is@npm:1.1.5" +"browserslist@npm:^4.17.5, browserslist@npm:^4.20.2": + version: 4.20.3 + resolution: "browserslist@npm:4.20.3" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - checksum: 10/75365aff5da4bebad5d20efd9f9a7a13597e603f5eb03d89da8f578c3f3937fe01c6cb5fce86c0611c48795c0841401fd37c943821db0de703c7b30a290576ad + caniuse-lite: "npm:^1.0.30001332" + electron-to-chromium: "npm:^1.4.118" + escalade: "npm:^3.1.1" + node-releases: "npm:^2.0.3" + picocolors: "npm:^1.0.0" + bin: + browserslist: cli.js + checksum: 10/63e285ae2d19aca763616a48b3ad48dc84fb896038faa3a85bcfed801411ed783fd166bdbf5f4af0d11494ea1b6632aa390a4ba32ce92249bd627f4563c88cd0 languageName: node linkType: hard -"object-keys@npm:^1.0.12, object-keys@npm:^1.1.1": - version: 1.1.1 - resolution: "object-keys@npm:1.1.1" - checksum: 10/3d81d02674115973df0b7117628ea4110d56042e5326413e4b4313f0bcdf7dd78d4a3acef2c831463fa3796a66762c49daef306f4a0ea1af44877d7086d73bde +"browserslist@npm:^4.21.10": + version: 4.21.10 + resolution: "browserslist@npm:4.21.10" + dependencies: + caniuse-lite: "npm:^1.0.30001517" + electron-to-chromium: "npm:^1.4.477" + node-releases: "npm:^2.0.13" + update-browserslist-db: "npm:^1.0.11" + bin: + browserslist: cli.js + checksum: 10/cdb9272433994393a995235720c304e8c7123b4994b02fc0b24ca0f483db482c4f85fe8b40995aa6193d47d781e5535cf5d0efe96e465d2af42058fb3251b13a languageName: node linkType: hard -"object-keys@npm:~0.2.0": - version: 0.2.0 - resolution: "object-keys@npm:0.2.0" +"bs-logger@npm:0.x": + version: 0.2.6 + resolution: "bs-logger@npm:0.2.6" dependencies: - foreach: "npm:~2.0.1" - indexof: "npm:~0.0.1" - is: "npm:~0.2.6" - checksum: 10/4b96bab88fe9df22a03aec3c59a084bdffc789ad1318a39081e6b8389af6b9ab8571dd3776eed3ec5831137d057fb7ba76911552c6a6efd59b5d126ac3b6e432 + fast-json-stable-stringify: "npm:2.x" + checksum: 10/e6d3ff82698bb3f20ce64fb85355c5716a3cf267f3977abe93bf9c32a2e46186b253f48a028ae5b96ab42bacd2c826766d9ae8cf6892f9b944656be9113cf212 languageName: node linkType: hard -"object-keys@npm:~0.4.0": - version: 0.4.0 - resolution: "object-keys@npm:0.4.0" - checksum: 10/9ab0a2c3d922f7f18d00c1b1646c3a4b686bebeecdd90531bbe5bbbc72a381313b9e43ff0d9cf9b5b212906a19fd02195d013ca5d67d42758e72e5d2a79668d0 +"bser@npm:2.1.1": + version: 2.1.1 + resolution: "bser@npm:2.1.1" + dependencies: + node-int64: "npm:^0.4.0" + checksum: 10/edba1b65bae682450be4117b695997972bd9a3c4dfee029cab5bcb72ae5393a79a8f909b8bc77957eb0deec1c7168670f18f4d5c556f46cdd3bca5f3b3a8d020 languageName: node linkType: hard -"object-path@npm:^0.11.5": - version: 0.11.8 - resolution: "object-path@npm:0.11.8" - checksum: 10/cbc41515ff97aa7515bd93a3d93d5b7307c95413345d83c66c60b7618429cfc935ff4049192c96701eeeb33a78678b15ee97b5fe0857e9eca4fcd7507dfafd36 +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb languageName: node linkType: hard -"object-visit@npm:^1.0.0": - version: 1.0.1 - resolution: "object-visit@npm:1.0.1" - dependencies: - isobject: "npm:^3.0.0" - checksum: 10/77abf807de86fa65bf1ba92699b45b1e5485f2d899300d5cb92cca0863909e9528b6cbf366c237c9f5d2264dab6cfbeda2201252ed0e605ae1b3e263515c5cea +"buffer-xor@npm:^1.0.3": + version: 1.0.3 + resolution: "buffer-xor@npm:1.0.3" + checksum: 10/4a63d48b5117c7eda896d81cd3582d9707329b07c97a14b0ece2edc6e64220ea7ea17c94b295e8c2cb7b9f8291e2b079f9096be8ac14be238420a43e06ec66e2 languageName: node linkType: hard -"object.assign@npm:^4.0.4, object.assign@npm:^4.1.4": - version: 4.1.4 - resolution: "object.assign@npm:4.1.4" +"buffer@npm:6.0.3, buffer@npm:^6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - has-symbols: "npm:^1.0.3" - object-keys: "npm:^1.1.1" - checksum: 10/fd82d45289df0a952d772817622ecbaeb4ec933d3abb53267aede083ee38f6a395af8fadfbc569ee575115b0b7c9b286e7cfb2b7a2557b1055f7acbce513bc29 + base64-js: "npm:^1.3.1" + ieee754: "npm:^1.2.1" + checksum: 10/b6bc68237ebf29bdacae48ce60e5e28fc53ae886301f2ad9496618efac49427ed79096750033e7eab1897a4f26ae374ace49106a5758f38fb70c78c9fda2c3b1 languageName: node linkType: hard -"object.assign@npm:^4.1.2": - version: 4.1.2 - resolution: "object.assign@npm:4.1.2" +"buffer@npm:^5.5.0": + version: 5.7.1 + resolution: "buffer@npm:5.7.1" dependencies: - call-bind: "npm:^1.0.0" - define-properties: "npm:^1.1.3" - has-symbols: "npm:^1.0.1" - object-keys: "npm:^1.1.1" - checksum: 10/83fdff0208e5ea616aa59880add9c0cd08e58532d5bb010630a4695002f467e0a08f0f53d062ae33593ecf0fff42147b019be7fb17f2153264c37f8f4b85dfaa + base64-js: "npm:^1.3.1" + ieee754: "npm:^1.1.13" + checksum: 10/997434d3c6e3b39e0be479a80288875f71cd1c07d75a3855e6f08ef848a3c966023f79534e22e415ff3a5112708ce06127277ab20e527146d55c84566405c7c6 languageName: node linkType: hard -"object.assign@npm:^4.1.5": - version: 4.1.5 - resolution: "object.assign@npm:4.1.5" - dependencies: - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - object-keys: "npm:^1.1.1" - checksum: 10/dbb22da4cda82e1658349ea62b80815f587b47131b3dd7a4ab7f84190ab31d206bbd8fe7e26ae3220c55b65725ac4529825f6142154211220302aa6b1518045d +"builtin-status-codes@npm:^3.0.0": + version: 3.0.0 + resolution: "builtin-status-codes@npm:3.0.0" + checksum: 10/1119429cf4b0d57bf76b248ad6f529167d343156ebbcc4d4e4ad600484f6bc63002595cbb61b67ad03ce55cd1d3c4711c03bbf198bf24653b8392420482f3773 languageName: node linkType: hard -"object.entries@npm:^1.1.6": - version: 1.1.7 - resolution: "object.entries@npm:1.1.7" +"builtins@npm:^5.0.0": + version: 5.0.1 + resolution: "builtins@npm:5.0.1" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/03f0bd0f23a8626c94429d15abf26ccda7723f08cd26be2c09c72d436765f8c7468605b5476ca58d4a7cec1ec7eca5be496dbd938fd4236b77ed6d05a8680048 + semver: "npm:^7.0.0" + checksum: 10/90136fa0ba98b7a3aea33190b1262a5297164731efb6a323b0231acf60cc2ea0b2b1075dbf107038266b8b77d6045fa9631d1c3f90efc1c594ba61218fbfbb4c languageName: node linkType: hard -"object.fromentries@npm:^2.0.6": - version: 2.0.6 - resolution: "object.fromentries@npm:2.0.6" +"byte-size@npm:^8.1.1": + version: 8.1.1 + resolution: "byte-size@npm:8.1.1" + checksum: 10/eacd83b5f39b4b35115160201553150c3c085473ddb1e788d0f4ee22a2f3461470de5732eef8d7874efbbd883b7ae1277190b579128060e616d606ff419fe1e0 + languageName: node + linkType: hard + +"cacache@npm:^17.0.0": + version: 17.0.5 + resolution: "cacache@npm:17.0.5" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - checksum: 10/e8b813647cbc6505750cdff8b3978bb341492707a5f1df4129e2d8a904b31692e225eff92481ae5916be3bde3c2eff1d0e8a6730921ca7f4eed60bc15a70cb35 + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^9.3.1" + lru-cache: "npm:^7.7.1" + minipass: "npm:^4.0.0" + minipass-collect: "npm:^1.0.2" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + promise-inflight: "npm:^1.0.1" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10/ef7ca5227ba340911884dd2cde0eb207c671e0afe8327fca70bd469bb7358b93eb7642743084e547ce4afd5c6323e444d9e55ec7724a2004d42e1b576e48420b languageName: node linkType: hard -"object.fromentries@npm:^2.0.7": - version: 2.0.7 - resolution: "object.fromentries@npm:2.0.7" +"cacache@npm:^18.0.0": + version: 18.0.0 + resolution: "cacache@npm:18.0.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/1bfbe42a51f8d84e417d193fae78e4b8eebb134514cdd44406480f8e8a0e075071e0717635d8e3eccd50fec08c1d555fe505c38804cbac0808397187653edd59 + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^1.0.2" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10/b71fefe97b9799a863dc48ac79da2bd57a724ff0922fddd3aef4f3b70395ba00d1ef9547a0594d3d6d3cd57aeaeaf4d938c54f89695053eb2198cf8758b47511 languageName: node linkType: hard -"object.getownpropertydescriptors@npm:^2.1.0": - version: 2.1.7 - resolution: "object.getownpropertydescriptors@npm:2.1.7" +"cacache@npm:^18.0.3": + version: 18.0.3 + resolution: "cacache@npm:18.0.3" dependencies: - array.prototype.reduce: "npm:^1.0.6" - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - safe-array-concat: "npm:^1.0.0" - checksum: 10/c99e0f66873e7e5a4ffb3b4465ef57d139d2a232b26ea72571ab90069442db39a1b10c0f7ea228c8aab721437f39dbc97a73158bb68b892706a3d18b277a9bc7 + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10/d4c161f071524bb636334b8cf94780c014e29c180a886b8184da8f2f44d2aca88d5664797c661e9f74bdbd34697c2f231ed7c24c256cecbb0a0563ad1ada2219 languageName: node linkType: hard -"object.getownpropertydescriptors@npm:^2.1.6": - version: 2.1.6 - resolution: "object.getownpropertydescriptors@npm:2.1.6" - dependencies: - array.prototype.reduce: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.21.2" - safe-array-concat: "npm:^1.0.0" - checksum: 10/442983bf16c4cbf6f3b8882d14ca4d76fc78c4afc45a16454f6a728946f8e1aaf4ba4bd60557bbd800211bea0e7e83732344e884d5a8c20a195273fa637d8876 +"cacheable-lookup@npm:^7.0.0": + version: 7.0.0 + resolution: "cacheable-lookup@npm:7.0.0" + checksum: 10/69ea78cd9f16ad38120372e71ba98b64acecd95bbcbcdad811f857dc192bad81ace021f8def012ce19178583db8d46afd1a00b3e8c88527e978e049edbc23252 languageName: node linkType: hard -"object.groupby@npm:^1.0.0": - version: 1.0.0 - resolution: "object.groupby@npm:1.0.0" +"cacheable-request@npm:^10.2.8": + version: 10.2.12 + resolution: "cacheable-request@npm:10.2.12" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.21.2" - get-intrinsic: "npm:^1.2.1" - checksum: 10/8233fa5288744dd6ea22050d96bb3f59c5acf85ab32ed758821ff82f276dda76b1bb1b9220a52432673476dff361a06ddcfff6d7d859135ff3c1c89b8c844b3e + "@types/http-cache-semantics": "npm:^4.0.1" + get-stream: "npm:^6.0.1" + http-cache-semantics: "npm:^4.1.1" + keyv: "npm:^4.5.2" + mimic-response: "npm:^4.0.0" + normalize-url: "npm:^8.0.0" + responselike: "npm:^3.0.0" + checksum: 10/abc1541f80e0995a52cfc6197ad12d2a910363c7342815a88f1606b767d81d5ccb43b8f1ba5a16180f3bf939b28f9b07dff22d346572d343f50a908813118e0b languageName: node linkType: hard -"object.groupby@npm:^1.0.1": - version: 1.0.2 - resolution: "object.groupby@npm:1.0.2" +"cacheable-request@npm:^6.0.0": + version: 6.1.0 + resolution: "cacheable-request@npm:6.1.0" dependencies: - array.prototype.filter: "npm:^1.0.3" - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.3" - es-errors: "npm:^1.0.0" - checksum: 10/07c1bea1772c45f7967a63358a683ef7b0bd99cabe0563e6fee3e8acc061cc5984d2f01a46472ebf10b2cb439298c46776b2134550dce457fd7240baaaa4f592 + clone-response: "npm:^1.0.2" + get-stream: "npm:^5.1.0" + http-cache-semantics: "npm:^4.0.0" + keyv: "npm:^3.0.0" + lowercase-keys: "npm:^2.0.0" + normalize-url: "npm:^4.1.0" + responselike: "npm:^1.0.2" + checksum: 10/804f6c377ce6fef31c584babde31d55c69305569058ad95c24a41bb7b33d0ea188d388467a9da6cb340e95a3a1f8a94e1f3a709fef5eaf9c6b88e62448fa29be languageName: node linkType: hard -"object.hasown@npm:^1.1.2": - version: 1.1.3 - resolution: "object.hasown@npm:1.1.3" +"caching-transform@npm:^4.0.0": + version: 4.0.0 + resolution: "caching-transform@npm:4.0.0" dependencies: - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/735679729c25a4e0d3713adf5df9861d862f0453e87ada4d991b75cd4225365dec61a08435e1127f42c9cc1adfc8e952fa5dca75364ebda6539dadf4721dc9c4 + hasha: "npm:^5.0.0" + make-dir: "npm:^3.0.0" + package-hash: "npm:^4.0.0" + write-file-atomic: "npm:^3.0.0" + checksum: 10/7e7ca628511ab18c86eea1231834d2591de29a13ae771a7d9ab85be8c6e53e45c5a5b0d0d95d4a3274fc4f26c16956a98162e40c191c131204b5d5aa949660b5 languageName: node linkType: hard -"object.omit@npm:^2.0.0": - version: 2.0.1 - resolution: "object.omit@npm:2.0.1" +"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": + version: 1.0.2 + resolution: "call-bind@npm:1.0.2" dependencies: - for-own: "npm:^0.1.4" - is-extendable: "npm:^0.1.1" - checksum: 10/431088be6af5860560b61a252e5f020ca1894f111743ee7ffa329a32c084b1b7fa8d7d70ab45fdcb2c2872648a67170d8120d109fae32b4b4bbe2491ac9a3719 + function-bind: "npm:^1.1.1" + get-intrinsic: "npm:^1.0.2" + checksum: 10/ca787179c1cbe09e1697b56ad499fd05dc0ae6febe5081d728176ade699ea6b1589240cb1ff1fe11fcf9f61538c1af60ad37e8eb2ceb4ef21cd6085dfd3ccedd languageName: node linkType: hard -"object.pick@npm:^1.3.0": - version: 1.3.0 - resolution: "object.pick@npm:1.3.0" +"call-bind@npm:^1.0.5": + version: 1.0.5 + resolution: "call-bind@npm:1.0.5" dependencies: - isobject: "npm:^3.0.1" - checksum: 10/92d7226a6b581d0d62694a5632b6a1594c81b3b5a4eb702a7662e0b012db532557067d6f773596c577f75322eba09cdca37ca01ea79b6b29e3e17365f15c615e + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.1" + set-function-length: "npm:^1.1.1" + checksum: 10/246d44db6ef9bbd418828dbd5337f80b46be4398d522eded015f31554cbb2ea33025b0203b75c7ab05a1a255b56ef218880cca1743e4121e306729f9e414da39 languageName: node linkType: hard -"object.values@npm:^1.1.0, object.values@npm:^1.1.7": - version: 1.1.7 - resolution: "object.values@npm:1.1.7" +"call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": + version: 1.0.7 + resolution: "call-bind@npm:1.0.7" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/20ab42c0bbf984405c80e060114b18cf5d629a40a132c7eac4fb79c5d06deb97496311c19297dcf9c61f45c2539cd4c7f7c5d6230e51db360ff297bbc9910162 + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.4" + set-function-length: "npm:^1.2.1" + checksum: 10/cd6fe658e007af80985da5185bff7b55e12ef4c2b6f41829a26ed1eef254b1f1c12e3dfd5b2b068c6ba8b86aba62390842d81752e67dcbaec4f6f76e7113b6b7 languageName: node linkType: hard -"object.values@npm:^1.1.6": - version: 1.1.6 - resolution: "object.values@npm:1.1.6" +"caller-callsite@npm:^4.1.0": + version: 4.1.0 + resolution: "caller-callsite@npm:4.1.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - checksum: 10/adea807c90951df34eb2f5c6a90ab5624e15c71f0b3a3e422db16933c9f4e19551d10649fffcb4adcac01d86d7c14a64bfb500d8f058db5a52976150a917f6eb - languageName: node - linkType: hard - -"obliterator@npm:^2.0.0": - version: 2.0.2 - resolution: "obliterator@npm:2.0.2" - checksum: 10/170a5665593efa9b6c549d549f3b73bcef7262290badb743ffd3821f839a555b059f84cdd173ee36880038a98aa95e9e1f860c95af19687aaff4b5315fe38140 + callsites: "npm:^3.1.0" + checksum: 10/4a3e775344f553a473947ddb01e45c91c7e0e5a0d77d697095063ad0efd8ea38e4093654837470aaf529cedff338320ece9e5da91224bc5cc9109a0ded25cd11 languageName: node linkType: hard -"oboe@npm:2.1.5": - version: 2.1.5 - resolution: "oboe@npm:2.1.5" +"caller-path@npm:^3.0.1": + version: 3.0.1 + resolution: "caller-path@npm:3.0.1" dependencies: - http-https: "npm:^1.0.0" - checksum: 10/451d0c28b45f518fc86d4689075cf74c7fea92fb09e2f994dd1208e5c5516a6958f9dc476714b61c62c959a3e7e0db8a69999c59ff63777c7a8af24fbddd0848 - languageName: node - linkType: hard - -"obuf@npm:^1.0.0, obuf@npm:^1.1.2": - version: 1.1.2 - resolution: "obuf@npm:1.1.2" - checksum: 10/53ff4ab3a13cc33ba6c856cf281f2965c0aec9720967af450e8fd06cfd50aceeefc791986a16bcefa14e7898b3ca9acdfcf15b9d9a1b9c7e1366581a8ad6e65e + caller-callsite: "npm:^4.1.0" + checksum: 10/ed00224727925d7e6807230e054a7bb995fa09cd9b8c8241c3985de9c50c96784cf4b996360c2c417b56d82af340c7752300ad3387c68e7e9cfd9c5516e3faa9 languageName: node linkType: hard -"octal@npm:^1.0.0": +"callsite@npm:^1.0.0": version: 1.0.0 - resolution: "octal@npm:1.0.0" - checksum: 10/d648917f4f0a1042d7a4e230262aed00274c9791fe4795e9a2ce3b64ab7f2ca93e62cd55ca5ad4e4bd3fc375ca84d6919d7bf417be461790c1042503ac2c2310 + resolution: "callsite@npm:1.0.0" + checksum: 10/39fc89ef9dbee7d5491bc69034fc16fbb8876a73456f831cc27060b5828e94357bb6705e0127a6d0182d79b03dbdb0ef88223d0b599c26667c871c89b30eb681 languageName: node linkType: hard -"on-exit-leak-free@npm:^2.1.0": - version: 2.1.2 - resolution: "on-exit-leak-free@npm:2.1.2" - checksum: 10/f7b4b7200026a08f6e4a17ba6d72e6c5cbb41789ed9cf7deaf9d9e322872c7dc5a7898549a894651ee0ee9ae635d34a678115bf8acdfba8ebd2ba2af688b563c +"callsites@npm:^3.0.0, callsites@npm:^3.1.0": + version: 3.1.0 + resolution: "callsites@npm:3.1.0" + checksum: 10/072d17b6abb459c2ba96598918b55868af677154bec7e73d222ef95a8fdb9bbf7dae96a8421085cdad8cd190d86653b5b6dc55a4484f2e5b2e27d5e0c3fc15b3 languageName: node linkType: hard -"on-finished@npm:2.4.1, on-finished@npm:^2.4.1": - version: 2.4.1 - resolution: "on-finished@npm:2.4.1" +"camelcase-keys@npm:^6.2.2": + version: 6.2.2 + resolution: "camelcase-keys@npm:6.2.2" dependencies: - ee-first: "npm:1.1.1" - checksum: 10/8e81472c5028125c8c39044ac4ab8ba51a7cdc19a9fbd4710f5d524a74c6d8c9ded4dd0eed83f28d3d33ac1d7a6a439ba948ccb765ac6ce87f30450a26bfe2ea + camelcase: "npm:^5.3.1" + map-obj: "npm:^4.0.0" + quick-lru: "npm:^4.0.1" + checksum: 10/c1999f5b6d03bee7be9a36e48eef3da9e93e51b000677348ec8d15d51fc4418375890fb6c7155e387322d2ebb2a2cdebf9cd96607a6753d1d6c170d9b1e2eed5 languageName: node linkType: hard -"on-finished@npm:~2.3.0": - version: 2.3.0 - resolution: "on-finished@npm:2.3.0" +"camelcase-keys@npm:^7.0.0": + version: 7.0.2 + resolution: "camelcase-keys@npm:7.0.2" dependencies: - ee-first: "npm:1.1.1" - checksum: 10/1db595bd963b0124d6fa261d18320422407b8f01dc65863840f3ddaaf7bcad5b28ff6847286703ca53f4ec19595bd67a2f1253db79fc4094911ec6aa8df1671b - languageName: node - linkType: hard - -"on-headers@npm:~1.0.1, on-headers@npm:~1.0.2": - version: 1.0.2 - resolution: "on-headers@npm:1.0.2" - checksum: 10/870766c16345855e2012e9422ba1ab110c7e44ad5891a67790f84610bd70a72b67fdd71baf497295f1d1bf38dd4c92248f825d48729c53c0eae5262fb69fa171 + camelcase: "npm:^6.3.0" + map-obj: "npm:^4.1.0" + quick-lru: "npm:^5.1.1" + type-fest: "npm:^1.2.1" + checksum: 10/6f92d969b7fa97456ffc35fe93f0a42d0d0a00fbd94bfc6cac07c84da86e6acfb89fdf04151460d47c583d2dd38a3e9406f980efe9a3d2e143cdfe46a7343083 languageName: node linkType: hard -"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": - version: 1.4.0 - resolution: "once@npm:1.4.0" - dependencies: - wrappy: "npm:1" - checksum: 10/cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 +"camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: 10/e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b languageName: node linkType: hard -"one-time@npm:^1.0.0": - version: 1.0.0 - resolution: "one-time@npm:1.0.0" - dependencies: - fn.name: "npm:1.x.x" - checksum: 10/64d0160480eeae4e3b2a6fc0a02f452e05bb0cc8373a4ed56a4fc08c3939dcb91bc20075003ed499655bd16919feb63ca56f86eee7932c5251f7d629b55dfc90 +"camelcase@npm:^6.2.0, camelcase@npm:^6.3.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d languageName: node linkType: hard -"onetime@npm:^1.0.0": - version: 1.1.0 - resolution: "onetime@npm:1.1.0" - checksum: 10/751f45ddeba213600c215280cb937efd7b530b498277c9605f9ee0e5e2022b3463e23fd6d1800e793e128301adee12ed4aba41242e50fbc0d631a9e171aef361 +"caniuse-lite@npm:^1.0.30001332": + version: 1.0.30001340 + resolution: "caniuse-lite@npm:1.0.30001340" + checksum: 10/d1c6583f15e32b847f27d5482e900021deec37c864b988147aa242e4859fbfd20a4f83b2e13001e7808e9701dc30a510fcae03619218488c4c5d09b981efce6f languageName: node linkType: hard -"onetime@npm:^2.0.0": - version: 2.0.1 - resolution: "onetime@npm:2.0.1" - dependencies: - mimic-fn: "npm:^1.0.0" - checksum: 10/5b4f6079e6b4973244017e157833ab5a7a3de4bd2612d69411e3ee46f61fe8bb57b7c2e243b0b23dbaa5bad7641a15f9100a5c80295ff64c0d87aab5d1576ef9 +"caniuse-lite@npm:^1.0.30001517": + version: 1.0.30001532 + resolution: "caniuse-lite@npm:1.0.30001532" + checksum: 10/3be6aae89a588f1111eec0cd9d3125f24a5bb2a9ca2b2ead5a3bee529b85f32b01fd5aa751f292d18da0941948288187ff558b2ca199dac37fed18fba25047ec languageName: node linkType: hard -"onetime@npm:^5.1.0, onetime@npm:^5.1.2": - version: 5.1.2 - resolution: "onetime@npm:5.1.2" +"cardinal@npm:^2.1.1": + version: 2.1.1 + resolution: "cardinal@npm:2.1.1" dependencies: - mimic-fn: "npm:^2.1.0" - checksum: 10/e9fd0695a01cf226652f0385bf16b7a24153dbbb2039f764c8ba6d2306a8506b0e4ce570de6ad99c7a6eb49520743afdb66edd95ee979c1a342554ed49a9aadd + ansicolors: "npm:~0.3.2" + redeyed: "npm:~2.1.0" + bin: + cdl: ./bin/cdl.js + checksum: 10/caf0d34739ef7b1d80e1753311f889997b62c4490906819eb5da5bd46e7f5e5caba7a8a96ca401190c7d9c18443a7749e5338630f7f9a1ae98d60cac49b9008e languageName: node linkType: hard -"onetime@npm:^6.0.0": - version: 6.0.0 - resolution: "onetime@npm:6.0.0" +"chalk-template@npm:^1.1.0": + version: 1.1.0 + resolution: "chalk-template@npm:1.1.0" dependencies: - mimic-fn: "npm:^4.0.0" - checksum: 10/0846ce78e440841335d4e9182ef69d5762e9f38aa7499b19f42ea1c4cd40f0b4446094c455c713f9adac3f4ae86f613bb5e30c99e52652764d06a89f709b3788 + chalk: "npm:^5.2.0" + checksum: 10/868aae8d4e7556ad2f35de4e04fe65dbe1ea6c5c80ad783f1c156d0a5c33f444c6814f49cbb68fe348c78e99daf2bcf566b47ad7e13603e4691ca78b2f422824 languageName: node linkType: hard -"ono@npm:^7.1.3": - version: 7.1.3 - resolution: "ono@npm:7.1.3" +"chalk@npm:2.4.2, chalk@npm:^2.0.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" dependencies: - "@jsdevtools/ono": "npm:7.1.3" - checksum: 10/7c9246ce063b4f6d8af3be7affb1d905254f8481d4e874f91f299f33b959dbb3613f7216ff2bc8484852de7b51266173e25cadcb6cba741242b05e22ac51c99d + ansi-styles: "npm:^3.2.1" + escape-string-regexp: "npm:^1.0.5" + supports-color: "npm:^5.3.0" + checksum: 10/3d1d103433166f6bfe82ac75724951b33769675252d8417317363ef9d54699b7c3b2d46671b772b893a8e50c3ece70c4b933c73c01e81bc60ea4df9b55afa303 languageName: node linkType: hard -"open@npm:8.4.2, open@npm:^8.0.0, open@npm:^8.4.0": - version: 8.4.2 - resolution: "open@npm:8.4.2" +"chalk@npm:4.1.2, chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" dependencies: - define-lazy-prop: "npm:^2.0.0" - is-docker: "npm:^2.1.1" - is-wsl: "npm:^2.2.0" - checksum: 10/acd81a1d19879c818acb3af2d2e8e9d81d17b5367561e623248133deb7dd3aefaed527531df2677d3e6aaf0199f84df57b6b2262babff8bf46ea0029aac536c9 + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 languageName: node linkType: hard -"open@npm:^8.0.9": - version: 8.4.0 - resolution: "open@npm:8.4.0" +"chalk@npm:^3.0.0": + version: 3.0.0 + resolution: "chalk@npm:3.0.0" dependencies: - define-lazy-prop: "npm:^2.0.0" - is-docker: "npm:^2.1.1" - is-wsl: "npm:^2.2.0" - checksum: 10/ccb8760068b48e277868423cdf21f4f4e5682ec86dbc3a5cf1c34ef0e8b49721ad98b3f001b4eb2cbd7df7921f84551ec5b9fecace3b3eced3e46dca1c785f03 - languageName: node - linkType: hard - -"openapi-types@npm:12.1.3": - version: 12.1.3 - resolution: "openapi-types@npm:12.1.3" - checksum: 10/9d1d7ed848622b63d0a4c3f881689161b99427133054e46b8e3241e137f1c78bb0031c5d80b420ee79ac2e91d2e727ffd6fc13c553d1b0488ddc8ad389dcbef8 - languageName: node - linkType: hard - -"opener@npm:^1.5.1": - version: 1.5.2 - resolution: "opener@npm:1.5.2" - bin: - opener: bin/opener-bin.js - checksum: 10/0504efcd6546e14c016a261f58a68acf9f2e5c23d84865d7d5470d5169788327ceaa5386253682f533b3fba4821748aa37ecb395f3dae7acb3261b9b22e36814 + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/37f90b31fd655fb49c2bd8e2a68aebefddd64522655d001ef417e6f955def0ed9110a867ffc878a533f2dafea5f2032433a37c8a7614969baa7f8a1cd424ddfc languageName: node linkType: hard -"optionator@npm:^0.8.2": - version: 0.8.3 - resolution: "optionator@npm:0.8.3" - dependencies: - deep-is: "npm:~0.1.3" - fast-levenshtein: "npm:~2.0.6" - levn: "npm:~0.3.0" - prelude-ls: "npm:~1.1.2" - type-check: "npm:~0.3.2" - word-wrap: "npm:~1.2.3" - checksum: 10/6fa3c841b520f10aec45563962922215180e8cfbc59fde3ecd4ba2644ad66ca96bd19ad0e853f22fefcb7fc10e7612a5215b412cc66c5588f9a3138b38f6b5ff +"chalk@npm:^5.2.0, chalk@npm:^5.3.0": + version: 5.3.0 + resolution: "chalk@npm:5.3.0" + checksum: 10/6373caaab21bd64c405bfc4bd9672b145647fc9482657b5ea1d549b3b2765054e9d3d928870cdf764fb4aad67555f5061538ff247b8310f110c5c888d92397ea languageName: node linkType: hard -"optionator@npm:^0.9.3": - version: 0.9.3 - resolution: "optionator@npm:0.9.3" - dependencies: - "@aashutoshrathi/word-wrap": "npm:^1.2.3" - deep-is: "npm:^0.1.3" - fast-levenshtein: "npm:^2.0.6" - levn: "npm:^0.4.1" - prelude-ls: "npm:^1.2.1" - type-check: "npm:^0.4.0" - checksum: 10/fa28d3016395974f7fc087d6bbf0ac7f58ac3489f4f202a377e9c194969f329a7b88c75f8152b33fb08794a30dcd5c079db6bb465c28151357f113d80bbf67da +"char-regex@npm:^1.0.2": + version: 1.0.2 + resolution: "char-regex@npm:1.0.2" + checksum: 10/1ec5c2906adb9f84e7f6732a40baef05d7c85401b82ffcbc44b85fbd0f7a2b0c2a96f2eb9cf55cae3235dc12d4023003b88f09bcae8be9ae894f52ed746f4d48 languageName: node linkType: hard -"ora@npm:4.0.2": - version: 4.0.2 - resolution: "ora@npm:4.0.2" - dependencies: - chalk: "npm:^2.4.2" - cli-cursor: "npm:^3.1.0" - cli-spinners: "npm:^2.2.0" - is-interactive: "npm:^1.0.0" - log-symbols: "npm:^3.0.0" - strip-ansi: "npm:^5.2.0" - wcwidth: "npm:^1.0.1" - checksum: 10/b38fd2c0cc2559393bca4fc337ac37bb517fb6880543dc51c4f2d60520635118d2dd642b9690eb0ef85b6e89ec5be60cdf76e44e992531fb9935fbc5c4a30dc1 +"chardet@npm:^0.7.0": + version: 0.7.0 + resolution: "chardet@npm:0.7.0" + checksum: 10/b0ec668fba5eeec575ed2559a0917ba41a6481f49063c8445400e476754e0957ee09e44dc032310f526182b8f1bf25e9d4ed371f74050af7be1383e06bc44952 languageName: node linkType: hard -"ora@npm:5.4.1, ora@npm:^5.4.1": - version: 5.4.1 - resolution: "ora@npm:5.4.1" +"chokidar@npm:^3.3.0, chokidar@npm:^3.5.2": + version: 3.5.3 + resolution: "chokidar@npm:3.5.3" dependencies: - bl: "npm:^4.1.0" - chalk: "npm:^4.1.0" - cli-cursor: "npm:^3.1.0" - cli-spinners: "npm:^2.5.0" - is-interactive: "npm:^1.0.0" - is-unicode-supported: "npm:^0.1.0" - log-symbols: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - wcwidth: "npm:^1.0.1" - checksum: 10/8d071828f40090a8e1c6e8f350c6eb065808e9ab2b3e57fa37e0d5ae78cb46dac00117c8f12c3c8b8da2923454afbd8265e08c10b69881170c5b269f451e7fef + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/863e3ff78ee7a4a24513d2a416856e84c8e4f5e60efbe03e8ab791af1a183f569b62fc6f6b8044e2804966cb81277ddbbc1dc374fba3265bd609ea8efd62f5b3 languageName: node linkType: hard -"original-require@npm:^1.0.1": - version: 1.0.1 - resolution: "original-require@npm:1.0.1" - checksum: 10/bf240a31413c904817cce552fb1b0f657d0d44df1e129a4c9df75070bcc6b800a43b216f8be4cfc0c8a6b6cbe3d1c16cc40a978213a015ae2ca6832b86db8343 +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: 10/c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f languageName: node linkType: hard -"os-browserify@npm:0.3.0, os-browserify@npm:^0.3.0": - version: 0.3.0 - resolution: "os-browserify@npm:0.3.0" - checksum: 10/16e37ba3c0e6a4c63443c7b55799ce4066d59104143cb637ecb9fce586d5da319cdca786ba1c867abbe3890d2cbf37953f2d51eea85e20dd6c4570d6c54bfebf +"chrome-trace-event@npm:^1.0.2": + version: 1.0.3 + resolution: "chrome-trace-event@npm:1.0.3" + checksum: 10/b5fbdae5bf00c96fa3213de919f2b2617a942bfcb891cdf735fbad2a6f4f3c25d42e3f2b1703328619d352c718b46b9e18999fd3af7ef86c26c91db6fae1f0da languageName: node linkType: hard -"os-homedir@npm:^1.0.0, os-homedir@npm:^1.0.1": - version: 1.0.2 - resolution: "os-homedir@npm:1.0.2" - checksum: 10/af609f5a7ab72de2f6ca9be6d6b91a599777afc122ac5cad47e126c1f67c176fe9b52516b9eeca1ff6ca0ab8587fe66208bc85e40a3940125f03cdb91408e9d2 +"ci-info@npm:^2.0.0": + version: 2.0.0 + resolution: "ci-info@npm:2.0.0" + checksum: 10/3b374666a85ea3ca43fa49aa3a048d21c9b475c96eb13c133505d2324e7ae5efd6a454f41efe46a152269e9b6a00c9edbe63ec7fa1921957165aae16625acd67 languageName: node linkType: hard -"os-locale@npm:^1.4.0": - version: 1.4.0 - resolution: "os-locale@npm:1.4.0" - dependencies: - lcid: "npm:^1.0.0" - checksum: 10/0161a1b6b5a8492f99f4b47fe465df9fc521c55ba5414fce6444c45e2500487b8ed5b40a47a98a2363fe83ff04ab033785300ed8df717255ec4c3b625e55b1fb +"ci-info@npm:^3.2.0": + version: 3.3.0 + resolution: "ci-info@npm:3.3.0" + checksum: 10/8adea555a4f92e4f80f5e58e63277b349efa439dabfc6e2ca3773126f3fea7699f3546ff931f996a08f9905b2f6a7fc4d671a0c549cfedab7369e35aa0723b00 languageName: node linkType: hard -"os-locale@npm:^2.0.0": - version: 2.1.0 - resolution: "os-locale@npm:2.1.0" - dependencies: - execa: "npm:^0.7.0" - lcid: "npm:^1.0.0" - mem: "npm:^1.1.0" - checksum: 10/72ec8b18d037c27355075accc23869ba4613027a314f7f56fc7b98dfc1eef6096b454e351b4c735e594d66250709d65f63d3d6bf44964f2ee47b5123dcbfca63 +"ci-info@npm:^4.0.0": + version: 4.0.0 + resolution: "ci-info@npm:4.0.0" + checksum: 10/c983bb7ff1b06648f4a47432201abbd58291147d8ab5043dbb5c03e1a0e3fb2347f40d29b66a3044f28ffeb5dade01ac35aa6bd4e7464a44d9a49a3d7532415a languageName: node linkType: hard -"os-locale@npm:^3.1.0": - version: 3.1.0 - resolution: "os-locale@npm:3.1.0" +"cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": + version: 1.0.4 + resolution: "cipher-base@npm:1.0.4" dependencies: - execa: "npm:^1.0.0" - lcid: "npm:^2.0.0" - mem: "npm:^4.0.0" - checksum: 10/53c542b11af3c5fe99624b09c7882b6944f9ae7c69edbc6006b7d42cff630b1f7fd9d63baf84ed31d1ef02b34823b6b31f23a1ecdd593757873d716bc6374099 + inherits: "npm:^2.0.1" + safe-buffer: "npm:^5.0.1" + checksum: 10/3d5d6652ca499c3f7c5d7fdc2932a357ec1e5aa84f2ad766d850efd42e89753c97b795c3a104a8e7ae35b4e293f5363926913de3bf8181af37067d9d541ca0db languageName: node linkType: hard -"os-tmpdir@npm:~1.0.2": - version: 1.0.2 - resolution: "os-tmpdir@npm:1.0.2" - checksum: 10/5666560f7b9f10182548bf7013883265be33620b1c1b4a4d405c25be2636f970c5488ff3e6c48de75b55d02bde037249fe5dbfbb4c0fb7714953d56aed062e6d +"cjs-module-lexer@npm:^1.0.0": + version: 1.2.2 + resolution: "cjs-module-lexer@npm:1.2.2" + checksum: 10/f80f84bfdcc53379cc18e25ea3c0cdb4595c142b8e28df304f5c88f38202e1bccf13e845401593656781f79fb43273e1d402d6187d0eeee8dca5ddecee1dcad4 languageName: node linkType: hard -"own-or-env@npm:^1.0.2": - version: 1.0.2 - resolution: "own-or-env@npm:1.0.2" - dependencies: - own-or: "npm:^1.0.0" - checksum: 10/e7e412844d1a1e12c45132f793a519b9875c25806fff4057ad76532be1837c83e4b42c2cd07e746d020c8bd9883620dc59f0488d2da575a6ac4e2da5b65e5d35 +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 10/2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 languageName: node linkType: hard -"own-or@npm:^1.0.0": - version: 1.0.0 - resolution: "own-or@npm:1.0.0" - checksum: 10/f366faad18398dc0f22ebf3a4b24da344d44f782bd8ecffb7a24f0377412702555809f081160404340c12dbf3a3b551aefe644ae2760519e37dbb95a0618e9ed +"clean-stack@npm:^4.0.0": + version: 4.1.0 + resolution: "clean-stack@npm:4.1.0" + dependencies: + escape-string-regexp: "npm:5.0.0" + checksum: 10/56fdca7a67a61528676eaddce35442824700b674cf882150ac416824966f65b5e15d4ea02d1d47f4d16ad50213718c1f00ae0f6cca46aeec3fd761b49cf7204f languageName: node linkType: hard -"p-cancelable@npm:^0.3.0": - version: 0.3.0 - resolution: "p-cancelable@npm:0.3.0" - checksum: 10/2b27639be8f7f8718f2854c1711f713c296db00acc4675975b1531ecb6253da197304b4a211a330a8e54e754d28d4b3f7feecb48f0566dd265e3ba6745cd4148 +"clear-module@npm:^4.1.2": + version: 4.1.2 + resolution: "clear-module@npm:4.1.2" + dependencies: + parent-module: "npm:^2.0.0" + resolve-from: "npm:^5.0.0" + checksum: 10/4931f0c461f5d7b9b79f62c2d1bc31c37f7f1d33b4e95eef7080a83955c0374f4c180f5a96cc4d63bbefc64a9aa5d12b155641109e8e489dfa50fd5820e5101f languageName: node linkType: hard -"p-cancelable@npm:^1.0.0": - version: 1.1.0 - resolution: "p-cancelable@npm:1.1.0" - checksum: 10/2db3814fef6d9025787f30afaee4496a8857a28be3c5706432cbad76c688a6db1874308f48e364a42f5317f5e41e8e7b4f2ff5c8ff2256dbb6264bc361704ece +"cli-boxes@npm:^2.2.0, cli-boxes@npm:^2.2.1": + version: 2.2.1 + resolution: "cli-boxes@npm:2.2.1" + checksum: 10/be79f8ec23a558b49e01311b39a1ea01243ecee30539c880cf14bf518a12e223ef40c57ead0cb44f509bffdffc5c129c746cd50d863ab879385370112af4f585 languageName: node linkType: hard -"p-cancelable@npm:^3.0.0": - version: 3.0.0 - resolution: "p-cancelable@npm:3.0.0" - checksum: 10/a5eab7cf5ac5de83222a014eccdbfde65ecfb22005ee9bc242041f0b4441e07fac7629432c82f48868aa0f8413fe0df6c6067c16f76bf9217cd8dc651923c93d +"cli-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "cli-cursor@npm:3.1.0" + dependencies: + restore-cursor: "npm:^3.1.0" + checksum: 10/2692784c6cd2fd85cfdbd11f53aea73a463a6d64a77c3e098b2b4697a20443f430c220629e1ca3b195ea5ac4a97a74c2ee411f3807abf6df2b66211fec0c0a29 languageName: node linkType: hard -"p-defer@npm:^1.0.0": - version: 1.0.0 - resolution: "p-defer@npm:1.0.0" - checksum: 10/1d8fb7138a0ccebb65479160fd93f245303c06c977c976105d75838f7f504a9a6ef11b7e058f98b4c957a6a8df268c616da1ee339285d565f9e5ba00304e027b +"cli-spinners@npm:^2.5.0": + version: 2.6.1 + resolution: "cli-spinners@npm:2.6.1" + checksum: 10/3e2dc5df72cf02120bebe256881fc8e3ec49867e5023d39f1e7340d7da57964f5236f4c75e568aa9dea6460b56f7a6d5870b89453c743c6c15e213cb52be2122 languageName: node linkType: hard -"p-defer@npm:^3.0.0": - version: 3.0.0 - resolution: "p-defer@npm:3.0.0" - checksum: 10/ac3b0976a1c76b67cca1a34e00f7299b0cc230891f820749686aa84f8947326bbe0f8e3b7d9ca511578ee06f0c1a6e0ff68c8e9c325eac455f09d99f91697161 +"cli-truncate@npm:2.1.0, cli-truncate@npm:^2.1.0": + version: 2.1.0 + resolution: "cli-truncate@npm:2.1.0" + dependencies: + slice-ansi: "npm:^3.0.0" + string-width: "npm:^4.2.0" + checksum: 10/976f1887de067a8cd6ec830a7a8508336aebe6cec79b521d98ed13f67ef073b637f7305675b6247dd22f9e9cf045ec55fe746c7bdb288fbe8db0dfdc9fd52e55 languageName: node linkType: hard -"p-defer@npm:^4.0.0": - version: 4.0.0 - resolution: "p-defer@npm:4.0.0" - checksum: 10/646c9e86e62d2299ee9e8722b9857c9a2918afb8626c4eaf072d956de0d5b33c1cb132e5754516c923fc691eb33aa216755e168f848b045c1279186c8e2d852f +"cli-width@npm:^3.0.0": + version: 3.0.0 + resolution: "cli-width@npm:3.0.0" + checksum: 10/8730848b04fb189666ab037a35888d191c8f05b630b1d770b0b0e4c920b47bb5cc14bddf6b8ffe5bfc66cee97c8211d4d18e756c1ffcc75d7dbe7e1186cd7826 languageName: node linkType: hard -"p-event@npm:^4.1.0, p-event@npm:^4.2.0": - version: 4.2.0 - resolution: "p-event@npm:4.2.0" - dependencies: - p-timeout: "npm:^3.1.0" - checksum: 10/d03238ff31f5694f11bd7dcc0eae16c35b1ffb8cad4e5263d5422ba0bd6736dbfdb33b72745ecb6b06b98494db80f49f12c14f5e8da1212bf6a424609ad8d885 +"cli-width@npm:^4.1.0": + version: 4.1.0 + resolution: "cli-width@npm:4.1.0" + checksum: 10/b58876fbf0310a8a35c79b72ecfcf579b354e18ad04e6b20588724ea2b522799a758507a37dfe132fafaf93a9922cafd9514d9e1598e6b2cd46694853aed099f languageName: node linkType: hard -"p-fifo@npm:^1.0.0": - version: 1.0.0 - resolution: "p-fifo@npm:1.0.0" +"cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" dependencies: - fast-fifo: "npm:^1.0.0" - p-defer: "npm:^3.0.0" - checksum: 10/4cdce44ff8266351014a460705a804c02760e5b721a018dbef6fae7d25caf83af2e343be58810297473383c1783bb7048388cb5c22938b3f904818531bc44ee7 + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^6.2.0" + checksum: 10/44afbcc29df0899e87595590792a871cd8c4bc7d6ce92832d9ae268d141a77022adafca1aeaeccff618b62a613b8354e57fe22a275c199ec04baf00d381ef6ab languageName: node linkType: hard -"p-filter@npm:^3.0.0": - version: 3.0.0 - resolution: "p-filter@npm:3.0.0" +"cliui@npm:^7.0.2, cliui@npm:^7.0.4": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" dependencies: - p-map: "npm:^5.1.0" - checksum: 10/aacc36820f0531c01963334edc6debf5038b47c83a1c2255b7c14f6964a9a5fc1887ce0b93e72d137727403253bcc9bb26eed9bb79896ece1fa9f52d979bb97b + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^7.0.0" + checksum: 10/db858c49af9d59a32d603987e6fddaca2ce716cd4602ba5a2bb3a5af1351eebe82aba8dff3ef3e1b331f7fa9d40ca66e67bdf8e7c327ce0ea959747ead65c0ef languageName: node linkType: hard -"p-finally@npm:^1.0.0": - version: 1.0.0 - resolution: "p-finally@npm:1.0.0" - checksum: 10/93a654c53dc805dd5b5891bab16eb0ea46db8f66c4bfd99336ae929323b1af2b70a8b0654f8f1eae924b2b73d037031366d645f1fd18b3d30cbd15950cc4b1d4 +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10/eaa5561aeb3135c2cddf7a3b3f562fc4238ff3b3fc666869ef2adf264be0f372136702f16add9299087fb1907c2e4ec5dbfe83bd24bce815c70a80c6c1a2e950 languageName: node linkType: hard -"p-is-promise@npm:^2.0.0": - version: 2.1.0 - resolution: "p-is-promise@npm:2.1.0" - checksum: 10/c9a8248c8b5e306475a5d55ce7808dbce4d4da2e3d69526e4991a391a7809bfd6cfdadd9bf04f1c96a3db366c93d9a0f5ee81d949e7b1684c4e0f61f747199ef +"clone-deep@npm:^4.0.1": + version: 4.0.1 + resolution: "clone-deep@npm:4.0.1" + dependencies: + is-plain-object: "npm:^2.0.4" + kind-of: "npm:^6.0.2" + shallow-clone: "npm:^3.0.0" + checksum: 10/770f912fe4e6f21873c8e8fbb1e99134db3b93da32df271d00589ea4a29dbe83a9808a322c93f3bcaf8584b8b4fa6fc269fc8032efbaa6728e0c9886c74467d2 languageName: node linkType: hard -"p-is-promise@npm:^3.0.0": - version: 3.0.0 - resolution: "p-is-promise@npm:3.0.0" - checksum: 10/161e526ce5ba4f053afce094110fdf6cae250d28002b874b30d5f7525d1abb18911ae040d7f0ed3d202af6df87c84acb04109f39e34d7072af6088b3fc6a27fa +"clone-response@npm:^1.0.2": + version: 1.0.3 + resolution: "clone-response@npm:1.0.3" + dependencies: + mimic-response: "npm:^1.0.0" + checksum: 10/4e671cac39b11c60aa8ba0a450657194a5d6504df51bca3fac5b3bd0145c4f8e8464898f87c8406b83232e3bc5cca555f51c1f9c8ac023969ebfbf7f6bdabb2e languageName: node linkType: hard -"p-limit@npm:^1.1.0": - version: 1.3.0 - resolution: "p-limit@npm:1.3.0" - dependencies: - p-try: "npm:^1.0.0" - checksum: 10/eb9d9bc378d48ab1998d2a2b2962a99eddd3e3726c82d3258ecc1a475f22907968edea4fec2736586d100366a001c6bb449a2abe6cd65e252e9597394f01e789 +"clone@npm:^1.0.2": + version: 1.0.4 + resolution: "clone@npm:1.0.4" + checksum: 10/d06418b7335897209e77bdd430d04f882189582e67bd1f75a04565f3f07f5b3f119a9d670c943b6697d0afb100f03b866b3b8a1f91d4d02d72c4ecf2bb64b5dd languageName: node linkType: hard -"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0": - version: 2.3.0 - resolution: "p-limit@npm:2.3.0" - dependencies: - p-try: "npm:^2.0.0" - checksum: 10/84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 +"cmd-shim@npm:^6.0.0": + version: 6.0.1 + resolution: "cmd-shim@npm:6.0.1" + checksum: 10/d0718e4a49265a9195ced19f662a77569ce5939145451125bdc8bb302781f15564ade92f6c49e231f9d0bb6f3d71db1a2d0a50af940490eb324e152325039541 languageName: node linkType: hard -"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": - version: 3.1.0 - resolution: "p-limit@npm:3.1.0" - dependencies: - yocto-queue: "npm:^0.1.0" - checksum: 10/7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 +"co@npm:^4.6.0": + version: 4.6.0 + resolution: "co@npm:4.6.0" + checksum: 10/a5d9f37091c70398a269e625cedff5622f200ed0aa0cff22ee7b55ed74a123834b58711776eb0f1dc58eb6ebbc1185aa7567b57bd5979a948c6e4f85073e2c05 languageName: node linkType: hard -"p-limit@npm:^4.0.0": - version: 4.0.0 - resolution: "p-limit@npm:4.0.0" +"code-excerpt@npm:^3.0.0": + version: 3.0.0 + resolution: "code-excerpt@npm:3.0.0" dependencies: - yocto-queue: "npm:^1.0.0" - checksum: 10/01d9d70695187788f984226e16c903475ec6a947ee7b21948d6f597bed788e3112cc7ec2e171c1d37125057a5f45f3da21d8653e04a3a793589e12e9e80e756b + convert-to-spaces: "npm:^1.0.1" + checksum: 10/fa3a8ed15967076a43a4093b0c824cf0ada15d9aab12ea3c028851b72a69b56495aac1eadf18c3b6ae4baf0a95bb1e1faa9dbeeb0a2b2b5ae058da23328e9dd8 languageName: node linkType: hard -"p-limit@npm:^6.0.0": - version: 6.0.0 - resolution: "p-limit@npm:6.0.0" - dependencies: - yocto-queue: "npm:^1.1.1" - checksum: 10/395b82eb776dbfdfba8171ae1d60f94a0ee19cd682182a152f915c60f674d0519688dffe9b7a3f6fa8ba0b6ec7c6b115c6f64a5d6ad5ddfd250362629d77c450 +"collect-v8-coverage@npm:^1.0.0": + version: 1.0.1 + resolution: "collect-v8-coverage@npm:1.0.1" + checksum: 10/85b26945ab9b8e15077f877a4a5bc91d836480c600bac4cd0a0e8be8515583fdfc393ccff049ff3e9f46cac39e5295af049209f3c484f30a028056cc5dd1fe8a languageName: node linkType: hard -"p-locate@npm:^2.0.0": - version: 2.0.0 - resolution: "p-locate@npm:2.0.0" +"color-convert@npm:^1.9.0": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" dependencies: - p-limit: "npm:^1.1.0" - checksum: 10/e2dceb9b49b96d5513d90f715780f6f4972f46987dc32a0e18bc6c3fc74a1a5d73ec5f81b1398af5e58b99ea1ad03fd41e9181c01fa81b4af2833958696e3081 + color-name: "npm:1.1.3" + checksum: 10/ffa319025045f2973919d155f25e7c00d08836b6b33ea2d205418c59bd63a665d713c52d9737a9e0fe467fb194b40fbef1d849bae80d674568ee220a31ef3d10 languageName: node linkType: hard -"p-locate@npm:^3.0.0": - version: 3.0.0 - resolution: "p-locate@npm:3.0.0" +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" dependencies: - p-limit: "npm:^2.0.0" - checksum: 10/83991734a9854a05fe9dbb29f707ea8a0599391f52daac32b86f08e21415e857ffa60f0e120bfe7ce0cc4faf9274a50239c7895fc0d0579d08411e513b83a4ae + color-name: "npm:~1.1.4" + checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 languageName: node linkType: hard -"p-locate@npm:^4.1.0": - version: 4.1.0 - resolution: "p-locate@npm:4.1.0" - dependencies: - p-limit: "npm:^2.2.0" - checksum: 10/513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 +"color-name@npm:1.1.3": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 10/09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d languageName: node linkType: hard -"p-locate@npm:^5.0.0": - version: 5.0.0 - resolution: "p-locate@npm:5.0.0" - dependencies: - p-limit: "npm:^3.0.2" - checksum: 10/1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 +"color-name@npm:^1.1.4, color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 languageName: node linkType: hard -"p-locate@npm:^6.0.0": - version: 6.0.0 - resolution: "p-locate@npm:6.0.0" - dependencies: - p-limit: "npm:^4.0.0" - checksum: 10/2bfe5234efa5e7a4e74b30a5479a193fdd9236f8f6b4d2f3f69e3d286d9a7d7ab0c118a2a50142efcf4e41625def635bd9332d6cbf9cc65d85eb0718c579ab38 +"color-support@npm:^1.1.0, color-support@npm:^1.1.2, color-support@npm:^1.1.3": + version: 1.1.3 + resolution: "color-support@npm:1.1.3" + bin: + color-support: bin.js + checksum: 10/4bcfe30eea1498fe1cabc852bbda6c9770f230ea0e4faf4611c5858b1b9e4dde3730ac485e65f54ca182f4c50b626c1bea7c8441ceda47367a54a818c248aa7a languageName: node linkType: hard -"p-map@npm:^3.0.0": - version: 3.0.0 - resolution: "p-map@npm:3.0.0" - dependencies: - aggregate-error: "npm:^3.0.0" - checksum: 10/d4a0664d2af05d7e5f6f342e6493d4cad48f7398ac803c5066afb1f8d2010bfc2a83d935689437288f7b1a743772085b8fa0909a8282b5df4210bcda496c37c8 +"colorette@npm:^1.2.0, colorette@npm:^1.4.0": + version: 1.4.0 + resolution: "colorette@npm:1.4.0" + checksum: 10/c8d6c8c3ef5a99acfc3dd9a68f48019f1479ec347551387e4a1762e40f69e98ce19d4dc321ffb4919d1f28a7bdc90c39d4e9a901f4c474fd2124ad93a00c0454 languageName: node linkType: hard -"p-map@npm:^4.0.0": - version: 4.0.0 - resolution: "p-map@npm:4.0.0" - dependencies: - aggregate-error: "npm:^3.0.0" - checksum: 10/7ba4a2b1e24c05e1fc14bbaea0fc6d85cf005ae7e9c9425d4575550f37e2e584b1af97bcde78eacd7559208f20995988d52881334db16cf77bc1bcf68e48ed7c +"colorette@npm:^2.0.14": + version: 2.0.20 + resolution: "colorette@npm:2.0.20" + checksum: 10/0b8de48bfa5d10afc160b8eaa2b9938f34a892530b2f7d7897e0458d9535a066e3998b49da9d21161c78225b272df19ae3a64d6df28b4c9734c0e55bbd02406f languageName: node linkType: hard -"p-map@npm:^5.1.0, p-map@npm:^5.3.0": - version: 5.3.0 - resolution: "p-map@npm:5.3.0" - dependencies: - aggregate-error: "npm:^4.0.0" - checksum: 10/8d1e782e89057f8b058352f00b10641f966ba1ae1119789e37229bf910ce5dd7b78079e38c60e42a45f9bd24b8a894736646f0f35105bac2462a2e0cd53a73e4 +"colorette@npm:^2.0.16": + version: 2.0.16 + resolution: "colorette@npm:2.0.16" + checksum: 10/8501db5750d3b8f0935bdc9e999cbd6b6420b5c127a8c0bd41aaf252fe3f6636ff3a5c51e6dc8e12692e0b96ee3d28a4dfd0f89a86ef167a5728d4c926b67f31 languageName: node linkType: hard -"p-map@npm:^5.5.0": - version: 5.5.0 - resolution: "p-map@npm:5.5.0" +"columnify@npm:^1.6.0": + version: 1.6.0 + resolution: "columnify@npm:1.6.0" dependencies: - aggregate-error: "npm:^4.0.0" - checksum: 10/089a709d2525208a965b7907cc8e58af950542629b538198fc142c40e7f36b3b492dd6a46a1279515ccab58bb6f047e04593c0ab5ef4539d312adf7f761edf55 + strip-ansi: "npm:^6.0.1" + wcwidth: "npm:^1.0.0" + checksum: 10/ab742cc646c07293db603f7a4387ca9d46d32beaaba0a08008c2f31f30042e6e5a940096fb7d2d432495597ed3d5c5fe07a5bacd55e4ac24a768d344a47dd678 languageName: node linkType: hard -"p-map@npm:^7.0.2": - version: 7.0.2 - resolution: "p-map@npm:7.0.2" - checksum: 10/b4a590038b991c17b9c1484aa8c24cb9d3aa8a6167d02b9f9459c9200c7d392202a860c95b6dcd190d51f5f083ed256b32f9cb5976785022b0111bab853ec58b +"combined-stream@npm:^1.0.8": + version: 1.0.8 + resolution: "combined-stream@npm:1.0.8" + dependencies: + delayed-stream: "npm:~1.0.0" + checksum: 10/2e969e637d05d09fa50b02d74c83a1186f6914aae89e6653b62595cc75a221464f884f55f231b8f4df7a49537fba60bdc0427acd2bf324c09a1dbb84837e36e4 languageName: node linkType: hard -"p-pipe@npm:^4.0.0": - version: 4.0.0 - resolution: "p-pipe@npm:4.0.0" - checksum: 10/d2638c08e15e049e37835f3d999f0063ecd063ccac45a90925701c604f342ca376c8373ecf945e322f5112cc630644ef99ec55084e4eeb70c90cff9237b89296 +"commander@npm:8.3.0, commander@npm:^8.2.0": + version: 8.3.0 + resolution: "commander@npm:8.3.0" + checksum: 10/6b7b5d334483ce24bd73c5dac2eab901a7dbb25fd983ea24a1eeac6e7166bb1967f641546e8abf1920afbde86a45fbfe5812fbc69d0dc451bb45ca416a12a3a3 languageName: node linkType: hard -"p-queue@npm:^8.0.1": - version: 8.0.1 - resolution: "p-queue@npm:8.0.1" - dependencies: - eventemitter3: "npm:^5.0.1" - p-timeout: "npm:^6.1.2" - checksum: 10/8dcf8fbb8339675eba7d369f6eebac9e249e2412280ad73938403b83a28a2627a2072c732890d22ef98837cef89ff09eecd839cbac358cdc532d00ef4f736d0d +"commander@npm:^10.0.1": + version: 10.0.1 + resolution: "commander@npm:10.0.1" + checksum: 10/8799faa84a30da985802e661cc9856adfaee324d4b138413013ef7f087e8d7924b144c30a1f1405475f0909f467665cd9e1ce13270a2f41b141dab0b7a58f3fb languageName: node linkType: hard -"p-reduce@npm:^3.0.0": - version: 3.0.0 - resolution: "p-reduce@npm:3.0.0" - checksum: 10/387de355e906c07159d5e6270f3b58b7c7c7349ec7294ba0a9cff2a2e2faa8c602b841b079367685d3fa166a3ee529db7aaa73fadc936987c35e90f0ba64d955 +"commander@npm:^12.1.0": + version: 12.1.0 + resolution: "commander@npm:12.1.0" + checksum: 10/cdaeb672d979816853a4eed7f1310a9319e8b976172485c2a6b437ed0db0a389a44cfb222bfbde772781efa9f215bdd1b936f80d6b249485b465c6cb906e1f93 languageName: node linkType: hard -"p-retry@npm:4.6.1": - version: 4.6.1 - resolution: "p-retry@npm:4.6.1" - dependencies: - "@types/retry": "npm:^0.12.0" - retry: "npm:^0.13.1" - checksum: 10/e6d540413bb3d0b96e0db44f74a7af1dce41f5005e6e84d617960110b148348c86a3987be07797749e3ddd55817dd3a8ffd6eae3428758bc2994d987e48c3a70 +"commander@npm:^2.20.0": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b languageName: node linkType: hard -"p-retry@npm:^4.5.0": - version: 4.6.2 - resolution: "p-retry@npm:4.6.2" - dependencies: - "@types/retry": "npm:0.12.0" - retry: "npm:^0.13.1" - checksum: 10/45c270bfddaffb4a895cea16cb760dcc72bdecb6cb45fef1971fa6ea2e91ddeafddefe01e444ac73e33b1b3d5d29fb0dd18a7effb294262437221ddc03ce0f2e +"commander@npm:^7.0.0, commander@npm:^7.2.0": + version: 7.2.0 + resolution: "commander@npm:7.2.0" + checksum: 10/9973af10727ad4b44f26703bf3e9fdc323528660a7590efe3aa9ad5042b4584c0deed84ba443f61c9d6f02dade54a5a5d3c95e306a1e1630f8374ae6db16c06d languageName: node linkType: hard -"p-timeout@npm:^1.1.1": - version: 1.2.1 - resolution: "p-timeout@npm:1.2.1" +"comment-json@npm:^4.2.4": + version: 4.2.4 + resolution: "comment-json@npm:4.2.4" dependencies: - p-finally: "npm:^1.0.0" - checksum: 10/65a456f49cca1328774a6bfba61aac98d854b36df9153c2887f82f078d4399e9a30463be8a479871c22ed350a23b34a66ff303ca652b9d81ed4ff5260ac660d2 + array-timsort: "npm:^1.0.3" + core-util-is: "npm:^1.0.3" + esprima: "npm:^4.0.1" + has-own-prop: "npm:^2.0.0" + repeat-string: "npm:^1.6.1" + checksum: 10/b39109b318cbad9c8d991aebdcb1835542338b4e1c03a3d00ec72eab2e13045589c071943cb238443b9e1595800e6f82318e08aeba516d38571d7c146c58a38e languageName: node linkType: hard -"p-timeout@npm:^3.0.0, p-timeout@npm:^3.1.0": - version: 3.2.0 - resolution: "p-timeout@npm:3.2.0" - dependencies: - p-finally: "npm:^1.0.0" - checksum: 10/3dd0eaa048780a6f23e5855df3dd45c7beacff1f820476c1d0d1bcd6648e3298752ba2c877aa1c92f6453c7dd23faaf13d9f5149fc14c0598a142e2c5e8d649c +"common-ancestor-path@npm:^1.0.1": + version: 1.0.1 + resolution: "common-ancestor-path@npm:1.0.1" + checksum: 10/1d2e4186067083d8cc413f00fc2908225f04ae4e19417ded67faa6494fb313c4fcd5b28a52326d1a62b466e2b3a4325e92c31133c5fee628cdf8856b3a57c3d7 languageName: node linkType: hard -"p-timeout@npm:^6.1.2": - version: 6.1.2 - resolution: "p-timeout@npm:6.1.2" - checksum: 10/ca3ede368d792bd86fcfa4e133220536382225d31e5f62e2cedb8280df267b25f6684aa0056b22e8aa538cc85014b310058d8fdddeb0a1ff363093d56e87ac3a +"commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 10/4620bc4936a4ef12ce7dfcd272bb23a99f2ad68889a4e4ad766c9f8ad21af982511934d6f7050d4a8bde90011b1c15d56e61a1b4576d9913efbf697a20172d6c languageName: node linkType: hard -"p-try@npm:^1.0.0": - version: 1.0.0 - resolution: "p-try@npm:1.0.0" - checksum: 10/20d9735f57258158df50249f172c77fe800d31e80f11a3413ac9e68ccbe6b11798acb3f48f2df8cea7ba2b56b753ce695a4fe2a2987c3c7691c44226b6d82b6f +"compare-func@npm:^2.0.0": + version: 2.0.0 + resolution: "compare-func@npm:2.0.0" + dependencies: + array-ify: "npm:^1.0.0" + dot-prop: "npm:^5.1.0" + checksum: 10/fb71d70632baa1e93283cf9d80f30ac97f003aabee026e0b4426c9716678079ef5fea7519b84d012cbed938c476493866a38a79760564a9e21ae9433e40e6f0d languageName: node linkType: hard -"p-try@npm:^2.0.0": - version: 2.2.0 - resolution: "p-try@npm:2.2.0" - checksum: 10/f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae +"compare-versions@npm:4.1.4": + version: 4.1.4 + resolution: "compare-versions@npm:4.1.4" + checksum: 10/0c4f0d943477b824234f5c6600ea7404a86ef506c696b9d91ee67979bd32c08371a8b6532cc17e6e17cf2916e46ef16d499dce70245a4f6786c3c055afcea697 languageName: node linkType: hard -"p-wait-for@npm:^3.2.0": - version: 3.2.0 - resolution: "p-wait-for@npm:3.2.0" - dependencies: - p-timeout: "npm:^3.0.0" - checksum: 10/7f6840e9233d96836a233dee9c5b1c711bfdf76228d0eaea68fa74a79418f5eef6dc1915dadd28d17312a99f6a53daa308b1c18b779bc9c1dabcae3d6b35a086 +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10/9680699c8e2b3af0ae22592cb764acaf973f292a7b71b8a06720233011853a58e256c89216a10cbe889727532fd77f8bcd49a760cedfde271b8e006c20e079f2 languageName: node linkType: hard -"package-hash@npm:^2.0.0": - version: 2.0.0 - resolution: "package-hash@npm:2.0.0" +"concurrently@npm:6.5.1": + version: 6.5.1 + resolution: "concurrently@npm:6.5.1" dependencies: - graceful-fs: "npm:^4.1.11" - lodash.flattendeep: "npm:^4.4.0" - md5-hex: "npm:^2.0.0" - release-zalgo: "npm:^1.0.0" - checksum: 10/21c2e6be90d14fffdb960110df20f2942bf8e37157fd9071de1f4e3ae3d41cc3bbf153bed2a053d61d8ef73d0ec9c40805c44804c8063c8f7c1ebd8632085dae + chalk: "npm:^4.1.0" + date-fns: "npm:^2.16.1" + lodash: "npm:^4.17.21" + rxjs: "npm:^6.6.3" + spawn-command: "npm:^0.0.2-1" + supports-color: "npm:^8.1.0" + tree-kill: "npm:^1.2.2" + yargs: "npm:^16.2.0" + bin: + concurrently: bin/concurrently.js + checksum: 10/9ea52a75547418b64fd9d6a956f2f6ffc5b5262d99958b258dce4403b041e81dc79ae09dd9edeb4ba81df1fd6bf62d73e779b8a23c1a76e5464b151830bd92d8 languageName: node linkType: hard -"package-hash@npm:^4.0.0": - version: 4.0.0 - resolution: "package-hash@npm:4.0.0" +"config-chain@npm:^1.1.13": + version: 1.1.13 + resolution: "config-chain@npm:1.1.13" dependencies: - graceful-fs: "npm:^4.1.15" - hasha: "npm:^5.0.0" - lodash.flattendeep: "npm:^4.4.0" - release-zalgo: "npm:^1.0.0" - checksum: 10/c7209d98ac31926e0c1753d014f8b6b924e1e6a1aacf833dc99edece9c8381424c41c97c26c7eee82026944a79e99023cde5998bf515d7465c87005d52152040 + ini: "npm:^1.3.4" + proto-list: "npm:~1.2.1" + checksum: 10/83d22cabf709e7669f6870021c4d552e4fc02e9682702b726be94295f42ce76cfed00f70b2910ce3d6c9465d9758e191e28ad2e72ff4e3331768a90da6c1ef03 languageName: node linkType: hard -"package-json-from-dist@npm:^1.0.0": - version: 1.0.0 - resolution: "package-json-from-dist@npm:1.0.0" - checksum: 10/ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea +"configstore@npm:^5.0.1": + version: 5.0.1 + resolution: "configstore@npm:5.0.1" + dependencies: + dot-prop: "npm:^5.2.0" + graceful-fs: "npm:^4.1.2" + make-dir: "npm:^3.0.0" + unique-string: "npm:^2.0.0" + write-file-atomic: "npm:^3.0.0" + xdg-basedir: "npm:^4.0.0" + checksum: 10/60ef65d493b63f96e14b11ba7ec072fdbf3d40110a94fb7199d1c287761bdea5c5244e76b2596325f30c1b652213aa75de96ea20afd4a5f82065e61ea090988e languageName: node linkType: hard -"package-json@npm:^6.3.0": - version: 6.5.0 - resolution: "package-json@npm:6.5.0" - dependencies: - got: "npm:^9.6.0" - registry-auth-token: "npm:^4.0.0" - registry-url: "npm:^5.0.0" - semver: "npm:^6.2.0" - checksum: 10/adb8e49f352ea0d71a4d351732c3870d57f21e6f3921d69a83dd9ef04b45cdb0a035495826fbe9fb2cb9a7e521484404b7d527c181133867b126588efa1996c6 +"consola@npm:^2.15.0": + version: 2.15.3 + resolution: "consola@npm:2.15.3" + checksum: 10/ba5b3c6960b2eafb9d2ff2325444dd1d4eb53115df46eba823a4e7bfe6afbba0eb34747c0de82c7cd8a939db59b0cb5a8b8a54a94bb2e44feeddc26cefde3622 languageName: node linkType: hard -"packet-reader@npm:1.0.0": - version: 1.0.0 - resolution: "packet-reader@npm:1.0.0" - checksum: 10/8504cc8c32672380867e933516a029b1d4dd784c139213c85c9042ffc1162de48ec914f8c71260a9311518694cf5d0be11c67357f4b536129d2ea42aa7257ec0 +"console-browserify@npm:^1.2.0": + version: 1.2.0 + resolution: "console-browserify@npm:1.2.0" + checksum: 10/4f16c471fa84909af6ae00527ce8d19dd9ed587eab85923c145cadfbc35414139f87e7bdd61746138e22cd9df45c2a1ca060370998c2c39f801d4a778105bac5 languageName: node linkType: hard -"pacote@npm:15.2.0": - version: 15.2.0 - resolution: "pacote@npm:15.2.0" - dependencies: - "@npmcli/git": "npm:^4.0.0" - "@npmcli/installed-package-contents": "npm:^2.0.1" - "@npmcli/promise-spawn": "npm:^6.0.1" - "@npmcli/run-script": "npm:^6.0.0" - cacache: "npm:^17.0.0" - fs-minipass: "npm:^3.0.0" - minipass: "npm:^5.0.0" - npm-package-arg: "npm:^10.0.0" - npm-packlist: "npm:^7.0.0" - npm-pick-manifest: "npm:^8.0.0" - npm-registry-fetch: "npm:^14.0.0" - proc-log: "npm:^3.0.0" - promise-retry: "npm:^2.0.1" - read-package-json: "npm:^6.0.0" - read-package-json-fast: "npm:^3.0.0" - sigstore: "npm:^1.3.0" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - bin: - pacote: lib/bin.js - checksum: 10/57e18f4f963abb5f67f794158a55c01ad23f76e56dcdc74e6b843dfdda017515b0e8c0f56e60e842cd5af5ab9b351afdc49fc70633994f0e5fc0c6c9f4bcaebc +"console-control-strings@npm:^1.0.0, console-control-strings@npm:^1.1.0": + version: 1.1.0 + resolution: "console-control-strings@npm:1.1.0" + checksum: 10/27b5fa302bc8e9ae9e98c03c66d76ca289ad0c61ce2fe20ab288d288bee875d217512d2edb2363fc83165e88f1c405180cf3f5413a46e51b4fe1a004840c6cdb languageName: node linkType: hard -"pacote@npm:17.0.6": - version: 17.0.6 - resolution: "pacote@npm:17.0.6" +"console.table@npm:0.10.0": + version: 0.10.0 + resolution: "console.table@npm:0.10.0" dependencies: - "@npmcli/git": "npm:^5.0.0" - "@npmcli/installed-package-contents": "npm:^2.0.1" - "@npmcli/promise-spawn": "npm:^7.0.0" - "@npmcli/run-script": "npm:^7.0.0" - cacache: "npm:^18.0.0" - fs-minipass: "npm:^3.0.0" - minipass: "npm:^7.0.2" - npm-package-arg: "npm:^11.0.0" - npm-packlist: "npm:^8.0.0" - npm-pick-manifest: "npm:^9.0.0" - npm-registry-fetch: "npm:^16.0.0" - proc-log: "npm:^3.0.0" - promise-retry: "npm:^2.0.1" - read-package-json: "npm:^7.0.0" - read-package-json-fast: "npm:^3.0.0" - sigstore: "npm:^2.2.0" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - bin: - pacote: lib/bin.js - checksum: 10/fe96b362623128c67b4974bc2d0e8721515927c3546f04e9f3b0df0fe93ab74a8ed59c2896dec3ad1ed5395a8e439b3b64007b32d31b4b86796b50c75dffc924 + easy-table: "npm:1.1.0" + checksum: 10/bd7d1d1507c60e4d0fdfe5d94d18a6dac2d7929a216f9e3cece26fef7ee38bdc40ad96844547b0a16d978e7c410bb9f6acda249a71038e33be16160ce948121b + languageName: node + linkType: hard + +"constants-browserify@npm:^1.0.0": + version: 1.0.0 + resolution: "constants-browserify@npm:1.0.0" + checksum: 10/49ef0babd907616dddde6905b80fe44ad5948e1eaaf6cf65d5f23a8c60c029ff63a1198c364665be1d6b2cb183d7e12921f33049cc126734ade84a3cfdbc83f6 languageName: node linkType: hard -"pacote@npm:^18.0.0, pacote@npm:^18.0.6": - version: 18.0.6 - resolution: "pacote@npm:18.0.6" +"conventional-changelog-angular@npm:^6.0.0": + version: 6.0.0 + resolution: "conventional-changelog-angular@npm:6.0.0" dependencies: - "@npmcli/git": "npm:^5.0.0" - "@npmcli/installed-package-contents": "npm:^2.0.1" - "@npmcli/package-json": "npm:^5.1.0" - "@npmcli/promise-spawn": "npm:^7.0.0" - "@npmcli/run-script": "npm:^8.0.0" - cacache: "npm:^18.0.0" - fs-minipass: "npm:^3.0.0" - minipass: "npm:^7.0.2" - npm-package-arg: "npm:^11.0.0" - npm-packlist: "npm:^8.0.0" - npm-pick-manifest: "npm:^9.0.0" - npm-registry-fetch: "npm:^17.0.0" - proc-log: "npm:^4.0.0" - promise-retry: "npm:^2.0.1" - sigstore: "npm:^2.2.0" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - bin: - pacote: bin/index.js - checksum: 10/48cbcb3c20792952d431c995c2965340d3501e1795313d7225149435c883fb071d6a9bfbe11b1021dc888319f27a8c865cb70656f6472d7443545eb347447553 + compare-func: "npm:^2.0.0" + checksum: 10/ddc59ead53a45b817d83208200967f5340866782b8362d5e2e34105fdfa3d3a31585ebbdec7750bdb9de53da869f847e8ca96634a9801f51e27ecf4e7ffe2bad languageName: node linkType: hard -"pad-right@npm:^0.2.2": - version: 0.2.2 - resolution: "pad-right@npm:0.2.2" +"conventional-changelog-angular@npm:^7.0.0": + version: 7.0.0 + resolution: "conventional-changelog-angular@npm:7.0.0" dependencies: - repeat-string: "npm:^1.5.2" - checksum: 10/090fe065f979e04b251e4b33706caf5817c973f1106e445ffaee3a742e1495b0892db858ee25383f97dd048262ba969559d43f31beb385d780c9a0a24f3063d0 + compare-func: "npm:^2.0.0" + checksum: 10/e7966d2fee5475e76263f30f8b714b2b592b5bf556df225b7091e5090831fc9a20b99598a7d2997e19c2ef8118c0a3150b1eba290786367b0f55a5ccfa804ec9 languageName: node linkType: hard -"pako@npm:^1.0.3, pako@npm:~1.0.5": - version: 1.0.11 - resolution: "pako@npm:1.0.11" - checksum: 10/1ad07210e894472685564c4d39a08717e84c2a68a70d3c1d9e657d32394ef1670e22972a433cbfe48976cb98b154ba06855dcd3fcfba77f60f1777634bec48c0 +"conventional-changelog-conventionalcommits@npm:^6.1.0": + version: 6.1.0 + resolution: "conventional-changelog-conventionalcommits@npm:6.1.0" + dependencies: + compare-func: "npm:^2.0.0" + checksum: 10/7e5caef7d65b381a0b302534058acff83adc7a907094c85379ef138c35f2aa043cf8e7a3bef30f42078dcc4bff0e8bc763b179c007dd732d92856fae0607a4bc languageName: node linkType: hard -"pako@npm:^2.0.4": - version: 2.1.0 - resolution: "pako@npm:2.1.0" - checksum: 10/38a04991d0ec4f4b92794a68b8c92bf7340692c5d980255c92148da96eb3e550df7a86a7128b5ac0c65ecddfe5ef3bbe9c6dab13e1bc315086e759b18f7c1401 +"conventional-changelog-core@npm:^7.0.0": + version: 7.0.0 + resolution: "conventional-changelog-core@npm:7.0.0" + dependencies: + "@hutson/parse-repository-url": "npm:^5.0.0" + add-stream: "npm:^1.0.0" + conventional-changelog-writer: "npm:^7.0.0" + conventional-commits-parser: "npm:^5.0.0" + git-raw-commits: "npm:^4.0.0" + git-semver-tags: "npm:^7.0.0" + hosted-git-info: "npm:^7.0.0" + normalize-package-data: "npm:^6.0.0" + read-pkg: "npm:^8.0.0" + read-pkg-up: "npm:^10.0.0" + checksum: 10/e6c7cd40ae5d7de9db314252f03ebca71b239c3cb5fd8e64e72ffa04558e4cc28b073f29d5e9e96fb8069dfd0f538045d08c299254f76b698a4c1b1dfb199f20 languageName: node linkType: hard -"param-case@npm:^2.1.0": - version: 2.1.1 - resolution: "param-case@npm:2.1.1" - dependencies: - no-case: "npm:^2.2.0" - checksum: 10/3a63dcb8d8dc7995a612de061afdc7bb6fe7bd0e6db994db8d4cae999ed879859fd24389090e1a0d93f4c9207ebf8c048c870f468a3f4767161753e03cb9ab58 +"conventional-changelog-preset-loader@npm:^4.1.0": + version: 4.1.0 + resolution: "conventional-changelog-preset-loader@npm:4.1.0" + checksum: 10/8813c34884a9e3f4be9f3a9ffa216012ee40ef8c0eb1593a70fa8ab906e08de09cab9e0b769b187a43456dbcb24b01a517b3798ebc5b8b9264af2e32c976d9c9 languageName: node linkType: hard -"param-case@npm:^3.0.4": - version: 3.0.4 - resolution: "param-case@npm:3.0.4" +"conventional-changelog-writer@npm:^7.0.0, conventional-changelog-writer@npm:^7.0.1": + version: 7.0.1 + resolution: "conventional-changelog-writer@npm:7.0.1" dependencies: - dot-case: "npm:^3.0.4" - tslib: "npm:^2.0.3" - checksum: 10/b34227fd0f794e078776eb3aa6247442056cb47761e9cd2c4c881c86d84c64205f6a56ef0d70b41ee7d77da02c3f4ed2f88e3896a8fefe08bdfb4deca037c687 + conventional-commits-filter: "npm:^4.0.0" + handlebars: "npm:^4.7.7" + json-stringify-safe: "npm:^5.0.1" + meow: "npm:^12.0.1" + semver: "npm:^7.5.2" + split2: "npm:^4.0.0" + bin: + conventional-changelog-writer: cli.mjs + checksum: 10/fdb13864104eb0df33bb21397091837177da2e24afe1380b4c48921db01d59b3016254d6d6f2de663a86fc7eac8537fcd1fa924354d478d9f2d5eec026b5f554 languageName: node linkType: hard -"parent-module@npm:^1.0.0": - version: 1.0.1 - resolution: "parent-module@npm:1.0.1" - dependencies: - callsites: "npm:^3.0.0" - checksum: 10/6ba8b255145cae9470cf5551eb74be2d22281587af787a2626683a6c20fbb464978784661478dd2a3f1dad74d1e802d403e1b03c1a31fab310259eec8ac560ff +"conventional-commits-filter@npm:^4.0.0": + version: 4.0.0 + resolution: "conventional-commits-filter@npm:4.0.0" + checksum: 10/46d2d90531f024d596f61d353876276e5357adb5c4684e042467bb7d159feb0a2831b74656bd3038ac9ec38d99b0b24ac39f319ad511861e1299c4cdfb5a119a languageName: node linkType: hard -"parent-module@npm:^2.0.0": - version: 2.0.0 - resolution: "parent-module@npm:2.0.0" +"conventional-commits-parser@npm:^4.0.0": + version: 4.0.0 + resolution: "conventional-commits-parser@npm:4.0.0" dependencies: - callsites: "npm:^3.1.0" - checksum: 10/f131f13d687a938556a01033561fb1b274b39921eb4425c7a691f0d91dcfbe9b19759c2b8d425a3ee7c8a46874e57fa418a690643880c3c7c56827aba12f78dd + JSONStream: "npm:^1.3.5" + is-text-path: "npm:^1.0.1" + meow: "npm:^8.1.2" + split2: "npm:^3.2.2" + bin: + conventional-commits-parser: cli.js + checksum: 10/d3b7d947b486d3bb40f961808947ee46487429e050be840030211a80aa2eec170e427207c830f2720d8ab898649a652bbbe1825993b8bf0596517e3603f5a1bd languageName: node linkType: hard -"parse-asn1@npm:^5.0.0": - version: 5.1.6 - resolution: "parse-asn1@npm:5.1.6" +"conventional-commits-parser@npm:^5.0.0": + version: 5.0.0 + resolution: "conventional-commits-parser@npm:5.0.0" dependencies: - asn1.js: "npm:^5.2.0" - browserify-aes: "npm:^1.0.0" - evp_bytestokey: "npm:^1.0.0" - pbkdf2: "npm:^3.0.3" - safe-buffer: "npm:^5.1.1" - checksum: 10/4e9ec3bd59df66fcb9d272c801e7dbafd2511dc5a559bcd346b9e228f72e47a6d4d081e8c71340a107bca3a8049975c08cd9270c2de122098e3174122ec39228 + JSONStream: "npm:^1.3.5" + is-text-path: "npm:^2.0.0" + meow: "npm:^12.0.1" + split2: "npm:^4.0.0" + bin: + conventional-commits-parser: cli.mjs + checksum: 10/3b56a9313127f18c56b7fc0fdb0c49d2184ec18e0574e64580a0d5a3c3e0f3eecfb8bc3131dce967bfe9fd27debd5f42b7fc1f09e8e541e688e1dd2b57f49278 languageName: node linkType: hard -"parse-asn1@npm:^5.1.7": - version: 5.1.7 - resolution: "parse-asn1@npm:5.1.7" +"conventional-recommended-bump@npm:^9.0.0": + version: 9.0.0 + resolution: "conventional-recommended-bump@npm:9.0.0" dependencies: - asn1.js: "npm:^4.10.1" - browserify-aes: "npm:^1.2.0" - evp_bytestokey: "npm:^1.0.3" - hash-base: "npm:~3.0" - pbkdf2: "npm:^3.1.2" - safe-buffer: "npm:^5.2.1" - checksum: 10/f82c079f4d9a4d33159c7682f9c516680f4d659fde8060697a6b3c1be4795976e826d53a1e5751a81ddc800e9c6d6fa4629b59f6d1f3241ac8447a00c89a67d3 + conventional-changelog-preset-loader: "npm:^4.1.0" + conventional-commits-filter: "npm:^4.0.0" + conventional-commits-parser: "npm:^5.0.0" + git-raw-commits: "npm:^4.0.0" + git-semver-tags: "npm:^7.0.0" + meow: "npm:^12.0.1" + bin: + conventional-recommended-bump: cli.mjs + checksum: 10/a24350a2e1633bf22da884933bd0fffe750547fa9df51d8d3aeaacf5d0447f12d9bc8bf994294b945c6c79beecdfc491f47b5e07d20ebacc663c48c057344b71 languageName: node linkType: hard -"parse-conflict-json@npm:^3.0.0": - version: 3.0.1 - resolution: "parse-conflict-json@npm:3.0.1" +"convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": + version: 1.8.0 + resolution: "convert-source-map@npm:1.8.0" dependencies: - json-parse-even-better-errors: "npm:^3.0.0" - just-diff: "npm:^6.0.0" - just-diff-apply: "npm:^5.2.0" - checksum: 10/ceb13ca90bd75610559125dc7b519e2806c096640142d6524e9b1ffdf08d6625b03a29d8afe4630d95460f703b9d5bc6dac21fcdcb00089213ffdb70800c900b + safe-buffer: "npm:~5.1.1" + checksum: 10/985d974a2d33e1a2543ada51c93e1ba2f73eaed608dc39f229afc78f71dcc4c8b7d7c684aa647e3c6a3a204027444d69e53e169ce94e8d1fa8d7dee80c9c8fed + languageName: node + linkType: hard + +"convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 10/c987be3ec061348cdb3c2bfb924bec86dea1eacad10550a85ca23edb0fe3556c3a61c7399114f3331ccb3499d7fd0285ab24566e5745929412983494c3926e15 languageName: node linkType: hard -"parse-duration@npm:^1.0.0": +"convert-to-spaces@npm:^1.0.1": version: 1.0.2 - resolution: "parse-duration@npm:1.0.2" - checksum: 10/1e7eb9e6e040ce63c6deb92c182d93ad521e45672ba3eb5187f646358923f94baf546c28b5d46d72b6d38ed2c418acc00e7c9b768905fa51a491c7e09d3d9a03 + resolution: "convert-to-spaces@npm:1.0.2" + checksum: 10/e73f2ae39eb2b184f0796138eaab9c088b03b94937377d31be5b2282aef6a6ccce6b46f51bd99b3b7dfc70f516e2a6b16c0dd911883bfadf8d1073f462480224 languageName: node linkType: hard -"parse-duration@npm:^1.0.2": - version: 1.1.0 - resolution: "parse-duration@npm:1.1.0" - checksum: 10/c26ab1e3fdf1dc4b7006e87a82fd33c7dbee3116413a59369bbc3b160a8e7ed88616852c4c3dde23b7a857e270cb18fccf629ff52220803194239f8e092774a9 +"cookie@npm:~0.7.2": + version: 0.7.2 + resolution: "cookie@npm:0.7.2" + checksum: 10/24b286c556420d4ba4e9bc09120c9d3db7d28ace2bd0f8ccee82422ce42322f73c8312441271e5eefafbead725980e5996cc02766dbb89a90ac7f5636ede608f languageName: node linkType: hard -"parse-glob@npm:^3.0.4": - version: 3.0.4 - resolution: "parse-glob@npm:3.0.4" +"core-util-is@npm:^1.0.3, core-util-is@npm:~1.0.0": + version: 1.0.3 + resolution: "core-util-is@npm:1.0.3" + checksum: 10/9de8597363a8e9b9952491ebe18167e3b36e7707569eed0ebf14f8bba773611376466ae34575bca8cfe3c767890c859c74056084738f09d4e4a6f902b2ad7d99 + languageName: node + linkType: hard + +"cors@npm:~2.8.5": + version: 2.8.5 + resolution: "cors@npm:2.8.5" dependencies: - glob-base: "npm:^0.3.0" - is-dotfile: "npm:^1.0.0" - is-extglob: "npm:^1.0.0" - is-glob: "npm:^2.0.0" - checksum: 10/447bc442d76522c5e03b5babc8582d4a37fe9d59b3e5ef8d7ddae4e03060637ae38d5d28686e03c27e4d20be34983b5cb053cf8b066d34be0f9d1867eb677e45 + object-assign: "npm:^4" + vary: "npm:^1" + checksum: 10/66e88e08edee7cbce9d92b4d28a2028c88772a4c73e02f143ed8ca76789f9b59444eed6b1c167139e76fa662998c151322720093ba229f9941365ada5a6fc2c6 languageName: node linkType: hard -"parse-headers@npm:^2.0.0": - version: 2.0.4 - resolution: "parse-headers@npm:2.0.4" - checksum: 10/d3d49061992dad48dcca07f4e9f0f6e76e790e744874fdd800afba3eca6aa6e0496af587201133af2503ca733e00eab463029998191f3e12ef23b4186a146ca2 +"cosmiconfig-typescript-loader@npm:^4.0.0": + version: 4.4.0 + resolution: "cosmiconfig-typescript-loader@npm:4.4.0" + peerDependencies: + "@types/node": "*" + cosmiconfig: ">=7" + ts-node: ">=10" + typescript: ">=4" + checksum: 10/7450491304cf498aa8bf9bffab5aaa189c1abc3e763e4ca7afca32d7c62cdba9abbc032e754ec2a6980580127c39d7227e9e5ea453c3456f150ab09196ae2661 languageName: node linkType: hard -"parse-json@npm:^2.2.0": - version: 2.2.0 - resolution: "parse-json@npm:2.2.0" +"cosmiconfig@npm:^7.0.1": + version: 7.0.1 + resolution: "cosmiconfig@npm:7.0.1" dependencies: - error-ex: "npm:^1.2.0" - checksum: 10/39924c0ddbf6f2544ab92acea61d91a0fb0ac959b0d19d273468cf8aa977522f8076e8fbb29cdab75c1440ebc2e172389988274890373d95fe308837074cc7e0 + "@types/parse-json": "npm:^4.0.0" + import-fresh: "npm:^3.2.1" + parse-json: "npm:^5.0.0" + path-type: "npm:^4.0.0" + yaml: "npm:^1.10.0" + checksum: 10/861bf4c2c9e88e6c50f14278b25bb0509c484623de11fadf3788a3d543bc7c45178aeebeb6657293b12dc8bd1b86d926c5f25c803c4dc3821d628a1b24c3d20b languageName: node linkType: hard -"parse-json@npm:^4.0.0": - version: 4.0.0 - resolution: "parse-json@npm:4.0.0" +"cosmiconfig@npm:^7.1.0": + version: 7.1.0 + resolution: "cosmiconfig@npm:7.1.0" dependencies: - error-ex: "npm:^1.3.1" - json-parse-better-errors: "npm:^1.0.1" - checksum: 10/0fe227d410a61090c247e34fa210552b834613c006c2c64d9a05cfe9e89cf8b4246d1246b1a99524b53b313e9ac024438d0680f67e33eaed7e6f38db64cfe7b5 + "@types/parse-json": "npm:^4.0.0" + import-fresh: "npm:^3.2.1" + parse-json: "npm:^5.0.0" + path-type: "npm:^4.0.0" + yaml: "npm:^1.10.0" + checksum: 10/03600bb3870c80ed151b7b706b99a1f6d78df8f4bdad9c95485072ea13358ef294b13dd99f9e7bf4cc0b43bcd3599d40df7e648750d21c2f6817ca2cd687e071 languageName: node linkType: hard -"parse-json@npm:^5.0.0, parse-json@npm:^5.2.0": - version: 5.2.0 - resolution: "parse-json@npm:5.2.0" +"cosmiconfig@npm:^8.0.0": + version: 8.3.5 + resolution: "cosmiconfig@npm:8.3.5" dependencies: - "@babel/code-frame": "npm:^7.0.0" - error-ex: "npm:^1.3.1" - json-parse-even-better-errors: "npm:^2.3.0" - lines-and-columns: "npm:^1.1.6" - checksum: 10/62085b17d64da57f40f6afc2ac1f4d95def18c4323577e1eced571db75d9ab59b297d1d10582920f84b15985cbfc6b6d450ccbf317644cfa176f3ed982ad87e2 + import-fresh: "npm:^3.3.0" + js-yaml: "npm:^4.1.0" + parse-json: "npm:^5.2.0" + path-type: "npm:^4.0.0" + peerDependencies: + typescript: ">=4.9.5" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/f1963997fb42bc9c3d1b7d553b72ca48f58deb2ea1bb7736930aa7255b876179f35a74dffaa0a95b9d5d7a830b04d592bc34173baad14b8084933a49a873971d languageName: node linkType: hard -"parse-json@npm:^7.0.0": - version: 7.1.0 - resolution: "parse-json@npm:7.1.0" +"cosmiconfig@npm:^9.0.0": + version: 9.0.0 + resolution: "cosmiconfig@npm:9.0.0" dependencies: - "@babel/code-frame": "npm:^7.21.4" - error-ex: "npm:^1.3.2" - json-parse-even-better-errors: "npm:^3.0.0" - lines-and-columns: "npm:^2.0.3" - type-fest: "npm:^3.8.0" - checksum: 10/bf9bc646e8b8cb9ae638988a303bf09866c13d2829c2ff75ee87c27631dac06d0d6e81913f8824c3c4586015bf3f0a6fee1dece168b37932d175ef0709e8860a + env-paths: "npm:^2.2.1" + import-fresh: "npm:^3.3.0" + js-yaml: "npm:^4.1.0" + parse-json: "npm:^5.2.0" + peerDependencies: + typescript: ">=4.9.5" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/8bdf1dfbb6fdb3755195b6886dc0649a3c742ec75afa4cb8da7b070936aed22a4f4e5b7359faafe03180358f311dbc300d248fd6586c458203d376a40cc77826 languageName: node linkType: hard -"parse-json@npm:^8.0.0": - version: 8.1.0 - resolution: "parse-json@npm:8.1.0" +"cp-file@npm:^9.1.0": + version: 9.1.0 + resolution: "cp-file@npm:9.1.0" dependencies: - "@babel/code-frame": "npm:^7.22.13" - index-to-position: "npm:^0.1.2" - type-fest: "npm:^4.7.1" - checksum: 10/efc4256c91e835b1340e2b4f535272247f174fcba85eead15ff938be23b3ca2d521a04c76e564d1dc2f61c0c9ebcb6157d5433d459c7e736c81d014b49577b31 + graceful-fs: "npm:^4.1.2" + make-dir: "npm:^3.0.0" + nested-error-stacks: "npm:^2.0.0" + p-event: "npm:^4.1.0" + checksum: 10/3251e3c895304eeefc2394efea27e5527e79ab747bdd096cf3fac050818ad1e7a62885d5d8dbcc63bc01d8116a23a448407e145d4e9d9c3c1b28305ac5af6f31 languageName: node linkType: hard -"parse-ms@npm:^2.1.0": - version: 2.1.0 - resolution: "parse-ms@npm:2.1.0" - checksum: 10/517eab80cdb9df6ae22a8fad944bfb4289482699bcde5211a1c127091dfea33c3dcb217246b188865fc32e998bcee815bfa4a863f41e3b2d0bcc69f34ef1a543 +"cpy-cli@npm:4.2.0": + version: 4.2.0 + resolution: "cpy-cli@npm:4.2.0" + dependencies: + cpy: "npm:^9.0.0" + meow: "npm:^10.1.2" + bin: + cpy: cli.js + checksum: 10/df741608b3e06484ce9ef92aba074acbf4c6e7aa0ec48bc0457314db13e3fa62e023d562f91f71c8dec69485fc883194974f2aa20cd6a11e97e2838823701056 languageName: node linkType: hard -"parse-node-version@npm:^1.0.1": - version: 1.0.1 - resolution: "parse-node-version@npm:1.0.1" - checksum: 10/ac9b40c6473035ec2dd0afe793b226743055f8119b50853be2022c817053c3377d02b4bb42e0735d9dcb6c32d16478086934b0a8de570a5f5eebacbfc1514ccd +"cpy@npm:^9.0.0": + version: 9.0.1 + resolution: "cpy@npm:9.0.1" + dependencies: + arrify: "npm:^3.0.0" + cp-file: "npm:^9.1.0" + globby: "npm:^13.1.1" + junk: "npm:^4.0.0" + micromatch: "npm:^4.0.4" + nested-error-stacks: "npm:^2.1.0" + p-filter: "npm:^3.0.0" + p-map: "npm:^5.3.0" + checksum: 10/e0306c5508b6c78529aab7f6f8222906744b0519e4eecd5510e4fb6d2484179fdca10ace86aaaf4a49db967b8fb0866e7aa0578eab5a3697abad3a77ed9c5dca languageName: node linkType: hard -"parse-passwd@npm:^1.0.0": - version: 1.0.0 - resolution: "parse-passwd@npm:1.0.0" - checksum: 10/4e55e0231d58f828a41d0f1da2bf2ff7bcef8f4cb6146e69d16ce499190de58b06199e6bd9b17fbf0d4d8aef9052099cdf8c4f13a6294b1a522e8e958073066e +"crc-32@npm:^1.2.2": + version: 1.2.2 + resolution: "crc-32@npm:1.2.2" + bin: + crc32: bin/crc32.njs + checksum: 10/824f696a5baaf617809aa9cd033313c8f94f12d15ebffa69f10202480396be44aef9831d900ab291638a8022ed91c360696dd5b1ba691eb3f34e60be8835b7c3 languageName: node linkType: hard -"parse-path@npm:^7.0.0": - version: 7.0.0 - resolution: "parse-path@npm:7.0.0" +"create-ecdh@npm:^4.0.0": + version: 4.0.4 + resolution: "create-ecdh@npm:4.0.4" dependencies: - protocols: "npm:^2.0.0" - checksum: 10/2e6eadae5aff97a8b6373c1c08440bfeed814f65452674a139dc606c7c410e8e48b7983fe451aedc59802a2814121b40415ca00675c1546ff75cb73ad0c1df5a - languageName: node - linkType: hard - -"parse-srcset@npm:^1.0.2": - version: 1.0.2 - resolution: "parse-srcset@npm:1.0.2" - checksum: 10/d40c131cfc3ab7bb6333b788d30a30d063d76a83b49fa752229823f96475e36cf29fea09e035ce3b2a634b686e93e2a7429cb8dad0041d8a3a3df622093b9ea1 + bn.js: "npm:^4.1.0" + elliptic: "npm:^6.5.3" + checksum: 10/0dd7fca9711d09e152375b79acf1e3f306d1a25ba87b8ff14c2fd8e68b83aafe0a7dd6c4e540c9ffbdd227a5fa1ad9b81eca1f233c38bb47770597ba247e614b languageName: node linkType: hard -"parse-url@npm:^8.1.0": - version: 8.1.0 - resolution: "parse-url@npm:8.1.0" +"create-hash@npm:^1.1.0, create-hash@npm:^1.1.2, create-hash@npm:^1.2.0": + version: 1.2.0 + resolution: "create-hash@npm:1.2.0" dependencies: - parse-path: "npm:^7.0.0" - checksum: 10/ceb51dc474568092a50d6d936036dfe438a87aa45bcf20947c8fcdf1544ee9c50255608abae604644e718e91e0b83cfbea4675e8b2fd90bc197432f6d9be263c + cipher-base: "npm:^1.0.1" + inherits: "npm:^2.0.1" + md5.js: "npm:^1.3.4" + ripemd160: "npm:^2.0.1" + sha.js: "npm:^2.4.0" + checksum: 10/3cfef32043b47a8999602af9bcd74966db6971dd3eb828d1a479f3a44d7f58e38c1caf34aa21a01941cc8d9e1a841738a732f200f00ea155f8a8835133d2e7bc languageName: node linkType: hard -"parse5-html-rewriting-stream@npm:7.0.0": - version: 7.0.0 - resolution: "parse5-html-rewriting-stream@npm:7.0.0" +"create-hmac@npm:^1.1.0, create-hmac@npm:^1.1.4, create-hmac@npm:^1.1.7": + version: 1.1.7 + resolution: "create-hmac@npm:1.1.7" dependencies: - entities: "npm:^4.3.0" - parse5: "npm:^7.0.0" - parse5-sax-parser: "npm:^7.0.0" - checksum: 10/f16f602f5107cc6a60126695dd7e21eaf7b31e93bbca47d4c54c8448db4b91a6c7fbf9ffff8d1148c117ed32d0ce7ff02b114f15014744abcefac8d0eee8c6da + cipher-base: "npm:^1.0.3" + create-hash: "npm:^1.1.0" + inherits: "npm:^2.0.1" + ripemd160: "npm:^2.0.0" + safe-buffer: "npm:^5.0.1" + sha.js: "npm:^2.4.8" + checksum: 10/2b26769f87e99ef72150bf99d1439d69272b2e510e23a2b8daf4e93e2412f4842504237d726044fa797cb20ee0ec8bee78d414b11f2d7ca93299185c93df0dae languageName: node linkType: hard -"parse5-htmlparser2-tree-adapter@npm:^7.0.0": - version: 7.0.0 - resolution: "parse5-htmlparser2-tree-adapter@npm:7.0.0" - dependencies: - domhandler: "npm:^5.0.2" - parse5: "npm:^7.0.0" - checksum: 10/23dbe45fdd338fe726cf5c55b236e1f403aeb0c1b926e18ab8ef0aa580980a25f8492d160fe2ed0ec906c3c8e38b51e68ef5620a3b9460d9458ea78946a3f7c0 +"create-require@npm:^1.1.0": + version: 1.1.1 + resolution: "create-require@npm:1.1.1" + checksum: 10/a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff languageName: node linkType: hard -"parse5-sax-parser@npm:^7.0.0": - version: 7.0.0 - resolution: "parse5-sax-parser@npm:7.0.0" +"cross-env@npm:7.0.3": + version: 7.0.3 + resolution: "cross-env@npm:7.0.3" dependencies: - parse5: "npm:^7.0.0" - checksum: 10/b3b6ea12a38b58871111f7e235c31f96776b382d0b066b6dee17f815a13754bb3248a9a76007168e2a30d66def14161efcffb0bc8d71848a2159e6974b949c00 + cross-spawn: "npm:^7.0.1" + bin: + cross-env: src/bin/cross-env.js + cross-env-shell: src/bin/cross-env-shell.js + checksum: 10/e99911f0d31c20e990fd92d6fd001f4b01668a303221227cc5cb42ed155f086351b1b3bd2699b200e527ab13011b032801f8ce638e6f09f854bdf744095e604c languageName: node linkType: hard -"parse5@npm:6.0.1": - version: 6.0.1 - resolution: "parse5@npm:6.0.1" - checksum: 10/dfb110581f62bd1425725a7c784ae022a24669bd0efc24b58c71fc731c4d868193e2ebd85b74cde2dbb965e4dcf07059b1e651adbec1b3b5267531bd132fdb75 +"cross-fetch@npm:^3.1.5": + version: 3.1.8 + resolution: "cross-fetch@npm:3.1.8" + dependencies: + node-fetch: "npm:^2.6.12" + checksum: 10/ac8c4ca87d2ac0e17a19b6a293a67ee8934881aee5ec9a5a8323c30e9a9a60a0f5291d3c0d633ec2a2f970cbc60978d628804dfaf03add92d7e720b6d37f392c languageName: node linkType: hard -"parse5@npm:^7.0.0": - version: 7.1.2 - resolution: "parse5@npm:7.1.2" +"cross-spawn@npm:^6.0.5": + version: 6.0.5 + resolution: "cross-spawn@npm:6.0.5" dependencies: - entities: "npm:^4.4.0" - checksum: 10/3c86806bb0fb1e9a999ff3a4c883b1ca243d99f45a619a0898dbf021a95a0189ed955c31b07fe49d342b54e814f33f2c9d7489198e8630dacd5477d413ec5782 + nice-try: "npm:^1.0.4" + path-key: "npm:^2.0.1" + semver: "npm:^5.5.0" + shebang-command: "npm:^1.2.0" + which: "npm:^1.2.9" + checksum: 10/f07e643b4875f26adffcd7f13bc68d9dff20cf395f8ed6f43a23f3ee24fc3a80a870a32b246fd074e514c8fd7da5f978ac6a7668346eec57aa87bac89c1ed3a1 languageName: node linkType: hard -"parseurl@npm:^1.3.3, parseurl@npm:~1.3.2, parseurl@npm:~1.3.3": - version: 1.3.3 - resolution: "parseurl@npm:1.3.3" - checksum: 10/407cee8e0a3a4c5cd472559bca8b6a45b82c124e9a4703302326e9ab60fc1081442ada4e02628efef1eb16197ddc7f8822f5a91fd7d7c86b51f530aedb17dfa2 +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/e1a13869d2f57d974de0d9ef7acbf69dc6937db20b918525a01dacb5032129bd552d290d886d981e99f1b624cb03657084cc87bd40f115c07ecf376821c729ce languageName: node linkType: hard -"pascal-case@npm:^2.0.0, pascal-case@npm:^2.0.1": - version: 2.0.1 - resolution: "pascal-case@npm:2.0.1" +"crypto-browserify@npm:3.12.0, crypto-browserify@npm:^3.12.0": + version: 3.12.0 + resolution: "crypto-browserify@npm:3.12.0" dependencies: - camel-case: "npm:^3.0.0" - upper-case-first: "npm:^1.1.0" - checksum: 10/4c539bf556572812f64a02fc6b544f3d2b51db12aed484e5162ed7f8ac2b366775d15e536091c890d71d82bdf9153128321f21574721b3a984bd85df9e519a35 + browserify-cipher: "npm:^1.0.0" + browserify-sign: "npm:^4.0.0" + create-ecdh: "npm:^4.0.0" + create-hash: "npm:^1.1.0" + create-hmac: "npm:^1.1.0" + diffie-hellman: "npm:^5.0.0" + inherits: "npm:^2.0.1" + pbkdf2: "npm:^3.0.3" + public-encrypt: "npm:^4.0.0" + randombytes: "npm:^2.0.0" + randomfill: "npm:^1.0.3" + checksum: 10/5ab534474e24c8c3925bd1ec0de57c9022329cb267ca8437f1e3a7200278667c0bea0a51235030a9da3165c1885c73f51cfbece1eca31fd4a53cfea23f628c9b languageName: node linkType: hard -"pascal-case@npm:^3.1.2": - version: 3.1.2 - resolution: "pascal-case@npm:3.1.2" - dependencies: - no-case: "npm:^3.0.4" - tslib: "npm:^2.0.3" - checksum: 10/ba98bfd595fc91ef3d30f4243b1aee2f6ec41c53b4546bfa3039487c367abaa182471dcfc830a1f9e1a0df00c14a370514fa2b3a1aacc68b15a460c31116873e +"crypto-random-string@npm:^2.0.0": + version: 2.0.0 + resolution: "crypto-random-string@npm:2.0.0" + checksum: 10/0283879f55e7c16fdceacc181f87a0a65c53bc16ffe1d58b9d19a6277adcd71900d02bb2c4843dd55e78c51e30e89b0fec618a7f170ebcc95b33182c28f05fd6 languageName: node linkType: hard -"pascalcase@npm:^0.1.1": - version: 0.1.1 - resolution: "pascalcase@npm:0.1.1" - checksum: 10/f83681c3c8ff75fa473a2bb2b113289952f802ff895d435edd717e7cb898b0408cbdb247117a938edcbc5d141020909846cc2b92c47213d764e2a94d2ad2b925 +"cspell-config-lib@npm:8.10.4": + version: 8.10.4 + resolution: "cspell-config-lib@npm:8.10.4" + dependencies: + "@cspell/cspell-types": "npm:8.10.4" + comment-json: "npm:^4.2.4" + yaml: "npm:^2.4.5" + checksum: 10/dfe86bb6325666913665106749163482413e9bf754e53405dbf87a8add4979db7f8db7865bc7a2c35ee51614984e00e26a9fbd93396cca73600e3b48a733a76b languageName: node linkType: hard -"patch-console@npm:^1.0.0": - version: 1.0.0 - resolution: "patch-console@npm:1.0.0" - checksum: 10/8cd738aa470f2e9463fca35da6a19403384ac555004f698ddd3dfdb69135ab60fe9bd2edd1dbdd8c09d92c0a2190fd0f7337fe48123013baf8ffec8532885a3a +"cspell-dictionary@npm:8.10.4": + version: 8.10.4 + resolution: "cspell-dictionary@npm:8.10.4" + dependencies: + "@cspell/cspell-pipe": "npm:8.10.4" + "@cspell/cspell-types": "npm:8.10.4" + cspell-trie-lib: "npm:8.10.4" + fast-equals: "npm:^5.0.1" + gensequence: "npm:^7.0.0" + checksum: 10/2919fa4396d89ea31f7f132258a85bbc8611f30a85a511e3f151e413c4223cdce09f4102de2e59409c6c43ec963856b0f46176e5aff756023c7a40ae91300388 languageName: node linkType: hard -"path-browserify@npm:1.0.1, path-browserify@npm:^1.0.1": - version: 1.0.1 - resolution: "path-browserify@npm:1.0.1" - checksum: 10/7e7368a5207e7c6b9051ef045711d0dc3c2b6203e96057e408e6e74d09f383061010d2be95cb8593fe6258a767c3e9fc6b2bfc7ce8d48ae8c3d9f6994cca9ad8 +"cspell-gitignore@npm:8.10.4": + version: 8.10.4 + resolution: "cspell-gitignore@npm:8.10.4" + dependencies: + "@cspell/url": "npm:8.10.4" + cspell-glob: "npm:8.10.4" + cspell-io: "npm:8.10.4" + find-up-simple: "npm:^1.0.0" + bin: + cspell-gitignore: bin.mjs + checksum: 10/d88f4cbd4f78475b71a9aae586907a097a6cf35a80e7b54448c59e134ea5d2506b7c6cc752ed35cc3ccd6bd517de7cf899aee9d4208bbbd38e7205b8bf89920b languageName: node linkType: hard -"path-case@npm:^2.1.0": - version: 2.1.1 - resolution: "path-case@npm:2.1.1" +"cspell-glob@npm:8.10.4": + version: 8.10.4 + resolution: "cspell-glob@npm:8.10.4" dependencies: - no-case: "npm:^2.2.0" - checksum: 10/eb1da508c28378715cbe4ce054ee5f83a570c5010f041f4cfb439c811f7a78e36c46f26a8d59b2594c3882b53db06ef26195519c27f86523dc5d19c2e29f306d + "@cspell/url": "npm:8.10.4" + micromatch: "npm:^4.0.7" + checksum: 10/5d4891bd4b8ab49f68b6791c575d98ec61ab7c87a0d729789c2e9612ed3fe7332f4c9b953270119864e8e32589cd8a5e45695dabfe64d4196e1c1364f1330486 languageName: node linkType: hard -"path-exists@npm:^2.0.0": - version: 2.1.0 - resolution: "path-exists@npm:2.1.0" +"cspell-grammar@npm:8.10.4": + version: 8.10.4 + resolution: "cspell-grammar@npm:8.10.4" dependencies: - pinkie-promise: "npm:^2.0.0" - checksum: 10/fdb734f1d00f225f7a0033ce6d73bff6a7f76ea08936abf0e5196fa6e54a645103538cd8aedcb90d6d8c3fa3705ded0c58a4da5948ae92aa8834892c1ab44a84 + "@cspell/cspell-pipe": "npm:8.10.4" + "@cspell/cspell-types": "npm:8.10.4" + bin: + cspell-grammar: bin.mjs + checksum: 10/f84cc9eb0bb1df57bca4301d47a02c6841da8981fd93b015223543052c0fb92aa1ab3348bc2f901c7ee12d14b4328579cff02429c042f08ea1af5371f68a605a languageName: node linkType: hard -"path-exists@npm:^3.0.0": - version: 3.0.0 - resolution: "path-exists@npm:3.0.0" - checksum: 10/96e92643aa34b4b28d0de1cd2eba52a1c5313a90c6542d03f62750d82480e20bfa62bc865d5cfc6165f5fcd5aeb0851043c40a39be5989646f223300021bae0a +"cspell-io@npm:8.10.4": + version: 8.10.4 + resolution: "cspell-io@npm:8.10.4" + dependencies: + "@cspell/cspell-service-bus": "npm:8.10.4" + "@cspell/url": "npm:8.10.4" + checksum: 10/0fcd4263bef3fea7f01059381d28a17030e8e31f8677dc6f5fc438e1ef73ac1e1aa996040b13f17798adb6c943a26f80b75ce25d2dda96c8dcf5fcb4e4a9c0c8 languageName: node linkType: hard -"path-exists@npm:^4.0.0": - version: 4.0.0 - resolution: "path-exists@npm:4.0.0" - checksum: 10/505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 +"cspell-lib@npm:8.10.4": + version: 8.10.4 + resolution: "cspell-lib@npm:8.10.4" + dependencies: + "@cspell/cspell-bundled-dicts": "npm:8.10.4" + "@cspell/cspell-pipe": "npm:8.10.4" + "@cspell/cspell-resolver": "npm:8.10.4" + "@cspell/cspell-types": "npm:8.10.4" + "@cspell/dynamic-import": "npm:8.10.4" + "@cspell/strong-weak-map": "npm:8.10.4" + "@cspell/url": "npm:8.10.4" + clear-module: "npm:^4.1.2" + comment-json: "npm:^4.2.4" + cspell-config-lib: "npm:8.10.4" + cspell-dictionary: "npm:8.10.4" + cspell-glob: "npm:8.10.4" + cspell-grammar: "npm:8.10.4" + cspell-io: "npm:8.10.4" + cspell-trie-lib: "npm:8.10.4" + env-paths: "npm:^3.0.0" + fast-equals: "npm:^5.0.1" + gensequence: "npm:^7.0.0" + import-fresh: "npm:^3.3.0" + resolve-from: "npm:^5.0.0" + vscode-languageserver-textdocument: "npm:^1.0.11" + vscode-uri: "npm:^3.0.8" + xdg-basedir: "npm:^5.1.0" + checksum: 10/bee2de73af7fc3913af79729040e767ecd251ba1ce1e569d841da9a42245e80aa363af496f2d585aacf3baa8ec8299de41f29db7b75c8f62eb45bade09e72077 languageName: node linkType: hard -"path-exists@npm:^5.0.0": - version: 5.0.0 - resolution: "path-exists@npm:5.0.0" - checksum: 10/8ca842868cab09423994596eb2c5ec2a971c17d1a3cb36dbf060592c730c725cd524b9067d7d2a1e031fef9ba7bd2ac6dc5ec9fb92aa693265f7be3987045254 +"cspell-trie-lib@npm:8.10.4": + version: 8.10.4 + resolution: "cspell-trie-lib@npm:8.10.4" + dependencies: + "@cspell/cspell-pipe": "npm:8.10.4" + "@cspell/cspell-types": "npm:8.10.4" + gensequence: "npm:^7.0.0" + checksum: 10/283d3bcdcf746e9f80178054f821876c80bfeb9ec5be825dcf2bf38f0a5a5e6b04bed8d90da45a774c31b0adc20e77ce16e28044232c5f371fe5782fa554e5cd languageName: node linkType: hard -"path-is-absolute@npm:^1.0.0": - version: 1.0.1 - resolution: "path-is-absolute@npm:1.0.1" - checksum: 10/060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 +"cspell@npm:8.10.4": + version: 8.10.4 + resolution: "cspell@npm:8.10.4" + dependencies: + "@cspell/cspell-json-reporter": "npm:8.10.4" + "@cspell/cspell-pipe": "npm:8.10.4" + "@cspell/cspell-types": "npm:8.10.4" + "@cspell/dynamic-import": "npm:8.10.4" + chalk: "npm:^5.3.0" + chalk-template: "npm:^1.1.0" + commander: "npm:^12.1.0" + cspell-gitignore: "npm:8.10.4" + cspell-glob: "npm:8.10.4" + cspell-io: "npm:8.10.4" + cspell-lib: "npm:8.10.4" + fast-glob: "npm:^3.3.2" + fast-json-stable-stringify: "npm:^2.1.0" + file-entry-cache: "npm:^8.0.0" + get-stdin: "npm:^9.0.0" + semver: "npm:^7.6.2" + strip-ansi: "npm:^7.1.0" + vscode-uri: "npm:^3.0.8" + bin: + cspell: bin.mjs + cspell-esm: bin.mjs + checksum: 10/2bf80e744c131b191acb184e679dc66991bb4f96587e3290907f5cda224f4c8beb3b406379fe7cc127319385e126fb09cdd060f76bfa2cabfb5dd5a78d43b5aa languageName: node linkType: hard -"path-is-inside@npm:^1.0.1, path-is-inside@npm:^1.0.2": - version: 1.0.2 - resolution: "path-is-inside@npm:1.0.2" - checksum: 10/0b5b6c92d3018b82afb1f74fe6de6338c4c654de4a96123cb343f2b747d5606590ac0c890f956ed38220a4ab59baddfd7b713d78a62d240b20b14ab801fa02cb +"cssesc@npm:^3.0.0": + version: 3.0.0 + resolution: "cssesc@npm:3.0.0" + bin: + cssesc: bin/cssesc + checksum: 10/0e161912c1306861d8f46e1883be1cbc8b1b2879f0f509287c0db71796e4ddfb97ac96bdfca38f77f452e2c10554e1bb5678c99b07a5cf947a12778f73e47e12 languageName: node linkType: hard -"path-key@npm:^2.0.0, path-key@npm:^2.0.1": - version: 2.0.1 - resolution: "path-key@npm:2.0.1" - checksum: 10/6e654864e34386a2a8e6bf72cf664dcabb76574dd54013add770b374384d438aca95f4357bb26935b514a4e4c2c9b19e191f2200b282422a76ee038b9258c5e7 +"csstype@npm:^3.0.2": + version: 3.0.10 + resolution: "csstype@npm:3.0.10" + checksum: 10/0c731ca8305004cc64abac17798e654e89b21ebd1ad68a7dff48084743c29cc22aed268341998d88d9b39f8f91ed61b0083e93a6105d7776eb1650efcc417c5b languageName: node linkType: hard -"path-key@npm:^3.0.0, path-key@npm:^3.1.0": - version: 3.1.1 - resolution: "path-key@npm:3.1.1" - checksum: 10/55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 +"dargs@npm:^7.0.0": + version: 7.0.0 + resolution: "dargs@npm:7.0.0" + checksum: 10/b8f1e3cba59c42e1f13a114ad4848c3fc1cf7470f633ee9e9f1043762429bc97d91ae31b826fb135eefde203a3fdb20deb0c0a0222ac29d937b8046085d668d1 languageName: node linkType: hard -"path-key@npm:^4.0.0": - version: 4.0.0 - resolution: "path-key@npm:4.0.0" - checksum: 10/8e6c314ae6d16b83e93032c61020129f6f4484590a777eed709c4a01b50e498822b00f76ceaf94bc64dbd90b327df56ceadce27da3d83393790f1219e07721d7 +"dargs@npm:^8.0.0": + version: 8.1.0 + resolution: "dargs@npm:8.1.0" + checksum: 10/33f1b8f5f08e72c8a28355a87c0e1a9b6a0fec99252ecd9cf4735e65dd5f2e19747c860251ed5747b38e7204c7915fd7a7146aee5aaef5882c69169aae8b1d09 languageName: node linkType: hard -"path-parse@npm:^1.0.5, path-parse@npm:^1.0.6, path-parse@npm:^1.0.7": - version: 1.0.7 - resolution: "path-parse@npm:1.0.7" - checksum: 10/49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a +"data-uri-to-buffer@npm:^4.0.0": + version: 4.0.1 + resolution: "data-uri-to-buffer@npm:4.0.1" + checksum: 10/0d0790b67ffec5302f204c2ccca4494f70b4e2d940fea3d36b09f0bb2b8539c2e86690429eb1f1dc4bcc9e4df0644193073e63d9ee48ac9fce79ec1506e4aa4c languageName: node linkType: hard -"path-scurry@npm:^1.10.1": - version: 1.10.1 - resolution: "path-scurry@npm:1.10.1" - dependencies: - lru-cache: "npm:^9.1.1 || ^10.0.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10/eebfb8304fef1d4f7e1486df987e4fd77413de4fce16508dea69fcf8eb318c09a6b15a7a2f4c22877cec1cb7ecbd3071d18ca9de79eeece0df874a00f1f0bdc8 +"date-fns@npm:^2.16.1": + version: 2.28.0 + resolution: "date-fns@npm:2.28.0" + checksum: 10/2d99e884f7dc020971a394deef35cc4a2685cdf6c99585a79d64d271eb639e0e483f17948ec06c2820b01cc662b6e76b7be2aa3d671d530444447bf836cd40f8 languageName: node linkType: hard -"path-scurry@npm:^1.11.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": + version: 4.3.4 + resolution: "debug@npm:4.3.4" dependencies: - lru-cache: "npm:^10.2.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/0073c3bcbd9cb7d71dd5f6b55be8701af42df3e56e911186dfa46fac3a5b9eb7ce7f377dd1d3be6db8977221f8eb333d945216f645cf56f6b688cd484837d255 languageName: node linkType: hard -"path-scurry@npm:^1.6.1": - version: 1.6.3 - resolution: "path-scurry@npm:1.6.3" +"debug@npm:4.3.5": + version: 4.3.5 + resolution: "debug@npm:4.3.5" dependencies: - lru-cache: "npm:^7.14.1" - minipass: "npm:^4.0.2" - checksum: 10/95cb56ba7dc84995f821f5be48c139113aceaeda0835a761e23fae17fbb64145e8f1b50070ea25137f4cbd745ce81d89a7070292c66a7a8f68cb369ce6052d0a - languageName: node - linkType: hard - -"path-to-regexp@npm:0.1.10": - version: 0.1.10 - resolution: "path-to-regexp@npm:0.1.10" - checksum: 10/894e31f1b20e592732a87db61fff5b95c892a3fe430f9ab18455ebe69ee88ef86f8eb49912e261f9926fc53da9f93b46521523e33aefd9cb0a7b0d85d7096006 - languageName: node - linkType: hard - -"path-to-regexp@npm:0.1.7": - version: 0.1.7 - resolution: "path-to-regexp@npm:0.1.7" - checksum: 10/701c99e1f08e3400bea4d701cf6f03517474bb1b608da71c78b1eb261415b645c5670dfae49808c89e12cea2dccd113b069f040a80de012da0400191c6dbd1c8 - languageName: node - linkType: hard - -"path-to-regexp@npm:3.2.0": - version: 3.2.0 - resolution: "path-to-regexp@npm:3.2.0" - checksum: 10/3c86811e0d69719e20908ed6457b6f51d0d66ffc526e04d259cddea5fd777c7b967adb60907658b7e1a98cb7bf1bbbbad3523337a676c98513fd76a7b513075e + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/cb6eab424c410e07813ca1392888589972ce9a32b8829c6508f5e1f25f3c3e70a76731610ae55b4bbe58d1a2fffa1424b30e97fa8d394e49cd2656a9643aedd2 languageName: node linkType: hard -"path-to-regexp@npm:^1.7.0": - version: 1.8.0 - resolution: "path-to-regexp@npm:1.8.0" +"debug@npm:^3.2.7": + version: 3.2.7 + resolution: "debug@npm:3.2.7" dependencies: - isarray: "npm:0.0.1" - checksum: 10/45a01690f72919163cf89714e31a285937b14ad54c53734c826363fcf7beba9d9d0f2de802b4986b1264374562d6a3398a2e5289753a764e3a256494f1e52add - languageName: node - linkType: hard - -"path-to-regexp@npm:^6.2.2": - version: 6.2.2 - resolution: "path-to-regexp@npm:6.2.2" - checksum: 10/f7d11c1a9e02576ce0294f4efdc523c11b73894947afdf7b23a0d0f7c6465d7a7772166e770ddf1495a8017cc0ee99e3e8a15ed7302b6b948b89a6dd4eea895e + ms: "npm:^2.1.1" + checksum: 10/d86fd7be2b85462297ea16f1934dc219335e802f629ca9a69b63ed8ed041dda492389bb2ee039217c02e5b54792b1c51aa96ae954cf28634d363a2360c7a1639 languageName: node linkType: hard -"path-type@npm:^1.0.0": - version: 1.1.0 - resolution: "path-type@npm:1.1.0" +"debug@npm:~4.3.1, debug@npm:~4.3.2, debug@npm:~4.3.4": + version: 4.3.7 + resolution: "debug@npm:4.3.7" dependencies: - graceful-fs: "npm:^4.1.2" - pify: "npm:^2.0.0" - pinkie-promise: "npm:^2.0.0" - checksum: 10/59a4b2c0e566baf4db3021a1ed4ec09a8b36fca960a490b54a6bcefdb9987dafe772852982b6011cd09579478a96e57960a01f75fa78a794192853c9d468fc79 + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/71168908b9a78227ab29d5d25fe03c5867750e31ce24bf2c44a86efc5af041758bb56569b0a3d48a9b5344c00a24a777e6f4100ed6dfd9534a42c1dde285125a languageName: node linkType: hard -"path-type@npm:^3.0.0": - version: 3.0.0 - resolution: "path-type@npm:3.0.0" +"decamelize-keys@npm:^1.1.0": + version: 1.1.0 + resolution: "decamelize-keys@npm:1.1.0" dependencies: - pify: "npm:^3.0.0" - checksum: 10/735b35e256bad181f38fa021033b1c33cfbe62ead42bb2222b56c210e42938eecb272ae1949f3b6db4ac39597a61b44edd8384623ec4d79bfdc9a9c0f12537a6 - languageName: node - linkType: hard - -"path-type@npm:^4.0.0": - version: 4.0.0 - resolution: "path-type@npm:4.0.0" - checksum: 10/5b1e2daa247062061325b8fdbfd1fb56dde0a448fb1455453276ea18c60685bdad23a445dc148cf87bc216be1573357509b7d4060494a6fd768c7efad833ee45 + decamelize: "npm:^1.1.0" + map-obj: "npm:^1.0.0" + checksum: 10/968813219ec20e167b01294cdc0eb754a8b4dc979fda6989f498d9a483822efd341683aeb09a3f3c50bf974211bc4779c39d792e19cfafc6fc2e6e5d9343850c languageName: node linkType: hard -"path-type@npm:^5.0.0": - version: 5.0.0 - resolution: "path-type@npm:5.0.0" - checksum: 10/15ec24050e8932c2c98d085b72cfa0d6b4eeb4cbde151a0a05726d8afae85784fc5544f733d8dfc68536587d5143d29c0bd793623fad03d7e61cc00067291cd5 +"decamelize@npm:^1.1.0, decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: 10/ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa languageName: node linkType: hard -"pathval@npm:^1.1.1": - version: 1.1.1 - resolution: "pathval@npm:1.1.1" - checksum: 10/b50a4751068aa3a5428f5a0b480deecedc6f537666a3630a0c2ae2d5e7c0f4bf0ee77b48404441ec1220bef0c91625e6030b3d3cf5a32ab0d9764018d1d9dbb6 +"decamelize@npm:^5.0.0": + version: 5.0.1 + resolution: "decamelize@npm:5.0.1" + checksum: 10/643e88804c538a334fae303ae1da8b30193b81dad8689643b35e6ab8ab60a3b03492cab6096d8163bd41fd384d969485f0634c000f80af502aa7f4047258d5b4 languageName: node linkType: hard -"pbkdf2@npm:^3.0.17, pbkdf2@npm:^3.0.3, pbkdf2@npm:^3.1.2": - version: 3.1.2 - resolution: "pbkdf2@npm:3.1.2" +"decompress-response@npm:^3.3.0": + version: 3.3.0 + resolution: "decompress-response@npm:3.3.0" dependencies: - create-hash: "npm:^1.1.2" - create-hmac: "npm:^1.1.4" - ripemd160: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - sha.js: "npm:^2.4.8" - checksum: 10/40bdf30df1c9bb1ae41ec50c11e480cf0d36484b7c7933bf55e4451d1d0e3f09589df70935c56e7fccc5702779a0d7b842d012be8c08a187b44eb24d55bb9460 + mimic-response: "npm:^1.0.0" + checksum: 10/952552ac3bd7de2fc18015086b09468645c9638d98a551305e485230ada278c039c91116e946d07894b39ee53c0f0d5b6473f25a224029344354513b412d7380 languageName: node linkType: hard -"pend@npm:~1.2.0": - version: 1.2.0 - resolution: "pend@npm:1.2.0" - checksum: 10/6c72f5243303d9c60bd98e6446ba7d30ae29e3d56fdb6fae8767e8ba6386f33ee284c97efe3230a0d0217e2b1723b8ab490b1bbf34fcbb2180dbc8a9de47850d +"decompress-response@npm:^6.0.0": + version: 6.0.0 + resolution: "decompress-response@npm:6.0.0" + dependencies: + mimic-response: "npm:^3.1.0" + checksum: 10/d377cf47e02d805e283866c3f50d3d21578b779731e8c5072d6ce8c13cc31493db1c2f6784da9d1d5250822120cefa44f1deab112d5981015f2e17444b763812 languageName: node linkType: hard -"performance-now@npm:^2.1.0": - version: 2.1.0 - resolution: "performance-now@npm:2.1.0" - checksum: 10/534e641aa8f7cba160f0afec0599b6cecefbb516a2e837b512be0adbe6c1da5550e89c78059c7fabc5c9ffdf6627edabe23eb7c518c4500067a898fa65c2b550 +"dedent@npm:^1.0.0": + version: 1.5.1 + resolution: "dedent@npm:1.5.1" + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + checksum: 10/fc00a8bc3dfb7c413a778dc40ee8151b6c6ff35159d641f36ecd839c1df5c6e0ec5f4992e658c82624a1a62aaecaffc23b9c965ceb0bbf4d698bfc16469ac27d languageName: node linkType: hard -"pg-connection-string@npm:2.5.0, pg-connection-string@npm:^2.5.0": - version: 2.5.0 - resolution: "pg-connection-string@npm:2.5.0" - checksum: 10/a6f3a068f7c9416a5b33a326811caf0dfaaee045c225b7c628b4c9b4e9a2b25bdd12a21e4c48940e1000ea223a4e608ca122d2ff3dd08c8b1db0fc9f5705133a +"dedent@npm:^1.5.3": + version: 1.5.3 + resolution: "dedent@npm:1.5.3" + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + checksum: 10/e5277f6268f288649503125b781a7b7a2c9b22d011139688c0b3619fe40121e600eb1f077c891938d4b2428bdb6326cc3c77a763e4b1cc681bd9666ab1bad2a1 languageName: node linkType: hard -"pg-connection-string@npm:2.6.1": - version: 2.6.1 - resolution: "pg-connection-string@npm:2.6.1" - checksum: 10/882344a47e1ecf3a91383e0809bf2ac48facea97fcec0358d6e060e1cbcb8737acde419b4c86f05da4ce4a16634ee50fff1d2bb787d73b52ccbfde697243ad8a +"deep-equal@npm:^2.2.2": + version: 2.2.2 + resolution: "deep-equal@npm:2.2.2" + dependencies: + array-buffer-byte-length: "npm:^1.0.0" + call-bind: "npm:^1.0.2" + es-get-iterator: "npm:^1.1.3" + get-intrinsic: "npm:^1.2.1" + is-arguments: "npm:^1.1.1" + is-array-buffer: "npm:^3.0.2" + is-date-object: "npm:^1.0.5" + is-regex: "npm:^1.1.4" + is-shared-array-buffer: "npm:^1.0.2" + isarray: "npm:^2.0.5" + object-is: "npm:^1.1.5" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.4" + regexp.prototype.flags: "npm:^1.5.0" + side-channel: "npm:^1.0.4" + which-boxed-primitive: "npm:^1.0.2" + which-collection: "npm:^1.0.1" + which-typed-array: "npm:^1.1.9" + checksum: 10/883cb8b3cf10d387ce8fb191f7d7b46b48022e00810074c5629053953aa3be5c5890dd40d30d31d27fb140af9a541c06c852ab5d28f76b07095c9d28e3c4b04f languageName: node linkType: hard -"pg-int8@npm:1.0.1": - version: 1.0.1 - resolution: "pg-int8@npm:1.0.1" - checksum: 10/a1e3a05a69005ddb73e5f324b6b4e689868a447c5fa280b44cd4d04e6916a344ac289e0b8d2695d66e8e89a7fba023affb9e0e94778770ada5df43f003d664c9 +"deep-extend@npm:^0.6.0": + version: 0.6.0 + resolution: "deep-extend@npm:0.6.0" + checksum: 10/7be7e5a8d468d6b10e6a67c3de828f55001b6eb515d014f7aeb9066ce36bd5717161eb47d6a0f7bed8a9083935b465bc163ee2581c8b128d29bf61092fdf57a7 languageName: node linkType: hard -"pg-pool@npm:^3.5.2": - version: 3.6.0 - resolution: "pg-pool@npm:3.6.0" - peerDependencies: - pg: ">=8.0" - checksum: 10/74b893cec3ef2b8062cddfa616dfa2a2ee4c0e340959fd9055fee470e095ea2df0e2dd13bbe31a630741300ed53191bd3177d077c0a29c4b74e630c00e856c63 +"deep-is@npm:^0.1.3": + version: 0.1.4 + resolution: "deep-is@npm:0.1.4" + checksum: 10/ec12d074aef5ae5e81fa470b9317c313142c9e8e2afe3f8efa124db309720db96d1d222b82b84c834e5f87e7a614b44a4684b6683583118b87c833b3be40d4d8 languageName: node linkType: hard -"pg-protocol@npm:*, pg-protocol@npm:^1.5.0": - version: 1.6.0 - resolution: "pg-protocol@npm:1.6.0" - checksum: 10/995864cc2a8517368b84697c753caff769a4db292eda66f96d9eec46e3aa84737cd0b0fe171aca9d7d4b4a4c46bb25bd399713cb1027a5bf8f38adea0b4284f4 +"deepmerge-ts@npm:^5.1.0": + version: 5.1.0 + resolution: "deepmerge-ts@npm:5.1.0" + checksum: 10/0f615ccfb27b93a286abc315d7d1ec171f1befe9c511c2799ca7184c11fc6a6f29f5368d446c6885338de0d95cf6cb66a5ff4c55141a1265012730bd69408cf9 languageName: node linkType: hard -"pg-types@npm:^2.1.0, pg-types@npm:^2.2.0": - version: 2.2.0 - resolution: "pg-types@npm:2.2.0" - dependencies: - pg-int8: "npm:1.0.1" - postgres-array: "npm:~2.0.0" - postgres-bytea: "npm:~1.0.0" - postgres-date: "npm:~1.0.4" - postgres-interval: "npm:^1.1.0" - checksum: 10/87a84d4baa91378d3a3da6076c69685eb905d1087bf73525ae1ba84b291b9dd8738c6716b333d8eac6cec91bf087237adc3e9281727365e9cbab0d9d072778b1 +"deepmerge@npm:^4.2.2": + version: 4.2.2 + resolution: "deepmerge@npm:4.2.2" + checksum: 10/0e58ed14f530d08f9b996cfc3a41b0801691620235bc5e1883260e3ed1c1b4a1dfb59f865770e45d5dfb1d7ee108c4fc10c2f85e822989d4123490ea90be2545 languageName: node linkType: hard -"pg@npm:8.8.0": - version: 8.8.0 - resolution: "pg@npm:8.8.0" +"default-require-extensions@npm:^3.0.0": + version: 3.0.0 + resolution: "default-require-extensions@npm:3.0.0" dependencies: - buffer-writer: "npm:2.0.0" - packet-reader: "npm:1.0.0" - pg-connection-string: "npm:^2.5.0" - pg-pool: "npm:^3.5.2" - pg-protocol: "npm:^1.5.0" - pg-types: "npm:^2.1.0" - pgpass: "npm:1.x" - peerDependencies: - pg-native: ">=3.0.1" - peerDependenciesMeta: - pg-native: - optional: true - checksum: 10/729b11893ea5fec63aef30c2cf8108ab25294e4939234ad5d569d40f5ecebcd8b9c5532536b61168b93b5312b7406da0aa2cac0b6119c9ae03d617fe7f4c9f65 + strip-bom: "npm:^4.0.0" + checksum: 10/0b5bdb6786ebb0ff6ef55386f37c8d221963fbbd3009588fe71032c85ca16da05eff2ad01bfe9bfc8bac5ce95a18f66b38c50d454482e3e9d2de1142424a3e7c languageName: node linkType: hard -"pgpass@npm:1.x": - version: 1.0.5 - resolution: "pgpass@npm:1.0.5" +"defaults@npm:^1.0.3": + version: 1.0.3 + resolution: "defaults@npm:1.0.3" dependencies: - split2: "npm:^4.1.0" - checksum: 10/0a6f3bf76e36bdb3c20a7e8033140c732767bba7e81f845f7489fc3123a2bd6e3b8e704f08cba86b117435414b5d2422e20ba9d5f2efb6f0c75c9efca73e8e87 + clone: "npm:^1.0.2" + checksum: 10/96e2112da6553d376afd5265ea7cbdb2a3b45535965d71ab8bb1da10c8126d168fdd5268799625324b368356d21ba2a7b3d4ec50961f11a47b7feb9de3d4413e languageName: node linkType: hard -"picocolors@npm:^1.0.0": - version: 1.0.0 - resolution: "picocolors@npm:1.0.0" - checksum: 10/a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 +"defer-to-connect@npm:^1.0.1": + version: 1.1.3 + resolution: "defer-to-connect@npm:1.1.3" + checksum: 10/9491b301dcfa04956f989481ba7a43c2231044206269eb4ab64a52d6639ee15b1252262a789eb4239fb46ab63e44d4e408641bae8e0793d640aee55398cb3930 languageName: node linkType: hard -"picocolors@npm:^1.0.1": - version: 1.0.1 - resolution: "picocolors@npm:1.0.1" - checksum: 10/fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 +"defer-to-connect@npm:^2.0.1": + version: 2.0.1 + resolution: "defer-to-connect@npm:2.0.1" + checksum: 10/8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b languageName: node linkType: hard -"picomatch@npm:2.3.1, picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": - version: 2.3.1 - resolution: "picomatch@npm:2.3.1" - checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": + version: 1.1.1 + resolution: "define-data-property@npm:1.1.1" + dependencies: + get-intrinsic: "npm:^1.2.1" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.0" + checksum: 10/5573c8df96b5857408cad64d9b91b69152e305ce4b06218e5f49b59c6cafdbb90a8bd8a0bb83c7bc67a8d479c04aa697063c9bc28d849b7282f9327586d6bc7b languageName: node linkType: hard -"picomatch@npm:4.0.1": - version: 4.0.1 - resolution: "picomatch@npm:4.0.1" - checksum: 10/d5005bb1b4021260826d17f64666848bbdea2f449dbf97dd2df384d3253aac43a550f658a855a7a4fa6a2a88f36a832daa008ee3f71fe0bf10990c2672349c76 +"define-data-property@npm:^1.1.2": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" + dependencies: + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + gopd: "npm:^1.0.1" + checksum: 10/abdcb2505d80a53524ba871273e5da75e77e52af9e15b3aa65d8aad82b8a3a424dad7aee2cc0b71470ac7acf501e08defac362e8b6a73cdb4309f028061df4ae languageName: node linkType: hard -"pidtree@npm:^0.3.0": - version: 0.3.1 - resolution: "pidtree@npm:0.3.1" - bin: - pidtree: bin/pidtree.js - checksum: 10/eb85b841cd168151bfadb984f9514d67a884d6962d4a2d250d4e8acf85cf031d7dab080f7272fb2735f9033364e5058c73eeebbee3cf6fd829169a75d19f189a +"define-properties@npm:^1.1.3": + version: 1.1.3 + resolution: "define-properties@npm:1.1.3" + dependencies: + object-keys: "npm:^1.0.12" + checksum: 10/33125cafaf4de2c9934cfba20e0a45bccc53fa6d85370a48c0b5a9a0c76c7d0497a5fdf01bc5c1186cb61f2747f19f43520ca6fdd37b4d0290f552c6747e0a17 languageName: node linkType: hard -"pidtree@npm:^0.6.0": - version: 0.6.0 - resolution: "pidtree@npm:0.6.0" - bin: - pidtree: bin/pidtree.js - checksum: 10/ea67fb3159e170fd069020e0108ba7712df9f0fd13c8db9b2286762856ddce414fb33932e08df4bfe36e91fe860b51852aee49a6f56eb4714b69634343add5df +"define-properties@npm:^1.1.4, define-properties@npm:^1.2.0": + version: 1.2.0 + resolution: "define-properties@npm:1.2.0" + dependencies: + has-property-descriptors: "npm:^1.0.0" + object-keys: "npm:^1.1.1" + checksum: 10/e60aee6a19b102df4e2b1f301816804e81ab48bb91f00d0d935f269bf4b3f79c88b39e4f89eaa132890d23267335fd1140dfcd8d5ccd61031a0a2c41a54e33a6 languageName: node linkType: hard -"pify@npm:^2.0.0, pify@npm:^2.3.0": - version: 2.3.0 - resolution: "pify@npm:2.3.0" - checksum: 10/9503aaeaf4577acc58642ad1d25c45c6d90288596238fb68f82811c08104c800e5a7870398e9f015d82b44ecbcbef3dc3d4251a1cbb582f6e5959fe09884b2ba +"define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" + dependencies: + define-data-property: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.0" + object-keys: "npm:^1.1.1" + checksum: 10/b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 languageName: node linkType: hard -"pify@npm:^3.0.0": - version: 3.0.0 - resolution: "pify@npm:3.0.0" - checksum: 10/668c1dc8d9fc1b34b9ce3b16ba59deb39d4dc743527bf2ed908d2b914cb8ba40aa5ba6960b27c417c241531c5aafd0598feeac2d50cb15278cf9863fa6b02a77 +"defined@npm:^1.0.1": + version: 1.0.1 + resolution: "defined@npm:1.0.1" + checksum: 10/c4c3c41819721ddc07f689a53cfdf5edb085d8d762e410e9e7705fdbcccb41ff34a7331e795cdc2c416f5e524215413815b47051507c0cd4d3c8a8d74baf8ccb languageName: node linkType: hard -"pify@npm:^4.0.1": - version: 4.0.1 - resolution: "pify@npm:4.0.1" - checksum: 10/8b97cbf9dc6d4c1320cc238a2db0fc67547f9dc77011729ff353faf34f1936ea1a4d7f3c63b2f4980b253be77bcc72ea1e9e76ee3fd53cce2aafb6a8854d07ec +"del-cli@npm:5.1.0": + version: 5.1.0 + resolution: "del-cli@npm:5.1.0" + dependencies: + del: "npm:^7.1.0" + meow: "npm:^10.1.3" + bin: + del: cli.js + del-cli: cli.js + checksum: 10/b52b7ce997a5f1591fb420c0931ef24e71cee80788a7750704903f6e82fc846375466bb991655e2ad7234d237a9e8a90545e2ab1d728fba5ad9e67573500b084 languageName: node linkType: hard -"pify@npm:^6.1.0": - version: 6.1.0 - resolution: "pify@npm:6.1.0" - checksum: 10/80ed50b214bb8afd0e27f7ea8526e8de18e156e1527bb1c0172041d675ff4fc80beb78535767944de9eefae8dac52318a7acc3a58c402a6e4e574f217e04ee82 +"del@npm:7.1.0, del@npm:^7.1.0": + version: 7.1.0 + resolution: "del@npm:7.1.0" + dependencies: + globby: "npm:^13.1.2" + graceful-fs: "npm:^4.2.10" + is-glob: "npm:^4.0.3" + is-path-cwd: "npm:^3.0.0" + is-path-inside: "npm:^4.0.0" + p-map: "npm:^5.5.0" + rimraf: "npm:^3.0.2" + slash: "npm:^4.0.0" + checksum: 10/93527e78e95125809ff20a112814b00648ed64af204be1a565862698060c9ec8f5c5fe1a4866725acfde9b0da6423f4b7a7642c1d38cd4b05cbeb643a7b089e3 languageName: node linkType: hard -"pinkie-promise@npm:^2.0.0": - version: 2.0.1 - resolution: "pinkie-promise@npm:2.0.1" - dependencies: - pinkie: "npm:^2.0.0" - checksum: 10/b53a4a2e73bf56b6f421eef711e7bdcb693d6abb474d57c5c413b809f654ba5ee750c6a96dd7225052d4b96c4d053cdcb34b708a86fceed4663303abee52fcca +"delayed-stream@npm:~1.0.0": + version: 1.0.0 + resolution: "delayed-stream@npm:1.0.0" + checksum: 10/46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 languageName: node linkType: hard -"pinkie@npm:^2.0.0": - version: 2.0.4 - resolution: "pinkie@npm:2.0.4" - checksum: 10/11d207257a044d1047c3755374d36d84dda883a44d030fe98216bf0ea97da05a5c9d64e82495387edeb9ee4f52c455bca97cdb97629932be65e6f54b29f5aec8 +"delegates@npm:^1.0.0": + version: 1.0.0 + resolution: "delegates@npm:1.0.0" + checksum: 10/a51744d9b53c164ba9c0492471a1a2ffa0b6727451bdc89e31627fdf4adda9d51277cfcbfb20f0a6f08ccb3c436f341df3e92631a3440226d93a8971724771fd languageName: node linkType: hard -"pino-abstract-transport@npm:^1.2.0": - version: 1.2.0 - resolution: "pino-abstract-transport@npm:1.2.0" +"depcheck@npm:1.4.7": + version: 1.4.7 + resolution: "depcheck@npm:1.4.7" dependencies: - readable-stream: "npm:^4.0.0" - split2: "npm:^4.0.0" - checksum: 10/6ec1d19a7ff3347fd21576f744c31c3e38ca4463ae638818408f43698c936f96be6a0bc750af5f7c1ae81873183bfcb062b7a0d12dc159a1813ea900c388c693 + "@babel/parser": "npm:^7.23.0" + "@babel/traverse": "npm:^7.23.2" + "@vue/compiler-sfc": "npm:^3.3.4" + callsite: "npm:^1.0.0" + camelcase: "npm:^6.3.0" + cosmiconfig: "npm:^7.1.0" + debug: "npm:^4.3.4" + deps-regex: "npm:^0.2.0" + findup-sync: "npm:^5.0.0" + ignore: "npm:^5.2.4" + is-core-module: "npm:^2.12.0" + js-yaml: "npm:^3.14.1" + json5: "npm:^2.2.3" + lodash: "npm:^4.17.21" + minimatch: "npm:^7.4.6" + multimatch: "npm:^5.0.0" + please-upgrade-node: "npm:^3.2.0" + readdirp: "npm:^3.6.0" + require-package-name: "npm:^2.0.1" + resolve: "npm:^1.22.3" + resolve-from: "npm:^5.0.0" + semver: "npm:^7.5.4" + yargs: "npm:^16.2.0" + bin: + depcheck: bin/depcheck.js + checksum: 10/e35e87517348a3fd678f9ed7324cb96aff350c65cd0ede7da5be303f03144ad66a18d03ff2b52531cd7900b2ca83f8c2a4fac3295e00db8f701f92fb33744b78 languageName: node linkType: hard -"pino-std-serializers@npm:^7.0.0": - version: 7.0.0 - resolution: "pino-std-serializers@npm:7.0.0" - checksum: 10/884e08f65aa5463d820521ead3779d4472c78fc434d8582afb66f9dcb8d8c7119c69524b68106cb8caf92c0487be7794cf50e5b9c0383ae65b24bf2a03480951 +"depd@npm:^1.1.2": + version: 1.1.2 + resolution: "depd@npm:1.1.2" + checksum: 10/2ed6966fc14463a9e85451db330ab8ba041efed0b9a1a472dbfc6fbf2f82bab66491915f996b25d8517dddc36c8c74e24c30879b34877f3c4410733444a51d1d languageName: node linkType: hard -"pino@npm:^9.0.0": - version: 9.4.0 - resolution: "pino@npm:9.4.0" - dependencies: - atomic-sleep: "npm:^1.0.0" - fast-redact: "npm:^3.1.1" - on-exit-leak-free: "npm:^2.1.0" - pino-abstract-transport: "npm:^1.2.0" - pino-std-serializers: "npm:^7.0.0" - process-warning: "npm:^4.0.0" - quick-format-unescaped: "npm:^4.0.3" - real-require: "npm:^0.2.0" - safe-stable-stringify: "npm:^2.3.1" - sonic-boom: "npm:^4.0.1" - thread-stream: "npm:^3.0.0" +"dependency-tree@npm:^10.0.9": + version: 10.0.9 + resolution: "dependency-tree@npm:10.0.9" + dependencies: + commander: "npm:^10.0.1" + filing-cabinet: "npm:^4.1.6" + precinct: "npm:^11.0.5" + typescript: "npm:^5.0.4" bin: - pino: bin.js - checksum: 10/1c730c216052bab277cab619da8fb9ef916fd29c7aee66e0a6e0c089cb41713df6a9071517755e3bef0ca3160629fd85d22c8f9d277e41ce332c91999e073146 - languageName: node - linkType: hard - -"pirates@npm:^4.0.1": - version: 4.0.6 - resolution: "pirates@npm:4.0.6" - checksum: 10/d02dda76f4fec1cbdf395c36c11cf26f76a644f9f9a1bfa84d3167d0d3154d5289aacc72677aa20d599bb4a6937a471de1b65c995e2aea2d8687cbcd7e43ea5f + dependency-tree: bin/cli.js + checksum: 10/ddfd641f4ff82fe33d0d9578fd71ea9d044b9416191f93e484e7a2b2ed195e02f8dfe7cbb4f00fb25ba37aeca46158fc29782d22bd3a5ef3582c01d15d6705c8 languageName: node linkType: hard -"pirates@npm:^4.0.4": - version: 4.0.5 - resolution: "pirates@npm:4.0.5" - checksum: 10/3728bae0cf6c18c3d25f5449ee8c5bc1a6a83bca688abe0e1654ce8c069bfd408170397cef133ed9ec8b0faeb4093c5c728d0e72ab7b3385256cd87008c40364 +"deps-regex@npm:^0.2.0": + version: 0.2.0 + resolution: "deps-regex@npm:0.2.0" + checksum: 10/d8eeb89727037f2ae680a619f8eefbc8475d21c3d5273e2bbcb9838aabd1c93fd9e011f51bcda5bd65f042921c1bc156119d9a8a2f3539aa4009950b8f9c79b3 languageName: node linkType: hard -"piscina@npm:4.0.0": - version: 4.0.0 - resolution: "piscina@npm:4.0.0" +"des.js@npm:^1.0.0": + version: 1.0.1 + resolution: "des.js@npm:1.0.1" dependencies: - eventemitter-asyncresource: "npm:^1.0.0" - hdr-histogram-js: "npm:^2.0.1" - hdr-histogram-percentiles-obj: "npm:^3.0.0" - nice-napi: "npm:^1.0.2" - dependenciesMeta: - nice-napi: - optional: true - checksum: 10/25ec048719e0a8c714453b1589b7017995b85bba0f62b478a0054138365203b8b3c930bd572cf9b294d02fe773e929391ea8d13051b0f67cd60f3d0cebe03543 + inherits: "npm:^2.0.1" + minimalistic-assert: "npm:^1.0.0" + checksum: 10/f8eed334f85228d0cd985e3299c9e65ab70f6b82852f4dfb3eb2614ec7927ece262fed172daca02b57899388477046739225663739e54185d90cc5e5c10b4e11 languageName: node linkType: hard -"piscina@npm:4.4.0": - version: 4.4.0 - resolution: "piscina@npm:4.4.0" - dependencies: - nice-napi: "npm:^1.0.2" - dependenciesMeta: - nice-napi: - optional: true - checksum: 10/7bce3147d377d8c32de1cdef59681b9c6353d91627198c602854563e44b711004537169fec6190d0128e8252c97476fd89e4043d20b6d3d5d5d63188992dad68 +"detect-file@npm:^1.0.0": + version: 1.0.0 + resolution: "detect-file@npm:1.0.0" + checksum: 10/1861e4146128622e847abe0e1ed80fef01e78532665858a792267adf89032b7a9c698436137707fcc6f02956c2a6a0052d6a0cef5be3d4b76b1ff0da88e2158a languageName: node linkType: hard -"pkcs11js@npm:1.3.1, pkcs11js@npm:^1.3.0": - version: 1.3.1 - resolution: "pkcs11js@npm:1.3.1" - dependencies: - nan: "npm:^2.15.0" - node-gyp: "npm:latest" - checksum: 10/bc3a7409babcfcd1f60e2235e84261b46f05584ef5a56c4be0221885b4f3692c9207efb7704c8e9bd6080e6516fcdf75789ecef1ed2c72022961acd20c0d4160 +"detect-indent@npm:^6.0.0": + version: 6.1.0 + resolution: "detect-indent@npm:6.1.0" + checksum: 10/ab953a73c72dbd4e8fc68e4ed4bfd92c97eb6c43734af3900add963fd3a9316f3bc0578b018b24198d4c31a358571eff5f0656e81a1f3b9ad5c547d58b2d093d languageName: node linkType: hard -"pkcs11js@npm:^1.0.6": - version: 1.3.0 - resolution: "pkcs11js@npm:1.3.0" - dependencies: - nan: "npm:^2.15.0" - node-gyp: "npm:latest" - checksum: 10/7a5abea57625b9c5bc437fd9d11b15600ef7366a0989a60068cdd1ffcceaed922726c33fa08477f27ea45071a4ccf2885ea29c83583977d3783e4bd6888116d7 +"detect-indent@npm:^7.0.0": + version: 7.0.1 + resolution: "detect-indent@npm:7.0.1" + checksum: 10/cbf3f0b1c3c881934ca94428e1179b26ab2a587e0d719031d37a67fb506d49d067de54ff057cb1e772e75975fed5155c01cd4518306fee60988b1486e3fc7768 languageName: node linkType: hard -"pkg-conf@npm:^2.0.0, pkg-conf@npm:^2.1.0": - version: 2.1.0 - resolution: "pkg-conf@npm:2.1.0" - dependencies: - find-up: "npm:^2.0.0" - load-json-file: "npm:^4.0.0" - checksum: 10/b50775157262abd1bfb4d3d948f3fc6c009d10266c6507d4de296af4e2cbb6d2738310784432185886d83144466fbb286b6e8ff0bc23dc5ee7d81810dc6c4788 +"detect-libc@npm:^2.0.0": + version: 2.0.1 + resolution: "detect-libc@npm:2.0.1" + checksum: 10/f41b3d8c726127cc010c78bf4cdb6fda20a1a0731ae9fc34698e3b9887d82e19f249f4dc997b423f930d5be0c3ee05dc7fe6c2473dd058856c6b0700eb3e0dc6 languageName: node linkType: hard -"pkg-config@npm:^1.1.0": - version: 1.1.1 - resolution: "pkg-config@npm:1.1.1" - dependencies: - debug-log: "npm:^1.0.0" - find-root: "npm:^1.0.0" - xtend: "npm:^4.0.1" - checksum: 10/951d904f0ba050e4e71b5143a518615f12b91416f11c68a00a2c5e2ddb56d9abbb7e66cbf7d182f7c424c0741e73f3f60790c0fd6723bc6449ab82c18fecee28 +"detect-newline@npm:3.1.0, detect-newline@npm:^3.0.0": + version: 3.1.0 + resolution: "detect-newline@npm:3.1.0" + checksum: 10/ae6cd429c41ad01b164c59ea36f264a2c479598e61cba7c99da24175a7ab80ddf066420f2bec9a1c57a6bead411b4655ff15ad7d281c000a89791f48cbe939e7 languageName: node linkType: hard -"pkg-dir@npm:^1.0.0": - version: 1.0.0 - resolution: "pkg-dir@npm:1.0.0" +"detective-amd@npm:^5.0.2": + version: 5.0.2 + resolution: "detective-amd@npm:5.0.2" dependencies: - find-up: "npm:^1.0.0" - checksum: 10/ee01f83a97c5ae6bc04008ae6ea0fd3d357f8a34f830e6d035e159c36bd1fb714b376c7844efed14808bd1ab06cc568349e672860b16e228b6cd60940fbf611f + ast-module-types: "npm:^5.0.0" + escodegen: "npm:^2.0.0" + get-amd-module-type: "npm:^5.0.1" + node-source-walk: "npm:^6.0.1" + bin: + detective-amd: bin/cli.js + checksum: 10/6117eec09b4908abe74a3c3bc1f037334092e2a9388231c5f1b672a22c48f6e17ade9ecaf8c0cbbef6fcde52da178b0693e9810ef3c824c11c5c64c6c5865ca1 languageName: node linkType: hard -"pkg-dir@npm:^3.0.0": - version: 3.0.0 - resolution: "pkg-dir@npm:3.0.0" +"detective-cjs@npm:^5.0.1": + version: 5.0.1 + resolution: "detective-cjs@npm:5.0.1" dependencies: - find-up: "npm:^3.0.0" - checksum: 10/70c9476ffefc77552cc6b1880176b71ad70bfac4f367604b2b04efd19337309a4eec985e94823271c7c0e83946fa5aeb18cd360d15d10a5d7533e19344bfa808 + ast-module-types: "npm:^5.0.0" + node-source-walk: "npm:^6.0.0" + checksum: 10/c51c27ab10e4c441b26d13e44569c4cd1015268b10537fdfca698996c569ce98e9d69ce635a9680789c9e4fbc6d60c77a752ae64d7532e92678c19fb19ff313b languageName: node linkType: hard -"pkg-dir@npm:^4.1.0, pkg-dir@npm:^4.2.0": - version: 4.2.0 - resolution: "pkg-dir@npm:4.2.0" +"detective-es6@npm:^4.0.1": + version: 4.0.1 + resolution: "detective-es6@npm:4.0.1" dependencies: - find-up: "npm:^4.0.0" - checksum: 10/9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + node-source-walk: "npm:^6.0.1" + checksum: 10/f9fbcae9399fad5d1c4120d22db97fdab6fc8d9ec8011cec2214b23970b3524d5a8ec30943009543cda99cb6dec2e8b78549b6dd918d7c2bff8f13c0565345c8 languageName: node linkType: hard -"pkg-dir@npm:^7.0.0": - version: 7.0.0 - resolution: "pkg-dir@npm:7.0.0" +"detective-postcss@npm:^6.1.3": + version: 6.1.3 + resolution: "detective-postcss@npm:6.1.3" dependencies: - find-up: "npm:^6.3.0" - checksum: 10/94298b20a446bfbbd66604474de8a0cdd3b8d251225170970f15d9646f633e056c80520dd5b4c1d1050c9fed8f6a9e5054b141c93806439452efe72e57562c03 + is-url: "npm:^1.2.4" + postcss: "npm:^8.4.23" + postcss-values-parser: "npm:^6.0.2" + checksum: 10/ee6e07fed20ac93a6ba84736b9c586a942a4a6b2df173f963f95ea753380c99e4a606da22b8d9e8407c50e356f3d893a127eb68cf84c97233a209e9fbbadb026 languageName: node linkType: hard -"pkg-fetch@npm:3.4.2": - version: 3.4.2 - resolution: "pkg-fetch@npm:3.4.2" +"detective-sass@npm:^5.0.3": + version: 5.0.3 + resolution: "detective-sass@npm:5.0.3" dependencies: - chalk: "npm:^4.1.2" - fs-extra: "npm:^9.1.0" - https-proxy-agent: "npm:^5.0.0" - node-fetch: "npm:^2.6.6" - progress: "npm:^2.0.3" - semver: "npm:^7.3.5" - tar-fs: "npm:^2.1.1" - yargs: "npm:^16.2.0" - bin: - pkg-fetch: lib-es5/bin.js - checksum: 10/e8b1f5852fa426ba793508e947901ed2863e5a5455191209843874ec769e0bfcdf16d2c92cf2128db2fd494be0203ada5eaf68a4d9ace3a7dc30e2e83bd7bbce + gonzales-pe: "npm:^4.3.0" + node-source-walk: "npm:^6.0.1" + checksum: 10/5b09526931c6d87b8159fd9f10518b546ac2cbbc3cec91db194e67553a64c312bcf53de6950f34236ba7747a4f7855885b662c0e2df42aff7deb9d8aed0ce5e3 languageName: node linkType: hard -"pkg-up@npm:^1.0.0": - version: 1.0.0 - resolution: "pkg-up@npm:1.0.0" +"detective-scss@npm:^4.0.3": + version: 4.0.3 + resolution: "detective-scss@npm:4.0.3" dependencies: - find-up: "npm:^1.0.0" - checksum: 10/cffd99b39385147a42a4c7822326777be05be1fbbc3d6e20aa5d82a2d8e9a78de28488b0edb8331329ee27f0ad08aa3a5793566983701df2e5edc430654d617f + gonzales-pe: "npm:^4.3.0" + node-source-walk: "npm:^6.0.1" + checksum: 10/afeda1e45468d23499349bedaece546b63f9269b51faf05b00f8d9a8a092f6961a6f2f366cc7664b8a1e4291454085b57cfa94fc7e1a1eaf16ef63c06782cfa9 languageName: node linkType: hard -"pkg-up@npm:^3.1.0": - version: 3.1.0 - resolution: "pkg-up@npm:3.1.0" - dependencies: - find-up: "npm:^3.0.0" - checksum: 10/5bac346b7c7c903613c057ae3ab722f320716199d753f4a7d053d38f2b5955460f3e6ab73b4762c62fd3e947f58e04f1343e92089e7bb6091c90877406fcd8c8 +"detective-stylus@npm:^4.0.0": + version: 4.0.0 + resolution: "detective-stylus@npm:4.0.0" + checksum: 10/50a765f95e95c8204a86122f015dc9b3d32eb1c38d25cba9a71bbcb0441d398185679baa0d15d8cf43ff1c37e071c98b18599adc7ffe6147cc3c7f7f874cf6a3 languageName: node linkType: hard -"pkg@npm:5.8.1": - version: 5.8.1 - resolution: "pkg@npm:5.8.1" +"detective-typescript@npm:^11.1.0": + version: 11.2.0 + resolution: "detective-typescript@npm:11.2.0" dependencies: - "@babel/generator": "npm:7.18.2" - "@babel/parser": "npm:7.18.4" - "@babel/types": "npm:7.19.0" - chalk: "npm:^4.1.2" - fs-extra: "npm:^9.1.0" - globby: "npm:^11.1.0" - into-stream: "npm:^6.0.0" - is-core-module: "npm:2.9.0" - minimist: "npm:^1.2.6" - multistream: "npm:^4.1.0" - pkg-fetch: "npm:3.4.2" - prebuild-install: "npm:7.1.1" - resolve: "npm:^1.22.0" - stream-meter: "npm:^1.0.4" - peerDependencies: - node-notifier: ">=9.0.1" - peerDependenciesMeta: - node-notifier: - optional: true - bin: - pkg: lib-es5/bin.js - checksum: 10/917cee784f8928ecb443b11f51a618fca238af5783a42244b873d8ac455c1e2000497f888eb78be4cfe9ec9193cafe127eb00553ec80f7035d1b6dc94a3e688a + "@typescript-eslint/typescript-estree": "npm:^5.62.0" + ast-module-types: "npm:^5.0.0" + node-source-walk: "npm:^6.0.2" + typescript: "npm:^5.4.4" + checksum: 10/e990cf13e0dc1c992ee80f4dfe961ac1ae1a48d42360d150302453547fa28fc012db7c0e73d20c6eea66bb7b2232e7c1304fc6861820f22e3005f86bcf56f67d languageName: node linkType: hard -"platform@npm:^1.3.3": - version: 1.3.6 - resolution: "platform@npm:1.3.6" - checksum: 10/1f2d8333e23ea6a7620c828d2fc1ccbbd33e01928fb142323420506114d7325ebdeb1b38544efbf64e90ab73af0847f874d0f475b9327bcf53510fa827a4ef95 +"diff-sequences@npm:^29.4.3": + version: 29.4.3 + resolution: "diff-sequences@npm:29.4.3" + checksum: 10/2287b259400513332d757f921eeda7c740863a919a00bd1d1b22ab2532b3e763538c404aec0953a813bbe33e660cbc77d0742875d6674d8dc5bc31d74ec88cc1 languageName: node linkType: hard -"please-upgrade-node@npm:^3.2.0": - version: 3.2.0 - resolution: "please-upgrade-node@npm:3.2.0" - dependencies: - semver-compare: "npm:^1.0.0" - checksum: 10/d87c41581a2a022fbe25965a97006238cd9b8cbbf49b39f78d262548149a9d30bd2bdf35fec3d810e0001e630cd46ef13c7e19c389dea8de7e64db271a2381bb +"diff@npm:^4.0.1, diff@npm:^4.0.2": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: 10/ec09ec2101934ca5966355a229d77afcad5911c92e2a77413efda5455636c4cf2ce84057e2d7715227a2eeeda04255b849bd3ae3a4dd22eb22e86e76456df069 languageName: node linkType: hard -"pluralize@npm:^1.2.1": - version: 1.2.1 - resolution: "pluralize@npm:1.2.1" - checksum: 10/b6d1e873ac7fa0e1c3edd92ed650f53940a1d8e923ba4890899a2bd1495df4183a2408969945ce404293a181f706fd0ff4c1ec75fe13442de0d5ffc6ba5d4cd7 +"diffie-hellman@npm:^5.0.0": + version: 5.0.3 + resolution: "diffie-hellman@npm:5.0.3" + dependencies: + bn.js: "npm:^4.1.0" + miller-rabin: "npm:^4.0.0" + randombytes: "npm:^2.0.0" + checksum: 10/2ff28231f93b27a4903461432d2de831df02e3568ea7633d5d7b6167eb73077f823b2bca26de6ba4f5c7ecd10a3df5aa94d376d136ab6209948c03cc4e4ac1fe languageName: node linkType: hard -"pluralize@npm:^7.0.0": - version: 7.0.0 - resolution: "pluralize@npm:7.0.0" - checksum: 10/905274e679d3802650fdfdd977434757d4680082da7a23c0938a608d1d5c8246790b62dc15ff1f737b0d57baa6ad2f6ebb0857b1950435a583e32af76ee58e1f +"dir-glob@npm:^3.0.1": + version: 3.0.1 + resolution: "dir-glob@npm:3.0.1" + dependencies: + path-type: "npm:^4.0.0" + checksum: 10/fa05e18324510d7283f55862f3161c6759a3f2f8dbce491a2fc14c8324c498286c54282c1f0e933cb930da8419b30679389499b919122952a4f8592362ef4615 languageName: node linkType: hard -"pluralize@npm:^8.0.0": - version: 8.0.0 - resolution: "pluralize@npm:8.0.0" - checksum: 10/17877fdfdb7ddb3639ce257ad73a7c51a30a966091e40f56ea9f2f545b5727ce548d4928f8cb3ce38e7dc0c5150407d318af6a4ed0ea5265d378473b4c2c61ec +"doctrine@npm:^2.1.0": + version: 2.1.0 + resolution: "doctrine@npm:2.1.0" + dependencies: + esutils: "npm:^2.0.2" + checksum: 10/555684f77e791b17173ea86e2eea45ef26c22219cb64670669c4f4bebd26dbc95cd90ec1f4159e9349a6bb9eb892ce4dde8cd0139e77bedd8bf4518238618474 languageName: node linkType: hard -"posix-character-classes@npm:^0.1.0": - version: 0.1.1 - resolution: "posix-character-classes@npm:0.1.1" - checksum: 10/dedb99913c60625a16050cfed2fb5c017648fc075be41ac18474e1c6c3549ef4ada201c8bd9bd006d36827e289c571b6092e1ef6e756cdbab2fd7046b25c6442 +"doctrine@npm:^3.0.0": + version: 3.0.0 + resolution: "doctrine@npm:3.0.0" + dependencies: + esutils: "npm:^2.0.2" + checksum: 10/b4b28f1df5c563f7d876e7461254a4597b8cabe915abe94d7c5d1633fed263fcf9a85e8d3836591fc2d040108e822b0d32758e5ec1fe31c590dc7e08086e3e48 languageName: node linkType: hard -"possible-typed-array-names@npm:^1.0.0": - version: 1.0.0 - resolution: "possible-typed-array-names@npm:1.0.0" - checksum: 10/8ed3e96dfeea1c5880c1f4c9cb707e5fb26e8be22f14f82ef92df20fd2004e635c62ba47fbe8f2bb63bfd80dac1474be2fb39798da8c2feba2815435d1f749af +"dom-serializer@npm:^2.0.0": + version: 2.0.0 + resolution: "dom-serializer@npm:2.0.0" + dependencies: + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.2" + entities: "npm:^4.2.0" + checksum: 10/e3bf9027a64450bca0a72297ecdc1e3abb7a2912268a9f3f5d33a2e29c1e2c3502c6e9f860fc6625940bfe0cfb57a44953262b9e94df76872fdfb8151097eeb3 languageName: node linkType: hard -"postcss-attribute-case-insensitive@npm:^5.0.2": - version: 5.0.2 - resolution: "postcss-attribute-case-insensitive@npm:5.0.2" - dependencies: - postcss-selector-parser: "npm:^6.0.10" - peerDependencies: - postcss: ^8.2 - checksum: 10/c0b8139f37e68dba372724cba03a53c30716224f0085f98485cada99489beb7c3da9d598ffc1d81519b59d9899291712c9041c250205e6ec0b034bb2c144dcf9 +"domain-browser@npm:^4.19.0": + version: 4.22.0 + resolution: "domain-browser@npm:4.22.0" + checksum: 10/3ffbaf0cae8da717698d472ca85ab52f96c538fe1fe85e5eb3351d4e7af52423ce096b8a0c51bb318e1c9ccf9c2e94b3b0f68e5923ad0aa0c623a32b641ed11c languageName: node linkType: hard -"postcss-browser-comments@npm:^4": - version: 4.0.0 - resolution: "postcss-browser-comments@npm:4.0.0" - peerDependencies: - browserslist: ">=4" - postcss: ">=8" - checksum: 10/41850023901eada80e41f7328874e458b4b1e38fcf8aea277ae02128d3585d6652063544f34b575561a8d4f53e154e8082cc82ac73e09118bbad41dc749f7a54 +"domelementtype@npm:^2.3.0": + version: 2.3.0 + resolution: "domelementtype@npm:2.3.0" + checksum: 10/ee837a318ff702622f383409d1f5b25dd1024b692ef64d3096ff702e26339f8e345820f29a68bcdcea8cfee3531776b3382651232fbeae95612d6f0a75efb4f6 languageName: node linkType: hard -"postcss-calc@npm:^8.2.3": - version: 8.2.4 - resolution: "postcss-calc@npm:8.2.4" +"domhandler@npm:^5.0.1, domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": + version: 5.0.3 + resolution: "domhandler@npm:5.0.3" dependencies: - postcss-selector-parser: "npm:^6.0.9" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.2 - checksum: 10/f34d0cbc5d2b02071cf4de9bacbb93681c22b29048726b500b5f5327e37b590d2552ba4d8ed179e2378037fd09cc6bf5ee3e25cbd8a803c57205795fa79479a8 + domelementtype: "npm:^2.3.0" + checksum: 10/809b805a50a9c6884a29f38aec0a4e1b4537f40e1c861950ed47d10b049febe6b79ab72adaeeebb3cc8fc1cd33f34e97048a72a9265103426d93efafa78d3e96 languageName: node linkType: hard -"postcss-clamp@npm:^4.1.0": - version: 4.1.0 - resolution: "postcss-clamp@npm:4.1.0" +"domutils@npm:^3.0.1": + version: 3.0.1 + resolution: "domutils@npm:3.0.1" dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.4.6 - checksum: 10/fb38286d3e607a8b11ef28c89272bd572a077f5a496e2838c3996697bbc4cfb8f7a5be4b4a8987e6b0223db48c9ce5683c9d840f7afe54210ab0f77127628415 + dom-serializer: "npm:^2.0.0" + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.1" + checksum: 10/c0031e4bf89bf701c552c6aa7937262351ae863d5bb0395ebae9cdb23eb3de0077343ca0ddfa63861d98c31c02bbabe4c6e0e11be87b04a090a4d5dbb75197dc languageName: node linkType: hard -"postcss-color-functional-notation@npm:^4.2.4": - version: 4.2.4 - resolution: "postcss-color-functional-notation@npm:4.2.4" +"dot-prop@npm:^5.1.0, dot-prop@npm:^5.2.0": + version: 5.3.0 + resolution: "dot-prop@npm:5.3.0" dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/a64e24588538bdf182de43d093d622248c6b6b50ea8f2abbae302ec00e07c2af767841748181b28163e14bb25135d5b657ffde9c4dde2d6a9db71d0fae827cd8 + is-obj: "npm:^2.0.0" + checksum: 10/33b2561617bd5c73cf9305368ba4638871c5dbf9c8100c8335acd2e2d590a81ec0e75c11cfaea5cc3cf8c2f668cad4beddb52c11856d0c9e666348eee1baf57a languageName: node linkType: hard -"postcss-color-hex-alpha@npm:^8.0.4": - version: 8.0.4 - resolution: "postcss-color-hex-alpha@npm:8.0.4" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.4 - checksum: 10/a2f3173a60176cf0aea3b7ebbc799b2cb08229127f0fff708fa31efa14e4ded47ca49aff549d8ed92e74ffe24adee32d5b9d557dbde0524fde5fe389bc520b4e +"dotenv@npm:^16.4.5": + version: 16.4.5 + resolution: "dotenv@npm:16.4.5" + checksum: 10/55a3134601115194ae0f924e54473459ed0d9fc340ae610b676e248cca45aa7c680d86365318ea964e6da4e2ea80c4514c1adab5adb43d6867fb57ff068f95c8 languageName: node linkType: hard -"postcss-color-rebeccapurple@npm:^7.1.1": - version: 7.1.1 - resolution: "postcss-color-rebeccapurple@npm:7.1.1" +"dotignore@npm:^0.1.2": + version: 0.1.2 + resolution: "dotignore@npm:0.1.2" dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/4876acabfe6b41f78687253eaeb1fd398144bc7e6aae9ae9ffdd6dfcf16f1a315d5a405e730b5fde5312fc21207a99d0065cef286959663d97c8ad1cc5057a87 + minimatch: "npm:^3.0.4" + bin: + ignored: bin/ignored + checksum: 10/06bab15e2a2400c6f823a0edbcd73661180f6245a4041a3fe3b9fde4b22ae74b896604df4520a877093f05c656bd080087376c9f605bccdea847664c59910f37 languageName: node linkType: hard -"postcss-colormin@npm:^5.3.1": - version: 5.3.1 - resolution: "postcss-colormin@npm:5.3.1" - dependencies: - browserslist: "npm:^4.21.4" - caniuse-api: "npm:^3.0.0" - colord: "npm:^2.9.1" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/e5778baab30877cd1f51e7dc9d2242a162aeca6360a52956acd7f668c5bc235c2ccb7e4df0370a804d65ebe00c5642366f061db53aa823f9ed99972cebd16024 +"duplexer3@npm:^0.1.4": + version: 0.1.5 + resolution: "duplexer3@npm:0.1.5" + checksum: 10/e677cb4c48f031ca728601d6a20bf6aed4c629d69ef9643cb89c67583d673c4ec9317cc6427501f38bd8c368d3a18f173987cc02bd99d8cf8fe3d94259a22a20 languageName: node linkType: hard -"postcss-convert-values@npm:^5.1.3": - version: 5.1.3 - resolution: "postcss-convert-values@npm:5.1.3" - dependencies: - browserslist: "npm:^4.21.4" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/dacb41296a4d730c9e84c1b6ba8a13f6515b65811689b8b62ad6c7174bb462b5c0bfa21803cc06d1d3af16dbc8f4be1e225970844297fab0bedfe2fef8dc603e +"duplexer@npm:^0.1.1": + version: 0.1.2 + resolution: "duplexer@npm:0.1.2" + checksum: 10/62ba61a830c56801db28ff6305c7d289b6dc9f859054e8c982abd8ee0b0a14d2e9a8e7d086ffee12e868d43e2bbe8a964be55ddbd8c8957714c87373c7a4f9b0 languageName: node linkType: hard -"postcss-custom-media@npm:^8.0.2": - version: 8.0.2 - resolution: "postcss-custom-media@npm:8.0.2" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.3 - checksum: 10/02d0dfd53d2f748f2904d6c380e790ec6d2dca0d96e70e2d261d504700ad9fdb1f1e3febeefb4611b9005e91c412725502ed2f5885455d6e1483cc016d65af34 +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10/9b1d3e1baefeaf7d70799db8774149cef33b97183a6addceeba0cf6b85ba23ee2686f302f14482006df32df75d32b17c509c143a3689627929e4a8efaf483952 languageName: node linkType: hard -"postcss-custom-properties@npm:^12.1.10": - version: 12.1.11 - resolution: "postcss-custom-properties@npm:12.1.11" +"easy-table@npm:1.1.0": + version: 1.1.0 + resolution: "easy-table@npm:1.1.0" dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/3f049f07cc45c9debcc8d662374947eb3158bb66b2722c81368b36d60de0629e75d80ccfe2ca25ba21af8ce146c50dbc91c62c28e01c06635252e39678c1eb6d + wcwidth: "npm:>=1.0.1" + dependenciesMeta: + wcwidth: + optional: true + checksum: 10/f01fde1162c41ad770e0067c6a732d9bad9edf542d79306ed08509e4f829dd9b18e98b7e25b065ea7e5e5de67f4ff3a4331e3f8c384b17b82c4869b58bb81307 languageName: node linkType: hard -"postcss-custom-selectors@npm:^6.0.3": - version: 6.0.3 - resolution: "postcss-custom-selectors@npm:6.0.3" - dependencies: - postcss-selector-parser: "npm:^6.0.4" - peerDependencies: - postcss: ^8.3 - checksum: 10/da174daa68643b4c814ea1ef763551c7c48d0873bc101f9902e85ed271f3d5f46d50e0e496eec8dc49c9c88f68f021bb5ee16940136232d4bb7e765eb5a0ae03 +"electron-to-chromium@npm:^1.4.118": + version: 1.4.137 + resolution: "electron-to-chromium@npm:1.4.137" + checksum: 10/3e0bbd1faaa654efcc13214245cbee8c51178e8c4f3bfdb1a458bc933fe2d3794b9992c627f73f5fbf131f9f0268ba8dfbba1198efbfc868821fa071fbc17d57 languageName: node linkType: hard -"postcss-dir-pseudo-class@npm:^6.0.5": - version: 6.0.5 - resolution: "postcss-dir-pseudo-class@npm:6.0.5" - dependencies: - postcss-selector-parser: "npm:^6.0.10" - peerDependencies: - postcss: ^8.2 - checksum: 10/70117146ff55225bcfe47186d7ff1bf68f4de551761797f60e475e923047caa0c373197b810133d52d2bca18e45040c4a9b20e92037847496509cf7089adc3ec +"electron-to-chromium@npm:^1.4.477": + version: 1.4.513 + resolution: "electron-to-chromium@npm:1.4.513" + checksum: 10/13f79eb6fbe18feba45e79283f119d098d58f08774e881ed9f41ac0d0b161457da08717c8705a0bf694147876331bfd0a0e0f49c5ffd6ab0303aa4cf70aa7188 languageName: node linkType: hard -"postcss-discard-comments@npm:^5.1.2": - version: 5.1.2 - resolution: "postcss-discard-comments@npm:5.1.2" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/abfd064ebc27aeaf5037643dd51ffaff74d1fa4db56b0523d073ace4248cbb64ffd9787bd6924b0983a9d0bd0e9bf9f10d73b120e50391dc236e0d26c812fa2a +"elliptic@npm:>=6.5.7": + version: 6.5.7 + resolution: "elliptic@npm:6.5.7" + dependencies: + bn.js: "npm:^4.11.9" + brorand: "npm:^1.1.0" + hash.js: "npm:^1.0.0" + hmac-drbg: "npm:^1.0.1" + inherits: "npm:^2.0.4" + minimalistic-assert: "npm:^1.0.1" + minimalistic-crypto-utils: "npm:^1.0.1" + checksum: 10/fbad1fad0a5cc07df83f80cc1f7a784247ef59075194d3e340eaeb2f4dd594825ee24c7e9b0cf279c9f1982efe610503bb3139737926428c4821d4fca1bcf348 languageName: node linkType: hard -"postcss-discard-duplicates@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-discard-duplicates@npm:5.1.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/88d6964201b1f4ed6bf7a32cefe68e86258bb6e42316ca01d9b32bdb18e7887d02594f89f4a2711d01b51ea6e3fcca8c54be18a59770fe5f4521c61d3eb6ca35 +"emittery@npm:^0.13.1": + version: 0.13.1 + resolution: "emittery@npm:0.13.1" + checksum: 10/fbe214171d878b924eedf1757badf58a5dce071cd1fa7f620fa841a0901a80d6da47ff05929d53163105e621ce11a71b9d8acb1148ffe1745e045145f6e69521 languageName: node linkType: hard -"postcss-discard-empty@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-discard-empty@npm:5.1.1" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/970adb12fae5c214c0768236ad9a821552626e77dedbf24a8213d19cc2c4a531a757cd3b8cdd3fc22fb1742471b8692a1db5efe436a71236dec12b1318ee8ff4 +"emoji-regex@npm:^10.3.0": + version: 10.3.0 + resolution: "emoji-regex@npm:10.3.0" + checksum: 10/b9b084ebe904f13bb4b66ee4c29fb41a7a4a1165adcc33c1ce8056c0194b882cc91ebdc782f1a779b5d7ea7375c5064643a7734893d7c657b44c5c6b9d7bf1e7 languageName: node linkType: hard -"postcss-discard-overridden@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-discard-overridden@npm:5.1.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/d64d4a545aa2c81b22542895cfcddc787d24119f294d35d29b0599a1c818b3cc51f4ee80b80f5a0a09db282453dd5ac49f104c2117cc09112d0ac9b40b499a41 +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 languageName: node linkType: hard -"postcss-double-position-gradients@npm:^3.1.2": - version: 3.1.2 - resolution: "postcss-double-position-gradients@npm:3.1.2" - dependencies: - "@csstools/postcss-progressive-custom-properties": "npm:^1.1.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/5ed0561c3b64ba6fc6efc1069d469c98fe2b4b0460bdc3a5d859bc39224def7b3142c56a56336a7c24365aee9c94bb65aa61f498921ce8b77b4c89811beea857 +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10/915acf859cea7131dac1b2b5c9c8e35c4849e325a1d114c30adb8cd615970f6dca0e27f64f3a4949d7d6ed86ecd79a1c5c63f02e697513cddd7b5835c90948b8 languageName: node linkType: hard -"postcss-env-function@npm:^4.0.6": - version: 4.0.6 - resolution: "postcss-env-function@npm:4.0.6" +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.4 - checksum: 10/76e0c9de458a8938da92be7755f0a8a25fd2d1790e509b7b3c7975c1c121b3786095dcab19a884759ff2c701b5eeefac5f3c7e8d1a7394a4ffc5ad97d2e3c1fe + iconv-lite: "npm:^0.6.2" + checksum: 10/bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f languageName: node linkType: hard -"postcss-flexbugs-fixes@npm:^5.0.2": - version: 5.0.2 - resolution: "postcss-flexbugs-fixes@npm:5.0.2" - peerDependencies: - postcss: ^8.1.4 - checksum: 10/022ddbcca8987303b9be75ff259e9de81b98643adac87a5fc6b52a0fcbbf95e1ac9fd508c4ed67cad76ac5d039b7123de8a0832329481b3c626f5d63f7a28f47 +"end-of-stream@npm:^1.1.0": + version: 1.4.4 + resolution: "end-of-stream@npm:1.4.4" + dependencies: + once: "npm:^1.4.0" + checksum: 10/530a5a5a1e517e962854a31693dbb5c0b2fc40b46dad2a56a2deec656ca040631124f4795823acc68238147805f8b021abbe221f4afed5ef3c8e8efc2024908b languageName: node linkType: hard -"postcss-focus-visible@npm:^6.0.4": - version: 6.0.4 - resolution: "postcss-focus-visible@npm:6.0.4" - dependencies: - postcss-selector-parser: "npm:^6.0.9" - peerDependencies: - postcss: ^8.4 - checksum: 10/efe1b14f72a590d6cd923f53e8023364a34397b377dba6caaada424f5a53621a08fec6f0bb9f3110ddabb00eb6e745746de39d1a03a2218cf89c0eb70ab11675 +"engine.io-parser@npm:~5.2.1": + version: 5.2.3 + resolution: "engine.io-parser@npm:5.2.3" + checksum: 10/eb0023fff5766e7ae9d59e52d92df53fea06d472cfd7b52e5d2c36b4c1dbf78cab5fde1052bcb3d4bb85bdb5aee10ae85d8a1c6c04676dac0c6cdf16bcba6380 languageName: node linkType: hard -"postcss-focus-within@npm:^5.0.4": - version: 5.0.4 - resolution: "postcss-focus-within@npm:5.0.4" +"engine.io@npm:>=6.4.2": + version: 6.6.2 + resolution: "engine.io@npm:6.6.2" dependencies: - postcss-selector-parser: "npm:^6.0.9" - peerDependencies: - postcss: ^8.4 - checksum: 10/1d274e06312386190bc6cd006a92748aca59207021787a6f44b33760a549b5fa1baef2797ca839ae34a9edb36dbedc6700ab01e5b0926d6a96001223bcd674dd + "@types/cookie": "npm:^0.4.1" + "@types/cors": "npm:^2.8.12" + "@types/node": "npm:>=10.0.0" + accepts: "npm:~1.3.4" + base64id: "npm:2.0.0" + cookie: "npm:~0.7.2" + cors: "npm:~2.8.5" + debug: "npm:~4.3.1" + engine.io-parser: "npm:~5.2.1" + ws: "npm:~8.17.1" + checksum: 10/381c0a715362bebf32c95f0e4247899b53ff9f8c0074b03f88748cf17635a02948ea3eca27905df37130bc963747c0d286acc78c757e6fc085fe8b8e17d76e01 languageName: node linkType: hard -"postcss-font-variant@npm:^5.0.0": - version: 5.0.0 - resolution: "postcss-font-variant@npm:5.0.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/738328282cf71750f6efc72d72017f938a6e76c9c49602aae4cc4337beac6d13e72a4ade608567293cb87cad2af502e6aaef652fdcc500e09b4aba38c3e32fc6 +"enhanced-resolve@npm:^5.0.0": + version: 5.12.0 + resolution: "enhanced-resolve@npm:5.12.0" + dependencies: + graceful-fs: "npm:^4.2.4" + tapable: "npm:^2.2.0" + checksum: 10/ea5b49a0641827c6a083eaa3a625f953f4bd4e8f015bf70b9fb8cf60a35aaeb44e567df2da91ed28efaea3882845016e1d22a3152c2fdf773ea14f39cbe3d8a9 languageName: node linkType: hard -"postcss-gap-properties@npm:^3.0.5": - version: 3.0.5 - resolution: "postcss-gap-properties@npm:3.0.5" - peerDependencies: - postcss: ^8.2 - checksum: 10/e4513d02424bd3ab1e472a81d54fe2825b7a21ff81991abd8bce1438cdc5d1006cb9c821875bd50afcd74c82a9b99d59ad36a12e8fd9da4e028b99a00793a565 +"enhanced-resolve@npm:^5.14.1": + version: 5.17.0 + resolution: "enhanced-resolve@npm:5.17.0" + dependencies: + graceful-fs: "npm:^4.2.4" + tapable: "npm:^2.2.0" + checksum: 10/8f7bf71537d78e7d20a27363793f2c9e13ec44800c7c7830364a448f80a44994aa19d64beecefa1ab49e4de6f7fbe18cc0931dc449c115f02918ff5fcbe7705f languageName: node linkType: hard -"postcss-image-set-function@npm:^4.0.7": - version: 4.0.7 - resolution: "postcss-image-set-function@npm:4.0.7" +"enhanced-resolve@npm:^5.17.1": + version: 5.17.1 + resolution: "enhanced-resolve@npm:5.17.1" dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/17cba0b2bda98900dfe6adae88a9034cfc6fc6101b386144a27218bcdc5e65b52576326beb0d92a908423f4d144873998044e6f41c01e16165873225d3678889 + graceful-fs: "npm:^4.2.4" + tapable: "npm:^2.2.0" + checksum: 10/e8e03cb7a4bf3c0250a89afbd29e5ec20e90ba5fcd026066232a0754864d7d0a393fa6fc0e5379314a6529165a1834b36731147080714459d98924520410d8f5 languageName: node linkType: hard -"postcss-import@npm:^15.1.0": - version: 15.1.0 - resolution: "postcss-import@npm:15.1.0" +"enquirer@npm:^2.3.6": + version: 2.3.6 + resolution: "enquirer@npm:2.3.6" dependencies: - postcss-value-parser: "npm:^4.0.0" - read-cache: "npm:^1.0.0" - resolve: "npm:^1.1.7" - peerDependencies: - postcss: ^8.0.0 - checksum: 10/33c91b7e6b794b5c33d7d7d4730e5f0729c131d2de1ada7fcc116955625a78c3ce613983f019fa9447681795cf3f851e9c38dfbe3f48a2d08a8aef917c70a32a + ansi-colors: "npm:^4.1.1" + checksum: 10/751d14f037eb7683997e696fb8d5fe2675e0b0cde91182c128cf598acf3f5bd9005f35f7c2a9109e291140af496ebec237b6dac86067d59a9b44f3688107f426 languageName: node linkType: hard -"postcss-initial@npm:^4.0.1": - version: 4.0.1 - resolution: "postcss-initial@npm:4.0.1" - peerDependencies: - postcss: ^8.0.0 - checksum: 10/556848de52b502696f0a28153e14d35aca03aa702eacd742f0518a68dfca882654b600ba8742a28c6d1c378888cee767d87aec41ecd2880f8b83434df3f2b20e +"entities@npm:^4.2.0, entities@npm:^4.4.0": + version: 4.4.0 + resolution: "entities@npm:4.4.0" + checksum: 10/b627cb900e901cc7817037b83bf993a1cbf6a64850540f7526af7bcf9c7d09ebc671198e6182cfae4680f733799e2852e6a1c46aa62ff36eb99680057a038df5 languageName: node linkType: hard -"postcss-js@npm:^4.0.1": - version: 4.0.1 - resolution: "postcss-js@npm:4.0.1" - dependencies: - camelcase-css: "npm:^2.0.1" - peerDependencies: - postcss: ^8.4.21 - checksum: 10/ef2cfe8554daab4166cfcb290f376e7387964c36503f5bd42008778dba735685af8d4f5e0aba67cae999f47c855df40a1cd31ae840e0df320ded36352581045e +"env-paths@npm:^2.2.0, env-paths@npm:^2.2.1": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e languageName: node linkType: hard -"postcss-lab-function@npm:^4.2.1": - version: 4.2.1 - resolution: "postcss-lab-function@npm:4.2.1" - dependencies: - "@csstools/postcss-progressive-custom-properties": "npm:^1.1.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/0cc25e4dec23a421da1a5652096c4114b2bf5df0a77ee27f1b579f0e7f3692137e1660d1b8d14f4208625f5e5ceb7ada5db67f75577d187879354733ee6fc3f2 +"env-paths@npm:^3.0.0": + version: 3.0.0 + resolution: "env-paths@npm:3.0.0" + checksum: 10/b2b0a0d0d9931a13d279c22ed94d78648a1cc5f408f05d47ff3e0c1616f0aa0c38fb33deec5e5be50497225d500607d57f9c8652c4d39c2f2b7608cd45768128 languageName: node linkType: hard -"postcss-load-config@npm:^4.0.1": - version: 4.0.1 - resolution: "postcss-load-config@npm:4.0.1" - dependencies: - lilconfig: "npm:^2.0.5" - yaml: "npm:^2.1.1" - peerDependencies: - postcss: ">=8.0.9" - ts-node: ">=9.0.0" - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - checksum: 10/d841565bc3638ae4b6854d3046904e054e76fca0aea5cf3e730b47e171e3e0a041ffc5f9b7348b18ea59c5d1e315944fa657b1cf9c573eecb053117b0d31eb8d +"envinfo@npm:^7.7.3": + version: 7.8.1 + resolution: "envinfo@npm:7.8.1" + bin: + envinfo: dist/cli.js + checksum: 10/e7a2d71c7dfe398a4ffda0e844e242d2183ef2627f98e74e4cd71edd2af691c8707a2b34aacef92538c27b3daf9a360d32202f33c0a9f27f767c4e1c6ba8b522 languageName: node linkType: hard -"postcss-loader@npm:7.3.3": - version: 7.3.3 - resolution: "postcss-loader@npm:7.3.3" - dependencies: - cosmiconfig: "npm:^8.2.0" - jiti: "npm:^1.18.2" - semver: "npm:^7.3.8" - peerDependencies: - postcss: ^7.0.0 || ^8.0.1 - webpack: ^5.0.0 - checksum: 10/743a4286db68169d271bef31e6e9351874bcf2dfa408b82c648c2d5bfba9c862cbfe3004494d927469654d6ac8b82fe647f2b80a186c1dbd44d81632eec1e838 +"eol@npm:^0.9.1": + version: 0.9.1 + resolution: "eol@npm:0.9.1" + checksum: 10/9d3fd93bb2bb5c69c7fe8dfb97b62213ed95857a2e90f5db3110415993e8a989d87fb011755ce22fdb92ca36fbe4e111b395a6f4ce00b9b51d3f00f19c2acf52 languageName: node linkType: hard -"postcss-loader@npm:8.1.1": - version: 8.1.1 - resolution: "postcss-loader@npm:8.1.1" - dependencies: - cosmiconfig: "npm:^9.0.0" - jiti: "npm:^1.20.0" - semver: "npm:^7.5.4" - peerDependencies: - "@rspack/core": 0.x || 1.x - postcss: ^7.0.0 || ^8.0.1 - webpack: ^5.0.0 - peerDependenciesMeta: - "@rspack/core": - optional: true - webpack: - optional: true - checksum: 10/7ae38e635119a808ec05e25a5d1327afd40f5f07e1ae40827e4be5e9d1d0adf0e8e277252c13ddbc8909a1bc53fecb15741db340b98966c2bd9cab867cfe5f10 +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10/1d20d825cdcce8d811bfbe86340f4755c02655a7feb2f13f8c880566d9d72a3f6c92c192a6867632e490d6da67b678271f46e01044996a6443e870331100dfdd languageName: node linkType: hard -"postcss-loader@npm:^6.2.1": - version: 6.2.1 - resolution: "postcss-loader@npm:6.2.1" +"error-ex@npm:^1.3.1, error-ex@npm:^1.3.2": + version: 1.3.2 + resolution: "error-ex@npm:1.3.2" dependencies: - cosmiconfig: "npm:^7.0.0" - klona: "npm:^2.0.5" - semver: "npm:^7.3.5" - peerDependencies: - postcss: ^7.0.0 || ^8.0.1 - webpack: ^5.0.0 - checksum: 10/ab4e4ffa1903611a6ee63bd77ac0fd02b17cf472037a3d6050b383ab3b3def5e4c3a49de5bb552e020e70d2ebde95400f49e4c423ad2a1c76675afda8d627911 - languageName: node - linkType: hard - -"postcss-logical@npm:^5.0.4": - version: 5.0.4 - resolution: "postcss-logical@npm:5.0.4" - peerDependencies: - postcss: ^8.4 - checksum: 10/de03f1e3070c3fc9d8cb373481b34a911a795138159e74451dfd553155bec5c64d7eabb30b26f8840754960d10bf9e880223ce694dcd1ec5e7b3be3cfa6438e0 + is-arrayish: "npm:^0.2.1" + checksum: 10/d547740aa29c34e753fb6fed2c5de81802438529c12b3673bd37b6bb1fe49b9b7abdc3c11e6062fe625d8a296b3cf769a80f878865e25e685f787763eede3ffb languageName: node linkType: hard -"postcss-media-minmax@npm:^5.0.0": - version: 5.0.0 - resolution: "postcss-media-minmax@npm:5.0.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/a35a25b944bb70583ef301ce98560b2a2062da25867f3bef5f7c62a8738b7924b78a2f7b293bba823ea4365c00e828680f51efad773f2e2cfcfa21f95282e0eb +"es-abstract@npm:^1.18.5, es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1": + version: 1.19.1 + resolution: "es-abstract@npm:1.19.1" + dependencies: + call-bind: "npm:^1.0.2" + es-to-primitive: "npm:^1.2.1" + function-bind: "npm:^1.1.1" + get-intrinsic: "npm:^1.1.1" + get-symbol-description: "npm:^1.0.0" + has: "npm:^1.0.3" + has-symbols: "npm:^1.0.2" + internal-slot: "npm:^1.0.3" + is-callable: "npm:^1.2.4" + is-negative-zero: "npm:^2.0.1" + is-regex: "npm:^1.1.4" + is-shared-array-buffer: "npm:^1.0.1" + is-string: "npm:^1.0.7" + is-weakref: "npm:^1.0.1" + object-inspect: "npm:^1.11.0" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.2" + string.prototype.trimend: "npm:^1.0.4" + string.prototype.trimstart: "npm:^1.0.4" + unbox-primitive: "npm:^1.0.1" + checksum: 10/39d31c7dea477bd0fc89404e4beb3b008832e8c56426a448e5c44577929063037824130ea12f6273012b6d744b49c0ba11d7696fc8eb55731f2444d86a8a8e14 languageName: node linkType: hard -"postcss-media-query-parser@npm:^0.2.3": - version: 0.2.3 - resolution: "postcss-media-query-parser@npm:0.2.3" - checksum: 10/39f9e9c383ec98d85103c5f3d1eb5a9088a47357ed26d3c7501aeba1302840521cffa1b851bc2d8146f1ccdef263fe3088f4d435bda1c0dc0b6f9387865574c8 +"es-abstract@npm:^1.20.4": + version: 1.21.2 + resolution: "es-abstract@npm:1.21.2" + dependencies: + array-buffer-byte-length: "npm:^1.0.0" + available-typed-arrays: "npm:^1.0.5" + call-bind: "npm:^1.0.2" + es-set-tostringtag: "npm:^2.0.1" + es-to-primitive: "npm:^1.2.1" + function.prototype.name: "npm:^1.1.5" + get-intrinsic: "npm:^1.2.0" + get-symbol-description: "npm:^1.0.0" + globalthis: "npm:^1.0.3" + gopd: "npm:^1.0.1" + has: "npm:^1.0.3" + has-property-descriptors: "npm:^1.0.0" + has-proto: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + internal-slot: "npm:^1.0.5" + is-array-buffer: "npm:^3.0.2" + is-callable: "npm:^1.2.7" + is-negative-zero: "npm:^2.0.2" + is-regex: "npm:^1.1.4" + is-shared-array-buffer: "npm:^1.0.2" + is-string: "npm:^1.0.7" + is-typed-array: "npm:^1.1.10" + is-weakref: "npm:^1.0.2" + object-inspect: "npm:^1.12.3" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.4" + regexp.prototype.flags: "npm:^1.4.3" + safe-regex-test: "npm:^1.0.0" + string.prototype.trim: "npm:^1.2.7" + string.prototype.trimend: "npm:^1.0.6" + string.prototype.trimstart: "npm:^1.0.6" + typed-array-length: "npm:^1.0.4" + unbox-primitive: "npm:^1.0.2" + which-typed-array: "npm:^1.1.9" + checksum: 10/2e1d6922c9a03d90f5a45fa56574a14f9436d9711ed424ace23ae87f79d0190dbffda1c0564980f6048dc2348f0390427a1fbae309fdb16a9ed42cd5c79dce6e languageName: node linkType: hard -"postcss-merge-longhand@npm:^5.1.7": - version: 5.1.7 - resolution: "postcss-merge-longhand@npm:5.1.7" +"es-abstract@npm:^1.22.1": + version: 1.22.1 + resolution: "es-abstract@npm:1.22.1" dependencies: - postcss-value-parser: "npm:^4.2.0" - stylehacks: "npm:^5.1.1" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/9002696bb245634c0542af9356b44082a4c1453261a1daac6ea2f85055a5d6e14ac3ae2ba603f5eae767ebfe0e1ef50c40447b099520b8f5fa14b557da8074ad + array-buffer-byte-length: "npm:^1.0.0" + arraybuffer.prototype.slice: "npm:^1.0.1" + available-typed-arrays: "npm:^1.0.5" + call-bind: "npm:^1.0.2" + es-set-tostringtag: "npm:^2.0.1" + es-to-primitive: "npm:^1.2.1" + function.prototype.name: "npm:^1.1.5" + get-intrinsic: "npm:^1.2.1" + get-symbol-description: "npm:^1.0.0" + globalthis: "npm:^1.0.3" + gopd: "npm:^1.0.1" + has: "npm:^1.0.3" + has-property-descriptors: "npm:^1.0.0" + has-proto: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + internal-slot: "npm:^1.0.5" + is-array-buffer: "npm:^3.0.2" + is-callable: "npm:^1.2.7" + is-negative-zero: "npm:^2.0.2" + is-regex: "npm:^1.1.4" + is-shared-array-buffer: "npm:^1.0.2" + is-string: "npm:^1.0.7" + is-typed-array: "npm:^1.1.10" + is-weakref: "npm:^1.0.2" + object-inspect: "npm:^1.12.3" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.4" + regexp.prototype.flags: "npm:^1.5.0" + safe-array-concat: "npm:^1.0.0" + safe-regex-test: "npm:^1.0.0" + string.prototype.trim: "npm:^1.2.7" + string.prototype.trimend: "npm:^1.0.6" + string.prototype.trimstart: "npm:^1.0.6" + typed-array-buffer: "npm:^1.0.0" + typed-array-byte-length: "npm:^1.0.0" + typed-array-byte-offset: "npm:^1.0.0" + typed-array-length: "npm:^1.0.4" + unbox-primitive: "npm:^1.0.2" + which-typed-array: "npm:^1.1.10" + checksum: 10/bd6c243a128ea1cb97cdd11c433a1f712b607b66bb2d40b42e4a4e4c746e679d3c168b59614fefed4bc3b0d7abc106ad202e8f417739371a151b9189d75af72a languageName: node linkType: hard -"postcss-merge-rules@npm:^5.1.4": - version: 5.1.4 - resolution: "postcss-merge-rules@npm:5.1.4" +"es-abstract@npm:^1.22.3": + version: 1.22.5 + resolution: "es-abstract@npm:1.22.5" dependencies: - browserslist: "npm:^4.21.4" - caniuse-api: "npm:^3.0.0" - cssnano-utils: "npm:^3.1.0" - postcss-selector-parser: "npm:^6.0.5" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/659c3eaff9d573f07c227a7e4811159898f49a89b02bbd3a65a0ed7aaa434264443ab539bcbc273bf08986e6a185bd62af0847c9836f9e2901c5f07937c14f3f + array-buffer-byte-length: "npm:^1.0.1" + arraybuffer.prototype.slice: "npm:^1.0.3" + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.7" + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + es-set-tostringtag: "npm:^2.0.3" + es-to-primitive: "npm:^1.2.1" + function.prototype.name: "npm:^1.1.6" + get-intrinsic: "npm:^1.2.4" + get-symbol-description: "npm:^1.0.2" + globalthis: "npm:^1.0.3" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.2" + has-proto: "npm:^1.0.3" + has-symbols: "npm:^1.0.3" + hasown: "npm:^2.0.1" + internal-slot: "npm:^1.0.7" + is-array-buffer: "npm:^3.0.4" + is-callable: "npm:^1.2.7" + is-negative-zero: "npm:^2.0.3" + is-regex: "npm:^1.1.4" + is-shared-array-buffer: "npm:^1.0.3" + is-string: "npm:^1.0.7" + is-typed-array: "npm:^1.1.13" + is-weakref: "npm:^1.0.2" + object-inspect: "npm:^1.13.1" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.5" + regexp.prototype.flags: "npm:^1.5.2" + safe-array-concat: "npm:^1.1.0" + safe-regex-test: "npm:^1.0.3" + string.prototype.trim: "npm:^1.2.8" + string.prototype.trimend: "npm:^1.0.7" + string.prototype.trimstart: "npm:^1.0.7" + typed-array-buffer: "npm:^1.0.2" + typed-array-byte-length: "npm:^1.0.1" + typed-array-byte-offset: "npm:^1.0.2" + typed-array-length: "npm:^1.0.5" + unbox-primitive: "npm:^1.0.2" + which-typed-array: "npm:^1.1.14" + checksum: 10/33bba7be636a6c56d836bb7d8860d2082deb02903c906cf31a93840302ac42c731b6d4f6393c1d112fa46c8778b2c1282e7833d206fe5e88e803dab1c8afefed languageName: node linkType: hard -"postcss-minify-font-values@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-minify-font-values@npm:5.1.0" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/27e7023f06149e14db6cd30b75d233c92d34609233775d8542fe1dc70fe53170a13188ba80847d6d4f6e272beb98b9888e0f73097757a95a968a0d526e3dd495 +"es-array-method-boxes-properly@npm:^1.0.0": + version: 1.0.0 + resolution: "es-array-method-boxes-properly@npm:1.0.0" + checksum: 10/27a8a21acf20f3f51f69dce8e643f151e380bffe569e95dc933b9ded9fcd89a765ee21b5229c93f9206c93f87395c6b75f80be8ac8c08a7ceb8771e1822ff1fb languageName: node linkType: hard -"postcss-minify-gradients@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-minify-gradients@npm:5.1.1" +"es-define-property@npm:^1.0.0": + version: 1.0.0 + resolution: "es-define-property@npm:1.0.0" dependencies: - colord: "npm:^2.9.1" - cssnano-utils: "npm:^3.1.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/8afc4c2240c0ddeb37b18f34e6d47d374c500376342c509b0fe577c56f9e94315a42db99a9573159efaf8853c7a1b9fee83b2f6f890a49273f3556b1ba9dbdde + get-intrinsic: "npm:^1.2.4" + checksum: 10/f66ece0a887b6dca71848fa71f70461357c0e4e7249696f81bad0a1f347eed7b31262af4a29f5d726dc026426f085483b6b90301855e647aa8e21936f07293c6 languageName: node linkType: hard -"postcss-minify-params@npm:^5.1.4": - version: 5.1.4 - resolution: "postcss-minify-params@npm:5.1.4" - dependencies: - browserslist: "npm:^4.21.4" - cssnano-utils: "npm:^3.1.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/bd63e2cc89edcf357bb5c2a16035f6d02ef676b8cede4213b2bddd42626b3d428403849188f95576fc9f03e43ebd73a29bf61d33a581be9a510b13b7f7f100d5 +"es-errors@npm:^1.0.0, es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: 10/96e65d640156f91b707517e8cdc454dd7d47c32833aa3e85d79f24f9eb7ea85f39b63e36216ef0114996581969b59fe609a94e30316b08f5f4df1d44134cf8d5 languageName: node linkType: hard -"postcss-minify-selectors@npm:^5.2.1": - version: 5.2.1 - resolution: "postcss-minify-selectors@npm:5.2.1" +"es-get-iterator@npm:^1.1.3": + version: 1.1.3 + resolution: "es-get-iterator@npm:1.1.3" dependencies: - postcss-selector-parser: "npm:^6.0.5" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/59eca33eb9ce45b688cca33cf7bb96b07c874f6d2b90f4a3363bc95067c514825c61dd8775c9aa73a161c922333474e6f249cc58677cd77b2be8cc04019e0810 + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.1.3" + has-symbols: "npm:^1.0.3" + is-arguments: "npm:^1.1.1" + is-map: "npm:^2.0.2" + is-set: "npm:^2.0.2" + is-string: "npm:^1.0.7" + isarray: "npm:^2.0.5" + stop-iteration-iterator: "npm:^1.0.0" + checksum: 10/bc2194befbe55725f9489098626479deee3c801eda7e83ce0dff2eb266a28dc808edb9b623ff01d31ebc1328f09d661333d86b601036692c2e3c1a6942319433 languageName: node linkType: hard -"postcss-modules-extract-imports@npm:^3.0.0": - version: 3.0.0 - resolution: "postcss-modules-extract-imports@npm:3.0.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/8d68bb735cef4d43f9cdc1053581e6c1c864860b77fcfb670372b39c5feeee018dc5ddb2be4b07fef9bcd601edded4262418bbaeaf1bd4af744446300cebe358 +"es-main@npm:1.2.0": + version: 1.2.0 + resolution: "es-main@npm:1.2.0" + checksum: 10/b1feaaa71c0c5b0c494cd7d4f1fdb32fcdc9835b824ca2f61a7fbb899627305d88efef584490c24ebacde79289ac14908823c066176e15a784c49fa924db9b0b languageName: node linkType: hard -"postcss-modules-local-by-default@npm:^4.0.3": - version: 4.0.3 - resolution: "postcss-modules-local-by-default@npm:4.0.3" - dependencies: - icss-utils: "npm:^5.0.0" - postcss-selector-parser: "npm:^6.0.2" - postcss-value-parser: "npm:^4.1.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/4f671d77cb6a025c8be09540fea00ce2d3dbf3375a3a15b48f927325c7418d7c3c87a83bacbf81c5de6ef8bd1660d5f6f2542b98de5877355a23b739379f8c79 +"es-module-lexer@npm:^1.2.1": + version: 1.3.0 + resolution: "es-module-lexer@npm:1.3.0" + checksum: 10/dee2af09669d05282db987839681ea1917ce31ce4a2364cc9eb598675344c5c709895e7e782db87794065a6f3af054552e2cf42ccadcaec4c9fc0cbc4898f193 languageName: node linkType: hard -"postcss-modules-local-by-default@npm:^4.0.4": - version: 4.0.5 - resolution: "postcss-modules-local-by-default@npm:4.0.5" +"es-set-tostringtag@npm:^2.0.1": + version: 2.0.1 + resolution: "es-set-tostringtag@npm:2.0.1" dependencies: - icss-utils: "npm:^5.0.0" - postcss-selector-parser: "npm:^6.0.2" - postcss-value-parser: "npm:^4.1.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/b08b01aa7f3d1a80bb1a5508ba3a208578fdd2fb6e54e5613fac244a4e014aa7ca639a614859fec93b399e5a6f86938f7690ca60f7e57c4e35b75621d3c07734 + get-intrinsic: "npm:^1.1.3" + has: "npm:^1.0.3" + has-tostringtag: "npm:^1.0.0" + checksum: 10/ec416a12948cefb4b2a5932e62093a7cf36ddc3efd58d6c58ca7ae7064475ace556434b869b0bbeb0c365f1032a8ccd577211101234b69837ad83ad204fff884 languageName: node linkType: hard -"postcss-modules-scope@npm:^3.0.0": - version: 3.0.0 - resolution: "postcss-modules-scope@npm:3.0.0" +"es-set-tostringtag@npm:^2.0.3": + version: 2.0.3 + resolution: "es-set-tostringtag@npm:2.0.3" dependencies: - postcss-selector-parser: "npm:^6.0.4" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/cc36b8111c6160a1c21ca0e82de9daf0147be95f3b5403aedd83bcaee44ee425cb62b77f677fc53d0c8d51f7981018c1c8f0a4ad3d6f0138b09326ac48c2b297 + get-intrinsic: "npm:^1.2.4" + has-tostringtag: "npm:^1.0.2" + hasown: "npm:^2.0.1" + checksum: 10/7227fa48a41c0ce83e0377b11130d324ac797390688135b8da5c28994c0165be8b252e15cd1de41e1325e5a5412511586960213e88f9ab4a5e7d028895db5129 languageName: node linkType: hard -"postcss-modules-scope@npm:^3.1.1": - version: 3.2.0 - resolution: "postcss-modules-scope@npm:3.2.0" +"es-shim-unscopables@npm:^1.0.0": + version: 1.0.0 + resolution: "es-shim-unscopables@npm:1.0.0" dependencies: - postcss-selector-parser: "npm:^6.0.4" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/17c293ad13355ba456498aa5815ddb7a4a736f7b781d89b294e1602a53b8d0e336131175f82460e290a0d672642f9039540042edc361d9000b682c44e766925b + has: "npm:^1.0.3" + checksum: 10/ac2db2c70d253cf83bebcdc974d185239e205ca18af743efd3b656bac00cabfee2358a050b18b63b46972dab5cfa10ef3f2597eb3a8d4d6d9417689793665da6 languageName: node linkType: hard -"postcss-modules-values@npm:^4.0.0": - version: 4.0.0 - resolution: "postcss-modules-values@npm:4.0.0" +"es-shim-unscopables@npm:^1.0.2": + version: 1.0.2 + resolution: "es-shim-unscopables@npm:1.0.2" dependencies: - icss-utils: "npm:^5.0.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/18021961a494e69e65da9e42b4436144c9ecee65845c9bfeff2b7a26ea73d60762f69e288be8bb645447965b8fd6b26a264771136810dc0172bd31b940aee4f2 + hasown: "npm:^2.0.0" + checksum: 10/6d3bf91f658a27cc7217cd32b407a0d714393a84d125ad576319b9e83a893bea165cf41270c29e9ceaa56d3cf41608945d7e2a2c31fd51c0009b0c31402b91c7 languageName: node linkType: hard -"postcss-nested@npm:^6.0.1": - version: 6.0.1 - resolution: "postcss-nested@npm:6.0.1" +"es-to-primitive@npm:^1.2.1": + version: 1.2.1 + resolution: "es-to-primitive@npm:1.2.1" dependencies: - postcss-selector-parser: "npm:^6.0.11" - peerDependencies: - postcss: ^8.2.14 - checksum: 10/02aaac682f599879fae6aab3210aee59b8b5bde3ba242527f6fd103726955b74ffa05c2b765920be5f403e758045582534d11b1e19add01586c19743ed99e3fe + is-callable: "npm:^1.1.4" + is-date-object: "npm:^1.0.1" + is-symbol: "npm:^1.0.2" + checksum: 10/74aeeefe2714cf99bb40cab7ce3012d74e1e2c1bd60d0a913b467b269edde6e176ca644b5ba03a5b865fb044a29bca05671cd445c85ca2cdc2de155d7fc8fe9b languageName: node linkType: hard -"postcss-nesting@npm:^10.2.0": - version: 10.2.0 - resolution: "postcss-nesting@npm:10.2.0" - dependencies: - "@csstools/selector-specificity": "npm:^2.0.0" - postcss-selector-parser: "npm:^6.0.10" - peerDependencies: - postcss: ^8.2 - checksum: 10/eb3531612243379ce43aeb864acc146b77fb61a3b34e8679b61226c3078f318a06def50c9468650e6eb904022d4de325e2555d09866ba893f413e4b0416059d8 +"es6-error@npm:^4.0.1": + version: 4.1.1 + resolution: "es6-error@npm:4.1.1" + checksum: 10/48483c25701dc5a6376f39bbe2eaf5da0b505607ec5a98cd3ade472c1939242156660636e2e508b33211e48e88b132d245341595c067bd4a95ac79fa7134da06 languageName: node linkType: hard -"postcss-normalize-charset@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-charset@npm:5.1.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/e79d92971fc05b8b3c9b72f3535a574e077d13c69bef68156a0965f397fdf157de670da72b797f57b0e3bac8f38155b5dd1735ecab143b9cc4032d72138193b4 +"es6-object-assign@npm:^1.1.0": + version: 1.1.0 + resolution: "es6-object-assign@npm:1.1.0" + checksum: 10/396c30376c89e91b5435f177ff83ba0d5ba265e3583cbaaa3bce185df08bf87db58c6d5d84600634280cbf35f8f342569b6ab776d728a12e177e5db82f5b6e2f languageName: node linkType: hard -"postcss-normalize-display-values@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-display-values@npm:5.1.0" +"esbuild@npm:~0.21.5": + version: 0.21.5 + resolution: "esbuild@npm:0.21.5" dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/b6eb7b9b02c3bdd62bbc54e01e2b59733d73a1c156905d238e178762962efe0c6f5104544da39f32cade8a4fb40f10ff54b63a8ebfbdff51e8780afb9fbdcf86 + "@esbuild/aix-ppc64": "npm:0.21.5" + "@esbuild/android-arm": "npm:0.21.5" + "@esbuild/android-arm64": "npm:0.21.5" + "@esbuild/android-x64": "npm:0.21.5" + "@esbuild/darwin-arm64": "npm:0.21.5" + "@esbuild/darwin-x64": "npm:0.21.5" + "@esbuild/freebsd-arm64": "npm:0.21.5" + "@esbuild/freebsd-x64": "npm:0.21.5" + "@esbuild/linux-arm": "npm:0.21.5" + "@esbuild/linux-arm64": "npm:0.21.5" + "@esbuild/linux-ia32": "npm:0.21.5" + "@esbuild/linux-loong64": "npm:0.21.5" + "@esbuild/linux-mips64el": "npm:0.21.5" + "@esbuild/linux-ppc64": "npm:0.21.5" + "@esbuild/linux-riscv64": "npm:0.21.5" + "@esbuild/linux-s390x": "npm:0.21.5" + "@esbuild/linux-x64": "npm:0.21.5" + "@esbuild/netbsd-x64": "npm:0.21.5" + "@esbuild/openbsd-x64": "npm:0.21.5" + "@esbuild/sunos-x64": "npm:0.21.5" + "@esbuild/win32-arm64": "npm:0.21.5" + "@esbuild/win32-ia32": "npm:0.21.5" + "@esbuild/win32-x64": "npm:0.21.5" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10/d2ff2ca84d30cce8e871517374d6c2290835380dc7cd413b2d49189ed170d45e407be14de2cb4794cf76f75cf89955c4714726ebd3de7444b3046f5cab23ab6b languageName: node linkType: hard -"postcss-normalize-positions@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-normalize-positions@npm:5.1.1" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/d9afc233729c496463c7b1cdd06732469f401deb387484c3a2422125b46ec10b4af794c101f8c023af56f01970b72b535e88373b9058ecccbbf88db81662b3c4 +"escalade@npm:^3.1.1": + version: 3.1.1 + resolution: "escalade@npm:3.1.1" + checksum: 10/afa618e73362576b63f6ca83c975456621095a1ed42ff068174e3f5cea48afc422814dda548c96e6ebb5333e7265140c7292abcc81bbd6ccb1757d50d3a4e182 languageName: node linkType: hard -"postcss-normalize-repeat-style@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-normalize-repeat-style@npm:5.1.1" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/2c6ad2b0ae10a1fda156b948c34f78c8f1e185513593de4d7e2480973586675520edfec427645fa168c337b0a6b3ceca26f92b96149741ca98a9806dad30d534 +"escape-goat@npm:^2.0.0": + version: 2.1.1 + resolution: "escape-goat@npm:2.1.1" + checksum: 10/ce05c70c20dd7007b60d2d644b625da5412325fdb57acf671ba06cb2ab3cd6789e2087026921a05b665b0a03fadee2955e7fc0b9a67da15a6551a980b260eba7 languageName: node linkType: hard -"postcss-normalize-string@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-string@npm:5.1.0" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/227ddf520266d2f9847e799b9977aaa444636ba94e473137739539ef02e7cb6302826585ffda9897cfe2a9953e65632a08279cb1f572ca95e53d8b3dd6ba737f +"escape-string-regexp@npm:5.0.0": + version: 5.0.0 + resolution: "escape-string-regexp@npm:5.0.0" + checksum: 10/20daabe197f3cb198ec28546deebcf24b3dbb1a5a269184381b3116d12f0532e06007f4bc8da25669d6a7f8efb68db0758df4cd981f57bc5b57f521a3e12c59e languageName: node linkType: hard -"postcss-normalize-timing-functions@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-timing-functions@npm:5.1.0" - dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/da550f50e90b0b23e17b67449a7d1efd1aa68288e66d4aa7614ca6f5cc012896be1972b7168eee673d27da36504faccf7b9f835c0f7e81243f966a42c8c030aa +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 languageName: node linkType: hard -"postcss-normalize-unicode@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-normalize-unicode@npm:5.1.1" - dependencies: - browserslist: "npm:^4.21.4" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/4c24d26cc9f4b19a9397db4e71dd600dab690f1de8e14a3809e2aa1452dbc3791c208c38a6316bbc142f29e934fdf02858e68c94038c06174d78a4937e0f273c +"escape-string-regexp@npm:^2.0.0": + version: 2.0.0 + resolution: "escape-string-regexp@npm:2.0.0" + checksum: 10/9f8a2d5743677c16e85c810e3024d54f0c8dea6424fad3c79ef6666e81dd0846f7437f5e729dfcdac8981bc9e5294c39b4580814d114076b8d36318f46ae4395 languageName: node linkType: hard -"postcss-normalize-url@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-url@npm:5.1.0" - dependencies: - normalize-url: "npm:^6.0.1" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/3bd4b3246d6600230bc827d1760b24cb3101827ec97570e3016cbe04dc0dd28f4dbe763245d1b9d476e182c843008fbea80823061f1d2219b96f0d5c724a24c0 +"escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 10/98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 languageName: node linkType: hard -"postcss-normalize-whitespace@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-normalize-whitespace@npm:5.1.1" +"escodegen@npm:^2.0.0": + version: 2.1.0 + resolution: "escodegen@npm:2.1.0" dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/12d8fb6d1c1cba208cc08c1830959b7d7ad447c3f5581873f7e185f99a9a4230c43d3af21ca12c818e4690a5085a95b01635b762ad4a7bef69d642609b4c0e19 + esprima: "npm:^4.0.1" + estraverse: "npm:^5.2.0" + esutils: "npm:^2.0.2" + source-map: "npm:~0.6.1" + dependenciesMeta: + source-map: + optional: true + bin: + escodegen: bin/escodegen.js + esgenerate: bin/esgenerate.js + checksum: 10/47719a65b2888b4586e3fa93769068b275961c13089e90d5d01a96a6e8e95871b1c3893576814c8fbf08a4a31a496f37e7b2c937cf231270f4d81de012832c7c languageName: node linkType: hard -"postcss-normalize@npm:^10.0.1": - version: 10.0.1 - resolution: "postcss-normalize@npm:10.0.1" - dependencies: - "@csstools/normalize.css": "npm:*" - postcss-browser-comments: "npm:^4" - sanitize.css: "npm:*" +"eslint-config-prettier@npm:9.1.0": + version: 9.1.0 + resolution: "eslint-config-prettier@npm:9.1.0" peerDependencies: - browserslist: ">= 4" - postcss: ">= 8" - checksum: 10/f2562ae30a75531436542cfd8ee5aec6c46f044cd410fed51d38dbecfc053f822ff5589687eeb1c0a1c5db3a16b25f6cebe0188c75be2cf4352d526212b760dc + eslint: ">=7.0.0" + bin: + eslint-config-prettier: bin/cli.js + checksum: 10/411e3b3b1c7aa04e3e0f20d561271b3b909014956c4dba51c878bf1a23dbb8c800a3be235c46c4732c70827276e540b6eed4636d9b09b444fd0a8e07f0fcd830 languageName: node linkType: hard -"postcss-opacity-percentage@npm:^1.1.2": - version: 1.1.3 - resolution: "postcss-opacity-percentage@npm:1.1.3" +"eslint-config-standard@npm:17.1.0": + version: 17.1.0 + resolution: "eslint-config-standard@npm:17.1.0" peerDependencies: - postcss: ^8.2 - checksum: 10/54d1b8ca68035bc1a5788aaabdbc3b66ffee34b5a2412cecf073627dad7e3f2bae07c01fac3bc7f46bbac5da3291ac9ddcf74bfee26dfd86f9f96c847a0afc13 + eslint: ^8.0.1 + eslint-plugin-import: ^2.25.2 + eslint-plugin-n: "^15.0.0 || ^16.0.0 " + eslint-plugin-promise: ^6.0.0 + checksum: 10/1fb3f98a1badee85a8378e9a8df21ebfc3d6a0556fca309b7e9ddd60243cbeb2486e3d5706dafbf296b116b3b28b5aa3ff00536b2f3067092e98157074a95b1d languageName: node linkType: hard -"postcss-ordered-values@npm:^5.1.3": - version: 5.1.3 - resolution: "postcss-ordered-values@npm:5.1.3" +"eslint-import-resolver-node@npm:^0.3.9": + version: 0.3.9 + resolution: "eslint-import-resolver-node@npm:0.3.9" dependencies: - cssnano-utils: "npm:^3.1.0" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/53dd26f480a18ffb0c008ae956d8a7e11e43c37629d0fb17a7716ff3b0cd8585f97e80deac12e7f3fe129681a980d83d356217b0b8fffb70ff83859993d6d82a + debug: "npm:^3.2.7" + is-core-module: "npm:^2.13.0" + resolve: "npm:^1.22.4" + checksum: 10/d52e08e1d96cf630957272e4f2644dcfb531e49dcfd1edd2e07e43369eb2ec7a7d4423d417beee613201206ff2efa4eb9a582b5825ee28802fc7c71fcd53ca83 languageName: node linkType: hard -"postcss-overflow-shorthand@npm:^3.0.4": - version: 3.0.4 - resolution: "postcss-overflow-shorthand@npm:3.0.4" +"eslint-module-utils@npm:^2.8.0": + version: 2.8.0 + resolution: "eslint-module-utils@npm:2.8.0" dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/0a44a922f2bf3370cffef6f97954e17cf5f8690102093d7adf3600a47099c5babdc51d7cb309976cecbb7eb9f852a380319e4badd02f1caa4d5915c8ffc04b56 - languageName: node - linkType: hard - -"postcss-page-break@npm:^3.0.4": - version: 3.0.4 - resolution: "postcss-page-break@npm:3.0.4" - peerDependencies: - postcss: ^8 - checksum: 10/a7d08c945fc691f62c77ac701e64722218b14ec5c8fc1972b8af9c21553492d40808cf95e61b9697b1dacaf7e6180636876d7fee314f079e6c9e39ac1b1edc6f + debug: "npm:^3.2.7" + peerDependenciesMeta: + eslint: + optional: true + checksum: 10/a9a7ed93eb858092e3cdc797357d4ead2b3ea06959b0eada31ab13862d46a59eb064b9cb82302214232e547980ce33618c2992f6821138a4934e65710ed9cc29 languageName: node linkType: hard -"postcss-place@npm:^7.0.5": - version: 7.0.5 - resolution: "postcss-place@npm:7.0.5" +"eslint-plugin-es@npm:^3.0.0": + version: 3.0.1 + resolution: "eslint-plugin-es@npm:3.0.1" dependencies: - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.2 - checksum: 10/a462b427c29e0276183aab717ef17893ac7fab3e0e5c459d4f54d24f936624bb71b3acc1660fd72be8bd0ecdb99ab99c40798d9846ad5a796cdc32e63ca06434 - languageName: node - linkType: hard - -"postcss-preset-env@npm:^7.0.1": - version: 7.8.3 - resolution: "postcss-preset-env@npm:7.8.3" - dependencies: - "@csstools/postcss-cascade-layers": "npm:^1.1.1" - "@csstools/postcss-color-function": "npm:^1.1.1" - "@csstools/postcss-font-format-keywords": "npm:^1.0.1" - "@csstools/postcss-hwb-function": "npm:^1.0.2" - "@csstools/postcss-ic-unit": "npm:^1.0.1" - "@csstools/postcss-is-pseudo-class": "npm:^2.0.7" - "@csstools/postcss-nested-calc": "npm:^1.0.0" - "@csstools/postcss-normalize-display-values": "npm:^1.0.1" - "@csstools/postcss-oklab-function": "npm:^1.1.1" - "@csstools/postcss-progressive-custom-properties": "npm:^1.3.0" - "@csstools/postcss-stepped-value-functions": "npm:^1.0.1" - "@csstools/postcss-text-decoration-shorthand": "npm:^1.0.0" - "@csstools/postcss-trigonometric-functions": "npm:^1.0.2" - "@csstools/postcss-unset-value": "npm:^1.0.2" - autoprefixer: "npm:^10.4.13" - browserslist: "npm:^4.21.4" - css-blank-pseudo: "npm:^3.0.3" - css-has-pseudo: "npm:^3.0.4" - css-prefers-color-scheme: "npm:^6.0.3" - cssdb: "npm:^7.1.0" - postcss-attribute-case-insensitive: "npm:^5.0.2" - postcss-clamp: "npm:^4.1.0" - postcss-color-functional-notation: "npm:^4.2.4" - postcss-color-hex-alpha: "npm:^8.0.4" - postcss-color-rebeccapurple: "npm:^7.1.1" - postcss-custom-media: "npm:^8.0.2" - postcss-custom-properties: "npm:^12.1.10" - postcss-custom-selectors: "npm:^6.0.3" - postcss-dir-pseudo-class: "npm:^6.0.5" - postcss-double-position-gradients: "npm:^3.1.2" - postcss-env-function: "npm:^4.0.6" - postcss-focus-visible: "npm:^6.0.4" - postcss-focus-within: "npm:^5.0.4" - postcss-font-variant: "npm:^5.0.0" - postcss-gap-properties: "npm:^3.0.5" - postcss-image-set-function: "npm:^4.0.7" - postcss-initial: "npm:^4.0.1" - postcss-lab-function: "npm:^4.2.1" - postcss-logical: "npm:^5.0.4" - postcss-media-minmax: "npm:^5.0.0" - postcss-nesting: "npm:^10.2.0" - postcss-opacity-percentage: "npm:^1.1.2" - postcss-overflow-shorthand: "npm:^3.0.4" - postcss-page-break: "npm:^3.0.4" - postcss-place: "npm:^7.0.5" - postcss-pseudo-class-any-link: "npm:^7.1.6" - postcss-replace-overflow-wrap: "npm:^4.0.0" - postcss-selector-not: "npm:^6.0.1" - postcss-value-parser: "npm:^4.2.0" + eslint-utils: "npm:^2.0.0" + regexpp: "npm:^3.0.0" peerDependencies: - postcss: ^8.2 - checksum: 10/e1f98019405b2f75d4e198ffa3be10ac99c2a2e0747d37ada548bc3ad6603370181045b43f55c4c79689ff5c25ff103f901eff07e12ba992e6fb015ea2eae748 + eslint: ">=4.19.1" + checksum: 10/9814e6305183edfdff7d99cbc0f95f0aed1446045cbd1d4f28e7be0903d0013880f0aaf04486a27de96bfb2f5a746bea97cbb238f9b0035cb378d48d179a0a1b languageName: node linkType: hard -"postcss-pseudo-class-any-link@npm:^7.1.6": - version: 7.1.6 - resolution: "postcss-pseudo-class-any-link@npm:7.1.6" +"eslint-plugin-import@npm:2.29.1": + version: 2.29.1 + resolution: "eslint-plugin-import@npm:2.29.1" dependencies: - postcss-selector-parser: "npm:^6.0.10" + array-includes: "npm:^3.1.7" + array.prototype.findlastindex: "npm:^1.2.3" + array.prototype.flat: "npm:^1.3.2" + array.prototype.flatmap: "npm:^1.3.2" + debug: "npm:^3.2.7" + doctrine: "npm:^2.1.0" + eslint-import-resolver-node: "npm:^0.3.9" + eslint-module-utils: "npm:^2.8.0" + hasown: "npm:^2.0.0" + is-core-module: "npm:^2.13.1" + is-glob: "npm:^4.0.3" + minimatch: "npm:^3.1.2" + object.fromentries: "npm:^2.0.7" + object.groupby: "npm:^1.0.1" + object.values: "npm:^1.1.7" + semver: "npm:^6.3.1" + tsconfig-paths: "npm:^3.15.0" peerDependencies: - postcss: ^8.2 - checksum: 10/2f2a6b35135033d02551ac7f260302cbe0fa306dc59428bb9a81dfc15d63093a24c3bb59a1e54d5a4661d2f4830aeaf9807d55e60d9027b9e4a378067b95a245 + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + checksum: 10/5865f05c38552145423c535326ec9a7113ab2305c7614c8b896ff905cfabc859c8805cac21e979c9f6f742afa333e6f62f812eabf891a7e8f5f0b853a32593c1 languageName: node linkType: hard -"postcss-reduce-initial@npm:^5.1.2": - version: 5.1.2 - resolution: "postcss-reduce-initial@npm:5.1.2" +"eslint-plugin-node@npm:11.1.0": + version: 11.1.0 + resolution: "eslint-plugin-node@npm:11.1.0" dependencies: - browserslist: "npm:^4.21.4" - caniuse-api: "npm:^3.0.0" + eslint-plugin-es: "npm:^3.0.0" + eslint-utils: "npm:^2.0.0" + ignore: "npm:^5.1.1" + minimatch: "npm:^3.0.4" + resolve: "npm:^1.10.1" + semver: "npm:^6.1.0" peerDependencies: - postcss: ^8.2.15 - checksum: 10/6234a85dab32cc3ece384f62c761c5c0dd646e2c6a419d93ee7cdb78b657e43381df39bd4620dfbdc2157e44b51305e4ebe852259d12c8b435f1aa534548db3e + eslint: ">=5.16.0" + checksum: 10/bda540f390a84d835989f21f56743f3aa8f41fd9b53359d635c116632c86af92d70d8e6449ddd18860e6241f9cef04fc90c37eb192a9047c3c3a46de6145c30c languageName: node linkType: hard -"postcss-reduce-transforms@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-reduce-transforms@npm:5.1.0" +"eslint-plugin-prettier@npm:5.1.3": + version: 5.1.3 + resolution: "eslint-plugin-prettier@npm:5.1.3" dependencies: - postcss-value-parser: "npm:^4.2.0" + prettier-linter-helpers: "npm:^1.0.0" + synckit: "npm:^0.8.6" peerDependencies: - postcss: ^8.2.15 - checksum: 10/49fffd474070a154764934b42d7d875ceadf54219f8346b4cadf931728ffba6a2dea7532ced3d267fd42d81c102211a5bf957af3b63b1ac428d454fa6ec2dbf4 + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + eslint-config-prettier: "*" + prettier: ">=3.0.0" + peerDependenciesMeta: + "@types/eslint": + optional: true + eslint-config-prettier: + optional: true + checksum: 10/4f26a30444adc61ed692cdb5a9f7e8d9f5794f0917151051e66755ce032a08c3cc72c8b5d56101412e90f6d77035bd8194ea8731e9c16aacdd5ae345a8dae188 languageName: node linkType: hard -"postcss-replace-overflow-wrap@npm:^4.0.0": - version: 4.0.0 - resolution: "postcss-replace-overflow-wrap@npm:4.0.0" +"eslint-plugin-promise@npm:6.1.1": + version: 6.1.1 + resolution: "eslint-plugin-promise@npm:6.1.1" peerDependencies: - postcss: ^8.0.3 - checksum: 10/0629ec17deae65e27dc3059ecec1c6bc833ee65291093b476fce151ab0af45c9e1a56ce250eb9ec4bbc306c19ab318cc982fdbcca8651d347d7dfaa3c9fc9201 + eslint: ^7.0.0 || ^8.0.0 + checksum: 10/216c4348f796c5e90984224532d42a8f8d0455b8cbb1955bcb328b3aa10a52e9718f6fb044b6fe19825eda3a2d62a32b1042d9cbb10731353cf61b7a6cab2d71 languageName: node linkType: hard -"postcss-selector-not@npm:^6.0.1": - version: 6.0.1 - resolution: "postcss-selector-not@npm:6.0.1" - dependencies: - postcss-selector-parser: "npm:^6.0.10" +"eslint-plugin-standard@npm:5.0.0": + version: 5.0.0 + resolution: "eslint-plugin-standard@npm:5.0.0" peerDependencies: - postcss: ^8.2 - checksum: 10/fe523a0219e4bd34f04498534bb9e8aec3193f3585eafe4c388d086955b41201cae71fd20980ca465acade7f182029b43dbd5ca7e9d50bf34bbcaf1d19fe3ee6 + eslint: ">=5.0.0" + checksum: 10/f11e6b0a58606347a256d2ab9c63d290ee580389f09cc29f58fbcaf9a588560f5a8043640a2ced63060eab469e2807d5d81f238ca4fc65a945444ebf71296727 languageName: node linkType: hard -"postcss-selector-parser@npm:^6.0.10": - version: 6.0.10 - resolution: "postcss-selector-parser@npm:6.0.10" +"eslint-scope@npm:5.1.1": + version: 5.1.1 + resolution: "eslint-scope@npm:5.1.1" dependencies: - cssesc: "npm:^3.0.0" - util-deprecate: "npm:^1.0.2" - checksum: 10/f8ad9beb764a64b51a8027650e745a44ed7198f0b968b823db9563a54990924bcf9eb6fb59fbbb7eb05a89b2b6a24b81b2b7d60ecadda15b04a0024c7663f436 + esrecurse: "npm:^4.3.0" + estraverse: "npm:^4.1.1" + checksum: 10/c541ef384c92eb5c999b7d3443d80195fcafb3da335500946f6db76539b87d5826c8f2e1d23bf6afc3154ba8cd7c8e566f8dc00f1eea25fdf3afc8fb9c87b238 languageName: node linkType: hard -"postcss-selector-parser@npm:^6.0.11, postcss-selector-parser@npm:^6.0.5, postcss-selector-parser@npm:^6.0.9": - version: 6.0.13 - resolution: "postcss-selector-parser@npm:6.0.13" +"eslint-scope@npm:^7.2.2": + version: 7.2.2 + resolution: "eslint-scope@npm:7.2.2" dependencies: - cssesc: "npm:^3.0.0" - util-deprecate: "npm:^1.0.2" - checksum: 10/e779aa1f8ca9ee45d562400aac6109a2bccc59559b6e15adec8bc2a71d395ca563a378fd68f6a61963b4ef2ca190e0c0486e6dc6c41d755f3b82dd6e480e6941 + esrecurse: "npm:^4.3.0" + estraverse: "npm:^5.2.0" + checksum: 10/5c660fb905d5883ad018a6fea2b49f3cb5b1cbf2cd4bd08e98646e9864f9bc2c74c0839bed2d292e90a4a328833accc197c8f0baed89cbe8d605d6f918465491 languageName: node linkType: hard -"postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4": - version: 6.0.9 - resolution: "postcss-selector-parser@npm:6.0.9" +"eslint-utils@npm:^2.0.0": + version: 2.1.0 + resolution: "eslint-utils@npm:2.1.0" dependencies: - cssesc: "npm:^3.0.0" - util-deprecate: "npm:^1.0.2" - checksum: 10/e9b18ed7b8d23f83ffe39bb76e5689f28ec07a501c70c81e078fbcded6c31b54ad952476e33d25b47050f5a1f1b2310745c30f3649a984e45ea973e443551c6d + eslint-visitor-keys: "npm:^1.1.0" + checksum: 10/a7e43a5154a16a90c021cabeb160c3668cccbcf6474ccb2a7d7762698582398f3b938c5330909b858ef7c21182edfc9786dbf89ed7b294f51b7659a378bf7cec languageName: node linkType: hard -"postcss-svgo@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-svgo@npm:5.1.0" - dependencies: - postcss-value-parser: "npm:^4.2.0" - svgo: "npm:^2.7.0" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/d86eb5213d9f700cf5efe3073799b485fb7cacae0c731db3d7749c9c2b1c9bc85e95e0baeca439d699ff32ea24815fc916c4071b08f67ed8219df229ce1129bd +"eslint-visitor-keys@npm:^1.1.0": + version: 1.3.0 + resolution: "eslint-visitor-keys@npm:1.3.0" + checksum: 10/595ab230e0fcb52f86ba0986a9a473b9fcae120f3729b43f1157f88f27f8addb1e545c4e3d444185f2980e281ca15be5ada6f65b4599eec227cf30e41233b762 languageName: node linkType: hard -"postcss-unique-selectors@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-unique-selectors@npm:5.1.1" - dependencies: - postcss-selector-parser: "npm:^6.0.5" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/637e7b786e8558265775c30400c54b6b3b24d4748923f4a39f16a65fd0e394f564ccc9f0a1d3c0e770618a7637a7502ea1d0d79f731d429cb202255253c23278 +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1": + version: 3.4.1 + resolution: "eslint-visitor-keys@npm:3.4.1" + checksum: 10/92641e7ccde470065aa2931161a6a053690a54aae35ae08f38e376ecfd7c012573c542b37a3baecf921eb951fd57943411392f464c2b8f3399adee4723a1369f languageName: node linkType: hard -"postcss-value-parser@npm:^4.0.0, postcss-value-parser@npm:^4.1.0, postcss-value-parser@npm:^4.2.0": - version: 4.2.0 - resolution: "postcss-value-parser@npm:4.2.0" - checksum: 10/e4e4486f33b3163a606a6ed94f9c196ab49a37a7a7163abfcd469e5f113210120d70b8dd5e33d64636f41ad52316a3725655421eb9a1094f1bcab1db2f555c62 +"eslint-visitor-keys@npm:^3.4.3": + version: 3.4.3 + resolution: "eslint-visitor-keys@npm:3.4.3" + checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b languageName: node linkType: hard -"postcss-values-parser@npm:^6.0.2": - version: 6.0.2 - resolution: "postcss-values-parser@npm:6.0.2" +"eslint@npm:8.57.0": + version: 8.57.0 + resolution: "eslint@npm:8.57.0" dependencies: - color-name: "npm:^1.1.4" - is-url-superb: "npm:^4.0.0" - quote-unquote: "npm:^1.0.0" - peerDependencies: - postcss: ^8.2.9 - checksum: 10/ff2fa096896f1c33f7531e814b8d01e785bd99d672c1597d5c5d8c2409b30b8146be6565f6269c952d1f03d626f00ae3f1afb8308cc772c08b323abee23c9a42 + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.6.1" + "@eslint/eslintrc": "npm:^2.1.4" + "@eslint/js": "npm:8.57.0" + "@humanwhocodes/config-array": "npm:^0.11.14" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@nodelib/fs.walk": "npm:^1.2.8" + "@ungap/structured-clone": "npm:^1.2.0" + ajv: "npm:^6.12.4" + chalk: "npm:^4.0.0" + cross-spawn: "npm:^7.0.2" + debug: "npm:^4.3.2" + doctrine: "npm:^3.0.0" + escape-string-regexp: "npm:^4.0.0" + eslint-scope: "npm:^7.2.2" + eslint-visitor-keys: "npm:^3.4.3" + espree: "npm:^9.6.1" + esquery: "npm:^1.4.2" + esutils: "npm:^2.0.2" + fast-deep-equal: "npm:^3.1.3" + file-entry-cache: "npm:^6.0.1" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + globals: "npm:^13.19.0" + graphemer: "npm:^1.4.0" + ignore: "npm:^5.2.0" + imurmurhash: "npm:^0.1.4" + is-glob: "npm:^4.0.0" + is-path-inside: "npm:^3.0.3" + js-yaml: "npm:^4.1.0" + json-stable-stringify-without-jsonify: "npm:^1.0.1" + levn: "npm:^0.4.1" + lodash.merge: "npm:^4.6.2" + minimatch: "npm:^3.1.2" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.9.3" + strip-ansi: "npm:^6.0.1" + text-table: "npm:^0.2.0" + bin: + eslint: bin/eslint.js + checksum: 10/00496e218b23747a7a9817bf58b522276d0dc1f2e546dceb4eea49f9871574088f72f1f069a6b560ef537efa3a75261b8ef70e51ef19033da1cc4c86a755ef15 languageName: node linkType: hard -"postcss@npm:>=8.4.31": - version: 8.4.31 - resolution: "postcss@npm:8.4.31" +"espree@npm:^9.6.0, espree@npm:^9.6.1": + version: 9.6.1 + resolution: "espree@npm:9.6.1" dependencies: - nanoid: "npm:^3.3.6" - picocolors: "npm:^1.0.0" - source-map-js: "npm:^1.0.2" - checksum: 10/1a6653e72105907377f9d4f2cd341d8d90e3fde823a5ddea1e2237aaa56933ea07853f0f2758c28892a1d70c53bbaca200eb8b80f8ed55f13093003dbec5afa0 - languageName: node - linkType: hard - -"postgres-array@npm:~2.0.0": - version: 2.0.0 - resolution: "postgres-array@npm:2.0.0" - checksum: 10/aff99e79714d1271fe942fec4ffa2007b755e7e7dc3d2feecae3f1ceecb86fd3637c8138037fc3d9e7ec369231eeb136843c0b25927bf1ce295245a40ef849b4 + acorn: "npm:^8.9.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^3.4.1" + checksum: 10/255ab260f0d711a54096bdeda93adff0eadf02a6f9b92f02b323e83a2b7fc258797919437ad331efec3930475feb0142c5ecaaf3cdab4befebd336d47d3f3134 languageName: node linkType: hard -"postgres-bytea@npm:~1.0.0": - version: 1.0.0 - resolution: "postgres-bytea@npm:1.0.0" - checksum: 10/d844ae4ca7a941b70e45cac1261a73ee8ed39d72d3d74ab1d645248185a1b7f0ac91a3c63d6159441020f4e1f7fe64689ac56536a307b31cef361e5187335090 +"esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10/f1d3c622ad992421362294f7acf866aa9409fbad4eb2e8fa230bd33944ce371d32279667b242d8b8907ec2b6ad7353a717f3c0e60e748873a34a7905174bc0eb languageName: node linkType: hard -"postgres-date@npm:~1.0.4": - version: 1.0.7 - resolution: "postgres-date@npm:1.0.7" - checksum: 10/571ef45bec4551bb5d608c31b79987d7a895141f7d6c7b82e936a52d23d97474c770c6143e5cf8936c1cdc8b0dfd95e79f8136bf56a90164182a60f242c19f2b +"esquery@npm:^1.4.2": + version: 1.5.0 + resolution: "esquery@npm:1.5.0" + dependencies: + estraverse: "npm:^5.1.0" + checksum: 10/e65fcdfc1e0ff5effbf50fb4f31ea20143ae5df92bb2e4953653d8d40aa4bc148e0d06117a592ce4ea53eeab1dafdfded7ea7e22a5be87e82d73757329a1b01d languageName: node linkType: hard -"postgres-interval@npm:^1.1.0": - version: 1.2.0 - resolution: "postgres-interval@npm:1.2.0" +"esrecurse@npm:^4.3.0": + version: 4.3.0 + resolution: "esrecurse@npm:4.3.0" dependencies: - xtend: "npm:^4.0.0" - checksum: 10/746b71f93805ae33b03528e429dc624706d1f9b20ee81bf743263efb6a0cd79ae02a642a8a480dbc0f09547b4315ab7df6ce5ec0be77ed700bac42730f5c76b2 + estraverse: "npm:^5.2.0" + checksum: 10/44ffcd89e714ea6b30143e7f119b104fc4d75e77ee913f34d59076b40ef2d21967f84e019f84e1fd0465b42cdbf725db449f232b5e47f29df29ed76194db8e16 languageName: node linkType: hard -"pouchdb-abstract-mapreduce@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-abstract-mapreduce@npm:7.3.1" - dependencies: - pouchdb-binary-utils: "npm:7.3.1" - pouchdb-collate: "npm:7.3.1" - pouchdb-collections: "npm:7.3.1" - pouchdb-errors: "npm:7.3.1" - pouchdb-fetch: "npm:7.3.1" - pouchdb-mapreduce-utils: "npm:7.3.1" - pouchdb-md5: "npm:7.3.1" - pouchdb-utils: "npm:7.3.1" - checksum: 10/861fa600ad1566e46b5277cc5f2ac5aa319e825bdb4586256752545b88b34cb0eb6ea0f4b050f009c82228f7f54eb6e9655e0fdd28a68920e9efe1fcd3aaf0ca +"estraverse@npm:^4.1.1": + version: 4.3.0 + resolution: "estraverse@npm:4.3.0" + checksum: 10/3f67ad02b6dbfaddd9ea459cf2b6ef4ecff9a6082a7af9d22e445b9abc082ad9ca47e1825557b293fcdae477f4714e561123e30bb6a5b2f184fb2bad4a9497eb languageName: node linkType: hard -"pouchdb-adapter-leveldb-core@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-adapter-leveldb-core@npm:7.3.1" - dependencies: - argsarray: "npm:0.0.1" - buffer-from: "npm:1.1.2" - double-ended-queue: "npm:2.1.0-0" - levelup: "npm:4.4.0" - pouchdb-adapter-utils: "npm:7.3.1" - pouchdb-binary-utils: "npm:7.3.1" - pouchdb-collections: "npm:7.3.1" - pouchdb-errors: "npm:7.3.1" - pouchdb-json: "npm:7.3.1" - pouchdb-md5: "npm:7.3.1" - pouchdb-merge: "npm:7.3.1" - pouchdb-utils: "npm:7.3.1" - sublevel-pouchdb: "npm:7.3.1" - through2: "npm:3.0.2" - checksum: 10/79c6d12f471a61da6be371f2061b0c3cde0fb4365099c3c57b45d5dd41fabc660b26a8b5a8d810a27a790fbcf4e7056b819a55f4aefaec88a0eebee5b9bdca26 +"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": + version: 5.3.0 + resolution: "estraverse@npm:5.3.0" + checksum: 10/37cbe6e9a68014d34dbdc039f90d0baf72436809d02edffcc06ba3c2a12eb298048f877511353b130153e532aac8d68ba78430c0dd2f44806ebc7c014b01585e languageName: node linkType: hard -"pouchdb-adapter-memory@npm:^7.1.1": - version: 7.3.1 - resolution: "pouchdb-adapter-memory@npm:7.3.1" - dependencies: - memdown: "npm:1.4.1" - pouchdb-adapter-leveldb-core: "npm:7.3.1" - pouchdb-utils: "npm:7.3.1" - checksum: 10/2c66a267150bdce347cdc02cd0a2b331e25177c69cf7faca432404f8ff58017cb9ebad3fed94c4abc363d7c87ad61783438542c73c30a120bd0c441127977bcb +"estree-walker@npm:^2.0.2": + version: 2.0.2 + resolution: "estree-walker@npm:2.0.2" + checksum: 10/b02109c5d46bc2ed47de4990eef770f7457b1159a229f0999a09224d2b85ffeed2d7679cffcff90aeb4448e94b0168feb5265b209cdec29aad50a3d6e93d21e2 languageName: node linkType: hard -"pouchdb-adapter-utils@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-adapter-utils@npm:7.3.1" - dependencies: - pouchdb-binary-utils: "npm:7.3.1" - pouchdb-collections: "npm:7.3.1" - pouchdb-errors: "npm:7.3.1" - pouchdb-md5: "npm:7.3.1" - pouchdb-merge: "npm:7.3.1" - pouchdb-utils: "npm:7.3.1" - checksum: 10/cb0eb7eb4ccf43b6b4bb52503826a7034df23b80a6b3178bbcae9e9197127d91f94e821858e3679bb1cd43d9a2f8216613405a676ef191980fdd16245ea56f14 +"esutils@npm:^2.0.2": + version: 2.0.3 + resolution: "esutils@npm:2.0.3" + checksum: 10/b23acd24791db11d8f65be5ea58fd9a6ce2df5120ae2da65c16cfc5331ff59d5ac4ef50af66cd4bde238881503ec839928a0135b99a036a9cdfa22d17fd56cdb languageName: node linkType: hard -"pouchdb-binary-utils@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-binary-utils@npm:7.3.1" +"ethereum-cryptography@npm:^2.0.0": + version: 2.1.2 + resolution: "ethereum-cryptography@npm:2.1.2" dependencies: - buffer-from: "npm:1.1.2" - checksum: 10/b250a65552c8019ec468916b1375610f47914abc4dcf0dde08c53625f396cdd37b2cbb33a4900bba463b49a064dcb04813ad2c09fce11211b74904a4a9c6c9a0 + "@noble/curves": "npm:1.1.0" + "@noble/hashes": "npm:1.3.1" + "@scure/bip32": "npm:1.3.1" + "@scure/bip39": "npm:1.2.1" + checksum: 10/78983d01ac95047158ec03237ba318152b2c707ccc6a44225da11c72ed6ca575ca0c1630eaf9878fc82fe26272d6624939ef6f020cc89ddddfb941a7393ab909 languageName: node linkType: hard -"pouchdb-collate@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-collate@npm:7.3.1" - checksum: 10/c95e1921dbbb767d157abb2167bab8b763a22d1911bf22fed49604b67f9c23b928d8da83af66899ae3b6b47ac1cdb37b212defc1a5a1bff61d153c7583109962 +"eventemitter3@npm:^5.0.1": + version: 5.0.1 + resolution: "eventemitter3@npm:5.0.1" + checksum: 10/ac6423ec31124629c84c7077eed1e6987f6d66c31cf43c6fcbf6c87791d56317ce808d9ead483652436df171b526fc7220eccdc9f3225df334e81582c3cf7dd5 languageName: node linkType: hard -"pouchdb-collections@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-collections@npm:7.3.1" - checksum: 10/66fd61d5d0c3399379febc24d0d3539d39f66aab8ae27754985ecb40f02ccc170e64a2b9e1f5b92691a0bf054ed2c0a3ecc495059a4178acc09c8c9d442a3ec1 +"events-to-array@npm:^1.0.1": + version: 1.1.2 + resolution: "events-to-array@npm:1.1.2" + checksum: 10/4107636c81c9f4dd6fe3545e37cff29c0e772cf806597939e048f43ad0594efc22be2f403c1d7035c04084c9f9389795224d8bc70c0c3df097e0ece21959430a languageName: node linkType: hard -"pouchdb-debug@npm:^7.1.1": - version: 7.2.1 - resolution: "pouchdb-debug@npm:7.2.1" - dependencies: - debug: "npm:3.1.0" - checksum: 10/255f7cd18be1f7fad4325e0b0a75c11070f145026c2ea9d61a0567842387c538728bef4e69405a202f9a07843eb0e9ea5baff10cfd644ad2e2f3744b1264f129 +"events@npm:^3.2.0, events@npm:^3.3.0": + version: 3.3.0 + resolution: "events@npm:3.3.0" + checksum: 10/a3d47e285e28d324d7180f1e493961a2bbb4cad6412090e4dec114f4db1f5b560c7696ee8e758f55e23913ede856e3689cd3aa9ae13c56b5d8314cd3b3ddd1be languageName: node linkType: hard -"pouchdb-errors@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-errors@npm:7.3.1" +"evp_bytestokey@npm:^1.0.0, evp_bytestokey@npm:^1.0.3": + version: 1.0.3 + resolution: "evp_bytestokey@npm:1.0.3" dependencies: - inherits: "npm:2.0.4" - checksum: 10/24714f7d110bc29dab0e77e3594e3618933c4486087946c30cd9ab86064c7df42cec236bd66381f925d4e49e2516434e16da58c64fa4a62fb6e3613fc84868e6 + md5.js: "npm:^1.3.4" + node-gyp: "npm:latest" + safe-buffer: "npm:^5.1.1" + checksum: 10/ad4e1577f1a6b721c7800dcc7c733fe01f6c310732bb5bf2240245c2a5b45a38518b91d8be2c610611623160b9d1c0e91f1ce96d639f8b53e8894625cf20fa45 languageName: node linkType: hard -"pouchdb-fetch@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-fetch@npm:7.3.1" +"execa@npm:^5.0.0, execa@npm:^5.1.1": + version: 5.1.1 + resolution: "execa@npm:5.1.1" dependencies: - abort-controller: "npm:3.0.0" - fetch-cookie: "npm:0.11.0" - node-fetch: "npm:2.6.7" - checksum: 10/45e602ed86d35c6c70c7598a9519b30648965b26acf81215ecf97c3cbedff65b0cc4af7045a05c80deb2e0b7992a38f3d6e09358bd8672e7ff8bc5dcf5631c13 + cross-spawn: "npm:^7.0.3" + get-stream: "npm:^6.0.0" + human-signals: "npm:^2.1.0" + is-stream: "npm:^2.0.0" + merge-stream: "npm:^2.0.0" + npm-run-path: "npm:^4.0.1" + onetime: "npm:^5.1.2" + signal-exit: "npm:^3.0.3" + strip-final-newline: "npm:^2.0.0" + checksum: 10/8ada91f2d70f7dff702c861c2c64f21dfdc1525628f3c0454fd6f02fce65f7b958616cbd2b99ca7fa4d474e461a3d363824e91b3eb881705231abbf387470597 languageName: node linkType: hard -"pouchdb-find@npm:^7.0.0": - version: 7.3.1 - resolution: "pouchdb-find@npm:7.3.1" +"execa@npm:^8.0.1": + version: 8.0.1 + resolution: "execa@npm:8.0.1" dependencies: - pouchdb-abstract-mapreduce: "npm:7.3.1" - pouchdb-collate: "npm:7.3.1" - pouchdb-errors: "npm:7.3.1" - pouchdb-fetch: "npm:7.3.1" - pouchdb-md5: "npm:7.3.1" - pouchdb-selector-core: "npm:7.3.1" - pouchdb-utils: "npm:7.3.1" - checksum: 10/5e30fba483bf02619593ad8012a58bff5d5623a1586c45a390339b91e7e360a3622ed79052cb0587e6489ffd156475ecaa5a169adc1a45d3a480be80193e7b66 + cross-spawn: "npm:^7.0.3" + get-stream: "npm:^8.0.1" + human-signals: "npm:^5.0.0" + is-stream: "npm:^3.0.0" + merge-stream: "npm:^2.0.0" + npm-run-path: "npm:^5.1.0" + onetime: "npm:^6.0.0" + signal-exit: "npm:^4.1.0" + strip-final-newline: "npm:^3.0.0" + checksum: 10/d2ab5fe1e2bb92b9788864d0713f1fce9a07c4594e272c0c97bc18c90569897ab262e4ea58d27a694d288227a2e24f16f5e2575b44224ad9983b799dc7f1098d languageName: node linkType: hard -"pouchdb-json@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-json@npm:7.3.1" - dependencies: - vuvuzela: "npm:1.0.3" - checksum: 10/d85a4ade73e2426784527af9abd37857b27c1c4147a60e4ac132dbbaf50f85d417ea2fcf322a588f6f86c9ef2cc94bb5193113ac72bdfa62d37c636ab018a118 +"exit@npm:^0.1.2": + version: 0.1.2 + resolution: "exit@npm:0.1.2" + checksum: 10/387555050c5b3c10e7a9e8df5f43194e95d7737c74532c409910e585d5554eaff34960c166643f5e23d042196529daad059c292dcf1fb61b8ca878d3677f4b87 languageName: node linkType: hard -"pouchdb-mapreduce-utils@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-mapreduce-utils@npm:7.3.1" +"expand-tilde@npm:^2.0.0, expand-tilde@npm:^2.0.2": + version: 2.0.2 + resolution: "expand-tilde@npm:2.0.2" dependencies: - argsarray: "npm:0.0.1" - inherits: "npm:2.0.4" - pouchdb-collections: "npm:7.3.1" - pouchdb-utils: "npm:7.3.1" - checksum: 10/714121d4f4aeeb350cb97df5fdf2278854d980ad00d8b0727f0a396e56c85a7a260567accbdb551680f16aa347bce30c7e0cd81edd95fc018938bbdfbd9880e5 + homedir-polyfill: "npm:^1.0.1" + checksum: 10/2efe6ed407d229981b1b6ceb552438fbc9e5c7d6a6751ad6ced3e0aa5cf12f0b299da695e90d6c2ac79191b5c53c613e508f7149e4573abfbb540698ddb7301a languageName: node linkType: hard -"pouchdb-md5@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-md5@npm:7.3.1" +"expect@npm:^29.0.0, expect@npm:^29.6.2": + version: 29.6.2 + resolution: "expect@npm:29.6.2" dependencies: - pouchdb-binary-utils: "npm:7.3.1" - spark-md5: "npm:3.0.2" - checksum: 10/9e0b098e62887e1a09c70f3d907dc49f2b79dbfd540bc23d2a74fff130ddc07a263c6d15b122342471bccec164a62829178074c889ee67b694874f8140bedb60 + "@jest/expect-utils": "npm:^29.6.2" + "@types/node": "npm:*" + jest-get-type: "npm:^29.4.3" + jest-matcher-utils: "npm:^29.6.2" + jest-message-util: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + checksum: 10/304472c4c63fc89accdf32a6817c62945efbcb3d536347dd49bc793dfc91f73fd9661411e0cc919f483ef309be589e33dd5bc9a27b55a5d88ae99009ad0df8f7 languageName: node linkType: hard -"pouchdb-merge@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-merge@npm:7.3.1" - checksum: 10/4cf1f3962fed167233b2f7cae529de7f30ba5f27ed4d13ed1c6bf7c40cf7f36ee1fb68bc6c825737ecf211ca38795fdf56463e1fd5b3d619141691e348f1b6ae +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 10/2d9bbb6473de7051f96790d5f9a678f32e60ed0aa70741dc7fdc96fec8d631124ec3374ac144387604f05afff9500f31a1d45bd9eee4cdc2e4f9ad2d9b9d5dbd languageName: node linkType: hard -"pouchdb-selector-core@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-selector-core@npm:7.3.1" +"external-editor@npm:^3.0.3, external-editor@npm:^3.1.0": + version: 3.1.0 + resolution: "external-editor@npm:3.1.0" dependencies: - pouchdb-collate: "npm:7.3.1" - pouchdb-utils: "npm:7.3.1" - checksum: 10/bb5e9438d38753cfd1871d1f97cb3c04258140310cfacb8660d4168d50080bcbf13054f1e21fd80c17f11ba753dfa9cafa408d5c02d8f3b2d868140f64e782ca + chardet: "npm:^0.7.0" + iconv-lite: "npm:^0.4.24" + tmp: "npm:^0.0.33" + checksum: 10/776dff1d64a1d28f77ff93e9e75421a81c062983fd1544279d0a32f563c0b18c52abbb211f31262e2827e48edef5c9dc8f960d06dd2d42d1654443b88568056b languageName: node linkType: hard -"pouchdb-utils@npm:7.3.1": - version: 7.3.1 - resolution: "pouchdb-utils@npm:7.3.1" - dependencies: - argsarray: "npm:0.0.1" - clone-buffer: "npm:1.0.0" - immediate: "npm:3.3.0" - inherits: "npm:2.0.4" - pouchdb-collections: "npm:7.3.1" - pouchdb-errors: "npm:7.3.1" - pouchdb-md5: "npm:7.3.1" - uuid: "npm:8.3.2" - checksum: 10/84cf5b438065fb208c8f3028fcc8b646dd0a339c838e82cd28c21c9f116b727fe0341c5d637468b2f8d2f2dcfed6c8c599b8705412e2f11a6dc29da0710f78ba +"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d languageName: node linkType: hard -"pouchdb@npm:7.3.0": - version: 7.3.0 - resolution: "pouchdb@npm:7.3.0" - dependencies: - abort-controller: "npm:3.0.0" - argsarray: "npm:0.0.1" - buffer-from: "npm:1.1.2" - clone-buffer: "npm:1.0.0" - double-ended-queue: "npm:2.1.0-0" - fetch-cookie: "npm:0.11.0" - immediate: "npm:3.3.0" - inherits: "npm:2.0.4" - level: "npm:6.0.1" - level-codec: "npm:9.0.2" - level-write-stream: "npm:1.0.0" - leveldown: "npm:5.6.0" - levelup: "npm:4.4.0" - ltgt: "npm:2.2.1" - node-fetch: "npm:2.6.7" - readable-stream: "npm:1.1.14" - spark-md5: "npm:3.0.2" - through2: "npm:3.0.2" - uuid: "npm:8.3.2" - vuvuzela: "npm:1.0.3" - checksum: 10/e4e6d01ebd24d0142cea9389b544149b6c605b02a0f36ae9f09ce6c2c6befa4e7b2ca755c865e73b630c86bbbcbbec547a24f8f496f5b50c84acb78d4d2c79e4 +"fast-diff@npm:^1.1.2": + version: 1.2.0 + resolution: "fast-diff@npm:1.2.0" + checksum: 10/f62419b3d770f201d51c3ee8c4443b752b3ba2d548a6639026b7e09a08203ed2699a8d1fe21efcb8c5186135002d5d2916c12a687cac63785626456a92915adc languageName: node linkType: hard -"prebuild-install@npm:7.1.1": - version: 7.1.1 - resolution: "prebuild-install@npm:7.1.1" +"fast-equals@npm:^5.0.1": + version: 5.0.1 + resolution: "fast-equals@npm:5.0.1" + checksum: 10/9dc1ef767903600e5694a89a787782fc3a4f56cc04d235afc13616c848c33563b8f415b1c6a248b2a236424f624aa1a7513f46b7fa69590a640e7784f1296bce + languageName: node + linkType: hard + +"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": + version: 3.2.11 + resolution: "fast-glob@npm:3.2.11" dependencies: - detect-libc: "npm:^2.0.0" - expand-template: "npm:^2.0.3" - github-from-package: "npm:0.0.0" - minimist: "npm:^1.2.3" - mkdirp-classic: "npm:^0.5.3" - napi-build-utils: "npm:^1.0.1" - node-abi: "npm:^3.3.0" - pump: "npm:^3.0.0" - rc: "npm:^1.2.7" - simple-get: "npm:^4.0.0" - tar-fs: "npm:^2.0.0" - tunnel-agent: "npm:^0.6.0" - bin: - prebuild-install: bin.js - checksum: 10/6c70a2f82fbda8903497c560a761b000d861a3e772322c8bed012be0f0a084b5aaca4438a3fad1bd3a24210765f4fae06ddd89ea04dc4c034dde693cc0d9d5f4 + "@nodelib/fs.stat": "npm:^2.0.2" + "@nodelib/fs.walk": "npm:^1.2.3" + glob-parent: "npm:^5.1.2" + merge2: "npm:^1.3.0" + micromatch: "npm:^4.0.4" + checksum: 10/6b736d92a47f27218a85bf184a4ccab9f707398f86711bf84d730243b10a999a85f79afc526133c044ebebfcb42a68d09f769fdbedcc00680ddd56e56a56483a languageName: node linkType: hard -"precinct@npm:^11.0.5": - version: 11.0.5 - resolution: "precinct@npm:11.0.5" +"fast-glob@npm:^3.3.0": + version: 3.3.1 + resolution: "fast-glob@npm:3.3.1" dependencies: - "@dependents/detective-less": "npm:^4.1.0" - commander: "npm:^10.0.1" - detective-amd: "npm:^5.0.2" - detective-cjs: "npm:^5.0.1" - detective-es6: "npm:^4.0.1" - detective-postcss: "npm:^6.1.3" - detective-sass: "npm:^5.0.3" - detective-scss: "npm:^4.0.3" - detective-stylus: "npm:^4.0.0" - detective-typescript: "npm:^11.1.0" - module-definition: "npm:^5.0.1" - node-source-walk: "npm:^6.0.2" - bin: - precinct: bin/cli.js - checksum: 10/8f93c2e171622dfa1ce461ef52427247e4fcd51091480eec62b8d24c9b1098f5b6c2b28c50d57c2ae70a049f7302dfb2164631b59bfd894de97e2a8e11708c54 + "@nodelib/fs.stat": "npm:^2.0.2" + "@nodelib/fs.walk": "npm:^1.2.3" + glob-parent: "npm:^5.1.2" + merge2: "npm:^1.3.0" + micromatch: "npm:^4.0.4" + checksum: 10/51bcd15472879dfe51d4b01c5b70bbc7652724d39cdd082ba11276dbd7d84db0f6b33757e1938af8b2768a4bf485d9be0c89153beae24ee8331d6dcc7550379f languageName: node linkType: hard -"prelude-ls@npm:^1.2.1": - version: 1.2.1 - resolution: "prelude-ls@npm:1.2.1" - checksum: 10/0b9d2c76801ca652a7f64892dd37b7e3fab149a37d2424920099bf894acccc62abb4424af2155ab36dea8744843060a2d8ddc983518d0b1e22265a22324b72ed +"fast-glob@npm:^3.3.2": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" + dependencies: + "@nodelib/fs.stat": "npm:^2.0.2" + "@nodelib/fs.walk": "npm:^1.2.3" + glob-parent: "npm:^5.1.2" + merge2: "npm:^1.3.0" + micromatch: "npm:^4.0.4" + checksum: 10/222512e9315a0efca1276af9adb2127f02105d7288fa746145bf45e2716383fb79eb983c89601a72a399a56b7c18d38ce70457c5466218c5f13fad957cee16df languageName: node linkType: hard -"prelude-ls@npm:~1.1.2": - version: 1.1.2 - resolution: "prelude-ls@npm:1.1.2" - checksum: 10/946a9f60d3477ca6b7d4c5e8e452ad1b98dc8aaa992cea939a6b926ac16cc4129d7217c79271dc808b5814b1537ad0af37f29a942e2eafbb92cfc5a1c87c38cb +"fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e languageName: node linkType: hard -"prepend-http@npm:^1.0.1": - version: 1.0.4 - resolution: "prepend-http@npm:1.0.4" - checksum: 10/01e7baf4ad38af02257b99098543469332fc42ae50df33d97a124bf8172295907352fa6138c9b1610c10c6dd0847ca736e53fda736387cc5cf8fcffe96b47f29 +"fast-levenshtein@npm:^2.0.6": + version: 2.0.6 + resolution: "fast-levenshtein@npm:2.0.6" + checksum: 10/eb7e220ecf2bab5159d157350b81d01f75726a4382f5a9266f42b9150c4523b9795f7f5d9fbbbeaeac09a441b2369f05ee02db48ea938584205530fe5693cfe1 languageName: node linkType: hard -"prepend-http@npm:^2.0.0": - version: 2.0.0 - resolution: "prepend-http@npm:2.0.0" - checksum: 10/7694a9525405447662c1ffd352fcb41b6410c705b739b6f4e3a3e21cf5fdede8377890088e8934436b8b17ba55365a615f153960f30877bf0d0392f9e93503ea +"fast-safe-stringify@npm:2.1.1": + version: 2.1.1 + resolution: "fast-safe-stringify@npm:2.1.1" + checksum: 10/dc1f063c2c6ac9533aee14d406441f86783a8984b2ca09b19c2fe281f9ff59d315298bc7bc22fd1f83d26fe19ef2f20e2ddb68e96b15040292e555c5ced0c1e4 languageName: node linkType: hard -"prettier-linter-helpers@npm:^1.0.0": - version: 1.0.0 - resolution: "prettier-linter-helpers@npm:1.0.0" - dependencies: - fast-diff: "npm:^1.1.2" - checksum: 10/00ce8011cf6430158d27f9c92cfea0a7699405633f7f1d4a45f07e21bf78e99895911cbcdc3853db3a824201a7c745bd49bfea8abd5fb9883e765a90f74f8392 +"fast-uri@npm:^3.0.1": + version: 3.0.3 + resolution: "fast-uri@npm:3.0.3" + checksum: 10/92487c75848b03edc45517fca0148287d342c30818ce43d556391db774d8e01644fb6964315a3336eec5a90f301b218b21f71fb9b2528ba25757435a20392c95 languageName: node linkType: hard -"prettier@npm:3.2.5": - version: 3.2.5 - resolution: "prettier@npm:3.2.5" - bin: - prettier: bin/prettier.cjs - checksum: 10/d509f9da0b70e8cacc561a1911c0d99ec75117faed27b95cc8534cb2349667dee6351b0ca83fa9d5703f14127faa52b798de40f5705f02d843da133fc3aa416a +"fastest-levenshtein@npm:^1.0.12": + version: 1.0.12 + resolution: "fastest-levenshtein@npm:1.0.12" + checksum: 10/e1a013698dd1d302c7a78150130c7d50bb678c2c2f8839842a796d66cc7cdf50ea6b3d7ca930b0c8e7e8c2cd84fea8ab831023b382f7aab6922c318c1451beab languageName: node linkType: hard -"pretty-bytes@npm:^5.3.0, pretty-bytes@npm:^5.4.1": - version: 5.6.0 - resolution: "pretty-bytes@npm:5.6.0" - checksum: 10/9c082500d1e93434b5b291bd651662936b8bd6204ec9fa17d563116a192d6d86b98f6d328526b4e8d783c07d5499e2614a807520249692da9ec81564b2f439cd +"fastq@npm:^1.6.0": + version: 1.13.0 + resolution: "fastq@npm:1.13.0" + dependencies: + reusify: "npm:^1.0.4" + checksum: 10/0902cb9b81accf34e5542612c8a1df6c6ea47674f85bcc9cdc38795a28b53e4a096f751cfcf4fb25d2ea42fee5447499ba6cf5af5d0209297e1d1fd4dd551bb6 languageName: node linkType: hard -"pretty-error@npm:^4.0.0": - version: 4.0.0 - resolution: "pretty-error@npm:4.0.0" +"fb-watchman@npm:^2.0.0": + version: 2.0.1 + resolution: "fb-watchman@npm:2.0.1" dependencies: - lodash: "npm:^4.17.20" - renderkid: "npm:^3.0.0" - checksum: 10/0212ad8742f8bb6f412f95b07d7f6874c55514ac4384f4f7de0defe77e767cca99f667c2316529f62a041fa654194a99c1ee7e321e1b7f794b5cc700777634d6 + bser: "npm:2.1.1" + checksum: 10/9a03efc7d41ce3ca3d799d63505a1f7312caddf4e7737d39f2165bfe4872cbd4b87eccc9e6c57229ea08f14b4d7187896da31a7270b8da7a4aaa8fba2d3d1c42 languageName: node linkType: hard -"pretty-format@npm:^27.0.0, pretty-format@npm:^27.0.2, pretty-format@npm:^27.5.1": - version: 27.5.1 - resolution: "pretty-format@npm:27.5.1" +"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4": + version: 3.2.0 + resolution: "fetch-blob@npm:3.2.0" dependencies: - ansi-regex: "npm:^5.0.1" - ansi-styles: "npm:^5.0.0" - react-is: "npm:^17.0.1" - checksum: 10/248990cbef9e96fb36a3e1ae6b903c551ca4ddd733f8d0912b9cc5141d3d0b3f9f8dfb4d799fb1c6723382c9c2083ffbfa4ad43ff9a0e7535d32d41fd5f01da6 + node-domexception: "npm:^1.0.0" + web-streams-polyfill: "npm:^3.0.3" + checksum: 10/5264ecceb5fdc19eb51d1d0359921f12730941e333019e673e71eb73921146dceabcb0b8f534582be4497312d656508a439ad0f5edeec2b29ab2e10c72a1f86b languageName: node linkType: hard -"pretty-format@npm:^28.1.3": - version: 28.1.3 - resolution: "pretty-format@npm:28.1.3" +"figures@npm:^3.0.0": + version: 3.2.0 + resolution: "figures@npm:3.2.0" dependencies: - "@jest/schemas": "npm:^28.1.3" - ansi-regex: "npm:^5.0.1" - ansi-styles: "npm:^5.0.0" - react-is: "npm:^18.0.0" - checksum: 10/26626d33e201388174a1ce352be46b8087f28184bf3684a88b2f7cf633e28419ffc664628eec261ba13b0f03748c3a6f85db063a2022f75a354c7b9e4e06526b + escape-string-regexp: "npm:^1.0.5" + checksum: 10/a3bf94e001be51d3770500789157f067218d4bc681a65e1f69d482de15120bcac822dceb1a7b3803f32e4e3a61a46df44f7f2c8ba95d6375e7491502e0dd3d97 languageName: node linkType: hard -"pretty-format@npm:^29.0.0, pretty-format@npm:^29.6.2": - version: 29.6.2 - resolution: "pretty-format@npm:29.6.2" +"file-entry-cache@npm:^6.0.1": + version: 6.0.1 + resolution: "file-entry-cache@npm:6.0.1" dependencies: - "@jest/schemas": "npm:^29.6.0" - ansi-styles: "npm:^5.0.0" - react-is: "npm:^18.0.0" - checksum: 10/5db1faf52552341e5026fd72f847d88116b08f758ef904f1635415b53ec2a193a0114fdede9f55a2c1174fa6eca896531f860db6f208c5698a52a5c354bb6f8d + flat-cache: "npm:^3.0.4" + checksum: 10/099bb9d4ab332cb93c48b14807a6918a1da87c45dce91d4b61fd40e6505d56d0697da060cb901c729c90487067d93c9243f5da3dc9c41f0358483bfdebca736b languageName: node linkType: hard -"pretty-ms@npm:^7.0.1": - version: 7.0.1 - resolution: "pretty-ms@npm:7.0.1" +"file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" dependencies: - parse-ms: "npm:^2.1.0" - checksum: 10/a39aac23cc7dae7a94c70518ab8b6c6db0894a7b84c81ee7abc8778c5ec8bae2d1e71ba991ff641732b38433724bfbdbb37bd3a00418637f797c072e06fe8b4c + flat-cache: "npm:^4.0.0" + checksum: 10/afe55c4de4e0d226a23c1eae62a7219aafb390859122608a89fa4df6addf55c7fd3f1a2da6f5b41e7cdff496e4cf28bbd215d53eab5c817afa96d2b40c81bfb0 languageName: node linkType: hard -"printj@npm:~1.3.1": - version: 1.3.1 - resolution: "printj@npm:1.3.1" +"filing-cabinet@npm:^4.1.6": + version: 4.2.0 + resolution: "filing-cabinet@npm:4.2.0" + dependencies: + app-module-path: "npm:^2.2.0" + commander: "npm:^10.0.1" + enhanced-resolve: "npm:^5.14.1" + is-relative-path: "npm:^1.0.2" + module-definition: "npm:^5.0.1" + module-lookup-amd: "npm:^8.0.5" + resolve: "npm:^1.22.3" + resolve-dependency-path: "npm:^3.0.2" + sass-lookup: "npm:^5.0.1" + stylus-lookup: "npm:^5.0.1" + tsconfig-paths: "npm:^4.2.0" + typescript: "npm:^5.0.4" bin: - printj: bin/printj.njs - checksum: 10/03eef7fdf05741db9aa7d6306d3c556bb433c6874a425875fca2ee71c1a8fc224f113b76498960ac193d80c16c51d2211fc75981a9b9f6349181c47f8d8d7cfd + filing-cabinet: bin/cli.js + checksum: 10/df533d35634608baec943d02ecef346746e9e297cb8cce4ad73e3f035e3e7806f0ce447301a6ef7f6c1a62718a196675c94edff2e8e13a790c82ec8c5f902b5a languageName: node linkType: hard -"proc-log@npm:^3.0.0": - version: 3.0.0 - resolution: "proc-log@npm:3.0.0" - checksum: 10/02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea languageName: node linkType: hard -"proc-log@npm:^4.0.0, proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": - version: 4.2.0 - resolution: "proc-log@npm:4.2.0" - checksum: 10/4e1394491b717f6c1ade15c570ecd4c2b681698474d3ae2d303c1e4b6ab9455bd5a81566211e82890d5a5ae9859718cc6954d5150bb18b09b72ecb297beae90a +"filter-obj@npm:^2.0.2": + version: 2.0.2 + resolution: "filter-obj@npm:2.0.2" + checksum: 10/ab0ac143367eac21020cbb04d495014649d17ea642c5308f6710a7238fc502c1a30291a7d8b28edd7e59a3fe3589cc6988be64d5cd125b881892dfbc5e9d45d8 languageName: node linkType: hard -"process-nextick-args@npm:~2.0.0": - version: 2.0.1 - resolution: "process-nextick-args@npm:2.0.1" - checksum: 10/1d38588e520dab7cea67cbbe2efdd86a10cc7a074c09657635e34f035277b59fbb57d09d8638346bf7090f8e8ebc070c96fa5fd183b777fff4f5edff5e9466cf +"find-cache-dir@npm:^3.2.0": + version: 3.3.2 + resolution: "find-cache-dir@npm:3.3.2" + dependencies: + commondir: "npm:^1.0.1" + make-dir: "npm:^3.0.2" + pkg-dir: "npm:^4.1.0" + checksum: 10/3907c2e0b15132704ed67083686cd3e68ab7d9ecc22e50ae9da20678245d488b01fa22c0e34c0544dc6edc4354c766f016c8c186a787be7c17f7cde8c5281e85 languageName: node linkType: hard -"process-on-spawn@npm:^1.0.0": +"find-up-simple@npm:^1.0.0": version: 1.0.0 - resolution: "process-on-spawn@npm:1.0.0" - dependencies: - fromentries: "npm:^1.2.0" - checksum: 10/8795d71742798e5a059e13da2a9c13988aa7c673a3a57f276c1ff6ed942ba9b7636139121c6a409eaa2ea6a8fda7af4be19c3dc576320515bb3f354e3544106e + resolution: "find-up-simple@npm:1.0.0" + checksum: 10/91c3d51c1111b5eb4e6e6d71d21438f6571a37a69dc288d4222b98996756e2f472fa5393a4dddb5e1a84929405d87e86f4bdce798ba84ee513b79854960ec140 languageName: node linkType: hard -"process-warning@npm:^3.0.0": - version: 3.0.0 - resolution: "process-warning@npm:3.0.0" - checksum: 10/2d82fa641e50a5789eaf0f2b33453760996e373d4591aac576a22d696186ab7e240a0592db86c264d4f28a46c2abbe9b94689752017db7dadc90f169f12b0924 +"find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: "npm:^5.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 languageName: node linkType: hard -"process-warning@npm:^4.0.0": - version: 4.0.0 - resolution: "process-warning@npm:4.0.0" - checksum: 10/0d6ec069f3a6fe1d3379c0247329a297f1f3b9ea7e1d828db0a8f61e0e8337a98b7eb201547350924bc4a101ddcf2fa5cf5563ffe2c54c27651f7996d328483e +"find-up@npm:^5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: "npm:^6.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 languageName: node linkType: hard -"process@npm:^0.11.10": - version: 0.11.10 - resolution: "process@npm:0.11.10" - checksum: 10/dbaa7e8d1d5cf375c36963ff43116772a989ef2bb47c9bdee20f38fd8fc061119cf38140631cf90c781aca4d3f0f0d2c834711952b728953f04fd7d238f59f5b +"find-up@npm:^6.3.0": + version: 6.3.0 + resolution: "find-up@npm:6.3.0" + dependencies: + locate-path: "npm:^7.1.0" + path-exists: "npm:^5.0.0" + checksum: 10/4f3bdc30d41778c647e53f4923e72de5e5fb055157031f34501c5b36c2eb59f77b997edf9cb00165c6060cda7eaa2e3da82cb6be2e61d68ad3e07c4bc4cce67e languageName: node linkType: hard -"proggy@npm:^2.0.0": +"findit@npm:^2.0.0": version: 2.0.0 - resolution: "proggy@npm:2.0.0" - checksum: 10/9c96830d30516534c91e1260cae98d2c12aa32ea4ca7ff979876557ae293581c4874c95daf80497a7350179e7fec6d119cd589ef09af9c925f5842161897ed7e + resolution: "findit@npm:2.0.0" + checksum: 10/1fa2890cf3f700efb5b28680fcedc64b93fd184e4e2c1e1eb97050be687c53ee165dfa0546902a34be2755a3b3b387d7a2d6f475da5879cc2236dd7787760906 languageName: node linkType: hard -"progress@npm:^1.1.8": - version: 1.1.8 - resolution: "progress@npm:1.1.8" - checksum: 10/873189b8ac74a0dcd23f3287646e8af360b71f6c40fbab572f7898093a6212c37c34cefcb20bfd583dc4f6c44ff98b1b8bce4dcaf67214175e99c0ba6d698839 +"findup-sync@npm:^5.0.0": + version: 5.0.0 + resolution: "findup-sync@npm:5.0.0" + dependencies: + detect-file: "npm:^1.0.0" + is-glob: "npm:^4.0.3" + micromatch: "npm:^4.0.4" + resolve-dir: "npm:^1.0.1" + checksum: 10/576716c77a0e8330b17ae9cba27d1fda8907c8cda7bf33a47f1999e16e089bfc6df4dd62933e0760f430736183c054348c34aa45dd882d49c8c098f55b89ee1d languageName: node linkType: hard -"progress@npm:^2.0.0, progress@npm:^2.0.3": - version: 2.0.3 - resolution: "progress@npm:2.0.3" - checksum: 10/e6f0bcb71f716eee9dfac0fe8a2606e3704d6a64dd93baaf49fbadbc8499989a610fe14cf1bc6f61b6d6653c49408d94f4a94e124538084efd8e4cf525e0293d +"flat-cache@npm:^3.0.4": + version: 3.0.4 + resolution: "flat-cache@npm:3.0.4" + dependencies: + flatted: "npm:^3.1.0" + rimraf: "npm:^3.0.2" + checksum: 10/9fe5d0cb97c988e3b25242e71346965fae22757674db3fca14206850af2efa3ca3b04a3ba0eba8d5e20fd8a3be80a2e14b1c2917e70ffe1acb98a8c3327e4c9f languageName: node linkType: hard -"prom-client@npm:15.1.3": - version: 15.1.3 - resolution: "prom-client@npm:15.1.3" +"flat-cache@npm:^4.0.0": + version: 4.0.1 + resolution: "flat-cache@npm:4.0.1" dependencies: - "@opentelemetry/api": "npm:^1.4.0" - tdigest: "npm:^0.1.1" - checksum: 10/eba75e15ab896845d39359e3a4d6f7913ea05339b3122d8dde8c8c374669ad1a1d1ab2694ab2101c420bd98086a564e4f2a18aa29018fc14a4732e57c1c19aec + flatted: "npm:^3.2.9" + keyv: "npm:^4.5.4" + checksum: 10/58ce851d9045fffc7871ce2bd718bc485ad7e777bf748c054904b87c351ff1080c2c11da00788d78738bfb51b71e4d5ea12d13b98eb36e3358851ffe495b62dc languageName: node linkType: hard -"promise-all-reject-late@npm:^1.0.0": - version: 1.0.1 - resolution: "promise-all-reject-late@npm:1.0.1" - checksum: 10/f5e5c1bfed975c26b6dec007393e1026c437716d87c9c688cfa026bb904c190155211d23fe795c03c4394f88563471aec56b3ad263bff5ed68dad734513c2912 +"flatted@npm:^3.1.0": + version: 3.2.5 + resolution: "flatted@npm:3.2.5" + checksum: 10/eed01f72ad0317561e4d6187f7408dc391f7849d9cd6700520ce06155d1859539b6899afdfefc815ce51ec48f97d1015350287c541b5302a49581cf25cec1cd2 languageName: node linkType: hard -"promise-call-limit@npm:^3.0.1": - version: 3.0.1 - resolution: "promise-call-limit@npm:3.0.1" - checksum: 10/f1b3c4d3a9c5482ce27ec5f40311e1389adb9bb10c16166e61c96d29ab22c701691d5225bf6745a162858f45dfb46cc82275fd09e7aa57846fc446c7855c2f06 +"flatted@npm:^3.2.9": + version: 3.3.1 + resolution: "flatted@npm:3.3.1" + checksum: 10/7b8376061d5be6e0d3658bbab8bde587647f68797cf6bfeae9dea0e5137d9f27547ab92aaff3512dd9d1299086a6d61be98e9d48a56d17531b634f77faadbc49 languageName: node linkType: hard -"promise-inflight@npm:^1.0.1": - version: 1.0.1 - resolution: "promise-inflight@npm:1.0.1" - checksum: 10/1560d413ea20c5a74f3631d39ba8cbd1972b9228072a755d01e1f5ca5110382d9af76a1582d889445adc6e75bb5ac4886b56dc4b6eae51b30145d7bb1ac7505b +"follow-redirects@npm:^1.15.6": + version: 1.15.6 + resolution: "follow-redirects@npm:1.15.6" + peerDependenciesMeta: + debug: + optional: true + checksum: 10/70c7612c4cab18e546e36b991bbf8009a1a41cf85354afe04b113d1117569abf760269409cb3eb842d9f7b03d62826687086b081c566ea7b1e6613cf29030bf7 languageName: node linkType: hard -"promise-retry@npm:^2.0.1": - version: 2.0.1 - resolution: "promise-retry@npm:2.0.1" +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" dependencies: - err-code: "npm:^2.0.2" - retry: "npm:^0.12.0" - checksum: 10/96e1a82453c6c96eef53a37a1d6134c9f2482f94068f98a59145d0986ca4e497bf110a410adf73857e588165eab3899f0ebcf7b3890c1b3ce802abc0d65967d4 - languageName: node - linkType: hard - -"promise-settle@npm:^0.3.0": - version: 0.3.0 - resolution: "promise-settle@npm:0.3.0" - checksum: 10/7ff854d823e7d2eb7cdde7f2add48fab1da998718cfa0272e476c0e2d64967e82330b9e598e6af75c6a3f2043c3c711d720aaf9cb862b0952947819475c8cd63 + is-callable: "npm:^1.1.3" + checksum: 10/fdac0cde1be35610bd635ae958422e8ce0cc1313e8d32ea6d34cfda7b60850940c1fd07c36456ad76bd9c24aef6ff5e03b02beb58c83af5ef6c968a64eada676 languageName: node linkType: hard -"promise@npm:^8.1.0": - version: 8.3.0 - resolution: "promise@npm:8.3.0" - dependencies: - asap: "npm:~2.0.6" - checksum: 10/55e9d0d723c66810966bc055c6c77a3658c0af7e4a8cc88ea47aeaf2949ca0bd1de327d9c631df61236f5406ad478384fa19a77afb3f88c0303eba9e5eb0a8d8 +"foreach@npm:^2.0.5": + version: 2.0.5 + resolution: "foreach@npm:2.0.5" + checksum: 10/3962224ad3343019aab128cbfd11ba8e17ef8a67de09d2b217651f097a038294dcf641e07ebeae2b715e1a5e81bd212ebacae323950a3c28bc340a4c5955c032 languageName: node linkType: hard -"prompts@npm:^2.0.1, prompts@npm:^2.4.2": - version: 2.4.2 - resolution: "prompts@npm:2.4.2" +"foreground-child@npm:^2.0.0": + version: 2.0.0 + resolution: "foreground-child@npm:2.0.0" dependencies: - kleur: "npm:^3.0.3" - sisteransi: "npm:^1.0.5" - checksum: 10/c52536521a4d21eff4f2f2aa4572446cad227464066365a7167e52ccf8d9839c099f9afec1aba0eed3d5a2514b3e79e0b3e7a1dc326b9acde6b75d27ed74b1a9 + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^3.0.2" + checksum: 10/f36574ad8e19d69ce06fceac7d86161b863968e4ba292c14b7b40e5c464e3e9bcd7711250d33427d95cc2bb0d48cf101df9687433dbbc7fd3c7e4f595be8305e languageName: node linkType: hard -"prop-types@npm:^15.6.2, prop-types@npm:^15.8.1": - version: 15.8.1 - resolution: "prop-types@npm:15.8.1" +"foreground-child@npm:^3.1.0": + version: 3.1.1 + resolution: "foreground-child@npm:3.1.1" dependencies: - loose-envify: "npm:^1.4.0" - object-assign: "npm:^4.1.1" - react-is: "npm:^16.13.1" - checksum: 10/7d959caec002bc964c86cdc461ec93108b27337dabe6192fb97d69e16a0c799a03462713868b40749bfc1caf5f57ef80ac3e4ffad3effa636ee667582a75e2c0 + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^4.0.1" + checksum: 10/087edd44857d258c4f73ad84cb8df980826569656f2550c341b27adf5335354393eec24ea2fabd43a253233fb27cee177ebe46bd0b7ea129c77e87cb1e9936fb languageName: node linkType: hard -"propagate@npm:^2.0.0": - version: 2.0.1 - resolution: "propagate@npm:2.0.1" - checksum: 10/8c761c16e8232f82f6d015d3e01e8bd4109f47ad804f904d950f6fe319813b448ca112246b6bfdc182b400424b155b0b7c4525a9bb009e6fa950200157569c14 +"form-data-encoder@npm:^2.1.2": + version: 2.1.4 + resolution: "form-data-encoder@npm:2.1.4" + checksum: 10/3778e7db3c21457296e6fdbc4200642a6c01e8be9297256e845ee275f9ddaecb5f49bfb0364690ad216898c114ec59bf85f01ec823a70670b8067273415d62f6 languageName: node linkType: hard -"proto-list@npm:~1.2.1": - version: 1.2.4 - resolution: "proto-list@npm:1.2.4" - checksum: 10/9cc3b46d613fa0d637033b225db1bc98e914c3c05864f7adc9bee728192e353125ef2e49f71129a413f6333951756000b0e54f299d921f02d3e9e370cc994100 +"form-data@npm:^3.0.0": + version: 3.0.1 + resolution: "form-data@npm:3.0.1" + dependencies: + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.8" + mime-types: "npm:^2.1.12" + checksum: 10/944b40ff63b9cb1ca7a97e70f72104c548e0b0263e3e817e49919015a0d687453086259b93005389896dbffd3777cccea2e67c51f4e827590e5979b14ff91bf7 languageName: node linkType: hard -"proto3-json-serializer@npm:1.1.1": - version: 1.1.1 - resolution: "proto3-json-serializer@npm:1.1.1" +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" dependencies: - protobufjs: "npm:^7.0.0" - checksum: 10/20c5d28b6e8f4100fbae1eb78ae89019de1f6f19c352366f931d2a1c25ef48c1cfe0bbdb870e484bd8b3a0ea614295b9790e72655f0930ab445c7e10d1d99cec + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.8" + mime-types: "npm:^2.1.12" + checksum: 10/7264aa760a8cf09482816d8300f1b6e2423de1b02bba612a136857413fdc96d7178298ced106817655facc6b89036c6e12ae31c9eb5bdc16aabf502ae8a5d805 languageName: node linkType: hard -"proto3-json-serializer@npm:^2.0.0": - version: 2.0.0 - resolution: "proto3-json-serializer@npm:2.0.0" +"formdata-polyfill@npm:^4.0.10": + version: 4.0.10 + resolution: "formdata-polyfill@npm:4.0.10" dependencies: - protobufjs: "npm:^7.0.0" - checksum: 10/7b961ca4e5dc30c82e3d6d093a785c4bdfd28f704e145f7ceadd295024372651d9e627195dd330634e2f0a6b55847384288d1b9c47d2a7367abc097c18bd2c1f + fetch-blob: "npm:^3.1.2" + checksum: 10/9b5001d2edef3c9449ac3f48bd4f8cc92e7d0f2e7c1a5c8ba555ad4e77535cc5cf621fabe49e97f304067037282dd9093b9160a3cb533e46420b446c4e6bc06f languageName: node linkType: hard -"protobufjs@npm:>=7.2.5": - version: 7.2.5 - resolution: "protobufjs@npm:7.2.5" - dependencies: - "@protobufjs/aspromise": "npm:^1.1.2" - "@protobufjs/base64": "npm:^1.1.2" - "@protobufjs/codegen": "npm:^2.0.4" - "@protobufjs/eventemitter": "npm:^1.1.0" - "@protobufjs/fetch": "npm:^1.1.0" - "@protobufjs/float": "npm:^1.0.2" - "@protobufjs/inquire": "npm:^1.1.0" - "@protobufjs/path": "npm:^1.1.2" - "@protobufjs/pool": "npm:^1.1.0" - "@protobufjs/utf8": "npm:^1.1.0" - "@types/node": "npm:>=13.7.0" - long: "npm:^5.0.0" - checksum: 10/6c5aa62b61dff843f585f3acd9cb7a82d566de2dbf167a300b39afee91b04298c4b4aec61354b7c00308b40596f5f3f4b07d6246cfb4ee0abeaea25101033315 +"fromentries@npm:^1.2.0": + version: 1.3.2 + resolution: "fromentries@npm:1.3.2" + checksum: 10/10d6e07d289db102c0c1eaf5c3e3fa55ddd6b50033d7de16d99a7cd89f1e1a302dfadb26457031f9bb5d2ed95a179aaf0396092dde5abcae06e8a2f0476826be languageName: node linkType: hard -"protoc-gen-ts@npm:0.8.7": - version: 0.8.7 - resolution: "protoc-gen-ts@npm:0.8.7" - bin: - protoc-gen-ts: protoc-gen-ts.js - checksum: 10/5f60e0f6e03d26ca91544f629f6f9e1431b16fab64dfd0f6d7e604ba8f07c94361c362ffd9d8772b4546528d2c9397c2a2c5729d0b4a59c0dcdfe1f458c1e2d5 +"fs-exists-cached@npm:^1.0.0": + version: 1.0.0 + resolution: "fs-exists-cached@npm:1.0.0" + checksum: 10/c9376d912dd7c5ed85fec9e33d3151b7283bdb3bed2d345f4cd83b175552b13f911b003b2d8f4c3a3c87e57ef28ad02a242b20c96466c402e7b9de7c82aea406 languageName: node linkType: hard -"protocols@npm:^2.0.0, protocols@npm:^2.0.1": - version: 2.0.1 - resolution: "protocols@npm:2.0.1" - checksum: 10/0cd08a55b9cb7cc96fed7a528255320428a7c86fd5f3f35965845285436433b7836178893168f80584efdf86391cd7c0a837b6f6bc5ddac3029c76be61118ba5 +"fs-extra@npm:10.1.0": + version: 10.1.0 + resolution: "fs-extra@npm:10.1.0" + dependencies: + graceful-fs: "npm:^4.2.0" + jsonfile: "npm:^6.0.1" + universalify: "npm:^2.0.0" + checksum: 10/05ce2c3b59049bcb7b52001acd000e44b3c4af4ec1f8839f383ef41ec0048e3cfa7fd8a637b1bddfefad319145db89be91f4b7c1db2908205d38bf91e7d1d3b7 languageName: node linkType: hard -"protons-runtime@npm:^5.0.0": - version: 5.2.0 - resolution: "protons-runtime@npm:5.2.0" +"fs-extra@npm:11.2.0, fs-extra@npm:^11.2.0": + version: 11.2.0 + resolution: "fs-extra@npm:11.2.0" dependencies: - uint8arraylist: "npm:^2.4.3" - uint8arrays: "npm:^4.0.6" - checksum: 10/c0ac8ba366fa0ff09c3efcc86642956e4fe8e968a809af3ed77630f78e5a2f7f986ffd41b628d8f25832338e8c8e3855b72c8213edd1d955091d264e2e9d79f8 + graceful-fs: "npm:^4.2.0" + jsonfile: "npm:^6.0.1" + universalify: "npm:^2.0.0" + checksum: 10/0579bf6726a4cd054d4aa308f10b483f52478bb16284f32cf60b4ce0542063d551fca1a08a2af365e35db21a3fa5a06cf2a6ed614004b4368982bc754cb816b3 languageName: node linkType: hard -"proxy-addr@npm:^2.0.7, proxy-addr@npm:~2.0.7": - version: 2.0.7 - resolution: "proxy-addr@npm:2.0.7" +"fs-extra@npm:^11.0.0": + version: 11.1.1 + resolution: "fs-extra@npm:11.1.1" dependencies: - forwarded: "npm:0.2.0" - ipaddr.js: "npm:1.9.1" - checksum: 10/f24a0c80af0e75d31e3451398670d73406ec642914da11a2965b80b1898ca6f66a0e3e091a11a4327079b2b268795f6fa06691923fef91887215c3d0e8ea3f68 - languageName: node - linkType: hard - -"proxy-from-env@npm:^1.1.0": - version: 1.1.0 - resolution: "proxy-from-env@npm:1.1.0" - checksum: 10/f0bb4a87cfd18f77bc2fba23ae49c3b378fb35143af16cc478171c623eebe181678f09439707ad80081d340d1593cd54a33a0113f3ccb3f4bc9451488780ee23 + graceful-fs: "npm:^4.2.0" + jsonfile: "npm:^6.0.1" + universalify: "npm:^2.0.0" + checksum: 10/c4e9fabf9762a70d1403316b7faa899f3d3303c8afa765b891c2210fdeba368461e04ae1203920b64ef6a7d066a39ab8cef2160b5ce8d1011bb4368688cd9bb7 languageName: node linkType: hard -"prr@npm:~0.0.0": - version: 0.0.0 - resolution: "prr@npm:0.0.0" - checksum: 10/6552d9d92d9d55ec1afb8952ad80f81bbb1b4379f24ff7c506ad083ea701caf1bf6d4b092a2baeb98ec3f312c5a49d8bdf1d9b20a6db2998d05c2d52aa6a82e7 +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/03191781e94bc9a54bd376d3146f90fe8e082627c502185dbf7b9b3032f66b0b142c1115f3b2cc5936575fc1b44845ce903dd4c21bec2a8d69f3bd56f9cee9ec languageName: node linkType: hard -"prr@npm:~1.0.1": - version: 1.0.1 - resolution: "prr@npm:1.0.1" - checksum: 10/3bca2db0479fd38f8c4c9439139b0c42dcaadcc2fbb7bb8e0e6afaa1383457f1d19aea9e5f961d5b080f1cfc05bfa1fe9e45c97a1d3fd6d421950a73d3108381 +"fs-minipass@npm:^3.0.0": + version: 3.0.1 + resolution: "fs-minipass@npm:3.0.1" + dependencies: + minipass: "npm:^4.0.0" + checksum: 10/c6c0a7b976aa6ba86ae2f4b03fe633fd07b03191453b56045af75299fd6fa669da2de0771defcbb20ea0e4e9ac3afbd411ae3de0a2af18e4ee09586be930375c languageName: node linkType: hard -"pseudomap@npm:^1.0.2": - version: 1.0.2 - resolution: "pseudomap@npm:1.0.2" - checksum: 10/856c0aae0ff2ad60881168334448e898ad7a0e45fe7386d114b150084254c01e200c957cf378378025df4e052c7890c5bd933939b0e0d2ecfcc1dc2f0b2991f5 +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10/e703107c28e362d8d7b910bbcbfd371e640a3bb45ae157a362b5952c0030c0b6d4981140ec319b347bce7adc025dd7813da1ff908a945ac214d64f5402a51b96 languageName: node linkType: hard -"psl@npm:^1.1.33": - version: 1.8.0 - resolution: "psl@npm:1.8.0" - checksum: 10/5f62a8eca06cb4a017983d15b92b0d38dc8699d637eabc8cb482c59b4106c9760f59cc8afabcb8bb7b98f0322907680d8f0f59226386fffab5248d180bc04578 +"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": + version: 2.3.2 + resolution: "fsevents@npm:2.3.2" + dependencies: + node-gyp: "npm:latest" + checksum: 10/6b5b6f5692372446ff81cf9501c76e3e0459a4852b3b5f1fc72c103198c125a6b8c72f5f166bdd76ffb2fca261e7f6ee5565daf80dca6e571e55bcc589cc1256 + conditions: os=darwin languageName: node linkType: hard -"pstree.remy@npm:^1.1.8": - version: 1.1.8 - resolution: "pstree.remy@npm:1.1.8" - checksum: 10/ef13b1b5896b35f67dbd4fb7ba54bb2a5da1a5c317276cbad4bcad4159bf8f7b5e1748dc244bf36865f3d560d2fc952521581280a91468c9c2df166cc760c8c1 +"fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin languageName: node linkType: hard -"public-encrypt@npm:^4.0.0": - version: 4.0.3 - resolution: "public-encrypt@npm:4.0.3" +"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": + version: 2.3.2 + resolution: "fsevents@patch:fsevents@npm%3A2.3.2#optional!builtin::version=2.3.2&hash=df0bf1" dependencies: - bn.js: "npm:^4.1.0" - browserify-rsa: "npm:^4.0.0" - create-hash: "npm:^1.1.0" - parse-asn1: "npm:^5.0.0" - randombytes: "npm:^2.0.1" - safe-buffer: "npm:^5.1.2" - checksum: 10/059d64da8ba9ea0733377d23b57b6cbe5be663c8eb187b9c051eec85f799ff95c4e194eb3a69db07cc1f73a2a63519e67716ae9b8630e13e7149840d0abe044d + node-gyp: "npm:latest" + conditions: os=darwin languageName: node linkType: hard -"pump@npm:^3.0.0": - version: 3.0.0 - resolution: "pump@npm:3.0.0" +"fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: - end-of-stream: "npm:^1.1.0" - once: "npm:^1.3.1" - checksum: 10/e42e9229fba14732593a718b04cb5e1cfef8254544870997e0ecd9732b189a48e1256e4e5478148ecb47c8511dca2b09eae56b4d0aad8009e6fac8072923cfc9 + node-gyp: "npm:latest" + conditions: os=darwin languageName: node linkType: hard -"punycode.js@npm:^2.3.1": - version: 2.3.1 - resolution: "punycode.js@npm:2.3.1" - checksum: 10/f0e946d1edf063f9e3d30a32ca86d8ff90ed13ca40dad9c75d37510a04473340cfc98db23a905cc1e517b1e9deb0f6021dce6f422ace235c60d3c9ac47c5a16a +"function-bind@npm:^1.1.1": + version: 1.1.1 + resolution: "function-bind@npm:1.1.1" + checksum: 10/d83f2968030678f0b8c3f2183d63dcd969344eb8b55b4eb826a94ccac6de8b87c95bebffda37a6386c74f152284eb02956ff2c496897f35d32bdc2628ac68ac5 languageName: node linkType: hard -"punycode@npm:1.3.2": - version: 1.3.2 - resolution: "punycode@npm:1.3.2" - checksum: 10/5c57d588c60679fd1b9400c75de06e327723f2b38e21e195027ba7a59006725f7b817dce5b26d47c7f8c1c842d28275aa59955a06d2e467cffeba70b7e0576bb +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 10/185e20d20f10c8d661d59aac0f3b63b31132d492e1b11fcc2a93cb2c47257ebaee7407c38513efd2b35cafdf972d9beb2ea4593c1e0f3bf8f2744836928d7454 languageName: node linkType: hard -"punycode@npm:2.1.0": - version: 2.1.0 - resolution: "punycode@npm:2.1.0" - checksum: 10/012f9443fe56baf485db702d0d07cef7d89c0670ce1ac4da8fb8b5bd3677e42a8f5d2b35f595ffa31ba843661c9c6766f2feb1e1e3393e1ff1033120d0f94d60 +"function-loop@npm:^2.0.1": + version: 2.0.1 + resolution: "function-loop@npm:2.0.1" + checksum: 10/1f919e82733064bdbeeb91373d1ccf8410a119aa4003779955cefe6be67b9ebc0e20d52f405a728b488fda4064c55c5376aa8b2f0cc06c7e0dc820d5a8e1d28d languageName: node linkType: hard -"punycode@npm:^2.0.0, punycode@npm:^2.1.0, punycode@npm:^2.1.1": - version: 2.1.1 - resolution: "punycode@npm:2.1.1" - checksum: 10/939daa010c2cacebdb060c40ecb52fef0a739324a66f7fffe0f94353a1ee83e3b455e9032054c4a0c4977b0a28e27086f2171c392832b59a01bd948fd8e20914 +"function.prototype.name@npm:^1.1.5": + version: 1.1.5 + resolution: "function.prototype.name@npm:1.1.5" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.3" + es-abstract: "npm:^1.19.0" + functions-have-names: "npm:^1.2.2" + checksum: 10/5d426e5a38ac41747bcfce6191e0ec818ed18678c16cfc36b5d1ca87f56ff98c4ce958ee2c1ea2a18dc3da989844a37b1065311e2d2ae4cf12da8f82418b686b languageName: node linkType: hard -"pupa@npm:^2.1.1": - version: 2.1.1 - resolution: "pupa@npm:2.1.1" +"function.prototype.name@npm:^1.1.6": + version: 1.1.6 + resolution: "function.prototype.name@npm:1.1.6" dependencies: - escape-goat: "npm:^2.0.0" - checksum: 10/49529e50372ffdb0cccf0efa0f3b3cb0a2c77805d0d9cc2725bd2a0f6bb414631e61c93a38561b26be1259550b7bb6c2cb92315aa09c8bf93f3bdcb49f2b2fb7 + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + functions-have-names: "npm:^1.2.3" + checksum: 10/4d40be44d4609942e4e90c4fff77a811fa936f4985d92d2abfcf44f673ba344e2962bf223a33101f79c1a056465f36f09b072b9c289d7660ca554a12491cd5a2 languageName: node linkType: hard -"pure-rand@npm:^5.0.1": - version: 5.0.5 - resolution: "pure-rand@npm:5.0.5" - checksum: 10/89b9ca2d264f3111f4c2b6a9012ddc8908749e646a3c6ff8047317ea82d9c1fdbaf0b016ab5e7eb304490b5427e51a37141e0672c07dcf074ab19c6052cd9cc8 +"functions-have-names@npm:^1.2.2, functions-have-names@npm:^1.2.3": + version: 1.2.3 + resolution: "functions-have-names@npm:1.2.3" + checksum: 10/0ddfd3ed1066a55984aaecebf5419fbd9344a5c38dd120ffb0739fac4496758dcf371297440528b115e4367fc46e3abc86a2cc0ff44612181b175ae967a11a05 languageName: node linkType: hard -"pure-rand@npm:^6.0.0": - version: 6.0.2 - resolution: "pure-rand@npm:6.0.2" - checksum: 10/d33f92dbac58eba65e851046905379ddd32b0af11daa49187bf2b44c4da6e5685cdcd8775388a3c706c126dcdb19bdcc0f736a0c432de25d68d21a762ff5f572 +"gauge@npm:^3.0.0": + version: 3.0.2 + resolution: "gauge@npm:3.0.2" + dependencies: + aproba: "npm:^1.0.3 || ^2.0.0" + color-support: "npm:^1.1.2" + console-control-strings: "npm:^1.0.0" + has-unicode: "npm:^2.0.1" + object-assign: "npm:^4.1.1" + signal-exit: "npm:^3.0.0" + string-width: "npm:^4.2.3" + strip-ansi: "npm:^6.0.1" + wide-align: "npm:^1.1.2" + checksum: 10/46df086451672a5fecd58f7ec86da74542c795f8e00153fbef2884286ce0e86653c3eb23be2d0abb0c4a82b9b2a9dec3b09b6a1cf31c28085fa0376599a26589 languageName: node linkType: hard -"pvtsutils@npm:^1.3.2, pvtsutils@npm:^1.3.5": - version: 1.3.5 - resolution: "pvtsutils@npm:1.3.5" +"gauge@npm:^4.0.3": + version: 4.0.4 + resolution: "gauge@npm:4.0.4" dependencies: - tslib: "npm:^2.6.1" - checksum: 10/0a908edafe0e9db7ced6c0b86c897aaadd7389de73e54cc4aff1c8a887a623251bf43aedbc19f983336bffdd119959fa4e57eb544ca3ad5f6a30896a25c37fcc + aproba: "npm:^1.0.3 || ^2.0.0" + color-support: "npm:^1.1.3" + console-control-strings: "npm:^1.1.0" + has-unicode: "npm:^2.0.1" + signal-exit: "npm:^3.0.7" + string-width: "npm:^4.2.3" + strip-ansi: "npm:^6.0.1" + wide-align: "npm:^1.1.5" + checksum: 10/09535dd53b5ced6a34482b1fa9f3929efdeac02f9858569cde73cef3ed95050e0f3d095706c1689614059898924b7a74aa14042f51381a1ccc4ee5c29d2389c4 languageName: node linkType: hard -"pvutils@npm:^1.1.3": - version: 1.1.3 - resolution: "pvutils@npm:1.1.3" - checksum: 10/e5201b8f78ece68eae414a938c844bc45fb3f0de298178eed1775a217eedfd897c4346e5e54f410bb4d7466e09ceb262e85f20fd64239b8bb2595f14c52fa95e +"gensequence@npm:^7.0.0": + version: 7.0.0 + resolution: "gensequence@npm:7.0.0" + checksum: 10/22e404384349b17952e4102a3dd3a9476772a6fc8f05e36885b489406f710c1fe2ec3c0687a1da554ccd845ce1ab7e418a867d3a1b4cf86cda2f5a7ce4f33bc4 languageName: node linkType: hard -"q@npm:^1.1.2": - version: 1.5.1 - resolution: "q@npm:1.5.1" - checksum: 10/70c4a30b300277165cd855889cd3aa681929840a5940413297645c5691e00a3549a2a4153131efdf43fe8277ee8cf5a34c9636dcb649d83ad47f311a015fd380 +"gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: 10/17d8333460204fbf1f9160d067e1e77f908a5447febb49424b8ab043026049835c9ef3974445c57dbd39161f4d2b04356d7de12b2eecaa27a7a7ea7d871cbedd languageName: node linkType: hard -"qs@npm:6.10.3": - version: 6.10.3 - resolution: "qs@npm:6.10.3" +"get-amd-module-type@npm:^5.0.1": + version: 5.0.1 + resolution: "get-amd-module-type@npm:5.0.1" dependencies: - side-channel: "npm:^1.0.4" - checksum: 10/73d07bfd77f07bec3750dca5e6d165cba0c87ce3e4688bb26e5e462e725ab1289ecdb69164b0b4a4d1b913e2a3ae6b22acbb8b2feb5c8f31bd76f2380f3dc23d + ast-module-types: "npm:^5.0.0" + node-source-walk: "npm:^6.0.1" + checksum: 10/77b6a59b90c54fd2d8adb1555e3939462d7b97c617e74271bbcb8f9741ca6681e831216e9e45f4ab1ab1b249394b89d5c8d9e4afa1497c68d02698775cd2225e languageName: node linkType: hard -"qs@npm:6.11.0": - version: 6.11.0 - resolution: "qs@npm:6.11.0" - dependencies: - side-channel: "npm:^1.0.4" - checksum: 10/5a3bfea3e2f359ede1bfa5d2f0dbe54001aa55e40e27dc3e60fab814362d83a9b30758db057c2011b6f53a2d4e4e5150194b5bac45372652aecb3e3c0d4b256e +"get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 languageName: node linkType: hard -"qs@npm:6.13.0": - version: 6.13.0 - resolution: "qs@npm:6.13.0" - dependencies: - side-channel: "npm:^1.0.6" - checksum: 10/f548b376e685553d12e461409f0d6e5c59ec7c7d76f308e2a888fd9db3e0c5e89902bedd0754db3a9038eda5f27da2331a6f019c8517dc5e0a16b3c9a6e9cef8 +"get-east-asian-width@npm:^1.0.0": + version: 1.2.0 + resolution: "get-east-asian-width@npm:1.2.0" + checksum: 10/c9b280e7c7c67fb89fa17e867c4a9d1c9f1321aba2a9ee27bff37fb6ca9552bccda328c70a80c1f83a0e39ba1b7e3427e60f47823402d19e7a41b83417ec047a languageName: node linkType: hard -"qs@npm:^6.11.0, qs@npm:^6.9.4": - version: 6.11.2 - resolution: "qs@npm:6.11.2" +"get-intrinsic@npm:^1.0.2": + version: 1.1.2 + resolution: "get-intrinsic@npm:1.1.2" dependencies: - side-channel: "npm:^1.0.4" - checksum: 10/f2321d0796664d0f94e92447ccd3bdfd6b6f3a50b6b762aa79d7f5b1ea3a7a9f94063ba896b82bc2a877ed6a7426d4081e4f16568fdb04f0ee188cca9d8505b4 - languageName: node - linkType: hard - -"qs@npm:~6.5.2": - version: 6.5.3 - resolution: "qs@npm:6.5.3" - checksum: 10/485c990fba7ad17671e16c92715fb064c1600337738f5d140024eb33a49fbc1ed31890d3db850117c760caeb9c9cc9f4ba22a15c20dd119968e41e3d3fe60b28 + function-bind: "npm:^1.1.1" + has: "npm:^1.0.3" + has-symbols: "npm:^1.0.3" + checksum: 10/0364e4d4538486672d3125ca6e3e3ce30f1ac0eebfbaed1ffb27f588697a49b9d8ccf9e9fc30b915663942f5c24063cfd81008d13d02c9358f72b3c70b4c74f4 languageName: node linkType: hard -"query-string@npm:^5.0.1": - version: 5.1.1 - resolution: "query-string@npm:5.1.1" +"get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1": + version: 1.1.1 + resolution: "get-intrinsic@npm:1.1.1" dependencies: - decode-uri-component: "npm:^0.2.0" - object-assign: "npm:^4.1.0" - strict-uri-encode: "npm:^1.0.0" - checksum: 10/8834591ed02c324ac10397094c2ae84a3d3460477ef30acd5efe03b1afbf15102ccc0829ab78cc58ecb12f70afeb7a1f81e604487a9ad4859742bb14748e98cc + function-bind: "npm:^1.1.1" + has: "npm:^1.0.3" + has-symbols: "npm:^1.0.1" + checksum: 10/7143f5407b000473f4b62717a79628dc151aa622eadac682da0ea3d377fc45839b3ea203d0956d72f6cc8c1f6ae0dcd47fb4bd970647ba5234f9e11679f86cb5 languageName: node linkType: hard -"query-string@npm:^6.13.7": - version: 6.14.1 - resolution: "query-string@npm:6.14.1" +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0": + version: 1.2.0 + resolution: "get-intrinsic@npm:1.2.0" dependencies: - decode-uri-component: "npm:^0.2.0" - filter-obj: "npm:^1.1.0" - split-on-first: "npm:^1.0.0" - strict-uri-encode: "npm:^2.0.0" - checksum: 10/95f5a372f777b4fb5bdae5a2d85961cf3894d466cfc3a0cc799320d5ed633af935c0d96ee5d2b1652c02888e749831409ca5dd5eb388ce1014a9074024a22840 + function-bind: "npm:^1.1.1" + has: "npm:^1.0.3" + has-symbols: "npm:^1.0.3" + checksum: 10/f57c5fe67a96adace4f8e80c288728bcd0ccfdc82c9cc53e4a5ef1ec857b5f7ef4b1c289e39649b1df226bace81103630bf7e128c821f82cd603450036e54f97 languageName: node linkType: hard -"query-string@npm:^7.0.1": - version: 7.1.3 - resolution: "query-string@npm:7.1.3" +"get-intrinsic@npm:^1.2.1": + version: 1.2.1 + resolution: "get-intrinsic@npm:1.2.1" dependencies: - decode-uri-component: "npm:^0.2.2" - filter-obj: "npm:^1.1.0" - split-on-first: "npm:^1.0.0" - strict-uri-encode: "npm:^2.0.0" - checksum: 10/3b6f2c167e76ca4094c5f1a9eb276efcbb9ebfd8b1a28c413f3c4e4e7d6428c8187bf46c8cbc9f92a229369dd0015de10a7fd712c8cee98d5d84c2ac6140357e + function-bind: "npm:^1.1.1" + has: "npm:^1.0.3" + has-proto: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + checksum: 10/aee631852063f8ad0d4a374970694b5c17c2fb5c92bd1929476d7eb8798ce7aebafbf9a34022c05fd1adaa2ce846d5877a627ce1986f81fc65adf3b81824bd54 languageName: node linkType: hard -"querystring-es3@npm:^0.2.1": - version: 0.2.1 - resolution: "querystring-es3@npm:0.2.1" - checksum: 10/c99fccfe1a9c4c25ea6194fa7a559fdb83d2628f118f898af6f0ac02c4ffcd7e0576997bb80e7dfa892d193988b60e23d4968122426351819f87051862af991c +"get-intrinsic@npm:^1.2.2": + version: 1.2.2 + resolution: "get-intrinsic@npm:1.2.2" + dependencies: + function-bind: "npm:^1.1.2" + has-proto: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + hasown: "npm:^2.0.0" + checksum: 10/aa96db4f809734d26d49b59bc8669d73a0ae792da561514e987735573a1dfaede516cd102f217a078ea2b42d4c4fb1f83d487932cb15d49826b726cc9cd4470b languageName: node linkType: hard -"querystring@npm:0.2.0": - version: 0.2.0 - resolution: "querystring@npm:0.2.0" - checksum: 10/37b91720be8c8de87b49d1a68f0ceafbbeda6efe6334ce7aad080b0b4111f933a40650b8a6669c1bc629cd8bb37c67cb7b5a42ec0758662efbce44b8faa1766d +"get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": + version: 1.2.4 + resolution: "get-intrinsic@npm:1.2.4" + dependencies: + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + has-proto: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + hasown: "npm:^2.0.0" + checksum: 10/85bbf4b234c3940edf8a41f4ecbd4e25ce78e5e6ad4e24ca2f77037d983b9ef943fd72f00f3ee97a49ec622a506b67db49c36246150377efcda1c9eb03e5f06d languageName: node linkType: hard -"querystringify@npm:^2.1.1": - version: 2.2.0 - resolution: "querystringify@npm:2.2.0" - checksum: 10/46ab16f252fd892fc29d6af60966d338cdfeea68a231e9457631ffd22d67cec1e00141e0a5236a2eb16c0d7d74175d9ec1d6f963660c6f2b1c2fc85b194c5680 +"get-own-enumerable-property-symbols@npm:^3.0.0": + version: 3.0.2 + resolution: "get-own-enumerable-property-symbols@npm:3.0.2" + checksum: 10/8f0331f14159f939830884799f937343c8c0a2c330506094bc12cbee3665d88337fe97a4ea35c002cc2bdba0f5d9975ad7ec3abb925015cdf2a93e76d4759ede languageName: node linkType: hard -"queue-microtask@npm:^1.2.2, queue-microtask@npm:^1.2.3": - version: 1.2.3 - resolution: "queue-microtask@npm:1.2.3" - checksum: 10/72900df0616e473e824202113c3df6abae59150dfb73ed13273503127235320e9c8ca4aaaaccfd58cf417c6ca92a6e68ee9a5c3182886ae949a768639b388a7b +"get-package-type@npm:^0.1.0": + version: 0.1.0 + resolution: "get-package-type@npm:0.1.0" + checksum: 10/bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 languageName: node linkType: hard -"quick-format-unescaped@npm:^4.0.3": - version: 4.0.4 - resolution: "quick-format-unescaped@npm:4.0.4" - checksum: 10/591eca457509a99368b623db05248c1193aa3cedafc9a077d7acab09495db1231017ba3ad1b5386e5633271edd0a03b312d8640a59ee585b8516a42e15438aa7 +"get-stdin@npm:^5.0.1": + version: 5.0.1 + resolution: "get-stdin@npm:5.0.1" + checksum: 10/f9784638ad3e68a0a8bdc031aedf0fca749843cd134956fbd4f3bbac17c359e0fb9210343fcbed72ee79fb19d8e4c49b7a6e742cc5d44e94ac1405e9371d4b3e languageName: node linkType: hard -"quick-lru@npm:^4.0.1": - version: 4.0.1 - resolution: "quick-lru@npm:4.0.1" - checksum: 10/5c7c75f1c696750f619b165cc9957382f919e4207dabf04597a64f0298861391cdc5ee91a1dde1a5d460ecf7ee1af7fc36fef6d155bef2be66f05d43fd63d4f0 +"get-stdin@npm:^9.0.0": + version: 9.0.0 + resolution: "get-stdin@npm:9.0.0" + checksum: 10/5972bc34d05932b45512c8e2d67b040f1c1ca8afb95c56cbc480985f2d761b7e37fe90dc8abd22527f062cc5639a6930ff346e9952ae4c11a2d4275869459594 languageName: node linkType: hard -"quick-lru@npm:^5.1.1": - version: 5.1.1 - resolution: "quick-lru@npm:5.1.1" - checksum: 10/a516faa25574be7947969883e6068dbe4aa19e8ef8e8e0fd96cddd6d36485e9106d85c0041a27153286b0770b381328f4072aa40d3b18a19f5f7d2b78b94b5ed +"get-stream@npm:^4.1.0": + version: 4.1.0 + resolution: "get-stream@npm:4.1.0" + dependencies: + pump: "npm:^3.0.0" + checksum: 10/12673e8aebc79767d187b203e5bfabb8266304037815d3bcc63b6f8c67c6d4ad0d98d4d4528bcdc1cbea68f1dd91bcbd87827aa3cdcfa9c5fa4a4644716d72c2 languageName: node linkType: hard -"quote-unquote@npm:^1.0.0": - version: 1.0.0 - resolution: "quote-unquote@npm:1.0.0" - checksum: 10/955a2ead534f5b6a3f8d4dc5a4b95ac6468213d3fb11f8c1592a0a56345c45a3d14d5ca04d3de2bc9891493fcac38c03dfa91c48a6159aef50124e9c5afcea49 +"get-stream@npm:^5.1.0": + version: 5.2.0 + resolution: "get-stream@npm:5.2.0" + dependencies: + pump: "npm:^3.0.0" + checksum: 10/13a73148dca795e41421013da6e3ebff8ccb7fba4d2f023fd0c6da2c166ec4e789bec9774a73a7b49c08daf2cae552f8a3e914042ac23b5f59dd278cc8f9cbfb languageName: node linkType: hard -"race-signal@npm:^1.0.0": - version: 1.0.1 - resolution: "race-signal@npm:1.0.1" - checksum: 10/d872525af9228f198bf02cb8ecef222639aefe1e63af51c01b5b47aa936b1561556daa90b2503d98e030703873ffd9d5dba2525acfccc64b0abfd3a1fe1c0161 +"get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": + version: 6.0.1 + resolution: "get-stream@npm:6.0.1" + checksum: 10/781266d29725f35c59f1d214aedc92b0ae855800a980800e2923b3fbc4e56b3cb6e462c42e09a1cf1a00c64e056a78fa407cbe06c7c92b7e5cd49b4b85c2a497 languageName: node linkType: hard -"raf@npm:^3.4.1": - version: 3.4.1 - resolution: "raf@npm:3.4.1" - dependencies: - performance-now: "npm:^2.1.0" - checksum: 10/4c4b4c826b09d2aec6ca809f1a3c3c12136e7ec8d13fbb91f495dd2c99cd43345240e003da3bfd16036a432e635049fc6d9f69f9187f5f22ea88bb146ec75881 +"get-stream@npm:^8.0.1": + version: 8.0.1 + resolution: "get-stream@npm:8.0.1" + checksum: 10/dde5511e2e65a48e9af80fea64aff11b4921b14b6e874c6f8294c50975095af08f41bfb0b680c887f28b566dd6ec2cb2f960f9d36a323359be324ce98b766e9e languageName: node linkType: hard -"randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5, randombytes@npm:^2.1.0": - version: 2.1.0 - resolution: "randombytes@npm:2.1.0" +"get-stream@npm:^9.0.1": + version: 9.0.1 + resolution: "get-stream@npm:9.0.1" dependencies: - safe-buffer: "npm:^5.1.0" - checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc + "@sec-ant/readable-stream": "npm:^0.4.1" + is-stream: "npm:^4.0.1" + checksum: 10/ce56e6db6bcd29ca9027b0546af035c3e93dcd154ca456b54c298901eb0e5b2ce799c5d727341a100c99e14c523f267f1205f46f153f7b75b1f4da6d98a21c5e languageName: node linkType: hard -"randomfill@npm:^1.0.3": - version: 1.0.4 - resolution: "randomfill@npm:1.0.4" +"get-symbol-description@npm:^1.0.0": + version: 1.0.0 + resolution: "get-symbol-description@npm:1.0.0" dependencies: - randombytes: "npm:^2.0.5" - safe-buffer: "npm:^5.1.0" - checksum: 10/33734bb578a868d29ee1b8555e21a36711db084065d94e019a6d03caa67debef8d6a1bfd06a2b597e32901ddc761ab483a85393f0d9a75838f1912461d4dbfc7 + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.1.1" + checksum: 10/7e5f298afe0f0872747dce4a949ce490ebc5d6dd6aefbbe5044543711c9b19a4dfaebdbc627aee99e1299d58a435b2fbfa083458c1d58be6dc03a3bada24d359 languageName: node linkType: hard -"range-parser@npm:^1.2.0, range-parser@npm:^1.2.1, range-parser@npm:~1.2.1": - version: 1.2.1 - resolution: "range-parser@npm:1.2.1" - checksum: 10/ce21ef2a2dd40506893157970dc76e835c78cf56437e26e19189c48d5291e7279314477b06ac38abd6a401b661a6840f7b03bd0b1249da9b691deeaa15872c26 +"get-symbol-description@npm:^1.0.2": + version: 1.0.2 + resolution: "get-symbol-description@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.5" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" + checksum: 10/e1cb53bc211f9dbe9691a4f97a46837a553c4e7caadd0488dc24ac694db8a390b93edd412b48dcdd0b4bbb4c595de1709effc75fc87c0839deedc6968f5bd973 languageName: node linkType: hard -"raw-body@npm:2.5.1": - version: 2.5.1 - resolution: "raw-body@npm:2.5.1" +"get-tsconfig@npm:^4.7.5": + version: 4.7.5 + resolution: "get-tsconfig@npm:4.7.5" dependencies: - bytes: "npm:3.1.2" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 10/280bedc12db3490ecd06f740bdcf66093a07535374b51331242382c0e130bb273ebb611b7bc4cba1b4b4e016cc7b1f4b05a6df885a6af39c2bc3b94c02291c84 + resolve-pkg-maps: "npm:^1.0.0" + checksum: 10/de7de5e4978354e8e6d9985baf40ea32f908a13560f793bc989930c229cc8d5c3f7b6b2896d8e43eb1a9b4e9e30018ef4b506752fd2a4b4d0dfee4af6841b119 languageName: node linkType: hard -"raw-body@npm:2.5.2": - version: 2.5.2 - resolution: "raw-body@npm:2.5.2" - dependencies: - bytes: "npm:3.1.2" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 10/863b5171e140546a4d99f349b720abac4410338e23df5e409cfcc3752538c9caf947ce382c89129ba976f71894bd38b5806c774edac35ebf168d02aa1ac11a95 +"git-hooks-list@npm:1.0.3": + version: 1.0.3 + resolution: "git-hooks-list@npm:1.0.3" + checksum: 10/a1dd03d39c1d727ba08a35dbdbdcc6e96de8c4170c942dc95bf787ca6e34998d39fb5295a00242b58a3d265de0b69a0686d0cf583baa6b7830f268542c4576b9 languageName: node linkType: hard -"raw-body@npm:^2.3.0, raw-body@npm:^2.4.1": - version: 2.5.0 - resolution: "raw-body@npm:2.5.0" +"git-raw-commits@npm:^2.0.11": + version: 2.0.11 + resolution: "git-raw-commits@npm:2.0.11" dependencies: - bytes: "npm:3.1.2" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 10/69be6cc3a29241aa70c1e00a9e82388054abe6686d3d4e0d82759c9402ee818095d37be478c0d5034a2d12f7d91342062767d7169da7a7f4b24a954b99ff493d + dargs: "npm:^7.0.0" + lodash: "npm:^4.17.15" + meow: "npm:^8.0.0" + split2: "npm:^3.0.0" + through2: "npm:^4.0.0" + bin: + git-raw-commits: cli.js + checksum: 10/04e02b3da7c0e13a55f3e6fa8c1c5f06f7d0d641a9f90d896393ef0144bfcf91aa59beede68d14d61ed56aaf09f2c8dba175563c47ec000a8cf70f9df4877577 languageName: node linkType: hard -"rc@npm:^1.2.7, rc@npm:^1.2.8": - version: 1.2.8 - resolution: "rc@npm:1.2.8" +"git-raw-commits@npm:^4.0.0": + version: 4.0.0 + resolution: "git-raw-commits@npm:4.0.0" dependencies: - deep-extend: "npm:^0.6.0" - ini: "npm:~1.3.0" - minimist: "npm:^1.2.0" - strip-json-comments: "npm:~2.0.1" + dargs: "npm:^8.0.0" + meow: "npm:^12.0.1" + split2: "npm:^4.0.0" bin: - rc: ./cli.js - checksum: 10/5c4d72ae7eec44357171585938c85ce066da8ca79146b5635baf3d55d74584c92575fa4e2c9eac03efbed3b46a0b2e7c30634c012b4b4fa40d654353d3c163eb + git-raw-commits: cli.mjs + checksum: 10/95546f4afcb33cf00ff638f7fec55ad61d4d927447737900e1f6fcbbdbb341b3f150908424cc62acb6d9faaea6f1e8f55d0697b899f0589af9d2733afb20abfb languageName: node linkType: hard -"react-apexcharts@npm:1.4.1": - version: 1.4.1 - resolution: "react-apexcharts@npm:1.4.1" +"git-semver-tags@npm:^7.0.0": + version: 7.0.1 + resolution: "git-semver-tags@npm:7.0.1" dependencies: - prop-types: "npm:^15.8.1" - peerDependencies: - apexcharts: ^3.41.0 - react: ">=0.13" - checksum: 10/0f0963ad31b5fc30b094f7b44536f6d3a95dc3453276589d39195f43c233ec983843b94066d53b3ef3a3bff43465453291567c3d4b9eaa54d66f28badf8c0e4c + meow: "npm:^12.0.1" + semver: "npm:^7.5.2" + bin: + git-semver-tags: cli.mjs + checksum: 10/07b8a352bd28ad7678a2e12c91b11b5e53aff017420497bbb1cba0645e609f58d0a7d02d5f2ea6c7cd3019d7631ce7737f64cc90c47d944753c6bd2a36c03211 languageName: node linkType: hard -"react-app-polyfill@npm:^3.0.0": - version: 3.0.0 - resolution: "react-app-polyfill@npm:3.0.0" +"git-up@npm:^7.0.0": + version: 7.0.0 + resolution: "git-up@npm:7.0.0" dependencies: - core-js: "npm:^3.19.2" - object-assign: "npm:^4.1.1" - promise: "npm:^8.1.0" - raf: "npm:^3.4.1" - regenerator-runtime: "npm:^0.13.9" - whatwg-fetch: "npm:^3.6.2" - checksum: 10/c544a1d9f5b3e4df1f51a01ceaa21d1350016520d0caf67549239ce112ea00b6014612f756e576609b986abe6eca1bb4f2625608bb9ae4501b74ca4398874be3 + is-ssh: "npm:^1.4.0" + parse-url: "npm:^8.1.0" + checksum: 10/003ef38424702ac4cbe6d2817ccfb5811251244c955a8011ca40298d12cf1fb6529529f074d5832b5221e193ec05f4742ecf7806e6c4f41a81a2f2cff65d6bf4 languageName: node linkType: hard -"react-dev-utils@npm:^12.0.1": - version: 12.0.1 - resolution: "react-dev-utils@npm:12.0.1" +"git-url-parse@npm:^14.0.0": + version: 14.0.0 + resolution: "git-url-parse@npm:14.0.0" dependencies: - "@babel/code-frame": "npm:^7.16.0" - address: "npm:^1.1.2" - browserslist: "npm:^4.18.1" - chalk: "npm:^4.1.2" - cross-spawn: "npm:^7.0.3" - detect-port-alt: "npm:^1.1.6" - escape-string-regexp: "npm:^4.0.0" - filesize: "npm:^8.0.6" - find-up: "npm:^5.0.0" - fork-ts-checker-webpack-plugin: "npm:^6.5.0" - global-modules: "npm:^2.0.0" - globby: "npm:^11.0.4" - gzip-size: "npm:^6.0.0" - immer: "npm:^9.0.7" - is-root: "npm:^2.1.0" - loader-utils: "npm:^3.2.0" - open: "npm:^8.4.0" - pkg-up: "npm:^3.1.0" - prompts: "npm:^2.4.2" - react-error-overlay: "npm:^6.0.11" - recursive-readdir: "npm:^2.2.2" - shell-quote: "npm:^1.7.3" - strip-ansi: "npm:^6.0.1" - text-table: "npm:^0.2.0" - checksum: 10/4f6e04a3c4c6bc041bb85586646cff5e611049dd91f505e73cec47e284a854f28a25a4f50ff24b46e7df051b2a82c387870c8e08da232edbbbb36c01d4e94a2b + git-up: "npm:^7.0.0" + checksum: 10/c19430947895676c59ce472d534c88e5d2d9f443e6b6e4deaa8ad9ad921ded6c27a996b219503775c37fbb90f4a3c02a5f106f14b61286386f9e5098dff7d634 languageName: node linkType: hard -"react-devtools-core@npm:^4.19.1": - version: 4.28.5 - resolution: "react-devtools-core@npm:4.28.5" +"glob-parent@npm:>=5.1.2": + version: 6.0.2 + resolution: "glob-parent@npm:6.0.2" dependencies: - shell-quote: "npm:^1.6.1" - ws: "npm:^7" - checksum: 10/7c951a6a9b773e4fd56b2f1894c83aaec417373cf01aa261bd2dd286e6c6f1d8c67a3749ecb1d106dbf9e8cda0e6ed1bfd6ce1b61c81e035f2527be3dd9eebc2 + is-glob: "npm:^4.0.3" + checksum: 10/c13ee97978bef4f55106b71e66428eb1512e71a7466ba49025fc2aec59a5bfb0954d5abd58fc5ee6c9b076eef4e1f6d3375c2e964b88466ca390da4419a786a8 languageName: node linkType: hard -"react-dom@npm:18.2.0, react-dom@npm:^18.2.0": - version: 18.2.0 - resolution: "react-dom@npm:18.2.0" - dependencies: - loose-envify: "npm:^1.1.0" - scheduler: "npm:^0.23.0" - peerDependencies: - react: ^18.2.0 - checksum: 10/ca5e7762ec8c17a472a3605b6f111895c9f87ac7d43a610ab7024f68cd833d08eda0625ce02ec7178cc1f3c957cf0b9273cdc17aa2cd02da87544331c43b1d21 +"glob-to-regexp@npm:^0.4.1": + version: 0.4.1 + resolution: "glob-to-regexp@npm:0.4.1" + checksum: 10/9009529195a955c40d7b9690794aeff5ba665cc38f1519e111c58bb54366fd0c106bde80acf97ba4e533208eb53422c83b136611a54c5fefb1edd8dc267cb62e languageName: node linkType: hard -"react-error-overlay@npm:^6.0.11": - version: 6.0.11 - resolution: "react-error-overlay@npm:6.0.11" - checksum: 10/b4ac746fc4fb50da733768aadbc638d34dd56d4e46ed4b2f2d1ac54dced0c5fa5fe47ebbbf90810ada44056ed0713bba5b9b930b69f4e45466e7f59fc806c44e +"glob@npm:7.1.6": + version: 7.1.6 + resolution: "glob@npm:7.1.6" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.0.4" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/7d6ec98bc746980d5fe4d764b9c7ada727e3fbd2a7d85cd96dd95fb18638c9c54a70c692fd2ab5d68a186dc8cd9d6a4192d3df220beed891f687db179c430237 languageName: node linkType: hard -"react-is@npm:^16.13.1, react-is@npm:^16.7.0": - version: 16.13.1 - resolution: "react-is@npm:16.13.1" - checksum: 10/5aa564a1cde7d391ac980bedee21202fc90bdea3b399952117f54fb71a932af1e5902020144fb354b4690b2414a0c7aafe798eb617b76a3d441d956db7726fdf +"glob@npm:^10.2.2": + version: 10.3.4 + resolution: "glob@npm:10.3.4" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^2.0.3" + minimatch: "npm:^9.0.1" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + path-scurry: "npm:^1.10.1" + bin: + glob: dist/cjs/src/bin.js + checksum: 10/6375721bcd0c615fe4c1d61faaf9eb93e15d428f26bac6e85739221a84659b42601b2a085b20915142c0eb3d8a7155914884ff80f145d8c9f2397c8b771b8b60 languageName: node linkType: hard -"react-is@npm:^17.0.1": - version: 17.0.2 - resolution: "react-is@npm:17.0.2" - checksum: 10/73b36281e58eeb27c9cc6031301b6ae19ecdc9f18ae2d518bdb39b0ac564e65c5779405d623f1df9abf378a13858b79442480244bd579968afc1faf9a2ce5e05 +"glob@npm:^10.3.10": + version: 10.3.10 + resolution: "glob@npm:10.3.10" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^2.3.5" + minimatch: "npm:^9.0.1" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + path-scurry: "npm:^1.10.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10/38bdb2c9ce75eb5ed168f309d4ed05b0798f640b637034800a6bf306f39d35409bf278b0eaaffaec07591085d3acb7184a201eae791468f0f617771c2486a6a8 languageName: node linkType: hard -"react-is@npm:^18.0.0": - version: 18.1.0 - resolution: "react-is@npm:18.1.0" - checksum: 10/fe09c86d5e12a8531bf3e748660f3dffbe900a6da0b488c7efaf0a866e16b74ecc1b0011b0960b13594f8719f39f87a987c0c85edff0b2d3e2f14b87e7230ad2 +"glob@npm:^10.4.2": + version: 10.4.2 + resolution: "glob@npm:10.4.2" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10/e412776b5952a818eba790c830bea161c9a56813fd767d8c4c49f855603b1fb962b3e73f1f627a47298a57d2992b9f0f2fe15cf93e74ecaaa63fb45d63fdd090 languageName: node linkType: hard -"react-is@npm:^18.2.0": - version: 18.2.0 - resolution: "react-is@npm:18.2.0" - checksum: 10/200cd65bf2e0be7ba6055f647091b725a45dd2a6abef03bf2380ce701fd5edccee40b49b9d15edab7ac08a762bf83cb4081e31ec2673a5bfb549a36ba21570df +"glob@npm:^7.0.5, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.0.4" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/bc78b6ea0735b6e23d20678aba4ae6a4760e8c9527e3c4683ac25b14e70f55f9531245dcf25959b70cbc4aa3dcce1fc37ab65fd026a4cbd70aa3a44880bd396b languageName: node linkType: hard -"react-native-fetch-api@npm:^3.0.0": - version: 3.0.0 - resolution: "react-native-fetch-api@npm:3.0.0" +"glob@npm:^7.2.3": + version: 7.2.3 + resolution: "glob@npm:7.2.3" dependencies: - p-defer: "npm:^3.0.0" - checksum: 10/e1e612d402615b439eb996b1fcc677944841a3ae51a31a2b0527e03a8e3afe00c0504ade4e88de0a36f6d11df45b2a543224e7f845c5763e68f585b1108937e7 + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/59452a9202c81d4508a43b8af7082ca5c76452b9fcc4a9ab17655822e6ce9b21d4f8fbadabe4fe3faef448294cec249af305e2cd824b7e9aaf689240e5e96a7b languageName: node linkType: hard -"react-native-securerandom@npm:^0.1.1": - version: 0.1.1 - resolution: "react-native-securerandom@npm:0.1.1" +"glob@npm:^9.3.1": + version: 9.3.4 + resolution: "glob@npm:9.3.4" dependencies: - base64-js: "npm:*" - peerDependencies: - react-native: "*" - checksum: 10/8f083fcc7d98abd7588870de48878e7b551af83353566c6200ed6508c40065745f85cf9a445318f05d9159895bdef5524a9311893960ae5845bf1b27f5dd1af5 + fs.realpath: "npm:^1.0.0" + minimatch: "npm:^8.0.2" + minipass: "npm:^4.2.4" + path-scurry: "npm:^1.6.1" + checksum: 10/6943df605ece77a1669145306500fb1421c51bf66b23a40e79dab676532d0954fa49256142ed7d47fd043dd97bb1841e1be475752b483d64448ccd913f25f928 languageName: node linkType: hard -"react-reconciler@npm:^0.26.2": - version: 0.26.2 - resolution: "react-reconciler@npm:0.26.2" +"global-directory@npm:^4.0.1": + version: 4.0.1 + resolution: "global-directory@npm:4.0.1" dependencies: - loose-envify: "npm:^1.1.0" - object-assign: "npm:^4.1.1" - scheduler: "npm:^0.20.2" - peerDependencies: - react: ^17.0.2 - checksum: 10/7b9369a12e57859088aaef052abe03138ad8eefe67308bf8be6ef8f529be06276dc4977a4d665dc9b9e08188bd308b2a0d58dc181253c0205c98e03d7c0901b7 + ini: "npm:4.1.1" + checksum: 10/5b4df24438a4e5f21e43fbdd9e54f5e12bb48dce01a0a83b415d8052ce91be2d3a97e0c8f98a535e69649b2190036155e9f0f7d3c62f9318f31bdc3fd4f235f5 languageName: node linkType: hard -"react-refresh@npm:^0.11.0": - version: 0.11.0 - resolution: "react-refresh@npm:0.11.0" - checksum: 10/1275699e2edc39dbced9bdb00e2e167e3a2868e0c8ae117ba9551556368cfe70453068e5209240d827122aad5504a64c59a24b9b9a2a0ab932472c8750203ea3 +"global-dirs@npm:^0.1.1": + version: 0.1.1 + resolution: "global-dirs@npm:0.1.1" + dependencies: + ini: "npm:^1.3.4" + checksum: 10/10624f5a8ddb8634c22804c6b24f93fb591c3639a6bc78e3584e01a238fc6f7b7965824184e57d63f6df36980b6c191484ad7bc6c35a1599b8f1d64be64c2a4a languageName: node linkType: hard -"react-refresh@npm:^0.14.0": - version: 0.14.0 - resolution: "react-refresh@npm:0.14.0" - checksum: 10/75941262ce3ed4fc79b52492943fd59692f29b84f30f3822713b7e920f28e85c62a4386f85cbfbaea95ed62d3e74209f0a0bb065904b7ab2f166a74ac3812e2a +"global-dirs@npm:^3.0.0": + version: 3.0.0 + resolution: "global-dirs@npm:3.0.0" + dependencies: + ini: "npm:2.0.0" + checksum: 10/953c17cf14bf6ee0e2100ae82a0d779934eed8a3ec5c94a7a4f37c5b3b592c31ea015fb9a15cf32484de13c79f4a814f3015152f3e1d65976cfbe47c1bfe4a88 languageName: node linkType: hard -"react-router-dom@npm:6.21.3": - version: 6.21.3 - resolution: "react-router-dom@npm:6.21.3" +"global-modules@npm:^1.0.0": + version: 1.0.0 + resolution: "global-modules@npm:1.0.0" dependencies: - "@remix-run/router": "npm:1.14.2" - react-router: "npm:6.21.3" - peerDependencies: - react: ">=16.8" - react-dom: ">=16.8" - checksum: 10/6e23e35d02e5c83847c8e47d7912d1f6c2c42a35f2317802031bdd993a8205468138a045ff34f67fe807fe9f7dc9d0995ee05bab25aedc0bf978e620ac132815 + global-prefix: "npm:^1.0.1" + is-windows: "npm:^1.0.1" + resolve-dir: "npm:^1.0.0" + checksum: 10/e4031a01c0c7401349bb69e1499c7268d636552b16374c0002d677c7a6185da6782a2927a7a3a7c046eb7be97cd26b3c7b1b736f9818ecc7ac09e9d61449065e languageName: node linkType: hard -"react-router@npm:6.21.3": - version: 6.21.3 - resolution: "react-router@npm:6.21.3" +"global-prefix@npm:^1.0.1": + version: 1.0.2 + resolution: "global-prefix@npm:1.0.2" dependencies: - "@remix-run/router": "npm:1.14.2" - peerDependencies: - react: ">=16.8" - checksum: 10/3d5107cfdb440519d84e6ad6d95454e3bf41ec97677b95f7b2a7f281f8ddf191b765cf1b599ead951f3cd33ed4429f140590d74a01cfdf835dc2f812023a978a + expand-tilde: "npm:^2.0.2" + homedir-polyfill: "npm:^1.0.1" + ini: "npm:^1.3.4" + is-windows: "npm:^1.0.1" + which: "npm:^1.2.14" + checksum: 10/68cf78f81cd85310095ca1f0ec22dd5f43a1059646b2c7b3fc4a7c9ce744356e66ca833adda4e5753e38021847aaec393a159a029ba2d257c08ccb3f00ca2899 languageName: node linkType: hard -"react-scripts@npm:5.0.1": - version: 5.0.1 - resolution: "react-scripts@npm:5.0.1" - dependencies: - "@babel/core": "npm:^7.16.0" - "@pmmmwh/react-refresh-webpack-plugin": "npm:^0.5.3" - "@svgr/webpack": "npm:^5.5.0" - babel-jest: "npm:^27.4.2" - babel-loader: "npm:^8.2.3" - babel-plugin-named-asset-import: "npm:^0.3.8" - babel-preset-react-app: "npm:^10.0.1" - bfj: "npm:^7.0.2" - browserslist: "npm:^4.18.1" - camelcase: "npm:^6.2.1" - case-sensitive-paths-webpack-plugin: "npm:^2.4.0" - css-loader: "npm:^6.5.1" - css-minimizer-webpack-plugin: "npm:^3.2.0" - dotenv: "npm:^10.0.0" - dotenv-expand: "npm:^5.1.0" - eslint: "npm:^8.3.0" - eslint-config-react-app: "npm:^7.0.1" - eslint-webpack-plugin: "npm:^3.1.1" - file-loader: "npm:^6.2.0" - fs-extra: "npm:^10.0.0" - fsevents: "npm:^2.3.2" - html-webpack-plugin: "npm:^5.5.0" - identity-obj-proxy: "npm:^3.0.0" - jest: "npm:^27.4.3" - jest-resolve: "npm:^27.4.2" - jest-watch-typeahead: "npm:^1.0.0" - mini-css-extract-plugin: "npm:^2.4.5" - postcss: "npm:^8.4.4" - postcss-flexbugs-fixes: "npm:^5.0.2" - postcss-loader: "npm:^6.2.1" - postcss-normalize: "npm:^10.0.1" - postcss-preset-env: "npm:^7.0.1" - prompts: "npm:^2.4.2" - react-app-polyfill: "npm:^3.0.0" - react-dev-utils: "npm:^12.0.1" - react-refresh: "npm:^0.11.0" - resolve: "npm:^1.20.0" - resolve-url-loader: "npm:^4.0.0" - sass-loader: "npm:^12.3.0" - semver: "npm:^7.3.5" - source-map-loader: "npm:^3.0.0" - style-loader: "npm:^3.3.1" - tailwindcss: "npm:^3.0.2" - terser-webpack-plugin: "npm:^5.2.5" - webpack: "npm:^5.64.4" - webpack-dev-server: "npm:^4.6.0" - webpack-manifest-plugin: "npm:^4.0.2" - workbox-webpack-plugin: "npm:^6.4.1" - peerDependencies: - react: ">= 16" - typescript: ^3.2.1 || ^4 - dependenciesMeta: - fsevents: - optional: true - peerDependenciesMeta: - typescript: - optional: true - bin: - react-scripts: bin/react-scripts.js - checksum: 10/1727f9b4606bedefd8e36c754b44181842ce81b9b6e961bcd21e8de44d5848fb5fa30790f4c45e5085f2365c7a37bff637fccc1b20096dc5cdd625d085fc117e +"globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 languageName: node linkType: hard -"react-transition-group@npm:^4.4.5": - version: 4.4.5 - resolution: "react-transition-group@npm:4.4.5" +"globals@npm:^13.19.0": + version: 13.21.0 + resolution: "globals@npm:13.21.0" dependencies: - "@babel/runtime": "npm:^7.5.5" - dom-helpers: "npm:^5.0.1" - loose-envify: "npm:^1.4.0" - prop-types: "npm:^15.6.2" - peerDependencies: - react: ">=16.6.0" - react-dom: ">=16.6.0" - checksum: 10/ca32d3fd2168c976c5d90a317f25d5f5cd723608b415fb3b9006f9d793c8965c619562d0884503a3e44e4b06efbca4fdd1520f30e58ca3e00a0890e637d55419 + type-fest: "npm:^0.20.2" + checksum: 10/98ce947dc413e6c8feed236f980dee4bc8d9f4b29790e27bccb277d385fac5d77146e1f9c244c6609aca1d109101642e663caf88c0ba6bff0b069ea82d571441 languageName: node linkType: hard -"react@npm:18.2.0, react@npm:^18.2.0": - version: 18.2.0 - resolution: "react@npm:18.2.0" +"globalthis@npm:^1.0.3": + version: 1.0.3 + resolution: "globalthis@npm:1.0.3" dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10/b9214a9bd79e99d08de55f8bef2b7fc8c39630be97c4e29d7be173d14a9a10670b5325e94485f74cd8bff4966ef3c78ee53c79a7b0b9b70cba20aa8973acc694 + define-properties: "npm:^1.1.3" + checksum: 10/45ae2f3b40a186600d0368f2a880ae257e8278b4c7704f0417d6024105ad7f7a393661c5c2fa1334669cd485ea44bc883a08fdd4516df2428aec40c99f52aa89 languageName: node linkType: hard -"react@npm:^17.0.2": - version: 17.0.2 - resolution: "react@npm:17.0.2" +"globby@npm:10.0.0": + version: 10.0.0 + resolution: "globby@npm:10.0.0" dependencies: - loose-envify: "npm:^1.1.0" - object-assign: "npm:^4.1.1" - checksum: 10/ece60c31c1d266d132783aaaffa185d2e4c9b4db144f853933ec690cee1e0600c8929a1dd0a9e79323eea8e2df636c9a06d40f6cfdc9f797f65225433e67f707 + "@types/glob": "npm:^7.1.1" + array-union: "npm:^2.1.0" + dir-glob: "npm:^3.0.1" + fast-glob: "npm:^3.0.3" + glob: "npm:^7.1.3" + ignore: "npm:^5.1.1" + merge2: "npm:^1.2.3" + slash: "npm:^3.0.0" + checksum: 10/d0c94128706b5e12a251ddbd1b87cf0e67e57e373c816f242bb7a4a2fbe931602db1a330780d511a5bce675c25fac297622ac01d540c8479cca9c8177528947a languageName: node linkType: hard -"read-cache@npm:^1.0.0": - version: 1.0.0 - resolution: "read-cache@npm:1.0.0" +"globby@npm:12.2.0": + version: 12.2.0 + resolution: "globby@npm:12.2.0" dependencies: - pify: "npm:^2.3.0" - checksum: 10/83a39149d9dfa38f0c482ea0d77b34773c92fef07fe7599cdd914d255b14d0453e0229ef6379d8d27d6947f42d7581635296d0cfa7708f05a9bd8e789d398b31 + array-union: "npm:^3.0.1" + dir-glob: "npm:^3.0.1" + fast-glob: "npm:^3.2.7" + ignore: "npm:^5.1.9" + merge2: "npm:^1.4.1" + slash: "npm:^4.0.0" + checksum: 10/894e05b2eaec0ba7cdad1e459061078f9973768927f5aa28bbc81f967af92bfa7726c3f38fbb09de51905beebf5e8670d6b990b480e897845f770d9c42ac3556 languageName: node linkType: hard -"read-cmd-shim@npm:^4.0.0": - version: 4.0.0 - resolution: "read-cmd-shim@npm:4.0.0" - checksum: 10/69a83acf0a3e2357762d5944a6f4a3f3c5527d0f9fe8a5c9362225aaf702ccfa580ff3bc0b84809c99e88861a5e5be147629717f02ff9befdac68fca1ccc7664 +"globby@npm:^11.1.0": + version: 11.1.0 + resolution: "globby@npm:11.1.0" + dependencies: + array-union: "npm:^2.1.0" + dir-glob: "npm:^3.0.1" + fast-glob: "npm:^3.2.9" + ignore: "npm:^5.2.0" + merge2: "npm:^1.4.1" + slash: "npm:^3.0.0" + checksum: 10/288e95e310227bbe037076ea81b7c2598ccbc3122d87abc6dab39e1eec309aa14f0e366a98cdc45237ffcfcbad3db597778c0068217dcb1950fef6249104e1b1 languageName: node linkType: hard -"read-package-json-fast@npm:^3.0.0, read-package-json-fast@npm:^3.0.2": - version: 3.0.2 - resolution: "read-package-json-fast@npm:3.0.2" +"globby@npm:^13.1.1": + version: 13.1.1 + resolution: "globby@npm:13.1.1" dependencies: - json-parse-even-better-errors: "npm:^3.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - checksum: 10/8d406869f045f1d76e2a99865a8fd1c1af9c1dc06200b94d2b07eef87ed734b22703a8d72e1cd36ea36cc48e22020bdd187f88243c7dd0563f72114d38c17072 + dir-glob: "npm:^3.0.1" + fast-glob: "npm:^3.2.11" + ignore: "npm:^5.2.0" + merge2: "npm:^1.4.1" + slash: "npm:^4.0.0" + checksum: 10/cbf1a949aa5543c52ef00054ec29582bacdb2639eda79993da83fc8ac4f51d94c90018cd3ee50b22b76d357575c75bb9a9746ab010b8e0dd0f2bab7544154538 languageName: node linkType: hard -"read-package-json@npm:^6.0.0": - version: 6.0.1 - resolution: "read-package-json@npm:6.0.1" +"globby@npm:^13.1.2": + version: 13.2.2 + resolution: "globby@npm:13.2.2" dependencies: - glob: "npm:^9.3.0" - json-parse-even-better-errors: "npm:^3.0.0" - normalize-package-data: "npm:^5.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - checksum: 10/a583eedfc708d4492af2f6b817b9bdcc252e8aac5169bd4a7c5950cb3bd4af7f360d67d7d7bea8638a44d0188eab40ff7b7ef0b3a63b91e6039a0719b82c531e + dir-glob: "npm:^3.0.1" + fast-glob: "npm:^3.3.0" + ignore: "npm:^5.2.4" + merge2: "npm:^1.4.1" + slash: "npm:^4.0.0" + checksum: 10/4494a9d2162a7e4d327988b26be66d8eab87d7f59a83219e74b065e2c3ced23698f68fb10482bf9337133819281803fb886d6ae06afbb2affa743623eb0b1949 languageName: node linkType: hard -"read-package-json@npm:^7.0.0": - version: 7.0.1 - resolution: "read-package-json@npm:7.0.1" +"globby@npm:^14.0.2": + version: 14.0.2 + resolution: "globby@npm:14.0.2" dependencies: - glob: "npm:^10.2.2" - json-parse-even-better-errors: "npm:^3.0.0" - normalize-package-data: "npm:^6.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - checksum: 10/4b5684f4ee96ff29d0ec62452d2b1ed2b3fb7e452cd1a1f40869d896082816a231a1e157fa3e72137e140ca961cbe7eeabc952658fc38235c85b202c91f2e584 + "@sindresorhus/merge-streams": "npm:^2.1.0" + fast-glob: "npm:^3.3.2" + ignore: "npm:^5.2.4" + path-type: "npm:^5.0.0" + slash: "npm:^5.1.0" + unicorn-magic: "npm:^0.1.0" + checksum: 10/67660da70fc1223f7170c1a62ba6c373385e9e39765d952b6518606dec15ed8c7958e9dae6ba5752a31dbc1e9126f146938b830ad680fe794141734ffc3fbb75 languageName: node linkType: hard -"read-pkg-up@npm:^1.0.1": - version: 1.0.1 - resolution: "read-pkg-up@npm:1.0.1" +"gonzales-pe@npm:^4.3.0": + version: 4.3.0 + resolution: "gonzales-pe@npm:4.3.0" dependencies: - find-up: "npm:^1.0.0" - read-pkg: "npm:^1.0.0" - checksum: 10/d18399a0f46e2da32beb2f041edd0cda49d2f2cc30195a05c759ef3ed9b5e6e19ba1ad1bae2362bdec8c6a9f2c3d18f4d5e8c369e808b03d498d5781cb9122c7 + minimist: "npm:^1.2.5" + bin: + gonzales: bin/gonzales.js + checksum: 10/d1676546bcaa4cb1c6c1fc5de5d62e85960665a13a4c489b02baeb58a10c53a249beef05ceaf21ea801813a559ff17d7b61158aa417211c135bcb8bdcb1701ca languageName: node linkType: hard -"read-pkg-up@npm:^10.0.0": - version: 10.1.0 - resolution: "read-pkg-up@npm:10.1.0" - dependencies: - find-up: "npm:^6.3.0" - read-pkg: "npm:^8.1.0" - type-fest: "npm:^4.2.0" - checksum: 10/554470d7ff54026b561f6c851c35470f5bc95a47bfb8645dc13c447d83c42c78b42d47fffdc8f86bffe731215406dab498f75cb27494e1fb3eca7fa8d00fb501 +"google-protobuf@npm:3.15.8": + version: 3.15.8 + resolution: "google-protobuf@npm:3.15.8" + checksum: 10/0b1ea24a552e0870b658b975ce5090c13f35793dc4ff8a733ad9c27990126eb9bd375fa9d3204af4f634930ae358d8b5e78f9f4cdb1f700e35b4d857f0aac742 languageName: node linkType: hard -"read-pkg-up@npm:^4.0.0": - version: 4.0.0 - resolution: "read-pkg-up@npm:4.0.0" - dependencies: - find-up: "npm:^3.0.0" - read-pkg: "npm:^3.0.0" - checksum: 10/dd867d9a912707bc11340aebc91780be9f36f34ee1d27a5dafb8520e0cb6344138b80eb8bf8325bebf519d26ecf14cbf6190d9e5f765f0120da5ede4013f4d13 +"google-protobuf@npm:3.21.4": + version: 3.21.4 + resolution: "google-protobuf@npm:3.21.4" + checksum: 10/0d87fe8ef221d105cbaa808f4024bd577638524d8e461469e3733f2e4933391ad4da86b7fcbd11e8781bee04eacf2e8ba19aaacd5f9deb336a220485841d980f languageName: node linkType: hard -"read-pkg-up@npm:^7.0.1": - version: 7.0.1 - resolution: "read-pkg-up@npm:7.0.1" +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" dependencies: - find-up: "npm:^4.1.0" - read-pkg: "npm:^5.2.0" - type-fest: "npm:^0.8.1" - checksum: 10/e4e93ce70e5905b490ca8f883eb9e48b5d3cebc6cd4527c25a0d8f3ae2903bd4121c5ab9c5a3e217ada0141098eeb661313c86fa008524b089b8ed0b7f165e44 + get-intrinsic: "npm:^1.1.3" + checksum: 10/5fbc7ad57b368ae4cd2f41214bd947b045c1a4be2f194a7be1778d71f8af9dbf4004221f3b6f23e30820eb0d052b4f819fe6ebe8221e2a3c6f0ee4ef173421ca languageName: node linkType: hard -"read-pkg-up@npm:^8.0.0": - version: 8.0.0 - resolution: "read-pkg-up@npm:8.0.0" +"got@npm:^12.6.0": + version: 12.6.1 + resolution: "got@npm:12.6.1" dependencies: - find-up: "npm:^5.0.0" - read-pkg: "npm:^6.0.0" - type-fest: "npm:^1.0.1" - checksum: 10/fe4c80401656b40b408884457fffb5a8015c03b1018cfd8e48f8d82a5e9023e24963603aeb2755608d964593e046c15b34d29b07d35af9c7aa478be81805209c + "@sindresorhus/is": "npm:^5.2.0" + "@szmarczak/http-timer": "npm:^5.0.1" + cacheable-lookup: "npm:^7.0.0" + cacheable-request: "npm:^10.2.8" + decompress-response: "npm:^6.0.0" + form-data-encoder: "npm:^2.1.2" + get-stream: "npm:^6.0.1" + http2-wrapper: "npm:^2.1.10" + lowercase-keys: "npm:^3.0.0" + p-cancelable: "npm:^3.0.0" + responselike: "npm:^3.0.0" + checksum: 10/6c22f1449f4574d79a38e0eba0b753ce2f9030d61838a1ae1e25d3ff5b0db7916aa21023ac369c67d39d17f87bba9283a0b0cb88590de77926c968630aacae75 languageName: node linkType: hard -"read-pkg@npm:^1.0.0": - version: 1.1.0 - resolution: "read-pkg@npm:1.1.0" +"got@npm:^9.6.0": + version: 9.6.0 + resolution: "got@npm:9.6.0" dependencies: - load-json-file: "npm:^1.0.0" - normalize-package-data: "npm:^2.3.2" - path-type: "npm:^1.0.0" - checksum: 10/a0f5d5e32227ec8e6a028dd5c5134eab229768dcb7a5d9a41a284ed28ad4b9284fecc47383dc1593b5694f4de603a7ffaee84b738956b9b77e0999567485a366 + "@sindresorhus/is": "npm:^0.14.0" + "@szmarczak/http-timer": "npm:^1.1.2" + cacheable-request: "npm:^6.0.0" + decompress-response: "npm:^3.3.0" + duplexer3: "npm:^0.1.4" + get-stream: "npm:^4.1.0" + lowercase-keys: "npm:^1.0.1" + mimic-response: "npm:^1.0.1" + p-cancelable: "npm:^1.0.0" + to-readable-stream: "npm:^1.0.0" + url-parse-lax: "npm:^3.0.0" + checksum: 10/fae3273b44392b6b1d88071d04ea984784e63dbf8ba3f70b04cb7edda53c7668ee17288ac46af507a9f2aa60c183c5ea1732339141d253dda3eb19f92985c771 languageName: node linkType: hard -"read-pkg@npm:^3.0.0": - version: 3.0.0 - resolution: "read-pkg@npm:3.0.0" - dependencies: - load-json-file: "npm:^4.0.0" - normalize-package-data: "npm:^2.3.2" - path-type: "npm:^3.0.0" - checksum: 10/398903ebae6c7e9965419a1062924436cc0b6f516c42c4679a90290d2f87448ed8f977e7aa2dbba4aa1ac09248628c43e493ac25b2bc76640e946035200e34c6 +"graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": + version: 4.2.9 + resolution: "graceful-fs@npm:4.2.9" + checksum: 10/4bcf2de4f1108a928dd64d5e894b833cba634b2e82729c0e57f327d384bf15098e4706639f3045e587e845afed06bae52e70916f74a42db5a56e9ca44f6c2fd1 languageName: node linkType: hard -"read-pkg@npm:^5.2.0": - version: 5.2.0 - resolution: "read-pkg@npm:5.2.0" - dependencies: - "@types/normalize-package-data": "npm:^2.4.0" - normalize-package-data: "npm:^2.5.0" - parse-json: "npm:^5.0.0" - type-fest: "npm:^0.6.0" - checksum: 10/eb696e60528b29aebe10e499ba93f44991908c57d70f2d26f369e46b8b9afc208ef11b4ba64f67630f31df8b6872129e0a8933c8c53b7b4daf0eace536901222 +"graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.11": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 languageName: node linkType: hard -"read-pkg@npm:^6.0.0": - version: 6.0.0 - resolution: "read-pkg@npm:6.0.0" - dependencies: - "@types/normalize-package-data": "npm:^2.4.0" - normalize-package-data: "npm:^3.0.2" - parse-json: "npm:^5.2.0" - type-fest: "npm:^1.0.1" - checksum: 10/0cebdff381128e923815c643074a87011070e5fc352bee575d327d6485da3317fab6d802a7b03deeb0be7be8d3ad1640397b3d5d2f044452caf4e8d1736bf94f +"graphemer@npm:^1.4.0": + version: 1.4.0 + resolution: "graphemer@npm:1.4.0" + checksum: 10/6dd60dba97007b21e3a829fab3f771803cc1292977fe610e240ea72afd67e5690ac9eeaafc4a99710e78962e5936ab5a460787c2a1180f1cb0ccfac37d29f897 languageName: node linkType: hard -"read-pkg@npm:^8.0.0, read-pkg@npm:^8.1.0": - version: 8.1.0 - resolution: "read-pkg@npm:8.1.0" +"grpc-tools@npm:1.12.4": + version: 1.12.4 + resolution: "grpc-tools@npm:1.12.4" dependencies: - "@types/normalize-package-data": "npm:^2.4.1" - normalize-package-data: "npm:^6.0.0" - parse-json: "npm:^7.0.0" - type-fest: "npm:^4.2.0" - checksum: 10/f4cd164f096e78cf3e338a55f800043524e3055f9b0b826143290002fafc951025fc3cbd6ca683ebaf7945efcfb092d31c683dd252a7871a974662985c723b67 + "@mapbox/node-pre-gyp": "npm:^1.0.5" + bin: + grpc_tools_node_protoc: bin/protoc.js + grpc_tools_node_protoc_plugin: bin/protoc_plugin.js + checksum: 10/56852c756fe34be5f3b2cf75b1d432886b17ad32d438cacbcf8d30e980c7361a8e8325b1e626ce99826b8dbf1364145bedbedeb6d7feb916c4801481810a05d1 languageName: node linkType: hard -"read-pkg@npm:^9.0.0": - version: 9.0.1 - resolution: "read-pkg@npm:9.0.1" +"grpc_tools_node_protoc_ts@npm:5.3.3": + version: 5.3.3 + resolution: "grpc_tools_node_protoc_ts@npm:5.3.3" dependencies: - "@types/normalize-package-data": "npm:^2.4.3" - normalize-package-data: "npm:^6.0.0" - parse-json: "npm:^8.0.0" - type-fest: "npm:^4.6.0" - unicorn-magic: "npm:^0.1.0" - checksum: 10/5544bea2a58c6e5706db49a96137e8f0768c69395f25363f934064fbba00bdcdaa326fcd2f4281741df38cf81dbf27b76138240dc6de0ed718cf650475e0de3c + google-protobuf: "npm:3.15.8" + handlebars: "npm:4.7.7" + bin: + protoc-gen-ts: bin/protoc-gen-ts + checksum: 10/96fe57b04a7d9e7e656678fab14dd4fc8027849abbb487a7eae4d2841651aa9a481402d5b9df34b4ac3bac6f190551db2e647127d6f6736d5f89ea2fa791ff33 languageName: node linkType: hard -"readable-stream@npm:1.1.14, readable-stream@npm:^1.0.26-4, readable-stream@npm:^1.0.33": - version: 1.1.14 - resolution: "readable-stream@npm:1.1.14" +"handlebars@npm:4.7.7, handlebars@npm:^4.7.7": + version: 4.7.7 + resolution: "handlebars@npm:4.7.7" dependencies: - core-util-is: "npm:~1.0.0" - inherits: "npm:~2.0.1" - isarray: "npm:0.0.1" - string_decoder: "npm:~0.10.x" - checksum: 10/1aa2cf4bd02f9ab3e1d57842a43a413b52be5300aa089ad1f2e3cea00684532d73edc6a2ba52b0c3210d8b57eb20a695a6d2b96d1c6085ee979c6021ad48ad20 + minimist: "npm:^1.2.5" + neo-async: "npm:^2.6.0" + source-map: "npm:^0.6.1" + uglify-js: "npm:^3.1.4" + wordwrap: "npm:^1.0.0" + dependenciesMeta: + uglify-js: + optional: true + bin: + handlebars: bin/handlebars + checksum: 10/617b1e689b7577734abc74564bdb8cdaddf8fd48ce72afdb489f426e9c60a7d6ee2a2707c023720c4059070128243c948bded8f2716e4543378033e3971b85ea languageName: node linkType: hard -"readable-stream@npm:2 || 3": - version: 3.6.2 - resolution: "readable-stream@npm:3.6.2" - dependencies: - inherits: "npm:^2.0.3" - string_decoder: "npm:^1.1.1" - util-deprecate: "npm:^1.0.1" - checksum: 10/d9e3e53193adcdb79d8f10f2a1f6989bd4389f5936c6f8b870e77570853561c362bee69feca2bbb7b32368ce96a85504aa4cedf7cf80f36e6a9de30d64244048 +"hard-rejection@npm:^2.1.0": + version: 2.1.0 + resolution: "hard-rejection@npm:2.1.0" + checksum: 10/7baaf80a0c7fff4ca79687b4060113f1529589852152fa935e6787a2bc96211e784ad4588fb3048136ff8ffc9dfcf3ae385314a5b24db32de20bea0d1597f9dc languageName: node linkType: hard -"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": - version: 3.6.0 - resolution: "readable-stream@npm:3.6.0" - dependencies: - inherits: "npm:^2.0.3" - string_decoder: "npm:^1.1.1" - util-deprecate: "npm:^1.0.1" - checksum: 10/b80b3e6a7fafb1c79de7db541de357f4a5ee73bd70c21672f5a7c840d27bb27bdb0151e7ba2fd82c4a888df22ce0c501b0d9f3e4dfe51688876701c437d59536 +"has-bigints@npm:^1.0.1": + version: 1.0.1 + resolution: "has-bigints@npm:1.0.1" + checksum: 10/44ab55868174470065d2e0f8f6def1c990d12b82162a8803c679699fa8a39f966e336f2a33c185092fe8aea7e8bf2e85f1c26add5f29d98f2318bd270096b183 languageName: node linkType: hard -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.1.4, readable-stream@npm:^2.3.6, readable-stream@npm:^2.3.8": - version: 2.3.8 - resolution: "readable-stream@npm:2.3.8" - dependencies: - core-util-is: "npm:~1.0.0" - inherits: "npm:~2.0.3" - isarray: "npm:~1.0.0" - process-nextick-args: "npm:~2.0.0" - safe-buffer: "npm:~5.1.1" - string_decoder: "npm:~1.1.1" - util-deprecate: "npm:~1.0.1" - checksum: 10/8500dd3a90e391d6c5d889256d50ec6026c059fadee98ae9aa9b86757d60ac46fff24fafb7a39fa41d54cb39d8be56cc77be202ebd4cd8ffcf4cb226cbaa40d4 +"has-bigints@npm:^1.0.2": + version: 1.0.2 + resolution: "has-bigints@npm:1.0.2" + checksum: 10/4e0426c900af034d12db14abfece02ce7dbf53f2022d28af1a97913ff4c07adb8799476d57dc44fbca0e07d1dbda2a042c2928b1f33d3f09c15de0640a7fb81b languageName: node linkType: hard -"readable-stream@npm:^2.0.1, readable-stream@npm:^2.2.2, readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5": - version: 2.3.7 - resolution: "readable-stream@npm:2.3.7" +"has-dynamic-import@npm:^2.0.1": + version: 2.0.1 + resolution: "has-dynamic-import@npm:2.0.1" dependencies: - core-util-is: "npm:~1.0.0" - inherits: "npm:~2.0.3" - isarray: "npm:~1.0.0" - process-nextick-args: "npm:~2.0.0" - safe-buffer: "npm:~5.1.1" - string_decoder: "npm:~1.1.1" - util-deprecate: "npm:~1.0.1" - checksum: 10/d04c677c1705e3fc6283d45859a23f4c05243d0c0f1fc08cb8f995b4d69f0eb7f38ec0ec102f0ee20535c5d999ee27449f40aa2edf6bf30c24d0cc8f8efeb6d7 + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.1.1" + checksum: 10/518f474357cc77118682eafae93ee63007f1d8a580b14cb815088bd407e7e8d1c27b47147b5fba6af47c3181b45fbfd3d7cf57704be723f4ef9f922bc334415c languageName: node linkType: hard -"readable-stream@npm:^4.0.0, readable-stream@npm:^4.2.0": - version: 4.5.2 - resolution: "readable-stream@npm:4.5.2" - dependencies: - abort-controller: "npm:^3.0.0" - buffer: "npm:^6.0.3" - events: "npm:^3.3.0" - process: "npm:^0.11.10" - string_decoder: "npm:^1.3.0" - checksum: 10/01b128a559c5fd76a898495f858cf0a8839f135e6a69e3409f986e88460134791657eb46a2ff16826f331682a3c4d0c5a75cef5e52ef259711021ba52b1c2e82 +"has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 10/4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad languageName: node linkType: hard -"readable-stream@npm:~0.0.2": - version: 0.0.4 - resolution: "readable-stream@npm:0.0.4" - checksum: 10/03eb53a375fc49ea2547c017157d262adfacdaaf91e04fd967e3223539f165a206c502f90c49cdb67f1d8acbdc11dc355dbbf4d69ee3ae9cd276db21a1291966 +"has-own-prop@npm:^2.0.0": + version: 2.0.0 + resolution: "has-own-prop@npm:2.0.0" + checksum: 10/ca6336e85ead2295c9603880cbc199e2d3ff7eaea0e9035d68fbc79892e9cf681abc62c0909520f112c671dad9961be2173b21dff951358cc98425c560e789e0 languageName: node linkType: hard -"readable-stream@npm:~1.0.15, readable-stream@npm:~1.0.26, readable-stream@npm:~1.0.26-4": - version: 1.0.34 - resolution: "readable-stream@npm:1.0.34" +"has-property-descriptors@npm:^1.0.0": + version: 1.0.0 + resolution: "has-property-descriptors@npm:1.0.0" dependencies: - core-util-is: "npm:~1.0.0" - inherits: "npm:~2.0.1" - isarray: "npm:0.0.1" - string_decoder: "npm:~0.10.x" - checksum: 10/20537fca5a8ffd4af0f483be1cce0e981ed8cbb1087e0c762e2e92ae77f1005627272cebed8422f28047b465056aa1961fefd24baf532ca6a3616afea6811ae0 + get-intrinsic: "npm:^1.1.1" + checksum: 10/a6d3f0a266d0294d972e354782e872e2fe1b6495b321e6ef678c9b7a06a40408a6891817350c62e752adced73a94ac903c54734fee05bf65b1905ee1368194bb languageName: node linkType: hard -"readdirp@npm:^3.6.0, readdirp@npm:~3.6.0": - version: 3.6.0 - resolution: "readdirp@npm:3.6.0" +"has-property-descriptors@npm:^1.0.1, has-property-descriptors@npm:^1.0.2": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" dependencies: - picomatch: "npm:^2.2.1" - checksum: 10/196b30ef6ccf9b6e18c4e1724b7334f72a093d011a99f3b5920470f0b3406a51770867b3e1ae9711f227ef7a7065982f6ee2ce316746b2cb42c88efe44297fe7 + es-define-property: "npm:^1.0.0" + checksum: 10/2d8c9ab8cebb572e3362f7d06139a4592105983d4317e68f7adba320fe6ddfc8874581e0971e899e633fd5f72e262830edce36d5a0bc863dad17ad20572484b2 languageName: node linkType: hard -"readline2@npm:^1.0.1": +"has-proto@npm:^1.0.1": version: 1.0.1 - resolution: "readline2@npm:1.0.1" - dependencies: - code-point-at: "npm:^1.0.0" - is-fullwidth-code-point: "npm:^1.0.0" - mute-stream: "npm:0.0.5" - checksum: 10/7ac8ffa917af89f042bb24f695b1333158d83e26f398108f6d4ce7ca3ab6bccb6fa32623d9254ea1dc5420db7e6ce0b0fc527108645ababf6e280d8db3fe8a89 + resolution: "has-proto@npm:1.0.1" + checksum: 10/eab2ab0ed1eae6d058b9bbc4c1d99d2751b29717be80d02fd03ead8b62675488de0c7359bc1fdd4b87ef6fd11e796a9631ad4d7452d9324fdada70158c2e5be7 languageName: node linkType: hard -"real-require@npm:^0.2.0": - version: 0.2.0 - resolution: "real-require@npm:0.2.0" - checksum: 10/ddf44ee76301c774e9c9f2826da8a3c5c9f8fc87310f4a364e803ef003aa1a43c378b4323051ced212097fff1af459070f4499338b36a7469df1d4f7e8c0ba4c +"has-proto@npm:^1.0.3": + version: 1.0.3 + resolution: "has-proto@npm:1.0.3" + checksum: 10/0b67c2c94e3bea37db3e412e3c41f79d59259875e636ba471e94c009cdfb1fa82bf045deeffafc7dbb9c148e36cae6b467055aaa5d9fad4316e11b41e3ba551a languageName: node linkType: hard -"receptacle@npm:^1.3.2": - version: 1.3.2 - resolution: "receptacle@npm:1.3.2" - dependencies: - ms: "npm:^2.1.1" - checksum: 10/133cc3c4367986b76cffea77f4b913b47de3d1f195203f0ddfd615e40869f5c593cd3145eaaaaab4d22671801eeedc8884fb0445dc0ac31b44b0b65902f22d89 +"has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2": + version: 1.0.2 + resolution: "has-symbols@npm:1.0.2" + checksum: 10/3d8b4f3c7d9e1535a1ba969035234e20d127519447ce6252be615fae55201119ef557f629328699385ca3e992f1d480e19fe2a850088bd98044d0d9f10199b70 languageName: node linkType: hard -"rechoir@npm:^0.6.2": - version: 0.6.2 - resolution: "rechoir@npm:0.6.2" - dependencies: - resolve: "npm:^1.1.6" - checksum: 10/fe76bf9c21875ac16e235defedd7cbd34f333c02a92546142b7911a0f7c7059d2e16f441fe6fb9ae203f459c05a31b2bcf26202896d89e390eda7514d5d2702b +"has-symbols@npm:^1.0.3": + version: 1.0.3 + resolution: "has-symbols@npm:1.0.3" + checksum: 10/464f97a8202a7690dadd026e6d73b1ceeddd60fe6acfd06151106f050303eaa75855aaa94969df8015c11ff7c505f196114d22f7386b4a471038da5874cf5e9b languageName: node linkType: hard -"rechoir@npm:^0.7.0": - version: 0.7.1 - resolution: "rechoir@npm:0.7.1" +"has-tostringtag@npm:^1.0.0": + version: 1.0.0 + resolution: "has-tostringtag@npm:1.0.0" dependencies: - resolve: "npm:^1.9.0" - checksum: 10/2a04aab4e28c05fcd6ee6768446bc8b859d8f108e71fc7f5bcbc5ef25e53330ce2c11d10f82a24591a2df4c49c4f61feabe1fd11f844c66feedd4cd7bb61146a + has-symbols: "npm:^1.0.2" + checksum: 10/95546e7132efc895a9ae64a8a7cf52588601fc3d52e0304ed228f336992cdf0baaba6f3519d2655e560467db35a1ed79f6420c286cc91a13aa0647a31ed92570 languageName: node linkType: hard -"rechoir@npm:^0.8.0": - version: 0.8.0 - resolution: "rechoir@npm:0.8.0" +"has-tostringtag@npm:^1.0.1, has-tostringtag@npm:^1.0.2": + version: 1.0.2 + resolution: "has-tostringtag@npm:1.0.2" dependencies: - resolve: "npm:^1.20.0" - checksum: 10/ad3caed8afdefbc33fbc30e6d22b86c35b3d51c2005546f4e79bcc03c074df804b3640ad18945e6bef9ed12caedc035655ec1082f64a5e94c849ff939dc0a788 + has-symbols: "npm:^1.0.3" + checksum: 10/c74c5f5ceee3c8a5b8bc37719840dc3749f5b0306d818974141dda2471a1a2ca6c8e46b9d6ac222c5345df7a901c9b6f350b1e6d62763fec877e26609a401bfe languageName: node linkType: hard -"recursive-readdir@npm:^2.2.2": - version: 2.2.3 - resolution: "recursive-readdir@npm:2.2.3" - dependencies: - minimatch: "npm:^3.0.5" - checksum: 10/19298852b0b87810aed5f2c81a73bfaaeb9ade7c9bf363f350fc1443f2cc3df66ecade5e102dfbb153fcd9df20342c301848e11e149e5f78759c1d55aa2c9c39 +"has-unicode@npm:^2.0.1": + version: 2.0.1 + resolution: "has-unicode@npm:2.0.1" + checksum: 10/041b4293ad6bf391e21c5d85ed03f412506d6623786b801c4ab39e4e6ca54993f13201bceb544d92963f9e0024e6e7fbf0cb1d84c9d6b31cb9c79c8c990d13d8 languageName: node linkType: hard -"redent@npm:^3.0.0": - version: 3.0.0 - resolution: "redent@npm:3.0.0" - dependencies: - indent-string: "npm:^4.0.0" - strip-indent: "npm:^3.0.0" - checksum: 10/fa1ef20404a2d399235e83cc80bd55a956642e37dd197b4b612ba7327bf87fa32745aeb4a1634b2bab25467164ab4ed9c15be2c307923dd08b0fe7c52431ae6b +"has-yarn@npm:^2.1.0": + version: 2.1.0 + resolution: "has-yarn@npm:2.1.0" + checksum: 10/5eb1d0bb8518103d7da24532bdbc7124ffc6d367b5d3c10840b508116f2f1bcbcf10fd3ba843ff6e2e991bdf9969fd862d42b2ed58aade88343326c950b7e7f7 languageName: node linkType: hard -"redent@npm:^4.0.0": - version: 4.0.0 - resolution: "redent@npm:4.0.0" +"has@npm:^1.0.3": + version: 1.0.3 + resolution: "has@npm:1.0.3" dependencies: - indent-string: "npm:^5.0.0" - strip-indent: "npm:^4.0.0" - checksum: 10/6944e7b1d8f3fd28c2515f5c605b9f7f0ea0f4edddf41890bbbdd4d9ee35abb7540c3b278f03ff827bd278bb6ff4a5bd8692ca406b748c5c1c3ce7355e9fbf8f + function-bind: "npm:^1.1.1" + checksum: 10/a449f3185b1d165026e8d25f6a8c3390bd25c201ff4b8c1aaf948fc6a5fcfd6507310b8c00c13a3325795ea9791fcc3d79d61eafa313b5750438fc19183df57b languageName: node linkType: hard -"redeyed@npm:~2.1.0": - version: 2.1.1 - resolution: "redeyed@npm:2.1.1" +"hash-base@npm:^3.0.0": + version: 3.1.0 + resolution: "hash-base@npm:3.1.0" dependencies: - esprima: "npm:~4.0.0" - checksum: 10/86880f97d54bb55bbf1c338e27fe28f18f52afc2f5afa808354a09a3777aa79b4f04e04844350d7fec80aa2d299196bde256b21f586e7e5d9b63494bd4a9db27 + inherits: "npm:^2.0.4" + readable-stream: "npm:^3.6.0" + safe-buffer: "npm:^5.2.0" + checksum: 10/26b7e97ac3de13cb23fc3145e7e3450b0530274a9562144fc2bf5c1e2983afd0e09ed7cc3b20974ba66039fad316db463da80eb452e7373e780cbee9a0d2f2dc languageName: node linkType: hard -"redux-saga@npm:1.0.0": - version: 1.0.0 - resolution: "redux-saga@npm:1.0.0" +"hash-base@npm:~3.0": + version: 3.0.4 + resolution: "hash-base@npm:3.0.4" dependencies: - "@redux-saga/core": "npm:^1.0.0" - checksum: 10/0a15cc1f578b0797bd3c86f324458d83170df773d17ff24b4f641f06335cd4db7d08d167db1d33e52180b84b1505836ca23a764a04a2538eeb1b1839805b80fd + inherits: "npm:^2.0.1" + safe-buffer: "npm:^5.0.1" + checksum: 10/878465a0dfcc33cce195c2804135352c590d6d10980adc91a9005fd377e77f2011256c2b7cfce472e3f2e92d561d1bf3228d2da06348a9017ce9a258b3b49764 languageName: node linkType: hard -"redux@npm:^3.7.2": - version: 3.7.2 - resolution: "redux@npm:3.7.2" +"hash.js@npm:1.1.7, hash.js@npm:^1.0.0, hash.js@npm:^1.0.3": + version: 1.1.7 + resolution: "hash.js@npm:1.1.7" dependencies: - lodash: "npm:^4.2.1" - lodash-es: "npm:^4.2.1" - loose-envify: "npm:^1.1.0" - symbol-observable: "npm:^1.0.3" - checksum: 10/7ea6b8e60b230297fa650f9244c81ba82d3bcfc543800f2798a1e675d007aa6deece9baa26112736b21c9184d661c0a79bf102dc575eb7ea7410d9c356dc7eac + inherits: "npm:^2.0.3" + minimalistic-assert: "npm:^1.0.1" + checksum: 10/0c89ee4006606a40f92df5cc3c263342e7fea68110f3e9ef032bd2083650430505db01b6b7926953489517d4027535e4fdc7f970412893d3031c361d3ec8f4b3 languageName: node linkType: hard -"redux@npm:^4.0.4": - version: 4.2.1 - resolution: "redux@npm:4.2.1" +"hasha@npm:^5.0.0": + version: 5.2.2 + resolution: "hasha@npm:5.2.2" dependencies: - "@babel/runtime": "npm:^7.9.2" - checksum: 10/371e4833b671193303a7dea7803c8fdc8e0d566740c78f580e0a3b77b4161da25037626900a2205a5d616117fa6ad09a4232e5a110bd437186b5c6355a041750 + is-stream: "npm:^2.0.0" + type-fest: "npm:^0.8.0" + checksum: 10/06cc474bed246761ff61c19d629977eb5f53fa817be4313a255a64ae0f433e831a29e83acb6555e3f4592b348497596f1d1653751008dda4f21c9c21ca60ac5a languageName: node linkType: hard -"ref-array-di@npm:1.2.2, ref-array-di@npm:^1.2.2": - version: 1.2.2 - resolution: "ref-array-di@npm:1.2.2" +"hasown@npm:^2.0.0": + version: 2.0.0 + resolution: "hasown@npm:2.0.0" dependencies: - array-index: "npm:^1.0.0" - debug: "npm:^3.1.0" - node-gyp: "npm:latest" - checksum: 10/bc9e4c6fc1896ae73d6471ab2c79a5614e7ac2ebcc5ab2d5112c71cd49db69d77b26d2694ea66ed39a784ed07c68c71178691f47c473d6d3f561ea2b452e5063 + function-bind: "npm:^1.1.2" + checksum: 10/c330f8d93f9d23fe632c719d4db3d698ef7d7c367d51548b836069e06a90fa9151e868c8e67353cfe98d67865bf7354855db28fa36eb1b18fa5d4a3f4e7f1c90 languageName: node linkType: hard -"ref-struct-di@npm:1.1.1, ref-struct-di@npm:^1.1.0, ref-struct-di@npm:^1.1.1": - version: 1.1.1 - resolution: "ref-struct-di@npm:1.1.1" +"hasown@npm:^2.0.1": + version: 2.0.1 + resolution: "hasown@npm:2.0.1" dependencies: - debug: "npm:^3.1.0" - node-gyp: "npm:latest" - checksum: 10/89cb7136b8043f5a1692ff2d09da9ecfce6e55300bb20d52deab0c76134f7d34cd41a38967b14e71fdcbeb3614235d2e2bd29ed1c23184db7fa5d0f48e31343a + function-bind: "npm:^1.1.2" + checksum: 10/b7f9107387ee68abed88e965c2b99e868b5e0e9d289db1ddd080706ffafb69533b4f538b0e6362585bae8d6cbd080249f65e79702f74c225990f66d6106be3f6 languageName: node linkType: hard -"reflect-metadata@npm:0.1.13, reflect-metadata@npm:^0.1.13, reflect-metadata@npm:^0.1.2": - version: 0.1.13 - resolution: "reflect-metadata@npm:0.1.13" - checksum: 10/732570da35d2d96f8fdd5aac60fb263aa92f6512eaded5962b052bd9e90f22a9dec5aaf0d7ff4bfe97646c9530e8444e8435c2d80b24d0bdf938b5d47f6f5b83 +"hmac-drbg@npm:^1.0.1": + version: 1.0.1 + resolution: "hmac-drbg@npm:1.0.1" + dependencies: + hash.js: "npm:^1.0.3" + minimalistic-assert: "npm:^1.0.0" + minimalistic-crypto-utils: "npm:^1.0.1" + checksum: 10/0298a1445b8029a69b713d918ecaa84a1d9f614f5857e0c6e1ca517abfa1357216987b2ee08cc6cc73ba82a6c6ddf2ff11b9717a653530ef03be599d4699b836 languageName: node linkType: hard -"reflect-metadata@npm:^0.2.0": - version: 0.2.2 - resolution: "reflect-metadata@npm:0.2.2" - checksum: 10/1c93f9ac790fea1c852fde80c91b2760420069f4862f28e6fae0c00c6937a56508716b0ed2419ab02869dd488d123c4ab92d062ae84e8739ea7417fae10c4745 +"homedir-polyfill@npm:^1.0.1": + version: 1.0.3 + resolution: "homedir-polyfill@npm:1.0.3" + dependencies: + parse-passwd: "npm:^1.0.0" + checksum: 10/18dd4db87052c6a2179d1813adea0c4bfcfa4f9996f0e226fefb29eb3d548e564350fa28ec46b0bf1fbc0a1d2d6922ceceb80093115ea45ff8842a4990139250 languageName: node linkType: hard -"reflect.getprototypeof@npm:^1.0.4": - version: 1.0.4 - resolution: "reflect.getprototypeof@npm:1.0.4" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" - globalthis: "npm:^1.0.3" - which-builtin-type: "npm:^1.1.3" - checksum: 10/52ff881f62a9cb4acdd7f9a8f4ac88234056c4a6b1ed570c249cc085de5c313249b90251d16eb8e58302b82ae697eec19dde16ff62949f6b87f035a3a26dc5df +"hosted-git-info@npm:^2.1.4": + version: 2.8.9 + resolution: "hosted-git-info@npm:2.8.9" + checksum: 10/96da7d412303704af41c3819207a09ea2cab2de97951db4cf336bb8bce8d8e36b9a6821036ad2e55e67d3be0af8f967a7b57981203fbfb88bc05cd803407b8c3 languageName: node linkType: hard -"regenerate-unicode-properties@npm:^10.0.1": - version: 10.0.1 - resolution: "regenerate-unicode-properties@npm:10.0.1" +"hosted-git-info@npm:^4.0.1": + version: 4.1.0 + resolution: "hosted-git-info@npm:4.1.0" dependencies: - regenerate: "npm:^1.4.2" - checksum: 10/448dcfa5e0a965e8ccad19c693333f790a379d5d4cf83c887bc6fa53e6c25a4af64c6d00a05d56a5374f3b878fbdecaf5c49c7b64af84e93b4a57c178f2c20b5 + lru-cache: "npm:^6.0.0" + checksum: 10/4dc67022b7ecb12829966bd731fb9a5f14d351547aafc6520ef3c8e7211f4f0e69452d24e29eae3d9b17df924d660052e53d8ca321cf3008418fb7e6c7c47d6f languageName: node linkType: hard -"regenerate-unicode-properties@npm:^10.1.0": - version: 10.1.0 - resolution: "regenerate-unicode-properties@npm:10.1.0" +"hosted-git-info@npm:^7.0.0": + version: 7.0.1 + resolution: "hosted-git-info@npm:7.0.1" dependencies: - regenerate: "npm:^1.4.2" - checksum: 10/25b268659898955ad105267b4efba20e361e27b233670694b683728a2800314bec3053918d3bf71b0604376fd76fe9bc9c6f80379cfb6d1e209a58de44101aac + lru-cache: "npm:^10.0.1" + checksum: 10/5f740ecf3c70838e27446ff433a9a9a583de8747f7b661390b373ad12ca47edb937136e79999a4f953d0953079025a11df173f1fd9f7d52b0277b2fb9433e1c7 languageName: node linkType: hard -"regenerate@npm:^1.4.2": - version: 1.4.2 - resolution: "regenerate@npm:1.4.2" - checksum: 10/dc6c95ae4b3ba6adbd7687cafac260eee4640318c7a95239d5ce847d9b9263979758389e862fe9c93d633b5792ea4ada5708df75885dc5aa05a309fa18140a87 +"hosted-git-info@npm:^7.0.2": + version: 7.0.2 + resolution: "hosted-git-info@npm:7.0.2" + dependencies: + lru-cache: "npm:^10.0.1" + checksum: 10/8f085df8a4a637d995f357f48b1e3f6fc1f9f92e82b33fb406415b5741834ed431a510a09141071001e8deea2eee43ce72786463e2aa5e5a70db8648c0eedeab languageName: node linkType: hard -"regenerator-runtime@npm:^0.11.0": - version: 0.11.1 - resolution: "regenerator-runtime@npm:0.11.1" - checksum: 10/64e62d78594c227e7d5269811bca9e4aa6451332adaae8c79a30cab0fa98733b1ad90bdb9d038095c340c6fad3b414a49a8d9e0b6b424ab7ff8f94f35704f8a2 +"html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 languageName: node linkType: hard -"regenerator-runtime@npm:^0.13.11, regenerator-runtime@npm:^0.13.4, regenerator-runtime@npm:^0.13.9": - version: 0.13.11 - resolution: "regenerator-runtime@npm:0.13.11" - checksum: 10/d493e9e118abef5b099c78170834f18540c4933cedf9bfabc32d3af94abfb59a7907bd7950259cbab0a929ebca7db77301e8024e5121e6482a82f78283dfd20c +"htmlparser2@npm:^8.0.0": + version: 8.0.2 + resolution: "htmlparser2@npm:8.0.2" + dependencies: + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + domutils: "npm:^3.0.1" + entities: "npm:^4.4.0" + checksum: 10/ea5512956eee06f5835add68b4291d313c745e8407efa63848f4b8a90a2dee45f498a698bca8614e436f1ee0cfdd609938b71d67c693794545982b76e53e6f11 languageName: node linkType: hard -"regenerator-runtime@npm:^0.14.0": - version: 0.14.0 - resolution: "regenerator-runtime@npm:0.14.0" - checksum: 10/6c19495baefcf5fbb18a281b56a97f0197b5f219f42e571e80877f095320afac0bdb31dab8f8186858e6126950068c3f17a1226437881e3e70446ea66751897c +"http-cache-semantics@npm:>=4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 10/362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f languageName: node linkType: hard -"regenerator-transform@npm:^0.15.2": - version: 0.15.2 - resolution: "regenerator-transform@npm:0.15.2" +"http-proxy-agent@npm:^5.0.0": + version: 5.0.0 + resolution: "http-proxy-agent@npm:5.0.0" dependencies: - "@babel/runtime": "npm:^7.8.4" - checksum: 10/c4fdcb46d11bbe32605b4b9ed76b21b8d3f241a45153e9dc6f5542fed4c7744fed459f42701f650d5d5956786bf7de57547329d1c05a9df2ed9e367b9d903302 + "@tootallnate/once": "npm:2" + agent-base: "npm:6" + debug: "npm:4" + checksum: 10/5ee19423bc3e0fd5f23ce991b0755699ad2a46a440ce9cec99e8126bb98448ad3479d2c0ea54be5519db5b19a4ffaa69616bac01540db18506dd4dac3dc418f0 languageName: node linkType: hard -"regex-cache@npm:^0.4.2": - version: 0.4.4 - resolution: "regex-cache@npm:0.4.4" +"http-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "http-proxy-agent@npm:7.0.0" dependencies: - is-equal-shallow: "npm:^0.1.3" - checksum: 10/06b605c4ffd411f36ebf2d201f51f37bc23aa7e1f71d30d1c241833697ab8d33122d19701e982be2dc925cfee8cf03e007d374cafa3e1028674729665e0f2a15 + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10/dbaaf3d9f3fc4df4a5d7ec45d456ec50f575240b557160fa63427b447d1f812dd7fe4a4f17d2e1ba003d231f07edf5a856ea6d91cb32d533062ff20a7803ccac languageName: node linkType: hard -"regex-not@npm:^1.0.0, regex-not@npm:^1.0.2": - version: 1.0.2 - resolution: "regex-not@npm:1.0.2" +"http2-wrapper@npm:^2.1.10": + version: 2.2.0 + resolution: "http2-wrapper@npm:2.2.0" dependencies: - extend-shallow: "npm:^3.0.2" - safe-regex: "npm:^1.1.0" - checksum: 10/3081403de79559387a35ef9d033740e41818a559512668cef3d12da4e8a29ef34ee13c8ed1256b07e27ae392790172e8a15c8a06b72962fd4550476cde3d8f77 + quick-lru: "npm:^5.1.1" + resolve-alpn: "npm:^1.2.0" + checksum: 10/f02842f0db16a265426baa1b0eed708c3e0bcf9abc64b943712d2a06df9221564490c4f62cea1df9ff767dba9a4afc13e8e47fa41b526bea7d62f0ceb49c5fa7 languageName: node linkType: hard -"regex-parser@npm:^2.2.11": - version: 2.2.11 - resolution: "regex-parser@npm:2.2.11" - checksum: 10/78200331ec0cc372302d287a4946c38681eb5fe435453fca572cb53cac0ba579e5eb3b9e25eac24c0c80a555fb3ea7a637814a35da1e9bc88e8819110ae5de24 +"https-browserify@npm:^1.0.0": + version: 1.0.0 + resolution: "https-browserify@npm:1.0.0" + checksum: 10/2d707c457319e1320adf0e7556174c190865fb345b6a183f033cee440f73221dbe7fa3f0adcffb1e6b0664726256bd44771a82e50fe6c66976c10b237100536a languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.4.3, regexp.prototype.flags@npm:^1.5.0": - version: 1.5.0 - resolution: "regexp.prototype.flags@npm:1.5.0" +"https-proxy-agent@npm:^5.0.0": + version: 5.0.0 + resolution: "https-proxy-agent@npm:5.0.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - functions-have-names: "npm:^1.2.3" - checksum: 10/c8229ec3f59f8312248268009cb9bf9145a3982117f747499b994e8efb378ac8b62e812fd88df75225d53cb4879d2bb2fe47b2a50776cba076d8ff71fc0b1629 + agent-base: "npm:6" + debug: "npm:4" + checksum: 10/517037badcbbe30757a9a88aaf5e8c198d31aa0b1e9c0a49a0053ab8e812809242218cc9ea1929171f74d95ae1ec89782ba471ffc3709b8910e91d1761f5f1a6 languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.1": - version: 1.5.1 - resolution: "regexp.prototype.flags@npm:1.5.1" +"https-proxy-agent@npm:^7.0.1": + version: 7.0.2 + resolution: "https-proxy-agent@npm:7.0.2" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - set-function-name: "npm:^2.0.0" - checksum: 10/3fa5610b8e411bbc3a43ddfd13162f3a817beb43155fbd8caa24d4fd0ce2f431a8197541808772a5a06e5946cebfb68464c827827115bde0d11720a92fe2981a + agent-base: "npm:^7.0.2" + debug: "npm:4" + checksum: 10/9ec844f78fd643608239c9c3f6819918631df5cd3e17d104cc507226a39b5d4adda9d790fc9fd63ac0d2bb8a761b2f9f60faa80584a9bf9d7f2e8c5ed0acd330 languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.2": - version: 1.5.2 - resolution: "regexp.prototype.flags@npm:1.5.2" - dependencies: - call-bind: "npm:^1.0.6" - define-properties: "npm:^1.2.1" - es-errors: "npm:^1.3.0" - set-function-name: "npm:^2.0.1" - checksum: 10/9fffc01da9c4e12670ff95bc5204364615fcc12d86fc30642765af908675678ebb0780883c874b2dbd184505fb52fa603d80073ecf69f461ce7f56b15d10be9c +"human-signals@npm:^2.1.0": + version: 2.1.0 + resolution: "human-signals@npm:2.1.0" + checksum: 10/df59be9e0af479036798a881d1f136c4a29e0b518d4abb863afbd11bf30efa3eeb1d0425fc65942dcc05ab3bf40205ea436b0ff389f2cd20b75b8643d539bf86 languageName: node linkType: hard -"regexpp@npm:^1.0.1": - version: 1.1.0 - resolution: "regexpp@npm:1.1.0" - checksum: 10/1924f1c7f8fb2276a1b433bb1f7cd6708b4b50d1dd4bca474ea88d8e56bc5c73f8c80b72653ec42ba45161aa6f20765accc4b615d97a5b68efb731fff9ca513c +"human-signals@npm:^5.0.0": + version: 5.0.0 + resolution: "human-signals@npm:5.0.0" + checksum: 10/30f8870d831cdcd2d6ec0486a7d35d49384996742052cee792854273fa9dd9e7d5db06bb7985d4953e337e10714e994e0302e90dc6848069171b05ec836d65b0 languageName: node linkType: hard -"regexpp@npm:^3.0.0": - version: 3.2.0 - resolution: "regexpp@npm:3.2.0" - checksum: 10/3310010895a906873262f4b494fc99bcef1e71ef6720a0532c5999ca586498cbd4a284c8e3c2423f9d1d37512fd08d6064b7564e0e59508cf938f76dd15ace84 +"humanize-ms@npm:^1.2.1": + version: 1.2.1 + resolution: "humanize-ms@npm:1.2.1" + dependencies: + ms: "npm:^2.0.0" + checksum: 10/9c7a74a2827f9294c009266c82031030eae811ca87b0da3dceb8d6071b9bde22c9f3daef0469c3c533cc67a97d8a167cd9fc0389350e5f415f61a79b171ded16 languageName: node linkType: hard -"regexpu-core@npm:^5.0.1": - version: 5.0.1 - resolution: "regexpu-core@npm:5.0.1" - dependencies: - regenerate: "npm:^1.4.2" - regenerate-unicode-properties: "npm:^10.0.1" - regjsgen: "npm:^0.6.0" - regjsparser: "npm:^0.8.2" - unicode-match-property-ecmascript: "npm:^2.0.0" - unicode-match-property-value-ecmascript: "npm:^2.0.0" - checksum: 10/f88ccf13a31fdd700c4d2039c18eaac65162f3eeace36a75d5a1487ca92c4e460b267c7efc9e2b04422be1035b84fc2e6e8171b6370f2c94cd5e52e2bf763c71 +"husky@npm:7.0.4": + version: 7.0.4 + resolution: "husky@npm:7.0.4" + bin: + husky: lib/bin.js + checksum: 10/8fecb619ab924bd99b2c9ce494bff88e45369c1125e07a603dfacb4bd60ef86840e08c689794c476189183e6223f0ea93aadebf78e3508479453c219358ca787 languageName: node linkType: hard -"regexpu-core@npm:^5.3.1": - version: 5.3.2 - resolution: "regexpu-core@npm:5.3.2" +"iconv-lite@npm:^0.4.24": + version: 0.4.24 + resolution: "iconv-lite@npm:0.4.24" dependencies: - "@babel/regjsgen": "npm:^0.8.0" - regenerate: "npm:^1.4.2" - regenerate-unicode-properties: "npm:^10.1.0" - regjsparser: "npm:^0.9.1" - unicode-match-property-ecmascript: "npm:^2.0.0" - unicode-match-property-value-ecmascript: "npm:^2.1.0" - checksum: 10/ed0d7c66d84c633fbe8db4939d084c780190eca11f6920807dfb8ebac59e2676952cd8f2008d9c86ae8cf0463ea5fd12c5cff09ef2ce7d51ee6b420a5eb4d177 + safer-buffer: "npm:>= 2.1.2 < 3" + checksum: 10/6d3a2dac6e5d1fb126d25645c25c3a1209f70cceecc68b8ef51ae0da3cdc078c151fade7524a30b12a3094926336831fca09c666ef55b37e2c69638b5d6bd2e3 languageName: node linkType: hard -"registry-auth-token@npm:^4.0.0": - version: 4.2.1 - resolution: "registry-auth-token@npm:4.2.1" +"iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" dependencies: - rc: "npm:^1.2.8" - checksum: 10/d1a5c28c0b1ebe0702d758ea7d000bf26cfc48982321dded81f5681a9e5c1f46368b847f210e7eed34db9c57fdf655bd536a14b2e94d2ba070e6503d6594b19c + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10/24e3292dd3dadaa81d065c6f8c41b274a47098150d444b96e5f53b4638a9a71482921ea6a91a1f59bb71d9796de25e04afd05919fa64c360347ba65d3766f10f languageName: node linkType: hard -"registry-url@npm:^5.0.0": - version: 5.1.0 - resolution: "registry-url@npm:5.1.0" - dependencies: - rc: "npm:^1.2.8" - checksum: 10/bcea86c84a0dbb66467b53187fadebfea79017cddfb4a45cf27530d7275e49082fe9f44301976eb0164c438e395684bcf3dae4819b36ff9d1640d8cc60c73df9 +"ieee754@npm:^1.1.13, ieee754@npm:^1.2.1": + version: 1.2.1 + resolution: "ieee754@npm:1.2.1" + checksum: 10/d9f2557a59036f16c282aaeb107832dc957a93d73397d89bbad4eb1130560560eb695060145e8e6b3b498b15ab95510226649a0b8f52ae06583575419fe10fc4 languageName: node linkType: hard -"regjsgen@npm:^0.6.0": - version: 0.6.0 - resolution: "regjsgen@npm:0.6.0" - checksum: 10/bb260bd786748fe44a03b9249b5d9dc2e56e911e8b2b3f75b58fea755f26d4ec378e7ef78880d57008263595ea143940b4a0c4566e28196b96542be3408bfe8e +"ignore-by-default@npm:^1.0.1": + version: 1.0.1 + resolution: "ignore-by-default@npm:1.0.1" + checksum: 10/441509147b3615e0365e407a3c18e189f78c07af08564176c680be1fabc94b6c789cad1342ad887175d4ecd5225de86f73d376cec8e06b42fd9b429505ffcf8a languageName: node linkType: hard -"regjsparser@npm:^0.8.2": - version: 0.8.4 - resolution: "regjsparser@npm:0.8.4" +"ignore-walk@npm:^6.0.0": + version: 6.0.2 + resolution: "ignore-walk@npm:6.0.2" dependencies: - jsesc: "npm:~0.5.0" - bin: - regjsparser: bin/parser - checksum: 10/b60919be93fa2d0877ec7c5bd87279f8779b83cfa1333b04bae657c2f91e7937060ed992da8a27180be0d657a81996bb76d308f91ed2d9e762332d511c105e7d + minimatch: "npm:^7.4.2" + checksum: 10/ec3bd6f5bb413ed56204875eb3d097a46415408cbd9b828002214f35674b9e5f7b708faafa510df7ea462d12112add8d6df402f742fefcc47abc18fe8817354b languageName: node linkType: hard -"regjsparser@npm:^0.9.1": - version: 0.9.1 - resolution: "regjsparser@npm:0.9.1" +"ignore-walk@npm:^6.0.4": + version: 6.0.4 + resolution: "ignore-walk@npm:6.0.4" dependencies: - jsesc: "npm:~0.5.0" - bin: - regjsparser: bin/parser - checksum: 10/be7757ef76e1db10bf6996001d1021048b5fb12f5cb470a99b8cf7f3ff943f0f0e2291c0dcdbb418b458ddc4ac10e48680a822b69ef487a0284c8b6b77beddc3 + minimatch: "npm:^9.0.0" + checksum: 10/a56c3f929bb0890ffb6e87dfaca7d5ce97f9e179fd68d49711edea55760aaee367cea3845d7620689b706249053c4b1805e21158f6751c7333f9b2ffb3668272 languageName: node linkType: hard -"relateurl@npm:^0.2.7": - version: 0.2.7 - resolution: "relateurl@npm:0.2.7" - checksum: 10/f5d6ba58f2a5d5076389090600c243a0ba7072bcf347490a09e4241e2427ccdb260b4e22cea7be4f1fcd3c2bf05908b1e0d0bc9605e3199d4ecf37af1d5681fa +"ignore@npm:^5.1.1, ignore@npm:^5.2.0": + version: 5.2.0 + resolution: "ignore@npm:5.2.0" + checksum: 10/30283f05fb7d867ee0e08faebb3e69caba2c6c55092042cd061eac1b37a3e78db72bfcfbb08b3598999344fba3d93a9c693b5401da5faaecc0fb7c2dce87beb4 languageName: node linkType: hard -"release-zalgo@npm:^1.0.0": - version: 1.0.0 - resolution: "release-zalgo@npm:1.0.0" - dependencies: - es6-error: "npm:^4.0.1" - checksum: 10/1719e44b240ee1f57d034b26ea167f3cbf3c36fdae6d6efd0e6e5b202d9852baffc1c5595d378b5f8b2ad729b907ddd962f3d051d89499f83584993a5399f964 +"ignore@npm:^5.1.9, ignore@npm:^5.2.4": + version: 5.2.4 + resolution: "ignore@npm:5.2.4" + checksum: 10/4f7caf5d2005da21a382d4bd1d2aa741a3bed51de185c8562dd7f899a81a620ac4fd0619b06f7029a38ae79e4e4c134399db3bd0192c703c3ef54bb82df3086c languageName: node linkType: hard -"remix-lib@npm:0.4.30": - version: 0.4.30 - resolution: "remix-lib@npm:0.4.30" +"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": + version: 3.3.0 + resolution: "import-fresh@npm:3.3.0" dependencies: - async: "npm:^2.1.2" - ethereumjs-block: "npm:^2.2.2" - ethereumjs-tx: "npm:^2.1.2" - ethereumjs-util: "npm:^6.2.0" - ethereumjs-vm: "npm:4.1.3" - ethers: "npm:^4.0.40" - events: "npm:^3.0.0" - solc: "npm:^0.6.0" - web3: "npm:^1.2.4" - checksum: 10/b78a309af142febe6a6cdd124d32a07d59e80ba786d5c42e7a898b304241fcfa5fe9ed67d3db40af43fa631bf68212845fbc2785612e0cc3800edeae2a7d04fc + parent-module: "npm:^1.0.0" + resolve-from: "npm:^4.0.0" + checksum: 10/2cacfad06e652b1edc50be650f7ec3be08c5e5a6f6d12d035c440a42a8cc028e60a5b99ca08a77ab4d6b1346da7d971915828f33cdab730d3d42f08242d09baa + languageName: node + linkType: hard + +"import-lazy@npm:^2.1.0": + version: 2.1.0 + resolution: "import-lazy@npm:2.1.0" + checksum: 10/05294f3b9dd4971d3a996f0d2f176410fb6745d491d6e73376429189f5c1c3d290548116b2960a7cf3e89c20cdf11431739d1d2d8c54b84061980795010e803a languageName: node linkType: hard -"remix-simulator@npm:0.1.9-beta.6": - version: 0.1.9-beta.6 - resolution: "remix-simulator@npm:0.1.9-beta.6" +"import-local@npm:^3.0.2, import-local@npm:^3.1.0": + version: 3.1.0 + resolution: "import-local@npm:3.1.0" dependencies: - ansi-gray: "npm:^0.1.1" - async: "npm:^3.1.0" - body-parser: "npm:^1.18.2" - color-support: "npm:^1.1.3" - commander: "npm:^2.19.0" - cors: "npm:^2.8.5" - ethereumjs-block: "npm:^2.2.2" - ethereumjs-util: "npm:^6.2.0" - express: "npm:^4.16.3" - express-ws: "npm:^4.0.0" - merge: "npm:^1.2.0" - remix-lib: "npm:0.4.30" - standard: "npm:^10.0.3" - time-stamp: "npm:^2.0.0" - web3: "npm:^1.2.4" + pkg-dir: "npm:^4.2.0" + resolve-cwd: "npm:^3.0.0" bin: - ethsim: ./bin/ethsim - remix-simulator: ./bin/ethsim - checksum: 10/1cc8920fd91f018a999ee4cd4563299f29f35d84e38e2912edfedc4e73637524a639632c1624d027747a834feba70d188fc2512a6dec82a0161bc419e08c35ba + import-local-fixture: fixtures/cli.js + checksum: 10/bfcdb63b5e3c0e245e347f3107564035b128a414c4da1172a20dc67db2504e05ede4ac2eee1252359f78b0bfd7b19ef180aec427c2fce6493ae782d73a04cddd languageName: node linkType: hard -"remix-solidity@npm:0.3.31": - version: 0.3.31 - resolution: "remix-solidity@npm:0.3.31" - dependencies: - eslint-scope: "npm:^5.0.0" - remix-lib: "npm:0.4.30" - solc: "npm:^0.6.0" - webworkify: "npm:^1.2.1" - checksum: 10/1f52865c2693c7da281e0e77a129e9a87ba47237a4f09989dd6ed26d55bc20fbdcf156aaaaafd44cefebcf82ed1f87ea70b3585a4a026ce6611b35c65b6bf8db +"import-meta-resolve@npm:^4.1.0": + version: 4.1.0 + resolution: "import-meta-resolve@npm:4.1.0" + checksum: 10/40162f67eb406c8d5d49266206ef12ff07b54f5fad8cfd806db9efe3a055958e9969be51d6efaf82e34b8bea6758113dcc17bb79ff148292a4badcabc3472f22 languageName: node linkType: hard -"remix-tests@npm:0.1.34": - version: 0.1.34 - resolution: "remix-tests@npm:0.1.34" - dependencies: - async: "npm:^2.6.0" - change-case: "npm:^3.0.1" - colors: "npm:^1.1.2" - commander: "npm:^2.13.0" - remix-lib: "npm:0.4.30" - remix-simulator: "npm:0.1.9-beta.6" - remix-solidity: "npm:0.3.31" - signale: "npm:^1.4.0" - web3: "npm:^1.2.4" - winston: "npm:^3.0.0" - peerDependencies: - yo-yoify: ^4.3.0 - bin: - remix-tests: ./bin/remix-tests - checksum: 10/aaa5af910b650d7ec4a6b7bd347137abfcc0989c1562f1e9dc6c2c927d07fd0e51a69af7c16c4cd4d8dbb6cba531bd82bf5d8014234b7e6d57a3b60933e4b5b8 +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10/2d30b157a91fe1c1d7c6f653cbf263f039be6c5bfa959245a16d4ee191fc0f2af86c08545b6e6beeb041c56b574d2d5b9f95343d378ab49c0f37394d541e7fc8 languageName: node linkType: hard -"remove-trailing-separator@npm:^1.0.1": - version: 1.1.0 - resolution: "remove-trailing-separator@npm:1.1.0" - checksum: 10/d3c20b5a2d987db13e1cca9385d56ecfa1641bae143b620835ac02a6b70ab88f68f117a0021838db826c57b31373d609d52e4f31aca75fc490c862732d595419 +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 10/cd3f5cbc9ca2d624c6a1f53f12e6b341659aba0e2d3254ae2b4464aaea8b4294cdb09616abbc59458f980531f2429784ed6a420d48d245bcad0811980c9efae9 languageName: node linkType: hard -"renderkid@npm:^3.0.0": - version: 3.0.0 - resolution: "renderkid@npm:3.0.0" - dependencies: - css-select: "npm:^4.1.3" - dom-converter: "npm:^0.2.0" - htmlparser2: "npm:^6.1.0" - lodash: "npm:^4.17.21" - strip-ansi: "npm:^6.0.1" - checksum: 10/434bd56d9930dd344bcba3ef7683f3dd893396b6bc7e8caa551a4cacbe75a9466dc6cf3d75bc324a5979278a73ef968d7854f8f660dbf1a52c38a73f1fb59b20 +"indent-string@npm:^5.0.0": + version: 5.0.0 + resolution: "indent-string@npm:5.0.0" + checksum: 10/e466c27b6373440e6d84fbc19e750219ce25865cb82d578e41a6053d727e5520dc5725217d6eb1cc76005a1bb1696a0f106d84ce7ebda3033b963a38583fb3b3 languageName: node linkType: hard -"repeat-string@npm:^1.5.2, repeat-string@npm:^1.6.1": - version: 1.6.1 - resolution: "repeat-string@npm:1.6.1" - checksum: 10/1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0 +"index-to-position@npm:^0.1.2": + version: 0.1.2 + resolution: "index-to-position@npm:0.1.2" + checksum: 10/ae8e2304ed7c959bc6d1121712e9f625634ed884e32ef93fc0795c6aab1131b10198929a50c7d16d470dab37be7438eccb0afe021d79f69116273d500898daee + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10/d2ebd65441a38c8336c223d1b80b921b9fa737e37ea466fd7e253cb000c64ae1f17fa59e68130ef5bda92cfd8d36b83d37dab0eb0a4558bcfec8e8cdfd2dcb67 languageName: node linkType: hard -"replace@npm:1.2.2": - version: 1.2.2 - resolution: "replace@npm:1.2.2" - dependencies: - chalk: "npm:2.4.2" - minimatch: "npm:3.0.5" - yargs: "npm:^15.3.1" - bin: - replace: bin/replace.js - search: bin/search.js - checksum: 10/275ca1a2cfc12476426420fb9a3dda382450395176b4600fdd76ac7d2876b43af96b4ba82c40e3bb46696d3caa2babef13ea1bbb81371d6dd4416ce4f9f77ffd +"inherits@npm:2, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3, inherits@npm:~2.0.4": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10/cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 languageName: node linkType: hard -"request-promise-core@npm:1.1.2": - version: 1.1.2 - resolution: "request-promise-core@npm:1.1.2" - dependencies: - lodash: "npm:^4.17.11" - peerDependencies: - request: ^2.34 - checksum: 10/e2b15b19fbefef78c0dd54430fd83e0bfa321b21a31df30beaec1dd2a525dd31d8ba48e64b16ecf4d3589f2b2c62abf9e7050c885df8fcefe6fefb602b472c5e +"ini@npm:2.0.0": + version: 2.0.0 + resolution: "ini@npm:2.0.0" + checksum: 10/04e24ba05c4f6947e15560824e153b4610bceea2f5a3ab68651d221a4aab3c77d4e3e90a917ebc8bf5ad71a30a8575de56c39d6b4c4b1375a28016b9f3625f9d languageName: node linkType: hard -"request-promise-core@npm:1.1.4": - version: 1.1.4 - resolution: "request-promise-core@npm:1.1.4" - dependencies: - lodash: "npm:^4.17.19" - peerDependencies: - request: ^2.34 - checksum: 10/79714e46b078c8de539c4de13e78878a3c7e3f33e194547c5ec3f0c8e47b0b222aa1718bbd2dbfb1a7990149041c6cc0be6c5916e03d99f4e75939f2a840046e +"ini@npm:4.1.1": + version: 4.1.1 + resolution: "ini@npm:4.1.1" + checksum: 10/64c7102301742a7527bb17257d18451410eacf63b4b5648a20e108816c355c21c4e8a1761bbcbf3fe8c4ded3297f1b832b885d5e3e485d781e293ebfaf56fea6 languageName: node linkType: hard -"request-promise-native@npm:1.0.7": - version: 1.0.7 - resolution: "request-promise-native@npm:1.0.7" - dependencies: - request-promise-core: "npm:1.1.2" - stealthy-require: "npm:^1.1.1" - tough-cookie: "npm:^2.3.3" - peerDependencies: - request: ^2.34 - checksum: 10/74c4d9305eb821ae3200231bb41cf5370980d74b0c51ce39e6902006b0dd805f4d306d2a163907ab4018787a17eacb35d48377fef21fc09c6d79d15a3c38597b +"ini@npm:^1.3.4, ini@npm:~1.3.0": + version: 1.3.8 + resolution: "ini@npm:1.3.8" + checksum: 10/314ae176e8d4deb3def56106da8002b462221c174ddb7ce0c49ee72c8cd1f9044f7b10cc555a7d8850982c3b9ca96fc212122749f5234bc2b6fb05fb942ed566 languageName: node linkType: hard -"request-promise-native@npm:^1.0.9": - version: 1.0.9 - resolution: "request-promise-native@npm:1.0.9" +"ink@npm:^3.2.0": + version: 3.2.0 + resolution: "ink@npm:3.2.0" dependencies: - request-promise-core: "npm:1.1.4" - stealthy-require: "npm:^1.1.1" - tough-cookie: "npm:^2.3.3" + ansi-escapes: "npm:^4.2.1" + auto-bind: "npm:4.0.0" + chalk: "npm:^4.1.0" + cli-boxes: "npm:^2.2.0" + cli-cursor: "npm:^3.1.0" + cli-truncate: "npm:^2.1.0" + code-excerpt: "npm:^3.0.0" + indent-string: "npm:^4.0.0" + is-ci: "npm:^2.0.0" + lodash: "npm:^4.17.20" + patch-console: "npm:^1.0.0" + react-devtools-core: "npm:^4.19.1" + react-reconciler: "npm:^0.26.2" + scheduler: "npm:^0.20.2" + signal-exit: "npm:^3.0.2" + slice-ansi: "npm:^3.0.0" + stack-utils: "npm:^2.0.2" + string-width: "npm:^4.2.2" + type-fest: "npm:^0.12.0" + widest-line: "npm:^3.1.0" + wrap-ansi: "npm:^6.2.0" + ws: "npm:^7.5.5" + yoga-layout-prebuilt: "npm:^1.9.6" peerDependencies: - request: ^2.34 - checksum: 10/6df0cf75cbddd08b568e462570fb63033f040efdf961f39af572e52821a831a13ee9027db7ba78f1d980759cc7913f2a12a34424deac5a0ec56c5d8ebbf45391 - languageName: node - linkType: hard - -"request@npm:2.88.0": - version: 2.88.0 - resolution: "request@npm:2.88.0" - dependencies: - aws-sign2: "npm:~0.7.0" - aws4: "npm:^1.8.0" - caseless: "npm:~0.12.0" - combined-stream: "npm:~1.0.6" - extend: "npm:~3.0.2" - forever-agent: "npm:~0.6.1" - form-data: "npm:~2.3.2" - har-validator: "npm:~5.1.0" - http-signature: "npm:~1.2.0" - is-typedarray: "npm:~1.0.0" - isstream: "npm:~0.1.2" - json-stringify-safe: "npm:~5.0.1" - mime-types: "npm:~2.1.19" - oauth-sign: "npm:~0.9.0" - performance-now: "npm:^2.1.0" - qs: "npm:~6.5.2" - safe-buffer: "npm:^5.1.2" - tough-cookie: "npm:~2.4.3" - tunnel-agent: "npm:^0.6.0" - uuid: "npm:^3.3.2" - checksum: 10/f4cef6f9af7f6d7c05e73f9a16f974e48a5b8f180cafe0272acf12c59460274034854b8f1e558472966c91906f38e3922644827ff5db5b922b601075e99ee1d5 - languageName: node - linkType: hard - -"request@npm:^2.79.0": - version: 2.88.2 - resolution: "request@npm:2.88.2" - dependencies: - aws-sign2: "npm:~0.7.0" - aws4: "npm:^1.8.0" - caseless: "npm:~0.12.0" - combined-stream: "npm:~1.0.6" - extend: "npm:~3.0.2" - forever-agent: "npm:~0.6.1" - form-data: "npm:~2.3.2" - har-validator: "npm:~5.1.3" - http-signature: "npm:~1.2.0" - is-typedarray: "npm:~1.0.0" - isstream: "npm:~0.1.2" - json-stringify-safe: "npm:~5.0.1" - mime-types: "npm:~2.1.19" - oauth-sign: "npm:~0.9.0" - performance-now: "npm:^2.1.0" - qs: "npm:~6.5.2" - safe-buffer: "npm:^5.1.2" - tough-cookie: "npm:~2.5.0" - tunnel-agent: "npm:^0.6.0" - uuid: "npm:^3.3.2" - checksum: 10/005b8b237b56f1571cfd4ecc09772adaa2e82dcb884fc14ea2bb25e23dbf7c2009f9929e0b6d3fd5802e33ed8ee705a3b594c8f9467c1458cd973872bf89db8e + "@types/react": ">=16.8.0" + react: ">=16.8.0" + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10/cfbd8808cd1ee995440aac7a89af1156e587fec271bc3bc7460788b8b0c844eaf6364ac3d19dd4caa9f8f19bfb97d3fa0a51a5f7d89b6c6b990686ac68f083f6 languageName: node linkType: hard -"require-directory@npm:^2.1.1": - version: 2.1.1 - resolution: "require-directory@npm:2.1.1" - checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf +"inquirer@npm:8.2.5": + version: 8.2.5 + resolution: "inquirer@npm:8.2.5" + dependencies: + ansi-escapes: "npm:^4.2.1" + chalk: "npm:^4.1.1" + cli-cursor: "npm:^3.1.0" + cli-width: "npm:^3.0.0" + external-editor: "npm:^3.0.3" + figures: "npm:^3.0.0" + lodash: "npm:^4.17.21" + mute-stream: "npm:0.0.8" + ora: "npm:^5.4.1" + run-async: "npm:^2.4.0" + rxjs: "npm:^7.5.5" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + through: "npm:^2.3.6" + wrap-ansi: "npm:^7.0.0" + checksum: 10/50a240dfeaca37a14e6a6d11d7d6f7da947be3a9fe1e34ac41db6a49fc27022e7b3875ebe8ccd739497359808694488f3509792cc986f9ac48c43135f4e14172 languageName: node linkType: hard -"require-from-string@npm:^1.1.0": - version: 1.2.1 - resolution: "require-from-string@npm:1.2.1" - checksum: 10/38ecb8375a8096828d976ac80f4195d1fb60432cb76b5156b8d1c846577cae7f19854aa93a304e152b8994f12e19defeea01b1feaf342617b193fc5e12c7aac7 +"inquirer@npm:8.2.6": + version: 8.2.6 + resolution: "inquirer@npm:8.2.6" + dependencies: + ansi-escapes: "npm:^4.2.1" + chalk: "npm:^4.1.1" + cli-cursor: "npm:^3.1.0" + cli-width: "npm:^3.0.0" + external-editor: "npm:^3.0.3" + figures: "npm:^3.0.0" + lodash: "npm:^4.17.21" + mute-stream: "npm:0.0.8" + ora: "npm:^5.4.1" + run-async: "npm:^2.4.0" + rxjs: "npm:^7.5.5" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + through: "npm:^2.3.6" + wrap-ansi: "npm:^6.0.1" + checksum: 10/f642b9e5a94faaba54f277bdda2af0e0a6b592bd7f88c60e1614b5795b19336c7025e0c2923915d5f494f600a02fe8517413779a794415bb79a9563b061d68ab languageName: node linkType: hard -"require-from-string@npm:^2.0.0, require-from-string@npm:^2.0.2": - version: 2.0.2 - resolution: "require-from-string@npm:2.0.2" - checksum: 10/839a3a890102a658f4cb3e7b2aa13a1f80a3a976b512020c3d1efc418491c48a886b6e481ea56afc6c4cb5eef678f23b2a4e70575e7534eccadf5e30ed2e56eb +"inquirer@npm:^9.3.4": + version: 9.3.4 + resolution: "inquirer@npm:9.3.4" + dependencies: + "@inquirer/figures": "npm:^1.0.3" + ansi-escapes: "npm:^4.3.2" + cli-width: "npm:^4.1.0" + external-editor: "npm:^3.1.0" + mute-stream: "npm:1.0.0" + ora: "npm:^5.4.1" + run-async: "npm:^3.0.0" + rxjs: "npm:^7.8.1" + string-width: "npm:^4.2.3" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^6.2.0" + yoctocolors-cjs: "npm:^2.1.2" + checksum: 10/f9d20820ad07bfaa98ad1b0e1bb65da9cb020edafda25f781a28e7fe0fc98eb15b3fe95687258140a24a6bc9d209740d38ab17cc265c12fa6738db530c71b17e languageName: node linkType: hard -"require-main-filename@npm:^1.0.1": - version: 1.0.1 - resolution: "require-main-filename@npm:1.0.1" - checksum: 10/49e4586207c138dabe885cffb9484f3f4583fc839851cd6705466eb343d8bb6af7dfa3d8e611fbd44d40441d4cddaadb34b4d537092b92adafa6a6f440dc1da8 +"internal-slot@npm:^1.0.3": + version: 1.0.3 + resolution: "internal-slot@npm:1.0.3" + dependencies: + get-intrinsic: "npm:^1.1.0" + has: "npm:^1.0.3" + side-channel: "npm:^1.0.4" + checksum: 10/1c6d22f7977b325e51387191a992a553bf7c380db548a32c09bbb4563a799d739d3ef629841234290a032dc555ca7e89178e8a35404dad77b55f2676be8a1ba2 languageName: node linkType: hard -"require-main-filename@npm:^2.0.0": - version: 2.0.0 - resolution: "require-main-filename@npm:2.0.0" - checksum: 10/8604a570c06a69c9d939275becc33a65676529e1c3e5a9f42d58471674df79357872b96d70bb93a0380a62d60dc9031c98b1a9dad98c946ffdd61b7ac0c8cedd +"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.5": + version: 1.0.5 + resolution: "internal-slot@npm:1.0.5" + dependencies: + get-intrinsic: "npm:^1.2.0" + has: "npm:^1.0.3" + side-channel: "npm:^1.0.4" + checksum: 10/e2eb5b348e427957dd4092cb57b9374a2cbcabbf61e5e5b4d99cb68eeaae29394e8efd79f23dc2b1831253346f3c16b82010737b84841225e934d80d04d68643 languageName: node linkType: hard -"require-package-name@npm:^2.0.1": - version: 2.0.1 - resolution: "require-package-name@npm:2.0.1" - checksum: 10/3332d4eec10a730627ca20f37a8a7d57badd9e8953f238472aa457b0084907f86ca5b2af94694a0c8bb2e1101bdb3ed6ddc964d2044b040fe076a9bf5b19755f +"internal-slot@npm:^1.0.7": + version: 1.0.7 + resolution: "internal-slot@npm:1.0.7" + dependencies: + es-errors: "npm:^1.3.0" + hasown: "npm:^2.0.0" + side-channel: "npm:^1.0.4" + checksum: 10/3e66720508831153ecf37d13def9f6856f9f2960989ec8a0a0476c98f887fca9eff0163127466485cb825c900c2d6fc601aa9117b7783b90ffce23a71ea5d053 languageName: node linkType: hard -"require-uncached@npm:^1.0.2, require-uncached@npm:^1.0.3": - version: 1.0.3 - resolution: "require-uncached@npm:1.0.3" - dependencies: - caller-path: "npm:^0.1.0" - resolve-from: "npm:^1.0.0" - checksum: 10/ace5261d38072130d1fefcfe9662b0d038fe1e38988a801be3e90fbfcab9f6786eeadcf53ac36d6d81b676b29649c7dc5719be0ee571f63058f842838d704bee +"interpret@npm:^2.2.0": + version: 2.2.0 + resolution: "interpret@npm:2.2.0" + checksum: 10/a62d4de5c1f8ab1fd0ccc8a1a8cca8dc31e14928b70364f0787576fe4639c0c463bd79cfe58c9bd9f54db9b7e53d3e646e68fb7627c6b65e3b0e3893156c5126 languageName: node linkType: hard -"requirejs-config-file@npm:^4.0.0": - version: 4.0.0 - resolution: "requirejs-config-file@npm:4.0.0" - dependencies: - esprima: "npm:^4.0.0" - stringify-object: "npm:^3.2.1" - checksum: 10/9fc55813ca8627cc4d3704622702b6b119a222c97825fc61459727d5f9ef9435e4fd34ee03335dc119c66e834d7963fdfe43d9a4df99448d43219587c624ba4e +"ip@npm:^1.1.5": + version: 1.1.5 + resolution: "ip@npm:1.1.5" + checksum: 10/40a00572cf06b53f4c7b7fe6270a8427ef4c6c0820a380f9f1eb48a323eb09c7dbd16245b472cf5a2d083911d0deae4d712b6e6c88b346fa274e8ce07756a7d6 languageName: node linkType: hard -"requirejs@npm:^2.3.6": - version: 2.3.7 - resolution: "requirejs@npm:2.3.7" - bin: - r.js: bin/r.js - r_js: bin/r.js - checksum: 10/7f42af10d8af210a2769501004b34f9dad4c39716f008f91faeef36c33b60a5f372ca1025c8f40b262f2522fd1ea0f36fd11e9587cba14311fac0df51a8571b0 +"ip@npm:^2.0.0": + version: 2.0.0 + resolution: "ip@npm:2.0.0" + checksum: 10/1270b11e534a466fb4cf4426cbcc3a907c429389f7f4e4e3b288b42823562e88d6a509ceda8141a507de147ca506141f745005c0aa144569d94cf24a54eb52bc languageName: node linkType: hard -"requires-port@npm:^1.0.0": - version: 1.0.0 - resolution: "requires-port@npm:1.0.0" - checksum: 10/878880ee78ccdce372784f62f52a272048e2d0827c29ae31e7f99da18b62a2b9463ea03a75f277352f4697c100183debb0532371ad515a2d49d4bfe596dd4c20 +"is-arguments@npm:^1.0.4, is-arguments@npm:^1.1.1": + version: 1.1.1 + resolution: "is-arguments@npm:1.1.1" + dependencies: + call-bind: "npm:^1.0.2" + has-tostringtag: "npm:^1.0.0" + checksum: 10/a170c7e26082e10de9be6e96d32ae3db4d5906194051b792e85fae3393b53cf2cb5b3557863e5c8ccbab55e2fd8f2f75aa643d437613f72052cf0356615c34be languageName: node linkType: hard -"reselect-tree@npm:^1.3.7": - version: 1.3.7 - resolution: "reselect-tree@npm:1.3.7" +"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": + version: 3.0.2 + resolution: "is-array-buffer@npm:3.0.2" dependencies: - debug: "npm:^3.1.0" - json-pointer: "npm:^0.6.1" - reselect: "npm:^4.0.0" - checksum: 10/d9cd4795d82f0b0209bfd46bd5c0d110c83ca914938b7374dd1b818d986fdd29029653fcf6d03a4d2dee7cff667f04a8b7fa6cfb912821d2e0db7958984a2f27 + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.2.0" + is-typed-array: "npm:^1.1.10" + checksum: 10/dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 languageName: node linkType: hard -"reselect@npm:^4.0.0": - version: 4.1.8 - resolution: "reselect@npm:4.1.8" - checksum: 10/199984d9872f71cd207f4aa6e6fd2bd48d95154f7aa9b3aee3398335f39f5491059e732f28c12e9031d5d434adab2c458dc8af5afb6564d0ad37e1644445e09c +"is-array-buffer@npm:^3.0.4": + version: 3.0.4 + resolution: "is-array-buffer@npm:3.0.4" + dependencies: + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.2.1" + checksum: 10/34a26213d981d58b30724ef37a1e0682f4040d580fa9ff58fdfdd3cefcb2287921718c63971c1c404951e7b747c50fdc7caf6e867e951353fa71b369c04c969b languageName: node linkType: hard -"resolve-alpn@npm:^1.2.0": - version: 1.2.1 - resolution: "resolve-alpn@npm:1.2.1" - checksum: 10/744e87888f0b6fa0b256ab454ca0b9c0b80808715e2ef1f3672773665c92a941f6181194e30ccae4a8cd0adbe0d955d3f133102636d2ee0cca0119fec0bc9aec +"is-arrayish@npm:^0.2.1": + version: 0.2.1 + resolution: "is-arrayish@npm:0.2.1" + checksum: 10/73ced84fa35e59e2c57da2d01e12cd01479f381d7f122ce41dcbb713f09dbfc651315832cd2bf8accba7681a69e4d6f1e03941d94dd10040d415086360e7005e languageName: node linkType: hard -"resolve-cwd@npm:^3.0.0": - version: 3.0.0 - resolution: "resolve-cwd@npm:3.0.0" +"is-bigint@npm:^1.0.1": + version: 1.0.4 + resolution: "is-bigint@npm:1.0.4" dependencies: - resolve-from: "npm:^5.0.0" - checksum: 10/546e0816012d65778e580ad62b29e975a642989108d9a3c5beabfb2304192fa3c9f9146fbdfe213563c6ff51975ae41bac1d3c6e047dd9572c94863a057b4d81 + has-bigints: "npm:^1.0.1" + checksum: 10/cc981cf0564c503aaccc1e5f39e994ae16ae2d1a8fcd14721f14ad431809071f39ec568cfceef901cff408045f1a6d6bac90d1b43eeb0b8e3bc34c8eb1bdb4c4 languageName: node linkType: hard -"resolve-dependency-path@npm:^3.0.2": - version: 3.0.2 - resolution: "resolve-dependency-path@npm:3.0.2" - checksum: 10/d042bef325ce8dbdbe57f37f93851b2c5651e06378b9f352ceef2c28aa99dc6ae793be7795e8bf4ad18b40769ee06d8e049ce8206f183c9afe9812fd48ef6d8c +"is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e languageName: node linkType: hard -"resolve-dir@npm:^1.0.0, resolve-dir@npm:^1.0.1": - version: 1.0.1 - resolution: "resolve-dir@npm:1.0.1" +"is-boolean-object@npm:^1.1.0": + version: 1.1.2 + resolution: "is-boolean-object@npm:1.1.2" dependencies: - expand-tilde: "npm:^2.0.0" - global-modules: "npm:^1.0.0" - checksum: 10/ef736b8ed60d6645c3b573da17d329bfb50ec4e1d6c5ffd6df49e3497acef9226f9810ea6823b8ece1560e01dcb13f77a9f6180d4f242d00cc9a8f4de909c65c + call-bind: "npm:^1.0.2" + has-tostringtag: "npm:^1.0.0" + checksum: 10/ba794223b56a49a9f185e945eeeb6b7833b8ea52a335cec087d08196cf27b538940001615d3bb976511287cefe94e5907d55f00bb49580533f9ca9b4515fcc2e languageName: node linkType: hard -"resolve-from@npm:5.0.0, resolve-from@npm:^5.0.0": - version: 5.0.0 - resolution: "resolve-from@npm:5.0.0" - checksum: 10/be18a5e4d76dd711778664829841cde690971d02b6cbae277735a09c1c28f407b99ef6ef3cd585a1e6546d4097b28df40ed32c4a287b9699dcf6d7f208495e23 +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.4": + version: 1.2.4 + resolution: "is-callable@npm:1.2.4" + checksum: 10/4e3d8c08208475e74a4108a9dc44dbcb74978782e38a1d1b55388342a4824685765d95917622efa2ca1483f7c4dbec631dd979cbb3ebd239f57a75c83a46d99f languageName: node linkType: hard -"resolve-from@npm:^1.0.0": - version: 1.0.1 - resolution: "resolve-from@npm:1.0.1" - checksum: 10/10134654dd6e758d4a4ad60acf69a90731673058a1a96068afc5f2ee84ac373df4d0237e0f052b5c81cc076273213ed50d228fc09723e0840c5c61ea37eb8854 +"is-callable@npm:^1.2.7": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: 10/48a9297fb92c99e9df48706241a189da362bff3003354aea4048bd5f7b2eb0d823cd16d0a383cece3d76166ba16d85d9659165ac6fcce1ac12e6c649d66dbdb9 languageName: node linkType: hard -"resolve-from@npm:^2.0.0": +"is-ci@npm:^2.0.0": version: 2.0.0 - resolution: "resolve-from@npm:2.0.0" - checksum: 10/02db4c30fecddef0efafbafb2d66b96c4a80f91d103d9850be3b85d1feb65b6af6c818d137dc546cea7d0288c21e13aa0fb4580af9af34b08052b3516690c5f3 + resolution: "is-ci@npm:2.0.0" + dependencies: + ci-info: "npm:^2.0.0" + bin: + is-ci: bin.js + checksum: 10/77b869057510f3efa439bbb36e9be429d53b3f51abd4776eeea79ab3b221337fe1753d1e50058a9e2c650d38246108beffb15ccfd443929d77748d8c0cc90144 languageName: node linkType: hard -"resolve-from@npm:^3.0.0": - version: 3.0.0 - resolution: "resolve-from@npm:3.0.0" - checksum: 10/c4189f1592a777f7d51c1ff6153df18b5d062c831fb0c623b4b87736c8a73c08e4eaab19e807399287040791f3e7aa0877f05f9d86739d3ef1ef0c727e9fe06c +"is-ci@npm:^3.0.1": + version: 3.0.1 + resolution: "is-ci@npm:3.0.1" + dependencies: + ci-info: "npm:^3.2.0" + bin: + is-ci: bin.js + checksum: 10/192c66dc7826d58f803ecae624860dccf1899fc1f3ac5505284c0a5cf5f889046ffeb958fa651e5725d5705c5bcb14f055b79150ea5fcad7456a9569de60260e languageName: node linkType: hard -"resolve-from@npm:^4.0.0": - version: 4.0.0 - resolution: "resolve-from@npm:4.0.0" - checksum: 10/91eb76ce83621eea7bbdd9b55121a5c1c4a39e54a9ce04a9ad4517f102f8b5131c2cf07622c738a6683991bf54f2ce178f5a42803ecbd527ddc5105f362cc9e3 +"is-core-module@npm:^2.12.0, is-core-module@npm:^2.13.1": + version: 2.13.1 + resolution: "is-core-module@npm:2.13.1" + dependencies: + hasown: "npm:^2.0.0" + checksum: 10/d53bd0cc24b0a0351fb4b206ee3908f71b9bbf1c47e9c9e14e5f06d292af1663704d2abd7e67700d6487b2b7864e0d0f6f10a1edf1892864bdffcb197d1845a2 languageName: node linkType: hard -"resolve-global@npm:1.0.0, resolve-global@npm:^1.0.0": - version: 1.0.0 - resolution: "resolve-global@npm:1.0.0" +"is-core-module@npm:^2.13.0": + version: 2.13.0 + resolution: "is-core-module@npm:2.13.0" dependencies: - global-dirs: "npm:^0.1.1" - checksum: 10/c4e11d33e84bde7516b824503ffbe4b6cce863d5ce485680fd3db997b7c64da1df98321b1fd0703b58be8bc9bc83bc96bd83043f96194386b45eb47229efb6b6 + has: "npm:^1.0.3" + checksum: 10/55ccb5ccd208a1e088027065ee6438a99367e4c31c366b52fbaeac8fa23111cd17852111836d904da604801b3286d38d3d1ffa6cd7400231af8587f021099dc6 languageName: node linkType: hard -"resolve-pkg-maps@npm:^1.0.0": - version: 1.0.0 - resolution: "resolve-pkg-maps@npm:1.0.0" - checksum: 10/0763150adf303040c304009231314d1e84c6e5ebfa2d82b7d94e96a6e82bacd1dcc0b58ae257315f3c8adb89a91d8d0f12928241cba2df1680fbe6f60bf99b0e +"is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1": + version: 2.8.1 + resolution: "is-core-module@npm:2.8.1" + dependencies: + has: "npm:^1.0.3" + checksum: 10/80b33fbd450c3b7070a8ea101b730a8ae0aee326bb665cdb067220edbc98fb847d1294f8ded036d5b022827fb8d3e6fcf30313a601785c5d902db7660f6cd7b1 languageName: node linkType: hard -"resolve-url-loader@npm:5.0.0": - version: 5.0.0 - resolution: "resolve-url-loader@npm:5.0.0" +"is-core-module@npm:^2.9.0": + version: 2.12.1 + resolution: "is-core-module@npm:2.12.1" dependencies: - adjust-sourcemap-loader: "npm:^4.0.0" - convert-source-map: "npm:^1.7.0" - loader-utils: "npm:^2.0.0" - postcss: "npm:^8.2.14" - source-map: "npm:0.6.1" - checksum: 10/fb013845b49d4214995536471d0d7ee6a45208e6902e61d270ae0b7c77bf51800c8bd2671aabc6a0ad6a5a9fbe224142a5e23b7016a76a16b1e2748405581cb0 + has: "npm:^1.0.3" + checksum: 10/35d5f90c95f7c737d287121e924bdfcad0a47b33efd7f89c58e9ab3810b43b1f1d377b641797326bde500e47edf5a7bf74a464e0c336a5c7e827b13fa41b57af languageName: node linkType: hard -"resolve-url-loader@npm:^4.0.0": - version: 4.0.0 - resolution: "resolve-url-loader@npm:4.0.0" +"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": + version: 1.0.5 + resolution: "is-date-object@npm:1.0.5" dependencies: - adjust-sourcemap-loader: "npm:^4.0.0" - convert-source-map: "npm:^1.7.0" - loader-utils: "npm:^2.0.0" - postcss: "npm:^7.0.35" - source-map: "npm:0.6.1" - peerDependencies: - rework: 1.0.1 - rework-visit: 1.0.0 - peerDependenciesMeta: - rework: - optional: true - rework-visit: - optional: true - checksum: 10/f61d8f31e621a8368d1a76118886cb6bccb536bd8fa0909d3527e0e2072d313f80017de6dfaa070ebdeb2dd80292ecd7099b2e08b627476fd2f0f0d593e35f08 + has-tostringtag: "npm:^1.0.0" + checksum: 10/cc80b3a4b42238fa0d358b9a6230dae40548b349e64a477cb7c5eff9b176ba194c11f8321daaf6dd157e44073e9b7fd01f87db1f14952a88d5657acdcd3a56e2 languageName: node linkType: hard -"resolve-url@npm:^0.2.1": - version: 0.2.1 - resolution: "resolve-url@npm:0.2.1" - checksum: 10/c8bbf6385730add6657103929ebd7e4aa623a2c2df29bba28a58fec73097c003edcce475efefa51c448a904aa344a4ebabe6ad85c8e75c72c4ce9a0c0b5652d2 +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 languageName: node linkType: hard -"resolve.exports@npm:^1.1.0": - version: 1.1.1 - resolution: "resolve.exports@npm:1.1.1" - checksum: 10/de58c30aca30883f0e29910e4ad1b7b9986ec5f69434ef2e957ddbe52d3250e138ddd2688e8cd67909b4ee9bf3437424c718a5962d59edd610f035b861ef8441 +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 languageName: node linkType: hard -"resolve.exports@npm:^2.0.0": - version: 2.0.2 - resolution: "resolve.exports@npm:2.0.2" - checksum: 10/f1cc0b6680f9a7e0345d783e0547f2a5110d8336b3c2a4227231dd007271ffd331fd722df934f017af90bae0373920ca0d4005da6f76cb3176c8ae426370f893 +"is-generator-fn@npm:^2.0.0": + version: 2.1.0 + resolution: "is-generator-fn@npm:2.1.0" + checksum: 10/a6ad5492cf9d1746f73b6744e0c43c0020510b59d56ddcb78a91cbc173f09b5e6beff53d75c9c5a29feb618bfef2bf458e025ecf3a57ad2268e2fb2569f56215 languageName: node linkType: hard -"resolve@npm:1.17.0": - version: 1.17.0 - resolution: "resolve@npm:1.17.0" +"is-generator-function@npm:^1.0.7": + version: 1.0.10 + resolution: "is-generator-function@npm:1.0.10" dependencies: - path-parse: "npm:^1.0.6" - checksum: 10/74141da8c56192fd46f6aa887864f8fd74c1755425174526610cb775177278bb414c6f6feb3051ccd73d774d2ae124c6c97e463e30d7ffd9a87f7da202b851dd + has-tostringtag: "npm:^1.0.0" + checksum: 10/499a3ce6361064c3bd27fbff5c8000212d48506ebe1977842bbd7b3e708832d0deb1f4cc69186ece3640770e8c4f1287b24d99588a0b8058b2dbdd344bc1f47f languageName: node linkType: hard -"resolve@npm:1.22.2": - version: 1.22.2 - resolution: "resolve@npm:1.22.2" +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" dependencies: - is-core-module: "npm:^2.11.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/116c5b221ed436dbe623a892102a6241f35bcca440c29693e1e4c81a5f1ebc1b8ce5bba301405160a937e1f36015a1f4a7af58d3e9c4c85fc791cf63c04774be + is-extglob: "npm:^2.1.1" + checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 languageName: node linkType: hard -"resolve@npm:1.22.8, resolve@npm:^1.19.0, resolve@npm:^1.22.0, resolve@npm:^1.22.2, resolve@npm:^1.22.3": - version: 1.22.8 - resolution: "resolve@npm:1.22.8" +"is-installed-globally@npm:^0.4.0": + version: 0.4.0 + resolution: "is-installed-globally@npm:0.4.0" dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/c473506ee01eb45cbcfefb68652ae5759e092e6b0fb64547feadf9736a6394f258fbc6f88e00c5ca36d5477fbb65388b272432a3600fa223062e54333c156753 + global-dirs: "npm:^3.0.0" + is-path-inside: "npm:^3.0.2" + checksum: 10/5294d21c82cb9beedd693ce1dfb12117c4db36d6e35edc9dc6bf06cb300d23c96520d1bfb063386b054268ae3d7255c3f09393b52218cc26ace99b217bf37c93 languageName: node linkType: hard -"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.14.2, resolve@npm:^1.20.0, resolve@npm:^1.3.2, resolve@npm:^1.9.0": - version: 1.22.0 - resolution: "resolve@npm:1.22.0" - dependencies: - is-core-module: "npm:^2.8.1" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/b2f7405d3092f8bb537105b364378698dd0e7428dd3e76a3f00424cdc0bf8a1d85c3f5dab036fd04154e29c8fc221a591697ec699eb1cbd37d9a628b8bb7ccf5 +"is-interactive@npm:^1.0.0": + version: 1.0.0 + resolution: "is-interactive@npm:1.0.0" + checksum: 10/824808776e2d468b2916cdd6c16acacebce060d844c35ca6d82267da692e92c3a16fdba624c50b54a63f38bdc4016055b6f443ce57d7147240de4f8cdabaf6f9 languageName: node linkType: hard -"resolve@npm:^1.1.7, resolve@npm:^1.22.4, resolve@npm:^1.3.3": - version: 1.22.4 - resolution: "resolve@npm:1.22.4" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/5634f87e72888b139a7cb544213504cc0c6dcd82c6f67ce810b4ca6b3367ddb2aeed5f21c9bb6cd8f3115f0b7e6c0980ef25eeb0dcbd188d9590bb5c84d2d253 +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 10/93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 languageName: node linkType: hard -"resolve@npm:^2.0.0-next.4": - version: 2.0.0-next.4 - resolution: "resolve@npm:2.0.0-next.4" - dependencies: - is-core-module: "npm:^2.9.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/20d5293f5015aa0b65c488ee365f9dfc30b954b04f9074425a6fb738d78fa63825a82ba8574b7ee200af7ebd5e98c41786831d1d4c1612da3cd063980dfa06a3 +"is-map@npm:^2.0.1, is-map@npm:^2.0.2": + version: 2.0.2 + resolution: "is-map@npm:2.0.2" + checksum: 10/60ba910f835f2eacb1fdf5b5a6c60fe1c702d012a7673e6546992bcc0c873f62ada6e13d327f9e48f1720d49c152d6cdecae1fa47a261ef3d247c3ce6f0e1d39 languageName: node linkType: hard -"resolve@patch:resolve@npm%3A1.17.0#optional!builtin": - version: 1.17.0 - resolution: "resolve@patch:resolve@npm%3A1.17.0#optional!builtin::version=1.17.0&hash=c3c19d" +"is-nan@npm:^1.2.1": + version: 1.3.2 + resolution: "is-nan@npm:1.3.2" dependencies: - path-parse: "npm:^1.0.6" - checksum: 10/02e87fe9233d169fdc5220572c7b8933c9e23323aaecfd5b8d0b106a7f09dc676dd4d380e66c72b1369489292bcb337b13aad28b480a1bde5a5c040ff16758ea + call-bind: "npm:^1.0.0" + define-properties: "npm:^1.1.3" + checksum: 10/1f784d3472c09bc2e47acba7ffd4f6c93b0394479aa613311dc1d70f1bfa72eb0846c81350967722c959ba65811bae222204d6c65856fdce68f31986140c7b0e languageName: node linkType: hard -"resolve@patch:resolve@npm%3A1.22.2#optional!builtin": - version: 1.22.2 - resolution: "resolve@patch:resolve@npm%3A1.22.2#optional!builtin::version=1.22.2&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.11.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/14594f99dbff19c1f51f6daac0caf0b75ed345256ada3722c23f63935eace79532dcfa349b3d8889d2771c143822c38dd5d7d8eb85fb8cff257b7abccbad7872 +"is-negative-zero@npm:^2.0.1, is-negative-zero@npm:^2.0.2": + version: 2.0.2 + resolution: "is-negative-zero@npm:2.0.2" + checksum: 10/edbec1a9e6454d68bf595a114c3a72343d2d0be7761d8173dae46c0b73d05bb8fe9398c85d121e7794a66467d2f40b4a610b0be84cd804262d234fc634c86131 languageName: node linkType: hard -"resolve@patch:resolve@npm%3A1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin": - version: 1.22.8 - resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/f345cd37f56a2c0275e3fe062517c650bb673815d885e7507566df589375d165bbbf4bdb6aa95600a9bc55f4744b81f452b5a63f95b9f10a72787dba3c90890a +"is-negative-zero@npm:^2.0.3": + version: 2.0.3 + resolution: "is-negative-zero@npm:2.0.3" + checksum: 10/8fe5cffd8d4fb2ec7b49d657e1691889778d037494c6f40f4d1a524cadd658b4b53ad7b6b73a59bcb4b143ae9a3d15829af864b2c0f9d65ac1e678c4c80f17e5 languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.3.2#optional!builtin, resolve@patch:resolve@npm%3A^1.9.0#optional!builtin": - version: 1.22.0 - resolution: "resolve@patch:resolve@npm%3A1.22.0#optional!builtin::version=1.22.0&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.8.1" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/cb53ccafb067fb04989dbff2ce7186d03f4a55b7283eab91b545d614b336dc509faa5c71210ce77ab1a4b0f7de4ffbccc170febcbeef40bf5a09b9ddb05bf447 +"is-npm@npm:^5.0.0": + version: 5.0.0 + resolution: "is-npm@npm:5.0.0" + checksum: 10/9baff02b0c69a3d3c79b162cb2f9e67fb40ef6d172c16601b2e2471c21e9a4fa1fc9885a308d7bc6f3a3cd2a324c27fa0bf284c133c3349bb22571ab70d041cc languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin, resolve@patch:resolve@npm%3A^1.3.3#optional!builtin": - version: 1.22.4 - resolution: "resolve@patch:resolve@npm%3A1.22.4#optional!builtin::version=1.22.4&hash=c3c19d" +"is-number-object@npm:^1.0.4": + version: 1.0.6 + resolution: "is-number-object@npm:1.0.6" dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/13262490c7b0ac54f6397f1d45ee139ebd2e431781e2ff0d9c27bf41648a349a90bc23a3ab2768f0f821efdd2cba08fb85f21288fc0cc01718c03557fbd285bc + has-tostringtag: "npm:^1.0.0" + checksum: 10/d848fdc0fc69e30866b87fcaae17a3e68a8be669073ab3bf9a578c29106a2d5084089a2e7bc40819ec55eac94a52d9e20d735e7bfd3a46202b17199e555f91fa languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^2.0.0-next.4#optional!builtin": - version: 2.0.0-next.4 - resolution: "resolve@patch:resolve@npm%3A2.0.0-next.4#optional!builtin::version=2.0.0-next.4&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.9.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/27bff19d8219385bb1e271066317e553cff18daa2a19db9598d94ae444417ef3f5aec19e86927872d6cb241d02649cfb35a4c0d9d10ef2afa6325bce8bc8d903 +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 languageName: node linkType: hard -"responselike@npm:^1.0.2": - version: 1.0.2 - resolution: "responselike@npm:1.0.2" - dependencies: - lowercase-keys: "npm:^1.0.0" - checksum: 10/2e9e70f1dcca3da621a80ce71f2f9a9cad12c047145c6ece20df22f0743f051cf7c73505e109814915f23f9e34fb0d358e22827723ee3d56b623533cab8eafcd +"is-obj@npm:^1.0.1": + version: 1.0.1 + resolution: "is-obj@npm:1.0.1" + checksum: 10/3ccf0efdea12951e0b9c784e2b00e77e87b2f8bd30b42a498548a8afcc11b3287342a2030c308e473e93a7a19c9ea7854c99a8832a476591c727df2a9c79796c languageName: node linkType: hard -"responselike@npm:^2.0.0": - version: 2.0.1 - resolution: "responselike@npm:2.0.1" - dependencies: - lowercase-keys: "npm:^2.0.0" - checksum: 10/b122535466e9c97b55e69c7f18e2be0ce3823c5d47ee8de0d9c0b114aa55741c6db8bfbfce3766a94d1272e61bfb1ebf0a15e9310ac5629fbb7446a861b4fd3a +"is-obj@npm:^2.0.0": + version: 2.0.0 + resolution: "is-obj@npm:2.0.0" + checksum: 10/c9916ac8f4621962a42f5e80e7ffdb1d79a3fab7456ceaeea394cd9e0858d04f985a9ace45be44433bf605673c8be8810540fe4cc7f4266fc7526ced95af5a08 languageName: node linkType: hard -"responselike@npm:^3.0.0": +"is-path-cwd@npm:^3.0.0": version: 3.0.0 - resolution: "responselike@npm:3.0.0" - dependencies: - lowercase-keys: "npm:^3.0.0" - checksum: 10/e0cc9be30df4f415d6d83cdede3c5c887cd4a73e7cc1708bcaab1d50a28d15acb68460ac5b02bcc55a42f3d493729c8856427dcf6e57e6e128ad05cba4cfb95e + resolution: "is-path-cwd@npm:3.0.0" + checksum: 10/bc34d13b6a03dfca4a3ab6a8a5ba78ae4b24f4f1db4b2b031d2760c60d0913bd16a4b980dcb4e590adfc906649d5f5132684079a3972bd219da49deebb9adea8 languageName: node linkType: hard -"restore-cursor@npm:^1.0.1": - version: 1.0.1 - resolution: "restore-cursor@npm:1.0.1" - dependencies: - exit-hook: "npm:^1.0.0" - onetime: "npm:^1.0.0" - checksum: 10/e40bd1a540d69970341fc734dfada908815a44f91903211f34d32c47da33f6e7824bbc97f6e76aff387137d6b2a1ada3d3d2dc1b654b8accdc8ed5721c46cbfa +"is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": + version: 3.0.3 + resolution: "is-path-inside@npm:3.0.3" + checksum: 10/abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 languageName: node linkType: hard -"restore-cursor@npm:^2.0.0": - version: 2.0.0 - resolution: "restore-cursor@npm:2.0.0" - dependencies: - onetime: "npm:^2.0.0" - signal-exit: "npm:^3.0.2" - checksum: 10/482e13d02d834b6e5e3aa90304a8b5e840775d6f06916cc92a50038adf9f098dcc72405b567da8a37e137ae40ad3e31896fa3136ae62f7a426c2fbf53d036536 +"is-path-inside@npm:^4.0.0": + version: 4.0.0 + resolution: "is-path-inside@npm:4.0.0" + checksum: 10/8810fa11c58e6360b82c3e0d6cd7d9c7d0392d3ac9eb10f980b81f9839f40ac6d1d6d6f05d069db0d227759801228f0b072e1b6c343e4469b065ab5fe0b68fe5 languageName: node linkType: hard -"restore-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "restore-cursor@npm:3.1.0" - dependencies: - onetime: "npm:^5.1.0" - signal-exit: "npm:^3.0.2" - checksum: 10/f877dd8741796b909f2a82454ec111afb84eb45890eb49ac947d87991379406b3b83ff9673a46012fca0d7844bb989f45cc5b788254cf1a39b6b5a9659de0630 +"is-plain-obj@npm:2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: 10/cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa languageName: node linkType: hard -"ret@npm:~0.1.10": - version: 0.1.15 - resolution: "ret@npm:0.1.15" - checksum: 10/07c9e7619b4c86053fa57689bf7606b5a40fc1231fc87682424d0b3e296641cc19c218c3b8a8917305fbcca3bfc43038a5b6a63f54755c1bbca2f91857253b03 +"is-plain-obj@npm:^1.1.0": + version: 1.1.0 + resolution: "is-plain-obj@npm:1.1.0" + checksum: 10/0ee04807797aad50859652a7467481816cbb57e5cc97d813a7dcd8915da8195dc68c436010bf39d195226cde6a2d352f4b815f16f26b7bf486a5754290629931 languageName: node linkType: hard -"ret@npm:~0.4.0": - version: 0.4.3 - resolution: "ret@npm:0.4.3" - checksum: 10/d6a00f0920400b78b6aa96ce1c953d2f783f4fd5d56b5e842a744c40e33545e7955fb132386ada406361881353292fe7282f4e6e82b2c1e61f6c96a6ea4bb2d7 +"is-plain-obj@npm:^4.0.0": + version: 4.1.0 + resolution: "is-plain-obj@npm:4.1.0" + checksum: 10/6dc45da70d04a81f35c9310971e78a6a3c7a63547ef782e3a07ee3674695081b6ca4e977fbb8efc48dae3375e0b34558d2bcd722aec9bddfa2d7db5b041be8ce languageName: node linkType: hard -"retimer@npm:^3.0.0": - version: 3.0.0 - resolution: "retimer@npm:3.0.0" - checksum: 10/8201e658f67cfa57de2daad4a493a199a51f3b7b6bcd753ebde4dd30d063b7aa357bfbcedfc130a2c3726fd5241f1353d7e1dd80aa72b182a7021ba7c1d57c6c +"is-plain-object@npm:^2.0.4": + version: 2.0.4 + resolution: "is-plain-object@npm:2.0.4" + dependencies: + isobject: "npm:^3.0.1" + checksum: 10/2a401140cfd86cabe25214956ae2cfee6fbd8186809555cd0e84574f88de7b17abacb2e477a6a658fa54c6083ecbda1e6ae404c7720244cd198903848fca70ca languageName: node linkType: hard -"retry-request@npm:^6.0.0": - version: 6.0.0 - resolution: "retry-request@npm:6.0.0" - dependencies: - debug: "npm:^4.1.1" - extend: "npm:^3.0.2" - checksum: 10/b7e6fa4a201bf285d4439e3d921837e73d0e48c5f17395cbe9f7de040f7d58c204e9bdc88e4b5ec847ff736be3a67ac56e092ee32a5af03c35e4d7f12a1dc1d8 +"is-plain-object@npm:^5.0.0": + version: 5.0.0 + resolution: "is-plain-object@npm:5.0.0" + checksum: 10/e32d27061eef62c0847d303125440a38660517e586f2f3db7c9d179ae5b6674ab0f469d519b2e25c147a1a3bc87156d0d5f4d8821e0ce4a9ee7fe1fcf11ce45c languageName: node linkType: hard -"retry-request@npm:^7.0.0": - version: 7.0.1 - resolution: "retry-request@npm:7.0.1" - dependencies: - "@types/request": "npm:^2.48.8" - debug: "npm:^4.1.1" - extend: "npm:^3.0.2" - teeny-request: "npm:^9.0.0" - checksum: 10/8c03623ece258886d67d43f21d140f4766d71c27f9fbae492d9aea2f0b5c4e0f0c89177c6f27a71489d5461b612814141ffaca43c136a77fb1d75f204ea5df88 +"is-promise@npm:^2.1.0": + version: 2.2.2 + resolution: "is-promise@npm:2.2.2" + checksum: 10/18bf7d1c59953e0ad82a1ed963fb3dc0d135c8f299a14f89a17af312fc918373136e56028e8831700e1933519630cc2fd4179a777030330fde20d34e96f40c78 languageName: node linkType: hard -"retry@npm:0.13.1, retry@npm:^0.13.1": - version: 0.13.1 - resolution: "retry@npm:0.13.1" - checksum: 10/6125ec2e06d6e47e9201539c887defba4e47f63471db304c59e4b82fc63c8e89ca06a77e9d34939a9a42a76f00774b2f46c0d4a4cbb3e287268bd018ed69426d +"is-regex@npm:^1.1.4": + version: 1.1.4 + resolution: "is-regex@npm:1.1.4" + dependencies: + call-bind: "npm:^1.0.2" + has-tostringtag: "npm:^1.0.0" + checksum: 10/36d9174d16d520b489a5e9001d7d8d8624103b387be300c50f860d9414556d0485d74a612fdafc6ebbd5c89213d947dcc6b6bff6b2312093f71ea03cbb19e564 languageName: node linkType: hard -"retry@npm:^0.12.0": - version: 0.12.0 - resolution: "retry@npm:0.12.0" - checksum: 10/1f914879f97e7ee931ad05fe3afa629bd55270fc6cf1c1e589b6a99fab96d15daad0fa1a52a00c729ec0078045fe3e399bd4fd0c93bcc906957bdc17f89cb8e6 +"is-regexp@npm:^1.0.0": + version: 1.0.0 + resolution: "is-regexp@npm:1.0.0" + checksum: 10/be692828e24cba479ec33644326fa98959ec68ba77965e0291088c1a741feaea4919d79f8031708f85fd25e39de002b4520622b55460660b9c369e6f7187faef languageName: node linkType: hard -"reusify@npm:^1.0.4": - version: 1.0.4 - resolution: "reusify@npm:1.0.4" - checksum: 10/14222c9e1d3f9ae01480c50d96057228a8524706db79cdeb5a2ce5bb7070dd9f409a6f84a02cbef8cdc80d39aef86f2dd03d155188a1300c599b05437dcd2ffb +"is-relative-path@npm:^1.0.2": + version: 1.0.2 + resolution: "is-relative-path@npm:1.0.2" + checksum: 10/6c2ccffd3c0a3e3990535d0571370883d558b825b51940085f3446ec338857f4552f44521dfec3e83b7e067de08c0b0369de290208a91200bcae2c569533e340 languageName: node linkType: hard -"rewire@npm:4.0.1": - version: 4.0.1 - resolution: "rewire@npm:4.0.1" - dependencies: - eslint: "npm:^4.19.1" - checksum: 10/e3078d950b6ab0999b355fd7213bd544b2dff60ac2d729b2b997a15c40d31fa5abd668e4e195f405c02d5feab860544ed1a84a76704096d402598a152efee897 +"is-set@npm:^2.0.1, is-set@npm:^2.0.2": + version: 2.0.2 + resolution: "is-set@npm:2.0.2" + checksum: 10/d89e82acdc7760993474f529e043f9c4a1d63ed4774d21cc2e331d0e401e5c91c27743cd7c889137028f6a742234759a4bd602368fbdbf0b0321994aefd5603f languageName: node linkType: hard -"rfdc@npm:^1.2.0, rfdc@npm:^1.3.0": - version: 1.3.0 - resolution: "rfdc@npm:1.3.0" - checksum: 10/76dedd9700cdf132947fde7ce1a8838c9cbb7f3e8f9188af0aaf97194cce745f42094dd2cf547426934cc83252ee2c0e432b2e0222a4415ab0db32de82665c69 +"is-shared-array-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "is-shared-array-buffer@npm:1.0.1" + checksum: 10/ddb03381c5b6a468ddfbe0340506b3a18abc3525b4695f06683261d8febb5b69a51dc277f6835d440f765432fd5e666fbbfaae91051adc77b74babadcdb755d4 languageName: node linkType: hard -"rimraf@npm:^2.2.8, rimraf@npm:^2.6.1, rimraf@npm:^2.6.2, rimraf@npm:^2.6.3": - version: 2.7.1 - resolution: "rimraf@npm:2.7.1" +"is-shared-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "is-shared-array-buffer@npm:1.0.2" dependencies: - glob: "npm:^7.1.3" - bin: - rimraf: ./bin.js - checksum: 10/4586c296c736483e297da7cffd19475e4a3e41d07b1ae124aad5d687c79e4ffa716bdac8732ed1db942caf65271cee9dd39f8b639611de161a2753e2112ffe1d + call-bind: "npm:^1.0.2" + checksum: 10/23d82259d6cd6dbb7c4ff3e4efeff0c30dbc6b7f88698498c17f9821cb3278d17d2b6303a5341cbd638ab925a28f3f086a6c79b3df70ac986cc526c725d43b4f languageName: node linkType: hard -"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2": - version: 3.0.2 - resolution: "rimraf@npm:3.0.2" +"is-shared-array-buffer@npm:^1.0.3": + version: 1.0.3 + resolution: "is-shared-array-buffer@npm:1.0.3" dependencies: - glob: "npm:^7.1.3" - bin: - rimraf: bin.js - checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5 + call-bind: "npm:^1.0.7" + checksum: 10/bc5402900dc62b96ebb2548bf5b0a0bcfacc2db122236fe3ab3b3e3c884293a0d5eb777e73f059bcbf8dc8563bb65eae972fee0fb97e38a9ae27c8678f62bcfe languageName: node linkType: hard -"rimraf@npm:~2.6.2": - version: 2.6.3 - resolution: "rimraf@npm:2.6.3" +"is-ssh@npm:^1.4.0": + version: 1.4.0 + resolution: "is-ssh@npm:1.4.0" dependencies: - glob: "npm:^7.1.3" - bin: - rimraf: ./bin.js - checksum: 10/756419f2fa99aa119c46a9fc03e09d84ecf5421a80a72d1944c5088c9e4671e77128527a900a313ed9d3fdbdd37e2ae05486cd7e9116d5812d8c31f2399d7c86 + protocols: "npm:^2.0.1" + checksum: 10/e2d17d74a19b4368cc06ce5c76d4f625952442da337098d670a9840e1db5334c646aa0a6ed3a01e9d396901e22c755174ce64e74c3139bb10e5df03d5a6fb3fa languageName: node linkType: hard -"ripemd160-min@npm:0.0.6": - version: 0.0.6 - resolution: "ripemd160-min@npm:0.0.6" - checksum: 10/f2b641d42bffe0301f1c4e7c853a6fdd18a2639346f528c727b28078ccaaf7b764e074faac3ca8595b68213bf08ca11f4990d21b75d63b39ab1d48ccd861bf77 +"is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 languageName: node linkType: hard -"ripemd160@npm:^2.0.0, ripemd160@npm:^2.0.1, ripemd160@npm:^2.0.2": - version: 2.0.2 - resolution: "ripemd160@npm:2.0.2" - dependencies: - hash-base: "npm:^3.0.0" - inherits: "npm:^2.0.1" - checksum: 10/006accc40578ee2beae382757c4ce2908a826b27e2b079efdcd2959ee544ddf210b7b5d7d5e80467807604244e7388427330f5c6d4cd61e6edaddc5773ccc393 +"is-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "is-stream@npm:3.0.0" + checksum: 10/172093fe99119ffd07611ab6d1bcccfe8bc4aa80d864b15f43e63e54b7abc71e779acd69afdb854c4e2a67fdc16ae710e370eda40088d1cfc956a50ed82d8f16 languageName: node linkType: hard -"rlp@npm:2.2.7, rlp@npm:^2.0.0, rlp@npm:^2.2.1, rlp@npm:^2.2.2, rlp@npm:^2.2.3, rlp@npm:^2.2.4": - version: 2.2.7 - resolution: "rlp@npm:2.2.7" - dependencies: - bn.js: "npm:^5.2.0" - bin: - rlp: bin/rlp - checksum: 10/cf1919a2dc99f336191b3363b76299db567c192b7ee3c6f5c722728c34f65577883c9c88eeb7a1bfcbc26693c8a4f1fb0662e79ee86f0c98dd258d6987303498 +"is-stream@npm:^4.0.1": + version: 4.0.1 + resolution: "is-stream@npm:4.0.1" + checksum: 10/cbea3f1fc271b21ceb228819d0c12a0965a02b57f39423925f99530b4eb86935235f258f06310b67cd02b2d10b49e9a0998f5ececf110ab7d3760bae4055ad23 languageName: node linkType: hard -"roarr@npm:^7.0.4": - version: 7.11.0 - resolution: "roarr@npm:7.11.0" +"is-string@npm:^1.0.5, is-string@npm:^1.0.7": + version: 1.0.7 + resolution: "is-string@npm:1.0.7" dependencies: - boolean: "npm:^3.1.4" - fast-json-stringify: "npm:^2.7.10" - fast-printf: "npm:^1.6.9" - fast-safe-stringify: "npm:^2.1.1" - globalthis: "npm:^1.0.2" - semver-compare: "npm:^1.0.0" - checksum: 10/91e45877efc6113e3c9c97b0890cec79ccf9cbed497fda4b8f355174e8c10526a96989e6083fafd618962a9c1639ca372e74e99f107102aca4c8f0a465f483e2 + has-tostringtag: "npm:^1.0.0" + checksum: 10/2bc292fe927493fb6dfc3338c099c3efdc41f635727c6ebccf704aeb2a27bca7acb9ce6fd34d103db78692b10b22111a8891de26e12bfa1c5e11e263c99d1fef languageName: node linkType: hard -"rollup-plugin-terser@npm:^7.0.0": - version: 7.0.2 - resolution: "rollup-plugin-terser@npm:7.0.2" +"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": + version: 1.0.4 + resolution: "is-symbol@npm:1.0.4" dependencies: - "@babel/code-frame": "npm:^7.10.4" - jest-worker: "npm:^26.2.1" - serialize-javascript: "npm:^4.0.0" - terser: "npm:^5.0.0" - peerDependencies: - rollup: ^2.0.0 - checksum: 10/af84bb7a7a894cd00852b6486528dfb8653cf94df4c126f95f389a346f401d054b08c46bee519a2ab6a22b33804d1d6ac6d8c90b1b2bf8fffb097eed73fc3c72 + has-symbols: "npm:^1.0.2" + checksum: 10/a47dd899a84322528b71318a89db25c7ecdec73197182dad291df15ffea501e17e3c92c8de0bfb50e63402747399981a687b31c519971b1fa1a27413612be929 languageName: node linkType: hard -"rollup@npm:^2.43.1": - version: 2.79.1 - resolution: "rollup@npm:2.79.1" +"is-text-path@npm:^1.0.1": + version: 1.0.1 + resolution: "is-text-path@npm:1.0.1" dependencies: - fsevents: "npm:~2.3.2" - dependenciesMeta: - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: 10/df087b701304432f30922bbee5f534ab189aa6938bd383b5686c03147e0d00cd1789ea10a462361326ce6b6ebe448ce272ad3f3cc40b82eeb3157df12f33663c - languageName: node - linkType: hard - -"rollup@npm:^4.13.0": - version: 4.18.1 - resolution: "rollup@npm:4.18.1" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.18.1" - "@rollup/rollup-android-arm64": "npm:4.18.1" - "@rollup/rollup-darwin-arm64": "npm:4.18.1" - "@rollup/rollup-darwin-x64": "npm:4.18.1" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.18.1" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.18.1" - "@rollup/rollup-linux-arm64-gnu": "npm:4.18.1" - "@rollup/rollup-linux-arm64-musl": "npm:4.18.1" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.18.1" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.18.1" - "@rollup/rollup-linux-s390x-gnu": "npm:4.18.1" - "@rollup/rollup-linux-x64-gnu": "npm:4.18.1" - "@rollup/rollup-linux-x64-musl": "npm:4.18.1" - "@rollup/rollup-win32-arm64-msvc": "npm:4.18.1" - "@rollup/rollup-win32-ia32-msvc": "npm:4.18.1" - "@rollup/rollup-win32-x64-msvc": "npm:4.18.1" - "@types/estree": "npm:1.0.5" - fsevents: "npm:~2.3.2" - dependenciesMeta: - "@rollup/rollup-android-arm-eabi": - optional: true - "@rollup/rollup-android-arm64": - optional: true - "@rollup/rollup-darwin-arm64": - optional: true - "@rollup/rollup-darwin-x64": - optional: true - "@rollup/rollup-linux-arm-gnueabihf": - optional: true - "@rollup/rollup-linux-arm-musleabihf": - optional: true - "@rollup/rollup-linux-arm64-gnu": - optional: true - "@rollup/rollup-linux-arm64-musl": - optional: true - "@rollup/rollup-linux-powerpc64le-gnu": - optional: true - "@rollup/rollup-linux-riscv64-gnu": - optional: true - "@rollup/rollup-linux-s390x-gnu": - optional: true - "@rollup/rollup-linux-x64-gnu": - optional: true - "@rollup/rollup-linux-x64-musl": - optional: true - "@rollup/rollup-win32-arm64-msvc": - optional: true - "@rollup/rollup-win32-ia32-msvc": - optional: true - "@rollup/rollup-win32-x64-msvc": - optional: true - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: 10/7a5f110d216e8599dc3cb11cf570316d989abae00785d99c2bcb6027287fe60d2eaed70e457d88a036622e7fc67e8db6e730d3c784aa90a258bd4c020676ad44 + text-extensions: "npm:^1.0.0" + checksum: 10/fb5d78752c22b3f73a7c9540768f765ffcfa38c9e421e2b9af869565307fa1ae5e3d3a2ba016a43549742856846566d327da406e94a5846ec838a288b1704fd2 languageName: node linkType: hard -"run-async@npm:^0.1.0": - version: 0.1.0 - resolution: "run-async@npm:0.1.0" +"is-text-path@npm:^2.0.0": + version: 2.0.0 + resolution: "is-text-path@npm:2.0.0" dependencies: - once: "npm:^1.3.0" - checksum: 10/66fd3ada4036a77a70fbf5063d66bf88df77fa9cbf20516115a6a09431ba66621f353e6fefecd10f9cb6a3345b5fe007a438dbf3f6020fbfd5732634cd4d3e15 - languageName: node - linkType: hard - -"run-async@npm:^2.2.0, run-async@npm:^2.4.0": - version: 2.4.1 - resolution: "run-async@npm:2.4.1" - checksum: 10/c79551224dafa26ecc281cb1efad3510c82c79116aaf681f8a931ce70fdf4ca880d58f97d3b930a38992c7aad7955a08e065b32ec194e1dd49d7790c874ece50 + text-extensions: "npm:^2.0.0" + checksum: 10/e26ade26a6aa6b26c3f00c913871c3c1ceb5a2a5ca4380aac3f0e092b151ad8e2ce4cee1060fb7a13a5684fa55ce62c9df04fa7723b180c82a34ae4c0fa34adb languageName: node linkType: hard -"run-async@npm:^3.0.0": - version: 3.0.0 - resolution: "run-async@npm:3.0.0" - checksum: 10/97fb8747f7765b77ebcd311d3a33548099336f04c6434e0763039b98c1de0f1b4421000695aff8751f309c0b995d8dfd620c1f1e4c35572da38c101488165305 +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.9": + version: 1.1.10 + resolution: "is-typed-array@npm:1.1.10" + dependencies: + available-typed-arrays: "npm:^1.0.5" + call-bind: "npm:^1.0.2" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-tostringtag: "npm:^1.0.0" + checksum: 10/2392b2473bbc994f5c30d6848e32bab3cab6c80b795aaec3020baf5419ff7df38fc11b3a043eb56d50f842394c578dbb204a7a29398099f895cf111c5b27f327 languageName: node linkType: hard -"run-parallel-limit@npm:^1.1.0": - version: 1.1.0 - resolution: "run-parallel-limit@npm:1.1.0" +"is-typed-array@npm:^1.1.13": + version: 1.1.13 + resolution: "is-typed-array@npm:1.1.13" dependencies: - queue-microtask: "npm:^1.2.2" - checksum: 10/672c3b87e7f939c684b9965222b361421db0930223ed1e43ebf0e7e48ccc1a022ea4de080bef4d5468434e2577c33b7681e3f03b7593fdc49ad250a55381123c + which-typed-array: "npm:^1.1.14" + checksum: 10/f850ba08286358b9a11aee6d93d371a45e3c59b5953549ee1c1a9a55ba5c1dd1bd9952488ae194ad8f32a9cf5e79c8fa5f0cc4d78c00720aa0bbcf238b38062d languageName: node linkType: hard -"run-parallel@npm:^1.1.2, run-parallel@npm:^1.1.9": - version: 1.2.0 - resolution: "run-parallel@npm:1.2.0" +"is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.7": + version: 1.1.8 + resolution: "is-typed-array@npm:1.1.8" dependencies: - queue-microtask: "npm:^1.2.2" - checksum: 10/cb4f97ad25a75ebc11a8ef4e33bb962f8af8516bb2001082ceabd8902e15b98f4b84b4f8a9b222e5d57fc3bd1379c483886ed4619367a7680dad65316993021d + available-typed-arrays: "npm:^1.0.5" + call-bind: "npm:^1.0.2" + es-abstract: "npm:^1.18.5" + foreach: "npm:^2.0.5" + has-tostringtag: "npm:^1.0.0" + checksum: 10/3b7d1a365dea95cfbd1b3822261b9b399b76d3170e94b8d1c65e5aa2dc53a965086030b31488ad06e62898e7afef7057e93f710ac62fdb0655efef97cd88e48e languageName: node linkType: hard -"run-time-error-cjs@npm:1.4.0": - version: 1.4.0 - resolution: "run-time-error-cjs@npm:1.4.0" - checksum: 10/4d37f1fb3e62d9b3f1175a8bb2a017858f00e942a1ac90f7d0117a07b68e7911802ead174856fd0cfd668f0f59b5184ea4f19879438927c0647d9fcef616a5be +"is-typedarray@npm:^1.0.0": + version: 1.0.0 + resolution: "is-typedarray@npm:1.0.0" + checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c languageName: node linkType: hard -"run-time-error@npm:1.4.0": - version: 1.4.0 - resolution: "run-time-error@npm:1.4.0" - checksum: 10/f29eecdb2ccee1d4bdd19d43b1b2d679249e077574714c97dc48f57369a18f479d7dd6277e2470aa1277cded50c7e3c66df1f1d18c1d36f7f5c1db9824062f57 +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: 10/a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 languageName: node linkType: hard -"rustbn.js@npm:~0.2.0": - version: 0.2.0 - resolution: "rustbn.js@npm:0.2.0" - checksum: 10/2d7d09f6bea2b5fb05142724f5cfc65c8d96b6e57a29874060733d041789aabbd236617c05d8569a43a2997eea850b4323527e92368c46d04a671ef0b2319fe9 +"is-url-superb@npm:^4.0.0": + version: 4.0.0 + resolution: "is-url-superb@npm:4.0.0" + checksum: 10/fd55e91c96349acb0d688f95fcb1ac67450e5db934976e3a8ff13ef446841e779a6f4d18b15f02331f05a3429c8fdaba2382ac1ab444059e86e9ffcde1ec8db0 languageName: node linkType: hard -"rx-lite-aggregates@npm:^4.0.8": - version: 4.0.8 - resolution: "rx-lite-aggregates@npm:4.0.8" - dependencies: - rx-lite: "npm:*" - checksum: 10/5b7442c12b02b5611f7f134624df19b99036801a78f27ee4d0a27552d483e6068a31ea1950220aca0a28b76d0e7f06baf7627582450836b65a213ea768c7fcd0 +"is-url@npm:^1.2.4": + version: 1.2.4 + resolution: "is-url@npm:1.2.4" + checksum: 10/100e74b3b1feab87a43ef7653736e88d997eb7bd32e71fd3ebc413e58c1cbe56269699c776aaea84244b0567f2a7d68dfaa512a062293ed2f9fdecb394148432 languageName: node linkType: hard -"rx-lite@npm:*, rx-lite@npm:^4.0.8": - version: 4.0.8 - resolution: "rx-lite@npm:4.0.8" - checksum: 10/2ea5948b8535b5e2490e13a7ffdfdd7f68f55b9ea6a827466e7f0f578d06c19c6e5e761051626d07e93c6e5c4ea203089e52acb23598a117617112693ade1aa0 +"is-weakmap@npm:^2.0.1": + version: 2.0.1 + resolution: "is-weakmap@npm:2.0.1" + checksum: 10/289fa4e8ba1bdda40ca78481266f6925b7c46a85599e6a41a77010bf91e5a24dfb660db96863bbf655ecdbda0ab517204d6a4e0c151dbec9d022c556321f3776 languageName: node linkType: hard -"rx-lite@npm:^3.1.2": - version: 3.1.2 - resolution: "rx-lite@npm:3.1.2" - checksum: 10/e11d3b1a044e0fe5af82b923dee68aa83b193bf3ad8128cf70e033cbc414f175011a644419c25fe62f75a6f20a1f2aee3b407847dae129fa8df1198b618fb1b2 +"is-weakref@npm:^1.0.1, is-weakref@npm:^1.0.2": + version: 1.0.2 + resolution: "is-weakref@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.2" + checksum: 10/0023fd0e4bdf9c338438ffbe1eed7ebbbff7e7e18fb7cdc227caaf9d4bd024a2dcdf6a8c9f40c92192022eac8391243bb9e66cccebecbf6fe1d8a366108f8513 languageName: node linkType: hard -"rxjs@npm:7.8.0": - version: 7.8.0 - resolution: "rxjs@npm:7.8.0" +"is-weakset@npm:^2.0.1": + version: 2.0.2 + resolution: "is-weakset@npm:2.0.2" dependencies: - tslib: "npm:^2.1.0" - checksum: 10/ff9359cc7875edecc8fc487481366b876b488901178cca8f2bdad03e00d2b5a19b01d2b02d3b4ebd47e574264db8460c6c2386076c3189b359b5e8c70a6e51e3 + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.1.1" + checksum: 10/8f2ddb9639716fd7936784e175ea1183c5c4c05274c34f34f6a53175313cb1c9c35a8b795623306995e2f7cc8f25aa46302f15a2113e51c5052d447be427195c languageName: node linkType: hard -"rxjs@npm:7.8.1, rxjs@npm:^7.2.0, rxjs@npm:^7.5.1, rxjs@npm:^7.5.5, rxjs@npm:^7.8.1": - version: 7.8.1 - resolution: "rxjs@npm:7.8.1" - dependencies: - tslib: "npm:^2.1.0" - checksum: 10/b10cac1a5258f885e9dd1b70d23c34daeb21b61222ee735d2ec40a8685bdca40429000703a44f0e638c27a684ac139e1c37e835d2a0dc16f6fc061a138ae3abb +"is-windows@npm:^1.0.1, is-windows@npm:^1.0.2": + version: 1.0.2 + resolution: "is-windows@npm:1.0.2" + checksum: 10/438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 languageName: node linkType: hard -"rxjs@npm:^6.6.3": - version: 6.6.7 - resolution: "rxjs@npm:6.6.7" - dependencies: - tslib: "npm:^1.9.0" - checksum: 10/c8263ebb20da80dd7a91c452b9e96a178331f402344bbb40bc772b56340fcd48d13d1f545a1e3d8e464893008c5e306cc42a1552afe0d562b1a6d4e1e6262b03 +"is-yarn-global@npm:^0.3.0": + version: 0.3.0 + resolution: "is-yarn-global@npm:0.3.0" + checksum: 10/bca013d65fee2862024c9fbb3ba13720ffca2fe750095174c1c80922fdda16402b5c233f5ac9e265bc12ecb5446e7b7f519a32d9541788f01d4d44e24d2bf481 languageName: node linkType: hard -"safe-array-concat@npm:^1.0.0": - version: 1.0.0 - resolution: "safe-array-concat@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.0" - has-symbols: "npm:^1.0.3" - isarray: "npm:^2.0.5" - checksum: 10/f43cb98fe3b566327d0c09284de2b15fb85ae964a89495c1b1a5d50c7c8ed484190f4e5e71aacc167e16231940079b326f2c0807aea633d47cc7322f40a6b57f +"isarray@npm:^2.0.5": + version: 2.0.5 + resolution: "isarray@npm:2.0.5" + checksum: 10/1d8bc7911e13bb9f105b1b3e0b396c787a9e63046af0b8fe0ab1414488ab06b2b099b87a2d8a9e31d21c9a6fad773c7fc8b257c4880f2d957274479d28ca3414 languageName: node linkType: hard -"safe-array-concat@npm:^1.0.1": - version: 1.0.1 - resolution: "safe-array-concat@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - isarray: "npm:^2.0.5" - checksum: 10/44f073d85ca12458138e6eff103ac63cec619c8261b6579bd2fa3ae7b6516cf153f02596d68e40c5bbe322a29c930017800efff652734ddcb8c0f33b2a71f89c +"isarray@npm:~1.0.0": + version: 1.0.0 + resolution: "isarray@npm:1.0.0" + checksum: 10/f032df8e02dce8ec565cf2eb605ea939bdccea528dbcf565cdf92bfa2da9110461159d86a537388ef1acef8815a330642d7885b29010e8f7eac967c9993b65ab languageName: node linkType: hard -"safe-array-concat@npm:^1.1.0": - version: 1.1.0 - resolution: "safe-array-concat@npm:1.1.0" - dependencies: - call-bind: "npm:^1.0.5" - get-intrinsic: "npm:^1.2.2" - has-symbols: "npm:^1.0.3" - isarray: "npm:^2.0.5" - checksum: 10/41ac35ce46c44e2e8637b1805b0697d5269507779e3082b7afb92c01605fd73ab813bbc799510c56e300cfc941b1447fd98a338205db52db7fd1322ab32d7c9f +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10/7c9f715c03aff08f35e98b1fadae1b9267b38f0615d501824f9743f3aab99ef10e303ce7db3f186763a0b70a19de5791ebfc854ff884d5a8c4d92211f642ec92 languageName: node linkType: hard -"safe-buffer@npm:5.1.2, safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": - version: 5.1.2 - resolution: "safe-buffer@npm:5.1.2" - checksum: 10/7eb5b48f2ed9a594a4795677d5a150faa7eb54483b2318b568dc0c4fc94092a6cce5be02c7288a0500a156282f5276d5688bce7259299568d1053b2150ef374a +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e languageName: node linkType: hard -"safe-buffer@npm:5.2.1, safe-buffer@npm:>=5.1.0, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": - version: 5.2.1 - resolution: "safe-buffer@npm:5.2.1" - checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 +"isobject@npm:^3.0.1": + version: 3.0.1 + resolution: "isobject@npm:3.0.1" + checksum: 10/db85c4c970ce30693676487cca0e61da2ca34e8d4967c2e1309143ff910c207133a969f9e4ddb2dc6aba670aabce4e0e307146c310350b298e74a31f7d464703 languageName: node linkType: hard -"safe-regex-test@npm:^1.0.0": - version: 1.0.0 - resolution: "safe-regex-test@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.3" - is-regex: "npm:^1.1.4" - checksum: 10/c7248dfa07891aa634c8b9c55da696e246f8589ca50e7fd14b22b154a106e83209ddf061baf2fa45ebfbd485b094dc7297325acfc50724de6afe7138451b42a9 +"isomorphic-ws@npm:^5.0.0": + version: 5.0.0 + resolution: "isomorphic-ws@npm:5.0.0" + peerDependencies: + ws: "*" + checksum: 10/e20eb2aee09ba96247465fda40c6d22c1153394c0144fa34fe6609f341af4c8c564f60ea3ba762335a7a9c306809349f9b863c8beedf2beea09b299834ad5398 languageName: node linkType: hard -"safe-regex-test@npm:^1.0.3": - version: 1.0.3 - resolution: "safe-regex-test@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.6" - es-errors: "npm:^1.3.0" - is-regex: "npm:^1.1.4" - checksum: 10/b04de61114b10274d92e25b6de7ccb5de07f11ea15637ff636de4b5190c0f5cd8823fe586dde718504cf78055437d70fd8804976894df502fcf5a210c970afb3 +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.0.0-alpha.1, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.0 + resolution: "istanbul-lib-coverage@npm:3.2.0" + checksum: 10/31621b84ad29339242b63d454243f558a7958ee0b5177749bacf1f74be7d95d3fd93853738ef7eebcddfaf3eab014716e51392a8dbd5aa1bdc1b15c2ebc53c24 languageName: node linkType: hard -"safe-regex2@npm:^3.1.0": - version: 3.1.0 - resolution: "safe-regex2@npm:3.1.0" +"istanbul-lib-hook@npm:^3.0.0": + version: 3.0.0 + resolution: "istanbul-lib-hook@npm:3.0.0" dependencies: - ret: "npm:~0.4.0" - checksum: 10/4f9f7172662763619052a45599e515efc5dd10a932690f610c8ab808a4baa41be3feafefa444f7532651d721d12871a1c9a85330626cdd013b804e8f4240dff1 + append-transform: "npm:^2.0.0" + checksum: 10/512a996cce6b1b9003ba59eab42299dd1527176c01f3ceb7b16bf68f437eeab4958f9df7df0a6b258d45d5f1a2ca2a1bdb915970711e1a5d7b2de911c582f721 languageName: node linkType: hard -"safe-regex@npm:^1.1.0": - version: 1.1.0 - resolution: "safe-regex@npm:1.1.0" +"istanbul-lib-instrument@npm:^4.0.0": + version: 4.0.3 + resolution: "istanbul-lib-instrument@npm:4.0.3" dependencies: - ret: "npm:~0.1.10" - checksum: 10/5405b5a3effed649e6133d51d45cecbbbb02a1dd8d5b78a5e7979a69035870c817a5d2682d0ebb62188d3a840f7b24ea00ebbad2e418d5afabed151e8db96d04 + "@babel/core": "npm:^7.7.5" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-coverage: "npm:^3.0.0" + semver: "npm:^6.3.0" + checksum: 10/6e04ab365b95644ec4954b645f901be90be8ad81233d6df536300cdafcf70dd1ed22a912ceda38b32053c7fc9830c44cd23550c603f493329a8532073d1d6c42 languageName: node linkType: hard -"safe-stable-stringify@npm:2.4.3": - version: 2.4.3 - resolution: "safe-stable-stringify@npm:2.4.3" - checksum: 10/a6c192bbefe47770a11072b51b500ed29be7b1c15095371c1ee1dc13e45ce48ee3c80330214c56764d006c485b88bd0b24940d868948170dddc16eed312582d8 +"istanbul-lib-instrument@npm:^5.0.4, istanbul-lib-instrument@npm:^5.1.0": + version: 5.1.0 + resolution: "istanbul-lib-instrument@npm:5.1.0" + dependencies: + "@babel/core": "npm:^7.12.3" + "@babel/parser": "npm:^7.14.7" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-coverage: "npm:^3.2.0" + semver: "npm:^6.3.0" + checksum: 10/7447ba3f8049f331d5b4a1c450183e88c2fdad044149ad0d9830f71bc8da90d841c393b830bc33237ae75122c3b0e03ca845701873d6c51690bc25caa1f13a94 languageName: node linkType: hard -"safe-stable-stringify@npm:^2.3.1": - version: 2.3.1 - resolution: "safe-stable-stringify@npm:2.3.1" - checksum: 10/8a6ed4e5fb80694970f1939538518c44a59c71c74305e12b5964cbe3850636212eddac881da1f676b0232015213676e07750fe75bc402afbfe29851c8b52381e +"istanbul-lib-processinfo@npm:^2.0.2": + version: 2.0.2 + resolution: "istanbul-lib-processinfo@npm:2.0.2" + dependencies: + archy: "npm:^1.0.0" + cross-spawn: "npm:^7.0.0" + istanbul-lib-coverage: "npm:^3.0.0-alpha.1" + make-dir: "npm:^3.0.0" + p-map: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + uuid: "npm:^3.3.3" + checksum: 10/40efb26ea9d96a4c7571a70cf657ff7dc3e9fde3863020c3086c482bd8851320b127cc0a7e80e403a70e26b2b88579b007ca1a15af6ed351db6d4ec63fc2792d languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.0.2, safer-buffer@npm:^2.1.0, safer-buffer@npm:~2.1.0": - version: 2.1.2 - resolution: "safer-buffer@npm:2.1.2" - checksum: 10/7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 +"istanbul-lib-processinfo@npm:^2.0.3": + version: 2.0.3 + resolution: "istanbul-lib-processinfo@npm:2.0.3" + dependencies: + archy: "npm:^1.0.0" + cross-spawn: "npm:^7.0.3" + istanbul-lib-coverage: "npm:^3.2.0" + p-map: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + uuid: "npm:^8.3.2" + checksum: 10/60e7b3441687249460f34a817c7204967b07830a69b6e430e60a45615319c2ab4e2b2eaeb8b3decf549fccd419cd600d21173961632229967608d7d1b194f39e languageName: node linkType: hard -"sanitize-filename@npm:1.6.3": - version: 1.6.3 - resolution: "sanitize-filename@npm:1.6.3" +"istanbul-lib-report@npm:^3.0.0": + version: 3.0.0 + resolution: "istanbul-lib-report@npm:3.0.0" dependencies: - truncate-utf8-bytes: "npm:^1.0.0" - checksum: 10/1c162e2cffa797571221c3ed9fe796fa8c6eabb0812418b52a839e4fc63ab130093eb546ec39e1b94b8d3511c0d7de81db3e67906a7e76d7a7bcb6fbab4ed961 + istanbul-lib-coverage: "npm:^3.0.0" + make-dir: "npm:^3.0.0" + supports-color: "npm:^7.1.0" + checksum: 10/06b37952e9cb0fe419a37c7f3d74612a098167a9eb0e5264228036e78b42ca5226501e8130738b5306d94bae2ea068ca674080d4af959992523d84aacff67728 languageName: node linkType: hard -"sanitize-html@npm:2.12.1": - version: 2.12.1 - resolution: "sanitize-html@npm:2.12.1" +"istanbul-lib-source-maps@npm:^4.0.0": + version: 4.0.1 + resolution: "istanbul-lib-source-maps@npm:4.0.1" dependencies: - deepmerge: "npm:^4.2.2" - escape-string-regexp: "npm:^4.0.0" - htmlparser2: "npm:^8.0.0" - is-plain-object: "npm:^5.0.0" - parse-srcset: "npm:^1.0.2" - postcss: "npm:^8.3.11" - checksum: 10/0aef3e56a7fe30983921e070d432167df1aabd9e6e4a78b5de127af275c38b41f8e97f0440b6970cee1875dc003bc5e3c3a588ec7d2c242fca6d8f3327ea8efb + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + source-map: "npm:^0.6.1" + checksum: 10/5526983462799aced011d776af166e350191b816821ea7bcf71cab3e5272657b062c47dc30697a22a43656e3ced78893a42de677f9ccf276a28c913190953b82 languageName: node linkType: hard -"sanitize.css@npm:*": - version: 13.0.0 - resolution: "sanitize.css@npm:13.0.0" - checksum: 10/508cde59d1c99a885806387ca8350c594c4211cab16804fe66ed75cd7e1ba7ebd4079224128b1aea4d4227f0d1add3e83a85a51a6a7e4419c083f4cce70d010f +"istanbul-reports@npm:^3.0.2, istanbul-reports@npm:^3.1.3": + version: 3.1.4 + resolution: "istanbul-reports@npm:3.1.4" + dependencies: + html-escaper: "npm:^2.0.0" + istanbul-lib-report: "npm:^3.0.0" + checksum: 10/b720f7ff87a37e1500e001913e781395b96cc6ca4d475e01da2ec78d1571435ded4b1b31fb53ef8d760bc5fa691b2b6b647bcb4c1238f6aaf58b261d47510c93 languageName: node linkType: hard -"sass-loader@npm:13.3.2": - version: 13.3.2 - resolution: "sass-loader@npm:13.3.2" - dependencies: - neo-async: "npm:^2.6.2" - peerDependencies: - fibers: ">= 3.1.0" - node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 - sass: ^1.3.0 - sass-embedded: "*" - webpack: ^5.0.0 - peerDependenciesMeta: - fibers: - optional: true - node-sass: - optional: true - sass: - optional: true - sass-embedded: - optional: true - checksum: 10/3486134c8813660772448bcd73e169fbe180fbaea0b825ec3e8fd1017de026e4e177e4b659a5b7d0f6c1b9f334ebe0134d91c60bd627d8ffff9b21018325a532 +"iterare@npm:1.2.1": + version: 1.2.1 + resolution: "iterare@npm:1.2.1" + checksum: 10/ee8322dd9d92e86d8653c899df501c58c5b8e90d6767cf2af0b6d6dc5a4b9b7ed8bce936976f4f4c3a55be110a300c8a7d71967d03f72e104e8db66befcfd874 languageName: node linkType: hard -"sass-loader@npm:14.1.1": - version: 14.1.1 - resolution: "sass-loader@npm:14.1.1" +"jackspeak@npm:^1.4.2": + version: 1.4.2 + resolution: "jackspeak@npm:1.4.2" dependencies: - neo-async: "npm:^2.6.2" - peerDependencies: - "@rspack/core": 0.x || 1.x - node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 - sass: ^1.3.0 - sass-embedded: "*" - webpack: ^5.0.0 - peerDependenciesMeta: - "@rspack/core": - optional: true - node-sass: - optional: true - sass: - optional: true - sass-embedded: - optional: true - webpack: - optional: true - checksum: 10/6cc0cb8143d04cb462c10efffbab86e9c4ea971bbdbc22d8c01f4ebf774fcf9b4fed775aaec6af23aeb7d440b37dce76cf6f2746ae36421d16ad4182f2220bc8 + cliui: "npm:^7.0.4" + checksum: 10/dfb6a116615bc16190c3dd091733e5c2341860b30665239ce602f799ef4d756b7960a295d4e194ffad8eb0eff2445fcca89875a8605c23c0077c64c8f050f144 languageName: node linkType: hard -"sass-loader@npm:^12.3.0": - version: 12.6.0 - resolution: "sass-loader@npm:12.6.0" +"jackspeak@npm:^2.0.3": + version: 2.3.3 + resolution: "jackspeak@npm:2.3.3" dependencies: - klona: "npm:^2.0.4" - neo-async: "npm:^2.6.2" - peerDependencies: - fibers: ">= 3.1.0" - node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 - sass: ^1.3.0 - sass-embedded: "*" - webpack: ^5.0.0 - peerDependenciesMeta: - fibers: - optional: true - node-sass: - optional: true - sass: - optional: true - sass-embedded: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": optional: true - checksum: 10/1a45bc2096644b7eebfff4095eb43fbbd620e86a9e7c1bcbb8f0b51acb3dbffb5d7020754f40690dfe95179fabbc7c3f310f38a61e0e2e7e4e986eeb7bb2c637 + checksum: 10/a4c7c1a3ffea90bbcaa2f7a0d2885861e94138982aef0ced8efd299b32ccb69645b49d27f5e3e81c57005002674dd7e2b5d08a4287e9110534e512ada53557b2 languageName: node linkType: hard -"sass-lookup@npm:^5.0.1": - version: 5.0.1 - resolution: "sass-lookup@npm:5.0.1" +"jackspeak@npm:^2.3.5": + version: 2.3.6 + resolution: "jackspeak@npm:2.3.6" dependencies: - commander: "npm:^10.0.1" - bin: - sass-lookup: bin/cli.js - checksum: 10/4d37f16830d31e4bb9804fedddc7d79e82d3d0c74ca307a2b4f77656f58f20f55f55e8321c51fe3d7850e04fe216910611cc0a7a1fa67cf9152929bfa1b9b95b + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/6e6490d676af8c94a7b5b29b8fd5629f21346911ebe2e32931c2a54210134408171c24cee1a109df2ec19894ad04a429402a8438cbf5cc2794585d35428ace76 languageName: node linkType: hard -"sass@npm:1.64.1": - version: 1.64.1 - resolution: "sass@npm:1.64.1" +"jackspeak@npm:^3.1.2": + version: 3.4.0 + resolution: "jackspeak@npm:3.4.0" dependencies: - chokidar: "npm:>=3.0.0 <4.0.0" - immutable: "npm:^4.0.0" - source-map-js: "npm:>=0.6.2 <2.0.0" - bin: - sass: sass.js - checksum: 10/77da9edc7b6db33a8ff408ffa6ff02884465eae64ef6b2ba5caf29325ea6bdc88eb213ff0762bec79487c8b081d532199430f9db5808c0dee6814e0a4189d375 + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/5032c43c0c1fb92e72846ce496df559214253bc6870c90399cbd7858571c53169d9494b7c152df04abcb75f2fb5e9cffe65651c67d573380adf3a482b150d84b languageName: node linkType: hard -"sass@npm:1.71.1": - version: 1.71.1 - resolution: "sass@npm:1.71.1" +"jest-changed-files@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-changed-files@npm:29.5.0" dependencies: - chokidar: "npm:>=3.0.0 <4.0.0" - immutable: "npm:^4.0.0" - source-map-js: "npm:>=0.6.2 <2.0.0" - bin: - sass: sass.js - checksum: 10/51e3c667e262a80db9c80f31109dabd8d5b9a6f79e8e8aa627d83564607036ee0b13b1921d14fd317437d8cf7030d7c8cf1c3b7e11b1f4537a4a4029f6cb63a3 - languageName: node - linkType: hard - -"sax@npm:1.2.1": - version: 1.2.1 - resolution: "sax@npm:1.2.1" - checksum: 10/d64f65291ce127f191eb2c22012f8f608736e306db6a28306e618bb1324cfbc19f6783c49ce0d88e5628fde30878c29189c8fb3c62c83f079b471734e4df455d + execa: "npm:^5.0.0" + p-limit: "npm:^3.1.0" + checksum: 10/6e337b09dca173dc60d53a1c880817ef31f91c6ddc23d93fabb7e714d4388857332c76e7a7fc627bf150e3fba0b70ba968912f86934bd176ca0dc66883303122 languageName: node linkType: hard -"sax@npm:>=0.6.0, sax@npm:^1.2.4, sax@npm:~1.2.4": - version: 1.2.4 - resolution: "sax@npm:1.2.4" - checksum: 10/09b79ff6dc09689a24323352117c94593c69db348997b2af0edbd82fa08aba47d778055bf9616b57285bb73d25d790900c044bf631a8f10c8252412e3f3fe5dd +"jest-circus@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-circus@npm:29.6.2" + dependencies: + "@jest/environment": "npm:^29.6.2" + "@jest/expect": "npm:^29.6.2" + "@jest/test-result": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + "@types/node": "npm:*" + chalk: "npm:^4.0.0" + co: "npm:^4.6.0" + dedent: "npm:^1.0.0" + is-generator-fn: "npm:^2.0.0" + jest-each: "npm:^29.6.2" + jest-matcher-utils: "npm:^29.6.2" + jest-message-util: "npm:^29.6.2" + jest-runtime: "npm:^29.6.2" + jest-snapshot: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + p-limit: "npm:^3.1.0" + pretty-format: "npm:^29.6.2" + pure-rand: "npm:^6.0.0" + slash: "npm:^3.0.0" + stack-utils: "npm:^2.0.3" + checksum: 10/985034d5182adba11cfb667db9f0264c305cdfc9e7a61a42fb35ad981ce4d8b8499751e0af682e170b143e112827503fa15eea90d87129fb27940c9483b5ced1 languageName: node linkType: hard -"saxes@npm:^5.0.1": - version: 5.0.1 - resolution: "saxes@npm:5.0.1" +"jest-cli@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-cli@npm:29.6.2" dependencies: - xmlchars: "npm:^2.2.0" - checksum: 10/148b5f98fdd45df25fa1abef35d72cdf6457ac5aef3b7d59d60f770af09d8cf6e7e3a074197071222441d68670fd3198590aba9985e37c4738af2df2f44d0686 + "@jest/core": "npm:^29.6.2" + "@jest/test-result": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + chalk: "npm:^4.0.0" + exit: "npm:^0.1.2" + graceful-fs: "npm:^4.2.9" + import-local: "npm:^3.0.2" + jest-config: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + jest-validate: "npm:^29.6.2" + prompts: "npm:^2.0.1" + yargs: "npm:^17.3.1" + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + bin: + jest: bin/jest.js + checksum: 10/64393941163b1f8969fe7eb91d4d2c209880d709c446fc4c9ae9d69c50553eb83fe50e7a18967587dc324eb0168ee7fbe330115c902cc2a37aac0fb214317a23 languageName: node linkType: hard -"sb-promise-queue@npm:^2.1.0": - version: 2.1.0 - resolution: "sb-promise-queue@npm:2.1.0" - checksum: 10/a299d04ec359061f90b13f5048ec2b695b323471666c9f3ed5cf52049384d5dbfae35816c38d3f3bcf9cce9e00fcc9d6eb2c0ebc43b8d82fe60d6afe67683f2a +"jest-config@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-config@npm:29.6.2" + dependencies: + "@babel/core": "npm:^7.11.6" + "@jest/test-sequencer": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + babel-jest: "npm:^29.6.2" + chalk: "npm:^4.0.0" + ci-info: "npm:^3.2.0" + deepmerge: "npm:^4.2.2" + glob: "npm:^7.1.3" + graceful-fs: "npm:^4.2.9" + jest-circus: "npm:^29.6.2" + jest-environment-node: "npm:^29.6.2" + jest-get-type: "npm:^29.4.3" + jest-regex-util: "npm:^29.4.3" + jest-resolve: "npm:^29.6.2" + jest-runner: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + jest-validate: "npm:^29.6.2" + micromatch: "npm:^4.0.4" + parse-json: "npm:^5.2.0" + pretty-format: "npm:^29.6.2" + slash: "npm:^3.0.0" + strip-json-comments: "npm:^3.1.1" + peerDependencies: + "@types/node": "*" + ts-node: ">=9.0.0" + peerDependenciesMeta: + "@types/node": + optional: true + ts-node: + optional: true + checksum: 10/c0cff6578c2efd2b6918568a0848e2138e122debcc81843f7ffd27a2ed761a09a9ed10f424c021a47a083e54701711c7590388a52e57d1fcaeb074db03527a01 languageName: node linkType: hard -"sb-scandir@npm:^3.1.0": - version: 3.1.0 - resolution: "sb-scandir@npm:3.1.0" +"jest-diff@npm:^29.0.0, jest-diff@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-diff@npm:29.6.2" dependencies: - sb-promise-queue: "npm:^2.1.0" - checksum: 10/13d950e48b93f0ffdb117f7f68b4df29f8e0c22cc55a427750319a39935d0e0ebd74b47387a78d2766a8e4119bcbbc0e0cd78b381b50cfda2925ecfdab758bf9 + chalk: "npm:^4.0.0" + diff-sequences: "npm:^29.4.3" + jest-get-type: "npm:^29.4.3" + pretty-format: "npm:^29.6.2" + checksum: 10/8c66d29afbb64b4cb1c0daa7c20a7838b32ec16e989f7767f7088b466bfa64d7a501b3f8592c6ab148dde19645740cb868a18b29b992eb72517842287c03144e languageName: node linkType: hard -"scheduler@npm:^0.20.2": - version: 0.20.2 - resolution: "scheduler@npm:0.20.2" +"jest-docblock@npm:^29.4.3": + version: 29.4.3 + resolution: "jest-docblock@npm:29.4.3" dependencies: - loose-envify: "npm:^1.1.0" - object-assign: "npm:^4.1.1" - checksum: 10/898917fa475386953d998add9107c04bf2c335eee86172833995dee126d12a68bee3c29edbd61fa0bcbcb8ee511c422eaab23b86b02f95aab26ecfaed8df5e64 + detect-newline: "npm:^3.0.0" + checksum: 10/fd6bb0b6c60a1d87ade37b8bd8404c64518dc42357f256eeb8cb3f313eb00c138645d602ba7c57059a3de4a6570f12ab1234cb3d2d7a9b948d9dfa255e85b1d2 languageName: node linkType: hard -"scheduler@npm:^0.23.0": - version: 0.23.0 - resolution: "scheduler@npm:0.23.0" +"jest-each@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-each@npm:29.6.2" dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10/0c4557aa37bafca44ff21dc0ea7c92e2dbcb298bc62eae92b29a39b029134f02fb23917d6ebc8b1fa536b4184934314c20d8864d156a9f6357f3398aaf7bfda8 + "@jest/types": "npm:^29.6.1" + chalk: "npm:^4.0.0" + jest-get-type: "npm:^29.4.3" + jest-util: "npm:^29.6.2" + pretty-format: "npm:^29.6.2" + checksum: 10/04c21926df07c7468d3ab1a9a6e142de1802c353f755c26e8100081bbc4fa121aa1ba8ce8d2c8770e1410dfe5172bbfad0d1f77116038c9aeabbd93e9b00a12a languageName: node linkType: hard -"schema-utils@npm:2.7.0": - version: 2.7.0 - resolution: "schema-utils@npm:2.7.0" +"jest-environment-node@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-environment-node@npm:29.6.2" dependencies: - "@types/json-schema": "npm:^7.0.4" - ajv: "npm:^6.12.2" - ajv-keywords: "npm:^3.4.1" - checksum: 10/e5afb6ecf8e9c63ce5f964cd8f2a2e7bdc8c3a63f6bc7dd5cfdc475aa90c1b9ade1555a749519c1673a0bfa203a12e04499e7d6d956163f8e7a77aaa3f12935c + "@jest/environment": "npm:^29.6.2" + "@jest/fake-timers": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + "@types/node": "npm:*" + jest-mock: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + checksum: 10/60e7a134424ced4e2a7e41b54687154cbcf5e282432968c3caedb52c269e1b4e250020ceedec383babaa31d25deee47475277100ed239cac7afbdb297f9b9af3 languageName: node linkType: hard -"schema-utils@npm:^2.6.5": - version: 2.7.1 - resolution: "schema-utils@npm:2.7.1" +"jest-extended@npm:4.0.1": + version: 4.0.1 + resolution: "jest-extended@npm:4.0.1" dependencies: - "@types/json-schema": "npm:^7.0.5" - ajv: "npm:^6.12.4" - ajv-keywords: "npm:^3.5.2" - checksum: 10/86c3038798981dbc702d5f6a86d4e4a308a2ec6e8eb1bf7d1a3ea95cb3f1972491833b76ce1c86a068652417019126d5b68219c33a9ad069358dd10429d4096d + jest-diff: "npm:^29.0.0" + jest-get-type: "npm:^29.0.0" + peerDependencies: + jest: ">=27.2.5" + peerDependenciesMeta: + jest: + optional: true + checksum: 10/68cd5acf86fe84ae26e34a46c88e431e2c9010582ad8be5213f6de6b3ac92365aa1267f82789a23fa9d73ef16711bebcf4a1003005e3d36e56558f2e7aa8e2a1 languageName: node linkType: hard -"schema-utils@npm:^3.0.0, schema-utils@npm:^3.2.0": - version: 3.3.0 - resolution: "schema-utils@npm:3.3.0" - dependencies: - "@types/json-schema": "npm:^7.0.8" - ajv: "npm:^6.12.5" - ajv-keywords: "npm:^3.5.2" - checksum: 10/2c7bbb1da967fdfd320e6cea538949006ec6e8c13ea560a4f94ff2c56809a8486fa5ec419e023452501a6befe1ca381e409c2798c24f4993c7c4094d97fdb258 +"jest-get-type@npm:^29.0.0, jest-get-type@npm:^29.4.3": + version: 29.4.3 + resolution: "jest-get-type@npm:29.4.3" + checksum: 10/6ac7f2dde1c65e292e4355b6c63b3a4897d7e92cb4c8afcf6d397f2682f8080e094c8b0b68205a74d269882ec06bf696a9de6cd3e1b7333531e5ed7b112605ce languageName: node linkType: hard -"schema-utils@npm:^3.1.1": - version: 3.1.1 - resolution: "schema-utils@npm:3.1.1" +"jest-haste-map@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-haste-map@npm:29.6.2" dependencies: - "@types/json-schema": "npm:^7.0.8" - ajv: "npm:^6.12.5" - ajv-keywords: "npm:^3.5.2" - checksum: 10/cfcf991f108797719d8054281272cf508543d6e092e273129fca84d569baafa5344bc23ec98cf2274943f6ed69851ced4fd0ae24471601f3f4d69c00fac47be6 + "@jest/types": "npm:^29.6.1" + "@types/graceful-fs": "npm:^4.1.3" + "@types/node": "npm:*" + anymatch: "npm:^3.0.3" + fb-watchman: "npm:^2.0.0" + fsevents: "npm:^2.3.2" + graceful-fs: "npm:^4.2.9" + jest-regex-util: "npm:^29.4.3" + jest-util: "npm:^29.6.2" + jest-worker: "npm:^29.6.2" + micromatch: "npm:^4.0.4" + walker: "npm:^1.0.8" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/855d2c94979ad0795d5ef31cc81ccf40d2c2f6abd63de34a89e8b12e6b1cf7b9ae875f7479b783b7a2e9f55502ad1d241d483c103bed85a75c2b10eaafea3634 languageName: node linkType: hard -"schema-utils@npm:^4.0.0": - version: 4.0.0 - resolution: "schema-utils@npm:4.0.0" +"jest-leak-detector@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-leak-detector@npm:29.6.2" dependencies: - "@types/json-schema": "npm:^7.0.9" - ajv: "npm:^8.8.0" - ajv-formats: "npm:^2.1.1" - ajv-keywords: "npm:^5.0.0" - checksum: 10/b1bbf840a608be6a2475a3955ff8f7c8fc7be6cdd63154ee26a487530e2b7b557b316f21797b9fe63e8e612b0c377c42c6096e281993ddbda0134fd312ce449c + jest-get-type: "npm:^29.4.3" + pretty-format: "npm:^29.6.2" + checksum: 10/e00152acdba8aa8f9334775b77375947508051c34646fbeb702275da2b6ac6145f8cad6d5893112e76484d00fa8c0b4fd71b78ab0b4ef34950f5b6a84f37ae67 languageName: node linkType: hard -"scrypt-js@npm:2.0.4": - version: 2.0.4 - resolution: "scrypt-js@npm:2.0.4" - checksum: 10/584c42ca17f8da7d9eec483b56743e868d1e795634f9581169f0b40c7abc5d4266dfb9d59d8f0a65479885c74fd44f3a99aca5a5048d3c4f7d33d88389aa2014 +"jest-matcher-utils@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-matcher-utils@npm:29.6.2" + dependencies: + chalk: "npm:^4.0.0" + jest-diff: "npm:^29.6.2" + jest-get-type: "npm:^29.4.3" + pretty-format: "npm:^29.6.2" + checksum: 10/38dc3f71620745054246fb31e1979587fb241d3a2ecea1f325dbcba6503653d7e2482c6deffa99d661b9da2f093c7713d6977fd2a6b8f57537875745049088ed languageName: node linkType: hard -"scrypt-js@npm:3.0.1, scrypt-js@npm:^3.0.0, scrypt-js@npm:^3.0.1": - version: 3.0.1 - resolution: "scrypt-js@npm:3.0.1" - checksum: 10/2f8aa72b7f76a6f9c446bbec5670f80d47497bccce98474203d89b5667717223eeb04a50492ae685ed7adc5a060fc2d8f9fd988f8f7ebdaf3341967f3aeff116 +"jest-message-util@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-message-util@npm:29.6.2" + dependencies: + "@babel/code-frame": "npm:^7.12.13" + "@jest/types": "npm:^29.6.1" + "@types/stack-utils": "npm:^2.0.0" + chalk: "npm:^4.0.0" + graceful-fs: "npm:^4.2.9" + micromatch: "npm:^4.0.4" + pretty-format: "npm:^29.6.2" + slash: "npm:^3.0.0" + stack-utils: "npm:^2.0.3" + checksum: 10/a0e972367f12894dd0bcda2c2cd540607a6884315a411757b2e136eb54a53b54675f2e632b58a121e253bb456cfa564a9e10d5b7238b46de190095de78e445ba languageName: node linkType: hard -"secp256k1@npm:4.0.2": - version: 4.0.2 - resolution: "secp256k1@npm:4.0.2" +"jest-mock@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-mock@npm:29.6.2" dependencies: - elliptic: "npm:^6.5.2" - node-addon-api: "npm:^2.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.0" - checksum: 10/80f0a5b44dbe0a062ed0fbf2a82044037a2598a0ea6ec5a0924bfa1f53006b423a43db82ff1cb2924d280b06f2a34235a1733631b3459b86b7a886c0ef41e0c5 + "@jest/types": "npm:^29.6.1" + "@types/node": "npm:*" + jest-util: "npm:^29.6.2" + checksum: 10/b2cd0e61d22d2bcbaefb167e177977e37a28176f0b54717c068b655da18679db4daa9762d478bf5a347819a89e082a68b3f1f53a4da22401521668424a6d6bac languageName: node linkType: hard -"secp256k1@npm:4.0.3, secp256k1@npm:^4.0.1": - version: 4.0.3 - resolution: "secp256k1@npm:4.0.3" - dependencies: - elliptic: "npm:^6.5.4" - node-addon-api: "npm:^2.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.0" - checksum: 10/8b45820cd90fd2f95cc8fdb9bf8a71e572de09f2311911ae461a951ffa9e30c99186a129d0f1afeb380dd67eca0c10493f8a7513c39063fda015e99995088e3b +"jest-pnp-resolver@npm:^1.2.2": + version: 1.2.2 + resolution: "jest-pnp-resolver@npm:1.2.2" + peerDependencies: + jest-resolve: "*" + peerDependenciesMeta: + jest-resolve: + optional: true + checksum: 10/bd85dcc0e76e0eb0c3d56382ec140f08d25ff4068cda9d0e360bb78fb176cb726d0beab82dc0e8694cafd09f55fee7622b8bcb240afa5fad301f4ed3eebb4f47 languageName: node linkType: hard -"secure-json-parse@npm:^2.7.0": - version: 2.7.0 - resolution: "secure-json-parse@npm:2.7.0" - checksum: 10/974386587060b6fc5b1ac06481b2f9dbbb0d63c860cc73dc7533f27835fdb67b0ef08762dbfef25625c15bc0a0c366899e00076cb0d556af06b71e22f1dede4c +"jest-regex-util@npm:^29.4.3": + version: 29.4.3 + resolution: "jest-regex-util@npm:29.4.3" + checksum: 10/96fc7fc28cd4dd73a63c13a526202c4bd8b351d4e5b68b1a2a2c88da3308c2a16e26feaa593083eb0bac38cca1aa9dd05025412e7de013ba963fb8e66af22b8a languageName: node linkType: hard -"secure-keys@npm:^1.0.0": - version: 1.0.0 - resolution: "secure-keys@npm:1.0.0" - checksum: 10/3dd4e64e6717fe6e2dc4c70e172982fcbad87b853e96566ab1cfaec540587f737bac106853ae469cb32d4a6413cfe80a28176cfe7dfcf7ddd35c9f92e58dffed +"jest-resolve-dependencies@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-resolve-dependencies@npm:29.6.2" + dependencies: + jest-regex-util: "npm:^29.4.3" + jest-snapshot: "npm:^29.6.2" + checksum: 10/f66441b6f2e61c7ab6a00c42f43c42716ce7dca21a5e90bef1a442baf4c7c73445ed06c64442c1f3c933bd96e99fd754e1f9f944ff59d93fb9958270f4a00f40 languageName: node linkType: hard -"seed-random@npm:~2.2.0": - version: 2.2.0 - resolution: "seed-random@npm:2.2.0" - checksum: 10/af4da53206a7fa4b76f4f1bbd1713b10f2e7e4f25a22d1f9247f0e4b5ac86eb8f018338f5fd7f0fe822905f12987aa1d6f4eebf596c5c20afa4a01b0327db624 +"jest-resolve@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-resolve@npm:29.6.2" + dependencies: + chalk: "npm:^4.0.0" + graceful-fs: "npm:^4.2.9" + jest-haste-map: "npm:^29.6.2" + jest-pnp-resolver: "npm:^1.2.2" + jest-util: "npm:^29.6.2" + jest-validate: "npm:^29.6.2" + resolve: "npm:^1.20.0" + resolve.exports: "npm:^2.0.0" + slash: "npm:^3.0.0" + checksum: 10/3b42d596cef79966bef8e10435fc0ba1699db9f00b694f2017c55051e12528253e829eaf34eef06065737c5a7a79013e48b546379126ad3687354ee62d6e1a16 languageName: node linkType: hard -"seek-bzip@npm:^1.0.5": - version: 1.0.6 - resolution: "seek-bzip@npm:1.0.6" +"jest-runner@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-runner@npm:29.6.2" dependencies: - commander: "npm:^2.8.1" - bin: - seek-bunzip: bin/seek-bunzip - seek-table: bin/seek-bzip-table - checksum: 10/e47967b694ba51b87a4e7b388772f9c9f6826547972c4c0d2f72b6dd9a41825fe63e810ad56be0f1bcba71c90550b7cb3aee53c261b9aebc15af1cd04fae008f + "@jest/console": "npm:^29.6.2" + "@jest/environment": "npm:^29.6.2" + "@jest/test-result": "npm:^29.6.2" + "@jest/transform": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + "@types/node": "npm:*" + chalk: "npm:^4.0.0" + emittery: "npm:^0.13.1" + graceful-fs: "npm:^4.2.9" + jest-docblock: "npm:^29.4.3" + jest-environment-node: "npm:^29.6.2" + jest-haste-map: "npm:^29.6.2" + jest-leak-detector: "npm:^29.6.2" + jest-message-util: "npm:^29.6.2" + jest-resolve: "npm:^29.6.2" + jest-runtime: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + jest-watcher: "npm:^29.6.2" + jest-worker: "npm:^29.6.2" + p-limit: "npm:^3.1.0" + source-map-support: "npm:0.5.13" + checksum: 10/378600bec4017b101986ce5a4df7a3a6926f9b24667a4c8cd7e0cf0f38076e1148b25000a2bd3c37b789fe1823ab949b0ffbd6ec250a7bf8fb371533bef2d81e languageName: node linkType: hard -"select-hose@npm:^2.0.0": - version: 2.0.0 - resolution: "select-hose@npm:2.0.0" - checksum: 10/08cdd629a394d20e9005e7956f0624307c702cf950cc0458953e9b87ea961d3b1b72ac02266bdb93ac1eec4fcf42b41db9cabe93aa2b7683d71513d133c44fb5 +"jest-runtime@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-runtime@npm:29.6.2" + dependencies: + "@jest/environment": "npm:^29.6.2" + "@jest/fake-timers": "npm:^29.6.2" + "@jest/globals": "npm:^29.6.2" + "@jest/source-map": "npm:^29.6.0" + "@jest/test-result": "npm:^29.6.2" + "@jest/transform": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + "@types/node": "npm:*" + chalk: "npm:^4.0.0" + cjs-module-lexer: "npm:^1.0.0" + collect-v8-coverage: "npm:^1.0.0" + glob: "npm:^7.1.3" + graceful-fs: "npm:^4.2.9" + jest-haste-map: "npm:^29.6.2" + jest-message-util: "npm:^29.6.2" + jest-mock: "npm:^29.6.2" + jest-regex-util: "npm:^29.4.3" + jest-resolve: "npm:^29.6.2" + jest-snapshot: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + slash: "npm:^3.0.0" + strip-bom: "npm:^4.0.0" + checksum: 10/2f2a1b9cac3019f5b752bb9abf42d1d58cce0b4780399b87c480c74e01b62460bf2f624fdc7288decfe706a99f67f49e9bdc905bb28e0ace2305ee03ae0d886a languageName: node linkType: hard -"selfsigned@npm:^2.1.1": - version: 2.1.1 - resolution: "selfsigned@npm:2.1.1" +"jest-snapshot@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-snapshot@npm:29.6.2" dependencies: - node-forge: "npm:^1" - checksum: 10/6005206e0d005448274aceceaded5195b944f67a42b72d212a6169d2e5f4bdc87c15a3fe45732c544db8c7175702091aaf95403ad6632585294a6ec8cca63638 + "@babel/core": "npm:^7.11.6" + "@babel/generator": "npm:^7.7.2" + "@babel/plugin-syntax-jsx": "npm:^7.7.2" + "@babel/plugin-syntax-typescript": "npm:^7.7.2" + "@babel/types": "npm:^7.3.3" + "@jest/expect-utils": "npm:^29.6.2" + "@jest/transform": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + babel-preset-current-node-syntax: "npm:^1.0.0" + chalk: "npm:^4.0.0" + expect: "npm:^29.6.2" + graceful-fs: "npm:^4.2.9" + jest-diff: "npm:^29.6.2" + jest-get-type: "npm:^29.4.3" + jest-matcher-utils: "npm:^29.6.2" + jest-message-util: "npm:^29.6.2" + jest-util: "npm:^29.6.2" + natural-compare: "npm:^1.4.0" + pretty-format: "npm:^29.6.2" + semver: "npm:^7.5.3" + checksum: 10/d9412eeea378ba070b9a67a161bb65b1b1038106dce8849c9e8266d4688dc8739063c9acd2d011f02f0f2cce2ff4e709be89c0657b03b89150fe7bdae769ec1c languageName: node linkType: hard -"semaphore@npm:>=1.0.1, semaphore@npm:^1.1.0": - version: 1.1.0 - resolution: "semaphore@npm:1.1.0" - checksum: 10/7a62e0486ab2e361aecf5d88ecb99f42236bb9fbe29e432644d8af371e78c559dc3f2fbef0f57f716491071c214bdf1a15f1f398445b20423278750e2290ea37 +"jest-util@npm:^29.0.0": + version: 29.5.0 + resolution: "jest-util@npm:29.5.0" + dependencies: + "@jest/types": "npm:^29.5.0" + "@types/node": "npm:*" + chalk: "npm:^4.0.0" + ci-info: "npm:^3.2.0" + graceful-fs: "npm:^4.2.9" + picomatch: "npm:^2.2.3" + checksum: 10/27ae6fc6221d29b31df9c071f190e0e27a9caaeca04ee1ce03f5c925ec8abf594fcf0cb57bdcb93149381415ff1f8198157332b0c76f3592065b7c3fdb35fca1 languageName: node linkType: hard -"semver-compare@npm:^1.0.0": - version: 1.0.0 - resolution: "semver-compare@npm:1.0.0" - checksum: 10/75f9c7a7786d1756f64b1429017746721e07bd7691bdad6368f7643885d3a98a27586777e9699456564f4844b407e9f186cc1d588a3f9c0be71310e517e942c3 +"jest-util@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-util@npm:29.6.2" + dependencies: + "@jest/types": "npm:^29.6.1" + "@types/node": "npm:*" + chalk: "npm:^4.0.0" + ci-info: "npm:^3.2.0" + graceful-fs: "npm:^4.2.9" + picomatch: "npm:^2.2.3" + checksum: 10/95d510b7bbac6976c71bf9c8f2e861cdc6c47dca0a70c470ebce6fa2afef3fecd73772efdffc04e7aad89602ab388c2f1ee1cb27c505210d767f0731da65c13b languageName: node linkType: hard -"semver-diff@npm:^3.1.1": - version: 3.1.1 - resolution: "semver-diff@npm:3.1.1" +"jest-validate@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-validate@npm:29.6.2" dependencies: - semver: "npm:^6.3.0" - checksum: 10/8bbe5a5d7add2d5e51b72314a9215cd294d71f41cdc2bf6bd59ee76411f3610b576172896f1d191d0d7294cb9f2f847438d2ee158adacc0c224dca79052812fe + "@jest/types": "npm:^29.6.1" + camelcase: "npm:^6.2.0" + chalk: "npm:^4.0.0" + jest-get-type: "npm:^29.4.3" + leven: "npm:^3.1.0" + pretty-format: "npm:^29.6.2" + checksum: 10/90ca8e977743a9bacfb2ef647f48c67c692543feacb4ae40235086df7e28bdef1180196d43dfc92074d8c7c807ab0877c4974a91baed4206c8b773fe2b2298ec languageName: node linkType: hard -"semver-parser@npm:4.1.4": - version: 4.1.4 - resolution: "semver-parser@npm:4.1.4" - checksum: 10/cecb3c8f87acb6adfd5f1729192ad74d04dd5253549187f5cc892feea52a9e56e4a87650fe0019b6595791d3352f655c9e9e036fb816dc3b662aad56a07b5821 +"jest-watcher@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-watcher@npm:29.6.2" + dependencies: + "@jest/test-result": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + "@types/node": "npm:*" + ansi-escapes: "npm:^4.2.1" + chalk: "npm:^4.0.0" + emittery: "npm:^0.13.1" + jest-util: "npm:^29.6.2" + string-length: "npm:^4.0.1" + checksum: 10/dbba1872ef7d2874569b7e3397e2426d16487d3802acdfce836ed995709feac739a74b27f81711346e2bdb9e64f998df590b2e80de5db863d496ac35e41f1ad7 languageName: node linkType: hard -"semver@npm:>=7.5.2": - version: 7.5.4 - resolution: "semver@npm:7.5.4" +"jest-worker@npm:^27.4.5": + version: 27.5.1 + resolution: "jest-worker@npm:27.5.1" dependencies: - lru-cache: "npm:^6.0.0" - bin: - semver: bin/semver.js - checksum: 10/985dec0d372370229a262c737063860fabd4a1c730662c1ea3200a2f649117761a42184c96df62a0e885e76fbd5dace41087d6c1ac0351b13c0df5d6bcb1b5ac + "@types/node": "npm:*" + merge-stream: "npm:^2.0.0" + supports-color: "npm:^8.0.0" + checksum: 10/06c6e2a84591d9ede704d5022fc13791e8876e83397c89d481b0063332abbb64c0f01ef4ca7de520b35c7a1058556078d6bdc3631376f4e9ffb42316c1a8488e languageName: node linkType: hard -"send@npm:0.18.0": - version: 0.18.0 - resolution: "send@npm:0.18.0" +"jest-worker@npm:^29.6.2": + version: 29.6.2 + resolution: "jest-worker@npm:29.6.2" dependencies: - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - mime: "npm:1.6.0" - ms: "npm:2.1.3" - on-finished: "npm:2.4.1" - range-parser: "npm:~1.2.1" - statuses: "npm:2.0.1" - checksum: 10/ec66c0ad109680ad8141d507677cfd8b4e40b9559de23191871803ed241718e99026faa46c398dcfb9250676076573bd6bfe5d0ec347f88f4b7b8533d1d391cb + "@types/node": "npm:*" + jest-util: "npm:^29.6.2" + merge-stream: "npm:^2.0.0" + supports-color: "npm:^8.0.0" + checksum: 10/7564896d0e61fdd202652c1ce17e1c20ef01dcbf313471dd83e687efa424e82745cc4d7ebf19ba8342327fa62971107c0e507a654e0041f310b4d53bee82584f languageName: node linkType: hard -"send@npm:0.19.0": - version: 0.19.0 - resolution: "send@npm:0.19.0" +"jest@npm:29.6.2": + version: 29.6.2 + resolution: "jest@npm:29.6.2" dependencies: - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - mime: "npm:1.6.0" - ms: "npm:2.1.3" - on-finished: "npm:2.4.1" - range-parser: "npm:~1.2.1" - statuses: "npm:2.0.1" - checksum: 10/1f6064dea0ae4cbe4878437aedc9270c33f2a6650a77b56a16b62d057527f2766d96ee282997dd53ec0339082f2aad935bc7d989b46b48c82fc610800dc3a1d0 + "@jest/core": "npm:^29.6.2" + "@jest/types": "npm:^29.6.1" + import-local: "npm:^3.0.2" + jest-cli: "npm:^29.6.2" + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + bin: + jest: bin/jest.js + checksum: 10/1c5279ad907572898890ca86de365eaae8dadcbca66543c57e8137754c6b733df2142e9032bbd249d885615e5ad3e2c5d41e2a681061f71f9a011603a8019f71 languageName: node linkType: hard -"sentence-case@npm:^2.1.0": - version: 2.1.1 - resolution: "sentence-case@npm:2.1.1" - dependencies: - no-case: "npm:^2.2.0" - upper-case-first: "npm:^1.1.2" - checksum: 10/ce5ca48804051e056a6956ad75a1a7d833e5d8f5021a015d380a22d3cf04496d5238de2e5c876d9701a9218633052c3a65911ca1b6460d36a41ecad46e81d139 +"js-levenshtein@npm:^1.1.6": + version: 1.1.6 + resolution: "js-levenshtein@npm:1.1.6" + checksum: 10/bb034043fdebab606122fe5b5c0316036f1bb0ea352038af8b0ba4cda4b016303b24f64efb59d9918f66e3680eea97ff421396ff3c153cb00a6f982908f61f8a languageName: node linkType: hard -"sentence-case@npm:^3.0.4": - version: 3.0.4 - resolution: "sentence-case@npm:3.0.4" - dependencies: - no-case: "npm:^3.0.4" - tslib: "npm:^2.0.3" - upper-case-first: "npm:^2.0.2" - checksum: 10/3cfe6c0143e649132365695706702d7f729f484fa7b25f43435876efe7af2478243eefb052bacbcce10babf9319fd6b5b6bc59b94c80a1c819bcbb40651465d5 +"js-sha3@npm:0.8.0": + version: 0.8.0 + resolution: "js-sha3@npm:0.8.0" + checksum: 10/a49ac6d3a6bfd7091472a28ab82a94c7fb8544cc584ee1906486536ba1cb4073a166f8c7bb2b0565eade23c5b3a7b8f7816231e0309ab5c549b737632377a20c languageName: node linkType: hard -"serialize-error@npm:^2.1.0": - version: 2.1.0 - resolution: "serialize-error@npm:2.1.0" - checksum: 10/28464a6f65e6becd6e49fb782aff06573fdbf3d19f161a20228179842fed05c75a34110e54c3ee020b00240f9e11d8bee9b9fee5d04e0bc0bef1fdbf2baa297e +"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10/af37d0d913fb56aec6dc0074c163cc71cd23c0b8aad5c2350747b6721d37ba118af35abdd8b33c47ec2800de07dedb16a527ca9c530ee004093e04958bd0cbf2 languageName: node linkType: hard -"serialize-error@npm:^8.0.1": - version: 8.1.0 - resolution: "serialize-error@npm:8.1.0" +"js-yaml@npm:^3.13.1, js-yaml@npm:^3.14.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" dependencies: - type-fest: "npm:^0.20.2" - checksum: 10/2eef236d50edd2d7926e602c14fb500dc3a125ee52e9f08f67033181b8e0be5d1122498bdf7c23c80683cddcad083a27974e9e7111ce23165f4d3bcdd6d65102 + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/9e22d80b4d0105b9899135365f746d47466ed53ef4223c529b3c0f7a39907743fdbd3c4379f94f1106f02755b5e90b2faaf84801a891135544e1ea475d1a1379 languageName: node linkType: hard -"serialize-javascript@npm:6.0.0, serialize-javascript@npm:^6.0.0": - version: 6.0.0 - resolution: "serialize-javascript@npm:6.0.0" +"js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" dependencies: - randombytes: "npm:^2.1.0" - checksum: 10/ed3dabfbb565c48c9eb1ca8fe58f0d256902ab70a8a605be634ddd68388d5f728bb0bd1268e94fab628748ba8ad8392f01b05f3cbe1e4878b5c58c669fd3d1b4 + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/c138a34a3fd0d08ebaf71273ad4465569a483b8a639e0b118ff65698d257c2791d3199e3f303631f2cb98213fa7b5f5d6a4621fd0fff819421b990d30d967140 languageName: node linkType: hard -"serialize-javascript@npm:^4.0.0": - version: 4.0.0 - resolution: "serialize-javascript@npm:4.0.0" - dependencies: - randombytes: "npm:^2.1.0" - checksum: 10/df6809168973a84facade7d73e2d6dc418f5dee704d1e6cbe79e92fdb4c10af55237e99d2e67881ae3b29aa96ba596a0dfec4e609bd289ab8ec93c5ae78ede8e +"jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 10/d2096abdcdec56969764b40ffc91d4a23408aa2f351b4d1c13f736f25476643238c43fdbaf38a191c26b1b78fd856d965f5d4d0dde7b89459cd94025190cdf13 languageName: node linkType: hard -"serialize-javascript@npm:^6.0.1": - version: 6.0.1 - resolution: "serialize-javascript@npm:6.0.1" - dependencies: - randombytes: "npm:^2.1.0" - checksum: 10/f756b1ff34b655b2183c64dd6683d28d4d9b9a80284b264cac9fd421c73890491eafd6c5c2bbe93f1f21bf78b572037c5a18d24b044c317ee1c9dc44d22db94c +"json-buffer@npm:3.0.0": + version: 3.0.0 + resolution: "json-buffer@npm:3.0.0" + checksum: 10/6e364585600598c42f1cc85d1305569aeb1a6a13e7c67960f17b403f087e2700104ec8e49fc681ab6d6278ee4d132ac033f2625c22a9777ed9b83b403b40f23e languageName: node linkType: hard -"serialize-javascript@npm:^6.0.2": - version: 6.0.2 - resolution: "serialize-javascript@npm:6.0.2" - dependencies: - randombytes: "npm:^2.1.0" - checksum: 10/445a420a6fa2eaee4b70cbd884d538e259ab278200a2ededd73253ada17d5d48e91fb1f4cd224a236ab62ea7ba0a70c6af29fc93b4f3d3078bf7da1c031fde58 +"json-buffer@npm:3.0.1": + version: 3.0.1 + resolution: "json-buffer@npm:3.0.1" + checksum: 10/82876154521b7b68ba71c4f969b91572d1beabadd87bd3a6b236f85fbc7dc4695089191ed60bb59f9340993c51b33d479f45b6ba9f3548beb519705281c32c3c languageName: node linkType: hard -"serve-index@npm:^1.9.1": - version: 1.9.1 - resolution: "serve-index@npm:1.9.1" - dependencies: - accepts: "npm:~1.3.4" - batch: "npm:0.6.1" - debug: "npm:2.6.9" - escape-html: "npm:~1.0.3" - http-errors: "npm:~1.6.2" - mime-types: "npm:~2.1.17" - parseurl: "npm:~1.3.2" - checksum: 10/2adce2878d7e30f197e66f30e39f4a404d9ae39295c0c13849bb25e7cf976b93e883204739efd1510559588bed56f8101e32191cbe75f374c6e1e803852194cb +"json-parse-better-errors@npm:^1.0.1": + version: 1.0.2 + resolution: "json-parse-better-errors@npm:1.0.2" + checksum: 10/5553232045359b767b0f2039a6777fede1a8d7dca1a0ffb1f9ef73a7519489ae7f566b2e040f2b4c38edb8e35e37ae07af7f0a52420902f869ee0dbf5dc6c784 languageName: node linkType: hard -"serve-static@npm:1.15.0": - version: 1.15.0 - resolution: "serve-static@npm:1.15.0" - dependencies: - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - parseurl: "npm:~1.3.3" - send: "npm:0.18.0" - checksum: 10/699b2d4c29807a51d9b5e0f24955346911437aebb0178b3c4833ad30d3eca93385ff9927254f5c16da345903cad39d9cd4a532198c95a5129cc4ed43911b15a4 +"json-parse-even-better-errors@npm:^2.3.0, json-parse-even-better-errors@npm:^2.3.1": + version: 2.3.1 + resolution: "json-parse-even-better-errors@npm:2.3.1" + checksum: 10/5f3a99009ed5f2a5a67d06e2f298cc97bc86d462034173308156f15b43a6e850be8511dc204b9b94566305da2947f7d90289657237d210351a39059ff9d666cf languageName: node linkType: hard -"serve-static@npm:1.16.2": - version: 1.16.2 - resolution: "serve-static@npm:1.16.2" - dependencies: - encodeurl: "npm:~2.0.0" - escape-html: "npm:~1.0.3" - parseurl: "npm:~1.3.3" - send: "npm:0.19.0" - checksum: 10/7fa9d9c68090f6289976b34fc13c50ac8cd7f16ae6bce08d16459300f7fc61fbc2d7ebfa02884c073ec9d6ab9e7e704c89561882bbe338e99fcacb2912fde737 +"json-parse-even-better-errors@npm:^3.0.0": + version: 3.0.0 + resolution: "json-parse-even-better-errors@npm:3.0.0" + checksum: 10/f1970b5220c7fa23d888565510752c3d5e863f93668a202fcaa719739fa41485dfc6a1db212f702ebd3c873851cc067aebc2917e3f79763cae2fdb95046f38f3 languageName: node linkType: hard -"servify@npm:^0.1.12": - version: 0.1.12 - resolution: "servify@npm:0.1.12" - dependencies: - body-parser: "npm:^1.16.0" - cors: "npm:^2.8.1" - express: "npm:^4.14.0" - request: "npm:^2.79.0" - xhr: "npm:^2.3.3" - checksum: 10/d61b145034aa26c143d7081a56c544aceff256eead27a5894b6785346254438d2b387ac7411bf664024d258779a00dc6c5d9da65f8d60382dac23a8cba0b0d9e +"json-parse-even-better-errors@npm:^3.0.2": + version: 3.0.2 + resolution: "json-parse-even-better-errors@npm:3.0.2" + checksum: 10/6f04ea6c9ccb783630a59297959247e921cc90b917b8351197ca7fd058fccc7079268fd9362be21ba876fc26aa5039369dd0a2280aae49aae425784794a94927 languageName: node linkType: hard -"set-blocking@npm:^2.0.0": - version: 2.0.0 - resolution: "set-blocking@npm:2.0.0" - checksum: 10/8980ebf7ae9eb945bb036b6e283c547ee783a1ad557a82babf758a065e2fb6ea337fd82cac30dd565c1e606e423f30024a19fff7afbf4977d784720c4026a8ef +"json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b languageName: node linkType: hard -"set-cookie-parser@npm:^2.4.1": - version: 2.7.0 - resolution: "set-cookie-parser@npm:2.7.0" - checksum: 10/5c0a197c022d614b3168efbb27a1e81c6eb97a07f1502780648be7483a6bada38c4e516f3d168769e7e3e819d431efdf7b659dcb450196bb7e2594e6a11a2dd7 +"json-schema-traverse@npm:^1.0.0": + version: 1.0.0 + resolution: "json-schema-traverse@npm:1.0.0" + checksum: 10/02f2f466cdb0362558b2f1fd5e15cce82ef55d60cd7f8fa828cf35ba74330f8d767fcae5c5c2adb7851fa811766c694b9405810879bc4e1ddd78a7c0e03658ad languageName: node linkType: hard -"set-function-length@npm:^1.1.1": - version: 1.1.1 - resolution: "set-function-length@npm:1.1.1" - dependencies: - define-data-property: "npm:^1.1.1" - get-intrinsic: "npm:^1.2.1" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - checksum: 10/745ed1d7dc69a6185e0820082fe73838ab3dfd01e75cce83a41e4c1d68bbf34bc5fb38f32ded542ae0b557536b5d2781594499b5dcd19e7db138e06292a76c7b +"json-stable-stringify-without-jsonify@npm:^1.0.1": + version: 1.0.1 + resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" + checksum: 10/12786c2e2f22c27439e6db0532ba321f1d0617c27ad8cb1c352a0e9249a50182fd1ba8b52a18899291604b0c32eafa8afd09e51203f19109a0537f68db2b652d languageName: node linkType: hard -"set-function-length@npm:^1.2.1": - version: 1.2.1 - resolution: "set-function-length@npm:1.2.1" +"json-stable-stringify@npm:1.0.1": + version: 1.0.1 + resolution: "json-stable-stringify@npm:1.0.1" dependencies: - define-data-property: "npm:^1.1.2" - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.3" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.1" - checksum: 10/9ab1d200149574ab27c1a7acae56d6235e02568fc68655fe8afe63e4e02ccad3c27665f55c32408bd1ff40705939dbb7539abfb9c3a07fda27ecad1ab9e449f5 + jsonify: "npm:~0.0.0" + checksum: 10/a6a17cc1a858c85d3a441d0cdc9dde71125d231790c7fd261812587346525e85eca61522cc3bf390f2a7696aff771627f2a33efd1de0d4781ab9f8fd02f96a83 languageName: node linkType: hard -"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": - version: 2.0.1 - resolution: "set-function-name@npm:2.0.1" - dependencies: - define-data-property: "npm:^1.0.1" - functions-have-names: "npm:^1.2.3" - has-property-descriptors: "npm:^1.0.0" - checksum: 10/4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 +"json-stringify-nice@npm:^1.1.4": + version: 1.1.4 + resolution: "json-stringify-nice@npm:1.1.4" + checksum: 10/0e02cae900a1f24df64613dd10a54b354e4ba2b17822f0d7f0d2708182e71a8bbbfac107d54d3ae8fa3d8bab3556e20cef84f193ace92c9df7bc30872ec2926e languageName: node linkType: hard -"set-value@npm:^2.0.0, set-value@npm:^2.0.1": - version: 2.0.1 - resolution: "set-value@npm:2.0.1" - dependencies: - extend-shallow: "npm:^2.0.1" - is-extendable: "npm:^0.1.1" - is-plain-object: "npm:^2.0.3" - split-string: "npm:^3.0.1" - checksum: 10/4f1ccac2e9ad4d1b0851761d41df4bbd3780ed69805f24a80ab237a56d9629760b7b98551cd370931620defe5da329645834e1e9a18574cecad09ce7b2b83296 +"json-stringify-safe@npm:^5.0.1": + version: 5.0.1 + resolution: "json-stringify-safe@npm:5.0.1" + checksum: 10/59169a081e4eeb6f9559ae1f938f656191c000e0512aa6df9f3c8b2437a4ab1823819c6b9fd1818a4e39593ccfd72e9a051fdd3e2d1e340ed913679e888ded8c languageName: node linkType: hard -"setimmediate@npm:1.0.4": - version: 1.0.4 - resolution: "setimmediate@npm:1.0.4" - checksum: 10/eb11c0c817a9373d07a0501c298ebcac72755a1d6444b44d5b7827bc1f81848801fae14067dd14b1cc0529fbc7a794d1a661b99dfbc83784dbbccdf0914a7e63 +"json5@npm:2.2.3, json5@npm:^2.2.2, json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 10/1db67b853ff0de3534085d630691d3247de53a2ed1390ba0ddff681ea43e9b3e30ecbdb65c5e9aab49435e44059c23dbd6fee8ee619419ba37465bb0dd7135da languageName: node linkType: hard -"setimmediate@npm:^1.0.4, setimmediate@npm:^1.0.5": - version: 1.0.5 - resolution: "setimmediate@npm:1.0.5" - checksum: 10/76e3f5d7f4b581b6100ff819761f04a984fa3f3990e72a6554b57188ded53efce2d3d6c0932c10f810b7c59414f85e2ab3c11521877d1dea1ce0b56dc906f485 +"json5@npm:^1.0.2": + version: 1.0.2 + resolution: "json5@npm:1.0.2" + dependencies: + minimist: "npm:^1.2.0" + bin: + json5: lib/cli.js + checksum: 10/a78d812dbbd5642c4f637dd130954acfd231b074965871c3e28a5bbd571f099d623ecf9161f1960c4ddf68e0cc98dee8bebfdb94a71ad4551f85a1afc94b63f6 languageName: node linkType: hard -"setprototypeof@npm:1.1.0": - version: 1.1.0 - resolution: "setprototypeof@npm:1.1.0" - checksum: 10/02d2564e02a260551bab3ec95358dcfde775fe61272b1b7c488de3676a4bb79f280b5668a324aebe0ec73f0d8ba408bc2d816a609ee5d93b1a7936b9d4ba1208 +"json5@npm:^2.1.2, json5@npm:^2.2.1": + version: 2.2.2 + resolution: "json5@npm:2.2.2" + bin: + json5: lib/cli.js + checksum: 10/b95425711d180dbe2b48d62b581fa2899fe66731bf20f5a7e278567a44b2d5111e82f9ae382c07251a616065c919255ab5ad7851cc446eee6a8bc8e539348086 languageName: node linkType: hard -"setprototypeof@npm:1.2.0": - version: 1.2.0 - resolution: "setprototypeof@npm:1.2.0" - checksum: 10/fde1630422502fbbc19e6844346778f99d449986b2f9cdcceb8326730d2f3d9964dbcb03c02aaadaefffecd0f2c063315ebea8b3ad895914bf1afc1747fc172e +"jsonfile@npm:^6.0.1": + version: 6.1.0 + resolution: "jsonfile@npm:6.1.0" + dependencies: + graceful-fs: "npm:^4.1.6" + universalify: "npm:^2.0.0" + dependenciesMeta: + graceful-fs: + optional: true + checksum: 10/03014769e7dc77d4cf05fa0b534907270b60890085dd5e4d60a382ff09328580651da0b8b4cdf44d91e4c8ae64d91791d965f05707beff000ed494a38b6fec85 languageName: node linkType: hard -"sha.js@npm:^2.3.6, sha.js@npm:^2.4.0, sha.js@npm:^2.4.11, sha.js@npm:^2.4.8": - version: 2.4.11 - resolution: "sha.js@npm:2.4.11" - dependencies: - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - bin: - sha.js: ./bin.js - checksum: 10/d833bfa3e0a67579a6ce6e1bc95571f05246e0a441dd8c76e3057972f2a3e098465687a4369b07e83a0375a88703577f71b5b2e966809e67ebc340dbedb478c7 +"jsonify@npm:~0.0.0": + version: 0.0.0 + resolution: "jsonify@npm:0.0.0" + checksum: 10/dc738debf7cc7ebbff2024f07fe089c43f1de48ac68b5ec23aa257e133aaf45a5d3e147a17eac51339a0e1ac6b956a7aad0a18f4e4ce7f583acbadc99c43a566 languageName: node linkType: hard -"sha3@npm:2.1.4, sha3@npm:^2.1.1": - version: 2.1.4 - resolution: "sha3@npm:2.1.4" - dependencies: - buffer: "npm:6.0.3" - checksum: 10/55f8b2608559987219203056c800c64afd3b4ffd5c9ebf281f6adb9d6a7eb5093754987b7c81d83f693f18ef5fb7e62e46bd78b67fc82a6852feda9ef1ba71a7 +"jsonparse@npm:^1.2.0, jsonparse@npm:^1.3.1": + version: 1.3.1 + resolution: "jsonparse@npm:1.3.1" + checksum: 10/24531e956f0f19d79e22c157cebd81b37af3486ae22f9bc1028f8c2a4d1b70df48b168ff86f8568d9c2248182de9b6da9f50f685d5e4b9d1d2d339d2a29d15bc languageName: node linkType: hard -"shallow-clone@npm:^3.0.0": - version: 3.0.1 - resolution: "shallow-clone@npm:3.0.1" - dependencies: - kind-of: "npm:^6.0.2" - checksum: 10/e066bd540cfec5e1b0f78134853e0d892d1c8945fb9a926a579946052e7cb0c70ca4fc34f875a8083aa7910d751805d36ae64af250a6de6f3d28f9fa7be6c21b +"junk@npm:^4.0.0": + version: 4.0.0 + resolution: "junk@npm:4.0.0" + checksum: 10/af79841fbdc0f3a8ec328a4bf68381013c7f52a78821184855a4b19ef95713edb3c30cd144c6393e6159e1b7dfb76b3f682dc983aafb54e52ff321ab1b4a9983 languageName: node linkType: hard -"shallowequal@npm:^1.0.2": - version: 1.1.0 - resolution: "shallowequal@npm:1.1.0" - checksum: 10/f4c1de0837f106d2dbbfd5d0720a5d059d1c66b42b580965c8f06bb1db684be8783538b684092648c981294bf817869f743a066538771dbecb293df78f765e00 +"just-diff-apply@npm:^5.2.0": + version: 5.5.0 + resolution: "just-diff-apply@npm:5.5.0" + checksum: 10/5515c436c89e9ef934f1ea2aac447588c38dd017247ed85254537b005706e64321ca7a9c246fe7106338da1ef3a693f8550ebf11759c854713e9ccffb788a43b languageName: node linkType: hard -"shebang-command@npm:^1.2.0": - version: 1.2.0 - resolution: "shebang-command@npm:1.2.0" - dependencies: - shebang-regex: "npm:^1.0.0" - checksum: 10/9eed1750301e622961ba5d588af2212505e96770ec376a37ab678f965795e995ade7ed44910f5d3d3cb5e10165a1847f52d3348c64e146b8be922f7707958908 +"just-diff@npm:^6.0.0": + version: 6.0.2 + resolution: "just-diff@npm:6.0.2" + checksum: 10/4c6b14d6be2a3391b020ea2b3d1a0acf2f4c60fcb16681c7f6f76d4c0f1841fae5b00c1a2e719980992e46320e4b6c55a4713683cb1873dd41a2621f08c9f8e8 languageName: node linkType: hard -"shebang-command@npm:^2.0.0": - version: 2.0.0 - resolution: "shebang-command@npm:2.0.0" +"key-encoder@npm:2.0.3": + version: 2.0.3 + resolution: "key-encoder@npm:2.0.3" dependencies: - shebang-regex: "npm:^3.0.0" - checksum: 10/6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + "@types/elliptic": "npm:^6.4.9" + asn1.js: "npm:^5.0.1" + bn.js: "npm:^4.11.8" + elliptic: "npm:^6.4.1" + checksum: 10/17f10809dbe7078277aa61a58f64ca6b50abe3475e49311816c83b511f34854dfa1ae8223000e8e1aab3e182f08fe70c925796d444568cd86dfe725969b65613 languageName: node linkType: hard -"shebang-loader@npm:0.0.1": - version: 0.0.1 - resolution: "shebang-loader@npm:0.0.1" - checksum: 10/af7397c9ef24ac9ef68190157eb355354704ae0a31b038e061071e893d0834f2fef1618ac6ad5cb1dee69112efad721f439e6cb6e0c6c576b13f5b537cf2722b +"keyv@npm:^3.0.0": + version: 3.1.0 + resolution: "keyv@npm:3.1.0" + dependencies: + json-buffer: "npm:3.0.0" + checksum: 10/6de272b3f78975a9a0b12259953c09d5bbe9de9acfd845471ebd758928b523f70563462f0c16a866fe9b447ff5bdebda72c62bc23734eb72cd1fb8f1d7076843 languageName: node linkType: hard -"shebang-regex@npm:^1.0.0": - version: 1.0.0 - resolution: "shebang-regex@npm:1.0.0" - checksum: 10/404c5a752cd40f94591dfd9346da40a735a05139dac890ffc229afba610854d8799aaa52f87f7e0c94c5007f2c6af55bdcaeb584b56691926c5eaf41dc8f1372 +"keyv@npm:^4.5.2": + version: 4.5.3 + resolution: "keyv@npm:4.5.3" + dependencies: + json-buffer: "npm:3.0.1" + checksum: 10/2c96e345ecee2c7bf8876b368190b0067308b8da080c1462486fbe71a5b863242c350f1507ddad8f373c5d886b302c42f491de4d3be725071c6743a2f1188ff2 languageName: node linkType: hard -"shebang-regex@npm:^3.0.0": - version: 3.0.0 - resolution: "shebang-regex@npm:3.0.0" - checksum: 10/1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 +"keyv@npm:^4.5.4": + version: 4.5.4 + resolution: "keyv@npm:4.5.4" + dependencies: + json-buffer: "npm:3.0.1" + checksum: 10/167eb6ef64cc84b6fa0780ee50c9de456b422a1e18802209234f7c2cf7eae648c7741f32e50d7e24ccb22b24c13154070b01563d642755b156c357431a191e75 languageName: node linkType: hard -"shell-escape@npm:^0.2.0": - version: 0.2.0 - resolution: "shell-escape@npm:0.2.0" - checksum: 10/18778c2f74369503199bb25add6e4255a0f1a183174d9e09b6682f26ccfb07312395e74e4a9938a8da38caf6c2e608091e6b2b16e49652a5fac35f4f60acfad6 +"kind-of@npm:^6.0.2, kind-of@npm:^6.0.3": + version: 6.0.3 + resolution: "kind-of@npm:6.0.3" + checksum: 10/5873d303fb36aad875b7538798867da2ae5c9e328d67194b0162a3659a627d22f742fc9c4ae95cd1704132a24b00cae5041fc00c0f6ef937dc17080dc4dbb962 languageName: node linkType: hard -"shell-quote@npm:^1.6.1": - version: 1.7.3 - resolution: "shell-quote@npm:1.7.3" - checksum: 10/0ab00c37c84ea3ac13d5f0d45c6850701254fd1d6653d0604a48973ba3911ad0dd9f414672253a01f68fe48bb651a7138317ed4543b75ce4192c1d610e453d4c +"kleur@npm:^3.0.3": + version: 3.0.3 + resolution: "kleur@npm:3.0.3" + checksum: 10/0c0ecaf00a5c6173d25059c7db2113850b5457016dfa1d0e3ef26da4704fbb186b4938d7611246d86f0ddf1bccf26828daa5877b1f232a65e7373d0122a83e7f languageName: node linkType: hard -"shell-quote@npm:^1.7.3": - version: 1.8.1 - resolution: "shell-quote@npm:1.8.1" - checksum: 10/af19ab5a1ec30cb4b2f91fd6df49a7442d5c4825a2e269b3712eded10eedd7f9efeaab96d57829880733fc55bcdd8e9b1d8589b4befb06667c731d08145e274d +"latest-version@npm:^5.1.0": + version: 5.1.0 + resolution: "latest-version@npm:5.1.0" + dependencies: + package-json: "npm:^6.3.0" + checksum: 10/fbc72b071eb66c40f652441fd783a9cca62f08bf42433651937f078cd9ef94bf728ec7743992777826e4e89305aef24f234b515e6030503a2cbee7fc9bdc2c0f languageName: node linkType: hard -"shelljs@npm:0.8.5": - version: 0.8.5 - resolution: "shelljs@npm:0.8.5" - dependencies: - glob: "npm:^7.0.0" - interpret: "npm:^1.0.0" - rechoir: "npm:^0.6.2" - bin: - shjs: bin/shjs - checksum: 10/f2178274b97b44332bbe9ddb78161137054f55ecf701c7a99db9552cb5478fe279ad5f5131d8a7c2f0730e01ccf0c629d01094143f0541962ce1a3d0243d23f7 +"leven@npm:^3.1.0": + version: 3.1.0 + resolution: "leven@npm:3.1.0" + checksum: 10/638401d534585261b6003db9d99afd244dfe82d75ddb6db5c0df412842d5ab30b2ef18de471aaec70fe69a46f17b4ae3c7f01d8a4e6580ef7adb9f4273ad1e55 languageName: node linkType: hard -"shelljs@npm:^0.7.5": - version: 0.7.8 - resolution: "shelljs@npm:0.7.8" +"levn@npm:^0.4.1": + version: 0.4.1 + resolution: "levn@npm:0.4.1" dependencies: - glob: "npm:^7.0.0" - interpret: "npm:^1.0.0" - rechoir: "npm:^0.6.2" - bin: - shjs: ./bin/shjs - checksum: 10/c30b6a204167fcb54d2019a83be1e0f7b03346883d0454cd588911ea88843dbf1383ceb6e745fdea2da4b343644b57d373bc3802aaf74d53765adca8adc89b3a + prelude-ls: "npm:^1.2.1" + type-check: "npm:~0.4.0" + checksum: 10/2e4720ff79f21ae08d42374b0a5c2f664c5be8b6c8f565bb4e1315c96ed3a8acaa9de788ffed82d7f2378cf36958573de07ef92336cb5255ed74d08b8318c9ee languageName: node linkType: hard -"shiki@npm:^1.9.0": - version: 1.9.0 - resolution: "shiki@npm:1.9.0" +"libnpmaccess@npm:^8.0.6": + version: 8.0.6 + resolution: "libnpmaccess@npm:8.0.6" dependencies: - "@shikijs/core": "npm:1.9.0" - checksum: 10/ce5648b4e1a5e5e81e54e01ec9dc94cf324530f460058f29f1e5e464dbf096fee2194fbef38b29128a747f783f9134531991316b01ed168f65d0617dabf84c33 + npm-package-arg: "npm:^11.0.2" + npm-registry-fetch: "npm:^17.0.1" + checksum: 10/62fa6a476321268ebd379f35782d9ead8993964bd9dfc8afbd201921d9037b7bc9d956f8b2717f1247e44ab33cb7de45b556ded66144f4b3038a828299cb260d languageName: node linkType: hard -"side-channel@npm:^1.0.4": - version: 1.0.4 - resolution: "side-channel@npm:1.0.4" +"libnpmpublish@npm:^9.0.9": + version: 9.0.9 + resolution: "libnpmpublish@npm:9.0.9" dependencies: - call-bind: "npm:^1.0.0" - get-intrinsic: "npm:^1.0.2" - object-inspect: "npm:^1.9.0" - checksum: 10/c4998d9fc530b0e75a7fd791ad868fdc42846f072734f9080ff55cc8dc7d3899abcda24fd896aa6648c3ab7021b4bb478073eb4f44dfd55bce9714bc1a7c5d45 + ci-info: "npm:^4.0.0" + normalize-package-data: "npm:^6.0.1" + npm-package-arg: "npm:^11.0.2" + npm-registry-fetch: "npm:^17.0.1" + proc-log: "npm:^4.2.0" + semver: "npm:^7.3.7" + sigstore: "npm:^2.2.0" + ssri: "npm:^10.0.6" + checksum: 10/ea1064a727938abefe345d5af1261db8bdc1e71aedabf6945187c2b3a6ef1a4c9db69747ad3ffd4ecd61ea16866890e0da1a4defcbed64e555e7dcae49e55a98 languageName: node linkType: hard -"side-channel@npm:^1.0.6": - version: 1.0.6 - resolution: "side-channel@npm:1.0.6" +"libtap@npm:^1.4.0": + version: 1.4.1 + resolution: "libtap@npm:1.4.1" dependencies: - call-bind: "npm:^1.0.7" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.4" - object-inspect: "npm:^1.13.1" - checksum: 10/eb10944f38cebad8ad643dd02657592fa41273ce15b8bfa928d3291aff2d30c20ff777cfe908f76ccc4551ace2d1245822fdc576657cce40e9066c638ca8fa4d + async-hook-domain: "npm:^2.0.4" + bind-obj-methods: "npm:^3.0.0" + diff: "npm:^4.0.2" + function-loop: "npm:^2.0.1" + minipass: "npm:^3.1.5" + own-or: "npm:^1.0.0" + own-or-env: "npm:^1.0.2" + signal-exit: "npm:^3.0.4" + stack-utils: "npm:^2.0.4" + tap-parser: "npm:^11.0.0" + tap-yaml: "npm:^1.0.0" + tcompare: "npm:^5.0.6" + trivial-deferred: "npm:^1.0.1" + checksum: 10/911448d32cae54b75798fe936a0e4bd896d5f47db26cce2662620beabd5c2bd2d978e6af4cb1ca9e48a41650c777f61a27aceee7ce56dbe14efde62fb9f6f486 languageName: node linkType: hard -"signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.1, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.4, signal-exit@npm:^3.0.6, signal-exit@npm:^3.0.7": - version: 3.0.7 - resolution: "signal-exit@npm:3.0.7" - checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 +"license-report@npm:6.4.0": + version: 6.4.0 + resolution: "license-report@npm:6.4.0" + dependencies: + "@kessler/tableify": "npm:^1.0.2" + debug: "npm:^4.3.4" + eol: "npm:^0.9.1" + got: "npm:^12.6.0" + rc: "npm:^1.2.8" + semver: "npm:^7.3.8" + tablemark: "npm:^3.0.0" + text-table: "npm:^0.2.0" + visit-values: "npm:^2.0.0" + bin: + license-report: index.js + checksum: 10/75421d49a59f7c79e8bb59f31bdd4f69e1f8480ab1b0712f6fcf73cf03289f1722902410801922ecc8bb09e130b6766bccf61976ff19785e12c202cc60a13040 languageName: node linkType: hard -"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": - version: 4.1.0 - resolution: "signal-exit@npm:4.1.0" - checksum: 10/c9fa63bbbd7431066174a48ba2dd9986dfd930c3a8b59de9c29d7b6854ec1c12a80d15310869ea5166d413b99f041bfa3dd80a7947bcd44ea8e6eb3ffeabfa1f +"lines-and-columns@npm:^1.1.6": + version: 1.2.4 + resolution: "lines-and-columns@npm:1.2.4" + checksum: 10/0c37f9f7fa212b38912b7145e1cd16a5f3cd34d782441c3e6ca653485d326f58b3caccda66efce1c5812bde4961bbde3374fae4b0d11bf1226152337f3894aa5 languageName: node linkType: hard -"signale@npm:^1.4.0": - version: 1.4.0 - resolution: "signale@npm:1.4.0" - dependencies: - chalk: "npm:^2.3.2" - figures: "npm:^2.0.0" - pkg-conf: "npm:^2.1.0" - checksum: 10/0659f7168ce4322f62123e74fd537956b032b1ebac9ffc8fcf3a631082c491186c7715eeb41fc6930187923679b85609cb8923789af594e5be4e7aa06acfffa4 +"lines-and-columns@npm:^2.0.3": + version: 2.0.3 + resolution: "lines-and-columns@npm:2.0.3" + checksum: 10/b5bb0d6ee2f82ae834ceddc9251af2060c30db476673e9c817c34c00bed58e0c5d90a6866b64afe7bdcb2c5eb1b418a5b1ee631d2592dc8ff381540901fa4da6 languageName: node linkType: hard -"sigstore@npm:^1.3.0": - version: 1.9.0 - resolution: "sigstore@npm:1.9.0" +"lint-staged@npm:11.2.6": + version: 11.2.6 + resolution: "lint-staged@npm:11.2.6" dependencies: - "@sigstore/bundle": "npm:^1.1.0" - "@sigstore/protobuf-specs": "npm:^0.2.0" - "@sigstore/sign": "npm:^1.0.0" - "@sigstore/tuf": "npm:^1.0.3" - make-fetch-happen: "npm:^11.0.1" + cli-truncate: "npm:2.1.0" + colorette: "npm:^1.4.0" + commander: "npm:^8.2.0" + cosmiconfig: "npm:^7.0.1" + debug: "npm:^4.3.2" + enquirer: "npm:^2.3.6" + execa: "npm:^5.1.1" + listr2: "npm:^3.12.2" + micromatch: "npm:^4.0.4" + normalize-path: "npm:^3.0.0" + please-upgrade-node: "npm:^3.2.0" + string-argv: "npm:0.3.1" + stringify-object: "npm:3.3.0" + supports-color: "npm:8.1.1" bin: - sigstore: bin/sigstore.js - checksum: 10/7ff59f6bbc6fbf4e11f99df36562cdfd8f27f74650e1794942b0f9b567c6facdd0a6c245375111c464a0c367e617793a1c1787ec1dea9784ad2fb698932b9fb9 + lint-staged: bin/lint-staged.js + checksum: 10/04c588fdbd3f9209f5f1d00b8044410e0b4b84101310e8d0fd5d6bc8053f281b1276b8fa643b886060b909bcb5aa16083f421fefdf8f167c0fa5a40ee306b76d languageName: node linkType: hard -"sigstore@npm:^2.2.0": - version: 2.3.1 - resolution: "sigstore@npm:2.3.1" +"listr2@npm:^3.12.2": + version: 3.14.0 + resolution: "listr2@npm:3.14.0" dependencies: - "@sigstore/bundle": "npm:^2.3.2" - "@sigstore/core": "npm:^1.0.0" - "@sigstore/protobuf-specs": "npm:^0.3.2" - "@sigstore/sign": "npm:^2.3.2" - "@sigstore/tuf": "npm:^2.3.4" - "@sigstore/verify": "npm:^1.2.1" - checksum: 10/4e0a82338d12370264dced2395cda18aaaad45fec630365ec88eaa1a4ba40f5eb08cd3b0c8688489d52e93f643b6598d682961f67858636f55300c590b1ddf62 + cli-truncate: "npm:^2.1.0" + colorette: "npm:^2.0.16" + log-update: "npm:^4.0.0" + p-map: "npm:^4.0.0" + rfdc: "npm:^1.3.0" + rxjs: "npm:^7.5.1" + through: "npm:^2.3.8" + wrap-ansi: "npm:^7.0.0" + peerDependencies: + enquirer: ">= 2.3.0 < 3" + peerDependenciesMeta: + enquirer: + optional: true + checksum: 10/cebbd692330279ea82f05468cbb0a16f5b40015a6163e0a2fb04ef168da8e2d6c54e129148e90112d92e7f9ecb85a56e6b88d867a58a8ebdf36e0c98df49ae5c languageName: node linkType: hard -"simple-concat@npm:^1.0.0": - version: 1.0.1 - resolution: "simple-concat@npm:1.0.1" - checksum: 10/4d211042cc3d73a718c21ac6c4e7d7a0363e184be6a5ad25c8a1502e49df6d0a0253979e3d50dbdd3f60ef6c6c58d756b5d66ac1e05cda9cacd2e9fc59e3876a +"load-json-file@npm:^4.0.0": + version: 4.0.0 + resolution: "load-json-file@npm:4.0.0" + dependencies: + graceful-fs: "npm:^4.1.2" + parse-json: "npm:^4.0.0" + pify: "npm:^3.0.0" + strip-bom: "npm:^3.0.0" + checksum: 10/8f5d6d93ba64a9620445ee9bde4d98b1eac32cf6c8c2d20d44abfa41a6945e7969456ab5f1ca2fb06ee32e206c9769a20eec7002fe290de462e8c884b6b8b356 languageName: node linkType: hard -"simple-get@npm:^2.7.0": - version: 2.8.2 - resolution: "simple-get@npm:2.8.2" - dependencies: - decompress-response: "npm:^3.3.0" - once: "npm:^1.3.1" - simple-concat: "npm:^1.0.0" - checksum: 10/b827672695bbe504217311c47c6a106358babcfbf3d69c8d67ad56da40c2ed05185eec12538dfe3637e1cf0441bcd5931b022a84dc7f8f2d84969d595f7f7fda +"load-json-file@npm:^7.0.1": + version: 7.0.1 + resolution: "load-json-file@npm:7.0.1" + checksum: 10/a560288da6891778321ef993e4bdbdf05374a4f3a3aeedd5ba6b64672798c830d748cfc59a2ec9891a3db30e78b3d04172e0dcb0d4828168289a393147ca0e74 languageName: node linkType: hard -"simple-get@npm:^4.0.0": - version: 4.0.1 - resolution: "simple-get@npm:4.0.1" - dependencies: - decompress-response: "npm:^6.0.0" - once: "npm:^1.3.1" - simple-concat: "npm:^1.0.0" - checksum: 10/93f1b32319782f78f2f2234e9ce34891b7ab6b990d19d8afefaa44423f5235ce2676aae42d6743fecac6c8dfff4b808d4c24fe5265be813d04769917a9a44f36 +"loader-runner@npm:^4.2.0": + version: 4.2.0 + resolution: "loader-runner@npm:4.2.0" + checksum: 10/89a648e0418f23edf2f310bf74a8adb0710548e8d8d47040def081e1b822bdc27b664b796ce43ceb7921fa56485e1f5046417e425714730dc6ea4242e7a176fa languageName: node linkType: hard -"simple-git@npm:3.19.1": - version: 3.19.1 - resolution: "simple-git@npm:3.19.1" +"locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" dependencies: - "@kwsites/file-exists": "npm:^1.1.1" - "@kwsites/promise-deferred": "npm:^1.1.1" - debug: "npm:^4.3.4" - checksum: 10/a8bf386761d5d67d3d3be50e48fa206a4a469d5943a52e09bf0a9f847adaefd4588e8fbc556b6857542c897ec97786c1c6e2db636c7d8996c6139002bedf7810 + p-locate: "npm:^4.1.0" + checksum: 10/83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 languageName: node linkType: hard -"simple-swizzle@npm:^0.2.2": - version: 0.2.2 - resolution: "simple-swizzle@npm:0.2.2" +"locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" dependencies: - is-arrayish: "npm:^0.3.1" - checksum: 10/c6dffff17aaa383dae7e5c056fbf10cf9855a9f79949f20ee225c04f06ddde56323600e0f3d6797e82d08d006e93761122527438ee9531620031c08c9e0d73cc + p-locate: "npm:^5.0.0" + checksum: 10/72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a languageName: node linkType: hard -"simple-update-notifier@npm:^1.0.7": - version: 1.1.0 - resolution: "simple-update-notifier@npm:1.1.0" +"locate-path@npm:^7.1.0": + version: 7.2.0 + resolution: "locate-path@npm:7.2.0" dependencies: - semver: "npm:~7.0.0" - checksum: 10/0f9be259b33fe34b9ac949552c62b3d89ed020ec8e2f64d17cbd1c6c09bf38b4352198cb1871fe191a1566ef4722ef90232f2629ea836b63425d7586a8cfa3f2 + p-locate: "npm:^6.0.0" + checksum: 10/1c6d269d4efec555937081be964e8a9b4a136319c79ca1d45ac6382212a8466113c75bd89e44521ca8ecd1c47fb08523b56eee5c0712bc7d14fec5f729deeb42 languageName: node linkType: hard -"sinon-chai@npm:3.7.0": - version: 3.7.0 - resolution: "sinon-chai@npm:3.7.0" - peerDependencies: - chai: ^4.0.0 - sinon: ">=4.0.0" - checksum: 10/028853eb8a545ca613c6863014a40f07d1e6b81467e20939fefcd13f170206d24165b91099fb297aeb4d137745e321da25daa8e2d665cc0a78f90d5b877e8bbe +"lodash.camelcase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.camelcase@npm:4.3.0" + checksum: 10/c301cc379310441dc73cd6cebeb91fb254bea74e6ad3027f9346fc43b4174385153df420ffa521654e502fd34c40ef69ca4e7d40ee7129a99e06f306032bfc65 languageName: node linkType: hard -"sinon@npm:6.3.5": - version: 6.3.5 - resolution: "sinon@npm:6.3.5" - dependencies: - "@sinonjs/commons": "npm:^1.0.2" - "@sinonjs/formatio": "npm:^3.0.0" - "@sinonjs/samsam": "npm:^2.1.2" - diff: "npm:^3.5.0" - lodash.get: "npm:^4.4.2" - lolex: "npm:^2.7.5" - nise: "npm:^1.4.5" - supports-color: "npm:^5.5.0" - type-detect: "npm:^4.0.8" - checksum: 10/c2299d222329d669ec85078eeb4c7a724cfa7bff62e95d8888a1b35ef1262e09bc44a9b89937f38184d953ac3752da393cbab438fbcea2f30202aefa733170df +"lodash.flattendeep@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.flattendeep@npm:4.4.0" + checksum: 10/0d0b41d8d86999e8bea94905ac65347404d427aacddbc6654dc2f85905e27cd2b708139671ecea135fa6f0a17ed94b9d4cab8ce12b08eddcbb1ddd83952ee4c2 languageName: node linkType: hard -"sisteransi@npm:^1.0.5": - version: 1.0.5 - resolution: "sisteransi@npm:1.0.5" - checksum: 10/aba6438f46d2bfcef94cf112c835ab395172c75f67453fe05c340c770d3c402363018ae1ab4172a1026a90c47eaccf3af7b6ff6fa749a680c2929bd7fa2b37a4 +"lodash.isequal@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.isequal@npm:4.5.0" + checksum: 10/82fc58a83a1555f8df34ca9a2cd300995ff94018ac12cc47c349655f0ae1d4d92ba346db4c19bbfc90510764e0c00ddcc985a358bdcd4b3b965abf8f2a48a214 languageName: node linkType: hard -"sjcl@npm:1.0.8, sjcl@npm:^1.0.8": - version: 1.0.8 - resolution: "sjcl@npm:1.0.8" - checksum: 10/5ab9fe956bc38608e97a3ad09858702610f4a89a6d445aefcda6aa177fc4f808fdb95dbe6c6f3c235af93b3c363e684ef7ceca8a8f69080fb3ec98e38c98ffd9 +"lodash.isfunction@npm:^3.0.9": + version: 3.0.9 + resolution: "lodash.isfunction@npm:3.0.9" + checksum: 10/99e54c34b1e8a9ba75c034deb39cedbd2aca7af685815e67a2a8ec4f73ec9748cda6ebee5a07d7de4b938e90d421fd280e9c385cc190f903ac217ac8aff30314 languageName: node linkType: hard -"slash@npm:^3.0.0": - version: 3.0.0 - resolution: "slash@npm:3.0.0" - checksum: 10/94a93fff615f25a999ad4b83c9d5e257a7280c90a32a7cb8b4a87996e4babf322e469c42b7f649fd5796edd8687652f3fb452a86dc97a816f01113183393f11c +"lodash.isplainobject@npm:^4.0.6": + version: 4.0.6 + resolution: "lodash.isplainobject@npm:4.0.6" + checksum: 10/29c6351f281e0d9a1d58f1a4c8f4400924b4c79f18dfc4613624d7d54784df07efaff97c1ff2659f3e085ecf4fff493300adc4837553104cef2634110b0d5337 languageName: node linkType: hard -"slash@npm:^4.0.0": - version: 4.0.0 - resolution: "slash@npm:4.0.0" - checksum: 10/da8e4af73712253acd21b7853b7e0dbba776b786e82b010a5bfc8b5051a1db38ed8aba8e1e8f400dd2c9f373be91eb1c42b66e91abb407ff42b10feece5e1d2d +"lodash.kebabcase@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.kebabcase@npm:4.1.1" + checksum: 10/d84ec5441ef8e5c718c50315f35b0a045a77c7e8ee3e54472c06dc31f6f3602e95551a16c0923d689198b51deb8902c4bbc54fc9b965b26c1f86e21df3a05f34 languageName: node linkType: hard -"slash@npm:^5.1.0": - version: 5.1.0 - resolution: "slash@npm:5.1.0" - checksum: 10/2c41ec6fb1414cd9bba0fa6b1dd00e8be739e3fe85d079c69d4b09ca5f2f86eafd18d9ce611c0c0f686428638a36c272a6ac14799146a8295f259c10cc45cde4 +"lodash.memoize@npm:4.x": + version: 4.1.2 + resolution: "lodash.memoize@npm:4.1.2" + checksum: 10/192b2168f310c86f303580b53acf81ab029761b9bd9caa9506a019ffea5f3363ea98d7e39e7e11e6b9917066c9d36a09a11f6fe16f812326390d8f3a54a1a6da languageName: node linkType: hard -"slice-ansi@npm:0.0.4": - version: 0.0.4 - resolution: "slice-ansi@npm:0.0.4" - checksum: 10/481d969c6aa771b27d7baacd6fe321751a0b9eb410274bda10ca81ea641bbfe747e428025d6d8f15bd635fdcfd57e8b2d54681ee6b0ce0c40f78644b144759e3 +"lodash.merge@npm:^4.6.2": + version: 4.6.2 + resolution: "lodash.merge@npm:4.6.2" + checksum: 10/d0ea2dd0097e6201be083865d50c3fb54fbfbdb247d9cc5950e086c991f448b7ab0cdab0d57eacccb43473d3f2acd21e134db39f22dac2d6c9ba6bf26978e3d6 languageName: node linkType: hard -"slice-ansi@npm:1.0.0": - version: 1.0.0 - resolution: "slice-ansi@npm:1.0.0" - dependencies: - is-fullwidth-code-point: "npm:^2.0.0" - checksum: 10/b4239e885803d9e35c6a3a17bb530f1d76349753abaf88594ab57dfd666afe8e927efff152d5e010b51d134dd47b6118bb9c47d24c99ed75841c29beae82d9b9 +"lodash.mergewith@npm:^4.6.2": + version: 4.6.2 + resolution: "lodash.mergewith@npm:4.6.2" + checksum: 10/aea75a4492541a4902ac7e551dc6c54b722da0c187f84385d02e8fc33a7ae3454b837822446e5f63fcd5ad1671534ea408740b776670ea4d9c7890b10105fce0 languageName: node linkType: hard -"slice-ansi@npm:^3.0.0": - version: 3.0.0 - resolution: "slice-ansi@npm:3.0.0" - dependencies: - ansi-styles: "npm:^4.0.0" - astral-regex: "npm:^2.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - checksum: 10/5ec6d022d12e016347e9e3e98a7eb2a592213a43a65f1b61b74d2c78288da0aded781f665807a9f3876b9daa9ad94f64f77d7633a0458876c3a4fdc4eb223f24 +"lodash.snakecase@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.snakecase@npm:4.1.1" + checksum: 10/82ed40935d840477ef8fee64f9f263f75989c6cde36b84aae817246d95826228e1b5a7f6093c51de324084f86433634c7af244cb89496633cacfe443071450d0 languageName: node linkType: hard -"slice-ansi@npm:^4.0.0": - version: 4.0.0 - resolution: "slice-ansi@npm:4.0.0" - dependencies: - ansi-styles: "npm:^4.0.0" - astral-regex: "npm:^2.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - checksum: 10/4a82d7f085b0e1b070e004941ada3c40d3818563ac44766cca4ceadd2080427d337554f9f99a13aaeb3b4a94d9964d9466c807b3d7b7541d1ec37ee32d308756 +"lodash.startcase@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.startcase@npm:4.4.0" + checksum: 10/3091048a54a2f92bcf2c6441d2bd9a706fb133d5f461ae7c310d6dca1530338a06c91e9e42a5b14b12e875ddae1814d448050dc02afe2cec09b3995d8e836837 languageName: node linkType: hard -"slide@npm:^1.1.5": - version: 1.1.6 - resolution: "slide@npm:1.1.6" - checksum: 10/3bf19297b9798a31cda0c1c81f98f6f439b34ab011f73474b3f38b680a7fe9a1326b401d00b9fee08655f545c2d3ee0a0f45c46abd79293f6fabf5580ffacb5d +"lodash.uniq@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.uniq@npm:4.5.0" + checksum: 10/86246ca64ac0755c612e5df6d93cfe92f9ecac2e5ff054b965efbbb1d9a647b6310969e78545006f70f52760554b03233ad0103324121ae31474c20d5f7a2812 languageName: node linkType: hard -"smart-buffer@npm:^4.2.0": - version: 4.2.0 - resolution: "smart-buffer@npm:4.2.0" - checksum: 10/927484aa0b1640fd9473cee3e0a0bcad6fce93fd7bbc18bac9ad0c33686f5d2e2c422fba24b5899c184524af01e11dd2bd051c2bf2b07e47aff8ca72cbfc60d2 +"lodash.upperfirst@npm:^4.3.1": + version: 4.3.1 + resolution: "lodash.upperfirst@npm:4.3.1" + checksum: 10/3e849d4eb4dbf26faee6435edda8e707b65a5dbd2f10f8def5a16a57bbbf38d3b7506950f0dd455e9c46ba73af35f1de75df4ef83952106949413d64eed59333 languageName: node linkType: hard -"smoldot@npm:1.0.4": - version: 1.0.4 - resolution: "smoldot@npm:1.0.4" - dependencies: - pako: "npm:^2.0.4" - ws: "npm:^8.8.1" - checksum: 10/fc7bf256c741c8d0b805f813a3834c3f5fdeda116bdbc49b31db6525ac023015a5ffd4d56822e878ab72fc00efbdeaf0a3e21a08efdc7a6aa066bcc73eda136d +"lodash@npm:>=4.17.21": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: 10/c08619c038846ea6ac754abd6dd29d2568aa705feb69339e836dfa8d8b09abbb2f859371e86863eda41848221f9af43714491467b5b0299122431e202bb0c532 languageName: node linkType: hard -"snake-case@npm:^2.1.0": - version: 2.1.0 - resolution: "snake-case@npm:2.1.0" +"log-symbols@npm:^4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" dependencies: - no-case: "npm:^2.2.0" - checksum: 10/7e42b4841103be4dd050b2f57f5cb423d5164524c1cb3d81efda9809265a82a2d02ddf44361beae37d75a239308e6414be85fe441dc48cd70c708cb975387d10 + chalk: "npm:^4.1.0" + is-unicode-supported: "npm:^0.1.0" + checksum: 10/fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 languageName: node linkType: hard -"snapdragon@npm:^0.8.1": - version: 0.8.2 - resolution: "snapdragon@npm:0.8.2" +"log-update@npm:^4.0.0": + version: 4.0.0 + resolution: "log-update@npm:4.0.0" dependencies: - base: "npm:^0.11.1" - debug: "npm:^2.2.0" - define-property: "npm:^0.2.5" - extend-shallow: "npm:^2.0.1" - map-cache: "npm:^0.2.2" - source-map: "npm:^0.5.6" - source-map-resolve: "npm:^0.5.0" - use: "npm:^3.1.0" - checksum: 10/cbe35b25dca5504be0ced90d907948d8efeda0b118d9a032bfc499e22b7f78515832f2706d9c9297c87906eaa51c12bfcaa8ea5a4f3e98ecf1116a73428e344a + ansi-escapes: "npm:^4.3.0" + cli-cursor: "npm:^3.1.0" + slice-ansi: "npm:^4.0.0" + wrap-ansi: "npm:^6.2.0" + checksum: 10/ae2f85bbabc1906034154fb7d4c4477c79b3e703d22d78adee8b3862fa913942772e7fa11713e3d96fb46de4e3cabefbf5d0a544344f03b58d3c4bff52aa9eb2 languageName: node linkType: hard -"socket.io-adapter@npm:~2.5.2": - version: 2.5.5 - resolution: "socket.io-adapter@npm:2.5.5" - dependencies: - debug: "npm:~4.3.4" - ws: "npm:~8.17.1" - checksum: 10/e364733a4c34ff1d4a02219e409bd48074fd614b7f5b0568ccfa30dd553252a5b9a41056931306a276891d13ea76a19e2c6f2128a4675c37323f642896874d80 +"loglevel-plugin-prefix@npm:0.8.4": + version: 0.8.4 + resolution: "loglevel-plugin-prefix@npm:0.8.4" + checksum: 10/23db44ee8e820c9a9e8df5d28499998ecbd90559ce29d2439cd6f69e181ed8605090f61ae8e25aa86a9a760c14a3ae23e363bc6df48d8c90bb120a2bafa4424e languageName: node linkType: hard -"socket.io-client-fixed-types@npm:4.5.4": - version: 4.5.4 - resolution: "socket.io-client-fixed-types@npm:4.5.4" - dependencies: - "@socket.io/component-emitter": "npm:~3.1.0" - debug: "npm:~4.3.2" - engine.io-client: "npm:~6.2.3" - socket.io-parser: "npm:~4.2.1" - checksum: 10/ba0eb52ad8988b1163b93e48c4dfc13be2fbd732a6c5cf6a135a14004b4e6cb2325fcfb3044326eccea170f3fbf3ef1e6c5812d960b5b1c945a8f0876a015426 +"loglevel@npm:1.7.1": + version: 1.7.1 + resolution: "loglevel@npm:1.7.1" + checksum: 10/f202a6348c98f65ff970f8b9fa0a9a6001206c134732bd50ceaff0ac6585534349a482043909ee22caffcec57a89422ae39773dbe7a6f108b0e4409dd26ed387 languageName: node linkType: hard -"socket.io-parser@npm:>=4.2.3": - version: 4.2.4 - resolution: "socket.io-parser@npm:4.2.4" - dependencies: - "@socket.io/component-emitter": "npm:~3.1.0" - debug: "npm:~4.3.1" - checksum: 10/4be500a9ff7e79c50ec25af11048a3ed34b4c003a9500d656786a1e5bceae68421a8394cf3eb0aa9041f85f36c1a9a737617f4aee91a42ab4ce16ffb2aa0c89c +"long@npm:^5.0.0": + version: 5.2.3 + resolution: "long@npm:5.2.3" + checksum: 10/9167ec6947a825b827c30da169a7384eec6c0c9ec2f0b9c74da2e93d81159bbe39fb09c3f13dae9721d4b807ccfa09797a7dd1012f5d478e3e33ca3c78b608e6 languageName: node linkType: hard -"socket.io@npm:4.6.2": - version: 4.6.2 - resolution: "socket.io@npm:4.6.2" +"loose-envify@npm:^1.1.0": + version: 1.4.0 + resolution: "loose-envify@npm:1.4.0" dependencies: - accepts: "npm:~1.3.4" - base64id: "npm:~2.0.0" - debug: "npm:~4.3.2" - engine.io: "npm:~6.4.2" - socket.io-adapter: "npm:~2.5.2" - socket.io-parser: "npm:~4.2.4" - checksum: 10/47c4e0f9638c97d08f37ecd4b5dcaa6be17d572ecf713ff6e5ca6162d2b15f77aad7f14bcf76f613a16f6dee822fbd4a3e1d6d65ee0a1d4fdc56a6e5e600eda8 + js-tokens: "npm:^3.0.0 || ^4.0.0" + bin: + loose-envify: cli.js + checksum: 10/6517e24e0cad87ec9888f500c5b5947032cdfe6ef65e1c1936a0c48a524b81e65542c9c3edc91c97d5bddc806ee2a985dbc79be89215d613b1de5db6d1cfe6f4 languageName: node linkType: hard -"sockjs@npm:^0.3.24": - version: 0.3.24 - resolution: "sockjs@npm:0.3.24" +"lower-case@npm:^2.0.2": + version: 2.0.2 + resolution: "lower-case@npm:2.0.2" dependencies: - faye-websocket: "npm:^0.11.3" - uuid: "npm:^8.3.2" - websocket-driver: "npm:^0.7.4" - checksum: 10/36312ec9772a0e536b69b72e9d1c76bd3d6ecf885c5d8fd6e59811485c916b8ce75f46ec57532f436975815ee14aa9a0e22ae3d9e5c0b18ea37b56d0aaaf439c + tslib: "npm:^2.0.3" + checksum: 10/83a0a5f159ad7614bee8bf976b96275f3954335a84fad2696927f609ddae902802c4f3312d86668722e668bef41400254807e1d3a7f2e8c3eede79691aa1f010 languageName: node linkType: hard -"socks-proxy-agent@npm:^6.0.0": - version: 6.1.1 - resolution: "socks-proxy-agent@npm:6.1.1" - dependencies: - agent-base: "npm:^6.0.2" - debug: "npm:^4.3.1" - socks: "npm:^2.6.1" - checksum: 10/53fb7d34bf3e5ed9cf4de73bf5c18b351d75c4a8757a0c0e384c2a7c86adf688e5f5e8f72eee7bc6c01ff619458f621ccf9d172bc986adb05f10fa0c9599c39e +"lowercase-keys@npm:^1.0.0, lowercase-keys@npm:^1.0.1": + version: 1.0.1 + resolution: "lowercase-keys@npm:1.0.1" + checksum: 10/12ba64572dc25ae9ee30d37a11f3a91aea046c1b6b905fdf8ac77e2f268f153ed36e60d39cb3bfa47a89f31d981dae9a8cc9915124a56fe51ff01ed6e8bb68fa languageName: node linkType: hard -"socks-proxy-agent@npm:^7.0.0": - version: 7.0.0 - resolution: "socks-proxy-agent@npm:7.0.0" - dependencies: - agent-base: "npm:^6.0.2" - debug: "npm:^4.3.3" - socks: "npm:^2.6.2" - checksum: 10/26c75d9c62a9ed3fd494df60e65e88da442f78e0d4bc19bfd85ac37bd2c67470d6d4bba5202e804561cda6674db52864c9e2a2266775f879bc8d89c1445a5f4c +"lowercase-keys@npm:^2.0.0": + version: 2.0.0 + resolution: "lowercase-keys@npm:2.0.0" + checksum: 10/1c233d2da35056e8c49fae8097ee061b8c799b2f02e33c2bf32f9913c7de8fb481ab04dab7df35e94156c800f5f34e99acbf32b21781d87c3aa43ef7b748b79e languageName: node linkType: hard -"socks-proxy-agent@npm:^8.0.1": - version: 8.0.2 - resolution: "socks-proxy-agent@npm:8.0.2" - dependencies: - agent-base: "npm:^7.0.2" - debug: "npm:^4.3.4" - socks: "npm:^2.7.1" - checksum: 10/ea727734bd5b2567597aa0eda14149b3b9674bb44df5937bbb9815280c1586994de734d965e61f1dd45661183d7b41f115fb9e432d631287c9063864cfcc2ecc +"lowercase-keys@npm:^3.0.0": + version: 3.0.0 + resolution: "lowercase-keys@npm:3.0.0" + checksum: 10/67a3f81409af969bc0c4ca0e76cd7d16adb1e25aa1c197229587eaf8671275c8c067cd421795dbca4c81be0098e4c426a086a05e30de8a9c587b7a13c0c7ccc5 languageName: node linkType: hard -"socks@npm:^2.6.1, socks@npm:^2.6.2": - version: 2.6.2 - resolution: "socks@npm:2.6.2" - dependencies: - ip: "npm:^1.1.5" - smart-buffer: "npm:^4.2.0" - checksum: 10/820232ddaeb847ef33312c429fb51aae03e1b774917f189ef491048bb4c4d7742924064f72d7730e3aa08a3ddb6cc2bdcd5949d34c35597e4f6a66eefd994f14 +"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": + version: 10.0.1 + resolution: "lru-cache@npm:10.0.1" + checksum: 10/5bb91a97a342a41fd049c3494b44d9e21a7d4843f9284d0a0b26f00bb0e436f1f627d0641c78f88be16b86b4231546c5ee4f284733fb530c7960f0bcd7579026 languageName: node linkType: hard -"socks@npm:^2.7.1": - version: 2.7.1 - resolution: "socks@npm:2.7.1" - dependencies: - ip: "npm:^2.0.0" - smart-buffer: "npm:^4.2.0" - checksum: 10/5074f7d6a13b3155fa655191df1c7e7a48ce3234b8ccf99afa2ccb56591c195e75e8bb78486f8e9ea8168e95a29573cbaad55b2b5e195160ae4d2ea6811ba833 +"lru-cache@npm:^10.2.0, lru-cache@npm:^10.2.2": + version: 10.3.0 + resolution: "lru-cache@npm:10.3.0" + checksum: 10/37e921aedbd1f4062475d9fa6760391fa7adfaaee3a5a6cbedd1d6d0b46705c14012312c1edb2b13f119eae6584a48f73c158d118828d42475b44a7abf7d05ab languageName: node linkType: hard -"sodium-native@npm:^4.0.10": - version: 4.1.1 - resolution: "sodium-native@npm:4.1.1" +"lru-cache@npm:^6.0.0": + version: 6.0.0 + resolution: "lru-cache@npm:6.0.0" dependencies: - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.8.0" - checksum: 10/cb30564f07c55b2a7f8016b4df16fd2b0ede10981c6d0b4dfe20ef884f702d55884d2128f22da1ffe9a378aec43a4f0c5539aadf23c4fd3fabc5d05ead1301d2 + yallist: "npm:^4.0.0" + checksum: 10/fc1fe2ee205f7c8855fa0f34c1ab0bcf14b6229e35579ec1fd1079f31d6fc8ef8eb6fd17f2f4d99788d7e339f50e047555551ebd5e434dda503696e7c6591825 languageName: node linkType: hard -"solc@npm:0.7.3": - version: 0.7.3 - resolution: "solc@npm:0.7.3" - dependencies: - command-exists: "npm:^1.2.8" - commander: "npm:3.0.2" - follow-redirects: "npm:^1.12.1" - fs-extra: "npm:^0.30.0" - js-sha3: "npm:0.8.0" - memorystream: "npm:^0.3.1" - require-from-string: "npm:^2.0.0" - semver: "npm:^5.5.0" - tmp: "npm:0.0.33" - bin: - solcjs: solcjs - checksum: 10/68bb783765d1aacf6ebe151ddbffff4c17f679046f2f83a2abae99c57cc0e7dbbcebd62b31861892df18fde272697c37c7a7518f1a9b1219de80217f0c780f0b +"lru-cache@npm:^7.14.1, lru-cache@npm:^7.7.1": + version: 7.18.3 + resolution: "lru-cache@npm:7.18.3" + checksum: 10/6029ca5aba3aacb554e919d7ef804fffd4adfc4c83db00fac8248c7c78811fb6d4b6f70f7fd9d55032b3823446546a007edaa66ad1f2377ae833bd983fac5d98 languageName: node linkType: hard -"solc@npm:0.8.21": - version: 0.8.21 - resolution: "solc@npm:0.8.21" +"madge@npm:7.0.0": + version: 7.0.0 + resolution: "madge@npm:7.0.0" dependencies: - command-exists: "npm:^1.2.8" - commander: "npm:^8.1.0" - follow-redirects: "npm:^1.12.1" - js-sha3: "npm:0.8.0" - memorystream: "npm:^0.3.1" - semver: "npm:^5.5.0" - tmp: "npm:0.0.33" + chalk: "npm:^4.1.2" + commander: "npm:^7.2.0" + commondir: "npm:^1.0.1" + debug: "npm:^4.3.4" + dependency-tree: "npm:^10.0.9" + ora: "npm:^5.4.1" + pluralize: "npm:^8.0.0" + precinct: "npm:^11.0.5" + pretty-ms: "npm:^7.0.1" + rc: "npm:^1.2.8" + stream-to-array: "npm:^2.3.0" + ts-graphviz: "npm:^1.8.1" + walkdir: "npm:^0.4.1" + peerDependencies: + typescript: ^3.9.5 || ^4.9.5 || ^5 + peerDependenciesMeta: + typescript: + optional: true bin: - solcjs: solc.js - checksum: 10/e050323d171e38969b159567b0635ee9f58285f89e477a1650008e91b7c4ea176c3ad6d984e568ec4046fed0ff63d93b148ea53fa8177fe294278fea41af55a9 + madge: bin/cli.js + checksum: 10/2503b2dec14d0fec01b6279acc2c2556931fc6aabf35a6c48abaf2a0c2c6185248216bdc9d051dfa93b5b347448d17e82f559faa9b826bcc5d3ec9d4800a668d languageName: node linkType: hard -"solc@npm:0.8.6": - version: 0.8.6 - resolution: "solc@npm:0.8.6" +"magic-string@npm:^0.30.5": + version: 0.30.5 + resolution: "magic-string@npm:0.30.5" dependencies: - command-exists: "npm:^1.2.8" - commander: "npm:3.0.2" - follow-redirects: "npm:^1.12.1" - fs-extra: "npm:^0.30.0" - js-sha3: "npm:0.8.0" - memorystream: "npm:^0.3.1" - require-from-string: "npm:^2.0.0" - semver: "npm:^5.5.0" - tmp: "npm:0.0.33" - bin: - solcjs: solcjs - checksum: 10/e86a816bd23fc95cbee20a7066513620049fce6916129d62249bee4f73b0fd062e275cbda6602832a9147d49477d12e71d8b3acf9b5096df5ec556bf7e8699fd + "@jridgewell/sourcemap-codec": "npm:^1.4.15" + checksum: 10/c8a6b25f813215ca9db526f3a407d6dc0bf35429c2b8111d6f1c2cf6cf6afd5e2d9f9cd189416a0e3959e20ecd635f73639f9825c73de1074b29331fe36ace59 languageName: node linkType: hard -"solc@npm:^0.4.20": - version: 0.4.26 - resolution: "solc@npm:0.4.26" +"make-dir-cli@npm:3.1.0": + version: 3.1.0 + resolution: "make-dir-cli@npm:3.1.0" dependencies: - fs-extra: "npm:^0.30.0" - memorystream: "npm:^0.3.1" - require-from-string: "npm:^1.1.0" - semver: "npm:^5.3.0" - yargs: "npm:^4.7.1" + make-dir: "npm:^4.0.0" + meow: "npm:^10.0.0" bin: - solcjs: solcjs - checksum: 10/18fbdc5056988e236b451f679921fb89b145d102bfad773ffa382f6203e7b116cc4e29e981a9ee9e1ff3b288b912fc2fc577d263c318bbe3069def3ceb8a1b12 + make-dir: cli.js + checksum: 10/8a5b4cc92efdde9bdc82be5abfaf6819ab862ffd0c0a96788fa3685baff7af23ab4e8a7a9e85cde4a9f585345fcf638da098ecd993f5420b87e1c643e794381d languageName: node linkType: hard -"solc@npm:^0.6.0": - version: 0.6.12 - resolution: "solc@npm:0.6.12" +"make-dir@npm:^3.0.0, make-dir@npm:^3.0.2, make-dir@npm:^3.1.0": + version: 3.1.0 + resolution: "make-dir@npm:3.1.0" dependencies: - command-exists: "npm:^1.2.8" - commander: "npm:3.0.2" - fs-extra: "npm:^0.30.0" - js-sha3: "npm:0.8.0" - memorystream: "npm:^0.3.1" - require-from-string: "npm:^2.0.0" - semver: "npm:^5.5.0" - tmp: "npm:0.0.33" - bin: - solcjs: solcjs - checksum: 10/27c665d182baf9120e489ac1ce1dc2b66237801d4386328b734d37bb44e596e687aacbc140b19bf4531c2549c2779a53f95ac25078ae24dcd0be8823e2081f17 + semver: "npm:^6.0.0" + checksum: 10/484200020ab5a1fdf12f393fe5f385fc8e4378824c940fba1729dcd198ae4ff24867bc7a5646331e50cead8abff5d9270c456314386e629acec6dff4b8016b78 languageName: node linkType: hard -"sonic-boom@npm:^4.0.1": - version: 4.1.0 - resolution: "sonic-boom@npm:4.1.0" +"make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" dependencies: - atomic-sleep: "npm:^1.0.0" - checksum: 10/7d42eb31a79e5927f268217b13206ab39c135c95f5e4b9a68745d9f4fdede0c291216c7594947028a7fdcf850342aa3bc49d0f5211618bfeff06dccdbc1bdb4e + semver: "npm:^7.5.3" + checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a languageName: node linkType: hard -"sort-keys@npm:^5.0.0": +"make-dir@npm:^5.0.0": version: 5.0.0 - resolution: "sort-keys@npm:5.0.0" - dependencies: - is-plain-obj: "npm:^4.0.0" - checksum: 10/9c0b7a468312075be03770b260b2cc0e5d55149025e564edaed41c9ff619199698aad6712a6fe4bbc75c541efb081276ac6bbd4cf2723d742f272f7a8fe354f5 + resolution: "make-dir@npm:5.0.0" + checksum: 10/9f40f4756af5138ca3b138f9e8af144b0420516e96b0e079d816a173d2f69b2ef3425abf20e25764d222c0939a9fd2bce91dd26c22002a559cd6beaea5c994d2 languageName: node linkType: hard -"sort-object-keys@npm:^1.1.3": - version: 1.1.3 - resolution: "sort-object-keys@npm:1.1.3" - checksum: 10/abea944d6722a1710a1aa6e4f9509da085d93d5fc0db23947cb411eedc7731f80022ce8fa68ed83a53dd2ac7441fcf72a3f38c09b3d9bbc4ff80546aa2e151ad +"make-error@npm:1.x, make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 languageName: node linkType: hard -"sort-package-json@npm:1.57.0": - version: 1.57.0 - resolution: "sort-package-json@npm:1.57.0" +"make-fetch-happen@npm:^11.0.3": + version: 11.1.1 + resolution: "make-fetch-happen@npm:11.1.1" dependencies: - detect-indent: "npm:^6.0.0" - detect-newline: "npm:3.1.0" - git-hooks-list: "npm:1.0.3" - globby: "npm:10.0.0" - is-plain-obj: "npm:2.1.0" - sort-object-keys: "npm:^1.1.3" - bin: - sort-package-json: cli.js - checksum: 10/abc217315070ffd6559b32b95917b92c8376880c0d17b4ad2b0eeacdffb38bf723b892a56c56d91ae6999fca3369bfdf5e29b1b02b2fc944b0cbb299c069d0e8 - languageName: node - linkType: hard - -"source-list-map@npm:^2.0.0, source-list-map@npm:^2.0.1": - version: 2.0.1 - resolution: "source-list-map@npm:2.0.1" - checksum: 10/3918ffba5fe8447bc816800026fe707aab233d9d05a3487225d880e23b7e37ed455b4e1b844e05644f6ecc7c9b837c0cc32da54dd37f77c993370ebcdb049246 + agentkeepalive: "npm:^4.2.1" + cacache: "npm:^17.0.0" + http-cache-semantics: "npm:^4.1.1" + http-proxy-agent: "npm:^5.0.0" + https-proxy-agent: "npm:^5.0.0" + is-lambda: "npm:^1.0.1" + lru-cache: "npm:^7.7.1" + minipass: "npm:^5.0.0" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + promise-retry: "npm:^2.0.1" + socks-proxy-agent: "npm:^7.0.0" + ssri: "npm:^10.0.0" + checksum: 10/b4b442cfaaec81db159f752a5f2e3ee3d7aa682782868fa399200824ec6298502e01bdc456e443dc219bcd5546c8e4471644d54109c8599841dc961d17a805fa languageName: node linkType: hard -"source-map-js@npm:>=0.6.2 <2.0.0, source-map-js@npm:^1.0.1, source-map-js@npm:^1.0.2": - version: 1.0.2 - resolution: "source-map-js@npm:1.0.2" - checksum: 10/38e2d2dd18d2e331522001fc51b54127ef4a5d473f53b1349c5cca2123562400e0986648b52e9407e348eaaed53bce49248b6e2641e6d793ca57cb2c360d6d51 +"make-fetch-happen@npm:^13.0.0": + version: 13.0.0 + resolution: "make-fetch-happen@npm:13.0.0" + dependencies: + "@npmcli/agent": "npm:^2.0.0" + cacache: "npm:^18.0.0" + http-cache-semantics: "npm:^4.1.1" + is-lambda: "npm:^1.0.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + promise-retry: "npm:^2.0.1" + ssri: "npm:^10.0.0" + checksum: 10/ded5a91a02b76381b06a4ec4d5c1d23ebbde15d402b3c3e4533b371dac7e2f7ca071ae71ae6dae72aa261182557b7b1b3fd3a705b39252dc17f74fa509d3e76f languageName: node linkType: hard -"source-map-loader@npm:4.0.1": - version: 4.0.1 - resolution: "source-map-loader@npm:4.0.1" +"make-fetch-happen@npm:^13.0.1": + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" dependencies: - abab: "npm:^2.0.6" - iconv-lite: "npm:^0.6.3" - source-map-js: "npm:^1.0.2" - peerDependencies: - webpack: ^5.72.1 - checksum: 10/bdddd7a391bec85a02da47a4ab02d2c63e6736231b712913dd423f1c2a4e8668888813a9213014fcf41fc6991b61c795d703f3a684b7e1c7335bd0a8f9f23ccd + "@npmcli/agent": "npm:^2.0.0" + cacache: "npm:^18.0.0" + http-cache-semantics: "npm:^4.1.1" + is-lambda: "npm:^1.0.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + proc-log: "npm:^4.2.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^10.0.0" + checksum: 10/11bae5ad6ac59b654dbd854f30782f9de052186c429dfce308eda42374528185a100ee40ac9ffdc36a2b6c821ecaba43913e4730a12f06f15e895ea9cb23fa59 languageName: node linkType: hard -"source-map-loader@npm:5.0.0": - version: 5.0.0 - resolution: "source-map-loader@npm:5.0.0" +"makeerror@npm:1.0.12": + version: 1.0.12 + resolution: "makeerror@npm:1.0.12" dependencies: - iconv-lite: "npm:^0.6.3" - source-map-js: "npm:^1.0.2" - peerDependencies: - webpack: ^5.72.1 - checksum: 10/9bc90a50df1a3570ddc1ea9cd1aeadb241fd6f6ddb03e72a8f45f5d3fcc357e7edcc9fff8d35d2e338d17edf13c38a7b6e530308ac263d1b462a1e6bfacaf1a1 + tmpl: "npm:1.0.5" + checksum: 10/4c66ddfc654537333da952c084f507fa4c30c707b1635344eb35be894d797ba44c901a9cebe914aa29a7f61357543ba09b09dddbd7f65b4aee756b450f169f40 languageName: node linkType: hard -"source-map-loader@npm:^3.0.0": - version: 3.0.2 - resolution: "source-map-loader@npm:3.0.2" - dependencies: - abab: "npm:^2.0.5" - iconv-lite: "npm:^0.6.3" - source-map-js: "npm:^1.0.1" - peerDependencies: - webpack: ^5.0.0 - checksum: 10/70161b49a155008a4b3f5097d3c1638ddf244ec82d6dbf092be142cefd85316ee0d1f625f498598031053c4f2de4751657ca8c38ee8e61f6af97698fb4fc4d0b +"map-obj@npm:^1.0.0": + version: 1.0.1 + resolution: "map-obj@npm:1.0.1" + checksum: 10/f8e6fc7f6137329c376c4524f6d25b3c243c17019bc8f621d15a2dcb855919e482a9298a78ae58b00dbd0e76b640bf6533aa343a9e993cfc16e0346a2507e7f8 languageName: node linkType: hard -"source-map-resolve@npm:^0.5.0": - version: 0.5.3 - resolution: "source-map-resolve@npm:0.5.3" - dependencies: - atob: "npm:^2.1.2" - decode-uri-component: "npm:^0.2.0" - resolve-url: "npm:^0.2.1" - source-map-url: "npm:^0.4.0" - urix: "npm:^0.1.0" - checksum: 10/98e281cceb86b80c8bd3453110617b9df93132d6a50c7bf5847b5d74b4b5d6e1d4d261db276035b9b7e5ba7f32c2d6a0d2c13d581e37870a0219a524402efcab +"map-obj@npm:^4.0.0, map-obj@npm:^4.1.0": + version: 4.3.0 + resolution: "map-obj@npm:4.3.0" + checksum: 10/fbc554934d1a27a1910e842bc87b177b1a556609dd803747c85ece420692380827c6ae94a95cce4407c054fa0964be3bf8226f7f2cb2e9eeee432c7c1985684e languageName: node linkType: hard -"source-map-support@npm:0.5.12": - version: 0.5.12 - resolution: "source-map-support@npm:0.5.12" +"md5.js@npm:^1.3.4": + version: 1.3.5 + resolution: "md5.js@npm:1.3.5" dependencies: - buffer-from: "npm:^1.0.0" - source-map: "npm:^0.6.0" - checksum: 10/308d9302693330422481d8fef7303438994a4be7390310c57527d9c32ee0130673e326bfe38c501dcfa0d9e8cacf814eafa707d7f2e9d9e772de31455700e40b + hash-base: "npm:^3.0.0" + inherits: "npm:^2.0.1" + safe-buffer: "npm:^5.1.2" + checksum: 10/098494d885684bcc4f92294b18ba61b7bd353c23147fbc4688c75b45cb8590f5a95fd4584d742415dcc52487f7a1ef6ea611cfa1543b0dc4492fe026357f3f0c languageName: node linkType: hard -"source-map-support@npm:0.5.13": - version: 0.5.13 - resolution: "source-map-support@npm:0.5.13" - dependencies: - buffer-from: "npm:^1.0.0" - source-map: "npm:^0.6.0" - checksum: 10/d1514a922ac9c7e4786037eeff6c3322f461cd25da34bb9fefb15387b3490531774e6e31d95ab6d5b84a3e139af9c3a570ccaee6b47bd7ea262691ed3a8bc34e +"memorystream@npm:^0.3.1": + version: 0.3.1 + resolution: "memorystream@npm:0.3.1" + checksum: 10/2e34a1e35e6eb2e342f788f75f96c16f115b81ff6dd39e6c2f48c78b464dbf5b1a4c6ebfae4c573bd0f8dbe8c57d72bb357c60523be184655260d25855c03902 languageName: node linkType: hard -"source-map-support@npm:0.5.21, source-map-support@npm:^0.5.13, source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.17, source-map-support@npm:^0.5.5, source-map-support@npm:^0.5.6, source-map-support@npm:~0.5.20": - version: 0.5.21 - resolution: "source-map-support@npm:0.5.21" +"meow@npm:^10.0.0, meow@npm:^10.1.2": + version: 10.1.2 + resolution: "meow@npm:10.1.2" dependencies: - buffer-from: "npm:^1.0.0" - source-map: "npm:^0.6.0" - checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 + "@types/minimist": "npm:^1.2.2" + camelcase-keys: "npm:^7.0.0" + decamelize: "npm:^5.0.0" + decamelize-keys: "npm:^1.1.0" + hard-rejection: "npm:^2.1.0" + minimist-options: "npm:4.1.0" + normalize-package-data: "npm:^3.0.2" + read-pkg-up: "npm:^8.0.0" + redent: "npm:^4.0.0" + trim-newlines: "npm:^4.0.2" + type-fest: "npm:^1.2.2" + yargs-parser: "npm:^20.2.9" + checksum: 10/b7cf32ac7d858e9d5e55ba70768f0d13c71be6d6167c1000ce795e4963be5fdddd6bbc6958bb1b392149140dd6c07409cd8a394d297cdbfcc45d428f2c102292 languageName: node linkType: hard -"source-map-url@npm:^0.4.0": - version: 0.4.1 - resolution: "source-map-url@npm:0.4.1" - checksum: 10/7fec0460ca017330568e1a4d67c80c397871f27d75b034e1117eaa802076db5cda5944659144d26eafd2a95008ada19296c8e0d5ec116302c32c6daa4e430003 +"meow@npm:^10.1.3": + version: 10.1.5 + resolution: "meow@npm:10.1.5" + dependencies: + "@types/minimist": "npm:^1.2.2" + camelcase-keys: "npm:^7.0.0" + decamelize: "npm:^5.0.0" + decamelize-keys: "npm:^1.1.0" + hard-rejection: "npm:^2.1.0" + minimist-options: "npm:4.1.0" + normalize-package-data: "npm:^3.0.2" + read-pkg-up: "npm:^8.0.0" + redent: "npm:^4.0.0" + trim-newlines: "npm:^4.0.2" + type-fest: "npm:^1.2.2" + yargs-parser: "npm:^20.2.9" + checksum: 10/4d6d4c233b9405bace4fd6c60db0b5806d7186a047852ddce0748e56a57c75d4fef3ab2603a480bd74595e4e8e3a47b932d737397a62e043da1d3187f1240ff4 languageName: node linkType: hard -"source-map@npm:0.5.6": - version: 0.5.6 - resolution: "source-map@npm:0.5.6" - checksum: 10/c62fe98e106c762307eea3a982242c1a76a31bc762da10fe2dda12252d423c163e0cd45d313330c8bd040cc5121702511138252308f72b8a9273825e81e4db30 +"meow@npm:^12.0.1": + version: 12.1.1 + resolution: "meow@npm:12.1.1" + checksum: 10/8594c319f4671a562c1fef584422902f1bbbad09ea49cdf9bb26dc92f730fa33398dd28a8cf34fcf14167f1d1148d05a867e50911fc4286751a4fb662fdd2dc2 languageName: node linkType: hard -"source-map@npm:0.6.1, source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0, source-map@npm:~0.6.1": - version: 0.6.1 - resolution: "source-map@npm:0.6.1" - checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff +"meow@npm:^8.0.0, meow@npm:^8.1.2": + version: 8.1.2 + resolution: "meow@npm:8.1.2" + dependencies: + "@types/minimist": "npm:^1.2.0" + camelcase-keys: "npm:^6.2.2" + decamelize-keys: "npm:^1.1.0" + hard-rejection: "npm:^2.1.0" + minimist-options: "npm:4.1.0" + normalize-package-data: "npm:^3.0.0" + read-pkg-up: "npm:^7.0.1" + redent: "npm:^3.0.0" + trim-newlines: "npm:^3.0.0" + type-fest: "npm:^0.18.0" + yargs-parser: "npm:^20.2.3" + checksum: 10/d4770f90135c0ef4d0f4fa4f4310a18c07bbbe408221fa79a68fda93944134001ffc24ed605e7668f61e920dd8db30936548e927d2331b0e30699d56247f9873 languageName: node linkType: hard -"source-map@npm:0.7.4, source-map@npm:^0.7.3": - version: 0.7.4 - resolution: "source-map@npm:0.7.4" - checksum: 10/a0f7c9b797eda93139842fd28648e868a9a03ea0ad0d9fa6602a0c1f17b7fb6a7dcca00c144476cccaeaae5042e99a285723b1a201e844ad67221bf5d428f1dc +"merge-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "merge-stream@npm:2.0.0" + checksum: 10/6fa4dcc8d86629705cea944a4b88ef4cb0e07656ebf223fa287443256414283dd25d91c1cd84c77987f2aec5927af1a9db6085757cb43d90eb170ebf4b47f4f4 languageName: node linkType: hard -"source-map@npm:^0.5.0, source-map@npm:^0.5.3, source-map@npm:^0.5.6, source-map@npm:^0.5.7": - version: 0.5.7 - resolution: "source-map@npm:0.5.7" - checksum: 10/9b4ac749ec5b5831cad1f8cc4c19c4298ebc7474b24a0acf293e2f040f03f8eeccb3d01f12aa0f90cf46d555c887e03912b83a042c627f419bda5152d89c5269 +"merge2@npm:^1.2.3, merge2@npm:^1.3.0, merge2@npm:^1.4.1": + version: 1.4.1 + resolution: "merge2@npm:1.4.1" + checksum: 10/7268db63ed5169466540b6fb947aec313200bcf6d40c5ab722c22e242f651994619bcd85601602972d3c85bd2cc45a358a4c61937e9f11a061919a1da569b0c2 languageName: node linkType: hard -"source-map@npm:^0.8.0-beta.0": - version: 0.8.0-beta.0 - resolution: "source-map@npm:0.8.0-beta.0" +"micromatch@npm:^4.0.0, micromatch@npm:^4.0.4": + version: 4.0.4 + resolution: "micromatch@npm:4.0.4" dependencies: - whatwg-url: "npm:^7.0.0" - checksum: 10/c02e22ab9f8b8e38655ba1e9abae9fe1f8ba216cbbea922718d5e2ea45821606a74f10edec1db9055e7f7cfd1e6a62e5eade67ec30c017a02f4c8e990accbc1c - languageName: node - linkType: hard - -"sourcemap-codec@npm:^1.4.8": - version: 1.4.8 - resolution: "sourcemap-codec@npm:1.4.8" - checksum: 10/6fc57a151e982b5c9468362690c6d062f3a0d4d8520beb68a82f319c79e7a4d7027eeb1e396de0ecc2cd19491e1d602b2d06fd444feac9b63dd43fea4c55a857 + braces: "npm:^3.0.1" + picomatch: "npm:^2.2.3" + checksum: 10/c499da5aad38f3ba1a32a73a81f3dd9b631e12492133c503c14ce59aa5c631159c08f2c43d3a7e0ea3955c7921d41b7b97e662360fe3b28b2cfb0923949c176d languageName: node linkType: hard -"spark-md5@npm:3.0.2": - version: 3.0.2 - resolution: "spark-md5@npm:3.0.2" - checksum: 10/60981e181a296b2d16064ef86607f78d7eb1e08a5f39366239bb9cdd6bc3838fb2f667f2506e81c8d5c71965cdd6f18a17fb1c9a8368eeb407b9dd8188e95473 +"micromatch@npm:^4.0.7": + version: 4.0.7 + resolution: "micromatch@npm:4.0.7" + dependencies: + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10/a11ed1cb67dcbbe9a5fc02c4062cf8bb0157d73bf86956003af8dcfdf9b287f9e15ec0f6d6925ff6b8b5b496202335e497b01de4d95ef6cf06411bc5e5c474a0 languageName: node linkType: hard -"spawn-command@npm:^0.0.2-1": - version: 0.0.2-1 - resolution: "spawn-command@npm:0.0.2-1" - checksum: 10/f59fd2f16c8ffe46afda588134697ba4f1e2032b216baf7c134a66a0b3d48df323ee46c367f273eb7f7bb8c68b8296ca6b49aac6530cedb4b6785302d238c411 +"miller-rabin@npm:^4.0.0": + version: 4.0.1 + resolution: "miller-rabin@npm:4.0.1" + dependencies: + bn.js: "npm:^4.0.0" + brorand: "npm:^1.0.1" + bin: + miller-rabin: bin/miller-rabin + checksum: 10/2a38ba9d1e878d94ee8a8ab3505b40e8d44fb9700a7716570fe4c8ca7e20d49b69aea579106580618c877cc6ff969eff71705042fafb47573736bf89404417bc languageName: node linkType: hard -"spawn-wrap@npm:^1.4.2": - version: 1.4.3 - resolution: "spawn-wrap@npm:1.4.3" - dependencies: - foreground-child: "npm:^1.5.6" - mkdirp: "npm:^0.5.0" - os-homedir: "npm:^1.0.1" - rimraf: "npm:^2.6.2" - signal-exit: "npm:^3.0.2" - which: "npm:^1.3.0" - checksum: 10/69baaec8a8aed06471643579441e2627354aefba8487d6e44084b3262969151c529be1f9afedb50f64d9be066b55b8762262e317a419e403bf810fd77561a520 +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 10/54bb60bf39e6f8689f6622784e668a3d7f8bed6b0d886f5c3c446cb3284be28b30bf707ed05d0fe44a036f8469976b2629bbea182684977b084de9da274694d7 languageName: node linkType: hard -"spawn-wrap@npm:^2.0.0": - version: 2.0.0 - resolution: "spawn-wrap@npm:2.0.0" +"mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:~2.1.34": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" dependencies: - foreground-child: "npm:^2.0.0" - is-windows: "npm:^1.0.2" - make-dir: "npm:^3.0.0" - rimraf: "npm:^3.0.0" - signal-exit: "npm:^3.0.2" - which: "npm:^2.0.1" - checksum: 10/ce6ca08d66c3a41a28a7ecc10bf4945d7930fd3ae961d40804ee109cee6ee9f8436125f53bc07918ca1eb461fe2ff0033af1dc3cb803469b585639675fc2d2e7 + mime-db: "npm:1.52.0" + checksum: 10/89aa9651b67644035de2784a6e665fc685d79aba61857e02b9c8758da874a754aed4a9aced9265f5ed1171fd934331e5516b84a7f0218031b6fa0270eca1e51a languageName: node linkType: hard -"spdx-correct@npm:^3.0.0": - version: 3.1.1 - resolution: "spdx-correct@npm:3.1.1" - dependencies: - spdx-expression-parse: "npm:^3.0.0" - spdx-license-ids: "npm:^3.0.0" - checksum: 10/688e028c3ca6090d1b516272a2dd60b30f163cbf166295ac4b8078fd74f524365cd996e2b18cabdaa41647aa806e117604aa3b3216f69076a554999913d09d47 +"mimic-fn@npm:^1.0.0": + version: 1.2.0 + resolution: "mimic-fn@npm:1.2.0" + checksum: 10/69c08205156a1f4906d9c46f9b4dc08d18a50176352e77fdeb645cedfe9f20c0b19865d465bd2dec27a5c432347f24dc07fc3695e11159d193f892834233e939 languageName: node linkType: hard -"spdx-exceptions@npm:^2.1.0": - version: 2.3.0 - resolution: "spdx-exceptions@npm:2.3.0" - checksum: 10/cb69a26fa3b46305637123cd37c85f75610e8c477b6476fa7354eb67c08128d159f1d36715f19be6f9daf4b680337deb8c65acdcae7f2608ba51931540687ac0 +"mimic-fn@npm:^2.1.0": + version: 2.1.0 + resolution: "mimic-fn@npm:2.1.0" + checksum: 10/d2421a3444848ce7f84bd49115ddacff29c15745db73f54041edc906c14b131a38d05298dae3081667627a59b2eb1ca4b436ff2e1b80f69679522410418b478a languageName: node linkType: hard -"spdx-expression-parse@npm:^3.0.0": - version: 3.0.1 - resolution: "spdx-expression-parse@npm:3.0.1" - dependencies: - spdx-exceptions: "npm:^2.1.0" - spdx-license-ids: "npm:^3.0.0" - checksum: 10/a1c6e104a2cbada7a593eaa9f430bd5e148ef5290d4c0409899855ce8b1c39652bcc88a725259491a82601159d6dc790bedefc9016c7472f7de8de7361f8ccde +"mimic-fn@npm:^4.0.0": + version: 4.0.0 + resolution: "mimic-fn@npm:4.0.0" + checksum: 10/995dcece15ee29aa16e188de6633d43a3db4611bcf93620e7e62109ec41c79c0f34277165b8ce5e361205049766e371851264c21ac64ca35499acb5421c2ba56 languageName: node linkType: hard -"spdx-license-ids@npm:^3.0.0": - version: 3.0.11 - resolution: "spdx-license-ids@npm:3.0.11" - checksum: 10/aed256585883aef483590e15d8352b6b787f01cc7e3e120e10457383d574b2cd314d8325854f5f831733ee2e257a6010a57adc93fc166648cc3bc9ab7cd1ea6b +"mimic-response@npm:^1.0.0, mimic-response@npm:^1.0.1": + version: 1.0.1 + resolution: "mimic-response@npm:1.0.1" + checksum: 10/034c78753b0e622bc03c983663b1cdf66d03861050e0c8606563d149bc2b02d63f62ce4d32be4ab50d0553ae0ffe647fc34d1f5281184c6e1e8cf4d85e8d9823 languageName: node linkType: hard -"spdy-transport@npm:^3.0.0": - version: 3.0.0 - resolution: "spdy-transport@npm:3.0.0" - dependencies: - debug: "npm:^4.1.0" - detect-node: "npm:^2.0.4" - hpack.js: "npm:^2.1.6" - obuf: "npm:^1.1.2" - readable-stream: "npm:^3.0.6" - wbuf: "npm:^1.7.3" - checksum: 10/b93b606b209ca785456bd850b8925f21a76522ee5b46701235ecff3eba17686560c27575f91863842dc843a39772f6d2f5a8755df9eaff0924d20598df18828d +"mimic-response@npm:^3.1.0": + version: 3.1.0 + resolution: "mimic-response@npm:3.1.0" + checksum: 10/7e719047612411fe071332a7498cf0448bbe43c485c0d780046c76633a771b223ff49bd00267be122cedebb897037fdb527df72335d0d0f74724604ca70b37ad languageName: node linkType: hard -"spdy@npm:^4.0.2": - version: 4.0.2 - resolution: "spdy@npm:4.0.2" - dependencies: - debug: "npm:^4.1.0" - handle-thing: "npm:^2.0.0" - http-deceiver: "npm:^1.2.7" - select-hose: "npm:^2.0.0" - spdy-transport: "npm:^3.0.0" - checksum: 10/d29b89e48e7d762e505a2f83b1bc2c92268bd518f1b411864ab42a9e032e387d10467bbce0d8dbf8647bf4914a063aa1d303dff85e248f7a57f81a7b18ac34ef +"mimic-response@npm:^4.0.0": + version: 4.0.0 + resolution: "mimic-response@npm:4.0.0" + checksum: 10/33b804cc961efe206efdb1fca6a22540decdcfce6c14eb5c0c50e5ae9022267ab22ce8f5568b1f7247ba67500fe20d523d81e0e9f009b321ccd9d472e78d1850 languageName: node linkType: hard -"split-ca@npm:^1.0.1": +"min-indent@npm:^1.0.0, min-indent@npm:^1.0.1": version: 1.0.1 - resolution: "split-ca@npm:1.0.1" - checksum: 10/1e7409938a95ee843fe2593156a5735e6ee63772748ee448ea8477a5a3e3abde193c3325b3696e56a5aff07c7dcf6b1f6a2f2a036895b4f3afe96abb366d893f + resolution: "min-indent@npm:1.0.1" + checksum: 10/bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 languageName: node linkType: hard -"split-on-first@npm:^1.0.0": - version: 1.1.0 - resolution: "split-on-first@npm:1.1.0" - checksum: 10/16ff85b54ddcf17f9147210a4022529b343edbcbea4ce977c8f30e38408b8d6e0f25f92cd35b86a524d4797f455e29ab89eb8db787f3c10708e0b47ebf528d30 +"minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": + version: 1.0.1 + resolution: "minimalistic-assert@npm:1.0.1" + checksum: 10/cc7974a9268fbf130fb055aff76700d7e2d8be5f761fb5c60318d0ed010d839ab3661a533ad29a5d37653133385204c503bfac995aaa4236f4e847461ea32ba7 languageName: node linkType: hard -"split-string@npm:^3.0.1": - version: 3.1.0 - resolution: "split-string@npm:3.1.0" - dependencies: - extend-shallow: "npm:^3.0.0" - checksum: 10/f31f4709d2b14fe4ff46b4fb88b2fb68a1c59b59e573c5417907c182397ddb2cb67903232bdc3a8b9dd3bb660c6f533ff11b5d624aff7b1fe0a213e3e4c75f20 +"minimalistic-crypto-utils@npm:^1.0.1": + version: 1.0.1 + resolution: "minimalistic-crypto-utils@npm:1.0.1" + checksum: 10/6e8a0422b30039406efd4c440829ea8f988845db02a3299f372fceba56ffa94994a9c0f2fd70c17f9969eedfbd72f34b5070ead9656a34d3f71c0bd72583a0ed languageName: node linkType: hard -"split-text-to-chunks@npm:^1.0.0": - version: 1.0.0 - resolution: "split-text-to-chunks@npm:1.0.0" +"minimatch@npm:3.0.5": + version: 3.0.5 + resolution: "minimatch@npm:3.0.5" dependencies: - get-stdin: "npm:^5.0.1" - minimist: "npm:^1.2.0" - bin: - wordwrap: cli.js - checksum: 10/944a2defff4eccf193216177b284bd8d3da0d83391827d89efa4250d4c0a0729e63fecfc0cf56fa2c50acba2b8017753b332b13d0aebdb9fb5c1c2164a943ce5 + brace-expansion: "npm:^1.1.7" + checksum: 10/8f9707491183a07a9542b8cf45aacb3745ba9fe6c611173fb225d7bf191e55416779aee31e17673a516a178af02d8d3d71ddd36ae3d5cc2495f627977ad1a012 languageName: node linkType: hard -"split2@npm:^3.0.0, split2@npm:^3.2.2": - version: 3.2.2 - resolution: "split2@npm:3.2.2" +"minimatch@npm:9.0.3": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" dependencies: - readable-stream: "npm:^3.0.0" - checksum: 10/a426e1e6718e2f7e50f102d5ec3525063d885e3d9cec021a81175fd3497fdb8b867a89c99e70bef4daeef4f2f5e544f7b92df8c1a30b4254e10a9cfdcc3dae87 + brace-expansion: "npm:^2.0.1" + checksum: 10/c81b47d28153e77521877649f4bab48348d10938df9e8147a58111fe00ef89559a2938de9f6632910c4f7bf7bb5cd81191a546167e58d357f0cfb1e18cecc1c5 languageName: node linkType: hard -"split2@npm:^4.0.0": - version: 4.2.0 - resolution: "split2@npm:4.2.0" - checksum: 10/09bbefc11bcf03f044584c9764cd31a252d8e52cea29130950b26161287c11f519807c5e54bd9e5804c713b79c02cefe6a98f4688630993386be353e03f534ab +"minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634 languageName: node linkType: hard -"split2@npm:^4.1.0": - version: 4.1.0 - resolution: "split2@npm:4.1.0" - checksum: 10/9d2dea7f2b2b788e2921b16ca4dd4e4ecaf334e401ce28c6cbf6efd66f22400e8df68b297a9d5b8ea6d1cba4d31647c45cdc5e4b4c6c3c7b01095dd35ab50dc9 +"minimatch@npm:^5.0.1": + version: 5.1.6 + resolution: "minimatch@npm:5.1.6" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/126b36485b821daf96d33b5c821dac600cc1ab36c87e7a532594f9b1652b1fa89a1eebcaad4dff17c764dce1a7ac1531327f190fed5f97d8f6e5f889c116c429 languageName: node linkType: hard -"sprintf-js@npm:~1.0.2": - version: 1.0.3 - resolution: "sprintf-js@npm:1.0.3" - checksum: 10/c34828732ab8509c2741e5fd1af6b767c3daf2c642f267788f933a65b1614943c282e74c4284f4fa749c264b18ee016a0d37a3e5b73aee446da46277d3a85daa +"minimatch@npm:^7.4.2, minimatch@npm:^7.4.6": + version: 7.4.6 + resolution: "minimatch@npm:7.4.6" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/0046ba1161ac6414bde1b07c440792ebcdb2ed93e6714c85c73974332b709b7e692801550bc9da22028a8613407b3f13861e17dd0dd44f4babdeacd44950430b languageName: node linkType: hard -"sqlite3@npm:5.1.5": - version: 5.1.5 - resolution: "sqlite3@npm:5.1.5" +"minimatch@npm:^8.0.2": + version: 8.0.4 + resolution: "minimatch@npm:8.0.4" dependencies: - "@mapbox/node-pre-gyp": "npm:^1.0.0" - node-addon-api: "npm:^4.2.0" - node-gyp: "npm:8.x" - tar: "npm:^6.1.11" - peerDependencies: - node-gyp: 8.x - dependenciesMeta: - node-gyp: - optional: true - peerDependenciesMeta: - node-gyp: - optional: true - checksum: 10/018e6432131aeb9b4a8218dd1b99cfe703372311fb8bee9f25dcf03f596487bfdb0afb9fc21e050d95ec094f49090871d60e97346a547e43074471e76475bf59 + brace-expansion: "npm:^2.0.1" + checksum: 10/aef05598ee565e1013bc8a10f53410ac681561f901c1a084b8ecfd016c9ed919f58f4bbd5b63e05643189dfb26e8106a84f0e1ff12e4a263aa37e1cae7ce9828 languageName: node linkType: hard -"ssh2@npm:^1.11.0": - version: 1.14.0 - resolution: "ssh2@npm:1.14.0" +"minimatch@npm:^9.0.0, minimatch@npm:^9.0.1, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" dependencies: - asn1: "npm:^0.2.6" - bcrypt-pbkdf: "npm:^1.0.2" - cpu-features: "npm:~0.0.8" - nan: "npm:^2.17.0" - dependenciesMeta: - cpu-features: - optional: true - nan: - optional: true - checksum: 10/95f1114f26a6b5bfb94c14de1513e37207bcffb096e8b315faa2b31539e7c8f98071e6fc0e3fd709d685b55ebc74b0206edc6ae5a4df833991641f02fdc863e2 + brace-expansion: "npm:^2.0.1" + checksum: 10/dd6a8927b063aca6d910b119e1f2df6d2ce7d36eab91de83167dd136bb85e1ebff97b0d3de1cb08bd1f7e018ca170b4962479fefab5b2a69e2ae12cb2edc8348 languageName: node linkType: hard -"ssh2@npm:^1.4.0": - version: 1.6.0 - resolution: "ssh2@npm:1.6.0" +"minimist-options@npm:4.1.0": + version: 4.1.0 + resolution: "minimist-options@npm:4.1.0" dependencies: - asn1: "npm:^0.2.4" - bcrypt-pbkdf: "npm:^1.0.2" - cpu-features: "npm:0.0.2" - nan: "npm:^2.15.0" - dependenciesMeta: - cpu-features: - optional: true - nan: - optional: true - checksum: 10/954acc2e9315774127610c029f9967d07157ab8ba26902b5c9964b3957d2e3d6cfc7a12817c5463056010721408884738314b71470b70f213580d2a0877f595f + arrify: "npm:^1.0.1" + is-plain-obj: "npm:^1.1.0" + kind-of: "npm:^6.0.3" + checksum: 10/8c040b3068811e79de1140ca2b708d3e203c8003eb9a414c1ab3cd467fc5f17c9ca02a5aef23bedc51a7f8bfbe77f87e9a7e31ec81fba304cda675b019496f4e languageName: node linkType: hard -"sshpk@npm:1.17.0, sshpk@npm:^1.7.0": - version: 1.17.0 - resolution: "sshpk@npm:1.17.0" - dependencies: - asn1: "npm:~0.2.3" - assert-plus: "npm:^1.0.0" - bcrypt-pbkdf: "npm:^1.0.0" - dashdash: "npm:^1.12.0" - ecc-jsbn: "npm:~0.1.1" - getpass: "npm:^0.1.1" - jsbn: "npm:~0.1.0" - safer-buffer: "npm:^2.0.2" - tweetnacl: "npm:~0.14.0" - bin: - sshpk-conv: bin/sshpk-conv - sshpk-sign: bin/sshpk-sign - sshpk-verify: bin/sshpk-verify - checksum: 10/668c2a279a6ce66fd739ce5684e37927dd75427cc020c828a208f85890a4c400705d4ba09f32fa44efca894339dc6931941664f6f6ba36dfa543de6d006cbe9c +"minimist@npm:>=1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f languageName: node linkType: hard -"ssri@npm:^10.0.0": - version: 10.0.2 - resolution: "ssri@npm:10.0.2" +"minipass-collect@npm:^1.0.2": + version: 1.0.2 + resolution: "minipass-collect@npm:1.0.2" dependencies: - minipass: "npm:^4.0.0" - checksum: 10/1e6cc97576946bd1ea8f65339b77fa4374a3f8f87b3555d06da1d2140929558bf16c4018b504aeb1419325a9c87c1f4319ea64bea71cdc7a11f24863aa84f8d6 + minipass: "npm:^3.0.0" + checksum: 10/14df761028f3e47293aee72888f2657695ec66bd7d09cae7ad558da30415fdc4752bbfee66287dcc6fd5e6a2fa3466d6c484dc1cbd986525d9393b9523d97f10 languageName: node linkType: hard -"ssri@npm:^10.0.6": - version: 10.0.6 - resolution: "ssri@npm:10.0.6" +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" dependencies: minipass: "npm:^7.0.3" - checksum: 10/f92c1b3cc9bfd0a925417412d07d999935917bc87049f43ebec41074661d64cf720315661844106a77da9f8204b6d55ae29f9514e673083cae39464343af2a8b + checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 languageName: node linkType: hard -"ssri@npm:^8.0.0, ssri@npm:^8.0.1": - version: 8.0.1 - resolution: "ssri@npm:8.0.1" +"minipass-fetch@npm:^3.0.0": + version: 3.0.1 + resolution: "minipass-fetch@npm:3.0.1" dependencies: - minipass: "npm:^3.1.1" - checksum: 10/fde247b7107674d9a424a20f9c1a6e3ad88a139c2636b9d9ffa7df59e85e11a894cdae48fadd0ad6be41eb0d5b847fe094736513d333615c7eebc3d111abe0d2 + encoding: "npm:^0.1.13" + minipass: "npm:^4.0.0" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^2.1.2" + dependenciesMeta: + encoding: + optional: true + checksum: 10/8af4555abeea05832c76469b7340c4895f60d955173db89df3374f45c97322c7f56093a94d3d5d0c66c97cb52983bb465a5801a551d17d13c0dff46746996172 languageName: node linkType: hard -"ssri@npm:^9.0.0": - version: 9.0.0 - resolution: "ssri@npm:9.0.0" +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" dependencies: - minipass: "npm:^3.1.1" - checksum: 10/9c72209233884792189e861cc2d83674a0358ce87b6b96d0329c588938c3c4bdb1e7cd8289516e36cdfdc2a21d5a93556ce993d712b5ca6cca397a8c3ae5151d - languageName: node - linkType: hard - -"stable@npm:^0.1.8": - version: 0.1.8 - resolution: "stable@npm:0.1.8" - checksum: 10/2ff482bb100285d16dd75cd8f7c60ab652570e8952c0bfa91828a2b5f646a0ff533f14596ea4eabd48bb7f4aeea408dce8f8515812b975d958a4cc4fa6b9dfeb + minipass: "npm:^3.0.0" + checksum: 10/56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf languageName: node linkType: hard -"stack-chain@npm:^2.0.0": - version: 2.0.0 - resolution: "stack-chain@npm:2.0.0" - checksum: 10/1ab6aafa6c0d4194d4cf15eac9e4121492da79596268eed6d9101e91e2cea1c5998638faf74968b7aed1ff5f76b35e7390cdd56c156cca4a8f02244716786ae8 +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b languageName: node linkType: hard -"stack-generator@npm:^2.0.5": - version: 2.0.10 - resolution: "stack-generator@npm:2.0.10" +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" dependencies: - stackframe: "npm:^1.3.4" - checksum: 10/4fc3978a934424218a0aa9f398034e1f78153d5ff4f4ff9c62478c672debb47dd58de05b09fc3900530cbb526d72c93a6e6c9353bacc698e3b1c00ca3dda0c47 + minipass: "npm:^3.0.0" + checksum: 10/40982d8d836a52b0f37049a0a7e5d0f089637298e6d9b45df9c115d4f0520682a78258905e5c8b180fb41b593b0a82cc1361d2c74b45f7ada66334f84d1ecfdd languageName: node linkType: hard -"stack-trace@npm:0.0.x": - version: 0.0.10 - resolution: "stack-trace@npm:0.0.10" - checksum: 10/7bd633f0e9ac46e81a0b0fe6538482c1d77031959cf94478228731709db4672fbbed59176f5b9a9fd89fec656b5dae03d084ef2d1b0c4c2f5683e05f2dbb1405 +"minipass@npm:^3.0.0, minipass@npm:^3.1.5, minipass@npm:^3.1.6": + version: 3.1.6 + resolution: "minipass@npm:3.1.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10/464654ae469c4f25b2f3d6e7bd6e65615b90b68cdfd0148e69ce039b199a778b689f2a552bfa4d3a81812d914d0b48a3a49715b50dcc1eba96bba3bed21f428a languageName: node linkType: hard -"stack-utils@npm:^2.0.2": - version: 2.0.6 - resolution: "stack-utils@npm:2.0.6" +"minipass@npm:^3.3.4": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" dependencies: - escape-string-regexp: "npm:^2.0.0" - checksum: 10/cdc988acbc99075b4b036ac6014e5f1e9afa7e564482b687da6384eee6a1909d7eaffde85b0a17ffbe186c5247faf6c2b7544e802109f63b72c7be69b13151bb + yallist: "npm:^4.0.0" + checksum: 10/a5c6ef069f70d9a524d3428af39f2b117ff8cd84172e19b754e7264a33df460873e6eb3d6e55758531580970de50ae950c496256bb4ad3691a2974cddff189f0 languageName: node linkType: hard -"stack-utils@npm:^2.0.3, stack-utils@npm:^2.0.4": - version: 2.0.5 - resolution: "stack-utils@npm:2.0.5" - dependencies: - escape-string-regexp: "npm:^2.0.0" - checksum: 10/a6d64e5dd24d321289ebefdff2e210ece75fdf20dbcdb702b86da1f7b730743fae3e9337adae4a5cc00d4970d748ff758387df3ea7c71c45b466c43c7359bc00 +"minipass@npm:^4.0.0, minipass@npm:^4.0.2, minipass@npm:^4.2.4": + version: 4.2.5 + resolution: "minipass@npm:4.2.5" + checksum: 10/0b0bf5910acc856f8fedbf5ac2567cc80dfdea99916f949c336c2ad52340a73b0bf48773a8a90b8ae2c79a415d9444f6e3a99915847577b1a5277f1235098056 languageName: node linkType: hard -"stackframe@npm:^1.3.4": - version: 1.3.4 - resolution: "stackframe@npm:1.3.4" - checksum: 10/29ca71c1fd17974c1c178df0236b1407bc65f6ea389cc43dec000def6e42ff548d4453de9a85b76469e2ae2b2abdd802c6b6f3db947c05794efbd740d1cf4121 +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 10/61682162d29f45d3152b78b08bab7fb32ca10899bc5991ffe98afc18c9e9543bd1e3be94f8b8373ba6262497db63607079dc242ea62e43e7b2270837b7347c93 languageName: node linkType: hard -"stacktrace-gps@npm:^3.0.4": - version: 3.1.2 - resolution: "stacktrace-gps@npm:3.1.2" - dependencies: - source-map: "npm:0.5.6" - stackframe: "npm:^1.3.4" - checksum: 10/21cb60ce0990f7a661e964cf4bdef1e70dda2286fb628fbd0fd1e69e8925138433d08ed84969de2d396b3b91515e15336a502f777c26587db89f3933d6f63f9b +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": + version: 7.0.3 + resolution: "minipass@npm:7.0.3" + checksum: 10/04d72c8a437de54a024f3758ff17c0226efb532ef37dbdaca1ea6039c7b9b1704e612abbd2e3a0d2c825c64eb0a9ab266c843baa71d18ad1a279baecee28ed97 languageName: node linkType: hard -"stacktrace-js@npm:^2.0.0": - version: 2.0.2 - resolution: "stacktrace-js@npm:2.0.2" - dependencies: - error-stack-parser: "npm:^2.0.6" - stack-generator: "npm:^2.0.5" - stacktrace-gps: "npm:^3.0.4" - checksum: 10/e5f60a09852687e4a9206927fe1078e24d63e00a71a2dcddd67940e9504a54931a3454439d5b4e3e0e62aeb979be810573e8d3332fbef0dbfa335a8781b4b57c +"minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 languageName: node linkType: hard -"stacktrace-parser@npm:^0.1.10": - version: 0.1.10 - resolution: "stacktrace-parser@npm:0.1.10" +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" dependencies: - type-fest: "npm:^0.7.1" - checksum: 10/f4fbddfc09121d91e587b60de4beb4941108e967d71ad3a171812dc839b010ca374d064ad0a296295fed13acd103609d99a4224a25b4e67de13cae131f1901ee + minipass: "npm:^3.0.0" + yallist: "npm:^4.0.0" + checksum: 10/ae0f45436fb51344dcb87938446a32fbebb540d0e191d63b35e1c773d47512e17307bf54aa88326cc6d176594d00e4423563a091f7266c2f9a6872cdc1e234d1 languageName: node linkType: hard -"standard-engine@npm:~7.0.0": - version: 7.0.0 - resolution: "standard-engine@npm:7.0.0" - dependencies: - deglob: "npm:^2.1.0" - get-stdin: "npm:^5.0.1" - minimist: "npm:^1.1.0" - pkg-conf: "npm:^2.0.0" - checksum: 10/71c40c189e22595b7e3674763ac3a032ac5ab19ad612fc8f66981284635965b1f0961f2e44440c16fe2b2064f2fc2a5a6f18637c2e135d67582d3e921fc9d7cf +"mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 10/d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2 languageName: node linkType: hard -"standard@npm:^10.0.3": - version: 10.0.3 - resolution: "standard@npm:10.0.3" +"module-definition@npm:^5.0.1": + version: 5.0.1 + resolution: "module-definition@npm:5.0.1" dependencies: - eslint: "npm:~3.19.0" - eslint-config-standard: "npm:10.2.1" - eslint-config-standard-jsx: "npm:4.0.2" - eslint-plugin-import: "npm:~2.2.0" - eslint-plugin-node: "npm:~4.2.2" - eslint-plugin-promise: "npm:~3.5.0" - eslint-plugin-react: "npm:~6.10.0" - eslint-plugin-standard: "npm:~3.0.1" - standard-engine: "npm:~7.0.0" + ast-module-types: "npm:^5.0.0" + node-source-walk: "npm:^6.0.1" bin: - standard: ./bin/cmd.js - checksum: 10/09bf6e229f01be7fd5f2f01f7800ded0878c57739db8659d6e19a902621b0b8d34fec21eee26fe874eaf8ddba624af53e09015eb443ec47a1eb3305e3b5223c5 + module-definition: bin/cli.js + checksum: 10/d769181d119af6a80abb14219c6ca60b49689eec6e2dd7f8760a499a2c64646ec619a2e7f71760f777f86af763f61efc431e22693b03500ca3db9d7c73cfcb4c languageName: node linkType: hard -"static-extend@npm:^0.1.1": - version: 0.1.2 - resolution: "static-extend@npm:0.1.2" +"module-lookup-amd@npm:^8.0.5": + version: 8.0.5 + resolution: "module-lookup-amd@npm:8.0.5" dependencies: - define-property: "npm:^0.2.5" - object-copy: "npm:^0.1.0" - checksum: 10/8657485b831f79e388a437260baf22784540417a9b29e11572c87735df24c22b84eda42107403a64b30861b2faf13df9f7fc5525d51f9d1d2303aba5cbf4e12c + commander: "npm:^10.0.1" + glob: "npm:^7.2.3" + requirejs: "npm:^2.3.6" + requirejs-config-file: "npm:^4.0.0" + bin: + lookup-amd: bin/cli.js + checksum: 10/2808a5dfff52365dd5f7c9a50c3c5985414dcd13d5b966dad82f61f3274b0bbc246aadcefb0dd0421eb2a43709be0a8d937f0d1a19008e722e81cc361bb10dca languageName: node linkType: hard -"statuses@npm:2.0.1": - version: 2.0.1 - resolution: "statuses@npm:2.0.1" - checksum: 10/18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 10/673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f languageName: node linkType: hard -"statuses@npm:>= 1.4.0 < 2": - version: 1.5.0 - resolution: "statuses@npm:1.5.0" - checksum: 10/c469b9519de16a4bb19600205cffb39ee471a5f17b82589757ca7bd40a8d92ebb6ed9f98b5a540c5d302ccbc78f15dc03cc0280dd6e00df1335568a5d5758a5c +"ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.2, ms@npm:^2.1.3": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d languageName: node linkType: hard -"std-env@npm:^2.2.1": - version: 2.3.1 - resolution: "std-env@npm:2.3.1" +"multimatch@npm:^5.0.0": + version: 5.0.0 + resolution: "multimatch@npm:5.0.0" dependencies: - ci-info: "npm:^3.1.1" - checksum: 10/da5a7fba668a8e32f270e3e3ddff029e37305eeb84807ee265fd3408be42549dafebc89478d40d393f8c953ed8cc734ee1abfa409da2856908d72a2bc1584972 + "@types/minimatch": "npm:^3.0.3" + array-differ: "npm:^3.0.0" + array-union: "npm:^2.1.0" + arrify: "npm:^2.0.1" + minimatch: "npm:^3.0.4" + checksum: 10/82c8030a53af965cab48da22f1b0f894ef99e16ee680dabdfbd38d2dfacc3c8208c475203d747afd9e26db44118ed0221d5a0d65268c864f06d6efc7ac6df812 languageName: node linkType: hard -"stealthy-require@npm:^1.1.1": - version: 1.1.1 - resolution: "stealthy-require@npm:1.1.1" - checksum: 10/a408a51f5b6c1fe535e4459732ac0b66d7921583f89fc8289bfdc937a497fe8196219d1e04d234047349b90723ecff1a1cb4a92bef2315e01a3081dc72db8d41 +"multimatch@npm:^7.0.0": + version: 7.0.0 + resolution: "multimatch@npm:7.0.0" + dependencies: + array-differ: "npm:^4.0.0" + array-union: "npm:^3.0.1" + minimatch: "npm:^9.0.3" + checksum: 10/d0f2943135ed415014d3a078521147210cca685fbe0bac4519c7b2f4dbb4512ad595112115e263fa92b1f7815e204cf649782e4a233fa19fbfc5e6ea2c792592 languageName: node linkType: hard -"stellar-plus@npm:0.8.4": - version: 0.8.4 - resolution: "stellar-plus@npm:0.8.4" - dependencies: - "@stellar/freighter-api": "npm:^1.7.1" - "@stellar/stellar-sdk": "npm:^11.2.2" - axios: "npm:^1.6.2" - uuid: "npm:^9.0.1" - checksum: 10/b5acd2a69c4616011990cca3000815beb12d746bfa358d3e12ab20f38a4e55b8f5f28edbd883ba903e8d8ed63f07c3800c12b2282dcd156e2342f8e3365cfe7b +"mute-stream@npm:0.0.8": + version: 0.0.8 + resolution: "mute-stream@npm:0.0.8" + checksum: 10/a2d2e79dde87e3424ffc8c334472c7f3d17b072137734ca46e6f221131f1b014201cc593b69a38062e974fb2394d3d1cb4349f80f012bbf8b8ac1b28033e515f languageName: node linkType: hard -"stop-iteration-iterator@npm:^1.0.0": +"mute-stream@npm:1.0.0": version: 1.0.0 - resolution: "stop-iteration-iterator@npm:1.0.0" - dependencies: - internal-slot: "npm:^1.0.4" - checksum: 10/2a23a36f4f6bfa63f46ae2d53a3f80fe8276110b95a55345d8ed3d92125413494033bc8697eb774e8f7aeb5725f70e3d69753caa2ecacdac6258c16fa8aa8b0f + resolution: "mute-stream@npm:1.0.0" + checksum: 10/36fc968b0e9c9c63029d4f9dc63911950a3bdf55c9a87f58d3a266289b67180201cade911e7699f8b2fa596b34c9db43dad37649e3f7fdd13c3bb9edb0017ee7 languageName: node linkType: hard -"stoppable@npm:^1.1.0": - version: 1.1.0 - resolution: "stoppable@npm:1.1.0" - checksum: 10/63104fcbdece130bc4906fd982061e763d2ef48065ed1ab29895e5ad00552c625f8a4c50c9cd2e3bfa805c8a2c3bfdda0f07c5ae39694bd2d5cb0bee1618d1e9 +"nanoid@npm:^3.3.6": + version: 3.3.6 + resolution: "nanoid@npm:3.3.6" + bin: + nanoid: bin/nanoid.cjs + checksum: 10/67235c39d1bc05851383dadde5cf77ae1c90c2a1d189e845c7f20f646f0488d875ad5f5226bbba072a88cebbb085a3f784a6673117daf785bdf614a852550362 languageName: node linkType: hard -"str2buf@npm:^1.3.0": - version: 1.3.0 - resolution: "str2buf@npm:1.3.0" - checksum: 10/2d32e6571d6a650cd59d1a0f3a6fb686659953f425f17dd936135c7ce8d28c0cf24bfca9ec297474635595c17cdccbb96afbece223c075a04e3af6a9f5b5d14e +"natural-compare@npm:^1.4.0": + version: 1.4.0 + resolution: "natural-compare@npm:1.4.0" + checksum: 10/23ad088b08f898fc9b53011d7bb78ec48e79de7627e01ab5518e806033861bef68d5b0cd0e2205c2f36690ac9571ff6bcb05eb777ced2eeda8d4ac5b44592c3d languageName: node linkType: hard -"stream-browserify@npm:3.0.0, stream-browserify@npm:^3.0.0": - version: 3.0.0 - resolution: "stream-browserify@npm:3.0.0" - dependencies: - inherits: "npm:~2.0.4" - readable-stream: "npm:^3.5.0" - checksum: 10/05a3cd0a0ce2d568dbdeb69914557c26a1b0a9d871839666b692eae42b96189756a3ed685affc90dab64ff588a8524c8aec6d85072c07905a1f0d941ea68f956 +"negotiator@npm:0.6.3, negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: 10/2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 languageName: node linkType: hard -"stream-events@npm:^1.0.5": - version: 1.0.5 - resolution: "stream-events@npm:1.0.5" - dependencies: - stubs: "npm:^3.0.0" - checksum: 10/969ce82e34bfbef5734629cc06f9d7f3705a9ceb8fcd6a526332f9159f1f8bbfdb1a453f3ced0b728083454f7706adbbe8428bceb788a0287ca48ba2642dc3fc +"neo-async@npm:^2.6.0, neo-async@npm:^2.6.2": + version: 2.6.2 + resolution: "neo-async@npm:2.6.2" + checksum: 10/1a7948fea86f2b33ec766bc899c88796a51ba76a4afc9026764aedc6e7cde692a09067031e4a1bf6db4f978ccd99e7f5b6c03fe47ad9865c3d4f99050d67e002 languageName: node linkType: hard -"stream-http@npm:^3.2.0": - version: 3.2.0 - resolution: "stream-http@npm:3.2.0" - dependencies: - builtin-status-codes: "npm:^3.0.0" - inherits: "npm:^2.0.4" - readable-stream: "npm:^3.6.0" - xtend: "npm:^4.0.2" - checksum: 10/4f85738cbc6de70ecf0a04bc38b6092b4d91dd5317d3d93c88a84c48e63b82a8724ab5fd591df9f587b5139fe439d1748e4e3db3cb09c2b1e23649cb9d89859e +"nested-error-stacks@npm:^2.0.0, nested-error-stacks@npm:^2.1.0": + version: 2.1.0 + resolution: "nested-error-stacks@npm:2.1.0" + checksum: 10/206ee736f9eb83489cc093d43e7d3024255ec93c66a31eaee58ca14d5ad9d925d813494725dcf5dec264e70cd8430167b7f82a2d00b0dd099f83c78d9ca650fd languageName: node linkType: hard -"stream-meter@npm:^1.0.4": - version: 1.0.4 - resolution: "stream-meter@npm:1.0.4" +"new-github-release-url@npm:^2.0.0": + version: 2.0.0 + resolution: "new-github-release-url@npm:2.0.0" dependencies: - readable-stream: "npm:^2.1.4" - checksum: 10/b560f652cb2c62d1e117aab611737376f3086c125f464c23dcfec8a73e0e6416d20a334dca450a2d0527ce9c14299f1023553bf47a3d65892c73640dc3c401e8 + type-fest: "npm:^2.5.1" + checksum: 10/3d4ae0f3b775623ceed8e558b6f9850e897aea981a9c937d3ad4e018669c829beccb2c4b5a6af996726ebf86c5b7638368dfc01f3ac2e395d1df29309bc0c5ca languageName: node linkType: hard -"stream-shift@npm:^1.0.0": - version: 1.0.1 - resolution: "stream-shift@npm:1.0.1" - checksum: 10/59b82b44b29ec3699b5519a49b3cedcc6db58c72fb40c04e005525dfdcab1c75c4e0c180b923c380f204bed78211b9bad8faecc7b93dece4d004c3f6ec75737b +"nice-try@npm:^1.0.4": + version: 1.0.5 + resolution: "nice-try@npm:1.0.5" + checksum: 10/0b4af3b5bb5d86c289f7a026303d192a7eb4417231fe47245c460baeabae7277bcd8fd9c728fb6bd62c30b3e15cd6620373e2cf33353b095d8b403d3e8a15aff languageName: node linkType: hard -"stream-to-array@npm:^2.3.0": - version: 2.3.0 - resolution: "stream-to-array@npm:2.3.0" +"no-case@npm:^3.0.4": + version: 3.0.4 + resolution: "no-case@npm:3.0.4" dependencies: - any-promise: "npm:^1.1.0" - checksum: 10/7feaf63b38399b850615e6ffcaa951e96e4c8f46745dbce4b553a94c5dc43966933813747014935a3ff97793e7f30a65270bde19f82b2932871a1879229a77cf + lower-case: "npm:^2.0.2" + tslib: "npm:^2.0.3" + checksum: 10/0b2ebc113dfcf737d48dde49cfebf3ad2d82a8c3188e7100c6f375e30eafbef9e9124aadc3becef237b042fd5eb0aad2fd78669c20972d045bbe7fea8ba0be5c languageName: node linkType: hard -"stream-to-it@npm:^0.2.2, stream-to-it@npm:^0.2.4": - version: 0.2.4 - resolution: "stream-to-it@npm:0.2.4" +"node-addon-api@npm:^2.0.0": + version: 2.0.2 + resolution: "node-addon-api@npm:2.0.2" dependencies: - get-iterator: "npm:^1.0.2" - checksum: 10/510a960210672b79d5b1dea535315e14e5663f943181e4ed3868310102ca67785702a314f0a59a924611d6c8d24e90190c857d94ae787540f497042ad0316115 + node-gyp: "npm:latest" + checksum: 10/e4ce4daac5b2fefa6b94491b86979a9c12d9cceba571d2c6df1eb5859f9da68e5dc198f128798e1785a88aafee6e11f4992dcccd4bf86bec90973927d158bd60 languageName: node linkType: hard -"streamroller@npm:^3.0.2": - version: 3.0.2 - resolution: "streamroller@npm:3.0.2" - dependencies: - date-format: "npm:^4.0.3" - debug: "npm:^4.1.1" - fs-extra: "npm:^10.0.0" - checksum: 10/89a49dd4e755d4f2806ebce45f3d329a67e9829ba1cd4ea4897e2cfbcb7245efe676a301a3fbd8081a2a248d07f0dca448a1b64e2540bb8297a9d45bbe71656f +"node-domexception@npm:^1.0.0": + version: 1.0.0 + resolution: "node-domexception@npm:1.0.0" + checksum: 10/e332522f242348c511640c25a6fc7da4f30e09e580c70c6b13cb0be83c78c3e71c8d4665af2527e869fc96848924a4316ae7ec9014c091e2156f41739d4fa233 languageName: node linkType: hard -"streamroller@npm:^3.1.5": - version: 3.1.5 - resolution: "streamroller@npm:3.1.5" +"node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": + version: 2.6.7 + resolution: "node-fetch@npm:2.6.7" dependencies: - date-format: "npm:^4.0.14" - debug: "npm:^4.3.4" - fs-extra: "npm:^8.1.0" - checksum: 10/2e4fe61ab91d24e6a9add67418ca9b8e19bc49f4037e1f8b7ae2e480a1d7750423f470d111d138d921a538ae4777c4eb15b00f9cc2a0d4fd72829687889b0c63 - languageName: node - linkType: hard - -"streamsearch@npm:^1.1.0": - version: 1.1.0 - resolution: "streamsearch@npm:1.1.0" - checksum: 10/612c2b2a7dbcc859f74597112f80a42cbe4d448d03da790d5b7b39673c1197dd3789e91cd67210353e58857395d32c1e955a9041c4e6d5bae723436b3ed9ed14 - languageName: node - linkType: hard - -"strict-uri-encode@npm:^1.0.0": - version: 1.1.0 - resolution: "strict-uri-encode@npm:1.1.0" - checksum: 10/9466d371f7b36768d43f7803f26137657559e4c8b0161fb9e320efb8edba3ae22f8e99d4b0d91da023b05a13f62ec5412c3f4f764b5788fac11d1fea93720bb3 + whatwg-url: "npm:^5.0.0" + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: 10/4bc9245383db92c35601a798c9a992fdf38d99920ceac11e0e6512ef3014d188b3807ccb060bc6c4bdb57a145030c73f5b5fd6730f665979f9264bc43ca3afea languageName: node linkType: hard -"strict-uri-encode@npm:^2.0.0": - version: 2.0.0 - resolution: "strict-uri-encode@npm:2.0.0" - checksum: 10/eaac4cf978b6fbd480f1092cab8b233c9b949bcabfc9b598dd79a758f7243c28765ef7639c876fa72940dac687181b35486ea01ff7df3e65ce3848c64822c581 +"node-fetch@npm:^2.6.12": + version: 2.6.12 + resolution: "node-fetch@npm:2.6.12" + dependencies: + whatwg-url: "npm:^5.0.0" + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: 10/370ed4d906edad9709a81b54a0141d37d2973a27dc80c723d8ac14afcec6dc67bc6c70986a96992b64ec75d08159cc4b65ce6aa9063941168ea5ac73b24df9f8 languageName: node linkType: hard -"string-argv@npm:0.1.1": - version: 0.1.1 - resolution: "string-argv@npm:0.1.1" - checksum: 10/880e327b230f5a7e6a4b7e348617b32b45db3e420815b10b59bfe285e0ddb82ef73b6770d5e610ca73d1eb513df0a35661268d6e06c6d7663defb247a8b94765 +"node-fetch@npm:^3.3.2": + version: 3.3.2 + resolution: "node-fetch@npm:3.3.2" + dependencies: + data-uri-to-buffer: "npm:^4.0.0" + fetch-blob: "npm:^3.1.4" + formdata-polyfill: "npm:^4.0.10" + checksum: 10/24207ca8c81231c7c59151840e3fded461d67a31cf3e3b3968e12201a42f89ce4a0b5fb7079b1fa0a4655957b1ca9257553200f03a9f668b45ebad265ca5593d languageName: node linkType: hard -"string-argv@npm:0.3.1": - version: 0.3.1 - resolution: "string-argv@npm:0.3.1" - checksum: 10/47c637e3f47b3f5a6430036315e65564483fcf7745341d474943f0c2046f188681275fc1f2948db75c7a7e68134b1446e0dcceda60a7be1ee0c3fb026c0d90c4 +"node-gyp-build@npm:^4.2.0": + version: 4.3.0 + resolution: "node-gyp-build@npm:4.3.0" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 10/673bd8f12694cc226747333fc181a7288e32dc96e88067bccb9ae3969ed1459fe461f85ad76d0ec8566ec1ae75c179e7a6667b0094cc78c9431ecfc95b5c24aa languageName: node linkType: hard -"string-length@npm:^4.0.1": - version: 4.0.2 - resolution: "string-length@npm:4.0.2" +"node-gyp@npm:^10.0.0": + version: 10.0.1 + resolution: "node-gyp@npm:10.0.1" dependencies: - char-regex: "npm:^1.0.2" - strip-ansi: "npm:^6.0.0" - checksum: 10/ce85533ef5113fcb7e522bcf9e62cb33871aa99b3729cec5595f4447f660b0cefd542ca6df4150c97a677d58b0cb727a3fe09ac1de94071d05526c73579bf505 + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^13.0.0" + nopt: "npm:^7.0.0" + proc-log: "npm:^3.0.0" + semver: "npm:^7.3.5" + tar: "npm:^6.1.2" + which: "npm:^4.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/578cf0c821f258ce4b6ebce4461eca4c991a4df2dee163c0624f2fe09c7d6d37240be4942285a0048d307230248ee0b18382d6623b9a0136ce9533486deddfa8 languageName: node linkType: hard -"string-length@npm:^5.0.1": - version: 5.0.1 - resolution: "string-length@npm:5.0.1" +"node-gyp@npm:latest": + version: 9.4.0 + resolution: "node-gyp@npm:9.4.0" dependencies: - char-regex: "npm:^2.0.0" - strip-ansi: "npm:^7.0.1" - checksum: 10/71f73b8c8a743e01dcd001bcf1b197db78d5e5e53b12bd898cddaf0961be09f947dfd8c429783db3694b55b05cb5a51de6406c5085ff1aaa10c4771440c8396d - languageName: node - linkType: hard - -"string-natural-compare@npm:^3.0.1": - version: 3.0.1 - resolution: "string-natural-compare@npm:3.0.1" - checksum: 10/bc1fd0ee196466489e121bbe11844094ddcdee5a687dca9dbb18ba2ace73b1f6c96c9b448df2dfed0879b781b6b12e329ca1c1fc0a86d70b00c7823b76109b1e - languageName: node - linkType: hard - -"string-range@npm:~1.2, string-range@npm:~1.2.1": - version: 1.2.2 - resolution: "string-range@npm:1.2.2" - checksum: 10/497d6981e6808e6ee512ca28918dcf020ffc4276543561ec1da7ec7ebfde276f25eefd5e9776691e52103c0e35ffe3ea00f074558dbc3151d580c1523de3a967 + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^7.1.4" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^11.0.3" + nopt: "npm:^6.0.0" + npmlog: "npm:^6.0.0" + rimraf: "npm:^3.0.2" + semver: "npm:^7.3.5" + tar: "npm:^6.1.2" + which: "npm:^2.0.2" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/458317127c63877365f227b18ef2362b013b7f8440b35ae722935e61b31e6b84ec0e3625ab07f90679e2f41a1d5a7df6c4049fdf8e7b3c81fcf22775147b47ac languageName: node linkType: hard -"string-similarity@npm:^4.0.1": - version: 4.0.4 - resolution: "string-similarity@npm:4.0.4" - checksum: 10/53365fe64d4958e88951f0016b2174aaea330f762f522be6081bae4cac3e3396f723c8ec4091c0b0e266129652ead5dde3683c31d3a07ff1b6aa35057de28b1b +"node-int64@npm:^0.4.0": + version: 0.4.0 + resolution: "node-int64@npm:0.4.0" + checksum: 10/b7afc2b65e56f7035b1a2eec57ae0fbdee7d742b1cdcd0f4387562b6527a011ab1cbe9f64cc8b3cca61e3297c9637c8bf61cec2e6b8d3a711d4b5267dfafbe02 languageName: node linkType: hard -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": - version: 4.2.3 - resolution: "string-width@npm:4.2.3" +"node-polyfill-webpack-plugin@npm:1.1.4": + version: 1.1.4 + resolution: "node-polyfill-webpack-plugin@npm:1.1.4" dependencies: - emoji-regex: "npm:^8.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - strip-ansi: "npm:^6.0.1" - checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + assert: "npm:^2.0.0" + browserify-zlib: "npm:^0.2.0" + buffer: "npm:^6.0.3" + console-browserify: "npm:^1.2.0" + constants-browserify: "npm:^1.0.0" + crypto-browserify: "npm:^3.12.0" + domain-browser: "npm:^4.19.0" + events: "npm:^3.3.0" + filter-obj: "npm:^2.0.2" + https-browserify: "npm:^1.0.0" + os-browserify: "npm:^0.3.0" + path-browserify: "npm:^1.0.1" + process: "npm:^0.11.10" + punycode: "npm:^2.1.1" + querystring-es3: "npm:^0.2.1" + readable-stream: "npm:^3.6.0" + stream-browserify: "npm:^3.0.0" + stream-http: "npm:^3.2.0" + string_decoder: "npm:^1.3.0" + timers-browserify: "npm:^2.0.12" + tty-browserify: "npm:^0.0.1" + url: "npm:^0.11.0" + util: "npm:^0.12.4" + vm-browserify: "npm:^1.1.2" + peerDependencies: + webpack: ">=5" + checksum: 10/a700b86a673771ccb604673310b619b19b2e5a99646f08ce34f42644c9743c7501c2b0f906e9b215c7eb44b9eefe2366e99a86b26d1680436a5efbb9a984ca18 languageName: node linkType: hard -"string-width@npm:^1.0.1": - version: 1.0.2 - resolution: "string-width@npm:1.0.2" +"node-preload@npm:^0.2.1": + version: 0.2.1 + resolution: "node-preload@npm:0.2.1" dependencies: - code-point-at: "npm:^1.0.0" - is-fullwidth-code-point: "npm:^1.0.0" - strip-ansi: "npm:^3.0.0" - checksum: 10/5c79439e95bc3bd7233a332c5f5926ab2ee90b23816ed4faa380ce3b2576d7800b0a5bb15ae88ed28737acc7ea06a518c2eef39142dd727adad0e45c776cd37e + process-on-spawn: "npm:^1.0.0" + checksum: 10/de36ed365b7e474eaf05c41f976774dece23a7f398fe76dbf9705f9670a1f49e6a27c5f31fe58b4e43d96413fdce4806192c60d35317b25725636c90889d5bab languageName: node linkType: hard -"string-width@npm:^2.0.0, string-width@npm:^2.1.0, string-width@npm:^2.1.1": - version: 2.1.1 - resolution: "string-width@npm:2.1.1" - dependencies: - is-fullwidth-code-point: "npm:^2.0.0" - strip-ansi: "npm:^4.0.0" - checksum: 10/d6173abe088c615c8dffaf3861dc5d5906ed3dc2d6fd67ff2bd2e2b5dce7fd683c5240699cf0b1b8aa679a3b3bd6b28b5053c824cb89b813d7f6541d8f89064a +"node-releases@npm:^2.0.13": + version: 2.0.13 + resolution: "node-releases@npm:2.0.13" + checksum: 10/c9bb813aab2717ff8b3015ecd4c7c5670a5546e9577699a7c84e8d69230cd3b1ce8f863f8e9b50f18b19a5ffa4b9c1a706bbbfe4c378de955fedbab04488a338 languageName: node linkType: hard -"string-width@npm:^3.0.0, string-width@npm:^3.1.0": - version: 3.1.0 - resolution: "string-width@npm:3.1.0" - dependencies: - emoji-regex: "npm:^7.0.1" - is-fullwidth-code-point: "npm:^2.0.0" - strip-ansi: "npm:^5.1.0" - checksum: 10/57f7ca73d201682816d573dc68bd4bb8e1dff8dc9fcf10470fdfc3474135c97175fec12ea6a159e67339b41e86963112355b64529489af6e7e70f94a7caf08b2 +"node-releases@npm:^2.0.3": + version: 2.0.4 + resolution: "node-releases@npm:2.0.4" + checksum: 10/b32d6c2032c7b169ae3938b416fc50f123f5bd577d54a79b2ae201febf27b22846b01c803dd35ac8689afe840f8ba4e5f7154723db629b80f359836b6707b92f languageName: node linkType: hard -"string-width@npm:^5.0.1, string-width@npm:^5.1.2": - version: 5.1.2 - resolution: "string-width@npm:5.1.2" +"node-source-walk@npm:^6.0.0, node-source-walk@npm:^6.0.1, node-source-walk@npm:^6.0.2": + version: 6.0.2 + resolution: "node-source-walk@npm:6.0.2" dependencies: - eastasianwidth: "npm:^0.2.0" - emoji-regex: "npm:^9.2.2" - strip-ansi: "npm:^7.0.1" - checksum: 10/7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + "@babel/parser": "npm:^7.21.8" + checksum: 10/eacaaa11fa71fd48da16d75a108d5e1e945b581550112b37c5e909c7f112c1b48acf8648d7fa167e6f482e41f047bceca1ffc5aa3c91fee74406acc003f98190 languageName: node linkType: hard -"string-width@npm:^7.2.0": - version: 7.2.0 - resolution: "string-width@npm:7.2.0" +"nodemon@npm:^2.0.7": + version: 2.0.15 + resolution: "nodemon@npm:2.0.15" dependencies: - emoji-regex: "npm:^10.3.0" - get-east-asian-width: "npm:^1.0.0" - strip-ansi: "npm:^7.1.0" - checksum: 10/42f9e82f61314904a81393f6ef75b832c39f39761797250de68c041d8ba4df2ef80db49ab6cd3a292923a6f0f409b8c9980d120f7d32c820b4a8a84a2598a295 + chokidar: "npm:^3.5.2" + debug: "npm:^3.2.7" + ignore-by-default: "npm:^1.0.1" + minimatch: "npm:^3.0.4" + pstree.remy: "npm:^1.1.8" + semver: "npm:^5.7.1" + supports-color: "npm:^5.5.0" + touch: "npm:^3.1.0" + undefsafe: "npm:^2.0.5" + update-notifier: "npm:^5.1.0" + bin: + nodemon: bin/nodemon.js + checksum: 10/98f9a1af1d5dd302d0113ee93405b620205c45341e35614397f86f3034900664e551684b3ede8285d9969e09805873538e4cab2fcedb4a485f8df01890a22a69 languageName: node linkType: hard -"string.prototype.matchall@npm:^4.0.6, string.prototype.matchall@npm:^4.0.8": - version: 4.0.10 - resolution: "string.prototype.matchall@npm:4.0.10" +"nopt@npm:^5.0.0": + version: 5.0.0 + resolution: "nopt@npm:5.0.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.5" - regexp.prototype.flags: "npm:^1.5.0" - set-function-name: "npm:^2.0.0" - side-channel: "npm:^1.0.4" - checksum: 10/0f7a1a7f91790cd45f804039a16bc6389c8f4f25903e648caa3eea080b019a5c7b0cac2ca83976646140c2332b159042140bf389f23675609d869dd52450cddc + abbrev: "npm:1" + bin: + nopt: bin/nopt.js + checksum: 10/00f9bb2d16449469ba8ffcf9b8f0eae6bae285ec74b135fec533e5883563d2400c0cd70902d0a7759e47ac031ccf206ace4e86556da08ed3f1c66dda206e9ccd languageName: node linkType: hard -"string.prototype.padend@npm:^3.0.0": - version: 3.1.3 - resolution: "string.prototype.padend@npm:3.1.3" +"nopt@npm:^6.0.0": + version: 6.0.0 + resolution: "nopt@npm:6.0.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.19.1" - checksum: 10/ae99a99c9ee78d0b5a76a0f5913fa9a43a911794937748df821565b1ae37279603fe718aa1954e9034681cc20ae75d9d9f8af02a15a796d92b81d9bcb637b879 + abbrev: "npm:^1.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/3c1128e07cd0241ae66d6e6a472170baa9f3e84dd4203950ba8df5bafac4efa2166ce917a57ef02b01ba7c40d18b2cc64b29b225fd3640791fe07b24f0b33a32 languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.7": - version: 1.2.7 - resolution: "string.prototype.trim@npm:1.2.7" +"nopt@npm:^7.0.0": + version: 7.1.0 + resolution: "nopt@npm:7.1.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - checksum: 10/a1b795bdb4b4b7d9399e99771e8a36493a30cf18095b0e8b36bcb211aad42dc59186c9a833c774f7a70429dbd3862818133d7e0da1547a0e9f0e1ebddf995635 + abbrev: "npm:^2.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/92d6e425bb18c422ddace4c284ab9c3dc6f50df03902e0030afff33a4aebe5ab6f80bf77b1cdc70adde266678f96f87de4939e211f2e2573904fe5daffbc9d61 languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.8": - version: 1.2.8 - resolution: "string.prototype.trim@npm:1.2.8" +"nopt@npm:^7.2.1": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/9301f6cb2b6c44f069adde1b50f4048915985170a20a1d64cf7cb2dc53c5cd6b9525b92431f1257f894f94892d6c4ae19b5aa7f577c3589e7e51772dffc9d5a4 + abbrev: "npm:^2.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/95a1f6dec8a81cd18cdc2fed93e6f0b4e02cf6bdb4501c848752c6e34f9883d9942f036a5e3b21a699047d8a448562d891e67492df68ec9c373e6198133337ae languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.4": - version: 1.0.4 - resolution: "string.prototype.trimend@npm:1.0.4" +"nopt@npm:~1.0.10": + version: 1.0.10 + resolution: "nopt@npm:1.0.10" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - checksum: 10/5733b0f9801276387be136f1591883fc1b6371e263533d7797dc6178916a98bd9f632870f25e58a827ed028c17003b70e37650e80fc6703af6883cb2f3b0c1b3 + abbrev: "npm:1" + bin: + nopt: ./bin/nopt.js + checksum: 10/4f01ad1e144883a190d70bd6003f26e2f3a899230fe1b0f3310e43779c61cab5ae0063a9209912cd52fc4c552b266b38173853aa9abe27ecb04acbdfdca2e9fc languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.6": - version: 1.0.6 - resolution: "string.prototype.trimend@npm:1.0.6" +"normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.5.0": + version: 2.5.0 + resolution: "normalize-package-data@npm:2.5.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - checksum: 10/3893db9267e0b8a16658c3947738536e90c400a9b7282de96925d4e210174cfe66c59d6b7eb5b4a9aaa78ef7f5e46afb117e842d93112fbd105c8d19206d8092 + hosted-git-info: "npm:^2.1.4" + resolve: "npm:^1.10.0" + semver: "npm:2 || 3 || 4 || 5" + validate-npm-package-license: "npm:^3.0.1" + checksum: 10/644f830a8bb9b7cc9bf2f6150618727659ee27cdd0840d1c1f97e8e6cab0803a098a2c19f31c6247ad9d3a0792e61521a13a6e8cd87cc6bb676e3150612c03d4 languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.7": - version: 1.0.7 - resolution: "string.prototype.trimend@npm:1.0.7" +"normalize-package-data@npm:^3.0.0, normalize-package-data@npm:^3.0.2": + version: 3.0.3 + resolution: "normalize-package-data@npm:3.0.3" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/3f0d3397ab9bd95cd98ae2fe0943bd3e7b63d333c2ab88f1875cf2e7c958c75dc3355f6fe19ee7c8fca28de6f39f2475e955e103821feb41299a2764a7463ffa + hosted-git-info: "npm:^4.0.1" + is-core-module: "npm:^2.5.0" + semver: "npm:^7.3.4" + validate-npm-package-license: "npm:^3.0.1" + checksum: 10/3cd3b438c9c7b15d72ed2d1bbf0f8cc2d07bfe27702fc9e95d039f0af4e069dc75c0646e75068f9f9255a8aae64b59aa4fe2177e65787145fb996c3d38d48acb languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.4": - version: 1.0.4 - resolution: "string.prototype.trimstart@npm:1.0.4" +"normalize-package-data@npm:^6.0.0": + version: 6.0.0 + resolution: "normalize-package-data@npm:6.0.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - checksum: 10/18e0b7362c51f566a3de095c4bab953174897f6cebe92826234f04d2744b0fdb25095c74661e0c15776d1338d64965be0a4f9c8be8851ee15b827c63a5280fdb + hosted-git-info: "npm:^7.0.0" + is-core-module: "npm:^2.8.1" + semver: "npm:^7.3.5" + validate-npm-package-license: "npm:^3.0.4" + checksum: 10/e31e31a2ebaef93ef107feb9408f105044eeae9cb7d0d4619544ab2323cd4b15ca648b0d558ac29db2fece161c7b8658206bb27ebe9340df723f7174b3e2759d languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.6": - version: 1.0.6 - resolution: "string.prototype.trimstart@npm:1.0.6" +"normalize-package-data@npm:^6.0.1": + version: 6.0.2 + resolution: "normalize-package-data@npm:6.0.2" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - checksum: 10/05e2cd06fa5311b17f5b2c7af0a60239fa210f4bb07bbcfce4995215dce330e2b1dd2d8030d371f46252ab637522e14b6e9a78384e8515945b72654c14261d54 + hosted-git-info: "npm:^7.0.0" + semver: "npm:^7.3.5" + validate-npm-package-license: "npm:^3.0.4" + checksum: 10/7c4216a2426aa76c0197f8372f06b23a0484d62b3518fb5c0f6ebccb16376bdfab29ceba96f95c75f60506473198f1337fe337b945c8df0541fe32b8049ab4c9 languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.7": - version: 1.0.7 - resolution: "string.prototype.trimstart@npm:1.0.7" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/6e594d3a61b127d243b8be1312e9f78683abe452cfe0bcafa3e0dc62ad6f030ccfb64d87ed3086fb7cb540fda62442c164d237cc5cc4d53c6e3eb659c29a0aeb +"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 languageName: node linkType: hard -"string_decoder@npm:^1.1.1, string_decoder@npm:^1.3.0": - version: 1.3.0 - resolution: "string_decoder@npm:1.3.0" - dependencies: - safe-buffer: "npm:~5.2.0" - checksum: 10/54d23f4a6acae0e93f999a585e673be9e561b65cd4cca37714af1e893ab8cd8dfa52a9e4f58f48f87b4a44918d3a9254326cb80ed194bf2e4c226e2b21767e56 +"normalize-url@npm:^4.1.0": + version: 4.5.1 + resolution: "normalize-url@npm:4.5.1" + checksum: 10/20ced2845fcfaa46da74efc0aa39b7bed22f3db39e6e8b844261613082a36a2dcd468decad89fa9313b5464bebab4034f96bda7880e8fc468027fecf6a6fa254 languageName: node linkType: hard -"string_decoder@npm:~0.10.x": - version: 0.10.31 - resolution: "string_decoder@npm:0.10.31" - checksum: 10/cc43e6b1340d4c7843da0e37d4c87a4084c2342fc99dcf6563c3ec273bb082f0cbd4ebf25d5da19b04fb16400d393885fda830be5128e1c416c73b5a6165f175 +"normalize-url@npm:^8.0.0": + version: 8.0.0 + resolution: "normalize-url@npm:8.0.0" + checksum: 10/4347d6ee39d9e1e7138c9e7c0b459c1e07304d9cd7c62d92c1ca01ed1f0c5397b292079fe7cfa953f469722ae150eec82e14b97e2175af39ede0b58f99ef8cac languageName: node linkType: hard -"string_decoder@npm:~1.1.1": - version: 1.1.1 - resolution: "string_decoder@npm:1.1.1" +"npm-bundled@npm:^3.0.0": + version: 3.0.0 + resolution: "npm-bundled@npm:3.0.0" dependencies: - safe-buffer: "npm:~5.1.0" - checksum: 10/7c41c17ed4dea105231f6df208002ebddd732e8e9e2d619d133cecd8e0087ddfd9587d2feb3c8caf3213cbd841ada6d057f5142cae68a4e62d3540778d9819b4 + npm-normalize-package-bin: "npm:^3.0.0" + checksum: 10/704fce20114d36d665c20edc56d3f9f7778c52ca1cd48731ec31f65af9e65805f9308ca7ed9e5a6bd9fe22327a63aa5d83a8c5aaee0c715e5047de1fa659e8bf languageName: node linkType: hard -"stringify-object@npm:3.3.0, stringify-object@npm:^3.2.1, stringify-object@npm:^3.3.0": - version: 3.3.0 - resolution: "stringify-object@npm:3.3.0" +"npm-install-checks@npm:^6.0.0": + version: 6.1.0 + resolution: "npm-install-checks@npm:6.1.0" dependencies: - get-own-enumerable-property-symbols: "npm:^3.0.0" - is-obj: "npm:^1.0.1" - is-regexp: "npm:^1.0.0" - checksum: 10/973782f09a3df3f39a2cf07dbf43fb9ba6cb32976f3616cd0f6c10e0a5c5415dd72b7b700e72920e8da2bf57c3001b8e37b5af7174bab9a748ce0416989e19b1 + semver: "npm:^7.1.1" + checksum: 10/efbb4deac45bfe18ab8f619801f736f675ee9f80a60eeafc9fbf8f4657816b67d8e1b1a8dc50d47ee4226727f96e111974a752c4861e1aef1cc2e2ed70581e7c languageName: node linkType: hard -"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": - version: 6.0.1 - resolution: "strip-ansi@npm:6.0.1" +"npm-install-checks@npm:^6.2.0": + version: 6.2.0 + resolution: "npm-install-checks@npm:6.2.0" dependencies: - ansi-regex: "npm:^5.0.1" - checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + semver: "npm:^7.1.1" + checksum: 10/2f91f71e07111ef89c6f4ad37b89933322567be51ca3a4ec5e972cc5edbc8d1ac6059f3b8904d2bab9893df1567366230eda3d0fe3bcf0de610c48f3f57f17a8 languageName: node linkType: hard -"strip-ansi@npm:^3.0.0, strip-ansi@npm:^3.0.1": - version: 3.0.1 - resolution: "strip-ansi@npm:3.0.1" - dependencies: - ansi-regex: "npm:^2.0.0" - checksum: 10/9b974de611ce5075c70629c00fa98c46144043db92ae17748fb780f706f7a789e9989fd10597b7c2053ae8d1513fd707816a91f1879b2f71e6ac0b6a863db465 +"npm-normalize-package-bin@npm:^3.0.0": + version: 3.0.0 + resolution: "npm-normalize-package-bin@npm:3.0.0" + checksum: 10/6a34886c150b0f5302aad52a9446e5c939aa14eeb462323e75681517b36c6b9eaef83e1f5bc2d7e5154b3b752cbce81bed05e290db3f1f7edf857cbb895e35c0 languageName: node linkType: hard -"strip-ansi@npm:^4.0.0": - version: 4.0.0 - resolution: "strip-ansi@npm:4.0.0" +"npm-package-arg@npm:^11.0.0": + version: 11.0.1 + resolution: "npm-package-arg@npm:11.0.1" dependencies: - ansi-regex: "npm:^3.0.0" - checksum: 10/d9186e6c0cf78f25274f6750ee5e4a5725fb91b70fdd79aa5fe648eab092a0ec5b9621b22d69d4534a56319f75d8944efbd84e3afa8d4ad1b9a9491f12c84eca + hosted-git-info: "npm:^7.0.0" + proc-log: "npm:^3.0.0" + semver: "npm:^7.3.5" + validate-npm-package-name: "npm:^5.0.0" + checksum: 10/a16e632703e106b3e9a6b4902d14a3493c8371745bcf8ba8f4ea9f152e12d5ed927487931e9adf817d05ba97b04941b33fec1d140dbd7da09181b546fde35b3c languageName: node linkType: hard -"strip-ansi@npm:^5.0.0, strip-ansi@npm:^5.1.0, strip-ansi@npm:^5.2.0": - version: 5.2.0 - resolution: "strip-ansi@npm:5.2.0" +"npm-package-arg@npm:^11.0.2": + version: 11.0.2 + resolution: "npm-package-arg@npm:11.0.2" dependencies: - ansi-regex: "npm:^4.1.0" - checksum: 10/bdb5f76ade97062bd88e7723aa019adbfacdcba42223b19ccb528ffb9fb0b89a5be442c663c4a3fb25268eaa3f6ea19c7c3fbae830bd1562d55adccae1fcec46 + hosted-git-info: "npm:^7.0.0" + proc-log: "npm:^4.0.0" + semver: "npm:^7.3.5" + validate-npm-package-name: "npm:^5.0.0" + checksum: 10/ce4c51900a73aadb408c9830c38a61b1930e1ab08509ec5ebbcf625ad14326ee33b014df289c942039bd28071ab17e813368f68d26a4ccad0eb6e9928f8ad03c languageName: node linkType: hard -"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": - version: 7.1.0 - resolution: "strip-ansi@npm:7.1.0" +"npm-packlist@npm:^8.0.0": + version: 8.0.0 + resolution: "npm-packlist@npm:8.0.0" dependencies: - ansi-regex: "npm:^6.0.1" - checksum: 10/475f53e9c44375d6e72807284024ac5d668ee1d06010740dec0b9744f2ddf47de8d7151f80e5f6190fc8f384e802fdf9504b76a7e9020c9faee7103623338be2 + ignore-walk: "npm:^6.0.0" + checksum: 10/64bd475183761903e766c8c0a2008cd2b7564e841f3681930020c75cb92929b2331f9de7768530eb7c2b5f45fdf9b9febf4cdfb7b8f6279b95a1fb9d93fadc6b languageName: node linkType: hard -"strip-bom@npm:^2.0.0": - version: 2.0.0 - resolution: "strip-bom@npm:2.0.0" +"npm-packlist@npm:^8.0.2": + version: 8.0.2 + resolution: "npm-packlist@npm:8.0.2" dependencies: - is-utf8: "npm:^0.2.0" - checksum: 10/08efb746bc67b10814cd03d79eb31bac633393a782e3f35efbc1b61b5165d3806d03332a97f362822cf0d4dd14ba2e12707fcff44fe1c870c48a063a0c9e4944 + ignore-walk: "npm:^6.0.4" + checksum: 10/707206e5c09a1b8aa04e590592715ba5ab8732add1bbb5eeaff54b9c6b2740764c9e94c99e390c13245970b51c2cc92b8d44594c2784fcd96f255c7109622322 languageName: node linkType: hard -"strip-bom@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-bom@npm:3.0.0" - checksum: 10/8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b +"npm-pick-manifest@npm:^9.0.0": + version: 9.0.0 + resolution: "npm-pick-manifest@npm:9.0.0" + dependencies: + npm-install-checks: "npm:^6.0.0" + npm-normalize-package-bin: "npm:^3.0.0" + npm-package-arg: "npm:^11.0.0" + semver: "npm:^7.3.5" + checksum: 10/29dca2a838ed35c714df1a76f76616df2df51ce31bc3ca5943a0668b2eca2a5aab448f9f89cadf7a77eb5e3831c554cebaf7802f3e432838acb34c1a74fa2786 languageName: node linkType: hard -"strip-bom@npm:^4.0.0": - version: 4.0.0 - resolution: "strip-bom@npm:4.0.0" - checksum: 10/9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 +"npm-pick-manifest@npm:^9.0.1": + version: 9.0.1 + resolution: "npm-pick-manifest@npm:9.0.1" + dependencies: + npm-install-checks: "npm:^6.0.0" + npm-normalize-package-bin: "npm:^3.0.0" + npm-package-arg: "npm:^11.0.0" + semver: "npm:^7.3.5" + checksum: 10/870053b63c8765a5d22df3aabcf09505342dd30398c68e15a57cc32e9da629c361b12285d72bd0bac100786623d2f2dc5ced16270f39dda7c14660fae677590e languageName: node linkType: hard -"strip-comments@npm:^2.0.1": - version: 2.0.1 - resolution: "strip-comments@npm:2.0.1" - checksum: 10/43ea36189e4ba543c6ffb0384831e9e23c3b57ede5592c6edcbfc883f489f91d00328fe2670b4e467f61c7886eff68deae3e946f0f092346b2b3cb058b9cfdba +"npm-registry-fetch@npm:^17.0.0, npm-registry-fetch@npm:^17.0.1, npm-registry-fetch@npm:^17.1.0": + version: 17.1.0 + resolution: "npm-registry-fetch@npm:17.1.0" + dependencies: + "@npmcli/redact": "npm:^2.0.0" + jsonparse: "npm:^1.3.1" + make-fetch-happen: "npm:^13.0.0" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^3.0.0" + minizlib: "npm:^2.1.2" + npm-package-arg: "npm:^11.0.0" + proc-log: "npm:^4.0.0" + checksum: 10/b9b2a73907fb5b2d8187031e040d7b2918f2b127ac858a84bd244f6435d16dd04df23c9660f32d7e9deb0216b91071623f040fd51b0bd375e8c7fed7d7a82a1c languageName: node linkType: hard -"strip-dirs@npm:^2.0.0": - version: 2.1.0 - resolution: "strip-dirs@npm:2.1.0" +"npm-run-all@npm:4.1.5": + version: 4.1.5 + resolution: "npm-run-all@npm:4.1.5" dependencies: - is-natural-number: "npm:^4.0.1" - checksum: 10/7284fc61cf667e403c54ea515c421094ae641a382a8c8b6019f06658e828556c8e4bb439d5797f7d42247a5342eb6feef200c88ad0582e69b3261e1ec0dbc3a6 + ansi-styles: "npm:^3.2.1" + chalk: "npm:^2.4.1" + cross-spawn: "npm:^6.0.5" + memorystream: "npm:^0.3.1" + minimatch: "npm:^3.0.4" + pidtree: "npm:^0.3.0" + read-pkg: "npm:^3.0.0" + shell-quote: "npm:^1.6.1" + string.prototype.padend: "npm:^3.0.0" + bin: + npm-run-all: bin/npm-run-all/index.js + run-p: bin/run-p/index.js + run-s: bin/run-s/index.js + checksum: 10/46020e92813223d015f4178cce5a2338164be5f25b0c391e256c0e84ac082544986c220013f1be7f002dcac07b81c7ee0cb5c5c30b84fd6ebb6de96a8d713745 languageName: node linkType: hard -"strip-eof@npm:^1.0.0": - version: 1.0.0 - resolution: "strip-eof@npm:1.0.0" - checksum: 10/40bc8ddd7e072f8ba0c2d6d05267b4e0a4800898c3435b5fb5f5a21e6e47dfaff18467e7aa0d1844bb5d6274c3097246595841fbfeb317e541974ee992cac506 +"npm-run-path@npm:^4.0.1": + version: 4.0.1 + resolution: "npm-run-path@npm:4.0.1" + dependencies: + path-key: "npm:^3.0.0" + checksum: 10/5374c0cea4b0bbfdfae62da7bbdf1e1558d338335f4cacf2515c282ff358ff27b2ecb91ffa5330a8b14390ac66a1e146e10700440c1ab868208430f56b5f4d23 languageName: node linkType: hard -"strip-final-newline@npm:^2.0.0": - version: 2.0.0 - resolution: "strip-final-newline@npm:2.0.0" - checksum: 10/69412b5e25731e1938184b5d489c32e340605bb611d6140344abc3421b7f3c6f9984b21dff296dfcf056681b82caa3bb4cc996a965ce37bcfad663e92eae9c64 +"npm-run-path@npm:^5.1.0": + version: 5.1.0 + resolution: "npm-run-path@npm:5.1.0" + dependencies: + path-key: "npm:^4.0.0" + checksum: 10/dc184eb5ec239d6a2b990b43236845332ef12f4e0beaa9701de724aa797fe40b6bbd0157fb7639d24d3ab13f5d5cf22d223a19c6300846b8126f335f788bee66 languageName: node linkType: hard -"strip-final-newline@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-final-newline@npm:3.0.0" - checksum: 10/23ee263adfa2070cd0f23d1ac14e2ed2f000c9b44229aec9c799f1367ec001478469560abefd00c5c99ee6f0b31c137d53ec6029c53e9f32a93804e18c201050 +"npm-watch@npm:0.11.0": + version: 0.11.0 + resolution: "npm-watch@npm:0.11.0" + dependencies: + nodemon: "npm:^2.0.7" + through2: "npm:^4.0.2" + bin: + npm-watch: cli.js + checksum: 10/004663835ff84e7d9390b47ab05508d2e216e452171d6474b8a3f805104894280fd8e53d69a0b378fdeea253028ff402173d9964743f5a2552109b22fd1ebc89 languageName: node linkType: hard -"strip-hex-prefix@npm:1.0.0": - version: 1.0.0 - resolution: "strip-hex-prefix@npm:1.0.0" +"npmlog@npm:^5.0.1": + version: 5.0.1 + resolution: "npmlog@npm:5.0.1" dependencies: - is-hex-prefixed: "npm:1.0.0" - checksum: 10/4cafe7caee1d281d3694d14920fd5d3c11adf09371cef7e2ccedd5b83efd9e9bd2219b5d6ce6e809df6e0f437dc9d30db1192116580875698aad164a6d6b285b + are-we-there-yet: "npm:^2.0.0" + console-control-strings: "npm:^1.1.0" + gauge: "npm:^3.0.0" + set-blocking: "npm:^2.0.0" + checksum: 10/f42c7b9584cdd26a13c41a21930b6f5912896b6419ab15be88cc5721fc792f1c3dd30eb602b26ae08575694628ba70afdcf3675d86e4f450fc544757e52726ec languageName: node linkType: hard -"strip-indent@npm:^2.0.0": - version: 2.0.0 - resolution: "strip-indent@npm:2.0.0" - checksum: 10/7d9080d02ddace616ebbc17846e41d3880cb147e2a81e51142281322ded6b05b230a4fb12c2e5266f62735cf8f5fb9839e55d74799d11f26bcc8c71ca049a0ba +"npmlog@npm:^6.0.0": + version: 6.0.2 + resolution: "npmlog@npm:6.0.2" + dependencies: + are-we-there-yet: "npm:^3.0.0" + console-control-strings: "npm:^1.1.0" + gauge: "npm:^4.0.3" + set-blocking: "npm:^2.0.0" + checksum: 10/82b123677e62deb9e7472e27b92386c09e6e254ee6c8bcd720b3011013e4168bc7088e984f4fbd53cb6e12f8b4690e23e4fa6132689313e0d0dc4feea45489bb languageName: node linkType: hard -"strip-indent@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-indent@npm:3.0.0" +"nyc@npm:^15.1.0": + version: 15.1.0 + resolution: "nyc@npm:15.1.0" dependencies: - min-indent: "npm:^1.0.0" - checksum: 10/18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 + "@istanbuljs/load-nyc-config": "npm:^1.0.0" + "@istanbuljs/schema": "npm:^0.1.2" + caching-transform: "npm:^4.0.0" + convert-source-map: "npm:^1.7.0" + decamelize: "npm:^1.2.0" + find-cache-dir: "npm:^3.2.0" + find-up: "npm:^4.1.0" + foreground-child: "npm:^2.0.0" + get-package-type: "npm:^0.1.0" + glob: "npm:^7.1.6" + istanbul-lib-coverage: "npm:^3.0.0" + istanbul-lib-hook: "npm:^3.0.0" + istanbul-lib-instrument: "npm:^4.0.0" + istanbul-lib-processinfo: "npm:^2.0.2" + istanbul-lib-report: "npm:^3.0.0" + istanbul-lib-source-maps: "npm:^4.0.0" + istanbul-reports: "npm:^3.0.2" + make-dir: "npm:^3.0.0" + node-preload: "npm:^0.2.1" + p-map: "npm:^3.0.0" + process-on-spawn: "npm:^1.0.0" + resolve-from: "npm:^5.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + spawn-wrap: "npm:^2.0.0" + test-exclude: "npm:^6.0.0" + yargs: "npm:^15.0.2" + bin: + nyc: bin/nyc.js + checksum: 10/c987f04f4192dfd94e9e69869c76a54220b3ed555016751f380a413a378cceff8ec346df579e9126035b6acbc60ab893cc65e67729cc427c0171361bcb481e66 languageName: node linkType: hard -"strip-indent@npm:^4.0.0": - version: 4.0.0 - resolution: "strip-indent@npm:4.0.0" - dependencies: - min-indent: "npm:^1.0.1" - checksum: 10/06cbcd93da721c46bc13caeb1c00af93a9b18146a1c95927672d2decab6a25ad83662772417cea9317a2507fb143253ecc23c4415b64f5828cef9b638a744598 +"object-assign@npm:^4, object-assign@npm:^4.1.1": + version: 4.1.1 + resolution: "object-assign@npm:4.1.1" + checksum: 10/fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f languageName: node linkType: hard -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.1": - version: 3.1.1 - resolution: "strip-json-comments@npm:3.1.1" - checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 +"object-inspect@npm:^1.11.0": + version: 1.12.0 + resolution: "object-inspect@npm:1.12.0" + checksum: 10/f13b824784749ac2d40d62a4c2a60df13fd57a221968efe1d686565ef71713b56b82e01b57bc2588d6b2ab124c342f130a2d0304c14a79f7fabe01bfa327515b languageName: node linkType: hard -"strip-json-comments@npm:~2.0.1": - version: 2.0.1 - resolution: "strip-json-comments@npm:2.0.1" - checksum: 10/1074ccb63270d32ca28edfb0a281c96b94dc679077828135141f27d52a5a398ef5e78bcf22809d23cadc2b81dfbe345eb5fd8699b385c8b1128907dec4a7d1e1 +"object-inspect@npm:^1.12.3": + version: 1.12.3 + resolution: "object-inspect@npm:1.12.3" + checksum: 10/532b0036f0472f561180fac0d04fe328ee01f57637624c83fb054f81b5bfe966cdf4200612a499ed391a7ca3c46b20a0bc3a55fc8241d944abe687c556a32b39 languageName: node linkType: hard -"strong-log-transformer@npm:^2.1.0": - version: 2.1.0 - resolution: "strong-log-transformer@npm:2.1.0" - dependencies: - duplexer: "npm:^0.1.1" - minimist: "npm:^1.2.0" - through: "npm:^2.3.4" - bin: - sl-log-transformer: bin/sl-log-transformer.js - checksum: 10/2fd14eb0a68893fdadefd89f964df404e3d637729c48aca015eb12d1c47455dee28b2522ad7150de23f7a57cce503656585e7644c9cd8532023ea572f8cc5a80 +"object-inspect@npm:^1.13.1": + version: 1.13.1 + resolution: "object-inspect@npm:1.13.1" + checksum: 10/92f4989ed83422d56431bc39656d4c780348eb15d397ce352ade6b7fec08f973b53744bd41b94af021901e61acaf78fcc19e65bf464ecc0df958586a672700f0 languageName: node linkType: hard -"stubs@npm:^3.0.0": - version: 3.0.0 - resolution: "stubs@npm:3.0.0" - checksum: 10/dec7b82186e3743317616235c59bfb53284acc312cb9f4c3e97e2205c67a5c158b0ca89db5927e52351582e90a2672822eeaec9db396e23e56893d2a8676e024 +"object-inspect@npm:^1.9.0": + version: 1.12.2 + resolution: "object-inspect@npm:1.12.2" + checksum: 10/aa11100d45fa919b36448347d4f7c8a78b0247886881db56a2026b512c4042a9749e64894519b00a4db8c6e2b713a965b5ceaa3b59324aeb3da007c54a33bc58 languageName: node linkType: hard -"style-loader@npm:^3.3.1": - version: 3.3.3 - resolution: "style-loader@npm:3.3.3" - peerDependencies: - webpack: ^5.0.0 - checksum: 10/6c13d5075b5a5d69602215a242ef157460766e6e8a2e48276eb5da5b9852716910b48b3f120d492bbc7cd825dfa940b35fc84e1a9ab2a8792fd8d568b6b3e87a +"object-is@npm:^1.0.1, object-is@npm:^1.1.5": + version: 1.1.5 + resolution: "object-is@npm:1.1.5" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.3" + checksum: 10/75365aff5da4bebad5d20efd9f9a7a13597e603f5eb03d89da8f578c3f3937fe01c6cb5fce86c0611c48795c0841401fd37c943821db0de703c7b30a290576ad languageName: node linkType: hard -"stylehacks@npm:^5.1.1": - version: 5.1.1 - resolution: "stylehacks@npm:5.1.1" - dependencies: - browserslist: "npm:^4.21.4" - postcss-selector-parser: "npm:^6.0.4" - peerDependencies: - postcss: ^8.2.15 - checksum: 10/bddce1f5a8ba5a129995fc5585fa59fda6c8c580a8b39631955ee03810957eea62d13c7711a61f3a4f3bc2f9a4a9e019846f73b669c4aa0b5c52cd0198824b5c +"object-keys@npm:^1.0.12, object-keys@npm:^1.1.1": + version: 1.1.1 + resolution: "object-keys@npm:1.1.1" + checksum: 10/3d81d02674115973df0b7117628ea4110d56042e5326413e4b4313f0bcdf7dd78d4a3acef2c831463fa3796a66762c49daef306f4a0ea1af44877d7086d73bde languageName: node linkType: hard -"stylis@npm:4.2.0": - version: 4.2.0 - resolution: "stylis@npm:4.2.0" - checksum: 10/58359185275ef1f39c339ae94e598168aa6bb789f6cf0d52e726c1e7087a94e9c17f0385a28d34483dec1ffc2c75670ec714dc5603d99c3124ec83bc2b0a0f42 +"object.assign@npm:^4.1.2": + version: 4.1.2 + resolution: "object.assign@npm:4.1.2" + dependencies: + call-bind: "npm:^1.0.0" + define-properties: "npm:^1.1.3" + has-symbols: "npm:^1.0.1" + object-keys: "npm:^1.1.1" + checksum: 10/83fdff0208e5ea616aa59880add9c0cd08e58532d5bb010630a4695002f467e0a08f0f53d062ae33593ecf0fff42147b019be7fb17f2153264c37f8f4b85dfaa languageName: node linkType: hard -"stylus-lookup@npm:^5.0.1": - version: 5.0.1 - resolution: "stylus-lookup@npm:5.0.1" +"object.assign@npm:^4.1.4": + version: 4.1.4 + resolution: "object.assign@npm:4.1.4" dependencies: - commander: "npm:^10.0.1" - bin: - stylus-lookup: bin/cli.js - checksum: 10/c89ae3e35f578b8a324f96aacabe1ab582741de6d527cf94b64cbcb23702e753f96d43fc519b7e9818a7cb712780fe4aae63c188d1774a3d73b5f5bc173ffc48 + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.4" + has-symbols: "npm:^1.0.3" + object-keys: "npm:^1.1.1" + checksum: 10/fd82d45289df0a952d772817622ecbaeb4ec933d3abb53267aede083ee38f6a395af8fadfbc569ee575115b0b7c9b286e7cfb2b7a2557b1055f7acbce513bc29 languageName: node linkType: hard -"sublevel-pouchdb@npm:7.3.1": - version: 7.3.1 - resolution: "sublevel-pouchdb@npm:7.3.1" +"object.assign@npm:^4.1.5": + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" dependencies: - inherits: "npm:2.0.4" - level-codec: "npm:9.0.2" - ltgt: "npm:2.2.1" - readable-stream: "npm:1.1.14" - checksum: 10/2de0b6e75615fc94f7ed8e4bbac51a4293329cca55d3d083b3ea0dc921e299cfaaae509854f850e94ef7f88487b5f7ff0c075f892362871329f1fb4ad8c37027 + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + has-symbols: "npm:^1.0.3" + object-keys: "npm:^1.1.1" + checksum: 10/dbb22da4cda82e1658349ea62b80815f587b47131b3dd7a4ab7f84190ab31d206bbd8fe7e26ae3220c55b65725ac4529825f6142154211220302aa6b1518045d languageName: node linkType: hard -"sucrase@npm:^3.32.0": - version: 3.34.0 - resolution: "sucrase@npm:3.34.0" +"object.fromentries@npm:^2.0.7": + version: 2.0.7 + resolution: "object.fromentries@npm:2.0.7" dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.2" - commander: "npm:^4.0.0" - glob: "npm:7.1.6" - lines-and-columns: "npm:^1.1.6" - mz: "npm:^2.7.0" - pirates: "npm:^4.0.1" - ts-interface-checker: "npm:^0.1.9" - bin: - sucrase: bin/sucrase - sucrase-node: bin/sucrase-node - checksum: 10/b64d154a7a7eaa4b39668c3124bd08cd505f683d36ac4fb94def6491fb3af155b24b6e41b55011e38582e7d59c440af79ffba8709f3da78aeedf2f07b6d51d84 + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + checksum: 10/1bfbe42a51f8d84e417d193fae78e4b8eebb134514cdd44406480f8e8a0e075071e0717635d8e3eccd50fec08c1d555fe505c38804cbac0808397187653edd59 languageName: node linkType: hard -"superagent@npm:^6.1.0": - version: 6.1.0 - resolution: "superagent@npm:6.1.0" +"object.groupby@npm:^1.0.1": + version: 1.0.2 + resolution: "object.groupby@npm:1.0.2" dependencies: - component-emitter: "npm:^1.3.0" - cookiejar: "npm:^2.1.2" - debug: "npm:^4.1.1" - fast-safe-stringify: "npm:^2.0.7" - form-data: "npm:^3.0.0" - formidable: "npm:^1.2.2" - methods: "npm:^1.1.2" - mime: "npm:^2.4.6" - qs: "npm:^6.9.4" - readable-stream: "npm:^3.6.0" - semver: "npm:^7.3.2" - checksum: 10/7d49a4f4d435bcf357615c182fd7bac75ef30ab9aea4eb15666fd5e5065fafcd81d65fe864eefb1b751fb96c301a6e729e668c1a9a4ddc1a3b47b8682e416941 + array.prototype.filter: "npm:^1.0.3" + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.22.3" + es-errors: "npm:^1.0.0" + checksum: 10/07c1bea1772c45f7967a63358a683ef7b0bd99cabe0563e6fee3e8acc061cc5984d2f01a46472ebf10b2cb439298c46776b2134550dce457fd7240baaaa4f592 languageName: node linkType: hard -"supertest@npm:6.1.6": - version: 6.1.6 - resolution: "supertest@npm:6.1.6" +"object.values@npm:^1.1.7": + version: 1.1.7 + resolution: "object.values@npm:1.1.7" dependencies: - methods: "npm:^1.1.2" - superagent: "npm:^6.1.0" - checksum: 10/775a17a0558a189dbe5004961ea886493db805ef30cacffb186f9bf05df506ed76d0182811cdf804fb9f75c1294b4cf18afb23a6d1d4cf02daa539d1cc2e9992 + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + checksum: 10/20ab42c0bbf984405c80e060114b18cf5d629a40a132c7eac4fb79c5d06deb97496311c19297dcf9c61f45c2539cd4c7f7c5d6230e51db360ff297bbc9910162 languageName: node linkType: hard -"supports-color@npm:8.1.1, supports-color@npm:^8.0.0, supports-color@npm:^8.1.0, supports-color@npm:^8.1.1": - version: 8.1.1 - resolution: "supports-color@npm:8.1.1" +"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" dependencies: - has-flag: "npm:^4.0.0" - checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 + wrappy: "npm:1" + checksum: 10/cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 languageName: node linkType: hard -"supports-color@npm:^2.0.0": - version: 2.0.0 - resolution: "supports-color@npm:2.0.0" - checksum: 10/d2957d19e782a806abc3e8616b6648cc1e70c3ebe94fb1c2d43160686f6d79cd7c9f22c4853bc4a362d89d1c249ab6d429788c5f6c83b3086e6d763024bf4581 +"onetime@npm:^2.0.0": + version: 2.0.1 + resolution: "onetime@npm:2.0.1" + dependencies: + mimic-fn: "npm:^1.0.0" + checksum: 10/5b4f6079e6b4973244017e157833ab5a7a3de4bd2612d69411e3ee46f61fe8bb57b7c2e243b0b23dbaa5bad7641a15f9100a5c80295ff64c0d87aab5d1576ef9 languageName: node linkType: hard -"supports-color@npm:^3.1.2": - version: 3.2.3 - resolution: "supports-color@npm:3.2.3" +"onetime@npm:^5.1.0, onetime@npm:^5.1.2": + version: 5.1.2 + resolution: "onetime@npm:5.1.2" dependencies: - has-flag: "npm:^1.0.0" - checksum: 10/476a70d263a1f7ac11c26c10dfc58f0d9439edf198005b95f0e358ea8182d06b492d96320f16a841e4e968c7189044dd8c3f3037bd533480d15c7cc00e17c5d8 + mimic-fn: "npm:^2.1.0" + checksum: 10/e9fd0695a01cf226652f0385bf16b7a24153dbbb2039f764c8ba6d2306a8506b0e4ce570de6ad99c7a6eb49520743afdb66edd95ee979c1a342554ed49a9aadd languageName: node linkType: hard -"supports-color@npm:^5.3.0, supports-color@npm:^5.5.0": - version: 5.5.0 - resolution: "supports-color@npm:5.5.0" +"onetime@npm:^6.0.0": + version: 6.0.0 + resolution: "onetime@npm:6.0.0" dependencies: - has-flag: "npm:^3.0.0" - checksum: 10/5f505c6fa3c6e05873b43af096ddeb22159831597649881aeb8572d6fe3b81e798cc10840d0c9735e0026b250368851b7f77b65e84f4e4daa820a4f69947f55b + mimic-fn: "npm:^4.0.0" + checksum: 10/0846ce78e440841335d4e9182ef69d5762e9f38aa7499b19f42ea1c4cd40f0b4446094c455c713f9adac3f4ae86f613bb5e30c99e52652764d06a89f709b3788 languageName: node linkType: hard -"supports-color@npm:^6.1.0": - version: 6.1.0 - resolution: "supports-color@npm:6.1.0" - dependencies: - has-flag: "npm:^3.0.0" - checksum: 10/78a5c43b9e478966ed41ed923a942dfd6209bf3bcc826a01435cfec98d5a17ca5d866effd2b6be438c16cd73b99f4a4397fcbb282e6f653e39046e1335334189 +"openapi-types@npm:12.1.3": + version: 12.1.3 + resolution: "openapi-types@npm:12.1.3" + checksum: 10/9d1d7ed848622b63d0a4c3f881689161b99427133054e46b8e3241e137f1c78bb0031c5d80b420ee79ac2e91d2e727ffd6fc13c553d1b0488ddc8ad389dcbef8 languageName: node linkType: hard -"supports-color@npm:^7.0.0, supports-color@npm:^7.1.0": - version: 7.2.0 - resolution: "supports-color@npm:7.2.0" - dependencies: - has-flag: "npm:^4.0.0" - checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a +"opener@npm:^1.5.1": + version: 1.5.2 + resolution: "opener@npm:1.5.2" + bin: + opener: bin/opener-bin.js + checksum: 10/0504efcd6546e14c016a261f58a68acf9f2e5c23d84865d7d5470d5169788327ceaa5386253682f533b3fba4821748aa37ecb395f3dae7acb3261b9b22e36814 languageName: node linkType: hard -"supports-hyperlinks@npm:^2.0.0": - version: 2.3.0 - resolution: "supports-hyperlinks@npm:2.3.0" +"optionator@npm:^0.9.3": + version: 0.9.3 + resolution: "optionator@npm:0.9.3" dependencies: - has-flag: "npm:^4.0.0" - supports-color: "npm:^7.0.0" - checksum: 10/3e7df6e9eaa177d7bfbbe065c91325e9b482f48de0f7c9133603e3ffa8af31cbceac104a0941cd0266a57f8e691de6eb58b79fec237852dc84ed7ad152b116b0 + "@aashutoshrathi/word-wrap": "npm:^1.2.3" + deep-is: "npm:^0.1.3" + fast-levenshtein: "npm:^2.0.6" + levn: "npm:^0.4.1" + prelude-ls: "npm:^1.2.1" + type-check: "npm:^0.4.0" + checksum: 10/fa28d3016395974f7fc087d6bbf0ac7f58ac3489f4f202a377e9c194969f329a7b88c75f8152b33fb08794a30dcd5c079db6bb465c28151357f113d80bbf67da languageName: node linkType: hard -"supports-preserve-symlinks-flag@npm:^1.0.0": - version: 1.0.0 - resolution: "supports-preserve-symlinks-flag@npm:1.0.0" - checksum: 10/a9dc19ae2220c952bd2231d08ddeecb1b0328b61e72071ff4000c8384e145cc07c1c0bdb3b5a1cb06e186a7b2790f1dee793418b332f6ddf320de25d9125be7e +"ora@npm:^5.4.1": + version: 5.4.1 + resolution: "ora@npm:5.4.1" + dependencies: + bl: "npm:^4.1.0" + chalk: "npm:^4.1.0" + cli-cursor: "npm:^3.1.0" + cli-spinners: "npm:^2.5.0" + is-interactive: "npm:^1.0.0" + is-unicode-supported: "npm:^0.1.0" + log-symbols: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + wcwidth: "npm:^1.0.1" + checksum: 10/8d071828f40090a8e1c6e8f350c6eb065808e9ab2b3e57fa37e0d5ae78cb46dac00117c8f12c3c8b8da2923454afbd8265e08c10b69881170c5b269f451e7fef languageName: node linkType: hard -"svg-parser@npm:^2.0.2": - version: 2.0.4 - resolution: "svg-parser@npm:2.0.4" - checksum: 10/ec196da6ea21481868ab26911970e35488361c39ead1c6cdd977ba16c885c21a91ddcbfd113bfb01f79a822e2a751ef85b2f7f95e2cb9245558ebce12c34af1f +"os-browserify@npm:^0.3.0": + version: 0.3.0 + resolution: "os-browserify@npm:0.3.0" + checksum: 10/16e37ba3c0e6a4c63443c7b55799ce4066d59104143cb637ecb9fce586d5da319cdca786ba1c867abbe3890d2cbf37953f2d51eea85e20dd6c4570d6c54bfebf languageName: node linkType: hard -"svg.draggable.js@npm:^2.2.2": - version: 2.2.2 - resolution: "svg.draggable.js@npm:2.2.2" - dependencies: - svg.js: "npm:^2.0.1" - checksum: 10/0200198f64a6883c88a31b8663a0bcc21bf01bdf7dfca1930dbeeeed49d4993d8ad4c3da044166205128b8835ce6d7a429e95d68fed1dce644730794beb45c23 +"os-tmpdir@npm:~1.0.2": + version: 1.0.2 + resolution: "os-tmpdir@npm:1.0.2" + checksum: 10/5666560f7b9f10182548bf7013883265be33620b1c1b4a4d405c25be2636f970c5488ff3e6c48de75b55d02bde037249fe5dbfbb4c0fb7714953d56aed062e6d languageName: node linkType: hard -"svg.easing.js@npm:^2.0.0": - version: 2.0.0 - resolution: "svg.easing.js@npm:2.0.0" +"own-or-env@npm:^1.0.2": + version: 1.0.2 + resolution: "own-or-env@npm:1.0.2" dependencies: - svg.js: "npm:>=2.3.x" - checksum: 10/06a9f0b75e8b0625b8e3dd13ff5fb9c279fa1a098fbf5d28f8f7f298d93f280d3d8afa3737bf0304f16589d1c02b1823cefdf7d4a6a8817fd07bcb46f456c97e + own-or: "npm:^1.0.0" + checksum: 10/e7e412844d1a1e12c45132f793a519b9875c25806fff4057ad76532be1837c83e4b42c2cd07e746d020c8bd9883620dc59f0488d2da575a6ac4e2da5b65e5d35 languageName: node linkType: hard -"svg.filter.js@npm:^2.0.2": - version: 2.0.2 - resolution: "svg.filter.js@npm:2.0.2" - dependencies: - svg.js: "npm:^2.2.5" - checksum: 10/7337c780f715f1292deb93b62e29926bed3deb841d2ee253fa7cb9785ecb2ba6425169949b19bca57ea30b8455d355bc2ef84c71b476e833c2e662a4554dc917 +"own-or@npm:^1.0.0": + version: 1.0.0 + resolution: "own-or@npm:1.0.0" + checksum: 10/f366faad18398dc0f22ebf3a4b24da344d44f782bd8ecffb7a24f0377412702555809f081160404340c12dbf3a3b551aefe644ae2760519e37dbb95a0618e9ed languageName: node linkType: hard -"svg.js@npm:>=2.3.x, svg.js@npm:^2.0.1, svg.js@npm:^2.2.5, svg.js@npm:^2.4.0, svg.js@npm:^2.6.5": - version: 2.7.1 - resolution: "svg.js@npm:2.7.1" - checksum: 10/28333c819aa461d20358d8cf43db6a92fd41389f0a6c5a2563d398865f541a88d9cb118d5e276c513bc307aea8aeb893725a198ec9447ca19ccf898d5c4126cd +"p-cancelable@npm:^1.0.0": + version: 1.1.0 + resolution: "p-cancelable@npm:1.1.0" + checksum: 10/2db3814fef6d9025787f30afaee4496a8857a28be3c5706432cbad76c688a6db1874308f48e364a42f5317f5e41e8e7b4f2ff5c8ff2256dbb6264bc361704ece languageName: node linkType: hard -"svg.pathmorphing.js@npm:^0.1.3": - version: 0.1.3 - resolution: "svg.pathmorphing.js@npm:0.1.3" - dependencies: - svg.js: "npm:^2.4.0" - checksum: 10/a958c3e2a4a1e845da443dd72b890feed5cc6a1d0a5bfcd16b5be610292b7a9c2ab8453689b416e2a8f2abe0f65e987eb981c6d2428b892b67f511d776ccc1bb +"p-cancelable@npm:^3.0.0": + version: 3.0.0 + resolution: "p-cancelable@npm:3.0.0" + checksum: 10/a5eab7cf5ac5de83222a014eccdbfde65ecfb22005ee9bc242041f0b4441e07fac7629432c82f48868aa0f8413fe0df6c6067c16f76bf9217cd8dc651923c93d languageName: node linkType: hard -"svg.resize.js@npm:^1.4.3": - version: 1.4.3 - resolution: "svg.resize.js@npm:1.4.3" +"p-event@npm:^4.1.0": + version: 4.2.0 + resolution: "p-event@npm:4.2.0" dependencies: - svg.js: "npm:^2.6.5" - svg.select.js: "npm:^2.1.2" - checksum: 10/78c6973695a185fb2e3efa582f8b6a5c8c01e8a0c04a0126d0141f4eecb260c5d471cb15353b1afa8e811dee2a05f0637a75897c9c5e350c8fac7baf86f45a8e + p-timeout: "npm:^3.1.0" + checksum: 10/d03238ff31f5694f11bd7dcc0eae16c35b1ffb8cad4e5263d5422ba0bd6736dbfdb33b72745ecb6b06b98494db80f49f12c14f5e8da1212bf6a424609ad8d885 languageName: node linkType: hard -"svg.select.js@npm:^2.1.2": - version: 2.1.2 - resolution: "svg.select.js@npm:2.1.2" +"p-filter@npm:^3.0.0": + version: 3.0.0 + resolution: "p-filter@npm:3.0.0" dependencies: - svg.js: "npm:^2.2.5" - checksum: 10/65e9b0e605fae5aaa29e5972577f4cf0e5ffc5de54d26c6e1a3c17be7fbcdc2b6faba1874735491f1c8d1caf9a50ca404422782c292080ea5eb0165af48a9ccb + p-map: "npm:^5.1.0" + checksum: 10/aacc36820f0531c01963334edc6debf5038b47c83a1c2255b7c14f6964a9a5fc1887ce0b93e72d137727403253bcc9bb26eed9bb79896ece1fa9f52d979bb97b languageName: node linkType: hard -"svg.select.js@npm:^3.0.1": - version: 3.0.1 - resolution: "svg.select.js@npm:3.0.1" - dependencies: - svg.js: "npm:^2.6.5" - checksum: 10/357e759ffb405b7ac97f50d161f1bfeb8fb145288fe0b34fc32a0347538b74cf92ef0c2cff8fe4a2acfccbd8ff10ec5ba852071400559623629ce97b56e4c8e9 +"p-finally@npm:^1.0.0": + version: 1.0.0 + resolution: "p-finally@npm:1.0.0" + checksum: 10/93a654c53dc805dd5b5891bab16eb0ea46db8f66c4bfd99336ae929323b1af2b70a8b0654f8f1eae924b2b73d037031366d645f1fd18b3d30cbd15950cc4b1d4 languageName: node linkType: hard -"svgo@npm:^1.2.2": - version: 1.3.2 - resolution: "svgo@npm:1.3.2" +"p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" dependencies: - chalk: "npm:^2.4.1" - coa: "npm:^2.0.2" - css-select: "npm:^2.0.0" - css-select-base-adapter: "npm:^0.1.1" - css-tree: "npm:1.0.0-alpha.37" - csso: "npm:^4.0.2" - js-yaml: "npm:^3.13.1" - mkdirp: "npm:~0.5.1" - object.values: "npm:^1.1.0" - sax: "npm:~1.2.4" - stable: "npm:^0.1.8" - unquote: "npm:~1.1.1" - util.promisify: "npm:~1.0.0" - bin: - svgo: ./bin/svgo - checksum: 10/c3679f0c68812c2823bcab66b46e76c8b52b37ff554f879b7ec5ebb8a91e450e9f0ebefbf8ac00962081c8ad99a1c490a0e258b10b9d42dc5054de18af19f02e + p-try: "npm:^2.0.0" + checksum: 10/84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 languageName: node linkType: hard -"svgo@npm:^2.7.0": - version: 2.8.0 - resolution: "svgo@npm:2.8.0" +"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" dependencies: - "@trysound/sax": "npm:0.2.0" - commander: "npm:^7.2.0" - css-select: "npm:^4.1.3" - css-tree: "npm:^1.1.3" - csso: "npm:^4.2.0" - picocolors: "npm:^1.0.0" - stable: "npm:^0.1.8" - bin: - svgo: bin/svgo - checksum: 10/2b74544da1a9521852fe2784252d6083b336e32528d0e424ee54d1613f17312edc7020c29fa399086560e96cba42ede4a2205328a08edeefa26de84cd769a64a + yocto-queue: "npm:^0.1.0" + checksum: 10/7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 languageName: node linkType: hard -"swap-case@npm:^1.1.0": - version: 1.1.2 - resolution: "swap-case@npm:1.1.2" +"p-limit@npm:^4.0.0": + version: 4.0.0 + resolution: "p-limit@npm:4.0.0" dependencies: - lower-case: "npm:^1.1.1" - upper-case: "npm:^1.1.1" - checksum: 10/37b0c4988e12520fba54018f7fe259d62902e97349366209d2af9b1d5e741692c8f17da9d5e780c7bd1a56864bbb51d53eaf1a101a11afdfcae157912a3691d8 + yocto-queue: "npm:^1.0.0" + checksum: 10/01d9d70695187788f984226e16c903475ec6a947ee7b21948d6f597bed788e3112cc7ec2e171c1d37125057a5f45f3da21d8653e04a3a793589e12e9e80e756b languageName: node linkType: hard -"swarm-js@npm:^0.1.40": - version: 0.1.40 - resolution: "swarm-js@npm:0.1.40" +"p-limit@npm:^6.0.0": + version: 6.0.0 + resolution: "p-limit@npm:6.0.0" dependencies: - bluebird: "npm:^3.5.0" - buffer: "npm:^5.0.5" - eth-lib: "npm:^0.1.26" - fs-extra: "npm:^4.0.2" - got: "npm:^7.1.0" - mime-types: "npm:^2.1.16" - mkdirp-promise: "npm:^5.0.1" - mock-fs: "npm:^4.1.0" - setimmediate: "npm:^1.0.5" - tar: "npm:^4.0.2" - xhr-request: "npm:^1.0.1" - checksum: 10/c7e8cea8eb266411cb3f4324c6a07a60b7cdb6cab86ac2dae34c2e69a161e7aa9b2e4e61b4005b5f8d277abb9c519e69072cb388a024a7fa32313197c06cbd4a - languageName: node - linkType: hard - -"symbol-observable@npm:4.0.0": - version: 4.0.0 - resolution: "symbol-observable@npm:4.0.0" - checksum: 10/983aef3912ad080fc834b9ad115d44bc2994074c57cea4fb008e9f7ab9bb4118b908c63d9edc861f51257bc0595025510bdf7263bb09d8953a6929f240165c24 + yocto-queue: "npm:^1.1.1" + checksum: 10/395b82eb776dbfdfba8171ae1d60f94a0ee19cd682182a152f915c60f674d0519688dffe9b7a3f6fa8ba0b6ec7c6b115c6f64a5d6ad5ddfd250362629d77c450 languageName: node linkType: hard -"symbol-observable@npm:^1.0.3": - version: 1.2.0 - resolution: "symbol-observable@npm:1.2.0" - checksum: 10/4684327a2fef2453dcd4238b5bd8f69c460a4708fb8c024a824c6a707ca644b2b2a586e36e5197d0d1162ff48e288299a48844a8c46274ffcfd9260e03df7692 +"p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: "npm:^2.2.0" + checksum: 10/513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 languageName: node linkType: hard -"symbol-tree@npm:^3.2.4": - version: 3.2.4 - resolution: "symbol-tree@npm:3.2.4" - checksum: 10/c09a00aadf279d47d0c5c46ca3b6b2fbaeb45f0a184976d599637d412d3a70bbdc043ff33effe1206dea0e36e0ad226cb957112e7ce9a4bf2daedf7fa4f85c53 +"p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: "npm:^3.0.2" + checksum: 10/1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 languageName: node linkType: hard -"synckit@npm:^0.8.6": - version: 0.8.8 - resolution: "synckit@npm:0.8.8" +"p-locate@npm:^6.0.0": + version: 6.0.0 + resolution: "p-locate@npm:6.0.0" dependencies: - "@pkgr/core": "npm:^0.1.0" - tslib: "npm:^2.6.2" - checksum: 10/2864a5c3e689ad5b991bebbd8a583c5682c4fa08a4f39986b510b6b5d160c08fc3672444069f8f96ed6a9d12772879c674c1f61e728573eadfa90af40a765b74 + p-limit: "npm:^4.0.0" + checksum: 10/2bfe5234efa5e7a4e74b30a5479a193fdd9236f8f6b4d2f3f69e3d286d9a7d7ab0c118a2a50142efcf4e41625def635bd9332d6cbf9cc65d85eb0718c579ab38 languageName: node linkType: hard -"table@npm:4.0.2": - version: 4.0.2 - resolution: "table@npm:4.0.2" +"p-map@npm:^3.0.0": + version: 3.0.0 + resolution: "p-map@npm:3.0.0" dependencies: - ajv: "npm:^5.2.3" - ajv-keywords: "npm:^2.1.0" - chalk: "npm:^2.1.0" - lodash: "npm:^4.17.4" - slice-ansi: "npm:1.0.0" - string-width: "npm:^2.1.1" - checksum: 10/5e6a874513409235300571cdcdb3da653e7a4e9da2fc882adc02cdb2e39d0f5f14f9b98293d34dae1beeeb72296b9b8304c61d347d713705a6ba9375bb40f55f + aggregate-error: "npm:^3.0.0" + checksum: 10/d4a0664d2af05d7e5f6f342e6493d4cad48f7398ac803c5066afb1f8d2010bfc2a83d935689437288f7b1a743772085b8fa0909a8282b5df4210bcda496c37c8 languageName: node linkType: hard -"table@npm:^3.7.8": - version: 3.8.3 - resolution: "table@npm:3.8.3" +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" dependencies: - ajv: "npm:^4.7.0" - ajv-keywords: "npm:^1.0.0" - chalk: "npm:^1.1.1" - lodash: "npm:^4.0.0" - slice-ansi: "npm:0.0.4" - string-width: "npm:^2.0.0" - checksum: 10/2909eedc40712da7373b47b3fc18896c0ed21fbc1379c25c9d5f1fbef2184b3a7ba7d840a7359e1ce2b63ae32b971f6d006b81a3a04ee3eb05340a5a4f402e5c + aggregate-error: "npm:^3.0.0" + checksum: 10/7ba4a2b1e24c05e1fc14bbaea0fc6d85cf005ae7e9c9425d4575550f37e2e584b1af97bcde78eacd7559208f20995988d52881334db16cf77bc1bcf68e48ed7c languageName: node linkType: hard -"tablemark@npm:^3.0.0": - version: 3.0.0 - resolution: "tablemark@npm:3.0.0" +"p-map@npm:^5.1.0, p-map@npm:^5.3.0": + version: 5.3.0 + resolution: "p-map@npm:5.3.0" dependencies: - sentence-case: "npm:^3.0.4" - split-text-to-chunks: "npm:^1.0.0" - checksum: 10/1e819d7e1ad268743543778b5a1aec559113bf91098e220997fddccd207fd779d8ab216ff86d2180bb780841a23ef3f84f59bbc493d41cd5badff1246a04a8de + aggregate-error: "npm:^4.0.0" + checksum: 10/8d1e782e89057f8b058352f00b10641f966ba1ae1119789e37229bf910ce5dd7b78079e38c60e42a45f9bd24b8a894736646f0f35105bac2462a2e0cd53a73e4 languageName: node linkType: hard -"tailwindcss@npm:^3.0.2": - version: 3.3.3 - resolution: "tailwindcss@npm:3.3.3" +"p-map@npm:^5.5.0": + version: 5.5.0 + resolution: "p-map@npm:5.5.0" dependencies: - "@alloc/quick-lru": "npm:^5.2.0" - arg: "npm:^5.0.2" - chokidar: "npm:^3.5.3" - didyoumean: "npm:^1.2.2" - dlv: "npm:^1.1.3" - fast-glob: "npm:^3.2.12" - glob-parent: "npm:^6.0.2" - is-glob: "npm:^4.0.3" - jiti: "npm:^1.18.2" - lilconfig: "npm:^2.1.0" - micromatch: "npm:^4.0.5" - normalize-path: "npm:^3.0.0" - object-hash: "npm:^3.0.0" - picocolors: "npm:^1.0.0" - postcss: "npm:^8.4.23" - postcss-import: "npm:^15.1.0" - postcss-js: "npm:^4.0.1" - postcss-load-config: "npm:^4.0.1" - postcss-nested: "npm:^6.0.1" - postcss-selector-parser: "npm:^6.0.11" - resolve: "npm:^1.22.2" - sucrase: "npm:^3.32.0" - bin: - tailwind: lib/cli.js - tailwindcss: lib/cli.js - checksum: 10/bc47f40cc33aca95fb9d523ecef0a450241e51d2259c354ac283c6a06c4dcd7edd1ffbd6f065fc496390ff3ab4dd8349c968b10cce7e11e0bde101705fa0f4f1 + aggregate-error: "npm:^4.0.0" + checksum: 10/089a709d2525208a965b7907cc8e58af950542629b538198fc142c40e7f36b3b492dd6a46a1279515ccab58bb6f047e04593c0ab5ef4539d312adf7f761edf55 languageName: node linkType: hard -"tap-mocha-reporter@npm:^5.0.3": - version: 5.0.3 - resolution: "tap-mocha-reporter@npm:5.0.3" - dependencies: - color-support: "npm:^1.1.0" - debug: "npm:^4.1.1" - diff: "npm:^4.0.1" - escape-string-regexp: "npm:^2.0.0" - glob: "npm:^7.0.5" - tap-parser: "npm:^11.0.0" - tap-yaml: "npm:^1.0.0" - unicode-length: "npm:^2.0.2" - bin: - tap-mocha-reporter: index.js - checksum: 10/3635e40e1ebd36ab6893f72d7914107bfc372b6da5a2827051e7762df8941ca33a6995416c5d9dca829d14153dca98424c2272de932af9ca5e813d402c863643 +"p-map@npm:^7.0.2": + version: 7.0.2 + resolution: "p-map@npm:7.0.2" + checksum: 10/b4a590038b991c17b9c1484aa8c24cb9d3aa8a6167d02b9f9459c9200c7d392202a860c95b6dcd190d51f5f083ed256b32f9cb5976785022b0111bab853ec58b languageName: node linkType: hard -"tap-parser@npm:^11.0.0, tap-parser@npm:^11.0.2": - version: 11.0.2 - resolution: "tap-parser@npm:11.0.2" - dependencies: - events-to-array: "npm:^1.0.1" - minipass: "npm:^3.1.6" - tap-yaml: "npm:^1.0.0" - bin: - tap-parser: bin/cmd.js - checksum: 10/30a5e7c9075ddbaf4d02bb66f5d3aff97fb334a9b4b956a52932610475aef7587b63cb4321ffc986b6df984bb7ba707a6b9d6df1f76c20b1e7c859e72551d191 +"p-pipe@npm:^4.0.0": + version: 4.0.0 + resolution: "p-pipe@npm:4.0.0" + checksum: 10/d2638c08e15e049e37835f3d999f0063ecd063ccac45a90925701c604f342ca376c8373ecf945e322f5112cc630644ef99ec55084e4eeb70c90cff9237b89296 languageName: node linkType: hard -"tap-yaml@npm:^1.0.0": - version: 1.0.0 - resolution: "tap-yaml@npm:1.0.0" +"p-queue@npm:^8.0.1": + version: 8.0.1 + resolution: "p-queue@npm:8.0.1" dependencies: - yaml: "npm:^1.5.0" - checksum: 10/052263ae0d957b049ac4c1acfe44b48ad988dbae7c3e84ae7095329edeb4437cadf8fc53c5b7c44b28881866edc76858e8f2100443bf8af2583c480d2310e533 + eventemitter3: "npm:^5.0.1" + p-timeout: "npm:^6.1.2" + checksum: 10/8dcf8fbb8339675eba7d369f6eebac9e249e2412280ad73938403b83a28a2627a2072c732890d22ef98837cef89ff09eecd839cbac358cdc532d00ef4f736d0d languageName: node linkType: hard -"tap-yaml@npm:^1.0.2": - version: 1.0.2 - resolution: "tap-yaml@npm:1.0.2" - dependencies: - yaml: "npm:^1.10.2" - checksum: 10/9f0525377150487a0fe1a13dbd3f89de31bb14934eecb5fd3b1099fd384a5989eb73577fc27a58b02d0622d4ac453b878eed244b88194ba344efc495ae262bb3 +"p-reduce@npm:^3.0.0": + version: 3.0.0 + resolution: "p-reduce@npm:3.0.0" + checksum: 10/387de355e906c07159d5e6270f3b58b7c7c7349ec7294ba0a9cff2a2e2faa8c602b841b079367685d3fa166a3ee529db7aaa73fadc936987c35e90f0ba64d955 languageName: node linkType: hard -"tap@npm:16.3.8": - version: 16.3.8 - resolution: "tap@npm:16.3.8" +"p-timeout@npm:^3.1.0": + version: 3.2.0 + resolution: "p-timeout@npm:3.2.0" dependencies: - "@isaacs/import-jsx": "npm:^4.0.1" - "@types/react": "npm:^17.0.52" - chokidar: "npm:^3.3.0" - findit: "npm:^2.0.0" - foreground-child: "npm:^2.0.0" - fs-exists-cached: "npm:^1.0.0" - glob: "npm:^7.2.3" - ink: "npm:^3.2.0" - isexe: "npm:^2.0.0" - istanbul-lib-processinfo: "npm:^2.0.3" - jackspeak: "npm:^1.4.2" - libtap: "npm:^1.4.0" - minipass: "npm:^3.3.4" - mkdirp: "npm:^1.0.4" - nyc: "npm:^15.1.0" - opener: "npm:^1.5.1" - react: "npm:^17.0.2" - rimraf: "npm:^3.0.0" - signal-exit: "npm:^3.0.6" - source-map-support: "npm:^0.5.16" - tap-mocha-reporter: "npm:^5.0.3" - tap-parser: "npm:^11.0.2" - tap-yaml: "npm:^1.0.2" - tcompare: "npm:^5.0.7" - treport: "npm:^3.0.4" - which: "npm:^2.0.2" - peerDependencies: - coveralls: ^3.1.1 - flow-remove-types: ">=2.112.0" - ts-node: ">=8.5.2" - typescript: ">=3.7.2" - peerDependenciesMeta: - coveralls: - optional: true - flow-remove-types: - optional: true - ts-node: - optional: true - typescript: - optional: true - bin: - tap: bin/run.js - checksum: 10/5a33920fdf09481b1530e1e44cf512c37157d18199de8ed0ea45c8daa5d0a7bac05240ba4d4f8beaf3d48239334d405778c4afea377568ddd8c2fa2f4c66104c + p-finally: "npm:^1.0.0" + checksum: 10/3dd0eaa048780a6f23e5855df3dd45c7beacff1f820476c1d0d1bcd6648e3298752ba2c877aa1c92f6453c7dd23faaf13d9f5149fc14c0598a142e2c5e8d649c languageName: node linkType: hard -"tapable@npm:^1.0.0": - version: 1.1.3 - resolution: "tapable@npm:1.1.3" - checksum: 10/1cec71f00f9a6cb1d88961b5d4f2dead4e185508b18b1bf1e688c8135039a391dd3e12b0887232b682ef28f1ef6f0c5e9a48794f6f5ef68f35d05de7e7a0a578 +"p-timeout@npm:^6.1.2": + version: 6.1.2 + resolution: "p-timeout@npm:6.1.2" + checksum: 10/ca3ede368d792bd86fcfa4e133220536382225d31e5f62e2cedb8280df267b25f6684aa0056b22e8aa538cc85014b310058d8fdddeb0a1ff363093d56e87ac3a languageName: node linkType: hard -"tapable@npm:^2.0.0, tapable@npm:^2.1.1, tapable@npm:^2.2.0, tapable@npm:^2.2.1": - version: 2.2.1 - resolution: "tapable@npm:2.2.1" - checksum: 10/1769336dd21481ae6347611ca5fca47add0962fd8e80466515032125eca0084a4f0ede11e65341b9c0018ef4e1cf1ad820adbb0fba7cc99865c6005734000b0a +"p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: 10/f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae languageName: node linkType: hard -"tape-promise@npm:4.0.0": +"package-hash@npm:^4.0.0": version: 4.0.0 - resolution: "tape-promise@npm:4.0.0" + resolution: "package-hash@npm:4.0.0" dependencies: - is-promise: "npm:^2.1.0" - onetime: "npm:^2.0.0" - checksum: 10/0fb8b0f679e7625e61d39e6817882edf4ff6cceabdd73cca4348f5c7043bb02a5bb5da45df78ebffedd2be3af68801308d2549556d2aefe9934cceb773fbf9ef + graceful-fs: "npm:^4.1.15" + hasha: "npm:^5.0.0" + lodash.flattendeep: "npm:^4.4.0" + release-zalgo: "npm:^1.0.0" + checksum: 10/c7209d98ac31926e0c1753d014f8b6b924e1e6a1aacf833dc99edece9c8381424c41c97c26c7eee82026944a79e99023cde5998bf515d7465c87005d52152040 languageName: node linkType: hard -"tape@npm:5.6.6": - version: 5.6.6 - resolution: "tape@npm:5.6.6" - dependencies: - "@ljharb/resumer": "npm:^0.0.1" - "@ljharb/through": "npm:^2.3.9" - array.prototype.every: "npm:^1.1.4" - call-bind: "npm:^1.0.2" - deep-equal: "npm:^2.2.2" - defined: "npm:^1.0.1" - dotignore: "npm:^0.1.2" - for-each: "npm:^0.3.3" - get-package-type: "npm:^0.1.0" - glob: "npm:^7.2.3" - has: "npm:^1.0.3" - has-dynamic-import: "npm:^2.0.1" - inherits: "npm:^2.0.4" - is-regex: "npm:^1.1.4" - minimist: "npm:^1.2.8" - object-inspect: "npm:^1.12.3" - object-is: "npm:^1.1.5" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - resolve: "npm:^2.0.0-next.4" - string.prototype.trim: "npm:^1.2.7" - bin: - tape: bin/tape - checksum: 10/d12f26c4cac68f1e8a97688d6b47e2d7773d0811049cc2ce254545fd585c8dfccb61e7f715b0b1a6567dce86628f97fba5adf53d83bb6b41c10cd1cfa1f6092c +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10/ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea languageName: node linkType: hard -"tar-fs@npm:^2.0.0, tar-fs@npm:^2.1.1": - version: 2.1.1 - resolution: "tar-fs@npm:2.1.1" +"package-json@npm:^6.3.0": + version: 6.5.0 + resolution: "package-json@npm:6.5.0" dependencies: - chownr: "npm:^1.1.1" - mkdirp-classic: "npm:^0.5.2" - pump: "npm:^3.0.0" - tar-stream: "npm:^2.1.4" - checksum: 10/526deae025453e825f87650808969662fbb12eb0461d033e9b447de60ec951c6c4607d0afe7ce057defe9d4e45cf80399dd74bc15f9d9e0773d5e990a78ce4ac + got: "npm:^9.6.0" + registry-auth-token: "npm:^4.0.0" + registry-url: "npm:^5.0.0" + semver: "npm:^6.2.0" + checksum: 10/adb8e49f352ea0d71a4d351732c3870d57f21e6f3921d69a83dd9ef04b45cdb0a035495826fbe9fb2cb9a7e521484404b7d527c181133867b126588efa1996c6 languageName: node linkType: hard -"tar-fs@npm:~2.0.1": - version: 2.0.1 - resolution: "tar-fs@npm:2.0.1" +"pacote@npm:^18.0.0, pacote@npm:^18.0.6": + version: 18.0.6 + resolution: "pacote@npm:18.0.6" dependencies: - chownr: "npm:^1.1.1" - mkdirp-classic: "npm:^0.5.2" - pump: "npm:^3.0.0" - tar-stream: "npm:^2.0.0" - checksum: 10/85ceac6fce0e9175b5b67c0eca8864b7d29a940cae8b7657c60b66e8a252319d701c3df12814162a6839e6120f9e1975757293bdeaf294ad5b15721d236c4d32 + "@npmcli/git": "npm:^5.0.0" + "@npmcli/installed-package-contents": "npm:^2.0.1" + "@npmcli/package-json": "npm:^5.1.0" + "@npmcli/promise-spawn": "npm:^7.0.0" + "@npmcli/run-script": "npm:^8.0.0" + cacache: "npm:^18.0.0" + fs-minipass: "npm:^3.0.0" + minipass: "npm:^7.0.2" + npm-package-arg: "npm:^11.0.0" + npm-packlist: "npm:^8.0.0" + npm-pick-manifest: "npm:^9.0.0" + npm-registry-fetch: "npm:^17.0.0" + proc-log: "npm:^4.0.0" + promise-retry: "npm:^2.0.1" + sigstore: "npm:^2.2.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + bin: + pacote: bin/index.js + checksum: 10/48cbcb3c20792952d431c995c2965340d3501e1795313d7225149435c883fb071d6a9bfbe11b1021dc888319f27a8c865cb70656f6472d7443545eb347447553 languageName: node linkType: hard -"tar-stream@npm:2.2.0, tar-stream@npm:^2.0.0, tar-stream@npm:^2.1.4": - version: 2.2.0 - resolution: "tar-stream@npm:2.2.0" - dependencies: - bl: "npm:^4.0.3" - end-of-stream: "npm:^1.4.1" - fs-constants: "npm:^1.0.0" - inherits: "npm:^2.0.3" - readable-stream: "npm:^3.1.1" - checksum: 10/1a52a51d240c118cbcd30f7368ea5e5baef1eac3e6b793fb1a41e6cd7319296c79c0264ccc5859f5294aa80f8f00b9239d519e627b9aade80038de6f966fec6a +"pako@npm:~1.0.5": + version: 1.0.11 + resolution: "pako@npm:1.0.11" + checksum: 10/1ad07210e894472685564c4d39a08717e84c2a68a70d3c1d9e657d32394ef1670e22972a433cbfe48976cb98b154ba06855dcd3fcfba77f60f1777634bec48c0 languageName: node linkType: hard -"tar-stream@npm:^1.5.2": - version: 1.6.2 - resolution: "tar-stream@npm:1.6.2" +"parent-module@npm:^1.0.0": + version: 1.0.1 + resolution: "parent-module@npm:1.0.1" dependencies: - bl: "npm:^1.0.0" - buffer-alloc: "npm:^1.2.0" - end-of-stream: "npm:^1.0.0" - fs-constants: "npm:^1.0.0" - readable-stream: "npm:^2.3.0" - to-buffer: "npm:^1.1.1" - xtend: "npm:^4.0.0" - checksum: 10/ac9b850bd40e6d4b251abcf92613bafd9fc9e592c220c781ebcdbb0ba76da22a245d9ea3ea638ad7168910e7e1ae5079333866cd679d2f1ffadb99c403f99d7f + callsites: "npm:^3.0.0" + checksum: 10/6ba8b255145cae9470cf5551eb74be2d22281587af787a2626683a6c20fbb464978784661478dd2a3f1dad74d1e802d403e1b03c1a31fab310259eec8ac560ff languageName: node linkType: hard -"tar@npm:^4.0.2": - version: 4.4.19 - resolution: "tar@npm:4.4.19" +"parent-module@npm:^2.0.0": + version: 2.0.0 + resolution: "parent-module@npm:2.0.0" dependencies: - chownr: "npm:^1.1.4" - fs-minipass: "npm:^1.2.7" - minipass: "npm:^2.9.0" - minizlib: "npm:^1.3.3" - mkdirp: "npm:^0.5.5" - safe-buffer: "npm:^5.2.1" - yallist: "npm:^3.1.1" - checksum: 10/2715b5964578424ba5164632905a85e5a98c8dffeba657860aafa3a771b2602e6fd2a350bca891d78b8bda8cab5c53134c683ed2269b9925533477a24722e73b + callsites: "npm:^3.1.0" + checksum: 10/f131f13d687a938556a01033561fb1b274b39921eb4425c7a691f0d91dcfbe9b19759c2b8d425a3ee7c8a46874e57fa418a690643880c3c7c56827aba12f78dd languageName: node linkType: hard -"tar@npm:^6.0.2, tar@npm:^6.1.11, tar@npm:^6.1.2": - version: 6.1.11 - resolution: "tar@npm:6.1.11" +"parse-asn1@npm:^5.0.0": + version: 5.1.6 + resolution: "parse-asn1@npm:5.1.6" dependencies: - chownr: "npm:^2.0.0" - fs-minipass: "npm:^2.0.0" - minipass: "npm:^3.0.0" - minizlib: "npm:^2.1.1" - mkdirp: "npm:^1.0.3" - yallist: "npm:^4.0.0" - checksum: 10/0e6789e66475922b8e0d1ee648cb26e0ede9a0635284269ca71b2d8acd507bc59ad5557032f0192f8ff22680b50cb66792b56f0240f484fe0d7d8cef81c1b959 + asn1.js: "npm:^5.2.0" + browserify-aes: "npm:^1.0.0" + evp_bytestokey: "npm:^1.0.0" + pbkdf2: "npm:^3.0.3" + safe-buffer: "npm:^5.1.1" + checksum: 10/4e9ec3bd59df66fcb9d272c801e7dbafd2511dc5a559bcd346b9e228f72e47a6d4d081e8c71340a107bca3a8049975c08cd9270c2de122098e3174122ec39228 languageName: node linkType: hard -"tar@npm:^6.2.1": - version: 6.2.1 - resolution: "tar@npm:6.2.1" +"parse-asn1@npm:^5.1.7": + version: 5.1.7 + resolution: "parse-asn1@npm:5.1.7" dependencies: - chownr: "npm:^2.0.0" - fs-minipass: "npm:^2.0.0" - minipass: "npm:^5.0.0" - minizlib: "npm:^2.1.1" - mkdirp: "npm:^1.0.3" - yallist: "npm:^4.0.0" - checksum: 10/bfbfbb2861888077fc1130b84029cdc2721efb93d1d1fb80f22a7ac3a98ec6f8972f29e564103bbebf5e97be67ebc356d37fa48dbc4960600a1eb7230fbd1ea0 - languageName: node - linkType: hard - -"tarn@npm:^3.0.2": - version: 3.0.2 - resolution: "tarn@npm:3.0.2" - checksum: 10/7476ca83a39e0e4b1d951725b6c42071f16fdd65c456936c305500af00731861de0a20e41e59b54cf410b979722816db43acd137a5a580c3c8e48a73f389b523 + asn1.js: "npm:^4.10.1" + browserify-aes: "npm:^1.2.0" + evp_bytestokey: "npm:^1.0.3" + hash-base: "npm:~3.0" + pbkdf2: "npm:^3.1.2" + safe-buffer: "npm:^5.2.1" + checksum: 10/f82c079f4d9a4d33159c7682f9c516680f4d659fde8060697a6b3c1be4795976e826d53a1e5751a81ddc800e9c6d6fa4629b59f6d1f3241ac8447a00c89a67d3 languageName: node linkType: hard -"tcompare@npm:^5.0.6, tcompare@npm:^5.0.7": - version: 5.0.7 - resolution: "tcompare@npm:5.0.7" +"parse-conflict-json@npm:^3.0.0": + version: 3.0.1 + resolution: "parse-conflict-json@npm:3.0.1" dependencies: - diff: "npm:^4.0.2" - checksum: 10/4fa1257216dddd2e950f9b674c663f9a73e070a4bab733ee160d4e2605be140179e751cb17bb97e05e1e79f9811aab2de9a0ec317f4ba8eea6ffd34ef04e3bec + json-parse-even-better-errors: "npm:^3.0.0" + just-diff: "npm:^6.0.0" + just-diff-apply: "npm:^5.2.0" + checksum: 10/ceb13ca90bd75610559125dc7b519e2806c096640142d6524e9b1ffdf08d6625b03a29d8afe4630d95460f703b9d5bc6dac21fcdcb00089213ffdb70800c900b languageName: node linkType: hard -"tdigest@npm:^0.1.1": - version: 0.1.1 - resolution: "tdigest@npm:0.1.1" +"parse-json@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-json@npm:4.0.0" dependencies: - bintrees: "npm:1.0.1" - checksum: 10/0d42dad78444ff25d391db424ff756a67090d1b9e550cb9f55a7a6aeb1905e115c0c439ca158eb9781b462954f9688f59f49a4bb141d0b1b62aacde94579cbb0 + error-ex: "npm:^1.3.1" + json-parse-better-errors: "npm:^1.0.1" + checksum: 10/0fe227d410a61090c247e34fa210552b834613c006c2c64d9a05cfe9e89cf8b4246d1246b1a99524b53b313e9ac024438d0680f67e33eaed7e6f38db64cfe7b5 languageName: node linkType: hard -"teeny-request@npm:^9.0.0": - version: 9.0.0 - resolution: "teeny-request@npm:9.0.0" +"parse-json@npm:^5.0.0, parse-json@npm:^5.2.0": + version: 5.2.0 + resolution: "parse-json@npm:5.2.0" dependencies: - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.0" - node-fetch: "npm:^2.6.9" - stream-events: "npm:^1.0.5" - uuid: "npm:^9.0.0" - checksum: 10/44daabb6c2e239c3daed0218ebdafb50c7141c16d7257a6cfef786dbff56d7853c2c02c97934f7ed57818ce5861ac16c5f52f3a16fa292bd4caf53483d386443 - languageName: node - linkType: hard - -"temp-dir@npm:^2.0.0": - version: 2.0.0 - resolution: "temp-dir@npm:2.0.0" - checksum: 10/cc4f0404bf8d6ae1a166e0e64f3f409b423f4d1274d8c02814a59a5529f07db6cd070a749664141b992b2c1af337fa9bb451a460a43bb9bcddc49f235d3115aa + "@babel/code-frame": "npm:^7.0.0" + error-ex: "npm:^1.3.1" + json-parse-even-better-errors: "npm:^2.3.0" + lines-and-columns: "npm:^1.1.6" + checksum: 10/62085b17d64da57f40f6afc2ac1f4d95def18c4323577e1eced571db75d9ab59b297d1d10582920f84b15985cbfc6b6d450ccbf317644cfa176f3ed982ad87e2 languageName: node linkType: hard -"temp-dir@npm:^3.0.0": - version: 3.0.0 - resolution: "temp-dir@npm:3.0.0" - checksum: 10/577211e995d1d584dd60f1469351d45e8a5b4524e4a9e42d3bdd12cfde1d0bb8f5898311bef24e02aaafb69514c1feb58c7b4c33dcec7129da3b0861a4ca935b +"parse-json@npm:^7.0.0": + version: 7.1.0 + resolution: "parse-json@npm:7.1.0" + dependencies: + "@babel/code-frame": "npm:^7.21.4" + error-ex: "npm:^1.3.2" + json-parse-even-better-errors: "npm:^3.0.0" + lines-and-columns: "npm:^2.0.3" + type-fest: "npm:^3.8.0" + checksum: 10/bf9bc646e8b8cb9ae638988a303bf09866c13d2829c2ff75ee87c27631dac06d0d6e81913f8824c3c4586015bf3f0a6fee1dece168b37932d175ef0709e8860a languageName: node linkType: hard -"temp@npm:0.9.1": - version: 0.9.1 - resolution: "temp@npm:0.9.1" +"parse-json@npm:^8.0.0": + version: 8.1.0 + resolution: "parse-json@npm:8.1.0" dependencies: - rimraf: "npm:~2.6.2" - checksum: 10/6ab5eef8a4260aa809705c6dbe99e9a132cdffe01fb97ab736258d4a2b714d0e6e8218b72a03ca77fc562b94886c36c4104d9fbd2adfabba4721f2d91efed473 + "@babel/code-frame": "npm:^7.22.13" + index-to-position: "npm:^0.1.2" + type-fest: "npm:^4.7.1" + checksum: 10/efc4256c91e835b1340e2b4f535272247f174fcba85eead15ff938be23b3ca2d521a04c76e564d1dc2f61c0c9ebcb6157d5433d459c7e736c81d014b49577b31 languageName: node linkType: hard -"temp@npm:0.9.4": - version: 0.9.4 - resolution: "temp@npm:0.9.4" - dependencies: - mkdirp: "npm:^0.5.1" - rimraf: "npm:~2.6.2" - checksum: 10/38d40564656c6e8e3caee41c592b3cc076d257ab4746ae4a6a179c44eb4a6d3e8a19a08c7716c8e88756bb898d6e56dd0a9e0408249bbcb3c990a178c34d0571 +"parse-ms@npm:^2.1.0": + version: 2.1.0 + resolution: "parse-ms@npm:2.1.0" + checksum: 10/517eab80cdb9df6ae22a8fad944bfb4289482699bcde5211a1c127091dfea33c3dcb217246b188865fc32e998bcee815bfa4a863f41e3b2d0bcc69f34ef1a543 languageName: node linkType: hard -"tempy@npm:^0.6.0": - version: 0.6.0 - resolution: "tempy@npm:0.6.0" - dependencies: - is-stream: "npm:^2.0.0" - temp-dir: "npm:^2.0.0" - type-fest: "npm:^0.16.0" - unique-string: "npm:^2.0.0" - checksum: 10/64f110666b3892ff00d2b5f9d89a5e0198813cc7e25aa187eca5ce310ff1697ef2cb7239f9eccbe0e8a23c1cdfaae949ce37511fe60ebfc637018ce7e9642a49 +"parse-passwd@npm:^1.0.0": + version: 1.0.0 + resolution: "parse-passwd@npm:1.0.0" + checksum: 10/4e55e0231d58f828a41d0f1da2bf2ff7bcef8f4cb6146e69d16ce499190de58b06199e6bd9b17fbf0d4d8aef9052099cdf8c4f13a6294b1a522e8e958073066e languageName: node linkType: hard -"terminal-link@npm:^2.0.0": - version: 2.1.1 - resolution: "terminal-link@npm:2.1.1" +"parse-path@npm:^7.0.0": + version: 7.0.0 + resolution: "parse-path@npm:7.0.0" dependencies: - ansi-escapes: "npm:^4.2.1" - supports-hyperlinks: "npm:^2.0.0" - checksum: 10/ce3d2cd3a438c4a9453947aa664581519173ea40e77e2534d08c088ee6dda449eabdbe0a76d2a516b8b73c33262fedd10d5270ccf7576ae316e3db170ce6562f + protocols: "npm:^2.0.0" + checksum: 10/2e6eadae5aff97a8b6373c1c08440bfeed814f65452674a139dc606c7c410e8e48b7983fe451aedc59802a2814121b40415ca00675c1546ff75cb73ad0c1df5a languageName: node linkType: hard -"terser-webpack-plugin@npm:^5.2.5, terser-webpack-plugin@npm:^5.3.7": - version: 5.3.9 - resolution: "terser-webpack-plugin@npm:5.3.9" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.17" - jest-worker: "npm:^27.4.5" - schema-utils: "npm:^3.1.1" - serialize-javascript: "npm:^6.0.1" - terser: "npm:^5.16.8" - peerDependencies: - webpack: ^5.1.0 - peerDependenciesMeta: - "@swc/core": - optional: true - esbuild: - optional: true - uglify-js: - optional: true - checksum: 10/339737a407e034b7a9d4a66e31d84d81c10433e41b8eae2ca776f0e47c2048879be482a9aa08e8c27565a2a949bc68f6e07f451bf4d9aa347dd61b3d000f5353 +"parse-srcset@npm:^1.0.2": + version: 1.0.2 + resolution: "parse-srcset@npm:1.0.2" + checksum: 10/d40c131cfc3ab7bb6333b788d30a30d063d76a83b49fa752229823f96475e36cf29fea09e035ce3b2a634b686e93e2a7429cb8dad0041d8a3a3df622093b9ea1 languageName: node linkType: hard -"terser-webpack-plugin@npm:^5.3.10": - version: 5.3.10 - resolution: "terser-webpack-plugin@npm:5.3.10" +"parse-url@npm:^8.1.0": + version: 8.1.0 + resolution: "parse-url@npm:8.1.0" dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.20" - jest-worker: "npm:^27.4.5" - schema-utils: "npm:^3.1.1" - serialize-javascript: "npm:^6.0.1" - terser: "npm:^5.26.0" - peerDependencies: - webpack: ^5.1.0 - peerDependenciesMeta: - "@swc/core": - optional: true - esbuild: - optional: true - uglify-js: - optional: true - checksum: 10/fb1c2436ae1b4e983be043fa0a3d355c047b16b68f102437d08c736d7960c001e7420e2f722b9d99ce0dc70ca26a68cc63c0b82bc45f5b48671142b352a9d938 + parse-path: "npm:^7.0.0" + checksum: 10/ceb51dc474568092a50d6d936036dfe438a87aa45bcf20947c8fcdf1544ee9c50255608abae604644e718e91e0b83cfbea4675e8b2fd90bc197432f6d9be263c languageName: node linkType: hard -"terser@npm:5.19.2": - version: 5.19.2 - resolution: "terser@npm:5.19.2" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10/da441c9e0e630d26ca74d7f9659cc78f4afb698cebdb93cb5142565ba3f625bdf9a7b4f4bd94dabd5a2344732fde850d607e6f7eed04275754578d531f917382 +"patch-console@npm:^1.0.0": + version: 1.0.0 + resolution: "patch-console@npm:1.0.0" + checksum: 10/8cd738aa470f2e9463fca35da6a19403384ac555004f698ddd3dfdb69135ab60fe9bd2edd1dbdd8c09d92c0a2190fd0f7337fe48123013baf8ffec8532885a3a languageName: node linkType: hard -"terser@npm:5.29.1": - version: 5.29.1 - resolution: "terser@npm:5.29.1" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10/e8c036e7cd7d9e988765272453acdc52a019827e10710cf109c86d6f31248c8d4d8aa3a3deef30f931a2bb75a8ffc731ca947bd126e7d4e6dda157e6fe892ac0 +"path-browserify@npm:^1.0.1": + version: 1.0.1 + resolution: "path-browserify@npm:1.0.1" + checksum: 10/7e7368a5207e7c6b9051ef045711d0dc3c2b6203e96057e408e6e74d09f383061010d2be95cb8593fe6258a767c3e9fc6b2bfc7ce8d48ae8c3d9f6994cca9ad8 languageName: node linkType: hard -"terser@npm:^5.0.0, terser@npm:^5.10.0": - version: 5.22.0 - resolution: "terser@npm:5.22.0" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10/e5407f9a143e7f9306f1b585b16dbb03df19b93318b55a26b542e12b74cc792dcf6961d9a2cab6778b20d7b591f498c200376d282a300cf9999ca40bccbc047c +"path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 10/505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 languageName: node linkType: hard -"terser@npm:^5.16.8": - version: 5.19.4 - resolution: "terser@npm:5.19.4" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10/8439034db1f4827bb475ae284a122bdaebdd484cb368d64d5bc1d799081c58f47525621a619b7ec6cdded3a43ae8f9a0ac93702c68e827a13a475a562558787c +"path-exists@npm:^5.0.0": + version: 5.0.0 + resolution: "path-exists@npm:5.0.0" + checksum: 10/8ca842868cab09423994596eb2c5ec2a971c17d1a3cb36dbf060592c730c725cd524b9067d7d2a1e031fef9ba7bd2ac6dc5ec9fb92aa693265f7be3987045254 languageName: node linkType: hard -"terser@npm:^5.26.0": - version: 5.31.2 - resolution: "terser@npm:5.31.2" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10/dab8d0a7e2845f14535433795aa8dcf1b80a33e75749f5dbd67ee97aa66c1dec37191afa46dd88dad8472c9ff0bf16a812dd4388cb30d8675a6a95a7ead0421b +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10/060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 languageName: node linkType: hard -"test-exclude@npm:^4.2.0": - version: 4.2.3 - resolution: "test-exclude@npm:4.2.3" - dependencies: - arrify: "npm:^1.0.1" - micromatch: "npm:^2.3.11" - object-assign: "npm:^4.1.0" - read-pkg-up: "npm:^1.0.1" - require-main-filename: "npm:^1.0.1" - checksum: 10/4093f0e7a5e37b7aba0977ccd790b03ac76e12cdc9130374c1982743105ee3b871f860ad9406f1851aada95fdefc7ae600e2725eae911d855804dc997d427267 +"path-key@npm:^2.0.1": + version: 2.0.1 + resolution: "path-key@npm:2.0.1" + checksum: 10/6e654864e34386a2a8e6bf72cf664dcabb76574dd54013add770b374384d438aca95f4357bb26935b514a4e4c2c9b19e191f2200b282422a76ee038b9258c5e7 languageName: node linkType: hard -"test-exclude@npm:^5.0.0": - version: 5.2.3 - resolution: "test-exclude@npm:5.2.3" - dependencies: - glob: "npm:^7.1.3" - minimatch: "npm:^3.0.4" - read-pkg-up: "npm:^4.0.0" - require-main-filename: "npm:^2.0.0" - checksum: 10/90f5ebf975da303377f1ee65cc80b78a91abcfe43a12f5e08ebd76a993b237cd34bfda1c79eeb3c8ab179d0dd09753efae56711eec9d267177869f7ee8c423df +"path-key@npm:^3.0.0, path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10/55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 languageName: node linkType: hard -"test-exclude@npm:^6.0.0": - version: 6.0.0 - resolution: "test-exclude@npm:6.0.0" - dependencies: - "@istanbuljs/schema": "npm:^0.1.2" - glob: "npm:^7.1.4" - minimatch: "npm:^3.0.4" - checksum: 10/8fccb2cb6c8fcb6bb4115394feb833f8b6cf4b9503ec2485c2c90febf435cac62abe882a0c5c51a37b9bbe70640cdd05acf5f45e486ac4583389f4b0855f69e5 +"path-key@npm:^4.0.0": + version: 4.0.0 + resolution: "path-key@npm:4.0.0" + checksum: 10/8e6c314ae6d16b83e93032c61020129f6f4484590a777eed709c4a01b50e498822b00f76ceaf94bc64dbd90b327df56ceadce27da3d83393790f1219e07721d7 languageName: node linkType: hard -"testrpc@npm:0.0.1": - version: 0.0.1 - resolution: "testrpc@npm:0.0.1" - checksum: 10/e27778552df2d0b938b062fdf41d44557f0eb3de75903cb90b87909f55a82a6345dd13e40d1498e718272b4e5225872dca66da73646c35df1031486bb0ed0fda +"path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 10/49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a languageName: node linkType: hard -"text-extensions@npm:^1.0.0": - version: 1.9.0 - resolution: "text-extensions@npm:1.9.0" - checksum: 10/56a9962c1b62d39b2bcb369b7558ca85c1b55e554b38dfd725edcc0a1babe5815782a60c17ff6b839093b163dfebb92b804208aaaea616ec7571c8059ae0cf44 +"path-scurry@npm:^1.10.1": + version: 1.10.1 + resolution: "path-scurry@npm:1.10.1" + dependencies: + lru-cache: "npm:^9.1.1 || ^10.0.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10/eebfb8304fef1d4f7e1486df987e4fd77413de4fce16508dea69fcf8eb318c09a6b15a7a2f4c22877cec1cb7ecbd3071d18ca9de79eeece0df874a00f1f0bdc8 languageName: node linkType: hard -"text-extensions@npm:^2.0.0": - version: 2.4.0 - resolution: "text-extensions@npm:2.4.0" - checksum: 10/9bdbc9959e004ccc86a6ec076d6c5bb6765978263e9d0d5febb640d7675c09919ea912f3fe9d50b68c3c7c43cc865610a7cb24954343abb31f74c205fbae4e45 +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 languageName: node linkType: hard -"text-hex@npm:1.0.x": - version: 1.0.0 - resolution: "text-hex@npm:1.0.0" - checksum: 10/1138f68adc97bf4381a302a24e2352f04992b7b1316c5003767e9b0d3367ffd0dc73d65001ea02b07cd0ecc2a9d186de0cf02f3c2d880b8a522d4ccb9342244a +"path-scurry@npm:^1.6.1": + version: 1.6.3 + resolution: "path-scurry@npm:1.6.3" + dependencies: + lru-cache: "npm:^7.14.1" + minipass: "npm:^4.0.2" + checksum: 10/95cb56ba7dc84995f821f5be48c139113aceaeda0835a761e23fae17fbb64145e8f1b50070ea25137f4cbd745ce81d89a7070292c66a7a8f68cb369ce6052d0a languageName: node linkType: hard -"text-table@npm:0.2.0, text-table@npm:^0.2.0, text-table@npm:~0.2.0": - version: 0.2.0 - resolution: "text-table@npm:0.2.0" - checksum: 10/4383b5baaeffa9bb4cda2ac33a4aa2e6d1f8aaf811848bf73513a9b88fd76372dc461f6fd6d2e9cb5100f48b473be32c6f95bd983509b7d92bb4d92c10747452 +"path-to-regexp@npm:3.2.0": + version: 3.2.0 + resolution: "path-to-regexp@npm:3.2.0" + checksum: 10/3c86811e0d69719e20908ed6457b6f51d0d66ffc526e04d259cddea5fd777c7b967adb60907658b7e1a98cb7bf1bbbbad3523337a676c98513fd76a7b513075e languageName: node linkType: hard -"thenify-all@npm:^1.0.0": - version: 1.6.0 - resolution: "thenify-all@npm:1.6.0" +"path-type@npm:^3.0.0": + version: 3.0.0 + resolution: "path-type@npm:3.0.0" dependencies: - thenify: "npm:>= 3.1.0 < 4" - checksum: 10/dba7cc8a23a154cdcb6acb7f51d61511c37a6b077ec5ab5da6e8b874272015937788402fd271fdfc5f187f8cb0948e38d0a42dcc89d554d731652ab458f5343e + pify: "npm:^3.0.0" + checksum: 10/735b35e256bad181f38fa021033b1c33cfbe62ead42bb2222b56c210e42938eecb272ae1949f3b6db4ac39597a61b44edd8384623ec4d79bfdc9a9c0f12537a6 languageName: node linkType: hard -"thenify@npm:>= 3.1.0 < 4": - version: 3.3.1 - resolution: "thenify@npm:3.3.1" - dependencies: - any-promise: "npm:^1.0.0" - checksum: 10/486e1283a867440a904e36741ff1a177faa827cf94d69506f7e3ae4187b9afdf9ec368b3d8da225c192bfe2eb943f3f0080594156bf39f21b57cd1411e2e7f6d +"path-type@npm:^4.0.0": + version: 4.0.0 + resolution: "path-type@npm:4.0.0" + checksum: 10/5b1e2daa247062061325b8fdbfd1fb56dde0a448fb1455453276ea18c60685bdad23a445dc148cf87bc216be1573357509b7d4060494a6fd768c7efad833ee45 languageName: node linkType: hard -"thingies@npm:^1.20.0": - version: 1.21.0 - resolution: "thingies@npm:1.21.0" - peerDependencies: - tslib: ^2 - checksum: 10/5c3954b67391d1432c252cb7089f29480e2164f06987a63d83c9747aa6999bfc313d6edfce71ed967316a3378dfcaf38f35ea77aaa5d423edaf776b8ff854f83 +"path-type@npm:^5.0.0": + version: 5.0.0 + resolution: "path-type@npm:5.0.0" + checksum: 10/15ec24050e8932c2c98d085b72cfa0d6b4eeb4cbde151a0a05726d8afae85784fc5544f733d8dfc68536587d5143d29c0bd793623fad03d7e61cc00067291cd5 languageName: node linkType: hard -"thread-stream@npm:^3.0.0": - version: 3.1.0 - resolution: "thread-stream@npm:3.1.0" +"pbkdf2@npm:^3.0.3, pbkdf2@npm:^3.1.2": + version: 3.1.2 + resolution: "pbkdf2@npm:3.1.2" dependencies: - real-require: "npm:^0.2.0" - checksum: 10/ea2d816c4f6077a7062fac5414a88e82977f807c82ee330938fb9691fe11883bb03f078551c0518bb649c239e47ba113d44014fcbb5db42c5abd5996f35e4213 + create-hash: "npm:^1.1.2" + create-hmac: "npm:^1.1.4" + ripemd160: "npm:^2.0.1" + safe-buffer: "npm:^5.0.1" + sha.js: "npm:^2.4.8" + checksum: 10/40bdf30df1c9bb1ae41ec50c11e480cf0d36484b7c7933bf55e4451d1d0e3f09589df70935c56e7fccc5702779a0d7b842d012be8c08a187b44eb24d55bb9460 languageName: node linkType: hard -"throat@npm:^6.0.1": - version: 6.0.2 - resolution: "throat@npm:6.0.2" - checksum: 10/acd99f4b7362bcf6dcc517b01517165a00f7270d0c4fe2ca06c73b6217f022f76fb20e8ca98283b25ccb85d97a5f96dbcac5577d60bb0bda1eff92fa8e79fbd7 +"picocolors@npm:^1.0.0": + version: 1.0.0 + resolution: "picocolors@npm:1.0.0" + checksum: 10/a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 languageName: node linkType: hard -"through2@npm:3.0.2": - version: 3.0.2 - resolution: "through2@npm:3.0.2" - dependencies: - inherits: "npm:^2.0.4" - readable-stream: "npm:2 || 3" - checksum: 10/98bdffba8e877fd8beb2154adc4eb0d52fad281130f56f6e5d18f85d1e1aa528a7b27317b302eb5443f6636ab045d3c272e6dffc61d984775db284823b90532d +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc languageName: node linkType: hard - -"through2@npm:^4.0.0, through2@npm:^4.0.2": - version: 4.0.2 - resolution: "through2@npm:4.0.2" - dependencies: - readable-stream: "npm:3" - checksum: 10/72c246233d9a989bbebeb6b698ef0b7b9064cb1c47930f79b25d87b6c867e075432811f69b7b2ac8da00ca308191c507bdab913944be8019ac43b036ce88f6ba + +"pidtree@npm:^0.3.0": + version: 0.3.1 + resolution: "pidtree@npm:0.3.1" + bin: + pidtree: bin/pidtree.js + checksum: 10/eb85b841cd168151bfadb984f9514d67a884d6962d4a2d250d4e8acf85cf031d7dab080f7272fb2735f9033364e5058c73eeebbee3cf6fd829169a75d19f189a languageName: node linkType: hard -"through@npm:>=2.2.7 <3, through@npm:^2.3.4, through@npm:^2.3.6, through@npm:^2.3.8": - version: 2.3.8 - resolution: "through@npm:2.3.8" - checksum: 10/5da78346f70139a7d213b65a0106f3c398d6bc5301f9248b5275f420abc2c4b1e77c2abc72d218dedc28c41efb2e7c312cb76a7730d04f9c2d37d247da3f4198 +"pify@npm:^3.0.0": + version: 3.0.0 + resolution: "pify@npm:3.0.0" + checksum: 10/668c1dc8d9fc1b34b9ce3b16ba59deb39d4dc743527bf2ed908d2b914cb8ba40aa5ba6960b27c417c241531c5aafd0598feeac2d50cb15278cf9863fa6b02a77 languageName: node linkType: hard -"thunky@npm:^1.0.2": - version: 1.1.0 - resolution: "thunky@npm:1.1.0" - checksum: 10/825e3bd07ab3c9fd6f753c457a60957c628cacba5dd0656fd93b037c445e2828b43cf0805a9f2b16b0c5f5a10fd561206271acddb568df4f867f0aea0eb2772f +"pify@npm:^6.1.0": + version: 6.1.0 + resolution: "pify@npm:6.1.0" + checksum: 10/80ed50b214bb8afd0e27f7ea8526e8de18e156e1527bb1c0172041d675ff4fc80beb78535767944de9eefae8dac52318a7acc3a58c402a6e4e574f217e04ee82 languageName: node linkType: hard -"tildify@npm:2.0.0": - version: 2.0.0 - resolution: "tildify@npm:2.0.0" - checksum: 10/0f5fee93624c4afdf75ee224c3b65aece4817ba5317fd70f49eaf084ea720d73556a6ef3f50079425a773ba3b93805b4524d14057841d4e4336516fdbe80635b +"pirates@npm:^4.0.4": + version: 4.0.5 + resolution: "pirates@npm:4.0.5" + checksum: 10/3728bae0cf6c18c3d25f5449ee8c5bc1a6a83bca688abe0e1654ce8c069bfd408170397cef133ed9ec8b0faeb4093c5c728d0e72ab7b3385256cd87008c40364 languageName: node linkType: hard -"time-stamp@npm:^2.0.0": - version: 2.2.0 - resolution: "time-stamp@npm:2.2.0" - checksum: 10/b602ea7c86793989fb22cf5aec35307e78af3e3c4f9ef7efdf0dabe296def23684985a55fb56a37143d80256f07f17768916d80995cd197aa3a811470d2e6f54 +"pkg-dir@npm:^4.1.0, pkg-dir@npm:^4.2.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: "npm:^4.0.0" + checksum: 10/9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 languageName: node linkType: hard -"timed-out@npm:^4.0.0, timed-out@npm:^4.0.1": - version: 4.0.1 - resolution: "timed-out@npm:4.0.1" - checksum: 10/d52648e5fc0ebb0cae1633737a1db1b7cb464d5d43d754bd120ddebd8067a1b8f42146c250d8cfb9952183b7b0f341a99fc71b59c52d659218afae293165004f +"platform@npm:^1.3.3": + version: 1.3.6 + resolution: "platform@npm:1.3.6" + checksum: 10/1f2d8333e23ea6a7620c828d2fc1ccbbd33e01928fb142323420506114d7325ebdeb1b38544efbf64e90ab73af0847f874d0f475b9327bcf53510fa827a4ef95 languageName: node linkType: hard -"timeout-abort-controller@npm:^3.0.0": - version: 3.0.0 - resolution: "timeout-abort-controller@npm:3.0.0" +"please-upgrade-node@npm:^3.2.0": + version: 3.2.0 + resolution: "please-upgrade-node@npm:3.2.0" dependencies: - retimer: "npm:^3.0.0" - checksum: 10/ec3b0e57085b8e84d762d59c0d2859171087f4bff623b128dd30282b328c4fef98c59a69b59ea9c93d7d37e08b372e803e951e3ac2cadd7a4f00df53995326d7 + semver-compare: "npm:^1.0.0" + checksum: 10/d87c41581a2a022fbe25965a97006238cd9b8cbbf49b39f78d262548149a9d30bd2bdf35fec3d810e0001e630cd46ef13c7e19c389dea8de7e64db271a2381bb languageName: node linkType: hard -"timers-browserify@npm:^2.0.12": - version: 2.0.12 - resolution: "timers-browserify@npm:2.0.12" - dependencies: - setimmediate: "npm:^1.0.4" - checksum: 10/ec37ae299066bef6c464dcac29c7adafba1999e7227a9bdc4e105a459bee0f0b27234a46bfd7ab4041da79619e06a58433472867a913d01c26f8a203f87cee70 +"pluralize@npm:^8.0.0": + version: 8.0.0 + resolution: "pluralize@npm:8.0.0" + checksum: 10/17877fdfdb7ddb3639ce257ad73a7c51a30a966091e40f56ea9f2f545b5727ce548d4928f8cb3ce38e7dc0c5150407d318af6a4ed0ea5265d378473b4c2c61ec languageName: node linkType: hard -"tiny-typed-emitter@npm:^2.1.0": - version: 2.1.0 - resolution: "tiny-typed-emitter@npm:2.1.0" - checksum: 10/709bca410054e08df4dc29d5ea0916328bb2900d60245c6a743068ea223887d9fd2c945b6070eb20336275a557a36c2808e5c87d2ed4b60633458632be4a3e10 +"possible-typed-array-names@npm:^1.0.0": + version: 1.0.0 + resolution: "possible-typed-array-names@npm:1.0.0" + checksum: 10/8ed3e96dfeea1c5880c1f4c9cb707e5fb26e8be22f14f82ef92df20fd2004e635c62ba47fbe8f2bb63bfd80dac1474be2fb39798da8c2feba2815435d1f749af languageName: node linkType: hard -"title-case@npm:^2.1.0, title-case@npm:^2.1.1": - version: 2.1.1 - resolution: "title-case@npm:2.1.1" +"postcss-selector-parser@npm:^6.0.10": + version: 6.0.10 + resolution: "postcss-selector-parser@npm:6.0.10" dependencies: - no-case: "npm:^2.2.0" - upper-case: "npm:^1.0.3" - checksum: 10/e88ddfc4608a7fb18ed440139d9c42a5f8a50f916e07062be2aef5e2038720746ed51c4fdf9e7190d24a8cc10e6dec9773027fc44450b3a4a5e5c49b4a931fb1 + cssesc: "npm:^3.0.0" + util-deprecate: "npm:^1.0.2" + checksum: 10/f8ad9beb764a64b51a8027650e745a44ed7198f0b968b823db9563a54990924bcf9eb6fb59fbbb7eb05a89b2b6a24b81b2b7d60ecadda15b04a0024c7663f436 languageName: node linkType: hard -"tls-browserify@npm:0.2.2": - version: 0.2.2 - resolution: "tls-browserify@npm:0.2.2" +"postcss-values-parser@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-values-parser@npm:6.0.2" dependencies: - node-forge: "npm:^0.7.0" - checksum: 10/58ba0a3b8bf635083c74d7bfbd2970bd44b3c51b8e5aaf8cff1e00618b003855431b5b3c1685f136c6278fcfe2dd9ec8fd0053ccadf19cb3b0dabc8c98ae8a4d + color-name: "npm:^1.1.4" + is-url-superb: "npm:^4.0.0" + quote-unquote: "npm:^1.0.0" + peerDependencies: + postcss: ^8.2.9 + checksum: 10/ff2fa096896f1c33f7531e814b8d01e785bd99d672c1597d5c5d8c2409b30b8146be6565f6269c952d1f03d626f00ae3f1afb8308cc772c08b323abee23c9a42 languageName: node linkType: hard -"tmp@npm:0.0.33, tmp@npm:^0.0.33": - version: 0.0.33 - resolution: "tmp@npm:0.0.33" +"postcss@npm:>=8.4.31": + version: 8.4.31 + resolution: "postcss@npm:8.4.31" dependencies: - os-tmpdir: "npm:~1.0.2" - checksum: 10/09c0abfd165cff29b32be42bc35e80b8c64727d97dedde6550022e88fa9fd39a084660415ed8e3ebaa2aca1ee142f86df8b31d4196d4f81c774a3a20fd4b6abf + nanoid: "npm:^3.3.6" + picocolors: "npm:^1.0.0" + source-map-js: "npm:^1.0.2" + checksum: 10/1a6653e72105907377f9d4f2cd341d8d90e3fde823a5ddea1e2237aaa56933ea07853f0f2758c28892a1d70c53bbaca200eb8b80f8ed55f13093003dbec5afa0 languageName: node linkType: hard -"tmpl@npm:1.0.5": - version: 1.0.5 - resolution: "tmpl@npm:1.0.5" - checksum: 10/cd922d9b853c00fe414c5a774817be65b058d54a2d01ebb415840960406c669a0fc632f66df885e24cb022ec812739199ccbdb8d1164c3e513f85bfca5ab2873 +"precinct@npm:^11.0.5": + version: 11.0.5 + resolution: "precinct@npm:11.0.5" + dependencies: + "@dependents/detective-less": "npm:^4.1.0" + commander: "npm:^10.0.1" + detective-amd: "npm:^5.0.2" + detective-cjs: "npm:^5.0.1" + detective-es6: "npm:^4.0.1" + detective-postcss: "npm:^6.1.3" + detective-sass: "npm:^5.0.3" + detective-scss: "npm:^4.0.3" + detective-stylus: "npm:^4.0.0" + detective-typescript: "npm:^11.1.0" + module-definition: "npm:^5.0.1" + node-source-walk: "npm:^6.0.2" + bin: + precinct: bin/cli.js + checksum: 10/8f93c2e171622dfa1ce461ef52427247e4fcd51091480eec62b8d24c9b1098f5b6c2b28c50d57c2ae70a049f7302dfb2164631b59bfd894de97e2a8e11708c54 languageName: node linkType: hard -"to-buffer@npm:^1.1.1": - version: 1.1.1 - resolution: "to-buffer@npm:1.1.1" - checksum: 10/8ade59fe04239b281496b6067bc83ad0371a3657552276cbd09ffffaeb3ad0018a28306d61b854b83280eabe1829cbc53001ccd761e834c6062cbcc7fee2766a +"prelude-ls@npm:^1.2.1": + version: 1.2.1 + resolution: "prelude-ls@npm:1.2.1" + checksum: 10/0b9d2c76801ca652a7f64892dd37b7e3fab149a37d2424920099bf894acccc62abb4424af2155ab36dea8744843060a2d8ddc983518d0b1e22265a22324b72ed languageName: node linkType: hard -"to-fast-properties@npm:^2.0.0": +"prepend-http@npm:^2.0.0": version: 2.0.0 - resolution: "to-fast-properties@npm:2.0.0" - checksum: 10/be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 + resolution: "prepend-http@npm:2.0.0" + checksum: 10/7694a9525405447662c1ffd352fcb41b6410c705b739b6f4e3a3e21cf5fdede8377890088e8934436b8b17ba55365a615f153960f30877bf0d0392f9e93503ea languageName: node linkType: hard -"to-object-path@npm:^0.3.0": - version: 0.3.0 - resolution: "to-object-path@npm:0.3.0" +"prettier-linter-helpers@npm:^1.0.0": + version: 1.0.0 + resolution: "prettier-linter-helpers@npm:1.0.0" dependencies: - kind-of: "npm:^3.0.2" - checksum: 10/9425effee5b43e61d720940fa2b889623f77473d459c2ce3d4a580a4405df4403eec7be6b857455908070566352f9e2417304641ed158dda6f6a365fe3e66d70 + fast-diff: "npm:^1.1.2" + checksum: 10/00ce8011cf6430158d27f9c92cfea0a7699405633f7f1d4a45f07e21bf78e99895911cbcdc3853db3a824201a7c745bd49bfea8abd5fb9883e765a90f74f8392 languageName: node linkType: hard -"to-readable-stream@npm:^1.0.0": - version: 1.0.0 - resolution: "to-readable-stream@npm:1.0.0" - checksum: 10/a99e23d49777d9d03686f03cc0bbbcb4648d991648990a98bc93b55cf91a2ae830c41b5efa36802f1c00a34bba93bd33b10346772fd3f49bcf1667a99c85f354 +"prettier@npm:3.2.5": + version: 3.2.5 + resolution: "prettier@npm:3.2.5" + bin: + prettier: bin/prettier.cjs + checksum: 10/d509f9da0b70e8cacc561a1911c0d99ec75117faed27b95cc8534cb2349667dee6351b0ca83fa9d5703f14127faa52b798de40f5705f02d843da133fc3aa416a languageName: node linkType: hard -"to-regex-range@npm:^5.0.1": - version: 5.0.1 - resolution: "to-regex-range@npm:5.0.1" +"pretty-format@npm:^29.0.0, pretty-format@npm:^29.6.2": + version: 29.6.2 + resolution: "pretty-format@npm:29.6.2" dependencies: - is-number: "npm:^7.0.0" - checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a + "@jest/schemas": "npm:^29.6.0" + ansi-styles: "npm:^5.0.0" + react-is: "npm:^18.0.0" + checksum: 10/5db1faf52552341e5026fd72f847d88116b08f758ef904f1635415b53ec2a193a0114fdede9f55a2c1174fa6eca896531f860db6f208c5698a52a5c354bb6f8d languageName: node linkType: hard -"to-regex@npm:^3.0.1, to-regex@npm:^3.0.2": - version: 3.0.2 - resolution: "to-regex@npm:3.0.2" +"pretty-ms@npm:^7.0.1": + version: 7.0.1 + resolution: "pretty-ms@npm:7.0.1" dependencies: - define-property: "npm:^2.0.2" - extend-shallow: "npm:^3.0.2" - regex-not: "npm:^1.0.2" - safe-regex: "npm:^1.1.0" - checksum: 10/ab87c22f0719f7def00145b53e2c90d2fdcc75efa0fec1227b383aaf88ed409db2542b2b16bcbfbf95fe0727f879045803bb635b777c0306762241ca3e5562c6 - languageName: node - linkType: hard - -"toad-cache@npm:^3.3.0": - version: 3.7.0 - resolution: "toad-cache@npm:3.7.0" - checksum: 10/cdc62aacc047e94eab21697943e117bbb1938168a03e5e85fdba28ab6ea66f4796ff16b219019a64d2115048378f9dd1f4e62c78c1f1d4961d0b3d23f9a9374d - languageName: node - linkType: hard - -"toidentifier@npm:1.0.1": - version: 1.0.1 - resolution: "toidentifier@npm:1.0.1" - checksum: 10/952c29e2a85d7123239b5cfdd889a0dde47ab0497f0913d70588f19c53f7e0b5327c95f4651e413c74b785147f9637b17410ac8c846d5d4a20a5a33eb6dc3a45 + parse-ms: "npm:^2.1.0" + checksum: 10/a39aac23cc7dae7a94c70518ab8b6c6db0894a7b84c81ee7abc8778c5ec8bae2d1e71ba991ff641732b38433724bfbdbb37bd3a00418637f797c072e06fe8b4c languageName: node linkType: hard -"toml@npm:^3.0.0": +"proc-log@npm:^3.0.0": version: 3.0.0 - resolution: "toml@npm:3.0.0" - checksum: 10/cfef0966868d552bd02e741f30945a611f70841b7cddb07ea2b17441fe32543985bc0a7c0dcf7971af26fcaf8a17712a485d911f46bfe28644536e9a71a2bd09 + resolution: "proc-log@npm:3.0.0" + checksum: 10/02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 languageName: node linkType: hard -"touch@npm:^3.1.0": - version: 3.1.0 - resolution: "touch@npm:3.1.0" - dependencies: - nopt: "npm:~1.0.10" - bin: - nodetouch: ./bin/nodetouch.js - checksum: 10/ece1d9693fbc9b73d8a6d902537b787b5685ac1aeab7562857c50e6671415a73c985055393442b518f4ac37b85c3e7a3e6c36af71142fed13b8bb04fb6664936 +"proc-log@npm:^4.0.0, proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 10/4e1394491b717f6c1ade15c570ecd4c2b681698474d3ae2d303c1e4b6ab9455bd5a81566211e82890d5a5ae9859718cc6954d5150bb18b09b72ecb297beae90a languageName: node linkType: hard -"tough-cookie@npm:>=4.1.3": - version: 4.1.3 - resolution: "tough-cookie@npm:4.1.3" - dependencies: - psl: "npm:^1.1.33" - punycode: "npm:^2.1.1" - universalify: "npm:^0.2.0" - url-parse: "npm:^1.5.3" - checksum: 10/cf148c359b638a7069fc3ba9a5257bdc9616a6948a98736b92c3570b3f8401cf9237a42bf716878b656f372a1fb65b74dd13a46ccff8eceba14ffd053d33f72a +"process-nextick-args@npm:~2.0.0": + version: 2.0.1 + resolution: "process-nextick-args@npm:2.0.1" + checksum: 10/1d38588e520dab7cea67cbbe2efdd86a10cc7a074c09657635e34f035277b59fbb57d09d8638346bf7090f8e8ebc070c96fa5fd183b777fff4f5edff5e9466cf languageName: node linkType: hard -"tr46@npm:^1.0.1": - version: 1.0.1 - resolution: "tr46@npm:1.0.1" +"process-on-spawn@npm:^1.0.0": + version: 1.0.0 + resolution: "process-on-spawn@npm:1.0.0" dependencies: - punycode: "npm:^2.1.0" - checksum: 10/6e80d75480cb6658f7f283c15f5f41c2d4dfa243ca99a0e1baf3de6cc823fc4c829f89782a7a11e029905781fccfea42d08d8a6674ba7948c7dbc595b6f27dd3 + fromentries: "npm:^1.2.0" + checksum: 10/8795d71742798e5a059e13da2a9c13988aa7c673a3a57f276c1ff6ed942ba9b7636139121c6a409eaa2ea6a8fda7af4be19c3dc576320515bb3f354e3544106e languageName: node linkType: hard -"tr46@npm:^2.1.0": - version: 2.1.0 - resolution: "tr46@npm:2.1.0" - dependencies: - punycode: "npm:^2.1.1" - checksum: 10/302b13f458da713b2a6ff779a0c1d27361d369fdca6c19330536d31db61789b06b246968fc879fdac818a92d02643dca1a0f4da5618df86aea4a79fb3243d3f3 +"process@npm:^0.11.10": + version: 0.11.10 + resolution: "process@npm:0.11.10" + checksum: 10/dbaa7e8d1d5cf375c36963ff43116772a989ef2bb47c9bdee20f38fd8fc061119cf38140631cf90c781aca4d3f0f0d2c834711952b728953f04fd7d238f59f5b languageName: node linkType: hard -"tr46@npm:~0.0.3": - version: 0.0.3 - resolution: "tr46@npm:0.0.3" - checksum: 10/8f1f5aa6cb232f9e1bdc86f485f916b7aa38caee8a778b378ffec0b70d9307873f253f5cbadbe2955ece2ac5c83d0dc14a77513166ccd0a0c7fe197e21396695 +"proggy@npm:^2.0.0": + version: 2.0.0 + resolution: "proggy@npm:2.0.0" + checksum: 10/9c96830d30516534c91e1260cae98d2c12aa32ea4ca7ff979876557ae293581c4874c95daf80497a7350179e7fec6d119cd589ef09af9c925f5842161897ed7e languageName: node linkType: hard -"tree-dump@npm:^1.0.1": - version: 1.0.2 - resolution: "tree-dump@npm:1.0.2" - peerDependencies: - tslib: 2 - checksum: 10/ddcde4da9ded8edc2fa77fc9153ef8d7fba9cd5f813db27c30c7039191b50e1512b7106f0f4fe7ccaa3aa69f85b4671eda7ed0b9f9d34781eb26ebe4593ad4eb +"promise-all-reject-late@npm:^1.0.0": + version: 1.0.1 + resolution: "promise-all-reject-late@npm:1.0.1" + checksum: 10/f5e5c1bfed975c26b6dec007393e1026c437716d87c9c688cfa026bb904c190155211d23fe795c03c4394f88563471aec56b3ad263bff5ed68dad734513c2912 languageName: node linkType: hard -"tree-kill@npm:1.2.2, tree-kill@npm:^1.2.2": - version: 1.2.2 - resolution: "tree-kill@npm:1.2.2" - bin: - tree-kill: cli.js - checksum: 10/49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7 +"promise-call-limit@npm:^3.0.1": + version: 3.0.1 + resolution: "promise-call-limit@npm:3.0.1" + checksum: 10/f1b3c4d3a9c5482ce27ec5f40311e1389adb9bb10c16166e61c96d29ab22c701691d5225bf6745a162858f45dfb46cc82275fd09e7aa57846fc446c7855c2f06 languageName: node linkType: hard -"treeify@npm:^1.1.0": - version: 1.1.0 - resolution: "treeify@npm:1.1.0" - checksum: 10/5241976a751168fb9894a12d031299f1f6337b7f2cbd3eff22ee86e6777620352a69a1cab0d4709251317ff307eeda0dc45918850974fc44f4c7fc50e623b990 +"promise-inflight@npm:^1.0.1": + version: 1.0.1 + resolution: "promise-inflight@npm:1.0.1" + checksum: 10/1560d413ea20c5a74f3631d39ba8cbd1972b9228072a755d01e1f5ca5110382d9af76a1582d889445adc6e75bb5ac4886b56dc4b6eae51b30145d7bb1ac7505b languageName: node linkType: hard -"treeverse@npm:^3.0.0": - version: 3.0.0 - resolution: "treeverse@npm:3.0.0" - checksum: 10/a053ad73f800c64c53ecf0effe7ea12e16eae1cf03f0901ac6b61390b6440d05d0aa8c942b6e77d2e9237d247b36fd405284942419f3817c9c3ef43bc5236218 +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10/96e1a82453c6c96eef53a37a1d6134c9f2482f94068f98a59145d0986ca4e497bf110a410adf73857e588165eab3899f0ebcf7b3890c1b3ce802abc0d65967d4 languageName: node linkType: hard -"treport@npm:^3.0.4": - version: 3.0.4 - resolution: "treport@npm:3.0.4" +"prompts@npm:^2.0.1": + version: 2.4.2 + resolution: "prompts@npm:2.4.2" dependencies: - "@isaacs/import-jsx": "npm:^4.0.1" - cardinal: "npm:^2.1.1" - chalk: "npm:^3.0.0" - ink: "npm:^3.2.0" - ms: "npm:^2.1.2" - tap-parser: "npm:^11.0.0" - tap-yaml: "npm:^1.0.0" - unicode-length: "npm:^2.0.2" - peerDependencies: - react: ^17.0.2 - checksum: 10/8112e17088586430351a56f480593040a3c37d5269e96776e35c497d1680fa0fa3d3f060b03d84778e27a682c7b7d109a01c20687048d82201e1e1d7035af3a9 + kleur: "npm:^3.0.3" + sisteransi: "npm:^1.0.5" + checksum: 10/c52536521a4d21eff4f2f2aa4572446cad227464066365a7167e52ccf8d9839c099f9afec1aba0eed3d5a2514b3e79e0b3e7a1dc326b9acde6b75d27ed74b1a9 + languageName: node + linkType: hard + +"proto-list@npm:~1.2.1": + version: 1.2.4 + resolution: "proto-list@npm:1.2.4" + checksum: 10/9cc3b46d613fa0d637033b225db1bc98e914c3c05864f7adc9bee728192e353125ef2e49f71129a413f6333951756000b0e54f299d921f02d3e9e370cc994100 languageName: node linkType: hard -"trim-newlines@npm:^3.0.0": - version: 3.0.1 - resolution: "trim-newlines@npm:3.0.1" - checksum: 10/b530f3fadf78e570cf3c761fb74fef655beff6b0f84b29209bac6c9622db75ad1417f4a7b5d54c96605dcd72734ad44526fef9f396807b90839449eb543c6206 +"protobufjs@npm:>=7.2.5": + version: 7.2.5 + resolution: "protobufjs@npm:7.2.5" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/node": "npm:>=13.7.0" + long: "npm:^5.0.0" + checksum: 10/6c5aa62b61dff843f585f3acd9cb7a82d566de2dbf167a300b39afee91b04298c4b4aec61354b7c00308b40596f5f3f4b07d6246cfb4ee0abeaea25101033315 languageName: node linkType: hard -"trim-newlines@npm:^4.0.2": - version: 4.0.2 - resolution: "trim-newlines@npm:4.0.2" - checksum: 10/1eef206eb77361856dff0b827e5811baf64574bb21e81b7ad643fe321c5c19b0a452dd83e9afc31206993fcff9bb90a379925d7b5915f887de1ca7da5b57933a +"protoc-gen-ts@npm:0.8.7": + version: 0.8.7 + resolution: "protoc-gen-ts@npm:0.8.7" + bin: + protoc-gen-ts: protoc-gen-ts.js + checksum: 10/5f60e0f6e03d26ca91544f629f6f9e1431b16fab64dfd0f6d7e604ba8f07c94361c362ffd9d8772b4546528d2c9397c2a2c5729d0b4a59c0dcdfe1f458c1e2d5 languageName: node linkType: hard -"trim-right@npm:^1.0.1": - version: 1.0.1 - resolution: "trim-right@npm:1.0.1" - checksum: 10/9120af534e006a7424a4f9358710e6e707887b6ccf7ea69e50d6ac6464db1fe22268400def01752f09769025d480395159778153fb98d4a2f6f40d4cf5d4f3b6 +"protocols@npm:^2.0.0, protocols@npm:^2.0.1": + version: 2.0.1 + resolution: "protocols@npm:2.0.1" + checksum: 10/0cd08a55b9cb7cc96fed7a528255320428a7c86fd5f3f35965845285436433b7836178893168f80584efdf86391cd7c0a837b6f6bc5ddac3029c76be61118ba5 languageName: node linkType: hard -"triple-beam@npm:^1.3.0": - version: 1.3.0 - resolution: "triple-beam@npm:1.3.0" - checksum: 10/7d7b77d8625fb252c126c24984a68de462b538a8fcd1de2abd0a26421629cf3527d48e23b3c2264f08f4a6c3bc40a478a722176f4d7b6a1acc154cb70c359f2b +"proxy-from-env@npm:^1.1.0": + version: 1.1.0 + resolution: "proxy-from-env@npm:1.1.0" + checksum: 10/f0bb4a87cfd18f77bc2fba23ae49c3b378fb35143af16cc478171c623eebe181678f09439707ad80081d340d1593cd54a33a0113f3ccb3f4bc9451488780ee23 languageName: node linkType: hard -"trivial-deferred@npm:^1.0.1": - version: 1.0.1 - resolution: "trivial-deferred@npm:1.0.1" - checksum: 10/1615081f03df8e36c4c6f648597f02df50144fd81ccdcd0c8ba67b1c2a5f9f344d90a3983caf9927f866983064c4c26854fef637a8f3672ccfdff92039519763 +"pstree.remy@npm:^1.1.8": + version: 1.1.8 + resolution: "pstree.remy@npm:1.1.8" + checksum: 10/ef13b1b5896b35f67dbd4fb7ba54bb2a5da1a5c317276cbad4bcad4159bf8f7b5e1748dc244bf36865f3d560d2fc952521581280a91468c9c2df166cc760c8c1 languageName: node linkType: hard -"truffle@npm:5.11.2": - version: 5.11.2 - resolution: "truffle@npm:5.11.2" +"public-encrypt@npm:^4.0.0": + version: 4.0.3 + resolution: "public-encrypt@npm:4.0.3" dependencies: - "@truffle/db": "npm:^2.0.33" - "@truffle/db-loader": "npm:^0.2.33" - "@truffle/debugger": "npm:^12.1.2" - app-module-path: "npm:^2.2.0" - ganache: "npm:7.9.0" - mocha: "npm:10.1.0" - original-require: "npm:^1.0.1" - dependenciesMeta: - "@truffle/db": - optional: true - bin: - truffle: build/cli.bundled.js - checksum: 10/e524cfc5d4ce9a2a871f9b9caf075f48da8a0ba783c756710fb7a60e1b07b3b25a045e9541dc9ac5a84100ca3db28d75189bc62f83217b8e5f1eefa6fbc4d515 + bn.js: "npm:^4.1.0" + browserify-rsa: "npm:^4.0.0" + create-hash: "npm:^1.1.0" + parse-asn1: "npm:^5.0.0" + randombytes: "npm:^2.0.1" + safe-buffer: "npm:^5.1.2" + checksum: 10/059d64da8ba9ea0733377d23b57b6cbe5be663c8eb187b9c051eec85f799ff95c4e194eb3a69db07cc1f73a2a63519e67716ae9b8630e13e7149840d0abe044d languageName: node linkType: hard -"truncate-utf8-bytes@npm:^1.0.0": - version: 1.0.2 - resolution: "truncate-utf8-bytes@npm:1.0.2" +"pump@npm:^3.0.0": + version: 3.0.0 + resolution: "pump@npm:3.0.0" dependencies: - utf8-byte-length: "npm:^1.0.1" - checksum: 10/366e47a0e22cc271d37eb4e62820453fb877784b55b37218842758b7aa1d402eedd0f8833cfb5d6f7a6cae1535d84289bd5e32c4ee962d2a86962fb7038a6983 + end-of-stream: "npm:^1.1.0" + once: "npm:^1.3.1" + checksum: 10/e42e9229fba14732593a718b04cb5e1cfef8254544870997e0ecd9732b189a48e1256e4e5478148ecb47c8511dca2b09eae56b4d0aad8009e6fac8072923cfc9 languageName: node linkType: hard -"tryer@npm:^1.0.1": - version: 1.0.1 - resolution: "tryer@npm:1.0.1" - checksum: 10/4d869d187bd715136903b349f39d1cc3e5c19f742689a348190aff92408ee8dd3d7d9adc26dc9265c35d722731184c979ed316109b6c1239249a8707bb92cc49 +"punycode@npm:1.3.2": + version: 1.3.2 + resolution: "punycode@npm:1.3.2" + checksum: 10/5c57d588c60679fd1b9400c75de06e327723f2b38e21e195027ba7a59006725f7b817dce5b26d47c7f8c1c842d28275aa59955a06d2e467cffeba70b7e0576bb languageName: node linkType: hard -"ts-api-utils@npm:^1.0.1": - version: 1.0.1 - resolution: "ts-api-utils@npm:1.0.1" - peerDependencies: - typescript: ">=4.2.0" - checksum: 10/8b16fa5645442854fbaef83c57beec8daf0326b24576efe744d85bb3851241b8deac2df424ebe73c0bb7d5bfaac6bccbb554222b788f9fdf90998d164f38d640 +"punycode@npm:^2.0.0, punycode@npm:^2.1.0, punycode@npm:^2.1.1": + version: 2.1.1 + resolution: "punycode@npm:2.1.1" + checksum: 10/939daa010c2cacebdb060c40ecb52fef0a739324a66f7fffe0f94353a1ee83e3b455e9032054c4a0c4977b0a28e27086f2171c392832b59a01bd948fd8e20914 languageName: node linkType: hard -"ts-graphviz@npm:^1.8.1": - version: 1.8.2 - resolution: "ts-graphviz@npm:1.8.2" - checksum: 10/969b06332ca622c148f7b404569af1b972bbe7ee9ba1226350dd0d99bc92c1c95eb6bf9e69aafce51a6c2493a1342b25a8edd6883f27bd516778d401b2a3623f +"pupa@npm:^2.1.1": + version: 2.1.1 + resolution: "pupa@npm:2.1.1" + dependencies: + escape-goat: "npm:^2.0.0" + checksum: 10/49529e50372ffdb0cccf0efa0f3b3cb0a2c77805d0d9cc2725bd2a0f6bb414631e61c93a38561b26be1259550b7bb6c2cb92315aa09c8bf93f3bdcb49f2b2fb7 languageName: node linkType: hard -"ts-interface-checker@npm:^0.1.9": - version: 0.1.13 - resolution: "ts-interface-checker@npm:0.1.13" - checksum: 10/9f7346b9e25bade7a1050c001ec5a4f7023909c0e1644c5a96ae20703a131627f081479e6622a4ecee2177283d0069e651e507bedadd3904fc4010ab28ffce00 +"pure-rand@npm:^6.0.0": + version: 6.0.2 + resolution: "pure-rand@npm:6.0.2" + checksum: 10/d33f92dbac58eba65e851046905379ddd32b0af11daa49187bf2b44c4da6e5685cdcd8775388a3c706c126dcdb19bdcc0f736a0c432de25d68d21a762ff5f572 languageName: node linkType: hard -"ts-jest@npm:29.1.1": - version: 29.1.1 - resolution: "ts-jest@npm:29.1.1" - dependencies: - bs-logger: "npm:0.x" - fast-json-stable-stringify: "npm:2.x" - jest-util: "npm:^29.0.0" - json5: "npm:^2.2.3" - lodash.memoize: "npm:4.x" - make-error: "npm:1.x" - semver: "npm:^7.5.3" - yargs-parser: "npm:^21.0.1" - peerDependencies: - "@babel/core": ">=7.0.0-beta.0 <8" - "@jest/types": ^29.0.0 - babel-jest: ^29.0.0 - jest: ^29.0.0 - typescript: ">=4.3 <6" - peerDependenciesMeta: - "@babel/core": - optional: true - "@jest/types": - optional: true - babel-jest: - optional: true - esbuild: - optional: true - bin: - ts-jest: cli.js - checksum: 10/30e8259baba95dd786e64f7c18b864e904598f3ba07911be4d9bd29ca9c3c0024bad4ccf8ec0abd2a2fa14b06622cbbadff1b3be822189c657196442d33ee6ca +"querystring-es3@npm:^0.2.1": + version: 0.2.1 + resolution: "querystring-es3@npm:0.2.1" + checksum: 10/c99fccfe1a9c4c25ea6194fa7a559fdb83d2628f118f898af6f0ac02c4ffcd7e0576997bb80e7dfa892d193988b60e23d4968122426351819f87051862af991c languageName: node linkType: hard -"ts-loader@npm:9.4.4": - version: 9.4.4 - resolution: "ts-loader@npm:9.4.4" - dependencies: - chalk: "npm:^4.1.0" - enhanced-resolve: "npm:^5.0.0" - micromatch: "npm:^4.0.0" - semver: "npm:^7.3.4" - peerDependencies: - typescript: "*" - webpack: ^5.0.0 - checksum: 10/52302f3540962d779fc346281d8d4f7310f73e129debc4fb55c1fb3f097519009b32f7e2806299904e98961c785784fccb70ceca9076c4bae33f064ad11dd982 +"querystring@npm:0.2.0": + version: 0.2.0 + resolution: "querystring@npm:0.2.0" + checksum: 10/37b91720be8c8de87b49d1a68f0ceafbbeda6efe6334ce7aad080b0b4111f933a40650b8a6669c1bc629cd8bb37c67cb7b5a42ec0758662efbce44b8faa1766d languageName: node linkType: hard -"ts-node@npm:10.9.1, ts-node@npm:^10.8.1": - version: 10.9.1 - resolution: "ts-node@npm:10.9.1" - dependencies: - "@cspotcode/source-map-support": "npm:^0.8.0" - "@tsconfig/node10": "npm:^1.0.7" - "@tsconfig/node12": "npm:^1.0.7" - "@tsconfig/node14": "npm:^1.0.0" - "@tsconfig/node16": "npm:^1.0.2" - acorn: "npm:^8.4.1" - acorn-walk: "npm:^8.1.1" - arg: "npm:^4.1.0" - create-require: "npm:^1.1.0" - diff: "npm:^4.0.1" - make-error: "npm:^1.1.1" - v8-compile-cache-lib: "npm:^3.0.1" - yn: "npm:3.1.1" - peerDependencies: - "@swc/core": ">=1.2.50" - "@swc/wasm": ">=1.2.50" - "@types/node": "*" - typescript: ">=2.7" - peerDependenciesMeta: - "@swc/core": - optional: true - "@swc/wasm": - optional: true - bin: - ts-node: dist/bin.js - ts-node-cwd: dist/bin-cwd.js - ts-node-esm: dist/bin-esm.js - ts-node-script: dist/bin-script.js - ts-node-transpile-only: dist/bin-transpile.js - ts-script: dist/bin-script-deprecated.js - checksum: 10/bee56d4dc96ccbafc99dfab7b73fbabc62abab2562af53cdea91c874a301b9d11e42bc33c0a032a6ed6d813dbdc9295ec73dde7b73ea4ebde02b0e22006f7e04 +"queue-microtask@npm:^1.2.2": + version: 1.2.3 + resolution: "queue-microtask@npm:1.2.3" + checksum: 10/72900df0616e473e824202113c3df6abae59150dfb73ed13273503127235320e9c8ca4aaaaccfd58cf417c6ca92a6e68ee9a5c3182886ae949a768639b388a7b languageName: node linkType: hard -"ts-node@npm:7.0.1": - version: 7.0.1 - resolution: "ts-node@npm:7.0.1" - dependencies: - arrify: "npm:^1.0.0" - buffer-from: "npm:^1.1.0" - diff: "npm:^3.1.0" - make-error: "npm:^1.1.1" - minimist: "npm:^1.2.0" - mkdirp: "npm:^0.5.1" - source-map-support: "npm:^0.5.6" - yn: "npm:^2.0.0" - bin: - ts-node: dist/bin.js - checksum: 10/c1e0f1582867c34a03a25b1861e86922b9576931d473d48cd13275400832972350c4564e5f2c2df5817be6acbbb8e1dedf43bdd6f8c0f06b15d3530562a08a90 +"quick-lru@npm:^4.0.1": + version: 4.0.1 + resolution: "quick-lru@npm:4.0.1" + checksum: 10/5c7c75f1c696750f619b165cc9957382f919e4207dabf04597a64f0298861391cdc5ee91a1dde1a5d460ecf7ee1af7fc36fef6d155bef2be66f05d43fd63d4f0 languageName: node linkType: hard -"ts-node@npm:8.9.1": - version: 8.9.1 - resolution: "ts-node@npm:8.9.1" - dependencies: - arg: "npm:^4.1.0" - diff: "npm:^4.0.1" - make-error: "npm:^1.1.1" - source-map-support: "npm:^0.5.17" - yn: "npm:3.1.1" - peerDependencies: - typescript: ">=2.7" - bin: - ts-node: dist/bin.js - ts-node-script: dist/bin-script.js - ts-node-transpile-only: dist/bin-transpile.js - ts-script: dist/bin-script-deprecated.js - checksum: 10/a56447322707fe980ec53518c1705a5f800ba9907e89124bdce479646d221f7342401f326dbc7aa9b9ec2ed513186ccee9e4526d1bd09e8aabfc49339b56ca9f +"quick-lru@npm:^5.1.1": + version: 5.1.1 + resolution: "quick-lru@npm:5.1.1" + checksum: 10/a516faa25574be7947969883e6068dbe4aa19e8ef8e8e0fd96cddd6d36485e9106d85c0041a27153286b0770b381328f4072aa40d3b18a19f5f7d2b78b94b5ed languageName: node linkType: hard -"ts-node@npm:^10.0.0": - version: 10.5.0 - resolution: "ts-node@npm:10.5.0" - dependencies: - "@cspotcode/source-map-support": "npm:0.7.0" - "@tsconfig/node10": "npm:^1.0.7" - "@tsconfig/node12": "npm:^1.0.7" - "@tsconfig/node14": "npm:^1.0.0" - "@tsconfig/node16": "npm:^1.0.2" - acorn: "npm:^8.4.1" - acorn-walk: "npm:^8.1.1" - arg: "npm:^4.1.0" - create-require: "npm:^1.1.0" - diff: "npm:^4.0.1" - make-error: "npm:^1.1.1" - v8-compile-cache-lib: "npm:^3.0.0" - yn: "npm:3.1.1" - peerDependencies: - "@swc/core": ">=1.2.50" - "@swc/wasm": ">=1.2.50" - "@types/node": "*" - typescript: ">=2.7" - peerDependenciesMeta: - "@swc/core": - optional: true - "@swc/wasm": - optional: true - bin: - ts-node: dist/bin.js - ts-node-cwd: dist/bin-cwd.js - ts-node-script: dist/bin-script.js - ts-node-transpile-only: dist/bin-transpile.js - ts-script: dist/bin-script-deprecated.js - checksum: 10/39e500985f54a2cb9ed2d7e1b535a34edf1701c72ebe0a1da102bfad3c01632043441f2703bf243510d33b0a15fa5ff2e2d3dbcea56b0748dfffb677c7970c7b +"quote-unquote@npm:^1.0.0": + version: 1.0.0 + resolution: "quote-unquote@npm:1.0.0" + checksum: 10/955a2ead534f5b6a3f8d4dc5a4b95ac6468213d3fb11f8c1592a0a56345c45a3d14d5ca04d3de2bc9891493fcac38c03dfa91c48a6159aef50124e9c5afcea49 + languageName: node + linkType: hard + +"randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5, randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: "npm:^5.1.0" + checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc languageName: node linkType: hard -"tsconfig-paths@npm:^3.14.2": - version: 3.14.2 - resolution: "tsconfig-paths@npm:3.14.2" +"randomfill@npm:^1.0.3": + version: 1.0.4 + resolution: "randomfill@npm:1.0.4" dependencies: - "@types/json5": "npm:^0.0.29" - json5: "npm:^1.0.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10/17f23e98612a60cf23b80dc1d3b7b840879e41fcf603868fc3618a30f061ac7b463ef98cad8c28b68733b9bfe0cc40ffa2bcf29e94cf0d26e4f6addf7ac8527d + randombytes: "npm:^2.0.5" + safe-buffer: "npm:^5.1.0" + checksum: 10/33734bb578a868d29ee1b8555e21a36711db084065d94e019a6d03caa67debef8d6a1bfd06a2b597e32901ddc761ab483a85393f0d9a75838f1912461d4dbfc7 languageName: node linkType: hard -"tsconfig-paths@npm:^3.15.0": - version: 3.15.0 - resolution: "tsconfig-paths@npm:3.15.0" +"rc@npm:^1.2.8": + version: 1.2.8 + resolution: "rc@npm:1.2.8" dependencies: - "@types/json5": "npm:^0.0.29" - json5: "npm:^1.0.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10/2041beaedc6c271fc3bedd12e0da0cc553e65d030d4ff26044b771fac5752d0460944c0b5e680f670c2868c95c664a256cec960ae528888db6ded83524e33a14 + deep-extend: "npm:^0.6.0" + ini: "npm:~1.3.0" + minimist: "npm:^1.2.0" + strip-json-comments: "npm:~2.0.1" + bin: + rc: ./cli.js + checksum: 10/5c4d72ae7eec44357171585938c85ce066da8ca79146b5635baf3d55d74584c92575fa4e2c9eac03efbed3b46a0b2e7c30634c012b4b4fa40d654353d3c163eb languageName: node linkType: hard -"tsconfig-paths@npm:^4.1.0, tsconfig-paths@npm:^4.2.0": - version: 4.2.0 - resolution: "tsconfig-paths@npm:4.2.0" +"react-devtools-core@npm:^4.19.1": + version: 4.28.5 + resolution: "react-devtools-core@npm:4.28.5" dependencies: - json5: "npm:^2.2.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10/5e55cc2fb6b800eb72011522e10edefccb45b1f9af055681a51354c9b597d1390c6fa9cc356b8c7529f195ac8a90a78190d563159f3a1eed10e01bbd4d01a8ab + shell-quote: "npm:^1.6.1" + ws: "npm:^7" + checksum: 10/7c951a6a9b773e4fd56b2f1894c83aaec417373cf01aa261bd2dd286e6c6f1d8c67a3749ecb1d106dbf9e8cda0e6ed1bfd6ce1b61c81e035f2527be3dd9eebc2 languageName: node linkType: hard -"tslib@npm:2.0.3": - version: 2.0.3 - resolution: "tslib@npm:2.0.3" - checksum: 10/5f57eb3c6d01ebde567020539dd2282455bce24b5066228d3ca7bb5a5511b2d7c754225d6b2a0ea3c128cf6cd467469b581f946de834ccd0e042fa29279551f6 +"react-is@npm:^18.0.0": + version: 18.1.0 + resolution: "react-is@npm:18.1.0" + checksum: 10/fe09c86d5e12a8531bf3e748660f3dffbe900a6da0b488c7efaf0a866e16b74ecc1b0011b0960b13594f8719f39f87a987c0c85edff0b2d3e2f14b87e7230ad2 languageName: node linkType: hard -"tslib@npm:2.4.0, tslib@npm:^2.3.0": - version: 2.4.0 - resolution: "tslib@npm:2.4.0" - checksum: 10/d8379e68b36caf082c1905ec25d17df8261e1d68ddc1abfd6c91158a064f6e4402039ae7c02cf4c81d12e3a2a2c7cd8ea2f57b233eb80136a2e3e7279daf2911 +"react-reconciler@npm:^0.26.2": + version: 0.26.2 + resolution: "react-reconciler@npm:0.26.2" + dependencies: + loose-envify: "npm:^1.1.0" + object-assign: "npm:^4.1.1" + scheduler: "npm:^0.20.2" + peerDependencies: + react: ^17.0.2 + checksum: 10/7b9369a12e57859088aaef052abe03138ad8eefe67308bf8be6ef8f529be06276dc4977a4d665dc9b9e08188bd308b2a0d58dc181253c0205c98e03d7c0901b7 languageName: node linkType: hard -"tslib@npm:2.5.0, tslib@npm:^2.4.0": - version: 2.5.0 - resolution: "tslib@npm:2.5.0" - checksum: 10/ea556fbdf396fe15dbd45e242754e86e7c36e0dce8644404a7c8a81ae1e940744dc639569aeca1ae370a7f804d82872f3fd8564eb23be9adb7618201d0314dac +"react@npm:^17.0.2": + version: 17.0.2 + resolution: "react@npm:17.0.2" + dependencies: + loose-envify: "npm:^1.1.0" + object-assign: "npm:^4.1.1" + checksum: 10/ece60c31c1d266d132783aaaffa185d2e4c9b4db144f853933ec690cee1e0600c8929a1dd0a9e79323eea8e2df636c9a06d40f6cfdc9f797f65225433e67f707 languageName: node linkType: hard -"tslib@npm:2.6.1": - version: 2.6.1 - resolution: "tslib@npm:2.6.1" - checksum: 10/5cf1aa7ea4ca7ee9b8aa3d80eb7ee86634b307fbefcb948a831c2b13728e21e156ef7fb9edcbe21f05c08f65e4cf4480587086f31133491ba1a49c9e0b28fc75 +"read-cmd-shim@npm:^4.0.0": + version: 4.0.0 + resolution: "read-cmd-shim@npm:4.0.0" + checksum: 10/69a83acf0a3e2357762d5944a6f4a3f3c5527d0f9fe8a5c9362225aaf702ccfa580ff3bc0b84809c99e88861a5e5be147629717f02ff9befdac68fca1ccc7664 languageName: node linkType: hard -"tslib@npm:2.6.2, tslib@npm:^2.5.0, tslib@npm:^2.5.3, tslib@npm:^2.6.1, tslib@npm:^2.6.2": - version: 2.6.2 - resolution: "tslib@npm:2.6.2" - checksum: 10/bd26c22d36736513980091a1e356378e8b662ded04204453d353a7f34a4c21ed0afc59b5f90719d4ba756e581a162ecbf93118dc9c6be5acf70aa309188166ca +"read-package-json-fast@npm:^3.0.0, read-package-json-fast@npm:^3.0.2": + version: 3.0.2 + resolution: "read-package-json-fast@npm:3.0.2" + dependencies: + json-parse-even-better-errors: "npm:^3.0.0" + npm-normalize-package-bin: "npm:^3.0.0" + checksum: 10/8d406869f045f1d76e2a99865a8fd1c1af9c1dc06200b94d2b07eef87ed734b22703a8d72e1cd36ea36cc48e22020bdd187f88243c7dd0563f72114d38c17072 languageName: node linkType: hard -"tslib@npm:^1.13.0, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": - version: 1.14.1 - resolution: "tslib@npm:1.14.1" - checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb +"read-pkg-up@npm:^10.0.0": + version: 10.1.0 + resolution: "read-pkg-up@npm:10.1.0" + dependencies: + find-up: "npm:^6.3.0" + read-pkg: "npm:^8.1.0" + type-fest: "npm:^4.2.0" + checksum: 10/554470d7ff54026b561f6c851c35470f5bc95a47bfb8645dc13c447d83c42c78b42d47fffdc8f86bffe731215406dab498f75cb27494e1fb3eca7fa8d00fb501 languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.2.0": - version: 2.3.1 - resolution: "tslib@npm:2.3.1" - checksum: 10/5e7de59ed9f2b705b399bda28326b7c3e7526deb48bbe1716e2e17fbd4cecbb610253d09c7b8fd0a6e76cfed9304e2e608cdb81bb1ee812d69e5089d1a94c71a +"read-pkg-up@npm:^7.0.1": + version: 7.0.1 + resolution: "read-pkg-up@npm:7.0.1" + dependencies: + find-up: "npm:^4.1.0" + read-pkg: "npm:^5.2.0" + type-fest: "npm:^0.8.1" + checksum: 10/e4e93ce70e5905b490ca8f883eb9e48b5d3cebc6cd4527c25a0d8f3ae2903bd4121c5ab9c5a3e217ada0141098eeb661313c86fa008524b089b8ed0b7f165e44 languageName: node linkType: hard -"tslib@npm:^2.0.3": - version: 2.6.0 - resolution: "tslib@npm:2.6.0" - checksum: 10/52360693c62761f902e1946b350188be6505de297068b33421cb26bedd99591203a74cb2a49e1f43f0922d59b1fb3499fe5cfe61a61ca65a1743d5c92c69720a +"read-pkg-up@npm:^8.0.0": + version: 8.0.0 + resolution: "read-pkg-up@npm:8.0.0" + dependencies: + find-up: "npm:^5.0.0" + read-pkg: "npm:^6.0.0" + type-fest: "npm:^1.0.1" + checksum: 10/fe4c80401656b40b408884457fffb5a8015c03b1018cfd8e48f8d82a5e9023e24963603aeb2755608d964593e046c15b34d29b07d35af9c7aa478be81805209c languageName: node linkType: hard -"tslib@npm:~2.4.0": - version: 2.4.1 - resolution: "tslib@npm:2.4.1" - checksum: 10/e14311d5392ec0e3519feb9afdb54483d7f3aa2d3def6f1a1a30bd3deca5dfeadd106e80bee9ba880bce86a2e50854c9fe5958572cd188d7ac6f8625101a6a8f +"read-pkg@npm:^3.0.0": + version: 3.0.0 + resolution: "read-pkg@npm:3.0.0" + dependencies: + load-json-file: "npm:^4.0.0" + normalize-package-data: "npm:^2.3.2" + path-type: "npm:^3.0.0" + checksum: 10/398903ebae6c7e9965419a1062924436cc0b6f516c42c4679a90290d2f87448ed8f977e7aa2dbba4aa1ac09248628c43e493ac25b2bc76640e946035200e34c6 languageName: node linkType: hard -"tslint@npm:6.1.3": - version: 6.1.3 - resolution: "tslint@npm:6.1.3" +"read-pkg@npm:^5.2.0": + version: 5.2.0 + resolution: "read-pkg@npm:5.2.0" dependencies: - "@babel/code-frame": "npm:^7.0.0" - builtin-modules: "npm:^1.1.1" - chalk: "npm:^2.3.0" - commander: "npm:^2.12.1" - diff: "npm:^4.0.1" - glob: "npm:^7.1.1" - js-yaml: "npm:^3.13.1" - minimatch: "npm:^3.0.4" - mkdirp: "npm:^0.5.3" - resolve: "npm:^1.3.2" - semver: "npm:^5.3.0" - tslib: "npm:^1.13.0" - tsutils: "npm:^2.29.0" - peerDependencies: - typescript: ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" - bin: - tslint: bin/tslint - checksum: 10/26720946260151c6b4e91e637443f3c09466dcd29bb3455ba4ae39a8d8d249a5f63cb6ec09ae916bd9e4385533f1df9954a2b349349336fb44ed826f5c38e6ec + "@types/normalize-package-data": "npm:^2.4.0" + normalize-package-data: "npm:^2.5.0" + parse-json: "npm:^5.0.0" + type-fest: "npm:^0.6.0" + checksum: 10/eb696e60528b29aebe10e499ba93f44991908c57d70f2d26f369e46b8b9afc208ef11b4ba64f67630f31df8b6872129e0a8933c8c53b7b4daf0eace536901222 languageName: node linkType: hard -"tsort@npm:0.0.1": - version: 0.0.1 - resolution: "tsort@npm:0.0.1" - checksum: 10/5f15ca0e91142a72d2acb6e9798a0297b754ce402c8f8bbb63457ee17f062272f3ccdf39f4c3155f0568337cb3b5422410b40cfeed72fe75fbb9a71f016cdcf9 +"read-pkg@npm:^6.0.0": + version: 6.0.0 + resolution: "read-pkg@npm:6.0.0" + dependencies: + "@types/normalize-package-data": "npm:^2.4.0" + normalize-package-data: "npm:^3.0.2" + parse-json: "npm:^5.2.0" + type-fest: "npm:^1.0.1" + checksum: 10/0cebdff381128e923815c643074a87011070e5fc352bee575d327d6485da3317fab6d802a7b03deeb0be7be8d3ad1640397b3d5d2f044452caf4e8d1736bf94f languageName: node linkType: hard -"tsutils@npm:^2.29.0": - version: 2.29.0 - resolution: "tsutils@npm:2.29.0" +"read-pkg@npm:^8.0.0, read-pkg@npm:^8.1.0": + version: 8.1.0 + resolution: "read-pkg@npm:8.1.0" dependencies: - tslib: "npm:^1.8.1" - peerDependencies: - typescript: ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" - checksum: 10/9724fee9a21c399e5914f50d888467f6d116f2e466ba77d294de0437ee7bb4a60e0c919a36518845af8c6fa0aabf6b72a4a01d4464db16fa719ff4e0dd45cb82 + "@types/normalize-package-data": "npm:^2.4.1" + normalize-package-data: "npm:^6.0.0" + parse-json: "npm:^7.0.0" + type-fest: "npm:^4.2.0" + checksum: 10/f4cd164f096e78cf3e338a55f800043524e3055f9b0b826143290002fafc951025fc3cbd6ca683ebaf7945efcfb092d31c683dd252a7871a974662985c723b67 languageName: node linkType: hard -"tsutils@npm:^3.21.0": - version: 3.21.0 - resolution: "tsutils@npm:3.21.0" +"read-pkg@npm:^9.0.0": + version: 9.0.1 + resolution: "read-pkg@npm:9.0.1" dependencies: - tslib: "npm:^1.8.1" - peerDependencies: - typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - checksum: 10/ea036bec1dd024e309939ffd49fda7a351c0e87a1b8eb049570dd119d447250e2c56e0e6c00554e8205760e7417793fdebff752a46e573fbe07d4f375502a5b2 + "@types/normalize-package-data": "npm:^2.4.3" + normalize-package-data: "npm:^6.0.0" + parse-json: "npm:^8.0.0" + type-fest: "npm:^4.6.0" + unicorn-magic: "npm:^0.1.0" + checksum: 10/5544bea2a58c6e5706db49a96137e8f0768c69395f25363f934064fbba00bdcdaa326fcd2f4281741df38cf81dbf27b76138240dc6de0ed718cf650475e0de3c languageName: node linkType: hard -"tsx@npm:4.16.2": - version: 4.16.2 - resolution: "tsx@npm:4.16.2" +"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": + version: 3.6.0 + resolution: "readable-stream@npm:3.6.0" dependencies: - esbuild: "npm:~0.21.5" - fsevents: "npm:~2.3.3" - get-tsconfig: "npm:^4.7.5" - dependenciesMeta: - fsevents: - optional: true - bin: - tsx: dist/cli.mjs - checksum: 10/841ccbace3dc0c42704bb5c4cea47e1f4cd313aa4719fd4531e5ed40bb862b02349c76f7c56c53b64207eebbb1c2ac2e117482aabfbf197a30fbc0b2584b60be + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10/b80b3e6a7fafb1c79de7db541de357f4a5ee73bd70c21672f5a7c840d27bb27bdb0151e7ba2fd82c4a888df22ce0c501b0d9f3e4dfe51688876701c437d59536 languageName: node linkType: hard -"tsyringe@npm:^4.8.0": - version: 4.8.0 - resolution: "tsyringe@npm:4.8.0" +"readable-stream@npm:^2.3.8": + version: 2.3.8 + resolution: "readable-stream@npm:2.3.8" dependencies: - tslib: "npm:^1.9.3" - checksum: 10/3f0c5049c167cf32226894a0589ac3f25a7019c35d2cb06e65f4bd1618fd90c57d33ea600fdb41695c0d988628893e59d22e8cd4f89c7c97390d6cc58bf21985 + core-util-is: "npm:~1.0.0" + inherits: "npm:~2.0.3" + isarray: "npm:~1.0.0" + process-nextick-args: "npm:~2.0.0" + safe-buffer: "npm:~5.1.1" + string_decoder: "npm:~1.1.1" + util-deprecate: "npm:~1.0.1" + checksum: 10/8500dd3a90e391d6c5d889256d50ec6026c059fadee98ae9aa9b86757d60ac46fff24fafb7a39fa41d54cb39d8be56cc77be202ebd4cd8ffcf4cb226cbaa40d4 languageName: node linkType: hard -"tty-browserify@npm:^0.0.1": - version: 0.0.1 - resolution: "tty-browserify@npm:0.0.1" - checksum: 10/93b745d43fa5a7d2b948fa23be8d313576d1d884b48acd957c07710bac1c0d8ac34c0556ad4c57c73d36e11741763ef66b3fb4fb97b06b7e4d525315a3cd45f5 +"readdirp@npm:^3.6.0, readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 10/196b30ef6ccf9b6e18c4e1724b7334f72a093d011a99f3b5920470f0b3406a51770867b3e1ae9711f227ef7a7065982f6ee2ce316746b2cb42c88efe44297fe7 languageName: node linkType: hard -"tuf-js@npm:^1.1.7": - version: 1.1.7 - resolution: "tuf-js@npm:1.1.7" +"rechoir@npm:^0.7.0": + version: 0.7.1 + resolution: "rechoir@npm:0.7.1" dependencies: - "@tufjs/models": "npm:1.0.4" - debug: "npm:^4.3.4" - make-fetch-happen: "npm:^11.1.1" - checksum: 10/8ce0061b76a9dc89fc6e53bc1870afeb8e70083a751910273f959c5d0d574ba9b037a22d944ff97623e58eefa16b051f0ac678bd2da973d2f6b57359604fee31 + resolve: "npm:^1.9.0" + checksum: 10/2a04aab4e28c05fcd6ee6768446bc8b859d8f108e71fc7f5bcbc5ef25e53330ce2c11d10f82a24591a2df4c49c4f61feabe1fd11f844c66feedd4cd7bb61146a languageName: node linkType: hard -"tuf-js@npm:^2.2.1": - version: 2.2.1 - resolution: "tuf-js@npm:2.2.1" +"redent@npm:^3.0.0": + version: 3.0.0 + resolution: "redent@npm:3.0.0" dependencies: - "@tufjs/models": "npm:2.0.1" - debug: "npm:^4.3.4" - make-fetch-happen: "npm:^13.0.1" - checksum: 10/4c057f4f0cfb183d8634c026a592f4fb29fd4e3d88260e32949642deedf87a1ae407645bae4cca58299458679a1cb7721245cde1885d466c2dbc1fbac0bc008a + indent-string: "npm:^4.0.0" + strip-indent: "npm:^3.0.0" + checksum: 10/fa1ef20404a2d399235e83cc80bd55a956642e37dd197b4b612ba7327bf87fa32745aeb4a1634b2bab25467164ab4ed9c15be2c307923dd08b0fe7c52431ae6b languageName: node linkType: hard -"tunnel-agent@npm:^0.6.0": - version: 0.6.0 - resolution: "tunnel-agent@npm:0.6.0" +"redent@npm:^4.0.0": + version: 4.0.0 + resolution: "redent@npm:4.0.0" dependencies: - safe-buffer: "npm:^5.0.1" - checksum: 10/7f0d9ed5c22404072b2ae8edc45c071772affd2ed14a74f03b4e71b4dd1a14c3714d85aed64abcaaee5fec2efc79002ba81155c708f4df65821b444abb0cfade + indent-string: "npm:^5.0.0" + strip-indent: "npm:^4.0.0" + checksum: 10/6944e7b1d8f3fd28c2515f5c605b9f7f0ea0f4edddf41890bbbdd4d9ee35abb7540c3b278f03ff827bd278bb6ff4a5bd8692ca406b748c5c1c3ce7355e9fbf8f + languageName: node + linkType: hard + +"redeyed@npm:~2.1.0": + version: 2.1.1 + resolution: "redeyed@npm:2.1.1" + dependencies: + esprima: "npm:~4.0.0" + checksum: 10/86880f97d54bb55bbf1c338e27fe28f18f52afc2f5afa808354a09a3777aa79b4f04e04844350d7fec80aa2d299196bde256b21f586e7e5d9b63494bd4a9db27 languageName: node linkType: hard -"tunnel@npm:0.0.6, tunnel@npm:^0.0.6": - version: 0.0.6 - resolution: "tunnel@npm:0.0.6" - checksum: 10/cf1ffed5e67159b901a924dbf94c989f20b2b3b65649cfbbe4b6abb35955ce2cf7433b23498bdb2c5530ab185b82190fce531597b3b4a649f06a907fc8702405 +"reflect-metadata@npm:0.1.13": + version: 0.1.13 + resolution: "reflect-metadata@npm:0.1.13" + checksum: 10/732570da35d2d96f8fdd5aac60fb263aa92f6512eaded5962b052bd9e90f22a9dec5aaf0d7ff4bfe97646c9530e8444e8435c2d80b24d0bdf938b5d47f6f5b83 languageName: node linkType: hard -"tv4@npm:^1.2.7": - version: 1.3.0 - resolution: "tv4@npm:1.3.0" - checksum: 10/2b11f89805ad1a34ab1aab27117ab97de4c67c49f6b02e88d35c38c713df15eaeff69e3a30f9696a0ea1b678df625925a3114ed9e7c32429a9061062f3568762 +"regexp.prototype.flags@npm:^1.4.3, regexp.prototype.flags@npm:^1.5.0": + version: 1.5.0 + resolution: "regexp.prototype.flags@npm:1.5.0" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + functions-have-names: "npm:^1.2.3" + checksum: 10/c8229ec3f59f8312248268009cb9bf9145a3982117f747499b994e8efb378ac8b62e812fd88df75225d53cb4879d2bb2fe47b2a50776cba076d8ff71fc0b1629 languageName: node linkType: hard -"tweetnacl-util@npm:^0.15.1": - version: 0.15.1 - resolution: "tweetnacl-util@npm:0.15.1" - checksum: 10/ae6aa8a52cdd21a95103a4cc10657d6a2040b36c7a6da7b9d3ab811c6750a2d5db77e8c36969e75fdee11f511aa2b91c552496c6e8e989b6e490e54aca2864fc +"regexp.prototype.flags@npm:^1.5.2": + version: 1.5.2 + resolution: "regexp.prototype.flags@npm:1.5.2" + dependencies: + call-bind: "npm:^1.0.6" + define-properties: "npm:^1.2.1" + es-errors: "npm:^1.3.0" + set-function-name: "npm:^2.0.1" + checksum: 10/9fffc01da9c4e12670ff95bc5204364615fcc12d86fc30642765af908675678ebb0780883c874b2dbd184505fb52fa603d80073ecf69f461ce7f56b15d10be9c languageName: node linkType: hard -"tweetnacl@npm:^0.14.3, tweetnacl@npm:~0.14.0": - version: 0.14.5 - resolution: "tweetnacl@npm:0.14.5" - checksum: 10/04ee27901cde46c1c0a64b9584e04c96c5fe45b38c0d74930710751ea991408b405747d01dfae72f80fc158137018aea94f9c38c651cb9c318f0861a310c3679 +"regexpp@npm:^3.0.0": + version: 3.2.0 + resolution: "regexpp@npm:3.2.0" + checksum: 10/3310010895a906873262f4b494fc99bcef1e71ef6720a0532c5999ca586498cbd4a284c8e3c2423f9d1d37512fd08d6064b7564e0e59508cf938f76dd15ace84 languageName: node linkType: hard -"tweetnacl@npm:^1.0.1, tweetnacl@npm:^1.0.3": - version: 1.0.3 - resolution: "tweetnacl@npm:1.0.3" - checksum: 10/ca122c2f86631f3c0f6d28efb44af2a301d4a557a62a3e2460286b08e97567b258c2212e4ad1cfa22bd6a57edcdc54ba76ebe946847450ab0999e6d48ccae332 +"registry-auth-token@npm:^4.0.0": + version: 4.2.1 + resolution: "registry-auth-token@npm:4.2.1" + dependencies: + rc: "npm:^1.2.8" + checksum: 10/d1a5c28c0b1ebe0702d758ea7d000bf26cfc48982321dded81f5681a9e5c1f46368b847f210e7eed34db9c57fdf655bd536a14b2e94d2ba070e6503d6594b19c languageName: node linkType: hard -"type-check@npm:^0.4.0, type-check@npm:~0.4.0": - version: 0.4.0 - resolution: "type-check@npm:0.4.0" +"registry-url@npm:^5.0.0": + version: 5.1.0 + resolution: "registry-url@npm:5.1.0" dependencies: - prelude-ls: "npm:^1.2.1" - checksum: 10/14687776479d048e3c1dbfe58a2409e00367810d6960c0f619b33793271ff2a27f81b52461f14a162f1f89a9b1d8da1b237fc7c99b0e1fdcec28ec63a86b1fec + rc: "npm:^1.2.8" + checksum: 10/bcea86c84a0dbb66467b53187fadebfea79017cddfb4a45cf27530d7275e49082fe9f44301976eb0164c438e395684bcf3dae4819b36ff9d1640d8cc60c73df9 languageName: node linkType: hard -"type-check@npm:~0.3.2": - version: 0.3.2 - resolution: "type-check@npm:0.3.2" +"release-zalgo@npm:^1.0.0": + version: 1.0.0 + resolution: "release-zalgo@npm:1.0.0" dependencies: - prelude-ls: "npm:~1.1.2" - checksum: 10/11dec0b50d7c3fd2e630b4b074ba36918ed2b1efbc87dfbd40ba9429d49c58d12dad5c415ece69fcf358fa083f33466fc370f23ab91aa63295c45d38b3a60dda + es6-error: "npm:^4.0.1" + checksum: 10/1719e44b240ee1f57d034b26ea167f3cbf3c36fdae6d6efd0e6e5b202d9852baffc1c5595d378b5f8b2ad729b907ddd962f3d051d89499f83584993a5399f964 languageName: node linkType: hard -"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.5, type-detect@npm:^4.0.8": - version: 4.0.8 - resolution: "type-detect@npm:4.0.8" - checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d +"repeat-string@npm:^1.6.1": + version: 1.6.1 + resolution: "repeat-string@npm:1.6.1" + checksum: 10/1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0 languageName: node linkType: hard -"type-fest@npm:^0.12.0": - version: 0.12.0 - resolution: "type-fest@npm:0.12.0" - checksum: 10/828dd234a0497721622de2907147aff3290a42f86ca01b3d1c1273b4f50bcd00eadcb71c7fad9b34125c7796b8d3a554415f9dda4875993ed51636431488f712 +"replace@npm:1.2.2": + version: 1.2.2 + resolution: "replace@npm:1.2.2" + dependencies: + chalk: "npm:2.4.2" + minimatch: "npm:3.0.5" + yargs: "npm:^15.3.1" + bin: + replace: bin/replace.js + search: bin/search.js + checksum: 10/275ca1a2cfc12476426420fb9a3dda382450395176b4600fdd76ac7d2876b43af96b4ba82c40e3bb46696d3caa2babef13ea1bbb81371d6dd4416ce4f9f77ffd languageName: node linkType: hard -"type-fest@npm:^0.16.0": - version: 0.16.0 - resolution: "type-fest@npm:0.16.0" - checksum: 10/fd8c47ccb90e9fe7bae8bfc0e116e200e096120200c1ab1737bf0bc9334b344dd4925f876ed698174ffd58cd179bb56a55467be96aedc22d5d72748eac428bc8 +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf languageName: node linkType: hard -"type-fest@npm:^0.18.0": - version: 0.18.1 - resolution: "type-fest@npm:0.18.1" - checksum: 10/08844377058435c2b0e633ba01bab6102dba0ed63d85417d8e18feff265eed6f5c9f8f9a25d405ea9db88a41a569be73a3c4c0d4e29150bf89fb145bb23114a2 +"require-from-string@npm:^2.0.2": + version: 2.0.2 + resolution: "require-from-string@npm:2.0.2" + checksum: 10/839a3a890102a658f4cb3e7b2aa13a1f80a3a976b512020c3d1efc418491c48a886b6e481ea56afc6c4cb5eef678f23b2a4e70575e7534eccadf5e30ed2e56eb languageName: node linkType: hard -"type-fest@npm:^0.20.2": - version: 0.20.2 - resolution: "type-fest@npm:0.20.2" - checksum: 10/8907e16284b2d6cfa4f4817e93520121941baba36b39219ea36acfe64c86b9dbc10c9941af450bd60832c8f43464974d51c0957f9858bc66b952b66b6914cbb9 +"require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: 10/8604a570c06a69c9d939275becc33a65676529e1c3e5a9f42d58471674df79357872b96d70bb93a0380a62d60dc9031c98b1a9dad98c946ffdd61b7ac0c8cedd languageName: node linkType: hard -"type-fest@npm:^0.21.3": - version: 0.21.3 - resolution: "type-fest@npm:0.21.3" - checksum: 10/f4254070d9c3d83a6e573bcb95173008d73474ceadbbf620dd32d273940ca18734dff39c2b2480282df9afe5d1675ebed5499a00d791758748ea81f61a38961f +"require-package-name@npm:^2.0.1": + version: 2.0.1 + resolution: "require-package-name@npm:2.0.1" + checksum: 10/3332d4eec10a730627ca20f37a8a7d57badd9e8953f238472aa457b0084907f86ca5b2af94694a0c8bb2e1101bdb3ed6ddc964d2044b040fe076a9bf5b19755f languageName: node linkType: hard -"type-fest@npm:^0.6.0": - version: 0.6.0 - resolution: "type-fest@npm:0.6.0" - checksum: 10/9ecbf4ba279402b14c1a0614b6761bbe95626fab11377291fecd7e32b196109551e0350dcec6af74d97ced1b000ba8060a23eca33157091e642b409c2054ba82 +"requirejs-config-file@npm:^4.0.0": + version: 4.0.0 + resolution: "requirejs-config-file@npm:4.0.0" + dependencies: + esprima: "npm:^4.0.0" + stringify-object: "npm:^3.2.1" + checksum: 10/9fc55813ca8627cc4d3704622702b6b119a222c97825fc61459727d5f9ef9435e4fd34ee03335dc119c66e834d7963fdfe43d9a4df99448d43219587c624ba4e languageName: node linkType: hard -"type-fest@npm:^0.7.1": - version: 0.7.1 - resolution: "type-fest@npm:0.7.1" - checksum: 10/0699b6011bb3f7fac5fd5385e2e09432cde08fa89283f24084f29db00ec69a5445cd3aa976438ec74fc552a9a96f4a04ed390b5cb62eb7483aa4b6e5b935e059 +"requirejs@npm:^2.3.6": + version: 2.3.7 + resolution: "requirejs@npm:2.3.7" + bin: + r.js: bin/r.js + r_js: bin/r.js + checksum: 10/7f42af10d8af210a2769501004b34f9dad4c39716f008f91faeef36c33b60a5f372ca1025c8f40b262f2522fd1ea0f36fd11e9587cba14311fac0df51a8571b0 languageName: node linkType: hard -"type-fest@npm:^0.8.0, type-fest@npm:^0.8.1": - version: 0.8.1 - resolution: "type-fest@npm:0.8.1" - checksum: 10/fd4a91bfb706aeeb0d326ebd2e9a8ea5263979e5dec8d16c3e469a5bd3a946e014a062ef76c02e3086d3d1c7209a56a20a4caafd0e9f9a5c2ab975084ea3d388 +"resolve-alpn@npm:^1.2.0": + version: 1.2.1 + resolution: "resolve-alpn@npm:1.2.1" + checksum: 10/744e87888f0b6fa0b256ab454ca0b9c0b80808715e2ef1f3672773665c92a941f6181194e30ccae4a8cd0adbe0d955d3f133102636d2ee0cca0119fec0bc9aec languageName: node linkType: hard -"type-fest@npm:^1.0.1, type-fest@npm:^1.2.1, type-fest@npm:^1.2.2": - version: 1.4.0 - resolution: "type-fest@npm:1.4.0" - checksum: 10/89875c247564601c2650bacad5ff80b859007fbdb6c9e43713ae3ffa3f584552eea60f33711dd762e16496a1ab4debd409822627be14097d9a17e39c49db591a +"resolve-cwd@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-cwd@npm:3.0.0" + dependencies: + resolve-from: "npm:^5.0.0" + checksum: 10/546e0816012d65778e580ad62b29e975a642989108d9a3c5beabfb2304192fa3c9f9146fbdfe213563c6ff51975ae41bac1d3c6e047dd9572c94863a057b4d81 languageName: node linkType: hard -"type-fest@npm:^2.13.0, type-fest@npm:^2.3.3, type-fest@npm:^2.5.1": - version: 2.19.0 - resolution: "type-fest@npm:2.19.0" - checksum: 10/7bf9e8fdf34f92c8bb364c0af14ca875fac7e0183f2985498b77be129dc1b3b1ad0a6b3281580f19e48c6105c037fb966ad9934520c69c6434d17fd0af4eed78 +"resolve-dependency-path@npm:^3.0.2": + version: 3.0.2 + resolution: "resolve-dependency-path@npm:3.0.2" + checksum: 10/d042bef325ce8dbdbe57f37f93851b2c5651e06378b9f352ceef2c28aa99dc6ae793be7795e8bf4ad18b40769ee06d8e049ce8206f183c9afe9812fd48ef6d8c languageName: node linkType: hard -"type-fest@npm:^3.8.0": - version: 3.13.1 - resolution: "type-fest@npm:3.13.1" - checksum: 10/9a8a2359ada34c9b3affcaf3a8f73ee14c52779e89950db337ce66fb74c3399776c697c99f2532e9b16e10e61cfdba3b1c19daffb93b338b742f0acd0117ce12 +"resolve-dir@npm:^1.0.0, resolve-dir@npm:^1.0.1": + version: 1.0.1 + resolution: "resolve-dir@npm:1.0.1" + dependencies: + expand-tilde: "npm:^2.0.0" + global-modules: "npm:^1.0.0" + checksum: 10/ef736b8ed60d6645c3b573da17d329bfb50ec4e1d6c5ffd6df49e3497acef9226f9810ea6823b8ece1560e01dcb13f77a9f6180d4f242d00cc9a8f4de909c65c languageName: node linkType: hard -"type-fest@npm:^4.2.0": - version: 4.3.1 - resolution: "type-fest@npm:4.3.1" - checksum: 10/67ec9bd6fd1b1c5e7361d5ffad639607f60a3d497ff9fa7b1359b9e4c6b08a8f31f1cb0328e633f640adc2b8f692b35719efc328af0aea1d816828e4195519ae +"resolve-from@npm:5.0.0, resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10/be18a5e4d76dd711778664829841cde690971d02b6cbae277735a09c1c28f407b99ef6ef3cd585a1e6546d4097b28df40ed32c4a287b9699dcf6d7f208495e23 languageName: node linkType: hard -"type-fest@npm:^4.6.0": - version: 4.8.3 - resolution: "type-fest@npm:4.8.3" - checksum: 10/90e440347c542282b0a92bb181fb30af529be6d6820dd7ec6141309f2ca143855a8fbca18969623b19bc15a3dcce6000af19f97cae81a39fbd2638c15a06d078 +"resolve-from@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-from@npm:3.0.0" + checksum: 10/c4189f1592a777f7d51c1ff6153df18b5d062c831fb0c623b4b87736c8a73c08e4eaab19e807399287040791f3e7aa0877f05f9d86739d3ef1ef0c727e9fe06c languageName: node linkType: hard -"type-fest@npm:^4.7.1": - version: 4.21.0 - resolution: "type-fest@npm:4.21.0" - checksum: 10/a4dc074b25239fff4062495c58554dcec15845622d753092d2bf24fc3b1c49f85805ed74f151976d666056ff122b3a5a988e85226575b7fbbc8e92d2db210137 +"resolve-from@npm:^4.0.0": + version: 4.0.0 + resolution: "resolve-from@npm:4.0.0" + checksum: 10/91eb76ce83621eea7bbdd9b55121a5c1c4a39e54a9ce04a9ad4517f102f8b5131c2cf07622c738a6683991bf54f2ce178f5a42803ecbd527ddc5105f362cc9e3 languageName: node linkType: hard -"type-is@npm:^1.6.18, type-is@npm:^1.6.4, type-is@npm:~1.6.18": - version: 1.6.18 - resolution: "type-is@npm:1.6.18" +"resolve-global@npm:1.0.0, resolve-global@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-global@npm:1.0.0" dependencies: - media-typer: "npm:0.3.0" - mime-types: "npm:~2.1.24" - checksum: 10/0bd9eeae5efd27d98fd63519f999908c009e148039d8e7179a074f105362d4fcc214c38b24f6cda79c87e563cbd12083a4691381ed28559220d4a10c2047bed4 + global-dirs: "npm:^0.1.1" + checksum: 10/c4e11d33e84bde7516b824503ffbe4b6cce863d5ce485680fd3db997b7c64da1df98321b1fd0703b58be8bc9bc83bc96bd83043f96194386b45eb47229efb6b6 languageName: node linkType: hard -"type@npm:^1.0.1": - version: 1.2.0 - resolution: "type@npm:1.2.0" - checksum: 10/b4d4b27d1926028be45fc5baaca205896e2a1fe9e5d24dc892046256efbe88de6acd0149e7353cd24dad596e1483e48ec60b0912aa47ca078d68cdd198b09885 +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: 10/0763150adf303040c304009231314d1e84c6e5ebfa2d82b7d94e96a6e82bacd1dcc0b58ae257315f3c8adb89a91d8d0f12928241cba2df1680fbe6f60bf99b0e languageName: node linkType: hard -"type@npm:^2.5.0": - version: 2.6.0 - resolution: "type@npm:2.6.0" - checksum: 10/2b82a05d963dac5a20c71adf50c2fef21b7bda248959e5316dd08fdb7b60644d1f34c399274334ad5b2f23dfea96c5f2b07bcb014fda200db35a160938f0a19b +"resolve.exports@npm:^2.0.0": + version: 2.0.2 + resolution: "resolve.exports@npm:2.0.2" + checksum: 10/f1cc0b6680f9a7e0345d783e0547f2a5110d8336b3c2a4227231dd007271ffd331fd722df934f017af90bae0373920ca0d4005da6f76cb3176c8ae426370f893 languageName: node linkType: hard -"type@npm:^2.7.2": - version: 2.7.2 - resolution: "type@npm:2.7.2" - checksum: 10/602f1b369fba60687fa4d0af6fcfb814075bcaf9ed3a87637fb384d9ff849e2ad15bc244a431f341374562e51a76c159527ffdb1f1f24b0f1f988f35a301c41d +"resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.20.0, resolve@npm:^1.9.0": + version: 1.22.0 + resolution: "resolve@npm:1.22.0" + dependencies: + is-core-module: "npm:^2.8.1" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/b2f7405d3092f8bb537105b364378698dd0e7428dd3e76a3f00424cdc0bf8a1d85c3f5dab036fd04154e29c8fc221a591697ec699eb1cbd37d9a628b8bb7ccf5 languageName: node linkType: hard -"typed-array-buffer@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-buffer@npm:1.0.0" +"resolve@npm:^1.22.3": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.1" - is-typed-array: "npm:^1.1.10" - checksum: 10/3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/c473506ee01eb45cbcfefb68652ae5759e092e6b0fb64547feadf9736a6394f258fbc6f88e00c5ca36d5477fbb65388b272432a3600fa223062e54333c156753 languageName: node linkType: hard -"typed-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "typed-array-buffer@npm:1.0.2" +"resolve@npm:^1.22.4": + version: 1.22.4 + resolution: "resolve@npm:1.22.4" dependencies: - call-bind: "npm:^1.0.7" - es-errors: "npm:^1.3.0" - is-typed-array: "npm:^1.1.13" - checksum: 10/02ffc185d29c6df07968272b15d5319a1610817916ec8d4cd670ded5d1efe72901541ff2202fcc622730d8a549c76e198a2f74e312eabbfb712ed907d45cbb0b + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/5634f87e72888b139a7cb544213504cc0c6dcd82c6f67ce810b4ca6b3367ddb2aeed5f21c9bb6cd8f3115f0b7e6c0980ef25eeb0dcbd188d9590bb5c84d2d253 languageName: node linkType: hard -"typed-array-byte-length@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-byte-length@npm:1.0.0" +"resolve@npm:^2.0.0-next.4": + version: 2.0.0-next.4 + resolution: "resolve@npm:2.0.0-next.4" dependencies: - call-bind: "npm:^1.0.2" - for-each: "npm:^0.3.3" - has-proto: "npm:^1.0.1" - is-typed-array: "npm:^1.1.10" - checksum: 10/6f376bf5d988f00f98ccee41fd551cafc389095a2a307c18fab30f29da7d1464fc3697139cf254cda98b4128bbcb114f4b557bbabdc6d9c2e5039c515b31decf + is-core-module: "npm:^2.9.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/20d5293f5015aa0b65c488ee365f9dfc30b954b04f9074425a6fb738d78fa63825a82ba8574b7ee200af7ebd5e98c41786831d1d4c1612da3cd063980dfa06a3 + languageName: node + linkType: hard + +"resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.9.0#optional!builtin": + version: 1.22.0 + resolution: "resolve@patch:resolve@npm%3A1.22.0#optional!builtin::version=1.22.0&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.8.1" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/cb53ccafb067fb04989dbff2ce7186d03f4a55b7283eab91b545d614b336dc509faa5c71210ce77ab1a4b0f7de4ffbccc170febcbeef40bf5a09b9ddb05bf447 languageName: node linkType: hard -"typed-array-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "typed-array-byte-length@npm:1.0.1" +"resolve@patch:resolve@npm%3A^1.22.3#optional!builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-proto: "npm:^1.0.3" - is-typed-array: "npm:^1.1.13" - checksum: 10/e4a38329736fe6a73b52a09222d4a9e8de14caaa4ff6ad8e55217f6705b017d9815b7284c85065b3b8a7704e226ccff1372a72b78c2a5b6b71b7bf662308c903 + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/f345cd37f56a2c0275e3fe062517c650bb673815d885e7507566df589375d165bbbf4bdb6aa95600a9bc55f4744b81f452b5a63f95b9f10a72787dba3c90890a languageName: node linkType: hard -"typed-array-byte-offset@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-byte-offset@npm:1.0.0" +"resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": + version: 1.22.4 + resolution: "resolve@patch:resolve@npm%3A1.22.4#optional!builtin::version=1.22.4&hash=c3c19d" dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - for-each: "npm:^0.3.3" - has-proto: "npm:^1.0.1" - is-typed-array: "npm:^1.1.10" - checksum: 10/2d81747faae31ca79f6c597dc18e15ae3d5b7e97f7aaebce3b31f46feeb2a6c1d6c92b9a634d901c83731ffb7ec0b74d05c6ff56076f5ae39db0cd19b16a3f92 + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/13262490c7b0ac54f6397f1d45ee139ebd2e431781e2ff0d9c27bf41648a349a90bc23a3ab2768f0f821efdd2cba08fb85f21288fc0cc01718c03557fbd285bc languageName: node linkType: hard -"typed-array-byte-offset@npm:^1.0.2": - version: 1.0.2 - resolution: "typed-array-byte-offset@npm:1.0.2" +"resolve@patch:resolve@npm%3A^2.0.0-next.4#optional!builtin": + version: 2.0.0-next.4 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.4#optional!builtin::version=2.0.0-next.4&hash=c3c19d" dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-proto: "npm:^1.0.3" - is-typed-array: "npm:^1.1.13" - checksum: 10/ac26d720ebb2aacbc45e231347c359e6649f52e0cfe0e76e62005912f8030d68e4cb7b725b1754e8fdd48e433cb68df5a8620a3e420ad1457d666e8b29bf9150 + is-core-module: "npm:^2.9.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/27bff19d8219385bb1e271066317e553cff18daa2a19db9598d94ae444417ef3f5aec19e86927872d6cb241d02649cfb35a4c0d9d10ef2afa6325bce8bc8d903 languageName: node linkType: hard -"typed-array-length@npm:^1.0.4": - version: 1.0.4 - resolution: "typed-array-length@npm:1.0.4" +"responselike@npm:^1.0.2": + version: 1.0.2 + resolution: "responselike@npm:1.0.2" dependencies: - call-bind: "npm:^1.0.2" - for-each: "npm:^0.3.3" - is-typed-array: "npm:^1.1.9" - checksum: 10/0444658acc110b233176cb0b7689dcb828b0cfa099ab1d377da430e8553b6fdcdce882360b7ffe9ae085b6330e1d39383d7b2c61574d6cd8eef651d3e4a87822 + lowercase-keys: "npm:^1.0.0" + checksum: 10/2e9e70f1dcca3da621a80ce71f2f9a9cad12c047145c6ece20df22f0743f051cf7c73505e109814915f23f9e34fb0d358e22827723ee3d56b623533cab8eafcd languageName: node linkType: hard -"typed-array-length@npm:^1.0.5": - version: 1.0.5 - resolution: "typed-array-length@npm:1.0.5" +"responselike@npm:^3.0.0": + version: 3.0.0 + resolution: "responselike@npm:3.0.0" dependencies: - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-proto: "npm:^1.0.3" - is-typed-array: "npm:^1.1.13" - possible-typed-array-names: "npm:^1.0.0" - checksum: 10/f9a0da99c41880b44e2c5e5d0d01515c2a6e0f54b10c594151804f013272d837df3b67ea84d7304ecfbab2c10d99c3372168bf3a4bd295abf13ac5a72f93054a + lowercase-keys: "npm:^3.0.0" + checksum: 10/e0cc9be30df4f415d6d83cdede3c5c887cd4a73e7cc1708bcaab1d50a28d15acb68460ac5b02bcc55a42f3d493729c8856427dcf6e57e6e128ad05cba4cfb95e languageName: node linkType: hard -"typed-assert@npm:^1.0.8": - version: 1.0.9 - resolution: "typed-assert@npm:1.0.9" - checksum: 10/03b7e756cc5dd3a50a6580f8eb5376461986ecad67bc848fda26e2c5c4fd4514f04a9149ece4484f4ec5126aa4ef76bdaeccf2cfe9d66840602db7bafe3b7161 +"restore-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "restore-cursor@npm:3.1.0" + dependencies: + onetime: "npm:^5.1.0" + signal-exit: "npm:^3.0.2" + checksum: 10/f877dd8741796b909f2a82454ec111afb84eb45890eb49ac947d87991379406b3b83ff9673a46012fca0d7844bb989f45cc5b788254cf1a39b6b5a9659de0630 languageName: node linkType: hard -"typedarray-to-buffer@npm:^3.1.5": - version: 3.1.5 - resolution: "typedarray-to-buffer@npm:3.1.5" - dependencies: - is-typedarray: "npm:^1.0.0" - checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10/1f914879f97e7ee931ad05fe3afa629bd55270fc6cf1c1e589b6a99fab96d15daad0fa1a52a00c729ec0078045fe3e399bd4fd0c93bcc906957bdc17f89cb8e6 languageName: node linkType: hard -"typedarray-to-buffer@npm:~1.0.0": +"reusify@npm:^1.0.4": version: 1.0.4 - resolution: "typedarray-to-buffer@npm:1.0.4" - checksum: 10/ac6989c456a0b175c8362b3ebbd8a74af7b9bcc94f9dc9ffd34436569cd29aea6a1e0e5f5752d0d5bd855a55b2520e960d1d4cb9c9149f863ce09220540df17f + resolution: "reusify@npm:1.0.4" + checksum: 10/14222c9e1d3f9ae01480c50d96057228a8524706db79cdeb5a2ce5bb7070dd9f409a6f84a02cbef8cdc80d39aef86f2dd03d155188a1300c599b05437dcd2ffb languageName: node linkType: hard -"typedarray@npm:^0.0.6": - version: 0.0.6 - resolution: "typedarray@npm:0.0.6" - checksum: 10/2cc1bcf7d8c1237f6a16c04efc06637b2c5f2d74e58e84665445cf87668b85a21ab18dd751fa49eee6ae024b70326635d7b79ad37b1c370ed2fec6aeeeb52714 +"rfdc@npm:^1.3.0": + version: 1.3.0 + resolution: "rfdc@npm:1.3.0" + checksum: 10/76dedd9700cdf132947fde7ce1a8838c9cbb7f3e8f9188af0aaf97194cce745f42094dd2cf547426934cc83252ee2c0e432b2e0222a4415ab0db32de82665c69 languageName: node linkType: hard -"typedoc@npm:0.26.2": - version: 0.26.2 - resolution: "typedoc@npm:0.26.2" +"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" dependencies: - lunr: "npm:^2.3.9" - markdown-it: "npm:^14.1.0" - minimatch: "npm:^9.0.4" - shiki: "npm:^1.9.0" - yaml: "npm:^2.4.5" - peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x + glob: "npm:^7.1.3" bin: - typedoc: bin/typedoc - checksum: 10/f7cbe3e4a7635fe8fef9aacd62eedf72ff008548eebdcfc9a8b8ffea3cb6c06846230a022f436ba006bf11bf669b1e7fcf375349410e1f2d920b42531cd1f5b4 + rimraf: bin.js + checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5 languageName: node linkType: hard -"typescript-compare@npm:^0.0.2": - version: 0.0.2 - resolution: "typescript-compare@npm:0.0.2" +"ripemd160@npm:^2.0.0, ripemd160@npm:^2.0.1": + version: 2.0.2 + resolution: "ripemd160@npm:2.0.2" dependencies: - typescript-logic: "npm:^0.0.0" - checksum: 10/d6c43213e7689f8519438b6deceb9877cdc83b4f64677bbc07e6d88d8b63bee713035731678facfd3f81b019b93131a876a230194b4f8d31737bfc5af71594d2 + hash-base: "npm:^3.0.0" + inherits: "npm:^2.0.1" + checksum: 10/006accc40578ee2beae382757c4ce2908a826b27e2b079efdcd2959ee544ddf210b7b5d7d5e80467807604244e7388427330f5c6d4cd61e6edaddc5773ccc393 languageName: node linkType: hard -"typescript-logic@npm:^0.0.0": - version: 0.0.0 - resolution: "typescript-logic@npm:0.0.0" - checksum: 10/84506bd58b7e15455b3233ded7f43f2ff8667500dca94f8e96e61aa16fa5a78bd9c45455f27c49f0e4aee7322c3e5a4b270e68bf8ba29fdf1571256fe2607152 +"run-async@npm:^2.4.0": + version: 2.4.1 + resolution: "run-async@npm:2.4.1" + checksum: 10/c79551224dafa26ecc281cb1efad3510c82c79116aaf681f8a931ce70fdf4ca880d58f97d3b930a38992c7aad7955a08e065b32ec194e1dd49d7790c874ece50 languageName: node linkType: hard -"typescript-optional@npm:2.0.1": - version: 2.0.1 - resolution: "typescript-optional@npm:2.0.1" - checksum: 10/31a80124de980476da4748039fbc2e4ff9fa85e7ed712952c78bf2bebb107124c16f60e0a16cc067b325da8eabe5a5930618cad9c269b8356745606392da850f +"run-async@npm:^3.0.0": + version: 3.0.0 + resolution: "run-async@npm:3.0.0" + checksum: 10/97fb8747f7765b77ebcd311d3a33548099336f04c6434e0763039b98c1de0f1b4421000695aff8751f309c0b995d8dfd620c1f1e4c35572da38c101488165305 languageName: node linkType: hard -"typescript-tuple@npm:^2.2.1": - version: 2.2.1 - resolution: "typescript-tuple@npm:2.2.1" +"run-parallel@npm:^1.1.9": + version: 1.2.0 + resolution: "run-parallel@npm:1.2.0" dependencies: - typescript-compare: "npm:^0.0.2" - checksum: 10/6e03ff36696aa0b832465234f1ce5496717b50b22c8597f903894a1e7577ab0d0d86eeb84d509dc206f02aa21a75d196c0082d59325fde3ac9a22b6bc5ff3d14 - languageName: node - linkType: hard - -"typescript@npm:4.5.2": - version: 4.5.2 - resolution: "typescript@npm:4.5.2" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/477935930ae75e2b5b06c283175ed1a899c2330d9c4422047821c5592ccb6e72a620285279b738f69ff3234d17368cce07cae91c5890b6d42134275eb643b59a + queue-microtask: "npm:^1.2.2" + checksum: 10/cb4f97ad25a75ebc11a8ef4e33bb962f8af8516bb2001082ceabd8902e15b98f4b84b4f8a9b222e5d57fc3bd1379c483886ed4619367a7680dad65316993021d languageName: node linkType: hard -"typescript@npm:5.5.2": - version: 5.5.2 - resolution: "typescript@npm:5.5.2" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/9118b20f248e76b0dbff8737fef65dfa89d02668d4e633d2c5ceac99033a0ca5e8a1c1a53bc94da68e8f67677a88f318663dde859c9e9a09c1e116415daec2ba +"run-time-error-cjs@npm:1.4.0": + version: 1.4.0 + resolution: "run-time-error-cjs@npm:1.4.0" + checksum: 10/4d37f1fb3e62d9b3f1175a8bb2a017858f00e942a1ac90f7d0117a07b68e7911802ead174856fd0cfd668f0f59b5184ea4f19879438927c0647d9fcef616a5be languageName: node linkType: hard -"typescript@npm:^4.6.4 || ^5.0.0": - version: 5.2.2 - resolution: "typescript@npm:5.2.2" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/d65e50eb849bd21ff8677e5b9447f9c6e74777e346afd67754934264dcbf4bd59e7d2473f6062d9a015d66bd573311166357e3eb07fea0b52859cf9bb2b58555 +"run-time-error@npm:1.4.0": + version: 1.4.0 + resolution: "run-time-error@npm:1.4.0" + checksum: 10/f29eecdb2ccee1d4bdd19d43b1b2d679249e077574714c97dc48f57369a18f479d7dd6277e2470aa1277cded50c7e3c66df1f1d18c1d36f7f5c1db9824062f57 languageName: node linkType: hard -"typescript@npm:^5.0.4, typescript@npm:^5.4.4": - version: 5.5.3 - resolution: "typescript@npm:5.5.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/11a867312419ed497929aafd2f1d28b2cd41810a5eb6c6e9e169559112e9ea073d681c121a29102e67cd4478d0a4ae37a306a5800f3717f59c4337e6a9bd5e8d +"rxjs@npm:7.8.0": + version: 7.8.0 + resolution: "rxjs@npm:7.8.0" + dependencies: + tslib: "npm:^2.1.0" + checksum: 10/ff9359cc7875edecc8fc487481366b876b488901178cca8f2bdad03e00d2b5a19b01d2b02d3b4ebd47e574264db8460c6c2386076c3189b359b5e8c70a6e51e3 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A4.5.2#optional!builtin": - version: 4.5.2 - resolution: "typescript@patch:typescript@npm%3A4.5.2#optional!builtin::version=4.5.2&hash=f1b8ea" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/7f1707766d9835f54358774b40ce67aaef9619597732d8633274d21e24e714b14e06ea30997181eb4c14a815898c35915bd22448546440a2daa602e027f36018 +"rxjs@npm:7.8.1, rxjs@npm:^7.5.1, rxjs@npm:^7.5.5, rxjs@npm:^7.8.1": + version: 7.8.1 + resolution: "rxjs@npm:7.8.1" + dependencies: + tslib: "npm:^2.1.0" + checksum: 10/b10cac1a5258f885e9dd1b70d23c34daeb21b61222ee735d2ec40a8685bdca40429000703a44f0e638c27a684ac139e1c37e835d2a0dc16f6fc061a138ae3abb languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.5.2#optional!builtin": - version: 5.5.2 - resolution: "typescript@patch:typescript@npm%3A5.5.2#optional!builtin::version=5.5.2&hash=379a07" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/ac3145f65cf9e72ab29f2196e05d5816b355dc1a9195b9f010d285182a12457cfacd068be2dd22c877f88ebc966ac6e0e83f51c8586412b16499a27e3670ff4b +"rxjs@npm:^6.6.3": + version: 6.6.7 + resolution: "rxjs@npm:6.6.7" + dependencies: + tslib: "npm:^1.9.0" + checksum: 10/c8263ebb20da80dd7a91c452b9e96a178331f402344bbb40bc772b56340fcd48d13d1f545a1e3d8e464893008c5e306cc42a1552afe0d562b1a6d4e1e6262b03 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^4.6.4 || ^5.0.0#optional!builtin": - version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#optional!builtin::version=5.2.2&hash=f3b441" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/f79cc2ba802c94c2b78dbb00d767a10adb67368ae764709737dc277273ec148aa4558033a03ce901406b35fddf4eac46dabc94a1e1d12d2587e2b9cfe5707b4a +"safe-array-concat@npm:^1.0.0": + version: 1.0.0 + resolution: "safe-array-concat@npm:1.0.0" + dependencies: + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.2.0" + has-symbols: "npm:^1.0.3" + isarray: "npm:^2.0.5" + checksum: 10/f43cb98fe3b566327d0c09284de2b15fb85ae964a89495c1b1a5d50c7c8ed484190f4e5e71aacc167e16231940079b326f2c0807aea633d47cc7322f40a6b57f languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.0.4#optional!builtin, typescript@patch:typescript@npm%3A^5.4.4#optional!builtin": - version: 5.5.3 - resolution: "typescript@patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/7cf7acb78a80f749b82842f2ffe01e90e7b3e709a6f4268588e0b7599c41dca1059be217f47778fe1a380bfaf60933021ef20d002c426d4d7745e1b36c11467b +"safe-array-concat@npm:^1.1.0": + version: 1.1.0 + resolution: "safe-array-concat@npm:1.1.0" + dependencies: + call-bind: "npm:^1.0.5" + get-intrinsic: "npm:^1.2.2" + has-symbols: "npm:^1.0.3" + isarray: "npm:^2.0.5" + checksum: 10/41ac35ce46c44e2e8637b1805b0697d5269507779e3082b7afb92c01605fd73ab813bbc799510c56e300cfc941b1447fd98a338205db52db7fd1322ab32d7c9f languageName: node linkType: hard -"uc.micro@npm:^2.0.0, uc.micro@npm:^2.1.0": - version: 2.1.0 - resolution: "uc.micro@npm:2.1.0" - checksum: 10/37197358242eb9afe367502d4638ac8c5838b78792ab218eafe48287b0ed28aaca268ec0392cc5729f6c90266744de32c06ae938549aee041fc93b0f9672d6b2 +"safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 languageName: node linkType: hard - -"uglify-js@npm:^3.1.4": - version: 3.15.1 - resolution: "uglify-js@npm:3.15.1" - bin: - uglifyjs: bin/uglifyjs - checksum: 10/32c2ea5d66b74c6c2b8000c1cf472b50985d5ec85d9e93fc771b8d3c961eac45a59c7549d3b4a0b6a4e39e7282928d00aeec46d01081172ccb62f02987d99213 + +"safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": + version: 5.1.2 + resolution: "safe-buffer@npm:5.1.2" + checksum: 10/7eb5b48f2ed9a594a4795677d5a150faa7eb54483b2318b568dc0c4fc94092a6cce5be02c7288a0500a156282f5276d5688bce7259299568d1053b2150ef374a languageName: node linkType: hard -"uid@npm:2.0.1": - version: 2.0.1 - resolution: "uid@npm:2.0.1" +"safe-regex-test@npm:^1.0.0": + version: 1.0.0 + resolution: "safe-regex-test@npm:1.0.0" dependencies: - "@lukeed/csprng": "npm:^1.0.0" - checksum: 10/47857c7409ffa56f89baa44fce8f81a4f5668128e755d44709e42b13b8b7f632eac308388c3c0f2114e090470f31dd1f45586fe63ca7b37ab2273196b66c2421 + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.1.3" + is-regex: "npm:^1.1.4" + checksum: 10/c7248dfa07891aa634c8b9c55da696e246f8589ca50e7fd14b22b154a106e83209ddf061baf2fa45ebfbd485b094dc7297325acfc50724de6afe7138451b42a9 languageName: node linkType: hard -"uint8-varint@npm:^2.0.1": - version: 2.0.1 - resolution: "uint8-varint@npm:2.0.1" +"safe-regex-test@npm:^1.0.3": + version: 1.0.3 + resolution: "safe-regex-test@npm:1.0.3" dependencies: - uint8arraylist: "npm:^2.0.0" - uint8arrays: "npm:^4.0.2" - checksum: 10/9ac2965077974dc1819228d618d4ce6c59f7bddecb0f94e00a212157471f30b927b608d1bf675a1521dbc5e94381169e6bafe3497191ae19a5d31b8d8deb9cea + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + is-regex: "npm:^1.1.4" + checksum: 10/b04de61114b10274d92e25b6de7ccb5de07f11ea15637ff636de4b5190c0f5cd8823fe586dde718504cf78055437d70fd8804976894df502fcf5a210c970afb3 languageName: node linkType: hard -"uint8arraylist@npm:^2.0.0, uint8arraylist@npm:^2.1.2, uint8arraylist@npm:^2.4.3": - version: 2.4.3 - resolution: "uint8arraylist@npm:2.4.3" - dependencies: - uint8arrays: "npm:^4.0.2" - checksum: 10/35deb6d3eebce9a12e75fac7dcea83183049f157cb08c5249e1a2594443b7358fff64af99d5787f7e6cce537d5bb54d797307c2223a466601304bfc42c4bead7 +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.1.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10/7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 languageName: node linkType: hard -"uint8arrays@npm:^4.0.2, uint8arrays@npm:^4.0.3, uint8arrays@npm:^4.0.6": - version: 4.0.6 - resolution: "uint8arrays@npm:4.0.6" +"sanitize-html@npm:2.12.1": + version: 2.12.1 + resolution: "sanitize-html@npm:2.12.1" dependencies: - multiformats: "npm:^12.0.1" - checksum: 10/476e6857be579c598cf778407dd9af11c6e2719e3d1ac21ce176c28d13f5021fcedb46194465ee2b362c84791610784c8a22c0c20195d9d0f42efcf64b9d32a2 + deepmerge: "npm:^4.2.2" + escape-string-regexp: "npm:^4.0.0" + htmlparser2: "npm:^8.0.0" + is-plain-object: "npm:^5.0.0" + parse-srcset: "npm:^1.0.2" + postcss: "npm:^8.3.11" + checksum: 10/0aef3e56a7fe30983921e070d432167df1aabd9e6e4a78b5de127af275c38b41f8e97f0440b6970cee1875dc003bc5e3c3a588ec7d2c242fca6d8f3327ea8efb languageName: node linkType: hard -"unbox-primitive@npm:^1.0.1": - version: 1.0.1 - resolution: "unbox-primitive@npm:1.0.1" +"sass-lookup@npm:^5.0.1": + version: 5.0.1 + resolution: "sass-lookup@npm:5.0.1" dependencies: - function-bind: "npm:^1.1.1" - has-bigints: "npm:^1.0.1" - has-symbols: "npm:^1.0.2" - which-boxed-primitive: "npm:^1.0.2" - checksum: 10/16aacdfc555545a89ddc678f136029ead18215f6843b9b707ab383cdc2f739efc34470b6b79c36ce7d376432f75b65b4ecb437d20f97196ba9d4683db0425ea3 + commander: "npm:^10.0.1" + bin: + sass-lookup: bin/cli.js + checksum: 10/4d37f16830d31e4bb9804fedddc7d79e82d3d0c74ca307a2b4f77656f58f20f55f55e8321c51fe3d7850e04fe216910611cc0a7a1fa67cf9152929bfa1b9b95b languageName: node linkType: hard -"unbox-primitive@npm:^1.0.2": - version: 1.0.2 - resolution: "unbox-primitive@npm:1.0.2" +"scheduler@npm:^0.20.2": + version: 0.20.2 + resolution: "scheduler@npm:0.20.2" dependencies: - call-bind: "npm:^1.0.2" - has-bigints: "npm:^1.0.2" - has-symbols: "npm:^1.0.3" - which-boxed-primitive: "npm:^1.0.2" - checksum: 10/06e1ee41c1095e37281cb71a975cb3350f7cb470a0665d2576f02cc9564f623bd90cfc0183693b8a7fdf2d242963dcc3010b509fa3ac683f540c765c0f3e7e43 + loose-envify: "npm:^1.1.0" + object-assign: "npm:^4.1.1" + checksum: 10/898917fa475386953d998add9107c04bf2c335eee86172833995dee126d12a68bee3c29edbd61fa0bcbcb8ee511c422eaab23b86b02f95aab26ecfaed8df5e64 languageName: node linkType: hard -"unbzip2-stream@npm:^1.0.9": - version: 1.4.3 - resolution: "unbzip2-stream@npm:1.4.3" +"schema-utils@npm:^3.1.1": + version: 3.1.1 + resolution: "schema-utils@npm:3.1.1" dependencies: - buffer: "npm:^5.2.1" - through: "npm:^2.3.8" - checksum: 10/4ffc0e14f4af97400ed0f37be83b112b25309af21dd08fa55c4513e7cb4367333f63712aec010925dbe491ef6e92db1248e1e306e589f9f6a8da8b3a9c4db90b + "@types/json-schema": "npm:^7.0.8" + ajv: "npm:^6.12.5" + ajv-keywords: "npm:^3.5.2" + checksum: 10/cfcf991f108797719d8054281272cf508543d6e092e273129fca84d569baafa5344bc23ec98cf2274943f6ed69851ced4fd0ae24471601f3f4d69c00fac47be6 languageName: node linkType: hard -"undefsafe@npm:^2.0.5": - version: 2.0.5 - resolution: "undefsafe@npm:2.0.5" - checksum: 10/f42ab3b5770fedd4ada175fc1b2eb775b78f609156f7c389106aafd231bfc210813ee49f54483d7191d7b76e483bc7f537b5d92d19ded27156baf57592eb02cc +"schema-utils@npm:^3.2.0": + version: 3.3.0 + resolution: "schema-utils@npm:3.3.0" + dependencies: + "@types/json-schema": "npm:^7.0.8" + ajv: "npm:^6.12.5" + ajv-keywords: "npm:^3.5.2" + checksum: 10/2c7bbb1da967fdfd320e6cea538949006ec6e8c13ea560a4f94ff2c56809a8486fa5ec419e023452501a6befe1ca381e409c2798c24f4993c7c4094d97fdb258 languageName: node linkType: hard -"undici@npm:6.11.1": - version: 6.11.1 - resolution: "undici@npm:6.11.1" - checksum: 10/129480684630e5723b7f4a946c1d9f8120f9b5697cb2032d791d1e3d2898a90eed0ed63c6ef5641502569dca0112759948564354a932c8172fc96845aaf2dd28 +"secp256k1@npm:4.0.3": + version: 4.0.3 + resolution: "secp256k1@npm:4.0.3" + dependencies: + elliptic: "npm:^6.5.4" + node-addon-api: "npm:^2.0.0" + node-gyp: "npm:latest" + node-gyp-build: "npm:^4.2.0" + checksum: 10/8b45820cd90fd2f95cc8fdb9bf8a71e572de09f2311911ae461a951ffa9e30c99186a129d0f1afeb380dd67eca0c10493f8a7513c39063fda015e99995088e3b languageName: node linkType: hard -"undici@npm:6.19.8": - version: 6.19.8 - resolution: "undici@npm:6.19.8" - checksum: 10/19ae4ba38b029a664d99fd330935ef59136cf99edb04ed821042f27b5a9e84777265fb744c8a7abc83f2059afb019446c69a4ebef07bbc0ed6b2de8d67ef4090 +"semver-compare@npm:^1.0.0": + version: 1.0.0 + resolution: "semver-compare@npm:1.0.0" + checksum: 10/75f9c7a7786d1756f64b1429017746721e07bd7691bdad6368f7643885d3a98a27586777e9699456564f4844b407e9f186cc1d588a3f9c0be71310e517e942c3 languageName: node linkType: hard -"undici@npm:^5.12.0": - version: 5.26.3 - resolution: "undici@npm:5.26.3" +"semver-diff@npm:^3.1.1": + version: 3.1.1 + resolution: "semver-diff@npm:3.1.1" dependencies: - "@fastify/busboy": "npm:^2.0.0" - checksum: 10/7280135e89c6f96f17f02fa99b8dcf5c64511d36de31b5cea0e1a858c8a16f07ea22aba524d5b8f574e9341a543d295aebb20cb715545829f2e959329149a638 + semver: "npm:^6.3.0" + checksum: 10/8bbe5a5d7add2d5e51b72314a9215cd294d71f41cdc2bf6bd59ee76411f3610b576172896f1d191d0d7294cb9f2f847438d2ee158adacc0c224dca79052812fe languageName: node linkType: hard -"undici@npm:^5.14.0": - version: 5.21.2 - resolution: "undici@npm:5.21.2" - dependencies: - busboy: "npm:^1.6.0" - checksum: 10/6b6eb88b5e1e36edb61aacd654d3595411ff5b86ae5a3dc2c325c726ff0388feebb7d1de76d9c4693e7a77b33adcbd2d25e778068bf745084e1fb1a4ebfeeb4e +"semver-parser@npm:4.1.4": + version: 4.1.4 + resolution: "semver-parser@npm:4.1.4" + checksum: 10/cecb3c8f87acb6adfd5f1729192ad74d04dd5253549187f5cc892feea52a9e56e4a87650fe0019b6595791d3352f655c9e9e036fb816dc3b662aad56a07b5821 languageName: node linkType: hard -"undici@npm:^5.28.3": - version: 5.28.4 - resolution: "undici@npm:5.28.4" +"semver@npm:>=7.5.2": + version: 7.5.4 + resolution: "semver@npm:7.5.4" dependencies: - "@fastify/busboy": "npm:^2.0.0" - checksum: 10/a666a9f5ac4270c659fafc33d78b6b5039a0adbae3e28f934774c85dcc66ea91da907896f12b414bd6f578508b44d5dc206fa636afa0e49a4e1c9e99831ff065 + lru-cache: "npm:^6.0.0" + bin: + semver: bin/semver.js + checksum: 10/985dec0d372370229a262c737063860fabd4a1c730662c1ea3200a2f649117761a42184c96df62a0e885e76fbd5dace41087d6c1ac0351b13c0df5d6bcb1b5ac languageName: node linkType: hard -"unicode-canonical-property-names-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" - checksum: 10/39be078afd014c14dcd957a7a46a60061bc37c4508ba146517f85f60361acf4c7539552645ece25de840e17e293baa5556268d091ca6762747fdd0c705001a45 +"sentence-case@npm:^3.0.4": + version: 3.0.4 + resolution: "sentence-case@npm:3.0.4" + dependencies: + no-case: "npm:^3.0.4" + tslib: "npm:^2.0.3" + upper-case-first: "npm:^2.0.2" + checksum: 10/3cfe6c0143e649132365695706702d7f729f484fa7b25f43435876efe7af2478243eefb052bacbcce10babf9319fd6b5b6bc59b94c80a1c819bcbb40651465d5 languageName: node linkType: hard -"unicode-length@npm:^2.0.2": - version: 2.0.2 - resolution: "unicode-length@npm:2.0.2" +"serialize-javascript@npm:^6.0.1": + version: 6.0.1 + resolution: "serialize-javascript@npm:6.0.1" dependencies: - punycode: "npm:^2.0.0" - strip-ansi: "npm:^3.0.1" - checksum: 10/767ef3f4752f4db80a904bd7229d96d9bb697f45a9646b2cf06322ed8e3d0c17f32b6a46b44258aa9eeb7d0b217faf92c4d9d945c6ed8f708d0406358a1a3e1c + randombytes: "npm:^2.1.0" + checksum: 10/f756b1ff34b655b2183c64dd6683d28d4d9b9a80284b264cac9fd421c73890491eafd6c5c2bbe93f1f21bf78b572037c5a18d24b044c317ee1c9dc44d22db94c languageName: node linkType: hard -"unicode-match-property-ecmascript@npm:^2.0.0": +"set-blocking@npm:^2.0.0": version: 2.0.0 - resolution: "unicode-match-property-ecmascript@npm:2.0.0" - dependencies: - unicode-canonical-property-names-ecmascript: "npm:^2.0.0" - unicode-property-aliases-ecmascript: "npm:^2.0.0" - checksum: 10/1f34a7434a23df4885b5890ac36c5b2161a809887000be560f56ad4b11126d433c0c1c39baf1016bdabed4ec54829a6190ee37aa24919aa116dc1a5a8a62965a + resolution: "set-blocking@npm:2.0.0" + checksum: 10/8980ebf7ae9eb945bb036b6e283c547ee783a1ad557a82babf758a065e2fb6ea337fd82cac30dd565c1e606e423f30024a19fff7afbf4977d784720c4026a8ef languageName: node linkType: hard -"unicode-match-property-value-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-match-property-value-ecmascript@npm:2.0.0" - checksum: 10/a99f100f416ec013d94dfdb4216b3f766a9aa661b1c9fdb0d32cdb449a97832741719421606216341525c5a4cda09a8c8b6578553bc023b135b3e7eae205cb53 +"set-function-length@npm:^1.1.1": + version: 1.1.1 + resolution: "set-function-length@npm:1.1.1" + dependencies: + define-data-property: "npm:^1.1.1" + get-intrinsic: "npm:^1.2.1" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.0" + checksum: 10/745ed1d7dc69a6185e0820082fe73838ab3dfd01e75cce83a41e4c1d68bbf34bc5fb38f32ded542ae0b557536b5d2781594499b5dcd19e7db138e06292a76c7b languageName: node linkType: hard -"unicode-match-property-value-ecmascript@npm:^2.1.0": - version: 2.1.0 - resolution: "unicode-match-property-value-ecmascript@npm:2.1.0" - checksum: 10/06661bc8aba2a60c7733a7044f3e13085808939ad17924ffd4f5222a650f88009eb7c09481dc9c15cfc593d4ad99bd1cde8d54042733b335672591a81c52601c +"set-function-length@npm:^1.2.1": + version: 1.2.1 + resolution: "set-function-length@npm:1.2.1" + dependencies: + define-data-property: "npm:^1.1.2" + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.3" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.1" + checksum: 10/9ab1d200149574ab27c1a7acae56d6235e02568fc68655fe8afe63e4e02ccad3c27665f55c32408bd1ff40705939dbb7539abfb9c3a07fda27ecad1ab9e449f5 languageName: node linkType: hard -"unicode-property-aliases-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-property-aliases-ecmascript@npm:2.0.0" - checksum: 10/dda4d39128cbbede2ac60fbb85493d979ec65913b8a486bf7cb7a375a2346fa48cbf9dc6f1ae23376e7e8e684c2b411434891e151e865a661b40a85407db51d0 +"set-function-name@npm:^2.0.1": + version: 2.0.1 + resolution: "set-function-name@npm:2.0.1" + dependencies: + define-data-property: "npm:^1.0.1" + functions-have-names: "npm:^1.2.3" + has-property-descriptors: "npm:^1.0.0" + checksum: 10/4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 languageName: node linkType: hard -"unicorn-magic@npm:^0.1.0": - version: 0.1.0 - resolution: "unicorn-magic@npm:0.1.0" - checksum: 10/9b4d0e9809807823dc91d0920a4a4c0cff2de3ebc54ee87ac1ee9bc75eafd609b09d1f14495e0173aef26e01118706196b6ab06a75fe0841028b3983a8af313f +"setimmediate@npm:^1.0.4, setimmediate@npm:^1.0.5": + version: 1.0.5 + resolution: "setimmediate@npm:1.0.5" + checksum: 10/76e3f5d7f4b581b6100ff819761f04a984fa3f3990e72a6554b57188ded53efce2d3d6c0932c10f810b7c59414f85e2ab3c11521877d1dea1ce0b56dc906f485 languageName: node linkType: hard -"union-value@npm:^1.0.0": - version: 1.0.1 - resolution: "union-value@npm:1.0.1" +"sha.js@npm:^2.4.0, sha.js@npm:^2.4.8": + version: 2.4.11 + resolution: "sha.js@npm:2.4.11" dependencies: - arr-union: "npm:^3.1.0" - get-value: "npm:^2.0.6" - is-extendable: "npm:^0.1.1" - set-value: "npm:^2.0.1" - checksum: 10/a3464097d3f27f6aa90cf103ed9387541bccfc006517559381a10e0dffa62f465a9d9a09c9b9c3d26d0f4cbe61d4d010e2fbd710fd4bf1267a768ba8a774b0ba + inherits: "npm:^2.0.1" + safe-buffer: "npm:^5.0.1" + bin: + sha.js: ./bin.js + checksum: 10/d833bfa3e0a67579a6ce6e1bc95571f05246e0a441dd8c76e3057972f2a3e098465687a4369b07e83a0375a88703577f71b5b2e966809e67ebc340dbedb478c7 languageName: node linkType: hard -"uniq@npm:^1.0.1": - version: 1.0.1 - resolution: "uniq@npm:1.0.1" - checksum: 10/8206535f83745ea83f9da7035f3b983fd6ed5e35b8ed7745441944e4065b616bc67cf0d0a23a86b40ee0074426f0607f0a138f9b78e124eb6a7a6a6966055709 +"sha3@npm:2.1.4": + version: 2.1.4 + resolution: "sha3@npm:2.1.4" + dependencies: + buffer: "npm:6.0.3" + checksum: 10/55f8b2608559987219203056c800c64afd3b4ffd5c9ebf281f6adb9d6a7eb5093754987b7c81d83f693f18ef5fb7e62e46bd78b67fc82a6852feda9ef1ba71a7 languageName: node linkType: hard -"unique-filename@npm:^1.1.1": - version: 1.1.1 - resolution: "unique-filename@npm:1.1.1" +"shallow-clone@npm:^3.0.0": + version: 3.0.1 + resolution: "shallow-clone@npm:3.0.1" dependencies: - unique-slug: "npm:^2.0.0" - checksum: 10/9b6969d649a2096755f19f793315465c6427453b66d67c2a1bee8f36ca7e1fc40725be2c028e974dec110d365bd30a4248e89b1044dc1dfe29663b6867d071ef + kind-of: "npm:^6.0.2" + checksum: 10/e066bd540cfec5e1b0f78134853e0d892d1c8945fb9a926a579946052e7cb0c70ca4fc34f875a8083aa7910d751805d36ae64af250a6de6f3d28f9fa7be6c21b languageName: node linkType: hard -"unique-filename@npm:^3.0.0": - version: 3.0.0 - resolution: "unique-filename@npm:3.0.0" +"shebang-command@npm:^1.2.0": + version: 1.2.0 + resolution: "shebang-command@npm:1.2.0" dependencies: - unique-slug: "npm:^4.0.0" - checksum: 10/8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + shebang-regex: "npm:^1.0.0" + checksum: 10/9eed1750301e622961ba5d588af2212505e96770ec376a37ab678f965795e995ade7ed44910f5d3d3cb5e10165a1847f52d3348c64e146b8be922f7707958908 languageName: node linkType: hard -"unique-slug@npm:^2.0.0": - version: 2.0.2 - resolution: "unique-slug@npm:2.0.2" +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10/6cfaf91976acc9c125fd0686c561ee9ca0784bb4b2b408972e6cd30e747b4ff0ca50264c01bcf5e711b463535ea611ffb84199e9f73088cd79ac9ddee8154042 + shebang-regex: "npm:^3.0.0" + checksum: 10/6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa languageName: node linkType: hard -"unique-slug@npm:^4.0.0": - version: 4.0.0 - resolution: "unique-slug@npm:4.0.0" - dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10/40912a8963fc02fb8b600cf50197df4a275c602c60de4cac4f75879d3c48558cfac48de08a25cc10df8112161f7180b3bbb4d662aadb711568602f9eddee54f0 +"shebang-loader@npm:0.0.1": + version: 0.0.1 + resolution: "shebang-loader@npm:0.0.1" + checksum: 10/af7397c9ef24ac9ef68190157eb355354704ae0a31b038e061071e893d0834f2fef1618ac6ad5cb1dee69112efad721f439e6cb6e0c6c576b13f5b537cf2722b languageName: node linkType: hard -"unique-string@npm:^2.0.0": - version: 2.0.0 - resolution: "unique-string@npm:2.0.0" - dependencies: - crypto-random-string: "npm:^2.0.0" - checksum: 10/107cae65b0b618296c2c663b8e52e4d1df129e9af04ab38d53b4f2189e96da93f599c85f4589b7ffaf1a11c9327cbb8a34f04c71b8d4950d3e385c2da2a93828 +"shebang-regex@npm:^1.0.0": + version: 1.0.0 + resolution: "shebang-regex@npm:1.0.0" + checksum: 10/404c5a752cd40f94591dfd9346da40a735a05139dac890ffc229afba610854d8799aaa52f87f7e0c94c5007f2c6af55bdcaeb584b56691926c5eaf41dc8f1372 languageName: node linkType: hard -"universal-user-agent@npm:^7.0.0, universal-user-agent@npm:^7.0.2": - version: 7.0.2 - resolution: "universal-user-agent@npm:7.0.2" - checksum: 10/3f02cb6de0bb9fbaf379566bd0320d8e46af6e4358a2e88fce7e70687ed7b48b37f479d728bb22f4204a518e363f3038ac4841c033af1ee2253f6428a6c67e53 +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10/1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 languageName: node linkType: hard -"universalify@npm:^0.1.0": - version: 0.1.2 - resolution: "universalify@npm:0.1.2" - checksum: 10/40cdc60f6e61070fe658ca36016a8f4ec216b29bf04a55dce14e3710cc84c7448538ef4dad3728d0bfe29975ccd7bfb5f414c45e7b78883567fb31b246f02dff +"shell-quote@npm:^1.6.1": + version: 1.7.3 + resolution: "shell-quote@npm:1.7.3" + checksum: 10/0ab00c37c84ea3ac13d5f0d45c6850701254fd1d6653d0604a48973ba3911ad0dd9f414672253a01f68fe48bb651a7138317ed4543b75ce4192c1d610e453d4c languageName: node linkType: hard -"universalify@npm:^0.2.0": - version: 0.2.0 - resolution: "universalify@npm:0.2.0" - checksum: 10/e86134cb12919d177c2353196a4cc09981524ee87abf621f7bc8d249dbbbebaec5e7d1314b96061497981350df786e4c5128dbf442eba104d6e765bc260678b5 +"side-channel@npm:^1.0.4": + version: 1.0.4 + resolution: "side-channel@npm:1.0.4" + dependencies: + call-bind: "npm:^1.0.0" + get-intrinsic: "npm:^1.0.2" + object-inspect: "npm:^1.9.0" + checksum: 10/c4998d9fc530b0e75a7fd791ad868fdc42846f072734f9080ff55cc8dc7d3899abcda24fd896aa6648c3ab7021b4bb478073eb4f44dfd55bce9714bc1a7c5d45 languageName: node linkType: hard -"universalify@npm:^2.0.0": - version: 2.0.0 - resolution: "universalify@npm:2.0.0" - checksum: 10/2406a4edf4a8830aa6813278bab1f953a8e40f2f63a37873ffa9a3bc8f9745d06cc8e88f3572cb899b7e509013f7f6fcc3e37e8a6d914167a5381d8440518c44 +"signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.4, signal-exit@npm:^3.0.6, signal-exit@npm:^3.0.7": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 languageName: node linkType: hard -"unpipe@npm:1.0.0, unpipe@npm:~1.0.0": - version: 1.0.0 - resolution: "unpipe@npm:1.0.0" - checksum: 10/4fa18d8d8d977c55cb09715385c203197105e10a6d220087ec819f50cb68870f02942244f1017565484237f1f8c5d3cd413631b1ae104d3096f24fdfde1b4aa2 +"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10/c9fa63bbbd7431066174a48ba2dd9986dfd930c3a8b59de9c29d7b6854ec1c12a80d15310869ea5166d413b99f041bfa3dd80a7947bcd44ea8e6eb3ffeabfa1f languageName: node linkType: hard -"unquote@npm:~1.1.1": - version: 1.1.1 - resolution: "unquote@npm:1.1.1" - checksum: 10/71745867d09cba44ba2d26cb71d6dda7045a98b14f7405df4faaf2b0c90d24703ad027a9d90ba9a6e0d096de2c8d56f864fd03f1c0498c0b7a3990f73b4c8f5f +"sigstore@npm:^2.2.0": + version: 2.3.1 + resolution: "sigstore@npm:2.3.1" + dependencies: + "@sigstore/bundle": "npm:^2.3.2" + "@sigstore/core": "npm:^1.0.0" + "@sigstore/protobuf-specs": "npm:^0.3.2" + "@sigstore/sign": "npm:^2.3.2" + "@sigstore/tuf": "npm:^2.3.4" + "@sigstore/verify": "npm:^1.2.1" + checksum: 10/4e0a82338d12370264dced2395cda18aaaad45fec630365ec88eaa1a4ba40f5eb08cd3b0c8688489d52e93f643b6598d682961f67858636f55300c590b1ddf62 languageName: node linkType: hard -"unset-value@npm:^1.0.0": - version: 1.0.0 - resolution: "unset-value@npm:1.0.0" +"simple-git@npm:3.19.1": + version: 3.19.1 + resolution: "simple-git@npm:3.19.1" dependencies: - has-value: "npm:^0.3.1" - isobject: "npm:^3.0.0" - checksum: 10/0ca644870613dece963e4abb762b0da4c1cf6be4ac2f0859a463e4e9520c1ec85e512cfbfd73371ee0bb09ef536a0c4abd6f2c357715a08b43448aedc82acee6 + "@kwsites/file-exists": "npm:^1.1.1" + "@kwsites/promise-deferred": "npm:^1.1.1" + debug: "npm:^4.3.4" + checksum: 10/a8bf386761d5d67d3d3be50e48fa206a4a469d5943a52e09bf0a9f847adaefd4588e8fbc556b6857542c897ec97786c1c6e2db636c7d8996c6139002bedf7810 languageName: node linkType: hard -"upath@npm:^1.2.0": - version: 1.2.0 - resolution: "upath@npm:1.2.0" - checksum: 10/ac07351d9e913eb7bc9bc0a17ed7d033a52575f0f2959e19726956c3e96f5d4d75aa6a7a777c4c9506e72372f58e06215e581f8dbff35611fc0a7b68ab4a6ddb +"sisteransi@npm:^1.0.5": + version: 1.0.5 + resolution: "sisteransi@npm:1.0.5" + checksum: 10/aba6438f46d2bfcef94cf112c835ab395172c75f67453fe05c340c770d3c402363018ae1ab4172a1026a90c47eaccf3af7b6ff6fa749a680c2929bd7fa2b37a4 languageName: node linkType: hard -"upath@npm:^2.0.1": - version: 2.0.1 - resolution: "upath@npm:2.0.1" - checksum: 10/7b98a83559a295d59f87f7a8d615c7549d19e4aec4dd9d52be2bf1ba93e1d6ee7d8f2188cdecbf303a22cea3768abff4268b960350152a0264125f577d9ed79e +"slash@npm:^3.0.0": + version: 3.0.0 + resolution: "slash@npm:3.0.0" + checksum: 10/94a93fff615f25a999ad4b83c9d5e257a7280c90a32a7cb8b4a87996e4babf322e469c42b7f649fd5796edd8687652f3fb452a86dc97a816f01113183393f11c languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.10": - version: 1.0.10 - resolution: "update-browserslist-db@npm:1.0.10" - dependencies: - escalade: "npm:^3.1.1" - picocolors: "npm:^1.0.0" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - browserslist-lint: cli.js - checksum: 10/2c88096ca99918efc77a514458c4241b3f2a8e7882aa91b97251231240c30c71e82cb2043aaf12e40eba6bebda3369010e180a58bc11bbd0bca29094945c31cb +"slash@npm:^4.0.0": + version: 4.0.0 + resolution: "slash@npm:4.0.0" + checksum: 10/da8e4af73712253acd21b7853b7e0dbba776b786e82b010a5bfc8b5051a1db38ed8aba8e1e8f400dd2c9f373be91eb1c42b66e91abb407ff42b10feece5e1d2d languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.11": - version: 1.0.11 - resolution: "update-browserslist-db@npm:1.0.11" - dependencies: - escalade: "npm:^3.1.1" - picocolors: "npm:^1.0.0" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10/cc1c7a38d15413046bea28ff3c7668a7cb6b4a53d83e8089fa960efd896deb6d1a9deffc2beb8dc0506186a352c8d19804efe5ec7eeb401037e14cf3ea5363f8 +"slash@npm:^5.1.0": + version: 5.1.0 + resolution: "slash@npm:5.1.0" + checksum: 10/2c41ec6fb1414cd9bba0fa6b1dd00e8be739e3fe85d079c69d4b09ca5f2f86eafd18d9ce611c0c0f686428638a36c272a6ac14799146a8295f259c10cc45cde4 languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.13": - version: 1.0.13 - resolution: "update-browserslist-db@npm:1.0.13" +"slice-ansi@npm:^3.0.0": + version: 3.0.0 + resolution: "slice-ansi@npm:3.0.0" dependencies: - escalade: "npm:^3.1.1" - picocolors: "npm:^1.0.0" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10/9074b4ef34d2ed931f27d390aafdd391ee7c45ad83c508e8fed6aaae1eb68f81999a768ed8525c6f88d4001a4fbf1b8c0268f099d0e8e72088ec5945ac796acf + ansi-styles: "npm:^4.0.0" + astral-regex: "npm:^2.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + checksum: 10/5ec6d022d12e016347e9e3e98a7eb2a592213a43a65f1b61b74d2c78288da0aded781f665807a9f3876b9daa9ad94f64f77d7633a0458876c3a4fdc4eb223f24 languageName: node linkType: hard -"update-browserslist-db@npm:^1.1.0": - version: 1.1.0 - resolution: "update-browserslist-db@npm:1.1.0" +"slice-ansi@npm:^4.0.0": + version: 4.0.0 + resolution: "slice-ansi@npm:4.0.0" dependencies: - escalade: "npm:^3.1.2" - picocolors: "npm:^1.0.1" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10/d70b9efeaf4601aadb1a4f6456a7a5d9118e0063d995866b8e0c5e0cf559482671dab6ce7b079f9536b06758a344fbd83f974b965211e1c6e8d1958540b0c24c + ansi-styles: "npm:^4.0.0" + astral-regex: "npm:^2.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + checksum: 10/4a82d7f085b0e1b070e004941ada3c40d3818563ac44766cca4ceadd2080427d337554f9f99a13aaeb3b4a94d9964d9466c807b3d7b7541d1ec37ee32d308756 languageName: node linkType: hard -"update-notifier@npm:^5.1.0": - version: 5.1.0 - resolution: "update-notifier@npm:5.1.0" - dependencies: - boxen: "npm:^5.0.0" - chalk: "npm:^4.1.0" - configstore: "npm:^5.0.1" - has-yarn: "npm:^2.1.0" - import-lazy: "npm:^2.1.0" - is-ci: "npm:^2.0.0" - is-installed-globally: "npm:^0.4.0" - is-npm: "npm:^5.0.0" - is-yarn-global: "npm:^0.3.0" - latest-version: "npm:^5.1.0" - pupa: "npm:^2.1.1" - semver: "npm:^7.3.4" - semver-diff: "npm:^3.1.1" - xdg-basedir: "npm:^4.0.0" - checksum: 10/9df39e2d4f2e59ea788c719baaacf3d2bdde09d065f00319d52c0af255990e15f98ba40c115fb6246b6b2d5468685f36955ae0679c0b7fec834892fe7db4cab2 +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10/927484aa0b1640fd9473cee3e0a0bcad6fce93fd7bbc18bac9ad0c33686f5d2e2c422fba24b5899c184524af01e11dd2bd051c2bf2b07e47aff8ca72cbfc60d2 languageName: node linkType: hard -"upper-case-first@npm:^1.1.0, upper-case-first@npm:^1.1.2": - version: 1.1.2 - resolution: "upper-case-first@npm:1.1.2" +"socket.io-adapter@npm:~2.5.2": + version: 2.5.5 + resolution: "socket.io-adapter@npm:2.5.5" dependencies: - upper-case: "npm:^1.1.1" - checksum: 10/7467267967de978316c26c64ca9a4b2fbe5ccb530dc2579b1078bfeb89723ba24bc20881de1d23db301f6e7e5e24b4084e6f5f7ddbb2275a55177d06d9a250b7 + debug: "npm:~4.3.4" + ws: "npm:~8.17.1" + checksum: 10/e364733a4c34ff1d4a02219e409bd48074fd614b7f5b0568ccfa30dd553252a5b9a41056931306a276891d13ea76a19e2c6f2128a4675c37323f642896874d80 languageName: node linkType: hard -"upper-case-first@npm:^2.0.2": - version: 2.0.2 - resolution: "upper-case-first@npm:2.0.2" +"socket.io-parser@npm:>=4.2.3": + version: 4.2.4 + resolution: "socket.io-parser@npm:4.2.4" dependencies: - tslib: "npm:^2.0.3" - checksum: 10/4487db4701effe3b54ced4b3e4aa4d9ab06c548f97244d04aafb642eedf96a76d5a03cf5f38f10f415531d5792d1ac6e1b50f2a76984dc6964ad530f12876409 - languageName: node - linkType: hard - -"upper-case@npm:^1.0.3, upper-case@npm:^1.1.0, upper-case@npm:^1.1.1, upper-case@npm:^1.1.3": - version: 1.1.3 - resolution: "upper-case@npm:1.1.3" - checksum: 10/fc4101fdcd783ee963d49d279186688d4ba2fab90e78dbd001ad141522a66ccfe310932f25e70d5211b559ab205be8c24bf9c5520c7ab7dcd0912274c6d976a3 + "@socket.io/component-emitter": "npm:~3.1.0" + debug: "npm:~4.3.1" + checksum: 10/4be500a9ff7e79c50ec25af11048a3ed34b4c003a9500d656786a1e5bceae68421a8394cf3eb0aa9041f85f36c1a9a737617f4aee91a42ab4ce16ffb2aa0c89c languageName: node linkType: hard -"uri-js@npm:^4.2.2": - version: 4.4.1 - resolution: "uri-js@npm:4.4.1" +"socket.io@npm:4.6.2": + version: 4.6.2 + resolution: "socket.io@npm:4.6.2" dependencies: - punycode: "npm:^2.1.0" - checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb + accepts: "npm:~1.3.4" + base64id: "npm:~2.0.0" + debug: "npm:~4.3.2" + engine.io: "npm:~6.4.2" + socket.io-adapter: "npm:~2.5.2" + socket.io-parser: "npm:~4.2.4" + checksum: 10/47c4e0f9638c97d08f37ecd4b5dcaa6be17d572ecf713ff6e5ca6162d2b15f77aad7f14bcf76f613a16f6dee822fbd4a3e1d6d65ee0a1d4fdc56a6e5e600eda8 languageName: node linkType: hard -"urijs@npm:^1.19.1": - version: 1.19.11 - resolution: "urijs@npm:1.19.11" - checksum: 10/2aa5547b53c37ebee03a8ad70feae1638a37cc4c7e543abbffb14fc86b17f84f303d08e45c501441410c025bab22aa84673c97604b7b2619967f1dd49f69931f +"socks-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "socks-proxy-agent@npm:7.0.0" + dependencies: + agent-base: "npm:^6.0.2" + debug: "npm:^4.3.3" + socks: "npm:^2.6.2" + checksum: 10/26c75d9c62a9ed3fd494df60e65e88da442f78e0d4bc19bfd85ac37bd2c67470d6d4bba5202e804561cda6674db52864c9e2a2266775f879bc8d89c1445a5f4c languageName: node linkType: hard -"urix@npm:^0.1.0": - version: 0.1.0 - resolution: "urix@npm:0.1.0" - checksum: 10/ebf5df5491c1d40ea88f7529ee9d8fd6501f44c47b8017d168fd1558d40f7d613c6f39869643344e58b71ba2da357a7c26f353a2a54d416492fcdca81f05b338 +"socks-proxy-agent@npm:^8.0.1": + version: 8.0.2 + resolution: "socks-proxy-agent@npm:8.0.2" + dependencies: + agent-base: "npm:^7.0.2" + debug: "npm:^4.3.4" + socks: "npm:^2.7.1" + checksum: 10/ea727734bd5b2567597aa0eda14149b3b9674bb44df5937bbb9815280c1586994de734d965e61f1dd45661183d7b41f115fb9e432d631287c9063864cfcc2ecc languageName: node linkType: hard -"url-join@npm:0.0.1": - version: 0.0.1 - resolution: "url-join@npm:0.0.1" - checksum: 10/9c5ff729372b9274c1d03f12caabe986716c79a36ebc56da678b8a5eac3c6a8c10fbc02f82aa23a102a044f9d7bf6a9d787c9198d2111caac403c50cf8271e2e +"socks@npm:^2.6.2": + version: 2.6.2 + resolution: "socks@npm:2.6.2" + dependencies: + ip: "npm:^1.1.5" + smart-buffer: "npm:^4.2.0" + checksum: 10/820232ddaeb847ef33312c429fb51aae03e1b774917f189ef491048bb4c4d7742924064f72d7730e3aa08a3ddb6cc2bdcd5949d34c35597e4f6a66eefd994f14 languageName: node linkType: hard -"url-join@npm:^4.0.0": - version: 4.0.1 - resolution: "url-join@npm:4.0.1" - checksum: 10/b53b256a9a36ed6b0f6768101e78ca97f32d7b935283fd29ce19d0bbfb6f88aa80aa6c03fd87f2f8978ab463a6539f597a63051e7086f3379685319a7495f709 +"socks@npm:^2.7.1": + version: 2.7.1 + resolution: "socks@npm:2.7.1" + dependencies: + ip: "npm:^2.0.0" + smart-buffer: "npm:^4.2.0" + checksum: 10/5074f7d6a13b3155fa655191df1c7e7a48ce3234b8ccf99afa2ccb56591c195e75e8bb78486f8e9ea8168e95a29573cbaad55b2b5e195160ae4d2ea6811ba833 languageName: node linkType: hard -"url-parse-lax@npm:^1.0.0": - version: 1.0.0 - resolution: "url-parse-lax@npm:1.0.0" +"sort-keys@npm:^5.0.0": + version: 5.0.0 + resolution: "sort-keys@npm:5.0.0" dependencies: - prepend-http: "npm:^1.0.1" - checksum: 10/03316acff753845329652258c16d1688765ee34f7d242a94dadf9ff6e43ea567ec062cec7aa27c37f76f2c57f95e0660695afff32fb97b527591c7340a3090fa + is-plain-obj: "npm:^4.0.0" + checksum: 10/9c0b7a468312075be03770b260b2cc0e5d55149025e564edaed41c9ff619199698aad6712a6fe4bbc75c541efb081276ac6bbd4cf2723d742f272f7a8fe354f5 languageName: node linkType: hard -"url-parse-lax@npm:^3.0.0": - version: 3.0.0 - resolution: "url-parse-lax@npm:3.0.0" - dependencies: - prepend-http: "npm:^2.0.0" - checksum: 10/1040e357750451173132228036aff1fd04abbd43eac1fb3e4fca7495a078bcb8d33cb765fe71ad7e473d9c94d98fd67adca63bd2716c815a2da066198dd37217 +"sort-object-keys@npm:^1.1.3": + version: 1.1.3 + resolution: "sort-object-keys@npm:1.1.3" + checksum: 10/abea944d6722a1710a1aa6e4f9509da085d93d5fc0db23947cb411eedc7731f80022ce8fa68ed83a53dd2ac7441fcf72a3f38c09b3d9bbc4ff80546aa2e151ad languageName: node linkType: hard -"url-parse@npm:^1.5.3": - version: 1.5.10 - resolution: "url-parse@npm:1.5.10" +"sort-package-json@npm:1.57.0": + version: 1.57.0 + resolution: "sort-package-json@npm:1.57.0" dependencies: - querystringify: "npm:^2.1.1" - requires-port: "npm:^1.0.0" - checksum: 10/c9e96bc8c5b34e9f05ddfeffc12f6aadecbb0d971b3cc26015b58d5b44676a99f50d5aeb1e5c9e61fa4d49961ae3ab1ae997369ed44da51b2f5ac010d188e6ad + detect-indent: "npm:^6.0.0" + detect-newline: "npm:3.1.0" + git-hooks-list: "npm:1.0.3" + globby: "npm:10.0.0" + is-plain-obj: "npm:2.1.0" + sort-object-keys: "npm:^1.1.3" + bin: + sort-package-json: cli.js + checksum: 10/abc217315070ffd6559b32b95917b92c8376880c0d17b4ad2b0eeacdffb38bf723b892a56c56d91ae6999fca3369bfdf5e29b1b02b2fc944b0cbb299c069d0e8 languageName: node linkType: hard -"url-set-query@npm:^1.0.0": - version: 1.0.0 - resolution: "url-set-query@npm:1.0.0" - checksum: 10/a6e4d1ac5c3e7db8644655a2774b9462d8d95ec7abae341ff53d4a3d03adc2dabc38650dc757659fcbce4859372bbea4a896ac842dd5b54cc22aae087ba35664 +"source-map-js@npm:^1.0.2": + version: 1.0.2 + resolution: "source-map-js@npm:1.0.2" + checksum: 10/38e2d2dd18d2e331522001fc51b54127ef4a5d473f53b1349c5cca2123562400e0986648b52e9407e348eaaed53bce49248b6e2641e6d793ca57cb2c360d6d51 languageName: node linkType: hard -"url-template@npm:^2.0.8": - version: 2.0.8 - resolution: "url-template@npm:2.0.8" - checksum: 10/fc6a4cf6c3c3c3d7f0a0bb4405c41b81934e583b454e52ace7b2e5d7ed32ec9c2970ff1826d240c5823955fcb13531a1fc4ff6ba4569b1886a2976665353e952 +"source-map-loader@npm:4.0.1": + version: 4.0.1 + resolution: "source-map-loader@npm:4.0.1" + dependencies: + abab: "npm:^2.0.6" + iconv-lite: "npm:^0.6.3" + source-map-js: "npm:^1.0.2" + peerDependencies: + webpack: ^5.72.1 + checksum: 10/bdddd7a391bec85a02da47a4ab02d2c63e6736231b712913dd423f1c2a4e8668888813a9213014fcf41fc6991b61c795d703f3a684b7e1c7335bd0a8f9f23ccd languageName: node linkType: hard -"url-to-options@npm:^1.0.1": - version: 1.0.1 - resolution: "url-to-options@npm:1.0.1" - checksum: 10/20e59f4578525fb0d30ffc22b13b5aa60bc9e57cefd4f5842720f5b57211b6dec54abeae2d675381ac4486fd1a2e987f1318725dea996e503ff89f8c8ce2c17e +"source-map-support@npm:0.5.13": + version: 0.5.13 + resolution: "source-map-support@npm:0.5.13" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/d1514a922ac9c7e4786037eeff6c3322f461cd25da34bb9fefb15387b3490531774e6e31d95ab6d5b84a3e139af9c3a570ccaee6b47bd7ea262691ed3a8bc34e languageName: node linkType: hard -"url@npm:0.10.3": - version: 0.10.3 - resolution: "url@npm:0.10.3" +"source-map-support@npm:^0.5.16, source-map-support@npm:~0.5.20": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" dependencies: - punycode: "npm:1.3.2" - querystring: "npm:0.2.0" - checksum: 10/8c04e30d65907a1e01569cead632c74ea3af99d1b9b63dfbb2cf636640fe210f7a1bc16990aac04914dbb63ad2bd50effee3e782e0170d5938a11e8aa38358a5 + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 languageName: node linkType: hard -"url@npm:^0.11.0": - version: 0.11.0 - resolution: "url@npm:0.11.0" - dependencies: - punycode: "npm:1.3.2" - querystring: "npm:0.2.0" - checksum: 10/beec744c7ade6ef178fd631e2fe70110c5c53f9e7caea5852703214bfcbf03fd136b98b3b6f4a08bd2420a76f569cbc10c2a86ade7f836ac7d9ff27ed62d8d2d +"source-map@npm:^0.5.0": + version: 0.5.7 + resolution: "source-map@npm:0.5.7" + checksum: 10/9b4ac749ec5b5831cad1f8cc4c19c4298ebc7474b24a0acf293e2f040f03f8eeccb3d01f12aa0f90cf46d555c887e03912b83a042c627f419bda5152d89c5269 languageName: node linkType: hard -"urlcat@npm:3.1.0": - version: 3.1.0 - resolution: "urlcat@npm:3.1.0" - dependencies: - qs: "npm:^6.9.4" - checksum: 10/1e6106c96bf71bf268b5bcd528e8e07b82001039f7103ec637702f89eebe1b5c2a5120f3dcff8a1b968a6edaafaa87ec67832e2f13302da4cabbb98880d45183 +"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff languageName: node linkType: hard -"use@npm:^3.1.0": - version: 3.1.1 - resolution: "use@npm:3.1.1" - checksum: 10/08a130289f5238fcbf8f59a18951286a6e660d17acccc9d58d9b69dfa0ee19aa038e8f95721b00b432c36d1629a9e32a464bf2e7e0ae6a244c42ddb30bdd8b33 +"spawn-command@npm:^0.0.2-1": + version: 0.0.2-1 + resolution: "spawn-command@npm:0.0.2-1" + checksum: 10/f59fd2f16c8ffe46afda588134697ba4f1e2032b216baf7c134a66a0b3d48df323ee46c367f273eb7f7bb8c68b8296ca6b49aac6530cedb4b6785302d238c411 languageName: node linkType: hard -"user-home@npm:^2.0.0": +"spawn-wrap@npm:^2.0.0": version: 2.0.0 - resolution: "user-home@npm:2.0.0" + resolution: "spawn-wrap@npm:2.0.0" dependencies: - os-homedir: "npm:^1.0.0" - checksum: 10/a3329faa959fcd9e3e01a03347ca974f7f6b8896e6a634f29c61d8d5b61557d853c6fc5a6dff1a28e2da85b400d0e4490368a28de452ba8c41a2bf3a92cb110a + foreground-child: "npm:^2.0.0" + is-windows: "npm:^1.0.2" + make-dir: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + which: "npm:^2.0.1" + checksum: 10/ce6ca08d66c3a41a28a7ecc10bf4945d7930fd3ae961d40804ee109cee6ee9f8436125f53bc07918ca1eb461fe2ff0033af1dc3cb803469b585639675fc2d2e7 languageName: node linkType: hard -"utf-8-validate@npm:5.0.7": - version: 5.0.7 - resolution: "utf-8-validate@npm:5.0.7" +"spdx-correct@npm:^3.0.0": + version: 3.1.1 + resolution: "spdx-correct@npm:3.1.1" dependencies: - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.3.0" - checksum: 10/05045f5348747f63ad56caf93ceca240f180f341f7f6ea5c02625265293b0c237a726ff29e2cc2270037efd04cab6bdb4aff650dcdc0232d2c6c6e2809b479ad + spdx-expression-parse: "npm:^3.0.0" + spdx-license-ids: "npm:^3.0.0" + checksum: 10/688e028c3ca6090d1b516272a2dd60b30f163cbf166295ac4b8078fd74f524365cd996e2b18cabdaa41647aa806e117604aa3b3216f69076a554999913d09d47 languageName: node linkType: hard -"utf-8-validate@npm:^5.0.2": - version: 5.0.8 - resolution: "utf-8-validate@npm:5.0.8" +"spdx-exceptions@npm:^2.1.0": + version: 2.3.0 + resolution: "spdx-exceptions@npm:2.3.0" + checksum: 10/cb69a26fa3b46305637123cd37c85f75610e8c477b6476fa7354eb67c08128d159f1d36715f19be6f9daf4b680337deb8c65acdcae7f2608ba51931540687ac0 + languageName: node + linkType: hard + +"spdx-expression-parse@npm:^3.0.0": + version: 3.0.1 + resolution: "spdx-expression-parse@npm:3.0.1" dependencies: - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.3.0" - checksum: 10/d7ab0fd3c5ee1d12c651e16e939f90e787517fc98ab934968c566cf26a112ba1da075962c6a7d9e3e6f5a29638ef87498e938ad39b08730f5b77866fe7cde2c2 + spdx-exceptions: "npm:^2.1.0" + spdx-license-ids: "npm:^3.0.0" + checksum: 10/a1c6e104a2cbada7a593eaa9f430bd5e148ef5290d4c0409899855ce8b1c39652bcc88a725259491a82601159d6dc790bedefc9016c7472f7de8de7361f8ccde languageName: node linkType: hard -"utf8-byte-length@npm:^1.0.1": - version: 1.0.4 - resolution: "utf8-byte-length@npm:1.0.4" - checksum: 10/f188ca076ec094d58e7009fcc32623c5830c7f0f3e15802bfa4fdd1e759454a481fc4ac05e0fa83b7736e77af628a9ee0e57dcc89683d688fde3811473e42143 +"spdx-license-ids@npm:^3.0.0": + version: 3.0.11 + resolution: "spdx-license-ids@npm:3.0.11" + checksum: 10/aed256585883aef483590e15d8352b6b787f01cc7e3e120e10457383d574b2cd314d8325854f5f831733ee2e257a6010a57adc93fc166648cc3bc9ab7cd1ea6b languageName: node linkType: hard -"utf8@npm:3.0.0, utf8@npm:^3.0.0": - version: 3.0.0 - resolution: "utf8@npm:3.0.0" - checksum: 10/31d19c4faacbb65b09ebc1c21c32b20bdb0919c6f6773cee5001b99bb83f8e503e7233c08fc71ebb34f7cfebd95cec3243b81d90176097aa2f286cccb4ce866e +"split-text-to-chunks@npm:^1.0.0": + version: 1.0.0 + resolution: "split-text-to-chunks@npm:1.0.0" + dependencies: + get-stdin: "npm:^5.0.1" + minimist: "npm:^1.2.0" + bin: + wordwrap: cli.js + checksum: 10/944a2defff4eccf193216177b284bd8d3da0d83391827d89efa4250d4c0a0729e63fecfc0cf56fa2c50acba2b8017753b332b13d0aebdb9fb5c1c2164a943ce5 languageName: node linkType: hard -"util-arity@npm:^1.0.2": - version: 1.1.0 - resolution: "util-arity@npm:1.1.0" - checksum: 10/f1c4c36395eccfa8a153c7aedf3eaf4acc5b2e9696b8ef7113312b0389f67702d973a593e39af715d6673cfe11f33fc53648e1f2209efdc4c66637fec161c5d7 +"split2@npm:^3.0.0, split2@npm:^3.2.2": + version: 3.2.2 + resolution: "split2@npm:3.2.2" + dependencies: + readable-stream: "npm:^3.0.0" + checksum: 10/a426e1e6718e2f7e50f102d5ec3525063d885e3d9cec021a81175fd3497fdb8b867a89c99e70bef4daeef4f2f5e544f7b92df8c1a30b4254e10a9cfdcc3dae87 languageName: node linkType: hard -"util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": - version: 1.0.2 - resolution: "util-deprecate@npm:1.0.2" - checksum: 10/474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 +"split2@npm:^4.0.0": + version: 4.2.0 + resolution: "split2@npm:4.2.0" + checksum: 10/09bbefc11bcf03f044584c9764cd31a252d8e52cea29130950b26161287c11f519807c5e54bd9e5804c713b79c02cefe6a98f4688630993386be353e03f534ab languageName: node linkType: hard -"util.promisify@npm:^1.0.0": - version: 1.1.2 - resolution: "util.promisify@npm:1.1.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - for-each: "npm:^0.3.3" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - object.getownpropertydescriptors: "npm:^2.1.6" - safe-array-concat: "npm:^1.0.0" - checksum: 10/90c139773aedfe0cda48f2e43fb96bb0b45ab1d9544ed0cc1949d6acda17053dcb60ed1d3d0a1e121f0e2c26ca21e84dc589a5f06ec33059a4c742e7cba4584f +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10/c34828732ab8509c2741e5fd1af6b767c3daf2c642f267788f933a65b1614943c282e74c4284f4fa749c264b18ee016a0d37a3e5b73aee446da46277d3a85daa languageName: node linkType: hard -"util.promisify@npm:~1.0.0": - version: 1.0.1 - resolution: "util.promisify@npm:1.0.1" +"ssri@npm:^10.0.0": + version: 10.0.2 + resolution: "ssri@npm:10.0.2" dependencies: - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.17.2" - has-symbols: "npm:^1.0.1" - object.getownpropertydescriptors: "npm:^2.1.0" - checksum: 10/f55ee259b22a9479cec4546b4724bb1e4b6c2d4fcd4627254a6483a63a609c9b223cb54fba084cd57b4d4105f7297f3197d57b30a1baee2e8e118fa7ae7e5750 + minipass: "npm:^4.0.0" + checksum: 10/1e6cc97576946bd1ea8f65339b77fa4374a3f8f87b3555d06da1d2140929558bf16c4018b504aeb1419325a9c87c1f4319ea64bea71cdc7a11f24863aa84f8d6 languageName: node linkType: hard -"util@npm:^0.12.0, util@npm:^0.12.4": - version: 0.12.4 - resolution: "util@npm:0.12.4" +"ssri@npm:^10.0.6": + version: 10.0.6 + resolution: "ssri@npm:10.0.6" dependencies: - inherits: "npm:^2.0.3" - is-arguments: "npm:^1.0.4" - is-generator-function: "npm:^1.0.7" - is-typed-array: "npm:^1.1.3" - safe-buffer: "npm:^5.1.2" - which-typed-array: "npm:^1.1.2" - checksum: 10/8287e2fdff2a98997a3436663535856e6be76ca1c7b6ed167b89a3dd6fbaf6934338ca2e34a189bcd6c6cf415680d20472381ac681bff07d33ef98c6f7126296 + minipass: "npm:^7.0.3" + checksum: 10/f92c1b3cc9bfd0a925417412d07d999935917bc87049f43ebec41074661d64cf720315661844106a77da9f8204b6d55ae29f9514e673083cae39464343af2a8b languageName: node linkType: hard -"util@npm:^0.12.5": - version: 0.12.5 - resolution: "util@npm:0.12.5" +"stack-utils@npm:^2.0.2": + version: 2.0.6 + resolution: "stack-utils@npm:2.0.6" dependencies: - inherits: "npm:^2.0.3" - is-arguments: "npm:^1.0.4" - is-generator-function: "npm:^1.0.7" - is-typed-array: "npm:^1.1.3" - which-typed-array: "npm:^1.1.2" - checksum: 10/61a10de7753353dd4d744c917f74cdd7d21b8b46379c1e48e1c4fd8e83f8190e6bd9978fc4e5102ab6a10ebda6019d1b36572fa4a325e175ec8b789a121f6147 + escape-string-regexp: "npm:^2.0.0" + checksum: 10/cdc988acbc99075b4b036ac6014e5f1e9afa7e564482b687da6384eee6a1909d7eaffde85b0a17ffbe186c5247faf6c2b7544e802109f63b72c7be69b13151bb languageName: node linkType: hard -"utila@npm:~0.4": - version: 0.4.0 - resolution: "utila@npm:0.4.0" - checksum: 10/b068d8cb140588da0d0c80ee3c14c6b75d3f68760d8a1c6c3908d0270e9e4056454ff16189586481b7382926c44674f6929d08e06eaf9ec8f62736cd900169c5 +"stack-utils@npm:^2.0.3, stack-utils@npm:^2.0.4": + version: 2.0.5 + resolution: "stack-utils@npm:2.0.5" + dependencies: + escape-string-regexp: "npm:^2.0.0" + checksum: 10/a6d64e5dd24d321289ebefdff2e210ece75fdf20dbcdb702b86da1f7b730743fae3e9337adae4a5cc00d4970d748ff758387df3ea7c71c45b466c43c7359bc00 languageName: node linkType: hard -"utils-merge@npm:1.0.1": - version: 1.0.1 - resolution: "utils-merge@npm:1.0.1" - checksum: 10/5d6949693d58cb2e636a84f3ee1c6e7b2f9c16cb1d42d0ecb386d8c025c69e327205aa1c69e2868cc06a01e5e20681fbba55a4e0ed0cce913d60334024eae798 +"stop-iteration-iterator@npm:^1.0.0": + version: 1.0.0 + resolution: "stop-iteration-iterator@npm:1.0.0" + dependencies: + internal-slot: "npm:^1.0.4" + checksum: 10/2a23a36f4f6bfa63f46ae2d53a3f80fe8276110b95a55345d8ed3d92125413494033bc8697eb774e8f7aeb5725f70e3d69753caa2ecacdac6258c16fa8aa8b0f languageName: node linkType: hard -"uuid@npm:10.0.0, uuid@npm:^10.0.0": - version: 10.0.0 - resolution: "uuid@npm:10.0.0" - bin: - uuid: dist/bin/uuid - checksum: 10/35aa60614811a201ff90f8ca5e9ecb7076a75c3821e17f0f5ff72d44e36c2d35fcbc2ceee9c4ac7317f4cc41895da30e74f3885e30313bee48fda6338f250538 +"stream-browserify@npm:3.0.0, stream-browserify@npm:^3.0.0": + version: 3.0.0 + resolution: "stream-browserify@npm:3.0.0" + dependencies: + inherits: "npm:~2.0.4" + readable-stream: "npm:^3.5.0" + checksum: 10/05a3cd0a0ce2d568dbdeb69914557c26a1b0a9d871839666b692eae42b96189756a3ed685affc90dab64ff588a8524c8aec6d85072c07905a1f0d941ea68f956 languageName: node linkType: hard -"uuid@npm:2.0.1": - version: 2.0.1 - resolution: "uuid@npm:2.0.1" - checksum: 10/a5772e9231dd1e4fb111915f8ffe59f499bae7c20dfde09ac457a7a62b12abd6112d082496bdd209277cba1ac4e7a2bc83b8748ae0ca8fc74401b1df31f126e0 +"stream-http@npm:^3.2.0": + version: 3.2.0 + resolution: "stream-http@npm:3.2.0" + dependencies: + builtin-status-codes: "npm:^3.0.0" + inherits: "npm:^2.0.4" + readable-stream: "npm:^3.6.0" + xtend: "npm:^4.0.2" + checksum: 10/4f85738cbc6de70ecf0a04bc38b6092b4d91dd5317d3d93c88a84c48e63b82a8724ab5fd591df9f587b5139fe439d1748e4e3db3cb09c2b1e23649cb9d89859e languageName: node linkType: hard -"uuid@npm:3.3.2": - version: 3.3.2 - resolution: "uuid@npm:3.3.2" - bin: - uuid: ./bin/uuid - checksum: 10/3834a826020a23fca314116c2becddc7f5d756b0280d630b58a65e700afeefd89d78ae97ddbdea5dcad497666cda6e9b0390ba74508e650d43d83a32d1e7cd19 +"stream-to-array@npm:^2.3.0": + version: 2.3.0 + resolution: "stream-to-array@npm:2.3.0" + dependencies: + any-promise: "npm:^1.1.0" + checksum: 10/7feaf63b38399b850615e6ffcaa951e96e4c8f46745dbce4b553a94c5dc43966933813747014935a3ff97793e7f30a65270bde19f82b2932871a1879229a77cf languageName: node linkType: hard -"uuid@npm:8.3.2, uuid@npm:^8.3.0, uuid@npm:^8.3.2": - version: 8.3.2 - resolution: "uuid@npm:8.3.2" - bin: - uuid: dist/bin/uuid - checksum: 10/9a5f7aa1d6f56dd1e8d5f2478f855f25c645e64e26e347a98e98d95781d5ed20062d6cca2eecb58ba7c84bc3910be95c0451ef4161906abaab44f9cb68ffbdd1 +"string-argv@npm:0.3.1": + version: 0.3.1 + resolution: "string-argv@npm:0.3.1" + checksum: 10/47c637e3f47b3f5a6430036315e65564483fcf7745341d474943f0c2046f188681275fc1f2948db75c7a7e68134b1446e0dcceda60a7be1ee0c3fb026c0d90c4 languageName: node linkType: hard -"uuid@npm:^3.3.2, uuid@npm:^3.3.3": - version: 3.4.0 - resolution: "uuid@npm:3.4.0" - bin: - uuid: ./bin/uuid - checksum: 10/4f2b86432b04cc7c73a0dd1bcf11f1fc18349d65d2e4e32dd0fc658909329a1e0cc9244aa93f34c0cccfdd5ae1af60a149251a5f420ec3ac4223a3dab198fb2e +"string-length@npm:^4.0.1": + version: 4.0.2 + resolution: "string-length@npm:4.0.2" + dependencies: + char-regex: "npm:^1.0.2" + strip-ansi: "npm:^6.0.0" + checksum: 10/ce85533ef5113fcb7e522bcf9e62cb33871aa99b3729cec5595f4447f660b0cefd542ca6df4150c97a677d58b0cb727a3fe09ac1de94071d05526c73579bf505 languageName: node linkType: hard -"uuid@npm:^9.0.0, uuid@npm:^9.0.1": - version: 9.0.1 - resolution: "uuid@npm:9.0.1" - bin: - uuid: dist/bin/uuid - checksum: 10/9d0b6adb72b736e36f2b1b53da0d559125ba3e39d913b6072f6f033e0c87835b414f0836b45bcfaf2bdf698f92297fea1c3cc19b0b258bc182c9c43cc0fab9f2 +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb languageName: node linkType: hard -"v8-compile-cache-lib@npm:^3.0.0": - version: 3.0.0 - resolution: "v8-compile-cache-lib@npm:3.0.0" - checksum: 10/90cfbe591c47e0b69c3ddf6b224dd3cfd4e00e67aedd71c35896d5edf72312410cf223230048176a93d6621c78c00e38b9f62edbe125b2454484a84f3092f7e7 +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10/7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 languageName: node linkType: hard -"v8-compile-cache-lib@npm:^3.0.1": - version: 3.0.1 - resolution: "v8-compile-cache-lib@npm:3.0.1" - checksum: 10/88d3423a52b6aaf1836be779cab12f7016d47ad8430dffba6edf766695e6d90ad4adaa3d8eeb512cc05924f3e246c4a4ca51e089dccf4402caa536b5e5be8961 +"string-width@npm:^7.2.0": + version: 7.2.0 + resolution: "string-width@npm:7.2.0" + dependencies: + emoji-regex: "npm:^10.3.0" + get-east-asian-width: "npm:^1.0.0" + strip-ansi: "npm:^7.1.0" + checksum: 10/42f9e82f61314904a81393f6ef75b832c39f39761797250de68c041d8ba4df2ef80db49ab6cd3a292923a6f0f409b8c9980d120f7d32c820b4a8a84a2598a295 languageName: node linkType: hard -"v8-to-istanbul@npm:^8.1.0": - version: 8.1.1 - resolution: "v8-to-istanbul@npm:8.1.1" +"string.prototype.padend@npm:^3.0.0": + version: 3.1.3 + resolution: "string.prototype.padend@npm:3.1.3" dependencies: - "@types/istanbul-lib-coverage": "npm:^2.0.1" - convert-source-map: "npm:^1.6.0" - source-map: "npm:^0.7.3" - checksum: 10/db5469f133a7cfb7680a28ddfb31aad2cc64f282fa7cf0c8e91f91bfd542bf61597260282be28c9648f0f2114963a24b273ed92af9a5cad6cb629c708ca72f8e + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.3" + es-abstract: "npm:^1.19.1" + checksum: 10/ae99a99c9ee78d0b5a76a0f5913fa9a43a911794937748df821565b1ae37279603fe718aa1954e9034681cc20ae75d9d9f8af02a15a796d92b81d9bcb637b879 languageName: node linkType: hard -"v8-to-istanbul@npm:^9.0.1": - version: 9.1.0 - resolution: "v8-to-istanbul@npm:9.1.0" +"string.prototype.trim@npm:^1.2.7": + version: 1.2.7 + resolution: "string.prototype.trim@npm:1.2.7" dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.12" - "@types/istanbul-lib-coverage": "npm:^2.0.1" - convert-source-map: "npm:^1.6.0" - checksum: 10/95811ff2f17a31432c3fc7b3027b7e8c2c6ca5e60a7811c5050ce51920ab2b80df29feb04c52235bbfdaa9a6809acd5a5dd9668292e98c708617c19e087c3f68 + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.4" + es-abstract: "npm:^1.20.4" + checksum: 10/a1b795bdb4b4b7d9399e99771e8a36493a30cf18095b0e8b36bcb211aad42dc59186c9a833c774f7a70429dbd3862818133d7e0da1547a0e9f0e1ebddf995635 languageName: node linkType: hard -"validate-npm-package-license@npm:^3.0.1, validate-npm-package-license@npm:^3.0.4": - version: 3.0.4 - resolution: "validate-npm-package-license@npm:3.0.4" +"string.prototype.trim@npm:^1.2.8": + version: 1.2.8 + resolution: "string.prototype.trim@npm:1.2.8" dependencies: - spdx-correct: "npm:^3.0.0" - spdx-expression-parse: "npm:^3.0.0" - checksum: 10/86242519b2538bb8aeb12330edebb61b4eb37fd35ef65220ab0b03a26c0592c1c8a7300d32da3cde5abd08d18d95e8dabfad684b5116336f6de9e6f207eec224 + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + checksum: 10/9301f6cb2b6c44f069adde1b50f4048915985170a20a1d64cf7cb2dc53c5cd6b9525b92431f1257f894f94892d6c4ae19b5aa7f577c3589e7e51772dffc9d5a4 languageName: node linkType: hard -"validate-npm-package-name@npm:^5.0.0": - version: 5.0.0 - resolution: "validate-npm-package-name@npm:5.0.0" +"string.prototype.trimend@npm:^1.0.4": + version: 1.0.4 + resolution: "string.prototype.trimend@npm:1.0.4" dependencies: - builtins: "npm:^5.0.0" - checksum: 10/5342a994986199b3c28e53a8452a14b2bb5085727691ea7aa0d284a6606b127c371e0925ae99b3f1ef7cc7d2c9de75f52eb61a3d1cc45e39bca1e3a9444cbb4e + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.3" + checksum: 10/5733b0f9801276387be136f1591883fc1b6371e263533d7797dc6178916a98bd9f632870f25e58a827ed028c17003b70e37650e80fc6703af6883cb2f3b0c1b3 languageName: node linkType: hard -"validator@npm:^13.6.0": - version: 13.7.0 - resolution: "validator@npm:13.7.0" - checksum: 10/c317ec88358a170d9fe3fa47e7f5367b37f41791a5460227aaaa11580c3c9bd27f16b8e0ce47d558e2d7ab318d7ad4d3980f05e2509f0fdc9f89b2e2ae860150 +"string.prototype.trimend@npm:^1.0.6": + version: 1.0.6 + resolution: "string.prototype.trimend@npm:1.0.6" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.4" + es-abstract: "npm:^1.20.4" + checksum: 10/3893db9267e0b8a16658c3947738536e90c400a9b7282de96925d4e210174cfe66c59d6b7eb5b4a9aaa78ef7f5e46afb117e842d93112fbd105c8d19206d8092 languageName: node linkType: hard -"validator@npm:^13.7.0": - version: 13.11.0 - resolution: "validator@npm:13.11.0" - checksum: 10/4bf094641eb71729c06a42d669840e7189597ba655a8264adabac9bf03f95cd6fde5fbc894b0a13ee861bd4a852f56d2afdc9391aeaeb3fc0f9633a974140e12 +"string.prototype.trimend@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimend@npm:1.0.7" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + checksum: 10/3f0d3397ab9bd95cd98ae2fe0943bd3e7b63d333c2ab88f1875cf2e7c958c75dc3355f6fe19ee7c8fca28de6f39f2475e955e103821feb41299a2764a7463ffa languageName: node linkType: hard -"value-or-promise@npm:1.0.11": - version: 1.0.11 - resolution: "value-or-promise@npm:1.0.11" - checksum: 10/9bd1cf82be5b59ec4a7ee9fa17ca7b3f16165c3ea33ebabe514f7a20e4f88dd11f912900f0279760618eb7fbd5e3bb2a4cf4b351b5fd8e8da69aa2719725e54a +"string.prototype.trimstart@npm:^1.0.4": + version: 1.0.4 + resolution: "string.prototype.trimstart@npm:1.0.4" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.3" + checksum: 10/18e0b7362c51f566a3de095c4bab953174897f6cebe92826234f04d2744b0fdb25095c74661e0c15776d1338d64965be0a4f9c8be8851ee15b827c63a5280fdb languageName: node linkType: hard -"value-or-promise@npm:^1.0.12": - version: 1.0.12 - resolution: "value-or-promise@npm:1.0.12" - checksum: 10/a4cc31fc9c3826b8a216ef2037b676904324c00c4acd903aaec2fe0c08516a189345261dd3cc822ec108532b2ea36b7c99bbdee1c3ddcb7f4b3d57d7e61b2064 +"string.prototype.trimstart@npm:^1.0.6": + version: 1.0.6 + resolution: "string.prototype.trimstart@npm:1.0.6" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.4" + es-abstract: "npm:^1.20.4" + checksum: 10/05e2cd06fa5311b17f5b2c7af0a60239fa210f4bb07bbcfce4995215dce330e2b1dd2d8030d371f46252ab637522e14b6e9a78384e8515945b72654c14261d54 languageName: node linkType: hard -"varint@npm:^5.0.0": - version: 5.0.2 - resolution: "varint@npm:5.0.2" - checksum: 10/e1a66bf9a6cea96d1f13259170d4d41b845833acf3a9df990ea1e760d279bd70d5b1f4c002a50197efd2168a2fd43eb0b808444600fd4d23651e8d42fe90eb05 +"string.prototype.trimstart@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimstart@npm:1.0.7" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + checksum: 10/6e594d3a61b127d243b8be1312e9f78683abe452cfe0bcafa3e0dc62ad6f030ccfb64d87ed3086fb7cb540fda62442c164d237cc5cc4d53c6e3eb659c29a0aeb languageName: node linkType: hard -"varint@npm:^6.0.0": - version: 6.0.0 - resolution: "varint@npm:6.0.0" - checksum: 10/7684113c9d497c01e40396e50169c502eb2176203219b96e1c5ac965a3e15b4892bd22b7e48d87148e10fffe638130516b6dbeedd0efde2b2d0395aa1772eea7 +"string_decoder@npm:^1.1.1, string_decoder@npm:^1.3.0": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 10/54d23f4a6acae0e93f999a585e673be9e561b65cd4cca37714af1e893ab8cd8dfa52a9e4f58f48f87b4a44918d3a9254326cb80ed194bf2e4c226e2b21767e56 languageName: node linkType: hard -"vary@npm:^1, vary@npm:~1.1.2": - version: 1.1.2 - resolution: "vary@npm:1.1.2" - checksum: 10/31389debef15a480849b8331b220782230b9815a8e0dbb7b9a8369559aed2e9a7800cd904d4371ea74f4c3527db456dc8e7ac5befce5f0d289014dbdf47b2242 +"string_decoder@npm:~1.1.1": + version: 1.1.1 + resolution: "string_decoder@npm:1.1.1" + dependencies: + safe-buffer: "npm:~5.1.0" + checksum: 10/7c41c17ed4dea105231f6df208002ebddd732e8e9e2d619d133cecd8e0087ddfd9587d2feb3c8caf3213cbd841ada6d057f5142cae68a4e62d3540778d9819b4 languageName: node linkType: hard -"verror@npm:1.10.0": - version: 1.10.0 - resolution: "verror@npm:1.10.0" +"stringify-object@npm:3.3.0, stringify-object@npm:^3.2.1": + version: 3.3.0 + resolution: "stringify-object@npm:3.3.0" dependencies: - assert-plus: "npm:^1.0.0" - core-util-is: "npm:1.0.2" - extsprintf: "npm:^1.2.0" - checksum: 10/da548149dd9c130a8a2587c9ee71ea30128d1526925707e2d01ed9c5c45c9e9f86733c66a328247cdd5f7c1516fb25b0f959ba754bfbe15072aa99ff96468a29 + get-own-enumerable-property-symbols: "npm:^3.0.0" + is-obj: "npm:^1.0.1" + is-regexp: "npm:^1.0.0" + checksum: 10/973782f09a3df3f39a2cf07dbf43fb9ba6cb32976f3616cd0f6c10e0a5c5415dd72b7b700e72920e8da2bf57c3001b8e37b5af7174bab9a748ce0416989e19b1 languageName: node linkType: hard -"verror@npm:^1.9.0": - version: 1.10.1 - resolution: "verror@npm:1.10.1" +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" dependencies: - assert-plus: "npm:^1.0.0" - core-util-is: "npm:1.0.2" - extsprintf: "npm:^1.2.0" - checksum: 10/2b24eb830ecee7be69ab84192946074d7e8a85a42b0784d9874a28f52616065953ab4297975c87045879505fe9a6ac38dedad29a7470bbe0324540e5b6e92f62 + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 languageName: node linkType: hard -"visit-values@npm:^2.0.0": - version: 2.0.0 - resolution: "visit-values@npm:2.0.0" - checksum: 10/9422c453864c363a93421f94342ce7c53fbd3e52b7dcd1f4df63c45e2ac1a71332047f1153fbdad2d9544867fa835f4029e2dca9415ee58437513fdb64895618 +"strip-ansi@npm:^3.0.1": + version: 3.0.1 + resolution: "strip-ansi@npm:3.0.1" + dependencies: + ansi-regex: "npm:^2.0.0" + checksum: 10/9b974de611ce5075c70629c00fa98c46144043db92ae17748fb780f706f7a789e9989fd10597b7c2053ae8d1513fd707816a91f1879b2f71e6ac0b6a863db465 languageName: node linkType: hard -"vite@npm:>4.5.1": - version: 5.3.3 - resolution: "vite@npm:5.3.3" +"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" dependencies: - esbuild: "npm:^0.21.3" - fsevents: "npm:~2.3.3" - postcss: "npm:^8.4.39" - rollup: "npm:^4.13.0" - peerDependencies: - "@types/node": ^18.0.0 || >=20.0.0 - less: "*" - lightningcss: ^1.21.0 - sass: "*" - stylus: "*" - sugarss: "*" - terser: ^5.4.0 - dependenciesMeta: - fsevents: - optional: true - peerDependenciesMeta: - "@types/node": - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - bin: - vite: bin/vite.js - checksum: 10/e7a094cefedad9e204b715588502118e07d1b9c00c617f55b810169181907f55144f0a82f650995d6a74f12e3695fca65afc348b475b91a81dcbd0274d30a088 + ansi-regex: "npm:^6.0.1" + checksum: 10/475f53e9c44375d6e72807284024ac5d668ee1d06010740dec0b9744f2ddf47de8d7151f80e5f6190fc8f384e802fdf9504b76a7e9020c9faee7103623338be2 languageName: node linkType: hard -"vm-browserify@npm:^1.1.2": - version: 1.1.2 - resolution: "vm-browserify@npm:1.1.2" - checksum: 10/ad5b17c9f7a9d9f1ed0e24c897782ab7a587c1fd40f370152482e1af154c7cf0b0bacc45c5ae76a44289881e083ae4ae127808fdff864aa9b562192aae8b5c3b +"strip-bom@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-bom@npm:3.0.0" + checksum: 10/8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b languageName: node linkType: hard -"vscode-languageserver-textdocument@npm:^1.0.11": - version: 1.0.11 - resolution: "vscode-languageserver-textdocument@npm:1.0.11" - checksum: 10/6096d2a85570e819e01ff406de7c88c48211e6874c6fc71df92193aa8b5aadf40591e44f033d634a95d04975d7aad29049d3eccab617ca41c189ae325aadb913 +"strip-bom@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-bom@npm:4.0.0" + checksum: 10/9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 languageName: node linkType: hard -"vscode-uri@npm:^3.0.8": - version: 3.0.8 - resolution: "vscode-uri@npm:3.0.8" - checksum: 10/e882d6b679e0d053cbc042893c0951a135d899a192b62cd07f0a8924f11ae722067a8d6b1b5b147034becf57faf9fff9fb543b17b749fd0f17db1f54f783f07c +"strip-final-newline@npm:^2.0.0": + version: 2.0.0 + resolution: "strip-final-newline@npm:2.0.0" + checksum: 10/69412b5e25731e1938184b5d489c32e340605bb611d6140344abc3421b7f3c6f9984b21dff296dfcf056681b82caa3bb4cc996a965ce37bcfad663e92eae9c64 languageName: node linkType: hard -"vuvuzela@npm:1.0.3": - version: 1.0.3 - resolution: "vuvuzela@npm:1.0.3" - checksum: 10/9bad4fb766dfdd46bf358cb40f0dceee5fa81a323960fff06f093c01c719629debc8406a1dd7ab42ae4611fe8e679f354fb0a04e98796830de69bb7a5aff1f99 +"strip-final-newline@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-final-newline@npm:3.0.0" + checksum: 10/23ee263adfa2070cd0f23d1ac14e2ed2f000c9b44229aec9c799f1367ec001478469560abefd00c5c99ee6f0b31c137d53ec6029c53e9f32a93804e18c201050 languageName: node linkType: hard -"w3c-hr-time@npm:^1.0.2": - version: 1.0.2 - resolution: "w3c-hr-time@npm:1.0.2" +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" dependencies: - browser-process-hrtime: "npm:^1.0.0" - checksum: 10/03851d90c236837c24c2983f5a8806a837c6515b21d52e5f29776b07cc08695779303d481454d768308489f00dd9d3232d595acaa5b2686d199465a4d9f7b283 + min-indent: "npm:^1.0.0" + checksum: 10/18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 languageName: node linkType: hard -"w3c-xmlserializer@npm:^2.0.0": - version: 2.0.0 - resolution: "w3c-xmlserializer@npm:2.0.0" +"strip-indent@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-indent@npm:4.0.0" dependencies: - xml-name-validator: "npm:^3.0.0" - checksum: 10/400c18b75ce6af269168f964e7d1eb196a7422e134032906540c69d83b802f38dc64e18fc259c02966a334687483f416398d2ad7ebe9d19ab434a7a0247c71c3 - languageName: node - linkType: hard - -"walk-up-path@npm:^3.0.1": - version: 3.0.1 - resolution: "walk-up-path@npm:3.0.1" - checksum: 10/9ffca02fe30fb65f6db531260582988c5e766f4c739cf86a6109380a7f791236b5d0b92b1dce37a6f73e22dca6bc9d93bf3700413e16251b2bd6bbd1ca2be316 + min-indent: "npm:^1.0.1" + checksum: 10/06cbcd93da721c46bc13caeb1c00af93a9b18146a1c95927672d2decab6a25ad83662772417cea9317a2507fb143253ecc23c4415b64f5828cef9b638a744598 languageName: node linkType: hard -"walkdir@npm:^0.4.1": - version: 0.4.1 - resolution: "walkdir@npm:0.4.1" - checksum: 10/54cbe7afc5fb811a55748b0bfa077a9a4aa43f568eb5857db9785af9728e1ad8b1ecf6b9ce6f14b405c6124939a92522e36aaa0397f3f52a9a7a08496f2eebe1 +"strip-json-comments@npm:^3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 languageName: node linkType: hard -"walker@npm:^1.0.7, walker@npm:^1.0.8": - version: 1.0.8 - resolution: "walker@npm:1.0.8" - dependencies: - makeerror: "npm:1.0.12" - checksum: 10/ad7a257ea1e662e57ef2e018f97b3c02a7240ad5093c392186ce0bcf1f1a60bbadd520d073b9beb921ed99f64f065efb63dfc8eec689a80e569f93c1c5d5e16c +"strip-json-comments@npm:~2.0.1": + version: 2.0.1 + resolution: "strip-json-comments@npm:2.0.1" + checksum: 10/1074ccb63270d32ca28edfb0a281c96b94dc679077828135141f27d52a5a398ef5e78bcf22809d23cadc2b81dfbe345eb5fd8699b385c8b1128907dec4a7d1e1 languageName: node linkType: hard -"watchpack@npm:2.4.0, watchpack@npm:^2.4.0": - version: 2.4.0 - resolution: "watchpack@npm:2.4.0" +"strong-log-transformer@npm:^2.1.0": + version: 2.1.0 + resolution: "strong-log-transformer@npm:2.1.0" dependencies: - glob-to-regexp: "npm:^0.4.1" - graceful-fs: "npm:^4.1.2" - checksum: 10/4280b45bc4b5d45d5579113f2a4af93b67ae1b9607cc3d86ae41cdd53ead10db5d9dc3237f24256d05ef88b28c69a02712f78e434cb7ecc8edaca134a56e8cab + duplexer: "npm:^0.1.1" + minimist: "npm:^1.2.0" + through: "npm:^2.3.4" + bin: + sl-log-transformer: bin/sl-log-transformer.js + checksum: 10/2fd14eb0a68893fdadefd89f964df404e3d637729c48aca015eb12d1c47455dee28b2522ad7150de23f7a57cce503656585e7644c9cd8532023ea572f8cc5a80 languageName: node linkType: hard -"watchpack@npm:^2.4.1": - version: 2.4.2 - resolution: "watchpack@npm:2.4.2" +"stylus-lookup@npm:^5.0.1": + version: 5.0.1 + resolution: "stylus-lookup@npm:5.0.1" dependencies: - glob-to-regexp: "npm:^0.4.1" - graceful-fs: "npm:^4.1.2" - checksum: 10/6bd4c051d9af189a6c781c3158dcb3069f432a0c144159eeb0a44117412105c61b2b683a5c9eebc4324625e0e9b76536387d0ba354594fa6cbbdf1ef60bee4c3 + commander: "npm:^10.0.1" + bin: + stylus-lookup: bin/cli.js + checksum: 10/c89ae3e35f578b8a324f96aacabe1ab582741de6d527cf94b64cbcb23702e753f96d43fc519b7e9818a7cb712780fe4aae63c188d1774a3d73b5f5bc173ffc48 languageName: node linkType: hard -"wbuf@npm:^1.1.0, wbuf@npm:^1.7.3": - version: 1.7.3 - resolution: "wbuf@npm:1.7.3" +"supports-color@npm:8.1.1, supports-color@npm:^8.0.0, supports-color@npm:^8.1.0": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" dependencies: - minimalistic-assert: "npm:^1.0.0" - checksum: 10/c18b51c4e1fb19705c94b93c0cf093ba014606abceee949399d56074ef1863bf4897a8d884be24e8d224d18c9ce411cf6924006d0a5430492729af51256e067a + has-flag: "npm:^4.0.0" + checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 languageName: node linkType: hard -"wcwidth@npm:>=1.0.1, wcwidth@npm:^1.0.0, wcwidth@npm:^1.0.1": - version: 1.0.1 - resolution: "wcwidth@npm:1.0.1" +"supports-color@npm:^5.3.0, supports-color@npm:^5.5.0": + version: 5.5.0 + resolution: "supports-color@npm:5.5.0" dependencies: - defaults: "npm:^1.0.3" - checksum: 10/182ebac8ca0b96845fae6ef44afd4619df6987fe5cf552fdee8396d3daa1fb9b8ec5c6c69855acb7b3c1231571393bd1f0a4cdc4028d421575348f64bb0a8817 + has-flag: "npm:^3.0.0" + checksum: 10/5f505c6fa3c6e05873b43af096ddeb22159831597649881aeb8572d6fe3b81e798cc10840d0c9735e0026b250368851b7f77b65e84f4e4daa820a4f69947f55b languageName: node linkType: hard -"web-did-resolver@npm:^2.0.21": - version: 2.0.27 - resolution: "web-did-resolver@npm:2.0.27" +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" dependencies: - cross-fetch: "npm:^4.0.0" - did-resolver: "npm:^4.0.0" - checksum: 10/d079f9f718e7dcf5cf224634ae046485a5d190a39e08e22e8aa42fc67a46ffa510c4999335c7a0da48e5bd8073fd5587457468b80fd0776b26f693f2fe767b01 + has-flag: "npm:^4.0.0" + checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a languageName: node linkType: hard -"web-streams-polyfill@npm:^3.0.3": - version: 3.2.1 - resolution: "web-streams-polyfill@npm:3.2.1" - checksum: 10/08fcf97b7883c1511dd3da794f50e9bde75a660884783baaddb2163643c21a94086f394dc4bd20dff0f55c98d98d60c4bea05a5809ef5005bdf835b63ada8900 +"supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 10/a9dc19ae2220c952bd2231d08ddeecb1b0328b61e72071ff4000c8384e145cc07c1c0bdb3b5a1cb06e186a7b2790f1dee793418b332f6ddf320de25d9125be7e languageName: node linkType: hard -"web-vitals@npm:^2.1.4": - version: 2.1.4 - resolution: "web-vitals@npm:2.1.4" - checksum: 10/8d6fae84d0e4f2ea1d6da40067d8e6fd560df2a06a9f9484dbbd7a25eb5c961b97f66f2043c941866753465e0f00748773f33d3c88d8fd191e901a7207711ff1 +"synckit@npm:^0.8.6": + version: 0.8.8 + resolution: "synckit@npm:0.8.8" + dependencies: + "@pkgr/core": "npm:^0.1.0" + tslib: "npm:^2.6.2" + checksum: 10/2864a5c3e689ad5b991bebbd8a583c5682c4fa08a4f39986b510b6b5d160c08fc3672444069f8f96ed6a9d12772879c674c1f61e728573eadfa90af40a765b74 languageName: node linkType: hard -"web3-bzz@npm:1.10.0": - version: 1.10.0 - resolution: "web3-bzz@npm:1.10.0" +"tablemark@npm:^3.0.0": + version: 3.0.0 + resolution: "tablemark@npm:3.0.0" dependencies: - "@types/node": "npm:^12.12.6" - got: "npm:12.1.0" - swarm-js: "npm:^0.1.40" - checksum: 10/3cfc6eedc5ba963d6580833e242a2dd6adf6076502cef31f02e3e5a0bb85243b6e1bcf63bb4d194f315ffca5bcf432441c9f2915aa1fea03224c860966b8c628 + sentence-case: "npm:^3.0.4" + split-text-to-chunks: "npm:^1.0.0" + checksum: 10/1e819d7e1ad268743543778b5a1aec559113bf91098e220997fddccd207fd779d8ab216ff86d2180bb780841a23ef3f84f59bbc493d41cd5badff1246a04a8de languageName: node linkType: hard -"web3-bzz@npm:1.10.1": - version: 1.10.1 - resolution: "web3-bzz@npm:1.10.1" +"tap-mocha-reporter@npm:^5.0.3": + version: 5.0.3 + resolution: "tap-mocha-reporter@npm:5.0.3" dependencies: - "@types/node": "npm:^12.12.6" - got: "npm:12.1.0" - swarm-js: "npm:^0.1.40" - checksum: 10/6907516c04aa8f2bb3907c2da6931a7b2ea897dcc1621839e8868d4db862375e77979c066f3a3aec8067e1a784b156b4c0a1d1c882f9859b43e4c81039035b6b + color-support: "npm:^1.1.0" + debug: "npm:^4.1.1" + diff: "npm:^4.0.1" + escape-string-regexp: "npm:^2.0.0" + glob: "npm:^7.0.5" + tap-parser: "npm:^11.0.0" + tap-yaml: "npm:^1.0.0" + unicode-length: "npm:^2.0.2" + bin: + tap-mocha-reporter: index.js + checksum: 10/3635e40e1ebd36ab6893f72d7914107bfc372b6da5a2827051e7762df8941ca33a6995416c5d9dca829d14153dca98424c2272de932af9ca5e813d402c863643 languageName: node linkType: hard -"web3-bzz@npm:1.6.1": - version: 1.6.1 - resolution: "web3-bzz@npm:1.6.1" +"tap-parser@npm:^11.0.0, tap-parser@npm:^11.0.2": + version: 11.0.2 + resolution: "tap-parser@npm:11.0.2" dependencies: - "@types/node": "npm:^12.12.6" - got: "npm:9.6.0" - swarm-js: "npm:^0.1.40" - checksum: 10/f1c6c09fed7e2df71ea7aa788223dc3dbda5ea9fec70ba11f9e08a3ba530064393b4b8910001894d55bacdaba579d33ce4d721b503d44e38f23ec8012383bb7f + events-to-array: "npm:^1.0.1" + minipass: "npm:^3.1.6" + tap-yaml: "npm:^1.0.0" + bin: + tap-parser: bin/cmd.js + checksum: 10/30a5e7c9075ddbaf4d02bb66f5d3aff97fb334a9b4b956a52932610475aef7587b63cb4321ffc986b6df984bb7ba707a6b9d6df1f76c20b1e7c859e72551d191 languageName: node linkType: hard -"web3-bzz@npm:1.7.3": - version: 1.7.3 - resolution: "web3-bzz@npm:1.7.3" +"tap-yaml@npm:^1.0.0": + version: 1.0.0 + resolution: "tap-yaml@npm:1.0.0" dependencies: - "@types/node": "npm:^12.12.6" - got: "npm:9.6.0" - swarm-js: "npm:^0.1.40" - checksum: 10/5922107da7589747133ae1290cb68090300d24b7b7cd717dd4e3d93b22b19875f38542bc718b5601702efbd5cdcadfb8f2610b660f8b44e92ad9c7db5d4d24c8 + yaml: "npm:^1.5.0" + checksum: 10/052263ae0d957b049ac4c1acfe44b48ad988dbae7c3e84ae7095329edeb4437cadf8fc53c5b7c44b28881866edc76858e8f2100443bf8af2583c480d2310e533 languageName: node linkType: hard -"web3-bzz@npm:1.8.1": - version: 1.8.1 - resolution: "web3-bzz@npm:1.8.1" +"tap-yaml@npm:^1.0.2": + version: 1.0.2 + resolution: "tap-yaml@npm:1.0.2" dependencies: - "@types/node": "npm:^12.12.6" - got: "npm:12.1.0" - swarm-js: "npm:^0.1.40" - checksum: 10/8c88e606de3b76401b884f206bf0b0d6846c29dac42a5402e275412c567d9bd36eb5cf531ade24cb50c69a44bd676c7b983a8396a6f14a06637f6e90cc070a70 + yaml: "npm:^1.10.2" + checksum: 10/9f0525377150487a0fe1a13dbd3f89de31bb14934eecb5fd3b1099fd384a5989eb73577fc27a58b02d0622d4ac453b878eed244b88194ba344efc495ae262bb3 languageName: node linkType: hard -"web3-core-helpers@npm:1.10.0": - version: 1.10.0 - resolution: "web3-core-helpers@npm:1.10.0" +"tap@npm:16.3.8": + version: 16.3.8 + resolution: "tap@npm:16.3.8" dependencies: - web3-eth-iban: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/0af64b9467df7b7d738c28d97ddcdc9d0800838daea25c1197efec5b4e2c50d010b95c1c55ed210e4c5c9a056bb2c1621825623a8d9332ebc93f77c908a0dc80 + "@isaacs/import-jsx": "npm:^4.0.1" + "@types/react": "npm:^17.0.52" + chokidar: "npm:^3.3.0" + findit: "npm:^2.0.0" + foreground-child: "npm:^2.0.0" + fs-exists-cached: "npm:^1.0.0" + glob: "npm:^7.2.3" + ink: "npm:^3.2.0" + isexe: "npm:^2.0.0" + istanbul-lib-processinfo: "npm:^2.0.3" + jackspeak: "npm:^1.4.2" + libtap: "npm:^1.4.0" + minipass: "npm:^3.3.4" + mkdirp: "npm:^1.0.4" + nyc: "npm:^15.1.0" + opener: "npm:^1.5.1" + react: "npm:^17.0.2" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.6" + source-map-support: "npm:^0.5.16" + tap-mocha-reporter: "npm:^5.0.3" + tap-parser: "npm:^11.0.2" + tap-yaml: "npm:^1.0.2" + tcompare: "npm:^5.0.7" + treport: "npm:^3.0.4" + which: "npm:^2.0.2" + peerDependencies: + coveralls: ^3.1.1 + flow-remove-types: ">=2.112.0" + ts-node: ">=8.5.2" + typescript: ">=3.7.2" + peerDependenciesMeta: + coveralls: + optional: true + flow-remove-types: + optional: true + ts-node: + optional: true + typescript: + optional: true + bin: + tap: bin/run.js + checksum: 10/5a33920fdf09481b1530e1e44cf512c37157d18199de8ed0ea45c8daa5d0a7bac05240ba4d4f8beaf3d48239334d405778c4afea377568ddd8c2fa2f4c66104c languageName: node linkType: hard -"web3-core-helpers@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core-helpers@npm:1.10.1" - dependencies: - web3-eth-iban: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/b0ca784b08861b3add442dbf7c7d2326180973b962d8d781f5ca6393099b694dfb29bdd07ae50134620c1588f6d734b8b8ee6e345fc8b494340505d352f8098c +"tapable@npm:^2.1.1, tapable@npm:^2.2.0": + version: 2.2.1 + resolution: "tapable@npm:2.2.1" + checksum: 10/1769336dd21481ae6347611ca5fca47add0962fd8e80466515032125eca0084a4f0ede11e65341b9c0018ef4e1cf1ad820adbb0fba7cc99865c6005734000b0a languageName: node linkType: hard -"web3-core-helpers@npm:1.6.1": - version: 1.6.1 - resolution: "web3-core-helpers@npm:1.6.1" +"tape-promise@npm:4.0.0": + version: 4.0.0 + resolution: "tape-promise@npm:4.0.0" dependencies: - web3-eth-iban: "npm:1.6.1" - web3-utils: "npm:1.6.1" - checksum: 10/fd2be1e75dc0dbf5e84c55760294b6a7d21216d6958b6032f8544795ea2bae962fa71c20dfe755eb43827707829c9e3202489e54ffd200f4e8c873ab9f772817 + is-promise: "npm:^2.1.0" + onetime: "npm:^2.0.0" + checksum: 10/0fb8b0f679e7625e61d39e6817882edf4ff6cceabdd73cca4348f5c7043bb02a5bb5da45df78ebffedd2be3af68801308d2549556d2aefe9934cceb773fbf9ef languageName: node linkType: hard -"web3-core-helpers@npm:1.7.3": - version: 1.7.3 - resolution: "web3-core-helpers@npm:1.7.3" +"tape@npm:5.6.6": + version: 5.6.6 + resolution: "tape@npm:5.6.6" dependencies: - web3-eth-iban: "npm:1.7.3" - web3-utils: "npm:1.7.3" - checksum: 10/fd5034ab6448019cc6350b01b43eb61bac280899c42daa3d2cb9934e1a060ff8b9b3a517b9d67c26b5718977103d388c77b6d501d32cb4f90f0c16b44413a009 + "@ljharb/resumer": "npm:^0.0.1" + "@ljharb/through": "npm:^2.3.9" + array.prototype.every: "npm:^1.1.4" + call-bind: "npm:^1.0.2" + deep-equal: "npm:^2.2.2" + defined: "npm:^1.0.1" + dotignore: "npm:^0.1.2" + for-each: "npm:^0.3.3" + get-package-type: "npm:^0.1.0" + glob: "npm:^7.2.3" + has: "npm:^1.0.3" + has-dynamic-import: "npm:^2.0.1" + inherits: "npm:^2.0.4" + is-regex: "npm:^1.1.4" + minimist: "npm:^1.2.8" + object-inspect: "npm:^1.12.3" + object-is: "npm:^1.1.5" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.4" + resolve: "npm:^2.0.0-next.4" + string.prototype.trim: "npm:^1.2.7" + bin: + tape: bin/tape + checksum: 10/d12f26c4cac68f1e8a97688d6b47e2d7773d0811049cc2ce254545fd585c8dfccb61e7f715b0b1a6567dce86628f97fba5adf53d83bb6b41c10cd1cfa1f6092c languageName: node linkType: hard -"web3-core-helpers@npm:1.8.1": - version: 1.8.1 - resolution: "web3-core-helpers@npm:1.8.1" +"tar@npm:^6.1.11, tar@npm:^6.1.2": + version: 6.1.11 + resolution: "tar@npm:6.1.11" dependencies: - web3-eth-iban: "npm:1.8.1" - web3-utils: "npm:1.8.1" - checksum: 10/e33745ea4844ec37da19a86a1d685bcc5cb951d4c2ab0d154d75e36f187a8369658b392cc4eb0c31fb9d59d7bc40533e1598a1f71e46dec8e77f5dde39d2b8bc + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^3.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: 10/0e6789e66475922b8e0d1ee648cb26e0ede9a0635284269ca71b2d8acd507bc59ad5557032f0192f8ff22680b50cb66792b56f0240f484fe0d7d8cef81c1b959 languageName: node linkType: hard -"web3-core-method@npm:1.10.0": - version: 1.10.0 - resolution: "web3-core-method@npm:1.10.0" +"tar@npm:^6.2.1": + version: 6.2.1 + resolution: "tar@npm:6.2.1" dependencies: - "@ethersproject/transactions": "npm:^5.6.2" - web3-core-helpers: "npm:1.10.0" - web3-core-promievent: "npm:1.10.0" - web3-core-subscriptions: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/a5d9783bd73e0f3e05ec3b7013bcf103303af9f211bed471f791db418b21f12028a5f07509be3d8dabe30f32789dd8529c743363bc4cc90eb16e7a6b8df5c80e + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^5.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: 10/bfbfbb2861888077fc1130b84029cdc2721efb93d1d1fb80f22a7ac3a98ec6f8972f29e564103bbebf5e97be67ebc356d37fa48dbc4960600a1eb7230fbd1ea0 languageName: node linkType: hard -"web3-core-method@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core-method@npm:1.10.1" +"tcompare@npm:^5.0.6, tcompare@npm:^5.0.7": + version: 5.0.7 + resolution: "tcompare@npm:5.0.7" dependencies: - "@ethersproject/transactions": "npm:^5.6.2" - web3-core-helpers: "npm:1.10.1" - web3-core-promievent: "npm:1.10.1" - web3-core-subscriptions: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/fe011256c0a034769dea7cb150cf4a7ee6cab82b03cf6dd001745e362a3c5da892dc1d82c4858ad0d39036b139d9edb1b296b565ba96baacedb7a44fde974812 + diff: "npm:^4.0.2" + checksum: 10/4fa1257216dddd2e950f9b674c663f9a73e070a4bab733ee160d4e2605be140179e751cb17bb97e05e1e79f9811aab2de9a0ec317f4ba8eea6ffd34ef04e3bec languageName: node linkType: hard -"web3-core-method@npm:1.6.1": - version: 1.6.1 - resolution: "web3-core-method@npm:1.6.1" - dependencies: - "@ethersproject/transactions": "npm:^5.0.0-beta.135" - web3-core-helpers: "npm:1.6.1" - web3-core-promievent: "npm:1.6.1" - web3-core-subscriptions: "npm:1.6.1" - web3-utils: "npm:1.6.1" - checksum: 10/b773adec9e35b845af60dc1a0a86eee9011db3805b50dac615d48de40b22449c9ef93848fc16bc05f65e3723597dc3ae3f9007dad024ff4b7400171fc8acacb6 +"temp-dir@npm:^3.0.0": + version: 3.0.0 + resolution: "temp-dir@npm:3.0.0" + checksum: 10/577211e995d1d584dd60f1469351d45e8a5b4524e4a9e42d3bdd12cfde1d0bb8f5898311bef24e02aaafb69514c1feb58c7b4c33dcec7129da3b0861a4ca935b languageName: node linkType: hard -"web3-core-method@npm:1.7.3": - version: 1.7.3 - resolution: "web3-core-method@npm:1.7.3" +"terser-webpack-plugin@npm:^5.3.10": + version: 5.3.10 + resolution: "terser-webpack-plugin@npm:5.3.10" dependencies: - "@ethersproject/transactions": "npm:^5.0.0-beta.135" - web3-core-helpers: "npm:1.7.3" - web3-core-promievent: "npm:1.7.3" - web3-core-subscriptions: "npm:1.7.3" - web3-utils: "npm:1.7.3" - checksum: 10/d0de556514829256c77e493e5994bf7b226d8eec10b55a4ef42a296ac9b3c1aad6d20ae3d1410a8cbd4d829fbf4f3369b51007ca083d3b17a1179aea93be9ecb + "@jridgewell/trace-mapping": "npm:^0.3.20" + jest-worker: "npm:^27.4.5" + schema-utils: "npm:^3.1.1" + serialize-javascript: "npm:^6.0.1" + terser: "npm:^5.26.0" + peerDependencies: + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + checksum: 10/fb1c2436ae1b4e983be043fa0a3d355c047b16b68f102437d08c736d7960c001e7420e2f722b9d99ce0dc70ca26a68cc63c0b82bc45f5b48671142b352a9d938 languageName: node linkType: hard -"web3-core-method@npm:1.8.1": - version: 1.8.1 - resolution: "web3-core-method@npm:1.8.1" +"terser@npm:^5.26.0": + version: 5.31.2 + resolution: "terser@npm:5.31.2" dependencies: - "@ethersproject/transactions": "npm:^5.6.2" - web3-core-helpers: "npm:1.8.1" - web3-core-promievent: "npm:1.8.1" - web3-core-subscriptions: "npm:1.8.1" - web3-utils: "npm:1.8.1" - checksum: 10/71e0acad80b96ac35349ac70d0bb164222722eae8c1cb7910ba35d147026c9873864975dbf3124b09e51ea61f78f6b16d2064edc5c820f18b06de9dbe2718ff7 + "@jridgewell/source-map": "npm:^0.3.3" + acorn: "npm:^8.8.2" + commander: "npm:^2.20.0" + source-map-support: "npm:~0.5.20" + bin: + terser: bin/terser + checksum: 10/dab8d0a7e2845f14535433795aa8dcf1b80a33e75749f5dbd67ee97aa66c1dec37191afa46dd88dad8472c9ff0bf16a812dd4388cb30d8675a6a95a7ead0421b languageName: node linkType: hard -"web3-core-promievent@npm:1.10.0": - version: 1.10.0 - resolution: "web3-core-promievent@npm:1.10.0" +"test-exclude@npm:^6.0.0": + version: 6.0.0 + resolution: "test-exclude@npm:6.0.0" dependencies: - eventemitter3: "npm:4.0.4" - checksum: 10/68e9f40f78d92ce1ee9808d04a28a89d20ab4dc36af5ba8405f132044cbb01825f76f35249a9599f9568a95d5e7c9e4a09ada6d4dc2e27e0c1b32c9232c8c973 + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^7.1.4" + minimatch: "npm:^3.0.4" + checksum: 10/8fccb2cb6c8fcb6bb4115394feb833f8b6cf4b9503ec2485c2c90febf435cac62abe882a0c5c51a37b9bbe70640cdd05acf5f45e486ac4583389f4b0855f69e5 languageName: node linkType: hard -"web3-core-promievent@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core-promievent@npm:1.10.1" - dependencies: - eventemitter3: "npm:4.0.4" - checksum: 10/cd9bc5c067782f374ad4aa69536f382c0c0528a545f9ea8763e605de297cb78bdbc0ea708601d099f8d6ceaae11529062357309a6e037db3673601d7f9a63e88 +"text-extensions@npm:^1.0.0": + version: 1.9.0 + resolution: "text-extensions@npm:1.9.0" + checksum: 10/56a9962c1b62d39b2bcb369b7558ca85c1b55e554b38dfd725edcc0a1babe5815782a60c17ff6b839093b163dfebb92b804208aaaea616ec7571c8059ae0cf44 languageName: node linkType: hard -"web3-core-promievent@npm:1.6.1": - version: 1.6.1 - resolution: "web3-core-promievent@npm:1.6.1" - dependencies: - eventemitter3: "npm:4.0.4" - checksum: 10/f90e87b8e43ed83df76db3c1195865fb3220193dc1d4ae320b0c30c81539a4a4749e9a4db26fe4837401f352d45359eb917e6e0fec62dcaf320552c74c7f2242 +"text-extensions@npm:^2.0.0": + version: 2.4.0 + resolution: "text-extensions@npm:2.4.0" + checksum: 10/9bdbc9959e004ccc86a6ec076d6c5bb6765978263e9d0d5febb640d7675c09919ea912f3fe9d50b68c3c7c43cc865610a7cb24954343abb31f74c205fbae4e45 languageName: node linkType: hard -"web3-core-promievent@npm:1.7.3": - version: 1.7.3 - resolution: "web3-core-promievent@npm:1.7.3" - dependencies: - eventemitter3: "npm:4.0.4" - checksum: 10/a4784709f7c581bc3d74d996c80d764e95f73ebb30a7383f1af16bfc4c67e3c9fc0524962e48241fa180bce13d489b41f87a88f717e1009299ed0562612a0ad7 +"text-table@npm:^0.2.0": + version: 0.2.0 + resolution: "text-table@npm:0.2.0" + checksum: 10/4383b5baaeffa9bb4cda2ac33a4aa2e6d1f8aaf811848bf73513a9b88fd76372dc461f6fd6d2e9cb5100f48b473be32c6f95bd983509b7d92bb4d92c10747452 languageName: node linkType: hard -"web3-core-promievent@npm:1.8.1": - version: 1.8.1 - resolution: "web3-core-promievent@npm:1.8.1" +"through2@npm:^4.0.0, through2@npm:^4.0.2": + version: 4.0.2 + resolution: "through2@npm:4.0.2" dependencies: - eventemitter3: "npm:4.0.4" - checksum: 10/4de5044decd901cd88836465023815f18d56c5ac69af201eb5dc668ed6b28a489df62d1fa5833e3320a1b6426f90e6e8e466c0b6dcd3af05a928d13053bc12e7 + readable-stream: "npm:3" + checksum: 10/72c246233d9a989bbebeb6b698ef0b7b9064cb1c47930f79b25d87b6c867e075432811f69b7b2ac8da00ca308191c507bdab913944be8019ac43b036ce88f6ba languageName: node linkType: hard -"web3-core-requestmanager@npm:1.10.0": - version: 1.10.0 - resolution: "web3-core-requestmanager@npm:1.10.0" - dependencies: - util: "npm:^0.12.5" - web3-core-helpers: "npm:1.10.0" - web3-providers-http: "npm:1.10.0" - web3-providers-ipc: "npm:1.10.0" - web3-providers-ws: "npm:1.10.0" - checksum: 10/6be2ef8996987d8781d8b2f4d6dca3312acb3359de67d864733392b8220965466a220a8170dad8d87025d708822f7713bfb0c775f27c889c4f8e3a1974b5076b +"through@npm:>=2.2.7 <3, through@npm:^2.3.4, through@npm:^2.3.6, through@npm:^2.3.8": + version: 2.3.8 + resolution: "through@npm:2.3.8" + checksum: 10/5da78346f70139a7d213b65a0106f3c398d6bc5301f9248b5275f420abc2c4b1e77c2abc72d218dedc28c41efb2e7c312cb76a7730d04f9c2d37d247da3f4198 languageName: node linkType: hard -"web3-core-requestmanager@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core-requestmanager@npm:1.10.1" +"timers-browserify@npm:^2.0.12": + version: 2.0.12 + resolution: "timers-browserify@npm:2.0.12" dependencies: - util: "npm:^0.12.5" - web3-core-helpers: "npm:1.10.1" - web3-providers-http: "npm:1.10.1" - web3-providers-ipc: "npm:1.10.1" - web3-providers-ws: "npm:1.10.1" - checksum: 10/03b5399fcb7660fb45012d032a749e41fddd4f00674d4bdb4ac7fc3f08836637c7e1d0660d3a0e127aa0368d63a034ee2b22645cf3730c0f56e62b71a7ea2cf3 + setimmediate: "npm:^1.0.4" + checksum: 10/ec37ae299066bef6c464dcac29c7adafba1999e7227a9bdc4e105a459bee0f0b27234a46bfd7ab4041da79619e06a58433472867a913d01c26f8a203f87cee70 languageName: node linkType: hard -"web3-core-requestmanager@npm:1.6.1": - version: 1.6.1 - resolution: "web3-core-requestmanager@npm:1.6.1" +"tmp@npm:^0.0.33": + version: 0.0.33 + resolution: "tmp@npm:0.0.33" dependencies: - util: "npm:^0.12.0" - web3-core-helpers: "npm:1.6.1" - web3-providers-http: "npm:1.6.1" - web3-providers-ipc: "npm:1.6.1" - web3-providers-ws: "npm:1.6.1" - checksum: 10/e883c5f22522f4b36931aec3faf46b9cfe0b4d8a695e715368695c8321520adc461a8e0173862d4f1e39d8bd2240c5cbe23d6b1dda774b56a53831048db12d62 + os-tmpdir: "npm:~1.0.2" + checksum: 10/09c0abfd165cff29b32be42bc35e80b8c64727d97dedde6550022e88fa9fd39a084660415ed8e3ebaa2aca1ee142f86df8b31d4196d4f81c774a3a20fd4b6abf languageName: node linkType: hard -"web3-core-requestmanager@npm:1.7.3": - version: 1.7.3 - resolution: "web3-core-requestmanager@npm:1.7.3" - dependencies: - util: "npm:^0.12.0" - web3-core-helpers: "npm:1.7.3" - web3-providers-http: "npm:1.7.3" - web3-providers-ipc: "npm:1.7.3" - web3-providers-ws: "npm:1.7.3" - checksum: 10/9f117087c0627f80d169442b3ab75b0b102b74e07d087c4e8dc9a83eecc6d6bc8e280844f7dba460076053b2266f3eb3ff04ec0f029660365751da8eda6d649b +"tmpl@npm:1.0.5": + version: 1.0.5 + resolution: "tmpl@npm:1.0.5" + checksum: 10/cd922d9b853c00fe414c5a774817be65b058d54a2d01ebb415840960406c669a0fc632f66df885e24cb022ec812739199ccbdb8d1164c3e513f85bfca5ab2873 languageName: node linkType: hard -"web3-core-requestmanager@npm:1.8.1": - version: 1.8.1 - resolution: "web3-core-requestmanager@npm:1.8.1" - dependencies: - util: "npm:^0.12.0" - web3-core-helpers: "npm:1.8.1" - web3-providers-http: "npm:1.8.1" - web3-providers-ipc: "npm:1.8.1" - web3-providers-ws: "npm:1.8.1" - checksum: 10/95fc4799fe1f5b27830a57c211e4f729504e7e72bede95d1bf58bc4eb553f9c7dc1dfc2e2ac39b289f47c4ab61fccb74ee47a7efb1acfd482bcabdff9fc3682d +"to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: 10/be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 languageName: node linkType: hard -"web3-core-subscriptions@npm:1.10.0": - version: 1.10.0 - resolution: "web3-core-subscriptions@npm:1.10.0" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.10.0" - checksum: 10/009b85acfa19154bc73f48a55ac80c527cd2815556ab70f8fffc86e007e82b8b702e8ad6512c99fa209e69a7e76fcda5fd326132a553cea3991e1f09225b25a0 +"to-readable-stream@npm:^1.0.0": + version: 1.0.0 + resolution: "to-readable-stream@npm:1.0.0" + checksum: 10/a99e23d49777d9d03686f03cc0bbbcb4648d991648990a98bc93b55cf91a2ae830c41b5efa36802f1c00a34bba93bd33b10346772fd3f49bcf1667a99c85f354 languageName: node linkType: hard -"web3-core-subscriptions@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core-subscriptions@npm:1.10.1" +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.10.1" - checksum: 10/d022a849e46f8365b8843205e92b6d3c28017fa9fd3b74c72553b0d1fef83f88fd674dec5a72d6c7082c20f1f5f82d9c3c8dccbb284a4a1c60cd8ce91e326181 + is-number: "npm:^7.0.0" + checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a languageName: node linkType: hard -"web3-core-subscriptions@npm:1.6.1": - version: 1.6.1 - resolution: "web3-core-subscriptions@npm:1.6.1" +"touch@npm:^3.1.0": + version: 3.1.0 + resolution: "touch@npm:3.1.0" dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.6.1" - checksum: 10/14757b21da318609679ba48d9986739924cb86a94b72f295089184fac12416ea5862d1d0c93d2237f02f4415fdd8c92ce68a9770cac09587d0447c736ca72f1b + nopt: "npm:~1.0.10" + bin: + nodetouch: ./bin/nodetouch.js + checksum: 10/ece1d9693fbc9b73d8a6d902537b787b5685ac1aeab7562857c50e6671415a73c985055393442b518f4ac37b85c3e7a3e6c36af71142fed13b8bb04fb6664936 languageName: node linkType: hard -"web3-core-subscriptions@npm:1.7.3": - version: 1.7.3 - resolution: "web3-core-subscriptions@npm:1.7.3" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.7.3" - checksum: 10/e9261f8ae2cc4b78ebb1b8ecc77c4574497098aa2baf4c50845cc236a0f67c899c76da7452315a477725c3d1f933d6f5ccea413df29f720568358ea8b3ac4f68 +"tr46@npm:~0.0.3": + version: 0.0.3 + resolution: "tr46@npm:0.0.3" + checksum: 10/8f1f5aa6cb232f9e1bdc86f485f916b7aa38caee8a778b378ffec0b70d9307873f253f5cbadbe2955ece2ac5c83d0dc14a77513166ccd0a0c7fe197e21396695 languageName: node linkType: hard -"web3-core-subscriptions@npm:1.8.1": - version: 1.8.1 - resolution: "web3-core-subscriptions@npm:1.8.1" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.8.1" - checksum: 10/b0afc8c2adfce0156bdb2884e16f28721c8fde5861504771943fe7918fc454cf55ed873b7330f43275530d409b3dcf71a2c2265393ad7b85bbcf8a7aa458676e +"tree-kill@npm:^1.2.2": + version: 1.2.2 + resolution: "tree-kill@npm:1.2.2" + bin: + tree-kill: cli.js + checksum: 10/49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7 languageName: node linkType: hard -"web3-core@npm:1.10.0": - version: 1.10.0 - resolution: "web3-core@npm:1.10.0" - dependencies: - "@types/bn.js": "npm:^5.1.1" - "@types/node": "npm:^12.12.6" - bignumber.js: "npm:^9.0.0" - web3-core-helpers: "npm:1.10.0" - web3-core-method: "npm:1.10.0" - web3-core-requestmanager: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/dcef60d5c51a1a6c5f1d8b82c22a1358b6d751d117362792f468cd0918814ede2614d972fb7b10e39bb65b9e9d8ed7a54996cd8f1db84ddf04cf328ce0259d76 +"treeverse@npm:^3.0.0": + version: 3.0.0 + resolution: "treeverse@npm:3.0.0" + checksum: 10/a053ad73f800c64c53ecf0effe7ea12e16eae1cf03f0901ac6b61390b6440d05d0aa8c942b6e77d2e9237d247b36fd405284942419f3817c9c3ef43bc5236218 languageName: node linkType: hard -"web3-core@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core@npm:1.10.1" +"treport@npm:^3.0.4": + version: 3.0.4 + resolution: "treport@npm:3.0.4" dependencies: - "@types/bn.js": "npm:^5.1.1" - "@types/node": "npm:^12.12.6" - bignumber.js: "npm:^9.0.0" - web3-core-helpers: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-core-requestmanager: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/196d77da7f1fdc45bd37220baa8875960cc393c30dd16036b7b798fc10b13257bebccfeb7ee2abee8a252bec39608912421a4c108f84af8905ba1b583b8123b4 + "@isaacs/import-jsx": "npm:^4.0.1" + cardinal: "npm:^2.1.1" + chalk: "npm:^3.0.0" + ink: "npm:^3.2.0" + ms: "npm:^2.1.2" + tap-parser: "npm:^11.0.0" + tap-yaml: "npm:^1.0.0" + unicode-length: "npm:^2.0.2" + peerDependencies: + react: ^17.0.2 + checksum: 10/8112e17088586430351a56f480593040a3c37d5269e96776e35c497d1680fa0fa3d3f060b03d84778e27a682c7b7d109a01c20687048d82201e1e1d7035af3a9 languageName: node linkType: hard -"web3-core@npm:1.6.1": - version: 1.6.1 - resolution: "web3-core@npm:1.6.1" - dependencies: - "@types/bn.js": "npm:^4.11.5" - "@types/node": "npm:^12.12.6" - bignumber.js: "npm:^9.0.0" - web3-core-helpers: "npm:1.6.1" - web3-core-method: "npm:1.6.1" - web3-core-requestmanager: "npm:1.6.1" - web3-utils: "npm:1.6.1" - checksum: 10/f8e9f13c1f15096b2cd52a2651336642b6af01bd1d5349aec9685a16bb59e421450ca0bf4f58536a10d813e79419c40e7fd825dde4c4f9ef72f288d71e46b9d3 +"trim-newlines@npm:^3.0.0": + version: 3.0.1 + resolution: "trim-newlines@npm:3.0.1" + checksum: 10/b530f3fadf78e570cf3c761fb74fef655beff6b0f84b29209bac6c9622db75ad1417f4a7b5d54c96605dcd72734ad44526fef9f396807b90839449eb543c6206 languageName: node linkType: hard -"web3-core@npm:1.7.3": - version: 1.7.3 - resolution: "web3-core@npm:1.7.3" - dependencies: - "@types/bn.js": "npm:^4.11.5" - "@types/node": "npm:^12.12.6" - bignumber.js: "npm:^9.0.0" - web3-core-helpers: "npm:1.7.3" - web3-core-method: "npm:1.7.3" - web3-core-requestmanager: "npm:1.7.3" - web3-utils: "npm:1.7.3" - checksum: 10/d86738827bf9b4c62d24aab3967f7d38902a9893cc120d94ea158c2538f2ee2283b1b0c2be9c7daa5c5bb1018e5b9d09a5178bbabd3f235f4d3d959fca3bb22c +"trim-newlines@npm:^4.0.2": + version: 4.0.2 + resolution: "trim-newlines@npm:4.0.2" + checksum: 10/1eef206eb77361856dff0b827e5811baf64574bb21e81b7ad643fe321c5c19b0a452dd83e9afc31206993fcff9bb90a379925d7b5915f887de1ca7da5b57933a languageName: node linkType: hard -"web3-core@npm:1.8.1": - version: 1.8.1 - resolution: "web3-core@npm:1.8.1" - dependencies: - "@types/bn.js": "npm:^5.1.0" - "@types/node": "npm:^12.12.6" - bignumber.js: "npm:^9.0.0" - web3-core-helpers: "npm:1.8.1" - web3-core-method: "npm:1.8.1" - web3-core-requestmanager: "npm:1.8.1" - web3-utils: "npm:1.8.1" - checksum: 10/199bb1a125bd894148abd0b251ac7581812e01fc7dc12a9af8d1d7a929156c39273c8e56c0b4523caba7a985f6129fde6d913da2d56886aed32e2aa20f9d0945 +"trivial-deferred@npm:^1.0.1": + version: 1.0.1 + resolution: "trivial-deferred@npm:1.0.1" + checksum: 10/1615081f03df8e36c4c6f648597f02df50144fd81ccdcd0c8ba67b1c2a5f9f344d90a3983caf9927f866983064c4c26854fef637a8f3672ccfdff92039519763 languageName: node linkType: hard -"web3-core@npm:4.1.1, web3-core@npm:^4.0.3, web3-core@npm:^4.1.1": - version: 4.1.1 - resolution: "web3-core@npm:4.1.1" - dependencies: - web3-errors: "npm:^1.1.1" - web3-eth-iban: "npm:^4.0.5" - web3-providers-http: "npm:^4.0.5" - web3-providers-ipc: "npm:^4.0.5" - web3-providers-ws: "npm:^4.0.5" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - dependenciesMeta: - web3-providers-ipc: - optional: true - checksum: 10/779ef2b384ed2f1b2ca856131542e2b78e01f2c2200fbdc96becc7315a2cdf0882bfcfd8c53f204debaffa0de7462b7df41f56b60299c0999bdab884469ae2d9 +"ts-api-utils@npm:^1.0.1": + version: 1.0.1 + resolution: "ts-api-utils@npm:1.0.1" + peerDependencies: + typescript: ">=4.2.0" + checksum: 10/8b16fa5645442854fbaef83c57beec8daf0326b24576efe744d85bb3851241b8deac2df424ebe73c0bb7d5bfaac6bccbb554222b788f9fdf90998d164f38d640 languageName: node linkType: hard -"web3-core@npm:^4.3.0": - version: 4.3.0 - resolution: "web3-core@npm:4.3.0" - dependencies: - web3-errors: "npm:^1.1.3" - web3-eth-iban: "npm:^4.0.7" - web3-providers-http: "npm:^4.1.0" - web3-providers-ipc: "npm:^4.0.7" - web3-providers-ws: "npm:^4.0.7" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - dependenciesMeta: - web3-providers-ipc: - optional: true - checksum: 10/843dd58068672f94313bb56632050be64671afcdb2d0fc7861f6d1db8cc1856e4d6ad7822000b8f6658b4f6dcd94e4cc0dc53f6c9aeb250aedd1367e3652423f +"ts-graphviz@npm:^1.8.1": + version: 1.8.2 + resolution: "ts-graphviz@npm:1.8.2" + checksum: 10/969b06332ca622c148f7b404569af1b972bbe7ee9ba1226350dd0d99bc92c1c95eb6bf9e69aafce51a6c2493a1342b25a8edd6883f27bd516778d401b2a3623f languageName: node linkType: hard -"web3-core@npm:^4.3.2": - version: 4.3.2 - resolution: "web3-core@npm:4.3.2" - dependencies: - web3-errors: "npm:^1.1.4" - web3-eth-accounts: "npm:^4.1.0" - web3-eth-iban: "npm:^4.0.7" - web3-providers-http: "npm:^4.1.0" - web3-providers-ipc: "npm:^4.0.7" - web3-providers-ws: "npm:^4.0.7" - web3-types: "npm:^1.3.1" - web3-utils: "npm:^4.1.0" - web3-validator: "npm:^2.0.3" - dependenciesMeta: - web3-providers-ipc: +"ts-jest@npm:29.1.1": + version: 29.1.1 + resolution: "ts-jest@npm:29.1.1" + dependencies: + bs-logger: "npm:0.x" + fast-json-stable-stringify: "npm:2.x" + jest-util: "npm:^29.0.0" + json5: "npm:^2.2.3" + lodash.memoize: "npm:4.x" + make-error: "npm:1.x" + semver: "npm:^7.5.3" + yargs-parser: "npm:^21.0.1" + peerDependencies: + "@babel/core": ">=7.0.0-beta.0 <8" + "@jest/types": ^29.0.0 + babel-jest: ^29.0.0 + jest: ^29.0.0 + typescript: ">=4.3 <6" + peerDependenciesMeta: + "@babel/core": + optional: true + "@jest/types": + optional: true + babel-jest: + optional: true + esbuild: optional: true - checksum: 10/270351475dcb1438022be1edaee8efe59a9eb976ab61ca10c0b9512b4abab6d5976fe720daab6924a495179702f2008856f19788de272e6a039cb96e0a6184e7 + bin: + ts-jest: cli.js + checksum: 10/30e8259baba95dd786e64f7c18b864e904598f3ba07911be4d9bd29ca9c3c0024bad4ccf8ec0abd2a2fa14b06622cbbadff1b3be822189c657196442d33ee6ca languageName: node linkType: hard -"web3-errors@npm:^1.0.2": - version: 1.0.2 - resolution: "web3-errors@npm:1.0.2" +"ts-loader@npm:9.4.4": + version: 9.4.4 + resolution: "ts-loader@npm:9.4.4" dependencies: - web3-types: "npm:^1.0.2" - checksum: 10/e878e464eeabcd128704c031f4ce9652af3fff826ae5c3c8c10955ddf49f7ac3187ca6724eb9561582440c34cca36f0c99f60dff02f23ab1ed4229ab2fadd9a5 + chalk: "npm:^4.1.0" + enhanced-resolve: "npm:^5.0.0" + micromatch: "npm:^4.0.0" + semver: "npm:^7.3.4" + peerDependencies: + typescript: "*" + webpack: ^5.0.0 + checksum: 10/52302f3540962d779fc346281d8d4f7310f73e129debc4fb55c1fb3f097519009b32f7e2806299904e98961c785784fccb70ceca9076c4bae33f064ad11dd982 languageName: node linkType: hard -"web3-errors@npm:^1.1.1": - version: 1.1.1 - resolution: "web3-errors@npm:1.1.1" +"ts-node@npm:10.9.1, ts-node@npm:^10.8.1": + version: 10.9.1 + resolution: "ts-node@npm:10.9.1" dependencies: - web3-types: "npm:^1.1.1" - checksum: 10/0f565b44a459d33899d623faac1f49d14f9cbdd9e626ef11c3def21bdbfeb651de903fe1119eae585f27064570a1de4881b1f4f5e9267b492de88788c1c3b09b + "@cspotcode/source-map-support": "npm:^0.8.0" + "@tsconfig/node10": "npm:^1.0.7" + "@tsconfig/node12": "npm:^1.0.7" + "@tsconfig/node14": "npm:^1.0.0" + "@tsconfig/node16": "npm:^1.0.2" + acorn: "npm:^8.4.1" + acorn-walk: "npm:^8.1.1" + arg: "npm:^4.1.0" + create-require: "npm:^1.1.0" + diff: "npm:^4.0.1" + make-error: "npm:^1.1.1" + v8-compile-cache-lib: "npm:^3.0.1" + yn: "npm:3.1.1" + peerDependencies: + "@swc/core": ">=1.2.50" + "@swc/wasm": ">=1.2.50" + "@types/node": "*" + typescript: ">=2.7" + peerDependenciesMeta: + "@swc/core": + optional: true + "@swc/wasm": + optional: true + bin: + ts-node: dist/bin.js + ts-node-cwd: dist/bin-cwd.js + ts-node-esm: dist/bin-esm.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 10/bee56d4dc96ccbafc99dfab7b73fbabc62abab2562af53cdea91c874a301b9d11e42bc33c0a032a6ed6d813dbdc9295ec73dde7b73ea4ebde02b0e22006f7e04 languageName: node linkType: hard -"web3-errors@npm:^1.1.2": - version: 1.1.2 - resolution: "web3-errors@npm:1.1.2" +"tsconfig-paths@npm:^3.15.0": + version: 3.15.0 + resolution: "tsconfig-paths@npm:3.15.0" dependencies: - web3-types: "npm:^1.2.0" - checksum: 10/9070740a08c57a539c1f0281546450c8b7129724ddde3f8a34855c01f1e1e689b58eb3ec3639bc505539b15e9355cd3e6548ee2b5ddeeeda79ce4af2d8e556ab + "@types/json5": "npm:^0.0.29" + json5: "npm:^1.0.2" + minimist: "npm:^1.2.6" + strip-bom: "npm:^3.0.0" + checksum: 10/2041beaedc6c271fc3bedd12e0da0cc553e65d030d4ff26044b771fac5752d0460944c0b5e680f670c2868c95c664a256cec960ae528888db6ded83524e33a14 languageName: node linkType: hard -"web3-errors@npm:^1.1.3": - version: 1.1.3 - resolution: "web3-errors@npm:1.1.3" +"tsconfig-paths@npm:^4.2.0": + version: 4.2.0 + resolution: "tsconfig-paths@npm:4.2.0" dependencies: - web3-types: "npm:^1.3.0" - checksum: 10/3c55ec64e1e9aa0883a894fc18c88b53a6880ab40172ed413334cf1cad34e589ee306f057be00322e3b538d86d420bcfc9571de3a382497fcc87160c52e20713 + json5: "npm:^2.2.2" + minimist: "npm:^1.2.6" + strip-bom: "npm:^3.0.0" + checksum: 10/5e55cc2fb6b800eb72011522e10edefccb45b1f9af055681a51354c9b597d1390c6fa9cc356b8c7529f195ac8a90a78190d563159f3a1eed10e01bbd4d01a8ab languageName: node linkType: hard -"web3-errors@npm:^1.1.4": - version: 1.1.4 - resolution: "web3-errors@npm:1.1.4" - dependencies: - web3-types: "npm:^1.3.1" - checksum: 10/b0773a7df2338efc624963e55719894386303703ce393e5ce677fef0c7b4a5293556530386577010f1086a9fa7534346b83c4fc014e79c1107950e20a047b2f2 +"tslib@npm:2.0.3": + version: 2.0.3 + resolution: "tslib@npm:2.0.3" + checksum: 10/5f57eb3c6d01ebde567020539dd2282455bce24b5066228d3ca7bb5a5511b2d7c754225d6b2a0ea3c128cf6cd467469b581f946de834ccd0e042fa29279551f6 languageName: node linkType: hard -"web3-errors@npm:^1.2.0": - version: 1.2.0 - resolution: "web3-errors@npm:1.2.0" - dependencies: - web3-types: "npm:^1.6.0" - checksum: 10/99d0ecc4368c2969cc799ed4ef1b35f233dc3e7e0ccde713bcc850be4e75725ce175127342512504057ca48186266d6a053f129634f20ae23c405855a766d13d +"tslib@npm:2.5.0": + version: 2.5.0 + resolution: "tslib@npm:2.5.0" + checksum: 10/ea556fbdf396fe15dbd45e242754e86e7c36e0dce8644404a7c8a81ae1e940744dc639569aeca1ae370a7f804d82872f3fd8564eb23be9adb7618201d0314dac languageName: node linkType: hard -"web3-eth-abi@npm:1.10.0": - version: 1.10.0 - resolution: "web3-eth-abi@npm:1.10.0" - dependencies: - "@ethersproject/abi": "npm:^5.6.3" - web3-utils: "npm:1.10.0" - checksum: 10/f0839e797d0ad1271ed94650b9850df7630110b7ebc68028f7d7d18906160d90155f56dddaa6c5571b63cafd71ce9b0f84cf35d9e1b50f85c3c93a2469260a98 +"tslib@npm:^1.8.1, tslib@npm:^1.9.0": + version: 1.14.1 + resolution: "tslib@npm:1.14.1" + checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb languageName: node linkType: hard -"web3-eth-abi@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-abi@npm:1.10.1" - dependencies: - "@ethersproject/abi": "npm:^5.6.3" - web3-utils: "npm:1.10.1" - checksum: 10/acc702b0022542515ae9192ee43d12831164de82d1b392113d7410c1d332790cb15fe2a17cc8ba76391179422cc612b99d9abcbb6423ae74cca868e45e94cb38 +"tslib@npm:^2.0.3": + version: 2.6.0 + resolution: "tslib@npm:2.6.0" + checksum: 10/52360693c62761f902e1946b350188be6505de297068b33421cb26bedd99591203a74cb2a49e1f43f0922d59b1fb3499fe5cfe61a61ca65a1743d5c92c69720a languageName: node linkType: hard -"web3-eth-abi@npm:1.6.1": - version: 1.6.1 - resolution: "web3-eth-abi@npm:1.6.1" - dependencies: - "@ethersproject/abi": "npm:5.0.7" - web3-utils: "npm:1.6.1" - checksum: 10/54d2726311ed5c33ab1c15466ffda559e84a297caa17aaf400f83f720174a64a6c4945fc3c3c9ab3f4d22e7929aeac6174ea5cf364c678e8fd7066321357cad1 +"tslib@npm:^2.1.0": + version: 2.3.1 + resolution: "tslib@npm:2.3.1" + checksum: 10/5e7de59ed9f2b705b399bda28326b7c3e7526deb48bbe1716e2e17fbd4cecbb610253d09c7b8fd0a6e76cfed9304e2e608cdb81bb1ee812d69e5089d1a94c71a languageName: node linkType: hard -"web3-eth-abi@npm:1.7.3": - version: 1.7.3 - resolution: "web3-eth-abi@npm:1.7.3" - dependencies: - "@ethersproject/abi": "npm:5.0.7" - web3-utils: "npm:1.7.3" - checksum: 10/bf8624a29e8bf017ac0f6cbca6cc8d9cd704fa8e2b175c5bed6e2bfb149c5a12adbde0a298ae49b2e299ae0ee39025944ad46af272d195c11552a656308a28b9 +"tslib@npm:^2.6.2": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 10/bd26c22d36736513980091a1e356378e8b662ded04204453d353a7f34a4c21ed0afc59b5f90719d4ba756e581a162ecbf93118dc9c6be5acf70aa309188166ca languageName: node linkType: hard -"web3-eth-abi@npm:1.8.1": - version: 1.8.1 - resolution: "web3-eth-abi@npm:1.8.1" +"tsutils@npm:^3.21.0": + version: 3.21.0 + resolution: "tsutils@npm:3.21.0" dependencies: - "@ethersproject/abi": "npm:^5.6.3" - web3-utils: "npm:1.8.1" - checksum: 10/ae671f84aa327d9fa0f3ac75175cbae1af991863c4b1713b4aae6721a11533268257a4f2045dd76c6dd928a94bf73bf87fea5a8f34aa2a60b88a5a35c87f66b7 + tslib: "npm:^1.8.1" + peerDependencies: + typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + checksum: 10/ea036bec1dd024e309939ffd49fda7a351c0e87a1b8eb049570dd119d447250e2c56e0e6c00554e8205760e7417793fdebff752a46e573fbe07d4f375502a5b2 languageName: node linkType: hard -"web3-eth-abi@npm:4.0.3": - version: 4.0.3 - resolution: "web3-eth-abi@npm:4.0.3" +"tsx@npm:4.16.2": + version: 4.16.2 + resolution: "tsx@npm:4.16.2" dependencies: - "@ethersproject/abi": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - web3-errors: "npm:^1.0.2" - web3-types: "npm:^1.0.2" - web3-utils: "npm:^4.0.3" - checksum: 10/3fc342e7a56a8bead4f78f019b0d133cb6b6acac5c9b6dcd9a704de2dd6c6d01a7a71c59abce7251a3ae321a5ed0e8c803e4c54b41f44a3defcf34d675da9dca + esbuild: "npm:~0.21.5" + fsevents: "npm:~2.3.3" + get-tsconfig: "npm:^4.7.5" + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: 10/841ccbace3dc0c42704bb5c4cea47e1f4cd313aa4719fd4531e5ed40bb862b02349c76f7c56c53b64207eebbb1c2ac2e117482aabfbf197a30fbc0b2584b60be languageName: node linkType: hard -"web3-eth-abi@npm:4.2.1": - version: 4.2.1 - resolution: "web3-eth-abi@npm:4.2.1" - dependencies: - abitype: "npm:0.7.1" - web3-errors: "npm:^1.1.4" - web3-types: "npm:^1.6.0" - web3-utils: "npm:^4.2.3" - web3-validator: "npm:^2.0.5" - checksum: 10/83295264934a33506e6a7101b22be8a002779b4d1be75d7a2367ba5399221e02ca5574d68462fab325f33059624deda8453845207a4276333fbe1b434b464049 +"tty-browserify@npm:^0.0.1": + version: 0.0.1 + resolution: "tty-browserify@npm:0.0.1" + checksum: 10/93b745d43fa5a7d2b948fa23be8d313576d1d884b48acd957c07710bac1c0d8ac34c0556ad4c57c73d36e11741763ef66b3fb4fb97b06b7e4d525315a3cd45f5 languageName: node linkType: hard -"web3-eth-abi@npm:^4.0.3, web3-eth-abi@npm:^4.1.1": - version: 4.1.1 - resolution: "web3-eth-abi@npm:4.1.1" +"tuf-js@npm:^2.2.1": + version: 2.2.1 + resolution: "tuf-js@npm:2.2.1" dependencies: - "@ethersproject/abi": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - checksum: 10/0764149e73ca3eae0c525ba813529aa6e452050eaad72880da26ea83f66b47a5f95ead75ba1048aeb621b4398bfa5703fcac1192f6c38ae7e7028a5e6da53f89 + "@tufjs/models": "npm:2.0.1" + debug: "npm:^4.3.4" + make-fetch-happen: "npm:^13.0.1" + checksum: 10/4c057f4f0cfb183d8634c026a592f4fb29fd4e3d88260e32949642deedf87a1ae407645bae4cca58299458679a1cb7721245cde1885d466c2dbc1fbac0bc008a languageName: node linkType: hard -"web3-eth-abi@npm:^4.1.4": - version: 4.1.4 - resolution: "web3-eth-abi@npm:4.1.4" - dependencies: - abitype: "npm:0.7.1" - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/66fad9b39e18b8d41231f5ce00ca75522025c7eacbfd734e9d08a8214ce33b7732569a93cbb37a43fedd1c22503bc27006abbdfcdcf53726cde8e5c9dfa84044 +"tunnel@npm:0.0.6": + version: 0.0.6 + resolution: "tunnel@npm:0.0.6" + checksum: 10/cf1ffed5e67159b901a924dbf94c989f20b2b3b65649cfbbe4b6abb35955ce2cf7433b23498bdb2c5530ab185b82190fce531597b3b4a649f06a907fc8702405 languageName: node linkType: hard -"web3-eth-abi@npm:^4.2.0": - version: 4.2.0 - resolution: "web3-eth-abi@npm:4.2.0" +"type-check@npm:^0.4.0, type-check@npm:~0.4.0": + version: 0.4.0 + resolution: "type-check@npm:0.4.0" dependencies: - abitype: "npm:0.7.1" - web3-errors: "npm:^1.1.4" - web3-types: "npm:^1.3.1" - web3-utils: "npm:^4.1.1" - web3-validator: "npm:^2.0.4" - checksum: 10/df903dad3b41932a60504d7c532c515b47bb44bd2d338118633ecc69ffe74122fe0346fc6047cdd623eae3c9382b2fabe41156115cfafa4701616bba6577a6dd + prelude-ls: "npm:^1.2.1" + checksum: 10/14687776479d048e3c1dbfe58a2409e00367810d6960c0f619b33793271ff2a27f81b52461f14a162f1f89a9b1d8da1b237fc7c99b0e1fdcec28ec63a86b1fec languageName: node linkType: hard -"web3-eth-accounts@npm:1.10.0": - version: 1.10.0 - resolution: "web3-eth-accounts@npm:1.10.0" - dependencies: - "@ethereumjs/common": "npm:2.5.0" - "@ethereumjs/tx": "npm:3.3.2" - eth-lib: "npm:0.2.8" - ethereumjs-util: "npm:^7.1.5" - scrypt-js: "npm:^3.0.1" - uuid: "npm:^9.0.0" - web3-core: "npm:1.10.0" - web3-core-helpers: "npm:1.10.0" - web3-core-method: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/f97f81292f950f2f98ff01136f49b65f4f2468551cfce87169b4820b4f92afec5c3d5a1223c6aba6a46d872c854f56a3911fe36f7f902c0ac1fe43c17125802d +"type-detect@npm:4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d languageName: node linkType: hard -"web3-eth-accounts@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-accounts@npm:1.10.1" - dependencies: - "@ethereumjs/common": "npm:2.5.0" - "@ethereumjs/tx": "npm:3.3.2" - "@ethereumjs/util": "npm:^8.1.0" - eth-lib: "npm:0.2.8" - scrypt-js: "npm:^3.0.1" - uuid: "npm:^9.0.0" - web3-core: "npm:1.10.1" - web3-core-helpers: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/334b4b5075ffd547ebf487ec7b4c209ea7e8d40f0e48f1b56134f06f4e4cbea9a62924ad8407ec7ff7209e3f7bf22face82eeb9a65e4c0d2c2bbfcaa6beeaa83 +"type-fest@npm:^0.12.0": + version: 0.12.0 + resolution: "type-fest@npm:0.12.0" + checksum: 10/828dd234a0497721622de2907147aff3290a42f86ca01b3d1c1273b4f50bcd00eadcb71c7fad9b34125c7796b8d3a554415f9dda4875993ed51636431488f712 languageName: node linkType: hard -"web3-eth-accounts@npm:1.6.1": - version: 1.6.1 - resolution: "web3-eth-accounts@npm:1.6.1" - dependencies: - "@ethereumjs/common": "npm:^2.5.0" - "@ethereumjs/tx": "npm:^3.3.2" - crypto-browserify: "npm:3.12.0" - eth-lib: "npm:0.2.8" - ethereumjs-util: "npm:^7.0.10" - scrypt-js: "npm:^3.0.1" - uuid: "npm:3.3.2" - web3-core: "npm:1.6.1" - web3-core-helpers: "npm:1.6.1" - web3-core-method: "npm:1.6.1" - web3-utils: "npm:1.6.1" - checksum: 10/38371e64b81685cb8720e3c53e946219a69b14e67d56b8980890cbd89622a49057913ef681fdfc4340c4fdf3ba7e791a89225f83ac668980729ba6e3a40bc9d4 +"type-fest@npm:^0.18.0": + version: 0.18.1 + resolution: "type-fest@npm:0.18.1" + checksum: 10/08844377058435c2b0e633ba01bab6102dba0ed63d85417d8e18feff265eed6f5c9f8f9a25d405ea9db88a41a569be73a3c4c0d4e29150bf89fb145bb23114a2 languageName: node linkType: hard -"web3-eth-accounts@npm:1.7.3": - version: 1.7.3 - resolution: "web3-eth-accounts@npm:1.7.3" - dependencies: - "@ethereumjs/common": "npm:^2.5.0" - "@ethereumjs/tx": "npm:^3.3.2" - crypto-browserify: "npm:3.12.0" - eth-lib: "npm:0.2.8" - ethereumjs-util: "npm:^7.0.10" - scrypt-js: "npm:^3.0.1" - uuid: "npm:3.3.2" - web3-core: "npm:1.7.3" - web3-core-helpers: "npm:1.7.3" - web3-core-method: "npm:1.7.3" - web3-utils: "npm:1.7.3" - checksum: 10/dc4f2f0eec7952986e649dd55bfcdfc4ce82985cb1d21495d65d338d32c56950ceb79ccfc355cef82fa51821aaf1c5fc3d8fdabdb00a1f77c6ec15aa7f47adf8 +"type-fest@npm:^0.20.2": + version: 0.20.2 + resolution: "type-fest@npm:0.20.2" + checksum: 10/8907e16284b2d6cfa4f4817e93520121941baba36b39219ea36acfe64c86b9dbc10c9941af450bd60832c8f43464974d51c0957f9858bc66b952b66b6914cbb9 languageName: node linkType: hard -"web3-eth-accounts@npm:1.8.1": - version: 1.8.1 - resolution: "web3-eth-accounts@npm:1.8.1" - dependencies: - "@ethereumjs/common": "npm:2.5.0" - "@ethereumjs/tx": "npm:3.3.2" - crypto-browserify: "npm:3.12.0" - eth-lib: "npm:0.2.8" - ethereumjs-util: "npm:^7.0.10" - scrypt-js: "npm:^3.0.1" - uuid: "npm:^9.0.0" - web3-core: "npm:1.8.1" - web3-core-helpers: "npm:1.8.1" - web3-core-method: "npm:1.8.1" - web3-utils: "npm:1.8.1" - checksum: 10/ef7a9f6c25ed8789ff52a2b99fce283fc4971aeb3a4ce74b0539b5e07db69d1e086bde53dba18b7c1939d1f7c3c72949e54260b9250a15edb95a9f0401f12bc3 +"type-fest@npm:^0.21.3": + version: 0.21.3 + resolution: "type-fest@npm:0.21.3" + checksum: 10/f4254070d9c3d83a6e573bcb95173008d73474ceadbbf620dd32d273940ca18734dff39c2b2480282df9afe5d1675ebed5499a00d791758748ea81f61a38961f languageName: node linkType: hard -"web3-eth-accounts@npm:4.0.3": - version: 4.0.3 - resolution: "web3-eth-accounts@npm:4.0.3" - dependencies: - "@ethereumjs/rlp": "npm:^4.0.1" - crc-32: "npm:^1.2.2" - ethereum-cryptography: "npm:^2.0.0" - web3-errors: "npm:^1.0.2" - web3-types: "npm:^1.0.2" - web3-utils: "npm:^4.0.3" - web3-validator: "npm:^1.0.2" - checksum: 10/d7fe0d6005e0b0a88fb3898c5819facdb008c853e9bd4141ef255bb7a8c82fee98cbeeeb97201fccb20a0b202314fb59f2bc696068981eb36786964f9902f070 +"type-fest@npm:^0.6.0": + version: 0.6.0 + resolution: "type-fest@npm:0.6.0" + checksum: 10/9ecbf4ba279402b14c1a0614b6761bbe95626fab11377291fecd7e32b196109551e0350dcec6af74d97ced1b000ba8060a23eca33157091e642b409c2054ba82 languageName: node linkType: hard -"web3-eth-accounts@npm:4.1.1, web3-eth-accounts@npm:^4.1.1": - version: 4.1.1 - resolution: "web3-eth-accounts@npm:4.1.1" - dependencies: - "@ethereumjs/rlp": "npm:^4.0.1" - crc-32: "npm:^1.2.2" - ethereum-cryptography: "npm:^2.0.0" - web3-errors: "npm:^1.1.4" - web3-types: "npm:^1.3.1" - web3-utils: "npm:^4.1.1" - web3-validator: "npm:^2.0.4" - checksum: 10/059f0d030908c239ca15a45ecb0c6620ece6b636da42236104f133be15612660cdb1d5d9286cb0a8ba3a36bf57a9d98047ed21f5d6c1d093edee180e62e45230 +"type-fest@npm:^0.8.0, type-fest@npm:^0.8.1": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: 10/fd4a91bfb706aeeb0d326ebd2e9a8ea5263979e5dec8d16c3e469a5bd3a946e014a062ef76c02e3086d3d1c7209a56a20a4caafd0e9f9a5c2ab975084ea3d388 languageName: node linkType: hard -"web3-eth-accounts@npm:^4.0.3, web3-eth-accounts@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-eth-accounts@npm:4.0.5" - dependencies: - "@ethereumjs/rlp": "npm:^4.0.1" - crc-32: "npm:^1.2.2" - ethereum-cryptography: "npm:^2.0.0" - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/37e9e2d909544e3d9b8b9bf3168365cd068653b18880cb65835c9b2a3acefc885ecb18de52ead56f7a3663b33a6bb58d19e4e9fc21f2618cd9cb262a355a7dc1 +"type-fest@npm:^1.0.1, type-fest@npm:^1.2.1, type-fest@npm:^1.2.2": + version: 1.4.0 + resolution: "type-fest@npm:1.4.0" + checksum: 10/89875c247564601c2650bacad5ff80b859007fbdb6c9e43713ae3ffa3f584552eea60f33711dd762e16496a1ab4debd409822627be14097d9a17e39c49db591a languageName: node linkType: hard -"web3-eth-accounts@npm:^4.1.0": - version: 4.1.0 - resolution: "web3-eth-accounts@npm:4.1.0" - dependencies: - "@ethereumjs/rlp": "npm:^4.0.1" - crc-32: "npm:^1.2.2" - ethereum-cryptography: "npm:^2.0.0" - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/2048b3d1211593a44921a7cf200a2a407d82f832eae5751aa3b193012f4c084038814878c9423988636435f9b41967769a854ab643fb7d3cda8d898ad070be26 +"type-fest@npm:^2.5.1": + version: 2.19.0 + resolution: "type-fest@npm:2.19.0" + checksum: 10/7bf9e8fdf34f92c8bb364c0af14ca875fac7e0183f2985498b77be129dc1b3b1ad0a6b3281580f19e48c6105c037fb966ad9934520c69c6434d17fd0af4eed78 languageName: node linkType: hard -"web3-eth-contract@npm:1.10.0": - version: 1.10.0 - resolution: "web3-eth-contract@npm:1.10.0" - dependencies: - "@types/bn.js": "npm:^5.1.1" - web3-core: "npm:1.10.0" - web3-core-helpers: "npm:1.10.0" - web3-core-method: "npm:1.10.0" - web3-core-promievent: "npm:1.10.0" - web3-core-subscriptions: "npm:1.10.0" - web3-eth-abi: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/eadb91ec20875567732a670b6dcc74fb8192c3b0cdd1bb3055133c74444ec46e4dbfedf3533afbb67996bad23b558b90fbd95c7bb79203f33f35e9369b78cb4d +"type-fest@npm:^3.8.0": + version: 3.13.1 + resolution: "type-fest@npm:3.13.1" + checksum: 10/9a8a2359ada34c9b3affcaf3a8f73ee14c52779e89950db337ce66fb74c3399776c697c99f2532e9b16e10e61cfdba3b1c19daffb93b338b742f0acd0117ce12 languageName: node linkType: hard -"web3-eth-contract@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-contract@npm:1.10.1" - dependencies: - "@types/bn.js": "npm:^5.1.1" - web3-core: "npm:1.10.1" - web3-core-helpers: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-core-promievent: "npm:1.10.1" - web3-core-subscriptions: "npm:1.10.1" - web3-eth-abi: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/cf90d7286eb690fb2b25dcd19e58763f0e8745fc474663b0dba5d7e356b5b89d29509b26f7863bf200428f883e8f70a132b1ba40d0ddc9e320bed5129e0535aa +"type-fest@npm:^4.2.0": + version: 4.3.1 + resolution: "type-fest@npm:4.3.1" + checksum: 10/67ec9bd6fd1b1c5e7361d5ffad639607f60a3d497ff9fa7b1359b9e4c6b08a8f31f1cb0328e633f640adc2b8f692b35719efc328af0aea1d816828e4195519ae languageName: node linkType: hard -"web3-eth-contract@npm:1.6.1": - version: 1.6.1 - resolution: "web3-eth-contract@npm:1.6.1" - dependencies: - "@types/bn.js": "npm:^4.11.5" - web3-core: "npm:1.6.1" - web3-core-helpers: "npm:1.6.1" - web3-core-method: "npm:1.6.1" - web3-core-promievent: "npm:1.6.1" - web3-core-subscriptions: "npm:1.6.1" - web3-eth-abi: "npm:1.6.1" - web3-utils: "npm:1.6.1" - checksum: 10/8da2b0bb386b1c9314356cca8924debaaa3174b8963df9fc03ef34b2a85770ba9c33ff41a6022dd504e9889aec7266d307c5e82e30d0ea48982e6b85571c71cd +"type-fest@npm:^4.6.0": + version: 4.8.3 + resolution: "type-fest@npm:4.8.3" + checksum: 10/90e440347c542282b0a92bb181fb30af529be6d6820dd7ec6141309f2ca143855a8fbca18969623b19bc15a3dcce6000af19f97cae81a39fbd2638c15a06d078 languageName: node linkType: hard -"web3-eth-contract@npm:1.7.3": - version: 1.7.3 - resolution: "web3-eth-contract@npm:1.7.3" - dependencies: - "@types/bn.js": "npm:^4.11.5" - web3-core: "npm:1.7.3" - web3-core-helpers: "npm:1.7.3" - web3-core-method: "npm:1.7.3" - web3-core-promievent: "npm:1.7.3" - web3-core-subscriptions: "npm:1.7.3" - web3-eth-abi: "npm:1.7.3" - web3-utils: "npm:1.7.3" - checksum: 10/a08023493daf41565840ed02e3e6b1f26b7c1e5304436a0c05da0feb2a1a5a6169d7b9205ffbddba211169ec815ad19265f2354545516494906303e626c3a18e +"type-fest@npm:^4.7.1": + version: 4.21.0 + resolution: "type-fest@npm:4.21.0" + checksum: 10/a4dc074b25239fff4062495c58554dcec15845622d753092d2bf24fc3b1c49f85805ed74f151976d666056ff122b3a5a988e85226575b7fbbc8e92d2db210137 languageName: node linkType: hard -"web3-eth-contract@npm:1.8.1": - version: 1.8.1 - resolution: "web3-eth-contract@npm:1.8.1" +"typed-array-buffer@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-buffer@npm:1.0.0" dependencies: - "@types/bn.js": "npm:^5.1.0" - web3-core: "npm:1.8.1" - web3-core-helpers: "npm:1.8.1" - web3-core-method: "npm:1.8.1" - web3-core-promievent: "npm:1.8.1" - web3-core-subscriptions: "npm:1.8.1" - web3-eth-abi: "npm:1.8.1" - web3-utils: "npm:1.8.1" - checksum: 10/231c4948de3e0acf6924614c2b087377348a644f2bb7ab39eb2a22b565aaccf7c308442176f8108c26ec57687f27fa1dc23073ea58fcf4c8a33da358311b3757 + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.2.1" + is-typed-array: "npm:^1.1.10" + checksum: 10/3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 languageName: node linkType: hard -"web3-eth-contract@npm:4.2.0, web3-eth-contract@npm:^4.2.0": - version: 4.2.0 - resolution: "web3-eth-contract@npm:4.2.0" +"typed-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-buffer@npm:1.0.2" dependencies: - web3-core: "npm:^4.3.2" - web3-errors: "npm:^1.1.4" - web3-eth: "npm:^4.4.0" - web3-eth-abi: "npm:^4.2.0" - web3-types: "npm:^1.3.1" - web3-utils: "npm:^4.1.1" - web3-validator: "npm:^2.0.4" - checksum: 10/eeeae31f073a128ce0377e52ea53f76375e3b13dec74f18f936a67c920fd3c80e9648838d0db5b0707300c37bb859860ad9270ef1a3c59c6b99597b972cc8881 + call-bind: "npm:^1.0.7" + es-errors: "npm:^1.3.0" + is-typed-array: "npm:^1.1.13" + checksum: 10/02ffc185d29c6df07968272b15d5319a1610817916ec8d4cd670ded5d1efe72901541ff2202fcc622730d8a549c76e198a2f74e312eabbfb712ed907d45cbb0b languageName: node linkType: hard -"web3-eth-contract@npm:^4.0.3, web3-eth-contract@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-eth-contract@npm:4.0.5" +"typed-array-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-length@npm:1.0.0" dependencies: - web3-core: "npm:^4.1.1" - web3-errors: "npm:^1.1.1" - web3-eth: "npm:^4.1.1" - web3-eth-abi: "npm:^4.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/6629b627afa26ea9f083812ddeca1db869ce76dc26deaa4e503785bc5b1dc26967ce4682a2ac03a59fe54b2212442cb93f5c544552cefe3457d78248c1f4f75d + call-bind: "npm:^1.0.2" + for-each: "npm:^0.3.3" + has-proto: "npm:^1.0.1" + is-typed-array: "npm:^1.1.10" + checksum: 10/6f376bf5d988f00f98ccee41fd551cafc389095a2a307c18fab30f29da7d1464fc3697139cf254cda98b4128bbcb114f4b557bbabdc6d9c2e5039c515b31decf languageName: node linkType: hard -"web3-eth-contract@npm:^4.1.2": - version: 4.1.2 - resolution: "web3-eth-contract@npm:4.1.2" +"typed-array-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "typed-array-byte-length@npm:1.0.1" dependencies: - web3-core: "npm:^4.3.0" - web3-errors: "npm:^1.1.3" - web3-eth: "npm:^4.3.1" - web3-eth-abi: "npm:^4.1.4" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/85a819cb47bd66aab8410ccd6a2d74220b5ba37435b3771ed61a772a6cce234d823a0ed4a2d1e46605d92de4c85bc54c91273258bfb5d47239d7359c155fc791 + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-proto: "npm:^1.0.3" + is-typed-array: "npm:^1.1.13" + checksum: 10/e4a38329736fe6a73b52a09222d4a9e8de14caaa4ff6ad8e55217f6705b017d9815b7284c85065b3b8a7704e226ccff1372a72b78c2a5b6b71b7bf662308c903 languageName: node linkType: hard -"web3-eth-ens@npm:1.10.0": - version: 1.10.0 - resolution: "web3-eth-ens@npm:1.10.0" +"typed-array-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-offset@npm:1.0.0" dependencies: - content-hash: "npm:^2.5.2" - eth-ens-namehash: "npm:2.0.8" - web3-core: "npm:1.10.0" - web3-core-helpers: "npm:1.10.0" - web3-core-promievent: "npm:1.10.0" - web3-eth-abi: "npm:1.10.0" - web3-eth-contract: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/56a53f1e330caecbcafd7c2fbad8a3fb84354c40df86236d7e8953a532e7b970cb6ac70ef995a1c6d9f0af227f902cb90a066d933db20d95b565e000bf7f6b4f + available-typed-arrays: "npm:^1.0.5" + call-bind: "npm:^1.0.2" + for-each: "npm:^0.3.3" + has-proto: "npm:^1.0.1" + is-typed-array: "npm:^1.1.10" + checksum: 10/2d81747faae31ca79f6c597dc18e15ae3d5b7e97f7aaebce3b31f46feeb2a6c1d6c92b9a634d901c83731ffb7ec0b74d05c6ff56076f5ae39db0cd19b16a3f92 languageName: node linkType: hard -"web3-eth-ens@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-ens@npm:1.10.1" +"typed-array-byte-offset@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-byte-offset@npm:1.0.2" dependencies: - content-hash: "npm:^2.5.2" - eth-ens-namehash: "npm:2.0.8" - web3-core: "npm:1.10.1" - web3-core-helpers: "npm:1.10.1" - web3-core-promievent: "npm:1.10.1" - web3-eth-abi: "npm:1.10.1" - web3-eth-contract: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/fced5d691ed5beebb8be9faaf75e6400e09a1df4006c308766102f6ff559206c6921537804f471d8bbbbfc843dd22d7771b2ce4a80767eff64bb58e7b80bbd33 + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-proto: "npm:^1.0.3" + is-typed-array: "npm:^1.1.13" + checksum: 10/ac26d720ebb2aacbc45e231347c359e6649f52e0cfe0e76e62005912f8030d68e4cb7b725b1754e8fdd48e433cb68df5a8620a3e420ad1457d666e8b29bf9150 languageName: node linkType: hard -"web3-eth-ens@npm:1.6.1": - version: 1.6.1 - resolution: "web3-eth-ens@npm:1.6.1" +"typed-array-length@npm:^1.0.4": + version: 1.0.4 + resolution: "typed-array-length@npm:1.0.4" dependencies: - content-hash: "npm:^2.5.2" - eth-ens-namehash: "npm:2.0.8" - web3-core: "npm:1.6.1" - web3-core-helpers: "npm:1.6.1" - web3-core-promievent: "npm:1.6.1" - web3-eth-abi: "npm:1.6.1" - web3-eth-contract: "npm:1.6.1" - web3-utils: "npm:1.6.1" - checksum: 10/a09875b44bcb6ad6fe41c716c68b55f3dd336d159ec682770ff14501a642618095447cf46b7318bbec4390a0185a70be3045b27a74605f6f7d93fcfa75564593 + call-bind: "npm:^1.0.2" + for-each: "npm:^0.3.3" + is-typed-array: "npm:^1.1.9" + checksum: 10/0444658acc110b233176cb0b7689dcb828b0cfa099ab1d377da430e8553b6fdcdce882360b7ffe9ae085b6330e1d39383d7b2c61574d6cd8eef651d3e4a87822 languageName: node linkType: hard -"web3-eth-ens@npm:1.7.3": - version: 1.7.3 - resolution: "web3-eth-ens@npm:1.7.3" +"typed-array-length@npm:^1.0.5": + version: 1.0.5 + resolution: "typed-array-length@npm:1.0.5" dependencies: - content-hash: "npm:^2.5.2" - eth-ens-namehash: "npm:2.0.8" - web3-core: "npm:1.7.3" - web3-core-helpers: "npm:1.7.3" - web3-core-promievent: "npm:1.7.3" - web3-eth-abi: "npm:1.7.3" - web3-eth-contract: "npm:1.7.3" - web3-utils: "npm:1.7.3" - checksum: 10/75889113ef4fd0ea16dd7451ebecc025d75fbdba7bbc4ed20f048013115364d2af26933ae00f508adab7ddbf2dfa288d4528c63cb24a690e7b8284e3d9d2da9f + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-proto: "npm:^1.0.3" + is-typed-array: "npm:^1.1.13" + possible-typed-array-names: "npm:^1.0.0" + checksum: 10/f9a0da99c41880b44e2c5e5d0d01515c2a6e0f54b10c594151804f013272d837df3b67ea84d7304ecfbab2c10d99c3372168bf3a4bd295abf13ac5a72f93054a languageName: node linkType: hard -"web3-eth-ens@npm:1.8.1": - version: 1.8.1 - resolution: "web3-eth-ens@npm:1.8.1" +"typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" dependencies: - content-hash: "npm:^2.5.2" - eth-ens-namehash: "npm:2.0.8" - web3-core: "npm:1.8.1" - web3-core-helpers: "npm:1.8.1" - web3-core-promievent: "npm:1.8.1" - web3-eth-abi: "npm:1.8.1" - web3-eth-contract: "npm:1.8.1" - web3-utils: "npm:1.8.1" - checksum: 10/7968da6291a4631814310c1f09eac71b501b6dcfe00fe724d51e8ac7e5a5379b895d40f2737441a19467ca0830a47387523121d69f1f030f8bd0ee3e00b898a9 + is-typedarray: "npm:^1.0.0" + checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c languageName: node linkType: hard -"web3-eth-ens@npm:^4.0.3, web3-eth-ens@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-eth-ens@npm:4.0.5" - dependencies: - "@adraffy/ens-normalize": "npm:^1.8.8" - web3-core: "npm:^4.1.1" - web3-errors: "npm:^1.1.1" - web3-eth: "npm:^4.1.1" - web3-eth-contract: "npm:^4.0.5" - web3-net: "npm:^4.0.5" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/5d47d5f0388e4f4930f1f82a1d249e770cbbe9f8b2d52621afebd904902bdc603f1e6876bec9bd57f6fd121a42fe90804eaf02270b551f9a986b0c3874e697be +"typescript-optional@npm:2.0.1": + version: 2.0.1 + resolution: "typescript-optional@npm:2.0.1" + checksum: 10/31a80124de980476da4748039fbc2e4ff9fa85e7ed712952c78bf2bebb107124c16f60e0a16cc067b325da8eabe5a5930618cad9c269b8356745606392da850f languageName: node linkType: hard -"web3-eth-ens@npm:^4.0.8": - version: 4.0.8 - resolution: "web3-eth-ens@npm:4.0.8" - dependencies: - "@adraffy/ens-normalize": "npm:^1.8.8" - web3-core: "npm:^4.3.0" - web3-errors: "npm:^1.1.3" - web3-eth: "npm:^4.3.1" - web3-eth-contract: "npm:^4.1.2" - web3-net: "npm:^4.0.7" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/592762e556bc161c0fd7859c8d5f4785f9269f8a62e49aceca5f6d490856ffa8d94130b52907f19199ae0ca758aac3e81531b8847ca57e6abe39ce89ef8a1069 +"typescript@npm:4.5.2": + version: 4.5.2 + resolution: "typescript@npm:4.5.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/477935930ae75e2b5b06c283175ed1a899c2330d9c4422047821c5592ccb6e72a620285279b738f69ff3234d17368cce07cae91c5890b6d42134275eb643b59a languageName: node linkType: hard -"web3-eth-iban@npm:1.10.0": - version: 1.10.0 - resolution: "web3-eth-iban@npm:1.10.0" - dependencies: - bn.js: "npm:^5.2.1" - web3-utils: "npm:1.10.0" - checksum: 10/02e0a1b071b7cda1c03d2940d93f585724b8348d5d65a949f174f8bd48aeff8d6cfc700123150bf39265122667c46e2542e671c54e4bacd53f9895d31109a4c7 +"typescript@npm:5.5.2": + version: 5.5.2 + resolution: "typescript@npm:5.5.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/9118b20f248e76b0dbff8737fef65dfa89d02668d4e633d2c5ceac99033a0ca5e8a1c1a53bc94da68e8f67677a88f318663dde859c9e9a09c1e116415daec2ba languageName: node linkType: hard -"web3-eth-iban@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-iban@npm:1.10.1" - dependencies: - bn.js: "npm:^5.2.1" - web3-utils: "npm:1.10.1" - checksum: 10/c3e3c9c551a812cbdb2c88d016902d22b029c821294f4499a5e5147d3b45727076069c6beb5d76dbe83b2b0187f236458ce17502855a419e12eaf8c1e3c6d1c7 +"typescript@npm:^4.6.4 || ^5.0.0": + version: 5.2.2 + resolution: "typescript@npm:5.2.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/d65e50eb849bd21ff8677e5b9447f9c6e74777e346afd67754934264dcbf4bd59e7d2473f6062d9a015d66bd573311166357e3eb07fea0b52859cf9bb2b58555 + languageName: node + linkType: hard + +"typescript@npm:^5.0.4, typescript@npm:^5.4.4": + version: 5.5.3 + resolution: "typescript@npm:5.5.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/11a867312419ed497929aafd2f1d28b2cd41810a5eb6c6e9e169559112e9ea073d681c121a29102e67cd4478d0a4ae37a306a5800f3717f59c4337e6a9bd5e8d + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A4.5.2#optional!builtin": + version: 4.5.2 + resolution: "typescript@patch:typescript@npm%3A4.5.2#optional!builtin::version=4.5.2&hash=f1b8ea" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/7f1707766d9835f54358774b40ce67aaef9619597732d8633274d21e24e714b14e06ea30997181eb4c14a815898c35915bd22448546440a2daa602e027f36018 languageName: node linkType: hard -"web3-eth-iban@npm:1.6.1": - version: 1.6.1 - resolution: "web3-eth-iban@npm:1.6.1" - dependencies: - bn.js: "npm:^4.11.9" - web3-utils: "npm:1.6.1" - checksum: 10/36e9b82cfd2d62f06543abd161b81972ece3cd0007b98f550e24c11eee9043e0b0d242ab0858907978892dafb3cc931fabf6d61547440f4eb2ad44184acd303f +"typescript@patch:typescript@npm%3A5.5.2#optional!builtin": + version: 5.5.2 + resolution: "typescript@patch:typescript@npm%3A5.5.2#optional!builtin::version=5.5.2&hash=379a07" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/ac3145f65cf9e72ab29f2196e05d5816b355dc1a9195b9f010d285182a12457cfacd068be2dd22c877f88ebc966ac6e0e83f51c8586412b16499a27e3670ff4b languageName: node linkType: hard -"web3-eth-iban@npm:1.7.3": - version: 1.7.3 - resolution: "web3-eth-iban@npm:1.7.3" - dependencies: - bn.js: "npm:^4.11.9" - web3-utils: "npm:1.7.3" - checksum: 10/d13c47c0b85b050c7b83f8ec64a9c536b20519851ba8864b18495e25b97d867ac1f4f0b2822f607040734c6a2d70266bd1969d7ad86b5e9375d5bff9861e1b18 +"typescript@patch:typescript@npm%3A^4.6.4 || ^5.0.0#optional!builtin": + version: 5.2.2 + resolution: "typescript@patch:typescript@npm%3A5.2.2#optional!builtin::version=5.2.2&hash=f3b441" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/f79cc2ba802c94c2b78dbb00d767a10adb67368ae764709737dc277273ec148aa4558033a03ce901406b35fddf4eac46dabc94a1e1d12d2587e2b9cfe5707b4a languageName: node linkType: hard -"web3-eth-iban@npm:1.8.1": - version: 1.8.1 - resolution: "web3-eth-iban@npm:1.8.1" - dependencies: - bn.js: "npm:^5.2.1" - web3-utils: "npm:1.8.1" - checksum: 10/b9f3bdd3eba5b830c117805790bdfcac6241f4b2064768bf3adbcf1eb5daab50011499fb3fcfaf55614cc17db5b40e81576bc47151d27299a9d6c33d145149ba +"typescript@patch:typescript@npm%3A^5.0.4#optional!builtin, typescript@patch:typescript@npm%3A^5.4.4#optional!builtin": + version: 5.5.3 + resolution: "typescript@patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/7cf7acb78a80f749b82842f2ffe01e90e7b3e709a6f4268588e0b7599c41dca1059be217f47778fe1a380bfaf60933021ef20d002c426d4d7745e1b36c11467b languageName: node linkType: hard -"web3-eth-iban@npm:^4.0.3, web3-eth-iban@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-eth-iban@npm:4.0.5" - dependencies: - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/76861f57a117c13e89c220555f1a98139098e8c9438c58bba1dd3b2bd2bc652212f50007c05c75b36dd382f41fdef9c4d5eaa0bee1df4f115ff0c22a0ba67dc2 +"uglify-js@npm:^3.1.4": + version: 3.15.1 + resolution: "uglify-js@npm:3.15.1" + bin: + uglifyjs: bin/uglifyjs + checksum: 10/32c2ea5d66b74c6c2b8000c1cf472b50985d5ec85d9e93fc771b8d3c961eac45a59c7549d3b4a0b6a4e39e7282928d00aeec46d01081172ccb62f02987d99213 languageName: node linkType: hard -"web3-eth-iban@npm:^4.0.7": - version: 4.0.7 - resolution: "web3-eth-iban@npm:4.0.7" +"uid@npm:2.0.1": + version: 2.0.1 + resolution: "uid@npm:2.0.1" dependencies: - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/9d7521b4d4aef3a0d697905c7859d8e4d7ce82234320beecba9b24d254592a7ccf0354f329289b4e11a816fcbe3eceb842c4c87678f5e8ec622c8351bc1b9170 + "@lukeed/csprng": "npm:^1.0.0" + checksum: 10/47857c7409ffa56f89baa44fce8f81a4f5668128e755d44709e42b13b8b7f632eac308388c3c0f2114e090470f31dd1f45586fe63ca7b37ab2273196b66c2421 languageName: node linkType: hard -"web3-eth-personal@npm:1.10.0": - version: 1.10.0 - resolution: "web3-eth-personal@npm:1.10.0" +"unbox-primitive@npm:^1.0.1": + version: 1.0.1 + resolution: "unbox-primitive@npm:1.0.1" dependencies: - "@types/node": "npm:^12.12.6" - web3-core: "npm:1.10.0" - web3-core-helpers: "npm:1.10.0" - web3-core-method: "npm:1.10.0" - web3-net: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/abf9f2fbc4f7723be01f778a60511eb3303172f60f66f7d9cf0ce5bca6f0278ec27e3094bb2ef043f2f4025e44ccd44dba793b3e26294dfb2f38cfee27888daa + function-bind: "npm:^1.1.1" + has-bigints: "npm:^1.0.1" + has-symbols: "npm:^1.0.2" + which-boxed-primitive: "npm:^1.0.2" + checksum: 10/16aacdfc555545a89ddc678f136029ead18215f6843b9b707ab383cdc2f739efc34470b6b79c36ce7d376432f75b65b4ecb437d20f97196ba9d4683db0425ea3 languageName: node linkType: hard -"web3-eth-personal@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-personal@npm:1.10.1" +"unbox-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "unbox-primitive@npm:1.0.2" dependencies: - "@types/node": "npm:^12.12.6" - web3-core: "npm:1.10.1" - web3-core-helpers: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-net: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/bd3733f32592890e15f3a2e3c866b7c9cabd71c0cc1c992f0a4c325c06f69f6db63c7d03ffeb786e06e47b1a0378b18963cbb298069cde23ebaf37c04be10d88 + call-bind: "npm:^1.0.2" + has-bigints: "npm:^1.0.2" + has-symbols: "npm:^1.0.3" + which-boxed-primitive: "npm:^1.0.2" + checksum: 10/06e1ee41c1095e37281cb71a975cb3350f7cb470a0665d2576f02cc9564f623bd90cfc0183693b8a7fdf2d242963dcc3010b509fa3ac683f540c765c0f3e7e43 languageName: node linkType: hard -"web3-eth-personal@npm:1.6.1": - version: 1.6.1 - resolution: "web3-eth-personal@npm:1.6.1" - dependencies: - "@types/node": "npm:^12.12.6" - web3-core: "npm:1.6.1" - web3-core-helpers: "npm:1.6.1" - web3-core-method: "npm:1.6.1" - web3-net: "npm:1.6.1" - web3-utils: "npm:1.6.1" - checksum: 10/c9423127bdb47465a24b89b829f21696724196effcf849c6abe453324ac2435073111e6bbd4f7eb8de15431f234162f2bc12c2add05ede103dc8a1dcae9a0f05 +"undefsafe@npm:^2.0.5": + version: 2.0.5 + resolution: "undefsafe@npm:2.0.5" + checksum: 10/f42ab3b5770fedd4ada175fc1b2eb775b78f609156f7c389106aafd231bfc210813ee49f54483d7191d7b76e483bc7f537b5d92d19ded27156baf57592eb02cc languageName: node linkType: hard -"web3-eth-personal@npm:1.7.3": - version: 1.7.3 - resolution: "web3-eth-personal@npm:1.7.3" - dependencies: - "@types/node": "npm:^12.12.6" - web3-core: "npm:1.7.3" - web3-core-helpers: "npm:1.7.3" - web3-core-method: "npm:1.7.3" - web3-net: "npm:1.7.3" - web3-utils: "npm:1.7.3" - checksum: 10/f81d874768b43644e3171997ad98c21911af058876bc13d4044cebc7010006f6135ab6c36fa3a5b7af0a5885c30444ac8b7cd156f9198d6e2069dcb06af600e6 +"undici-types@npm:~6.19.8": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: 10/cf0b48ed4fc99baf56584afa91aaffa5010c268b8842f62e02f752df209e3dea138b372a60a963b3b2576ed932f32329ce7ddb9cb5f27a6c83040d8cd74b7a70 languageName: node linkType: hard -"web3-eth-personal@npm:1.8.1": - version: 1.8.1 - resolution: "web3-eth-personal@npm:1.8.1" +"unicode-length@npm:^2.0.2": + version: 2.0.2 + resolution: "unicode-length@npm:2.0.2" dependencies: - "@types/node": "npm:^12.12.6" - web3-core: "npm:1.8.1" - web3-core-helpers: "npm:1.8.1" - web3-core-method: "npm:1.8.1" - web3-net: "npm:1.8.1" - web3-utils: "npm:1.8.1" - checksum: 10/6de1d90151f567e2e283542e01f794f5d0f28e8cc8f4777d86c0341ed29f6505f0a5ee63790e8c5c3a56c0b331f4d01a8c9992a382b1e53cedf6032504087aa1 + punycode: "npm:^2.0.0" + strip-ansi: "npm:^3.0.1" + checksum: 10/767ef3f4752f4db80a904bd7229d96d9bb697f45a9646b2cf06322ed8e3d0c17f32b6a46b44258aa9eeb7d0b217faf92c4d9d945c6ed8f708d0406358a1a3e1c languageName: node linkType: hard -"web3-eth-personal@npm:^4.0.3, web3-eth-personal@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-eth-personal@npm:4.0.5" - dependencies: - web3-core: "npm:^4.1.1" - web3-eth: "npm:^4.1.1" - web3-rpc-methods: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/a8acc4a8a20284a3b7741ff785fb751db5c7484148638b91ec7196854ab799a502a119815b4c808380d0b716b2ed0c5b0ed1d4b55407b1d845e4e8feba8958ac +"unicorn-magic@npm:^0.1.0": + version: 0.1.0 + resolution: "unicorn-magic@npm:0.1.0" + checksum: 10/9b4d0e9809807823dc91d0920a4a4c0cff2de3ebc54ee87ac1ee9bc75eafd609b09d1f14495e0173aef26e01118706196b6ab06a75fe0841028b3983a8af313f languageName: node linkType: hard -"web3-eth-personal@npm:^4.0.8": - version: 4.0.8 - resolution: "web3-eth-personal@npm:4.0.8" +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" dependencies: - web3-core: "npm:^4.3.0" - web3-eth: "npm:^4.3.1" - web3-rpc-methods: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/6e9ab6298a3469e37bcf8930136673b3eff3ac95a763b5b924cda0861326508a12902c9b53d443057ea9c64b12b0b1ed9b66f3a0031b74746605010880d0fc7c + unique-slug: "npm:^4.0.0" + checksum: 10/8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df languageName: node linkType: hard -"web3-eth@npm:1.10.0": - version: 1.10.0 - resolution: "web3-eth@npm:1.10.0" +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" dependencies: - web3-core: "npm:1.10.0" - web3-core-helpers: "npm:1.10.0" - web3-core-method: "npm:1.10.0" - web3-core-subscriptions: "npm:1.10.0" - web3-eth-abi: "npm:1.10.0" - web3-eth-accounts: "npm:1.10.0" - web3-eth-contract: "npm:1.10.0" - web3-eth-ens: "npm:1.10.0" - web3-eth-iban: "npm:1.10.0" - web3-eth-personal: "npm:1.10.0" - web3-net: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/9e254707af47ea9d701b9decd0576c76c6f27b5122da3a1570e6674b9ba4a9a5ad9f52562c03b312a24c73d0478f6de548823ce24e8013293d3d3a7f7a88596a + imurmurhash: "npm:^0.1.4" + checksum: 10/40912a8963fc02fb8b600cf50197df4a275c602c60de4cac4f75879d3c48558cfac48de08a25cc10df8112161f7180b3bbb4d662aadb711568602f9eddee54f0 languageName: node linkType: hard -"web3-eth@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth@npm:1.10.1" +"unique-string@npm:^2.0.0": + version: 2.0.0 + resolution: "unique-string@npm:2.0.0" dependencies: - web3-core: "npm:1.10.1" - web3-core-helpers: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-core-subscriptions: "npm:1.10.1" - web3-eth-abi: "npm:1.10.1" - web3-eth-accounts: "npm:1.10.1" - web3-eth-contract: "npm:1.10.1" - web3-eth-ens: "npm:1.10.1" - web3-eth-iban: "npm:1.10.1" - web3-eth-personal: "npm:1.10.1" - web3-net: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/4ad39270953a41c025d869c3f3f8b48b1b5694c29cd4e892c2bda181e8322977ce8b17ecaa387bc9eab107cf2a1465c57354cf7508e5714233caaed1611f3ddd + crypto-random-string: "npm:^2.0.0" + checksum: 10/107cae65b0b618296c2c663b8e52e4d1df129e9af04ab38d53b4f2189e96da93f599c85f4589b7ffaf1a11c9327cbb8a34f04c71b8d4950d3e385c2da2a93828 languageName: node linkType: hard -"web3-eth@npm:1.6.1": - version: 1.6.1 - resolution: "web3-eth@npm:1.6.1" - dependencies: - web3-core: "npm:1.6.1" - web3-core-helpers: "npm:1.6.1" - web3-core-method: "npm:1.6.1" - web3-core-subscriptions: "npm:1.6.1" - web3-eth-abi: "npm:1.6.1" - web3-eth-accounts: "npm:1.6.1" - web3-eth-contract: "npm:1.6.1" - web3-eth-ens: "npm:1.6.1" - web3-eth-iban: "npm:1.6.1" - web3-eth-personal: "npm:1.6.1" - web3-net: "npm:1.6.1" - web3-utils: "npm:1.6.1" - checksum: 10/44a4baa66009d6efbfc05304aac075090a1ebccf112ee54feacf825b513f83e65dafde4bb84fd0819ed65ee3ce9b2cbee23d24910f4150bb21cfc8568925194c +"universal-user-agent@npm:^7.0.0, universal-user-agent@npm:^7.0.2": + version: 7.0.2 + resolution: "universal-user-agent@npm:7.0.2" + checksum: 10/3f02cb6de0bb9fbaf379566bd0320d8e46af6e4358a2e88fce7e70687ed7b48b37f479d728bb22f4204a518e363f3038ac4841c033af1ee2253f6428a6c67e53 languageName: node linkType: hard -"web3-eth@npm:1.7.3": - version: 1.7.3 - resolution: "web3-eth@npm:1.7.3" - dependencies: - web3-core: "npm:1.7.3" - web3-core-helpers: "npm:1.7.3" - web3-core-method: "npm:1.7.3" - web3-core-subscriptions: "npm:1.7.3" - web3-eth-abi: "npm:1.7.3" - web3-eth-accounts: "npm:1.7.3" - web3-eth-contract: "npm:1.7.3" - web3-eth-ens: "npm:1.7.3" - web3-eth-iban: "npm:1.7.3" - web3-eth-personal: "npm:1.7.3" - web3-net: "npm:1.7.3" - web3-utils: "npm:1.7.3" - checksum: 10/ead719514265df925e0bb981b7613dc229fbb6939076c1f3c78f598da7f76765926083380c5bbcd94c347f53710e1fd34c1942a0b9bbc69682c10eeea8b375ff - languageName: node - linkType: hard - -"web3-eth@npm:1.8.1": - version: 1.8.1 - resolution: "web3-eth@npm:1.8.1" - dependencies: - web3-core: "npm:1.8.1" - web3-core-helpers: "npm:1.8.1" - web3-core-method: "npm:1.8.1" - web3-core-subscriptions: "npm:1.8.1" - web3-eth-abi: "npm:1.8.1" - web3-eth-accounts: "npm:1.8.1" - web3-eth-contract: "npm:1.8.1" - web3-eth-ens: "npm:1.8.1" - web3-eth-iban: "npm:1.8.1" - web3-eth-personal: "npm:1.8.1" - web3-net: "npm:1.8.1" - web3-utils: "npm:1.8.1" - checksum: 10/e35e484718621f8587c18be305f5408db0819e5b1398ed45125eb7cc4881954bfd23e0d42f2dd7fbba73c4bc8e00ccf0a0bd14554d888ecedfd2912500f7f26d - languageName: node - linkType: hard - -"web3-eth@npm:4.1.1, web3-eth@npm:^4.0.3, web3-eth@npm:^4.1.1": - version: 4.1.1 - resolution: "web3-eth@npm:4.1.1" - dependencies: - setimmediate: "npm:^1.0.5" - web3-core: "npm:^4.1.1" - web3-errors: "npm:^1.1.1" - web3-eth-abi: "npm:^4.1.1" - web3-eth-accounts: "npm:^4.0.5" - web3-net: "npm:^4.0.5" - web3-providers-ws: "npm:^4.0.5" - web3-rpc-methods: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/c55983a1e34ade62b7d4e985eb6bf198a1c7806c692519442053577d5c7a70feeff31bc9076aa1f2ea8137c31f597e6ca8484f4cfe5f290672a422b98cc27fef +"universalify@npm:^2.0.0": + version: 2.0.0 + resolution: "universalify@npm:2.0.0" + checksum: 10/2406a4edf4a8830aa6813278bab1f953a8e40f2f63a37873ffa9a3bc8f9745d06cc8e88f3572cb899b7e509013f7f6fcc3e37e8a6d914167a5381d8440518c44 languageName: node linkType: hard -"web3-eth@npm:4.4.0, web3-eth@npm:^4.4.0": - version: 4.4.0 - resolution: "web3-eth@npm:4.4.0" - dependencies: - setimmediate: "npm:^1.0.5" - web3-core: "npm:^4.3.2" - web3-errors: "npm:^1.1.4" - web3-eth-abi: "npm:^4.2.0" - web3-eth-accounts: "npm:^4.1.1" - web3-net: "npm:^4.0.7" - web3-providers-ws: "npm:^4.0.7" - web3-rpc-methods: "npm:^1.1.4" - web3-types: "npm:^1.3.1" - web3-utils: "npm:^4.1.1" - web3-validator: "npm:^2.0.4" - checksum: 10/1a2708d0ae5158b8acb2a605b7c987a5658ff69e378a373d08c69ef0a43faad8ae4eee1b09b83840259358f6f61511a576ee7079aac309e59260f65574244737 +"upath@npm:^2.0.1": + version: 2.0.1 + resolution: "upath@npm:2.0.1" + checksum: 10/7b98a83559a295d59f87f7a8d615c7549d19e4aec4dd9d52be2bf1ba93e1d6ee7d8f2188cdecbf303a22cea3768abff4268b960350152a0264125f577d9ed79e languageName: node linkType: hard -"web3-eth@npm:^4.3.1": - version: 4.3.1 - resolution: "web3-eth@npm:4.3.1" +"update-browserslist-db@npm:^1.0.11": + version: 1.0.11 + resolution: "update-browserslist-db@npm:1.0.11" dependencies: - setimmediate: "npm:^1.0.5" - web3-core: "npm:^4.3.0" - web3-errors: "npm:^1.1.3" - web3-eth-abi: "npm:^4.1.4" - web3-eth-accounts: "npm:^4.1.0" - web3-net: "npm:^4.0.7" - web3-providers-ws: "npm:^4.0.7" - web3-rpc-methods: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/b6f09521dd029b6576bb67f0e6e92687236e4101a99030fb72949bbf384aa32db00a9fe6404e3827ceafc1e205d1b0c57a83edd0c82cc9da78c9dc7c13b3121a + escalade: "npm:^3.1.1" + picocolors: "npm:^1.0.0" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10/cc1c7a38d15413046bea28ff3c7668a7cb6b4a53d83e8089fa960efd896deb6d1a9deffc2beb8dc0506186a352c8d19804efe5ec7eeb401037e14cf3ea5363f8 languageName: node linkType: hard -"web3-net@npm:1.10.0": - version: 1.10.0 - resolution: "web3-net@npm:1.10.0" +"update-notifier@npm:^5.1.0": + version: 5.1.0 + resolution: "update-notifier@npm:5.1.0" dependencies: - web3-core: "npm:1.10.0" - web3-core-method: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/5183d897ccf539adafa60e8372871f8d8ecf4c46a0943aeee1d5f78a54c8faddfcb2406269ab422e57ef871c29496dba1bffbe044693b559a3bcd7957af87363 + boxen: "npm:^5.0.0" + chalk: "npm:^4.1.0" + configstore: "npm:^5.0.1" + has-yarn: "npm:^2.1.0" + import-lazy: "npm:^2.1.0" + is-ci: "npm:^2.0.0" + is-installed-globally: "npm:^0.4.0" + is-npm: "npm:^5.0.0" + is-yarn-global: "npm:^0.3.0" + latest-version: "npm:^5.1.0" + pupa: "npm:^2.1.1" + semver: "npm:^7.3.4" + semver-diff: "npm:^3.1.1" + xdg-basedir: "npm:^4.0.0" + checksum: 10/9df39e2d4f2e59ea788c719baaacf3d2bdde09d065f00319d52c0af255990e15f98ba40c115fb6246b6b2d5468685f36955ae0679c0b7fec834892fe7db4cab2 languageName: node linkType: hard -"web3-net@npm:1.10.1": - version: 1.10.1 - resolution: "web3-net@npm:1.10.1" +"upper-case-first@npm:^2.0.2": + version: 2.0.2 + resolution: "upper-case-first@npm:2.0.2" dependencies: - web3-core: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/535e87452db2e8a30e08f9349c56555e59d76962de74b6ef09cd89cf89d5a70423f12db2bfcab4e4d8e411e0e198e6aa9abee3bb1c4c6d61fab7cfd76303d038 + tslib: "npm:^2.0.3" + checksum: 10/4487db4701effe3b54ced4b3e4aa4d9ab06c548f97244d04aafb642eedf96a76d5a03cf5f38f10f415531d5792d1ac6e1b50f2a76984dc6964ad530f12876409 languageName: node linkType: hard -"web3-net@npm:1.6.1": - version: 1.6.1 - resolution: "web3-net@npm:1.6.1" +"uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" dependencies: - web3-core: "npm:1.6.1" - web3-core-method: "npm:1.6.1" - web3-utils: "npm:1.6.1" - checksum: 10/531f2e997c58e35898353af3fd9f793d122254e5113dddbdcf9ba142b52b227aff5b31dedb2a86d0c05a8c3a1d0c4f3c7b64c5317ead16f5e1771481eda98a28 + punycode: "npm:^2.1.0" + checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb languageName: node linkType: hard -"web3-net@npm:1.7.3": - version: 1.7.3 - resolution: "web3-net@npm:1.7.3" +"url-parse-lax@npm:^3.0.0": + version: 3.0.0 + resolution: "url-parse-lax@npm:3.0.0" dependencies: - web3-core: "npm:1.7.3" - web3-core-method: "npm:1.7.3" - web3-utils: "npm:1.7.3" - checksum: 10/09b31ab30dc59650ee83d8752b753b18862522d372d3101acc620ed188792c46e844e363c55da06f64400e587f37f609381f353a862ef14b379decf48f36173b + prepend-http: "npm:^2.0.0" + checksum: 10/1040e357750451173132228036aff1fd04abbd43eac1fb3e4fca7495a078bcb8d33cb765fe71ad7e473d9c94d98fd67adca63bd2716c815a2da066198dd37217 languageName: node linkType: hard -"web3-net@npm:1.8.1": - version: 1.8.1 - resolution: "web3-net@npm:1.8.1" +"url@npm:^0.11.0": + version: 0.11.0 + resolution: "url@npm:0.11.0" dependencies: - web3-core: "npm:1.8.1" - web3-core-method: "npm:1.8.1" - web3-utils: "npm:1.8.1" - checksum: 10/f2c9413df4747ac3d99e68239fb7fbca2e97557c267dfba42d1501cd8b8fa77c06485022ba6c53bde08c18ef4f108533c3f299368d3287b875c5b1dc7e897683 + punycode: "npm:1.3.2" + querystring: "npm:0.2.0" + checksum: 10/beec744c7ade6ef178fd631e2fe70110c5c53f9e7caea5852703214bfcbf03fd136b98b3b6f4a08bd2420a76f569cbc10c2a86ade7f836ac7d9ff27ed62d8d2d languageName: node linkType: hard -"web3-net@npm:^4.0.3, web3-net@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-net@npm:4.0.5" - dependencies: - web3-core: "npm:^4.1.1" - web3-rpc-methods: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - checksum: 10/2677a235402f7c500c3008a01c6e64eb692aa7be7270c3911fd37e57dcde073de6c576de24aa12fc56bd07029cd49ed59703b446c68e05304db69ea2908d01c3 +"util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 10/474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 languageName: node linkType: hard -"web3-net@npm:^4.0.7": - version: 4.0.7 - resolution: "web3-net@npm:4.0.7" +"util@npm:^0.12.0, util@npm:^0.12.4": + version: 0.12.4 + resolution: "util@npm:0.12.4" dependencies: - web3-core: "npm:^4.3.0" - web3-rpc-methods: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - checksum: 10/b013fbbddfb53b872b74443ca3098ec63831f7d65455aadb73c4fc6953c38714b8c84918228229e81a2a3e4bdaf1583f745d2e4937f7f2cc2a97fa60a5f27202 + inherits: "npm:^2.0.3" + is-arguments: "npm:^1.0.4" + is-generator-function: "npm:^1.0.7" + is-typed-array: "npm:^1.1.3" + safe-buffer: "npm:^5.1.2" + which-typed-array: "npm:^1.1.2" + checksum: 10/8287e2fdff2a98997a3436663535856e6be76ca1c7b6ed167b89a3dd6fbaf6934338ca2e34a189bcd6c6cf415680d20472381ac681bff07d33ef98c6f7126296 languageName: node linkType: hard -"web3-providers-http@npm:1.10.0": - version: 1.10.0 - resolution: "web3-providers-http@npm:1.10.0" +"util@npm:^0.12.5": + version: 0.12.5 + resolution: "util@npm:0.12.5" dependencies: - abortcontroller-polyfill: "npm:^1.7.3" - cross-fetch: "npm:^3.1.4" - es6-promise: "npm:^4.2.8" - web3-core-helpers: "npm:1.10.0" - checksum: 10/4a1742056f4f3b548d5ed3bc763470d1c49b00586eeb11ed6c0ff4ce3397b6fec69259dec48b2bb5f8b64f2bf81b275e720e4a488a0d3510aab234273b537ff7 + inherits: "npm:^2.0.3" + is-arguments: "npm:^1.0.4" + is-generator-function: "npm:^1.0.7" + is-typed-array: "npm:^1.1.3" + which-typed-array: "npm:^1.1.2" + checksum: 10/61a10de7753353dd4d744c917f74cdd7d21b8b46379c1e48e1c4fd8e83f8190e6bd9978fc4e5102ab6a10ebda6019d1b36572fa4a325e175ec8b789a121f6147 languageName: node linkType: hard -"web3-providers-http@npm:1.10.1": - version: 1.10.1 - resolution: "web3-providers-http@npm:1.10.1" - dependencies: - abortcontroller-polyfill: "npm:^1.7.3" - cross-fetch: "npm:^3.1.4" - es6-promise: "npm:^4.2.8" - web3-core-helpers: "npm:1.10.1" - checksum: 10/0e64cebbe735a4bcc4574443b60311c3f85647331954ce624d9a73c6f99b47cac38609e55e349e53a336d457a4e24b98a3b920f2f1ac725ae4b6648cc2deea82 +"uuid@npm:10.0.0, uuid@npm:^10.0.0": + version: 10.0.0 + resolution: "uuid@npm:10.0.0" + bin: + uuid: dist/bin/uuid + checksum: 10/35aa60614811a201ff90f8ca5e9ecb7076a75c3821e17f0f5ff72d44e36c2d35fcbc2ceee9c4ac7317f4cc41895da30e74f3885e30313bee48fda6338f250538 languageName: node linkType: hard -"web3-providers-http@npm:1.6.1": - version: 1.6.1 - resolution: "web3-providers-http@npm:1.6.1" - dependencies: - web3-core-helpers: "npm:1.6.1" - xhr2-cookies: "npm:1.1.0" - checksum: 10/0c78b68b582a104be741010986d544045a01c4409eb2e62007beb40cf32941ab965f52fd0816ad0b7a580ae5f09c9f2973228998f237031bb71cb9ca43ec01bc +"uuid@npm:^3.3.3": + version: 3.4.0 + resolution: "uuid@npm:3.4.0" + bin: + uuid: ./bin/uuid + checksum: 10/4f2b86432b04cc7c73a0dd1bcf11f1fc18349d65d2e4e32dd0fc658909329a1e0cc9244aa93f34c0cccfdd5ae1af60a149251a5f420ec3ac4223a3dab198fb2e languageName: node linkType: hard -"web3-providers-http@npm:1.7.3": - version: 1.7.3 - resolution: "web3-providers-http@npm:1.7.3" - dependencies: - web3-core-helpers: "npm:1.7.3" - xhr2-cookies: "npm:1.1.0" - checksum: 10/4e708f0903af7dd889ff0980937be8c8a7badd5fde61f74a534cedd44feb019b3ea5f9ae02f4549fd3712f72df9e438750936d42f0e4d37c6393a9457e8ff525 +"uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 10/9a5f7aa1d6f56dd1e8d5f2478f855f25c645e64e26e347a98e98d95781d5ed20062d6cca2eecb58ba7c84bc3910be95c0451ef4161906abaab44f9cb68ffbdd1 languageName: node linkType: hard -"web3-providers-http@npm:1.8.1": - version: 1.8.1 - resolution: "web3-providers-http@npm:1.8.1" - dependencies: - abortcontroller-polyfill: "npm:^1.7.3" - cross-fetch: "npm:^3.1.4" - es6-promise: "npm:^4.2.8" - web3-core-helpers: "npm:1.8.1" - checksum: 10/db09837a69e4f7ea1d9109e582ca5e8e7e71d38080f372f9a8b903648ae61d28fbd084aad5a906af02e9b1d583391a50b12e449a0dc27456e95ff45e219ed22c +"v8-compile-cache-lib@npm:^3.0.1": + version: 3.0.1 + resolution: "v8-compile-cache-lib@npm:3.0.1" + checksum: 10/88d3423a52b6aaf1836be779cab12f7016d47ad8430dffba6edf766695e6d90ad4adaa3d8eeb512cc05924f3e246c4a4ca51e089dccf4402caa536b5e5be8961 languageName: node linkType: hard -"web3-providers-http@npm:^4.0.3, web3-providers-http@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-providers-http@npm:4.0.5" +"v8-to-istanbul@npm:^9.0.1": + version: 9.1.0 + resolution: "v8-to-istanbul@npm:9.1.0" dependencies: - cross-fetch: "npm:^3.1.5" - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - checksum: 10/758ef1041cfbaf562918c1a3cbe9617c27c70fb3d95ad2e86e77a1e6ac6ce79042e9cef7ed405a46e44cd2029333d7fdb030a19fb093b515e33cc3667d0626d4 + "@jridgewell/trace-mapping": "npm:^0.3.12" + "@types/istanbul-lib-coverage": "npm:^2.0.1" + convert-source-map: "npm:^1.6.0" + checksum: 10/95811ff2f17a31432c3fc7b3027b7e8c2c6ca5e60a7811c5050ce51920ab2b80df29feb04c52235bbfdaa9a6809acd5a5dd9668292e98c708617c19e087c3f68 languageName: node linkType: hard -"web3-providers-http@npm:^4.1.0": - version: 4.1.0 - resolution: "web3-providers-http@npm:4.1.0" +"validate-npm-package-license@npm:^3.0.1, validate-npm-package-license@npm:^3.0.4": + version: 3.0.4 + resolution: "validate-npm-package-license@npm:3.0.4" dependencies: - cross-fetch: "npm:^4.0.0" - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - checksum: 10/d98d3cedd8caadb7f6f8ab6faa74d6f42be5808e729a93d815771fb7287f9fffa9ecdc047dceaac783a329c63947f006bca758f2241dc57070aefb62cdb0f2dc + spdx-correct: "npm:^3.0.0" + spdx-expression-parse: "npm:^3.0.0" + checksum: 10/86242519b2538bb8aeb12330edebb61b4eb37fd35ef65220ab0b03a26c0592c1c8a7300d32da3cde5abd08d18d95e8dabfad684b5116336f6de9e6f207eec224 languageName: node linkType: hard -"web3-providers-ipc@npm:1.10.0": - version: 1.10.0 - resolution: "web3-providers-ipc@npm:1.10.0" +"validate-npm-package-name@npm:^5.0.0": + version: 5.0.0 + resolution: "validate-npm-package-name@npm:5.0.0" dependencies: - oboe: "npm:2.1.5" - web3-core-helpers: "npm:1.10.0" - checksum: 10/7e1f42ceb8fb945589fbb2c85464d26e49df4649fdbbec578b2fa8114484b334f8fa47a585f4ee86efc2c9a3dc3971a0ccc829e3297d00c73ba4a3c291f81963 + builtins: "npm:^5.0.0" + checksum: 10/5342a994986199b3c28e53a8452a14b2bb5085727691ea7aa0d284a6606b127c371e0925ae99b3f1ef7cc7d2c9de75f52eb61a3d1cc45e39bca1e3a9444cbb4e languageName: node linkType: hard -"web3-providers-ipc@npm:1.10.1": - version: 1.10.1 - resolution: "web3-providers-ipc@npm:1.10.1" - dependencies: - oboe: "npm:2.1.5" - web3-core-helpers: "npm:1.10.1" - checksum: 10/bb176d7460130e1781d19778f7ac058873bdf26ed9f82adcfe4c3572e5dc4df558a41bbe7f22858659cf8cb136abf8420f916890f389a5158eeb2e88b7bdd05a +"vary@npm:^1": + version: 1.1.2 + resolution: "vary@npm:1.1.2" + checksum: 10/31389debef15a480849b8331b220782230b9815a8e0dbb7b9a8369559aed2e9a7800cd904d4371ea74f4c3527db456dc8e7ac5befce5f0d289014dbdf47b2242 languageName: node linkType: hard -"web3-providers-ipc@npm:1.6.1": - version: 1.6.1 - resolution: "web3-providers-ipc@npm:1.6.1" - dependencies: - oboe: "npm:2.1.5" - web3-core-helpers: "npm:1.6.1" - checksum: 10/a6393252ce889574b88a3fc62e1e16707d32c15d34d0a1ee24c63d654d36e44f98bc558b4b47f0f7b7d7138e139d09f929faffd46c4ecaba398747dd3aa5411a +"visit-values@npm:^2.0.0": + version: 2.0.0 + resolution: "visit-values@npm:2.0.0" + checksum: 10/9422c453864c363a93421f94342ce7c53fbd3e52b7dcd1f4df63c45e2ac1a71332047f1153fbdad2d9544867fa835f4029e2dca9415ee58437513fdb64895618 languageName: node linkType: hard -"web3-providers-ipc@npm:1.7.3": - version: 1.7.3 - resolution: "web3-providers-ipc@npm:1.7.3" - dependencies: - oboe: "npm:2.1.5" - web3-core-helpers: "npm:1.7.3" - checksum: 10/0252b59fe96e2ad75eb632b947ee257c313cdaea34553c179c3496395a000cc32de226b3b6608c8374c7392657b656169e8358e6c89e17aabe266401bf728200 +"vm-browserify@npm:^1.1.2": + version: 1.1.2 + resolution: "vm-browserify@npm:1.1.2" + checksum: 10/ad5b17c9f7a9d9f1ed0e24c897782ab7a587c1fd40f370152482e1af154c7cf0b0bacc45c5ae76a44289881e083ae4ae127808fdff864aa9b562192aae8b5c3b languageName: node linkType: hard -"web3-providers-ipc@npm:1.8.1": - version: 1.8.1 - resolution: "web3-providers-ipc@npm:1.8.1" - dependencies: - oboe: "npm:2.1.5" - web3-core-helpers: "npm:1.8.1" - checksum: 10/037182ad713957d360cb512906112b2cff793cf50a511e71538f1c04b8dc5d41e69f0a21c02427f20c73ebeb56d1ff59ae5290fd651bed903e49e9bb4da4a304 +"vscode-languageserver-textdocument@npm:^1.0.11": + version: 1.0.11 + resolution: "vscode-languageserver-textdocument@npm:1.0.11" + checksum: 10/6096d2a85570e819e01ff406de7c88c48211e6874c6fc71df92193aa8b5aadf40591e44f033d634a95d04975d7aad29049d3eccab617ca41c189ae325aadb913 languageName: node linkType: hard -"web3-providers-ipc@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-providers-ipc@npm:4.0.5" - dependencies: - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - checksum: 10/74f2a610241a288eb9f5a1dd6c6073ec46db83899fbad0bad95b5a37e4a05274c59fac3ce0346ba0b8a1cd7ab0b1281785c8a8f2cd87b1a21e261c76264e0b51 +"vscode-uri@npm:^3.0.8": + version: 3.0.8 + resolution: "vscode-uri@npm:3.0.8" + checksum: 10/e882d6b679e0d053cbc042893c0951a135d899a192b62cd07f0a8924f11ae722067a8d6b1b5b147034becf57faf9fff9fb543b17b749fd0f17db1f54f783f07c languageName: node linkType: hard -"web3-providers-ipc@npm:^4.0.7": - version: 4.0.7 - resolution: "web3-providers-ipc@npm:4.0.7" - dependencies: - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - checksum: 10/b953818479f5d9c7b748e10977430fd7e377696f9160ae19b1917c0317e89671c4be824c06723b6fda190258927160fcec0e8e7c1aa87a5f0344008ef7649cda +"walk-up-path@npm:^3.0.1": + version: 3.0.1 + resolution: "walk-up-path@npm:3.0.1" + checksum: 10/9ffca02fe30fb65f6db531260582988c5e766f4c739cf86a6109380a7f791236b5d0b92b1dce37a6f73e22dca6bc9d93bf3700413e16251b2bd6bbd1ca2be316 languageName: node linkType: hard -"web3-providers-ws@npm:1.10.0": - version: 1.10.0 - resolution: "web3-providers-ws@npm:1.10.0" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.10.0" - websocket: "npm:^1.0.32" - checksum: 10/6a0f765b929592c4f45b6286002f56d65bb972c5ecffb5c911442bfd8062df400726b54cd26777a5ab43f57ac861163f55e06b1867c0b45d8a8fea2ebf25aeaa +"walkdir@npm:^0.4.1": + version: 0.4.1 + resolution: "walkdir@npm:0.4.1" + checksum: 10/54cbe7afc5fb811a55748b0bfa077a9a4aa43f568eb5857db9785af9728e1ad8b1ecf6b9ce6f14b405c6124939a92522e36aaa0397f3f52a9a7a08496f2eebe1 languageName: node linkType: hard -"web3-providers-ws@npm:1.10.1": - version: 1.10.1 - resolution: "web3-providers-ws@npm:1.10.1" +"walker@npm:^1.0.8": + version: 1.0.8 + resolution: "walker@npm:1.0.8" dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.10.1" - websocket: "npm:^1.0.32" - checksum: 10/ff5e1bc56f6ba587e12414d9cd795df749cf48729cb4bcc15fdc81e9459cc86f3f9a4f01617af87f0d19708599cff787f00bd192c9f6b454d109eca818510b19 + makeerror: "npm:1.0.12" + checksum: 10/ad7a257ea1e662e57ef2e018f97b3c02a7240ad5093c392186ce0bcf1f1a60bbadd520d073b9beb921ed99f64f065efb63dfc8eec689a80e569f93c1c5d5e16c languageName: node linkType: hard -"web3-providers-ws@npm:1.6.1": - version: 1.6.1 - resolution: "web3-providers-ws@npm:1.6.1" +"watchpack@npm:^2.4.1": + version: 2.4.2 + resolution: "watchpack@npm:2.4.2" dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.6.1" - websocket: "npm:^1.0.32" - checksum: 10/0b59d18eaced103e1d682b6201ad115bd75415a7fd1758d66d553be9aa32c3e4a9456e0707165f6be124b641c7d1f7c88f476fbfbeea32f6eca02ce790fa4a8b + glob-to-regexp: "npm:^0.4.1" + graceful-fs: "npm:^4.1.2" + checksum: 10/6bd4c051d9af189a6c781c3158dcb3069f432a0c144159eeb0a44117412105c61b2b683a5c9eebc4324625e0e9b76536387d0ba354594fa6cbbdf1ef60bee4c3 languageName: node linkType: hard -"web3-providers-ws@npm:1.7.3": - version: 1.7.3 - resolution: "web3-providers-ws@npm:1.7.3" +"wcwidth@npm:>=1.0.1, wcwidth@npm:^1.0.0, wcwidth@npm:^1.0.1": + version: 1.0.1 + resolution: "wcwidth@npm:1.0.1" dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.7.3" - websocket: "npm:^1.0.32" - checksum: 10/01f39dfc5a21d29df4587304c7fcac3ebaddec297f5bb1937c5398cc7413275ce9d673c5db9d9d50efb826b1e4557b2bc03272cb32ab3dc5ea6d6ac229893879 + defaults: "npm:^1.0.3" + checksum: 10/182ebac8ca0b96845fae6ef44afd4619df6987fe5cf552fdee8396d3daa1fb9b8ec5c6c69855acb7b3c1231571393bd1f0a4cdc4028d421575348f64bb0a8817 languageName: node linkType: hard -"web3-providers-ws@npm:1.8.1": - version: 1.8.1 - resolution: "web3-providers-ws@npm:1.8.1" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.8.1" - websocket: "npm:^1.0.32" - checksum: 10/3d21384ec1fb9396711046ab4850a05c01718244f03e5d475157a77b26bbb5b02f748638a151db42d146798c8c818e952f55f67de6d824b49a5688a6a429b932 +"web-streams-polyfill@npm:^3.0.3": + version: 3.2.1 + resolution: "web-streams-polyfill@npm:3.2.1" + checksum: 10/08fcf97b7883c1511dd3da794f50e9bde75a660884783baaddb2163643c21a94086f394dc4bd20dff0f55c98d98d60c4bea05a5809ef5005bdf835b63ada8900 languageName: node linkType: hard -"web3-providers-ws@npm:^4.0.3, web3-providers-ws@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-providers-ws@npm:4.0.5" +"web3-core@npm:4.1.1, web3-core@npm:^4.1.1": + version: 4.1.1 + resolution: "web3-core@npm:4.1.1" dependencies: - "@types/ws": "npm:8.5.3" - isomorphic-ws: "npm:^5.0.0" web3-errors: "npm:^1.1.1" + web3-eth-iban: "npm:^4.0.5" + web3-providers-http: "npm:^4.0.5" + web3-providers-ipc: "npm:^4.0.5" + web3-providers-ws: "npm:^4.0.5" web3-types: "npm:^1.1.1" web3-utils: "npm:^4.0.5" - ws: "npm:^8.8.1" - checksum: 10/6723f8045ba7f76c62e46a6140c30af537a97b0c651711974155b008fc80a4acc7ca8a9e6c89df7489958f8d25577ac077d976fcc26ab3f6f73f243784712502 - languageName: node - linkType: hard - -"web3-providers-ws@npm:^4.0.7": - version: 4.0.7 - resolution: "web3-providers-ws@npm:4.0.7" - dependencies: - "@types/ws": "npm:8.5.3" - isomorphic-ws: "npm:^5.0.0" - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - ws: "npm:^8.8.1" - checksum: 10/ceb2da6a1534bd2f6d60533777b0b1e35de9947d07a856be64499aedbe3ba48f744ab6196dcaf60f252e2a1a7939680dcc15db656f10afe39a17282a89f9d575 + web3-validator: "npm:^2.0.1" + dependenciesMeta: + web3-providers-ipc: + optional: true + checksum: 10/779ef2b384ed2f1b2ca856131542e2b78e01f2c2200fbdc96becc7315a2cdf0882bfcfd8c53f204debaffa0de7462b7df41f56b60299c0999bdab884469ae2d9 languageName: node linkType: hard -"web3-rpc-methods@npm:^1.0.2, web3-rpc-methods@npm:^1.1.1": +"web3-errors@npm:^1.1.1": version: 1.1.1 - resolution: "web3-rpc-methods@npm:1.1.1" + resolution: "web3-errors@npm:1.1.1" dependencies: - web3-core: "npm:^4.1.1" web3-types: "npm:^1.1.1" - web3-validator: "npm:^2.0.1" - checksum: 10/694a1a4b97902b9d9129f14d58dacb5138ec94d57c27f76a6f39afa515d84badf71746aa58471858e643bbb70fb40c060ea3a3763e9d76e18324983b7d6623ea + checksum: 10/0f565b44a459d33899d623faac1f49d14f9cbdd9e626ef11c3def21bdbfeb651de903fe1119eae585f27064570a1de4881b1f4f5e9267b492de88788c1c3b09b languageName: node linkType: hard -"web3-rpc-methods@npm:^1.1.3": - version: 1.1.3 - resolution: "web3-rpc-methods@npm:1.1.3" +"web3-errors@npm:^1.2.0": + version: 1.2.0 + resolution: "web3-errors@npm:1.2.0" dependencies: - web3-core: "npm:^4.3.0" - web3-types: "npm:^1.3.0" - web3-validator: "npm:^2.0.3" - checksum: 10/c5f946b6c3253bb692c962aaf142f37d365b80b39311386b8629ead8fa42dade6c219800673344f96c741fafcdecbbd03dfcb23b896c11f6b756ff1d0410a8fb + web3-types: "npm:^1.6.0" + checksum: 10/99d0ecc4368c2969cc799ed4ef1b35f233dc3e7e0ccde713bcc850be4e75725ce175127342512504057ca48186266d6a053f129634f20ae23c405855a766d13d languageName: node linkType: hard -"web3-rpc-methods@npm:^1.1.4": - version: 1.1.4 - resolution: "web3-rpc-methods@npm:1.1.4" +"web3-eth-abi@npm:^4.1.1": + version: 4.1.1 + resolution: "web3-eth-abi@npm:4.1.1" dependencies: - web3-core: "npm:^4.3.2" - web3-types: "npm:^1.3.1" - web3-validator: "npm:^2.0.3" - checksum: 10/326e059f6f4255511e700abb2329927e3b20be6f17cc3304266fd9282a4e6eff8dc1d73dbbb9c48019b2ab412b456d0bf5b590c05e0dd5629e014500303ed06c + "@ethersproject/abi": "npm:^5.7.0" + "@ethersproject/bignumber": "npm:^5.7.0" + web3-errors: "npm:^1.1.1" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + checksum: 10/0764149e73ca3eae0c525ba813529aa6e452050eaad72880da26ea83f66b47a5f95ead75ba1048aeb621b4398bfa5703fcac1192f6c38ae7e7028a5e6da53f89 languageName: node linkType: hard -"web3-shh@npm:1.10.0": - version: 1.10.0 - resolution: "web3-shh@npm:1.10.0" +"web3-eth-accounts@npm:^4.0.5": + version: 4.0.5 + resolution: "web3-eth-accounts@npm:4.0.5" dependencies: - web3-core: "npm:1.10.0" - web3-core-method: "npm:1.10.0" - web3-core-subscriptions: "npm:1.10.0" - web3-net: "npm:1.10.0" - checksum: 10/d51b29a2c953855b2ace74c53a18fe24399ff34533750710096d249a164725cd64a686fc90a5b1e4209c85a3824d6ec02c5d4615dd3ca66c020e8d4a18dba1bf + "@ethereumjs/rlp": "npm:^4.0.1" + crc-32: "npm:^1.2.2" + ethereum-cryptography: "npm:^2.0.0" + web3-errors: "npm:^1.1.1" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + web3-validator: "npm:^2.0.1" + checksum: 10/37e9e2d909544e3d9b8b9bf3168365cd068653b18880cb65835c9b2a3acefc885ecb18de52ead56f7a3663b33a6bb58d19e4e9fc21f2618cd9cb262a355a7dc1 languageName: node linkType: hard -"web3-shh@npm:1.10.1": - version: 1.10.1 - resolution: "web3-shh@npm:1.10.1" +"web3-eth-contract@npm:^4.0.5": + version: 4.0.5 + resolution: "web3-eth-contract@npm:4.0.5" dependencies: - web3-core: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-core-subscriptions: "npm:1.10.1" - web3-net: "npm:1.10.1" - checksum: 10/8fc943a53ace0376a8785c60e2a5623875192ec64ce0b0bae35fb164b536e9bcef41318b8ffd76df2ee2057525fa7520ba44b050dc2e9689835bc778a87dc151 + web3-core: "npm:^4.1.1" + web3-errors: "npm:^1.1.1" + web3-eth: "npm:^4.1.1" + web3-eth-abi: "npm:^4.1.1" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + web3-validator: "npm:^2.0.1" + checksum: 10/6629b627afa26ea9f083812ddeca1db869ce76dc26deaa4e503785bc5b1dc26967ce4682a2ac03a59fe54b2212442cb93f5c544552cefe3457d78248c1f4f75d languageName: node linkType: hard -"web3-shh@npm:1.6.1": - version: 1.6.1 - resolution: "web3-shh@npm:1.6.1" +"web3-eth-ens@npm:^4.0.5": + version: 4.0.5 + resolution: "web3-eth-ens@npm:4.0.5" dependencies: - web3-core: "npm:1.6.1" - web3-core-method: "npm:1.6.1" - web3-core-subscriptions: "npm:1.6.1" - web3-net: "npm:1.6.1" - checksum: 10/684bfd882bfc08d3f9f9b202747a90e5623a86ae5ca2cbf5ebc5b7e455c5a832089318cbfe524424868118d9e513a968d6be228290e8b5cfb74b35c212f1bfe3 + "@adraffy/ens-normalize": "npm:^1.8.8" + web3-core: "npm:^4.1.1" + web3-errors: "npm:^1.1.1" + web3-eth: "npm:^4.1.1" + web3-eth-contract: "npm:^4.0.5" + web3-net: "npm:^4.0.5" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + web3-validator: "npm:^2.0.1" + checksum: 10/5d47d5f0388e4f4930f1f82a1d249e770cbbe9f8b2d52621afebd904902bdc603f1e6876bec9bd57f6fd121a42fe90804eaf02270b551f9a986b0c3874e697be languageName: node linkType: hard -"web3-shh@npm:1.7.3": - version: 1.7.3 - resolution: "web3-shh@npm:1.7.3" +"web3-eth-iban@npm:^4.0.5": + version: 4.0.5 + resolution: "web3-eth-iban@npm:4.0.5" dependencies: - web3-core: "npm:1.7.3" - web3-core-method: "npm:1.7.3" - web3-core-subscriptions: "npm:1.7.3" - web3-net: "npm:1.7.3" - checksum: 10/afbc7e5b65a3bc5cdb28c2b0b6a2503ace746e1221f64b905196320c32ef4671b5f4db55f358478d873fdc366a966b6631480f41e3fb39129c54cb3242651969 + web3-errors: "npm:^1.1.1" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + web3-validator: "npm:^2.0.1" + checksum: 10/76861f57a117c13e89c220555f1a98139098e8c9438c58bba1dd3b2bd2bc652212f50007c05c75b36dd382f41fdef9c4d5eaa0bee1df4f115ff0c22a0ba67dc2 languageName: node linkType: hard -"web3-shh@npm:1.8.1": - version: 1.8.1 - resolution: "web3-shh@npm:1.8.1" +"web3-eth-personal@npm:^4.0.5": + version: 4.0.5 + resolution: "web3-eth-personal@npm:4.0.5" dependencies: - web3-core: "npm:1.8.1" - web3-core-method: "npm:1.8.1" - web3-core-subscriptions: "npm:1.8.1" - web3-net: "npm:1.8.1" - checksum: 10/fa6659b14ef7ebae17eecf08ada9f0a1e1559b690f4764c23472ec2fa3b141585e3173c6e0963868c2c4b8973ae5158db9968973e06582ed7c0048dbdc3fbac3 - languageName: node - linkType: hard - -"web3-types@npm:^1.0.2": - version: 1.0.2 - resolution: "web3-types@npm:1.0.2" - checksum: 10/a7177f234f65925b758866b5e791614c920d211ee96b76bbb9ac8fccd98754043a016d970656186e34827b21557194b28b0457e55bb94ed39ef478a29708255b - languageName: node - linkType: hard - -"web3-types@npm:^1.1.1": - version: 1.1.1 - resolution: "web3-types@npm:1.1.1" - checksum: 10/46c497edefb621734d98d303f92edda8117c8c1a35afdb89e6964dca0894fb81a0ae557a1277ec323f043ffc42b54eabe70618798364c19245ed6ac4e4841423 - languageName: node - linkType: hard - -"web3-types@npm:^1.2.0": - version: 1.2.0 - resolution: "web3-types@npm:1.2.0" - checksum: 10/f2877350e9c70fe62d5331bda434d3662b507f64236108ca179e2b184d33449e4fb94a29007689cf952733b13f382684376cf7486870ef46feb6fd259a2b9c0e - languageName: node - linkType: hard - -"web3-types@npm:^1.3.0": - version: 1.3.0 - resolution: "web3-types@npm:1.3.0" - checksum: 10/a79bc1d5ed870cdf06d09f4dee1bc9bbcfb81cdea812808216f6555cc0f9704f3d73ebaa1622d2817e929b76a5adf435fff97ff1faf8a6332dc53545aa17f764 - languageName: node - linkType: hard - -"web3-types@npm:^1.3.1": - version: 1.3.1 - resolution: "web3-types@npm:1.3.1" - checksum: 10/f4495471915e66de9dcc1a21095339707e9b0569a799f8347efac324c95fc54322c16e208a0b478a986d6ee2188dc3299898c5125d51664e46d860acd84fe2cc - languageName: node - linkType: hard - -"web3-types@npm:^1.5.0": - version: 1.5.0 - resolution: "web3-types@npm:1.5.0" - checksum: 10/e0146bb69db33303d2e20113b4ccb59696a0f47e4dffb8c49ad96b19e9712a30a881def3771bad8de1fa3ea864b0ebb661cb4907edfaeb5af81abac97ed89d6b + web3-core: "npm:^4.1.1" + web3-eth: "npm:^4.1.1" + web3-rpc-methods: "npm:^1.1.1" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + web3-validator: "npm:^2.0.1" + checksum: 10/a8acc4a8a20284a3b7741ff785fb751db5c7484148638b91ec7196854ab799a502a119815b4c808380d0b716b2ed0c5b0ed1d4b55407b1d845e4e8feba8958ac languageName: node linkType: hard -"web3-types@npm:^1.6.0": - version: 1.6.0 - resolution: "web3-types@npm:1.6.0" - checksum: 10/9eac2082080c7f73777f57d688041ed4938b0943ff0ece7113c220bd85ddd7ce1191969302bbfbe31464907639270fc54d8e5cd7a7f200262ede81516dda39f9 +"web3-eth@npm:4.1.1, web3-eth@npm:^4.1.1": + version: 4.1.1 + resolution: "web3-eth@npm:4.1.1" + dependencies: + setimmediate: "npm:^1.0.5" + web3-core: "npm:^4.1.1" + web3-errors: "npm:^1.1.1" + web3-eth-abi: "npm:^4.1.1" + web3-eth-accounts: "npm:^4.0.5" + web3-net: "npm:^4.0.5" + web3-providers-ws: "npm:^4.0.5" + web3-rpc-methods: "npm:^1.1.1" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + web3-validator: "npm:^2.0.1" + checksum: 10/c55983a1e34ade62b7d4e985eb6bf198a1c7806c692519442053577d5c7a70feeff31bc9076aa1f2ea8137c31f597e6ca8484f4cfe5f290672a422b98cc27fef languageName: node linkType: hard -"web3-utils@npm:1.10.0": - version: 1.10.0 - resolution: "web3-utils@npm:1.10.0" +"web3-net@npm:^4.0.5": + version: 4.0.5 + resolution: "web3-net@npm:4.0.5" dependencies: - bn.js: "npm:^5.2.1" - ethereum-bloom-filters: "npm:^1.0.6" - ethereumjs-util: "npm:^7.1.0" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 10/8766d5bafafe37a0c647c79ea1adf5782e90b8db71133a92e5e492d04af3be65c33562a22f5a29a303c034d1fa755d08a71bd83e3a3e236101bd0e13e75b31da + web3-core: "npm:^4.1.1" + web3-rpc-methods: "npm:^1.1.1" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + checksum: 10/2677a235402f7c500c3008a01c6e64eb692aa7be7270c3911fd37e57dcde073de6c576de24aa12fc56bd07029cd49ed59703b446c68e05304db69ea2908d01c3 languageName: node linkType: hard -"web3-utils@npm:1.10.1": - version: 1.10.1 - resolution: "web3-utils@npm:1.10.1" +"web3-providers-http@npm:^4.0.5": + version: 4.0.5 + resolution: "web3-providers-http@npm:4.0.5" dependencies: - "@ethereumjs/util": "npm:^8.1.0" - bn.js: "npm:^5.2.1" - ethereum-bloom-filters: "npm:^1.0.6" - ethereum-cryptography: "npm:^2.1.2" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 10/0a8a65cf8efe8b7dc6bae413f6508c23c44af05d124ce408335c8ed42da582171b6a9a20cc2d55d93fd609972e0d9d8c35284ec4d0ca8871a7f7ed283bb858df + cross-fetch: "npm:^3.1.5" + web3-errors: "npm:^1.1.1" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + checksum: 10/758ef1041cfbaf562918c1a3cbe9617c27c70fb3d95ad2e86e77a1e6ac6ce79042e9cef7ed405a46e44cd2029333d7fdb030a19fb093b515e33cc3667d0626d4 languageName: node linkType: hard -"web3-utils@npm:1.6.1": - version: 1.6.1 - resolution: "web3-utils@npm:1.6.1" +"web3-providers-ipc@npm:^4.0.5": + version: 4.0.5 + resolution: "web3-providers-ipc@npm:4.0.5" dependencies: - bn.js: "npm:^4.11.9" - ethereum-bloom-filters: "npm:^1.0.6" - ethereumjs-util: "npm:^7.1.0" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 10/1baa6ee1c472b67fbdd86f3dd9e5ac73ae0b9d5d698ae44268021be6f28c3eceb543312730922f6404613e3eabddb829c8eb81aa6f551a7a86171412632753d3 + web3-errors: "npm:^1.1.1" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + checksum: 10/74f2a610241a288eb9f5a1dd6c6073ec46db83899fbad0bad95b5a37e4a05274c59fac3ce0346ba0b8a1cd7ab0b1281785c8a8f2cd87b1a21e261c76264e0b51 languageName: node linkType: hard -"web3-utils@npm:1.7.3": - version: 1.7.3 - resolution: "web3-utils@npm:1.7.3" +"web3-providers-ws@npm:^4.0.5": + version: 4.0.5 + resolution: "web3-providers-ws@npm:4.0.5" dependencies: - bn.js: "npm:^4.11.9" - ethereum-bloom-filters: "npm:^1.0.6" - ethereumjs-util: "npm:^7.1.0" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 10/098f3c0dfc85926a5916d9be39d795a5b37840e4411ba829e78806eac836adb35237a22d39ba43cb63428c278baf23a7782048fa6e524726eaf31b722b21c310 + "@types/ws": "npm:8.5.3" + isomorphic-ws: "npm:^5.0.0" + web3-errors: "npm:^1.1.1" + web3-types: "npm:^1.1.1" + web3-utils: "npm:^4.0.5" + ws: "npm:^8.8.1" + checksum: 10/6723f8045ba7f76c62e46a6140c30af537a97b0c651711974155b008fc80a4acc7ca8a9e6c89df7489958f8d25577ac077d976fcc26ab3f6f73f243784712502 languageName: node linkType: hard -"web3-utils@npm:1.8.1": - version: 1.8.1 - resolution: "web3-utils@npm:1.8.1" +"web3-rpc-methods@npm:^1.1.1": + version: 1.1.1 + resolution: "web3-rpc-methods@npm:1.1.1" dependencies: - bn.js: "npm:^5.2.1" - ethereum-bloom-filters: "npm:^1.0.6" - ethereumjs-util: "npm:^7.1.0" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 10/56b9d1ab2494ee632ca8f10ab1c9ede701b8f3fca5231b0de02a08b1aba414d24b7bca1468454c7d661b19d0c7bb06341c09b186191e2db5736005193cfe884b + web3-core: "npm:^4.1.1" + web3-types: "npm:^1.1.1" + web3-validator: "npm:^2.0.1" + checksum: 10/694a1a4b97902b9d9129f14d58dacb5138ec94d57c27f76a6f39afa515d84badf71746aa58471858e643bbb70fb40c060ea3a3763e9d76e18324983b7d6623ea languageName: node linkType: hard -"web3-utils@npm:4.2.1": - version: 4.2.1 - resolution: "web3-utils@npm:4.2.1" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - eventemitter3: "npm:^5.0.1" - web3-errors: "npm:^1.1.4" - web3-types: "npm:^1.5.0" - web3-validator: "npm:^2.0.4" - checksum: 10/1b9ab1d4f5b1cfb820ad9b72d6362ed553b19a94555cf52a25064079c8b00d398c6c311dcba787cde6a6ccf68ff36103eb808190451d7d6fe2d545111bac57bb +"web3-types@npm:^1.1.1": + version: 1.1.1 + resolution: "web3-types@npm:1.1.1" + checksum: 10/46c497edefb621734d98d303f92edda8117c8c1a35afdb89e6964dca0894fb81a0ae557a1277ec323f043ffc42b54eabe70618798364c19245ed6ac4e4841423 + languageName: node + linkType: hard + +"web3-types@npm:^1.6.0": + version: 1.6.0 + resolution: "web3-types@npm:1.6.0" + checksum: 10/9eac2082080c7f73777f57d688041ed4938b0943ff0ece7113c220bd85ddd7ce1191969302bbfbe31464907639270fc54d8e5cd7a7f200262ede81516dda39f9 languageName: node linkType: hard -"web3-utils@npm:4.3.0, web3-utils@npm:^4.0.3, web3-utils@npm:^4.0.5, web3-utils@npm:^4.0.7, web3-utils@npm:^4.1.0, web3-utils@npm:^4.1.1, web3-utils@npm:^4.2.3": +"web3-utils@npm:4.3.0, web3-utils@npm:^4.0.5": version: 4.3.0 resolution: "web3-utils@npm:4.3.0" dependencies: @@ -55044,48 +18859,6 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:^1.0.0-beta.31, web3-utils@npm:^1.3.4": - version: 1.10.4 - resolution: "web3-utils@npm:1.10.4" - dependencies: - "@ethereumjs/util": "npm:^8.1.0" - bn.js: "npm:^5.2.1" - ethereum-bloom-filters: "npm:^1.0.6" - ethereum-cryptography: "npm:^2.1.2" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 10/3e586b638cdae9fa45b7698e8a511ae2cbf60e219a900351ae38d384beaaf67424ac6e1d9c5098c3fb8f2ff3cc65a70d977a20bdce3dad542cb50deb666ea2a3 - languageName: node - linkType: hard - -"web3-validator@npm:2.0.2": - version: 2.0.2 - resolution: "web3-validator@npm:2.0.2" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - util: "npm:^0.12.5" - web3-errors: "npm:^1.1.2" - web3-types: "npm:^1.2.0" - zod: "npm:^3.21.4" - checksum: 10/b98c079bffb7b204d952e079cbca4b0cab075ff0fcc4f7b17a0d7a0160af27353e35473cee0fef750f9668e2a82552b7daa09558f0ef4f199c364a5f0d66e01c - languageName: node - linkType: hard - -"web3-validator@npm:^1.0.2": - version: 1.0.2 - resolution: "web3-validator@npm:1.0.2" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - is-my-json-valid: "npm:^2.20.6" - util: "npm:^0.12.5" - web3-errors: "npm:^1.0.2" - web3-types: "npm:^1.0.2" - checksum: 10/d8040735718f5f183b5bee417c93a217c5b866b977bef4ff31b79b3c0df784a1489d354c04a73eaefc32d4b5c3cc26b7ca173345c47b738b9c09dab234aee6d0 - languageName: node - linkType: hard - "web3-validator@npm:^2.0.1": version: 2.0.1 resolution: "web3-validator@npm:2.0.1" @@ -55099,45 +18872,6 @@ __metadata: languageName: node linkType: hard -"web3-validator@npm:^2.0.3": - version: 2.0.3 - resolution: "web3-validator@npm:2.0.3" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - util: "npm:^0.12.5" - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - zod: "npm:^3.21.4" - checksum: 10/47186254edb56e196367a7957eee1fc4b926e7053521c63fa55d8b22c9ed402165b48adddf6f173014efaaab8859a709fc5642f8ceba5ba60fba0006f795ee76 - languageName: node - linkType: hard - -"web3-validator@npm:^2.0.4": - version: 2.0.4 - resolution: "web3-validator@npm:2.0.4" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - util: "npm:^0.12.5" - web3-errors: "npm:^1.1.4" - web3-types: "npm:^1.3.1" - zod: "npm:^3.21.4" - checksum: 10/64e8126debf507afd029c2f54ee5dfd829f0cb5c47ecad6a99b254bd0132e71ba02f1191098b514debd2df07ac3bac9254c8058b98af3138e242defac7224378 - languageName: node - linkType: hard - -"web3-validator@npm:^2.0.5": - version: 2.0.5 - resolution: "web3-validator@npm:2.0.5" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - util: "npm:^0.12.5" - web3-errors: "npm:^1.1.4" - web3-types: "npm:^1.5.0" - zod: "npm:^3.21.4" - checksum: 10/d6aa3366d6fc7227f9451de300ea5a1370570ae52c1bb32dfe827e37a6acbb4b66fc9d6fd106c348f9041968a3824700174ef0a4c250e122e1b448f570c320bf - languageName: node - linkType: hard - "web3-validator@npm:^2.0.6": version: 2.0.6 resolution: "web3-validator@npm:2.0.6" @@ -55151,90 +18885,6 @@ __metadata: languageName: node linkType: hard -"web3@npm:1.10.0": - version: 1.10.0 - resolution: "web3@npm:1.10.0" - dependencies: - web3-bzz: "npm:1.10.0" - web3-core: "npm:1.10.0" - web3-eth: "npm:1.10.0" - web3-eth-personal: "npm:1.10.0" - web3-net: "npm:1.10.0" - web3-shh: "npm:1.10.0" - web3-utils: "npm:1.10.0" - checksum: 10/9c8349a46d01bc1b91483a953f6e9078b3a15af451a3092c0ac663cb05f6acb1be6ea4ce82646af27373889bdc9ab94c82ec9c6544d11ab7eec3d911a94d929b - languageName: node - linkType: hard - -"web3@npm:1.6.1": - version: 1.6.1 - resolution: "web3@npm:1.6.1" - dependencies: - web3-bzz: "npm:1.6.1" - web3-core: "npm:1.6.1" - web3-eth: "npm:1.6.1" - web3-eth-personal: "npm:1.6.1" - web3-net: "npm:1.6.1" - web3-shh: "npm:1.6.1" - web3-utils: "npm:1.6.1" - checksum: 10/3b120c39e3f557c61ac9c2b18743de958f97bd843aa0bc0eed2179c11d1a57d13853eed327734c7e4639737796d6bd45e72567fd5826cbfdc9b9dafa5f96a927 - languageName: node - linkType: hard - -"web3@npm:1.7.3": - version: 1.7.3 - resolution: "web3@npm:1.7.3" - dependencies: - web3-bzz: "npm:1.7.3" - web3-core: "npm:1.7.3" - web3-eth: "npm:1.7.3" - web3-eth-personal: "npm:1.7.3" - web3-net: "npm:1.7.3" - web3-shh: "npm:1.7.3" - web3-utils: "npm:1.7.3" - checksum: 10/3f5c758ebffdb23027a72deb822d7a3fc39168b9dcb9f4b2e10a1303a4b43c8c101e789bcf1f97e01f4df8259da1e9626bb65729fef7f9f617371a5f8a523d89 - languageName: node - linkType: hard - -"web3@npm:1.8.1": - version: 1.8.1 - resolution: "web3@npm:1.8.1" - dependencies: - web3-bzz: "npm:1.8.1" - web3-core: "npm:1.8.1" - web3-eth: "npm:1.8.1" - web3-eth-personal: "npm:1.8.1" - web3-net: "npm:1.8.1" - web3-shh: "npm:1.8.1" - web3-utils: "npm:1.8.1" - checksum: 10/92a5b28c4364d5487357f41f31f7de78ca35cbb55f23fc66f72b0a508cf0342909e354af986250f1ba6449a8e5aaee658949a35e1b7ddeaa8c1edd32eff21ad9 - languageName: node - linkType: hard - -"web3@npm:4.0.3": - version: 4.0.3 - resolution: "web3@npm:4.0.3" - dependencies: - web3-core: "npm:^4.0.3" - web3-errors: "npm:^1.0.2" - web3-eth: "npm:^4.0.3" - web3-eth-abi: "npm:^4.0.3" - web3-eth-accounts: "npm:^4.0.3" - web3-eth-contract: "npm:^4.0.3" - web3-eth-ens: "npm:^4.0.3" - web3-eth-iban: "npm:^4.0.3" - web3-eth-personal: "npm:^4.0.3" - web3-net: "npm:^4.0.3" - web3-providers-http: "npm:^4.0.3" - web3-providers-ws: "npm:^4.0.3" - web3-rpc-methods: "npm:^1.0.2" - web3-types: "npm:^1.0.2" - web3-utils: "npm:^4.0.3" - web3-validator: "npm:^1.0.2" - checksum: 10/1def9b674aacb1c26253e8a437c0669e17546569f914a97d90dfbe7750b26080ca8fab9b3453d7fc5cf0f231f8e9920533f1f04d64af7d1db8ea5be174e22723 - languageName: node - linkType: hard - "web3@npm:4.1.1": version: 4.1.1 resolution: "web3@npm:4.1.1" @@ -55259,80 +18909,6 @@ __metadata: languageName: node linkType: hard -"web3@npm:4.4.0": - version: 4.4.0 - resolution: "web3@npm:4.4.0" - dependencies: - web3-core: "npm:^4.3.2" - web3-errors: "npm:^1.1.4" - web3-eth: "npm:^4.4.0" - web3-eth-abi: "npm:^4.2.0" - web3-eth-accounts: "npm:^4.1.1" - web3-eth-contract: "npm:^4.2.0" - web3-eth-ens: "npm:^4.0.8" - web3-eth-iban: "npm:^4.0.7" - web3-eth-personal: "npm:^4.0.8" - web3-net: "npm:^4.0.7" - web3-providers-http: "npm:^4.1.0" - web3-providers-ws: "npm:^4.0.7" - web3-rpc-methods: "npm:^1.1.4" - web3-types: "npm:^1.3.1" - web3-utils: "npm:^4.1.1" - web3-validator: "npm:^2.0.4" - checksum: 10/e1f96a4b2a161f063be6fbc150dc27777ba6a90b06573c95326c5df80c1d601302f5d3b5bc4adee44e240d6a9e59aff69c0d5e23e16952b80e2f83ba9dd60d35 - languageName: node - linkType: hard - -"web3@npm:^1.2.4": - version: 1.10.1 - resolution: "web3@npm:1.10.1" - dependencies: - web3-bzz: "npm:1.10.1" - web3-core: "npm:1.10.1" - web3-eth: "npm:1.10.1" - web3-eth-personal: "npm:1.10.1" - web3-net: "npm:1.10.1" - web3-shh: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/33f63121a94b271fa56090763dab641bbc67677d81abc5fd013846b15a27e565a7cc0e8f4fcc424d05022785c8f54e1dba6ce6b79ad681a0cfabf8d380476628 - languageName: node - linkType: hard - -"web3js-quorum@npm:22.4.0": - version: 22.4.0 - resolution: "web3js-quorum@npm:22.4.0" - dependencies: - ethereumjs-tx: "npm:^2.1.2" - ethereumjs-util: "npm:6.2.1" - lodash: "npm:^4.17.21" - request-promise-native: "npm:^1.0.9" - rlp: "npm:2.2.7" - peerDependencies: - web3: ^1.x - checksum: 10/ddf9873f5bece39bdbeeae0c9044403f62fdf159278e23e20430aa28db699b15d81b6b0e1d9ffb0cd765a40d5e0ff94dcda391dba28d2f9c615f2a6cd0b0fcc7 - languageName: node - linkType: hard - -"webcrypto-core@npm:^1.7.7": - version: 1.7.7 - resolution: "webcrypto-core@npm:1.7.7" - dependencies: - "@peculiar/asn1-schema": "npm:^2.3.6" - "@peculiar/json-schema": "npm:^1.1.12" - asn1js: "npm:^3.0.1" - pvtsutils: "npm:^1.3.2" - tslib: "npm:^2.4.0" - checksum: 10/e87ac59d7d05c2aa96117c8f589e99ec9556dfc9ff3cd7fe9464de32e60ed6ff237cdfd35ed53c93546dd0d548bab67b244be381e97b162fe87b6d826e8765ae - languageName: node - linkType: hard - -"webcrypto-shim@npm:^0.1.4": - version: 0.1.7 - resolution: "webcrypto-shim@npm:0.1.7" - checksum: 10/f8ff4781b941f9d96cb0a3aae7fdb84750e1d558cc848e7b818b041b21694e509b94696dba6ff1df2183c88eada6d71902d4d6bc11ba4c19968fe52acbeb9385 - languageName: node - linkType: hard - "webidl-conversions@npm:^3.0.0": version: 3.0.1 resolution: "webidl-conversions@npm:3.0.1" @@ -55340,27 +18916,6 @@ __metadata: languageName: node linkType: hard -"webidl-conversions@npm:^4.0.2": - version: 4.0.2 - resolution: "webidl-conversions@npm:4.0.2" - checksum: 10/594187c36f2d7898f89c0ed3b9248a095fa549ecc1befb10a97bc884b5680dc96677f58df5579334d8e0d1018e5ef075689cfa2a6c459f45a61a9deb512cb59e - languageName: node - linkType: hard - -"webidl-conversions@npm:^5.0.0": - version: 5.0.0 - resolution: "webidl-conversions@npm:5.0.0" - checksum: 10/cea864dd9cf1f2133d82169a446fb94427ba089e4676f5895273ea085f165649afe587ae3f19f2f0370751a724bba2d96e9956d652b3e41ac1feaaa4376e2d70 - languageName: node - linkType: hard - -"webidl-conversions@npm:^6.1.0": - version: 6.1.0 - resolution: "webidl-conversions@npm:6.1.0" - checksum: 10/4454b73060a6d83f7ec1f1db24c480b7ecda33880306dd32a3d62d85b36df4789a383489f1248387e5451737dca17054b8cbf2e792ba89e49d76247f0f4f6380 - languageName: node - linkType: hard - "webpack-cli@npm:4.10.0": version: 4.10.0 resolution: "webpack-cli@npm:4.10.0" @@ -55394,228 +18949,20 @@ __metadata: languageName: node linkType: hard -"webpack-dev-middleware@npm:>=6.1.2": - version: 7.2.1 - resolution: "webpack-dev-middleware@npm:7.2.1" - dependencies: - colorette: "npm:^2.0.10" - memfs: "npm:^4.6.0" - mime-types: "npm:^2.1.31" - on-finished: "npm:^2.4.1" - range-parser: "npm:^1.2.1" - schema-utils: "npm:^4.0.0" - peerDependencies: - webpack: ^5.0.0 - peerDependenciesMeta: - webpack: - optional: true - checksum: 10/e1fa9b40cba7b954f901b085cdded62df6f3c10d1d4e24d4850bd35ebe3dcfb18e7159e6579d6ac854e8e3611e5895aaf45ea1f3e29da2287659d36f0cb614d1 - languageName: node - linkType: hard - -"webpack-dev-server@npm:4.15.1, webpack-dev-server@npm:^4.6.0": - version: 4.15.1 - resolution: "webpack-dev-server@npm:4.15.1" - dependencies: - "@types/bonjour": "npm:^3.5.9" - "@types/connect-history-api-fallback": "npm:^1.3.5" - "@types/express": "npm:^4.17.13" - "@types/serve-index": "npm:^1.9.1" - "@types/serve-static": "npm:^1.13.10" - "@types/sockjs": "npm:^0.3.33" - "@types/ws": "npm:^8.5.5" - ansi-html-community: "npm:^0.0.8" - bonjour-service: "npm:^1.0.11" - chokidar: "npm:^3.5.3" - colorette: "npm:^2.0.10" - compression: "npm:^1.7.4" - connect-history-api-fallback: "npm:^2.0.0" - default-gateway: "npm:^6.0.3" - express: "npm:^4.17.3" - graceful-fs: "npm:^4.2.6" - html-entities: "npm:^2.3.2" - http-proxy-middleware: "npm:^2.0.3" - ipaddr.js: "npm:^2.0.1" - launch-editor: "npm:^2.6.0" - open: "npm:^8.0.9" - p-retry: "npm:^4.5.0" - rimraf: "npm:^3.0.2" - schema-utils: "npm:^4.0.0" - selfsigned: "npm:^2.1.1" - serve-index: "npm:^1.9.1" - sockjs: "npm:^0.3.24" - spdy: "npm:^4.0.2" - webpack-dev-middleware: "npm:^5.3.1" - ws: "npm:^8.13.0" - peerDependencies: - webpack: ^4.37.0 || ^5.0.0 - peerDependenciesMeta: - webpack: - optional: true - webpack-cli: - optional: true - bin: - webpack-dev-server: bin/webpack-dev-server.js - checksum: 10/fd6dfb6c71eb94696b21930ea4c2f25e95ba85fac1bbc15aa5d03af0a90712eba057901fa9131ed3e901665c95b2379208279aca61e9c48e7cda276c3caa95dd - languageName: node - linkType: hard - -"webpack-manifest-plugin@npm:^4.0.2": - version: 4.1.1 - resolution: "webpack-manifest-plugin@npm:4.1.1" - dependencies: - tapable: "npm:^2.0.0" - webpack-sources: "npm:^2.2.0" - peerDependencies: - webpack: ^4.44.2 || ^5.47.0 - checksum: 10/d7b0fa36579bf7b6b093103b1484b7af1df76bc2691a08680b0d2cbbebfda6313749b63f19905e964f27c64f27c138bac0216d483df8acd41a1c5f0048fb123e - languageName: node - linkType: hard - -"webpack-merge@npm:5.10.0": - version: 5.10.0 - resolution: "webpack-merge@npm:5.10.0" - dependencies: - clone-deep: "npm:^4.0.1" - flat: "npm:^5.0.2" - wildcard: "npm:^2.0.0" - checksum: 10/fa46ab200f17d06c7cb49fc37ad91f15769753953c9724adac1061fa305a2a223cb37c3ed25a5f501580c91f11a0800990fe3814c70a77bf1aa5b3fca45a2ac6 - languageName: node - linkType: hard - -"webpack-merge@npm:5.9.0": - version: 5.9.0 - resolution: "webpack-merge@npm:5.9.0" - dependencies: - clone-deep: "npm:^4.0.1" - wildcard: "npm:^2.0.0" - checksum: 10/d23dd1f0bad0b9821bf58443d2d29097d65cd9353046c2d8a6d7b57877ec19cf64be57cc7ef2a371a15cf9264fe6eaf8dea4015dc87487e664ffab2a28329d56 - languageName: node - linkType: hard - -"webpack-merge@npm:^5.7.3": - version: 5.8.0 - resolution: "webpack-merge@npm:5.8.0" - dependencies: - clone-deep: "npm:^4.0.1" - wildcard: "npm:^2.0.0" - checksum: 10/c22812671a93d938bed21c02461d0efb0a7ec0b0f5e7cf28853b2c428a9ad947a26076e97243b1d9cb1cc5a3f92f24e467fc442f03f6e583d082bb3f3f460baf - languageName: node - linkType: hard - -"webpack-sources@npm:^1.4.3": - version: 1.4.3 - resolution: "webpack-sources@npm:1.4.3" - dependencies: - source-list-map: "npm:^2.0.0" - source-map: "npm:~0.6.1" - checksum: 10/6237c5d1ba639a5d67bd1135c9bba487eadbd04c5e75a2849508013f13cb4b57387e689e0991c19a14a87085be7cc0b8dd1515422ae351f6e3f813ed100ccbb8 - languageName: node - linkType: hard - -"webpack-sources@npm:^2.2.0": - version: 2.3.1 - resolution: "webpack-sources@npm:2.3.1" - dependencies: - source-list-map: "npm:^2.0.1" - source-map: "npm:^0.6.1" - checksum: 10/0c4bb91f2899205648da25b68edf4495a360692af2c426cde98b188367478c93d5e33e2b08665e070ac0ece59ade8d52175da656a212b44701ce4a271ca66695 - languageName: node - linkType: hard - -"webpack-sources@npm:^3.0.0, webpack-sources@npm:^3.2.3": - version: 3.2.3 - resolution: "webpack-sources@npm:3.2.3" - checksum: 10/a661f41795d678b7526ae8a88cd1b3d8ce71a7d19b6503da8149b2e667fc7a12f9b899041c1665d39e38245ed3a59ab68de648ea31040c3829aa695a5a45211d - languageName: node - linkType: hard - -"webpack-subresource-integrity@npm:5.1.0": - version: 5.1.0 - resolution: "webpack-subresource-integrity@npm:5.1.0" - dependencies: - typed-assert: "npm:^1.0.8" - peerDependencies: - html-webpack-plugin: ">= 5.0.0-beta.1 < 6" - webpack: ^5.12.0 - peerDependenciesMeta: - html-webpack-plugin: - optional: true - checksum: 10/815704e739de6c949229519a0d5d0d9a038c363f6dd89d79c6cad715409e5a67ea93c22eb0c46169293192a525d21ac5f675f13908cdaaab17c519c04382238c - languageName: node - linkType: hard - -"webpack@npm:5.88.2, webpack@npm:^5.64.4": - version: 5.88.2 - resolution: "webpack@npm:5.88.2" - dependencies: - "@types/eslint-scope": "npm:^3.7.3" - "@types/estree": "npm:^1.0.0" - "@webassemblyjs/ast": "npm:^1.11.5" - "@webassemblyjs/wasm-edit": "npm:^1.11.5" - "@webassemblyjs/wasm-parser": "npm:^1.11.5" - acorn: "npm:^8.7.1" - acorn-import-assertions: "npm:^1.9.0" - browserslist: "npm:^4.14.5" - chrome-trace-event: "npm:^1.0.2" - enhanced-resolve: "npm:^5.15.0" - es-module-lexer: "npm:^1.2.1" - eslint-scope: "npm:5.1.1" - events: "npm:^3.2.0" - glob-to-regexp: "npm:^0.4.1" - graceful-fs: "npm:^4.2.9" - json-parse-even-better-errors: "npm:^2.3.1" - loader-runner: "npm:^4.2.0" - mime-types: "npm:^2.1.27" - neo-async: "npm:^2.6.2" - schema-utils: "npm:^3.2.0" - tapable: "npm:^2.1.1" - terser-webpack-plugin: "npm:^5.3.7" - watchpack: "npm:^2.4.0" - webpack-sources: "npm:^3.2.3" - peerDependenciesMeta: - webpack-cli: - optional: true - bin: - webpack: bin/webpack.js - checksum: 10/2b26158f091df1d97b85ed8b9c374c673ee91de41e13579a3d5abb76f48fda0e2fe592541e58a96e2630d5bce18d885ce605f6ae767d7e0bc2b5ce3b700a51f0 - languageName: node - linkType: hard - -"webpack@npm:5.90.3": - version: 5.90.3 - resolution: "webpack@npm:5.90.3" +"webpack-merge@npm:^5.7.3": + version: 5.8.0 + resolution: "webpack-merge@npm:5.8.0" dependencies: - "@types/eslint-scope": "npm:^3.7.3" - "@types/estree": "npm:^1.0.5" - "@webassemblyjs/ast": "npm:^1.11.5" - "@webassemblyjs/wasm-edit": "npm:^1.11.5" - "@webassemblyjs/wasm-parser": "npm:^1.11.5" - acorn: "npm:^8.7.1" - acorn-import-assertions: "npm:^1.9.0" - browserslist: "npm:^4.21.10" - chrome-trace-event: "npm:^1.0.2" - enhanced-resolve: "npm:^5.15.0" - es-module-lexer: "npm:^1.2.1" - eslint-scope: "npm:5.1.1" - events: "npm:^3.2.0" - glob-to-regexp: "npm:^0.4.1" - graceful-fs: "npm:^4.2.9" - json-parse-even-better-errors: "npm:^2.3.1" - loader-runner: "npm:^4.2.0" - mime-types: "npm:^2.1.27" - neo-async: "npm:^2.6.2" - schema-utils: "npm:^3.2.0" - tapable: "npm:^2.1.1" - terser-webpack-plugin: "npm:^5.3.10" - watchpack: "npm:^2.4.0" - webpack-sources: "npm:^3.2.3" - peerDependenciesMeta: - webpack-cli: - optional: true - bin: - webpack: bin/webpack.js - checksum: 10/48c9696eca950bfa7c943a24b8235fdf0575acd73a8eb1661f8189d3d1f431362f3a0e158e2941a7e4f0852ea6e32d7d4e89283149247e4389a8aad0fe6c247e + clone-deep: "npm:^4.0.1" + wildcard: "npm:^2.0.0" + checksum: 10/c22812671a93d938bed21c02461d0efb0a7ec0b0f5e7cf28853b2c428a9ad947a26076e97243b1d9cb1cc5a3f92f24e467fc442f03f6e583d082bb3f3f460baf + languageName: node + linkType: hard + +"webpack-sources@npm:^3.2.3": + version: 3.2.3 + resolution: "webpack-sources@npm:3.2.3" + checksum: 10/a661f41795d678b7526ae8a88cd1b3d8ce71a7d19b6503da8149b2e667fc7a12f9b899041c1665d39e38245ed3a59ab68de648ea31040c3829aa695a5a45211d languageName: node linkType: hard @@ -55655,45 +19002,6 @@ __metadata: languageName: node linkType: hard -"websocket-driver@npm:>=0.5.1, websocket-driver@npm:^0.7.4": - version: 0.7.4 - resolution: "websocket-driver@npm:0.7.4" - dependencies: - http-parser-js: "npm:>=0.5.1" - safe-buffer: "npm:>=5.1.0" - websocket-extensions: "npm:>=0.1.1" - checksum: 10/17197d265d5812b96c728e70fd6fe7d067471e121669768fe0c7100c939d997ddfc807d371a728556e24fc7238aa9d58e630ea4ff5fd4cfbb40f3d0a240ef32d - languageName: node - linkType: hard - -"websocket-extensions@npm:>=0.1.1": - version: 0.1.4 - resolution: "websocket-extensions@npm:0.1.4" - checksum: 10/b5399b487d277c78cdd2aef63764b67764aa9899431e3a2fa272c6ad7236a0fb4549b411d89afa76d5afd664c39d62fc19118582dc937e5bb17deb694f42a0d1 - languageName: node - linkType: hard - -"websocket@npm:^1.0.32, websocket@npm:^1.0.34": - version: 1.0.34 - resolution: "websocket@npm:1.0.34" - dependencies: - bufferutil: "npm:^4.0.1" - debug: "npm:^2.2.0" - es5-ext: "npm:^0.10.50" - typedarray-to-buffer: "npm:^3.1.5" - utf-8-validate: "npm:^5.0.2" - yaeti: "npm:^0.0.6" - checksum: 10/b72e3dcc3fa92b4a4511f0df89b25feed6ab06979cb9e522d2736f09855f4bf7588d826773b9405fcf3f05698200eb55ba9da7ef333584653d4912a5d3b13c18 - languageName: node - linkType: hard - -"webworkify@npm:^1.2.1": - version: 1.5.0 - resolution: "webworkify@npm:1.5.0" - checksum: 10/2ee5b8e418da45657544bfb397599d60abc009c59d1b92f73c46a6beb9a1e08d6fabab36cd823bc4e8da0c2e498b4cf883aa5d3704d98cafe1b5faa23b92ffcc - languageName: node - linkType: hard - "wget-improved@npm:3.4.0": version: 3.4.0 resolution: "wget-improved@npm:3.4.0" @@ -55706,36 +19014,6 @@ __metadata: languageName: node linkType: hard -"whatwg-encoding@npm:^1.0.5": - version: 1.0.5 - resolution: "whatwg-encoding@npm:1.0.5" - dependencies: - iconv-lite: "npm:0.4.24" - checksum: 10/5be4efe111dce29ddee3448d3915477fcc3b28f991d9cf1300b4e50d6d189010d47bca2f51140a844cf9b726e8f066f4aee72a04d687bfe4f2ee2767b2f5b1e6 - languageName: node - linkType: hard - -"whatwg-fetch@npm:^3.6.2": - version: 3.6.19 - resolution: "whatwg-fetch@npm:3.6.19" - checksum: 10/257b130a06bc0fca4e3f15cb4a7b7822d12b7493c6743353e3a107b62ef2716f77fae35b4c81b4b8630e221aca30ea5b9770969db762d63336108f57bee9f963 - languageName: node - linkType: hard - -"whatwg-mimetype@npm:^2.3.0": - version: 2.3.0 - resolution: "whatwg-mimetype@npm:2.3.0" - checksum: 10/3582c1d74d708716013433bbab45cb9b31ef52d276adfbe2205d948be1ec9bb1a4ac05ce6d9045f3acc4104489e1344c857b14700002385a4b997a5673ff6416 - languageName: node - linkType: hard - -"whatwg-mimetype@npm:^3.0.0": - version: 3.0.0 - resolution: "whatwg-mimetype@npm:3.0.0" - checksum: 10/96f9f628c663c2ae05412c185ca81b3df54bcb921ab52fe9ebc0081c1720f25d770665401eb2338ab7f48c71568133845638e18a81ed52ab5d4dcef7d22b40ef - languageName: node - linkType: hard - "whatwg-url@npm:^5.0.0": version: 5.0.0 resolution: "whatwg-url@npm:5.0.0" @@ -55746,28 +19024,6 @@ __metadata: languageName: node linkType: hard -"whatwg-url@npm:^7.0.0": - version: 7.1.0 - resolution: "whatwg-url@npm:7.1.0" - dependencies: - lodash.sortby: "npm:^4.7.0" - tr46: "npm:^1.0.1" - webidl-conversions: "npm:^4.0.2" - checksum: 10/769fd35838b4e50536ae08d836472e86adbedda1d5493ea34353c55468147e7868b91d2535b59e01a9e7331ab7e4cdfdf5490c279c045da23c327cf33e32f755 - languageName: node - linkType: hard - -"whatwg-url@npm:^8.0.0, whatwg-url@npm:^8.5.0": - version: 8.7.0 - resolution: "whatwg-url@npm:8.7.0" - dependencies: - lodash: "npm:^4.7.0" - tr46: "npm:^2.1.0" - webidl-conversions: "npm:^6.1.0" - checksum: 10/512a8b2703dffbf13a9a247bf2fb27c3048a3ceb5ece09f88b737c8260afaba4b2f6775c2f1cfc29c2ba4859f2454a9de73fac08e239b00ae2b42cd6b8bb0d35 - languageName: node - linkType: hard - "which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" @@ -55781,26 +19037,6 @@ __metadata: languageName: node linkType: hard -"which-builtin-type@npm:^1.1.3": - version: 1.1.3 - resolution: "which-builtin-type@npm:1.1.3" - dependencies: - function.prototype.name: "npm:^1.1.5" - has-tostringtag: "npm:^1.0.0" - is-async-function: "npm:^2.0.0" - is-date-object: "npm:^1.0.5" - is-finalizationregistry: "npm:^1.0.2" - is-generator-function: "npm:^1.0.10" - is-regex: "npm:^1.1.4" - is-weakref: "npm:^1.0.2" - isarray: "npm:^2.0.5" - which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.1" - which-typed-array: "npm:^1.1.9" - checksum: 10/d7823c4a6aa4fc8183eb572edd9f9ee2751e5f3ba2ccd5b298cc163f720df0f02ee1a5291d18ca8a41d48144ef40007ff6a64e6f5e7c506527086c7513a5f673 - languageName: node - linkType: hard - "which-collection@npm:^1.0.1": version: 1.0.1 resolution: "which-collection@npm:1.0.1" @@ -55813,13 +19049,6 @@ __metadata: languageName: node linkType: hard -"which-module@npm:^1.0.0": - version: 1.0.0 - resolution: "which-module@npm:1.0.0" - checksum: 10/98434f7deb36350cb543c1f15612188541737e1f12d39b23b1c371dff5cf4aa4746210f2bdec202d5fe9da8682adaf8e3f7c44c520687d30948cfc59d5534edb - languageName: node - linkType: hard - "which-module@npm:^2.0.0": version: 2.0.0 resolution: "which-module@npm:2.0.0" @@ -55840,19 +19069,6 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.13": - version: 1.1.13 - resolution: "which-typed-array@npm:1.1.13" - dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.4" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.0" - checksum: 10/605e3e10b7118af904a0e79d0d50b95275102f06ec902734024989cd71354929f7acee50de43529d3baf5858e2e4eb32c75e6ebd226c888ad976d8140e4a3e71 - languageName: node - linkType: hard - "which-typed-array@npm:^1.1.14": version: 1.1.14 resolution: "which-typed-array@npm:1.1.14" @@ -55887,383 +19103,75 @@ __metadata: available-typed-arrays: "npm:^1.0.5" call-bind: "npm:^1.0.2" for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.0" - is-typed-array: "npm:^1.1.10" - checksum: 10/90ef760a09dcffc479138a6bc77fd2933a81a41d531f4886ae212f6edb54a0645a43a6c24de2c096aea910430035ac56b3d22a06f3d64e5163fa178d0f24e08e - languageName: node - linkType: hard - -"which@npm:2.0.2, which@npm:^2.0.1, which@npm:^2.0.2": - version: 2.0.2 - resolution: "which@npm:2.0.2" - dependencies: - isexe: "npm:^2.0.0" - bin: - node-which: ./bin/node-which - checksum: 10/4782f8a1d6b8fc12c65e968fea49f59752bf6302dc43036c3bf87da718a80710f61a062516e9764c70008b487929a73546125570acea95c5b5dcc8ac3052c70f - languageName: node - linkType: hard - -"which@npm:^1.2.14, which@npm:^1.2.9, which@npm:^1.3.0, which@npm:^1.3.1": - version: 1.3.1 - resolution: "which@npm:1.3.1" - dependencies: - isexe: "npm:^2.0.0" - bin: - which: ./bin/which - checksum: 10/549dcf1752f3ee7fbb64f5af2eead4b9a2f482108b7de3e85c781d6c26d8cf6a52d37cfbe0642a155fa6470483fe892661a859c03157f24c669cf115f3bbab5e - languageName: node - linkType: hard - -"which@npm:^3.0.0": - version: 3.0.0 - resolution: "which@npm:3.0.0" - dependencies: - isexe: "npm:^2.0.0" - bin: - node-which: bin/which.js - checksum: 10/fdcf3cadab414e60b86c6836e7ac9de9273561a8926f57cbc28641b602a771527239ee4d47f2689ed255666f035ba0a0d72390986cc0c4e45344491adc7d0eeb - languageName: node - linkType: hard - -"which@npm:^4.0.0": - version: 4.0.0 - resolution: "which@npm:4.0.0" - dependencies: - isexe: "npm:^3.1.1" - bin: - node-which: bin/which.js - checksum: 10/f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 - languageName: node - linkType: hard - -"wide-align@npm:^1.1.2, wide-align@npm:^1.1.5": - version: 1.1.5 - resolution: "wide-align@npm:1.1.5" - dependencies: - string-width: "npm:^1.0.2 || 2 || 3 || 4" - checksum: 10/d5f8027b9a8255a493a94e4ec1b74a27bff6679d5ffe29316a3215e4712945c84ef73ca4045c7e20ae7d0c72f5f57f296e04a4928e773d4276a2f1222e4c2e99 - languageName: node - linkType: hard - -"widest-line@npm:^3.1.0": - version: 3.1.0 - resolution: "widest-line@npm:3.1.0" - dependencies: - string-width: "npm:^4.0.0" - checksum: 10/03db6c9d0af9329c37d74378ff1d91972b12553c7d72a6f4e8525fe61563fa7adb0b9d6e8d546b7e059688712ea874edd5ded475999abdeedf708de9849310e0 - languageName: node - linkType: hard - -"wildcard@npm:^2.0.0": - version: 2.0.0 - resolution: "wildcard@npm:2.0.0" - checksum: 10/56d4f8be540918ab3a676f0e57c9cac1d13009dc9974dbdc751a073bf71ec080376697eded083e8a8f86fcb3479135bfa9d4489e25e6c748666d3a53ee096d24 - languageName: node - linkType: hard - -"window-size@npm:^0.2.0": - version: 0.2.0 - resolution: "window-size@npm:0.2.0" - bin: - window-size: cli.js - checksum: 10/cff0af628e807f149221726a781552705a530f1ebbf9f31af7683102343573dbbaabb1ea624eb823fb8e7ffe4316b48c0bbb3d87c05625efea8320cde8bc1201 - languageName: node - linkType: hard - -"winston-transport@npm:^4.5.0": - version: 4.5.0 - resolution: "winston-transport@npm:4.5.0" - dependencies: - logform: "npm:^2.3.2" - readable-stream: "npm:^3.6.0" - triple-beam: "npm:^1.3.0" - checksum: 10/3184b7f29fa97aac5b75ff680100656116aff8d164c09bc7459c9b7cb1ce47d02254caf96c2293791ec175c0e76e5ff59b5ed1374733e0b46248cf4f68a182fc - languageName: node - linkType: hard - -"winston@npm:3.10.0, winston@npm:^3.0.0": - version: 3.10.0 - resolution: "winston@npm:3.10.0" - dependencies: - "@colors/colors": "npm:1.5.0" - "@dabh/diagnostics": "npm:^2.0.2" - async: "npm:^3.2.3" - is-stream: "npm:^2.0.0" - logform: "npm:^2.4.0" - one-time: "npm:^1.0.0" - readable-stream: "npm:^3.4.0" - safe-stable-stringify: "npm:^2.3.1" - stack-trace: "npm:0.0.x" - triple-beam: "npm:^1.3.0" - winston-transport: "npm:^4.5.0" - checksum: 10/3fe855a9b8185f5c75d485bf4b6889c0c4885e85155b6736f783b08319c201fdae11e876ef87c1d333f9a213a4f7fc413fc8c42c720fefb76c59b3abd4ff6406 - languageName: node - linkType: hard - -"winston@npm:^2.4.5": - version: 2.4.5 - resolution: "winston@npm:2.4.5" - dependencies: - async: "npm:~1.0.0" - colors: "npm:1.0.x" - cycle: "npm:1.0.x" - eyes: "npm:0.1.x" - isstream: "npm:0.1.x" - stack-trace: "npm:0.0.x" - checksum: 10/bfc15087e4f524c5c91a739a8c6c700c00f5dd7ea34a3d5773186adc8865b8bc3c0cf81510d762668b22dab25ab31438d14844e8163c4bcbd2c568852d7fdc42 - languageName: node - linkType: hard - -"winston@npm:^3.3.3": - version: 3.6.0 - resolution: "winston@npm:3.6.0" - dependencies: - "@dabh/diagnostics": "npm:^2.0.2" - async: "npm:^3.2.3" - is-stream: "npm:^2.0.0" - logform: "npm:^2.4.0" - one-time: "npm:^1.0.0" - readable-stream: "npm:^3.4.0" - safe-stable-stringify: "npm:^2.3.1" - stack-trace: "npm:0.0.x" - triple-beam: "npm:^1.3.0" - winston-transport: "npm:^4.5.0" - checksum: 10/ba8f828b06c5495163e675f39b74e1618e299e8a9a718ef537ee9ac0affc8a94ab40986253f78876c7f25993829ea5b40d6c94769f089b886045e35d3916786d - languageName: node - linkType: hard - -"word-wrap@npm:>=1.2.5": - version: 1.2.5 - resolution: "word-wrap@npm:1.2.5" - checksum: 10/1ec6f6089f205f83037be10d0c4b34c9183b0b63fca0834a5b3cee55dd321429d73d40bb44c8fc8471b5203d6e8f8275717f49a8ff4b2b0ab41d7e1b563e0854 - languageName: node - linkType: hard - -"wordwrap@npm:^1.0.0": - version: 1.0.0 - resolution: "wordwrap@npm:1.0.0" - checksum: 10/497d40beb2bdb08e6d38754faa17ce20b0bf1306327f80cb777927edb23f461ee1f6bc659b3c3c93f26b08e1cf4b46acc5bae8fda1f0be3b5ab9a1a0211034cd - languageName: node - linkType: hard - -"workbox-background-sync@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-background-sync@npm:6.6.0" - dependencies: - idb: "npm:^7.0.1" - workbox-core: "npm:6.6.0" - checksum: 10/fac828af1985de6f5e81715856c20592550ae2dfbf0014562b7a4eb75e31675f441085a42df9e16baf3ec0313f89173df2bc1159c9212b7e7c859bc36be19aea - languageName: node - linkType: hard - -"workbox-broadcast-update@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-broadcast-update@npm:6.6.0" - dependencies: - workbox-core: "npm:6.6.0" - checksum: 10/bdae00361dbd22d8728486abaa81db4c806c6b5f449c39149c1d6f62f21c4552f21f024e1aa67aa68ab365ae0705abfbccb042b91cc0e4533e9c87d6bf63a8bd - languageName: node - linkType: hard - -"workbox-build@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-build@npm:6.6.0" - dependencies: - "@apideck/better-ajv-errors": "npm:^0.3.1" - "@babel/core": "npm:^7.11.1" - "@babel/preset-env": "npm:^7.11.0" - "@babel/runtime": "npm:^7.11.2" - "@rollup/plugin-babel": "npm:^5.2.0" - "@rollup/plugin-node-resolve": "npm:^11.2.1" - "@rollup/plugin-replace": "npm:^2.4.1" - "@surma/rollup-plugin-off-main-thread": "npm:^2.2.3" - ajv: "npm:^8.6.0" - common-tags: "npm:^1.8.0" - fast-json-stable-stringify: "npm:^2.1.0" - fs-extra: "npm:^9.0.1" - glob: "npm:^7.1.6" - lodash: "npm:^4.17.20" - pretty-bytes: "npm:^5.3.0" - rollup: "npm:^2.43.1" - rollup-plugin-terser: "npm:^7.0.0" - source-map: "npm:^0.8.0-beta.0" - stringify-object: "npm:^3.3.0" - strip-comments: "npm:^2.0.1" - tempy: "npm:^0.6.0" - upath: "npm:^1.2.0" - workbox-background-sync: "npm:6.6.0" - workbox-broadcast-update: "npm:6.6.0" - workbox-cacheable-response: "npm:6.6.0" - workbox-core: "npm:6.6.0" - workbox-expiration: "npm:6.6.0" - workbox-google-analytics: "npm:6.6.0" - workbox-navigation-preload: "npm:6.6.0" - workbox-precaching: "npm:6.6.0" - workbox-range-requests: "npm:6.6.0" - workbox-recipes: "npm:6.6.0" - workbox-routing: "npm:6.6.0" - workbox-strategies: "npm:6.6.0" - workbox-streams: "npm:6.6.0" - workbox-sw: "npm:6.6.0" - workbox-window: "npm:6.6.0" - checksum: 10/ad7ef11dccc2558488de75e70747a52db6b80ddda1ef7bf3cce459d8ba3fe2076f8ffbb3ad4fc31451ba45c14bff46fa4b75fe945e5817637076a9438202962c - languageName: node - linkType: hard - -"workbox-cacheable-response@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-cacheable-response@npm:6.6.0" - dependencies: - workbox-core: "npm:6.6.0" - checksum: 10/8864887ded61b36e8949ed415c7378e58b5fe64be808ceae27e670ff926a04f291798aaf0386b56540ea83c91e0ec6f3c33237981443531dd2749bcd9374914c - languageName: node - linkType: hard - -"workbox-core@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-core@npm:6.6.0" - checksum: 10/575af5aa8c1e88129b4b56e1558e002aa349e86e505405e5a381f55c74e93c7362402e5e3992eaff61b6ebbe5795c6ab88e4703b41cdc337672df9203dff0391 - languageName: node - linkType: hard - -"workbox-expiration@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-expiration@npm:6.6.0" - dependencies: - idb: "npm:^7.0.1" - workbox-core: "npm:6.6.0" - checksum: 10/0ad5ccd54d07b4e7a435329f623d9cb32a2a1f3cd54a9e73246dfa39c77c02203686eaa81e8313ab51b4c85e74531125cb29e8db0036770497e2ef3e2074354b - languageName: node - linkType: hard - -"workbox-google-analytics@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-google-analytics@npm:6.6.0" - dependencies: - workbox-background-sync: "npm:6.6.0" - workbox-core: "npm:6.6.0" - workbox-routing: "npm:6.6.0" - workbox-strategies: "npm:6.6.0" - checksum: 10/3c649c96ef22720fac6b1c59f7966f9976c087d78f5efe4acc2ade3b41e31afff64f6e7996e9cf66a534c26d9f5e8565f25113f5894489117667eb52e0a0fde7 - languageName: node - linkType: hard - -"workbox-navigation-preload@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-navigation-preload@npm:6.6.0" - dependencies: - workbox-core: "npm:6.6.0" - checksum: 10/da499d23dc45f8b2d848c36cd179c6b63f6444e85ff384e03a21351b9844208a8c3ea50890ba1fcc4faf6e2b20cfcc1b11c96a139bfee089c8d3c1b570b0c9ff - languageName: node - linkType: hard - -"workbox-precaching@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-precaching@npm:6.6.0" - dependencies: - workbox-core: "npm:6.6.0" - workbox-routing: "npm:6.6.0" - workbox-strategies: "npm:6.6.0" - checksum: 10/0990312fc2d71e4a4cdffd832939c7fae4a74847ec2a89a0857a7a0bf29a01ca07e45f3b5c0158e2e9dadd63e437b75b28d9a984dc8f5e5bf0d7cf4f980deee0 - languageName: node - linkType: hard - -"workbox-range-requests@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-range-requests@npm:6.6.0" - dependencies: - workbox-core: "npm:6.6.0" - checksum: 10/9418035fce36f4a940e0ccae41cbc590c8e51bd3ed975b172d2f92fe5e364c5181030577c1c72a6b4f1730a68059ad4f6e99289063092ec2a88aa92fdc8b314f - languageName: node - linkType: hard - -"workbox-recipes@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-recipes@npm:6.6.0" - dependencies: - workbox-cacheable-response: "npm:6.6.0" - workbox-core: "npm:6.6.0" - workbox-expiration: "npm:6.6.0" - workbox-precaching: "npm:6.6.0" - workbox-routing: "npm:6.6.0" - workbox-strategies: "npm:6.6.0" - checksum: 10/8c2a84f8eaf430e1a0e841ff340fcbb240d4ce0d02355228bc02c571859d8a660c3b731f47e5b89600b33d278e557e96e49bf4a2e57134be70dd1dc230bf35bf + gopd: "npm:^1.0.1" + has-tostringtag: "npm:^1.0.0" + is-typed-array: "npm:^1.1.10" + checksum: 10/90ef760a09dcffc479138a6bc77fd2933a81a41d531f4886ae212f6edb54a0645a43a6c24de2c096aea910430035ac56b3d22a06f3d64e5163fa178d0f24e08e languageName: node linkType: hard -"workbox-routing@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-routing@npm:6.6.0" +"which@npm:^1.2.14, which@npm:^1.2.9": + version: 1.3.1 + resolution: "which@npm:1.3.1" dependencies: - workbox-core: "npm:6.6.0" - checksum: 10/0a7dcb0e881c1b79777b239a21b83eb0e7809296e59a0159ba17c7560b100e61e475cd1786ac040360058d43da32062f5356316d2276e13a247cbbbf15a1b135 + isexe: "npm:^2.0.0" + bin: + which: ./bin/which + checksum: 10/549dcf1752f3ee7fbb64f5af2eead4b9a2f482108b7de3e85c781d6c26d8cf6a52d37cfbe0642a155fa6470483fe892661a859c03157f24c669cf115f3bbab5e languageName: node linkType: hard -"workbox-strategies@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-strategies@npm:6.6.0" +"which@npm:^2.0.1, which@npm:^2.0.2": + version: 2.0.2 + resolution: "which@npm:2.0.2" dependencies: - workbox-core: "npm:6.6.0" - checksum: 10/0800e611e46c256c4a4c81e48da23aeccac15bd78d61a67403c4fa9270df410300e505b4f23b19dae0865ea69b5b3248646b1a537598e93c532630e84df52a8f + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10/4782f8a1d6b8fc12c65e968fea49f59752bf6302dc43036c3bf87da718a80710f61a062516e9764c70008b487929a73546125570acea95c5b5dcc8ac3052c70f languageName: node linkType: hard -"workbox-streams@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-streams@npm:6.6.0" +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" dependencies: - workbox-core: "npm:6.6.0" - workbox-routing: "npm:6.6.0" - checksum: 10/d11622eae28c394c7c7cfa760055cd68cfa909393bc5bd33d1d3bfff30d764d61a02034752e1c4e8896c2aef26d701effc59e919e4740d08ec78537daf4c0c77 - languageName: node - linkType: hard - -"workbox-sw@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-sw@npm:6.6.0" - checksum: 10/9bdba15d7a92f409f253591ab4332239a238bc7b536ef3708984815fa731a451fcc75aaf27b6bfd9d1765983659695f918e9710fd578e58fb6835f0799f53a08 + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10/f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 languageName: node linkType: hard -"workbox-webpack-plugin@npm:^6.4.1": - version: 6.6.0 - resolution: "workbox-webpack-plugin@npm:6.6.0" +"wide-align@npm:^1.1.2, wide-align@npm:^1.1.5": + version: 1.1.5 + resolution: "wide-align@npm:1.1.5" dependencies: - fast-json-stable-stringify: "npm:^2.1.0" - pretty-bytes: "npm:^5.4.1" - upath: "npm:^1.2.0" - webpack-sources: "npm:^1.4.3" - workbox-build: "npm:6.6.0" - peerDependencies: - webpack: ^4.4.0 || ^5.9.0 - checksum: 10/34a0236a73488c80597d6cb3a5e8ec3f295c34b75ad1ccd9a1ea5a1ead678b5993a19ae068d29ff34c69f367260e2d0f285b124271a98688daad7e5bc042b71c + string-width: "npm:^1.0.2 || 2 || 3 || 4" + checksum: 10/d5f8027b9a8255a493a94e4ec1b74a27bff6679d5ffe29316a3215e4712945c84ef73ca4045c7e20ae7d0c72f5f57f296e04a4928e773d4276a2f1222e4c2e99 languageName: node linkType: hard -"workbox-window@npm:6.6.0": - version: 6.6.0 - resolution: "workbox-window@npm:6.6.0" +"widest-line@npm:^3.1.0": + version: 3.1.0 + resolution: "widest-line@npm:3.1.0" dependencies: - "@types/trusted-types": "npm:^2.0.2" - workbox-core: "npm:6.6.0" - checksum: 10/2d6508c9455644a8ff2a48633366e0591ecd00ea8627e3c277803b47a5f67dc04d08dd21b651919644b06a3a6535cff1b07f7692addee70624d77d47b16cdcb6 + string-width: "npm:^4.0.0" + checksum: 10/03db6c9d0af9329c37d74378ff1d91972b12553c7d72a6f4e8525fe61563fa7adb0b9d6e8d546b7e059688712ea874edd5ded475999abdeedf708de9849310e0 languageName: node linkType: hard -"workerpool@npm:6.2.1": - version: 6.2.1 - resolution: "workerpool@npm:6.2.1" - checksum: 10/3e637f76320cab92eaeffa4fbefb351db02e20aa29245d8ee05fa7c088780ef7b4446bfafff2668a22fd94b7d9d97c7020117036ac77a76370ecea278b9a9b91 +"wildcard@npm:^2.0.0": + version: 2.0.0 + resolution: "wildcard@npm:2.0.0" + checksum: 10/56d4f8be540918ab3a676f0e57c9cac1d13009dc9974dbdc751a073bf71ec080376697eded083e8a8f86fcb3479135bfa9d4489e25e6c748666d3a53ee096d24 languageName: node linkType: hard -"workerpool@npm:^6.5.1": - version: 6.5.1 - resolution: "workerpool@npm:6.5.1" - checksum: 10/b1b00139fe62f2ebec556a2af8085bf6e7502ad26cf2a4dcb34fb4408b2e68aa12c88b0a50cb463b24f2806d60fa491fc0da933b56ec3b53646aeec0025d14cb +"wordwrap@npm:^1.0.0": + version: 1.0.0 + resolution: "wordwrap@npm:1.0.0" + checksum: 10/497d40beb2bdb08e6d38754faa17ce20b0bf1306327f80cb777927edb23f461ee1f6bc659b3c3c93f26b08e1cf4b46acc5bae8fda1f0be3b5ab9a1a0211034cd languageName: node linkType: hard @@ -56278,27 +19186,6 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^2.0.0": - version: 2.1.0 - resolution: "wrap-ansi@npm:2.1.0" - dependencies: - string-width: "npm:^1.0.1" - strip-ansi: "npm:^3.0.1" - checksum: 10/cf66d33f62f2edf0aac52685da98194e47ddf4ceb81d9f98f294b46ffbbf8662caa72a905b343aeab8d6a16cade982be5fc45df99235b07f781ebf68f051ca98 - languageName: node - linkType: hard - -"wrap-ansi@npm:^5.1.0": - version: 5.1.0 - resolution: "wrap-ansi@npm:5.1.0" - dependencies: - ansi-styles: "npm:^3.2.0" - string-width: "npm:^3.0.0" - strip-ansi: "npm:^5.0.0" - checksum: 10/f02bbbd13f40169f3d69b8c95126c1d2a340e6f149d04125527c3d501d74a304a434f4329a83bfdc3b9fdb82403e9ae0cdd7b83a99f0da0d5a7e544f6b709914 - languageName: node - linkType: hard - "wrap-ansi@npm:^6.0.1, wrap-ansi@npm:^6.2.0": version: 6.2.0 resolution: "wrap-ansi@npm:6.2.0" @@ -56328,28 +19215,6 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^1.1.4": - version: 1.3.4 - resolution: "write-file-atomic@npm:1.3.4" - dependencies: - graceful-fs: "npm:^4.1.11" - imurmurhash: "npm:^0.1.4" - slide: "npm:^1.1.5" - checksum: 10/272034614cd70c89aad1ddd889e606f2fda2629b26f5e623bc4eb3afb7be1321878ea34d8c4aaeb915f95ac532b3e26738e468ed57380bde9c38e38143cd094b - languageName: node - linkType: hard - -"write-file-atomic@npm:^2.0.0": - version: 2.4.3 - resolution: "write-file-atomic@npm:2.4.3" - dependencies: - graceful-fs: "npm:^4.1.11" - imurmurhash: "npm:^0.1.4" - signal-exit: "npm:^3.0.2" - checksum: 10/15ce863dce07075d0decedd7c9094f4461e46139d28a758c53162f24c0791c16cd2e7a76baa5b47b1a851fbb51e16f2fab739afb156929b22628f3225437135c - languageName: node - linkType: hard - "write-file-atomic@npm:^3.0.0, write-file-atomic@npm:^3.0.3": version: 3.0.3 resolution: "write-file-atomic@npm:3.0.3" @@ -56417,54 +19282,6 @@ __metadata: languageName: node linkType: hard -"write-stream@npm:~0.4.3": - version: 0.4.3 - resolution: "write-stream@npm:0.4.3" - dependencies: - readable-stream: "npm:~0.0.2" - checksum: 10/b5ad4421fee1a9aeb5a9ad6f035b9b48a80d9c6664dbc3900f7f51a588978d7fc592a13f043648cf6b988ba247fa8c712d7f1e6b9639b634642133983290cc4f - languageName: node - linkType: hard - -"write@npm:^0.2.1": - version: 0.2.1 - resolution: "write@npm:0.2.1" - dependencies: - mkdirp: "npm:^0.5.1" - checksum: 10/d64be00e11f44d8187ee8a29f2ed66f23c3a7f4b3542e3dd770b4b45561593380cd614f65cc22d643db2a00546dd7d92dd3ae042a4ac24100bd6c8b43c6d4199 - languageName: node - linkType: hard - -"ws-identity-client@npm:1.0.2": - version: 1.0.2 - resolution: "ws-identity-client@npm:1.0.2" - dependencies: - "@types/debug": "npm:^4.1.7" - debug: "npm:3.1.0" - dockerode: "npm:^3.3.1" - request-promise-native: "npm:1.0.7" - tv4: "npm:^1.2.7" - checksum: 10/768be370992a9bb5404194842dfe03f3fdc6036f02a6e31dbbbb0bfd9f38c3e479bf913a1a58ed073fd099ef2b311fdfd2044a0ec4d4b7d735d9d6cf5e366778 - languageName: node - linkType: hard - -"ws-wallet@npm:1.1.5": - version: 1.1.5 - resolution: "ws-wallet@npm:1.1.5" - dependencies: - "@hyperledger/cactus-common": "npm:0.9.0" - "@types/yargs": "npm:^17.0.2" - elliptic: "npm:^6.5.4" - jsrsasign: "npm:^10.4.0" - winston: "npm:^3.3.3" - ws: "npm:^8.1.0" - yargs: "npm:^17.1.1" - bin: - ws-wallet: dist/bin/index.js - checksum: 10/502552337ff2e2ac847a6e49c4607307a82c740dda8a727e3853e719ac6de3df97c890fb46fe3f48aaee1f986adbe0bda8d7b26bab73af20f14d347aebde2cb4 - languageName: node - linkType: hard - "ws@npm:>=1.1.5": version: 8.18.0 resolution: "ws@npm:8.18.0" @@ -56494,155 +19311,13 @@ __metadata: languageName: node linkType: hard -"xhr-request-promise@npm:^0.1.2": - version: 0.1.3 - resolution: "xhr-request-promise@npm:0.1.3" - dependencies: - xhr-request: "npm:^1.1.0" - checksum: 10/49ec3474884858faa55349894b1879c872422a24485097c8b71ba9046027d27f1d54eb61dfdb9d72e78892c7371d22d9cc6a4e101b6767bb4df89a0b6d739f85 - languageName: node - linkType: hard - -"xhr-request@npm:^1.0.1, xhr-request@npm:^1.1.0": - version: 1.1.0 - resolution: "xhr-request@npm:1.1.0" - dependencies: - buffer-to-arraybuffer: "npm:^0.0.5" - object-assign: "npm:^4.1.1" - query-string: "npm:^5.0.1" - simple-get: "npm:^2.7.0" - timed-out: "npm:^4.0.1" - url-set-query: "npm:^1.0.0" - xhr: "npm:^2.0.4" - checksum: 10/531c5e1e47d2e680c1ae1296af7fa375d752cd83c3fa1f9bd9e82fc4fb305ce8e7aaf266256e82bbd34e2a4891ec535bcc4e9f8db2691ab64bb3b6ff40296b9a - languageName: node - linkType: hard - -"xhr2-cookies@npm:1.1.0": - version: 1.1.0 - resolution: "xhr2-cookies@npm:1.1.0" - dependencies: - cookiejar: "npm:^2.1.1" - checksum: 10/4af73cde9e6ab46cca756474015076d816441f8e44576191a1c26f92e9bc77d14340e3a0844a056f52963bdef6efac8831aedb9831a0cf8dbc4c1c0fd3e14af0 - languageName: node - linkType: hard - -"xhr@npm:^2.0.4, xhr@npm:^2.3.3": - version: 2.6.0 - resolution: "xhr@npm:2.6.0" - dependencies: - global: "npm:~4.4.0" - is-function: "npm:^1.0.1" - parse-headers: "npm:^2.0.0" - xtend: "npm:^4.0.0" - checksum: 10/31f34aba708955008c87bcd21482be6afc7ff8adc28090e633b1d3f8d3e8e93150bac47b262738b046d7729023a884b655d55cf34e9d14d5850a1275ab49fb37 - languageName: node - linkType: hard - -"xml-name-validator@npm:^3.0.0": - version: 3.0.0 - resolution: "xml-name-validator@npm:3.0.0" - checksum: 10/24f5d38c777ad9239dfe99c4ca3cd155415b65ac583785d1514e04b9f86d6d09eaff983ed373e7a779ceefd1fca0fd893f2fc264999e9aeaac36b6e1afc397ed - languageName: node - linkType: hard - -"xml2js@npm:>=0.5.0": - version: 0.6.2 - resolution: "xml2js@npm:0.6.2" - dependencies: - sax: "npm:>=0.6.0" - xmlbuilder: "npm:~11.0.0" - checksum: 10/df29de8eeedb762c367d87945c39bcf54db19a2c522607491c266ed6184b5a749e37ff29cfaed0ac149da9ba332ac3dcf8e5ff2bd0a206be3343eca95faa941d - languageName: node - linkType: hard - -"xmlbuilder@npm:~11.0.0": - version: 11.0.1 - resolution: "xmlbuilder@npm:11.0.1" - checksum: 10/c8c3d208783718db5b285101a736cd8e6b69a5c265199a0739abaa93d1a1b7de5489fd16df4e776e18b2c98cb91f421a7349e99fd8c1ebeb44ecfed72a25091a - languageName: node - linkType: hard - -"xmlchars@npm:^2.2.0": - version: 2.2.0 - resolution: "xmlchars@npm:2.2.0" - checksum: 10/4ad5924974efd004a47cce6acf5c0269aee0e62f9a805a426db3337af7bcbd331099df174b024ace4fb18971b8a56de386d2e73a1c4b020e3abd63a4a9b917f1 - languageName: node - linkType: hard - -"xmlhttprequest-ssl@npm:~2.0.0": - version: 2.0.0 - resolution: "xmlhttprequest-ssl@npm:2.0.0" - checksum: 10/3c2edfce0c49c7a494ed16c87e6897c9e3eba29763a5505526de83ddefd195d224fa5cdf41092298c99cd6ee473c9f259a0679f6ff3b8a9535dcd09900db91f9 - languageName: node - linkType: hard - -"xmlhttprequest@npm:1.8.0": - version: 1.8.0 - resolution: "xmlhttprequest@npm:1.8.0" - checksum: 10/4f2cc2029f863d425ba8d6ef717de7ee44cd44ceae97df45c122343ecbcd4418559fbb8bdc3fa3678ea8cb24fb31a143ed0e8f7bb302c13185bc4486d81d8399 - languageName: node - linkType: hard - -"xss@npm:^1.0.8": - version: 1.0.14 - resolution: "xss@npm:1.0.14" - dependencies: - commander: "npm:^2.20.3" - cssfilter: "npm:0.0.10" - bin: - xss: bin/xss - checksum: 10/dc97acaee35e5ed453fe5628841daf7b4aba5ed26b31ff4eadf831f42cded1ddebc218ff0db1d6a73e301bfada8a5236fec0c234233d66a20ecc319da542b357 - languageName: node - linkType: hard - -"xtend@npm:^2.2.0": - version: 2.2.0 - resolution: "xtend@npm:2.2.0" - checksum: 10/9fcd1ddabefdb3c68a698b08177525ad14a6df3423b13bad9a53900d19374e476a43c219b0756d39675776b2326a35fe477c547cfb8a05ae9fea4ba2235bebe2 - languageName: node - linkType: hard - -"xtend@npm:^4.0.0, xtend@npm:^4.0.1, xtend@npm:^4.0.2, xtend@npm:~4.0.0": +"xtend@npm:^4.0.2": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: 10/ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a languageName: node linkType: hard -"xtend@npm:~2.0.4": - version: 2.0.6 - resolution: "xtend@npm:2.0.6" - dependencies: - is-object: "npm:~0.1.2" - object-keys: "npm:~0.2.0" - checksum: 10/414531e51cbc56d4676ae2b3a4070052e0c7a36caf7ee74f2e8449fe0fc1752b971a776fca5b85ec02ef3d0a33b8e75491d900474b8407f3f4bba3f49325a785 - languageName: node - linkType: hard - -"xtend@npm:~2.1.1, xtend@npm:~2.1.2": - version: 2.1.2 - resolution: "xtend@npm:2.1.2" - dependencies: - object-keys: "npm:~0.4.0" - checksum: 10/a8b79f31502c163205984eaa2b196051cd2fab0882b49758e30f2f9018255bc6c462e32a090bf3385d1bda04755ad8cc0052a09e049b0038f49eb9b950d9c447 - languageName: node - linkType: hard - -"xtend@npm:~3.0.0": - version: 3.0.0 - resolution: "xtend@npm:3.0.0" - checksum: 10/ecdc4dd74f26e561dbc13d4148fcc7b8f46f49b9259862fc31e42b7cede9eee62af9d869050a7b8e089475e858744a74ceae3f0da2943755ef712f3277ad2e50 - languageName: node - linkType: hard - -"y18n@npm:^3.2.1": - version: 3.2.2 - resolution: "y18n@npm:3.2.2" - checksum: 10/42ee58e321252ac87f85ccc7cee01c2e3e224737531e9e543963264194255132ce406e02993904b84ea974050d53b8959dcf9da695408553c32f2a8b4b59a667 - languageName: node - linkType: hard - "y18n@npm:^4.0.0": version: 4.0.3 resolution: "y18n@npm:4.0.3" @@ -56657,27 +19332,6 @@ __metadata: languageName: node linkType: hard -"yaeti@npm:^0.0.6": - version: 0.0.6 - resolution: "yaeti@npm:0.0.6" - checksum: 10/6db12c152f7c363b80071086a3ebf5032e03332604eeda988872be50d6c8469e1f13316175544fa320f72edad696c2d83843ad0ff370659045c1a68bcecfcfea - languageName: node - linkType: hard - -"yallist@npm:^2.1.2": - version: 2.1.2 - resolution: "yallist@npm:2.1.2" - checksum: 10/75fc7bee4821f52d1c6e6021b91b3e079276f1a9ce0ad58da3c76b79a7e47d6f276d35e206a96ac16c1cf48daee38a8bb3af0b1522a3d11c8ffe18f898828832 - languageName: node - linkType: hard - -"yallist@npm:^3.0.0, yallist@npm:^3.0.2, yallist@npm:^3.1.1": - version: 3.1.1 - resolution: "yallist@npm:3.1.1" - checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb - languageName: node - linkType: hard - "yallist@npm:^4.0.0": version: 4.0.0 resolution: "yallist@npm:4.0.0" @@ -56692,20 +19346,13 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^1.10.0, yaml@npm:^1.10.2, yaml@npm:^1.5.0, yaml@npm:^1.7.2": +"yaml@npm:^1.10.0, yaml@npm:^1.10.2, yaml@npm:^1.5.0": version: 1.10.2 resolution: "yaml@npm:1.10.2" checksum: 10/e088b37b4d4885b70b50c9fa1b7e54bd2e27f5c87205f9deaffd1fb293ab263d9c964feadb9817a7b129a5bf30a06582cb08750f810568ecc14f3cdbabb79cb3 languageName: node linkType: hard -"yaml@npm:^2.1.1": - version: 2.3.3 - resolution: "yaml@npm:2.3.3" - checksum: 10/3b1a974b9d3672c671d47099a41c0de77b7ff978d0849aa55a095587486e82cd072321d19f2b4c791a367f766310b5a82dff098839b0f4ddcbbbe477f82dfb07 - languageName: node - linkType: hard - "yaml@npm:^2.4.5": version: 2.4.5 resolution: "yaml@npm:2.4.5" @@ -56722,72 +19369,6 @@ __metadata: languageName: node linkType: hard -"yargs-unparser@npm:2.0.0, yargs-unparser@npm:^2.0.0": - version: 2.0.0 - resolution: "yargs-unparser@npm:2.0.0" - dependencies: - camelcase: "npm:^6.0.0" - decamelize: "npm:^4.0.0" - flat: "npm:^5.0.2" - is-plain-obj: "npm:^2.1.0" - checksum: 10/68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 - languageName: node - linkType: hard - -"yargs@npm:11.1.0": - version: 11.1.0 - resolution: "yargs@npm:11.1.0" - dependencies: - cliui: "npm:^4.0.0" - decamelize: "npm:^1.1.1" - find-up: "npm:^2.1.0" - get-caller-file: "npm:^1.0.1" - os-locale: "npm:^2.0.0" - require-directory: "npm:^2.1.1" - require-main-filename: "npm:^1.0.1" - set-blocking: "npm:^2.0.0" - string-width: "npm:^2.0.0" - which-module: "npm:^2.0.0" - y18n: "npm:^3.2.1" - yargs-parser: "npm:^9.0.2" - checksum: 10/a38fab329dd80710758485d7c49be02fe97b9504ed0f42a5dfce17e5aff58da56c2ee30248e1ff98ba27d39ea13fc57f84f4f638b438f8e1008e817c7bcbe614 - languageName: node - linkType: hard - -"yargs@npm:13.2.4": - version: 13.2.4 - resolution: "yargs@npm:13.2.4" - dependencies: - cliui: "npm:^5.0.0" - find-up: "npm:^3.0.0" - get-caller-file: "npm:^2.0.1" - os-locale: "npm:^3.1.0" - require-directory: "npm:^2.1.1" - require-main-filename: "npm:^2.0.0" - set-blocking: "npm:^2.0.0" - string-width: "npm:^3.0.0" - which-module: "npm:^2.0.0" - y18n: "npm:^4.0.0" - yargs-parser: "npm:^13.1.0" - checksum: 10/9354723915d4384ce3b34976fb6e1e20ade1df290c6cad509d98199a34bc74efd0f8bd56b90748828e9ad348bb8f79a864ff7cca53eaf58683beb03ab75e3025 - languageName: node - linkType: hard - -"yargs@npm:16.2.0, yargs@npm:^16.1.1, yargs@npm:^16.2.0": - version: 16.2.0 - resolution: "yargs@npm:16.2.0" - dependencies: - cliui: "npm:^7.0.2" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.0" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^20.2.2" - checksum: 10/807fa21211d2117135d557f95fcd3c3d390530cda2eca0c840f1d95f0f40209dcfeb5ec18c785a1f3425896e623e3b2681e8bb7b6600060eda1c3f4804e7957e - languageName: node - linkType: hard - "yargs@npm:17.7.2, yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" @@ -56822,24 +19403,24 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.0.0, yargs@npm:^17.1.1": - version: 17.3.1 - resolution: "yargs@npm:17.3.1" +"yargs@npm:^16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" dependencies: cliui: "npm:^7.0.2" escalade: "npm:^3.1.1" get-caller-file: "npm:^2.0.5" require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.3" + string-width: "npm:^4.2.0" y18n: "npm:^5.0.5" - yargs-parser: "npm:^21.0.0" - checksum: 10/7bb96c62cd56f1290d8a411ddb848f3af147773199c8653be5ee940ddd042391d7e61b0911a98ab6b3d74a92fff52694f4ed246333accf0523c201a2a6649e2f + yargs-parser: "npm:^20.2.2" + checksum: 10/807fa21211d2117135d557f95fcd3c3d390530cda2eca0c840f1d95f0f40209dcfeb5ec18c785a1f3425896e623e3b2681e8bb7b6600060eda1c3f4804e7957e languageName: node linkType: hard -"yargs@npm:^17.2.1": - version: 17.5.0 - resolution: "yargs@npm:17.5.0" +"yargs@npm:^17.0.0": + version: 17.3.1 + resolution: "yargs@npm:17.3.1" dependencies: cliui: "npm:^7.0.2" escalade: "npm:^3.1.1" @@ -56848,7 +19429,7 @@ __metadata: string-width: "npm:^4.2.3" y18n: "npm:^5.0.5" yargs-parser: "npm:^21.0.0" - checksum: 10/a642e2e3873e601a65cb841da100219ba237ea6ac1e7073e596baedfb33890588a0049f57fd81384319b4ad2065c0b0c0ac4334b9dd813ee58c4dfc0fa433b5c + checksum: 10/7bb96c62cd56f1290d8a411ddb848f3af147773199c8653be5ee940ddd042391d7e61b0911a98ab6b3d74a92fff52694f4ed246333accf0523c201a2a6649e2f languageName: node linkType: hard @@ -56867,38 +19448,6 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^4.7.1": - version: 4.8.1 - resolution: "yargs@npm:4.8.1" - dependencies: - cliui: "npm:^3.2.0" - decamelize: "npm:^1.1.1" - get-caller-file: "npm:^1.0.1" - lodash.assign: "npm:^4.0.3" - os-locale: "npm:^1.4.0" - read-pkg-up: "npm:^1.0.1" - require-directory: "npm:^2.1.1" - require-main-filename: "npm:^1.0.1" - set-blocking: "npm:^2.0.0" - string-width: "npm:^1.0.1" - which-module: "npm:^1.0.0" - window-size: "npm:^0.2.0" - y18n: "npm:^3.2.1" - yargs-parser: "npm:^2.4.1" - checksum: 10/d8fc064ab4c97ea0baf1bef0617204bc63824d007293c026a8108ecd7f9cdbba9f9cfa8aa96b5cfbb879649434dfe0113f5e4f71a920851ebef28e788e767e2a - languageName: node - linkType: hard - -"yauzl@npm:^2.4.2": - version: 2.10.0 - resolution: "yauzl@npm:2.10.0" - dependencies: - buffer-crc32: "npm:~0.2.3" - fd-slicer: "npm:~1.1.0" - checksum: 10/1e4c311050dc0cf2ee3dbe8854fe0a6cde50e420b3e561a8d97042526b4cf7a0718d6c8d89e9e526a152f4a9cec55bcea9c3617264115f48bd6704cf12a04445 - languageName: node - linkType: hard - "yn@npm:3.1.1": version: 3.1.1 resolution: "yn@npm:3.1.1" @@ -56906,20 +19455,6 @@ __metadata: languageName: node linkType: hard -"yn@npm:^2.0.0": - version: 2.0.0 - resolution: "yn@npm:2.0.0" - checksum: 10/9d49527cb3e9a0948cc057223810bf30607bf04b9ff7666cc1681a6501d660b60d90000c16f9e29311b0f28d8a06222ada565ccdca5f1049cdfefb1908217572 - languageName: node - linkType: hard - -"yn@npm:^4.0.0": - version: 4.0.0 - resolution: "yn@npm:4.0.0" - checksum: 10/2d60113b6f43f7c29a0a97719d8da4f626b755f5bb2fd19b00d1fe732db1900ad3f1785811a86d941cbe2800f02773af00d0ed99201333eeb3618db8502f7e96 - languageName: node - linkType: hard - "yocto-queue@npm:^0.1.0": version: 0.1.0 resolution: "yocto-queue@npm:0.1.0" @@ -56963,19 +19498,3 @@ __metadata: checksum: 10/73622ca36a916f785cf528fe612a884b3e0f183dbe6b33365a7d0fc92abdbedf7804c5e2bd8df0a278e1472106d46674281397a3dd800fa9031dc3429758c6ac languageName: node linkType: hard - -"zone.js@npm:0.13.1": - version: 0.13.1 - resolution: "zone.js@npm:0.13.1" - dependencies: - tslib: "npm:^2.3.0" - checksum: 10/82b3f8b5cb049b69acbac709333eeb50b5f81ce4e8d5bddc26a4c4ac8943aa1e0ac41548508061895966571b1157461c730c2f4e81e017f1f77e8850ae3a7d01 - languageName: node - linkType: hard - -"zone.js@npm:0.14.7": - version: 0.14.7 - resolution: "zone.js@npm:0.14.7" - checksum: 10/ae4d677cf390e68205cf0573b3ef424f551ecaa6d197928d455f16114a8336cd74673c16c6738abc11ef5796fd30f464f8959c3b1527ce64ca2190475076c3b6 - languageName: node - linkType: hard